From 7cd6360d59b0d522c1fd2f50d29da13243932954 Mon Sep 17 00:00:00 2001 From: Florian Pix Date: Mon, 24 Aug 2026 15:00:11 +0200 Subject: [PATCH 1/7] fix: serialization of box/lasso select data for multiple subplots --- CHANGELOG.md | 2 +- js/src/widget.ts | 32 +++++++++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0583fec45c8..1037d398edf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Fix concurrent first access to lazily initialized graph object properties, which could raise `ValueError("Invalid value")` [[#3441](https://github.com/plotly/plotly.py/issues/3441)], with thanks to @hb1915 for the contribution! - Fix `px.sunburst`, `px.treemap` and `px.icicle` listing sectors in a different order on every run when `path` is used with a Polars DataFrame; sectors now follow their order of first appearance for all dataframe backends [[#5765](https://github.com/plotly/plotly.py/issues/5765)], with thanks to @Irahan2 for the contribution! - +- Fix serialization of box/lasso select data for multiple subplots ## [7.1.0] - 2026-09-15 diff --git a/js/src/widget.ts b/js/src/widget.ts index 284116648da..cd21d6bf964 100644 --- a/js/src/widget.ts +++ b/js/src/widget.ts @@ -109,9 +109,7 @@ type Py2JsUpdateMsg = Py2JsMsg & { type Selector = { type: "box" | "lasso"; - selector_state: - | { xrange: number[]; yrange: number[] } - | { xs: number[]; ys: number[] }; + selector_state: Record; }; // Model @@ -1149,22 +1147,30 @@ export class FigureView { var selectorObject: Selector; if (data.hasOwnProperty("range")) { - // Box selection + // Box selection - preserve all subplot-specific axis keys (x, x2, x3, ... and y, y2, y3, ...) + var rangeData = data["range"]; + // Verify we have at least an x and y range (in any subplot) + var hasXRange = Object.keys(rangeData || {}).some((key: string) => /^x\d*$/.test(key)); + var hasYRange = Object.keys(rangeData || {}).some((key: string) => /^y\d*$/.test(key)); + if (!hasXRange || !hasYRange) { + return null; + } selectorObject = { type: "box", - selector_state: { - xrange: data["range"]["x"], - yrange: data["range"]["y"], - }, + selector_state: rangeData, }; } else if (data.hasOwnProperty("lassoPoints")) { - // Lasso selection + // Lasso selection - preserve all subplot-specific axis keys + var lassoData = data["lassoPoints"]; + // Verify we have at least an x and y coordinate array (in any subplot) + var hasXCoords = Object.keys(lassoData || {}).some((key: string) => /^x\d*$/.test(key)); + var hasYCoords = Object.keys(lassoData || {}).some((key: string) => /^y\d*$/.test(key)); + if (!hasXCoords || !hasYCoords) { + return null; + } selectorObject = { type: "lasso", - selector_state: { - xs: data["lassoPoints"]["x"], - ys: data["lassoPoints"]["y"], - }, + selector_state: lassoData, }; } else { selectorObject = null; From 0342629c77f188285f22a8cd30662c94723a7780 Mon Sep 17 00:00:00 2001 From: Florian Pix Date: Mon, 28 Sep 2026 11:32:53 +0200 Subject: [PATCH 2/7] fix: rebuild widgetbundle.js --- plotly/package_data/widgetbundle.js | 1256 +++++++++++++-------------- 1 file changed, 624 insertions(+), 632 deletions(-) diff --git a/plotly/package_data/widgetbundle.js b/plotly/package_data/widgetbundle.js index ad5b00b559b..9d42379fded 100644 --- a/plotly/package_data/widgetbundle.js +++ b/plotly/package_data/widgetbundle.js @@ -1,93 +1,93 @@ -var obe=Object.create;var NG=Object.defineProperty;var sbe=Object.getOwnPropertyDescriptor;var lbe=Object.getOwnPropertyNames;var ube=Object.getPrototypeOf,cbe=Object.prototype.hasOwnProperty;var fbe=(Q,ne)=>()=>{try{return ne||Q((ne={exports:{}}).exports,ne),ne.exports}catch(ge){throw ne=0,ge}};var hbe=(Q,ne,ge,je)=>{if(ne&&typeof ne=="object"||typeof ne=="function")for(let mt of lbe(ne))!cbe.call(Q,mt)&&mt!==ge&&NG(Q,mt,{get:()=>ne[mt],enumerable:!(je=sbe(ne,mt))||je.enumerable});return Q};var dbe=(Q,ne,ge)=>(ge=Q!=null?obe(ube(Q)):{},hbe(ne||!Q||!Q.__esModule?NG(ge,"default",{value:Q,enumerable:!0}):ge,Q));var LQ=fbe((DQ,hA)=>{(function(Q,ne){typeof hA=="object"&&hA.exports?hA.exports=ne():Q.moduleName=ne()})(typeof self<"u"?self:DQ,()=>{"use strict";var Q=(()=>{var ne=Object.create,ge=Object.defineProperty,je=Object.defineProperties,mt=Object.getOwnPropertyDescriptor,Lt=Object.getOwnPropertyDescriptors,rr=Object.getOwnPropertyNames,Ar=Object.getOwnPropertySymbols,Tr=Object.getPrototypeOf,Sa=Object.prototype.hasOwnProperty,ya=Object.prototype.propertyIsEnumerable,Fa=(e,r)=>(r=Symbol[e])?r:Symbol.for("Symbol."+e),Ii=e=>{throw TypeError(e)},vn=(e,r,t)=>r in e?ge(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ja=(e,r)=>{for(var t in r||(r={}))Sa.call(r,t)&&vn(e,t,r[t]);if(Ar)for(var t of Ar(r))ya.call(r,t)&&vn(e,t,r[t]);return e},Ci=(e,r)=>je(e,Lt(r)),Rn=(e,r)=>{var t={};for(var a in e)Sa.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&Ar)for(var a of Ar(e))r.indexOf(a)<0&&ya.call(e,a)&&(t[a]=e[a]);return t},Si=(e,r,t)=>function(){if(t)throw t[0];try{return e&&(r=(0,e[rr(e)[0]])(e=0)),r}catch(i){throw t=[i],i}},ye=(e,r)=>function(){try{return r||(0,e[rr(e)[0]])((r={exports:{}}).exports,r),r.exports}catch(a){throw r=0,a}},rl=(e,r)=>{for(var t in r)ge(e,t,{get:r[t],enumerable:!0})},Vu=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of rr(r))!Sa.call(e,i)&&i!==t&&ge(e,i,{get:()=>r[i],enumerable:!(a=mt(r,i))||a.enumerable});return e},Vs=(e,r,t)=>(t=e!=null?ne(Tr(e)):{},Vu(r||!e||!e.__esModule?ge(t,"default",{value:e,enumerable:!0}):t,e)),On=e=>Vu(ge({},"__esModule",{value:!0}),e),yi=(e,r,t)=>new Promise((a,i)=>{var o=n=>{try{l(t.next(n))}catch(u){i(u)}},s=n=>{try{l(t.throw(n))}catch(u){i(u)}},l=n=>n.done?a(n.value):Promise.resolve(n.value).then(o,s);l((t=t.apply(e,r)).next())}),Ed=function(e,r){this[0]=e,this[1]=r},Nx=e=>{var r=e[Fa("asyncIterator")],t=!1,a,i={};return r==null?(r=e[Fa("iterator")](),a=o=>i[o]=s=>r[o](s)):(r=r.call(e),a=o=>i[o]=s=>{if(t){if(t=!1,o==="throw")throw s;return s}return t=!0,{done:!1,value:new Ed(new Promise(l=>{var n=r[o](s);n instanceof Object||Ii("Object expected"),l(n)}),1)}}),i[Fa("iterator")]=()=>i,a("next"),"throw"in r?a("throw"):i.throw=o=>{throw o},"return"in r&&a("return"),i},jx=ye({"src/version.js"(e){"use strict";e.version="4.1.1"}}),zQ=ye({"node_modules/native-promise-only/lib/npo.src.js"(e,r){(function(a,i,o){i[a]=i[a]||o(),typeof r<"u"&&r.exports&&(r.exports=i[a])})("Promise",typeof window<"u"?window:e,function(){"use strict";var a,i,o,s=Object.prototype.toString,l=typeof setImmediate<"u"?function(x){return setImmediate(x)}:setTimeout;try{Object.defineProperty({},"x",{}),a=function(x,E,M,C){return Object.defineProperty(x,E,{value:M,writable:!0,configurable:C!==!1})}}catch{a=function(E,M,C){return E[M]=C,E}}o=(function(){var x,E,M;function C(w,k){this.fn=w,this.self=k,this.next=void 0}return{add:function(k,T){M=new C(k,T),E?E.next=M:x=M,E=M,M=void 0},drain:function(){var k=x;for(x=E=i=void 0;k;)k.fn.call(k.self),k=k.next}}})();function n(v,x){o.add(v,x),i||(i=l(o.drain))}function u(v){var x,E=typeof v;return v!=null&&(E=="object"||E=="function")&&(x=v.then),typeof x=="function"?x:!1}function c(){for(var v=0;v0&&n(c,E))}catch(M){d.call(new g(E),M)}}}function d(v){var x=this;x.triggered||(x.triggered=!0,x.def&&(x=x.def),x.msg=v,x.state=2,x.chain.length>0&&n(c,x))}function p(v,x,E,M){for(var C=0;Cde?1:ae>=de?0:NaN}t.descending=function(ae,de){return deae?1:de>=ae?0:NaN},t.min=function(ae,de){var Te=-1,Pe=ae.length,ze,Ne;if(arguments.length===1){for(;++Te=Ne){ze=Ne;break}for(;++TeNe&&(ze=Ne)}else{for(;++Te=Ne){ze=Ne;break}for(;++TeNe&&(ze=Ne)}return ze},t.max=function(ae,de){var Te=-1,Pe=ae.length,ze,Ne;if(arguments.length===1){for(;++Te=Ne){ze=Ne;break}for(;++Teze&&(ze=Ne)}else{for(;++Te=Ne){ze=Ne;break}for(;++Teze&&(ze=Ne)}return ze},t.extent=function(ae,de){var Te=-1,Pe=ae.length,ze,Ne,lt;if(arguments.length===1){for(;++Te=Ne){ze=lt=Ne;break}for(;++TeNe&&(ze=Ne),lt=Ne){ze=lt=Ne;break}for(;++TeNe&&(ze=Ne),lt1)return lt/(yt-1)},t.deviation=function(){var ae=t.variance.apply(this,arguments);return ae&&Math.sqrt(ae)};function m(ae){return{left:function(de,Te,Pe,ze){for(arguments.length<3&&(Pe=0),arguments.length<4&&(ze=de.length);Pe>>1;ae(de[Ne],Te)<0?Pe=Ne+1:ze=Ne}return Pe},right:function(de,Te,Pe,ze){for(arguments.length<3&&(Pe=0),arguments.length<4&&(ze=de.length);Pe>>1;ae(de[Ne],Te)>0?ze=Ne:Pe=Ne+1}return Pe}}}var y=m(d);t.bisectLeft=y.left,t.bisect=t.bisectRight=y.right,t.bisector=function(ae){return m(ae.length===1?function(de,Te){return d(ae(de),Te)}:ae)},t.shuffle=function(ae,de,Te){(Pe=arguments.length)<3&&(Te=ae.length,Pe<2&&(de=0));for(var Pe=Te-de,ze,Ne;Pe;)Ne=Math.random()*Pe--|0,ze=ae[Pe+de],ae[Pe+de]=ae[Ne+de],ae[Ne+de]=ze;return ae},t.permute=function(ae,de){for(var Te=de.length,Pe=new Array(Te);Te--;)Pe[Te]=ae[de[Te]];return Pe},t.pairs=function(ae){for(var de=0,Te=ae.length-1,Pe,ze=ae[0],Ne=new Array(Te<0?0:Te);de=0;)for(lt=ae[de],Te=lt.length;--Te>=0;)Ne[--ze]=lt[Te];return Ne};var v=Math.abs;t.range=function(ae,de,Te){if(arguments.length<3&&(Te=1,arguments.length<2&&(de=ae,ae=0)),(de-ae)/Te===1/0)throw new Error("infinite range");var Pe=[],ze=x(v(Te)),Ne=-1,lt;if(ae*=ze,de*=ze,Te*=ze,Te<0)for(;(lt=ae+Te*++Ne)>de;)Pe.push(lt/ze);else for(;(lt=ae+Te*++Ne)=de.length)return ze?ze.call(ae,yt):Pe?yt.sort(Pe):yt;for(var Rt=-1,er=yt.length,Qt=de[Ft++],wr,Cr,ir,pr=new M,xr;++Rt=de.length)return Qe;var Ft=[],Rt=Te[yt++];return Qe.forEach(function(er,Qt){Ft.push({key:er,values:lt(Qt,yt)})}),Rt?Ft.sort(function(er,Qt){return Rt(er.key,Qt.key)}):Ft}return ae.map=function(Qe,yt){return Ne(yt,Qe,0)},ae.entries=function(Qe){return lt(Ne(t.map,Qe,0),0)},ae.key=function(Qe){return de.push(Qe),ae},ae.sortKeys=function(Qe){return Te[de.length-1]=Qe,ae},ae.sortValues=function(Qe){return Pe=Qe,ae},ae.rollup=function(Qe){return ze=Qe,ae},ae},t.set=function(ae){var de=new R;if(ae)for(var Te=0,Pe=ae.length;Te=0&&(Pe=ae.slice(Te+1),ae=ae.slice(0,Te)),ae)return arguments.length<2?this[ae].on(Pe):this[ae].on(Pe,de);if(arguments.length===2){if(de==null)for(ae in this)this.hasOwnProperty(ae)&&this[ae].on(Pe,null);return this}};function G(ae){var de=[],Te=new M;function Pe(){for(var ze=de,Ne=-1,lt=ze.length,Qe;++Ne=0&&(Te=ae.slice(0,de))!=="xmlns"&&(ae=ae.slice(de+1)),re.hasOwnProperty(Te)?{space:re[Te],local:ae}:ae}},j.attr=function(ae,de){if(arguments.length<2){if(typeof ae=="string"){var Te=this.node();return ae=t.ns.qualify(ae),ae.local?Te.getAttributeNS(ae.space,ae.local):Te.getAttribute(ae)}for(de in ae)this.each(se(de,ae[de]));return this}return this.each(se(ae,de))};function se(ae,de){ae=t.ns.qualify(ae);function Te(){this.removeAttribute(ae)}function Pe(){this.removeAttributeNS(ae.space,ae.local)}function ze(){this.setAttribute(ae,de)}function Ne(){this.setAttributeNS(ae.space,ae.local,de)}function lt(){var yt=de.apply(this,arguments);yt==null?this.removeAttribute(ae):this.setAttribute(ae,yt)}function Qe(){var yt=de.apply(this,arguments);yt==null?this.removeAttributeNS(ae.space,ae.local):this.setAttributeNS(ae.space,ae.local,yt)}return de==null?ae.local?Pe:Te:typeof de=="function"?ae.local?Qe:lt:ae.local?Ne:ze}function le(ae){return ae.trim().replace(/\s+/g," ")}j.classed=function(ae,de){if(arguments.length<2){if(typeof ae=="string"){var Te=this.node(),Pe=(ae=fe(ae)).length,ze=-1;if(de=Te.classList){for(;++ze=0;)(Ne=Te[Pe])&&(ze&&ze!==Ne.nextSibling&&ze.parentNode.insertBefore(Ne,ze),ze=Ne);return this},j.sort=function(ae){ae=ce.apply(this,arguments);for(var de=-1,Te=this.length;++de=de&&(de=ze+1);!(yt=lt[de])&&++de0&&(ae=ae.slice(0,ze));var lt=Ze.get(ae);lt&&(ae=lt,Ne=dt);function Qe(){var Rt=this[Pe];Rt&&(this.removeEventListener(ae,Rt,Rt.$),delete this[Pe])}function yt(){var Rt=Ne(de,i(arguments));Qe.call(this),this.addEventListener(ae,this[Pe]=Rt,Rt.$=Te),Rt._=de}function Ft(){var Rt=new RegExp("^__on([^.]+)"+t.requote(ae)+"$"),er;for(var Qt in this)if(er=Qt.match(Rt)){var wr=this[Qt];this.removeEventListener(er[1],wr,wr.$),delete this[Qt]}}return ze?de?yt:Qe:de?B:Ft}var Ze=t.map({mouseenter:"mouseover",mouseleave:"mouseout"});o&&Ze.forEach(function(ae){"on"+ae in o&&Ze.remove(ae)});function Ke(ae,de){return function(Te){var Pe=t.event;t.event=Te,de[0]=this.__data__;try{ae.apply(this,de)}finally{t.event=Pe}}}function dt(ae,de){var Te=Ke(ae,de);return function(Pe){var ze=this,Ne=Pe.relatedTarget;(!Ne||Ne!==ze&&!(Ne.compareDocumentPosition(ze)&8))&&Te.call(ze,Pe)}}var _t,Pt=0;function pt(ae){var de=".dragsuppress-"+ ++Pt,Te="click"+de,Pe=t.select(l(ae)).on("touchmove"+de,$).on("dragstart"+de,$).on("selectstart"+de,$);if(_t==null&&(_t="onselectstart"in ae?!1:I(ae.style,"userSelect")),_t){var ze=s(ae).style,Ne=ze[_t];ze[_t]="none"}return function(lt){if(Pe.on(de,null),_t&&(ze[_t]=Ne),lt){var Qe=function(){Pe.on(Te,null)};Pe.on(Te,function(){$(),Qe()},!0),setTimeout(Qe,0)}}}t.mouse=function(ae){return st(ae,X())};var Tt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function st(ae,de){de.changedTouches&&(de=de.changedTouches[0]);var Te=ae.ownerSVGElement||ae;if(Te.createSVGPoint){var Pe=Te.createSVGPoint();if(Tt<0){var ze=l(ae);if(ze.scrollX||ze.scrollY){Te=t.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ne=Te[0][0].getScreenCTM();Tt=!(Ne.f||Ne.e),Te.remove()}}return Tt?(Pe.x=de.pageX,Pe.y=de.pageY):(Pe.x=de.clientX,Pe.y=de.clientY),Pe=Pe.matrixTransform(ae.getScreenCTM().inverse()),[Pe.x,Pe.y]}var lt=ae.getBoundingClientRect();return[de.clientX-lt.left-ae.clientLeft,de.clientY-lt.top-ae.clientTop]}t.touch=function(ae,de,Te){if(arguments.length<3&&(Te=de,de=X().changedTouches),de){for(var Pe=0,ze=de.length,Ne;Pe0?1:ae<0?-1:0}function at(ae,de,Te){return(de[0]-ae[0])*(Te[1]-ae[1])-(de[1]-ae[1])*(Te[0]-ae[0])}function tt(ae){return ae>1?0:ae<-1?be:Math.acos(ae)}function ct(ae){return ae>1?Ce:ae<-1?-Ce:Math.asin(ae)}function At(ae){return((ae=Math.exp(ae))-1/ae)/2}function ft(ae){return((ae=Math.exp(ae))+1/ae)/2}function qt(ae){return((ae=Math.exp(2*ae))-1)/(ae+1)}function ar(ae){return(ae=Math.sin(ae/2))*ae}var vt=Math.SQRT2,gt=2,St=4;t.interpolateZoom=function(ae,de){var Te=ae[0],Pe=ae[1],ze=ae[2],Ne=de[0],lt=de[1],Qe=de[2],yt=Ne-Te,Ft=lt-Pe,Rt=yt*yt+Ft*Ft,er,Qt;if(Rt0&&(Xa=Xa.transition().duration(lt)),Xa.call(Lr.event)}function bi(){pr&&pr.domain(ir.range().map(function(Xa){return(Xa-ae.x)/ae.k}).map(ir.invert)),Dr&&Dr.domain(xr.range().map(function(Xa){return(Xa-ae.y)/ae.k}).map(xr.invert))}function di(Xa){Qe++||Xa({type:"zoomstart"})}function Tn(Xa){bi(),Xa({type:"zoom",scale:ae.k,translate:[ae.x,ae.y]})}function ci(Xa){--Qe||(Xa({type:"zoomend"}),Te=null)}function cn(){var Xa=this,Mn=Cr.of(Xa,arguments),Dn=0,Mo=t.select(l(Xa)).on(Ft,Ll).on(Rt,Ul),_s=mr(t.mouse(Xa)),Js=pt(Xa);yn.call(Xa),di(Mn);function Ll(){Dn=1,Ua(t.mouse(Xa),_s),Tn(Mn)}function Ul(){Mo.on(Ft,null).on(Rt,null),Js(Dn),ci(Mn)}}function xo(){var Xa=this,Mn=Cr.of(Xa,arguments),Dn={},Mo=0,_s,Js=".zoom-"+t.event.changedTouches[0].identifier,Ll="touchmove"+Js,Ul="touchend"+Js,_u=[],xt=t.select(Xa),nr=pt(Xa);Or(),di(Mn),xt.on(yt,null).on(Qt,Or);function fr(){var Wr=t.touches(Xa);return _s=ae.k,Wr.forEach(function(wa){wa.identifier in Dn&&(Dn[wa.identifier]=mr(wa))}),Wr}function Or(){var Wr=t.event.target;t.select(Wr).on(Ll,Xr).on(Ul,aa),_u.push(Wr);for(var wa=t.event.changedTouches,za=0,Ba=wa.length;za1){var ki=Na[0],ii=Na[1],ma=ki[0]-ii[0],Ir=ki[1]-ii[1];Mo=ma*ma+Ir*Ir}}function Xr(){var Wr=t.touches(Xa),wa,za,Ba,Na;yn.call(Xa);for(var Ji=0,ki=Wr.length;Ji1?1:de,Te=Te<0?0:Te>1?1:Te,ze=Te<=.5?Te*(1+de):Te+de-Te*de,Pe=2*Te-ze;function Ne(Qe){return Qe>360?Qe-=360:Qe<0&&(Qe+=360),Qe<60?Pe+(ze-Pe)*Qe/60:Qe<180?ze:Qe<240?Pe+(ze-Pe)*(240-Qe)/60:Pe}function lt(Qe){return Math.round(Ne(Qe)*255)}return new Nr(lt(ae+120),lt(ae),lt(ae-120))}t.hcl=Fr;function Fr(ae,de,Te){return this instanceof Fr?(this.h=+ae,this.c=+de,void(this.l=+Te)):arguments.length<2?ae instanceof Fr?new Fr(ae.h,ae.c,ae.l):ae instanceof jr?na(ae.l,ae.a,ae.b):na((ae=Ht((ae=t.rgb(ae)).r,ae.g,ae.b)).l,ae.a,ae.b):new Fr(ae,de,Te)}var la=Fr.prototype=new lr;la.brighter=function(ae){return new Fr(this.h,this.c,Math.min(100,this.l+Oa*(arguments.length?ae:1)))},la.darker=function(ae){return new Fr(this.h,this.c,Math.max(0,this.l-Oa*(arguments.length?ae:1)))},la.rgb=function(){return Hr(this.h,this.c,this.l).rgb()};function Hr(ae,de,Te){return isNaN(ae)&&(ae=0),isNaN(de)&&(de=0),new jr(Te,Math.cos(ae*=Fe)*de,Math.sin(ae)*de)}t.lab=jr;function jr(ae,de,Te){return this instanceof jr?(this.l=+ae,this.a=+de,void(this.b=+Te)):arguments.length<2?ae instanceof jr?new jr(ae.l,ae.a,ae.b):ae instanceof Fr?Hr(ae.h,ae.c,ae.l):Ht((ae=Nr(ae)).r,ae.g,ae.b):new jr(ae,de,Te)}var Oa=18,Da=.95047,_i=1,ti=1.08883,Ka=jr.prototype=new lr;Ka.brighter=function(ae){return new jr(Math.min(100,this.l+Oa*(arguments.length?ae:1)),this.a,this.b)},Ka.darker=function(ae){return new jr(Math.max(0,this.l-Oa*(arguments.length?ae:1)),this.a,this.b)},Ka.rgb=function(){return ia(this.l,this.a,this.b)};function ia(ae,de,Te){var Pe=(ae+16)/116,ze=Pe+de/500,Ne=Pe-Te/200;return ze=xi(ze)*Da,Pe=xi(Pe)*_i,Ne=xi(Ne)*ti,new Nr(Qr(3.2404542*ze-1.5371385*Pe-.4985314*Ne),Qr(-.969266*ze+1.8760108*Pe+.041556*Ne),Qr(.0556434*ze-.2040259*Pe+1.0572252*Ne))}function na(ae,de,Te){return ae>0?new Fr(Math.atan2(Te,de)*Je,Math.sqrt(de*de+Te*Te),ae):new Fr(NaN,NaN,ae)}function xi(ae){return ae>.206893034?ae*ae*ae:(ae-4/29)/7.787037}function Yi(ae){return ae>.008856?Math.pow(ae,1/3):7.787037*ae+4/29}function Qr(ae){return Math.round(255*(ae<=.00304?12.92*ae:1.055*Math.pow(ae,1/2.4)-.055))}t.rgb=Nr;function Nr(ae,de,Te){return this instanceof Nr?(this.r=~~ae,this.g=~~de,void(this.b=~~Te)):arguments.length<2?ae instanceof Nr?new Nr(ae.r,ae.g,ae.b):zt(""+ae,Nr,vr):new Nr(ae,de,Te)}function Oe(ae){return new Nr(ae>>16,ae>>8&255,ae&255)}function Ie(ae){return Oe(ae)+""}var Et=Nr.prototype=new lr;Et.brighter=function(ae){ae=Math.pow(.7,arguments.length?ae:1);var de=this.r,Te=this.g,Pe=this.b,ze=30;return!de&&!Te&&!Pe?new Nr(ze,ze,ze):(de&&de>4,Pe=Pe>>4|Pe,ze=yt&240,ze=ze>>4|ze,Ne=yt&15,Ne=Ne<<4|Ne):ae.length===7&&(Pe=(yt&16711680)>>16,ze=(yt&65280)>>8,Ne=yt&255)),de(Pe,ze,Ne))}function Gt(ae,de,Te){var Pe=Math.min(ae/=255,de/=255,Te/=255),ze=Math.max(ae,de,Te),Ne=ze-Pe,lt,Qe,yt=(ze+Pe)/2;return Ne?(Qe=yt<.5?Ne/(ze+Pe):Ne/(2-ze-Pe),ae==ze?lt=(de-Te)/Ne+(de0&&yt<1?0:lt),new dr(lt,Qe,yt)}function Ht(ae,de,Te){ae=Be(ae),de=Be(de),Te=Be(Te);var Pe=Yi((.4124564*ae+.3575761*de+.1804375*Te)/Da),ze=Yi((.2126729*ae+.7151522*de+.072175*Te)/_i),Ne=Yi((.0193339*ae+.119192*de+.9503041*Te)/ti);return jr(116*ze-16,500*(Pe-ze),200*(ze-Ne))}function Be(ae){return(ae/=255)<=.04045?ae/12.92:Math.pow((ae+.055)/1.055,2.4)}function et(ae){var de=parseFloat(ae);return ae.charAt(ae.length-1)==="%"?Math.round(de*2.55):de}var ut=t.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});ut.forEach(function(ae,de){ut.set(ae,Oe(de))});function bt(ae){return typeof ae=="function"?ae:function(){return ae}}t.functor=bt,t.xhr=Ot(P);function Ot(ae){return function(de,Te,Pe){return arguments.length===2&&typeof Te=="function"&&(Pe=Te,Te=null),It(de,Te,ae,Pe)}}function It(ae,de,Te,Pe){var ze={},Ne=t.dispatch("beforesend","progress","load","error"),lt={},Qe=new XMLHttpRequest,yt=null;self.XDomainRequest&&!("withCredentials"in Qe)&&/^(http(s)?:)?\/\//.test(ae)&&(Qe=new XDomainRequest),"onload"in Qe?Qe.onload=Qe.onerror=Ft:Qe.onreadystatechange=function(){Qe.readyState>3&&Ft()};function Ft(){var Rt=Qe.status,er;if(!Rt&&jt(Qe)||Rt>=200&&Rt<300||Rt===304){try{er=Te.call(ze,Qe)}catch(Qt){Ne.error.call(ze,Qt);return}Ne.load.call(ze,er)}else Ne.error.call(ze,Qe)}return Qe.onprogress=function(Rt){var er=t.event;t.event=Rt;try{Ne.progress.call(ze,Qe)}finally{t.event=er}},ze.header=function(Rt,er){return Rt=(Rt+"").toLowerCase(),arguments.length<2?lt[Rt]:(er==null?delete lt[Rt]:lt[Rt]=er+"",ze)},ze.mimeType=function(Rt){return arguments.length?(de=Rt==null?null:Rt+"",ze):de},ze.responseType=function(Rt){return arguments.length?(yt=Rt,ze):yt},ze.response=function(Rt){return Te=Rt,ze},["get","post"].forEach(function(Rt){ze[Rt]=function(){return ze.send.apply(ze,[Rt].concat(i(arguments)))}}),ze.send=function(Rt,er,Qt){if(arguments.length===2&&typeof er=="function"&&(Qt=er,er=null),Qe.open(Rt,ae,!0),de!=null&&!("accept"in lt)&&(lt.accept=de+",*/*"),Qe.setRequestHeader)for(var wr in lt)Qe.setRequestHeader(wr,lt[wr]);return de!=null&&Qe.overrideMimeType&&Qe.overrideMimeType(de),yt!=null&&(Qe.responseType=yt),Qt!=null&&ze.on("error",Qt).on("load",function(Cr){Qt(null,Cr)}),Ne.beforesend.call(ze,Qe),Qe.send(er??null),ze},ze.abort=function(){return Qe.abort(),ze},t.rebind(ze,Ne,"on"),Pe==null?ze:ze.get(Wt(Pe))}function Wt(ae){return ae.length===1?function(de,Te){ae(de==null?Te:null)}:ae}function jt(ae){var de=ae.responseType;return de&&de!=="text"?ae.response:ae.responseText}t.dsv=function(ae,de){var Te=new RegExp('["'+ae+` -]`),Pe=ae.charCodeAt(0);function ze(Ft,Rt,er){arguments.length<3&&(er=Rt,Rt=null);var Qt=It(Ft,de,Rt==null?Ne:lt(Rt),er);return Qt.row=function(wr){return arguments.length?Qt.response((Rt=wr)==null?Ne:lt(wr)):Rt},Qt}function Ne(Ft){return ze.parse(Ft.responseText)}function lt(Ft){return function(Rt){return ze.parse(Rt.responseText,Ft)}}ze.parse=function(Ft,Rt){var er;return ze.parseRows(Ft,function(Qt,wr){if(er)return er(Qt,wr-1);var Cr=function(ir){for(var pr={},xr=Qt.length,Dr=0;Dr=Cr)return Qt;if(Dr)return Dr=!1,er;var ha=ir;if(Ft.charCodeAt(ha)===34){for(var ka=ha;ka++24?(isFinite(de)&&(clearTimeout(ua),ua=setTimeout(Ca,de)),Mr=0):(Mr=1,ra(Ca))}t.timer.flush=function(){Li(),Va()};function Li(){for(var ae=Date.now(),de=sr;de;)ae>=de.t&&de.c(ae-de.t)&&(de.c=null),de=de.n;return ae}function Va(){for(var ae,de=sr,Te=1/0;de;)de.c?(de.t=0;--Qe)ir.push(ze[Ft[er[Qe]][2]]);for(Qe=+wr;Qe1&&at(ae[Te[Pe-2]],ae[Te[Pe-1]],ae[ze])<=0;)--Pe;Te[Pe++]=ze}return Te.slice(0,Pe)}function _n(ae,de){return ae[0]-de[0]||ae[1]-de[1]}t.geom.polygon=function(ae){return N(ae,Zi),ae};var Zi=t.geom.polygon.prototype=[];Zi.area=function(){for(var ae=-1,de=this.length,Te,Pe=this[de-1],ze=0;++aeYe)Qe=Qe.L;else if(lt=de-qn(Qe,Te),lt>Ye){if(!Qe.R){Pe=Qe;break}Qe=Qe.R}else{Ne>-Ye?(Pe=Qe.P,ze=Qe):lt>-Ye?(Pe=Qe,ze=Qe.N):Pe=ze=Qe;break}var yt=ro(ae);if(bn.insert(Pe,yt),!(!Pe&&!ze)){if(Pe===ze){Yn(Pe),ze=ro(Pe.site),bn.insert(yt,ze),yt.edge=ze.edge=yo(Pe.site,yt.site),uo(Pe),uo(ze);return}if(!ze){yt.edge=yo(Pe.site,yt.site);return}Yn(Pe),Yn(ze);var Ft=Pe.site,Rt=Ft.x,er=Ft.y,Qt=ae.x-Rt,wr=ae.y-er,Cr=ze.site,ir=Cr.x-Rt,pr=Cr.y-er,xr=2*(Qt*pr-wr*ir),Dr=Qt*Qt+wr*wr,Lr=ir*ir+pr*pr,mr={x:(pr*Dr-wr*Lr)/xr+Rt,y:(Qt*Lr-ir*Dr)/xr+er};ss(ze.edge,Ft,Cr,mr),yt.edge=yo(Ft,ae,null,mr),ze.edge=yo(ae,Cr,null,mr),uo(Pe),uo(ze)}}function Jn(ae,de){var Te=ae.site,Pe=Te.x,ze=Te.y,Ne=ze-de;if(!Ne)return Pe;var lt=ae.P;if(!lt)return-1/0;Te=lt.site;var Qe=Te.x,yt=Te.y,Ft=yt-de;if(!Ft)return Qe;var Rt=Qe-Pe,er=1/Ne-1/Ft,Qt=Rt/Ft;return er?(-Qt+Math.sqrt(Qt*Qt-2*er*(Rt*Rt/(-2*Ft)-yt+Ft/2+ze-Ne/2)))/er+Pe:(Pe+Qe)/2}function qn(ae,de){var Te=ae.N;if(Te)return Jn(Te,de);var Pe=ae.site;return Pe.y===de?Pe.x:1/0}function Fo(ae){this.site=ae,this.edges=[]}Fo.prototype.prepare=function(){for(var ae=this.edges,de=ae.length,Te;de--;)Te=ae[de].edge,(!Te.b||!Te.a)&&ae.splice(de,1);return ae.sort(wn),ae.length};function zn(ae){for(var de=ae[0][0],Te=ae[1][0],Pe=ae[0][1],ze=ae[1][1],Ne,lt,Qe,yt,Ft=jn,Rt=Ft.length,er,Qt,wr,Cr,ir,pr;Rt--;)if(er=Ft[Rt],!(!er||!er.prepare()))for(wr=er.edges,Cr=wr.length,Qt=0;QtYe||v(yt-lt)>Ye)&&(wr.splice(Qt,0,new oo(sl(er.site,pr,v(Qe-de)Ye?{x:de,y:v(Ne-de)Ye?{x:v(lt-ze)Ye?{x:Te,y:v(Ne-Te)Ye?{x:v(lt-Pe)=-me)){var Qt=yt*yt+Ft*Ft,wr=Rt*Rt+pr*pr,Cr=(pr*Qt-Ft*wr)/er,ir=(yt*wr-Rt*Qt)/er,pr=ir+Qe,xr=Vi.pop()||new os;xr.arc=ae,xr.site=ze,xr.x=Cr+lt,xr.y=pr+Math.sqrt(Cr*Cr+ir*ir),xr.cy=pr,ae.circle=xr;for(var Dr=null,Lr=Hi._;Lr;)if(xr.y0)){if(ir/=wr,wr<0){if(ir0){if(ir>Qt)return;ir>er&&(er=ir)}if(ir=Te-Qe,!(!wr&&ir<0)){if(ir/=wr,wr<0){if(ir>Qt)return;ir>er&&(er=ir)}else if(wr>0){if(ir0)){if(ir/=Cr,Cr<0){if(ir0){if(ir>Qt)return;ir>er&&(er=ir)}if(ir=Pe-yt,!(!Cr&&ir<0)){if(ir/=Cr,Cr<0){if(ir>Qt)return;ir>er&&(er=ir)}else if(Cr>0){if(ir0&&(ze.a={x:Qe+er*wr,y:yt+er*Cr}),Qt<1&&(ze.b={x:Qe+Qt*wr,y:yt+Qt*Cr}),ze}}}}}}function Cn(ae){for(var de=un,Te=go(ae[0][0],ae[0][1],ae[1][0],ae[1][1]),Pe=de.length,ze;Pe--;)ze=de[Pe],(!Xo(ze,ae)||!Te(ze)||v(ze.a.x-ze.b.x)=Ne)return;if(Rt>Qt){if(!Pe)Pe={x:Cr,y:lt};else if(Pe.y>=Qe)return;Te={x:Cr,y:Qe}}else{if(!Pe)Pe={x:Cr,y:Qe};else if(Pe.y1)if(Rt>Qt){if(!Pe)Pe={x:(lt-xr)/pr,y:lt};else if(Pe.y>=Qe)return;Te={x:(Qe-xr)/pr,y:Qe}}else{if(!Pe)Pe={x:(Qe-xr)/pr,y:Qe};else if(Pe.y=Ne)return;Te={x:Ne,y:pr*Ne+xr}}else{if(!Pe)Pe={x:Ne,y:pr*Ne+xr};else if(Pe.x=Rt&&xr.x<=Qt&&xr.y>=er&&xr.y<=wr?[[Rt,wr],[Qt,wr],[Qt,er],[Rt,er]]:[];Dr.point=yt[ir]}),Ft}function Qe(yt){return yt.map(function(Ft,Rt){return{x:Math.round(Pe(Ft,Rt)/Ye)*Ye,y:Math.round(ze(Ft,Rt)/Ye)*Ye,i:Rt}})}return lt.links=function(yt){return Jl(Qe(yt)).edges.filter(function(Ft){return Ft.l&&Ft.r}).map(function(Ft){return{source:yt[Ft.l.i],target:yt[Ft.r.i]}})},lt.triangles=function(yt){var Ft=[];return Jl(Qe(yt)).cells.forEach(function(Rt,er){for(var Qt=Rt.site,wr=Rt.edges.sort(wn),Cr=-1,ir=wr.length,pr,xr,Dr=wr[ir-1].edge,Lr=Dr.l===Qt?Dr.r:Dr.l;++CrLr&&(Lr=Rt.x),Rt.y>mr&&(mr=Rt.y),wr.push(Rt.x),Cr.push(Rt.y);else for(ir=0;irLr&&(Lr=ha),ka>mr&&(mr=ka),wr.push(ha),Cr.push(ka)}var Ua=Lr-xr,ei=mr-Dr;Ua>ei?mr=Dr+Ua:Lr=xr+ei;function bi(ci,cn,xo,js,Bo,Xa,Mn,Dn){if(!(isNaN(xo)||isNaN(js)))if(ci.leaf){var Mo=ci.x,_s=ci.y;if(Mo!=null)if(v(Mo-xo)+v(_s-js)<.01)di(ci,cn,xo,js,Bo,Xa,Mn,Dn);else{var Js=ci.point;ci.x=ci.y=ci.point=null,di(ci,Js,Mo,_s,Bo,Xa,Mn,Dn),di(ci,cn,xo,js,Bo,Xa,Mn,Dn)}else ci.x=xo,ci.y=js,ci.point=cn}else di(ci,cn,xo,js,Bo,Xa,Mn,Dn)}function di(ci,cn,xo,js,Bo,Xa,Mn,Dn){var Mo=(Bo+Mn)*.5,_s=(Xa+Dn)*.5,Js=xo>=Mo,Ll=js>=_s,Ul=Ll<<1|Js;ci.leaf=!1,ci=ci.nodes[Ul]||(ci.nodes[Ul]=Ju()),Js?Bo=Mo:Mn=Mo,Ll?Xa=_s:Dn=_s,bi(ci,cn,xo,js,Bo,Xa,Mn,Dn)}var Tn=Ju();if(Tn.add=function(ci){bi(Tn,ci,+er(ci,++ir),+Qt(ci,ir),xr,Dr,Lr,mr)},Tn.visit=function(ci){Ol(ci,Tn,xr,Dr,Lr,mr)},Tn.find=function(ci){return Yc(Tn,ci[0],ci[1],xr,Dr,Lr,mr)},ir=-1,de==null){for(;++irNe||Qt>lt||wr=ha,ei=Te>=ka,bi=ei<<1|Ua,di=bi+4;biTe&&(Ne=de.slice(Te,Ne),Qe[lt]?Qe[lt]+=Ne:Qe[++lt]=Ne),(Pe=Pe[0])===(ze=ze[0])?Qe[lt]?Qe[lt]+=ze:Qe[++lt]=ze:(Qe[++lt]=null,yt.push({i:lt,x:cs(Pe,ze)})),Te=Xc.lastIndex;return Te=0&&!(Pe=t.interpolators[Te](ae,de)););return Pe}t.interpolators=[function(ae,de){var Te=typeof de;return(Te==="string"?ut.has(de.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(de)?Qu:Qo:de instanceof lr?Qu:Array.isArray(de)?kc:Te==="object"&&isNaN(de)?Sl:cs)(ae,de)}],t.interpolateArray=kc;function kc(ae,de){var Te=[],Pe=[],ze=ae.length,Ne=de.length,lt=Math.min(ae.length,de.length),Qe;for(Qe=0;Qe=0?ae.slice(0,de):ae,Pe=de>=0?ae.slice(de+1):"in";return Te=td.get(Te)||ed,Pe=bp.get(Pe)||P,t0(Pe(Te.apply(null,a.call(arguments,1))))};function t0(ae){return function(de){return de<=0?0:de>=1?1:ae(de)}}function ec(ae){return function(de){return 1-ae(1-de)}}function ys(ae){return function(de){return .5*(de<.5?ae(2*de):2-ae(2-2*de))}}function rd(ae){return ae*ae}function Hf(ae){return ae*ae*ae}function Kc(ae){if(ae<=0)return 0;if(ae>=1)return 1;var de=ae*ae,Te=de*ae;return 4*(ae<.5?Te:3*(ae-de)+Te-.75)}function ad(ae){return function(de){return Math.pow(de,ae)}}function Jc(ae){return 1-Math.cos(ae*Ce)}function Tf(ae){return Math.pow(2,10*(ae-1))}function tc(ae){return 1-Math.sqrt(1-ae*ae)}function Wf(ae,de){var Te;return arguments.length<2&&(de=.45),arguments.length?Te=de/Ee*Math.asin(1/ae):(ae=1,Te=de/4),function(Pe){return 1+ae*Math.pow(2,-10*Pe)*Math.sin((Pe-Te)*Ee/de)}}function xh(ae){return ae||(ae=1.70158),function(de){return de*de*((ae+1)*de-ae)}}function Qc(ae){return ae<1/2.75?7.5625*ae*ae:ae<2/2.75?7.5625*(ae-=1.5/2.75)*ae+.75:ae<2.5/2.75?7.5625*(ae-=2.25/2.75)*ae+.9375:7.5625*(ae-=2.625/2.75)*ae+.984375}t.interpolateHcl=Wd;function Wd(ae,de){ae=t.hcl(ae),de=t.hcl(de);var Te=ae.h,Pe=ae.c,ze=ae.l,Ne=de.h-Te,lt=de.c-Pe,Qe=de.l-ze;return isNaN(lt)&&(lt=0,Pe=isNaN(Pe)?de.c:Pe),isNaN(Ne)?(Ne=0,Te=isNaN(Te)?de.h:Te):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(yt){return Hr(Te+Ne*yt,Pe+lt*yt,ze+Qe*yt)+""}}t.interpolateHsl=bh;function bh(ae,de){ae=t.hsl(ae),de=t.hsl(de);var Te=ae.h,Pe=ae.s,ze=ae.l,Ne=de.h-Te,lt=de.s-Pe,Qe=de.l-ze;return isNaN(lt)&&(lt=0,Pe=isNaN(Pe)?de.s:Pe),isNaN(Ne)?(Ne=0,Te=isNaN(Te)?de.h:Te):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(yt){return vr(Te+Ne*yt,Pe+lt*yt,ze+Qe*yt)+""}}t.interpolateLab=wp;function wp(ae,de){ae=t.lab(ae),de=t.lab(de);var Te=ae.l,Pe=ae.a,ze=ae.b,Ne=de.l-Te,lt=de.a-Pe,Qe=de.b-ze;return function(yt){return ia(Te+Ne*yt,Pe+lt*yt,ze+Qe*yt)+""}}t.interpolateRound=rc;function rc(ae,de){return de-=ae,function(Te){return Math.round(ae+de*Te)}}t.transform=function(ae){var de=o.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(Te){if(Te!=null){de.setAttribute("transform",Te);var Pe=de.transform.baseVal.consolidate()}return new id(Pe?Pe.matrix:$f)})(ae)};function id(ae){var de=[ae.a,ae.b],Te=[ae.c,ae.d],Pe=wh(de),ze=Iu(de,Te),Ne=wh(Nl(Te,de,-ze))||0;de[0]*Te[1]180?de+=360:de-ae>180&&(ae+=360),Pe.push({i:Te.push(ac(Te)+"rotate(",null,")")-2,x:cs(ae,de)})):de&&Te.push(ac(Te)+"rotate("+de+")")}function Ah(ae,de,Te,Pe){ae!==de?Pe.push({i:Te.push(ac(Te)+"skewX(",null,")")-2,x:cs(ae,de)}):de&&Te.push(ac(Te)+"skewX("+de+")")}function nd(ae,de,Te,Pe){if(ae[0]!==de[0]||ae[1]!==de[1]){var ze=Te.push(ac(Te)+"scale(",null,",",null,")");Pe.push({i:ze-4,x:cs(ae[0],de[0])},{i:ze-2,x:cs(ae[1],de[1])})}else(de[0]!==1||de[1]!==1)&&Te.push(ac(Te)+"scale("+de+")")}function ef(ae,de){var Te=[],Pe=[];return ae=t.transform(ae),de=t.transform(de),Yf(ae.translate,de.translate,Te,Pe),Xf(ae.rotate,de.rotate,Te,Pe),Ah(ae.skew,de.skew,Te,Pe),nd(ae.scale,de.scale,Te,Pe),ae=de=null,function(ze){for(var Ne=-1,lt=Pe.length,Qe;++Ne0?Ne=mr:(Te.c=null,Te.t=NaN,Te=null,de.end({type:"end",alpha:Ne=0})):mr>0&&(de.start({type:"start",alpha:Ne=mr}),Te=ni(ae.tick)),ae):Ne},ae.start=function(){var mr,ha=wr.length,ka=Cr.length,Ua=Pe[0],ei=Pe[1],bi,di;for(mr=0;mr=0;)Ne.push(Rt=Ft[yt]),Rt.parent=Qe,Rt.depth=Qe.depth+1;Te&&(Qe.value=0),Qe.children=Ft}else Te&&(Qe.value=+Te.call(Pe,Qe,Qe.depth)||0),delete Qe.children;return eu(ze,function(er){var Qt,wr;ae&&(Qt=er.children)&&Qt.sort(ae),Te&&(wr=er.parent)&&(wr.value+=er.value)}),lt}return Pe.sort=function(ze){return arguments.length?(ae=ze,Pe):ae},Pe.children=function(ze){return arguments.length?(de=ze,Pe):de},Pe.value=function(ze){return arguments.length?(Te=ze,Pe):Te},Pe.revalue=function(ze){return Te&&(Ql(ze,function(Ne){Ne.children&&(Ne.value=0)}),eu(ze,function(Ne){var lt;Ne.children||(Ne.value=+Te.call(Pe,Ne,Ne.depth)||0),(lt=Ne.parent)&&(lt.value+=Ne.value)})),ze},Pe};function nc(ae,de){return t.rebind(ae,de,"sort","children","value"),ae.nodes=ae,ae.links=gu,ae}function Ql(ae,de){for(var Te=[ae];(ae=Te.pop())!=null;)if(de(ae),(ze=ae.children)&&(Pe=ze.length))for(var Pe,ze;--Pe>=0;)Te.push(ze[Pe])}function eu(ae,de){for(var Te=[ae],Pe=[];(ae=Te.pop())!=null;)if(Pe.push(ae),(lt=ae.children)&&(Ne=lt.length))for(var ze=-1,Ne,lt;++zeze&&(ze=Qe),Pe.push(Qe)}for(lt=0;ltPe&&(Te=de,Pe=ze);return Te}function Sh(ae){return ae.reduce(Sf,0)}function Sf(ae,de){return ae+de[1]}t.layout.histogram=function(){var ae=!0,de=Number,Te=Dc,Pe=kh;function ze(Ne,Qt){for(var Qe=[],yt=Ne.map(de,this),Ft=Te.call(this,yt,Qt),Rt=Pe.call(this,Ft,yt,Qt),er,Qt=-1,wr=yt.length,Cr=Rt.length-1,ir=ae?1:1/wr,pr;++Qt0)for(Qt=-1;++Qt=Ft[0]&&pr<=Ft[1]&&(er=Qe[t.bisect(Rt,pr,1,Cr)-1],er.y+=ir,er.push(Ne[Qt]));return Qe}return ze.value=function(Ne){return arguments.length?(de=Ne,ze):de},ze.range=function(Ne){return arguments.length?(Te=bt(Ne),ze):Te},ze.bins=function(Ne){return arguments.length?(Pe=typeof Ne=="number"?function(lt){return kf(lt,Ne)}:bt(Ne),ze):Pe},ze.frequency=function(Ne){return arguments.length?(ae=!!Ne,ze):ae},ze};function kh(ae,de){return kf(ae,Math.ceil(Math.log(de.length)/Math.LN2+1))}function kf(ae,de){for(var Te=-1,Pe=+ae[0],ze=(ae[1]-Pe)/de,Ne=[];++Te<=de;)Ne[Te]=ze*Te+Pe;return Ne}function Dc(ae){return[t.min(ae),t.max(ae)]}t.layout.pack=function(){var ae=t.layout.hierarchy().sort(Qf),de=0,Te=[1,1],Pe;function ze(Ne,lt){var Qe=ae.call(this,Ne,lt),yt=Qe[0],Ft=Te[0],Rt=Te[1],er=Pe==null?Math.sqrt:typeof Pe=="function"?Pe:function(){return Pe};if(yt.x=yt.y=0,eu(yt,function(wr){wr.r=+er(wr.value)}),eu(yt,Sp),de){var Qt=de*(Pe?1:Math.max(2*yt.r/Ft,2*yt.r/Rt))/2;eu(yt,function(wr){wr.r+=Qt}),eu(yt,Sp),eu(yt,function(wr){wr.r-=Qt})}return ld(yt,Ft/2,Rt/2,Pe?1:1/Math.max(2*yt.r/Ft,2*yt.r/Rt)),Qe}return ze.size=function(Ne){return arguments.length?(Te=Ne,ze):Te},ze.radius=function(Ne){return arguments.length?(Pe=Ne==null||typeof Ne=="function"?Ne:+Ne,ze):Pe},ze.padding=function(Ne){return arguments.length?(de=+Ne,ze):de},nc(ze,ae)};function Qf(ae,de){return ae.value-de.value}function Ch(ae,de){var Te=ae._pack_next;ae._pack_next=de,de._pack_prev=ae,de._pack_next=Te,Te._pack_prev=de}function Zd(ae,de){ae._pack_next=de,de._pack_prev=ae}function sd(ae,de){var Te=de.x-ae.x,Pe=de.y-ae.y,ze=ae.r+de.r;return .999*ze*ze>Te*Te+Pe*Pe}function Sp(ae){if(!(de=ae.children)||!(Qt=de.length))return;var de,Te=1/0,Pe=-1/0,ze=1/0,Ne=-1/0,lt,Qe,yt,Ft,Rt,er,Qt;function wr(mr){Te=Math.min(mr.x-mr.r,Te),Pe=Math.max(mr.x+mr.r,Pe),ze=Math.min(mr.y-mr.r,ze),Ne=Math.max(mr.y+mr.r,Ne)}if(de.forEach(Dh),lt=de[0],lt.x=-lt.r,lt.y=0,wr(lt),Qt>1&&(Qe=de[1],Qe.x=Qe.r,Qe.y=0,wr(Qe),Qt>2))for(yt=de[2],Ks(lt,Qe,yt),wr(yt),Ch(lt,yt),lt._pack_prev=yt,Ch(yt,Qe),Qe=lt._pack_next,Ft=3;Ftpr.x&&(pr=ha),ha.depth>xr.depth&&(xr=ha)});var Dr=de(ir,pr)/2-ir.x,Lr=Te[0]/(pr.x+de(pr,ir)/2+Dr),mr=Te[1]/(xr.depth||1);Ql(wr,function(ha){ha.x=(ha.x+Dr)*Lr,ha.y=ha.depth*mr})}return Qt}function Ne(Rt){for(var er={A:null,children:[Rt]},Qt=[er],wr;(wr=Qt.pop())!=null;)for(var Cr=wr.children,ir,pr=0,xr=Cr.length;pr0&&(Fh(it(ir,Rt,Qt),Rt,ha),xr+=ha,Dr+=ha),Lr+=ir.m,xr+=wr.m,mr+=pr.m,Dr+=Cr.m;ir&&!ud(Cr)&&(Cr.t=ir,Cr.m+=Lr-Dr),wr&&!Lh(pr)&&(pr.t=wr,pr.m+=xr-mr,Qt=Rt)}return Qt}function Ft(Rt){Rt.x*=Te[0],Rt.y=Rt.depth*Te[1]}return ze.separation=function(Rt){return arguments.length?(de=Rt,ze):de},ze.size=function(Rt){return arguments.length?(Pe=(Te=Rt)==null?Ft:null,ze):Pe?null:Te},ze.nodeSize=function(Rt){return arguments.length?(Pe=(Te=Rt)==null?null:Ft,ze):Pe?Te:null},nc(ze,ae)};function yu(ae,de){return ae.parent==de.parent?1:2}function Lh(ae){var de=ae.children;return de.length?de[0]:ae.t}function ud(ae){var de=ae.children,Te;return(Te=de.length)?de[Te-1]:ae.t}function Fh(ae,de,Te){var Pe=Te/(de.i-ae.i);de.c-=Pe,de.s+=Te,ae.c+=Pe,de.z+=Te,de.m+=Te}function eh(ae){for(var de=0,Te=0,Pe=ae.children,ze=Pe.length,Ne;--ze>=0;)Ne=Pe[ze],Ne.z+=de,Ne.m+=de,de+=Ne.s+(Te+=Ne.c)}function it(ae,de,Te){return ae.a.parent===de.parent?ae.a:Te}t.layout.cluster=function(){var ae=t.layout.hierarchy().sort(null).value(null),de=yu,Te=[1,1],Pe=!1;function ze(Ne,lt){var Qe=ae.call(this,Ne,lt),yt=Qe[0],Ft,Rt=0;eu(yt,function(ir){var pr=ir.children;pr&&pr.length?(ir.x=$t(pr),ir.y=wt(pr)):(ir.x=Ft?Rt+=de(ir,Ft):0,ir.y=0,Ft=ir)});var er=Bt(yt),Qt=cr(yt),wr=er.x-de(er,Qt)/2,Cr=Qt.x+de(Qt,er)/2;return eu(yt,Pe?function(ir){ir.x=(ir.x-yt.x)*Te[0],ir.y=(yt.y-ir.y)*Te[1]}:function(ir){ir.x=(ir.x-wr)/(Cr-wr)*Te[0],ir.y=(1-(yt.y?ir.y/yt.y:1))*Te[1]}),Qe}return ze.separation=function(Ne){return arguments.length?(de=Ne,ze):de},ze.size=function(Ne){return arguments.length?(Pe=(Te=Ne)==null,ze):Pe?null:Te},ze.nodeSize=function(Ne){return arguments.length?(Pe=(Te=Ne)!=null,ze):Pe?Te:null},nc(ze,ae)};function wt(ae){return 1+t.max(ae,function(de){return de.y})}function $t(ae){return ae.reduce(function(de,Te){return de+Te.x},0)/ae.length}function Bt(ae){var de=ae.children;return de&&de.length?Bt(de[0]):ae}function cr(ae){var de=ae.children,Te;return de&&(Te=de.length)?cr(de[Te-1]):ae}t.layout.treemap=function(){var ae=t.layout.hierarchy(),de=Math.round,Te=[1,1],Pe=null,ze=Sr,Ne=!1,lt,Qe="squarify",yt=.5*(1+Math.sqrt(5));function Ft(ir,pr){for(var xr=-1,Dr=ir.length,Lr,mr;++xr0;)Dr.push(mr=Lr[ei-1]),Dr.area+=mr.area,Qe!=="squarify"||(ka=Qt(Dr,Ua))<=ha?(Lr.pop(),ha=ka):(Dr.area-=Dr.pop().area,wr(Dr,Ua,xr,!1),Ua=Math.min(xr.dx,xr.dy),Dr.length=Dr.area=0,ha=1/0);Dr.length&&(wr(Dr,Ua,xr,!0),Dr.length=Dr.area=0),pr.forEach(Rt)}}function er(ir){var pr=ir.children;if(pr&&pr.length){var xr=ze(ir),Dr=pr.slice(),Lr,mr=[];for(Ft(Dr,xr.dx*xr.dy/ir.value),mr.area=0;Lr=Dr.pop();)mr.push(Lr),mr.area+=Lr.area,Lr.z!=null&&(wr(mr,Lr.z?xr.dx:xr.dy,xr,!Dr.length),mr.length=mr.area=0);pr.forEach(er)}}function Qt(ir,pr){for(var xr=ir.area,Dr,Lr=0,mr=1/0,ha=-1,ka=ir.length;++haLr&&(Lr=Dr));return xr*=xr,pr*=pr,xr?Math.max(pr*Lr*yt/xr,xr/(pr*mr*yt)):1/0}function wr(ir,pr,xr,Dr){var Lr=-1,mr=ir.length,ha=xr.x,ka=xr.y,Ua=pr?de(ir.area/pr):0,ei;if(pr==xr.dx){for((Dr||Ua>xr.dy)&&(Ua=xr.dy);++Lrxr.dx)&&(Ua=xr.dx);++Lr1);return ae+de*Pe*Math.sqrt(-2*Math.log(Ne)/Ne)}},logNormal:function(){var ae=t.random.normal.apply(t,arguments);return function(){return Math.exp(ae())}},bates:function(ae){var de=t.random.irwinHall(ae);return function(){return de()/ae}},irwinHall:function(ae){return function(){for(var de=0,Te=0;Te2?da:va,Ft=Pe?Cc:od;return ze=yt(ae,de,Ft,Te),Ne=yt(de,ae,Ft,Zc),Qe}function Qe(yt){return ze(yt)}return Qe.invert=function(yt){return Ne(yt)},Qe.domain=function(yt){return arguments.length?(ae=yt.map(Number),lt()):ae},Qe.range=function(yt){return arguments.length?(de=yt,lt()):de},Qe.rangeRound=function(yt){return Qe.range(yt).interpolate(rc)},Qe.clamp=function(yt){return arguments.length?(Pe=yt,lt()):Pe},Qe.interpolate=function(yt){return arguments.length?(Te=yt,lt()):Te},Qe.ticks=function(yt){return ji(ae,yt)},Qe.tickFormat=function(yt,Ft){return d3_scale_linearTickFormat(ae,yt,Ft)},Qe.nice=function(yt){return pi(ae,yt),lt()},Qe.copy=function(){return La(ae,de,Te,Pe)},lt()}function gi(ae,de){return t.rebind(ae,de,"range","rangeRound","interpolate","clamp")}function pi(ae,de){return Rr(ae,Gr(Pi(ae,de)[2])),Rr(ae,Gr(Pi(ae,de)[2])),ae}function Pi(ae,de){de==null&&(de=10);var Te=qr(ae),Pe=Te[1]-Te[0],ze=Math.pow(10,Math.floor(Math.log(Pe/de)/Math.LN10)),Ne=de/Pe*ze;return Ne<=.15?ze*=10:Ne<=.35?ze*=5:Ne<=.75&&(ze*=2),Te[0]=Math.ceil(Te[0]/ze)*ze,Te[1]=Math.floor(Te[1]/ze)*ze+ze*.5,Te[2]=ze,Te}function ji(ae,de){return t.range.apply(t,Pi(ae,de))}var Ra={s:1,g:1,p:1,r:1,e:1};function Ga(ae){return-Math.floor(Math.log(ae)/Math.LN10+.01)}function Ki(ae,de){var Te=Ga(de[2]);return ae in Ra?Math.abs(Te-Ga(Math.max(v(de[0]),v(de[1]))))+ +(ae!=="e"):Te-(ae==="%")*2}t.scale.log=function(){return pn(t.scale.linear().domain([0,1]),10,!0,[1,10])};function pn(ae,de,Te,Pe){function ze(Qe){return(Te?Math.log(Qe<0?0:Qe):-Math.log(Qe>0?0:-Qe))/Math.log(de)}function Ne(Qe){return Te?Math.pow(de,Qe):-Math.pow(de,-Qe)}function lt(Qe){return ae(ze(Qe))}return lt.invert=function(Qe){return Ne(ae.invert(Qe))},lt.domain=function(Qe){return arguments.length?(Te=Qe[0]>=0,ae.domain((Pe=Qe.map(Number)).map(ze)),lt):Pe},lt.base=function(Qe){return arguments.length?(de=+Qe,ae.domain(Pe.map(ze)),lt):de},lt.nice=function(){var Qe=Rr(Pe.map(ze),Te?Math:ao);return ae.domain(Qe),Pe=Qe.map(Ne),lt},lt.ticks=function(){var Qe=qr(Pe),yt=[],Ft=Qe[0],Rt=Qe[1],er=Math.floor(ze(Ft)),Qt=Math.ceil(ze(Rt)),wr=de%1?2:de;if(isFinite(Qt-er)){if(Te){for(;er0;Cr--)yt.push(Ne(er)*Cr);for(er=0;yt[er]Rt;Qt--);yt=yt.slice(er,Qt)}return yt},lt.copy=function(){return pn(ae.copy(),de,Te,Pe)},gi(lt,ae)}var ao={floor:function(ae){return-Math.ceil(-ae)},ceil:function(ae){return-Math.floor(-ae)}};t.scale.pow=function(){return Co(t.scale.linear(),1,[0,1])};function Co(ae,de,Te){var Pe=ho(de),ze=ho(1/de);function Ne(lt){return ae(Pe(lt))}return Ne.invert=function(lt){return ze(ae.invert(lt))},Ne.domain=function(lt){return arguments.length?(ae.domain((Te=lt.map(Number)).map(Pe)),Ne):Te},Ne.ticks=function(lt){return ji(Te,lt)},Ne.tickFormat=function(lt,Qe){return d3_scale_linearTickFormat(Te,lt,Qe)},Ne.nice=function(lt){return Ne.domain(pi(Te,lt))},Ne.exponent=function(lt){return arguments.length?(Pe=ho(de=lt),ze=ho(1/de),ae.domain(Te.map(Pe)),Ne):de},Ne.copy=function(){return Co(ae.copy(),de,Te)},gi(Ne,ae)}function ho(ae){return function(de){return de<0?-Math.pow(-de,ae):Math.pow(de,ae)}}t.scale.sqrt=function(){return t.scale.pow().exponent(.5)},t.scale.ordinal=function(){return No([],{t:"range",a:[[]]})};function No(ae,de){var Te,Pe,ze;function Ne(Qe){return Pe[((Te.get(Qe)||(de.t==="range"?Te.set(Qe,ae.push(Qe)):NaN))-1)%Pe.length]}function lt(Qe,yt){return t.range(ae.length).map(function(Ft){return Qe+yt*Ft})}return Ne.domain=function(Qe){if(!arguments.length)return ae;ae=[],Te=new M;for(var yt=-1,Ft=Qe.length,Rt;++yt0?Te[Ne-1]:ae[0],NeQt?0:1;if(Rt=De)return yt(Rt,Cr)+(Ft?yt(Ft,1-Cr):"")+"Z";var ir,pr,xr,Dr,Lr=0,mr=0,ha,ka,Ua,ei,bi,di,Tn,ci,cn=[];if((Dr=(+lt.apply(this,arguments)||0)/2)&&(xr=Pe===zu?Math.sqrt(Ft*Ft+Rt*Rt):+Pe.apply(this,arguments),Cr||(mr*=-1),Rt&&(mr=ct(xr/Rt*Math.sin(Dr))),Ft&&(Lr=ct(xr/Ft*Math.sin(Dr)))),Rt){ha=Rt*Math.cos(er+mr),ka=Rt*Math.sin(er+mr),Ua=Rt*Math.cos(Qt-mr),ei=Rt*Math.sin(Qt-mr);var xo=Math.abs(Qt-er-2*mr)<=be?0:1;if(mr&&Cf(ha,ka,Ua,ei)===Cr^xo){var js=(er+Qt)/2;ha=Rt*Math.cos(js),ka=Rt*Math.sin(js),Ua=ei=null}}else ha=ka=0;if(Ft){bi=Ft*Math.cos(Qt-Lr),di=Ft*Math.sin(Qt-Lr),Tn=Ft*Math.cos(er+Lr),ci=Ft*Math.sin(er+Lr);var Bo=Math.abs(er-Qt+2*Lr)<=be?0:1;if(Lr&&Cf(bi,di,Tn,ci)===1-Cr^Bo){var Xa=(er+Qt)/2;bi=Ft*Math.cos(Xa),di=Ft*Math.sin(Xa),Tn=ci=null}}else bi=di=0;if(wr>Ye&&(ir=Math.min(Math.abs(Rt-Ft)/2,+Te.apply(this,arguments)))>.001){pr=Ft0?0:1}function Jd(ae,de,Te,Pe,ze){var Ne=ae[0]-de[0],lt=ae[1]-de[1],Qe=(ze?Pe:-Pe)/Math.sqrt(Ne*Ne+lt*lt),yt=Qe*lt,Ft=-Qe*Ne,Rt=ae[0]+yt,er=ae[1]+Ft,Qt=de[0]+yt,wr=de[1]+Ft,Cr=(Rt+Qt)/2,ir=(er+wr)/2,pr=Qt-Rt,xr=wr-er,Dr=pr*pr+xr*xr,Lr=Te-Pe,mr=Rt*wr-Qt*er,ha=(xr<0?-1:1)*Math.sqrt(Math.max(0,Lr*Lr*Dr-mr*mr)),ka=(mr*xr-pr*ha)/Dr,Ua=(-mr*pr-xr*ha)/Dr,ei=(mr*xr+pr*ha)/Dr,bi=(-mr*pr+xr*ha)/Dr,di=ka-Cr,Tn=Ua-ir,ci=ei-Cr,cn=bi-ir;return di*di+Tn*Tn>ci*ci+cn*cn&&(ka=ei,Ua=bi),[[ka-yt,Ua-Ft],[ka*Te/Lr,Ua*Te/Lr]]}function Ph(){return!0}function kp(ae){var de=dn,Te=rn,Pe=Ph,ze=ru,Ne=ze.key,lt=.7;function Qe(yt){var Ft=[],Rt=[],er=-1,Qt=yt.length,wr,Cr=bt(de),ir=bt(Te);function pr(){Ft.push("M",ze(ae(Rt),lt))}for(;++er1?ae.join("L"):ae+"Z"}function Cp(ae){return ae.join("L")+"Z"}function th(ae){for(var de=0,Te=ae.length,Pe=ae[0],ze=[Pe[0],",",Pe[1]];++de1&&ze.push("H",Pe[0]),ze.join("")}function fd(ae){for(var de=0,Te=ae.length,Pe=ae[0],ze=[Pe[0],",",Pe[1]];++de1){Qe=de[1],Ne=ae[yt],yt++,Pe+="C"+(ze[0]+lt[0])+","+(ze[1]+lt[1])+","+(Ne[0]-Qe[0])+","+(Ne[1]-Qe[1])+","+Ne[0]+","+Ne[1];for(var Ft=2;Ft9&&(Ne=Te*3/Math.sqrt(Ne),lt[Qe]=Ne*Pe,lt[Qe+1]=Ne*ze));for(Qe=-1;++Qe<=yt;)Ne=(ae[Math.min(yt,Qe+1)][0]-ae[Math.max(0,Qe-1)][0])/(6*(1+lt[Qe]*lt[Qe])),de.push([Ne||0,lt[Qe]*Ne||0]);return de}function Ut(ae){return ae.length<3?ru(ae):ae[0]+Ih(ae,ht(ae))}t.svg.line.radial=function(){var ae=kp(Xt);return ae.radius=ae.x,delete ae.x,ae.angle=ae.y,delete ae.y,ae};function Xt(ae){for(var de,Te=-1,Pe=ae.length,ze,Ne;++Tebe)+",1 "+er}function Ft(Rt,er,Qt,wr){return"Q 0,0 "+wr}return Ne.radius=function(Rt){return arguments.length?(Te=bt(Rt),Ne):Te},Ne.source=function(Rt){return arguments.length?(ae=bt(Rt),Ne):ae},Ne.target=function(Rt){return arguments.length?(de=bt(Rt),Ne):de},Ne.startAngle=function(Rt){return arguments.length?(Pe=bt(Rt),Ne):Pe},Ne.endAngle=function(Rt){return arguments.length?(ze=bt(Rt),Ne):ze},Ne};function gr(ae){return ae.radius}t.svg.diagonal=function(){var ae=Zt,de=or,Te=Er;function Pe(ze,Ne){var lt=ae.call(this,ze,Ne),Qe=de.call(this,ze,Ne),yt=(lt.y+Qe.y)/2,Ft=[lt,{x:lt.x,y:yt},{x:Qe.x,y:yt},Qe];return Ft=Ft.map(Te),"M"+Ft[0]+"C"+Ft[1]+" "+Ft[2]+" "+Ft[3]}return Pe.source=function(ze){return arguments.length?(ae=bt(ze),Pe):ae},Pe.target=function(ze){return arguments.length?(de=bt(ze),Pe):de},Pe.projection=function(ze){return arguments.length?(Te=ze,Pe):Te},Pe};function Er(ae){return[ae.x,ae.y]}t.svg.diagonal.radial=function(){var ae=t.svg.diagonal(),de=Er,Te=ae.projection;return ae.projection=function(Pe){return arguments.length?Te(Br(de=Pe)):de},ae};function Br(ae){return function(){var de=ae.apply(this,arguments),Te=de[0],Pe=de[1]-Ce;return[Te*Math.cos(Pe),Te*Math.sin(Pe)]}}t.svg.symbol=function(){var ae=Ma,de=oa;function Te(Pe,ze){return(Wi.get(ae.call(this,Pe,ze))||si)(de.call(this,Pe,ze))}return Te.type=function(Pe){return arguments.length?(ae=bt(Pe),Te):ae},Te.size=function(Pe){return arguments.length?(de=bt(Pe),Te):de},Te};function oa(){return 64}function Ma(){return"circle"}function si(ae){var de=Math.sqrt(ae/be);return"M0,"+de+"A"+de+","+de+" 0 1,1 0,"+-de+"A"+de+","+de+" 0 1,1 0,"+de+"Z"}var Wi=t.map({circle:si,cross:function(ae){var de=Math.sqrt(ae/5)/2;return"M"+-3*de+","+-de+"H"+-de+"V"+-3*de+"H"+de+"V"+-de+"H"+3*de+"V"+de+"H"+de+"V"+3*de+"H"+-de+"V"+de+"H"+-3*de+"Z"},diamond:function(ae){var de=Math.sqrt(ae/(2*on)),Te=de*on;return"M0,"+-de+"L"+Te+",0 0,"+de+" "+-Te+",0Z"},square:function(ae){var de=Math.sqrt(ae)/2;return"M"+-de+","+-de+"L"+de+","+-de+" "+de+","+de+" "+-de+","+de+"Z"},"triangle-down":function(ae){var de=Math.sqrt(ae/Qi),Te=de*Qi/2;return"M0,"+Te+"L"+de+","+-Te+" "+-de+","+-Te+"Z"},"triangle-up":function(ae){var de=Math.sqrt(ae/Qi),Te=de*Qi/2;return"M0,"+-Te+"L"+de+","+Te+" "+-de+","+Te+"Z"}});t.svg.symbolTypes=Wi.keys();var Qi=Math.sqrt(3),on=Math.tan(30*Fe);j.transition=function(ae){for(var de=ll||++es,Te=_l(ae),Pe=[],ze,Ne,lt=Dl||{time:Date.now(),ease:Kc,delay:0,duration:250},Qe=-1,yt=this.length;++Qe0;)er[--Dr].call(ae,xr);if(pr>=1)return lt.event&<.event.end.call(ae,ae.__data__,de),--Ne.count?delete Ne[Pe]:delete ae[Te],1}lt||(Qe=ze.time,yt=ni(Qt,0,Qe),lt=Ne[Pe]={tween:new M,time:Qe,timer:yt,delay:ze.delay,duration:ze.duration,ease:ze.ease,index:de},ze=null,++Ne.count)}t.svg.axis=function(){var ae=t.scale.linear(),de=Ou,Te=6,Pe=6,ze=3,Ne=[10],lt=null,Qe;function yt(Ft){Ft.each(function(){var Rt=t.select(this),er=this.__chart__||ae,Qt=this.__chart__=ae.copy(),wr=lt??(Qt.ticks?Qt.ticks.apply(Qt,Ne):Qt.domain()),Cr=Qe??(Qt.tickFormat?Qt.tickFormat.apply(Qt,Ne):P),ir=Rt.selectAll(".tick").data(wr,Qt),pr=ir.enter().insert("g",".domain").attr("class","tick").style("opacity",Ye),xr=t.transition(ir.exit()).style("opacity",Ye).remove(),Dr=t.transition(ir.order()).style("opacity",1),Lr=Math.max(Te,0)+ze,mr,ha=$r(Qt),ka=Rt.selectAll(".domain").data([0]),Ua=(ka.enter().append("path").attr("class","domain"),t.transition(ka));pr.append("line"),pr.append("text");var ei=pr.select("line"),bi=Dr.select("line"),di=ir.select("text").text(Cr),Tn=pr.select("text"),ci=Dr.select("text"),cn=de==="top"||de==="left"?-1:1,xo,js,Bo,Xa;if(de==="bottom"||de==="top"?(mr=Pc,xo="x",Bo="y",js="x2",Xa="y2",di.attr("dy",cn<0?"0em":".71em").style("text-anchor","middle"),Ua.attr("d","M"+ha[0]+","+cn*Pe+"V0H"+ha[1]+"V"+cn*Pe)):(mr=Ic,xo="y",Bo="x",js="y2",Xa="x2",di.attr("dy",".32em").style("text-anchor",cn<0?"end":"start"),Ua.attr("d","M"+cn*Pe+","+ha[0]+"H0V"+ha[1]+"H"+cn*Pe)),ei.attr(Xa,cn*Te),Tn.attr(Bo,cn*Lr),bi.attr(js,0).attr(Xa,cn*Te),ci.attr(xo,0).attr(Bo,cn*Lr),Qt.rangeBand){var Mn=Qt,Dn=Mn.rangeBand()/2;er=Qt=function(Mo){return Mn(Mo)+Dn}}else er.rangeBand?er=Qt:xr.call(mr,Qt,er);pr.call(mr,er,Qt),Dr.call(mr,Qt,Qt)})}return yt.scale=function(Ft){return arguments.length?(ae=Ft,yt):ae},yt.orient=function(Ft){return arguments.length?(de=Ft in Fc?Ft+"":Ou,yt):de},yt.ticks=function(){return arguments.length?(Ne=i(arguments),yt):Ne},yt.tickValues=function(Ft){return arguments.length?(lt=Ft,yt):lt},yt.tickFormat=function(Ft){return arguments.length?(Qe=Ft,yt):Qe},yt.tickSize=function(Ft){var Rt=arguments.length;return Rt?(Te=+Ft,Pe=+arguments[Rt-1],yt):Te},yt.innerTickSize=function(Ft){return arguments.length?(Te=+Ft,yt):Te},yt.outerTickSize=function(Ft){return arguments.length?(Pe=+Ft,yt):Pe},yt.tickPadding=function(Ft){return arguments.length?(ze=+Ft,yt):ze},yt.tickSubdivide=function(){return arguments.length&&yt},yt};var Ou="bottom",Fc={top:1,right:1,bottom:1,left:1};function Pc(ae,de,Te){ae.attr("transform",function(Pe){var ze=de(Pe);return"translate("+(isFinite(ze)?ze:Te(Pe))+",0)"})}function Ic(ae,de,Te){ae.attr("transform",function(Pe){var ze=de(Pe);return"translate(0,"+(isFinite(ze)?ze:Te(Pe))+")"})}t.svg.brush=function(){var ae=Z(Rt,"brushstart","brush","brushend"),de=null,Te=null,Pe=[0,0],ze=[0,0],Ne,lt,Qe=!0,yt=!0,Ft=uc[0];function Rt(ir){ir.each(function(){var pr=t.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Cr).on("touchstart.brush",Cr),xr=pr.selectAll(".background").data([0]);xr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),pr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Dr=pr.selectAll(".resize").data(Ft,P);Dr.exit().remove(),Dr.enter().append("g").attr("class",function(ka){return"resize "+ka}).style("cursor",function(ka){return lf[ka]}).append("rect").attr("x",function(ka){return/[ew]$/.test(ka)?-3:null}).attr("y",function(ka){return/^[ns]/.test(ka)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Dr.style("display",Rt.empty()?"none":null);var Lr=t.transition(pr),mr=t.transition(xr),ha;de&&(ha=$r(de),mr.attr("x",ha[0]).attr("width",ha[1]-ha[0]),Qt(Lr)),Te&&(ha=$r(Te),mr.attr("y",ha[0]).attr("height",ha[1]-ha[0]),wr(Lr)),er(Lr)})}Rt.event=function(ir){ir.each(function(){var pr=ae.of(this,arguments),xr={x:Pe,y:ze,i:Ne,j:lt},Dr=this.__chart__||xr;this.__chart__=xr,ll?t.select(this).transition().each("start.brush",function(){Ne=Dr.i,lt=Dr.j,Pe=Dr.x,ze=Dr.y,pr({type:"brushstart"})}).tween("brush:brush",function(){var Lr=kc(Pe,xr.x),mr=kc(ze,xr.y);return Ne=lt=null,function(ha){Pe=xr.x=Lr(ha),ze=xr.y=mr(ha),pr({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ne=xr.i,lt=xr.j,pr({type:"brush",mode:"resize"}),pr({type:"brushend"})}):(pr({type:"brushstart"}),pr({type:"brush",mode:"resize"}),pr({type:"brushend"}))})};function er(ir){ir.selectAll(".resize").attr("transform",function(pr){return"translate("+Pe[+/e$/.test(pr)]+","+ze[+/^s/.test(pr)]+")"})}function Qt(ir){ir.select(".extent").attr("x",Pe[0]),ir.selectAll(".extent,.n>rect,.s>rect").attr("width",Pe[1]-Pe[0])}function wr(ir){ir.select(".extent").attr("y",ze[0]),ir.selectAll(".extent,.e>rect,.w>rect").attr("height",ze[1]-ze[0])}function Cr(){var ir=this,pr=t.select(t.event.target),xr=ae.of(ir,arguments),Dr=t.select(ir),Lr=pr.datum(),mr=!/^(n|s)$/.test(Lr)&&de,ha=!/^(e|w)$/.test(Lr)&&Te,ka=pr.classed("extent"),Ua=pt(ir),ei,bi=t.mouse(ir),di,Tn=t.select(l(ir)).on("keydown.brush",xo).on("keyup.brush",js);if(t.event.changedTouches?Tn.on("touchmove.brush",Bo).on("touchend.brush",Mn):Tn.on("mousemove.brush",Bo).on("mouseup.brush",Mn),Dr.interrupt().selectAll("*").interrupt(),ka)bi[0]=Pe[0]-bi[0],bi[1]=ze[0]-bi[1];else if(Lr){var ci=+/w$/.test(Lr),cn=+/^n/.test(Lr);di=[Pe[1-ci]-bi[0],ze[1-cn]-bi[1]],bi[0]=Pe[ci],bi[1]=ze[cn]}else t.event.altKey&&(ei=bi.slice());Dr.style("pointer-events","none").selectAll(".resize").style("display",null),t.select("body").style("cursor",pr.style("cursor")),xr({type:"brushstart"}),Bo();function xo(){t.event.keyCode==32&&(ka||(ei=null,bi[0]-=Pe[1],bi[1]-=ze[1],ka=2),$())}function js(){t.event.keyCode==32&&ka==2&&(bi[0]+=Pe[1],bi[1]+=ze[1],ka=0,$())}function Bo(){var Dn=t.mouse(ir),Mo=!1;di&&(Dn[0]+=di[0],Dn[1]+=di[1]),ka||(t.event.altKey?(ei||(ei=[(Pe[0]+Pe[1])/2,(ze[0]+ze[1])/2]),bi[0]=Pe[+(Dn[0]0))return Ke;do Ke.push(dt=new Date(+Ue)),ce(Ue,Ze),ee(Ue);while(dt=Ge)for(;ee(Ge),!Ue(Ge);)Ge.setTime(Ge-1)},function(Ge,Ze){if(Ge>=Ge)if(Ze<0)for(;++Ze<=0;)for(;ce(Ge,-1),!Ue(Ge););else for(;--Ze>=0;)for(;ce(Ge,1),!Ue(Ge););})},_e&&(Me.count=function(Ue,Ge){return a.setTime(+Ue),i.setTime(+Ge),ee(a),ee(i),Math.floor(_e(a,i))},Me.every=function(Ue){return Ue=Math.floor(Ue),!isFinite(Ue)||!(Ue>0)?null:Ue>1?Me.filter(Se?function(Ge){return Se(Ge)%Ue===0}:function(Ge){return Me.count(0,Ge)%Ue===0}):Me}),Me}var s=o(function(){},function(ee,ce){ee.setTime(+ee+ce)},function(ee,ce){return ce-ee});s.every=function(ee){return ee=Math.floor(ee),!isFinite(ee)||!(ee>0)?null:ee>1?o(function(ce){ce.setTime(Math.floor(ce/ee)*ee)},function(ce,_e){ce.setTime(+ce+_e*ee)},function(ce,_e){return(_e-ce)/ee}):s};var l=s.range,n=1e3,u=6e4,c=36e5,f=864e5,h=6048e5,d=o(function(ee){ee.setTime(ee-ee.getMilliseconds())},function(ee,ce){ee.setTime(+ee+ce*n)},function(ee,ce){return(ce-ee)/n},function(ee){return ee.getUTCSeconds()}),p=d.range,g=o(function(ee){ee.setTime(ee-ee.getMilliseconds()-ee.getSeconds()*n)},function(ee,ce){ee.setTime(+ee+ce*u)},function(ee,ce){return(ce-ee)/u},function(ee){return ee.getMinutes()}),m=g.range,y=o(function(ee){ee.setTime(ee-ee.getMilliseconds()-ee.getSeconds()*n-ee.getMinutes()*u)},function(ee,ce){ee.setTime(+ee+ce*c)},function(ee,ce){return(ce-ee)/c},function(ee){return ee.getHours()}),_=y.range,v=o(function(ee){ee.setHours(0,0,0,0)},function(ee,ce){ee.setDate(ee.getDate()+ce)},function(ee,ce){return(ce-ee-(ce.getTimezoneOffset()-ee.getTimezoneOffset())*u)/f},function(ee){return ee.getDate()-1}),x=v.range;function E(ee){return o(function(ce){ce.setDate(ce.getDate()-(ce.getDay()+7-ee)%7),ce.setHours(0,0,0,0)},function(ce,_e){ce.setDate(ce.getDate()+_e*7)},function(ce,_e){return(_e-ce-(_e.getTimezoneOffset()-ce.getTimezoneOffset())*u)/h})}var M=E(0),C=E(1),w=E(2),k=E(3),T=E(4),b=E(5),S=E(6),A=M.range,F=C.range,D=w.range,R=k.range,P=T.range,z=b.range,I=S.range,L=o(function(ee){ee.setDate(1),ee.setHours(0,0,0,0)},function(ee,ce){ee.setMonth(ee.getMonth()+ce)},function(ee,ce){return ce.getMonth()-ee.getMonth()+(ce.getFullYear()-ee.getFullYear())*12},function(ee){return ee.getMonth()}),B=L.range,O=o(function(ee){ee.setMonth(0,1),ee.setHours(0,0,0,0)},function(ee,ce){ee.setFullYear(ee.getFullYear()+ce)},function(ee,ce){return ce.getFullYear()-ee.getFullYear()},function(ee){return ee.getFullYear()});O.every=function(ee){return!isFinite(ee=Math.floor(ee))||!(ee>0)?null:o(function(ce){ce.setFullYear(Math.floor(ce.getFullYear()/ee)*ee),ce.setMonth(0,1),ce.setHours(0,0,0,0)},function(ce,_e){ce.setFullYear(ce.getFullYear()+_e*ee)})};var G=O.range,$=o(function(ee){ee.setUTCSeconds(0,0)},function(ee,ce){ee.setTime(+ee+ce*u)},function(ee,ce){return(ce-ee)/u},function(ee){return ee.getUTCMinutes()}),X=$.range,Z=o(function(ee){ee.setUTCMinutes(0,0,0)},function(ee,ce){ee.setTime(+ee+ce*c)},function(ee,ce){return(ce-ee)/c},function(ee){return ee.getUTCHours()}),J=Z.range,N=o(function(ee){ee.setUTCHours(0,0,0,0)},function(ee,ce){ee.setUTCDate(ee.getUTCDate()+ce)},function(ee,ce){return(ce-ee)/f},function(ee){return ee.getUTCDate()-1}),H=N.range;function W(ee){return o(function(ce){ce.setUTCDate(ce.getUTCDate()-(ce.getUTCDay()+7-ee)%7),ce.setUTCHours(0,0,0,0)},function(ce,_e){ce.setUTCDate(ce.getUTCDate()+_e*7)},function(ce,_e){return(_e-ce)/h})}var U=W(0),V=W(1),j=W(2),q=W(3),Y=W(4),K=W(5),re=W(6),se=U.range,le=V.range,ue=j.range,fe=q.range,pe=Y.range,we=K.range,xe=re.range,he=o(function(ee){ee.setUTCDate(1),ee.setUTCHours(0,0,0,0)},function(ee,ce){ee.setUTCMonth(ee.getUTCMonth()+ce)},function(ee,ce){return ce.getUTCMonth()-ee.getUTCMonth()+(ce.getUTCFullYear()-ee.getUTCFullYear())*12},function(ee){return ee.getUTCMonth()}),oe=he.range,te=o(function(ee){ee.setUTCMonth(0,1),ee.setUTCHours(0,0,0,0)},function(ee,ce){ee.setUTCFullYear(ee.getUTCFullYear()+ce)},function(ee,ce){return ce.getUTCFullYear()-ee.getUTCFullYear()},function(ee){return ee.getUTCFullYear()});te.every=function(ee){return!isFinite(ee=Math.floor(ee))||!(ee>0)?null:o(function(ce){ce.setUTCFullYear(Math.floor(ce.getUTCFullYear()/ee)*ee),ce.setUTCMonth(0,1),ce.setUTCHours(0,0,0,0)},function(ce,_e){ce.setUTCFullYear(ce.getUTCFullYear()+_e*ee)})};var ie=te.range;t.timeDay=v,t.timeDays=x,t.timeFriday=b,t.timeFridays=z,t.timeHour=y,t.timeHours=_,t.timeInterval=o,t.timeMillisecond=s,t.timeMilliseconds=l,t.timeMinute=g,t.timeMinutes=m,t.timeMonday=C,t.timeMondays=F,t.timeMonth=L,t.timeMonths=B,t.timeSaturday=S,t.timeSaturdays=I,t.timeSecond=d,t.timeSeconds=p,t.timeSunday=M,t.timeSundays=A,t.timeThursday=T,t.timeThursdays=P,t.timeTuesday=w,t.timeTuesdays=D,t.timeWednesday=k,t.timeWednesdays=R,t.timeWeek=M,t.timeWeeks=A,t.timeYear=O,t.timeYears=G,t.utcDay=N,t.utcDays=H,t.utcFriday=K,t.utcFridays=we,t.utcHour=Z,t.utcHours=J,t.utcMillisecond=s,t.utcMilliseconds=l,t.utcMinute=$,t.utcMinutes=X,t.utcMonday=V,t.utcMondays=le,t.utcMonth=he,t.utcMonths=oe,t.utcSaturday=re,t.utcSaturdays=xe,t.utcSecond=d,t.utcSeconds=p,t.utcSunday=U,t.utcSundays=se,t.utcThursday=Y,t.utcThursdays=pe,t.utcTuesday=j,t.utcTuesdays=ue,t.utcWednesday=q,t.utcWednesdays=fe,t.utcWeek=U,t.utcWeeks=se,t.utcYear=te,t.utcYears=ie,Object.defineProperty(t,"__esModule",{value:!0})})}}),uy=ye({"node_modules/d3-time-format/dist/d3-time-format.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e,ED()):(t=t||self,a(t.d3=t.d3||{},t.d3))})(e,function(t,a){"use strict";function i(Ce){if(0<=Ce.y&&Ce.y<100){var Fe=new Date(-1,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L);return Fe.setFullYear(Ce.y),Fe}return new Date(Ce.y,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L)}function o(Ce){if(0<=Ce.y&&Ce.y<100){var Fe=new Date(Date.UTC(-1,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L));return Fe.setUTCFullYear(Ce.y),Fe}return new Date(Date.UTC(Ce.y,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L))}function s(Ce,Fe,Je){return{y:Ce,m:Fe,d:Je,H:0,M:0,S:0,L:0}}function l(Ce){var Fe=Ce.dateTime,Je=Ce.date,qe=Ce.time,at=Ce.periods,tt=Ce.days,ct=Ce.shortDays,At=Ce.months,ft=Ce.shortMonths,qt=p(at),ar=g(at),vt=p(tt),gt=g(tt),St=p(ct),Dt=g(ct),kt=p(At),Vt=g(At),lr=p(ft),dr=g(ft),yr={a:Yi,A:Qr,b:Nr,B:Oe,c:null,d:L,e:L,f:X,g:K,G:se,H:B,I:O,j:G,L:$,m:Z,M:J,p:Ie,q:Et,Q:pt,s:Tt,S:N,u:H,U:W,V,w:j,W:q,x:null,X:null,y:Y,Y:re,Z:le,"%":Pt},vr={a:Mt,A:zt,b:Gt,B:Ht,c:null,d:ue,e:ue,f:he,g:Ze,G:dt,H:fe,I:pe,j:we,L:xe,m:oe,M:te,p:Be,q:et,Q:pt,s:Tt,S:ie,u:ee,U:ce,V:Se,w:Me,W:Ue,x:null,X:null,y:Ge,Y:Ke,Z:_t,"%":Pt},Fr={a:Da,A:_i,b:ti,B:Ka,c:ia,d:T,e:T,f:R,g:M,G:E,H:S,I:S,j:b,L:D,m:k,M:A,p:Oa,q:w,Q:z,s:I,S:F,u:y,U:_,V:v,w:m,W:x,x:na,X:xi,y:M,Y:E,Z:C,"%":P};yr.x=la(Je,yr),yr.X=la(qe,yr),yr.c=la(Fe,yr),vr.x=la(Je,vr),vr.X=la(qe,vr),vr.c=la(Fe,vr);function la(ut,bt){return function(Ot){var It=[],Wt=-1,jt=0,sr=ut.length,kr,Mr,ua;for(Ot instanceof Date||(Ot=new Date(+Ot));++Wt53)return null;"w"in It||(It.w=1),"Z"in It?(jt=o(s(It.y,0,1)),sr=jt.getUTCDay(),jt=sr>4||sr===0?a.utcMonday.ceil(jt):a.utcMonday(jt),jt=a.utcDay.offset(jt,(It.V-1)*7),It.y=jt.getUTCFullYear(),It.m=jt.getUTCMonth(),It.d=jt.getUTCDate()+(It.w+6)%7):(jt=i(s(It.y,0,1)),sr=jt.getDay(),jt=sr>4||sr===0?a.timeMonday.ceil(jt):a.timeMonday(jt),jt=a.timeDay.offset(jt,(It.V-1)*7),It.y=jt.getFullYear(),It.m=jt.getMonth(),It.d=jt.getDate()+(It.w+6)%7)}else("W"in It||"U"in It)&&("w"in It||(It.w="u"in It?It.u%7:"W"in It?1:0),sr="Z"in It?o(s(It.y,0,1)).getUTCDay():i(s(It.y,0,1)).getDay(),It.m=0,It.d="W"in It?(It.w+6)%7+It.W*7-(sr+5)%7:It.w+It.U*7-(sr+6)%7);return"Z"in It?(It.H+=It.Z/100|0,It.M+=It.Z%100,o(It)):i(It)}}function jr(ut,bt,Ot,It){for(var Wt=0,jt=bt.length,sr=Ot.length,kr,Mr;Wt=sr)return-1;if(kr=bt.charCodeAt(Wt++),kr===37){if(kr=bt.charAt(Wt++),Mr=Fr[kr in n?bt.charAt(Wt++):kr],!Mr||(It=Mr(ut,Ot,It))<0)return-1}else if(kr!=Ot.charCodeAt(It++))return-1}return It}function Oa(ut,bt,Ot){var It=qt.exec(bt.slice(Ot));return It?(ut.p=ar[It[0].toLowerCase()],Ot+It[0].length):-1}function Da(ut,bt,Ot){var It=St.exec(bt.slice(Ot));return It?(ut.w=Dt[It[0].toLowerCase()],Ot+It[0].length):-1}function _i(ut,bt,Ot){var It=vt.exec(bt.slice(Ot));return It?(ut.w=gt[It[0].toLowerCase()],Ot+It[0].length):-1}function ti(ut,bt,Ot){var It=lr.exec(bt.slice(Ot));return It?(ut.m=dr[It[0].toLowerCase()],Ot+It[0].length):-1}function Ka(ut,bt,Ot){var It=kt.exec(bt.slice(Ot));return It?(ut.m=Vt[It[0].toLowerCase()],Ot+It[0].length):-1}function ia(ut,bt,Ot){return jr(ut,Fe,bt,Ot)}function na(ut,bt,Ot){return jr(ut,Je,bt,Ot)}function xi(ut,bt,Ot){return jr(ut,qe,bt,Ot)}function Yi(ut){return ct[ut.getDay()]}function Qr(ut){return tt[ut.getDay()]}function Nr(ut){return ft[ut.getMonth()]}function Oe(ut){return At[ut.getMonth()]}function Ie(ut){return at[+(ut.getHours()>=12)]}function Et(ut){return 1+~~(ut.getMonth()/3)}function Mt(ut){return ct[ut.getUTCDay()]}function zt(ut){return tt[ut.getUTCDay()]}function Gt(ut){return ft[ut.getUTCMonth()]}function Ht(ut){return At[ut.getUTCMonth()]}function Be(ut){return at[+(ut.getUTCHours()>=12)]}function et(ut){return 1+~~(ut.getUTCMonth()/3)}return{format:function(ut){var bt=la(ut+="",yr);return bt.toString=function(){return ut},bt},parse:function(ut){var bt=Hr(ut+="",!1);return bt.toString=function(){return ut},bt},utcFormat:function(ut){var bt=la(ut+="",vr);return bt.toString=function(){return ut},bt},utcParse:function(ut){var bt=Hr(ut+="",!0);return bt.toString=function(){return ut},bt}}}var n={"-":"",_:" ",0:"0"},u=/^\s*\d+/,c=/^%/,f=/[\\^$*+?|[\]().{}]/g;function h(Ce,Fe,Je){var qe=Ce<0?"-":"",at=(qe?-Ce:Ce)+"",tt=at.length;return qe+(tt68?1900:2e3),Je+qe[0].length):-1}function C(Ce,Fe,Je){var qe=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Fe.slice(Je,Je+6));return qe?(Ce.Z=qe[1]?0:-(qe[2]+(qe[3]||"00")),Je+qe[0].length):-1}function w(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+1));return qe?(Ce.q=qe[0]*3-3,Je+qe[0].length):-1}function k(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+2));return qe?(Ce.m=qe[0]-1,Je+qe[0].length):-1}function T(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+2));return qe?(Ce.d=+qe[0],Je+qe[0].length):-1}function b(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+3));return qe?(Ce.m=0,Ce.d=+qe[0],Je+qe[0].length):-1}function S(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+2));return qe?(Ce.H=+qe[0],Je+qe[0].length):-1}function A(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+2));return qe?(Ce.M=+qe[0],Je+qe[0].length):-1}function F(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+2));return qe?(Ce.S=+qe[0],Je+qe[0].length):-1}function D(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+3));return qe?(Ce.L=+qe[0],Je+qe[0].length):-1}function R(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+6));return qe?(Ce.L=Math.floor(qe[0]/1e3),Je+qe[0].length):-1}function P(Ce,Fe,Je){var qe=c.exec(Fe.slice(Je,Je+1));return qe?Je+qe[0].length:-1}function z(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je));return qe?(Ce.Q=+qe[0],Je+qe[0].length):-1}function I(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je));return qe?(Ce.s=+qe[0],Je+qe[0].length):-1}function L(Ce,Fe){return h(Ce.getDate(),Fe,2)}function B(Ce,Fe){return h(Ce.getHours(),Fe,2)}function O(Ce,Fe){return h(Ce.getHours()%12||12,Fe,2)}function G(Ce,Fe){return h(1+a.timeDay.count(a.timeYear(Ce),Ce),Fe,3)}function $(Ce,Fe){return h(Ce.getMilliseconds(),Fe,3)}function X(Ce,Fe){return $(Ce,Fe)+"000"}function Z(Ce,Fe){return h(Ce.getMonth()+1,Fe,2)}function J(Ce,Fe){return h(Ce.getMinutes(),Fe,2)}function N(Ce,Fe){return h(Ce.getSeconds(),Fe,2)}function H(Ce){var Fe=Ce.getDay();return Fe===0?7:Fe}function W(Ce,Fe){return h(a.timeSunday.count(a.timeYear(Ce)-1,Ce),Fe,2)}function U(Ce){var Fe=Ce.getDay();return Fe>=4||Fe===0?a.timeThursday(Ce):a.timeThursday.ceil(Ce)}function V(Ce,Fe){return Ce=U(Ce),h(a.timeThursday.count(a.timeYear(Ce),Ce)+(a.timeYear(Ce).getDay()===4),Fe,2)}function j(Ce){return Ce.getDay()}function q(Ce,Fe){return h(a.timeMonday.count(a.timeYear(Ce)-1,Ce),Fe,2)}function Y(Ce,Fe){return h(Ce.getFullYear()%100,Fe,2)}function K(Ce,Fe){return Ce=U(Ce),h(Ce.getFullYear()%100,Fe,2)}function re(Ce,Fe){return h(Ce.getFullYear()%1e4,Fe,4)}function se(Ce,Fe){var Je=Ce.getDay();return Ce=Je>=4||Je===0?a.timeThursday(Ce):a.timeThursday.ceil(Ce),h(Ce.getFullYear()%1e4,Fe,4)}function le(Ce){var Fe=Ce.getTimezoneOffset();return(Fe>0?"-":(Fe*=-1,"+"))+h(Fe/60|0,"0",2)+h(Fe%60,"0",2)}function ue(Ce,Fe){return h(Ce.getUTCDate(),Fe,2)}function fe(Ce,Fe){return h(Ce.getUTCHours(),Fe,2)}function pe(Ce,Fe){return h(Ce.getUTCHours()%12||12,Fe,2)}function we(Ce,Fe){return h(1+a.utcDay.count(a.utcYear(Ce),Ce),Fe,3)}function xe(Ce,Fe){return h(Ce.getUTCMilliseconds(),Fe,3)}function he(Ce,Fe){return xe(Ce,Fe)+"000"}function oe(Ce,Fe){return h(Ce.getUTCMonth()+1,Fe,2)}function te(Ce,Fe){return h(Ce.getUTCMinutes(),Fe,2)}function ie(Ce,Fe){return h(Ce.getUTCSeconds(),Fe,2)}function ee(Ce){var Fe=Ce.getUTCDay();return Fe===0?7:Fe}function ce(Ce,Fe){return h(a.utcSunday.count(a.utcYear(Ce)-1,Ce),Fe,2)}function _e(Ce){var Fe=Ce.getUTCDay();return Fe>=4||Fe===0?a.utcThursday(Ce):a.utcThursday.ceil(Ce)}function Se(Ce,Fe){return Ce=_e(Ce),h(a.utcThursday.count(a.utcYear(Ce),Ce)+(a.utcYear(Ce).getUTCDay()===4),Fe,2)}function Me(Ce){return Ce.getUTCDay()}function Ue(Ce,Fe){return h(a.utcMonday.count(a.utcYear(Ce)-1,Ce),Fe,2)}function Ge(Ce,Fe){return h(Ce.getUTCFullYear()%100,Fe,2)}function Ze(Ce,Fe){return Ce=_e(Ce),h(Ce.getUTCFullYear()%100,Fe,2)}function Ke(Ce,Fe){return h(Ce.getUTCFullYear()%1e4,Fe,4)}function dt(Ce,Fe){var Je=Ce.getUTCDay();return Ce=Je>=4||Je===0?a.utcThursday(Ce):a.utcThursday.ceil(Ce),h(Ce.getUTCFullYear()%1e4,Fe,4)}function _t(){return"+0000"}function Pt(){return"%"}function pt(Ce){return+Ce}function Tt(Ce){return Math.floor(+Ce/1e3)}var st;Ve({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 Ve(Ce){return st=l(Ce),t.timeFormat=st.format,t.timeParse=st.parse,t.utcFormat=st.utcFormat,t.utcParse=st.utcParse,st}var Ye="%Y-%m-%dT%H:%M:%S.%LZ";function me(Ce){return Ce.toISOString()}var be=Date.prototype.toISOString?me:t.utcFormat(Ye);function Ee(Ce){var Fe=new Date(Ce);return isNaN(Fe)?null:Fe}var De=+new Date("2000-01-01T00:00:00.000Z")?Ee:t.utcParse(Ye);t.isoFormat=be,t.isoParse=De,t.timeFormatDefaultLocale=Ve,t.timeFormatLocale=l,Object.defineProperty(t,"__esModule",{value:!0})})}}),SD=ye({"node_modules/d3-format/dist/d3-format.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e):(t=typeof globalThis<"u"?globalThis:t||self,a(t.d3=t.d3||{}))})(e,(function(t){"use strict";function a(k){return Math.abs(k=Math.round(k))>=1e21?k.toLocaleString("en").replace(/,/g,""):k.toString(10)}function i(k,T){if((b=(k=T?k.toExponential(T-1):k.toExponential()).indexOf("e"))<0)return null;var b,S=k.slice(0,b);return[S.length>1?S[0]+S.slice(2):S,+k.slice(b+1)]}function o(k){return k=i(Math.abs(k)),k?k[1]:NaN}function s(k,T){return function(b,S){for(var A=b.length,F=[],D=0,R=k[0],P=0;A>0&&R>0&&(P+R+1>S&&(R=Math.max(1,S-P)),F.push(b.substring(A-=R,A+R)),!((P+=R+1)>S));)R=k[D=(D+1)%k.length];return F.reverse().join(T)}}function l(k){return function(T){return T.replace(/[0-9]/g,function(b){return k[+b]})}}var n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function u(k){if(!(T=n.exec(k)))throw new Error("invalid format: "+k);var T;return new c({fill:T[1],align:T[2],sign:T[3],symbol:T[4],zero:T[5],width:T[6],comma:T[7],precision:T[8]&&T[8].slice(1),trim:T[9],type:T[10]})}u.prototype=c.prototype;function c(k){this.fill=k.fill===void 0?" ":k.fill+"",this.align=k.align===void 0?">":k.align+"",this.sign=k.sign===void 0?"-":k.sign+"",this.symbol=k.symbol===void 0?"":k.symbol+"",this.zero=!!k.zero,this.width=k.width===void 0?void 0:+k.width,this.comma=!!k.comma,this.precision=k.precision===void 0?void 0:+k.precision,this.trim=!!k.trim,this.type=k.type===void 0?"":k.type+""}c.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 f(k){e:for(var T=k.length,b=1,S=-1,A;b0&&(S=0);break}return S>0?k.slice(0,S)+k.slice(A+1):k}var h;function d(k,T){var b=i(k,T);if(!b)return k+"";var S=b[0],A=b[1],F=A-(h=Math.max(-8,Math.min(8,Math.floor(A/3)))*3)+1,D=S.length;return F===D?S:F>D?S+new Array(F-D+1).join("0"):F>0?S.slice(0,F)+"."+S.slice(F):"0."+new Array(1-F).join("0")+i(k,Math.max(0,T+F-1))[0]}function p(k,T){var b=i(k,T);if(!b)return k+"";var S=b[0],A=b[1];return A<0?"0."+new Array(-A).join("0")+S:S.length>A+1?S.slice(0,A+1)+"."+S.slice(A+1):S+new Array(A-S.length+2).join("0")}var g={"%":function(k,T){return(k*100).toFixed(T)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+""},d:a,e:function(k,T){return k.toExponential(T)},f:function(k,T){return k.toFixed(T)},g:function(k,T){return k.toPrecision(T)},o:function(k){return Math.round(k).toString(8)},p:function(k,T){return p(k*100,T)},r:p,s:d,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function m(k){return k}var y=Array.prototype.map,_=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function v(k){var T=k.grouping===void 0||k.thousands===void 0?m:s(y.call(k.grouping,Number),k.thousands+""),b=k.currency===void 0?"":k.currency[0]+"",S=k.currency===void 0?"":k.currency[1]+"",A=k.decimal===void 0?".":k.decimal+"",F=k.numerals===void 0?m:l(y.call(k.numerals,String)),D=k.percent===void 0?"%":k.percent+"",R=k.minus===void 0?"-":k.minus+"",P=k.nan===void 0?"NaN":k.nan+"";function z(L){L=u(L);var B=L.fill,O=L.align,G=L.sign,$=L.symbol,X=L.zero,Z=L.width,J=L.comma,N=L.precision,H=L.trim,W=L.type;W==="n"?(J=!0,W="g"):g[W]||(N===void 0&&(N=12),H=!0,W="g"),(X||B==="0"&&O==="=")&&(X=!0,B="0",O="=");var U=$==="$"?b:$==="#"&&/[boxX]/.test(W)?"0"+W.toLowerCase():"",V=$==="$"?S:/[%p]/.test(W)?D:"",j=g[W],q=/[defgprs%]/.test(W);N=N===void 0?6:/[gprs]/.test(W)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function Y(K){var re=U,se=V,le,ue,fe;if(W==="c")se=j(K)+se,K="";else{K=+K;var pe=K<0||1/K<0;if(K=isNaN(K)?P:j(Math.abs(K),N),H&&(K=f(K)),pe&&+K==0&&G!=="+"&&(pe=!1),re=(pe?G==="("?G:R:G==="-"||G==="("?"":G)+re,se=(W==="s"?_[8+h/3]:"")+se+(pe&&G==="("?")":""),q){for(le=-1,ue=K.length;++lefe||fe>57){se=(fe===46?A+K.slice(le+1):K.slice(le))+se,K=K.slice(0,le);break}}}J&&!X&&(K=T(K,1/0));var we=re.length+K.length+se.length,xe=we>1)+re+K+se+xe.slice(we);break;default:K=xe+re+K+se;break}return F(K)}return Y.toString=function(){return L+""},Y}function I(L,B){var O=z((L=u(L),L.type="f",L)),G=Math.max(-8,Math.min(8,Math.floor(o(B)/3)))*3,$=Math.pow(10,-G),X=_[8+G/3];return function(Z){return O($*Z)+X}}return{format:z,formatPrefix:I}}var x;E({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function E(k){return x=v(k),t.format=x.format,t.formatPrefix=x.formatPrefix,x}function M(k){return Math.max(0,-o(Math.abs(k)))}function C(k,T){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(o(T)/3)))*3-o(Math.abs(k)))}function w(k,T){return k=Math.abs(k),T=Math.abs(T)-k,Math.max(0,o(T)-o(k))+1}t.FormatSpecifier=c,t.formatDefaultLocale=E,t.formatLocale=v,t.formatSpecifier=u,t.precisionFixed=M,t.precisionPrefix=C,t.precisionRound=w,Object.defineProperty(t,"__esModule",{value:!0})}))}}),BQ=ye({"node_modules/is-string-blank/index.js"(e,r){"use strict";r.exports=function(t){for(var a=t.length,i,o=0;o13)&&i!==32&&i!==133&&i!==160&&i!==5760&&i!==6158&&(i<8192||i>8205)&&i!==8232&&i!==8233&&i!==8239&&i!==8287&&i!==8288&&i!==12288&&i!==65279)return!1;return!0}}}),en=ye({"node_modules/fast-isnumeric/index.js"(e,r){"use strict";var t=BQ();r.exports=function(a){var i=typeof a;if(i==="string"){var o=a;if(a=+a,a===0&&t(o))return!1}else if(i!=="number")return!1;return a-a<1}}}),Vn=ye({"src/constants/numerical.js"(e,r){"use strict";r.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"}}}),kD=ye({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e):(t=typeof globalThis<"u"?globalThis:t||self,a(t["base64-arraybuffer"]={}))})(e,(function(t){"use strict";for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=typeof Uint8Array>"u"?[]:new Uint8Array(256),o=0;o>2],h+=a[(u[c]&3)<<4|u[c+1]>>4],h+=a[(u[c+1]&15)<<2|u[c+2]>>6],h+=a[u[c+2]&63];return f%3===2?h=h.substring(0,h.length-1)+"=":f%3===1&&(h=h.substring(0,h.length-2)+"=="),h},l=function(n){var u=n.length*.75,c=n.length,f,h=0,d,p,g,m;n[n.length-1]==="="&&(u--,n[n.length-2]==="="&&u--);var y=new ArrayBuffer(u),_=new Uint8Array(y);for(f=0;f>4,_[h++]=(p&15)<<4|g>>2,_[h++]=(g&3)<<6|m&63;return y};t.decode=l,t.encode=s,Object.defineProperty(t,"__esModule",{value:!0})}))}}),yv=ye({"src/lib/is_plain_object.js"(e,r){"use strict";r.exports=function(a){return window&&window.process&&window.process.versions?Object.prototype.toString.call(a)==="[object Object]":Object.prototype.toString.call(a)==="[object Object]"&&Object.getPrototypeOf(a).hasOwnProperty("hasOwnProperty")}}}),yc=ye({"src/lib/array.js"(e){"use strict";var r=kD().decode,t=yv(),a=Array.isArray,i=ArrayBuffer,o=DataView;function s(d){return i.isView(d)&&!(d instanceof o)}e.isTypedArray=s;function l(d){return a(d)||s(d)}e.isArrayOrTypedArray=l;function n(d){return!l(d[0])}e.isArray1D=n,e.ensureArray=function(d,p){return a(d)||(d=[]),d.length=p,d};var u={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};u.uint8c=u.u1c,u.uint8=u.u1,u.int8=u.i1,u.uint16=u.u2,u.int16=u.i2,u.uint32=u.u4,u.int32=u.i4,u.float32=u.f4,u.float64=u.f8;function c(d){return d.constructor===ArrayBuffer}e.isArrayBuffer=c,e.decodeTypedArraySpec=function(d){var p=[],g=f(d),m=g.dtype,y=u[m];if(!y)throw new Error('Error in dtype: "'+m+'"');var _=y.BYTES_PER_ELEMENT,v=g.bdata;c(v)||(v=r(v));var x=g.shape===void 0?[v.byteLength/_]:(""+g.shape).split(",");x.reverse();var E=x.length,M,C,w=+x[0],k=_*w,T=0;if(E===1)p=new y(v);else if(E===2)for(M=+x[1],C=0;C2)return y[M]=y[M]|s,x.set(E,null);if(v){for(p=M;p0)return Math.log(i)/Math.LN10;var s=Math.log(Math.min(o[0],o[1]))/Math.LN10;return t(s)||(s=Math.log(Math.max(o[0],o[1]))/Math.LN10-6),s}}}),jQ=ye({"src/lib/relink_private.js"(e,r){"use strict";var t=yc().isArrayOrTypedArray,a=yv();r.exports=function i(o,s){for(var l in s){var n=s[l],u=o[l];if(u!==n)if(l.charAt(0)==="_"||typeof n=="function"){if(l in o)continue;o[l]=n}else if(t(n)&&t(u)&&a(n[0])){if(l==="customdata"||l==="ids")continue;for(var c=Math.min(n.length,u.length),f=0;fUQ,modHalf:()=>qQ});function UQ(e,r){let t=e%r;return t<0?t+r:t}function qQ(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}var cy=Si({"src/lib/mod.ts"(){"use strict"}}),Xi=ye({"src/lib/extend.js"(e){"use strict";var r=yv(),t=Array.isArray;function a(o,s){var l,n;for(l=0;l{for(var Le in Ae)t(ve,Le,{get:Ae[Le],enumerable:!0})},l=(ve,Ae,Le,We)=>{if(Ae&&typeof Ae=="object"||typeof Ae=="function")for(let Xe of i(Ae))!o.call(ve,Xe)&&Xe!==Le&&t(ve,Xe,{get:()=>Ae[Xe],enumerable:!(We=a(Ae,Xe))||We.enumerable});return ve},n=ve=>l(t({},"__esModule",{value:!0}),ve),u={};s(u,{a98:()=>bo,average:()=>zt,averageAngle:()=>Ie,averageNumber:()=>Et,blend:()=>Pf,blerp:()=>Me,clampChroma:()=>Xr,clampGamut:()=>Or,clampRgb:()=>fr,colorsNamed:()=>d,convertA98ToXyz65:()=>st,convertCubehelixToRgb:()=>Oa,convertDlchToLab65:()=>bn,convertHsiToRgb:()=>To,convertHslToRgb:()=>zn,convertHsvToRgb:()=>ss,convertHwbToRgb:()=>Po,convertItpToXyz65:()=>ml,convertJabToJch:()=>Iu,convertJabToRgb:()=>bh,convertJabToXyz65:()=>Wf,convertJchToJab:()=>Nl,convertLab65ToDlch:()=>ui,convertLab65ToRgb:()=>Ca,convertLab65ToXyz65:()=>ra,convertLabToLch:()=>et,convertLabToRgb:()=>kl,convertLabToXyz50:()=>ef,convertLchToLab:()=>bt,convertLchuvToLuv:()=>nf,convertLrgbToOklab:()=>wt,convertLrgbToRgb:()=>at,convertLuvToLchuv:()=>Ef,convertLuvToXyz50:()=>Dh,convertOkhslToOklab:()=>pi,convertOkhsvToOklab:()=>Ga,convertOklabToLrgb:()=>Sr,convertOklabToOkhsl:()=>gi,convertOklabToOkhsv:()=>Ra,convertOklabToRgb:()=>qr,convertP3ToXyz65:()=>io,convertProphotoToXyz50:()=>Cf,convertRec2020ToXyz65:()=>Df,convertRgbToCubehelix:()=>Hr,convertRgbToHsi:()=>Jn,convertRgbToHsl:()=>wn,convertRgbToHsv:()=>oo,convertRgbToHwb:()=>Bl,convertRgbToJab:()=>Qc,convertRgbToLab:()=>Mh,convertRgbToLab65:()=>pa,convertRgbToLrgb:()=>De,convertRgbToOklab:()=>Bt,convertRgbToXyb:()=>au,convertRgbToXyz50:()=>tf,convertRgbToXyz65:()=>Fe,convertRgbToYiq:()=>Br,convertXybToRgb:()=>He,convertXyz50ToLab:()=>ic,convertXyz50ToLuv:()=>Dc,convertXyz50ToProphoto:()=>Cl,convertXyz50ToRgb:()=>Cc,convertXyz50ToXyz65:()=>Zt,convertXyz65ToA98:()=>me,convertXyz65ToItp:()=>kc,convertXyz65ToJab:()=>Hf,convertXyz65ToLab65:()=>dn,convertXyz65ToP3:()=>Ns,convertXyz65ToRec2020:()=>th,convertXyz65ToRgb:()=>ct,convertXyz65ToXyz50:()=>Xt,convertYiqToRgb:()=>Ma,converter:()=>L,cubehelix:()=>uf,differenceCie76:()=>ia,differenceCie94:()=>na,differenceCiede2000:()=>xi,differenceCmc:()=>Yi,differenceEuclidean:()=>Ka,differenceHueChroma:()=>ti,differenceHueNaive:()=>_i,differenceHueSaturation:()=>Da,differenceHyab:()=>Qr,differenceItp:()=>Oe,differenceKotsarenkoRamos:()=>Nr,displayable:()=>xt,dlab:()=>hs,dlch:()=>cc,easingGamma:()=>Dn,easingInOutSine:()=>so,easingMidpoint:()=>er,easingSmootherstep:()=>Sn,easingSmoothstep:()=>Ln,easingSmoothstepInverse:()=>fi,filterBrightness:()=>fa,filterContrast:()=>Pa,filterDeficiencyDeuter:()=>Ai,filterDeficiencyProt:()=>Ja,filterDeficiencyTrit:()=>nn,filterGrayscale:()=>hi,filterHueRotate:()=>an,filterInvert:()=>oi,filterSaturate:()=>Ta,filterSepia:()=>Ha,fixupAlpha:()=>dt,fixupHueDecreasing:()=>kt,fixupHueIncreasing:()=>Dt,fixupHueLonger:()=>St,fixupHueShorter:()=>gt,formatCss:()=>xl,formatHex:()=>Ou,formatHex8:()=>Fc,formatHsl:()=>Ic,formatRgb:()=>Pc,getMode:()=>J,hsi:()=>Rc,hsl:()=>cf,hsv:()=>ql,hwb:()=>Vl,inGamut:()=>nr,interpolate:()=>pr,interpolateWith:()=>xr,interpolateWithPremultipliedAlpha:()=>Dr,interpolatorLinear:()=>Ke,interpolatorPiecewise:()=>Ze,interpolatorSplineBasis:()=>ha,interpolatorSplineBasisClosed:()=>ka,interpolatorSplineMonotone:()=>js,interpolatorSplineMonotone2:()=>Bo,interpolatorSplineMonotoneClosed:()=>Xa,interpolatorSplineNatural:()=>ei,interpolatorSplineNaturalClosed:()=>bi,itp:()=>nu,jab:()=>Xn,jch:()=>xu,lab:()=>xs,lab65:()=>zc,lch:()=>ff,lch65:()=>hf,lchuv:()=>Nn,lerp:()=>_e,lrgb:()=>Do,luv:()=>Ps,mapAlphaDivide:()=>Ne,mapAlphaMultiply:()=>ze,mapTransferGamma:()=>Qe,mapTransferLinear:()=>lt,mapper:()=>Pe,modeA98:()=>ft,modeCubehelix:()=>Ht,modeDlab:()=>ro,modeDlch:()=>Kn,modeHsi:()=>Fo,modeHsl:()=>sl,modeHsv:()=>An,modeHwb:()=>Pu,modeItp:()=>td,modeJab:()=>rc,modeJch:()=>ac,modeLab:()=>Ql,modeLab65:()=>Mp,modeLch:()=>Mf,modeLch65:()=>Kf,modeLchuv:()=>yu,modeLrgb:()=>ud,modeLuv:()=>eh,modeOkhsl:()=>ji,modeOkhsv:()=>pn,modeOklab:()=>No,modeOklch:()=>zo,modeP3:()=>zu,modeProphoto:()=>Ph,modeRec2020:()=>Lf,modeRgb:()=>Pt,modeXyb:()=>ot,modeXyz50:()=>ht,modeXyz65:()=>gr,modeYiq:()=>Wi,nearest:()=>wa,okhsl:()=>ur,okhsv:()=>Kr,oklab:()=>Jr,oklch:()=>Gi,p3:()=>Eo,parse:()=>oe,parseHex:()=>_,parseHsl:()=>gs,parseHslLegacy:()=>Cn,parseHwb:()=>Jl,parseLab:()=>$d,parseLch:()=>Yd,parseNamed:()=>g,parseOklab:()=>Co,parseOklch:()=>Os,parseRgb:()=>ie,parseRgbLegacy:()=>R,parseTransparent:()=>ce,prophoto:()=>ds,random:()=>Te,rec2020:()=>Ui,removeParser:()=>H,rgb:()=>tr,round:()=>yn,samples:()=>_s,serializeHex:()=>Dl,serializeHex8:()=>lc,serializeHsl:()=>_l,serializeRgb:()=>sf,toGamut:()=>aa,trilerp:()=>Ue,unlerp:()=>Se,useMode:()=>Z,useParser:()=>N,wcagContrast:()=>iu,wcagLuminance:()=>Us,xyb:()=>hr,xyz50:()=>_r,xyz65:()=>Zr,yiq:()=>sa}),r.exports=n(u);var c=(ve,Ae)=>{if(typeof ve=="number"){if(Ae===3)return{mode:"rgb",r:(ve>>8&15|ve>>4&240)/255,g:(ve>>4&15|ve&240)/255,b:(ve&15|ve<<4&240)/255};if(Ae===4)return{mode:"rgb",r:(ve>>12&15|ve>>8&240)/255,g:(ve>>8&15|ve>>4&240)/255,b:(ve>>4&15|ve&240)/255,alpha:(ve&15|ve<<4&240)/255};if(Ae===6)return{mode:"rgb",r:(ve>>16&255)/255,g:(ve>>8&255)/255,b:(ve&255)/255};if(Ae===8)return{mode:"rgb",r:(ve>>24&255)/255,g:(ve>>16&255)/255,b:(ve>>8&255)/255,alpha:(ve&255)/255}}},f=c,h={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},d=h,p=ve=>f(d[ve.toLowerCase()],6),g=p,m=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,y=ve=>{let Ae;return(Ae=ve.match(m))?f(parseInt(Ae[1],16),Ae[1].length):void 0},_=y,v="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",x=`(?:${v}|none)`,E=`${v}%`,M=`(?:${v}%|none)`,C=`(?:${v}%|${v})`,w=`(?:${v}%|${v}|none)`,k=`(?:${v}(deg|grad|rad|turn)|${v})`,T=`(?:${v}(deg|grad|rad|turn)|${v}|none)`,b="\\s*,\\s*",S=new RegExp("^"+w+"$"),A=new RegExp(`^rgba?\\(\\s*${v}${b}${v}${b}${v}\\s*(?:,\\s*${C}\\s*)?\\)$`),F=new RegExp(`^rgba?\\(\\s*${E}${b}${E}${b}${E}\\s*(?:,\\s*${C}\\s*)?\\)$`),D=ve=>{let Ae={mode:"rgb"},Le;if(Le=ve.match(A))Le[1]!==void 0&&(Ae.r=Le[1]/255),Le[2]!==void 0&&(Ae.g=Le[2]/255),Le[3]!==void 0&&(Ae.b=Le[3]/255);else if(Le=ve.match(F))Le[1]!==void 0&&(Ae.r=Le[1]/100),Le[2]!==void 0&&(Ae.g=Le[2]/100),Le[3]!==void 0&&(Ae.b=Le[3]/100);else return;return Le[4]!==void 0?Ae.alpha=Math.max(0,Math.min(1,Le[4]/100)):Le[5]!==void 0&&(Ae.alpha=Math.max(0,Math.min(1,+Le[5]))),Ae},R=D,P=(ve,Ae)=>ve===void 0?void 0:typeof ve!="object"?oe(ve):ve.mode!==void 0?ve:Ae?Ci(ja({},ve),{mode:Ae}):void 0,z=P,I=(ve="rgb")=>Ae=>(Ae=z(Ae,ve))!==void 0?Ae.mode===ve?Ae:B[Ae.mode][ve]?B[Ae.mode][ve](Ae):ve==="rgb"?B[Ae.mode].rgb(Ae):B.rgb[ve](B[Ae.mode].rgb(Ae)):void 0,L=I,B={},O={},G=[],$={},X=ve=>ve,Z=ve=>(B[ve.mode]=ja(ja({},B[ve.mode]),ve.toMode),Object.keys(ve.fromMode||{}).forEach(Ae=>{B[Ae]||(B[Ae]={}),B[Ae][ve.mode]=ve.fromMode[Ae]}),ve.ranges||(ve.ranges={}),ve.difference||(ve.difference={}),ve.channels.forEach(Ae=>{if(ve.ranges[Ae]===void 0&&(ve.ranges[Ae]=[0,1]),!ve.interpolate[Ae])throw new Error(`Missing interpolator for: ${Ae}`);typeof ve.interpolate[Ae]=="function"&&(ve.interpolate[Ae]={use:ve.interpolate[Ae]}),ve.interpolate[Ae].fixup||(ve.interpolate[Ae].fixup=X)}),O[ve.mode]=ve,(ve.parse||[]).forEach(Ae=>{N(Ae,ve.mode)}),L(ve.mode)),J=ve=>O[ve],N=(ve,Ae)=>{if(typeof ve=="string"){if(!Ae)throw new Error("'mode' required when 'parser' is a string");$[ve]=Ae}else typeof ve=="function"&&G.indexOf(ve)<0&&G.push(ve)},H=ve=>{if(typeof ve=="string")delete $[ve];else if(typeof ve=="function"){let Ae=G.indexOf(ve);Ae>0&&G.splice(Ae,1)}},W=/[^\x00-\x7F]|[a-zA-Z_]/,U=/[^\x00-\x7F]|[-\w]/,V={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},j=0;function q(ve){let Ae=ve[j],Le=ve[j+1];return Ae==="-"||Ae==="+"?/\d/.test(Le)||Le==="."&&/\d/.test(ve[j+2]):Ae==="."?/\d/.test(Le):/\d/.test(Ae)}function Y(ve){if(j>=ve.length)return!1;let Ae=ve[j];if(W.test(Ae))return!0;if(Ae==="-"){if(ve.length-j<2)return!1;let Le=ve[j+1];return!!(Le==="-"||W.test(Le))}return!1}var K={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function re(ve){let Ae="";if((ve[j]==="-"||ve[j]==="+")&&(Ae+=ve[j++]),Ae+=se(ve),ve[j]==="."&&/\d/.test(ve[j+1])&&(Ae+=ve[j++]+se(ve)),(ve[j]==="e"||ve[j]==="E")&&((ve[j+1]==="-"||ve[j+1]==="+")&&/\d/.test(ve[j+2])?Ae+=ve[j++]+ve[j++]+se(ve):/\d/.test(ve[j+1])&&(Ae+=ve[j++]+se(ve))),Y(ve)){let Le=le(ve);return Le==="deg"||Le==="rad"||Le==="turn"||Le==="grad"?{type:V.Hue,value:Ae*K[Le]}:void 0}return ve[j]==="%"?(j++,{type:V.Percentage,value:+Ae}):{type:V.Number,value:+Ae}}function se(ve){let Ae="";for(;/\d/.test(ve[j]);)Ae+=ve[j++];return Ae}function le(ve){let Ae="";for(;j4)){if(Le.length===4){if(Le[3].type!==V.Alpha)return;Le[3]=Le[3].value}return Le.length===3&&Le.push({type:V.None,value:void 0}),Le.every(Xe=>Xe.type!==V.Alpha)?Le:void 0}}function xe(ve,Ae){ve._i=0;let Le=ve[ve._i++];if(!Le||Le.type!==V.Function)return;let We=we(ve,Ae);if(We)return We.unshift(Le.value),We}var he=ve=>{if(typeof ve!="string")return;let Ae=fe(ve),Le=Ae?xe(Ae,!0):void 0,We,Xe=0,rt=G.length;for(;Xeve==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,ce=ee,_e=(ve,Ae,Le)=>ve+Le*(Ae-ve),Se=(ve,Ae,Le)=>(Le-ve)/(Ae-ve),Me=(ve,Ae,Le,We,Xe,rt)=>_e(_e(ve,Ae,Xe),_e(Le,We,Xe),rt),Ue=(ve,Ae,Le,We,Xe,rt,Ct,Jt,br,ea,Vr)=>_e(Me(ve,Ae,Le,We,br,ea),Me(Xe,rt,Ct,Jt,br,ea),Vr),Ge=ve=>{let Ae=[];for(let Le=0;LeAe=>{let Le=Ge(Ae);return We=>{let Xe=We*Le.length,rt=We>=1?Le.length-1:Math.max(Math.floor(Xe),0),Ct=Le[rt];return Ct===void 0?void 0:ve(Ct[0],Ct[1],Xe-rt)}},Ke=Ze(_e),dt=ve=>{let Ae=!1,Le=ve.map(We=>We!==void 0?(Ae=!0,We):1);return Ae?Le:ve},_t={mode:"rgb",channels:["r","g","b","alpha"],parse:[ie,_,R,g,ce,"srgb"],serialize:"srgb",interpolate:{r:Ke,g:Ke,b:Ke,alpha:{use:Ke,fixup:dt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Pt=_t,pt=(ve=0)=>Math.pow(Math.abs(ve),563/256)*Math.sign(ve),Tt=ve=>{let Ae=pt(ve.r),Le=pt(ve.g),We=pt(ve.b),Xe={mode:"xyz65",x:.5766690429101305*Ae+.1855582379065463*Le+.1882286462349947*We,y:.297344975250536*Ae+.6273635662554661*Le+.0752914584939979*We,z:.0270313613864123*Ae+.0706888525358272*Le+.9913375368376386*We};return ve.alpha!==void 0&&(Xe.alpha=ve.alpha),Xe},st=Tt,Ve=ve=>Math.pow(Math.abs(ve),256/563)*Math.sign(ve),Ye=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"a98",r:Ve(ve*2.0415879038107465-Ae*.5650069742788597-.3447313507783297*Le),g:Ve(ve*-.9692436362808798+Ae*1.8759675015077206+.0415550574071756*Le),b:Ve(ve*.0134442806320312-Ae*.1183623922310184+1.0151749943912058*Le)};return We!==void 0&&(Xe.alpha=We),Xe},me=Ye,be=(ve=0)=>{let Ae=Math.abs(ve);return Ae<=.04045?ve/12.92:(Math.sign(ve)||1)*Math.pow((Ae+.055)/1.055,2.4)},Ee=({r:ve,g:Ae,b:Le,alpha:We})=>{let Xe={mode:"lrgb",r:be(ve),g:be(Ae),b:be(Le)};return We!==void 0&&(Xe.alpha=We),Xe},De=Ee,Ce=ve=>{let{r:Ae,g:Le,b:We,alpha:Xe}=De(ve),rt={mode:"xyz65",x:.4123907992659593*Ae+.357584339383878*Le+.1804807884018343*We,y:.2126390058715102*Ae+.715168678767756*Le+.0721923153607337*We,z:.0193308187155918*Ae+.119194779794626*Le+.9505321522496607*We};return Xe!==void 0&&(rt.alpha=Xe),rt},Fe=Ce,Je=(ve=0)=>{let Ae=Math.abs(ve);return Ae>.0031308?(Math.sign(ve)||1)*(1.055*Math.pow(Ae,1/2.4)-.055):ve*12.92},qe=({r:ve,g:Ae,b:Le,alpha:We},Xe="rgb")=>{let rt={mode:Xe,r:Je(ve),g:Je(Ae),b:Je(Le)};return We!==void 0&&(rt.alpha=We),rt},at=qe,tt=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=at({r:ve*3.2409699419045226-Ae*1.537383177570094-.4986107602930034*Le,g:ve*-.9692436362808796+Ae*1.8759675015077204+.0415550574071756*Le,b:ve*.0556300796969936-Ae*.2039769588889765+1.0569715142428784*Le});return We!==void 0&&(Xe.alpha=We),Xe},ct=tt,At=Ci(ja({},Pt),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:ve=>me(Fe(ve)),xyz65:me},toMode:{rgb:ve=>ct(st(ve)),xyz65:st}}),ft=At,qt=ve=>(ve=ve%360)<0?ve+360:ve,ar=qt,vt=(ve,Ae)=>ve.map((Le,We,Xe)=>{if(Le===void 0)return Le;let rt=ar(Le);return We===0||ve[We-1]===void 0?rt:Ae(rt-ar(Xe[We-1]))}).reduce((Le,We)=>!Le.length||We===void 0||Le[Le.length-1]===void 0?(Le.push(We),Le):(Le.push(We+Le[Le.length-1]),Le),[]),gt=ve=>vt(ve,Ae=>Math.abs(Ae)<=180?Ae:Ae-360*Math.sign(Ae)),St=ve=>vt(ve,Ae=>Math.abs(Ae)>=180||Ae===0?Ae:Ae-360*Math.sign(Ae)),Dt=ve=>vt(ve,Ae=>Ae>=0?Ae:Ae+360),kt=ve=>vt(ve,Ae=>Ae<=0?Ae:Ae-360),Vt=[-.14861,1.78277,-.29227,-.90649,1.97294,0],lr=Math.PI/180,dr=180/Math.PI,yr=Vt[3]*Vt[4],vr=Vt[1]*Vt[4],Fr=Vt[1]*Vt[2]-Vt[0]*Vt[3],la=({r:ve,g:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=(Fr*Le+ve*yr-Ae*vr)/(Fr+yr-vr),rt=Le-Xe,Ct=(Vt[4]*(Ae-Xe)-Vt[2]*rt)/Vt[3],Jt={mode:"cubehelix",l:Xe,s:Xe===0||Xe===1?void 0:Math.sqrt(rt*rt+Ct*Ct)/(Vt[4]*Xe*(1-Xe))};return Jt.s&&(Jt.h=Math.atan2(Ct,rt)*dr-120),We!==void 0&&(Jt.alpha=We),Jt},Hr=la,jr=({h:ve,s:Ae,l:Le,alpha:We})=>{let Xe={mode:"rgb"};ve=(ve===void 0?0:ve+120)*lr,Le===void 0&&(Le=0);let rt=Ae===void 0?0:Ae*Le*(1-Le),Ct=Math.cos(ve),Jt=Math.sin(ve);return Xe.r=Le+rt*(Vt[0]*Ct+Vt[1]*Jt),Xe.g=Le+rt*(Vt[2]*Ct+Vt[3]*Jt),Xe.b=Le+rt*(Vt[4]*Ct+Vt[5]*Jt),We!==void 0&&(Xe.alpha=We),Xe},Oa=jr,Da=(ve,Ae)=>{if(ve.h===void 0||Ae.h===void 0||!ve.s||!Ae.s)return 0;let Le=ar(ve.h),We=ar(Ae.h),Xe=Math.sin((We-Le+360)/2*Math.PI/180);return 2*Math.sqrt(ve.s*Ae.s)*Xe},_i=(ve,Ae)=>{if(ve.h===void 0||Ae.h===void 0)return 0;let Le=ar(ve.h),We=ar(Ae.h);return Math.abs(We-Le)>180?Le-(We-360*Math.sign(We-Le)):We-Le},ti=(ve,Ae)=>{if(ve.h===void 0||Ae.h===void 0||!ve.c||!Ae.c)return 0;let Le=ar(ve.h),We=ar(Ae.h),Xe=Math.sin((We-Le+360)/2*Math.PI/180);return 2*Math.sqrt(ve.c*Ae.c)*Xe},Ka=(ve="rgb",Ae=[1,1,1,0])=>{let Le=J(ve),We=Le.channels,Xe=Le.difference,rt=L(ve);return(Ct,Jt)=>{let br=rt(Ct),ea=rt(Jt);return Math.sqrt(We.reduce((Vr,Ur,ba)=>{let ca=Xe[Ur]?Xe[Ur](br,ea):br[Ur]-ea[Ur];return Vr+(Ae[ba]||0)*Math.pow(isNaN(ca)?0:ca,2)},0))}},ia=()=>Ka("lab65"),na=(ve=1,Ae=.045,Le=.015)=>{let We=L("lab65");return(Xe,rt)=>{let Ct=We(Xe),Jt=We(rt),br=Ct.l,ea=Ct.a,Vr=Ct.b,Ur=Math.sqrt(ea*ea+Vr*Vr),ba=Jt.l,ca=Jt.a,_a=Jt.b,Ea=Math.sqrt(ca*ca+_a*_a),Ia=Math.pow(br-ba,2),Za=Math.pow(Ur-Ea,2),Mi=Math.pow(ea-ca,2)+Math.pow(Vr-_a,2)-Za;return Math.sqrt(Ia/Math.pow(ve,2)+Za/Math.pow(1+Ae*Ur,2)+Mi/Math.pow(1+Le*Ur,2))}},xi=(ve=1,Ae=1,Le=1)=>{let We=L("lab65");return(Xe,rt)=>{let Ct=We(Xe),Jt=We(rt),br=Ct.l,ea=Ct.a,Vr=Ct.b,Ur=Math.sqrt(ea*ea+Vr*Vr),ba=Jt.l,ca=Jt.a,_a=Jt.b,Ea=Math.sqrt(ca*ca+_a*_a),Ia=(Ur+Ea)/2,Za=.5*(1-Math.sqrt(Math.pow(Ia,7)/(Math.pow(Ia,7)+Math.pow(25,7)))),Mi=ea*(1+Za),lo=ca*(1+Za),ps=Math.sqrt(Mi*Mi+Vr*Vr),Qs=Math.sqrt(lo*lo+_a*_a),bl=Math.abs(Mi)+Math.abs(Vr)===0?0:Math.atan2(Vr,Mi);bl+=(bl<0)*2*Math.PI;let Fl=Math.abs(lo)+Math.abs(_a)===0?0:Math.atan2(_a,lo);Fl+=(Fl<0)*2*Math.PI;let bu=ba-br,ah=Qs-ps,dd=ps*Qs===0?0:Fl-bl;dd-=(dd>Math.PI)*2*Math.PI,dd+=(dd<-Math.PI)*2*Math.PI;let Dp=2*Math.sqrt(ps*Qs)*Math.sin(dd/2),gm=(br+ba)/2,ym=(ps+Qs)/2,ih;ps*Qs===0?ih=bl+Fl:(ih=(bl+Fl)/2,ih-=(Math.abs(bl-Fl)>Math.PI)*Math.PI,ih+=(ih<0)*2*Math.PI);let v4=Math.pow(gm-50,2),m4=1-.17*Math.cos(ih-Math.PI/6)+.24*Math.cos(2*ih)+.32*Math.cos(3*ih+Math.PI/30)-.2*Math.cos(4*ih-63*Math.PI/180),fx=1+.015*v4/Math.sqrt(20+v4),hx=1+.045*ym,ng=1+.015*ym*m4,q7=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*ih-275)/25,2)),g4=2*Math.sqrt(Math.pow(ym,7)/(Math.pow(ym,7)+Math.pow(25,7))),dx=-1*Math.sin(2*q7)*g4;return Math.sqrt(Math.pow(bu/(ve*fx),2)+Math.pow(ah/(Ae*hx),2)+Math.pow(Dp/(Le*ng),2)+dx*ah/(Ae*hx)*Dp/(Le*ng))}},Yi=(ve=1,Ae=1)=>{let Le=L("lab65");return(We,Xe)=>{let rt=Le(We),Ct=rt.l,Jt=rt.a,br=rt.b,ea=Math.sqrt(Jt*Jt+br*br),Vr=Math.atan2(br,Jt);Vr=Vr+2*Math.PI*(Vr<0);let Ur=Le(Xe),ba=Ur.l,ca=Ur.a,_a=Ur.b,Ea=Math.sqrt(ca*ca+_a*_a),Ia=Math.pow(Ct-ba,2),Za=Math.pow(ea-Ea,2),Mi=Math.pow(Jt-ca,2)+Math.pow(br-_a,2)-Za,lo=Math.sqrt(Math.pow(ea,4)/(Math.pow(ea,4)+1900)),ps=Vr>=164/180*Math.PI&&Vr<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(Vr+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(Vr+35/180*Math.PI)),Qs=Ct<16?.511:.040975*Ct/(1+.01765*Ct),bl=.0638*ea/(1+.0131*ea)+.638,Fl=bl*(lo*ps+1-lo);return Math.sqrt(Ia/Math.pow(ve*Qs,2)+Za/Math.pow(Ae*bl,2)+Mi/Math.pow(Fl,2))}},Qr=()=>{let ve=L("lab65");return(Ae,Le)=>{let We=ve(Ae),Xe=ve(Le),rt=We.l-Xe.l,Ct=We.a-Xe.a,Jt=We.b-Xe.b;return Math.abs(rt)+Math.sqrt(Ct*Ct+Jt*Jt)}},Nr=()=>Ka("yiq",[.5053,.299,.1957]),Oe=()=>Ka("itp",[518400,129600,518400]),Ie=ve=>{let Ae=ve.reduce((We,Xe)=>{if(Xe!==void 0){let rt=Xe*Math.PI/180;We.sin+=Math.sin(rt),We.cos+=Math.cos(rt)}return We},{sin:0,cos:0}),Le=Math.atan2(Ae.sin,Ae.cos)*180/Math.PI;return Le<0?360+Le:Le},Et=ve=>{let Ae=ve.filter(Le=>Le!==void 0);return Ae.length?Ae.reduce((Le,We)=>Le+We,0)/Ae.length:void 0},Mt=ve=>typeof ve=="function";function zt(ve,Ae="rgb",Le){let We=J(Ae),Xe=ve.map(L(Ae));return We.channels.reduce((rt,Ct)=>{let Jt=Xe.map(br=>br[Ct]).filter(br=>br!==void 0);if(Jt.length){let br;Mt(Le)?br=Le:Le&&Mt(Le[Ct])?br=Le[Ct]:We.average&&Mt(We.average[Ct])?br=We.average[Ct]:br=Et,rt[Ct]=br(Jt,Ct)}return rt},{mode:Ae})}var Gt={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Hr},toMode:{rgb:Oa},interpolate:{h:{use:Ke,fixup:gt},s:Ke,l:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:Da},average:{h:Ie}},Ht=Gt,Be=({l:ve,a:Ae,b:Le,alpha:We},Xe="lch")=>{Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let rt=Math.sqrt(Ae*Ae+Le*Le),Ct={mode:Xe,l:ve,c:rt};return rt&&(Ct.h=ar(Math.atan2(Le,Ae)*180/Math.PI)),We!==void 0&&(Ct.alpha=We),Ct},et=Be,ut=({l:ve,c:Ae,h:Le,alpha:We},Xe="lab")=>{Le===void 0&&(Le=0);let rt={mode:Xe,l:ve,a:Ae?Ae*Math.cos(Le/180*Math.PI):0,b:Ae?Ae*Math.sin(Le/180*Math.PI):0};return We!==void 0&&(rt.alpha=We),rt},bt=ut,Ot=Math.pow(29,3)/Math.pow(3,3),It=Math.pow(6,3)/Math.pow(29,3),Wt={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},jt={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},sr=Math.pow(29,3)/Math.pow(3,3),kr=Math.pow(6,3)/Math.pow(29,3),Mr=ve=>Math.pow(ve,3)>It?Math.pow(ve,3):(116*ve-16)/Ot,ua=({l:ve,a:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=(ve+16)/116,rt=Ae/500+Xe,Ct=Xe-Le/200,Jt={mode:"xyz65",x:Mr(rt)*jt.X,y:Mr(Xe)*jt.Y,z:Mr(Ct)*jt.Z};return We!==void 0&&(Jt.alpha=We),Jt},ra=ua,ni=ve=>ct(ra(ve)),Ca=ni,Li=ve=>ve>It?Math.cbrt(ve):(Ot*ve+16)/116,Va=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Li(ve/jt.X),rt=Li(Ae/jt.Y),Ct=Li(Le/jt.Z),Jt={mode:"lab65",l:116*rt-16,a:500*(Xe-rt),b:200*(rt-Ct)};return We!==void 0&&(Jt.alpha=We),Jt},dn=Va,rn=ve=>{let Ae=dn(Fe(ve));return ve.r===ve.b&&ve.b===ve.g&&(Ae.a=Ae.b=0),Ae},pa=rn,_n=1,Zi=1,Fi=26/180*Math.PI,xn=Math.cos(Fi),Ni=Math.sin(Fi),un=100/Math.log(139/100),jn=({l:ve,c:Ae,h:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"lab65",l:(Math.exp(ve*_n/un)-1)/.0039},rt=(Math.exp(.0435*Ae*Zi*_n)-1)/.075,Ct=rt*Math.cos(Le/180*Math.PI-Fi),Jt=rt*Math.sin(Le/180*Math.PI-Fi);return Xe.a=Ct*xn-Jt/.83*Ni,Xe.b=Ct*Ni+Jt/.83*xn,We!==void 0&&(Xe.alpha=We),Xe},bn=jn,Wa=({l:ve,a:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Ae*xn+Le*Ni,rt=.83*(Le*xn-Ae*Ni),Ct=Math.sqrt(Xe*Xe+rt*rt),Jt={mode:"dlch",l:un/_n*Math.log(1+.0039*ve),c:Math.log(1+.075*Ct)/(.0435*Zi*_n)};return Jt.c&&(Jt.h=ar((Math.atan2(rt,Xe)+Fi)/Math.PI*180)),We!==void 0&&(Jt.alpha=We),Jt},ui=Wa,Hi=ve=>bn(et(ve,"dlch")),Vi=ve=>bt(ui(ve),"dlab"),$n={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Hi,rgb:ve=>Ca(Hi(ve))},fromMode:{lab65:Vi,rgb:ve=>Vi(pa(ve))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ke,a:Ke,b:Ke,alpha:{use:Ke,fixup:dt}}},ro=$n,Un={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:bn,dlab:ve=>bt(ve,"dlab"),rgb:ve=>Ca(bn(ve))},fromMode:{lab65:ui,dlab:ve=>et(ve,"dlch"),rgb:ve=>ui(pa(ve))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ke,c:Ke,h:{use:Ke,fixup:gt},alpha:{use:Ke,fixup:dt}},difference:{h:ti},average:{h:Ie}},Kn=Un;function To({h:ve,s:Ae,i:Le,alpha:We}){ve=ar(ve!==void 0?ve:0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.abs(ve/60%2-1),rt;switch(Math.floor(ve/60)){case 0:rt={r:Le*(1+Ae*(3/(2-Xe)-1)),g:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1)),b:Le*(1-Ae)};break;case 1:rt={r:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1)),g:Le*(1+Ae*(3/(2-Xe)-1)),b:Le*(1-Ae)};break;case 2:rt={r:Le*(1-Ae),g:Le*(1+Ae*(3/(2-Xe)-1)),b:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1))};break;case 3:rt={r:Le*(1-Ae),g:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1)),b:Le*(1+Ae*(3/(2-Xe)-1))};break;case 4:rt={r:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1)),g:Le*(1-Ae),b:Le*(1+Ae*(3/(2-Xe)-1))};break;case 5:rt={r:Le*(1+Ae*(3/(2-Xe)-1)),g:Le*(1-Ae),b:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1))};break;default:rt={r:Le*(1-Ae),g:Le*(1-Ae),b:Le*(1-Ae)}}return rt.mode="rgb",We!==void 0&&(rt.alpha=We),rt}function Jn({r:ve,g:Ae,b:Le,alpha:We}){ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.max(ve,Ae,Le),rt=Math.min(ve,Ae,Le),Ct={mode:"hsi",s:ve+Ae+Le===0?0:1-3*rt/(ve+Ae+Le),i:(ve+Ae+Le)/3};return Xe-rt!==0&&(Ct.h=(Xe===ve?(Ae-Le)/(Xe-rt)+(Ae{switch(Ae){case"deg":return+ve;case"rad":return ve/Math.PI*180;case"grad":return ve/10*9;case"turn":return ve*360}},uo=os,Yn=new RegExp(`^hsla?\\(\\s*${k}${b}${E}${b}${E}\\s*(?:,\\s*${C}\\s*)?\\)$`),go=ve=>{let Ae=ve.match(Yn);if(!Ae)return;let Le={mode:"hsl"};return Ae[3]!==void 0?Le.h=+Ae[3]:Ae[1]!==void 0&&Ae[2]!==void 0&&(Le.h=uo(Ae[1],Ae[2])),Ae[4]!==void 0&&(Le.s=Math.min(Math.max(0,Ae[4]/100),1)),Ae[5]!==void 0&&(Le.l=Math.min(Math.max(0,Ae[5]/100),1)),Ae[6]!==void 0?Le.alpha=Math.max(0,Math.min(1,Ae[6]/100)):Ae[7]!==void 0&&(Le.alpha=Math.max(0,Math.min(1,+Ae[7]))),Le},Cn=go;function Xo(ve,Ae){if(!Ae||Ae[0]!=="hsl"&&Ae[0]!=="hsla")return;let Le={mode:"hsl"},[,We,Xe,rt,Ct]=Ae;if(We.type!==V.None){if(We.type===V.Percentage)return;Le.h=We.value}if(Xe.type!==V.None){if(Xe.type===V.Hue)return;Le.s=Xe.value/100}if(rt.type!==V.None){if(rt.type===V.Hue)return;Le.l=rt.value/100}return Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var gs=Xo,yo={mode:"hsl",toMode:{rgb:zn},fromMode:{rgb:wn},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[gs,Cn],serialize:ve=>`hsl(${ve.h!==void 0?ve.h:"none"} ${ve.s!==void 0?ve.s*100+"%":"none"} ${ve.l!==void 0?ve.l*100+"%":"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`,interpolate:{h:{use:Ke,fixup:gt},s:Ke,l:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:Da},average:{h:Ie}},sl=yo;function ss({h:ve,s:Ae,v:Le,alpha:We}){ve=ar(ve!==void 0?ve:0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.abs(ve/60%2-1),rt;switch(Math.floor(ve/60)){case 0:rt={r:Le,g:Le*(1-Ae*Xe),b:Le*(1-Ae)};break;case 1:rt={r:Le*(1-Ae*Xe),g:Le,b:Le*(1-Ae)};break;case 2:rt={r:Le*(1-Ae),g:Le,b:Le*(1-Ae*Xe)};break;case 3:rt={r:Le*(1-Ae),g:Le*(1-Ae*Xe),b:Le};break;case 4:rt={r:Le*(1-Ae*Xe),g:Le*(1-Ae),b:Le};break;case 5:rt={r:Le,g:Le*(1-Ae),b:Le*(1-Ae*Xe)};break;default:rt={r:Le*(1-Ae),g:Le*(1-Ae),b:Le*(1-Ae)}}return rt.mode="rgb",We!==void 0&&(rt.alpha=We),rt}function oo({r:ve,g:Ae,b:Le,alpha:We}){ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.max(ve,Ae,Le),rt=Math.min(ve,Ae,Le),Ct={mode:"hsv",s:Xe===0?0:1-rt/Xe,v:Xe};return Xe-rt!==0&&(Ct.h=(Xe===ve?(Ae-Le)/(Xe-rt)+(Ae1){let Xe=Ae+Le;Ae/=Xe,Le/=Xe}return ss({h:ve,s:Le===1?1:1-Ae/(1-Le),v:1-Le,alpha:We})}function Bl(ve){let Ae=oo(ve);if(Ae===void 0)return;let Le=Ae.s!==void 0?Ae.s:0,We=Ae.v!==void 0?Ae.v:0,Xe={mode:"hwb",w:(1-Le)*We,b:1-We};return Ae.h!==void 0&&(Xe.h=Ae.h),Ae.alpha!==void 0&&(Xe.alpha=Ae.alpha),Xe}function Lu(ve,Ae){if(!Ae||Ae[0]!=="hwb")return;let Le={mode:"hwb"},[,We,Xe,rt,Ct]=Ae;if(We.type!==V.None){if(We.type===V.Percentage)return;Le.h=We.value}if(Xe.type!==V.None){if(Xe.type===V.Hue)return;Le.w=Xe.value/100}if(rt.type!==V.None){if(rt.type===V.Hue)return;Le.b=rt.value/100}return Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var Jl=Lu,Fu={mode:"hwb",toMode:{rgb:Po},fromMode:{rgb:Bl},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Jl],serialize:ve=>`hwb(${ve.h!==void 0?ve.h:"none"} ${ve.w!==void 0?ve.w*100+"%":"none"} ${ve.b!==void 0?ve.b*100+"%":"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`,interpolate:{h:{use:Ke,fixup:gt},w:Ke,b:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:_i},average:{h:Ie}},Pu=Fu,Ku=203,mu=.1593017578125,$c=78.84375,Ju=.8359375,Ol=18.8515625,Yc=18.6875;function Qu(ve){if(ve<0)return 0;let Ae=Math.pow(ve,1/$c);return 1e4*Math.pow(Math.max(0,Ae-Ju)/(Ol-Yc*Ae),1/mu)}function Sl(ve){if(ve<0)return 0;let Ae=Math.pow(ve/1e4,mu);return Math.pow((Ju+Ol*Ae)/(1+Yc*Ae),$c)}var cs=ve=>Math.max(ve/Ku,0),Qo=({i:ve,t:Ae,p:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Qu(ve+.008609037037932761*Ae+.11102962500302593*Le),rt=Qu(ve-.00860903703793275*Ae-.11102962500302599*Le),Ct=Qu(ve+.5600313357106791*Ae-.32062717498731885*Le),Jt={mode:"xyz65",x:cs(2.070152218389422*Xe-1.3263473389671556*rt+.2066510476294051*Ct),y:cs(.3647385209748074*Xe+.680566024947227*rt-.0453045459220346*Ct),z:cs(-.049747207535812*Xe-.0492609666966138*rt+1.1880659249923042*Ct)};return We!==void 0&&(Jt.alpha=We),Jt},ml=Qo,Xc=(ve=0)=>Math.max(ve*Ku,0),Zc=({x:ve,y:Ae,z:Le,alpha:We})=>{let Xe=Xc(ve),rt=Xc(Ae),Ct=Xc(Le),Jt=Sl(.3592832590121217*Xe+.6976051147779502*rt-.0358915932320289*Ct),br=Sl(-.1920808463704995*Xe+1.1004767970374323*rt+.0753748658519118*Ct),ea=Sl(.0070797844607477*Xe+.0748396662186366*rt+.8433265453898765*Ct),Vr=.5*Jt+.5*br,Ur=1.61376953125*Jt-3.323486328125*br+1.709716796875*ea,ba=4.378173828125*Jt-4.24560546875*br-.132568359375*ea,ca={mode:"itp",i:Vr,t:Ur,p:ba};return We!==void 0&&(ca.alpha=We),ca},kc=Zc,ed={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ml,rgb:ve=>ct(ml(ve))},fromMode:{xyz65:kc,rgb:ve=>kc(Fe(ve))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ke,t:Ke,p:Ke,alpha:{use:Ke,fixup:dt}}},td=ed,bp=134.03437499999998,t0=16295499532821565e-27,ec=ve=>{if(ve<0)return 0;let Ae=Math.pow(ve/1e4,mu);return Math.pow((Ju+Ol*Ae)/(1+Yc*Ae),bp)},ys=(ve=0)=>Math.max(ve*203,0),rd=({x:ve,y:Ae,z:Le,alpha:We})=>{ve=ys(ve),Ae=ys(Ae),Le=ys(Le);let Xe=1.15*ve-.15*Le,rt=.66*Ae+.34*ve,Ct=ec(.41478972*Xe+.579999*rt+.014648*Le),Jt=ec(-.20151*Xe+1.120649*rt+.0531008*Le),br=ec(-.0166008*Xe+.2648*rt+.6684799*Le),ea=(Ct+Jt)/2,Vr={mode:"jab",j:.44*ea/(1-.56*ea)-t0,a:3.524*Ct-4.066708*Jt+.542708*br,b:.199076*Ct+1.096799*Jt-1.295875*br};return We!==void 0&&(Vr.alpha=We),Vr},Hf=rd,Kc=134.03437499999998,ad=16295499532821565e-27,Jc=ve=>{if(ve<0)return 0;let Ae=Math.pow(ve,1/Kc);return 1e4*Math.pow((Ju-Ae)/(Yc*Ae-Ol),1/mu)},Tf=ve=>ve/203,tc=({j:ve,a:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=(ve+ad)/(.44+.56*(ve+ad)),rt=Jc(Xe+.13860504*Ae+.058047316*Le),Ct=Jc(Xe-.13860504*Ae-.058047316*Le),Jt=Jc(Xe-.096019242*Ae-.8118919*Le),br={mode:"xyz65",x:Tf(1.661373024652174*rt-.914523081304348*Ct+.23136208173913045*Jt),y:Tf(-.3250758611844533*rt+1.571847026732543*Ct-.21825383453227928*Jt),z:Tf(-.090982811*rt-.31272829*Ct+1.5227666*Jt)};return We!==void 0&&(br.alpha=We),br},Wf=tc,xh=ve=>{let Ae=Hf(Fe(ve));return ve.r===ve.b&&ve.b===ve.g&&(Ae.a=Ae.b=0),Ae},Qc=xh,Wd=ve=>ct(Wf(ve)),bh=Wd,wp={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Qc,xyz65:Hf},toMode:{rgb:bh,xyz65:Wf},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ke,a:Ke,b:Ke,alpha:{use:Ke,fixup:dt}}},rc=wp,id=({j:ve,a:Ae,b:Le,alpha:We})=>{Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.sqrt(Ae*Ae+Le*Le),rt={mode:"jch",j:ve,c:Xe};return Xe&&(rt.h=ar(Math.atan2(Le,Ae)*180/Math.PI)),We!==void 0&&(rt.alpha=We),rt},Iu=id,wh=({j:ve,c:Ae,h:Le,alpha:We})=>{Le===void 0&&(Le=0);let Xe={mode:"jab",j:ve,a:Ae?Ae*Math.cos(Le/180*Math.PI):0,b:Ae?Ae*Math.sin(Le/180*Math.PI):0};return We!==void 0&&(Xe.alpha=We),Xe},Nl=wh,$f={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Nl,rgb:ve=>bh(Nl(ve))},fromMode:{rgb:ve=>Iu(Qc(ve)),jab:Iu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ke,fixup:gt},c:Ke,j:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:ti},average:{h:Ie}},ac=$f,Yf=Math.pow(29,3)/Math.pow(3,3),Xf=Math.pow(6,3)/Math.pow(29,3),Ah=ve=>Math.pow(ve,3)>Xf?Math.pow(ve,3):(116*ve-16)/Yf,nd=({l:ve,a:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=(ve+16)/116,rt=Ae/500+Xe,Ct=Xe-Le/200,Jt={mode:"xyz50",x:Ah(rt)*Wt.X,y:Ah(Xe)*Wt.Y,z:Ah(Ct)*Wt.Z};return We!==void 0&&(Jt.alpha=We),Jt},ef=nd,od=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=at({r:ve*3.1341359569958707-Ae*1.6173863321612538-.4906619460083532*Le,g:ve*-.978795502912089+Ae*1.916254567259524+.03344273116131949*Le,b:ve*.07195537988411677-Ae*.2289768264158322+1.405386058324125*Le});return We!==void 0&&(Xe.alpha=We),Xe},Cc=od,Ap=ve=>Cc(ef(ve)),kl=Ap,Ru=ve=>{let{r:Ae,g:Le,b:We,alpha:Xe}=De(ve),rt={mode:"xyz50",x:.436065742824811*Ae+.3851514688337912*Le+.14307845442264197*We,y:.22249319175623702*Ae+.7168870538238823*Le+.06061979053616537*We,z:.013923904500943465*Ae+.09708128566574634*Le+.7140993584005155*We};return Xe!==void 0&&(rt.alpha=Xe),rt},tf=Ru,yl=ve=>ve>Xf?Math.cbrt(ve):(Yf*ve+16)/116,Th=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=yl(ve/Wt.X),rt=yl(Ae/Wt.Y),Ct=yl(Le/Wt.Z),Jt={mode:"lab",l:116*rt-16,a:500*(Xe-rt),b:200*(rt-Ct)};return We!==void 0&&(Jt.alpha=We),Jt},ic=Th,rf=ve=>{let Ae=ic(tf(ve));return ve.r===ve.b&&ve.b===ve.g&&(Ae.a=Ae.b=0),Ae},Mh=rf;function Tp(ve,Ae){if(!Ae||Ae[0]!=="lab")return;let Le={mode:"lab"},[,We,Xe,rt,Ct]=Ae;if(!(We.type===V.Hue||Xe.type===V.Hue||rt.type===V.Hue))return We.type!==V.None&&(Le.l=Math.min(Math.max(0,We.value),100)),Xe.type!==V.None&&(Le.a=Xe.type===V.Number?Xe.value:Xe.value*125/100),rt.type!==V.None&&(Le.b=rt.type===V.Number?rt.value:rt.value*125/100),Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var $d=Tp,nc={mode:"lab",toMode:{xyz50:ef,rgb:kl},fromMode:{xyz50:ic,rgb:Mh},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[$d],serialize:ve=>`lab(${ve.l!==void 0?ve.l:"none"} ${ve.a!==void 0?ve.a:"none"} ${ve.b!==void 0?ve.b:"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`,interpolate:{l:Ke,a:Ke,b:Ke,alpha:{use:Ke,fixup:dt}}},Ql=nc,eu=Ci(ja({},Ql),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ra,rgb:Ca},fromMode:{xyz65:dn,rgb:pa},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),Mp=eu;function Zf(ve,Ae){if(!Ae||Ae[0]!=="lch")return;let Le={mode:"lch"},[,We,Xe,rt,Ct]=Ae;if(We.type!==V.None){if(We.type===V.Hue)return;Le.l=Math.min(Math.max(0,We.value),100)}if(Xe.type!==V.None&&(Le.c=Math.max(0,Xe.type===V.Number?Xe.value:Xe.value*150/100)),rt.type!==V.None){if(rt.type===V.Percentage)return;Le.h=rt.value}return Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var Yd=Zf,gu={mode:"lch",toMode:{lab:bt,rgb:ve=>kl(bt(ve))},fromMode:{rgb:ve=>et(Mh(ve)),lab:et},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Yd],serialize:ve=>`lch(${ve.l!==void 0?ve.l:"none"} ${ve.c!==void 0?ve.c:"none"} ${ve.h!==void 0?ve.h:"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`,interpolate:{h:{use:Ke,fixup:gt},c:Ke,l:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:ti},average:{h:Ie}},Mf=gu,Eh=Ci(ja({},Mf),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:ve=>bt(ve,"lab65"),rgb:ve=>Ca(bt(ve,"lab65"))},fromMode:{rgb:ve=>et(pa(ve),"lch65"),lab65:ve=>et(ve,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Kf=Eh,Ep=({l:ve,u:Ae,v:Le,alpha:We})=>{Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.sqrt(Ae*Ae+Le*Le),rt={mode:"lchuv",l:ve,c:Xe};return Xe&&(rt.h=ar(Math.atan2(Le,Ae)*180/Math.PI)),We!==void 0&&(rt.alpha=We),rt},Ef=Ep,af=({l:ve,c:Ae,h:Le,alpha:We})=>{Le===void 0&&(Le=0);let Xe={mode:"luv",l:ve,u:Ae?Ae*Math.cos(Le/180*Math.PI):0,v:Ae?Ae*Math.sin(Le/180*Math.PI):0};return We!==void 0&&(Xe.alpha=We),Xe},nf=af,Jf=(ve,Ae,Le)=>4*ve/(ve+15*Ae+3*Le),Xd=(ve,Ae,Le)=>9*Ae/(ve+15*Ae+3*Le),Sh=Jf(Wt.X,Wt.Y,Wt.Z),Sf=Xd(Wt.X,Wt.Y,Wt.Z),kh=ve=>ve<=Xf?Yf*ve:116*Math.cbrt(ve)-16,kf=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=kh(Ae/Wt.Y),rt=Jf(ve,Ae,Le),Ct=Xd(ve,Ae,Le);!isFinite(rt)||!isFinite(Ct)?Xe=rt=Ct=0:(rt=13*Xe*(rt-Sh),Ct=13*Xe*(Ct-Sf));let Jt={mode:"luv",l:Xe,u:rt,v:Ct};return We!==void 0&&(Jt.alpha=We),Jt},Dc=kf,Qf=(ve,Ae,Le)=>4*ve/(ve+15*Ae+3*Le),Ch=(ve,Ae,Le)=>9*Ae/(ve+15*Ae+3*Le),Zd=Qf(Wt.X,Wt.Y,Wt.Z),sd=Ch(Wt.X,Wt.Y,Wt.Z),Sp=({l:ve,u:Ae,v:Le,alpha:We})=>{if(ve===void 0&&(ve=0),ve===0)return{mode:"xyz50",x:0,y:0,z:0};Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Ae/(13*ve)+Zd,rt=Le/(13*ve)+sd,Ct=Wt.Y*(ve<=8?ve/Yf:Math.pow((ve+16)/116,3)),Jt=Ct*(9*Xe)/(4*rt),br=Ct*(12-3*Xe-20*rt)/(4*rt),ea={mode:"xyz50",x:Jt,y:Ct,z:br};return We!==void 0&&(ea.alpha=We),ea},Dh=Sp,Kd=ve=>Ef(Dc(tf(ve))),ld=ve=>Cc(Dh(nf(ve))),Ks={mode:"lchuv",toMode:{luv:nf,rgb:ld},fromMode:{rgb:Kd,luv:Ef},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Ke,fixup:gt},c:Ke,l:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:ti},average:{h:Ie}},yu=Ks,Lh=Ci(ja({},Pt),{mode:"lrgb",toMode:{rgb:at},fromMode:{rgb:De},parse:["srgb-linear"],serialize:"srgb-linear"}),ud=Lh,Fh={mode:"luv",toMode:{xyz50:Dh,rgb:ve=>Cc(Dh(ve))},fromMode:{xyz50:Dc,rgb:ve=>Dc(tf(ve))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:Ke,u:Ke,v:Ke,alpha:{use:Ke,fixup:dt}}},eh=Fh,it=({r:ve,g:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.cbrt(.412221469470763*ve+.5363325372617348*Ae+.0514459932675022*Le),rt=Math.cbrt(.2119034958178252*ve+.6806995506452344*Ae+.1073969535369406*Le),Ct=Math.cbrt(.0883024591900564*ve+.2817188391361215*Ae+.6299787016738222*Le),Jt={mode:"oklab",l:.210454268309314*Xe+.7936177747023054*rt-.0040720430116193*Ct,a:1.9779985324311684*Xe-2.42859224204858*rt+.450593709617411*Ct,b:.0259040424655478*Xe+.7827717124575296*rt-.8086757549230774*Ct};return We!==void 0&&(Jt.alpha=We),Jt},wt=it,$t=ve=>{let Ae=wt(De(ve));return ve.r===ve.b&&ve.b===ve.g&&(Ae.a=Ae.b=0),Ae},Bt=$t,cr=({l:ve,a:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.pow(ve+.3963377773761749*Ae+.2158037573099136*Le,3),rt=Math.pow(ve-.1055613458156586*Ae-.0638541728258133*Le,3),Ct=Math.pow(ve-.0894841775298119*Ae-1.2914855480194092*Le,3),Jt={mode:"lrgb",r:4.076741636075957*Xe-3.3077115392580616*rt+.2309699031821044*Ct,g:-1.2684379732850317*Xe+2.6097573492876887*rt-.3413193760026573*Ct,b:-.0041960761386756*Xe-.7034186179359362*rt+1.7076146940746117*Ct};return We!==void 0&&(Jt.alpha=We),Jt},Sr=cr,Pr=ve=>at(Sr(ve)),qr=Pr;function $r(ve){let We=1.170873786407767;return .5*(We*ve-.206+Math.sqrt((We*ve-.206)*(We*ve-.206)+4*.03*We*ve))}function va(ve){return(ve*ve+.206*ve)/(1.170873786407767*(ve+.03))}function Rr(ve,Ae){let Le,We,Xe,rt,Ct,Jt,br,ea;-1.88170328*ve-.80936493*Ae>1?(Le=1.19086277,We=1.76576728,Xe=.59662641,rt=.75515197,Ct=.56771245,Jt=4.0767416621,br=-3.3077115913,ea=.2309699292):1.81444104*ve-1.19445276*Ae>1?(Le=.73956515,We=-.45954404,Xe=.08285427,rt=.1254107,Ct=.14503204,Jt=-1.2684380046,br=2.6097574011,ea=-.3413193965):(Le=1.35733652,We=-.00915799,Xe=-1.1513021,rt=-.50559606,Ct=.00692167,Jt=-.0041960863,br=-.7034186147,ea=1.707614701);let Vr=Le+We*ve+Xe*Ae+rt*ve*ve+Ct*ve*Ae,Ur=.3963377774*ve+.2158037573*Ae,ba=-.1055613458*ve-.0638541728*Ae,ca=-.0894841775*ve-1.291485548*Ae;{let _a=1+Vr*Ur,Ea=1+Vr*ba,Ia=1+Vr*ca,Za=_a*_a*_a,Mi=Ea*Ea*Ea,lo=Ia*Ia*Ia,ps=3*Ur*_a*_a,Qs=3*ba*Ea*Ea,bl=3*ca*Ia*Ia,Fl=6*Ur*Ur*_a,bu=6*ba*ba*Ea,ah=6*ca*ca*Ia,dd=Jt*Za+br*Mi+ea*lo,Dp=Jt*ps+br*Qs+ea*bl,gm=Jt*Fl+br*bu+ea*ah;Vr=Vr-dd*Dp/(Dp*Dp-.5*dd*gm)}return Vr}function Gr(ve,Ae){let Le=Rr(ve,Ae),We=Sr({l:1,a:Le*ve,b:Le*Ae}),Xe=Math.cbrt(1/Math.max(We.r,We.g,We.b)),rt=Xe*Le;return[Xe,rt]}function Yr(ve,Ae,Le,We,Xe,rt=null){rt||(rt=Gr(ve,Ae));let Ct;if((Le-Xe)*rt[1]-(rt[0]-Xe)*We<=0)Ct=rt[1]*Xe/(We*rt[0]+rt[1]*(Xe-Le));else{Ct=rt[1]*(Xe-1)/(We*(rt[0]-1)+rt[1]*(Xe-Le));{let Jt=Le-Xe,br=We,ea=.3963377774*ve+.2158037573*Ae,Vr=-.1055613458*ve-.0638541728*Ae,Ur=-.0894841775*ve-1.291485548*Ae,ba=Jt+br*ea,ca=Jt+br*Vr,_a=Jt+br*Ur;{let Ea=Xe*(1-Ct)+Ct*Le,Ia=Ct*We,Za=Ea+Ia*ea,Mi=Ea+Ia*Vr,lo=Ea+Ia*Ur,ps=Za*Za*Za,Qs=Mi*Mi*Mi,bl=lo*lo*lo,Fl=3*ba*Za*Za,bu=3*ca*Mi*Mi,ah=3*_a*lo*lo,dd=6*ba*ba*Za,Dp=6*ca*ca*Mi,gm=6*_a*_a*lo,ym=4.0767416621*ps-3.3077115913*Qs+.2309699292*bl-1,ih=4.0767416621*Fl-3.3077115913*bu+.2309699292*ah,v4=4.0767416621*dd-3.3077115913*Dp+.2309699292*gm,m4=ih/(ih*ih-.5*ym*v4),fx=-ym*m4,hx=-1.2684380046*ps+2.6097574011*Qs-.3413193965*bl-1,ng=-1.2684380046*Fl+2.6097574011*bu-.3413193965*ah,q7=-1.2684380046*dd+2.6097574011*Dp-.3413193965*gm,g4=ng/(ng*ng-.5*hx*q7),dx=-hx*g4,BG=-.0041960863*ps-.7034186147*Qs+1.707614701*bl-1,V7=-.0041960863*Fl-.7034186147*bu+1.707614701*ah,nbe=-.0041960863*dd-.7034186147*Dp+1.707614701*gm,OG=V7/(V7*V7-.5*BG*nbe),G7=-BG*OG;fx=m4>=0?fx:1e6,dx=g4>=0?dx:1e6,G7=OG>=0?G7:1e6,Ct+=Math.min(fx,Math.min(dx,G7))}}}return Ct}function da(ve,Ae,Le=null){Le||(Le=Gr(ve,Ae));let We=Le[0],Xe=Le[1];return[Xe/We,Xe/(1-We)]}function La(ve,Ae,Le){let We=Gr(Ae,Le),Xe=Yr(Ae,Le,ve,1,ve,We),rt=da(Ae,Le,We),Ct=.11516993+1/(7.4477897+4.1590124*Le+Ae*(-2.19557347+1.75198401*Le+Ae*(-2.13704948-10.02301043*Le+Ae*(-4.24894561+5.38770819*Le+4.69891013*Ae)))),Jt=.11239642+1/(1.6132032-.68124379*Le+Ae*(.40370612+.90148123*Le+Ae*(-.27087943+.6122399*Le+Ae*(.00299215-.45399568*Le-.14661872*Ae)))),br=Xe/Math.min(ve*rt[0],(1-ve)*rt[1]),ea=ve*Ct,Vr=(1-ve)*Jt,Ur=.9*br*Math.sqrt(Math.sqrt(1/(1/(ea*ea*ea*ea)+1/(Vr*Vr*Vr*Vr))));return ea=ve*.4,Vr=(1-ve)*.8,[Math.sqrt(1/(1/(ea*ea)+1/(Vr*Vr))),Ur,Xe]}function gi(ve){let Ae=ve.l!==void 0?ve.l:0,Le=ve.a!==void 0?ve.a:0,We=ve.b!==void 0?ve.b:0,Xe={mode:"okhsl",l:$r(Ae)};ve.alpha!==void 0&&(Xe.alpha=ve.alpha);let rt=Math.sqrt(Le*Le+We*We);if(!rt)return Xe.s=0,Xe;let[Ct,Jt,br]=La(Ae,Le/rt,We/rt),ea;if(rtgi(Bt(ve))},toMode:{oklab:pi,rgb:ve=>qr(pi(ve))}}),ji=Pi;function Ra(ve){let Ae=ve.l!==void 0?ve.l:0,Le=ve.a!==void 0?ve.a:0,We=ve.b!==void 0?ve.b:0,Xe=Math.sqrt(Le*Le+We*We),rt=Xe?Le/Xe:1,Ct=Xe?We/Xe:1,[Jt,br]=da(rt,Ct),ea=.5,Vr=1-ea/Jt,Ur=br/(Xe+Ae*br),ba=Ur*Ae,ca=Ur*Xe,_a=va(ba),Ea=ca*_a/ba,Ia=Sr({l:_a,a:rt*Ea,b:Ct*Ea}),Za=Math.cbrt(1/Math.max(Ia.r,Ia.g,Ia.b,0));Ae=Ae/Za,Xe=Xe/Za*$r(Ae)/Ae,Ae=$r(Ae);let Mi={mode:"okhsv",s:Xe?(ea+br)*ca/(br*ea+br*Vr*ca):0,v:Ae?Ae/ba:0};return Mi.s&&(Mi.h=ar(Math.atan2(We,Le)*180/Math.PI)),ve.alpha!==void 0&&(Mi.alpha=ve.alpha),Mi}function Ga(ve){let Ae={mode:"oklab"};ve.alpha!==void 0&&(Ae.alpha=ve.alpha);let Le=ve.h!==void 0?ve.h:0,We=ve.s!==void 0?ve.s:0,Xe=ve.v!==void 0?ve.v:0,rt=Math.cos(Le/180*Math.PI),Ct=Math.sin(Le/180*Math.PI),[Jt,br]=da(rt,Ct),ea=.5,Vr=1-ea/Jt,Ur=1-We*ea/(ea+br-br*Vr*We),ba=We*br*ea/(ea+br-br*Vr*We),ca=va(Ur),_a=ba*ca/Ur,Ea=Sr({l:ca,a:rt*_a,b:Ct*_a}),Ia=Math.cbrt(1/Math.max(Ea.r,Ea.g,Ea.b,0)),Za=va(Xe*Ur),Mi=ba*Za/Ur;return Ae.l=Za*Ia,Ae.a=Mi*rt*Ia,Ae.b=Mi*Ct*Ia,Ae}var Ki=Ci(ja({},An),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Ra,rgb:ve=>Ra(Bt(ve))},toMode:{oklab:Ga,rgb:ve=>qr(Ga(ve))}}),pn=Ki;function ao(ve,Ae){if(!Ae||Ae[0]!=="oklab")return;let Le={mode:"oklab"},[,We,Xe,rt,Ct]=Ae;if(!(We.type===V.Hue||Xe.type===V.Hue||rt.type===V.Hue))return We.type!==V.None&&(Le.l=Math.min(Math.max(0,We.type===V.Number?We.value:We.value/100),1)),Xe.type!==V.None&&(Le.a=Xe.type===V.Number?Xe.value:Xe.value*.4/100),rt.type!==V.None&&(Le.b=rt.type===V.Number?rt.value:rt.value*.4/100),Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var Co=ao,ho=Ci(ja({},Ql),{mode:"oklab",toMode:{lrgb:Sr,rgb:qr},fromMode:{lrgb:wt,rgb:Bt},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Co],serialize:ve=>`oklab(${ve.l!==void 0?ve.l:"none"} ${ve.a!==void 0?ve.a:"none"} ${ve.b!==void 0?ve.b:"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`}),No=ho;function Wn(ve,Ae){if(!Ae||Ae[0]!=="oklch")return;let Le={mode:"oklch"},[,We,Xe,rt,Ct]=Ae;if(We.type!==V.None){if(We.type===V.Hue)return;Le.l=Math.min(Math.max(0,We.type===V.Number?We.value:We.value/100),1)}if(Xe.type!==V.None&&(Le.c=Math.max(0,Xe.type===V.Number?Xe.value:Xe.value*.4/100)),rt.type!==V.None){if(rt.type===V.Percentage)return;Le.h=rt.value}return Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var Os=Wn,fs=Ci(ja({},Mf),{mode:"oklch",toMode:{oklab:ve=>bt(ve,"oklab"),rgb:ve=>qr(bt(ve,"oklab"))},fromMode:{rgb:ve=>et(Bt(ve),"oklch"),oklab:ve=>et(ve,"oklch")},parse:[Os],serialize:ve=>`oklch(${ve.l!==void 0?ve.l:"none"} ${ve.c!==void 0?ve.c:"none"} ${ve.h!==void 0?ve.h:"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),zo=fs,Qa=ve=>{let{r:Ae,g:Le,b:We,alpha:Xe}=De(ve),rt={mode:"xyz65",x:.486570948648216*Ae+.265667693169093*Le+.1982172852343625*We,y:.2289745640697487*Ae+.6917385218365062*Le+.079286914093745*We,z:0*Ae+.0451133818589026*Le+1.043944368900976*We};return Xe!==void 0&&(rt.alpha=Xe),rt},io=Qa,Ms=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=at({r:ve*2.4934969119414263-Ae*.9313836179191242-.402710784450717*Le,g:ve*-.8294889695615749+Ae*1.7626640603183465+.0236246858419436*Le,b:ve*.0358458302437845-Ae*.0761723892680418+.9568845240076871*Le},"p3");return We!==void 0&&(Xe.alpha=We),Xe},Ns=Ms,jl=Ci(ja({},Pt),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:ve=>Ns(Fe(ve)),xyz65:Ns},toMode:{rgb:ve=>ct(io(ve)),xyz65:io}}),zu=jl,tu=ve=>{let Ae=Math.abs(ve);return Ae>=1/512?Math.sign(ve)*Math.pow(Ae,1/1.8):16*ve},Lc=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"prophoto",r:tu(ve*1.3457868816471585-Ae*.2555720873797946-.0511018649755453*Le),g:tu(ve*-.5446307051249019+Ae*1.5082477428451466+.0205274474364214*Le),b:tu(ve*0+Ae*0+1.2119675456389452*Le)};return We!==void 0&&(Xe.alpha=We),Xe},Cl=Lc,oc=(ve=0)=>{let Ae=Math.abs(ve);return Ae>=16/512?Math.sign(ve)*Math.pow(Ae,1.8):ve/16},of=ve=>{let Ae=oc(ve.r),Le=oc(ve.g),We=oc(ve.b),Xe={mode:"xyz50",x:.7977666449006423*Ae+.1351812974005331*Le+.0313477341283922*We,y:.2880748288194013*Ae+.7118352342418731*Le+899369387256e-16*We,z:0*Ae+0*Le+.8251046025104602*We};return ve.alpha!==void 0&&(Xe.alpha=ve.alpha),Xe},Cf=of,Jd=Ci(ja({},Pt),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Cl,rgb:ve=>Cl(tf(ve))},toMode:{xyz50:Cf,rgb:ve=>Cc(Cf(ve))}}),Ph=Jd,kp=1.09929682680944,cd=.018053968510807,ru=ve=>{let Ae=Math.abs(ve);return Ae>cd?(Math.sign(ve)||1)*(kp*Math.pow(Ae,.45)-(kp-1)):4.5*ve},Cp=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"rec2020",r:ru(ve*1.7166511879712683-Ae*.3556707837763925-.2533662813736599*Le),g:ru(ve*-.6666843518324893+Ae*1.6164812366349395+.0157685458139111*Le),b:ru(ve*.0176398574453108-Ae*.0427706132578085+.9421031212354739*Le)};return We!==void 0&&(Xe.alpha=We),Xe},th=Cp,fd=1.09929682680944,hd=.018053968510807,sc=(ve=0)=>{let Ae=Math.abs(ve);return Ae{let Ae=sc(ve.r),Le=sc(ve.g),We=sc(ve.b),Xe={mode:"xyz65",x:.6369580483012911*Ae+.1446169035862083*Le+.1688809751641721*We,y:.262700212011267*Ae+.6779980715188708*Le+.059301716469862*We,z:0*Ae+.0280726930490874*Le+1.0609850577107909*We};return ve.alpha!==void 0&&(Xe.alpha=ve.alpha),Xe},Df=Qd,Ih=Ci(ja({},Pt),{mode:"rec2020",fromMode:{xyz65:th,rgb:ve=>th(Fe(ve))},toMode:{xyz65:Df,rgb:ve=>ct(Df(ve))},parse:["rec2020"],serialize:"rec2020"}),Lf=Ih,Bu=.0037930732552754493,Ff=Math.cbrt(Bu),rh=ve=>Math.cbrt(ve)-Ff,ep=ve=>{let{r:Ae,g:Le,b:We,alpha:Xe}=De(ve),rt=rh(.3*Ae+.622*Le+.078*We+Bu),Ct=rh(.23*Ae+.692*Le+.078*We+Bu),Jt=rh(.2434226892454782*Ae+.2047674442449682*Le+.5518098665095535*We+Bu),br={mode:"xyb",x:(rt-Ct)/2,y:(rt+Ct)/2,b:Jt-(rt+Ct)/2};return Xe!==void 0&&(br.alpha=Xe),br},au=ep,ke=ve=>Math.pow(ve+Ff,3),Re=({x:ve,y:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=ke(ve+Ae)-Bu,rt=ke(Ae-ve)-Bu,Ct=ke(Le+Ae)-Bu,Jt=at({r:11.031566904639861*Xe-9.866943908131562*rt-.16462299650829934*Ct,g:-3.2541473810744237*Xe+4.418770377582723*rt-.16462299650829934*Ct,b:-3.6588512867136815*Xe+2.7129230459360922*rt+1.9459282407775895*Ct});return We!==void 0&&(Jt.alpha=We),Jt},He=Re,$e={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:He},fromMode:{rgb:au},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ke,y:Ke,b:Ke,alpha:{use:Ke,fixup:dt}}},ot=$e,nt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Cc,lab:ic},fromMode:{rgb:tf,lab:ef},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ke,y:Ke,z:Ke,alpha:{use:Ke,fixup:dt}}},ht=nt,Ut=ve=>{let{x:Ae,y:Le,z:We,alpha:Xe}=ve;Ae===void 0&&(Ae=0),Le===void 0&&(Le=0),We===void 0&&(We=0);let rt={mode:"xyz50",x:1.0479298208405488*Ae+.0229467933410191*Le-.0501922295431356*We,y:.0296278156881593*Ae+.990434484573249*Le-.0170738250293851*We,z:-.0092430581525912*Ae+.0150551448965779*Le+.7518742899580008*We};return Xe!==void 0&&(rt.alpha=Xe),rt},Xt=Ut,Nt=ve=>{let{x:Ae,y:Le,z:We,alpha:Xe}=ve;Ae===void 0&&(Ae=0),Le===void 0&&(Le=0),We===void 0&&(We=0);let rt={mode:"xyz65",x:.9554734527042182*Ae-.0230985368742614*Le+.0632593086610217*We,y:-.0283697069632081*Ae+1.0099954580058226*Le+.021041398966943*We,z:.0123140016883199*Ae-.0205076964334779*Le+1.3303659366080753*We};return Xe!==void 0&&(rt.alpha=Xe),rt},Zt=Nt,or={mode:"xyz65",toMode:{rgb:ct,xyz50:Xt},fromMode:{rgb:Fe,xyz50:Zt},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:Ke,y:Ke,z:Ke,alpha:{use:Ke,fixup:dt}}},gr=or,Er=({r:ve,g:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"yiq",y:.29889531*ve+.58662247*Ae+.11448223*Le,i:.59597799*ve-.2741761*Ae-.32180189*Le,q:.21147017*ve-.52261711*Ae+.31114694*Le};return We!==void 0&&(Xe.alpha=We),Xe},Br=Er,oa=({y:ve,i:Ae,q:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"rgb",r:ve+.95608445*Ae+.6208885*Le,g:ve-.27137664*Ae-.6486059*Le,b:ve-1.10561724*Ae+1.70250126*Le};return We!==void 0&&(Xe.alpha=We),Xe},Ma=oa,si={mode:"yiq",toMode:{rgb:Ma},fromMode:{rgb:Br},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ke,i:Ke,q:Ke,alpha:{use:Ke,fixup:dt}}},Wi=si,Qi=(ve,Ae)=>Math.round(ve*(Ae=Math.pow(10,Ae)))/Ae,on=(ve=4)=>Ae=>typeof Ae=="number"?Qi(Ae,ve):Ae,yn=on,_o=yn(2),Io=ve=>Math.max(0,Math.min(1,ve||0)),Pn=ve=>Math.round(Io(ve)*255),es=L("rgb"),ll=L("hsl"),Dl=ve=>{if(ve===void 0)return;let Ae=Pn(ve.r),Le=Pn(ve.g),We=Pn(ve.b);return"#"+(1<<24|Ae<<16|Le<<8|We).toString(16).slice(1)},lc=ve=>{if(ve===void 0)return;let Ae=Pn(ve.alpha!==void 0?ve.alpha:1);return Dl(ve)+(256|Ae).toString(16).slice(1)},sf=ve=>{if(ve===void 0)return;let Ae=Pn(ve.r),Le=Pn(ve.g),We=Pn(ve.b);return ve.alpha===void 0||ve.alpha===1?`rgb(${Ae}, ${Le}, ${We})`:`rgba(${Ae}, ${Le}, ${We}, ${_o(Io(ve.alpha))})`},_l=ve=>{if(ve===void 0)return;let Ae=_o(ve.h||0),Le=_o(Io(ve.s)*100)+"%",We=_o(Io(ve.l)*100)+"%";return ve.alpha===void 0||ve.alpha===1?`hsl(${Ae}, ${Le}, ${We})`:`hsla(${Ae}, ${Le}, ${We}, ${_o(Io(ve.alpha))})`},xl=ve=>{let Ae=z(ve);if(!Ae)return;let Le=J(Ae.mode);if(!Le.serialize||typeof Le.serialize=="string"){let We=`color(${Le.serialize||`--${Ae.mode}`} `;return Le.channels.forEach((Xe,rt)=>{Xe!=="alpha"&&(We+=(rt?" ":"")+(Ae[Xe]!==void 0?Ae[Xe]:"none"))}),Ae.alpha!==void 0&&Ae.alpha<1&&(We+=` / ${Ae.alpha}`),We+")"}if(typeof Le.serialize=="function")return Le.serialize(Ae)},Ou=ve=>Dl(es(ve)),Fc=ve=>lc(es(ve)),Pc=ve=>sf(es(ve)),Ic=ve=>_l(ll(ve)),lf={normal:(ve,Ae)=>Ae,multiply:(ve,Ae)=>ve*Ae,screen:(ve,Ae)=>ve+Ae-ve*Ae,"hard-light":(ve,Ae)=>Ae<.5?ve*2*Ae:2*Ae*(1-ve)-1,overlay:(ve,Ae)=>ve<.5?Ae*2*ve:2*ve*(1-Ae)-1,darken:(ve,Ae)=>Math.min(ve,Ae),lighten:(ve,Ae)=>Math.max(ve,Ae),"color-dodge":(ve,Ae)=>ve===0?0:Ae===1?1:Math.min(1,ve/(1-Ae)),"color-burn":(ve,Ae)=>ve===1?1:Ae===0?0:1-Math.min(1,(1-ve)/Ae),"soft-light":(ve,Ae)=>Ae<.5?ve-(1-2*Ae)*ve*(1-ve):ve+(2*Ae-1)*((ve<.25?((16*ve-12)*ve+4)*ve:Math.sqrt(ve))-ve),difference:(ve,Ae)=>Math.abs(ve-Ae),exclusion:(ve,Ae)=>ve+Ae-2*ve*Ae},uc=(ve,Ae="normal",Le="rgb")=>{let We=typeof Ae=="function"?Ae:lf[Ae],Xe=L(Le),rt=J(Le).channels;return ve.map(Jt=>{let br=Xe(Jt);return br.alpha===void 0&&(br.alpha=1),br}).reduce((Jt,br)=>{if(Jt===void 0)return br;let ea=br.alpha+Jt.alpha*(1-br.alpha);return rt.reduce((Vr,Ur)=>(Ur!=="alpha"&&(ea===0?Vr[Ur]=0:(Vr[Ur]=br.alpha*(1-Jt.alpha)*br[Ur]+br.alpha*Jt.alpha*We(Jt[Ur],br[Ur])+(1-br.alpha)*Jt.alpha*Jt[Ur],Vr[Ur]=Math.max(0,Math.min(1,Vr[Ur]/ea)))),Vr),{mode:Le,alpha:ea})})},Pf=uc,Rh=([ve,Ae])=>ve+Math.random()*(Ae-ve),ae=ve=>Object.keys(ve).reduce((Ae,Le)=>{let We=ve[Le];return Ae[Le]=Array.isArray(We)?We:[We,We],Ae},{}),de=(ve="rgb",Ae={})=>{let Le=J(ve),We=ae(Ae);return Le.channels.reduce((Xe,rt)=>((We.alpha||rt!=="alpha")&&(Xe[rt]=Rh(We[rt]||Le.ranges[rt])),Xe),{mode:ve})},Te=de,Pe=(ve,Ae="rgb",Le=!1)=>{let We=Ae?J(Ae).channels:null,Xe=Ae?L(Ae):z;return rt=>{let Ct=Xe(rt);if(!Ct)return;let Jt=(We||J(Ct.mode).channels).reduce((ea,Vr)=>{let Ur=ve(Ct[Vr],Vr,Ct,Ae);return Ur!==void 0&&!isNaN(Ur)&&(ea[Vr]=Ur),ea},{mode:Ct.mode});if(!Le)return Jt;let br=z(rt);return br&&br.mode!==Jt.mode?L(br.mode)(Jt):Jt}},ze=(ve,Ae,Le)=>Ae!=="alpha"?(ve||0)*(Le.alpha!==void 0?Le.alpha:1):ve,Ne=(ve,Ae,Le)=>Ae!=="alpha"&&Le.alpha!==0?(ve||0)/(Le.alpha!==void 0?Le.alpha:1):ve,lt=(ve=1,Ae=0)=>(Le,We)=>We!=="alpha"?Le*ve+Ae:Le,Qe=(ve=1,Ae=1,Le=0)=>(We,Xe)=>Xe!=="alpha"?ve*Math.pow(We,Ae)+Le:We,yt=ve=>{ve[0]===void 0&&(ve[0]=0),ve[ve.length-1]===void 0&&(ve[ve.length-1]=1);let Ae=1,Le,We,Xe,rt;for(;AeAe=>ve<=0?1:ve>=1?0:Math.pow(Ae,Math.log(.5)/Math.log(ve)),er=Rt,Qt=ve=>typeof ve=="function",wr=ve=>ve&&typeof ve=="object",Cr=ve=>typeof ve=="number",ir=(ve,Ae="rgb",Le,We)=>{let Xe=J(Ae),rt=L(Ae),Ct=[],Jt=[],br={};ve.forEach(ba=>{Array.isArray(ba)?(Ct.push(rt(ba[0])),Jt.push(ba[1])):Cr(ba)||Qt(ba)?br[Jt.length]=ba:(Ct.push(rt(ba)),Jt.push(void 0))}),Ft(Jt);let ea=Xe.channels.reduce((ba,ca)=>{let _a;return wr(Le)&&wr(Le[ca])&&Le[ca].fixup?_a=Le[ca].fixup:wr(Xe.interpolate[ca])&&Xe.interpolate[ca].fixup?_a=Xe.interpolate[ca].fixup:_a=Ea=>Ea,ba[ca]=_a(Ct.map(Ea=>Ea[ca])),ba},{});if(We){let ba=Ct.map((ca,_a)=>Xe.channels.reduce((Ea,Ia)=>(Ea[Ia]=ea[Ia][_a],Ea),{mode:Ae}));ea=Xe.channels.reduce((ca,_a)=>(ca[_a]=ba.map(Ea=>{let Ia=We(Ea[_a],_a,Ea,Ae);return isNaN(Ia)?void 0:Ia}),ca),{})}let Vr=Xe.channels.reduce((ba,ca)=>{let _a;return Qt(Le)?_a=Le:wr(Le)&&Qt(Le[ca])?_a=Le[ca]:wr(Le)&&wr(Le[ca])&&Le[ca].use?_a=Le[ca].use:Qt(Xe.interpolate[ca])?_a=Xe.interpolate[ca]:wr(Xe.interpolate[ca])&&(_a=Xe.interpolate[ca].use),ba[ca]=_a(ea[ca]),ba},{}),Ur=Ct.length-1;return ba=>{if(ba=Math.min(Math.max(0,ba),1),ba<=Jt[0])return Ct[0];if(ba>Jt[Ur])return Ct[Ur];let ca=0;for(;Jt[ca]{let Qs=Vr[ps](Mi);return Qs!==void 0&&(lo[ps]=Qs),lo},{mode:Ae})}},pr=(ve,Ae="rgb",Le)=>ir(ve,Ae,Le),xr=(ve,Ae)=>(Le,We="rgb",Xe)=>{let rt=Ae?Pe(Ae,We):void 0,Ct=ir(Le,We,Xe,ve);return rt?Jt=>rt(Ct(Jt)):Ct},Dr=xr(ze,Ne),Lr=(ve,Ae)=>(ve+Ae)%Ae,mr=(ve,Ae,Le,We,Xe)=>{let rt=Xe*Xe,Ct=rt*Xe;return((1-3*Xe+3*rt-Ct)*ve+(4-6*rt+3*Ct)*Ae+(1+3*Xe+3*rt-3*Ct)*Le+Ct*We)/6},ha=ve=>Ae=>{let Le=ve.length-1,We=Ae>=1?Le-1:Math.max(0,Math.floor(Ae*Le));return mr(We>0?ve[We-1]:2*ve[We]-ve[We+1],ve[We],ve[We+1],WeAe=>{let Le=ve.length-1,We=Math.floor(Ae*Le);return mr(ve[Lr(We-1,ve.length)],ve[Lr(We,ve.length)],ve[Lr(We+1,ve.length)],ve[Lr(We+2,ve.length)],(Ae-We/Le)*Le)},Ua=ve=>{let Ae,Le=ve.length-1,We=new Array(Le),Xe=new Array(Le),rt=new Array(Le);for(We[1]=1/4,Xe[1]=(6*ve[1]-ve[0])/4,Ae=2;Ae0&&(rt[Le-1]=Xe[Le-1]),Ae=Le-2;Ae>0;--Ae)rt[Ae]=Xe[Ae]-We[Ae]*rt[Ae+1];return rt},ei=ve=>ha(Ua(ve)),bi=ve=>ka(Ua(ve)),di=Math.sign,Tn=Math.min,ci=Math.abs,cn=ve=>{let Ae=ve.length-1,Le=[],We=[],Xe=[];for(let rt=0;rt0?.5*(ve[rt+1]-ve[rt-1])*Ae:void 0),Xe.push(rt>0?(di(Le[rt-1])+di(Le[rt]))*Tn(ci(Le[rt-1]),ci(Le[rt]),.5*ci(We[rt])):void 0);return[Le,We,Xe]},xo=(ve,Ae,Le)=>{let We=ve.length-1,Xe=We*We;return rt=>{let Ct;rt>=1?Ct=We-1:Ct=Math.max(0,Math.floor(rt*We));let Jt=rt-Ct/We,br=Jt*Jt,ea=br*Jt;return(Ae[Ct]+Ae[Ct+1]-2*Le[Ct])*Xe*ea+(3*Le[Ct]-2*Ae[Ct]-Ae[Ct+1])*We*br+Ae[Ct]*Jt+ve[Ct]}},js=ve=>{if(ve.length<3)return Ke(ve);let Ae=ve.length-1,[Le,,We]=cn(ve);return We[0]=Le[0],We[Ae]=Le[Ae-1],xo(ve,We,Le)},Bo=ve=>{if(ve.length<3)return Ke(ve);let Ae=ve.length-1,[Le,We,Xe]=cn(ve);return We[0]=(ve[1]*2-ve[0]*1.5-ve[2]*.5)*Ae,We[Ae]=(ve[Ae]*1.5-ve[Ae-1]*2+ve[Ae-2]*.5)*Ae,Xe[0]=We[0]*Le[0]<=0?0:ci(We[0])>2*ci(Le[0])?2*Le[0]:We[0],Xe[Ae]=We[Ae]*Le[Ae-1]<=0?0:ci(We[Ae])>2*ci(Le[Ae-1])?2*Le[Ae-1]:We[Ae],xo(ve,Xe,Le)},Xa=ve=>{let Ae=ve.length-1,[Le,We,Xe]=cn(ve);We[0]=.5*(ve[1]-ve[Ae])*Ae,We[Ae]=.5*(ve[0]-ve[Ae-1])*Ae;let rt=(ve[0]-ve[Ae])*Ae,Ct=rt;return Xe[0]=(di(rt)+di(Le[0]))*Tn(ci(rt),ci(Le[0]),.5*ci(We[0])),Xe[Ae]=(di(Le[Ae-1])+di(Ct))*Tn(ci(Le[Ae-1]),ci(Ct),.5*ci(We[Ae])),xo(ve,Xe,Le)},Mn=(ve=1)=>ve===1?Ae=>Ae:Ae=>Math.pow(Ae,ve),Dn=Mn,Mo=(ve=2,Ae=1)=>{let Le=Dn(Ae);if(ve<2)return ve<1?[]:[Le(.5)];let We=[];for(let Xe=0;Xe{let Ae={mode:ve.mode,r:Math.max(0,Math.min(ve.r!==void 0?ve.r:0,1)),g:Math.max(0,Math.min(ve.g!==void 0?ve.g:0,1)),b:Math.max(0,Math.min(ve.b!==void 0?ve.b:0,1))};return ve.alpha!==void 0&&(Ae.alpha=ve.alpha),Ae},Ul=ve=>Ll(Js(ve)),_u=ve=>ve!==void 0&&(ve.r===void 0||ve.r>=0&&ve.r<=1)&&(ve.g===void 0||ve.g>=0&&ve.g<=1)&&(ve.b===void 0||ve.b>=0&&ve.b<=1);function xt(ve){return _u(Js(ve))}function nr(ve="rgb"){let{gamut:Ae}=J(ve);if(!Ae)return We=>!0;let Le=L(typeof Ae=="string"?Ae:ve);return We=>_u(Le(We))}function fr(ve){return ve=z(ve),ve===void 0||xt(ve)?ve:L(ve.mode)(Ul(ve))}function Or(ve="rgb"){let{gamut:Ae}=J(ve);if(!Ae)return rt=>z(rt);let Le=typeof Ae=="string"?Ae:ve,We=L(Le),Xe=nr(Le);return rt=>{let Ct=z(rt);if(!Ct)return;let Jt=We(Ct);if(Xe(Jt))return Ct;let br=Ll(Jt);return Ct.mode===br.mode?br:L(Ct.mode)(br)}}function Xr(ve,Ae="lch",Le="rgb"){ve=z(ve);let We=Le==="rgb"?xt:nr(Le),Xe=Le==="rgb"?Ul:Or(Le);if(ve===void 0||We(ve))return ve;let rt=L(ve.mode);ve=L(Ae)(ve);let Ct=Ci(ja({},ve),{c:0});if(!We(Ct))return rt(Xe(Ct));let Jt=0,br=ve.c!==void 0?ve.c:0,ea=J(Ae).ranges.c,Vr=(ea[1]-ea[0])/Math.pow(2,13),Ur=Ct.c;for(;br-Jt>Vr;)Ct.c=Jt+(br-Jt)*.5,We(Ct)?(Ur=Ct.c,Jt=Ct.c):br=Ct.c;return rt(We(Ct)?Ct:Ci(ja({},Ct),{c:Ur}))}function aa(ve="rgb",Ae="oklch",Le=Ka("oklch"),We=.02){let Xe=L(ve),rt=J(ve);if(!rt.gamut)return Vr=>Xe(Vr);let Ct=nr(ve),Jt=Or(ve),br=L(Ae),{ranges:ea}=J(Ae);if(!ea.l||!ea.c)throw new Error("LCH-like space expected");return Vr=>{if(Vr=z(Vr),Vr===void 0)return;let Ur=ja({},br(Vr));if(Ur.l===void 0&&(Ur.l=0),Ur.c===void 0&&(Ur.c=0),Ur.l>=ea.l[1]){let Ia=Ci(ja({},rt.white),{mode:ve});return Vr.alpha!==void 0&&(Ia.alpha=Vr.alpha),Ia}if(Ur.l<=ea.l[0]){let Ia=Ci(ja({},rt.black),{mode:ve});return Vr.alpha!==void 0&&(Ia.alpha=Vr.alpha),Ia}if(Ct(Ur))return Xe(Ur);let ba=0,ca=Ur.c,_a=(ea.c[1]-ea.c[0])/4e3,Ea=Jt(Ur);for(;ca-ba>_a;)Ur.c=(ba+ca)*.5,Ea=Jt(Ur),Ct(Ur)||Le&&We>0&&Le(Ur,Ea)<=We?ba=Ur.c:ca=Ur.c;return Xe(Ct(Ur)?Ur:Ea)}}var Wr=(ve,Ae=Ka(),Le=We=>We)=>{let We=ve.map((Xe,rt)=>({color:Le(Xe),i:rt}));return(Xe,rt=1,Ct=1/0)=>(isFinite(rt)&&(rt=Math.max(1,Math.min(rt,We.length-1))),We.forEach(Jt=>{Jt.d=Ae(Xe,Jt.color)}),We.sort((Jt,br)=>Jt.d-br.d).slice(0,rt).filter(Jt=>Jt.dve[Jt.i]))},wa=Wr,za=ve=>Math.max(ve,0),Ba=ve=>Math.max(Math.min(ve,1),0),Na=(ve,Ae,Le)=>ve===void 0||Ae===void 0?void 0:ve+Le*(Ae-ve),Ji=ve=>{let Ae=1-Ba(ve);return[.393+.607*Ae,.769-.769*Ae,.189-.189*Ae,0,.349-.349*Ae,.686+.314*Ae,.168-.168*Ae,0,.272-.272*Ae,.534-.534*Ae,.131+.869*Ae,0,0,0,0,1]},ki=ve=>{let Ae=za(ve);return[.213+.787*Ae,.715-.715*Ae,.072-.072*Ae,0,.213-.213*Ae,.715+.285*Ae,.072-.072*Ae,0,.213-.213*Ae,.715-.715*Ae,.072+.928*Ae,0,0,0,0,1]},ii=ve=>{let Ae=1-Ba(ve);return[.2126+.7874*Ae,.7152-.7152*Ae,.0722-.0722*Ae,0,.2126-.2126*Ae,.7152+.2848*Ae,.0722-.0722*Ae,0,.2126-.2126*Ae,.7152-.7152*Ae,.0722+.9278*Ae,0,0,0,0,1]},ma=ve=>{let Ae=Math.PI*ve/180,Le=Math.cos(Ae),We=Math.sin(Ae);return[.213+Le*.787-We*.213,.715-Le*.715-We*.715,.072-Le*.072+We*.928,0,.213-Le*.213+We*.143,.715+Le*.285+We*.14,.072-Le*.072-We*.283,0,.213-Le*.213-We*.787,.715-Le*.715+We*.715,.072+Le*.928+We*.072,0,0,0,0,1]},Ir=(ve,Ae,Le=!1)=>{let We=L(Ae),Xe=J(Ae).channels;return rt=>{let Ct=We(rt);if(!Ct)return;let Jt={mode:Ae},br,ea=Xe.length;for(let Ur=0;Ur{let Le=za(ve);return Pe(lt(Le),Ae,!0)},Pa=(ve=1,Ae="rgb")=>{let Le=za(ve);return Pe(lt(Le,(1-Le)/2),Ae,!0)},Ha=(ve=1,Ae="rgb")=>Ir(Ji(ve),Ae,!0),Ta=(ve=1,Ae="rgb")=>Ir(ki(ve),Ae,!0),hi=(ve=1,Ae="rgb")=>Ir(ii(ve),Ae,!0),oi=(ve=1,Ae="rgb")=>{let Le=Ba(ve);return Pe((We,Xe)=>Xe==="alpha"?We:Na(Le,1-Le,We),Ae,!0)},an=(ve=0,Ae="rgb")=>Ir(ma(ve),Ae,!0),Aa=L("rgb"),ga=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],wi=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],ri=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],$a=(ve,Ae)=>{let Le=Math.max(0,Math.min(1,Ae)),We=Math.round(Le/.1),Xe=Math.round(Le%.1),rt=ve[We];if(Xe>0&&We_e(rt[br],Ct[br],Xe))}return Ct=>{let Jt=z(Ct);if(Jt===void 0)return;let{r:br,g:ea,b:Vr}=Aa(Jt),Ur={mode:"rgb",r:rt[0]*br+rt[1]*ea+rt[2]*Vr,g:rt[3]*br+rt[4]*ea+rt[5]*Vr,b:rt[6]*br+rt[7]*ea+rt[8]*Vr};return Jt.alpha!==void 0&&(Ur.alpha=Jt.alpha),L(Jt.mode)(Ur)}},Ja=(ve=1)=>$a(ga,ve),Ai=(ve=1)=>$a(wi,ve),nn=(ve=1)=>$a(ri,ve),Ln=ve=>ve*ve*(3-2*ve),fi=ve=>.5-Math.sin(Math.asin(1-2*ve)/3),zi=ve=>ve*ve*ve*(ve*(ve*6-15)+10),Sn=zi,kn=ve=>(1-Math.cos(ve*Math.PI))/2,so=kn;function Us(ve){let Ae=L("lrgb")(ve);return .2126*Ae.r+.7152*Ae.g+.0722*Ae.b}function iu(ve,Ae){let Le=Us(ve),We=Us(Ae);return(Math.max(Le,We)+.05)/(Math.min(Le,We)+.05)}var bo=Z(ft),uf=Z(Ht),hs=Z(ro),cc=Z(Kn),Rc=Z(Fo),cf=Z(sl),ql=Z(An),Vl=Z(Pu),nu=Z(td),Xn=Z(rc),xu=Z(ac),xs=Z(Ql),zc=Z(Mp),ff=Z(Mf),hf=Z(Kf),Nn=Z(yu),Do=Z(ud),Ps=Z(eh),ur=Z(ji),Kr=Z(pn),Jr=Z(No),Gi=Z(zo),Eo=Z(zu),ds=Z(Ph),Ui=Z(Lf),tr=Z(Pt),hr=Z(ot),_r=Z(ht),Zr=Z(gr),sa=Z(Wi)}}),xv=ye({"src/plot_api/plot_config.js"(e,r){"use strict";var t={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:500,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},a={};function i(o,s){for(var l in o){var n=o[l];n.valType?s[l]=n.dflt:(s[l]||(s[l]={}),i(n,s[l]))}}i(t,a),r.exports={configAttributes:t,dfltConfig:a}}}),CD=ye({"src/lib/notifier.js"(e,r){"use strict";var t=ai(),a=en(),i=[];r.exports=function(o,s,l){var n;if(((n=l?._context)==null?void 0:n.displayNotifier)===!1||i.indexOf(o)!==-1)return;i.push(o);var u=1e3;a(s)?u=s:s==="long"&&(u=3e3);var c=t.select("body").selectAll(".plotly-notifier").data([0]);c.enter().append("div").classed("plotly-notifier",!0);var f=c.selectAll(".notifier-note").data(i);function h(d){d.duration(700).style("opacity",0).each("end",function(p){var g=i.indexOf(p);g!==-1&&i.splice(g,1),t.select(this).remove()})}f.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(d){var p=t.select(this);p.append("button").classed("notifier-close",!0).html("×").on("click",function(){p.transition().call(h)});for(var g=p.append("p"),m=d.split(//g),y=0;y1){var s=["LOG:"];for(o=0;o1){var l=[];for(o=0;o"),"long")}},i.warn=function(){var o;if(t.logging>0){var s=["WARN:"];for(o=0;o0){var l=[];for(o=0;o"),"stick")}},i.error=function(){var o;if(t.logging>0){var s=["ERROR:"];for(o=0;o0){var l=[];for(o=0;o"),"stick")}}}}),Wl=ye({"src/components/color/attributes.js"(e){"use strict";e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11}}),Ya=ye({"src/components/color/index.js"(e,r){"use strict";var{converter:t,formatHex:a,formatRgb:i,wcagContrast:o,wcagLuminance:s}=VQ(),{isArrayOrTypedArray:l}=yc(),{warn:n}=c0(),{background:u,defaultLine:c,defaults:f,lightLine:h}=Wl(),d=t("rgb"),p=t("hsl"),g=q=>{if(typeof q!="string")return;let Y=q.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(Y))try{return d(Y)}catch{return}},m=q=>q>0?q>1?1:q:0,y={mode:"rgb",r:0,g:0,b:0,alpha:1},_=q=>Math.round(q*255e6)/255e6,v=q=>Ci(ja({},q),{r:_(q.r),g:_(q.g),b:_(q.b)}),x=q=>i(v(q)),E=q=>a(v(q)),M=q=>{var Y,K,re,se;return typeof q=="string"?`"${q}"`:l(q)?`${(K=(Y=q.constructor)==null?void 0:Y.name)!=null?K:"Array"}(${q.length})`:typeof q=="object"?(se=(re=q.constructor)==null?void 0:re.name)!=null?se:"Object":`${typeof q} ${q}`},C=(q,Y)=>{var K;let re=g(q);return re?((K=re.alpha)!=null||(re.alpha=1),re):(!Y&&q!=null&&n(`Invalid color specifier: ${M(q)}. Defaulting to "#000"`),y)},w=q=>x(Ci(ja({},C(q)),{alpha:1})),k=q=>q?C(q).alpha:0,T=q=>l(q)&&q.length>2&&Number.isFinite(q[0])&&Number.isFinite(q[1])&&Number.isFinite(q[2]),b=q=>{let[Y,K,re,se]=q,le=Math.max(Y,K,re)>1?1/255:1,ue=se??1;return{mode:"rgb",r:Y*le,g:K*le,b:re*le,alpha:ue>1?ue/255:ue}},S=(q,Y)=>{let K=T(q)?b(q):C(q,!0),re=[m(K.r),m(K.g),m(K.b),m(K.alpha)];return Y==="uint8"||Y==="uint8_clamped"?Uint8Array.from(re,se=>Math.round(se*255)):Y==="float32"?Float32Array.from(re):Y==="float64"?Float64Array.from(re):re},A=(q,Y)=>x(Ci(ja({},C(q)),{alpha:m(Y)})),F=(q,Y)=>{let K=C(q),re=K.alpha;if(re===1)return x(K);let se=C(Y||u),le=se.alpha,ue=(fe,pe)=>(le===1?pe:1-le+pe*le)*(1-re)+fe*re;return x({mode:"rgb",r:ue(K.r,se.r),g:ue(K.g,se.g),b:ue(K.b,se.b)})},D=(q,Y,K)=>{let re=C(q),se=C(Y),le=(ue,fe)=>K*ue+(1-K)*fe;return x({mode:"rgb",r:le(re.r,se.r),g:le(re.g,se.g),b:le(re.b,se.b)})},R=(q,Y)=>{let K=C(q),re=p(K)||{mode:"hsl",h:0,s:0,l:0};return x(d(Ci(ja({},re),{l:m((re.l*100+Y)/100),alpha:K.alpha})))},P=(q,Y)=>o(C(q),C(Y)),z=q=>P(q,u)>P(q,c),I=x(C(u)),L=x(C(c)),B=(q,Y,K)=>(C(q).alpha!==1&&(q=F(q,u)),z(q)?Y?R(q,Y):I:K?R(q,-K):L),O=(q,Y)=>{q.style({stroke:w(Y),"stroke-opacity":C(Y).alpha})},G=(q,Y)=>{q.style({fill:w(Y),"fill-opacity":C(Y).alpha})},$=(q,Y)=>!!(q&&Y&&w(q)===w(Y)),X=q=>g(q)!==void 0,Z=(q,Y)=>{Y=Y===0?0:Y||10;let K=C(q),re=Y/100;return x(Ci(ja({},K),{r:m(K.r+re),g:m(K.g+re),b:m(K.b+re)}))},J=(q,Y,K)=>{let re=C(q),se=C(Y),le=K/100,ue=se.alpha-re.alpha,fe=2*le-1,pe=((fe*ue===-1?fe:(fe+ue)/(1+fe*ue))+1)/2,we=1-pe,xe=(he,oe)=>we*he+pe*oe;return x({mode:"rgb",r:xe(re.r,se.r),g:xe(re.g,se.g),b:xe(re.b,se.b),alpha:re.alpha*(1-le)+se.alpha*le})},N=(q,Y=["#000","#fff"])=>{let K,re=-1/0;for(let se of Y){let le=P(q,se);le>re&&(re=le,K=x(C(se)))}return K},H=q=>x(C(q)),W=q=>E(C(q)).toUpperCase(),U=q=>{let Y=C(q);return[m(Y.r)*255,m(Y.g)*255,m(Y.b)*255,m(Y.alpha)]},V=([q,Y,K,re])=>x({mode:"rgb",r:q/255,g:Y/255,b:K/255,alpha:re}),j=q=>{let Y=C(q);return s({mode:"rgb",r:m(Y.r),g:m(Y.g),b:m(Y.b)})};r.exports={addOpacity:A,adjustLightness:R,background:u,brighten:Z,combine:F,contrast:B,defaultLine:c,defaults:f,equals:$,fill:G,hexString:W,interpolate:D,isChannelArray:T,isDark:z,isValid:X,lightLine:h,luminosity:j,mix:J,mostReadable:N,normalize:S,opacity:k,parse:C,rgb:w,rgbaArray:U,rgbaArrayToString:V,rgbaString:H,stroke:O,wcagContrast:P}}}),Tm=ye({"src/components/colorscale/scales.js"(e,r){"use strict";var t=Ya(),a={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},i=a.RdBu;function o(n,u){if(u||(u=i),!n)return u;function c(){try{n=a[n]||JSON.parse(n)}catch{n=u}}return typeof n=="string"&&(c(),typeof n=="string"&&c()),s(n)?n:u}function s(n){var u=0;if(!Array.isArray(n)||n.length<2||!n[0]||!n[n.length-1]||+n[0][0]!=0||+n[n.length-1][0]!=1)return!1;for(var c=0;cGQ});function GQ(e,r="",t,a){let i=r+(t?"":"$"),o=a===!1?"":"^";return e==="xy"?new RegExp(o+"x"+Vx+"y"+Vx+i):new RegExp(o+e+Vx+i)}var Vx,hy=Si({"src/lib/regex.ts"(){"use strict";Vx="([2-9]|[1-9][0-9]+)?"}}),HQ=ye({"src/lib/coerce.js"(e){"use strict";var r=en(),t=Xi().extendFlat,a=Oo(),i=Tm(),o=Ya(),s=f0().DESELECTDIM,l=Ux(),n=(hy(),On(Mm)).counter,u=(cy(),On(Am)).modHalf,c=yc().isArrayOrTypedArray,f=yc().isTypedArraySpec,h=yc().decodeTypedArraySpec;e.valObjectMeta={data_array:{coerceFunction:function(p,g,m){g.set(c(p)?p:f(p)?h(p):m)}},enumerated:{coerceFunction:function(p,g,m,y){y.coerceNumber&&(p=+p),y.values.indexOf(p)===-1?g.set(m):g.set(p)},validateFunction:function(p,g){g.coerceNumber&&(p=+p);for(var m=g.values,y=0;yv===!0||v===!1;_(p)||y.arrayOk&&Array.isArray(p)&&p.length>0&&p.every(_)?g.set(p):g.set(m)}},number:{coerceFunction:function(p,g,m,y){f(p)&&(p=h(p)),!r(p)||y.min!==void 0&&py.max?g.set(m):g.set(+p)}},integer:{coerceFunction:function(p,g,m,y){if((y.extras||[]).indexOf(p)!==-1){g.set(p);return}f(p)&&(p=h(p)),p%1||!r(p)||y.min!==void 0&&py.max?g.set(m):g.set(+p)}},string:{coerceFunction:function(p,g,m,y){if(typeof p!="string"){var _=typeof p=="number";y.strict===!0||!_?g.set(m):g.set(String(p))}else y.noBlank&&!p?g.set(m):g.set(p)}},color:{coerceFunction:function(p,g,m){f(p)&&(p=h(p)),o.isValid(p)?g.set(p):g.set(m)}},colorlist:{coerceFunction:function(p,g,m){!Array.isArray(p)||!p.length?g.set(m):p.every(y=>o.isValid(y))?g.set(p):g.set(m)}},colorscale:{coerceFunction:function(p,g,m){g.set(i.get(p,m))}},angle:{coerceFunction:function(p,g,m){f(p)&&(p=h(p)),p==="auto"?g.set("auto"):r(p)?g.set(u(+p,360)):g.set(m)}},subplotid:{coerceFunction:function(p,g,m,y){var _=y.regex||n(m);let v=x=>typeof x=="string"&&_.test(x);v(p)||y.arrayOk&&c(p)&&p.length>0&&p.every(v)?g.set(p):g.set(m)},validateFunction:function(p,g){var m=g.dflt;return p===m?!0:typeof p!="string"?!1:!!n(m).test(p)}},flaglist:{coerceFunction:function(p,g,m,y){if((y.extras||[]).indexOf(p)!==-1){g.set(p);return}if(typeof p!="string"){g.set(m);return}for(var _=p.split("+"),v=0;v<_.length;){var x=_[v];y.flags.indexOf(x)===-1||_.indexOf(x)ja({valType:"string",dflt:"",editType:o},s!==!1?{arrayOk:!0}:{}),e.texttemplateAttrs=({editType:o="calc",arrayOk:s}={},l={})=>ja({valType:"string",dflt:"",editType:o},s!==!1?{arrayOk:!0}:{}),e.shapeTexttemplateAttrs=({editType:o="arraydraw",newshape:s}={},l={})=>({valType:"string",dflt:"",editType:o}),e.templatefallbackAttrs=({editType:o="none"}={})=>({valType:"any",dflt:"-",editType:o})}}),gA=ye({"src/components/shapes/label_texttemplate.js"(e,r){"use strict";function t(M,C){return C?C.d2l(M):M}function a(M,C){return C?C.l2d(M):M}function i(M){return M.x0}function o(M){return M.x1}function s(M){return M.y0}function l(M){return M.y1}function n(M){return M.x0shift||0}function u(M){return M.x1shift||0}function c(M){return M.y0shift||0}function f(M){return M.y1shift||0}function h(M,C){return t(M.x1,C)+u(M)-t(M.x0,C)-n(M)}function d(M,C,w){return t(M.y1,w)+f(M)-t(M.y0,w)-c(M)}function p(M,C){return Math.abs(h(M,C))}function g(M,C,w){return Math.abs(d(M,C,w))}function m(M,C,w){return M.type!=="line"?void 0:Math.sqrt(Math.pow(h(M,C),2)+Math.pow(d(M,C,w),2))}function y(M,C){return a((t(M.x1,C)+u(M)+t(M.x0,C)+n(M))/2,C)}function _(M,C,w){return a((t(M.y1,w)+f(M)+t(M.y0,w)+c(M))/2,w)}function v(M,C,w){return M.type!=="line"?void 0:d(M,C,w)/h(M,C)}var x=["x0","x1","y0","y1","dy","height","ycenter"],E=["x0","x1","y0","y1","dx","width","xcenter"];r.exports={x0:i,x1:o,y0:s,y1:l,slope:v,dx:h,dy:d,width:p,height:g,length:m,xcenter:y,ycenter:_,simpleXVariables:x,simpleYVariables:E}}}),xee=ye({"src/components/shapes/draw_newshape/attributes.js"(e,r){"use strict";var t=Cs().overrideAll,a=Oo(),i=vs(),o=Eu().dash,s=Xi().extendFlat,{shapeTexttemplateAttrs:l,templatefallbackAttrs:n}=Ro(),u=gA();r.exports=t({newshape:{visible:s({},a.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:s({},a.legend,{}),legendgroup:s({},a.legendgroup,{}),legendgrouptitle:{text:s({},a.legendgrouptitle.text,{}),font:i({})},legendrank:s({},a.legendrank,{}),legendwidth:s({},a.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:s({},o,{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:s({},a.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:l({newshape:!0},{keys:Object.keys(u)}),texttemplatefallback:n({editType:"arraydraw"}),font:i({}),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")}}),bee=ye({"src/components/selections/draw_newselection/attributes.js"(e,r){"use strict";var t=Eu().dash,a=Xi().extendFlat;r.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:a({},t,{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"}}}}),yA=ye({"src/plots/pad_attributes.js"(e,r){"use strict";r.exports=function(t){var a=t.editType;return{t:{valType:"number",dflt:0,editType:a},r:{valType:"number",dflt:0,editType:a},b:{valType:"number",dflt:0,editType:a},l:{valType:"number",dflt:0,editType:a},editType:a}}}}),dy=ye({"src/plots/layout_attributes.js"(e,r){"use strict";var t=vs(),a=Hx(),i=Wl(),o=xee(),s=bee(),l=yA(),n=Xi().extendFlat,u=t({editType:"calc"});u.family.dflt='"Open Sans", verdana, arial, sans-serif',u.size.dflt=12,u.color.dflt=i.defaultLine,r.exports={font:u,title:{text:{valType:"string",editType:"layoutstyle"},font:t({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:t({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:n(l({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:i.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:i.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:i.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:o.newshape,activeshape:o.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:n({},a.transition,{editType:"none"})}}}),wee=ye({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("9f215cf04c5486422605d13261cb87401f4e7763b6296af81e98efbc0130da53")){var e=document.createElement("style");e.id="9f215cf04c5486422605d13261cb87401f4e7763b6296af81e98efbc0130da53",e.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{position:absolute;left:0;top:0}.maplibregl-map:fullscreen{width:100%;height: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{position:absolute;pointer-events:none;z-index:2}.maplibregl-ctrl-top-left{top:0;left:0}.maplibregl-ctrl-top-right{top:0;right:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{right:0;bottom:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{margin:10px 0 0 10px;float:left}.maplibregl-ctrl-top-right .maplibregl-ctrl{margin:10px 10px 0 0;float:right}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin:0 0 10px 10px;float:left}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{margin:0 10px 10px 0;float:right}.maplibregl-ctrl-group{border-radius:4px;background:#fff}.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{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@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}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23aaa%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23999%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23666%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;color:#000;border-radius:12px;box-sizing:content-box}.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{padding:2px 8px 2px 28px;border-radius:12px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.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:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;right:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;left: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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%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);font-size:10px;white-space:nowrap;border-color:#333;border-style:none solid solid;border-width:medium 2px 2px;padding:0 5px;color:#333;box-sizing:border-box}.maplibregl-popup{position:absolute;top:0;left:0;display:flex;will-change:transform;pointer-events:none}.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{width:0;height:0;border:10px solid transparent;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.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-right:none;border-left-color:#fff}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto}.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{position:absolute;top:0;left:0;will-change:transform;transition:opacity .2s}.maplibregl-marker-draggable{cursor:grab}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.maplibregl-user-location-dot:before{content:"";position:absolute;animation:maplibregl-user-location-dot-pulse 2s infinite}.maplibregl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box;box-shadow:0 0 3px rgba(0,0,0,.35)}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;width:1px;height:1px;border-radius:100%}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}.maplibregl-cooperative-gesture-screen{background:rgba(0,0,0,.4);position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:#fff;padding:1rem;font-size:1.4em;line-height:1.2;opacity:0;pointer-events:none;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),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{position:fixed!important;width:100%!important;height:100%!important;top:0!important;left:0!important;z-index:99999}',document.head.appendChild(e)}})()}}),li=ye({"src/registry.js"(e){"use strict";var r=c0(),t=vA(),a=DD(),i=Gx().addStyleRule,o=Xi(),s=Oo(),l=dy(),n=o.extendFlat,u=o.extendDeepAll;e.modules={},e.allCategories={},e.allTypes=[],e.subplotsRegistry={},e.componentsRegistry={},e.layoutArrayContainers=[],e.layoutArrayRegexes=[],e.traceLayoutAttributes={},e.localeRegistry={},e.apiMethodRegistry={},e.collectableSubplotTypes=null,e.register=function(v){if(e.collectableSubplotTypes=null,v)v&&!Array.isArray(v)&&(v=[v]);else throw new Error("No argument passed to Plotly.register.");for(var x=0;x=v&&P<=x?P:s}if(typeof P!="string"&&typeof P!="number")return s;P=String(P);var O=y(z),G=P.charAt(0);O&&(G==="G"||G==="g")&&(P=P.slice(1),z="");var $=O&&z.slice(0,7)==="chinese",X=P.match($?g:p);if(!X)return s;var Z=X[1],J=X[3]||"1",N=Number(X[5]||1),H=Number(X[7]||0),W=Number(X[9]||0),U=Number(X[11]||0);if(O){if(Z.length===2)return s;Z=Number(Z);var V;try{var j=h.getComponentMethod("calendars","getCal")(z);if($){var q=J.charAt(J.length-1)==="i";J=parseInt(J,10),V=j.newDate(Z,j.toMonthIndex(Z,J,q),N)}else V=j.newDate(Z,Number(J),N)}catch{return s}return V?(V.toJD()-f)*l+H*n+W*u+U*c:s}Z.length===2?Z=(Number(Z)+2e3-m)%100+m:Z=Number(Z),J-=1;var Y=new Date(Date.UTC(2e3,J,N,H,W));return Y.setUTCFullYear(Z),Y.getUTCMonth()!==J||Y.getUTCDate()!==N?s:Y.getTime()+U*c},v=e.MIN_MS=e.dateTime2ms("-9999"),x=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(P,z){return e.dateTime2ms(P,z)!==s};function E(P,z){return String(P+Math.pow(10,z)).slice(1)}var M=90*l,C=3*n,w=5*u;e.ms2DateTime=function(P,z,I){if(typeof P!="number"||!(P>=v&&P<=x))return s;z||(z=0);var L=Math.floor(i(P+.05,1)*10),B=Math.round(P-L/10),O,G,$,X,Z,J;if(y(I)){var N=Math.floor(B/l)+f,H=Math.floor(i(P,l));try{O=h.getComponentMethod("calendars","getCal")(I).fromJD(N).formatDate("yyyy-mm-dd")}catch{O=d("G%Y-%m-%d")(new Date(B))}if(O.charAt(0)==="-")for(;O.length<11;)O="-0"+O.slice(1);else for(;O.length<10;)O="0"+O;G=z=v+l&&P<=x-l))return s;var z=Math.floor(i(P+.05,1)*10),I=new Date(Math.round(P-z/10)),L=r("%Y-%m-%d")(I),B=I.getHours(),O=I.getMinutes(),G=I.getSeconds(),$=I.getUTCMilliseconds()*10+z;return k(L,B,O,G,$)};function k(P,z,I,L,B){if((z||I||L||B)&&(P+=" "+E(z,2)+":"+E(I,2),(L||B)&&(P+=":"+E(L,2),B))){for(var O=4;B%10===0;)O-=1,B/=10;P+="."+E(B,O)}return P}e.cleanDate=function(P,z,I){if(P===s)return z;if(e.isJSDate(P)||typeof P=="number"&&isFinite(P)){if(y(I))return a.error("JS Dates and milliseconds are incompatible with world calendars",P),z;if(P=e.ms2DateTimeLocal(+P),!P&&z!==void 0)return z}else if(!e.isDateTime(P,I))return a.error("unrecognized date",P),z;return P};var T=/%\d?f/g,b=/%h/g,S={1:"1",2:"1",3:"2",4:"2"};function A(P,z,I,L){P=P.replace(T,function(O){var G=Math.min(+O.charAt(1)||6,6),$=(z/1e3%1+2).toFixed(G).slice(2).replace(/0+$/,"")||"0";return $});var B=new Date(Math.floor(z+.05));if(P=P.replace(b,function(){return S[I("%q")(B)]}),y(L))try{P=h.getComponentMethod("calendars","worldCalFmt")(P,z,L)}catch{return"Invalid"}return I(P)(B)}var F=[59,59.9,59.99,59.999,59.9999];function D(P,z){var I=i(P+.05,l),L=E(Math.floor(I/n),2)+":"+E(i(Math.floor(I/u),60),2);if(z!=="M"){t(z)||(z=0);var B=Math.min(i(P/c,60),F[z]),O=(100+B).toFixed(z).slice(1);z>0&&(O=O.replace(/0+$/,"").replace(/[\.]$/,"")),L+=":"+O}return L}e.formatDate=function(P,z,I,L,B,O){if(B=y(B)&&B,!z)if(I==="y")z=O.year;else if(I==="m")z=O.month;else if(I==="d")z=O.dayMonth+` -`+O.year;else return D(P,I)+` -`+A(O.dayMonthYear,P,L,B);return A(z,P,L,B)};var R=3*l;e.incrementMonth=function(P,z,I){I=y(I)&&I;var L=i(P,l);if(P=Math.round(P-L),I)try{var B=Math.round(P/l)+f,O=h.getComponentMethod("calendars","getCal")(I),G=O.fromJD(B);return z%12?O.add(G,z,"m"):O.add(G,z/12,"y"),(G.toJD()-f)*l+L}catch{a.error("invalid ms "+P+" in calendar "+I)}var $=new Date(P+R);return $.setUTCMonth($.getUTCMonth()+z)+L-R},e.findExactDates=function(P,z){for(var I=0,L=0,B=0,O=0,G,$,X=y(z)&&h.getComponentMethod("calendars","getCal")(z),Z=0;Z1?(f[p-1]-f[0])/(p-1):1,y,_;for(m>=0?_=h?s:l:_=h?u:n,c+=m*o*(h?-1:1)*(m>=0?1:-1);d90&&t.log("Long binary search..."),d-1};function s(c,f){return cf}function u(c,f){return c>=f}e.sorterAsc=function(c,f){return c-f},e.sorterDes=function(c,f){return f-c},e.distinctVals=function(c){var f=c.slice();f.sort(e.sorterAsc);var h;for(h=f.length-1;h>-1&&f[h]===i;h--);for(var d=f[h]-f[0]||1,p=d/(h||1)/1e4,g=[],m,y=0;y<=h;y++){var _=f[y],v=_-m;m===void 0?(g.push(_),m=_):v>p&&(d=Math.min(d,v),g.push(_),m=_)}return{vals:g,minDiff:d}},e.roundUp=function(c,f,h){for(var d=0,p=f.length-1,g,m=0,y=h?0:1,_=h?1:0,v=h?Math.ceil:Math.floor;d0&&(d=1),h&&d)return c.sort(f)}return d?c:c.reverse()},e.findIndexOfMin=function(c,f){f=f||a;for(var h=1/0,d,p=0;pID});function Tee(e){return Object.keys(e).sort()}var ID,Em=Si({"src/lib/sort_object_keys.ts"(){"use strict";ID=Tee}}),Mee=ye({"src/lib/stats.js"(e){"use strict";var r=en(),t=yc().isArrayOrTypedArray;e.aggNums=function(a,i,o,s){var l,n;if((!s||s>o.length)&&(s=o.length),r(i)||(i=!1),t(o[0])){for(n=new Array(s),l=0;la.length-1)return a[a.length-1];var o=i%1;return o*a[Math.ceil(i)]+(1-o)*a[Math.floor(i)]}}}),Eee=ye({"src/lib/angles.js"(e,r){"use strict";var t=(cy(),On(Am)),a=t.mod,i=t.modHalf,o=Math.PI,s=2*o;function l(_){return _/180*o}function n(_){return _/o*180}function u(_){return Math.abs(_[1]-_[0])>s-1e-14}function c(_,v){return i(v-_,s)}function f(_,v){return Math.abs(c(_,v))}function h(_,v){if(u(v))return!0;var x,E;v[0]E&&(E+=s);var M=a(_,s),C=M+s;return M>=x&&M<=E||C>=x&&C<=E}function d(_,v,x,E){if(!h(v,E))return!1;var M,C;return x[0]=M&&_<=C}function p(_,v,x,E,M,C,w){M=M||0,C=C||0;var k=u([x,E]),T,b,S,A,F;k?(T=0,b=o,S=s):x1/3&&t.x<2/3},e.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3},e.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3},e.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}}}),kee=ye({"src/lib/geometry2d.js"(e){"use strict";var r=(cy(),On(Am)).mod;e.segmentsIntersect=t;function t(l,n,u,c,f,h,d,p){var g=u-l,m=f-l,y=d-f,_=c-n,v=h-n,x=p-h,E=g*x-y*_;if(E===0)return null;var M=(m*x-y*v)/E,C=(m*_-g*v)/E;return C<0||C>1||M<0||M>1?null:{x:l+g*M,y:n+_*M}}e.segmentDistance=function(n,u,c,f,h,d,p,g){if(t(n,u,c,f,h,d,p,g))return 0;var m=c-n,y=f-u,_=p-h,v=g-d,x=m*m+y*y,E=_*_+v*v,M=Math.min(a(m,y,x,h-n,d-u),a(m,y,x,p-n,g-u),a(_,v,E,n-h,u-d),a(_,v,E,c-h,f-d));return Math.sqrt(M)};function a(l,n,u,c,f){var h=c*l+f*n;if(h<0)return c*c+f*f;if(h>u){var d=c-l,p=f-n;return d*d+p*p}else{var g=c*n-f*l;return g*g/u}}var i,o,s;e.getTextLocation=function(n,u,c,f){if((n!==o||f!==s)&&(i={},o=n,s=f),i[c])return i[c];var h=n.getPointAtLength(r(c-f/2,u)),d=n.getPointAtLength(r(c+f/2,u)),p=Math.atan((d.y-h.y)/(d.x-h.x)),g=n.getPointAtLength(r(c,u)),m=(g.x*4+h.x+d.x)/6,y=(g.y*4+h.y+d.y)/6,_={x:m,y,theta:p};return i[c]=_,_},e.clearLocationCache=function(){o=null},e.getVisibleSegment=function(n,u,c){var f=u.left,h=u.right,d=u.top,p=u.bottom,g=0,m=n.getTotalLength(),y=m,_,v;function x(M){var C=n.getPointAtLength(M);M===0?_=C:M===m&&(v=C);var w=C.xh?C.x-h:0,k=C.yp?C.y-p:0;return Math.sqrt(w*w+k*k)}for(var E=x(g);E;){if(g+=E+c,g>y)return;E=x(g)}for(E=x(y);E;){if(y-=E+c,g>y)return;E=x(y)}return{min:g,max:y,len:y-g,total:m,isClosed:g===0&&y===m&&Math.abs(_.x-v.x)<.1&&Math.abs(_.y-v.y)<.1}},e.findPointOnPath=function(n,u,c,f){f=f||{};for(var h=f.pathLength||n.getTotalLength(),d=f.tolerance||.001,p=f.iterationLimit||30,g=n.getPointAtLength(0)[c]>n.getPointAtLength(h)[c]?-1:1,m=0,y=0,_=h,v,x,E;m0?_=v:y=v,m++}return x}}}),xA=ye({"src/lib/throttle.js"(e){"use strict";var r={};e.throttle=function(i,o,s){var l=r[i],n=Date.now();if(!l){for(var u in r)r[u].tsl.ts+o){c();return}l.timer=setTimeout(function(){c(),l.timer=null},o)},e.done=function(a){var i=r[a];return!i||!i.timer?Promise.resolve():new Promise(function(o){var s=i.onDone;i.onDone=function(){s&&s(),o(),i.onDone=null}})},e.clear=function(a){if(a)t(r[a]),delete r[a];else for(var i in r)e.clear(i)};function t(a){a&&a.timer!==null&&(clearTimeout(a.timer),a.timer=null)}}}),Cee=ye({"src/lib/clear_responsive.js"(e,r){"use strict";r.exports=function(a){a._responsiveChartHandler&&(window.removeEventListener("resize",a._responsiveChartHandler),delete a._responsiveChartHandler)}}}),Dee=ye({"node_modules/is-mobile/index.js"(e,r){"use strict";r.exports=o,r.exports.isMobile=o,r.exports.default=o;var t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,a=/CrOS/,i=/android|ipad|playbook|silk/i;function o(s){s||(s={});let l=s.ua;if(!l&&typeof navigator<"u"&&(l=navigator.userAgent),l&&l.headers&&typeof l.headers["user-agent"]=="string"&&(l=l.headers["user-agent"]),typeof l!="string")return!1;let n=t.test(l)&&!a.test(l)||!!s.tablet&&i.test(l);return!n&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&l.indexOf("Macintosh")!==-1&&l.indexOf("Safari")!==-1&&(n=!0),n}}}),Lee=ye({"src/lib/preserve_drawing_buffer.js"(e,r){"use strict";var t=en(),a=Dee();r.exports=function(s){var l;if(s&&s.hasOwnProperty("userAgent")?l=s.userAgent:l=i(),typeof l!="string")return!0;var n=a({ua:{headers:{"user-agent":l}},tablet:!0,featureDetect:!1});if(!n)for(var u=l.split(" "),c=1;c-1;h--){var d=u[h];if(d.slice(0,8)==="Version/"){var p=d.slice(8).split(".")[0];if(t(p)&&(p=+p),p>=13)return!0}}}return n};function i(){var o;return typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),o}}}),Fee=ye({"src/lib/make_trace_groups.js"(e,r){"use strict";var t=ai();r.exports=function(i,o,s){var l=i.selectAll("g."+s.replace(/\s/g,".")).data(o,function(u){return u[0].trace.uid});l.exit().remove(),l.enter().append("g").attr("class",s),l.order();var n=i.classed("rangeplot")?"nodeRangePlot3":"node3";return l.each(function(u){u[0][n]=t.select(this)}),l}}}),Pee=ye({"src/lib/localize.js"(e,r){"use strict";var t=li();r.exports=function(i,o){for(var s=i._context.locale,l=0;l<2;l++){for(var n=i._context.locales,u=0;u<2;u++){var c=(n[s]||{}).dictionary;if(c){var f=c[o];if(f)return f}n=t.localeRegistry}var h=s.split("-")[0];if(h===s)break;s=h}return o}}}),RD=ye({"src/lib/filter_unique.js"(e,r){"use strict";r.exports=function(a){for(var i={},o=[],s=0,l=0;l1?(o*a+o*i)/o:a+i,l=String(s).length;if(l>16){var n=String(i).length,u=String(a).length;if(l>=u+n){var c=parseFloat(s).toPrecision(12);c.indexOf("e+")===-1&&(s=+c)}}return s}}}),zD={};rl(zD,{default:()=>jD});function zee(e){return typeof e=="string"&&(e=e.replace(ND,"")),(0,BD.default)(e)?Number(e):OD.BADNUM}var BD,OD,ND,jD,Bee=Si({"src/lib/clean_number.ts"(){"use strict";BD=Vs(en()),OD=Vs(Vn()),ND=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,jD=zee}}),Oee=ye({"src/lib/slugify.js"(e,r){"use strict";var t=/<[^>]*>/g,a=/[\p{S}\p{P}]/gu,i=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,o=/�/g,s=/\s+/g,l="-",n=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),u=new RegExp(n+"{3,}","g"),c=new RegExp(n+"$","g"),f=60;function h(d){return typeof d.toWellFormed=="function"?d.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(d))}r.exports=function(p,g=f){var m=h(p??"").replace(o,"").replace(t," ").replace(a,y=>y===l?y:"").toLowerCase().trim().replace(s,l).replace(i,"").replace(u,l);return m.length<=g?m:Array.from(m).slice(0,g).join("").replace(c,"")}}}),Yt=ye({"src/lib/index.js"(e,r){"use strict";var t=ai(),a=uy().utcFormat,i=SD().format,o=en(),s=Vn(),l=s.FP_SAFE,n=-l,u=s.BADNUM,c=r.exports={};c.adjustFormat=function(j){if(!j||/^\d[.]\df/.test(j)||/[.]\d%/.test(j))return j;if(j==="0.f")return"~f";if(/^\d%/.test(j))return"~%";if(/^\ds/.test(j))return"~s";var q=(j.match(/^[+\-( ]?/)||[""])[0],Y=j.slice(q.length);return!/^[~,.0$#]/.test(Y)&&/[&fps]/.test(Y)?q+"~"+Y:j};var f={};c.warnBadFormat=function(V){var j=String(V);f[j]||(f[j]=1,c.warn('encountered bad format: "'+j+'"'))},c.noFormat=function(V){return String(V)},c.numberFormat=function(V){var j;try{j=i(c.adjustFormat(V))}catch{return c.warnBadFormat(V),c.noFormat}return j},c.nestedProperty=Ux(),c.keyedContainer=OQ(),c.relativeAttr=NQ(),c.isPlainObject=yv(),c.toLogRange=pA(),c.relinkPrivateKeys=jQ();var h=yc();c.isArrayBuffer=h.isArrayBuffer,c.isTypedArray=h.isTypedArray,c.isArrayOrTypedArray=h.isArrayOrTypedArray,c.isArray1D=h.isArray1D,c.ensureArray=h.ensureArray,c.concat=h.concat,c.maxRowLength=h.maxRowLength,c.minRowLength=h.minRowLength;var d=(cy(),On(Am));c.mod=d.mod,c.modHalf=d.modHalf;var p=HQ();c.valObjectMeta=p.valObjectMeta,c.coerce=p.coerce,c.coerce2=p.coerce2,c.coerceFont=p.coerceFont,c.coercePattern=p.coercePattern,c.coerceHoverinfo=p.coerceHoverinfo,c.coerceSelectionMarkerOpacity=p.coerceSelectionMarkerOpacity,c.validate=p.validate;var g=Aee();c.dateTime2ms=g.dateTime2ms,c.isDateTime=g.isDateTime,c.ms2DateTime=g.ms2DateTime,c.ms2DateTimeLocal=g.ms2DateTimeLocal,c.cleanDate=g.cleanDate,c.isJSDate=g.isJSDate,c.formatDate=g.formatDate,c.incrementMonth=g.incrementMonth,c.dateTick0=g.dateTick0,c.dfltRange=g.dfltRange,c.findExactDates=g.findExactDates,c.MIN_MS=g.MIN_MS,c.MAX_MS=g.MAX_MS;var m=_A();c.findBin=m.findBin,c.sorterAsc=m.sorterAsc,c.sorterDes=m.sorterDes,c.distinctVals=m.distinctVals,c.roundUp=m.roundUp,c.sort=m.sort,c.findIndexOfMin=m.findIndexOfMin,c.sortObjectKeys=(Em(),On(bv)).default;var y=Mee();c.aggNums=y.aggNums,c.len=y.len,c.mean=y.mean,c.geometricMean=y.geometricMean,c.median=y.median,c.midRange=y.midRange,c.variance=y.variance,c.stdev=y.stdev,c.interp=y.interp;var _=mA();c.init2dArray=_.init2dArray,c.transposeRagged=_.transposeRagged,c.dot=_.dot,c.translationMatrix=_.translationMatrix,c.rotationMatrix=_.rotationMatrix,c.rotationXYMatrix=_.rotationXYMatrix,c.apply3DTransform=_.apply3DTransform,c.apply2DTransform=_.apply2DTransform,c.apply2DTransform2=_.apply2DTransform2,c.convertCssMatrix=_.convertCssMatrix,c.inverseTransformMatrix=_.inverseTransformMatrix;var v=Eee();c.deg2rad=v.deg2rad,c.rad2deg=v.rad2deg,c.angleDelta=v.angleDelta,c.angleDist=v.angleDist,c.isFullCircle=v.isFullCircle,c.isAngleInsideSector=v.isAngleInsideSector,c.isPtInsideSector=v.isPtInsideSector,c.pathArc=v.pathArc,c.pathSector=v.pathSector,c.pathAnnulus=v.pathAnnulus;var x=See();c.isLeftAnchor=x.isLeftAnchor,c.isCenterAnchor=x.isCenterAnchor,c.isRightAnchor=x.isRightAnchor,c.isTopAnchor=x.isTopAnchor,c.isMiddleAnchor=x.isMiddleAnchor,c.isBottomAnchor=x.isBottomAnchor;var E=kee();c.segmentsIntersect=E.segmentsIntersect,c.segmentDistance=E.segmentDistance,c.getTextLocation=E.getTextLocation,c.clearLocationCache=E.clearLocationCache,c.getVisibleSegment=E.getVisibleSegment,c.findPointOnPath=E.findPointOnPath;var M=Xi();c.extendFlat=M.extendFlat,c.extendDeep=M.extendDeep,c.extendDeepAll=M.extendDeepAll,c.extendDeepNoArrays=M.extendDeepNoArrays;var C=c0();c.log=C.log,c.warn=C.warn,c.error=C.error;var w=(hy(),On(Mm));c.counterRegex=w.counter;var k=xA();c.throttle=k.throttle,c.throttleDone=k.done,c.clearThrottle=k.clear;var T=Gx();c.getGraphDiv=T.getGraphDiv,c.isPlotDiv=T.isPlotDiv,c.removeElement=T.removeElement,c.addStyleRule=T.addStyleRule,c.addRelatedStyleRule=T.addRelatedStyleRule,c.deleteRelatedStyleRule=T.deleteRelatedStyleRule,c.setStyleOnHover=T.setStyleOnHover,c.getFullTransformMatrix=T.getFullTransformMatrix,c.getElementTransformMatrix=T.getElementTransformMatrix,c.getElementAndAncestors=T.getElementAndAncestors,c.equalDomRects=T.equalDomRects,c.clearResponsive=Cee(),c.preserveDrawingBuffer=Lee(),c.makeTraceGroups=Fee(),c._=Pee(),c.notifier=CD(),c.filterUnique=RD(),c.filterVisible=Iee(),c.pushUnique=DD(),c.increment=Ree(),c.cleanNumber=(Bee(),On(zD)).default,c.slugify=Oee(),c.ensureNumber=function(j){return o(j)?(j=Number(j),j>l||j=j?!1:o(V)&&V>=0&&V%1===0},c.noop=vA(),c.identity=Wx(),c.repeat=function(V,j){for(var q=new Array(j),Y=0;Yq?Math.max(q,Math.min(j,V)):Math.max(j,Math.min(q,V))},c.bBoxIntersect=function(V,j,q){return q=q||0,V.left<=j.right+q&&j.left<=V.right+q&&V.top<=j.bottom+q&&j.top<=V.bottom+q},c.simpleMap=function(V,j,q,Y,K){for(var re=V.length,se=new Array(re),le=0;le=Math.pow(2,q)?K>10?(c.warn("randstr failed uniqueness"),se):V(j,q,Y,(K||0)+1):se},c.OptionControl=function(V,j){V||(V={}),j||(j="opt");var q={};return q.optionList=[],q._newoption=function(Y){Y[j]=V,q[Y.name]=Y,q.optionList.push(Y)},q["_"+j]=V,q},c.smooth=function(V,j){if(j=Math.round(j)||0,j<2)return V;var q=V.length,Y=2*q,K=2*j-1,re=new Array(K),se=new Array(q),le,ue,fe,pe;for(le=0;le=Y&&(fe-=Y*Math.floor(fe/Y)),fe<0?fe=-1-fe:fe>=q&&(fe=Y-1-fe),pe+=V[fe]*re[ue];se[le]=pe}return se},c.syncOrAsync=function(V,j,q){var Y,K;function re(){return c.syncOrAsync(V,j,q)}for(;V.length;)if(K=V.splice(0,1)[0],Y=K(j),Y&&Y.then)return Y.then(re);return q&&q(j)},c.stripTrailingSlash=function(V){return V.slice(-1)==="/"?V.slice(0,-1):V},c.noneOrAll=function(V,j,q){if(V){var Y=!1,K=!0,re,se;for(re=0;re0?K:0})},c.fillArray=function(V,j,q,Y){if(Y=Y||c.identity,c.isArrayOrTypedArray(V))for(var K=0;KF.test(window.navigator.userAgent);var D=/Firefox\/(\d+)\.\d+/;c.getFirefoxVersion=function(){var V=D.exec(window.navigator.userAgent);if(V&&V.length===2){var j=parseInt(V[1]);if(!isNaN(j))return j}return null},c.isD3Selection=function(V){return V instanceof t.selection},c.ensureSingle=function(V,j,q,Y){var K=V.select(j+(q?"."+q:""));if(K.size())return K;var re=V.append(j);return q&&re.classed(q,!0),Y&&re.call(Y),re},c.ensureSingleById=function(V,j,q,Y){var K=V.select(j+"#"+q);if(K.size())return K;var re=V.append(j).attr("id",q);return Y&&re.call(Y),re},c.objectFromPath=function(V,j){for(var q=V.split("."),Y,K=Y={},re=0;re1?K+se[1]:"";if(re&&(se.length>1||le.length>4||q))for(;Y.test(le);)le=le.replace(Y,"$1"+re+"$2");return le+ue},c.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var I=/^\w*$/;c.templateString=function(V,j){var q={};return V.replace(c.TEMPLATE_STRING_REGEX,function(Y,K){var re;return I.test(K)?re=j[K]:(q[K]=q[K]||c.nestedProperty(j,K).get,re=q[K](!0)),re!==void 0?re:""})};var L={max:10,count:0,name:"hovertemplate"};c.hovertemplateString=V=>Z(Ci(ja({},V),{opts:L}));var B={max:10,count:0,name:"texttemplate"};c.texttemplateString=V=>Z(Ci(ja({},V),{opts:B}));var O=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function G(V){var j=V.match(O);return j?{key:j[1],op:j[2],number:Number(j[3])}:{key:V,op:null,number:null}}var $={max:10,count:0,name:"texttemplate",parseMultDiv:!0};c.texttemplateStringForShapes=V=>Z(Ci(ja({},V),{opts:$}));var X=/^[:|\|]/;function Z({data:V=[],locale:j,fallback:q,labels:Y={},opts:K,template:re}){return re.replace(c.TEMPLATE_STRING_REGEX,(se,le,ue)=>{let fe=["xother","yother"].includes(le),pe=["_xother","_yother"].includes(le),we=["_xother_","_yother_"].includes(le),xe=["xother_","yother_"].includes(le),he=fe||pe||xe||we;(pe||we)&&(le=le.substring(1)),(xe||we)&&(le=le.substring(0,le.length-1));let oe=null,te=null;if(K.parseMultDiv){var ie=G(le);le=ie.key,oe=ie.op,te=ie.number}let ee;if(he){if(Y[le]===void 0)return"";ee=Y[le]}else for(let Me of V)if(Me){if(Me.hasOwnProperty(le)){ee=Me[le];break}if(I.test(le)||(ee=c.nestedProperty(Me,le).get(!0)),ee!==void 0)break}if(ee===void 0){let{count:Me,max:Ue,name:Ge}=K,Ze=q===!1?se:q;return Me=J&&se<=N,fe=le>=J&&le<=N;if(ue&&(Y=10*Y+se-J),fe&&(K=10*K+le-J),!ue||!fe){if(Y!==K)return Y-K;if(se!==le)return se-le}}return K-Y};var H=2e9;c.seedPseudoRandom=function(){H=2e9},c.pseudoRandom=function(){var V=H;return H=(69069*H+1)%4294967296,Math.abs(H-V)<429496729?c.pseudoRandom():H/4294967296},c.fillText=function(V,j,q){var Y=Array.isArray(q)?function(se){q.push(se)}:function(se){q.text=se},K=c.extractOption(V,j,"htx","hovertext");if(c.isValidTextValue(K))return Y(K);var re=c.extractOption(V,j,"tx","text");if(c.isValidTextValue(re))return Y(re)},c.isValidTextValue=function(V){return V||V===0},c.formatPercent=function(V,j){j=j||0;for(var q=(Math.round(100*V*Math.pow(10,j))*Math.pow(.1,j)).toFixed(j)+"%",Y=0;Y1&&(fe=1):fe=0,c.strTranslate(K-fe*(q+se),re-fe*(Y+le))+c.strScale(fe)+(ue?"rotate("+ue+(j?"":" "+q+" "+Y)+")":"")},c.setTransormAndDisplay=function(V,j){V.attr("transform",c.getTextTransform(j)),V.style("display",j.scale?null:"none")},c.ensureUniformFontSize=function(V,j){var q=c.extendFlat({},j);return q.size=Math.max(j.size,V._fullLayout.uniformtext.minsize||0),q},c.join2=function(V,j,q){var Y=V.length;return Y>1?V.slice(0,-1).join(j)+q+V[Y-1]:V.join(j)},c.bigFont=function(V){return Math.round(1.2*V)};var W=c.getFirefoxVersion(),U=W!==null&&W<86;c.getPositionFromD3Event=function(){return U?[t.event.layerX,t.event.layerY]:[t.event.offsetX,t.event.offsetY]}}}),Nee=ye({"build/plotcss.js"(){"use strict";var e=Yt(),r={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(a in r)t=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),e.addStyleRule(t,r[a]);var t,a}}),UD=ye({"node_modules/is-browser/client.js"(e,r){r.exports=!0}}),qD=ye({"node_modules/has-hover/index.js"(e,r){"use strict";var t=UD(),a;typeof window.matchMedia=="function"?a=!window.matchMedia("(hover: none)").matches:a=t,r.exports=a}}),Sm=ye({"node_modules/events/events.js"(e,r){"use strict";var t=typeof Reflect=="object"?Reflect:null,a=t&&typeof t.apply=="function"?t.apply:function(C,w,k){return Function.prototype.apply.call(C,w,k)},i;t&&typeof t.ownKeys=="function"?i=t.ownKeys:Object.getOwnPropertySymbols?i=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:i=function(C){return Object.getOwnPropertyNames(C)};function o(M){console&&console.warn&&console.warn(M)}var s=Number.isNaN||function(C){return C!==C};function l(){l.init.call(this)}r.exports=l,r.exports.once=v,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var n=10;function u(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(M){if(typeof M!="number"||M<0||s(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");n=M}}),l.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},l.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||s(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function c(M){return M._maxListeners===void 0?l.defaultMaxListeners:M._maxListeners}l.prototype.getMaxListeners=function(){return c(this)},l.prototype.emit=function(C){for(var w=[],k=1;k0&&(S=w[0]),S instanceof Error)throw S;var A=new Error("Unhandled error."+(S?" ("+S.message+")":""));throw A.context=S,A}var F=b[C];if(F===void 0)return!1;if(typeof F=="function")a(F,this,w);else for(var D=F.length,R=m(F,D),k=0;k0&&S.length>T&&!S.warned){S.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+S.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=M,A.type=C,A.count=S.length,o(A)}return M}l.prototype.addListener=function(C,w){return f(this,C,w,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(C,w){return f(this,C,w,!0)};function h(){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 d(M,C,w){var k={fired:!1,wrapFn:void 0,target:M,type:C,listener:w},T=h.bind(k);return T.listener=w,k.wrapFn=T,T}l.prototype.once=function(C,w){return u(w),this.on(C,d(this,C,w)),this},l.prototype.prependOnceListener=function(C,w){return u(w),this.prependListener(C,d(this,C,w)),this},l.prototype.removeListener=function(C,w){var k,T,b,S,A;if(u(w),T=this._events,T===void 0)return this;if(k=T[C],k===void 0)return this;if(k===w||k.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete T[C],T.removeListener&&this.emit("removeListener",C,k.listener||w));else if(typeof k!="function"){for(b=-1,S=k.length-1;S>=0;S--)if(k[S]===w||k[S].listener===w){A=k[S].listener,b=S;break}if(b<0)return this;b===0?k.shift():y(k,b),k.length===1&&(T[C]=k[0]),T.removeListener!==void 0&&this.emit("removeListener",C,A||w)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(C){var w,k,T;if(k=this._events,k===void 0)return this;if(k.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):k[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete k[C]),this;if(arguments.length===0){var b=Object.keys(k),S;for(T=0;T=0;T--)this.removeListener(C,w[T]);return this};function p(M,C,w){var k=M._events;if(k===void 0)return[];var T=k[C];return T===void 0?[]:typeof T=="function"?w?[T.listener||T]:[T]:w?_(T):m(T,T.length)}l.prototype.listeners=function(C){return p(this,C,!0)},l.prototype.rawListeners=function(C){return p(this,C,!1)},l.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):g.call(M,C)},l.prototype.listenerCount=g;function g(M){var C=this._events;if(C!==void 0){var w=C[M];if(typeof w=="function")return 1;if(w!==void 0)return w.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function m(M,C){for(var w=new Array(C),k=0;k{},{passive:!0}),i},triggerHandler:function(i,o,s){var l,n=i._ev;if(!n)return;var u=n._events[o];if(!u)return;function c(h){if(h.listener){if(n.removeListener(o,h.listener),!h.fired)return h.fired=!0,h.listener.apply(n,[s])}else return h.apply(n,[s])}u=Array.isArray(u)?u:[u];var f;for(f=0;fa.queueLength&&(s.undoQueue.queue.shift(),s.undoQueue.index--)},o.startSequence=function(s){s.undoQueue=s.undoQueue||{index:0,queue:[],sequence:!1},s.undoQueue.sequence=!0,s.undoQueue.beginSequence=!0},o.stopSequence=function(s){s.undoQueue=s.undoQueue||{index:0,queue:[],sequence:!1},s.undoQueue.sequence=!1,s.undoQueue.beginSequence=!1},o.undo=function(l){var n,u;if(!(l.undoQueue===void 0||isNaN(l.undoQueue.index)||l.undoQueue.index<=0)){for(l.undoQueue.index--,n=l.undoQueue.queue[l.undoQueue.index],l.undoQueue.inSequence=!0,u=0;u=l.undoQueue.queue.length)){for(n=l.undoQueue.queue[l.undoQueue.index],l.undoQueue.inSequence=!0,u=0;u=L.length)return!1;if(D.dimensions===2){if(P++,R.length===P)return D;var B=R[P];if(!E(B))return!1;D=L[I][B]}else D=L[I]}else D=L}}return D}function E(D){return D===Math.round(D)&&D>=0}function M(D){var R,P;R=r.modules[D]._module,P=R.basePlotModule;var z={};z.type=null;var I=u({},a),L=u({},R.attributes);e.crawl(L,function(G,$,X,Z,J){h(I,J).set(void 0),G===void 0&&h(L,J).set(void 0)}),u(z,I),r.traceIs(D,"noOpacity")&&delete z.opacity,r.traceIs(D,"showLegend")||(delete z.showlegend,delete z.legendgroup),r.traceIs(D,"noHover")&&(delete z.hoverinfo,delete z.hoverlabel),R.selectPoints||delete z.selectedpoints,u(z,L),P.attributes&&u(z,P.attributes),z.type=D;var B={meta:R.meta||{},categories:R.categories||{},animatable:!!R.animatable,type:D,attributes:k(z)};if(R.layoutAttributes){var O={};u(O,R.layoutAttributes),B.layoutAttributes=k(O)}return R.animatable||e.crawl(B,function(G){e.isValObject(G)&&"anim"in G&&delete G.anim}),B}function C(){var D={},R,P;u(D,i);for(R in r.subplotsRegistry)if(P=r.subplotsRegistry[R],!!P.layoutAttributes)if(Array.isArray(P.attr))for(var z=0;z=c&&(u._input||{})._templateitemname;h&&(f=c);var d=n+"["+f+"]",p;function g(){p={},h&&(p[d]={},p[d][a]=h)}g();function m(x,E){p[x]=E}function y(x,E){h?r.nestedProperty(p[d],x).set(E):p[d+"."+x]=E}function _(){var x=p;return g(),x}function v(x,E){x&&y(x,E);var M=_();for(var C in M)r.nestedProperty(l,C).set(M[C])}return{modifyBase:m,modifyItem:y,getUpdateObj:_,applyUpdate:v}}}}),$l=ye({"src/plots/cartesian/constants.js"(e,r){"use strict";var t=(hy(),On(Mm)).counter;r.exports={idRegex:{x:t("x","( domain)?"),y:t("y","( domain)?")},attrRegex:t("[xy]axis"),xAxisMatch:t("xaxis"),yAxisMatch:t("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"}}}),Gs=ye({"src/plots/cartesian/axis_ids.js"(e){"use strict";var r=li(),t=$l();e.id2name=function(o){if(!(typeof o!="string"||!o.match(t.AX_ID_PATTERN))){var s=o.split(" ")[0].slice(1);return s==="1"&&(s=""),o.charAt(0)+"axis"+s}},e.name2id=function(o){if(o.match(t.AX_NAME_PATTERN)){var s=o.slice(5);return s==="1"&&(s=""),o.charAt(0)+s}},e.cleanId=function(o,s,l){var n=/( domain)$/.test(o);if(!(typeof o!="string"||!o.match(t.AX_ID_PATTERN))&&!(s&&o.charAt(0)!==s)&&!(n&&!l)){var u=o.split(" ")[0].slice(1).replace(/^0+/,"");return u==="1"&&(u=""),o.charAt(0)+u+(n&&l?" domain":"")}},e.list=function(i,o,s){var l=i._fullLayout;if(!l)return[];var n=e.listIds(i,o),u=new Array(n.length),c;for(c=0;cl?1:-1:+(i.slice(1)||1)-+(o.slice(1)||1)},e.ref2id=function(i){return/^[xyz]/.test(i)?i.split(" ")[0]:!1};function a(i,o){if(o&&o.length){for(var s=0;s0?".":"")+h;t.isPlainObject(d)?l(d,u,p,f+1):u(p,h,d)}})}}}),ws=ye({"src/plots/plots.js"(e,r){"use strict";var t=ai(),a=uy().timeFormatLocale,i=SD().formatLocale,o=en(),s=kD(),l=jx().version,n=li(),u=vy(),c=ko(),f=Yt(),h=Ya(),d=Vn().BADNUM,p=Gs(),g=wv().clearOutline,m=bA(),y=Hx(),_=VD(),v=_c().getModuleCalcData,x=f.relinkPrivateKeys,E=f._,M=r.exports={};f.extendFlat(M,n),M.attributes=Oo(),M.attributes.type.values=M.allTypes,M.fontAttrs=vs(),M.layoutAttributes=dy();var C=Uee();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(N){return N=f.getGraphDiv(N),new Promise(function(H){setTimeout(function(){N._fullLayout&&(n.getComponentMethod("annotations","draw")(N),n.getComponentMethod("legend","draw")(N),n.getComponentMethod("colorbar","draw")(N),H(M.previousPromises(N)))},300)})},M.resize=function(N){N=f.getGraphDiv(N);var H,W=new Promise(function(U,V){(!N||f.isHidden(N))&&V(new Error("Resize must be passed a displayed plot div element.")),N._redrawTimer&&clearTimeout(N._redrawTimer),N._resolveResize&&(H=N._resolveResize),N._resolveResize=U,N._redrawTimer=setTimeout(function(){if(!N.layout||N.layout.width&&N.layout.height||f.isHidden(N)){U(N);return}delete N.layout.width,delete N.layout.height;var j=N.changed;N.autoplay=!0,n.call("relayout",N,{autosize:!0}).then(function(){N.changed=j,N._resolveResize===U&&(delete N._resolveResize,U(N))})},100)});return H&&H(W),W},M.previousPromises=function(N){if((N._promises||[]).length)return Promise.all(N._promises).then(function(){N._promises=[]})},M.sendDataToCloud=function(N,H){N.emit("plotly_beforeexport");let W=new URL(H).origin;var U=M.graphJson(N,!1,"object");U.version=l;var V=new URL(H);V.searchParams.set("origin",window.location.origin);var j=window.open(V.href,"_blank");if(!j){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),N.emit("plotly_exportfail");return}var q=function(Y){Y.origin===W&&Y.data&&Y.data.type==="CHART_AUTH_SUCCESS"&&(j.postMessage({type:"chart",chart:U},W),window.removeEventListener("message",q),N.emit("plotly_afterexport"))};return window.addEventListener("message",q),!1};var w=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],k=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(N,H){var W=H&&H.skipUpdateCalc,U=N._fullLayout||{};if(U._skipDefaults){delete U._skipDefaults;return}var V=N._fullLayout={},j=N.layout||{},q=N._fullData||[],Y=N._fullData=[],K=N.data||[],re=N.calcdata||[],se=N._context||{},le;N._transitionData||M.createTransitionData(N),V._dfltTitle={plot:E(N,"Click to enter Plot title"),subtitle:E(N,"Click to enter Plot subtitle"),x:E(N,"Click to enter X axis title"),y:E(N,"Click to enter Y axis title"),colorbar:E(N,"Click to enter Colorscale title"),annotation:E(N,"new text")},V._traceWord=E(N,"trace");var ue=S(N,w);if(U._initialAutoSizeIsDone){var fe=U.width,pe=U.height;M.supplyLayoutGlobalDefaults(j,V,ue),j.width||(V.width=fe),j.height||(V.height=pe),M.sanitizeMargins(V)}else{M.supplyLayoutGlobalDefaults(j,V,ue);var we=!j.width||!j.height,xe=V.autosize,he=se.autosizable,oe=we&&(xe||he);oe?M.plotAutoSize(N,j,V):we&&M.sanitizeMargins(V),!xe&&we&&(j.width=V.width,j.height=V.height)}V._d3locale=A(ue,V.separators),V._extraFormat=S(N,k),V._initialAutoSizeIsDone=!0,V._dataLength=K.length,V._modules=[],V._visibleModules=[],V._basePlotModules=[];var te=V._subplots=b(),ie=V._splomAxes={x:{},y:{}},ee=V._splomSubplots={};V._splomGridDflt={},V._scatterStackOpts={},V._firstScatter={},V._alignmentOpts={},V._colorAxes={},V._requestRangeslider={},V._traceUids=T(q,K),M.supplyDataDefaults(K,Y,j,V);var ce=Object.keys(ie.x),_e=Object.keys(ie.y);if(ce.length>1&&_e.length>1){for(n.getComponentMethod("grid","sizeDefaults")(j,V),le=0;le15&&_e.length>15&&V.shapes.length===0&&V.images.length===0,M.linkSubplots(Y,V,q,U),M.cleanPlot(Y,V,q,U);var Ze=!!(U._has&&U._has("cartesian")),Ke=!!(V._has&&V._has("cartesian")),dt=Ze,_t=Ke;dt&&!_t?U._bgLayer.remove():_t&&!dt&&(V._shouldCreateBgLayer=!0),U._zoomlayer&&!N._dragging&&g({_fullLayout:U}),F(Y,V),x(V,U),n.getComponentMethod("colorscale","crossTraceDefaults")(Y,V),V._preGUI||(V._preGUI={}),V._tracePreGUI||(V._tracePreGUI={});var Pt=V._tracePreGUI,pt={},Tt;for(Tt in Pt)pt[Tt]="old";for(le=0;le0){var se=1-2*j;q=Math.round(se*q),Y=Math.round(se*Y)}}var le=M.layoutAttributes.width.min,ue=M.layoutAttributes.height.min;q1,pe=!W.height&&Math.abs(U.height-Y)>1;(pe||fe)&&(fe&&(U.width=q),pe&&(U.height=Y)),H._initialAutoSize||(H._initialAutoSize={width:q,height:Y}),M.sanitizeMargins(U)},M.supplyLayoutModuleDefaults=function(N,H,W,U){var V=n.componentsRegistry,j=H._basePlotModules,q,Y,K,re=n.subplotsRegistry.cartesian;for(q in V)K=V[q],K.includeBasePlot&&K.includeBasePlot(N,H);j.length||j.push(re),H._has("cartesian")&&(n.getComponentMethod("grid","contentDefaults")(N,H),re.finalizeSubplots(N,H));for(var se in H._subplots)H._subplots[se].sort(f.subplotSort);for(Y=0;Y1&&(W.l/=xe,W.r/=xe)}if(ue){var he=(W.t+W.b)/ue;he>1&&(W.t/=he,W.b/=he)}var oe=W.xl!==void 0?W.xl:W.x,te=W.xr!==void 0?W.xr:W.x,ie=W.yt!==void 0?W.yt:W.y,ee=W.yb!==void 0?W.yb:W.y;fe[H]={l:{val:oe,size:W.l+we},r:{val:te,size:W.r+we},b:{val:ee,size:W.b+we},t:{val:ie,size:W.t+we}},pe[H]=1}if(!U._replotting)return M.doAutoMargin(N)}};function L(N){if("_redrawFromAutoMarginCount"in N._fullLayout)return!1;var H=p.list(N,"",!0);for(var W in H)if(H[W].autoshift||H[W].shift)return!0;return!1}M.doAutoMargin=function(N){var H=N._fullLayout,W=H.width,U=H.height;H._size||(H._size={}),P(H);var V=H._size,j=H.margin,q={t:0,b:0,l:0,r:0},Y=f.extendFlat({},V),K=j.l,re=j.r,se=j.t,le=j.b,ue=H._pushmargin,fe=H._pushmarginIds,pe=H.minreducedwidth,we=H.minreducedheight;if(j.autoexpand!==!1){for(var xe in ue)fe[xe]||delete ue[xe];var he=N._fullLayout._reservedMargin;for(var oe in he)for(var te in he[oe]){var ie=he[oe][te];q[te]=Math.max(q[te],ie)}ue.base={l:{val:0,size:K},r:{val:1,size:re},t:{val:1,size:se},b:{val:0,size:le}};for(var ee in q){var ce=0;for(var _e in ue)_e!=="base"&&o(ue[_e][ee].size)&&(ce=ue[_e][ee].size>ce?ue[_e][ee].size:ce);var Se=Math.max(0,j[ee]-ce);q[ee]=Math.max(0,q[ee]-Se)}for(var Me in ue){var Ue=ue[Me].l||{},Ge=ue[Me].b||{},Ze=Ue.val,Ke=Ue.size,dt=Ge.val,_t=Ge.size,Pt=W-q.r-q.l,pt=U-q.t-q.b;for(var Tt in ue){if(o(Ke)&&ue[Tt].r){var st=ue[Tt].r.val,Ve=ue[Tt].r.size;if(st>Ze){var Ye=(Ke*st+(Ve-Pt)*Ze)/(st-Ze),me=(Ve*(1-Ze)+(Ke-Pt)*(1-st))/(st-Ze);Ye+me>K+re&&(K=Ye,re=me)}}if(o(_t)&&ue[Tt].t){var be=ue[Tt].t.val,Ee=ue[Tt].t.size;if(be>dt){var De=(_t*be+(Ee-pt)*dt)/(be-dt),Ce=(Ee*(1-dt)+(_t-pt)*(1-be))/(be-dt);De+Ce>le+se&&(le=De,se=Ce)}}}}}var Fe=f.constrain(W-j.l-j.r,z,pe),Je=f.constrain(U-j.t-j.b,I,we),qe=Math.max(0,W-Fe),at=Math.max(0,U-Je);if(qe){var tt=(K+re)/qe;tt>1&&(K/=tt,re/=tt)}if(at){var ct=(le+se)/at;ct>1&&(le/=ct,se/=ct)}if(V.l=Math.round(K)+q.l,V.r=Math.round(re)+q.r,V.t=Math.round(se)+q.t,V.b=Math.round(le)+q.b,V.p=Math.round(j.pad),V.w=Math.round(W)-V.l-V.r,V.h=Math.round(U)-V.t-V.b,!H._replotting&&(M.didMarginChange(Y,V)||L(N))){"_redrawFromAutoMarginCount"in H?H._redrawFromAutoMarginCount++:H._redrawFromAutoMarginCount=1;var At=3*(1+Object.keys(fe).length);if(H._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(N,H=!1,W="json",U=!1,V=!1){(U&&H&&!N._fullData||U&&!H&&!N._fullLayout)&&M.supplyDefaults(N);var j=U?N._fullData:N.data,q=U?N._fullLayout:N.layout,Y=(N._transitionData||{})._frames;function K(le,ue){if(typeof le=="function")return ue?"_function_":null;if(f.isPlainObject(le)){var fe={};return Object.keys(le).sort().forEach(function(he){if(["_","["].indexOf(he.charAt(0))===-1){if(typeof le[he]=="function"){ue&&(fe[he]="_function");return}fe[he]=K(le[he],ue)}}),fe}var pe=Array.isArray(le),we=f.isTypedArray(le);if((pe||we)&&le.dtype&&le.shape){var xe=le.bdata;return K({dtype:le.dtype,shape:le.shape,bdata:f.isArrayBuffer(xe)?s.encode(xe):xe},ue)}return pe?le.map(function(he){return K(he,ue)}):we?f.simpleMap(le,f.identity):f.isJSDate(le)?f.ms2DateTimeLocal(+le):le}var re={data:(j||[]).map(function(le){var ue=K(le);return H&&delete ue.fit,ue})};if(!H&&(re.layout=K(q),U)){var se=q._size;re.layout.computed={margin:{b:se.b,l:se.l,r:se.r,t:se.t}}}return Y&&(re.frames=K(Y)),V&&(re.config=K(N._context,!0)),W==="object"?re:JSON.stringify(re)},M.modifyFrames=function(N,H){var W,U,V,j=N._transitionData._frames,q=N._transitionData._frameHash;for(W=0;W0&&(N._transitioningWithDuration=!0),N._transitionData._interruptCallbacks.push(function(){U=!0}),W.redraw&&N._transitionData._interruptCallbacks.push(function(){return n.call("redraw",N)}),N._transitionData._interruptCallbacks.push(function(){N.emit("plotly_transitioninterrupted",[])});var ue=0,fe=0;function pe(){return ue++,function(){fe++,!U&&fe===ue&&Y(le)}}W.runFn(pe),setTimeout(pe())})}function Y(le){if(N._transitionData)return j(N._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(W.redraw)return n.call("redraw",N)}).then(function(){N._transitioning=!1,N._transitioningWithDuration=!1,N.emit("plotly_transitioned",[])}).then(le)}function K(){if(N._transitionData)return N._transitioning=!1,V(N._transitionData._interruptCallbacks)}var re=[M.previousPromises,K,W.prepareFn,M.rehover,M.reselect,q],se=f.syncOrAsync(re,N);return(!se||!se.then)&&(se=Promise.resolve()),se.then(function(){return N})}M.doCalcdata=function(N,H){var W=p.list(N),U=N._fullData,V=N._fullLayout,j,q,Y,K=new Array(U.length),re=(N.calcdata||[]).slice();for(N.calcdata=K,V._numBoxes=0,V._numViolins=0,V._violinScaleGroupStats={},N._hmpixcount=0,N._hmlumcount=0,V._piecolormap={},V._sunburstcolormap={},V._treemapcolormap={},V._iciclecolormap={},V._funnelareacolormap={},Y=0;Y$?$.match(s):null;e.matchTex=l,e.convertToTspans=function($,X,Z){var J=$.text(),N=!$.attr("data-notex")&&X&&X._context.typesetMath&&l(J);N&&!g()&&(N=null);var H=r.select($.node().parentNode);if(H.empty())return;var W=$.attr("class")?$.attr("class").split(" ")[0]:"text";W+="-math",H.selectAll("svg."+W).remove(),H.selectAll("g."+W+"-group").remove(),$.style("display",null).attr({"data-unformatted":J,"data-math":"N"});function U(){H.empty()||(W=$.attr("class")+"-math",H.select("svg."+W).remove()),$.text("").style("white-space","pre");var V=L($.node(),J);V&&$.style("pointer-events","all"),e.positionText($),Z&&Z.call($)}return N?(X&&X._promises||[]).push(new Promise(function(V){$.style("display","none");var j=parseInt($.node().style.fontSize,10),q={fontSize:j},Y=$.attr("text-anchor");m(N[2],q,function(K,re,se){H.selectAll("svg."+W).remove(),H.selectAll("g."+W+"-group").remove();var le=K&&K.select("svg");if(!le||!le.node()){U(),V();return}$.style("display","none");var ue=H.append("g").classed(W+"-group",!0).attr({"pointer-events":"none","data-unformatted":J,"data-math":"Y"});ue.node().appendChild(le.node()),re&&re.node()&&le.node().insertBefore(re.node().cloneNode(!0),le.node().firstChild);var fe=se.width,pe=se.height;le.attr({class:W,height:pe,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":q.fontSize+"px"});var we=$.node().style.fill||"black",xe=le.select("g");xe.attr({fill:we,stroke:we});var he=xe.node().getBoundingClientRect(),oe=he.width,te=he.height;(oe>fe||te>pe)&&(le.style("overflow","hidden"),he=le.node().getBoundingClientRect(),oe=he.width,te=he.height);var ie=+$.attr("x"),ee=+$.attr("y"),ce=j||$.node().getBoundingClientRect().height,_e=-ce/4;W[0]==="y"?ue.attr({transform:"rotate("+[-90,ie,ee]+")"+a(-oe/2,_e-te/2)}):W[0]==="l"?ee=_e-te/2:W[0]==="a"&&W.indexOf("atitle")!==0?(ie=0,ee=_e):(ie=ie-oe*(Y==="middle"?.5:Y==="end"?1:0),ee=ee+_e-te/2),le.attr({x:ie,y:ee}),Z&&Z.call($,ue),V(ue)})})):U(),$};var n=/(<|<|<)/g,u=/(>|>|>)/g;function c($){return $.replace(n,"\\lt ").replace(u,"\\gt ")}var f=null,h=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,d=!1,p=!1;function g(){let $=h();return $===3||$===4?!0:($===null?d||(d=!0,t.warn("MathJax is not loaded. Math equations will not be rendered.")):p||(p=!0,t.warn("Unsupported MathJax version:",MathJax.version)),!1)}function m($,X,Z){let J=h();var N;let H=function(){if(!f){let j=MathJax._.output.svg_ts.SVG,q=t.extendFlat({},MathJax.config.svg,{fontCache:"local"});J===4&&(q.linebreaks=t.extendFlat({},q.linebreaks,{inline:!1})),f=MathJax._.mathjax.mathjax.document(document,t.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new j(q)}))}let U="math-output-"+t.randstr({},64);N=r.select("body").append("div").attr({id:U}).style({visibility:"hidden",position:"absolute","font-size":X.fontSize+"px"});let V=c($).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return f.convert(V,{display:!1})}).then(function(j){N.node().appendChild(j)})},W=function(){let U=N.select(".MathJax"),V=!U.empty()&&N.select("svg").node();if(!V)t.log("There was an error in the tex syntax.",$),Z();else{let j=V.getBoundingClientRect(),q=U.select("defs");Z(U,q,j)}N.remove()};Promise.resolve().then(H).then(W).catch(U=>{t.log("MathJax typesetting failed.",$,U),N&&N.remove(),Z()})}var y={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"},_={sub:"0.3em",sup:"-0.6em"},v={sub:"-0.21em",sup:"0.42em"},x="\u200B",E=["http:","https:","mailto:","",void 0,":"],M=e.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,w=/<(\/?)([^ >]*)(\s+(.*))?>/i,k=//i;e.BR_TAG_ALL=//gi;var T=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,b=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,S=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function F($,X){if(!$)return null;var Z=$.match(X),J=Z&&(Z[3]||Z[4]);return J&&z(J)}var D=/(^|;)\s*color:/;e.plainText=function($,X){X=X||{};for(var Z=X.len!==void 0&&X.len!==-1?X.len:1/0,J=X.allowedTags!==void 0?X.allowedTags:["br"],N="...",H=N.length,W=$.split(C),U=[],V="",j=0,q=0;qH?U.push(Y.slice(0,Math.max(0,le-H))+N):U.push(Y.slice(0,le));break}V=""}}return U.join("")};var R={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},P=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function z($){return $.replace(P,function(X,Z){var J;return Z.charAt(0)==="#"?J=I(Z.charAt(1)==="x"?parseInt(Z.slice(2),16):parseInt(Z.slice(1),10)):J=R[Z],J||X})}e.convertEntities=z;function I($){if(!($>1114111)){var X=String.fromCodePoint;if(X)return X($);var Z=String.fromCharCode;return $<=65535?Z($):Z(($>>10)+55232,$%1024+56320)}}function L($,X){X=X.replace(M," ");var Z=!1,J=[],N,H=-1;function W(){H++;var oe=document.createElementNS(i.svg,"tspan");r.select(oe).attr({class:"line",dy:H*o+"em"}),$.appendChild(oe),N=oe;var te=J;if(J=[{node:oe}],te.length>1)for(var ie=1;ie.",X);return}var te=J.pop();oe!==te.type&&t.log("Start tag <"+te.type+"> doesnt match end tag <"+oe+">. Pretending it did match.",X),N=J[J.length-1].node}var q=k.test(X);q?W():(N=$,J=[{node:$}]);for(var Y=X.split(C),K=0;K=0;_--,v++){var x=g[_];y[v]=[1-x[0],x[1]]}return y}function d(g,m){m=m||{};for(var y=g.domain,_=g.range,v=_.length,x=new Array(v),E=0;Ey-g?g=y-(m-y):m-y=0?x=u.colorscale.sequential:x=u.colorscale.sequentialminus,d._sync("colorscale",x)}}}}),As=ye({"src/components/colorscale/index.js"(e,r){"use strict";var t=Tm(),a=xc();r.exports={moduleType:"component",name:"colorscale",attributes:rs(),layoutAttributes:GD(),supplyLayoutDefaults:qee(),handleDefaults:Su(),crossTraceDefaults:Vee(),calc:Nc(),scales:t.scales,defaultScale:t.defaultScale,getScale:t.get,isValidScale:t.isValid,hasColorscale:a.hasColorscale,extractOpts:a.extractOpts,extractScale:a.extractScale,flipScale:a.flipScale,makeColorScaleFunc:a.makeColorScaleFunc,makeColorScaleFuncFromTrace:a.makeColorScaleFuncFromTrace}}}),ms=ye({"src/traces/scatter/subtypes.js"(e,r){"use strict";var t=Yt(),a=yc().isTypedArraySpec;r.exports={hasLines:function(i){return i.visible&&i.mode&&i.mode.indexOf("lines")!==-1},hasMarkers:function(i){return i.visible&&(i.mode&&i.mode.indexOf("markers")!==-1||i.type==="splom")},hasText:function(i){return i.visible&&i.mode&&i.mode.indexOf("text")!==-1},isBubble:function(i){var o=i.marker;return t.isPlainObject(o)&&(t.isArrayOrTypedArray(o.size)||a(o.size))}}}}),$x=ye({"src/traces/scatter/make_bubble_size_func.js"(e,r){"use strict";var t=en();r.exports=function(i,o){o||(o=2);var s=i.marker,l=s.sizeref||1,n=s.sizemin||0,u=s.sizemode==="area"?function(c){return Math.sqrt(c/l)}:function(c){return c/l};return function(c){var f=u(c/o);return t(f)&&f>0?Math.max(f,n):0}}}}),Bf=ye({"src/components/fx/helpers.js"(e){"use strict";var r=Yt();e.getSubplot=function(l){return l.subplot||l.xaxis+l.yaxis||l.geo},e.isTraceInSubplots=function(l,n){if(l.type==="splom"){for(var u=l.xaxes||[],c=l.yaxes||[],f=0;f=0&&u.index{let h=c.toLowerCase(),d=c,p=s(f);for(h==="m"&&p.length>2&&(n.push([d,...p.splice(0,2)]),h="l",d=d==="m"?"l":"L");;){if(p.length===t[h])return n.push([d,...p]),"";if(p.length0&&(te=100,oe=oe.replace("-open","")),oe.indexOf("-dot")>0&&(te+=200,oe=oe.replace("-dot","")),oe=_.symbolNames.indexOf(oe),oe>=0&&(oe+=te)}return oe%100>=k||oe>=400?0:Math.floor(Math.max(oe,0))};function b(oe,te,ie,ee){var ce=oe%100;return _.symbolFuncs[ce](te,ie,ee)+(oe>=200?T:"")}var S=i("~f"),A={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}};_.gradient=function(oe,te,ie,ee,ce,_e){var Se=A[ee];return F(oe,te,ie,Se.type,ce,_e,Se.start,Se.stop,!1,Se.reversed)};function F(oe,te,ie,ee,ce,_e,Se,Me,Ue,Ge){var Ze=ce.length,Ke;ee==="linear"?Ke={node:"linearGradient",attrs:{x1:Se.x,y1:Se.y,x2:Me.x,y2:Me.y,gradientUnits:Ue?"userSpaceOnUse":"objectBoundingBox"},reversed:Ge}:ee==="radial"&&(Ke={node:"radialGradient",reversed:Ge});for(var dt=new Array(Ze),_t=0;_t=0&&oe.i===void 0&&(oe.i=_e.i),te.style("opacity",ee.selectedOpacityFn?ee.selectedOpacityFn(oe):oe.mo===void 0?Se.opacity:oe.mo),ee.ms2mrc){var Ue;oe.ms==="various"||Se.size==="various"?Ue=3:Ue=ee.ms2mrc(oe.ms),oe.mrc=Ue,ee.selectedSizeFn&&(Ue=oe.mrc=ee.selectedSizeFn(oe));var Ge=_.symbolNumber(oe.mx||Se.symbol)||0;oe.om=Ge%200>=100;var Ze=he(oe,ie),Ke=q(oe,ie);te.attr("d",b(Ge,Ue,Ze,Ke))}var dt=!1,_t,Pt,pt;if(oe.so)pt=Me.outlierwidth,Pt=Me.outliercolor,_t=Se.outliercolor;else{var Tt=(Me||{}).width;pt=(oe.mlw+1||Tt+1||(oe.trace?(oe.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in oe?Pt=oe.mlcc=ee.lineScale(oe.mlc):a.isArrayOrTypedArray(Me.color)?Pt=l.defaultLine:Pt=Me.color,a.isArrayOrTypedArray(Se.color)&&(_t=l.defaultLine,dt=!0),"mc"in oe?_t=oe.mcc=ee.markerScale(oe.mc):_t=Se.color||Se.colors||"rgba(0,0,0,0)",ee.selectedColorFn&&(_t=ee.selectedColorFn(oe))}let st=oe.mld||(Me||{}).dash;if(st&&_.dashLine(te,st,pt),oe.om)te.call(l.stroke,_t).style({"stroke-width":(pt||1)+"px",fill:"none"});else{te.style("stroke-width",(oe.isBlank?0:pt)+"px");var Ve=Se.gradient,Ye=oe.mgt;Ye?dt=!0:Ye=Ve&&Ve.type,a.isArrayOrTypedArray(Ye)&&(Ye=Ye[0],A[Ye]||(Ye=0));var me=Se.pattern,be=_.getPatternAttr,Ee=me&&(be(me.shape,oe.i,"")||be(me.path,oe.i,""));if(Ye&&Ye!=="none"){var De=oe.mgc;De?dt=!0:De=Ve.color;var Ce=ie.uid;dt&&(Ce+="-"+oe.i),_.gradient(te,ce,Ce,Ye,[[0,De],[1,_t]],"fill")}else if(Ee){var Fe=!1,Je=me.fgcolor;!Je&&_e&&_e.color&&(Je=_e.color,Fe=!0);var qe=be(Je,oe.i,_e&&_e.color||null),at=be(me.bgcolor,oe.i,null),tt=me.fgopacity,ct=be(me.size,oe.i,8),At=be(me.solidity,oe.i,.3);Fe=Fe||oe.mcc||a.isArrayOrTypedArray(me.shape)||a.isArrayOrTypedArray(me.path)||a.isArrayOrTypedArray(me.bgcolor)||a.isArrayOrTypedArray(me.fgcolor)||a.isArrayOrTypedArray(me.size)||a.isArrayOrTypedArray(me.solidity);var ft=ie.uid;Fe&&(ft+="-"+oe.i),_.pattern(te,"point",ce,ft,Ee,ct,At,oe.mcc,me.fillmode,at,qe,tt)}else a.isArrayOrTypedArray(_t)?l.fill(te,_t[oe.i]):l.fill(te,_t);pt&&l.stroke(te,Pt)}},_.makePointStyleFns=function(oe){var te={},ie=oe.marker;return te.markerScale=_.tryColorscale(ie,""),te.lineScale=_.tryColorscale(ie,"line"),s.traceIs(oe,"symbols")&&(te.ms2mrc=g.isBubble(oe)?m(oe):function(){return(ie.size||6)/2}),oe.selectedpoints&&a.extendFlat(te,_.makeSelectedPointStyleFns(oe)),te},_.makeSelectedPointStyleFns=function(oe){var te={},ie=oe.selected||{},ee=oe.unselected||{},ce=oe.marker||{},_e=ie.marker||{},Se=ee.marker||{},Me=ce.opacity,Ue=_e.opacity,Ge=Se.opacity,Ze=Ue!==void 0,Ke=Ge!==void 0;(a.isArrayOrTypedArray(Me)||Ze||Ke)&&(te.selectedOpacityFn=function(me){var be=me.mo===void 0?ce.opacity:me.mo;return me.selected?Ze?Ue:be:Ke?Ge:p*be});var dt=ce.color,_t=_e.color,Pt=Se.color;(_t||Pt)&&(te.selectedColorFn=function(me){var be=me.mcc||dt;return me.selected?_t||be:Pt||be});var pt=ce.size,Tt=_e.size,st=Se.size,Ve=Tt!==void 0,Ye=st!==void 0;return s.traceIs(oe,"symbols")&&(Ve||Ye)&&(te.selectedSizeFn=function(me){var be=me.mrc||pt/2;return me.selected?Ve?Tt/2:be:Ye?st/2:be}),te},_.makeSelectedTextStyleFns=function(oe){var te={},ie=oe.selected||{},ee=oe.unselected||{},ce=oe.textfont||{},_e=ie.textfont||{},Se=ee.textfont||{},Me=ce.color,Ue=_e.color,Ge=Se.color;return te.selectedTextColorFn=function(Ze){var Ke=Ze.tc||Me;return Ze.selected?Ue||Ke:Ge||(Ue?Ke:l.addOpacity(Ke,p))},te},_.selectedPointStyle=function(oe,te){if(!(!oe.size()||!te.selectedpoints)){var ie=_.makeSelectedPointStyleFns(te),ee=te.marker||{},ce=[];ie.selectedOpacityFn&&ce.push(function(_e,Se){_e.style("opacity",ie.selectedOpacityFn(Se))}),ie.selectedColorFn&&ce.push(function(_e,Se){l.fill(_e,ie.selectedColorFn(Se))}),ie.selectedSizeFn&&ce.push(function(_e,Se){var Me=Se.mx||ee.symbol||0,Ue=ie.selectedSizeFn(Se);_e.attr("d",b(_.symbolNumber(Me),Ue,he(Se,te),q(Se,te))),Se.mrc2=Ue}),ce.length&&oe.each(function(_e){for(var Se=t.select(this),Me=0;Me0?ie:0}_.textPointStyle=function(oe,te,ie){if(oe.size()){var ee;if(te.selectedpoints){var ce=_.makeSelectedTextStyleFns(te);ee=ce.selectedTextColorFn}var _e=te.texttemplate,Se=ie._fullLayout;oe.each(function(Me){var Ue=t.select(this),Ge=_e?a.extractOption(Me,te,"txt","texttemplate"):a.extractOption(Me,te,"tx","text");if(!Ge&&Ge!==0){Ue.remove();return}if(_e){var Ze=te._module.formatLabels,Ke=Ze?Ze(Me,te,Se):{},dt={};y(dt,te,Me.i),Ge=a.texttemplateString({data:[dt,Me,te._meta],fallback:te.texttemplatefallback,labels:Ke,locale:Se._d3locale,template:Ge})}var _t=Me.tp||te.textposition,Pt=P(Me,te),pt=ee?ee(Me):Me.tc||te.textfont.color;Ue.call(_.font,{family:Me.tf||te.textfont.family,weight:Me.tw||te.textfont.weight,style:Me.ty||te.textfont.style,variant:Me.tv||te.textfont.variant,textcase:Me.tC||te.textfont.textcase,lineposition:Me.tE||te.textfont.lineposition,shadow:Me.tS||te.textfont.shadow,size:Pt,color:pt}).text(Ge).call(c.convertToTspans,ie).call(R,_t,Pt,Me.mrc)})}},_.selectedTextStyle=function(oe,te){if(!(!oe.size()||!te.selectedpoints)){var ie=_.makeSelectedTextStyleFns(te);oe.each(function(ee){var ce=t.select(this),_e=ie.selectedTextColorFn(ee),Se=ee.tp||te.textposition,Me=P(ee,te);l.fill(ce,_e);var Ue=s.traceIs(te,"bar-like");R(ce,Se,Me,ee.mrc2||ee.mrc,Ue)})}};var z=.5;_.smoothopen=function(oe,te){if(oe.length<3)return"M"+oe.join("L");var ie="M"+oe[0],ee=[],ce;for(ce=1;ce=Ue||me>=Ze&&me<=Ue)&&(be<=Ke&&be>=Ge||be>=Ke&&be<=Ge)&&(oe=[me,be])}return oe}_.applyBackoff=J,_.makeTester=function(){var oe=a.ensureSingleById(t.select("body"),"svg","js-plotly-tester",function(ie){ie.attr(f.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),te=a.ensureSingle(oe,"path","js-reference-point",function(ie){ie.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});_.tester=oe,_.testref=te},_.savedBBoxes={};var N=0,H=1e4;_.bBox=function(oe,te,ie){ie||(ie=W(oe));var ee;if(ie){if(ee=_.savedBBoxes[ie],ee)return a.extendFlat({},ee)}else if(oe.childNodes.length===1){var ce=oe.childNodes[0];if(ie=W(ce),ie){var _e=+ce.getAttribute("x")||0,Se=+ce.getAttribute("y")||0,Me=ce.getAttribute("transform");if(!Me){var Ue=_.bBox(ce,!1,ie);return _e&&(Ue.left+=_e,Ue.right+=_e),Se&&(Ue.top+=Se,Ue.bottom+=Se),Ue}if(ie+="~"+_e+"~"+Se+"~"+Me,ee=_.savedBBoxes[ie],ee)return a.extendFlat({},ee)}}var Ge,Ze;te?Ge=oe:(Ze=_.tester.node(),Ge=oe.cloneNode(!0),Ze.appendChild(Ge)),t.select(Ge).attr("transform",null).call(c.positionText,0,0);var Ke=Ge.getBoundingClientRect(),dt=_.testref.node().getBoundingClientRect();te||Ze.removeChild(Ge);var _t={height:Ke.height,width:Ke.width,left:Ke.left-dt.left,top:Ke.top-dt.top,right:Ke.right-dt.left,bottom:Ke.bottom-dt.top};return N>=H&&(_.savedBBoxes={},N=0),ie&&(_.savedBBoxes[ie]=_t),N++,a.extendFlat({},_t)};function W(oe){var te=oe.getAttribute("data-unformatted");if(te!==null)return te+oe.getAttribute("data-math")+oe.getAttribute("text-anchor")+oe.getAttribute("style")}_.setClipUrl=function(oe,te,ie){oe.attr("clip-path",U(te,ie))};function U(oe,te){if(!oe)return null;var ie=te._context,ee=ie._exportedPlot?"":ie._baseUrl||"";return ee?"url('"+ee+"#"+oe+"')":"url(#"+oe+")"}_.getTranslate=function(oe){var te=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ie=oe.attr?"attr":"getAttribute",ee=oe[ie]("transform")||"",ce=ee.replace(te,function(_e,Se,Me){return[Se,Me].join(" ")}).split(" ");return{x:+ce[0]||0,y:+ce[1]||0}},_.setTranslate=function(oe,te,ie){var ee=/(\btranslate\(.*?\);?)/,ce=oe.attr?"attr":"getAttribute",_e=oe.attr?"attr":"setAttribute",Se=oe[ce]("transform")||"";return te=te||0,ie=ie||0,Se=Se.replace(ee,"").trim(),Se+=u(te,ie),Se=Se.trim(),oe[_e]("transform",Se),Se},_.getScale=function(oe){var te=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ie=oe.attr?"attr":"getAttribute",ee=oe[ie]("transform")||"",ce=ee.replace(te,function(_e,Se,Me){return[Se,Me].join(" ")}).split(" ");return{x:+ce[0]||1,y:+ce[1]||1}},_.setScale=function(oe,te,ie){var ee=/(\bscale\(.*?\);?)/,ce=oe.attr?"attr":"getAttribute",_e=oe.attr?"attr":"setAttribute",Se=oe[ce]("transform")||"";return te=te||1,ie=ie||1,Se=Se.replace(ee,"").trim(),Se+="scale("+te+","+ie+")",Se=Se.trim(),oe[_e]("transform",Se),Se};var V=/\s*sc.*/;_.setPointGroupScale=function(oe,te,ie){if(te=te||1,ie=ie||1,!!oe){var ee=te===1&&ie===1?"":"scale("+te+","+ie+")";oe.each(function(){var ce=(this.getAttribute("transform")||"").replace(V,"");ce+=ee,ce=ce.trim(),this.setAttribute("transform",ce)})}};var j=/translate\([^)]*\)\s*$/;_.setTextPointsScale=function(oe,te,ie){oe&&oe.each(function(){var ee,ce=t.select(this),_e=ce.select("text");if(_e.node()){var Se=parseFloat(_e.attr("x")||0),Me=parseFloat(_e.attr("y")||0),Ue=(ce.attr("transform")||"").match(j);te===1&&ie===1?ee=[]:ee=[u(Se,Me),"scale("+te+","+ie+")",u(-Se,-Me)],Ue&&ee.push(Ue),ce.attr("transform",ee.join(""))}})};function q(oe,te){var ie;return oe&&(ie=oe.mf),ie===void 0&&(ie=te.marker&&te.marker.standoff||0),!te._geo&&!te._xA?-ie:ie}_.getMarkerStandoff=q;var Y=Math.atan2,K=Math.cos,re=Math.sin;function se(oe,te){var ie=te[0],ee=te[1];return[ie*K(oe)-ee*re(oe),ie*re(oe)+ee*K(oe)]}var le,ue,fe,pe,we,xe;function he(oe,te){var ie=oe.ma;ie===void 0&&(ie=te.marker.angle,(!o(ie)||a.isArrayOrTypedArray(ie))&&(ie=0));var ee,ce,_e=te.marker.angleref;if(_e==="previous"||_e==="north"){if(te._geo){var Se=te._geo.project(oe.lonlat);ee=Se[0],ce=Se[1]}else{var Me=te._xA,Ue=te._yA;if(Me&&Ue)ee=Me.c2p(oe.x),ce=Ue.c2p(oe.y);else return 90}if(te._geo){var Ge=oe.lonlat[0],Ze=oe.lonlat[1],Ke=te._geo.project([Ge,Ze+1e-5]),dt=te._geo.project([Ge+1e-5,Ze]),_t=Y(dt[1]-ce,dt[0]-ee),Pt=Y(Ke[1]-ce,Ke[0]-ee),pt;if(_e==="north")pt=ie/180*Math.PI;else if(_e==="previous"){var Tt=Ge/180*Math.PI,st=Ze/180*Math.PI,Ve=le/180*Math.PI,Ye=ue/180*Math.PI,me=Ve-Tt,be=K(Ye)*re(me),Ee=re(Ye)*K(st)-K(Ye)*re(st)*K(me);pt=-Y(be,Ee)-Math.PI,le=Ge,ue=Ze}var De=se(_t,[K(pt),0]),Ce=se(Pt,[re(pt),0]);ie=Y(De[1]+Ce[1],De[0]+Ce[0])/Math.PI*180,_e==="previous"&&!(xe===te.uid&&oe.i===we+1)&&(ie=null)}if(_e==="previous"&&!te._geo)if(xe===te.uid&&oe.i===we+1&&o(ee)&&o(ce)){var Fe=ee-fe,Je=ce-pe,qe=te.line&&te.line.shape||"",at=qe.slice(qe.length-1);at==="h"&&(Je=0),at==="v"&&(Fe=0),ie+=Y(Je,Fe)/Math.PI*180+90}else ie=null}return fe=ee,pe=ce,we=oe.i,xe=te.uid,ie}_.getMarkerAngle=he}}),Cm=ye({"src/components/titles/index.js"(e,r){"use strict";var t=ai(),a=en(),i=ws(),o=li(),s=Yt(),l=s.strTranslate,n=$i(),u=Ya(),c=Go(),f=f0(),h=Yl().OPPOSITE_SIDE,d=/ [XY][0-9]* /,p=1.6,g=1.6;function m(y,_,v){var x=y._fullLayout,E=v.propContainer,M=v.propName,C=v.placeholder,w=v.traceIndex,k=v.avoid||{},T=v.attributes,b=v.transform,S=v.containerGroup,A=1,F=E.title,D=(F&&F.text?F.text:"").trim(),R=!1,P=F&&F.font?F.font:{},z=P.family,I=P.size,L=P.color,B=P.weight,O=P.style,G=P.variant,$=P.textcase,X=P.lineposition,Z=P.shadow,J=v.subtitlePropName,N=!!J,H=v.subtitlePlaceholder,W=(E.title||{}).subtitle||{text:"",font:{}},U=(W.text||"").trim(),V=!1,j=1,q=W.font,Y=q.family,K=q.size,re=q.color,se=q.weight,le=q.style,ue=q.variant,fe=q.textcase,pe=q.lineposition,we=q.shadow,xe;M==="title.text"?xe="titleText":M.indexOf("axis")!==-1?xe="axisTitleText":M.indexOf("colorbar")!==-1&&(xe="colorbarTitleText");var he=y._context.edits[xe];function oe(_t,Pt){return _t===void 0||Pt===void 0?!1:_t.replace(d," % ")===Pt.replace(d," % ")}D===""?A=0:oe(D,C)&&(he||(D=""),A=.2,R=!0),N&&(U===""?j=0:oe(U,H)&&(he||(U=""),j=.2,V=!0)),v._meta?D=s.templateString(D,v._meta):x._meta&&(D=s.templateString(D,x._meta));var te=D||U||he,ie;S||(S=s.ensureSingle(x._infolayer,"g","g-"+_),ie=x._hColorbarMoveTitle);var ee=S.selectAll("text."+_).data(te?[0]:[]);ee.enter().append("text"),ee.text(D).attr("class",_),ee.exit().remove();var ce=null,_e=_+"-subtitle",Se=U||he;if(N&&(ce=S.selectAll("text."+_e).data(Se?[0]:[]),ce.enter().append("text"),ce.text(U).attr("class",_e),ce.exit().remove()),!te)return S;function Me(_t,Pt){s.syncOrAsync([Ue,Ge],{title:_t,subtitle:Pt})}function Ue(_t){var Pt=_t.title,pt=_t.subtitle,Tt;!b&&ie&&(b={}),b?(Tt="",b.rotate&&(Tt+="rotate("+[b.rotate,T.x,T.y]+")"),(b.offset||ie)&&(Tt+=l(0,(b.offset||0)-(ie||0)))):Tt=null,Pt.attr("transform",Tt);function st(De){if(De){var Ce=t.select(De.node().parentNode).select("."+_e);if(!Ce.empty()){var Fe=De.node().getBBox();if(Fe.height){var Je=Fe.y+Fe.height+p*K;Ce.attr("y",Je)}}}}if(Pt.style("opacity",A*u.opacity(L)).call(n.font,{color:u.rgb(L),size:t.round(I,2),family:z,weight:B,style:O,variant:G,textcase:$,shadow:Z,lineposition:X}).attr(T).call(c.convertToTspans,y,st),pt&&!pt.empty()){var Ve=S.select("."+_+"-math-group"),Ye=Pt.node().getBBox(),me=Ve.node()?Ve.node().getBBox():void 0,be=me?me.y+me.height+p*K:Ye.y+Ye.height+g*K,Ee=s.extendFlat({},T,{y:be});pt.attr("transform",Tt),pt.style("opacity",j*u.opacity(re)).call(n.font,{color:u.rgb(re),size:t.round(K,2),family:Y,weight:se,style:le,variant:ue,textcase:fe,shadow:we,lineposition:pe}).attr(Ee).call(c.convertToTspans,y)}return i.previousPromises(y)}function Ge(_t){var Pt=_t.title,pt=t.select(Pt.node().parentNode);if(k&&k.selection&&k.side&&D){pt.attr("transform",null);var Tt=h[k.side],st=k.side==="left"||k.side==="top"?-1:1,Ve=a(k.pad)?k.pad:2,Ye=n.bBox(pt.node()),me={t:0,b:0,l:0,r:0},be=y._fullLayout._reservedMargin;for(var Ee in be)for(var De in be[Ee]){var Ce=be[Ee][De];me[De]=Math.max(me[De],Ce)}var Fe={left:me.l,top:me.t,right:x.width-me.r,bottom:x.height-me.b},Je=k.maxShift||st*(Fe[k.side]-Ye[k.side]),qe=0;if(Je<0)qe=Je;else{var at=k.offsetLeft||0,tt=k.offsetTop||0;Ye.left-=at,Ye.right-=at,Ye.top-=tt,Ye.bottom-=tt,k.selection.each(function(){var At=n.bBox(this);s.bBoxIntersect(Ye,At,Ve)&&(qe=Math.max(qe,st*(At[k.side]-Ye[Tt])+Ve))}),qe=Math.min(Je,qe),E._titleScoot=Math.abs(qe)}if(qe>0||Je<0){var ct={left:[-qe,0],right:[qe,0],top:[0,-qe],bottom:[0,qe]}[k.side];pt.attr("transform",l(ct[0],ct[1]))}}}ee.call(Me,ce);function Ze(_t,Pt){_t.text(Pt).on("mouseover.opacity",function(){t.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){t.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)})}if(he&&(D?ee.on(".opacity",null):(Ze(ee,C),R=!0),ee.call(c.makeEditable,{gd:y}).on("edit",function(_t){w!==void 0?o.call("_guiRestyle",y,M,_t,w):o.call("_guiRelayout",y,M,_t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Me)}).on("input",function(_t){this.text(_t||" ").call(c.positionText,T.x,T.y)}),N)){if(N&&!D){var Ke=ee.node().getBBox(),dt=Ke.y+Ke.height+g*K;ce.attr("y",dt)}U?ce.on(".opacity",null):(Ze(ce,H),V=!0),ce.call(c.makeEditable,{gd:y}).on("edit",function(_t){o.call("_guiRelayout",y,"title.subtitle.text",_t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Me)}).on("input",function(_t){this.text(_t||" ").call(c.positionText,ce.attr("x"),ce.attr("y"))})}return ee.classed("js-placeholder",R),ce&&!ce.empty()&&ce.classed("js-placeholder",V),S}r.exports={draw:m,SUBTITLE_PADDING_EM:g,SUBTITLE_PADDING_MATHJAX_EM:p}}}),Op=ye({"src/plots/cartesian/set_convert.js"(e,r){"use strict";var t=ai(),a=uy().utcFormat,i=Yt(),o=i.numberFormat,s=en(),l=i.cleanNumber,n=i.ms2DateTime,u=i.dateTime2ms,c=i.ensureNumber,f=i.isArrayOrTypedArray,h=Vn(),d=h.FP_SAFE,p=h.BADNUM,g=h.LOG_CLIP,m=h.ONEWEEK,y=h.ONEDAY,_=h.ONEHOUR,v=h.ONEMIN,x=h.ONESEC,E=Gs(),M=$l(),C=M.HOUR_PATTERN,w=M.WEEKDAY_PATTERN;function k(b){return Math.pow(10,b)}function T(b){return b!=null}r.exports=function(S,A){A=A||{};var F=S._id||"x",D=F.charAt(0);function R(U,V){if(U>0)return Math.log(U)/Math.LN10;if(U<=0&&V&&S.range&&S.range.length===2){var j=S.range[0],q=S.range[1];return .5*(j+q-2*g*Math.abs(j-q))}else return p}function P(U,V,j,q){if((q||{}).msUTC&&s(U))return+U;var Y=u(U,j||S.calendar);if(Y===p)if(s(U)){U=+U;var K=Math.floor(i.mod(U+.05,1)*10),re=Math.round(U-K/10);Y=u(new Date(re))+K/10}else return p;return Y}function z(U,V,j){return n(U,V,j||S.calendar)}function I(U){return S._categories[Math.round(U)]}function L(U){if(T(U)){if(S._categoriesMap===void 0&&(S._categoriesMap={}),S._categoriesMap[U]!==void 0)return S._categoriesMap[U];S._categories.push(typeof U=="number"?String(U):U);var V=S._categories.length-1;return S._categoriesMap[U]=V,V}return p}function B(U,V){for(var j=new Array(V),q=0;qS.range[1]&&(j=!j);for(var q=j?-1:1,Y=q*U,K=0,re=0;rele)K=re+1;else{K=Y<(se+le)/2?re:re+1;break}}var ue=S._B[K]||0;return isFinite(ue)?X(U,S._m2,ue):0},N=function(U){var V=S._rangebreaks.length;if(!V)return Z(U,S._m,S._b);for(var j=0,q=0;qS._rangebreaks[q].pmax&&(j=q+1);return Z(U,S._m2,S._B[j])}}S.c2l=S.type==="log"?R:c,S.l2c=S.type==="log"?k:c,S.l2p=J,S.p2l=N,S.c2p=S.type==="log"?function(U,V){return J(R(U,V))}:J,S.p2c=S.type==="log"?function(U){return k(N(U))}:N,["linear","-"].indexOf(S.type)!==-1?(S.d2r=S.r2d=S.d2c=S.r2c=S.d2l=S.r2l=l,S.c2d=S.c2r=S.l2d=S.l2r=c,S.d2p=S.r2p=function(U){return S.l2p(l(U))},S.p2d=S.p2r=N,S.cleanPos=c):S.type==="log"?(S.d2r=S.d2l=function(U,V){return R(l(U),V)},S.r2d=S.r2c=function(U){return k(l(U))},S.d2c=S.r2l=l,S.c2d=S.l2r=c,S.c2r=R,S.l2d=k,S.d2p=function(U,V){return S.l2p(S.d2r(U,V))},S.p2d=function(U){return k(N(U))},S.r2p=function(U){return S.l2p(l(U))},S.p2r=N,S.cleanPos=c):S.type==="date"?(S.d2r=S.r2d=i.identity,S.d2c=S.r2c=S.d2l=S.r2l=P,S.c2d=S.c2r=S.l2d=S.l2r=z,S.d2p=S.r2p=function(U,V,j){return S.l2p(P(U,0,j))},S.p2d=S.p2r=function(U,V,j){return z(N(U),V,j)},S.cleanPos=function(U){return i.cleanDate(U,p,S.calendar)}):S.type==="category"?(S.d2c=S.d2l=L,S.r2d=S.c2d=S.l2d=I,S.d2r=S.d2l_noadd=G,S.r2c=function(U){var V=$(U);return V!==void 0?V:S.fraction2r(.5)},S.l2r=S.c2r=c,S.r2l=$,S.d2p=function(U){return S.l2p(S.r2c(U))},S.p2d=function(U){return I(N(U))},S.r2p=S.d2p,S.p2r=N,S.cleanPos=function(U){return typeof U=="string"&&U!==""?U:c(U)}):S.type==="multicategory"&&(S.r2d=S.c2d=S.l2d=I,S.d2r=S.d2l_noadd=G,S.r2c=function(U){var V=G(U);return V!==void 0?V:S.fraction2r(.5)},S.r2c_just_indices=O,S.l2r=S.c2r=c,S.r2l=G,S.d2p=function(U){return S.l2p(S.r2c(U))},S.p2d=function(U){return I(N(U))},S.r2p=S.d2p,S.p2r=N,S.cleanPos=function(U){return Array.isArray(U)||typeof U=="string"&&U!==""?U:c(U)},S.setupMultiCategory=function(U){var V=S._traceIndices,j,q,Y=S._matchGroup;if(Y&&S._categories.length===0){for(var K in Y)if(K!==F){var re=A[E.id2name(K)];V=V.concat(re._traceIndices)}}var se=[[0,{}],[0,{}]],le=[];for(j=0;jre[1]&&(q[K?0:1]=j,Y[1]=re[1]),Y[0]>=Y[1])if(V!==void 0){var se=re[0]+1;j!==void 0&&(se=Math.min(se,re[1])),q[K?0:1]=S.l2r(se)}else j!==void 0&&(q[K?1:0]=S.l2r(re[1]-1))}},S.cleanRange=function(U,V){S._cleanRange(U,V),S.limitRange(U)},S._cleanRange=function(U,V){V||(V={}),U||(U="range");var j=i.nestedProperty(S,U).get(),q,Y;if(S.type==="date"?Y=i.dfltRange(S.calendar):D==="y"?Y=M.DFLTRANGEY:S._name==="realaxis"?Y=[0,1]:Y=V.dfltRange||M.DFLTRANGEX,Y=Y.slice(),(S.rangemode==="tozero"||S.rangemode==="nonnegative")&&(Y[0]=0),!j||j.length!==2){i.nestedProperty(S,U).set(Y);return}var K=j[0]===null,re=j[1]===null;for(S.type==="date"&&!S.autorange&&(j[0]=i.cleanDate(j[0],p,S.calendar),j[1]=i.cleanDate(j[1],p,S.calendar)),q=0;q<2;q++)if(S.type==="date"){if(!i.isDateTime(j[q],S.calendar)){S[U]=Y;break}if(S.r2l(j[0])===S.r2l(j[1])){var se=i.constrain(S.r2l(j[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);j[0]=S.l2r(se-1e3),j[1]=S.l2r(se+1e3);break}}else{if(!s(j[q]))if(!(K||re)&&s(j[1-q]))j[q]=j[1-q]*(q?10:.1);else{S[U]=Y;break}if(j[q]<-d?j[q]=-d:j[q]>d&&(j[q]=d),j[0]===j[1]){var le=Math.max(1,Math.abs(j[0]*1e-6));j[0]-=le,j[1]+=le}}},S.setScale=function(U){var V=A._size;if(S.overlaying){var j=E.getFromId({_fullLayout:A},S.overlaying);S.domain=j.domain}var q=U&&S._r?"_r":"range",Y=S.calendar;S.cleanRange(q);var K=S.r2l(S[q][0],Y),re=S.r2l(S[q][1],Y),se=D==="y";if(se?(S._offset=V.t+(1-S.domain[1])*V.h,S._length=V.h*(S.domain[1]-S.domain[0]),S._m=S._length/(K-re),S._b=-S._m*re):(S._offset=V.l+S.domain[0]*V.w,S._length=V.w*(S.domain[1]-S.domain[0]),S._m=S._length/(re-K),S._b=-S._m*K),S._rangebreaks=[],S._lBreaks=0,S._m2=0,S._B=[],S.rangebreaks){var le,ue;if(S._rangebreaks=S.locateBreaks(Math.min(K,re),Math.max(K,re)),S._rangebreaks.length){for(le=0;lere&&(fe=!fe),fe&&S._rangebreaks.reverse();var pe=fe?-1:1;for(S._m2=pe*S._length/(Math.abs(re-K)-S._lBreaks),S._B.push(-S._m2*(se?re:K)),le=0;leY&&(Y+=7,KY&&(Y+=24,K=q&&K=q&&U=Me.min&&(eeMe.max&&(Me.max=ce),_e=!1)}_e&&re.push({min:ee,max:ce})}};for(j=0;jx*2}function h(g){return Math.max(1,(g-1)/1e3)}function d(g,m){for(var y=g.length,_=h(y),v=0,x=0,E={},M=0;Mv*2}function p(g){return o(g[0])&&o(g[1])}}}),tp=ye({"src/plots/cartesian/autorange.js"(e,r){"use strict";var t=ai(),a=en(),i=Yt(),o=Vn().FP_SAFE,s=li(),l=$i(),n=Gs(),u=n.getFromId,c=n.isLinked;r.exports={applyAutorangeOptions:S,getAutoRange:f,makePadFn:d,doAutoRange:y,findExtremes:_,concatExtremes:m};function f(A,F){var D,R,P=[],z=A._fullLayout,I=d(z,F,0),L=d(z,F,1),B=m(A,F),O=B.min,G=B.max;if(O.length===0||G.length===0)return i.simpleMap(F.range,F.r2l);var $=O[0].val,X=G[0].val;for(D=1;D0&&(le=V-I(Y)-L(K),le>j?ue/le>q&&(re=Y,se=K,q=ue/le):ue/V>q&&(re={val:Y.val,nopad:1},se={val:K.val,nopad:1},q=ue/V));function fe(oe,te){return Math.max(oe,L(te))}if($===X){var pe=$-1,we=$+1;if(W)if($===0)P=[0,1];else{var xe=($>0?G:O).reduce(fe,0),he=$/(1-Math.min(.5,xe/V));P=$>0?[0,he]:[he,0]}else U?P=[Math.max(0,pe),Math.max(1,we)]:P=[pe,we]}else W?(re.val>=0&&(re={val:0,nopad:1}),se.val<=0&&(se={val:0,nopad:1})):U&&(re.val-q*I(re)<0&&(re={val:0,nopad:1}),se.val<=0&&(se={val:1,nopad:1})),q=(se.val-re.val-h(F,Y.val,K.val))/(V-I(re)-L(se)),P=[re.val-q*I(re),se.val+q*L(se)];return P=S(P,F),F.limitRange&&F.limitRange(),J&&P.reverse(),i.simpleMap(P,F.l2r||Number)}function h(A,F,D){var R=0;if(A.rangebreaks)for(var P=A.locateBreaks(F,D),z=0;z0?D.ppadplus:D.ppadminus)||D.ppad||0),Y=j((A._m>0?D.ppadminus:D.ppadplus)||D.ppad||0),K=j(D.vpadplus||D.vpad),re=j(D.vpadminus||D.vpad);if(!O){if(U=1/0,V=-1/0,B)for($=0;$0&&(U=X),X>V&&X-o&&(U=X),X>V&&X=ue;$--)le($);return{min:R,max:P,opts:D}}function v(A,F,D,R){E(A,F,D,R,C)}function x(A,F,D,R){E(A,F,D,R,w)}function E(A,F,D,R,P){for(var z=R.tozero,I=R.extrapad,L=!0,B=0;B=D&&(O.extrapad||!I)){L=!1;break}else P(F,O.val)&&O.pad<=D&&(I||!O.extrapad)&&(A.splice(B,1),B--)}if(L){var G=z&&F===0;A.push({val:F,pad:G?0:D,extrapad:G?!1:I})}}function M(A){return a(A)&&Math.abs(A)=F}function k(A,F){var D=F.autorangeoptions;return D&&D.minallowed!==void 0&&b(F,D.minallowed,D.maxallowed)?D.minallowed:D&&D.clipmin!==void 0&&b(F,D.clipmin,D.clipmax)?Math.max(A,F.d2l(D.clipmin)):A}function T(A,F){var D=F.autorangeoptions;return D&&D.maxallowed!==void 0&&b(F,D.minallowed,D.maxallowed)?D.maxallowed:D&&D.clipmax!==void 0&&b(F,D.clipmin,D.clipmax)?Math.min(A,F.d2l(D.clipmax)):A}function b(A,F,D){return F!==void 0&&D!==void 0?(F=A.d2l(F),D=A.d2l(D),F=B&&(z=B,D=B),I<=B&&(I=B,R=B)}}return D=k(D,F),R=T(R,F),[D,R]}}}),qi=ye({"src/plots/cartesian/axes.js"(e,r){"use strict";var t=ai(),a=en(),i=ws(),o=li(),s=Yt(),l=s.strTranslate,n=Go(),u=Cm(),c=Ya(),f=$i(),h=Gu(),d=WD(),p=$l(),g=Vn(),m=g.ONEMAXYEAR,y=g.ONEAVGYEAR,_=g.ONEMINYEAR,v=g.ONEMAXQUARTER,x=g.ONEAVGQUARTER,E=g.ONEMINQUARTER,M=g.ONEMAXMONTH,C=g.ONEAVGMONTH,w=g.ONEMINMONTH,k=g.ONEWEEK,T=g.ONEDAY,b=T/2,S=g.ONEHOUR,A=g.ONEMIN,F=g.ONESEC,D=g.ONEMILLI,R=g.ONEMICROSEC,P=g.MINUS_SIGN,z=g.BADNUM,I={K:"zeroline"},L={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},O={K:"tick",L:"path"},G={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"]},X=Yl(),Z=X.MID_SHIFT,J=X.CAP_SHIFT,N=X.LINE_SPACING,H=X.OPPOSITE_SIDE,W=3,U=r.exports={};U.setConvert=Op();var V=gy(),j=Gs(),q=j.idSort,Y=j.isLinked;U.id2name=j.id2name,U.name2id=j.name2id,U.cleanId=j.cleanId,U.list=j.list,U.listIds=j.listIds,U.getFromId=j.getFromId,U.getFromTrace=j.getFromTrace;var K=tp();U.getAutoRange=K.getAutoRange,U.findExtremes=K.findExtremes;var re=1e-4;function se(Oe){var Ie=(Oe[1]-Oe[0])*re;return[Oe[0]-Ie,Oe[1]+Ie]}function le(Oe,Ie,Et){if(![Et,Oe,Ie].every(a)||Et===0)return Oe;let Mt=Math.round((Oe-Ie)/Et),zt=Ie+Mt*Et;return Oe!==zt&&Math.abs(Oe-zt)It+" domain")),et=et.concat(Gt||[]),bt.length>Ht?(s.warn("Array attribute "+ut+" has more entries than expected, truncating to "+Ht),bt=bt.slice(0,Ht)):bt.length2e-6||((Et-Oe._forceTick0)/Oe._minDtick%1+1.000001)%1>2e-6)&&(Oe._minDtick=0))},U.saveRangeInitial=function(Oe,Ie){for(var Et=U.list(Oe,"",!0),Mt=!1,zt=0;ztOt*.3||ut(Mt)||ut(zt))){var It=Et.dtick/2;Oe+=Oe+ItHt){var Be=Number(Et.slice(1));Gt.exactYears>Ht&&Be%12===0?Oe=U.tickIncrement(Oe,"M6","reverse")+T*1.5:Gt.exactMonths>Ht?Oe=U.tickIncrement(Oe,"M1","reverse")+T*15.5:Oe-=b;var et=U.tickIncrement(Oe,Et);if(et<=Mt)return et}return Oe}U.prepMinorTicks=function(Oe,Ie,Et){var Mt,zt;if(!((Mt=Ie.minor)!=null&&Mt.dtick)){delete Oe.dtick;var Gt=Ie.dtick&&a(Ie._tmin),Ht;if(Gt){var Be=U.tickIncrement(Ie._tmin,Ie.dtick,!0);Ht=[Ie._tmin,Be*.99+Ie._tmin*.01]}else{var et=s.simpleMap(Ie.range,Ie.r2l);Ht=[et[0],.8*et[0]+.2*et[1]]}if(Oe.range=s.simpleMap(Ht,Ie.l2r),Oe._isMinor=!0,U.prepTicks(Oe,Et),Gt){var ut=a(Ie.dtick),bt=a(Oe.dtick),Ot=ut?Ie.dtick:+Ie.dtick.substring(1),It=bt?Oe.dtick:+Oe.dtick.substring(1);ut&&bt?he(Ot,It)?Ot===2*k&&It===2*T&&(Oe.dtick=k):Ot===2*k&&It===3*T?Oe.dtick=k:Ot===k&&!(Ie._input.minor||{}).nticks?Oe.dtick=T:oe(Ot/It,2.5)?Oe.dtick=Ot/2:Oe.dtick=Ot:String(Ie.dtick).charAt(0)==="M"?bt?Oe.dtick="M1":he(Ot,It)?Ot>=12&&It===2&&(Oe.dtick="M3"):Oe.dtick=Ie.dtick:String(Oe.dtick).charAt(0)==="L"?String(Ie.dtick).charAt(0)==="L"?he(Ot,It)||(Oe.dtick=oe(Ot/It,2.5)?Ie.dtick/2:Ie.dtick):Oe.dtick="D1":Oe.dtick==="D2"&&+Ie.dtick>1&&(Oe.dtick=1)}Oe.range=Ie.range}((zt=Ie.minor)==null?void 0:zt._tick0Init)===void 0&&(Oe.tick0=Ie.tick0)};function he(Oe,Ie){return Math.abs((Oe/Ie+.5)%1-.5)<.001}function oe(Oe,Ie){return Math.abs(Oe/Ie-1)<.001}U.prepTicks=function(Oe,Ie){var Et=s.simpleMap(Oe.range,Oe.r2l,void 0,void 0,Ie);if(Oe.tickmode==="auto"||!Oe.dtick){var Mt=Oe.nticks,zt;Mt||(Oe.type==="category"||Oe.type==="multicategory"?(zt=Oe.tickfont?s.bigFont(Oe.tickfont.size||12):15,Mt=Oe._length/zt):(zt=Oe._id.charAt(0)==="y"?40:80,Mt=s.constrain(Oe._length/zt,4,9)+1),Oe._name==="radialaxis"&&(Mt*=2)),Oe.minor&&Oe.minor.tickmode!=="array"||Oe.tickmode==="array"&&(Mt*=100),Oe._roughDTick=Math.abs(Et[1]-Et[0])/Mt,U.autoTicks(Oe,Oe._roughDTick),Oe._minDtick>0&&Oe.dtick0?(Gt=Mt-1,Ht=Mt):(Gt=Mt,Ht=Mt);var Be=Oe[Gt].value,et=Oe[Ht].value,ut=Math.abs(et-Be),bt=Et||ut,Ot=0;bt>=_?ut>=_&&ut<=m?Ot=ut:Ot=y:Et===x&&bt>=E?ut>=E&&ut<=v?Ot=ut:Ot=x:bt>=w?ut>=w&&ut<=M?Ot=ut:Ot=C:Et===k&&bt>=k?Ot=k:bt>=T?Ot=T:Et===b&&bt>=b?Ot=b:Et===S&&bt>=S&&(Ot=S);var It;Ot>=ut&&(Ot=ut,It=!0);var Wt=zt+Ot;if(Ie.rangebreaks&&Ot>0){for(var jt=84,sr=0,kr=0;krk&&(Ot=ut)}(Ot>0||Mt===0)&&(Oe[Mt].periodX=zt+Ot/2)}}U.calcTicks=function(Ie,Et){for(var Mt=Ie.type,zt=Ie.calendar,Gt=Ie.ticklabelstep,Ht=Ie.ticklabelmode==="period",Be=Ie.range[0]>Ie.range[1],et=!Ie.ticklabelindex||s.isArrayOrTypedArray(Ie.ticklabelindex)?Ie.ticklabelindex:[Ie.ticklabelindex],ut=s.simpleMap(Ie.range,Ie.r2l,void 0,void 0,Et),bt=ut[1]=(ni?0:1);Ca--){var Li=!Ca;Ca?(Ie._dtickInit=Ie.dtick,Ie._tick0Init=Ie.tick0):ni&&(Ie.minor._dtickInit=Ie.minor.dtick,Ie.minor._tick0Init=Ie.minor.tick0);var Va=Ca?Ie:s.extendFlat({},Ie,ni?Ie.minor:{minor:{}});if(Li?U.prepMinorTicks(Va,Ie,Et):U.prepTicks(Va,Et),Va.tickmode==="array"){Ca?(kr=[],jt=Se(Ie,!Li)):(Mr=[],sr=Se(Ie,!Li));continue}if(Va.tickmode==="sync"){kr=[],jt=_e(Ie);continue}var dn=se(ut),rn=dn[0],pa=dn[1],_n=a(Va.dtick),Zi=Mt==="log"&&!(_n||Va.dtick.charAt(0)==="L"),Fi=U.tickFirst(Va,Et);if(Ca){if(Ie._tmin=Fi,Fi=pa:Ni<=pa;Ni=U.tickIncrement(Ni,bn,bt,zt)){if(Ca&&un++,Va.rangebreaks&&!bt){if(Ni=It)break}if(kr.length>Wt||Ni===xn)break;xn=Ni;var ui={value:le(Ni,Wa,bn)};Ca?(Ni===Fi&&(ui.first=!0),Zi&&Ni!==(Ni|0)&&(ui.simpleLabel=!0),Gt>1&&un%Gt&&(ui.skipLabel=!0),kr.push(ui)):(ui.minor=!0,Mr.push(ui))}}if(!Mr||Mr.length<3)et=!1;else{var Hi=(Mr[2].value-Mr[1].value)*(Be?-1:1);Nr(Hi,Ie.tickformat)||(et=!1,Mr=Mr.slice(1))}if(!et)ua=kr;else{var Vi=kr.concat(Mr);Ht&&kr.length&&(Vi=Vi.slice(1)),Vi=Vi.sort(function(oo,Bn){return oo.value-Bn.value}).filter(function(oo,Bn,An){return Bn===0||oo.value!==An[Bn-1].value});var $n=Vi.map(function(oo,Bn){return oo.minor===void 0&&!oo.skipLabel?Bn:null}).filter(function(oo){return oo!==null});$n.forEach(function(oo){et.map(function(Bn){var An=oo+Bn;An>=0&&An-1;wn--){if(kr[wn].drop){kr.splice(wn,1);continue}kr[wn].value=ia(kr[wn].value,Ie);var go=Ie.c2p(kr[wn].value);(os?Yn>go-uo:YnIt||PoIt&&(An.periodX=It),Pozt&&jtzt&&kry)Ie/=y,Mt=zt(10),Oe.dtick="M"+12*Pt(Ie,Mt,Me);else if(Gt>C)Ie/=C,Oe.dtick="M"+Pt(Ie,1,Ue);else if(Gt>T){if(Oe.dtick=Pt(Ie,T,Oe._hasDayOfWeekBreaks?[1,2,7,14]:Ze),!Et){var Ht=U.getTickFormat(Oe),Be=Oe.ticklabelmode==="period";Be&&(Oe._rawTick0=Oe.tick0),/%[uVW]/.test(Ht)?Oe.tick0=s.dateTick0(Oe.calendar,2):Oe.tick0=s.dateTick0(Oe.calendar,1),Be&&(Oe._dowTick0=Oe.tick0)}}else Gt>S?Oe.dtick=Pt(Ie,S,Ue):Gt>A?Oe.dtick=Pt(Ie,A,Ge):Gt>F?Oe.dtick=Pt(Ie,F,Ge):(Mt=zt(10),Oe.dtick=Pt(Ie,Mt,Me))}else if(Oe.type==="log"){Oe.tick0=0;var et=s.simpleMap(Oe.range,Oe.r2l);if(Oe._isMinor&&(Ie*=1.5),Ie>.7)Oe.dtick=Math.ceil(Ie);else if(Math.abs(et[1]-et[0])<1){var ut=1.5*Math.abs((et[1]-et[0])/Ie);Ie=Math.abs(Math.pow(10,et[1])-Math.pow(10,et[0]))/ut,Mt=zt(10),Oe.dtick="L"+Pt(Ie,Mt,Me)}else Oe.dtick=Ie>.3?"D2":"D1"}else Oe.type==="category"||Oe.type==="multicategory"?(Oe.tick0=0,Oe.dtick=Math.ceil(Math.max(Ie,1))):Ka(Oe)?(Oe.tick0=0,Mt=1,Oe.dtick=Pt(Ie,Mt,_t)):(Oe.tick0=0,Mt=zt(10),Oe.dtick=Pt(Ie,Mt,Me));if(Oe.dtick===0&&(Oe.dtick=1),!a(Oe.dtick)&&typeof Oe.dtick!="string"){var bt=Oe.dtick;throw Oe.dtick=1,"ax.dtick error: "+String(bt)}};function pt(Oe){var Ie=Oe.dtick;if(Oe._tickexponent=0,!a(Ie)&&typeof Ie!="string"&&(Ie=1),(Oe.type==="category"||Oe.type==="multicategory")&&(Oe._tickround=null),Oe.type==="date"){var Et=Oe.r2l(Oe.tick0),Mt=Oe.l2r(Et).replace(/(^-|i)/g,""),zt=Mt.length;if(String(Ie).charAt(0)==="M")zt>10||Mt.slice(5)!=="01-01"?Oe._tickround="d":Oe._tickround=+Ie.slice(1)%12===0?"y":"m";else if(Ie>=T&&zt<=10||Ie>=T*15)Oe._tickround="d";else if(Ie>=A&&zt<=16||Ie>=S)Oe._tickround="M";else if(Ie>=F&&zt<=19||Ie>=A)Oe._tickround="S";else{var Gt=Oe.l2r(Et+Ie).replace(/^-/,"").length;Oe._tickround=Math.max(zt,Gt)-20,Oe._tickround<0&&(Oe._tickround=4)}}else if(a(Ie)||Ie.charAt(0)==="L"){var Ht=Oe.range.map(Oe.r2d||Number);a(Ie)||(Ie=Number(Ie.slice(1))),Oe._tickround=2-Math.floor(Math.log(Ie)/Math.LN10+.01);var Be=Math.max(Math.abs(Ht[0]),Math.abs(Ht[1])),et=Math.floor(Math.log(Be)/Math.LN10+.01),ut=Oe.minexponent===void 0?3:Oe.minexponent;Math.abs(et)>ut&&(Je(Oe.exponentformat)&&Oe.exponentformat!=="SI extended"&&!qe(et)||Je(Oe.exponentformat)&&Oe.exponentformat==="SI extended"&&!at(et)?Oe._tickexponent=3*Math.round((et-1)/3):Oe._tickexponent=et)}else Oe._tickround=null}U.tickIncrement=function(Oe,Ie,Et,Mt){var zt=Et?-1:1;if(a(Ie))return s.increment(Oe,zt*Ie);var Gt=Ie.charAt(0),Ht=zt*Number(Ie.slice(1));if(Gt==="M")return s.incrementMonth(Oe,Ht,Mt);if(Gt==="L")return Math.log(Math.pow(10,Oe)+Ht)/Math.LN10;if(Gt==="D"){var Be=Ie==="D2"?dt:Ke,et=Oe+zt*.01,ut=s.roundUp(s.mod(et,1),Be,Et);return Math.floor(et)+Math.log(t.round(Math.pow(10,ut),1))/Math.LN10}throw"unrecognized dtick "+String(Ie)},U.tickFirst=function(Oe,Ie){var Et=Oe.r2l||Number,Mt=s.simpleMap(Oe.range,Et,void 0,void 0,Ie),zt=Mt[1]=0&&ni<=Oe._length?ra:null};if(et&&s.isArrayOrTypedArray(Oe.ticktext)){var jt=s.simpleMap(Oe.range,Oe.r2l),sr=(Math.abs(jt[1]-jt[0])-(Oe._lBreaks||0))/1e4;for(It=0;It"+Be;else{var ut=na(Oe),bt=Oe._trueSide||Oe.side;(!ut&&bt==="top"||ut&&bt==="bottom")&&(Ht+="
")}Ie.text=Ht}function Ve(Oe,Ie,Et,Mt,zt){var Gt=Oe.dtick,Ht=Ie.x,Be=Oe.tickformat,et=typeof Gt=="string"&&Gt.charAt(0);if(zt==="never"&&(zt=""),Mt&&et!=="L"&&(Gt="L3",et="L"),Be||et==="L")Ie.text=ct(Math.pow(10,Ht),Oe,zt,Mt);else if(a(Gt)||et==="D"&&(Oe.minorloglabels==="complete"||s.mod(Ht+.01,1)<.1)){var ut;Oe.minorloglabels==="complete"&&!(s.mod(Ht+.01,1)<.1)&&(ut=!0,Ie.fontSize*=.75);var bt=Math.pow(10,Ht).toExponential(0),Ot=bt.split("e"),It=+Ot[1],Wt=Math.abs(It),jt=Oe.exponentformat;jt==="power"||Je(jt)&&jt!=="SI extended"&&qe(It)||Je(jt)&&jt==="SI extended"&&at(It)?(Ie.text=Ot[0],Wt>0&&(Ie.text+="x10"),Ie.text==="1x10"&&(Ie.text="10"),It!==0&&It!==1&&(Ie.text+=""+(It>0?"":P)+Wt+""),Ie.fontSize*=1.25):(jt==="e"||jt==="E")&&Wt>2?Ie.text=Ot[0]+jt+(It>0?"+":P)+Wt:(Ie.text=ct(Math.pow(10,Ht),Oe,"","fakehover"),Gt==="D1"&&Oe._id.charAt(0)==="y"&&(Ie.dy-=Ie.fontSize/6))}else if(et==="D")Ie.text=Oe.minorloglabels==="none"?"":String(Math.round(Math.pow(10,s.mod(Ht,1)))),Ie.fontSize*=.75;else throw"unrecognized dtick "+String(Gt);if(Oe.dtick==="D1"){var sr=String(Ie.text).charAt(0);(sr==="0"||sr==="1")&&(Oe._id.charAt(0)==="y"?Ie.dx-=Ie.fontSize/4:(Ie.dy+=Ie.fontSize/2,Ie.dx+=(Oe.range[1]>Oe.range[0]?1:-1)*Ie.fontSize*(Ht<0?.5:.25)))}}function Ye(Oe,Ie){var Et=Oe._categories[Math.round(Ie.x)];Et===void 0&&(Et=""),Ie.text=String(Et)}function me(Oe,Ie,Et){var Mt=Math.round(Ie.x),zt=Oe._categories[Mt]||[],Gt=zt[1]===void 0?"":String(zt[1]),Ht=zt[0]===void 0?"":String(zt[0]);Et?Ie.text=Ht+" - "+Gt:(Ie.text=Gt,Ie.text2=Ht)}function be(Oe,Ie,Et,Mt,zt){zt==="never"?zt="":Oe.showexponent==="all"&&Math.abs(Ie.x/Oe.dtick)<1e-6&&(zt="hide"),Ie.text=ct(Ie.x,Oe,zt,Mt)}function Ee(Oe,Ie,Et,Mt,zt){if(Oe.thetaunit==="radians"&&!Et){var Gt=Ie.x/180;if(Gt===0)Ie.text="0";else{var Ht=De(Gt);if(Ht[1]>=100)Ie.text=ct(s.deg2rad(Ie.x),Oe,zt,Mt);else{var Be=Ie.x<0;Ht[1]===1?Ht[0]===1?Ie.text="\u03C0":Ie.text=Ht[0]+"\u03C0":Ie.text=["",Ht[0],"","\u2044","",Ht[1],"","\u03C0"].join(""),Be&&(Ie.text=P+Ie.text)}}}else Ie.text=ct(Ie.x,Oe,zt,Mt)}function De(Oe){function Ie(Be,et){return Math.abs(Be-et)<=1e-6}function Et(Be,et){return Ie(et,0)?Be:Et(et,Be%et)}function Mt(Be){for(var et=1;!Ie(Math.round(Be*et)/et,Be);)et*=10;return et}var zt=Mt(Oe),Gt=Oe*zt,Ht=Math.abs(Et(Gt,zt));return[Math.round(Gt/Ht),Math.round(zt/Ht)]}var Ce=["f","p","n","\u03BC","m","","k","M","G","T"],Fe=["q","r","y","z","a",...Ce,"P","E","Z","Y","R","Q"],Je=Oe=>["SI","SI extended","B"].includes(Oe);function qe(Oe){return Oe>14||Oe<-15}function at(Oe){return Oe>32||Oe<-30}function tt(Oe,Ie){return Je(Ie)?!!(Ie==="SI extended"&&at(Oe)||Ie!=="SI extended"&&qe(Oe)):!1}function ct(Oe,Ie,Et,Mt){var zt=Oe<0,Gt=Ie._tickround,Ht=Et||Ie.exponentformat||"B",Be=Ie._tickexponent,et=U.getTickFormat(Ie),ut=Ie.separatethousands;if(Mt){var bt={exponentformat:Ht,minexponent:Ie.minexponent,dtick:Ie.showexponent==="none"?Ie.dtick:a(Oe)&&Math.abs(Oe)||1,range:Ie.showexponent==="none"?Ie.range.map(Ie.r2d):[0,Oe||1]};pt(bt),Gt=(Number(bt._tickround)||0)+4,Be=bt._tickexponent,Ie.hoverformat&&(et=Ie.hoverformat)}if(et)return Ie._numFormat(et)(Oe).replace(/-/g,P);Ht==="none"&&(Be=0),Oe=Math.abs(Oe);let Ot=Math.pow(10,-Gt)/2;if(Oe"+It+"":Ht==="B"&&Be===9?Oe+="B":Je(Ht)&&(Oe+=Ht==="SI extended"?Fe[Be/3+10]:Ce[Be/3+5])}return zt?P+Oe:Oe}U.getTickFormat=function(Oe){var Ie;function Et(et){return typeof et!="string"?et:Number(et.replace("M",""))*C}function Mt(et,ut){var bt=["L","D"];if(typeof et==typeof ut){if(typeof et=="number")return et-ut;var Ot=bt.indexOf(et.charAt(0)),It=bt.indexOf(ut.charAt(0));return Ot===It?Number(et.replace(/(L|D)/g,""))-Number(ut.replace(/(L|D)/g,"")):Ot-It}else return typeof et=="number"?1:-1}function zt(et,ut,bt){var Ot=bt||function(jt){return jt},It=ut[0],Wt=ut[1];return(!It&&typeof It!="number"||Ot(It)<=Ot(et))&&(!Wt&&typeof Wt!="number"||Ot(Wt)>=Ot(et))}function Gt(et,ut){var bt=ut[0]===null,Ot=ut[1]===null,It=Mt(et,ut[0])>=0,Wt=Mt(et,ut[1])<=0;return(bt||It)&&(Ot||Wt)}var Ht,Be;if(Oe.tickformatstops&&Oe.tickformatstops.length>0)switch(Oe.type){case"date":case"linear":{for(Ie=0;Ie=0&&zt.unshift(zt.splice(bt,1).shift())}});var Be={false:{left:0,right:0}};return s.syncOrAsync(zt.map(function(et){return function(){if(et){var ut=U.getFromId(Oe,et);Et||(Et={}),Et.axShifts=Be,Et.overlayingShiftedAx=Ht;var bt=U.drawOne(Oe,ut,Et);return ut._shiftPusher&&Yi(ut,ut._fullDepth||0,Be,!0),ut._r=ut.range.slice(),ut._rl=s.simpleMap(ut._r,ut.r2l),bt}}}))},U.drawOne=function(Oe,Ie,Et){Et=Et||{};var Mt=Et.axShifts||{},zt=Et.overlayingShiftedAx||[],Gt,Ht,Be;Ie.setScale();var et=Oe._fullLayout,ut=Ie._id,bt=ut.charAt(0),Ot=U.counterLetter(ut),It=et._plots[Ie._mainSubplot],Wt=Ie.zerolinelayer==="above traces";if(!It)return;if(Ie._shiftPusher=Ie.autoshift||zt.indexOf(Ie._id)!==-1||zt.indexOf(Ie.overlaying)!==-1,Ie._shiftPusher&Ie.anchor==="free"){var jt=Ie.linewidth/2||0;Ie.ticks==="inside"&&(jt+=Ie.ticklen),Yi(Ie,jt,Mt,!0),Yi(Ie,Ie.shift||0,Mt,!1)}(Et.skipTitle!==!0||Ie._shift===void 0)&&(Ie._shift=Qr(Ie,Mt));var sr=It[bt+"axislayer"],kr=Ie._mainLinePosition,Mr=kr+=Ie._shift,ua=Ie._mainMirrorPosition,ra=Ie._vals=U.calcTicks(Ie),ni=[Ie.mirror,Mr,ua].join("_");for(Gt=0;Gt0?Bn.bottom-ss:0,oo))));var Lu=0,Jl=0;if(Ie._shiftPusher&&(Lu=Math.max(oo,Bn.height>0?yo==="l"?ss-Bn.left:Bn.right-ss:0),Ie.title.text!==et._dfltTitle[bt]&&(Jl=(Ie._titleStandoff||0)+(Ie._titleScoot||0),yo==="l"&&(Jl+=Vt(Ie))),Ie._fullDepth=Math.max(Lu,Jl)),Ie.automargin){An={x:0,y:0,r:0,l:0,t:0,b:0};var Fu=[0,1],Pu=typeof Ie._shift=="number"?Ie._shift:0;if(bt==="x"){if(yo==="b"?An[yo]=Ie._depth:(An[yo]=Ie._depth=Math.max(Bn.width>0?ss-Bn.top:0,oo),Fu.reverse()),Bn.width>0){var Ku=Bn.right-(Ie._offset+Ie._length);Ku>0&&(An.xr=1,An.r=Ku);var mu=Ie._offset-Bn.left;mu>0&&(An.xl=0,An.l=mu)}}else if(yo==="l"?(Ie._depth=Math.max(Bn.height>0?ss-Bn.left:0,oo),An[yo]=Ie._depth-Pu):(Ie._depth=Math.max(Bn.height>0?Bn.right-ss:0,oo),An[yo]=Ie._depth+Pu,Fu.reverse()),Bn.height>0){var $c=Bn.bottom-(Ie._offset+Ie._length);$c>0&&(An.yb=0,An.b=$c);var Ju=Ie._offset-Bn.top;Ju>0&&(An.yt=1,An.t=Ju)}An[Ot]=Ie.anchor==="free"?Ie.position:Ie._anchorAxis.domain[Fu[0]],Ie.title.text!==et._dfltTitle[bt]&&(An[yo]+=Vt(Ie)+(Ie.title.standoff||0)),Ie.mirror&&Ie.anchor!=="free"&&(Po={x:0,y:0,r:0,l:0,t:0,b:0},Po[sl]=Ie.linewidth,Ie.mirror&&Ie.mirror!==!0&&(Po[sl]+=oo),Ie.mirror===!0||Ie.mirror==="ticks"?Po[Ot]=Ie._anchorAxis.domain[Fu[1]]:(Ie.mirror==="all"||Ie.mirror==="allticks")&&(Po[Ot]=[Ie._counterDomainMin,Ie._counterDomainMax][Fu[1]]))}gs&&(Bl=o.getComponentMethod("rangeslider","autoMarginOpts")(Oe,Ie)),typeof Ie.automargin=="string"&&(At(An,Ie.automargin),At(Po,Ie.automargin)),i.autoMargin(Oe,la(Ie),An),i.autoMargin(Oe,Hr(Ie),Po),i.autoMargin(Oe,jr(Ie),Bl)}),s.syncOrAsync(Cn)}};function At(Oe,Ie){if(Oe){var Et=Object.keys($).reduce(function(Mt,zt){return Ie.indexOf(zt)!==-1&&$[zt].forEach(function(Gt){Mt[Gt]=1}),Mt},{});Object.keys(Oe).forEach(function(Mt){Et[Mt]||(Mt.length===1?Oe[Mt]=0:delete Oe[Mt])})}}function ft(Oe,Ie){var Et=[],Mt,zt=function(Gt,Ht){var Be=Gt.xbnd[Ht];Be!==null&&Et.push(s.extendFlat({},Gt,{x:Be}))};if(Ie.length){for(Mt=0;MtOe.range[1],Be=Oe.ticklabelposition&&Oe.ticklabelposition.indexOf("inside")!==-1,et=!Be;if(Et){var ut=Ht?-1:1;Et=Et*ut}if(Mt){var bt=Oe.side,Ot=Be&&(bt==="top"||bt==="left")||et&&(bt==="bottom"||bt==="right")?1:-1;Mt=Mt*Ot}return Oe._id.charAt(0)==="x"?function(It){return l(zt+Oe._offset+Oe.l2p(gt(It))+Et,Gt+Mt)}:function(It){return l(Gt+Mt,zt+Oe._offset+Oe.l2p(gt(It))+Et)}};function gt(Oe){return Oe.periodX!==void 0?Oe.periodX:Oe.x}function St(Oe){var Ie=Oe.ticklabelposition||"",Et=Oe.tickson||"",Mt=function(jt){return Ie.indexOf(jt)!==-1},zt=Mt("top"),Gt=Mt("left"),Ht=Mt("right"),Be=Mt("bottom"),et=Mt("inside"),ut=Et!=="boundaries"&&(Be||Gt||zt||Ht);if(!ut&&!et)return[0,0];var bt=Oe.side,Ot=ut?(Oe.tickwidth||0)/2:0,It=W,Wt=Oe.tickfont?Oe.tickfont.size:12;return(Be||zt)&&(Ot+=Wt*J,It+=(Oe.linewidth||0)/2),(Gt||Ht)&&(Ot+=(Oe.linewidth||0)/2,It+=W),et&&bt==="top"&&(It-=Wt*(1-J)),(Gt||zt)&&(Ot=-Ot),(bt==="bottom"||bt==="right")&&(It=-It),[ut?Ot:0,et?It:0]}U.makeTickPath=function(Oe,Ie,Et,Mt){Mt||(Mt={});var zt=Mt.minor;if(zt&&!Oe.minor)return"";var Gt=Mt.len!==void 0?Mt.len:zt?Oe.minor.ticklen:Oe.ticklen,Ht=Oe._id.charAt(0),Be=(Oe.linewidth||1)/2;return Ht==="x"?"M0,"+(Ie+Be*Et)+"v"+Gt*Et:"M"+(Ie+Be*Et)+",0h"+Gt*Et},U.makeLabelFns=function(Oe,Ie,Et){var Mt=Oe.ticklabelposition||"",zt=Oe.tickson||"",Gt=function(Fi){return Mt.indexOf(Fi)!==-1},Ht=Gt("top"),Be=Gt("left"),et=Gt("right"),ut=Gt("bottom"),bt=zt!=="boundaries"&&(ut||Be||Ht||et),Ot=Gt("inside"),It=Mt==="inside"&&Oe.ticks==="inside"||!Ot&&Oe.ticks==="outside"&&zt!=="boundaries",Wt=0,jt=0,sr=It?Oe.ticklen:0;if(Ot?sr*=-1:bt&&(sr=0),It&&(Wt+=sr,Et)){var kr=s.deg2rad(Et);Wt=sr*Math.cos(kr)+1,jt=sr*Math.sin(kr)}Oe.showticklabels&&(It||Oe.showline)&&(Wt+=.2*Oe.tickfont.size),Wt+=(Oe.linewidth||1)/2*(Ot?-1:1);var Mr={labelStandoff:Wt,labelShift:jt},ua,ra,ni,Ca,Li=0,Va=Oe.side,dn=Oe._id.charAt(0),rn=Oe.tickangle,pa;if(dn==="x")pa=!Ot&&Va==="bottom"||Ot&&Va==="top",Ca=pa?1:-1,Ot&&(Ca*=-1),ua=jt*Ca,ra=Ie+Wt*Ca,ni=pa?1:-.2,Math.abs(rn)===90&&(Ot?ni+=Z:rn===-90&&Va==="bottom"?ni=J:rn===90&&Va==="top"?ni=Z:ni=.5,Li=Z/2*(rn/90)),Mr.xFn=function(Fi){return Fi.dx+ua+Li*Fi.fontSize},Mr.yFn=function(Fi){return Fi.dy+ra+Fi.fontSize*ni},Mr.anchorFn=function(Fi,xn){if(bt){if(Be)return"end";if(et)return"start"}return!a(xn)||xn===0||xn===180?"middle":xn*Ca<0!==Ot?"end":"start"},Mr.heightFn=function(Fi,xn,Ni){return xn<-60||xn>60?-.5*Ni:Oe.side==="top"!==Ot?-Ni:0};else if(dn==="y"){if(pa=!Ot&&Va==="left"||Ot&&Va==="right",Ca=pa?1:-1,Ot&&(Ca*=-1),ua=Wt,ra=jt*Ca,ni=0,!Ot&&Math.abs(rn)===90&&(rn===-90&&Va==="left"||rn===90&&Va==="right"?ni=J:ni=.5),Ot){var _n=a(rn)?+rn:0;if(_n!==0){var Zi=s.deg2rad(_n);Li=Math.abs(Math.sin(Zi))*J*Ca,ni=0}}Mr.xFn=function(Fi){return Fi.dx+Ie-(ua+Fi.fontSize*ni)*Ca+Li*Fi.fontSize},Mr.yFn=function(Fi){return Fi.dy+ra+Fi.fontSize*Z},Mr.anchorFn=function(Fi,xn){return a(xn)&&Math.abs(xn)===90?"middle":pa?"end":"start"},Mr.heightFn=function(Fi,xn,Ni){return Oe.side==="right"&&(xn*=-1),xn<-30?-Ni:xn<30?-.5*Ni:0}}return Mr};function Dt(Oe){return[Oe.text,Oe.x,Oe.axInfo,Oe.font,Oe.fontSize,Oe.fontColor].join("_")}U.drawTicks=function(Oe,Ie,Et){Et=Et||{};var Mt=Ie._id+"tick",zt=[].concat(Ie.minor&&Ie.minor.ticks?Et.vals.filter(function(Ht){return Ht.minor&&!Ht.noTick}):[]).concat(Ie.ticks?Et.vals.filter(function(Ht){return!Ht.minor&&!Ht.noTick}):[]),Gt=Et.layer.selectAll("path."+Mt).data(zt,Dt);Gt.exit().remove(),Gt.enter().append("path").classed(Mt,1).classed("ticks",1).classed("crisp",Et.crisp!==!1).each(function(Ht){return c.stroke(t.select(this),Ht.minor?Ie.minor.tickcolor:Ie.tickcolor)}).style("stroke-width",function(Ht){return f.crispRound(Oe,Ht.minor?Ie.minor.tickwidth:Ie.tickwidth,1)+"px"}).attr("d",Et.path).style("display",null),xi(Ie,[O]),Gt.attr("transform",Et.transFn)},U.drawGrid=function(Oe,Ie,Et){if(Et=Et||{},Ie.tickmode!=="sync"){var Mt=Ie._id+"grid",zt=Ie.minor&&Ie.minor.showgrid,Gt=zt?Et.vals.filter(function(Mr){return Mr.minor}):[],Ht=Ie.showgrid?Et.vals.filter(function(Mr){return!Mr.minor}):[],Be=Et.counterAxis;if(Be&&U.shouldShowZeroLine(Oe,Ie,Be))for(var et=Ie.tickmode==="array",ut=0;ut=0;jt--){var sr=jt?It:Wt;if(sr){var kr=sr.selectAll("path."+Mt).data(jt?Ht:Gt,Dt);kr.exit().remove(),kr.enter().append("path").classed(Mt,1).classed("crisp",Et.crisp!==!1),kr.attr("transform",Et.transFn).attr("d",Et.path).each(function(Mr){return c.stroke(t.select(this),Mr.minor?Ie.minor.gridcolor:Ie.gridcolor||"#ddd")}).style("stroke-dasharray",function(Mr){return f.dashStyle(Mr.minor?Ie.minor.griddash:Ie.griddash,Mr.minor?Ie.minor.gridwidth:Ie.gridwidth)}).style("stroke-width",function(Mr){return(Mr.minor?Ot:Ie._gw)+"px"}).style("display",null),typeof Et.path=="function"&&kr.attr("d",Et.path)}}xi(Ie,[L,B])}},U.drawZeroLine=function(Oe,Ie,Et){Et=Et||Et;var Mt=Ie._id+"zl",zt=U.shouldShowZeroLine(Oe,Ie,Et.counterAxis),Gt=Et.layer.selectAll("path."+Mt).data(zt?[{x:0,id:Ie._id}]:[]);Gt.exit().remove(),Gt.enter().append("path").classed(Mt,1).classed("zl",1).classed("crisp",Et.crisp!==!1).each(function(){Et.layer.selectAll("path").sort(function(Ht,Be){return q(Ht.id,Be.id)})}),Gt.attr("transform",Et.transFn).attr("d",Et.path).call(c.stroke,Ie.zerolinecolor||c.defaultLine).style("stroke-width",f.crispRound(Oe,Ie.zerolinewidth,Ie._gw||1)+"px").style("display",null),xi(Ie,[I])},U.drawLabels=function(Oe,Ie,Et){Et=Et||{};var Mt=Oe._fullLayout,zt=Ie._id,Gt=Ie.zerolinelayer==="above traces",Ht=Et.cls||zt+"tick",Be=Et.vals.filter(function(Wa){return Wa.text}),et=Et.labelFns,ut=Et.secondary?0:Ie.tickangle,bt=(Ie._prevTickAngles||{})[Ht],Ot=Et.layer.selectAll("g."+Ht).data(Ie.showticklabels?Be:[],Dt),It=[];Ot.enter().append("g").classed(Ht,1).append("text").attr("text-anchor","middle").each(function(Wa){var ui=t.select(this),Hi=Oe._promises.length;ui.call(n.positionText,et.xFn(Wa),et.yFn(Wa)).call(f.font,{family:Wa.font,size:Wa.fontSize,color:Wa.fontColor,weight:Wa.fontWeight,style:Wa.fontStyle,variant:Wa.fontVariant,textcase:Wa.fontTextcase,lineposition:Wa.fontLineposition,shadow:Wa.fontShadow}).text(Wa.text).call(n.convertToTspans,Oe),Oe._promises[Hi]?It.push(Oe._promises.pop().then(function(){Wt(ui,ut)})):Wt(ui,ut)}),xi(Ie,[G]),Ot.exit().remove(),Et.repositionOnUpdate&&Ot.each(function(Wa){t.select(this).select("text").call(n.positionText,et.xFn(Wa),et.yFn(Wa))});function Wt(Wa,ui){Wa.each(function(Hi){var Vi=t.select(this),$n=Vi.select(".text-math-group"),ro=et.anchorFn(Hi,ui),Un=Et.transFn.call(Vi.node(),Hi)+(a(ui)&&+ui!=0?" rotate("+ui+","+et.xFn(Hi)+","+(et.yFn(Hi)-Hi.fontSize/2)+")":""),Kn=n.lineCount(Vi),To=N*Hi.fontSize,Jn=et.heightFn(Hi,a(ui)?+ui:0,(Kn-1)*To);if(Jn&&(Un+=l(0,Jn)),$n.empty()){var qn=Vi.select("text");qn.attr({transform:Un,"text-anchor":ro}),qn.style("display",null),Ie._adjustTickLabelsOverflow&&Ie._adjustTickLabelsOverflow()}else{var Fo=f.bBox($n.node()).width,zn=Fo*{end:-.5,start:.5}[ro];$n.attr("transform",Un+l(zn,0))}})}Ie._adjustTickLabelsOverflow=function(){var Wa=Ie.ticklabeloverflow;if(!(!Wa||Wa==="allow")){var ui=Wa.indexOf("hide")!==-1,Hi=Ie._id.charAt(0)==="x",Vi=0,$n=Hi?Oe._fullLayout.width:Oe._fullLayout.height;if(Wa.indexOf("domain")!==-1){var ro=s.simpleMap(Ie.range,Ie.r2l);Vi=Ie.l2p(ro[0])+Ie._offset,$n=Ie.l2p(ro[1])+Ie._offset}var Un=Math.min(Vi,$n),Kn=Math.max(Vi,$n),To=Ie.side,Jn=1/0,qn=-1/0;Ot.each(function(os){var uo=t.select(this),Yn=uo.select(".text-math-group");if(Yn.empty()){var go=f.bBox(uo.node()),Cn=0;Hi?(go.right>Kn||go.leftKn||go.top+(Ie.tickangle?0:os.fontSize/4)Ie["_visibleLabelMin_"+ro._id]?uo.style("display","none"):Kn.K==="tick"&&!Un&&uo.node().style.display!=="none"&&uo.style("display",null)})})})})},Wt(Ot,bt+1?bt:ut);function jt(){return It.length&&Promise.all(It)}var sr=null;function kr(){if(Wt(Ot,ut),Be.length&&Ie.autotickangles&&(Ie.type!=="log"||String(Ie.dtick).charAt(0)!=="D")){sr=Ie.autotickangles[0];var Wa=0,ui=[],Hi,Vi=1;Ot.each(function(An){Wa=Math.max(Wa,An.fontSize);var Po=Ie.l2p(An.x),Bl=Fr(this),Lu=f.bBox(Bl.node());Vi=Math.max(Vi,n.lineCount(Bl)),ui.push({top:0,bottom:10,height:10,left:Po-Lu.width/2,right:Po+Lu.width/2+2,width:Lu.width+2})});var $n=(Ie.tickson==="boundaries"||Ie.showdividers)&&!Et.secondary,ro=Be.length,Un=Math.abs((Be[ro-1].x-Be[0].x)*Ie._m)/(ro-1),Kn=$n?Un/2:Un,To=$n?Ie.ticklen:Wa*1.25*Vi,Jn=Math.sqrt(Math.pow(Kn,2)+Math.pow(To,2)),qn=Kn/Jn,Fo=Ie.autotickangles.map(function(An){return An*Math.PI/180}),zn=Fo.find(function(An){return Math.abs(Math.cos(An))<=qn});zn===void 0&&(zn=Fo.reduce(function(An,Po){return Math.abs(Math.cos(An))un*Ni&&(Zi=Ni,rn[dn]=pa[dn]=Fi[dn])}var jn=Math.abs(Zi-_n);jn-Ca>0?(jn-=Ca,Ca*=1+Ca/jn):Ca=0,Ie._id.charAt(0)!=="y"&&(Ca=-Ca),rn[Va]=ra.p2r(ra.r2p(pa[Va])+Li*Ca),ra.autorange==="min"||ra.autorange==="max reversed"?(rn[0]=null,ra._rangeInitial0=void 0,ra._rangeInitial1=void 0):(ra.autorange==="max"||ra.autorange==="min reversed")&&(rn[1]=null,ra._rangeInitial0=void 0,ra._rangeInitial1=void 0),Mt._insideTickLabelsUpdaterange[ra._name+".range"]=rn}var bn=s.syncOrAsync(Mr);return bn&&bn.then&&Oe._promises.push(bn),bn};function kt(Oe,Ie,Et){var Mt=Ie._id+"divider",zt=Et.vals,Gt=Et.layer.selectAll("path."+Mt).data(zt,Dt);Gt.exit().remove(),Gt.enter().insert("path",":first-child").classed(Mt,1).classed("crisp",1).call(c.stroke,Ie.dividercolor).style("stroke-width",f.crispRound(Oe,Ie.dividerwidth,1)+"px"),Gt.attr("transform",Et.transFn).attr("d",Et.path)}U.getPxPosition=function(Oe,Ie){var Et=Oe._fullLayout._size,Mt=Ie._id.charAt(0),zt=Ie.side,Gt;if(Ie.anchor!=="free"?Gt=Ie._anchorAxis:Mt==="x"?Gt={_offset:Et.t+(1-(Ie.position||0))*Et.h,_length:0}:Mt==="y"&&(Gt={_offset:Et.l+(Ie.position||0)*Et.w+Ie._shift,_length:0}),zt==="top"||zt==="left")return Gt._offset;if(zt==="bottom"||zt==="right")return Gt._offset+Gt._length};function Vt(Oe){var Ie=Oe.title.font.size,Et=(Oe.title.text.match(n.BR_TAG_ALL)||[]).length;return Oe.title.hasOwnProperty("standoff")?Ie*(J+Et*N):Et?Ie*(Et+1)*N:Ie}function lr(Oe,Ie){var Et=Oe._fullLayout,Mt=Ie._id,zt=Mt.charAt(0),Gt=Ie.title.font.size,Ht,Be=(Ie.title.text.match(n.BR_TAG_ALL)||[]).length;if(Ie.title.hasOwnProperty("standoff"))Ie.side==="bottom"||Ie.side==="right"?Ht=Ie._depth+Ie.title.standoff+Gt*J:(Ie.side==="top"||Ie.side==="left")&&(Ht=Ie._depth+Ie.title.standoff+Gt*(Z+Be*N));else{var et=na(Ie);if(Ie.type==="multicategory")Ht=Ie._depth;else{var ut=1.5*Gt;et&&(ut=.5*Gt,Ie.ticks==="outside"&&(ut+=Ie.ticklen)),Ht=10+ut+(Ie.linewidth?Ie.linewidth-1:0)}et||(zt==="x"?Ht+=Ie.side==="top"?Gt*(Ie.showticklabels?1:0):Gt*(Ie.showticklabels?1.5:.5):Ht+=Ie.side==="right"?Gt*(Ie.showticklabels?1:.5):Gt*(Ie.showticklabels?.5:0))}var bt=U.getPxPosition(Oe,Ie),Ot,It,Wt;zt==="x"?(It=Ie._offset+Ie._length/2,Wt=Ie.side==="top"?bt-Ht:bt+Ht):(Wt=Ie._offset+Ie._length/2,It=Ie.side==="right"?bt+Ht:bt-Ht,Ot={rotate:"-90",offset:0});var jt;if(Ie.type!=="multicategory"){var sr=Ie._selections[Ie._id+"tick"];if(jt={selection:sr,side:Ie.side},sr&&sr.node()&&sr.node().parentNode){var kr=f.getTranslate(sr.node().parentNode);jt.offsetLeft=kr.x,jt.offsetTop=kr.y}Ie.title.hasOwnProperty("standoff")&&(jt.pad=0)}return Ie._titleStandoff=Ht,u.draw(Oe,Mt+"title",{propContainer:Ie,propName:Ie._name+".title.text",placeholder:Et._dfltTitle[zt],avoid:jt,transform:Ot,attributes:{x:It,y:Wt,"text-anchor":"middle"}})}U.shouldShowZeroLine=function(Oe,Ie,Et){var Mt=s.simpleMap(Ie.range,Ie.r2l);return Mt[0]*Mt[1]<=0&&Ie.zeroline&&(Ie.type==="linear"||Ie.type==="-")&&!(Ie.rangebreaks&&Ie.maskBreaks(0)===z)&&(dr(Ie,0)||!yr(Oe,Ie,Et,Mt)||vr(Oe,Ie))},U.clipEnds=function(Oe,Ie){return Ie.filter(function(Et){return dr(Oe,Et.x)})};function dr(Oe,Ie){var Et=Oe.l2p(Ie);return Et>1&&Et1)for(zt=1;zt=zt.min&&Oe=R:/%L/.test(Ie)?Oe>=D:/%[SX]/.test(Ie)?Oe>=F:/%M/.test(Ie)?Oe>=A:/%[HI]/.test(Ie)?Oe>=S:/%p/.test(Ie)?Oe>=b:/%[Aadejuwx]/.test(Ie)?Oe>=T:/%[UVW]/.test(Ie)?Oe>=k:/%[Bbm]/.test(Ie)?Oe>=w:/%[q]/.test(Ie)?Oe>=E:/%[Yy]/.test(Ie)?Oe>=_:!0}}}),ZD=ye({"src/plots/cartesian/autorange_options_defaults.js"(e,r){"use strict";r.exports=function(a,i,o){var s,l;if(o){var n=i==="reversed"||i==="min reversed"||i==="max reversed";s=o[n?1:0],l=o[n?0:1]}var u=a("autorangeoptions.minallowed",l===null?s:void 0),c=a("autorangeoptions.maxallowed",s===null?l:void 0);u===void 0&&a("autorangeoptions.clipmin"),c===void 0&&a("autorangeoptions.clipmax"),a("autorangeoptions.include")}}}),KD=ye({"src/plots/cartesian/range_defaults.js"(e,r){"use strict";var t=ZD();r.exports=function(i,o,s,l){var n=o._template||{},u=o.type||n.type||"-";s("minallowed"),s("maxallowed");var c=s("range");if(!c){var f;!l.noInsiderange&&u!=="log"&&(f=s("insiderange"),f&&(f[0]===null||f[1]===null)&&(o.insiderange=!1,f=void 0),f&&(c=s("range",f)))}var h=o.getAutorangeDflt(c,l),d=s("autorange",h),p;c&&(c[0]===null&&c[1]===null||(c[0]===null||c[1]===null)&&(d==="reversed"||d===!0)||c[0]!==null&&(d==="min"||d==="max reversed")||c[1]!==null&&(d==="max"||d==="min reversed"))&&(c=void 0,delete o.range,o.autorange=!0,p=!0),p||(h=o.getAutorangeDflt(c,l),d=s("autorange",h)),d&&(t(s,d,c),(u==="linear"||u==="-")&&s("rangemode")),o.cleanRange()}}}),Hee=ye({"node_modules/mouse-event-offset/index.js"(e,r){var t={left:0,top:0};r.exports=a;function a(o,s,l){s=s||o.currentTarget||o.srcElement,Array.isArray(l)||(l=[0,0]);var n=o.clientX||0,u=o.clientY||0,c=i(s);return l[0]=n-c.left,l[1]=u-c.top,l}function i(o){return o===window||o===document||o===document.body?t:o.getBoundingClientRect()}}}),AA=ye({"node_modules/has-passive-events/index.js"(e,r){"use strict";var t=UD();function a(){var i=!1;try{var o=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("test",null,o),window.removeEventListener("test",null,o)}catch{i=!1}return i}r.exports=t&&a()}}),Wee=ye({"src/components/dragelement/align.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){var n=(a-o)/(s-o),u=n+i/(s-o),c=(n+u)/2;return l==="left"||l==="bottom"?n:l==="center"||l==="middle"?c:l==="right"||l==="top"?u:n<2/3-c?n:u>4/3-c?u:c}}}),$ee=ye({"src/components/dragelement/cursor.js"(e,r){"use strict";var t=Yt(),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];r.exports=function(o,s,l,n){return l==="left"?o=0:l==="center"?o=1:l==="right"?o=2:o=t.constrain(Math.floor(o*3),0,2),n==="bottom"?s=0:n==="middle"?s=1:n==="top"?s=2:s=t.constrain(Math.floor(s*3),0,2),a[s][o]}}}),Yee=ye({"src/components/dragelement/unhover.js"(e,r){"use strict";var t=py(),a=xA(),i=Gx().getGraphDiv,o=qx(),s=r.exports={};s.wrapped=function(l,n,u){var c;l=i(l),l._fullLayout&&a.clear(l._fullLayout._uid+o.HOVERID);let f=l._hoverdata;s.raw(l,n,u)&&l._hoverAnywhereActive&&(l._hoverAnywhereActive=!1,(c=l._fullLayout)!=null&&c.hoveranywhere&&n?.target&&!f&&l.emit("plotly_unhover",{event:n,points:[]}))},s.raw=function(n,u){var c=n._fullLayout,f=n._hoverdata;return u||(u={}),u.target&&!n._dragged&&t.triggerHandler(n,"plotly_beforehover",u)===!1?!1:(c._hoverlayer.selectAll("g").remove(),c._hoverlayer.selectAll("line").remove(),c._hoverlayer.selectAll("circle").remove(),n._hoverdata=void 0,u.target&&f&&n.emit("plotly_unhover",{event:u,points:f}),!0)}}}),_f=ye({"src/components/dragelement/index.js"(e,r){"use strict";var t=Hee(),a=qD(),i=AA(),o=Yt().removeElement,s=$l(),l=r.exports={};l.align=Wee(),l.getCursor=$ee();var n=Yee();l.unhover=n.wrapped,l.unhoverRaw=n.raw,l.init=function(h){var d=h.gd,p=1,g=d._context.doubleClickDelay,m=h.element,y,_,v,x,E,M,C,w;d._mouseDownTime||(d._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=b,i?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=b,m.addEventListener("touchstart",b,{passive:!1})):m.ontouchstart=b;function k(F,D,R){return Math.abs(F)"u"&&typeof F.clientY>"u"&&(F.clientX=y,F.clientY=_),v=new Date().getTime(),v-d._mouseDownTimeg&&(p=Math.max(p-1,1)),d._dragged)h.doneFn&&h.doneFn();else{var D;M.target===C?D=M:(D={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(R=>{var P=M[R];!D[R]&&typeof P!="function"&&(D[R]=P)})),h.clickFn&&h.clickFn(p,D),w||C.dispatchEvent(new MouseEvent("click",F))}d._dragging=!1,d._dragged=!1}};function u(){var f=document.createElement("div");f.className="dragcover";var h=f.style;return h.position="fixed",h.left=0,h.right=0,h.top=0,h.bottom=0,h.zIndex=999999999,h.background="none",document.body.appendChild(f),f}l.coverSlip=u;function c(f){return t(f.changedTouches?f.changedTouches[0]:f,document.body)}}}),rp=ye({"src/lib/setcursor.js"(e,r){"use strict";r.exports=function(a,i){(a.attr("class")||"").split(" ").forEach(function(o){o.indexOf("cursor-")===0&&a.classed(o,!1)}),i&&a.classed("cursor-"+i,!0)}}}),Xee=ye({"src/lib/override_cursor.js"(e,r){"use strict";var t=rp(),a="data-savedcursor",i="!!";r.exports=function(s,l){var n=s.attr(a);if(l){if(!n){for(var u=(s.attr("class")||"").split(" "),c=0;cW.legend.length)for(var j=W.legend.length;j(c==="legend"?1:0));if(R===!1&&(h[c]=void 0),R===!1&&!g.uirevision||(y("uirevision",h.uirevision),R===!1))return;y("borderwidth");var P=y("orientation"),z=y("yref"),I=y("xref"),L=P==="h",B=z==="paper",O=I==="paper",G,$,X,Z="left";L?(G=0,t.getComponentMethod("rangeslider","isVisible")(f.xaxis)?B?($=1.1,X="bottom"):($=1,X="top"):B?($=-.1,X="top"):($=0,X="bottom")):($=1,X="auto",O?G=1.02:(G=1,Z="right")),a.coerce(g,m,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:G}},"x"),a.coerce(g,m,{y:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:$}},"y"),y("traceorder",T),n.isGrouped(h[c])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick");let J=y("groupclick");y("groupdoubleclick",J),y("xanchor",Z),y("yanchor",X),y("maxheight"),y("valign"),a.noneOrAll(g,m,["x","y"]);var N=y("title.text");if(N){y("title.side",L?"left":"top");var H=a.extendFlat({},_,{size:a.bigFont(_.size)});a.coerceFont(y,"title.font",H);let W=p>1;y("titleclick",W?"toggle":!1),y("titledoubleclick",W?"toggleothers":!1)}}r.exports=function(f,h,d){var p,g=d.slice(),m=h.shapes;if(m)for(p=0;pxe.showlegend||xe.legendgroup);var v=y.concat(_),x=d.trace;x._isShape&&(x=h.shapes[x.index]);var E=x.legendgroup,M,C,w,k,T,b,S={},A=[],F=[],D=[];function R(xe,he){var oe=A.indexOf(xe),te=S.visible;return te||(te=S.visible=[]),A.indexOf(xe)===-1&&(A.push(xe),oe=A.length-1),te[oe]=he,oe}var P=(h.shapes||[]).map(function(xe){return xe._input}),z=!1;function I(xe,he){P[xe].visible=he,z=!0}function L(xe,he){if(!(d.groupTitle&&!g)){var oe=xe._isShape,te=xe.index;te===void 0&&(te=xe._index);var ie=xe.visible===!1?!1:he;oe?I(te,ie):R(te,ie)}}var B=x.legend;if(!x._isShape&&r.traceIs(x,"pie-like")){var O=d.label,G=m.indexOf(O);if(c==="toggle")G===-1?m.push(O):m.splice(G,1);else if(c==="toggleothers"){var $=G!==-1,X=[];for(M=0;MC.showlegend||C.legendgroup),p=f.concat(d);function g(C){return(C.legend||"legend")===h}var m,y;if(u==="toggle")m=!p.some(function(w){return g(w)&&w.visible===!0}),y=!1;else{let C=p.some(function(w){return!g(w)&&w.visible===!0&&w.showlegend!==!1});m=!0,y=!C}let _={visible:[]},v=[],x=(c.shapes||[]).map(function(C){return C._input});for(var E=!1,M=0;Mz&&(R=z)}F[_][0]._groupMinRank=R,F[_][0]._preGroupSort=_}var I=function(X,Z){return X[0]._groupMinRank-Z[0]._groupMinRank||X[0]._preGroupSort-Z[0]._preGroupSort},L=function(X,Z){var J=t(X.trace.legendrank)?X.trace.legendrank[X.i]:X.trace.legendrank,N=t(Z.trace.legendrank)?Z.trace.legendrank[Z.i]:Z.trace.legendrank;return J-N||X._preSort-Z._preSort};for(F.forEach(function(X,Z){X[0]._preGroupSort=Z}),F.sort(I),_=0;_0)V=H.width;else return 0;return T?U:Math.min(V,W)};M.each(function(N){var H=t.select(this),W=i.ensureSingle(H,"g","layers");W.style("opacity",N[0].trace.opacity);var U=w.indentation,V=w.valign,j=N[0].lineHeight,q=N[0].height;if(V==="middle"&&U===0||!j||!q)W.attr("transform",null);else{var Y={top:1,bottom:-1}[V],K=Y*(.5*(j-q+3))||0,re=w.indentation;W.attr("transform",o(re,K))}var se=W.selectAll("g.legendfill").data([N]);se.enter().append("g").classed("legendfill",!0);var le=W.selectAll("g.legendlines").data([N]);le.enter().append("g").classed("legendlines",!0);var ue=W.selectAll("g.legendsymbols").data([N]);ue.enter().append("g").classed("legendsymbols",!0),ue.selectAll("g.legendpoints").data([N]).enter().append("g").classed("legendpoints",!0)}).each(J).each(P).each(I).each(z).each(B).each(X).each($).each(D).each(R).each(O).each(G);function D(N){var H=v(N),W=H.showFill,U=H.showLine,V=H.showGradientLine,j=H.showGradientFill,q=H.anyFill,Y=H.anyLine,K=N[0],re=K.trace,se,le,ue=n(re),fe=ue.colorscale,pe=ue.reversescale,we=function(ce){if(ce.size())if(W)s.fillGroupStyle(ce,C,!0);else{var _e="legendfill-"+re.uid;s.gradient(ce,C,_e,_(pe),fe,"fill")}},xe=function(ce){if(ce.size()){var _e="legendline-"+re.uid;s.lineGroupStyle(ce),s.gradient(ce,C,_e,_(pe),fe,"stroke")}},he=u.hasMarkers(re)||!q?"M5,0":Y?"M5,-2":"M5,-3",oe=t.select(this),te=oe.select(".legendfill").selectAll("path").data(W||j?[N]:[]);if(te.enter().append("path").classed("js-fill",!0),te.exit().remove(),te.attr("d",he+"h"+b+"v6h-"+b+"z").call(we),U||V){var ie=F(void 0,re.line,m,p);le=i.minExtend(re,{line:{width:ie}}),se=[i.minExtend(K,{trace:le})]}var ee=oe.select(".legendlines").selectAll("path").data(U||V?[se]:[]);ee.enter().append("path").classed("js-line",!0),ee.exit().remove(),ee.attr("d",he+(V?"l"+b+",0.0001":"h"+b)).call(U?s.lineGroupStyle:xe)}function R(N){var H=v(N),W=H.anyFill,U=H.anyLine,V=H.showLine,j=H.showMarker,q=N[0],Y=q.trace,K=!j&&!U&&!W&&u.hasText(Y),re,se;function le(ie,ee,ce,_e){var Se=i.nestedProperty(Y,ie).get(),Me=i.isArrayOrTypedArray(Se)&&ee?ee(Se):Se;if(T&&Me&&_e!==void 0&&(Me=_e),ce){if(Mece[1])return ce[1]}return Me}function ue(ie){return q._distinct&&q.index&&ie[q.index]?ie[q.index]:ie[0]}if(j||K||V){var fe={},pe={};if(j){fe.mc=le("marker.color",ue);var we=Y.type==="scattermap";fe.mx=we?"circle":le("marker.symbol",ue),fe.mo=le("marker.opacity",i.mean,[.2,1]),fe.mlc=le("marker.line.color",ue),fe.mlw=le("marker.line.width",i.mean,[0,5],g),fe.mld=le("marker.line.dash",ue),pe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var xe=le("marker.size",i.mean,[2,16],d);fe.ms=xe,pe.marker.size=xe}V&&(pe.line={width:le("line.width",ue,[0,10],p)}),K&&(fe.tx="Aa",fe.tp=le("textposition",ue),fe.ts=10,fe.tc=le("textfont.color",ue),fe.tf=le("textfont.family",ue),fe.tw=le("textfont.weight",ue),fe.ty=le("textfont.style",ue),fe.tv=le("textfont.variant",ue),fe.tC=le("textfont.textcase",ue),fe.tE=le("textfont.lineposition",ue),fe.tS=le("textfont.shadow",ue)),re=[i.minExtend(q,fe)],se=i.minExtend(Y,pe),se.selectedpoints=null,se.texttemplate=null}var he=t.select(this).select("g.legendpoints"),oe=he.selectAll("path.scatterpts").data(j?re:[]);oe.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",A),oe.exit().remove(),oe.call(s.pointStyle,se,C),j&&(re[0].mrc=3);var te=he.selectAll("g.pointtext").data(K?re:[]);te.enter().append("g").classed("pointtext",!0).append("text").attr("transform",A),te.exit().remove(),te.selectAll("text").call(s.textPointStyle,se,C)}function P(N){var H=N[0].trace,W=H.type==="waterfall";if(N[0]._distinct&&W){var U=N[0].trace[N[0].dir].marker;return N[0].mc=U.color,N[0].mlw=U.line.width,N[0].mlc=U.line.color,L(N,this,"waterfall")}var V=[];H.visible&&W&&(V=N[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 j=t.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(V);j.enter().append("path").classed("legendwaterfall",!0).attr("transform",A).style("stroke-miterlimit",1),j.exit().remove(),j.each(function(q){var Y=t.select(this),K=H[q[0]].marker,re=F(void 0,K.line,y,g);Y.attr("d",q[1]).style("stroke-width",re+"px").call(l.fill,K.color),re&&Y.call(l.stroke,K.line.color)})}function z(N){L(N,this)}function I(N){L(N,this,"funnel")}function L(N,H,W){var U=N[0].trace,V=U.marker||{},j=V.line||{},q=V.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",Y=W?U.visible&&U.type===W:a.traceIs(U,"bar"),K=t.select(H).select("g.legendpoints").selectAll("path.legend"+W).data(Y?[N]:[]);K.enter().append("path").classed("legend"+W,!0).attr("d",q).attr("transform",A),K.exit().remove(),K.each(function(re){var se=t.select(this),le=re[0],ue=F(le.mlw,V.line,y,g);se.style("stroke-width",ue+"px");var fe=le.mcc;if(!w._inHover&&"mc"in le){var pe=n(V),we=pe.mid;we===void 0&&(we=(pe.max+pe.min)/2),fe=s.tryColorscale(V,"")(we)}var xe=fe||le.mc||V.color,he=V.pattern,oe=s.getPatternAttr,te=he&&(oe(he.shape,0,"")||oe(he.path,0,""));if(te){var ie=oe(he.bgcolor,0,null),ee=oe(he.fgcolor,0,null),ce=he.fgopacity,_e=x(he.size,8,10),Se=x(he.solidity,.5,1),Me="legend-"+U.uid;se.call(s.pattern,"legend",C,Me,te,_e,Se,fe,he.fillmode,ie,ee,ce)}else se.call(l.fill,xe);ue&&l.stroke(se,le.mlc||j.color)})}function B(N){var H=N[0].trace,W=t.select(this).select("g.legendpoints").selectAll("path.legendbox").data(H.visible&&a.traceIs(H,"box-violin")?[N]:[]);W.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",A),W.exit().remove(),W.each(function(){var U=t.select(this);if((H.boxpoints==="all"||H.points==="all")&&l.opacity(H.fillcolor)===0&&l.opacity((H.line||{}).color)===0){var V=i.minExtend(H,{marker:{size:T?d:i.constrain(H.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});W.call(s.pointStyle,V,C)}else{var j=F(void 0,H.line,y,g);U.style("stroke-width",j+"px").call(l.fill,H.fillcolor),j&&l.stroke(U,H.line.color)}})}function O(N){var H=N[0].trace,W=t.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(H.visible&&H.type==="candlestick"?[N,N]:[]);W.enter().append("path").classed("legendcandle",!0).attr("d",function(U,V){return V?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",A).style("stroke-miterlimit",1),W.exit().remove(),W.each(function(U,V){var j=t.select(this),q=H[V?"increasing":"decreasing"],Y=F(void 0,q.line,y,g);j.style("stroke-width",Y+"px").call(l.fill,q.fillcolor),Y&&l.stroke(j,q.line.color)})}function G(N){var H=N[0].trace,W=t.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(H.visible&&H.type==="ohlc"?[N,N]:[]);W.enter().append("path").classed("legendohlc",!0).attr("d",function(U,V){return V?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",A).style("stroke-miterlimit",1),W.exit().remove(),W.each(function(U,V){var j=t.select(this),q=H[V?"increasing":"decreasing"],Y=F(void 0,q.line,y,g);j.style("fill","none").call(s.dashLine,q.line.dash,Y),Y&&l.stroke(j,q.line.color)})}function $(N){Z(N,this,"pie")}function X(N){Z(N,this,"funnelarea")}function Z(N,H,W){var U=N[0],V=U.trace,j=W?V.visible&&V.type===W:a.traceIs(V,W),q=t.select(H).select("g.legendpoints").selectAll("path.legend"+W).data(j?[N]:[]);if(q.enter().append("path").classed("legend"+W,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",A),q.exit().remove(),q.size()){var Y=V.marker||{},K=F(f(Y.line.width,U.pts),Y.line,y,g),re="pieLike",se=i.minExtend(V,{marker:{line:{width:K}}},re),le=i.minExtend(U,{trace:se},re);c(q,le,se,C)}}function J(N){var H=N[0].trace,W,U=[];if(H.visible)switch(H.type){case"histogram2d":case"heatmap":U=[["M-15,-2V4H15V-2Z"]],W=!0;break;case"choropleth":case"choroplethmap":U=[["M-6,-6V6H6V-6Z"]],W=!0;break;case"densitymap":U=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],W="radial";break;case"cone":U=[["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"]],W=!1;break;case"streamtube":U=[["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"]],W=!1;break;case"surface":U=[["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"]],W=!0;break;case"mesh3d":U=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],W=!1;break;case"volume":U=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],W=!0;break;case"isosurface":U=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],W=!1;break}var V=t.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(U);V.enter().append("path").classed("legend3dandfriends",!0).attr("transform",A).style("stroke-miterlimit",1),V.exit().remove(),V.each(function(j,q){var Y=t.select(this),K=n(H),re=K.colorscale,se=K.reversescale,le=function(we){if(we.size()){var xe="legendfill-"+H.uid;s.gradient(we,C,xe,_(se,W==="radial"),re,"fill")}},ue;if(re){if(!W){var pe=re.length;ue=q===0?re[se?pe-1:0][1]:q===1?re[se?0:pe-1][1]:re[Math.floor((pe-1)/2)][1]}}else{var fe=H.vertexcolor||H.facecolor||H.color;ue=i.isArrayOrTypedArray(fe)?fe[q]||fe[0]:fe}Y.attr("d",j[0]),ue?Y.call(l.fill,ue):Y.call(le)})}};function _(E,M){var C=M?"radial":"horizontal";return C+(E?"":"reversed")}function v(E){var M=E[0].trace,C=M.contours,w=u.hasLines(M)||M.visible&&M.type==="quiver",k=u.hasMarkers(M),T=M.visible&&M.fill&&M.fill!=="none",b=!1,S=!1;if(C){var A=C.coloring;A==="lines"?b=!0:w=A==="none"||A==="heatmap"||C.showlines,C.type==="constraint"?T=C._operation!=="=":(A==="fill"||A==="heatmap")&&(S=!0)}return{showMarker:k,showLine:w,showFill:T,showGradientLine:b,showGradientFill:S,anyLine:w||b,anyFill:T||S}}function x(E,M,C){return E&&i.isArrayOrTypedArray(E)?M:E>C?C:E}}}),a9=ye({"src/components/legend/draw.js"(e,r){"use strict";var t=ai(),a=Yt(),i=ws(),o=li(),s=py(),l=_f(),n=$i(),u=Ya(),c=Go(),f=e9().handleItemClick,h=e9().handleTitleClick,d=t9(),p=Yl(),g=p.LINE_SPACING,m=p.FROM_TL,y=p.FROM_BR,_=Zee(),v=r9(),x=Yx(),E=1,M=/^legend[0-9]*$/;r.exports=function(G,$){if($)w(G,$);else{var X=G._fullLayout,Z=X._legends,J=X._infolayer.selectAll('[class^="legend"]');J.each(function(){var U=t.select(this),V=U.attr("class"),j=V.split(" ")[0];j.match(M)&&Z.indexOf(j)===-1&&U.remove()});for(var N=0;N1)}var K=X.hiddenlabels||[];if(!H&&(!X.showlegend||!W.length))return N.selectAll("."+Z).remove(),X._topdefs.select("#"+J).remove(),i.autoMargin(O,Z);var re=a.ensureSingle(N,"g",Z,function(oe){H||oe.attr("pointer-events","all")}),se=a.ensureSingleById(X._topdefs,"clipPath",J,function(oe){oe.append("rect")}),le=a.ensureSingle(re,"rect","bg",function(oe){oe.attr("shape-rendering","crispEdges")});le.call(u.stroke,$.bordercolor).call(u.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px");var ue=a.ensureSingle(re,"g","scrollbox"),fe=$.title;$._titleWidth=0,$._titleHeight=0;var pe;fe.text?(pe=a.ensureSingle(ue,"text",Z+"titletext"),pe.attr("text-anchor","start").call(n.font,fe.font).text(fe.text),D(pe,ue,O,$,E),!H&&($.titleclick||$.titledoubleclick)&&F(ue,O,$,Z)):(ue.selectAll("."+Z+"titletext").remove(),ue.selectAll("."+Z+"titletoggle").remove());var we=a.ensureSingle(re,"rect","scrollbar",function(oe){oe.attr(d.scrollBarEnterAttrs).call(u.fill,d.scrollBarColor)}),xe=ue.selectAll("g.groups").data(W);xe.enter().append("g").attr("class","groups"),xe.exit().remove();var he=xe.selectAll("g.traces").data(a.identity);he.enter().append("g").attr("class","traces"),he.exit().remove(),he.style("opacity",function(oe){let te=oe[0],ie=te.trace;if(te.groupTitle){let ee=ie.legendgroup,ce=(X.shapes||[]).filter(function(Se){return Se.showlegend});return O._fullData.concat(ce).some(function(Se){return Se.legendgroup===ee&&(Se.legend||"legend")===Z&&Se.visible===!0})?1:.5}return o.traceIs(ie,"pie-like")?K.indexOf(oe[0].label)!==-1?.5:1:ie.visible==="legendonly"?.5:1}).each(function(){t.select(this).call(b,O,$)}).call(v,O,$).each(function(oe){H||oe[0].groupTitle&&$.groupclick==="toggleitem"||t.select(this).call(A,O,Z)}),a.syncOrAsync([i.previousPromises,function(){return z(O,xe,he,$,ue)},function(){var oe=X._size,te=$.borderwidth,ie=$.xref==="paper",ee=$.yref==="paper";if(fe.text){let qe=(X.shapes||[]).filter(function(tt){return tt.showlegend}),at=O._fullData.concat(qe).some(function(tt){let ct=tt.legend||"legend";var At=Array.isArray(ct)?ct.includes(Z):ct===Z;return At&&tt.visible===!0});pe.style("opacity",at?1:.5)}if(!H){var ce,_e;ie?ce=oe.l+oe.w*$.x-m[L($)]*$._width:ce=X.width*$.x-m[L($)]*$._width,ee?_e=oe.t+oe.h*(1-$.y)-m[B($)]*$._effHeight:_e=X.height*(1-$.y)-m[B($)]*$._effHeight;var Se=I(O,Z,ce,_e);if(Se)return;if(X.margin.autoexpand){var Me=ce,Ue=_e;ce=ie?a.constrain(ce,0,X.width-$._width):Me,_e=ee?a.constrain(_e,0,X.height-$._effHeight):Ue,ce!==Me&&a.log("Constrain "+Z+".x to make legend fit inside graph"),_e!==Ue&&a.log("Constrain "+Z+".y to make legend fit inside graph")}n.setTranslate(re,ce,_e)}if(we.on(".drag",null),re.on("wheel",null),H||$._height<=$._maxHeight||O._context.staticPlot){var Ge=$._effHeight;H&&(Ge=$._height),le.attr({width:$._width-te,height:Ge-te,x:te/2,y:te/2}),n.setTranslate(ue,0,0),se.select("rect").attr({width:$._width-2*te,height:Ge-2*te,x:te,y:te}),n.setClipUrl(ue,J,O),n.setRect(we,0,0,0,0),delete $._scrollY}else{var Ze=Math.max(d.scrollBarMinHeight,$._effHeight*$._effHeight/$._height),Ke=$._effHeight-Ze-2*d.scrollBarMargin,dt=$._height-$._effHeight,_t=Ke/dt,Pt=Math.min($._scrollY||0,dt);le.attr({width:$._width-2*te+d.scrollBarWidth+d.scrollBarMargin,height:$._effHeight-te,x:te/2,y:te/2}),se.select("rect").attr({width:$._width-2*te+d.scrollBarWidth+d.scrollBarMargin,height:$._effHeight-2*te,x:te,y:te+Pt}),n.setClipUrl(ue,J,O),Ee(Pt,Ze,_t),re.on("wheel",function(){Pt=a.constrain($._scrollY+t.event.deltaY/dt*Ke,0,dt),Ee(Pt,Ze,_t),Pt!==0&&Pt!==dt&&t.event.preventDefault()});var pt,Tt,st,Ve=function(qe,at,tt){var ct=(tt-at)/_t+qe;return a.constrain(ct,0,dt)},Ye=function(qe,at,tt){var ct=(at-tt)/_t+qe;return a.constrain(ct,0,dt)},me=t.behavior.drag().on("dragstart",function(){var qe=t.event.sourceEvent;qe.type==="touchstart"?pt=qe.changedTouches[0].clientY:pt=qe.clientY,st=Pt}).on("drag",function(){var qe=t.event.sourceEvent;qe.buttons===2||qe.ctrlKey||(qe.type==="touchmove"?Tt=qe.changedTouches[0].clientY:Tt=qe.clientY,Pt=Ve(st,pt,Tt),Ee(Pt,Ze,_t))});we.call(me);var be=t.behavior.drag().on("dragstart",function(){var qe=t.event.sourceEvent;qe.type==="touchstart"&&(pt=qe.changedTouches[0].clientY,st=Pt)}).on("drag",function(){var qe=t.event.sourceEvent;qe.type==="touchmove"&&(Tt=qe.changedTouches[0].clientY,Pt=Ye(st,pt,Tt),Ee(Pt,Ze,_t))});ue.call(be)}function Ee(qe,at,tt){$._scrollY=O._fullLayout[Z]._scrollY=qe,n.setTranslate(ue,0,-qe),n.setRect(we,$._width,d.scrollBarMargin+qe*tt,d.scrollBarWidth,at),se.select("rect").attr("y",te+qe)}if(O._context.edits.legendPosition){var De,Ce,Fe,Je;re.classed("cursor-move",!0),l.init({element:re.node(),gd:O,prepFn:function(qe){if(qe.target!==we.node()){var at=n.getTranslate(re);Fe=at.x,Je=at.y}},moveFn:function(qe,at){if(Fe!==void 0&&Je!==void 0){var tt=Fe+qe,ct=Je+at;n.setTranslate(re,tt,ct),De=l.align(tt,$._width,oe.l,oe.l+oe.w,$.xanchor),Ce=l.align(ct+$._height,-$._height,oe.t+oe.h,oe.t,$.yanchor)}},doneFn:function(){if(De!==void 0&&Ce!==void 0){var qe={};qe[Z+".x"]=De,qe[Z+".y"]=Ce,o.call("_guiRelayout",O,qe)}},clickFn:function(qe,at){var tt=N.selectAll("g.traces").filter(function(){var ct=this.getBoundingClientRect();return at.clientX>=ct.left&&at.clientX<=ct.right&&at.clientY>=ct.top&&at.clientY<=ct.bottom});tt.size()>0&&T(O,$,tt,qe,at)}})}}],O)}}function k(O,G,$){var X=O[0],Z=X.width,J=G.entrywidthmode,N=X.trace.legendwidth||G.entrywidth;return J==="fraction"?G._maxWidth*N:$+(N||Z)}function T(O,G,$,X,Z){var J=O._fullLayout,N=$.data()[0][0].trace,H=G.itemclick,W=G.itemdoubleclick,U={event:Z,node:$.node(),curveNumber:N.index,expandedIndex:N.index,data:O.data,layout:O.layout,frames:O._transitionData._frames,config:O._context,fullData:O._fullData,fullLayout:J};N._group&&(U.group=N._group),o.traceIs(N,"pie-like")&&(U.label=$.datum()[0].label);var V=s.triggerHandler(O,"plotly_legendclick",U);if(X===1){if(V===!1)return;G._clickTimeout=setTimeout(function(){O._fullLayout&&H&&f($,O,G,H,X)},O._context.doubleClickDelay)}else if(X===2){G._clickTimeout&&clearTimeout(G._clickTimeout),O._legendMouseDownTime=0;var j=s.triggerHandler(O,"plotly_legenddoubleclick",U);j!==!1&&V!==!1&&W&&f($,O,G,W,X)}}function b(O,G,$){var X=x.getId($),Z=O.data()[0][0],J=Z.trace,N=o.traceIs(J,"pie-like"),H=!$._inHover&&G._context.edits.legendText&&!N,W=$._maxNameLength,U,V;Z.groupTitle?(U=Z.groupTitle.text,V=Z.groupTitle.font):(V=$.font,$.entries?U=Z.text:(U=N?Z.label:J.name,J._meta&&(U=a.templateString(U,J._meta))));var j=a.ensureSingle(O,"text",X+"text");j.attr("text-anchor","start").call(n.font,V).text(H?S(U,W):U);var q=$.indentation+$.itemwidth+d.itemGap*2;c.positionText(j,q,0),H?j.call(c.makeEditable,{gd:G,text:U}).call(D,O,G,$).on("edit",function(Y){this.text(S(Y,W)).call(D,O,G,$);var K={};return K.name=Y,Z.trace._isShape?o.call("_guiRelayout",G,"shapes["+J.index+"].name",K.name):o.call("_guiRestyle",G,K,J.index)}):D(j,O,G,$)}function S(O,G){var $=Math.max(4,G);if(O&&O.trim().length>=$/2)return O;O=O||"";for(var X=$-O.length;X>0;X--)O+=" ";return O}function A(O,G,$){var X=G._context.doubleClickDelay,Z,J=1,N=a.ensureSingle(O,"rect",$+"toggle",function(H){G._context.staticPlot||H.style("cursor","pointer").attr("pointer-events","all"),H.call(u.fill,"rgba(0,0,0,0)")});G._context.staticPlot||(N.on("mousedown",function(){Z=new Date().getTime(),Z-G._legendMouseDownTimeX&&(J=Math.max(J-1,1)),T(G,H,O,J,t.event)}}))}function F(O,G,$,X){if(G._fullData.some(function(U){let V=U.legend||"legend";return(Array.isArray(V)?V.includes(X):V===X)&&o.traceIs(U,"pie-like")}))return;let J=G._context.doubleClickDelay;var N,H=1;let W=a.ensureSingle(O,"rect",X+"titletoggle",function(U){G._context.staticPlot||U.style("cursor","pointer").attr("pointer-events","all"),U.call(u.fill,"rgba(0,0,0,0)")});G._context.staticPlot||(W.on("mousedown",function(){N=new Date().getTime(),N-G._legendMouseDownTimeJ&&(H=Math.max(H-1,1));let U={event:t.event,legendId:X,data:G.data,layout:G.layout,fullData:G._fullData,fullLayout:G._fullLayout};if(H===1&&$.titleclick){if(s.triggerHandler(G,"plotly_legendtitleclick",U)===!1)return;$._titleClickTimeout=setTimeout(function(){G._fullLayout&&h(G,$,$.titleclick)},J)}else H===2&&($._titleClickTimeout&&clearTimeout($._titleClickTimeout),G._legendMouseDownTime=0,s.triggerHandler(G,"plotly_legendtitledoubleclick",U)!==!1&&$.titledoubleclick&&h(G,$,$.titledoubleclick))}))}function D(O,G,$,X,Z){X._inHover&&O.attr("data-notex",!0),c.convertToTspans(O,$,function(){R(G,$,X,Z)})}function R(O,G,$,X){var Z=O.data()[0][0],J=Z&&Z.trace.showlegend;if(Array.isArray(J)&&(J=J[Z.i]!==!1),!$._inHover&&Z&&!J){O.remove();return}var N=O.select("g[class*=math-group]"),H=N.node(),W=x.getId($);$||($=G._fullLayout[W]);var U=$.borderwidth,V;X===E?V=$.title.font:Z.groupTitle?V=Z.groupTitle.font:V=$.font;var j=V.size*g,q,Y;if(H){var K=n.bBox(H);q=K.height,Y=K.width,X===E?n.setTranslate(N,U,U+q*.75):n.setTranslate(N,0,q*.25)}else{var re="."+W+(X===E?"title":"")+"text",se=O.select(re),le=c.lineCount(se),ue=se.node();if(q=j*le,Y=ue?n.bBox(ue).width:0,X===E)$.title.side==="left"&&(Y+=d.itemGap*2),c.positionText(se,U+d.titlePad,U+j);else{var fe=d.itemGap*2+$.indentation+$.itemwidth;Z.groupTitle&&(fe=d.itemGap,Y-=$.indentation+$.itemwidth),c.positionText(se,fe,-j*((le-1)/2-.3))}}X===E?($._titleWidth=Y,$._titleHeight=q):(Z.lineHeight=j,Z.height=Math.max(q,16)+3,Z.width=Y)}function P(O){var G=0,$=0,X=O.title.side;return X&&(X.indexOf("left")!==-1&&(G=O._titleWidth),X.indexOf("top")!==-1&&($=O._titleHeight)),[G,$]}function z(O,G,$,X,Z){var J=O._fullLayout,N=x.getId(X);X||(X=J[N]);var H=J._size,W=x.isVertical(X),U=x.isGrouped(X),V=X.entrywidthmode==="fraction",j=X.borderwidth,q=2*j,Y=d.itemGap,K=X.indentation+X.itemwidth+Y*2,re=2*(j+Y),se=B(X),le=X.y<0||X.y===0&&se==="top",ue=X.y>1||X.y===1&&se==="bottom",fe=X.tracegroupgap,pe={};let{orientation:we,yref:xe}=X,{maxheight:he}=X,oe=le||ue||we!=="v"||xe!=="paper";he||(he=oe?.5:1);let te=oe?J.height:H.h;X._maxHeight=Math.max(he>1?he:he*te,30);var ie=0;X._width=0,X._height=0;var ee=P(X);if(W)$.each(function(qe){var at=qe[0].height;n.setTranslate(this,j+ee[0],j+ee[1]+X._height+at/2+Y),X._height+=at,X._width=Math.max(X._width,qe[0].width)}),ie=K+X._width,X._width+=Y+K+q,X._height+=re,U&&(G.each(function(qe,at){n.setTranslate(this,0,at*X.tracegroupgap)}),X._height+=(X._lgroupsLength-1)*X.tracegroupgap);else{var ce=L(X),_e=X.x<0||X.x===0&&ce==="right",Se=X.x>1||X.x===1&&ce==="left",Me=ue||le,Ue=J.width/2;X._maxWidth=Math.max(_e?Me&&ce==="left"?H.l+H.w:Ue:Se?Me&&ce==="right"?H.r+H.w:Ue:H.w,2*K);var Ge=0,Ze=0;$.each(function(qe){var at=k(qe,X,K);Ge=Math.max(Ge,at),Ze+=at}),ie=null;var Ke=0;if(U){var dt=0,_t=0,Pt=0;G.each(function(){var qe=0,at=0;t.select(this).selectAll("g.traces").each(function(ct){var At=k(ct,X,K),ft=ct[0].height;n.setTranslate(this,ee[0],ee[1]+j+Y+ft/2+at),at+=ft,qe=Math.max(qe,At),pe[ct[0].trace.legendgroup]=qe});var tt=qe+Y;_t>0&&tt+j+_t>X._maxWidth?(Ke=Math.max(Ke,_t),_t=0,Pt+=dt+fe,dt=at):dt=Math.max(dt,at),n.setTranslate(this,_t,Pt),_t+=tt}),X._width=Math.max(Ke,_t)+j,X._height=Pt+dt+re}else{var pt=$.size(),Tt=Ze+q+(pt-1)*Y=X._maxWidth&&(Ke=Math.max(Ke,me),Ve=0,Ye+=st,X._height+=st,st=0),n.setTranslate(this,ee[0]+j+Ve,ee[1]+j+Ye+at/2+Y),me=Ve+tt+Y,Ve+=ct,st=Math.max(st,at)}),Tt?(X._width=Ve+q,X._height=st+re):(X._width=Math.max(Ke,me)+q,X._height+=st+re)}}X._width=Math.ceil(Math.max(X._width+ee[0],X._titleWidth+2*(j+d.titlePad))),X._height=Math.ceil(Math.max(X._height+ee[1],X._titleHeight+2*(j+d.itemGap))),X._effHeight=Math.min(X._height,X._maxHeight);var be=O._context.edits,Ee=be.legendText||be.legendPosition;$.each(function(qe){var at=t.select(this).select("."+N+"toggle"),tt=qe[0].height,ct=qe[0].trace.legendgroup,At=k(qe,X,K);U&&ct!==""&&(At=pe[ct]);var ft=Ee?K:ie||At;!W&&!V&&(ft+=Y/2),n.setRect(at,0,-tt/2,ft,tt)});var De=Z.select("."+N+"titletext");De.node()&&C(De,X,j);var Ce=Z.select("."+N+"titletoggle");if(Ce.size()&&De.node()){var Fe=De.attr("x")||0,Je=d.titlePad;n.setRect(Ce,Fe-Je,j,X._titleWidth+2*Je,X._titleHeight+2*Je)}}function I(O,G,$,X){var Z=O._fullLayout,J=Z[G],N=L(J),H=B(J),W=J.xref==="paper",U=J.yref==="paper";O._fullLayout._reservedMargin[G]={};var V=J.y<.5?"b":"t",j=J.x<.5?"l":"r",q={r:Z.width-$,l:$+J._width,b:Z.height-X,t:X+J._effHeight};if(W&&U)return i.autoMargin(O,G,{x:J.x,y:J.y,l:J._width*m[N],r:J._width*y[N],b:J._effHeight*y[H],t:J._effHeight*m[H]});W?O._fullLayout._reservedMargin[G][V]=q[V]:U||J.orientation==="v"?O._fullLayout._reservedMargin[G][j]=q[j]:O._fullLayout._reservedMargin[G][V]=q[V]}function L(O){return a.isRightAnchor(O)?"right":a.isCenterAnchor(O)?"center":"left"}function B(O){return a.isBottomAnchor(O)?"bottom":a.isMiddleAnchor(O)?"middle":"top"}}}),i9=ye({"src/components/fx/hover.js"(e){"use strict";var r=ai(),t=en(),a=Yt(),i=a.pushUnique,o=a.strTranslate,s=a.strRotate,l=py(),n=Go(),u=Xee(),c=$i(),f=Ya(),h=_f(),d=qi(),p=$l().zindexSeparator,g=li(),m=Bf(),y=qx(),_=QD(),v=a9(),x=y.YANGLE,E=Math.PI*x/180,M=1/Math.sin(E),C=Math.cos(E),w=Math.sin(E),k=y.HOVERARROWSIZE,T=y.HOVERTEXTPAD,b={box:!0,ohlc:!0,violin:!0,candlestick:!0},S={scatter:!0,scattergl:!0,splom:!0};function A(j,q){return j.distance-q.distance}e.hover=function(q,Y,K,re){q=a.getGraphDiv(q);var se=Y.target;a.throttle(q._fullLayout._uid+y.HOVERID,y.HOVERMINTIME,function(){F(q,Y,K,re,se)})},e.loneHover=function(q,Y){var K=!0;Array.isArray(q)||(K=!1,q=[q]);var re=Y.gd,se=W(re),le=U(re),ue=q.map(function(ee){var ce=ee._x0||ee.x0||ee.x||0,_e=ee._x1||ee.x1||ee.x||0,Se=ee._y0||ee.y0||ee.y||0,Me=ee._y1||ee.y1||ee.y||0,Ue=ee.eventData;if(Ue){var Ge=Math.min(ce,_e),Ze=Math.max(ce,_e),Ke=Math.min(Se,Me),dt=Math.max(Se,Me),_t=ee.trace;if(g.traceIs(_t,"gl3d")){var Pt=re._fullLayout[_t.scene]._scene.container,pt=Pt.offsetLeft,Tt=Pt.offsetTop;Ge+=pt,Ze+=pt,Ke+=Tt,dt+=Tt}Ue.bbox={x0:Ge+le,x1:Ze+le,y0:Ke+se,y1:dt+se},Ue.xPixel=(ce+_e)/2,Ue.yPixel=(Se+Me)/2,Y.inOut_bbox&&Y.inOut_bbox.push(Ue.bbox)}else Ue=!1;return{color:ee.color||f.defaultLine,x0:ee.x0||ee.x||0,x1:ee.x1||ee.x||0,y0:ee.y0||ee.y||0,y1:ee.y1||ee.y||0,xLabel:ee.xLabel,yLabel:ee.yLabel,zLabel:ee.zLabel,text:ee.text,name:ee.name,idealAlign:ee.idealAlign,borderColor:ee.borderColor,fontFamily:ee.fontFamily,fontSize:ee.fontSize,fontColor:ee.fontColor,fontWeight:ee.fontWeight,fontStyle:ee.fontStyle,fontVariant:ee.fontVariant,nameLength:ee.nameLength,textAlign:ee.textAlign,trace:ee.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:ee.hovertemplate||!1,hovertemplateLabels:ee.hovertemplateLabels||!1,eventData:Ue}}),fe=!1,pe=P(ue,{gd:re,hovermode:"closest",rotateLabels:fe,bgColor:Y.bgColor||f.background,container:r.select(Y.container),outerContainer:Y.outerContainer||Y.container}),we=pe.hoverLabels,xe=5,he=0,oe=0;we.sort(function(ee,ce){return ee.y0-ce.y0}).each(function(ee,ce){var _e=ee.y0-ee.by/2;_e-xeZe[0]._length||St<0||St>Ke[0]._length)return h.unhoverRaw(j,q)}if(q.pointerX=gt+Ze[0]._offset,q.pointerY=St+Ke[0]._offset,"xval"in q?Ye=m.flat(se,q.xval):Ye=m.p2c(Ze,gt),"yval"in q?me=m.flat(se,q.yval):me=m.p2c(Ke,St),j._hoverPointerX=q.pointerX,j._hoverPointerY=q.pointerY,!t(Ye[0])||!t(me[0]))return a.warn("Fx.hover failed",q,j),h.unhoverRaw(j,q)}ue.clickanywhere&&(j._hoverXVals=Ye,j._hoverYVals=me,j._hoverXAxes=Ze,j._hoverYAxes=Ke);var Vt=1/0;function lr(pa,_n){for(Ee=0;EeAt&&(st.splice(0,At),Vt=st[0].distance),xe&&Tt!==0&&st.length===0){ct.distance=Tt,ct.index=!1;var un=Ce._module.hoverPoints(ct,at,tt,"closest",{hoverLayer:ue._hoverlayer});if(un&&(un=un.filter(function(Vi){return Vi.spikeDistance<=Tt})),un&&un.length){var jn,bn=un.filter(function(Vi){return Vi.xa.showspikes&&Vi.xa.spikesnap!=="hovered data"});if(bn.length){var Wa=bn[0];t(Wa.x0)&&t(Wa.y0)&&(jn=yr(Wa),(!ft.vLinePoint||ft.vLinePoint.spikeDistance>jn.spikeDistance)&&(ft.vLinePoint=jn))}var ui=un.filter(function(Vi){return Vi.ya.showspikes&&Vi.ya.spikesnap!=="hovered data"});if(ui.length){var Hi=ui[0];t(Hi.x0)&&t(Hi.y0)&&(jn=yr(Hi),(!ft.hLinePoint||ft.hLinePoint.spikeDistance>jn.spikeDistance)&&(ft.hLinePoint=jn))}}}}}lr();function dr(pa,_n,Zi){for(var Fi=null,xn=1/0,Ni,un=0;unpa.trace.index===xi.trace.index):st=[xi];var Yi=st.length,Qr=H("x",xi,ue),Nr=H("y",xi,ue);lr(Qr,Nr);var Oe=[],Ie={},Et=0,Mt=function(pa){var _n=b[pa.trace.type]?D(pa):pa.trace.index;if(!Ie[_n])Et++,Ie[_n]=Et,Oe.push(pa);else{var Zi=Ie[_n]-1,Fi=Oe[Zi];Zi>0&&Math.abs(pa.distance)Yi-1;zt--)Mt(st[zt]);st=Oe,Hr()}var Gt=j._hoverdata,Ht=[],Be=W(j),et=U(j);for(let pa of st){var ut=m.makeEventData(pa,pa.trace,pa.cd);if(pa.hovertemplate!==!1){var bt=!1;pa.cd[pa.index]&&pa.cd[pa.index].ht&&(bt=pa.cd[pa.index].ht),pa.hovertemplate=bt||pa.trace.hovertemplate||!1}if(pa.xa&&pa.ya){var Ot=pa.x0+pa.xa._offset,It=pa.x1+pa.xa._offset,Wt=pa.y0+pa.ya._offset,jt=pa.y1+pa.ya._offset,sr=Math.min(Ot,It),kr=Math.max(Ot,It),Mr=Math.min(Wt,jt),ua=Math.max(Wt,jt);ut.bbox={x0:sr+et,x1:kr+et,y0:Mr+Be,y1:ua+Be},ut.xPixel=(Ot+It)/2,ut.yPixel=(Wt+jt)/2}pa.eventData=[ut],Ht.push(ut)}j._hoverdata=Ht;var ra=he==="y"&&(Ve.length>1||st.length>1)||he==="closest"&&qt&&st.length>1,ni=f.combine(ue.plot_bgcolor||f.background,ue.paper_bgcolor),Ca=P(st,{gd:j,hovermode:he,rotateLabels:ra,bgColor:ni,container:ue._hoverlayer,outerContainer:ue._paper.node(),commonLabelOpts:ue.hoverlabel,hoverdistance:ue.hoverdistance}),Li=Ca.hoverLabels;if(m.isUnifiedHover(he)||(I(Li,ra,ue,Ca.commonLabelBoundingBox),O(Li,ra,ue._invScaleX,ue._invScaleY)),re&&re.tagName){var Va=g.getComponentMethod("annotations","hasClickToShow")(j,Ht);u(r.select(re),Va?"pointer":"")}var dn=X(j,q,Gt);if(!re||K||!dn&&!ue.hoveranywhere)return;Gt&&dn&&j.emit("plotly_unhover",{event:q,points:Gt}),rn(j._hoverdata);function rn(pa){j.emit("plotly_hover",{event:q,points:pa,xaxes:Ze,yaxes:Ke,xvals:m.c2dApply(Ze,Ye),yvals:m.c2dApply(Ke,me),xPixel:q.pointerX,yPixel:q.pointerY})}}function D(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 R=/([\s\S]*)<\/extra>/;function P(j,q){var Y=q.gd,K=Y._fullLayout,re=q.hovermode,se=q.rotateLabels,le=q.bgColor,ue=q.container,fe=q.outerContainer,pe=q.commonLabelOpts||{};if(j.length===0)return[[]];var we=q.fontFamily||y.HOVERFONT,xe=q.fontSize||y.HOVERFONTSIZE,he=q.fontWeight||K.font.weight,oe=q.fontStyle||K.font.style,te=q.fontVariant||K.font.variant,ie=q.fontTextcase||K.font.textcase,ee=q.fontLineposition||K.font.lineposition,ce=q.fontShadow||K.font.shadow,_e=j[0],Se=_e.xa,Me=_e.ya,Ue=re.charAt(0),Ge=Ue+"Label",Ze=_e[Ge];if(Ze===void 0&&Se.type==="multicategory")for(var Ke=0;KeK.width-Ht&&(Be=K.width-Ht),na.attr("d","M"+(Mt-Be)+",0L"+(Mt-Be+k)+","+Gt+k+"H"+Ht+"v"+Gt+(T*2+Et.height)+"H"+-Ht+"V"+Gt+k+"H"+(Mt-Be-k)+"Z"),Mt=Be,Ee.minX=Mt-Ht,Ee.maxX=Mt+Ht,Se.side==="top"?(Ee.minY=zt-(T*2+Et.height),Ee.maxY=zt-T):(Ee.minY=zt+T,Ee.maxY=zt+(T*2+Et.height))}else{var et,ut,bt;Me.side==="right"?(et="start",ut=1,bt="",Mt=Se._offset+Se._length):(et="end",ut=-1,bt="-",Mt=Se._offset),zt=Me._offset+(_e.y0+_e.y1)/2,xi.attr("text-anchor",et),na.attr("d","M0,0L"+bt+k+","+k+"V"+(T+Et.height/2)+"h"+bt+(T*2+Et.width)+"V-"+(T+Et.height/2)+"H"+bt+k+"V-"+k+"Z"),Ee.minY=zt-(T+Et.height/2),Ee.maxY=zt+(T+Et.height/2),Me.side==="right"?(Ee.minX=Mt+k,Ee.maxX=Mt+k+(T*2+Et.width)):(Ee.minX=Mt-k-(T*2+Et.width),Ee.maxX=Mt-k);var Ot=Et.height/2,It=_t-Et.top-Ot,Wt="clip"+K._uid+"commonlabel"+Me._id,jt;if(Mtna.hoverinfo!=="none");if(ia.length===0)return[];var De=K.hoverlabel,Ce=De.font,Fe=ia[0],Je=((re==="x unified"?Fe.xa:Fe.ya).unifiedhovertitle||{}).text,qe=Je?a.hovertemplateString({data:re==="x unified"?[{xa:Fe.xa,x:Fe.xVal}]:[{ya:Fe.ya,y:Fe.yVal}],fallback:Fe.trace.hovertemplatefallback,locale:K._d3locale,template:Je}):Ze,at={showlegend:!0,legend:{title:{text:qe,font:Ce},font:Ce,bgcolor:De.bgcolor,bordercolor:De.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:K.legend?K.legend.traceorder:void 0,orientation:"v"}},tt={font:Ce};_(at,tt,Y._fullData);var ct=tt.legend;ct.entries=[];for(var At=0;At=0?_i=Hr:jr+kt=0?_i=jr:Oa+kt=0?ti=Fr:la+Vt=0?ti=la:Da+Vt=0,(ia.idealAlign==="top"||!Mr)&&ua?(bt-=It/2,ia.anchor="end"):Mr?(bt+=It/2,ia.anchor="start"):ia.anchor="middle",ia.crossPos=bt;else{if(ia.pos=bt,Mr=ut+Ot/2+kr<=Pt,ua=ut-Ot/2-kr>=0,(ia.idealAlign==="left"||!Mr)&&ua)ut-=Ot/2,ia.anchor="end";else if(Mr)ut+=Ot/2,ia.anchor="start";else{ia.anchor="middle";var ra=kr/2,ni=ut+ra-Pt,Ca=ut-ra;ni>0&&(ut-=ni),Ca<0&&(ut+=-Ca)}ia.crossPos=ut}zt.attr("text-anchor",ia.anchor),Ht&&Gt.attr("text-anchor",ia.anchor),na.attr("transform",o(ut,bt)+(se?s(x):""))}),{hoverLabels:Ka,commonLabelBoundingBox:Ee}}function z(j,q,Y,K,re,se){var le,ue,fe="",pe="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=a.templateString(j.name,j.trace._meta)),fe=J(j.name,j.nameLength));var we=Y.charAt(0),xe=we==="x"?"y":"x";j.zLabel!==void 0?(j.xLabel!==void 0&&(pe+="x: "+j.xLabel+"
"),j.yLabel!==void 0&&(pe+="y: "+j.yLabel+"
"),j.trace.type!=="choropleth"&&j.trace.type!=="choroplethmap"&&(pe+=(pe?"z: ":"")+j.zLabel)):q&&j[we+"Label"]===re?pe=j[xe+"Label"]||"":j.xLabel===void 0?j.yLabel!==void 0&&j.trace.type!=="scattercarpet"&&(pe=j.yLabel):j.yLabel===void 0?pe=j.xLabel:pe="("+j.xLabel+", "+j.yLabel+")",(j.text||j.text===0)&&!Array.isArray(j.text)&&(pe+=(pe?"
":"")+j.text),j.extraText!==void 0&&(pe+=(pe?"
":"")+j.extraText),se&&pe===""&&!j.hovertemplate&&(fe===""&&se.remove(),pe=fe),(ue=(le=j.trace)==null?void 0:le.hoverlabel)!=null&&ue.split&&(j.hovertemplate="");let{hovertemplate:he=!1}=j;if(he){let oe=j.hovertemplateLabels||j;j[we+"Label"]!==re&&(oe[we+"other"]=oe[we+"Val"],oe[we+"otherLabel"]=oe[we+"Label"]),pe=a.hovertemplateString({data:[j.eventData[0]||{},j.trace._meta],fallback:j.trace.hovertemplatefallback,labels:oe,locale:K._d3locale,template:he}),pe=pe.replace(R,(te,ie)=>(fe=J(ie,j.nameLength),""))}return[pe,fe]}function I(j,q,Y,K){var re=q?"xa":"ya",se=q?"ya":"xa",le=0,ue=1,fe=j.size(),pe=new Array(fe),we=0,xe=K.minX,he=K.maxX,oe=K.minY,te=K.maxY,ie=function(Ye){return Ye*Y._invScaleX},ee=function(Ye){return Ye*Y._invScaleY};j.each(function(Ye){var me=Ye[re],be=Ye[se],Ee=me._id.charAt(0)==="x",De=me.range;we===0&&De&&De[0]>De[1]!==Ee&&(ue=-1);var Ce=0,Fe=Ee?Y.width:Y.height;if(Y.hovermode==="x"||Y.hovermode==="y"){var Je=L(Ye,q),qe=Ye.anchor,at=qe==="end"?-1:1,tt,ct;if(qe==="middle")tt=Ye.crossPos+(Ee?ee(Je.y-Ye.by/2):ie(Ye.bx/2+Ye.tx2width/2)),ct=tt+(Ee?ee(Ye.by):ie(Ye.bx));else if(Ee)tt=Ye.crossPos+ee(k+Je.y)-ee(Ye.by/2-k),ct=tt+ee(Ye.by);else{var At=ie(at*k+Je.x),ft=At+ie(at*Ye.bx);tt=Ye.crossPos+Math.min(At,ft),ct=Ye.crossPos+Math.max(At,ft)}Ee?oe!==void 0&&te!==void 0&&Math.min(ct,te)-Math.max(tt,oe)>1&&(be.side==="left"?(Ce=be._mainLinePosition,Fe=Y.width):Fe=be._mainLinePosition):xe!==void 0&&he!==void 0&&Math.min(ct,he)-Math.max(tt,xe)>1&&(be.side==="top"?(Ce=be._mainLinePosition,Fe=Y.height):Fe=be._mainLinePosition)}pe[we++]=[{datum:Ye,traceIndex:Ye.trace.index,dp:0,pos:Ye.pos,posref:Ye.posref,size:Ye.by*(Ee?M:1)/2,pmin:Ce,pmax:Fe}]}),pe.sort(function(Ye,me){return Ye[0].posref-me[0].posref||ue*(me[0].traceIndex-Ye[0].traceIndex)});var ce,_e,Se,Me,Ue,Ge,Ze;function Ke(Ye){var me=Ye[0],be=Ye[Ye.length-1];if(_e=me.pmin-me.pos-me.dp+me.size,Se=be.pos+be.dp+be.size-me.pmax,_e>.01){for(Ue=Ye.length-1;Ue>=0;Ue--)Ye[Ue].dp+=_e;ce=!1}if(!(Se<.01)){if(_e<-.01){for(Ue=Ye.length-1;Ue>=0;Ue--)Ye[Ue].dp-=Se;ce=!1}if(ce){var Ee=0;for(Me=0;Meme.pmax&&Ee++;for(Me=Ye.length-1;Me>=0&&!(Ee<=0);Me--)Ge=Ye[Me],Ge.pos>me.pmax-1&&(Ge.del=!0,Ee--);for(Me=0;Me=0;Ue--)Ye[Ue].dp-=Se;for(Me=Ye.length-1;Me>=0&&!(Ee<=0);Me--)Ge=Ye[Me],Ge.pos+Ge.dp+Ge.size>me.pmax&&(Ge.del=!0,Ee--)}}}for(;!ce&&le<=fe;){for(le++,ce=!0,Me=0;Me.01){for(Ue=_t.length-1;Ue>=0;Ue--)_t[Ue].dp+=_e;for(dt.push.apply(dt,_t),pe.splice(Me+1,1),Ze=0,Ue=dt.length-1;Ue>=0;Ue--)Ze+=dt[Ue].dp;for(Se=Ze/dt.length,Ue=dt.length-1;Ue>=0;Ue--)dt[Ue].dp-=Se;ce=!1}else Me++}pe.forEach(Ke)}for(Me=pe.length-1;Me>=0;Me--){var Tt=pe[Me];for(Ue=Tt.length-1;Ue>=0;Ue--){var st=Tt[Ue],Ve=st.datum;Ve.offset=st.dp,Ve.del=st.del}}}function L(j,q){var Y=0,K=j.offset;return q&&(K*=-w,Y=j.offset*C),{x:Y,y:K}}function B(j){var q={start:1,end:-1,middle:0}[j.anchor],Y=q*(k+T),K=Y+q*(j.txwidth+T),re=j.anchor==="middle";return re&&(Y-=j.tx2width/2,K+=j.txwidth/2+T),{alignShift:q,textShiftX:Y,text2ShiftX:K}}function O(j,q,Y,K){var re=function(le){return le*Y},se=function(le){return le*K};j.each(function(le){var ue=r.select(this);if(le.del)return ue.remove();var fe=ue.select("text.nums"),pe=le.anchor,we=pe==="end"?-1:1,xe=B(le),he=L(le,q),oe=he.x,te=he.y,ie=pe==="middle",ee="hoverlabel"in le.trace?le.trace.hoverlabel.showarrow:!0,ce;ie?ce="M-"+re(le.bx/2+le.tx2width/2)+","+se(te-le.by/2)+"h"+re(le.bx)+"v"+se(le.by)+"h-"+re(le.bx)+"Z":ee?ce="M0,0L"+re(we*k+oe)+","+se(k+te)+"v"+se(le.by/2-k)+"h"+re(we*le.bx)+"v-"+se(le.by)+"H"+re(we*k+oe)+"V"+se(te-k)+"Z":ce="M"+re(we*k+oe)+","+se(te-le.by/2)+"h"+re(we*le.bx)+"v"+se(le.by)+"h"+re(-we*le.bx)+"Z",ue.select("path").attr("d",ce);var _e=oe+xe.textShiftX,Se=te+le.ty0-le.by/2+T,Me=le.textAlign||"auto";Me!=="auto"&&(Me==="left"&&pe!=="start"?(fe.attr("text-anchor","start"),_e=ie?-le.bx/2-le.tx2width/2+T:-le.bx-T):Me==="right"&&pe!=="end"&&(fe.attr("text-anchor","end"),_e=ie?le.bx/2-le.tx2width/2-T:le.bx+T)),fe.call(n.positionText,re(_e),se(Se)),le.tx2width&&(ue.select("text.name").call(n.positionText,re(xe.text2ShiftX+xe.alignShift*T+oe),se(te+le.ty0-le.by/2+T)),ue.select("rect").call(c.setRect,re(xe.text2ShiftX+(xe.alignShift-1)*le.tx2width/2+oe),se(te-le.by/2-1),re(le.tx2width),se(le.by+2)))})}function G(j,q){var Y=j.index,K=j.trace||{},re=j.cd[0],se=j.cd[Y]||{};function le(he){return he||t(he)&&he===0}var ue=Array.isArray(Y)?function(he,oe){var te=a.castOption(re,Y,he);return le(te)?te:a.extractOption({},K,"",oe)}:function(he,oe){return a.extractOption(se,K,he,oe)};function fe(he,oe,te){var ie=ue(oe,te);le(ie)&&(j[he]=ie)}if(fe("hoverinfo","hi","hoverinfo"),fe("bgcolor","hbg","hoverlabel.bgcolor"),fe("borderColor","hbc","hoverlabel.bordercolor"),fe("fontFamily","htf","hoverlabel.font.family"),fe("fontSize","hts","hoverlabel.font.size"),fe("fontColor","htc","hoverlabel.font.color"),fe("fontWeight","htw","hoverlabel.font.weight"),fe("fontStyle","hty","hoverlabel.font.style"),fe("fontVariant","htv","hoverlabel.font.variant"),fe("nameLength","hnl","hoverlabel.namelength"),fe("textAlign","hta","hoverlabel.align"),j.posref=q==="y"||q==="closest"&&K.orientation==="h"?j.xa._offset+(j.x0+j.x1)/2:j.ya._offset+(j.y0+j.y1)/2,j.x0=a.constrain(j.x0,0,j.xa._length),j.x1=a.constrain(j.x1,0,j.xa._length),j.y0=a.constrain(j.y0,0,j.ya._length),j.y1=a.constrain(j.y1,0,j.ya._length),j.xLabelVal!==void 0&&(j.xLabel="xLabel"in j?j.xLabel:d.hoverLabelText(j.xa,j.xLabelVal,K.xhoverformat),j.xVal=j.xa.c2d(j.xLabelVal)),j.yLabelVal!==void 0&&(j.yLabel="yLabel"in j?j.yLabel:d.hoverLabelText(j.ya,j.yLabelVal,K.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 pe=d.tickText(j.xa,j.xa.c2l(j.xerr),"hover").text;j.xerrneg!==void 0?j.xLabel+=" +"+pe+" / -"+d.tickText(j.xa,j.xa.c2l(j.xerrneg),"hover").text:j.xLabel+=" \xB1 "+pe,q==="x"&&(j.distance+=1)}if(!isNaN(j.yerr)&&!(j.ya.type==="log"&&j.yerr<=0)){var we=d.tickText(j.ya,j.ya.c2l(j.yerr),"hover").text;j.yerrneg!==void 0?j.yLabel+=" +"+we+" / -"+d.tickText(j.ya,j.ya.c2l(j.yerrneg),"hover").text:j.yLabel+=" \xB1 "+we,q==="y"&&(j.distance+=1)}var xe=j.hoverinfo||j.trace.hoverinfo;return xe&&xe!=="all"&&(xe=Array.isArray(xe)?xe:xe.split("+"),xe.indexOf("x")===-1&&(j.xLabel=void 0),xe.indexOf("y")===-1&&(j.yLabel=void 0),xe.indexOf("z")===-1&&(j.zLabel=void 0),xe.indexOf("text")===-1&&(j.text=void 0),xe.indexOf("name")===-1&&(j.name=void 0)),j}function $(j,q,Y){var K=Y.container,re=Y.fullLayout,se=re._size,le=Y.event,ue=!!q.hLinePoint,fe=!!q.vLinePoint,pe,we;if(K.selectAll(".spikeline").remove(),!!(fe||ue)){var xe=f.combine(re.plot_bgcolor,re.paper_bgcolor);if(ue){var he=q.hLinePoint,oe,te;pe=he&&he.xa,we=he&&he.ya;var ie=we.spikesnap;ie==="cursor"?(oe=le.pointerX,te=le.pointerY):(oe=pe._offset+he.x,te=we._offset+he.y);var ee=f.wcagContrast(he.color,xe)<1.5?f.contrast(xe):he.color,ce=we.spikemode,_e=we.spikethickness,Se=we.spikecolor||ee,Me=d.getPxPosition(j,we),Ue,Ge;if(ce.indexOf("toaxis")!==-1||ce.indexOf("across")!==-1){if(ce.indexOf("toaxis")!==-1&&(Ue=Me,Ge=oe),ce.indexOf("across")!==-1){var Ze=we._counterDomainMin,Ke=we._counterDomainMax;we.anchor==="free"&&(Ze=Math.min(Ze,we.position),Ke=Math.max(Ke,we.position)),Ue=se.l+Ze*se.w,Ge=se.l+Ke*se.w}K.insert("line",":first-child").attr({x1:Ue,x2:Ge,y1:te,y2:te,"stroke-width":_e,stroke:Se,"stroke-dasharray":c.dashStyle(we.spikedash,_e)}).classed("spikeline",!0).classed("crisp",!0),K.insert("line",":first-child").attr({x1:Ue,x2:Ge,y1:te,y2:te,"stroke-width":_e+2,stroke:xe}).classed("spikeline",!0).classed("crisp",!0)}ce.indexOf("marker")!==-1&&K.insert("circle",":first-child").attr({cx:Me+(we.side!=="right"?_e:-_e),cy:te,r:_e,fill:Se}).classed("spikeline",!0)}if(fe){var dt=q.vLinePoint,_t,Pt;pe=dt&&dt.xa,we=dt&&dt.ya;var pt=pe.spikesnap;pt==="cursor"?(_t=le.pointerX,Pt=le.pointerY):(_t=pe._offset+dt.x,Pt=we._offset+dt.y);var Tt=f.wcagContrast(dt.color,xe)<1.5?f.contrast(xe):dt.color,st=pe.spikemode,Ve=pe.spikethickness,Ye=pe.spikecolor||Tt,me=d.getPxPosition(j,pe),be,Ee;if(st.indexOf("toaxis")!==-1||st.indexOf("across")!==-1){if(st.indexOf("toaxis")!==-1&&(be=me,Ee=Pt),st.indexOf("across")!==-1){var De=pe._counterDomainMin,Ce=pe._counterDomainMax;pe.anchor==="free"&&(De=Math.min(De,pe.position),Ce=Math.max(Ce,pe.position)),be=se.t+(1-Ce)*se.h,Ee=se.t+(1-De)*se.h}K.insert("line",":first-child").attr({x1:_t,x2:_t,y1:be,y2:Ee,"stroke-width":Ve,stroke:Ye,"stroke-dasharray":c.dashStyle(pe.spikedash,Ve)}).classed("spikeline",!0).classed("crisp",!0),K.insert("line",":first-child").attr({x1:_t,x2:_t,y1:be,y2:Ee,"stroke-width":Ve+2,stroke:xe}).classed("spikeline",!0).classed("crisp",!0)}st.indexOf("marker")!==-1&&K.insert("circle",":first-child").attr({cx:_t,cy:me-(pe.side!=="top"?Ve:-Ve),r:Ve,fill:Ye}).classed("spikeline",!0)}}}function X(j,q,Y){if(!Y||Y.length!==j._hoverdata.length)return!0;for(var K=Y.length-1;K>=0;K--){var re=Y[K],se=j._hoverdata[K];if(re.curveNumber!==se.curveNumber||String(re.pointNumber)!==String(se.pointNumber)||String(re.pointNumbers)!==String(se.pointNumbers)||re.binNumber!==se.binNumber)return!0}return!1}function Z(j,q){return!q||q.vLinePoint!==j._spikepoints.vLinePoint||q.hLinePoint!==j._spikepoints.hLinePoint}function J(j,q){return n.plainText(j||"",{len:q,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function N(j,q){for(var Y=q.charAt(0),K=[],re=[],se=[],le=0;lej.offsetTop+j.clientTop,U=j=>j.offsetLeft+j.clientLeft;function V(j,q){var Y=j._fullLayout,K=q.getBoundingClientRect(),re=K.left,se=K.top,le=re+K.width,ue=se+K.height,fe=a.apply3DTransform(Y._invTransform)(re,se),pe=a.apply3DTransform(Y._invTransform)(le,ue),we=fe[0],xe=fe[1],he=pe[0],oe=pe[1];return{x:we,y:xe,width:he-we,height:oe-xe,top:Math.min(xe,oe),left:Math.min(we,he),right:Math.max(we,he),bottom:Math.max(xe,oe)}}}}),Xx=ye({"src/components/fx/hoverlabel_defaults.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=Bf().isUnifiedHover;r.exports=function(s,l,n,u){u=u||{};var c=l.legend;function f(h){u.font[h]||(u.font[h]=c?l.legend.font[h]:l.font[h])}l&&i(l.hovermode)&&(u.font||(u.font={}),f("size"),f("family"),f("color"),f("weight"),f("style"),f("variant"),c?(u.bgcolor||(u.bgcolor=a.combine(l.legend.bgcolor,l.paper_bgcolor)),u.bordercolor||(u.bordercolor=l.legend.bordercolor)):u.bgcolor||(u.bgcolor=l.paper_bgcolor)),n("hoverlabel.bgcolor",u.bgcolor),n("hoverlabel.bordercolor",u.bordercolor),n("hoverlabel.namelength",u.namelength),n("hoverlabel.showarrow",u.showarrow),t.coerceFont(n,"hoverlabel.font",u.font),n("hoverlabel.align",u.align)}}}),Jee=ye({"src/components/fx/layout_global_defaults.js"(e,r){"use strict";var t=Yt(),a=Xx(),i=_v();r.exports=function(s,l){function n(u,c){return t.coerce(s,l,i,u,c)}a(s,l,n)}}}),Qee=ye({"src/components/fx/defaults.js"(e,r){"use strict";var t=Yt(),a=fy(),i=Xx();r.exports=function(s,l,n,u){function c(h,d){return t.coerce(s,l,a,h,d)}var f=t.extendFlat({},u.hoverlabel);l.hovertemplate&&(f.namelength=-1),i(s,l,c,f)}}}),n9=ye({"src/components/fx/hovermode_defaults.js"(e,r){"use strict";var t=Yt(),a=_v();r.exports=function(o,s){function l(n,u){return s[n]!==void 0?s[n]:t.coerce(o,s,a,n,u)}return l("clickmode"),l("hoversubplots"),l("hoveranywhere"),l("clickanywhere"),l("hovermode")}}}),ete=ye({"src/components/fx/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=_v(),i=n9(),o=Xx();r.exports=function(l,n){function u(g,m){return t.coerce(l,n,a,g,m)}var c=i(l,n);c&&(u("hoverdistance"),u("spikedistance"),c.indexOf("unified")!==-1&&u("hoversort"));var f=u("dragmode");f==="select"&&u("selectdirection");var h=n._has("map"),d=n._has("geo"),p=n._basePlotModules.length;n.dragmode==="zoom"&&((h||d)&&p===1||h&&d&&p===2)&&(n.dragmode="pan"),o(l,n,u),t.coerceFont(u,"hoverlabel.grouptitlefont",n.hoverlabel.font)}}}),tte=ye({"src/components/fx/calc.js"(e,r){"use strict";var t=Yt(),a=li();r.exports=function(s){var l=s.calcdata,n=s._fullLayout;function u(p){return function(g){return t.coerceHoverinfo({hoverinfo:g},{_module:p._module},n)}}for(var c=0;c"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),MA=ye({"src/components/shapes/draw_newshape/constants.js"(e,r){"use strict";var t=32;r.exports={CIRCLE_SIDES:t,i000:0,i090:t/4,i180:t/2,i270:t/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),EA=ye({"src/components/selections/helpers.js"(e,r){"use strict";var t=Yt().strTranslate;function a(l,n){switch(l.type){case"log":return l.p2d(n);case"date":return l.p2r(n,0,l.calendar);default:return l.p2r(n)}}function i(l,n){switch(l.type){case"log":return l.d2p(n);case"date":return l.r2p(n,0,l.calendar);default:return l.r2p(n)}}function o(l){var n=l._id.charAt(0)==="y"?1:0;return function(u){return a(l,u[n])}}function s(l){return t(l.xaxis._offset,l.yaxis._offset)}r.exports={p2r:a,r2p:i,axValue:o,getTransform:s}}}),Ev=ye({"src/components/shapes/draw_newshape/helpers.js"(e){"use strict";var r=XD(),t=MA(),a=t.CIRCLE_SIDES,i=t.SQRT2,o=EA(),s=o.p2r,l=o.r2p,n=[0,3,4,5,6,1,2],u=[0,3,4,1,2];e.writePaths=function(h){var d=h.length;if(!d)return"M0,0Z";for(var p="",g=0;g0&&x{let d=h.charAt(0),p=c[d].drawn!==void 0;return f+(p?1:0)},0)},e.getDataToPixel=function(s,l,n,u,c){var f=s._fullLayout._size,h;if(l)if(c==="domain")h=function(p){return l._length*(u?1-p:p)+l._offset};else{var d=e.shapePositionToRange(l);h=function(p){var g=o(l,n);return l._offset+l.r2p(d(p,!0))+g},l.type==="date"&&(h=e.decodeDate(h))}else u?h=function(p){return f.t+f.h*(1-p)}:h=function(p){return f.l+f.w*p};return h},e.getPixelToData=function(s,l,n,u){var c=s._fullLayout._size,f;if(l)if(u==="domain")f=function(d){var p=(d-l._offset)/l._length;return n?1-p:p};else{var h=e.rangeToShapePosition(l);f=function(d){return h(l.p2r(d-l._offset))}}else n?f=function(d){return 1-(d-c.t)/c.h}:f=function(d){return(d-c.l)/c.w};return f},e.roundPositionForSharpStrokeRendering=function(s,l){var n=Math.round(l%2)===1,u=Math.round(s);return n?u+.5:u},e.makeShapesOptionsAndPlotinfo=function(s,l){var n=s._fullLayout.shapes[l]||{},u=s._fullLayout._plots[n.xref+n.yref],c=!!u;return c?u._hadPlotinfo=!0:(u={},n.xref&&n.xref!=="paper"&&(u.xaxis=s._fullLayout[n.xref+"axis"]),n.yref&&n.yref!=="paper"&&(u.yaxis=s._fullLayout[n.yref+"axis"])),u.xsizemode=n.xsizemode,u.ysizemode=n.ysizemode,u.xanchor=n.xanchor,u.yanchor=n.yanchor,{options:n,plotinfo:u}},e.makeSelectionsOptionsAndPlotinfo=function(s,l){var n=s._fullLayout.selections[l]||{},u=s._fullLayout._plots[n.xref+n.yref],c=!!u;return c?u._hadPlotinfo=!0:(u={},n.xref&&(u.xaxis=s._fullLayout[n.xref+"axis"]),n.yref&&(u.yaxis=s._fullLayout[n.yref+"axis"])),{options:n,plotinfo:u}},e.getPathString=function(s,l){let n=l.type,u=a.getRefType(l.xref),c=a.getRefType(l.yref),f=s._fullLayout._size;var h,d,p,g,m,y,_,v,x,E,M,C;function w(R,P,z,I){var L;if(R)if(P==="domain")I?L=function(B){return R._offset+R._length*(1-B)}:L=function(B){return R._offset+R._length*B};else{let B=e.shapePositionToRange(R);L=function(O){return R._offset+R.r2p(B(O,!0))},z==="path"&&R.type==="date"&&(L=e.decodeDate(L))}else I?L=function(B){return f.t+f.h*(1-B)}:L=function(B){return f.l+f.w*B};return L}if(u==="array"?(_=[],h=l.xref.map(function(R){return a.getFromId(s,R)}),_=l.xref.map(function(R,P){return w(h[P],a.getRefType(R),n,!1)})):(h=a.getFromId(s,l.xref),_=w(h,u,n,!1)),c==="array"?(v=[],d=l.yref.map(function(R){return a.getFromId(s,R)}),v=l.yref.map(function(R,P){return w(d[P],a.getRefType(R),n,!0)})):(d=a.getFromId(s,l.yref),v=w(d,c,n,!0)),n==="path")return i(l,_,v);if(u==="array")p=o(h[0],l.x0shift),g=o(h[1],l.x1shift),x=_[0](l.x0)+p,E=_[1](l.x1)+g;else if(p=o(h,l.x0shift),g=o(h,l.x1shift),l.xsizemode==="pixel"){let R=_(l.xanchor);x=R+l.x0+p,E=R+l.x1+g}else x=_(l.x0)+p,E=_(l.x1)+g;if(c==="array")m=o(d[0],l.y0shift),y=o(d[1],l.y1shift),M=v[0](l.y0)+m,C=v[1](l.y1)+y;else if(m=o(d,l.y0shift),y=o(d,l.y1shift),l.ysizemode==="pixel"){let R=v(l.yanchor);M=R-l.y0+m,C=R-l.y1+y}else M=v(l.y0)+m,C=v(l.y1)+y;if(n==="line")return"M"+x+","+M+"L"+E+","+C;if(n==="rect")return"M"+x+","+M+"H"+E+"V"+C+"H"+x+"Z";var k=(x+E)/2,T=(M+C)/2,b=Math.abs(k-x),S=Math.abs(T-M),A="A"+b+","+S,F=k+b+","+T,D=k+","+(T-S);return"M"+F+A+" 0 1,1 "+D+A+" 0 0,1 "+F+"Z"};function i(s,l,n){let u=s.path,c=s.xsizemode,f=s.ysizemode,h=s.xanchor,d=s.yanchor,p=Array.isArray(s.xref),g=Array.isArray(s.yref);var m=0,y=0;return u.replace(r.segmentRE,function(_){var v=0,x=_.charAt(0),E=r.paramIsX[x],M=r.paramIsY[x],C=r.numParams[x];let w=E.drawn!==void 0,k=M.drawn!==void 0,T=p?l[m]:l,b=g?n[y]:n;var S=_.slice(1).replace(r.paramRE,function(A){return E[v]?c==="pixel"?A=T(h)+Number(A):A=T(A):M[v]&&(f==="pixel"?A=b(d)-Number(A):A=b(A)),v++,v>C&&(A="X"),A});return v>C&&(S=S.replace(/[\s,]*X.*/,""),t.log("Ignoring extra params in segment "+_)),w&&m++,k&&y++,x+S})}e.getPixelShift=o;function o(s,l){l=l||0;var n=0;return l&&s&&(s.type==="category"||s.type==="multicategory")&&(n=(s.r2p(1)-s.r2p(0))*l),n}}}),s9=ye({"src/components/shapes/display_labels.js"(e,r){"use strict";var t=Yt(),a=qi(),i=Go(),o=$i(),s=Ev().readPaths,l=Sv(),n=l.getPathString,u=gA(),c=Yl().FROM_TL;r.exports=function(p,g,m,y){if(y.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var _;if(m.label.texttemplate){var v={};if(m.type!=="path"){var x=a.getFromId(p,m.xref),E=a.getFromId(p,m.yref);let q=Array.isArray(m.xref),Y=Array.isArray(m.yref);for(var M in u){var C=typeof u[M]=="function",w=!q||u.simpleXVariables.includes(M),k=!Y||u.simpleYVariables.includes(M);if(C&&w&&k){var T=u[M](m,x,E);T!==void 0&&(v[M]=T)}}}_=t.texttemplateStringForShapes({data:[v],fallback:m.label.texttemplatefallback,locale:p._fullLayout._d3locale,template:m.label.texttemplate})}else _=m.label.text;var b={"data-index":g},S=m.label.font,A={"data-notex":1},F=y.append("g").attr(b).classed("shape-label",!0),D=F.append("text").attr(A).classed("shape-label-text",!0).text(_),R,P,z,I;if(m.path){var L=n(p,m),B=s(L,p);R=1/0,z=1/0,P=-1/0,I=-1/0;for(var O=0;Ol.getDataToPixel(p,ie,te,!1,ee)(oe),he=(oe,te,ie,ee)=>l.getDataToPixel(p,ie,te,!0,ee)(oe);if(m.xsizemode==="pixel"){let oe=xe(m.xanchor,void 0,K,ue),te=l.getPixelShift(K,m.x0shift),ie=l.getPixelShift(K,m.x1shift);R=oe+m.x0+te,P=oe+m.x1+ie}else R=xe(m.x0,m.x0shift,K,ue),P=xe(m.x1,m.x1shift,re,fe);if(m.ysizemode==="pixel"){let oe=he(m.yanchor,void 0,se,pe),te=l.getPixelShift(se,m.y0shift),ie=l.getPixelShift(se,m.y1shift);z=oe-m.y0+te,I=oe-m.y1+ie}else z=he(m.y0,m.y0shift,se,pe),I=he(m.y1,m.y1shift,le,we)}var N=m.label.textangle;N==="auto"&&(m.type==="line"?N=f(R,z,P,I):N=0),D.call(function(q){return q.call(o.font,S).attr({}),i.convertToTspans(q,p),q});var H=o.bBox(D.node()),W=h(R,z,P,I,m,N,H),U=W.textx,V=W.texty,j=W.xanchor;D.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[j],y:V,x:U,transform:"rotate("+N+","+U+","+V+")"}).call(i.positionText,U,V)}};function f(d,p,g,m){var y,_;return _=Math.abs(g-d),g>=d?y=p-m:y=m-p,-180/Math.PI*Math.atan2(y,_)}function h(d,p,g,m,y,_,v){var x=y.label.textposition,E=y.label.textangle,M=y.label.padding,C=y.type,w=Math.PI/180*_,k=Math.sin(w),T=Math.cos(w),b=y.label.xanchor,S=y.label.yanchor,A,F,D,R;if(C==="line"){x==="start"?(A=d,F=p):x==="end"?(A=g,F=m):(A=(d+g)/2,F=(p+m)/2),b==="auto"&&(x==="start"?E==="auto"?g>d?b="left":gd?b="right":gd?b="right":gd?b="left":g1&&!(he.length===2&&he[1][0]==="Z")&&(N===0&&(he[0][0]="M"),A[J]=he,z(),I())}}function re(he,oe){if(he===2){J=+oe.srcElement.getAttribute("data-i"),N=+oe.srcElement.getAttribute("data-j");var te=A[J];!_(te)&&!v(te)&&K()}}function se(he){X=[];for(var oe=0;oe{if(!D._dragging&&D._fullLayout.hoveranywhere){let B=I(L);B&&p.hover(D,B,P.id)}}),z.addEventListener("click",L=>{if(!D._dragged&&D._fullLayout.clickanywhere){let B=I(L);B&&p.click(D,B,P.id)}})}function w(D,R,P){let z=P.xref,I=P.yref;if(Array.isArray(z)||Array.isArray(I)){let L="clip"+R._fullLayout._uid+"shape"+P._index,B=k(R,z,I);i.ensureSingleById(R._fullLayout._clips,"clipPath",L,function(O){O.append("rect")}).select("rect").attr(B),f.setClipUrl(D,L,R)}else{let L=(z+I).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");f.setClipUrl(D,L?"clip"+R._fullLayout._uid+L:null,R)}}function k(D,R,P){let z=D._fullLayout._size;function I(O,G){let $=(Array.isArray(O)?O:[O]).map(J=>o.getFromId(D,J)).filter(Boolean);if(!$.length)return G?[z.t,z.t+z.h]:[z.l,z.l+z.w];let X=$.map(function(J){return J._offset}),Z=$.map(function(J){return J._offset+J._length});return[Math.min(...X),Math.max(...Z)]}let L=I(R,!1),B=I(P,!0);return{x:L[0],y:B[0],width:L[1]-L[0],height:B[1]-B[0]}}function T(D,R,P,z,I,L){var B=10,O=10,G=P.xsizemode==="pixel",$=P.ysizemode==="pixel",X=P.type==="line",Z=P.type==="path",J=L.modifyItem,N,H,W,U,V,j,q,Y,K,re,se,le,ue,fe,pe,we=t.select(R.node().parentNode),xe=o.getFromId(D,P.xref),he=o.getRefType(P.xref),oe=o.getFromId(D,P.yref),te=o.getRefType(P.yref),ie=P.x0shift,ee=P.x1shift,ce=P.y0shift,_e=P.y1shift,Se=function(Ce,Fe){var Je=y.getDataToPixel(D,xe,Fe,!1,he);return Je(Ce)},Me=function(Ce,Fe){var Je=y.getDataToPixel(D,oe,Fe,!0,te);return Je(Ce)},Ue=y.getPixelToData(D,xe,!1,he),Ge=y.getPixelToData(D,oe,!0,te),Ze=_t(),Ke={element:Ze.node(),gd:D,prepFn:Tt,doneFn:st,clickFn:Ve},dt;d.init(Ke),Ze.node().onmousemove=pt;function _t(){return X?Pt():R}function Pt(){var Ce=10,Fe=Math.max(P.line.width,Ce),Je=I.append("g").attr("data-index",z).attr("drag-helper",!0);Je.append("path").attr("d",R.attr("d")).style({cursor:"move","stroke-width":Fe,"stroke-opacity":"0"});var qe={"fill-opacity":"0"},at=Math.max(Fe/2,Ce);return Je.append("circle").attr({"data-line-point":"start-point",cx:G?Se(P.xanchor)+P.x0:Se(P.x0,ie),cy:$?Me(P.yanchor)-P.y0:Me(P.y0,ce),r:at}).style(qe).classed("cursor-grab",!0),Je.append("circle").attr({"data-line-point":"end-point",cx:G?Se(P.xanchor)+P.x1:Se(P.x1,ee),cy:$?Me(P.yanchor)-P.y1:Me(P.y1,_e),r:at}).style(qe).classed("cursor-grab",!0),Je}function pt(Ce){if(x(D)){dt=null;return}if(X)Ce.target.tagName==="path"?dt="move":dt=Ce.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Fe=Ke.element.getBoundingClientRect(),Je=Fe.right-Fe.left,qe=Fe.bottom-Fe.top,at=Ce.clientX-Fe.left,tt=Ce.clientY-Fe.top,ct=!Z&&Je>B&&qe>O&&!Ce.shiftKey?d.getCursor(at/Je,1-tt/qe):"move";g(R,ct),dt=ct.split("-")[0]}}function Tt(Ce){x(D)||(G&&(V=Se(P.xanchor)),$&&(j=Me(P.yanchor)),P.type==="path"?pe=P.path:(N=G?P.x0:Se(P.x0),H=$?P.y0:Me(P.y0),W=G?P.x1:Se(P.x1),U=$?P.y1:Me(P.y1)),NU?(q=H,se="y0",Y=U,le="y1"):(q=U,se="y1",Y=H,le="y0"),pt(Ce),be(I,P),De(R,P,D),Ke.moveFn=dt==="move"?Ye:me,Ke.altKey=Ce.altKey)}function st(){x(D)||(g(R),Ee(I),w(R,D,P),a.call("_guiRelayout",D,L.getUpdateObj()))}function Ve(){x(D)||Ee(I)}function Ye(Ce,Fe){if(P.type==="path"){var Je=function(tt){return tt},qe=Je,at=Je;G?J("xanchor",P.xanchor=Ue(V+Ce)):(qe=function(ct){return Ue(Se(ct)+Ce)},xe&&xe.type==="date"&&(qe=y.encodeDate(qe))),$?J("yanchor",P.yanchor=Ge(j+Fe)):(at=function(ct){return Ge(Me(ct)+Fe)},oe&&oe.type==="date"&&(at=y.encodeDate(at))),J("path",P.path=b(pe,qe,at))}else G?J("xanchor",P.xanchor=Ue(V+Ce)):(J("x0",P.x0=Ue(N+Ce)),J("x1",P.x1=Ue(W+Ce))),$?J("yanchor",P.yanchor=Ge(j+Fe)):(J("y0",P.y0=Ge(H+Fe)),J("y1",P.y1=Ge(U+Fe)));R.attr("d",_(D,P)),be(I,P),n(D,z,P,we)}function me(Ce,Fe){if(Z){var Je=function(dr){return dr},qe=Je,at=Je;G?J("xanchor",P.xanchor=Ue(V+Ce)):(qe=function(yr){return Ue(Se(yr)+Ce)},xe&&xe.type==="date"&&(qe=y.encodeDate(qe))),$?J("yanchor",P.yanchor=Ge(j+Fe)):(at=function(yr){return Ge(Me(yr)+Fe)},oe&&oe.type==="date"&&(at=y.encodeDate(at))),J("path",P.path=b(pe,qe,at))}else if(X){if(dt==="resize-over-start-point"){var tt=N+Ce,ct=$?H-Fe:H+Fe;J("x0",P.x0=G?tt:Ue(tt)),J("y0",P.y0=$?ct:Ge(ct))}else if(dt==="resize-over-end-point"){var At=W+Ce,ft=$?U-Fe:U+Fe;J("x1",P.x1=G?At:Ue(At)),J("y1",P.y1=$?ft:Ge(ft))}}else{var qt=function(dr){return dt.indexOf(dr)!==-1},ar=qt("n"),vt=qt("s"),gt=qt("w"),St=qt("e"),Dt=ar?q+Fe:q,kt=vt?Y+Fe:Y,Vt=gt?K+Ce:K,lr=St?re+Ce:re;$&&(ar&&(Dt=q-Fe),vt&&(kt=Y-Fe)),(!$&&kt-Dt>O||$&&Dt-kt>O)&&(J(se,P[se]=$?Dt:Ge(Dt)),J(le,P[le]=$?kt:Ge(kt))),lr-Vt>B&&(J(ue,P[ue]=G?Vt:Ue(Vt)),J(fe,P[fe]=G?lr:Ue(lr)))}R.attr("d",_(D,P)),be(I,P),n(D,z,P,we)}function be(Ce,Fe){(G||$)&&Je();function Je(){var qe=Fe.type!=="path",at=Ce.selectAll(".visual-cue").data([0]),tt=1;at.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":tt}).classed("visual-cue",!0);var ct=Se(G?Fe.xanchor:i.midRange(qe?[Fe.x0,Fe.x1]:y.extractPathCoords(Fe.path,m.paramIsX))),At=Me($?Fe.yanchor:i.midRange(qe?[Fe.y0,Fe.y1]:y.extractPathCoords(Fe.path,m.paramIsY)));if(ct=y.roundPositionForSharpStrokeRendering(ct,tt),At=y.roundPositionForSharpStrokeRendering(At,tt),G&&$){var ft="M"+(ct-1-tt)+","+(At-1-tt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";at.attr("d",ft)}else if(G){var qt="M"+(ct-1-tt)+","+(At-9-tt)+"v18 h2 v-18 Z";at.attr("d",qt)}else{var ar="M"+(ct-9-tt)+","+(At-1-tt)+"h18 v2 h-18 Z";at.attr("d",ar)}}}function Ee(Ce){Ce.selectAll(".visual-cue").remove()}function De(Ce,Fe,Je){var qe=Fe.xref,at=Fe.yref,tt=o.getFromId(Je,qe),ct=o.getFromId(Je,at),At="";qe!=="paper"&&!tt.autorange&&(At+=qe),at!=="paper"&&!ct.autorange&&(At+=at),f.setClipUrl(Ce,At?"clip"+Je._fullLayout._uid+At:null,Je)}}function b(D,R,P){return D.replace(m.segmentRE,function(z){var I=0,L=z.charAt(0),B=m.paramIsX[L],O=m.paramIsY[L],G=m.numParams[L],$=z.slice(1).replace(m.paramRE,function(X){return I>=G||(B[I]?X=R(X):O[I]&&(X=P(X)),I++),X});return L+$})}function S(D,R){if(E(D)){var P=R.node(),z=+P.getAttribute("data-index");if(z>=0){if(z===D._fullLayout._activeShapeIndex){A(D);return}D._fullLayout._activeShapeIndex=z,D._fullLayout._deactivateShape=A,v(D)}}}function A(D){if(E(D)){var R=D._fullLayout._activeShapeIndex;R>=0&&(u(D),delete D._fullLayout._activeShapeIndex,v(D))}}function F(D){if(E(D)){u(D);var R=D._fullLayout._activeShapeIndex,P=(D.layout||{}).shapes||[];if(R{let h=i(l),d=n.append("div").classed("plotly-cloud-dialog-box",!0);if(d.append("div").classed("plotly-cloud-dialog-title",!0).text(h.DIALOG_TITLE),u===a.plotlyServerURL){let g=d.append("div").classed("plotly-cloud-dialog-message",!0),m=new URL(u).origin,y=h.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),_=y[0],v=y[2],x=y[4];g.append("span").text(_),g.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",m).attr("target","_blank").text(v),g.append("span").text(x),g.append("div").classed("plotly-cloud-dialog-message--account",!0).text(h.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let g=new URL(u),m=g.hostname,y=g.origin,_=h.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),v=_[0],x=_[4],E=d.append("div").classed("plotly-cloud-dialog-message",!0);E.append("span").text(v),E.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",y).attr("target","_blank").text(m),E.append("span").text(x)}let p=d.append("div").classed("plotly-cloud-dialog-buttons",!0);p.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(h.DIALOG_CANCEL).on("click",f),p.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(h.DIALOG_CONFIRM).on("click",c)},s=(l,n,u)=>{let c=t.select(l._fullLayout._paperdiv.node());c.selectAll(".plotly-cloud-dialog").remove();let f=c.append("div").classed("plotly-cloud-dialog",!0),h=()=>{f.remove(),document.removeEventListener("keydown",d)},d=p=>{(p.key==="Escape"||p.keyCode===27)&&h()};document.addEventListener("keydown",d),f.on("click",()=>{t.event.target===f.node()&&h()}),o(l,f,n,()=>{h(),u()},h)};r.exports=s}}),l9=ye({"src/components/modebar/buttons.js"(e,r){"use strict";var t=li(),a=ws(),i=Gs(),o=TA(),s=CA().eraseActiveShape,l=ite(),n=Yt(),u=n._,c=r.exports={};c.toImage={name:"toImage",title:function(w){var k=w._context.toImageButtonOptions||{},T=k.format||"png";return T==="png"?u(w,"Download plot as a PNG"):u(w,"Download plot")},icon:o.camera,click:function(w){var k=w._context.toImageButtonOptions,T={format:k.format||"png"};n.notifier(u(w,"Preparing image - this may take a few seconds"),"long",w),["filename","width","height","scale"].forEach(function(b){b in k&&(T[b]=k[b])}),t.call("downloadImage",w,T).then(function(b){n.notifier(u(w,"Image download succeeded")+" - "+b,"long",w)}).catch(function(){n.notifier(u(w,"Sorry, there was a problem downloading your image!"),"long",w)})}},c.downloadJson={name:"downloadJson",title:function(w){return u(w,"Download plot as JSON")},icon:o.curlybraces,click:function(w){t.call("downloadImage",w,{format:"full-json"}).then(function(k){n.notifier(u(w,"JSON download succeeded")+" - "+k,"long",w)}).catch(function(){n.notifier(u(w,"Sorry, there was a problem downloading your JSON file!"),"long",w)})}},c.sendChartToCloud={name:"sendChartToCloud",title:function(w){return u(w,"Share chart...")},icon:o.cloudupload,click:function(w){var k=(window.PLOTLYENV||{}).BASE_URL||w._context.plotlyServerURL;if(!k){console.error("No destination URL provided (plotlyServerURL is empty)");return}var T;try{T=new URL(k)}catch{console.error("Invalid plotlyServerURL: "+k);return}let b=["http:","https:"];if(!b.includes(T.protocol)){console.error(`Invalid protocol '${T.protocol}' in plotlyServerURL '${k}'. Must be one of: ${b.join(", ")}`);return}l(w,k,function(){a.sendDataToCloud(w,k)})}},c.zoom2d={name:"zoom2d",_cat:"zoom",title:function(w){return u(w,"Zoom")},attr:"dragmode",val:"zoom",icon:o.zoombox,click:f},c.pan2d={name:"pan2d",_cat:"pan",title:function(w){return u(w,"Pan")},attr:"dragmode",val:"pan",icon:o.pan,click:f},c.select2d={name:"select2d",_cat:"select",title:function(w){return u(w,"Box Select")},attr:"dragmode",val:"select",icon:o.selectbox,click:f},c.lasso2d={name:"lasso2d",_cat:"lasso",title:function(w){return u(w,"Lasso Select")},attr:"dragmode",val:"lasso",icon:o.lasso,click:f},c.drawclosedpath={name:"drawclosedpath",title:function(w){return u(w,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:o.drawclosedpath,click:f},c.drawopenpath={name:"drawopenpath",title:function(w){return u(w,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:o.drawopenpath,click:f},c.drawline={name:"drawline",title:function(w){return u(w,"Draw line")},attr:"dragmode",val:"drawline",icon:o.drawline,click:f},c.drawrect={name:"drawrect",title:function(w){return u(w,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:o.drawrect,click:f},c.drawcircle={name:"drawcircle",title:function(w){return u(w,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:o.drawcircle,click:f},c.eraseshape={name:"eraseshape",title:function(w){return u(w,"Erase active shape")},icon:o.eraseshape,click:s},c.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(w){return u(w,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:f},c.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(w){return u(w,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:f},c.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(w){return u(w,"Autoscale")},attr:"zoom",val:"auto",icon:o.autoscale,click:f},c.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(w){return u(w,"Reset axes")},attr:"zoom",val:"reset",icon:o.home,click:f},c.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(w){return u(w,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:f},c.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(w){return u(w,"Compare data on hover")},attr:"hovermode",val:function(w){return w._fullLayout._isHoriz?"y":"x"},icon:o.tooltip_compare,gravity:"ne",click:f};function f(w,k){var T=k.currentTarget,b=T.getAttribute("data-attr"),S=T.getAttribute("data-val")||!0,A=w._fullLayout,F={},D=i.list(w,null,!0),R=A._cartesianSpikesEnabled,P,z;if(b==="zoom"){var I=S==="in"?.5:2,L=(1+I)/2,B=(1-I)/2,O,G;for(z=0;z-W),[G,$]=I.invert(z.midPt),{minscale:X}=P.projection,Z=(T=P.projection.maxscale)!=null?T:1/0,J=Math.min(X,Z),N=Math.max(X,Z),H=A==="in"?m*L:1/m*L;H>N?H=N:Hf9});var LA,c9,f9,h9=Si({"src/components/modebar/attributes.ts"(){"use strict";LA=Vs(u9()),c9={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${LA.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${LA.default.foreButtons.join("*, *")}*.`].join(" ")}},f9=c9}}),nte=ye({"src/components/modebar/defaults.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=ko(),o=(h9(),On(DA)).default;r.exports=function(l,n){var u=l.modebar||{},c=i.newContainer(n,"modebar");function f(d,p){return t.coerce(u,c,o,d,p)}f("orientation"),f("bgcolor",a.addOpacity(n.paper_bgcolor,.5));var h=a.contrast(a.rgb(n.modebar.bgcolor));f("color",a.addOpacity(h,.3)),f("activecolor",a.addOpacity(h,.7)),f("uirevision",n.uirevision),f("add"),f("remove")}}}),ote=ye({"src/components/modebar/modebar.js"(e,r){"use strict";var t=ai(),a=en(),i=Yt(),o=TA(),s=jx().version,l=new DOMParser;function n(h){this.container=h.container,this.element=document.createElement("div"),this.update(h.graphInfo,h.buttons),this.container.appendChild(this.element)}var u=n.prototype;u.update=function(h,d){this.graphInfo=h;var p=this.graphInfo._context,g=this.graphInfo._fullLayout,m="modebar-"+g._uid;this.element.setAttribute("id",m),this.element.setAttribute("role","toolbar"),this._uid=m,this.element.className="modebar modebar--custom",p.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),g.modebar.orientation==="v"&&(this.element.className+=" vertical",d=d.reverse());var y=g.modebar,_="#"+m+" .modebar-group";document.querySelectorAll(_).forEach(function(C){C.style.backgroundColor=y.bgcolor});var v=!this.hasButtons(d),x=this.hasLogo!==p.displaylogo,E=this.locale!==p.locale;if(this.locale=p.locale,(v||x||E)&&(this.removeAllButtons(),this.updateButtons(d),p.watermark||p.displaylogo)){var M=this.getLogo();p.watermark&&(M.className=M.className+" watermark"),g.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),i.setStyleOnHover("#"+m+" .modebar-btn",".active",".icon path","fill: "+y.activecolor,"fill: "+y.color,this.element)},u.updateButtons=function(h){var d=this;this.buttons=h,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(p){var g=d.createGroup();p.forEach(function(m){var y=m.name;if(!y)throw new Error("must provide button 'name' in button config");if(d.buttonsNames.indexOf(y)!==-1)throw new Error("button name '"+y+"' is taken");d.buttonsNames.push(y);var _=d.createButton(m);d.buttonElements.push(_),g.appendChild(_)}),d.element.appendChild(g)})},u.createGroup=function(){var h=document.createElement("div");h.className="modebar-group";var d=this.graphInfo._fullLayout.modebar;return h.style.backgroundColor=d.bgcolor,h},u.createButton=function(h){var d=this,p=document.createElement("button");p.setAttribute("type","button"),p.setAttribute("rel","tooltip"),p.className="modebar-btn";var g=h.title;g===void 0?g=h.name:typeof g=="function"&&(g=g(this.graphInfo)),(g||g===0)&&(p.setAttribute("data-title",g),p.setAttribute("aria-label",g)),h.attr!==void 0&&p.setAttribute("data-attr",h.attr);var m=h.val;m!==void 0&&(typeof m=="function"&&(m=m(this.graphInfo)),p.setAttribute("data-val",m));var y=h.click;if(typeof y!="function")throw new Error("must provide button 'click' function in button config");p.addEventListener("click",function(v){h.click(d.graphInfo,v),d.updateActiveButton(v.currentTarget)}),p.setAttribute("data-toggle",h.toggle||!1),h.toggle&&t.select(p).classed("active",!0);var _=h.icon;return typeof _=="function"?p.appendChild(_()):p.appendChild(this.createIcon(_||o.question)),p.setAttribute("data-gravity",h.gravity||"n"),p},u.createIcon=function(h){var d=a(h.height)?Number(h.height):h.ascent-h.descent,p="http://www.w3.org/2000/svg",g;if(h.path){g=document.createElementNS(p,"svg"),g.setAttribute("viewBox",[0,0,h.width,d].join(" ")),g.setAttribute("class","icon");var m=document.createElementNS(p,"path");m.setAttribute("d",h.path),h.transform?m.setAttribute("transform",h.transform):h.ascent!==void 0&&m.setAttribute("transform","matrix(1 0 0 -1 0 "+h.ascent+")"),g.appendChild(m)}if(h.svg){var y=l.parseFromString(h.svg,"application/xml");g=y.childNodes[0]}return g.setAttribute("height","1em"),g.setAttribute("width","1em"),g},u.updateActiveButton=function(h){var d=this.graphInfo._fullLayout,p=h!==void 0?h.getAttribute("data-attr"):null;this.buttonElements.forEach(function(g){var m=g.getAttribute("data-val")||!0,y=g.getAttribute("data-attr"),_=g.getAttribute("data-toggle")==="true",v=t.select(g),x=function(C,w){var k=d.modebar,T=C.querySelector(".icon path");T&&(w||C.matches(":hover")?T.style.fill=k.activecolor:T.style.fill=k.color)};if(_){if(y===p){var E=!v.classed("active");v.classed("active",E),x(g,E)}}else{var M=y===null?y:i.nestedProperty(d,y).get();v.classed("active",M===m),x(g,M===m)}})},u.hasButtons=function(h){var d=this.buttons;if(!d||h.length!==d.length)return!1;for(var p=0;p1?(X=["toggleHover"],Z=["resetViews"]):b?($=["zoomInGeo","zoomOutGeo"],X=["hoverClosestGeo"],Z=["resetGeo"]):T?(X=["hoverClosest3d"],Z=["resetCameraDefault3d","resetCameraLastSave3d"]):D?($=["zoomInMap","zoomOutMap"],X=["toggleHover"],Z=["resetViewMap"]):S?X=["hoverClosestPie"]:z?(X=["hoverClosestCartesian","hoverCompareCartesian"],Z=["resetViewSankey"]):X=["toggleHover"],k&&X.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(d(_)||L)&&(X=[]),k&&!I&&($=["zoomIn2d","zoomOut2d","autoScale2d"],Z[0]!=="resetViews"&&(Z=["resetScale2d"])),T?J=["zoom3d","pan3d","orbitRotation","tableRotation"]:k&&!I||F?J=["zoom2d","pan2d"]:D||b?J=["pan2d"]:R&&(J=["zoom2d"]),h(_)&&J.push("select2d","lasso2d");var N=[],H=function(q){N.indexOf(q)===-1&&X.indexOf(q)!==-1&&N.push(q)};if(Array.isArray(C)){for(var W=[],U=0;UE?_.slice(E):v.slice(x))+M}function p(m,y){for(var _=y._size,v=_.h/_.w,x={},E=Object.keys(m),M=0;Ml*F&&!z)){for(E=0;EN&&KZ&&(Z=K);var se=(Z-X)/(2*J);b/=se,X=w.l2r(X),Z=w.l2r(Z),w.range=w._input.range=O=I[1]||G[1]<=I[0])&&$[0]L[0])return!0}return!1}function M(I){var L=I._fullLayout,B=L._size,O=B.p,G=f.list(I,"",!0),$,X,Z,J,N,H;if(L._paperdiv.style({width:I._context.responsive&&L.autosize&&!I._context._hasZeroWidth&&!I.layout.width?"100%":L.width+"px",height:I._context.responsive&&L.autosize&&!I._context._hasZeroHeight&&!I.layout.height?"100%":L.height+"px"}).selectAll(".main-svg").call(n.setSize,L.width,L.height),I._context.setBackground(I,L.paper_bgcolor),e.drawMainTitle(I),c.manage(I),!L._has("cartesian"))return a.previousPromises(I);function W(me,be,Ee){var De=me._lw/2;if(me._id.charAt(0)==="x"){if(be){if(Ee==="top")return be._offset-O-De}else return B.t+B.h*(1-(me.position||0))+De%1;return be._offset+be._length+O+De}if(be){if(Ee==="right")return be._offset+be._length+O+De}else return B.l+B.w*(me.position||0)+De%1;return be._offset-O-De}for($=0;$0){A(I,$,N,J),Z.attr({x:X,y:$,"text-anchor":O,dy:R(L.yanchor)}).call(o.positionText,X,$);var H=(L.text.match(o.BR_TAG_ALL)||[]).length;if(H){var W=h.LINE_SPACING*H+h.MID_SHIFT;L.y===0&&(W=-W),Z.selectAll(".line").each(function(){var Y=+this.getAttribute("dy").slice(0,-2)-W+"em";this.setAttribute("dy",Y)})}var U=r.select(I).selectAll(".gtitle-subtitle");if(U.node()){var V=Z.node().getBBox(),j=V.y+V.height,q=j+u.SUBTITLE_PADDING_EM*L.subtitle.font.size;U.attr({x:X,y:q,"text-anchor":O,dy:R(L.yanchor)}).call(o.positionText,X,q)}}}};function T(I,L,B,O,G){var $=L.yref==="paper"?I._fullLayout._size.h:I._fullLayout.height,X=i.isTopAnchor(L)?O:O-G,Z=B==="b"?$-X:X;return i.isTopAnchor(L)&&B==="t"||i.isBottomAnchor(L)&&B==="b"?!1:Z.5?"t":"b",X=I._fullLayout.margin[$],Z=0;return L.yref==="paper"?Z=B+L.pad.t+L.pad.b:L.yref==="container"&&(Z=b($,O,G,I._fullLayout.height,B)+L.pad.t+L.pad.b),Z>X?Z:0}function A(I,L,B,O){var G="title.automargin",$=I._fullLayout.title,X=$.y>.5?"t":"b",Z={x:$.x,y:$.y,t:0,b:0},J={};$.yref==="paper"&&T(I,$,X,L,O)?Z[X]=B:$.yref==="container"&&(J[X]=B,I._fullLayout._reservedMargin[G]=J),a.allowAutoMargin(I,G),a.autoMargin(I,G,Z)}function F(I,L){var B=I.title,O=I._size,G=0;return L===y?G=B.pad.l:L===v&&(G=-B.pad.r),B.xref==="paper"?O.l+O.w*B.x+G:I.width*B.x+G}function D(I,L){var B=I.title,O=I._size,G=0;return L==="0em"||!L?G=-B.pad.b:L===h.CAP_SHIFT+"em"&&(G=B.pad.t),B.y==="auto"?O.t/2:B.yref==="paper"?O.t+O.h-O.h*B.y+G:I.height-I.height*B.y+G}function R(I){return I==="top"?h.CAP_SHIFT+.3+"em":I==="bottom"?"-0.3em":h.MID_SHIFT+"em"}function P(I){var L=I.title,B=_;return i.isRightAnchor(L)?B=v:i.isLeftAnchor(L)&&(B=y),B}function z(I){var L=I.title,B="0em";return i.isTopAnchor(L)?B=h.CAP_SHIFT+"em":i.isMiddleAnchor(L)&&(B=h.MID_SHIFT+"em"),B}e.doTraceStyle=function(I){var L=I.calcdata,B=[],O;for(O=0;O=0;P--){var z=C.append("path").attr(k).style("opacity",P?.1:T).call(o.stroke,S).call(o.fill,b).call(s.dashLine,P?"solid":F,P?4+A:A);if(d(z,y,x),D){var I=l(y.layout,"selections",x);z.style({cursor:"move"});var L={element:z.node(),plotinfo:E,gd:y,editHelpers:I,isActiveSelection:!0},B=t(w,y);a(B,z,L)}else z.style("pointer-events",P?"all":"none");R[P]=z}var O=R[0],G=R[1];G.node().addEventListener("click",function(){return p(y,O)})}}function d(y,_,v){var x=v.xref+v.yref;s.setClipUrl(y,"clip"+_._fullLayout._uid+x,_)}function p(y,_){if(f(y)){var v=_.node(),x=+v.getAttribute("data-index");if(x>=0){if(x===y._fullLayout._activeSelectionIndex){m(y);return}y._fullLayout._activeSelectionIndex=x,y._fullLayout._deactivateSelection=m,c(y)}}}function g(y){if(f(y)){var _=y._fullLayout.selections.length-1;y._fullLayout._activeSelectionIndex=_,y._fullLayout._deactivateSelection=m,c(y)}}function m(y){if(f(y)){var _=y._fullLayout._activeSelectionIndex;_>=0&&(i(y),delete y._fullLayout._activeSelectionIndex,c(y))}}}}),lte=ye({"node_modules/polybooljs/lib/build-log.js"(e,r){function t(){var a,i=0,o=!1;function s(l,n){return a.list.push({type:l,data:n?JSON.parse(JSON.stringify(n)):void 0}),a}return a={list:[],segmentId:function(){return i++},checkIntersection:function(l,n){return s("check",{seg1:l,seg2:n})},segmentChop:function(l,n){return s("div_seg",{seg:l,pt:n}),s("chop",{seg:l,pt:n})},statusRemove:function(l){return s("pop_seg",{seg:l})},segmentUpdate:function(l){return s("seg_update",{seg:l})},segmentNew:function(l,n){return s("new_seg",{seg:l,primary:n})},segmentRemove:function(l){return s("rem_seg",{seg:l})},tempStatus:function(l,n,u){return s("temp_status",{seg:l,above:n,below:u})},rewind:function(l){return s("rewind",{seg:l})},status:function(l,n,u){return s("status",{seg:l,above:n,below:u})},vert:function(l){return l===o?a:(o=l,s("vert",{x:l}))},log:function(l){return typeof l!="string"&&(l=JSON.stringify(l,!1," ")),s("log",{txt:l})},reset:function(){return s("reset")},selected:function(l){return s("selected",{segs:l})},chainStart:function(l){return s("chain_start",{seg:l})},chainRemoveHead:function(l,n){return s("chain_rem_head",{index:l,pt:n})},chainRemoveTail:function(l,n){return s("chain_rem_tail",{index:l,pt:n})},chainNew:function(l,n){return s("chain_new",{pt1:l,pt2:n})},chainMatch:function(l){return s("chain_match",{index:l})},chainClose:function(l){return s("chain_close",{index:l})},chainAddHead:function(l,n){return s("chain_add_head",{index:l,pt:n})},chainAddTail:function(l,n){return s("chain_add_tail",{index:l,pt:n})},chainConnect:function(l,n){return s("chain_con",{index1:l,index2:n})},chainReverse:function(l){return s("chain_rev",{index:l})},chainJoin:function(l,n){return s("chain_join",{index1:l,index2:n})},done:function(){return s("done")}},a}r.exports=t}}),ute=ye({"node_modules/polybooljs/lib/epsilon.js"(e,r){function t(a){typeof a!="number"&&(a=1e-10);var i={epsilon:function(o){return typeof o=="number"&&(a=o),a},pointAboveOrOnLine:function(o,s,l){var n=s[0],u=s[1],c=l[0],f=l[1],h=o[0],d=o[1];return(c-n)*(d-u)-(f-u)*(h-n)>=-a},pointBetween:function(o,s,l){var n=o[1]-s[1],u=l[0]-s[0],c=o[0]-s[0],f=l[1]-s[1],h=c*u+n*f;if(h-a)},pointsSameX:function(o,s){return Math.abs(o[0]-s[0])a!=c-n>a&&(u-d)*(n-p)/(c-p)+d-l>a&&(f=!f),u=d,c=p}return f}};return i}r.exports=t}}),cte=ye({"node_modules/polybooljs/lib/linked-list.js"(e,r){var t={create:function(){var a={root:{root:!0,next:null},exists:function(i){return!(i===null||i===a.root)},isEmpty:function(){return a.root.next===null},getHead:function(){return a.root.next},insertBefore:function(i,o){for(var s=a.root,l=a.root.next;l!==null;){if(o(l)){i.prev=l.prev,i.next=l,l.prev.next=i,l.prev=i;return}s=l,l=l.next}s.next=i,i.prev=s,i.next=null},findTransition:function(i){for(var o=a.root,s=a.root.next;s!==null&&!i(s);)o=s,s=s.next;return{before:o===a.root?null:o,after:s,insert:function(l){return l.prev=o,l.next=s,o.next=l,s!==null&&(s.prev=l),l}}}};return a},node:function(a){return a.prev=null,a.next=null,a.remove=function(){a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.prev=null,a.next=null},a}};r.exports=t}}),fte=ye({"node_modules/polybooljs/lib/intersecter.js"(e,r){var t=cte();function a(i,o,s){function l(_,v){return{id:s?s.segmentId():-1,start:_,end:v,myFill:{above:null,below:null},otherFill:null}}function n(_,v,x){return{id:s?s.segmentId():-1,start:_,end:v,myFill:{above:x.myFill.above,below:x.myFill.below},otherFill:null}}var u=t.create();function c(_,v,x,E,M,C){var w=o.pointsCompare(v,M);return w!==0?w:o.pointsSame(x,C)?0:_!==E?_?1:-1:o.pointAboveOrOnLine(x,E?M:C,E?C:M)?1:-1}function f(_,v){u.insertBefore(_,function(x){var E=c(_.isStart,_.pt,v,x.isStart,x.pt,x.other.pt);return E<0})}function h(_,v){var x=t.node({isStart:!0,pt:_.start,seg:_,primary:v,other:null,status:null});return f(x,_.end),x}function d(_,v,x){var E=t.node({isStart:!1,pt:v.end,seg:v,primary:x,other:_,status:null});_.other=E,f(E,_.pt)}function p(_,v){var x=h(_,v);return d(x,_,v),x}function g(_,v){s&&s.segmentChop(_.seg,v),_.other.remove(),_.seg.end=v,_.other.pt=v,f(_.other,_.pt)}function m(_,v){var x=n(v,_.seg.end,_.seg);return g(_,v),p(x,_.primary)}function y(_,v){var x=t.create();function E(I,L){var B=I.seg.start,O=I.seg.end,G=L.seg.start,$=L.seg.end;return o.pointsCollinear(B,G,$)?o.pointsCollinear(O,G,$)||o.pointAboveOrOnLine(O,G,$)?1:-1:o.pointAboveOrOnLine(B,G,$)?1:-1}function M(I){return x.findTransition(function(L){var B=E(I,L.ev);return B>0})}function C(I,L){var B=I.seg,O=L.seg,G=B.start,$=B.end,X=O.start,Z=O.end;s&&s.checkIntersection(B,O);var J=o.linesIntersect(G,$,X,Z);if(J===!1){if(!o.pointsCollinear(G,$,X)||o.pointsSame(G,Z)||o.pointsSame($,X))return!1;var N=o.pointsSame(G,X),H=o.pointsSame($,Z);if(N&&H)return L;var W=!N&&o.pointBetween(G,X,Z),U=!H&&o.pointBetween($,X,Z);if(N)return U?m(L,$):m(I,Z),L;W&&(H||(U?m(L,$):m(I,Z)),m(L,G))}else J.alongA===0&&(J.alongB===-1?m(I,X):J.alongB===0?m(I,J.pt):J.alongB===1&&m(I,Z)),J.alongB===0&&(J.alongA===-1?m(L,G):J.alongA===0?m(L,J.pt):J.alongA===1&&m(L,$));return!1}for(var w=[];!u.isEmpty();){var k=u.getHead();if(s&&s.vert(k.pt[0]),k.isStart){let I=function(){if(S){var L=C(k,S);if(L)return L}return A?C(k,A):!1};var T=I;s&&s.segmentNew(k.seg,k.primary);var b=M(k),S=b.before?b.before.ev:null,A=b.after?b.after.ev:null;s&&s.tempStatus(k.seg,S?S.seg:!1,A?A.seg:!1);var F=I();if(F){if(i){var D;k.seg.myFill.below===null?D=!0:D=k.seg.myFill.above!==k.seg.myFill.below,D&&(F.seg.myFill.above=!F.seg.myFill.above)}else F.seg.otherFill=k.seg.myFill;s&&s.segmentUpdate(F.seg),k.other.remove(),k.remove()}if(u.getHead()!==k){s&&s.rewind(k.seg);continue}if(i){var D;k.seg.myFill.below===null?D=!0:D=k.seg.myFill.above!==k.seg.myFill.below,A?k.seg.myFill.below=A.seg.myFill.above:k.seg.myFill.below=_,D?k.seg.myFill.above=!k.seg.myFill.below:k.seg.myFill.above=k.seg.myFill.below}else if(k.seg.otherFill===null){var R;A?k.primary===A.primary?R=A.seg.otherFill.above:R=A.seg.myFill.above:R=k.primary?v:_,k.seg.otherFill={above:R,below:R}}s&&s.status(k.seg,S?S.seg:!1,A?A.seg:!1),k.other.status=b.insert(t.node({ev:k}))}else{var P=k.status;if(P===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(x.exists(P.prev)&&x.exists(P.next)&&C(P.prev.ev,P.next.ev),s&&s.statusRemove(P.ev.seg),P.remove(),!k.primary){var z=k.seg.myFill;k.seg.myFill=k.seg.otherFill,k.seg.otherFill=z}w.push(k.seg)}u.getHead().remove()}return s&&s.done(),w}return i?{addRegion:function(_){for(var v,x=_[_.length-1],E=0;E<_.length;E++){v=x,x=_[E];var M=o.pointsCompare(v,x);M!==0&&p(l(M<0?v:x,M<0?x:v),!0)}},calculate:function(_){return y(_,!1)}}:{calculate:function(_,v,x,E){return _.forEach(function(M){p(n(M.start,M.end,M),!0)}),x.forEach(function(M){p(n(M.start,M.end,M),!1)}),y(v,E)}}}r.exports=a}}),hte=ye({"node_modules/polybooljs/lib/segment-chainer.js"(e,r){function t(a,i,o){var s=[],l=[];return a.forEach(function(n){var u=n.start,c=n.end;if(i.pointsSame(u,c)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}o&&o.chainStart(n);var f={index:0,matches_head:!1,matches_pt1:!1},h={index:0,matches_head:!1,matches_pt1:!1},d=f;function p(P,z,I){return d.index=P,d.matches_head=z,d.matches_pt1=I,d===f?(d=h,!1):(d=null,!0)}for(var g=0;gn!=m>n&&l<(g-d)*(n-p)/(m-p)+d;y&&(u=!u)}return u}}}),Qx=ye({"src/lib/polygon.js"(e,r){"use strict";var t=mA().dot,a=Vn().BADNUM,i=r.exports={};i.tester=function(s){var l=s.slice(),n=l[0][0],u=n,c=l[0][1],f=c,h;for((l[l.length-1][0]!==l[0][0]||l[l.length-1][1]!==l[0][1])&&l.push(l[0]),h=1;hu||M===a||Mf||x&&p(v))}function m(v,x){var E=v[0],M=v[1];if(E===a||Eu||M===a||Mf)return!1;var C=l.length,w=l[0][0],k=l[0][1],T=0,b,S,A,F,D;for(b=1;bMath.max(S,w)||M>Math.max(A,k)))if(Mh||Math.abs(t(m,p))>u)return!0;return!1},i.filter=function(s,l){var n=[s[0]],u=0,c=0;function f(d){s.push(d);var p=n.length,g=u;n.splice(c+1);for(var m=g+1;m1){var h=s.pop();f(h)}return{addPt:f,raw:s,filtered:n}}}}),gte=ye({"src/components/selections/constants.js"(e,r){"use strict";r.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),yte=ye({"src/components/selections/select.js"(e,r){"use strict";var t=vte(),a=mte(),i=li(),o=$i().dashStyle,s=Ya(),l=Hs(),n=Bf().makeEventData,u=Np(),c=u.freeMode,f=u.rectMode,h=u.drawMode,d=u.openMode,p=u.selectMode,g=Sv(),m=Kx(),y=kA(),_=wv().clearOutline,v=Ev(),x=v.handleEllipse,E=v.readPaths,M=SA().newShapes,C=o9(),w=v9().activateLastSelection,k=Yt(),T=k.sorterAsc,b=Qx(),S=xA(),A=Gs().getFromId,F=Zx(),D=Jx().redrawReglTraces,R=gte(),P=R.MINSELECT,z=b.filter,I=b.tester,L=EA(),B=L.p2r,O=L.axValue,G=L.getTransform;function $(Ve){return Ve.subplot!==void 0}function X(Ve,Ye,me,be,Ee){var De=!$(be),Ce=c(Ee),Fe=f(Ee),Je=d(Ee),qe=h(Ee),at=p(Ee),tt=Ee==="drawline",ct=Ee==="drawcircle",At=tt||ct,ft=be.gd,qt=ft._fullLayout,ar=at&&qt.newselection.mode==="immediate"&&De,vt=qt._zoomlayer,gt=be.element.getBoundingClientRect(),St=be.plotinfo,Dt=G(St),kt=Ye-gt.left,Vt=me-gt.top;qt._calcInverseTransform(ft);var lr=k.apply3DTransform(qt._invTransform)(kt,Vt);kt=lr[0],Vt=lr[1];var dr=qt._invScaleX,yr=qt._invScaleY,vr=kt,Fr=Vt,la="M"+kt+","+Vt,Hr=be.xaxes[0],jr=be.yaxes[0],Oa=Hr._length,Da=jr._length,_i=Ve.altKey&&!(h(Ee)&&Je),ti,Ka,ia,na,xi,Yi,Qr;U(Ve,ft,be),Ce&&(ti=z([[kt,Vt]],R.BENDPX));var Nr=vt.selectAll("path.select-outline-"+St.id).data([1]),Oe=qe?qt.newshape:qt.newselection;qe&&(be.hasText=Oe.label.text||Oe.label.texttemplate);var Ie=qe&&!Je?Oe.fillcolor:"rgba(0,0,0,0)",Et=Oe.line.color||(De?s.contrast(ft._fullLayout.plot_bgcolor):"#7f7f7f");Nr.enter().append("path").attr("class","select-outline select-outline-"+St.id).style({opacity:qe?Oe.opacity/2:1,"stroke-dasharray":o(Oe.line.dash,Oe.line.width),"stroke-width":Oe.line.width+"px","shape-rendering":"crispEdges"}).call(s.stroke,Et).call(s.fill,Ie).attr("fill-rule","evenodd").classed("cursor-move",!!qe).attr("transform",Dt).attr("d",la+"Z");var Mt=vt.append("path").attr("class","zoombox-corners").style({fill:s.background,stroke:s.defaultLine,"stroke-width":1}).attr("transform",Dt).attr("d","M0,0Z");if(qe&&be.hasText){var zt=vt.select(".label-temp");zt.empty()&&(zt=vt.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Gt=qt._uid+R.SELECTID,Ht=[],Be=K(ft,be.xaxes,be.yaxes,be.subplot);ar&&!Ve.shiftKey&&(be._clearSubplotSelections=function(){if(De){var ut=Hr._id,bt=jr._id;Se(ft,ut,bt,Be);for(var Ot=(ft.layout||{}).selections||[],It=[],Wt=!1,jt=0;jt=0){ft._fullLayout._deactivateShape(ft);return}if(!qe){var Ot=qt.clickmode;S.done(Gt).then(function(){if(S.clear(Gt),ut===2){for(Nr.remove(),xi=0;xi-1&&Z(bt,ft,be.xaxes,be.yaxes,be.subplot,be,Nr),Ot==="event"&&Tt(ft,void 0);l.click(ft,bt,St.id)}).catch(k.error)}},be.doneFn=function(){Mt.remove(),S.done(Gt).then(function(){S.clear(Gt),!ar&&na&&be.selectionDefs&&(na.subtract=_i,be.selectionDefs.push(na),be.mergedPolygons.length=0,[].push.apply(be.mergedPolygons,ia)),(ar||qe)&&q(be,ar),be.doneFnCompleted&&be.doneFnCompleted(Ht),at&&Tt(ft,Qr)}).catch(k.error)}}function Z(Ve,Ye,me,be,Ee,De,Ce){var Fe=Ye._hoverdata,Je=Ye._fullLayout,qe=Je.clickmode,at=qe.indexOf("event")>-1,tt=[],ct,At,ft,qt,ar,vt,gt,St,Dt,kt;if(se(Fe)){U(Ve,Ye,De),ct=K(Ye,me,be,Ee);var Vt=le(Fe,ct),lr=Vt.pointNumbers.length>0;if(lr?fe(ct,Vt):pe(ct)&&(gt=ue(Vt))){for(Ce&&Ce.remove(),kt=0;kt=0}function j(Ve){return Ve._fullLayout._activeSelectionIndex>=0}function q(Ve,Ye){var me=Ve.dragmode,be=Ve.plotinfo,Ee=Ve.gd;V(Ee)&&Ee._fullLayout._deactivateShape(Ee),j(Ee)&&Ee._fullLayout._deactivateSelection(Ee);var De=Ee._fullLayout,Ce=De._zoomlayer,Fe=h(me),Je=p(me);if(Fe||Je){var qe=Ce.selectAll(".select-outline-"+be.id);if(qe&&Ee._fullLayout._outlining){var at;Fe&&(at=M(qe,Ve)),at&&i.call("_guiRelayout",Ee,{shapes:at});var tt;Je&&!$(Ve)&&(tt=C(qe,Ve)),tt&&(Ee._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",Ee,{selections:tt}).then(function(){Ye&&w(Ee)})),Ee._fullLayout._outlining=!1}}be.selection={},be.selection.selectionDefs=Ve.selectionDefs=[],be.selection.mergedPolygons=Ve.mergedPolygons=[]}function Y(Ve){return Ve._id}function K(Ve,Ye,me,be){if(!Ve.calcdata)return[];var Ee=[],De=Ye.map(Y),Ce=me.map(Y),Fe,Je,qe;for(qe=0;qe0,De=Ee?be[0]:me;return Ye.selectedpoints?Ye.selectedpoints.indexOf(De)>-1:!1}function fe(Ve,Ye){var me=[],be,Ee,De,Ce;for(Ce=0;Ce0&&me.push(be);if(me.length===1&&(De=me[0]===Ye.searchInfo,De&&(Ee=Ye.searchInfo.cd[0].trace,Ee.selectedpoints.length===Ye.pointNumbers.length))){for(Ce=0;Ce1||(Ye+=be.selectedpoints.length,Ye>1)))return!1;return Ye===1}function we(Ve,Ye,me){var be,Ee;for(be=0;be-1&&Ye;if(!Ce&&Ye){var ut=Ue(Ve,!0);if(ut.length){var bt=ut[0].xref,Ot=ut[0].yref;if(bt&&Ot){var It=Ke(ut),Wt=_t([A(Ve,bt,"x"),A(Ve,Ot,"y")]);Wt(Ht,It)}}Ve._fullLayout._noEmitSelectedAtStart?Ve._fullLayout._noEmitSelectedAtStart=!1:et&&Tt(Ve,Ht),ct._reselect=!1}if(!Ce&&ct._deselect){var jt=ct._deselect;Fe=jt.xref,Je=jt.yref,_e(Fe,Je,at)||Se(Ve,Fe,Je,be),et&&(Ht.points.length?Tt(Ve,Ht):st(Ve)),ct._deselect=!1}return{eventData:Ht,selectionTesters:me}}function ce(Ve){var Ye=Ve.calcdata;if(Ye)for(var me=0;me=0){Oe._fullLayout._deactivateShape(Oe);return}var Ie=Oe._fullLayout.clickmode;if(N(Oe),Qr===2&&!oe&&ti(),he)Ie.indexOf("select")>-1&&k(Nr,Oe,_e,Se,re.id,qe),Ie.indexOf("event")>-1&&f.click(Oe,Nr,re.id);else if(Qr===1&&oe){var Et=pe?ie:te,Mt=pe==="s"||we==="w"?0:1,zt=Et._name+".range["+Mt+"]",Gt=I(Et,Mt),Ht="left",Be="middle";if(Et.fixedrange)return;pe?(Be=pe==="n"?"top":"bottom",Et.side==="right"&&(Ht="right")):we==="e"&&(Ht="right"),Oe._context.showAxisRangeEntryBoxes&&t.select(Je).call(n.makeEditable,{gd:Oe,immediate:!0,background:Oe._fullLayout.paper_bgcolor,text:String(Gt),fill:Et.tickfont?Et.tickfont.color:"#444",horizontalAlign:Ht,verticalAlign:Be}).on("edit",function(et){var ut=Et.d2r(et);ut!==void 0&&s.call("_guiRelayout",Oe,zt,ut)})}}p.init(qe);var ct,At,ft,qt,ar,vt,gt,St,Dt,kt;function Vt(Qr,Nr,Oe){var Ie=Je.getBoundingClientRect();ct=Nr-Ie.left,At=Oe-Ie.top,K._fullLayout._calcInverseTransform(K);var Et=a.apply3DTransform(K._fullLayout._invTransform)(ct,At);ct=Et[0],At=Et[1],ft={l:ct,r:ct,w:0,t:At,b:At,h:0},qt=K._hmpixcount?K._hmlumcount/K._hmpixcount:u.luminosity(K._fullLayout.plot_bgcolor),ar="M0,0H"+Ge+"V"+Ze+"H0V0",vt=!1,gt="xy",kt=!1,St=$(xe,qt,Me,Ue,ar),Dt=X(xe,Me,Ue)}function lr(Qr,Nr){if(K._transitioningWithDuration)return!1;var Oe=Math.max(0,Math.min(Ge,Ee*Qr+ct)),Ie=Math.max(0,Math.min(Ze,De*Nr+At)),Et=Math.abs(Oe-ct),Mt=Math.abs(Ie-At);ft.l=Math.min(ct,Oe),ft.r=Math.max(ct,Oe),ft.t=Math.min(At,Ie),ft.b=Math.max(At,Ie);function zt(){gt="",ft.r=ft.l,ft.t=ft.b,Dt.attr("d","M0,0Z")}if(Ke.isSubplotConstrained)Et>A||Mt>A?(gt="xy",Et/Ge>Mt/Ze?(Mt=Et*Ze/Ge,At>Ie?ft.t=At-Mt:ft.b=At+Mt):(Et=Mt*Ge/Ze,ct>Oe?ft.l=ct-Et:ft.r=ct+Et),Dt.attr("d",V(ft))):zt();else if(dt.isSubplotConstrained)if(Et>A||Mt>A){gt="xy";var Gt=Math.min(ft.l/Ge,(Ze-ft.b)/Ze),Ht=Math.max(ft.r/Ge,(Ze-ft.t)/Ze);ft.l=Gt*Ge,ft.r=Ht*Ge,ft.b=(1-Gt)*Ze,ft.t=(1-Ht)*Ze,Dt.attr("d",V(ft))}else zt();else!Pt||Mt0){var et;if(dt.isSubplotConstrained||!_t&&Pt.length===1){for(et=0;et<_e.length;et++)_e[et].range=_e[et]._r.slice(),T(_e[et],1-Nr/Ze);Qr=Nr*Ge/Ze,Ht=Qr/2}if(dt.isSubplotConstrained||!Pt&&_t.length===1){for(et=0;et1&&(zt.maxallowed!==void 0&&Tt===(zt.range[0]1&&(Gt.maxallowed!==void 0&&st===(Gt.range[0]=0?Math.min(K,.9):1/(1/Math.max(K,-.3)+3.222))}function G(K,re,se){return K?K==="nsew"?se?"":re==="pan"?"move":"crosshair":K.toLowerCase()+"-resize":"pointer"}function $(K,re,se,le,ue){return K.append("path").attr("class","zoombox").style({fill:re>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",l(se,le)).attr("d",ue+"Z")}function X(K,re,se){return K.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform",l(re,se)).attr("d","M0,0Z")}function Z(K,re,se,le,ue,fe){K.attr("d",le+"M"+se.l+","+se.t+"v"+se.h+"h"+se.w+"v-"+se.h+"h-"+se.w+"Z"),J(K,re,ue,fe)}function J(K,re,se,le){se||(K.transition().style("fill",le>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),re.transition().style("opacity",1).duration(200))}function N(K){t.select(K).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(K){F&&K.data&&K._context.showTips&&(a.notifier(a._(K,"Double-click to zoom back out"),"long",K),F=!1)}function W(K,re){return"M"+(K.l-.5)+","+(re-A-.5)+"h-3v"+(2*A+1)+"h3ZM"+(K.r+.5)+","+(re-A-.5)+"h3v"+(2*A+1)+"h-3Z"}function U(K,re){return"M"+(re-A-.5)+","+(K.t-.5)+"v-3h"+(2*A+1)+"v3ZM"+(re-A-.5)+","+(K.b+.5)+"v3h"+(2*A+1)+"v-3Z"}function V(K){var re=Math.floor(Math.min(K.b-K.t,K.r-K.l,A)/2);return"M"+(K.l-3.5)+","+(K.t-.5+re)+"h3v"+-re+"h"+re+"v-3h-"+(re+3)+"ZM"+(K.r+3.5)+","+(K.t-.5+re)+"h-3v"+-re+"h"+-re+"v-3h"+(re+3)+"ZM"+(K.r+3.5)+","+(K.b+.5-re)+"h-3v"+re+"h"+-re+"v3h"+(re+3)+"ZM"+(K.l-3.5)+","+(K.b+.5-re)+"h3v"+re+"h"+re+"v3h-"+(re+3)+"Z"}function j(K,re,se,le,ue){for(var fe=!1,pe={},we={},xe,he,oe,te,ie=(ue||{}).xaHash,ee=(ue||{}).yaHash,ce=0;ce1&&a.warn("Full array edits are incompatible with other edits",p);var E=f[""][""];if(l(E))c.set(null);else if(Array.isArray(E))c.set(E);else return a.warn("Unrecognized full array edit value",p,E),!0;return _?!1:(g(v,x),m(u),!0)}var M=Object.keys(f).map(Number).sort(i),C=c.get(),w=C||[],k=d(x,p).get(),T=[],b=-1,S=w.length,A,F,D,R,P,z,I,L;for(A=0;Aw.length-(I?0:1)){a.warn("index out of range",p,D);continue}if(z!==void 0)P.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",p,D),l(z)?T.push(D):I?(z==="add"&&(z={}),w.splice(D,0,z),k&&k.splice(D,0,{})):a.warn("Unrecognized full object edit value",p,D,z),b===-1&&(b=D);else for(F=0;F=0;A--)w.splice(T[A],1),k&&k.splice(T[A],1);if(w.length?C||c.set(w):c.set(null),_)return!1;if(g(v,x),y!==t){var B;if(b===-1)B=M;else{for(S=Math.max(w.length,S),B=[],A=0;A=b));A++)B.push(D);for(A=b;A0&&a.log("Clearing previous rejected promises from queue."),_._promises=[]},e.cleanLayout=function(_){var v,x;_||(_={}),_.xaxis1&&(_.xaxis||(_.xaxis=_.xaxis1),delete _.xaxis1),_.yaxis1&&(_.yaxis||(_.yaxis=_.yaxis1),delete _.yaxis1),_.scene1&&(_.scene||(_.scene=_.scene1),delete _.scene1);var E=(i.subplotsRegistry.cartesian||{}).attrRegex,M=(i.subplotsRegistry.polar||{}).attrRegex,C=(i.subplotsRegistry.ternary||{}).attrRegex,w=(i.subplotsRegistry.gl3d||{}).attrRegex,k=Object.keys(_);for(v=0;v3?(z.x=1.02,z.xanchor="left"):z.x<-2&&(z.x=-.02,z.xanchor="right"),z.y>3?(z.y=1.02,z.yanchor="bottom"):z.y<-2&&(z.y=-.02,z.yanchor="top")),_.dragmode==="rotate"&&(_.dragmode="orbit"),_.template&&_.template.layout&&e.cleanLayout(_.template.layout),_};function c(_,v,x=!1){var E=_[v],M=v.charAt(0);x&&Array.isArray(E)||E&&E!=="paper"&&(_[v]=s(E,M,!0))}e.cleanData=function(_){for(var v=0;v<_.length;v++){var x=_[v],E;if(x.type==="histogramy"&&"xbins"in x&&!("ybins"in x)&&(x.ybins=x.xbins,delete x.xbins),x.type==="histogramy"&&e.swapXYData(x),(x.type==="histogramx"||x.type==="histogramy")&&(x.type="histogram"),"scl"in x&&!("colorscale"in x)&&(x.colorscale=x.scl,delete x.scl),"reversescl"in x&&!("reversescale"in x)&&(x.reversescale=x.reversescl,delete x.reversescl),x.xaxis&&(x.xaxis=s(x.xaxis,"x")),x.yaxis&&(x.yaxis=s(x.yaxis,"y")),n(x,"gl3d")&&x.scene&&(x.scene=i.subplotsRegistry.gl3d.cleanId(x.scene)),!n(x,"pie-like")&&!n(x,"bar-like"))if(Array.isArray(x.textposition))for(E=0;E0)return _.slice(0,v)}e.hasParent=function(_,v){for(var x=m(v);x;){if(x in _)return!0;x=m(x)}return!1},e.clearAxisTypes=function(_,v,x){for(var E=0;E{let x=(...E)=>E.every(M=>a.isPlainObject(M))||E.every(M=>Array.isArray(M));if([_,v].every(E=>Array.isArray(E))){if(_.length!==v.length)return!1;for(let E=0;E<_.length;E++){let M=_[E],C=v[E];if(M!==C&&!(x(M,C)?y(M,C):!1))return!1}return!0}else if([_,v].every(E=>a.isPlainObject(E))){if(Object.keys(_).length!==Object.keys(v).length)return!1;for(let E in _){if(E.startsWith("_"))continue;let M=_[E],C=v[E];if(M!==C&&!(x(M,C)?y(M,C):!1))return!1}return!0}return!1};e.collectionsAreEqual=y}}),FA=ye({"src/plot_api/plot_api.js"(e){"use strict";var r=ai(),t=en(),a=qD(),i=Yt(),o=i.nestedProperty,s=py(),l=jee(),n=li(),u=vy(),c=ws(),f=qi(),h=KD(),d=Gu(),p=$i(),g=Ya(),m=_9().initInteractions,y=Sd(),_=lu().clearOutline,v=xv().dfltConfig,x=wte(),E=Ate(),M=Jx(),C=Cs(),w=$l().AX_NAME_PATTERN,k=0,T=5;function b(me,be,Ee,De){var Ce;if(me=i.getGraphDiv(me),s.init(me),i.isPlainObject(be)){var Fe=be;be=Fe.data,Ee=Fe.layout,De=Fe.config,Ce=Fe.frames}var Je=s.triggerHandler(me,"plotly_beforeplot",[be,Ee,De]);if(Je===!1)return Promise.reject();!be&&!Ee&&!i.isPlotDiv(me)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",me);function qe(){if(Ce)return e.addFrames(me,Ce)}R(me,De),Ee||(Ee={}),r.select(me).classed("js-plotly-plot",!0),p.makeTester(),Array.isArray(me._promises)||(me._promises=[]);var at=(me.data||[]).length===0&&Array.isArray(be);Array.isArray(be)&&(E.cleanData(be),at?me.data=be:me.data.push.apply(me.data,be),me.empty=!1),(!me.layout||at)&&(me.layout=E.cleanLayout(Ee)),c.supplyDefaults(me);var tt=me._fullLayout,ct=tt._has("cartesian");tt._replotting=!0,(at||tt._shouldCreateBgLayer)&&(Ye(me),tt._shouldCreateBgLayer&&delete tt._shouldCreateBgLayer),p.initGradients(me),p.initPatterns(me),at&&f.saveShowSpikeInitial(me);var At=!me.calcdata||me.calcdata.length!==(me._fullData||[]).length;At&&c.doCalcdata(me);for(var ft=0;ft=me.data.length||Ce<-me.data.length)throw new Error(Ee+" must be valid indices for gd.data.");if(be.indexOf(Ce,De+1)>-1||Ce>=0&&be.indexOf(-me.data.length+Ce)>-1||Ce<0&&be.indexOf(me.data.length+Ce)>-1)throw new Error("each index in "+Ee+" must be unique.")}}function B(me,be,Ee){if(!Array.isArray(me.data))throw new Error("gd.data must be an array.");if(typeof be>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(be)||(be=[be]),L(me,be,"currentIndices"),typeof Ee<"u"&&!Array.isArray(Ee)&&(Ee=[Ee]),typeof Ee<"u"&&L(me,Ee,"newIndices"),typeof Ee<"u"&&be.length!==Ee.length)throw new Error("current and new indices must be of equal length.")}function O(me,be,Ee){var De,Ce;if(!Array.isArray(me.data))throw new Error("gd.data must be an array.");if(typeof be>"u")throw new Error("traces must be defined.");for(Array.isArray(be)||(be=[be]),De=0;De"u")throw new Error("indices must be an integer or array of integers");L(me,Ee,"indices");for(var Fe in be){if(!Array.isArray(be[Fe])||be[Fe].length!==Ee.length)throw new Error("attribute "+Fe+" must be an array of length equal to indices array length");if(Ce&&(!(Fe in De)||!Array.isArray(De[Fe])||De[Fe].length!==be[Fe].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 $(me,be,Ee,De){var Ce=i.isPlainObject(De),Fe=[],Je,qe,at,tt,ct;Array.isArray(Ee)||(Ee=[Ee]),Ee=I(Ee,me.data.length-1);for(var At in be)for(var ft=0;ft=0&&ct=0&&ct"u")return tt=e.redraw(me),l.add(me,Ce,Je,Fe,qe),tt;Array.isArray(Ee)||(Ee=[Ee]);try{B(me,De,Ee)}catch(ct){throw me.data.splice(me.data.length-be.length,be.length),ct}return l.startSequence(me),l.add(me,Ce,Je,Fe,qe),tt=e.moveTraces(me,De,Ee),l.stopSequence(me),tt}function W(me,be){me=i.getGraphDiv(me);var Ee=[],De=e.addTraces,Ce=W,Fe=[me,Ee,be],Je=[me,be],qe,at;if(typeof be>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(be)||(be=[be]),L(me,be,"indices"),be=I(be,me.data.length-1),be.sort(i.sorterDes),qe=0;qe"u")for(Ee=[],tt=0;tt0&&typeof vr.parts[Hr]!="string";)Hr--;var jr=vr.parts[Hr],Oa=vr.parts[Hr-1]+"."+jr,Da=vr.parts.slice(0,Hr).join("."),_i=o(me.layout,Da).get(),ti=o(De,Da).get(),Ka=vr.get();if(Fr!==void 0){St[yr]=Fr,Dt[yr]=jr==="reverse"?Fr:j(Ka);var ia=u.getLayoutValObject(De,vr.parts);if(ia&&ia.impliedEdits&&Fr!==null)for(var na in ia.impliedEdits)kt(i.relativeAttr(yr,na),ia.impliedEdits[na]);if(["width","height"].indexOf(yr)!==-1)if(Fr){kt("autosize",null);var xi=yr==="height"?"width":"height";kt(xi,De[xi])}else De[yr]=me._initialAutoSize[yr];else if(yr==="autosize")kt("width",Fr?null:De.width),kt("height",Fr?null:De.height);else if(Oa.match(fe))dr(Oa),o(De,Da+"._inputRange").set(null);else if(Oa.match(pe)){dr(Oa),o(De,Da+"._inputRange").set(null);var Yi=o(De,Da).get();Yi._inputDomain&&(Yi._input.domain=Yi._inputDomain.slice())}else Oa.match(we)&&o(De,Da+"._inputDomain").set(null);if(jr==="type"){lr=_i;var Qr=ti.type==="linear"&&Fr==="log",Nr=ti.type==="log"&&Fr==="linear";if(Qr||Nr){if(!lr||!lr.range)kt(Da+".autorange",!0);else if(ti.autorange)Qr&&(lr.range=lr.range[1]>lr.range[0]?[1,2]:[2,1]);else{var Oe=lr.range[0],Ie=lr.range[1];Qr?(Oe<=0&&Ie<=0&&kt(Da+".autorange",!0),Oe<=0?Oe=Ie/1e6:Ie<=0&&(Ie=Oe/1e6),kt(Da+".range[0]",Math.log(Oe)/Math.LN10),kt(Da+".range[1]",Math.log(Ie)/Math.LN10)):(kt(Da+".range[0]",Math.pow(10,Oe)),kt(Da+".range[1]",Math.pow(10,Ie)))}Array.isArray(De._subplots.polar)&&De._subplots.polar.length&&De[vr.parts[0]]&&vr.parts[1]==="radialaxis"&&delete De[vr.parts[0]]._subplot.viewInitial["radialaxis.range"],n.getComponentMethod("annotations","convertCoords")(me,ti,Fr,kt),n.getComponentMethod("images","convertCoords")(me,ti,Fr,kt)}else kt(Da+".autorange",!0),kt(Da+".range",null);o(De,Da+"._inputRange").set(null)}else if(jr.match(w)){var Et=o(De,yr).get(),Mt=(Fr||{}).type;(!Mt||Mt==="-")&&(Mt="linear"),n.getComponentMethod("annotations","convertCoords")(me,Et,Mt,kt),n.getComponentMethod("images","convertCoords")(me,Et,Mt,kt)}var zt=x.containerArrayMatch(yr);if(zt){ct=zt.array,At=zt.index;var Gt=zt.property,Ht=ia||{editType:"calc"};At!==""&&Gt===""&&(x.isAddVal(Fr)?Dt[yr]=null:x.isRemoveVal(Fr)?Dt[yr]=(o(Ee,ct).get()||[])[At]:i.warn("unrecognized full object value",be)),C.update(gt,Ht),tt[ct]||(tt[ct]={});var Be=tt[ct][At];Be||(Be=tt[ct][At]={}),Be[Gt]=Fr,delete be[yr]}else jr==="reverse"?(_i.range?_i.range.reverse():(kt(Da+".autorange",!0),_i.range=[1,0]),ti.autorange?gt.calc=!0:gt.plot=!0):(yr==="dragmode"&&(Fr===!1&&Ka!==!1||Fr!==!1&&Ka===!1)||De._has("scatter-like")&&De._has("regl")&&yr==="dragmode"&&(Fr==="lasso"||Fr==="select")&&!(Ka==="lasso"||Ka==="select")?gt.plot=!0:ia?C.update(gt,ia):gt.calc=!0,vr.set(Fr))}}for(ct in tt){var et=x.applyContainerArrayChanges(me,Fe(Ee,ct),tt[ct],gt,Fe);et||(gt.plot=!0)}for(var ut in Vt){lr=f.getFromId(me,ut);var bt=lr&&lr._constraintGroup;if(bt){gt.calc=!0;for(var Ot in bt)Vt[Ot]||(f.getFromId(me,Ot)._constraintShrinkable=!0)}}(he(me)||be.height||be.width)&&(gt.plot=!0);var It=De.shapes;for(At=0;At1;)if(De.pop(),Ee=o(be,De.join(".")+".uirevision").get(),Ee!==void 0)return Ee;return be.uirevision}function Se(me,be){for(var Ee=0;Ee[Da,me._ev.listeners(Da)]);Fe=e.newPlot(me,be,Ee,De).then(()=>{for(let[Da,_i]of Oa)_i.forEach(ti=>me.on(Da,ti));return e.react(me,be,Ee,De)})}else{me.data=be||[],E.cleanData(me.data),me.layout=Ee||{},E.cleanLayout(me.layout),Ge(me.data,me.layout,qe,at),c.supplyDefaults(me,{skipUpdateCalc:!0});var At=me._fullData,ft=me._fullLayout,qt=ft.datarevision===void 0,ar=ft.transition,vt=dt(me,at,ft,qt,ar),gt=vt.newDataRevision,St=Ke(me,qe,At,qt,ar,gt);if(he(me)&&(vt.layoutReplot=!0),St.calc||vt.calc){me.calcdata=void 0;for(var Dt=Object.getOwnPropertyNames(ft),kt=0;kt(ct||me.emit("plotly_react",{config:De,data:be,layout:Ee}),me))}function Ke(me,be,Ee,De,Ce,Fe){var Je=be.length===Ee.length;if(!Ce&&!Je)return{fullReplot:!0,calc:!0};var qe=C.traceFlags();qe.arrays={},qe.nChanges=0,qe.nChangesAnim=0;var at,tt;function ct(qt){var ar=u.getTraceValObject(tt,qt);return!tt._module.animatable&&ar.anim&&(ar.anim=!1),ar}var At={getValObject:ct,flags:qe,immutable:De,transition:Ce,newDataRevision:Fe,gd:me},ft={};for(at=0;at=Ce.length?Ce[0]:Ce[tt]:Ce}function qe(tt){return Array.isArray(Fe)?tt>=Fe.length?Fe[0]:Fe[tt]:Fe}function at(tt,ct){var At=0;return function(){if(tt&&++At===ct)return tt()}}return new Promise(function(tt,ct){function At(){if(De._frameQueue.length!==0){for(;De._frameQueue.length;){var jr=De._frameQueue.pop();jr.onInterrupt&&jr.onInterrupt()}me.emit("plotly_animationinterrupted",[])}}function ft(jr){if(jr.length!==0){for(var Oa=0;OaDe._timeToNext&&ar()};jr()}var gt=0;function St(jr){return Array.isArray(Ce)?gt>=Ce.length?jr.transitionOpts=Ce[gt]:jr.transitionOpts=Ce[0]:jr.transitionOpts=Ce,gt++,jr}var Dt,kt,Vt=[],lr=be==null,dr=Array.isArray(be),yr=!lr&&!dr&&i.isPlainObject(be);if(yr)Vt.push({type:"object",data:St(i.extendFlat({},be))});else if(lr||["string","number"].indexOf(typeof be)!==-1)for(Dt=0;Dt0&&lala)&&Hr.push(kt);Vt=Hr}}Vt.length>0?ft(Vt):(me.emit("plotly_animated"),tt())})}function pt(me,be,Ee){if(me=i.getGraphDiv(me),be==null)return Promise.resolve();if(!i.isPlotDiv(me))throw new Error("This element is not a Plotly plot: "+me+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var De,Ce,Fe,Je,qe=me._transitionData._frames,at=me._transitionData._frameHash;if(!Array.isArray(be))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+be);var tt=qe.length+be.length*2,ct=[],At={};for(De=be.length-1;De>=0;De--)if(i.isPlainObject(be[De])){var ft=be[De].name,qt=(at[ft]||At[ft]||{}).name,ar=be[De].name,vt=at[qt]||At[qt];qt&&ar&&typeof ar=="number"&&vt&&kvr.index?-1:yr.index=0;De--){if(Ce=ct[De].frame,typeof Ce.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ce.name)for(;at[Ce.name="frame "+me._transitionData._counter++];);if(at[Ce.name]){for(Fe=0;Fe=0;Ee--)De=be[Ee],Fe.push({type:"delete",index:De}),Je.unshift({type:"insert",index:De,value:Ce[De]});var qe=c.modifyFrames,at=c.modifyFrames,tt=[me,Je],ct=[me,Fe];return l&&l.add(me,qe,tt,at,ct),c.modifyFrames(me,Fe)}function st(me){me=i.getGraphDiv(me);var be=me._fullLayout||{},Ee=me._fullData||[];return c.cleanPlot([],{},Ee,be),c.purge(me),s.purge(me),be._container&&be._container.remove(),delete me._context,me}function Ve(me){var be=me._fullLayout,Ee=me.getBoundingClientRect();if(!i.equalDomRects(Ee,be._lastBBox)){var De=be._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(me));be._invScaleX=Math.sqrt(De[0][0]*De[0][0]+De[0][1]*De[0][1]+De[0][2]*De[0][2]),be._invScaleY=Math.sqrt(De[1][0]*De[1][0]+De[1][1]*De[1][1]+De[1][2]*De[1][2]),be._lastBBox=Ee}}function Ye(me){var be=r.select(me),Ee=me._fullLayout;if(Ee._calcInverseTransform=Ve,Ee._calcInverseTransform(me),Ee._container=be.selectAll(".plot-container").data([0]),Ee._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ee._paperdiv=Ee._container.selectAll(".svg-container").data([0]),Ee._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ee._glcontainer=Ee._paperdiv.selectAll(".gl-container").data([{}]),Ee._glcontainer.enter().append("div").classed("gl-container",!0),Ee._paperdiv.selectAll(".main-svg").remove(),Ee._paperdiv.select(".modebar-container").remove(),Ee._paper=Ee._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ee._toppaper=Ee._paperdiv.append("svg").classed("main-svg",!0),Ee._modebardiv=Ee._paperdiv.append("div"),delete Ee._modeBar,Ee._hoverpaper=Ee._paperdiv.append("svg").classed("main-svg",!0),!Ee._uid){var De={};r.selectAll("defs").each(function(){this.id&&(De[this.id.split("-")[1]]=1)}),Ee._uid=i.randstr(De)}Ee._paperdiv.selectAll(".main-svg").attr(y.svgAttrs),Ee._defs=Ee._paper.append("defs").attr("id","defs-"+Ee._uid),Ee._clips=Ee._defs.append("g").classed("clips",!0),Ee._topdefs=Ee._toppaper.append("defs").attr("id","topdefs-"+Ee._uid),Ee._topclips=Ee._topdefs.append("g").classed("clips",!0),Ee._bgLayer=Ee._paper.append("g").classed("bglayer",!0),Ee._draggers=Ee._paper.append("g").classed("draglayer",!0);var Ce=Ee._paper.append("g").classed("layer-below",!0);Ee._imageLowerLayer=Ce.append("g").classed("imagelayer",!0),Ee._shapeLowerLayer=Ce.append("g").classed("shapelayer",!0),Ee._cartesianlayer=Ee._paper.append("g").classed("cartesianlayer",!0),Ee._polarlayer=Ee._paper.append("g").classed("polarlayer",!0),Ee._smithlayer=Ee._paper.append("g").classed("smithlayer",!0),Ee._ternarylayer=Ee._paper.append("g").classed("ternarylayer",!0),Ee._geolayer=Ee._paper.append("g").classed("geolayer",!0),Ee._funnelarealayer=Ee._paper.append("g").classed("funnelarealayer",!0),Ee._pielayer=Ee._paper.append("g").classed("pielayer",!0),Ee._iciclelayer=Ee._paper.append("g").classed("iciclelayer",!0),Ee._treemaplayer=Ee._paper.append("g").classed("treemaplayer",!0),Ee._sunburstlayer=Ee._paper.append("g").classed("sunburstlayer",!0),Ee._indicatorlayer=Ee._toppaper.append("g").classed("indicatorlayer",!0),Ee._glimages=Ee._paper.append("g").classed("glimages",!0);var Fe=Ee._toppaper.append("g").classed("layer-above",!0);Ee._imageUpperLayer=Fe.append("g").classed("imagelayer",!0),Ee._shapeUpperLayer=Fe.append("g").classed("shapelayer",!0),Ee._selectionLayer=Ee._toppaper.append("g").classed("selectionlayer",!0),Ee._infolayer=Ee._toppaper.append("g").classed("infolayer",!0),Ee._menulayer=Ee._toppaper.append("g").classed("menulayer",!0),Ee._zoomlayer=Ee._toppaper.append("g").classed("zoomlayer",!0),Ee._hoverlayer=Ee._hoverpaper.append("g").classed("hoverlayer",!0),Ee._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),me.emit("plotly_framework")}e.animate=Pt,e.addFrames=pt,e.deleteFrames=Tt,e.addTraces=H,e.deleteTraces=W,e.extendTraces=J,e.moveTraces=U,e.prependTraces=N,e.newPlot=z,e._doPlot=b,e.purge=st,e.react=Ze,e.redraw=P,e.relayout=se,e.restyle=V,e.setPlotConfig=A,e.update=oe,e._guiRelayout=te(se),e._guiRestyle=te(V),e._guiUpdate=te(oe),e._storeDirectGUIEdit=K}}),h0=ye({"src/snapshot/helpers.js"(e){"use strict";var r=li();e.getDelay=function(i){return i._has&&(i._has("gl3d")||i._has("map"))?500:0},e.getRedrawFunc=function(i){return function(){r.getComponentMethod("colorbar","draw")(i)}},e.encodeSVG=function(i){return"data:image/svg+xml,"+encodeURIComponent(i)},e.encodeJSON=function(i){return"data:application/json,"+encodeURIComponent(i)};var t=window.URL||window.webkitURL;e.createObjectURL=function(i){return t.createObjectURL(i)},e.revokeObjectURL=function(i){return t.revokeObjectURL(i)},e.createBlob=function(i,o){if(o==="svg")return new window.Blob([i],{type:"image/svg+xml;charset=utf-8"});if(o==="full-json")return new window.Blob([i],{type:"application/json;charset=utf-8"});var s=a(window.atob(i));return new window.Blob([s],{type:"image/"+o})},e.octetStream=function(i){document.location.href="data:application/octet-stream"+i},e.getPlotTitle=function(i){var o,s,l,n,u=i._fullLayout;if(u){var c=(o=u.title)==null?void 0:o.text;return c===((s=u._dfltTitle)==null?void 0:s.plot)?void 0:c}return(n=(l=i.layout)==null?void 0:l.title)==null?void 0:n.text},e.getPlotSubtitle=function(i){var o,s,l,n,u,c,f=i._fullLayout;if(f){var h=(s=(o=f.title)==null?void 0:o.subtitle)==null?void 0:s.text;return h===((l=f._dfltTitle)==null?void 0:l.subtitle)?void 0:h}return(c=(u=(n=i.layout)==null?void 0:n.title)==null?void 0:u.subtitle)==null?void 0:c.text};function a(i){for(var o=i.length,s=new ArrayBuffer(o),l=new Uint8Array(s),n=0;n{let v=_.toLowerCase();return c.includes(v)?_:f.includes(v)?"<":h.includes(v)?">":_.includes("<")||_.includes(">")?"":m.html(_).text()});return m.remove(),y}function p(g){return g.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}r.exports=function(m,y,_){var v=m._fullLayout,x=v._paper,E=v._toppaper,M=v.width,C=v.height,w;x.insert("rect",":first-child").call(i.setRect,0,0,M,C).call(o.fill,v.paper_bgcolor);var k=v._basePlotModules||[];for(w=0;w1&&C.push(d("object","layout"))),a.supplyDefaults(w);for(var b=w._fullData,S=k.length,A=0;AF.length&&M.push(d("unused",C,S.concat(F.length)));var L=F.length,B=Array.isArray(I);B&&(L=Math.min(L,I.length));var O,G,$,X,Z;if(D.dimensions===2)for(G=0;GF[G].length&&M.push(d("unused",C,S.concat(G,F[G].length)));var J=F[G].length;for(O=0;O<(B?Math.min(J,I[G].length):J);O++)$=B?I[G][O]:I,X=A[G][O],Z=F[G][O],t.validate(X,$)?Z!==X&&Z!==+X&&M.push(d("dynamic",C,S.concat(G,O),X,Z)):M.push(d("value",C,S.concat(G,O),X))}else M.push(d("array",C,S.concat(G),A[G]));else for(G=0;GP?M.push({code:"unused",traceType:A,templateCount:R,dataCount:P}):P>R&&M.push({code:"reused",traceType:A,templateCount:R,dataCount:P})}}function z(I,L){for(var B in I)if(B.charAt(0)!=="_"){var O=I[B],G=d(I,B,L);t(O)?(Array.isArray(I)&&O._template===!1&&O.templateitemname&&M.push({code:"missing",path:G,templateitemname:O.templateitemname}),z(O,G)):Array.isArray(O)&&p(O)&&z(O,G)}}if(z({data:w,layout:C},""),M.length)return M.map(g)};function p(m){for(var y=0;y=0;g--){var m=s[g];if(m.type==="scatter"&&m.xaxis===d.xaxis&&m.yaxis===d.yaxis){m.opacity=void 0;break}}}}}}}),Dte=ye({"src/traces/scatter/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=bA();r.exports=function(i,o){function s(n,u){return t.coerce(i,o,a,n,u)}var l=o.barmode==="group";o.scattermode==="group"&&s("scattergap",l?o.bargap:.2)}}}),op=ye({"src/plots/cartesian/align_period.js"(e,r){"use strict";var t=en(),a=Yt(),i=a.dateTime2ms,o=a.incrementMonth,s=Vn(),l=s.ONEAVGMONTH;r.exports=function(u,c,f,h){if(c.type!=="date")return{vals:h};var d=u[f+"periodalignment"];if(!d)return{vals:h};var p=u[f+"period"],g;if(t(p)){if(p=+p,p<=0)return{vals:h}}else if(typeof p=="string"&&p.charAt(0)==="M"){var m=+p.substring(1);if(m>0&&Math.round(m)===m)g=m;else return{vals:h}}for(var y=c.calendar,_=d==="start",v=d==="end",x=u[f+"period0"],E=i(x,y)||0,M=[],C=[],w=[],k=h.length,T=0;Tb;)F=o(F,-g,y);for(;F<=b;)F=o(F,g,y);A=o(F,-g,y)}else{for(S=Math.round((b-E)/p),F=E+S*p;F>b;)F-=p;for(;F<=b;)F+=p;A=F-p}M[T]=_?A:v?F:(A+F)/2,C[T]=A,w[T]=F}return{vals:M,starts:C,ends:w}}}}),Cd=ye({"src/traces/scatter/colorscale_calc.js"(e,r){"use strict";var t=xc().hasColorscale,a=Nc(),i=ms();r.exports=function(s,l){i.hasLines(l)&&t(l,"line")&&a(s,l,{vals:l.line.color,containerStr:"line",cLetter:"c"}),i.hasMarkers(l)&&(t(l,"marker")&&a(s,l,{vals:l.marker.color,containerStr:"marker",cLetter:"c"}),t(l,"marker.line")&&a(s,l,{vals:l.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Vp=ye({"src/traces/scatter/arrays_to_calcdata.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o){for(var s=0;sz&&A[L].gap;)L--;for(O=A[L].s,I=A.length-1;I>L;I--)A[I].s=O;for(;zX+G||!t($))}for(var J=0;JL(O))):L(P.text);let B=P.outsidetextfont.size*c*I+u;return{ppadplus:z.some(O=>O.s<0)?B:0,ppadminus:z.some(O=>O.s>=0)?B:0}}return{ppadplus:void 0,ppadminus:void 0}}function F(P,z,I,L){for(var B=R(L),O=0;OR[y]&&y0?s:l)/(y._m*x*(y._m>0?s:l)))),tt*=1e3}if(ct===i){if(v&&(ct=y.c2p(at.y,!0)),ct===i)return!1;ct*=1e3}return[tt,ct]}function Y(qe,at,tt,ct){var At=tt-qe,ft=ct-at,qt=.5-qe,ar=.5-at,vt=At*At+ft*ft,gt=At*qt+ft*ar;if(gt>0&>1||Math.abs(qt.y-tt[0][1])>1)&&(qt=[qt.x,qt.y],ct&&le(qt,qe)pe||qe[1]xe)return[c(qe[0],fe,pe),c(qe[1],we,xe)]}function Ue(qe,at){if(qe[0]===at[0]&&(qe[0]===fe||qe[0]===pe)||qe[1]===at[1]&&(qe[1]===we||qe[1]===xe))return!0}function Ge(qe,at){var tt=[],ct=Me(qe),At=Me(at);return ct&&At&&Ue(ct,At)||(ct&&tt.push(ct),At&&tt.push(At)),tt}function Ze(qe,at,tt){return function(ct,At){var ft=Me(ct),qt=Me(At),ar=[];if(ft&&qt&&Ue(ft,qt))return ar;ft&&ar.push(ft),qt&&ar.push(qt);var vt=2*n.constrain((ct[qe]+At[qe])/2,at,tt)-((ft||ct)[qe]+(qt||At)[qe]);if(vt){var gt;ft&&qt?gt=vt>0==ft[qe]>qt[qe]?ft:qt:gt=ft||qt,gt[qe]+=vt}return ar}}var Ke;T==="linear"||T==="spline"?Ke=Se:T==="hv"||T==="vh"?Ke=Ge:T==="hvh"?Ke=Ze(0,fe,pe):T==="vhv"&&(Ke=Ze(1,we,xe));function dt(qe,at){var tt=at[0]-qe[0],ct=(at[1]-qe[1])/tt,At=(qe[1]*at[0]-at[1]*qe[0])/tt;return At>0?[ct>0?fe:pe,xe]:[ct>0?pe:fe,we]}function _t(qe){var at=qe[0],tt=qe[1],ct=at===R[P-1][0],At=tt===R[P-1][1];if(!(ct&&At))if(P>1){var ft=at===R[P-2][0],qt=tt===R[P-2][1];ct&&(at===fe||at===pe)&&ft?qt?P--:R[P-1]=qe:At&&(tt===we||tt===xe)&&qt?ft?P--:R[P-1]=qe:R[P++]=qe}else R[P++]=qe}function Pt(qe){R[P-1][0]!==qe[0]&&R[P-1][1]!==qe[1]&&_t([ie,ee]),_t(qe),ce=null,ie=ee=0}var pt=n.isArrayOrTypedArray(C);function Tt(qe){if(qe&&M&&(qe.i=z,qe.d=d,qe.trace=g,qe.marker=pt?C[qe.i]:C,qe.backoff=M),K=qe[0]/x,re=qe[1]/E,oe=qe[0]pe?pe:0,te=qe[1]xe?xe:0,oe||te){if(!P)R[P++]=[oe||qe[0],te||qe[1]];else if(ce){var at=Ke(ce,qe);at.length>1&&(Pt(at[0]),R[P++]=at[1])}else _e=Ke(R[P-1],qe)[0],R[P++]=_e;var tt=R[P-1];oe&&te&&(tt[0]!==oe||tt[1]!==te)?(ce&&(ie!==oe&&ee!==te?_t(ie&&ee?dt(ce,qe):[ie||oe,ee||te]):ie&&ee&&_t([ie,ee])),_t([oe,te])):ie-oe&&ee-te&&_t([oe||ie,te||ee]),ce=qe,ie=oe,ee=te}else ce&&Pt(Ke(ce,qe)[0]),R[P++]=qe}for(z=0;zse(G,st))break;L=G,W=Z[0]*X[0]+Z[1]*X[1],W>N?(N=W,B=G,$=!1):W=d.length||!G)break;Tt(G),I=G}}ce&&_t([ie||ce[0],ee||ce[1]]),A.push(R.slice(0,P))}var Ve=T.slice(T.length-1);if(M&&Ve!=="h"&&Ve!=="v"){for(var Ye=!1,me=-1,be=[],Ee=0;Ee=0?f=m:(f=m=g,g++),f0,T=c(m,y,_);if(M=v.selectAll("g.trace").data(T,function(S){return S[0].trace.uid}),M.enter().append("g").attr("class",function(S){return"trace scatter trace"+S[0].trace.uid}).style("stroke-miterlimit",2),M.order(),h(m,M,y),k){E&&(C=E());var b=t.transition().duration(x.duration).ease(x.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});b.each(function(){v.selectAll("g.trace").each(function(S,A){d(m,A,y,S,T,this,x)})})}else M.each(function(S,A){d(m,A,y,S,T,this,x)});w&&M.exit().remove(),v.selectAll("path:not([d])").remove()};function h(g,m,y){m.each(function(_){var v=o(t.select(this),"g","fills");l.setClipUrl(v,y.layerClipId,g);var x=_[0].trace;x._ownFill=null,x._nextFill=null;var E=[];x._ownfill&&E.push("_ownFill"),x._nexttrace&&E.push("_nextFill");var M=v.selectAll("g").data(E,s);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){x[C]=o(t.select(this),"path","js-fill")})})}function d(g,m,y,_,v,x,E){var M=g._context.staticPlot,C;p(g,m,y,_,v);var w=!!E&&E.duration>0;function k(_t){return w?_t.transition():_t}var T=y.xaxis,b=y.yaxis,S=_[0].trace,A=S.line,F=t.select(x),D=o(F,"g","errorbars"),R=o(F,"g","lines"),P=o(F,"g","points"),z=o(F,"g","text");if(a.getComponentMethod("errorbars","plot")(g,D,y,E),S.visible!==!0)return;k(F).style("opacity",S.opacity);var I,L,B=S.fill.charAt(S.fill.length-1);B!=="x"&&B!=="y"&&(B="");var O,G;B==="y"?(O=1,G=b.c2p(0,!0)):B==="x"&&(O=0,G=T.c2p(0,!0)),_[0][y.isRangePlot?"nodeRangePlot3":"node3"]=F;var $="",X=[],Z=S._prevtrace,J=null,N=null;Z&&($=Z._prevRevpath||"",L=Z._nextFill,X=Z._ownPolygons,J=Z._fillsegments,N=Z._fillElement);var H,W,U="",V="",j,q,Y,K,re,se,le=[];S._polygons=[];var ue=[],fe=[],pe=i.noop;if(I=S._ownFill,n.hasLines(S)||S.fill!=="none"){L&&L.datum(_),["hv","vh","hvh","vhv"].indexOf(A.shape)!==-1?(j=l.steps(A.shape),q=l.steps(A.shape.split("").reverse().join(""))):A.shape==="spline"?j=q=function(_t){var Pt=_t[_t.length-1];return _t.length>1&&_t[0][0]===Pt[0]&&_t[0][1]===Pt[1]?l.smoothclosed(_t.slice(1),A.smoothing):l.smoothopen(_t,A.smoothing)}:j=q=function(_t){return"M"+_t.join("L")},Y=function(_t){return q(_t.reverse())},fe=u(_,{xaxis:T,yaxis:b,trace:S,connectGaps:S.connectgaps,baseTolerance:Math.max(A.width||1,3)/4,shape:A.shape,backoff:A.backoff,simplify:A.simplify,fill:S.fill}),ue=new Array(fe.length);var we=0;for(C=0;C=M[0]&&F.x<=M[1]&&F.y>=C[0]&&F.y<=C[1]}),b=Math.ceil(T.length/k),S=0;v.forEach(function(F,D){var R=F[0].trace;n.hasMarkers(R)&&R.marker.maxdisplayed>0&&D=Math.min(Z,J)&&y<=Math.max(Z,J)?0:1/0}var N=Math.max(3,X.mrc||0),H=1-1/N,W=Math.abs(g.c2p(X.x)-y);return W=Math.min(Z,J)&&_<=Math.max(Z,J)?0:1/0}var N=Math.max(3,X.mrc||0),H=1-1/N,W=Math.abs(m.c2p(X.y)-_);return WV!=ue>=V&&(re=Y[q-1][0],se=Y[q][0],ue-le&&(K=re+(se-re)*(V-le)/(ue-le),N=Math.min(N,K),H=Math.max(H,K)));return N=Math.max(N,0),H=Math.min(H,g._length),{x0:N,x1:H,y0:V,y1:V}}if(x.indexOf("fills")!==-1&&p._fillElement){var O=L(p._fillElement)&&!L(p._fillExclusionElement);if(O){var G=B(p._polygons);G===null&&(G={x0:v[0],x1:v[0],y0:v[1],y1:v[1]});var $=s.defaultLine;return s.opacity(p.fillcolor)?$=p.fillcolor:s.opacity((p.line||{}).color)&&($=p.line.color),t.extendFlat(u,{distance:u.maxHoverDistance,x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1,color:$,hovertemplate:!1}),delete u.index,p.text&&!t.isArrayOrTypedArray(p.text)?u.text=String(p.text):u.text=p.name,[u]}}}}}),Im=ye({"src/traces/scatter/select.js"(e,r){"use strict";var t=ms();r.exports=function(i,o){var s=i.cd,l=i.xaxis,n=i.yaxis,u=[],c=s[0].trace,f,h,d,p,g=c.mode&&!t.hasMarkers(c)&&!t.hasText(c);if(g)return[];if(o===!1)for(f=0;f0&&(h["_"+c+"axes"]||{})[u])return h;if((h[c+"axis"]||c)===u){if(l(h,c))return h;if((h[c]||[]).length||h[c+"0"])return h}}}function s(n){return{v:"x",h:"y"}[n.orientation||"v"]}function l(n,u){var c=s(n),f=t(n,"box-violin");return f&&u===c&&n[c]===void 0&&n[c+"0"]===void 0}}}),zA=ye({"src/plots/cartesian/category_order_defaults.js"(e,r){"use strict";var t=yc().isTypedArraySpec;function a(i,o){var s=o.dataAttr||i._id.charAt(0),l={},n,u,c;if(o.axData)n=o.axData;else for(n=[],u=0;u0||t(u),f;c&&(f="array");var h=l("categoryorder",f),d;h==="array"&&(d=l("categoryarray")),!c&&h==="array"&&(h=s.categoryorder="trace"),h==="trace"?s._initialCategories=[]:h==="array"?s._initialCategories=d.slice():(d=a(s,n).sort(),h==="category ascending"?s._initialCategories=d:h==="category descending"&&(s._initialCategories=d.reverse()))}}}}),rb=ye({"src/plots/cartesian/line_grid_defaults.js"(e,r){"use strict";var t=Ya(),a=Wl(),i=Yt();r.exports=function(s,l,n,u){u=u||{};var c=u.dfltColor;function f(A,F){return i.coerce2(s,l,u.attributes,A,F)}var h=f("linecolor",c),d=f("linewidth"),p=n("showline",u.showLine||!!h||!!d);p||(delete l.linecolor,delete l.linewidth);var g=t.mix(c,u.bgColor,u.blend||a.lightFraction),m=f("gridcolor",g),y=f("gridwidth"),_=f("griddash"),v=n("showgrid",u.showGrid||!!m||!!y||!!_);if(v||(delete l.gridcolor,delete l.gridwidth,delete l.griddash),u.hasMinor){var x=t.mix(l.gridcolor,u.bgColor,67),E=f("minor.gridcolor",x),M=f("minor.gridwidth",l.gridwidth||1),C=f("minor.griddash",l.griddash||"solid"),w=n("minor.showgrid",!!E||!!M||!!C);w||(delete l.minor.gridcolor,delete l.minor.gridwidth,delete l.minor.griddash)}if(!u.noZeroLine){var k=f("zerolinelayer"),T=f("zerolinecolor",c),b=f("zerolinewidth"),S=n("zeroline",u.showGrid||!!T||!!b);S||(delete l.zerolinelayer,delete l.zerolinecolor,delete l.zerolinewidth)}}}}),ab=ye({"src/plots/cartesian/axis_defaults.js"(e,r){"use strict";var t=en(),a=li(),i=Yt(),o=ko(),s=Oc(),l=Gu(),n=km(),u=my(),c=Av(),f=Tv(),h=zA(),d=rb(),p=KD(),g=Op(),m=$l().WEEKDAY_PATTERN,y=$l().HOUR_PATTERN;r.exports=function(M,C,w,k,T){var b=k.letter,S=k.font||{},A=k.splomStash||{},F=w("visible",!k.visibleDflt),D=C._template||{},R=C.type||D.type||"-",P;if(R==="date"){var z=a.getComponentMethod("calendars","handleDefaults");z(M,C,"calendar",k.calendar),k.noTicklabelmode||(P=w("ticklabelmode"))}!k.noTicklabelindex&&(R==="date"||R==="linear")&&w("ticklabelindex");var I="";(!k.noTicklabelposition||R==="multicategory")&&(I=i.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:P==="period"?["outside","inside"]:b==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),k.noTicklabeloverflow||w("ticklabeloverflow",I.indexOf("inside")!==-1?"hide past domain":R==="category"||R==="multicategory"?"allow":"hide past div"),g(C,T),p(M,C,w,k),h(M,C,w,k),k.noHover||(R!=="category"&&w("hoverformat"),k.noUnifiedhovertitle||w("unifiedhovertitle.text"));var L=w("color"),B=L!==l.color.dflt?L:S.color,O=A.label||T._dfltTitle[b];if(f(M,C,w,R,k),!F)return C;w("title.text",O),i.coerceFont(w,"title.font",S,{overrideDflt:{size:i.bigFont(S.size),color:B}}),n(M,C,w,R);var G=k.hasMinor;if(G&&(o.newContainer(C,"minor"),n(M,C,w,R,{isMinor:!0})),c(M,C,w,R,k),u(M,C,w,k),G){var $=k.isMinor;k.isMinor=!0,u(M,C,w,k),k.isMinor=$}d(M,C,w,{dfltColor:L,bgColor:k.bgColor,showGrid:k.showGrid,hasMinor:G,attributes:l}),G&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&w("mirror");var X=R==="multicategory";if(!k.noTickson&&(R==="category"||X)&&(C.ticks||C.showgrid)&&(X?(w("tickson","boundaries"),delete C.ticklabelposition):w("tickson")),X){var Z=w("showdividers");Z&&(w("dividercolor"),w("dividerwidth"))}if(R==="date")if(s(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:_}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var J=0;J=2){var b="",S,A;if(T.length===2){for(S=0;S<2;S++)if(A=x(T[S]),A){b=m;break}}var F=w("pattern",b);if(F===m)for(S=0;S<2;S++)A=x(T[S]),A&&(M.bounds[S]=T[S]=A-1);if(F)for(S=0;S<2;S++)switch(A=T[S],F){case m:if(!t(A)){M.enabled=!1;return}if(A=+A,A!==Math.floor(A)||A<0||A>=7){M.enabled=!1;return}M.bounds[S]=T[S]=A;break;case y:if(!t(A)){M.enabled=!1;return}if(A=+A,A<0||A>24){M.enabled=!1;return}M.bounds[S]=T[S]=A;break}if(C.autorange===!1){var D=C.range;if(D[0]D[1]){M.enabled=!1;return}}else if(T[0]>D[0]&&T[1]w[1]-1/4096&&(s.domain=g),a.noneOrAll(o.domain,s.domain,g),s.tickmode==="sync"&&(s.tickmode="auto")}return l("layer"),s}}}),Ite=ye({"src/plots/cartesian/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=Bf().isUnifiedHover,o=n9(),s=ko(),l=dy(),n=Gu(),u=M9(),c=ab(),f=Dm(),h=BA(),d=Gs(),p=d.id2name,g=d.name2id,m=$l().AX_ID_PATTERN,y=li(),_=y.traceIs,v=y.getComponentMethod;function x(E,M,C){Array.isArray(E[M])?E[M].push(C):E[M]=[C]}r.exports=function(M,C,w){var k=C.autotypenumbers,T={},b={},S={},A={},F={},D={},R={},P={},z={},I={},L,B;for(L=0;L rect").call(o.setTranslate,0,0).call(o.setScale,1,1),C.plot.call(o.setTranslate,w._offset,k._offset).call(o.setScale,1,1);var T=C.plot.selectAll(".scatterlayer .trace");T.selectAll(".point").call(o.setPointGroupScale,1,1),T.selectAll(".textpoint").call(o.setTextPointsScale,1,1),T.call(o.hideOutsideRangePoints,C)}function p(C,w){var k=C.plotinfo,T=k.xaxis,b=k.yaxis,S=T._length,A=b._length,F=!!C.xr1,D=!!C.yr1,R=[];if(F){var P=i.simpleMap(C.xr0,T.r2l),z=i.simpleMap(C.xr1,T.r2l),I=P[1]-P[0],L=z[1]-z[0];R[0]=(P[0]*(1-w)+w*z[0]-P[0])/(P[1]-P[0])*S,R[2]=S*(1-w+w*L/I),T.range[0]=T.l2r(P[0]*(1-w)+w*z[0]),T.range[1]=T.l2r(P[1]*(1-w)+w*z[1])}else R[0]=0,R[2]=S;if(D){var B=i.simpleMap(C.yr0,b.r2l),O=i.simpleMap(C.yr1,b.r2l),G=B[1]-B[0],$=O[1]-O[0];R[1]=(B[1]*(1-w)+w*O[1]-B[1])/(B[0]-B[1])*A,R[3]=A*(1-w+w*$/G),b.range[0]=T.l2r(B[0]*(1-w)+w*O[0]),b.range[1]=b.l2r(B[1]*(1-w)+w*O[1])}else R[1]=0,R[3]=A;s.drawOne(n,T,{skipTitle:!0}),s.drawOne(n,b,{skipTitle:!0}),s.redrawComponents(n,[T._id,b._id]);var X=F?S/R[2]:1,Z=D?A/R[3]:1,J=F?R[0]:0,N=D?R[1]:0,H=F?R[0]/R[2]*S:0,W=D?R[1]/R[3]*A:0,U=T._offset-H,V=b._offset-W;k.clipRect.call(o.setTranslate,J,N).call(o.setScale,1/X,1/Z),k.plot.call(o.setTranslate,U,V).call(o.setScale,X,Z),o.setPointGroupScale(k.zoomScalePts,1/X,1/Z),o.setTextPointsScale(k.zoomScaleTxt,1/X,1/Z)}var g;f&&(g=f());function m(){for(var C={},w=0;wc.duration?(m(),x=window.cancelAnimationFrame(M)):x=window.requestAnimationFrame(M)}return _=Date.now(),x=window.requestAnimationFrame(M),Promise.resolve()}}}),Ml=ye({"src/plots/cartesian/index.js"(e){"use strict";var r=ai(),t=li(),a=Yt(),i=ws(),o=$i(),s=_c().getModuleCalcData,l=Gs(),n=$l(),u=Sd(),c=a.ensureSingle;function f(_,v,x){return a.ensureSingle(_,v,x,function(E){E.datum(x)})}var h=n.zindexSeparator;e.name="cartesian",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=n.idRegex,e.attrRegex=n.attrRegex,e.attributes=Pte(),e.layoutAttributes=Gu(),e.supplyLayoutDefaults=Ite(),e.transitionAxes=Rte(),e.finalizeSubplots=function(_,v){var x=v._subplots,E=x.xaxis,M=x.yaxis,C=x.cartesian,w=C,k={},T={},b,S,A;for(b=0;b0){var D=F.id;if(D.indexOf(h)!==-1)continue;D+=h+(b+1),F=a.extendFlat({},F,{id:D,plot:M._cartesianlayer.selectAll(".subplot").select("."+D)})}for(var R=[],P,z=0;z1&&(G+=h+O),B.push(k+G),w=0;w1,A=v.mainplotinfo;if(!v.mainplot||S)if(b)v.xlines=c(E,"path","xlines-above"),v.ylines=c(E,"path","ylines-above"),v.xaxislayer=c(E,"g","xaxislayer-above"),v.yaxislayer=c(E,"g","yaxislayer-above");else{if(!w){var F=c(E,"g","layer-subplot");v.shapelayer=c(F,"g","shapelayer"),v.imagelayer=c(F,"g","imagelayer"),A&&S?(v.minorGridlayer=A.minorGridlayer,v.gridlayer=A.gridlayer,v.zerolinelayer=A.zerolinelayer):(v.minorGridlayer=c(E,"g","minor-gridlayer"),v.gridlayer=c(E,"g","gridlayer"),v.zerolinelayer=c(E,"g","zerolinelayer"));var D=c(E,"g","layer-between");v.shapelayerBetween=c(D,"g","shapelayer"),v.imagelayerBetween=c(D,"g","imagelayer"),c(E,"path","xlines-below"),c(E,"path","ylines-below"),v.overlinesBelow=c(E,"g","overlines-below"),c(E,"g","xaxislayer-below"),c(E,"g","yaxislayer-below"),v.overaxesBelow=c(E,"g","overaxes-below")}v.overplot=c(E,"g","overplot"),v.plot=c(v.overplot,"g",M),A&&S?v.zerolinelayerAbove=A.zerolinelayerAbove:v.zerolinelayerAbove=c(E,"g","zerolinelayer-above"),w||(v.xlines=c(E,"path","xlines-above"),v.ylines=c(E,"path","ylines-above"),v.overlinesAbove=c(E,"g","overlines-above"),c(E,"g","xaxislayer-above"),c(E,"g","yaxislayer-above"),v.overaxesAbove=c(E,"g","overaxes-above"),v.xlines=E.select(".xlines-"+k),v.ylines=E.select(".ylines-"+T),v.xaxislayer=E.select(".xaxislayer-"+k),v.yaxislayer=E.select(".yaxislayer-"+T))}else{var R=A.plotgroup,P=M+"-x",z=M+"-y";v.minorGridlayer=A.minorGridlayer,v.gridlayer=A.gridlayer,v.zerolinelayer=A.zerolinelayer,v.zerolinelayerAbove=A.zerolinelayerAbove,c(A.overlinesBelow,"path",P),c(A.overlinesBelow,"path",z),c(A.overaxesBelow,"g",P),c(A.overaxesBelow,"g",z),v.plot=c(A.overplot,"g",M),c(A.overlinesAbove,"path",P),c(A.overlinesAbove,"path",z),c(A.overaxesAbove,"g",P),c(A.overaxesAbove,"g",z),v.xlines=R.select(".overlines-"+k).select("."+P),v.ylines=R.select(".overlines-"+T).select("."+z),v.xaxislayer=R.select(".overaxes-"+k).select("."+P),v.yaxislayer=R.select(".overaxes-"+T).select("."+z)}w||(b||(f(v.minorGridlayer,"g",v.xaxis._id),f(v.minorGridlayer,"g",v.yaxis._id),v.minorGridlayer.selectAll("g").map(function(I){return I[0]}).sort(l.idSort),f(v.gridlayer,"g",v.xaxis._id),f(v.gridlayer,"g",v.yaxis._id),v.gridlayer.selectAll("g").map(function(I){return I[0]}).sort(l.idSort)),v.xlines.style("fill","none").classed("crisp",!0),v.ylines.style("fill","none").classed("crisp",!0))}function m(_,v){if(_){var x={};_.each(function(T){var b=T[0],S=r.select(this);S.remove(),y(b,v),x[b]=!0});for(var E in v._plots)for(var M=v._plots[E],C=M.overlays||[],w=0;w=0,v=f.indexOf("end")>=0,x=p.backoff*m+h.standoff,E=g.backoff*y+h.startstandoff,M,C,w,k;if(d.nodeName==="line"){M={x:+c.attr("x1"),y:+c.attr("y1")},C={x:+c.attr("x2"),y:+c.attr("y2")};var T=M.x-C.x,b=M.y-C.y;if(w=Math.atan2(b,T),k=w+Math.PI,x&&E&&x+E>Math.sqrt(T*T+b*b)){G();return}if(x){if(x*x>T*T+b*b){G();return}var S=x*Math.cos(w),A=x*Math.sin(w);C.x+=S,C.y+=A,c.attr({x2:C.x,y2:C.y})}if(E){if(E*E>T*T+b*b){G();return}var F=E*Math.cos(w),D=E*Math.sin(w);M.x-=F,M.y-=D,c.attr({x1:M.x,y1:M.y})}}else if(d.nodeName==="path"){var R=d.getTotalLength(),P="";if(R2/3?kt="right":kt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[kt]}for(var _e=!1,Se=["x","y"],Me=0;Me1)&&(Ze===Ge?(Fe=Ke.r2fraction(E["a"+Ue]),(Fe<0||Fe>1)&&(_e=!0)):_e=!0),Ye=Ke._offset+Ke.r2p(E[Ue]),Ee=.5}else{var Je=Ce==="domain";Ue==="x"?(be=E[Ue],Ye=Je?Ke._offset+Ke._length*be:Ye=b.l+b.w*be):(be=1-E[Ue],Ye=Je?Ke._offset+Ke._length*be:Ye=b.t+b.h*be),Ee=E.showarrow?.5:be}if(E.showarrow){Ve.head=Ye;var qe=E["a"+Ue];if(De=_t*ce(.5,E.xanchor)-Pt*ce(.5,E.yanchor),Ze===Ge){var at=l.getRefType(Ze);at==="domain"?(Ue==="y"&&(qe=1-qe),Ve.tail=Ke._offset+Ke._length*qe):at==="paper"?Ue==="y"?(qe=1-qe,Ve.tail=b.t+b.h*qe):Ve.tail=b.l+b.w*qe:Ve.tail=Ke._offset+Ke.r2p(qe),me=De}else Ve.tail=Ye+qe,me=De+qe;Ve.text=Ve.tail+De;var tt=T[Ue==="x"?"width":"height"];if(Ge==="paper"&&(Ve.head=o.constrain(Ve.head,1,tt-1)),Ze==="pixel"){var ct=-Math.max(Ve.tail-3,Ve.text),At=Math.min(Ve.tail+3,Ve.text)-tt;ct>0?(Ve.tail+=ct,Ve.text+=ct):At>0&&(Ve.tail-=At,Ve.text-=At)}Ve.tail+=st,Ve.head+=st}else De=pt*ce(Ee,Tt),me=De,Ve.text=Ye+De;Ve.text+=st,De+=st,me+=st,E["_"+Ue+"padplus"]=pt/2+me,E["_"+Ue+"padminus"]=pt/2-me,E["_"+Ue+"size"]=pt,E["_"+Ue+"shift"]=De}if(_e){J.remove();return}var ft=0,qt=0;if(E.align!=="left"&&(ft=(oe-xe)*(E.align==="center"?.5:1)),E.valign!=="top"&&(qt=(te-he)*(E.valign==="middle"?.5:1)),pe)fe.select("svg").attr({x:W+ft-1,y:W+qt}).call(u.setClipUrl,V?I:null,x);else{var ar=W+qt-we.top,vt=W+ft-we.left;K.call(f.positionText,vt,ar).call(u.setClipUrl,V?I:null,x)}j.select("rect").call(u.setRect,W,W,oe,te),U.call(u.setRect,N/2,N/2,ie-N,ee-N),J.call(u.setTranslate,Math.round(L.x.text-ie/2),Math.round(L.y.text-ee/2)),G.attr({transform:"rotate("+B+","+L.x.text+","+L.y.text+")"});var gt=function(Dt,kt){O.selectAll(".annotation-arrow-g").remove();var Vt=L.x.head,lr=L.y.head,dr=L.x.tail+Dt,yr=L.y.tail+kt,vr=L.x.text+Dt,Fr=L.y.text+kt,la=o.rotationXYMatrix(B,vr,Fr),Hr=o.apply2DTransform(la),jr=o.apply2DTransform2(la),Oa=+U.attr("width"),Da=+U.attr("height"),_i=vr-.5*Oa,ti=_i+Oa,Ka=Fr-.5*Da,ia=Ka+Da,na=[[_i,Ka,_i,ia],[_i,ia,ti,ia],[ti,ia,ti,Ka],[ti,Ka,_i,Ka]].map(jr);if(!na.reduce(function(Be,et){return Be^!!o.segmentsIntersect(Vt,lr,Vt+1e6,lr+1e6,et[0],et[1],et[2],et[3])},!1)){na.forEach(function(Be){var et=o.segmentsIntersect(dr,yr,Vt,lr,Be[0],Be[1],Be[2],Be[3]);et&&(dr=et.x,yr=et.y)});var xi=E.arrowwidth,Yi=E.arrowcolor,Qr=E.arrowside,Nr=O.append("g").style({opacity:n.opacity(Yi)}).classed("annotation-arrow-g",!0),Oe=Nr.append("path").attr("d","M"+dr+","+yr+"L"+Vt+","+lr).style("stroke-width",xi+"px").call(n.stroke,n.rgb(Yi));if(g(Oe,Qr,E),S.annotationPosition&&Oe.node().parentNode&&!C){var Ie=Vt,Et=lr;if(E.standoff){var Mt=Math.sqrt(Math.pow(Vt-dr,2)+Math.pow(lr-yr,2));Ie+=E.standoff*(dr-Vt)/Mt,Et+=E.standoff*(yr-lr)/Mt}var zt=Nr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(dr-Ie)+","+(yr-Et),transform:s(Ie,Et)}).style("stroke-width",xi+6+"px").call(n.stroke,"rgba(0,0,0,0)").call(n.fill,"rgba(0,0,0,0)"),Gt,Ht;d.init({element:zt.node(),gd:x,prepFn:function(){var Be=u.getTranslate(J);Gt=Be.x,Ht=Be.y,w&&w.autorange&&R(w._name+".autorange",!0),k&&k.autorange&&R(k._name+".autorange",!0)},moveFn:function(Be,et){var ut=Hr(Gt,Ht),bt=ut[0]+Be,Ot=ut[1]+et;J.call(u.setTranslate,bt,Ot),P("x",_(w,Be,"x",b,E)),P("y",_(k,et,"y",b,E)),E.axref===E.xref&&P("ax",_(w,Be,"ax",b,E)),E.ayref===E.yref&&P("ay",_(k,et,"ay",b,E)),Nr.attr("transform",s(Be,et)),G.attr({transform:"rotate("+B+","+bt+","+Ot+")"})},doneFn:function(){a.call("_guiRelayout",x,z());var Be=document.querySelector(".js-notes-box-panel");Be&&Be.redraw(Be.selectedObj)}})}}};if(E.showarrow&>(0,0),$){var St;d.init({element:J.node(),gd:x,prepFn:function(){St=G.attr("transform")},moveFn:function(Dt,kt){var Vt="pointer";if(E.showarrow)E.axref===E.xref?P("ax",_(w,Dt,"ax",b,E)):P("ax",E.ax+Dt),E.ayref===E.yref?P("ay",_(k,kt,"ay",b.w,E)):P("ay",E.ay+kt),gt(Dt,kt);else{if(C)return;var lr,dr;if(w)lr=_(w,Dt,"x",b,E);else{var yr=E._xsize/b.w,vr=E.x+(E._xshift-E.xshift)/b.w-yr/2;lr=d.align(vr+Dt/b.w,yr,0,1,E.xanchor)}if(k)dr=_(k,kt,"y",b,E);else{var Fr=E._ysize/b.h,la=E.y-(E._yshift+E.yshift)/b.h-Fr/2;dr=d.align(la-kt/b.h,Fr,0,1,E.yanchor)}P("x",lr),P("y",dr),(!w||!k)&&(Vt=d.getCursor(w?.5:lr,k?.5:dr,E.xanchor,E.yanchor))}G.attr({transform:s(Dt,kt)+St}),h(J,Vt)},clickFn:function(Dt,kt){E.captureevents&&x.emit("plotly_clickannotation",Z(kt))},doneFn:function(){h(J),a.call("_guiRelayout",x,z());var Dt=document.querySelector(".js-notes-box-panel");Dt&&Dt.redraw(Dt.selectedObj)}})}}S.annotationText?K.call(f.makeEditable,{delegate:J,gd:x}).call(re).on("edit",function(le){E.text=le,this.call(re),P("text",le),w&&w.autorange&&R(w._name+".autorange",!0),k&&k.autorange&&R(k._name+".autorange",!0),a.call("_guiRelayout",x,z())}):K.call(re)}}}),Ote=ye({"src/components/annotations/click.js"(e,r){"use strict";var t=Yt(),a=li(),i=ko().arrayEditor;r.exports={hasClickToShow:o,onClick:s};function o(u,c){var f=l(u,c);return f.on.length>0||f.explicitOff.length>0}function s(u,c){var f=l(u,c),h=f.on,d=f.off.concat(f.explicitOff),p={},g=u._fullLayout.annotations,m,y;if(h.length||d.length){for(m=0;m1){h=!0;break}}h?s.fullLayout._infolayer.select(".annotation-"+s.id+'[data-index="'+c+'"]').remove():(f._pdata=a(s.glplot.cameraParams,[l.xaxis.r2l(f.x)*n[0],l.yaxis.r2l(f.y)*n[1],l.zaxis.r2l(f.z)*n[2]]),t(s.graphDiv,f,c,s.id,f._xa,f._ya))}}}}),Wte=ye({"src/components/annotations3d/index.js"(e,r){"use strict";var t=li(),a=Yt();r.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:NA()}}},layoutAttributes:NA(),handleDefaults:Vte(),includeBasePlot:i,convert:Gte(),draw:Hte()};function i(o,s){var l=t.subplotsRegistry.gl3d;if(l)for(var n=l.attrRegex,u=Object.keys(o),c=0;c{var A=S+"anchor",F=S==="x"?x:E,D={_fullLayout:f},R,P,z,I;let L=S+"ref",B=u[L];if(Array.isArray(B)&&B.length>0){let O=s.countDefiningCoords(y,g,S);I=a.coerceRefArray(u,c,D,S,void 0,"paper",O),c["_"+S+"refArray"]=!0}else I=a.coerceRef(u,c,D,S,void 0,"paper");if(Array.isArray(I))I.forEach(function(O){a.getRefType(O)==="range"&&(R=a.getFromId(D,O),R&&R._shapeIndices.indexOf(c._index)===-1&&R._shapeIndices.push(c._index))}),_&&[0,1].forEach(function(O){let G=I[O];a.getRefType(G)==="range"?(R=a.getFromId(D,G),P=s.shapePositionToRange(R),z=s.rangeToShapePosition(R),(R.type==="category"||R.type==="multicategory")&&h(S+O+"shift")):P=z=t.identity;let X=S+O,Z=u[X];if(u[X]=P(u[X],!0),F==="pixel"?h(X,C[O]):a.coercePosition(c,D,h,G,X,M[O]),c[X]=z(c[X]),u[X]=Z,O===0&&F==="pixel"){let J=u[A];u[A]=P(u[A],!0),a.coercePosition(c,D,h,G,A,.25),c[A]=z(c[A]),u[A]=J}});else{if(a.getRefType(I)==="range"?(R=a.getFromId(D,I),R._shapeIndices.push(c._index),z=s.rangeToShapePosition(R),P=s.shapePositionToRange(R),_&&(R.type==="category"||R.type==="multicategory")&&(h(S+"0shift"),h(S+"1shift"))):P=z=t.identity,_){let G=S+"0",$=S+"1",X=u[G],Z=u[$];u[G]=P(u[G],!0),u[$]=P(u[$],!0),F==="pixel"?(h(G,C[0]),h($,C[1])):(a.coercePosition(c,D,h,I,G,M[0]),a.coercePosition(c,D,h,I,$,M[1])),c[G]=z(c[G]),c[$]=z(c[$]),u[G]=X,u[$]=Z}if(F==="pixel"){let G=u[A];u[A]=P(u[A],!0),a.coercePosition(c,D,h,I,A,.25),c[A]=z(c[A]),u[A]=G}}}),_&&t.noneOrAll(u,c,["x0","x1","y0","y1"]);var w=y==="line",k,T;if(_&&(k=h("label.texttemplate"),h("label.texttemplatefallback")),k||(T=h("label.text")),T||k){h("label.textangle");var b=h("label.textposition",w?"middle":"middle center");h("label.xanchor"),h("label.yanchor",l(w,b)),h("label.padding"),t.coerceFont(h,"label.font",f.font)}}}}),Yte=ye({"src/components/shapes/draw_newshape/defaults.js"(e,r){"use strict";var t=Ya(),a=Yt();function i(o,s){return o?"bottom":s.indexOf("top")!==-1?"top":s.indexOf("bottom")!==-1?"bottom":"middle"}r.exports=function(s,l,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),a.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var u=n("newshape.line.width");if(u){var c=(s||{}).plot_bgcolor||"#FFF";n("newshape.line.color",t.contrast(c)),n("newshape.line.dash")}var f=s.dragmode==="drawline",h=n("newshape.label.text"),d=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),h||d){n("newshape.label.textangle");var p=n("newshape.label.textposition",f?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",i(f,p)),n("newshape.label.padding"),a.coerceFont(n,"newshape.label.font",l.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}}}),Xte=ye({"src/components/shapes/calc_autorange.js"(e,r){"use strict";var t=Yt(),a=qi(),i=Kx(),o=Sv();r.exports=function(h){var d=h._fullLayout,p=t.filterVisible(d.shapes);if(!(!p.length||!h._fullData.length))for(var g=0;g{y=a.getFromId(h,M),m._extremes[y._id]=a.findExtremes(y,C,l(m))})}else m.xref!=="paper"&&v!=="domain"&&(y=a.getFromId(h,m.xref),_=c(y,m,i.paramIsX),_&&(m._extremes[y._id]=a.findExtremes(y,_,l(m))));if(x==="array"){let E=s(h,m,"y");Object.entries(E).forEach(([M,C])=>{y=a.getFromId(h,M),m._extremes[y._id]=a.findExtremes(y,C,n(m))})}else m.yref!=="paper"&&x!=="domain"&&(y=a.getFromId(h,m.yref),_=c(y,m,i.paramIsY),_&&(m._extremes[y._id]=a.findExtremes(y,_,n(m))))}};function s(f,h,d){let p=h[d+"ref"],g=d==="x"?i.paramIsX:i.paramIsY;function m(M,C){M==="paper"||a.getRefType(M)==="domain"||(y[M]||(y[M]=[]),y[M].push(C))}let y={};if(h.type==="path"&&h.path){let M=h.path.match(i.segmentRE)||[];for(var _=0,v=0;vk&&(m(p[_],T[k]),_++)}}else m(p[0],h[d+"0"]),m(p[1],h[d+"1"]);let x={};for(let M in y){let C=a.getFromId(f,M);if(C){var E=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(E=o.decodeDate(E)),x[C._id]=y[M].map(E)}}return x}function l(f){return u(f.line.width,f.xsizemode,f.x0,f.x1,f.path,!1)}function n(f){return u(f.line.width,f.ysizemode,f.y0,f.y1,f.path,!0)}function u(f,h,d,p,g,m){var y=f/2,_=m;if(h==="pixel"){var v=g?o.extractPathCoords(g,m?i.paramIsY:i.paramIsX):[d,p],x=t.aggNums(Math.max,null,v),E=t.aggNums(Math.min,null,v),M=E<0?Math.abs(E)+y:y,C=x>0?x+y:y;return{ppad:y,ppadplus:_?M:C,ppadminus:_?C:M}}else return{ppad:y}}function c(f,h,d){var p=f._id.charAt(0)==="x"?"x":"y",g=f.type==="category"||f.type==="multicategory",m,y,_=0,v=0,x=g?f.r2c:f.d2c,E=h[p+"sizemode"]==="scaled";if(E?(m=h[p+"0"],y=h[p+"1"],g&&(_=h[p+"0shift"],v=h[p+"1shift"])):(m=h[p+"anchor"],y=h[p+"anchor"]),m!==void 0)return[x(m)+_,x(y)+v];if(h.path){var M=1/0,C=-1/0,w=h.path.match(i.segmentRE),k,T,b,S,A;for(f.type==="date"&&(x=o.decodeDate(x)),k=0;kC&&(C=A)));if(C>=M)return[M,C]}}}}),Zte=ye({"src/components/shapes/index.js"(e,r){"use strict";var t=CA();r.exports={moduleType:"component",name:"shapes",layoutAttributes:k9(),supplyLayoutDefaults:$te(),supplyDrawNewShapeDefaults:Yte(),includeBasePlot:tb()("shapes"),calcAutorange:Xte(),draw:t.draw,drawOne:t.drawOne}}}),C9=ye({"src/components/images/attributes.js"(e,r){"use strict";var t=$l(),a=ko().templatedArray,i=eb();r.exports=a("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",t.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",t.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),Kte=ye({"src/components/images/defaults.js"(e,r){"use strict";var t=Yt(),a=qi(),i=Oc(),o=C9(),s="images";r.exports=function(u,c){var f={name:s,handleItemDefaults:l};i(u,c,f)};function l(n,u,c){function f(x,E){return t.coerce(n,u,o,x,E)}var h=f("source"),d=f("visible",!!h);if(!d)return u;f("layer"),f("xanchor"),f("yanchor"),f("sizex"),f("sizey"),f("sizing"),f("opacity");for(var p={_fullLayout:c},g=["x","y"],m=0;m<2;m++){var y=g[m],_=a.coerceRef(n,u,p,y,"paper",void 0);if(_!=="paper"){var v=a.getFromId(p,_);v._imgIndices.push(u._index)}a.coercePosition(u,p,f,_,y,0)}return u}}}),Jte=ye({"src/components/images/draw.js"(e,r){"use strict";var t=ai(),a=$i(),i=qi(),o=Gs(),s=Sd();r.exports=function(n){var u=n._fullLayout,c=[],f={},h=[],d,p;for(p=0;p0);g&&(d("active"),d("direction"),d("type"),d("showactive"),d("x"),d("y"),t.noneOrAll(c,f,["x","y"]),d("xanchor"),d("yanchor"),d("pad.t"),d("pad.r"),d("pad.b"),d("pad.l"),t.coerceFont(d,"font",h.font),d("bgcolor",h.paper_bgcolor),d("bordercolor"),d("borderwidth"))}function u(c,f){function h(p,g){return t.coerce(c,f,l,p,g)}var d=h("visible",c.method==="skip"||Array.isArray(c.args));d&&(h("method"),h("args"),h("args2"),h("label"),h("execute"))}}}),rre=ye({"src/components/updatemenus/scrollbox.js"(e,r){"use strict";r.exports=s;var t=ai(),a=Ya(),i=$i(),o=Yt();function s(l,n,u){this.gd=l,this.container=n,this.id=u,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})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(n,u,c){var f=this.gd._fullLayout,h=f.width,d=f.height;this.position=n;var p=this.position.l,g=this.position.w,m=this.position.t,y=this.position.h,_=this.position.direction,v=_==="down",x=_==="left",E=_==="right",M=_==="up",C=g,w=y,k,T,b,S;!v&&!x&&!E&&!M&&(this.position.direction="down",v=!0);var A=v||M;A?(k=p,T=k+C,v?(b=m,S=Math.min(b+w,d),w=S-b):(S=m+w,b=Math.max(S-w,0),w=S-b)):(b=m,S=b+w,x?(T=p+C,k=Math.max(T-C,0),C=T-k):(k=p,T=Math.min(k+C,h),C=T-k)),this._box={l:k,t:b,w:C,h:w};var F=g>C,D=s.barLength+2*s.barPad,R=s.barWidth+2*s.barPad,P=p,z=m+y;z+R>d&&(z=d-R);var I=this.container.selectAll("rect.scrollbar-horizontal").data(F?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,s.barColor),F?(this.hbar=I.attr({rx:s.barRadius,ry:s.barRadius,x:P,y:z,width:D,height:R}),this._hbarXMin=P+D/2,this._hbarTranslateMax=C-D):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=y>w,B=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,G=p+g,$=m;G+B>h&&(G=h-B);var X=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);X.exit().on(".drag",null).remove(),X.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,s.barColor),L?(this.vbar=X.attr({rx:s.barRadius,ry:s.barRadius,x:G,y:$,width:B,height:O}),this._vbarYMin=$+O/2,this._vbarTranslateMax=w-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var Z=this.id,J=k-.5,N=L?T+B+.5:T+.5,H=b-.5,W=F?S+R+.5:S+.5,U=f._topdefs.selectAll("#"+Z).data(F||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",Z).append("rect"),F||L?(this._clipRect=U.select("rect").attr({x:Math.floor(J),y:Math.floor(H),width:Math.ceil(N)-Math.floor(J),height:Math.ceil(W)-Math.floor(H)}),this.container.call(i.setClipUrl,Z,this.gd),this.bg.attr({x:p,y:m,width:g,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),F||L){var V=t.behavior.drag().on("dragstart",function(){t.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var j=t.behavior.drag().on("dragstart",function(){t.event.sourceEvent.preventDefault(),t.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));F&&this.hbar.on(".drag",null).call(j),L&&this.vbar.on(".drag",null).call(j)}this.setTranslate(u,c)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.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)},s.prototype._onBoxDrag=function(){var n=this.translateX,u=this.translateY;this.hbar&&(n-=t.event.dx),this.vbar&&(u-=t.event.dy),this.setTranslate(n,u)},s.prototype._onBoxWheel=function(){var n=this.translateX,u=this.translateY;this.hbar&&(n+=t.event.deltaY),this.vbar&&(u+=t.event.deltaY),this.setTranslate(n,u)},s.prototype._onBarDrag=function(){var n=this.translateX,u=this.translateY;if(this.hbar){var c=n+this._hbarXMin,f=c+this._hbarTranslateMax,h=o.constrain(t.event.x,c,f),d=(h-c)/(f-c),p=this.position.w-this._box.w;n=d*p}if(this.vbar){var g=u+this._vbarYMin,m=g+this._vbarTranslateMax,y=o.constrain(t.event.y,g,m),_=(y-g)/(m-g),v=this.position.h-this._box.h;u=_*v}this.setTranslate(n,u)},s.prototype.setTranslate=function(n,u){var c=this.position.w-this._box.w,f=this.position.h-this._box.h;if(n=o.constrain(n||0,0,c),u=o.constrain(u||0,0,f),this.translateX=n,this.translateY=u,this.container.call(i.setTranslate,this._box.l-this.position.l-n,this._box.t-this.position.t-u),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+n-.5),y:Math.floor(this.position.t+u-.5)}),this.hbar){var h=n/c;this.hbar.call(i.setTranslate,n+h*this._hbarTranslateMax,u)}if(this.vbar){var d=u/f;this.vbar.call(i.setTranslate,n,u+d*this._vbarTranslateMax)}}}}),are=ye({"src/components/updatemenus/draw.js"(e,r){"use strict";var t=ai(),a=ws(),i=Ya(),o=$i(),s=Yt(),l=Go(),n=ko().arrayEditor,u=Yl().LINE_SPACING,c=jA(),f=rre();r.exports=function(D){var R=D._fullLayout,P=s.filterVisible(R[c.name]);function z(Z){a.autoMargin(D,b(Z))}var I=R._menulayer.selectAll("g."+c.containerClassName).data(P.length>0?[0]:[]);if(I.enter().append("g").classed(c.containerClassName,!0).style("cursor","pointer"),I.exit().each(function(){t.select(this).selectAll("g."+c.headerGroupClassName).each(z)}).remove(),P.length!==0){var L=I.selectAll("g."+c.headerGroupClassName).data(P,h);L.enter().append("g").classed(c.headerGroupClassName,!0);for(var B=s.ensureSingle(I,"g",c.dropdownButtonGroupClassName,function(Z){Z.style("pointer-events","all")}),O=0;O0?[0]:[]);G.enter().append("g").classed(c.containerClassName,!0).style("cursor",L?null:"ew-resize");function $(N){N._commandObserver&&(N._commandObserver.remove(),delete N._commandObserver),a.autoMargin(I,g(N))}if(G.exit().each(function(){t.select(this).selectAll("g."+c.groupClassName).each($)}).remove(),O.length!==0){var X=G.selectAll("g."+c.groupClassName).data(O,y);X.enter().append("g").classed(c.groupClassName,!0),X.exit().each($).remove();for(var Z=0;Z0&&(X=X.transition().duration(I.transition.duration).ease(I.transition.easing)),X.attr("transform",l($-c.gripWidth*.5,I._dims.currentValueTotalHeight))}}function F(z,I){var L=z._dims;return L.inputAreaStart+c.stepInset+(L.inputAreaLength-2*c.stepInset)*Math.min(1,Math.max(0,I))}function D(z,I){var L=z._dims;return Math.min(1,Math.max(0,(I-c.stepInset-L.inputAreaStart)/(L.inputAreaLength-2*c.stepInset-2*L.inputAreaStart)))}function R(z,I,L){var B=L._dims,O=s.ensureSingle(z,"rect",c.railTouchRectClass,function(G){G.call(T,I,z,L).style("pointer-events","all")});O.attr({width:B.inputAreaLength,height:Math.max(B.inputAreaWidth,c.tickOffset+L.ticklen+B.labelHeight)}).call(i.fill,L.bgcolor).attr("opacity",0),o.setTranslate(O,0,B.currentValueTotalHeight)}function P(z,I){var L=I._dims,B=L.inputAreaLength-c.railInset*2,O=s.ensureSingle(z,"rect",c.railRectClass);O.attr({width:B,height:c.railWidth,rx:c.railRadius,ry:c.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,I.bordercolor).call(i.fill,I.bgcolor).style("stroke-width",I.borderwidth+"px"),o.setTranslate(O,c.railInset,(L.inputAreaWidth-c.railWidth)*.5+L.currentValueTotalHeight)}}}),sre=ye({"src/components/sliders/index.js"(e,r){"use strict";var t=ib();r.exports={moduleType:"component",name:t.name,layoutAttributes:L9(),supplyLayoutDefaults:nre(),draw:ore()}}}),UA=ye({"src/components/rangeslider/attributes.js"(e,r){"use strict";var t=Wl();r.exports={bgcolor:{valType:"color",dflt:t.background,editType:"plot"},bordercolor:{valType:"color",dflt:t.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"}}}),F9=ye({"src/components/rangeslider/oppaxis_attributes.js"(e,r){"use strict";r.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"}}}),qA=ye({"src/components/rangeslider/constants.js"(e,r){"use strict";r.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}}}),lre=ye({"src/components/rangeslider/helpers.js"(e){"use strict";var r=Gs(),t=Go(),a=qA(),i=Yl().LINE_SPACING,o=a.name;function s(l){var n=l&&l[o];return n&&n.visible}e.isVisible=s,e.makeData=function(l){for(var n=r.list({_fullLayout:l},"x",!0),u=l.margin,c=[],f=0;f=xe.max)pe=re[we+1];else if(fe=xe.pmax)pe=re[we+1];else if(fe0?T.touches[0].clientX:0}function m(T,b,S,A){if(b._context.staticPlot)return;var F=T.select("rect."+p.slideBoxClassName).node(),D=T.select("rect."+p.grabAreaMinClassName).node(),R=T.select("rect."+p.grabAreaMaxClassName).node();function P(){var z=t.event,I=z.target,L=g(z),B=L-T.node().getBoundingClientRect().left,O=A.d2p(S._rl[0]),G=A.d2p(S._rl[1]),$=h.coverSlip();this.addEventListener("touchmove",X),this.addEventListener("touchend",Z),$.addEventListener("mousemove",X),$.addEventListener("mouseup",Z);function X(J){var N=g(J),H=+N-L,W,U,V;switch(I){case F:if(V="ew-resize",O+H>S._length||G+H<0)return;W=O+H,U=G+H;break;case D:if(V="col-resize",O+H>S._length)return;W=O+H,U=G;break;case R:if(V="col-resize",G+H<0)return;W=O,U=G+H;break;default:V="ew-resize",W=B,U=B+H;break}if(U0);if(x){var E=u(h,d,p);_("x",E[0]),_("y",E[1]),t.noneOrAll(f,h,["x","y"]),_("xanchor"),_("yanchor"),t.coerceFont(_,"font",d.font);var M=_("bgcolor");_("activecolor",a.contrast(M,l.lightAmount,l.darkAmount)),_("bordercolor"),_("borderwidth")}};function n(c,f,h,d){var p=d.calendar;function g(_,v){return t.coerce(c,f,s.buttons,_,v)}var m=g("visible");if(m){var y=g("step");y!=="all"&&(p&&p!=="gregorian"&&(y==="month"||y==="year")?f.stepmode="backward":g("stepmode"),g("count")),g("label")}}function u(c,f,h){for(var d=h.filter(function(y){return f[y].anchor===c._id}),p=0,g=0;g1)){delete p.grid;return}if(!_&&!v&&!x){var S=k("pattern")==="independent";S&&(_=!0)}w._hasSubplotGrid=_;var A=k("roworder"),F=A==="top to bottom",D=_?.2:.1,R=_?.3:.1,P,z;E&&p._splomGridDflt&&(P=p._splomGridDflt.xside,z=p._splomGridDflt.yside),w._domains={x:c("x",k,D,P,b),y:c("y",k,R,z,T,F)}}function c(d,p,g,m,y,_){var v=p(d+"gap",g),x=p("domain."+d);p(d+"side",m);for(var E=new Array(y),M=x[0],C=(x[1]-M)/(y-v),w=C*(1-v),k=0;k0,m=n._context.staticPlot;u.each(function(y){var _=y[0].trace,v=_.error_x||{},x=_.error_y||{},E;_.ids&&(E=function(k){return k.id});var M=o.hasMarkers(_)&&_.marker.maxdisplayed>0;!x.visible&&!v.visible&&(y=[]);var C=t.select(this).selectAll("g.errorbar").data(y,E);if(C.exit().remove(),!!y.length){v.visible||C.selectAll("path.xerror").remove(),x.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var w=C.enter().append("g").classed("errorbar",!0);g&&w.style("opacity",0).transition().duration(f.duration).style("opacity",1),i.setClipUrl(C,c.layerClipId,n),C.each(function(k){var T=t.select(this),b=s(k,d,p);if(!(M&&!k.vis)){var S,A=T.select("path.yerror");if(x.visible&&a(b.x)&&a(b.yh)&&a(b.ys)){var F=x.width;S="M"+(b.x-F)+","+b.yh+"h"+2*F+"m-"+F+",0V"+b.ys,b.noYS||(S+="m-"+F+",0h"+2*F),h=!A.size(),h?A=T.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):g&&(A=A.transition().duration(f.duration).ease(f.easing)),A.attr("d",S)}else A.remove();var D=T.select("path.xerror");if(v.visible&&a(b.y)&&a(b.xh)&&a(b.xs)){var R=(v.copy_ystyle?x:v).width;S="M"+b.xh+","+(b.y-R)+"v"+2*R+"m0,-"+R+"H"+b.xs,b.noXS||(S+="m0,-"+R+"v"+2*R),h=!D.size(),h?D=T.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):g&&(D=D.transition().duration(f.duration).ease(f.easing)),D.attr("d",S)}else D.remove()}})}})};function s(l,n,u){var c={x:n.c2p(l.x),y:u.c2p(l.y)};return l.yh!==void 0&&(c.yh=u.c2p(l.yh),c.ys=u.c2p(l.ys),a(c.ys)||(c.noYS=!0,c.ys=u.c2p(l.ys,!0))),l.xh!==void 0&&(c.xh=n.c2p(l.xh),c.xs=n.c2p(l.xs),a(c.xs)||(c.noXS=!0,c.xs=n.c2p(l.xs,!0))),c}}}),xre=ye({"src/components/errorbars/style.js"(e,r){"use strict";var t=ai(),a=Ya();r.exports=function(o){o.each(function(s){var l=s[0].trace,n=l.error_y||{},u=l.error_x||{},c=t.select(this);c.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(a.stroke,n.color),u.copy_ystyle&&(u=n),c.selectAll("path.xerror").style("stroke-width",u.thickness+"px").call(a.stroke,u.color)})}}}),bre=ye({"src/components/errorbars/index.js"(e,r){"use strict";var t=Yt(),a=Cs().overrideAll,i=R9(),o={error_x:t.extendFlat({},i),error_y:t.extendFlat({},i)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:t.extendFlat({},i),error_y:t.extendFlat({},i),error_z:t.extendFlat({},i)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,r.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:a(s,"calc","nested"),scattergl:a(o,"calc","nested")}},supplyDefaults:gre(),calc:yre(),makeComputeError:z9(),plot:_re(),style:xre(),hoverInfo:l};function l(n,u,c){(u.error_y||{}).visible&&(c.yerr=n.yh-n.y,u.error_y.symmetric||(c.yerrneg=n.y-n.ys)),(u.error_x||{}).visible&&(c.xerr=n.xh-n.x,u.error_x.symmetric||(c.xerrneg=n.x-n.xs))}}}),wre=ye({"src/components/colorbar/constants.js"(e,r){"use strict";r.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"}}}}),Are=ye({"src/components/colorbar/draw.js"(e,r){"use strict";var t=ai(),a=ws(),i=li(),o=qi(),s=_f(),l=Yt(),n=l.strTranslate,u=Xi().extendFlat,c=rp(),f=$i(),h=Ya(),d=Cm(),p=Go(),g=xc().flipScale,m=ab(),y=BA(),_=Gu(),v=Yl(),x=v.LINE_SPACING,E=v.FROM_TL,M=v.FROM_BR,C=wre().cn;function w(R){var P=R._fullLayout,z=P._infolayer.selectAll("g."+C.colorbar).data(k(R),function(I){return I._id});z.enter().append("g").attr("class",function(I){return I._id}).classed(C.colorbar,!0),z.each(function(I){var L=t.select(this);l.ensureSingle(L,"rect",C.cbbg),l.ensureSingle(L,"g",C.cbfills),l.ensureSingle(L,"g",C.cblines),l.ensureSingle(L,"g",C.cbaxis,function(O){O.classed(C.crisp,!0)}),l.ensureSingle(L,"g",C.cbtitleunshift,function(O){O.append("g").classed(C.cbtitle,!0)}),l.ensureSingle(L,"rect",C.cboutline);var B=S(L,I,R);B&&B.then&&(R._promises||[]).push(B),R._context.edits.colorbarPosition&&A(L,I,R)}),z.exit().each(function(I){a.autoMargin(R,I._id)}).remove(),z.order()}function k(R){var P=R._fullLayout,z=R.calcdata,I=[],L,B,O,G;function $(Y){return u(Y,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function X(){typeof G.calc=="function"?G.calc(R,O,L):(L._fillgradient=B.reversescale?g(B.colorscale):B.colorscale,L._zrange=[B[G.min],B[G.max]])}for(var Z=0;Z[Math.min(R[0]+P,R[1]),R[1]],b=(R,P)=>[R[0],Math.max(R[1]-P,R[0])];function S(R,P,z){var I=P.orientation==="v",L=P.len,B=P.lenmode,O=P.thickness,G=P.thicknessmode,$=P.outlinewidth,X=P.borderwidth,Z=P.bgcolor,J=P.xanchor,N=P.yanchor,H=P.xpad,W=P.ypad,U=P.x,V=I?P.y:1-P.y,j=P.yref==="paper",q=P.xref==="paper",Y=z._fullLayout,K=Y._size,re=P._fillcolor,se=P._line,le=P.title,ue=le.side,fe=P._zrange||t.extent((typeof re=="function"?re:se.color).domain()),pe=typeof se.color=="function"?se.color:function(){return se.color},we=typeof re=="function"?re:function(){return re},xe=P._levels,he=F(z,P,fe),oe=he.fill,te=he.line,ie=Math.round(O*(G==="fraction"?I?K.w:K.h:1)),ee=ie/(I?K.w:K.h),ce=Math.round(L*(B==="fraction"?I?K.h:K.w:1)),_e=ce/(I?K.h:K.w),Se=q?K.w:z._fullLayout.width,Me=j?K.h:z._fullLayout.height,Ue=Math.round(I?U*Se+H:V*Me+W),Ge={center:.5,right:1}[J]||0,Ze={top:1,middle:.5}[N]||0,Ke=I?U-Ge*ee:V-Ze*ee,dt=I?V-Ze*_e:U-Ge*_e,_t=Math.round(I?Me*(1-dt):Se*dt);P._lenFrac=_e,P._thickFrac=ee,P._uFrac=Ke,P._vFrac=dt;var Pt=P._axis=D(z,P,fe);Pt.position=ee+(I?U+H/K.w:V+W/K.h);var pt=["top","bottom"].indexOf(ue)!==-1;if(I&&pt&&(Pt.title.side=ue,Pt.titlex=U+H/K.w,Pt.titley=dt+(le.side==="top"?_e-W/K.h:W/K.h)),!I&&!pt&&(Pt.title.side=ue,Pt.titley=V+W/K.h,Pt.titlex=dt+H/K.w),se.color&&P.tickmode==="auto"){Pt.tickmode="linear",Pt.tick0=xe.start;var Tt=xe.size,st=l.constrain(ce/50,4,15)+1,Ve=(fe[1]-fe[0])/((P.nticks||st)*Tt);if(Ve>1){var Ye=Math.pow(10,Math.floor(Math.log(Ve)/Math.LN10));Tt*=Ye*l.roundUp(Ve/Ye,[2,5,10]),(Math.abs(xe.start)/xe.size+1e-6)%1<2e-6&&(Pt.tick0=0)}Pt.dtick=Tt}var me=I?W/K.h:H/K.w;Pt.domain=b(T([dt,dt+_e],me),me),Pt.setScale(),R.attr("transform",n(Math.round(K.l),Math.round(K.t)));var be=R.select("."+C.cbtitleunshift).attr("transform",n(-Math.round(K.l),-Math.round(K.t))),Ee=Pt.ticklabelposition,De=Pt.title.font.size,Ce=R.select("."+C.cbaxis),Fe,Je=0,qe=0;function at(qt,ar){var vt={propContainer:Pt,propName:P._propPrefix+"title.text",traceIndex:P._traceIndex,_meta:P._meta,placeholder:Y._dfltTitle.colorbar,containerGroup:R.select("."+C.cbtitle)},gt=qt.charAt(0)==="h"?qt.slice(1):"h"+qt;R.selectAll("."+gt+",."+gt+"-math-group").remove(),d.draw(z,qt,u(vt,ar||{}))}function tt(){if(I&&pt||!I&&!pt){var qt,ar;ue==="top"&&(qt=H+K.l+Se*U,ar=W+K.t+Me*(1-dt-_e)+3+De*.75),ue==="bottom"&&(qt=H+K.l+Se*U,ar=W+K.t+Me*(1-dt)-3-De*.25),ue==="right"&&(ar=W+K.t+Me*V+3+De*.75,qt=H+K.l+Se*dt),at(Pt._id+"title",{attributes:{x:qt,y:ar,"text-anchor":I?"start":"middle"}})}}function ct(){if(I&&!pt||!I&&pt){var qt=Pt.position||0,ar=Pt._offset+Pt._length/2,vt,gt;if(ue==="right")gt=ar,vt=K.l+Se*qt+10+De*(Pt.showticklabels?1:.5);else if(vt=ar,ue==="bottom"&&(gt=K.t+Me*qt+10+(Ee.indexOf("inside")===-1?Pt.tickfont.size:0)+(Pt.ticks!=="inside"&&P.ticklen||0)),ue==="top"){var St=le.text.split("
").length;gt=K.t+Me*qt+10-ie-x*De*St}at((I?"h":"v")+Pt._id+"title",{avoid:{selection:t.select(z).selectAll("g."+Pt._id+"tick"),side:ue,offsetTop:I?0:K.t,offsetLeft:I?K.l:0,maxShift:I?Y.width:Y.height},attributes:{x:vt,y:gt,"text-anchor":"middle"},transform:{rotate:I?-90:0,offset:0}})}}function At(){if(!I&&!pt||I&&pt){var qt=R.select("."+C.cbtitle),ar=qt.select("text"),vt=[-$/2,$/2],gt=qt.select(".h"+Pt._id+"title-math-group").node(),St=15.6;ar.node()&&(St=parseInt(ar.node().style.fontSize,10)*x);var Dt;if(gt?(Dt=f.bBox(gt),qe=Dt.width,Je=Dt.height,Je>St&&(vt[1]-=(Je-St)/2)):ar.node()&&!ar.classed(C.jsPlaceholder)&&(Dt=f.bBox(ar.node()),qe=Dt.width,Je=Dt.height),I){if(Je){if(Je+=5,ue==="top")Pt.domain=b(Pt.domain,Je/K.h),vt[1]*=-1;else{Pt.domain=T(Pt.domain,Je/K.h);var kt=p.lineCount(ar);vt[1]+=(1-kt)*St}qt.attr("transform",n(vt[0],vt[1])),Pt.setScale()}}else qe&&(ue==="right"&&(Pt.domain=T(Pt.domain,(qe+De/2)/K.w)),qt.attr("transform",n(vt[0],vt[1])),Pt.setScale())}R.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",I?n(0,Math.round(K.h*(1-Pt.domain[1]))):n(Math.round(K.w*Pt.domain[0]),0)),Ce.attr("transform",I?n(0,Math.round(-K.t)):n(Math.round(-K.l),0));var Vt=R.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(oe);Vt.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Vt.exit().remove();var lr=fe.map(Pt.c2p).map(Math.round).sort(function(la,Hr){return la-Hr});Vt.each(function(la,Hr){var jr=[Hr===0?fe[0]:(oe[Hr]+oe[Hr-1])/2,Hr===oe.length-1?fe[1]:(oe[Hr]+oe[Hr+1])/2].map(Pt.c2p).map(Math.round);I&&(jr[1]=l.constrain(jr[1]+(jr[1]>jr[0])?1:-1,lr[0],lr[1]));var Oa=t.select(this).attr(I?"x":"y",Ue).attr(I?"y":"x",t.min(jr)).attr(I?"width":"height",Math.max(ie,2)).attr(I?"height":"width",Math.max(t.max(jr)-t.min(jr),2));if(P._fillgradient)f.gradient(Oa,z,P._id,I?"vertical":"horizontalreversed",P._fillgradient,"fill");else{var Da=we(la).replace("e-","");Oa.attr("fill",h.hexString(Da))}});var dr=R.select("."+C.cblines).selectAll("path."+C.cbline).data(se.color&&se.width?te:[]);dr.enter().append("path").classed(C.cbline,!0),dr.exit().remove(),dr.each(function(la){var Hr=Ue,jr=Math.round(Pt.c2p(la))+se.width/2%1;t.select(this).attr("d","M"+(I?Hr+","+jr:jr+","+Hr)+(I?"h":"v")+ie).call(f.lineGroupStyle,se.width,pe(la),se.dash)}),Ce.selectAll("g."+Pt._id+"tick,path").remove();var yr=Ue+ie+($||0)/2-(P.ticks==="outside"?1:0),vr=o.calcTicks(Pt),Fr=o.getTickSigns(Pt)[2];return o.drawTicks(z,Pt,{vals:Pt.ticks==="inside"?o.clipEnds(Pt,vr):vr,layer:Ce,path:o.makeTickPath(Pt,yr,Fr),transFn:o.makeTransTickFn(Pt)}),o.drawLabels(z,Pt,{vals:vr,layer:Ce,transFn:o.makeTransTickLabelFn(Pt),labelFns:o.makeLabelFns(Pt,yr)})}function ft(){var qt,ar=ie+$/2;Ee.indexOf("inside")===-1&&(qt=f.bBox(Ce.node()),ar+=I?qt.width:qt.height),Fe=be.select("text");var vt=0,gt=I&&ue==="top",St=!I&&ue==="right",Dt=0;if(Fe.node()&&!Fe.classed(C.jsPlaceholder)){var kt,Vt=be.select(".h"+Pt._id+"title-math-group").node();Vt&&(I&&pt||!I&&!pt)?(qt=f.bBox(Vt),vt=qt.width,kt=qt.height):(qt=f.bBox(be.node()),vt=qt.right-K.l-(I?Ue:_t),kt=qt.bottom-K.t-(I?_t:Ue),!I&&ue==="top"&&(ar+=qt.height,Dt=qt.height)),St&&(Fe.attr("transform",n(vt/2+De/2,0)),vt*=2),ar=Math.max(ar,I?vt:kt)}var lr=(I?H:W)*2+ar+X+$/2,dr=0;!I&&le.text&&N==="bottom"&&V<=0&&(dr=lr/2,lr+=dr,Dt+=dr),Y._hColorbarMoveTitle=dr,Y._hColorbarMoveCBTitle=Dt;var yr=X+$,vr=(I?Ue:_t)-yr/2-(I?H:0),Fr=(I?_t:Ue)-(I?ce:W+Dt-dr);R.select("."+C.cbbg).attr("x",vr).attr("y",Fr).attr(I?"width":"height",Math.max(lr-dr,2)).attr(I?"height":"width",Math.max(ce+yr,2)).call(h.fill,Z).call(h.stroke,P.bordercolor).style("stroke-width",X);var la=St?Math.max(vt-10,0):0;R.selectAll("."+C.cboutline).attr("x",(I?Ue:_t+H)+la).attr("y",(I?_t+W-ce:Ue)+(gt?Je:0)).attr(I?"width":"height",Math.max(ie,2)).attr(I?"height":"width",Math.max(ce-(I?2*W+Je:2*H+la),2)).call(h.stroke,P.outlinecolor).style({fill:"none","stroke-width":$});var Hr=I?Ge*lr:0,jr=I?0:(1-Ze)*lr-Dt;if(Hr=q?K.l-Hr:-Hr,jr=j?K.t-jr:-jr,R.attr("transform",n(Hr,jr)),!I&&(X||h.opacity(Z)&&!h.equals(Y.paper_bgcolor,Z))){var Oa=Ce.selectAll("text"),Da=Oa[0].length,_i=R.select("."+C.cbbg).node(),ti=f.bBox(_i),Ka=f.getTranslate(R),ia=2;Oa.each(function(zt,Gt){var Ht=0,Be=Da-1;if(Gt===Ht||Gt===Be){var et=f.bBox(this),ut=f.getTranslate(this),bt;if(Gt===Be){var Ot=et.right+ut.x,It=ti.right+Ka.x+_t-X-ia+U;bt=It-Ot,bt>0&&(bt=0)}else if(Gt===Ht){var Wt=et.left+ut.x,jt=ti.left+Ka.x+_t+X+ia;bt=jt-Wt,bt<0&&(bt=0)}bt&&(Da<3?this.setAttribute("transform","translate("+bt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var na={},xi=E[J],Yi=M[J],Qr=E[N],Nr=M[N],Oe=lr-ie;I?(B==="pixels"?(na.y=V,na.t=ce*Qr,na.b=ce*Nr):(na.t=na.b=0,na.yt=V+L*Qr,na.yb=V-L*Nr),G==="pixels"?(na.x=U,na.l=lr*xi,na.r=lr*Yi):(na.l=Oe*xi,na.r=Oe*Yi,na.xl=U-O*xi,na.xr=U+O*Yi)):(B==="pixels"?(na.x=U,na.l=ce*xi,na.r=ce*Yi):(na.l=na.r=0,na.xl=U+L*xi,na.xr=U-L*Yi),G==="pixels"?(na.y=1-V,na.t=lr*Qr,na.b=lr*Nr):(na.t=Oe*Qr,na.b=Oe*Nr,na.yt=V-O*Qr,na.yb=V+O*Nr));var Ie=P.y<.5?"b":"t",Et=P.x<.5?"l":"r";z._fullLayout._reservedMargin[P._id]={};var Mt={r:Y.width-vr-Hr,l:vr+na.r,b:Y.height-Fr-jr,t:Fr+na.b};q&&j?a.autoMargin(z,P._id,na):q?z._fullLayout._reservedMargin[P._id][Ie]=Mt[Ie]:j||I?z._fullLayout._reservedMargin[P._id][Et]=Mt[Et]:z._fullLayout._reservedMargin[P._id][Ie]=Mt[Ie]}return l.syncOrAsync([a.previousPromises,tt,At,ct,a.previousPromises,ft],z)}function A(R,P,z){var I=P.orientation==="v",L=z._fullLayout,B=L._size,O,G,$;s.init({element:R.node(),gd:z,prepFn:function(){O=R.attr("transform"),c(R)},moveFn:function(X,Z){R.attr("transform",O+n(X,Z)),G=s.align((I?P._uFrac:P._vFrac)+X/B.w,I?P._thickFrac:P._lenFrac,0,1,P.xanchor),$=s.align((I?P._vFrac:1-P._uFrac)-Z/B.h,I?P._lenFrac:P._thickFrac,0,1,P.yanchor);var J=s.getCursor(G,$,P.xanchor,P.yanchor);c(R,J)},doneFn:function(){if(c(R),G!==void 0&&$!==void 0){var X={};X[P._propPrefix+"x"]=G,X[P._propPrefix+"y"]=$,P._traceIndex!==void 0?i.call("_guiRestyle",z,X,P._traceIndex):i.call("_guiRelayout",z,X)}}})}function F(R,P,z){var I=P._levels,L=[],B=[],O,G,$=I.end+I.size/100,X=I.size,Z=1.001*z[0]-.001*z[1],J=1.001*z[1]-.001*z[0];for(G=0;G<1e5&&(O=I.start+G*X,!(X>0?O>=$:O<=$));G++)O>Z&&O0?O>=$:O<=$));G++)O>z[0]&&O-1}r.exports=function(u,c){var f,h=u.data,d=u.layout,p=o([],h),g=o({},d,s(c.tileClass)),m=u._context||{};if(c.width&&(g.width=c.width),c.height&&(g.height=c.height),c.tileClass==="thumbnail"||c.tileClass==="themes__thumb"){g.annotations=[];var y=Object.keys(g);for(f=0;f=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&t(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function g(m,y,_,v,x,E){E=E||{};var M=E.moduleHasSelected!==!1,C=E.moduleHasUnselected!==!1,w=E.moduleHasConstrain!==!1,k=E.moduleHasCliponaxis!==!1,T=E.moduleHasTextangle!==!1,b=E.moduleHasInsideanchor!==!1,S=!!E.hasPathbar,A=Array.isArray(x)||x==="auto",F=A||x==="inside",D=A||x==="outside";if(F||D){var R=f(v,"textfont",_.font),P=a.extendFlat({},R),z=m.textfont&&m.textfont.color,I=!z;if(I&&delete P.color,f(v,"insidetextfont",P),S){var L=a.extendFlat({},R);I&&delete L.color,f(v,"pathbar.textfont",L)}D&&f(v,"outsidetextfont",R),M&&v("selected.textfont.color"),C&&v("unselected.textfont.color"),w&&v("constraintext"),k&&v("cliponaxis"),T&&v("textangle"),v("texttemplate"),v("texttemplatefallback")}F&&b&&v("insidetextanchor")}r.exports={supplyDefaults:h,crossTraceDefaults:d,handleText:g,validateCornerradius:p}}}),O9=ye({"src/traces/bar/layout_defaults.js"(e,r){"use strict";var t=li(),a=qi(),i=Yt(),o=GA(),s=Oh().validateCornerradius;r.exports=function(l,n,u){function c(M,C){return i.coerce(l,n,o,M,C)}for(var f=!1,h=!1,d=!1,p={},g=c("barmode"),m=g==="group",y=0;y0&&!p[v]&&(d=!0),p[v]=!0),_.visible&&_.type==="histogram"){var x=a.getFromId({_fullLayout:n},_[_.orientation==="v"?"xaxis":"yaxis"]);x.type!=="category"&&(h=!0)}}if(!f){delete n.barmode;return}g!=="overlay"&&c("barnorm"),c("bargap",h&&!d?0:.2),c("bargroupgap");var E=c("barcornerradius");n.barcornerradius=s(E)}}}),nb=ye({"src/traces/bar/arrays_to_calcdata.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o){for(var s=0;sn;if(!u)return o}return s!==void 0?s:i.dflt},e.coerceColor=function(i,o,s){return r.isValid(o)?o:s!==void 0?s:i.dflt},e.coerceEnumerated=function(i,o,s){return i.coerceNumber&&(o=+o),i.values.indexOf(o)!==-1?o:s!==void 0?s:i.dflt},e.getValue=function(i,o){var s;return a(i)?o1||S.bargap===0&&S.bargroupgap===0&&!A[0].trace.marker.line.width)&&t.select(this).attr("shape-rendering","crispEdges")}),T.selectAll("g.points").each(function(A){var F=t.select(this),D=A[0].trace;p(F,D,k)}),s.getComponentMethod("errorbars","style")(T)}function p(k,T,b){i.pointStyle(k.selectAll("path"),T,b),g(k,T,b)}function g(k,T,b){k.selectAll("text").each(function(S){var A=t.select(this),F=o.ensureUniformFontSize(b,v(A,S,T,b));i.font(A,F)})}function m(k,T,b){var S=T[0].trace;S.selectedpoints?y(b,S,k):(p(b,S,k),s.getComponentMethod("errorbars","style")(b))}function y(k,T,b){i.selectedPointStyle(k.selectAll("path"),T),_(k.selectAll("text"),T,b)}function _(k,T,b){k.each(function(S){var A=t.select(this),F;if(S.selected){F=o.ensureUniformFontSize(b,v(A,S,T,b));var D=T.selected.textfont&&T.selected.textfont.color;D&&(F.color=D),i.font(A,F)}else i.selectedTextStyle(A,T)})}function v(k,T,b,S){var A=S._fullLayout.font,F=b.textfont;if(k.classed("bartext-inside")){var D=w(T,b);F=E(b,T.i,A,D)}else k.classed("bartext-outside")&&(F=M(b,T.i,A));return F}function x(k,T,b){return C(u,k.textfont,T,b)}function E(k,T,b,S){var A=x(k,T,b),F=k._input.textfont===void 0||k._input.textfont.color===void 0||Array.isArray(k.textfont.color)&&k.textfont.color[T]===void 0;return F&&(A={color:a.contrast(S),family:A.family,size:A.size,weight:A.weight,style:A.style,variant:A.variant,textcase:A.textcase,lineposition:A.lineposition,shadow:A.shadow}),C(c,k.insidetextfont,T,A)}function M(k,T,b){var S=x(k,T,b);return C(f,k.outsidetextfont,T,S)}function C(k,T,b,S){T=T||{};var A=h.getValue(T.family,b),F=h.getValue(T.size,b),D=h.getValue(T.color,b),R=h.getValue(T.weight,b),P=h.getValue(T.style,b),z=h.getValue(T.variant,b),I=h.getValue(T.textcase,b),L=h.getValue(T.lineposition,b),B=h.getValue(T.shadow,b);return{family:h.coerceString(k.family,A,S.family),size:h.coerceNumber(k.size,F,S.size),color:h.coerceColor(k.color,D,S.color),weight:h.coerceString(k.weight,R,S.weight),style:h.coerceString(k.style,P,S.style),variant:h.coerceString(k.variant,z,S.variant),textcase:h.coerceString(k.variant,I,S.textcase),lineposition:h.coerceString(k.variant,L,S.lineposition),shadow:h.coerceString(k.variant,B,S.shadow)}}function w(k,T){return T.type==="waterfall"?T[k.dir].marker.color:k.mcc||k.mc||T.marker.color}r.exports={style:d,styleTextPoints:g,styleOnSelect:m,getInsideTextFont:E,getOutsideTextFont:M,getBarColor:w,resizeText:l}}}),Rm=ye({"src/traces/bar/plot.js"(e,r){"use strict";var t=ai(),a=en(),i=Yt(),o=Go(),s=Ya(),l=$i(),n=li(),u=qi().tickText,c=jc(),f=c.recordMinTextSize,h=c.clearMinTextSize,d=Ld(),p=WA(),g=Cv(),m=Gp(),y=m.text,_=m.textposition,v=Bf().appendArrayPointValue,x=g.TEXTPAD;function E(X){return X.id}function M(X){if(X.ids)return E}function C(X){return(X>0)-(X<0)}function w(X,Z){return X0}function S(X,Z,J,N,H,W){var U=Z.xaxis,V=Z.yaxis,j=X._fullLayout,q=X._context.staticPlot;H||(H={mode:j.barmode,norm:j.barmode,gap:j.bargap,groupgap:j.bargroupgap},h("bar",j));var Y=i.makeTraceGroups(N,J,"trace bars").each(function(K){var re=t.select(this),se=K[0].trace,le=K[0].t,ue=se.type==="waterfall",fe=se.type==="funnel",pe=se.type==="histogram",we=se.type==="bar",xe=we||fe,he=0;ue&&se.connector.visible&&se.connector.mode==="between"&&(he=se.connector.line.width/2);var oe=se.orientation==="h",te=b(H),ie=i.ensureSingle(re,"g","points"),ee=M(se),ce=ie.selectAll("g.point").data(i.identity,ee);ce.enter().append("g").classed("point",!0),ce.exit().remove(),ce.each(function(Se,Me){var Ue=t.select(this),Ge=k(Se,U,V,oe),Ze=Ge[0][0],Ke=Ge[0][1],dt=Ge[1][0],_t=Ge[1][1],Pt=(oe?Ke-Ze:_t-dt)===0;Pt&&xe&&p.getLineWidth(se,Se)&&(Pt=!1),Pt||(Pt=!a(Ze)||!a(Ke)||!a(dt)||!a(_t)),Se.isBlank=Pt,Pt&&(oe?Ke=Ze:_t=dt),he&&!Pt&&(oe?(Ze-=w(Ze,Ke)*he,Ke+=w(Ze,Ke)*he):(dt-=w(dt,_t)*he,_t+=w(dt,_t)*he));var pt,Tt;if(se.type==="waterfall"){if(!Pt){var st=se[Se.dir].marker;pt=st.line.width,Tt=st.color}}else pt=p.getLineWidth(se,Se),Tt=Se.mc||se.marker.color;function Ve(dr){var yr=t.round(pt/2%1,2);return H.gap===0&&H.groupgap===0?t.round(Math.round(dr)-yr,2):dr}function Ye(dr,yr,vr){return vr&&dr===yr?dr:Math.abs(dr-yr)>=2?Ve(dr):dr>yr?Math.ceil(dr):Math.floor(dr)}var me=s.opacity(Tt),be=me<1||pt>.01?Ve:Ye;X._context.staticPlot||(Ze=be(Ze,Ke,oe),Ke=be(Ke,Ze,oe),dt=be(dt,_t,!oe),_t=be(_t,dt,!oe));var Ee=oe?U.c2p:V.c2p,De;Se.s0>0?De=Se._sMax:Se.s0<0?De=Se._sMin:De=Se.s1>0?Se._sMax:Se._sMin;function Ce(dr,yr){if(!dr)return 0;var vr=Math.abs(oe?_t-dt:Ke-Ze),Fr=Math.abs(oe?Ke-Ze:_t-dt),la=be(Math.abs(Ee(De,!0)-Ee(0,!0))),Hr=Se.hasB?Math.min(vr/2,Fr/2):Math.min(vr/2,la),jr;if(yr==="%"){var Oa=Math.min(50,dr);jr=vr*(Oa/100)}else jr=dr;return be(Math.max(Math.min(jr,Hr),0))}var Fe=we||pe?Ce(le.cornerradiusvalue,le.cornerradiusform):0,Je,qe,at="M"+Ze+","+dt+"V"+_t+"H"+Ke+"V"+dt+"Z",tt=0;if(Fe&&Se.s){var ct=C(Se.s0)===0||C(Se.s)===C(Se.s0)?Se.s1:Se.s0;if(tt=be(Se.hasB?0:Math.abs(Ee(De,!0)-Ee(ct,!0))),tt0?Math.sqrt(tt*(2*Fe-tt)):0,gt=At>0?Math.max:Math.min;Je="M"+Ze+","+dt+"V"+(_t-ar*ft)+"H"+gt(Ke-(Fe-tt)*At,Ze)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+Ke+","+(_t-Fe*ft-vt)+"V"+(dt+Fe*ft+vt)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+gt(Ke-(Fe-tt)*At,Ze)+","+(dt+ar*ft)+"Z"}else if(Se.hasB)Je="M"+(Ze+Fe*At)+","+dt+"A "+Fe+","+Fe+" 0 0 "+qt+" "+Ze+","+(dt+Fe*ft)+"V"+(_t-Fe*ft)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+(Ze+Fe*At)+","+_t+"H"+(Ke-Fe*At)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+Ke+","+(_t-Fe*ft)+"V"+(dt+Fe*ft)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+(Ke-Fe*At)+","+dt+"Z";else{qe=Math.abs(_t-dt)+tt;var St=qe0?Math.sqrt(tt*(2*Fe-tt)):0,kt=ft>0?Math.max:Math.min;Je="M"+(Ze+St*At)+","+dt+"V"+kt(_t-(Fe-tt)*ft,dt)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+(Ze+Fe*At-Dt)+","+_t+"H"+(Ke-Fe*At+Dt)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+(Ke-St*At)+","+kt(_t-(Fe-tt)*ft,dt)+"V"+dt+"Z"}}else Je=at}else Je=at;var Vt=T(i.ensureSingle(Ue,"path"),j,H,W);if(Vt.style("vector-effect",q?"none":"non-scaling-stroke").attr("d",isNaN((Ke-Ze)*(_t-dt))||Pt&&X._context.staticPlot?"M0,0Z":Je).call(l.setClipUrl,Z.layerClipId,X),!j.uniformtext.mode&&te){var lr=l.makePointStyleFns(se);l.singlePointStyle(Se,Vt,se,lr,X)}A(X,Z,Ue,K,Me,Ze,Ke,dt,_t,Fe,tt,H,W),Z.layerClipId&&l.hideOutsideRangePoint(Se,Ue.select("text"),U,V,se.xcalendar,se.ycalendar)});var _e=se.cliponaxis===!1;l.setClipUrl(re,_e?null:Z.layerClipId,X)});n.getComponentMethod("errorbars","plot")(X,Y,Z,H)}function A(X,Z,J,N,H,W,U,V,j,q,Y,K,re){var se=Z.xaxis,le=Z.yaxis,ue=X._fullLayout,fe;function pe(at,tt,ct){var At=i.ensureSingle(at,"text").text(tt).attr({class:"bartext bartext-"+fe,"text-anchor":"middle","data-notex":1}).call(l.font,ct).call(o.convertToTspans,X);return At}var we=N[0].trace,xe=we.orientation==="h",he=O(N,xe,se,le),oe=L(ue,N,H,se,le);fe=B(we,H);var te=K.mode==="stack"||K.mode==="relative",ie=N[H],ee=!te||ie._outmost,ce=ie.hasB,_e=q&&q-Y>x;if(!oe||fe==="none"||(ie.isBlank||W===U||V===j)&&(fe==="auto"||fe==="inside")){J.select("text").remove();return}var Se=ue.font,Me=d.getBarColor(N[H],we),Ue=d.getInsideTextFont(we,H,Se,Me),Ge=d.getOutsideTextFont(we,H,Se),Ze=we.insidetextanchor||"end",Ke=J.datum();xe?se.type==="log"&&Ke.s0<=0&&(se.range[0]0&&Ye>0,Ee;_e?ce?Ee=F(Pt-2*q,pt,Ve,Ye,xe)||F(Pt,pt-2*q,Ve,Ye,xe):xe?Ee=F(Pt-(q-Y),pt,Ve,Ye,xe)||F(Pt,pt-2*(q-Y),Ve,Ye,xe):Ee=F(Pt,pt-(q-Y),Ve,Ye,xe)||F(Pt-2*(q-Y),pt,Ve,Ye,xe):Ee=F(Pt,pt,Ve,Ye,xe),be&&Ee?fe="inside":(fe="outside",Tt.remove(),Tt=null)}else fe="inside";if(!Tt){me=i.ensureUniformFontSize(X,fe==="outside"?Ge:Ue),Tt=pe(J,oe,me);var De=Tt.attr("transform");if(Tt.attr("transform",""),st=l.bBox(Tt.node()),Ve=st.width,Ye=st.height,Tt.attr("transform",De),Ve<=0||Ye<=0){Tt.remove();return}}var Ce=we.textangle,Fe,Je;fe==="outside"?(Je=we.constraintext==="both"||we.constraintext==="outside",Fe=I(W,U,V,j,st,{isHorizontal:xe,constrained:Je,angle:Ce,zeroBarDir:he})):(Je=we.constraintext==="both"||we.constraintext==="inside",Fe=P(W,U,V,j,st,{isHorizontal:xe,constrained:Je,angle:Ce,anchor:Ze,hasB:ce,r:q,overhead:Y})),Fe.fontSize=me.size,f(we.type==="histogram"?"bar":we.type,Fe,ue),ie.transform=Fe;var qe=T(Tt,ue,K,re);i.setTransormAndDisplay(qe,Fe)}function F(X,Z,J,N,H){if(X<0||Z<0)return!1;var W=J<=X&&N<=Z,U=J<=Z&&N<=X,V=H?X>=J*(Z/N):Z>=N*(X/J);return W||U||V}function D(X){return X==="auto"?0:X}function R(X,Z){var J=Math.PI/180*Z,N=Math.abs(Math.sin(J)),H=Math.abs(Math.cos(J));return{x:X.width*H+X.height*N,y:X.width*N+X.height*H}}function P(X,Z,J,N,H,W){var U=!!W.isHorizontal,V=!!W.constrained,j=W.angle||0,q=W.anchor,Y=q==="end",K=q==="start",re=W.leftToRight||0,se=(re+1)/2,le=1-se,ue=W.hasB,fe=W.r,pe=W.overhead,we=H.width,xe=H.height,he=Math.abs(Z-X),oe=Math.abs(N-J),te=he>2*x&&oe>2*x?x:0;he-=2*te,oe-=2*te;var ie=D(j);j==="auto"&&!(we<=he&&xe<=oe)&&(we>he||xe>oe)&&(!(we>oe||xe>he)||wex){var Se=z(X,Z,J,N,ee,fe,pe,U,ue);ce=Se.scale,_e=Se.pad}else ce=1,V&&(ce=Math.min(1,he/ee.x,oe/ee.y)),_e=0;var Me=H.left*le+H.right*se,Ue=(H.top+H.bottom)/2,Ge=(X+x)*le+(Z-x)*se,Ze=(J+N)/2,Ke=0,dt=0;if(K||Y){var _t=(U?ee.x:ee.y)/2;fe&&(Y||ue)&&(te+=_e);var Pt=U?w(X,Z):w(J,N);U?K?(Ge=X+Pt*te,Ke=-Pt*_t):(Ge=Z-Pt*te,Ke=Pt*_t):K?(Ze=J+Pt*te,dt=-Pt*_t):(Ze=N-Pt*te,dt=Pt*_t)}return{textX:Me,textY:Ue,targetX:Ge,targetY:Ze,anchorX:Ke,anchorY:dt,scale:ce,rotate:ie}}function z(X,Z,J,N,H,W,U,V,j){var q=Math.max(0,Math.abs(Z-X)-2*x),Y=Math.max(0,Math.abs(N-J)-2*x),K=W-x,re=U?K-Math.sqrt(K*K-(K-U)*(K-U)):K,se=j?K*2:V?K-U:2*re,le=j?K*2:V?2*re:K-U,ue,fe,pe,we,xe;return H.y/H.x>=Y/(q-se)?we=Y/H.y:H.y/H.x<=(Y-le)/q?we=q/H.x:!j&&V?(ue=H.x*H.x+H.y*H.y/4,fe=-2*H.x*(q-K)-H.y*(Y/2-K),pe=(q-K)*(q-K)+(Y/2-K)*(Y/2-K)-K*K,we=(-fe+Math.sqrt(fe*fe-4*ue*pe))/(2*ue)):j?(ue=(H.x*H.x+H.y*H.y)/4,fe=-H.x*(q/2-K)-H.y*(Y/2-K),pe=(q/2-K)*(q/2-K)+(Y/2-K)*(Y/2-K)-K*K,we=(-fe+Math.sqrt(fe*fe-4*ue*pe))/(2*ue)):(ue=H.x*H.x/4+H.y*H.y,fe=-H.x*(q/2-K)-2*H.y*(Y-K),pe=(q/2-K)*(q/2-K)+(Y-K)*(Y-K)-K*K,we=(-fe+Math.sqrt(fe*fe-4*ue*pe))/(2*ue)),we=Math.min(1,we),V?xe=Math.max(0,K-Math.sqrt(Math.max(0,K*K-(K-(Y-H.y*we)/2)*(K-(Y-H.y*we)/2)))-U):xe=Math.max(0,K-Math.sqrt(Math.max(0,K*K-(K-(q-H.x*we)/2)*(K-(q-H.x*we)/2)))-U),{scale:we,pad:xe}}function I(X,Z,J,N,H,W){var U=!!W.isHorizontal,V=!!W.constrained,j=W.angle||0,q=H.width,Y=H.height,K=Math.abs(Z-X),re=Math.abs(N-J),se;U?se=re>2*x?x:0:se=K>2*x?x:0;var le=1;V&&(le=U?Math.min(1,re/Y):Math.min(1,K/q));var ue=D(j),fe=R(H,ue),pe=(U?fe.x:fe.y)/2,we=(H.left+H.right)/2,xe=(H.top+H.bottom)/2,he=(X+Z)/2,oe=(J+N)/2,te=0,ie=0,ee;return(U?X===Z:J===N)&&W.zeroBarDir?ee=W.zeroBarDir:ee=U?w(Z,X):w(J,N),U?(he=Z-ee*se,te=ee*pe):(oe=N+ee*se,ie=-ee*pe),{textX:we,textY:xe,targetX:he,targetY:oe,anchorX:te,anchorY:ie,scale:le,rotate:ue}}function L(X,Z,J,N,H){var W=Z[0].trace,U=W.texttemplate,V;return U?V=G(X,Z,J,N,H):W.textinfo?V=$(Z,J,N,H):V=p.getValue(W.text,J),p.coerceString(y,V)}function B(X,Z){var J=p.getValue(X.textposition,Z);return p.coerceEnumerated(_,J)}function O(X,Z,J,N){for(var H=!1,W=!1,U=0;U0?H=!0:V<0&&(W=!0),H&&W)return 0}var j=Z?J:N,q=-w(j.range[0],j.range[1]);return W?H?0:-q:q}function G(X,Z,J,N,H){var W=Z[0].trace,U=i.castOption(W,J,"texttemplate");if(!U)return"";var V=W.type==="histogram",j=W.type==="waterfall",q=W.type==="funnel",Y=W.orientation==="h",K,re,se,le;Y?(K="y",re=H,se="x",le=N):(K="x",re=N,se="y",le=H);function ue(te){return u(re,re.c2l(te),!0).text}function fe(te){return u(le,le.c2l(te),!0).text}var pe=Z[J],we={};we.label=pe.p,we.labelLabel=we[K+"Label"]=ue(pe.p);var xe=i.castOption(W,pe.i,"text");(xe===0||xe)&&(we.text=xe),we.value=pe.s,we.valueLabel=we[se+"Label"]=fe(pe.s);var he={};v(he,W,pe.i),(V||he.x===void 0)&&(he.x=Y?we.value:we.label),(V||he.y===void 0)&&(he.y=Y?we.label:we.value),(V||he.xLabel===void 0)&&(he.xLabel=Y?we.valueLabel:we.labelLabel),(V||he.yLabel===void 0)&&(he.yLabel=Y?we.labelLabel:we.valueLabel),j&&(we.delta=+pe.rawS||pe.s,we.deltaLabel=fe(we.delta),we.final=pe.v,we.finalLabel=fe(we.final),we.initial=we.final-we.delta,we.initialLabel=fe(we.initial)),q&&(we.value=pe.s,we.valueLabel=fe(we.value),we.percentInitial=pe.begR,we.percentInitialLabel=i.formatPercent(pe.begR),we.percentPrevious=pe.difR,we.percentPreviousLabel=i.formatPercent(pe.difR),we.percentTotal=pe.sumR,we.percenTotalLabel=i.formatPercent(pe.sumR));var oe=i.castOption(W,pe.i,"customdata");return oe&&(we.customdata=oe),i.texttemplateString({data:[he,we,W._meta],fallback:W.texttemplatefallback,labels:we,locale:X._d3locale,template:U})}function $(X,Z,J,N){var H=X[0].trace,W=H.orientation==="h",U=H.type==="waterfall",V=H.type==="funnel";function j(oe){var te=W?N:J;return u(te,oe,!0).text}function q(oe){var te=W?J:N;return u(te,+oe,!0).text}var Y=H.textinfo,K=X[Z],re=Y.split("+"),se=[],le,ue=function(oe){return re.indexOf(oe)!==-1};if(ue("label")&&se.push(j(X[Z].p)),ue("text")&&(le=i.castOption(H,K.i,"text"),(le===0||le)&&se.push(le)),U){var fe=+K.rawS||K.s,pe=K.v,we=pe-fe;ue("initial")&&se.push(q(we)),ue("delta")&&se.push(q(fe)),ue("final")&&se.push(q(pe))}if(V){ue("value")&&se.push(q(K.s));var xe=0;ue("percent initial")&&xe++,ue("percent previous")&&xe++,ue("percent total")&&xe++;var he=xe>1;ue("percent initial")&&(le=i.formatPercent(K.begR),he&&(le+=" of initial"),se.push(le)),ue("percent previous")&&(le=i.formatPercent(K.difR),he&&(le+=" of previous"),se.push(le)),ue("percent total")&&(le=i.formatPercent(K.sumR),he&&(le+=" of total"),se.push(le))}return se.join("
")}r.exports={plot:S,toMoveInsideBar:P}}}),Ay=ye({"src/traces/bar/hover.js"(e,r){"use strict";var t=Hs(),a=li(),i=Ya(),o=Yt().fillText,s=WA().getLineWidth,l=qi().hoverLabelText,n=Vn().BADNUM;function u(h,d,p,g,m){var y=c(h,d,p,g,m);if(y){var _=y.cd,v=_[0].trace,x=_[y.index];return y.color=f(v,x),a.getComponentMethod("errorbars","hoverInfo")(x,v,y),[y]}}function c(h,d,p,g,m){var y=h.cd,_=y[0].trace,v=y[0].t,x=g==="closest",E=_.type==="waterfall",M=h.maxHoverDistance,C=h.maxSpikeDistance,w,k,T,b,S,A,F;_.orientation==="h"?(w=p,k=d,T="y",b="x",S=J,A=$):(w=d,k=p,T="x",b="y",A=J,S=$);var D=_[T+"period"],R=x||D;function P(se){return I(se,-1)}function z(se){return I(se,1)}function I(se,le){var ue=se.w;return se[T]+le*ue/2}function L(se){return se[T+"End"]-se[T+"Start"]}var B=x?P:D?function(se){return se.p-L(se)/2}:function(se){return Math.min(P(se),se.p-v.bardelta/2)},O=x?z:D?function(se){return se.p+L(se)/2}:function(se){return Math.max(z(se),se.p+v.bardelta/2)};function G(se,le,ue){return m.finiteRange&&(ue=0),t.inbox(se-w,le-w,ue+Math.min(1,Math.abs(le-se)/F)-1)}function $(se){return G(B(se),O(se),M)}function X(se){return G(P(se),z(se),C)}function Z(se){var le=se[b];if(E){var ue=Math.abs(se.rawS)||0;k>0?le+=ue:k<0&&(le-=ue)}return le}function J(se){var le=k,ue=se.b,fe=Z(se);return t.inbox(ue-le,fe-le,M+(fe-le)/(fe-ue)-1)}function N(se){var le=k,ue=se.b,fe=Z(se);return t.inbox(ue-le,fe-le,C+(fe-le)/(fe-ue)-1)}var H=h[T+"a"],W=h[b+"a"];F=Math.abs(H.r2c(H.range[1])-H.r2c(H.range[0]));function U(se){return(S(se)+A(se))/2}var V=t.getDistanceFunction(g,S,A,U);if(t.getClosest(y,V,h),h.index!==!1&&y[h.index].p!==n){R||(B=function(se){return Math.min(P(se),se.p-v.bargroupwidth/2)},O=function(se){return Math.max(z(se),se.p+v.bargroupwidth/2)});var j=h.index,q=y[j],Y=_.base?q.b+q.s:q.s;h[b+"0"]=h[b+"1"]=W.c2p(q[b],!0),h[b+"LabelVal"]=Y;var K=v.extents[v.extents.round(q.p)];h[T+"0"]=H.c2p(x?B(q):K[0],!0),h[T+"1"]=H.c2p(x?O(q):K[1],!0);var re=q.orig_p!==void 0;return h[T+"LabelVal"]=re?q.orig_p:q.p,h.labelLabel=l(H,h[T+"LabelVal"],_[T+"hoverformat"]),h.valueLabel=l(W,h[b+"LabelVal"],_[b+"hoverformat"]),h.baseLabel=l(W,q.b,_[b+"hoverformat"]),h.spikeDistance=(N(q)+X(q))/2,h[T+"Spike"]=H.c2p(q.p,!0),o(q,_,h),h.hovertemplate=_.hovertemplate,h}}function f(h,d){var p=d.mcc||h.marker.color,g=d.mlcc||h.marker.line.color,m=s(h,d);if(i.opacity(p))return p;if(i.opacity(g)&&m)return g}r.exports={hoverPoints:u,hoverOnBars:c,getTraceColor:f}}}),Pre=ye({"src/traces/bar/event_data.js"(e,r){"use strict";r.exports=function(a,i,o){return a.x="xVal"in i?i.xVal:i.x,a.y="yVal"in i?i.yVal:i.y,i.xa&&(a.xaxis=i.xa),i.ya&&(a.yaxis=i.ya),o.orientation==="h"?(a.label=a.y,a.value=a.x):(a.label=a.x,a.value=a.y),a}}}),Ty=ye({"src/traces/bar/select.js"(e,r){"use strict";r.exports=function(i,o){var s=i.cd,l=i.xaxis,n=i.yaxis,u=s[0].trace,c=u.type==="funnel",f=u.orientation==="h",h=[],d;if(o===!1)for(d=0;d0?(D="v",T>0?R=Math.min(S,b):R=Math.min(b)):T>0?(D="h",R=Math.min(S)):R=0;if(!R){p.visible=!1;return}p._length=R;var B=g("orientation",D);p._hasPreCompStats?B==="v"&&T===0?(g("x0",0),g("dx",1)):B==="h"&&k===0&&(g("y0",0),g("dy",1)):B==="v"&&T===0?g("x0"):B==="h"&&k===0&&g("y0");var O=a.getComponentMethod("calendars","handleTraceDefaults");O(d,p,["x","y"],m)}function f(d,p,g,m){var y=m.prefix,_=t.coerce2(d,p,n,"marker.outliercolor"),v=g("marker.line.outliercolor"),x="outliers";p._hasPreCompStats?x="all":(_||v)&&(x="suspectedoutliers");var E=g(y+"points",x);E?(g("jitter",E==="all"?.3:0),g("pointpos",E==="all"?-1.5:0),g("marker.symbol"),g("marker.opacity"),g("marker.size"),g("marker.angle"),g("marker.color",p.line.color),g("marker.line.color"),g("marker.line.width"),E==="suspectedoutliers"&&(g("marker.line.outliercolor",p.marker.color),g("marker.line.outlierwidth")),g("selected.marker.color"),g("unselected.marker.color"),g("selected.marker.size"),g("unselected.marker.size"),g("text"),g("hovertext")):delete p.marker;var M=g("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(g("hovertemplate"),g("hovertemplatefallback")),t.coerceSelectionMarkerOpacity(p,g)}function h(d,p){var g,m;function y(E){return t.coerce(m._input,m,n,E)}for(var _=0;_Z.uf};if(C._hasPreCompStats){var j=C[R],q=function(_t){return D.d2c((C[_t]||[])[A])},Y=1/0,K=-1/0;for(A=0;A=Z.q1&&Z.q3>=Z.med){var se=q("lowerfence");Z.lf=se!==s&&se<=Z.q1?se:m(Z,N,H);var le=q("upperfence");Z.uf=le!==s&&le>=Z.q3?le:y(Z,N,H);var ue=q("mean");Z.mean=ue!==s?ue:H?o.mean(N,H):(Z.q1+Z.q3)/2;var fe=q("sd");Z.sd=ue!==s&&fe>=0?fe:H?o.stdev(N,H,Z.mean):Z.q3-Z.q1,Z.lo=_(Z),Z.uo=v(Z);var pe=q("notchspan");pe=pe!==s&&pe>0?pe:x(Z,H),Z.ln=Z.med-pe,Z.un=Z.med+pe;var we=Z.lf,xe=Z.uf;C.boxpoints&&N.length&&(we=Math.min(we,N[0]),xe=Math.max(xe,N[H-1])),C.notched&&(we=Math.min(we,Z.ln),xe=Math.max(xe,Z.un)),Z.min=we,Z.max=xe}else{o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+Z.q1,"median = "+Z.med,"q3 = "+Z.q3].join(` -`));var he;Z.med!==s?he=Z.med:Z.q1!==s?Z.q3!==s?he=(Z.q1+Z.q3)/2:he=Z.q1:Z.q3!==s?he=Z.q3:he=0,Z.med=he,Z.q1=Z.q3=he,Z.lf=Z.uf=he,Z.mean=Z.sd=he,Z.ln=Z.un=he,Z.min=Z.max=he}Y=Math.min(Y,Z.min),K=Math.max(K,Z.max),Z.pts2=J.filter(V),b.push(Z)}}C._extremes[D._id]=a.findExtremes(D,[Y,K],{padded:!0})}else{var oe=D.makeCalcdata(C,R),te=u($,X),ie=$.length,ee=c(ie);for(A=0;A=0&&ce0){if(Z={},Z.pos=Z[z]=$[A],J=Z.pts=ee[A].sort(p),N=Z[R]=J.map(g),H=N.length,Z.min=N[0],Z.max=N[H-1],Z.mean=o.mean(N,H),Z.sd=o.stdev(N,H,Z.mean)*C.sdmultiple,Z.med=o.interp(N,.5),H%2&&(Ue||Ge)){var Ze,Ke;Ue?(Ze=N.slice(0,H/2),Ke=N.slice(H/2+1)):Ge&&(Ze=N.slice(0,H/2+1),Ke=N.slice(H/2)),Z.q1=o.interp(Ze,.5),Z.q3=o.interp(Ke,.5)}else Z.q1=o.interp(N,.25),Z.q3=o.interp(N,.75);Z.lf=m(Z,N,H),Z.uf=y(Z,N,H),Z.lo=_(Z),Z.uo=v(Z);var dt=x(Z,H);Z.ln=Z.med-dt,Z.un=Z.med+dt,_e=Math.min(_e,Z.ln),Se=Math.max(Se,Z.un),Z.pts2=J.filter(V),b.push(Z)}C.notched&&o.isTypedArray(oe)&&(oe=Array.from(oe)),C._extremes[D._id]=a.findExtremes(D,C.notched?oe.concat([_e,Se]):oe,{padded:!0})}return d(b,C),b.length>0?(b[0].t={num:w[S],dPos:X,posLetter:z,valLetter:R,labels:{med:l(M,"median:"),min:l(M,"min:"),q1:l(M,"q1:"),q3:l(M,"q3:"),max:l(M,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?l(M,"mean \xB1 \u03C3:").replace("\u03C3",C.sdmultiple===1?"\u03C3":C.sdmultiple+"\u03C3"):l(M,"mean:"),lf:l(M,"lower fence:"),uf:l(M,"upper fence:")}},w[S]++,b):[{t:{empty:!0}}]};function n(E,M,C,w){var k=M in E,T=M+"0"in E,b="d"+M in E;if(k||T&&b){var S=C.makeCalcdata(E,M),A=i(E,C,M,S).vals;return[A,S]}var F;T?F=E[M+"0"]:"name"in E&&(C.type==="category"||t(E.name)&&["linear","log"].indexOf(C.type)!==-1||o.isDateTime(E.name)&&C.type==="date")?F=E.name:F=w;for(var D=C.type==="multicategory"?C.r2c_just_indices(F):C.d2c(F,0,E[M+"calendar"]),R=E._length,P=new Array(R),z=0;z1,T=1-d[n+"gap"],b=1-d[n+"groupgap"];for(m=0;m0;if(D==="positive"?(Z=R*(F?1:.5),H=N,J=H=z):D==="negative"?(Z=H=z,J=R*(F?1:.5),W=N):(Z=J=R,H=W=N),K){var re=S.pointpos,se=S.jitter,le=S.marker.size/2,ue=0;re+se>=0&&(ue=N*(re+se),ue>Z?(Y=!0,j=le,U=ue):ue>H&&(j=le,U=Z)),ue<=Z&&(U=Z);var fe=0;re-se<=0&&(fe=-N*(re-se),fe>J?(Y=!0,q=le,V=fe):fe>W&&(q=le,V=J)),fe<=J&&(V=J)}else U=Z,V=J;var pe=new Array(_.length);for(y=0;y<_.length;y++)pe[y]=_[y].pos;S._extremes[p]=t.findExtremes(f,pe,{padded:Y,vpadminus:V,vpadplus:U,vpadLinearized:!0,ppadminus:{x:q,y:j}[g],ppadplus:{x:j,y:q}[g]})}}}r.exports={crossTraceCalc:s,setPositionOffset:l}}}),XA=ye({"src/traces/box/plot.js"(e,r){"use strict";var t=ai(),a=Yt(),i=$i(),o=5,s=.01;function l(f,h,d,p){var g=f._context.staticPlot,m=h.xaxis,y=h.yaxis;a.makeTraceGroups(p,d,"trace boxes").each(function(_){var v=t.select(this),x=_[0],E=x.t,M=x.trace;if(E.wdPos=E.bdPos*M.whiskerwidth,M.visible!==!0||E.empty){v.remove();return}var C,w;M.orientation==="h"?(C=y,w=m):(C=m,w=y),n(v,{pos:C,val:w},M,E,g),u(v,{x:m,y},M,E),c(v,{pos:C,val:w},M,E)})}function n(f,h,d,p,g){var m=d.orientation==="h",y=h.val,_=h.pos,v=!!_.rangebreaks,x=p.bPos,E=p.wdPos||0,M=p.bPosPxOffset||0,C=d.whiskerwidth||0,w=d.showwhiskers!==!1,k=d.notched||!1,T=k?1-2*d.notchwidth:1,b,S;Array.isArray(p.bdPos)?(b=p.bdPos[0],S=p.bdPos[1]):(b=p.bdPos,S=p.bdPos);var A=f.selectAll("path.box").data(d.type!=="violin"||d.box.visible?a.identity:[]);A.enter().append("path").style("vector-effect",g?"none":"non-scaling-stroke").attr("class","box"),A.exit().remove(),A.each(function(F){if(F.empty)return t.select(this).attr("d","M0,0Z");var D=_.c2l(F.pos+x,!0),R=_.l2p(D-b)+M,P=_.l2p(D+S)+M,z=v?(R+P)/2:_.l2p(D)+M,I=d.whiskerwidth,L=v?R*I+(1-I)*z:_.l2p(D-E)+M,B=v?P*I+(1-I)*z:_.l2p(D+E)+M,O=_.l2p(D-b*T)+M,G=_.l2p(D+S*T)+M,$=d.sizemode==="sd",X=y.c2p($?F.mean-F.sd:F.q1,!0),Z=$?y.c2p(F.mean+F.sd,!0):y.c2p(F.q3,!0),J=a.constrain($?y.c2p(F.mean,!0):y.c2p(F.med,!0),Math.min(X,Z)+1,Math.max(X,Z)-1),N=F.lf===void 0||d.boxpoints===!1||$,H=y.c2p(N?F.min:F.lf,!0),W=y.c2p(N?F.max:F.uf,!0),U=y.c2p(F.ln,!0),V=y.c2p(F.un,!0);m?t.select(this).attr("d","M"+J+","+O+"V"+G+"M"+X+","+R+"V"+P+(k?"H"+U+"L"+J+","+G+"L"+V+","+P:"")+"H"+Z+"V"+R+(k?"H"+V+"L"+J+","+O+"L"+U+","+R:"")+"Z"+(w?"M"+X+","+z+"H"+H+"M"+Z+","+z+"H"+W+(C===0?"":"M"+H+","+L+"V"+B+"M"+W+","+L+"V"+B):"")):t.select(this).attr("d","M"+O+","+J+"H"+G+"M"+R+","+X+"H"+P+(k?"V"+U+"L"+G+","+J+"L"+P+","+V:"")+"V"+Z+"H"+R+(k?"V"+V+"L"+O+","+J+"L"+R+","+U:"")+"Z"+(w?"M"+z+","+X+"V"+H+"M"+z+","+Z+"V"+W+(C===0?"":"M"+L+","+H+"H"+B+"M"+L+","+W+"H"+B):""))})}function u(f,h,d,p){var g=h.x,m=h.y,y=p.bdPos,_=p.bPos,v=d.boxpoints||d.points;a.seedPseudoRandom();var x=function(C){return C.forEach(function(w){w.t=p,w.trace=d}),C},E=f.selectAll("g.points").data(v?x:[]);E.enter().append("g").attr("class","points"),E.exit().remove();var M=E.selectAll("path").data(function(C){var w,k=C.pts2,T=Math.max((C.max-C.min)/10,C.q3-C.q1),b=T*1e-9,S=T*s,A=[],F=0,D;if(d.jitter){if(T===0)for(F=1,A=new Array(k.length),w=0;wC.lo&&(B.so=!0)}return k});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(i.translatePoints,g,m)}function c(f,h,d,p){var g=h.val,m=h.pos,y=!!m.rangebreaks,_=p.bPos,v=p.bPosPxOffset||0,x=d.boxmean||(d.meanline||{}).visible,E,M;Array.isArray(p.bdPos)?(E=p.bdPos[0],M=p.bdPos[1]):(E=p.bdPos,M=p.bdPos);var C=f.selectAll("path.mean").data(d.type==="box"&&d.boxmean||d.type==="violin"&&d.box.visible&&d.meanline.visible?a.identity:[]);C.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),C.exit().remove(),C.each(function(w){var k=m.c2l(w.pos+_,!0),T=m.l2p(k-E)+v,b=m.l2p(k+M)+v,S=y?(T+b)/2:m.l2p(k)+v,A=g.c2p(w.mean,!0),F=g.c2p(w.mean-w.sd,!0),D=g.c2p(w.mean+w.sd,!0);d.orientation==="h"?t.select(this).attr("d","M"+A+","+T+"V"+b+(x==="sd"?"m0,0L"+F+","+S+"L"+A+","+T+"L"+D+","+S+"Z":"")):t.select(this).attr("d","M"+T+","+A+"H"+b+(x==="sd"?"m0,0L"+S+","+F+"L"+T+","+A+"L"+S+","+D+"Z":""))})}r.exports={plot:l,plotBoxAndWhiskers:n,plotPoints:u,plotBoxMean:c}}}),ZA=ye({"src/traces/box/style.js"(e,r){"use strict";var t=ai(),a=Ya(),i=$i();function o(l,n,u){var c=u||t.select(l).selectAll("g.trace.boxes");c.style("opacity",function(f){return f[0].trace.opacity}),c.each(function(f){var h=t.select(this),d=f[0].trace,p=d.line.width;function g(_,v,x,E){_.style("stroke-width",v+"px").call(a.stroke,x).call(a.fill,E)}var m=h.selectAll("path.box");if(d.type==="candlestick")m.each(function(_){if(!_.empty){var v=t.select(this),x=d[_.dir];g(v,x.line.width,x.line.color,x.fillcolor),v.style("opacity",d.selectedpoints&&!_.selected?.3:1)}});else{g(m,p,d.line.color,d.fillcolor),h.selectAll("path.mean").style({"stroke-width":p,"stroke-dasharray":2*p+"px,"+p+"px"}).call(a.stroke,d.line.color);var y=h.selectAll("path.point");i.pointStyle(y,d,l)}})}function s(l,n,u){var c=n[0].trace,f=u.selectAll("path.point");c.selectedpoints?i.selectedPointStyle(f,c):i.pointStyle(f,c,l)}r.exports={style:o,styleOnSelect:s}}}),j9=ye({"src/traces/box/hover.js"(e,r){"use strict";var t=qi(),a=Yt(),i=Hs(),o=Ya(),s=a.fillText;function l(c,f,h,d){var p=c.cd,g=p[0].trace,m=g.hoveron,y=[],_;return m.indexOf("boxes")!==-1&&(y=y.concat(n(c,f,h,d))),m.indexOf("points")!==-1&&(_=u(c,f,h)),d==="closest"?_?[_]:y:(_&&y.push(_),y)}function n(c,f,h,d){var p=c.cd,g=c.xa,m=c.ya,y=p[0].trace,_=p[0].t,v=y.type==="violin",x,E,M,C,w,k,T,b,S,A,F,D=_.bdPos,R,P,z=_.wHover,I=function(fe){return M.c2l(fe.pos)+_.bPos-M.c2l(k)};v&&y.side!=="both"?(y.side==="positive"&&(S=function(fe){var pe=I(fe);return i.inbox(pe,pe+z,A)},R=D,P=0),y.side==="negative"&&(S=function(fe){var pe=I(fe);return i.inbox(pe-z,pe,A)},R=0,P=D)):(S=function(fe){var pe=I(fe);return i.inbox(pe-z,pe+z,A)},R=P=D);var L;v?L=function(fe){return i.inbox(fe.span[0]-w,fe.span[1]-w,A)}:L=function(fe){return i.inbox(fe.min-w,fe.max-w,A)},y.orientation==="h"?(w=f,k=h,T=L,b=S,x="y",M=m,E="x",C=g):(w=h,k=f,T=S,b=L,x="x",M=g,E="y",C=m);var B=Math.min(1,D/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));A=c.maxHoverDistance-B,F=c.maxSpikeDistance-B;function O(fe){return(T(fe)+b(fe))/2}var G=i.getDistanceFunction(d,T,b,O);if(i.getClosest(p,G,c),c.index===!1)return[];var $=p[c.index],X=y.line.color,Z=(y.marker||{}).color;o.opacity(X)&&y.line.width?c.color=X:o.opacity(Z)&&y.boxpoints?c.color=Z:c.color=y.fillcolor,c[x+"0"]=M.c2p($.pos+_.bPos-P,!0),c[x+"1"]=M.c2p($.pos+_.bPos+R,!0),c[x+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var J=x+"Spike";c.spikeDistance=O($)*F/A,c[J]=M.c2p($.pos,!0);var N=y.boxmean||y.sizemode==="sd"||(y.meanline||{}).visible,H=y.boxpoints||y.points,W=H&&N?["max","uf","q3","med","mean","q1","lf","min"]:H&&!N?["max","uf","q3","med","q1","lf","min"]:!H&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],U=C.range[1]0&&(u=!0);for(var d=0;dl){var n=l-o[a];return o[a]=l,n}}else return o[a]=l,l;return 0},max:function(a,i,o,s){var l=s[i];if(t(l))if(l=Number(l),t(o[a])){if(o[a]T&&To){var A=b===a?1:6,F=b===a?"M12":"M1";return function(D,R){var P=_.c2d(D,a,v),z=P.indexOf("-",A);z>0&&(P=P.slice(0,z));var I=_.d2c(P,0,v);if(In?p>o?p>a*1.1?a:p>i*1.1?i:o:p>s?s:p>l?l:n:Math.pow(10,Math.floor(Math.log(p)/Math.LN10))}function h(p,g,m,y,_,v){if(y&&p>o){var x=d(g,_,v),E=d(m,_,v),M=p===a?0:1;return x[M]!==E[M]}return Math.floor(m/p)-Math.floor(g/p)>.1}function d(p,g,m){var y=g.c2d(p,a,m).split("-");return y[0]===""&&(y.unshift(),y[0]="-"+y[0]),y}}}),$9=ye({"src/traces/histogram/calc.js"(e,r){"use strict";var t=en(),a=Yt(),i=li(),o=qi(),{hasColorscale:s}=xc(),l=Nc(),n=nb(),u=V9(),c=G9(),f=H9(),h=W9();function d(_,v){var x=[],E=[],M=v.orientation==="h",C=o.getFromId(_,M?v.yaxis:v.xaxis),w=M?"y":"x",k={x:"y",y:"x"}[w],T=v[w+"calendar"],b=v.cumulative,S,A=p(_,v,C,w),F=A[0],D=A[1],R=typeof F.size=="string",P=[],z=R?P:F,I=[],L=[],B=[],O=0,G=v.histnorm,$=v.histfunc,X=G.indexOf("density")!==-1,Z,J,N;b.enabled&&X&&(G=G.replace(/ ?density$/,""),X=!1);var H=$==="max"||$==="min",W=H?null:0,U=u.count,V=c[G],j=!1,q=function(ce){return C.r2c(ce,0,T)},Y;for(a.isArrayOrTypedArray(v[k])&&$!=="count"&&(Y=v[k],j=$==="avg",U=u[$]),S=q(F.start),J=q(F.end)+(S-o.tickIncrement(S,F.size,!1,T))/1e6;S=0&&N=te;S--)if(E[S]){ie=S;break}for(S=te;S<=ie;S++)if(t(x[S])&&t(E[S])){var ee={p:x[S],s:E[S],b:0};b.enabled||(ee.pts=B[S],le?ee.ph0=ee.ph1=B[S].length?D[B[S][0]]:x[S]:(v._computePh=!0,ee.ph0=xe(P[S]),ee.ph1=xe(P[S+1],!0))),oe.push(ee)}return oe.length===1&&(oe[0].width1=o.tickIncrement(oe[0].p,F.size,!1,T)-oe[0].p),s(v,"marker")&&l(_,v,{vals:v.marker.color,containerStr:"marker",cLetter:"c"}),s(v,"marker.line")&&l(_,v,{vals:v.marker.line.color,containerStr:"marker.line",cLetter:"c"}),n(oe,v),a.isArrayOrTypedArray(v.selectedpoints)&&a.tagSelected(oe,v,pe),oe}function p(_,v,x,E,M){var C,w=E+"bins",k=_._fullLayout,T=v["_"+E+"bingroup"],b=k._histogramBinOpts[T],S=k.barmode==="overlay",A,F,D,R,P,z,I,L=function(xe){return x.r2c(xe,0,R)},B=function(xe){return x.c2r(xe,0,R)},O=x.type==="date"?function(xe){return xe||xe===0?a.cleanDate(xe,null,R):null}:function(xe){return t(xe)?Number(xe):null};function G(xe,he,oe){he[xe+"Found"]?(he[xe]=O(he[xe]),he[xe]===null&&(he[xe]=oe[xe])):(z[xe]=he[xe]=oe[xe],a.nestedProperty(F[0],w+"."+xe).set(oe[xe]))}if(v["_"+E+"autoBinFinished"])delete v["_"+E+"autoBinFinished"];else{F=b.traces;var $=[],X=!0,Z=!1,J=!1;for(A=0;Ax.r2l(K)&&(se=o.tickIncrement(se,b.size,!0,R)),V.start=x.l2r(se),Y||a.nestedProperty(v,w+".start").set(V.start)}var le=b.end,ue=x.r2l(U.end),fe=ue!==void 0;if((b.endFound||fe)&&ue!==x.r2l(le)){var pe=fe?ue:a.aggNums(Math.max,null,P);V.end=x.l2r(pe),fe||a.nestedProperty(v,w+".start").set(V.end)}var we="autobin"+E;return v._input[we]===!1&&(v._input[w]=a.extendFlat({},v[w]||{}),delete v._input[we],delete v[we]),[V,P]}function g(_,v,x,E,M){var C=_._fullLayout,w=m(_,v),k=!1,T=1/0,b=[v],S,A,F;for(S=0;S=0;E--)k(E);else if(v==="increasing"){for(E=1;E<_.length;E++)_[E]+=_[E-1];x==="exclude"&&(_.unshift(0),_.pop())}else{for(E=_.length-2;E>=0;E--)_[E]+=_[E+1];x==="exclude"&&(_.push(0),_.shift())}}r.exports={calc:d,calcAllAutoBins:p}}}),jre=ye({"src/traces/histogram2d/calc.js"(e,r){"use strict";var t=Yt(),a=qi(),i=V9(),o=G9(),s=H9(),l=W9(),n=$9().calcAllAutoBins;r.exports=function(d,p){var g=a.getFromId(d,p.xaxis),m=a.getFromId(d,p.yaxis),y=p.xcalendar,_=p.ycalendar,v=function(Ve){return g.r2c(Ve,0,y)},x=function(Ve){return m.r2c(Ve,0,_)},E=function(Ve){return g.c2r(Ve,0,y)},M=function(Ve){return m.c2r(Ve,0,_)},C,w,k,T,b=n(d,p,g,"x"),S=b[0],A=b[1],F=n(d,p,m,"y"),D=F[0],R=F[1],P=p._length;A.length>P&&A.splice(P,A.length-P),R.length>P&&R.splice(P,R.length-P);var z=[],I=[],L=[],B=typeof S.size=="string",O=typeof D.size=="string",G=[],$=[],X=B?G:S,Z=O?$:D,J=0,N=[],H=[],W=p.histnorm,U=p.histfunc,V=W.indexOf("density")!==-1,j=U==="max"||U==="min",q=j?null:0,Y=i.count,K=o[W],re=!1,se=[],le=[],ue="z"in p?p.z:"marker"in p&&Array.isArray(p.marker.color)?p.marker.color:"";ue&&U!=="count"&&(re=U==="avg",Y=i[U]);var fe=S.size,pe=v(S.start),we=v(S.end)+(pe-a.tickIncrement(pe,fe,!1,y))/1e6;for(C=pe;C=0&&k=0&&T<_e&&(J+=Y(k,C,z[T],ue,N[T]),H[T][k].push(C),Ue&&(Ze[k]===void 0?Ze[k]=Tt:Ze[k]!==Tt&&(Ue=!1)),Ge&&(Ke[T]===void 0?Ke[T]=st:Ke[T]!==st&&(Ge=!1)),dt=Math.min(dt,Tt-G[k]),_t=Math.min(_t,G[k+1]-Tt),Pt=Math.min(Pt,st-$[T]),pt=Math.min(pt,$[T+1]-st))}if(re)for(T=0;T<_e;T++)J+=s(z[T],N[T]);if(K)for(T=0;T<_e;T++)K(z[T],J,se,le[T]);return{x:A,xRanges:f(G,Ue&&Ze,dt,_t,g,y),x0:oe,dx:he,y:R,yRanges:f($,Ge&&Ke,Pt,pt,m,_),y0:Me,dy:Se,z,pts:H}};function u(h,d,p,g){var m=new Array(h),y;if(g)for(y=0;ya;f++)c=s(n,u,o(c));return c>a&&t.log("interp2d didn't converge quickly",c),n};function s(l,n,u){var c=0,f,h,d,p,g,m,y,_,v,x,E,M,C;for(p=0;pM&&(c=Math.max(c,Math.abs(l[h][d]-E)/(C-M))))}return c}}}),tT=ye({"src/traces/heatmap/find_empties.js"(e,r){"use strict";var t=Yt().maxRowLength;r.exports=function(i){var o=[],s={},l=[],n=i[0],u=[],c=[0,0,0],f=t(i),h,d,p,g,m,y,_,v;for(d=0;d=0;m--)g=l[m],d=g[0],p=g[1],y=((s[[d-1,p]]||c)[2]+(s[[d+1,p]]||c)[2]+(s[[d,p-1]]||c)[2]+(s[[d,p+1]]||c)[2])/20,y&&(_[g]=[d,p,y],l.splice(m,1),v=!0);if(!v)throw"findEmpties iterated with no new neighbors";for(g in _)s[g]=_[g],o.push(_[g])}return o.sort(function(x,E){return E[2]-x[2]})}}}),Y9=ye({"src/traces/heatmap/make_bound_array.js"(e,r){"use strict";var t=li(),a=Yt().isArrayOrTypedArray;r.exports=function(o,s,l,n,u,c){var f=[],h=t.traceIs(o,"contour"),d=t.traceIs(o,"histogram"),p,g,m,y=a(s)&&s.length>1;if(y&&!d&&c.type!=="category"){var _=s.length;if(_<=u){if(h)f=Array.from(s).slice(0,u);else if(u===1)c.type==="log"?f=[.5*s[0],2*s[0]]:f=[s[0]-.5,s[0]+.5];else if(c.type==="log"){for(f=[Math.pow(s[0],1.5)/Math.pow(s[1],.5)],m=1;m<_;m++)f.push(Math.sqrt(s[m-1]*s[m]));f.push(Math.pow(s[_-1],1.5)/Math.pow(s[_-2],.5))}else{for(f=[1.5*s[0]-.5*s[1]],m=1;m<_;m++)f.push((s[m-1]+s[m])*.5);f.push(1.5*s[_-1]-.5*s[_-2])}if(_1){var W=(H[H.length-1]-H[0])/(H.length-1),U=Math.abs(W/100);for(P=0;PU)return!1}return!0}_._islinear=!1,v.type==="log"||x.type==="log"?C==="fast"&&L("log axis found"):B(w)?B(S)?_._islinear=!0:C==="fast"&&L("y scale is not linear"):C==="fast"&&L("x scale is not linear");var O=a.maxRowLength(R),G=_.xtype==="scaled"?"":w,$=h(_,G,k,T,O,v),X=_.ytype==="scaled"?"":S,Z=h(_,X,A,F,R.length,x);_._extremes[v._id]=i.findExtremes(v,$),_._extremes[x._id]=i.findExtremes(x,Z);var J={x:$,y:Z,z:R,text:_._text||_.text,hovertext:_._hovertext||_.hovertext};if(_.xperiodalignment&&b&&(J.orig_x=b),_.yperiodalignment&&D&&(J.orig_y=D),G&&G.length===$.length-1&&(J.xCenter=G),X&&X.length===Z.length-1&&(J.yCenter=X),M&&(J.xRanges=z.xRanges,J.yRanges=z.yRanges,J.pts=z.pts),E||l(y,_,{vals:R,cLetter:"z"}),E&&_.contours&&_.contours.coloring==="heatmap"){var N={type:_.type==="contour"?"heatmap":"histogram2d",xcalendar:_.xcalendar,ycalendar:_.ycalendar};J.xfill=h(N,G,k,T,O,v),J.yfill=h(N,X,A,F,R.length,x)}return[J]};function p(m){for(var y=[],_=m.length,v=0;v<_;v++){var x=m[v];x!==d&&y.push(x)}return y}function g(m,y,_){for(var v=[],x=-1,E=0;E<_.length;E++)if(y[E]!==d){x++,v[x]=[];for(var M=0;M<_[E].length;M++)m[M]!==d&&v[x].push(_[E][M])}return v}}}),aT=ye({"src/constants/pixelated_image.js"(e){"use strict";e.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],e.STYLE=e.CSS_DECLARATIONS.map(function(r){return r.join(": ")+"; "}).join("")}}),X9=ye({"src/lib/supports_pixelated_image.js"(e,r){"use strict";var t=aT(),a=$i(),i=Yt(),o=null;function s(){if(o!==null)return o;o=!1;var l=i.isSafari()||i.isMacWKWebView()||i.isIOS();if(window.navigator.userAgent&&!l){var n=Array.from(t.CSS_DECLARATIONS).reverse(),u=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof u=="function")o=n.some(function(d){return u.apply(null,d)});else{var c=a.tester.append("image").attr("style",t.STYLE),f=window.getComputedStyle(c.node()),h=f.imageRendering;o=n.some(function(d){var p=d[1];return h===p||h===p.toLowerCase()}),c.remove()}}return o}r.exports=s}}),iT=ye({"src/traces/heatmap/plot.js"(e,r){"use strict";var t=ai(),a=li(),i=$i(),o=qi(),s=Yt(),l=Go(),n=RA(),u=Ya(),c=As().extractOpts,f=As().makeColorScaleFuncFromTrace,h=Sd(),d=Yl(),p=d.LINE_SPACING,g=X9(),m=aT().STYLE,y="heatmap-label";function _(C){return C.selectAll("g."+y)}function v(C){_(C).remove()}r.exports=function(C,w,k,T){var b=w.xaxis,S=w.yaxis;s.makeTraceGroups(T,k,"hm").each(function(A){var F=t.select(this),D=A[0],R=D.trace,P=R.xgap||0,z=R.ygap||0,I=D.z,L=D.x,B=D.y,O=D.xCenter,G=D.yCenter,$=a.traceIs(R,"contour"),X=$?"best":R.zsmooth,Z=I.length,J=s.maxRowLength(I),N=!1,H=!1,W,U,V,j,q,Y,K,re;for(Y=0;W===void 0&&Y0;)U=b.c2p(L[Y]),Y--;for(U0;)q=S.c2p(B[Y]),Y--;q=b._length||U<=0||j>=S._length||q<=0;if(pe){var we=F.selectAll("image").data([]);we.exit().remove(),v(F);return}var xe,he;se==="fast"?(xe=J,he=Z):(xe=ue,he=fe);var oe=document.createElement("canvas");oe.width=xe,oe.height=he;var te=oe.getContext("2d",{willReadFrequently:!0}),ie=f(R,{noNumericCheck:!0,returnArray:!0}),ee,ce;se==="fast"?(ee=N?function(Wt){return J-1-Wt}:s.identity,ce=H?function(Wt){return Z-1-Wt}:s.identity):(ee=function(Wt){return s.constrain(Math.round(b.c2p(L[Wt])-W),0,ue)},ce=function(Wt){return s.constrain(Math.round(S.c2p(B[Wt])-j),0,fe)});var _e=ce(0),Se=[_e,_e],Me=N?0:1,Ue=H?0:1,Ge=0,Ze=0,Ke=0,dt=0,_t,Pt,pt,Tt,st;function Ve(Wt,jt=0){if(Wt===void 0)return[0,0,0,0];var sr=ie(Wt);return sr[0]=Math.round(sr[0]),sr[1]=Math.round(sr[1]),sr[2]=Math.round(sr[2]),Ge+=jt,Ze+=sr[0]*jt,Ke+=sr[1]*jt,dt+=sr[2]*jt,sr}function Ye(Wt,jt,sr,kr){var Mr=Wt[sr.bin0];if(Mr===void 0)return Ve(void 0,1);var ua=Wt[sr.bin1],ra=jt[sr.bin0],ni=jt[sr.bin1],Ca=ua-Mr||0,Li=ra-Mr||0,Va;return ua===void 0?ni===void 0?Va=0:ra===void 0?Va=2*(ni-Mr):Va=(2*ni-ra-Mr)*2/3:ni===void 0?ra===void 0?Va=0:Va=(2*Mr-ua-ra)*2/3:ra===void 0?Va=(2*ni-ua-Mr)*2/3:Va=ni+Mr-ua-ra,Ve(Mr+sr.frac*Ca+kr.frac*(Li+sr.frac*Va))}if(se!=="default"){var me=0,be;try{be=new Uint8Array(xe*he*4)}catch{be=new Array(xe*he*4)}if(se==="smooth"){var Ee=O||L,De=G||B,Ce=new Array(Ee.length),Fe=new Array(De.length),Je=new Array(ue),qe=O?E:x,at=G?E:x,tt,ct,At;for(Y=0;YOa||Oa>S._length))for(K=Fr;K_i||_i>b._length)){var ti=n({x:Da,y:jr},R,C._fullLayout);ti.x=Da,ti.y=jr;var Ka=D.z[Y][K];Ka===void 0?(ti.z="",ti.zLabel=""):(ti.z=Ka,ti.zLabel=o.tickText(Vt,Ka,"hover").text);var ia=D.text&&D.text[Y]&&D.text[Y][K];(ia===void 0||ia===!1)&&(ia=""),ti.text=ia;var na=s.texttemplateString({data:[ti,R._meta],fallback:R.texttemplatefallback,labels:ti,locale:C._fullLayout._d3locale,template:Dt});if(na){var xi=na.split("
"),Yi=xi.length,Qr=0;for(re=0;re=x[0].length||F<0||F>x.length)return}else{if(t.inbox(u-_[0],u-_[_.length-1],0)>0||t.inbox(c-v[0],c-v[v.length-1],0)>0)return;if(d){var D;for(k=[2*_[0]-_[1]],D=1;D<_.length;D++)k.push((_[D]+_[D-1])/2);for(k.push([2*_[_.length-1]-_[_.length-2]]),T=[2*v[0]-v[1]],D=1;D=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),cb=ye({"src/traces/contour/attributes.js"(e,r){"use strict";var t=My(),a=al(),i=zs(),o=i.axisHoverFormat,s=i.descriptionOnlyNumbers,l=rs(),n=Eu().dash,u=vs(),c=Xi().extendFlat,f=cT(),h=f.COMPARISON_OPS2,d=f.INTERVAL_OPS,p=a.line;r.exports=c({z:t.z,x:t.x,x0:t.x0,dx:t.dx,y:t.y,y0:t.y0,dy:t.dy,xperiod:t.xperiod,yperiod:t.yperiod,xperiod0:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:t.xperiodalignment,yperiodalignment:t.yperiodalignment,text:t.text,hovertext:t.hovertext,transpose:t.transpose,xtype:t.xtype,ytype:t.ytype,xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:t.hovertemplate,hovertemplatefallback:t.hovertemplatefallback,texttemplate:c({},t.texttemplate,{}),texttemplatefallback:t.texttemplatefallback,textfont:c({},t.textfont,{}),hoverongaps:t.hoverongaps,connectgaps:c({},t.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:u({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:s("contour label")},operation:{valType:"enumerated",values:[].concat(h).concat(d),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:c({},p.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:n,smoothing:c({},p.smoothing,{}),editType:"plot"},zorder:a.zorder},l("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),Q9=ye({"src/traces/histogram2dcontour/attributes.js"(e,r){"use strict";var t=uT(),a=cb(),i=rs(),o=zs().axisHoverFormat,s=Xi().extendFlat;r.exports=s({x:t.x,y:t.y,z:t.z,marker:t.marker,histnorm:t.histnorm,histfunc:t.histfunc,nbinsx:t.nbinsx,xbins:t.xbins,nbinsy:t.nbinsy,ybins:t.ybins,autobinx:t.autobinx,autobiny:t.autobiny,bingroup:t.bingroup,xbingroup:t.xbingroup,ybingroup:t.ybingroup,autocontour:a.autocontour,ncontours:a.ncontours,contours:a.contours,line:{color:a.line.color,width:s({},a.line.width,{dflt:.5}),dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:t.hovertemplate,hovertemplatefallback:t.hovertemplatefallback,texttemplate:a.texttemplate,texttemplatefallback:a.texttemplatefallback,textfont:a.textfont},i("",{cLetter:"z",editTypeOverride:"calc"}))}}),fT=ye({"src/traces/contour/contours_defaults.js"(e,r){"use strict";r.exports=function(a,i,o,s){var l=s("contours.start"),n=s("contours.end"),u=l===!1||n===!1,c=o("contours.size"),f;u?f=i.autocontour=!0:f=o("autocontour",!1),(f||!c)&&o("ncontours")}}}),eL=ye({"src/traces/contour/label_defaults.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o,s,l){l||(l={});var n=i("contours.showlabels");if(n){var u=o.font;t.coerceFont(i,"contours.labelfont",u,{overrideDflt:{color:s}}),i("contours.labelformat")}l.hasHover!==!1&&i("zhoverformat")}}}),hT=ye({"src/traces/contour/style_defaults.js"(e,r){"use strict";var t=Su(),a=eL();r.exports=function(o,s,l,n,u){var c=l("contours.coloring"),f,h="";c==="fill"&&(f=l("contours.showlines")),f!==!1&&(c!=="lines"&&(h=l("line.color","#000")),l("line.width",.5),l("line.dash")),c!=="none"&&(o.showlegend!==!0&&(s.showlegend=!1),s._dfltShowLegend=!1,t(o,s,n,l,{prefix:"",cLetter:"z"})),l("line.smoothing"),a(l,n,h,u)}}}),Jre=ye({"src/traces/histogram2dcontour/defaults.js"(e,r){"use strict";var t=Yt(),a=J9(),i=fT(),o=hT(),s=ub(),l=Q9();r.exports=function(u,c,f,h){function d(g,m){return t.coerce(u,c,l,g,m)}function p(g){return t.coerce2(u,c,l,g)}a(u,c,d,h),c.visible!==!1&&(i(u,c,d,p),o(u,c,d,h),d("xhoverformat"),d("yhoverformat"),d("hovertemplate"),d("hovertemplatefallback"),c.contours&&c.contours.coloring==="heatmap"&&s(d,h))}}}),tL=ye({"src/traces/contour/set_contours.js"(e,r){"use strict";var t=qi(),a=Yt();r.exports=function(s,l){var n=s.contours;if(s.autocontour){var u=s.zmin,c=s.zmax;(s.zauto||u===void 0)&&(u=a.aggNums(Math.min,null,l)),(s.zauto||c===void 0)&&(c=a.aggNums(Math.max,null,l));var f=i(u,c,s.ncontours);n.size=f.dtick,n.start=t.tickFirst(f),f.range.reverse(),n.end=t.tickFirst(f),n.start===u&&(n.start+=n.size),n.end===c&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),s._input.contours||(s._input.contours={}),a.extendFlat(s._input.contours,{start:n.start,end:n.end,size:n.size}),s._input.autocontour=!0}else if(n.type!=="constraint"){var h=n.start,d=n.end,p=s._input.contours;if(h>d&&(n.start=p.start=d,d=n.end=p.end=h,h=n.start),!(n.size>0)){var g;h===d?g=1:g=i(h,d,s.ncontours).dtick,p.size=n.size=g}}};function i(o,s,l){var n={type:"linear",range:[o,s]};return t.autoTicks(n,(s-o)/(l||15)),n}}}),fb=ye({"src/traces/contour/end_plus.js"(e,r){"use strict";r.exports=function(a){return a.end+a.size/1e6}}}),rL=ye({"src/traces/contour/calc.js"(e,r){"use strict";var t=As(),a=rT(),i=tL(),o=fb();r.exports=function(l,n){var u=a(l,n),c=u[0].z;i(n,c);var f=n.contours,h=t.extractOpts(n),d;if(f.coloring==="heatmap"&&h.auto&&n.autocontour===!1){var p=f.start,g=o(f),m=f.size||1,y=Math.floor((g-p)/m)+1;isFinite(m)||(m=1,y=1);var _=p-m/2,v=_+y*m;d=[_,v]}else d=c;return t.calc(l,n,{vals:d,cLetter:"z"}),u}}}),hb=ye({"src/traces/contour/constants.js"(e,r){"use strict";r.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}}}}),aL=ye({"src/traces/contour/make_crossings.js"(e,r){"use strict";var t=hb();r.exports=function(o){var s=o[0].z,l=s.length,n=s[0].length,u=l===2||n===2,c,f,h,d,p,g,m,y,_;for(f=0;fi?0:1)+(o[0][1]>i?0:2)+(o[1][1]>i?0:4)+(o[1][0]>i?0:8);if(s===5||s===10){var l=(o[0][0]+o[0][1]+o[1][0]+o[1][1])/4;return i>l?s===5?713:1114:s===5?104:208}return s===15?0:s}}}),iL=ye({"src/traces/contour/find_all_paths.js"(e,r){"use strict";var t=Yt(),a=hb();r.exports=function(c,f,h){var d,p,g,m,y;for(f=f||.01,h=h||.01,g=0;g20?(g=a.CHOOSESADDLE[g][(m[0]||m[1])<0?0:1],u.crossings[p]=a.SADDLEREMAINDER[g]):delete u.crossings[p],m=a.NEWDELTA[g],!m){t.log("Found bad marching index:",g,c,u.level);break}y.push(n(u,c,m)),c[0]+=m[0],c[1]+=m[1],p=c.join(","),i(y[y.length-1],y[y.length-2],h,d)&&y.pop();var C=m[0]&&(c[0]<0||c[0]>v-2)||m[1]&&(c[1]<0||c[1]>_-2),w=c[0]===x[0]&&c[1]===x[1]&&m[0]===E[0]&&m[1]===E[1];if(w||f&&C)break;g=u.crossings[p]}M===1e4&&t.log("Infinite loop in contour?");var k=i(y[0],y[y.length-1],h,d),T=0,b=.2*u.smoothing,S=[],A=0,F,D,R,P,z,I,L,B,O,G,$;for(M=1;M=A;M--)if(F=S[M],F=A&&F+S[D]B&&O--,u.edgepaths[O]=$.concat(y,G));break}N||(u.edgepaths[B]=y.concat(G))}for(B=0;B20&&c?u===208||u===1114?h=f[0]===0?1:-1:d=f[1]===0?1:-1:a.BOTTOMSTART.indexOf(u)!==-1?d=1:a.LEFTSTART.indexOf(u)!==-1?h=1:a.TOPSTART.indexOf(u)!==-1?d=-1:h=-1,[h,d]}function n(u,c,f){var h=c[0]+Math.max(f[0],0),d=c[1]+Math.max(f[1],0),p=u.z[d][h],g=u.xaxis,m=u.yaxis;if(f[1]){var y=(u.level-p)/(u.z[d][h+1]-p),_=(y!==1?(1-y)*g.c2l(u.x[h]):0)+(y!==0?y*g.c2l(u.x[h+1]):0);return[g.c2p(g.l2c(_),!0),m.c2p(u.y[d],!0),h+y,d]}else{var v=(u.level-p)/(u.z[d+1][h]-p),x=(v!==1?(1-v)*m.c2l(u.y[d]):0)+(v!==0?v*m.c2l(u.y[d+1]):0);return[g.c2p(u.x[h],!0),m.c2p(m.l2c(x),!0),h,d+v]}}}}),Qre=ye({"src/traces/contour/constraint_mapping.js"(e,r){"use strict";var t=cT(),a=en();r.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")};function i(l,n){var u=Array.isArray(n),c;function f(h){return a(h)?+h:null}return t.COMPARISON_OPS2.indexOf(l)!==-1?c=f(u?n[0]:n):t.INTERVAL_OPS.indexOf(l)!==-1?c=u?[f(n[0]),f(n[1])]:[f(n),f(n)]:t.SET_OPS.indexOf(l)!==-1&&(c=u?n.map(f):[f(n)]),c}function o(l){return function(n){n=i(l,n);var u=Math.min(n[0],n[1]),c=Math.max(n[0],n[1]);return{start:u,end:c,size:c-u}}}function s(l){return function(n){return n=i(l,n),{start:n,end:1/0,size:1/0}}}}}),nL=ye({"src/traces/contour/empty_pathinfo.js"(e,r){"use strict";var t=Yt(),a=Qre(),i=fb();r.exports=function(s,l,n){for(var u=s.type==="constraint"?a[s._operation](s.value):s,c=u.size,f=[],h=i(u),d=n.trace._carpetTrace,p=d?{xaxis:d.aaxis,yaxis:d.baxis,x:n.a,y:n.b}:{xaxis:l.xaxis,yaxis:l.yaxis,x:n.x,y:n.y},g=u.start;g1e3){t.warn("Too many contours, clipping at 1000",s);break}return f}}}),oL=ye({"src/traces/contour/convert_to_constraints.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o){var s,l,n,u=function(h){return h.reverse()},c=function(h){return h};switch(o){case"=":case"<":return i;case">":for(i.length!==1&&t.warn("Contour data invalid for the specified inequality operation."),l=i[0],s=0;sn.level||n.starts.length&&l===n.level)}break;case"constraint":if(i.prefixBoundary=!1,i.edgepaths.length)return;var u=i.x.length,c=i.y.length,f=-1/0,h=1/0;for(s=0;s":d>f&&(i.prefixBoundary=!0);break;case"<":(df||i.starts.length&&g===h)&&(i.prefixBoundary=!0);break;case"][":p=Math.min(d[0],d[1]),g=Math.max(d[0],d[1]),pf&&(i.prefixBoundary=!0);break}break}}}}),dT=ye({"src/traces/contour/plot.js"(e){"use strict";var r=ai(),t=Yt(),a=$i(),i=As(),o=Go(),s=qi(),l=Op(),n=iT(),u=aL(),c=iL(),f=nL(),h=oL(),d=sL(),p=hb(),g=p.LABELOPTIMIZER;e.plot=function(w,k,T,b){var S=k.xaxis,A=k.yaxis;t.makeTraceGroups(b,T,"contour").each(function(F){var D=r.select(this),R=F[0],P=R.trace,z=R.x,I=R.y,L=P.contours,B=f(L,k,R),O=t.ensureSingle(D,"g","heatmapcoloring"),G=[];L.coloring==="heatmap"&&(G=[F]),n(w,k,G,O),u(B),c(B);var $=S.c2p(z[0],!0),X=S.c2p(z[z.length-1],!0),Z=A.c2p(I[0],!0),J=A.c2p(I[I.length-1],!0),N=[[$,J],[X,J],[X,Z],[$,Z]],H=B;L.type==="constraint"&&(H=h(B,L._operation)),m(D,N,L),y(D,H,N,L),v(D,B,w,R,L),E(D,k,w,R,N)})};function m(C,w,k){var T=t.ensureSingle(C,"g","contourbg"),b=T.selectAll("path").data(k.coloring==="fill"?[0]:[]);b.enter().append("path"),b.exit().remove(),b.attr("d","M"+w.join("L")+"Z").style("stroke","none")}function y(C,w,k,T){var b=T.coloring==="fill"||T.type==="constraint"&&T._operation!=="=",S="M"+k.join("L")+"Z";b&&d(w,T);var A=t.ensureSingle(C,"g","contourfill"),F=A.selectAll("path").data(b?w:[]);F.enter().append("path"),F.exit().remove(),F.each(function(D){var R=(D.prefixBoundary?S:"")+_(D,k);R?r.select(this).attr("d",R).style("stroke","none"):r.select(this).remove()})}function _(C,w){var k="",T=0,b=C.edgepaths.map(function($,X){return X}),S=!0,A,F,D,R,P,z;function I($){return Math.abs($[1]-w[0][1])<.01}function L($){return Math.abs($[1]-w[2][1])<.01}function B($){return Math.abs($[0]-w[0][0])<.01}function O($){return Math.abs($[0]-w[2][0])<.01}for(;b.length;){for(z=a.smoothopen(C.edgepaths[T],C.smoothing),k+=S?z:z.replace(/^M/,"L"),b.splice(b.indexOf(T),1),A=C.edgepaths[T][C.edgepaths[T].length-1],R=-1,D=0;D<4;D++){if(!A){t.log("Missing end?",T,C);break}for(I(A)&&!O(A)?F=w[1]:B(A)?F=w[0]:L(A)?F=w[3]:O(A)&&(F=w[2]),P=0;P=0&&(F=G,R=P):Math.abs(A[1]-F[1])<.01?Math.abs(A[1]-G[1])<.01&&(G[0]-A[0])*(F[0]-G[0])>=0&&(F=G,R=P):t.log("endpt to newendpt is not vert. or horz.",A,F,G)}if(A=F,R>=0)break;k+="L"+F}if(R===C.edgepaths.length){t.log("unclosed perimeter path");break}T=R,S=b.indexOf(T)===-1,S&&(T=b[0],k+="Z")}for(T=0;Tg.MAXCOST*2)break;I&&(F/=2),A=R-F/2,D=A+F*1.5}if(z<=g.MAXCOST)return P};function x(C,w,k,T){var b=w.width/2,S=w.height/2,A=C.x,F=C.y,D=C.theta,R=Math.cos(D)*b,P=Math.sin(D)*b,z=(A>T.center?T.right-A:A-T.left)/(R+Math.abs(Math.sin(D)*S)),I=(F>T.middle?T.bottom-F:F-T.top)/(Math.abs(P)+Math.cos(D)*S);if(z<1||I<1)return 1/0;var L=g.EDGECOST*(1/(z-1)+1/(I-1));L+=g.ANGLECOST*D*D;for(var B=A-R,O=F-P,G=A+R,$=F+P,X=0;X=E)&&(n<=x&&(n=x),u>=E&&(u=E),f=Math.floor((u-n)/c)+1,h=0),v=0;vx&&(m.unshift(x),y.unshift(y[0])),m[m.length-1]2?d.value=d.value.slice(2):d.length===0?d.value=[0,1]:d.length<2?(p=parseFloat(d.value[0]),d.value=[p,p+1]):d.value=[parseFloat(d.value[0]),parseFloat(d.value[1])]:t(d.value)&&(p=parseFloat(d.value),d.value=[p,p+1])):(h("contours.value",0),t(d.value)||(n(d.value)?d.value=parseFloat(d.value[0]):d.value=0))}}}),rae=ye({"src/traces/contour/defaults.js"(e,r){"use strict";var t=Yt(),a=KA(),i=ap(),o=cL(),s=fT(),l=hT(),n=ub(),u=cb();r.exports=function(f,h,d,p){function g(v,x){return t.coerce(f,h,u,v,x)}function m(v){return t.coerce2(f,h,u,v)}var y=a(f,h,g,p);if(!y){h.visible=!1;return}i(f,h,p,g),g("xhoverformat"),g("yhoverformat"),g("text"),g("hovertext"),g("hoverongaps"),g("hovertemplate"),g("hovertemplatefallback");var _=g("contours.type")==="constraint";g("connectgaps",t.isArray1D(h.z)),_?o(f,h,g,p,d):(s(f,h,g,m),l(f,h,g,p)),h.contours&&h.contours.coloring==="heatmap"&&n(g,p),g("zorder")}}}),aae=ye({"src/traces/contour/index.js"(e,r){"use strict";r.exports={attributes:cb(),supplyDefaults:rae(),calc:rL(),plot:dT().plot,style:pT(),colorbar:vT(),hoverPoints:uL(),moduleType:"trace",name:"contour",basePlotModule:Ml(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),iae=ye({"lib/contour.js"(e,r){"use strict";r.exports=aae()}}),fL=ye({"src/traces/scatterternary/attributes.js"(e,r){"use strict";var{hovertemplateAttrs:t,texttemplateAttrs:a,templatefallbackAttrs:i}=Ro(),o=Up(),s=al(),l=Oo(),n=rs(),u=Eu().dash,c=Xi().extendFlat,f=s.marker,h=s.line,d=f.line;r.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:c({},s.mode,{dflt:"markers"}),text:c({},s.text,{}),texttemplate:a({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:c({},s.hovertext,{}),line:{color:h.color,width:h.width,dash:u,backoff:h.backoff,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:s.connectgaps,cliponaxis:s.cliponaxis,fill:c({},s.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o(),marker:c({symbol:f.symbol,opacity:f.opacity,angle:f.angle,angleref:f.angleref,standoff:f.standoff,maxdisplayed:f.maxdisplayed,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,line:c({width:d.width,dash:d.dash,editType:"calc"},n("marker.line")),gradient:f.gradient,editType:"calc"},n("marker")),textfont:s.textfont,textposition:s.textposition,selected:s.selected,unselected:s.unselected,hoverinfo:c({},l.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:s.hoveron,hovertemplate:t(),hovertemplatefallback:i()}}}),nae=ye({"src/traces/scatterternary/defaults.js"(e,r){"use strict";var t=Yt(),a=jp(),i=ms(),o=kd(),s=ip(),l=_y(),n=np(),u=qp(),c=fL();r.exports=function(h,d,p,g){function m(C,w){return t.coerce(h,d,c,C,w)}var y=m("a"),_=m("b"),v=m("c"),x;if(y?(x=y.length,_?(x=Math.min(x,_.length),v&&(x=Math.min(x,v.length))):v?x=Math.min(x,v.length):x=0):_&&v&&(x=Math.min(_.length,v.length)),!x){d.visible=!1;return}d._length=x,m("sum"),m("text"),m("hovertext"),d.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback"));var E=x"),u.hovertemplate=g.hovertemplate,n}}}),cae=ye({"src/traces/scatterternary/event_data.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){if(i.xa&&(a.xaxis=i.xa),i.ya&&(a.yaxis=i.ya),s[l]){var n=s[l];a.a=n.a,a.b=n.b,a.c=n.c}else a.a=i.a,a.b=i.b,a.c=i.c;return a}}}),fae=ye({"src/plots/ternary/ternary.js"(e,r){"use strict";var t=ai(),a=li(),i=Yt(),o=i.strTranslate,s=i._,l=Ya(),n=$i(),u=Op(),c=Xi().extendFlat,f=ws(),h=qi(),d=_f(),p=Hs(),g=Np(),m=g.freeMode,y=g.rectMode,_=Cm(),v=lu().prepSelect,x=lu().selectOnClick,E=lu().clearOutline,M=lu().clearSelectionsCache,C=$l();function w(I,L){this.id=I.id,this.graphDiv=I.graphDiv,this.init(L),this.makeFramework(L),this.updateFx(L),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}r.exports=w;var k=w.prototype;k.init=function(I){this.container=I._ternarylayer,this.defs=I._defs,this.layoutId=I._uid,this.traceHash={},this.layers={}},k.plot=function(I,L){var B=this,O=L[B.id],G=L._size;B._hasClipOnAxisFalse=!1;for(var $=0;$T*N?(K=N,Y=K*T):(Y=J,K=Y/T),re=X*Y/J,se=Z*K/N,j=L.l+L.w*G-Y/2,q=L.t+L.h*(1-$)-K/2,B.x0=j,B.y0=q,B.w=Y,B.h=K,B.sum=H,B.xaxis={type:"linear",range:[W+2*V-H,H-W-2*U],domain:[G-re/2,G+re/2],_id:"x"},u(B.xaxis,B.graphDiv._fullLayout),B.xaxis.setScale(),B.xaxis.isPtWithinRange=function(ee){return ee.a>=B.aaxis.range[0]&&ee.a<=B.aaxis.range[1]&&ee.b>=B.baxis.range[1]&&ee.b<=B.baxis.range[0]&&ee.c>=B.caxis.range[1]&&ee.c<=B.caxis.range[0]},B.yaxis={type:"linear",range:[W,H-U-V],domain:[$-se/2,$+se/2],_id:"y"},u(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var le=B.yaxis.domain[0],ue=B.aaxis=c({},I.aaxis,{range:[W,H-U-V],side:"left",tickangle:(+I.aaxis.tickangle||0)-30,domain:[le,le+se*T],anchor:"free",position:0,_id:"y",_length:Y});u(ue,B.graphDiv._fullLayout),ue.setScale();var fe=B.baxis=c({},I.baxis,{range:[H-W-V,U],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:Y});u(fe,B.graphDiv._fullLayout),fe.setScale();var pe=B.caxis=c({},I.caxis,{range:[H-W-U,V],side:"right",tickangle:(+I.caxis.tickangle||0)+30,domain:[le,le+se*T],anchor:"free",position:0,_id:"y",_length:Y});u(pe,B.graphDiv._fullLayout),pe.setScale();var we="M"+j+","+(q+K)+"h"+Y+"l-"+Y/2+",-"+K+"Z";B.clipDef.select("path").attr("d",we),B.layers.plotbg.select("path").attr("d",we);var xe="M0,"+K+"h"+Y+"l-"+Y/2+",-"+K+"Z";B.clipDefRelative.select("path").attr("d",xe);var he=o(j,q);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",he),B.clipDefRelative.select("path").attr("transform",null);var oe=o(j-fe._offset,q+K);B.layers.baxis.attr("transform",oe),B.layers.bgrid.attr("transform",oe);var te=o(j+Y/2,q)+"rotate(30)"+o(0,-ue._offset);B.layers.aaxis.attr("transform",te),B.layers.agrid.attr("transform",te);var ie=o(j+Y/2,q)+"rotate(-30)"+o(0,-pe._offset);B.layers.caxis.attr("transform",ie),B.layers.cgrid.attr("transform",ie),B.drawAxes(!0),B.layers.aline.select("path").attr("d",ue.showline?"M"+j+","+(q+K)+"l"+Y/2+",-"+K:"M0,0").call(l.stroke,ue.linecolor||"#000").style("stroke-width",(ue.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",fe.showline?"M"+j+","+(q+K)+"h"+Y:"M0,0").call(l.stroke,fe.linecolor||"#000").style("stroke-width",(fe.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",pe.showline?"M"+(j+Y/2)+","+q+"l"+Y/2+","+K:"M0,0").call(l.stroke,pe.linecolor||"#000").style("stroke-width",(pe.linewidth||0)+"px"),B.graphDiv._context.staticPlot||B.initInteractions(),n.setClipUrl(B.layers.frontplot,B._hasClipOnAxisFalse?null:B.clipId,B.graphDiv)},k.drawAxes=function(I){var L=this,B=L.graphDiv,O=L.id.slice(7)+"title",G=L.layers,$=L.aaxis,X=L.baxis,Z=L.caxis;if(L.drawAx($),L.drawAx(X),L.drawAx(Z),I){var J=Math.max($.showticklabels?$.tickfont.size/2:0,(Z.showticklabels?Z.tickfont.size*.75:0)+(Z.ticks==="outside"?Z.ticklen*.87:0)),N=(X.showticklabels?X.tickfont.size:0)+(X.ticks==="outside"?X.ticklen:0)+3;G["a-title"]=_.draw(B,"a"+O,{propContainer:$,propName:L.id+".aaxis.title.text",placeholder:s(B,"Click to enter Component A title"),attributes:{x:L.x0+L.w/2,y:L.y0-$.title.font.size/3-J,"text-anchor":"middle"}}),G["b-title"]=_.draw(B,"b"+O,{propContainer:X,propName:L.id+".baxis.title.text",placeholder:s(B,"Click to enter Component B title"),attributes:{x:L.x0-N,y:L.y0+L.h+X.title.font.size*.83+N,"text-anchor":"middle"}}),G["c-title"]=_.draw(B,"c"+O,{propContainer:Z,propName:L.id+".caxis.title.text",placeholder:s(B,"Click to enter Component C title"),attributes:{x:L.x0+L.w+N,y:L.y0+L.h+Z.title.font.size*.83+N,"text-anchor":"middle"}})}},k.drawAx=function(I){var L=this,B=L.graphDiv,O=I._name,G=O.charAt(0),$=I._id,X=L.layers[O],Z=30,J=G+"tickLayout",N=b(I);L[J]!==N&&(X.selectAll("."+$+"tick").remove(),L[J]=N),I.setScale();var H=h.calcTicks(I),W=h.clipEnds(I,H),U=h.makeTransTickFn(I),V=h.getTickSigns(I)[2],j=i.deg2rad(Z),q=V*(I.linewidth||1)/2,Y=V*I.ticklen,K=L.w,re=L.h,se=G==="b"?"M0,"+q+"l"+Math.sin(j)*Y+","+Math.cos(j)*Y:"M"+q+",0l"+Math.cos(j)*Y+","+-Math.sin(j)*Y,le={a:"M0,0l"+re+",-"+K/2,b:"M0,0l-"+K/2+",-"+re,c:"M0,0l-"+re+","+K/2}[G];h.drawTicks(B,I,{vals:I.ticks==="inside"?W:H,layer:X,path:se,transFn:U,crisp:!1}),h.drawGrid(B,I,{vals:W,layer:L.layers[G+"grid"],path:le,transFn:U,crisp:!1}),h.drawLabels(B,I,{vals:H,layer:X,transFn:U,labelFns:h.makeLabelFns(I,0,Z)})};function b(I){return I.ticks+String(I.ticklen)+String(I.showticklabels)}var S=C.MINZOOM/2+.87,A="m-0.87,.5h"+S+"v3h-"+(S+5.2)+"l"+(S/2+2.6)+",-"+(S*.87+4.5)+"l2.6,1.5l-"+S/2+","+S*.87+"Z",F="m0.87,.5h-"+S+"v3h"+(S+5.2)+"l-"+(S/2+2.6)+",-"+(S*.87+4.5)+"l-2.6,1.5l"+S/2+","+S*.87+"Z",D="m0,1l"+S/2+","+S*.87+"l2.6,-1.5l-"+(S/2+2.6)+",-"+(S*.87+4.5)+"l-"+(S/2+2.6)+","+(S*.87+4.5)+"l2.6,1.5l"+S/2+",-"+S*.87+"Z",R="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",P=!0;k.clearOutline=function(){M(this.dragOptions),E(this.dragOptions.gd)},k.initInteractions=function(){var I=this,L=I.layers.plotbg.select("path").node(),B=I.graphDiv,O=B._fullLayout._zoomlayer,G,$;this.dragOptions={element:L,gd:B,plotinfo:{id:I.id,domain:B._fullLayout[I.id].domain,xaxis:I.xaxis,yaxis:I.yaxis},subplot:I.id,prepFn:function(oe,te,ie){I.dragOptions.xaxes=[I.xaxis],I.dragOptions.yaxes=[I.yaxis],G=B._fullLayout._invScaleX,$=B._fullLayout._invScaleY;var ee=I.dragOptions.dragmode=B._fullLayout.dragmode;m(ee)?I.dragOptions.minDrag=1:I.dragOptions.minDrag=void 0,ee==="zoom"?(I.dragOptions.moveFn=fe,I.dragOptions.clickFn=K,I.dragOptions.doneFn=pe,re(oe,te,ie)):ee==="pan"?(I.dragOptions.moveFn=xe,I.dragOptions.clickFn=K,I.dragOptions.doneFn=he,we(),I.clearOutline(B)):(y(ee)||m(ee))&&v(oe,te,ie,I.dragOptions,ee)}};var X,Z,J,N,H,W,U,V,j,q;function Y(oe){var te={};return te[I.id+".aaxis.min"]=oe.a,te[I.id+".baxis.min"]=oe.b,te[I.id+".caxis.min"]=oe.c,te}function K(oe,te){var ie=B._fullLayout.clickmode;z(B),oe===2&&(B.emit("plotly_doubleclick",null),a.call("_guiRelayout",B,Y({a:0,b:0,c:0}))),ie.indexOf("select")>-1&&oe===1&&x(te,B,[I.xaxis],[I.yaxis],I.id,I.dragOptions),ie.indexOf("event")>-1&&p.click(B,te,I.id)}function re(oe,te,ie){var ee=L.getBoundingClientRect();X=te-ee.left,Z=ie-ee.top,B._fullLayout._calcInverseTransform(B);var ce=B._fullLayout._invTransform,_e=i.apply3DTransform(ce)(X,Z);X=_e[0],Z=_e[1],J={a:I.aaxis.range[0],b:I.baxis.range[1],c:I.caxis.range[1]},H=J,N=I.aaxis.range[1]-J.a,W=l.luminosity(I.graphDiv._fullLayout[I.id].bgcolor),U="M0,"+I.h+"L"+I.w/2+", 0L"+I.w+","+I.h+"Z",V=!1,j=O.append("path").attr("class","zoombox").attr("transform",o(I.x0,I.y0)).style({fill:W>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",U),q=O.append("path").attr("class","zoombox-corners").attr("transform",o(I.x0,I.y0)).style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),I.clearOutline(B)}function se(oe,te){return 1-te/I.h}function le(oe,te){return 1-(oe+(I.h-te)/Math.sqrt(3))/I.w}function ue(oe,te){return(oe-(I.h-te)/Math.sqrt(3))/I.w}function fe(oe,te){var ie=X+oe*G,ee=Z+te*$,ce=Math.max(0,Math.min(1,se(X,Z),se(ie,ee))),_e=Math.max(0,Math.min(1,le(X,Z),le(ie,ee))),Se=Math.max(0,Math.min(1,ue(X,Z),ue(ie,ee))),Me=(ce/2+Se)*I.w,Ue=(1-ce/2-_e)*I.w,Ge=(Me+Ue)/2,Ze=Ue-Me,Ke=(1-ce)*I.h,dt=Ke-Ze/T;Ze.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),q.transition().style("opacity",1).duration(200),V=!0),B.emit("plotly_relayouting",Y(H))}function pe(){z(B),H!==J&&(a.call("_guiRelayout",B,Y(H)),P&&B.data&&B._context.showTips&&(i.notifier(s(B,"Double-click to zoom back out"),"long",B),P=!1))}function we(){J={a:I.aaxis.range[0],b:I.baxis.range[1],c:I.caxis.range[1]},H=J}function xe(oe,te){var ie=oe/I.xaxis._m,ee=te/I.yaxis._m;H={a:J.a-ee,b:J.b+(ie+ee)/2,c:J.c-(ie-ee)/2};var ce=[H.a,H.b,H.c].sort(i.sorterAsc),_e={a:ce.indexOf(H.a),b:ce.indexOf(H.b),c:ce.indexOf(H.c)};ce[0]<0&&(ce[1]+ce[0]/2<0?(ce[2]+=ce[0]+ce[1],ce[0]=ce[1]=0):(ce[2]+=ce[0]/2,ce[1]+=ce[0]/2,ce[0]=0),H={a:ce[_e.a],b:ce[_e.b],c:ce[_e.c]},te=(J.a-H.a)*I.yaxis._m,oe=(J.c-H.c-J.b+H.b)*I.xaxis._m);var Se=o(I.x0+oe,I.y0+te);I.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Se);var Me=o(-oe,-te);I.clipDefRelative.select("path").attr("transform",Me),I.aaxis.range=[H.a,I.sum-H.b-H.c],I.baxis.range=[I.sum-H.a-H.c,H.b],I.caxis.range=[I.sum-H.a-H.b,H.c],I.drawAxes(!1),I._hasClipOnAxisFalse&&I.plotContainer.select(".scatterlayer").selectAll(".trace").call(n.hideOutsideRangePoints,I),B.emit("plotly_relayouting",Y(H))}function he(){a.call("_guiRelayout",B,Y(H))}L.onmousemove=function(oe){p.hover(B,oe,I.id),B._fullLayout._lasthover=L,B._fullLayout._hoversubplot=I.id},L.onmouseout=function(oe){B._dragging||d.unhover(B,oe)},d.init(this.dragOptions)};function z(I){t.select(I).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),hL=ye({"src/plots/ternary/layout_attributes.js"(e,r){"use strict";var t=Wl(),a=Ds().attributes,i=Gu(),o=Cs().overrideAll,s=Xi().extendFlat,l={title:{text:i.title.text,font:i.title.font},color:i.color,tickmode:i.minor.tickmode,nticks:s({},i.nticks,{dflt:6,min:1}),tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:s({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:s({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash,layer:i.layer,min:{valType:"number",dflt:0,min:0}},n=r.exports=o({domain:a({name:"ternary"}),bgcolor:{valType:"color",dflt:t.background},sum:{valType:"number",dflt:1,min:0},aaxis:l,baxis:l,caxis:l},"plot","from-root");n.uirevision={valType:"any",editType:"none"},n.aaxis.uirevision=n.baxis.uirevision=n.caxis.uirevision={valType:"any",editType:"none"}}}),zm=ye({"src/plots/subplot_defaults.js"(e,r){"use strict";var t=Yt(),a=ko(),i=Ds().defaults;r.exports=function(s,l,n,u){var c=u.type,f=u.attributes,h=u.handleDefaults,d=u.partition||"x",p=l._subplots[c],g=p.length,m=g&&p[0].replace(/\d+$/,""),y,_;function v(C,w){return t.coerce(y,_,f,C,w)}for(var x=0;x=x&&(k.min=0,T.min=0,b.min=0,g.aaxis&&delete g.aaxis.min,g.baxis&&delete g.baxis.min,g.caxis&&delete g.caxis.min)}function p(g,m,y,_){var v=f[m._name];function x(S,A){return i.coerce(g,m,v,S,A)}x("uirevision",_.uirevision),m.type="linear";var E=x("color"),M=E!==v.color.dflt?E:y.font.color,C=m._name,w=C.charAt(0).toUpperCase(),k="Component "+w,T=x("title.text",k);m._hovertitle=T===k?T:w,i.coerceFont(x,"title.font",y.font,{overrideDflt:{size:i.bigFont(y.font.size),color:M}}),x("min"),u(g,m,x,"linear"),l(g,m,x,"linear"),s(g,m,x,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),n(g,m,x,{outerTicks:!0});var b=x("showticklabels");b&&(i.coerceFont(x,"tickfont",y.font,{overrideDflt:{color:M}}),x("tickangle"),x("tickformat")),c(g,m,x,{dfltColor:E,bgColor:y.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:v}),x("hoverformat"),x("layer")}}}),dae=ye({"src/plots/ternary/index.js"(e){"use strict";var r=fae(),t=_c().getSubplotCalcData,a=Yt().counterRegex,i="ternary";e.name=i;var o=e.attr="subplot";e.idRoot=i,e.idRegex=e.attrRegex=a(i);var s=e.attributes={};s[o]={valType:"subplotid",dflt:"ternary",editType:"calc"},e.layoutAttributes=hL(),e.supplyLayoutDefaults=hae(),e.plot=function(n){for(var u=n._fullLayout,c=n.calcdata,f=u._subplots[i],h=0;h0){var C=n.xa,w=n.ya,k,T,b,S,A;g.orientation==="h"?(A=u,k="y",b=w,T="x",S=C):(A=c,k="x",b=C,T="y",S=w);var F=p[n.index];if(A>=F.span[0]&&A<=F.span[1]){var D=a.extendFlat({},n),R=S.c2p(A,!0),P=s.getKdeValue(F,g,A),z=s.getPositionOnKdePath(F,g,R),I=b._offset,L=b._length;D[k+"0"]=z[0],D[k+"1"]=z[1],D[T+"0"]=D[T+"1"]=R,D[T+"Label"]=T+": "+i.hoverLabelText(S,A,g[T+"hoverformat"])+", "+p[0].t.labels.kde+" "+P.toFixed(3);for(var B=0,O=0;O path").each(function(y){if(!y.isBlank){var _=m.marker;t.select(this).call(i.fill,y.mc||_.color).call(i.stroke,y.mlc||_.line.color).call(a.dashLine,_.line.dash,y.mlw||_.line.width).style("opacity",m.selectedpoints&&!y.selected?o:1)}}),n(g,m,c),g.selectAll(".regions").each(function(){t.select(this).selectAll("path").style("stroke-width",0).call(i.fill,m.connector.fillcolor)}),g.selectAll(".lines").each(function(){var y=m.connector.line;a.lineGroupStyle(t.select(this).selectAll("path"),y.width,y.color,y.dash)})})}r.exports={style:u}}}),Fae=ye({"src/traces/funnel/hover.js"(e,r){"use strict";var t=Ya().opacity,a=Ay().hoverOnBars,i=Yt().formatPercent;r.exports=function(l,n,u,c,f){var h=a(l,n,u,c,f);if(h){var d=h.cd,p=d[0].trace,g=p.orientation==="h",m=h.index,y=d[m],_=g?"x":"y";h[_+"LabelVal"]=y.s,h.percentInitial=y.begR,h.percentInitialLabel=i(y.begR,1),h.percentPrevious=y.difR,h.percentPreviousLabel=i(y.difR,1),h.percentTotal=y.sumR,h.percentTotalLabel=i(y.sumR,1);var v=y.hi||p.hoverinfo,x=[];if(v&&v!=="none"&&v!=="skip"){var E=v==="all",M=v.split("+"),C=function(w){return E||M.indexOf(w)!==-1};C("percent initial")&&x.push(h.percentInitialLabel+" of initial"),C("percent previous")&&x.push(h.percentPreviousLabel+" of previous"),C("percent total")&&x.push(h.percentTotalLabel+" of total")}return h.extraText=x.join("
"),h.color=o(p,y),[h]}};function o(s,l){var n=s.marker,u=l.mc||n.color,c=l.mlc||n.line.color,f=l.mlw||n.line.width;if(t(u))return u;if(t(c)&&f)return c}}}),Pae=ye({"src/traces/funnel/event_data.js"(e,r){"use strict";r.exports=function(a,i){return a.x="xVal"in i?i.xVal:i.x,a.y="yVal"in i?i.yVal:i.y,"percentInitial"in i&&(a.percentInitial=i.percentInitial),"percentPrevious"in i&&(a.percentPrevious=i.percentPrevious),"percentTotal"in i&&(a.percentTotal=i.percentTotal),i.xa&&(a.xaxis=i.xa),i.ya&&(a.yaxis=i.ya),a}}}),Iae=ye({"src/traces/funnel/index.js"(e,r){"use strict";r.exports={attributes:vL(),layoutAttributes:mL(),supplyDefaults:gL().supplyDefaults,crossTraceDefaults:gL().crossTraceDefaults,supplyLayoutDefaults:Eae(),calc:kae(),crossTraceCalc:Cae(),plot:Dae(),style:Lae().style,hoverPoints:Fae(),eventData:Pae(),selectPoints:Ty(),moduleType:"trace",name:"funnel",basePlotModule:Ml(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Rae=ye({"lib/funnel.js"(e,r){"use strict";r.exports=Iae()}}),zae=ye({"src/traces/waterfall/constants.js"(e,r){"use strict";r.exports={eventDataKeys:["initial","delta","final"]}}}),yL=ye({"src/traces/waterfall/attributes.js"(e,r){"use strict";var t=Gp(),a=al().line,i=Oo(),o=zs().axisHoverFormat,{hovertemplateAttrs:s,texttemplateAttrs:l,templatefallbackAttrs:n}=Ro(),u=zae(),c=Xi().extendFlat,f=Ya();function h(d){return{marker:{color:c({},t.marker.color,{arrayOk:!1,editType:"style"}),line:{color:c({},t.marker.line.color,{arrayOk:!1,editType:"style"}),width:c({},t.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}r.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:t.x,x0:t.x0,dx:t.dx,y:t.y,y0:t.y0,dy:t.dy,xperiod:t.xperiod,yperiod:t.yperiod,xperiod0:t.xperiod0,yperiod0:t.yperiod0,xperiodalignment:t.xperiodalignment,yperiodalignment:t.yperiodalignment,xhoverformat:o("x"),yhoverformat:o("y"),hovertext:t.hovertext,hovertemplate:s({},{keys:u.eventDataKeys}),hovertemplatefallback:n(),hoverinfo:c({},i.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:l({editType:"plot"},{keys:u.eventDataKeys.concat(["label"])}),texttemplatefallback:n({editType:"plot"}),text:t.text,textposition:t.textposition,insidetextanchor:t.insidetextanchor,textangle:t.textangle,textfont:t.textfont,insidetextfont:t.insidetextfont,outsidetextfont:t.outsidetextfont,constraintext:t.constraintext,cliponaxis:t.cliponaxis,orientation:t.orientation,offset:t.offset,width:t.width,increasing:h("increasing"),decreasing:h("decreasing"),totals:h("intermediate sums and total"),connector:{line:{color:c({},a.color,{dflt:f.defaultLine}),width:c({},a.width,{editType:"plot"}),dash:a.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:t.offsetgroup,alignmentgroup:t.alignmentgroup,zorder:t.zorder}}}),_L=ye({"src/traces/waterfall/layout_attributes.js"(e,r){"use strict";r.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"}}}}),Sy=ye({"src/constants/delta.js"(e,r){"use strict";r.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),xL=ye({"src/traces/waterfall/defaults.js"(e,r){"use strict";var t=Yt(),a=Fm(),i=Oh().handleText,o=Lm(),s=ap(),l=yL(),n=Ya(),u=Sy(),c=u.INCREASING.COLOR,f=u.DECREASING.COLOR,h="#4499FF";function d(m,y,_){m(y+".marker.color",_),m(y+".marker.line.color",n.defaultLine),m(y+".marker.line.width")}function p(m,y,_,v){function x(k,T){return t.coerce(m,y,l,k,T)}var E=o(m,y,v,x);if(!E){y.visible=!1;return}s(m,y,v,x),x("xhoverformat"),x("yhoverformat"),x("measure"),x("orientation",y.x&&!y.y?"h":"v"),x("base"),x("offset"),x("width"),x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback");var M=x("textposition");i(m,y,v,x,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),y.textposition!=="none"&&(x("texttemplate"),x("texttemplatefallback"),y.texttemplate||x("textinfo")),d(x,"increasing",c),d(x,"decreasing",f),d(x,"totals",h);var C=x("connector.visible");if(C){x("connector.mode");var w=x("connector.line.width");w&&(x("connector.line.color"),x("connector.line.dash"))}x("zorder")}function g(m,y){var _,v;function x(M){return t.coerce(v._input,v,l,M)}if(y.waterfallmode==="group")for(var E=0;E0&&(x?A+="M"+b[0]+","+S[1]+"V"+S[0]:A+="M"+b[1]+","+S[0]+"H"+b[0]),E!=="between"&&(w.isSum||k path").each(function(y){if(!y.isBlank){var _=m[y.dir].marker;t.select(this).call(i.fill,_.color).call(i.stroke,_.line.color).call(a.dashLine,_.line.dash,_.line.width).style("opacity",m.selectedpoints&&!y.selected?o:1)}}),n(g,m,c),g.selectAll(".lines").each(function(){var y=m.connector.line;a.lineGroupStyle(t.select(this).selectAll("path"),y.width,y.color,y.dash)})})}r.exports={style:u}}}),qae=ye({"src/traces/waterfall/hover.js"(e,r){"use strict";var t=qi().hoverLabelText,a=Ya().opacity,i=Ay().hoverOnBars,o=Sy(),s={increasing:o.INCREASING.SYMBOL,decreasing:o.DECREASING.SYMBOL};r.exports=function(u,c,f,h,d){var p=i(u,c,f,h,d);if(!p)return;var g=p.cd,m=g[0].trace,y=m.orientation==="h",_=y?"x":"y",v=y?u.xa:u.ya;function x(F){return t(v,F,m[_+"hoverformat"])}var E=p.index,M=g[E],C=M.isSum?M.b+M.s:M.rawS;p.initial=M.b+M.s-C,p.delta=C,p.final=p.initial+p.delta;var w=x(Math.abs(p.delta));p.deltaLabel=C<0?"("+w+")":w,p.finalLabel=x(p.final),p.initialLabel=x(p.initial);var k=M.hi||m.hoverinfo,T=[];if(k&&k!=="none"&&k!=="skip"){var b=k==="all",S=k.split("+"),A=function(F){return b||S.indexOf(F)!==-1};M.isSum||(A("final")&&(y?!A("x"):!A("y"))&&T.push(p.finalLabel),A("delta")&&(C<0?T.push(p.deltaLabel+" "+s.decreasing):T.push(p.deltaLabel+" "+s.increasing)),A("initial")&&T.push("Initial: "+p.initialLabel))}return T.length&&(p.extraText=T.join("
")),p.color=l(m,M),[p]};function l(n,u){var c=n[u.dir].marker,f=c.color,h=c.line.color,d=c.line.width;if(a(f))return f;if(a(h)&&d)return h}}}),Vae=ye({"src/traces/waterfall/event_data.js"(e,r){"use strict";r.exports=function(a,i){return a.x="xVal"in i?i.xVal:i.x,a.y="yVal"in i?i.yVal:i.y,"initial"in i&&(a.initial=i.initial),"delta"in i&&(a.delta=i.delta),"final"in i&&(a.final=i.final),i.xa&&(a.xaxis=i.xa),i.ya&&(a.yaxis=i.ya),a}}}),Gae=ye({"src/traces/waterfall/index.js"(e,r){"use strict";r.exports={attributes:yL(),layoutAttributes:_L(),supplyDefaults:xL().supplyDefaults,crossTraceDefaults:xL().crossTraceDefaults,supplyLayoutDefaults:Bae(),calc:Oae(),crossTraceCalc:Nae(),plot:jae(),style:Uae().style,hoverPoints:qae(),eventData:Vae(),selectPoints:Ty(),moduleType:"trace",name:"waterfall",basePlotModule:Ml(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Hae=ye({"lib/waterfall.js"(e,r){"use strict";r.exports=Gae()}}),ky=ye({"src/traces/image/constants.js"(e,r){"use strict";r.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(t){return t.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(t){return t.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(t){return t.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(t){var a=t.slice(0,3);return a[1]=a[1]+"%",a[2]=a[2]+"%",a},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(t){var a=t.slice(0,4);return a[1]=a[1]+"%",a[2]=a[2]+"%",a},suffix:["\xB0","%","%",""]}}}}}),gT={};rl(gT,{default:()=>EL});var bL,wL,yT,AL,TL,_T,xT,bT,ML,EL,SL=Si({"src/traces/image/attributes.ts"(){"use strict";bL=Vs(Xi()),wL=Vs(Oo()),yT=Vs(Ro()),AL=Vs(al()),TL=Vs(ky()),_T=["rgb","rgba","rgba256","hsl","hsla"],xT=[],bT=[];for(let e of _T){let r=TL.colormodel[e];xT.push(`For the \`${e}\` colormodel, it is [${(r.zminDflt||r.min).join(", ")}].`),bT.push(`For the \`${e}\` colormodel, it is [${(r.zmaxDflt||r.max).join(", ")}].`)}ML={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:_T,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",xT.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",bT.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,bL.extendFlat)({},wL.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,yT.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,yT.templatefallbackAttrs)(),zorder:AL.zorder},EL=ML}}),Wae=ye({"src/traces/image/defaults.js"(e,r){"use strict";var t=Yt(),a=(SL(),On(gT)).default,i=ky(),o=h0().IMAGE_URL_PREFIX;r.exports=function(l,n){function u(h,d){return t.coerce(l,n,a,h,d)}u("source"),n.source&&!n.source.match(o)&&delete n.source,n._hasSource=!!n.source;var c=u("z");if(n._hasZ=!(c===void 0||!c.length||!c[0]||!c[0].length),!n._hasZ&&!n._hasSource){n.visible=!1;return}u("x0"),u("y0"),u("dx"),u("dy");var f;n._hasZ?(u("colormodel","rgb"),f=i.colormodel[n.colormodel],u("zmin",f.zminDflt||f.min),u("zmax",f.zmaxDflt||f.max)):n._hasSource&&(n.colormodel="rgba256",f=i.colormodel[n.colormodel],n.zmin=f.zminDflt,n.zmax=f.zmaxDflt),u("zsmooth"),u("text"),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),n._length=null,u("zorder")}}}),d0=ye({"node_modules/inherits/inherits_browser.js"(e,r){typeof Object.create=="function"?r.exports=function(a,i){i&&(a.super_=i,a.prototype=Object.create(i.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))}:r.exports=function(a,i){if(i){a.super_=i;var o=function(){};o.prototype=i.prototype,a.prototype=new o,a.prototype.constructor=a}}}}),kL=ye({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(e,r){r.exports=Sm().EventEmitter}}),$ae=ye({"node_modules/base64-js/index.js"(e){"use strict";e.byteLength=n,e.toByteArray=c,e.fromByteArray=d;var r=[],t=[],a=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var m=p.indexOf("=");m===-1&&(m=g);var y=m===g?0:4-m%4;return[m,y]}function n(p){var g=l(p),m=g[0],y=g[1];return(m+y)*3/4-y}function u(p,g,m){return(g+m)*3/4-m}function c(p){var g,m=l(p),y=m[0],_=m[1],v=new a(u(p,y,_)),x=0,E=_>0?y-4:y,M;for(M=0;M>16&255,v[x++]=g>>8&255,v[x++]=g&255;return _===2&&(g=t[p.charCodeAt(M)]<<2|t[p.charCodeAt(M+1)]>>4,v[x++]=g&255),_===1&&(g=t[p.charCodeAt(M)]<<10|t[p.charCodeAt(M+1)]<<4|t[p.charCodeAt(M+2)]>>2,v[x++]=g>>8&255,v[x++]=g&255),v}function f(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[p&63]}function h(p,g,m){for(var y,_=[],v=g;vE?E:x+v));return y===1?(g=p[m-1],_.push(r[g>>2]+r[g<<4&63]+"==")):y===2&&(g=(p[m-2]<<8)+p[m-1],_.push(r[g>>10]+r[g>>4&63]+r[g<<2&63]+"=")),_.join("")}}}),Yae=ye({"node_modules/ieee754/index.js"(e){e.read=function(r,t,a,i,o){var s,l,n=o*8-i-1,u=(1<>1,f=-7,h=a?o-1:0,d=a?-1:1,p=r[t+h];for(h+=d,s=p&(1<<-f)-1,p>>=-f,f+=n;f>0;s=s*256+r[t+h],h+=d,f-=8);for(l=s&(1<<-f)-1,s>>=-f,f+=i;f>0;l=l*256+r[t+h],h+=d,f-=8);if(s===0)s=1-c;else{if(s===u)return l?NaN:(p?-1:1)*(1/0);l=l+Math.pow(2,i),s=s-c}return(p?-1:1)*l*Math.pow(2,s-i)},e.write=function(r,t,a,i,o,s){var l,n,u,c=s*8-o-1,f=(1<>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,g=i?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(n=isNaN(t)?1:0,l=f):(l=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-l))<1&&(l--,u*=2),l+h>=1?t+=d/u:t+=d*Math.pow(2,1-h),t*u>=2&&(l++,u/=2),l+h>=f?(n=0,l=f):l+h>=1?(n=(t*u-1)*Math.pow(2,o),l=l+h):(n=t*Math.pow(2,h-1)*Math.pow(2,o),l=0));o>=8;r[a+p]=n&255,p+=g,n/=256,o-=8);for(l=l<0;r[a+p]=l&255,p+=g,l/=256,c-=8);r[a+p-g]|=m*128}}}),Bm=ye({"node_modules/buffer/index.js"(e){"use strict";var r=$ae(),t=Yae(),a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,l.TYPED_ARRAY_SUPPORT=o(),!l.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 o(){try{let te=new Uint8Array(1),ie={foo:function(){return 42}};return Object.setPrototypeOf(ie,Uint8Array.prototype),Object.setPrototypeOf(te,ie),te.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function s(te){if(te>i)throw new RangeError('The value "'+te+'" is invalid for option "size"');let ie=new Uint8Array(te);return Object.setPrototypeOf(ie,l.prototype),ie}function l(te,ie,ee){if(typeof te=="number"){if(typeof ie=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(te)}return n(te,ie,ee)}l.poolSize=8192;function n(te,ie,ee){if(typeof te=="string")return h(te,ie);if(ArrayBuffer.isView(te))return p(te);if(te==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof te);if(pe(te,ArrayBuffer)||te&&pe(te.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(te,SharedArrayBuffer)||te&&pe(te.buffer,SharedArrayBuffer)))return g(te,ie,ee);if(typeof te=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let ce=te.valueOf&&te.valueOf();if(ce!=null&&ce!==te)return l.from(ce,ie,ee);let _e=m(te);if(_e)return _e;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof te[Symbol.toPrimitive]=="function")return l.from(te[Symbol.toPrimitive]("string"),ie,ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof te)}l.from=function(te,ie,ee){return n(te,ie,ee)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function u(te){if(typeof te!="number")throw new TypeError('"size" argument must be of type number');if(te<0)throw new RangeError('The value "'+te+'" is invalid for option "size"')}function c(te,ie,ee){return u(te),te<=0?s(te):ie!==void 0?typeof ee=="string"?s(te).fill(ie,ee):s(te).fill(ie):s(te)}l.alloc=function(te,ie,ee){return c(te,ie,ee)};function f(te){return u(te),s(te<0?0:y(te)|0)}l.allocUnsafe=function(te){return f(te)},l.allocUnsafeSlow=function(te){return f(te)};function h(te,ie){if((typeof ie!="string"||ie==="")&&(ie="utf8"),!l.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie);let ee=v(te,ie)|0,ce=s(ee),_e=ce.write(te,ie);return _e!==ee&&(ce=ce.slice(0,_e)),ce}function d(te){let ie=te.length<0?0:y(te.length)|0,ee=s(ie);for(let ce=0;ce=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return te|0}function _(te){return+te!=te&&(te=0),l.alloc(+te)}l.isBuffer=function(ie){return ie!=null&&ie._isBuffer===!0&&ie!==l.prototype},l.compare=function(ie,ee){if(pe(ie,Uint8Array)&&(ie=l.from(ie,ie.offset,ie.byteLength)),pe(ee,Uint8Array)&&(ee=l.from(ee,ee.offset,ee.byteLength)),!l.isBuffer(ie)||!l.isBuffer(ee))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ie===ee)return 0;let ce=ie.length,_e=ee.length;for(let Se=0,Me=Math.min(ce,_e);Se_e.length?(l.isBuffer(Me)||(Me=l.from(Me)),Me.copy(_e,Se)):Uint8Array.prototype.set.call(_e,Me,Se);else if(l.isBuffer(Me))Me.copy(_e,Se);else throw new TypeError('"list" argument must be an Array of Buffers');Se+=Me.length}return _e};function v(te,ie){if(l.isBuffer(te))return te.length;if(ArrayBuffer.isView(te)||pe(te,ArrayBuffer))return te.byteLength;if(typeof te!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof te);let ee=te.length,ce=arguments.length>2&&arguments[2]===!0;if(!ce&&ee===0)return 0;let _e=!1;for(;;)switch(ie){case"ascii":case"latin1":case"binary":return ee;case"utf8":case"utf-8":return re(te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee*2;case"hex":return ee>>>1;case"base64":return ue(te).length;default:if(_e)return ce?-1:re(te).length;ie=(""+ie).toLowerCase(),_e=!0}}l.byteLength=v;function x(te,ie,ee){let ce=!1;if((ie===void 0||ie<0)&&(ie=0),ie>this.length||((ee===void 0||ee>this.length)&&(ee=this.length),ee<=0)||(ee>>>=0,ie>>>=0,ee<=ie))return"";for(te||(te="utf8");;)switch(te){case"hex":return I(this,ie,ee);case"utf8":case"utf-8":return F(this,ie,ee);case"ascii":return P(this,ie,ee);case"latin1":case"binary":return z(this,ie,ee);case"base64":return A(this,ie,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,ie,ee);default:if(ce)throw new TypeError("Unknown encoding: "+te);te=(te+"").toLowerCase(),ce=!0}}l.prototype._isBuffer=!0;function E(te,ie,ee){let ce=te[ie];te[ie]=te[ee],te[ee]=ce}l.prototype.swap16=function(){let ie=this.length;if(ie%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ee=0;eeee&&(ie+=" ... "),""},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(ie,ee,ce,_e,Se){if(pe(ie,Uint8Array)&&(ie=l.from(ie,ie.offset,ie.byteLength)),!l.isBuffer(ie))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ie);if(ee===void 0&&(ee=0),ce===void 0&&(ce=ie?ie.length:0),_e===void 0&&(_e=0),Se===void 0&&(Se=this.length),ee<0||ce>ie.length||_e<0||Se>this.length)throw new RangeError("out of range index");if(_e>=Se&&ee>=ce)return 0;if(_e>=Se)return-1;if(ee>=ce)return 1;if(ee>>>=0,ce>>>=0,_e>>>=0,Se>>>=0,this===ie)return 0;let Me=Se-_e,Ue=ce-ee,Ge=Math.min(Me,Ue),Ze=this.slice(_e,Se),Ke=ie.slice(ee,ce);for(let dt=0;dt2147483647?ee=2147483647:ee<-2147483648&&(ee=-2147483648),ee=+ee,we(ee)&&(ee=_e?0:te.length-1),ee<0&&(ee=te.length+ee),ee>=te.length){if(_e)return-1;ee=te.length-1}else if(ee<0)if(_e)ee=0;else return-1;if(typeof ie=="string"&&(ie=l.from(ie,ce)),l.isBuffer(ie))return ie.length===0?-1:C(te,ie,ee,ce,_e);if(typeof ie=="number")return ie=ie&255,typeof Uint8Array.prototype.indexOf=="function"?_e?Uint8Array.prototype.indexOf.call(te,ie,ee):Uint8Array.prototype.lastIndexOf.call(te,ie,ee):C(te,[ie],ee,ce,_e);throw new TypeError("val must be string, number or Buffer")}function C(te,ie,ee,ce,_e){let Se=1,Me=te.length,Ue=ie.length;if(ce!==void 0&&(ce=String(ce).toLowerCase(),ce==="ucs2"||ce==="ucs-2"||ce==="utf16le"||ce==="utf-16le")){if(te.length<2||ie.length<2)return-1;Se=2,Me/=2,Ue/=2,ee/=2}function Ge(Ke,dt){return Se===1?Ke[dt]:Ke.readUInt16BE(dt*Se)}let Ze;if(_e){let Ke=-1;for(Ze=ee;ZeMe&&(ee=Me-Ue),Ze=ee;Ze>=0;Ze--){let Ke=!0;for(let dt=0;dt_e&&(ce=_e)):ce=_e;let Se=ie.length;ce>Se/2&&(ce=Se/2);let Me;for(Me=0;Me>>0,isFinite(ce)?(ce=ce>>>0,_e===void 0&&(_e="utf8")):(_e=ce,ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Se=this.length-ee;if((ce===void 0||ce>Se)&&(ce=Se),ie.length>0&&(ce<0||ee<0)||ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");_e||(_e="utf8");let Me=!1;for(;;)switch(_e){case"hex":return w(this,ie,ee,ce);case"utf8":case"utf-8":return k(this,ie,ee,ce);case"ascii":case"latin1":case"binary":return T(this,ie,ee,ce);case"base64":return b(this,ie,ee,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,ie,ee,ce);default:if(Me)throw new TypeError("Unknown encoding: "+_e);_e=(""+_e).toLowerCase(),Me=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(te,ie,ee){return ie===0&&ee===te.length?r.fromByteArray(te):r.fromByteArray(te.slice(ie,ee))}function F(te,ie,ee){ee=Math.min(te.length,ee);let ce=[],_e=ie;for(;_e239?4:Se>223?3:Se>191?2:1;if(_e+Ue<=ee){let Ge,Ze,Ke,dt;switch(Ue){case 1:Se<128&&(Me=Se);break;case 2:Ge=te[_e+1],(Ge&192)===128&&(dt=(Se&31)<<6|Ge&63,dt>127&&(Me=dt));break;case 3:Ge=te[_e+1],Ze=te[_e+2],(Ge&192)===128&&(Ze&192)===128&&(dt=(Se&15)<<12|(Ge&63)<<6|Ze&63,dt>2047&&(dt<55296||dt>57343)&&(Me=dt));break;case 4:Ge=te[_e+1],Ze=te[_e+2],Ke=te[_e+3],(Ge&192)===128&&(Ze&192)===128&&(Ke&192)===128&&(dt=(Se&15)<<18|(Ge&63)<<12|(Ze&63)<<6|Ke&63,dt>65535&&dt<1114112&&(Me=dt))}}Me===null?(Me=65533,Ue=1):Me>65535&&(Me-=65536,ce.push(Me>>>10&1023|55296),Me=56320|Me&1023),ce.push(Me),_e+=Ue}return R(ce)}var D=4096;function R(te){let ie=te.length;if(ie<=D)return String.fromCharCode.apply(String,te);let ee="",ce=0;for(;cece)&&(ee=ce);let _e="";for(let Se=ie;Sece&&(ie=ce),ee<0?(ee+=ce,ee<0&&(ee=0)):ee>ce&&(ee=ce),eeee)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(ie,ee,ce){ie=ie>>>0,ee=ee>>>0,ce||B(ie,ee,this.length);let _e=this[ie],Se=1,Me=0;for(;++Me>>0,ee=ee>>>0,ce||B(ie,ee,this.length);let _e=this[ie+--ee],Se=1;for(;ee>0&&(Se*=256);)_e+=this[ie+--ee]*Se;return _e},l.prototype.readUint8=l.prototype.readUInt8=function(ie,ee){return ie=ie>>>0,ee||B(ie,1,this.length),this[ie]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(ie,ee){return ie=ie>>>0,ee||B(ie,2,this.length),this[ie]|this[ie+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(ie,ee){return ie=ie>>>0,ee||B(ie,2,this.length),this[ie]<<8|this[ie+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(ie,ee){return ie=ie>>>0,ee||B(ie,4,this.length),(this[ie]|this[ie+1]<<8|this[ie+2]<<16)+this[ie+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(ie,ee){return ie=ie>>>0,ee||B(ie,4,this.length),this[ie]*16777216+(this[ie+1]<<16|this[ie+2]<<8|this[ie+3])},l.prototype.readBigUInt64LE=he(function(ie){ie=ie>>>0,j(ie,"offset");let ee=this[ie],ce=this[ie+7];(ee===void 0||ce===void 0)&&q(ie,this.length-8);let _e=ee+this[++ie]*2**8+this[++ie]*2**16+this[++ie]*2**24,Se=this[++ie]+this[++ie]*2**8+this[++ie]*2**16+ce*2**24;return BigInt(_e)+(BigInt(Se)<>>0,j(ie,"offset");let ee=this[ie],ce=this[ie+7];(ee===void 0||ce===void 0)&&q(ie,this.length-8);let _e=ee*2**24+this[++ie]*2**16+this[++ie]*2**8+this[++ie],Se=this[++ie]*2**24+this[++ie]*2**16+this[++ie]*2**8+ce;return(BigInt(_e)<>>0,ee=ee>>>0,ce||B(ie,ee,this.length);let _e=this[ie],Se=1,Me=0;for(;++Me=Se&&(_e-=Math.pow(2,8*ee)),_e},l.prototype.readIntBE=function(ie,ee,ce){ie=ie>>>0,ee=ee>>>0,ce||B(ie,ee,this.length);let _e=ee,Se=1,Me=this[ie+--_e];for(;_e>0&&(Se*=256);)Me+=this[ie+--_e]*Se;return Se*=128,Me>=Se&&(Me-=Math.pow(2,8*ee)),Me},l.prototype.readInt8=function(ie,ee){return ie=ie>>>0,ee||B(ie,1,this.length),this[ie]&128?(255-this[ie]+1)*-1:this[ie]},l.prototype.readInt16LE=function(ie,ee){ie=ie>>>0,ee||B(ie,2,this.length);let ce=this[ie]|this[ie+1]<<8;return ce&32768?ce|4294901760:ce},l.prototype.readInt16BE=function(ie,ee){ie=ie>>>0,ee||B(ie,2,this.length);let ce=this[ie+1]|this[ie]<<8;return ce&32768?ce|4294901760:ce},l.prototype.readInt32LE=function(ie,ee){return ie=ie>>>0,ee||B(ie,4,this.length),this[ie]|this[ie+1]<<8|this[ie+2]<<16|this[ie+3]<<24},l.prototype.readInt32BE=function(ie,ee){return ie=ie>>>0,ee||B(ie,4,this.length),this[ie]<<24|this[ie+1]<<16|this[ie+2]<<8|this[ie+3]},l.prototype.readBigInt64LE=he(function(ie){ie=ie>>>0,j(ie,"offset");let ee=this[ie],ce=this[ie+7];(ee===void 0||ce===void 0)&&q(ie,this.length-8);let _e=this[ie+4]+this[ie+5]*2**8+this[ie+6]*2**16+(ce<<24);return(BigInt(_e)<>>0,j(ie,"offset");let ee=this[ie],ce=this[ie+7];(ee===void 0||ce===void 0)&&q(ie,this.length-8);let _e=(ee<<24)+this[++ie]*2**16+this[++ie]*2**8+this[++ie];return(BigInt(_e)<>>0,ee||B(ie,4,this.length),t.read(this,ie,!0,23,4)},l.prototype.readFloatBE=function(ie,ee){return ie=ie>>>0,ee||B(ie,4,this.length),t.read(this,ie,!1,23,4)},l.prototype.readDoubleLE=function(ie,ee){return ie=ie>>>0,ee||B(ie,8,this.length),t.read(this,ie,!0,52,8)},l.prototype.readDoubleBE=function(ie,ee){return ie=ie>>>0,ee||B(ie,8,this.length),t.read(this,ie,!1,52,8)};function O(te,ie,ee,ce,_e,Se){if(!l.isBuffer(te))throw new TypeError('"buffer" argument must be a Buffer instance');if(ie>_e||iete.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(ie,ee,ce,_e){if(ie=+ie,ee=ee>>>0,ce=ce>>>0,!_e){let Ue=Math.pow(2,8*ce)-1;O(this,ie,ee,ce,Ue,0)}let Se=1,Me=0;for(this[ee]=ie&255;++Me>>0,ce=ce>>>0,!_e){let Ue=Math.pow(2,8*ce)-1;O(this,ie,ee,ce,Ue,0)}let Se=ce-1,Me=1;for(this[ee+Se]=ie&255;--Se>=0&&(Me*=256);)this[ee+Se]=ie/Me&255;return ee+ce},l.prototype.writeUint8=l.prototype.writeUInt8=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,1,255,0),this[ee]=ie&255,ee+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,2,65535,0),this[ee]=ie&255,this[ee+1]=ie>>>8,ee+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,2,65535,0),this[ee]=ie>>>8,this[ee+1]=ie&255,ee+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,4,4294967295,0),this[ee+3]=ie>>>24,this[ee+2]=ie>>>16,this[ee+1]=ie>>>8,this[ee]=ie&255,ee+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,4,4294967295,0),this[ee]=ie>>>24,this[ee+1]=ie>>>16,this[ee+2]=ie>>>8,this[ee+3]=ie&255,ee+4};function G(te,ie,ee,ce,_e){V(ie,ce,_e,te,ee,7);let Se=Number(ie&BigInt(4294967295));te[ee++]=Se,Se=Se>>8,te[ee++]=Se,Se=Se>>8,te[ee++]=Se,Se=Se>>8,te[ee++]=Se;let Me=Number(ie>>BigInt(32)&BigInt(4294967295));return te[ee++]=Me,Me=Me>>8,te[ee++]=Me,Me=Me>>8,te[ee++]=Me,Me=Me>>8,te[ee++]=Me,ee}function $(te,ie,ee,ce,_e){V(ie,ce,_e,te,ee,7);let Se=Number(ie&BigInt(4294967295));te[ee+7]=Se,Se=Se>>8,te[ee+6]=Se,Se=Se>>8,te[ee+5]=Se,Se=Se>>8,te[ee+4]=Se;let Me=Number(ie>>BigInt(32)&BigInt(4294967295));return te[ee+3]=Me,Me=Me>>8,te[ee+2]=Me,Me=Me>>8,te[ee+1]=Me,Me=Me>>8,te[ee]=Me,ee+8}l.prototype.writeBigUInt64LE=he(function(ie,ee=0){return G(this,ie,ee,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=he(function(ie,ee=0){return $(this,ie,ee,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(ie,ee,ce,_e){if(ie=+ie,ee=ee>>>0,!_e){let Ge=Math.pow(2,8*ce-1);O(this,ie,ee,ce,Ge-1,-Ge)}let Se=0,Me=1,Ue=0;for(this[ee]=ie&255;++Se>0)-Ue&255;return ee+ce},l.prototype.writeIntBE=function(ie,ee,ce,_e){if(ie=+ie,ee=ee>>>0,!_e){let Ge=Math.pow(2,8*ce-1);O(this,ie,ee,ce,Ge-1,-Ge)}let Se=ce-1,Me=1,Ue=0;for(this[ee+Se]=ie&255;--Se>=0&&(Me*=256);)ie<0&&Ue===0&&this[ee+Se+1]!==0&&(Ue=1),this[ee+Se]=(ie/Me>>0)-Ue&255;return ee+ce},l.prototype.writeInt8=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,1,127,-128),ie<0&&(ie=255+ie+1),this[ee]=ie&255,ee+1},l.prototype.writeInt16LE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,2,32767,-32768),this[ee]=ie&255,this[ee+1]=ie>>>8,ee+2},l.prototype.writeInt16BE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,2,32767,-32768),this[ee]=ie>>>8,this[ee+1]=ie&255,ee+2},l.prototype.writeInt32LE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,4,2147483647,-2147483648),this[ee]=ie&255,this[ee+1]=ie>>>8,this[ee+2]=ie>>>16,this[ee+3]=ie>>>24,ee+4},l.prototype.writeInt32BE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,4,2147483647,-2147483648),ie<0&&(ie=4294967295+ie+1),this[ee]=ie>>>24,this[ee+1]=ie>>>16,this[ee+2]=ie>>>8,this[ee+3]=ie&255,ee+4},l.prototype.writeBigInt64LE=he(function(ie,ee=0){return G(this,ie,ee,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=he(function(ie,ee=0){return $(this,ie,ee,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function X(te,ie,ee,ce,_e,Se){if(ee+ce>te.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("Index out of range")}function Z(te,ie,ee,ce,_e){return ie=+ie,ee=ee>>>0,_e||X(te,ie,ee,4,34028234663852886e22,-34028234663852886e22),t.write(te,ie,ee,ce,23,4),ee+4}l.prototype.writeFloatLE=function(ie,ee,ce){return Z(this,ie,ee,!0,ce)},l.prototype.writeFloatBE=function(ie,ee,ce){return Z(this,ie,ee,!1,ce)};function J(te,ie,ee,ce,_e){return ie=+ie,ee=ee>>>0,_e||X(te,ie,ee,8,17976931348623157e292,-17976931348623157e292),t.write(te,ie,ee,ce,52,8),ee+8}l.prototype.writeDoubleLE=function(ie,ee,ce){return J(this,ie,ee,!0,ce)},l.prototype.writeDoubleBE=function(ie,ee,ce){return J(this,ie,ee,!1,ce)},l.prototype.copy=function(ie,ee,ce,_e){if(!l.isBuffer(ie))throw new TypeError("argument should be a Buffer");if(ce||(ce=0),!_e&&_e!==0&&(_e=this.length),ee>=ie.length&&(ee=ie.length),ee||(ee=0),_e>0&&_e=this.length)throw new RangeError("Index out of range");if(_e<0)throw new RangeError("sourceEnd out of bounds");_e>this.length&&(_e=this.length),ie.length-ee<_e-ce&&(_e=ie.length-ee+ce);let Se=_e-ce;return this===ie&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ee,ce,_e):Uint8Array.prototype.set.call(ie,this.subarray(ce,_e),ee),Se},l.prototype.fill=function(ie,ee,ce,_e){if(typeof ie=="string"){if(typeof ee=="string"?(_e=ee,ee=0,ce=this.length):typeof ce=="string"&&(_e=ce,ce=this.length),_e!==void 0&&typeof _e!="string")throw new TypeError("encoding must be a string");if(typeof _e=="string"&&!l.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);if(ie.length===1){let Me=ie.charCodeAt(0);(_e==="utf8"&&Me<128||_e==="latin1")&&(ie=Me)}}else typeof ie=="number"?ie=ie&255:typeof ie=="boolean"&&(ie=Number(ie));if(ee<0||this.length>>0,ce=ce===void 0?this.length:ce>>>0,ie||(ie=0);let Se;if(typeof ie=="number")for(Se=ee;Se2**32?_e=W(String(ee)):typeof ee=="bigint"&&(_e=String(ee),(ee>BigInt(2)**BigInt(32)||ee<-(BigInt(2)**BigInt(32)))&&(_e=W(_e)),_e+="n"),ce+=` It must be ${ie}. Received ${_e}`,ce},RangeError);function W(te){let ie="",ee=te.length,ce=te[0]==="-"?1:0;for(;ee>=ce+4;ee-=3)ie=`_${te.slice(ee-3,ee)}${ie}`;return`${te.slice(0,ee)}${ie}`}function U(te,ie,ee){j(ie,"offset"),(te[ie]===void 0||te[ie+ee]===void 0)&&q(ie,te.length-(ee+1))}function V(te,ie,ee,ce,_e,Se){if(te>ee||te3?ie===0||ie===BigInt(0)?Ue=`>= 0${Me} and < 2${Me} ** ${(Se+1)*8}${Me}`:Ue=`>= -(2${Me} ** ${(Se+1)*8-1}${Me}) and < 2 ** ${(Se+1)*8-1}${Me}`:Ue=`>= ${ie}${Me} and <= ${ee}${Me}`,new N.ERR_OUT_OF_RANGE("value",Ue,te)}U(ce,_e,Se)}function j(te,ie){if(typeof te!="number")throw new N.ERR_INVALID_ARG_TYPE(ie,"number",te)}function q(te,ie,ee){throw Math.floor(te)!==te?(j(te,ee),new N.ERR_OUT_OF_RANGE(ee||"offset","an integer",te)):ie<0?new N.ERR_BUFFER_OUT_OF_BOUNDS:new N.ERR_OUT_OF_RANGE(ee||"offset",`>= ${ee?1:0} and <= ${ie}`,te)}var Y=/[^+/0-9A-Za-z-_]/g;function K(te){if(te=te.split("=")[0],te=te.trim().replace(Y,""),te.length<2)return"";for(;te.length%4!==0;)te=te+"=";return te}function re(te,ie){ie=ie||1/0;let ee,ce=te.length,_e=null,Se=[];for(let Me=0;Me55295&&ee<57344){if(!_e){if(ee>56319){(ie-=3)>-1&&Se.push(239,191,189);continue}else if(Me+1===ce){(ie-=3)>-1&&Se.push(239,191,189);continue}_e=ee;continue}if(ee<56320){(ie-=3)>-1&&Se.push(239,191,189),_e=ee;continue}ee=(_e-55296<<10|ee-56320)+65536}else _e&&(ie-=3)>-1&&Se.push(239,191,189);if(_e=null,ee<128){if((ie-=1)<0)break;Se.push(ee)}else if(ee<2048){if((ie-=2)<0)break;Se.push(ee>>6|192,ee&63|128)}else if(ee<65536){if((ie-=3)<0)break;Se.push(ee>>12|224,ee>>6&63|128,ee&63|128)}else if(ee<1114112){if((ie-=4)<0)break;Se.push(ee>>18|240,ee>>12&63|128,ee>>6&63|128,ee&63|128)}else throw new Error("Invalid code point")}return Se}function se(te){let ie=[];for(let ee=0;ee>8,_e=ee%256,Se.push(_e),Se.push(ce);return Se}function ue(te){return r.toByteArray(K(te))}function fe(te,ie,ee,ce){let _e;for(_e=0;_e=ie.length||_e>=te.length);++_e)ie[_e+ee]=te[_e];return _e}function pe(te,ie){return te instanceof ie||te!=null&&te.constructor!=null&&te.constructor.name!=null&&te.constructor.name===ie.name}function we(te){return te!==te}var xe=(function(){let te="0123456789abcdef",ie=new Array(256);for(let ee=0;ee<16;++ee){let ce=ee*16;for(let _e=0;_e<16;++_e)ie[ce+_e]=te[ee]+te[_e]}return ie})();function he(te){return typeof BigInt>"u"?oe:te}function oe(){throw new Error("BigInt not supported")}}}),wT=ye({"node_modules/has-symbols/shams.js"(e,r){"use strict";r.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var a={},i=Symbol("test"),o=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var s=42;a[i]=s;for(var l in a)return!1;if(typeof Object.keys=="function"&&Object.keys(a).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(a).length!==0)return!1;var n=Object.getOwnPropertySymbols(a);if(n.length!==1||n[0]!==i||!Object.prototype.propertyIsEnumerable.call(a,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(a,i);if(u.value!==s||u.enumerable!==!0)return!1}return!0}}}),db=ye({"node_modules/has-tostringtag/shams.js"(e,r){"use strict";var t=wT();r.exports=function(){return t()&&!!Symbol.toStringTag}}}),AT=ye({"node_modules/es-object-atoms/index.js"(e,r){"use strict";r.exports=Object}}),Xae=ye({"node_modules/es-errors/index.js"(e,r){"use strict";r.exports=Error}}),Zae=ye({"node_modules/es-errors/eval.js"(e,r){"use strict";r.exports=EvalError}}),Kae=ye({"node_modules/es-errors/range.js"(e,r){"use strict";r.exports=RangeError}}),Jae=ye({"node_modules/es-errors/ref.js"(e,r){"use strict";r.exports=ReferenceError}}),CL=ye({"node_modules/es-errors/syntax.js"(e,r){"use strict";r.exports=SyntaxError}}),Cy=ye({"node_modules/es-errors/type.js"(e,r){"use strict";r.exports=TypeError}}),Qae=ye({"node_modules/es-errors/uri.js"(e,r){"use strict";r.exports=URIError}}),eie=ye({"node_modules/math-intrinsics/abs.js"(e,r){"use strict";r.exports=Math.abs}}),tie=ye({"node_modules/math-intrinsics/floor.js"(e,r){"use strict";r.exports=Math.floor}}),rie=ye({"node_modules/math-intrinsics/max.js"(e,r){"use strict";r.exports=Math.max}}),aie=ye({"node_modules/math-intrinsics/min.js"(e,r){"use strict";r.exports=Math.min}}),iie=ye({"node_modules/math-intrinsics/pow.js"(e,r){"use strict";r.exports=Math.pow}}),nie=ye({"node_modules/math-intrinsics/round.js"(e,r){"use strict";r.exports=Math.round}}),oie=ye({"node_modules/math-intrinsics/isNaN.js"(e,r){"use strict";r.exports=Number.isNaN||function(a){return a!==a}}}),sie=ye({"node_modules/math-intrinsics/sign.js"(e,r){"use strict";var t=oie();r.exports=function(i){return t(i)||i===0?i:i<0?-1:1}}}),lie=ye({"node_modules/gopd/gOPD.js"(e,r){"use strict";r.exports=Object.getOwnPropertyDescriptor}}),Om=ye({"node_modules/gopd/index.js"(e,r){"use strict";var t=lie();if(t)try{t([],"length")}catch{t=null}r.exports=t}}),pb=ye({"node_modules/es-define-property/index.js"(e,r){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}r.exports=t}}),uie=ye({"node_modules/has-symbols/index.js"(e,r){"use strict";var t=typeof Symbol<"u"&&Symbol,a=wT();r.exports=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:a()}}}),DL=ye({"node_modules/get-proto/Reflect.getPrototypeOf.js"(e,r){"use strict";r.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),LL=ye({"node_modules/get-proto/Object.getPrototypeOf.js"(e,r){"use strict";var t=AT();r.exports=t.getPrototypeOf||null}}),cie=ye({"node_modules/function-bind/implementation.js"(e,r){"use strict";var t="Function.prototype.bind called on incompatible ",a=Object.prototype.toString,i=Math.max,o="[object Function]",s=function(c,f){for(var h=[],d=0;d"u"||!k?t:k(Uint8Array),R={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":w&&k?k([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float16Array%":typeof Float16Array>"u"?t:Float16Array,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":F,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&k?k(k([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!w||!k?t:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":a,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":s,"%ReferenceError%":l,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!w||!k?t:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&k?k(""[Symbol.iterator]()):t,"%Symbol%":w?Symbol:t,"%SyntaxError%":n,"%ThrowTypeError%":C,"%TypedArray%":D,"%TypeError%":u,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet,"%Function.prototype.call%":A,"%Function.prototype.apply%":S,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":T,"%Math.abs%":f,"%Math.floor%":h,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":y,"%Reflect.getPrototypeOf%":b};if(k)try{null.error}catch(U){P=k(k(U)),R["%Error.prototype%"]=P}var P,z=function U(V){var j;if(V==="%AsyncFunction%")j=v("async function () {}");else if(V==="%GeneratorFunction%")j=v("function* () {}");else if(V==="%AsyncGeneratorFunction%")j=v("async function* () {}");else if(V==="%AsyncGenerator%"){var q=U("%AsyncGeneratorFunction%");q&&(j=q.prototype)}else if(V==="%AsyncIteratorPrototype%"){var Y=U("%AsyncGenerator%");Y&&k&&(j=k(Y.prototype))}return R[V]=j,j},I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},L=Dy(),B=PL(),O=L.call(A,Array.prototype.concat),G=L.call(S,Array.prototype.splice),$=L.call(A,String.prototype.replace),X=L.call(A,String.prototype.slice),Z=L.call(A,RegExp.prototype.exec),J=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,H=function(V){var j=X(V,0,1),q=X(V,-1);if(j==="%"&&q!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(q==="%"&&j!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var Y=[];return $(V,J,function(K,re,se,le){Y[Y.length]=se?$(le,N,"$1"):re||K}),Y},W=function(V,j){var q=V,Y;if(B(I,q)&&(Y=I[q],q="%"+Y[0]+"%"),B(R,q)){var K=R[q];if(K===F&&(K=z(q)),typeof K>"u"&&!j)throw new u("intrinsic "+V+" exists, but is not available. Please file an issue!");return{alias:Y,name:q,value:K}}throw new n("intrinsic "+V+" does not exist!")};r.exports=function(V,j){if(typeof V!="string"||V.length===0)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof j!="boolean")throw new u('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,V)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var q=H(V),Y=q.length>0?q[0]:"",K=W("%"+Y+"%",j),re=K.name,se=K.value,le=!1,ue=K.alias;ue&&(Y=ue[0],G(q,O([0,1],ue)));for(var fe=1,pe=!0;fe=q.length){var oe=x(se,we);pe=!!oe,pe&&"get"in oe&&!("originalValue"in oe.get)?se=oe.get:se=se[we]}else pe=B(se,we),se=se[we];pe&&!le&&(R[re]=se)}}return se}}}),Nm=ye({"node_modules/call-bound/index.js"(e,r){"use strict";var t=kT(),a=ET(),i=a([t("%String.prototype.indexOf%")]);r.exports=function(s,l){var n=t(s,!!l);return typeof n=="function"&&i(s,".prototype.")>-1?a([n]):n}}}),die=ye({"node_modules/is-arguments/index.js"(e,r){"use strict";var t=db()(),a=Nm(),i=a("Object.prototype.toString"),o=function(u){return t&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:i(u)==="[object Arguments]"},s=function(u){return o(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&i(u)!=="[object Array]"&&"callee"in u&&i(u.callee)==="[object Function]"},l=(function(){return o(arguments)})();o.isLegacyArguments=s,r.exports=l?o:s}}),pie=ye({"node_modules/is-regex/index.js"(e,r){"use strict";var t=Nm(),a=db()(),i=PL(),o=Om(),s;a?(l=t("RegExp.prototype.exec"),n={},u=function(){throw n},c={toString:u,valueOf:u},typeof Symbol.toPrimitive=="symbol"&&(c[Symbol.toPrimitive]=u),s=function(p){if(!p||typeof p!="object")return!1;var g=o(p,"lastIndex"),m=g&&i(g,"value");if(!m)return!1;try{l(p,c)}catch(y){return y===n}}):(f=t("Object.prototype.toString"),h="[object RegExp]",s=function(p){return!p||typeof p!="object"&&typeof p!="function"?!1:f(p)===h});var l,n,u,c,f,h;r.exports=s}}),vie=ye({"node_modules/safe-regex-test/index.js"(e,r){"use strict";var t=Nm(),a=pie(),i=t("RegExp.prototype.exec"),o=Cy();r.exports=function(l){if(!a(l))throw new o("`regex` must be a RegExp");return function(u){return i(l,u)!==null}}}}),mie=ye({"node_modules/generator-function/index.js"(e,r){"use strict";var t=function*(){}.constructor;r.exports=()=>t}}),gie=ye({"node_modules/is-generator-function/index.js"(e,r){"use strict";var t=Nm(),a=vie(),i=a(/^\s*(?:function)?\*/),o=db()(),s=ST(),l=t("Object.prototype.toString"),n=t("Function.prototype.toString"),u=mie();r.exports=function(f){if(typeof f!="function")return!1;if(i(n(f)))return!0;if(!o){var h=l(f);return h==="[object GeneratorFunction]"}if(!s)return!1;var d=u();return d&&s(f)===d.prototype}}}),yie=ye({"node_modules/is-callable/index.js"(e,r){"use strict";var t=Function.prototype.toString,a=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,i,o;if(typeof a=="function"&&typeof Object.defineProperty=="function")try{i=Object.defineProperty({},"length",{get:function(){throw o}}),o={},a(function(){throw 42},null,i)}catch(x){x!==o&&(a=null)}else a=null;var s=/^\s*class\b/,l=function(E){try{var M=t.call(E);return s.test(M)}catch{return!1}},n=function(E){try{return l(E)?!1:(t.call(E),!0)}catch{return!1}},u=Object.prototype.toString,c="[object Object]",f="[object Function]",h="[object GeneratorFunction]",d="[object HTMLAllCollection]",p="[object HTML document.all class]",g="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,y=!(0 in[,]),_=function(){return!1};typeof document=="object"&&(v=document.all,u.call(v)===u.call(document.all)&&(_=function(E){if((y||!E)&&(typeof E>"u"||typeof E=="object"))try{var M=u.call(E);return(M===d||M===p||M===g||M===c)&&E("")==null}catch{}return!1}));var v;r.exports=a?function(E){if(_(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;try{a(E,null,i)}catch(M){if(M!==o)return!1}return!l(E)&&n(E)}:function(E){if(_(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;if(m)return n(E);if(l(E))return!1;var M=u.call(E);return M!==f&&M!==h&&!/^\[object HTML/.test(M)?!1:n(E)}}}),_ie=ye({"node_modules/for-each/index.js"(e,r){"use strict";var t=yie(),a=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=function(c,f,h){for(var d=0,p=c.length;d=3&&(d=h),n(c)?o(c,f,d):typeof c=="string"?s(c,f,d):l(c,f,d)}}}),xie=ye({"node_modules/possible-typed-array-names/index.js"(e,r){"use strict";r.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),bie=ye({"node_modules/available-typed-arrays/index.js"(e,r){"use strict";var t=xie(),a=typeof globalThis>"u"?window:globalThis;r.exports=function(){for(var o=[],s=0;s3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new i("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,p=!!o&&o(l,n);if(t)t(l,n,{configurable:h===null&&p?p.configurable:!h,enumerable:c===null&&p?p.enumerable:!c,value:u,writable:f===null&&p?p.writable:!f});else if(d||!c&&!f&&!h)l[n]=u;else throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),RL=ye({"node_modules/has-property-descriptors/index.js"(e,r){"use strict";var t=pb(),a=function(){return!!t};a.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},r.exports=a}}),wie=ye({"node_modules/set-function-length/index.js"(e,r){"use strict";var t=kT(),a=IL(),i=RL()(),o=Om(),s=Cy(),l=t("%Math.floor%");r.exports=function(u,c){if(typeof u!="function")throw new s("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||l(c)!==c)throw new s("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],h=!0,d=!0;if("length"in u&&o){var p=o(u,"length");p&&!p.configurable&&(h=!1),p&&!p.writable&&(d=!1)}return(h||d||!f)&&(i?a(u,"length",c,!0,!0):a(u,"length",c)),u}}}),Aie=ye({"node_modules/call-bind-apply-helpers/applyBind.js"(e,r){"use strict";var t=Dy(),a=MT(),i=FL();r.exports=function(){return i(t,a,arguments)}}}),vb=ye({"node_modules/call-bind/index.js"(e,r){"use strict";var t=wie(),a=pb(),i=ET(),o=Aie();r.exports=function(l){var n=i(arguments),u=1+l.length-(arguments.length-1);return t(n,u>0?u:0,!0)},a?a(r.exports,"apply",{value:o}):r.exports.apply=o}}),zL=ye({"node_modules/which-typed-array/index.js"(e,r){"use strict";var t=_ie(),a=bie(),i=vb(),o=Nm(),s=Om(),l=ST(),n=o("Object.prototype.toString"),u=db()(),c=typeof globalThis>"u"?window:globalThis,f=a(),h=o("String.prototype.slice"),d=o("Array.prototype.indexOf",!0)||function(v,x){for(var E=0;E-1}r.exports=function(v){if(!v||typeof v!="object")return!1;if(!u){var x=h(n(v),8,-1);return y(x)?x:x!=="Object"?!1:m(v)}return s?g(v):null}}}),Tie=ye({"node_modules/is-typed-array/index.js"(e,r){"use strict";var t=zL();r.exports=function(i){return!!t(i)}}}),BL=ye({"node_modules/util/support/types.js"(e){"use strict";var r=die(),t=gie(),a=zL(),i=Tie();function o(le){return le.call.bind(le)}var s=typeof BigInt<"u",l=typeof Symbol<"u",n=o(Object.prototype.toString),u=o(Number.prototype.valueOf),c=o(String.prototype.valueOf),f=o(Boolean.prototype.valueOf);s&&(h=o(BigInt.prototype.valueOf));var h;l&&(d=o(Symbol.prototype.valueOf));var d;function p(le,ue){if(typeof le!="object")return!1;try{return ue(le),!0}catch{return!1}}e.isArgumentsObject=r,e.isGeneratorFunction=t,e.isTypedArray=i;function g(le){return typeof Promise<"u"&&le instanceof Promise||le!==null&&typeof le=="object"&&typeof le.then=="function"&&typeof le.catch=="function"}e.isPromise=g;function m(le){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(le):i(le)||G(le)}e.isArrayBufferView=m;function y(le){return a(le)==="Uint8Array"}e.isUint8Array=y;function _(le){return a(le)==="Uint8ClampedArray"}e.isUint8ClampedArray=_;function v(le){return a(le)==="Uint16Array"}e.isUint16Array=v;function x(le){return a(le)==="Uint32Array"}e.isUint32Array=x;function E(le){return a(le)==="Int8Array"}e.isInt8Array=E;function M(le){return a(le)==="Int16Array"}e.isInt16Array=M;function C(le){return a(le)==="Int32Array"}e.isInt32Array=C;function w(le){return a(le)==="Float32Array"}e.isFloat32Array=w;function k(le){return a(le)==="Float64Array"}e.isFloat64Array=k;function T(le){return a(le)==="BigInt64Array"}e.isBigInt64Array=T;function b(le){return a(le)==="BigUint64Array"}e.isBigUint64Array=b;function S(le){return n(le)==="[object Map]"}S.working=typeof Map<"u"&&S(new Map);function A(le){return typeof Map>"u"?!1:S.working?S(le):le instanceof Map}e.isMap=A;function F(le){return n(le)==="[object Set]"}F.working=typeof Set<"u"&&F(new Set);function D(le){return typeof Set>"u"?!1:F.working?F(le):le instanceof Set}e.isSet=D;function R(le){return n(le)==="[object WeakMap]"}R.working=typeof WeakMap<"u"&&R(new WeakMap);function P(le){return typeof WeakMap>"u"?!1:R.working?R(le):le instanceof WeakMap}e.isWeakMap=P;function z(le){return n(le)==="[object WeakSet]"}z.working=typeof WeakSet<"u"&&z(new WeakSet);function I(le){return z(le)}e.isWeakSet=I;function L(le){return n(le)==="[object ArrayBuffer]"}L.working=typeof ArrayBuffer<"u"&&L(new ArrayBuffer);function B(le){return typeof ArrayBuffer>"u"?!1:L.working?L(le):le instanceof ArrayBuffer}e.isArrayBuffer=B;function O(le){return n(le)==="[object DataView]"}O.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&O(new DataView(new ArrayBuffer(1),0,1));function G(le){return typeof DataView>"u"?!1:O.working?O(le):le instanceof DataView}e.isDataView=G;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function X(le){return n(le)==="[object SharedArrayBuffer]"}function Z(le){return typeof $>"u"?!1:(typeof X.working>"u"&&(X.working=X(new $)),X.working?X(le):le instanceof $)}e.isSharedArrayBuffer=Z;function J(le){return n(le)==="[object AsyncFunction]"}e.isAsyncFunction=J;function N(le){return n(le)==="[object Map Iterator]"}e.isMapIterator=N;function H(le){return n(le)==="[object Set Iterator]"}e.isSetIterator=H;function W(le){return n(le)==="[object Generator]"}e.isGeneratorObject=W;function U(le){return n(le)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=U;function V(le){return p(le,u)}e.isNumberObject=V;function j(le){return p(le,c)}e.isStringObject=j;function q(le){return p(le,f)}e.isBooleanObject=q;function Y(le){return s&&p(le,h)}e.isBigIntObject=Y;function K(le){return l&&p(le,d)}e.isSymbolObject=K;function re(le){return V(le)||j(le)||q(le)||Y(le)||K(le)}e.isBoxedPrimitive=re;function se(le){return typeof Uint8Array<"u"&&(B(le)||Z(le))}e.isAnyArrayBuffer=se,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(le){Object.defineProperty(e,le,{enumerable:!1,value:function(){throw new Error(le+" is not supported in userland")}})})}}),OL=ye({"node_modules/util/support/isBufferBrowser.js"(e,r){r.exports=function(a){return a&&typeof a=="object"&&typeof a.copy=="function"&&typeof a.fill=="function"&&typeof a.readUInt8=="function"}}}),NL=ye({"(disabled):node_modules/util/util.js"(e){var r=Object.getOwnPropertyDescriptors||function(G){for(var $=Object.keys(G),X={},Z=0;Z<$.length;Z++)X[$[Z]]=Object.getOwnPropertyDescriptor(G,$[Z]);return X},t=/%[sdj%]/g;e.format=function(O){if(!E(O)){for(var G=[],$=0;$=Z)return H;switch(H){case"%s":return String(X[$++]);case"%d":return Number(X[$++]);case"%j":try{return JSON.stringify(X[$++])}catch{return"[Circular]"}default:return H}}),N=X[$];$"u")return function(){return e.deprecate(O,G).apply(this,arguments)};var $=!1;function X(){if(!$){if(process.throwDeprecation)throw new Error(G);process.traceDeprecation?console.trace(G):console.error(G),$=!0}return O.apply(this,arguments)}return X};var a={},i=/^$/;o="false",o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i");var o;e.debuglog=function(O){if(O=O.toUpperCase(),!a[O])if(i.test(O)){var G=process.pid;a[O]=function(){var $=e.format.apply(e,arguments);console.error("%s %d: %s",O,G,$)}}else a[O]=function(){};return a[O]};function s(O,G){var $={seen:[],stylize:n};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),y(G)?$.showHidden=G:G&&e._extend($,G),C($.showHidden)&&($.showHidden=!1),C($.depth)&&($.depth=2),C($.colors)&&($.colors=!1),C($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=l),c($,O,$.depth)}e.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(O,G){var $=s.styles[G];return $?"\x1B["+s.colors[$][0]+"m"+O+"\x1B["+s.colors[$][1]+"m":O}function n(O,G){return O}function u(O){var G={};return O.forEach(function($,X){G[$]=!0}),G}function c(O,G,$){if(O.customInspect&&G&&S(G.inspect)&&G.inspect!==e.inspect&&!(G.constructor&&G.constructor.prototype===G)){var X=G.inspect($,O);return E(X)||(X=c(O,X,$)),X}var Z=f(O,G);if(Z)return Z;var J=Object.keys(G),N=u(J);if(O.showHidden&&(J=Object.getOwnPropertyNames(G)),b(G)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return h(G);if(J.length===0){if(S(G)){var H=G.name?": "+G.name:"";return O.stylize("[Function"+H+"]","special")}if(w(G))return O.stylize(RegExp.prototype.toString.call(G),"regexp");if(T(G))return O.stylize(Date.prototype.toString.call(G),"date");if(b(G))return h(G)}var W="",U=!1,V=["{","}"];if(m(G)&&(U=!0,V=["[","]"]),S(G)){var j=G.name?": "+G.name:"";W=" [Function"+j+"]"}if(w(G)&&(W=" "+RegExp.prototype.toString.call(G)),T(G)&&(W=" "+Date.prototype.toUTCString.call(G)),b(G)&&(W=" "+h(G)),J.length===0&&(!U||G.length==0))return V[0]+W+V[1];if($<0)return w(G)?O.stylize(RegExp.prototype.toString.call(G),"regexp"):O.stylize("[Object]","special");O.seen.push(G);var q;return U?q=d(O,G,$,N,J):q=J.map(function(Y){return p(O,G,$,N,Y,U)}),O.seen.pop(),g(q,W,V)}function f(O,G){if(C(G))return O.stylize("undefined","undefined");if(E(G)){var $="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize($,"string")}if(x(G))return O.stylize(""+G,"number");if(y(G))return O.stylize(""+G,"boolean");if(_(G))return O.stylize("null","null")}function h(O){return"["+Error.prototype.toString.call(O)+"]"}function d(O,G,$,X,Z){for(var J=[],N=0,H=G.length;N-1&&(J?H=H.split(` -`).map(function(U){return" "+U}).join(` -`).slice(2):H=` -`+H.split(` -`).map(function(U){return" "+U}).join(` -`))):H=O.stylize("[Circular]","special")),C(N)){if(J&&Z.match(/^\d+$/))return H;N=JSON.stringify(""+Z),N.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(N=N.slice(1,-1),N=O.stylize(N,"name")):(N=N.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),N=O.stylize(N,"string"))}return N+": "+H}function g(O,G,$){var X=0,Z=O.reduce(function(J,N){return X++,N.indexOf(` -`)>=0&&X++,J+N.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Z>60?$[0]+(G===""?"":G+` - `)+" "+O.join(`, - `)+" "+$[1]:$[0]+G+" "+O.join(", ")+" "+$[1]}e.types=BL();function m(O){return Array.isArray(O)}e.isArray=m;function y(O){return typeof O=="boolean"}e.isBoolean=y;function _(O){return O===null}e.isNull=_;function v(O){return O==null}e.isNullOrUndefined=v;function x(O){return typeof O=="number"}e.isNumber=x;function E(O){return typeof O=="string"}e.isString=E;function M(O){return typeof O=="symbol"}e.isSymbol=M;function C(O){return O===void 0}e.isUndefined=C;function w(O){return k(O)&&F(O)==="[object RegExp]"}e.isRegExp=w,e.types.isRegExp=w;function k(O){return typeof O=="object"&&O!==null}e.isObject=k;function T(O){return k(O)&&F(O)==="[object Date]"}e.isDate=T,e.types.isDate=T;function b(O){return k(O)&&(F(O)==="[object Error]"||O instanceof Error)}e.isError=b,e.types.isNativeError=b;function S(O){return typeof O=="function"}e.isFunction=S;function A(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O>"u"}e.isPrimitive=A,e.isBuffer=OL();function F(O){return Object.prototype.toString.call(O)}function D(O){return O<10?"0"+O.toString(10):O.toString(10)}var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var O=new Date,G=[D(O.getHours()),D(O.getMinutes()),D(O.getSeconds())].join(":");return[O.getDate(),R[O.getMonth()],G].join(" ")}e.log=function(){console.log("%s - %s",P(),e.format.apply(e,arguments))},e.inherits=d0(),e._extend=function(O,G){if(!G||!k(G))return O;for(var $=Object.keys(G),X=$.length;X--;)O[$[X]]=G[$[X]];return O};function z(O,G){return Object.prototype.hasOwnProperty.call(O,G)}var I=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');if(I&&G[I]){var $=G[I];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,I,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var X,Z,J=new Promise(function(W,U){X=W,Z=U}),N=[],H=0;H0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(_){var v={data:_,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(_){if(this.length===0)return"";for(var v=this.head,x=""+v.data;v=v.next;)x+=_+v.data;return x}},{key:"concat",value:function(_){if(this.length===0)return f.alloc(0);for(var v=f.allocUnsafe(_>>>0),x=this.head,E=0;x;)g(x.data,v,E),E+=x.data.length,x=x.next;return v}},{key:"consume",value:function(_,v){var x;return _M.length?M.length:_;if(C===M.length?E+=M:E+=M.slice(0,_),_-=C,_===0){C===M.length?(++x,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=M.slice(C));break}++x}return this.length-=x,E}},{key:"_getBuffer",value:function(_){var v=f.allocUnsafe(_),x=this.head,E=1;for(x.data.copy(v),_-=x.data.length;x=x.next;){var M=x.data,C=_>M.length?M.length:_;if(M.copy(v,v.length-_,0,C),_-=C,_===0){C===M.length?(++E,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=M.slice(C));break}++E}return this.length-=E,v}},{key:p,value:function(_,v){return d(this,a(a({},v),{},{depth:0,customInspect:!1}))}}]),m})()}}),jL=ye({"node_modules/readable-stream/lib/internal/streams/destroy.js"(e,r){"use strict";function t(n,u){var c=this,f=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return f||h?(u?u(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(s,this,n)):process.nextTick(s,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,function(d){!u&&d?c._writableState?c._writableState.errorEmitted?process.nextTick(i,c):(c._writableState.errorEmitted=!0,process.nextTick(a,c,d)):process.nextTick(a,c,d):u?(process.nextTick(i,c),u(d)):process.nextTick(i,c)}),this)}function a(n,u){s(n,u),i(n)}function i(n){n._writableState&&!n._writableState.emitClose||n._readableState&&!n._readableState.emitClose||n.emit("close")}function o(){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 s(n,u){n.emit("error",u)}function l(n,u){var c=n._readableState,f=n._writableState;c&&c.autoDestroy||f&&f.autoDestroy?n.destroy(u):n.emit("error",u)}r.exports={destroy:t,undestroy:o,errorOrDestroy:l}}}),jm=ye({"node_modules/readable-stream/errors-browser.js"(e,r){"use strict";function t(u,c){u.prototype=Object.create(c.prototype),u.prototype.constructor=u,u.__proto__=c}var a={};function i(u,c,f){f||(f=Error);function h(p,g,m){return typeof c=="string"?c:c(p,g,m)}var d=(function(p){t(g,p);function g(m,y,_){return p.call(this,h(m,y,_))||this}return g})(f);d.prototype.name=f.name,d.prototype.code=u,a[u]=d}function o(u,c){if(Array.isArray(u)){var f=u.length;return u=u.map(function(h){return String(h)}),f>2?"one of ".concat(c," ").concat(u.slice(0,f-1).join(", "),", or ")+u[f-1]:f===2?"one of ".concat(c," ").concat(u[0]," or ").concat(u[1]):"of ".concat(c," ").concat(u[0])}else return"of ".concat(c," ").concat(String(u))}function s(u,c,f){return u.substr(!f||f<0?0:+f,c.length)===c}function l(u,c,f){return(f===void 0||f>u.length)&&(f=u.length),u.substring(f-c.length,f)===c}function n(u,c,f){return typeof f!="number"&&(f=0),f+c.length>u.length?!1:u.indexOf(c,f)!==-1}i("ERR_INVALID_OPT_VALUE",function(u,c){return'The value "'+c+'" is invalid for option "'+u+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(u,c,f){var h;typeof c=="string"&&s(c,"not ")?(h="must not be",c=c.replace(/^not /,"")):h="must be";var d;if(l(u," argument"))d="The ".concat(u," ").concat(h," ").concat(o(c,"type"));else{var p=n(u,".")?"property":"argument";d='The "'.concat(u,'" ').concat(p," ").concat(h," ").concat(o(c,"type"))}return d+=". Received type ".concat(typeof f),d},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(u){return"The "+u+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(u){return"Cannot call "+u+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(u){return"Unknown encoding: "+u},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),r.exports.codes=a}}),UL=ye({"node_modules/readable-stream/lib/internal/streams/state.js"(e,r){"use strict";var t=jm().codes.ERR_INVALID_OPT_VALUE;function a(o,s,l){return o.highWaterMark!=null?o.highWaterMark:s?o[l]:null}function i(o,s,l,n){var u=a(s,n,l);if(u!=null){if(!(isFinite(u)&&Math.floor(u)===u)||u<0){var c=n?l:"highWaterMark";throw new t(c,u)}return Math.floor(u)}return o.objectMode?16:16*1024}r.exports={getHighWaterMark:i}}}),Eie=ye({"node_modules/util-deprecate/browser.js"(e,r){r.exports=t;function t(i,o){if(a("noDeprecation"))return i;var s=!1;function l(){if(!s){if(a("throwDeprecation"))throw new Error(o);a("traceDeprecation")?console.trace(o):console.warn(o),s=!0}return i.apply(this,arguments)}return l}function a(i){try{if(!window.localStorage)return!1}catch{return!1}var o=window.localStorage[i];return o==null?!1:String(o).toLowerCase()==="true"}}}),qL=ye({"node_modules/readable-stream/lib/_stream_writable.js"(e,r){"use strict";r.exports=T;function t(N){var H=this;this.next=null,this.entry=null,this.finish=function(){J(H,N)}}var a;T.WritableState=w;var i={deprecate:Eie()},o=kL(),s=Bm().Buffer,l=(typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function n(N){return s.from(N)}function u(N){return s.isBuffer(N)||N instanceof l}var c=jL(),f=UL(),h=f.getHighWaterMark,d=jm().codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,_=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,x=d.ERR_STREAM_WRITE_AFTER_END,E=d.ERR_UNKNOWN_ENCODING,M=c.errorOrDestroy;d0()(T,o);function C(){}function w(N,H,W){a=a||Um(),N=N||{},typeof W!="boolean"&&(W=H instanceof a),this.objectMode=!!N.objectMode,W&&(this.objectMode=this.objectMode||!!N.writableObjectMode),this.highWaterMark=h(this,N,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U=N.decodeStrings===!1;this.decodeStrings=!U,this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(V){z(H,V)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}w.prototype.getBuffer=function(){for(var H=this.bufferedRequest,W=[];H;)W.push(H),H=H.next;return W},(function(){try{Object.defineProperty(w.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var k;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(k=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(H){return k.call(this,H)?!0:this!==T?!1:H&&H._writableState instanceof w}})):k=function(H){return H instanceof this};function T(N){a=a||Um();var H=this instanceof a;if(!H&&!k.call(T,this))return new T(N);this._writableState=new w(N,this,H),this.writable=!0,N&&(typeof N.write=="function"&&(this._write=N.write),typeof N.writev=="function"&&(this._writev=N.writev),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.final=="function"&&(this._final=N.final)),o.call(this)}T.prototype.pipe=function(){M(this,new y)};function b(N,H){var W=new x;M(N,W),process.nextTick(H,W)}function S(N,H,W,U){var V;return W===null?V=new v:typeof W!="string"&&!H.objectMode&&(V=new p("chunk",["string","Buffer"],W)),V?(M(N,V),process.nextTick(U,V),!1):!0}T.prototype.write=function(N,H,W){var U=this._writableState,V=!1,j=!U.objectMode&&u(N);return j&&!s.isBuffer(N)&&(N=n(N)),typeof H=="function"&&(W=H,H=null),j?H="buffer":H||(H=U.defaultEncoding),typeof W!="function"&&(W=C),U.ending?b(this,W):(j||S(this,U,N,W))&&(U.pendingcb++,V=F(this,U,j,N,H,W)),V},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var N=this._writableState;N.corked&&(N.corked--,!N.writing&&!N.corked&&!N.bufferProcessing&&N.bufferedRequest&&B(this,N))},T.prototype.setDefaultEncoding=function(H){if(typeof H=="string"&&(H=H.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((H+"").toLowerCase())>-1))throw new E(H);return this._writableState.defaultEncoding=H,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function A(N,H,W){return!N.objectMode&&N.decodeStrings!==!1&&typeof H=="string"&&(H=s.from(H,W)),H}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(N,H,W,U,V,j){if(!W){var q=A(H,U,V);U!==q&&(W=!0,V="buffer",U=q)}var Y=H.objectMode?1:U.length;H.length+=Y;var K=H.length>5===6?2:_>>4===14?3:_>>3===30?4:_>>6===2?-1:-2}function l(_,v,x){var E=v.length-1;if(E=0?(M>0&&(_.lastNeed=M-1),M):--E=0?(M>0&&(_.lastNeed=M-2),M):--E=0?(M>0&&(M===2?M=0:_.lastNeed=M-3),M):0))}function n(_,v,x){if((v[0]&192)!==128)return _.lastNeed=0,"\uFFFD";if(_.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return _.lastNeed=1,"\uFFFD";if(_.lastNeed>2&&v.length>2&&(v[2]&192)!==128)return _.lastNeed=2,"\uFFFD"}}function u(_){var v=this.lastTotal-this.lastNeed,x=n(this,_,v);if(x!==void 0)return x;if(this.lastNeed<=_.length)return _.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,v,0,_.length),this.lastNeed-=_.length}function c(_,v){var x=l(this,_,v);if(!this.lastNeed)return _.toString("utf8",v);this.lastTotal=x;var E=_.length-(x-this.lastNeed);return _.copy(this.lastChar,0,E),_.toString("utf8",v,E)}function f(_){var v=_&&_.length?this.write(_):"";return this.lastNeed?v+"\uFFFD":v}function h(_,v){if((_.length-v)%2===0){var x=_.toString("utf16le",v);if(x){var E=x.charCodeAt(x.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=_[_.length-1],_.toString("utf16le",v,_.length-1)}function d(_){var v=_&&_.length?this.write(_):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,x)}return v}function p(_,v){var x=(_.length-v)%3;return x===0?_.toString("base64",v):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=_[_.length-1]:(this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1]),_.toString("base64",v,_.length-x))}function g(_){var v=_&&_.length?this.write(_):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function m(_){return _.toString(this.encoding)}function y(_){return _&&_.length?this.write(_):""}}}),CT=ye({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(e,r){"use strict";var t=jm().codes.ERR_STREAM_PREMATURE_CLOSE;function a(l){var n=!1;return function(){if(!n){n=!0;for(var u=arguments.length,c=new Array(u),f=0;f0)if(typeof Y!="string"&&!le.objectMode&&Object.getPrototypeOf(Y)!==s.prototype&&(Y=n(Y)),re)le.endEmitted?w(q,new x):F(q,le,Y,!0);else if(le.ended)w(q,new _);else{if(le.destroyed)return!1;le.reading=!1,le.decoder&&!K?(Y=le.decoder.write(Y),le.objectMode||Y.length!==0?F(q,le,Y,!1):O(q,le)):F(q,le,Y,!1)}else re||(le.reading=!1,O(q,le))}return!le.ended&&(le.length=R?q=R:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function z(q,Y){return q<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:q!==q?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(q>Y.highWaterMark&&(Y.highWaterMark=P(q)),q<=Y.length?q:Y.ended?Y.length:(Y.needReadable=!0,0))}S.prototype.read=function(q){f("read",q),q=parseInt(q,10);var Y=this._readableState,K=q;if(q!==0&&(Y.emittedReadable=!1),q===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return f("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?U(this):L(this),null;if(q=z(q,Y),q===0&&Y.ended)return Y.length===0&&U(this),null;var re=Y.needReadable;f("need readable",re),(Y.length===0||Y.length-q0?se=W(q,Y):se=null,se===null?(Y.needReadable=Y.length<=Y.highWaterMark,q=0):(Y.length-=q,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),K!==q&&Y.ended&&U(this)),se!==null&&this.emit("data",se),se};function I(q,Y){if(f("onEofChunk"),!Y.ended){if(Y.decoder){var K=Y.decoder.end();K&&K.length&&(Y.buffer.push(K),Y.length+=Y.objectMode?1:K.length)}Y.ended=!0,Y.sync?L(q):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,B(q)))}}function L(q){var Y=q._readableState;f("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(f("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(B,q))}function B(q){var Y=q._readableState;f("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(q.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,H(q)}function O(q,Y){Y.readingMore||(Y.readingMore=!0,process.nextTick(G,q,Y))}function G(q,Y){for(;!Y.reading&&!Y.ended&&(Y.length1&&j(re.pipes,q)!==-1)&&!we&&(f("false write response, pause",re.awaitDrain),re.awaitDrain++),K.pause())}function oe(ce){f("onerror",ce),ee(),q.removeListener("error",oe),i(q,"error")===0&&w(q,ce)}T(q,"error",oe);function te(){q.removeListener("finish",ie),ee()}q.once("close",te);function ie(){f("onfinish"),q.removeListener("close",te),ee()}q.once("finish",ie);function ee(){f("unpipe"),K.unpipe(q)}return q.emit("pipe",K),re.flowing||(f("pipe resume"),K.resume()),q};function $(q){return function(){var K=q._readableState;f("pipeOnDrain",K.awaitDrain),K.awaitDrain&&K.awaitDrain--,K.awaitDrain===0&&i(q,"data")&&(K.flowing=!0,H(q))}}S.prototype.unpipe=function(q){var Y=this._readableState,K={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return q&&q!==Y.pipes?this:(q||(q=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,q&&q.emit("unpipe",this,K),this);if(!q){var re=Y.pipes,se=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var le=0;le0,re.flowing!==!1&&this.resume()):q==="readable"&&!re.endEmitted&&!re.readableListening&&(re.readableListening=re.needReadable=!0,re.flowing=!1,re.emittedReadable=!1,f("on readable",re.length,re.reading),re.length?L(this):re.reading||process.nextTick(Z,this)),K},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(q,Y){var K=o.prototype.removeListener.call(this,q,Y);return q==="readable"&&process.nextTick(X,this),K},S.prototype.removeAllListeners=function(q){var Y=o.prototype.removeAllListeners.apply(this,arguments);return(q==="readable"||q===void 0)&&process.nextTick(X,this),Y};function X(q){var Y=q._readableState;Y.readableListening=q.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:q.listenerCount("data")>0&&q.resume()}function Z(q){f("readable nexttick read 0"),q.read(0)}S.prototype.resume=function(){var q=this._readableState;return q.flowing||(f("resume"),q.flowing=!q.readableListening,J(this,q)),q.paused=!1,this};function J(q,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,process.nextTick(N,q,Y))}function N(q,Y){f("resume",Y.reading),Y.reading||q.read(0),Y.resumeScheduled=!1,q.emit("resume"),H(q),Y.flowing&&!Y.reading&&q.read(0)}S.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function H(q){var Y=q._readableState;for(f("flow",Y.flowing);Y.flowing&&q.read()!==null;);}S.prototype.wrap=function(q){var Y=this,K=this._readableState,re=!1;q.on("end",function(){if(f("wrapped end"),K.decoder&&!K.ended){var ue=K.decoder.end();ue&&ue.length&&Y.push(ue)}Y.push(null)}),q.on("data",function(ue){if(f("wrapped data"),K.decoder&&(ue=K.decoder.write(ue)),!(K.objectMode&&ue==null)&&!(!K.objectMode&&(!ue||!ue.length))){var fe=Y.push(ue);fe||(re=!0,q.pause())}});for(var se in q)this[se]===void 0&&typeof q[se]=="function"&&(this[se]=(function(fe){return function(){return q[fe].apply(q,arguments)}})(se));for(var le=0;le=Y.length?(Y.decoder?K=Y.buffer.join(""):Y.buffer.length===1?K=Y.buffer.first():K=Y.buffer.concat(Y.length),Y.buffer.clear()):K=Y.buffer.consume(q,Y.decoder),K}function U(q){var Y=q._readableState;f("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,process.nextTick(V,Y,q))}function V(q,Y){if(f("endReadableNT",q.endEmitted,q.length),!q.endEmitted&&q.length===0&&(q.endEmitted=!0,Y.readable=!1,Y.emit("end"),q.autoDestroy)){var K=Y._writableState;(!K||K.autoDestroy&&K.finished)&&Y.destroy()}}typeof Symbol=="function"&&(S.from=function(q,Y){return C===void 0&&(C=Cie()),C(S,q,Y)});function j(q,Y){for(var K=0,re=q.length;K0;return u(x,M,C,function(w){_||(_=w),w&&v.forEach(c),!M&&(v.forEach(c),y(_))})});return g.reduce(f)}r.exports=d}}),Fie=ye({"node_modules/stream-browserify/index.js"(e,r){r.exports=i;var t=Sm().EventEmitter,a=d0();a(i,t),i.Readable=GL(),i.Writable=qL(),i.Duplex=Um(),i.Transform=HL(),i.PassThrough=Die(),i.finished=CT(),i.pipeline=Lie(),i.Stream=i;function i(){t.call(this)}i.prototype.pipe=function(o,s){var l=this;function n(g){o.writable&&o.write(g)===!1&&l.pause&&l.pause()}l.on("data",n);function u(){l.readable&&l.resume&&l.resume()}o.on("drain",u),!o._isStdio&&(!s||s.end!==!1)&&(l.on("end",f),l.on("close",h));var c=!1;function f(){c||(c=!0,o.end())}function h(){c||(c=!0,typeof o.destroy=="function"&&o.destroy())}function d(g){if(p(),t.listenerCount(this,"error")===0)throw g}l.on("error",d),o.on("error",d);function p(){l.removeListener("data",n),o.removeListener("drain",u),l.removeListener("end",f),l.removeListener("close",h),l.removeListener("error",d),o.removeListener("error",d),l.removeListener("end",p),l.removeListener("close",p),o.removeListener("close",p)}return l.on("end",p),l.on("close",p),o.on("close",p),o.emit("pipe",l),o}}}),Ly=ye({"node_modules/util/util.js"(e){var r=Object.getOwnPropertyDescriptors||function(G){for(var $=Object.keys(G),X={},Z=0;Z<$.length;Z++)X[$[Z]]=Object.getOwnPropertyDescriptor(G,$[Z]);return X},t=/%[sdj%]/g;e.format=function(O){if(!E(O)){for(var G=[],$=0;$=Z)return H;switch(H){case"%s":return String(X[$++]);case"%d":return Number(X[$++]);case"%j":try{return JSON.stringify(X[$++])}catch{return"[Circular]"}default:return H}}),N=X[$];$"u")return function(){return e.deprecate(O,G).apply(this,arguments)};var $=!1;function X(){if(!$){if(process.throwDeprecation)throw new Error(G);process.traceDeprecation?console.trace(G):console.error(G),$=!0}return O.apply(this,arguments)}return X};var a={},i=/^$/;o="false",o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i");var o;e.debuglog=function(O){if(O=O.toUpperCase(),!a[O])if(i.test(O)){var G=process.pid;a[O]=function(){var $=e.format.apply(e,arguments);console.error("%s %d: %s",O,G,$)}}else a[O]=function(){};return a[O]};function s(O,G){var $={seen:[],stylize:n};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),y(G)?$.showHidden=G:G&&e._extend($,G),C($.showHidden)&&($.showHidden=!1),C($.depth)&&($.depth=2),C($.colors)&&($.colors=!1),C($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=l),c($,O,$.depth)}e.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(O,G){var $=s.styles[G];return $?"\x1B["+s.colors[$][0]+"m"+O+"\x1B["+s.colors[$][1]+"m":O}function n(O,G){return O}function u(O){var G={};return O.forEach(function($,X){G[$]=!0}),G}function c(O,G,$){if(O.customInspect&&G&&S(G.inspect)&&G.inspect!==e.inspect&&!(G.constructor&&G.constructor.prototype===G)){var X=G.inspect($,O);return E(X)||(X=c(O,X,$)),X}var Z=f(O,G);if(Z)return Z;var J=Object.keys(G),N=u(J);if(O.showHidden&&(J=Object.getOwnPropertyNames(G)),b(G)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return h(G);if(J.length===0){if(S(G)){var H=G.name?": "+G.name:"";return O.stylize("[Function"+H+"]","special")}if(w(G))return O.stylize(RegExp.prototype.toString.call(G),"regexp");if(T(G))return O.stylize(Date.prototype.toString.call(G),"date");if(b(G))return h(G)}var W="",U=!1,V=["{","}"];if(m(G)&&(U=!0,V=["[","]"]),S(G)){var j=G.name?": "+G.name:"";W=" [Function"+j+"]"}if(w(G)&&(W=" "+RegExp.prototype.toString.call(G)),T(G)&&(W=" "+Date.prototype.toUTCString.call(G)),b(G)&&(W=" "+h(G)),J.length===0&&(!U||G.length==0))return V[0]+W+V[1];if($<0)return w(G)?O.stylize(RegExp.prototype.toString.call(G),"regexp"):O.stylize("[Object]","special");O.seen.push(G);var q;return U?q=d(O,G,$,N,J):q=J.map(function(Y){return p(O,G,$,N,Y,U)}),O.seen.pop(),g(q,W,V)}function f(O,G){if(C(G))return O.stylize("undefined","undefined");if(E(G)){var $="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize($,"string")}if(x(G))return O.stylize(""+G,"number");if(y(G))return O.stylize(""+G,"boolean");if(_(G))return O.stylize("null","null")}function h(O){return"["+Error.prototype.toString.call(O)+"]"}function d(O,G,$,X,Z){for(var J=[],N=0,H=G.length;N-1&&(J?H=H.split(` -`).map(function(U){return" "+U}).join(` -`).slice(2):H=` -`+H.split(` -`).map(function(U){return" "+U}).join(` -`))):H=O.stylize("[Circular]","special")),C(N)){if(J&&Z.match(/^\d+$/))return H;N=JSON.stringify(""+Z),N.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(N=N.slice(1,-1),N=O.stylize(N,"name")):(N=N.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),N=O.stylize(N,"string"))}return N+": "+H}function g(O,G,$){var X=0,Z=O.reduce(function(J,N){return X++,N.indexOf(` -`)>=0&&X++,J+N.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Z>60?$[0]+(G===""?"":G+` - `)+" "+O.join(`, - `)+" "+$[1]:$[0]+G+" "+O.join(", ")+" "+$[1]}e.types=BL();function m(O){return Array.isArray(O)}e.isArray=m;function y(O){return typeof O=="boolean"}e.isBoolean=y;function _(O){return O===null}e.isNull=_;function v(O){return O==null}e.isNullOrUndefined=v;function x(O){return typeof O=="number"}e.isNumber=x;function E(O){return typeof O=="string"}e.isString=E;function M(O){return typeof O=="symbol"}e.isSymbol=M;function C(O){return O===void 0}e.isUndefined=C;function w(O){return k(O)&&F(O)==="[object RegExp]"}e.isRegExp=w,e.types.isRegExp=w;function k(O){return typeof O=="object"&&O!==null}e.isObject=k;function T(O){return k(O)&&F(O)==="[object Date]"}e.isDate=T,e.types.isDate=T;function b(O){return k(O)&&(F(O)==="[object Error]"||O instanceof Error)}e.isError=b,e.types.isNativeError=b;function S(O){return typeof O=="function"}e.isFunction=S;function A(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O>"u"}e.isPrimitive=A,e.isBuffer=OL();function F(O){return Object.prototype.toString.call(O)}function D(O){return O<10?"0"+O.toString(10):O.toString(10)}var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var O=new Date,G=[D(O.getHours()),D(O.getMinutes()),D(O.getSeconds())].join(":");return[O.getDate(),R[O.getMonth()],G].join(" ")}e.log=function(){console.log("%s - %s",P(),e.format.apply(e,arguments))},e.inherits=d0(),e._extend=function(O,G){if(!G||!k(G))return O;for(var $=Object.keys(G),X=$.length;X--;)O[$[X]]=G[$[X]];return O};function z(O,G){return Object.prototype.hasOwnProperty.call(O,G)}var I=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');if(I&&G[I]){var $=G[I];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,I,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var X,Z,J=new Promise(function(W,U){X=W,Z=U}),N=[],H=0;H"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(C){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(k){return k.__proto__||Object.getPrototypeOf(k)},p(C)}var g={},m,y;function _(C,w,k){k||(k=Error);function T(S,A,F){return typeof w=="string"?w:w(S,A,F)}var b=(function(S){n(F,S);var A=c(F);function F(D,R,P){var z;return l(this,F),z=A.call(this,T(D,R,P)),z.code=C,z}return i(F)})(k);g[C]=b}function v(C,w){if(Array.isArray(C)){var k=C.length;return C=C.map(function(T){return String(T)}),k>2?"one of ".concat(w," ").concat(C.slice(0,k-1).join(", "),", or ")+C[k-1]:k===2?"one of ".concat(w," ").concat(C[0]," or ").concat(C[1]):"of ".concat(w," ").concat(C[0])}else return"of ".concat(w," ").concat(String(C))}function x(C,w,k){return C.substr(!k||k<0?0:+k,w.length)===w}function E(C,w,k){return(k===void 0||k>C.length)&&(k=C.length),C.substring(k-w.length,k)===w}function M(C,w,k){return typeof k!="number"&&(k=0),k+w.length>C.length?!1:C.indexOf(w,k)!==-1}_("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),_("ERR_INVALID_ARG_TYPE",function(C,w,k){m===void 0&&(m=LT()),m(typeof C=="string","'name' must be a string");var T;typeof w=="string"&&x(w,"not ")?(T="must not be",w=w.replace(/^not /,"")):T="must be";var b;if(E(C," argument"))b="The ".concat(C," ").concat(T," ").concat(v(w,"type"));else{var S=M(C,".")?"property":"argument";b='The "'.concat(C,'" ').concat(S," ").concat(T," ").concat(v(w,"type"))}return b+=". Received type ".concat(t(k)),b},TypeError),_("ERR_INVALID_ARG_VALUE",function(C,w){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";y===void 0&&(y=Ly());var T=y.inspect(w);return T.length>128&&(T="".concat(T.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(k,". Received ").concat(T)},TypeError,RangeError),_("ERR_INVALID_RETURN_VALUE",function(C,w,k){var T;return k&&k.constructor&&k.constructor.name?T="instance of ".concat(k.constructor.name):T="type ".concat(t(k)),"Expected ".concat(C,' to be returned from the "').concat(w,'"')+" function but got ".concat(T,".")},TypeError),_("ERR_MISSING_ARGS",function(){for(var C=arguments.length,w=new Array(C),k=0;k0,"At least one arg needs to be specified");var T="The ",b=w.length;switch(w=w.map(function(S){return'"'.concat(S,'"')}),b){case 1:T+="".concat(w[0]," argument");break;case 2:T+="".concat(w[0]," and ").concat(w[1]," arguments");break;default:T+=w.slice(0,b-1).join(", "),T+=", and ".concat(w[b-1]," arguments");break}return"".concat(T," must be specified")},TypeError),r.exports.codes=g}}),Pie=ye({"node_modules/assert/build/internal/assert/assertion_error.js"(e,r){"use strict";function t(B,O){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);O&&($=$.filter(function(X){return Object.getOwnPropertyDescriptor(B,X).enumerable})),G.push.apply(G,$)}return G}function a(B){for(var O=1;O"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 y(B){return Function.toString.call(B).indexOf("[native code]")!==-1}function _(B,O){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function($,X){return $.__proto__=X,$},_(B,O)}function v(B){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},v(B)}function x(B){"@babel/helpers - typeof";return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},x(B)}var E=Ly(),M=E.inspect,C=WL(),w=C.codes.ERR_INVALID_ARG_TYPE;function k(B,O,G){return(G===void 0||G>B.length)&&(G=B.length),B.substring(G-O.length,G)===O}function T(B,O){if(O=Math.floor(O),B.length==0||O==0)return"";var G=B.length*O;for(O=Math.floor(Math.log(O)/Math.log(2));O;)B+=B,O--;return B+=B.substring(0,G-B.length),B}var b="",S="",A="",F="",D={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:"},R=10;function P(B){var O=Object.keys(B),G=Object.create(Object.getPrototypeOf(B));return O.forEach(function($){G[$]=B[$]}),Object.defineProperty(G,"message",{value:B.message}),G}function z(B){return M(B,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function I(B,O,G){var $="",X="",Z=0,J="",N=!1,H=z(B),W=H.split(` -`),U=z(O).split(` -`),V=0,j="";if(G==="strictEqual"&&x(B)==="object"&&x(O)==="object"&&B!==null&&O!==null&&(G="strictEqualObject"),W.length===1&&U.length===1&&W[0]!==U[0]){var q=W[0].length+U[0].length;if(q<=R){if((x(B)!=="object"||B===null)&&(x(O)!=="object"||O===null)&&(B!==0||O!==0))return"".concat(D[G],` - -`)+"".concat(W[0]," !== ").concat(U[0],` -`)}else if(G!=="strictEqualObject"){var Y=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(q2&&(j=` - `.concat(T(" ",V),"^"),V=0)}}}for(var K=W[W.length-1],re=U[U.length-1];K===re&&(V++<2?J=` - `.concat(K).concat(J):$=K,W.pop(),U.pop(),!(W.length===0||U.length===0));)K=W[W.length-1],re=U[U.length-1];var se=Math.max(W.length,U.length);if(se===0){var le=H.split(` -`);if(le.length>30)for(le[26]="".concat(b,"...").concat(F);le.length>27;)le.pop();return"".concat(D.notIdentical,` - -`).concat(le.join(` +var _X=Object.create;var yE=Object.defineProperty;var xX=Object.getOwnPropertyDescriptor;var bX=Object.getOwnPropertyNames;var wX=Object.getPrototypeOf,TX=Object.prototype.hasOwnProperty;var AX=(oe,ye)=>()=>(ye||oe((ye={exports:{}}).exports,ye),ye.exports);var MX=(oe,ye,Fe,dt)=>{if(ye&&typeof ye=="object"||typeof ye=="function")for(let Zt of bX(ye))!TX.call(oe,Zt)&&Zt!==Fe&&yE(oe,Zt,{get:()=>ye[Zt],enumerable:!(dt=xX(ye,Zt))||dt.enumerable});return oe};var SX=(oe,ye,Fe)=>(Fe=oe!=null?_X(wX(oe)):{},MX(ye||!oe||!oe.__esModule?yE(Fe,"default",{value:oe,enumerable:!0}):Fe,oe));var CR=AX((kR,bx)=>{(function(oe,ye){typeof bx=="object"&&bx.exports?bx.exports=ye():oe.moduleName=ye()})(typeof self<"u"?self:kR,()=>{"use strict";var oe=(()=>{var ye=Object.create,Fe=Object.defineProperty,dt=Object.defineProperties,Zt=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,Yr=Object.getOwnPropertyNames,ma=Object.getOwnPropertySymbols,ya=Object.getPrototypeOf,wn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,On=(J,V)=>(V=Symbol[J])?V:Symbol.for("Symbol."+J),Fi=J=>{throw TypeError(J)},ho=(J,V,p)=>V in J?Fe(J,V,{enumerable:!0,configurable:!0,writable:!0,value:p}):J[V]=p,Li=(J,V)=>{for(var p in V||(V={}))wn.call(V,p)&&ho(J,p,V[p]);if(ma)for(var p of ma(V))xn.call(V,p)&&ho(J,p,V[p]);return J},lo=(J,V)=>dt(J,yr(V)),Lo=(J,V)=>{var p={};for(var b in J)wn.call(J,b)&&V.indexOf(b)<0&&(p[b]=J[b]);if(J!=null&&ma)for(var b of ma(J))V.indexOf(b)<0&&xn.call(J,b)&&(p[b]=J[b]);return p},zi=(J,V,p)=>function(){if(p)throw p[0];try{return J&&(V=(0,J[Yr(J)[0]])(J=0)),V}catch(E){throw p=[E],E}},ze=(J,V)=>function(){try{return V||(0,J[Yr(J)[0]])((V={exports:{}}).exports,V),V.exports}catch(b){throw V=0,b}},bu=(J,V)=>{for(var p in V)Fe(J,p,{get:V[p],enumerable:!0})},uf=(J,V,p,b)=>{if(V&&typeof V=="object"||typeof V=="function")for(let E of Yr(V))!wn.call(J,E)&&E!==p&&Fe(J,E,{get:()=>V[E],enumerable:!(b=Zt(V,E))||b.enumerable});return J},Yl=(J,V,p)=>(p=J!=null?ye(ya(J)):{},uf(V||!J||!J.__esModule?Fe(p,"default",{value:J,enumerable:!0}):p,J)),Po=J=>uf(Fe({},"__esModule",{value:!0}),J),Oh=function(J,V){this[0]=J,this[1]=V},ad=J=>{var V=J[On("asyncIterator")],p=!1,b,E={};return V==null?(V=J[On("iterator")](),b=k=>E[k]=l=>V[k](l)):(V=V.call(J),b=k=>E[k]=l=>{if(p){if(p=!1,k==="throw")throw l;return l}return p=!0,{done:!1,value:new Oh(new Promise(e=>{var t=V[k](l);t instanceof Object||Fi("Object expected"),e(t)}),1)}}),E[On("iterator")]=()=>E,b("next"),"throw"in V?b("throw"):E.throw=k=>{throw k},"return"in V&&b("return"),E},ev=ze({"src/version.js"(J){"use strict";J.version="4.0.0"}}),DR=ze({"node_modules/native-promise-only/lib/npo.src.js"(J,V){(function(b,E,k){E[b]=E[b]||k(),typeof V<"u"&&V.exports&&(V.exports=E[b])})("Promise",typeof window<"u"?window:J,function(){"use strict";var b,E,k,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(w,S,M,C){return Object.defineProperty(w,S,{value:M,writable:!0,configurable:C!==!1})}}catch{b=function(S,M,C){return S[M]=C,S}}k=function(){var w,S,M;function C(_,T){this.fn=_,this.self=T,this.next=void 0}return{add:function(T,f){M=new C(T,f),S?S.next=M:w=M,S=M,M=void 0},drain:function(){var T=w;for(w=S=E=void 0;T;)T.fn.call(T.self),T=T.next}}}();function t(i,w){k.add(i,w),E||(E=e(k.drain))}function n(i){var w,S=typeof i;return i!=null&&(S=="object"||S=="function")&&(w=i.then),typeof w=="function"?w:!1}function r(){for(var i=0;i0&&t(r,S))}catch(M){s.call(new m(S),M)}}}function s(i){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=i,w.state=2,w.chain.length>0&&t(r,w))}function c(i,w,S,M){for(var C=0;CEe?1:de>=Ee?0:NaN}p.descending=function(de,Ee){return Eede?1:Ee>=de?0:NaN},p.min=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}return at},p.max=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}return at},p.extent=function(de,Ee){var qe=-1,tt=de.length,at,ct,Nt;if(arguments.length===1){for(;++qe=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt1)return Nt/(Jt-1)},p.deviation=function(){var de=p.variance.apply(this,arguments);return de&&Math.sqrt(de)};function h(de){return{left:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)<0?tt=ct+1:at=ct}return tt},right:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)>0?at=ct:tt=ct+1}return tt}}}var v=h(s);p.bisectLeft=v.left,p.bisect=p.bisectRight=v.right,p.bisector=function(de){return h(de.length===1?function(Ee,qe){return s(de(Ee),qe)}:de)},p.shuffle=function(de,Ee,qe){(tt=arguments.length)<3&&(qe=de.length,tt<2&&(Ee=0));for(var tt=qe-Ee,at,ct;tt;)ct=Math.random()*tt--|0,at=de[tt+Ee],de[tt+Ee]=de[ct+Ee],de[ct+Ee]=at;return de},p.permute=function(de,Ee){for(var qe=Ee.length,tt=new Array(qe);qe--;)tt[qe]=de[Ee[qe]];return tt},p.pairs=function(de){for(var Ee=0,qe=de.length-1,tt,at=de[0],ct=new Array(qe<0?0:qe);Ee=0;)for(Nt=de[Ee],qe=Nt.length;--qe>=0;)ct[--at]=Nt[qe];return ct};var i=Math.abs;p.range=function(de,Ee,qe){if(arguments.length<3&&(qe=1,arguments.length<2&&(Ee=de,de=0)),(Ee-de)/qe===1/0)throw new Error("infinite range");var tt=[],at=w(i(qe)),ct=-1,Nt;if(de*=at,Ee*=at,qe*=at,qe<0)for(;(Nt=de+qe*++ct)>Ee;)tt.push(Nt/at);else for(;(Nt=de+qe*++ct)=Ee.length)return at?at.call(de,Jt):tt?Jt.sort(tt):Jt;for(var gr=-1,Hr=Jt.length,Vr=Ee[mr++],ca,Aa,Xr,oa=new M,fa;++gr=Ee.length)return St;var mr=[],gr=qe[Jt++];return St.forEach(function(Hr,Vr){mr.push({key:Hr,values:Nt(Vr,Jt)})}),gr?mr.sort(function(Hr,Vr){return gr(Hr.key,Vr.key)}):mr}return de.map=function(St,Jt){return ct(Jt,St,0)},de.entries=function(St){return Nt(ct(p.map,St,0),0)},de.key=function(St){return Ee.push(St),de},de.sortKeys=function(St){return qe[Ee.length-1]=St,de},de.sortValues=function(St){return tt=St,de},de.rollup=function(St){return at=St,de},de},p.set=function(de){var Ee=new O;if(de)for(var qe=0,tt=de.length;qe=0&&(tt=de.slice(qe+1),de=de.slice(0,qe)),de)return arguments.length<2?this[de].on(tt):this[de].on(tt,Ee);if(arguments.length===2){if(Ee==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(tt,null);return this}};function $(de){var Ee=[],qe=new M;function tt(){for(var at=Ee,ct=-1,Nt=at.length,St;++ct=0&&(qe=de.slice(0,Ee))!=="xmlns"&&(de=de.slice(Ee+1)),he.hasOwnProperty(qe)?{space:he[qe],local:de}:de}},q.attr=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node();return de=p.ns.qualify(de),de.local?qe.getAttributeNS(de.space,de.local):qe.getAttribute(de)}for(Ee in de)this.each(xe(Ee,de[Ee]));return this}return this.each(xe(de,Ee))};function xe(de,Ee){de=p.ns.qualify(de);function qe(){this.removeAttribute(de)}function tt(){this.removeAttributeNS(de.space,de.local)}function at(){this.setAttribute(de,Ee)}function ct(){this.setAttributeNS(de.space,de.local,Ee)}function Nt(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttribute(de):this.setAttribute(de,Jt)}function St(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,Jt)}return Ee==null?de.local?tt:qe:typeof Ee=="function"?de.local?St:Nt:de.local?ct:at}function we(de){return de.trim().replace(/\s+/g," ")}q.classed=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node(),tt=(de=Se(de)).length,at=-1;if(Ee=qe.classList){for(;++at=0;)(ct=qe[tt])&&(at&&at!==ct.nextSibling&&at.parentNode.insertBefore(ct,at),at=ct);return this},q.sort=function(de){de=Ae.apply(this,arguments);for(var Ee=-1,qe=this.length;++Ee=Ee&&(Ee=at+1);!(Jt=Nt[Ee])&&++Ee0&&(de=de.slice(0,at));var Nt=Tt.get(de);Nt&&(de=Nt,ct=$t);function St(){var gr=this[tt];gr&&(this.removeEventListener(de,gr,gr.$),delete this[tt])}function Jt(){var gr=ct(Ee,E(arguments));St.call(this),this.addEventListener(de,this[tt]=gr,gr.$=qe),gr._=Ee}function mr(){var gr=new RegExp("^__on([^.]+)"+p.requote(de)+"$"),Hr;for(var Vr in this)if(Hr=Vr.match(gr)){var ca=this[Vr];this.removeEventListener(Hr[1],ca,ca.$),delete this[Vr]}}return at?Ee?Jt:St:Ee?j:mr}var Tt=p.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Tt.forEach(function(de){"on"+de in k&&Tt.remove(de)});function At(de,Ee){return function(qe){var tt=p.event;p.event=qe,Ee[0]=this.__data__;try{de.apply(this,Ee)}finally{p.event=tt}}}function $t(de,Ee){var qe=At(de,Ee);return function(tt){var at=this,ct=tt.relatedTarget;(!ct||ct!==at&&!(ct.compareDocumentPosition(at)&8))&&qe.call(at,tt)}}var rr,_r=0;function Xt(de){var Ee=".dragsuppress-"+ ++_r,qe="click"+Ee,tt=p.select(e(de)).on("touchmove"+Ee,Q).on("dragstart"+Ee,Q).on("selectstart"+Ee,Q);if(rr==null&&(rr="onselectstart"in de?!1:F(de.style,"userSelect")),rr){var at=l(de).style,ct=at[rr];at[rr]="none"}return function(Nt){if(tt.on(Ee,null),rr&&(at[rr]=ct),Nt){var St=function(){tt.on(qe,null)};tt.on(qe,function(){Q(),St()},!0),setTimeout(St,0)}}}p.mouse=function(de){return Ot(de,re())};var or=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(de,Ee){Ee.changedTouches&&(Ee=Ee.changedTouches[0]);var qe=de.ownerSVGElement||de;if(qe.createSVGPoint){var tt=qe.createSVGPoint();if(or<0){var at=e(de);if(at.scrollX||at.scrollY){qe=p.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ct=qe[0][0].getScreenCTM();or=!(ct.f||ct.e),qe.remove()}}return or?(tt.x=Ee.pageX,tt.y=Ee.pageY):(tt.x=Ee.clientX,tt.y=Ee.clientY),tt=tt.matrixTransform(de.getScreenCTM().inverse()),[tt.x,tt.y]}var Nt=de.getBoundingClientRect();return[Ee.clientX-Nt.left-de.clientLeft,Ee.clientY-Nt.top-de.clientTop]}p.touch=function(de,Ee,qe){if(arguments.length<3&&(qe=Ee,Ee=re().changedTouches),Ee){for(var tt=0,at=Ee.length,ct;tt0?1:de<0?-1:0}function Pt(de,Ee,qe){return(Ee[0]-de[0])*(qe[1]-de[1])-(Ee[1]-de[1])*(qe[0]-de[0])}function Ct(de){return de>1?0:de<-1?Ne:Math.acos(de)}function qt(de){return de>1?Je:de<-1?-Je:Math.asin(de)}function Vt(de){return((de=Math.exp(de))-1/de)/2}function Ht(de){return((de=Math.exp(de))+1/de)/2}function Sr(de){return((de=Math.exp(2*de))-1)/(de+1)}function Kr(de){return(de=Math.sin(de/2))*de}var Yt=Math.SQRT2,Rt=2,nr=4;p.interpolateZoom=function(de,Ee){var qe=de[0],tt=de[1],at=de[2],ct=Ee[0],Nt=Ee[1],St=Ee[2],Jt=ct-qe,mr=Nt-tt,gr=Jt*Jt+mr*mr,Hr,Vr;if(gr0&&(be=be.transition().duration(Nt)),be.call(Ma.event)}function xi(){oa&&oa.domain(Xr.range().map(function(be){return(be-de.x)/de.k}).map(Xr.invert)),Ea&&Ea.domain(fa.range().map(function(be){return(be-de.y)/de.k}).map(fa.invert))}function di(be){St++||be({type:"zoomstart"})}function uo(be){xi(),be({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function pe(be){--St||(be({type:"zoomend"}),qe=null)}function y(){var be=this,Re=Aa.of(be,arguments),je=0,Ze=p.select(e(be)).on(mr,Dt).on(gr,Gt),ut=sa(p.mouse(be)),ft=Xt(be);Qi.call(be),di(Re);function Dt(){je=1,zn(p.mouse(be),ut),uo(Re)}function Gt(){Ze.on(mr,null).on(gr,null),ft(je),pe(Re)}}function N(){var be=this,Re=Aa.of(be,arguments),je={},Ze=0,ut,ft=".zoom-"+p.event.changedTouches[0].identifier,Dt="touchmove"+ft,Gt="touchend"+ft,Kt=[],st=p.select(be),It=Xt(be);ir(),di(Re),st.on(Jt,null).on(Vr,ir);function Ut(){var hr=p.touches(be);return ut=de.k,hr.forEach(function(vr){vr.identifier in je&&(je[vr.identifier]=sa(vr))}),hr}function ir(){var hr=p.event.target;p.select(hr).on(Dt,dr).on(Gt,Ar),Kt.push(hr);for(var vr=p.event.changedTouches,Or=0,Cr=vr.length;Or1){var Ta=ta[0],Ra=ta[1],ua=Ta[0]-Ra[0],ia=Ta[1]-Ra[1];Ze=ua*ua+ia*ia}}function dr(){var hr=p.touches(be),vr,Or,Cr,ta;Qi.call(be);for(var ka=0,Ta=hr.length;ka1?1:Ee,qe=qe<0?0:qe>1?1:qe,at=qe<=.5?qe*(1+Ee):qe+Ee-qe*Ee,tt=2*qe-at;function ct(St){return St>360?St-=360:St<0&&(St+=360),St<60?tt+(at-tt)*St/60:St<180?at:St<240?tt+(at-tt)*(240-St)/60:tt}function Nt(St){return Math.round(ct(St)*255)}return new Oa(Nt(de+120),Nt(de),Nt(de-120))}p.hcl=La;function La(de,Ee,qe){return this instanceof La?(this.h=+de,this.c=+Ee,void(this.l=+qe)):arguments.length<2?de instanceof La?new La(de.h,de.c,de.l):de instanceof ja?en(de.l,de.a,de.b):en((de=Dr((de=p.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new La(de,Ee,qe)}var un=La.prototype=new Qr;un.brighter=function(de){return new La(this.h,this.c,Math.min(100,this.l+Nn*(arguments.length?de:1)))},un.darker=function(de){return new La(this.h,this.c,Math.max(0,this.l-Nn*(arguments.length?de:1)))},un.rgb=function(){return Xa(this.h,this.c,this.l).rgb()};function Xa(de,Ee,qe){return isNaN(de)&&(de=0),isNaN(Ee)&&(Ee=0),new ja(qe,Math.cos(de*=et)*Ee,Math.sin(de)*Ee)}p.lab=ja;function ja(de,Ee,qe){return this instanceof ja?(this.l=+de,this.a=+Ee,void(this.b=+qe)):arguments.length<2?de instanceof ja?new ja(de.l,de.a,de.b):de instanceof La?Xa(de.h,de.c,de.l):Dr((de=Oa(de)).r,de.g,de.b):new ja(de,Ee,qe)}var Nn=18,yn=.95047,Un=1,li=1.08883,Yn=ja.prototype=new Qr;Yn.brighter=function(de){return new ja(Math.min(100,this.l+Nn*(arguments.length?de:1)),this.a,this.b)},Yn.darker=function(de){return new ja(Math.max(0,this.l-Nn*(arguments.length?de:1)),this.a,this.b)},Yn.rgb=function(){return on(this.l,this.a,this.b)};function on(de,Ee,qe){var tt=(de+16)/116,at=tt+Ee/500,ct=tt-qe/200;return at=vi(at)*yn,tt=vi(tt)*Un,ct=vi(ct)*li,new Oa(Ja(3.2404542*at-1.5371385*tt-.4985314*ct),Ja(-.969266*at+1.8760108*tt+.041556*ct),Ja(.0556434*at-.2040259*tt+1.0572252*ct))}function en(de,Ee,qe){return de>0?new La(Math.atan2(qe,Ee)*Mt,Math.sqrt(Ee*Ee+qe*qe),de):new La(NaN,NaN,de)}function vi(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function Yi(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function Ja(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}p.rgb=Oa;function Oa(de,Ee,qe){return this instanceof Oa?(this.r=~~de,this.g=~~Ee,void(this.b=~~qe)):arguments.length<2?de instanceof Oa?new Oa(de.r,de.g,de.b):Tr(""+de,Oa,Pa):new Oa(de,Ee,qe)}function lt(de){return new Oa(de>>16,de>>8&255,de&255)}function rt(de){return lt(de)+""}var fr=Oa.prototype=new Qr;fr.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Ee=this.r,qe=this.g,tt=this.b,at=30;return!Ee&&!qe&&!tt?new Oa(at,at,at):(Ee&&Ee>4,tt=tt>>4|tt,at=Jt&240,at=at>>4|at,ct=Jt&15,ct=ct<<4|ct):de.length===7&&(tt=(Jt&16711680)>>16,at=(Jt&65280)>>8,ct=Jt&255)),Ee(tt,at,ct))}function Ir(de,Ee,qe){var tt=Math.min(de/=255,Ee/=255,qe/=255),at=Math.max(de,Ee,qe),ct=at-tt,Nt,St,Jt=(at+tt)/2;return ct?(St=Jt<.5?ct/(at+tt):ct/(2-at-tt),de==at?Nt=(Ee-qe)/ct+(Ee0&&Jt<1?0:Nt),new Zr(Nt,St,Jt)}function Dr(de,Ee,qe){de=ot(de),Ee=ot(Ee),qe=ot(qe);var tt=Yi((.4124564*de+.3575761*Ee+.1804375*qe)/yn),at=Yi((.2126729*de+.7151522*Ee+.072175*qe)/Un),ct=Yi((.0193339*de+.119192*Ee+.9503041*qe)/li);return ja(116*at-16,500*(tt-at),200*(at-ct))}function ot(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function kt(de){var Ee=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Ee*2.55):Ee}var jt=p.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});jt.forEach(function(de,Ee){jt.set(de,lt(Ee))});function ar(de){return typeof de=="function"?de:function(){return de}}p.functor=ar,p.xhr=Er(D);function Er(de){return function(Ee,qe,tt){return arguments.length===2&&typeof qe=="function"&&(tt=qe,qe=null),xr(Ee,qe,de,tt)}}function xr(de,Ee,qe,tt){var at={},ct=p.dispatch("beforesend","progress","load","error"),Nt={},St=new XMLHttpRequest,Jt=null;self.XDomainRequest&&!("withCredentials"in St)&&/^(http(s)?:)?\/\//.test(de)&&(St=new XDomainRequest),"onload"in St?St.onload=St.onerror=mr:St.onreadystatechange=function(){St.readyState>3&&mr()};function mr(){var gr=St.status,Hr;if(!gr&&Lr(St)||gr>=200&&gr<300||gr===304){try{Hr=qe.call(at,St)}catch(Vr){ct.error.call(at,Vr);return}ct.load.call(at,Hr)}else ct.error.call(at,St)}return St.onprogress=function(gr){var Hr=p.event;p.event=gr;try{ct.progress.call(at,St)}finally{p.event=Hr}},at.header=function(gr,Hr){return gr=(gr+"").toLowerCase(),arguments.length<2?Nt[gr]:(Hr==null?delete Nt[gr]:Nt[gr]=Hr+"",at)},at.mimeType=function(gr){return arguments.length?(Ee=gr==null?null:gr+"",at):Ee},at.responseType=function(gr){return arguments.length?(Jt=gr,at):Jt},at.response=function(gr){return qe=gr,at},["get","post"].forEach(function(gr){at[gr]=function(){return at.send.apply(at,[gr].concat(E(arguments)))}}),at.send=function(gr,Hr,Vr){if(arguments.length===2&&typeof Hr=="function"&&(Vr=Hr,Hr=null),St.open(gr,de,!0),Ee!=null&&!("accept"in Nt)&&(Nt.accept=Ee+",*/*"),St.setRequestHeader)for(var ca in Nt)St.setRequestHeader(ca,Nt[ca]);return Ee!=null&&St.overrideMimeType&&St.overrideMimeType(Ee),Jt!=null&&(St.responseType=Jt),Vr!=null&&at.on("error",Vr).on("load",function(Aa){Vr(null,Aa)}),ct.beforesend.call(at,St),St.send(Hr??null),at},at.abort=function(){return St.abort(),at},p.rebind(at,ct,"on"),tt==null?at:at.get(zr(tt))}function zr(de){return de.length===1?function(Ee,qe){de(Ee==null?qe:null)}:de}function Lr(de){var Ee=de.responseType;return Ee&&Ee!=="text"?de.response:de.responseText}p.dsv=function(de,Ee){var qe=new RegExp('["'+de+` +]`),tt=de.charCodeAt(0);function at(mr,gr,Hr){arguments.length<3&&(Hr=gr,gr=null);var Vr=xr(mr,Ee,gr==null?ct:Nt(gr),Hr);return Vr.row=function(ca){return arguments.length?Vr.response((gr=ca)==null?ct:Nt(ca)):gr},Vr}function ct(mr){return at.parse(mr.responseText)}function Nt(mr){return function(gr){return at.parse(gr.responseText,mr)}}at.parse=function(mr,gr){var Hr;return at.parseRows(mr,function(Vr,ca){if(Hr)return Hr(Vr,ca-1);var Aa=function(Xr){for(var oa={},fa=Vr.length,Ea=0;Ea=Aa)return Vr;if(Ea)return Ea=!1,Hr;var hn=Xr;if(mr.charCodeAt(hn)===34){for(var An=hn;An++24?(isFinite(Ee)&&(clearTimeout(pn),pn=setTimeout(rn,Ee)),wa=0):(wa=1,tn(rn))}p.timer.flush=function(){Ri(),Gn()};function Ri(){for(var de=Date.now(),Ee=aa;Ee;)de>=Ee.t&&Ee.c(de-Ee.t)&&(Ee.c=null),Ee=Ee.n;return de}function Gn(){for(var de,Ee=aa,qe=1/0;Ee;)Ee.c?(Ee.t=0;--St)Xr.push(at[mr[Hr[St]][2]]);for(St=+ca;St1&&Pt(de[qe[tt-2]],de[qe[tt-1]],de[at])<=0;)--tt;qe[tt++]=at}return qe.slice(0,tt)}function Ai(de,Ee){return de[0]-Ee[0]||de[1]-Ee[1]}p.geom.polygon=function(de){return G(de,jn),de};var jn=p.geom.polygon.prototype=[];jn.area=function(){for(var de=-1,Ee=this.length,qe,tt=this[Ee-1],at=0;++deht)St=St.L;else if(Nt=Ee-Wo(St,qe),Nt>ht){if(!St.R){tt=St;break}St=St.R}else{ct>-ht?(tt=St.P,at=St):Nt>-ht?(tt=St,at=St.N):tt=at=St;break}var Jt=go(de);if(oo.insert(tt,Jt),!(!tt&&!at)){if(tt===at){Xi(tt),at=go(tt.site),oo.insert(Jt,at),Jt.edge=at.edge=Vo(tt.site,Jt.site),Io(tt),Io(at);return}if(!at){Jt.edge=Vo(tt.site,Jt.site);return}Xi(tt),Xi(at);var mr=tt.site,gr=mr.x,Hr=mr.y,Vr=de.x-gr,ca=de.y-Hr,Aa=at.site,Xr=Aa.x-gr,oa=Aa.y-Hr,fa=2*(Vr*oa-ca*Xr),Ea=Vr*Vr+ca*ca,Ma=Xr*Xr+oa*oa,sa={x:(oa*Ea-ca*Ma)/fa+gr,y:(Vr*Ma-Xr*Ea)/fa+Hr};Ts(at.edge,mr,Aa,sa),Jt.edge=Vo(mr,de,null,sa),at.edge=Vo(de,Aa,null,sa),Io(tt),Io(at)}}function jo(de,Ee){var qe=de.site,tt=qe.x,at=qe.y,ct=at-Ee;if(!ct)return tt;var Nt=de.P;if(!Nt)return-1/0;qe=Nt.site;var St=qe.x,Jt=qe.y,mr=Jt-Ee;if(!mr)return St;var gr=St-tt,Hr=1/ct-1/mr,Vr=gr/mr;return Hr?(-Vr+Math.sqrt(Vr*Vr-2*Hr*(gr*gr/(-2*mr)-Jt+mr/2+at-ct/2)))/Hr+tt:(tt+St)/2}function Wo(de,Ee){var qe=de.N;if(qe)return jo(qe,Ee);var tt=de.site;return tt.y===Ee?tt.x:1/0}function to(de){this.site=de,this.edges=[]}to.prototype.prepare=function(){for(var de=this.edges,Ee=de.length,qe;Ee--;)qe=de[Ee].edge,(!qe.b||!qe.a)&&de.splice(Ee,1);return de.sort(pi),de.length};function wo(de){for(var Ee=de[0][0],qe=de[1][0],tt=de[0][1],at=de[1][1],ct,Nt,St,Jt,mr=io,gr=mr.length,Hr,Vr,ca,Aa,Xr,oa;gr--;)if(Hr=mr[gr],!(!Hr||!Hr.prepare()))for(ca=Hr.edges,Aa=ca.length,Vr=0;Vrht||i(Jt-Nt)>ht)&&(ca.splice(Vr,0,new Bo(Vs(Hr.site,oa,i(St-Ee)ht?{x:Ee,y:i(ct-Ee)ht?{x:i(Nt-at)ht?{x:qe,y:i(ct-qe)ht?{x:i(Nt-tt)=-De)){var Vr=Jt*Jt+mr*mr,ca=gr*gr+oa*oa,Aa=(oa*Vr-mr*ca)/Hr,Xr=(Jt*ca-gr*Vr)/Hr,oa=Xr+St,fa=Mi.pop()||new Vi;fa.arc=de,fa.site=at,fa.x=Aa+Nt,fa.y=oa+Math.sqrt(Aa*Aa+Xr*Xr),fa.cy=oa,de.circle=fa;for(var Ea=null,Ma=Hi._;Ma;)if(fa.y0)){if(Xr/=ca,ca<0){if(Xr0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}if(Xr=qe-St,!(!ca&&Xr<0)){if(Xr/=ca,ca<0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}else if(ca>0){if(Xr0)){if(Xr/=Aa,Aa<0){if(Xr0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}if(Xr=tt-Jt,!(!Aa&&Xr<0)){if(Xr/=Aa,Aa<0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}else if(Aa>0){if(Xr0&&(at.a={x:St+Hr*ca,y:Jt+Hr*Aa}),Vr<1&&(at.b={x:St+Vr*ca,y:Jt+Vr*Aa}),at}}}}}}function Uo(de){for(var Ee=qi,qe=Ko(de[0][0],de[0][1],de[1][0],de[1][1]),tt=Ee.length,at;tt--;)at=Ee[tt],(!Ls(at,de)||!qe(at)||i(at.a.x-at.b.x)=ct)return;if(gr>Vr){if(!tt)tt={x:Aa,y:Nt};else if(tt.y>=St)return;qe={x:Aa,y:St}}else{if(!tt)tt={x:Aa,y:St};else if(tt.y1)if(gr>Vr){if(!tt)tt={x:(Nt-fa)/oa,y:Nt};else if(tt.y>=St)return;qe={x:(St-fa)/oa,y:St}}else{if(!tt)tt={x:(St-fa)/oa,y:St};else if(tt.y=ct)return;qe={x:ct,y:oa*ct+fa}}else{if(!tt)tt={x:ct,y:oa*ct+fa};else if(tt.x=gr&&fa.x<=Vr&&fa.y>=Hr&&fa.y<=ca?[[gr,ca],[Vr,ca],[Vr,Hr],[gr,Hr]]:[];Ea.point=Jt[Xr]}),mr}function St(Jt){return Jt.map(function(mr,gr){return{x:Math.round(tt(mr,gr)/ht)*ht,y:Math.round(at(mr,gr)/ht)*ht,i:gr}})}return Nt.links=function(Jt){return hl(St(Jt)).edges.filter(function(mr){return mr.l&&mr.r}).map(function(mr){return{source:Jt[mr.l.i],target:Jt[mr.r.i]}})},Nt.triangles=function(Jt){var mr=[];return hl(St(Jt)).cells.forEach(function(gr,Hr){for(var Vr=gr.site,ca=gr.edges.sort(pi),Aa=-1,Xr=ca.length,oa,fa,Ea=ca[Xr-1].edge,Ma=Ea.l===Vr?Ea.r:Ea.l;++AaMa&&(Ma=gr.x),gr.y>sa&&(sa=gr.y),ca.push(gr.x),Aa.push(gr.y);else for(Xr=0;XrMa&&(Ma=hn),An>sa&&(sa=An),ca.push(hn),Aa.push(An)}var zn=Ma-fa,$n=sa-Ea;zn>$n?sa=Ea+zn:Ma=fa+$n;function xi(pe,y,N,ie,fe,be,Re,je){if(!(isNaN(N)||isNaN(ie)))if(pe.leaf){var Ze=pe.x,ut=pe.y;if(Ze!=null)if(i(Ze-N)+i(ut-ie)<.01)di(pe,y,N,ie,fe,be,Re,je);else{var ft=pe.point;pe.x=pe.y=pe.point=null,di(pe,ft,Ze,ut,fe,be,Re,je),di(pe,y,N,ie,fe,be,Re,je)}else pe.x=N,pe.y=ie,pe.point=y}else di(pe,y,N,ie,fe,be,Re,je)}function di(pe,y,N,ie,fe,be,Re,je){var Ze=(fe+Re)*.5,ut=(be+je)*.5,ft=N>=Ze,Dt=ie>=ut,Gt=Dt<<1|ft;pe.leaf=!1,pe=pe.nodes[Gt]||(pe.nodes[Gt]=Fl()),ft?fe=Ze:Re=Ze,Dt?be=ut:je=ut,xi(pe,y,N,ie,fe,be,Re,je)}var uo=Fl();if(uo.add=function(pe){xi(uo,pe,+Hr(pe,++Xr),+Vr(pe,Xr),fa,Ea,Ma,sa)},uo.visit=function(pe){pl(pe,uo,fa,Ea,Ma,sa)},uo.find=function(pe){return $u(uo,pe[0],pe[1],fa,Ea,Ma,sa)},Xr=-1,Ee==null){for(;++Xrct||Vr>Nt||ca=hn,$n=qe>=An,xi=$n<<1|zn,di=xi+4;xiqe&&(ct=Ee.slice(qe,ct),St[Nt]?St[Nt]+=ct:St[++Nt]=ct),(tt=tt[0])===(at=at[0])?St[Nt]?St[Nt]+=at:St[++Nt]=at:(St[++Nt]=null,Jt.push({i:Nt,x:vs(tt,at)})),qe=rl.lastIndex;return qe=0&&!(tt=p.interpolators[qe](de,Ee)););return tt}p.interpolators=[function(de,Ee){var qe=typeof Ee;return(qe==="string"?jt.has(Ee.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ee)?uu:os:Ee instanceof Qr?uu:Array.isArray(Ee)?zu:qe==="object"&&isNaN(Ee)?tl:vs)(de,Ee)}],p.interpolateArray=zu;function zu(de,Ee){var qe=[],tt=[],at=de.length,ct=Ee.length,Nt=Math.min(de.length,Ee.length),St;for(St=0;St=0?de.slice(0,Ee):de,tt=Ee>=0?de.slice(Ee+1):"in";return qe=bc.get(qe)||Ku,tt=Lh.get(tt)||D,rh(tt(qe.apply(null,b.call(arguments,1))))};function rh(de){return function(Ee){return Ee<=0?0:Ee>=1?1:de(Ee)}}function Ju(de){return function(Ee){return 1-de(1-Ee)}}function ss(de){return function(Ee){return .5*(Ee<.5?de(2*Ee):2-de(2-2*Ee))}}function ah(de){return de*de}function wc(de){return de*de*de}function pc(de){if(de<=0)return 0;if(de>=1)return 1;var Ee=de*de,qe=Ee*de;return 4*(de<.5?qe:3*(de-Ee)+qe-.75)}function Nf(de){return function(Ee){return Math.pow(Ee,de)}}function Bu(de){return 1-Math.cos(de*Je)}function Tc(de){return Math.pow(2,10*(de-1))}function Ou(de){return 1-Math.sqrt(1-de*de)}function Gc(de,Ee){var qe;return arguments.length<2&&(Ee=.45),arguments.length?qe=Ee/We*Math.asin(1/de):(de=1,qe=Ee/4),function(tt){return 1+de*Math.pow(2,-10*tt)*Math.sin((tt-qe)*We/Ee)}}function pf(de){return de||(de=1.70158),function(Ee){return Ee*Ee*((de+1)*Ee-de)}}function $l(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}p.interpolateHcl=jf;function jf(de,Ee){de=p.hcl(de),Ee=p.hcl(Ee);var qe=de.h,tt=de.c,at=de.l,ct=Ee.h-qe,Nt=Ee.c-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.c:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Xa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateHsl=Hc;function Hc(de,Ee){de=p.hsl(de),Ee=p.hsl(Ee);var qe=de.h,tt=de.s,at=de.l,ct=Ee.h-qe,Nt=Ee.s-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.s:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Pa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateLab=Wc;function Wc(de,Ee){de=p.lab(de),Ee=p.lab(Ee);var qe=de.l,tt=de.a,at=de.b,ct=Ee.l-qe,Nt=Ee.a-tt,St=Ee.b-at;return function(Jt){return on(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateRound=Qu;function Qu(de,Ee){return Ee-=de,function(qe){return Math.round(de+Ee*qe)}}p.transform=function(de){var Ee=k.createElementNS(p.ns.prefix.svg,"g");return(p.transform=function(qe){if(qe!=null){Ee.setAttribute("transform",qe);var tt=Ee.transform.baseVal.consolidate()}return new Yc(tt?tt.matrix:Xc)})(de)};function Yc(de){var Ee=[de.a,de.b],qe=[de.c,de.d],tt=Uf(Ee),at=Nu(Ee,qe),ct=Uf(al(qe,Ee,-at))||0;Ee[0]*qe[1]180?Ee+=360:Ee-de>180&&(de+=360),tt.push({i:qe.push(ju(qe)+"rotate(",null,")")-2,x:vs(de,Ee)})):Ee&&qe.push(ju(qe)+"rotate("+Ee+")")}function ec(de,Ee,qe,tt){de!==Ee?tt.push({i:qe.push(ju(qe)+"skewX(",null,")")-2,x:vs(de,Ee)}):Ee&&qe.push(ju(qe)+"skewX("+Ee+")")}function cu(de,Ee,qe,tt){if(de[0]!==Ee[0]||de[1]!==Ee[1]){var at=qe.push(ju(qe)+"scale(",null,",",null,")");tt.push({i:at-4,x:vs(de[0],Ee[0])},{i:at-2,x:vs(de[1],Ee[1])})}else(Ee[0]!==1||Ee[1]!==1)&&qe.push(ju(qe)+"scale("+Ee+")")}function tc(de,Ee){var qe=[],tt=[];return de=p.transform(de),Ee=p.transform(Ee),Ac(de.translate,Ee.translate,qe,tt),Zc(de.rotate,Ee.rotate,qe,tt),ec(de.skew,Ee.skew,qe,tt),cu(de.scale,Ee.scale,qe,tt),de=Ee=null,function(at){for(var ct=-1,Nt=tt.length,St;++ct0?ct=sa:(qe.c=null,qe.t=NaN,qe=null,Ee.end({type:"end",alpha:ct=0})):sa>0&&(Ee.start({type:"start",alpha:ct=sa}),qe=ai(de.tick)),de):ct},de.start=function(){var sa,hn=ca.length,An=Aa.length,zn=tt[0],$n=tt[1],xi,di;for(sa=0;sa=0;)ct.push(gr=mr[Jt]),gr.parent=St,gr.depth=St.depth+1;qe&&(St.value=0),St.children=mr}else qe&&(St.value=+qe.call(tt,St,St.depth)||0),delete St.children;return El(at,function(Hr){var Vr,ca;de&&(Vr=Hr.children)&&Vr.sort(de),qe&&(ca=Hr.parent)&&(ca.value+=Hr.value)}),Nt}return tt.sort=function(at){return arguments.length?(de=at,tt):de},tt.children=function(at){return arguments.length?(Ee=at,tt):Ee},tt.value=function(at){return arguments.length?(qe=at,tt):qe},tt.revalue=function(at){return qe&&(Sl(at,function(ct){ct.children&&(ct.value=0)}),El(at,function(ct){var Nt;ct.children||(ct.value=+qe.call(tt,ct,ct.depth)||0),(Nt=ct.parent)&&(Nt.value+=ct.value)})),at},tt};function fu(de,Ee){return p.rebind(de,Ee,"sort","children","value"),de.nodes=de,de.links=_l,de}function Sl(de,Ee){for(var qe=[de];(de=qe.pop())!=null;)if(Ee(de),(at=de.children)&&(tt=at.length))for(var tt,at;--tt>=0;)qe.push(at[tt])}function El(de,Ee){for(var qe=[de],tt=[];(de=qe.pop())!=null;)if(tt.push(de),(Nt=de.children)&&(ct=Nt.length))for(var at=-1,ct,Nt;++atat&&(at=St),tt.push(St)}for(Nt=0;Nttt&&(qe=Ee,tt=at);return qe}function _f(de){return de.reduce(Mu,0)}function Mu(de,Ee){return de+Ee[1]}p.layout.histogram=function(){var de=!0,Ee=Number,qe=Vu,tt=ic;function at(ct,Vr){for(var St=[],Jt=ct.map(Ee,this),mr=qe.call(this,Jt,Vr),gr=tt.call(this,mr,Jt,Vr),Hr,Vr=-1,ca=Jt.length,Aa=gr.length-1,Xr=de?1:1/ca,oa;++Vr0)for(Vr=-1;++Vr=mr[0]&&oa<=mr[1]&&(Hr=St[p.bisect(gr,oa,1,Aa)-1],Hr.y+=Xr,Hr.push(ct[Vr]));return St}return at.value=function(ct){return arguments.length?(Ee=ct,at):Ee},at.range=function(ct){return arguments.length?(qe=ar(ct),at):qe},at.bins=function(ct){return arguments.length?(tt=typeof ct=="number"?function(Nt){return Sc(Nt,ct)}:ar(ct),at):tt},at.frequency=function(ct){return arguments.length?(de=!!ct,at):de},at};function ic(de,Ee){return Sc(de,Math.ceil(Math.log(Ee.length)/Math.LN2+1))}function Sc(de,Ee){for(var qe=-1,tt=+de[0],at=(de[1]-tt)/Ee,ct=[];++qe<=Ee;)ct[qe]=at*qe+tt;return ct}function Vu(de){return[p.min(de),p.max(de)]}p.layout.pack=function(){var de=p.layout.hierarchy().sort(xo),Ee=0,qe=[1,1],tt;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr=qe[0],gr=qe[1],Hr=tt==null?Math.sqrt:typeof tt=="function"?tt:function(){return tt};if(Jt.x=Jt.y=0,El(Jt,function(ca){ca.r=+Hr(ca.value)}),El(Jt,xf),Ee){var Vr=Ee*(tt?1:Math.max(2*Jt.r/mr,2*Jt.r/gr))/2;El(Jt,function(ca){ca.r+=Vr}),El(Jt,xf),El(Jt,function(ca){ca.r-=Vr})}return Hf(Jt,mr/2,gr/2,tt?1:1/Math.max(2*Jt.r/mr,2*Jt.r/gr)),St}return at.size=function(ct){return arguments.length?(qe=ct,at):qe},at.radius=function(ct){return arguments.length?(tt=ct==null||typeof ct=="function"?ct:+ct,at):tt},at.padding=function(ct){return arguments.length?(Ee=+ct,at):Ee},fu(at,de)};function xo(de,Ee){return de.value-Ee.value}function Ec(de,Ee){var qe=de._pack_next;de._pack_next=Ee,Ee._pack_prev=de,Ee._pack_next=qe,qe._pack_prev=Ee}function xh(de,Ee){de._pack_next=Ee,Ee._pack_prev=de}function Vf(de,Ee){var qe=Ee.x-de.x,tt=Ee.y-de.y,at=de.r+Ee.r;return .999*at*at>qe*qe+tt*tt}function xf(de){if(!(Ee=de.children)||!(Vr=Ee.length))return;var Ee,qe=1/0,tt=-1/0,at=1/0,ct=-1/0,Nt,St,Jt,mr,gr,Hr,Vr;function ca(sa){qe=Math.min(sa.x-sa.r,qe),tt=Math.max(sa.x+sa.r,tt),at=Math.min(sa.y-sa.r,at),ct=Math.max(sa.y+sa.r,ct)}if(Ee.forEach(Gf),Nt=Ee[0],Nt.x=-Nt.r,Nt.y=0,ca(Nt),Vr>1&&(St=Ee[1],St.x=St.r,St.y=0,ca(St),Vr>2))for(Jt=Ee[2],il(Nt,St,Jt),ca(Jt),Ec(Nt,Jt),Nt._pack_prev=Jt,Ec(Jt,St),St=Nt._pack_next,mr=3;mroa.x&&(oa=hn),hn.depth>fa.depth&&(fa=hn)});var Ea=Ee(Xr,oa)/2-Xr.x,Ma=qe[0]/(oa.x+Ee(oa,Xr)/2+Ea),sa=qe[1]/(fa.depth||1);Sl(ca,function(hn){hn.x=(hn.x+Ea)*Ma,hn.y=hn.depth*sa})}return Vr}function ct(gr){for(var Hr={A:null,children:[gr]},Vr=[Hr],ca;(ca=Vr.pop())!=null;)for(var Aa=ca.children,Xr,oa=0,fa=Aa.length;oa0&&(Lc(Ft(Xr,gr,Vr),gr,hn),fa+=hn,Ea+=hn),Ma+=Xr.m,fa+=ca.m,sa+=oa.m,Ea+=Aa.m;Xr&&!Cc(Aa)&&(Aa.t=Xr,Aa.m+=Ma-Ea),ca&&!kc(oa)&&(oa.t=ca,oa.m+=fa-sa,Vr=gr)}return Vr}function mr(gr){gr.x*=qe[0],gr.y=gr.depth*qe[1]}return at.separation=function(gr){return arguments.length?(Ee=gr,at):Ee},at.size=function(gr){return arguments.length?(tt=(qe=gr)==null?mr:null,at):tt?null:qe},at.nodeSize=function(gr){return arguments.length?(tt=(qe=gr)==null?null:mr,at):tt?qe:null},fu(at,de)};function kl(de,Ee){return de.parent==Ee.parent?1:2}function kc(de){var Ee=de.children;return Ee.length?Ee[0]:de.t}function Cc(de){var Ee=de.children,qe;return(qe=Ee.length)?Ee[qe-1]:de.t}function Lc(de,Ee,qe){var tt=qe/(Ee.i-de.i);Ee.c-=tt,Ee.s+=qe,de.c+=tt,Ee.z+=qe,Ee.m+=qe}function vc(de){for(var Ee=0,qe=0,tt=de.children,at=tt.length,ct;--at>=0;)ct=tt[at],ct.z+=Ee,ct.m+=Ee,Ee+=ct.s+(qe+=ct.c)}function Ft(de,Ee,qe){return de.a.parent===Ee.parent?de.a:qe}p.layout.cluster=function(){var de=p.layout.hierarchy().sort(null).value(null),Ee=kl,qe=[1,1],tt=!1;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr,gr=0;El(Jt,function(Xr){var oa=Xr.children;oa&&oa.length?(Xr.x=Fr(oa),Xr.y=tr(oa)):(Xr.x=mr?gr+=Ee(Xr,mr):0,Xr.y=0,mr=Xr)});var Hr=wr(Jt),Vr=ea(Jt),ca=Hr.x-Ee(Hr,Vr)/2,Aa=Vr.x+Ee(Vr,Hr)/2;return El(Jt,tt?function(Xr){Xr.x=(Xr.x-Jt.x)*qe[0],Xr.y=(Jt.y-Xr.y)*qe[1]}:function(Xr){Xr.x=(Xr.x-ca)/(Aa-ca)*qe[0],Xr.y=(1-(Jt.y?Xr.y/Jt.y:1))*qe[1]}),St}return at.separation=function(ct){return arguments.length?(Ee=ct,at):Ee},at.size=function(ct){return arguments.length?(tt=(qe=ct)==null,at):tt?null:qe},at.nodeSize=function(ct){return arguments.length?(tt=(qe=ct)!=null,at):tt?qe:null},fu(at,de)};function tr(de){return 1+p.max(de,function(Ee){return Ee.y})}function Fr(de){return de.reduce(function(Ee,qe){return Ee+qe.x},0)/de.length}function wr(de){var Ee=de.children;return Ee&&Ee.length?wr(Ee[0]):de}function ea(de){var Ee=de.children,qe;return Ee&&(qe=Ee.length)?ea(Ee[qe-1]):de}p.layout.treemap=function(){var de=p.layout.hierarchy(),Ee=Math.round,qe=[1,1],tt=null,at=ba,ct=!1,Nt,St="squarify",Jt=.5*(1+Math.sqrt(5));function mr(Xr,oa){for(var fa=-1,Ea=Xr.length,Ma,sa;++fa0;)Ea.push(sa=Ma[$n-1]),Ea.area+=sa.area,St!=="squarify"||(An=Vr(Ea,zn))<=hn?(Ma.pop(),hn=An):(Ea.area-=Ea.pop().area,ca(Ea,zn,fa,!1),zn=Math.min(fa.dx,fa.dy),Ea.length=Ea.area=0,hn=1/0);Ea.length&&(ca(Ea,zn,fa,!0),Ea.length=Ea.area=0),oa.forEach(gr)}}function Hr(Xr){var oa=Xr.children;if(oa&&oa.length){var fa=at(Xr),Ea=oa.slice(),Ma,sa=[];for(mr(Ea,fa.dx*fa.dy/Xr.value),sa.area=0;Ma=Ea.pop();)sa.push(Ma),sa.area+=Ma.area,Ma.z!=null&&(ca(sa,Ma.z?fa.dx:fa.dy,fa,!Ea.length),sa.length=sa.area=0);oa.forEach(Hr)}}function Vr(Xr,oa){for(var fa=Xr.area,Ea,Ma=0,sa=1/0,hn=-1,An=Xr.length;++hnMa&&(Ma=Ea));return fa*=fa,oa*=oa,fa?Math.max(oa*Ma*Jt/fa,fa/(oa*sa*Jt)):1/0}function ca(Xr,oa,fa,Ea){var Ma=-1,sa=Xr.length,hn=fa.x,An=fa.y,zn=oa?Ee(Xr.area/oa):0,$n;if(oa==fa.dx){for((Ea||zn>fa.dy)&&(zn=fa.dy);++Mafa.dx)&&(zn=fa.dx);++Ma1);return de+Ee*tt*Math.sqrt(-2*Math.log(ct)/ct)}},logNormal:function(){var de=p.random.normal.apply(p,arguments);return function(){return Math.exp(de())}},bates:function(de){var Ee=p.random.irwinHall(de);return function(){return Ee()/de}},irwinHall:function(de){return function(){for(var Ee=0,qe=0;qe2?vn:mn,mr=tt?Tu:vf;return at=Jt(de,Ee,mr,qe),ct=Jt(Ee,de,mr,Fu),St}function St(Jt){return at(Jt)}return St.invert=function(Jt){return ct(Jt)},St.domain=function(Jt){return arguments.length?(de=Jt.map(Number),Nt()):de},St.range=function(Jt){return arguments.length?(Ee=Jt,Nt()):Ee},St.rangeRound=function(Jt){return St.range(Jt).interpolate(Qu)},St.clamp=function(Jt){return arguments.length?(tt=Jt,Nt()):tt},St.interpolate=function(Jt){return arguments.length?(qe=Jt,Nt()):qe},St.ticks=function(Jt){return ri(de,Jt)},St.tickFormat=function(Jt,mr){return d3_scale_linearTickFormat(de,Jt,mr)},St.nice=function(Jt){return _i(de,Jt),Nt()},St.copy=function(){return En(de,Ee,qe,tt)},Nt()}function yi(de,Ee){return p.rebind(de,Ee,"range","rangeRound","interpolate","clamp")}function _i(de,Ee){return Da(de,Ha(ki(de,Ee)[2])),Da(de,Ha(ki(de,Ee)[2])),de}function ki(de,Ee){Ee==null&&(Ee=10);var qe=Na(de),tt=qe[1]-qe[0],at=Math.pow(10,Math.floor(Math.log(tt/Ee)/Math.LN10)),ct=Ee/tt*at;return ct<=.15?at*=10:ct<=.35?at*=5:ct<=.75&&(at*=2),qe[0]=Math.ceil(qe[0]/at)*at,qe[1]=Math.floor(qe[1]/at)*at+at*.5,qe[2]=at,qe}function ri(de,Ee){return p.range.apply(p,ki(de,Ee))}var kn={s:1,g:1,p:1,r:1,e:1};function Ln(de){return-Math.floor(Math.log(de)/Math.LN10+.01)}function Ni(de,Ee){var qe=Ln(Ee[2]);return de in kn?Math.abs(qe-Ln(Math.max(i(Ee[0]),i(Ee[1]))))+ +(de!=="e"):qe-(de==="%")*2}p.scale.log=function(){return Zi(p.scale.linear().domain([0,1]),10,!0,[1,10])};function Zi(de,Ee,qe,tt){function at(St){return(qe?Math.log(St<0?0:St):-Math.log(St>0?0:-St))/Math.log(Ee)}function ct(St){return qe?Math.pow(Ee,St):-Math.pow(Ee,-St)}function Nt(St){return de(at(St))}return Nt.invert=function(St){return ct(de.invert(St))},Nt.domain=function(St){return arguments.length?(qe=St[0]>=0,de.domain((tt=St.map(Number)).map(at)),Nt):tt},Nt.base=function(St){return arguments.length?(Ee=+St,de.domain(tt.map(at)),Nt):Ee},Nt.nice=function(){var St=Da(tt.map(at),qe?Math:Co);return de.domain(St),tt=St.map(ct),Nt},Nt.ticks=function(){var St=Na(tt),Jt=[],mr=St[0],gr=St[1],Hr=Math.floor(at(mr)),Vr=Math.ceil(at(gr)),ca=Ee%1?2:Ee;if(isFinite(Vr-Hr)){if(qe){for(;Hr0;Aa--)Jt.push(ct(Hr)*Aa);for(Hr=0;Jt[Hr]gr;Vr--);Jt=Jt.slice(Hr,Vr)}return Jt},Nt.copy=function(){return Zi(de.copy(),Ee,qe,tt)},yi(Nt,de)}var Co={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};p.scale.pow=function(){return Do(p.scale.linear(),1,[0,1])};function Do(de,Ee,qe){var tt=Fo(Ee),at=Fo(1/Ee);function ct(Nt){return de(tt(Nt))}return ct.invert=function(Nt){return at(de.invert(Nt))},ct.domain=function(Nt){return arguments.length?(de.domain((qe=Nt.map(Number)).map(tt)),ct):qe},ct.ticks=function(Nt){return ri(qe,Nt)},ct.tickFormat=function(Nt,St){return d3_scale_linearTickFormat(qe,Nt,St)},ct.nice=function(Nt){return ct.domain(_i(qe,Nt))},ct.exponent=function(Nt){return arguments.length?(tt=Fo(Ee=Nt),at=Fo(1/Ee),de.domain(qe.map(tt)),ct):Ee},ct.copy=function(){return Do(de.copy(),Ee,qe)},yi(ct,de)}function Fo(de){return function(Ee){return Ee<0?-Math.pow(-Ee,de):Math.pow(Ee,de)}}p.scale.sqrt=function(){return p.scale.pow().exponent(.5)},p.scale.ordinal=function(){return Yo([],{t:"range",a:[[]]})};function Yo(de,Ee){var qe,tt,at;function ct(St){return tt[((qe.get(St)||(Ee.t==="range"?qe.set(St,de.push(St)):NaN))-1)%tt.length]}function Nt(St,Jt){return p.range(de.length).map(function(mr){return St+Jt*mr})}return ct.domain=function(St){if(!arguments.length)return de;de=[],qe=new M;for(var Jt=-1,mr=St.length,gr;++Jt0?qe[ct-1]:de[0],ctVr?0:1;if(gr=Ke)return Jt(gr,Aa)+(mr?Jt(mr,1-Aa):"")+"Z";var Xr,oa,fa,Ea,Ma=0,sa=0,hn,An,zn,$n,xi,di,uo,pe,y=[];if((Ea=(+Nt.apply(this,arguments)||0)/2)&&(fa=tt===zl?Math.sqrt(mr*mr+gr*gr):+tt.apply(this,arguments),Aa||(sa*=-1),gr&&(sa=qt(fa/gr*Math.sin(Ea))),mr&&(Ma=qt(fa/mr*Math.sin(Ea)))),gr){hn=gr*Math.cos(Hr+sa),An=gr*Math.sin(Hr+sa),zn=gr*Math.cos(Vr-sa),$n=gr*Math.sin(Vr-sa);var N=Math.abs(Vr-Hr-2*sa)<=Ne?0:1;if(sa&&mc(hn,An,zn,$n)===Aa^N){var ie=(Hr+Vr)/2;hn=gr*Math.cos(ie),An=gr*Math.sin(ie),zn=$n=null}}else hn=An=0;if(mr){xi=mr*Math.cos(Vr-Ma),di=mr*Math.sin(Vr-Ma),uo=mr*Math.cos(Hr+Ma),pe=mr*Math.sin(Hr+Ma);var fe=Math.abs(Hr-Vr+2*Ma)<=Ne?0:1;if(Ma&&mc(xi,di,uo,pe)===1-Aa^fe){var be=(Hr+Vr)/2;xi=mr*Math.cos(be),di=mr*Math.sin(be),uo=pe=null}}else xi=di=0;if(ca>ht&&(Xr=Math.min(Math.abs(gr-mr)/2,+qe.apply(this,arguments)))>.001){oa=mr0?0:1}function Jc(de,Ee,qe,tt,at){var ct=de[0]-Ee[0],Nt=de[1]-Ee[1],St=(at?tt:-tt)/Math.sqrt(ct*ct+Nt*Nt),Jt=St*Nt,mr=-St*ct,gr=de[0]+Jt,Hr=de[1]+mr,Vr=Ee[0]+Jt,ca=Ee[1]+mr,Aa=(gr+Vr)/2,Xr=(Hr+ca)/2,oa=Vr-gr,fa=ca-Hr,Ea=oa*oa+fa*fa,Ma=qe-tt,sa=gr*ca-Vr*Hr,hn=(fa<0?-1:1)*Math.sqrt(Math.max(0,Ma*Ma*Ea-sa*sa)),An=(sa*fa-oa*hn)/Ea,zn=(-sa*oa-fa*hn)/Ea,$n=(sa*fa+oa*hn)/Ea,xi=(-sa*oa+fa*hn)/Ea,di=An-Aa,uo=zn-Xr,pe=$n-Aa,y=xi-Xr;return di*di+uo*uo>pe*pe+y*y&&(An=$n,zn=xi),[[An-Jt,zn-mr],[An*qe/Ma,zn*qe/Ma]]}function oc(){return!0}function du(de){var Ee=no,qe=Di,tt=oc,at=Ql,ct=at.key,Nt=.7;function St(Jt){var mr=[],gr=[],Hr=-1,Vr=Jt.length,ca,Aa=ar(Ee),Xr=ar(qe);function oa(){mr.push("M",at(de(gr),Nt))}for(;++Hr1?de.join("L"):de+"Z"}function Eu(de){return de.join("L")+"Z"}function bf(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1&&at.push("H",tt[0]),at.join("")}function lh(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1){St=Ee[1],ct=de[Jt],Jt++,tt+="C"+(at[0]+Nt[0])+","+(at[1]+Nt[1])+","+(ct[0]-St[0])+","+(ct[1]-St[1])+","+ct[0]+","+ct[1];for(var mr=2;mr9&&(ct=qe*3/Math.sqrt(ct),Nt[St]=ct*tt,Nt[St+1]=ct*at));for(St=-1;++St<=Jt;)ct=(de[Math.min(Jt,St+1)][0]-de[Math.max(0,St-1)][0])/(6*(1+Nt[St]*Nt[St])),Ee.push([ct||0,Nt[St]*ct||0]);return Ee}function Pr(de){return de.length<3?Ql(de):de[0]+wf(de,Wt(de))}p.svg.line.radial=function(){var de=du(Br);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function Br(de){for(var Ee,qe=-1,tt=de.length,at,ct;++qeNe)+",1 "+Hr}function mr(gr,Hr,Vr,ca){return"Q 0,0 "+ca}return ct.radius=function(gr){return arguments.length?(qe=ar(gr),ct):qe},ct.source=function(gr){return arguments.length?(de=ar(gr),ct):de},ct.target=function(gr){return arguments.length?(Ee=ar(gr),ct):Ee},ct.startAngle=function(gr){return arguments.length?(tt=ar(gr),ct):tt},ct.endAngle=function(gr){return arguments.length?(at=ar(gr),ct):at},ct};function la(de){return de.radius}p.svg.diagonal=function(){var de=jr,Ee=Jr,qe=xa;function tt(at,ct){var Nt=de.call(this,at,ct),St=Ee.call(this,at,ct),Jt=(Nt.y+St.y)/2,mr=[Nt,{x:Nt.x,y:Jt},{x:St.x,y:Jt},St];return mr=mr.map(qe),"M"+mr[0]+"C"+mr[1]+" "+mr[2]+" "+mr[3]}return tt.source=function(at){return arguments.length?(de=ar(at),tt):de},tt.target=function(at){return arguments.length?(Ee=ar(at),tt):Ee},tt.projection=function(at){return arguments.length?(qe=at,tt):qe},tt};function xa(de){return[de.x,de.y]}p.svg.diagonal.radial=function(){var de=p.svg.diagonal(),Ee=xa,qe=de.projection;return de.projection=function(tt){return arguments.length?qe(Ba(Ee=tt)):Ee},de};function Ba(de){return function(){var Ee=de.apply(this,arguments),qe=Ee[0],tt=Ee[1]-Je;return[qe*Math.cos(tt),qe*Math.sin(tt)]}}p.svg.symbol=function(){var de=Tn,Ee=an;function qe(tt,at){return(Si.get(de.call(this,tt,at))||ii)(Ee.call(this,tt,at))}return qe.type=function(tt){return arguments.length?(de=ar(tt),qe):de},qe.size=function(tt){return arguments.length?(Ee=ar(tt),qe):Ee},qe};function an(){return 64}function Tn(){return"circle"}function ii(de){var Ee=Math.sqrt(de/Ne);return"M0,"+Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+-Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+Ee+"Z"}var Si=p.map({circle:ii,cross:function(de){var Ee=Math.sqrt(de/5)/2;return"M"+-3*Ee+","+-Ee+"H"+-Ee+"V"+-3*Ee+"H"+Ee+"V"+-Ee+"H"+3*Ee+"V"+Ee+"H"+Ee+"V"+3*Ee+"H"+-Ee+"V"+Ee+"H"+-3*Ee+"Z"},diamond:function(de){var Ee=Math.sqrt(de/(2*Ji)),qe=Ee*Ji;return"M0,"+-Ee+"L"+qe+",0 0,"+Ee+" "+-qe+",0Z"},square:function(de){var Ee=Math.sqrt(de)/2;return"M"+-Ee+","+-Ee+"L"+Ee+","+-Ee+" "+Ee+","+Ee+" "+-Ee+","+Ee+"Z"},"triangle-down":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+qe+"L"+Ee+","+-qe+" "+-Ee+","+-qe+"Z"},"triangle-up":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+-qe+"L"+Ee+","+qe+" "+-Ee+","+qe+"Z"}});p.svg.symbolTypes=Si.keys();var oi=Math.sqrt(3),Ji=Math.tan(30*et);q.transition=function(de){for(var Ee=ol||++ys,qe=hi(de),tt=[],at,ct,Nt=jl||{time:Date.now(),ease:pc,delay:0,duration:250},St=-1,Jt=this.length;++St0;)Hr[--Ea].call(de,fa);if(oa>=1)return Nt.event&&Nt.event.end.call(de,de.__data__,Ee),--ct.count?delete ct[tt]:delete de[qe],1}Nt||(St=at.time,Jt=ai(Vr,0,St),Nt=ct[tt]={tween:new M,time:St,timer:Jt,delay:at.delay,duration:at.duration,ease:at.ease,index:Ee},at=null,++ct.count)}p.svg.axis=function(){var de=p.scale.linear(),Ee=sl,qe=6,tt=6,at=3,ct=[10],Nt=null,St;function Jt(mr){mr.each(function(){var gr=p.select(this),Hr=this.__chart__||de,Vr=this.__chart__=de.copy(),ca=Nt??(Vr.ticks?Vr.ticks.apply(Vr,ct):Vr.domain()),Aa=St??(Vr.tickFormat?Vr.tickFormat.apply(Vr,ct):D),Xr=gr.selectAll(".tick").data(ca,Vr),oa=Xr.enter().insert("g",".domain").attr("class","tick").style("opacity",ht),fa=p.transition(Xr.exit()).style("opacity",ht).remove(),Ea=p.transition(Xr.order()).style("opacity",1),Ma=Math.max(qe,0)+at,sa,hn=Za(Vr),An=gr.selectAll(".domain").data([0]),zn=(An.enter().append("path").attr("class","domain"),p.transition(An));oa.append("line"),oa.append("text");var $n=oa.select("line"),xi=Ea.select("line"),di=Xr.select("text").text(Aa),uo=oa.select("text"),pe=Ea.select("text"),y=Ee==="top"||Ee==="left"?-1:1,N,ie,fe,be;if(Ee==="bottom"||Ee==="top"?(sa=tu,N="x",fe="y",ie="x2",be="y2",di.attr("dy",y<0?"0em":".71em").style("text-anchor","middle"),zn.attr("d","M"+hn[0]+","+y*tt+"V0H"+hn[1]+"V"+y*tt)):(sa=Ps,N="y",fe="x",ie="y2",be="x2",di.attr("dy",".32em").style("text-anchor",y<0?"end":"start"),zn.attr("d","M"+y*tt+","+hn[0]+"H0V"+hn[1]+"H"+y*tt)),$n.attr(be,y*qe),uo.attr(fe,y*Ma),xi.attr(ie,0).attr(be,y*qe),pe.attr(N,0).attr(fe,y*Ma),Vr.rangeBand){var Re=Vr,je=Re.rangeBand()/2;Hr=Vr=function(Ze){return Re(Ze)+je}}else Hr.rangeBand?Hr=Vr:fa.call(sa,Vr,Hr);oa.call(sa,Hr,Vr),Ea.call(sa,Vr,Vr)})}return Jt.scale=function(mr){return arguments.length?(de=mr,Jt):de},Jt.orient=function(mr){return arguments.length?(Ee=mr in sc?mr+"":sl,Jt):Ee},Jt.ticks=function(){return arguments.length?(ct=E(arguments),Jt):ct},Jt.tickValues=function(mr){return arguments.length?(Nt=mr,Jt):Nt},Jt.tickFormat=function(mr){return arguments.length?(St=mr,Jt):St},Jt.tickSize=function(mr){var gr=arguments.length;return gr?(qe=+mr,tt=+arguments[gr-1],Jt):qe},Jt.innerTickSize=function(mr){return arguments.length?(qe=+mr,Jt):qe},Jt.outerTickSize=function(mr){return arguments.length?(tt=+mr,Jt):tt},Jt.tickPadding=function(mr){return arguments.length?(at=+mr,Jt):at},Jt.tickSubdivide=function(){return arguments.length&&Jt},Jt};var sl="bottom",sc={top:1,right:1,bottom:1,left:1};function tu(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate("+(isFinite(at)?at:qe(tt))+",0)"})}function Ps(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate(0,"+(isFinite(at)?at:qe(tt))+")"})}p.svg.brush=function(){var de=ne(gr,"brushstart","brush","brushend"),Ee=null,qe=null,tt=[0,0],at=[0,0],ct,Nt,St=!0,Jt=!0,mr=pu[0];function gr(Xr){Xr.each(function(){var oa=p.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Aa).on("touchstart.brush",Aa),fa=oa.selectAll(".background").data([0]);fa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),oa.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ea=oa.selectAll(".resize").data(mr,D);Ea.exit().remove(),Ea.enter().append("g").attr("class",function(An){return"resize "+An}).style("cursor",function(An){return gc[An]}).append("rect").attr("x",function(An){return/[ew]$/.test(An)?-3:null}).attr("y",function(An){return/^[ns]/.test(An)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ea.style("display",gr.empty()?"none":null);var Ma=p.transition(oa),sa=p.transition(fa),hn;Ee&&(hn=Za(Ee),sa.attr("x",hn[0]).attr("width",hn[1]-hn[0]),Vr(Ma)),qe&&(hn=Za(qe),sa.attr("y",hn[0]).attr("height",hn[1]-hn[0]),ca(Ma)),Hr(Ma)})}gr.event=function(Xr){Xr.each(function(){var oa=de.of(this,arguments),fa={x:tt,y:at,i:ct,j:Nt},Ea=this.__chart__||fa;this.__chart__=fa,ol?p.select(this).transition().each("start.brush",function(){ct=Ea.i,Nt=Ea.j,tt=Ea.x,at=Ea.y,oa({type:"brushstart"})}).tween("brush:brush",function(){var Ma=zu(tt,fa.x),sa=zu(at,fa.y);return ct=Nt=null,function(hn){tt=fa.x=Ma(hn),at=fa.y=sa(hn),oa({type:"brush",mode:"resize"})}}).each("end.brush",function(){ct=fa.i,Nt=fa.j,oa({type:"brush",mode:"resize"}),oa({type:"brushend"})}):(oa({type:"brushstart"}),oa({type:"brush",mode:"resize"}),oa({type:"brushend"}))})};function Hr(Xr){Xr.selectAll(".resize").attr("transform",function(oa){return"translate("+tt[+/e$/.test(oa)]+","+at[+/^s/.test(oa)]+")"})}function Vr(Xr){Xr.select(".extent").attr("x",tt[0]),Xr.selectAll(".extent,.n>rect,.s>rect").attr("width",tt[1]-tt[0])}function ca(Xr){Xr.select(".extent").attr("y",at[0]),Xr.selectAll(".extent,.e>rect,.w>rect").attr("height",at[1]-at[0])}function Aa(){var Xr=this,oa=p.select(p.event.target),fa=de.of(Xr,arguments),Ea=p.select(Xr),Ma=oa.datum(),sa=!/^(n|s)$/.test(Ma)&&Ee,hn=!/^(e|w)$/.test(Ma)&&qe,An=oa.classed("extent"),zn=Xt(Xr),$n,xi=p.mouse(Xr),di,uo=p.select(e(Xr)).on("keydown.brush",N).on("keyup.brush",ie);if(p.event.changedTouches?uo.on("touchmove.brush",fe).on("touchend.brush",Re):uo.on("mousemove.brush",fe).on("mouseup.brush",Re),Ea.interrupt().selectAll("*").interrupt(),An)xi[0]=tt[0]-xi[0],xi[1]=at[0]-xi[1];else if(Ma){var pe=+/w$/.test(Ma),y=+/^n/.test(Ma);di=[tt[1-pe]-xi[0],at[1-y]-xi[1]],xi[0]=tt[pe],xi[1]=at[y]}else p.event.altKey&&($n=xi.slice());Ea.style("pointer-events","none").selectAll(".resize").style("display",null),p.select("body").style("cursor",oa.style("cursor")),fa({type:"brushstart"}),fe();function N(){p.event.keyCode==32&&(An||($n=null,xi[0]-=tt[1],xi[1]-=at[1],An=2),Q())}function ie(){p.event.keyCode==32&&An==2&&(xi[0]+=tt[1],xi[1]+=at[1],An=0,Q())}function fe(){var je=p.mouse(Xr),Ze=!1;di&&(je[0]+=di[0],je[1]+=di[1]),An||(p.event.altKey?($n||($n=[(tt[0]+tt[1])/2,(at[0]+at[1])/2]),xi[0]=tt[+(je[0]<$n[0])],xi[1]=at[+(je[1]<$n[1])]):$n=null),sa&&be(je,Ee,0)&&(Vr(Ea),Ze=!0),hn&&be(je,qe,1)&&(ca(Ea),Ze=!0),Ze&&(Hr(Ea),fa({type:"brush",mode:An?"move":"resize"}))}function be(je,Ze,ut){var ft=Za(Ze),Dt=ft[0],Gt=ft[1],Kt=xi[ut],st=ut?at:tt,It=st[1]-st[0],Ut,ir;if(An&&(Dt-=Kt,Gt-=It+Kt),Ut=(ut?Jt:St)?Math.max(Dt,Math.min(Gt,je[ut])):je[ut],An?ir=(Ut+=Kt)+It:($n&&(Kt=Math.max(Dt,Math.min(Gt,2*$n[ut]-Ut))),Kt0))return At;do At.push($t=new Date(+yt)),Ae(yt,Tt),le(yt);while($t=gt)for(;le(gt),!yt(gt);)gt.setTime(gt-1)},function(gt,Tt){if(gt>=gt)if(Tt<0)for(;++Tt<=0;)for(;Ae(gt,-1),!yt(gt););else for(;--Tt>=0;)for(;Ae(gt,1),!yt(gt););})},Be&&(Ye.count=function(yt,gt){return b.setTime(+yt),E.setTime(+gt),le(b),le(E),Math.floor(Be(b,E))},Ye.every=function(yt){return yt=Math.floor(yt),!isFinite(yt)||!(yt>0)?null:yt>1?Ye.filter(Xe?function(gt){return Xe(gt)%yt===0}:function(gt){return Ye.count(0,gt)%yt===0}):Ye}),Ye}var l=k(function(){},function(le,Ae){le.setTime(+le+Ae)},function(le,Ae){return Ae-le});l.every=function(le){return le=Math.floor(le),!isFinite(le)||!(le>0)?null:le>1?k(function(Ae){Ae.setTime(Math.floor(Ae/le)*le)},function(Ae,Be){Ae.setTime(+Ae+Be*le)},function(Ae,Be){return(Be-Ae)/le}):l};var e=l.range,t=1e3,n=6e4,r=36e5,a=864e5,o=6048e5,s=k(function(le){le.setTime(le-le.getMilliseconds())},function(le,Ae){le.setTime(+le+Ae*t)},function(le,Ae){return(Ae-le)/t},function(le){return le.getUTCSeconds()}),c=s.range,m=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getMinutes()}),h=m.range,v=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t-le.getMinutes()*n)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getHours()}),g=v.range,i=k(function(le){le.setHours(0,0,0,0)},function(le,Ae){le.setDate(le.getDate()+Ae)},function(le,Ae){return(Ae-le-(Ae.getTimezoneOffset()-le.getTimezoneOffset())*n)/a},function(le){return le.getDate()-1}),w=i.range;function S(le){return k(function(Ae){Ae.setDate(Ae.getDate()-(Ae.getDay()+7-le)%7),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setDate(Ae.getDate()+Be*7)},function(Ae,Be){return(Be-Ae-(Be.getTimezoneOffset()-Ae.getTimezoneOffset())*n)/o})}var M=S(0),C=S(1),_=S(2),T=S(3),f=S(4),u=S(5),A=S(6),x=M.range,z=C.range,I=_.range,O=T.range,D=f.range,B=u.range,F=A.range,P=k(function(le){le.setDate(1),le.setHours(0,0,0,0)},function(le,Ae){le.setMonth(le.getMonth()+Ae)},function(le,Ae){return Ae.getMonth()-le.getMonth()+(Ae.getFullYear()-le.getFullYear())*12},function(le){return le.getMonth()}),j=P.range,U=k(function(le){le.setMonth(0,1),le.setHours(0,0,0,0)},function(le,Ae){le.setFullYear(le.getFullYear()+Ae)},function(le,Ae){return Ae.getFullYear()-le.getFullYear()},function(le){return le.getFullYear()});U.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setFullYear(Math.floor(Ae.getFullYear()/le)*le),Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setFullYear(Ae.getFullYear()+Be*le)})};var $=U.range,Q=k(function(le){le.setUTCSeconds(0,0)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getUTCMinutes()}),re=Q.range,ne=k(function(le){le.setUTCMinutes(0,0,0)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getUTCHours()}),se=ne.range,G=k(function(le){le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCDate(le.getUTCDate()+Ae)},function(le,Ae){return(Ae-le)/a},function(le){return le.getUTCDate()-1}),X=G.range;function K(le){return k(function(Ae){Ae.setUTCDate(Ae.getUTCDate()-(Ae.getUTCDay()+7-le)%7),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCDate(Ae.getUTCDate()+Be*7)},function(Ae,Be){return(Be-Ae)/o})}var H=K(0),Y=K(1),q=K(2),Z=K(3),ee=K(4),ae=K(5),he=K(6),xe=H.range,we=Y.range,Me=q.range,Se=Z.range,Ie=ee.range,Ve=ae.range,Ge=he.range,ke=k(function(le){le.setUTCDate(1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCMonth(le.getUTCMonth()+Ae)},function(le,Ae){return Ae.getUTCMonth()-le.getUTCMonth()+(Ae.getUTCFullYear()-le.getUTCFullYear())*12},function(le){return le.getUTCMonth()}),_e=ke.range,ce=k(function(le){le.setUTCMonth(0,1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCFullYear(le.getUTCFullYear()+Ae)},function(le,Ae){return Ae.getUTCFullYear()-le.getUTCFullYear()},function(le){return le.getUTCFullYear()});ce.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setUTCFullYear(Math.floor(Ae.getUTCFullYear()/le)*le),Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCFullYear(Ae.getUTCFullYear()+Be*le)})};var ve=ce.range;p.timeDay=i,p.timeDays=w,p.timeFriday=u,p.timeFridays=B,p.timeHour=v,p.timeHours=g,p.timeInterval=k,p.timeMillisecond=l,p.timeMilliseconds=e,p.timeMinute=m,p.timeMinutes=h,p.timeMonday=C,p.timeMondays=z,p.timeMonth=P,p.timeMonths=j,p.timeSaturday=A,p.timeSaturdays=F,p.timeSecond=s,p.timeSeconds=c,p.timeSunday=M,p.timeSundays=x,p.timeThursday=f,p.timeThursdays=D,p.timeTuesday=_,p.timeTuesdays=I,p.timeWednesday=T,p.timeWednesdays=O,p.timeWeek=M,p.timeWeeks=x,p.timeYear=U,p.timeYears=$,p.utcDay=G,p.utcDays=X,p.utcFriday=ae,p.utcFridays=Ve,p.utcHour=ne,p.utcHours=se,p.utcMillisecond=l,p.utcMilliseconds=e,p.utcMinute=Q,p.utcMinutes=re,p.utcMonday=Y,p.utcMondays=we,p.utcMonth=ke,p.utcMonths=_e,p.utcSaturday=he,p.utcSaturdays=Ge,p.utcSecond=s,p.utcSeconds=c,p.utcSunday=H,p.utcSundays=xe,p.utcThursday=ee,p.utcThursdays=Ie,p.utcTuesday=q,p.utcTuesdays=Me,p.utcWednesday=Z,p.utcWednesdays=Se,p.utcWeek=H,p.utcWeeks=xe,p.utcYear=ce,p.utcYears=ve,Object.defineProperty(p,"__esModule",{value:!0})})}}),jm=ze({"node_modules/d3-time-format/dist/d3-time-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kw()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(Je){if(0<=Je.y&&Je.y<100){var et=new Date(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L);return et.setFullYear(Je.y),et}return new Date(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L)}function k(Je){if(0<=Je.y&&Je.y<100){var et=new Date(Date.UTC(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L));return et.setUTCFullYear(Je.y),et}return new Date(Date.UTC(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L))}function l(Je,et,Mt){return{y:Je,m:et,d:Mt,H:0,M:0,S:0,L:0}}function e(Je){var et=Je.dateTime,Mt=Je.date,pt=Je.time,Pt=Je.periods,Ct=Je.days,qt=Je.shortDays,Vt=Je.months,Ht=Je.shortMonths,Sr=c(Pt),Kr=m(Pt),Yt=c(Ct),Rt=m(Ct),nr=c(qt),ur=m(qt),cr=c(Vt),Rr=m(Vt),Qr=c(Ht),Zr=m(Ht),ha={a:Yi,A:Ja,b:Oa,B:lt,c:null,d:P,e:P,f:re,g:ae,G:xe,H:j,I:U,j:$,L:Q,m:ne,M:se,p:rt,q:fr,Q:Xt,s:or,S:G,u:X,U:K,V:Y,w:q,W:Z,x:null,X:null,y:ee,Y:he,Z:we,"%":_r},Pa={a:lr,A:Tr,b:Ir,B:Dr,c:null,d:Me,e:Me,f:ke,g:Tt,G:$t,H:Se,I:Ie,j:Ve,L:Ge,m:_e,M:ce,p:ot,q:kt,Q:Xt,s:or,S:ve,u:le,U:Ae,V:Xe,w:Ye,W:yt,x:null,X:null,y:gt,Y:At,Z:rr,"%":_r},La={a:yn,A:Un,b:li,B:Yn,c:on,d:f,e:f,f:O,g:M,G:S,H:A,I:A,j:u,L:I,m:T,M:x,p:Nn,q:_,Q:B,s:F,S:z,u:v,U:g,V:i,w:h,W:w,x:en,X:vi,y:M,Y:S,Z:C,"%":D};ha.x=un(Mt,ha),ha.X=un(pt,ha),ha.c=un(et,ha),Pa.x=un(Mt,Pa),Pa.X=un(pt,Pa),Pa.c=un(et,Pa);function un(jt,ar){return function(Er){var xr=[],zr=-1,Lr=0,aa=jt.length,Sa,wa,pn;for(Er instanceof Date||(Er=new Date(+Er));++zr53)return null;"w"in xr||(xr.w=1),"Z"in xr?(Lr=k(l(xr.y,0,1)),aa=Lr.getUTCDay(),Lr=aa>4||aa===0?b.utcMonday.ceil(Lr):b.utcMonday(Lr),Lr=b.utcDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getUTCFullYear(),xr.m=Lr.getUTCMonth(),xr.d=Lr.getUTCDate()+(xr.w+6)%7):(Lr=E(l(xr.y,0,1)),aa=Lr.getDay(),Lr=aa>4||aa===0?b.timeMonday.ceil(Lr):b.timeMonday(Lr),Lr=b.timeDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getFullYear(),xr.m=Lr.getMonth(),xr.d=Lr.getDate()+(xr.w+6)%7)}else("W"in xr||"U"in xr)&&("w"in xr||(xr.w="u"in xr?xr.u%7:"W"in xr?1:0),aa="Z"in xr?k(l(xr.y,0,1)).getUTCDay():E(l(xr.y,0,1)).getDay(),xr.m=0,xr.d="W"in xr?(xr.w+6)%7+xr.W*7-(aa+5)%7:xr.w+xr.U*7-(aa+6)%7);return"Z"in xr?(xr.H+=xr.Z/100|0,xr.M+=xr.Z%100,k(xr)):E(xr)}}function ja(jt,ar,Er,xr){for(var zr=0,Lr=ar.length,aa=Er.length,Sa,wa;zr=aa)return-1;if(Sa=ar.charCodeAt(zr++),Sa===37){if(Sa=ar.charAt(zr++),wa=La[Sa in t?ar.charAt(zr++):Sa],!wa||(xr=wa(jt,Er,xr))<0)return-1}else if(Sa!=Er.charCodeAt(xr++))return-1}return xr}function Nn(jt,ar,Er){var xr=Sr.exec(ar.slice(Er));return xr?(jt.p=Kr[xr[0].toLowerCase()],Er+xr[0].length):-1}function yn(jt,ar,Er){var xr=nr.exec(ar.slice(Er));return xr?(jt.w=ur[xr[0].toLowerCase()],Er+xr[0].length):-1}function Un(jt,ar,Er){var xr=Yt.exec(ar.slice(Er));return xr?(jt.w=Rt[xr[0].toLowerCase()],Er+xr[0].length):-1}function li(jt,ar,Er){var xr=Qr.exec(ar.slice(Er));return xr?(jt.m=Zr[xr[0].toLowerCase()],Er+xr[0].length):-1}function Yn(jt,ar,Er){var xr=cr.exec(ar.slice(Er));return xr?(jt.m=Rr[xr[0].toLowerCase()],Er+xr[0].length):-1}function on(jt,ar,Er){return ja(jt,et,ar,Er)}function en(jt,ar,Er){return ja(jt,Mt,ar,Er)}function vi(jt,ar,Er){return ja(jt,pt,ar,Er)}function Yi(jt){return qt[jt.getDay()]}function Ja(jt){return Ct[jt.getDay()]}function Oa(jt){return Ht[jt.getMonth()]}function lt(jt){return Vt[jt.getMonth()]}function rt(jt){return Pt[+(jt.getHours()>=12)]}function fr(jt){return 1+~~(jt.getMonth()/3)}function lr(jt){return qt[jt.getUTCDay()]}function Tr(jt){return Ct[jt.getUTCDay()]}function Ir(jt){return Ht[jt.getUTCMonth()]}function Dr(jt){return Vt[jt.getUTCMonth()]}function ot(jt){return Pt[+(jt.getUTCHours()>=12)]}function kt(jt){return 1+~~(jt.getUTCMonth()/3)}return{format:function(jt){var ar=un(jt+="",ha);return ar.toString=function(){return jt},ar},parse:function(jt){var ar=Xa(jt+="",!1);return ar.toString=function(){return jt},ar},utcFormat:function(jt){var ar=un(jt+="",Pa);return ar.toString=function(){return jt},ar},utcParse:function(jt){var ar=Xa(jt+="",!0);return ar.toString=function(){return jt},ar}}}var t={"-":"",_:" ",0:"0"},n=/^\s*\d+/,r=/^%/,a=/[\\^$*+?|[\]().{}]/g;function o(Je,et,Mt){var pt=Je<0?"-":"",Pt=(pt?-Je:Je)+"",Ct=Pt.length;return pt+(Ct68?1900:2e3),Mt+pt[0].length):-1}function C(Je,et,Mt){var pt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(Mt,Mt+6));return pt?(Je.Z=pt[1]?0:-(pt[2]+(pt[3]||"00")),Mt+pt[0].length):-1}function _(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+1));return pt?(Je.q=pt[0]*3-3,Mt+pt[0].length):-1}function T(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.m=pt[0]-1,Mt+pt[0].length):-1}function f(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.d=+pt[0],Mt+pt[0].length):-1}function u(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.m=0,Je.d=+pt[0],Mt+pt[0].length):-1}function A(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.H=+pt[0],Mt+pt[0].length):-1}function x(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.M=+pt[0],Mt+pt[0].length):-1}function z(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.S=+pt[0],Mt+pt[0].length):-1}function I(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.L=+pt[0],Mt+pt[0].length):-1}function O(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+6));return pt?(Je.L=Math.floor(pt[0]/1e3),Mt+pt[0].length):-1}function D(Je,et,Mt){var pt=r.exec(et.slice(Mt,Mt+1));return pt?Mt+pt[0].length:-1}function B(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.Q=+pt[0],Mt+pt[0].length):-1}function F(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.s=+pt[0],Mt+pt[0].length):-1}function P(Je,et){return o(Je.getDate(),et,2)}function j(Je,et){return o(Je.getHours(),et,2)}function U(Je,et){return o(Je.getHours()%12||12,et,2)}function $(Je,et){return o(1+b.timeDay.count(b.timeYear(Je),Je),et,3)}function Q(Je,et){return o(Je.getMilliseconds(),et,3)}function re(Je,et){return Q(Je,et)+"000"}function ne(Je,et){return o(Je.getMonth()+1,et,2)}function se(Je,et){return o(Je.getMinutes(),et,2)}function G(Je,et){return o(Je.getSeconds(),et,2)}function X(Je){var et=Je.getDay();return et===0?7:et}function K(Je,et){return o(b.timeSunday.count(b.timeYear(Je)-1,Je),et,2)}function H(Je){var et=Je.getDay();return et>=4||et===0?b.timeThursday(Je):b.timeThursday.ceil(Je)}function Y(Je,et){return Je=H(Je),o(b.timeThursday.count(b.timeYear(Je),Je)+(b.timeYear(Je).getDay()===4),et,2)}function q(Je){return Je.getDay()}function Z(Je,et){return o(b.timeMonday.count(b.timeYear(Je)-1,Je),et,2)}function ee(Je,et){return o(Je.getFullYear()%100,et,2)}function ae(Je,et){return Je=H(Je),o(Je.getFullYear()%100,et,2)}function he(Je,et){return o(Je.getFullYear()%1e4,et,4)}function xe(Je,et){var Mt=Je.getDay();return Je=Mt>=4||Mt===0?b.timeThursday(Je):b.timeThursday.ceil(Je),o(Je.getFullYear()%1e4,et,4)}function we(Je){var et=Je.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+o(et/60|0,"0",2)+o(et%60,"0",2)}function Me(Je,et){return o(Je.getUTCDate(),et,2)}function Se(Je,et){return o(Je.getUTCHours(),et,2)}function Ie(Je,et){return o(Je.getUTCHours()%12||12,et,2)}function Ve(Je,et){return o(1+b.utcDay.count(b.utcYear(Je),Je),et,3)}function Ge(Je,et){return o(Je.getUTCMilliseconds(),et,3)}function ke(Je,et){return Ge(Je,et)+"000"}function _e(Je,et){return o(Je.getUTCMonth()+1,et,2)}function ce(Je,et){return o(Je.getUTCMinutes(),et,2)}function ve(Je,et){return o(Je.getUTCSeconds(),et,2)}function le(Je){var et=Je.getUTCDay();return et===0?7:et}function Ae(Je,et){return o(b.utcSunday.count(b.utcYear(Je)-1,Je),et,2)}function Be(Je){var et=Je.getUTCDay();return et>=4||et===0?b.utcThursday(Je):b.utcThursday.ceil(Je)}function Xe(Je,et){return Je=Be(Je),o(b.utcThursday.count(b.utcYear(Je),Je)+(b.utcYear(Je).getUTCDay()===4),et,2)}function Ye(Je){return Je.getUTCDay()}function yt(Je,et){return o(b.utcMonday.count(b.utcYear(Je)-1,Je),et,2)}function gt(Je,et){return o(Je.getUTCFullYear()%100,et,2)}function Tt(Je,et){return Je=Be(Je),o(Je.getUTCFullYear()%100,et,2)}function At(Je,et){return o(Je.getUTCFullYear()%1e4,et,4)}function $t(Je,et){var Mt=Je.getUTCDay();return Je=Mt>=4||Mt===0?b.utcThursday(Je):b.utcThursday.ceil(Je),o(Je.getUTCFullYear()%1e4,et,4)}function rr(){return"+0000"}function _r(){return"%"}function Xt(Je){return+Je}function or(Je){return Math.floor(+Je/1e3)}var Ot;vt({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 vt(Je){return Ot=e(Je),p.timeFormat=Ot.format,p.timeParse=Ot.parse,p.utcFormat=Ot.utcFormat,p.utcParse=Ot.utcParse,Ot}var ht="%Y-%m-%dT%H:%M:%S.%LZ";function De(Je){return Je.toISOString()}var Ne=Date.prototype.toISOString?De:p.utcFormat(ht);function We(Je){var et=new Date(Je);return isNaN(et)?null:et}var Ke=+new Date("2000-01-01T00:00:00.000Z")?We:p.utcParse(ht);p.isoFormat=Ne,p.isoParse=Ke,p.timeFormatDefaultLocale=vt,p.timeFormatLocale=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),Cw=ze({"node_modules/d3-format/dist/d3-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function E(T,f){if((u=(T=f?T.toExponential(f-1):T.toExponential()).indexOf("e"))<0)return null;var u,A=T.slice(0,u);return[A.length>1?A[0]+A.slice(2):A,+T.slice(u+1)]}function k(T){return T=E(Math.abs(T)),T?T[1]:NaN}function l(T,f){return function(u,A){for(var x=u.length,z=[],I=0,O=T[0],D=0;x>0&&O>0&&(D+O+1>A&&(O=Math.max(1,A-D)),z.push(u.substring(x-=O,x+O)),!((D+=O+1)>A));)O=T[I=(I+1)%T.length];return z.reverse().join(f)}}function e(T){return function(f){return f.replace(/[0-9]/g,function(u){return T[+u]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(T){if(!(f=t.exec(T)))throw new Error("invalid format: "+T);var f;return new r({fill:f[1],align:f[2],sign:f[3],symbol:f[4],zero:f[5],width:f[6],comma:f[7],precision:f[8]&&f[8].slice(1),trim:f[9],type:f[10]})}n.prototype=r.prototype;function r(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}r.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 a(T){e:for(var f=T.length,u=1,A=-1,x;u0&&(A=0);break}return A>0?T.slice(0,A)+T.slice(x+1):T}var o;function s(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1],z=x-(o=Math.max(-8,Math.min(8,Math.floor(x/3)))*3)+1,I=A.length;return z===I?A:z>I?A+new Array(z-I+1).join("0"):z>0?A.slice(0,z)+"."+A.slice(z):"0."+new Array(1-z).join("0")+E(T,Math.max(0,f+z-1))[0]}function c(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1];return x<0?"0."+new Array(-x).join("0")+A:A.length>x+1?A.slice(0,x+1)+"."+A.slice(x+1):A+new Array(x-A.length+2).join("0")}var m={"%":function(T,f){return(T*100).toFixed(f)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:b,e:function(T,f){return T.toExponential(f)},f:function(T,f){return T.toFixed(f)},g:function(T,f){return T.toPrecision(f)},o:function(T){return Math.round(T).toString(8)},p:function(T,f){return c(T*100,f)},r:c,s,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function h(T){return T}var v=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function i(T){var f=T.grouping===void 0||T.thousands===void 0?h:l(v.call(T.grouping,Number),T.thousands+""),u=T.currency===void 0?"":T.currency[0]+"",A=T.currency===void 0?"":T.currency[1]+"",x=T.decimal===void 0?".":T.decimal+"",z=T.numerals===void 0?h:e(v.call(T.numerals,String)),I=T.percent===void 0?"%":T.percent+"",O=T.minus===void 0?"-":T.minus+"",D=T.nan===void 0?"NaN":T.nan+"";function B(P){P=n(P);var j=P.fill,U=P.align,$=P.sign,Q=P.symbol,re=P.zero,ne=P.width,se=P.comma,G=P.precision,X=P.trim,K=P.type;K==="n"?(se=!0,K="g"):m[K]||(G===void 0&&(G=12),X=!0,K="g"),(re||j==="0"&&U==="=")&&(re=!0,j="0",U="=");var H=Q==="$"?u:Q==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",Y=Q==="$"?A:/[%p]/.test(K)?I:"",q=m[K],Z=/[defgprs%]/.test(K);G=G===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G));function ee(ae){var he=H,xe=Y,we,Me,Se;if(K==="c")xe=q(ae)+xe,ae="";else{ae=+ae;var Ie=ae<0||1/ae<0;if(ae=isNaN(ae)?D:q(Math.abs(ae),G),X&&(ae=a(ae)),Ie&&+ae==0&&$!=="+"&&(Ie=!1),he=(Ie?$==="("?$:O:$==="-"||$==="("?"":$)+he,xe=(K==="s"?g[8+o/3]:"")+xe+(Ie&&$==="("?")":""),Z){for(we=-1,Me=ae.length;++weSe||Se>57){xe=(Se===46?x+ae.slice(we+1):ae.slice(we))+xe,ae=ae.slice(0,we);break}}}se&&!re&&(ae=f(ae,1/0));var Ve=he.length+ae.length+xe.length,Ge=Ve>1)+he+ae+xe+Ge.slice(Ve);break;default:ae=Ge+he+ae+xe;break}return z(ae)}return ee.toString=function(){return P+""},ee}function F(P,j){var U=B((P=n(P),P.type="f",P)),$=Math.max(-8,Math.min(8,Math.floor(k(j)/3)))*3,Q=Math.pow(10,-$),re=g[8+$/3];return function(ne){return U(Q*ne)+re}}return{format:B,formatPrefix:F}}var w;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(T){return w=i(T),p.format=w.format,p.formatPrefix=w.formatPrefix,w}function M(T){return Math.max(0,-k(Math.abs(T)))}function C(T,f){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k(f)/3)))*3-k(Math.abs(T)))}function _(T,f){return T=Math.abs(T),f=Math.abs(f)-T,Math.max(0,k(f)-k(T))+1}p.FormatSpecifier=r,p.formatDefaultLocale=S,p.formatLocale=i,p.formatSpecifier=n,p.precisionFixed=M,p.precisionPrefix=C,p.precisionRound=_,Object.defineProperty(p,"__esModule",{value:!0})})}}),FR=ze({"node_modules/is-string-blank/index.js"(J,V){"use strict";V.exports=function(p){for(var b=p.length,E,k=0;k13)&&E!==32&&E!==133&&E!==160&&E!==5760&&E!==6158&&(E<8192||E>8205)&&E!==8232&&E!==8233&&E!==8239&&E!==8287&&E!==8288&&E!==12288&&E!==65279)return!1;return!0}}}),ao=ze({"node_modules/fast-isnumeric/index.js"(J,V){"use strict";var p=FR();V.exports=function(b){var E=typeof b;if(E==="string"){var k=b;if(b=+b,b===0&&p(k))return!1}else if(E!=="number")return!1;return b-b<1}}}),No=ze({"src/constants/numerical.js"(J,V){"use strict";V.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}}}),Lw=ze({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p["base64-arraybuffer"]={}))})(J,function(p){"use strict";for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256),k=0;k>2],o+=b[(n[r]&3)<<4|n[r+1]>>4],o+=b[(n[r+1]&15)<<2|n[r+2]>>6],o+=b[n[r+2]&63];return a%3===2?o=o.substring(0,o.length-1)+"=":a%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e=function(t){var n=t.length*.75,r=t.length,a,o=0,s,c,m,h;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);var v=new ArrayBuffer(n),g=new Uint8Array(v);for(a=0;a>4,g[o++]=(c&15)<<4|m>>2,g[o++]=(m&3)<<6|h&63;return v};p.decode=e,p.encode=l,Object.defineProperty(p,"__esModule",{value:!0})})}}),tv=ze({"src/lib/is_plain_object.js"(J,V){"use strict";V.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),Ff=ze({"src/lib/array.js"(J){"use strict";var V=Lw().decode,p=tv(),b=Array.isArray,E=ArrayBuffer,k=DataView;function l(s){return E.isView(s)&&!(s instanceof k)}J.isTypedArray=l;function e(s){return b(s)||l(s)}J.isArrayOrTypedArray=e;function t(s){return!e(s[0])}J.isArray1D=t,J.ensureArray=function(s,c){return b(s)||(s=[]),s.length=c,s};var n={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};n.uint8c=n.u1c,n.uint8=n.u1,n.int8=n.i1,n.uint16=n.u2,n.int16=n.i2,n.uint32=n.u4,n.int32=n.i4,n.float32=n.f4,n.float64=n.f8;function r(s){return s.constructor===ArrayBuffer}J.isArrayBuffer=r,J.decodeTypedArraySpec=function(s){var c=[],m=a(s),h=m.dtype,v=n[h];if(!v)throw new Error('Error in dtype: "'+h+'"');var g=v.BYTES_PER_ELEMENT,i=m.bdata;r(i)||(i=V(i));var w=m.shape===void 0?[i.byteLength/g]:(""+m.shape).split(",");w.reverse();var S=w.length,M,C,_=+w[0],T=g*_,f=0;if(S===1)c=new v(i);else if(S===2)for(M=+w[1],C=0;C2)return v[M]=v[M]|l,w.set(S,null);if(i){for(c=M;c0)return Math.log(E)/Math.LN10;var l=Math.log(Math.min(k[0],k[1]))/Math.LN10;return p(l)||(l=Math.log(Math.max(k[0],k[1]))/Math.LN10-6),l}}}),OR=ze({"src/lib/relink_private.js"(J,V){"use strict";var p=Ff().isArrayOrTypedArray,b=tv();V.exports=function E(k,l){for(var e in l){var t=l[e],n=k[e];if(n!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in k)continue;k[e]=t}else if(p(t)&&p(n)&&b(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,n.length),a=0;aNR,modHalf:()=>jR});function NR(J,V){let p=J%V;return p<0?p+V:p}function jR(J,V){return Math.abs(J)>V/2?J-Math.round(J/V)*V:J}var Um=zi({"src/lib/mod.ts"(){"use strict"}}),Ki=ze({"src/lib/extend.js"(J){"use strict";var V=tv(),p=Array.isArray;function b(k,l){var e,t;for(e=0;e{for(var Qe in Ue)p(Le,Qe,{get:Ue[Qe],enumerable:!0})},e=(Le,Ue,Qe,_t)=>{if(Ue&&typeof Ue=="object"||typeof Ue=="function")for(let wt of E(Ue))!k.call(Le,wt)&&wt!==Qe&&p(Le,wt,{get:()=>Ue[wt],enumerable:!(_t=b(Ue,wt))||_t.enumerable});return Le},t=Le=>e(p({},"__esModule",{value:!0}),Le),n={};l(n,{a98:()=>So,average:()=>Tr,averageAngle:()=>rt,averageNumber:()=>fr,blend:()=>ll,blerp:()=>Ye,clampChroma:()=>dr,clampGamut:()=>ir,clampRgb:()=>Ut,colorsNamed:()=>s,convertA98ToXyz65:()=>Ot,convertCubehelixToRgb:()=>Nn,convertDlchToLab65:()=>oo,convertHsiToRgb:()=>ds,convertHslToRgb:()=>wo,convertHsvToRgb:()=>Ts,convertHwbToRgb:()=>yo,convertItpToXyz65:()=>ms,convertJabToJch:()=>Nu,convertJabToRgb:()=>Hc,convertJabToXyz65:()=>Gc,convertJchToJab:()=>al,convertLab65ToDlch:()=>qn,convertLab65ToRgb:()=>rn,convertLab65ToXyz65:()=>tn,convertLabToLch:()=>kt,convertLabToRgb:()=>vl,convertLabToXyz50:()=>tc,convertLchToLab:()=>ar,convertLchuvToLuv:()=>qu,convertLrgbToOklab:()=>tr,convertLrgbToRgb:()=>Pt,convertLuvToLchuv:()=>hu,convertLuvToXyz50:()=>Gf,convertOkhslToOklab:()=>_i,convertOkhsvToOklab:()=>Ln,convertOklabToLrgb:()=>ba,convertOklabToOkhsl:()=>yi,convertOklabToOkhsv:()=>kn,convertOklabToRgb:()=>Na,convertP3ToXyz65:()=>zo,convertProphotoToXyz50:()=>mc,convertRec2020ToXyz65:()=>Wu,convertRgbToCubehelix:()=>Xa,convertRgbToHsi:()=>jo,convertRgbToHsl:()=>pi,convertRgbToHsv:()=>Bo,convertRgbToHwb:()=>bs,convertRgbToJab:()=>$l,convertRgbToLab:()=>mf,convertRgbToLab65:()=>fn,convertRgbToLrgb:()=>Ke,convertRgbToOklab:()=>wr,convertRgbToXyb:()=>eu,convertRgbToXyz50:()=>rc,convertRgbToXyz65:()=>et,convertRgbToYiq:()=>Ba,convertXybToRgb:()=>mt,convertXyz50ToLab:()=>ac,convertXyz50ToLuv:()=>Vu,convertXyz50ToProphoto:()=>xl,convertXyz50ToRgb:()=>Tu,convertXyz50ToXyz65:()=>jr,convertXyz65ToA98:()=>De,convertXyz65ToItp:()=>zu,convertXyz65ToJab:()=>wc,convertXyz65ToLab65:()=>no,convertXyz65ToP3:()=>js,convertXyz65ToRec2020:()=>bf,convertXyz65ToRgb:()=>qt,convertXyz65ToXyz50:()=>Br,convertYiqToRgb:()=>Tn,converter:()=>P,cubehelix:()=>Ws,differenceCie76:()=>on,differenceCie94:()=>en,differenceCiede2000:()=>vi,differenceCmc:()=>Yi,differenceEuclidean:()=>Yn,differenceHueChroma:()=>li,differenceHueNaive:()=>Un,differenceHueSaturation:()=>yn,differenceHyab:()=>Ja,differenceItp:()=>lt,differenceKotsarenkoRamos:()=>Oa,displayable:()=>st,dlab:()=>Zo,dlch:()=>es,easingGamma:()=>je,easingInOutSine:()=>Mo,easingMidpoint:()=>Hr,easingSmootherstep:()=>Wi,easingSmoothstep:()=>so,easingSmoothstepInverse:()=>ti,filterBrightness:()=>ga,filterContrast:()=>da,filterDeficiencyDeuter:()=>Jn,filterDeficiencyProt:()=>In,filterDeficiencyTrit:()=>Ei,filterGrayscale:()=>Cn,filterHueRotate:()=>ui,filterInvert:()=>Dn,filterSaturate:()=>za,filterSepia:()=>Fa,fixupAlpha:()=>$t,fixupHueDecreasing:()=>cr,fixupHueIncreasing:()=>ur,fixupHueLonger:()=>nr,fixupHueShorter:()=>Rt,formatCss:()=>wi,formatHex:()=>sl,formatHex8:()=>sc,formatHsl:()=>Ps,formatRgb:()=>tu,getMode:()=>se,hsi:()=>$o,hsl:()=>_s,hsv:()=>Go,hwb:()=>Ys,inGamut:()=>It,interpolate:()=>oa,interpolateWith:()=>fa,interpolateWithPremultipliedAlpha:()=>Ea,interpolatorLinear:()=>At,interpolatorPiecewise:()=>Tt,interpolatorSplineBasis:()=>hn,interpolatorSplineBasisClosed:()=>An,interpolatorSplineMonotone:()=>ie,interpolatorSplineMonotone2:()=>fe,interpolatorSplineMonotoneClosed:()=>be,interpolatorSplineNatural:()=>$n,interpolatorSplineNaturalClosed:()=>xi,itp:()=>Ll,jab:()=>mo,jch:()=>ru,lab:()=>Rs,lab65:()=>Yu,lch:()=>Ul,lch65:()=>ql,lchuv:()=>fo,lerp:()=>Be,lrgb:()=>Xo,luv:()=>Os,mapAlphaDivide:()=>ct,mapAlphaMultiply:()=>at,mapTransferGamma:()=>St,mapTransferLinear:()=>Nt,mapper:()=>tt,modeA98:()=>Ht,modeCubehelix:()=>Dr,modeDlab:()=>go,modeDlch:()=>Ao,modeHsi:()=>to,modeHsl:()=>Vs,modeHsv:()=>Pi,modeHwb:()=>dl,modeItp:()=>bc,modeJab:()=>Qu,modeJch:()=>ju,modeLab:()=>Sl,modeLab65:()=>oh,modeLch:()=>nl,modeLch65:()=>Kc,modeLchuv:()=>kl,modeLrgb:()=>Cc,modeLuv:()=>vc,modeOkhsl:()=>ri,modeOkhsv:()=>Zi,modeOklab:()=>Yo,modeOklch:()=>ns,modeP3:()=>zl,modeProphoto:()=>oc,modeRec2020:()=>Qc,modeRgb:()=>_r,modeXyb:()=>Bt,modeXyz50:()=>Wt,modeXyz65:()=>la,modeYiq:()=>Si,nearest:()=>vr,okhsl:()=>ra,okhsv:()=>Ya,oklab:()=>Ka,oklch:()=>Bi,p3:()=>rs,parse:()=>_e,parseHex:()=>g,parseHsl:()=>Ss,parseHslLegacy:()=>Uo,parseHwb:()=>hl,parseLab:()=>ih,parseLch:()=>$c,parseNamed:()=>m,parseOklab:()=>Do,parseOklch:()=>Gs,parseRgb:()=>ve,parseRgbLegacy:()=>O,parseTransparent:()=>Ae,prophoto:()=>Is,random:()=>qe,rec2020:()=>Oi,removeParser:()=>X,rgb:()=>Wr,round:()=>Qi,samples:()=>ut,serializeHex:()=>jl,serializeHex8:()=>Hs,serializeHsl:()=>hi,serializeRgb:()=>Cu,toGamut:()=>Ar,trilerp:()=>yt,unlerp:()=>Xe,useMode:()=>ne,useParser:()=>G,wcagContrast:()=>Bs,wcagLuminance:()=>zs,xyb:()=>na,xyz50:()=>pa,xyz65:()=>Wa,yiq:()=>ln}),V.exports=t(n);var r=(Le,Ue)=>{if(typeof Le=="number"){if(Ue===3)return{mode:"rgb",r:(Le>>8&15|Le>>4&240)/255,g:(Le>>4&15|Le&240)/255,b:(Le&15|Le<<4&240)/255};if(Ue===4)return{mode:"rgb",r:(Le>>12&15|Le>>8&240)/255,g:(Le>>8&15|Le>>4&240)/255,b:(Le>>4&15|Le&240)/255,alpha:(Le&15|Le<<4&240)/255};if(Ue===6)return{mode:"rgb",r:(Le>>16&255)/255,g:(Le>>8&255)/255,b:(Le&255)/255};if(Ue===8)return{mode:"rgb",r:(Le>>24&255)/255,g:(Le>>16&255)/255,b:(Le>>8&255)/255,alpha:(Le&255)/255}}},a=r,o={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},s=o,c=Le=>a(s[Le.toLowerCase()],6),m=c,h=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,v=Le=>{let Ue;return(Ue=Le.match(h))?a(parseInt(Ue[1],16),Ue[1].length):void 0},g=v,i="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",w=`(?:${i}|none)`,S=`${i}%`,M=`(?:${i}%|none)`,C=`(?:${i}%|${i})`,_=`(?:${i}%|${i}|none)`,T=`(?:${i}(deg|grad|rad|turn)|${i})`,f=`(?:${i}(deg|grad|rad|turn)|${i}|none)`,u="\\s*,\\s*",A=new RegExp("^"+_+"$"),x=new RegExp(`^rgba?\\(\\s*${i}${u}${i}${u}${i}\\s*(?:,\\s*${C}\\s*)?\\)$`),z=new RegExp(`^rgba?\\(\\s*${S}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),I=Le=>{let Ue={mode:"rgb"},Qe;if(Qe=Le.match(x))Qe[1]!==void 0&&(Ue.r=Qe[1]/255),Qe[2]!==void 0&&(Ue.g=Qe[2]/255),Qe[3]!==void 0&&(Ue.b=Qe[3]/255);else if(Qe=Le.match(z))Qe[1]!==void 0&&(Ue.r=Qe[1]/100),Qe[2]!==void 0&&(Ue.g=Qe[2]/100),Qe[3]!==void 0&&(Ue.b=Qe[3]/100);else return;return Qe[4]!==void 0?Ue.alpha=Math.max(0,Math.min(1,Qe[4]/100)):Qe[5]!==void 0&&(Ue.alpha=Math.max(0,Math.min(1,+Qe[5]))),Ue},O=I,D=(Le,Ue)=>Le===void 0?void 0:typeof Le!="object"?_e(Le):Le.mode!==void 0?Le:Ue?lo(Li({},Le),{mode:Ue}):void 0,B=D,F=(Le="rgb")=>Ue=>(Ue=B(Ue,Le))!==void 0?Ue.mode===Le?Ue:j[Ue.mode][Le]?j[Ue.mode][Le](Ue):Le==="rgb"?j[Ue.mode].rgb(Ue):j.rgb[Le](j[Ue.mode].rgb(Ue)):void 0,P=F,j={},U={},$=[],Q={},re=Le=>Le,ne=Le=>(j[Le.mode]=Li(Li({},j[Le.mode]),Le.toMode),Object.keys(Le.fromMode||{}).forEach(Ue=>{j[Ue]||(j[Ue]={}),j[Ue][Le.mode]=Le.fromMode[Ue]}),Le.ranges||(Le.ranges={}),Le.difference||(Le.difference={}),Le.channels.forEach(Ue=>{if(Le.ranges[Ue]===void 0&&(Le.ranges[Ue]=[0,1]),!Le.interpolate[Ue])throw new Error(`Missing interpolator for: ${Ue}`);typeof Le.interpolate[Ue]=="function"&&(Le.interpolate[Ue]={use:Le.interpolate[Ue]}),Le.interpolate[Ue].fixup||(Le.interpolate[Ue].fixup=re)}),U[Le.mode]=Le,(Le.parse||[]).forEach(Ue=>{G(Ue,Le.mode)}),P(Le.mode)),se=Le=>U[Le],G=(Le,Ue)=>{if(typeof Le=="string"){if(!Ue)throw new Error("'mode' required when 'parser' is a string");Q[Le]=Ue}else typeof Le=="function"&&$.indexOf(Le)<0&&$.push(Le)},X=Le=>{if(typeof Le=="string")delete Q[Le];else if(typeof Le=="function"){let Ue=$.indexOf(Le);Ue>0&&$.splice(Ue,1)}},K=/[^\x00-\x7F]|[a-zA-Z_]/,H=/[^\x00-\x7F]|[-\w]/,Y={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},q=0;function Z(Le){let Ue=Le[q],Qe=Le[q+1];return Ue==="-"||Ue==="+"?/\d/.test(Qe)||Qe==="."&&/\d/.test(Le[q+2]):Ue==="."?/\d/.test(Qe):/\d/.test(Ue)}function ee(Le){if(q>=Le.length)return!1;let Ue=Le[q];if(K.test(Ue))return!0;if(Ue==="-"){if(Le.length-q<2)return!1;let Qe=Le[q+1];return!!(Qe==="-"||K.test(Qe))}return!1}var ae={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function he(Le){let Ue="";if((Le[q]==="-"||Le[q]==="+")&&(Ue+=Le[q++]),Ue+=xe(Le),Le[q]==="."&&/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le)),(Le[q]==="e"||Le[q]==="E")&&((Le[q+1]==="-"||Le[q+1]==="+")&&/\d/.test(Le[q+2])?Ue+=Le[q++]+Le[q++]+xe(Le):/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le))),ee(Le)){let Qe=we(Le);return Qe==="deg"||Qe==="rad"||Qe==="turn"||Qe==="grad"?{type:Y.Hue,value:Ue*ae[Qe]}:void 0}return Le[q]==="%"?(q++,{type:Y.Percentage,value:+Ue}):{type:Y.Number,value:+Ue}}function xe(Le){let Ue="";for(;/\d/.test(Le[q]);)Ue+=Le[q++];return Ue}function we(Le){let Ue="";for(;q4)){if(Qe.length===4){if(Qe[3].type!==Y.Alpha)return;Qe[3]=Qe[3].value}return Qe.length===3&&Qe.push({type:Y.None,value:void 0}),Qe.every(wt=>wt.type!==Y.Alpha)?Qe:void 0}}function Ge(Le,Ue){Le._i=0;let Qe=Le[Le._i++];if(!Qe||Qe.type!==Y.Function)return;let _t=Ve(Le,Ue);if(_t)return _t.unshift(Qe.value),_t}var ke=Le=>{if(typeof Le!="string")return;let Ue=Se(Le),Qe=Ue?Ge(Ue,!0):void 0,_t,wt=0,Lt=$.length;for(;wtLe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Ae=le,Be=(Le,Ue,Qe)=>Le+Qe*(Ue-Le),Xe=(Le,Ue,Qe)=>(Qe-Le)/(Ue-Le),Ye=(Le,Ue,Qe,_t,wt,Lt)=>Be(Be(Le,Ue,wt),Be(Qe,_t,wt),Lt),yt=(Le,Ue,Qe,_t,wt,Lt,pr,Gr,va,Qa,Ga)=>Be(Ye(Le,Ue,Qe,_t,va,Qa),Ye(wt,Lt,pr,Gr,va,Qa),Ga),gt=Le=>{let Ue=[];for(let Qe=0;QeUe=>{let Qe=gt(Ue);return _t=>{let wt=_t*Qe.length,Lt=_t>=1?Qe.length-1:Math.max(Math.floor(wt),0),pr=Qe[Lt];return pr===void 0?void 0:Le(pr[0],pr[1],wt-Lt)}},At=Tt(Be),$t=Le=>{let Ue=!1,Qe=Le.map(_t=>_t!==void 0?(Ue=!0,_t):1);return Ue?Qe:Le},rr={mode:"rgb",channels:["r","g","b","alpha"],parse:[ve,g,O,m,Ae,"srgb"],serialize:"srgb",interpolate:{r:At,g:At,b:At,alpha:{use:At,fixup:$t}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_r=rr,Xt=(Le=0)=>Math.pow(Math.abs(Le),563/256)*Math.sign(Le),or=Le=>{let Ue=Xt(Le.r),Qe=Xt(Le.g),_t=Xt(Le.b),wt={mode:"xyz65",x:.5766690429101305*Ue+.1855582379065463*Qe+.1882286462349947*_t,y:.297344975250536*Ue+.6273635662554661*Qe+.0752914584939979*_t,z:.0270313613864123*Ue+.0706888525358272*Qe+.9913375368376386*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Ot=or,vt=Le=>Math.pow(Math.abs(Le),256/563)*Math.sign(Le),ht=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"a98",r:vt(Le*2.0415879038107465-Ue*.5650069742788597-.3447313507783297*Qe),g:vt(Le*-.9692436362808798+Ue*1.8759675015077206+.0415550574071756*Qe),b:vt(Le*.0134442806320312-Ue*.1183623922310184+1.0151749943912058*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},De=ht,Ne=(Le=0)=>{let Ue=Math.abs(Le);return Ue<=.04045?Le/12.92:(Math.sign(Le)||1)*Math.pow((Ue+.055)/1.055,2.4)},We=({r:Le,g:Ue,b:Qe,alpha:_t})=>{let wt={mode:"lrgb",r:Ne(Le),g:Ne(Ue),b:Ne(Qe)};return _t!==void 0&&(wt.alpha=_t),wt},Ke=We,Je=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.4123907992659593*Ue+.357584339383878*Qe+.1804807884018343*_t,y:.2126390058715102*Ue+.715168678767756*Qe+.0721923153607337*_t,z:.0193308187155918*Ue+.119194779794626*Qe+.9505321522496607*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},et=Je,Mt=(Le=0)=>{let Ue=Math.abs(Le);return Ue>.0031308?(Math.sign(Le)||1)*(1.055*Math.pow(Ue,1/2.4)-.055):Le*12.92},pt=({r:Le,g:Ue,b:Qe,alpha:_t},wt="rgb")=>{let Lt={mode:wt,r:Mt(Le),g:Mt(Ue),b:Mt(Qe)};return _t!==void 0&&(Lt.alpha=_t),Lt},Pt=pt,Ct=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.2409699419045226-Ue*1.537383177570094-.4986107602930034*Qe,g:Le*-.9692436362808796+Ue*1.8759675015077204+.0415550574071756*Qe,b:Le*.0556300796969936-Ue*.2039769588889765+1.0569715142428784*Qe});return _t!==void 0&&(wt.alpha=_t),wt},qt=Ct,Vt=lo(Li({},_r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:Le=>De(et(Le)),xyz65:De},toMode:{rgb:Le=>qt(Ot(Le)),xyz65:Ot}}),Ht=Vt,Sr=Le=>(Le=Le%360)<0?Le+360:Le,Kr=Sr,Yt=(Le,Ue)=>Le.map((Qe,_t,wt)=>{if(Qe===void 0)return Qe;let Lt=Kr(Qe);return _t===0||Le[_t-1]===void 0?Lt:Ue(Lt-Kr(wt[_t-1]))}).reduce((Qe,_t)=>!Qe.length||_t===void 0||Qe[Qe.length-1]===void 0?(Qe.push(_t),Qe):(Qe.push(_t+Qe[Qe.length-1]),Qe),[]),Rt=Le=>Yt(Le,Ue=>Math.abs(Ue)<=180?Ue:Ue-360*Math.sign(Ue)),nr=Le=>Yt(Le,Ue=>Math.abs(Ue)>=180||Ue===0?Ue:Ue-360*Math.sign(Ue)),ur=Le=>Yt(Le,Ue=>Ue>=0?Ue:Ue+360),cr=Le=>Yt(Le,Ue=>Ue<=0?Ue:Ue-360),Rr=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Qr=Math.PI/180,Zr=180/Math.PI,ha=Rr[3]*Rr[4],Pa=Rr[1]*Rr[4],La=Rr[1]*Rr[2]-Rr[0]*Rr[3],un=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(La*Qe+Le*ha-Ue*Pa)/(La+ha-Pa),Lt=Qe-wt,pr=(Rr[4]*(Ue-wt)-Rr[2]*Lt)/Rr[3],Gr={mode:"cubehelix",l:wt,s:wt===0||wt===1?void 0:Math.sqrt(Lt*Lt+pr*pr)/(Rr[4]*wt*(1-wt))};return Gr.s&&(Gr.h=Math.atan2(pr,Lt)*Zr-120),_t!==void 0&&(Gr.alpha=_t),Gr},Xa=un,ja=({h:Le,s:Ue,l:Qe,alpha:_t})=>{let wt={mode:"rgb"};Le=(Le===void 0?0:Le+120)*Qr,Qe===void 0&&(Qe=0);let Lt=Ue===void 0?0:Ue*Qe*(1-Qe),pr=Math.cos(Le),Gr=Math.sin(Le);return wt.r=Qe+Lt*(Rr[0]*pr+Rr[1]*Gr),wt.g=Qe+Lt*(Rr[2]*pr+Rr[3]*Gr),wt.b=Qe+Lt*(Rr[4]*pr+Rr[5]*Gr),_t!==void 0&&(wt.alpha=_t),wt},Nn=ja,yn=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.s||!Ue.s)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.s*Ue.s)*wt},Un=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h);return Math.abs(_t-Qe)>180?Qe-(_t-360*Math.sign(_t-Qe)):_t-Qe},li=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.c||!Ue.c)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.c*Ue.c)*wt},Yn=(Le="rgb",Ue=[1,1,1,0])=>{let Qe=se(Le),_t=Qe.channels,wt=Qe.difference,Lt=P(Le);return(pr,Gr)=>{let va=Lt(pr),Qa=Lt(Gr);return Math.sqrt(_t.reduce((Ga,Ua,Mn)=>{let dn=wt[Ua]?wt[Ua](va,Qa):va[Ua]-Qa[Ua];return Ga+(Ue[Mn]||0)*Math.pow(isNaN(dn)?0:dn,2)},0))}},on=()=>Yn("lab65"),en=(Le=1,Ue=.045,Qe=.015)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),Mn=Gr.l,dn=Gr.a,_n=Gr.b,Sn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(va-Mn,2),Zn=Math.pow(Ua-Sn,2),Ci=Math.pow(Qa-dn,2)+Math.pow(Ga-_n,2)-Zn;return Math.sqrt(Bn/Math.pow(Le,2)+Zn/Math.pow(1+Ue*Ua,2)+Ci/Math.pow(1+Qe*Ua,2))}},vi=(Le=1,Ue=1,Qe=1)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),Mn=Gr.l,dn=Gr.a,_n=Gr.b,Sn=Math.sqrt(dn*dn+_n*_n),Bn=(Ua+Sn)/2,Zn=.5*(1-Math.sqrt(Math.pow(Bn,7)/(Math.pow(Bn,7)+Math.pow(25,7)))),Ci=Qa*(1+Zn),qo=dn*(1+Zn),As=Math.sqrt(Ci*Ci+Ga*Ga),ls=Math.sqrt(qo*qo+_n*_n),Vl=Math.abs(Ci)+Math.abs(Ga)===0?0:Math.atan2(Ga,Ci);Vl+=(Vl<0)*2*Math.PI;let au=Math.abs(qo)+Math.abs(_n)===0?0:Math.atan2(_n,qo);au+=(au<0)*2*Math.PI;let Lu=Mn-va,uh=ls-As,wh=As*ls===0?0:au-Vl;wh-=(wh>Math.PI)*2*Math.PI,wh+=(wh<-Math.PI)*2*Math.PI;let Gh=2*Math.sqrt(As*ls)*Math.sin(wh/2),Gd=(va+Mn)/2,Ad=(As+ls)/2,ch;As*ls===0?ch=Vl+au:(ch=(Vl+au)/2,ch-=(Math.abs(Vl-au)>Math.PI)*Math.PI,ch+=(ch<0)*2*Math.PI);let Mv=Math.pow(Gd-50,2),vp=1-.17*Math.cos(ch-Math.PI/6)+.24*Math.cos(2*ch)+.32*Math.cos(3*ch+Math.PI/30)-.2*Math.cos(4*ch-63*Math.PI/180),mp=1+.015*Mv/Math.sqrt(20+Mv),gp=1+.045*Ad,yp=1+.015*Ad*vp,xg=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*ch-275)/25,2)),p0=2*Math.sqrt(Math.pow(Ad,7)/(Math.pow(Ad,7)+Math.pow(25,7))),Md=-1*Math.sin(2*xg)*p0;return Math.sqrt(Math.pow(Lu/(Le*mp),2)+Math.pow(uh/(Ue*gp),2)+Math.pow(Gh/(Qe*yp),2)+Md*uh/(Ue*gp)*Gh/(Qe*yp))}},Yi=(Le=1,Ue=1)=>{let Qe=P("lab65");return(_t,wt)=>{let Lt=Qe(_t),pr=Lt.l,Gr=Lt.a,va=Lt.b,Qa=Math.sqrt(Gr*Gr+va*va),Ga=Math.atan2(va,Gr);Ga=Ga+2*Math.PI*(Ga<0);let Ua=Qe(wt),Mn=Ua.l,dn=Ua.a,_n=Ua.b,Sn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(pr-Mn,2),Zn=Math.pow(Qa-Sn,2),Ci=Math.pow(Gr-dn,2)+Math.pow(va-_n,2)-Zn,qo=Math.sqrt(Math.pow(Qa,4)/(Math.pow(Qa,4)+1900)),As=Ga>=164/180*Math.PI&&Ga<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(Ga+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(Ga+35/180*Math.PI)),ls=pr<16?.511:.040975*pr/(1+.01765*pr),Vl=.0638*Qa/(1+.0131*Qa)+.638,au=Vl*(qo*As+1-qo);return Math.sqrt(Bn/Math.pow(Le*ls,2)+Zn/Math.pow(Ue*Vl,2)+Ci/Math.pow(au,2))}},Ja=()=>{let Le=P("lab65");return(Ue,Qe)=>{let _t=Le(Ue),wt=Le(Qe),Lt=_t.l-wt.l,pr=_t.a-wt.a,Gr=_t.b-wt.b;return Math.abs(Lt)+Math.sqrt(pr*pr+Gr*Gr)}},Oa=()=>Yn("yiq",[.5053,.299,.1957]),lt=()=>Yn("itp",[518400,129600,518400]),rt=Le=>{let Ue=Le.reduce((_t,wt)=>{if(wt!==void 0){let Lt=wt*Math.PI/180;_t.sin+=Math.sin(Lt),_t.cos+=Math.cos(Lt)}return _t},{sin:0,cos:0}),Qe=Math.atan2(Ue.sin,Ue.cos)*180/Math.PI;return Qe<0?360+Qe:Qe},fr=Le=>{let Ue=Le.filter(Qe=>Qe!==void 0);return Ue.length?Ue.reduce((Qe,_t)=>Qe+_t,0)/Ue.length:void 0},lr=Le=>typeof Le=="function";function Tr(Le,Ue="rgb",Qe){let _t=se(Ue),wt=Le.map(P(Ue));return _t.channels.reduce((Lt,pr)=>{let Gr=wt.map(va=>va[pr]).filter(va=>va!==void 0);if(Gr.length){let va;lr(Qe)?va=Qe:Qe&&lr(Qe[pr])?va=Qe[pr]:_t.average&&lr(_t.average[pr])?va=_t.average[pr]:va=fr,Lt[pr]=va(Gr,pr)}return Lt},{mode:Ue})}var Ir={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Xa},toMode:{rgb:Nn},interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Dr=Ir,ot=({l:Le,a:Ue,b:Qe,alpha:_t},wt="lch")=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let Lt=Math.sqrt(Ue*Ue+Qe*Qe),pr={mode:wt,l:Le,c:Lt};return Lt&&(pr.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(pr.alpha=_t),pr},kt=ot,jt=({l:Le,c:Ue,h:Qe,alpha:_t},wt="lab")=>{Qe===void 0&&(Qe=0);let Lt={mode:wt,l:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(Lt.alpha=_t),Lt},ar=jt,Er=Math.pow(29,3)/Math.pow(3,3),xr=Math.pow(6,3)/Math.pow(29,3),zr={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Lr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},aa=Math.pow(29,3)/Math.pow(3,3),Sa=Math.pow(6,3)/Math.pow(29,3),wa=Le=>Math.pow(Le,3)>xr?Math.pow(Le,3):(116*Le-16)/Er,pn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz65",x:wa(Lt)*Lr.X,y:wa(wt)*Lr.Y,z:wa(pr)*Lr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tn=pn,ai=Le=>qt(tn(Le)),rn=ai,Ri=Le=>Le>xr?Math.cbrt(Le):(Er*Le+16)/116,Gn=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ri(Le/Lr.X),Lt=Ri(Ue/Lr.Y),pr=Ri(Qe/Lr.Z),Gr={mode:"lab65",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},no=Gn,Di=Le=>{let Ue=no(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},fn=Di,Ai=1,jn=1,Xn=26/180*Math.PI,eo=Math.cos(Xn),gi=Math.sin(Xn),qi=100/Math.log(139/100),io=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"lab65",l:(Math.exp(Le*Ai/qi)-1)/.0039},Lt=(Math.exp(.0435*Ue*jn*Ai)-1)/.075,pr=Lt*Math.cos(Qe/180*Math.PI-Xn),Gr=Lt*Math.sin(Qe/180*Math.PI-Xn);return wt.a=pr*eo-Gr/.83*gi,wt.b=pr*gi+Gr/.83*eo,_t!==void 0&&(wt.alpha=_t),wt},oo=io,Vn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue*eo+Qe*gi,Lt=.83*(Qe*eo-Ue*gi),pr=Math.sqrt(wt*wt+Lt*Lt),Gr={mode:"dlch",l:qi/Ai*Math.log(1+.0039*Le),c:Math.log(1+.075*pr)/(.0435*jn*Ai)};return Gr.c&&(Gr.h=Kr((Math.atan2(Lt,wt)+Xn)/Math.PI*180)),_t!==void 0&&(Gr.alpha=_t),Gr},qn=Vn,Hi=Le=>oo(kt(Le,"dlch")),Mi=Le=>ar(qn(Le),"dlab"),Ro={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Hi,rgb:Le=>rn(Hi(Le))},fromMode:{lab65:Mi,rgb:Le=>Mi(fn(Le))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},go=Ro,Eo={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:oo,dlab:Le=>ar(Le,"dlab"),rgb:Le=>rn(oo(Le))},fromMode:{lab65:qn,dlab:Le=>kt(Le,"dlch"),rgb:Le=>qn(fn(Le))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:At,c:At,h:{use:At,fixup:Rt},alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},Ao=Eo;function ds({h:Le,s:Ue,i:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 4:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 5:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function jo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsi",s:Le+Ue+Qe===0?0:1-3*Lt/(Le+Ue+Qe),i:(Le+Ue+Qe)/3};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue{switch(Ue){case"deg":return+Le;case"rad":return Le/Math.PI*180;case"grad":return Le/10*9;case"turn":return Le*360}},Io=Vi,Xi=new RegExp(`^hsla?\\(\\s*${T}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),Ko=Le=>{let Ue=Le.match(Xi);if(!Ue)return;let Qe={mode:"hsl"};return Ue[3]!==void 0?Qe.h=+Ue[3]:Ue[1]!==void 0&&Ue[2]!==void 0&&(Qe.h=Io(Ue[1],Ue[2])),Ue[4]!==void 0&&(Qe.s=Math.min(Math.max(0,Ue[4]/100),1)),Ue[5]!==void 0&&(Qe.l=Math.min(Math.max(0,Ue[5]/100),1)),Ue[6]!==void 0?Qe.alpha=Math.max(0,Math.min(1,Ue[6]/100)):Ue[7]!==void 0&&(Qe.alpha=Math.max(0,Math.min(1,+Ue[7]))),Qe},Uo=Ko;function Ls(Le,Ue){if(!Ue||Ue[0]!=="hsl"&&Ue[0]!=="hsla")return;let Qe={mode:"hsl"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.s=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.l=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Ss=Ls,Vo={mode:"hsl",toMode:{rgb:wo},fromMode:{rgb:pi},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Ss,Uo],serialize:Le=>`hsl(${Le.h!==void 0?Le.h:"none"} ${Le.s!==void 0?Le.s*100+"%":"none"} ${Le.l!==void 0?Le.l*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Vs=Vo;function Ts({h:Le,s:Ue,v:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe,g:Qe*(1-Ue*wt),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1-Ue*wt),g:Qe,b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe,b:Qe*(1-Ue*wt)};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue*wt),b:Qe};break;case 4:Lt={r:Qe*(1-Ue*wt),g:Qe*(1-Ue),b:Qe};break;case 5:Lt={r:Qe,g:Qe*(1-Ue),b:Qe*(1-Ue*wt)};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function Bo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsv",s:wt===0?0:1-Lt/wt,v:wt};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue1){let wt=Ue+Qe;Ue/=wt,Qe/=wt}return Ts({h:Le,s:Qe===1?1:1-Ue/(1-Qe),v:1-Qe,alpha:_t})}function bs(Le){let Ue=Bo(Le);if(Ue===void 0)return;let Qe=Ue.s!==void 0?Ue.s:0,_t=Ue.v!==void 0?Ue.v:0,wt={mode:"hwb",w:(1-Qe)*_t,b:1-_t};return Ue.h!==void 0&&(wt.h=Ue.h),Ue.alpha!==void 0&&(wt.alpha=Ue.alpha),wt}function Dl(Le,Ue){if(!Ue||Ue[0]!=="hwb")return;let Qe={mode:"hwb"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.w=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.b=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var hl=Dl,ps={mode:"hwb",toMode:{rgb:yo},fromMode:{rgb:bs},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[hl],serialize:Le=>`hwb(${Le.h!==void 0?Le.h:"none"} ${Le.w!==void 0?Le.w*100+"%":"none"} ${Le.b!==void 0?Le.b*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},w:At,b:At,alpha:{use:At,fixup:$t}},difference:{h:Un},average:{h:rt}},dl=ps,wu=203,lu=.1593017578125,xc=78.84375,Fl=.8359375,pl=18.8515625,$u=18.6875;function uu(Le){if(Le<0)return 0;let Ue=Math.pow(Le,1/xc);return 1e4*Math.pow(Math.max(0,Ue-Fl)/(pl-$u*Ue),1/lu)}function tl(Le){if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),xc)}var vs=Le=>Math.max(Le/wu,0),os=({i:Le,t:Ue,p:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=uu(Le+.008609037037932761*Ue+.11102962500302593*Qe),Lt=uu(Le-.00860903703793275*Ue-.11102962500302599*Qe),pr=uu(Le+.5600313357106791*Ue-.32062717498731885*Qe),Gr={mode:"xyz65",x:vs(2.070152218389422*wt-1.3263473389671556*Lt+.2066510476294051*pr),y:vs(.3647385209748074*wt+.680566024947227*Lt-.0453045459220346*pr),z:vs(-.049747207535812*wt-.0492609666966138*Lt+1.1880659249923042*pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ms=os,rl=(Le=0)=>Math.max(Le*wu,0),Fu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{let wt=rl(Le),Lt=rl(Ue),pr=rl(Qe),Gr=tl(.3592832590121217*wt+.6976051147779502*Lt-.0358915932320289*pr),va=tl(-.1920808463704995*wt+1.1004767970374323*Lt+.0753748658519118*pr),Qa=tl(.0070797844607477*wt+.0748396662186366*Lt+.8433265453898765*pr),Ga=.5*Gr+.5*va,Ua=1.61376953125*Gr-3.323486328125*va+1.709716796875*Qa,Mn=4.378173828125*Gr-4.24560546875*va-.132568359375*Qa,dn={mode:"itp",i:Ga,t:Ua,p:Mn};return _t!==void 0&&(dn.alpha=_t),dn},zu=Fu,Ku={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ms,rgb:Le=>qt(ms(Le))},fromMode:{xyz65:zu,rgb:Le=>zu(et(Le))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:At,t:At,p:At,alpha:{use:At,fixup:$t}}},bc=Ku,Lh=134.03437499999998,rh=16295499532821565e-27,Ju=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),Lh)},ss=(Le=0)=>Math.max(Le*203,0),ah=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le=ss(Le),Ue=ss(Ue),Qe=ss(Qe);let wt=1.15*Le-.15*Qe,Lt=.66*Ue+.34*Le,pr=Ju(.41478972*wt+.579999*Lt+.014648*Qe),Gr=Ju(-.20151*wt+1.120649*Lt+.0531008*Qe),va=Ju(-.0166008*wt+.2648*Lt+.6684799*Qe),Qa=(pr+Gr)/2,Ga={mode:"jab",j:.44*Qa/(1-.56*Qa)-rh,a:3.524*pr-4.066708*Gr+.542708*va,b:.199076*pr+1.096799*Gr-1.295875*va};return _t!==void 0&&(Ga.alpha=_t),Ga},wc=ah,pc=134.03437499999998,Nf=16295499532821565e-27,Bu=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le,1/pc);return 1e4*Math.pow((Fl-Ue)/($u*Ue-pl),1/lu)},Tc=Le=>Le/203,Ou=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+Nf)/(.44+.56*(Le+Nf)),Lt=Bu(wt+.13860504*Ue+.058047316*Qe),pr=Bu(wt-.13860504*Ue-.058047316*Qe),Gr=Bu(wt-.096019242*Ue-.8118919*Qe),va={mode:"xyz65",x:Tc(1.661373024652174*Lt-.914523081304348*pr+.23136208173913045*Gr),y:Tc(-.3250758611844533*Lt+1.571847026732543*pr-.21825383453227928*Gr),z:Tc(-.090982811*Lt-.31272829*pr+1.5227666*Gr)};return _t!==void 0&&(va.alpha=_t),va},Gc=Ou,pf=Le=>{let Ue=wc(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},$l=pf,jf=Le=>qt(Gc(Le)),Hc=jf,Wc={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:$l,xyz65:wc},toMode:{rgb:Hc,xyz65:Gc},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Qu=Wc,Yc=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"jch",j:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},Nu=Yc,Uf=({j:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"jab",j:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},al=Uf,Xc={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:al,rgb:Le=>Hc(al(Le))},fromMode:{rgb:Le=>Nu($l(Le)),jab:Nu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,j:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},ju=Xc,Ac=Math.pow(29,3)/Math.pow(3,3),Zc=Math.pow(6,3)/Math.pow(29,3),ec=Le=>Math.pow(Le,3)>Zc?Math.pow(Le,3):(116*Le-16)/Ac,cu=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz50",x:ec(Lt)*zr.X,y:ec(wt)*zr.Y,z:ec(pr)*zr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tc=cu,vf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.1341359569958707-Ue*1.6173863321612538-.4906619460083532*Qe,g:Le*-.978795502912089+Ue*1.916254567259524+.03344273116131949*Qe,b:Le*.07195537988411677-Ue*.2289768264158322+1.405386058324125*Qe});return _t!==void 0&&(wt.alpha=_t),wt},Tu=vf,nh=Le=>Tu(tc(Le)),vl=nh,ml=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz50",x:.436065742824811*Ue+.3851514688337912*Qe+.14307845442264197*_t,y:.22249319175623702*Ue+.7168870538238823*Qe+.06061979053616537*_t,z:.013923904500943465*Ue+.09708128566574634*Qe+.7140993584005155*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},rc=ml,yl=Le=>Le>Zc?Math.cbrt(Le):(Ac*Le+16)/116,qf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=yl(Le/zr.X),Lt=yl(Ue/zr.Y),pr=yl(Qe/zr.Z),Gr={mode:"lab",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ac=qf,Mc=Le=>{let Ue=ac(rc(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},mf=Mc;function Jo(Le,Ue){if(!Ue||Ue[0]!=="lab")return;let Qe={mode:"lab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.value),100)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*125/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*125/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var ih=Jo,fu={mode:"lab",toMode:{xyz50:tc,rgb:vl},fromMode:{xyz50:ac,rgb:mf},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[ih],serialize:Le=>`lab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Sl=fu,El=lo(Li({},Sl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:tn,rgb:rn},fromMode:{xyz65:no,rgb:fn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),oh=El;function Au(Le,Ue){if(!Ue||Ue[0]!=="lch")return;let Qe={mode:"lch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.value),100)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*150/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var $c=Au,_l={mode:"lch",toMode:{lab:ar,rgb:Le=>vl(ar(Le))},fromMode:{rgb:Le=>kt(mf(Le)),lab:kt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$c],serialize:Le=>`lch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},nl=_l,gf=lo(Li({},nl),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:Le=>ar(Le,"lab65"),rgb:Le=>rn(ar(Le,"lab65"))},fromMode:{rgb:Le=>kt(fn(Le),"lch65"),lab65:Le=>kt(Le,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Kc=gf,sh=({l:Le,u:Ue,v:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"lchuv",l:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},hu=sh,Uu=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"luv",l:Le,u:Ue?Ue*Math.cos(Qe/180*Math.PI):0,v:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},qu=Uu,nc=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),yf=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),_f=nc(zr.X,zr.Y,zr.Z),Mu=yf(zr.X,zr.Y,zr.Z),ic=Le=>Le<=Zc?Ac*Le:116*Math.cbrt(Le)-16,Sc=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=ic(Ue/zr.Y),Lt=nc(Le,Ue,Qe),pr=yf(Le,Ue,Qe);!isFinite(Lt)||!isFinite(pr)?wt=Lt=pr=0:(Lt=13*wt*(Lt-_f),pr=13*wt*(pr-Mu));let Gr={mode:"luv",l:wt,u:Lt,v:pr};return _t!==void 0&&(Gr.alpha=_t),Gr},Vu=Sc,xo=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),Ec=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),xh=xo(zr.X,zr.Y,zr.Z),Vf=Ec(zr.X,zr.Y,zr.Z),xf=({l:Le,u:Ue,v:Qe,alpha:_t})=>{if(Le===void 0&&(Le=0),Le===0)return{mode:"xyz50",x:0,y:0,z:0};Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue/(13*Le)+xh,Lt=Qe/(13*Le)+Vf,pr=zr.Y*(Le<=8?Le/Ac:Math.pow((Le+16)/116,3)),Gr=pr*(9*wt)/(4*Lt),va=pr*(12-3*wt-20*Lt)/(4*Lt),Qa={mode:"xyz50",x:Gr,y:pr,z:va};return _t!==void 0&&(Qa.alpha=_t),Qa},Gf=xf,bh=Le=>hu(Vu(rc(Le))),Hf=Le=>Tu(Gf(qu(Le))),il={mode:"lchuv",toMode:{luv:qu,rgb:Hf},fromMode:{rgb:bh,luv:hu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},kl=il,kc=lo(Li({},_r),{mode:"lrgb",toMode:{rgb:Pt},fromMode:{rgb:Ke},parse:["srgb-linear"],serialize:"srgb-linear"}),Cc=kc,Lc={mode:"luv",toMode:{xyz50:Gf,rgb:Le=>Tu(Gf(Le))},fromMode:{xyz50:Vu,rgb:Le=>Vu(rc(Le))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:At,u:At,v:At,alpha:{use:At,fixup:$t}}},vc=Lc,Ft=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.cbrt(.412221469470763*Le+.5363325372617348*Ue+.0514459932675022*Qe),Lt=Math.cbrt(.2119034958178252*Le+.6806995506452344*Ue+.1073969535369406*Qe),pr=Math.cbrt(.0883024591900564*Le+.2817188391361215*Ue+.6299787016738222*Qe),Gr={mode:"oklab",l:.210454268309314*wt+.7936177747023054*Lt-.0040720430116193*pr,a:1.9779985324311684*wt-2.42859224204858*Lt+.450593709617411*pr,b:.0259040424655478*wt+.7827717124575296*Lt-.8086757549230774*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},tr=Ft,Fr=Le=>{let Ue=tr(Ke(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},wr=Fr,ea=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.pow(Le+.3963377773761749*Ue+.2158037573099136*Qe,3),Lt=Math.pow(Le-.1055613458156586*Ue-.0638541728258133*Qe,3),pr=Math.pow(Le-.0894841775298119*Ue-1.2914855480194092*Qe,3),Gr={mode:"lrgb",r:4.076741636075957*wt-3.3077115392580616*Lt+.2309699031821044*pr,g:-1.2684379732850317*wt+2.6097573492876887*Lt-.3413193760026573*pr,b:-.0041960761386756*wt-.7034186179359362*Lt+1.7076146940746117*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},ba=ea,Ia=Le=>Pt(ba(Le)),Na=Ia;function Za(Le){let _t=1.170873786407767;return .5*(_t*Le-.206+Math.sqrt((_t*Le-.206)*(_t*Le-.206)+4*.03*_t*Le))}function mn(Le){return(Le*Le+.206*Le)/(1.170873786407767*(Le+.03))}function Da(Le,Ue){let Qe,_t,wt,Lt,pr,Gr,va,Qa;-1.88170328*Le-.80936493*Ue>1?(Qe=1.19086277,_t=1.76576728,wt=.59662641,Lt=.75515197,pr=.56771245,Gr=4.0767416621,va=-3.3077115913,Qa=.2309699292):1.81444104*Le-1.19445276*Ue>1?(Qe=.73956515,_t=-.45954404,wt=.08285427,Lt=.1254107,pr=.14503204,Gr=-1.2684380046,va=2.6097574011,Qa=-.3413193965):(Qe=1.35733652,_t=-.00915799,wt=-1.1513021,Lt=-.50559606,pr=.00692167,Gr=-.0041960863,va=-.7034186147,Qa=1.707614701);let Ga=Qe+_t*Le+wt*Ue+Lt*Le*Le+pr*Le*Ue,Ua=.3963377774*Le+.2158037573*Ue,Mn=-.1055613458*Le-.0638541728*Ue,dn=-.0894841775*Le-1.291485548*Ue;{let _n=1+Ga*Ua,Sn=1+Ga*Mn,Bn=1+Ga*dn,Zn=_n*_n*_n,Ci=Sn*Sn*Sn,qo=Bn*Bn*Bn,As=3*Ua*_n*_n,ls=3*Mn*Sn*Sn,Vl=3*dn*Bn*Bn,au=6*Ua*Ua*_n,Lu=6*Mn*Mn*Sn,uh=6*dn*dn*Bn,wh=Gr*Zn+va*Ci+Qa*qo,Gh=Gr*As+va*ls+Qa*Vl,Gd=Gr*au+va*Lu+Qa*uh;Ga=Ga-wh*Gh/(Gh*Gh-.5*wh*Gd)}return Ga}function Ha(Le,Ue){let Qe=Da(Le,Ue),_t=ba({l:1,a:Qe*Le,b:Qe*Ue}),wt=Math.cbrt(1/Math.max(_t.r,_t.g,_t.b)),Lt=wt*Qe;return[wt,Lt]}function $a(Le,Ue,Qe,_t,wt,Lt=null){Lt||(Lt=Ha(Le,Ue));let pr;if((Qe-wt)*Lt[1]-(Lt[0]-wt)*_t<=0)pr=Lt[1]*wt/(_t*Lt[0]+Lt[1]*(wt-Qe));else{pr=Lt[1]*(wt-1)/(_t*(Lt[0]-1)+Lt[1]*(wt-Qe));{let Gr=Qe-wt,va=_t,Qa=.3963377774*Le+.2158037573*Ue,Ga=-.1055613458*Le-.0638541728*Ue,Ua=-.0894841775*Le-1.291485548*Ue,Mn=Gr+va*Qa,dn=Gr+va*Ga,_n=Gr+va*Ua;{let Sn=wt*(1-pr)+pr*Qe,Bn=pr*_t,Zn=Sn+Bn*Qa,Ci=Sn+Bn*Ga,qo=Sn+Bn*Ua,As=Zn*Zn*Zn,ls=Ci*Ci*Ci,Vl=qo*qo*qo,au=3*Mn*Zn*Zn,Lu=3*dn*Ci*Ci,uh=3*_n*qo*qo,wh=6*Mn*Mn*Zn,Gh=6*dn*dn*Ci,Gd=6*_n*_n*qo,Ad=4.0767416621*As-3.3077115913*ls+.2309699292*Vl-1,ch=4.0767416621*au-3.3077115913*Lu+.2309699292*uh,Mv=4.0767416621*wh-3.3077115913*Gh+.2309699292*Gd,vp=ch/(ch*ch-.5*Ad*Mv),mp=-Ad*vp,gp=-1.2684380046*As+2.6097574011*ls-.3413193965*Vl-1,yp=-1.2684380046*au+2.6097574011*Lu-.3413193965*uh,xg=-1.2684380046*wh+2.6097574011*Gh-.3413193965*Gd,p0=yp/(yp*yp-.5*gp*xg),Md=-gp*p0,v0=-.0041960863*As-.7034186147*ls+1.707614701*Vl-1,m0=-.0041960863*au-.7034186147*Lu+1.707614701*uh,Hd=-.0041960863*wh-.7034186147*Gh+1.707614701*Gd,_p=m0/(m0*m0-.5*v0*Hd),bg=-v0*_p;mp=vp>=0?mp:1e6,Md=p0>=0?Md:1e6,bg=_p>=0?bg:1e6,pr+=Math.min(mp,Math.min(Md,bg))}}}return pr}function vn(Le,Ue,Qe=null){Qe||(Qe=Ha(Le,Ue));let _t=Qe[0],wt=Qe[1];return[wt/_t,wt/(1-_t)]}function En(Le,Ue,Qe){let _t=Ha(Ue,Qe),wt=$a(Ue,Qe,Le,1,Le,_t),Lt=vn(Ue,Qe,_t),pr=.11516993+1/(7.4477897+4.1590124*Qe+Ue*(-2.19557347+1.75198401*Qe+Ue*(-2.13704948-10.02301043*Qe+Ue*(-4.24894561+5.38770819*Qe+4.69891013*Ue)))),Gr=.11239642+1/(1.6132032-.68124379*Qe+Ue*(.40370612+.90148123*Qe+Ue*(-.27087943+.6122399*Qe+Ue*(.00299215-.45399568*Qe-.14661872*Ue)))),va=wt/Math.min(Le*Lt[0],(1-Le)*Lt[1]),Qa=Le*pr,Ga=(1-Le)*Gr,Ua=.9*va*Math.sqrt(Math.sqrt(1/(1/(Qa*Qa*Qa*Qa)+1/(Ga*Ga*Ga*Ga))));return Qa=Le*.4,Ga=(1-Le)*.8,[Math.sqrt(1/(1/(Qa*Qa)+1/(Ga*Ga))),Ua,wt]}function yi(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt={mode:"okhsl",l:Za(Ue)};Le.alpha!==void 0&&(wt.alpha=Le.alpha);let Lt=Math.sqrt(Qe*Qe+_t*_t);if(!Lt)return wt.s=0,wt;let[pr,Gr,va]=En(Ue,Qe/Lt,_t/Lt),Qa;if(Ltyi(wr(Le))},toMode:{oklab:_i,rgb:Le=>Na(_i(Le))}}),ri=ki;function kn(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt=Math.sqrt(Qe*Qe+_t*_t),Lt=wt?Qe/wt:1,pr=wt?_t/wt:1,[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=va/(wt+Ue*va),Mn=Ua*Ue,dn=Ua*wt,_n=mn(Mn),Sn=dn*_n/Mn,Bn=ba({l:_n,a:Lt*Sn,b:pr*Sn}),Zn=Math.cbrt(1/Math.max(Bn.r,Bn.g,Bn.b,0));Ue=Ue/Zn,wt=wt/Zn*Za(Ue)/Ue,Ue=Za(Ue);let Ci={mode:"okhsv",s:wt?(Qa+va)*dn/(va*Qa+va*Ga*dn):0,v:Ue?Ue/Mn:0};return Ci.s&&(Ci.h=Kr(Math.atan2(_t,Qe)*180/Math.PI)),Le.alpha!==void 0&&(Ci.alpha=Le.alpha),Ci}function Ln(Le){let Ue={mode:"oklab"};Le.alpha!==void 0&&(Ue.alpha=Le.alpha);let Qe=Le.h!==void 0?Le.h:0,_t=Le.s!==void 0?Le.s:0,wt=Le.v!==void 0?Le.v:0,Lt=Math.cos(Qe/180*Math.PI),pr=Math.sin(Qe/180*Math.PI),[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=1-_t*Qa/(Qa+va-va*Ga*_t),Mn=_t*va*Qa/(Qa+va-va*Ga*_t),dn=mn(Ua),_n=Mn*dn/Ua,Sn=ba({l:dn,a:Lt*_n,b:pr*_n}),Bn=Math.cbrt(1/Math.max(Sn.r,Sn.g,Sn.b,0)),Zn=mn(wt*Ua),Ci=Mn*Zn/Ua;return Ue.l=Zn*Bn,Ue.a=Ci*Lt*Bn,Ue.b=Ci*pr*Bn,Ue}var Ni=lo(Li({},Pi),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:kn,rgb:Le=>kn(wr(Le))},toMode:{oklab:Ln,rgb:Le=>Na(Ln(Le))}}),Zi=Ni;function Co(Le,Ue){if(!Ue||Ue[0]!=="oklab")return;let Qe={mode:"oklab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*.4/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*.4/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Do=Co,Fo=lo(Li({},Sl),{mode:"oklab",toMode:{lrgb:ba,rgb:Na},fromMode:{lrgb:tr,rgb:wr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Do],serialize:Le=>`oklab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`}),Yo=Fo;function bo(Le,Ue){if(!Ue||Ue[0]!=="oklch")return;let Qe={mode:"oklch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*.4/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Gs=bo,Es=lo(Li({},nl),{mode:"oklch",toMode:{oklab:Le=>ar(Le,"oklab"),rgb:Le=>Na(ar(Le,"oklab"))},fromMode:{rgb:Le=>kt(wr(Le),"oklch"),oklab:Le=>kt(Le,"oklch")},parse:[Gs],serialize:Le=>`oklch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),ns=Es,Kn=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.486570948648216*Ue+.265667693169093*Qe+.1982172852343625*_t,y:.2289745640697487*Ue+.6917385218365062*Qe+.079286914093745*_t,z:0*Ue+.0451133818589026*Qe+1.043944368900976*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},zo=Kn,gs=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*2.4934969119414263-Ue*.9313836179191242-.402710784450717*Qe,g:Le*-.8294889695615749+Ue*1.7626640603183465+.0236246858419436*Qe,b:Le*.0358458302437845-Ue*.0761723892680418+.9568845240076871*Qe},"p3");return _t!==void 0&&(wt.alpha=_t),wt},js=gs,Cl=lo(Li({},_r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:Le=>js(et(Le)),xyz65:js},toMode:{rgb:Le=>qt(zo(Le)),xyz65:zo}}),zl=Cl,Kl=Le=>{let Ue=Math.abs(Le);return Ue>=1/512?Math.sign(Le)*Math.pow(Ue,1/1.8):16*Le},Gu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"prophoto",r:Kl(Le*1.3457868816471585-Ue*.2555720873797946-.0511018649755453*Qe),g:Kl(Le*-.5446307051249019+Ue*1.5082477428451466+.0205274474364214*Qe),b:Kl(Le*0+Ue*0+1.2119675456389452*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},xl=Gu,Hu=(Le=0)=>{let Ue=Math.abs(Le);return Ue>=16/512?Math.sign(Le)*Math.pow(Ue,1.8):Le/16},Su=Le=>{let Ue=Hu(Le.r),Qe=Hu(Le.g),_t=Hu(Le.b),wt={mode:"xyz50",x:.7977666449006423*Ue+.1351812974005331*Qe+.0313477341283922*_t,y:.2880748288194013*Ue+.7118352342418731*Qe+899369387256e-16*_t,z:0*Ue+0*Qe+.8251046025104602*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},mc=Su,Jc=lo(Li({},_r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:xl,rgb:Le=>xl(rc(Le))},toMode:{xyz50:mc,rgb:Le=>Tu(mc(Le))}}),oc=Jc,du=1.09929682680944,Jl=.018053968510807,Ql=Le=>{let Ue=Math.abs(Le);return Ue>Jl?(Math.sign(Le)||1)*(du*Math.pow(Ue,.45)-(du-1)):4.5*Le},Eu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rec2020",r:Ql(Le*1.7166511879712683-Ue*.3556707837763925-.2533662813736599*Qe),g:Ql(Le*-.6666843518324893+Ue*1.6164812366349395+.0157685458139111*Qe),b:Ql(Le*.0176398574453108-Ue*.0427706132578085+.9421031212354739*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},bf=Eu,lh=1.09929682680944,Pc=.018053968510807,Ks=(Le=0)=>{let Ue=Math.abs(Le);return Ue{let Ue=Ks(Le.r),Qe=Ks(Le.g),_t=Ks(Le.b),wt={mode:"xyz65",x:.6369580483012911*Ue+.1446169035862083*Qe+.1688809751641721*_t,y:.262700212011267*Ue+.6779980715188708*Qe+.059301716469862*_t,z:0*Ue+.0280726930490874*Qe+1.0609850577107909*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Wu=Bl,wf=lo(Li({},_r),{mode:"rec2020",fromMode:{xyz65:bf,rgb:Le=>bf(et(Le))},toMode:{xyz65:Wu,rgb:Le=>qt(Wu(Le))},parse:["rec2020"],serialize:"rec2020"}),Qc=wf,ku=.0037930732552754493,Ol=Math.cbrt(ku),Nl=Le=>Math.cbrt(Le)-Ol,fi=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt=Nl(.3*Ue+.622*Qe+.078*_t+ku),pr=Nl(.23*Ue+.692*Qe+.078*_t+ku),Gr=Nl(.2434226892454782*Ue+.2047674442449682*Qe+.5518098665095535*_t+ku),va={mode:"xyb",x:(Lt-pr)/2,y:(Lt+pr)/2,b:Gr-(Lt+pr)/2};return wt!==void 0&&(va.alpha=wt),va},eu=fi,$e=Le=>Math.pow(Le+Ol,3),nt=({x:Le,y:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=$e(Le+Ue)-ku,Lt=$e(Ue-Le)-ku,pr=$e(Qe+Ue)-ku,Gr=Pt({r:11.031566904639861*wt-9.866943908131562*Lt-.16462299650829934*pr,g:-3.2541473810744237*wt+4.418770377582723*Lt-.16462299650829934*pr,b:-3.6588512867136815*wt+2.7129230459360922*Lt+1.9459282407775895*pr});return _t!==void 0&&(Gr.alpha=_t),Gr},mt=nt,xt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:mt},fromMode:{rgb:eu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:At,y:At,b:At,alpha:{use:At,fixup:$t}}},Bt=xt,zt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Tu,lab:ac},fromMode:{rgb:rc,lab:tc},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},Wt=zt,Pr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz50",x:1.0479298208405488*Ue+.0229467933410191*Qe-.0501922295431356*_t,y:.0296278156881593*Ue+.990434484573249*Qe-.0170738250293851*_t,z:-.0092430581525912*Ue+.0150551448965779*Qe+.7518742899580008*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},Br=Pr,kr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz65",x:.9554734527042182*Ue-.0230985368742614*Qe+.0632593086610217*_t,y:-.0283697069632081*Ue+1.0099954580058226*Qe+.021041398966943*_t,z:.0123140016883199*Ue-.0205076964334779*Qe+1.3303659366080753*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},jr=kr,Jr={mode:"xyz65",toMode:{rgb:qt,xyz50:Br},fromMode:{rgb:et,xyz50:jr},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},la=Jr,xa=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"yiq",y:.29889531*Le+.58662247*Ue+.11448223*Qe,i:.59597799*Le-.2741761*Ue-.32180189*Qe,q:.21147017*Le-.52261711*Ue+.31114694*Qe};return _t!==void 0&&(wt.alpha=_t),wt},Ba=xa,an=({y:Le,i:Ue,q:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rgb",r:Le+.95608445*Ue+.6208885*Qe,g:Le-.27137664*Ue-.6486059*Qe,b:Le-1.10561724*Ue+1.70250126*Qe};return _t!==void 0&&(wt.alpha=_t),wt},Tn=an,ii={mode:"yiq",toMode:{rgb:Tn},fromMode:{rgb:Ba},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:At,i:At,q:At,alpha:{use:At,fixup:$t}}},Si=ii,oi=(Le,Ue)=>Math.round(Le*(Ue=Math.pow(10,Ue)))/Ue,Ji=(Le=4)=>Ue=>typeof Ue=="number"?oi(Ue,Le):Ue,Qi=Ji,Oo=Qi(2),Qo=Le=>Math.max(0,Math.min(1,Le||0)),vo=Le=>Math.round(Qo(Le)*255),ys=P("rgb"),ol=P("hsl"),jl=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return"#"+(1<<24|Ue<<16|Qe<<8|_t).toString(16).slice(1)},Hs=Le=>{if(Le===void 0)return;let Ue=vo(Le.alpha!==void 0?Le.alpha:1);return jl(Le)+(256|Ue).toString(16).slice(1)},Cu=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return Le.alpha===void 0||Le.alpha===1?`rgb(${Ue}, ${Qe}, ${_t})`:`rgba(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},hi=Le=>{if(Le===void 0)return;let Ue=Oo(Le.h||0),Qe=Oo(Qo(Le.s)*100)+"%",_t=Oo(Qo(Le.l)*100)+"%";return Le.alpha===void 0||Le.alpha===1?`hsl(${Ue}, ${Qe}, ${_t})`:`hsla(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},wi=Le=>{let Ue=B(Le);if(!Ue)return;let Qe=se(Ue.mode);if(!Qe.serialize||typeof Qe.serialize=="string"){let _t=`color(${Qe.serialize||`--${Ue.mode}`} `;return Qe.channels.forEach((wt,Lt)=>{wt!=="alpha"&&(_t+=(Lt?" ":"")+(Ue[wt]!==void 0?Ue[wt]:"none"))}),Ue.alpha!==void 0&&Ue.alpha<1&&(_t+=` / ${Ue.alpha}`),_t+")"}if(typeof Qe.serialize=="function")return Qe.serialize(Ue)},sl=Le=>jl(ys(Le)),sc=Le=>Hs(ys(Le)),tu=Le=>Cu(ys(Le)),Ps=Le=>hi(ol(Le)),gc={normal:(Le,Ue)=>Ue,multiply:(Le,Ue)=>Le*Ue,screen:(Le,Ue)=>Le+Ue-Le*Ue,"hard-light":(Le,Ue)=>Ue<.5?Le*2*Ue:2*Ue*(1-Le)-1,overlay:(Le,Ue)=>Le<.5?Ue*2*Le:2*Le*(1-Ue)-1,darken:(Le,Ue)=>Math.min(Le,Ue),lighten:(Le,Ue)=>Math.max(Le,Ue),"color-dodge":(Le,Ue)=>Le===0?0:Ue===1?1:Math.min(1,Le/(1-Ue)),"color-burn":(Le,Ue)=>Le===1?1:Ue===0?0:1-Math.min(1,(1-Le)/Ue),"soft-light":(Le,Ue)=>Ue<.5?Le-(1-2*Ue)*Le*(1-Le):Le+(2*Ue-1)*((Le<.25?((16*Le-12)*Le+4)*Le:Math.sqrt(Le))-Le),difference:(Le,Ue)=>Math.abs(Le-Ue),exclusion:(Le,Ue)=>Le+Ue-2*Le*Ue},pu=(Le,Ue="normal",Qe="rgb")=>{let _t=typeof Ue=="function"?Ue:gc[Ue],wt=P(Qe),Lt=se(Qe).channels;return Le.map(Gr=>{let va=wt(Gr);return va.alpha===void 0&&(va.alpha=1),va}).reduce((Gr,va)=>{if(Gr===void 0)return va;let Qa=va.alpha+Gr.alpha*(1-va.alpha);return Lt.reduce((Ga,Ua)=>(Ua!=="alpha"&&(Qa===0?Ga[Ua]=0:(Ga[Ua]=va.alpha*(1-Gr.alpha)*va[Ua]+va.alpha*Gr.alpha*_t(Gr[Ua],va[Ua])+(1-va.alpha)*Gr.alpha*Gr[Ua],Ga[Ua]=Math.max(0,Math.min(1,Ga[Ua]/Qa)))),Ga),{mode:Qe,alpha:Qa})})},ll=pu,ef=([Le,Ue])=>Le+Math.random()*(Ue-Le),de=Le=>Object.keys(Le).reduce((Ue,Qe)=>{let _t=Le[Qe];return Ue[Qe]=Array.isArray(_t)?_t:[_t,_t],Ue},{}),Ee=(Le="rgb",Ue={})=>{let Qe=se(Le),_t=de(Ue);return Qe.channels.reduce((wt,Lt)=>((_t.alpha||Lt!=="alpha")&&(wt[Lt]=ef(_t[Lt]||Qe.ranges[Lt])),wt),{mode:Le})},qe=Ee,tt=(Le,Ue="rgb",Qe=!1)=>{let _t=Ue?se(Ue).channels:null,wt=Ue?P(Ue):B;return Lt=>{let pr=wt(Lt);if(!pr)return;let Gr=(_t||se(pr.mode).channels).reduce((Qa,Ga)=>{let Ua=Le(pr[Ga],Ga,pr,Ue);return Ua!==void 0&&!isNaN(Ua)&&(Qa[Ga]=Ua),Qa},{mode:pr.mode});if(!Qe)return Gr;let va=B(Lt);return va&&va.mode!==Gr.mode?P(va.mode)(Gr):Gr}},at=(Le,Ue,Qe)=>Ue!=="alpha"?(Le||0)*(Qe.alpha!==void 0?Qe.alpha:1):Le,ct=(Le,Ue,Qe)=>Ue!=="alpha"&&Qe.alpha!==0?(Le||0)/(Qe.alpha!==void 0?Qe.alpha:1):Le,Nt=(Le=1,Ue=0)=>(Qe,_t)=>_t!=="alpha"?Qe*Le+Ue:Qe,St=(Le=1,Ue=1,Qe=0)=>(_t,wt)=>wt!=="alpha"?Le*Math.pow(_t,Ue)+Qe:_t,Jt=Le=>{Le[0]===void 0&&(Le[0]=0),Le[Le.length-1]===void 0&&(Le[Le.length-1]=1);let Ue=1,Qe,_t,wt,Lt;for(;UeUe=>Le<=0?1:Le>=1?0:Math.pow(Ue,Math.log(.5)/Math.log(Le)),Hr=gr,Vr=Le=>typeof Le=="function",ca=Le=>Le&&typeof Le=="object",Aa=Le=>typeof Le=="number",Xr=(Le,Ue="rgb",Qe,_t)=>{let wt=se(Ue),Lt=P(Ue),pr=[],Gr=[],va={};Le.forEach(Mn=>{Array.isArray(Mn)?(pr.push(Lt(Mn[0])),Gr.push(Mn[1])):Aa(Mn)||Vr(Mn)?va[Gr.length]=Mn:(pr.push(Lt(Mn)),Gr.push(void 0))}),mr(Gr);let Qa=wt.channels.reduce((Mn,dn)=>{let _n;return ca(Qe)&&ca(Qe[dn])&&Qe[dn].fixup?_n=Qe[dn].fixup:ca(wt.interpolate[dn])&&wt.interpolate[dn].fixup?_n=wt.interpolate[dn].fixup:_n=Sn=>Sn,Mn[dn]=_n(pr.map(Sn=>Sn[dn])),Mn},{});if(_t){let Mn=pr.map((dn,_n)=>wt.channels.reduce((Sn,Bn)=>(Sn[Bn]=Qa[Bn][_n],Sn),{mode:Ue}));Qa=wt.channels.reduce((dn,_n)=>(dn[_n]=Mn.map(Sn=>{let Bn=_t(Sn[_n],_n,Sn,Ue);return isNaN(Bn)?void 0:Bn}),dn),{})}let Ga=wt.channels.reduce((Mn,dn)=>{let _n;return Vr(Qe)?_n=Qe:ca(Qe)&&Vr(Qe[dn])?_n=Qe[dn]:ca(Qe)&&ca(Qe[dn])&&Qe[dn].use?_n=Qe[dn].use:Vr(wt.interpolate[dn])?_n=wt.interpolate[dn]:ca(wt.interpolate[dn])&&(_n=wt.interpolate[dn].use),Mn[dn]=_n(Qa[dn]),Mn},{}),Ua=pr.length-1;return Mn=>{if(Mn=Math.min(Math.max(0,Mn),1),Mn<=Gr[0])return pr[0];if(Mn>Gr[Ua])return pr[Ua];let dn=0;for(;Gr[dn]{let ls=Ga[As](Ci);return ls!==void 0&&(qo[As]=ls),qo},{mode:Ue})}},oa=(Le,Ue="rgb",Qe)=>Xr(Le,Ue,Qe),fa=(Le,Ue)=>(Qe,_t="rgb",wt)=>{let Lt=Ue?tt(Ue,_t):void 0,pr=Xr(Qe,_t,wt,Le);return Lt?Gr=>Lt(pr(Gr)):pr},Ea=fa(at,ct),Ma=(Le,Ue)=>(Le+Ue)%Ue,sa=(Le,Ue,Qe,_t,wt)=>{let Lt=wt*wt,pr=Lt*wt;return((1-3*wt+3*Lt-pr)*Le+(4-6*Lt+3*pr)*Ue+(1+3*wt+3*Lt-3*pr)*Qe+pr*_t)/6},hn=Le=>Ue=>{let Qe=Le.length-1,_t=Ue>=1?Qe-1:Math.max(0,Math.floor(Ue*Qe));return sa(_t>0?Le[_t-1]:2*Le[_t]-Le[_t+1],Le[_t],Le[_t+1],_tUe=>{let Qe=Le.length-1,_t=Math.floor(Ue*Qe);return sa(Le[Ma(_t-1,Le.length)],Le[Ma(_t,Le.length)],Le[Ma(_t+1,Le.length)],Le[Ma(_t+2,Le.length)],(Ue-_t/Qe)*Qe)},zn=Le=>{let Ue,Qe=Le.length-1,_t=new Array(Qe),wt=new Array(Qe),Lt=new Array(Qe);for(_t[1]=1/4,wt[1]=(6*Le[1]-Le[0])/4,Ue=2;Ue0&&(Lt[Qe-1]=wt[Qe-1]),Ue=Qe-2;Ue>0;--Ue)Lt[Ue]=wt[Ue]-_t[Ue]*Lt[Ue+1];return Lt},$n=Le=>hn(zn(Le)),xi=Le=>An(zn(Le)),di=Math.sign,uo=Math.min,pe=Math.abs,y=Le=>{let Ue=Le.length-1,Qe=[],_t=[],wt=[];for(let Lt=0;Lt0?.5*(Le[Lt+1]-Le[Lt-1])*Ue:void 0),wt.push(Lt>0?(di(Qe[Lt-1])+di(Qe[Lt]))*uo(pe(Qe[Lt-1]),pe(Qe[Lt]),.5*pe(_t[Lt])):void 0);return[Qe,_t,wt]},N=(Le,Ue,Qe)=>{let _t=Le.length-1,wt=_t*_t;return Lt=>{let pr;Lt>=1?pr=_t-1:pr=Math.max(0,Math.floor(Lt*_t));let Gr=Lt-pr/_t,va=Gr*Gr,Qa=va*Gr;return(Ue[pr]+Ue[pr+1]-2*Qe[pr])*wt*Qa+(3*Qe[pr]-2*Ue[pr]-Ue[pr+1])*_t*va+Ue[pr]*Gr+Le[pr]}},ie=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,,_t]=y(Le);return _t[0]=Qe[0],_t[Ue]=Qe[Ue-1],N(Le,_t,Qe)},fe=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,_t,wt]=y(Le);return _t[0]=(Le[1]*2-Le[0]*1.5-Le[2]*.5)*Ue,_t[Ue]=(Le[Ue]*1.5-Le[Ue-1]*2+Le[Ue-2]*.5)*Ue,wt[0]=_t[0]*Qe[0]<=0?0:pe(_t[0])>2*pe(Qe[0])?2*Qe[0]:_t[0],wt[Ue]=_t[Ue]*Qe[Ue-1]<=0?0:pe(_t[Ue])>2*pe(Qe[Ue-1])?2*Qe[Ue-1]:_t[Ue],N(Le,wt,Qe)},be=Le=>{let Ue=Le.length-1,[Qe,_t,wt]=y(Le);_t[0]=.5*(Le[1]-Le[Ue])*Ue,_t[Ue]=.5*(Le[0]-Le[Ue-1])*Ue;let Lt=(Le[0]-Le[Ue])*Ue,pr=Lt;return wt[0]=(di(Lt)+di(Qe[0]))*uo(pe(Lt),pe(Qe[0]),.5*pe(_t[0])),wt[Ue]=(di(Qe[Ue-1])+di(pr))*uo(pe(Qe[Ue-1]),pe(pr),.5*pe(_t[Ue])),N(Le,wt,Qe)},Re=(Le=1)=>Le===1?Ue=>Ue:Ue=>Math.pow(Ue,Le),je=Re,Ze=(Le=2,Ue=1)=>{let Qe=je(Ue);if(Le<2)return Le<1?[]:[Qe(.5)];let _t=[];for(let wt=0;wt{let Ue={mode:Le.mode,r:Math.max(0,Math.min(Le.r!==void 0?Le.r:0,1)),g:Math.max(0,Math.min(Le.g!==void 0?Le.g:0,1)),b:Math.max(0,Math.min(Le.b!==void 0?Le.b:0,1))};return Le.alpha!==void 0&&(Ue.alpha=Le.alpha),Ue},Gt=Le=>Dt(ft(Le)),Kt=Le=>Le!==void 0&&(Le.r===void 0||Le.r>=0&&Le.r<=1)&&(Le.g===void 0||Le.g>=0&&Le.g<=1)&&(Le.b===void 0||Le.b>=0&&Le.b<=1);function st(Le){return Kt(ft(Le))}function It(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return _t=>!0;let Qe=P(typeof Ue=="string"?Ue:Le);return _t=>Kt(Qe(_t))}function Ut(Le){return Le=B(Le),Le===void 0||st(Le)?Le:P(Le.mode)(Gt(Le))}function ir(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return Lt=>B(Lt);let Qe=typeof Ue=="string"?Ue:Le,_t=P(Qe),wt=It(Qe);return Lt=>{let pr=B(Lt);if(!pr)return;let Gr=_t(pr);if(wt(Gr))return pr;let va=Dt(Gr);return pr.mode===va.mode?va:P(pr.mode)(va)}}function dr(Le,Ue="lch",Qe="rgb"){Le=B(Le);let _t=Qe==="rgb"?st:It(Qe),wt=Qe==="rgb"?Gt:ir(Qe);if(Le===void 0||_t(Le))return Le;let Lt=P(Le.mode);Le=P(Ue)(Le);let pr=lo(Li({},Le),{c:0});if(!_t(pr))return Lt(wt(pr));let Gr=0,va=Le.c!==void 0?Le.c:0,Qa=se(Ue).ranges.c,Ga=(Qa[1]-Qa[0])/Math.pow(2,13),Ua=pr.c;for(;va-Gr>Ga;)pr.c=Gr+(va-Gr)*.5,_t(pr)?(Ua=pr.c,Gr=pr.c):va=pr.c;return Lt(_t(pr)?pr:lo(Li({},pr),{c:Ua}))}function Ar(Le="rgb",Ue="oklch",Qe=Yn("oklch"),_t=.02){let wt=P(Le),Lt=se(Le);if(!Lt.gamut)return Ga=>wt(Ga);let pr=It(Le),Gr=ir(Le),va=P(Ue),{ranges:Qa}=se(Ue);if(!Qa.l||!Qa.c)throw new Error("LCH-like space expected");return Ga=>{if(Ga=B(Ga),Ga===void 0)return;let Ua=Li({},va(Ga));if(Ua.l===void 0&&(Ua.l=0),Ua.c===void 0&&(Ua.c=0),Ua.l>=Qa.l[1]){let Bn=lo(Li({},Lt.white),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(Ua.l<=Qa.l[0]){let Bn=lo(Li({},Lt.black),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(pr(Ua))return wt(Ua);let Mn=0,dn=Ua.c,_n=(Qa.c[1]-Qa.c[0])/4e3,Sn=Gr(Ua);for(;dn-Mn>_n;)Ua.c=(Mn+dn)*.5,Sn=Gr(Ua),pr(Ua)||Qe&&_t>0&&Qe(Ua,Sn)<=_t?Mn=Ua.c:dn=Ua.c;return wt(pr(Ua)?Ua:Sn)}}var hr=(Le,Ue=Yn(),Qe=_t=>_t)=>{let _t=Le.map((wt,Lt)=>({color:Qe(wt),i:Lt}));return(wt,Lt=1,pr=1/0)=>(isFinite(Lt)&&(Lt=Math.max(1,Math.min(Lt,_t.length-1))),_t.forEach(Gr=>{Gr.d=Ue(wt,Gr.color)}),_t.sort((Gr,va)=>Gr.d-va.d).slice(0,Lt).filter(Gr=>Gr.dLe[Gr.i]))},vr=hr,Or=Le=>Math.max(Le,0),Cr=Le=>Math.max(Math.min(Le,1),0),ta=(Le,Ue,Qe)=>Le===void 0||Ue===void 0?void 0:Le+Qe*(Ue-Le),ka=Le=>{let Ue=1-Cr(Le);return[.393+.607*Ue,.769-.769*Ue,.189-.189*Ue,0,.349-.349*Ue,.686+.314*Ue,.168-.168*Ue,0,.272-.272*Ue,.534-.534*Ue,.131+.869*Ue,0,0,0,0,1]},Ta=Le=>{let Ue=Or(Le);return[.213+.787*Ue,.715-.715*Ue,.072-.072*Ue,0,.213-.213*Ue,.715+.285*Ue,.072-.072*Ue,0,.213-.213*Ue,.715-.715*Ue,.072+.928*Ue,0,0,0,0,1]},Ra=Le=>{let Ue=1-Cr(Le);return[.2126+.7874*Ue,.7152-.7152*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152+.2848*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152-.7152*Ue,.0722+.9278*Ue,0,0,0,0,1]},ua=Le=>{let Ue=Math.PI*Le/180,Qe=Math.cos(Ue),_t=Math.sin(Ue);return[.213+Qe*.787-_t*.213,.715-Qe*.715-_t*.715,.072-Qe*.072+_t*.928,0,.213-Qe*.213+_t*.143,.715+Qe*.285+_t*.14,.072-Qe*.072-_t*.283,0,.213-Qe*.213-_t*.787,.715-Qe*.715+_t*.715,.072+Qe*.928+_t*.072,0,0,0,0,1]},ia=(Le,Ue,Qe=!1)=>{let _t=P(Ue),wt=se(Ue).channels;return Lt=>{let pr=_t(Lt);if(!pr)return;let Gr={mode:Ue},va,Qa=wt.length;for(let Ua=0;Ua{let Qe=Or(Le);return tt(Nt(Qe),Ue,!0)},da=(Le=1,Ue="rgb")=>{let Qe=Or(Le);return tt(Nt(Qe,(1-Qe)/2),Ue,!0)},Fa=(Le=1,Ue="rgb")=>ia(ka(Le),Ue,!0),za=(Le=1,Ue="rgb")=>ia(Ta(Le),Ue,!0),Cn=(Le=1,Ue="rgb")=>ia(Ra(Le),Ue,!0),Dn=(Le=1,Ue="rgb")=>{let Qe=Cr(Le);return tt((_t,wt)=>wt==="alpha"?_t:ta(Qe,1-Qe,_t),Ue,!0)},ui=(Le=0,Ue="rgb")=>ia(ua(Le),Ue,!0),cn=P("rgb"),sn=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],ei=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],Pn=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],Rn=(Le,Ue)=>{let Qe=Math.max(0,Math.min(1,Ue)),_t=Math.round(Qe/.1),wt=Math.round(Qe%.1),Lt=Le[_t];if(wt>0&&_tBe(Lt[va],pr[va],wt))}return pr=>{let Gr=B(pr);if(Gr===void 0)return;let{r:va,g:Qa,b:Ga}=cn(Gr),Ua={mode:"rgb",r:Lt[0]*va+Lt[1]*Qa+Lt[2]*Ga,g:Lt[3]*va+Lt[4]*Qa+Lt[5]*Ga,b:Lt[6]*va+Lt[7]*Qa+Lt[8]*Ga};return Gr.alpha!==void 0&&(Ua.alpha=Gr.alpha),P(Gr.mode)(Ua)}},In=(Le=1)=>Rn(sn,Le),Jn=(Le=1)=>Rn(ei,Le),Ei=(Le=1)=>Rn(Pn,Le),so=Le=>Le*Le*(3-2*Le),ti=Le=>.5-Math.sin(Math.asin(1-2*Le)/3),bi=Le=>Le*Le*Le*(Le*(Le*6-15)+10),Wi=bi,ro=Le=>(1-Math.cos(Le*Math.PI))/2,Mo=ro;function zs(Le){let Ue=P("lrgb")(Le);return .2126*Ue.r+.7152*Ue.g+.0722*Ue.b}function Bs(Le,Ue){let Qe=zs(Le),_t=zs(Ue);return(Math.max(Qe,_t)+.05)/(Math.min(Qe,_t)+.05)}var So=ne(Ht),Ws=ne(Dr),Zo=ne(go),es=ne(Ao),$o=ne(to),_s=ne(Vs),Go=ne(Pi),Ys=ne(dl),Ll=ne(bc),mo=ne(Qu),ru=ne(ju),Rs=ne(Sl),Yu=ne(oh),Ul=ne(nl),ql=ne(Kc),fo=ne(kl),Xo=ne(Cc),Os=ne(vc),ra=ne(ri),Ya=ne(Zi),Ka=ne(Yo),Bi=ne(ns),rs=ne(zl),Is=ne(oc),Oi=ne(Qc),Wr=ne(_r),na=ne(Bt),pa=ne(Wt),Wa=ne(la),ln=ne(Si)}}),av=ze({"src/plot_api/plot_config.js"(J,V){"use strict";var p={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},b={};function E(k,l){for(var e in k){var t=k[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),E(t,l[e]))}}E(p,b),V.exports={configAttributes:p,dfltConfig:b}}}),Pw=ze({"src/lib/notifier.js"(J,V){"use strict";var p=ci(),b=ao(),E=[];V.exports=function(k,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||E.indexOf(k)!==-1)return;E.push(k);var n=1e3;b(l)?n=l:l==="long"&&(n=3e3);var r=p.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(E);function o(s){s.duration(700).style("opacity",0).each("end",function(c){var m=E.indexOf(c);m!==-1&&E.splice(m,1),p.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=p.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(o)});for(var m=c.append("p"),h=s.split(//g),v=0;v1){var l=["LOG:"];for(k=0;k1){var e=[];for(k=0;k"),"long")}},E.warn=function(){var k;if(p.logging>0){var l=["WARN:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}},E.error=function(){var k;if(p.logging>0){var l=["ERROR:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}}}}),fc=ze({"src/components/color/attributes.js"(J){"use strict";J.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],J.defaultLine="#444",J.lightLine="#eee",J.background="#fff",J.borderLine="#BEC8D9",J.lightFraction=100*10/11}}),Qn=ze({"src/components/color/index.js"(J,V){"use strict";var{converter:p,formatHex:b,formatRgb:E,wcagContrast:k,wcagLuminance:l}=UR(),{isArrayOrTypedArray:e}=Ff(),{warn:t}=ap(),{background:n,defaultLine:r,defaults:a,lightLine:o}=fc(),s=p("rgb"),c=p("hsl"),m=q=>{if(typeof q!="string")return;let Z=q.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(Z))try{return s(Z)}catch{return}},h=q=>q>0?q>1?1:q:0,v={mode:"rgb",r:0,g:0,b:0,alpha:1},g=q=>Math.round(q*255e6)/255e6,i=q=>lo(Li({},q),{r:g(q.r),g:g(q.g),b:g(q.b)}),w=q=>E(i(q)),S=q=>b(i(q)),M=(q,Z)=>{var ee;let ae=m(q);return ae?((ee=ae.alpha)!=null||(ae.alpha=1),ae):(!Z&&q!=null&&t(`Invalid color specifier: "${q}". Defaulting to "#000"`),v)},C=q=>w(lo(Li({},M(q)),{alpha:1})),_=q=>q?M(q).alpha:0,T=q=>e(q)&&q.length>2&&Number.isFinite(q[0])&&Number.isFinite(q[1])&&Number.isFinite(q[2]),f=q=>{let[Z,ee,ae,he]=q,xe=Math.max(Z,ee,ae)>1?1/255:1,we=he??1;return{mode:"rgb",r:Z*xe,g:ee*xe,b:ae*xe,alpha:we>1?we/255:we}},u=(q,Z)=>{let ee=T(q)?f(q):M(q,!0),ae=[h(ee.r),h(ee.g),h(ee.b),h(ee.alpha)];return Z==="uint8"||Z==="uint8_clamped"?Uint8Array.from(ae,he=>Math.round(he*255)):Z==="float32"?Float32Array.from(ae):Z==="float64"?Float64Array.from(ae):ae},A=(q,Z)=>w(lo(Li({},M(q)),{alpha:h(Z)})),x=(q,Z)=>{let ee=M(q),ae=ee.alpha;if(ae===1)return w(ee);let he=M(Z||n),xe=he.alpha,we=(Me,Se)=>(xe===1?Se:1-xe+Se*xe)*(1-ae)+Me*ae;return w({mode:"rgb",r:we(ee.r,he.r),g:we(ee.g,he.g),b:we(ee.b,he.b)})},z=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=(we,Me)=>ee*we+(1-ee)*Me;return w({mode:"rgb",r:xe(ae.r,he.r),g:xe(ae.g,he.g),b:xe(ae.b,he.b)})},I=(q,Z)=>{let ee=M(q),ae=c(ee)||{mode:"hsl",h:0,s:0,l:0};return w(s(lo(Li({},ae),{l:h((ae.l*100+Z)/100),alpha:ee.alpha})))},O=(q,Z)=>k(M(q),M(Z)),D=q=>O(q,n)>O(q,r),B=w(M(n)),F=w(M(r)),P=(q,Z,ee)=>(M(q).alpha!==1&&(q=x(q,n)),D(q)?Z?I(q,Z):B:ee?I(q,-ee):F),j=(q,Z)=>{q.style({stroke:C(Z),"stroke-opacity":M(Z).alpha})},U=(q,Z)=>{q.style({fill:C(Z),"fill-opacity":M(Z).alpha})},$=(q,Z)=>!!(q&&Z&&C(q)===C(Z)),Q=q=>m(q)!==void 0,re=(q,Z)=>{Z=Z===0?0:Z||10;let ee=M(q),ae=Z/100;return w(lo(Li({},ee),{r:h(ee.r+ae),g:h(ee.g+ae),b:h(ee.b+ae)}))},ne=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=ee/100,we=he.alpha-ae.alpha,Me=2*xe-1,Se=((Me*we===-1?Me:(Me+we)/(1+Me*we))+1)/2,Ie=1-Se,Ve=(Ge,ke)=>Ie*Ge+Se*ke;return w({mode:"rgb",r:Ve(ae.r,he.r),g:Ve(ae.g,he.g),b:Ve(ae.b,he.b),alpha:ae.alpha*(1-xe)+he.alpha*xe})},se=(q,Z=["#000","#fff"])=>{let ee,ae=-1/0;for(let he of Z){let xe=O(q,he);xe>ae&&(ae=xe,ee=w(M(he)))}return ee},G=q=>w(M(q)),X=q=>S(M(q)).toUpperCase(),K=q=>{let Z=M(q);return[h(Z.r)*255,h(Z.g)*255,h(Z.b)*255,h(Z.alpha)]},H=([q,Z,ee,ae])=>w({mode:"rgb",r:q/255,g:Z/255,b:ee/255,alpha:ae}),Y=q=>{let Z=M(q);return l({mode:"rgb",r:h(Z.r),g:h(Z.g),b:h(Z.b)})};V.exports={addOpacity:A,adjustLightness:I,background:n,brighten:re,combine:x,contrast:P,defaultLine:r,defaults:a,equals:$,fill:U,hexString:X,interpolate:z,isChannelArray:T,isDark:D,isValid:Q,lightLine:o,luminosity:Y,mix:ne,mostReadable:se,normalize:u,opacity:_,parse:M,rgb:C,rgbaArray:K,rgbaArrayToString:H,rgbaString:G,stroke:j,wcagContrast:O}}}),Bv=ze({"src/components/colorscale/scales.js"(J,V){"use strict";var p=Qn(),b={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},E=b.RdBu;function k(t,n){if(n||(n=E),!t)return n;function r(){try{t=b[t]||JSON.parse(t)}catch{t=n}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:n}function l(t){var n=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rqR});function qR(J,V="",p,b){let E=V+(p?"":"$"),k=b===!1?"":"^";return J==="xy"?new RegExp(k+"x"+n1+"y"+n1+E):new RegExp(k+J+n1+E)}var n1,Vm=zi({"src/lib/regex.ts"(){"use strict";n1="([2-9]|[1-9][0-9]+)?"}}),VR=ze({"src/lib/coerce.js"(J){"use strict";var V=ao(),p=Ki().extendFlat,b=ws(),E=Bv(),k=Qn(),l=np().DESELECTDIM,e=r1(),t=(Vm(),Po(Ov)).counter,n=(Um(),Po(zv)).modHalf,r=Ff().isArrayOrTypedArray,a=Ff().isTypedArraySpec,o=Ff().decodeTypedArraySpec;J.valObjectMeta={data_array:{coerceFunction:function(c,m,h){m.set(r(c)?c:a(c)?o(c):h)}},enumerated:{coerceFunction:function(c,m,h,v){v.coerceNumber&&(c=+c),v.values.indexOf(c)===-1?m.set(h):m.set(c)},validateFunction:function(c,m){m.coerceNumber&&(c=+c);for(var h=m.values,v=0;vi===!0||i===!1;g(c)||v.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(g)?m.set(c):m.set(h)}},number:{coerceFunction:function(c,m,h,v){a(c)&&(c=o(c)),!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},integer:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}a(c)&&(c=o(c)),c%1||!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},string:{coerceFunction:function(c,m,h,v){if(typeof c!="string"){var g=typeof c=="number";v.strict===!0||!g?m.set(h):m.set(String(c))}else v.noBlank&&!c?m.set(h):m.set(c)}},color:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),k.isValid(c)?m.set(c):m.set(h)}},colorlist:{coerceFunction:function(c,m,h){!Array.isArray(c)||!c.length?m.set(h):c.every(v=>k.isValid(v))?m.set(c):m.set(h)}},colorscale:{coerceFunction:function(c,m,h){m.set(E.get(c,h))}},angle:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),c==="auto"?m.set("auto"):V(c)?m.set(n(+c,360)):m.set(h)}},subplotid:{coerceFunction:function(c,m,h,v){var g=v.regex||t(h);let i=w=>typeof w=="string"&&g.test(w);i(c)||v.arrayOk&&r(c)&&c.length>0&&c.every(i)?m.set(c):m.set(h)},validateFunction:function(c,m){var h=m.dflt;return c===h?!0:typeof c!="string"?!1:!!t(h).test(c)}},flaglist:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}if(typeof c!="string"){m.set(h);return}for(var g=c.split("+"),i=0;iLi({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.texttemplateAttrs=({editType:k="calc",arrayOk:l}={},e={})=>Li({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.shapeTexttemplateAttrs=({editType:k="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:k}),J.templatefallbackAttrs=({editType:k="none"}={})=>({valType:"any",dflt:"-",editType:k})}}),Sx=ze({"src/components/shapes/label_texttemplate.js"(J,V){"use strict";function p(M,C){return C?C.d2l(M):M}function b(M,C){return C?C.l2d(M):M}function E(M){return M.x0}function k(M){return M.x1}function l(M){return M.y0}function e(M){return M.y1}function t(M){return M.x0shift||0}function n(M){return M.x1shift||0}function r(M){return M.y0shift||0}function a(M){return M.y1shift||0}function o(M,C){return p(M.x1,C)+n(M)-p(M.x0,C)-t(M)}function s(M,C,_){return p(M.y1,_)+a(M)-p(M.y0,_)-r(M)}function c(M,C){return Math.abs(o(M,C))}function m(M,C,_){return Math.abs(s(M,C,_))}function h(M,C,_){return M.type!=="line"?void 0:Math.sqrt(Math.pow(o(M,C),2)+Math.pow(s(M,C,_),2))}function v(M,C){return b((p(M.x1,C)+n(M)+p(M.x0,C)+t(M))/2,C)}function g(M,C,_){return b((p(M.y1,_)+a(M)+p(M.y0,_)+r(M))/2,_)}function i(M,C,_){return M.type!=="line"?void 0:s(M,C,_)/o(M,C)}var w=["x0","x1","y0","y1","dy","height","ycenter"],S=["x0","x1","y0","y1","dx","width","xcenter"];V.exports={x0:E,x1:k,y0:l,y1:e,slope:i,dx:o,dy:s,width:c,height:m,length:h,xcenter:v,ycenter:g,simpleXVariables:w,simpleYVariables:S}}}),yI=ze({"src/components/shapes/draw_newshape/attributes.js"(J,V){"use strict";var p=Al().overrideAll,b=ws(),E=Qs(),k=Uc().dash,l=Ki().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Sx();V.exports=p({newshape:{visible:l({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},b.legend,{}),legendgroup:l({},b.legendgroup,{}),legendgrouptitle:{text:l({},b.legendgrouptitle.text,{}),font:E({})},legendrank:l({},b.legendrank,{}),legendwidth:l({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},k,{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:l({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(n)}),texttemplatefallback:t({editType:"arraydraw"}),font:E({}),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")}}),_I=ze({"src/components/selections/draw_newselection/attributes.js"(J,V){"use strict";var p=Uc().dash,b=Ki().extendFlat;V.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:b({},p,{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"}}}}),Ex=ze({"src/plots/pad_attributes.js"(J,V){"use strict";V.exports=function(p){var b=p.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),Gm=ze({"src/plots/layout_attributes.js"(J,V){"use strict";var p=Qs(),b=o1(),E=fc(),k=yI(),l=_I(),e=Ex(),t=Ki().extendFlat,n=p({editType:"calc"});n.family.dflt='"Open Sans", verdana, arial, sans-serif',n.size.dflt=12,n.color.dflt=E.defaultLine,V.exports={font:n,title:{text:{valType:"string",editType:"layoutstyle"},font:p({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:p({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:t(e({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:E.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:E.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:E.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:k.newshape,activeshape:k.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},b.transition,{editType:"none"})}}}),xI=ze({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var J=document.createElement("style");J.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",J.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}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.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-globe .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='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-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='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%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:rgba(0,0,0,.05)}.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;white-space:nowrap}.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}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.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:rgba(0,0,0,.05)}.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}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@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),(pointer:coarse){.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(J)}})()}}),mi=ze({"src/registry.js"(J){"use strict";var V=ap(),p=Ax(),b=Rw(),E=i1().addStyleRule,k=Ki(),l=ws(),e=Gm(),t=k.extendFlat,n=k.extendDeepAll;J.modules={},J.allCategories={},J.allTypes=[],J.subplotsRegistry={},J.componentsRegistry={},J.layoutArrayContainers=[],J.layoutArrayRegexes=[],J.traceLayoutAttributes={},J.localeRegistry={},J.apiMethodRegistry={},J.collectableSubplotTypes=null,J.register=function(i){if(J.collectableSubplotTypes=null,i)i&&!Array.isArray(i)&&(i=[i]);else throw new Error("No argument passed to Plotly.register.");for(var w=0;w=i&&D<=w?D:l}if(typeof D!="string"&&typeof D!="number")return l;D=String(D);var U=v(B),$=D.charAt(0);U&&($==="G"||$==="g")&&(D=D.slice(1),B="");var Q=U&&B.slice(0,7)==="chinese",re=D.match(Q?m:c);if(!re)return l;var ne=re[1],se=re[3]||"1",G=Number(re[5]||1),X=Number(re[7]||0),K=Number(re[9]||0),H=Number(re[11]||0);if(U){if(ne.length===2)return l;ne=Number(ne);var Y;try{var q=o.getComponentMethod("calendars","getCal")(B);if(Q){var Z=se.charAt(se.length-1)==="i";se=parseInt(se,10),Y=q.newDate(ne,q.toMonthIndex(ne,se,Z),G)}else Y=q.newDate(ne,Number(se),G)}catch{return l}return Y?(Y.toJD()-a)*e+X*t+K*n+H*r:l}ne.length===2?ne=(Number(ne)+2e3-h)%100+h:ne=Number(ne),se-=1;var ee=new Date(Date.UTC(2e3,se,G,X,K));return ee.setUTCFullYear(ne),ee.getUTCMonth()!==se||ee.getUTCDate()!==G?l:ee.getTime()+H*r},i=J.MIN_MS=J.dateTime2ms("-9999"),w=J.MAX_MS=J.dateTime2ms("9999-12-31 23:59:59.9999"),J.isDateTime=function(D,B){return J.dateTime2ms(D,B)!==l};function S(D,B){return String(D+Math.pow(10,B)).slice(1)}var M=90*e,C=3*t,_=5*n;J.ms2DateTime=function(D,B,F){if(typeof D!="number"||!(D>=i&&D<=w))return l;B||(B=0);var P=Math.floor(E(D+.05,1)*10),j=Math.round(D-P/10),U,$,Q,re,ne,se;if(v(F)){var G=Math.floor(j/e)+a,X=Math.floor(E(D,e));try{U=o.getComponentMethod("calendars","getCal")(F).fromJD(G).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(j))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;$=B=i+e&&D<=w-e))return l;var B=Math.floor(E(D+.05,1)*10),F=new Date(Math.round(D-B/10)),P=V("%Y-%m-%d")(F),j=F.getHours(),U=F.getMinutes(),$=F.getSeconds(),Q=F.getUTCMilliseconds()*10+B;return T(P,j,U,$,Q)};function T(D,B,F,P,j){if((B||F||P||j)&&(D+=" "+S(B,2)+":"+S(F,2),(P||j)&&(D+=":"+S(P,2),j))){for(var U=4;j%10===0;)U-=1,j/=10;D+="."+S(j,U)}return D}J.cleanDate=function(D,B,F){if(D===l)return B;if(J.isJSDate(D)||typeof D=="number"&&isFinite(D)){if(v(F))return b.error("JS Dates and milliseconds are incompatible with world calendars",D),B;if(D=J.ms2DateTimeLocal(+D),!D&&B!==void 0)return B}else if(!J.isDateTime(D,F))return b.error("unrecognized date",D),B;return D};var f=/%\d?f/g,u=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function x(D,B,F,P){D=D.replace(f,function(U){var $=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed($).slice(2).replace(/0+$/,"")||"0";return Q});var j=new Date(Math.floor(B+.05));if(D=D.replace(u,function(){return A[F("%q")(j)]}),v(P))try{D=o.getComponentMethod("calendars","worldCalFmt")(D,B,P)}catch{return"Invalid"}return F(D)(j)}var z=[59,59.9,59.99,59.999,59.9999];function I(D,B){var F=E(D+.05,e),P=S(Math.floor(F/t),2)+":"+S(E(Math.floor(F/n),60),2);if(B!=="M"){p(B)||(B=0);var j=Math.min(E(D/r,60),z[B]),U=(100+j).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+U}return P}J.formatDate=function(D,B,F,P,j,U){if(j=v(j)&&j,!B)if(F==="y")B=U.year;else if(F==="m")B=U.month;else if(F==="d")B=U.dayMonth+` +`+U.year;else return I(D,F)+` +`+x(U.dayMonthYear,D,P,j);return x(B,D,P,j)};var O=3*e;J.incrementMonth=function(D,B,F){F=v(F)&&F;var P=E(D,e);if(D=Math.round(D-P),F)try{var j=Math.round(D/e)+a,U=o.getComponentMethod("calendars","getCal")(F),$=U.fromJD(j);return B%12?U.add($,B,"m"):U.add($,B/12,"y"),($.toJD()-a)*e+P}catch{b.error("invalid ms "+D+" in calendar "+F)}var Q=new Date(D+O);return Q.setUTCMonth(Q.getUTCMonth()+B)+P-O},J.findExactDates=function(D,B){for(var F=0,P=0,j=0,U=0,$,Q,re=v(B)&&o.getComponentMethod("calendars","getCal")(B),ne=0;ne1?(a[c-1]-a[0])/(c-1):1,v,g;for(h>=0?g=o?l:e:g=o?n:t,r+=h*k*(o?-1:1)*(h>=0?1:-1);s90&&p.log("Long binary search..."),s-1};function l(r,a){return ra}function n(r,a){return r>=a}J.sorterAsc=function(r,a){return r-a},J.sorterDes=function(r,a){return a-r},J.distinctVals=function(r){var a=r.slice();a.sort(J.sorterAsc);var o;for(o=a.length-1;o>-1&&a[o]===E;o--);for(var s=a[o]-a[0]||1,c=s/(o||1)/1e4,m=[],h,v=0;v<=o;v++){var g=a[v],i=g-h;h===void 0?(m.push(g),h=g):i>c&&(s=Math.min(s,i),m.push(g),h=g)}return{vals:m,minDiff:s}},J.roundUp=function(r,a,o){for(var s=0,c=a.length-1,m,h=0,v=o?0:1,g=o?1:0,i=o?Math.ceil:Math.floor;s0&&(s=1),o&&s)return r.sort(a)}return s?r:r.reverse()},J.findIndexOfMin=function(r,a){a=a||b;for(var o=1/0,s,c=0;czw});function wI(J){return Object.keys(J).sort()}var zw,Nv=zi({"src/lib/sort_object_keys.ts"(){"use strict";zw=wI}}),TI=ze({"src/lib/stats.js"(J){"use strict";var V=ao(),p=Ff().isArrayOrTypedArray;J.aggNums=function(b,E,k,l){var e,t;if((!l||l>k.length)&&(l=k.length),V(E)||(E=!1),p(k[0])){for(t=new Array(l),e=0;eb.length-1)return b[b.length-1];var k=E%1;return k*b[Math.ceil(E)]+(1-k)*b[Math.floor(E)]}}}),AI=ze({"src/lib/angles.js"(J,V){"use strict";var p=(Um(),Po(zv)),b=p.mod,E=p.modHalf,k=Math.PI,l=2*k;function e(g){return g/180*k}function t(g){return g/k*180}function n(g){return Math.abs(g[1]-g[0])>l-1e-14}function r(g,i){return E(i-g,l)}function a(g,i){return Math.abs(r(g,i))}function o(g,i){if(n(i))return!0;var w,S;i[0]S&&(S+=l);var M=b(g,l),C=M+l;return M>=w&&M<=S||C>=w&&C<=S}function s(g,i,w,S){if(!o(i,S))return!1;var M,C;return w[0]=M&&g<=C}function c(g,i,w,S,M,C,_){M=M||0,C=C||0;var T=n([w,S]),f,u,A,x,z;T?(f=0,u=k,A=l):w1/3&&p.x<2/3},J.isRightAnchor=function(p){return p.xanchor==="right"||p.xanchor==="auto"&&p.x>=2/3},J.isTopAnchor=function(p){return p.yanchor==="top"||p.yanchor==="auto"&&p.y>=2/3},J.isMiddleAnchor=function(p){return p.yanchor==="middle"||p.yanchor==="auto"&&p.y>1/3&&p.y<2/3},J.isBottomAnchor=function(p){return p.yanchor==="bottom"||p.yanchor==="auto"&&p.y<=1/3}}}),SI=ze({"src/lib/geometry2d.js"(J){"use strict";var V=(Um(),Po(zv)).mod;J.segmentsIntersect=p;function p(e,t,n,r,a,o,s,c){var m=n-e,h=a-e,v=s-a,g=r-t,i=o-t,w=c-o,S=m*w-v*g;if(S===0)return null;var M=(h*w-v*i)/S,C=(h*g-m*i)/S;return C<0||C>1||M<0||M>1?null:{x:e+m*M,y:t+g*M}}J.segmentDistance=function(t,n,r,a,o,s,c,m){if(p(t,n,r,a,o,s,c,m))return 0;var h=r-t,v=a-n,g=c-o,i=m-s,w=h*h+v*v,S=g*g+i*i,M=Math.min(b(h,v,w,o-t,s-n),b(h,v,w,c-t,m-n),b(g,i,S,t-o,n-s),b(g,i,S,r-o,a-s));return Math.sqrt(M)};function b(e,t,n,r,a){var o=r*e+a*t;if(o<0)return r*r+a*a;if(o>n){var s=r-e,c=a-t;return s*s+c*c}else{var m=r*t-a*e;return m*m/n}}var E,k,l;J.getTextLocation=function(t,n,r,a){if((t!==k||a!==l)&&(E={},k=t,l=a),E[r])return E[r];var o=t.getPointAtLength(V(r-a/2,n)),s=t.getPointAtLength(V(r+a/2,n)),c=Math.atan((s.y-o.y)/(s.x-o.x)),m=t.getPointAtLength(V(r,n)),h=(m.x*4+o.x+s.x)/6,v=(m.y*4+o.y+s.y)/6,g={x:h,y:v,theta:c};return E[r]=g,g},J.clearLocationCache=function(){k=null},J.getVisibleSegment=function(t,n,r){var a=n.left,o=n.right,s=n.top,c=n.bottom,m=0,h=t.getTotalLength(),v=h,g,i;function w(M){var C=t.getPointAtLength(M);M===0?g=C:M===h&&(i=C);var _=C.xo?C.x-o:0,T=C.yc?C.y-c:0;return Math.sqrt(_*_+T*T)}for(var S=w(m);S;){if(m+=S+r,m>v)return;S=w(m)}for(S=w(v);S;){if(v-=S+r,m>v)return;S=w(v)}return{min:m,max:v,len:v-m,total:h,isClosed:m===0&&v===h&&Math.abs(g.x-i.x)<.1&&Math.abs(g.y-i.y)<.1}},J.findPointOnPath=function(t,n,r,a){a=a||{};for(var o=a.pathLength||t.getTotalLength(),s=a.tolerance||.001,c=a.iterationLimit||30,m=t.getPointAtLength(0)[r]>t.getPointAtLength(o)[r]?-1:1,h=0,v=0,g=o,i,w,S;h0?g=i:v=i,h++}return w}}}),Cx=ze({"src/lib/throttle.js"(J){"use strict";var V={};J.throttle=function(E,k,l){var e=V[E],t=Date.now();if(!e){for(var n in V)V[n].tse.ts+k){r();return}e.timer=setTimeout(function(){r(),e.timer=null},k)},J.done=function(b){var E=V[b];return!E||!E.timer?Promise.resolve():new Promise(function(k){var l=E.onDone;E.onDone=function(){l&&l(),k(),E.onDone=null}})},J.clear=function(b){if(b)p(V[b]),delete V[b];else for(var E in V)J.clear(E)};function p(b){b&&b.timer!==null&&(clearTimeout(b.timer),b.timer=null)}}}),EI=ze({"src/lib/clear_responsive.js"(J,V){"use strict";V.exports=function(b){b._responsiveChartHandler&&(window.removeEventListener("resize",b._responsiveChartHandler),delete b._responsiveChartHandler)}}}),kI=ze({"node_modules/is-mobile/index.js"(J,V){"use strict";V.exports=k,V.exports.isMobile=k,V.exports.default=k;var p=/(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|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,b=/CrOS/,E=/android|ipad|playbook|silk/i;function k(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=p.test(e)&&!b.test(e)||!!l.tablet&&E.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),CI=ze({"src/lib/preserve_drawing_buffer.js"(J,V){"use strict";var p=ao(),b=kI();V.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=E(),typeof e!="string")return!0;var t=b({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var n=e.split(" "),r=1;r-1;o--){var s=n[o];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(p(c)&&(c=+c),c>=13)return!0}}}return t};function E(){var k;return typeof navigator<"u"&&(k=navigator.userAgent),k&&k.headers&&typeof k.headers["user-agent"]=="string"&&(k=k.headers["user-agent"]),k}}}),LI=ze({"src/lib/make_trace_groups.js"(J,V){"use strict";var p=ci();V.exports=function(E,k,l){var e=E.selectAll("g."+l.replace(/\s/g,".")).data(k,function(n){return n[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=E.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(n){n[0][t]=p.select(this)}),e}}}),PI=ze({"src/lib/localize.js"(J,V){"use strict";var p=mi();V.exports=function(E,k){for(var l=E._context.locale,e=0;e<2;e++){for(var t=E._context.locales,n=0;n<2;n++){var r=(t[l]||{}).dictionary;if(r){var a=r[k];if(a)return a}t=p.localeRegistry}var o=l.split("-")[0];if(o===l)break;l=o}return k}}}),Bw=ze({"src/lib/filter_unique.js"(J,V){"use strict";V.exports=function(b){for(var E={},k=[],l=0,e=0;e1?(k*b+k*E)/k:b+E,e=String(l).length;if(e>16){var t=String(E).length,n=String(b).length;if(e>=n+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),Ow={};bu(Ow,{default:()=>qw});function DI(J){return typeof J=="string"&&(J=J.replace(Uw,"")),(0,Nw.default)(J)?Number(J):jw.BADNUM}var Nw,jw,Uw,qw,FI=zi({"src/lib/clean_number.ts"(){"use strict";Nw=Yl(ao()),jw=Yl(No()),Uw=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,qw=DI}}),zI=ze({"src/lib/slugify.js"(J,V){"use strict";var p=/<[^>]*>/g,b=/[\p{S}\p{P}]/gu,E=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,k=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),a=60;function o(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}V.exports=function(c,m=a){var h=o(c??"").replace(k,"").replace(p," ").replace(b,v=>v===e?v:"").toLowerCase().trim().replace(l,e).replace(E,"").replace(n,e);return h.length<=m?h:Array.from(h).slice(0,m).join("").replace(r,"")}}}),Nr=ze({"src/lib/index.js"(J,V){"use strict";var p=ci(),b=jm().utcFormat,E=Cw().format,k=ao(),l=No(),e=l.FP_SAFE,t=-e,n=l.BADNUM,r=V.exports={};r.adjustFormat=function(q){if(!q||/^\d[.]\df/.test(q)||/[.]\d%/.test(q))return q;if(q==="0.f")return"~f";if(/^\d%/.test(q))return"~%";if(/^\ds/.test(q))return"~s";var Z=(q.match(/^[+\-( ]?/)||[""])[0],ee=q.slice(Z.length);return!/^[~,.0$#]/.test(ee)&&/[&fps]/.test(ee)?Z+"~"+ee:q};var a={};r.warnBadFormat=function(Y){var q=String(Y);a[q]||(a[q]=1,r.warn('encountered bad format: "'+q+'"'))},r.noFormat=function(Y){return String(Y)},r.numberFormat=function(Y){var q;try{q=E(r.adjustFormat(Y))}catch{return r.warnBadFormat(Y),r.noFormat}return q},r.nestedProperty=r1(),r.keyedContainer=zR(),r.relativeAttr=BR(),r.isPlainObject=tv(),r.toLogRange=Tx(),r.relinkPrivateKeys=OR();var o=Ff();r.isArrayBuffer=o.isArrayBuffer,r.isTypedArray=o.isTypedArray,r.isArrayOrTypedArray=o.isArrayOrTypedArray,r.isArray1D=o.isArray1D,r.ensureArray=o.ensureArray,r.concat=o.concat,r.maxRowLength=o.maxRowLength,r.minRowLength=o.minRowLength;var s=(Um(),Po(zv));r.mod=s.mod,r.modHalf=s.modHalf;var c=VR();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var m=bI();r.dateTime2ms=m.dateTime2ms,r.isDateTime=m.isDateTime,r.ms2DateTime=m.ms2DateTime,r.ms2DateTimeLocal=m.ms2DateTimeLocal,r.cleanDate=m.cleanDate,r.isJSDate=m.isJSDate,r.formatDate=m.formatDate,r.incrementMonth=m.incrementMonth,r.dateTick0=m.dateTick0,r.dfltRange=m.dfltRange,r.findExactDates=m.findExactDates,r.MIN_MS=m.MIN_MS,r.MAX_MS=m.MAX_MS;var h=kx();r.findBin=h.findBin,r.sorterAsc=h.sorterAsc,r.sorterDes=h.sorterDes,r.distinctVals=h.distinctVals,r.roundUp=h.roundUp,r.sort=h.sort,r.findIndexOfMin=h.findIndexOfMin,r.sortObjectKeys=(Nv(),Po(nv)).default;var v=TI();r.aggNums=v.aggNums,r.len=v.len,r.mean=v.mean,r.geometricMean=v.geometricMean,r.median=v.median,r.midRange=v.midRange,r.variance=v.variance,r.stdev=v.stdev,r.interp=v.interp;var g=Mx();r.init2dArray=g.init2dArray,r.transposeRagged=g.transposeRagged,r.dot=g.dot,r.translationMatrix=g.translationMatrix,r.rotationMatrix=g.rotationMatrix,r.rotationXYMatrix=g.rotationXYMatrix,r.apply3DTransform=g.apply3DTransform,r.apply2DTransform=g.apply2DTransform,r.apply2DTransform2=g.apply2DTransform2,r.convertCssMatrix=g.convertCssMatrix,r.inverseTransformMatrix=g.inverseTransformMatrix;var i=AI();r.deg2rad=i.deg2rad,r.rad2deg=i.rad2deg,r.angleDelta=i.angleDelta,r.angleDist=i.angleDist,r.isFullCircle=i.isFullCircle,r.isAngleInsideSector=i.isAngleInsideSector,r.isPtInsideSector=i.isPtInsideSector,r.pathArc=i.pathArc,r.pathSector=i.pathSector,r.pathAnnulus=i.pathAnnulus;var w=MI();r.isLeftAnchor=w.isLeftAnchor,r.isCenterAnchor=w.isCenterAnchor,r.isRightAnchor=w.isRightAnchor,r.isTopAnchor=w.isTopAnchor,r.isMiddleAnchor=w.isMiddleAnchor,r.isBottomAnchor=w.isBottomAnchor;var S=SI();r.segmentsIntersect=S.segmentsIntersect,r.segmentDistance=S.segmentDistance,r.getTextLocation=S.getTextLocation,r.clearLocationCache=S.clearLocationCache,r.getVisibleSegment=S.getVisibleSegment,r.findPointOnPath=S.findPointOnPath;var M=Ki();r.extendFlat=M.extendFlat,r.extendDeep=M.extendDeep,r.extendDeepAll=M.extendDeepAll,r.extendDeepNoArrays=M.extendDeepNoArrays;var C=ap();r.log=C.log,r.warn=C.warn,r.error=C.error;var _=(Vm(),Po(Ov));r.counterRegex=_.counter;var T=Cx();r.throttle=T.throttle,r.throttleDone=T.done,r.clearThrottle=T.clear;var f=i1();r.getGraphDiv=f.getGraphDiv,r.isPlotDiv=f.isPlotDiv,r.removeElement=f.removeElement,r.addStyleRule=f.addStyleRule,r.addRelatedStyleRule=f.addRelatedStyleRule,r.deleteRelatedStyleRule=f.deleteRelatedStyleRule,r.setStyleOnHover=f.setStyleOnHover,r.getFullTransformMatrix=f.getFullTransformMatrix,r.getElementTransformMatrix=f.getElementTransformMatrix,r.getElementAndAncestors=f.getElementAndAncestors,r.equalDomRects=f.equalDomRects,r.clearResponsive=EI(),r.preserveDrawingBuffer=CI(),r.makeTraceGroups=LI(),r._=PI(),r.notifier=Pw(),r.filterUnique=Bw(),r.filterVisible=RI(),r.pushUnique=Rw(),r.increment=II(),r.cleanNumber=(FI(),Po(Ow)).default,r.slugify=zI(),r.ensureNumber=function(q){return k(q)?(q=Number(q),q>e||q=q?!1:k(Y)&&Y>=0&&Y%1===0},r.noop=Ax(),r.identity=s1(),r.repeat=function(Y,q){for(var Z=new Array(q),ee=0;eeZ?Math.max(Z,Math.min(q,Y)):Math.max(q,Math.min(Z,Y))},r.bBoxIntersect=function(Y,q,Z){return Z=Z||0,Y.left<=q.right+Z&&q.left<=Y.right+Z&&Y.top<=q.bottom+Z&&q.top<=Y.bottom+Z},r.simpleMap=function(Y,q,Z,ee,ae){for(var he=Y.length,xe=new Array(he),we=0;we=Math.pow(2,Z)?ae>10?(r.warn("randstr failed uniqueness"),xe):Y(q,Z,ee,(ae||0)+1):xe},r.OptionControl=function(Y,q){Y||(Y={}),q||(q="opt");var Z={};return Z.optionList=[],Z._newoption=function(ee){ee[q]=Y,Z[ee.name]=ee,Z.optionList.push(ee)},Z["_"+q]=Y,Z},r.smooth=function(Y,q){if(q=Math.round(q)||0,q<2)return Y;var Z=Y.length,ee=2*Z,ae=2*q-1,he=new Array(ae),xe=new Array(Z),we,Me,Se,Ie;for(we=0;we=ee&&(Se-=ee*Math.floor(Se/ee)),Se<0?Se=-1-Se:Se>=Z&&(Se=ee-1-Se),Ie+=Y[Se]*he[Me];xe[we]=Ie}return xe},r.syncOrAsync=function(Y,q,Z){var ee,ae;function he(){return r.syncOrAsync(Y,q,Z)}for(;Y.length;)if(ae=Y.splice(0,1)[0],ee=ae(q),ee&&ee.then)return ee.then(he);return Z&&Z(q)},r.stripTrailingSlash=function(Y){return Y.slice(-1)==="/"?Y.slice(0,-1):Y},r.noneOrAll=function(Y,q,Z){if(Y){var ee=!1,ae=!0,he,xe;for(he=0;he0?ae:0})},r.fillArray=function(Y,q,Z,ee){if(ee=ee||r.identity,r.isArrayOrTypedArray(Y))for(var ae=0;aez.test(window.navigator.userAgent);var I=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var Y=I.exec(window.navigator.userAgent);if(Y&&Y.length===2){var q=parseInt(Y[1]);if(!isNaN(q))return q}return null},r.isD3Selection=function(Y){return Y instanceof p.selection},r.ensureSingle=function(Y,q,Z,ee){var ae=Y.select(q+(Z?"."+Z:""));if(ae.size())return ae;var he=Y.append(q);return Z&&he.classed(Z,!0),ee&&he.call(ee),he},r.ensureSingleById=function(Y,q,Z,ee){var ae=Y.select(q+"#"+Z);if(ae.size())return ae;var he=Y.append(q).attr("id",Z);return ee&&he.call(ee),he},r.objectFromPath=function(Y,q){for(var Z=Y.split("."),ee,ae=ee={},he=0;he1?ae+xe[1]:"";if(he&&(xe.length>1||we.length>4||Z))for(;ee.test(we);)we=we.replace(ee,"$1"+he+"$2");return we+Me},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;r.templateString=function(Y,q){var Z={};return Y.replace(r.TEMPLATE_STRING_REGEX,function(ee,ae){var he;return F.test(ae)?he=q[ae]:(Z[ae]=Z[ae]||r.nestedProperty(q,ae).get,he=Z[ae](!0)),he!==void 0?he:""})};var P={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=Y=>ne(lo(Li({},Y),{opts:P}));var j={max:10,count:0,name:"texttemplate"};r.texttemplateString=Y=>ne(lo(Li({},Y),{opts:j}));var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(Y){var q=Y.match(U);return q?{key:q[1],op:q[2],number:Number(q[3])}:{key:Y,op:null,number:null}}var Q={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=Y=>ne(lo(Li({},Y),{opts:Q}));var re=/^[:|\|]/;function ne({data:Y=[],locale:q,fallback:Z,labels:ee={},opts:ae,template:he}){return he.replace(r.TEMPLATE_STRING_REGEX,(xe,we,Me)=>{let Se=["xother","yother"].includes(we),Ie=["_xother","_yother"].includes(we),Ve=["_xother_","_yother_"].includes(we),Ge=["xother_","yother_"].includes(we),ke=Se||Ie||Ge||Ve;(Ie||Ve)&&(we=we.substring(1)),(Ge||Ve)&&(we=we.substring(0,we.length-1));let _e=null,ce=null;if(ae.parseMultDiv){var ve=$(we);we=ve.key,_e=ve.op,ce=ve.number}let le;if(ke){if(ee[we]===void 0)return"";le=ee[we]}else for(let Ye of Y)if(Ye){if(Ye.hasOwnProperty(we)){le=Ye[we];break}if(F.test(we)||(le=r.nestedProperty(Ye,we).get(!0)),le!==void 0)break}if(le===void 0){let{count:Ye,max:yt,name:gt}=ae,Tt=Z===!1?xe:Z;return Ye=se&&xe<=G,Se=we>=se&&we<=G;if(Me&&(ee=10*ee+xe-se),Se&&(ae=10*ae+we-se),!Me||!Se){if(ee!==ae)return ee-ae;if(xe!==we)return xe-we}}return ae-ee};var X=2e9;r.seedPseudoRandom=function(){X=2e9},r.pseudoRandom=function(){var Y=X;return X=(69069*X+1)%4294967296,Math.abs(X-Y)<429496729?r.pseudoRandom():X/4294967296},r.fillText=function(Y,q,Z){var ee=Array.isArray(Z)?function(xe){Z.push(xe)}:function(xe){Z.text=xe},ae=r.extractOption(Y,q,"htx","hovertext");if(r.isValidTextValue(ae))return ee(ae);var he=r.extractOption(Y,q,"tx","text");if(r.isValidTextValue(he))return ee(he)},r.isValidTextValue=function(Y){return Y||Y===0},r.formatPercent=function(Y,q){q=q||0;for(var Z=(Math.round(100*Y*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ee=0;ee1&&(Se=1):Se=0,r.strTranslate(ae-Se*(Z+xe),he-Se*(ee+we))+r.strScale(Se)+(Me?"rotate("+Me+(q?"":" "+Z+" "+ee)+")":"")},r.setTransormAndDisplay=function(Y,q){Y.attr("transform",r.getTextTransform(q)),Y.style("display",q.scale?null:"none")},r.ensureUniformFontSize=function(Y,q){var Z=r.extendFlat({},q);return Z.size=Math.max(q.size,Y._fullLayout.uniformtext.minsize||0),Z},r.join2=function(Y,q,Z){var ee=Y.length;return ee>1?Y.slice(0,-1).join(q)+Z+Y[ee-1]:Y.join(q)},r.bigFont=function(Y){return Math.round(1.2*Y)};var K=r.getFirefoxVersion(),H=K!==null&&K<86;r.getPositionFromD3Event=function(){return H?[p.event.layerX,p.event.layerY]:[p.event.offsetX,p.event.offsetY]}}}),BI=ze({"build/plotcss.js"(){"use strict";var J=Nr(),V={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(b in V)p=b.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),J.addStyleRule(p,V[b]);var p,b}}),Vw=ze({"node_modules/is-browser/client.js"(J,V){V.exports=!0}}),Gw=ze({"node_modules/has-hover/index.js"(J,V){"use strict";var p=Vw(),b;typeof window.matchMedia=="function"?b=!window.matchMedia("(hover: none)").matches:b=p,V.exports=b}}),jv=ze({"node_modules/events/events.js"(J,V){"use strict";var p=typeof Reflect=="object"?Reflect:null,b=p&&typeof p.apply=="function"?p.apply:function(C,_,T){return Function.prototype.apply.call(C,_,T)},E;p&&typeof p.ownKeys=="function"?E=p.ownKeys:Object.getOwnPropertySymbols?E=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:E=function(C){return Object.getOwnPropertyNames(C)};function k(M){console&&console.warn&&console.warn(M)}var l=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}V.exports=e,V.exports.once=i,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function n(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(M){if(typeof M!="number"||M<0||l(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");t=M}}),e.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},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||l(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function r(M){return M._maxListeners===void 0?e.defaultMaxListeners:M._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(C){for(var _=[],T=1;T0&&(A=_[0]),A instanceof Error)throw A;var x=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw x.context=A,x}var z=u[C];if(z===void 0)return!1;if(typeof z=="function")b(z,this,_);else for(var I=z.length,O=h(z,I),T=0;T0&&A.length>f&&!A.warned){A.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=M,x.type=C,x.count=A.length,k(x)}return M}e.prototype.addListener=function(C,_){return a(this,C,_,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,_){return a(this,C,_,!0)};function o(){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(M,C,_){var T={fired:!1,wrapFn:void 0,target:M,type:C,listener:_},f=o.bind(T);return f.listener=_,T.wrapFn=f,f}e.prototype.once=function(C,_){return n(_),this.on(C,s(this,C,_)),this},e.prototype.prependOnceListener=function(C,_){return n(_),this.prependListener(C,s(this,C,_)),this},e.prototype.removeListener=function(C,_){var T,f,u,A,x;if(n(_),f=this._events,f===void 0)return this;if(T=f[C],T===void 0)return this;if(T===_||T.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete f[C],f.removeListener&&this.emit("removeListener",C,T.listener||_));else if(typeof T!="function"){for(u=-1,A=T.length-1;A>=0;A--)if(T[A]===_||T[A].listener===_){x=T[A].listener,u=A;break}if(u<0)return this;u===0?T.shift():v(T,u),T.length===1&&(f[C]=T[0]),f.removeListener!==void 0&&this.emit("removeListener",C,x||_)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var _,T,f;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[C]),this;if(arguments.length===0){var u=Object.keys(T),A;for(f=0;f=0;f--)this.removeListener(C,_[f]);return this};function c(M,C,_){var T=M._events;if(T===void 0)return[];var f=T[C];return f===void 0?[]:typeof f=="function"?_?[f.listener||f]:[f]:_?g(f):h(f,f.length)}e.prototype.listeners=function(C){return c(this,C,!0)},e.prototype.rawListeners=function(C){return c(this,C,!1)},e.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):m.call(M,C)},e.prototype.listenerCount=m;function m(M){var C=this._events;if(C!==void 0){var _=C[M];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function h(M,C){for(var _=new Array(C),T=0;T{},{passive:!0}),E},triggerHandler:function(E,k,l){var e,t=E._ev;if(!t)return;var n=t._events[k];if(!n)return;function r(o){if(o.listener){if(t.removeListener(k,o.listener),!o.fired)return o.fired=!0,o.listener.apply(t,[l])}else return o.apply(t,[l])}n=Array.isArray(n)?n:[n];var a;for(a=0;ab.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},k.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},k.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},k.undo=function(e){var t,n;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=P.length)return!1;if(I.dimensions===2){if(D++,O.length===D)return I;var j=O[D];if(!S(j))return!1;I=P[F][j]}else I=P[F]}else I=P}}return I}function S(I){return I===Math.round(I)&&I>=0}function M(I){var O,D;O=V.modules[I]._module,D=O.basePlotModule;var B={};B.type=null;var F=n({},b),P=n({},O.attributes);J.crawl(P,function($,Q,re,ne,se){o(F,se).set(void 0),$===void 0&&o(P,se).set(void 0)}),n(B,F),V.traceIs(I,"noOpacity")&&delete B.opacity,V.traceIs(I,"showLegend")||(delete B.showlegend,delete B.legendgroup),V.traceIs(I,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),O.selectPoints||delete B.selectedpoints,n(B,P),D.attributes&&n(B,D.attributes),B.type=I;var j={meta:O.meta||{},categories:O.categories||{},animatable:!!O.animatable,type:I,attributes:T(B)};if(O.layoutAttributes){var U={};n(U,O.layoutAttributes),j.layoutAttributes=T(U)}return O.animatable||J.crawl(j,function($){J.isValObject($)&&"anim"in $&&delete $.anim}),j}function C(){var I={},O,D;n(I,E);for(O in V.subplotsRegistry)if(D=V.subplotsRegistry[O],!!D.layoutAttributes)if(Array.isArray(D.attr))for(var B=0;B=r&&(n._input||{})._templateitemname;o&&(a=r);var s=t+"["+a+"]",c;function m(){c={},o&&(c[s]={},c[s][b]=o)}m();function h(w,S){c[w]=S}function v(w,S){o?V.nestedProperty(c[s],w).set(S):c[s+"."+w]=S}function g(){var w=c;return m(),w}function i(w,S){w&&v(w,S);var M=g();for(var C in M)V.nestedProperty(e,C).set(M[C])}return{modifyBase:h,modifyItem:v,getUpdateObj:g,applyUpdate:i}}}}),hc=ze({"src/plots/cartesian/constants.js"(J,V){"use strict";var p=(Vm(),Po(Ov)).counter;V.exports={idRegex:{x:p("x","( domain)?"),y:p("y","( domain)?")},attrRegex:p("[xy]axis"),xAxisMatch:p("xaxis"),yAxisMatch:p("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"}}}),Xl=ze({"src/plots/cartesian/axis_ids.js"(J){"use strict";var V=mi(),p=hc();J.id2name=function(k){if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))){var l=k.split(" ")[0].slice(1);return l==="1"&&(l=""),k.charAt(0)+"axis"+l}},J.name2id=function(k){if(k.match(p.AX_NAME_PATTERN)){var l=k.slice(5);return l==="1"&&(l=""),k.charAt(0)+l}},J.cleanId=function(k,l,e){var t=/( domain)$/.test(k);if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))&&!(l&&k.charAt(0)!==l)&&!(t&&!e)){var n=k.split(" ")[0].slice(1).replace(/^0+/,"");return n==="1"&&(n=""),k.charAt(0)+n+(t&&e?" domain":"")}},J.list=function(E,k,l){var e=E._fullLayout;if(!e)return[];var t=J.listIds(E,k),n=new Array(t.length),r;for(r=0;re?1:-1:+(E.slice(1)||1)-+(k.slice(1)||1)},J.ref2id=function(E){return/^[xyz]/.test(E)?E.split(" ")[0]:!1};function b(E,k){if(k&&k.length){for(var l=0;l0?".":"")+o;p.isPlainObject(s)?e(s,n,c,a+1):n(c,o,s)}})}}}),cl=ze({"src/plots/plots.js"(J,V){"use strict";var p=ci(),b=jm().timeFormatLocale,E=Cw().formatLocale,k=ao(),l=Lw(),e=ev().version,t=mi(),n=Wm(),r=hs(),a=Nr(),o=Qn(),s=No().BADNUM,c=Xl(),m=iv().clearOutline,h=Lx(),v=o1(),g=Hw(),i=zf().getModuleCalcData,w=a.relinkPrivateKeys,S=a._,M=V.exports={};a.extendFlat(M,t),M.attributes=ws(),M.attributes.type.values=M.allTypes,M.fontAttrs=Qs(),M.layoutAttributes=Gm();var C=NI();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(G){return G=a.getGraphDiv(G),new Promise(function(X){setTimeout(function(){G._fullLayout&&(t.getComponentMethod("annotations","draw")(G),t.getComponentMethod("legend","draw")(G),t.getComponentMethod("colorbar","draw")(G),X(M.previousPromises(G)))},300)})},M.resize=function(G){G=a.getGraphDiv(G);var X,K=new Promise(function(H,Y){(!G||a.isHidden(G))&&Y(new Error("Resize must be passed a displayed plot div element.")),G._redrawTimer&&clearTimeout(G._redrawTimer),G._resolveResize&&(X=G._resolveResize),G._resolveResize=H,G._redrawTimer=setTimeout(function(){if(!G.layout||G.layout.width&&G.layout.height||a.isHidden(G)){H(G);return}delete G.layout.width,delete G.layout.height;var q=G.changed;G.autoplay=!0,t.call("relayout",G,{autosize:!0}).then(function(){G.changed=q,G._resolveResize===H&&(delete G._resolveResize,H(G))})},100)});return X&&X(K),K},M.previousPromises=function(G){if((G._promises||[]).length)return Promise.all(G._promises).then(function(){G._promises=[]})},M.sendDataToCloud=function(G,X){G.emit("plotly_beforeexport");let K=new URL(X).origin;var H=M.graphJson(G,!1,"object");H.version=e;var Y=new URL(X);Y.searchParams.set("origin",window.location.origin);var q=window.open(Y.href,"_blank");if(!q){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),G.emit("plotly_exportfail");return}var Z=function(ee){ee.origin===K&&ee.data&&ee.data.type==="CHART_AUTH_SUCCESS"&&(q.postMessage({type:"chart",chart:H},K),window.removeEventListener("message",Z),G.emit("plotly_afterexport"))};return window.addEventListener("message",Z),!1};var _=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(G,X){var K=X&&X.skipUpdateCalc,H=G._fullLayout||{};if(H._skipDefaults){delete H._skipDefaults;return}var Y=G._fullLayout={},q=G.layout||{},Z=G._fullData||[],ee=G._fullData=[],ae=G.data||[],he=G.calcdata||[],xe=G._context||{},we;G._transitionData||M.createTransitionData(G),Y._dfltTitle={plot:S(G,"Click to enter Plot title"),subtitle:S(G,"Click to enter Plot subtitle"),x:S(G,"Click to enter X axis title"),y:S(G,"Click to enter Y axis title"),colorbar:S(G,"Click to enter Colorscale title"),annotation:S(G,"new text")},Y._traceWord=S(G,"trace");var Me=A(G,_);if(H._initialAutoSizeIsDone){var Se=H.width,Ie=H.height;M.supplyLayoutGlobalDefaults(q,Y,Me),q.width||(Y.width=Se),q.height||(Y.height=Ie),M.sanitizeMargins(Y)}else{M.supplyLayoutGlobalDefaults(q,Y,Me);var Ve=!q.width||!q.height,Ge=Y.autosize,ke=xe.autosizable,_e=Ve&&(Ge||ke);_e?M.plotAutoSize(G,q,Y):Ve&&M.sanitizeMargins(Y),!Ge&&Ve&&(q.width=Y.width,q.height=Y.height)}Y._d3locale=x(Me,Y.separators),Y._extraFormat=A(G,T),Y._initialAutoSizeIsDone=!0,Y._dataLength=ae.length,Y._modules=[],Y._visibleModules=[],Y._basePlotModules=[];var ce=Y._subplots=u(),ve=Y._splomAxes={x:{},y:{}},le=Y._splomSubplots={};Y._splomGridDflt={},Y._scatterStackOpts={},Y._firstScatter={},Y._alignmentOpts={},Y._colorAxes={},Y._requestRangeslider={},Y._traceUids=f(Z,ae),M.supplyDataDefaults(ae,ee,q,Y);var Ae=Object.keys(ve.x),Be=Object.keys(ve.y);if(Ae.length>1&&Be.length>1){for(t.getComponentMethod("grid","sizeDefaults")(q,Y),we=0;we15&&Be.length>15&&Y.shapes.length===0&&Y.images.length===0,M.linkSubplots(ee,Y,Z,H),M.cleanPlot(ee,Y,Z,H);var Tt=!!(H._has&&H._has("cartesian")),At=!!(Y._has&&Y._has("cartesian")),$t=Tt,rr=At;$t&&!rr?H._bgLayer.remove():rr&&!$t&&(Y._shouldCreateBgLayer=!0),H._zoomlayer&&!G._dragging&&m({_fullLayout:H}),z(ee,Y),w(Y,H),t.getComponentMethod("colorscale","crossTraceDefaults")(ee,Y),Y._preGUI||(Y._preGUI={}),Y._tracePreGUI||(Y._tracePreGUI={});var _r=Y._tracePreGUI,Xt={},or;for(or in _r)Xt[or]="old";for(we=0;we0){var xe=1-2*q;Z=Math.round(xe*Z),ee=Math.round(xe*ee)}}var we=M.layoutAttributes.width.min,Me=M.layoutAttributes.height.min;Z1,Ie=!K.height&&Math.abs(H.height-ee)>1;(Ie||Se)&&(Se&&(H.width=Z),Ie&&(H.height=ee)),X._initialAutoSize||(X._initialAutoSize={width:Z,height:ee}),M.sanitizeMargins(H)},M.supplyLayoutModuleDefaults=function(G,X,K,H){var Y=t.componentsRegistry,q=X._basePlotModules,Z,ee,ae,he=t.subplotsRegistry.cartesian;for(Z in Y)ae=Y[Z],ae.includeBasePlot&&ae.includeBasePlot(G,X);q.length||q.push(he),X._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(G,X),he.finalizeSubplots(G,X));for(var xe in X._subplots)X._subplots[xe].sort(a.subplotSort);for(ee=0;ee1&&(K.l/=Ge,K.r/=Ge)}if(Me){var ke=(K.t+K.b)/Me;ke>1&&(K.t/=ke,K.b/=ke)}var _e=K.xl!==void 0?K.xl:K.x,ce=K.xr!==void 0?K.xr:K.x,ve=K.yt!==void 0?K.yt:K.y,le=K.yb!==void 0?K.yb:K.y;Se[X]={l:{val:_e,size:K.l+Ve},r:{val:ce,size:K.r+Ve},b:{val:le,size:K.b+Ve},t:{val:ve,size:K.t+Ve}},Ie[X]=1}if(!H._replotting)return M.doAutoMargin(G)}};function P(G){if("_redrawFromAutoMarginCount"in G._fullLayout)return!1;var X=c.list(G,"",!0);for(var K in X)if(X[K].autoshift||X[K].shift)return!0;return!1}M.doAutoMargin=function(G){var X=G._fullLayout,K=X.width,H=X.height;X._size||(X._size={}),D(X);var Y=X._size,q=X.margin,Z={t:0,b:0,l:0,r:0},ee=a.extendFlat({},Y),ae=q.l,he=q.r,xe=q.t,we=q.b,Me=X._pushmargin,Se=X._pushmarginIds,Ie=X.minreducedwidth,Ve=X.minreducedheight;if(q.autoexpand!==!1){for(var Ge in Me)Se[Ge]||delete Me[Ge];var ke=G._fullLayout._reservedMargin;for(var _e in ke)for(var ce in ke[_e]){var ve=ke[_e][ce];Z[ce]=Math.max(Z[ce],ve)}Me.base={l:{val:0,size:ae},r:{val:1,size:he},t:{val:1,size:xe},b:{val:0,size:we}};for(var le in Z){var Ae=0;for(var Be in Me)Be!=="base"&&k(Me[Be][le].size)&&(Ae=Me[Be][le].size>Ae?Me[Be][le].size:Ae);var Xe=Math.max(0,q[le]-Ae);Z[le]=Math.max(0,Z[le]-Xe)}for(var Ye in Me){var yt=Me[Ye].l||{},gt=Me[Ye].b||{},Tt=yt.val,At=yt.size,$t=gt.val,rr=gt.size,_r=K-Z.r-Z.l,Xt=H-Z.t-Z.b;for(var or in Me){if(k(At)&&Me[or].r){var Ot=Me[or].r.val,vt=Me[or].r.size;if(Ot>Tt){var ht=(At*Ot+(vt-_r)*Tt)/(Ot-Tt),De=(vt*(1-Tt)+(At-_r)*(1-Ot))/(Ot-Tt);ht+De>ae+he&&(ae=ht,he=De)}}if(k(rr)&&Me[or].t){var Ne=Me[or].t.val,We=Me[or].t.size;if(Ne>$t){var Ke=(rr*Ne+(We-Xt)*$t)/(Ne-$t),Je=(We*(1-$t)+(rr-Xt)*(1-Ne))/(Ne-$t);Ke+Je>we+xe&&(we=Ke,xe=Je)}}}}}var et=a.constrain(K-q.l-q.r,B,Ie),Mt=a.constrain(H-q.t-q.b,F,Ve),pt=Math.max(0,K-et),Pt=Math.max(0,H-Mt);if(pt){var Ct=(ae+he)/pt;Ct>1&&(ae/=Ct,he/=Ct)}if(Pt){var qt=(we+xe)/Pt;qt>1&&(we/=qt,xe/=qt)}if(Y.l=Math.round(ae)+Z.l,Y.r=Math.round(he)+Z.r,Y.t=Math.round(xe)+Z.t,Y.b=Math.round(we)+Z.b,Y.p=Math.round(q.pad),Y.w=Math.round(K)-Y.l-Y.r,Y.h=Math.round(H)-Y.t-Y.b,!X._replotting&&(M.didMarginChange(ee,Y)||P(G))){"_redrawFromAutoMarginCount"in X?X._redrawFromAutoMarginCount++:X._redrawFromAutoMarginCount=1;var Vt=3*(1+Object.keys(Se).length);if(X._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(G,X=!1,K="json",H=!1,Y=!1){(H&&X&&!G._fullData||H&&!X&&!G._fullLayout)&&M.supplyDefaults(G);var q=H?G._fullData:G.data,Z=H?G._fullLayout:G.layout,ee=(G._transitionData||{})._frames;function ae(we,Me){if(typeof we=="function")return Me?"_function_":null;if(a.isPlainObject(we)){var Se={};return Object.keys(we).sort().forEach(function(ke){if(["_","["].indexOf(ke.charAt(0))===-1){if(typeof we[ke]=="function"){Me&&(Se[ke]="_function");return}Se[ke]=ae(we[ke],Me)}}),Se}var Ie=Array.isArray(we),Ve=a.isTypedArray(we);if((Ie||Ve)&&we.dtype&&we.shape){var Ge=we.bdata;return ae({dtype:we.dtype,shape:we.shape,bdata:a.isArrayBuffer(Ge)?l.encode(Ge):Ge},Me)}return Ie?we.map(function(ke){return ae(ke,Me)}):Ve?a.simpleMap(we,a.identity):a.isJSDate(we)?a.ms2DateTimeLocal(+we):we}var he={data:(q||[]).map(function(we){var Me=ae(we);return X&&delete Me.fit,Me})};if(!X&&(he.layout=ae(Z),H)){var xe=Z._size;he.layout.computed={margin:{b:xe.b,l:xe.l,r:xe.r,t:xe.t}}}return ee&&(he.frames=ae(ee)),Y&&(he.config=ae(G._context,!0)),K==="object"?he:JSON.stringify(he)},M.modifyFrames=function(G,X){var K,H,Y,q=G._transitionData._frames,Z=G._transitionData._frameHash;for(K=0;K0&&(G._transitioningWithDuration=!0),G._transitionData._interruptCallbacks.push(function(){H=!0}),K.redraw&&G._transitionData._interruptCallbacks.push(function(){return t.call("redraw",G)}),G._transitionData._interruptCallbacks.push(function(){G.emit("plotly_transitioninterrupted",[])});var Me=0,Se=0;function Ie(){return Me++,function(){Se++,!H&&Se===Me&&ee(we)}}K.runFn(Ie),setTimeout(Ie())})}function ee(we){if(G._transitionData)return q(G._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",G)}).then(function(){G._transitioning=!1,G._transitioningWithDuration=!1,G.emit("plotly_transitioned",[])}).then(we)}function ae(){if(G._transitionData)return G._transitioning=!1,Y(G._transitionData._interruptCallbacks)}var he=[M.previousPromises,ae,K.prepareFn,M.rehover,M.reselect,Z],xe=a.syncOrAsync(he,G);return(!xe||!xe.then)&&(xe=Promise.resolve()),xe.then(function(){return G})}M.doCalcdata=function(G,X){var K=c.list(G),H=G._fullData,Y=G._fullLayout,q,Z,ee,ae=new Array(H.length),he=(G.calcdata||[]).slice();for(G.calcdata=ae,Y._numBoxes=0,Y._numViolins=0,Y._violinScaleGroupStats={},G._hmpixcount=0,G._hmlumcount=0,Y._piecolormap={},Y._sunburstcolormap={},Y._treemapcolormap={},Y._iciclecolormap={},Y._funnelareacolormap={},ee=0;eeQ?Q.match(l):null;J.matchTex=e,J.convertToTspans=function(Q,re,ne){var se=Q.text(),G=!Q.attr("data-notex")&&re&&re._context.typesetMath&&e(se);G&&!m()&&(G=null);var X=V.select(Q.node().parentNode);if(X.empty())return;var K=Q.attr("class")?Q.attr("class").split(" ")[0]:"text";K+="-math",X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove(),Q.style("display",null).attr({"data-unformatted":se,"data-math":"N"});function H(){X.empty()||(K=Q.attr("class")+"-math",X.select("svg."+K).remove()),Q.text("").style("white-space","pre");var Y=P(Q.node(),se);Y&&Q.style("pointer-events","all"),J.positionText(Q),ne&&ne.call(Q)}return G?(re&&re._promises||[]).push(new Promise(function(Y){Q.style("display","none");var q=parseInt(Q.node().style.fontSize,10),Z={fontSize:q},ee=Q.attr("text-anchor");h(G[2],Z,function(ae,he,xe){X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove();var we=ae&&ae.select("svg");if(!we||!we.node()){H(),Y();return}Q.style("display","none");var Me=X.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":se,"data-math":"Y"});Me.node().appendChild(we.node()),he&&he.node()&&we.node().insertBefore(he.node().cloneNode(!0),we.node().firstChild);var Se=xe.width,Ie=xe.height;we.attr({class:K,height:Ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":Z.fontSize+"px"});var Ve=Q.node().style.fill||"black",Ge=we.select("g");Ge.attr({fill:Ve,stroke:Ve});var ke=Ge.node().getBoundingClientRect(),_e=ke.width,ce=ke.height;(_e>Se||ce>Ie)&&(we.style("overflow","hidden"),ke=we.node().getBoundingClientRect(),_e=ke.width,ce=ke.height);var ve=+Q.attr("x"),le=+Q.attr("y"),Ae=q||Q.node().getBoundingClientRect().height,Be=-Ae/4;K[0]==="y"?Me.attr({transform:"rotate("+[-90,ve,le]+")"+b(-_e/2,Be-ce/2)}):K[0]==="l"?le=Be-ce/2:K[0]==="a"&&K.indexOf("atitle")!==0?(ve=0,le=Be):(ve=ve-_e*(ee==="middle"?.5:ee==="end"?1:0),le=le+Be-ce/2),we.attr({x:ve,y:le}),ne&&ne.call(Q,Me),Y(Me)})})):H(),Q};var t=/(<|<|<)/g,n=/(>|>|>)/g;function r(Q){return Q.replace(t,"\\lt ").replace(n,"\\gt ")}var a=null,o=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,s=!1,c=!1;function m(){let Q=o();return Q===3||Q===4?!0:(Q===null?s||(s=!0,p.warn("MathJax is not loaded. Math equations will not be rendered.")):c||(c=!0,p.warn("Unsupported MathJax version:",MathJax.version)),!1)}function h(Q,re,ne){let se=o();var G;let X=function(){if(!a){let q=MathJax._.output.svg_ts.SVG,Z=p.extendFlat({},MathJax.config.svg,{fontCache:"local"});se===4&&(Z.linebreaks=p.extendFlat({},Z.linebreaks,{inline:!1})),a=MathJax._.mathjax.mathjax.document(document,p.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new q(Z)}))}let H="math-output-"+p.randstr({},64);G=V.select("body").append("div").attr({id:H}).style({visibility:"hidden",position:"absolute","font-size":re.fontSize+"px"});let Y=r(Q).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return a.convert(Y,{display:!1})}).then(function(q){G.node().appendChild(q)})},K=function(){let H=G.select(".MathJax"),Y=!H.empty()&&G.select("svg").node();if(!Y)p.log("There was an error in the tex syntax.",Q),ne();else{let q=Y.getBoundingClientRect(),Z=H.select("defs");ne(H,Z,q)}G.remove()};Promise.resolve().then(X).then(K).catch(H=>{p.log("MathJax typesetting failed.",Q,H),G&&G.remove(),ne()})}var v={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"},g={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},w="\u200B",S=["http:","https:","mailto:","",void 0,":"],M=J.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,T=//i;J.BR_TAG_ALL=//gi;var f=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,u=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,x=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function z(Q,re){if(!Q)return null;var ne=Q.match(re),se=ne&&(ne[3]||ne[4]);return se&&B(se)}var I=/(^|;)\s*color:/;J.plainText=function(Q,re){re=re||{};for(var ne=re.len!==void 0&&re.len!==-1?re.len:1/0,se=re.allowedTags!==void 0?re.allowedTags:["br"],G="...",X=G.length,K=Q.split(C),H=[],Y="",q=0,Z=0;ZX?H.push(ee.slice(0,Math.max(0,we-X))+G):H.push(ee.slice(0,we));break}Y=""}}return H.join("")};var O={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},D=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B(Q){return Q.replace(D,function(re,ne){var se;return ne.charAt(0)==="#"?se=F(ne.charAt(1)==="x"?parseInt(ne.slice(2),16):parseInt(ne.slice(1),10)):se=O[ne],se||re})}J.convertEntities=B;function F(Q){if(!(Q>1114111)){var re=String.fromCodePoint;if(re)return re(Q);var ne=String.fromCharCode;return Q<=65535?ne(Q):ne((Q>>10)+55232,Q%1024+56320)}}function P(Q,re){re=re.replace(M," ");var ne=!1,se=[],G,X=-1;function K(){X++;var _e=document.createElementNS(E.svg,"tspan");V.select(_e).attr({class:"line",dy:X*k+"em"}),Q.appendChild(_e),G=_e;var ce=se;if(se=[{node:_e}],ce.length>1)for(var ve=1;ve.",re);return}var ce=se.pop();_e!==ce.type&&p.log("Start tag <"+ce.type+"> doesnt match end tag <"+_e+">. Pretending it did match.",re),G=se[se.length-1].node}var Z=T.test(re);Z?K():(G=Q,se=[{node:Q}]);for(var ee=re.split(C),ae=0;ae=0;g--,i++){var w=m[g];v[i]=[1-w[0],w[1]]}return v}function s(m,h){h=h||{};for(var v=m.domain,g=m.range,i=g.length,w=new Array(i),S=0;Sv-m?m=v-(h-v):h-v=0?w=n.colorscale.sequential:w=n.colorscale.sequentialminus,s._sync("colorscale",w)}}}}),fl=ze({"src/components/colorscale/index.js"(J,V){"use strict";var p=Bv(),b=Bf();V.exports={moduleType:"component",name:"colorscale",attributes:qs(),layoutAttributes:Ww(),supplyLayoutDefaults:jI(),handleDefaults:qc(),crossTraceDefaults:UI(),calc:Qf(),scales:p.scales,defaultScale:p.defaultScale,getScale:p.get,isValidScale:p.isValid,hasColorscale:b.hasColorscale,extractOpts:b.extractOpts,extractScale:b.extractScale,flipScale:b.flipScale,makeColorScaleFunc:b.makeColorScaleFunc,makeColorScaleFuncFromTrace:b.makeColorScaleFuncFromTrace}}}),el=ze({"src/traces/scatter/subtypes.js"(J,V){"use strict";var p=Nr(),b=Ff().isTypedArraySpec;V.exports={hasLines:function(E){return E.visible&&E.mode&&E.mode.indexOf("lines")!==-1},hasMarkers:function(E){return E.visible&&(E.mode&&E.mode.indexOf("markers")!==-1||E.type==="splom")},hasText:function(E){return E.visible&&E.mode&&E.mode.indexOf("text")!==-1},isBubble:function(E){var k=E.marker;return p.isPlainObject(k)&&(p.isArrayOrTypedArray(k.size)||b(k.size))}}}}),l1=ze({"src/traces/scatter/make_bubble_size_func.js"(J,V){"use strict";var p=ao();V.exports=function(E,k){k||(k=2);var l=E.marker,e=l.sizeref||1,t=l.sizemin||0,n=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var a=n(r/k);return p(a)&&a>0?Math.max(a,t):0}}}}),kh=ze({"src/components/fx/helpers.js"(J){"use strict";var V=Nr();J.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},J.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var n=e.xaxes||[],r=e.yaxes||[],a=0;a=0&&n.index{let o=r.toLowerCase(),s=r,c=l(a);for(o==="m"&&c.length>2&&(t.push([s,...c.splice(0,2)]),o="l",s=s==="m"?"l":"L");;){if(c.length===p[o])return t.push([s,...c]),"";if(c.length0&&(ce=100,_e=_e.replace("-open","")),_e.indexOf("-dot")>0&&(ce+=200,_e=_e.replace("-dot","")),_e=g.symbolNames.indexOf(_e),_e>=0&&(_e+=ce)}return _e%100>=T||_e>=400?0:Math.floor(Math.max(_e,0))};function u(_e,ce,ve,le){var Ae=_e%100;return g.symbolFuncs[Ae](ce,ve,le)+(_e>=200?f:"")}var A=E("~f"),x={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}};g.gradient=function(_e,ce,ve,le,Ae,Be){var Xe=x[le];return z(_e,ce,ve,Xe.type,Ae,Be,Xe.start,Xe.stop,!1,Xe.reversed)};function z(_e,ce,ve,le,Ae,Be,Xe,Ye,yt,gt){var Tt=Ae.length,At;le==="linear"?At={node:"linearGradient",attrs:{x1:Xe.x,y1:Xe.y,x2:Ye.x,y2:Ye.y,gradientUnits:yt?"userSpaceOnUse":"objectBoundingBox"},reversed:gt}:le==="radial"&&(At={node:"radialGradient",reversed:gt});for(var $t=new Array(Tt),rr=0;rr=0&&_e.i===void 0&&(_e.i=Be.i),ce.style("opacity",le.selectedOpacityFn?le.selectedOpacityFn(_e):_e.mo===void 0?Xe.opacity:_e.mo),le.ms2mrc){var yt;_e.ms==="various"||Xe.size==="various"?yt=3:yt=le.ms2mrc(_e.ms),_e.mrc=yt,le.selectedSizeFn&&(yt=_e.mrc=le.selectedSizeFn(_e));var gt=g.symbolNumber(_e.mx||Xe.symbol)||0;_e.om=gt%200>=100;var Tt=ke(_e,ve),At=Z(_e,ve);ce.attr("d",u(gt,yt,Tt,At))}var $t=!1,rr,_r,Xt;if(_e.so)Xt=Ye.outlierwidth,_r=Ye.outliercolor,rr=Xe.outliercolor;else{var or=(Ye||{}).width;Xt=(_e.mlw+1||or+1||(_e.trace?(_e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in _e?_r=_e.mlcc=le.lineScale(_e.mlc):b.isArrayOrTypedArray(Ye.color)?_r=e.defaultLine:_r=Ye.color,b.isArrayOrTypedArray(Xe.color)&&(rr=e.defaultLine,$t=!0),"mc"in _e?rr=_e.mcc=le.markerScale(_e.mc):rr=Xe.color||Xe.colors||"rgba(0,0,0,0)",le.selectedColorFn&&(rr=le.selectedColorFn(_e))}let Ot=_e.mld||(Ye||{}).dash;if(Ot&&g.dashLine(ce,Ot,Xt),_e.om)ce.call(e.stroke,rr).style({"stroke-width":(Xt||1)+"px",fill:"none"});else{ce.style("stroke-width",(_e.isBlank?0:Xt)+"px");var vt=Xe.gradient,ht=_e.mgt;ht?$t=!0:ht=vt&&vt.type,b.isArrayOrTypedArray(ht)&&(ht=ht[0],x[ht]||(ht=0));var De=Xe.pattern,Ne=g.getPatternAttr,We=De&&(Ne(De.shape,_e.i,"")||Ne(De.path,_e.i,""));if(ht&&ht!=="none"){var Ke=_e.mgc;Ke?$t=!0:Ke=vt.color;var Je=ve.uid;$t&&(Je+="-"+_e.i),g.gradient(ce,Ae,Je,ht,[[0,Ke],[1,rr]],"fill")}else if(We){var et=!1,Mt=De.fgcolor;!Mt&&Be&&Be.color&&(Mt=Be.color,et=!0);var pt=Ne(Mt,_e.i,Be&&Be.color||null),Pt=Ne(De.bgcolor,_e.i,null),Ct=De.fgopacity,qt=Ne(De.size,_e.i,8),Vt=Ne(De.solidity,_e.i,.3);et=et||_e.mcc||b.isArrayOrTypedArray(De.shape)||b.isArrayOrTypedArray(De.path)||b.isArrayOrTypedArray(De.bgcolor)||b.isArrayOrTypedArray(De.fgcolor)||b.isArrayOrTypedArray(De.size)||b.isArrayOrTypedArray(De.solidity);var Ht=ve.uid;et&&(Ht+="-"+_e.i),g.pattern(ce,"point",Ae,Ht,We,qt,Vt,_e.mcc,De.fillmode,Pt,pt,Ct)}else b.isArrayOrTypedArray(rr)?e.fill(ce,rr[_e.i]):e.fill(ce,rr);Xt&&e.stroke(ce,_r)}},g.makePointStyleFns=function(_e){var ce={},ve=_e.marker;return ce.markerScale=g.tryColorscale(ve,""),ce.lineScale=g.tryColorscale(ve,"line"),l.traceIs(_e,"symbols")&&(ce.ms2mrc=m.isBubble(_e)?h(_e):function(){return(ve.size||6)/2}),_e.selectedpoints&&b.extendFlat(ce,g.makeSelectedPointStyleFns(_e)),ce},g.makeSelectedPointStyleFns=function(_e){var ce={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.marker||{},Be=ve.marker||{},Xe=le.marker||{},Ye=Ae.opacity,yt=Be.opacity,gt=Xe.opacity,Tt=yt!==void 0,At=gt!==void 0;(b.isArrayOrTypedArray(Ye)||Tt||At)&&(ce.selectedOpacityFn=function(De){var Ne=De.mo===void 0?Ae.opacity:De.mo;return De.selected?Tt?yt:Ne:At?gt:c*Ne});var $t=Ae.color,rr=Be.color,_r=Xe.color;(rr||_r)&&(ce.selectedColorFn=function(De){var Ne=De.mcc||$t;return De.selected?rr||Ne:_r||Ne});var Xt=Ae.size,or=Be.size,Ot=Xe.size,vt=or!==void 0,ht=Ot!==void 0;return l.traceIs(_e,"symbols")&&(vt||ht)&&(ce.selectedSizeFn=function(De){var Ne=De.mrc||Xt/2;return De.selected?vt?or/2:Ne:ht?Ot/2:Ne}),ce},g.makeSelectedTextStyleFns=function(_e){var ce={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.textfont||{},Be=ve.textfont||{},Xe=le.textfont||{},Ye=Ae.color,yt=Be.color,gt=Xe.color;return ce.selectedTextColorFn=function(Tt){var At=Tt.tc||Ye;return Tt.selected?yt||At:gt||(yt?At:e.addOpacity(At,c))},ce},g.selectedPointStyle=function(_e,ce){if(!(!_e.size()||!ce.selectedpoints)){var ve=g.makeSelectedPointStyleFns(ce),le=ce.marker||{},Ae=[];ve.selectedOpacityFn&&Ae.push(function(Be,Xe){Be.style("opacity",ve.selectedOpacityFn(Xe))}),ve.selectedColorFn&&Ae.push(function(Be,Xe){e.fill(Be,ve.selectedColorFn(Xe))}),ve.selectedSizeFn&&Ae.push(function(Be,Xe){var Ye=Xe.mx||le.symbol||0,yt=ve.selectedSizeFn(Xe);Be.attr("d",u(g.symbolNumber(Ye),yt,ke(Xe,ce),Z(Xe,ce))),Xe.mrc2=yt}),Ae.length&&_e.each(function(Be){for(var Xe=p.select(this),Ye=0;Ye0?ve:0}g.textPointStyle=function(_e,ce,ve){if(_e.size()){var le;if(ce.selectedpoints){var Ae=g.makeSelectedTextStyleFns(ce);le=Ae.selectedTextColorFn}var Be=ce.texttemplate,Xe=ve._fullLayout;_e.each(function(Ye){var yt=p.select(this),gt=Be?b.extractOption(Ye,ce,"txt","texttemplate"):b.extractOption(Ye,ce,"tx","text");if(!gt&>!==0){yt.remove();return}if(Be){var Tt=ce._module.formatLabels,At=Tt?Tt(Ye,ce,Xe):{},$t={};v($t,ce,Ye.i),gt=b.texttemplateString({data:[$t,Ye,ce._meta],fallback:ce.texttemplatefallback,labels:At,locale:Xe._d3locale,template:gt})}var rr=Ye.tp||ce.textposition,_r=D(Ye,ce),Xt=le?le(Ye):Ye.tc||ce.textfont.color;yt.call(g.font,{family:Ye.tf||ce.textfont.family,weight:Ye.tw||ce.textfont.weight,style:Ye.ty||ce.textfont.style,variant:Ye.tv||ce.textfont.variant,textcase:Ye.tC||ce.textfont.textcase,lineposition:Ye.tE||ce.textfont.lineposition,shadow:Ye.tS||ce.textfont.shadow,size:_r,color:Xt}).text(gt).call(r.convertToTspans,ve).call(O,rr,_r,Ye.mrc)})}},g.selectedTextStyle=function(_e,ce){if(!(!_e.size()||!ce.selectedpoints)){var ve=g.makeSelectedTextStyleFns(ce);_e.each(function(le){var Ae=p.select(this),Be=ve.selectedTextColorFn(le),Xe=le.tp||ce.textposition,Ye=D(le,ce);e.fill(Ae,Be);var yt=l.traceIs(ce,"bar-like");O(Ae,Xe,Ye,le.mrc2||le.mrc,yt)})}};var B=.5;g.smoothopen=function(_e,ce){if(_e.length<3)return"M"+_e.join("L");var ve="M"+_e[0],le=[],Ae;for(Ae=1;Ae<_e.length-1;Ae++)le.push(Q(_e[Ae-1],_e[Ae],_e[Ae+1],ce));for(ve+="Q"+le[0][0]+" "+_e[1],Ae=2;Ae<_e.length-1;Ae++)ve+="C"+le[Ae-2][1]+" "+le[Ae-1][0]+" "+_e[Ae];return ve+="Q"+le[_e.length-3][1]+" "+_e[_e.length-1],ve},g.smoothclosed=function(_e,ce){if(_e.length<3)return"M"+_e.join("L")+"Z";var ve="M"+_e[0],le=_e.length-1,Ae=[Q(_e[le],_e[0],_e[1],ce)],Be;for(Be=1;Be=yt||De>=Tt&&De<=yt)&&(Ne<=At&&Ne>=gt||Ne>=At&&Ne<=gt)&&(_e=[De,Ne])}return _e}g.applyBackoff=se,g.makeTester=function(){var _e=b.ensureSingleById(p.select("body"),"svg","js-plotly-tester",function(ve){ve.attr(a.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ce=b.ensureSingle(_e,"path","js-reference-point",function(ve){ve.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});g.tester=_e,g.testref=ce},g.savedBBoxes={};var G=0,X=1e4;g.bBox=function(_e,ce,ve){ve||(ve=K(_e));var le;if(ve){if(le=g.savedBBoxes[ve],le)return b.extendFlat({},le)}else if(_e.childNodes.length===1){var Ae=_e.childNodes[0];if(ve=K(Ae),ve){var Be=+Ae.getAttribute("x")||0,Xe=+Ae.getAttribute("y")||0,Ye=Ae.getAttribute("transform");if(!Ye){var yt=g.bBox(Ae,!1,ve);return Be&&(yt.left+=Be,yt.right+=Be),Xe&&(yt.top+=Xe,yt.bottom+=Xe),yt}if(ve+="~"+Be+"~"+Xe+"~"+Ye,le=g.savedBBoxes[ve],le)return b.extendFlat({},le)}}var gt,Tt;ce?gt=_e:(Tt=g.tester.node(),gt=_e.cloneNode(!0),Tt.appendChild(gt)),p.select(gt).attr("transform",null).call(r.positionText,0,0);var At=gt.getBoundingClientRect(),$t=g.testref.node().getBoundingClientRect();ce||Tt.removeChild(gt);var rr={height:At.height,width:At.width,left:At.left-$t.left,top:At.top-$t.top,right:At.right-$t.left,bottom:At.bottom-$t.top};return G>=X&&(g.savedBBoxes={},G=0),ve&&(g.savedBBoxes[ve]=rr),G++,b.extendFlat({},rr)};function K(_e){var ce=_e.getAttribute("data-unformatted");if(ce!==null)return ce+_e.getAttribute("data-math")+_e.getAttribute("text-anchor")+_e.getAttribute("style")}g.setClipUrl=function(_e,ce,ve){_e.attr("clip-path",H(ce,ve))};function H(_e,ce){if(!_e)return null;var ve=ce._context,le=ve._exportedPlot?"":ve._baseUrl||"";return le?"url('"+le+"#"+_e+"')":"url(#"+_e+")"}g.getTranslate=function(_e){var ce=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ce,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||0,y:+Ae[1]||0}},g.setTranslate=function(_e,ce,ve){var le=/(\btranslate\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ce=ce||0,ve=ve||0,Xe=Xe.replace(le,"").trim(),Xe+=n(ce,ve),Xe=Xe.trim(),_e[Be]("transform",Xe),Xe},g.getScale=function(_e){var ce=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ce,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||1,y:+Ae[1]||1}},g.setScale=function(_e,ce,ve){var le=/(\bscale\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ce=ce||1,ve=ve||1,Xe=Xe.replace(le,"").trim(),Xe+="scale("+ce+","+ve+")",Xe=Xe.trim(),_e[Be]("transform",Xe),Xe};var Y=/\s*sc.*/;g.setPointGroupScale=function(_e,ce,ve){if(ce=ce||1,ve=ve||1,!!_e){var le=ce===1&&ve===1?"":"scale("+ce+","+ve+")";_e.each(function(){var Ae=(this.getAttribute("transform")||"").replace(Y,"");Ae+=le,Ae=Ae.trim(),this.setAttribute("transform",Ae)})}};var q=/translate\([^)]*\)\s*$/;g.setTextPointsScale=function(_e,ce,ve){_e&&_e.each(function(){var le,Ae=p.select(this),Be=Ae.select("text");if(Be.node()){var Xe=parseFloat(Be.attr("x")||0),Ye=parseFloat(Be.attr("y")||0),yt=(Ae.attr("transform")||"").match(q);ce===1&&ve===1?le=[]:le=[n(Xe,Ye),"scale("+ce+","+ve+")",n(-Xe,-Ye)],yt&&le.push(yt),Ae.attr("transform",le.join(""))}})};function Z(_e,ce){var ve;return _e&&(ve=_e.mf),ve===void 0&&(ve=ce.marker&&ce.marker.standoff||0),!ce._geo&&!ce._xA?-ve:ve}g.getMarkerStandoff=Z;var ee=Math.atan2,ae=Math.cos,he=Math.sin;function xe(_e,ce){var ve=ce[0],le=ce[1];return[ve*ae(_e)-le*he(_e),ve*he(_e)+le*ae(_e)]}var we,Me,Se,Ie,Ve,Ge;function ke(_e,ce){var ve=_e.ma;ve===void 0&&(ve=ce.marker.angle,(!k(ve)||b.isArrayOrTypedArray(ve))&&(ve=0));var le,Ae,Be=ce.marker.angleref;if(Be==="previous"||Be==="north"){if(ce._geo){var Xe=ce._geo.project(_e.lonlat);le=Xe[0],Ae=Xe[1]}else{var Ye=ce._xA,yt=ce._yA;if(Ye&&yt)le=Ye.c2p(_e.x),Ae=yt.c2p(_e.y);else return 90}if(ce._geo){var gt=_e.lonlat[0],Tt=_e.lonlat[1],At=ce._geo.project([gt,Tt+1e-5]),$t=ce._geo.project([gt+1e-5,Tt]),rr=ee($t[1]-Ae,$t[0]-le),_r=ee(At[1]-Ae,At[0]-le),Xt;if(Be==="north")Xt=ve/180*Math.PI;else if(Be==="previous"){var or=gt/180*Math.PI,Ot=Tt/180*Math.PI,vt=we/180*Math.PI,ht=Me/180*Math.PI,De=vt-or,Ne=ae(ht)*he(De),We=he(ht)*ae(Ot)-ae(ht)*he(Ot)*ae(De);Xt=-ee(Ne,We)-Math.PI,we=gt,Me=Tt}var Ke=xe(rr,[ae(Xt),0]),Je=xe(_r,[he(Xt),0]);ve=ee(Ke[1]+Je[1],Ke[0]+Je[0])/Math.PI*180,Be==="previous"&&!(Ge===ce.uid&&_e.i===Ve+1)&&(ve=null)}if(Be==="previous"&&!ce._geo)if(Ge===ce.uid&&_e.i===Ve+1&&k(le)&&k(Ae)){var et=le-Se,Mt=Ae-Ie,pt=ce.line&&ce.line.shape||"",Pt=pt.slice(pt.length-1);Pt==="h"&&(Mt=0),Pt==="v"&&(et=0),ve+=ee(Mt,et)/Math.PI*180+90}else ve=null}return Se=le,Ie=Ae,Ve=_e.i,Ge=ce.uid,ve}g.getMarkerAngle=ke}}),qv=ze({"src/components/titles/index.js"(J,V){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=$i(),n=Qn(),r=Cs(),a=np(),o=dc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,m=1.6;function h(v,g,i){var w=v._fullLayout,S=i.propContainer,M=i.propName,C=i.placeholder,_=i.traceIndex,T=i.avoid||{},f=i.attributes,u=i.transform,A=i.containerGroup,x=1,z=S.title,I=(z&&z.text?z.text:"").trim(),O=!1,D=z&&z.font?z.font:{},B=D.family,F=D.size,P=D.color,j=D.weight,U=D.style,$=D.variant,Q=D.textcase,re=D.lineposition,ne=D.shadow,se=i.subtitlePropName,G=!!se,X=i.subtitlePlaceholder,K=(S.title||{}).subtitle||{text:"",font:{}},H=(K.text||"").trim(),Y=!1,q=1,Z=K.font,ee=Z.family,ae=Z.size,he=Z.color,xe=Z.weight,we=Z.style,Me=Z.variant,Se=Z.textcase,Ie=Z.lineposition,Ve=Z.shadow,Ge;M==="title.text"?Ge="titleText":M.indexOf("axis")!==-1?Ge="axisTitleText":M.indexOf("colorbar")!==-1&&(Ge="colorbarTitleText");var ke=v._context.edits[Ge];function _e(rr,_r){return rr===void 0||_r===void 0?!1:rr.replace(s," % ")===_r.replace(s," % ")}I===""?x=0:_e(I,C)&&(ke||(I=""),x=.2,O=!0),G&&(H===""?q=0:_e(H,X)&&(ke||(H=""),q=.2,Y=!0)),i._meta?I=l.templateString(I,i._meta):w._meta&&(I=l.templateString(I,w._meta));var ce=I||H||ke,ve;A||(A=l.ensureSingle(w._infolayer,"g","g-"+g),ve=w._hColorbarMoveTitle);var le=A.selectAll("text."+g).data(ce?[0]:[]);le.enter().append("text"),le.text(I).attr("class",g),le.exit().remove();var Ae=null,Be=g+"-subtitle",Xe=H||ke;if(G&&(Ae=A.selectAll("text."+Be).data(Xe?[0]:[]),Ae.enter().append("text"),Ae.text(H).attr("class",Be),Ae.exit().remove()),!ce)return A;function Ye(rr,_r){l.syncOrAsync([yt,gt],{title:rr,subtitle:_r})}function yt(rr){var _r=rr.title,Xt=rr.subtitle,or;!u&&ve&&(u={}),u?(or="",u.rotate&&(or+="rotate("+[u.rotate,f.x,f.y]+")"),(u.offset||ve)&&(or+=e(0,(u.offset||0)-(ve||0)))):or=null,_r.attr("transform",or);function Ot(Ke){if(Ke){var Je=p.select(Ke.node().parentNode).select("."+Be);if(!Je.empty()){var et=Ke.node().getBBox();if(et.height){var Mt=et.y+et.height+c*ae;Je.attr("y",Mt)}}}}if(_r.style("opacity",x*n.opacity(P)).call(t.font,{color:n.rgb(P),size:p.round(F,2),family:B,weight:j,style:U,variant:$,textcase:Q,shadow:ne,lineposition:re}).attr(f).call(r.convertToTspans,v,Ot),Xt&&!Xt.empty()){var vt=A.select("."+g+"-math-group"),ht=_r.node().getBBox(),De=vt.node()?vt.node().getBBox():void 0,Ne=De?De.y+De.height+c*ae:ht.y+ht.height+m*ae,We=l.extendFlat({},f,{y:Ne});Xt.attr("transform",or),Xt.style("opacity",q*n.opacity(he)).call(t.font,{color:n.rgb(he),size:p.round(ae,2),family:ee,weight:xe,style:we,variant:Me,textcase:Se,shadow:Ve,lineposition:Ie}).attr(We).call(r.convertToTspans,v)}return E.previousPromises(v)}function gt(rr){var _r=rr.title,Xt=p.select(_r.node().parentNode);if(T&&T.selection&&T.side&&I){Xt.attr("transform",null);var or=o[T.side],Ot=T.side==="left"||T.side==="top"?-1:1,vt=b(T.pad)?T.pad:2,ht=t.bBox(Xt.node()),De={t:0,b:0,l:0,r:0},Ne=v._fullLayout._reservedMargin;for(var We in Ne)for(var Ke in Ne[We]){var Je=Ne[We][Ke];De[Ke]=Math.max(De[Ke],Je)}var et={left:De.l,top:De.t,right:w.width-De.r,bottom:w.height-De.b},Mt=T.maxShift||Ot*(et[T.side]-ht[T.side]),pt=0;if(Mt<0)pt=Mt;else{var Pt=T.offsetLeft||0,Ct=T.offsetTop||0;ht.left-=Pt,ht.right-=Pt,ht.top-=Ct,ht.bottom-=Ct,T.selection.each(function(){var Vt=t.bBox(this);l.bBoxIntersect(ht,Vt,vt)&&(pt=Math.max(pt,Ot*(Vt[T.side]-ht[or])+vt))}),pt=Math.min(Mt,pt),S._titleScoot=Math.abs(pt)}if(pt>0||Mt<0){var qt={left:[-pt,0],right:[pt,0],top:[0,-pt],bottom:[0,pt]}[T.side];Xt.attr("transform",e(qt[0],qt[1]))}}}le.call(Ye,Ae);function Tt(rr,_r){rr.text(_r).on("mouseover.opacity",function(){p.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){p.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}if(ke&&(I?le.on(".opacity",null):(Tt(le,C),O=!0),le.call(r.makeEditable,{gd:v}).on("edit",function(rr){_!==void 0?k.call("_guiRestyle",v,M,rr,_):k.call("_guiRelayout",v,M,rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,f.x,f.y)}),G)){if(G&&!I){var At=le.node().getBBox(),$t=At.y+At.height+m*ae;Ae.attr("y",$t)}H?Ae.on(".opacity",null):(Tt(Ae,X),Y=!0),Ae.call(r.makeEditable,{gd:v}).on("edit",function(rr){k.call("_guiRelayout",v,"title.subtitle.text",rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,Ae.attr("x"),Ae.attr("y"))})}return le.classed("js-placeholder",O),Ae&&!Ae.empty()&&Ae.classed("js-placeholder",Y),A}V.exports={draw:h,SUBTITLE_PADDING_EM:m,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Dd=ze({"src/plots/cartesian/set_convert.js"(J,V){"use strict";var p=ci(),b=jm().utcFormat,E=Nr(),k=E.numberFormat,l=ao(),e=E.cleanNumber,t=E.ms2DateTime,n=E.dateTime2ms,r=E.ensureNumber,a=E.isArrayOrTypedArray,o=No(),s=o.FP_SAFE,c=o.BADNUM,m=o.LOG_CLIP,h=o.ONEWEEK,v=o.ONEDAY,g=o.ONEHOUR,i=o.ONEMIN,w=o.ONESEC,S=Xl(),M=hc(),C=M.HOUR_PATTERN,_=M.WEEKDAY_PATTERN;function T(u){return Math.pow(10,u)}function f(u){return u!=null}V.exports=function(A,x){x=x||{};var z=A._id||"x",I=z.charAt(0);function O(H,Y){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&Y&&A.range&&A.range.length===2){var q=A.range[0],Z=A.range[1];return .5*(q+Z-2*m*Math.abs(q-Z))}else return c}function D(H,Y,q,Z){if((Z||{}).msUTC&&l(H))return+H;var ee=n(H,q||A.calendar);if(ee===c)if(l(H)){H=+H;var ae=Math.floor(E.mod(H+.05,1)*10),he=Math.round(H-ae/10);ee=n(new Date(he))+ae/10}else return c;return ee}function B(H,Y,q){return t(H,Y,q||A.calendar)}function F(H){return A._categories[Math.round(H)]}function P(H){if(f(H)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[H]!==void 0)return A._categoriesMap[H];A._categories.push(typeof H=="number"?String(H):H);var Y=A._categories.length-1;return A._categoriesMap[H]=Y,Y}return c}function j(H,Y){for(var q=new Array(Y),Z=0;ZA.range[1]&&(q=!q);for(var Z=q?-1:1,ee=Z*H,ae=0,he=0;hewe)ae=he+1;else{ae=ee<(xe+we)/2?he:he+1;break}}var Me=A._B[ae]||0;return isFinite(Me)?re(H,A._m2,Me):0},G=function(H){var Y=A._rangebreaks.length;if(!Y)return ne(H,A._m,A._b);for(var q=0,Z=0;ZA._rangebreaks[Z].pmax&&(q=Z+1);return ne(H,A._m2,A._B[q])}}A.c2l=A.type==="log"?O:r,A.l2c=A.type==="log"?T:r,A.l2p=se,A.p2l=G,A.c2p=A.type==="log"?function(H,Y){return se(O(H,Y))}:se,A.p2c=A.type==="log"?function(H){return T(G(H))}:G,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=e,A.c2d=A.c2r=A.l2d=A.l2r=r,A.d2p=A.r2p=function(H){return A.l2p(e(H))},A.p2d=A.p2r=G,A.cleanPos=r):A.type==="log"?(A.d2r=A.d2l=function(H,Y){return O(e(H),Y)},A.r2d=A.r2c=function(H){return T(e(H))},A.d2c=A.r2l=e,A.c2d=A.l2r=r,A.c2r=O,A.l2d=T,A.d2p=function(H,Y){return A.l2p(A.d2r(H,Y))},A.p2d=function(H){return T(G(H))},A.r2p=function(H){return A.l2p(e(H))},A.p2r=G,A.cleanPos=r):A.type==="date"?(A.d2r=A.r2d=E.identity,A.d2c=A.r2c=A.d2l=A.r2l=D,A.c2d=A.c2r=A.l2d=A.l2r=B,A.d2p=A.r2p=function(H,Y,q){return A.l2p(D(H,0,q))},A.p2d=A.p2r=function(H,Y,q){return B(G(H),Y,q)},A.cleanPos=function(H){return E.cleanDate(H,c,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=P,A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var Y=Q(H);return Y!==void 0?Y:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=Q,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(G(H))},A.r2p=A.d2p,A.p2r=G,A.cleanPos=function(H){return typeof H=="string"&&H!==""?H:r(H)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var Y=$(H);return Y!==void 0?Y:A.fraction2r(.5)},A.r2c_just_indices=U,A.l2r=A.c2r=r,A.r2l=$,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(G(H))},A.r2p=A.d2p,A.p2r=G,A.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:r(H)},A.setupMultiCategory=function(H){var Y=A._traceIndices,q,Z,ee=A._matchGroup;if(ee&&A._categories.length===0){for(var ae in ee)if(ae!==z){var he=x[S.id2name(ae)];Y=Y.concat(he._traceIndices)}}var xe=[[0,{}],[0,{}]],we=[];for(q=0;qhe[1]&&(Z[ae?0:1]=q,ee[1]=he[1]),ee[0]>=ee[1])if(Y!==void 0){var xe=he[0]+1;q!==void 0&&(xe=Math.min(xe,he[1])),Z[ae?0:1]=A.l2r(xe)}else q!==void 0&&(Z[ae?1:0]=A.l2r(he[1]-1))}},A.cleanRange=function(H,Y){A._cleanRange(H,Y),A.limitRange(H)},A._cleanRange=function(H,Y){Y||(Y={}),H||(H="range");var q=E.nestedProperty(A,H).get(),Z,ee;if(A.type==="date"?ee=E.dfltRange(A.calendar):I==="y"?ee=M.DFLTRANGEY:A._name==="realaxis"?ee=[0,1]:ee=Y.dfltRange||M.DFLTRANGEX,ee=ee.slice(),(A.rangemode==="tozero"||A.rangemode==="nonnegative")&&(ee[0]=0),!q||q.length!==2){E.nestedProperty(A,H).set(ee);return}var ae=q[0]===null,he=q[1]===null;for(A.type==="date"&&!A.autorange&&(q[0]=E.cleanDate(q[0],c,A.calendar),q[1]=E.cleanDate(q[1],c,A.calendar)),Z=0;Z<2;Z++)if(A.type==="date"){if(!E.isDateTime(q[Z],A.calendar)){A[H]=ee;break}if(A.r2l(q[0])===A.r2l(q[1])){var xe=E.constrain(A.r2l(q[0]),E.MIN_MS+1e3,E.MAX_MS-1e3);q[0]=A.l2r(xe-1e3),q[1]=A.l2r(xe+1e3);break}}else{if(!l(q[Z]))if(!(ae||he)&&l(q[1-Z]))q[Z]=q[1-Z]*(Z?10:.1);else{A[H]=ee;break}if(q[Z]<-s?q[Z]=-s:q[Z]>s&&(q[Z]=s),q[0]===q[1]){var we=Math.max(1,Math.abs(q[0]*1e-6));q[0]-=we,q[1]+=we}}},A.setScale=function(H){var Y=x._size;if(A.overlaying){var q=S.getFromId({_fullLayout:x},A.overlaying);A.domain=q.domain}var Z=H&&A._r?"_r":"range",ee=A.calendar;A.cleanRange(Z);var ae=A.r2l(A[Z][0],ee),he=A.r2l(A[Z][1],ee),xe=I==="y";if(xe?(A._offset=Y.t+(1-A.domain[1])*Y.h,A._length=Y.h*(A.domain[1]-A.domain[0]),A._m=A._length/(ae-he),A._b=-A._m*he):(A._offset=Y.l+A.domain[0]*Y.w,A._length=Y.w*(A.domain[1]-A.domain[0]),A._m=A._length/(he-ae),A._b=-A._m*ae),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks){var we,Me;if(A._rangebreaks=A.locateBreaks(Math.min(ae,he),Math.max(ae,he)),A._rangebreaks.length){for(we=0;wehe&&(Se=!Se),Se&&A._rangebreaks.reverse();var Ie=Se?-1:1;for(A._m2=Ie*A._length/(Math.abs(he-ae)-A._lBreaks),A._B.push(-A._m2*(xe?he:ae)),we=0;weee&&(ee+=7,aeee&&(ee+=24,ae=Z&&ae=Z&&H=Ye.min&&(leYe.max&&(Ye.max=Ae),Be=!1)}Be&&he.push({min:le,max:Ae})}};for(q=0;qw*2}function o(m){return Math.max(1,(m-1)/1e3)}function s(m,h){for(var v=m.length,g=o(v),i=0,w=0,S={},M=0;Mi*2}function c(m){return k(m[0])&&k(m[1])}}}),md=ze({"src/plots/cartesian/autorange.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=No().FP_SAFE,l=mi(),e=$i(),t=Xl(),n=t.getFromId,r=t.isLinked;V.exports={applyAutorangeOptions:A,getAutoRange:a,makePadFn:s,doAutoRange:v,findExtremes:g,concatExtremes:h};function a(x,z){var I,O,D=[],B=x._fullLayout,F=s(B,z,0),P=s(B,z,1),j=h(x,z),U=j.min,$=j.max;if(U.length===0||$.length===0)return E.simpleMap(z.range,z.r2l);var Q=U[0].val,re=$[0].val;for(I=1;I0&&(we=Y-F(ee)-P(ae),we>q?Me/we>Z&&(he=ee,xe=ae,Z=Me/we):Me/Y>Z&&(he={val:ee.val,nopad:1},xe={val:ae.val,nopad:1},Z=Me/Y));function Se(_e,ce){return Math.max(_e,P(ce))}if(Q===re){var Ie=Q-1,Ve=Q+1;if(K)if(Q===0)D=[0,1];else{var Ge=(Q>0?$:U).reduce(Se,0),ke=Q/(1-Math.min(.5,Ge/Y));D=Q>0?[0,ke]:[ke,0]}else H?D=[Math.max(0,Ie),Math.max(1,Ve)]:D=[Ie,Ve]}else K?(he.val>=0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:0,nopad:1})):H&&(he.val-Z*F(he)<0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:1,nopad:1})),Z=(xe.val-he.val-o(z,ee.val,ae.val))/(Y-F(he)-P(xe)),D=[he.val-Z*F(he),xe.val+Z*P(xe)];return D=A(D,z),z.limitRange&&z.limitRange(),se&&D.reverse(),E.simpleMap(D,z.l2r||Number)}function o(x,z,I){var O=0;if(x.rangebreaks)for(var D=x.locateBreaks(z,I),B=0;B0?I.ppadplus:I.ppadminus)||I.ppad||0),ee=q((x._m>0?I.ppadminus:I.ppadplus)||I.ppad||0),ae=q(I.vpadplus||I.vpad),he=q(I.vpadminus||I.vpad);if(!U){if(H=1/0,Y=-1/0,j)for(Q=0;Q0&&(H=re),re>Y&&re-k&&(H=re),re>Y&&re=Me;Q--)we(Q);return{min:O,max:D,opts:I}}function i(x,z,I,O){S(x,z,I,O,C)}function w(x,z,I,O){S(x,z,I,O,_)}function S(x,z,I,O,D){for(var B=O.tozero,F=O.extrapad,P=!0,j=0;j=I&&(U.extrapad||!F)){P=!1;break}else D(z,U.val)&&U.pad<=I&&(F||!U.extrapad)&&(x.splice(j,1),j--)}if(P){var $=B&&z===0;x.push({val:z,pad:$?0:I,extrapad:$?!1:F})}}function M(x){return b(x)&&Math.abs(x)=z}function T(x,z){var I=z.autorangeoptions;return I&&I.minallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.minallowed:I&&I.clipmin!==void 0&&u(z,I.clipmin,I.clipmax)?Math.max(x,z.d2l(I.clipmin)):x}function f(x,z){var I=z.autorangeoptions;return I&&I.maxallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.maxallowed:I&&I.clipmax!==void 0&&u(z,I.clipmin,I.clipmax)?Math.min(x,z.d2l(I.clipmax)):x}function u(x,z,I){return z!==void 0&&I!==void 0?(z=x.d2l(z),I=x.d2l(I),z=j&&(B=j,I=j),F<=j&&(F=j,O=j)}}return I=T(I,z),O=f(O,z),[I,O]}}}),Gi=ze({"src/plots/cartesian/axes.js"(J,V){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=Cs(),n=qv(),r=Qn(),a=$i(),o=cf(),s=Xw(),c=hc(),m=No(),h=m.ONEMAXYEAR,v=m.ONEAVGYEAR,g=m.ONEMINYEAR,i=m.ONEMAXQUARTER,w=m.ONEAVGQUARTER,S=m.ONEMINQUARTER,M=m.ONEMAXMONTH,C=m.ONEAVGMONTH,_=m.ONEMINMONTH,T=m.ONEWEEK,f=m.ONEDAY,u=f/2,A=m.ONEHOUR,x=m.ONEMIN,z=m.ONESEC,I=m.ONEMILLI,O=m.ONEMICROSEC,D=m.MINUS_SIGN,B=m.BADNUM,F={K:"zeroline"},P={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},U={K:"tick",L:"path"},$={K:"tick",L:"text"},Q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},re=dc(),ne=re.MID_SHIFT,se=re.CAP_SHIFT,G=re.LINE_SPACING,X=re.OPPOSITE_SIDE,K=3,H=V.exports={};H.setConvert=Dd();var Y=Xm(),q=Xl(),Z=q.idSort,ee=q.isLinked;H.id2name=q.id2name,H.name2id=q.name2id,H.cleanId=q.cleanId,H.list=q.list,H.listIds=q.listIds,H.getFromId=q.getFromId,H.getFromTrace=q.getFromTrace;var ae=md();H.getAutoRange=ae.getAutoRange,H.findExtremes=ae.findExtremes;var he=1e-4;function xe(lt){var rt=(lt[1]-lt[0])*he;return[lt[0]-rt,lt[1]+rt]}function we(lt,rt,fr){if(![fr,lt,rt].every(b)||fr===0)return lt;let lr=Math.round((lt-rt)/fr),Tr=rt+lr*fr;return lt!==Tr&&Math.abs(lt-Tr)xr+" domain")),kt=kt.concat(Ir||[]),ar.length>Dr?(l.warn("Array attribute "+jt+" has more entries than expected, truncating to "+Dr),ar=ar.slice(0,Dr)):ar.length2e-6||((fr-lt._forceTick0)/lt._minDtick%1+1.000001)%1>2e-6)&&(lt._minDtick=0))},H.saveRangeInitial=function(lt,rt){for(var fr=H.list(lt,"",!0),lr=!1,Tr=0;TrEr*.3||jt(lr)||jt(Tr))){var xr=fr.dtick/2;lt+=lt+xrDr){var ot=Number(fr.slice(1));Ir.exactYears>Dr&&ot%12===0?lt=H.tickIncrement(lt,"M6","reverse")+f*1.5:Ir.exactMonths>Dr?lt=H.tickIncrement(lt,"M1","reverse")+f*15.5:lt-=u;var kt=H.tickIncrement(lt,fr);if(kt<=lr)return kt}return lt}H.prepMinorTicks=function(lt,rt,fr){var lr,Tr;if(!((lr=rt.minor)!=null&&lr.dtick)){delete lt.dtick;var Ir=rt.dtick&&b(rt._tmin),Dr;if(Ir){var ot=H.tickIncrement(rt._tmin,rt.dtick,!0);Dr=[rt._tmin,ot*.99+rt._tmin*.01]}else{var kt=l.simpleMap(rt.range,rt.r2l);Dr=[kt[0],.8*kt[0]+.2*kt[1]]}if(lt.range=l.simpleMap(Dr,rt.l2r),lt._isMinor=!0,H.prepTicks(lt,fr),Ir){var jt=b(rt.dtick),ar=b(lt.dtick),Er=jt?rt.dtick:+rt.dtick.substring(1),xr=ar?lt.dtick:+lt.dtick.substring(1);jt&&ar?ke(Er,xr)?Er===2*T&&xr===2*f&&(lt.dtick=T):Er===2*T&&xr===3*f?lt.dtick=T:Er===T&&!(rt._input.minor||{}).nticks?lt.dtick=f:_e(Er/xr,2.5)?lt.dtick=Er/2:lt.dtick=Er:String(rt.dtick).charAt(0)==="M"?ar?lt.dtick="M1":ke(Er,xr)?Er>=12&&xr===2&&(lt.dtick="M3"):lt.dtick=rt.dtick:String(lt.dtick).charAt(0)==="L"?String(rt.dtick).charAt(0)==="L"?ke(Er,xr)||(lt.dtick=_e(Er/xr,2.5)?rt.dtick/2:rt.dtick):lt.dtick="D1":lt.dtick==="D2"&&+rt.dtick>1&&(lt.dtick=1)}lt.range=rt.range}((Tr=rt.minor)==null?void 0:Tr._tick0Init)===void 0&&(lt.tick0=rt.tick0)};function ke(lt,rt){return Math.abs((lt/rt+.5)%1-.5)<.001}function _e(lt,rt){return Math.abs(lt/rt-1)<.001}H.prepTicks=function(lt,rt){var fr=l.simpleMap(lt.range,lt.r2l,void 0,void 0,rt);if(lt.tickmode==="auto"||!lt.dtick){var lr=lt.nticks,Tr;lr||(lt.type==="category"||lt.type==="multicategory"?(Tr=lt.tickfont?l.bigFont(lt.tickfont.size||12):15,lr=lt._length/Tr):(Tr=lt._id.charAt(0)==="y"?40:80,lr=l.constrain(lt._length/Tr,4,9)+1),lt._name==="radialaxis"&&(lr*=2)),lt.minor&<.minor.tickmode!=="array"||lt.tickmode==="array"&&(lr*=100),lt._roughDTick=Math.abs(fr[1]-fr[0])/lr,H.autoTicks(lt,lt._roughDTick),lt._minDtick>0&<.dtick0?(Ir=lr-1,Dr=lr):(Ir=lr,Dr=lr);var ot=lt[Ir].value,kt=lt[Dr].value,jt=Math.abs(kt-ot),ar=fr||jt,Er=0;ar>=g?jt>=g&&jt<=h?Er=jt:Er=v:fr===w&&ar>=S?jt>=S&&jt<=i?Er=jt:Er=w:ar>=_?jt>=_&&jt<=M?Er=jt:Er=C:fr===T&&ar>=T?Er=T:ar>=f?Er=f:fr===u&&ar>=u?Er=u:fr===A&&ar>=A&&(Er=A);var xr;Er>=jt&&(Er=jt,xr=!0);var zr=Tr+Er;if(rt.rangebreaks&&Er>0){for(var Lr=84,aa=0,Sa=0;SaT&&(Er=jt)}(Er>0||lr===0)&&(lt[lr].periodX=Tr+Er/2)}}H.calcTicks=function(rt,fr){for(var lr=rt.type,Tr=rt.calendar,Ir=rt.ticklabelstep,Dr=rt.ticklabelmode==="period",ot=rt.range[0]>rt.range[1],kt=!rt.ticklabelindex||l.isArrayOrTypedArray(rt.ticklabelindex)?rt.ticklabelindex:[rt.ticklabelindex],jt=l.simpleMap(rt.range,rt.r2l,void 0,void 0,fr),ar=jt[1]=(ai?0:1);rn--){var Ri=!rn;rn?(rt._dtickInit=rt.dtick,rt._tick0Init=rt.tick0):ai&&(rt.minor._dtickInit=rt.minor.dtick,rt.minor._tick0Init=rt.minor.tick0);var Gn=rn?rt:l.extendFlat({},rt,ai?rt.minor:{minor:{}});if(Ri?H.prepMinorTicks(Gn,rt,fr):H.prepTicks(Gn,fr),Gn.tickmode==="array"){rn?(Sa=[],Lr=Xe(rt,!Ri)):(wa=[],aa=Xe(rt,!Ri));continue}if(Gn.tickmode==="sync"){Sa=[],Lr=Be(rt);continue}var no=xe(jt),Di=no[0],fn=no[1],Ai=b(Gn.dtick),jn=lr==="log"&&!(Ai||Gn.dtick.charAt(0)==="L"),Xn=H.tickFirst(Gn,fr);if(rn){if(rt._tmin=Xn,Xn=fn:gi<=fn;gi=H.tickIncrement(gi,oo,ar,Tr)){if(rn&&qi++,Gn.rangebreaks&&!ar){if(gi=xr)break}if(Sa.length>zr||gi===eo)break;eo=gi;var qn={value:we(gi,Vn,oo)};rn?(gi===Xn&&(qn.first=!0),jn&&gi!==(gi|0)&&(qn.simpleLabel=!0),Ir>1&&qi%Ir&&(qn.skipLabel=!0),Sa.push(qn)):(qn.minor=!0,wa.push(qn))}}if(!wa||wa.length<3)kt=!1;else{var Hi=(wa[2].value-wa[1].value)*(ot?-1:1);Oa(Hi,rt.tickformat)||(kt=!1,wa=wa.slice(1))}if(!kt)pn=Sa;else{var Mi=Sa.concat(wa);Dr&&Sa.length&&(Mi=Mi.slice(1)),Mi=Mi.sort(function(Bo,_o){return Bo.value-_o.value}).filter(function(Bo,_o,Pi){return _o===0||Bo.value!==Pi[_o-1].value});var Ro=Mi.map(function(Bo,_o){return Bo.minor===void 0&&!Bo.skipLabel?_o:null}).filter(function(Bo){return Bo!==null});Ro.forEach(function(Bo){kt.map(function(_o){var Pi=Bo+_o;Pi>=0&&Pi-1;pi--){if(Sa[pi].drop){Sa.splice(pi,1);continue}Sa[pi].value=on(Sa[pi].value,rt);var Ko=rt.c2p(Sa[pi].value);(Vi?Xi>Ko-Io:Xixr||yoxr&&(Pi.periodX=xr),yoTr&&LrTr&&Sav)rt/=v,lr=Tr(10),lt.dtick="M"+12*_r(rt,lr,Ye);else if(Ir>C)rt/=C,lt.dtick="M"+_r(rt,1,yt);else if(Ir>f){if(lt.dtick=_r(rt,f,lt._hasDayOfWeekBreaks?[1,2,7,14]:Tt),!fr){var Dr=H.getTickFormat(lt),ot=lt.ticklabelmode==="period";ot&&(lt._rawTick0=lt.tick0),/%[uVW]/.test(Dr)?lt.tick0=l.dateTick0(lt.calendar,2):lt.tick0=l.dateTick0(lt.calendar,1),ot&&(lt._dowTick0=lt.tick0)}}else Ir>A?lt.dtick=_r(rt,A,yt):Ir>x?lt.dtick=_r(rt,x,gt):Ir>z?lt.dtick=_r(rt,z,gt):(lr=Tr(10),lt.dtick=_r(rt,lr,Ye))}else if(lt.type==="log"){lt.tick0=0;var kt=l.simpleMap(lt.range,lt.r2l);if(lt._isMinor&&(rt*=1.5),rt>.7)lt.dtick=Math.ceil(rt);else if(Math.abs(kt[1]-kt[0])<1){var jt=1.5*Math.abs((kt[1]-kt[0])/rt);rt=Math.abs(Math.pow(10,kt[1])-Math.pow(10,kt[0]))/jt,lr=Tr(10),lt.dtick="L"+_r(rt,lr,Ye)}else lt.dtick=rt>.3?"D2":"D1"}else lt.type==="category"||lt.type==="multicategory"?(lt.tick0=0,lt.dtick=Math.ceil(Math.max(rt,1))):Yn(lt)?(lt.tick0=0,lr=1,lt.dtick=_r(rt,lr,rr)):(lt.tick0=0,lr=Tr(10),lt.dtick=_r(rt,lr,Ye));if(lt.dtick===0&&(lt.dtick=1),!b(lt.dtick)&&typeof lt.dtick!="string"){var ar=lt.dtick;throw lt.dtick=1,"ax.dtick error: "+String(ar)}};function Xt(lt){var rt=lt.dtick;if(lt._tickexponent=0,!b(rt)&&typeof rt!="string"&&(rt=1),(lt.type==="category"||lt.type==="multicategory")&&(lt._tickround=null),lt.type==="date"){var fr=lt.r2l(lt.tick0),lr=lt.l2r(fr).replace(/(^-|i)/g,""),Tr=lr.length;if(String(rt).charAt(0)==="M")Tr>10||lr.slice(5)!=="01-01"?lt._tickround="d":lt._tickround=+rt.slice(1)%12===0?"y":"m";else if(rt>=f&&Tr<=10||rt>=f*15)lt._tickround="d";else if(rt>=x&&Tr<=16||rt>=A)lt._tickround="M";else if(rt>=z&&Tr<=19||rt>=x)lt._tickround="S";else{var Ir=lt.l2r(fr+rt).replace(/^-/,"").length;lt._tickround=Math.max(Tr,Ir)-20,lt._tickround<0&&(lt._tickround=4)}}else if(b(rt)||rt.charAt(0)==="L"){var Dr=lt.range.map(lt.r2d||Number);b(rt)||(rt=Number(rt.slice(1))),lt._tickround=2-Math.floor(Math.log(rt)/Math.LN10+.01);var ot=Math.max(Math.abs(Dr[0]),Math.abs(Dr[1])),kt=Math.floor(Math.log(ot)/Math.LN10+.01),jt=lt.minexponent===void 0?3:lt.minexponent;Math.abs(kt)>jt&&(Mt(lt.exponentformat)&<.exponentformat!=="SI extended"&&!pt(kt)||Mt(lt.exponentformat)&<.exponentformat==="SI extended"&&!Pt(kt)?lt._tickexponent=3*Math.round((kt-1)/3):lt._tickexponent=kt)}else lt._tickround=null}H.tickIncrement=function(lt,rt,fr,lr){var Tr=fr?-1:1;if(b(rt))return l.increment(lt,Tr*rt);var Ir=rt.charAt(0),Dr=Tr*Number(rt.slice(1));if(Ir==="M")return l.incrementMonth(lt,Dr,lr);if(Ir==="L")return Math.log(Math.pow(10,lt)+Dr)/Math.LN10;if(Ir==="D"){var ot=rt==="D2"?$t:At,kt=lt+Tr*.01,jt=l.roundUp(l.mod(kt,1),ot,fr);return Math.floor(kt)+Math.log(p.round(Math.pow(10,jt),1))/Math.LN10}throw"unrecognized dtick "+String(rt)},H.tickFirst=function(lt,rt){var fr=lt.r2l||Number,lr=l.simpleMap(lt.range,fr,void 0,void 0,rt),Tr=lr[1]=0&&ai<=lt._length?tn:null};if(kt&&l.isArrayOrTypedArray(lt.ticktext)){var Lr=l.simpleMap(lt.range,lt.r2l),aa=(Math.abs(Lr[1]-Lr[0])-(lt._lBreaks||0))/1e4;for(xr=0;xr"+ot;else{var jt=en(lt),ar=lt._trueSide||lt.side;(!jt&&ar==="top"||jt&&ar==="bottom")&&(Dr+="
")}rt.text=Dr}function vt(lt,rt,fr,lr,Tr){var Ir=lt.dtick,Dr=rt.x,ot=lt.tickformat,kt=typeof Ir=="string"&&Ir.charAt(0);if(Tr==="never"&&(Tr=""),lr&&kt!=="L"&&(Ir="L3",kt="L"),ot||kt==="L")rt.text=qt(Math.pow(10,Dr),lt,Tr,lr);else if(b(Ir)||kt==="D"&&(lt.minorloglabels==="complete"||l.mod(Dr+.01,1)<.1)){var jt;lt.minorloglabels==="complete"&&!(l.mod(Dr+.01,1)<.1)&&(jt=!0,rt.fontSize*=.75);var ar=Math.pow(10,Dr).toExponential(0),Er=ar.split("e"),xr=+Er[1],zr=Math.abs(xr),Lr=lt.exponentformat;Lr==="power"||Mt(Lr)&&Lr!=="SI extended"&&pt(xr)||Mt(Lr)&&Lr==="SI extended"&&Pt(xr)?(rt.text=Er[0],zr>0&&(rt.text+="x10"),rt.text==="1x10"&&(rt.text="10"),xr!==0&&xr!==1&&(rt.text+=""+(xr>0?"":D)+zr+""),rt.fontSize*=1.25):(Lr==="e"||Lr==="E")&&zr>2?rt.text=Er[0]+Lr+(xr>0?"+":D)+zr:(rt.text=qt(Math.pow(10,Dr),lt,"","fakehover"),Ir==="D1"&<._id.charAt(0)==="y"&&(rt.dy-=rt.fontSize/6))}else if(kt==="D")rt.text=lt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(Dr,1)))),rt.fontSize*=.75;else throw"unrecognized dtick "+String(Ir);if(lt.dtick==="D1"){var aa=String(rt.text).charAt(0);(aa==="0"||aa==="1")&&(lt._id.charAt(0)==="y"?rt.dx-=rt.fontSize/4:(rt.dy+=rt.fontSize/2,rt.dx+=(lt.range[1]>lt.range[0]?1:-1)*rt.fontSize*(Dr<0?.5:.25)))}}function ht(lt,rt){var fr=lt._categories[Math.round(rt.x)];fr===void 0&&(fr=""),rt.text=String(fr)}function De(lt,rt,fr){var lr=Math.round(rt.x),Tr=lt._categories[lr]||[],Ir=Tr[1]===void 0?"":String(Tr[1]),Dr=Tr[0]===void 0?"":String(Tr[0]);fr?rt.text=Dr+" - "+Ir:(rt.text=Ir,rt.text2=Dr)}function Ne(lt,rt,fr,lr,Tr){Tr==="never"?Tr="":lt.showexponent==="all"&&Math.abs(rt.x/lt.dtick)<1e-6&&(Tr="hide"),rt.text=qt(rt.x,lt,Tr,lr)}function We(lt,rt,fr,lr,Tr){if(lt.thetaunit==="radians"&&!fr){var Ir=rt.x/180;if(Ir===0)rt.text="0";else{var Dr=Ke(Ir);if(Dr[1]>=100)rt.text=qt(l.deg2rad(rt.x),lt,Tr,lr);else{var ot=rt.x<0;Dr[1]===1?Dr[0]===1?rt.text="\u03C0":rt.text=Dr[0]+"\u03C0":rt.text=["",Dr[0],"","\u2044","",Dr[1],"","\u03C0"].join(""),ot&&(rt.text=D+rt.text)}}}else rt.text=qt(rt.x,lt,Tr,lr)}function Ke(lt){function rt(ot,kt){return Math.abs(ot-kt)<=1e-6}function fr(ot,kt){return rt(kt,0)?ot:fr(kt,ot%kt)}function lr(ot){for(var kt=1;!rt(Math.round(ot*kt)/kt,ot);)kt*=10;return kt}var Tr=lr(lt),Ir=lt*Tr,Dr=Math.abs(fr(Ir,Tr));return[Math.round(Ir/Dr),Math.round(Tr/Dr)]}var Je=["f","p","n","\u03BC","m","","k","M","G","T"],et=["q","r","y","z","a",...Je,"P","E","Z","Y","R","Q"],Mt=lt=>["SI","SI extended","B"].includes(lt);function pt(lt){return lt>14||lt<-15}function Pt(lt){return lt>32||lt<-30}function Ct(lt,rt){return Mt(rt)?!!(rt==="SI extended"&&Pt(lt)||rt!=="SI extended"&&pt(lt)):!1}function qt(lt,rt,fr,lr){var Tr=lt<0,Ir=rt._tickround,Dr=fr||rt.exponentformat||"B",ot=rt._tickexponent,kt=H.getTickFormat(rt),jt=rt.separatethousands;if(lr){var ar={exponentformat:Dr,minexponent:rt.minexponent,dtick:rt.showexponent==="none"?rt.dtick:b(lt)&&Math.abs(lt)||1,range:rt.showexponent==="none"?rt.range.map(rt.r2d):[0,lt||1]};Xt(ar),Ir=(Number(ar._tickround)||0)+4,ot=ar._tickexponent,rt.hoverformat&&(kt=rt.hoverformat)}if(kt)return rt._numFormat(kt)(lt).replace(/-/g,D);Dr==="none"&&(ot=0),lt=Math.abs(lt);let Er=Math.pow(10,-Ir)/2;if(lt"+xr+"":Dr==="B"&&ot===9?lt+="B":Mt(Dr)&&(lt+=Dr==="SI extended"?et[ot/3+10]:Je[ot/3+5])}return Tr?D+lt:lt}H.getTickFormat=function(lt){var rt;function fr(kt){return typeof kt!="string"?kt:Number(kt.replace("M",""))*C}function lr(kt,jt){var ar=["L","D"];if(typeof kt==typeof jt){if(typeof kt=="number")return kt-jt;var Er=ar.indexOf(kt.charAt(0)),xr=ar.indexOf(jt.charAt(0));return Er===xr?Number(kt.replace(/(L|D)/g,""))-Number(jt.replace(/(L|D)/g,"")):Er-xr}else return typeof kt=="number"?1:-1}function Tr(kt,jt,ar){var Er=ar||function(Lr){return Lr},xr=jt[0],zr=jt[1];return(!xr&&typeof xr!="number"||Er(xr)<=Er(kt))&&(!zr&&typeof zr!="number"||Er(zr)>=Er(kt))}function Ir(kt,jt){var ar=jt[0]===null,Er=jt[1]===null,xr=lr(kt,jt[0])>=0,zr=lr(kt,jt[1])<=0;return(ar||xr)&&(Er||zr)}var Dr,ot;if(lt.tickformatstops&<.tickformatstops.length>0)switch(lt.type){case"date":case"linear":{for(rt=0;rt=0&&Tr.unshift(Tr.splice(ar,1).shift())}});var ot={false:{left:0,right:0}};return l.syncOrAsync(Tr.map(function(kt){return function(){if(kt){var jt=H.getFromId(lt,kt);fr||(fr={}),fr.axShifts=ot,fr.overlayingShiftedAx=Dr;var ar=H.drawOne(lt,jt,fr);return jt._shiftPusher&&Yi(jt,jt._fullDepth||0,ot,!0),jt._r=jt.range.slice(),jt._rl=l.simpleMap(jt._r,jt.r2l),ar}}}))},H.drawOne=function(lt,rt,fr){fr=fr||{};var lr=fr.axShifts||{},Tr=fr.overlayingShiftedAx||[],Ir,Dr,ot;rt.setScale();var kt=lt._fullLayout,jt=rt._id,ar=jt.charAt(0),Er=H.counterLetter(jt),xr=kt._plots[rt._mainSubplot],zr=rt.zerolinelayer==="above traces";if(!xr)return;if(rt._shiftPusher=rt.autoshift||Tr.indexOf(rt._id)!==-1||Tr.indexOf(rt.overlaying)!==-1,rt._shiftPusher&rt.anchor==="free"){var Lr=rt.linewidth/2||0;rt.ticks==="inside"&&(Lr+=rt.ticklen),Yi(rt,Lr,lr,!0),Yi(rt,rt.shift||0,lr,!1)}(fr.skipTitle!==!0||rt._shift===void 0)&&(rt._shift=Ja(rt,lr));var aa=xr[ar+"axislayer"],Sa=rt._mainLinePosition,wa=Sa+=rt._shift,pn=rt._mainMirrorPosition,tn=rt._vals=H.calcTicks(rt),ai=[rt.mirror,wa,pn].join("_");for(Ir=0;Ir0?_o.bottom-Ts:0,Bo))));var Dl=0,hl=0;if(rt._shiftPusher&&(Dl=Math.max(Bo,_o.height>0?Vo==="l"?Ts-_o.left:_o.right-Ts:0),rt.title.text!==kt._dfltTitle[ar]&&(hl=(rt._titleStandoff||0)+(rt._titleScoot||0),Vo==="l"&&(hl+=Rr(rt))),rt._fullDepth=Math.max(Dl,hl)),rt.automargin){Pi={x:0,y:0,r:0,l:0,t:0,b:0};var ps=[0,1],dl=typeof rt._shift=="number"?rt._shift:0;if(ar==="x"){if(Vo==="b"?Pi[Vo]=rt._depth:(Pi[Vo]=rt._depth=Math.max(_o.width>0?Ts-_o.top:0,Bo),ps.reverse()),_o.width>0){var wu=_o.right-(rt._offset+rt._length);wu>0&&(Pi.xr=1,Pi.r=wu);var lu=rt._offset-_o.left;lu>0&&(Pi.xl=0,Pi.l=lu)}}else if(Vo==="l"?(rt._depth=Math.max(_o.height>0?Ts-_o.left:0,Bo),Pi[Vo]=rt._depth-dl):(rt._depth=Math.max(_o.height>0?_o.right-Ts:0,Bo),Pi[Vo]=rt._depth+dl,ps.reverse()),_o.height>0){var xc=_o.bottom-(rt._offset+rt._length);xc>0&&(Pi.yb=0,Pi.b=xc);var Fl=rt._offset-_o.top;Fl>0&&(Pi.yt=1,Pi.t=Fl)}Pi[Er]=rt.anchor==="free"?rt.position:rt._anchorAxis.domain[ps[0]],rt.title.text!==kt._dfltTitle[ar]&&(Pi[Vo]+=Rr(rt)+(rt.title.standoff||0)),rt.mirror&&rt.anchor!=="free"&&(yo={x:0,y:0,r:0,l:0,t:0,b:0},yo[Vs]=rt.linewidth,rt.mirror&&rt.mirror!==!0&&(yo[Vs]+=Bo),rt.mirror===!0||rt.mirror==="ticks"?yo[Er]=rt._anchorAxis.domain[ps[1]]:(rt.mirror==="all"||rt.mirror==="allticks")&&(yo[Er]=[rt._counterDomainMin,rt._counterDomainMax][ps[1]]))}Ss&&(bs=k.getComponentMethod("rangeslider","autoMarginOpts")(lt,rt)),typeof rt.automargin=="string"&&(Vt(Pi,rt.automargin),Vt(yo,rt.automargin)),E.autoMargin(lt,un(rt),Pi),E.autoMargin(lt,Xa(rt),yo),E.autoMargin(lt,ja(rt),bs)}),l.syncOrAsync(Uo)}};function Vt(lt,rt){if(lt){var fr=Object.keys(Q).reduce(function(lr,Tr){return rt.indexOf(Tr)!==-1&&Q[Tr].forEach(function(Ir){lr[Ir]=1}),lr},{});Object.keys(lt).forEach(function(lr){fr[lr]||(lr.length===1?lt[lr]=0:delete lt[lr])})}}function Ht(lt,rt){var fr=[],lr,Tr=function(Ir,Dr){var ot=Ir.xbnd[Dr];ot!==null&&fr.push(l.extendFlat({},Ir,{x:ot}))};if(rt.length){for(lr=0;lrlt.range[1],ot=lt.ticklabelposition&<.ticklabelposition.indexOf("inside")!==-1,kt=!ot;if(fr){var jt=Dr?-1:1;fr=fr*jt}if(lr){var ar=lt.side,Er=ot&&(ar==="top"||ar==="left")||kt&&(ar==="bottom"||ar==="right")?1:-1;lr=lr*Er}return lt._id.charAt(0)==="x"?function(xr){return e(Tr+lt._offset+lt.l2p(Rt(xr))+fr,Ir+lr)}:function(xr){return e(Ir+lr,Tr+lt._offset+lt.l2p(Rt(xr))+fr)}};function Rt(lt){return lt.periodX!==void 0?lt.periodX:lt.x}function nr(lt){var rt=lt.ticklabelposition||"",fr=lt.tickson||"",lr=function(Lr){return rt.indexOf(Lr)!==-1},Tr=lr("top"),Ir=lr("left"),Dr=lr("right"),ot=lr("bottom"),kt=lr("inside"),jt=fr!=="boundaries"&&(ot||Ir||Tr||Dr);if(!jt&&!kt)return[0,0];var ar=lt.side,Er=jt?(lt.tickwidth||0)/2:0,xr=K,zr=lt.tickfont?lt.tickfont.size:12;return(ot||Tr)&&(Er+=zr*se,xr+=(lt.linewidth||0)/2),(Ir||Dr)&&(Er+=(lt.linewidth||0)/2,xr+=K),kt&&ar==="top"&&(xr-=zr*(1-se)),(Ir||Tr)&&(Er=-Er),(ar==="bottom"||ar==="right")&&(xr=-xr),[jt?Er:0,kt?xr:0]}H.makeTickPath=function(lt,rt,fr,lr){lr||(lr={});var Tr=lr.minor;if(Tr&&!lt.minor)return"";var Ir=lr.len!==void 0?lr.len:Tr?lt.minor.ticklen:lt.ticklen,Dr=lt._id.charAt(0),ot=(lt.linewidth||1)/2;return Dr==="x"?"M0,"+(rt+ot*fr)+"v"+Ir*fr:"M"+(rt+ot*fr)+",0h"+Ir*fr},H.makeLabelFns=function(lt,rt,fr){var lr=lt.ticklabelposition||"",Tr=lt.tickson||"",Ir=function(Xn){return lr.indexOf(Xn)!==-1},Dr=Ir("top"),ot=Ir("left"),kt=Ir("right"),jt=Ir("bottom"),ar=Tr!=="boundaries"&&(jt||ot||Dr||kt),Er=Ir("inside"),xr=lr==="inside"&<.ticks==="inside"||!Er&<.ticks==="outside"&&Tr!=="boundaries",zr=0,Lr=0,aa=xr?lt.ticklen:0;if(Er?aa*=-1:ar&&(aa=0),xr&&(zr+=aa,fr)){var Sa=l.deg2rad(fr);zr=aa*Math.cos(Sa)+1,Lr=aa*Math.sin(Sa)}lt.showticklabels&&(xr||lt.showline)&&(zr+=.2*lt.tickfont.size),zr+=(lt.linewidth||1)/2*(Er?-1:1);var wa={labelStandoff:zr,labelShift:Lr},pn,tn,ai,rn,Ri=0,Gn=lt.side,no=lt._id.charAt(0),Di=lt.tickangle,fn;if(no==="x")fn=!Er&&Gn==="bottom"||Er&&Gn==="top",rn=fn?1:-1,Er&&(rn*=-1),pn=Lr*rn,tn=rt+zr*rn,ai=fn?1:-.2,Math.abs(Di)===90&&(Er?ai+=ne:Di===-90&&Gn==="bottom"?ai=se:Di===90&&Gn==="top"?ai=ne:ai=.5,Ri=ne/2*(Di/90)),wa.xFn=function(Xn){return Xn.dx+pn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ai},wa.anchorFn=function(Xn,eo){if(ar){if(ot)return"end";if(kt)return"start"}return!b(eo)||eo===0||eo===180?"middle":eo*rn<0!==Er?"end":"start"},wa.heightFn=function(Xn,eo,gi){return eo<-60||eo>60?-.5*gi:lt.side==="top"!==Er?-gi:0};else if(no==="y"){if(fn=!Er&&Gn==="left"||Er&&Gn==="right",rn=fn?1:-1,Er&&(rn*=-1),pn=zr,tn=Lr*rn,ai=0,!Er&&Math.abs(Di)===90&&(Di===-90&&Gn==="left"||Di===90&&Gn==="right"?ai=se:ai=.5),Er){var Ai=b(Di)?+Di:0;if(Ai!==0){var jn=l.deg2rad(Ai);Ri=Math.abs(Math.sin(jn))*se*rn,ai=0}}wa.xFn=function(Xn){return Xn.dx+rt-(pn+Xn.fontSize*ai)*rn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ne},wa.anchorFn=function(Xn,eo){return b(eo)&&Math.abs(eo)===90?"middle":fn?"end":"start"},wa.heightFn=function(Xn,eo,gi){return lt.side==="right"&&(eo*=-1),eo<-30?-gi:eo<30?-.5*gi:0}}return wa};function ur(lt){return[lt.text,lt.x,lt.axInfo,lt.font,lt.fontSize,lt.fontColor].join("_")}H.drawTicks=function(lt,rt,fr){fr=fr||{};var lr=rt._id+"tick",Tr=[].concat(rt.minor&&rt.minor.ticks?fr.vals.filter(function(Dr){return Dr.minor&&!Dr.noTick}):[]).concat(rt.ticks?fr.vals.filter(function(Dr){return!Dr.minor&&!Dr.noTick}):[]),Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("ticks",1).classed("crisp",fr.crisp!==!1).each(function(Dr){return r.stroke(p.select(this),Dr.minor?rt.minor.tickcolor:rt.tickcolor)}).style("stroke-width",function(Dr){return a.crispRound(lt,Dr.minor?rt.minor.tickwidth:rt.tickwidth,1)+"px"}).attr("d",fr.path).style("display",null),vi(rt,[U]),Ir.attr("transform",fr.transFn)},H.drawGrid=function(lt,rt,fr){if(fr=fr||{},rt.tickmode!=="sync"){var lr=rt._id+"grid",Tr=rt.minor&&rt.minor.showgrid,Ir=Tr?fr.vals.filter(function(wa){return wa.minor}):[],Dr=rt.showgrid?fr.vals.filter(function(wa){return!wa.minor}):[],ot=fr.counterAxis;if(ot&&H.shouldShowZeroLine(lt,rt,ot))for(var kt=rt.tickmode==="array",jt=0;jt=0;Lr--){var aa=Lr?xr:zr;if(aa){var Sa=aa.selectAll("path."+lr).data(Lr?Dr:Ir,ur);Sa.exit().remove(),Sa.enter().append("path").classed(lr,1).classed("crisp",fr.crisp!==!1),Sa.attr("transform",fr.transFn).attr("d",fr.path).each(function(wa){return r.stroke(p.select(this),wa.minor?rt.minor.gridcolor:rt.gridcolor||"#ddd")}).style("stroke-dasharray",function(wa){return a.dashStyle(wa.minor?rt.minor.griddash:rt.griddash,wa.minor?rt.minor.gridwidth:rt.gridwidth)}).style("stroke-width",function(wa){return(wa.minor?Er:rt._gw)+"px"}).style("display",null),typeof fr.path=="function"&&Sa.attr("d",fr.path)}}vi(rt,[P,j])}},H.drawZeroLine=function(lt,rt,fr){fr=fr||fr;var lr=rt._id+"zl",Tr=H.shouldShowZeroLine(lt,rt,fr.counterAxis),Ir=fr.layer.selectAll("path."+lr).data(Tr?[{x:0,id:rt._id}]:[]);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("zl",1).classed("crisp",fr.crisp!==!1).each(function(){fr.layer.selectAll("path").sort(function(Dr,ot){return Z(Dr.id,ot.id)})}),Ir.attr("transform",fr.transFn).attr("d",fr.path).call(r.stroke,rt.zerolinecolor||r.defaultLine).style("stroke-width",a.crispRound(lt,rt.zerolinewidth,rt._gw||1)+"px").style("display",null),vi(rt,[F])},H.drawLabels=function(lt,rt,fr){fr=fr||{};var lr=lt._fullLayout,Tr=rt._id,Ir=rt.zerolinelayer==="above traces",Dr=fr.cls||Tr+"tick",ot=fr.vals.filter(function(Vn){return Vn.text}),kt=fr.labelFns,jt=fr.secondary?0:rt.tickangle,ar=(rt._prevTickAngles||{})[Dr],Er=fr.layer.selectAll("g."+Dr).data(rt.showticklabels?ot:[],ur),xr=[];Er.enter().append("g").classed(Dr,1).append("text").attr("text-anchor","middle").each(function(Vn){var qn=p.select(this),Hi=lt._promises.length;qn.call(t.positionText,kt.xFn(Vn),kt.yFn(Vn)).call(a.font,{family:Vn.font,size:Vn.fontSize,color:Vn.fontColor,weight:Vn.fontWeight,style:Vn.fontStyle,variant:Vn.fontVariant,textcase:Vn.fontTextcase,lineposition:Vn.fontLineposition,shadow:Vn.fontShadow}).text(Vn.text).call(t.convertToTspans,lt),lt._promises[Hi]?xr.push(lt._promises.pop().then(function(){zr(qn,jt)})):zr(qn,jt)}),vi(rt,[$]),Er.exit().remove(),fr.repositionOnUpdate&&Er.each(function(Vn){p.select(this).select("text").call(t.positionText,kt.xFn(Vn),kt.yFn(Vn))});function zr(Vn,qn){Vn.each(function(Hi){var Mi=p.select(this),Ro=Mi.select(".text-math-group"),go=kt.anchorFn(Hi,qn),Eo=fr.transFn.call(Mi.node(),Hi)+(b(qn)&&+qn!=0?" rotate("+qn+","+kt.xFn(Hi)+","+(kt.yFn(Hi)-Hi.fontSize/2)+")":""),Ao=t.lineCount(Mi),ds=G*Hi.fontSize,jo=kt.heightFn(Hi,b(qn)?+qn:0,(Ao-1)*ds);if(jo&&(Eo+=e(0,jo)),Ro.empty()){var Wo=Mi.select("text");Wo.attr({transform:Eo,"text-anchor":go}),Wo.style("display",null),rt._adjustTickLabelsOverflow&&rt._adjustTickLabelsOverflow()}else{var to=a.bBox(Ro.node()).width,wo=to*{end:-.5,start:.5}[go];Ro.attr("transform",Eo+e(wo,0))}})}rt._adjustTickLabelsOverflow=function(){var Vn=rt.ticklabeloverflow;if(!(!Vn||Vn==="allow")){var qn=Vn.indexOf("hide")!==-1,Hi=rt._id.charAt(0)==="x",Mi=0,Ro=Hi?lt._fullLayout.width:lt._fullLayout.height;if(Vn.indexOf("domain")!==-1){var go=l.simpleMap(rt.range,rt.r2l);Mi=rt.l2p(go[0])+rt._offset,Ro=rt.l2p(go[1])+rt._offset}var Eo=Math.min(Mi,Ro),Ao=Math.max(Mi,Ro),ds=rt.side,jo=1/0,Wo=-1/0;Er.each(function(Vi){var Io=p.select(this),Xi=Io.select(".text-math-group");if(Xi.empty()){var Ko=a.bBox(Io.node()),Uo=0;Hi?(Ko.right>Ao||Ko.leftAo||Ko.top+(rt.tickangle?0:Vi.fontSize/4)rt["_visibleLabelMin_"+go._id]?Io.style("display","none"):Ao.K==="tick"&&!Eo&&Io.node().style.display!=="none"&&Io.style("display",null)})})})})},zr(Er,ar+1?ar:jt);function Lr(){return xr.length&&Promise.all(xr)}var aa=null;function Sa(){if(zr(Er,jt),ot.length&&rt.autotickangles&&(rt.type!=="log"||String(rt.dtick).charAt(0)!=="D")){aa=rt.autotickangles[0];var Vn=0,qn=[],Hi,Mi=1;Er.each(function(Pi){Vn=Math.max(Vn,Pi.fontSize);var yo=rt.l2p(Pi.x),bs=La(this),Dl=a.bBox(bs.node());Mi=Math.max(Mi,t.lineCount(bs)),qn.push({top:0,bottom:10,height:10,left:yo-Dl.width/2,right:yo+Dl.width/2+2,width:Dl.width+2})});var Ro=(rt.tickson==="boundaries"||rt.showdividers)&&!fr.secondary,go=ot.length,Eo=Math.abs((ot[go-1].x-ot[0].x)*rt._m)/(go-1),Ao=Ro?Eo/2:Eo,ds=Ro?rt.ticklen:Vn*1.25*Mi,jo=Math.sqrt(Math.pow(Ao,2)+Math.pow(ds,2)),Wo=Ao/jo,to=rt.autotickangles.map(function(Pi){return Pi*Math.PI/180}),wo=to.find(function(Pi){return Math.abs(Math.cos(Pi))<=Wo});wo===void 0&&(wo=to.reduce(function(Pi,yo){return Math.abs(Math.cos(Pi))qi*gi&&(jn=gi,Di[no]=fn[no]=Xn[no])}var io=Math.abs(jn-Ai);io-rn>0?(io-=rn,rn*=1+rn/io):rn=0,rt._id.charAt(0)!=="y"&&(rn=-rn),Di[Gn]=tn.p2r(tn.r2p(fn[Gn])+Ri*rn),tn.autorange==="min"||tn.autorange==="max reversed"?(Di[0]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0):(tn.autorange==="max"||tn.autorange==="min reversed")&&(Di[1]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0),lr._insideTickLabelsUpdaterange[tn._name+".range"]=Di}var oo=l.syncOrAsync(wa);return oo&&oo.then&<._promises.push(oo),oo};function cr(lt,rt,fr){var lr=rt._id+"divider",Tr=fr.vals,Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().insert("path",":first-child").classed(lr,1).classed("crisp",1).call(r.stroke,rt.dividercolor).style("stroke-width",a.crispRound(lt,rt.dividerwidth,1)+"px"),Ir.attr("transform",fr.transFn).attr("d",fr.path)}H.getPxPosition=function(lt,rt){var fr=lt._fullLayout._size,lr=rt._id.charAt(0),Tr=rt.side,Ir;if(rt.anchor!=="free"?Ir=rt._anchorAxis:lr==="x"?Ir={_offset:fr.t+(1-(rt.position||0))*fr.h,_length:0}:lr==="y"&&(Ir={_offset:fr.l+(rt.position||0)*fr.w+rt._shift,_length:0}),Tr==="top"||Tr==="left")return Ir._offset;if(Tr==="bottom"||Tr==="right")return Ir._offset+Ir._length};function Rr(lt){var rt=lt.title.font.size,fr=(lt.title.text.match(t.BR_TAG_ALL)||[]).length;return lt.title.hasOwnProperty("standoff")?rt*(se+fr*G):fr?rt*(fr+1)*G:rt}function Qr(lt,rt){var fr=lt._fullLayout,lr=rt._id,Tr=lr.charAt(0),Ir=rt.title.font.size,Dr,ot=(rt.title.text.match(t.BR_TAG_ALL)||[]).length;if(rt.title.hasOwnProperty("standoff"))rt.side==="bottom"||rt.side==="right"?Dr=rt._depth+rt.title.standoff+Ir*se:(rt.side==="top"||rt.side==="left")&&(Dr=rt._depth+rt.title.standoff+Ir*(ne+ot*G));else{var kt=en(rt);if(rt.type==="multicategory")Dr=rt._depth;else{var jt=1.5*Ir;kt&&(jt=.5*Ir,rt.ticks==="outside"&&(jt+=rt.ticklen)),Dr=10+jt+(rt.linewidth?rt.linewidth-1:0)}kt||(Tr==="x"?Dr+=rt.side==="top"?Ir*(rt.showticklabels?1:0):Ir*(rt.showticklabels?1.5:.5):Dr+=rt.side==="right"?Ir*(rt.showticklabels?1:.5):Ir*(rt.showticklabels?.5:0))}var ar=H.getPxPosition(lt,rt),Er,xr,zr;Tr==="x"?(xr=rt._offset+rt._length/2,zr=rt.side==="top"?ar-Dr:ar+Dr):(zr=rt._offset+rt._length/2,xr=rt.side==="right"?ar+Dr:ar-Dr,Er={rotate:"-90",offset:0});var Lr;if(rt.type!=="multicategory"){var aa=rt._selections[rt._id+"tick"];if(Lr={selection:aa,side:rt.side},aa&&aa.node()&&aa.node().parentNode){var Sa=a.getTranslate(aa.node().parentNode);Lr.offsetLeft=Sa.x,Lr.offsetTop=Sa.y}rt.title.hasOwnProperty("standoff")&&(Lr.pad=0)}return rt._titleStandoff=Dr,n.draw(lt,lr+"title",{propContainer:rt,propName:rt._name+".title.text",placeholder:fr._dfltTitle[Tr],avoid:Lr,transform:Er,attributes:{x:xr,y:zr,"text-anchor":"middle"}})}H.shouldShowZeroLine=function(lt,rt,fr){var lr=l.simpleMap(rt.range,rt.r2l);return lr[0]*lr[1]<=0&&rt.zeroline&&(rt.type==="linear"||rt.type==="-")&&!(rt.rangebreaks&&rt.maskBreaks(0)===B)&&(Zr(rt,0)||!ha(lt,rt,fr,lr)||Pa(lt,rt))},H.clipEnds=function(lt,rt){return rt.filter(function(fr){return Zr(lt,fr.x)})};function Zr(lt,rt){var fr=lt.l2p(rt);return fr>1&&fr1)for(Tr=1;Tr=Tr.min&<=O:/%L/.test(rt)?lt>=I:/%[SX]/.test(rt)?lt>=z:/%M/.test(rt)?lt>=x:/%[HI]/.test(rt)?lt>=A:/%p/.test(rt)?lt>=u:/%[Aadejuwx]/.test(rt)?lt>=f:/%[UVW]/.test(rt)?lt>=T:/%[Bbm]/.test(rt)?lt>=_:/%[q]/.test(rt)?lt>=S:/%[Yy]/.test(rt)?lt>=g:!0}}}),Jw=ze({"src/plots/cartesian/autorange_options_defaults.js"(J,V){"use strict";V.exports=function(b,E,k){var l,e;if(k){var t=E==="reversed"||E==="min reversed"||E==="max reversed";l=k[t?1:0],e=k[t?0:1]}var n=b("autorangeoptions.minallowed",e===null?l:void 0),r=b("autorangeoptions.maxallowed",l===null?e:void 0);n===void 0&&b("autorangeoptions.clipmin"),r===void 0&&b("autorangeoptions.clipmax"),b("autorangeoptions.include")}}}),Qw=ze({"src/plots/cartesian/range_defaults.js"(J,V){"use strict";var p=Jw();V.exports=function(E,k,l,e){var t=k._template||{},n=k.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var a;!e.noInsiderange&&n!=="log"&&(a=l("insiderange"),a&&(a[0]===null||a[1]===null)&&(k.insiderange=!1,a=void 0),a&&(r=l("range",a)))}var o=k.getAutorangeDflt(r,e),s=l("autorange",o),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete k.range,k.autorange=!0,c=!0),c||(o=k.getAutorangeDflt(r,e),s=l("autorange",o)),s&&(p(l,s,r),(n==="linear"||n==="-")&&l("rangemode")),k.cleanRange()}}}),VI=ze({"node_modules/mouse-event-offset/index.js"(J,V){var p={left:0,top:0};V.exports=b;function b(k,l,e){l=l||k.currentTarget||k.srcElement,Array.isArray(e)||(e=[0,0]);var t=k.clientX||0,n=k.clientY||0,r=E(l);return e[0]=t-r.left,e[1]=n-r.top,e}function E(k){return k===window||k===document||k===document.body?p:k.getBoundingClientRect()}}}),Rx=ze({"node_modules/has-passive-events/index.js"(J,V){"use strict";var p=Vw();function b(){var E=!1;try{var k=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("test",null,k),window.removeEventListener("test",null,k)}catch{E=!1}return E}V.exports=p&&b()}}),GI=ze({"src/components/dragelement/align.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=(b-k)/(l-k),n=t+E/(l-k),r=(t+n)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?n:t<2/3-r?t:n>4/3-r?n:r}}}),HI=ze({"src/components/dragelement/cursor.js"(J,V){"use strict";var p=Nr(),b=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];V.exports=function(k,l,e,t){return e==="left"?k=0:e==="center"?k=1:e==="right"?k=2:k=p.constrain(Math.floor(k*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=p.constrain(Math.floor(l*3),0,2),b[l][k]}}}),WI=ze({"src/components/dragelement/unhover.js"(J,V){"use strict";var p=Hm(),b=Cx(),E=i1().getGraphDiv,k=a1(),l=V.exports={};l.wrapped=function(e,t,n){var r;e=E(e),e._fullLayout&&b.clear(e._fullLayout._uid+k.HOVERID);let a=e._hoverdata;l.raw(e,t,n)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(r=e._fullLayout)!=null&&r.hoveranywhere&&t?.target&&!a&&e.emit("plotly_unhover",{event:t,points:[]}))},l.raw=function(t,n){var r=t._fullLayout,a=t._hoverdata;return n||(n={}),n.target&&!t._dragged&&p.triggerHandler(t,"plotly_beforehover",n)===!1?!1:(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,n.target&&a&&t.emit("plotly_unhover",{event:n,points:a}),!0)}}}),_h=ze({"src/components/dragelement/index.js"(J,V){"use strict";var p=VI(),b=Gw(),E=Rx(),k=Nr().removeElement,l=hc(),e=V.exports={};e.align=GI(),e.getCursor=HI();var t=WI();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(o){var s=o.gd,c=1,m=s._context.doubleClickDelay,h=o.element,v,g,i,w,S,M,C,_;s._mouseDownTime||(s._mouseDownTime=0),h.style.pointerEvents="all",h.onmousedown=u,E?(h._ontouchstart&&h.removeEventListener("touchstart",h._ontouchstart),h._ontouchstart=u,h.addEventListener("touchstart",u,{passive:!1})):h.ontouchstart=u;function T(z,I,O){return Math.abs(z)"u"&&typeof z.clientY>"u"&&(z.clientX=v,z.clientY=g),i=new Date().getTime(),i-s._mouseDownTimem&&(c=Math.max(c-1,1)),s._dragged)o.doneFn&&o.doneFn();else{var I;M.target===C?I=M:(I={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(O=>{var D=M[O];!I[O]&&typeof D!="function"&&(I[O]=D)})),o.clickFn&&o.clickFn(c,I),_||C.dispatchEvent(new MouseEvent("click",z))}s._dragging=!1,s._dragged=!1}};function n(){var a=document.createElement("div");a.className="dragcover";var o=a.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(a),a}e.coverSlip=n;function r(a){return p(a.changedTouches?a.changedTouches[0]:a,document.body)}}}),gd=ze({"src/lib/setcursor.js"(J,V){"use strict";V.exports=function(b,E){(b.attr("class")||"").split(" ").forEach(function(k){k.indexOf("cursor-")===0&&b.classed(k,!1)}),E&&b.classed("cursor-"+E,!0)}}}),YI=ze({"src/lib/override_cursor.js"(J,V){"use strict";var p=gd(),b="data-savedcursor",E="!!";V.exports=function(l,e){var t=l.attr(b);if(e){if(!t){for(var n=(l.attr("class")||"").split(" "),r=0;rX.legend.length)for(var Y=X.legend.length;Y(r==="legend"?1:0));if(O===!1&&(o[r]=void 0),!(O===!1&&!m.uirevision)&&(v("uirevision",o.uirevision),O!==!1)){v("borderwidth");var D=v("orientation"),B=v("yref"),F=v("xref"),P=D==="h",j=B==="paper",U=F==="paper",$,Q,re,ne="left";P?($=0,p.getComponentMethod("rangeslider","isVisible")(a.xaxis)?j?(Q=1.1,re="bottom"):(Q=1,re="top"):j?(Q=-.1,re="top"):(Q=0,re="bottom")):(Q=1,re="auto",U?$=1.02:($=1,ne="right")),b.coerce(m,h,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"x"),b.coerce(m,h,{y:{valType:"number",editType:"legend",min:j?-2:0,max:j?3:1,dflt:Q}},"y"),v("traceorder",f),t.isGrouped(o[r])&&v("tracegroupgap"),v("entrywidth"),v("entrywidthmode"),v("indentation"),v("itemsizing"),v("itemwidth"),v("itemclick"),v("itemdoubleclick"),v("groupclick"),v("xanchor",ne),v("yanchor",re),v("maxheight"),v("valign"),b.noneOrAll(m,h,["x","y"]);var se=v("title.text");if(se){v("title.side",P?"left":"top");var G=b.extendFlat({},g,{size:b.bigFont(g.size)});b.coerceFont(v,"title.font",G);let X=c>1;v("titleclick",X?"toggle":!1),v("titledoubleclick",X?"toggleothers":!1)}}}V.exports=function(a,o,s){var c,m=s.slice(),h=o.shapes;if(h)for(c=0;cVe.showlegend||Ve.legendgroup);var g=h.concat(v),i=o.trace;i._isShape&&(i=a.shapes[i.index]);var w=i.legendgroup,S,M,C,_,T,f,u={},A=[],x=[],z=[];function I(Ve,Ge){var ke=A.indexOf(Ve),_e=u.visible;return _e||(_e=u.visible=[]),A.indexOf(Ve)===-1&&(A.push(Ve),ke=A.length-1),_e[ke]=Ge,ke}var O=(a.shapes||[]).map(function(Ve){return Ve._input}),D=!1;function B(Ve,Ge){O[Ve].visible=Ge,D=!0}function F(Ve,Ge){if(!(o.groupTitle&&!c)){var ke=Ve._isShape,_e=Ve.index;_e===void 0&&(_e=Ve._index);var ce=Ve.visible===!1?!1:Ge;ke?B(_e,ce):I(_e,ce)}}var P=i.legend;if(!i._isShape&&V.traceIs(i,"pie-like")){var j=o.label,U=m.indexOf(j);if(r==="toggle")U===-1?m.push(j):m.splice(U,1);else if(r==="toggleothers"){var $=U!==-1,Q=[];for(S=0;SC.showlegend||C.legendgroup),c=a.concat(s);function m(C){return(C.legend||"legend")===o}var h,v;if(n==="toggle")h=!c.some(function(_){return m(_)&&_.visible===!0}),v=!1;else{let C=c.some(function(_){return!m(_)&&_.visible===!0&&_.showlegend!==!1});h=!0,v=!C}let g={visible:[]},i=[],w=(r.shapes||[]).map(function(C){return C._input});for(var S=!1,M=0;MB&&(O=B)}z[g][0]._groupMinRank=O,z[g][0]._preGroupSort=g}var F=function(re,ne){return re[0]._groupMinRank-ne[0]._groupMinRank||re[0]._preGroupSort-ne[0]._preGroupSort},P=function(re,ne){var se=p(re.trace.legendrank)?re.trace.legendrank[re.i]:re.trace.legendrank,G=p(ne.trace.legendrank)?ne.trace.legendrank[ne.i]:ne.trace.legendrank;return se-G||re._preSort-ne._preSort};for(z.forEach(function(re,ne){re[0]._preGroupSort=ne}),z.sort(F),g=0;g0)Y=X.width;else return 0;return f?H:Math.min(Y,K)};M.each(function(G){var X=p.select(this),K=E.ensureSingle(X,"g","layers");K.style("opacity",G[0].trace.opacity);var H=_.indentation,Y=_.valign,q=G[0].lineHeight,Z=G[0].height;if(Y==="middle"&&H===0||!q||!Z)K.attr("transform",null);else{var ee={top:1,bottom:-1}[Y],ae=ee*(.5*(q-Z+3))||0,he=_.indentation;K.attr("transform",k(he,ae))}var xe=K.selectAll("g.legendfill").data([G]);xe.enter().append("g").classed("legendfill",!0);var we=K.selectAll("g.legendlines").data([G]);we.enter().append("g").classed("legendlines",!0);var Me=K.selectAll("g.legendsymbols").data([G]);Me.enter().append("g").classed("legendsymbols",!0),Me.selectAll("g.legendpoints").data([G]).enter().append("g").classed("legendpoints",!0)}).each(se).each(D).each(F).each(B).each(j).each(re).each(Q).each(I).each(O).each(U).each($);function I(G){var X=i(G),K=X.showFill,H=X.showLine,Y=X.showGradientLine,q=X.showGradientFill,Z=X.anyFill,ee=X.anyLine,ae=G[0],he=ae.trace,xe,we,Me=t(he),Se=Me.colorscale,Ie=Me.reversescale,Ve=function(Ae){if(Ae.size())if(K)l.fillGroupStyle(Ae,C,!0);else{var Be="legendfill-"+he.uid;l.gradient(Ae,C,Be,g(Ie),Se,"fill")}},Ge=function(Ae){if(Ae.size()){var Be="legendline-"+he.uid;l.lineGroupStyle(Ae),l.gradient(Ae,C,Be,g(Ie),Se,"stroke")}},ke=n.hasMarkers(he)||!Z?"M5,0":ee?"M5,-2":"M5,-3",_e=p.select(this),ce=_e.select(".legendfill").selectAll("path").data(K||q?[G]:[]);if(ce.enter().append("path").classed("js-fill",!0),ce.exit().remove(),ce.attr("d",ke+"h"+u+"v6h-"+u+"z").call(Ve),H||Y){var ve=z(void 0,he.line,h,c);we=E.minExtend(he,{line:{width:ve}}),xe=[E.minExtend(ae,{trace:we})]}var le=_e.select(".legendlines").selectAll("path").data(H||Y?[xe]:[]);le.enter().append("path").classed("js-line",!0),le.exit().remove(),le.attr("d",ke+(Y?"l"+u+",0.0001":"h"+u)).call(H?l.lineGroupStyle:Ge)}function O(G){var X=i(G),K=X.anyFill,H=X.anyLine,Y=X.showLine,q=X.showMarker,Z=G[0],ee=Z.trace,ae=!q&&!H&&!K&&n.hasText(ee),he,xe;function we(ve,le,Ae,Be){var Xe=E.nestedProperty(ee,ve).get(),Ye=E.isArrayOrTypedArray(Xe)&&le?le(Xe):Xe;if(f&&Ye&&Be!==void 0&&(Ye=Be),Ae){if(YeAe[1])return Ae[1]}return Ye}function Me(ve){return Z._distinct&&Z.index&&ve[Z.index]?ve[Z.index]:ve[0]}if(q||ae||Y){var Se={},Ie={};if(q){Se.mc=we("marker.color",Me);var Ve=ee.type==="scattermap";Se.mx=Ve?"circle":we("marker.symbol",Me),Se.mo=we("marker.opacity",E.mean,[.2,1]),Se.mlc=we("marker.line.color",Me),Se.mlw=we("marker.line.width",E.mean,[0,5],m),Se.mld=we("marker.line.dash",Me),Ie.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Ge=we("marker.size",E.mean,[2,16],s);Se.ms=Ge,Ie.marker.size=Ge}Y&&(Ie.line={width:we("line.width",Me,[0,10],c)}),ae&&(Se.tx="Aa",Se.tp=we("textposition",Me),Se.ts=10,Se.tc=we("textfont.color",Me),Se.tf=we("textfont.family",Me),Se.tw=we("textfont.weight",Me),Se.ty=we("textfont.style",Me),Se.tv=we("textfont.variant",Me),Se.tC=we("textfont.textcase",Me),Se.tE=we("textfont.lineposition",Me),Se.tS=we("textfont.shadow",Me)),he=[E.minExtend(Z,Se)],xe=E.minExtend(ee,Ie),xe.selectedpoints=null,xe.texttemplate=null}var ke=p.select(this).select("g.legendpoints"),_e=ke.selectAll("path.scatterpts").data(q?he:[]);_e.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),_e.exit().remove(),_e.call(l.pointStyle,xe,C),q&&(he[0].mrc=3);var ce=ke.selectAll("g.pointtext").data(ae?he:[]);ce.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),ce.exit().remove(),ce.selectAll("text").call(l.textPointStyle,xe,C)}function D(G){var X=G[0].trace,K=X.type==="waterfall";if(G[0]._distinct&&K){var H=G[0].trace[G[0].dir].marker;return G[0].mc=H.color,G[0].mlw=H.line.width,G[0].mlc=H.line.color,P(G,this,"waterfall")}var Y=[];X.visible&&K&&(Y=G[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var q=p.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Y);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),q.exit().remove(),q.each(function(Z){var ee=p.select(this),ae=X[Z[0]].marker,he=z(void 0,ae.line,v,m);ee.attr("d",Z[1]).style("stroke-width",he+"px").call(e.fill,ae.color),he&&ee.call(e.stroke,ae.line.color)})}function B(G){P(G,this)}function F(G){P(G,this,"funnel")}function P(G,X,K){var H=G[0].trace,Y=H.marker||{},q=Y.line||{},Z=Y.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ee=K?H.visible&&H.type===K:b.traceIs(H,"bar"),ae=p.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(ee?[G]:[]);ae.enter().append("path").classed("legend"+K,!0).attr("d",Z).attr("transform",x),ae.exit().remove(),ae.each(function(he){var xe=p.select(this),we=he[0],Me=z(we.mlw,Y.line,v,m);xe.style("stroke-width",Me+"px");var Se=we.mcc;if(!_._inHover&&"mc"in we){var Ie=t(Y),Ve=Ie.mid;Ve===void 0&&(Ve=(Ie.max+Ie.min)/2),Se=l.tryColorscale(Y,"")(Ve)}var Ge=Se||we.mc||Y.color,ke=Y.pattern,_e=l.getPatternAttr,ce=ke&&(_e(ke.shape,0,"")||_e(ke.path,0,""));if(ce){var ve=_e(ke.bgcolor,0,null),le=_e(ke.fgcolor,0,null),Ae=ke.fgopacity,Be=w(ke.size,8,10),Xe=w(ke.solidity,.5,1),Ye="legend-"+H.uid;xe.call(l.pattern,"legend",C,Ye,ce,Be,Xe,Se,ke.fillmode,ve,le,Ae)}else xe.call(e.fill,Ge);Me&&e.stroke(xe,we.mlc||q.color)})}function j(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&b.traceIs(X,"box-violin")?[G]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),K.exit().remove(),K.each(function(){var H=p.select(this);if((X.boxpoints==="all"||X.points==="all")&&e.opacity(X.fillcolor)===0&&e.opacity((X.line||{}).color)===0){var Y=E.minExtend(X,{marker:{size:f?s:E.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,Y,C)}else{var q=z(void 0,X.line,v,m);H.style("stroke-width",q+"px").call(e.fill,X.fillcolor),q&&e.stroke(H,X.line.color)}})}function U(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[G,G]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(H,Y){return Y?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Y){var q=p.select(this),Z=X[Y?"increasing":"decreasing"],ee=z(void 0,Z.line,v,m);q.style("stroke-width",ee+"px").call(e.fill,Z.fillcolor),ee&&e.stroke(q,Z.line.color)})}function $(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[G,G]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(H,Y){return Y?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Y){var q=p.select(this),Z=X[Y?"increasing":"decreasing"],ee=z(void 0,Z.line,v,m);q.style("fill","none").call(l.dashLine,Z.line.dash,ee),ee&&e.stroke(q,Z.line.color)})}function Q(G){ne(G,this,"pie")}function re(G){ne(G,this,"funnelarea")}function ne(G,X,K){var H=G[0],Y=H.trace,q=K?Y.visible&&Y.type===K:b.traceIs(Y,K),Z=p.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(q?[G]:[]);if(Z.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),Z.exit().remove(),Z.size()){var ee=Y.marker||{},ae=z(a(ee.line.width,H.pts),ee.line,v,m),he="pieLike",xe=E.minExtend(Y,{marker:{line:{width:ae}}},he),we=E.minExtend(H,{trace:xe},he);r(Z,we,xe,C)}}function se(G){var X=G[0].trace,K,H=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":H=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":H=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":H=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":H=[["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"]],K=!1;break;case"streamtube":H=[["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"]],K=!1;break;case"surface":H=[["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"]],K=!0;break;case"mesh3d":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var Y=p.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(H);Y.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),Y.exit().remove(),Y.each(function(q,Z){var ee=p.select(this),ae=t(X),he=ae.colorscale,xe=ae.reversescale,we=function(Ve){if(Ve.size()){var Ge="legendfill-"+X.uid;l.gradient(Ve,C,Ge,g(xe,K==="radial"),he,"fill")}},Me;if(he){if(!K){var Ie=he.length;Me=Z===0?he[xe?Ie-1:0][1]:Z===1?he[xe?0:Ie-1][1]:he[Math.floor((Ie-1)/2)][1]}}else{var Se=X.vertexcolor||X.facecolor||X.color;Me=E.isArrayOrTypedArray(Se)?Se[Z]||Se[0]:Se}ee.attr("d",q[0]),Me?ee.call(e.fill,Me):ee.call(we)})}};function g(S,M){var C=M?"radial":"horizontal";return C+(S?"":"reversed")}function i(S){var M=S[0].trace,C=M.contours,_=n.hasLines(M)||M.visible&&M.type==="quiver",T=n.hasMarkers(M),f=M.visible&&M.fill&&M.fill!=="none",u=!1,A=!1;if(C){var x=C.coloring;x==="lines"?u=!0:_=x==="none"||x==="heatmap"||C.showlines,C.type==="constraint"?f=C._operation!=="=":(x==="fill"||x==="heatmap")&&(A=!0)}return{showMarker:T,showLine:_,showFill:f,showGradientLine:u,showGradientFill:A,anyLine:_||u,anyFill:f||A}}function w(S,M,C){return S&&E.isArrayOrTypedArray(S)?M:S>C?C:S}}}),i5=ze({"src/components/legend/draw.js"(J,V){"use strict";var p=ci(),b=Nr(),E=cl(),k=mi(),l=Hm(),e=_h(),t=$i(),n=Qn(),r=Cs(),a=r5().handleItemClick,o=r5().handleTitleClick,s=a5(),c=dc(),m=c.LINE_SPACING,h=c.FROM_TL,v=c.FROM_BR,g=XI(),i=n5(),w=u1(),S=1,M=/^legend[0-9]*$/;V.exports=function($,Q){if(Q)_($,Q);else{var re=$._fullLayout,ne=re._legends,se=re._infolayer.selectAll('[class^="legend"]');se.each(function(){var H=p.select(this),Y=H.attr("class"),q=Y.split(" ")[0];q.match(M)&&ne.indexOf(q)===-1&&H.remove()});for(var G=0;G1)}var ae=re.hiddenlabels||[];if(!X&&(!re.showlegend||!K.length))return G.selectAll("."+ne).remove(),re._topdefs.select("#"+se).remove(),E.autoMargin(U,ne);var he=b.ensureSingle(G,"g",ne,function(_e){X||_e.attr("pointer-events","all")}),xe=b.ensureSingleById(re._topdefs,"clipPath",se,function(_e){_e.append("rect")}),we=b.ensureSingle(he,"rect","bg",function(_e){_e.attr("shape-rendering","crispEdges")});we.call(n.stroke,Q.bordercolor).call(n.fill,Q.bgcolor).style("stroke-width",Q.borderwidth+"px");var Me=b.ensureSingle(he,"g","scrollbox"),Se=Q.title;Q._titleWidth=0,Q._titleHeight=0;var Ie;Se.text?(Ie=b.ensureSingle(Me,"text",ne+"titletext"),Ie.attr("text-anchor","start").call(t.font,Se.font).text(Se.text),I(Ie,Me,U,Q,S),!X&&(Q.titleclick||Q.titledoubleclick)&&z(Me,U,Q,ne)):(Me.selectAll("."+ne+"titletext").remove(),Me.selectAll("."+ne+"titletoggle").remove());var Ve=b.ensureSingle(he,"rect","scrollbar",function(_e){_e.attr(s.scrollBarEnterAttrs).call(n.fill,s.scrollBarColor)}),Ge=Me.selectAll("g.groups").data(K);Ge.enter().append("g").attr("class","groups"),Ge.exit().remove();var ke=Ge.selectAll("g.traces").data(b.identity);ke.enter().append("g").attr("class","traces"),ke.exit().remove(),ke.style("opacity",function(_e){let ce=_e[0],ve=ce.trace;if(ce.groupTitle){let le=ve.legendgroup,Ae=(re.shapes||[]).filter(function(Xe){return Xe.showlegend});return U._fullData.concat(Ae).some(function(Xe){return Xe.legendgroup===le&&(Xe.legend||"legend")===ne&&Xe.visible===!0})?1:.5}return k.traceIs(ve,"pie-like")?ae.indexOf(_e[0].label)!==-1?.5:1:ve.visible==="legendonly"?.5:1}).each(function(){p.select(this).call(u,U,Q)}).call(i,U,Q).each(function(_e){X||_e[0].groupTitle&&Q.groupclick==="toggleitem"||p.select(this).call(x,U,ne)}),b.syncOrAsync([E.previousPromises,function(){return B(U,Ge,ke,Q,Me)},function(){var _e=re._size,ce=Q.borderwidth,ve=Q.xref==="paper",le=Q.yref==="paper";if(Se.text){let pt=(re.shapes||[]).filter(function(Ct){return Ct.showlegend}),Pt=U._fullData.concat(pt).some(function(Ct){let qt=Ct.legend||"legend";var Vt=Array.isArray(qt)?qt.includes(ne):qt===ne;return Vt&&Ct.visible===!0});Ie.style("opacity",Pt?1:.5)}if(!X){var Ae,Be;ve?Ae=_e.l+_e.w*Q.x-h[P(Q)]*Q._width:Ae=re.width*Q.x-h[P(Q)]*Q._width,le?Be=_e.t+_e.h*(1-Q.y)-h[j(Q)]*Q._effHeight:Be=re.height*(1-Q.y)-h[j(Q)]*Q._effHeight;var Xe=F(U,ne,Ae,Be);if(Xe)return;if(re.margin.autoexpand){var Ye=Ae,yt=Be;Ae=ve?b.constrain(Ae,0,re.width-Q._width):Ye,Be=le?b.constrain(Be,0,re.height-Q._effHeight):yt,Ae!==Ye&&b.log("Constrain "+ne+".x to make legend fit inside graph"),Be!==yt&&b.log("Constrain "+ne+".y to make legend fit inside graph")}t.setTranslate(he,Ae,Be)}if(Ve.on(".drag",null),he.on("wheel",null),X||Q._height<=Q._maxHeight||U._context.staticPlot){var gt=Q._effHeight;X&&(gt=Q._height),we.attr({width:Q._width-ce,height:gt-ce,x:ce/2,y:ce/2}),t.setTranslate(Me,0,0),xe.select("rect").attr({width:Q._width-2*ce,height:gt-2*ce,x:ce,y:ce}),t.setClipUrl(Me,se,U),t.setRect(Ve,0,0,0,0),delete Q._scrollY}else{var Tt=Math.max(s.scrollBarMinHeight,Q._effHeight*Q._effHeight/Q._height),At=Q._effHeight-Tt-2*s.scrollBarMargin,$t=Q._height-Q._effHeight,rr=At/$t,_r=Math.min(Q._scrollY||0,$t);we.attr({width:Q._width-2*ce+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-ce,x:ce/2,y:ce/2}),xe.select("rect").attr({width:Q._width-2*ce+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-2*ce,x:ce,y:ce+_r}),t.setClipUrl(Me,se,U),We(_r,Tt,rr),he.on("wheel",function(){_r=b.constrain(Q._scrollY+p.event.deltaY/$t*At,0,$t),We(_r,Tt,rr),_r!==0&&_r!==$t&&p.event.preventDefault()});var Xt,or,Ot,vt=function(pt,Pt,Ct){var qt=(Ct-Pt)/rr+pt;return b.constrain(qt,0,$t)},ht=function(pt,Pt,Ct){var qt=(Pt-Ct)/rr+pt;return b.constrain(qt,0,$t)},De=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"?Xt=pt.changedTouches[0].clientY:Xt=pt.clientY,Ot=_r}).on("drag",function(){var pt=p.event.sourceEvent;pt.buttons===2||pt.ctrlKey||(pt.type==="touchmove"?or=pt.changedTouches[0].clientY:or=pt.clientY,_r=vt(Ot,Xt,or),We(_r,Tt,rr))});Ve.call(De);var Ne=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"&&(Xt=pt.changedTouches[0].clientY,Ot=_r)}).on("drag",function(){var pt=p.event.sourceEvent;pt.type==="touchmove"&&(or=pt.changedTouches[0].clientY,_r=ht(Ot,Xt,or),We(_r,Tt,rr))});Me.call(Ne)}function We(pt,Pt,Ct){Q._scrollY=U._fullLayout[ne]._scrollY=pt,t.setTranslate(Me,0,-pt),t.setRect(Ve,Q._width,s.scrollBarMargin+pt*Ct,s.scrollBarWidth,Pt),xe.select("rect").attr("y",ce+pt)}if(U._context.edits.legendPosition){var Ke,Je,et,Mt;he.classed("cursor-move",!0),e.init({element:he.node(),gd:U,prepFn:function(pt){if(pt.target!==Ve.node()){var Pt=t.getTranslate(he);et=Pt.x,Mt=Pt.y}},moveFn:function(pt,Pt){if(et!==void 0&&Mt!==void 0){var Ct=et+pt,qt=Mt+Pt;t.setTranslate(he,Ct,qt),Ke=e.align(Ct,Q._width,_e.l,_e.l+_e.w,Q.xanchor),Je=e.align(qt+Q._height,-Q._height,_e.t+_e.h,_e.t,Q.yanchor)}},doneFn:function(){if(Ke!==void 0&&Je!==void 0){var pt={};pt[ne+".x"]=Ke,pt[ne+".y"]=Je,k.call("_guiRelayout",U,pt)}},clickFn:function(pt,Pt){var Ct=G.selectAll("g.traces").filter(function(){var qt=this.getBoundingClientRect();return Pt.clientX>=qt.left&&Pt.clientX<=qt.right&&Pt.clientY>=qt.top&&Pt.clientY<=qt.bottom});Ct.size()>0&&f(U,Q,Ct,pt,Pt)}})}}],U)}}function T(U,$,Q){var re=U[0],ne=re.width,se=$.entrywidthmode,G=re.trace.legendwidth||$.entrywidth;return se==="fraction"?$._maxWidth*G:Q+(G||ne)}function f(U,$,Q,re,ne){var se=U._fullLayout,G=Q.data()[0][0].trace,X=$.itemclick,K=$.itemdoubleclick,H={event:ne,node:Q.node(),curveNumber:G.index,expandedIndex:G.index,data:U.data,layout:U.layout,frames:U._transitionData._frames,config:U._context,fullData:U._fullData,fullLayout:se};G._group&&(H.group=G._group),k.traceIs(G,"pie-like")&&(H.label=Q.datum()[0].label);var Y=l.triggerHandler(U,"plotly_legendclick",H);if(re===1){if(Y===!1)return;$._clickTimeout=setTimeout(function(){U._fullLayout&&X&&a(Q,U,$,X)},U._context.doubleClickDelay)}else if(re===2){$._clickTimeout&&clearTimeout($._clickTimeout),U._legendMouseDownTime=0;var q=l.triggerHandler(U,"plotly_legenddoubleclick",H);q!==!1&&Y!==!1&&K&&a(Q,U,$,K)}}function u(U,$,Q){var re=w.getId(Q),ne=U.data()[0][0],se=ne.trace,G=k.traceIs(se,"pie-like"),X=!Q._inHover&&$._context.edits.legendText&&!G,K=Q._maxNameLength,H,Y;ne.groupTitle?(H=ne.groupTitle.text,Y=ne.groupTitle.font):(Y=Q.font,Q.entries?H=ne.text:(H=G?ne.label:se.name,se._meta&&(H=b.templateString(H,se._meta))));var q=b.ensureSingle(U,"text",re+"text");q.attr("text-anchor","start").call(t.font,Y).text(X?A(H,K):H);var Z=Q.indentation+Q.itemwidth+s.itemGap*2;r.positionText(q,Z,0),X?q.call(r.makeEditable,{gd:$,text:H}).call(I,U,$,Q).on("edit",function(ee){this.text(A(ee,K)).call(I,U,$,Q);var ae={};return ae.name=ee,ne.trace._isShape?k.call("_guiRelayout",$,"shapes["+se.index+"].name",ae.name):k.call("_guiRestyle",$,ae,se.index)}):I(q,U,$,Q)}function A(U,$){var Q=Math.max(4,$);if(U&&U.trim().length>=Q/2)return U;U=U||"";for(var re=Q-U.length;re>0;re--)U+=" ";return U}function x(U,$,Q){var re=$._context.doubleClickDelay,ne,se=1,G=b.ensureSingle(U,"rect",Q+"toggle",function(X){$._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(G.on("mousedown",function(){ne=new Date().getTime(),ne-$._legendMouseDownTimere&&(se=Math.max(se-1,1)),f($,X,U,se,p.event)}}))}function z(U,$,Q,re){if($._fullData.some(function(H){let Y=H.legend||"legend";return(Array.isArray(Y)?Y.includes(re):Y===re)&&k.traceIs(H,"pie-like")}))return;let se=$._context.doubleClickDelay;var G,X=1;let K=b.ensureSingle(U,"rect",re+"titletoggle",function(H){$._context.staticPlot||H.style("cursor","pointer").attr("pointer-events","all"),H.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(K.on("mousedown",function(){G=new Date().getTime(),G-$._legendMouseDownTimese&&(X=Math.max(X-1,1));let H={event:p.event,legendId:re,data:$.data,layout:$.layout,fullData:$._fullData,fullLayout:$._fullLayout};if(X===1&&Q.titleclick){if(l.triggerHandler($,"plotly_legendtitleclick",H)===!1)return;Q._titleClickTimeout=setTimeout(function(){$._fullLayout&&o($,Q,Q.titleclick)},se)}else X===2&&(Q._titleClickTimeout&&clearTimeout(Q._titleClickTimeout),$._legendMouseDownTime=0,l.triggerHandler($,"plotly_legendtitledoubleclick",H)!==!1&&Q.titledoubleclick&&o($,Q,Q.titledoubleclick))}))}function I(U,$,Q,re,ne){re._inHover&&U.attr("data-notex",!0),r.convertToTspans(U,Q,function(){O($,Q,re,ne)})}function O(U,$,Q,re){var ne=U.data()[0][0],se=ne&&ne.trace.showlegend;if(Array.isArray(se)&&(se=se[ne.i]!==!1),!Q._inHover&&ne&&!se){U.remove();return}var G=U.select("g[class*=math-group]"),X=G.node(),K=w.getId(Q);Q||(Q=$._fullLayout[K]);var H=Q.borderwidth,Y;re===S?Y=Q.title.font:ne.groupTitle?Y=ne.groupTitle.font:Y=Q.font;var q=Y.size*m,Z,ee;if(X){var ae=t.bBox(X);Z=ae.height,ee=ae.width,re===S?t.setTranslate(G,H,H+Z*.75):t.setTranslate(G,0,Z*.25)}else{var he="."+K+(re===S?"title":"")+"text",xe=U.select(he),we=r.lineCount(xe),Me=xe.node();if(Z=q*we,ee=Me?t.bBox(Me).width:0,re===S)Q.title.side==="left"&&(ee+=s.itemGap*2),r.positionText(xe,H+s.titlePad,H+q);else{var Se=s.itemGap*2+Q.indentation+Q.itemwidth;ne.groupTitle&&(Se=s.itemGap,ee-=Q.indentation+Q.itemwidth),r.positionText(xe,Se,-q*((we-1)/2-.3))}}re===S?(Q._titleWidth=ee,Q._titleHeight=Z):(ne.lineHeight=q,ne.height=Math.max(Z,16)+3,ne.width=ee)}function D(U){var $=0,Q=0,re=U.title.side;return re&&(re.indexOf("left")!==-1&&($=U._titleWidth),re.indexOf("top")!==-1&&(Q=U._titleHeight)),[$,Q]}function B(U,$,Q,re,ne){var se=U._fullLayout,G=w.getId(re);re||(re=se[G]);var X=se._size,K=w.isVertical(re),H=w.isGrouped(re),Y=re.entrywidthmode==="fraction",q=re.borderwidth,Z=2*q,ee=s.itemGap,ae=re.indentation+re.itemwidth+ee*2,he=2*(q+ee),xe=j(re),we=re.y<0||re.y===0&&xe==="top",Me=re.y>1||re.y===1&&xe==="bottom",Se=re.tracegroupgap,Ie={};let{orientation:Ve,yref:Ge}=re,{maxheight:ke}=re,_e=we||Me||Ve!=="v"||Ge!=="paper";ke||(ke=_e?.5:1);let ce=_e?se.height:X.h;re._maxHeight=Math.max(ke>1?ke:ke*ce,30);var ve=0;re._width=0,re._height=0;var le=D(re);if(K)Q.each(function(pt){var Pt=pt[0].height;t.setTranslate(this,q+le[0],q+le[1]+re._height+Pt/2+ee),re._height+=Pt,re._width=Math.max(re._width,pt[0].width)}),ve=ae+re._width,re._width+=ee+ae+Z,re._height+=he,H&&($.each(function(pt,Pt){t.setTranslate(this,0,Pt*re.tracegroupgap)}),re._height+=(re._lgroupsLength-1)*re.tracegroupgap);else{var Ae=P(re),Be=re.x<0||re.x===0&&Ae==="right",Xe=re.x>1||re.x===1&&Ae==="left",Ye=Me||we,yt=se.width/2;re._maxWidth=Math.max(Be?Ye&&Ae==="left"?X.l+X.w:yt:Xe?Ye&&Ae==="right"?X.r+X.w:yt:X.w,2*ae);var gt=0,Tt=0;Q.each(function(pt){var Pt=T(pt,re,ae);gt=Math.max(gt,Pt),Tt+=Pt}),ve=null;var At=0;if(H){var $t=0,rr=0,_r=0;$.each(function(){var pt=0,Pt=0;p.select(this).selectAll("g.traces").each(function(qt){var Vt=T(qt,re,ae),Ht=qt[0].height;t.setTranslate(this,le[0],le[1]+q+ee+Ht/2+Pt),Pt+=Ht,pt=Math.max(pt,Vt),Ie[qt[0].trace.legendgroup]=pt});var Ct=pt+ee;rr>0&&Ct+q+rr>re._maxWidth?(At=Math.max(At,rr),rr=0,_r+=$t+Se,$t=Pt):$t=Math.max($t,Pt),t.setTranslate(this,rr,_r),rr+=Ct}),re._width=Math.max(At,rr)+q,re._height=_r+$t+he}else{var Xt=Q.size(),or=Tt+Z+(Xt-1)*ee=re._maxWidth&&(At=Math.max(At,De),vt=0,ht+=Ot,re._height+=Ot,Ot=0),t.setTranslate(this,le[0]+q+vt,le[1]+q+ht+Pt/2+ee),De=vt+Ct+ee,vt+=qt,Ot=Math.max(Ot,Pt)}),or?(re._width=vt+Z,re._height=Ot+he):(re._width=Math.max(At,De)+Z,re._height+=Ot+he)}}re._width=Math.ceil(Math.max(re._width+le[0],re._titleWidth+2*(q+s.titlePad))),re._height=Math.ceil(Math.max(re._height+le[1],re._titleHeight+2*(q+s.itemGap))),re._effHeight=Math.min(re._height,re._maxHeight);var Ne=U._context.edits,We=Ne.legendText||Ne.legendPosition;Q.each(function(pt){var Pt=p.select(this).select("."+G+"toggle"),Ct=pt[0].height,qt=pt[0].trace.legendgroup,Vt=T(pt,re,ae);H&&qt!==""&&(Vt=Ie[qt]);var Ht=We?ae:ve||Vt;!K&&!Y&&(Ht+=ee/2),t.setRect(Pt,0,-Ct/2,Ht,Ct)});var Ke=ne.select("."+G+"titletext");Ke.node()&&C(Ke,re,q);var Je=ne.select("."+G+"titletoggle");if(Je.size()&&Ke.node()){var et=Ke.attr("x")||0,Mt=s.titlePad;t.setRect(Je,et-Mt,q,re._titleWidth+2*Mt,re._titleHeight+2*Mt)}}function F(U,$,Q,re){var ne=U._fullLayout,se=ne[$],G=P(se),X=j(se),K=se.xref==="paper",H=se.yref==="paper";U._fullLayout._reservedMargin[$]={};var Y=se.y<.5?"b":"t",q=se.x<.5?"l":"r",Z={r:ne.width-Q,l:Q+se._width,b:ne.height-re,t:re+se._effHeight};if(K&&H)return E.autoMargin(U,$,{x:se.x,y:se.y,l:se._width*h[G],r:se._width*v[G],b:se._effHeight*v[X],t:se._effHeight*h[X]});K?U._fullLayout._reservedMargin[$][Y]=Z[Y]:H||se.orientation==="v"?U._fullLayout._reservedMargin[$][q]=Z[q]:U._fullLayout._reservedMargin[$][Y]=Z[Y]}function P(U){return b.isRightAnchor(U)?"right":b.isCenterAnchor(U)?"center":"left"}function j(U){return b.isBottomAnchor(U)?"bottom":b.isMiddleAnchor(U)?"middle":"top"}}}),o5=ze({"src/components/fx/hover.js"(J){"use strict";var V=ci(),p=ao(),b=Nr(),E=b.pushUnique,k=b.strTranslate,l=b.strRotate,e=Hm(),t=Cs(),n=YI(),r=$i(),a=Qn(),o=_h(),s=Gi(),c=hc().zindexSeparator,m=mi(),h=kh(),v=a1(),g=t5(),i=i5(),w=v.YANGLE,S=Math.PI*w/180,M=1/Math.sin(S),C=Math.cos(S),_=Math.sin(S),T=v.HOVERARROWSIZE,f=v.HOVERTEXTPAD,u={box:!0,ohlc:!0,violin:!0,candlestick:!0},A={scatter:!0,scattergl:!0,splom:!0};function x(q,Z){return q.distance-Z.distance}J.hover=function(Z,ee,ae,he){Z=b.getGraphDiv(Z);var xe=ee.target;b.throttle(Z._fullLayout._uid+v.HOVERID,v.HOVERMINTIME,function(){z(Z,ee,ae,he,xe)})},J.loneHover=function(Z,ee){var ae=!0;Array.isArray(Z)||(ae=!1,Z=[Z]);var he=ee.gd,xe=K(he),we=H(he),Me=Z.map(function(le){var Ae=le._x0||le.x0||le.x||0,Be=le._x1||le.x1||le.x||0,Xe=le._y0||le.y0||le.y||0,Ye=le._y1||le.y1||le.y||0,yt=le.eventData;if(yt){var gt=Math.min(Ae,Be),Tt=Math.max(Ae,Be),At=Math.min(Xe,Ye),$t=Math.max(Xe,Ye),rr=le.trace;if(m.traceIs(rr,"gl3d")){var _r=he._fullLayout[rr.scene]._scene.container,Xt=_r.offsetLeft,or=_r.offsetTop;gt+=Xt,Tt+=Xt,At+=or,$t+=or}yt.bbox={x0:gt+we,x1:Tt+we,y0:At+xe,y1:$t+xe},yt.xPixel=(Ae+Be)/2,yt.yPixel=(Xe+Ye)/2,ee.inOut_bbox&&ee.inOut_bbox.push(yt.bbox)}else yt=!1;return{color:le.color||a.defaultLine,x0:le.x0||le.x||0,x1:le.x1||le.x||0,y0:le.y0||le.y||0,y1:le.y1||le.y||0,xLabel:le.xLabel,yLabel:le.yLabel,zLabel:le.zLabel,text:le.text,name:le.name,idealAlign:le.idealAlign,borderColor:le.borderColor,fontFamily:le.fontFamily,fontSize:le.fontSize,fontColor:le.fontColor,fontWeight:le.fontWeight,fontStyle:le.fontStyle,fontVariant:le.fontVariant,nameLength:le.nameLength,textAlign:le.textAlign,trace:le.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:le.hovertemplate||!1,hovertemplateLabels:le.hovertemplateLabels||!1,eventData:yt}}),Se=!1,Ie=D(Me,{gd:he,hovermode:"closest",rotateLabels:Se,bgColor:ee.bgColor||a.background,container:V.select(ee.container),outerContainer:ee.outerContainer||ee.container}),Ve=Ie.hoverLabels,Ge=5,ke=0,_e=0;Ve.sort(function(le,Ae){return le.y0-Ae.y0}).each(function(le,Ae){var Be=le.y0-le.by/2;Be-GeTt[0]._length||nr<0||nr>At[0]._length)return o.unhoverRaw(q,Z)}if(Z.pointerX=Rt+Tt[0]._offset,Z.pointerY=nr+At[0]._offset,"xval"in Z?ht=h.flat(xe,Z.xval):ht=h.p2c(Tt,Rt),"yval"in Z?De=h.flat(xe,Z.yval):De=h.p2c(At,nr),q._hoverPointerX=Z.pointerX,q._hoverPointerY=Z.pointerY,!p(ht[0])||!p(De[0]))return b.warn("Fx.hover failed",Z,q),o.unhoverRaw(q,Z)}Me.clickanywhere&&(q._hoverXVals=ht,q._hoverYVals=De,q._hoverXAxes=Tt,q._hoverYAxes=At);var Rr=1/0;function Qr(fn,Ai){for(We=0;WeVt&&(Ot.splice(0,Vt),Rr=Ot[0].distance),Ge&&or!==0&&Ot.length===0){qt.distance=or,qt.index=!1;var qi=Je._module.hoverPoints(qt,Pt,Ct,"closest",{hoverLayer:Me._hoverlayer});if(qi&&(qi=qi.filter(function(Mi){return Mi.spikeDistance<=or})),qi&&qi.length){var io,oo=qi.filter(function(Mi){return Mi.xa.showspikes&&Mi.xa.spikesnap!=="hovered data"});if(oo.length){var Vn=oo[0];p(Vn.x0)&&p(Vn.y0)&&(io=ha(Vn),(!Ht.vLinePoint||Ht.vLinePoint.spikeDistance>io.spikeDistance)&&(Ht.vLinePoint=io))}var qn=qi.filter(function(Mi){return Mi.ya.showspikes&&Mi.ya.spikesnap!=="hovered data"});if(qn.length){var Hi=qn[0];p(Hi.x0)&&p(Hi.y0)&&(io=ha(Hi),(!Ht.hLinePoint||Ht.hLinePoint.spikeDistance>io.spikeDistance)&&(Ht.hLinePoint=io))}}}}}Qr();function Zr(fn,Ai,jn){for(var Xn=null,eo=1/0,gi,qi=0;qifn.trace.index===vi.trace.index):Ot=[vi];var Yi=Ot.length,Ja=X("x",vi,Me),Oa=X("y",vi,Me);Qr(Ja,Oa);var lt=[],rt={},fr=0,lr=function(fn){var Ai=u[fn.trace.type]?I(fn):fn.trace.index;if(!rt[Ai])fr++,rt[Ai]=fr,lt.push(fn);else{var jn=rt[Ai]-1,Xn=lt[jn];jn>0&&Math.abs(fn.distance)Yi-1;Tr--)lr(Ot[Tr]);Ot=lt,Xa()}var Ir=q._hoverdata,Dr=[],ot=K(q),kt=H(q);for(let fn of Ot){var jt=h.makeEventData(fn,fn.trace,fn.cd);if(fn.hovertemplate!==!1){var ar=!1;fn.cd[fn.index]&&fn.cd[fn.index].ht&&(ar=fn.cd[fn.index].ht),fn.hovertemplate=ar||fn.trace.hovertemplate||!1}if(fn.xa&&fn.ya){var Er=fn.x0+fn.xa._offset,xr=fn.x1+fn.xa._offset,zr=fn.y0+fn.ya._offset,Lr=fn.y1+fn.ya._offset,aa=Math.min(Er,xr),Sa=Math.max(Er,xr),wa=Math.min(zr,Lr),pn=Math.max(zr,Lr);jt.bbox={x0:aa+kt,x1:Sa+kt,y0:wa+ot,y1:pn+ot},jt.xPixel=(Er+xr)/2,jt.yPixel=(zr+Lr)/2}fn.eventData=[jt],Dr.push(jt)}q._hoverdata=Dr;var tn=ke==="y"&&(vt.length>1||Ot.length>1)||ke==="closest"&&Sr&&Ot.length>1,ai=a.combine(Me.plot_bgcolor||a.background,Me.paper_bgcolor),rn=D(Ot,{gd:q,hovermode:ke,rotateLabels:tn,bgColor:ai,container:Me._hoverlayer,outerContainer:Me._paper.node(),commonLabelOpts:Me.hoverlabel,hoverdistance:Me.hoverdistance}),Ri=rn.hoverLabels;if(h.isUnifiedHover(ke)||(F(Ri,tn,Me,rn.commonLabelBoundingBox),U(Ri,tn,Me._invScaleX,Me._invScaleY)),he&&he.tagName){var Gn=m.getComponentMethod("annotations","hasClickToShow")(q,Dr);n(V.select(he),Gn?"pointer":"")}var no=re(q,Z,Ir);if(!he||ae||!no&&!Me.hoveranywhere)return;Ir&&no&&q.emit("plotly_unhover",{event:Z,points:Ir}),Di(q._hoverdata);function Di(fn){q.emit("plotly_hover",{event:Z,points:fn,xaxes:Tt,yaxes:At,xvals:h.c2dApply(Tt,ht),yvals:h.c2dApply(At,De),xPixel:Z.pointerX,yPixel:Z.pointerY})}}function I(q){return[q.trace.index,q.index,q.x0,q.y0,q.name,q.attr,q.xa?q.xa._id:"",q.ya?q.ya._id:""].join(",")}var O=/([\s\S]*)<\/extra>/;function D(q,Z){var ee=Z.gd,ae=ee._fullLayout,he=Z.hovermode,xe=Z.rotateLabels,we=Z.bgColor,Me=Z.container,Se=Z.outerContainer,Ie=Z.commonLabelOpts||{};if(q.length===0)return[[]];var Ve=Z.fontFamily||v.HOVERFONT,Ge=Z.fontSize||v.HOVERFONTSIZE,ke=Z.fontWeight||ae.font.weight,_e=Z.fontStyle||ae.font.style,ce=Z.fontVariant||ae.font.variant,ve=Z.fontTextcase||ae.font.textcase,le=Z.fontLineposition||ae.font.lineposition,Ae=Z.fontShadow||ae.font.shadow,Be=q[0],Xe=Be.xa,Ye=Be.ya,yt=he.charAt(0),gt=yt+"Label",Tt=Be[gt];if(Tt===void 0&&Xe.type==="multicategory")for(var At=0;Atae.width-Dr&&(ot=ae.width-Dr),en.attr("d","M"+(lr-ot)+",0L"+(lr-ot+T)+","+Ir+T+"H"+Dr+"v"+Ir+(f*2+fr.height)+"H"+-Dr+"V"+Ir+T+"H"+(lr-ot-T)+"Z"),lr=ot,We.minX=lr-Dr,We.maxX=lr+Dr,Xe.side==="top"?(We.minY=Tr-(f*2+fr.height),We.maxY=Tr-f):(We.minY=Tr+f,We.maxY=Tr+(f*2+fr.height))}else{var kt,jt,ar;Ye.side==="right"?(kt="start",jt=1,ar="",lr=Xe._offset+Xe._length):(kt="end",jt=-1,ar="-",lr=Xe._offset),Tr=Ye._offset+(Be.y0+Be.y1)/2,vi.attr("text-anchor",kt),en.attr("d","M0,0L"+ar+T+","+T+"V"+(f+fr.height/2)+"h"+ar+(f*2+fr.width)+"V-"+(f+fr.height/2)+"H"+ar+T+"V-"+T+"Z"),We.minY=Tr-(f+fr.height/2),We.maxY=Tr+(f+fr.height/2),Ye.side==="right"?(We.minX=lr+T,We.maxX=lr+T+(f*2+fr.width)):(We.minX=lr-T-(f*2+fr.width),We.maxX=lr-T);var Er=fr.height/2,xr=rr-fr.top-Er,zr="clip"+ae._uid+"commonlabel"+Ye._id,Lr;if(lren.hoverinfo!=="none");if(on.length===0)return[];var Ke=ae.hoverlabel,Je=Ke.font,et=on[0],Mt=((he==="x unified"?et.xa:et.ya).unifiedhovertitle||{}).text,pt=Mt?b.hovertemplateString({data:he==="x unified"?[{xa:et.xa,x:et.xVal}]:[{ya:et.ya,y:et.yVal}],fallback:et.trace.hovertemplatefallback,locale:ae._d3locale,template:Mt}):Tt,Pt={showlegend:!0,legend:{title:{text:pt,font:Je},font:Je,bgcolor:Ke.bgcolor,bordercolor:Ke.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ae.legend?ae.legend.traceorder:void 0,orientation:"v"}},Ct={font:Je};g(Pt,Ct,ee._fullData);var qt=Ct.legend;qt.entries=[];for(var Vt=0;Vt=0?Un=Xa:ja+cr<_r&&ja>=0?Un=ja:Nn+cr<_r?Un=Nn:Xa-Zr=0?li=La:un+Rr=0?li=un:yn+Rr=0,(on.idealAlign==="top"||!wa)&&pn?(ar-=xr/2,on.anchor="end"):wa?(ar+=xr/2,on.anchor="start"):on.anchor="middle",on.crossPos=ar;else{if(on.pos=ar,wa=jt+Er/2+Sa<=_r,pn=jt-Er/2-Sa>=0,(on.idealAlign==="left"||!wa)&&pn)jt-=Er/2,on.anchor="end";else if(wa)jt+=Er/2,on.anchor="start";else{on.anchor="middle";var tn=Sa/2,ai=jt+tn-_r,rn=jt-tn;ai>0&&(jt-=ai),rn<0&&(jt+=-rn)}on.crossPos=jt}Tr.attr("text-anchor",on.anchor),Dr&&Ir.attr("text-anchor",on.anchor),en.attr("transform",k(jt,ar)+(xe?l(w):""))}),{hoverLabels:Yn,commonLabelBoundingBox:We}}function B(q,Z,ee,ae,he,xe){var we,Me,Se="",Ie="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=b.templateString(q.name,q.trace._meta)),Se=se(q.name,q.nameLength));var Ve=ee.charAt(0),Ge=Ve==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(Ie+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(Ie+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmap"&&(Ie+=(Ie?"z: ":"")+q.zLabel)):Z&&q[Ve+"Label"]===he?Ie=q[Ge+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(Ie=q.yLabel):q.yLabel===void 0?Ie=q.xLabel:Ie="("+q.xLabel+", "+q.yLabel+")",(q.text||q.text===0)&&!Array.isArray(q.text)&&(Ie+=(Ie?"
":"")+q.text),q.extraText!==void 0&&(Ie+=(Ie?"
":"")+q.extraText),xe&&Ie===""&&!q.hovertemplate&&(Se===""&&xe.remove(),Ie=Se),(Me=(we=q.trace)==null?void 0:we.hoverlabel)!=null&&Me.split&&(q.hovertemplate="");let{hovertemplate:ke=!1}=q;if(ke){let _e=q.hovertemplateLabels||q;q[Ve+"Label"]!==he&&(_e[Ve+"other"]=_e[Ve+"Val"],_e[Ve+"otherLabel"]=_e[Ve+"Label"]),Ie=b.hovertemplateString({data:[q.eventData[0]||{},q.trace._meta],fallback:q.trace.hovertemplatefallback,labels:_e,locale:ae._d3locale,template:ke}),Ie=Ie.replace(O,(ce,ve)=>(Se=se(ve,q.nameLength),""))}return[Ie,Se]}function F(q,Z,ee,ae){var he=Z?"xa":"ya",xe=Z?"ya":"xa",we=0,Me=1,Se=q.size(),Ie=new Array(Se),Ve=0,Ge=ae.minX,ke=ae.maxX,_e=ae.minY,ce=ae.maxY,ve=function(ht){return ht*ee._invScaleX},le=function(ht){return ht*ee._invScaleY};q.each(function(ht){var De=ht[he],Ne=ht[xe],We=De._id.charAt(0)==="x",Ke=De.range;Ve===0&&Ke&&Ke[0]>Ke[1]!==We&&(Me=-1);var Je=0,et=We?ee.width:ee.height;if(ee.hovermode==="x"||ee.hovermode==="y"){var Mt=P(ht,Z),pt=ht.anchor,Pt=pt==="end"?-1:1,Ct,qt;if(pt==="middle")Ct=ht.crossPos+(We?le(Mt.y-ht.by/2):ve(ht.bx/2+ht.tx2width/2)),qt=Ct+(We?le(ht.by):ve(ht.bx));else if(We)Ct=ht.crossPos+le(T+Mt.y)-le(ht.by/2-T),qt=Ct+le(ht.by);else{var Vt=ve(Pt*T+Mt.x),Ht=Vt+ve(Pt*ht.bx);Ct=ht.crossPos+Math.min(Vt,Ht),qt=ht.crossPos+Math.max(Vt,Ht)}We?_e!==void 0&&ce!==void 0&&Math.min(qt,ce)-Math.max(Ct,_e)>1&&(Ne.side==="left"?(Je=Ne._mainLinePosition,et=ee.width):et=Ne._mainLinePosition):Ge!==void 0&&ke!==void 0&&Math.min(qt,ke)-Math.max(Ct,Ge)>1&&(Ne.side==="top"?(Je=Ne._mainLinePosition,et=ee.height):et=Ne._mainLinePosition)}Ie[Ve++]=[{datum:ht,traceIndex:ht.trace.index,dp:0,pos:ht.pos,posref:ht.posref,size:ht.by*(We?M:1)/2,pmin:Je,pmax:et}]}),Ie.sort(function(ht,De){return ht[0].posref-De[0].posref||Me*(De[0].traceIndex-ht[0].traceIndex)});var Ae,Be,Xe,Ye,yt,gt,Tt;function At(ht){var De=ht[0],Ne=ht[ht.length-1];if(Be=De.pmin-De.pos-De.dp+De.size,Xe=Ne.pos+Ne.dp+Ne.size-De.pmax,Be>.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp+=Be;Ae=!1}if(!(Xe<.01)){if(Be<-.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp-=Xe;Ae=!1}if(Ae){var We=0;for(Ye=0;YeDe.pmax&&We++;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos>De.pmax-1&&(gt.del=!0,We--);for(Ye=0;Ye=0;yt--)ht[yt].dp-=Xe;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos+gt.dp+gt.size>De.pmax&&(gt.del=!0,We--)}}}for(;!Ae&&we<=Se;){for(we++,Ae=!0,Ye=0;Ye.01){for(yt=rr.length-1;yt>=0;yt--)rr[yt].dp+=Be;for($t.push.apply($t,rr),Ie.splice(Ye+1,1),Tt=0,yt=$t.length-1;yt>=0;yt--)Tt+=$t[yt].dp;for(Xe=Tt/$t.length,yt=$t.length-1;yt>=0;yt--)$t[yt].dp-=Xe;Ae=!1}else Ye++}Ie.forEach(At)}for(Ye=Ie.length-1;Ye>=0;Ye--){var or=Ie[Ye];for(yt=or.length-1;yt>=0;yt--){var Ot=or[yt],vt=Ot.datum;vt.offset=Ot.dp,vt.del=Ot.del}}}function P(q,Z){var ee=0,ae=q.offset;return Z&&(ae*=-_,ee=q.offset*C),{x:ee,y:ae}}function j(q){var Z={start:1,end:-1,middle:0}[q.anchor],ee=Z*(T+f),ae=ee+Z*(q.txwidth+f),he=q.anchor==="middle";return he&&(ee-=q.tx2width/2,ae+=q.txwidth/2+f),{alignShift:Z,textShiftX:ee,text2ShiftX:ae}}function U(q,Z,ee,ae){var he=function(we){return we*ee},xe=function(we){return we*ae};q.each(function(we){var Me=V.select(this);if(we.del)return Me.remove();var Se=Me.select("text.nums"),Ie=we.anchor,Ve=Ie==="end"?-1:1,Ge=j(we),ke=P(we,Z),_e=ke.x,ce=ke.y,ve=Ie==="middle",le="hoverlabel"in we.trace?we.trace.hoverlabel.showarrow:!0,Ae;ve?Ae="M-"+he(we.bx/2+we.tx2width/2)+","+xe(ce-we.by/2)+"h"+he(we.bx)+"v"+xe(we.by)+"h-"+he(we.bx)+"Z":le?Ae="M0,0L"+he(Ve*T+_e)+","+xe(T+ce)+"v"+xe(we.by/2-T)+"h"+he(Ve*we.bx)+"v-"+xe(we.by)+"H"+he(Ve*T+_e)+"V"+xe(ce-T)+"Z":Ae="M"+he(Ve*T+_e)+","+xe(ce-we.by/2)+"h"+he(Ve*we.bx)+"v"+xe(we.by)+"h"+he(-Ve*we.bx)+"Z",Me.select("path").attr("d",Ae);var Be=_e+Ge.textShiftX,Xe=ce+we.ty0-we.by/2+f,Ye=we.textAlign||"auto";Ye!=="auto"&&(Ye==="left"&&Ie!=="start"?(Se.attr("text-anchor","start"),Be=ve?-we.bx/2-we.tx2width/2+f:-we.bx-f):Ye==="right"&&Ie!=="end"&&(Se.attr("text-anchor","end"),Be=ve?we.bx/2-we.tx2width/2-f:we.bx+f)),Se.call(t.positionText,he(Be),xe(Xe)),we.tx2width&&(Me.select("text.name").call(t.positionText,he(Ge.text2ShiftX+Ge.alignShift*f+_e),xe(ce+we.ty0-we.by/2+f)),Me.select("rect").call(r.setRect,he(Ge.text2ShiftX+(Ge.alignShift-1)*we.tx2width/2+_e),xe(ce-we.by/2-1),he(we.tx2width),xe(we.by+2)))})}function $(q,Z){var ee=q.index,ae=q.trace||{},he=q.cd[0],xe=q.cd[ee]||{};function we(ke){return ke||p(ke)&&ke===0}var Me=Array.isArray(ee)?function(ke,_e){var ce=b.castOption(he,ee,ke);return we(ce)?ce:b.extractOption({},ae,"",_e)}:function(ke,_e){return b.extractOption(xe,ae,ke,_e)};function Se(ke,_e,ce){var ve=Me(_e,ce);we(ve)&&(q[ke]=ve)}if(Se("hoverinfo","hi","hoverinfo"),Se("bgcolor","hbg","hoverlabel.bgcolor"),Se("borderColor","hbc","hoverlabel.bordercolor"),Se("fontFamily","htf","hoverlabel.font.family"),Se("fontSize","hts","hoverlabel.font.size"),Se("fontColor","htc","hoverlabel.font.color"),Se("fontWeight","htw","hoverlabel.font.weight"),Se("fontStyle","hty","hoverlabel.font.style"),Se("fontVariant","htv","hoverlabel.font.variant"),Se("nameLength","hnl","hoverlabel.namelength"),Se("textAlign","hta","hoverlabel.align"),q.posref=Z==="y"||Z==="closest"&&ae.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=b.constrain(q.x0,0,q.xa._length),q.x1=b.constrain(q.x1,0,q.xa._length),q.y0=b.constrain(q.y0,0,q.ya._length),q.y1=b.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:s.hoverLabelText(q.xa,q.xLabelVal,ae.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:s.hoverLabelText(q.ya,q.yLabelVal,ae.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!isNaN(q.xerr)&&!(q.xa.type==="log"&&q.xerr<=0)){var Ie=s.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+Ie+" / -"+s.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+Ie,Z==="x"&&(q.distance+=1)}if(!isNaN(q.yerr)&&!(q.ya.type==="log"&&q.yerr<=0)){var Ve=s.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+Ve+" / -"+s.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+Ve,Z==="y"&&(q.distance+=1)}var Ge=q.hoverinfo||q.trace.hoverinfo;return Ge&&Ge!=="all"&&(Ge=Array.isArray(Ge)?Ge:Ge.split("+"),Ge.indexOf("x")===-1&&(q.xLabel=void 0),Ge.indexOf("y")===-1&&(q.yLabel=void 0),Ge.indexOf("z")===-1&&(q.zLabel=void 0),Ge.indexOf("text")===-1&&(q.text=void 0),Ge.indexOf("name")===-1&&(q.name=void 0)),q}function Q(q,Z,ee){var ae=ee.container,he=ee.fullLayout,xe=he._size,we=ee.event,Me=!!Z.hLinePoint,Se=!!Z.vLinePoint,Ie,Ve;if(ae.selectAll(".spikeline").remove(),!!(Se||Me)){var Ge=a.combine(he.plot_bgcolor,he.paper_bgcolor);if(Me){var ke=Z.hLinePoint,_e,ce;Ie=ke&&ke.xa,Ve=ke&&ke.ya;var ve=Ve.spikesnap;ve==="cursor"?(_e=we.pointerX,ce=we.pointerY):(_e=Ie._offset+ke.x,ce=Ve._offset+ke.y);var le=a.wcagContrast(ke.color,Ge)<1.5?a.contrast(Ge):ke.color,Ae=Ve.spikemode,Be=Ve.spikethickness,Xe=Ve.spikecolor||le,Ye=s.getPxPosition(q,Ve),yt,gt;if(Ae.indexOf("toaxis")!==-1||Ae.indexOf("across")!==-1){if(Ae.indexOf("toaxis")!==-1&&(yt=Ye,gt=_e),Ae.indexOf("across")!==-1){var Tt=Ve._counterDomainMin,At=Ve._counterDomainMax;Ve.anchor==="free"&&(Tt=Math.min(Tt,Ve.position),At=Math.max(At,Ve.position)),yt=xe.l+Tt*xe.w,gt=xe.l+At*xe.w}ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ce,y2:ce,"stroke-width":Be,stroke:Xe,"stroke-dasharray":r.dashStyle(Ve.spikedash,Be)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ce,y2:ce,"stroke-width":Be+2,stroke:Ge}).classed("spikeline",!0).classed("crisp",!0)}Ae.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:Ye+(Ve.side!=="right"?Be:-Be),cy:ce,r:Be,fill:Xe}).classed("spikeline",!0)}if(Se){var $t=Z.vLinePoint,rr,_r;Ie=$t&&$t.xa,Ve=$t&&$t.ya;var Xt=Ie.spikesnap;Xt==="cursor"?(rr=we.pointerX,_r=we.pointerY):(rr=Ie._offset+$t.x,_r=Ve._offset+$t.y);var or=a.wcagContrast($t.color,Ge)<1.5?a.contrast(Ge):$t.color,Ot=Ie.spikemode,vt=Ie.spikethickness,ht=Ie.spikecolor||or,De=s.getPxPosition(q,Ie),Ne,We;if(Ot.indexOf("toaxis")!==-1||Ot.indexOf("across")!==-1){if(Ot.indexOf("toaxis")!==-1&&(Ne=De,We=_r),Ot.indexOf("across")!==-1){var Ke=Ie._counterDomainMin,Je=Ie._counterDomainMax;Ie.anchor==="free"&&(Ke=Math.min(Ke,Ie.position),Je=Math.max(Je,Ie.position)),Ne=xe.t+(1-Je)*xe.h,We=xe.t+(1-Ke)*xe.h}ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt,stroke:ht,"stroke-dasharray":r.dashStyle(Ie.spikedash,vt)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt+2,stroke:Ge}).classed("spikeline",!0).classed("crisp",!0)}Ot.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:rr,cy:De-(Ie.side!=="top"?vt:-vt),r:vt,fill:ht}).classed("spikeline",!0)}}}function re(q,Z,ee){if(!ee||ee.length!==q._hoverdata.length)return!0;for(var ae=ee.length-1;ae>=0;ae--){var he=ee[ae],xe=q._hoverdata[ae];if(he.curveNumber!==xe.curveNumber||String(he.pointNumber)!==String(xe.pointNumber)||String(he.pointNumbers)!==String(xe.pointNumbers)||he.binNumber!==xe.binNumber)return!0}return!1}function ne(q,Z){return!Z||Z.vLinePoint!==q._spikepoints.vLinePoint||Z.hLinePoint!==q._spikepoints.hLinePoint}function se(q,Z){return t.plainText(q||"",{len:Z,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function G(q,Z){for(var ee=Z.charAt(0),ae=[],he=[],xe=[],we=0;weq.offsetTop+q.clientTop,H=q=>q.offsetLeft+q.clientLeft;function Y(q,Z){var ee=q._fullLayout,ae=Z.getBoundingClientRect(),he=ae.left,xe=ae.top,we=he+ae.width,Me=xe+ae.height,Se=b.apply3DTransform(ee._invTransform)(he,xe),Ie=b.apply3DTransform(ee._invTransform)(we,Me),Ve=Se[0],Ge=Se[1],ke=Ie[0],_e=Ie[1];return{x:Ve,y:Ge,width:ke-Ve,height:_e-Ge,top:Math.min(Ge,_e),left:Math.min(Ve,ke),right:Math.max(Ve,ke),bottom:Math.max(Ge,_e)}}}}),c1=ze({"src/components/fx/hoverlabel_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover;V.exports=function(l,e,t,n){n=n||{};var r=e.legend;function a(o){n.font[o]||(n.font[o]=r?e.legend.font[o]:e.font[o])}e&&E(e.hovermode)&&(n.font||(n.font={}),a("size"),a("family"),a("color"),a("weight"),a("style"),a("variant"),r?(n.bgcolor||(n.bgcolor=b.combine(e.legend.bgcolor,e.paper_bgcolor)),n.bordercolor||(n.bordercolor=e.legend.bordercolor)):n.bgcolor||(n.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",n.bgcolor),t("hoverlabel.bordercolor",n.bordercolor),t("hoverlabel.namelength",n.namelength),t("hoverlabel.showarrow",n.showarrow),p.coerceFont(t,"hoverlabel.font",n.font),t("hoverlabel.align",n.align)}}}),$I=ze({"src/components/fx/layout_global_defaults.js"(J,V){"use strict";var p=Nr(),b=c1(),E=rv();V.exports=function(l,e){function t(n,r){return p.coerce(l,e,E,n,r)}b(l,e,t)}}}),KI=ze({"src/components/fx/defaults.js"(J,V){"use strict";var p=Nr(),b=qm(),E=c1();V.exports=function(l,e,t,n){function r(o,s){return p.coerce(l,e,b,o,s)}var a=p.extendFlat({},n.hoverlabel);e.hovertemplate&&(a.namelength=-1),E(l,e,r,a)}}}),s5=ze({"src/components/fx/hovermode_defaults.js"(J,V){"use strict";var p=Nr(),b=rv();V.exports=function(k,l){function e(t,n){return l[t]!==void 0?l[t]:p.coerce(k,l,b,t,n)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),JI=ze({"src/components/fx/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=rv(),E=s5(),k=c1();V.exports=function(e,t){function n(m,h){return p.coerce(e,t,b,m,h)}var r=E(e,t);r&&(n("hoverdistance"),n("spikedistance"),r.indexOf("unified")!==-1&&n("hoversort"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((o||s)&&c===1||o&&s&&c===2)&&(t.dragmode="pan"),k(e,t,n),p.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),QI=ze({"src/components/fx/calc.js"(J,V){"use strict";var p=Nr(),b=mi();V.exports=function(l){var e=l.calcdata,t=l._fullLayout;function n(c){return function(m){return p.coerceHoverinfo({hoverinfo:m},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),Dx=ze({"src/components/shapes/draw_newshape/constants.js"(J,V){"use strict";var p=32;V.exports={CIRCLE_SIDES:p,i000:0,i090:p/4,i180:p/2,i270:p/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Fx=ze({"src/components/selections/helpers.js"(J,V){"use strict";var p=Nr().strTranslate;function b(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function E(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function k(e){var t=e._id.charAt(0)==="y"?1:0;return function(n){return b(e,n[t])}}function l(e){return p(e.xaxis._offset,e.yaxis._offset)}V.exports={p2r:b,r2p:E,axValue:k,getTransform:l}}}),uv=ze({"src/components/shapes/draw_newshape/helpers.js"(J){"use strict";var V=Kw(),p=Dx(),b=p.CIRCLE_SIDES,E=p.SQRT2,k=Fx(),l=k.p2r,e=k.r2p,t=[0,3,4,5,6,1,2],n=[0,3,4,1,2];J.writePaths=function(o){var s=o.length;if(!s)return"M0,0Z";for(var c="",m=0;m0&&w{let s=o.charAt(0),c=r[s].drawn!==void 0;return a+(c?1:0)},0)},J.getDataToPixel=function(l,e,t,n,r){var a=l._fullLayout._size,o;if(e)if(r==="domain")o=function(c){return e._length*(n?1-c:c)+e._offset};else{var s=J.shapePositionToRange(e);o=function(c){var m=k(e,t);return e._offset+e.r2p(s(c,!0))+m},e.type==="date"&&(o=J.decodeDate(o))}else n?o=function(c){return a.t+a.h*(1-c)}:o=function(c){return a.l+a.w*c};return o},J.getPixelToData=function(l,e,t,n){var r=l._fullLayout._size,a;if(e)if(n==="domain")a=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var o=J.rangeToShapePosition(e);a=function(s){return o(e.p2r(s-e._offset))}}else t?a=function(s){return 1-(s-r.t)/r.h}:a=function(s){return(s-r.l)/r.w};return a},J.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,n=Math.round(l);return t?n+.5:n},J.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&t.xref!=="paper"&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(n.yaxis=l._fullLayout[t.yref+"axis"])),n.xsizemode=t.xsizemode,n.ysizemode=t.ysizemode,n.xanchor=t.xanchor,n.yanchor=t.yanchor,{options:t,plotinfo:n}},J.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(n.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:n}},J.getPathString=function(l,e){let t=e.type,n=b.getRefType(e.xref),r=b.getRefType(e.yref),a=l._fullLayout._size;var o,s,c,m,h,v,g,i,w,S,M,C;function _(O,D,B,F){var P;if(O)if(D==="domain")F?P=function(j){return O._offset+O._length*(1-j)}:P=function(j){return O._offset+O._length*j};else{let j=J.shapePositionToRange(O);P=function(U){return O._offset+O.r2p(j(U,!0))},B==="path"&&O.type==="date"&&(P=J.decodeDate(P))}else F?P=function(j){return a.t+a.h*(1-j)}:P=function(j){return a.l+a.w*j};return P}if(n==="array"?(g=[],o=e.xref.map(function(O){return b.getFromId(l,O)}),g=e.xref.map(function(O,D){return _(o[D],b.getRefType(O),t,!1)})):(o=b.getFromId(l,e.xref),g=_(o,n,t,!1)),r==="array"?(i=[],s=e.yref.map(function(O){return b.getFromId(l,O)}),i=e.yref.map(function(O,D){return _(s[D],b.getRefType(O),t,!0)})):(s=b.getFromId(l,e.yref),i=_(s,r,t,!0)),t==="path")return E(e,g,i);if(n==="array")c=k(o[0],e.x0shift),m=k(o[1],e.x1shift),w=g[0](e.x0)+c,S=g[1](e.x1)+m;else if(c=k(o,e.x0shift),m=k(o,e.x1shift),e.xsizemode==="pixel"){let O=g(e.xanchor);w=O+e.x0+c,S=O+e.x1+m}else w=g(e.x0)+c,S=g(e.x1)+m;if(r==="array")h=k(s[0],e.y0shift),v=k(s[1],e.y1shift),M=i[0](e.y0)+h,C=i[1](e.y1)+v;else if(h=k(s,e.y0shift),v=k(s,e.y1shift),e.ysizemode==="pixel"){let O=i(e.yanchor);M=O-e.y0+h,C=O-e.y1+v}else M=i(e.y0)+h,C=i(e.y1)+v;if(t==="line")return"M"+w+","+M+"L"+S+","+C;if(t==="rect")return"M"+w+","+M+"H"+S+"V"+C+"H"+w+"Z";var T=(w+S)/2,f=(M+C)/2,u=Math.abs(T-w),A=Math.abs(f-M),x="A"+u+","+A,z=T+u+","+f,I=T+","+(f-A);return"M"+z+x+" 0 1,1 "+I+x+" 0 0,1 "+z+"Z"};function E(l,e,t){let n=l.path,r=l.xsizemode,a=l.ysizemode,o=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),m=Array.isArray(l.yref);var h=0,v=0;return n.replace(V.segmentRE,function(g){var i=0,w=g.charAt(0),S=V.paramIsX[w],M=V.paramIsY[w],C=V.numParams[w];let _=S.drawn!==void 0,T=M.drawn!==void 0,f=c?e[h]:e,u=m?t[v]:t;var A=g.slice(1).replace(V.paramRE,function(x){return S[i]?r==="pixel"?x=f(o)+Number(x):x=f(x):M[i]&&(a==="pixel"?x=u(s)-Number(x):x=u(x)),i++,i>C&&(x="X"),x});return i>C&&(A=A.replace(/[\s,]*X.*/,""),p.log("Ignoring extra params in segment "+g)),_&&h++,T&&v++,w+A})}J.getPixelShift=k;function k(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),u5=ze({"src/components/shapes/display_labels.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=Cs(),k=$i(),l=uv().readPaths,e=cv(),t=e.getPathString,n=Sx(),r=dc().FROM_TL;V.exports=function(c,m,h,v){if(v.selectAll(".shape-label").remove(),!!(h.label.text||h.label.texttemplate)){var g;if(h.label.texttemplate){var i={};if(h.type!=="path"){var w=b.getFromId(c,h.xref),S=b.getFromId(c,h.yref);let Z=Array.isArray(h.xref),ee=Array.isArray(h.yref);for(var M in n){var C=typeof n[M]=="function",_=!Z||n.simpleXVariables.includes(M),T=!ee||n.simpleYVariables.includes(M);if(C&&_&&T){var f=n[M](h,w,S);f!==void 0&&(i[M]=f)}}}g=p.texttemplateStringForShapes({data:[i],fallback:h.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:h.label.texttemplate})}else g=h.label.text;var u={"data-index":m},A=h.label.font,x={"data-notex":1},z=v.append("g").attr(u).classed("shape-label",!0),I=z.append("text").attr(x).classed("shape-label-text",!0).text(g),O,D,B,F;if(h.path){var P=t(c,h),j=l(P,c);O=1/0,B=1/0,D=-1/0,F=-1/0;for(var U=0;Ue.getDataToPixel(c,ve,ce,!1,le)(_e),ke=(_e,ce,ve,le)=>e.getDataToPixel(c,ve,ce,!0,le)(_e);if(h.xsizemode==="pixel"){let _e=Ge(h.xanchor,void 0,ae,Me),ce=e.getPixelShift(ae,h.x0shift),ve=e.getPixelShift(ae,h.x1shift);O=_e+h.x0+ce,D=_e+h.x1+ve}else O=Ge(h.x0,h.x0shift,ae,Me),D=Ge(h.x1,h.x1shift,he,Se);if(h.ysizemode==="pixel"){let _e=ke(h.yanchor,void 0,xe,Ie),ce=e.getPixelShift(xe,h.y0shift),ve=e.getPixelShift(xe,h.y1shift);B=_e-h.y0+ce,F=_e-h.y1+ve}else B=ke(h.y0,h.y0shift,xe,Ie),F=ke(h.y1,h.y1shift,we,Ve)}var G=h.label.textangle;G==="auto"&&(h.type==="line"?G=a(O,B,D,F):G=0),I.call(function(Z){return Z.call(k.font,A).attr({}),E.convertToTspans(Z,c),Z});var X=k.bBox(I.node()),K=o(O,B,D,F,h,G,X),H=K.textx,Y=K.texty,q=K.xanchor;I.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[q],y:Y,x:H,transform:"rotate("+G+","+H+","+Y+")"}).call(E.positionText,H,Y)}};function a(s,c,m,h){var v,g;return g=Math.abs(m-s),m>=s?v=c-h:v=h-c,-180/Math.PI*Math.atan2(v,g)}function o(s,c,m,h,v,g,i){var w=v.label.textposition,S=v.label.textangle,M=v.label.padding,C=v.type,_=Math.PI/180*g,T=Math.sin(_),f=Math.cos(_),u=v.label.xanchor,A=v.label.yanchor,x,z,I,O;if(C==="line"){w==="start"?(x=s,z=c):w==="end"?(x=m,z=h):(x=(s+m)/2,z=(c+h)/2),u==="auto"&&(w==="start"?S==="auto"?m>s?u="left":ms?u="right":ms?u="right":ms?u="left":m1&&!(ke.length===2&&ke[1][0]==="Z")&&(G===0&&(ke[0][0]="M"),x[se]=ke,B(),F())}}function he(ke,_e){if(ke===2){se=+_e.srcElement.getAttribute("data-i"),G=+_e.srcElement.getAttribute("data-j");var ce=x[se];!g(ce)&&!i(ce)&&ae()}}function xe(ke){re=[];for(var _e=0;_e{if(!I._dragging&&I._fullLayout.hoveranywhere){let j=F(P);j&&c.hover(I,j,D.id)}}),B.addEventListener("click",P=>{if(!I._dragged&&I._fullLayout.clickanywhere){let j=F(P);j&&c.click(I,j,D.id)}})}function _(I,O,D){let B=D.xref,F=D.yref;if(Array.isArray(B)||Array.isArray(F)){let P="clip"+O._fullLayout._uid+"shape"+D._index,j=T(O,B,F);E.ensureSingleById(O._fullLayout._clips,"clipPath",P,function(U){U.append("rect")}).select("rect").attr(j),a.setClipUrl(I,P,O)}else{let P=(B+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");a.setClipUrl(I,P?"clip"+O._fullLayout._uid+P:null,O)}}function T(I,O,D){let B=I._fullLayout._size;function F(U,$){let Q=(Array.isArray(U)?U:[U]).map(se=>k.getFromId(I,se)).filter(Boolean);if(!Q.length)return $?[B.t,B.t+B.h]:[B.l,B.l+B.w];let re=Q.map(function(se){return se._offset}),ne=Q.map(function(se){return se._offset+se._length});return[Math.min(...re),Math.max(...ne)]}let P=F(O,!1),j=F(D,!0);return{x:P[0],y:j[0],width:P[1]-P[0],height:j[1]-j[0]}}function f(I,O,D,B,F,P){var j=10,U=10,$=D.xsizemode==="pixel",Q=D.ysizemode==="pixel",re=D.type==="line",ne=D.type==="path",se=P.modifyItem,G,X,K,H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve=p.select(O.node().parentNode),Ge=k.getFromId(I,D.xref),ke=k.getRefType(D.xref),_e=k.getFromId(I,D.yref),ce=k.getRefType(D.yref),ve=D.x0shift,le=D.x1shift,Ae=D.y0shift,Be=D.y1shift,Xe=function(Je,et){var Mt=v.getDataToPixel(I,Ge,et,!1,ke);return Mt(Je)},Ye=function(Je,et){var Mt=v.getDataToPixel(I,_e,et,!0,ce);return Mt(Je)},yt=v.getPixelToData(I,Ge,!1,ke),gt=v.getPixelToData(I,_e,!0,ce),Tt=rr(),At={element:Tt.node(),gd:I,prepFn:or,doneFn:Ot,clickFn:vt},$t;s.init(At),Tt.node().onmousemove=Xt;function rr(){return re?_r():O}function _r(){var Je=10,et=Math.max(D.line.width,Je),Mt=F.append("g").attr("data-index",B).attr("drag-helper",!0);Mt.append("path").attr("d",O.attr("d")).style({cursor:"move","stroke-width":et,"stroke-opacity":"0"});var pt={"fill-opacity":"0"},Pt=Math.max(et/2,Je);return Mt.append("circle").attr({"data-line-point":"start-point",cx:$?Xe(D.xanchor)+D.x0:Xe(D.x0,ve),cy:Q?Ye(D.yanchor)-D.y0:Ye(D.y0,Ae),r:Pt}).style(pt).classed("cursor-grab",!0),Mt.append("circle").attr({"data-line-point":"end-point",cx:$?Xe(D.xanchor)+D.x1:Xe(D.x1,le),cy:Q?Ye(D.yanchor)-D.y1:Ye(D.y1,Be),r:Pt}).style(pt).classed("cursor-grab",!0),Mt}function Xt(Je){if(w(I)){$t=null;return}if(re)Je.target.tagName==="path"?$t="move":$t=Je.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var et=At.element.getBoundingClientRect(),Mt=et.right-et.left,pt=et.bottom-et.top,Pt=Je.clientX-et.left,Ct=Je.clientY-et.top,qt=!ne&&Mt>j&&pt>U&&!Je.shiftKey?s.getCursor(Pt/Mt,1-Ct/pt):"move";m(O,qt),$t=qt.split("-")[0]}}function or(Je){w(I)||($&&(Y=Xe(D.xanchor)),Q&&(q=Ye(D.yanchor)),D.type==="path"?Ie=D.path:(G=$?D.x0:Xe(D.x0),X=Q?D.y0:Ye(D.y0),K=$?D.x1:Xe(D.x1),H=Q?D.y1:Ye(D.y1)),GH?(Z=X,xe="y0",ee=H,we="y1"):(Z=H,xe="y1",ee=X,we="y0"),Xt(Je),Ne(F,D),Ke(O,D,I),At.moveFn=$t==="move"?ht:De,At.altKey=Je.altKey)}function Ot(){w(I)||(m(O),We(F),_(O,I,D),b.call("_guiRelayout",I,P.getUpdateObj()))}function vt(){w(I)||We(F)}function ht(Je,et){if(D.type==="path"){var Mt=function(Ct){return Ct},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(Y+Je)):(pt=function(qt){return yt(Xe(qt)+Je)},Ge&&Ge.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(qt){return gt(Ye(qt)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else $?se("xanchor",D.xanchor=yt(Y+Je)):(se("x0",D.x0=yt(G+Je)),se("x1",D.x1=yt(K+Je))),Q?se("yanchor",D.yanchor=gt(q+et)):(se("y0",D.y0=gt(X+et)),se("y1",D.y1=gt(H+et)));O.attr("d",g(I,D)),Ne(F,D),t(I,B,D,Ve)}function De(Je,et){if(ne){var Mt=function(Zr){return Zr},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(Y+Je)):(pt=function(ha){return yt(Xe(ha)+Je)},Ge&&Ge.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(ha){return gt(Ye(ha)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else if(re){if($t==="resize-over-start-point"){var Ct=G+Je,qt=Q?X-et:X+et;se("x0",D.x0=$?Ct:yt(Ct)),se("y0",D.y0=Q?qt:gt(qt))}else if($t==="resize-over-end-point"){var Vt=K+Je,Ht=Q?H-et:H+et;se("x1",D.x1=$?Vt:yt(Vt)),se("y1",D.y1=Q?Ht:gt(Ht))}}else{var Sr=function(Zr){return $t.indexOf(Zr)!==-1},Kr=Sr("n"),Yt=Sr("s"),Rt=Sr("w"),nr=Sr("e"),ur=Kr?Z+et:Z,cr=Yt?ee+et:ee,Rr=Rt?ae+Je:ae,Qr=nr?he+Je:he;Q&&(Kr&&(ur=Z-et),Yt&&(cr=ee-et)),(!Q&&cr-ur>U||Q&&ur-cr>U)&&(se(xe,D[xe]=Q?ur:gt(ur)),se(we,D[we]=Q?cr:gt(cr))),Qr-Rr>j&&(se(Me,D[Me]=$?Rr:yt(Rr)),se(Se,D[Se]=$?Qr:yt(Qr)))}O.attr("d",g(I,D)),Ne(F,D),t(I,B,D,Ve)}function Ne(Je,et){($||Q)&&Mt();function Mt(){var pt=et.type!=="path",Pt=Je.selectAll(".visual-cue").data([0]),Ct=1;Pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var qt=Xe($?et.xanchor:E.midRange(pt?[et.x0,et.x1]:v.extractPathCoords(et.path,h.paramIsX))),Vt=Ye(Q?et.yanchor:E.midRange(pt?[et.y0,et.y1]:v.extractPathCoords(et.path,h.paramIsY)));if(qt=v.roundPositionForSharpStrokeRendering(qt,Ct),Vt=v.roundPositionForSharpStrokeRendering(Vt,Ct),$&&Q){var Ht="M"+(qt-1-Ct)+","+(Vt-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pt.attr("d",Ht)}else if($){var Sr="M"+(qt-1-Ct)+","+(Vt-9-Ct)+"v18 h2 v-18 Z";Pt.attr("d",Sr)}else{var Kr="M"+(qt-9-Ct)+","+(Vt-1-Ct)+"h18 v2 h-18 Z";Pt.attr("d",Kr)}}}function We(Je){Je.selectAll(".visual-cue").remove()}function Ke(Je,et,Mt){var pt=et.xref,Pt=et.yref,Ct=k.getFromId(Mt,pt),qt=k.getFromId(Mt,Pt),Vt="";pt!=="paper"&&!Ct.autorange&&(Vt+=pt),Pt!=="paper"&&!qt.autorange&&(Vt+=Pt),a.setClipUrl(Je,Vt?"clip"+Mt._fullLayout._uid+Vt:null,Mt)}}function u(I,O,D){return I.replace(h.segmentRE,function(B){var F=0,P=B.charAt(0),j=h.paramIsX[P],U=h.paramIsY[P],$=h.numParams[P],Q=B.slice(1).replace(h.paramRE,function(re){return F>=$||(j[F]?re=O(re):U[F]&&(re=D(re)),F++),re});return P+Q})}function A(I,O){if(S(I)){var D=O.node(),B=+D.getAttribute("data-index");if(B>=0){if(B===I._fullLayout._activeShapeIndex){x(I);return}I._fullLayout._activeShapeIndex=B,I._fullLayout._deactivateShape=x,i(I)}}}function x(I){if(S(I)){var O=I._fullLayout._activeShapeIndex;O>=0&&(n(I),delete I._fullLayout._activeShapeIndex,i(I))}}function z(I){if(S(I)){n(I);var O=I._fullLayout._activeShapeIndex,D=(I.layout||{}).shapes||[];if(O{let o=E(e),s=t.append("div").classed("plotly-cloud-dialog-box",!0);if(s.append("div").classed("plotly-cloud-dialog-title",!0).text(o.DIALOG_TITLE),n===b.plotlyServerURL){let m=s.append("div").classed("plotly-cloud-dialog-message",!0),h=new URL(n).origin,v=o.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),g=v[0],i=v[2],w=v[4];m.append("span").text(g),m.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",h).attr("target","_blank").text(i),m.append("span").text(w),m.append("div").classed("plotly-cloud-dialog-message--account",!0).text(o.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let m=new URL(n),h=m.hostname,v=m.origin,g=o.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),i=g[0],w=g[4],S=s.append("div").classed("plotly-cloud-dialog-message",!0);S.append("span").text(i),S.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",v).attr("target","_blank").text(h),S.append("span").text(w)}let c=s.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(o.DIALOG_CANCEL).on("click",a),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(o.DIALOG_CONFIRM).on("click",r)},l=(e,t,n)=>{let r=p.select(e._fullLayout._paperdiv.node());r.selectAll(".plotly-cloud-dialog").remove();let a=r.append("div").classed("plotly-cloud-dialog",!0),o=()=>{a.remove(),document.removeEventListener("keydown",s)},s=c=>{(c.key==="Escape"||c.keyCode===27)&&o()};document.addEventListener("keydown",s),a.on("click",()=>{p.event.target===a.node()&&o()}),k(e,a,t,()=>{o(),n()},o)};V.exports=l}}),c5=ze({"src/components/modebar/buttons.js"(J,V){"use strict";var p=mi(),b=cl(),E=Xl(),k=Ix(),l=Ox().eraseActiveShape,e=rD(),t=Nr(),n=t._,r=V.exports={};r.toImage={name:"toImage",title:function(_){var T=_._context.toImageButtonOptions||{},f=T.format||"png";return f==="png"?n(_,"Download plot as a PNG"):n(_,"Download plot")},icon:k.camera,click:function(_){var T=_._context.toImageButtonOptions,f={format:T.format||"png"};t.notifier(n(_,"Preparing image - this may take a few seconds"),"long",_),["filename","width","height","scale"].forEach(function(u){u in T&&(f[u]=T[u])}),p.call("downloadImage",_,f).then(function(u){t.notifier(n(_,"Image download succeeded")+" - "+u,"long",_)}).catch(function(){t.notifier(n(_,"Sorry, there was a problem downloading your image!"),"long",_)})}},r.sendChartToCloud={name:"sendChartToCloud",title:function(_){return n(_,"Share chart...")},icon:k.cloudupload,click:function(_){var T=(window.PLOTLYENV||{}).BASE_URL||_._context.plotlyServerURL;if(!T){console.error("No destination URL provided (plotlyServerURL is empty)");return}var f;try{f=new URL(T)}catch{console.error("Invalid plotlyServerURL: "+T);return}let u=["http:","https:"];if(!u.includes(f.protocol)){console.error(`Invalid protocol '${f.protocol}' in plotlyServerURL '${T}'. Must be one of: ${u.join(", ")}`);return}e(_,T,function(){b.sendDataToCloud(_,T)})}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(_){return n(_,"Zoom")},attr:"dragmode",val:"zoom",icon:k.zoombox,click:a},r.pan2d={name:"pan2d",_cat:"pan",title:function(_){return n(_,"Pan")},attr:"dragmode",val:"pan",icon:k.pan,click:a},r.select2d={name:"select2d",_cat:"select",title:function(_){return n(_,"Box Select")},attr:"dragmode",val:"select",icon:k.selectbox,click:a},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(_){return n(_,"Lasso Select")},attr:"dragmode",val:"lasso",icon:k.lasso,click:a},r.drawclosedpath={name:"drawclosedpath",title:function(_){return n(_,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:k.drawclosedpath,click:a},r.drawopenpath={name:"drawopenpath",title:function(_){return n(_,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:k.drawopenpath,click:a},r.drawline={name:"drawline",title:function(_){return n(_,"Draw line")},attr:"dragmode",val:"drawline",icon:k.drawline,click:a},r.drawrect={name:"drawrect",title:function(_){return n(_,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:k.drawrect,click:a},r.drawcircle={name:"drawcircle",title:function(_){return n(_,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:k.drawcircle,click:a},r.eraseshape={name:"eraseshape",title:function(_){return n(_,"Erase active shape")},icon:k.eraseshape,click:l},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(_){return n(_,"Zoom in")},attr:"zoom",val:"in",icon:k.zoom_plus,click:a},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(_){return n(_,"Zoom out")},attr:"zoom",val:"out",icon:k.zoom_minus,click:a},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(_){return n(_,"Autoscale")},attr:"zoom",val:"auto",icon:k.autoscale,click:a},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(_){return n(_,"Reset axes")},attr:"zoom",val:"reset",icon:k.home,click:a},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(_){return n(_,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:k.tooltip_basic,gravity:"ne",click:a},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(_){return n(_,"Compare data on hover")},attr:"hovermode",val:function(_){return _._fullLayout._isHoriz?"y":"x"},icon:k.tooltip_compare,gravity:"ne",click:a};function a(_,T){var f=T.currentTarget,u=f.getAttribute("data-attr"),A=f.getAttribute("data-val")||!0,x=_._fullLayout,z={},I=E.list(_,null,!0),O=x._cartesianSpikesEnabled,D,B;if(u==="zoom"){var F=A==="in"?.5:2,P=(1+F)/2,j=(1-F)/2,U,$;for(B=0;B-K),[$,Q]=F.invert(B.midPt),{minscale:re}=D.projection,ne=(f=D.projection.maxscale)!=null?f:1/0,se=Math.min(re,ne),G=Math.max(re,ne),X=x==="in"?h*P:1/h*P;X>G?X=G:Xd5});var jx,h5,d5,p5=zi({"src/components/modebar/attributes.ts"(){"use strict";jx=Yl(f5()),h5={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${jx.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${jx.default.foreButtons.join("*, *")}*.`].join(" ")}},d5=h5}}),aD=ze({"src/components/modebar/defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=(p5(),Po(Nx)).default;V.exports=function(e,t){var n=e.modebar||{},r=E.newContainer(t,"modebar");function a(s,c){return p.coerce(n,r,k,s,c)}a("orientation"),a("bgcolor",b.addOpacity(t.paper_bgcolor,.5));var o=b.contrast(b.rgb(t.modebar.bgcolor));a("color",b.addOpacity(o,.3)),a("activecolor",b.addOpacity(o,.7)),a("uirevision",t.uirevision),a("add"),a("remove")}}}),nD=ze({"src/components/modebar/modebar.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=Ix(),l=ev().version,e=new DOMParser;function t(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var n=t.prototype;n.update=function(o,s){this.graphInfo=o;var c=this.graphInfo._context,m=this.graphInfo._fullLayout,h="modebar-"+m._uid;this.element.setAttribute("id",h),this.element.setAttribute("role","toolbar"),this._uid=h,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),m.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var v=m.modebar,g="#"+h+" .modebar-group";document.querySelectorAll(g).forEach(function(C){C.style.backgroundColor=v.bgcolor});var i=!this.hasButtons(s),w=this.hasLogo!==c.displaylogo,S=this.locale!==c.locale;if(this.locale=c.locale,(i||w||S)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var M=this.getLogo();c.watermark&&(M.className=M.className+" watermark"),m.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),E.setStyleOnHover("#"+h+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},n.updateButtons=function(o){var s=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var m=s.createGroup();c.forEach(function(h){var v=h.name;if(!v)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");s.buttonsNames.push(v);var g=s.createButton(h);s.buttonElements.push(g),m.appendChild(g)}),s.element.appendChild(m)})},n.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=s.bgcolor,o},n.createButton=function(o){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var m=o.title;m===void 0?m=o.name:typeof m=="function"&&(m=m(this.graphInfo)),(m||m===0)&&(c.setAttribute("data-title",m),c.setAttribute("aria-label",m)),o.attr!==void 0&&c.setAttribute("data-attr",o.attr);var h=o.val;h!==void 0&&(typeof h=="function"&&(h=h(this.graphInfo)),c.setAttribute("data-val",h));var v=o.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(i){o.click(s.graphInfo,i),s.updateActiveButton(i.currentTarget)}),c.setAttribute("data-toggle",o.toggle||!1),o.toggle&&p.select(c).classed("active",!0);var g=o.icon;return typeof g=="function"?c.appendChild(g()):c.appendChild(this.createIcon(g||k.question)),c.setAttribute("data-gravity",o.gravity||"n"),c},n.createIcon=function(o){var s=b(o.height)?Number(o.height):o.ascent-o.descent,c="http://www.w3.org/2000/svg",m;if(o.path){m=document.createElementNS(c,"svg"),m.setAttribute("viewBox",[0,0,o.width,s].join(" ")),m.setAttribute("class","icon");var h=document.createElementNS(c,"path");h.setAttribute("d",o.path),o.transform?h.setAttribute("transform",o.transform):o.ascent!==void 0&&h.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),m.appendChild(h)}if(o.svg){var v=e.parseFromString(o.svg,"application/xml");m=v.childNodes[0]}return m.setAttribute("height","1em"),m.setAttribute("width","1em"),m},n.updateActiveButton=function(o){var s=this.graphInfo._fullLayout,c=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(m){var h=m.getAttribute("data-val")||!0,v=m.getAttribute("data-attr"),g=m.getAttribute("data-toggle")==="true",i=p.select(m),w=function(C,_){var T=s.modebar,f=C.querySelector(".icon path");f&&(_||C.matches(":hover")?f.style.fill=T.activecolor:f.style.fill=T.color)};if(g){if(v===c){var S=!i.classed("active");i.classed("active",S),w(m,S)}}else{var M=v===null?v:E.nestedProperty(s,v).get();i.classed("active",M===h),w(m,M===h)}})},n.hasButtons=function(o){var s=this.buttons;if(!s||o.length!==s.length)return!1;for(var c=0;c1?(re=["toggleHover"],ne=["resetViews"]):u?(Q=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],ne=["resetGeo"]):f?(re=["hoverClosest3d"],ne=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(Q=["zoomInMap","zoomOutMap"],re=["toggleHover"],ne=["resetViewMap"]):A?re=["hoverClosestPie"]:B?(re=["hoverClosestCartesian","hoverCompareCartesian"],ne=["resetViewSankey"]):re=["toggleHover"],T&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(g)||P)&&(re=[]),T&&!F&&(Q=["zoomIn2d","zoomOut2d","autoScale2d"],ne[0]!=="resetViews"&&(ne=["resetScale2d"])),f?se=["zoom3d","pan3d","orbitRotation","tableRotation"]:T&&!F||z?se=["zoom2d","pan2d"]:I||u?se=["pan2d"]:O&&(se=["zoom2d"]),o(g)&&se.push("select2d","lasso2d");var G=[],X=function(q){G.indexOf(q)===-1&&re.indexOf(q)!==-1&&G.push(q)};if(Array.isArray(C)){for(var K=[],H=0;HS?g.slice(S):i.slice(w))+M}function c(h,v){for(var g=v._size,i=g.h/g.w,w={},S=Object.keys(h),M=0;Me*z&&!B)){for(S=0;SG&&aene&&(ne=ae);var xe=(ne-re)/(2*se);u/=xe,re=_.l2r(re),ne=_.l2r(ne),_.range=_._input.range=U<$?[re,ne]:[ne,re]}m(_,u)}}}},J.getAxisGroup=function(v,g){for(var i=v._axisMatchGroups,w=0;w=F[1]||$[1]<=F[0])&&Q[0]P[0])return!0}return!1}function M(F){var P=F._fullLayout,j=P._size,U=j.p,$=a.list(F,"",!0),Q,re,ne,se,G,X;if(P._paperdiv.style({width:F._context.responsive&&P.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":P.width+"px",height:F._context.responsive&&P.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(t.setSize,P.width,P.height),F._context.setBackground(F,P.paper_bgcolor),J.drawMainTitle(F),r.manage(F),!P._has("cartesian"))return b.previousPromises(F);function K(De,Ne,We){var Ke=De._lw/2;if(De._id.charAt(0)==="x"){if(Ne){if(We==="top")return Ne._offset-U-Ke}else return j.t+j.h*(1-(De.position||0))+Ke%1;return Ne._offset+Ne._length+U+Ke}if(Ne){if(We==="right")return Ne._offset+Ne._length+U+Ke}else return j.l+j.w*(De.position||0)+Ke%1;return Ne._offset-U-Ke}for(Q=0;Q<$.length;Q++){se=$[Q];var H=se._anchorAxis;se._linepositions={},se._lw=t.crispRound(F,se.linewidth,1),se._mainLinePosition=K(se,H,se.side),se._mainMirrorPosition=se.mirror&&H?K(se,H,o.OPPOSITE_SIDE[se.side]):null}var Y=[],q=[],Z=[],ee=e.opacity(P.paper_bgcolor)===1&&e.opacity(P.plot_bgcolor)===1&&P.paper_bgcolor===P.plot_bgcolor;for(re in P._plots)if(ne=P._plots[re],ne.mainplot)ne.bg&&ne.bg.remove(),ne.bg=void 0;else{var ae=ne.xaxis.domain,he=ne.yaxis.domain,xe=ne.plotgroup;if(S(ae,he,Z)&&re.indexOf(w)===-1){var we=xe.node(),Me=ne.bg=E.ensureSingle(xe,"rect","bg");we.insertBefore(Me.node(),we.childNodes[0]),q.push(re)}else xe.select("rect.bg").remove(),Z.push([ae,he]),ee||(Y.push(re),q.push(re))}var Se=P._bgLayer.selectAll(".bg").data(Y);for(Se.enter().append("rect").classed("bg",!0),Se.exit().remove(),Se.each(function(De){P._plots[De].bg=V.select(this)}),Q=0;Q0){x(F,Q,G,se),ne.attr({x:re,y:Q,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Q);var X=(P.text.match(k.BR_TAG_ALL)||[]).length;if(X){var K=o.LINE_SPACING*X+o.MID_SHIFT;P.y===0&&(K=-K),ne.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",ee)})}var H=V.select(F).selectAll(".gtitle-subtitle");if(H.node()){var Y=ne.node().getBBox(),q=Y.y+Y.height,Z=q+n.SUBTITLE_PADDING_EM*P.subtitle.font.size;H.attr({x:re,y:Z,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Z)}}}};function f(F,P,j,U,$){var Q=P.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,re=E.isTopAnchor(P)?U:U-$,ne=j==="b"?Q-re:re;return E.isTopAnchor(P)&&j==="t"||E.isBottomAnchor(P)&&j==="b"?!1:ne<$}function u(F,P,j,U,$){var Q=0;return j==="middle"&&(Q+=$/2),F==="t"?(j==="top"&&(Q+=$),Q+=U-P*U):(j==="bottom"&&(Q+=$),Q+=P*U),Q}function A(F,P,j){var U=P.y,$=P.yanchor,Q=U>.5?"t":"b",re=F._fullLayout.margin[Q],ne=0;return P.yref==="paper"?ne=j+P.pad.t+P.pad.b:P.yref==="container"&&(ne=u(Q,U,$,F._fullLayout.height,j)+P.pad.t+P.pad.b),ne>re?ne:0}function x(F,P,j,U){var $="title.automargin",Q=F._fullLayout.title,re=Q.y>.5?"t":"b",ne={x:Q.x,y:Q.y,t:0,b:0},se={};Q.yref==="paper"&&f(F,Q,re,P,U)?ne[re]=j:Q.yref==="container"&&(se[re]=j,F._fullLayout._reservedMargin[$]=se),b.allowAutoMargin(F,$),b.autoMargin(F,$,ne)}function z(F,P){var j=F.title,U=F._size,$=0;switch(P===v?$=j.pad.l:P===i&&($=-j.pad.r),j.xref){case"paper":return U.l+U.w*j.x+$;case"container":default:return F.width*j.x+$}}function I(F,P){var j=F.title,U=F._size,$=0;if(P==="0em"||!P?$=-j.pad.b:P===o.CAP_SHIFT+"em"&&($=j.pad.t),j.y==="auto")return U.t/2;switch(j.yref){case"paper":return U.t+U.h-U.h*j.y+$;case"container":default:return F.height-F.height*j.y+$}}function O(F){return F==="top"?o.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function D(F){var P=F.title,j=g;return E.isRightAnchor(P)?j=i:E.isLeftAnchor(P)&&(j=v),j}function B(F){var P=F.title,j="0em";return E.isTopAnchor(P)?j=o.CAP_SHIFT+"em":E.isMiddleAnchor(P)&&(j=o.MID_SHIFT+"em"),j}J.doTraceStyle=function(F){var P=F.calcdata,j=[],U;for(U=0;U=0;D--){var B=C.append("path").attr(T).style("opacity",D?.1:f).call(k.stroke,A).call(k.fill,u).call(l.dashLine,D?"solid":z,D?4+x:x);if(s(B,v,w),I){var F=e(v.layout,"selections",w);B.style({cursor:"move"});var P={element:B.node(),plotinfo:S,gd:v,editHelpers:F,isActiveSelection:!0},j=p(_,v);b(j,B,P)}else B.style("pointer-events",D?"all":"none");O[D]=B}var U=O[0],$=O[1];$.node().addEventListener("click",function(){return c(v,U)})}}function s(v,g,i){var w=i.xref+i.yref;l.setClipUrl(v,"clip"+g._fullLayout._uid+w,g)}function c(v,g){if(a(v)){var i=g.node(),w=+i.getAttribute("data-index");if(w>=0){if(w===v._fullLayout._activeSelectionIndex){h(v);return}v._fullLayout._activeSelectionIndex=w,v._fullLayout._deactivateSelection=h,r(v)}}}function m(v){if(a(v)){var g=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=g,v._fullLayout._deactivateSelection=h,r(v)}}function h(v){if(a(v)){var g=v._fullLayout._activeSelectionIndex;g>=0&&(E(v),delete v._fullLayout._activeSelectionIndex,r(v))}}}}),oD=ze({"node_modules/polybooljs/lib/build-log.js"(J,V){function p(){var b,E=0,k=!1;function l(e,t){return b.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),b}return b={list:[],segmentId:function(){return E++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,n){return l("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,n){return l("status",{seg:e,above:t,below:n})},vert:function(e){return e===k?b:(k=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},b}V.exports=p}}),sD=ze({"node_modules/polybooljs/lib/epsilon.js"(J,V){function p(b){typeof b!="number"&&(b=1e-10);var E={epsilon:function(k){return typeof k=="number"&&(b=k),b},pointAboveOrOnLine:function(k,l,e){var t=l[0],n=l[1],r=e[0],a=e[1],o=k[0],s=k[1];return(r-t)*(s-n)-(a-n)*(o-t)>=-b},pointBetween:function(k,l,e){var t=k[1]-l[1],n=e[0]-l[0],r=k[0]-l[0],a=e[1]-l[1],o=r*n+t*a;if(o-b)},pointsSameX:function(k,l){return Math.abs(k[0]-l[0])b!=r-t>b&&(n-s)*(t-c)/(r-c)+s-e>b&&(a=!a),n=s,r=c}return a}};return E}V.exports=p}}),lD=ze({"node_modules/polybooljs/lib/linked-list.js"(J,V){var p={create:function(){var b={root:{root:!0,next:null},exists:function(E){return!(E===null||E===b.root)},isEmpty:function(){return b.root.next===null},getHead:function(){return b.root.next},insertBefore:function(E,k){for(var l=b.root,e=b.root.next;e!==null;){if(k(e)){E.prev=e.prev,E.next=e,e.prev.next=E,e.prev=E;return}l=e,e=e.next}l.next=E,E.prev=l,E.next=null},findTransition:function(E){for(var k=b.root,l=b.root.next;l!==null&&!E(l);)k=l,l=l.next;return{before:k===b.root?null:k,after:l,insert:function(e){return e.prev=k,e.next=l,k.next=e,l!==null&&(l.prev=e),e}}}};return b},node:function(b){return b.prev=null,b.next=null,b.remove=function(){b.prev.next=b.next,b.next&&(b.next.prev=b.prev),b.prev=null,b.next=null},b}};V.exports=p}}),uD=ze({"node_modules/polybooljs/lib/intersecter.js"(J,V){var p=lD();function b(E,k,l){function e(g,i){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:null,below:null},otherFill:null}}function t(g,i,w){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:w.myFill.above,below:w.myFill.below},otherFill:null}}var n=p.create();function r(g,i,w,S,M,C){var _=k.pointsCompare(i,M);return _!==0?_:k.pointsSame(w,C)?0:g!==S?g?1:-1:k.pointAboveOrOnLine(w,S?M:C,S?C:M)?1:-1}function a(g,i){n.insertBefore(g,function(w){var S=r(g.isStart,g.pt,i,w.isStart,w.pt,w.other.pt);return S<0})}function o(g,i){var w=p.node({isStart:!0,pt:g.start,seg:g,primary:i,other:null,status:null});return a(w,g.end),w}function s(g,i,w){var S=p.node({isStart:!1,pt:i.end,seg:i,primary:w,other:g,status:null});g.other=S,a(S,g.pt)}function c(g,i){var w=o(g,i);return s(w,g,i),w}function m(g,i){l&&l.segmentChop(g.seg,i),g.other.remove(),g.seg.end=i,g.other.pt=i,a(g.other,g.pt)}function h(g,i){var w=t(i,g.seg.end,g.seg);return m(g,i),c(w,g.primary)}function v(g,i){var w=p.create();function S(F,P){var j=F.seg.start,U=F.seg.end,$=P.seg.start,Q=P.seg.end;return k.pointsCollinear(j,$,Q)?k.pointsCollinear(U,$,Q)||k.pointAboveOrOnLine(U,$,Q)?1:-1:k.pointAboveOrOnLine(j,$,Q)?1:-1}function M(F){return w.findTransition(function(P){var j=S(F,P.ev);return j>0})}function C(F,P){var j=F.seg,U=P.seg,$=j.start,Q=j.end,re=U.start,ne=U.end;l&&l.checkIntersection(j,U);var se=k.linesIntersect($,Q,re,ne);if(se===!1){if(!k.pointsCollinear($,Q,re)||k.pointsSame($,ne)||k.pointsSame(Q,re))return!1;var G=k.pointsSame($,re),X=k.pointsSame(Q,ne);if(G&&X)return P;var K=!G&&k.pointBetween($,re,ne),H=!X&&k.pointBetween(Q,re,ne);if(G)return H?h(P,Q):h(F,ne),P;K&&(X||(H?h(P,Q):h(F,ne)),h(P,$))}else se.alongA===0&&(se.alongB===-1?h(F,re):se.alongB===0?h(F,se.pt):se.alongB===1&&h(F,ne)),se.alongB===0&&(se.alongA===-1?h(P,$):se.alongA===0?h(P,se.pt):se.alongA===1&&h(P,Q));return!1}for(var _=[];!n.isEmpty();){var T=n.getHead();if(l&&l.vert(T.pt[0]),T.isStart){let F=function(){if(A){var P=C(T,A);if(P)return P}return x?C(T,x):!1};var f=F;l&&l.segmentNew(T.seg,T.primary);var u=M(T),A=u.before?u.before.ev:null,x=u.after?u.after.ev:null;l&&l.tempStatus(T.seg,A?A.seg:!1,x?x.seg:!1);var z=F();if(z){if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,I&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=T.seg.myFill;l&&l.segmentUpdate(z.seg),T.other.remove(),T.remove()}if(n.getHead()!==T){l&&l.rewind(T.seg);continue}if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,x?T.seg.myFill.below=x.seg.myFill.above:T.seg.myFill.below=g,I?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var O;x?T.primary===x.primary?O=x.seg.otherFill.above:O=x.seg.myFill.above:O=T.primary?i:g,T.seg.otherFill={above:O,below:O}}l&&l.status(T.seg,A?A.seg:!1,x?x.seg:!1),T.other.status=u.insert(p.node({ev:T}))}else{var D=T.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(w.exists(D.prev)&&w.exists(D.next)&&C(D.prev.ev,D.next.ev),l&&l.statusRemove(D.ev.seg),D.remove(),!T.primary){var B=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=B}_.push(T.seg)}n.getHead().remove()}return l&&l.done(),_}return E?{addRegion:function(g){for(var i,w=g[g.length-1],S=0;St!=h>t&&e<(m-s)*(t-c)/(h-c)+s;v&&(n=!n)}return n}}}),p1=ze({"src/lib/polygon.js"(J,V){"use strict";var p=Mx().dot,b=No().BADNUM,E=V.exports={};E.tester=function(l){var e=l.slice(),t=e[0][0],n=t,r=e[0][1],a=r,o;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),o=1;on||M===b||Ma||w&&c(i))}function h(i,w){var S=i[0],M=i[1];if(S===b||Sn||M===b||Ma)return!1;var C=e.length,_=e[0][0],T=e[0][1],f=0,u,A,x,z,I;for(u=1;uMath.max(A,_)||M>Math.max(x,T)))if(Mo||Math.abs(p(h,c))>n)return!0;return!1},E.filter=function(l,e){var t=[l[0]],n=0,r=0;function a(s){l.push(s);var c=t.length,m=n;t.splice(r+1);for(var h=m+1;h1){var o=l.pop();a(o)}return{addPt:a,raw:l,filtered:t}}}}),vD=ze({"src/components/selections/constants.js"(J,V){"use strict";V.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),mD=ze({"src/components/selections/select.js"(J,V){"use strict";var p=dD(),b=pD(),E=mi(),k=$i().dashStyle,l=Qn(),e=Zl(),t=kh().makeEventData,n=Fd(),r=n.freeMode,a=n.rectMode,o=n.drawMode,s=n.openMode,c=n.selectMode,m=cv(),h=h1(),v=Bx(),g=iv().clearOutline,i=uv(),w=i.handleEllipse,S=i.readPaths,M=zx().newShapes,C=l5(),_=g5().activateLastSelection,T=Nr(),f=T.sorterAsc,u=p1(),A=Cx(),x=Xl().getFromId,z=f1(),I=d1().redrawReglTraces,O=vD(),D=O.MINSELECT,B=u.filter,F=u.tester,P=Fx(),j=P.p2r,U=P.axValue,$=P.getTransform;function Q(vt){return vt.subplot!==void 0}function re(vt,ht,De,Ne,We){var Ke=!Q(Ne),Je=r(We),et=a(We),Mt=s(We),pt=o(We),Pt=c(We),Ct=We==="drawline",qt=We==="drawcircle",Vt=Ct||qt,Ht=Ne.gd,Sr=Ht._fullLayout,Kr=Pt&&Sr.newselection.mode==="immediate"&&Ke,Yt=Sr._zoomlayer,Rt=Ne.element.getBoundingClientRect(),nr=Ne.plotinfo,ur=$(nr),cr=ht-Rt.left,Rr=De-Rt.top;Sr._calcInverseTransform(Ht);var Qr=T.apply3DTransform(Sr._invTransform)(cr,Rr);cr=Qr[0],Rr=Qr[1];var Zr=Sr._invScaleX,ha=Sr._invScaleY,Pa=cr,La=Rr,un="M"+cr+","+Rr,Xa=Ne.xaxes[0],ja=Ne.yaxes[0],Nn=Xa._length,yn=ja._length,Un=vt.altKey&&!(o(We)&&Mt),li,Yn,on,en,vi,Yi,Ja;H(vt,Ht,Ne),Je&&(li=B([[cr,Rr]],O.BENDPX));var Oa=Yt.selectAll("path.select-outline-"+nr.id).data([1]),lt=pt?Sr.newshape:Sr.newselection;pt&&(Ne.hasText=lt.label.text||lt.label.texttemplate);var rt=pt&&!Mt?lt.fillcolor:"rgba(0,0,0,0)",fr=lt.line.color||(Ke?l.contrast(Ht._fullLayout.plot_bgcolor):"#7f7f7f");Oa.enter().append("path").attr("class","select-outline select-outline-"+nr.id).style({opacity:pt?lt.opacity/2:1,"stroke-dasharray":k(lt.line.dash,lt.line.width),"stroke-width":lt.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,fr).call(l.fill,rt).attr("fill-rule","evenodd").classed("cursor-move",!!pt).attr("transform",ur).attr("d",un+"Z");var lr=Yt.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",ur).attr("d","M0,0Z");if(pt&&Ne.hasText){var Tr=Yt.select(".label-temp");Tr.empty()&&(Tr=Yt.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ir=Sr._uid+O.SELECTID,Dr=[],ot=ae(Ht,Ne.xaxes,Ne.yaxes,Ne.subplot);Kr&&!vt.shiftKey&&(Ne._clearSubplotSelections=function(){if(Ke){var jt=Xa._id,ar=ja._id;Xe(Ht,jt,ar,ot);for(var Er=(Ht.layout||{}).selections||[],xr=[],zr=!1,Lr=0;Lr=0){Ht._fullLayout._deactivateShape(Ht);return}if(!pt){var Er=Sr.clickmode;A.done(Ir).then(function(){if(A.clear(Ir),jt===2){for(Oa.remove(),vi=0;vi-1&&ne(ar,Ht,Ne.xaxes,Ne.yaxes,Ne.subplot,Ne,Oa),Er==="event"&&or(Ht,void 0);e.click(Ht,ar,nr.id)}).catch(T.error)}},Ne.doneFn=function(){lr.remove(),A.done(Ir).then(function(){A.clear(Ir),!Kr&&en&&Ne.selectionDefs&&(en.subtract=Un,Ne.selectionDefs.push(en),Ne.mergedPolygons.length=0,[].push.apply(Ne.mergedPolygons,on)),(Kr||pt)&&Z(Ne,Kr),Ne.doneFnCompleted&&Ne.doneFnCompleted(Dr),Pt&&or(Ht,Ja)}).catch(T.error)}}function ne(vt,ht,De,Ne,We,Ke,Je){var et=ht._hoverdata,Mt=ht._fullLayout,pt=Mt.clickmode,Pt=pt.indexOf("event")>-1,Ct=[],qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;if(xe(et)){H(vt,ht,Ke),qt=ae(ht,De,Ne,We);var Rr=we(et,qt),Qr=Rr.pointNumbers.length>0;if(Qr?Se(qt,Rr):Ie(qt)&&(Rt=Me(Rr))){for(Je&&Je.remove(),cr=0;cr=0}function q(vt){return vt._fullLayout._activeSelectionIndex>=0}function Z(vt,ht){var De=vt.dragmode,Ne=vt.plotinfo,We=vt.gd;Y(We)&&We._fullLayout._deactivateShape(We),q(We)&&We._fullLayout._deactivateSelection(We);var Ke=We._fullLayout,Je=Ke._zoomlayer,et=o(De),Mt=c(De);if(et||Mt){var pt=Je.selectAll(".select-outline-"+Ne.id);if(pt&&We._fullLayout._outlining){var Pt;et&&(Pt=M(pt,vt)),Pt&&E.call("_guiRelayout",We,{shapes:Pt});var Ct;Mt&&!Q(vt)&&(Ct=C(pt,vt)),Ct&&(We._fullLayout._noEmitSelectedAtStart=!0,E.call("_guiRelayout",We,{selections:Ct}).then(function(){ht&&_(We)})),We._fullLayout._outlining=!1}}Ne.selection={},Ne.selection.selectionDefs=vt.selectionDefs=[],Ne.selection.mergedPolygons=vt.mergedPolygons=[]}function ee(vt){return vt._id}function ae(vt,ht,De,Ne){if(!vt.calcdata)return[];var We=[],Ke=ht.map(ee),Je=De.map(ee),et,Mt,pt;for(pt=0;pt0,Ke=We?Ne[0]:De;return ht.selectedpoints?ht.selectedpoints.indexOf(Ke)>-1:!1}function Se(vt,ht){var De=[],Ne,We,Ke,Je;for(Je=0;Je0&&De.push(Ne);if(De.length===1&&(Ke=De[0]===ht.searchInfo,Ke&&(We=ht.searchInfo.cd[0].trace,We.selectedpoints.length===ht.pointNumbers.length))){for(Je=0;Je1||(ht+=Ne.selectedpoints.length,ht>1)))return!1;return ht===1}function Ve(vt,ht,De){var Ne,We;for(Ne=0;Ne-1&&ht;if(!Je&&ht){var jt=yt(vt,!0);if(jt.length){var ar=jt[0].xref,Er=jt[0].yref;if(ar&&Er){var xr=At(jt),zr=rr([x(vt,ar,"x"),x(vt,Er,"y")]);zr(Dr,xr)}}vt._fullLayout._noEmitSelectedAtStart?vt._fullLayout._noEmitSelectedAtStart=!1:kt&&or(vt,Dr),qt._reselect=!1}if(!Je&&qt._deselect){var Lr=qt._deselect;et=Lr.xref,Mt=Lr.yref,Be(et,Mt,Pt)||Xe(vt,et,Mt,Ne),kt&&(Dr.points.length?or(vt,Dr):Ot(vt)),qt._deselect=!1}return{eventData:Dr,selectionTesters:De}}function Ae(vt){var ht=vt.calcdata;if(ht)for(var De=0;De=0){lt._fullLayout._deactivateShape(lt);return}var rt=lt._fullLayout.clickmode;if(G(lt),Ja===2&&!_e&&li(),ke)rt.indexOf("select")>-1&&T(Oa,lt,Be,Xe,he.id,pt),rt.indexOf("event")>-1&&a.click(lt,Oa,he.id);else if(Ja===1&&_e){var fr=Ie?ve:ce,lr=Ie==="s"||Ve==="w"?0:1,Tr=fr._name+".range["+lr+"]",Ir=F(fr,lr),Dr="left",ot="middle";if(fr.fixedrange)return;Ie?(ot=Ie==="n"?"top":"bottom",fr.side==="right"&&(Dr="right")):Ve==="e"&&(Dr="right"),lt._context.showAxisRangeEntryBoxes&&p.select(Mt).call(t.makeEditable,{gd:lt,immediate:!0,background:lt._fullLayout.paper_bgcolor,text:String(Ir),fill:fr.tickfont?fr.tickfont.color:"#444",horizontalAlign:Dr,verticalAlign:ot}).on("edit",function(kt){var jt=fr.d2r(kt);jt!==void 0&&l.call("_guiRelayout",lt,Tr,jt)})}}c.init(pt);var qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;function Rr(Ja,Oa,lt){var rt=Mt.getBoundingClientRect();qt=Oa-rt.left,Vt=lt-rt.top,ae._fullLayout._calcInverseTransform(ae);var fr=b.apply3DTransform(ae._fullLayout._invTransform)(qt,Vt);qt=fr[0],Vt=fr[1],Ht={l:qt,r:qt,w:0,t:Vt,b:Vt,h:0},Sr=ae._hmpixcount?ae._hmlumcount/ae._hmpixcount:n.luminosity(ae._fullLayout.plot_bgcolor),Kr="M0,0H"+gt+"V"+Tt+"H0V0",Yt=!1,Rt="xy",cr=!1,nr=Q(Ge,Sr,Ye,yt,Kr),ur=re(Ge,Ye,yt)}function Qr(Ja,Oa){if(ae._transitioningWithDuration)return!1;var lt=Math.max(0,Math.min(gt,We*Ja+qt)),rt=Math.max(0,Math.min(Tt,Ke*Oa+Vt)),fr=Math.abs(lt-qt),lr=Math.abs(rt-Vt);Ht.l=Math.min(qt,lt),Ht.r=Math.max(qt,lt),Ht.t=Math.min(Vt,rt),Ht.b=Math.max(Vt,rt);function Tr(){Rt="",Ht.r=Ht.l,Ht.t=Ht.b,ur.attr("d","M0,0Z")}if(At.isSubplotConstrained)fr>x||lr>x?(Rt="xy",fr/gt>lr/Tt?(lr=fr*Tt/gt,Vt>rt?Ht.t=Vt-lr:Ht.b=Vt+lr):(fr=lr*gt/Tt,qt>lt?Ht.l=qt-fr:Ht.r=qt+fr),ur.attr("d",Y(Ht))):Tr();else if($t.isSubplotConstrained)if(fr>x||lr>x){Rt="xy";var Ir=Math.min(Ht.l/gt,(Tt-Ht.b)/Tt),Dr=Math.max(Ht.r/gt,(Tt-Ht.t)/Tt);Ht.l=Ir*gt,Ht.r=Dr*gt,Ht.b=(1-Ir)*Tt,Ht.t=(1-Dr)*Tt,ur.attr("d",Y(Ht))}else Tr();else!_r||lr0){var kt;if($t.isSubplotConstrained||!rr&&_r.length===1){for(kt=0;kt1&&(Tr.maxallowed!==void 0&&or===(Tr.range[0]1&&(Ir.maxallowed!==void 0&&Ot===(Ir.range[0]=0?Math.min(ae,.9):1/(1/Math.max(ae,-.3)+3.222))}function $(ae,he,xe){return ae?ae==="nsew"?xe?"":he==="pan"?"move":"crosshair":ae.toLowerCase()+"-resize":"pointer"}function Q(ae,he,xe,we,Me){return ae.append("path").attr("class","zoombox").style({fill:he>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(xe,we)).attr("d",Me+"Z")}function re(ae,he,xe){return ae.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(he,xe)).attr("d","M0,0Z")}function ne(ae,he,xe,we,Me,Se){ae.attr("d",we+"M"+xe.l+","+xe.t+"v"+xe.h+"h"+xe.w+"v-"+xe.h+"h-"+xe.w+"Z"),se(ae,he,Me,Se)}function se(ae,he,xe,we){xe||(ae.transition().style("fill",we>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),he.transition().style("opacity",1).duration(200))}function G(ae){p.select(ae).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function X(ae){z&&ae.data&&ae._context.showTips&&(b.notifier(b._(ae,"Double-click to zoom back out"),"long",ae),z=!1)}function K(ae,he){return"M"+(ae.l-.5)+","+(he-x-.5)+"h-3v"+(2*x+1)+"h3ZM"+(ae.r+.5)+","+(he-x-.5)+"h3v"+(2*x+1)+"h-3Z"}function H(ae,he){return"M"+(he-x-.5)+","+(ae.t-.5)+"v-3h"+(2*x+1)+"v3ZM"+(he-x-.5)+","+(ae.b+.5)+"v3h"+(2*x+1)+"v-3Z"}function Y(ae){var he=Math.floor(Math.min(ae.b-ae.t,ae.r-ae.l,x)/2);return"M"+(ae.l-3.5)+","+(ae.t-.5+he)+"h3v"+-he+"h"+he+"v-3h-"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.t-.5+he)+"h-3v"+-he+"h"+-he+"v-3h"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.b+.5-he)+"h-3v"+he+"h"+-he+"v3h"+(he+3)+"ZM"+(ae.l-3.5)+","+(ae.b+.5-he)+"h3v"+he+"h"+he+"v3h-"+(he+3)+"Z"}function q(ae,he,xe,we,Me){for(var Se=!1,Ie={},Ve={},Ge,ke,_e,ce,ve=(Me||{}).xaHash,le=(Me||{}).yaHash,Ae=0;Ae1&&b.warn("Full array edits are incompatible with other edits",c);var S=a[""][""];if(e(S))r.set(null);else if(Array.isArray(S))r.set(S);else return b.warn("Unrecognized full array edit value",c,S),!0;return g?!1:(m(i,w),h(n),!0)}var M=Object.keys(a).map(Number).sort(E),C=r.get(),_=C||[],T=s(w,c).get(),f=[],u=-1,A=_.length,x,z,I,O,D,B,F,P;for(x=0;x_.length-(F?0:1)){b.warn("index out of range",c,I);continue}if(B!==void 0)D.length>1&&b.warn("Insertion & removal are incompatible with edits to the same index.",c,I),e(B)?f.push(I):F?(B==="add"&&(B={}),_.splice(I,0,B),T&&T.splice(I,0,{})):b.warn("Unrecognized full object edit value",c,I,B),u===-1&&(u=I);else for(z=0;z=0;x--)_.splice(f[x],1),T&&T.splice(f[x],1);if(_.length?C||r.set(_):r.set(null),g)return!1;if(m(i,w),v!==p){var j;if(u===-1)j=M;else{for(A=Math.max(_.length,A),j=[],x=0;x=u));x++)j.push(I);for(x=u;x0&&b.log("Clearing previous rejected promises from queue."),g._promises=[]},J.cleanLayout=function(g){var i,w;g||(g={}),g.xaxis1&&(g.xaxis||(g.xaxis=g.xaxis1),delete g.xaxis1),g.yaxis1&&(g.yaxis||(g.yaxis=g.yaxis1),delete g.yaxis1),g.scene1&&(g.scene||(g.scene=g.scene1),delete g.scene1);var S=(E.subplotsRegistry.cartesian||{}).attrRegex,M=(E.subplotsRegistry.polar||{}).attrRegex,C=(E.subplotsRegistry.ternary||{}).attrRegex,_=(E.subplotsRegistry.gl3d||{}).attrRegex,T=Object.keys(g);for(i=0;i3?(B.x=1.02,B.xanchor="left"):B.x<-2&&(B.x=-.02,B.xanchor="right"),B.y>3?(B.y=1.02,B.yanchor="bottom"):B.y<-2&&(B.y=-.02,B.yanchor="top")),g.dragmode==="rotate"&&(g.dragmode="orbit"),g.template&&g.template.layout&&J.cleanLayout(g.template.layout),g};function r(g,i,w=!1){var S=g[i],M=i.charAt(0);w&&Array.isArray(S)||S&&S!=="paper"&&(g[i]=l(S,M,!0))}J.cleanData=function(g){for(var i=0;i0)return g.slice(0,i)}J.hasParent=function(g,i){for(var w=h(i);w;){if(w in g)return!0;w=h(w)}return!1},J.clearAxisTypes=function(g,i,w){for(var S=0;S{let w=(...S)=>S.every(M=>b.isPlainObject(M))||S.every(M=>Array.isArray(M));if([g,i].every(S=>Array.isArray(S))){if(g.length!==i.length)return!1;for(let S=0;Sb.isPlainObject(S))){if(Object.keys(g).length!==Object.keys(i).length)return!1;for(let S in g){if(S.startsWith("_"))continue;let M=g[S],C=i[S];if(M!==C&&!(w(M,C)?v(M,C):!1))return!1}return!0}return!1};J.collectionsAreEqual=v}}),Ux=ze({"src/plot_api/plot_api.js"(J){"use strict";var V=ci(),p=ao(),b=Gw(),E=Nr(),k=E.nestedProperty,l=Hm(),e=OI(),t=mi(),n=Wm(),r=cl(),a=Gi(),o=Qw(),s=cf(),c=$i(),m=Qn(),h=b5().initInteractions,v=nd(),g=_c().clearOutline,i=av().dfltConfig,w=xD(),S=bD(),M=d1(),C=Al(),_=hc().AX_NAME_PATTERN,T=0,f=5;function u(De,Ne,We,Ke){var Je;if(De=E.getGraphDiv(De),l.init(De),E.isPlainObject(Ne)){var et=Ne;Ne=et.data,We=et.layout,Ke=et.config,Je=et.frames}var Mt=l.triggerHandler(De,"plotly_beforeplot",[Ne,We,Ke]);if(Mt===!1)return Promise.reject();!Ne&&!We&&!E.isPlotDiv(De)&&E.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",De);function pt(){if(Je)return J.addFrames(De,Je)}O(De,Ke),We||(We={}),V.select(De).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(De._promises)||(De._promises=[]);var Pt=(De.data||[]).length===0&&Array.isArray(Ne);Array.isArray(Ne)&&(S.cleanData(Ne),Pt?De.data=Ne:De.data.push.apply(De.data,Ne),De.empty=!1),(!De.layout||Pt)&&(De.layout=S.cleanLayout(We)),r.supplyDefaults(De);var Ct=De._fullLayout,qt=Ct._has("cartesian");Ct._replotting=!0,(Pt||Ct._shouldCreateBgLayer)&&(ht(De),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),c.initGradients(De),c.initPatterns(De),Pt&&a.saveShowSpikeInitial(De);var Vt=!De.calcdata||De.calcdata.length!==(De._fullData||[]).length;Vt&&r.doCalcdata(De);for(var Ht=0;Ht=De.data.length||Je<-De.data.length)throw new Error(We+" must be valid indices for gd.data.");if(Ne.indexOf(Je,Ke+1)>-1||Je>=0&&Ne.indexOf(-De.data.length+Je)>-1||Je<0&&Ne.indexOf(De.data.length+Je)>-1)throw new Error("each index in "+We+" must be unique.")}}function j(De,Ne,We){if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"currentIndices"),typeof We<"u"&&!Array.isArray(We)&&(We=[We]),typeof We<"u"&&P(De,We,"newIndices"),typeof We<"u"&&Ne.length!==We.length)throw new Error("current and new indices must be of equal length.")}function U(De,Ne,We){var Ke,Je;if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("traces must be defined.");for(Array.isArray(Ne)||(Ne=[Ne]),Ke=0;Ke"u")throw new Error("indices must be an integer or array of integers");P(De,We,"indices");for(var et in Ne){if(!Array.isArray(Ne[et])||Ne[et].length!==We.length)throw new Error("attribute "+et+" must be an array of length equal to indices array length");if(Je&&(!(et in Ke)||!Array.isArray(Ke[et])||Ke[et].length!==Ne[et].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 Q(De,Ne,We,Ke){var Je=E.isPlainObject(Ke),et=[],Mt,pt,Pt,Ct,qt;Array.isArray(We)||(We=[We]),We=F(We,De.data.length-1);for(var Vt in Ne)for(var Ht=0;Ht=0&&qt=0&&qt"u")return Ct=J.redraw(De),e.add(De,Je,Mt,et,pt),Ct;Array.isArray(We)||(We=[We]);try{j(De,Ke,We)}catch(qt){throw De.data.splice(De.data.length-Ne.length,Ne.length),qt}return e.startSequence(De),e.add(De,Je,Mt,et,pt),Ct=J.moveTraces(De,Ke,We),e.stopSequence(De),Ct}function K(De,Ne){De=E.getGraphDiv(De);var We=[],Ke=J.addTraces,Je=K,et=[De,We,Ne],Mt=[De,Ne],pt,Pt;if(typeof Ne>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"indices"),Ne=F(Ne,De.data.length-1),Ne.sort(E.sorterDes),pt=0;pt"u")for(We=[],Ct=0;Ct0&&typeof Pa.parts[Xa]!="string";)Xa--;var ja=Pa.parts[Xa],Nn=Pa.parts[Xa-1]+"."+ja,yn=Pa.parts.slice(0,Xa).join("."),Un=k(De.layout,yn).get(),li=k(Ke,yn).get(),Yn=Pa.get();if(La!==void 0){nr[ha]=La,ur[ha]=ja==="reverse"?La:q(Yn);var on=n.getLayoutValObject(Ke,Pa.parts);if(on&&on.impliedEdits&&La!==null)for(var en in on.impliedEdits)cr(E.relativeAttr(ha,en),on.impliedEdits[en]);if(["width","height"].indexOf(ha)!==-1)if(La){cr("autosize",null);var vi=ha==="height"?"width":"height";cr(vi,Ke[vi])}else Ke[ha]=De._initialAutoSize[ha];else if(ha==="autosize")cr("width",La?null:Ke.width),cr("height",La?null:Ke.height);else if(Nn.match(Se))Zr(Nn),k(Ke,yn+"._inputRange").set(null);else if(Nn.match(Ie)){Zr(Nn),k(Ke,yn+"._inputRange").set(null);var Yi=k(Ke,yn).get();Yi._inputDomain&&(Yi._input.domain=Yi._inputDomain.slice())}else Nn.match(Ve)&&k(Ke,yn+"._inputDomain").set(null);if(ja==="type"){Qr=Un;var Ja=li.type==="linear"&&La==="log",Oa=li.type==="log"&&La==="linear";if(Ja||Oa){if(!Qr||!Qr.range)cr(yn+".autorange",!0);else if(li.autorange)Ja&&(Qr.range=Qr.range[1]>Qr.range[0]?[1,2]:[2,1]);else{var lt=Qr.range[0],rt=Qr.range[1];Ja?(lt<=0&&rt<=0&&cr(yn+".autorange",!0),lt<=0?lt=rt/1e6:rt<=0&&(rt=lt/1e6),cr(yn+".range[0]",Math.log(lt)/Math.LN10),cr(yn+".range[1]",Math.log(rt)/Math.LN10)):(cr(yn+".range[0]",Math.pow(10,lt)),cr(yn+".range[1]",Math.pow(10,rt)))}Array.isArray(Ke._subplots.polar)&&Ke._subplots.polar.length&&Ke[Pa.parts[0]]&&Pa.parts[1]==="radialaxis"&&delete Ke[Pa.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(De,li,La,cr),t.getComponentMethod("images","convertCoords")(De,li,La,cr)}else cr(yn+".autorange",!0),cr(yn+".range",null);k(Ke,yn+"._inputRange").set(null)}else if(ja.match(_)){var fr=k(Ke,ha).get(),lr=(La||{}).type;(!lr||lr==="-")&&(lr="linear"),t.getComponentMethod("annotations","convertCoords")(De,fr,lr,cr),t.getComponentMethod("images","convertCoords")(De,fr,lr,cr)}var Tr=w.containerArrayMatch(ha);if(Tr){qt=Tr.array,Vt=Tr.index;var Ir=Tr.property,Dr=on||{editType:"calc"};Vt!==""&&Ir===""&&(w.isAddVal(La)?ur[ha]=null:w.isRemoveVal(La)?ur[ha]=(k(We,qt).get()||[])[Vt]:E.warn("unrecognized full object value",Ne)),C.update(Rt,Dr),Ct[qt]||(Ct[qt]={});var ot=Ct[qt][Vt];ot||(ot=Ct[qt][Vt]={}),ot[Ir]=La,delete Ne[ha]}else ja==="reverse"?(Un.range?Un.range.reverse():(cr(yn+".autorange",!0),Un.range=[1,0]),li.autorange?Rt.calc=!0:Rt.plot=!0):(ha==="dragmode"&&(La===!1&&Yn!==!1||La!==!1&&Yn===!1)||Ke._has("scatter-like")&&Ke._has("regl")&&ha==="dragmode"&&(La==="lasso"||La==="select")&&!(Yn==="lasso"||Yn==="select")?Rt.plot=!0:on?C.update(Rt,on):Rt.calc=!0,Pa.set(La))}}for(qt in Ct){var kt=w.applyContainerArrayChanges(De,et(We,qt),Ct[qt],Rt,et);kt||(Rt.plot=!0)}for(var jt in Rr){Qr=a.getFromId(De,jt);var ar=Qr&&Qr._constraintGroup;if(ar){Rt.calc=!0;for(var Er in ar)Rr[Er]||(a.getFromId(De,Er)._constraintShrinkable=!0)}}(ke(De)||Ne.height||Ne.width)&&(Rt.plot=!0);var xr=Ke.shapes;for(Vt=0;Vt1;)if(Ke.pop(),We=k(Ne,Ke.join(".")+".uirevision").get(),We!==void 0)return We;return Ne.uirevision}function Xe(De,Ne){for(var We=0;We[yn,De._ev.listeners(yn)]);et=J.newPlot(De,Ne,We,Ke).then(()=>{for(let[yn,Un]of Nn)Un.forEach(li=>De.on(yn,li));return J.react(De,Ne,We,Ke)})}else{De.data=Ne||[],S.cleanData(De.data),De.layout=We||{},S.cleanLayout(De.layout),gt(De.data,De.layout,pt,Pt),r.supplyDefaults(De,{skipUpdateCalc:!0});var Vt=De._fullData,Ht=De._fullLayout,Sr=Ht.datarevision===void 0,Kr=Ht.transition,Yt=$t(De,Pt,Ht,Sr,Kr),Rt=Yt.newDataRevision,nr=At(De,pt,Vt,Sr,Kr,Rt);if(ke(De)&&(Yt.layoutReplot=!0),nr.calc||Yt.calc){De.calcdata=void 0;for(var ur=Object.getOwnPropertyNames(Ht),cr=0;cr(qt||De.emit("plotly_react",{config:Ke,data:Ne,layout:We}),De))}function At(De,Ne,We,Ke,Je,et){var Mt=Ne.length===We.length;if(!Je&&!Mt)return{fullReplot:!0,calc:!0};var pt=C.traceFlags();pt.arrays={},pt.nChanges=0,pt.nChangesAnim=0;var Pt,Ct;function qt(Sr){var Kr=n.getTraceValObject(Ct,Sr);return!Ct._module.animatable&&Kr.anim&&(Kr.anim=!1),Kr}var Vt={getValObject:qt,flags:pt,immutable:Ke,transition:Je,newDataRevision:et,gd:De},Ht={};for(Pt=0;Pt=Je.length?Je[0]:Je[Ct]:Je}function pt(Ct){return Array.isArray(et)?Ct>=et.length?et[0]:et[Ct]:et}function Pt(Ct,qt){var Vt=0;return function(){if(Ct&&++Vt===qt)return Ct()}}return new Promise(function(Ct,qt){function Vt(){if(Ke._frameQueue.length!==0){for(;Ke._frameQueue.length;){var ja=Ke._frameQueue.pop();ja.onInterrupt&&ja.onInterrupt()}De.emit("plotly_animationinterrupted",[])}}function Ht(ja){if(ja.length!==0){for(var Nn=0;NnKe._timeToNext&&Kr()};ja()}var Rt=0;function nr(ja){return Array.isArray(Je)?Rt>=Je.length?ja.transitionOpts=Je[Rt]:ja.transitionOpts=Je[0]:ja.transitionOpts=Je,Rt++,ja}var ur,cr,Rr=[],Qr=Ne==null,Zr=Array.isArray(Ne),ha=!Qr&&!Zr&&E.isPlainObject(Ne);if(ha)Rr.push({type:"object",data:nr(E.extendFlat({},Ne))});else if(Qr||["string","number"].indexOf(typeof Ne)!==-1)for(ur=0;ur0&&unun)&&Xa.push(cr);Rr=Xa}}Rr.length>0?Ht(Rr):(De.emit("plotly_animated"),Ct())})}function Xt(De,Ne,We){if(De=E.getGraphDiv(De),Ne==null)return Promise.resolve();if(!E.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ke,Je,et,Mt,pt=De._transitionData._frames,Pt=De._transitionData._frameHash;if(!Array.isArray(Ne))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ne);var Ct=pt.length+Ne.length*2,qt=[],Vt={};for(Ke=Ne.length-1;Ke>=0;Ke--)if(E.isPlainObject(Ne[Ke])){var Ht=Ne[Ke].name,Sr=(Pt[Ht]||Vt[Ht]||{}).name,Kr=Ne[Ke].name,Yt=Pt[Sr]||Vt[Sr];Sr&&Kr&&typeof Kr=="number"&&Yt&&TPa.index?-1:ha.index=0;Ke--){if(Je=qt[Ke].frame,typeof Je.name=="number"&&E.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Je.name)for(;Pt[Je.name="frame "+De._transitionData._counter++];);if(Pt[Je.name]){for(et=0;et=0;We--)Ke=Ne[We],et.push({type:"delete",index:Ke}),Mt.unshift({type:"insert",index:Ke,value:Je[Ke]});var pt=r.modifyFrames,Pt=r.modifyFrames,Ct=[De,Mt],qt=[De,et];return e&&e.add(De,pt,Ct,Pt,qt),r.modifyFrames(De,et)}function Ot(De){De=E.getGraphDiv(De);var Ne=De._fullLayout||{},We=De._fullData||[];return r.cleanPlot([],{},We,Ne),r.purge(De),l.purge(De),Ne._container&&Ne._container.remove(),delete De._context,De}function vt(De){var Ne=De._fullLayout,We=De.getBoundingClientRect();if(!E.equalDomRects(We,Ne._lastBBox)){var Ke=Ne._invTransform=E.inverseTransformMatrix(E.getFullTransformMatrix(De));Ne._invScaleX=Math.sqrt(Ke[0][0]*Ke[0][0]+Ke[0][1]*Ke[0][1]+Ke[0][2]*Ke[0][2]),Ne._invScaleY=Math.sqrt(Ke[1][0]*Ke[1][0]+Ke[1][1]*Ke[1][1]+Ke[1][2]*Ke[1][2]),Ne._lastBBox=We}}function ht(De){var Ne=V.select(De),We=De._fullLayout;if(We._calcInverseTransform=vt,We._calcInverseTransform(De),We._container=Ne.selectAll(".plot-container").data([0]),We._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),We._paperdiv=We._container.selectAll(".svg-container").data([0]),We._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),We._glcontainer=We._paperdiv.selectAll(".gl-container").data([{}]),We._glcontainer.enter().append("div").classed("gl-container",!0),We._paperdiv.selectAll(".main-svg").remove(),We._paperdiv.select(".modebar-container").remove(),We._paper=We._paperdiv.insert("svg",":first-child").classed("main-svg",!0),We._toppaper=We._paperdiv.append("svg").classed("main-svg",!0),We._modebardiv=We._paperdiv.append("div"),delete We._modeBar,We._hoverpaper=We._paperdiv.append("svg").classed("main-svg",!0),!We._uid){var Ke={};V.selectAll("defs").each(function(){this.id&&(Ke[this.id.split("-")[1]]=1)}),We._uid=E.randstr(Ke)}We._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),We._defs=We._paper.append("defs").attr("id","defs-"+We._uid),We._clips=We._defs.append("g").classed("clips",!0),We._topdefs=We._toppaper.append("defs").attr("id","topdefs-"+We._uid),We._topclips=We._topdefs.append("g").classed("clips",!0),We._bgLayer=We._paper.append("g").classed("bglayer",!0),We._draggers=We._paper.append("g").classed("draglayer",!0);var Je=We._paper.append("g").classed("layer-below",!0);We._imageLowerLayer=Je.append("g").classed("imagelayer",!0),We._shapeLowerLayer=Je.append("g").classed("shapelayer",!0),We._cartesianlayer=We._paper.append("g").classed("cartesianlayer",!0),We._polarlayer=We._paper.append("g").classed("polarlayer",!0),We._smithlayer=We._paper.append("g").classed("smithlayer",!0),We._ternarylayer=We._paper.append("g").classed("ternarylayer",!0),We._geolayer=We._paper.append("g").classed("geolayer",!0),We._funnelarealayer=We._paper.append("g").classed("funnelarealayer",!0),We._pielayer=We._paper.append("g").classed("pielayer",!0),We._iciclelayer=We._paper.append("g").classed("iciclelayer",!0),We._treemaplayer=We._paper.append("g").classed("treemaplayer",!0),We._sunburstlayer=We._paper.append("g").classed("sunburstlayer",!0),We._indicatorlayer=We._toppaper.append("g").classed("indicatorlayer",!0),We._glimages=We._paper.append("g").classed("glimages",!0);var et=We._toppaper.append("g").classed("layer-above",!0);We._imageUpperLayer=et.append("g").classed("imagelayer",!0),We._shapeUpperLayer=et.append("g").classed("shapelayer",!0),We._selectionLayer=We._toppaper.append("g").classed("selectionlayer",!0),We._infolayer=We._toppaper.append("g").classed("infolayer",!0),We._menulayer=We._toppaper.append("g").classed("menulayer",!0),We._zoomlayer=We._toppaper.append("g").classed("zoomlayer",!0),We._hoverlayer=We._hoverpaper.append("g").classed("hoverlayer",!0),We._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),De.emit("plotly_framework")}J.animate=_r,J.addFrames=Xt,J.deleteFrames=or,J.addTraces=X,J.deleteTraces=K,J.extendTraces=se,J.moveTraces=H,J.prependTraces=G,J.newPlot=B,J._doPlot=u,J.purge=Ot,J.react=Tt,J.redraw=D,J.relayout=xe,J.restyle=Y,J.setPlotConfig=x,J.update=_e,J._guiRelayout=ce(xe),J._guiRestyle=ce(Y),J._guiUpdate=ce(_e),J._storeDirectGUIEdit=ae}}),ip=ze({"src/snapshot/helpers.js"(J){"use strict";var V=mi();J.getDelay=function(E){return E._has&&(E._has("gl3d")||E._has("map"))?500:0},J.getRedrawFunc=function(E){return function(){V.getComponentMethod("colorbar","draw")(E)}},J.encodeSVG=function(E){return"data:image/svg+xml,"+encodeURIComponent(E)},J.encodeJSON=function(E){return"data:application/json,"+encodeURIComponent(E)};var p=window.URL||window.webkitURL;J.createObjectURL=function(E){return p.createObjectURL(E)},J.revokeObjectURL=function(E){return p.revokeObjectURL(E)},J.createBlob=function(E,k){if(k==="svg")return new window.Blob([E],{type:"image/svg+xml;charset=utf-8"});if(k==="full-json")return new window.Blob([E],{type:"application/json;charset=utf-8"});var l=b(window.atob(E));return new window.Blob([l],{type:"image/"+k})},J.octetStream=function(E){document.location.href="data:application/octet-stream"+E},J.getPlotTitle=function(E){var k,l,e,t,n=E._fullLayout;if(n){var r=(k=n.title)==null?void 0:k.text;return r===((l=n._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=E.layout)==null?void 0:e.title)==null?void 0:t.text},J.getPlotSubtitle=function(E){var k,l,e,t,n,r,a=E._fullLayout;if(a){var o=(l=(k=a.title)==null?void 0:k.subtitle)==null?void 0:l.text;return o===((e=a._dfltTitle)==null?void 0:e.subtitle)?void 0:o}return(r=(n=(t=E.layout)==null?void 0:t.title)==null?void 0:n.subtitle)==null?void 0:r.text};function b(E){for(var k=E.length,l=new ArrayBuffer(k),e=new Uint8Array(l),t=0;t{let i=g.toLowerCase();return r.includes(i)?g:a.includes(i)?"<":o.includes(i)?">":g.includes("<")||g.includes(">")?"":h.html(g).text()});return h.remove(),v}function c(m){return m.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}V.exports=function(h,v,g){var i=h._fullLayout,w=i._paper,S=i._toppaper,M=i.width,C=i.height,_;w.insert("rect",":first-child").call(E.setRect,0,0,M,C).call(k.fill,i.paper_bgcolor);var T=i._basePlotModules||[];for(_=0;_1&&C.push(s("object","layout"))),b.supplyDefaults(_);for(var u=_._fullData,A=T.length,x=0;xz.length&&M.push(s("unused",C,A.concat(z.length)));var P=z.length,j=Array.isArray(F);j&&(P=Math.min(P,F.length));var U,$,Q,re,ne;if(I.dimensions===2)for($=0;$z[$].length&&M.push(s("unused",C,A.concat($,z[$].length)));var se=z[$].length;for(U=0;U<(j?Math.min(se,F[$].length):se);U++)Q=j?F[$][U]:F,re=x[$][U],ne=z[$][U],p.validate(re,Q)?ne!==re&&ne!==+re&&M.push(s("dynamic",C,A.concat($,U),re,ne)):M.push(s("value",C,A.concat($,U),re))}else M.push(s("array",C,A.concat($),x[$]));else for($=0;$D?M.push({code:"unused",traceType:x,templateCount:O,dataCount:D}):D>O&&M.push({code:"reused",traceType:x,templateCount:O,dataCount:D})}}function B(F,P){for(var j in F)if(j.charAt(0)!=="_"){var U=F[j],$=s(F,j,P);p(U)?(Array.isArray(F)&&U._template===!1&&U.templateitemname&&M.push({code:"missing",path:$,templateitemname:U.templateitemname}),B(U,$)):Array.isArray(U)&&c(U)&&B(U,$)}}if(B({data:_,layout:C},""),M.length)return M.map(m)};function c(h){for(var v=0;v=0;m--){var h=l[m];if(h.type==="scatter"&&h.xaxis===s.xaxis&&h.yaxis===s.yaxis){h.opacity=void 0;break}}}}}}}),kD=ze({"src/traces/scatter/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Lx();V.exports=function(E,k){function l(t,n){return p.coerce(E,k,b,t,n)}var e=k.barmode==="group";k.scattermode==="group"&&l("scattergap",e?k.bargap:.2)}}}),bd=ze({"src/plots/cartesian/align_period.js"(J,V){"use strict";var p=ao(),b=Nr(),E=b.dateTime2ms,k=b.incrementMonth,l=No(),e=l.ONEAVGMONTH;V.exports=function(n,r,a,o){if(r.type!=="date")return{vals:o};var s=n[a+"periodalignment"];if(!s)return{vals:o};var c=n[a+"period"],m;if(p(c)){if(c=+c,c<=0)return{vals:o}}else if(typeof c=="string"&&c.charAt(0)==="M"){var h=+c.substring(1);if(h>0&&Math.round(h)===h)m=h;else return{vals:o}}for(var v=r.calendar,g=s==="start",i=s==="end",w=n[a+"period0"],S=E(w,v)||0,M=[],C=[],_=[],T=o.length,f=0;fu;)z=k(z,-m,v);for(;z<=u;)z=k(z,m,v);x=k(z,-m,v)}else{for(A=Math.round((u-S)/c),z=S+A*c;z>u;)z-=c;for(;z<=u;)z+=c;x=z-c}M[f]=g?x:i?z:(x+z)/2,C[f]=x,_[f]=z}return{vals:M,starts:C,ends:_}}}}),od=ze({"src/traces/scatter/colorscale_calc.js"(J,V){"use strict";var p=Bf().hasColorscale,b=Qf(),E=el();V.exports=function(l,e){E.hasLines(e)&&p(e,"line")&&b(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),E.hasMarkers(e)&&(p(e,"marker")&&b(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),p(e,"marker.line")&&b(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Nd=ze({"src/traces/scatter/arrays_to_calcdata.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){for(var l=0;lB&&x[P].gap;)P--;for(U=x[P].s,F=x.length-1;F>P;F--)x[F].s=U;for(;Bre+$||!p(Q))}for(var se=0;seP(U))):P(D.text);let j=D.outsidetextfont.size*r*F+n;return{ppadplus:B.some(U=>U.s<0)?j:0,ppadminus:B.some(U=>U.s>=0)?j:0}}return{ppadplus:void 0,ppadminus:void 0}}function z(D,B,F,P){for(var j=O(P),U=0;UO[v]&&v0?l:e)/(v._m*w*(v._m>0?l:e)))),Ct*=1e3}if(qt===E){if(i&&(qt=v.c2p(Pt.y,!0)),qt===E)return!1;qt*=1e3}return[Ct,qt]}function ee(pt,Pt,Ct,qt){var Vt=Ct-pt,Ht=qt-Pt,Sr=.5-pt,Kr=.5-Pt,Yt=Vt*Vt+Ht*Ht,Rt=Vt*Sr+Ht*Kr;if(Rt>0&&Rt1||Math.abs(Sr.y-Ct[0][1])>1)&&(Sr=[Sr.x,Sr.y],qt&&we(Sr,pt)Ie||pt[1]Ge)return[r(pt[0],Se,Ie),r(pt[1],Ve,Ge)]}function yt(pt,Pt){if(pt[0]===Pt[0]&&(pt[0]===Se||pt[0]===Ie)||pt[1]===Pt[1]&&(pt[1]===Ve||pt[1]===Ge))return!0}function gt(pt,Pt){var Ct=[],qt=Ye(pt),Vt=Ye(Pt);return qt&&Vt&&yt(qt,Vt)||(qt&&Ct.push(qt),Vt&&Ct.push(Vt)),Ct}function Tt(pt,Pt,Ct){return function(qt,Vt){var Ht=Ye(qt),Sr=Ye(Vt),Kr=[];if(Ht&&Sr&&yt(Ht,Sr))return Kr;Ht&&Kr.push(Ht),Sr&&Kr.push(Sr);var Yt=2*t.constrain((qt[pt]+Vt[pt])/2,Pt,Ct)-((Ht||qt)[pt]+(Sr||Vt)[pt]);if(Yt){var Rt;Ht&&Sr?Rt=Yt>0==Ht[pt]>Sr[pt]?Ht:Sr:Rt=Ht||Sr,Rt[pt]+=Yt}return Kr}}var At;f==="linear"||f==="spline"?At=Xe:f==="hv"||f==="vh"?At=gt:f==="hvh"?At=Tt(0,Se,Ie):f==="vhv"&&(At=Tt(1,Ve,Ge));function $t(pt,Pt){var Ct=Pt[0]-pt[0],qt=(Pt[1]-pt[1])/Ct,Vt=(pt[1]*Pt[0]-Pt[1]*pt[0])/Ct;return Vt>0?[qt>0?Se:Ie,Ge]:[qt>0?Ie:Se,Ve]}function rr(pt){var Pt=pt[0],Ct=pt[1],qt=Pt===O[D-1][0],Vt=Ct===O[D-1][1];if(!(qt&&Vt))if(D>1){var Ht=Pt===O[D-2][0],Sr=Ct===O[D-2][1];qt&&(Pt===Se||Pt===Ie)&&Ht?Sr?D--:O[D-1]=pt:Vt&&(Ct===Ve||Ct===Ge)&&Sr?Ht?D--:O[D-1]=pt:O[D++]=pt}else O[D++]=pt}function _r(pt){O[D-1][0]!==pt[0]&&O[D-1][1]!==pt[1]&&rr([ve,le]),rr(pt),Ae=null,ve=le=0}var Xt=t.isArrayOrTypedArray(C);function or(pt){if(pt&&M&&(pt.i=B,pt.d=s,pt.trace=m,pt.marker=Xt?C[pt.i]:C,pt.backoff=M),ae=pt[0]/w,he=pt[1]/S,_e=pt[0]Ie?Ie:0,ce=pt[1]Ge?Ge:0,_e||ce){if(!D)O[D++]=[_e||pt[0],ce||pt[1]];else if(Ae){var Pt=At(Ae,pt);Pt.length>1&&(_r(Pt[0]),O[D++]=Pt[1])}else Be=At(O[D-1],pt)[0],O[D++]=Be;var Ct=O[D-1];_e&&ce&&(Ct[0]!==_e||Ct[1]!==ce)?(Ae&&(ve!==_e&&le!==ce?rr(ve&&le?$t(Ae,pt):[ve||_e,le||ce]):ve&&le&&rr([ve,le])),rr([_e,ce])):ve-_e&&le-ce&&rr([_e||ve,ce||le]),Ae=pt,ve=_e,le=ce}else Ae&&_r(At(Ae,pt)[0]),O[D++]=pt}for(B=0;Bxe($,Ot))break;P=$,K=ne[0]*re[0]+ne[1]*re[1],K>G?(G=K,j=$,Q=!1):K=s.length||!$)break;or($),F=$}}Ae&&rr([ve||Ae[0],le||Ae[1]]),x.push(O.slice(0,D))}var vt=f.slice(f.length-1);if(M&&vt!=="h"&&vt!=="v"){for(var ht=!1,De=-1,Ne=[],We=0;We=0?a=h:(a=h=m,m++),a0,f=r(h,v,g);if(M=i.selectAll("g.trace").data(f,function(A){return A[0].trace.uid}),M.enter().append("g").attr("class",function(A){return"trace scatter trace"+A[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(h,M,v),T){S&&(C=S());var u=p.transition().duration(w.duration).ease(w.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});u.each(function(){i.selectAll("g.trace").each(function(A,x){s(h,x,v,A,f,this,w)})})}else M.each(function(A,x){s(h,x,v,A,f,this,w)});_&&M.exit().remove(),i.selectAll("path:not([d])").remove()};function o(m,h,v){h.each(function(g){var i=k(p.select(this),"g","fills");e.setClipUrl(i,v.layerClipId,m);var w=g[0].trace;w._ownFill=null,w._nextFill=null;var S=[];w._ownfill&&S.push("_ownFill"),w._nexttrace&&S.push("_nextFill");var M=i.selectAll("g").data(S,l);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){w[C]=k(p.select(this),"path","js-fill")})})}function s(m,h,v,g,i,w,S){var M=m._context.staticPlot,C;c(m,h,v,g,i);var _=!!S&&S.duration>0;function T(rr){return _?rr.transition():rr}var f=v.xaxis,u=v.yaxis,A=g[0].trace,x=A.line,z=p.select(w),I=k(z,"g","errorbars"),O=k(z,"g","lines"),D=k(z,"g","points"),B=k(z,"g","text");if(b.getComponentMethod("errorbars","plot")(m,I,v,S),A.visible!==!0)return;T(z).style("opacity",A.opacity);var F,P,j=A.fill.charAt(A.fill.length-1);j!=="x"&&j!=="y"&&(j="");var U,$;j==="y"?(U=1,$=u.c2p(0,!0)):j==="x"&&(U=0,$=f.c2p(0,!0)),g[0][v.isRangePlot?"nodeRangePlot3":"node3"]=z;var Q="",re=[],ne=A._prevtrace,se=null,G=null;ne&&(Q=ne._prevRevpath||"",P=ne._nextFill,re=ne._ownPolygons,se=ne._fillsegments,G=ne._fillElement);var X,K,H="",Y="",q,Z,ee,ae,he,xe,we=[];A._polygons=[];var Me=[],Se=[],Ie=E.noop;if(F=A._ownFill,t.hasLines(A)||A.fill!=="none"){P&&P.datum(g),["hv","vh","hvh","vhv"].indexOf(x.shape)!==-1?(q=e.steps(x.shape),Z=e.steps(x.shape.split("").reverse().join(""))):x.shape==="spline"?q=Z=function(rr){var _r=rr[rr.length-1];return rr.length>1&&rr[0][0]===_r[0]&&rr[0][1]===_r[1]?e.smoothclosed(rr.slice(1),x.smoothing):e.smoothopen(rr,x.smoothing)}:q=Z=function(rr){return"M"+rr.join("L")},ee=function(rr){return Z(rr.reverse())},Se=n(g,{xaxis:f,yaxis:u,trace:A,connectGaps:A.connectgaps,baseTolerance:Math.max(x.width||1,3)/4,shape:x.shape,backoff:x.backoff,simplify:x.simplify,fill:A.fill}),Me=new Array(Se.length);var Ve=0;for(C=0;C=M[0]&&z.x<=M[1]&&z.y>=C[0]&&z.y<=C[1]}),u=Math.ceil(f.length/T),A=0;i.forEach(function(z,I){var O=z[0].trace;t.hasMarkers(O)&&O.marker.maxdisplayed>0&&I=Math.min(ne,se)&&v<=Math.max(ne,se)?0:1/0}var G=Math.max(3,re.mrc||0),X=1-1/G,K=Math.abs(m.c2p(re.x)-v);return K=Math.min(ne,se)&&g<=Math.max(ne,se)?0:1/0}var G=Math.max(3,re.mrc||0),X=1-1/G,K=Math.abs(h.c2p(re.y)-g);return KY!=Me>=Y&&(he=ee[Z-1][0],xe=ee[Z][0],Me-we&&(ae=he+(xe-he)*(Y-we)/(Me-we),G=Math.min(G,ae),X=Math.max(X,ae)));return G=Math.max(G,0),X=Math.min(X,m._length),{x0:G,x1:X,y0:Y,y1:Y}}if(w.indexOf("fills")!==-1&&c._fillElement){var U=P(c._fillElement)&&!P(c._fillExclusionElement);if(U){var $=j(c._polygons);$===null&&($={x0:i[0],x1:i[0],y0:i[1],y1:i[1]});var Q=l.defaultLine;return l.opacity(c.fillcolor)?Q=c.fillcolor:l.opacity((c.line||{}).color)&&(Q=c.line.color),p.extendFlat(n,{distance:n.maxHoverDistance,x0:$.x0,x1:$.x1,y0:$.y0,y1:$.y1,color:Q,hovertemplate:!1}),delete n.index,c.text&&!p.isArrayOrTypedArray(c.text)?n.text=String(c.text):n.text=c.name,[n]}}}}}),Yv=ze({"src/traces/scatter/select.js"(J,V){"use strict";var p=el();V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=[],r=l[0].trace,a,o,s,c,m=r.mode&&!p.hasMarkers(r)&&!p.hasText(r);if(m)return[];if(k===!1)for(a=0;a0&&(o["_"+r+"axes"]||{})[n])return o;if((o[r+"axis"]||r)===n){if(e(o,r))return o;if((o[r]||[]).length||o[r+"0"])return o}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,n){var r=l(t),a=p(t,"box-violin");return a&&n===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),Hx=ze({"src/plots/cartesian/category_order_defaults.js"(J,V){"use strict";var p=Ff().isTypedArraySpec;function b(E,k){var l=k.dataAttr||E._id.charAt(0),e={},t,n,r;if(k.axData)t=k.axData;else for(t=[],n=0;n0||p(n),a;r&&(a="array");var o=e("categoryorder",a),s;o==="array"&&(s=e("categoryarray")),!r&&o==="array"&&(o=l.categoryorder="trace"),o==="trace"?l._initialCategories=[]:o==="array"?l._initialCategories=s.slice():(s=b(l,t).sort(),o==="category ascending"?l._initialCategories=s:o==="category descending"&&(l._initialCategories=s.reverse()))}}}}),g1=ze({"src/plots/cartesian/line_grid_defaults.js"(J,V){"use strict";var p=Qn(),b=fc(),E=Nr();V.exports=function(l,e,t,n){n=n||{};var r=n.dfltColor;function a(x,z){return E.coerce2(l,e,n.attributes,x,z)}var o=a("linecolor",r),s=a("linewidth"),c=t("showline",n.showLine||!!o||!!s);c||(delete e.linecolor,delete e.linewidth);var m=p.mix(r,n.bgColor,n.blend||b.lightFraction),h=a("gridcolor",m),v=a("gridwidth"),g=a("griddash"),i=t("showgrid",n.showGrid||!!h||!!v||!!g);if(i||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),n.hasMinor){var w=p.mix(e.gridcolor,n.bgColor,67),S=a("minor.gridcolor",w),M=a("minor.gridwidth",e.gridwidth||1),C=a("minor.griddash",e.griddash||"solid"),_=t("minor.showgrid",!!S||!!M||!!C);_||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!n.noZeroLine){var T=a("zerolinelayer"),f=a("zerolinecolor",r),u=a("zerolinewidth"),A=t("zeroline",n.showGrid||!!f||!!u);A||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),y1=ze({"src/plots/cartesian/axis_defaults.js"(J,V){"use strict";var p=ao(),b=mi(),E=Nr(),k=hs(),l=Jf(),e=cf(),t=Uv(),n=Ym(),r=ov(),a=sv(),o=Hx(),s=g1(),c=Qw(),m=Dd(),h=hc().WEEKDAY_PATTERN,v=hc().HOUR_PATTERN;V.exports=function(M,C,_,T,f){var u=T.letter,A=T.font||{},x=T.splomStash||{},z=_("visible",!T.visibleDflt),I=C._template||{},O=C.type||I.type||"-",D;if(O==="date"){var B=b.getComponentMethod("calendars","handleDefaults");B(M,C,"calendar",T.calendar),T.noTicklabelmode||(D=_("ticklabelmode"))}!T.noTicklabelindex&&(O==="date"||O==="linear")&&_("ticklabelindex");var F="";(!T.noTicklabelposition||O==="multicategory")&&(F=E.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:D==="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")),T.noTicklabeloverflow||_("ticklabeloverflow",F.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),m(C,f),c(M,C,_,T),o(M,C,_,T),T.noHover||(O!=="category"&&_("hoverformat"),T.noUnifiedhovertitle||_("unifiedhovertitle.text"));var P=_("color"),j=P!==e.color.dflt?P:A.color,U=x.label||f._dfltTitle[u];if(a(M,C,_,O,T),!z)return C;_("title.text",U),E.coerceFont(_,"title.font",A,{overrideDflt:{size:E.bigFont(A.size),color:j}}),t(M,C,_,O);var $=T.hasMinor;if($&&(k.newContainer(C,"minor"),t(M,C,_,O,{isMinor:!0})),r(M,C,_,O,T),n(M,C,_,T),$){var Q=T.isMinor;T.isMinor=!0,n(M,C,_,T),T.isMinor=Q}s(M,C,_,{dfltColor:P,bgColor:T.bgColor,showGrid:T.showGrid,hasMinor:$,attributes:e}),$&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&_("mirror");var re=O==="multicategory";if(!T.noTickson&&(O==="category"||re)&&(C.ticks||C.showgrid)&&(re?(_("tickson","boundaries"),delete C.ticklabelposition):_("tickson")),re){var ne=_("showdividers");ne&&(_("dividercolor"),_("dividerwidth"))}if(O==="date")if(l(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:g}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var se=0;se=2){var u="",A,x;if(f.length===2){for(A=0;A<2;A++)if(x=w(f[A]),x){u=h;break}}var z=_("pattern",u);if(z===h)for(A=0;A<2;A++)x=w(f[A]),x&&(M.bounds[A]=f[A]=x-1);if(z)for(A=0;A<2;A++)switch(x=f[A],z){case h:if(!p(x)){M.enabled=!1;return}if(x=+x,x!==Math.floor(x)||x<0||x>=7){M.enabled=!1;return}M.bounds[A]=f[A]=x;break;case v:if(!p(x)){M.enabled=!1;return}if(x=+x,x<0||x>24){M.enabled=!1;return}M.bounds[A]=f[A]=x;break}if(C.autorange===!1){var I=C.range;if(I[0]I[1]){M.enabled=!1;return}}else if(f[0]>I[0]&&f[1]_[1]-1/4096&&(l.domain=m),b.noneOrAll(k.domain,l.domain,m),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),RD=ze({"src/plots/cartesian/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover,k=s5(),l=hs(),e=Gm(),t=cf(),n=E5(),r=y1(),a=Vv(),o=Wx(),s=Xl(),c=s.id2name,m=s.name2id,h=hc().AX_ID_PATTERN,v=mi(),g=v.traceIs,i=v.getComponentMethod;function w(S,M,C){Array.isArray(S[M])?S[M].push(C):S[M]=[C]}V.exports=function(M,C,_){var T=C.autotypenumbers,f={},u={},A={},x={},z={},I={},O={},D={},B={},F={},P,j;for(P=0;P<_.length;P++){var U=_[P];if(g(U,"cartesian")){var $;if(U.xaxis)$=c(U.xaxis),w(f,$,U);else if(U.xaxes)for(j=0;j rect").call(k.setTranslate,0,0).call(k.setScale,1,1),C.plot.call(k.setTranslate,_._offset,T._offset).call(k.setScale,1,1);var f=C.plot.selectAll(".scatterlayer .trace");f.selectAll(".point").call(k.setPointGroupScale,1,1),f.selectAll(".textpoint").call(k.setTextPointsScale,1,1),f.call(k.hideOutsideRangePoints,C)}function c(C,_){var T=C.plotinfo,f=T.xaxis,u=T.yaxis,A=f._length,x=u._length,z=!!C.xr1,I=!!C.yr1,O=[];if(z){var D=E.simpleMap(C.xr0,f.r2l),B=E.simpleMap(C.xr1,f.r2l),F=D[1]-D[0],P=B[1]-B[0];O[0]=(D[0]*(1-_)+_*B[0]-D[0])/(D[1]-D[0])*A,O[2]=A*(1-_+_*P/F),f.range[0]=f.l2r(D[0]*(1-_)+_*B[0]),f.range[1]=f.l2r(D[1]*(1-_)+_*B[1])}else O[0]=0,O[2]=A;if(I){var j=E.simpleMap(C.yr0,u.r2l),U=E.simpleMap(C.yr1,u.r2l),$=j[1]-j[0],Q=U[1]-U[0];O[1]=(j[1]*(1-_)+_*U[1]-j[1])/(j[0]-j[1])*x,O[3]=x*(1-_+_*Q/$),u.range[0]=f.l2r(j[0]*(1-_)+_*U[0]),u.range[1]=u.l2r(j[1]*(1-_)+_*U[1])}else O[1]=0,O[3]=x;l.drawOne(t,f,{skipTitle:!0}),l.drawOne(t,u,{skipTitle:!0}),l.redrawComponents(t,[f._id,u._id]);var re=z?A/O[2]:1,ne=I?x/O[3]:1,se=z?O[0]:0,G=I?O[1]:0,X=z?O[0]/O[2]*A:0,K=I?O[1]/O[3]*x:0,H=f._offset-X,Y=u._offset-K;T.clipRect.call(k.setTranslate,se,G).call(k.setScale,1/re,1/ne),T.plot.call(k.setTranslate,H,Y).call(k.setScale,re,ne),k.setPointGroupScale(T.zoomScalePts,1/re,1/ne),k.setTextPointsScale(T.zoomScaleTxt,1/re,1/ne)}var m;a&&(m=a());function h(){for(var C={},_=0;_r.duration?(h(),w=window.cancelAnimationFrame(M)):w=window.requestAnimationFrame(M)}return g=Date.now(),w=window.requestAnimationFrame(M),Promise.resolve()}}}),Du=ze({"src/plots/cartesian/index.js"(J){"use strict";var V=ci(),p=mi(),b=Nr(),E=cl(),k=$i(),l=zf().getModuleCalcData,e=Xl(),t=hc(),n=nd(),r=b.ensureSingle;function a(g,i,w){return b.ensureSingle(g,i,w,function(S){S.datum(w)})}var o=t.zindexSeparator;J.name="cartesian",J.attr=["xaxis","yaxis"],J.idRoot=["x","y"],J.idRegex=t.idRegex,J.attrRegex=t.attrRegex,J.attributes=PD(),J.layoutAttributes=cf(),J.supplyLayoutDefaults=RD(),J.transitionAxes=ID(),J.finalizeSubplots=function(g,i){var w=i._subplots,S=w.xaxis,M=w.yaxis,C=w.cartesian,_=C,T={},f={},u,A,x;for(u=0;u<_.length;u++){var z=_[u].split("y");T[z[0]]=1,f["y"+z[1]]=1}for(u=0;u0){var I=z.id;if(I.indexOf(o)!==-1)continue;I+=o+(u+1),z=b.extendFlat({},z,{id:I,plot:M._cartesianlayer.selectAll(".subplot").select("."+I)})}for(var O=[],D,B=0;B<_.length;B++){var F=_[B],P=F[0].trace;A===(P.zorder||0)&&P.xaxis+P.yaxis===x&&((i.indexOf(P.index)!==-1||P.carpet)&&(D&&D[0].trace.xaxis+D[0].trace.yaxis===x&&["tonextx","tonexty","tonext"].indexOf(P.fill)!==-1&&O.indexOf(D)===-1&&O.push(D),O.push(F)),D=F)}s(g,z,O,w,S)}}};function s(g,i,w,S,M){for(var C=t.traceLayerClasses,_=g._fullLayout,T=_._zindices,f=_._modules,u,A,x,z=[],I=[],O=0;O1&&($+=o+U),j.push(T+$),_=0;_1,x=i.mainplotinfo;if(!i.mainplot||A)if(u)i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.xaxislayer=r(S,"g","xaxislayer-above"),i.yaxislayer=r(S,"g","yaxislayer-above");else{if(!_){var z=r(S,"g","layer-subplot");i.shapelayer=r(z,"g","shapelayer"),i.imagelayer=r(z,"g","imagelayer"),x&&A?(i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer):(i.minorGridlayer=r(S,"g","minor-gridlayer"),i.gridlayer=r(S,"g","gridlayer"),i.zerolinelayer=r(S,"g","zerolinelayer"));var I=r(S,"g","layer-between");i.shapelayerBetween=r(I,"g","shapelayer"),i.imagelayerBetween=r(I,"g","imagelayer"),r(S,"path","xlines-below"),r(S,"path","ylines-below"),i.overlinesBelow=r(S,"g","overlines-below"),r(S,"g","xaxislayer-below"),r(S,"g","yaxislayer-below"),i.overaxesBelow=r(S,"g","overaxes-below")}i.overplot=r(S,"g","overplot"),i.plot=r(i.overplot,"g",M),x&&A?i.zerolinelayerAbove=x.zerolinelayerAbove:i.zerolinelayerAbove=r(S,"g","zerolinelayer-above"),_||(i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.overlinesAbove=r(S,"g","overlines-above"),r(S,"g","xaxislayer-above"),r(S,"g","yaxislayer-above"),i.overaxesAbove=r(S,"g","overaxes-above"),i.xlines=S.select(".xlines-"+T),i.ylines=S.select(".ylines-"+f),i.xaxislayer=S.select(".xaxislayer-"+T),i.yaxislayer=S.select(".yaxislayer-"+f))}else{var O=x.plotgroup,D=M+"-x",B=M+"-y";i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer,i.zerolinelayerAbove=x.zerolinelayerAbove,r(x.overlinesBelow,"path",D),r(x.overlinesBelow,"path",B),r(x.overaxesBelow,"g",D),r(x.overaxesBelow,"g",B),i.plot=r(x.overplot,"g",M),r(x.overlinesAbove,"path",D),r(x.overlinesAbove,"path",B),r(x.overaxesAbove,"g",D),r(x.overaxesAbove,"g",B),i.xlines=O.select(".overlines-"+T).select("."+D),i.ylines=O.select(".overlines-"+f).select("."+B),i.xaxislayer=O.select(".overaxes-"+T).select("."+D),i.yaxislayer=O.select(".overaxes-"+f).select("."+B)}_||(u||(a(i.minorGridlayer,"g",i.xaxis._id),a(i.minorGridlayer,"g",i.yaxis._id),i.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),a(i.gridlayer,"g",i.xaxis._id),a(i.gridlayer,"g",i.yaxis._id),i.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),i.xlines.style("fill","none").classed("crisp",!0),i.ylines.style("fill","none").classed("crisp",!0))}function h(g,i){if(g){var w={};g.each(function(f){var u=f[0],A=V.select(this);A.remove(),v(u,i),w[u]=!0});for(var S in i._plots)for(var M=i._plots[S],C=M.overlays||[],_=0;_=0,i=a.indexOf("end")>=0,w=c.backoff*h+o.standoff,S=m.backoff*v+o.startstandoff,M,C,_,T;if(s.nodeName==="line"){M={x:+r.attr("x1"),y:+r.attr("y1")},C={x:+r.attr("x2"),y:+r.attr("y2")};var f=M.x-C.x,u=M.y-C.y;if(_=Math.atan2(u,f),T=_+Math.PI,w&&S&&w+S>Math.sqrt(f*f+u*u)){$();return}if(w){if(w*w>f*f+u*u){$();return}var A=w*Math.cos(_),x=w*Math.sin(_);C.x+=A,C.y+=x,r.attr({x2:C.x,y2:C.y})}if(S){if(S*S>f*f+u*u){$();return}var z=S*Math.cos(_),I=S*Math.sin(_);M.x-=z,M.y-=I,r.attr({x1:M.x,y1:M.y})}}else if(s.nodeName==="path"){var O=s.getTotalLength(),D="";if(O2/3?cr="right":cr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[cr]}for(var Be=!1,Xe=["x","y"],Ye=0;Ye1)&&(Tt===gt?(et=At.r2fraction(S["a"+yt]),(et<0||et>1)&&(Be=!0)):Be=!0),ht=At._offset+At.r2p(S[yt]),We=.5}else{var Mt=Je==="domain";yt==="x"?(Ne=S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.l+u.w*Ne):(Ne=1-S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.t+u.h*Ne),We=S.showarrow?.5:Ne}if(S.showarrow){vt.head=ht;var pt=S["a"+yt];if(Ke=rr*Ae(.5,S.xanchor)-_r*Ae(.5,S.yanchor),Tt===gt){var Pt=e.getRefType(Tt);Pt==="domain"?(yt==="y"&&(pt=1-pt),vt.tail=At._offset+At._length*pt):Pt==="paper"?yt==="y"?(pt=1-pt,vt.tail=u.t+u.h*pt):vt.tail=u.l+u.w*pt:vt.tail=At._offset+At.r2p(pt),De=Ke}else vt.tail=ht+pt,De=Ke+pt;vt.text=vt.tail+Ke;var Ct=f[yt==="x"?"width":"height"];if(gt==="paper"&&(vt.head=k.constrain(vt.head,1,Ct-1)),Tt==="pixel"){var qt=-Math.max(vt.tail-3,vt.text),Vt=Math.min(vt.tail+3,vt.text)-Ct;qt>0?(vt.tail+=qt,vt.text+=qt):Vt>0&&(vt.tail-=Vt,vt.text-=Vt)}vt.tail+=Ot,vt.head+=Ot}else Ke=Xt*Ae(We,or),De=Ke,vt.text=ht+Ke;vt.text+=Ot,Ke+=Ot,De+=Ot,S["_"+yt+"padplus"]=Xt/2+De,S["_"+yt+"padminus"]=Xt/2-De,S["_"+yt+"size"]=Xt,S["_"+yt+"shift"]=Ke}if(Be){se.remove();return}var Ht=0,Sr=0;if(S.align!=="left"&&(Ht=(_e-Ge)*(S.align==="center"?.5:1)),S.valign!=="top"&&(Sr=(ce-ke)*(S.valign==="middle"?.5:1)),Ie)Se.select("svg").attr({x:K+Ht-1,y:K+Sr}).call(n.setClipUrl,Y?F:null,w);else{var Kr=K+Sr-Ve.top,Yt=K+Ht-Ve.left;ae.call(a.positionText,Yt,Kr).call(n.setClipUrl,Y?F:null,w)}q.select("rect").call(n.setRect,K,K,_e,ce),H.call(n.setRect,G/2,G/2,ve-G,le-G),se.call(n.setTranslate,Math.round(P.x.text-ve/2),Math.round(P.y.text-le/2)),$.attr({transform:"rotate("+j+","+P.x.text+","+P.y.text+")"});var Rt=function(ur,cr){U.selectAll(".annotation-arrow-g").remove();var Rr=P.x.head,Qr=P.y.head,Zr=P.x.tail+ur,ha=P.y.tail+cr,Pa=P.x.text+ur,La=P.y.text+cr,un=k.rotationXYMatrix(j,Pa,La),Xa=k.apply2DTransform(un),ja=k.apply2DTransform2(un),Nn=+H.attr("width"),yn=+H.attr("height"),Un=Pa-.5*Nn,li=Un+Nn,Yn=La-.5*yn,on=Yn+yn,en=[[Un,Yn,Un,on],[Un,on,li,on],[li,on,li,Yn],[li,Yn,Un,Yn]].map(ja);if(!en.reduce(function(ot,kt){return ot^!!k.segmentsIntersect(Rr,Qr,Rr+1e6,Qr+1e6,kt[0],kt[1],kt[2],kt[3])},!1)){en.forEach(function(ot){var kt=k.segmentsIntersect(Zr,ha,Rr,Qr,ot[0],ot[1],ot[2],ot[3]);kt&&(Zr=kt.x,ha=kt.y)});var vi=S.arrowwidth,Yi=S.arrowcolor,Ja=S.arrowside,Oa=U.append("g").style({opacity:t.opacity(Yi)}).classed("annotation-arrow-g",!0),lt=Oa.append("path").attr("d","M"+Zr+","+ha+"L"+Rr+","+Qr).style("stroke-width",vi+"px").call(t.stroke,t.rgb(Yi));if(m(lt,Ja,S),A.annotationPosition&<.node().parentNode&&!C){var rt=Rr,fr=Qr;if(S.standoff){var lr=Math.sqrt(Math.pow(Rr-Zr,2)+Math.pow(Qr-ha,2));rt+=S.standoff*(Zr-Rr)/lr,fr+=S.standoff*(ha-Qr)/lr}var Tr=Oa.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Zr-rt)+","+(ha-fr),transform:l(rt,fr)}).style("stroke-width",vi+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),Ir,Dr;s.init({element:Tr.node(),gd:w,prepFn:function(){var ot=n.getTranslate(se);Ir=ot.x,Dr=ot.y,_&&_.autorange&&O(_._name+".autorange",!0),T&&T.autorange&&O(T._name+".autorange",!0)},moveFn:function(ot,kt){var jt=Xa(Ir,Dr),ar=jt[0]+ot,Er=jt[1]+kt;se.call(n.setTranslate,ar,Er),D("x",g(_,ot,"x",u,S)),D("y",g(T,kt,"y",u,S)),S.axref===S.xref&&D("ax",g(_,ot,"ax",u,S)),S.ayref===S.yref&&D("ay",g(T,kt,"ay",u,S)),Oa.attr("transform",l(ot,kt)),$.attr({transform:"rotate("+j+","+ar+","+Er+")"})},doneFn:function(){b.call("_guiRelayout",w,B());var ot=document.querySelector(".js-notes-box-panel");ot&&ot.redraw(ot.selectedObj)}})}}};if(S.showarrow&&Rt(0,0),Q){var nr;s.init({element:se.node(),gd:w,prepFn:function(){nr=$.attr("transform")},moveFn:function(ur,cr){var Rr="pointer";if(S.showarrow)S.axref===S.xref?D("ax",g(_,ur,"ax",u,S)):D("ax",S.ax+ur),S.ayref===S.yref?D("ay",g(T,cr,"ay",u.w,S)):D("ay",S.ay+cr),Rt(ur,cr);else{if(C)return;var Qr,Zr;if(_)Qr=g(_,ur,"x",u,S);else{var ha=S._xsize/u.w,Pa=S.x+(S._xshift-S.xshift)/u.w-ha/2;Qr=s.align(Pa+ur/u.w,ha,0,1,S.xanchor)}if(T)Zr=g(T,cr,"y",u,S);else{var La=S._ysize/u.h,un=S.y-(S._yshift+S.yshift)/u.h-La/2;Zr=s.align(un-cr/u.h,La,0,1,S.yanchor)}D("x",Qr),D("y",Zr),(!_||!T)&&(Rr=s.getCursor(_?.5:Qr,T?.5:Zr,S.xanchor,S.yanchor))}$.attr({transform:l(ur,cr)+nr}),o(se,Rr)},clickFn:function(ur,cr){S.captureevents&&w.emit("plotly_clickannotation",ne(cr))},doneFn:function(){o(se),b.call("_guiRelayout",w,B());var ur=document.querySelector(".js-notes-box-panel");ur&&ur.redraw(ur.selectedObj)}})}}A.annotationText?ae.call(a.makeEditable,{delegate:se,gd:w}).call(he).on("edit",function(we){S.text=we,this.call(he),D("text",we),_&&_.autorange&&O(_._name+".autorange",!0),T&&T.autorange&&O(T._name+".autorange",!0),b.call("_guiRelayout",w,B())}):ae.call(he)}}}),zD=ze({"src/components/annotations/click.js"(J,V){"use strict";var p=Nr(),b=mi(),E=hs().arrayEditor;V.exports={hasClickToShow:k,onClick:l};function k(n,r){var a=e(n,r);return a.on.length>0||a.explicitOff.length>0}function l(n,r){var a=e(n,r),o=a.on,s=a.off.concat(a.explicitOff),c={},m=n._fullLayout.annotations,h,v;if(o.length||s.length){for(h=0;h1){o=!0;break}}o?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(a._pdata=b(l.glplot.cameraParams,[e.xaxis.r2l(a.x)*t[0],e.yaxis.r2l(a.y)*t[1],e.zaxis.r2l(a.z)*t[2]]),p(l.graphDiv,a,r,l.id,a._xa,a._ya))}}}}),GD=ze({"src/components/annotations3d/index.js"(J,V){"use strict";var p=mi(),b=Nr();V.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Xx()}}},layoutAttributes:Xx(),handleDefaults:UD(),includeBasePlot:E,convert:qD(),draw:VD()};function E(k,l){var e=p.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,n=Object.keys(k),r=0;r{var x=A+"anchor",z=A==="x"?w:S,I={_fullLayout:a},O,D,B,F;let P=A+"ref",j=n[P];if(Array.isArray(j)&&j.length>0){let U=l.countDefiningCoords(v,m,A);F=b.coerceRefArray(n,r,I,A,void 0,"paper",U),r["_"+A+"refArray"]=!0}else F=b.coerceRef(n,r,I,A,void 0,"paper");if(Array.isArray(F))F.forEach(function(U){b.getRefType(U)==="range"&&(O=b.getFromId(I,U),O&&O._shapeIndices.indexOf(r._index)===-1&&O._shapeIndices.push(r._index))}),g&&[0,1].forEach(function(U){let $=F[U];b.getRefType($)==="range"?(O=b.getFromId(I,$),D=l.shapePositionToRange(O),B=l.rangeToShapePosition(O),(O.type==="category"||O.type==="multicategory")&&o(A+U+"shift")):D=B=p.identity;let re=A+U,ne=n[re];if(n[re]=D(n[re],!0),z==="pixel"?o(re,C[U]):b.coercePosition(r,I,o,$,re,M[U]),r[re]=B(r[re]),n[re]=ne,U===0&&z==="pixel"){let se=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,$,x,.25),r[x]=B(r[x]),n[x]=se}});else{if(b.getRefType(F)==="range"?(O=b.getFromId(I,F),O._shapeIndices.push(r._index),B=l.rangeToShapePosition(O),D=l.shapePositionToRange(O),g&&(O.type==="category"||O.type==="multicategory")&&(o(A+"0shift"),o(A+"1shift"))):D=B=p.identity,g){let $=A+"0",Q=A+"1",re=n[$],ne=n[Q];n[$]=D(n[$],!0),n[Q]=D(n[Q],!0),z==="pixel"?(o($,C[0]),o(Q,C[1])):(b.coercePosition(r,I,o,F,$,M[0]),b.coercePosition(r,I,o,F,Q,M[1])),r[$]=B(r[$]),r[Q]=B(r[Q]),n[$]=re,n[Q]=ne}if(z==="pixel"){let $=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,F,x,.25),r[x]=B(r[x]),n[x]=$}}}),g&&p.noneOrAll(n,r,["x0","x1","y0","y1"]);var _=v==="line",T,f;if(g&&(T=o("label.texttemplate"),o("label.texttemplatefallback")),T||(f=o("label.text")),f||T){o("label.textangle");var u=o("label.textposition",_?"middle":"middle center");o("label.xanchor"),o("label.yanchor",e(_,u)),o("label.padding"),p.coerceFont(o,"label.font",a.font)}}}}),WD=ze({"src/components/shapes/draw_newshape/defaults.js"(J,V){"use strict";var p=Qn(),b=Nr();function E(k,l){return k?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}V.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),b.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var n=t("newshape.line.width");if(n){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",p.contrast(r)),t("newshape.line.dash")}var a=l.dragmode==="drawline",o=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),o||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",a?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",E(a,c)),t("newshape.label.padding"),b.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),YD=ze({"src/components/shapes/calc_autorange.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=h1(),k=cv();V.exports=function(o){var s=o._fullLayout,c=p.filterVisible(s.shapes);if(!(!c.length||!o._fullData.length))for(var m=0;m{v=b.getFromId(o,M),h._extremes[v._id]=b.findExtremes(v,C,e(h))})}else h.xref!=="paper"&&i!=="domain"&&(v=b.getFromId(o,h.xref),g=r(v,h,E.paramIsX),g&&(h._extremes[v._id]=b.findExtremes(v,g,e(h))));if(w==="array"){let S=l(o,h,"y");Object.entries(S).forEach(([M,C])=>{v=b.getFromId(o,M),h._extremes[v._id]=b.findExtremes(v,C,t(h))})}else h.yref!=="paper"&&w!=="domain"&&(v=b.getFromId(o,h.yref),g=r(v,h,E.paramIsY),g&&(h._extremes[v._id]=b.findExtremes(v,g,t(h))))}};function l(a,o,s){let c=o[s+"ref"],m=s==="x"?E.paramIsX:E.paramIsY;function h(M,C){M==="paper"||b.getRefType(M)==="domain"||(v[M]||(v[M]=[]),v[M].push(C))}let v={};if(o.type==="path"&&o.path){let M=o.path.match(E.segmentRE)||[];for(var g=0,i=0;iT&&(h(c[g],f[T]),g++)}}else h(c[0],o[s+"0"]),h(c[1],o[s+"1"]);let w={};for(let M in v){let C=b.getFromId(a,M);if(C){var S=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(S=k.decodeDate(S)),w[C._id]=v[M].map(S)}}return w}function e(a){return n(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function t(a){return n(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function n(a,o,s,c,m,h){var v=a/2,g=h;if(o==="pixel"){var i=m?k.extractPathCoords(m,h?E.paramIsY:E.paramIsX):[s,c],w=p.aggNums(Math.max,null,i),S=p.aggNums(Math.min,null,i),M=S<0?Math.abs(S)+v:v,C=w>0?w+v:v;return{ppad:v,ppadplus:g?M:C,ppadminus:g?C:M}}else return{ppad:v}}function r(a,o,s){var c=a._id.charAt(0)==="x"?"x":"y",m=a.type==="category"||a.type==="multicategory",h,v,g=0,i=0,w=m?a.r2c:a.d2c,S=o[c+"sizemode"]==="scaled";if(S?(h=o[c+"0"],v=o[c+"1"],m&&(g=o[c+"0shift"],i=o[c+"1shift"])):(h=o[c+"anchor"],v=o[c+"anchor"]),h!==void 0)return[w(h)+g,w(v)+i];if(o.path){var M=1/0,C=-1/0,_=o.path.match(E.segmentRE),T,f,u,A,x;for(a.type==="date"&&(w=k.decodeDate(w)),T=0;T<_.length;T++)f=_[T],u=s[f.charAt(0)].drawn,u!==void 0&&(A=_[T].slice(1).match(E.paramRE),!(!A||A.lengthC&&(C=x)));if(C>=M)return[M,C]}}}}),XD=ze({"src/components/shapes/index.js"(J,V){"use strict";var p=Ox();V.exports={moduleType:"component",name:"shapes",layoutAttributes:L5(),supplyLayoutDefaults:HD(),supplyDrawNewShapeDefaults:WD(),includeBasePlot:m1()("shapes"),calcAutorange:YD(),draw:p.draw,drawOne:p.drawOne}}}),P5=ze({"src/components/images/attributes.js"(J,V){"use strict";var p=hc(),b=hs().templatedArray,E=v1();V.exports=b("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",p.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",p.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),ZD=ze({"src/components/images/defaults.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=Jf(),k=P5(),l="images";V.exports=function(n,r){var a={name:l,handleItemDefaults:e};E(n,r,a)};function e(t,n,r){function a(w,S){return p.coerce(t,n,k,w,S)}var o=a("source"),s=a("visible",!!o);if(!s)return n;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var c={_fullLayout:r},m=["x","y"],h=0;h<2;h++){var v=m[h],g=b.coerceRef(t,n,c,v,"paper",void 0);if(g!=="paper"){var i=b.getFromId(c,g);i._imgIndices.push(n._index)}b.coercePosition(n,c,a,g,v,0)}return n}}}),$D=ze({"src/components/images/draw.js"(J,V){"use strict";var p=ci(),b=$i(),E=Gi(),k=Xl(),l=nd();V.exports=function(t){var n=t._fullLayout,r=[],a={},o=[],s,c;for(c=0;c0);m&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),p.noneOrAll(r,a,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),p.coerceFont(s,"font",o.font),s("bgcolor",o.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function n(r,a){function o(c,m){return p.coerce(r,a,e,c,m)}var s=o("visible",r.method==="skip"||Array.isArray(r.args));s&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),eF=ze({"src/components/updatemenus/scrollbox.js"(J,V){"use strict";V.exports=l;var p=ci(),b=Qn(),E=$i(),k=Nr();function l(e,t,n){this.gd=e,this.container=t,this.id=n,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})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,n,r){var a=this.gd._fullLayout,o=a.width,s=a.height;this.position=t;var c=this.position.l,m=this.position.w,h=this.position.t,v=this.position.h,g=this.position.direction,i=g==="down",w=g==="left",S=g==="right",M=g==="up",C=m,_=v,T,f,u,A;!i&&!w&&!S&&!M&&(this.position.direction="down",i=!0);var x=i||M;x?(T=c,f=T+C,i?(u=h,A=Math.min(u+_,s),_=A-u):(A=h+_,u=Math.max(A-_,0),_=A-u)):(u=h,A=u+_,w?(f=c+C,T=Math.max(f-C,0),C=f-T):(T=c,f=Math.min(T+C,o),C=f-T)),this._box={l:T,t:u,w:C,h:_};var z=m>C,I=l.barLength+2*l.barPad,O=l.barWidth+2*l.barPad,D=c,B=h+v;B+O>s&&(B=s-O);var F=this.container.selectAll("rect.scrollbar-horizontal").data(z?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(b.fill,l.barColor),z?(this.hbar=F.attr({rx:l.barRadius,ry:l.barRadius,x:D,y:B,width:I,height:O}),this._hbarXMin=D+I/2,this._hbarTranslateMax=C-I):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=v>_,j=l.barWidth+2*l.barPad,U=l.barLength+2*l.barPad,$=c+m,Q=h;$+j>o&&($=o-j);var re=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);re.exit().on(".drag",null).remove(),re.enter().append("rect").classed("scrollbar-vertical",!0).call(b.fill,l.barColor),P?(this.vbar=re.attr({rx:l.barRadius,ry:l.barRadius,x:$,y:Q,width:j,height:U}),this._vbarYMin=Q+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ne=this.id,se=T-.5,G=P?f+j+.5:f+.5,X=u-.5,K=z?A+O+.5:A+.5,H=a._topdefs.selectAll("#"+ne).data(z||P?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",ne).append("rect"),z||P?(this._clipRect=H.select("rect").attr({x:Math.floor(se),y:Math.floor(X),width:Math.ceil(G)-Math.floor(se),height:Math.ceil(K)-Math.floor(X)}),this.container.call(E.setClipUrl,ne,this.gd),this.bg.attr({x:c,y:h,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),z||P){var Y=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var q=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault(),p.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));z&&this.hbar.on(".drag",null).call(q),P&&this.vbar.on(".drag",null).call(q)}this.setTranslate(n,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.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)},l.prototype._onBoxDrag=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t-=p.event.dx),this.vbar&&(n-=p.event.dy),this.setTranslate(t,n)},l.prototype._onBoxWheel=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t+=p.event.deltaY),this.vbar&&(n+=p.event.deltaY),this.setTranslate(t,n)},l.prototype._onBarDrag=function(){var t=this.translateX,n=this.translateY;if(this.hbar){var r=t+this._hbarXMin,a=r+this._hbarTranslateMax,o=k.constrain(p.event.x,r,a),s=(o-r)/(a-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var m=n+this._vbarYMin,h=m+this._vbarTranslateMax,v=k.constrain(p.event.y,m,h),g=(v-m)/(h-m),i=this.position.h-this._box.h;n=g*i}this.setTranslate(t,n)},l.prototype.setTranslate=function(t,n){var r=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=k.constrain(t||0,0,r),n=k.constrain(n||0,0,a),this.translateX=t,this.translateY=n,this.container.call(E.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-n),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+n-.5)}),this.hbar){var o=t/r;this.hbar.call(E.setTranslate,t+o*this._hbarTranslateMax,n)}if(this.vbar){var s=n/a;this.vbar.call(E.setTranslate,t,n+s*this._vbarTranslateMax)}}}}),tF=ze({"src/components/updatemenus/draw.js"(J,V){"use strict";var p=ci(),b=cl(),E=Qn(),k=$i(),l=Nr(),e=Cs(),t=hs().arrayEditor,n=dc().LINE_SPACING,r=Zx(),a=eF();V.exports=function(I){var O=I._fullLayout,D=l.filterVisible(O[r.name]);function B(ne){b.autoMargin(I,u(ne))}var F=O._menulayer.selectAll("g."+r.containerClassName).data(D.length>0?[0]:[]);if(F.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),F.exit().each(function(){p.select(this).selectAll("g."+r.headerGroupClassName).each(B)}).remove(),D.length!==0){var P=F.selectAll("g."+r.headerGroupClassName).data(D,o);P.enter().append("g").classed(r.headerGroupClassName,!0);for(var j=l.ensureSingle(F,"g",r.dropdownButtonGroupClassName,function(ne){ne.style("pointer-events","all")}),U=0;U0?[0]:[]);$.enter().append("g").classed(r.containerClassName,!0).style("cursor",P?null:"ew-resize");function Q(G){G._commandObserver&&(G._commandObserver.remove(),delete G._commandObserver),b.autoMargin(F,m(G))}if($.exit().each(function(){p.select(this).selectAll("g."+r.groupClassName).each(Q)}).remove(),U.length!==0){var re=$.selectAll("g."+r.groupClassName).data(U,v);re.enter().append("g").classed(r.groupClassName,!0),re.exit().each(Q).remove();for(var ne=0;ne0&&(re=re.transition().duration(F.transition.duration).ease(F.transition.easing)),re.attr("transform",e(Q-r.gripWidth*.5,F._dims.currentValueTotalHeight))}}function z(B,F){var P=B._dims;return P.inputAreaStart+r.stepInset+(P.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,F))}function I(B,F){var P=B._dims;return Math.min(1,Math.max(0,(F-r.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*r.stepInset-2*P.inputAreaStart)))}function O(B,F,P){var j=P._dims,U=l.ensureSingle(B,"rect",r.railTouchRectClass,function($){$.call(f,F,B,P).style("pointer-events","all")});U.attr({width:j.inputAreaLength,height:Math.max(j.inputAreaWidth,r.tickOffset+P.ticklen+j.labelHeight)}).call(E.fill,P.bgcolor).attr("opacity",0),k.setTranslate(U,0,j.currentValueTotalHeight)}function D(B,F){var P=F._dims,j=P.inputAreaLength-r.railInset*2,U=l.ensureSingle(B,"rect",r.railRectClass);U.attr({width:j,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(E.stroke,F.bordercolor).call(E.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),k.setTranslate(U,r.railInset,(P.inputAreaWidth-r.railWidth)*.5+P.currentValueTotalHeight)}}}),iF=ze({"src/components/sliders/index.js"(J,V){"use strict";var p=_1();V.exports={moduleType:"component",name:p.name,layoutAttributes:I5(),supplyLayoutDefaults:aF(),draw:nF()}}}),$x=ze({"src/components/rangeslider/attributes.js"(J,V){"use strict";var p=fc();V.exports={bgcolor:{valType:"color",dflt:p.background,editType:"plot"},bordercolor:{valType:"color",dflt:p.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"}}}),D5=ze({"src/components/rangeslider/oppaxis_attributes.js"(J,V){"use strict";V.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}}),Kx=ze({"src/components/rangeslider/constants.js"(J,V){"use strict";V.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),oF=ze({"src/components/rangeslider/helpers.js"(J){"use strict";var V=Xl(),p=Cs(),b=Kx(),E=dc().LINE_SPACING,k=b.name;function l(e){var t=e&&e[k];return t&&t.visible}J.isVisible=l,J.makeData=function(e){for(var t=V.list({_fullLayout:e},"x",!0),n=e.margin,r=[],a=0;a=Ge.max)Ie=he[Ve+1];else if(Se=Ge.pmax)Ie=he[Ve+1];else if(Se0?f.touches[0].clientX:0}function h(f,u,A,x){if(u._context.staticPlot)return;var z=f.select("rect."+c.slideBoxClassName).node(),I=f.select("rect."+c.grabAreaMinClassName).node(),O=f.select("rect."+c.grabAreaMaxClassName).node();function D(){var B=p.event,F=B.target,P=m(B),j=P-f.node().getBoundingClientRect().left,U=x.d2p(A._rl[0]),$=x.d2p(A._rl[1]),Q=o.coverSlip();this.addEventListener("touchmove",re),this.addEventListener("touchend",ne),Q.addEventListener("mousemove",re),Q.addEventListener("mouseup",ne);function re(se){var G=m(se),X=+G-P,K,H,Y;switch(F){case z:if(Y="ew-resize",U+X>A._length||$+X<0)return;K=U+X,H=$+X;break;case I:if(Y="col-resize",U+X>A._length)return;K=U+X,H=$;break;case O:if(Y="col-resize",$+X<0)return;K=U,H=$+X;break;default:Y="ew-resize",K=j,H=j+X;break}if(H0);if(w){var S=n(o,s,c);g("x",S[0]),g("y",S[1]),p.noneOrAll(a,o,["x","y"]),g("xanchor"),g("yanchor"),p.coerceFont(g,"font",s.font);var M=g("bgcolor");g("activecolor",b.contrast(M,e.lightAmount,e.darkAmount)),g("bordercolor"),g("borderwidth")}};function t(r,a,o,s){var c=s.calendar;function m(g,i){return p.coerce(r,a,l.buttons,g,i)}var h=m("visible");if(h){var v=m("step");v!=="all"&&(c&&c!=="gregorian"&&(v==="month"||v==="year")?a.stepmode="backward":m("stepmode"),m("count")),m("label")}}function n(r,a,o){for(var s=o.filter(function(v){return a[v].anchor===r._id}),c=0,m=0;m1)){delete c.grid;return}if(!g&&!i&&!w){var A=T("pattern")==="independent";A&&(g=!0)}_._hasSubplotGrid=g;var x=T("roworder"),z=x==="top to bottom",I=g?.2:.1,O=g?.3:.1,D,B;S&&c._splomGridDflt&&(D=c._splomGridDflt.xside,B=c._splomGridDflt.yside),_._domains={x:r("x",T,I,D,u),y:r("y",T,O,B,f,z)}}function r(s,c,m,h,v,g){var i=c(s+"gap",m),w=c("domain."+s);c(s+"side",h);for(var S=new Array(v),M=w[0],C=(w[1]-M)/(v-i),_=C*(1-i),T=0;T0,h=t._context.staticPlot;n.each(function(v){var g=v[0].trace,i=g.error_x||{},w=g.error_y||{},S;g.ids&&(S=function(T){return T.id});var M=k.hasMarkers(g)&&g.marker.maxdisplayed>0;!w.visible&&!i.visible&&(v=[]);var C=p.select(this).selectAll("g.errorbar").data(v,S);if(C.exit().remove(),!!v.length){i.visible||C.selectAll("path.xerror").remove(),w.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var _=C.enter().append("g").classed("errorbar",!0);m&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),E.setClipUrl(C,r.layerClipId,t),C.each(function(T){var f=p.select(this),u=l(T,s,c);if(!(M&&!T.vis)){var A,x=f.select("path.yerror");if(w.visible&&b(u.x)&&b(u.yh)&&b(u.ys)){var z=w.width;A="M"+(u.x-z)+","+u.yh+"h"+2*z+"m-"+z+",0V"+u.ys,u.noYS||(A+="m-"+z+",0h"+2*z),o=!x.size(),o?x=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0):m&&(x=x.transition().duration(a.duration).ease(a.easing)),x.attr("d",A)}else x.remove();var I=f.select("path.xerror");if(i.visible&&b(u.y)&&b(u.xh)&&b(u.xs)){var O=(i.copy_ystyle?w:i).width;A="M"+u.xh+","+(u.y-O)+"v"+2*O+"m0,-"+O+"H"+u.xs,u.noXS||(A+="m0,-"+O+"v"+2*O),o=!I.size(),o?I=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0):m&&(I=I.transition().duration(a.duration).ease(a.easing)),I.attr("d",A)}else I.remove()}})}})};function l(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};return e.yh!==void 0&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),b(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),b(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),yF=ze({"src/components/errorbars/style.js"(J,V){"use strict";var p=ci(),b=Qn();V.exports=function(k){k.each(function(l){var e=l[0].trace,t=e.error_y||{},n=e.error_x||{},r=p.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(b.stroke,t.color),n.copy_ystyle&&(n=t),r.selectAll("path.xerror").style("stroke-width",n.thickness+"px").call(b.stroke,n.color)})}}}),_F=ze({"src/components/errorbars/index.js"(J,V){"use strict";var p=Nr(),b=Al().overrideAll,E=B5(),k={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E)};delete k.error_x.copy_zstyle,delete k.error_y.copy_zstyle,delete k.error_y.copy_ystyle;var l={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E),error_z:p.extendFlat({},E)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,V.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:k,bar:k,histogram:k,scatter3d:b(l,"calc","nested"),scattergl:b(k,"calc","nested")}},supplyDefaults:vF(),calc:mF(),makeComputeError:O5(),plot:gF(),style:yF(),hoverInfo:e};function e(t,n,r){(n.error_y||{}).visible&&(r.yerr=t.yh-t.y,n.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(n.error_x||{}).visible&&(r.xerr=t.xh-t.x,n.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),xF=ze({"src/components/colorbar/constants.js"(J,V){"use strict";V.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),bF=ze({"src/components/colorbar/draw.js"(J,V){"use strict";var p=ci(),b=cl(),E=mi(),k=Gi(),l=_h(),e=Nr(),t=e.strTranslate,n=Ki().extendFlat,r=gd(),a=$i(),o=Qn(),s=qv(),c=Cs(),m=Bf().flipScale,h=y1(),v=Wx(),g=cf(),i=dc(),w=i.LINE_SPACING,S=i.FROM_TL,M=i.FROM_BR,C=xF().cn;function _(O){var D=O._fullLayout,B=D._infolayer.selectAll("g."+C.colorbar).data(T(O),function(F){return F._id});B.enter().append("g").attr("class",function(F){return F._id}).classed(C.colorbar,!0),B.each(function(F){var P=p.select(this);e.ensureSingle(P,"rect",C.cbbg),e.ensureSingle(P,"g",C.cbfills),e.ensureSingle(P,"g",C.cblines),e.ensureSingle(P,"g",C.cbaxis,function(U){U.classed(C.crisp,!0)}),e.ensureSingle(P,"g",C.cbtitleunshift,function(U){U.append("g").classed(C.cbtitle,!0)}),e.ensureSingle(P,"rect",C.cboutline);var j=A(P,F,O);j&&j.then&&(O._promises||[]).push(j),O._context.edits.colorbarPosition&&x(P,F,O)}),B.exit().each(function(F){b.autoMargin(O,F._id)}).remove(),B.order()}function T(O){var D=O._fullLayout,B=O.calcdata,F=[],P,j,U,$;function Q(ee){return n(ee,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof $.calc=="function"?$.calc(O,U,P):(P._fillgradient=j.reversescale?m(j.colorscale):j.colorscale,P._zrange=[j[$.min],j[$.max]])}for(var ne=0;ne[Math.min(O[0]+D,O[1]),O[1]],u=(O,D)=>[O[0],Math.max(O[1]-D,O[0])];function A(O,D,B){var F=D.orientation==="v",P=D.len,j=D.lenmode,U=D.thickness,$=D.thicknessmode,Q=D.outlinewidth,re=D.borderwidth,ne=D.bgcolor,se=D.xanchor,G=D.yanchor,X=D.xpad,K=D.ypad,H=D.x,Y=F?D.y:1-D.y,q=D.yref==="paper",Z=D.xref==="paper",ee=B._fullLayout,ae=ee._size,he=D._fillcolor,xe=D._line,we=D.title,Me=we.side,Se=D._zrange||p.extent((typeof he=="function"?he:xe.color).domain()),Ie=typeof xe.color=="function"?xe.color:function(){return xe.color},Ve=typeof he=="function"?he:function(){return he},Ge=D._levels,ke=z(B,D,Se),_e=ke.fill,ce=ke.line,ve=Math.round(U*($==="fraction"?F?ae.w:ae.h:1)),le=ve/(F?ae.w:ae.h),Ae=Math.round(P*(j==="fraction"?F?ae.h:ae.w:1)),Be=Ae/(F?ae.h:ae.w),Xe=Z?ae.w:B._fullLayout.width,Ye=q?ae.h:B._fullLayout.height,yt=Math.round(F?H*Xe+X:Y*Ye+K),gt={center:.5,right:1}[se]||0,Tt={top:1,middle:.5}[G]||0,At=F?H-gt*le:Y-Tt*le,$t=F?Y-Tt*Be:H-gt*Be,rr=Math.round(F?Ye*(1-$t):Xe*$t);D._lenFrac=Be,D._thickFrac=le,D._uFrac=At,D._vFrac=$t;var _r=D._axis=I(B,D,Se);_r.position=le+(F?H+X/ae.w:Y+K/ae.h);var Xt=["top","bottom"].indexOf(Me)!==-1;if(F&&Xt&&(_r.title.side=Me,_r.titlex=H+X/ae.w,_r.titley=$t+(we.side==="top"?Be-K/ae.h:K/ae.h)),!F&&!Xt&&(_r.title.side=Me,_r.titley=Y+K/ae.h,_r.titlex=$t+X/ae.w),xe.color&&D.tickmode==="auto"){_r.tickmode="linear",_r.tick0=Ge.start;var or=Ge.size,Ot=e.constrain(Ae/50,4,15)+1,vt=(Se[1]-Se[0])/((D.nticks||Ot)*or);if(vt>1){var ht=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));or*=ht*e.roundUp(vt/ht,[2,5,10]),(Math.abs(Ge.start)/Ge.size+1e-6)%1<2e-6&&(_r.tick0=0)}_r.dtick=or}var De=F?K/ae.h:X/ae.w;_r.domain=u(f([$t,$t+Be],De),De),_r.setScale(),O.attr("transform",t(Math.round(ae.l),Math.round(ae.t)));var Ne=O.select("."+C.cbtitleunshift).attr("transform",t(-Math.round(ae.l),-Math.round(ae.t))),We=_r.ticklabelposition,Ke=_r.title.font.size,Je=O.select("."+C.cbaxis),et,Mt=0,pt=0;function Pt(Sr,Kr){var Yt={propContainer:_r,propName:D._propPrefix+"title.text",traceIndex:D._traceIndex,_meta:D._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:O.select("."+C.cbtitle)},Rt=Sr.charAt(0)==="h"?Sr.slice(1):"h"+Sr;O.selectAll("."+Rt+",."+Rt+"-math-group").remove(),s.draw(B,Sr,n(Yt,Kr||{}))}function Ct(){if(F&&Xt||!F&&!Xt){var Sr,Kr;Me==="top"&&(Sr=X+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t-Be)+3+Ke*.75),Me==="bottom"&&(Sr=X+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t)-3-Ke*.25),Me==="right"&&(Kr=K+ae.t+Ye*Y+3+Ke*.75,Sr=X+ae.l+Xe*$t),Pt(_r._id+"title",{attributes:{x:Sr,y:Kr,"text-anchor":F?"start":"middle"}})}}function qt(){if(F&&!Xt||!F&&Xt){var Sr=_r.position||0,Kr=_r._offset+_r._length/2,Yt,Rt;if(Me==="right")Rt=Kr,Yt=ae.l+Xe*Sr+10+Ke*(_r.showticklabels?1:.5);else if(Yt=Kr,Me==="bottom"&&(Rt=ae.t+Ye*Sr+10+(We.indexOf("inside")===-1?_r.tickfont.size:0)+(_r.ticks!=="inside"&&D.ticklen||0)),Me==="top"){var nr=we.text.split("
").length;Rt=ae.t+Ye*Sr+10-ve-w*Ke*nr}Pt((F?"h":"v")+_r._id+"title",{avoid:{selection:p.select(B).selectAll("g."+_r._id+"tick"),side:Me,offsetTop:F?0:ae.t,offsetLeft:F?ae.l:0,maxShift:F?ee.width:ee.height},attributes:{x:Yt,y:Rt,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}}function Vt(){if(!F&&!Xt||F&&Xt){var Sr=O.select("."+C.cbtitle),Kr=Sr.select("text"),Yt=[-Q/2,Q/2],Rt=Sr.select(".h"+_r._id+"title-math-group").node(),nr=15.6;Kr.node()&&(nr=parseInt(Kr.node().style.fontSize,10)*w);var ur;if(Rt?(ur=a.bBox(Rt),pt=ur.width,Mt=ur.height,Mt>nr&&(Yt[1]-=(Mt-nr)/2)):Kr.node()&&!Kr.classed(C.jsPlaceholder)&&(ur=a.bBox(Kr.node()),pt=ur.width,Mt=ur.height),F){if(Mt){if(Mt+=5,Me==="top")_r.domain=u(_r.domain,Mt/ae.h),Yt[1]*=-1;else{_r.domain=f(_r.domain,Mt/ae.h);var cr=c.lineCount(Kr);Yt[1]+=(1-cr)*nr}Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale()}}else pt&&(Me==="right"&&(_r.domain=f(_r.domain,(pt+Ke/2)/ae.w)),Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale())}O.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",F?t(0,Math.round(ae.h*(1-_r.domain[1]))):t(Math.round(ae.w*_r.domain[0]),0)),Je.attr("transform",F?t(0,Math.round(-ae.t)):t(Math.round(-ae.l),0));var Rr=O.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(_e);Rr.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Rr.exit().remove();var Qr=Se.map(_r.c2p).map(Math.round).sort(function(un,Xa){return un-Xa});Rr.each(function(un,Xa){var ja=[Xa===0?Se[0]:(_e[Xa]+_e[Xa-1])/2,Xa===_e.length-1?Se[1]:(_e[Xa]+_e[Xa+1])/2].map(_r.c2p).map(Math.round);F&&(ja[1]=e.constrain(ja[1]+(ja[1]>ja[0])?1:-1,Qr[0],Qr[1]));var Nn=p.select(this).attr(F?"x":"y",yt).attr(F?"y":"x",p.min(ja)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(p.max(ja)-p.min(ja),2));if(D._fillgradient)a.gradient(Nn,B,D._id,F?"vertical":"horizontalreversed",D._fillgradient,"fill");else{var yn=Ve(un).replace("e-","");Nn.attr("fill",o.hexString(yn))}});var Zr=O.select("."+C.cblines).selectAll("path."+C.cbline).data(xe.color&&xe.width?ce:[]);Zr.enter().append("path").classed(C.cbline,!0),Zr.exit().remove(),Zr.each(function(un){var Xa=yt,ja=Math.round(_r.c2p(un))+xe.width/2%1;p.select(this).attr("d","M"+(F?Xa+","+ja:ja+","+Xa)+(F?"h":"v")+ve).call(a.lineGroupStyle,xe.width,Ie(un),xe.dash)}),Je.selectAll("g."+_r._id+"tick,path").remove();var ha=yt+ve+(Q||0)/2-(D.ticks==="outside"?1:0),Pa=k.calcTicks(_r),La=k.getTickSigns(_r)[2];return k.drawTicks(B,_r,{vals:_r.ticks==="inside"?k.clipEnds(_r,Pa):Pa,layer:Je,path:k.makeTickPath(_r,ha,La),transFn:k.makeTransTickFn(_r)}),k.drawLabels(B,_r,{vals:Pa,layer:Je,transFn:k.makeTransTickLabelFn(_r),labelFns:k.makeLabelFns(_r,ha)})}function Ht(){var Sr,Kr=ve+Q/2;We.indexOf("inside")===-1&&(Sr=a.bBox(Je.node()),Kr+=F?Sr.width:Sr.height),et=Ne.select("text");var Yt=0,Rt=F&&Me==="top",nr=!F&&Me==="right",ur=0;if(et.node()&&!et.classed(C.jsPlaceholder)){var cr,Rr=Ne.select(".h"+_r._id+"title-math-group").node();Rr&&(F&&Xt||!F&&!Xt)?(Sr=a.bBox(Rr),Yt=Sr.width,cr=Sr.height):(Sr=a.bBox(Ne.node()),Yt=Sr.right-ae.l-(F?yt:rr),cr=Sr.bottom-ae.t-(F?rr:yt),!F&&Me==="top"&&(Kr+=Sr.height,ur=Sr.height)),nr&&(et.attr("transform",t(Yt/2+Ke/2,0)),Yt*=2),Kr=Math.max(Kr,F?Yt:cr)}var Qr=(F?X:K)*2+Kr+re+Q/2,Zr=0;!F&&we.text&&G==="bottom"&&Y<=0&&(Zr=Qr/2,Qr+=Zr,ur+=Zr),ee._hColorbarMoveTitle=Zr,ee._hColorbarMoveCBTitle=ur;var ha=re+Q,Pa=(F?yt:rr)-ha/2-(F?X:0),La=(F?rr:yt)-(F?Ae:K+ur-Zr);O.select("."+C.cbbg).attr("x",Pa).attr("y",La).attr(F?"width":"height",Math.max(Qr-Zr,2)).attr(F?"height":"width",Math.max(Ae+ha,2)).call(o.fill,ne).call(o.stroke,D.bordercolor).style("stroke-width",re);var un=nr?Math.max(Yt-10,0):0;O.selectAll("."+C.cboutline).attr("x",(F?yt:rr+X)+un).attr("y",(F?rr+K-Ae:yt)+(Rt?Mt:0)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(Ae-(F?2*K+Mt:2*X+un),2)).call(o.stroke,D.outlinecolor).style({fill:"none","stroke-width":Q});var Xa=F?gt*Qr:0,ja=F?0:(1-Tt)*Qr-ur;if(Xa=Z?ae.l-Xa:-Xa,ja=q?ae.t-ja:-ja,O.attr("transform",t(Xa,ja)),!F&&(re||o.opacity(ne)&&!o.equals(ee.paper_bgcolor,ne))){var Nn=Je.selectAll("text"),yn=Nn[0].length,Un=O.select("."+C.cbbg).node(),li=a.bBox(Un),Yn=a.getTranslate(O),on=2;Nn.each(function(Tr,Ir){var Dr=0,ot=yn-1;if(Ir===Dr||Ir===ot){var kt=a.bBox(this),jt=a.getTranslate(this),ar;if(Ir===ot){var Er=kt.right+jt.x,xr=li.right+Yn.x+rr-re-on+H;ar=xr-Er,ar>0&&(ar=0)}else if(Ir===Dr){var zr=kt.left+jt.x,Lr=li.left+Yn.x+rr+re+on;ar=Lr-zr,ar<0&&(ar=0)}ar&&(yn<3?this.setAttribute("transform","translate("+ar+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var en={},vi=S[se],Yi=M[se],Ja=S[G],Oa=M[G],lt=Qr-ve;F?(j==="pixels"?(en.y=Y,en.t=Ae*Ja,en.b=Ae*Oa):(en.t=en.b=0,en.yt=Y+P*Ja,en.yb=Y-P*Oa),$==="pixels"?(en.x=H,en.l=Qr*vi,en.r=Qr*Yi):(en.l=lt*vi,en.r=lt*Yi,en.xl=H-U*vi,en.xr=H+U*Yi)):(j==="pixels"?(en.x=H,en.l=Ae*vi,en.r=Ae*Yi):(en.l=en.r=0,en.xl=H+P*vi,en.xr=H-P*Yi),$==="pixels"?(en.y=1-Y,en.t=Qr*Ja,en.b=Qr*Oa):(en.t=lt*Ja,en.b=lt*Oa,en.yt=Y-U*Ja,en.yb=Y+U*Oa));var rt=D.y<.5?"b":"t",fr=D.x<.5?"l":"r";B._fullLayout._reservedMargin[D._id]={};var lr={r:ee.width-Pa-Xa,l:Pa+en.r,b:ee.height-La-ja,t:La+en.b};Z&&q?b.autoMargin(B,D._id,en):Z?B._fullLayout._reservedMargin[D._id][rt]=lr[rt]:q||F?B._fullLayout._reservedMargin[D._id][fr]=lr[fr]:B._fullLayout._reservedMargin[D._id][rt]=lr[rt]}return e.syncOrAsync([b.previousPromises,Ct,Vt,qt,b.previousPromises,Ht],B)}function x(O,D,B){var F=D.orientation==="v",P=B._fullLayout,j=P._size,U,$,Q;l.init({element:O.node(),gd:B,prepFn:function(){U=O.attr("transform"),r(O)},moveFn:function(re,ne){O.attr("transform",U+t(re,ne)),$=l.align((F?D._uFrac:D._vFrac)+re/j.w,F?D._thickFrac:D._lenFrac,0,1,D.xanchor),Q=l.align((F?D._vFrac:1-D._uFrac)-ne/j.h,F?D._lenFrac:D._thickFrac,0,1,D.yanchor);var se=l.getCursor($,Q,D.xanchor,D.yanchor);r(O,se)},doneFn:function(){if(r(O),$!==void 0&&Q!==void 0){var re={};re[D._propPrefix+"x"]=$,re[D._propPrefix+"y"]=Q,D._traceIndex!==void 0?E.call("_guiRestyle",B,re,D._traceIndex):E.call("_guiRelayout",B,re)}}})}function z(O,D,B){var F=D._levels,P=[],j=[],U,$,Q=F.end+F.size/100,re=F.size,ne=1.001*B[0]-.001*B[1],se=1.001*B[1]-.001*B[0];for($=0;$<1e5&&(U=F.start+$*re,!(re>0?U>=Q:U<=Q));$++)U>ne&&U0?U>=Q:U<=Q));$++)U>B[0]&&U-1}V.exports=function(n,r){var a,o=n.data,s=n.layout,c=k([],o),m=k({},s,l(r.tileClass)),h=n._context||{};if(r.width&&(m.width=r.width),r.height&&(m.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){m.annotations=[];var v=Object.keys(m);for(a=0;a=0)return h}else if(typeof h=="string"&&(h=h.trim(),h.slice(-1)==="%"&&p(h.slice(0,-1))&&(h=+h.slice(0,-1),h>=0)))return h+"%"}function m(h,v,g,i,w,S){S=S||{};var M=S.moduleHasSelected!==!1,C=S.moduleHasUnselected!==!1,_=S.moduleHasConstrain!==!1,T=S.moduleHasCliponaxis!==!1,f=S.moduleHasTextangle!==!1,u=S.moduleHasInsideanchor!==!1,A=!!S.hasPathbar,x=Array.isArray(w)||w==="auto",z=x||w==="inside",I=x||w==="outside";if(z||I){var O=a(i,"textfont",g.font),D=b.extendFlat({},O),B=h.textfont&&h.textfont.color,F=!B;if(F&&delete D.color,a(i,"insidetextfont",D),A){var P=b.extendFlat({},O);F&&delete P.color,a(i,"pathbar.textfont",P)}I&&a(i,"outsidetextfont",O),M&&i("selected.textfont.color"),C&&i("unselected.textfont.color"),_&&i("constraintext"),T&&i("cliponaxis"),f&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}z&&u&&i("insidetextanchor")}V.exports={supplyDefaults:o,crossTraceDefaults:s,handleText:m,validateCornerradius:c}}}),j5=ze({"src/traces/bar/layout_defaults.js"(J,V){"use strict";var p=mi(),b=Gi(),E=Nr(),k=Qx(),l=qh().validateCornerradius;V.exports=function(e,t,n){function r(M,C){return E.coerce(e,t,k,M,C)}for(var a=!1,o=!1,s=!1,c={},m=r("barmode"),h=m==="group",v=0;v0&&!c[i]&&(s=!0),c[i]=!0),g.visible&&g.type==="histogram"){var w=b.getFromId({_fullLayout:t},g[g.orientation==="v"?"xaxis":"yaxis"]);w.type!=="category"&&(o=!0)}}if(!a){delete t.barmode;return}m!=="overlay"&&r("barnorm"),r("bargap",o&&!s?0:.2),r("bargroupgap");var S=r("barcornerradius");t.barcornerradius=l(S)}}}),x1=ze({"src/traces/bar/arrays_to_calcdata.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){for(var l=0;lt;if(!n)return k}return l!==void 0?l:E.dflt},J.coerceColor=function(E,k,l){return V.isValid(k)?k:l!==void 0?l:E.dflt},J.coerceEnumerated=function(E,k,l){return E.coerceNumber&&(k=+k),E.values.indexOf(k)!==-1?k:l!==void 0?l:E.dflt},J.getValue=function(E,k){var l;return b(E)?k1||A.bargap===0&&A.bargroupgap===0&&!x[0].trace.marker.line.width)&&p.select(this).attr("shape-rendering","crispEdges")}),f.selectAll("g.points").each(function(x){var z=p.select(this),I=x[0].trace;c(z,I,T)}),l.getComponentMethod("errorbars","style")(f)}function c(T,f,u){E.pointStyle(T.selectAll("path"),f,u),m(T,f,u)}function m(T,f,u){T.selectAll("text").each(function(A){var x=p.select(this),z=k.ensureUniformFontSize(u,i(x,A,f,u));E.font(x,z)})}function h(T,f,u){var A=f[0].trace;A.selectedpoints?v(u,A,T):(c(u,A,T),l.getComponentMethod("errorbars","style")(u))}function v(T,f,u){E.selectedPointStyle(T.selectAll("path"),f),g(T.selectAll("text"),f,u)}function g(T,f,u){T.each(function(A){var x=p.select(this),z;if(A.selected){z=k.ensureUniformFontSize(u,i(x,A,f,u));var I=f.selected.textfont&&f.selected.textfont.color;I&&(z.color=I),E.font(x,z)}else E.selectedTextStyle(x,f)})}function i(T,f,u,A){var x=A._fullLayout.font,z=u.textfont;if(T.classed("bartext-inside")){var I=_(f,u);z=S(u,f.i,x,I)}else T.classed("bartext-outside")&&(z=M(u,f.i,x));return z}function w(T,f,u){return C(n,T.textfont,f,u)}function S(T,f,u,A){var x=w(T,f,u),z=T._input.textfont===void 0||T._input.textfont.color===void 0||Array.isArray(T.textfont.color)&&T.textfont.color[f]===void 0;return z&&(x={color:b.contrast(A),family:x.family,size:x.size,weight:x.weight,style:x.style,variant:x.variant,textcase:x.textcase,lineposition:x.lineposition,shadow:x.shadow}),C(r,T.insidetextfont,f,x)}function M(T,f,u){var A=w(T,f,u);return C(a,T.outsidetextfont,f,A)}function C(T,f,u,A){f=f||{};var x=o.getValue(f.family,u),z=o.getValue(f.size,u),I=o.getValue(f.color,u),O=o.getValue(f.weight,u),D=o.getValue(f.style,u),B=o.getValue(f.variant,u),F=o.getValue(f.textcase,u),P=o.getValue(f.lineposition,u),j=o.getValue(f.shadow,u);return{family:o.coerceString(T.family,x,A.family),size:o.coerceNumber(T.size,z,A.size),color:o.coerceColor(T.color,I,A.color),weight:o.coerceString(T.weight,O,A.weight),style:o.coerceString(T.style,D,A.style),variant:o.coerceString(T.variant,B,A.variant),textcase:o.coerceString(T.variant,F,A.textcase),lineposition:o.coerceString(T.variant,P,A.lineposition),shadow:o.coerceString(T.variant,j,A.shadow)}}function _(T,f){return f.type==="waterfall"?f[T.dir].marker.color:T.mcc||T.mc||f.marker.color}V.exports={style:s,styleTextPoints:m,styleOnSelect:h,getInsideTextFont:S,getOutsideTextFont:M,getBarColor:_,resizeText:e}}}),Xv=ze({"src/traces/bar/plot.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=Cs(),l=Qn(),e=$i(),t=mi(),n=Gi().tickText,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=ld(),c=tb(),m=hv(),h=jd(),v=h.text,g=h.textposition,i=kh().appendArrayPointValue,w=m.TEXTPAD;function S(re){return re.id}function M(re){if(re.ids)return S}function C(re){return(re>0)-(re<0)}function _(re,ne){return re0}function A(re,ne,se,G,X,K){var H=ne.xaxis,Y=ne.yaxis,q=re._fullLayout,Z=re._context.staticPlot;X||(X={mode:q.barmode,norm:q.barmode,gap:q.bargap,groupgap:q.bargroupgap},o("bar",q));var ee=E.makeTraceGroups(G,se,"trace bars").each(function(ae){var he=p.select(this),xe=ae[0].trace,we=ae[0].t,Me=xe.type==="waterfall",Se=xe.type==="funnel",Ie=xe.type==="histogram",Ve=xe.type==="bar",Ge=Ve||Se,ke=0;Me&&xe.connector.visible&&xe.connector.mode==="between"&&(ke=xe.connector.line.width/2);var _e=xe.orientation==="h",ce=u(X),ve=E.ensureSingle(he,"g","points"),le=M(xe),Ae=ve.selectAll("g.point").data(E.identity,le);Ae.enter().append("g").classed("point",!0),Ae.exit().remove(),Ae.each(function(Xe,Ye){var yt=p.select(this),gt=T(Xe,H,Y,_e),Tt=gt[0][0],At=gt[0][1],$t=gt[1][0],rr=gt[1][1],_r=(_e?At-Tt:rr-$t)===0;_r&&Ge&&c.getLineWidth(xe,Xe)&&(_r=!1),_r||(_r=!b(Tt)||!b(At)||!b($t)||!b(rr)),Xe.isBlank=_r,_r&&(_e?At=Tt:rr=$t),ke&&!_r&&(_e?(Tt-=_(Tt,At)*ke,At+=_(Tt,At)*ke):($t-=_($t,rr)*ke,rr+=_($t,rr)*ke));var Xt,or;if(xe.type==="waterfall"){if(!_r){var Ot=xe[Xe.dir].marker;Xt=Ot.line.width,or=Ot.color}}else Xt=c.getLineWidth(xe,Xe),or=Xe.mc||xe.marker.color;function vt(Zr){var ha=p.round(Xt/2%1,2);return X.gap===0&&X.groupgap===0?p.round(Math.round(Zr)-ha,2):Zr}function ht(Zr,ha,Pa){return Pa&&Zr===ha?Zr:Math.abs(Zr-ha)>=2?vt(Zr):Zr>ha?Math.ceil(Zr):Math.floor(Zr)}var De=l.opacity(or),Ne=De<1||Xt>.01?vt:ht;re._context.staticPlot||(Tt=Ne(Tt,At,_e),At=Ne(At,Tt,_e),$t=Ne($t,rr,!_e),rr=Ne(rr,$t,!_e));var We=_e?H.c2p:Y.c2p,Ke;Xe.s0>0?Ke=Xe._sMax:Xe.s0<0?Ke=Xe._sMin:Ke=Xe.s1>0?Xe._sMax:Xe._sMin;function Je(Zr,ha){if(!Zr)return 0;var Pa=Math.abs(_e?rr-$t:At-Tt),La=Math.abs(_e?At-Tt:rr-$t),un=Ne(Math.abs(We(Ke,!0)-We(0,!0))),Xa=Xe.hasB?Math.min(Pa/2,La/2):Math.min(Pa/2,un),ja;if(ha==="%"){var Nn=Math.min(50,Zr);ja=Pa*(Nn/100)}else ja=Zr;return Ne(Math.max(Math.min(ja,Xa),0))}var et=Ve||Ie?Je(we.cornerradiusvalue,we.cornerradiusform):0,Mt,pt,Pt="M"+Tt+","+$t+"V"+rr+"H"+At+"V"+$t+"Z",Ct=0;if(et&&Xe.s){var qt=C(Xe.s0)===0||C(Xe.s)===C(Xe.s0)?Xe.s1:Xe.s0;if(Ct=Ne(Xe.hasB?0:Math.abs(We(Ke,!0)-We(qt,!0))),Ct0?Math.sqrt(Ct*(2*et-Ct)):0,Rt=Vt>0?Math.max:Math.min;Mt="M"+Tt+","+$t+"V"+(rr-Kr*Ht)+"H"+Rt(At-(et-Ct)*Vt,Tt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht-Yt)+"V"+($t+et*Ht+Yt)+"A "+et+","+et+" 0 0 "+Sr+" "+Rt(At-(et-Ct)*Vt,Tt)+","+($t+Kr*Ht)+"Z"}else if(Xe.hasB)Mt="M"+(Tt+et*Vt)+","+$t+"A "+et+","+et+" 0 0 "+Sr+" "+Tt+","+($t+et*Ht)+"V"+(rr-et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt)+","+rr+"H"+(At-et*Vt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht)+"V"+($t+et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-et*Vt)+","+$t+"Z";else{pt=Math.abs(rr-$t)+Ct;var nr=pt0?Math.sqrt(Ct*(2*et-Ct)):0,cr=Ht>0?Math.max:Math.min;Mt="M"+(Tt+nr*Vt)+","+$t+"V"+cr(rr-(et-Ct)*Ht,$t)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt-ur)+","+rr+"H"+(At-et*Vt+ur)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-nr*Vt)+","+cr(rr-(et-Ct)*Ht,$t)+"V"+$t+"Z"}}else Mt=Pt}else Mt=Pt;var Rr=f(E.ensureSingle(yt,"path"),q,X,K);if(Rr.style("vector-effect",Z?"none":"non-scaling-stroke").attr("d",isNaN((At-Tt)*(rr-$t))||_r&&re._context.staticPlot?"M0,0Z":Mt).call(e.setClipUrl,ne.layerClipId,re),!q.uniformtext.mode&&ce){var Qr=e.makePointStyleFns(xe);e.singlePointStyle(Xe,Rr,xe,Qr,re)}x(re,ne,yt,ae,Ye,Tt,At,$t,rr,et,Ct,X,K),ne.layerClipId&&e.hideOutsideRangePoint(Xe,yt.select("text"),H,Y,xe.xcalendar,xe.ycalendar)});var Be=xe.cliponaxis===!1;e.setClipUrl(he,Be?null:ne.layerClipId,re)});t.getComponentMethod("errorbars","plot")(re,ee,ne,X)}function x(re,ne,se,G,X,K,H,Y,q,Z,ee,ae,he){var xe=ne.xaxis,we=ne.yaxis,Me=re._fullLayout,Se;function Ie(Pt,Ct,qt){var Vt=E.ensureSingle(Pt,"text").text(Ct).attr({class:"bartext bartext-"+Se,"text-anchor":"middle","data-notex":1}).call(e.font,qt).call(k.convertToTspans,re);return Vt}var Ve=G[0].trace,Ge=Ve.orientation==="h",ke=U(G,Ge,xe,we),_e=P(Me,G,X,xe,we);Se=j(Ve,X);var ce=ae.mode==="stack"||ae.mode==="relative",ve=G[X],le=!ce||ve._outmost,Ae=ve.hasB,Be=Z&&Z-ee>w;if(!_e||Se==="none"||(ve.isBlank||K===H||Y===q)&&(Se==="auto"||Se==="inside")){se.select("text").remove();return}var Xe=Me.font,Ye=s.getBarColor(G[X],Ve),yt=s.getInsideTextFont(Ve,X,Xe,Ye),gt=s.getOutsideTextFont(Ve,X,Xe),Tt=Ve.insidetextanchor||"end",At=se.datum();Ge?xe.type==="log"&&At.s0<=0&&(xe.range[0]0&&ht>0,We;Be?Ae?We=z(_r-2*Z,Xt,vt,ht,Ge)||z(_r,Xt-2*Z,vt,ht,Ge):Ge?We=z(_r-(Z-ee),Xt,vt,ht,Ge)||z(_r,Xt-2*(Z-ee),vt,ht,Ge):We=z(_r,Xt-(Z-ee),vt,ht,Ge)||z(_r-2*(Z-ee),Xt,vt,ht,Ge):We=z(_r,Xt,vt,ht,Ge),Ne&&We?Se="inside":(Se="outside",or.remove(),or=null)}else Se="inside";if(!or){De=E.ensureUniformFontSize(re,Se==="outside"?gt:yt),or=Ie(se,_e,De);var Ke=or.attr("transform");if(or.attr("transform",""),Ot=e.bBox(or.node()),vt=Ot.width,ht=Ot.height,or.attr("transform",Ke),vt<=0||ht<=0){or.remove();return}}var Je=Ve.textangle,et,Mt;Se==="outside"?(Mt=Ve.constraintext==="both"||Ve.constraintext==="outside",et=F(K,H,Y,q,Ot,{isHorizontal:Ge,constrained:Mt,angle:Je,zeroBarDir:ke})):(Mt=Ve.constraintext==="both"||Ve.constraintext==="inside",et=D(K,H,Y,q,Ot,{isHorizontal:Ge,constrained:Mt,angle:Je,anchor:Tt,hasB:Ae,r:Z,overhead:ee})),et.fontSize=De.size,a(Ve.type==="histogram"?"bar":Ve.type,et,Me),ve.transform=et;var pt=f(or,Me,ae,he);E.setTransormAndDisplay(pt,et)}function z(re,ne,se,G,X){if(re<0||ne<0)return!1;var K=se<=re&&G<=ne,H=se<=ne&&G<=re,Y=X?re>=se*(ne/G):ne>=G*(re/se);return K||H||Y}function I(re){return re==="auto"?0:re}function O(re,ne){var se=Math.PI/180*ne,G=Math.abs(Math.sin(se)),X=Math.abs(Math.cos(se));return{x:re.width*X+re.height*G,y:re.width*G+re.height*X}}function D(re,ne,se,G,X,K){var H=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,Z=K.anchor,ee=Z==="end",ae=Z==="start",he=K.leftToRight||0,xe=(he+1)/2,we=1-xe,Me=K.hasB,Se=K.r,Ie=K.overhead,Ve=X.width,Ge=X.height,ke=Math.abs(ne-re),_e=Math.abs(G-se),ce=ke>2*w&&_e>2*w?w:0;ke-=2*ce,_e-=2*ce;var ve=I(q);q==="auto"&&!(Ve<=ke&&Ge<=_e)&&(Ve>ke||Ge>_e)&&(!(Ve>_e||Ge>ke)||Vew){var Xe=B(re,ne,se,G,le,Se,Ie,H,Me);Ae=Xe.scale,Be=Xe.pad}else Ae=1,Y&&(Ae=Math.min(1,ke/le.x,_e/le.y)),Be=0;var Ye=X.left*we+X.right*xe,yt=(X.top+X.bottom)/2,gt=(re+w)*we+(ne-w)*xe,Tt=(se+G)/2,At=0,$t=0;if(ae||ee){var rr=(H?le.x:le.y)/2;Se&&(ee||Me)&&(ce+=Be);var _r=H?_(re,ne):_(se,G);H?ae?(gt=re+_r*ce,At=-_r*rr):(gt=ne-_r*ce,At=_r*rr):ae?(Tt=se+_r*ce,$t=-_r*rr):(Tt=G-_r*ce,$t=_r*rr)}return{textX:Ye,textY:yt,targetX:gt,targetY:Tt,anchorX:At,anchorY:$t,scale:Ae,rotate:ve}}function B(re,ne,se,G,X,K,H,Y,q){var Z=Math.max(0,Math.abs(ne-re)-2*w),ee=Math.max(0,Math.abs(G-se)-2*w),ae=K-w,he=H?ae-Math.sqrt(ae*ae-(ae-H)*(ae-H)):ae,xe=q?ae*2:Y?ae-H:2*he,we=q?ae*2:Y?2*he:ae-H,Me,Se,Ie,Ve,Ge;return X.y/X.x>=ee/(Z-xe)?Ve=ee/X.y:X.y/X.x<=(ee-we)/Z?Ve=Z/X.x:!q&&Y?(Me=X.x*X.x+X.y*X.y/4,Se=-2*X.x*(Z-ae)-X.y*(ee/2-ae),Ie=(Z-ae)*(Z-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):q?(Me=(X.x*X.x+X.y*X.y)/4,Se=-X.x*(Z/2-ae)-X.y*(ee/2-ae),Ie=(Z/2-ae)*(Z/2-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):(Me=X.x*X.x/4+X.y*X.y,Se=-X.x*(Z/2-ae)-2*X.y*(ee-ae),Ie=(Z/2-ae)*(Z/2-ae)+(ee-ae)*(ee-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)),Ve=Math.min(1,Ve),Y?Ge=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(ee-X.y*Ve)/2)*(ae-(ee-X.y*Ve)/2)))-H):Ge=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(Z-X.x*Ve)/2)*(ae-(Z-X.x*Ve)/2)))-H),{scale:Ve,pad:Ge}}function F(re,ne,se,G,X,K){var H=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,Z=X.width,ee=X.height,ae=Math.abs(ne-re),he=Math.abs(G-se),xe;H?xe=he>2*w?w:0:xe=ae>2*w?w:0;var we=1;Y&&(we=H?Math.min(1,he/ee):Math.min(1,ae/Z));var Me=I(q),Se=O(X,Me),Ie=(H?Se.x:Se.y)/2,Ve=(X.left+X.right)/2,Ge=(X.top+X.bottom)/2,ke=(re+ne)/2,_e=(se+G)/2,ce=0,ve=0,le;return(H?re===ne:se===G)&&K.zeroBarDir?le=K.zeroBarDir:le=H?_(ne,re):_(se,G),H?(ke=ne-le*xe,ce=le*Ie):(_e=G+le*xe,ve=-le*Ie),{textX:Ve,textY:Ge,targetX:ke,targetY:_e,anchorX:ce,anchorY:ve,scale:we,rotate:Me}}function P(re,ne,se,G,X){var K=ne[0].trace,H=K.texttemplate,Y;return H?Y=$(re,ne,se,G,X):K.textinfo?Y=Q(ne,se,G,X):Y=c.getValue(K.text,se),c.coerceString(v,Y)}function j(re,ne){var se=c.getValue(re.textposition,ne);return c.coerceEnumerated(g,se)}function U(re,ne,se,G){for(var X=!1,K=!1,H=0;H0?X=!0:Y<0&&(K=!0),X&&K)return 0}var q=ne?se:G,Z=-_(q.range[0],q.range[1]);return K?X?0:-Z:Z}function $(re,ne,se,G,X){var K=ne[0].trace,H=E.castOption(K,se,"texttemplate");if(!H)return"";var Y=K.type==="histogram",q=K.type==="waterfall",Z=K.type==="funnel",ee=K.orientation==="h",ae,he,xe,we;ee?(ae="y",he=X,xe="x",we=G):(ae="x",he=G,xe="y",we=X);function Me(ce){return n(he,he.c2l(ce),!0).text}function Se(ce){return n(we,we.c2l(ce),!0).text}var Ie=ne[se],Ve={};Ve.label=Ie.p,Ve.labelLabel=Ve[ae+"Label"]=Me(Ie.p);var Ge=E.castOption(K,Ie.i,"text");(Ge===0||Ge)&&(Ve.text=Ge),Ve.value=Ie.s,Ve.valueLabel=Ve[xe+"Label"]=Se(Ie.s);var ke={};i(ke,K,Ie.i),(Y||ke.x===void 0)&&(ke.x=ee?Ve.value:Ve.label),(Y||ke.y===void 0)&&(ke.y=ee?Ve.label:Ve.value),(Y||ke.xLabel===void 0)&&(ke.xLabel=ee?Ve.valueLabel:Ve.labelLabel),(Y||ke.yLabel===void 0)&&(ke.yLabel=ee?Ve.labelLabel:Ve.valueLabel),q&&(Ve.delta=+Ie.rawS||Ie.s,Ve.deltaLabel=Se(Ve.delta),Ve.final=Ie.v,Ve.finalLabel=Se(Ve.final),Ve.initial=Ve.final-Ve.delta,Ve.initialLabel=Se(Ve.initial)),Z&&(Ve.value=Ie.s,Ve.valueLabel=Se(Ve.value),Ve.percentInitial=Ie.begR,Ve.percentInitialLabel=E.formatPercent(Ie.begR),Ve.percentPrevious=Ie.difR,Ve.percentPreviousLabel=E.formatPercent(Ie.difR),Ve.percentTotal=Ie.sumR,Ve.percenTotalLabel=E.formatPercent(Ie.sumR));var _e=E.castOption(K,Ie.i,"customdata");return _e&&(Ve.customdata=_e),E.texttemplateString({data:[ke,Ve,K._meta],fallback:K.texttemplatefallback,labels:Ve,locale:re._d3locale,template:H})}function Q(re,ne,se,G){var X=re[0].trace,K=X.orientation==="h",H=X.type==="waterfall",Y=X.type==="funnel";function q(_e){var ce=K?G:se;return n(ce,_e,!0).text}function Z(_e){var ce=K?se:G;return n(ce,+_e,!0).text}var ee=X.textinfo,ae=re[ne],he=ee.split("+"),xe=[],we,Me=function(_e){return he.indexOf(_e)!==-1};if(Me("label")&&xe.push(q(re[ne].p)),Me("text")&&(we=E.castOption(X,ae.i,"text"),(we===0||we)&&xe.push(we)),H){var Se=+ae.rawS||ae.s,Ie=ae.v,Ve=Ie-Se;Me("initial")&&xe.push(Z(Ve)),Me("delta")&&xe.push(Z(Se)),Me("final")&&xe.push(Z(Ie))}if(Y){Me("value")&&xe.push(Z(ae.s));var Ge=0;Me("percent initial")&&Ge++,Me("percent previous")&&Ge++,Me("percent total")&&Ge++;var ke=Ge>1;Me("percent initial")&&(we=E.formatPercent(ae.begR),ke&&(we+=" of initial"),xe.push(we)),Me("percent previous")&&(we=E.formatPercent(ae.difR),ke&&(we+=" of previous"),xe.push(we)),Me("percent total")&&(we=E.formatPercent(ae.sumR),ke&&(we+=" of total"),xe.push(we))}return xe.join("
")}V.exports={plot:A,toMoveInsideBar:D}}}),eg=ze({"src/traces/bar/hover.js"(J,V){"use strict";var p=Zl(),b=mi(),E=Qn(),k=Nr().fillText,l=tb().getLineWidth,e=Gi().hoverLabelText,t=No().BADNUM;function n(o,s,c,m,h){var v=r(o,s,c,m,h);if(v){var g=v.cd,i=g[0].trace,w=g[v.index];return v.color=a(i,w),b.getComponentMethod("errorbars","hoverInfo")(w,i,v),[v]}}function r(o,s,c,m,h){var v=o.cd,g=v[0].trace,i=v[0].t,w=m==="closest",S=g.type==="waterfall",M=o.maxHoverDistance,C=o.maxSpikeDistance,_,T,f,u,A,x,z;g.orientation==="h"?(_=c,T=s,f="y",u="x",A=se,x=Q):(_=s,T=c,f="x",u="y",x=se,A=Q);var I=g[f+"period"],O=w||I;function D(xe){return F(xe,-1)}function B(xe){return F(xe,1)}function F(xe,we){var Me=xe.w;return xe[f]+we*Me/2}function P(xe){return xe[f+"End"]-xe[f+"Start"]}var j=w?D:I?function(xe){return xe.p-P(xe)/2}:function(xe){return Math.min(D(xe),xe.p-i.bardelta/2)},U=w?B:I?function(xe){return xe.p+P(xe)/2}:function(xe){return Math.max(B(xe),xe.p+i.bardelta/2)};function $(xe,we,Me){return h.finiteRange&&(Me=0),p.inbox(xe-_,we-_,Me+Math.min(1,Math.abs(we-xe)/z)-1)}function Q(xe){return $(j(xe),U(xe),M)}function re(xe){return $(D(xe),B(xe),C)}function ne(xe){var we=xe[u];if(S){var Me=Math.abs(xe.rawS)||0;T>0?we+=Me:T<0&&(we-=Me)}return we}function se(xe){var we=T,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,M+(Se-we)/(Se-Me)-1)}function G(xe){var we=T,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,C+(Se-we)/(Se-Me)-1)}var X=o[f+"a"],K=o[u+"a"];z=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function H(xe){return(A(xe)+x(xe))/2}var Y=p.getDistanceFunction(m,A,x,H);if(p.getClosest(v,Y,o),o.index!==!1&&v[o.index].p!==t){O||(j=function(xe){return Math.min(D(xe),xe.p-i.bargroupwidth/2)},U=function(xe){return Math.max(B(xe),xe.p+i.bargroupwidth/2)});var q=o.index,Z=v[q],ee=g.base?Z.b+Z.s:Z.s;o[u+"0"]=o[u+"1"]=K.c2p(Z[u],!0),o[u+"LabelVal"]=ee;var ae=i.extents[i.extents.round(Z.p)];o[f+"0"]=X.c2p(w?j(Z):ae[0],!0),o[f+"1"]=X.c2p(w?U(Z):ae[1],!0);var he=Z.orig_p!==void 0;return o[f+"LabelVal"]=he?Z.orig_p:Z.p,o.labelLabel=e(X,o[f+"LabelVal"],g[f+"hoverformat"]),o.valueLabel=e(K,o[u+"LabelVal"],g[u+"hoverformat"]),o.baseLabel=e(K,Z.b,g[u+"hoverformat"]),o.spikeDistance=(G(Z)+re(Z))/2,o[f+"Spike"]=X.c2p(Z.p,!0),k(Z,g,o),o.hovertemplate=g.hovertemplate,o}}function a(o,s){var c=s.mcc||o.marker.color,m=s.mlcc||o.marker.line.color,h=l(o,s);if(E.opacity(c))return c;if(E.opacity(m)&&h)return m}V.exports={hoverPoints:n,hoverOnBars:r,getTraceColor:a}}}),PF=ze({"src/traces/bar/event_data.js"(J,V){"use strict";V.exports=function(b,E,k){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),k.orientation==="h"?(b.label=b.y,b.value=b.x):(b.label=b.x,b.value=b.y),b}}}),tg=ze({"src/traces/bar/select.js"(J,V){"use strict";V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=l[0].trace,r=n.type==="funnel",a=n.orientation==="h",o=[],s;if(k===!1)for(s=0;s0?(I="v",f>0?O=Math.min(A,u):O=Math.min(u)):f>0?(I="h",O=Math.min(A)):O=0;if(!O){c.visible=!1;return}c._length=O;var j=m("orientation",I);c._hasPreCompStats?j==="v"&&f===0?(m("x0",0),m("dx",1)):j==="h"&&T===0&&(m("y0",0),m("dy",1)):j==="v"&&f===0?m("x0"):j==="h"&&T===0&&m("y0");var U=b.getComponentMethod("calendars","handleTraceDefaults");U(s,c,["x","y"],h)}function a(s,c,m,h){var v=h.prefix,g=p.coerce2(s,c,t,"marker.outliercolor"),i=m("marker.line.outliercolor"),w="outliers";c._hasPreCompStats?w="all":(g||i)&&(w="suspectedoutliers");var S=m(v+"points",w);S?(m("jitter",S==="all"?.3:0),m("pointpos",S==="all"?-1.5:0),m("marker.symbol"),m("marker.opacity"),m("marker.size"),m("marker.angle"),m("marker.color",c.line.color),m("marker.line.color"),m("marker.line.width"),S==="suspectedoutliers"&&(m("marker.line.outliercolor",c.marker.color),m("marker.line.outlierwidth")),m("selected.marker.color"),m("unselected.marker.color"),m("selected.marker.size"),m("unselected.marker.size"),m("text"),m("hovertext")):delete c.marker;var M=m("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(m("hovertemplate"),m("hovertemplatefallback")),p.coerceSelectionMarkerOpacity(c,m)}function o(s,c){var m,h;function v(S){return p.coerce(h._input,h,t,S)}for(var g=0;gne.uf};if(C._hasPreCompStats){var q=C[O],Z=function(rr){return I.d2c((C[rr]||[])[x])},ee=1/0,ae=-1/0;for(x=0;x=ne.q1&&ne.q3>=ne.med){var xe=Z("lowerfence");ne.lf=xe!==l&&xe<=ne.q1?xe:h(ne,G,X);var we=Z("upperfence");ne.uf=we!==l&&we>=ne.q3?we:v(ne,G,X);var Me=Z("mean");ne.mean=Me!==l?Me:X?k.mean(G,X):(ne.q1+ne.q3)/2;var Se=Z("sd");ne.sd=Me!==l&&Se>=0?Se:X?k.stdev(G,X,ne.mean):ne.q3-ne.q1,ne.lo=g(ne),ne.uo=i(ne);var Ie=Z("notchspan");Ie=Ie!==l&&Ie>0?Ie:w(ne,X),ne.ln=ne.med-Ie,ne.un=ne.med+Ie;var Ve=ne.lf,Ge=ne.uf;C.boxpoints&&G.length&&(Ve=Math.min(Ve,G[0]),Ge=Math.max(Ge,G[X-1])),C.notched&&(Ve=Math.min(Ve,ne.ln),Ge=Math.max(Ge,ne.un)),ne.min=Ve,ne.max=Ge}else{k.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ne.q1,"median = "+ne.med,"q3 = "+ne.q3].join(` +`));var ke;ne.med!==l?ke=ne.med:ne.q1!==l?ne.q3!==l?ke=(ne.q1+ne.q3)/2:ke=ne.q1:ne.q3!==l?ke=ne.q3:ke=0,ne.med=ke,ne.q1=ne.q3=ke,ne.lf=ne.uf=ke,ne.mean=ne.sd=ke,ne.ln=ne.un=ke,ne.min=ne.max=ke}ee=Math.min(ee,ne.min),ae=Math.max(ae,ne.max),ne.pts2=se.filter(Y),u.push(ne)}}C._extremes[I._id]=b.findExtremes(I,[ee,ae],{padded:!0})}else{var _e=I.makeCalcdata(C,O),ce=n(Q,re),ve=Q.length,le=r(ve);for(x=0;x=0&&Ae0){if(ne={},ne.pos=ne[B]=Q[x],se=ne.pts=le[x].sort(c),G=ne[O]=se.map(m),X=G.length,ne.min=G[0],ne.max=G[X-1],ne.mean=k.mean(G,X),ne.sd=k.stdev(G,X,ne.mean)*C.sdmultiple,ne.med=k.interp(G,.5),X%2&&(yt||gt)){var Tt,At;yt?(Tt=G.slice(0,X/2),At=G.slice(X/2+1)):gt&&(Tt=G.slice(0,X/2+1),At=G.slice(X/2)),ne.q1=k.interp(Tt,.5),ne.q3=k.interp(At,.5)}else ne.q1=k.interp(G,.25),ne.q3=k.interp(G,.75);ne.lf=h(ne,G,X),ne.uf=v(ne,G,X),ne.lo=g(ne),ne.uo=i(ne);var $t=w(ne,X);ne.ln=ne.med-$t,ne.un=ne.med+$t,Be=Math.min(Be,ne.ln),Xe=Math.max(Xe,ne.un),ne.pts2=se.filter(Y),u.push(ne)}C.notched&&k.isTypedArray(_e)&&(_e=Array.from(_e)),C._extremes[I._id]=b.findExtremes(I,C.notched?_e.concat([Be,Xe]):_e,{padded:!0})}return s(u,C),u.length>0?(u[0].t={num:_[A],dPos:re,posLetter:B,valLetter:O,labels:{med:e(M,"median:"),min:e(M,"min:"),q1:e(M,"q1:"),q3:e(M,"q3:"),max:e(M,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?e(M,"mean \xB1 \u03C3:").replace("\u03C3",C.sdmultiple===1?"\u03C3":C.sdmultiple+"\u03C3"):e(M,"mean:"),lf:e(M,"lower fence:"),uf:e(M,"upper fence:")}},_[A]++,u):[{t:{empty:!0}}]};function t(S,M,C,_){var T=M in S,f=M+"0"in S,u="d"+M in S;if(T||f&&u){var A=C.makeCalcdata(S,M),x=E(S,C,M,A).vals;return[x,A]}var z;f?z=S[M+"0"]:"name"in S&&(C.type==="category"||p(S.name)&&["linear","log"].indexOf(C.type)!==-1||k.isDateTime(S.name)&&C.type==="date")?z=S.name:z=_;for(var I=C.type==="multicategory"?C.r2c_just_indices(z):C.d2c(z,0,S[M+"calendar"]),O=S._length,D=new Array(O),B=0;B1,f=1-s[t+"gap"],u=1-s[t+"groupgap"];for(h=0;h0;if(I==="positive"?(ne=O*(z?1:.5),X=G,se=X=B):I==="negative"?(ne=X=B,se=O*(z?1:.5),K=G):(ne=se=O,X=K=G),ae){var he=A.pointpos,xe=A.jitter,we=A.marker.size/2,Me=0;he+xe>=0&&(Me=G*(he+xe),Me>ne?(ee=!0,q=we,H=Me):Me>X&&(q=we,H=ne)),Me<=ne&&(H=ne);var Se=0;he-xe<=0&&(Se=-G*(he-xe),Se>se?(ee=!0,Z=we,Y=Se):Se>K&&(Z=we,Y=se)),Se<=se&&(Y=se)}else H=ne,Y=se;var Ie=new Array(g.length);for(v=0;vC.lo&&(j.so=!0)}return T});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(E.translatePoints,m,h)}function r(a,o,s,c){var m=o.val,h=o.pos,v=!!h.rangebreaks,g=c.bPos,i=c.bPosPxOffset||0,w=s.boxmean||(s.meanline||{}).visible,S,M;Array.isArray(c.bdPos)?(S=c.bdPos[0],M=c.bdPos[1]):(S=c.bdPos,M=c.bdPos);var C=a.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?b.identity:[]);C.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),C.exit().remove(),C.each(function(_){var T=h.c2l(_.pos+g,!0),f=h.l2p(T-S)+i,u=h.l2p(T+M)+i,A=v?(f+u)/2:h.l2p(T)+i,x=m.c2p(_.mean,!0),z=m.c2p(_.mean-_.sd,!0),I=m.c2p(_.mean+_.sd,!0);s.orientation==="h"?p.select(this).attr("d","M"+x+","+f+"V"+u+(w==="sd"?"m0,0L"+z+","+A+"L"+x+","+f+"L"+I+","+A+"Z":"")):p.select(this).attr("d","M"+f+","+x+"H"+u+(w==="sd"?"m0,0L"+A+","+z+"L"+f+","+x+"L"+A+","+I+"Z":""))})}V.exports={plot:e,plotBoxAndWhiskers:t,plotPoints:n,plotBoxMean:r}}}),ib=ze({"src/traces/box/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=$i();function k(e,t,n){var r=n||p.select(e).selectAll("g.trace.boxes");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var o=p.select(this),s=a[0].trace,c=s.line.width;function m(g,i,w,S){g.style("stroke-width",i+"px").call(b.stroke,w).call(b.fill,S)}var h=o.selectAll("path.box");if(s.type==="candlestick")h.each(function(g){if(!g.empty){var i=p.select(this),w=s[g.dir];m(i,w.line.width,w.line.color,w.fillcolor),i.style("opacity",s.selectedpoints&&!g.selected?.3:1)}});else{m(h,c,s.line.color,s.fillcolor),o.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(b.stroke,s.line.color);var v=o.selectAll("path.point");E.pointStyle(v,s,e)}})}function l(e,t,n){var r=t[0].trace,a=n.selectAll("path.point");r.selectedpoints?E.selectedPointStyle(a,r):E.pointStyle(a,r,e)}V.exports={style:k,styleOnSelect:l}}}),q5=ze({"src/traces/box/hover.js"(J,V){"use strict";var p=Gi(),b=Nr(),E=Zl(),k=Qn(),l=b.fillText;function e(r,a,o,s){var c=r.cd,m=c[0].trace,h=m.hoveron,v=[],g;return h.indexOf("boxes")!==-1&&(v=v.concat(t(r,a,o,s))),h.indexOf("points")!==-1&&(g=n(r,a,o)),s==="closest"?g?[g]:v:(g&&v.push(g),v)}function t(r,a,o,s){var c=r.cd,m=r.xa,h=r.ya,v=c[0].trace,g=c[0].t,i=v.type==="violin",w,S,M,C,_,T,f,u,A,x,z,I=g.bdPos,O,D,B=g.wHover,F=function(Se){return M.c2l(Se.pos)+g.bPos-M.c2l(T)};i&&v.side!=="both"?(v.side==="positive"&&(A=function(Se){var Ie=F(Se);return E.inbox(Ie,Ie+B,x)},O=I,D=0),v.side==="negative"&&(A=function(Se){var Ie=F(Se);return E.inbox(Ie-B,Ie,x)},O=0,D=I)):(A=function(Se){var Ie=F(Se);return E.inbox(Ie-B,Ie+B,x)},O=D=I);var P;i?P=function(Se){return E.inbox(Se.span[0]-_,Se.span[1]-_,x)}:P=function(Se){return E.inbox(Se.min-_,Se.max-_,x)},v.orientation==="h"?(_=a,T=o,f=P,u=A,w="y",M=h,S="x",C=m):(_=o,T=a,f=A,u=P,w="x",M=m,S="y",C=h);var j=Math.min(1,I/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));x=r.maxHoverDistance-j,z=r.maxSpikeDistance-j;function U(Se){return(f(Se)+u(Se))/2}var $=E.getDistanceFunction(s,f,u,U);if(E.getClosest(c,$,r),r.index===!1)return[];var Q=c[r.index],re=v.line.color,ne=(v.marker||{}).color;k.opacity(re)&&v.line.width?r.color=re:k.opacity(ne)&&v.boxpoints?r.color=ne:r.color=v.fillcolor,r[w+"0"]=M.c2p(Q.pos+g.bPos-D,!0),r[w+"1"]=M.c2p(Q.pos+g.bPos+O,!0),r[w+"LabelVal"]=Q.orig_p!==void 0?Q.orig_p:Q.pos;var se=w+"Spike";r.spikeDistance=U(Q)*z/x,r[se]=M.c2p(Q.pos,!0);var G=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,X=v.boxpoints||v.points,K=X&&G?["max","uf","q3","med","mean","q1","lf","min"]:X&&!G?["max","uf","q3","med","q1","lf","min"]:!X&&G?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],H=C.range[1]0&&(n=!0);for(var s=0;se){var t=e-k[b];return k[b]=e,t}}else return k[b]=e,e;return 0},max:function(b,E,k,l){var e=l[E];if(p(e))if(e=Number(e),p(k[b])){if(k[b]f&&fk){var x=u===b?1:6,z=u===b?"M12":"M1";return function(I,O){var D=g.c2d(I,b,i),B=D.indexOf("-",x);B>0&&(D=D.slice(0,B));var F=g.d2c(D,0,i);if(Ft?c>k?c>b*1.1?b:c>E*1.1?E:k:c>l?l:c>e?e:t:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function o(c,m,h,v,g,i){if(v&&c>k){var w=s(m,g,i),S=s(h,g,i),M=c===b?0:1;return w[M]!==S[M]}return Math.floor(h/c)-Math.floor(m/c)>.1}function s(c,m,h){var v=m.c2d(c,b,h).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}}),Z5=ze({"src/traces/histogram/calc.js"(J,V){"use strict";var p=ao(),b=Nr(),E=mi(),k=Gi(),{hasColorscale:l}=Bf(),e=Qf(),t=x1(),n=H5(),r=W5(),a=Y5(),o=X5();function s(g,i){var w=[],S=[],M=i.orientation==="h",C=k.getFromId(g,M?i.yaxis:i.xaxis),_=M?"y":"x",T={x:"y",y:"x"}[_],f=i[_+"calendar"],u=i.cumulative,A,x=c(g,i,C,_),z=x[0],I=x[1],O=typeof z.size=="string",D=[],B=O?D:z,F=[],P=[],j=[],U=0,$=i.histnorm,Q=i.histfunc,re=$.indexOf("density")!==-1,ne,se,G;u.enabled&&re&&($=$.replace(/ ?density$/,""),re=!1);var X=Q==="max"||Q==="min",K=X?null:0,H=n.count,Y=r[$],q=!1,Z=function(Ae){return C.r2c(Ae,0,f)},ee;for(b.isArrayOrTypedArray(i[T])&&Q!=="count"&&(ee=i[T],q=Q==="avg",H=n[Q]),A=Z(z.start),se=Z(z.end)+(A-k.tickIncrement(A,z.size,!1,f))/1e6;A=0&&G=ce;A--)if(S[A]){ve=A;break}for(A=ce;A<=ve;A++)if(p(w[A])&&p(S[A])){var le={p:w[A],s:S[A],b:0};u.enabled||(le.pts=j[A],we?le.ph0=le.ph1=j[A].length?I[j[A][0]]:w[A]:(i._computePh=!0,le.ph0=Ge(D[A]),le.ph1=Ge(D[A+1],!0))),_e.push(le)}return _e.length===1&&(_e[0].width1=k.tickIncrement(_e[0].p,z.size,!1,f)-_e[0].p),l(i,"marker")&&e(g,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),l(i,"marker.line")&&e(g,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(_e,i),b.isArrayOrTypedArray(i.selectedpoints)&&b.tagSelected(_e,i,Ie),_e}function c(g,i,w,S,M){var C,_=S+"bins",T=g._fullLayout,f=i["_"+S+"bingroup"],u=T._histogramBinOpts[f],A=T.barmode==="overlay",x,z,I,O,D,B,F,P=function(Ge){return w.r2c(Ge,0,O)},j=function(Ge){return w.c2r(Ge,0,O)},U=w.type==="date"?function(Ge){return Ge||Ge===0?b.cleanDate(Ge,null,O):null}:function(Ge){return p(Ge)?Number(Ge):null};function $(Ge,ke,_e){ke[Ge+"Found"]?(ke[Ge]=U(ke[Ge]),ke[Ge]===null&&(ke[Ge]=_e[Ge])):(B[Ge]=ke[Ge]=_e[Ge],b.nestedProperty(z[0],_+"."+Ge).set(_e[Ge]))}if(i["_"+S+"autoBinFinished"])delete i["_"+S+"autoBinFinished"];else{z=u.traces;var Q=[],re=!0,ne=!1,se=!1;for(x=0;xw.r2l(ae)&&(xe=k.tickIncrement(xe,u.size,!0,O)),Y.start=w.l2r(xe),ee||b.nestedProperty(i,_+".start").set(Y.start)}var we=u.end,Me=w.r2l(H.end),Se=Me!==void 0;if((u.endFound||Se)&&Me!==w.r2l(we)){var Ie=Se?Me:b.aggNums(Math.max,null,D);Y.end=w.l2r(Ie),Se||b.nestedProperty(i,_+".start").set(Y.end)}var Ve="autobin"+S;return i._input[Ve]===!1&&(i._input[_]=b.extendFlat({},i[_]||{}),delete i._input[Ve],delete i[Ve]),[Y,D]}function m(g,i,w,S,M){var C=g._fullLayout,_=h(g,i),T=!1,f=1/0,u=[i],A,x,z;for(A=0;A<_.length;A++)if(x=_[A],x===i)T=!0;else if(!T)z=C._histogramBinOpts[x["_"+S+"bingroup"]],f=Math.min(f,z.size||x[M].size);else{var I=c(g,x,w,S,!0),O=I[0],D=I[2];x["_"+S+"autoBinFinished"]=1,x["_"+S+"pos0"]=I[1],D?u.push(x):f=Math.min(f,O.size)}var B=new Array(u.length);for(A=0;A=0;S--)T(S);else if(i==="increasing"){for(S=1;S=0;S--)g[S]+=g[S+1];w==="exclude"&&(g.push(0),g.shift())}}V.exports={calc:s,calcAllAutoBins:c}}}),OF=ze({"src/traces/histogram2d/calc.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=H5(),k=W5(),l=Y5(),e=X5(),t=Z5().calcAllAutoBins;V.exports=function(s,c){var m=b.getFromId(s,c.xaxis),h=b.getFromId(s,c.yaxis),v=c.xcalendar,g=c.ycalendar,i=function(vt){return m.r2c(vt,0,v)},w=function(vt){return h.r2c(vt,0,g)},S=function(vt){return m.c2r(vt,0,v)},M=function(vt){return h.c2r(vt,0,g)},C,_,T,f,u=t(s,c,m,"x"),A=u[0],x=u[1],z=t(s,c,h,"y"),I=z[0],O=z[1],D=c._length;x.length>D&&x.splice(D,x.length-D),O.length>D&&O.splice(D,O.length-D);var B=[],F=[],P=[],j=typeof A.size=="string",U=typeof I.size=="string",$=[],Q=[],re=j?$:A,ne=U?Q:I,se=0,G=[],X=[],K=c.histnorm,H=c.histfunc,Y=K.indexOf("density")!==-1,q=H==="max"||H==="min",Z=q?null:0,ee=E.count,ae=k[K],he=!1,xe=[],we=[],Me="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Me&&H!=="count"&&(he=H==="avg",ee=E[H]);var Se=A.size,Ie=i(A.start),Ve=i(A.end)+(Ie-b.tickIncrement(Ie,Se,!1,v))/1e6;for(C=Ie;C=0&&T=0&&fb;a++)r=l(t,n,k(r));return r>b&&p.log("interp2d didn't converge quickly",r),t};function l(e,t,n){var r=0,a,o,s,c,m,h,v,g,i,w,S,M,C;for(c=0;cM&&(r=Math.max(r,Math.abs(e[o][s]-S)/(C-M))))}return r}}}),cb=ze({"src/traces/heatmap/find_empties.js"(J,V){"use strict";var p=Nr().maxRowLength;V.exports=function(E){var k=[],l={},e=[],t=E[0],n=[],r=[0,0,0],a=p(E),o,s,c,m,h,v,g,i;for(s=0;s=0;h--)m=e[h],s=m[0],c=m[1],v=((l[[s-1,c]]||r)[2]+(l[[s+1,c]]||r)[2]+(l[[s,c-1]]||r)[2]+(l[[s,c+1]]||r)[2])/20,v&&(g[m]=[s,c,v],e.splice(h,1),i=!0);if(!i)throw"findEmpties iterated with no new neighbors";for(m in g)l[m]=g[m],k.push(g[m])}return k.sort(function(w,S){return S[2]-w[2]})}}}),$5=ze({"src/traces/heatmap/make_bound_array.js"(J,V){"use strict";var p=mi(),b=Nr().isArrayOrTypedArray;V.exports=function(k,l,e,t,n,r){var a=[],o=p.traceIs(k,"contour"),s=p.traceIs(k,"histogram"),c,m,h,v=b(l)&&l.length>1;if(v&&!s&&r.type!=="category"){var g=l.length;if(g<=n){if(o)a=Array.from(l).slice(0,n);else if(n===1)r.type==="log"?a=[.5*l[0],2*l[0]]:a=[l[0]-.5,l[0]+.5];else if(r.type==="log"){for(a=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],h=1;h1){var K=(X[X.length-1]-X[0])/(X.length-1),H=Math.abs(K/100);for(D=0;DH)return!1}return!0}g._islinear=!1,i.type==="log"||w.type==="log"?C==="fast"&&P("log axis found"):j(_)?j(A)?g._islinear=!0:C==="fast"&&P("y scale is not linear"):C==="fast"&&P("x scale is not linear");var U=b.maxRowLength(O),$=g.xtype==="scaled"?"":_,Q=o(g,$,T,f,U,i),re=g.ytype==="scaled"?"":A,ne=o(g,re,x,z,O.length,w);g._extremes[i._id]=E.findExtremes(i,Q),g._extremes[w._id]=E.findExtremes(w,ne);var se={x:Q,y:ne,z:O,text:g._text||g.text,hovertext:g._hovertext||g.hovertext};if(g.xperiodalignment&&u&&(se.orig_x=u),g.yperiodalignment&&I&&(se.orig_y=I),$&&$.length===Q.length-1&&(se.xCenter=$),re&&re.length===ne.length-1&&(se.yCenter=re),M&&(se.xRanges=B.xRanges,se.yRanges=B.yRanges,se.pts=B.pts),S||e(v,g,{vals:O,cLetter:"z"}),S&&g.contours&&g.contours.coloring==="heatmap"){var G={type:g.type==="contour"?"heatmap":"histogram2d",xcalendar:g.xcalendar,ycalendar:g.ycalendar};se.xfill=o(G,$,T,f,U,i),se.yfill=o(G,re,x,z,O.length,w)}return[se]};function c(h){for(var v=[],g=h.length,i=0;i0;)H=u.c2p(P[ee]),ee--;for(H0;)Z=A.c2p(j[ee]),ee--;Z=u._length||H<=0||q>=A._length||Z<=0;if(Ie){var Ve=z.selectAll("image").data([]);Ve.exit().remove(),i(z);return}var Ge,ke;xe==="fast"?(Ge=se,ke=ne):(Ge=Me,ke=Se);var _e=document.createElement("canvas");_e.width=Ge,_e.height=ke;var ce=_e.getContext("2d",{willReadFrequently:!0}),ve=a(O,{noNumericCheck:!0,returnArray:!0}),le,Ae;xe==="fast"?(le=G?function(zr){return se-1-zr}:l.identity,Ae=X?function(zr){return ne-1-zr}:l.identity):(le=function(zr){return l.constrain(Math.round(u.c2p(P[zr])-K),0,Me)},Ae=function(zr){return l.constrain(Math.round(A.c2p(j[zr])-q),0,Se)});var Be=Ae(0),Xe=[Be,Be],Ye=G?0:1,yt=X?0:1,gt=0,Tt=0,At=0,$t=0,rr,_r,Xt,or,Ot;function vt(zr,Lr=0){if(zr===void 0)return[0,0,0,0];var aa=ve(zr);return aa[0]=Math.round(aa[0]),aa[1]=Math.round(aa[1]),aa[2]=Math.round(aa[2]),gt+=Lr,Tt+=aa[0]*Lr,At+=aa[1]*Lr,$t+=aa[2]*Lr,aa}function ht(zr,Lr,aa,Sa){var wa=zr[aa.bin0];if(wa===void 0)return vt(void 0,1);var pn=zr[aa.bin1],tn=Lr[aa.bin0],ai=Lr[aa.bin1],rn=pn-wa||0,Ri=tn-wa||0,Gn;return pn===void 0?ai===void 0?Gn=0:tn===void 0?Gn=2*(ai-wa):Gn=(2*ai-tn-wa)*2/3:ai===void 0?tn===void 0?Gn=0:Gn=(2*wa-pn-tn)*2/3:tn===void 0?Gn=(2*ai-pn-wa)*2/3:Gn=ai+wa-pn-tn,vt(wa+aa.frac*rn+Sa.frac*(Ri+aa.frac*Gn))}if(xe!=="default"){var De=0,Ne;try{Ne=new Uint8Array(Ge*ke*4)}catch{Ne=new Array(Ge*ke*4)}if(xe==="smooth"){var We=U||P,Ke=$||j,Je=new Array(We.length),et=new Array(Ke.length),Mt=new Array(Me),pt=U?S:w,Pt=$?S:w,Ct,qt,Vt;for(ee=0;eeNn||Nn>A._length))for(ae=La;aeUn||Un>u._length)){var li=t({x:yn,y:ja},O,C._fullLayout);li.x=yn,li.y=ja;var Yn=I.z[ee][ae];Yn===void 0?(li.z="",li.zLabel=""):(li.z=Yn,li.zLabel=k.tickText(Rr,Yn,"hover").text);var on=I.text&&I.text[ee]&&I.text[ee][ae];(on===void 0||on===!1)&&(on=""),li.text=on;var en=l.texttemplateString({data:[li,O._meta],fallback:O.texttemplatefallback,labels:li,locale:C._fullLayout._d3locale,template:ur});if(en){var vi=en.split("
"),Yi=vi.length,Ja=0;for(he=0;he=w[0].length||z<0||z>w.length)return}else{if(p.inbox(n-g[0],n-g[g.length-1],0)>0||p.inbox(r-i[0],r-i[i.length-1],0)>0)return;if(s){var I;for(T=[2*g[0]-g[1]],I=1;I=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),M1=ze({"src/traces/contour/attributes.js"(J,V){"use strict";var p=rg(),b=su(),E=Il(),k=E.axisHoverFormat,l=E.descriptionOnlyNumbers,e=qs(),t=Uc().dash,n=Qs(),r=Ki().extendFlat,a=_b(),o=a.COMPARISON_OPS2,s=a.INTERVAL_OPS,c=b.line;V.exports=r({z:p.z,x:p.x,x0:p.x0,dx:p.dx,y:p.y,y0:p.y0,dy:p.dy,xperiod:p.xperiod,yperiod:p.yperiod,xperiod0:b.xperiod0,yperiod0:b.yperiod0,xperiodalignment:p.xperiodalignment,yperiodalignment:p.yperiodalignment,text:p.text,hovertext:p.hovertext,transpose:p.transpose,xtype:p.xtype,ytype:p.ytype,xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:p.hovertemplate,hovertemplatefallback:p.hovertemplatefallback,texttemplate:r({},p.texttemplate,{}),texttemplatefallback:p.texttemplatefallback,textfont:r({},p.textfont,{}),hoverongaps:p.hoverongaps,connectgaps:r({},p.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:n({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(o).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},c.smoothing,{}),editType:"plot"},zorder:b.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),tT=ze({"src/traces/histogram2dcontour/attributes.js"(J,V){"use strict";var p=yb(),b=M1(),E=qs(),k=Il().axisHoverFormat,l=Ki().extendFlat;V.exports=l({x:p.x,y:p.y,z:p.z,marker:p.marker,histnorm:p.histnorm,histfunc:p.histfunc,nbinsx:p.nbinsx,xbins:p.xbins,nbinsy:p.nbinsy,ybins:p.ybins,autobinx:p.autobinx,autobiny:p.autobiny,bingroup:p.bingroup,xbingroup:p.xbingroup,ybingroup:p.ybingroup,autocontour:b.autocontour,ncontours:b.ncontours,contours:b.contours,line:{color:b.line.color,width:l({},b.line.width,{dflt:.5}),dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:p.hovertemplate,hovertemplatefallback:p.hovertemplatefallback,texttemplate:b.texttemplate,texttemplatefallback:b.texttemplatefallback,textfont:b.textfont},E("",{cLetter:"z",editTypeOverride:"calc"}))}}),xb=ze({"src/traces/contour/contours_defaults.js"(J,V){"use strict";V.exports=function(b,E,k,l){var e=l("contours.start"),t=l("contours.end"),n=e===!1||t===!1,r=k("contours.size"),a;n?a=E.autocontour=!0:a=k("autocontour",!1),(a||!r)&&k("ncontours")}}}),rT=ze({"src/traces/contour/label_defaults.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k,l,e){e||(e={});var t=E("contours.showlabels");if(t){var n=k.font;p.coerceFont(E,"contours.labelfont",n,{overrideDflt:{color:l}}),E("contours.labelformat")}e.hasHover!==!1&&E("zhoverformat")}}}),bb=ze({"src/traces/contour/style_defaults.js"(J,V){"use strict";var p=qc(),b=rT();V.exports=function(k,l,e,t,n){var r=e("contours.coloring"),a,o="";r==="fill"&&(a=e("contours.showlines")),a!==!1&&(r!=="lines"&&(o=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(k.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,p(k,l,t,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),b(e,t,o,n)}}}),$F=ze({"src/traces/histogram2dcontour/defaults.js"(J,V){"use strict";var p=Nr(),b=eT(),E=xb(),k=bb(),l=A1(),e=tT();V.exports=function(n,r,a,o){function s(m,h){return p.coerce(n,r,e,m,h)}function c(m){return p.coerce2(n,r,e,m)}b(n,r,s,o),r.visible!==!1&&(E(n,r,s,c),k(n,r,s,o),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&l(s,o))}}}),aT=ze({"src/traces/contour/set_contours.js"(J,V){"use strict";var p=Gi(),b=Nr();V.exports=function(l,e){var t=l.contours;if(l.autocontour){var n=l.zmin,r=l.zmax;(l.zauto||n===void 0)&&(n=b.aggNums(Math.min,null,e)),(l.zauto||r===void 0)&&(r=b.aggNums(Math.max,null,e));var a=E(n,r,l.ncontours);t.size=a.dtick,t.start=p.tickFirst(a),a.range.reverse(),t.end=p.tickFirst(a),t.start===n&&(t.start+=t.size),t.end===r&&(t.end-=t.size),t.start>t.end&&(t.start=t.end=(t.start+t.end)/2),l._input.contours||(l._input.contours={}),b.extendFlat(l._input.contours,{start:t.start,end:t.end,size:t.size}),l._input.autocontour=!0}else if(t.type!=="constraint"){var o=t.start,s=t.end,c=l._input.contours;if(o>s&&(t.start=c.start=s,s=t.end=c.end=o,o=t.start),!(t.size>0)){var m;o===s?m=1:m=E(o,s,l.ncontours).dtick,c.size=t.size=m}}};function E(k,l,e){var t={type:"linear",range:[k,l]};return p.autoTicks(t,(l-k)/(e||15)),t}}}),S1=ze({"src/traces/contour/end_plus.js"(J,V){"use strict";V.exports=function(b){return b.end+b.size/1e6}}}),nT=ze({"src/traces/contour/calc.js"(J,V){"use strict";var p=fl(),b=fb(),E=aT(),k=S1();V.exports=function(e,t){var n=b(e,t),r=n[0].z;E(t,r);var a=t.contours,o=p.extractOpts(t),s;if(a.coloring==="heatmap"&&o.auto&&t.autocontour===!1){var c=a.start,m=k(a),h=a.size||1,v=Math.floor((m-c)/h)+1;isFinite(h)||(h=1,v=1);var g=c-h/2,i=g+v*h;s=[g,i]}else s=r;return p.calc(e,t,{vals:s,cLetter:"z"}),n}}}),E1=ze({"src/traces/contour/constants.js"(J,V){"use strict";V.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}}),iT=ze({"src/traces/contour/make_crossings.js"(J,V){"use strict";var p=E1();V.exports=function(k){var l=k[0].z,e=l.length,t=l[0].length,n=e===2||t===2,r,a,o,s,c,m,h,v,g;for(a=0;aE?0:1)+(k[0][1]>E?0:2)+(k[1][1]>E?0:4)+(k[1][0]>E?0:8);if(l===5||l===10){var e=(k[0][0]+k[0][1]+k[1][0]+k[1][1])/4;return E>e?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),oT=ze({"src/traces/contour/find_all_paths.js"(J,V){"use strict";var p=Nr(),b=E1();V.exports=function(r,a,o){var s,c,m,h,v;for(a=a||.01,o=o||.01,m=0;m20?(m=b.CHOOSESADDLE[m][(h[0]||h[1])<0?0:1],n.crossings[c]=b.SADDLEREMAINDER[m]):delete n.crossings[c],h=b.NEWDELTA[m],!h){p.log("Found bad marching index:",m,r,n.level);break}v.push(t(n,r,h)),r[0]+=h[0],r[1]+=h[1],c=r.join(","),E(v[v.length-1],v[v.length-2],o,s)&&v.pop();var C=h[0]&&(r[0]<0||r[0]>i-2)||h[1]&&(r[1]<0||r[1]>g-2),_=r[0]===w[0]&&r[1]===w[1]&&h[0]===S[0]&&h[1]===S[1];if(_||a&&C)break;m=n.crossings[c]}M===1e4&&p.log("Infinite loop in contour?");var T=E(v[0],v[v.length-1],o,s),f=0,u=.2*n.smoothing,A=[],x=0,z,I,O,D,B,F,P,j,U,$,Q;for(M=1;M=x;M--)if(z=A[M],z=x&&z+A[I]j&&U--,n.edgepaths[U]=Q.concat(v,$));break}G||(n.edgepaths[j]=v.concat($))}for(j=0;j20&&r?n===208||n===1114?o=a[0]===0?1:-1:s=a[1]===0?1:-1:b.BOTTOMSTART.indexOf(n)!==-1?s=1:b.LEFTSTART.indexOf(n)!==-1?o=1:b.TOPSTART.indexOf(n)!==-1?s=-1:o=-1,[o,s]}function t(n,r,a){var o=r[0]+Math.max(a[0],0),s=r[1]+Math.max(a[1],0),c=n.z[s][o],m=n.xaxis,h=n.yaxis;if(a[1]){var v=(n.level-c)/(n.z[s][o+1]-c),g=(v!==1?(1-v)*m.c2l(n.x[o]):0)+(v!==0?v*m.c2l(n.x[o+1]):0);return[m.c2p(m.l2c(g),!0),h.c2p(n.y[s],!0),o+v,s]}else{var i=(n.level-c)/(n.z[s+1][o]-c),w=(i!==1?(1-i)*h.c2l(n.y[s]):0)+(i!==0?i*h.c2l(n.y[s+1]):0);return[m.c2p(n.x[o],!0),h.c2p(h.l2c(w),!0),o,s+i]}}}}),KF=ze({"src/traces/contour/constraint_mapping.js"(J,V){"use strict";var p=_b(),b=ao();V.exports={"[]":k("[]"),"][":k("]["),">":l(">"),"<":l("<"),"=":l("=")};function E(e,t){var n=Array.isArray(t),r;function a(o){return b(o)?+o:null}return p.COMPARISON_OPS2.indexOf(e)!==-1?r=a(n?t[0]:t):p.INTERVAL_OPS.indexOf(e)!==-1?r=n?[a(t[0]),a(t[1])]:[a(t),a(t)]:p.SET_OPS.indexOf(e)!==-1&&(r=n?t.map(a):[a(t)]),r}function k(e){return function(t){t=E(e,t);var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:n,end:r,size:r-n}}}function l(e){return function(t){return t=E(e,t),{start:t,end:1/0,size:1/0}}}}}),sT=ze({"src/traces/contour/empty_pathinfo.js"(J,V){"use strict";var p=Nr(),b=KF(),E=S1();V.exports=function(l,e,t){for(var n=l.type==="constraint"?b[l._operation](l.value):l,r=n.size,a=[],o=E(n),s=t.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:t.a,y:t.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:t.x,y:t.y},m=n.start;m1e3){p.warn("Too many contours, clipping at 1000",l);break}return a}}}),lT=ze({"src/traces/contour/convert_to_constraints.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l,e,t,n=function(o){return o.reverse()},r=function(o){return o};switch(k){case"=":case"<":return E;case">":for(E.length!==1&&p.warn("Contour data invalid for the specified inequality operation."),e=E[0],l=0;lt.level||t.starts.length&&e===t.level)}break;case"constraint":if(E.prefixBoundary=!1,E.edgepaths.length)return;var n=E.x.length,r=E.y.length,a=-1/0,o=1/0;for(l=0;l":s>a&&(E.prefixBoundary=!0);break;case"<":(sa||E.starts.length&&m===o)&&(E.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),m=Math.max(s[0],s[1]),ca&&(E.prefixBoundary=!0);break}break}}}}),wb=ze({"src/traces/contour/plot.js"(J){"use strict";var V=ci(),p=Nr(),b=$i(),E=fl(),k=Cs(),l=Gi(),e=Dd(),t=db(),n=iT(),r=oT(),a=sT(),o=lT(),s=uT(),c=E1(),m=c.LABELOPTIMIZER;J.plot=function(_,T,f,u){var A=T.xaxis,x=T.yaxis;p.makeTraceGroups(u,f,"contour").each(function(z){var I=V.select(this),O=z[0],D=O.trace,B=O.x,F=O.y,P=D.contours,j=a(P,T,O),U=p.ensureSingle(I,"g","heatmapcoloring"),$=[];P.coloring==="heatmap"&&($=[z]),t(_,T,$,U),n(j),r(j);var Q=A.c2p(B[0],!0),re=A.c2p(B[B.length-1],!0),ne=x.c2p(F[0],!0),se=x.c2p(F[F.length-1],!0),G=[[Q,se],[re,se],[re,ne],[Q,ne]],X=j;P.type==="constraint"&&(X=o(j,P._operation)),h(I,G,P),v(I,X,G,P),i(I,j,_,O,P),S(I,T,_,O,G)})};function h(C,_,T){var f=p.ensureSingle(C,"g","contourbg"),u=f.selectAll("path").data(T.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+_.join("L")+"Z").style("stroke","none")}function v(C,_,T,f){var u=f.coloring==="fill"||f.type==="constraint"&&f._operation!=="=",A="M"+T.join("L")+"Z";u&&s(_,f);var x=p.ensureSingle(C,"g","contourfill"),z=x.selectAll("path").data(u?_:[]);z.enter().append("path"),z.exit().remove(),z.each(function(I){var O=(I.prefixBoundary?A:"")+g(I,T);O?V.select(this).attr("d",O).style("stroke","none"):V.select(this).remove()})}function g(C,_){var T="",f=0,u=C.edgepaths.map(function(Q,re){return re}),A=!0,x,z,I,O,D,B;function F(Q){return Math.abs(Q[1]-_[0][1])<.01}function P(Q){return Math.abs(Q[1]-_[2][1])<.01}function j(Q){return Math.abs(Q[0]-_[0][0])<.01}function U(Q){return Math.abs(Q[0]-_[2][0])<.01}for(;u.length;){for(B=b.smoothopen(C.edgepaths[f],C.smoothing),T+=A?B:B.replace(/^M/,"L"),u.splice(u.indexOf(f),1),x=C.edgepaths[f][C.edgepaths[f].length-1],O=-1,I=0;I<4;I++){if(!x){p.log("Missing end?",f,C);break}for(F(x)&&!U(x)?z=_[1]:j(x)?z=_[0]:P(x)?z=_[3]:U(x)&&(z=_[2]),D=0;D=0&&(z=$,O=D):Math.abs(x[1]-z[1])<.01?Math.abs(x[1]-$[1])<.01&&($[0]-x[0])*(z[0]-$[0])>=0&&(z=$,O=D):p.log("endpt to newendpt is not vert. or horz.",x,z,$)}if(x=z,O>=0)break;T+="L"+z}if(O===C.edgepaths.length){p.log("unclosed perimeter path");break}f=O,A=u.indexOf(f)===-1,A&&(f=u[0],T+="Z")}for(f=0;fm.MAXCOST*2)break;F&&(z/=2),x=O-z/2,I=x+z*1.5}if(B<=m.MAXCOST)return D};function w(C,_,T,f){var u=_.width/2,A=_.height/2,x=C.x,z=C.y,I=C.theta,O=Math.cos(I)*u,D=Math.sin(I)*u,B=(x>f.center?f.right-x:x-f.left)/(O+Math.abs(Math.sin(I)*A)),F=(z>f.middle?f.bottom-z:z-f.top)/(Math.abs(D)+Math.cos(I)*A);if(B<1||F<1)return 1/0;var P=m.EDGECOST*(1/(B-1)+1/(F-1));P+=m.ANGLECOST*I*I;for(var j=x-O,U=z-D,$=x+O,Q=z+D,re=0;re=S)&&(t<=w&&(t=w),n>=S&&(n=S),a=Math.floor((n-t)/r)+1,o=0),i=0;iw&&(h.unshift(w),v.unshift(v[0])),h[h.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:p(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(o("contours.value",0),p(s.value)||(t(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),ez=ze({"src/traces/contour/defaults.js"(J,V){"use strict";var p=Nr(),b=ob(),E=yd(),k=hT(),l=xb(),e=bb(),t=A1(),n=M1();V.exports=function(a,o,s,c){function m(i,w){return p.coerce(a,o,n,i,w)}function h(i){return p.coerce2(a,o,n,i)}var v=b(a,o,m,c);if(!v){o.visible=!1;return}E(a,o,c,m),m("xhoverformat"),m("yhoverformat"),m("text"),m("hovertext"),m("hoverongaps"),m("hovertemplate"),m("hovertemplatefallback");var g=m("contours.type")==="constraint";m("connectgaps",p.isArray1D(o.z)),g?k(a,o,m,c,s):(l(a,o,m,h),e(a,o,m,c)),o.contours&&o.contours.coloring==="heatmap"&&t(m,c),m("zorder")}}}),tz=ze({"src/traces/contour/index.js"(J,V){"use strict";V.exports={attributes:M1(),supplyDefaults:ez(),calc:nT(),plot:wb().plot,style:Tb(),colorbar:Ab(),hoverPoints:fT(),moduleType:"trace",name:"contour",basePlotModule:Du(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),rz=ze({"lib/contour.js"(J,V){"use strict";V.exports=tz()}}),dT=ze({"src/traces/scatterternary/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=su(),e=ws(),t=qs(),n=Uc().dash,r=Ki().extendFlat,a=l.marker,o=l.line,s=a.line;V.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:r({},l.mode,{dflt:"markers"}),text:r({},l.text,{}),texttemplate:b({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:r({},l.hovertext,{}),line:{color:o.color,width:o.width,dash:n,backoff:o.backoff,shape:r({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:r({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:k(),marker:r({symbol:a.symbol,opacity:a.opacity,angle:a.angle,angleref:a.angleref,standoff:a.standoff,maxdisplayed:a.maxdisplayed,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:r({width:s.width,dash:s.dash,editType:"calc"},t("marker.line")),gradient:a.gradient,editType:"calc"},t("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:r({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:p(),hovertemplatefallback:E()}}}),az=ze({"src/traces/scatterternary/defaults.js"(J,V){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=dT();V.exports=function(o,s,c,m){function h(C,_){return p.coerce(o,s,r,C,_)}var v=h("a"),g=h("b"),i=h("c"),w;if(v?(w=v.length,g?(w=Math.min(w,g.length),i&&(w=Math.min(w,i.length))):i?w=Math.min(w,i.length):w=0):g&&i&&(w=Math.min(g.length,i.length)),!w){s.visible=!1;return}s._length=w,h("sum"),h("text"),h("hovertext"),s.hoveron!=="fills"&&(h("hovertemplate"),h("hovertemplatefallback"));var S=w"),n.hovertemplate=m.hovertemplate,t}}}),lz=ze({"src/traces/scatterternary/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){if(E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),l[e]){var t=l[e];b.a=t.a,b.b=t.b,b.c=t.c}else b.a=E.a,b.b=E.b,b.c=E.c;return b}}}),uz=ze({"src/plots/ternary/ternary.js"(J,V){"use strict";var p=ci(),b=mi(),E=Nr(),k=E.strTranslate,l=E._,e=Qn(),t=$i(),n=Dd(),r=Ki().extendFlat,a=cl(),o=Gi(),s=_h(),c=Zl(),m=Fd(),h=m.freeMode,v=m.rectMode,g=qv(),i=_c().prepSelect,w=_c().selectOnClick,S=_c().clearOutline,M=_c().clearSelectionsCache,C=hc();function _(F,P){this.id=F.id,this.graphDiv=F.graphDiv,this.init(P),this.makeFramework(P),this.updateFx(P),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}V.exports=_;var T=_.prototype;T.init=function(F){this.container=F._ternarylayer,this.defs=F._defs,this.layoutId=F._uid,this.traceHash={},this.layers={}},T.plot=function(F,P){var j=this,U=P[j.id],$=P._size;j._hasClipOnAxisFalse=!1;for(var Q=0;Qf*G?(ae=G,ee=ae*f):(ee=se,ae=ee/f),he=re*ee/se,xe=ne*ae/G,q=P.l+P.w*$-ee/2,Z=P.t+P.h*(1-Q)-ae/2,j.x0=q,j.y0=Z,j.w=ee,j.h=ae,j.sum=X,j.xaxis={type:"linear",range:[K+2*Y-X,X-K-2*H],domain:[$-he/2,$+he/2],_id:"x"},n(j.xaxis,j.graphDiv._fullLayout),j.xaxis.setScale(),j.xaxis.isPtWithinRange=function(le){return le.a>=j.aaxis.range[0]&&le.a<=j.aaxis.range[1]&&le.b>=j.baxis.range[1]&&le.b<=j.baxis.range[0]&&le.c>=j.caxis.range[1]&&le.c<=j.caxis.range[0]},j.yaxis={type:"linear",range:[K,X-H-Y],domain:[Q-xe/2,Q+xe/2],_id:"y"},n(j.yaxis,j.graphDiv._fullLayout),j.yaxis.setScale(),j.yaxis.isPtWithinRange=function(){return!0};var we=j.yaxis.domain[0],Me=j.aaxis=r({},F.aaxis,{range:[K,X-H-Y],side:"left",tickangle:(+F.aaxis.tickangle||0)-30,domain:[we,we+xe*f],anchor:"free",position:0,_id:"y",_length:ee});n(Me,j.graphDiv._fullLayout),Me.setScale();var Se=j.baxis=r({},F.baxis,{range:[X-K-Y,H],side:"bottom",domain:j.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ee});n(Se,j.graphDiv._fullLayout),Se.setScale();var Ie=j.caxis=r({},F.caxis,{range:[X-K-H,Y],side:"right",tickangle:(+F.caxis.tickangle||0)+30,domain:[we,we+xe*f],anchor:"free",position:0,_id:"y",_length:ee});n(Ie,j.graphDiv._fullLayout),Ie.setScale();var Ve="M"+q+","+(Z+ae)+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDef.select("path").attr("d",Ve),j.layers.plotbg.select("path").attr("d",Ve);var Ge="M0,"+ae+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDefRelative.select("path").attr("d",Ge);var ke=k(q,Z);j.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ke),j.clipDefRelative.select("path").attr("transform",null);var _e=k(q-Se._offset,Z+ae);j.layers.baxis.attr("transform",_e),j.layers.bgrid.attr("transform",_e);var ce=k(q+ee/2,Z)+"rotate(30)"+k(0,-Me._offset);j.layers.aaxis.attr("transform",ce),j.layers.agrid.attr("transform",ce);var ve=k(q+ee/2,Z)+"rotate(-30)"+k(0,-Ie._offset);j.layers.caxis.attr("transform",ve),j.layers.cgrid.attr("transform",ve),j.drawAxes(!0),j.layers.aline.select("path").attr("d",Me.showline?"M"+q+","+(Z+ae)+"l"+ee/2+",-"+ae:"M0,0").call(e.stroke,Me.linecolor||"#000").style("stroke-width",(Me.linewidth||0)+"px"),j.layers.bline.select("path").attr("d",Se.showline?"M"+q+","+(Z+ae)+"h"+ee:"M0,0").call(e.stroke,Se.linecolor||"#000").style("stroke-width",(Se.linewidth||0)+"px"),j.layers.cline.select("path").attr("d",Ie.showline?"M"+(q+ee/2)+","+Z+"l"+ee/2+","+ae:"M0,0").call(e.stroke,Ie.linecolor||"#000").style("stroke-width",(Ie.linewidth||0)+"px"),j.graphDiv._context.staticPlot||j.initInteractions(),t.setClipUrl(j.layers.frontplot,j._hasClipOnAxisFalse?null:j.clipId,j.graphDiv)},T.drawAxes=function(F){var P=this,j=P.graphDiv,U=P.id.slice(7)+"title",$=P.layers,Q=P.aaxis,re=P.baxis,ne=P.caxis;if(P.drawAx(Q),P.drawAx(re),P.drawAx(ne),F){var se=Math.max(Q.showticklabels?Q.tickfont.size/2:0,(ne.showticklabels?ne.tickfont.size*.75:0)+(ne.ticks==="outside"?ne.ticklen*.87:0)),G=(re.showticklabels?re.tickfont.size:0)+(re.ticks==="outside"?re.ticklen:0)+3;$["a-title"]=g.draw(j,"a"+U,{propContainer:Q,propName:P.id+".aaxis.title.text",placeholder:l(j,"Click to enter Component A title"),attributes:{x:P.x0+P.w/2,y:P.y0-Q.title.font.size/3-se,"text-anchor":"middle"}}),$["b-title"]=g.draw(j,"b"+U,{propContainer:re,propName:P.id+".baxis.title.text",placeholder:l(j,"Click to enter Component B title"),attributes:{x:P.x0-G,y:P.y0+P.h+re.title.font.size*.83+G,"text-anchor":"middle"}}),$["c-title"]=g.draw(j,"c"+U,{propContainer:ne,propName:P.id+".caxis.title.text",placeholder:l(j,"Click to enter Component C title"),attributes:{x:P.x0+P.w+G,y:P.y0+P.h+ne.title.font.size*.83+G,"text-anchor":"middle"}})}},T.drawAx=function(F){var P=this,j=P.graphDiv,U=F._name,$=U.charAt(0),Q=F._id,re=P.layers[U],ne=30,se=$+"tickLayout",G=u(F);P[se]!==G&&(re.selectAll("."+Q+"tick").remove(),P[se]=G),F.setScale();var X=o.calcTicks(F),K=o.clipEnds(F,X),H=o.makeTransTickFn(F),Y=o.getTickSigns(F)[2],q=E.deg2rad(ne),Z=Y*(F.linewidth||1)/2,ee=Y*F.ticklen,ae=P.w,he=P.h,xe=$==="b"?"M0,"+Z+"l"+Math.sin(q)*ee+","+Math.cos(q)*ee:"M"+Z+",0l"+Math.cos(q)*ee+","+-Math.sin(q)*ee,we={a:"M0,0l"+he+",-"+ae/2,b:"M0,0l-"+ae/2+",-"+he,c:"M0,0l-"+he+","+ae/2}[$];o.drawTicks(j,F,{vals:F.ticks==="inside"?K:X,layer:re,path:xe,transFn:H,crisp:!1}),o.drawGrid(j,F,{vals:K,layer:P.layers[$+"grid"],path:we,transFn:H,crisp:!1}),o.drawLabels(j,F,{vals:X,layer:re,transFn:H,labelFns:o.makeLabelFns(F,0,ne)})};function u(F){return F.ticks+String(F.ticklen)+String(F.showticklabels)}var A=C.MINZOOM/2+.87,x="m-0.87,.5h"+A+"v3h-"+(A+5.2)+"l"+(A/2+2.6)+",-"+(A*.87+4.5)+"l2.6,1.5l-"+A/2+","+A*.87+"Z",z="m0.87,.5h-"+A+"v3h"+(A+5.2)+"l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-2.6,1.5l"+A/2+","+A*.87+"Z",I="m0,1l"+A/2+","+A*.87+"l2.6,-1.5l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-"+(A/2+2.6)+","+(A*.87+4.5)+"l2.6,1.5l"+A/2+",-"+A*.87+"Z",O="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",D=!0;T.clearOutline=function(){M(this.dragOptions),S(this.dragOptions.gd)},T.initInteractions=function(){var F=this,P=F.layers.plotbg.select("path").node(),j=F.graphDiv,U=j._fullLayout._zoomlayer,$,Q;this.dragOptions={element:P,gd:j,plotinfo:{id:F.id,domain:j._fullLayout[F.id].domain,xaxis:F.xaxis,yaxis:F.yaxis},subplot:F.id,prepFn:function(_e,ce,ve){F.dragOptions.xaxes=[F.xaxis],F.dragOptions.yaxes=[F.yaxis],$=j._fullLayout._invScaleX,Q=j._fullLayout._invScaleY;var le=F.dragOptions.dragmode=j._fullLayout.dragmode;h(le)?F.dragOptions.minDrag=1:F.dragOptions.minDrag=void 0,le==="zoom"?(F.dragOptions.moveFn=Se,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=Ie,he(_e,ce,ve)):le==="pan"?(F.dragOptions.moveFn=Ge,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=ke,Ve(),F.clearOutline(j)):(v(le)||h(le))&&i(_e,ce,ve,F.dragOptions,le)}};var re,ne,se,G,X,K,H,Y,q,Z;function ee(_e){var ce={};return ce[F.id+".aaxis.min"]=_e.a,ce[F.id+".baxis.min"]=_e.b,ce[F.id+".caxis.min"]=_e.c,ce}function ae(_e,ce){var ve=j._fullLayout.clickmode;B(j),_e===2&&(j.emit("plotly_doubleclick",null),b.call("_guiRelayout",j,ee({a:0,b:0,c:0}))),ve.indexOf("select")>-1&&_e===1&&w(ce,j,[F.xaxis],[F.yaxis],F.id,F.dragOptions),ve.indexOf("event")>-1&&c.click(j,ce,F.id)}function he(_e,ce,ve){var le=P.getBoundingClientRect();re=ce-le.left,ne=ve-le.top,j._fullLayout._calcInverseTransform(j);var Ae=j._fullLayout._invTransform,Be=E.apply3DTransform(Ae)(re,ne);re=Be[0],ne=Be[1],se={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=se,G=F.aaxis.range[1]-se.a,K=e.luminosity(F.graphDiv._fullLayout[F.id].bgcolor),H="M0,"+F.h+"L"+F.w/2+", 0L"+F.w+","+F.h+"Z",Y=!1,q=U.append("path").attr("class","zoombox").attr("transform",k(F.x0,F.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",H),Z=U.append("path").attr("class","zoombox-corners").attr("transform",k(F.x0,F.y0)).style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),F.clearOutline(j)}function xe(_e,ce){return 1-ce/F.h}function we(_e,ce){return 1-(_e+(F.h-ce)/Math.sqrt(3))/F.w}function Me(_e,ce){return(_e-(F.h-ce)/Math.sqrt(3))/F.w}function Se(_e,ce){var ve=re+_e*$,le=ne+ce*Q,Ae=Math.max(0,Math.min(1,xe(re,ne),xe(ve,le))),Be=Math.max(0,Math.min(1,we(re,ne),we(ve,le))),Xe=Math.max(0,Math.min(1,Me(re,ne),Me(ve,le))),Ye=(Ae/2+Xe)*F.w,yt=(1-Ae/2-Be)*F.w,gt=(Ye+yt)/2,Tt=yt-Ye,At=(1-Ae)*F.h,$t=At-Tt/f;Tt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Z.transition().style("opacity",1).duration(200),Y=!0),j.emit("plotly_relayouting",ee(X))}function Ie(){B(j),X!==se&&(b.call("_guiRelayout",j,ee(X)),D&&j.data&&j._context.showTips&&(E.notifier(l(j,"Double-click to zoom back out"),"long",j),D=!1))}function Ve(){se={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=se}function Ge(_e,ce){var ve=_e/F.xaxis._m,le=ce/F.yaxis._m;X={a:se.a-le,b:se.b+(ve+le)/2,c:se.c-(ve-le)/2};var Ae=[X.a,X.b,X.c].sort(E.sorterAsc),Be={a:Ae.indexOf(X.a),b:Ae.indexOf(X.b),c:Ae.indexOf(X.c)};Ae[0]<0&&(Ae[1]+Ae[0]/2<0?(Ae[2]+=Ae[0]+Ae[1],Ae[0]=Ae[1]=0):(Ae[2]+=Ae[0]/2,Ae[1]+=Ae[0]/2,Ae[0]=0),X={a:Ae[Be.a],b:Ae[Be.b],c:Ae[Be.c]},ce=(se.a-X.a)*F.yaxis._m,_e=(se.c-X.c-se.b+X.b)*F.xaxis._m);var Xe=k(F.x0+_e,F.y0+ce);F.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Xe);var Ye=k(-_e,-ce);F.clipDefRelative.select("path").attr("transform",Ye),F.aaxis.range=[X.a,F.sum-X.b-X.c],F.baxis.range=[F.sum-X.a-X.c,X.b],F.caxis.range=[F.sum-X.a-X.b,X.c],F.drawAxes(!1),F._hasClipOnAxisFalse&&F.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,F),j.emit("plotly_relayouting",ee(X))}function ke(){b.call("_guiRelayout",j,ee(X))}P.onmousemove=function(_e){c.hover(j,_e,F.id),j._fullLayout._lasthover=P,j._fullLayout._hoversubplot=F.id},P.onmouseout=function(_e){j._dragging||s.unhover(j,_e)},s.init(this.dragOptions)};function B(F){p.select(F).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),pT=ze({"src/plots/ternary/layout_attributes.js"(J,V){"use strict";var p=fc(),b=Ml().attributes,E=cf(),k=Al().overrideAll,l=Ki().extendFlat,e={title:{text:E.title.text,font:E.title.font},color:E.color,tickmode:E.minor.tickmode,nticks:l({},E.nticks,{dflt:6,min:1}),tick0:E.tick0,dtick:E.dtick,tickvals:E.tickvals,ticktext:E.ticktext,ticks:E.ticks,ticklen:E.ticklen,tickwidth:E.tickwidth,tickcolor:E.tickcolor,ticklabelstep:E.ticklabelstep,showticklabels:E.showticklabels,labelalias:E.labelalias,showtickprefix:E.showtickprefix,tickprefix:E.tickprefix,showticksuffix:E.showticksuffix,ticksuffix:E.ticksuffix,showexponent:E.showexponent,exponentformat:E.exponentformat,minexponent:E.minexponent,separatethousands:E.separatethousands,tickfont:E.tickfont,tickangle:E.tickangle,tickformat:E.tickformat,tickformatstops:E.tickformatstops,hoverformat:E.hoverformat,showline:l({},E.showline,{dflt:!0}),linecolor:E.linecolor,linewidth:E.linewidth,showgrid:l({},E.showgrid,{dflt:!0}),gridcolor:E.gridcolor,gridwidth:E.gridwidth,griddash:E.griddash,layer:E.layer,min:{valType:"number",dflt:0,min:0}},t=V.exports=k({domain:b({name:"ternary"}),bgcolor:{valType:"color",dflt:p.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}}}),Zv=ze({"src/plots/subplot_defaults.js"(J,V){"use strict";var p=Nr(),b=hs(),E=Ml().defaults;V.exports=function(l,e,t,n){var r=n.type,a=n.attributes,o=n.handleDefaults,s=n.partition||"x",c=e._subplots[r],m=c.length,h=m&&c[0].replace(/\d+$/,""),v,g;function i(C,_){return p.coerce(v,g,a,C,_)}for(var w=0;w=w&&(T.min=0,f.min=0,u.min=0,m.aaxis&&delete m.aaxis.min,m.baxis&&delete m.baxis.min,m.caxis&&delete m.caxis.min)}function c(m,h,v,g){var i=a[h._name];function w(A,x){return E.coerce(m,h,i,A,x)}w("uirevision",g.uirevision),h.type="linear";var S=w("color"),M=S!==i.color.dflt?S:v.font.color,C=h._name,_=C.charAt(0).toUpperCase(),T="Component "+_,f=w("title.text",T);h._hovertitle=f===T?f:_,E.coerceFont(w,"title.font",v.font,{overrideDflt:{size:E.bigFont(v.font.size),color:M}}),w("min"),n(m,h,w,"linear"),e(m,h,w,"linear"),l(m,h,w,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),t(m,h,w,{outerTicks:!0});var u=w("showticklabels");u&&(E.coerceFont(w,"tickfont",v.font,{overrideDflt:{color:M}}),w("tickangle"),w("tickformat")),r(m,h,w,{dfltColor:S,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),w("hoverformat"),w("layer")}}}),fz=ze({"src/plots/ternary/index.js"(J){"use strict";var V=uz(),p=zf().getSubplotCalcData,b=Nr().counterRegex,E="ternary";J.name=E;var k=J.attr="subplot";J.idRoot=E,J.idRegex=J.attrRegex=b(E);var l=J.attributes={};l[k]={valType:"subplotid",dflt:"ternary",editType:"calc"},J.layoutAttributes=pT(),J.supplyLayoutDefaults=cz(),J.plot=function(t){for(var n=t._fullLayout,r=t.calcdata,a=n._subplots[E],o=0;o0){var C=t.xa,_=t.ya,T,f,u,A,x;m.orientation==="h"?(x=n,T="y",u=_,f="x",A=C):(x=r,T="x",u=C,f="y",A=_);var z=c[t.index];if(x>=z.span[0]&&x<=z.span[1]){var I=b.extendFlat({},t),O=A.c2p(x,!0),D=l.getKdeValue(z,m,x),B=l.getPositionOnKdePath(z,m,O),F=u._offset,P=u._length;I[T+"0"]=B[0],I[T+"1"]=B[1],I[f+"0"]=I[f+"1"]=O,I[f+"Label"]=f+": "+E.hoverLabelText(A,x,m[f+"hoverformat"])+", "+c[0].t.labels.kde+" "+D.toFixed(3);for(var j=0,U=0;U path").each(function(v){if(!v.isBlank){var g=h.marker;p.select(this).call(E.fill,v.mc||g.color).call(E.stroke,v.mlc||g.line.color).call(b.dashLine,g.line.dash,v.mlw||g.line.width).style("opacity",h.selectedpoints&&!v.selected?k:1)}}),t(m,h,r),m.selectAll(".regions").each(function(){p.select(this).selectAll("path").style("stroke-width",0).call(E.fill,h.connector.fillcolor)}),m.selectAll(".lines").each(function(){var v=h.connector.line;b.lineGroupStyle(p.select(this).selectAll("path"),v.width,v.color,v.dash)})})}V.exports={style:n}}}),Lz=ze({"src/traces/funnel/hover.js"(J,V){"use strict";var p=Qn().opacity,b=eg().hoverOnBars,E=Nr().formatPercent;V.exports=function(e,t,n,r,a){var o=b(e,t,n,r,a);if(o){var s=o.cd,c=s[0].trace,m=c.orientation==="h",h=o.index,v=s[h],g=m?"x":"y";o[g+"LabelVal"]=v.s,o.percentInitial=v.begR,o.percentInitialLabel=E(v.begR,1),o.percentPrevious=v.difR,o.percentPreviousLabel=E(v.difR,1),o.percentTotal=v.sumR,o.percentTotalLabel=E(v.sumR,1);var i=v.hi||c.hoverinfo,w=[];if(i&&i!=="none"&&i!=="skip"){var S=i==="all",M=i.split("+"),C=function(_){return S||M.indexOf(_)!==-1};C("percent initial")&&w.push(o.percentInitialLabel+" of initial"),C("percent previous")&&w.push(o.percentPreviousLabel+" of previous"),C("percent total")&&w.push(o.percentTotalLabel+" of total")}return o.extraText=w.join("
"),o.color=k(c,v),[o]}};function k(l,e){var t=l.marker,n=e.mc||t.color,r=e.mlc||t.line.color,a=e.mlw||t.line.width;if(p(n))return n;if(p(r)&&a)return r}}}),Pz=ze({"src/traces/funnel/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,"percentInitial"in E&&(b.percentInitial=E.percentInitial),"percentPrevious"in E&&(b.percentPrevious=E.percentPrevious),"percentTotal"in E&&(b.percentTotal=E.percentTotal),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b}}}),Rz=ze({"src/traces/funnel/index.js"(J,V){"use strict";V.exports={attributes:gT(),layoutAttributes:yT(),supplyDefaults:_T().supplyDefaults,crossTraceDefaults:_T().crossTraceDefaults,supplyLayoutDefaults:Az(),calc:Sz(),crossTraceCalc:Ez(),plot:kz(),style:Cz().style,hoverPoints:Lz(),eventData:Pz(),selectPoints:tg(),moduleType:"trace",name:"funnel",basePlotModule:Du(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Iz=ze({"lib/funnel.js"(J,V){"use strict";V.exports=Rz()}}),Dz=ze({"src/traces/waterfall/constants.js"(J,V){"use strict";V.exports={eventDataKeys:["initial","delta","final"]}}}),xT=ze({"src/traces/waterfall/attributes.js"(J,V){"use strict";var p=jd(),b=su().line,E=ws(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Dz(),r=Ki().extendFlat,a=Qn();function o(s){return{marker:{color:r({},p.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},p.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},p.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}V.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:p.x,x0:p.x0,dx:p.dx,y:p.y,y0:p.y0,dy:p.dy,xperiod:p.xperiod,yperiod:p.yperiod,xperiod0:p.xperiod0,yperiod0:p.yperiod0,xperiodalignment:p.xperiodalignment,yperiodalignment:p.yperiodalignment,xhoverformat:k("x"),yhoverformat:k("y"),hovertext:p.hovertext,hovertemplate:l({},{keys:n.eventDataKeys}),hovertemplatefallback:t(),hoverinfo:r({},E.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:e({editType:"plot"},{keys:n.eventDataKeys.concat(["label"])}),texttemplatefallback:t({editType:"plot"}),text:p.text,textposition:p.textposition,insidetextanchor:p.insidetextanchor,textangle:p.textangle,textfont:p.textfont,insidetextfont:p.insidetextfont,outsidetextfont:p.outsidetextfont,constraintext:p.constraintext,cliponaxis:p.cliponaxis,orientation:p.orientation,offset:p.offset,width:p.width,increasing:o("increasing"),decreasing:o("decreasing"),totals:o("intermediate sums and total"),connector:{line:{color:r({},b.color,{dflt:a.defaultLine}),width:r({},b.width,{editType:"plot"}),dash:b.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:p.offsetgroup,alignmentgroup:p.alignmentgroup,zorder:p.zorder}}}),bT=ze({"src/traces/waterfall/layout_attributes.js"(J,V){"use strict";V.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}}),ng=ze({"src/constants/delta.js"(J,V){"use strict";V.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),wT=ze({"src/traces/waterfall/defaults.js"(J,V){"use strict";var p=Nr(),b=Hv(),E=qh().handleText,k=Gv(),l=yd(),e=xT(),t=Qn(),n=ng(),r=n.INCREASING.COLOR,a=n.DECREASING.COLOR,o="#4499FF";function s(h,v,g){h(v+".marker.color",g),h(v+".marker.line.color",t.defaultLine),h(v+".marker.line.width")}function c(h,v,g,i){function w(T,f){return p.coerce(h,v,e,T,f)}var S=k(h,v,i,w);if(!S){v.visible=!1;return}l(h,v,i,w),w("xhoverformat"),w("yhoverformat"),w("measure"),w("orientation",v.x&&!v.y?"h":"v"),w("base"),w("offset"),w("width"),w("text"),w("hovertext"),w("hovertemplate"),w("hovertemplatefallback");var M=w("textposition");E(h,v,i,w,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(w("texttemplate"),w("texttemplatefallback"),v.texttemplate||w("textinfo")),s(w,"increasing",r),s(w,"decreasing",a),s(w,"totals",o);var C=w("connector.visible");if(C){w("connector.mode");var _=w("connector.line.width");_&&(w("connector.line.color"),w("connector.line.dash"))}w("zorder")}function m(h,v){var g,i;function w(M){return p.coerce(i._input,i,e,M)}if(v.waterfallmode==="group")for(var S=0;S0&&(w?x+="M"+u[0]+","+A[1]+"V"+A[0]:x+="M"+u[1]+","+A[0]+"H"+u[0]),S!=="between"&&(_.isSum||T path").each(function(v){if(!v.isBlank){var g=h[v.dir].marker;p.select(this).call(E.fill,g.color).call(E.stroke,g.line.color).call(b.dashLine,g.line.dash,g.line.width).style("opacity",h.selectedpoints&&!v.selected?k:1)}}),t(m,h,r),m.selectAll(".lines").each(function(){var v=h.connector.line;b.lineGroupStyle(p.select(this).selectAll("path"),v.width,v.color,v.dash)})})}V.exports={style:n}}}),jz=ze({"src/traces/waterfall/hover.js"(J,V){"use strict";var p=Gi().hoverLabelText,b=Qn().opacity,E=eg().hoverOnBars,k=ng(),l={increasing:k.INCREASING.SYMBOL,decreasing:k.DECREASING.SYMBOL};V.exports=function(n,r,a,o,s){var c=E(n,r,a,o,s);if(!c)return;var m=c.cd,h=m[0].trace,v=h.orientation==="h",g=v?"x":"y",i=v?n.xa:n.ya;function w(z){return p(i,z,h[g+"hoverformat"])}var S=c.index,M=m[S],C=M.isSum?M.b+M.s:M.rawS;c.initial=M.b+M.s-C,c.delta=C,c.final=c.initial+c.delta;var _=w(Math.abs(c.delta));c.deltaLabel=C<0?"("+_+")":_,c.finalLabel=w(c.final),c.initialLabel=w(c.initial);var T=M.hi||h.hoverinfo,f=[];if(T&&T!=="none"&&T!=="skip"){var u=T==="all",A=T.split("+"),x=function(z){return u||A.indexOf(z)!==-1};M.isSum||(x("final")&&(v?!x("x"):!x("y"))&&f.push(c.finalLabel),x("delta")&&(C<0?f.push(c.deltaLabel+" "+l.decreasing):f.push(c.deltaLabel+" "+l.increasing)),x("initial")&&f.push("Initial: "+c.initialLabel))}return f.length&&(c.extraText=f.join("
")),c.color=e(h,M),[c]};function e(t,n){var r=t[n.dir].marker,a=r.color,o=r.line.color,s=r.line.width;if(b(a))return a;if(b(o)&&s)return o}}}),Uz=ze({"src/traces/waterfall/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,"initial"in E&&(b.initial=E.initial),"delta"in E&&(b.delta=E.delta),"final"in E&&(b.final=E.final),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b}}}),qz=ze({"src/traces/waterfall/index.js"(J,V){"use strict";V.exports={attributes:xT(),layoutAttributes:bT(),supplyDefaults:wT().supplyDefaults,crossTraceDefaults:wT().crossTraceDefaults,supplyLayoutDefaults:Fz(),calc:zz(),crossTraceCalc:Bz(),plot:Oz(),style:Nz().style,hoverPoints:jz(),eventData:Uz(),selectPoints:tg(),moduleType:"trace",name:"waterfall",basePlotModule:Du(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Vz=ze({"lib/waterfall.js"(J,V){"use strict";V.exports=qz()}}),ig=ze({"src/traces/image/constants.js"(J,V){"use strict";V.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(p){return p.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(p){return p.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(p){return p.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(p){var b=p.slice(0,3);return b[1]=b[1]+"%",b[2]=b[2]+"%",b},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(p){var b=p.slice(0,4);return b[1]=b[1]+"%",b[2]=b[2]+"%",b},suffix:["\xB0","%","%",""]}}}}}),Sb={};bu(Sb,{default:()=>kT});var TT,AT,Eb,MT,ST,kb,Cb,Lb,ET,kT,CT=zi({"src/traces/image/attributes.ts"(){"use strict";TT=Yl(Ki()),AT=Yl(ws()),Eb=Yl(xs()),MT=Yl(su()),ST=Yl(ig()),kb=["rgb","rgba","rgba256","hsl","hsla"],Cb=[],Lb=[];for(let J of kb){let V=ST.colormodel[J];Cb.push(`For the \`${J}\` colormodel, it is [${(V.zminDflt||V.min).join(", ")}].`),Lb.push(`For the \`${J}\` colormodel, it is [${(V.zmaxDflt||V.max).join(", ")}].`)}ET={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:kb,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",Cb.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",Lb.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,TT.extendFlat)({},AT.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,Eb.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,Eb.templatefallbackAttrs)(),zorder:MT.zorder},kT=ET}}),Gz=ze({"src/traces/image/defaults.js"(J,V){"use strict";var p=Nr(),b=(CT(),Po(Sb)).default,E=ig(),k=ip().IMAGE_URL_PREFIX;V.exports=function(e,t){function n(o,s){return p.coerce(e,t,b,o,s)}n("source"),t.source&&!t.source.match(k)&&delete t.source,t._hasSource=!!t.source;var r=n("z");if(t._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;t._hasZ?(n("colormodel","rgb"),a=E.colormodel[t.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):t._hasSource&&(t.colormodel="rgba256",a=E.colormodel[t.colormodel],t.zmin=a.zminDflt,t.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),t._length=null,n("zorder")}}}),op=ze({"node_modules/inherits/inherits_browser.js"(J,V){typeof Object.create=="function"?V.exports=function(b,E){E&&(b.super_=E,b.prototype=Object.create(E.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}))}:V.exports=function(b,E){if(E){b.super_=E;var k=function(){};k.prototype=E.prototype,b.prototype=new k,b.prototype.constructor=b}}}}),LT=ze({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(J,V){V.exports=jv().EventEmitter}}),Hz=ze({"node_modules/base64-js/index.js"(J){"use strict";J.byteLength=t,J.toByteArray=r,J.fromByteArray=s;var V=[],p=[],b=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(k=0,l=E.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var h=c.indexOf("=");h===-1&&(h=m);var v=h===m?0:4-h%4;return[h,v]}function t(c){var m=e(c),h=m[0],v=m[1];return(h+v)*3/4-v}function n(c,m,h){return(m+h)*3/4-h}function r(c){var m,h=e(c),v=h[0],g=h[1],i=new b(n(c,v,g)),w=0,S=g>0?v-4:v,M;for(M=0;M>16&255,i[w++]=m>>8&255,i[w++]=m&255;return g===2&&(m=p[c.charCodeAt(M)]<<2|p[c.charCodeAt(M+1)]>>4,i[w++]=m&255),g===1&&(m=p[c.charCodeAt(M)]<<10|p[c.charCodeAt(M+1)]<<4|p[c.charCodeAt(M+2)]>>2,i[w++]=m>>8&255,i[w++]=m&255),i}function a(c){return V[c>>18&63]+V[c>>12&63]+V[c>>6&63]+V[c&63]}function o(c,m,h){for(var v,g=[],i=m;iS?S:w+i));return v===1?(m=c[h-1],g.push(V[m>>2]+V[m<<4&63]+"==")):v===2&&(m=(c[h-2]<<8)+c[h-1],g.push(V[m>>10]+V[m>>4&63]+V[m<<2&63]+"=")),g.join("")}}}),Wz=ze({"node_modules/ieee754/index.js"(J){J.read=function(V,p,b,E,k){var l,e,t=k*8-E-1,n=(1<>1,a=-7,o=b?k-1:0,s=b?-1:1,c=V[p+o];for(o+=s,l=c&(1<<-a)-1,c>>=-a,a+=t;a>0;l=l*256+V[p+o],o+=s,a-=8);for(e=l&(1<<-a)-1,l>>=-a,a+=E;a>0;e=e*256+V[p+o],o+=s,a-=8);if(l===0)l=1-r;else{if(l===n)return e?NaN:(c?-1:1)*(1/0);e=e+Math.pow(2,E),l=l-r}return(c?-1:1)*e*Math.pow(2,l-E)},J.write=function(V,p,b,E,k,l){var e,t,n,r=l*8-k-1,a=(1<>1,s=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=E?0:l-1,m=E?1:-1,h=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(t=isNaN(p)?1:0,e=a):(e=Math.floor(Math.log(p)/Math.LN2),p*(n=Math.pow(2,-e))<1&&(e--,n*=2),e+o>=1?p+=s/n:p+=s*Math.pow(2,1-o),p*n>=2&&(e++,n/=2),e+o>=a?(t=0,e=a):e+o>=1?(t=(p*n-1)*Math.pow(2,k),e=e+o):(t=p*Math.pow(2,o-1)*Math.pow(2,k),e=0));k>=8;V[b+c]=t&255,c+=m,t/=256,k-=8);for(e=e<0;V[b+c]=e&255,c+=m,e/=256,r-=8);V[b+c-m]|=h*128}}}),$v=ze({"node_modules/buffer/index.js"(J){"use strict";var V=Hz(),p=Wz(),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;J.Buffer=e,J.SlowBuffer=g,J.INSPECT_MAX_BYTES=50;var E=2147483647;J.kMaxLength=E,e.TYPED_ARRAY_SUPPORT=k(),!e.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 k(){try{let ce=new Uint8Array(1),ve={foo:function(){return 42}};return Object.setPrototypeOf(ve,Uint8Array.prototype),Object.setPrototypeOf(ce,ve),ce.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function l(ce){if(ce>E)throw new RangeError('The value "'+ce+'" is invalid for option "size"');let ve=new Uint8Array(ce);return Object.setPrototypeOf(ve,e.prototype),ve}function e(ce,ve,le){if(typeof ce=="number"){if(typeof ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return a(ce)}return t(ce,ve,le)}e.poolSize=8192;function t(ce,ve,le){if(typeof ce=="string")return o(ce,ve);if(ArrayBuffer.isView(ce))return c(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 "+typeof ce);if(Ie(ce,ArrayBuffer)||ce&&Ie(ce.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ce,SharedArrayBuffer)||ce&&Ie(ce.buffer,SharedArrayBuffer)))return m(ce,ve,le);if(typeof ce=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Ae=ce.valueOf&&ce.valueOf();if(Ae!=null&&Ae!==ce)return e.from(Ae,ve,le);let Be=h(ce);if(Be)return Be;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ce[Symbol.toPrimitive]=="function")return e.from(ce[Symbol.toPrimitive]("string"),ve,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ce)}e.from=function(ce,ve,le){return t(ce,ve,le)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function n(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 r(ce,ve,le){return n(ce),ce<=0?l(ce):ve!==void 0?typeof le=="string"?l(ce).fill(ve,le):l(ce).fill(ve):l(ce)}e.alloc=function(ce,ve,le){return r(ce,ve,le)};function a(ce){return n(ce),l(ce<0?0:v(ce)|0)}e.allocUnsafe=function(ce){return a(ce)},e.allocUnsafeSlow=function(ce){return a(ce)};function o(ce,ve){if((typeof ve!="string"||ve==="")&&(ve="utf8"),!e.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);let le=i(ce,ve)|0,Ae=l(le),Be=Ae.write(ce,ve);return Be!==le&&(Ae=Ae.slice(0,Be)),Ae}function s(ce){let ve=ce.length<0?0:v(ce.length)|0,le=l(ve);for(let Ae=0;Ae=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return ce|0}function g(ce){return+ce!=ce&&(ce=0),e.alloc(+ce)}e.isBuffer=function(ve){return ve!=null&&ve._isBuffer===!0&&ve!==e.prototype},e.compare=function(ve,le){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),Ie(le,Uint8Array)&&(le=e.from(le,le.offset,le.byteLength)),!e.isBuffer(ve)||!e.isBuffer(le))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ve===le)return 0;let Ae=ve.length,Be=le.length;for(let Xe=0,Ye=Math.min(Ae,Be);XeBe.length?(e.isBuffer(Ye)||(Ye=e.from(Ye)),Ye.copy(Be,Xe)):Uint8Array.prototype.set.call(Be,Ye,Xe);else if(e.isBuffer(Ye))Ye.copy(Be,Xe);else throw new TypeError('"list" argument must be an Array of Buffers');Xe+=Ye.length}return Be};function i(ce,ve){if(e.isBuffer(ce))return ce.length;if(ArrayBuffer.isView(ce)||Ie(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 '+typeof ce);let le=ce.length,Ae=arguments.length>2&&arguments[2]===!0;if(!Ae&&le===0)return 0;let Be=!1;for(;;)switch(ve){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return he(ce).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return Me(ce).length;default:if(Be)return Ae?-1:he(ce).length;ve=(""+ve).toLowerCase(),Be=!0}}e.byteLength=i;function w(ce,ve,le){let Ae=!1;if((ve===void 0||ve<0)&&(ve=0),ve>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ve>>>=0,le<=ve))return"";for(ce||(ce="utf8");;)switch(ce){case"hex":return F(this,ve,le);case"utf8":case"utf-8":return z(this,ve,le);case"ascii":return D(this,ve,le);case"latin1":case"binary":return B(this,ve,le);case"base64":return x(this,ve,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ve,le);default:if(Ae)throw new TypeError("Unknown encoding: "+ce);ce=(ce+"").toLowerCase(),Ae=!0}}e.prototype._isBuffer=!0;function S(ce,ve,le){let Ae=ce[ve];ce[ve]=ce[le],ce[le]=Ae}e.prototype.swap16=function(){let ve=this.length;if(ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let le=0;lele&&(ve+=" ... "),""},b&&(e.prototype[b]=e.prototype.inspect),e.prototype.compare=function(ve,le,Ae,Be,Xe){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),!e.isBuffer(ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ve);if(le===void 0&&(le=0),Ae===void 0&&(Ae=ve?ve.length:0),Be===void 0&&(Be=0),Xe===void 0&&(Xe=this.length),le<0||Ae>ve.length||Be<0||Xe>this.length)throw new RangeError("out of range index");if(Be>=Xe&&le>=Ae)return 0;if(Be>=Xe)return-1;if(le>=Ae)return 1;if(le>>>=0,Ae>>>=0,Be>>>=0,Xe>>>=0,this===ve)return 0;let Ye=Xe-Be,yt=Ae-le,gt=Math.min(Ye,yt),Tt=this.slice(Be,Xe),At=ve.slice(le,Ae);for(let $t=0;$t2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,Ve(le)&&(le=Be?0:ce.length-1),le<0&&(le=ce.length+le),le>=ce.length){if(Be)return-1;le=ce.length-1}else if(le<0)if(Be)le=0;else return-1;if(typeof ve=="string"&&(ve=e.from(ve,Ae)),e.isBuffer(ve))return ve.length===0?-1:C(ce,ve,le,Ae,Be);if(typeof ve=="number")return ve=ve&255,typeof Uint8Array.prototype.indexOf=="function"?Be?Uint8Array.prototype.indexOf.call(ce,ve,le):Uint8Array.prototype.lastIndexOf.call(ce,ve,le):C(ce,[ve],le,Ae,Be);throw new TypeError("val must be string, number or Buffer")}function C(ce,ve,le,Ae,Be){let Xe=1,Ye=ce.length,yt=ve.length;if(Ae!==void 0&&(Ae=String(Ae).toLowerCase(),Ae==="ucs2"||Ae==="ucs-2"||Ae==="utf16le"||Ae==="utf-16le")){if(ce.length<2||ve.length<2)return-1;Xe=2,Ye/=2,yt/=2,le/=2}function gt(At,$t){return Xe===1?At[$t]:At.readUInt16BE($t*Xe)}let Tt;if(Be){let At=-1;for(Tt=le;TtYe&&(le=Ye-yt),Tt=le;Tt>=0;Tt--){let At=!0;for(let $t=0;$tBe&&(Ae=Be)):Ae=Be;let Xe=ve.length;Ae>Xe/2&&(Ae=Xe/2);let Ye;for(Ye=0;Ye>>0,isFinite(Ae)?(Ae=Ae>>>0,Be===void 0&&(Be="utf8")):(Be=Ae,Ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Xe=this.length-le;if((Ae===void 0||Ae>Xe)&&(Ae=Xe),ve.length>0&&(Ae<0||le<0)||le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Be||(Be="utf8");let Ye=!1;for(;;)switch(Be){case"hex":return _(this,ve,le,Ae);case"utf8":case"utf-8":return T(this,ve,le,Ae);case"ascii":case"latin1":case"binary":return f(this,ve,le,Ae);case"base64":return u(this,ve,le,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,ve,le,Ae);default:if(Ye)throw new TypeError("Unknown encoding: "+Be);Be=(""+Be).toLowerCase(),Ye=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(ce,ve,le){return ve===0&&le===ce.length?V.fromByteArray(ce):V.fromByteArray(ce.slice(ve,le))}function z(ce,ve,le){le=Math.min(ce.length,le);let Ae=[],Be=ve;for(;Be239?4:Xe>223?3:Xe>191?2:1;if(Be+yt<=le){let gt,Tt,At,$t;switch(yt){case 1:Xe<128&&(Ye=Xe);break;case 2:gt=ce[Be+1],(gt&192)===128&&($t=(Xe&31)<<6|gt&63,$t>127&&(Ye=$t));break;case 3:gt=ce[Be+1],Tt=ce[Be+2],(gt&192)===128&&(Tt&192)===128&&($t=(Xe&15)<<12|(gt&63)<<6|Tt&63,$t>2047&&($t<55296||$t>57343)&&(Ye=$t));break;case 4:gt=ce[Be+1],Tt=ce[Be+2],At=ce[Be+3],(gt&192)===128&&(Tt&192)===128&&(At&192)===128&&($t=(Xe&15)<<18|(gt&63)<<12|(Tt&63)<<6|At&63,$t>65535&&$t<1114112&&(Ye=$t))}}Ye===null?(Ye=65533,yt=1):Ye>65535&&(Ye-=65536,Ae.push(Ye>>>10&1023|55296),Ye=56320|Ye&1023),Ae.push(Ye),Be+=yt}return O(Ae)}var I=4096;function O(ce){let ve=ce.length;if(ve<=I)return String.fromCharCode.apply(String,ce);let le="",Ae=0;for(;AeAe)&&(le=Ae);let Be="";for(let Xe=ve;XeAe&&(ve=Ae),le<0?(le+=Ae,le<0&&(le=0)):le>Ae&&(le=Ae),lele)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(ve,le,Ae){ve=ve>>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve],Xe=1,Ye=0;for(;++Ye>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve+--le],Xe=1;for(;le>0&&(Xe*=256);)Be+=this[ve+--le]*Xe;return Be},e.prototype.readUint8=e.prototype.readUInt8=function(ve,le){return ve=ve>>>0,le||j(ve,1,this.length),this[ve]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(ve,le){return ve=ve>>>0,le||j(ve,2,this.length),this[ve]|this[ve+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(ve,le){return ve=ve>>>0,le||j(ve,2,this.length),this[ve]<<8|this[ve+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),(this[ve]|this[ve+1]<<8|this[ve+2]<<16)+this[ve+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]*16777216+(this[ve+1]<<16|this[ve+2]<<8|this[ve+3])},e.prototype.readBigUInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=le+this[++ve]*2**8+this[++ve]*2**16+this[++ve]*2**24,Xe=this[++ve]+this[++ve]*2**8+this[++ve]*2**16+Ae*2**24;return BigInt(Be)+(BigInt(Xe)<>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=le*2**24+this[++ve]*2**16+this[++ve]*2**8+this[++ve],Xe=this[++ve]*2**24+this[++ve]*2**16+this[++ve]*2**8+Ae;return(BigInt(Be)<>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve],Xe=1,Ye=0;for(;++Ye=Xe&&(Be-=Math.pow(2,8*le)),Be},e.prototype.readIntBE=function(ve,le,Ae){ve=ve>>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=le,Xe=1,Ye=this[ve+--Be];for(;Be>0&&(Xe*=256);)Ye+=this[ve+--Be]*Xe;return Xe*=128,Ye>=Xe&&(Ye-=Math.pow(2,8*le)),Ye},e.prototype.readInt8=function(ve,le){return ve=ve>>>0,le||j(ve,1,this.length),this[ve]&128?(255-this[ve]+1)*-1:this[ve]},e.prototype.readInt16LE=function(ve,le){ve=ve>>>0,le||j(ve,2,this.length);let Ae=this[ve]|this[ve+1]<<8;return Ae&32768?Ae|4294901760:Ae},e.prototype.readInt16BE=function(ve,le){ve=ve>>>0,le||j(ve,2,this.length);let Ae=this[ve+1]|this[ve]<<8;return Ae&32768?Ae|4294901760:Ae},e.prototype.readInt32LE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]|this[ve+1]<<8|this[ve+2]<<16|this[ve+3]<<24},e.prototype.readInt32BE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]<<24|this[ve+1]<<16|this[ve+2]<<8|this[ve+3]},e.prototype.readBigInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=this[ve+4]+this[ve+5]*2**8+this[ve+6]*2**16+(Ae<<24);return(BigInt(Be)<>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=(le<<24)+this[++ve]*2**16+this[++ve]*2**8+this[++ve];return(BigInt(Be)<>>0,le||j(ve,4,this.length),p.read(this,ve,!0,23,4)},e.prototype.readFloatBE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),p.read(this,ve,!1,23,4)},e.prototype.readDoubleLE=function(ve,le){return ve=ve>>>0,le||j(ve,8,this.length),p.read(this,ve,!0,52,8)},e.prototype.readDoubleBE=function(ve,le){return ve=ve>>>0,le||j(ve,8,this.length),p.read(this,ve,!1,52,8)};function U(ce,ve,le,Ae,Be,Xe){if(!e.isBuffer(ce))throw new TypeError('"buffer" argument must be a Buffer instance');if(ve>Be||vece.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,Ae=Ae>>>0,!Be){let yt=Math.pow(2,8*Ae)-1;U(this,ve,le,Ae,yt,0)}let Xe=1,Ye=0;for(this[le]=ve&255;++Ye>>0,Ae=Ae>>>0,!Be){let yt=Math.pow(2,8*Ae)-1;U(this,ve,le,Ae,yt,0)}let Xe=Ae-1,Ye=1;for(this[le+Xe]=ve&255;--Xe>=0&&(Ye*=256);)this[le+Xe]=ve/Ye&255;return le+Ae},e.prototype.writeUint8=e.prototype.writeUInt8=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,1,255,0),this[le]=ve&255,le+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,65535,0),this[le]=ve&255,this[le+1]=ve>>>8,le+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,65535,0),this[le]=ve>>>8,this[le+1]=ve&255,le+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,4294967295,0),this[le+3]=ve>>>24,this[le+2]=ve>>>16,this[le+1]=ve>>>8,this[le]=ve&255,le+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,4294967295,0),this[le]=ve>>>24,this[le+1]=ve>>>16,this[le+2]=ve>>>8,this[le+3]=ve&255,le+4};function $(ce,ve,le,Ae,Be){Y(ve,Ae,Be,ce,le,7);let Xe=Number(ve&BigInt(4294967295));ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe;let Ye=Number(ve>>BigInt(32)&BigInt(4294967295));return ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,le}function Q(ce,ve,le,Ae,Be){Y(ve,Ae,Be,ce,le,7);let Xe=Number(ve&BigInt(4294967295));ce[le+7]=Xe,Xe=Xe>>8,ce[le+6]=Xe,Xe=Xe>>8,ce[le+5]=Xe,Xe=Xe>>8,ce[le+4]=Xe;let Ye=Number(ve>>BigInt(32)&BigInt(4294967295));return ce[le+3]=Ye,Ye=Ye>>8,ce[le+2]=Ye,Ye=Ye>>8,ce[le+1]=Ye,Ye=Ye>>8,ce[le]=Ye,le+8}e.prototype.writeBigUInt64LE=ke(function(ve,le=0){return $(this,ve,le,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=ke(function(ve,le=0){return Q(this,ve,le,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,!Be){let gt=Math.pow(2,8*Ae-1);U(this,ve,le,Ae,gt-1,-gt)}let Xe=0,Ye=1,yt=0;for(this[le]=ve&255;++Xe>0)-yt&255;return le+Ae},e.prototype.writeIntBE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,!Be){let gt=Math.pow(2,8*Ae-1);U(this,ve,le,Ae,gt-1,-gt)}let Xe=Ae-1,Ye=1,yt=0;for(this[le+Xe]=ve&255;--Xe>=0&&(Ye*=256);)ve<0&&yt===0&&this[le+Xe+1]!==0&&(yt=1),this[le+Xe]=(ve/Ye>>0)-yt&255;return le+Ae},e.prototype.writeInt8=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,1,127,-128),ve<0&&(ve=255+ve+1),this[le]=ve&255,le+1},e.prototype.writeInt16LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,32767,-32768),this[le]=ve&255,this[le+1]=ve>>>8,le+2},e.prototype.writeInt16BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,32767,-32768),this[le]=ve>>>8,this[le+1]=ve&255,le+2},e.prototype.writeInt32LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,2147483647,-2147483648),this[le]=ve&255,this[le+1]=ve>>>8,this[le+2]=ve>>>16,this[le+3]=ve>>>24,le+4},e.prototype.writeInt32BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,2147483647,-2147483648),ve<0&&(ve=4294967295+ve+1),this[le]=ve>>>24,this[le+1]=ve>>>16,this[le+2]=ve>>>8,this[le+3]=ve&255,le+4},e.prototype.writeBigInt64LE=ke(function(ve,le=0){return $(this,ve,le,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=ke(function(ve,le=0){return Q(this,ve,le,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function re(ce,ve,le,Ae,Be,Xe){if(le+Ae>ce.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function ne(ce,ve,le,Ae,Be){return ve=+ve,le=le>>>0,Be||re(ce,ve,le,4,34028234663852886e22,-34028234663852886e22),p.write(ce,ve,le,Ae,23,4),le+4}e.prototype.writeFloatLE=function(ve,le,Ae){return ne(this,ve,le,!0,Ae)},e.prototype.writeFloatBE=function(ve,le,Ae){return ne(this,ve,le,!1,Ae)};function se(ce,ve,le,Ae,Be){return ve=+ve,le=le>>>0,Be||re(ce,ve,le,8,17976931348623157e292,-17976931348623157e292),p.write(ce,ve,le,Ae,52,8),le+8}e.prototype.writeDoubleLE=function(ve,le,Ae){return se(this,ve,le,!0,Ae)},e.prototype.writeDoubleBE=function(ve,le,Ae){return se(this,ve,le,!1,Ae)},e.prototype.copy=function(ve,le,Ae,Be){if(!e.isBuffer(ve))throw new TypeError("argument should be a Buffer");if(Ae||(Ae=0),!Be&&Be!==0&&(Be=this.length),le>=ve.length&&(le=ve.length),le||(le=0),Be>0&&Be=this.length)throw new RangeError("Index out of range");if(Be<0)throw new RangeError("sourceEnd out of bounds");Be>this.length&&(Be=this.length),ve.length-le>>0,Ae=Ae===void 0?this.length:Ae>>>0,ve||(ve=0);let Xe;if(typeof ve=="number")for(Xe=le;Xe2**32?Be=K(String(le)):typeof le=="bigint"&&(Be=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Be=K(Be)),Be+="n"),Ae+=` It must be ${ve}. Received ${Be}`,Ae},RangeError);function K(ce){let ve="",le=ce.length,Ae=ce[0]==="-"?1:0;for(;le>=Ae+4;le-=3)ve=`_${ce.slice(le-3,le)}${ve}`;return`${ce.slice(0,le)}${ve}`}function H(ce,ve,le){q(ve,"offset"),(ce[ve]===void 0||ce[ve+le]===void 0)&&Z(ve,ce.length-(le+1))}function Y(ce,ve,le,Ae,Be,Xe){if(ce>le||ce3?ve===0||ve===BigInt(0)?yt=`>= 0${Ye} and < 2${Ye} ** ${(Xe+1)*8}${Ye}`:yt=`>= -(2${Ye} ** ${(Xe+1)*8-1}${Ye}) and < 2 ** ${(Xe+1)*8-1}${Ye}`:yt=`>= ${ve}${Ye} and <= ${le}${Ye}`,new G.ERR_OUT_OF_RANGE("value",yt,ce)}H(Ae,Be,Xe)}function q(ce,ve){if(typeof ce!="number")throw new G.ERR_INVALID_ARG_TYPE(ve,"number",ce)}function Z(ce,ve,le){throw Math.floor(ce)!==ce?(q(ce,le),new G.ERR_OUT_OF_RANGE(le||"offset","an integer",ce)):ve<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(le||"offset",`>= ${le?1:0} and <= ${ve}`,ce)}var ee=/[^+/0-9A-Za-z-_]/g;function ae(ce){if(ce=ce.split("=")[0],ce=ce.trim().replace(ee,""),ce.length<2)return"";for(;ce.length%4!==0;)ce=ce+"=";return ce}function he(ce,ve){ve=ve||1/0;let le,Ae=ce.length,Be=null,Xe=[];for(let Ye=0;Ye55295&&le<57344){if(!Be){if(le>56319){(ve-=3)>-1&&Xe.push(239,191,189);continue}else if(Ye+1===Ae){(ve-=3)>-1&&Xe.push(239,191,189);continue}Be=le;continue}if(le<56320){(ve-=3)>-1&&Xe.push(239,191,189),Be=le;continue}le=(Be-55296<<10|le-56320)+65536}else Be&&(ve-=3)>-1&&Xe.push(239,191,189);if(Be=null,le<128){if((ve-=1)<0)break;Xe.push(le)}else if(le<2048){if((ve-=2)<0)break;Xe.push(le>>6|192,le&63|128)}else if(le<65536){if((ve-=3)<0)break;Xe.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ve-=4)<0)break;Xe.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Xe}function xe(ce){let ve=[];for(let le=0;le>8,Be=le%256,Xe.push(Be),Xe.push(Ae);return Xe}function Me(ce){return V.toByteArray(ae(ce))}function Se(ce,ve,le,Ae){let Be;for(Be=0;Be=ve.length||Be>=ce.length);++Be)ve[Be+le]=ce[Be];return Be}function Ie(ce,ve){return ce instanceof ve||ce!=null&&ce.constructor!=null&&ce.constructor.name!=null&&ce.constructor.name===ve.name}function Ve(ce){return ce!==ce}var Ge=function(){let ce="0123456789abcdef",ve=new Array(256);for(let le=0;le<16;++le){let Ae=le*16;for(let Be=0;Be<16;++Be)ve[Ae+Be]=ce[le]+ce[Be]}return ve}();function ke(ce){return typeof BigInt>"u"?_e:ce}function _e(){throw new Error("BigInt not supported")}}}),Pb=ze({"node_modules/has-symbols/shams.js"(J,V){"use strict";V.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var b={},E=Symbol("test"),k=Object(E);if(typeof E=="string"||Object.prototype.toString.call(E)!=="[object Symbol]"||Object.prototype.toString.call(k)!=="[object Symbol]")return!1;var l=42;b[E]=l;for(var e in b)return!1;if(typeof Object.keys=="function"&&Object.keys(b).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(b).length!==0)return!1;var t=Object.getOwnPropertySymbols(b);if(t.length!==1||t[0]!==E||!Object.prototype.propertyIsEnumerable.call(b,E))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(b,E);if(n.value!==l||n.enumerable!==!0)return!1}return!0}}}),k1=ze({"node_modules/has-tostringtag/shams.js"(J,V){"use strict";var p=Pb();V.exports=function(){return p()&&!!Symbol.toStringTag}}}),Rb=ze({"node_modules/es-object-atoms/index.js"(J,V){"use strict";V.exports=Object}}),Yz=ze({"node_modules/es-errors/index.js"(J,V){"use strict";V.exports=Error}}),Xz=ze({"node_modules/es-errors/eval.js"(J,V){"use strict";V.exports=EvalError}}),Zz=ze({"node_modules/es-errors/range.js"(J,V){"use strict";V.exports=RangeError}}),$z=ze({"node_modules/es-errors/ref.js"(J,V){"use strict";V.exports=ReferenceError}}),PT=ze({"node_modules/es-errors/syntax.js"(J,V){"use strict";V.exports=SyntaxError}}),og=ze({"node_modules/es-errors/type.js"(J,V){"use strict";V.exports=TypeError}}),Kz=ze({"node_modules/es-errors/uri.js"(J,V){"use strict";V.exports=URIError}}),Jz=ze({"node_modules/math-intrinsics/abs.js"(J,V){"use strict";V.exports=Math.abs}}),Qz=ze({"node_modules/math-intrinsics/floor.js"(J,V){"use strict";V.exports=Math.floor}}),eB=ze({"node_modules/math-intrinsics/max.js"(J,V){"use strict";V.exports=Math.max}}),tB=ze({"node_modules/math-intrinsics/min.js"(J,V){"use strict";V.exports=Math.min}}),rB=ze({"node_modules/math-intrinsics/pow.js"(J,V){"use strict";V.exports=Math.pow}}),aB=ze({"node_modules/math-intrinsics/round.js"(J,V){"use strict";V.exports=Math.round}}),nB=ze({"node_modules/math-intrinsics/isNaN.js"(J,V){"use strict";V.exports=Number.isNaN||function(b){return b!==b}}}),iB=ze({"node_modules/math-intrinsics/sign.js"(J,V){"use strict";var p=nB();V.exports=function(E){return p(E)||E===0?E:E<0?-1:1}}}),oB=ze({"node_modules/gopd/gOPD.js"(J,V){"use strict";V.exports=Object.getOwnPropertyDescriptor}}),Kv=ze({"node_modules/gopd/index.js"(J,V){"use strict";var p=oB();if(p)try{p([],"length")}catch{p=null}V.exports=p}}),C1=ze({"node_modules/es-define-property/index.js"(J,V){"use strict";var p=Object.defineProperty||!1;if(p)try{p({},"a",{value:1})}catch{p=!1}V.exports=p}}),sB=ze({"node_modules/has-symbols/index.js"(J,V){"use strict";var p=typeof Symbol<"u"&&Symbol,b=Pb();V.exports=function(){return typeof p!="function"||typeof Symbol!="function"||typeof p("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:b()}}}),RT=ze({"node_modules/get-proto/Reflect.getPrototypeOf.js"(J,V){"use strict";V.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),IT=ze({"node_modules/get-proto/Object.getPrototypeOf.js"(J,V){"use strict";var p=Rb();V.exports=p.getPrototypeOf||null}}),lB=ze({"node_modules/function-bind/implementation.js"(J,V){"use strict";var p="Function.prototype.bind called on incompatible ",b=Object.prototype.toString,E=Math.max,k="[object Function]",l=function(r,a){for(var o=[],s=0;s"u"||!T?p:T(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?p:ArrayBuffer,"%ArrayIteratorPrototype%":_&&T?T([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":z,"%AsyncGenerator%":z,"%AsyncGeneratorFunction%":z,"%AsyncIteratorPrototype%":z,"%Atomics%":typeof Atomics>"u"?p:Atomics,"%BigInt%":typeof BigInt>"u"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E,"%eval%":eval,"%EvalError%":k,"%Float16Array%":typeof Float16Array>"u"?p:Float16Array,"%Float32Array%":typeof Float32Array>"u"?p:Float32Array,"%Float64Array%":typeof Float64Array>"u"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?p:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":z,"%Int8Array%":typeof Int8Array>"u"?p:Int8Array,"%Int16Array%":typeof Int16Array>"u"?p:Int16Array,"%Int32Array%":typeof Int32Array>"u"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&T?T(T([][Symbol.iterator]())):p,"%JSON%":typeof JSON=="object"?JSON:p,"%Map%":typeof Map>"u"?p:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_||!T?p:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":b,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?p:Promise,"%Proxy%":typeof Proxy>"u"?p:Proxy,"%RangeError%":l,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?p:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_||!T?p:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&T?T(""[Symbol.iterator]()):p,"%Symbol%":_?Symbol:p,"%SyntaxError%":t,"%ThrowTypeError%":C,"%TypedArray%":I,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?p:Uint32Array,"%URIError%":r,"%WeakMap%":typeof WeakMap>"u"?p:WeakMap,"%WeakRef%":typeof WeakRef>"u"?p:WeakRef,"%WeakSet%":typeof WeakSet>"u"?p:WeakSet,"%Function.prototype.call%":x,"%Function.prototype.apply%":A,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":f,"%Math.abs%":a,"%Math.floor%":o,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":m,"%Math.round%":h,"%Math.sign%":v,"%Reflect.getPrototypeOf%":u};if(T)try{null.error}catch(H){D=T(T(H)),O["%Error.prototype%"]=D}var D,B=function H(Y){var q;if(Y==="%AsyncFunction%")q=i("async function () {}");else if(Y==="%GeneratorFunction%")q=i("function* () {}");else if(Y==="%AsyncGeneratorFunction%")q=i("async function* () {}");else if(Y==="%AsyncGenerator%"){var Z=H("%AsyncGeneratorFunction%");Z&&(q=Z.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ee=H("%AsyncGenerator%");ee&&T&&(q=T(ee.prototype))}return O[Y]=q,q},F={__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=sg(),j=FT(),U=P.call(x,Array.prototype.concat),$=P.call(A,Array.prototype.splice),Q=P.call(x,String.prototype.replace),re=P.call(x,String.prototype.slice),ne=P.call(x,RegExp.prototype.exec),se=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,X=function(Y){var q=re(Y,0,1),Z=re(Y,-1);if(q==="%"&&Z!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if(Z==="%"&&q!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var ee=[];return Q(Y,se,function(ae,he,xe,we){ee[ee.length]=xe?Q(we,G,"$1"):he||ae}),ee},K=function(Y,q){var Z=Y,ee;if(j(F,Z)&&(ee=F[Z],Z="%"+ee[0]+"%"),j(O,Z)){var ae=O[Z];if(ae===z&&(ae=B(Z)),typeof ae>"u"&&!q)throw new n("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ee,name:Z,value:ae}}throw new t("intrinsic "+Y+" does not exist!")};V.exports=function(Y,q){if(typeof Y!="string"||Y.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new n('"allowMissing" argument must be a boolean');if(ne(/^%?[^%]*%?$/,Y)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Z=X(Y),ee=Z.length>0?Z[0]:"",ae=K("%"+ee+"%",q),he=ae.name,xe=ae.value,we=!1,Me=ae.alias;Me&&(ee=Me[0],$(Z,U([0,1],Me)));for(var Se=1,Ie=!0;Se=Z.length){var _e=w(xe,Ve);Ie=!!_e,Ie&&"get"in _e&&!("originalValue"in _e.get)?xe=_e.get:xe=xe[Ve]}else Ie=j(xe,Ve),xe=xe[Ve];Ie&&!we&&(O[he]=xe)}}return xe}}}),Jv=ze({"node_modules/call-bound/index.js"(J,V){"use strict";var p=Bb(),b=Fb(),E=b([p("%String.prototype.indexOf%")]);V.exports=function(l,e){var t=p(l,!!e);return typeof t=="function"&&E(l,".prototype.")>-1?b([t]):t}}}),fB=ze({"node_modules/is-arguments/index.js"(J,V){"use strict";var p=k1()(),b=Jv(),E=b("Object.prototype.toString"),k=function(n){return p&&n&&typeof n=="object"&&Symbol.toStringTag in n?!1:E(n)==="[object Arguments]"},l=function(n){return k(n)?!0:n!==null&&typeof n=="object"&&"length"in n&&typeof n.length=="number"&&n.length>=0&&E(n)!=="[object Array]"&&"callee"in n&&E(n.callee)==="[object Function]"},e=function(){return k(arguments)}();k.isLegacyArguments=l,V.exports=e?k:l}}),hB=ze({"node_modules/is-regex/index.js"(J,V){"use strict";var p=Jv(),b=k1()(),E=FT(),k=Kv(),l;b?(e=p("RegExp.prototype.exec"),t={},n=function(){throw t},r={toString:n,valueOf:n},typeof Symbol.toPrimitive=="symbol"&&(r[Symbol.toPrimitive]=n),l=function(c){if(!c||typeof c!="object")return!1;var m=k(c,"lastIndex"),h=m&&E(m,"value");if(!h)return!1;try{e(c,r)}catch(v){return v===t}}):(a=p("Object.prototype.toString"),o="[object RegExp]",l=function(c){return!c||typeof c!="object"&&typeof c!="function"?!1:a(c)===o});var e,t,n,r,a,o;V.exports=l}}),dB=ze({"node_modules/safe-regex-test/index.js"(J,V){"use strict";var p=Jv(),b=hB(),E=p("RegExp.prototype.exec"),k=og();V.exports=function(e){if(!b(e))throw new k("`regex` must be a RegExp");return function(n){return E(e,n)!==null}}}}),pB=ze({"node_modules/generator-function/index.js"(J,V){"use strict";var p=function*(){}.constructor;V.exports=()=>p}}),vB=ze({"node_modules/is-generator-function/index.js"(J,V){"use strict";var p=Jv(),b=dB(),E=b(/^\s*(?:function)?\*/),k=k1()(),l=zb(),e=p("Object.prototype.toString"),t=p("Function.prototype.toString"),n=pB();V.exports=function(a){if(typeof a!="function")return!1;if(E(t(a)))return!0;if(!k){var o=e(a);return o==="[object GeneratorFunction]"}if(!l)return!1;var s=n();return s&&l(a)===s.prototype}}}),mB=ze({"node_modules/is-callable/index.js"(J,V){"use strict";var p=Function.prototype.toString,b=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,E,k;if(typeof b=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw k}}),k={},b(function(){throw 42},null,E)}catch(w){w!==k&&(b=null)}else b=null;var l=/^\s*class\b/,e=function(S){try{var M=p.call(S);return l.test(M)}catch{return!1}},t=function(S){try{return e(S)?!1:(p.call(S),!0)}catch{return!1}},n=Object.prototype.toString,r="[object Object]",a="[object Function]",o="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",m="[object HTMLCollection]",h=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),g=function(){return!1};typeof document=="object"&&(i=document.all,n.call(i)===n.call(document.all)&&(g=function(S){if((v||!S)&&(typeof S>"u"||typeof S=="object"))try{var M=n.call(S);return(M===s||M===c||M===m||M===r)&&S("")==null}catch{}return!1}));var i;V.exports=b?function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;try{b(S,null,E)}catch(M){if(M!==k)return!1}return!e(S)&&t(S)}:function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;if(h)return t(S);if(e(S))return!1;var M=n.call(S);return M!==a&&M!==o&&!/^\[object HTML/.test(M)?!1:t(S)}}}),gB=ze({"node_modules/for-each/index.js"(J,V){"use strict";var p=mB(),b=Object.prototype.toString,E=Object.prototype.hasOwnProperty,k=function(r,a,o){for(var s=0,c=r.length;s=3&&(s=o),t(r)?k(r,a,s):typeof r=="string"?l(r,a,s):e(r,a,s)}}}),yB=ze({"node_modules/possible-typed-array-names/index.js"(J,V){"use strict";V.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),_B=ze({"node_modules/available-typed-arrays/index.js"(J,V){"use strict";var p=yB(),b=typeof globalThis>"u"?window:globalThis;V.exports=function(){for(var k=[],l=0;l3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new E("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new E("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new E("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new E("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!k&&k(e,t);if(p)p(e,t,{configurable:o===null&&c?c.configurable:!o,enumerable:r===null&&c?c.enumerable:!r,value:n,writable:a===null&&c?c.writable:!a});else if(s||!r&&!a&&!o)e[t]=n;else throw new b("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),BT=ze({"node_modules/has-property-descriptors/index.js"(J,V){"use strict";var p=C1(),b=function(){return!!p};b.hasArrayLengthDefineBug=function(){if(!p)return null;try{return p([],"length",{value:1}).length!==1}catch{return!0}},V.exports=b}}),xB=ze({"node_modules/set-function-length/index.js"(J,V){"use strict";var p=Bb(),b=zT(),E=BT()(),k=Kv(),l=og(),e=p("%Math.floor%");V.exports=function(n,r){if(typeof n!="function")throw new l("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||e(r)!==r)throw new l("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in n&&k){var c=k(n,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(s=!1)}return(o||s||!a)&&(E?b(n,"length",r,!0,!0):b(n,"length",r)),n}}}),bB=ze({"node_modules/call-bind-apply-helpers/applyBind.js"(J,V){"use strict";var p=sg(),b=Db(),E=DT();V.exports=function(){return E(p,b,arguments)}}}),L1=ze({"node_modules/call-bind/index.js"(J,V){"use strict";var p=xB(),b=C1(),E=Fb(),k=bB();V.exports=function(e){var t=E(arguments),n=1+e.length-(arguments.length-1);return p(t,n>0?n:0,!0)},b?b(V.exports,"apply",{value:k}):V.exports.apply=k}}),OT=ze({"node_modules/which-typed-array/index.js"(J,V){"use strict";var p=gB(),b=_B(),E=L1(),k=Jv(),l=Kv(),e=zb(),t=k("Object.prototype.toString"),n=k1()(),r=typeof globalThis>"u"?window:globalThis,a=b(),o=k("String.prototype.slice"),s=k("Array.prototype.indexOf",!0)||function(i,w){for(var S=0;S-1}V.exports=function(i){if(!i||typeof i!="object")return!1;if(!n){var w=o(t(i),8,-1);return v(w)?w:w!=="Object"?!1:h(i)}return l?m(i):null}}}),wB=ze({"node_modules/is-typed-array/index.js"(J,V){"use strict";var p=OT();V.exports=function(E){return!!p(E)}}}),NT=ze({"node_modules/util/support/types.js"(J){"use strict";var V=fB(),p=vB(),b=OT(),E=wB();function k(we){return we.call.bind(we)}var l=typeof BigInt<"u",e=typeof Symbol<"u",t=k(Object.prototype.toString),n=k(Number.prototype.valueOf),r=k(String.prototype.valueOf),a=k(Boolean.prototype.valueOf);l&&(o=k(BigInt.prototype.valueOf));var o;e&&(s=k(Symbol.prototype.valueOf));var s;function c(we,Me){if(typeof we!="object")return!1;try{return Me(we),!0}catch{return!1}}J.isArgumentsObject=V,J.isGeneratorFunction=p,J.isTypedArray=E;function m(we){return typeof Promise<"u"&&we instanceof Promise||we!==null&&typeof we=="object"&&typeof we.then=="function"&&typeof we.catch=="function"}J.isPromise=m;function h(we){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(we):E(we)||$(we)}J.isArrayBufferView=h;function v(we){return b(we)==="Uint8Array"}J.isUint8Array=v;function g(we){return b(we)==="Uint8ClampedArray"}J.isUint8ClampedArray=g;function i(we){return b(we)==="Uint16Array"}J.isUint16Array=i;function w(we){return b(we)==="Uint32Array"}J.isUint32Array=w;function S(we){return b(we)==="Int8Array"}J.isInt8Array=S;function M(we){return b(we)==="Int16Array"}J.isInt16Array=M;function C(we){return b(we)==="Int32Array"}J.isInt32Array=C;function _(we){return b(we)==="Float32Array"}J.isFloat32Array=_;function T(we){return b(we)==="Float64Array"}J.isFloat64Array=T;function f(we){return b(we)==="BigInt64Array"}J.isBigInt64Array=f;function u(we){return b(we)==="BigUint64Array"}J.isBigUint64Array=u;function A(we){return t(we)==="[object Map]"}A.working=typeof Map<"u"&&A(new Map);function x(we){return typeof Map>"u"?!1:A.working?A(we):we instanceof Map}J.isMap=x;function z(we){return t(we)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function I(we){return typeof Set>"u"?!1:z.working?z(we):we instanceof Set}J.isSet=I;function O(we){return t(we)==="[object WeakMap]"}O.working=typeof WeakMap<"u"&&O(new WeakMap);function D(we){return typeof WeakMap>"u"?!1:O.working?O(we):we instanceof WeakMap}J.isWeakMap=D;function B(we){return t(we)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function F(we){return B(we)}J.isWeakSet=F;function P(we){return t(we)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function j(we){return typeof ArrayBuffer>"u"?!1:P.working?P(we):we instanceof ArrayBuffer}J.isArrayBuffer=j;function U(we){return t(we)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function $(we){return typeof DataView>"u"?!1:U.working?U(we):we instanceof DataView}J.isDataView=$;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function re(we){return t(we)==="[object SharedArrayBuffer]"}function ne(we){return typeof Q>"u"?!1:(typeof re.working>"u"&&(re.working=re(new Q)),re.working?re(we):we instanceof Q)}J.isSharedArrayBuffer=ne;function se(we){return t(we)==="[object AsyncFunction]"}J.isAsyncFunction=se;function G(we){return t(we)==="[object Map Iterator]"}J.isMapIterator=G;function X(we){return t(we)==="[object Set Iterator]"}J.isSetIterator=X;function K(we){return t(we)==="[object Generator]"}J.isGeneratorObject=K;function H(we){return t(we)==="[object WebAssembly.Module]"}J.isWebAssemblyCompiledModule=H;function Y(we){return c(we,n)}J.isNumberObject=Y;function q(we){return c(we,r)}J.isStringObject=q;function Z(we){return c(we,a)}J.isBooleanObject=Z;function ee(we){return l&&c(we,o)}J.isBigIntObject=ee;function ae(we){return e&&c(we,s)}J.isSymbolObject=ae;function he(we){return Y(we)||q(we)||Z(we)||ee(we)||ae(we)}J.isBoxedPrimitive=he;function xe(we){return typeof Uint8Array<"u"&&(j(we)||ne(we))}J.isAnyArrayBuffer=xe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(we){Object.defineProperty(J,we,{enumerable:!1,value:function(){throw new Error(we+" is not supported in userland")}})})}}),jT=ze({"node_modules/util/support/isBufferBrowser.js"(J,V){V.exports=function(b){return b&&typeof b=="object"&&typeof b.copy=="function"&&typeof b.fill=="function"&&typeof b.readUInt8=="function"}}}),UT=ze({"(disabled):node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function($){for(var Q=Object.keys($),re={},ne=0;ne=ne)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),G=re[Q];Q"u")return function(){return J.deprecate(U,$).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error($);process.traceDeprecation?console.trace($):console.error($),Q=!0}return U.apply(this,arguments)}return re};var b={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!b[U])if(E.test(U)){var $=process.pid;b[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,$,Q)}}else b[U]=function(){};return b[U]};function l(U,$){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v($)?Q.showHidden=$:$&&J._extend(Q,$),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,$){var Q=l.styles[$];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,$){return U}function n(U){var $={};return U.forEach(function(Q,re){$[Q]=!0}),$}function r(U,$,Q){if(U.customInspect&&$&&A($.inspect)&&$.inspect!==J.inspect&&!($.constructor&&$.constructor.prototype===$)){var re=$.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,$);if(ne)return ne;var se=Object.keys($),G=n(se);if(U.showHidden&&(se=Object.getOwnPropertyNames($)),u($)&&(se.indexOf("message")>=0||se.indexOf("description")>=0))return o($);if(se.length===0){if(A($)){var X=$.name?": "+$.name:"";return U.stylize("[Function"+X+"]","special")}if(_($))return U.stylize(RegExp.prototype.toString.call($),"regexp");if(f($))return U.stylize(Date.prototype.toString.call($),"date");if(u($))return o($)}var K="",H=!1,Y=["{","}"];if(h($)&&(H=!0,Y=["[","]"]),A($)){var q=$.name?": "+$.name:"";K=" [Function"+q+"]"}if(_($)&&(K=" "+RegExp.prototype.toString.call($)),f($)&&(K=" "+Date.prototype.toUTCString.call($)),u($)&&(K=" "+o($)),se.length===0&&(!H||$.length==0))return Y[0]+K+Y[1];if(Q<0)return _($)?U.stylize(RegExp.prototype.toString.call($),"regexp"):U.stylize("[Object]","special");U.seen.push($);var Z;return H?Z=s(U,$,Q,G,se):Z=se.map(function(ee){return c(U,$,Q,G,ee,H)}),U.seen.pop(),m(Z,K,Y)}function a(U,$){if(C($))return U.stylize("undefined","undefined");if(S($)){var Q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w($))return U.stylize(""+$,"number");if(v($))return U.stylize(""+$,"boolean");if(g($))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,$,Q,re,ne){for(var se=[],G=0,X=$.length;G-1&&(se?X=X.split(` +`).map(function(H){return" "+H}).join(` +`).slice(2):X=` +`+X.split(` +`).map(function(H){return" "+H}).join(` +`))):X=U.stylize("[Circular]","special")),C(G)){if(se&&ne.match(/^\d+$/))return X;G=JSON.stringify(""+ne),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=U.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=U.stylize(G,"string"))}return G+": "+X}function m(U,$,Q){var re=0,ne=U.reduce(function(se,G){return re++,G.indexOf(` +`)>=0&&re++,se+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+($===""?"":$+` + `)+" "+U.join(`, + `)+" "+Q[1]:Q[0]+$+" "+U.join(", ")+" "+Q[1]}J.types=NT();function h(U){return Array.isArray(U)}J.isArray=h;function v(U){return typeof U=="boolean"}J.isBoolean=v;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function x(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=x,J.isBuffer=jT();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var U=new Date,$=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),O[U.getMonth()],$].join(" ")}J.log=function(){console.log("%s - %s",D(),J.format.apply(J,arguments))},J.inherits=op(),J._extend=function(U,$){if(!$||!T($))return U;for(var Q=Object.keys($),re=Q.length;re--;)U[Q[re]]=$[Q[re]];return U};function B(U,$){return Object.prototype.hasOwnProperty.call(U,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var Q=$[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,se=new Promise(function(K,H){re=K,ne=H}),G=[],X=0;X0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(g){var i={data:g,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var i=this.head,w=""+i.data;i=i.next;)w+=g+i.data;return w}},{key:"concat",value:function(g){if(this.length===0)return a.alloc(0);for(var i=a.allocUnsafe(g>>>0),w=this.head,S=0;w;)m(w.data,i,S),S+=w.data.length,w=w.next;return i}},{key:"consume",value:function(g,i){var w;return gM.length?M.length:g;if(C===M.length?S+=M:S+=M.slice(0,g),g-=C,g===0){C===M.length?(++w,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=M.slice(C));break}++w}return this.length-=w,S}},{key:"_getBuffer",value:function(g){var i=a.allocUnsafe(g),w=this.head,S=1;for(w.data.copy(i),g-=w.data.length;w=w.next;){var M=w.data,C=g>M.length?M.length:g;if(M.copy(i,i.length-g,0,C),g-=C,g===0){C===M.length?(++S,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=M.slice(C));break}++S}return this.length-=S,i}},{key:c,value:function(g,i){return s(this,b(b({},i),{},{depth:0,customInspect:!1}))}}]),h}()}}),qT=ze({"node_modules/readable-stream/lib/internal/streams/destroy.js"(J,V){"use strict";function p(t,n){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,t)):process.nextTick(l,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!n&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(E,r):(r._writableState.errorEmitted=!0,process.nextTick(b,r,s)):process.nextTick(b,r,s):n?(process.nextTick(E,r),n(s)):process.nextTick(E,r)}),this)}function b(t,n){l(t,n),E(t)}function E(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function k(){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 l(t,n){t.emit("error",n)}function e(t,n){var r=t._readableState,a=t._writableState;r&&r.autoDestroy||a&&a.autoDestroy?t.destroy(n):t.emit("error",n)}V.exports={destroy:p,undestroy:k,errorOrDestroy:e}}}),Qv=ze({"node_modules/readable-stream/errors-browser.js"(J,V){"use strict";function p(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r}var b={};function E(n,r,a){a||(a=Error);function o(c,m,h){return typeof r=="string"?r:r(c,m,h)}var s=function(c){p(m,c);function m(h,v,g){return c.call(this,o(h,v,g))||this}return m}(a);s.prototype.name=a.name,s.prototype.code=n,b[n]=s}function k(n,r){if(Array.isArray(n)){var a=n.length;return n=n.map(function(o){return String(o)}),a>2?"one of ".concat(r," ").concat(n.slice(0,a-1).join(", "),", or ")+n[a-1]:a===2?"one of ".concat(r," ").concat(n[0]," or ").concat(n[1]):"of ".concat(r," ").concat(n[0])}else return"of ".concat(r," ").concat(String(n))}function l(n,r,a){return n.substr(!a||a<0?0:+a,r.length)===r}function e(n,r,a){return(a===void 0||a>n.length)&&(a=n.length),n.substring(a-r.length,a)===r}function t(n,r,a){return typeof a!="number"&&(a=0),a+r.length>n.length?!1:n.indexOf(r,a)!==-1}E("ERR_INVALID_OPT_VALUE",function(n,r){return'The value "'+r+'" is invalid for option "'+n+'"'},TypeError),E("ERR_INVALID_ARG_TYPE",function(n,r,a){var o;typeof r=="string"&&l(r,"not ")?(o="must not be",r=r.replace(/^not /,"")):o="must be";var s;if(e(n," argument"))s="The ".concat(n," ").concat(o," ").concat(k(r,"type"));else{var c=t(n,".")?"property":"argument";s='The "'.concat(n,'" ').concat(c," ").concat(o," ").concat(k(r,"type"))}return s+=". Received type ".concat(typeof a),s},TypeError),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),E("ERR_METHOD_NOT_IMPLEMENTED",function(n){return"The "+n+" method is not implemented"}),E("ERR_STREAM_PREMATURE_CLOSE","Premature close"),E("ERR_STREAM_DESTROYED",function(n){return"Cannot call "+n+" after a stream was destroyed"}),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),E("ERR_STREAM_WRITE_AFTER_END","write after end"),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_UNKNOWN_ENCODING",function(n){return"Unknown encoding: "+n},TypeError),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),V.exports.codes=b}}),VT=ze({"node_modules/readable-stream/lib/internal/streams/state.js"(J,V){"use strict";var p=Qv().codes.ERR_INVALID_OPT_VALUE;function b(k,l,e){return k.highWaterMark!=null?k.highWaterMark:l?k[e]:null}function E(k,l,e,t){var n=b(l,t,e);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var r=t?e:"highWaterMark";throw new p(r,n)}return Math.floor(n)}return k.objectMode?16:16*1024}V.exports={getHighWaterMark:E}}}),AB=ze({"node_modules/util-deprecate/browser.js"(J,V){V.exports=p;function p(E,k){if(b("noDeprecation"))return E;var l=!1;function e(){if(!l){if(b("throwDeprecation"))throw new Error(k);b("traceDeprecation")?console.trace(k):console.warn(k),l=!0}return E.apply(this,arguments)}return e}function b(E){try{if(!window.localStorage)return!1}catch{return!1}var k=window.localStorage[E];return k==null?!1:String(k).toLowerCase()==="true"}}}),GT=ze({"node_modules/readable-stream/lib/_stream_writable.js"(J,V){"use strict";V.exports=f;function p(G){var X=this;this.next=null,this.entry=null,this.finish=function(){se(X,G)}}var b;f.WritableState=_;var E={deprecate:AB()},k=LT(),l=$v().Buffer,e=(typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function t(G){return l.from(G)}function n(G){return l.isBuffer(G)||G instanceof e}var r=qT(),a=VT(),o=a.getHighWaterMark,s=Qv().codes,c=s.ERR_INVALID_ARG_TYPE,m=s.ERR_METHOD_NOT_IMPLEMENTED,h=s.ERR_MULTIPLE_CALLBACK,v=s.ERR_STREAM_CANNOT_PIPE,g=s.ERR_STREAM_DESTROYED,i=s.ERR_STREAM_NULL_VALUES,w=s.ERR_STREAM_WRITE_AFTER_END,S=s.ERR_UNKNOWN_ENCODING,M=r.errorOrDestroy;op()(f,k);function C(){}function _(G,X,K){b=b||e0(),G=G||{},typeof K!="boolean"&&(K=X instanceof b),this.objectMode=!!G.objectMode,K&&(this.objectMode=this.objectMode||!!G.writableObjectMode),this.highWaterMark=o(this,G,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var H=G.decodeStrings===!1;this.decodeStrings=!H,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){B(X,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new p(this)}_.prototype.getBuffer=function(){for(var X=this.bufferedRequest,K=[];X;)K.push(X),X=X.next;return K},function(){try{Object.defineProperty(_.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(f,Symbol.hasInstance,{value:function(X){return T.call(this,X)?!0:this!==f?!1:X&&X._writableState instanceof _}})):T=function(X){return X instanceof this};function f(G){b=b||e0();var X=this instanceof b;if(!X&&!T.call(f,this))return new f(G);this._writableState=new _(G,this,X),this.writable=!0,G&&(typeof G.write=="function"&&(this._write=G.write),typeof G.writev=="function"&&(this._writev=G.writev),typeof G.destroy=="function"&&(this._destroy=G.destroy),typeof G.final=="function"&&(this._final=G.final)),k.call(this)}f.prototype.pipe=function(){M(this,new v)};function u(G,X){var K=new w;M(G,K),process.nextTick(X,K)}function A(G,X,K,H){var Y;return K===null?Y=new i:typeof K!="string"&&!X.objectMode&&(Y=new c("chunk",["string","Buffer"],K)),Y?(M(G,Y),process.nextTick(H,Y),!1):!0}f.prototype.write=function(G,X,K){var H=this._writableState,Y=!1,q=!H.objectMode&&n(G);return q&&!l.isBuffer(G)&&(G=t(G)),typeof X=="function"&&(K=X,X=null),q?X="buffer":X||(X=H.defaultEncoding),typeof K!="function"&&(K=C),H.ending?u(this,K):(q||A(this,H,G,K))&&(H.pendingcb++,Y=z(this,H,q,G,X,K)),Y},f.prototype.cork=function(){this._writableState.corked++},f.prototype.uncork=function(){var G=this._writableState;G.corked&&(G.corked--,!G.writing&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&j(this,G))},f.prototype.setDefaultEncoding=function(X){if(typeof X=="string"&&(X=X.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((X+"").toLowerCase())>-1))throw new S(X);return this._writableState.defaultEncoding=X,this},Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(G,X,K){return!G.objectMode&&G.decodeStrings!==!1&&typeof X=="string"&&(X=l.from(X,K)),X}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(G,X,K,H,Y,q){if(!K){var Z=x(X,H,Y);H!==Z&&(K=!0,Y="buffer",H=Z)}var ee=X.objectMode?1:H.length;X.length+=ee;var ae=X.length>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function e(g,i,w){var S=i.length-1;if(S=0?(M>0&&(g.lastNeed=M-1),M):--S=0?(M>0&&(g.lastNeed=M-2),M):--S=0?(M>0&&(M===2?M=0:g.lastNeed=M-3),M):0))}function t(g,i,w){if((i[0]&192)!==128)return g.lastNeed=0,"\uFFFD";if(g.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return g.lastNeed=1,"\uFFFD";if(g.lastNeed>2&&i.length>2&&(i[2]&192)!==128)return g.lastNeed=2,"\uFFFD"}}function n(g){var i=this.lastTotal-this.lastNeed,w=t(this,g,i);if(w!==void 0)return w;if(this.lastNeed<=g.length)return g.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,i,0,g.length),this.lastNeed-=g.length}function r(g,i){var w=e(this,g,i);if(!this.lastNeed)return g.toString("utf8",i);this.lastTotal=w;var S=g.length-(w-this.lastNeed);return g.copy(this.lastChar,0,S),g.toString("utf8",i,S)}function a(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+"\uFFFD":i}function o(g,i){if((g.length-i)%2===0){var w=g.toString("utf16le",i);if(w){var S=w.charCodeAt(w.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",i,g.length-1)}function s(g){var i=g&&g.length?this.write(g):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,w)}return i}function c(g,i){var w=(g.length-i)%3;return w===0?g.toString("base64",i):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",i,g.length-w))}function m(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function h(g){return g.toString(this.encoding)}function v(g){return g&&g.length?this.write(g):""}}}),Ob=ze({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(J,V){"use strict";var p=Qv().codes.ERR_STREAM_PREMATURE_CLOSE;function b(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a0)if(typeof ee!="string"&&!we.objectMode&&Object.getPrototypeOf(ee)!==l.prototype&&(ee=t(ee)),he)we.endEmitted?_(Z,new w):z(Z,we,ee,!0);else if(we.ended)_(Z,new g);else{if(we.destroyed)return!1;we.reading=!1,we.decoder&&!ae?(ee=we.decoder.write(ee),we.objectMode||ee.length!==0?z(Z,we,ee,!1):U(Z,we)):z(Z,we,ee,!1)}else he||(we.reading=!1,U(Z,we))}return!we.ended&&(we.length=O?Z=O:(Z--,Z|=Z>>>1,Z|=Z>>>2,Z|=Z>>>4,Z|=Z>>>8,Z|=Z>>>16,Z++),Z}function B(Z,ee){return Z<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:Z!==Z?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(Z>ee.highWaterMark&&(ee.highWaterMark=D(Z)),Z<=ee.length?Z:ee.ended?ee.length:(ee.needReadable=!0,0))}A.prototype.read=function(Z){a("read",Z),Z=parseInt(Z,10);var ee=this._readableState,ae=Z;if(Z!==0&&(ee.emittedReadable=!1),Z===0&&ee.needReadable&&((ee.highWaterMark!==0?ee.length>=ee.highWaterMark:ee.length>0)||ee.ended))return a("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?H(this):P(this),null;if(Z=B(Z,ee),Z===0&&ee.ended)return ee.length===0&&H(this),null;var he=ee.needReadable;a("need readable",he),(ee.length===0||ee.length-Z0?xe=K(Z,ee):xe=null,xe===null?(ee.needReadable=ee.length<=ee.highWaterMark,Z=0):(ee.length-=Z,ee.awaitDrain=0),ee.length===0&&(ee.ended||(ee.needReadable=!0),ae!==Z&&ee.ended&&H(this)),xe!==null&&this.emit("data",xe),xe};function F(Z,ee){if(a("onEofChunk"),!ee.ended){if(ee.decoder){var ae=ee.decoder.end();ae&&ae.length&&(ee.buffer.push(ae),ee.length+=ee.objectMode?1:ae.length)}ee.ended=!0,ee.sync?P(Z):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,j(Z)))}}function P(Z){var ee=Z._readableState;a("emitReadable",ee.needReadable,ee.emittedReadable),ee.needReadable=!1,ee.emittedReadable||(a("emitReadable",ee.flowing),ee.emittedReadable=!0,process.nextTick(j,Z))}function j(Z){var ee=Z._readableState;a("emitReadable_",ee.destroyed,ee.length,ee.ended),!ee.destroyed&&(ee.length||ee.ended)&&(Z.emit("readable"),ee.emittedReadable=!1),ee.needReadable=!ee.flowing&&!ee.ended&&ee.length<=ee.highWaterMark,X(Z)}function U(Z,ee){ee.readingMore||(ee.readingMore=!0,process.nextTick($,Z,ee))}function $(Z,ee){for(;!ee.reading&&!ee.ended&&(ee.length1&&q(he.pipes,Z)!==-1)&&!Ve&&(a("false write response, pause",he.awaitDrain),he.awaitDrain++),ae.pause())}function _e(Ae){a("onerror",Ae),le(),Z.removeListener("error",_e),E(Z,"error")===0&&_(Z,Ae)}f(Z,"error",_e);function ce(){Z.removeListener("finish",ve),le()}Z.once("close",ce);function ve(){a("onfinish"),Z.removeListener("close",ce),le()}Z.once("finish",ve);function le(){a("unpipe"),ae.unpipe(Z)}return Z.emit("pipe",ae),he.flowing||(a("pipe resume"),ae.resume()),Z};function Q(Z){return function(){var ae=Z._readableState;a("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&E(Z,"data")&&(ae.flowing=!0,X(Z))}}A.prototype.unpipe=function(Z){var ee=this._readableState,ae={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return Z&&Z!==ee.pipes?this:(Z||(Z=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,Z&&Z.emit("unpipe",this,ae),this);if(!Z){var he=ee.pipes,xe=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var we=0;we0,he.flowing!==!1&&this.resume()):Z==="readable"&&!he.endEmitted&&!he.readableListening&&(he.readableListening=he.needReadable=!0,he.flowing=!1,he.emittedReadable=!1,a("on readable",he.length,he.reading),he.length?P(this):he.reading||process.nextTick(ne,this)),ae},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(Z,ee){var ae=k.prototype.removeListener.call(this,Z,ee);return Z==="readable"&&process.nextTick(re,this),ae},A.prototype.removeAllListeners=function(Z){var ee=k.prototype.removeAllListeners.apply(this,arguments);return(Z==="readable"||Z===void 0)&&process.nextTick(re,this),ee};function re(Z){var ee=Z._readableState;ee.readableListening=Z.listenerCount("readable")>0,ee.resumeScheduled&&!ee.paused?ee.flowing=!0:Z.listenerCount("data")>0&&Z.resume()}function ne(Z){a("readable nexttick read 0"),Z.read(0)}A.prototype.resume=function(){var Z=this._readableState;return Z.flowing||(a("resume"),Z.flowing=!Z.readableListening,se(this,Z)),Z.paused=!1,this};function se(Z,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,process.nextTick(G,Z,ee))}function G(Z,ee){a("resume",ee.reading),ee.reading||Z.read(0),ee.resumeScheduled=!1,Z.emit("resume"),X(Z),ee.flowing&&!ee.reading&&Z.read(0)}A.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function X(Z){var ee=Z._readableState;for(a("flow",ee.flowing);ee.flowing&&Z.read()!==null;);}A.prototype.wrap=function(Z){var ee=this,ae=this._readableState,he=!1;Z.on("end",function(){if(a("wrapped end"),ae.decoder&&!ae.ended){var Me=ae.decoder.end();Me&&Me.length&&ee.push(Me)}ee.push(null)}),Z.on("data",function(Me){if(a("wrapped data"),ae.decoder&&(Me=ae.decoder.write(Me)),!(ae.objectMode&&Me==null)&&!(!ae.objectMode&&(!Me||!Me.length))){var Se=ee.push(Me);Se||(he=!0,Z.pause())}});for(var xe in Z)this[xe]===void 0&&typeof Z[xe]=="function"&&(this[xe]=function(Se){return function(){return Z[Se].apply(Z,arguments)}}(xe));for(var we=0;we=ee.length?(ee.decoder?ae=ee.buffer.join(""):ee.buffer.length===1?ae=ee.buffer.first():ae=ee.buffer.concat(ee.length),ee.buffer.clear()):ae=ee.buffer.consume(Z,ee.decoder),ae}function H(Z){var ee=Z._readableState;a("endReadable",ee.endEmitted),ee.endEmitted||(ee.ended=!0,process.nextTick(Y,ee,Z))}function Y(Z,ee){if(a("endReadableNT",Z.endEmitted,Z.length),!Z.endEmitted&&Z.length===0&&(Z.endEmitted=!0,ee.readable=!1,ee.emit("end"),Z.autoDestroy)){var ae=ee._writableState;(!ae||ae.autoDestroy&&ae.finished)&&ee.destroy()}}typeof Symbol=="function"&&(A.from=function(Z,ee){return C===void 0&&(C=EB()),C(A,Z,ee)});function q(Z,ee){for(var ae=0,he=Z.length;ae0;return n(w,M,C,function(_){g||(g=_),_&&i.forEach(r),!M&&(i.forEach(r),v(g))})});return m.reduce(a)}V.exports=s}}),LB=ze({"node_modules/stream-browserify/index.js"(J,V){V.exports=E;var p=jv().EventEmitter,b=op();b(E,p),E.Readable=WT(),E.Writable=GT(),E.Duplex=e0(),E.Transform=YT(),E.PassThrough=kB(),E.finished=Ob(),E.pipeline=CB(),E.Stream=E;function E(){p.call(this)}E.prototype.pipe=function(k,l){var e=this;function t(m){k.writable&&k.write(m)===!1&&e.pause&&e.pause()}e.on("data",t);function n(){e.readable&&e.resume&&e.resume()}k.on("drain",n),!k._isStdio&&(!l||l.end!==!1)&&(e.on("end",a),e.on("close",o));var r=!1;function a(){r||(r=!0,k.end())}function o(){r||(r=!0,typeof k.destroy=="function"&&k.destroy())}function s(m){if(c(),p.listenerCount(this,"error")===0)throw m}e.on("error",s),k.on("error",s);function c(){e.removeListener("data",t),k.removeListener("drain",n),e.removeListener("end",a),e.removeListener("close",o),e.removeListener("error",s),k.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),k.removeListener("close",c)}return e.on("end",c),e.on("close",c),k.on("close",c),k.emit("pipe",e),k}}}),lg=ze({"node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function($){for(var Q=Object.keys($),re={},ne=0;ne=ne)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),G=re[Q];Q"u")return function(){return J.deprecate(U,$).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error($);process.traceDeprecation?console.trace($):console.error($),Q=!0}return U.apply(this,arguments)}return re};var b={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!b[U])if(E.test(U)){var $=process.pid;b[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,$,Q)}}else b[U]=function(){};return b[U]};function l(U,$){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v($)?Q.showHidden=$:$&&J._extend(Q,$),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,$){var Q=l.styles[$];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,$){return U}function n(U){var $={};return U.forEach(function(Q,re){$[Q]=!0}),$}function r(U,$,Q){if(U.customInspect&&$&&A($.inspect)&&$.inspect!==J.inspect&&!($.constructor&&$.constructor.prototype===$)){var re=$.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,$);if(ne)return ne;var se=Object.keys($),G=n(se);if(U.showHidden&&(se=Object.getOwnPropertyNames($)),u($)&&(se.indexOf("message")>=0||se.indexOf("description")>=0))return o($);if(se.length===0){if(A($)){var X=$.name?": "+$.name:"";return U.stylize("[Function"+X+"]","special")}if(_($))return U.stylize(RegExp.prototype.toString.call($),"regexp");if(f($))return U.stylize(Date.prototype.toString.call($),"date");if(u($))return o($)}var K="",H=!1,Y=["{","}"];if(h($)&&(H=!0,Y=["[","]"]),A($)){var q=$.name?": "+$.name:"";K=" [Function"+q+"]"}if(_($)&&(K=" "+RegExp.prototype.toString.call($)),f($)&&(K=" "+Date.prototype.toUTCString.call($)),u($)&&(K=" "+o($)),se.length===0&&(!H||$.length==0))return Y[0]+K+Y[1];if(Q<0)return _($)?U.stylize(RegExp.prototype.toString.call($),"regexp"):U.stylize("[Object]","special");U.seen.push($);var Z;return H?Z=s(U,$,Q,G,se):Z=se.map(function(ee){return c(U,$,Q,G,ee,H)}),U.seen.pop(),m(Z,K,Y)}function a(U,$){if(C($))return U.stylize("undefined","undefined");if(S($)){var Q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w($))return U.stylize(""+$,"number");if(v($))return U.stylize(""+$,"boolean");if(g($))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,$,Q,re,ne){for(var se=[],G=0,X=$.length;G-1&&(se?X=X.split(` +`).map(function(H){return" "+H}).join(` +`).slice(2):X=` +`+X.split(` +`).map(function(H){return" "+H}).join(` +`))):X=U.stylize("[Circular]","special")),C(G)){if(se&&ne.match(/^\d+$/))return X;G=JSON.stringify(""+ne),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=U.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=U.stylize(G,"string"))}return G+": "+X}function m(U,$,Q){var re=0,ne=U.reduce(function(se,G){return re++,G.indexOf(` +`)>=0&&re++,se+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+($===""?"":$+` + `)+" "+U.join(`, + `)+" "+Q[1]:Q[0]+$+" "+U.join(", ")+" "+Q[1]}J.types=NT();function h(U){return Array.isArray(U)}J.isArray=h;function v(U){return typeof U=="boolean"}J.isBoolean=v;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function x(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=x,J.isBuffer=jT();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var U=new Date,$=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),O[U.getMonth()],$].join(" ")}J.log=function(){console.log("%s - %s",D(),J.format.apply(J,arguments))},J.inherits=op(),J._extend=function(U,$){if(!$||!T($))return U;for(var Q=Object.keys($),re=Q.length;re--;)U[Q[re]]=$[Q[re]];return U};function B(U,$){return Object.prototype.hasOwnProperty.call(U,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var Q=$[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,se=new Promise(function(K,H){re=K,ne=H}),G=[],X=0;X"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(C){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},c(C)}var m={},h,v;function g(C,_,T){T||(T=Error);function f(A,x,z){return typeof _=="string"?_:_(A,x,z)}var u=function(A){t(z,A);var x=r(z);function z(I,O,D){var B;return e(this,z),B=x.call(this,f(I,O,D)),B.code=C,B}return E(z)}(T);m[C]=u}function i(C,_){if(Array.isArray(C)){var T=C.length;return C=C.map(function(f){return String(f)}),T>2?"one of ".concat(_," ").concat(C.slice(0,T-1).join(", "),", or ")+C[T-1]:T===2?"one of ".concat(_," ").concat(C[0]," or ").concat(C[1]):"of ".concat(_," ").concat(C[0])}else return"of ".concat(_," ").concat(String(C))}function w(C,_,T){return C.substr(!T||T<0?0:+T,_.length)===_}function S(C,_,T){return(T===void 0||T>C.length)&&(T=C.length),C.substring(T-_.length,T)===_}function M(C,_,T){return typeof T!="number"&&(T=0),T+_.length>C.length?!1:C.indexOf(_,T)!==-1}g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",function(C,_,T){h===void 0&&(h=jb()),h(typeof C=="string","'name' must be a string");var f;typeof _=="string"&&w(_,"not ")?(f="must not be",_=_.replace(/^not /,"")):f="must be";var u;if(S(C," argument"))u="The ".concat(C," ").concat(f," ").concat(i(_,"type"));else{var A=M(C,".")?"property":"argument";u='The "'.concat(C,'" ').concat(A," ").concat(f," ").concat(i(_,"type"))}return u+=". Received type ".concat(p(T)),u},TypeError),g("ERR_INVALID_ARG_VALUE",function(C,_){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";v===void 0&&(v=lg());var f=v.inspect(_);return f.length>128&&(f="".concat(f.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(T,". Received ").concat(f)},TypeError,RangeError),g("ERR_INVALID_RETURN_VALUE",function(C,_,T){var f;return T&&T.constructor&&T.constructor.name?f="instance of ".concat(T.constructor.name):f="type ".concat(p(T)),"Expected ".concat(C,' to be returned from the "').concat(_,'"')+" function but got ".concat(f,".")},TypeError),g("ERR_MISSING_ARGS",function(){for(var C=arguments.length,_=new Array(C),T=0;T0,"At least one arg needs to be specified");var f="The ",u=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),u){case 1:f+="".concat(_[0]," argument");break;case 2:f+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:f+=_.slice(0,u-1).join(", "),f+=", and ".concat(_[u-1]," arguments");break}return"".concat(f," must be specified")},TypeError),V.exports.codes=m}}),PB=ze({"node_modules/assert/build/internal/assert/assertion_error.js"(J,V){"use strict";function p(j,U){var $=Object.keys(j);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(j);U&&(Q=Q.filter(function(re){return Object.getOwnPropertyDescriptor(j,re).enumerable})),$.push.apply($,Q)}return $}function b(j){for(var U=1;U"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 v(j){return Function.toString.call(j).indexOf("[native code]")!==-1}function g(j,U){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,re){return Q.__proto__=re,Q},g(j,U)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($){return $.__proto__||Object.getPrototypeOf($)},i(j)}function w(j){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},w(j)}var S=lg(),M=S.inspect,C=XT(),_=C.codes.ERR_INVALID_ARG_TYPE;function T(j,U,$){return($===void 0||$>j.length)&&($=j.length),j.substring($-U.length,$)===U}function f(j,U){if(U=Math.floor(U),j.length==0||U==0)return"";var $=j.length*U;for(U=Math.floor(Math.log(U)/Math.log(2));U;)j+=j,U--;return j+=j.substring(0,$-j.length),j}var u="",A="",x="",z="",I={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:"},O=10;function D(j){var U=Object.keys(j),$=Object.create(Object.getPrototypeOf(j));return U.forEach(function(Q){$[Q]=j[Q]}),Object.defineProperty($,"message",{value:j.message}),$}function B(j){return M(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(j,U,$){var Q="",re="",ne=0,se="",G=!1,X=B(j),K=X.split(` +`),H=B(U).split(` +`),Y=0,q="";if($==="strictEqual"&&w(j)==="object"&&w(U)==="object"&&j!==null&&U!==null&&($="strictEqualObject"),K.length===1&&H.length===1&&K[0]!==H[0]){var Z=K[0].length+H[0].length;if(Z<=O){if((w(j)!=="object"||j===null)&&(w(U)!=="object"||U===null)&&(j!==0||U!==0))return"".concat(I[$],` + +`)+"".concat(K[0]," !== ").concat(H[0],` +`)}else if($!=="strictEqualObject"){var ee=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Z2&&(q=` + `.concat(f(" ",Y),"^"),Y=0)}}}for(var ae=K[K.length-1],he=H[H.length-1];ae===he&&(Y++<2?se=` + `.concat(ae).concat(se):Q=ae,K.pop(),H.pop(),!(K.length===0||H.length===0));)ae=K[K.length-1],he=H[H.length-1];var xe=Math.max(K.length,H.length);if(xe===0){var we=X.split(` +`);if(we.length>30)for(we[26]="".concat(u,"...").concat(z);we.length>27;)we.pop();return"".concat(I.notIdentical,` + +`).concat(we.join(` `),` -`)}V>3&&(J=` -`.concat(b,"...").concat(F).concat(J),N=!0),$!==""&&(J=` - `.concat($).concat(J),$="");var ue=0,fe=D[G]+` -`.concat(S,"+ actual").concat(F," ").concat(A,"- expected").concat(F),pe=" ".concat(b,"...").concat(F," Lines skipped");for(V=0;V1&&V>2&&(we>4?(X+=` -`.concat(b,"...").concat(F),N=!0):we>3&&(X+=` - `.concat(U[V-2]),ue++),X+=` - `.concat(U[V-1]),ue++),Z=V,$+=` -`.concat(A,"-").concat(F," ").concat(U[V]),ue++;else if(U.length1&&V>2&&(we>4?(X+=` -`.concat(b,"...").concat(F),N=!0):we>3&&(X+=` - `.concat(W[V-2]),ue++),X+=` - `.concat(W[V-1]),ue++),Z=V,X+=` -`.concat(S,"+").concat(F," ").concat(W[V]),ue++;else{var xe=U[V],he=W[V],oe=he!==xe&&(!k(he,",")||he.slice(0,-1)!==xe);oe&&k(xe,",")&&xe.slice(0,-1)===he&&(oe=!1,he+=","),oe?(we>1&&V>2&&(we>4?(X+=` -`.concat(b,"...").concat(F),N=!0):we>3&&(X+=` - `.concat(W[V-2]),ue++),X+=` - `.concat(W[V-1]),ue++),Z=V,X+=` -`.concat(S,"+").concat(F," ").concat(he),$+=` -`.concat(A,"-").concat(F," ").concat(xe),ue+=2):(X+=$,$="",(we===1||V===0)&&(X+=` - `.concat(he),ue++))}if(ue>20&&V30)for(q[26]="".concat(b,"...").concat(F);q.length>27;)q.pop();q.length===1?Z=G.call(this,"".concat(j," ").concat(q[0])):Z=G.call(this,"".concat(j,` - -`).concat(q.join(` +`)}Y>3&&(se=` +`.concat(u,"...").concat(z).concat(se),G=!0),Q!==""&&(se=` + `.concat(Q).concat(se),Q="");var Me=0,Se=I[$]+` +`.concat(A,"+ actual").concat(z," ").concat(x,"- expected").concat(z),Ie=" ".concat(u,"...").concat(z," Lines skipped");for(Y=0;Y1&&Y>2&&(Ve>4?(re+=` +`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` + `.concat(H[Y-2]),Me++),re+=` + `.concat(H[Y-1]),Me++),ne=Y,Q+=` +`.concat(x,"-").concat(z," ").concat(H[Y]),Me++;else if(H.length1&&Y>2&&(Ve>4?(re+=` +`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` + `.concat(K[Y-2]),Me++),re+=` + `.concat(K[Y-1]),Me++),ne=Y,re+=` +`.concat(A,"+").concat(z," ").concat(K[Y]),Me++;else{var Ge=H[Y],ke=K[Y],_e=ke!==Ge&&(!T(ke,",")||ke.slice(0,-1)!==Ge);_e&&T(Ge,",")&&Ge.slice(0,-1)===ke&&(_e=!1,ke+=","),_e?(Ve>1&&Y>2&&(Ve>4?(re+=` +`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` + `.concat(K[Y-2]),Me++),re+=` + `.concat(K[Y-1]),Me++),ne=Y,re+=` +`.concat(A,"+").concat(z," ").concat(ke),Q+=` +`.concat(x,"-").concat(z," ").concat(Ge),Me+=2):(re+=Q,Q="",(Ve===1||Y===0)&&(re+=` + `.concat(ke),Me++))}if(Me>20&&Y30)for(Z[26]="".concat(u,"...").concat(z);Z.length>27;)Z.pop();Z.length===1?ne=$.call(this,"".concat(q," ").concat(Z[0])):ne=$.call(this,"".concat(q,` + +`).concat(Z.join(` `),` -`))}else{var Y=z(W),K="",re=D[N];N==="notDeepEqual"||N==="notEqual"?(Y="".concat(D[N],` +`))}else{var ee=B(K),ae="",he=I[G];G==="notDeepEqual"||G==="notEqual"?(ee="".concat(I[G],` -`).concat(Y),Y.length>1024&&(Y="".concat(Y.slice(0,1021),"..."))):(K="".concat(z(U)),Y.length>512&&(Y="".concat(Y.slice(0,509),"...")),K.length>512&&(K="".concat(K.slice(0,509),"...")),N==="deepEqual"||N==="equal"?Y="".concat(re,` +`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(ae="".concat(B(H)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),ae.length>512&&(ae="".concat(ae.slice(0,509),"...")),G==="deepEqual"||G==="equal"?ee="".concat(he,` -`).concat(Y,` +`).concat(ee,` should equal -`):K=" ".concat(N," ").concat(K)),Z=G.call(this,"".concat(Y).concat(K))}return Error.stackTraceLimit=V,Z.generatedMessage=!J,Object.defineProperty(d(Z),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),Z.code="ERR_ASSERTION",Z.actual=W,Z.expected=U,Z.operator=N,Error.captureStackTrace&&Error.captureStackTrace(d(Z),H),Z.stack,Z.name="AssertionError",h(Z)}return l($,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:O,value:function(Z,J){return M(this,a(a({},J),{},{customInspect:!1,depth:0}))}}]),$})(p(Error),M.custom);r.exports=L}}),$L=ye({"node_modules/object-keys/isArguments.js"(e,r){"use strict";var t=Object.prototype.toString;r.exports=function(i){var o=t.call(i),s=o==="[object Arguments]";return s||(s=o!=="[object Array]"&&i!==null&&typeof i=="object"&&typeof i.length=="number"&&i.length>=0&&t.call(i.callee)==="[object Function]"),s}}}),Iie=ye({"node_modules/object-keys/implementation.js"(e,r){"use strict";var t;Object.keys||(a=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=$L(),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),n=s.call(function(){},"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(p){var g=p.constructor;return g&&g.prototype===p},f={$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},h=(function(){if(typeof window>"u")return!1;for(var p in window)try{if(!f["$"+p]&&a.call(window,p)&&window[p]!==null&&typeof window[p]=="object")try{c(window[p])}catch{return!0}}catch{return!0}return!1})(),d=function(p){if(typeof window>"u"||!h)return c(p);try{return c(p)}catch{return!1}},t=function(g){var m=g!==null&&typeof g=="object",y=i.call(g)==="[object Function]",_=o(g),v=m&&i.call(g)==="[object String]",x=[];if(!m&&!y&&!_)throw new TypeError("Object.keys called on a non-object");var E=n&&y;if(v&&g.length>0&&!a.call(g,0))for(var M=0;M0)for(var C=0;C-1?a(n):n}}}),mb=ye({"node_modules/define-properties/index.js"(e,r){"use strict";var t=YL(),a=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",i=Object.prototype.toString,o=Array.prototype.concat,s=IL(),l=function(f){return typeof f=="function"&&i.call(f)==="[object Function]"},n=RL()(),u=function(f,h,d,p){if(h in f){if(p===!0){if(f[h]===d)return}else if(!l(p)||!p())return}n?s(f,h,d,!0):s(f,h,d)},c=function(f,h){var d=arguments.length>2?arguments[2]:{},p=t(h);a&&(p=o.call(p,Object.getOwnPropertySymbols(h)));for(var g=0;gte.length)&&(ie=te.length);for(var ee=0,ce=new Array(ie);ee10)return!0;for(var ie=0;ie57)return!0}return te.length===10&&te>=Math.pow(2,32)}function L(te){return Object.keys(te).filter(I).concat(d(te).filter(Object.prototype.propertyIsEnumerable.bind(te)))}function B(te,ie){if(te===ie)return 0;for(var ee=te.length,ce=ie.length,_e=0,Se=Math.min(ee,ce);_e1?U-1:0),j=1;j1?U-1:0),j=1;j1?U-1:0),j=1;j1?U-1:0),j=1;j=0&&p.call(E.callee)==="[object Function]"),l}}}),RB=ze({"node_modules/object-keys/implementation.js"(J,V){"use strict";var p;Object.keys||(b=Object.prototype.hasOwnProperty,E=Object.prototype.toString,k=ZT(),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var m=c.constructor;return m&&m.prototype===c},a={$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},o=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!a["$"+c]&&b.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!o)return r(c);try{return r(c)}catch{return!1}},p=function(m){var h=m!==null&&typeof m=="object",v=E.call(m)==="[object Function]",g=k(m),i=h&&E.call(m)==="[object String]",w=[];if(!h&&!v&&!g)throw new TypeError("Object.keys called on a non-object");var S=t&&v;if(i&&m.length>0&&!b.call(m,0))for(var M=0;M0)for(var C=0;C-1?b(t):t}}}),P1=ze({"node_modules/define-properties/index.js"(J,V){"use strict";var p=$T(),b=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",E=Object.prototype.toString,k=Array.prototype.concat,l=zT(),e=function(a){return typeof a=="function"&&E.call(a)==="[object Function]"},t=BT()(),n=function(a,o,s,c){if(o in a){if(c===!0){if(a[o]===s)return}else if(!e(c)||!c())return}t?l(a,o,s,!0):l(a,o,s)},r=function(a,o){var s=arguments.length>2?arguments[2]:{},c=p(o);b&&(c=k.call(c,Object.getOwnPropertySymbols(o)));for(var m=0;mce.length)&&(ve=ce.length);for(var le=0,Ae=new Array(ve);le10)return!0;for(var ve=0;ve57)return!0}return ce.length===10&&ce>=Math.pow(2,32)}function P(ce){return Object.keys(ce).filter(F).concat(s(ce).filter(Object.prototype.propertyIsEnumerable.bind(ce)))}function j(ce,ve){if(ce===ve)return 0;for(var le=ce.length,Ae=ve.length,Be=0,Xe=Math.min(le,Ae);Be1?H-1:0),q=1;q1?H-1:0),q=1;q1?H-1:0),q=1;q1?H-1:0),q=1;q0)return l(f);if(d==="number"&&isNaN(f)===!1)return h.long?u(f):n(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))};function l(f){if(f=String(f),!(f.length>100)){var h=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(f);if(h){var d=parseFloat(h[1]),p=(h[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return d*s;case"days":case"day":case"d":return d*o;case"hours":case"hour":case"hrs":case"hr":case"h":return d*i;case"minutes":case"minute":case"mins":case"min":case"m":return d*a;case"seconds":case"second":case"secs":case"sec":case"s":return d*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function n(f){return f>=o?Math.round(f/o)+"d":f>=i?Math.round(f/i)+"h":f>=a?Math.round(f/a)+"m":f>=t?Math.round(f/t)+"s":f+"ms"}function u(f){return c(f,o,"day")||c(f,i,"hour")||c(f,a,"minute")||c(f,t,"second")||f+" ms"}function c(f,h,d){if(!(f=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}e.formatters.j=function(n){try{return JSON.stringify(n)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}};function a(n){var u=this.useColors;if(n[0]=(u?"%c":"")+this.namespace+(u?" %c":" ")+n[0]+(u?"%c ":" ")+"+"+e.humanize(this.diff),!!u){var c="color: "+this.color;n.splice(1,0,c,"color: inherit");var f=0,h=0;n[0].replace(/%[a-zA-Z%]/g,function(d){d!=="%%"&&(f++,d==="%c"&&(h=f))}),n.splice(h,0,c)}}function i(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(n){try{n==null?e.storage.removeItem("debug"):e.storage.debug=n}catch{}}function s(){var n;try{n=e.storage.debug}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}e.enable(s());function l(){try{return window.localStorage}catch{}}}}),Wie=ye({"node_modules/stream-parser/index.js"(e,r){var t=LT(),a=Hie()("stream-parser");r.exports=n;var i=-1,o=0,s=1,l=2;function n(v){var x=v&&typeof v._transform=="function",E=v&&typeof v._write=="function";if(!x&&!E)throw new Error("must pass a Writable or Transform stream in");a("extending Parser into stream"),v._bytes=c,v._skipBytes=f,x&&(v._passthrough=h),x?v._transform=p:v._write=d}function u(v){a("initializing parser stream"),v._parserBytesLeft=0,v._parserBuffers=[],v._parserBuffered=0,v._parserState=i,v._parserCallback=null,typeof v.push=="function"&&(v._parserOutput=v.push.bind(v)),v._parserInit=!0}function c(v,x){t(!this._parserCallback,'there is already a "callback" set!'),t(isFinite(v)&&v>0,'can only buffer a finite number of bytes > 0, got "'+v+'"'),this._parserInit||u(this),a("buffering %o bytes",v),this._parserBytesLeft=v,this._parserCallback=x,this._parserState=o}function f(v,x){t(!this._parserCallback,'there is already a "callback" set!'),t(v>0,'can only skip > 0 bytes, got "'+v+'"'),this._parserInit||u(this),a("skipping %o bytes",v),this._parserBytesLeft=v,this._parserCallback=x,this._parserState=s}function h(v,x){t(!this._parserCallback,'There is already a "callback" set!'),t(v>0,'can only pass through > 0 bytes, got "'+v+'"'),this._parserInit||u(this),a("passing through %o bytes",v),this._parserBytesLeft=v,this._parserCallback=x,this._parserState=l}function d(v,x,E){this._parserInit||u(this),a("write(%o bytes)",v.length),typeof x=="function"&&(E=x),y(this,v,null,E)}function p(v,x,E){this._parserInit||u(this),a("transform(%o bytes)",v.length),typeof x!="function"&&(x=this._parserOutput),y(this,v,x,E)}function g(v,x,E,M){return v._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):x.length<=v._parserBytesLeft?function(){return m(v,x,E,M)}:function(){var C=x.slice(0,v._parserBytesLeft);return m(v,C,E,function(w){if(w)return M(w);if(x.length>C.length)return function(){return g(v,x.slice(C.length),E,M)}})}}function m(v,x,E,M){if(v._parserBytesLeft-=x.length,a("%o bytes left for stream piece",v._parserBytesLeft),v._parserState===o?(v._parserBuffers.push(x),v._parserBuffered+=x.length):v._parserState===l&&E(x),v._parserBytesLeft===0){var C=v._parserCallback;if(C&&v._parserState===o&&v._parserBuffers.length>1&&(x=Buffer.concat(v._parserBuffers,v._parserBuffered)),v._parserState!==o&&(x=null),v._parserCallback=null,v._parserBuffered=0,v._parserState=i,v._parserBuffers.splice(0),C){var w=[];x&&w.push(x),E&&w.push(E);var k=C.length>w.length;k&&w.push(_(M));var T=C.apply(v,w);if(!k||M===T)return M}}else return M}var y=_(g);function _(v){return function(){for(var x=v.apply(this,arguments);typeof x=="function";)x=x();return x}}}}),Zo=ye({"node_modules/probe-image-size/lib/common.js"(e){"use strict";var r=Fie().Transform,t=Wie();function a(){r.call(this,{readableObjectMode:!0})}a.prototype=Object.create(r.prototype),a.prototype.constructor=a,t(a.prototype),e.ParserStream=a,e.sliceEq=function(o,s,l){for(var n=s,u=0;u>16},e.readInt16BE=function(o,s){return e.readUInt16BE(o,s)<<16>>16},e.readUInt32LE=function(o,s){return(o[s]|o[s+1]<<8|o[s+2]<<16)+o[s+3]*16777216},e.readUInt32BE=function(o,s){return o[s]*16777216+(o[s+1]<<16|o[s+2]<<8|o[s+3])},e.readInt32LE=function(o,s){return e.readUInt32LE(o,s)|0},e.readInt32BE=function(o,s){return e.readUInt32BE(o,s)|0};function i(o,s,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=o,s&&(this.code=s),l&&(this.statusCode=l)}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,e.ProbeError=i}}),$ie=ye({"node_modules/probe-image-size/lib/miaf_utils.js"(e,r){"use strict";var t=Zo().readUInt16BE,a=Zo().readUInt32BE;function i(h,d){if(h.length<4+d)return null;var p=a(h,d);return h.length>4&15,g=h[4]&15,m=h[5]>>4&15,y=t(h,6),_=8,v=0;vy.width||m.width===y.width&&m.height>y.height?m:y}),p=h.reduce(function(m,y){return m.height>y.height||m.height===y.height&&m.width>y.width?m:y}),g;return d.width>p.height||d.width===p.height&&d.height>p.width?g=d:g=p,g}r.exports.readSizeFromMeta=function(h){var d={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(c(h,d),!!d.sizes.length){var p=f(d.sizes),g=1;d.transforms.forEach(function(y){var _={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},v={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(y.type==="imir"&&(y.value===0?g=v[g]:(g=v[g],g=_[g],g=_[g])),y.type==="irot")for(var x=0;x0&&!this.aborted;){var l=this.ifds_to_read.shift();l.offset&&this.scan_ifd(l.id,l.offset,o)}},i.prototype.read_uint16=function(o){var s=this.input;if(o+2>s.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?s[o]*256+s[o+1]:s[o]+s[o+1]*256},i.prototype.read_uint32=function(o){var s=this.input;if(o+4>s.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?s[o]*16777216+s[o+1]*65536+s[o+2]*256+s[o+3]:s[o]+s[o+1]*256+s[o+2]*65536+s[o+3]*16777216},i.prototype.is_subifd_link=function(o,s){return o===0&&s===34665||o===0&&s===34853||o===34665&&s===40965},i.prototype.exif_format_length=function(o){switch(o){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}},i.prototype.exif_format_read=function(o,s){var l;switch(o){case 1:case 2:return l=this.input[s],l;case 6:return l=this.input[s],l|(l&128)*33554430;case 3:return l=this.read_uint16(s),l;case 8:return l=this.read_uint16(s),l|(l&32768)*131070;case 4:return l=this.read_uint32(s),l;case 9:return l=this.read_uint32(s),l|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},i.prototype.scan_ifd=function(o,s,l){var n=this.read_uint16(s);s+=2;for(var u=0;uthis.input.length)throw t("unexpected EOF","EBADDATA");for(var y=[],_=g,v=0;v0&&(this.ifds_to_read.push({id:c,offset:y[0]}),m=!0);var E={is_big_endian:this.big_endian,ifd:o,tag:c,format:f,count:h,entry_offset:s+this.start,data_length:p,data_offset:g+this.start,value:y,is_subifd_link:m};if(l(E)===!1){this.aborted=!0;return}s+=12}o===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(s)})},r.exports.ExifParser=i,r.exports.get_orientation=function(o){var s=0;try{return new i(o,0,o.length).each(function(l){if(l.ifd===0&&l.tag===274&&Array.isArray(l.value))return s=l.value[0],!1}),s}catch{return-1}}}}),Yie=ye({"node_modules/probe-image-size/lib/parse_sync/avif.js"(e,r){"use strict";var t=Zo().str2arr,a=Zo().sliceEq,i=Zo().readUInt32BE,o=$ie(),s=FT(),l=t("ftyp");r.exports=function(n){if(a(n,4,l)){var u=o.unbox(n,0);if(u){var c=o.getMimeType(u.data);if(c){for(var f,h=u.end;;){var d=o.unbox(n,h);if(!d)break;if(h=d.end,d.boxtype==="mdat")return;if(d.boxtype==="meta"){f=d.data;break}}if(f){var p=o.readSizeFromMeta(f);if(p){var g={width:p.width,height:p.height,type:c.type,mime:c.mime,wUnits:"px",hUnits:"px"};if(p.variants.length>1&&(g.variants=p.variants),p.orientation&&(g.orientation=p.orientation),p.exif_location&&p.exif_location.offset+p.exif_location.length<=n.length){var m=i(n,p.exif_location.offset),y=n.slice(p.exif_location.offset+m+4,p.exif_location.offset+p.exif_location.length),_=s.get_orientation(y);_>0&&(g.orientation=_)}return g}}}}}}}}),Xie=ye({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(e,r){"use strict";var t=Zo().str2arr,a=Zo().sliceEq,i=Zo().readInt16LE,o=Zo().readInt32LE,s=Zo().readUInt32LE,l=t("BM");r.exports=function(n){if(!(n.length<26)&&a(n,0,l)){var u,c,f=s(n,14);if(f===12)c=i(n,18),u=i(n,20);else if(f>12)c=o(n,18),u=o(n,22);else return;return{width:c,height:Math.abs(u),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),Zie=ye({"node_modules/probe-image-size/lib/parse_sync/gif.js"(e,r){"use strict";var t=Zo().str2arr,a=Zo().sliceEq,i=Zo().readUInt16LE,o=t("GIF87a"),s=t("GIF89a");r.exports=function(l){if(!(l.length<10)&&!(!a(l,0,o)&&!a(l,0,s)))return{width:i(l,6),height:i(l,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),Kie=ye({"node_modules/probe-image-size/lib/parse_sync/ico.js"(e,r){"use strict";var t=Zo().readUInt16LE,a=0,i=1,o=16;r.exports=function(s){var l=t(s,0),n=t(s,2),u=t(s,4);if(!(l!==a||n!==i||!u)&&!(s.length<6+u*o)){for(var c=[],f={width:0,height:0},h=0;hf.width||p>f.height)&&(f=g)}return{width:f.width,height:f.height,variants:c,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),Jie=ye({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(e,r){"use strict";var t=Zo().readUInt16BE,a=Zo().str2arr,i=Zo().sliceEq,o=FT(),s=a("Exif\0\0");r.exports=function(l){if(!(l.length<2)&&!(l[0]!==255||l[1]!==216||l[2]!==255))for(var n=2;;){for(;;){if(l.length-n<2)return;if(l[n++]===255)break}for(var u=l[n++],c;u===255;)u=l[n++];if(u>=208&&u<=217||u===1)c=0;else if(u>=192&&u<=254){if(l.length-n<2)return;c=t(l,n)-2,n+=2}else return;if(u===217||u===218)return;var f;if(u===225&&c>=10&&i(l,n,s)&&(f=o.get_orientation(l.slice(n+6,n+c))),c>=5&&u>=192&&u<=207&&u!==196&&u!==200&&u!==204){if(l.length-n0&&(h.orientation=f),h}n+=c}}}}),Qie=ye({"node_modules/probe-image-size/lib/parse_sync/png.js"(e,r){"use strict";var t=Zo().str2arr,a=Zo().sliceEq,i=Zo().readUInt32BE,o=t(`\x89PNG\r +`).concat(v(X),` +`));var ae=new m({actual:X,expected:K,message:H,operator:q,stackStartFn:Y});throw ae.generatedMessage=ee,ae}}A.match=function X(K,H,Y){se(K,H,Y,X,"match")},A.doesNotMatch=function X(K,H,Y){se(K,H,Y,X,"doesNotMatch")};function G(){for(var X=arguments.length,K=new Array(X),H=0;H0)return e(a);if(s==="number"&&isNaN(a)===!1)return o.long?n(a):t(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function e(a){if(a=String(a),!(a.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(o){var s=parseFloat(o[1]),c=(o[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*l;case"days":case"day":case"d":return s*k;case"hours":case"hour":case"hrs":case"hr":case"h":return s*E;case"minutes":case"minute":case"mins":case"min":case"m":return s*b;case"seconds":case"second":case"secs":case"sec":case"s":return s*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function t(a){return a>=k?Math.round(a/k)+"d":a>=E?Math.round(a/E)+"h":a>=b?Math.round(a/b)+"m":a>=p?Math.round(a/p)+"s":a+"ms"}function n(a){return r(a,k,"day")||r(a,E,"hour")||r(a,b,"minute")||r(a,p,"second")||a+" ms"}function r(a,o,s){if(!(a=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}J.formatters.j=function(t){try{return JSON.stringify(t)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}};function b(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+J.humanize(this.diff),!!n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var a=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(a++,s==="%c"&&(o=a))}),t.splice(o,0,r)}}function E(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function k(t){try{t==null?J.storage.removeItem("debug"):J.storage.debug=t}catch{}}function l(){var t;try{t=J.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}J.enable(l());function e(){try{return window.localStorage}catch{}}}}),GB=ze({"node_modules/stream-parser/index.js"(J,V){var p=jb(),b=VB()("stream-parser");V.exports=t;var E=-1,k=0,l=1,e=2;function t(i){var w=i&&typeof i._transform=="function",S=i&&typeof i._write=="function";if(!w&&!S)throw new Error("must pass a Writable or Transform stream in");b("extending Parser into stream"),i._bytes=r,i._skipBytes=a,w&&(i._passthrough=o),w?i._transform=c:i._write=s}function n(i){b("initializing parser stream"),i._parserBytesLeft=0,i._parserBuffers=[],i._parserBuffered=0,i._parserState=E,i._parserCallback=null,typeof i.push=="function"&&(i._parserOutput=i.push.bind(i)),i._parserInit=!0}function r(i,w){p(!this._parserCallback,'there is already a "callback" set!'),p(isFinite(i)&&i>0,'can only buffer a finite number of bytes > 0, got "'+i+'"'),this._parserInit||n(this),b("buffering %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=k}function a(i,w){p(!this._parserCallback,'there is already a "callback" set!'),p(i>0,'can only skip > 0 bytes, got "'+i+'"'),this._parserInit||n(this),b("skipping %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=l}function o(i,w){p(!this._parserCallback,'There is already a "callback" set!'),p(i>0,'can only pass through > 0 bytes, got "'+i+'"'),this._parserInit||n(this),b("passing through %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=e}function s(i,w,S){this._parserInit||n(this),b("write(%o bytes)",i.length),typeof w=="function"&&(S=w),v(this,i,null,S)}function c(i,w,S){this._parserInit||n(this),b("transform(%o bytes)",i.length),typeof w!="function"&&(w=this._parserOutput),v(this,i,w,S)}function m(i,w,S,M){return i._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):w.length<=i._parserBytesLeft?function(){return h(i,w,S,M)}:function(){var C=w.slice(0,i._parserBytesLeft);return h(i,C,S,function(_){if(_)return M(_);if(w.length>C.length)return function(){return m(i,w.slice(C.length),S,M)}})}}function h(i,w,S,M){if(i._parserBytesLeft-=w.length,b("%o bytes left for stream piece",i._parserBytesLeft),i._parserState===k?(i._parserBuffers.push(w),i._parserBuffered+=w.length):i._parserState===e&&S(w),i._parserBytesLeft===0){var C=i._parserCallback;if(C&&i._parserState===k&&i._parserBuffers.length>1&&(w=Buffer.concat(i._parserBuffers,i._parserBuffered)),i._parserState!==k&&(w=null),i._parserCallback=null,i._parserBuffered=0,i._parserState=E,i._parserBuffers.splice(0),C){var _=[];w&&_.push(w),S&&_.push(S);var T=C.length>_.length;T&&_.push(g(M));var f=C.apply(i,_);if(!T||M===f)return M}}else return M}var v=g(m);function g(i){return function(){for(var w=i.apply(this,arguments);typeof w=="function";)w=w();return w}}}}),Ns=ze({"node_modules/probe-image-size/lib/common.js"(J){"use strict";var V=LB().Transform,p=GB();function b(){V.call(this,{readableObjectMode:!0})}b.prototype=Object.create(V.prototype),b.prototype.constructor=b,p(b.prototype),J.ParserStream=b,J.sliceEq=function(k,l,e){for(var t=l,n=0;n>16},J.readInt16BE=function(k,l){return J.readUInt16BE(k,l)<<16>>16},J.readUInt32LE=function(k,l){return(k[l]|k[l+1]<<8|k[l+2]<<16)+k[l+3]*16777216},J.readUInt32BE=function(k,l){return k[l]*16777216+(k[l+1]<<16|k[l+2]<<8|k[l+3])},J.readInt32LE=function(k,l){return J.readUInt32LE(k,l)|0},J.readInt32BE=function(k,l){return J.readUInt32BE(k,l)|0};function E(k,l,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=k,l&&(this.code=l),e&&(this.statusCode=e)}E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,J.ProbeError=E}}),HB=ze({"node_modules/probe-image-size/lib/miaf_utils.js"(J,V){"use strict";var p=Ns().readUInt16BE,b=Ns().readUInt32BE;function E(o,s){if(o.length<4+s)return null;var c=b(o,s);return o.length>4&15,m=o[4]&15,h=o[5]>>4&15,v=p(o,6),g=8,i=0;iv.width||h.width===v.width&&h.height>v.height?h:v}),c=o.reduce(function(h,v){return h.height>v.height||h.height===v.height&&h.width>v.width?h:v}),m;return s.width>c.height||s.width===c.height&&s.height>c.width?m=s:m=c,m}V.exports.readSizeFromMeta=function(o){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(o,s),!!s.sizes.length){var c=a(s.sizes),m=1;s.transforms.forEach(function(v){var g={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},i={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?m=i[m]:(m=i[m],m=g[m],m=g[m])),v.type==="irot")for(var w=0;w0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,k)}},E.prototype.read_uint16=function(k){var l=this.input;if(k+2>l.length)throw p("unexpected EOF","EBADDATA");return this.big_endian?l[k]*256+l[k+1]:l[k]+l[k+1]*256},E.prototype.read_uint32=function(k){var l=this.input;if(k+4>l.length)throw p("unexpected EOF","EBADDATA");return this.big_endian?l[k]*16777216+l[k+1]*65536+l[k+2]*256+l[k+3]:l[k]+l[k+1]*256+l[k+2]*65536+l[k+3]*16777216},E.prototype.is_subifd_link=function(k,l){return k===0&&l===34665||k===0&&l===34853||k===34665&&l===40965},E.prototype.exif_format_length=function(k){switch(k){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}},E.prototype.exif_format_read=function(k,l){var e;switch(k){case 1:case 2:return e=this.input[l],e;case 6:return e=this.input[l],e|(e&128)*33554430;case 3:return e=this.read_uint16(l),e;case 8:return e=this.read_uint16(l),e|(e&32768)*131070;case 4:return e=this.read_uint32(l),e;case 9:return e=this.read_uint32(l),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},E.prototype.scan_ifd=function(k,l,e){var t=this.read_uint16(l);l+=2;for(var n=0;nthis.input.length)throw p("unexpected EOF","EBADDATA");for(var v=[],g=m,i=0;i0&&(this.ifds_to_read.push({id:r,offset:v[0]}),h=!0);var S={is_big_endian:this.big_endian,ifd:k,tag:r,format:a,count:o,entry_offset:l+this.start,data_length:c,data_offset:m+this.start,value:v,is_subifd_link:h};if(e(S)===!1){this.aborted=!0;return}l+=12}k===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},V.exports.ExifParser=E,V.exports.get_orientation=function(k){var l=0;try{return new E(k,0,k.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return l=e.value[0],!1}),l}catch{return-1}}}}),WB=ze({"node_modules/probe-image-size/lib/parse_sync/avif.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=HB(),l=Ub(),e=p("ftyp");V.exports=function(t){if(b(t,4,e)){var n=k.unbox(t,0);if(n){var r=k.getMimeType(n.data);if(r){for(var a,o=n.end;;){var s=k.unbox(t,o);if(!s)break;if(o=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){a=s.data;break}}if(a){var c=k.readSizeFromMeta(a);if(c){var m={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(m.variants=c.variants),c.orientation&&(m.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=t.length){var h=E(t,c.exif_location.offset),v=t.slice(c.exif_location.offset+h+4,c.exif_location.offset+c.exif_location.length),g=l.get_orientation(v);g>0&&(m.orientation=g)}return m}}}}}}}}),YB=ze({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readInt16LE,k=Ns().readInt32LE,l=Ns().readUInt32LE,e=p("BM");V.exports=function(t){if(!(t.length<26)&&b(t,0,e)){var n,r,a=l(t,14);if(a===12)r=E(t,18),n=E(t,20);else if(a>12)r=k(t,18),n=k(t,22);else return;return{width:r,height:Math.abs(n),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),XB=ze({"node_modules/probe-image-size/lib/parse_sync/gif.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt16LE,k=p("GIF87a"),l=p("GIF89a");V.exports=function(e){if(!(e.length<10)&&!(!b(e,0,k)&&!b(e,0,l)))return{width:E(e,6),height:E(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),ZB=ze({"node_modules/probe-image-size/lib/parse_sync/ico.js"(J,V){"use strict";var p=Ns().readUInt16LE,b=0,E=1,k=16;V.exports=function(l){var e=p(l,0),t=p(l,2),n=p(l,4);if(!(e!==b||t!==E||!n)&&!(l.length<6+n*k)){for(var r=[],a={width:0,height:0},o=0;oa.width||c>a.height)&&(a=m)}return{width:a.width,height:a.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),$B=ze({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(J,V){"use strict";var p=Ns().readUInt16BE,b=Ns().str2arr,E=Ns().sliceEq,k=Ub(),l=b("Exif\0\0");V.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var n=e[t++],r;n===255;)n=e[t++];if(n>=208&&n<=217||n===1)r=0;else if(n>=192&&n<=254){if(e.length-t<2)return;r=p(e,t)-2,t+=2}else return;if(n===217||n===218)return;var a;if(n===225&&r>=10&&E(e,t,l)&&(a=k.get_orientation(e.slice(t+6,t+r))),r>=5&&n>=192&&n<=207&&n!==196&&n!==200&&n!==204){if(e.length-t0&&(o.orientation=a),o}t+=r}}}}),KB=ze({"node_modules/probe-image-size/lib/parse_sync/png.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=p(`\x89PNG\r  -`),s=t("IHDR");r.exports=function(l){if(!(l.length<24)&&a(l,0,o)&&a(l,12,s))return{width:i(l,16),height:i(l,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),ene=ye({"node_modules/probe-image-size/lib/parse_sync/psd.js"(e,r){"use strict";var t=Zo().str2arr,a=Zo().sliceEq,i=Zo().readUInt32BE,o=t("8BPS\0");r.exports=function(s){if(!(s.length<22)&&a(s,0,o))return{width:i(s,18),height:i(s,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),tne=ye({"node_modules/probe-image-size/lib/parse_sync/svg.js"(e,r){"use strict";function t(d){return d===32||d===9||d===13||d===10}function a(d){return typeof d=="number"&&isFinite(d)&&d>0}function i(d){var p=0,g=d.length;for(d[0]===239&&d[1]===187&&d[2]===191&&(p=3);p]*>/,s=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,l=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,n=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,u=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function f(d){var p=d.match(l),g=d.match(n),m=d.match(u);return{width:p&&(p[1]||p[2]),height:g&&(g[1]||g[2]),viewbox:m&&(m[1]||m[2])}}function h(d){return c.test(d)?d.match(c)[0]:"px"}r.exports=function(d){if(i(d)){for(var p="",g=0;g>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function f(h,d){return{width:(h[d+6]<<16|h[d+5]<<8|h[d+4])+1,height:(h[d+9]<<16|h[d+8]<<8|h[d+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}r.exports=function(h){if(!(h.length<16)&&!(!a(h,0,l)||!a(h,8,n))){var d=12,p=null,g=0,m=o(h,4)+8;if(!(m>h.length)){for(;d+8=10?p=p||u(h,d+8):y==="VP8L"&&_>=5?p=p||c(h,d+8):y==="VP8X"&&_>=10?p=p||f(h,d+8):y==="EXIF"&&(g=s.get_orientation(h.slice(d+8,d+8+_)),d=1/0),d+=8+_}if(p)return g>0&&(p.orientation=g),p}}}}}),ine=ye({"node_modules/probe-image-size/lib/parsers_sync.js"(e,r){"use strict";r.exports={avif:Yie(),bmp:Xie(),gif:Zie(),ico:Kie(),jpeg:Jie(),png:Qie(),psd:ene(),svg:tne(),tiff:rne(),webp:ane()}}}),nne=ye({"node_modules/probe-image-size/sync.js"(e,r){"use strict";var t=ine();function a(i){for(var o=Object.keys(t),s=0;s0&&l.height>0?l:null}return null}r.exports=function(o){return a(o)},r.exports.parsers=t}}),one=ye({"src/traces/image/helpers.js"(e){"use strict";var r=nne(),t=h0().IMAGE_URL_PREFIX,a=Bm().Buffer;e.getImageSize=function(i){var o=i.replace(t,""),s=new a(o,"base64");return r(s)}}}),sne=ye({"src/traces/image/calc.js"(e,r){"use strict";var t=Yt(),a=ky(),i=en(),o=qi(),s=Yt().maxRowLength,l=one().getImageSize;r.exports=function(h,d){var p,g;if(d._hasZ)p=d.z.length,g=s(d.z);else if(d._hasSource){var m=l(d.source);p=m.height,g=m.width}var y=o.getFromId(h,d.xaxis||"x"),_=o.getFromId(h,d.yaxis||"y"),v=y.d2c(d.x0)-d.dx/2,x=_.d2c(d.y0)-d.dy/2,E,M=[v,v+g*d.dx],C=[x,x+p*d.dy];if(y&&y.type==="log")for(E=0;E0;)F=p.c2p(C+z*b),z--;for(z=0;R===void 0&&z0;)P=g.c2p(w+z*S),z--;if(FN[0];if(H||W){var U=A+L/2,V=R+B/2;Z+="transform:"+i(U+"px",V+"px")+"scale("+(H?-1:1)+","+(W?-1:1)+")"+i(-U+"px",-V+"px")+";"}}X.attr("style",Z);var j=new Promise(function(q){if(x._hasZ)q();else if(x._hasSource)if(x._canvas&&x._canvas.el.width===k&&x._canvas.el.height===T&&x._canvas.source===x.source)q();else{var Y=document.createElement("canvas");Y.width=k,Y.height=T;var K=Y.getContext("2d",{willReadFrequently:!0});x._image=x._image||new Image;var re=x._image;re.onload=function(){K.drawImage(re,0,0),x._canvas={el:Y,source:x.source},q()},re.setAttribute("src",x.source)}}).then(function(){var q,Y;if(x._hasZ)Y=$(function(se,le){var ue=M[le][se];return a.isTypedArray(ue)&&(ue=Array.from(ue)),ue}),q=Y.toDataURL("image/png");else if(x._hasSource)if(E)q=x.source;else{var K=x._canvas.el.getContext("2d",{willReadFrequently:!0}),re=K.getImageData(0,0,k,T).data;Y=$(function(se,le){var ue=4*(le*k+se);return[re[ue],re[ue+1],re[ue+2],re[ue+3]]}),q=Y.toDataURL("image/png")}X.attr({"xlink:href":q,height:B,width:L,x:A,y:R})});c._promises.push(j)})}}}),une=ye({"src/traces/image/style.js"(e,r){"use strict";var t=ai();r.exports=function(i){t.select(i).selectAll(".im image").style("opacity",function(o){return o[0].trace.opacity})}}}),cne=ye({"src/traces/image/hover.js"(e,r){"use strict";var t=Hs(),a=Yt(),i=a.isArrayOrTypedArray,o=ky();r.exports=function(l,n,u){var c=l.cd[0],f=c.trace,h=l.xa,d=l.ya;if(!(t.inbox(n-c.x0,n-(c.x0+c.w*f.dx),0)>0||t.inbox(u-c.y0,u-(c.y0+c.h*f.dy),0)>0)){var p=Math.floor((n-c.x0)/f.dx),g=Math.floor(Math.abs(u-c.y0)/f.dy),m;if(f._hasZ?m=c.z[g][p]:f._hasSource&&(m=f._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(p,g,1,1).data),!!m){var y=c.hi||f.hoverinfo,_;if(y){var v=y.split("+");v.indexOf("all")!==-1&&(v=["color"]),v.indexOf("color")!==-1&&(_=!0)}var x=o.colormodel[f.colormodel],E=x.colormodel||f.colormodel,M=E.length,C=f._scaler(m),w=x.suffix,k=[];(f.hovertemplate||_)&&(k.push("["+[C[0]+w[0],C[1]+w[1],C[2]+w[2]].join(", ")),M===4&&k.push(", "+C[3]+w[3]),k.push("]"),k=k.join(""),l.extraText=E.toUpperCase()+": "+k);var T;i(f.hovertext)&&i(f.hovertext[g])?T=f.hovertext[g][p]:i(f.text)&&i(f.text[g])&&(T=f.text[g][p]);var b=d.c2p(c.y0+(g+.5)*f.dy),S=c.x0+(p+.5)*f.dx,A=c.y0+(g+.5)*f.dy,F="["+m.slice(0,f.colormodel.length).join(", ")+"]";return[a.extendFlat(l,{index:[g,p],x0:h.c2p(c.x0+p*f.dx),x1:h.c2p(c.x0+(p+1)*f.dx),y0:b,y1:b,color:C,xVal:S,xLabelVal:S,yVal:A,yLabelVal:A,zLabelVal:F,text:T,hovertemplateLabels:{zLabel:F,colorLabel:k,"color[0]Label":C[0]+w[0],"color[1]Label":C[1]+w[1],"color[2]Label":C[2]+w[2],"color[3]Label":C[3]+w[3]}})]}}}}}),fne=ye({"src/traces/image/event_data.js"(e,r){"use strict";r.exports=function(a,i){return"xVal"in i&&(a.x=i.xVal),"yVal"in i&&(a.y=i.yVal),i.xa&&(a.xaxis=i.xa),i.ya&&(a.yaxis=i.ya),a.color=i.color,a.colormodel=i.trace.colormodel,a.z||(a.z=i.color),a}}}),hne=ye({"src/traces/image/index.js"(e,r){"use strict";r.exports={attributes:(SL(),On(gT)).default,supplyDefaults:Wae(),calc:sne(),plot:lne(),style:une(),hoverPoints:cne(),eventData:fne(),moduleType:"trace",name:"image",basePlotModule:Ml(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),dne=ye({"lib/image.js"(e,r){"use strict";r.exports=hne()}}),qm=ye({"src/traces/pie/attributes.js"(e,r){"use strict";var t=Oo(),a=Ds().attributes,i=vs(),o=Wl(),{hovertemplateAttrs:s,texttemplateAttrs:l,templatefallbackAttrs:n}=Ro(),u=Xi().extendFlat,c=Eu().pattern,f=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});r.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:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:c,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:u({},t.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:n(),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:n({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:u({},f,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:u({},f,{}),outsidetextfont:u({},f,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:u({},t.showlegend,{arrayOk:!0}),legend:u({},t.legend,{arrayOk:!0}),legendrank:u({},t.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:u({},f,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:a({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"}}}}),Vm=ye({"src/traces/pie/defaults.js"(e,r){"use strict";var t=en(),a=Yt(),i=qm(),o=Ds().defaults,s=Oh().handleText,l=Yt().coercePattern;function n(f,h){var d=a.isArrayOrTypedArray(f),p=a.isArrayOrTypedArray(h),g=Math.min(d?f.length:1/0,p?h.length:1/0);if(isFinite(g)||(g=0),g&&p){for(var m,y=0;y0){m=!0;break}}m||(g=0)}return{hasLabels:d,hasValues:p,len:g}}function u(f,h,d,p,g){var m=p("marker.line.width");m&&p("marker.line.color",g?void 0:d.paper_bgcolor);var y=p("marker.colors");l(p,"marker.pattern",y),f.marker&&!h.marker.pattern.fgcolor&&(h.marker.pattern.fgcolor=f.marker.colors),h.marker.pattern.bgcolor||(h.marker.pattern.bgcolor=d.paper_bgcolor)}function c(f,h,d,p){function g(A,F){return a.coerce(f,h,i,A,F)}var m=g("labels"),y=g("values"),_=n(m,y),v=_.len;if(h._hasLabels=_.hasLabels,h._hasValues=_.hasValues,!h._hasLabels&&h._hasValues&&(g("label0"),g("dlabel")),!v){h.visible=!1;return}h._length=v,u(f,h,p,g,!0),g("scalegroup");var x=g("text"),E=g("texttemplate");g("texttemplatefallback");var M;if(E||(M=g("textinfo",a.isArrayOrTypedArray(x)?"text+percent":"percent")),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),E||M&&M!=="none"){var C=g("textposition");s(f,h,p,g,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var w=Array.isArray(C)||C==="auto",k=w||C==="outside";k&&g("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&g("insidetextorientation")}else M==="none"&&g("textposition","none");o(h,p,g);var T=g("hole"),b=g("title.text");if(b){var S=g("title.position",T?"middle center":"top center");!T&&S==="middle center"&&(h.title.position="top center"),a.coerceFont(g,"title.font",p.font)}g("sort"),g("direction"),g("rotation"),g("pull")}r.exports={handleLabelsAndValues:n,handleMarkerDefaults:u,supplyDefaults:c}}}),PT=ye({"src/traces/pie/layout_attributes.js"(e,r){"use strict";r.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),pne=ye({"src/traces/pie/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=PT();r.exports=function(o,s){function l(n,u){return t.coerce(o,s,a,n,u)}l("hiddenlabels"),l("piecolorway",s.colorway),l("extendpiecolors")}}}),Fy=ye({"src/traces/pie/calc.js"(e,r){"use strict";var t=en(),a=Ya(),i={};function o(u,c){var f=[],h=u._fullLayout,d=h.hiddenlabels||[],p=c.labels,g=c.marker.colors||[],m=c.values,y=c._length,_=c._hasValues&&y,v,x;if(c.dlabel)for(p=new Array(y),v=0;v=0});var A=c.type==="funnelarea"?w:c.sort;return A&&f.sort(function(F,D){return D.v-F.v}),f[0]&&(f[0].vTotal=C),f}function s(u){return function(f,h){if(!f||!a.isValid(f))return!1;let d=a.rgbaString(f);return u[h]||(u[h]=d),d}}function l(u,c){var f=(c||{}).type;f||(f="pie");var h=u._fullLayout,d=u.calcdata,p=h[f+"colorway"],g=h["_"+f+"colormap"];h["extend"+f+"colors"]&&(p=n(p,i));for(var m=0,y=0;y0&&(_e+=Ge*ee.pxmid[0],Se+=Ge*ee.pxmid[1])}ee.cxFinal=_e,ee.cyFinal=Se;function Ze(st,Ve,Ye,me){var be=me*(Ve[0]-st[0]),Ee=me*(Ve[1]-st[1]);return"a"+me*re.r+","+me*re.r+" 0 "+ee.largeArc+(Ye?" 1 ":" 0 ")+be+","+Ee}var Ke=se.hole;if(ee.v===re.vTotal){var dt="M"+(_e+ee.px0[0])+","+(Se+ee.px0[1])+Ze(ee.px0,ee.pxmid,!0,1)+Ze(ee.pxmid,ee.px0,!0,1)+"Z";Ke?Ue.attr("d","M"+(_e+Ke*ee.px0[0])+","+(Se+Ke*ee.px0[1])+Ze(ee.px0,ee.pxmid,!1,Ke)+Ze(ee.pxmid,ee.px0,!1,Ke)+"Z"+dt):Ue.attr("d",dt)}else{var _t=Ze(ee.px0,ee.px1,!0,1);if(Ke){var Pt=1-Ke;Ue.attr("d","M"+(_e+Ke*ee.px1[0])+","+(Se+Ke*ee.px1[1])+Ze(ee.px1,ee.px0,!1,Ke)+"l"+Pt*ee.px0[0]+","+Pt*ee.px0[1]+_t+"Z")}else Ue.attr("d","M"+_e+","+Se+"l"+ee.px0[0]+","+ee.px0[1]+_t+"Z")}J(H,ee,re);var pt=g.castOption(se.textposition,ee.pts),Tt=Me.selectAll("g.slicetext").data(ee.text&&pt!=="none"?[0]:[]);Tt.enter().append("g").classed("slicetext",!0),Tt.exit().remove(),Tt.each(function(){var st=l.ensureSingle(t.select(this),"text","",function(Fe){Fe.attr("data-notex",1)}),Ve=l.ensureUniformFontSize(H,pt==="outside"?E(se,ee,V.font):M(se,ee,V.font));st.text(ee.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,Ve).call(c.convertToTspans,H);var Ye=s.bBox(st.node()),me;if(pt==="outside")me=R(Ye,ee);else if(me=w(Ye,ee,re),pt==="auto"&&me.scale<1){var be=l.ensureUniformFontSize(H,se.outsidetextfont);st.call(s.font,be),Ye=s.bBox(st.node()),me=R(Ye,ee)}var Ee=me.textPosAngle,De=Ee===void 0?ee.pxmid:Z(re.r,Ee);if(me.targetX=_e+De[0]*me.rCenter+(me.x||0),me.targetY=Se+De[1]*me.rCenter+(me.y||0),N(me,Ye),me.outside){var Ce=me.targetY;ee.yLabelMin=Ce-Ye.height/2,ee.yLabelMid=Ce,ee.yLabelMax=Ce+Ye.height/2,ee.labelExtraX=0,ee.labelExtraY=0,fe=!0}me.fontSize=Ve.size,h(se.type,me,V),Y[ce].transform=me,l.setTransormAndDisplay(st,me)})});var pe=t.select(this).selectAll("g.titletext").data(se.title.text?[0]:[]);if(pe.enter().append("g").classed("titletext",!0),pe.exit().remove(),pe.each(function(){var ee=l.ensureSingle(t.select(this),"text","",function(Se){Se.attr("data-notex",1)}),ce=se.title.text;se._meta&&(ce=l.templateString(ce,se._meta)),ee.text(ce).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,se.title.font).call(c.convertToTspans,H);var _e;se.title.position==="middle center"?_e=P(re):_e=z(re,j),ee.attr("transform",u(_e.x,_e.y)+n(Math.min(1,_e.scale))+u(_e.tx,_e.ty))}),fe&&O(ue,se),v(le,se),fe&&se.automargin){var we=s.bBox(K.node()),xe=se.domain,he=j.w*(xe.x[1]-xe.x[0]),oe=j.h*(xe.y[1]-xe.y[0]),te=(.5*he-re.r)/j.w,ie=(.5*oe-re.r)/j.h;a.autoMargin(H,"pie."+se.uid+".automargin",{xl:xe.x[0]-te,xr:xe.x[1]+te,yb:xe.y[0]-ie,yt:xe.y[1]+ie,l:Math.max(re.cx-re.r-we.left,0),r:Math.max(we.right-(re.cx+re.r),0),b:Math.max(we.bottom-(re.cy+re.r),0),t:Math.max(re.cy-re.r-we.top,0),pad:5})}})});setTimeout(function(){q.selectAll("tspan").each(function(){var Y=t.select(this);Y.attr("dy")&&Y.attr("dy",Y.attr("dy"))})},0)}function v(H,W){H.each(function(U){var V=t.select(this);if(!U.labelExtraX&&!U.labelExtraY){V.select("path.textline").remove();return}var j=V.select("g.slicetext text");U.transform.targetX+=U.labelExtraX,U.transform.targetY+=U.labelExtraY,l.setTransormAndDisplay(j,U.transform);var q=U.cxFinal+U.pxmid[0],Y=U.cyFinal+U.pxmid[1],K="M"+q+","+Y,re=(U.yLabelMax-U.yLabelMin)*(U.pxmid[0]<0?-1:1)/4;if(U.labelExtraX){var se=U.labelExtraX*U.pxmid[1]/U.pxmid[0],le=U.yLabelMid+U.labelExtraY-(U.cyFinal+U.pxmid[1]);Math.abs(se)>Math.abs(le)?K+="l"+le*U.pxmid[0]/U.pxmid[1]+","+le+"H"+(q+U.labelExtraX+re):K+="l"+U.labelExtraX+","+se+"v"+(le-se)+"h"+re}else K+="V"+(U.yLabelMid+U.labelExtraY)+"h"+re;l.ensureSingle(V,"path","textline").call(o.stroke,W.outsidetextfont.color).attr({"stroke-width":Math.min(2,W.outsidetextfont.size/8),d:K,fill:"none"})})}function x(H,W,U){var V=U[0],j=V.cx,q=V.cy,Y=V.trace,K=Y.type==="funnelarea";"_hasHoverLabel"in Y||(Y._hasHoverLabel=!1),"_hasHoverEvent"in Y||(Y._hasHoverEvent=!1),H.on("mouseover",function(re){var se=W._fullLayout,le=W._fullData[Y.index];if(!(W._dragging||se.hovermode===!1)){var ue=le.hoverinfo;if(Array.isArray(ue)&&(ue=i.castHoverinfo({hoverinfo:[g.castOption(ue,re.pts)],_module:Y._module},se,0)),ue==="all"&&(ue="label+text+value+percent+name"),le.hovertemplate||ue!=="none"&&ue!=="skip"&&ue){var fe=re.rInscribed||0,pe=j+re.pxmid[0]*(1-fe),we=q+re.pxmid[1]*(1-fe),xe=se.separators,he=[];if(ue&&ue.indexOf("label")!==-1&&he.push(re.label),re.text=g.castOption(le.hovertext||le.text,re.pts),ue&&ue.indexOf("text")!==-1){var oe=re.text;l.isValidTextValue(oe)&&he.push(oe)}re.value=re.v,re.valueLabel=g.formatPieValue(re.v,xe),ue&&ue.indexOf("value")!==-1&&he.push(re.valueLabel),re.percent=re.v/V.vTotal,re.percentLabel=g.formatPiePercent(re.percent,xe),ue&&ue.indexOf("percent")!==-1&&he.push(re.percentLabel);var te=le.hoverlabel,ie=te.font,ee=[];i.loneHover({trace:Y,x0:pe-fe*V.r,x1:pe+fe*V.r,y:we,_x0:K?j+re.TL[0]:pe-fe*V.r,_x1:K?j+re.TR[0]:pe+fe*V.r,_y0:K?q+re.TL[1]:we-fe*V.r,_y1:K?q+re.BL[1]:we+fe*V.r,text:he.join("
"),name:le.hovertemplate||ue.indexOf("name")!==-1?le.name:void 0,idealAlign:re.pxmid[0]<0?"left":"right",color:g.castOption(te.bgcolor,re.pts)||re.color,borderColor:g.castOption(te.bordercolor,re.pts),fontFamily:g.castOption(ie.family,re.pts),fontSize:g.castOption(ie.size,re.pts),fontColor:g.castOption(ie.color,re.pts),nameLength:g.castOption(te.namelength,re.pts),textAlign:g.castOption(te.align,re.pts),hovertemplate:g.castOption(le.hovertemplate,re.pts),hovertemplateLabels:re,eventData:[m(re,le)]},{container:se._hoverlayer.node(),outerContainer:se._paper.node(),gd:W,inOut_bbox:ee}),re.bbox=ee[0],Y._hasHoverLabel=!0}Y._hasHoverEvent=!0,W.emit("plotly_hover",{points:[m(re,le)],event:t.event})}}),H.on("mouseout",function(re){var se=W._fullLayout,le=W._fullData[Y.index],ue=t.select(this).datum();Y._hasHoverEvent&&(re.originalEvent=t.event,W.emit("plotly_unhover",{points:[m(ue,le)],event:t.event}),Y._hasHoverEvent=!1),Y._hasHoverLabel&&(i.loneUnhover(se._hoverlayer.node()),Y._hasHoverLabel=!1)}),H.on("click",function(re){var se=W._fullLayout,le=W._fullData[Y.index];W._dragging||se.hovermode===!1||(W._hoverdata=[m(re,le)],i.click(W,t.event))})}function E(H,W,U){var V=g.castOption(H.outsidetextfont.color,W.pts)||g.castOption(H.textfont.color,W.pts)||U.color,j=g.castOption(H.outsidetextfont.family,W.pts)||g.castOption(H.textfont.family,W.pts)||U.family,q=g.castOption(H.outsidetextfont.size,W.pts)||g.castOption(H.textfont.size,W.pts)||U.size,Y=g.castOption(H.outsidetextfont.weight,W.pts)||g.castOption(H.textfont.weight,W.pts)||U.weight,K=g.castOption(H.outsidetextfont.style,W.pts)||g.castOption(H.textfont.style,W.pts)||U.style,re=g.castOption(H.outsidetextfont.variant,W.pts)||g.castOption(H.textfont.variant,W.pts)||U.variant,se=g.castOption(H.outsidetextfont.textcase,W.pts)||g.castOption(H.textfont.textcase,W.pts)||U.textcase,le=g.castOption(H.outsidetextfont.lineposition,W.pts)||g.castOption(H.textfont.lineposition,W.pts)||U.lineposition,ue=g.castOption(H.outsidetextfont.shadow,W.pts)||g.castOption(H.textfont.shadow,W.pts)||U.shadow;return{color:V,family:j,size:q,weight:Y,style:K,variant:re,textcase:se,lineposition:le,shadow:ue}}function M(H,W,U){var V=g.castOption(H.insidetextfont.color,W.pts);!V&&H._input.textfont&&(V=g.castOption(H._input.textfont.color,W.pts));var j=g.castOption(H.insidetextfont.family,W.pts)||g.castOption(H.textfont.family,W.pts)||U.family,q=g.castOption(H.insidetextfont.size,W.pts)||g.castOption(H.textfont.size,W.pts)||U.size,Y=g.castOption(H.insidetextfont.weight,W.pts)||g.castOption(H.textfont.weight,W.pts)||U.weight,K=g.castOption(H.insidetextfont.style,W.pts)||g.castOption(H.textfont.style,W.pts)||U.style,re=g.castOption(H.insidetextfont.variant,W.pts)||g.castOption(H.textfont.variant,W.pts)||U.variant,se=g.castOption(H.insidetextfont.textcase,W.pts)||g.castOption(H.textfont.textcase,W.pts)||U.textcase,le=g.castOption(H.insidetextfont.lineposition,W.pts)||g.castOption(H.textfont.lineposition,W.pts)||U.lineposition,ue=g.castOption(H.insidetextfont.shadow,W.pts)||g.castOption(H.textfont.shadow,W.pts)||U.shadow;return{color:V||o.contrast(W.color),family:j,size:q,weight:Y,style:K,variant:re,textcase:se,lineposition:le,shadow:ue}}function C(H,W){for(var U,V,j=0;j=-4;te-=2)oe(Math.PI*te,"tan");for(te=4;te>=-4;te-=2)oe(Math.PI*(te+1),"tan")}if(ue||pe){for(te=4;te>=-4;te-=2)oe(Math.PI*(te+1.5),"rad");for(te=4;te>=-4;te-=2)oe(Math.PI*(te+.5),"rad")}}if(K||we||ue){var ie=Math.sqrt(H.width*H.width+H.height*H.height);if(he={scale:j*V*2/ie,rCenter:1-j,rotate:0},he.textPosAngle=(W.startangle+W.stopangle)/2,he.scale>=1)return he;xe.push(he)}(we||pe)&&(he=T(H,V,Y,re,se),he.textPosAngle=(W.startangle+W.stopangle)/2,xe.push(he)),(we||fe)&&(he=b(H,V,Y,re,se),he.textPosAngle=(W.startangle+W.stopangle)/2,xe.push(he));for(var ee=0,ce=0,_e=0;_e=1)break}return xe[ee]}function k(H,W){var U=H.startangle,V=H.stopangle;return U>W&&W>V||U0?1:-1)/2,y:q/(1+U*U/(V*V)),outside:!0}}function P(H){var W=Math.sqrt(H.titleBox.width*H.titleBox.width+H.titleBox.height*H.titleBox.height);return{x:H.cx,y:H.cy,scale:H.trace.hole*H.r*2/W,tx:0,ty:-H.titleBox.height/2+H.trace.title.font.size}}function z(H,W){var U=1,V=1,j,q=H.trace,Y={x:H.cx,y:H.cy},K={tx:0,ty:0};K.ty+=q.title.font.size,j=B(q),q.title.position.indexOf("top")!==-1?(Y.y-=(1+j)*H.r,K.ty-=H.titleBox.height):q.title.position.indexOf("bottom")!==-1&&(Y.y+=(1+j)*H.r);var re=I(H.r,H.trace.aspectratio),se=W.w*(q.domain.x[1]-q.domain.x[0])/2;return q.title.position.indexOf("left")!==-1?(se=se+re,Y.x-=(1+j)*re,K.tx+=H.titleBox.width/2):q.title.position.indexOf("center")!==-1?se*=2:q.title.position.indexOf("right")!==-1&&(se=se+re,Y.x+=(1+j)*re,K.tx-=H.titleBox.width/2),U=se/H.titleBox.width,V=L(H,W)/H.titleBox.height,{x:Y.x,y:Y.y,scale:Math.min(U,V),tx:K.tx,ty:K.ty}}function I(H,W){return H/(W===void 0?1:W)}function L(H,W){var U=H.trace,V=W.h*(U.domain.y[1]-U.domain.y[0]);return Math.min(H.titleBox.height,V/2)}function B(H){var W=H.pull;if(!W)return 0;var U;if(l.isArrayOrTypedArray(W))for(W=0,U=0;UW&&(W=H.pull[U]);return W}function O(H,W){var U,V,j,q,Y,K,re,se,le,ue,fe,pe,we;function xe(ie,ee){return ie.pxmid[1]-ee.pxmid[1]}function he(ie,ee){return ee.pxmid[1]-ie.pxmid[1]}function oe(ie,ee){ee||(ee={});var ce=ee.labelExtraY+(V?ee.yLabelMax:ee.yLabelMin),_e=V?ie.yLabelMin:ie.yLabelMax,Se=V?ie.yLabelMax:ie.yLabelMin,Me=ie.cyFinal+Y(ie.px0[1],ie.px1[1]),Ue=ce-_e,Ge,Ze,Ke,dt,_t,Pt;if(Ue*re>0&&(ie.labelExtraY=Ue),!!l.isArrayOrTypedArray(W.pull))for(Ze=0;Ze=(g.castOption(W.pull,Ke.pts)||0))&&((ie.pxmid[1]-Ke.pxmid[1])*re>0?(dt=Ke.cyFinal+Y(Ke.px0[1],Ke.px1[1]),Ue=dt-_e-ie.labelExtraY,Ue*re>0&&(ie.labelExtraY+=Ue)):(Se+ie.labelExtraY-Me)*re>0&&(Ge=3*K*Math.abs(Ze-ue.indexOf(ie)),_t=Ke.cxFinal+q(Ke.px0[0],Ke.px1[0]),Pt=_t+Ge-(ie.cxFinal+ie.pxmid[0])-ie.labelExtraX,Pt*K>0&&(ie.labelExtraX+=Pt)))}for(V=0;V<2;V++)for(j=V?xe:he,Y=V?Math.max:Math.min,re=V?1:-1,U=0;U<2;U++){for(q=U?Math.max:Math.min,K=U?1:-1,se=H[V][U],se.sort(j),le=H[1-V][U],ue=le.concat(se),pe=[],fe=0;fe1?(se=U.r,le=se/j.aspectratio):(le=U.r,se=le*j.aspectratio),se*=(1+j.baseratio)/2,re=se*le}Y=Math.min(Y,re/U.vTotal)}for(V=0;VW.vTotal/2?1:0,se.halfangle=Math.PI*Math.min(se.v/W.vTotal,.5),se.ring=1-V.hole,se.rInscribed=D(se,W))}function Z(H,W){return[H*Math.sin(W),-H*Math.cos(W)]}function J(H,W,U){var V=H._fullLayout,j=U.trace,q=j.texttemplate,Y=j.textinfo;if(!q&&Y&&Y!=="none"){var K=Y.split("+"),re=function(ee){return K.indexOf(ee)!==-1},se=re("label"),le=re("text"),ue=re("value"),fe=re("percent"),pe=V.separators,we;if(we=se?[W.label]:[],le){var xe=g.getFirstFilled(j.text,W.pts);y(xe)&&we.push(xe)}ue&&we.push(g.formatPieValue(W.v,pe)),fe&&we.push(g.formatPiePercent(W.v/U.vTotal,pe)),W.text=we.join("
")}function he(ee){return{label:ee.label,value:ee.v,valueLabel:g.formatPieValue(ee.v,V.separators),percent:ee.v/U.vTotal,percentLabel:g.formatPiePercent(ee.v/U.vTotal,V.separators),color:ee.color,text:ee.text,customdata:l.castOption(j,ee.i,"customdata")}}if(q){var oe=l.castOption(j,W.i,"texttemplate");if(!oe)W.text="";else{var te=he(W),ie=g.getFirstFilled(j.text,W.pts);(y(ie)||ie==="")&&(te.text=ie),W.text=l.texttemplateString({data:[te,j._meta],fallback:j.texttemplatefallback,labels:te,locale:H._fullLayout._d3locale,template:oe})}}}function N(H,W){var U=H.rotate*Math.PI/180,V=Math.cos(U),j=Math.sin(U),q=(W.left+W.right)/2,Y=(W.top+W.bottom)/2;H.textX=q*V-Y*j,H.textY=q*j+Y*V,H.noCenter=!0}r.exports={plot:_,formatSliceLabel:J,transformInsideText:w,determineInsideTextFont:M,positionTitleOutside:z,prerenderTitles:C,layoutAreas:G,attachFxHandlers:x,computeTransform:N}}}),mne=ye({"src/traces/pie/style.js"(e,r){"use strict";var t=ai(),a=yy(),i=jc().resizeText;r.exports=function(s){var l=s._fullLayout._pielayer.selectAll(".trace");i(s,l,"pie"),l.each(function(n){var u=n[0],c=u.trace,f=t.select(this);f.style({opacity:c.opacity}),f.selectAll("path.surface").each(function(h){t.select(this).call(a,h,c,s)})})}}}),gne=ye({"src/traces/pie/base_plot.js"(e){"use strict";var r=ws();e.name="pie",e.plot=function(t,a,i,o){r.plotBasePlot(e.name,t,a,i,o)},e.clean=function(t,a,i,o){r.cleanBasePlot(e.name,t,a,i,o)}}}),yne=ye({"src/traces/pie/index.js"(e,r){"use strict";r.exports={attributes:qm(),supplyDefaults:Vm().supplyDefaults,supplyLayoutDefaults:pne(),layoutAttributes:PT(),calc:Fy().calc,crossTraceCalc:Fy().crossTraceCalc,plot:IT().plot,style:mne(),styleOne:yy(),moduleType:"trace",name:"pie",basePlotModule:gne(),categories:["pie-like","pie","showLegend"],meta:{}}}}),_ne=ye({"lib/pie.js"(e,r){"use strict";r.exports=yne()}}),xne=ye({"src/traces/sunburst/base_plot.js"(e){"use strict";var r=ws();e.name="sunburst",e.plot=function(t,a,i,o){r.plotBasePlot(e.name,t,a,i,o)},e.clean=function(t,a,i,o){r.cleanBasePlot(e.name,t,a,i,o)}}}),JL=ye({"src/traces/sunburst/constants.js"(e,r){"use strict";r.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),gb=ye({"src/traces/sunburst/attributes.js"(e,r){"use strict";var t=Oo(),{hovertemplateAttrs:a,texttemplateAttrs:i,templatefallbackAttrs:o}=Ro(),s=rs(),l=Ds().attributes,n=qm(),u=JL(),c=Xi().extendFlat,f=Eu().pattern;r.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:c({colors:{valType:"data_array",editType:"calc"},line:{color:c({},n.marker.line.color,{dflt:null}),width:c({},n.marker.line.width,{dflt:1}),editType:"calc"},pattern:f,editType:"calc"},s("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:n.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:i({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),texttemplatefallback:o({editType:"plot"}),hovertext:n.hovertext,hoverinfo:c({},t.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:a({},{keys:u.eventDataKeys}),hovertemplatefallback:o(),textfont:n.textfont,insidetextorientation:n.insidetextorientation,insidetextfont:n.insidetextfont,outsidetextfont:c({},n.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:n.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:l({name:"sunburst",trace:!0,editType:"calc"})}}}),QL=ye({"src/traces/sunburst/layout_attributes.js"(e,r){"use strict";r.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),bne=ye({"src/traces/sunburst/defaults.js"(e,r){"use strict";var t=Yt(),a=gb(),i=Ds().defaults,o=Oh().handleText,s=Vm().handleMarkerDefaults,l=As(),n=l.hasColorscale,u=l.handleDefaults;r.exports=function(f,h,d,p){function g(M,C){return t.coerce(f,h,a,M,C)}var m=g("labels"),y=g("parents");if(!m||!m.length||!y||!y.length){h.visible=!1;return}var _=g("values");_&&_.length?g("branchvalues"):g("count"),g("level"),g("maxdepth"),s(f,h,p,g);var v=h._hasColorscale=n(f,"marker","colors")||(f.marker||{}).coloraxis;v&&u(f,h,p,g,{prefix:"marker.",cLetter:"c"}),g("leaf.opacity",v?1:.7);var x=g("text");g("texttemplate"),g("texttemplatefallback"),h.texttemplate||g("textinfo",t.isArrayOrTypedArray(x)?"text+label":"label"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback");var E="auto";o(f,h,p,g,E,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),g("insidetextorientation"),g("sort"),g("rotation"),g("root.color"),i(h,p,g),h._length=null}}}),wne=ye({"src/traces/sunburst/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=QL();r.exports=function(o,s){function l(n,u){return t.coerce(o,s,a,n,u)}l("sunburstcolorway",s.colorway),l("extendsunburstcolors")}}}),yb=ye({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e):(t=t||self,a(t.d3=t.d3||{}))})(e,function(t){"use strict";function a(me,be){return me.parent===be.parent?1:2}function i(me){return me.reduce(o,0)/me.length}function o(me,be){return me+be.x}function s(me){return 1+me.reduce(l,0)}function l(me,be){return Math.max(me,be.y)}function n(me){for(var be;be=me.children;)me=be[0];return me}function u(me){for(var be;be=me.children;)me=be[be.length-1];return me}function c(){var me=a,be=1,Ee=1,De=!1;function Ce(Fe){var Je,qe=0;Fe.eachAfter(function(ft){var qt=ft.children;qt?(ft.x=i(qt),ft.y=s(qt)):(ft.x=Je?qe+=me(ft,Je):0,ft.y=0,Je=ft)});var at=n(Fe),tt=u(Fe),ct=at.x-me(at,tt)/2,At=tt.x+me(tt,at)/2;return Fe.eachAfter(De?function(ft){ft.x=(ft.x-Fe.x)*be,ft.y=(Fe.y-ft.y)*Ee}:function(ft){ft.x=(ft.x-ct)/(At-ct)*be,ft.y=(1-(Fe.y?ft.y/Fe.y:1))*Ee})}return Ce.separation=function(Fe){return arguments.length?(me=Fe,Ce):me},Ce.size=function(Fe){return arguments.length?(De=!1,be=+Fe[0],Ee=+Fe[1],Ce):De?null:[be,Ee]},Ce.nodeSize=function(Fe){return arguments.length?(De=!0,be=+Fe[0],Ee=+Fe[1],Ce):De?[be,Ee]:null},Ce}function f(me){var be=0,Ee=me.children,De=Ee&&Ee.length;if(!De)be=1;else for(;--De>=0;)be+=Ee[De].value;me.value=be}function h(){return this.eachAfter(f)}function d(me){var be=this,Ee,De=[be],Ce,Fe,Je;do for(Ee=De.reverse(),De=[];be=Ee.pop();)if(me(be),Ce=be.children,Ce)for(Fe=0,Je=Ce.length;Fe=0;--Ce)Ee.push(De[Ce]);return this}function g(me){for(var be=this,Ee=[be],De=[],Ce,Fe,Je;be=Ee.pop();)if(De.push(be),Ce=be.children,Ce)for(Fe=0,Je=Ce.length;Fe=0;)Ee+=De[Ce].value;be.value=Ee})}function y(me){return this.eachBefore(function(be){be.children&&be.children.sort(me)})}function _(me){for(var be=this,Ee=v(be,me),De=[be];be!==Ee;)be=be.parent,De.push(be);for(var Ce=De.length;me!==Ee;)De.splice(Ce,0,me),me=me.parent;return De}function v(me,be){if(me===be)return me;var Ee=me.ancestors(),De=be.ancestors(),Ce=null;for(me=Ee.pop(),be=De.pop();me===be;)Ce=me,me=Ee.pop(),be=De.pop();return Ce}function x(){for(var me=this,be=[me];me=me.parent;)be.push(me);return be}function E(){var me=[];return this.each(function(be){me.push(be)}),me}function M(){var me=[];return this.eachBefore(function(be){be.children||me.push(be)}),me}function C(){var me=this,be=[];return me.each(function(Ee){Ee!==me&&be.push({source:Ee.parent,target:Ee})}),be}function w(me,be){var Ee=new A(me),De=+me.value&&(Ee.value=me.value),Ce,Fe=[Ee],Je,qe,at,tt;for(be==null&&(be=T);Ce=Fe.pop();)if(De&&(Ce.value=+Ce.data.value),(qe=be(Ce.data))&&(tt=qe.length))for(Ce.children=new Array(tt),at=tt-1;at>=0;--at)Fe.push(Je=Ce.children[at]=new A(qe[at])),Je.parent=Ce,Je.depth=Ce.depth+1;return Ee.eachBefore(S)}function k(){return w(this).eachBefore(b)}function T(me){return me.children}function b(me){me.data=me.data.data}function S(me){var be=0;do me.height=be;while((me=me.parent)&&me.height<++be)}function A(me){this.data=me,this.depth=this.height=0,this.parent=null}A.prototype=w.prototype={constructor:A,count:h,each:d,eachAfter:g,eachBefore:p,sum:m,sort:y,path:_,ancestors:x,descendants:E,leaves:M,links:C,copy:k};var F=Array.prototype.slice;function D(me){for(var be=me.length,Ee,De;be;)De=Math.random()*be--|0,Ee=me[be],me[be]=me[De],me[De]=Ee;return me}function R(me){for(var be=0,Ee=(me=D(F.call(me))).length,De=[],Ce,Fe;be0&&Ee*Ee>De*De+Ce*Ce}function L(me,be){for(var Ee=0;Eeat?(Ce=(tt+at-Fe)/(2*tt),qe=Math.sqrt(Math.max(0,at/tt-Ce*Ce)),Ee.x=me.x-Ce*De-qe*Je,Ee.y=me.y-Ce*Je+qe*De):(Ce=(tt+Fe-at)/(2*tt),qe=Math.sqrt(Math.max(0,Fe/tt-Ce*Ce)),Ee.x=be.x+Ce*De-qe*Je,Ee.y=be.y+Ce*Je+qe*De)):(Ee.x=be.x+Ee.r,Ee.y=be.y)}function Z(me,be){var Ee=me.r+be.r-1e-6,De=be.x-me.x,Ce=be.y-me.y;return Ee>0&&Ee*Ee>De*De+Ce*Ce}function J(me){var be=me._,Ee=me.next._,De=be.r+Ee.r,Ce=(be.x*Ee.r+Ee.x*be.r)/De,Fe=(be.y*Ee.r+Ee.y*be.r)/De;return Ce*Ce+Fe*Fe}function N(me){this._=me,this.next=null,this.previous=null}function H(me){if(!(Ce=me.length))return 0;var be,Ee,De,Ce,Fe,Je,qe,at,tt,ct,At;if(be=me[0],be.x=0,be.y=0,!(Ce>1))return be.r;if(Ee=me[1],be.x=-Ee.r,Ee.x=be.r,Ee.y=0,!(Ce>2))return be.r+Ee.r;X(Ee,be,De=me[2]),be=new N(be),Ee=new N(Ee),De=new N(De),be.next=De.previous=Ee,Ee.next=be.previous=De,De.next=Ee.previous=be;e:for(qe=3;qe0)throw new Error("cycle");return qe}return Ee.id=function(De){return arguments.length?(me=V(De),Ee):me},Ee.parentId=function(De){return arguments.length?(be=V(De),Ee):be},Ee}function ee(me,be){return me.parent===be.parent?1:2}function ce(me){var be=me.children;return be?be[0]:me.t}function _e(me){var be=me.children;return be?be[be.length-1]:me.t}function Se(me,be,Ee){var De=Ee/(be.i-me.i);be.c-=De,be.s+=Ee,me.c+=De,be.z+=Ee,be.m+=Ee}function Me(me){for(var be=0,Ee=0,De=me.children,Ce=De.length,Fe;--Ce>=0;)Fe=De[Ce],Fe.z+=be,Fe.m+=be,be+=Fe.s+(Ee+=Fe.c)}function Ue(me,be,Ee){return me.a.parent===be.parent?me.a:Ee}function Ge(me,be){this._=me,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=be}Ge.prototype=Object.create(A.prototype);function Ze(me){for(var be=new Ge(me,0),Ee,De=[be],Ce,Fe,Je,qe;Ee=De.pop();)if(Fe=Ee._.children)for(Ee.children=new Array(qe=Fe.length),Je=qe-1;Je>=0;--Je)De.push(Ce=Ee.children[Je]=new Ge(Fe[Je],Je)),Ce.parent=Ee;return(be.parent=new Ge(null,0)).children=[be],be}function Ke(){var me=ee,be=1,Ee=1,De=null;function Ce(tt){var ct=Ze(tt);if(ct.eachAfter(Fe),ct.parent.m=-ct.z,ct.eachBefore(Je),De)tt.eachBefore(at);else{var At=tt,ft=tt,qt=tt;tt.eachBefore(function(Dt){Dt.xft.x&&(ft=Dt),Dt.depth>qt.depth&&(qt=Dt)});var ar=At===ft?1:me(At,ft)/2,vt=ar-At.x,gt=be/(ft.x+ar+vt),St=Ee/(qt.depth||1);tt.eachBefore(function(Dt){Dt.x=(Dt.x+vt)*gt,Dt.y=Dt.depth*St})}return tt}function Fe(tt){var ct=tt.children,At=tt.parent.children,ft=tt.i?At[tt.i-1]:null;if(ct){Me(tt);var qt=(ct[0].z+ct[ct.length-1].z)/2;ft?(tt.z=ft.z+me(tt._,ft._),tt.m=tt.z-qt):tt.z=qt}else ft&&(tt.z=ft.z+me(tt._,ft._));tt.parent.A=qe(tt,ft,tt.parent.A||At[0])}function Je(tt){tt._.x=tt.z+tt.parent.m,tt.m+=tt.parent.m}function qe(tt,ct,At){if(ct){for(var ft=tt,qt=tt,ar=ct,vt=ft.parent.children[0],gt=ft.m,St=qt.m,Dt=ar.m,kt=vt.m,Vt;ar=_e(ar),ft=ce(ft),ar&&ft;)vt=ce(vt),qt=_e(qt),qt.a=tt,Vt=ar.z+Dt-ft.z-gt+me(ar._,ft._),Vt>0&&(Se(Ue(ar,tt,At),tt,Vt),gt+=Vt,St+=Vt),Dt+=ar.m,gt+=ft.m,kt+=vt.m,St+=qt.m;ar&&!_e(qt)&&(qt.t=ar,qt.m+=Dt-St),ft&&!ce(vt)&&(vt.t=ft,vt.m+=gt-kt,At=tt)}return At}function at(tt){tt.x*=be,tt.y=tt.depth*Ee}return Ce.separation=function(tt){return arguments.length?(me=tt,Ce):me},Ce.size=function(tt){return arguments.length?(De=!1,be=+tt[0],Ee=+tt[1],Ce):De?null:[be,Ee]},Ce.nodeSize=function(tt){return arguments.length?(De=!0,be=+tt[0],Ee=+tt[1],Ce):De?[be,Ee]:null},Ce}function dt(me,be,Ee,De,Ce){for(var Fe=me.children,Je,qe=-1,at=Fe.length,tt=me.value&&(Ce-Ee)/me.value;++qeDt&&(Dt=tt),dr=gt*gt*lr,kt=Math.max(Dt/dr,dr/St),kt>Vt){gt-=tt;break}Vt=kt}Je.push(at={value:gt,dice:qt1?De:1)},Ee})(_t);function Tt(){var me=pt,be=!1,Ee=1,De=1,Ce=[0],Fe=j,Je=j,qe=j,at=j,tt=j;function ct(ft){return ft.x0=ft.y0=0,ft.x1=Ee,ft.y1=De,ft.eachBefore(At),Ce=[0],be&&ft.eachBefore(ue),ft}function At(ft){var qt=Ce[ft.depth],ar=ft.x0+qt,vt=ft.y0+qt,gt=ft.x1-qt,St=ft.y1-qt;gt=ft-1){var Dt=Fe[At];Dt.x0=ar,Dt.y0=vt,Dt.x1=gt,Dt.y1=St;return}for(var kt=tt[At],Vt=qt/2+kt,lr=At+1,dr=ft-1;lr>>1;tt[yr]St-vt){var la=(ar*Fr+gt*vr)/qt;ct(At,lr,vr,ar,vt,la,St),ct(lr,ft,Fr,la,vt,gt,St)}else{var Hr=(vt*Fr+St*vr)/qt;ct(At,lr,vr,ar,vt,gt,Hr),ct(lr,ft,Fr,ar,Hr,gt,St)}}}function Ve(me,be,Ee,De,Ce){(me.depth&1?dt:fe)(me,be,Ee,De,Ce)}var Ye=(function me(be){function Ee(De,Ce,Fe,Je,qe){if((at=De._squarify)&&at.ratio===be)for(var at,tt,ct,At,ft=-1,qt,ar=at.length,vt=De.value;++ft1?De:1)},Ee})(_t);t.cluster=c,t.hierarchy=w,t.pack=K,t.packEnclose=R,t.packSiblings=W,t.partition=pe,t.stratify=ie,t.tree=Ke,t.treemap=Tt,t.treemapBinary=st,t.treemapDice=fe,t.treemapResquarify=Ye,t.treemapSlice=dt,t.treemapSliceDice=Ve,t.treemapSquarify=pt,Object.defineProperty(t,"__esModule",{value:!0})})}}),_b=ye({"src/traces/sunburst/calc.js"(e){"use strict";var r=yb(),t=en(),a=Yt(),i=As().makeColorScaleFuncFromTrace,o=Fy().makePullColorFn,s=Fy().generateExtendedColors,l=As().calc,n=Vn().ALMOST_EQUAL,u={},c={},f={};e.calc=function(d,p){var g=d._fullLayout,m=p.ids,y=a.isArrayOrTypedArray(m),_=p.labels,v=p.parents,x=p.values,E=a.isArrayOrTypedArray(x),M=[],C={},w={},k=function(W,U){C[W]?C[W].push(U):C[W]=[U],w[U]=1},T=function(W){return W||typeof W=="number"},b=function(W){return!E||t(x[W])&&x[W]>=0},S,A,F;y?(S=Math.min(m.length,v.length),A=function(W){return T(m[W])&&b(W)},F=function(W){return String(m[W])}):(S=Math.min(_.length,v.length),A=function(W){return T(_[W])&&b(W)},F=function(W){return String(_[W])}),E&&(S=Math.min(S,x.length));for(var D=0;D1){for(var B=a.randstr(),O=0;O>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):t===8?xb(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):t===4?xb(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=uF.exec(e))?new Hu(r[1],r[2],r[3],1):(r=cF.exec(e))?new Hu(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=fF.exec(e))?xb(r[1],r[2],r[3],r[4]):(r=hF.exec(e))?xb(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=dF.exec(e))?nF(r[1],r[2]/100,r[3]/100,1):(r=pF.exec(e))?nF(r[1],r[2]/100,r[3]/100,r[4]):NT.hasOwnProperty(e)?rF(NT[e]):e==="transparent"?new Hu(NaN,NaN,NaN,0):null}function rF(e){return new Hu(e>>16&255,e>>8&255,e&255,1)}function xb(e,r,t,a){return a<=0&&(e=r=t=NaN),new Hu(e,r,t,a)}function zT(e){return e instanceof p0||(e=Iy(e)),e?(e=e.rgb(),new Hu(e.r,e.g,e.b,e.opacity)):new Hu}function bb(e,r,t,a){return arguments.length===1?zT(e):new Hu(e,r,t,a??1)}function Hu(e,r,t,a){this.r=+e,this.g=+r,this.b=+t,this.opacity=+a}function aF(){return`#${Lv(this.r)}${Lv(this.g)}${Lv(this.b)}`}function Mne(){return`#${Lv(this.r)}${Lv(this.g)}${Lv(this.b)}${Lv((isNaN(this.opacity)?1:this.opacity)*255)}`}function iF(){let e=wb(this.opacity);return`${e===1?"rgb(":"rgba("}${Dv(this.r)}, ${Dv(this.g)}, ${Dv(this.b)}${e===1?")":`, ${e})`}`}function wb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dv(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lv(e){return e=Dv(e),(e<16?"0":"")+e.toString(16)}function nF(e,r,t,a){return a<=0?e=r=t=NaN:t<=0||t>=1?e=r=NaN:r<=0&&(e=NaN),new Fd(e,r,t,a)}function oF(e){if(e instanceof Fd)return new Fd(e.h,e.s,e.l,e.opacity);if(e instanceof p0||(e=Iy(e)),!e)return new Fd;if(e instanceof Fd)return e;e=e.rgb();var r=e.r/255,t=e.g/255,a=e.b/255,i=Math.min(r,t,a),o=Math.max(r,t,a),s=NaN,l=o-i,n=(o+i)/2;return l?(r===o?s=(t-a)/l+(t0&&n<1?0:s,new Fd(s,l,n,e.opacity)}function BT(e,r,t,a){return arguments.length===1?oF(e):new Fd(e,r,t,a??1)}function Fd(e,r,t,a){this.h=+e,this.s=+r,this.l=+t,this.opacity=+a}function sF(e){return e=(e||0)%360,e<0?e+360:e}function Ab(e){return Math.max(0,Math.min(1,e||0))}function OT(e,r,t){return(e<60?r+(t-r)*e/60:e<180?t:e<240?r+(t-r)*(240-e)/60:r)*255}var v0,Fv,Pv,Hm,Pd,lF,uF,cF,fF,hF,dF,pF,NT,jT=Si({"node_modules/d3-color/src/color.js"(){RT(),v0=.7,Fv=1/v0,Pv="\\s*([+-]?\\d+)\\s*",Hm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lF=/^#([0-9a-f]{3,8})$/,uF=new RegExp(`^rgb\\(${Pv},${Pv},${Pv}\\)$`),cF=new RegExp(`^rgb\\(${Pd},${Pd},${Pd}\\)$`),fF=new RegExp(`^rgba\\(${Pv},${Pv},${Pv},${Hm}\\)$`),hF=new RegExp(`^rgba\\(${Pd},${Pd},${Pd},${Hm}\\)$`),dF=new RegExp(`^hsl\\(${Hm},${Pd},${Pd}\\)$`),pF=new RegExp(`^hsla\\(${Hm},${Pd},${Pd},${Hm}\\)$`),NT={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},Gm(p0,Iy,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:eF,formatHex:eF,formatHex8:Ane,formatHsl:Tne,formatRgb:tF,toString:tF}),Gm(Hu,bb,Py(p0,{brighter(e){return e=e==null?Fv:Math.pow(Fv,e),new Hu(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?v0:Math.pow(v0,e),new Hu(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Hu(Dv(this.r),Dv(this.g),Dv(this.b),wb(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:aF,formatHex:aF,formatHex8:Mne,formatRgb:iF,toString:iF})),Gm(Fd,BT,Py(p0,{brighter(e){return e=e==null?Fv:Math.pow(Fv,e),new Fd(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?v0:Math.pow(v0,e),new Fd(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,a=t+(t<.5?t:1-t)*r,i=2*t-a;return new Hu(OT(e>=240?e-240:e+120,i,a),OT(e,i,a),OT(e<120?e+240:e-120,i,a),this.opacity)},clamp(){return new Fd(sF(this.h),Ab(this.s),Ab(this.l),wb(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 e=wb(this.opacity);return`${e===1?"hsl(":"hsla("}${sF(this.h)}, ${Ab(this.s)*100}%, ${Ab(this.l)*100}%${e===1?")":`, ${e})`}`}}))}}),UT,qT,vF=Si({"node_modules/d3-color/src/math.js"(){UT=Math.PI/180,qT=180/Math.PI}});function mF(e){if(e instanceof sp)return new sp(e.l,e.a,e.b,e.opacity);if(e instanceof Hp)return gF(e);e instanceof Hu||(e=zT(e));var r=$T(e.r),t=$T(e.g),a=$T(e.b),i=GT((.2225045*r+.7168786*t+.0606169*a)/ZT),o,s;return r===t&&t===a?o=s=i:(o=GT((.4360747*r+.3850649*t+.1430804*a)/XT),s=GT((.0139322*r+.0971045*t+.7141733*a)/KT)),new sp(116*i-16,500*(o-i),200*(i-s),e.opacity)}function VT(e,r,t,a){return arguments.length===1?mF(e):new sp(e,r,t,a??1)}function sp(e,r,t,a){this.l=+e,this.a=+r,this.b=+t,this.opacity=+a}function GT(e){return e>yF?Math.pow(e,.3333333333333333):e/QT+JT}function HT(e){return e>Iv?e*e*e:QT*(e-JT)}function WT(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055)}function $T(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ene(e){if(e instanceof Hp)return new Hp(e.h,e.c,e.l,e.opacity);if(e instanceof sp||(e=mF(e)),e.a===0&&e.b===0)return new Hp(NaN,0=1?(t=1,r-1):Math.floor(t*r),i=e[a],o=e[a+1],s=a>0?e[a-1]:2*i-o,l=a()=>e}});function TF(e,r){return function(t){return e+t*r}}function Dne(e,r,t){return e=Math.pow(e,t),r=Math.pow(r,t)-e,t=1/t,function(a){return Math.pow(e+a*r,t)}}function Eb(e,r){var t=r-e;return t?TF(e,t>180||t<-180?t-360*Math.round(t/360):t):By(isNaN(e)?r:e)}function Lne(e){return(e=+e)==1?Wu:function(r,t){return t-r?Dne(r,t,e):By(isNaN(r)?t:r)}}function Wu(e,r){var t=r-e;return t?TF(e,t):By(isNaN(e)?r:e)}var Ym=Si({"node_modules/d3-interpolate/src/color.js"(){AF()}});function MF(e){return function(r){var t=r.length,a=new Array(t),i=new Array(t),o=new Array(t),s,l;for(s=0;st&&(o=r.slice(t,o),l[s]?l[s]+=o:l[++s]=o),(a=a[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,n.push({i:s,x:lp(a,i)})),t=Db.lastIndex;return t180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,a)-2,x:lp(u,c)})):c&&f.push(i(f)+"rotate("+c+a)}function l(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,a)-2,x:lp(u,c)}):c&&f.push(i(f)+"skewX("+c+a)}function n(u,c,f,h,d,p){if(u!==f||c!==h){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:lp(u,f)},{i:g-2,x:lp(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,f,h),s(u.rotate,c.rotate,f,h),l(u.skewX,c.skewX,f,h),n(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var p=-1,g=h.length,m;++pLb,interpolateArray:()=>Fne,interpolateBasis:()=>xF,interpolateBasisClosed:()=>bF,interpolateCubehelix:()=>JF,interpolateCubehelixLong:()=>QF,interpolateDate:()=>FF,interpolateDiscrete:()=>Rne,interpolateHcl:()=>XF,interpolateHclLong:()=>ZF,interpolateHsl:()=>WF,interpolateHslLong:()=>$F,interpolateHue:()=>Bne,interpolateLab:()=>Zne,interpolateNumber:()=>lp,interpolateNumberArray:()=>oM,interpolateObject:()=>IF,interpolateRgb:()=>Sb,interpolateRgbBasis:()=>EF,interpolateRgbBasisClosed:()=>SF,interpolateRound:()=>Nne,interpolateString:()=>zF,interpolateTransformCss:()=>jF,interpolateTransformSvg:()=>UF,interpolateZoom:()=>GF,piecewise:()=>eoe,quantize:()=>roe});var Xm=Si({"node_modules/d3-interpolate/src/index.js"(){Fb(),LF(),nM(),wF(),PF(),zne(),One(),kb(),sM(),RF(),jne(),BF(),Hne(),Yne(),kF(),Xne(),Kne(),Jne(),Qne(),toe(),aoe()}}),uM=ye({"src/traces/sunburst/fill_one.js"(e,r){"use strict";var t=$i(),a=Ya();r.exports=function(o,s,l,n,u){var c=s.data.data,f=c.i,h=u||c.color;if(f>=0){s.i=c.i;var d=l.marker;d.pattern?(!d.colors||!d.pattern.shape)&&(d.color=h,s.color=h):(d.color=h,s.color=h),t.pointStyle(o,l,n,s)}else a.fill(o,h)}}}),eP=ye({"src/traces/sunburst/style.js"(e,r){"use strict";var t=ai(),a=Ya(),i=Yt(),o=jc().resizeText,s=uM();function l(u){var c=u._fullLayout._sunburstlayer.selectAll(".trace");o(u,c,"sunburst"),c.each(function(f){var h=t.select(this),d=f[0],p=d.trace;h.style("opacity",p.opacity),h.selectAll("path.surface").each(function(g){t.select(this).call(n,g,p,u)})})}function n(u,c,f,h){var d=c.data.data,p=!c.children,g=d.i,m=i.castOption(f,g,"marker.line.color")||a.defaultLine,y=i.castOption(f,g,"marker.line.width")||0;u.call(s,c,f,h).style("stroke-width",y).call(a.stroke,m).style("opacity",p?f.leaf.opacity:null)}r.exports={style:l,styleOne:n}}}),m0=ye({"src/traces/sunburst/helpers.js"(e){"use strict";var r=Yt(),t=Ya(),a=rp(),i=Mv();e.findEntryWithLevel=function(n,u){var c;return u&&n.eachAfter(function(f){if(e.getPtId(f)===u)return c=f.copy()}),c||n},e.findEntryWithChild=function(n,u){var c;return n.eachAfter(function(f){for(var h=f.children||[],d=0;d0)},e.getMaxDepth=function(n){return n.maxdepth>=0?n.maxdepth:1/0},e.isHeader=function(n,u){return!(e.isLeaf(n)||n.depth===u._maxDepth-1)};function l(n){return n.data.data.pid}e.getParent=function(n,u){return e.findEntryWithLevel(n,l(u))},e.listPath=function(n,u){var c=n.parent;if(!c)return[];var f=u?[c.data[u]]:[c];return e.listPath(c,u).concat(f)},e.getPath=function(n){return e.listPath(n,"label").join("/")+"/"},e.formatValue=i.formatPieValue,e.formatPercent=function(n,u){var c=r.formatPercent(n,0);return c==="0%"&&(c=i.formatPiePercent(n,u)),c}}}),Rb=ye({"src/traces/sunburst/fx.js"(e,r){"use strict";var t=ai(),a=li(),i=Bf().appendArrayPointValue,o=Hs(),s=Yt(),l=py(),n=m0(),u=Mv(),c=u.formatPieValue;r.exports=function(d,p,g,m,y){var _=m[0],v=_.trace,x=_.hierarchy,E=v.type==="sunburst",M=v.type==="treemap"||v.type==="icicle";"_hasHoverLabel"in v||(v._hasHoverLabel=!1),"_hasHoverEvent"in v||(v._hasHoverEvent=!1);var C=function(T){var b=g._fullLayout;if(!(g._dragging||b.hovermode===!1)){var S=g._fullData[v.index],A=T.data.data,F=A.i,D=n.isHierarchyRoot(T),R=n.getParent(x,T),P=n.getValue(T),z=function(Y){return s.castOption(S,F,Y)},I=z("hovertemplate"),L=o.castHoverinfo(S,b,F),B=b.separators,O;if(I||L&&L!=="none"&&L!=="skip"){var G,$;E&&(G=_.cx+T.pxmid[0]*(1-T.rInscribed),$=_.cy+T.pxmid[1]*(1-T.rInscribed)),M&&(G=T._hoverX,$=T._hoverY);var X={},Z=[],J=[],N=function(Y){return Z.indexOf(Y)!==-1};L&&(Z=L==="all"?S._module.attributes.hoverinfo.flags:L.split("+")),X.label=A.label,N("label")&&X.label&&J.push(X.label),A.hasOwnProperty("v")&&(X.value=A.v,X.valueLabel=c(X.value,B),N("value")&&J.push(X.valueLabel)),X.currentPath=T.currentPath=n.getPath(T.data),N("current path")&&!D&&J.push(X.currentPath);var H,W=[],U=function(){W.indexOf(H)===-1&&(J.push(H),W.push(H))};X.percentParent=T.percentParent=P/n.getValue(R),X.parent=T.parentString=n.getPtLabel(R),N("percent parent")&&(H=n.formatPercent(X.percentParent,B)+" of "+X.parent,U()),X.percentEntry=T.percentEntry=P/n.getValue(p),X.entry=T.entry=n.getPtLabel(p),N("percent entry")&&!D&&!T.onPathbar&&(H=n.formatPercent(X.percentEntry,B)+" of "+X.entry,U()),X.percentRoot=T.percentRoot=P/n.getValue(x),X.root=T.root=n.getPtLabel(x),N("percent root")&&!D&&(H=n.formatPercent(X.percentRoot,B)+" of "+X.root,U()),X.text=z("hovertext")||z("text"),N("text")&&(H=X.text,s.isValidTextValue(H)&&J.push(H)),O=[f(T,S,y.eventDataKeys)];var V={trace:S,y:$,_x0:T._x0,_x1:T._x1,_y0:T._y0,_y1:T._y1,text:J.join("
"),name:I||N("name")?S.name:void 0,color:z("hoverlabel.bgcolor")||A.color,borderColor:z("hoverlabel.bordercolor"),fontFamily:z("hoverlabel.font.family"),fontSize:z("hoverlabel.font.size"),fontColor:z("hoverlabel.font.color"),fontWeight:z("hoverlabel.font.weight"),fontStyle:z("hoverlabel.font.style"),fontVariant:z("hoverlabel.font.variant"),nameLength:z("hoverlabel.namelength"),textAlign:z("hoverlabel.align"),hovertemplate:I,hovertemplateLabels:X,eventData:O};E&&(V.x0=G-T.rInscribed*T.rpx1,V.x1=G+T.rInscribed*T.rpx1,V.idealAlign=T.pxmid[0]<0?"left":"right"),M&&(V.x=G,V.idealAlign=G<0?"left":"right");var j=[];o.loneHover(V,{container:b._hoverlayer.node(),outerContainer:b._paper.node(),gd:g,inOut_bbox:j}),O[0].bbox=j[0],v._hasHoverLabel=!0}if(M){var q=d.select("path.surface");y.styleOne(q,T,S,g,{hovered:!0})}v._hasHoverEvent=!0,g.emit("plotly_hover",{points:O||[f(T,S,y.eventDataKeys)],event:t.event})}},w=function(T){var b=g._fullLayout,S=g._fullData[v.index],A=t.select(this).datum();if(v._hasHoverEvent&&(T.originalEvent=t.event,g.emit("plotly_unhover",{points:[f(A,S,y.eventDataKeys)],event:t.event}),v._hasHoverEvent=!1),v._hasHoverLabel&&(o.loneUnhover(b._hoverlayer.node()),v._hasHoverLabel=!1),M){var F=d.select("path.surface");y.styleOne(F,A,S,g,{hovered:!1})}},k=function(T){var b=g._fullLayout,S=g._fullData[v.index],A=E&&(n.isHierarchyRoot(T)||n.isLeaf(T)),F=n.getPtId(T),D=n.isEntry(T)?n.findEntryWithChild(x,F):n.findEntryWithLevel(x,F),R=n.getPtId(D),P={points:[f(T,S,y.eventDataKeys)],event:t.event};A||(P.nextLevel=R);var z=l.triggerHandler(g,"plotly_"+v.type+"click",P);if(z!==!1&&b.hovermode&&(g._hoverdata=[f(T,S,y.eventDataKeys)],o.click(g,t.event)),!A&&z!==!1&&!g._dragging&&!g._transitioning){a.call("_storeDirectGUIEdit",S,b._tracePreGUI[S.uid],{level:S.level});var I={data:[{level:R}],traces:[v.index]},L={frame:{redraw:!1,duration:y.transitionTime},transition:{duration:y.transitionTime,easing:y.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(b._hoverlayer.node()),a.call("animate",g,I,L)}};d.on("mouseover",C),d.on("mouseout",w),d.on("click",k)};function f(h,d,p){for(var g=h.data.data,m={curveNumber:d.index,pointNumber:g.i,data:d._input,fullData:d},y=0;ySe.x1?2*Math.PI:0)+Y;Me=ee.rpx1pe?2*Math.PI:0)+Y;_e={x0:Me,x1:Me}}else _e={rpx0:Z,rpx1:Z},o.extendFlat(_e,ie(ee));else _e={rpx0:0,rpx1:0};else _e={x0:Y,x1:Y};return a(_e,Se)}function te(ee){var ce=W[_.getPtId(ee)],_e,Se=ee.transform;if(ce)_e=ce;else if(_e={rpx1:ee.rpx1,transform:{textPosAngle:Se.textPosAngle,scale:0,rotate:Se.rotate,rCenter:Se.rCenter,x:Se.x,y:Se.y}},H)if(ee.parent)if(pe){var Me=ee.x1>pe?2*Math.PI:0;_e.x0=_e.x1=Me}else o.extendFlat(_e,ie(ee));else _e.x0=_e.x1=Y;else _e.x0=_e.x1=Y;var Ue=a(_e.transform.textPosAngle,ee.transform.textPosAngle),Ge=a(_e.rpx1,ee.rpx1),Ze=a(_e.x0,ee.x0),Ke=a(_e.x1,ee.x1),dt=a(_e.transform.scale,Se.scale),_t=a(_e.transform.rotate,Se.rotate),Pt=Se.rCenter===0?3:_e.transform.rCenter===0?1/3:1,pt=a(_e.transform.rCenter,Se.rCenter),Tt=function(st){return pt(Math.pow(st,Pt))};return function(st){var Ve=Ge(st),Ye=Ze(st),me=Ke(st),be=Tt(st),Ee=se(Ve,(Ye+me)/2),De=Ue(st),Ce={pxmid:Ee,rpx1:Ve,transform:{textPosAngle:De,rCenter:be,x:Se.x,y:Se.y}};return n(z.type,Se,A),{transform:{targetX:ue(Ce),targetY:fe(Ce),scale:dt(st),rotate:_t(st),rCenter:be}}}}function ie(ee){var ce=ee.parent,_e=W[_.getPtId(ce)],Se={};if(_e){var Me=ce.children,Ue=Me.indexOf(ee),Ge=Me.length,Ze=a(_e.x0,_e.x1);Se.x0=Ze(Ue/Ge),Se.x1=Ze(Ue/Ge)}else Se.x0=Se.x1=0;return Se}}function x(w){return t.partition().size([2*Math.PI,w.height+1])(w)}e.formatSliceLabel=function(w,k,T,b,S){var A=T.texttemplate,F=T.textinfo;if(!A&&(!F||F==="none"))return"";var D=S.separators,R=b[0],P=w.data.data,z=R.hierarchy,I=_.isHierarchyRoot(w),L=_.getParent(z,w),B=_.getValue(w);if(!A){var O=F.split("+"),G=function(j){return O.indexOf(j)!==-1},$=[],X;if(G("label")&&P.label&&$.push(P.label),P.hasOwnProperty("v")&&G("value")&&$.push(_.formatValue(P.v,D)),!I){G("current path")&&$.push(_.getPath(w.data));var Z=0;G("percent parent")&&Z++,G("percent entry")&&Z++,G("percent root")&&Z++;var J=Z>1;if(Z){var N,H=function(j){X=_.formatPercent(N,D),J&&(X+=" of "+j),$.push(X)};G("percent parent")&&!I&&(N=B/_.getValue(L),H("parent")),G("percent entry")&&(N=B/_.getValue(k),H("entry")),G("percent root")&&(N=B/_.getValue(z),H("root"))}}return G("text")&&(X=o.castOption(T,P.i,"text"),o.isValidTextValue(X)&&$.push(X)),$.join("
")}var W=o.castOption(T,P.i,"texttemplate");if(!W)return"";var U={};P.label&&(U.label=P.label),P.hasOwnProperty("v")&&(U.value=P.v,U.valueLabel=_.formatValue(P.v,D)),U.currentPath=_.getPath(w.data),I||(U.percentParent=B/_.getValue(L),U.percentParentLabel=_.formatPercent(U.percentParent,D),U.parent=_.getPtLabel(L)),U.percentEntry=B/_.getValue(k),U.percentEntryLabel=_.formatPercent(U.percentEntry,D),U.entry=_.getPtLabel(k),U.percentRoot=B/_.getValue(z),U.percentRootLabel=_.formatPercent(U.percentRoot,D),U.root=_.getPtLabel(z),P.hasOwnProperty("color")&&(U.color=P.color);var V=o.castOption(T,P.i,"text");return(o.isValidTextValue(V)||V==="")&&(U.text=V),U.customdata=o.castOption(T,P.i,"customdata"),o.texttemplateString({data:[U,T._meta],fallback:T.texttemplatefallback,labels:U,locale:S._d3locale,template:W})};function E(w){return w.rpx0===0&&o.isFullCircle([w.x0,w.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(w.halfangle)),w.ring/2))}function M(w){return C(w.rpx1,w.transform.textPosAngle)}function C(w,k){return[w*Math.sin(k),-w*Math.cos(k)]}}}),ioe=ye({"src/traces/sunburst/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"sunburst",basePlotModule:xne(),categories:[],animatable:!0,attributes:gb(),layoutAttributes:QL(),supplyDefaults:bne(),supplyLayoutDefaults:wne(),calc:_b().calc,crossTraceCalc:_b().crossTraceCalc,plot:cM().plot,style:eP().style,colorbar:bc(),meta:{}}}}),noe=ye({"lib/sunburst.js"(e,r){"use strict";r.exports=ioe()}}),ooe=ye({"src/traces/treemap/base_plot.js"(e){"use strict";var r=ws();e.name="treemap",e.plot=function(t,a,i,o){r.plotBasePlot(e.name,t,a,i,o)},e.clean=function(t,a,i,o){r.cleanBasePlot(e.name,t,a,i,o)}}}),Zm=ye({"src/traces/treemap/constants.js"(e,r){"use strict";r.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),fM=ye({"src/traces/treemap/attributes.js"(e,r){"use strict";var{hovertemplateAttrs:t,texttemplateAttrs:a,templatefallbackAttrs:i}=Ro(),o=rs(),s=Ds().attributes,l=qm(),n=gb(),u=Zm(),c=Xi().extendFlat,f=Eu().pattern;r.exports={labels:n.labels,parents:n.parents,values:n.values,branchvalues:n.branchvalues,count:n.count,level:n.level,maxdepth:n.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:c({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:n.marker.colors,pattern:f,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:n.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},o("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:c({},l.textfont,{}),editType:"calc"},text:l.text,textinfo:n.textinfo,texttemplate:a({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),texttemplatefallback:i({editType:"plot"}),hovertext:l.hovertext,hoverinfo:n.hoverinfo,hovertemplate:t({},{keys:u.eventDataKeys}),hovertemplatefallback:i(),textfont:l.textfont,insidetextfont:l.insidetextfont,outsidetextfont:c({},l.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:l.sort,root:n.root,domain:s({name:"treemap",trace:!0,editType:"calc"})}}}),tP=ye({"src/traces/treemap/layout_attributes.js"(e,r){"use strict";r.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),soe=ye({"src/traces/treemap/defaults.js"(e,r){"use strict";var t=Yt(),a=fM(),i=Ya(),o=Ds().defaults,s=Oh().handleText,l=Cv().TEXTPAD,n=Vm().handleMarkerDefaults,u=As(),c=u.hasColorscale,f=u.handleDefaults;r.exports=function(d,p,g,m){function y(S,A){return t.coerce(d,p,a,S,A)}var _=y("labels"),v=y("parents");if(!_||!_.length||!v||!v.length){p.visible=!1;return}var x=y("values");x&&x.length?y("branchvalues"):y("count"),y("level"),y("maxdepth");var E=y("tiling.packing");E==="squarify"&&y("tiling.squarifyratio"),y("tiling.flip"),y("tiling.pad");var M=y("text");y("texttemplate"),y("texttemplatefallback"),p.texttemplate||y("textinfo",t.isArrayOrTypedArray(M)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var C=y("pathbar.visible"),w="auto";s(d,p,m,y,w,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition");var k=p.textposition.indexOf("bottom")!==-1;n(d,p,m,y);var T=p._hasColorscale=c(d,"marker","colors")||(d.marker||{}).coloraxis;T?f(d,p,m,y,{prefix:"marker.",cLetter:"c"}):y("marker.depthfade",!(p.marker.colors||[]).length);var b=p.textfont.size*2;y("marker.pad.t",k?b/4:b),y("marker.pad.l",b/4),y("marker.pad.r",b/4),y("marker.pad.b",k?b:b/4),y("marker.cornerradius"),p._hovered={marker:{line:{width:2,color:i.contrast(m.paper_bgcolor)}}},C&&(y("pathbar.thickness",p.pathbar.textfont.size+2*l),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),o(p,m,y),p._length=null}}}),loe=ye({"src/traces/treemap/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=tP();r.exports=function(o,s){function l(n,u){return t.coerce(o,s,a,n,u)}l("treemapcolorway",s.colorway),l("extendtreemapcolors")}}}),rP=ye({"src/traces/treemap/calc.js"(e){"use strict";var r=_b();e.calc=function(t,a){return r.calc(t,a)},e.crossTraceCalc=function(t){return r._runCrossTraceCalc("treemap",t)}}}),aP=ye({"src/traces/treemap/flip_tree.js"(e,r){"use strict";r.exports=function t(a,i,o){var s;o.swapXY&&(s=a.x0,a.x0=a.y0,a.y0=s,s=a.x1,a.x1=a.y1,a.y1=s),o.flipX&&(s=a.x0,a.x0=i[0]-a.x1,a.x1=i[0]-s),o.flipY&&(s=a.y0,a.y0=i[1]-a.y1,a.y1=i[1]-s);var l=a.children;if(l)for(var n=0;n0)for(var b=0;b").join(" ")||"";var J=a.ensureSingle(X,"g","slicetext"),N=a.ensureSingle(J,"text","",function(W){W.attr("data-notex",1)}),H=a.ensureUniformFontSize(d,u.determineTextFont(z,$,R.font,{onPathbar:!0}));N.text($._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,H).call(o.convertToTspans,d),$.textBB=i.bBox(N.node()),$.transform=w($,{fontSize:H.size,onPathbar:!0}),$.transform.fontSize=H.size,T?N.transition().attrTween("transform",function(W){var U=A(W,f,F,[v,x]);return function(V){return k(U(V))}}):N.attr("transform",k($))})}}}),coe=ye({"src/traces/treemap/plot_one.js"(e,r){"use strict";var t=ai(),a=(Xm(),On(zv)).interpolate,i=m0(),o=Yt(),s=Cv().TEXTPAD,l=Rm(),n=l.toMoveInsideBar,u=jc(),c=u.recordMinTextSize,f=Zm(),h=uoe();function d(p){return i.isHierarchyRoot(p)?"":i.getPtId(p)}r.exports=function(g,m,y,_,v){var x=g._fullLayout,E=m[0],M=E.trace,C=M.type,w=C==="icicle",k=E.hierarchy,T=i.findEntryWithLevel(k,M.level),b=t.select(y),S=b.selectAll("g.pathbar"),A=b.selectAll("g.slice");if(!T){S.remove(),A.remove();return}var F=i.isHierarchyRoot(T),D=!x.uniformtext.mode&&i.hasTransition(_),R=i.getMaxDepth(M),P=function(pt){return pt.data.depth-T.data.depth-1?B+$:-(G+$):0,Z={x0:O,x1:O,y0:X,y1:X+G},J=function(pt,Tt,st){var Ve=M.tiling.pad,Ye=function(De){return De-Ve<=Tt.x0},me=function(De){return De+Ve>=Tt.x1},be=function(De){return De-Ve<=Tt.y0},Ee=function(De){return De+Ve>=Tt.y1};return pt.x0===Tt.x0&&pt.x1===Tt.x1&&pt.y0===Tt.y0&&pt.y1===Tt.y1?{x0:pt.x0,x1:pt.x1,y0:pt.y0,y1:pt.y1}:{x0:Ye(pt.x0-Ve)?0:me(pt.x0-Ve)?st[0]:pt.x0,x1:Ye(pt.x1+Ve)?0:me(pt.x1+Ve)?st[0]:pt.x1,y0:be(pt.y0-Ve)?0:Ee(pt.y0-Ve)?st[1]:pt.y0,y1:be(pt.y1+Ve)?0:Ee(pt.y1+Ve)?st[1]:pt.y1}},N=null,H={},W={},U=null,V=function(pt,Tt){return Tt?H[d(pt)]:W[d(pt)]},j=function(pt,Tt,st,Ve){if(Tt)return H[d(k)]||Z;var Ye=W[M.level]||st;return P(pt)?J(pt,Ye,Ve):{}};E.hasMultipleRoots&&F&&R++,M._maxDepth=R,M._backgroundColor=x.paper_bgcolor,M._entryDepth=T.data.depth,M._atRootLevel=F;var q=-L/2+z.l+z.w*(I.x[1]+I.x[0])/2,Y=-B/2+z.t+z.h*(1-(I.y[1]+I.y[0])/2),K=function(pt){return q+pt},re=function(pt){return Y+pt},se=re(0),le=K(0),ue=function(pt){return le+pt},fe=function(pt){return se+pt};function pe(pt,Tt){return pt+","+Tt}var we=ue(0),xe=function(pt){pt.x=Math.max(we,pt.x)},he=M.pathbar.edgeshape,oe=function(pt){var Tt=ue(Math.max(Math.min(pt.x0,pt.x0),0)),st=ue(Math.min(Math.max(pt.x1,pt.x1),O)),Ve=fe(pt.y0),Ye=fe(pt.y1),me=G/2,be={},Ee={};be.x=Tt,Ee.x=st,be.y=Ee.y=(Ve+Ye)/2;var De={x:Tt,y:Ve},Ce={x:st,y:Ve},Fe={x:st,y:Ye},Je={x:Tt,y:Ye};return he===">"?(De.x-=me,Ce.x-=me,Fe.x-=me,Je.x-=me):he==="/"?(Fe.x-=me,Je.x-=me,be.x-=me/2,Ee.x-=me/2):he==="\\"?(De.x-=me,Ce.x-=me,be.x-=me/2,Ee.x-=me/2):he==="<"&&(be.x-=me,Ee.x-=me),xe(De),xe(Je),xe(be),xe(Ce),xe(Fe),xe(Ee),"M"+pe(De.x,De.y)+"L"+pe(Ce.x,Ce.y)+"L"+pe(Ee.x,Ee.y)+"L"+pe(Fe.x,Fe.y)+"L"+pe(Je.x,Je.y)+"L"+pe(be.x,be.y)+"Z"},te=M[w?"tiling":"marker"].pad,ie=function(pt){return M.textposition.indexOf(pt)!==-1},ee=ie("top"),ce=ie("left"),_e=ie("right"),Se=ie("bottom"),Me=function(pt){var Tt=K(pt.x0),st=K(pt.x1),Ve=re(pt.y0),Ye=re(pt.y1),me=st-Tt,be=Ye-Ve;if(!me||!be)return"";var Ee=M.marker.cornerradius||0,De=Math.min(Ee,me/2,be/2);De&&pt.data&&pt.data.data&&pt.data.data.label&&(ee&&(De=Math.min(De,te.t)),ce&&(De=Math.min(De,te.l)),_e&&(De=Math.min(De,te.r)),Se&&(De=Math.min(De,te.b)));var Ce=function(Fe,Je){return De?"a"+pe(De,De)+" 0 0 1 "+pe(Fe,Je):""};return"M"+pe(Tt,Ve+De)+Ce(De,-De)+"L"+pe(st-De,Ve)+Ce(De,De)+"L"+pe(st,Ye-De)+Ce(-De,De)+"L"+pe(Tt+De,Ye)+Ce(-De,-De)+"Z"},Ue=function(pt,Tt){var st=pt.x0,Ve=pt.x1,Ye=pt.y0,me=pt.y1,be=pt.textBB,Ee=ee||Tt.isHeader&&!Se,De=Ee?"start":Se?"end":"middle",Ce=ie("right"),Fe=ie("left")||Tt.onPathbar,Je=Fe?-1:Ce?1:0;if(Tt.isHeader){if(st+=(w?te:te.l)-s,Ve-=(w?te:te.r)-s,st>=Ve){var qe=(st+Ve)/2;st=qe,Ve=qe}var at;Se?(at=me-(w?te:te.b),Ye-1,flipY:I.tiling.flip.indexOf("y")>-1,pad:{inner:I.tiling.pad,top:I.marker.pad.t,left:I.marker.pad.l,right:I.marker.pad.r,bottom:I.marker.pad.b}}),X=$.descendants(),Z=1/0,J=-1/0;X.forEach(function(V){var j=V.depth;j>=I._maxDepth?(V.x0=V.x1=(V.x0+V.x1)/2,V.y0=V.y1=(V.y0+V.y1)/2):(Z=Math.min(Z,j),J=Math.max(J,j))}),y=y.data(X,u.getPtId),I._maxVisibleLayers=isFinite(J)?J-Z+1:0,y.enter().append("g").classed("slice",!0),b(y,h,D,[v,x],C),y.order();var N=null;if(T&&F){var H=u.getPtId(F);y.each(function(V){N===null&&u.getPtId(V)===H&&(N={x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1})})}var W=function(){return N||{x0:0,x1:v,y0:0,y1:x}},U=y;return T&&(U=U.transition().each("end",function(){var V=t.select(this);u.setSliceCursor(V,p,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),U.each(function(V){var j=u.isHeader(V,I);V._x0=E(V.x0),V._x1=E(V.x1),V._y0=M(V.y0),V._y1=M(V.y1),V._hoverX=E(V.x1-I.marker.pad.r),V._hoverY=M(O?V.y1-I.marker.pad.b/2:V.y0+I.marker.pad.t/2);var q=t.select(this),Y=a.ensureSingle(q,"path","surface",function(fe){fe.style("pointer-events",R?"none":"all")});T?Y.transition().attrTween("d",function(fe){var pe=S(fe,h,W(),[v,x]);return function(we){return C(pe(we))}}):Y.attr("d",C),q.call(c,m,p,g,{styleOne:l,eventDataKeys:n.eventDataKeys,transitionTime:n.CLICK_TRANSITION_TIME,transitionEasing:n.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,p,{isTransitioning:p._transitioning}),Y.call(l,V,I,p,{hovered:!1}),V.x0===V.x1||V.y0===V.y1?V._text="":j?V._text=G?"":u.getPtLabel(V)||"":V._text=f(V,m,I,g,P)||"";var K=a.ensureSingle(q,"g","slicetext"),re=a.ensureSingle(K,"text","",function(fe){fe.attr("data-notex",1)}),se=a.ensureUniformFontSize(p,u.determineTextFont(I,V,P.font)),le=V._text||" ",ue=j&&le.indexOf("
")===-1;re.text(le).classed("slicetext",!0).attr("text-anchor",B?"end":L||ue?"start":"middle").call(i.font,se).call(o.convertToTspans,p),V.textBB=i.bBox(re.node()),V.transform=w(V,{fontSize:se.size,isHeader:j}),V.transform.fontSize=se.size,T?re.transition().attrTween("transform",function(fe){var pe=A(fe,h,W(),[v,x]);return function(we){return k(pe(we))}}):re.attr("transform",k(V))}),N}}}),hoe=ye({"src/traces/treemap/plot.js"(e,r){"use strict";var t=nP(),a=foe();r.exports=function(o,s,l,n){return t(o,s,l,n,{type:"treemap",drawDescendants:a})}}}),doe=ye({"src/traces/treemap/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"treemap",basePlotModule:ooe(),categories:[],animatable:!0,attributes:fM(),layoutAttributes:tP(),supplyDefaults:soe(),supplyLayoutDefaults:loe(),calc:rP().calc,crossTraceCalc:rP().crossTraceCalc,plot:hoe(),style:hM().style,colorbar:bc(),meta:{}}}}),poe=ye({"lib/treemap.js"(e,r){"use strict";r.exports=doe()}}),voe=ye({"src/traces/icicle/base_plot.js"(e){"use strict";var r=ws();e.name="icicle",e.plot=function(t,a,i,o){r.plotBasePlot(e.name,t,a,i,o)},e.clean=function(t,a,i,o){r.cleanBasePlot(e.name,t,a,i,o)}}}),oP=ye({"src/traces/icicle/attributes.js"(e,r){"use strict";var{hovertemplateAttrs:t,texttemplateAttrs:a,templatefallbackAttrs:i}=Ro(),o=rs(),s=Ds().attributes,l=qm(),n=gb(),u=fM(),c=Zm(),f=Xi().extendFlat,h=Eu().pattern;r.exports={labels:n.labels,parents:n.parents,values:n.values,branchvalues:n.branchvalues,count:n.count,level:n.level,maxdepth:n.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:u.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:f({colors:n.marker.colors,line:n.marker.line,pattern:h,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:n.leaf,pathbar:u.pathbar,text:l.text,textinfo:n.textinfo,texttemplate:a({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:i({editType:"plot"}),hovertext:l.hovertext,hoverinfo:n.hoverinfo,hovertemplate:t({},{keys:c.eventDataKeys}),hovertemplatefallback:i(),textfont:l.textfont,insidetextfont:l.insidetextfont,outsidetextfont:u.outsidetextfont,textposition:u.textposition,sort:l.sort,root:n.root,domain:s({name:"icicle",trace:!0,editType:"calc"})}}}),sP=ye({"src/traces/icicle/layout_attributes.js"(e,r){"use strict";r.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),moe=ye({"src/traces/icicle/defaults.js"(e,r){"use strict";var t=Yt(),a=oP(),i=Ya(),o=Ds().defaults,s=Oh().handleText,l=Cv().TEXTPAD,n=Vm().handleMarkerDefaults,u=As(),c=u.hasColorscale,f=u.handleDefaults;r.exports=function(d,p,g,m){function y(k,T){return t.coerce(d,p,a,k,T)}var _=y("labels"),v=y("parents");if(!_||!_.length||!v||!v.length){p.visible=!1;return}var x=y("values");x&&x.length?y("branchvalues"):y("count"),y("level"),y("maxdepth"),y("tiling.orientation"),y("tiling.flip"),y("tiling.pad");var E=y("text");y("texttemplate"),y("texttemplatefallback"),p.texttemplate||y("textinfo",t.isArrayOrTypedArray(E)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var M=y("pathbar.visible"),C="auto";s(d,p,m,y,C,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition"),n(d,p,m,y);var w=p._hasColorscale=c(d,"marker","colors")||(d.marker||{}).coloraxis;w&&f(d,p,m,y,{prefix:"marker.",cLetter:"c"}),y("leaf.opacity",w?1:.7),p._hovered={marker:{line:{width:2,color:i.contrast(m.paper_bgcolor)}}},M&&(y("pathbar.thickness",p.pathbar.textfont.size+2*l),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),o(p,m,y),p._length=null}}}),goe=ye({"src/traces/icicle/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=sP();r.exports=function(o,s){function l(n,u){return t.coerce(o,s,a,n,u)}l("iciclecolorway",s.colorway),l("extendiciclecolors")}}}),lP=ye({"src/traces/icicle/calc.js"(e){"use strict";var r=_b();e.calc=function(t,a){return r.calc(t,a)},e.crossTraceCalc=function(t){return r._runCrossTraceCalc("icicle",t)}}}),yoe=ye({"src/traces/icicle/partition.js"(e,r){"use strict";var t=yb(),a=aP();r.exports=function(o,s,l){var n=l.flipX,u=l.flipY,c=l.orientation==="h",f=l.maxDepth,h=s[0],d=s[1];f&&(h=(o.height+1)*s[0]/Math.min(o.height+1,f),d=(o.height+1)*s[1]/Math.min(o.height+1,f));var p=t.partition().padding(l.pad.inner).size(c?[s[1],h]:[s[0],d])(o);return(c||n||u)&&a(p,s,{swapXY:c,flipX:n,flipY:u}),p}}}),uP=ye({"src/traces/icicle/style.js"(e,r){"use strict";var t=ai(),a=Ya(),i=Yt(),o=jc().resizeText,s=uM();function l(u){var c=u._fullLayout._iciclelayer.selectAll(".trace");o(u,c,"icicle"),c.each(function(f){var h=t.select(this),d=f[0],p=d.trace;h.style("opacity",p.opacity),h.selectAll("path.surface").each(function(g){t.select(this).call(n,g,p,u)})})}function n(u,c,f,h){var d=c.data.data,p=!c.children,g=d.i,m=i.castOption(f,g,"marker.line.color")||a.defaultLine,y=i.castOption(f,g,"marker.line.width")||0;u.call(s,c,f,h).style("stroke-width",y).call(a.stroke,m).style("opacity",p?f.leaf.opacity:null)}r.exports={style:l,styleOne:n}}}),_oe=ye({"src/traces/icicle/draw_descendants.js"(e,r){"use strict";var t=ai(),a=Yt(),i=$i(),o=Go(),s=yoe(),l=uP().styleOne,n=Zm(),u=m0(),c=Rb(),f=cM().formatSliceLabel,h=!1;r.exports=function(p,g,m,y,_){var v=_.width,x=_.height,E=_.viewX,M=_.viewY,C=_.pathSlice,w=_.toMoveInsideSlice,k=_.strTransform,T=_.hasTransition,b=_.handleSlicesExit,S=_.makeUpdateSliceInterpolator,A=_.makeUpdateTextInterpolator,F=_.prevEntry,D={},R=p._context.staticPlot,P=p._fullLayout,z=g[0],I=z.trace,L=I.textposition.indexOf("left")!==-1,B=I.textposition.indexOf("right")!==-1,O=I.textposition.indexOf("bottom")!==-1,G=s(m,[v,x],{flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,orientation:I.tiling.orientation,pad:{inner:I.tiling.pad},maxDepth:I._maxDepth}),$=G.descendants(),X=1/0,Z=-1/0;$.forEach(function(U){var V=U.depth;V>=I._maxDepth?(U.x0=U.x1=(U.x0+U.x1)/2,U.y0=U.y1=(U.y0+U.y1)/2):(X=Math.min(X,V),Z=Math.max(Z,V))}),y=y.data($,u.getPtId),I._maxVisibleLayers=isFinite(Z)?Z-X+1:0,y.enter().append("g").classed("slice",!0),b(y,h,D,[v,x],C),y.order();var J=null;if(T&&F){var N=u.getPtId(F);y.each(function(U){J===null&&u.getPtId(U)===N&&(J={x0:U.x0,x1:U.x1,y0:U.y0,y1:U.y1})})}var H=function(){return J||{x0:0,x1:v,y0:0,y1:x}},W=y;return T&&(W=W.transition().each("end",function(){var U=t.select(this);u.setSliceCursor(U,p,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),W.each(function(U){U._x0=E(U.x0),U._x1=E(U.x1),U._y0=M(U.y0),U._y1=M(U.y1),U._hoverX=E(U.x1-I.tiling.pad),U._hoverY=M(O?U.y1-I.tiling.pad/2:U.y0+I.tiling.pad/2);var V=t.select(this),j=a.ensureSingle(V,"path","surface",function(re){re.style("pointer-events",R?"none":"all")});T?j.transition().attrTween("d",function(re){var se=S(re,h,H(),[v,x],{orientation:I.tiling.orientation,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1});return function(le){return C(se(le))}}):j.attr("d",C),V.call(c,m,p,g,{styleOne:l,eventDataKeys:n.eventDataKeys,transitionTime:n.CLICK_TRANSITION_TIME,transitionEasing:n.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,p,{isTransitioning:p._transitioning}),j.call(l,U,I,p,{hovered:!1}),U.x0===U.x1||U.y0===U.y1?U._text="":U._text=f(U,m,I,g,P)||"";var q=a.ensureSingle(V,"g","slicetext"),Y=a.ensureSingle(q,"text","",function(re){re.attr("data-notex",1)}),K=a.ensureUniformFontSize(p,u.determineTextFont(I,U,P.font));Y.text(U._text||" ").classed("slicetext",!0).attr("text-anchor",B?"end":L?"start":"middle").call(i.font,K).call(o.convertToTspans,p),U.textBB=i.bBox(Y.node()),U.transform=w(U,{fontSize:K.size}),U.transform.fontSize=K.size,T?Y.transition().attrTween("transform",function(re){var se=A(re,h,H(),[v,x]);return function(le){return k(se(le))}}):Y.attr("transform",k(U))}),J}}}),xoe=ye({"src/traces/icicle/plot.js"(e,r){"use strict";var t=nP(),a=_oe();r.exports=function(o,s,l,n){return t(o,s,l,n,{type:"icicle",drawDescendants:a})}}}),boe=ye({"src/traces/icicle/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"icicle",basePlotModule:voe(),categories:[],animatable:!0,attributes:oP(),layoutAttributes:sP(),supplyDefaults:moe(),supplyLayoutDefaults:goe(),calc:lP().calc,crossTraceCalc:lP().crossTraceCalc,plot:xoe(),style:uP().style,colorbar:bc(),meta:{}}}}),woe=ye({"lib/icicle.js"(e,r){"use strict";r.exports=boe()}}),Aoe=ye({"src/traces/funnelarea/base_plot.js"(e){"use strict";var r=ws();e.name="funnelarea",e.plot=function(t,a,i,o){r.plotBasePlot(e.name,t,a,i,o)},e.clean=function(t,a,i,o){r.cleanBasePlot(e.name,t,a,i,o)}}}),cP=ye({"src/traces/funnelarea/attributes.js"(e,r){"use strict";var t=qm(),a=Oo(),i=Ds().attributes,{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=Ro(),n=Xi().extendFlat;r.exports={labels:t.labels,label0:t.label0,dlabel:t.dlabel,values:t.values,marker:{colors:t.marker.colors,line:{color:n({},t.marker.line.color,{dflt:null}),width:n({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:t.marker.pattern,editType:"calc"},text:t.text,hovertext:t.hovertext,scalegroup:n({},t.scalegroup,{}),textinfo:n({},t.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:l({editType:"plot"}),hoverinfo:n({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:l(),textposition:n({},t.textposition,{values:["inside","none"],dflt:"inside"}),textfont:t.textfont,insidetextfont:t.insidetextfont,title:{text:t.title.text,font:t.title.font,position:n({},t.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({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"}}}}),fP=ye({"src/traces/funnelarea/layout_attributes.js"(e,r){"use strict";var t=PT().hiddenlabels;r.exports={hiddenlabels:t,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Toe=ye({"src/traces/funnelarea/defaults.js"(e,r){"use strict";var t=Yt(),a=cP(),i=Ds().defaults,o=Oh().handleText,s=Vm().handleLabelsAndValues,l=Vm().handleMarkerDefaults;r.exports=function(u,c,f,h){function d(C,w){return t.coerce(u,c,a,C,w)}var p=d("labels"),g=d("values"),m=s(p,g),y=m.len;if(c._hasLabels=m.hasLabels,c._hasValues=m.hasValues,!c._hasLabels&&c._hasValues&&(d("label0"),d("dlabel")),!y){c.visible=!1;return}c._length=y,l(u,c,h,d),d("scalegroup");var _=d("text"),v=d("texttemplate");d("texttemplatefallback");var x;if(v||(x=d("textinfo",Array.isArray(_)?"text+percent":"percent")),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback"),v||x&&x!=="none"){var E=d("textposition");o(u,c,h,d,E,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else x==="none"&&d("textposition","none");i(c,h,d);var M=d("title.text");M&&(d("title.position"),t.coerceFont(d,"title.font",h.font)),d("aspectratio"),d("baseratio")}}}),Moe=ye({"src/traces/funnelarea/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=fP();r.exports=function(o,s){function l(n,u){return t.coerce(o,s,a,n,u)}l("hiddenlabels"),l("funnelareacolorway",s.colorway),l("extendfunnelareacolors")}}}),hP=ye({"src/traces/funnelarea/calc.js"(e,r){"use strict";var t=Fy();function a(o,s){return t.calc(o,s)}function i(o){t.crossTraceCalc(o,{type:"funnelarea"})}r.exports={calc:a,crossTraceCalc:i}}}),Eoe=ye({"src/traces/funnelarea/plot.js"(e,r){"use strict";var t=ai(),a=$i(),i=Yt(),o=i.strScale,s=i.strTranslate,l=Go(),n=Rm(),u=n.toMoveInsideBar,c=jc(),f=c.recordMinTextSize,h=c.clearMinTextSize,d=Mv(),p=IT(),g=p.attachFxHandlers,m=p.determineInsideTextFont,y=p.layoutAreas,_=p.prerenderTitles,v=p.positionTitleOutside,x=p.formatSliceLabel;r.exports=function(k,T){var b=k._context.staticPlot,S=k._fullLayout;h("funnelarea",S),_(T,k),y(T,S._size),i.makeTraceGroups(S._funnelarealayer,T,"trace").each(function(A){var F=t.select(this),D=A[0],R=D.trace;C(A),F.each(function(){var P=t.select(this).selectAll("g.slice").data(A);P.enter().append("g").classed("slice",!0),P.exit().remove(),P.each(function(I,L){if(I.hidden){t.select(this).selectAll("path,g").remove();return}I.pointNumber=I.i,I.curveNumber=R.index;var B=D.cx,O=D.cy,G=t.select(this),$=G.selectAll("path.surface").data([I]);$.enter().append("path").classed("surface",!0).style({"pointer-events":b?"none":"all"}),G.call(g,k,A);var X="M"+(B+I.TR[0])+","+(O+I.TR[1])+E(I.TR,I.BR)+E(I.BR,I.BL)+E(I.BL,I.TL)+"Z";$.attr("d",X),x(k,I,D);var Z=d.castOption(R.textposition,I.pts),J=G.selectAll("g.slicetext").data(I.text&&Z!=="none"?[0]:[]);J.enter().append("g").classed("slicetext",!0),J.exit().remove(),J.each(function(){var N=i.ensureSingle(t.select(this),"text","",function(K){K.attr("data-notex",1)}),H=i.ensureUniformFontSize(k,m(R,I,S.font));N.text(I.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,H).call(l.convertToTspans,k);var W=a.bBox(N.node()),U,V,j,q=Math.min(I.BL[1],I.BR[1])+O,Y=Math.max(I.TL[1],I.TR[1])+O;V=Math.max(I.TL[0],I.BL[0])+B,j=Math.min(I.TR[0],I.BR[0])+B,U=u(V,j,q,Y,W,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),U.fontSize=H.size,f(R.type,U,S),A[L].transform=U,i.setTransormAndDisplay(N,U)})});var z=t.select(this).selectAll("g.titletext").data(R.title.text?[0]:[]);z.enter().append("g").classed("titletext",!0),z.exit().remove(),z.each(function(){var I=i.ensureSingle(t.select(this),"text","",function(O){O.attr("data-notex",1)}),L=R.title.text;R._meta&&(L=i.templateString(L,R._meta)),I.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,R.title.font).call(l.convertToTspans,k);var B=v(D,S._size);I.attr("transform",s(B.x,B.y)+o(Math.min(1,B.scale))+s(B.tx,B.ty))})})})};function E(w,k){var T=k[0]-w[0],b=k[1]-w[1];return"l"+T+","+b}function M(w,k){return[.5*(w[0]+k[0]),.5*(w[1]+k[1])]}function C(w){if(!w.length)return;var k=w[0],T=k.trace,b=T.aspectratio,S=T.baseratio;S>.999&&(S=.999);var A=Math.pow(S,2),F=k.vTotal,D=F*A/(1-A),R=F,P=D/F;function z(){var re=Math.sqrt(P);return{x:re,y:-re}}function I(){var re=z();return[re.x,re.y]}var L,B=[];B.push(I());var O,G;for(O=w.length-1;O>-1;O--)if(G=w[O],!G.hidden){var $=G.v/R;P+=$,B.push(I())}var X=1/0,Z=-1/0;for(O=0;O-1;O--)if(G=w[O],!G.hidden){q+=1;var Y=B[q][0],K=B[q][1];G.TL=[-Y,K],G.TR=[Y,K],G.BL=V,G.BR=j,G.pxmid=M(G.TR,G.BR),V=G.TL,j=G.TR}}}}),Soe=ye({"src/traces/funnelarea/style.js"(e,r){"use strict";var t=ai(),a=yy(),i=jc().resizeText;r.exports=function(s){var l=s._fullLayout._funnelarealayer.selectAll(".trace");i(s,l,"funnelarea"),l.each(function(n){var u=n[0],c=u.trace,f=t.select(this);f.style({opacity:c.opacity}),f.selectAll("path.surface").each(function(h){t.select(this).call(a,h,c,s)})})}}}),koe=ye({"src/traces/funnelarea/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Aoe(),categories:["pie-like","funnelarea","showLegend"],attributes:cP(),layoutAttributes:fP(),supplyDefaults:Toe(),supplyLayoutDefaults:Moe(),calc:hP().calc,crossTraceCalc:hP().crossTraceCalc,plot:Eoe(),style:Soe(),styleOne:yy(),meta:{}}}}),Coe=ye({"lib/funnelarea.js"(e,r){"use strict";r.exports=koe()}}),$u=ye({"stackgl_modules/index.js"(e,r){"use strict";(()=>{var t={3065(s,l,n){s.exports={alpha_shape:n(3502),convex_hull:n(7352),delaunay_triangulate:n(7642),gl_cone3d:n(6405),gl_error3d:n(9165),gl_line3d:n(5714),gl_mesh3d:n(7201),gl_plot3d:n(4100),gl_scatter3d:n(8418),gl_streamtube3d:n(7815),gl_surface3d:n(9499),ndarray:n(9618),ndarray_linear_interpolate:n(4317)}},6296(s,l,n){"use strict";s.exports=p;var u=n(7261),c=n(9977),f=n(1811);function h(g,m){this._controllerNames=Object.keys(g),this._controllerList=this._controllerNames.map(function(y){return g[y]}),this._mode=m,this._active=g[m],this._active||(this._mode="turntable",this._active=g.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var d=h.prototype;d.flush=function(g){for(var m=this._controllerList,y=0;y"u"?n(1538):WeakMap,c=n(2762),f=n(8116),h=new u;function d(p){var g=h.get(p),m=g&&(g._triangleBuffer.handle||g._triangleBuffer.buffer);if(!m||!p.isBuffer(m)){var y=c(p,new Float32Array([-1,-1,-1,4,4,-1]));g=f(p,[{buffer:y,type:p.FLOAT,size:2}]),g._triangleBuffer=y,h.set(p,g)}g.bind(),p.drawArrays(p.TRIANGLES,0,3),g.unbind()}s.exports=d},1085(s,l,n){var u=n(1371);s.exports=c;function c(f,h,d){h=typeof h=="number"?h:1,d=d||": ";var p=f.split(/\r?\n/),g=String(p.length+h-1).length;return p.map(function(m,y){var _=y+h,v=String(_).length,x=u(_,g-v);return x+d+m}).join(` -`)}},3952(s,l,n){"use strict";s.exports=f;var u=n(3250);function c(h,d){for(var p=new Array(d+1),g=0;g0)throw new Error("Invalid string. Length must be a multiple of 4");var C=E.indexOf("=");C===-1&&(C=M);var w=C===M?0:4-C%4;return[C,w]}function g(E){var M=p(E),C=M[0],w=M[1];return(C+w)*3/4-w}function m(E,M,C){return(M+C)*3/4-C}function y(E){var M,C=p(E),w=C[0],k=C[1],T=new c(m(E,w,k)),b=0,S=k>0?w-4:w,A;for(A=0;A>16&255,T[b++]=M>>8&255,T[b++]=M&255;return k===2&&(M=u[E.charCodeAt(A)]<<2|u[E.charCodeAt(A+1)]>>4,T[b++]=M&255),k===1&&(M=u[E.charCodeAt(A)]<<10|u[E.charCodeAt(A+1)]<<4|u[E.charCodeAt(A+2)]>>2,T[b++]=M>>8&255,T[b++]=M&255),T}function _(E){return n[E>>18&63]+n[E>>12&63]+n[E>>6&63]+n[E&63]}function v(E,M,C){for(var w,k=[],T=M;TS?S:b+T));return w===1?(M=E[C-1],k.push(n[M>>2]+n[M<<4&63]+"==")):w===2&&(M=(E[C-2]<<8)+E[C-1],k.push(n[M>>10]+n[M>>4&63]+n[M<<2&63]+"=")),k.join("")}},3865(s,l,n){"use strict";var u=n(869);s.exports=c;function c(f,h){return u(f[0].mul(h[1]).add(h[0].mul(f[1])),f[1].mul(h[1]))}},1318(s){"use strict";s.exports=l;function l(n,u){return n[0].mul(u[1]).cmp(u[0].mul(n[1]))}},8697(s,l,n){"use strict";var u=n(869);s.exports=c;function c(f,h){return u(f[0].mul(h[1]),f[1].mul(h[0]))}},7842(s,l,n){"use strict";var u=n(6330),c=n(1533),f=n(2651),h=n(6768),d=n(869),p=n(8697);s.exports=g;function g(m,y){if(u(m))return y?p(m,g(y)):[m[0].clone(),m[1].clone()];var _=0,v,x;if(c(m))v=m.clone();else if(typeof m=="string")v=h(m);else{if(m===0)return[f(0),f(1)];if(m===Math.floor(m))v=f(m);else{for(;m!==Math.floor(m);)m=m*Math.pow(2,256),_-=256;v=f(m)}}if(u(y))v.mul(y[1]),x=y[0].clone();else if(c(y))x=y.clone();else if(typeof y=="string")x=h(y);else if(!y)x=f(1);else if(y===Math.floor(y))x=f(y);else{for(;y!==Math.floor(y);)y=y*Math.pow(2,256),_+=256;x=f(y)}return _>0?v=v.ushln(_):_<0&&(x=x.ushln(-_)),d(v,x)}},6330(s,l,n){"use strict";var u=n(1533);s.exports=c;function c(f){return Array.isArray(f)&&f.length===2&&u(f[0])&&u(f[1])}},5716(s,l,n){"use strict";var u=n(6859);s.exports=c;function c(f){return f.cmp(new u(0))}},1369(s,l,n){"use strict";var u=n(5716);s.exports=c;function c(f){var h=f.length,d=f.words,p=0;if(h===1)p=d[0];else if(h===2)p=d[0]+d[1]*67108864;else for(var g=0;g20?52:p+32}},1533(s,l,n){"use strict";var u=n(6859);s.exports=c;function c(f){return f&&typeof f=="object"&&!!f.words}},2651(s,l,n){"use strict";var u=n(6859),c=n(2361);s.exports=f;function f(h){var d=c.exponent(h);return d<52?new u(h):new u(h*Math.pow(2,52-d)).ushln(d-52)}},869(s,l,n){"use strict";var u=n(2651),c=n(5716);s.exports=f;function f(h,d){var p=c(h),g=c(d);if(p===0)return[u(0),u(1)];if(g===0)return[u(0),u(0)];g<0&&(h=h.neg(),d=d.neg());var m=h.gcd(d);return m.cmpn(1)?[h.div(m),d.div(m)]:[h,d]}},6768(s,l,n){"use strict";var u=n(6859);s.exports=c;function c(f){return new u(f)}},6504(s,l,n){"use strict";var u=n(869);s.exports=c;function c(f,h){return u(f[0].mul(h[0]),f[1].mul(h[1]))}},7721(s,l,n){"use strict";var u=n(5716);s.exports=c;function c(f){return u(f[0])*u(f[1])}},5572(s,l,n){"use strict";var u=n(869);s.exports=c;function c(f,h){return u(f[0].mul(h[1]).sub(f[1].mul(h[0])),f[1].mul(h[1]))}},946(s,l,n){"use strict";var u=n(1369),c=n(4025);s.exports=f;function f(h){var d=h[0],p=h[1];if(d.cmpn(0)===0)return 0;var g=d.abs().divmod(p.abs()),m=g.div,y=u(m),_=g.mod,v=d.negative!==p.negative?-1:1;if(_.cmpn(0)===0)return v*y;if(y){var x=c(y)+4,E=u(_.ushln(x).divRound(p));return v*(y+E*Math.pow(2,-x))}else{var M=p.bitLength()-_.bitLength()+53,E=u(_.ushln(M).divRound(p));return M<1023?v*E*Math.pow(2,-M):(E*=Math.pow(2,-1023),v*E*Math.pow(2,1023-M))}}},2478(s){"use strict";function l(d,p,g,m,y){for(var _=y+1;m<=y;){var v=m+y>>>1,x=d[v],E=g!==void 0?g(x,p):x-p;E>=0?(_=v,y=v-1):m=v+1}return _}function n(d,p,g,m,y){for(var _=y+1;m<=y;){var v=m+y>>>1,x=d[v],E=g!==void 0?g(x,p):x-p;E>0?(_=v,y=v-1):m=v+1}return _}function u(d,p,g,m,y){for(var _=m-1;m<=y;){var v=m+y>>>1,x=d[v],E=g!==void 0?g(x,p):x-p;E<0?(_=v,m=v+1):y=v-1}return _}function c(d,p,g,m,y){for(var _=m-1;m<=y;){var v=m+y>>>1,x=d[v],E=g!==void 0?g(x,p):x-p;E<=0?(_=v,m=v+1):y=v-1}return _}function f(d,p,g,m,y){for(;m<=y;){var _=m+y>>>1,v=d[_],x=g!==void 0?g(v,p):v-p;if(x===0)return _;x<=0?m=_+1:y=_-1}return-1}function h(d,p,g,m,y,_){return typeof g=="function"?_(d,p,g,m===void 0?0:m|0,y===void 0?d.length-1:y|0):_(d,p,void 0,g===void 0?0:g|0,m===void 0?d.length-1:m|0)}s.exports={ge:function(d,p,g,m,y){return h(d,p,g,m,y,l)},gt:function(d,p,g,m,y){return h(d,p,g,m,y,n)},lt:function(d,p,g,m,y){return h(d,p,g,m,y,u)},le:function(d,p,g,m,y){return h(d,p,g,m,y,c)},eq:function(d,p,g,m,y){return h(d,p,g,m,y,f)}}},8828(s,l){"use strict";"use restrict";var n=32;l.INT_BITS=n,l.INT_MAX=2147483647,l.INT_MIN=-1<0)-(f<0)},l.abs=function(f){var h=f>>n-1;return(f^h)-h},l.min=function(f,h){return h^(f^h)&-(f65535)<<4,f>>>=h,d=(f>255)<<3,f>>>=d,h|=d,d=(f>15)<<2,f>>>=d,h|=d,d=(f>3)<<1,f>>>=d,h|=d,h|f>>1},l.log10=function(f){return f>=1e9?9:f>=1e8?8:f>=1e7?7:f>=1e6?6:f>=1e5?5:f>=1e4?4:f>=1e3?3:f>=100?2:f>=10?1:0},l.popCount=function(f){return f=f-(f>>>1&1431655765),f=(f&858993459)+(f>>>2&858993459),(f+(f>>>4)&252645135)*16843009>>>24};function u(f){var h=32;return f&=-f,f&&h--,f&65535&&(h-=16),f&16711935&&(h-=8),f&252645135&&(h-=4),f&858993459&&(h-=2),f&1431655765&&(h-=1),h}l.countTrailingZeros=u,l.nextPow2=function(f){return f+=f===0,--f,f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f+1},l.prevPow2=function(f){return f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f-(f>>>1)},l.parity=function(f){return f^=f>>>16,f^=f>>>8,f^=f>>>4,f&=15,27030>>>f&1};var c=new Array(256);(function(f){for(var h=0;h<256;++h){var d=h,p=h,g=7;for(d>>>=1;d;d>>>=1)p<<=1,p|=d&1,--g;f[h]=p<>>8&255]<<16|c[f>>>16&255]<<8|c[f>>>24&255]},l.interleave2=function(f,h){return f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,h&=65535,h=(h|h<<8)&16711935,h=(h|h<<4)&252645135,h=(h|h<<2)&858993459,h=(h|h<<1)&1431655765,f|h<<1},l.deinterleave2=function(f,h){return f=f>>>h&1431655765,f=(f|f>>>1)&858993459,f=(f|f>>>2)&252645135,f=(f|f>>>4)&16711935,f=(f|f>>>16)&65535,f<<16>>16},l.interleave3=function(f,h,d){return f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,h&=1023,h=(h|h<<16)&4278190335,h=(h|h<<8)&251719695,h=(h|h<<4)&3272356035,h=(h|h<<2)&1227133513,f|=h<<1,d&=1023,d=(d|d<<16)&4278190335,d=(d|d<<8)&251719695,d=(d|d<<4)&3272356035,d=(d|d<<2)&1227133513,f|d<<2},l.deinterleave3=function(f,h){return f=f>>>h&1227133513,f=(f|f>>>2)&3272356035,f=(f|f>>>4)&251719695,f=(f|f>>>8)&4278190335,f=(f|f>>>16)&1023,f<<22>>22},l.nextCombination=function(f){var h=f|f-1;return h+1|(~h&-~h)-1>>>u(f)+1}},6859(s,l,n){s=n.nmd(s),(function(u,c){"use strict";function f(I,L){if(!I)throw new Error(L||"Assertion failed")}function h(I,L){I.super_=L;var B=function(){};B.prototype=L.prototype,I.prototype=new B,I.prototype.constructor=I}function d(I,L,B){if(d.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((L==="le"||L==="be")&&(B=L,L=10),this._init(I||0,L||10,B||"be"))}typeof u=="object"?u.exports=d:c.BN=d,d.BN=d,d.wordSize=26;var p;try{typeof window<"u"&&typeof window.Buffer<"u"?p=window.Buffer:p=n(7790).Buffer}catch{}d.isBN=function(L){return L instanceof d?!0:L!==null&&typeof L=="object"&&L.constructor.wordSize===d.wordSize&&Array.isArray(L.words)},d.max=function(L,B){return L.cmp(B)>0?L:B},d.min=function(L,B){return L.cmp(B)<0?L:B},d.prototype._init=function(L,B,O){if(typeof L=="number")return this._initNumber(L,B,O);if(typeof L=="object")return this._initArray(L,B,O);B==="hex"&&(B=16),f(B===(B|0)&&B>=2&&B<=36),L=L.toString().replace(/\s+/g,"");var G=0;L[0]==="-"&&(G++,this.negative=1),G=0;G-=3)X=L[G]|L[G-1]<<8|L[G-2]<<16,this.words[$]|=X<>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,$++);else if(O==="le")for(G=0,$=0;G>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,$++);return this.strip()};function g(I,L){var B=I.charCodeAt(L);return B>=65&&B<=70?B-55:B>=97&&B<=102?B-87:B-48&15}function m(I,L,B){var O=g(I,B);return B-1>=L&&(O|=g(I,B-1)<<4),O}d.prototype._parseHex=function(L,B,O){this.length=Math.ceil((L.length-B)/6),this.words=new Array(this.length);for(var G=0;G=B;G-=2)Z=m(L,B,G)<<$,this.words[X]|=Z&67108863,$>=18?($-=18,X+=1,this.words[X]|=Z>>>26):$+=8;else{var J=L.length-B;for(G=J%2===0?B+1:B;G=18?($-=18,X+=1,this.words[X]|=Z>>>26):$+=8}this.strip()};function y(I,L,B,O){for(var G=0,$=Math.min(I.length,B),X=L;X<$;X++){var Z=I.charCodeAt(X)-48;G*=O,Z>=49?G+=Z-49+10:Z>=17?G+=Z-17+10:G+=Z}return G}d.prototype._parseBase=function(L,B,O){this.words=[0],this.length=1;for(var G=0,$=1;$<=67108863;$*=B)G++;G--,$=$/B|0;for(var X=L.length-O,Z=X%G,J=Math.min(X,X-Z)+O,N=0,H=O;H1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},d.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var _=["","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"],v=[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],x=[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];d.prototype.toString=function(L,B){L=L||10,B=B|0||1;var O;if(L===16||L==="hex"){O="";for(var G=0,$=0,X=0;X>>24-G&16777215,G+=2,G>=26&&(G-=26,X--),$!==0||X!==this.length-1?O=_[6-J.length]+J+O:O=J+O}for($!==0&&(O=$.toString(16)+O);O.length%B!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}if(L===(L|0)&&L>=2&&L<=36){var N=v[L],H=x[L];O="";var W=this.clone();for(W.negative=0;!W.isZero();){var U=W.modn(H).toString(L);W=W.idivn(H),W.isZero()?O=U+O:O=_[N-U.length]+U+O}for(this.isZero()&&(O="0"+O);O.length%B!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}f(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=this.words[1]*67108864:this.length===3&&this.words[2]===1?L+=4503599627370496+this.words[1]*67108864:this.length>2&&f(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(L,B){return f(typeof p<"u"),this.toArrayLike(p,L,B)},d.prototype.toArray=function(L,B){return this.toArrayLike(Array,L,B)},d.prototype.toArrayLike=function(L,B,O){var G=this.byteLength(),$=O||Math.max(1,G);f(G<=$,"byte array longer than desired length"),f($>0,"Requested array length <= 0"),this.strip();var X=B==="le",Z=new L($),J,N,H=this.clone();if(X){for(N=0;!H.isZero();N++)J=H.andln(255),H.iushrn(8),Z[N]=J;for(;N<$;N++)Z[N]=0}else{for(N=0;N<$-G;N++)Z[N]=0;for(N=0;!H.isZero();N++)J=H.andln(255),H.iushrn(8),Z[$-N-1]=J}return Z},Math.clz32?d.prototype._countBits=function(L){return 32-Math.clz32(L)}:d.prototype._countBits=function(L){var B=L,O=0;return B>=4096&&(O+=13,B>>>=13),B>=64&&(O+=7,B>>>=7),B>=8&&(O+=4,B>>>=4),B>=2&&(O+=2,B>>>=2),O+B},d.prototype._zeroBits=function(L){if(L===0)return 26;var B=L,O=0;return(B&8191)===0&&(O+=13,B>>>=13),(B&127)===0&&(O+=7,B>>>=7),(B&15)===0&&(O+=4,B>>>=4),(B&3)===0&&(O+=2,B>>>=2),(B&1)===0&&O++,O},d.prototype.bitLength=function(){var L=this.words[this.length-1],B=this._countBits(L);return(this.length-1)*26+B};function E(I){for(var L=new Array(I.bitLength()),B=0;B>>G}return L}d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,B=0;BL.length?this.clone().ior(L):L.clone().ior(this)},d.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},d.prototype.iuand=function(L){var B;this.length>L.length?B=L:B=this;for(var O=0;OL.length?this.clone().iand(L):L.clone().iand(this)},d.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},d.prototype.iuxor=function(L){var B,O;this.length>L.length?(B=this,O=L):(B=L,O=this);for(var G=0;GL.length?this.clone().ixor(L):L.clone().ixor(this)},d.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},d.prototype.inotn=function(L){f(typeof L=="number"&&L>=0);var B=Math.ceil(L/26)|0,O=L%26;this._expand(B),O>0&&B--;for(var G=0;G0&&(this.words[G]=~this.words[G]&67108863>>26-O,G++);G=0);var O=L/26|0,G=L%26;return this._expand(O+1),B?this.words[O]=this.words[O]|1<L.length?(O=this,G=L):(O=L,G=this);for(var $=0,X=0;X>>26;for(;$!==0&&X>>26;if(this.length=O.length,$!==0)this.words[this.length]=$,this.length++;else if(O!==this)for(;XL.length?this.clone().iadd(L):L.clone().iadd(this)},d.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var B=this.iadd(L);return L.negative=1,B._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var O=this.cmp(L);if(O===0)return this.negative=0,this.length=1,this.words[0]=0,this;var G,$;O>0?(G=this,$=L):(G=L,$=this);for(var X=0,Z=0;Z<$.length;Z++)B=(G.words[Z]|0)-($.words[Z]|0)+X,X=B>>26,this.words[Z]=B&67108863;for(;X!==0&&Z>26,this.words[Z]=B&67108863;if(X===0&&Z>>26,W=J&67108863,U=Math.min(N,L.length-1),V=Math.max(0,N-I.length+1);V<=U;V++){var j=N-V|0;G=I.words[j]|0,$=L.words[V]|0,X=G*$+W,H+=X/67108864|0,W=X&67108863}B.words[N]=W|0,J=H|0}return J!==0?B.words[N]=J|0:B.length--,B.strip()}var C=function(L,B,O){var G=L.words,$=B.words,X=O.words,Z=0,J,N,H,W=G[0]|0,U=W&8191,V=W>>>13,j=G[1]|0,q=j&8191,Y=j>>>13,K=G[2]|0,re=K&8191,se=K>>>13,le=G[3]|0,ue=le&8191,fe=le>>>13,pe=G[4]|0,we=pe&8191,xe=pe>>>13,he=G[5]|0,oe=he&8191,te=he>>>13,ie=G[6]|0,ee=ie&8191,ce=ie>>>13,_e=G[7]|0,Se=_e&8191,Me=_e>>>13,Ue=G[8]|0,Ge=Ue&8191,Ze=Ue>>>13,Ke=G[9]|0,dt=Ke&8191,_t=Ke>>>13,Pt=$[0]|0,pt=Pt&8191,Tt=Pt>>>13,st=$[1]|0,Ve=st&8191,Ye=st>>>13,me=$[2]|0,be=me&8191,Ee=me>>>13,De=$[3]|0,Ce=De&8191,Fe=De>>>13,Je=$[4]|0,qe=Je&8191,at=Je>>>13,tt=$[5]|0,ct=tt&8191,At=tt>>>13,ft=$[6]|0,qt=ft&8191,ar=ft>>>13,vt=$[7]|0,gt=vt&8191,St=vt>>>13,Dt=$[8]|0,kt=Dt&8191,Vt=Dt>>>13,lr=$[9]|0,dr=lr&8191,yr=lr>>>13;O.negative=L.negative^B.negative,O.length=19,J=Math.imul(U,pt),N=Math.imul(U,Tt),N=N+Math.imul(V,pt)|0,H=Math.imul(V,Tt);var vr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(vr>>>26)|0,vr&=67108863,J=Math.imul(q,pt),N=Math.imul(q,Tt),N=N+Math.imul(Y,pt)|0,H=Math.imul(Y,Tt),J=J+Math.imul(U,Ve)|0,N=N+Math.imul(U,Ye)|0,N=N+Math.imul(V,Ve)|0,H=H+Math.imul(V,Ye)|0;var Fr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,J=Math.imul(re,pt),N=Math.imul(re,Tt),N=N+Math.imul(se,pt)|0,H=Math.imul(se,Tt),J=J+Math.imul(q,Ve)|0,N=N+Math.imul(q,Ye)|0,N=N+Math.imul(Y,Ve)|0,H=H+Math.imul(Y,Ye)|0,J=J+Math.imul(U,be)|0,N=N+Math.imul(U,Ee)|0,N=N+Math.imul(V,be)|0,H=H+Math.imul(V,Ee)|0;var la=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(la>>>26)|0,la&=67108863,J=Math.imul(ue,pt),N=Math.imul(ue,Tt),N=N+Math.imul(fe,pt)|0,H=Math.imul(fe,Tt),J=J+Math.imul(re,Ve)|0,N=N+Math.imul(re,Ye)|0,N=N+Math.imul(se,Ve)|0,H=H+Math.imul(se,Ye)|0,J=J+Math.imul(q,be)|0,N=N+Math.imul(q,Ee)|0,N=N+Math.imul(Y,be)|0,H=H+Math.imul(Y,Ee)|0,J=J+Math.imul(U,Ce)|0,N=N+Math.imul(U,Fe)|0,N=N+Math.imul(V,Ce)|0,H=H+Math.imul(V,Fe)|0;var Hr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,J=Math.imul(we,pt),N=Math.imul(we,Tt),N=N+Math.imul(xe,pt)|0,H=Math.imul(xe,Tt),J=J+Math.imul(ue,Ve)|0,N=N+Math.imul(ue,Ye)|0,N=N+Math.imul(fe,Ve)|0,H=H+Math.imul(fe,Ye)|0,J=J+Math.imul(re,be)|0,N=N+Math.imul(re,Ee)|0,N=N+Math.imul(se,be)|0,H=H+Math.imul(se,Ee)|0,J=J+Math.imul(q,Ce)|0,N=N+Math.imul(q,Fe)|0,N=N+Math.imul(Y,Ce)|0,H=H+Math.imul(Y,Fe)|0,J=J+Math.imul(U,qe)|0,N=N+Math.imul(U,at)|0,N=N+Math.imul(V,qe)|0,H=H+Math.imul(V,at)|0;var jr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(jr>>>26)|0,jr&=67108863,J=Math.imul(oe,pt),N=Math.imul(oe,Tt),N=N+Math.imul(te,pt)|0,H=Math.imul(te,Tt),J=J+Math.imul(we,Ve)|0,N=N+Math.imul(we,Ye)|0,N=N+Math.imul(xe,Ve)|0,H=H+Math.imul(xe,Ye)|0,J=J+Math.imul(ue,be)|0,N=N+Math.imul(ue,Ee)|0,N=N+Math.imul(fe,be)|0,H=H+Math.imul(fe,Ee)|0,J=J+Math.imul(re,Ce)|0,N=N+Math.imul(re,Fe)|0,N=N+Math.imul(se,Ce)|0,H=H+Math.imul(se,Fe)|0,J=J+Math.imul(q,qe)|0,N=N+Math.imul(q,at)|0,N=N+Math.imul(Y,qe)|0,H=H+Math.imul(Y,at)|0,J=J+Math.imul(U,ct)|0,N=N+Math.imul(U,At)|0,N=N+Math.imul(V,ct)|0,H=H+Math.imul(V,At)|0;var Oa=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Oa>>>26)|0,Oa&=67108863,J=Math.imul(ee,pt),N=Math.imul(ee,Tt),N=N+Math.imul(ce,pt)|0,H=Math.imul(ce,Tt),J=J+Math.imul(oe,Ve)|0,N=N+Math.imul(oe,Ye)|0,N=N+Math.imul(te,Ve)|0,H=H+Math.imul(te,Ye)|0,J=J+Math.imul(we,be)|0,N=N+Math.imul(we,Ee)|0,N=N+Math.imul(xe,be)|0,H=H+Math.imul(xe,Ee)|0,J=J+Math.imul(ue,Ce)|0,N=N+Math.imul(ue,Fe)|0,N=N+Math.imul(fe,Ce)|0,H=H+Math.imul(fe,Fe)|0,J=J+Math.imul(re,qe)|0,N=N+Math.imul(re,at)|0,N=N+Math.imul(se,qe)|0,H=H+Math.imul(se,at)|0,J=J+Math.imul(q,ct)|0,N=N+Math.imul(q,At)|0,N=N+Math.imul(Y,ct)|0,H=H+Math.imul(Y,At)|0,J=J+Math.imul(U,qt)|0,N=N+Math.imul(U,ar)|0,N=N+Math.imul(V,qt)|0,H=H+Math.imul(V,ar)|0;var Da=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Da>>>26)|0,Da&=67108863,J=Math.imul(Se,pt),N=Math.imul(Se,Tt),N=N+Math.imul(Me,pt)|0,H=Math.imul(Me,Tt),J=J+Math.imul(ee,Ve)|0,N=N+Math.imul(ee,Ye)|0,N=N+Math.imul(ce,Ve)|0,H=H+Math.imul(ce,Ye)|0,J=J+Math.imul(oe,be)|0,N=N+Math.imul(oe,Ee)|0,N=N+Math.imul(te,be)|0,H=H+Math.imul(te,Ee)|0,J=J+Math.imul(we,Ce)|0,N=N+Math.imul(we,Fe)|0,N=N+Math.imul(xe,Ce)|0,H=H+Math.imul(xe,Fe)|0,J=J+Math.imul(ue,qe)|0,N=N+Math.imul(ue,at)|0,N=N+Math.imul(fe,qe)|0,H=H+Math.imul(fe,at)|0,J=J+Math.imul(re,ct)|0,N=N+Math.imul(re,At)|0,N=N+Math.imul(se,ct)|0,H=H+Math.imul(se,At)|0,J=J+Math.imul(q,qt)|0,N=N+Math.imul(q,ar)|0,N=N+Math.imul(Y,qt)|0,H=H+Math.imul(Y,ar)|0,J=J+Math.imul(U,gt)|0,N=N+Math.imul(U,St)|0,N=N+Math.imul(V,gt)|0,H=H+Math.imul(V,St)|0;var _i=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(_i>>>26)|0,_i&=67108863,J=Math.imul(Ge,pt),N=Math.imul(Ge,Tt),N=N+Math.imul(Ze,pt)|0,H=Math.imul(Ze,Tt),J=J+Math.imul(Se,Ve)|0,N=N+Math.imul(Se,Ye)|0,N=N+Math.imul(Me,Ve)|0,H=H+Math.imul(Me,Ye)|0,J=J+Math.imul(ee,be)|0,N=N+Math.imul(ee,Ee)|0,N=N+Math.imul(ce,be)|0,H=H+Math.imul(ce,Ee)|0,J=J+Math.imul(oe,Ce)|0,N=N+Math.imul(oe,Fe)|0,N=N+Math.imul(te,Ce)|0,H=H+Math.imul(te,Fe)|0,J=J+Math.imul(we,qe)|0,N=N+Math.imul(we,at)|0,N=N+Math.imul(xe,qe)|0,H=H+Math.imul(xe,at)|0,J=J+Math.imul(ue,ct)|0,N=N+Math.imul(ue,At)|0,N=N+Math.imul(fe,ct)|0,H=H+Math.imul(fe,At)|0,J=J+Math.imul(re,qt)|0,N=N+Math.imul(re,ar)|0,N=N+Math.imul(se,qt)|0,H=H+Math.imul(se,ar)|0,J=J+Math.imul(q,gt)|0,N=N+Math.imul(q,St)|0,N=N+Math.imul(Y,gt)|0,H=H+Math.imul(Y,St)|0,J=J+Math.imul(U,kt)|0,N=N+Math.imul(U,Vt)|0,N=N+Math.imul(V,kt)|0,H=H+Math.imul(V,Vt)|0;var ti=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(ti>>>26)|0,ti&=67108863,J=Math.imul(dt,pt),N=Math.imul(dt,Tt),N=N+Math.imul(_t,pt)|0,H=Math.imul(_t,Tt),J=J+Math.imul(Ge,Ve)|0,N=N+Math.imul(Ge,Ye)|0,N=N+Math.imul(Ze,Ve)|0,H=H+Math.imul(Ze,Ye)|0,J=J+Math.imul(Se,be)|0,N=N+Math.imul(Se,Ee)|0,N=N+Math.imul(Me,be)|0,H=H+Math.imul(Me,Ee)|0,J=J+Math.imul(ee,Ce)|0,N=N+Math.imul(ee,Fe)|0,N=N+Math.imul(ce,Ce)|0,H=H+Math.imul(ce,Fe)|0,J=J+Math.imul(oe,qe)|0,N=N+Math.imul(oe,at)|0,N=N+Math.imul(te,qe)|0,H=H+Math.imul(te,at)|0,J=J+Math.imul(we,ct)|0,N=N+Math.imul(we,At)|0,N=N+Math.imul(xe,ct)|0,H=H+Math.imul(xe,At)|0,J=J+Math.imul(ue,qt)|0,N=N+Math.imul(ue,ar)|0,N=N+Math.imul(fe,qt)|0,H=H+Math.imul(fe,ar)|0,J=J+Math.imul(re,gt)|0,N=N+Math.imul(re,St)|0,N=N+Math.imul(se,gt)|0,H=H+Math.imul(se,St)|0,J=J+Math.imul(q,kt)|0,N=N+Math.imul(q,Vt)|0,N=N+Math.imul(Y,kt)|0,H=H+Math.imul(Y,Vt)|0,J=J+Math.imul(U,dr)|0,N=N+Math.imul(U,yr)|0,N=N+Math.imul(V,dr)|0,H=H+Math.imul(V,yr)|0;var Ka=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Ka>>>26)|0,Ka&=67108863,J=Math.imul(dt,Ve),N=Math.imul(dt,Ye),N=N+Math.imul(_t,Ve)|0,H=Math.imul(_t,Ye),J=J+Math.imul(Ge,be)|0,N=N+Math.imul(Ge,Ee)|0,N=N+Math.imul(Ze,be)|0,H=H+Math.imul(Ze,Ee)|0,J=J+Math.imul(Se,Ce)|0,N=N+Math.imul(Se,Fe)|0,N=N+Math.imul(Me,Ce)|0,H=H+Math.imul(Me,Fe)|0,J=J+Math.imul(ee,qe)|0,N=N+Math.imul(ee,at)|0,N=N+Math.imul(ce,qe)|0,H=H+Math.imul(ce,at)|0,J=J+Math.imul(oe,ct)|0,N=N+Math.imul(oe,At)|0,N=N+Math.imul(te,ct)|0,H=H+Math.imul(te,At)|0,J=J+Math.imul(we,qt)|0,N=N+Math.imul(we,ar)|0,N=N+Math.imul(xe,qt)|0,H=H+Math.imul(xe,ar)|0,J=J+Math.imul(ue,gt)|0,N=N+Math.imul(ue,St)|0,N=N+Math.imul(fe,gt)|0,H=H+Math.imul(fe,St)|0,J=J+Math.imul(re,kt)|0,N=N+Math.imul(re,Vt)|0,N=N+Math.imul(se,kt)|0,H=H+Math.imul(se,Vt)|0,J=J+Math.imul(q,dr)|0,N=N+Math.imul(q,yr)|0,N=N+Math.imul(Y,dr)|0,H=H+Math.imul(Y,yr)|0;var ia=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(ia>>>26)|0,ia&=67108863,J=Math.imul(dt,be),N=Math.imul(dt,Ee),N=N+Math.imul(_t,be)|0,H=Math.imul(_t,Ee),J=J+Math.imul(Ge,Ce)|0,N=N+Math.imul(Ge,Fe)|0,N=N+Math.imul(Ze,Ce)|0,H=H+Math.imul(Ze,Fe)|0,J=J+Math.imul(Se,qe)|0,N=N+Math.imul(Se,at)|0,N=N+Math.imul(Me,qe)|0,H=H+Math.imul(Me,at)|0,J=J+Math.imul(ee,ct)|0,N=N+Math.imul(ee,At)|0,N=N+Math.imul(ce,ct)|0,H=H+Math.imul(ce,At)|0,J=J+Math.imul(oe,qt)|0,N=N+Math.imul(oe,ar)|0,N=N+Math.imul(te,qt)|0,H=H+Math.imul(te,ar)|0,J=J+Math.imul(we,gt)|0,N=N+Math.imul(we,St)|0,N=N+Math.imul(xe,gt)|0,H=H+Math.imul(xe,St)|0,J=J+Math.imul(ue,kt)|0,N=N+Math.imul(ue,Vt)|0,N=N+Math.imul(fe,kt)|0,H=H+Math.imul(fe,Vt)|0,J=J+Math.imul(re,dr)|0,N=N+Math.imul(re,yr)|0,N=N+Math.imul(se,dr)|0,H=H+Math.imul(se,yr)|0;var na=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(na>>>26)|0,na&=67108863,J=Math.imul(dt,Ce),N=Math.imul(dt,Fe),N=N+Math.imul(_t,Ce)|0,H=Math.imul(_t,Fe),J=J+Math.imul(Ge,qe)|0,N=N+Math.imul(Ge,at)|0,N=N+Math.imul(Ze,qe)|0,H=H+Math.imul(Ze,at)|0,J=J+Math.imul(Se,ct)|0,N=N+Math.imul(Se,At)|0,N=N+Math.imul(Me,ct)|0,H=H+Math.imul(Me,At)|0,J=J+Math.imul(ee,qt)|0,N=N+Math.imul(ee,ar)|0,N=N+Math.imul(ce,qt)|0,H=H+Math.imul(ce,ar)|0,J=J+Math.imul(oe,gt)|0,N=N+Math.imul(oe,St)|0,N=N+Math.imul(te,gt)|0,H=H+Math.imul(te,St)|0,J=J+Math.imul(we,kt)|0,N=N+Math.imul(we,Vt)|0,N=N+Math.imul(xe,kt)|0,H=H+Math.imul(xe,Vt)|0,J=J+Math.imul(ue,dr)|0,N=N+Math.imul(ue,yr)|0,N=N+Math.imul(fe,dr)|0,H=H+Math.imul(fe,yr)|0;var xi=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(xi>>>26)|0,xi&=67108863,J=Math.imul(dt,qe),N=Math.imul(dt,at),N=N+Math.imul(_t,qe)|0,H=Math.imul(_t,at),J=J+Math.imul(Ge,ct)|0,N=N+Math.imul(Ge,At)|0,N=N+Math.imul(Ze,ct)|0,H=H+Math.imul(Ze,At)|0,J=J+Math.imul(Se,qt)|0,N=N+Math.imul(Se,ar)|0,N=N+Math.imul(Me,qt)|0,H=H+Math.imul(Me,ar)|0,J=J+Math.imul(ee,gt)|0,N=N+Math.imul(ee,St)|0,N=N+Math.imul(ce,gt)|0,H=H+Math.imul(ce,St)|0,J=J+Math.imul(oe,kt)|0,N=N+Math.imul(oe,Vt)|0,N=N+Math.imul(te,kt)|0,H=H+Math.imul(te,Vt)|0,J=J+Math.imul(we,dr)|0,N=N+Math.imul(we,yr)|0,N=N+Math.imul(xe,dr)|0,H=H+Math.imul(xe,yr)|0;var Yi=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,J=Math.imul(dt,ct),N=Math.imul(dt,At),N=N+Math.imul(_t,ct)|0,H=Math.imul(_t,At),J=J+Math.imul(Ge,qt)|0,N=N+Math.imul(Ge,ar)|0,N=N+Math.imul(Ze,qt)|0,H=H+Math.imul(Ze,ar)|0,J=J+Math.imul(Se,gt)|0,N=N+Math.imul(Se,St)|0,N=N+Math.imul(Me,gt)|0,H=H+Math.imul(Me,St)|0,J=J+Math.imul(ee,kt)|0,N=N+Math.imul(ee,Vt)|0,N=N+Math.imul(ce,kt)|0,H=H+Math.imul(ce,Vt)|0,J=J+Math.imul(oe,dr)|0,N=N+Math.imul(oe,yr)|0,N=N+Math.imul(te,dr)|0,H=H+Math.imul(te,yr)|0;var Qr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,J=Math.imul(dt,qt),N=Math.imul(dt,ar),N=N+Math.imul(_t,qt)|0,H=Math.imul(_t,ar),J=J+Math.imul(Ge,gt)|0,N=N+Math.imul(Ge,St)|0,N=N+Math.imul(Ze,gt)|0,H=H+Math.imul(Ze,St)|0,J=J+Math.imul(Se,kt)|0,N=N+Math.imul(Se,Vt)|0,N=N+Math.imul(Me,kt)|0,H=H+Math.imul(Me,Vt)|0,J=J+Math.imul(ee,dr)|0,N=N+Math.imul(ee,yr)|0,N=N+Math.imul(ce,dr)|0,H=H+Math.imul(ce,yr)|0;var Nr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,J=Math.imul(dt,gt),N=Math.imul(dt,St),N=N+Math.imul(_t,gt)|0,H=Math.imul(_t,St),J=J+Math.imul(Ge,kt)|0,N=N+Math.imul(Ge,Vt)|0,N=N+Math.imul(Ze,kt)|0,H=H+Math.imul(Ze,Vt)|0,J=J+Math.imul(Se,dr)|0,N=N+Math.imul(Se,yr)|0,N=N+Math.imul(Me,dr)|0,H=H+Math.imul(Me,yr)|0;var Oe=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,J=Math.imul(dt,kt),N=Math.imul(dt,Vt),N=N+Math.imul(_t,kt)|0,H=Math.imul(_t,Vt),J=J+Math.imul(Ge,dr)|0,N=N+Math.imul(Ge,yr)|0,N=N+Math.imul(Ze,dr)|0,H=H+Math.imul(Ze,yr)|0;var Ie=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,J=Math.imul(dt,dr),N=Math.imul(dt,yr),N=N+Math.imul(_t,dr)|0,H=Math.imul(_t,yr);var Et=(Z+J|0)+((N&8191)<<13)|0;return Z=(H+(N>>>13)|0)+(Et>>>26)|0,Et&=67108863,X[0]=vr,X[1]=Fr,X[2]=la,X[3]=Hr,X[4]=jr,X[5]=Oa,X[6]=Da,X[7]=_i,X[8]=ti,X[9]=Ka,X[10]=ia,X[11]=na,X[12]=xi,X[13]=Yi,X[14]=Qr,X[15]=Nr,X[16]=Oe,X[17]=Ie,X[18]=Et,Z!==0&&(X[19]=Z,O.length++),O};Math.imul||(C=M);function w(I,L,B){B.negative=L.negative^I.negative,B.length=I.length+L.length;for(var O=0,G=0,$=0;$>>26)|0,G+=X>>>26,X&=67108863}B.words[$]=Z,O=X,X=G}return O!==0?B.words[$]=O:B.length--,B.strip()}function k(I,L,B){var O=new T;return O.mulp(I,L,B)}d.prototype.mulTo=function(L,B){var O,G=this.length+L.length;return this.length===10&&L.length===10?O=C(this,L,B):G<63?O=M(this,L,B):G<1024?O=w(this,L,B):O=k(this,L,B),O};function T(I,L){this.x=I,this.y=L}T.prototype.makeRBT=function(L){for(var B=new Array(L),O=d.prototype._countBits(L)-1,G=0;G>=1;return G},T.prototype.permute=function(L,B,O,G,$,X){for(var Z=0;Z>>1)$++;return 1<<$+1+G},T.prototype.conjugate=function(L,B,O){if(!(O<=1))for(var G=0;G>>13,O[2*X+1]=$&8191,$=$>>>13;for(X=2*B;X>=26,B+=G/67108864|0,B+=$>>>26,this.words[O]=$&67108863}return B!==0&&(this.words[O]=B,this.length++),L===0&&(this.length=1,this._normSign()),this},d.prototype.muln=function(L){return this.clone().imuln(L)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(L){var B=E(L);if(B.length===0)return new d(1);for(var O=this,G=0;G=0);var B=L%26,O=(L-B)/26,G=67108863>>>26-B<<26-B,$;if(B!==0){var X=0;for($=0;$>>26-B}X&&(this.words[$]=X,this.length++)}if(O!==0){for($=this.length-1;$>=0;$--)this.words[$+O]=this.words[$];for($=0;$=0);var G;B?G=(B-B%26)/26:G=0;var $=L%26,X=Math.min((L-$)/26,this.length),Z=67108863^67108863>>>$<<$,J=O;if(G-=X,G=Math.max(0,G),J){for(var N=0;NX)for(this.length-=X,N=0;N=0&&(H!==0||N>=G);N--){var W=this.words[N]|0;this.words[N]=H<<26-$|W>>>$,H=W&Z}return J&&H!==0&&(J.words[J.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(L,B,O){return f(this.negative===0),this.iushrn(L,B,O)},d.prototype.shln=function(L){return this.clone().ishln(L)},d.prototype.ushln=function(L){return this.clone().iushln(L)},d.prototype.shrn=function(L){return this.clone().ishrn(L)},d.prototype.ushrn=function(L){return this.clone().iushrn(L)},d.prototype.testn=function(L){f(typeof L=="number"&&L>=0);var B=L%26,O=(L-B)/26,G=1<=0);var B=L%26,O=(L-B)/26;if(f(this.negative===0,"imaskn works only with positive numbers"),this.length<=O)return this;if(B!==0&&O++,this.length=Math.min(O,this.length),B!==0){var G=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},d.prototype.isubn=function(L){if(f(typeof L=="number"),f(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(J/67108864|0),this.words[$+O]=X&67108863}for(;$>26,this.words[$+O]=X&67108863;if(Z===0)return this.strip();for(f(Z===-1),Z=0,$=0;$>26,this.words[$]=X&67108863;return this.negative=1,this.strip()},d.prototype._wordDiv=function(L,B){var O=this.length-L.length,G=this.clone(),$=L,X=$.words[$.length-1]|0,Z=this._countBits(X);O=26-Z,O!==0&&($=$.ushln(O),G.iushln(O),X=$.words[$.length-1]|0);var J=G.length-$.length,N;if(B!=="mod"){N=new d(null),N.length=J+1,N.words=new Array(N.length);for(var H=0;H=0;U--){var V=(G.words[$.length+U]|0)*67108864+(G.words[$.length+U-1]|0);for(V=Math.min(V/X|0,67108863),G._ishlnsubmul($,V,U);G.negative!==0;)V--,G.negative=0,G._ishlnsubmul($,1,U),G.isZero()||(G.negative^=1);N&&(N.words[U]=V)}return N&&N.strip(),G.strip(),B!=="div"&&O!==0&&G.iushrn(O),{div:N||null,mod:G}},d.prototype.divmod=function(L,B,O){if(f(!L.isZero()),this.isZero())return{div:new d(0),mod:new d(0)};var G,$,X;return this.negative!==0&&L.negative===0?(X=this.neg().divmod(L,B),B!=="mod"&&(G=X.div.neg()),B!=="div"&&($=X.mod.neg(),O&&$.negative!==0&&$.iadd(L)),{div:G,mod:$}):this.negative===0&&L.negative!==0?(X=this.divmod(L.neg(),B),B!=="mod"&&(G=X.div.neg()),{div:G,mod:X.mod}):(this.negative&L.negative)!==0?(X=this.neg().divmod(L.neg(),B),B!=="div"&&($=X.mod.neg(),O&&$.negative!==0&&$.isub(L)),{div:X.div,mod:$}):L.length>this.length||this.cmp(L)<0?{div:new d(0),mod:this}:L.length===1?B==="div"?{div:this.divn(L.words[0]),mod:null}:B==="mod"?{div:null,mod:new d(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new d(this.modn(L.words[0]))}:this._wordDiv(L,B)},d.prototype.div=function(L){return this.divmod(L,"div",!1).div},d.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},d.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},d.prototype.divRound=function(L){var B=this.divmod(L);if(B.mod.isZero())return B.div;var O=B.mod.abs(),G=L.abs().iushrn(1),$=L.words[0]&1,X=O.cmp(G);if(X<0||$===1&&X===0)return B.div;var Z=new d(1);return Z.negative=this.negative^L.negative,B.div.iadd(Z)},d.prototype.modn=function(L){f(L<=67108863);for(var B=(1<<26)%L,O=0,G=this.length-1;G>=0;G--)O=(B*O+(this.words[G]|0))%L;return O},d.prototype.idivn=function(L){f(L<=67108863);for(var B=0,O=this.length-1;O>=0;O--){var G=(this.words[O]|0)+B*67108864;this.words[O]=G/L|0,B=G%L}return this.strip()},d.prototype.divn=function(L){return this.clone().idivn(L)},d.prototype.egcd=function(L){f(L.negative===0),f(!L.isZero());var B=this,O=L.clone();B.negative!==0?B=B.umod(L):B=B.clone();for(var G=new d(1),$=new d(0),X=new d(0),Z=new d(1),J=0;B.isEven()&&O.isEven();)B.iushrn(1),O.iushrn(1),++J;for(var N=O.clone(),H=B.clone();!B.isZero();){for(var W=0,U=1;(B.words[0]&U)===0&&W<26;++W,U<<=1);if(W>0)for(B.iushrn(W);W-- >0;)(G.isOdd()||$.isOdd())&&(G.iadd(N),$.isub(H)),G.iushrn(1),$.iushrn(1);for(var V=0,j=1;(O.words[0]&j)===0&&V<26;++V,j<<=1);if(V>0)for(O.iushrn(V);V-- >0;)(X.isOdd()||Z.isOdd())&&(X.iadd(N),Z.isub(H)),X.iushrn(1),Z.iushrn(1);B.cmp(O)>=0?(B.isub(O),G.isub(X),$.isub(Z)):(O.isub(B),X.isub(G),Z.isub($))}return{a:X,b:Z,gcd:O.iushln(J)}},d.prototype._invmp=function(L){f(L.negative===0),f(!L.isZero());var B=this,O=L.clone();B.negative!==0?B=B.umod(L):B=B.clone();for(var G=new d(1),$=new d(0),X=O.clone();B.cmpn(1)>0&&O.cmpn(1)>0;){for(var Z=0,J=1;(B.words[0]&J)===0&&Z<26;++Z,J<<=1);if(Z>0)for(B.iushrn(Z);Z-- >0;)G.isOdd()&&G.iadd(X),G.iushrn(1);for(var N=0,H=1;(O.words[0]&H)===0&&N<26;++N,H<<=1);if(N>0)for(O.iushrn(N);N-- >0;)$.isOdd()&&$.iadd(X),$.iushrn(1);B.cmp(O)>=0?(B.isub(O),G.isub($)):(O.isub(B),$.isub(G))}var W;return B.cmpn(1)===0?W=G:W=$,W.cmpn(0)<0&&W.iadd(L),W},d.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var B=this.clone(),O=L.clone();B.negative=0,O.negative=0;for(var G=0;B.isEven()&&O.isEven();G++)B.iushrn(1),O.iushrn(1);do{for(;B.isEven();)B.iushrn(1);for(;O.isEven();)O.iushrn(1);var $=B.cmp(O);if($<0){var X=B;B=O,O=X}else if($===0||O.cmpn(1)===0)break;B.isub(O)}while(!0);return O.iushln(G)},d.prototype.invm=function(L){return this.egcd(L).a.umod(L)},d.prototype.isEven=function(){return(this.words[0]&1)===0},d.prototype.isOdd=function(){return(this.words[0]&1)===1},d.prototype.andln=function(L){return this.words[0]&L},d.prototype.bincn=function(L){f(typeof L=="number");var B=L%26,O=(L-B)/26,G=1<>>26,Z&=67108863,this.words[X]=Z}return $!==0&&(this.words[X]=$,this.length++),this},d.prototype.isZero=function(){return this.length===1&&this.words[0]===0},d.prototype.cmpn=function(L){var B=L<0;if(this.negative!==0&&!B)return-1;if(this.negative===0&&B)return 1;this.strip();var O;if(this.length>1)O=1;else{B&&(L=-L),f(L<=67108863,"Number is too big");var G=this.words[0]|0;O=G===L?0:GL.length)return 1;if(this.length=0;O--){var G=this.words[O]|0,$=L.words[O]|0;if(G!==$){G<$?B=-1:G>$&&(B=1);break}}return B},d.prototype.gtn=function(L){return this.cmpn(L)===1},d.prototype.gt=function(L){return this.cmp(L)===1},d.prototype.gten=function(L){return this.cmpn(L)>=0},d.prototype.gte=function(L){return this.cmp(L)>=0},d.prototype.ltn=function(L){return this.cmpn(L)===-1},d.prototype.lt=function(L){return this.cmp(L)===-1},d.prototype.lten=function(L){return this.cmpn(L)<=0},d.prototype.lte=function(L){return this.cmp(L)<=0},d.prototype.eqn=function(L){return this.cmpn(L)===0},d.prototype.eq=function(L){return this.cmp(L)===0},d.red=function(L){return new P(L)},d.prototype.toRed=function(L){return f(!this.red,"Already a number in reduction context"),f(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},d.prototype.fromRed=function(){return f(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(L){return this.red=L,this},d.prototype.forceRed=function(L){return f(!this.red,"Already a number in reduction context"),this._forceRed(L)},d.prototype.redAdd=function(L){return f(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},d.prototype.redIAdd=function(L){return f(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},d.prototype.redSub=function(L){return f(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},d.prototype.redISub=function(L){return f(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},d.prototype.redShl=function(L){return f(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},d.prototype.redMul=function(L){return f(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},d.prototype.redIMul=function(L){return f(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},d.prototype.redSqr=function(){return f(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return f(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return f(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return f(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return f(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(L){return f(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var b={k256:null,p224:null,p192:null,p25519:null};function S(I,L){this.name=I,this.p=new d(L,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}S.prototype._tmp=function(){var L=new d(null);return L.words=new Array(Math.ceil(this.n/13)),L},S.prototype.ireduce=function(L){var B=L,O;do this.split(B,this.tmp),B=this.imulK(B),B=B.iadd(this.tmp),O=B.bitLength();while(O>this.n);var G=O0?B.isub(this.p):B.strip!==void 0?B.strip():B._strip(),B},S.prototype.split=function(L,B){L.iushrn(this.n,0,B)},S.prototype.imulK=function(L){return L.imul(this.k)};function A(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}h(A,S),A.prototype.split=function(L,B){for(var O=4194303,G=Math.min(L.length,9),$=0;$>>22,X=Z}X>>>=22,L.words[$-10]=X,X===0&&L.length>10?L.length-=10:L.length-=9},A.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var B=0,O=0;O>>=26,L.words[O]=$,B=G}return B!==0&&(L.words[L.length++]=B),L},d._prime=function(L){if(b[L])return b[L];var B;if(L==="k256")B=new A;else if(L==="p224")B=new F;else if(L==="p192")B=new D;else if(L==="p25519")B=new R;else throw new Error("Unknown prime "+L);return b[L]=B,B};function P(I){if(typeof I=="string"){var L=d._prime(I);this.m=L.p,this.prime=L}else f(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}P.prototype._verify1=function(L){f(L.negative===0,"red works only with positives"),f(L.red,"red works only with red numbers")},P.prototype._verify2=function(L,B){f((L.negative|B.negative)===0,"red works only with positives"),f(L.red&&L.red===B.red,"red works only with red numbers")},P.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},P.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},P.prototype.add=function(L,B){this._verify2(L,B);var O=L.add(B);return O.cmp(this.m)>=0&&O.isub(this.m),O._forceRed(this)},P.prototype.iadd=function(L,B){this._verify2(L,B);var O=L.iadd(B);return O.cmp(this.m)>=0&&O.isub(this.m),O},P.prototype.sub=function(L,B){this._verify2(L,B);var O=L.sub(B);return O.cmpn(0)<0&&O.iadd(this.m),O._forceRed(this)},P.prototype.isub=function(L,B){this._verify2(L,B);var O=L.isub(B);return O.cmpn(0)<0&&O.iadd(this.m),O},P.prototype.shl=function(L,B){return this._verify1(L),this.imod(L.ushln(B))},P.prototype.imul=function(L,B){return this._verify2(L,B),this.imod(L.imul(B))},P.prototype.mul=function(L,B){return this._verify2(L,B),this.imod(L.mul(B))},P.prototype.isqr=function(L){return this.imul(L,L.clone())},P.prototype.sqr=function(L){return this.mul(L,L)},P.prototype.sqrt=function(L){if(L.isZero())return L.clone();var B=this.m.andln(3);if(f(B%2===1),B===3){var O=this.m.add(new d(1)).iushrn(2);return this.pow(L,O)}for(var G=this.m.subn(1),$=0;!G.isZero()&&G.andln(1)===0;)$++,G.iushrn(1);f(!G.isZero());var X=new d(1).toRed(this),Z=X.redNeg(),J=this.m.subn(1).iushrn(1),N=this.m.bitLength();for(N=new d(2*N*N).toRed(this);this.pow(N,J).cmp(Z)!==0;)N.redIAdd(Z);for(var H=this.pow(N,G),W=this.pow(L,G.addn(1).iushrn(1)),U=this.pow(L,G),V=$;U.cmp(X)!==0;){for(var j=U,q=0;j.cmp(X)!==0;q++)j=j.redSqr();f(q=0;$--){for(var H=B.words[$],W=N-1;W>=0;W--){var U=H>>W&1;if(X!==G[0]&&(X=this.sqr(X)),U===0&&Z===0){J=0;continue}Z<<=1,Z|=U,J++,!(J!==O&&($!==0||W!==0))&&(X=this.mul(X,G[Z]),J=0,Z=0)}N=26}return X},P.prototype.convertTo=function(L){var B=L.umod(this.m);return B===L?B.clone():B},P.prototype.convertFrom=function(L){var B=L.clone();return B.red=null,B},d.mont=function(L){return new z(L)};function z(I){P.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new d(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)}h(z,P),z.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},z.prototype.convertFrom=function(L){var B=this.imod(L.mul(this.rinv));return B.red=null,B},z.prototype.imul=function(L,B){if(L.isZero()||B.isZero())return L.words[0]=0,L.length=1,L;var O=L.imul(B),G=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=O.isub(G).iushrn(this.shift),X=$;return $.cmp(this.m)>=0?X=$.isub(this.m):$.cmpn(0)<0&&(X=$.iadd(this.m)),X._forceRed(this)},z.prototype.mul=function(L,B){if(L.isZero()||B.isZero())return new d(0)._forceRed(this);var O=L.mul(B),G=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=O.isub(G).iushrn(this.shift),X=$;return $.cmp(this.m)>=0?X=$.isub(this.m):$.cmpn(0)<0&&(X=$.iadd(this.m)),X._forceRed(this)},z.prototype.invm=function(L){var B=this.imod(L._invmp(this.m).mul(this.r2));return B._forceRed(this)}})(s,this)},6204(s){"use strict";s.exports=l;function l(n){var u,c,f,h=n.length,d=0;for(u=0;u>>1;if(!(T<=0)){var b,S=u.mallocDouble(2*T*w),A=u.mallocInt32(w);if(w=d(x,T,S,A),w>0){if(T===1&&C)c.init(w),b=c.sweepComplete(T,M,0,w,S,A,0,w,S,A);else{var F=u.mallocDouble(2*T*k),D=u.mallocInt32(k);k=d(E,T,F,D),k>0&&(c.init(w+k),T===1?b=c.sweepBipartite(T,M,0,w,S,A,0,k,F,D):b=f(T,M,C,w,S,A,k,F,D),u.free(F),u.free(D))}u.free(S),u.free(A)}return b}}}var g;function m(x,E){g.push([x,E])}function y(x){return g=[],p(x,x,m,!0),g}function _(x,E){return g=[],p(x,E,m,!1),g}function v(x,E,M){switch(arguments.length){case 1:return y(x);case 2:return typeof E=="function"?p(x,x,E,!0):_(x,E);case 3:return p(x,E,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455(s,l){"use strict";function n(){function f(p,g,m,y,_,v,x,E,M,C,w){for(var k=2*p,T=y,b=k*y;T<_;++T,b+=k){var S=v[g+b],A=v[g+b+p],F=x[T];e:for(var D=E,R=k*E;DM-E?f(p,g,m,y,_,v,x,E,M,C,w):h(p,g,m,y,_,v,x,E,M,C,w)}return d}function u(){function f(m,y,_,v,x,E,M,C,w,k,T){for(var b=2*m,S=v,A=b*v;Sk-w?v?f(m,y,_,x,E,M,C,w,k,T,b):h(m,y,_,x,E,M,C,w,k,T,b):v?d(m,y,_,x,E,M,C,w,k,T,b):p(m,y,_,x,E,M,C,w,k,T,b)}return g}function c(f){return f?n():u()}l.partial=c(!1),l.full=c(!0)},7150(s,l,n){"use strict";s.exports=I;var u=n(1888),c=n(8828),f=n(2455),h=f.partial,d=f.full,p=n(855),g=n(3545),m=n(8105),y=128,_=1<<22,v=1<<22,x=m("!(lo>=p0)&&!(p1>=hi)"),E=m("lo===p0"),M=m("lo0;){H-=1;var V=H*T,j=A[V],q=A[V+1],Y=A[V+2],K=A[V+3],re=A[V+4],se=A[V+5],le=H*b,ue=F[le],fe=F[le+1],pe=se&1,we=!!(se&16),xe=$,he=X,oe=J,te=N;if(pe&&(xe=J,he=N,oe=$,te=X),!(se&2&&(Y=M(L,j,q,Y,xe,he,fe),q>=Y))&&!(se&4&&(q=C(L,j,q,Y,xe,he,ue),q>=Y))){var ie=Y-q,ee=re-K;if(we){if(L*ie*(ie+ee)m&&_[k+g]>C;--w,k-=x){for(var T=k,b=k+x,S=0;S>>1,C=2*p,w=M,k=_[C*M+g];x=F?(w=A,k=F):S>=R?(w=b,k=S):(w=D,k=R):F>=R?(w=A,k=F):R>=S?(w=b,k=S):(w=D,k=R);for(var I=C*(E-1),L=C*w,P=0;P=p0)&&!(p1>=hi)":g};function n(m){return l[m]}function u(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+b];if(F===M)if(T===A)T+=1,k+=C;else{for(var D=0;C>D;++D){var R=x[w+D];x[w+D]=x[k],x[k++]=R}var P=E[A];E[A]=E[T],E[T++]=P}}return T}function c(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+b];if(FD;++D){var R=x[w+D];x[w+D]=x[k],x[k++]=R}var P=E[A];E[A]=E[T],E[T++]=P}}return T}function f(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+S];if(F<=M)if(T===A)T+=1,k+=C;else{for(var D=0;C>D;++D){var R=x[w+D];x[w+D]=x[k],x[k++]=R}var P=E[A];E[A]=E[T],E[T++]=P}}return T}function h(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+S];if(F<=M)if(T===A)T+=1,k+=C;else{for(var D=0;C>D;++D){var R=x[w+D];x[w+D]=x[k],x[k++]=R}var P=E[A];E[A]=E[T],E[T++]=P}}return T}function d(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+b],D=x[w+S];if(F<=M&&M<=D)if(T===A)T+=1,k+=C;else{for(var R=0;C>R;++R){var P=x[w+R];x[w+R]=x[k],x[k++]=P}var z=E[A];E[A]=E[T],E[T++]=z}}return T}function p(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+b],D=x[w+S];if(FR;++R){var P=x[w+R];x[w+R]=x[k],x[k++]=P}var z=E[A];E[A]=E[T],E[T++]=z}}return T}function g(m,y,_,v,x,E,M,C){for(var w=2*m,k=w*_,T=k,b=_,S=y,A=m+y,F=_;v>F;++F,k+=w){var D=x[k+S],R=x[k+A];if(!(D>=M)&&!(C>=R))if(b===F)b+=1,T+=w;else{for(var P=0;w>P;++P){var z=x[k+P];x[k+P]=x[T],x[T++]=z}var I=E[F];E[F]=E[b],E[b++]=I}}return b}},4192(s){"use strict";s.exports=n;var l=32;function n(y,_){_<=4*l?u(0,_-1,y):m(0,_-1,y)}function u(y,_,v){for(var x=2*(y+1),E=y+1;E<=_;++E){for(var M=v[x++],C=v[x++],w=E,k=x-2;w-- >y;){var T=v[k-2],b=v[k-1];if(Tv[_+1]:!0}function g(y,_,v,x){y*=2;var E=x[y];return E<_?!0:E===_?x[y+1]>1,w=C-x,k=C+x,T=E,b=w,S=C,A=k,F=M,D=y+1,R=_-1,P=0;p(T,b,v)&&(P=T,T=b,b=P),p(A,F,v)&&(P=A,A=F,F=P),p(T,S,v)&&(P=T,T=S,S=P),p(b,S,v)&&(P=b,b=S,S=P),p(T,A,v)&&(P=T,T=A,A=P),p(S,A,v)&&(P=S,S=A,A=P),p(b,F,v)&&(P=b,b=F,F=P),p(b,S,v)&&(P=b,b=S,S=P),p(A,F,v)&&(P=A,A=F,F=P);for(var z=v[2*b],I=v[2*b+1],L=v[2*A],B=v[2*A+1],O=2*T,G=2*S,$=2*F,X=2*E,Z=2*C,J=2*M,N=0;N<2;++N){var H=v[O+N],W=v[G+N],U=v[$+N];v[X+N]=H,v[Z+N]=W,v[J+N]=U}f(w,y,v),f(k,_,v);for(var V=D;V<=R;++V)if(g(V,z,I,v))V!==D&&c(V,D,v),++D;else if(!g(V,L,B,v))for(;;)if(g(R,L,B,v)){g(R,z,I,v)?(h(V,D,R,v),++D,--R):(c(V,R,v),--R);break}else{if(--R>>1;f(x,W);for(var U=0,V=0,Z=0;Z=h)j=j-h|0,M(m,y,V--,j);else if(j>=0)M(p,g,U--,j);else if(j<=-h){j=-j-h|0;for(var q=0;q>>1;f(x,W);for(var U=0,V=0,j=0,Z=0;Z>1===x[2*Z+3]>>1&&(Y=2,Z+=1),q<0){for(var K=-(q>>1)-1,re=0;re>1)-1;Y===0?M(p,g,U--,K):Y===1?M(m,y,V--,K):Y===2&&M(_,v,j--,K)}}}function T(S,A,F,D,R,P,z,I,L,B,O,G){var $=0,X=2*S,Z=A,J=A+S,N=1,H=1;D?H=h:N=h;for(var W=R;W>>1;f(x,q);for(var Y=0,W=0;W=h?(re=!D,U-=h):(re=!!D,U-=1),re)C(p,g,Y++,U);else{var se=G[U],le=X*U,ue=O[le+A+1],fe=O[le+A+1+S];e:for(var pe=0;pe>>1;f(x,U);for(var V=0,J=0;J=h)p[V++]=N-h;else{N-=1;var q=O[N],Y=$*N,K=B[Y+A+1],re=B[Y+A+1+S];e:for(var se=0;se=0;--se)if(p[se]===N){for(var pe=se+1;ped)throw new RangeError('The value "'+he+'" is invalid for option "size"');var oe=new Uint8Array(he);return Object.setPrototypeOf(oe,m.prototype),oe}function m(he,oe,te){if(typeof he=="number"){if(typeof oe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return x(he)}return y(he,oe,te)}m.poolSize=8192;function y(he,oe,te){if(typeof he=="string")return E(he,oe);if(ArrayBuffer.isView(he))return C(he);if(he==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he);if(pe(he,ArrayBuffer)||he&&pe(he.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(he,SharedArrayBuffer)||he&&pe(he.buffer,SharedArrayBuffer)))return w(he,oe,te);if(typeof he=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ie=he.valueOf&&he.valueOf();if(ie!=null&&ie!==he)return m.from(ie,oe,te);var ee=k(he);if(ee)return ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof he[Symbol.toPrimitive]=="function")return m.from(he[Symbol.toPrimitive]("string"),oe,te);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he)}m.from=function(he,oe,te){return y(he,oe,te)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function _(he){if(typeof he!="number")throw new TypeError('"size" argument must be of type number');if(he<0)throw new RangeError('The value "'+he+'" is invalid for option "size"')}function v(he,oe,te){return _(he),he<=0?g(he):oe!==void 0?typeof te=="string"?g(he).fill(oe,te):g(he).fill(oe):g(he)}m.alloc=function(he,oe,te){return v(he,oe,te)};function x(he){return _(he),g(he<0?0:T(he)|0)}m.allocUnsafe=function(he){return x(he)},m.allocUnsafeSlow=function(he){return x(he)};function E(he,oe){if((typeof oe!="string"||oe==="")&&(oe="utf8"),!m.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);var te=S(he,oe)|0,ie=g(te),ee=ie.write(he,oe);return ee!==te&&(ie=ie.slice(0,ee)),ie}function M(he){for(var oe=he.length<0?0:T(he.length)|0,te=g(oe),ie=0;ie=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return he|0}function b(he){return+he!=he&&(he=0),m.alloc(+he)}m.isBuffer=function(oe){return oe!=null&&oe._isBuffer===!0&&oe!==m.prototype},m.compare=function(oe,te){if(pe(oe,Uint8Array)&&(oe=m.from(oe,oe.offset,oe.byteLength)),pe(te,Uint8Array)&&(te=m.from(te,te.offset,te.byteLength)),!m.isBuffer(oe)||!m.isBuffer(te))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(oe===te)return 0;for(var ie=oe.length,ee=te.length,ce=0,_e=Math.min(ie,ee);ce<_e;++ce)if(oe[ce]!==te[ce]){ie=oe[ce],ee=te[ce];break}return ieee.length?m.from(_e).copy(ee,ce):Uint8Array.prototype.set.call(ee,_e,ce);else if(m.isBuffer(_e))_e.copy(ee,ce);else throw new TypeError('"list" argument must be an Array of Buffers');ce+=_e.length}return ee};function S(he,oe){if(m.isBuffer(he))return he.length;if(ArrayBuffer.isView(he)||pe(he,ArrayBuffer))return he.byteLength;if(typeof he!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof he);var te=he.length,ie=arguments.length>2&&arguments[2]===!0;if(!ie&&te===0)return 0;for(var ee=!1;;)switch(oe){case"ascii":case"latin1":case"binary":return te;case"utf8":case"utf-8":return re(he).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te*2;case"hex":return te>>>1;case"base64":return ue(he).length;default:if(ee)return ie?-1:re(he).length;oe=(""+oe).toLowerCase(),ee=!0}}m.byteLength=S;function A(he,oe,te){var ie=!1;if((oe===void 0||oe<0)&&(oe=0),oe>this.length||((te===void 0||te>this.length)&&(te=this.length),te<=0)||(te>>>=0,oe>>>=0,te<=oe))return"";for(he||(he="utf8");;)switch(he){case"hex":return N(this,oe,te);case"utf8":case"utf-8":return G(this,oe,te);case"ascii":return Z(this,oe,te);case"latin1":case"binary":return J(this,oe,te);case"base64":return O(this,oe,te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,oe,te);default:if(ie)throw new TypeError("Unknown encoding: "+he);he=(he+"").toLowerCase(),ie=!0}}m.prototype._isBuffer=!0;function F(he,oe,te){var ie=he[oe];he[oe]=he[te],he[te]=ie}m.prototype.swap16=function(){var oe=this.length;if(oe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var te=0;tete&&(oe+=" ... "),""},h&&(m.prototype[h]=m.prototype.inspect),m.prototype.compare=function(oe,te,ie,ee,ce){if(pe(oe,Uint8Array)&&(oe=m.from(oe,oe.offset,oe.byteLength)),!m.isBuffer(oe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof oe);if(te===void 0&&(te=0),ie===void 0&&(ie=oe?oe.length:0),ee===void 0&&(ee=0),ce===void 0&&(ce=this.length),te<0||ie>oe.length||ee<0||ce>this.length)throw new RangeError("out of range index");if(ee>=ce&&te>=ie)return 0;if(ee>=ce)return-1;if(te>=ie)return 1;if(te>>>=0,ie>>>=0,ee>>>=0,ce>>>=0,this===oe)return 0;for(var _e=ce-ee,Se=ie-te,Me=Math.min(_e,Se),Ue=this.slice(ee,ce),Ge=oe.slice(te,ie),Ze=0;Ze2147483647?te=2147483647:te<-2147483648&&(te=-2147483648),te=+te,we(te)&&(te=ee?0:he.length-1),te<0&&(te=he.length+te),te>=he.length){if(ee)return-1;te=he.length-1}else if(te<0)if(ee)te=0;else return-1;if(typeof oe=="string"&&(oe=m.from(oe,ie)),m.isBuffer(oe))return oe.length===0?-1:R(he,oe,te,ie,ee);if(typeof oe=="number")return oe=oe&255,typeof Uint8Array.prototype.indexOf=="function"?ee?Uint8Array.prototype.indexOf.call(he,oe,te):Uint8Array.prototype.lastIndexOf.call(he,oe,te):R(he,[oe],te,ie,ee);throw new TypeError("val must be string, number or Buffer")}function R(he,oe,te,ie,ee){var ce=1,_e=he.length,Se=oe.length;if(ie!==void 0&&(ie=String(ie).toLowerCase(),ie==="ucs2"||ie==="ucs-2"||ie==="utf16le"||ie==="utf-16le")){if(he.length<2||oe.length<2)return-1;ce=2,_e/=2,Se/=2,te/=2}function Me(dt,_t){return ce===1?dt[_t]:dt.readUInt16BE(_t*ce)}var Ue;if(ee){var Ge=-1;for(Ue=te;Ue<_e;Ue++)if(Me(he,Ue)===Me(oe,Ge===-1?0:Ue-Ge)){if(Ge===-1&&(Ge=Ue),Ue-Ge+1===Se)return Ge*ce}else Ge!==-1&&(Ue-=Ue-Ge),Ge=-1}else for(te+Se>_e&&(te=_e-Se),Ue=te;Ue>=0;Ue--){for(var Ze=!0,Ke=0;Keee&&(ie=ee)):ie=ee;var ce=oe.length;ie>ce/2&&(ie=ce/2);for(var _e=0;_e>>0,isFinite(ie)?(ie=ie>>>0,ee===void 0&&(ee="utf8")):(ee=ie,ie=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ce=this.length-te;if((ie===void 0||ie>ce)&&(ie=ce),oe.length>0&&(ie<0||te<0)||te>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");for(var _e=!1;;)switch(ee){case"hex":return P(this,oe,te,ie);case"utf8":case"utf-8":return z(this,oe,te,ie);case"ascii":case"latin1":case"binary":return I(this,oe,te,ie);case"base64":return L(this,oe,te,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,oe,te,ie);default:if(_e)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),_e=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(he,oe,te){return oe===0&&te===he.length?c.fromByteArray(he):c.fromByteArray(he.slice(oe,te))}function G(he,oe,te){te=Math.min(he.length,te);for(var ie=[],ee=oe;ee239?4:ce>223?3:ce>191?2:1;if(ee+Se<=te){var Me,Ue,Ge,Ze;switch(Se){case 1:ce<128&&(_e=ce);break;case 2:Me=he[ee+1],(Me&192)===128&&(Ze=(ce&31)<<6|Me&63,Ze>127&&(_e=Ze));break;case 3:Me=he[ee+1],Ue=he[ee+2],(Me&192)===128&&(Ue&192)===128&&(Ze=(ce&15)<<12|(Me&63)<<6|Ue&63,Ze>2047&&(Ze<55296||Ze>57343)&&(_e=Ze));break;case 4:Me=he[ee+1],Ue=he[ee+2],Ge=he[ee+3],(Me&192)===128&&(Ue&192)===128&&(Ge&192)===128&&(Ze=(ce&15)<<18|(Me&63)<<12|(Ue&63)<<6|Ge&63,Ze>65535&&Ze<1114112&&(_e=Ze))}}_e===null?(_e=65533,Se=1):_e>65535&&(_e-=65536,ie.push(_e>>>10&1023|55296),_e=56320|_e&1023),ie.push(_e),ee+=Se}return X(ie)}var $=4096;function X(he){var oe=he.length;if(oe<=$)return String.fromCharCode.apply(String,he);for(var te="",ie=0;ieie)&&(te=ie);for(var ee="",ce=oe;ceie&&(oe=ie),te<0?(te+=ie,te<0&&(te=0)):te>ie&&(te=ie),tete)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(oe,te,ie){oe=oe>>>0,te=te>>>0,ie||W(oe,te,this.length);for(var ee=this[oe],ce=1,_e=0;++_e>>0,te=te>>>0,ie||W(oe,te,this.length);for(var ee=this[oe+--te],ce=1;te>0&&(ce*=256);)ee+=this[oe+--te]*ce;return ee},m.prototype.readUint8=m.prototype.readUInt8=function(oe,te){return oe=oe>>>0,te||W(oe,1,this.length),this[oe]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(oe,te){return oe=oe>>>0,te||W(oe,2,this.length),this[oe]|this[oe+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(oe,te){return oe=oe>>>0,te||W(oe,2,this.length),this[oe]<<8|this[oe+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),(this[oe]|this[oe+1]<<8|this[oe+2]<<16)+this[oe+3]*16777216},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),this[oe]*16777216+(this[oe+1]<<16|this[oe+2]<<8|this[oe+3])},m.prototype.readIntLE=function(oe,te,ie){oe=oe>>>0,te=te>>>0,ie||W(oe,te,this.length);for(var ee=this[oe],ce=1,_e=0;++_e=ce&&(ee-=Math.pow(2,8*te)),ee},m.prototype.readIntBE=function(oe,te,ie){oe=oe>>>0,te=te>>>0,ie||W(oe,te,this.length);for(var ee=te,ce=1,_e=this[oe+--ee];ee>0&&(ce*=256);)_e+=this[oe+--ee]*ce;return ce*=128,_e>=ce&&(_e-=Math.pow(2,8*te)),_e},m.prototype.readInt8=function(oe,te){return oe=oe>>>0,te||W(oe,1,this.length),this[oe]&128?(255-this[oe]+1)*-1:this[oe]},m.prototype.readInt16LE=function(oe,te){oe=oe>>>0,te||W(oe,2,this.length);var ie=this[oe]|this[oe+1]<<8;return ie&32768?ie|4294901760:ie},m.prototype.readInt16BE=function(oe,te){oe=oe>>>0,te||W(oe,2,this.length);var ie=this[oe+1]|this[oe]<<8;return ie&32768?ie|4294901760:ie},m.prototype.readInt32LE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),this[oe]|this[oe+1]<<8|this[oe+2]<<16|this[oe+3]<<24},m.prototype.readInt32BE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),this[oe]<<24|this[oe+1]<<16|this[oe+2]<<8|this[oe+3]},m.prototype.readFloatLE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),f.read(this,oe,!0,23,4)},m.prototype.readFloatBE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),f.read(this,oe,!1,23,4)},m.prototype.readDoubleLE=function(oe,te){return oe=oe>>>0,te||W(oe,8,this.length),f.read(this,oe,!0,52,8)},m.prototype.readDoubleBE=function(oe,te){return oe=oe>>>0,te||W(oe,8,this.length),f.read(this,oe,!1,52,8)};function U(he,oe,te,ie,ee,ce){if(!m.isBuffer(he))throw new TypeError('"buffer" argument must be a Buffer instance');if(oe>ee||oehe.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(oe,te,ie,ee){if(oe=+oe,te=te>>>0,ie=ie>>>0,!ee){var ce=Math.pow(2,8*ie)-1;U(this,oe,te,ie,ce,0)}var _e=1,Se=0;for(this[te]=oe&255;++Se>>0,ie=ie>>>0,!ee){var ce=Math.pow(2,8*ie)-1;U(this,oe,te,ie,ce,0)}var _e=ie-1,Se=1;for(this[te+_e]=oe&255;--_e>=0&&(Se*=256);)this[te+_e]=oe/Se&255;return te+ie},m.prototype.writeUint8=m.prototype.writeUInt8=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,1,255,0),this[te]=oe&255,te+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,2,65535,0),this[te]=oe&255,this[te+1]=oe>>>8,te+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,2,65535,0),this[te]=oe>>>8,this[te+1]=oe&255,te+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,4,4294967295,0),this[te+3]=oe>>>24,this[te+2]=oe>>>16,this[te+1]=oe>>>8,this[te]=oe&255,te+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,4,4294967295,0),this[te]=oe>>>24,this[te+1]=oe>>>16,this[te+2]=oe>>>8,this[te+3]=oe&255,te+4},m.prototype.writeIntLE=function(oe,te,ie,ee){if(oe=+oe,te=te>>>0,!ee){var ce=Math.pow(2,8*ie-1);U(this,oe,te,ie,ce-1,-ce)}var _e=0,Se=1,Me=0;for(this[te]=oe&255;++_e>0)-Me&255;return te+ie},m.prototype.writeIntBE=function(oe,te,ie,ee){if(oe=+oe,te=te>>>0,!ee){var ce=Math.pow(2,8*ie-1);U(this,oe,te,ie,ce-1,-ce)}var _e=ie-1,Se=1,Me=0;for(this[te+_e]=oe&255;--_e>=0&&(Se*=256);)oe<0&&Me===0&&this[te+_e+1]!==0&&(Me=1),this[te+_e]=(oe/Se>>0)-Me&255;return te+ie},m.prototype.writeInt8=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,1,127,-128),oe<0&&(oe=255+oe+1),this[te]=oe&255,te+1},m.prototype.writeInt16LE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,2,32767,-32768),this[te]=oe&255,this[te+1]=oe>>>8,te+2},m.prototype.writeInt16BE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,2,32767,-32768),this[te]=oe>>>8,this[te+1]=oe&255,te+2},m.prototype.writeInt32LE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,4,2147483647,-2147483648),this[te]=oe&255,this[te+1]=oe>>>8,this[te+2]=oe>>>16,this[te+3]=oe>>>24,te+4},m.prototype.writeInt32BE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,4,2147483647,-2147483648),oe<0&&(oe=4294967295+oe+1),this[te]=oe>>>24,this[te+1]=oe>>>16,this[te+2]=oe>>>8,this[te+3]=oe&255,te+4};function V(he,oe,te,ie,ee,ce){if(te+ie>he.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("Index out of range")}function j(he,oe,te,ie,ee){return oe=+oe,te=te>>>0,ee||V(he,oe,te,4,34028234663852886e22,-34028234663852886e22),f.write(he,oe,te,ie,23,4),te+4}m.prototype.writeFloatLE=function(oe,te,ie){return j(this,oe,te,!0,ie)},m.prototype.writeFloatBE=function(oe,te,ie){return j(this,oe,te,!1,ie)};function q(he,oe,te,ie,ee){return oe=+oe,te=te>>>0,ee||V(he,oe,te,8,17976931348623157e292,-17976931348623157e292),f.write(he,oe,te,ie,52,8),te+8}m.prototype.writeDoubleLE=function(oe,te,ie){return q(this,oe,te,!0,ie)},m.prototype.writeDoubleBE=function(oe,te,ie){return q(this,oe,te,!1,ie)},m.prototype.copy=function(oe,te,ie,ee){if(!m.isBuffer(oe))throw new TypeError("argument should be a Buffer");if(ie||(ie=0),!ee&&ee!==0&&(ee=this.length),te>=oe.length&&(te=oe.length),te||(te=0),ee>0&&ee=this.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),oe.length-te>>0,ie=ie===void 0?this.length:ie>>>0,oe||(oe=0);var _e;if(typeof oe=="number")for(_e=te;_e55295&&te<57344){if(!ee){if(te>56319){(oe-=3)>-1&&ce.push(239,191,189);continue}else if(_e+1===ie){(oe-=3)>-1&&ce.push(239,191,189);continue}ee=te;continue}if(te<56320){(oe-=3)>-1&&ce.push(239,191,189),ee=te;continue}te=(ee-55296<<10|te-56320)+65536}else ee&&(oe-=3)>-1&&ce.push(239,191,189);if(ee=null,te<128){if((oe-=1)<0)break;ce.push(te)}else if(te<2048){if((oe-=2)<0)break;ce.push(te>>6|192,te&63|128)}else if(te<65536){if((oe-=3)<0)break;ce.push(te>>12|224,te>>6&63|128,te&63|128)}else if(te<1114112){if((oe-=4)<0)break;ce.push(te>>18|240,te>>12&63|128,te>>6&63|128,te&63|128)}else throw new Error("Invalid code point")}return ce}function se(he){for(var oe=[],te=0;te>8,ee=te%256,ce.push(ee),ce.push(ie);return ce}function ue(he){return c.toByteArray(K(he))}function fe(he,oe,te,ie){for(var ee=0;ee=oe.length||ee>=he.length);++ee)oe[ee+te]=he[ee];return ee}function pe(he,oe){return he instanceof oe||he!=null&&he.constructor!=null&&he.constructor.name!=null&&he.constructor.name===oe.name}function we(he){return he!==he}var xe=(function(){for(var he="0123456789abcdef",oe=new Array(256),te=0;te<16;++te)for(var ie=te*16,ee=0;ee<16;++ee)oe[ie+ee]=he[te]+he[ee];return oe})()},2538(s,l,n){"use strict";var u=n(8902),c=n(5542),f=n(2272),h=n(5023);s.exports=y;function d(_){return[Math.min(_[0],_[1]),Math.max(_[0],_[1])]}function p(_,v){return _[0]-v[0]||_[1]-v[1]}function g(_){return _.map(d).sort(p)}function m(_,v,x){return v in _?_[v]:x}function y(_,v,x){Array.isArray(v)?(x=x||{},v=v||[]):(x=v||{},v=[]);var E=!!m(x,"delaunay",!0),M=!!m(x,"interior",!0),C=!!m(x,"exterior",!0),w=!!m(x,"infinity",!1);if(!M&&!C||_.length===0)return[];var k=u(_,v);if(E||M!==C||w){for(var T=c(_.length,g(v)),b=0;b0;){for(var E=g.pop(),_=g.pop(),M=-1,C=-1,v=y[_],k=1;k=0||(p.flip(_,E),f(d,p,g,M,_,C),f(d,p,g,_,C,M),f(d,p,g,C,E,M),f(d,p,g,E,M,C))}}},5023(s,l,n){"use strict";var u=n(2478);s.exports=g;function c(m,y,_,v,x,E,M){this.cells=m,this.neighbor=y,this.flags=v,this.constraint=_,this.active=x,this.next=E,this.boundary=M}var f=c.prototype;function h(m,y){return m[0]-y[0]||m[1]-y[1]||m[2]-y[2]}f.locate=(function(){var m=[0,0,0];return function(y,_,v){var x=y,E=_,M=v;return _0||M.length>0;){for(;E.length>0;){var b=E.pop();if(C[b]!==-x){C[b]=x;for(var S=w[b],A=0;A<3;++A){var F=T[3*b+A];F>=0&&C[F]===0&&(k[3*b+A]?M.push(F):(E.push(F),C[F]=x))}}}var D=M;M=E,E=D,M.length=0,x=-x}var R=p(w,C,y);return _?R.concat(v.boundary):R}},8902(s,l,n){"use strict";var u=n(2478),c=n(3250)[3],f=0,h=1,d=2;s.exports=M;function p(C,w,k,T,b){this.a=C,this.b=w,this.idx=k,this.lowerIds=T,this.upperIds=b}function g(C,w,k,T){this.a=C,this.b=w,this.type=k,this.idx=T}function m(C,w){var k=C.a[0]-w.a[0]||C.a[1]-w.a[1]||C.type-w.type;return k||C.type!==f&&(k=c(C.a,C.b,w.b),k)?k:C.idx-w.idx}function y(C,w){return c(C.a,C.b,w)}function _(C,w,k,T,b){for(var S=u.lt(w,T,y),A=u.gt(w,T,y),F=S;F1&&c(k[R[z-2]],k[R[z-1]],T)>0;)C.push([R[z-1],R[z-2],b]),z-=1;R.length=z,R.push(b);for(var P=D.upperIds,z=P.length;z>1&&c(k[P[z-2]],k[P[z-1]],T)<0;)C.push([P[z-2],P[z-1],b]),z-=1;P.length=z,P.push(b)}}function v(C,w){var k;return C.a[0]D[0]&&b.push(new g(D,F,d,S),new g(F,D,h,S))}b.sort(m);for(var R=b[0].a[0]-(1+Math.abs(b[0].a[0]))*Math.pow(2,-52),P=[new p([R,1],[R,0],-1,[],[],[],[])],z=[],S=0,I=b.length;S=0}})(),f.removeTriangle=function(p,g,m){var y=this.stars;h(y[p],g,m),h(y[g],m,p),h(y[m],p,g)},f.addTriangle=function(p,g,m){var y=this.stars;y[p].push(g,m),y[g].push(m,p),y[m].push(p,g)},f.opposite=function(p,g){for(var m=this.stars[g],y=1,_=m.length;y<_;y+=2)if(m[y]===p)return m[y-1];return-1},f.flip=function(p,g){var m=this.opposite(p,g),y=this.opposite(g,p);this.removeTriangle(p,g,m),this.removeTriangle(g,p,y),this.addTriangle(p,y,m),this.addTriangle(g,m,y)},f.edges=function(){for(var p=this.stars,g=[],m=0,y=p.length;m=0;--L){var H=z[L];B=H[0];var W=R[B],U=W[0],V=W[1],j=D[U],q=D[V];if((j[0]-q[0]||j[1]-q[1])<0){var Y=U;U=V,V=Y}W[0]=U;var K=W[1]=H[1],re;for(I&&(re=W[2]);L>0&&z[L-1][0]===B;){var H=z[--L],se=H[1];I?R.push([K,se,re]):R.push([K,se]),K=se}I?R.push([K,V,re]):R.push([K,V])}return O}function w(D,R,P){for(var z=R.length,I=new u(z),L=[],B=0;BR[2]?1:0)}function b(D,R,P){if(D.length!==0){if(R)for(var z=0;z0||B.length>0}function F(D,R,P){var z;if(P){z=R;for(var I=new Array(R.length),L=0;LC+1)throw new Error(E+" map requires nshades to be at least size "+x.length);Array.isArray(g.alpha)?g.alpha.length!==2?w=[1,1]:w=g.alpha.slice():typeof g.alpha=="number"?w=[g.alpha,g.alpha]:w=[1,1],m=x.map(function(F){return Math.round(F.index*C)}),w[0]=Math.min(Math.max(w[0],0),1),w[1]=Math.min(Math.max(w[1],0),1);var T=x.map(function(F,D){var R=x[D].index,P=x[D].rgb.slice();return P.length===4&&P[3]>=0&&P[3]<=1||(P[3]=w[0]+(w[1]-w[0])*R),P}),b=[];for(k=0;k=0}function g(m,y,_,v){var x=u(y,_,v);if(x===0){var E=c(u(m,y,_)),M=c(u(m,y,v));if(E===M){if(E===0){var C=p(m,y,_),w=p(m,y,v);return C===w?0:C?1:-1}return 0}else{if(M===0)return E>0||p(m,y,v)?-1:1;if(E===0)return M>0||p(m,y,_)?1:-1}return c(M-E)}var k=u(m,y,_);if(k>0)return x>0&&u(m,y,v)>0?1:-1;if(k<0)return x>0||u(m,y,v)>0?1:-1;var T=u(m,y,v);return T>0||p(m,y,_)?1:-1}},8572(s){"use strict";s.exports=function(n){return n<0?-1:n>0?1:0}},8507(s){s.exports=u;var l=Math.min;function n(c,f){return c-f}function u(c,f){var h=c.length,d=c.length-f.length;if(d)return d;switch(h){case 0:return 0;case 1:return c[0]-f[0];case 2:return c[0]+c[1]-f[0]-f[1]||l(c[0],c[1])-l(f[0],f[1]);case 3:var p=c[0]+c[1],g=f[0]+f[1];if(d=p+c[2]-(g+f[2]),d)return d;var m=l(c[0],c[1]),y=l(f[0],f[1]);return l(m,c[2])-l(y,f[2])||l(m+c[2],p)-l(y+f[2],g);case 4:var _=c[0],v=c[1],x=c[2],E=c[3],M=f[0],C=f[1],w=f[2],k=f[3];return _+v+x+E-(M+C+w+k)||l(_,v,x,E)-l(M,C,w,k,M)||l(_+v,_+x,_+E,v+x,v+E,x+E)-l(M+C,M+w,M+k,C+w,C+k,w+k)||l(_+v+x,_+v+E,_+x+E,v+x+E)-l(M+C+w,M+C+k,M+w+k,C+w+k);default:for(var T=c.slice().sort(n),b=f.slice().sort(n),S=0;Sn[c][0]&&(c=f);return uc?[[c],[u]]:[[u]]}},4750(s,l,n){"use strict";s.exports=c;var u=n(3090);function c(f){var h=u(f),d=h.length;if(d<=2)return[];for(var p=new Array(d),g=h[d-1],m=0;m=g[M]&&(E+=1);v[x]=E}}return p}function d(p,g){try{return u(p,!0)}catch{var m=c(p);if(m.length<=g)return[];var y=f(p,m),_=u(y,!0);return h(_,m)}}},4769(s){"use strict";function l(u,c,f,h,d,p){var g=6*d*d-6*d,m=3*d*d-4*d+1,y=-6*d*d+6*d,_=3*d*d-2*d;if(u.length){p||(p=new Array(u.length));for(var v=u.length-1;v>=0;--v)p[v]=g*u[v]+m*c[v]+y*f[v]+_*h[v];return p}return g*u+m*c+y*f[v]+_*h}function n(u,c,f,h,d,p){var g=d-1,m=d*d,y=g*g,_=(1+2*d)*y,v=d*y,x=m*(3-2*d),E=m*g;if(u.length){p||(p=new Array(u.length));for(var M=u.length-1;M>=0;--M)p[M]=_*u[M]+v*c[M]+x*f[M]+E*h[M];return p}return _*u+v*c+x*f+E*h}s.exports=n,s.exports.derivative=l},7642(s,l,n){"use strict";var u=n(8954),c=n(1682);s.exports=p;function f(g,m){this.point=g,this.index=m}function h(g,m){for(var y=g.point,_=m.point,v=y.length,x=0;x=2)return!1;P[I]=L}return!0}):R=R.filter(function(P){for(var z=0;z<=_;++z){var I=S[P[z]];if(I<0)return!1;P[z]=I}return!0}),_&1)for(var E=0;E>>31},s.exports.exponent=function(x){var E=s.exports.hi(x);return(E<<1>>>21)-1023},s.exports.fraction=function(x){var E=s.exports.lo(x),M=s.exports.hi(x),C=M&(1<<20)-1;return M&2146435072&&(C+=1048576),[E,C]},s.exports.denormalized=function(x){var E=s.exports.hi(x);return!(E&2146435072)}},1338(s){"use strict";function l(c,f,h){var d=c[h]|0;if(d<=0)return[];var p=new Array(d),g;if(h===c.length-1)for(g=0;g"u"&&(f=0),typeof c){case"number":if(c>0)return n(c|0,f);break;case"object":if(typeof c.length=="number")return l(c,f,0);break}return[]}s.exports=u},3134(s,l,n){"use strict";s.exports=c;var u=n(1682);function c(f,h){var d=f.length;if(typeof h!="number"){h=0;for(var p=0;p=_-1)for(var k=E.length-1,b=m-y[_-1],T=0;T=_-1)for(var w=E.length-1,k=m-y[_-1],T=0;T=0;--_)if(m[--y])return!1;return!0},d.jump=function(m){var y=this.lastT(),_=this.dimension;if(!(m0;--T)v.push(f(C[T-1],w[T-1],arguments[T])),x.push(0)}},d.push=function(m){var y=this.lastT(),_=this.dimension;if(!(m1e-6?1/M:0;this._time.push(m);for(var b=_;b>0;--b){var S=f(w[b-1],k[b-1],arguments[b]);v.push(S),x.push((S-v[E++])*T)}}},d.set=function(m){var y=this.dimension;if(!(m0;--C)_.push(f(E[C-1],M[C-1],arguments[C])),v.push(0)}},d.move=function(m){var y=this.lastT(),_=this.dimension;if(!(m<=y||arguments.length!==_+1)){var v=this._state,x=this._velocity,E=v.length-this.dimension,M=this.bounds,C=M[0],w=M[1],k=m-y,T=k>1e-6?1/k:0;this._time.push(m);for(var b=_;b>0;--b){var S=arguments[b];v.push(f(C[b-1],w[b-1],v[E++]+S)),x.push(S*T)}}},d.idle=function(m){var y=this.lastT();if(!(m=0;--T)v.push(f(C[T],w[T],v[E]+k*x[E])),x.push(0),E+=1}};function p(m){for(var y=new Array(m),_=0;_=0;--D){var b=S[D];A[D]<=0?S[D]=new u(b._color,b.key,b.value,S[D+1],b.right,b._count+1):S[D]=new u(b._color,b.key,b.value,b.left,S[D+1],b._count+1)}for(var D=S.length-1;D>1;--D){var R=S[D-1],b=S[D];if(R._color===n||b._color===n)break;var P=S[D-2];if(P.left===R)if(R.left===b){var z=P.right;if(z&&z._color===l)R._color=n,P.right=f(n,z),P._color=l,D-=1;else{if(P._color=l,P.left=R.right,R._color=n,R.right=P,S[D-2]=R,S[D-1]=b,h(P),h(R),D>=3){var I=S[D-3];I.left===P?I.left=R:I.right=R}break}}else{var z=P.right;if(z&&z._color===l)R._color=n,P.right=f(n,z),P._color=l,D-=1;else{if(R.right=b.left,P._color=l,P.left=b.right,b._color=n,b.left=R,b.right=P,S[D-2]=b,S[D-1]=R,h(P),h(R),h(b),D>=3){var I=S[D-3];I.left===P?I.left=b:I.right=b}break}}else if(R.right===b){var z=P.left;if(z&&z._color===l)R._color=n,P.left=f(n,z),P._color=l,D-=1;else{if(P._color=l,P.right=R.left,R._color=n,R.left=P,S[D-2]=R,S[D-1]=b,h(P),h(R),D>=3){var I=S[D-3];I.right===P?I.right=R:I.left=R}break}}else{var z=P.left;if(z&&z._color===l)R._color=n,P.left=f(n,z),P._color=l,D-=1;else{if(R.left=b.right,P._color=l,P.right=b.left,b._color=n,b.right=R,b.left=P,S[D-2]=b,S[D-1]=R,h(P),h(R),h(b),D>=3){var I=S[D-3];I.right===P?I.right=b:I.left=b}break}}}return S[0]._color=n,new d(T,S[0])};function g(w,k){if(k.left){var T=g(w,k.left);if(T)return T}var T=w(k.key,k.value);if(T)return T;if(k.right)return g(w,k.right)}function m(w,k,T,b){var S=k(w,b.key);if(S<=0){if(b.left){var A=m(w,k,T,b.left);if(A)return A}var A=T(b.key,b.value);if(A)return A}if(b.right)return m(w,k,T,b.right)}function y(w,k,T,b,S){var A=T(w,S.key),F=T(k,S.key),D;if(A<=0&&(S.left&&(D=y(w,k,T,b,S.left),D)||F>0&&(D=b(S.key,S.value),D)))return D;if(F>0&&S.right)return y(w,k,T,b,S.right)}p.forEach=function(k,T,b){if(this.root)switch(arguments.length){case 1:return g(k,this.root);case 2:return m(T,this._compare,k,this.root);case 3:return this._compare(T,b)>=0?void 0:y(T,b,this._compare,k,this.root)}},Object.defineProperty(p,"begin",{get:function(){for(var w=[],k=this.root;k;)w.push(k),k=k.left;return new _(this,w)}}),Object.defineProperty(p,"end",{get:function(){for(var w=[],k=this.root;k;)w.push(k),k=k.right;return new _(this,w)}}),p.at=function(w){if(w<0)return new _(this,[]);for(var k=this.root,T=[];;){if(T.push(k),k.left){if(w=k.right._count)break;k=k.right}else break}return new _(this,[])},p.ge=function(w){for(var k=this._compare,T=this.root,b=[],S=0;T;){var A=k(w,T.key);b.push(T),A<=0&&(S=b.length),A<=0?T=T.left:T=T.right}return b.length=S,new _(this,b)},p.gt=function(w){for(var k=this._compare,T=this.root,b=[],S=0;T;){var A=k(w,T.key);b.push(T),A<0&&(S=b.length),A<0?T=T.left:T=T.right}return b.length=S,new _(this,b)},p.lt=function(w){for(var k=this._compare,T=this.root,b=[],S=0;T;){var A=k(w,T.key);b.push(T),A>0&&(S=b.length),A<=0?T=T.left:T=T.right}return b.length=S,new _(this,b)},p.le=function(w){for(var k=this._compare,T=this.root,b=[],S=0;T;){var A=k(w,T.key);b.push(T),A>=0&&(S=b.length),A<0?T=T.left:T=T.right}return b.length=S,new _(this,b)},p.find=function(w){for(var k=this._compare,T=this.root,b=[];T;){var S=k(w,T.key);if(b.push(T),S===0)return new _(this,b);S<=0?T=T.left:T=T.right}return new _(this,[])},p.remove=function(w){var k=this.find(w);return k?k.remove():this},p.get=function(w){for(var k=this._compare,T=this.root;T;){var b=k(w,T.key);if(b===0)return T.value;b<=0?T=T.left:T=T.right}};function _(w,k){this.tree=w,this._stack=k}var v=_.prototype;Object.defineProperty(v,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(v,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),v.clone=function(){return new _(this.tree,this._stack.slice())};function x(w,k){w.key=k.key,w.value=k.value,w.left=k.left,w.right=k.right,w._color=k._color,w._count=k._count}function E(w){for(var k,T,b,S,A=w.length-1;A>=0;--A){if(k=w[A],A===0){k._color=n;return}if(T=w[A-1],T.left===k){if(b=T.right,b.right&&b.right._color===l){if(b=T.right=c(b),S=b.right=c(b.right),T.right=b.left,b.left=T,b.right=S,b._color=T._color,k._color=n,T._color=n,S._color=n,h(T),h(b),A>1){var F=w[A-2];F.left===T?F.left=b:F.right=b}w[A-1]=b;return}else if(b.left&&b.left._color===l){if(b=T.right=c(b),S=b.left=c(b.left),T.right=S.left,b.left=S.right,S.left=T,S.right=b,S._color=T._color,T._color=n,b._color=n,k._color=n,h(T),h(b),h(S),A>1){var F=w[A-2];F.left===T?F.left=S:F.right=S}w[A-1]=S;return}if(b._color===n)if(T._color===l){T._color=n,T.right=f(l,b);return}else{T.right=f(l,b);continue}else{if(b=c(b),T.right=b.left,b.left=T,b._color=T._color,T._color=l,h(T),h(b),A>1){var F=w[A-2];F.left===T?F.left=b:F.right=b}w[A-1]=b,w[A]=T,A+11){var F=w[A-2];F.right===T?F.right=b:F.left=b}w[A-1]=b;return}else if(b.right&&b.right._color===l){if(b=T.left=c(b),S=b.right=c(b.right),T.left=S.right,b.right=S.left,S.right=T,S.left=b,S._color=T._color,T._color=n,b._color=n,k._color=n,h(T),h(b),h(S),A>1){var F=w[A-2];F.right===T?F.right=S:F.left=S}w[A-1]=S;return}if(b._color===n)if(T._color===l){T._color=n,T.left=f(l,b);return}else{T.left=f(l,b);continue}else{if(b=c(b),T.left=b.right,b.right=T,b._color=T._color,T._color=l,h(T),h(b),A>1){var F=w[A-2];F.right===T?F.right=b:F.left=b}w[A-1]=b,w[A]=T,A+1=0;--b){var T=w[b];T.left===w[b+1]?k[b]=new u(T._color,T.key,T.value,k[b+1],T.right,T._count):k[b]=new u(T._color,T.key,T.value,T.left,k[b+1],T._count)}if(T=k[k.length-1],T.left&&T.right){var S=k.length;for(T=T.left;T.right;)k.push(T),T=T.right;var A=k[S-1];k.push(new u(T._color,A.key,A.value,T.left,T.right,T._count)),k[S-1].key=T.key,k[S-1].value=T.value;for(var b=k.length-2;b>=S;--b)T=k[b],k[b]=new u(T._color,T.key,T.value,T.left,k[b+1],T._count);k[S-1].left=k[S]}if(T=k[k.length-1],T._color===l){var F=k[k.length-2];F.left===T?F.left=null:F.right===T&&(F.right=null),k.pop();for(var b=0;b0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(v,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(v,"index",{get:function(){var w=0,k=this._stack;if(k.length===0){var T=this.tree.root;return T?T._count:0}else k[k.length-1].left&&(w=k[k.length-1].left._count);for(var b=k.length-2;b>=0;--b)k[b+1]===k[b].right&&(++w,k[b].left&&(w+=k[b].left._count));return w},enumerable:!0}),v.next=function(){var w=this._stack;if(w.length!==0){var k=w[w.length-1];if(k.right)for(k=k.right;k;)w.push(k),k=k.left;else for(w.pop();w.length>0&&w[w.length-1].right===k;)k=w[w.length-1],w.pop()}},Object.defineProperty(v,"hasNext",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].right)return!0;for(var k=w.length-1;k>0;--k)if(w[k-1].left===w[k])return!0;return!1}}),v.update=function(w){var k=this._stack;if(k.length===0)throw new Error("Can't update empty node!");var T=new Array(k.length),b=k[k.length-1];T[T.length-1]=new u(b._color,b.key,w,b.left,b.right,b._count);for(var S=k.length-2;S>=0;--S)b=k[S],b.left===k[S+1]?T[S]=new u(b._color,b.key,b.value,T[S+1],b.right,b._count):T[S]=new u(b._color,b.key,b.value,b.left,T[S+1],b._count);return new d(this.tree._compare,T[0])},v.prev=function(){var w=this._stack;if(w.length!==0){var k=w[w.length-1];if(k.left)for(k=k.left;k;)w.push(k),k=k.right;else for(w.pop();w.length>0&&w[w.length-1].left===k;)k=w[w.length-1],w.pop()}},Object.defineProperty(v,"hasPrev",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].left)return!0;for(var k=w.length-1;k>0;--k)if(w[k-1].right===w[k])return!0;return!1}});function M(w,k){return wk?1:0}function C(w){return new d(w||M,null)}},3837(s,l,n){"use strict";s.exports=D;var u=n(4935),c=n(501),f=n(5304),h=n(6429),d=n(6444),p=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),g=ArrayBuffer,m=DataView;function y(R){return g.isView(R)&&!(R instanceof m)}function _(R){return Array.isArray(R)||y(R)}function v(R,P){return R[0]=P[0],R[1]=P[1],R[2]=P[2],R}function x(R){this.gl=R,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=f(R)}var E=x.prototype;E.update=function(R){R=R||{};function P(U,V,j){if(j in R){var q=R[j],Y=this[j],K;(U?_(q)&&_(q[0]):_(q))?this[j]=K=[V(q[0]),V(q[1]),V(q[2])]:this[j]=K=[V(q),V(q),V(q)];for(var re=0;re<3;++re)if(K[re]!==Y[re])return!0}return!1}var z=P.bind(this,!1,Number),I=P.bind(this,!1,Boolean),L=P.bind(this,!1,String),B=P.bind(this,!0,function(U){if(_(U)){if(U.length===3)return[+U[0],+U[1],+U[2],1];if(U.length===4)return[+U[0],+U[1],+U[2],+U[3]]}return[0,0,0,1]}),O,G=!1,$=!1;if("bounds"in R)for(var X=R.bounds,Z=0;Z<2;++Z)for(var J=0;J<3;++J)X[Z][J]!==this.bounds[Z][J]&&($=!0),this.bounds[Z][J]=X[Z][J];if("ticks"in R){O=R.ticks,G=!0,this.autoTicks=!1;for(var Z=0;Z<3;++Z)this.tickSpacing[Z]=0}else z("tickSpacing")&&(this.autoTicks=!0,$=!0);if(this._firstInit&&("ticks"in R||"tickSpacing"in R||(this.autoTicks=!0),$=!0,G=!0,this._firstInit=!1),$&&this.autoTicks&&(O=d.create(this.bounds,this.tickSpacing),G=!0),G){for(var Z=0;Z<3;++Z)O[Z].sort(function(V,j){return V.x-j.x});d.equal(O,this.ticks)?G=!1:this.ticks=O}I("tickEnable"),L("tickFont")&&(G=!0),L("tickFontStyle")&&(G=!0),L("tickFontWeight")&&(G=!0),L("tickFontVariant")&&(G=!0),z("tickSize"),z("tickAngle"),z("tickPad"),B("tickColor");var N=L("labels");L("labelFont")&&(N=!0),L("labelFontStyle")&&(N=!0),L("labelFontWeight")&&(N=!0),L("labelFontVariant")&&(N=!0),I("labelEnable"),z("labelSize"),z("labelPad"),B("labelColor"),I("lineEnable"),I("lineMirror"),z("lineWidth"),B("lineColor"),I("lineTickEnable"),I("lineTickMirror"),z("lineTickLength"),z("lineTickWidth"),B("lineTickColor"),I("gridEnable"),z("gridWidth"),B("gridColor"),I("zeroEnable"),B("zeroLineColor"),z("zeroLineWidth"),I("backgroundEnable"),B("backgroundColor");var H=[{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]}],W=[{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&&(N||G)&&this._text.update(this.bounds,this.labels,H,this.ticks,W):this._text=u(this.gl,this.bounds,this.labels,H,this.ticks,W),this._lines&&G&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=c(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var C=[new M,new M,new M];function w(R,P,z,I,L){for(var B=R.primalOffset,O=R.primalMinor,G=R.mirrorOffset,$=R.mirrorMinor,X=I[P],Z=0;Z<3;++Z)if(P!==Z){var J=B,N=G,H=O,W=$;X&1<0?(H[Z]=-1,W[Z]=0):(H[Z]=0,W[Z]=1)}}var k=[0,0,0],T={model:p,view:p,projection:p,_ortho:!1};E.isOpaque=function(){return!0},E.isTransparent=function(){return!1},E.drawTransparent=function(R){};var b=0,S=[0,0,0],A=[0,0,0],F=[0,0,0];E.draw=function(R){R=R||T;for(var j=this.gl,P=R.model||p,z=R.view||p,I=R.projection||p,L=this.bounds,B=R._ortho||!1,O=h(P,z,I,L,B),G=O.cubeEdges,$=O.axis,X=z[12],Z=z[13],J=z[14],N=z[15],H=B?2:1,W=H*this.pixelRatio*(I[3]*X+I[7]*Z+I[11]*J+I[15]*N)/j.drawingBufferHeight,U=0;U<3;++U)this.lastCubeProps.cubeEdges[U]=G[U],this.lastCubeProps.axis[U]=$[U];for(var V=C,U=0;U<3;++U)w(C[U],U,this.bounds,G,$);for(var j=this.gl,q=k,U=0;U<3;++U)this.backgroundEnable[U]?q[U]=$[U]:q[U]=0;this._background.draw(P,z,I,L,q,this.backgroundColor),this._lines.bind(P,z,I,this);for(var U=0;U<3;++U){var Y=[0,0,0];$[U]>0?Y[U]=L[1][U]:Y[U]=L[0][U];for(var K=0;K<2;++K){var re=(U+1+K)%3,se=(U+1+(K^1))%3;this.gridEnable[re]&&this._lines.drawGrid(re,se,this.bounds,Y,this.gridColor[re],this.gridWidth[re]*this.pixelRatio)}for(var K=0;K<2;++K){var re=(U+1+K)%3,se=(U+1+(K^1))%3;this.zeroEnable[se]&&Math.min(L[0][se],L[1][se])<=0&&Math.max(L[0][se],L[1][se])>=0&&this._lines.drawZero(re,se,this.bounds,Y,this.zeroLineColor[se],this.zeroLineWidth[se]*this.pixelRatio)}}for(var U=0;U<3;++U){this.lineEnable[U]&&this._lines.drawAxisLine(U,this.bounds,V[U].primalOffset,this.lineColor[U],this.lineWidth[U]*this.pixelRatio),this.lineMirror[U]&&this._lines.drawAxisLine(U,this.bounds,V[U].mirrorOffset,this.lineColor[U],this.lineWidth[U]*this.pixelRatio);for(var le=v(S,V[U].primalMinor),ue=v(A,V[U].mirrorMinor),fe=this.lineTickLength,K=0;K<3;++K){var pe=W/P[5*K];le[K]*=fe[K]*pe,ue[K]*=fe[K]*pe}this.lineTickEnable[U]&&this._lines.drawAxisTicks(U,V[U].primalOffset,le,this.lineTickColor[U],this.lineTickWidth[U]*this.pixelRatio),this.lineTickMirror[U]&&this._lines.drawAxisTicks(U,V[U].mirrorOffset,ue,this.lineTickColor[U],this.lineTickWidth[U]*this.pixelRatio)}this._lines.unbind(),this._text.bind(P,z,I,this.pixelRatio);var we,xe=.5,he,oe;function te(Me){oe=[0,0,0],oe[Me]=1}function ie(Me,Ue,Ge){var Ze=(Me+1)%3,Ke=(Me+2)%3,dt=Ue[Ze],_t=Ue[Ke],Pt=Ge[Ze],pt=Ge[Ke];if(dt>0&&pt>0){te(Ze);return}else if(dt>0&&pt<0){te(Ze);return}else if(dt<0&&pt>0){te(Ze);return}else if(dt<0&&pt<0){te(Ze);return}else if(_t>0&&Pt>0){te(Ke);return}else if(_t>0&&Pt<0){te(Ke);return}else if(_t<0&&Pt>0){te(Ke);return}else if(_t<0&&Pt<0){te(Ke);return}}for(var U=0;U<3;++U){for(var ee=V[U].primalMinor,ce=V[U].mirrorMinor,_e=v(F,V[U].primalOffset),K=0;K<3;++K)this.lineTickEnable[U]&&(_e[K]+=W*ee[K]*Math.max(this.lineTickLength[K],0)/P[5*K]);var Se=[0,0,0];if(Se[U]=1,this.tickEnable[U]){this.tickAngle[U]===-3600?(this.tickAngle[U]=0,this.tickAlign[U]="auto"):this.tickAlign[U]=-1,he=1,we=[this.tickAlign[U],xe,he],we[0]==="auto"?we[0]=b:we[0]=parseInt(""+we[0]),oe=[0,0,0],ie(U,ee,ce);for(var K=0;K<3;++K)_e[K]+=W*ee[K]*this.tickPad[K]/P[5*K];this._text.drawTicks(U,this.tickSize[U],this.tickAngle[U],_e,this.tickColor[U],Se,oe,we)}if(this.labelEnable[U]){he=0,oe=[0,0,0],this.labels[U].length>4&&(te(U),he=1),we=[this.labelAlign[U],xe,he],we[0]==="auto"?we[0]=b:we[0]=parseInt(""+we[0]);for(var K=0;K<3;++K)_e[K]+=W*ee[K]*this.labelPad[K]/P[5*K];_e[U]+=.5*(L[0][U]+L[1][U]),this._text.drawLabel(U,this.labelSize[U],this.labelAngle[U],_e,this.labelColor[U],[0,0,0],oe,we)}}this._text.unbind()},E.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function D(R,P){var z=new x(R);return z.update(P),z}},5304(s,l,n){"use strict";s.exports=p;var u=n(2762),c=n(8116),f=n(1879).bg;function h(g,m,y,_){this.gl=g,this.buffer=m,this.vao=y,this.shader=_}var d=h.prototype;d.draw=function(g,m,y,_,v,x){for(var E=!1,M=0;M<3;++M)E=E||v[M];if(E){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:g,view:m,projection:y,bounds:_,enable:v,colors:x},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},d.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function p(g){for(var m=[],y=[],_=0,v=0;v<3;++v)for(var x=(v+1)%3,E=(v+2)%3,M=[0,0,0],C=[0,0,0],w=-1;w<=1;w+=2){y.push(_,_+2,_+1,_+1,_+2,_+3),M[v]=w,C[v]=w;for(var k=-1;k<=1;k+=2){M[x]=k;for(var T=-1;T<=1;T+=2)M[E]=T,m.push(M[0],M[1],M[2],C[0],C[1],C[2]),_+=1}var b=x;x=E,E=b}var S=u(g,new Float32Array(m)),A=u(g,new Uint16Array(y),g.ELEMENT_ARRAY_BUFFER),F=c(g,[{buffer:S,type:g.FLOAT,size:3,offset:0,stride:24},{buffer:S,type:g.FLOAT,size:3,offset:12,stride:24}],A),D=f(g);return D.attributes.position.location=0,D.attributes.normal.location=1,new h(g,S,F,D)}},6429(s,l,n){"use strict";s.exports=w;var u=n(8828),c=n(6760),f=n(5202),h=n(3250),d=new Array(16),p=new Array(8),g=new Array(8),m=new Array(3),y=[0,0,0];(function(){for(var k=0;k<8;++k)p[k]=[1,1,1,1],g[k]=[1,1,1]})();function _(k,T,b){for(var S=0;S<4;++S){k[S]=b[12+S];for(var A=0;A<3;++A)k[S]+=T[A]*b[4*A+S]}}var v=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function x(k){for(var T=0;T$&&(z|=1<$){z|=1<g[D][1])&&(V=D);for(var j=-1,D=0;D<3;++D){var q=V^1<g[Y][0]&&(Y=q)}}var K=E;K[0]=K[1]=K[2]=0,K[u.log2(j^V)]=V&j,K[u.log2(V^Y)]=V&Y;var re=Y^7;re===z||re===U?(re=j^7,K[u.log2(Y^re)]=re&Y):K[u.log2(j^re)]=re&j;for(var se=M,le=z,B=0;B<3;++B)le&1<0}function E(s){var c=0,m=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,n=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,r=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function a(s){var c=s.match(e),m=s.match(t),h=s.match(n);return{width:c&&(c[1]||c[2]),height:m&&(m[1]||m[2]),viewbox:h&&(h[1]||h[2])}}function o(s){return r.test(s)?s.match(r)[0]:"px"}V.exports=function(s){if(E(s)){for(var c="",m=0;m>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function a(o,s){return{width:(o[s+6]<<16|o[s+5]<<8|o[s+4])+1,height:(o[s+9]<<16|o[s+8]<<8|o[s+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}V.exports=function(o){if(!(o.length<16)&&!(!b(o,0,e)||!b(o,8,t))){var s=12,c=null,m=0,h=k(o,4)+8;if(!(h>o.length)){for(;s+8=10?c=c||n(o,s+8):v==="VP8L"&&g>=5?c=c||r(o,s+8):v==="VP8X"&&g>=10?c=c||a(o,s+8):v==="EXIF"&&(m=l.get_orientation(o.slice(s+8,s+8+g)),s=1/0),s+=8+g}if(c)return m>0&&(c.orientation=m),c}}}}}),rO=ze({"node_modules/probe-image-size/lib/parsers_sync.js"(J,V){"use strict";V.exports={avif:WB(),bmp:YB(),gif:XB(),ico:ZB(),jpeg:$B(),png:KB(),psd:JB(),svg:QB(),tiff:eO(),webp:tO()}}}),aO=ze({"node_modules/probe-image-size/sync.js"(J,V){"use strict";var p=rO();function b(E){for(var k=Object.keys(p),l=0;l0&&e.height>0?e:null}return null}V.exports=function(k){return b(k)},V.exports.parsers=p}}),nO=ze({"src/traces/image/helpers.js"(J){"use strict";var V=aO(),p=ip().IMAGE_URL_PREFIX,b=$v().Buffer;J.getImageSize=function(E){var k=E.replace(p,""),l=new b(k,"base64");return V(l)}}}),iO=ze({"src/traces/image/calc.js"(J,V){"use strict";var p=Nr(),b=ig(),E=ao(),k=Gi(),l=Nr().maxRowLength,e=nO().getImageSize;V.exports=function(o,s){var c,m;if(s._hasZ)c=s.z.length,m=l(s.z);else if(s._hasSource){var h=e(s.source);c=h.height,m=h.width}var v=k.getFromId(o,s.xaxis||"x"),g=k.getFromId(o,s.yaxis||"y"),i=v.d2c(s.x0)-s.dx/2,w=g.d2c(s.y0)-s.dy/2,S,M=[i,i+m*s.dx],C=[w,w+c*s.dy];if(v&&v.type==="log")for(S=0;S0;)z=c.c2p(C+B*u),B--;for(B=0;O===void 0&&B0;)D=m.c2p(_+B*A),B--;if(zG[0];if(X||K){var H=x+P/2,Y=O+j/2;ne+="transform:"+E(H+"px",Y+"px")+"scale("+(X?-1:1)+","+(K?-1:1)+")"+E(-H+"px",-Y+"px")+";"}}re.attr("style",ne);var q=new Promise(function(Z){if(w._hasZ)Z();else if(w._hasSource)if(w._canvas&&w._canvas.el.width===T&&w._canvas.el.height===f&&w._canvas.source===w.source)Z();else{var ee=document.createElement("canvas");ee.width=T,ee.height=f;var ae=ee.getContext("2d",{willReadFrequently:!0});w._image=w._image||new Image;var he=w._image;he.onload=function(){ae.drawImage(he,0,0),w._canvas={el:ee,source:w.source},Z()},he.setAttribute("src",w.source)}}).then(function(){var Z,ee;if(w._hasZ)ee=Q(function(xe,we){var Me=M[we][xe];return b.isTypedArray(Me)&&(Me=Array.from(Me)),Me}),Z=ee.toDataURL("image/png");else if(w._hasSource)if(S)Z=w.source;else{var ae=w._canvas.el.getContext("2d",{willReadFrequently:!0}),he=ae.getImageData(0,0,T,f).data;ee=Q(function(xe,we){var Me=4*(we*T+xe);return[he[Me],he[Me+1],he[Me+2],he[Me+3]]}),Z=ee.toDataURL("image/png")}re.attr({"xlink:href":Z,height:j,width:P,x,y:O})});r._promises.push(q)})}}}),sO=ze({"src/traces/image/style.js"(J,V){"use strict";var p=ci();V.exports=function(E){p.select(E).selectAll(".im image").style("opacity",function(k){return k[0].trace.opacity})}}}),lO=ze({"src/traces/image/hover.js"(J,V){"use strict";var p=Zl(),b=Nr(),E=b.isArrayOrTypedArray,k=ig();V.exports=function(e,t,n){var r=e.cd[0],a=r.trace,o=e.xa,s=e.ya;if(!(p.inbox(t-r.x0,t-(r.x0+r.w*a.dx),0)>0||p.inbox(n-r.y0,n-(r.y0+r.h*a.dy),0)>0)){var c=Math.floor((t-r.x0)/a.dx),m=Math.floor(Math.abs(n-r.y0)/a.dy),h;if(a._hasZ?h=r.z[m][c]:a._hasSource&&(h=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,m,1,1).data),!!h){var v=r.hi||a.hoverinfo,g;if(v){var i=v.split("+");i.indexOf("all")!==-1&&(i=["color"]),i.indexOf("color")!==-1&&(g=!0)}var w=k.colormodel[a.colormodel],S=w.colormodel||a.colormodel,M=S.length,C=a._scaler(h),_=w.suffix,T=[];(a.hovertemplate||g)&&(T.push("["+[C[0]+_[0],C[1]+_[1],C[2]+_[2]].join(", ")),M===4&&T.push(", "+C[3]+_[3]),T.push("]"),T=T.join(""),e.extraText=S.toUpperCase()+": "+T);var f;E(a.hovertext)&&E(a.hovertext[m])?f=a.hovertext[m][c]:E(a.text)&&E(a.text[m])&&(f=a.text[m][c]);var u=s.c2p(r.y0+(m+.5)*a.dy),A=r.x0+(c+.5)*a.dx,x=r.y0+(m+.5)*a.dy,z="["+h.slice(0,a.colormodel.length).join(", ")+"]";return[b.extendFlat(e,{index:[m,c],x0:o.c2p(r.x0+c*a.dx),x1:o.c2p(r.x0+(c+1)*a.dx),y0:u,y1:u,color:C,xVal:A,xLabelVal:A,yVal:x,yLabelVal:x,zLabelVal:z,text:f,hovertemplateLabels:{zLabel:z,colorLabel:T,"color[0]Label":C[0]+_[0],"color[1]Label":C[1]+_[1],"color[2]Label":C[2]+_[2],"color[3]Label":C[3]+_[3]}})]}}}}}),uO=ze({"src/traces/image/event_data.js"(J,V){"use strict";V.exports=function(b,E){return"xVal"in E&&(b.x=E.xVal),"yVal"in E&&(b.y=E.yVal),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b.color=E.color,b.colormodel=E.trace.colormodel,b.z||(b.z=E.color),b}}}),cO=ze({"src/traces/image/index.js"(J,V){"use strict";V.exports={attributes:(CT(),Po(Sb)).default,supplyDefaults:Gz(),calc:iO(),plot:oO(),style:sO(),hoverPoints:lO(),eventData:uO(),moduleType:"trace",name:"image",basePlotModule:Du(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),fO=ze({"lib/image.js"(J,V){"use strict";V.exports=cO()}}),t0=ze({"src/traces/pie/attributes.js"(J,V){"use strict";var p=ws(),b=Ml().attributes,E=Qs(),k=fc(),{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Ki().extendFlat,r=Uc().pattern,a=E({editType:"plot",arrayOk:!0,colorEditType:"plot"});V.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:k.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,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:n({},p.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:t(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:t({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:n({},a,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:n({},a,{}),outsidetextfont:n({},a,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:n({},p.showlegend,{arrayOk:!0}),legend:n({},p.legend,{arrayOk:!0}),legendrank:n({},p.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:n({},a,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:b({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"}}}}),r0=ze({"src/traces/pie/defaults.js"(J,V){"use strict";var p=ao(),b=Nr(),E=t0(),k=Ml().defaults,l=qh().handleText,e=Nr().coercePattern;function t(a,o){var s=b.isArrayOrTypedArray(a),c=b.isArrayOrTypedArray(o),m=Math.min(s?a.length:1/0,c?o.length:1/0);if(isFinite(m)||(m=0),m&&c){for(var h,v=0;v0){h=!0;break}}h||(m=0)}return{hasLabels:s,hasValues:c,len:m}}function n(a,o,s,c,m){var h=c("marker.line.width");h&&c("marker.line.color",m?void 0:s.paper_bgcolor);var v=c("marker.colors");e(c,"marker.pattern",v),a.marker&&!o.marker.pattern.fgcolor&&(o.marker.pattern.fgcolor=a.marker.colors),o.marker.pattern.bgcolor||(o.marker.pattern.bgcolor=s.paper_bgcolor)}function r(a,o,s,c){function m(x,z){return b.coerce(a,o,E,x,z)}var h=m("labels"),v=m("values"),g=t(h,v),i=g.len;if(o._hasLabels=g.hasLabels,o._hasValues=g.hasValues,!o._hasLabels&&o._hasValues&&(m("label0"),m("dlabel")),!i){o.visible=!1;return}o._length=i,n(a,o,c,m,!0),m("scalegroup");var w=m("text"),S=m("texttemplate");m("texttemplatefallback");var M;if(S||(M=m("textinfo",b.isArrayOrTypedArray(w)?"text+percent":"percent")),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),S||M&&M!=="none"){var C=m("textposition");l(a,o,c,m,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(C)||C==="auto",T=_||C==="outside";T&&m("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&m("insidetextorientation")}else M==="none"&&m("textposition","none");k(o,c,m);var f=m("hole"),u=m("title.text");if(u){var A=m("title.position",f?"middle center":"top center");!f&&A==="middle center"&&(o.title.position="top center"),b.coerceFont(m,"title.font",c.font)}m("sort"),m("direction"),m("rotation"),m("pull")}V.exports={handleLabelsAndValues:t,handleMarkerDefaults:n,supplyDefaults:r}}}),qb=ze({"src/traces/pie/layout_attributes.js"(J,V){"use strict";V.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),hO=ze({"src/traces/pie/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=qb();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("hiddenlabels"),e("piecolorway",l.colorway),e("extendpiecolors")}}}),ug=ze({"src/traces/pie/calc.js"(J,V){"use strict";var p=ao(),b=Qn(),E={};function k(n,r){var a=[],o=n._fullLayout,s=o.hiddenlabels||[],c=r.labels,m=r.marker.colors||[],h=r.values,v=r._length,g=r._hasValues&&v,i,w;if(r.dlabel)for(c=new Array(v),i=0;i=0});var x=r.type==="funnelarea"?_:r.sort;return x&&a.sort(function(z,I){return I.v-z.v}),a[0]&&(a[0].vTotal=C),a}function l(n){return function(a,o){if(!a||!b.isValid(a))return!1;let s=b.rgbaString(a);return n[o]||(n[o]=s),s}}function e(n,r){var a=(r||{}).type;a||(a="pie");var o=n._fullLayout,s=n.calcdata,c=o[a+"colorway"],m=o["_"+a+"colormap"];o["extend"+a+"colors"]&&(c=t(c,E));for(var h=0,v=0;v0&&(Be+=gt*le.pxmid[0],Xe+=gt*le.pxmid[1])}le.cxFinal=Be,le.cyFinal=Xe;function Tt(Ot,vt,ht,De){var Ne=De*(vt[0]-Ot[0]),We=De*(vt[1]-Ot[1]);return"a"+De*he.r+","+De*he.r+" 0 "+le.largeArc+(ht?" 1 ":" 0 ")+Ne+","+We}var At=xe.hole;if(le.v===he.vTotal){var $t="M"+(Be+le.px0[0])+","+(Xe+le.px0[1])+Tt(le.px0,le.pxmid,!0,1)+Tt(le.pxmid,le.px0,!0,1)+"Z";At?yt.attr("d","M"+(Be+At*le.px0[0])+","+(Xe+At*le.px0[1])+Tt(le.px0,le.pxmid,!1,At)+Tt(le.pxmid,le.px0,!1,At)+"Z"+$t):yt.attr("d",$t)}else{var rr=Tt(le.px0,le.px1,!0,1);if(At){var _r=1-At;yt.attr("d","M"+(Be+At*le.px1[0])+","+(Xe+At*le.px1[1])+Tt(le.px1,le.px0,!1,At)+"l"+_r*le.px0[0]+","+_r*le.px0[1]+rr+"Z")}else yt.attr("d","M"+Be+","+Xe+"l"+le.px0[0]+","+le.px0[1]+rr+"Z")}se(X,le,he);var Xt=m.castOption(xe.textposition,le.pts),or=Ye.selectAll("g.slicetext").data(le.text&&Xt!=="none"?[0]:[]);or.enter().append("g").classed("slicetext",!0),or.exit().remove(),or.each(function(){var Ot=e.ensureSingle(p.select(this),"text","",function(et){et.attr("data-notex",1)}),vt=e.ensureUniformFontSize(X,Xt==="outside"?S(xe,le,Y.font):M(xe,le,Y.font));Ot.text(le.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,vt).call(r.convertToTspans,X);var ht=l.bBox(Ot.node()),De;if(Xt==="outside")De=O(ht,le);else if(De=_(ht,le,he),Xt==="auto"&&De.scale<1){var Ne=e.ensureUniformFontSize(X,xe.outsidetextfont);Ot.call(l.font,Ne),ht=l.bBox(Ot.node()),De=O(ht,le)}var We=De.textPosAngle,Ke=We===void 0?le.pxmid:ne(he.r,We);if(De.targetX=Be+Ke[0]*De.rCenter+(De.x||0),De.targetY=Xe+Ke[1]*De.rCenter+(De.y||0),G(De,ht),De.outside){var Je=De.targetY;le.yLabelMin=Je-ht.height/2,le.yLabelMid=Je,le.yLabelMax=Je+ht.height/2,le.labelExtraX=0,le.labelExtraY=0,Se=!0}De.fontSize=vt.size,o(xe.type,De,Y),ee[Ae].transform=De,e.setTransormAndDisplay(Ot,De)})});var Ie=p.select(this).selectAll("g.titletext").data(xe.title.text?[0]:[]);if(Ie.enter().append("g").classed("titletext",!0),Ie.exit().remove(),Ie.each(function(){var le=e.ensureSingle(p.select(this),"text","",function(Xe){Xe.attr("data-notex",1)}),Ae=xe.title.text;xe._meta&&(Ae=e.templateString(Ae,xe._meta)),le.text(Ae).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,xe.title.font).call(r.convertToTspans,X);var Be;xe.title.position==="middle center"?Be=D(he):Be=B(he,q),le.attr("transform",n(Be.x,Be.y)+t(Math.min(1,Be.scale))+n(Be.tx,Be.ty))}),Se&&U(Me,xe),i(we,xe),Se&&xe.automargin){var Ve=l.bBox(ae.node()),Ge=xe.domain,ke=q.w*(Ge.x[1]-Ge.x[0]),_e=q.h*(Ge.y[1]-Ge.y[0]),ce=(.5*ke-he.r)/q.w,ve=(.5*_e-he.r)/q.h;b.autoMargin(X,"pie."+xe.uid+".automargin",{xl:Ge.x[0]-ce,xr:Ge.x[1]+ce,yb:Ge.y[0]-ve,yt:Ge.y[1]+ve,l:Math.max(he.cx-he.r-Ve.left,0),r:Math.max(Ve.right-(he.cx+he.r),0),b:Math.max(Ve.bottom-(he.cy+he.r),0),t:Math.max(he.cy-he.r-Ve.top,0),pad:5})}})});setTimeout(function(){Z.selectAll("tspan").each(function(){var ee=p.select(this);ee.attr("dy")&&ee.attr("dy",ee.attr("dy"))})},0)}function i(X,K){X.each(function(H){var Y=p.select(this);if(!H.labelExtraX&&!H.labelExtraY){Y.select("path.textline").remove();return}var q=Y.select("g.slicetext text");H.transform.targetX+=H.labelExtraX,H.transform.targetY+=H.labelExtraY,e.setTransormAndDisplay(q,H.transform);var Z=H.cxFinal+H.pxmid[0],ee=H.cyFinal+H.pxmid[1],ae="M"+Z+","+ee,he=(H.yLabelMax-H.yLabelMin)*(H.pxmid[0]<0?-1:1)/4;if(H.labelExtraX){var xe=H.labelExtraX*H.pxmid[1]/H.pxmid[0],we=H.yLabelMid+H.labelExtraY-(H.cyFinal+H.pxmid[1]);Math.abs(xe)>Math.abs(we)?ae+="l"+we*H.pxmid[0]/H.pxmid[1]+","+we+"H"+(Z+H.labelExtraX+he):ae+="l"+H.labelExtraX+","+xe+"v"+(we-xe)+"h"+he}else ae+="V"+(H.yLabelMid+H.labelExtraY)+"h"+he;e.ensureSingle(Y,"path","textline").call(k.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:ae,fill:"none"})})}function w(X,K,H){var Y=H[0],q=Y.cx,Z=Y.cy,ee=Y.trace,ae=ee.type==="funnelarea";"_hasHoverLabel"in ee||(ee._hasHoverLabel=!1),"_hasHoverEvent"in ee||(ee._hasHoverEvent=!1),X.on("mouseover",function(he){var xe=K._fullLayout,we=K._fullData[ee.index];if(!(K._dragging||xe.hovermode===!1)){var Me=we.hoverinfo;if(Array.isArray(Me)&&(Me=E.castHoverinfo({hoverinfo:[m.castOption(Me,he.pts)],_module:ee._module},xe,0)),Me==="all"&&(Me="label+text+value+percent+name"),we.hovertemplate||Me!=="none"&&Me!=="skip"&&Me){var Se=he.rInscribed||0,Ie=q+he.pxmid[0]*(1-Se),Ve=Z+he.pxmid[1]*(1-Se),Ge=xe.separators,ke=[];if(Me&&Me.indexOf("label")!==-1&&ke.push(he.label),he.text=m.castOption(we.hovertext||we.text,he.pts),Me&&Me.indexOf("text")!==-1){var _e=he.text;e.isValidTextValue(_e)&&ke.push(_e)}he.value=he.v,he.valueLabel=m.formatPieValue(he.v,Ge),Me&&Me.indexOf("value")!==-1&&ke.push(he.valueLabel),he.percent=he.v/Y.vTotal,he.percentLabel=m.formatPiePercent(he.percent,Ge),Me&&Me.indexOf("percent")!==-1&&ke.push(he.percentLabel);var ce=we.hoverlabel,ve=ce.font,le=[];E.loneHover({trace:ee,x0:Ie-Se*Y.r,x1:Ie+Se*Y.r,y:Ve,_x0:ae?q+he.TL[0]:Ie-Se*Y.r,_x1:ae?q+he.TR[0]:Ie+Se*Y.r,_y0:ae?Z+he.TL[1]:Ve-Se*Y.r,_y1:ae?Z+he.BL[1]:Ve+Se*Y.r,text:ke.join("
"),name:we.hovertemplate||Me.indexOf("name")!==-1?we.name:void 0,idealAlign:he.pxmid[0]<0?"left":"right",color:m.castOption(ce.bgcolor,he.pts)||he.color,borderColor:m.castOption(ce.bordercolor,he.pts),fontFamily:m.castOption(ve.family,he.pts),fontSize:m.castOption(ve.size,he.pts),fontColor:m.castOption(ve.color,he.pts),nameLength:m.castOption(ce.namelength,he.pts),textAlign:m.castOption(ce.align,he.pts),hovertemplate:m.castOption(we.hovertemplate,he.pts),hovertemplateLabels:he,eventData:[h(he,we)]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:K,inOut_bbox:le}),he.bbox=le[0],ee._hasHoverLabel=!0}ee._hasHoverEvent=!0,K.emit("plotly_hover",{points:[h(he,we)],event:p.event})}}),X.on("mouseout",function(he){var xe=K._fullLayout,we=K._fullData[ee.index],Me=p.select(this).datum();ee._hasHoverEvent&&(he.originalEvent=p.event,K.emit("plotly_unhover",{points:[h(Me,we)],event:p.event}),ee._hasHoverEvent=!1),ee._hasHoverLabel&&(E.loneUnhover(xe._hoverlayer.node()),ee._hasHoverLabel=!1)}),X.on("click",function(he){var xe=K._fullLayout,we=K._fullData[ee.index];K._dragging||xe.hovermode===!1||(K._hoverdata=[h(he,we)],E.click(K,p.event))})}function S(X,K,H){var Y=m.castOption(X.outsidetextfont.color,K.pts)||m.castOption(X.textfont.color,K.pts)||H.color,q=m.castOption(X.outsidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||H.family,Z=m.castOption(X.outsidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||H.size,ee=m.castOption(X.outsidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||H.weight,ae=m.castOption(X.outsidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||H.style,he=m.castOption(X.outsidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||H.variant,xe=m.castOption(X.outsidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||H.textcase,we=m.castOption(X.outsidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||H.lineposition,Me=m.castOption(X.outsidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||H.shadow;return{color:Y,family:q,size:Z,weight:ee,style:ae,variant:he,textcase:xe,lineposition:we,shadow:Me}}function M(X,K,H){var Y=m.castOption(X.insidetextfont.color,K.pts);!Y&&X._input.textfont&&(Y=m.castOption(X._input.textfont.color,K.pts));var q=m.castOption(X.insidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||H.family,Z=m.castOption(X.insidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||H.size,ee=m.castOption(X.insidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||H.weight,ae=m.castOption(X.insidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||H.style,he=m.castOption(X.insidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||H.variant,xe=m.castOption(X.insidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||H.textcase,we=m.castOption(X.insidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||H.lineposition,Me=m.castOption(X.insidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||H.shadow;return{color:Y||k.contrast(K.color),family:q,size:Z,weight:ee,style:ae,variant:he,textcase:xe,lineposition:we,shadow:Me}}function C(X,K){for(var H,Y,q=0;q=-4;ce-=2)_e(Math.PI*ce,"tan");for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+1),"tan")}if(Me||Ie){for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+1.5),"rad");for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+.5),"rad")}}if(ae||Ve||Me){var ve=Math.sqrt(X.width*X.width+X.height*X.height);if(ke={scale:q*Y*2/ve,rCenter:1-q,rotate:0},ke.textPosAngle=(K.startangle+K.stopangle)/2,ke.scale>=1)return ke;Ge.push(ke)}(Ve||Ie)&&(ke=f(X,Y,ee,he,xe),ke.textPosAngle=(K.startangle+K.stopangle)/2,Ge.push(ke)),(Ve||Se)&&(ke=u(X,Y,ee,he,xe),ke.textPosAngle=(K.startangle+K.stopangle)/2,Ge.push(ke));for(var le=0,Ae=0,Be=0;Be=1)break}return Ge[le]}function T(X,K){var H=X.startangle,Y=X.stopangle;return H>K&&K>Y||H0?1:-1)/2,y:Z/(1+H*H/(Y*Y)),outside:!0}}function D(X){var K=Math.sqrt(X.titleBox.width*X.titleBox.width+X.titleBox.height*X.titleBox.height);return{x:X.cx,y:X.cy,scale:X.trace.hole*X.r*2/K,tx:0,ty:-X.titleBox.height/2+X.trace.title.font.size}}function B(X,K){var H=1,Y=1,q,Z=X.trace,ee={x:X.cx,y:X.cy},ae={tx:0,ty:0};ae.ty+=Z.title.font.size,q=j(Z),Z.title.position.indexOf("top")!==-1?(ee.y-=(1+q)*X.r,ae.ty-=X.titleBox.height):Z.title.position.indexOf("bottom")!==-1&&(ee.y+=(1+q)*X.r);var he=F(X.r,X.trace.aspectratio),xe=K.w*(Z.domain.x[1]-Z.domain.x[0])/2;return Z.title.position.indexOf("left")!==-1?(xe=xe+he,ee.x-=(1+q)*he,ae.tx+=X.titleBox.width/2):Z.title.position.indexOf("center")!==-1?xe*=2:Z.title.position.indexOf("right")!==-1&&(xe=xe+he,ee.x+=(1+q)*he,ae.tx-=X.titleBox.width/2),H=xe/X.titleBox.width,Y=P(X,K)/X.titleBox.height,{x:ee.x,y:ee.y,scale:Math.min(H,Y),tx:ae.tx,ty:ae.ty}}function F(X,K){return X/(K===void 0?1:K)}function P(X,K){var H=X.trace,Y=K.h*(H.domain.y[1]-H.domain.y[0]);return Math.min(X.titleBox.height,Y/2)}function j(X){var K=X.pull;if(!K)return 0;var H;if(e.isArrayOrTypedArray(K))for(K=0,H=0;HK&&(K=X.pull[H]);return K}function U(X,K){var H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve;function Ge(ve,le){return ve.pxmid[1]-le.pxmid[1]}function ke(ve,le){return le.pxmid[1]-ve.pxmid[1]}function _e(ve,le){le||(le={});var Ae=le.labelExtraY+(Y?le.yLabelMax:le.yLabelMin),Be=Y?ve.yLabelMin:ve.yLabelMax,Xe=Y?ve.yLabelMax:ve.yLabelMin,Ye=ve.cyFinal+ee(ve.px0[1],ve.px1[1]),yt=Ae-Be,gt,Tt,At,$t,rr,_r;if(yt*he>0&&(ve.labelExtraY=yt),!!e.isArrayOrTypedArray(K.pull))for(Tt=0;Tt=(m.castOption(K.pull,At.pts)||0))&&((ve.pxmid[1]-At.pxmid[1])*he>0?($t=At.cyFinal+ee(At.px0[1],At.px1[1]),yt=$t-Be-ve.labelExtraY,yt*he>0&&(ve.labelExtraY+=yt)):(Xe+ve.labelExtraY-Ye)*he>0&&(gt=3*ae*Math.abs(Tt-Me.indexOf(ve)),rr=At.cxFinal+Z(At.px0[0],At.px1[0]),_r=rr+gt-(ve.cxFinal+ve.pxmid[0])-ve.labelExtraX,_r*ae>0&&(ve.labelExtraX+=_r)))}for(Y=0;Y<2;Y++)for(q=Y?Ge:ke,ee=Y?Math.max:Math.min,he=Y?1:-1,H=0;H<2;H++){for(Z=H?Math.max:Math.min,ae=H?1:-1,xe=X[Y][H],xe.sort(q),we=X[1-Y][H],Me=we.concat(xe),Ie=[],Se=0;Se1?(xe=H.r,we=xe/q.aspectratio):(we=H.r,xe=we*q.aspectratio),xe*=(1+q.baseratio)/2,he=xe*we}ee=Math.min(ee,he/H.vTotal)}for(Y=0;YK.vTotal/2?1:0,xe.halfangle=Math.PI*Math.min(xe.v/K.vTotal,.5),xe.ring=1-Y.hole,xe.rInscribed=I(xe,K))}function ne(X,K){return[X*Math.sin(K),-X*Math.cos(K)]}function se(X,K,H){var Y=X._fullLayout,q=H.trace,Z=q.texttemplate,ee=q.textinfo;if(!Z&&ee&&ee!=="none"){var ae=ee.split("+"),he=function(le){return ae.indexOf(le)!==-1},xe=he("label"),we=he("text"),Me=he("value"),Se=he("percent"),Ie=Y.separators,Ve;if(Ve=xe?[K.label]:[],we){var Ge=m.getFirstFilled(q.text,K.pts);v(Ge)&&Ve.push(Ge)}Me&&Ve.push(m.formatPieValue(K.v,Ie)),Se&&Ve.push(m.formatPiePercent(K.v/H.vTotal,Ie)),K.text=Ve.join("
")}function ke(le){return{label:le.label,value:le.v,valueLabel:m.formatPieValue(le.v,Y.separators),percent:le.v/H.vTotal,percentLabel:m.formatPiePercent(le.v/H.vTotal,Y.separators),color:le.color,text:le.text,customdata:e.castOption(q,le.i,"customdata")}}if(Z){var _e=e.castOption(q,K.i,"texttemplate");if(!_e)K.text="";else{var ce=ke(K),ve=m.getFirstFilled(q.text,K.pts);(v(ve)||ve==="")&&(ce.text=ve),K.text=e.texttemplateString({data:[ce,q._meta],fallback:q.texttemplatefallback,labels:ce,locale:X._fullLayout._d3locale,template:_e})}}}function G(X,K){var H=X.rotate*Math.PI/180,Y=Math.cos(H),q=Math.sin(H),Z=(K.left+K.right)/2,ee=(K.top+K.bottom)/2;X.textX=Z*Y-ee*q,X.textY=Z*q+ee*Y,X.noCenter=!0}V.exports={plot:g,formatSliceLabel:se,transformInsideText:_,determineInsideTextFont:M,positionTitleOutside:B,prerenderTitles:C,layoutAreas:$,attachFxHandlers:w,computeTransform:G}}}),pO=ze({"src/traces/pie/style.js"(J,V){"use strict";var p=ci(),b=Zm(),E=eh().resizeText;V.exports=function(l){var e=l._fullLayout._pielayer.selectAll(".trace");E(l,e,"pie"),e.each(function(t){var n=t[0],r=n.trace,a=p.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){p.select(this).call(b,o,r,l)})})}}}),vO=ze({"src/traces/pie/base_plot.js"(J){"use strict";var V=cl();J.name="pie",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),mO=ze({"src/traces/pie/index.js"(J,V){"use strict";V.exports={attributes:t0(),supplyDefaults:r0().supplyDefaults,supplyLayoutDefaults:hO(),layoutAttributes:qb(),calc:ug().calc,crossTraceCalc:ug().crossTraceCalc,plot:Vb().plot,style:pO(),styleOne:Zm(),moduleType:"trace",name:"pie",basePlotModule:vO(),categories:["pie-like","pie","showLegend"],meta:{}}}}),gO=ze({"lib/pie.js"(J,V){"use strict";V.exports=mO()}}),yO=ze({"src/traces/sunburst/base_plot.js"(J){"use strict";var V=cl();J.name="sunburst",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),e6=ze({"src/traces/sunburst/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),R1=ze({"src/traces/sunburst/attributes.js"(J,V){"use strict";var p=ws(),{hovertemplateAttrs:b,texttemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=qs(),e=Ml().attributes,t=t0(),n=e6(),r=Ki().extendFlat,a=Uc().pattern;V.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},t.marker.line.color,{dflt:null}),width:r({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:a,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:E({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:k({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r({},p.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:b({},{keys:n.eventDataKeys}),hovertemplatefallback:k(),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:r({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),t6=ze({"src/traces/sunburst/layout_attributes.js"(J,V){"use strict";V.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),_O=ze({"src/traces/sunburst/defaults.js"(J,V){"use strict";var p=Nr(),b=R1(),E=Ml().defaults,k=qh().handleText,l=r0().handleMarkerDefaults,e=fl(),t=e.hasColorscale,n=e.handleDefaults;V.exports=function(a,o,s,c){function m(M,C){return p.coerce(a,o,b,M,C)}var h=m("labels"),v=m("parents");if(!h||!h.length||!v||!v.length){o.visible=!1;return}var g=m("values");g&&g.length?m("branchvalues"):m("count"),m("level"),m("maxdepth"),l(a,o,c,m);var i=o._hasColorscale=t(a,"marker","colors")||(a.marker||{}).coloraxis;i&&n(a,o,c,m,{prefix:"marker.",cLetter:"c"}),m("leaf.opacity",i?1:.7);var w=m("text");m("texttemplate"),m("texttemplatefallback"),o.texttemplate||m("textinfo",p.isArrayOrTypedArray(w)?"text+label":"label"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var S="auto";k(a,o,c,m,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),m("insidetextorientation"),m("sort"),m("rotation"),m("root.color"),E(o,c,m),o._length=null}}}),xO=ze({"src/traces/sunburst/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=t6();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("sunburstcolorway",l.colorway),e("extendsunburstcolors")}}}),I1=ze({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(De,Ne){return De.parent===Ne.parent?1:2}function E(De){return De.reduce(k,0)/De.length}function k(De,Ne){return De+Ne.x}function l(De){return 1+De.reduce(e,0)}function e(De,Ne){return Math.max(De,Ne.y)}function t(De){for(var Ne;Ne=De.children;)De=Ne[0];return De}function n(De){for(var Ne;Ne=De.children;)De=Ne[Ne.length-1];return De}function r(){var De=b,Ne=1,We=1,Ke=!1;function Je(et){var Mt,pt=0;et.eachAfter(function(Ht){var Sr=Ht.children;Sr?(Ht.x=E(Sr),Ht.y=l(Sr)):(Ht.x=Mt?pt+=De(Ht,Mt):0,Ht.y=0,Mt=Ht)});var Pt=t(et),Ct=n(et),qt=Pt.x-De(Pt,Ct)/2,Vt=Ct.x+De(Ct,Pt)/2;return et.eachAfter(Ke?function(Ht){Ht.x=(Ht.x-et.x)*Ne,Ht.y=(et.y-Ht.y)*We}:function(Ht){Ht.x=(Ht.x-qt)/(Vt-qt)*Ne,Ht.y=(1-(et.y?Ht.y/et.y:1))*We})}return Je.separation=function(et){return arguments.length?(De=et,Je):De},Je.size=function(et){return arguments.length?(Ke=!1,Ne=+et[0],We=+et[1],Je):Ke?null:[Ne,We]},Je.nodeSize=function(et){return arguments.length?(Ke=!0,Ne=+et[0],We=+et[1],Je):Ke?[Ne,We]:null},Je}function a(De){var Ne=0,We=De.children,Ke=We&&We.length;if(!Ke)Ne=1;else for(;--Ke>=0;)Ne+=We[Ke].value;De.value=Ne}function o(){return this.eachAfter(a)}function s(De){var Ne=this,We,Ke=[Ne],Je,et,Mt;do for(We=Ke.reverse(),Ke=[];Ne=We.pop();)if(De(Ne),Je=Ne.children,Je)for(et=0,Mt=Je.length;et=0;--Je)We.push(Ke[Je]);return this}function m(De){for(var Ne=this,We=[Ne],Ke=[],Je,et,Mt;Ne=We.pop();)if(Ke.push(Ne),Je=Ne.children,Je)for(et=0,Mt=Je.length;et=0;)We+=Ke[Je].value;Ne.value=We})}function v(De){return this.eachBefore(function(Ne){Ne.children&&Ne.children.sort(De)})}function g(De){for(var Ne=this,We=i(Ne,De),Ke=[Ne];Ne!==We;)Ne=Ne.parent,Ke.push(Ne);for(var Je=Ke.length;De!==We;)Ke.splice(Je,0,De),De=De.parent;return Ke}function i(De,Ne){if(De===Ne)return De;var We=De.ancestors(),Ke=Ne.ancestors(),Je=null;for(De=We.pop(),Ne=Ke.pop();De===Ne;)Je=De,De=We.pop(),Ne=Ke.pop();return Je}function w(){for(var De=this,Ne=[De];De=De.parent;)Ne.push(De);return Ne}function S(){var De=[];return this.each(function(Ne){De.push(Ne)}),De}function M(){var De=[];return this.eachBefore(function(Ne){Ne.children||De.push(Ne)}),De}function C(){var De=this,Ne=[];return De.each(function(We){We!==De&&Ne.push({source:We.parent,target:We})}),Ne}function _(De,Ne){var We=new x(De),Ke=+De.value&&(We.value=De.value),Je,et=[We],Mt,pt,Pt,Ct;for(Ne==null&&(Ne=f);Je=et.pop();)if(Ke&&(Je.value=+Je.data.value),(pt=Ne(Je.data))&&(Ct=pt.length))for(Je.children=new Array(Ct),Pt=Ct-1;Pt>=0;--Pt)et.push(Mt=Je.children[Pt]=new x(pt[Pt])),Mt.parent=Je,Mt.depth=Je.depth+1;return We.eachBefore(A)}function T(){return _(this).eachBefore(u)}function f(De){return De.children}function u(De){De.data=De.data.data}function A(De){var Ne=0;do De.height=Ne;while((De=De.parent)&&De.height<++Ne)}function x(De){this.data=De,this.depth=this.height=0,this.parent=null}x.prototype=_.prototype={constructor:x,count:o,each:s,eachAfter:m,eachBefore:c,sum:h,sort:v,path:g,ancestors:w,descendants:S,leaves:M,links:C,copy:T};var z=Array.prototype.slice;function I(De){for(var Ne=De.length,We,Ke;Ne;)Ke=Math.random()*Ne--|0,We=De[Ne],De[Ne]=De[Ke],De[Ke]=We;return De}function O(De){for(var Ne=0,We=(De=I(z.call(De))).length,Ke=[],Je,et;Ne0&&We*We>Ke*Ke+Je*Je}function P(De,Ne){for(var We=0;WePt?(Je=(Ct+Pt-et)/(2*Ct),pt=Math.sqrt(Math.max(0,Pt/Ct-Je*Je)),We.x=De.x-Je*Ke-pt*Mt,We.y=De.y-Je*Mt+pt*Ke):(Je=(Ct+et-Pt)/(2*Ct),pt=Math.sqrt(Math.max(0,et/Ct-Je*Je)),We.x=Ne.x+Je*Ke-pt*Mt,We.y=Ne.y+Je*Mt+pt*Ke)):(We.x=Ne.x+We.r,We.y=Ne.y)}function ne(De,Ne){var We=De.r+Ne.r-1e-6,Ke=Ne.x-De.x,Je=Ne.y-De.y;return We>0&&We*We>Ke*Ke+Je*Je}function se(De){var Ne=De._,We=De.next._,Ke=Ne.r+We.r,Je=(Ne.x*We.r+We.x*Ne.r)/Ke,et=(Ne.y*We.r+We.y*Ne.r)/Ke;return Je*Je+et*et}function G(De){this._=De,this.next=null,this.previous=null}function X(De){if(!(Je=De.length))return 0;var Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt;if(Ne=De[0],Ne.x=0,Ne.y=0,!(Je>1))return Ne.r;if(We=De[1],Ne.x=-We.r,We.x=Ne.r,We.y=0,!(Je>2))return Ne.r+We.r;re(We,Ne,Ke=De[2]),Ne=new G(Ne),We=new G(We),Ke=new G(Ke),Ne.next=Ke.previous=We,We.next=Ne.previous=Ke,Ke.next=We.previous=Ne;e:for(pt=3;pt0)throw new Error("cycle");return pt}return We.id=function(Ke){return arguments.length?(De=Y(Ke),We):De},We.parentId=function(Ke){return arguments.length?(Ne=Y(Ke),We):Ne},We}function le(De,Ne){return De.parent===Ne.parent?1:2}function Ae(De){var Ne=De.children;return Ne?Ne[0]:De.t}function Be(De){var Ne=De.children;return Ne?Ne[Ne.length-1]:De.t}function Xe(De,Ne,We){var Ke=We/(Ne.i-De.i);Ne.c-=Ke,Ne.s+=We,De.c+=Ke,Ne.z+=We,Ne.m+=We}function Ye(De){for(var Ne=0,We=0,Ke=De.children,Je=Ke.length,et;--Je>=0;)et=Ke[Je],et.z+=Ne,et.m+=Ne,Ne+=et.s+(We+=et.c)}function yt(De,Ne,We){return De.a.parent===Ne.parent?De.a:We}function gt(De,Ne){this._=De,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=Ne}gt.prototype=Object.create(x.prototype);function Tt(De){for(var Ne=new gt(De,0),We,Ke=[Ne],Je,et,Mt,pt;We=Ke.pop();)if(et=We._.children)for(We.children=new Array(pt=et.length),Mt=pt-1;Mt>=0;--Mt)Ke.push(Je=We.children[Mt]=new gt(et[Mt],Mt)),Je.parent=We;return(Ne.parent=new gt(null,0)).children=[Ne],Ne}function At(){var De=le,Ne=1,We=1,Ke=null;function Je(Ct){var qt=Tt(Ct);if(qt.eachAfter(et),qt.parent.m=-qt.z,qt.eachBefore(Mt),Ke)Ct.eachBefore(Pt);else{var Vt=Ct,Ht=Ct,Sr=Ct;Ct.eachBefore(function(ur){ur.xHt.x&&(Ht=ur),ur.depth>Sr.depth&&(Sr=ur)});var Kr=Vt===Ht?1:De(Vt,Ht)/2,Yt=Kr-Vt.x,Rt=Ne/(Ht.x+Kr+Yt),nr=We/(Sr.depth||1);Ct.eachBefore(function(ur){ur.x=(ur.x+Yt)*Rt,ur.y=ur.depth*nr})}return Ct}function et(Ct){var qt=Ct.children,Vt=Ct.parent.children,Ht=Ct.i?Vt[Ct.i-1]:null;if(qt){Ye(Ct);var Sr=(qt[0].z+qt[qt.length-1].z)/2;Ht?(Ct.z=Ht.z+De(Ct._,Ht._),Ct.m=Ct.z-Sr):Ct.z=Sr}else Ht&&(Ct.z=Ht.z+De(Ct._,Ht._));Ct.parent.A=pt(Ct,Ht,Ct.parent.A||Vt[0])}function Mt(Ct){Ct._.x=Ct.z+Ct.parent.m,Ct.m+=Ct.parent.m}function pt(Ct,qt,Vt){if(qt){for(var Ht=Ct,Sr=Ct,Kr=qt,Yt=Ht.parent.children[0],Rt=Ht.m,nr=Sr.m,ur=Kr.m,cr=Yt.m,Rr;Kr=Be(Kr),Ht=Ae(Ht),Kr&&Ht;)Yt=Ae(Yt),Sr=Be(Sr),Sr.a=Ct,Rr=Kr.z+ur-Ht.z-Rt+De(Kr._,Ht._),Rr>0&&(Xe(yt(Kr,Ct,Vt),Ct,Rr),Rt+=Rr,nr+=Rr),ur+=Kr.m,Rt+=Ht.m,cr+=Yt.m,nr+=Sr.m;Kr&&!Be(Sr)&&(Sr.t=Kr,Sr.m+=ur-nr),Ht&&!Ae(Yt)&&(Yt.t=Ht,Yt.m+=Rt-cr,Vt=Ct)}return Vt}function Pt(Ct){Ct.x*=Ne,Ct.y=Ct.depth*We}return Je.separation=function(Ct){return arguments.length?(De=Ct,Je):De},Je.size=function(Ct){return arguments.length?(Ke=!1,Ne=+Ct[0],We=+Ct[1],Je):Ke?null:[Ne,We]},Je.nodeSize=function(Ct){return arguments.length?(Ke=!0,Ne=+Ct[0],We=+Ct[1],Je):Ke?[Ne,We]:null},Je}function $t(De,Ne,We,Ke,Je){for(var et=De.children,Mt,pt=-1,Pt=et.length,Ct=De.value&&(Je-We)/De.value;++ptur&&(ur=Ct),Zr=Rt*Rt*Qr,cr=Math.max(ur/Zr,Zr/nr),cr>Rr){Rt-=Ct;break}Rr=cr}Mt.push(Pt={value:Rt,dice:Sr1?Ke:1)},We}(rr);function or(){var De=Xt,Ne=!1,We=1,Ke=1,Je=[0],et=q,Mt=q,pt=q,Pt=q,Ct=q;function qt(Ht){return Ht.x0=Ht.y0=0,Ht.x1=We,Ht.y1=Ke,Ht.eachBefore(Vt),Je=[0],Ne&&Ht.eachBefore(Me),Ht}function Vt(Ht){var Sr=Je[Ht.depth],Kr=Ht.x0+Sr,Yt=Ht.y0+Sr,Rt=Ht.x1-Sr,nr=Ht.y1-Sr;Rt=Ht-1){var ur=et[Vt];ur.x0=Kr,ur.y0=Yt,ur.x1=Rt,ur.y1=nr;return}for(var cr=Ct[Vt],Rr=Sr/2+cr,Qr=Vt+1,Zr=Ht-1;Qr>>1;Ct[ha]nr-Yt){var un=(Kr*La+Rt*Pa)/Sr;qt(Vt,Qr,Pa,Kr,Yt,un,nr),qt(Qr,Ht,La,un,Yt,Rt,nr)}else{var Xa=(Yt*La+nr*Pa)/Sr;qt(Vt,Qr,Pa,Kr,Yt,Rt,Xa),qt(Qr,Ht,La,Kr,Xa,Rt,nr)}}}function vt(De,Ne,We,Ke,Je){(De.depth&1?$t:Se)(De,Ne,We,Ke,Je)}var ht=function De(Ne){function We(Ke,Je,et,Mt,pt){if((Pt=Ke._squarify)&&Pt.ratio===Ne)for(var Pt,Ct,qt,Vt,Ht=-1,Sr,Kr=Pt.length,Yt=Ke.value;++Ht1?Ke:1)},We}(rr);p.cluster=r,p.hierarchy=_,p.pack=ae,p.packEnclose=O,p.packSiblings=K,p.partition=Ie,p.stratify=ve,p.tree=At,p.treemap=or,p.treemapBinary=Ot,p.treemapDice=Se,p.treemapResquarify=ht,p.treemapSlice=$t,p.treemapSliceDice=vt,p.treemapSquarify=Xt,Object.defineProperty(p,"__esModule",{value:!0})})}}),D1=ze({"src/traces/sunburst/calc.js"(J){"use strict";var V=I1(),p=ao(),b=Nr(),E=fl().makeColorScaleFuncFromTrace,k=ug().makePullColorFn,l=ug().generateExtendedColors,e=fl().calc,t=No().ALMOST_EQUAL,n={},r={},a={};J.calc=function(s,c){var m=s._fullLayout,h=c.ids,v=b.isArrayOrTypedArray(h),g=c.labels,i=c.parents,w=c.values,S=b.isArrayOrTypedArray(w),M=[],C={},_={},T=function(K,H){C[K]?C[K].push(H):C[K]=[H],_[H]=1},f=function(K){return K||typeof K=="number"},u=function(K){return!S||p(w[K])&&w[K]>=0},A,x,z;v?(A=Math.min(h.length,i.length),x=function(K){return f(h[K])&&u(K)},z=function(K){return String(h[K])}):(A=Math.min(g.length,i.length),x=function(K){return f(g[K])&&u(K)},z=function(K){return String(g[K])}),S&&(A=Math.min(A,w.length));for(var I=0;I1){for(var j=b.randstr(),U=0;U>8&15|V>>4&240,V>>4&15|V&240,(V&15)<<4|V&15,1):p===8?F1(V>>24&255,V>>16&255,V>>8&255,(V&255)/255):p===4?F1(V>>12&15|V>>8&240,V>>8&15|V>>4&240,V>>4&15|V&240,((V&15)<<4|V&15)/255):null):(V=f6.exec(J))?new ff(V[1],V[2],V[3],1):(V=h6.exec(J))?new ff(V[1]*255/100,V[2]*255/100,V[3]*255/100,1):(V=d6.exec(J))?F1(V[1],V[2],V[3],V[4]):(V=p6.exec(J))?F1(V[1]*255/100,V[2]*255/100,V[3]*255/100,V[4]):(V=v6.exec(J))?s6(V[1],V[2]/100,V[3]/100,1):(V=m6.exec(J))?s6(V[1],V[2]/100,V[3]/100,V[4]):Xb.hasOwnProperty(J)?n6(Xb[J]):J==="transparent"?new ff(NaN,NaN,NaN,0):null}function n6(J){return new ff(J>>16&255,J>>8&255,J&255,1)}function F1(J,V,p,b){return b<=0&&(J=V=p=NaN),new ff(J,V,p,b)}function Hb(J){return J instanceof sp||(J=fg(J)),J?(J=J.rgb(),new ff(J.r,J.g,J.b,J.opacity)):new ff}function z1(J,V,p,b){return arguments.length===1?Hb(J):new ff(J,V,p,b??1)}function ff(J,V,p,b){this.r=+J,this.g=+V,this.b=+p,this.opacity=+b}function i6(){return`#${pv(this.r)}${pv(this.g)}${pv(this.b)}`}function TO(){return`#${pv(this.r)}${pv(this.g)}${pv(this.b)}${pv((isNaN(this.opacity)?1:this.opacity)*255)}`}function o6(){let J=B1(this.opacity);return`${J===1?"rgb(":"rgba("}${dv(this.r)}, ${dv(this.g)}, ${dv(this.b)}${J===1?")":`, ${J})`}`}function B1(J){return isNaN(J)?1:Math.max(0,Math.min(1,J))}function dv(J){return Math.max(0,Math.min(255,Math.round(J)||0))}function pv(J){return J=dv(J),(J<16?"0":"")+J.toString(16)}function s6(J,V,p,b){return b<=0?J=V=p=NaN:p<=0||p>=1?J=V=NaN:V<=0&&(J=NaN),new ud(J,V,p,b)}function l6(J){if(J instanceof ud)return new ud(J.h,J.s,J.l,J.opacity);if(J instanceof sp||(J=fg(J)),!J)return new ud;if(J instanceof ud)return J;J=J.rgb();var V=J.r/255,p=J.g/255,b=J.b/255,E=Math.min(V,p,b),k=Math.max(V,p,b),l=NaN,e=k-E,t=(k+E)/2;return e?(V===k?l=(p-b)/e+(p0&&t<1?0:l,new ud(l,e,t,J.opacity)}function Wb(J,V,p,b){return arguments.length===1?l6(J):new ud(J,V,p,b??1)}function ud(J,V,p,b){this.h=+J,this.s=+V,this.l=+p,this.opacity=+b}function u6(J){return J=(J||0)%360,J<0?J+360:J}function O1(J){return Math.max(0,Math.min(1,J||0))}function Yb(J,V,p){return(J<60?V+(p-V)*J/60:J<180?p:J<240?V+(p-V)*(240-J)/60:V)*255}var lp,vv,mv,n0,cd,c6,f6,h6,d6,p6,v6,m6,Xb,Zb=zi({"node_modules/d3-color/src/color.js"(){Gb(),lp=.7,vv=1/lp,mv="\\s*([+-]?\\d+)\\s*",n0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c6=/^#([0-9a-f]{3,8})$/,f6=new RegExp(`^rgb\\(${mv},${mv},${mv}\\)$`),h6=new RegExp(`^rgb\\(${cd},${cd},${cd}\\)$`),d6=new RegExp(`^rgba\\(${mv},${mv},${mv},${n0}\\)$`),p6=new RegExp(`^rgba\\(${cd},${cd},${cd},${n0}\\)$`),v6=new RegExp(`^hsl\\(${n0},${cd},${cd}\\)$`),m6=new RegExp(`^hsla\\(${n0},${cd},${cd},${n0}\\)$`),Xb={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},a0(sp,fg,{copy(J){return Object.assign(new this.constructor,this,J)},displayable(){return this.rgb().displayable()},hex:r6,formatHex:r6,formatHex8:bO,formatHsl:wO,formatRgb:a6,toString:a6}),a0(ff,z1,cg(sp,{brighter(J){return J=J==null?vv:Math.pow(vv,J),new ff(this.r*J,this.g*J,this.b*J,this.opacity)},darker(J){return J=J==null?lp:Math.pow(lp,J),new ff(this.r*J,this.g*J,this.b*J,this.opacity)},rgb(){return this},clamp(){return new ff(dv(this.r),dv(this.g),dv(this.b),B1(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:i6,formatHex:i6,formatHex8:TO,formatRgb:o6,toString:o6})),a0(ud,Wb,cg(sp,{brighter(J){return J=J==null?vv:Math.pow(vv,J),new ud(this.h,this.s,this.l*J,this.opacity)},darker(J){return J=J==null?lp:Math.pow(lp,J),new ud(this.h,this.s,this.l*J,this.opacity)},rgb(){var J=this.h%360+(this.h<0)*360,V=isNaN(J)||isNaN(this.s)?0:this.s,p=this.l,b=p+(p<.5?p:1-p)*V,E=2*p-b;return new ff(Yb(J>=240?J-240:J+120,E,b),Yb(J,E,b),Yb(J<120?J+240:J-120,E,b),this.opacity)},clamp(){return new ud(u6(this.h),O1(this.s),O1(this.l),B1(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 J=B1(this.opacity);return`${J===1?"hsl(":"hsla("}${u6(this.h)}, ${O1(this.s)*100}%, ${O1(this.l)*100}%${J===1?")":`, ${J})`}`}}))}}),$b,Kb,g6=zi({"node_modules/d3-color/src/math.js"(){$b=Math.PI/180,Kb=180/Math.PI}});function y6(J){if(J instanceof wd)return new wd(J.l,J.a,J.b,J.opacity);if(J instanceof Ud)return _6(J);J instanceof ff||(J=Hb(J));var V=r2(J.r),p=r2(J.g),b=r2(J.b),E=Qb((.2225045*V+.7168786*p+.0606169*b)/i2),k,l;return V===p&&p===b?k=l=E:(k=Qb((.4360747*V+.3850649*p+.1430804*b)/n2),l=Qb((.0139322*V+.0971045*p+.7141733*b)/o2)),new wd(116*E-16,500*(k-E),200*(E-l),J.opacity)}function Jb(J,V,p,b){return arguments.length===1?y6(J):new wd(J,V,p,b??1)}function wd(J,V,p,b){this.l=+J,this.a=+V,this.b=+p,this.opacity=+b}function Qb(J){return J>x6?Math.pow(J,.3333333333333333):J/l2+s2}function e2(J){return J>gv?J*J*J:l2*(J-s2)}function t2(J){return 255*(J<=.0031308?12.92*J:1.055*Math.pow(J,.4166666666666667)-.055)}function r2(J){return(J/=255)<=.04045?J/12.92:Math.pow((J+.055)/1.055,2.4)}function AO(J){if(J instanceof Ud)return new Ud(J.h,J.c,J.l,J.opacity);if(J instanceof wd||(J=y6(J)),J.a===0&&J.b===0)return new Ud(NaN,0=1?(p=1,V-1):Math.floor(p*V),E=J[b],k=J[b+1],l=b>0?J[b-1]:2*E-k,e=b()=>J}});function S6(J,V){return function(p){return J+p*V}}function kO(J,V,p){return J=Math.pow(J,p),V=Math.pow(V,p)-J,p=1/p,function(b){return Math.pow(J+b*V,p)}}function U1(J,V){var p=V-J;return p?S6(J,p>180||p<-180?p-360*Math.round(p/360):p):pg(isNaN(J)?V:J)}function CO(J){return(J=+J)==1?hf:function(V,p){return p-V?kO(V,p,J):pg(isNaN(V)?p:V)}}function hf(J,V){var p=V-J;return p?S6(J,p):pg(isNaN(J)?V:J)}var s0=zi({"node_modules/d3-interpolate/src/color.js"(){M6()}});function E6(J){return function(V){var p=V.length,b=new Array(p),E=new Array(p),k=new Array(p),l,e;for(l=0;lp&&(k=V.slice(p,k),e[l]?e[l]+=k:e[++l]=k),(b=b[0])===(E=E[0])?e[l]?e[l]+=E:e[++l]=E:(e[++l]=null,t.push({i:l,x:Td(b,E)})),p=H1.lastIndex;return p180?r+=360:r-n>180&&(n+=360),o.push({i:a.push(E(a)+"rotate(",null,b)-2,x:Td(n,r)})):r&&a.push(E(a)+"rotate("+r+b)}function e(n,r,a,o){n!==r?o.push({i:a.push(E(a)+"skewX(",null,b)-2,x:Td(n,r)}):r&&a.push(E(a)+"skewX("+r+b)}function t(n,r,a,o,s,c){if(n!==a||r!==o){var m=s.push(E(s)+"scale(",null,",",null,")");c.push({i:m-4,x:Td(n,a)},{i:m-2,x:Td(r,o)})}else(a!==1||o!==1)&&s.push(E(s)+"scale("+a+","+o+")")}return function(n,r){var a=[],o=[];return n=J(n),r=J(r),k(n.translateX,n.translateY,r.translateX,r.translateY,a,o),l(n.rotate,r.rotate,a,o),e(n.skewX,r.skewX,a,o),t(n.scaleX,n.scaleY,r.scaleX,r.scaleY,a,o),n=r=null,function(s){for(var c=-1,m=o.length,h;++cW1,interpolateArray:()=>LO,interpolateBasis:()=>w6,interpolateBasisClosed:()=>T6,interpolateCubehelix:()=>eA,interpolateCubehelixLong:()=>tA,interpolateDate:()=>D6,interpolateDiscrete:()=>IO,interpolateHcl:()=>K6,interpolateHclLong:()=>J6,interpolateHsl:()=>X6,interpolateHslLong:()=>Z6,interpolateHue:()=>FO,interpolateLab:()=>XO,interpolateNumber:()=>Td,interpolateNumberArray:()=>v2,interpolateObject:()=>z6,interpolateRgb:()=>q1,interpolateRgbBasis:()=>k6,interpolateRgbBasisClosed:()=>C6,interpolateRound:()=>BO,interpolateString:()=>O6,interpolateTransformCss:()=>q6,interpolateTransformSvg:()=>V6,interpolateZoom:()=>W6,piecewise:()=>JO,quantize:()=>eN});var l0=zi({"node_modules/d3-interpolate/src/index.js"(){Y1(),I6(),p2(),A6(),F6(),DO(),zO(),V1(),m2(),B6(),OO(),N6(),VO(),WO(),L6(),YO(),ZO(),$O(),KO(),QO(),tN()}}),y2=ze({"src/traces/sunburst/fill_one.js"(J,V){"use strict";var p=$i(),b=Qn();V.exports=function(k,l,e,t,n){var r=l.data.data,a=r.i,o=n||r.color;if(a>=0){l.i=r.i;var s=e.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=o,l.color=o):(s.color=o,l.color=o),p.pointStyle(k,e,t,l)}else b.fill(k,o)}}}),rA=ze({"src/traces/sunburst/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=Nr(),k=eh().resizeText,l=y2();function e(n){var r=n._fullLayout._sunburstlayer.selectAll(".trace");k(n,r,"sunburst"),r.each(function(a){var o=p.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){p.select(this).call(t,m,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(a,m,"marker.line.color")||b.defaultLine,v=E.castOption(a,m,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",v).call(b.stroke,h).style("opacity",c?a.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),up=ze({"src/traces/sunburst/helpers.js"(J){"use strict";var V=Nr(),p=Qn(),b=gd(),E=lv();J.findEntryWithLevel=function(t,n){var r;return n&&t.eachAfter(function(a){if(J.getPtId(a)===n)return r=a.copy()}),r||t},J.findEntryWithChild=function(t,n){var r;return t.eachAfter(function(a){for(var o=a.children||[],s=0;s0)},J.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},J.isHeader=function(t,n){return!(J.isLeaf(t)||t.depth===n._maxDepth-1)};function e(t){return t.data.data.pid}J.getParent=function(t,n){return J.findEntryWithLevel(t,e(n))},J.listPath=function(t,n){var r=t.parent;if(!r)return[];var a=n?[r.data[n]]:[r];return J.listPath(r,n).concat(a)},J.getPath=function(t){return J.listPath(t,"label").join("/")+"/"},J.formatValue=E.formatPieValue,J.formatPercent=function(t,n){var r=V.formatPercent(t,0);return r==="0%"&&(r=E.formatPiePercent(t,n)),r}}}),$1=ze({"src/traces/sunburst/fx.js"(J,V){"use strict";var p=ci(),b=mi(),E=kh().appendArrayPointValue,k=Zl(),l=Nr(),e=Hm(),t=up(),n=lv(),r=n.formatPieValue;V.exports=function(s,c,m,h,v){var g=h[0],i=g.trace,w=g.hierarchy,S=i.type==="sunburst",M=i.type==="treemap"||i.type==="icicle";"_hasHoverLabel"in i||(i._hasHoverLabel=!1),"_hasHoverEvent"in i||(i._hasHoverEvent=!1);var C=function(f){var u=m._fullLayout;if(!(m._dragging||u.hovermode===!1)){var A=m._fullData[i.index],x=f.data.data,z=x.i,I=t.isHierarchyRoot(f),O=t.getParent(w,f),D=t.getValue(f),B=function(ee){return l.castOption(A,z,ee)},F=B("hovertemplate"),P=k.castHoverinfo(A,u,z),j=u.separators,U;if(F||P&&P!=="none"&&P!=="skip"){var $,Q;S&&($=g.cx+f.pxmid[0]*(1-f.rInscribed),Q=g.cy+f.pxmid[1]*(1-f.rInscribed)),M&&($=f._hoverX,Q=f._hoverY);var re={},ne=[],se=[],G=function(ee){return ne.indexOf(ee)!==-1};P&&(ne=P==="all"?A._module.attributes.hoverinfo.flags:P.split("+")),re.label=x.label,G("label")&&re.label&&se.push(re.label),x.hasOwnProperty("v")&&(re.value=x.v,re.valueLabel=r(re.value,j),G("value")&&se.push(re.valueLabel)),re.currentPath=f.currentPath=t.getPath(f.data),G("current path")&&!I&&se.push(re.currentPath);var X,K=[],H=function(){K.indexOf(X)===-1&&(se.push(X),K.push(X))};re.percentParent=f.percentParent=D/t.getValue(O),re.parent=f.parentString=t.getPtLabel(O),G("percent parent")&&(X=t.formatPercent(re.percentParent,j)+" of "+re.parent,H()),re.percentEntry=f.percentEntry=D/t.getValue(c),re.entry=f.entry=t.getPtLabel(c),G("percent entry")&&!I&&!f.onPathbar&&(X=t.formatPercent(re.percentEntry,j)+" of "+re.entry,H()),re.percentRoot=f.percentRoot=D/t.getValue(w),re.root=f.root=t.getPtLabel(w),G("percent root")&&!I&&(X=t.formatPercent(re.percentRoot,j)+" of "+re.root,H()),re.text=B("hovertext")||B("text"),G("text")&&(X=re.text,l.isValidTextValue(X)&&se.push(X)),U=[a(f,A,v.eventDataKeys)];var Y={trace:A,y:Q,_x0:f._x0,_x1:f._x1,_y0:f._y0,_y1:f._y1,text:se.join("
"),name:F||G("name")?A.name:void 0,color:B("hoverlabel.bgcolor")||x.color,borderColor:B("hoverlabel.bordercolor"),fontFamily:B("hoverlabel.font.family"),fontSize:B("hoverlabel.font.size"),fontColor:B("hoverlabel.font.color"),fontWeight:B("hoverlabel.font.weight"),fontStyle:B("hoverlabel.font.style"),fontVariant:B("hoverlabel.font.variant"),nameLength:B("hoverlabel.namelength"),textAlign:B("hoverlabel.align"),hovertemplate:F,hovertemplateLabels:re,eventData:U};S&&(Y.x0=$-f.rInscribed*f.rpx1,Y.x1=$+f.rInscribed*f.rpx1,Y.idealAlign=f.pxmid[0]<0?"left":"right"),M&&(Y.x=$,Y.idealAlign=$<0?"left":"right");var q=[];k.loneHover(Y,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:m,inOut_bbox:q}),U[0].bbox=q[0],i._hasHoverLabel=!0}if(M){var Z=s.select("path.surface");v.styleOne(Z,f,A,m,{hovered:!0})}i._hasHoverEvent=!0,m.emit("plotly_hover",{points:U||[a(f,A,v.eventDataKeys)],event:p.event})}},_=function(f){var u=m._fullLayout,A=m._fullData[i.index],x=p.select(this).datum();if(i._hasHoverEvent&&(f.originalEvent=p.event,m.emit("plotly_unhover",{points:[a(x,A,v.eventDataKeys)],event:p.event}),i._hasHoverEvent=!1),i._hasHoverLabel&&(k.loneUnhover(u._hoverlayer.node()),i._hasHoverLabel=!1),M){var z=s.select("path.surface");v.styleOne(z,x,A,m,{hovered:!1})}},T=function(f){var u=m._fullLayout,A=m._fullData[i.index],x=S&&(t.isHierarchyRoot(f)||t.isLeaf(f)),z=t.getPtId(f),I=t.isEntry(f)?t.findEntryWithChild(w,z):t.findEntryWithLevel(w,z),O=t.getPtId(I),D={points:[a(f,A,v.eventDataKeys)],event:p.event};x||(D.nextLevel=O);var B=e.triggerHandler(m,"plotly_"+i.type+"click",D);if(B!==!1&&u.hovermode&&(m._hoverdata=[a(f,A,v.eventDataKeys)],k.click(m,p.event)),!x&&B!==!1&&!m._dragging&&!m._transitioning){b.call("_storeDirectGUIEdit",A,u._tracePreGUI[A.uid],{level:A.level});var F={data:[{level:O}],traces:[i.index]},P={frame:{redraw:!1,duration:v.transitionTime},transition:{duration:v.transitionTime,easing:v.transitionEasing},mode:"immediate",fromcurrent:!0};k.loneUnhover(u._hoverlayer.node()),b.call("animate",m,F,P)}};s.on("mouseover",C),s.on("mouseout",_),s.on("click",T)};function a(o,s,c){for(var m=o.data.data,h={curveNumber:s.index,pointNumber:m.i,data:s._input,fullData:s},v=0;vXe.x1?2*Math.PI:0)+ee;Ye=le.rpx1Ie?2*Math.PI:0)+ee;Be={x0:Ye,x1:Ye}}else Be={rpx0:ne,rpx1:ne},k.extendFlat(Be,ve(le));else Be={rpx0:0,rpx1:0};else Be={x0:ee,x1:ee};return b(Be,Xe)}function ce(le){var Ae=K[g.getPtId(le)],Be,Xe=le.transform;if(Ae)Be=Ae;else if(Be={rpx1:le.rpx1,transform:{textPosAngle:Xe.textPosAngle,scale:0,rotate:Xe.rotate,rCenter:Xe.rCenter,x:Xe.x,y:Xe.y}},X)if(le.parent)if(Ie){var Ye=le.x1>Ie?2*Math.PI:0;Be.x0=Be.x1=Ye}else k.extendFlat(Be,ve(le));else Be.x0=Be.x1=ee;else Be.x0=Be.x1=ee;var yt=b(Be.transform.textPosAngle,le.transform.textPosAngle),gt=b(Be.rpx1,le.rpx1),Tt=b(Be.x0,le.x0),At=b(Be.x1,le.x1),$t=b(Be.transform.scale,Xe.scale),rr=b(Be.transform.rotate,Xe.rotate),_r=Xe.rCenter===0?3:Be.transform.rCenter===0?1/3:1,Xt=b(Be.transform.rCenter,Xe.rCenter),or=function(Ot){return Xt(Math.pow(Ot,_r))};return function(Ot){var vt=gt(Ot),ht=Tt(Ot),De=At(Ot),Ne=or(Ot),We=xe(vt,(ht+De)/2),Ke=yt(Ot),Je={pxmid:We,rpx1:vt,transform:{textPosAngle:Ke,rCenter:Ne,x:Xe.x,y:Xe.y}};return t(B.type,Xe,x),{transform:{targetX:Me(Je),targetY:Se(Je),scale:$t(Ot),rotate:rr(Ot),rCenter:Ne}}}}function ve(le){var Ae=le.parent,Be=K[g.getPtId(Ae)],Xe={};if(Be){var Ye=Ae.children,yt=Ye.indexOf(le),gt=Ye.length,Tt=b(Be.x0,Be.x1);Xe.x0=Tt(yt/gt),Xe.x1=Tt(yt/gt)}else Xe.x0=Xe.x1=0;return Xe}}function w(_){return p.partition().size([2*Math.PI,_.height+1])(_)}J.formatSliceLabel=function(_,T,f,u,A){var x=f.texttemplate,z=f.textinfo;if(!x&&(!z||z==="none"))return"";var I=A.separators,O=u[0],D=_.data.data,B=O.hierarchy,F=g.isHierarchyRoot(_),P=g.getParent(B,_),j=g.getValue(_);if(!x){var U=z.split("+"),$=function(q){return U.indexOf(q)!==-1},Q=[],re;if($("label")&&D.label&&Q.push(D.label),D.hasOwnProperty("v")&&$("value")&&Q.push(g.formatValue(D.v,I)),!F){$("current path")&&Q.push(g.getPath(_.data));var ne=0;$("percent parent")&&ne++,$("percent entry")&&ne++,$("percent root")&&ne++;var se=ne>1;if(ne){var G,X=function(q){re=g.formatPercent(G,I),se&&(re+=" of "+q),Q.push(re)};$("percent parent")&&!F&&(G=j/g.getValue(P),X("parent")),$("percent entry")&&(G=j/g.getValue(T),X("entry")),$("percent root")&&(G=j/g.getValue(B),X("root"))}}return $("text")&&(re=k.castOption(f,D.i,"text"),k.isValidTextValue(re)&&Q.push(re)),Q.join("
")}var K=k.castOption(f,D.i,"texttemplate");if(!K)return"";var H={};D.label&&(H.label=D.label),D.hasOwnProperty("v")&&(H.value=D.v,H.valueLabel=g.formatValue(D.v,I)),H.currentPath=g.getPath(_.data),F||(H.percentParent=j/g.getValue(P),H.percentParentLabel=g.formatPercent(H.percentParent,I),H.parent=g.getPtLabel(P)),H.percentEntry=j/g.getValue(T),H.percentEntryLabel=g.formatPercent(H.percentEntry,I),H.entry=g.getPtLabel(T),H.percentRoot=j/g.getValue(B),H.percentRootLabel=g.formatPercent(H.percentRoot,I),H.root=g.getPtLabel(B),D.hasOwnProperty("color")&&(H.color=D.color);var Y=k.castOption(f,D.i,"text");return(k.isValidTextValue(Y)||Y==="")&&(H.text=Y),H.customdata=k.castOption(f,D.i,"customdata"),k.texttemplateString({data:[H,f._meta],fallback:f.texttemplatefallback,labels:H,locale:A._d3locale,template:K})};function S(_){return _.rpx0===0&&k.isFullCircle([_.x0,_.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(_.halfangle)),_.ring/2))}function M(_){return C(_.rpx1,_.transform.textPosAngle)}function C(_,T){return[_*Math.sin(T),-_*Math.cos(T)]}}}),rN=ze({"src/traces/sunburst/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"sunburst",basePlotModule:yO(),categories:[],animatable:!0,attributes:R1(),layoutAttributes:t6(),supplyDefaults:_O(),supplyLayoutDefaults:xO(),calc:D1().calc,crossTraceCalc:D1().crossTraceCalc,plot:_2().plot,style:rA().style,colorbar:Of(),meta:{}}}}),aN=ze({"lib/sunburst.js"(J,V){"use strict";V.exports=rN()}}),nN=ze({"src/traces/treemap/base_plot.js"(J){"use strict";var V=cl();J.name="treemap",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),u0=ze({"src/traces/treemap/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),x2=ze({"src/traces/treemap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=qs(),l=Ml().attributes,e=t0(),t=R1(),n=u0(),r=Ki().extendFlat,a=Uc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.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:r({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:t.marker.colors,pattern:a,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},k("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:r({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:b({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:p({},{keys:n.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r({},e.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:e.sort,root:t.root,domain:l({name:"treemap",trace:!0,editType:"calc"})}}}),aA=ze({"src/traces/treemap/layout_attributes.js"(J,V){"use strict";V.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),iN=ze({"src/traces/treemap/defaults.js"(J,V){"use strict";var p=Nr(),b=x2(),E=Qn(),k=Ml().defaults,l=qh().handleText,e=hv().TEXTPAD,t=r0().handleMarkerDefaults,n=fl(),r=n.hasColorscale,a=n.handleDefaults;V.exports=function(s,c,m,h){function v(A,x){return p.coerce(s,c,b,A,x)}var g=v("labels"),i=v("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=v("values");w&&w.length?v("branchvalues"):v("count"),v("level"),v("maxdepth");var S=v("tiling.packing");S==="squarify"&&v("tiling.squarifyratio"),v("tiling.flip"),v("tiling.pad");var M=v("text");v("texttemplate"),v("texttemplatefallback"),c.texttemplate||v("textinfo",p.isArrayOrTypedArray(M)?"text+label":"label"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var C=v("pathbar.visible"),_="auto";l(s,c,h,v,_,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition");var T=c.textposition.indexOf("bottom")!==-1;t(s,c,h,v);var f=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;f?a(s,c,h,v,{prefix:"marker.",cLetter:"c"}):v("marker.depthfade",!(c.marker.colors||[]).length);var u=c.textfont.size*2;v("marker.pad.t",T?u/4:u),v("marker.pad.l",u/4),v("marker.pad.r",u/4),v("marker.pad.b",T?u:u/4),v("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},C&&(v("pathbar.thickness",c.pathbar.textfont.size+2*e),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),k(c,h,v),c._length=null}}}),oN=ze({"src/traces/treemap/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=aA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("treemapcolorway",l.colorway),e("extendtreemapcolors")}}}),nA=ze({"src/traces/treemap/calc.js"(J){"use strict";var V=D1();J.calc=function(p,b){return V.calc(p,b)},J.crossTraceCalc=function(p){return V._runCrossTraceCalc("treemap",p)}}}),iA=ze({"src/traces/treemap/flip_tree.js"(J,V){"use strict";V.exports=function p(b,E,k){var l;k.swapXY&&(l=b.x0,b.x0=b.y0,b.y0=l,l=b.x1,b.x1=b.y1,b.y1=l),k.flipX&&(l=b.x0,b.x0=E[0]-b.x1,b.x1=E[0]-l),k.flipY&&(l=b.y0,b.y0=E[1]-b.y1,b.y1=E[1]-l);var e=b.children;if(e)for(var t=0;t0)for(var u=0;u").join(" ")||"";var se=b.ensureSingle(re,"g","slicetext"),G=b.ensureSingle(se,"text","",function(K){K.attr("data-notex",1)}),X=b.ensureUniformFontSize(s,n.determineTextFont(B,Q,O.font,{onPathbar:!0}));G.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(E.font,X).call(k.convertToTspans,s),Q.textBB=E.bBox(G.node()),Q.transform=_(Q,{fontSize:X.size,onPathbar:!0}),Q.transform.fontSize=X.size,f?G.transition().attrTween("transform",function(K){var H=x(K,a,z,[i,w]);return function(Y){return T(H(Y))}}):G.attr("transform",T(Q))})}}}),lN=ze({"src/traces/treemap/plot_one.js"(J,V){"use strict";var p=ci(),b=(l0(),Po(_v)).interpolate,E=up(),k=Nr(),l=hv().TEXTPAD,e=Xv(),t=e.toMoveInsideBar,n=eh(),r=n.recordMinTextSize,a=u0(),o=sN();function s(c){return E.isHierarchyRoot(c)?"":E.getPtId(c)}V.exports=function(m,h,v,g,i){var w=m._fullLayout,S=h[0],M=S.trace,C=M.type,_=C==="icicle",T=S.hierarchy,f=E.findEntryWithLevel(T,M.level),u=p.select(v),A=u.selectAll("g.pathbar"),x=u.selectAll("g.slice");if(!f){A.remove(),x.remove();return}var z=E.isHierarchyRoot(f),I=!w.uniformtext.mode&&E.hasTransition(g),O=E.getMaxDepth(M),D=function(Xt){return Xt.data.depth-f.data.depth-1?j+Q:-($+Q):0,ne={x0:U,x1:U,y0:re,y1:re+$},se=function(Xt,or,Ot){var vt=M.tiling.pad,ht=function(Ke){return Ke-vt<=or.x0},De=function(Ke){return Ke+vt>=or.x1},Ne=function(Ke){return Ke-vt<=or.y0},We=function(Ke){return Ke+vt>=or.y1};return Xt.x0===or.x0&&Xt.x1===or.x1&&Xt.y0===or.y0&&Xt.y1===or.y1?{x0:Xt.x0,x1:Xt.x1,y0:Xt.y0,y1:Xt.y1}:{x0:ht(Xt.x0-vt)?0:De(Xt.x0-vt)?Ot[0]:Xt.x0,x1:ht(Xt.x1+vt)?0:De(Xt.x1+vt)?Ot[0]:Xt.x1,y0:Ne(Xt.y0-vt)?0:We(Xt.y0-vt)?Ot[1]:Xt.y0,y1:Ne(Xt.y1+vt)?0:We(Xt.y1+vt)?Ot[1]:Xt.y1}},G=null,X={},K={},H=null,Y=function(Xt,or){return or?X[s(Xt)]:K[s(Xt)]},q=function(Xt,or,Ot,vt){if(or)return X[s(T)]||ne;var ht=K[M.level]||Ot;return D(Xt)?se(Xt,ht,vt):{}};S.hasMultipleRoots&&z&&O++,M._maxDepth=O,M._backgroundColor=w.paper_bgcolor,M._entryDepth=f.data.depth,M._atRootLevel=z;var Z=-P/2+B.l+B.w*(F.x[1]+F.x[0])/2,ee=-j/2+B.t+B.h*(1-(F.y[1]+F.y[0])/2),ae=function(Xt){return Z+Xt},he=function(Xt){return ee+Xt},xe=he(0),we=ae(0),Me=function(Xt){return we+Xt},Se=function(Xt){return xe+Xt};function Ie(Xt,or){return Xt+","+or}var Ve=Me(0),Ge=function(Xt){Xt.x=Math.max(Ve,Xt.x)},ke=M.pathbar.edgeshape,_e=function(Xt){var or=Me(Math.max(Math.min(Xt.x0,Xt.x0),0)),Ot=Me(Math.min(Math.max(Xt.x1,Xt.x1),U)),vt=Se(Xt.y0),ht=Se(Xt.y1),De=$/2,Ne={},We={};Ne.x=or,We.x=Ot,Ne.y=We.y=(vt+ht)/2;var Ke={x:or,y:vt},Je={x:Ot,y:vt},et={x:Ot,y:ht},Mt={x:or,y:ht};return ke===">"?(Ke.x-=De,Je.x-=De,et.x-=De,Mt.x-=De):ke==="/"?(et.x-=De,Mt.x-=De,Ne.x-=De/2,We.x-=De/2):ke==="\\"?(Ke.x-=De,Je.x-=De,Ne.x-=De/2,We.x-=De/2):ke==="<"&&(Ne.x-=De,We.x-=De),Ge(Ke),Ge(Mt),Ge(Ne),Ge(Je),Ge(et),Ge(We),"M"+Ie(Ke.x,Ke.y)+"L"+Ie(Je.x,Je.y)+"L"+Ie(We.x,We.y)+"L"+Ie(et.x,et.y)+"L"+Ie(Mt.x,Mt.y)+"L"+Ie(Ne.x,Ne.y)+"Z"},ce=M[_?"tiling":"marker"].pad,ve=function(Xt){return M.textposition.indexOf(Xt)!==-1},le=ve("top"),Ae=ve("left"),Be=ve("right"),Xe=ve("bottom"),Ye=function(Xt){var or=ae(Xt.x0),Ot=ae(Xt.x1),vt=he(Xt.y0),ht=he(Xt.y1),De=Ot-or,Ne=ht-vt;if(!De||!Ne)return"";var We=M.marker.cornerradius||0,Ke=Math.min(We,De/2,Ne/2);Ke&&Xt.data&&Xt.data.data&&Xt.data.data.label&&(le&&(Ke=Math.min(Ke,ce.t)),Ae&&(Ke=Math.min(Ke,ce.l)),Be&&(Ke=Math.min(Ke,ce.r)),Xe&&(Ke=Math.min(Ke,ce.b)));var Je=function(et,Mt){return Ke?"a"+Ie(Ke,Ke)+" 0 0 1 "+Ie(et,Mt):""};return"M"+Ie(or,vt+Ke)+Je(Ke,-Ke)+"L"+Ie(Ot-Ke,vt)+Je(Ke,Ke)+"L"+Ie(Ot,ht-Ke)+Je(-Ke,Ke)+"L"+Ie(or+Ke,ht)+Je(-Ke,-Ke)+"Z"},yt=function(Xt,or){var Ot=Xt.x0,vt=Xt.x1,ht=Xt.y0,De=Xt.y1,Ne=Xt.textBB,We=le||or.isHeader&&!Xe,Ke=We?"start":Xe?"end":"middle",Je=ve("right"),et=ve("left")||or.onPathbar,Mt=et?-1:Je?1:0;if(or.isHeader){if(Ot+=(_?ce:ce.l)-l,vt-=(_?ce:ce.r)-l,Ot>=vt){var pt=(Ot+vt)/2;Ot=pt,vt=pt}var Pt;Xe?(Pt=De-(_?ce:ce.b),ht-1,flipY:F.tiling.flip.indexOf("y")>-1,pad:{inner:F.tiling.pad,top:F.marker.pad.t,left:F.marker.pad.l,right:F.marker.pad.r,bottom:F.marker.pad.b}}),re=Q.descendants(),ne=1/0,se=-1/0;re.forEach(function(Y){var q=Y.depth;q>=F._maxDepth?(Y.x0=Y.x1=(Y.x0+Y.x1)/2,Y.y0=Y.y1=(Y.y0+Y.y1)/2):(ne=Math.min(ne,q),se=Math.max(se,q))}),v=v.data(re,n.getPtId),F._maxVisibleLayers=isFinite(se)?se-ne+1:0,v.enter().append("g").classed("slice",!0),u(v,o,I,[i,w],C),v.order();var G=null;if(f&&z){var X=n.getPtId(z);v.each(function(Y){G===null&&n.getPtId(Y)===X&&(G={x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1})})}var K=function(){return G||{x0:0,x1:i,y0:0,y1:w}},H=v;return f&&(H=H.transition().each("end",function(){var Y=p.select(this);n.setSliceCursor(Y,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),H.each(function(Y){var q=n.isHeader(Y,F);Y._x0=S(Y.x0),Y._x1=S(Y.x1),Y._y0=M(Y.y0),Y._y1=M(Y.y1),Y._hoverX=S(Y.x1-F.marker.pad.r),Y._hoverY=M(U?Y.y1-F.marker.pad.b/2:Y.y0+F.marker.pad.t/2);var Z=p.select(this),ee=b.ensureSingle(Z,"path","surface",function(Se){Se.style("pointer-events",O?"none":"all")});f?ee.transition().attrTween("d",function(Se){var Ie=A(Se,o,K(),[i,w]);return function(Ve){return C(Ie(Ve))}}):ee.attr("d",C),Z.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),ee.call(e,Y,F,c,{hovered:!1}),Y.x0===Y.x1||Y.y0===Y.y1?Y._text="":q?Y._text=$?"":n.getPtLabel(Y)||"":Y._text=a(Y,h,F,m,D)||"";var ae=b.ensureSingle(Z,"g","slicetext"),he=b.ensureSingle(ae,"text","",function(Se){Se.attr("data-notex",1)}),xe=b.ensureUniformFontSize(c,n.determineTextFont(F,Y,D.font)),we=Y._text||" ",Me=q&&we.indexOf("
")===-1;he.text(we).classed("slicetext",!0).attr("text-anchor",j?"end":P||Me?"start":"middle").call(E.font,xe).call(k.convertToTspans,c),Y.textBB=E.bBox(he.node()),Y.transform=_(Y,{fontSize:xe.size,isHeader:q}),Y.transform.fontSize=xe.size,f?he.transition().attrTween("transform",function(Se){var Ie=x(Se,o,K(),[i,w]);return function(Ve){return T(Ie(Ve))}}):he.attr("transform",T(Y))}),G}}}),cN=ze({"src/traces/treemap/plot.js"(J,V){"use strict";var p=sA(),b=uN();V.exports=function(k,l,e,t){return p(k,l,e,t,{type:"treemap",drawDescendants:b})}}}),fN=ze({"src/traces/treemap/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"treemap",basePlotModule:nN(),categories:[],animatable:!0,attributes:x2(),layoutAttributes:aA(),supplyDefaults:iN(),supplyLayoutDefaults:oN(),calc:nA().calc,crossTraceCalc:nA().crossTraceCalc,plot:cN(),style:b2().style,colorbar:Of(),meta:{}}}}),hN=ze({"lib/treemap.js"(J,V){"use strict";V.exports=fN()}}),dN=ze({"src/traces/icicle/base_plot.js"(J){"use strict";var V=cl();J.name="icicle",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),lA=ze({"src/traces/icicle/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=qs(),l=Ml().attributes,e=t0(),t=R1(),n=x2(),r=u0(),a=Ki().extendFlat,o=Uc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:n.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:a({colors:t.marker.colors,line:t.marker.line,pattern:o,editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:n.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:b({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:p({},{keys:r.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n.outsidetextfont,textposition:n.textposition,sort:e.sort,root:t.root,domain:l({name:"icicle",trace:!0,editType:"calc"})}}}),uA=ze({"src/traces/icicle/layout_attributes.js"(J,V){"use strict";V.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),pN=ze({"src/traces/icicle/defaults.js"(J,V){"use strict";var p=Nr(),b=lA(),E=Qn(),k=Ml().defaults,l=qh().handleText,e=hv().TEXTPAD,t=r0().handleMarkerDefaults,n=fl(),r=n.hasColorscale,a=n.handleDefaults;V.exports=function(s,c,m,h){function v(T,f){return p.coerce(s,c,b,T,f)}var g=v("labels"),i=v("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=v("values");w&&w.length?v("branchvalues"):v("count"),v("level"),v("maxdepth"),v("tiling.orientation"),v("tiling.flip"),v("tiling.pad");var S=v("text");v("texttemplate"),v("texttemplatefallback"),c.texttemplate||v("textinfo",p.isArrayOrTypedArray(S)?"text+label":"label"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var M=v("pathbar.visible"),C="auto";l(s,c,h,v,C,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition"),t(s,c,h,v);var _=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;_&&a(s,c,h,v,{prefix:"marker.",cLetter:"c"}),v("leaf.opacity",_?1:.7),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},M&&(v("pathbar.thickness",c.pathbar.textfont.size+2*e),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),k(c,h,v),c._length=null}}}),vN=ze({"src/traces/icicle/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=uA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("iciclecolorway",l.colorway),e("extendiciclecolors")}}}),cA=ze({"src/traces/icicle/calc.js"(J){"use strict";var V=D1();J.calc=function(p,b){return V.calc(p,b)},J.crossTraceCalc=function(p){return V._runCrossTraceCalc("icicle",p)}}}),mN=ze({"src/traces/icicle/partition.js"(J,V){"use strict";var p=I1(),b=iA();V.exports=function(k,l,e){var t=e.flipX,n=e.flipY,r=e.orientation==="h",a=e.maxDepth,o=l[0],s=l[1];a&&(o=(k.height+1)*l[0]/Math.min(k.height+1,a),s=(k.height+1)*l[1]/Math.min(k.height+1,a));var c=p.partition().padding(e.pad.inner).size(r?[l[1],o]:[l[0],s])(k);return(r||t||n)&&b(c,l,{swapXY:r,flipX:t,flipY:n}),c}}}),fA=ze({"src/traces/icicle/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=Nr(),k=eh().resizeText,l=y2();function e(n){var r=n._fullLayout._iciclelayer.selectAll(".trace");k(n,r,"icicle"),r.each(function(a){var o=p.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){p.select(this).call(t,m,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(a,m,"marker.line.color")||b.defaultLine,v=E.castOption(a,m,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",v).call(b.stroke,h).style("opacity",c?a.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),gN=ze({"src/traces/icicle/draw_descendants.js"(J,V){"use strict";var p=ci(),b=Nr(),E=$i(),k=Cs(),l=mN(),e=fA().styleOne,t=u0(),n=up(),r=$1(),a=_2().formatSliceLabel,o=!1;V.exports=function(c,m,h,v,g){var i=g.width,w=g.height,S=g.viewX,M=g.viewY,C=g.pathSlice,_=g.toMoveInsideSlice,T=g.strTransform,f=g.hasTransition,u=g.handleSlicesExit,A=g.makeUpdateSliceInterpolator,x=g.makeUpdateTextInterpolator,z=g.prevEntry,I={},O=c._context.staticPlot,D=c._fullLayout,B=m[0],F=B.trace,P=F.textposition.indexOf("left")!==-1,j=F.textposition.indexOf("right")!==-1,U=F.textposition.indexOf("bottom")!==-1,$=l(h,[i,w],{flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1,orientation:F.tiling.orientation,pad:{inner:F.tiling.pad},maxDepth:F._maxDepth}),Q=$.descendants(),re=1/0,ne=-1/0;Q.forEach(function(H){var Y=H.depth;Y>=F._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(re=Math.min(re,Y),ne=Math.max(ne,Y))}),v=v.data(Q,n.getPtId),F._maxVisibleLayers=isFinite(ne)?ne-re+1:0,v.enter().append("g").classed("slice",!0),u(v,o,I,[i,w],C),v.order();var se=null;if(f&&z){var G=n.getPtId(z);v.each(function(H){se===null&&n.getPtId(H)===G&&(se={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var X=function(){return se||{x0:0,x1:i,y0:0,y1:w}},K=v;return f&&(K=K.transition().each("end",function(){var H=p.select(this);n.setSliceCursor(H,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(H){H._x0=S(H.x0),H._x1=S(H.x1),H._y0=M(H.y0),H._y1=M(H.y1),H._hoverX=S(H.x1-F.tiling.pad),H._hoverY=M(U?H.y1-F.tiling.pad/2:H.y0+F.tiling.pad/2);var Y=p.select(this),q=b.ensureSingle(Y,"path","surface",function(he){he.style("pointer-events",O?"none":"all")});f?q.transition().attrTween("d",function(he){var xe=A(he,o,X(),[i,w],{orientation:F.tiling.orientation,flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1});return function(we){return C(xe(we))}}):q.attr("d",C),Y.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),q.call(e,H,F,c,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":H._text=a(H,h,F,m,D)||"";var Z=b.ensureSingle(Y,"g","slicetext"),ee=b.ensureSingle(Z,"text","",function(he){he.attr("data-notex",1)}),ae=b.ensureUniformFontSize(c,n.determineTextFont(F,H,D.font));ee.text(H._text||" ").classed("slicetext",!0).attr("text-anchor",j?"end":P?"start":"middle").call(E.font,ae).call(k.convertToTspans,c),H.textBB=E.bBox(ee.node()),H.transform=_(H,{fontSize:ae.size}),H.transform.fontSize=ae.size,f?ee.transition().attrTween("transform",function(he){var xe=x(he,o,X(),[i,w]);return function(we){return T(xe(we))}}):ee.attr("transform",T(H))}),se}}}),yN=ze({"src/traces/icicle/plot.js"(J,V){"use strict";var p=sA(),b=gN();V.exports=function(k,l,e,t){return p(k,l,e,t,{type:"icicle",drawDescendants:b})}}}),_N=ze({"src/traces/icicle/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"icicle",basePlotModule:dN(),categories:[],animatable:!0,attributes:lA(),layoutAttributes:uA(),supplyDefaults:pN(),supplyLayoutDefaults:vN(),calc:cA().calc,crossTraceCalc:cA().crossTraceCalc,plot:yN(),style:fA().style,colorbar:Of(),meta:{}}}}),xN=ze({"lib/icicle.js"(J,V){"use strict";V.exports=_N()}}),bN=ze({"src/traces/funnelarea/base_plot.js"(J){"use strict";var V=cl();J.name="funnelarea",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),hA=ze({"src/traces/funnelarea/attributes.js"(J,V){"use strict";var p=t0(),b=ws(),E=Ml().attributes,{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=Ki().extendFlat;V.exports={labels:p.labels,label0:p.label0,dlabel:p.dlabel,values:p.values,marker:{colors:p.marker.colors,line:{color:t({},p.marker.line.color,{dflt:null}),width:t({},p.marker.line.width,{dflt:1}),editType:"calc"},pattern:p.marker.pattern,editType:"calc"},text:p.text,hovertext:p.hovertext,scalegroup:t({},p.scalegroup,{}),textinfo:t({},p.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:t({},b.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:k({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:t({},p.textposition,{values:["inside","none"],dflt:"inside"}),textfont:p.textfont,insidetextfont:p.insidetextfont,title:{text:p.title.text,font:p.title.font,position:t({},p.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:E({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"}}}}),dA=ze({"src/traces/funnelarea/layout_attributes.js"(J,V){"use strict";var p=qb().hiddenlabels;V.exports={hiddenlabels:p,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),wN=ze({"src/traces/funnelarea/defaults.js"(J,V){"use strict";var p=Nr(),b=hA(),E=Ml().defaults,k=qh().handleText,l=r0().handleLabelsAndValues,e=r0().handleMarkerDefaults;V.exports=function(n,r,a,o){function s(C,_){return p.coerce(n,r,b,C,_)}var c=s("labels"),m=s("values"),h=l(c,m),v=h.len;if(r._hasLabels=h.hasLabels,r._hasValues=h.hasValues,!r._hasLabels&&r._hasValues&&(s("label0"),s("dlabel")),!v){r.visible=!1;return}r._length=v,e(n,r,o,s),s("scalegroup");var g=s("text"),i=s("texttemplate");s("texttemplatefallback");var w;if(i||(w=s("textinfo",Array.isArray(g)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),i||w&&w!=="none"){var S=s("textposition");k(n,r,o,s,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else w==="none"&&s("textposition","none");E(r,o,s);var M=s("title.text");M&&(s("title.position"),p.coerceFont(s,"title.font",o.font)),s("aspectratio"),s("baseratio")}}}),TN=ze({"src/traces/funnelarea/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=dA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("hiddenlabels"),e("funnelareacolorway",l.colorway),e("extendfunnelareacolors")}}}),pA=ze({"src/traces/funnelarea/calc.js"(J,V){"use strict";var p=ug();function b(k,l){return p.calc(k,l)}function E(k){p.crossTraceCalc(k,{type:"funnelarea"})}V.exports={calc:b,crossTraceCalc:E}}}),AN=ze({"src/traces/funnelarea/plot.js"(J,V){"use strict";var p=ci(),b=$i(),E=Nr(),k=E.strScale,l=E.strTranslate,e=Cs(),t=Xv(),n=t.toMoveInsideBar,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=lv(),c=Vb(),m=c.attachFxHandlers,h=c.determineInsideTextFont,v=c.layoutAreas,g=c.prerenderTitles,i=c.positionTitleOutside,w=c.formatSliceLabel;V.exports=function(T,f){var u=T._context.staticPlot,A=T._fullLayout;o("funnelarea",A),g(f,T),v(f,A._size),E.makeTraceGroups(A._funnelarealayer,f,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace;C(x),z.each(function(){var D=p.select(this).selectAll("g.slice").data(x);D.enter().append("g").classed("slice",!0),D.exit().remove(),D.each(function(F,P){if(F.hidden){p.select(this).selectAll("path,g").remove();return}F.pointNumber=F.i,F.curveNumber=O.index;var j=I.cx,U=I.cy,$=p.select(this),Q=$.selectAll("path.surface").data([F]);Q.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),$.call(m,T,x);var re="M"+(j+F.TR[0])+","+(U+F.TR[1])+S(F.TR,F.BR)+S(F.BR,F.BL)+S(F.BL,F.TL)+"Z";Q.attr("d",re),w(T,F,I);var ne=s.castOption(O.textposition,F.pts),se=$.selectAll("g.slicetext").data(F.text&&ne!=="none"?[0]:[]);se.enter().append("g").classed("slicetext",!0),se.exit().remove(),se.each(function(){var G=E.ensureSingle(p.select(this),"text","",function(ae){ae.attr("data-notex",1)}),X=E.ensureUniformFontSize(T,h(O,F,A.font));G.text(F.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(b.font,X).call(e.convertToTspans,T);var K=b.bBox(G.node()),H,Y,q,Z=Math.min(F.BL[1],F.BR[1])+U,ee=Math.max(F.TL[1],F.TR[1])+U;Y=Math.max(F.TL[0],F.BL[0])+j,q=Math.min(F.TR[0],F.BR[0])+j,H=n(Y,q,Z,ee,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),H.fontSize=X.size,a(O.type,H,A),x[P].transform=H,E.setTransormAndDisplay(G,H)})});var B=p.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);B.enter().append("g").classed("titletext",!0),B.exit().remove(),B.each(function(){var F=E.ensureSingle(p.select(this),"text","",function(U){U.attr("data-notex",1)}),P=O.title.text;O._meta&&(P=E.templateString(P,O._meta)),F.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(b.font,O.title.font).call(e.convertToTspans,T);var j=i(I,A._size);F.attr("transform",l(j.x,j.y)+k(Math.min(1,j.scale))+l(j.tx,j.ty))})})})};function S(_,T){var f=T[0]-_[0],u=T[1]-_[1];return"l"+f+","+u}function M(_,T){return[.5*(_[0]+T[0]),.5*(_[1]+T[1])]}function C(_){if(!_.length)return;var T=_[0],f=T.trace,u=f.aspectratio,A=f.baseratio;A>.999&&(A=.999);var x=Math.pow(A,2),z=T.vTotal,I=z*x/(1-x),O=z,D=I/z;function B(){var he=Math.sqrt(D);return{x:he,y:-he}}function F(){var he=B();return[he.x,he.y]}var P,j=[];j.push(F());var U,$;for(U=_.length-1;U>-1;U--)if($=_[U],!$.hidden){var Q=$.v/O;D+=Q,j.push(F())}var re=1/0,ne=-1/0;for(U=0;U-1;U--)if($=_[U],!$.hidden){Z+=1;var ee=j[Z][0],ae=j[Z][1];$.TL=[-ee,ae],$.TR=[ee,ae],$.BL=Y,$.BR=q,$.pxmid=M($.TR,$.BR),Y=$.TL,q=$.TR}}}}),MN=ze({"src/traces/funnelarea/style.js"(J,V){"use strict";var p=ci(),b=Zm(),E=eh().resizeText;V.exports=function(l){var e=l._fullLayout._funnelarealayer.selectAll(".trace");E(l,e,"funnelarea"),e.each(function(t){var n=t[0],r=n.trace,a=p.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){p.select(this).call(b,o,r,l)})})}}}),SN=ze({"src/traces/funnelarea/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"funnelarea",basePlotModule:bN(),categories:["pie-like","funnelarea","showLegend"],attributes:hA(),layoutAttributes:dA(),supplyDefaults:wN(),supplyLayoutDefaults:TN(),calc:pA().calc,crossTraceCalc:pA().crossTraceCalc,plot:AN(),style:MN(),styleOne:Zm(),meta:{}}}}),EN=ze({"lib/funnelarea.js"(J,V){"use strict";V.exports=SN()}}),df=ze({"stackgl_modules/index.js"(J,V){"use strict";(function(){var p={1964:function(l,e,t){l.exports={alpha_shape:t(3502),convex_hull:t(7352),delaunay_triangulate:t(7642),gl_cone3d:t(6405),gl_error3d:t(9165),gl_line3d:t(5714),gl_mesh3d:t(7201),gl_plot3d:t(4100),gl_scatter3d:t(8418),gl_streamtube3d:t(7815),gl_surface3d:t(9499),ndarray:t(9618),ndarray_linear_interpolate:t(4317)}},4793:function(l,e,t){"use strict";var n,r=t(7507),a=t(3778),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=h,n=u,e.IS=50;var s=2147483647;n=s,h.TYPED_ARRAY_SUPPORT=c(),!h.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 c(){try{var ke=new Uint8Array(1),_e={foo:function(){return 42}};return Object.setPrototypeOf(_e,Uint8Array.prototype),Object.setPrototypeOf(ke,_e),ke.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function m(ke){if(ke>s)throw new RangeError('The value "'+ke+'" is invalid for option "size"');var _e=new Uint8Array(ke);return Object.setPrototypeOf(_e,h.prototype),_e}function h(ke,_e,ce){if(typeof ke=="number"){if(typeof _e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(ke)}return v(ke,_e,ce)}h.poolSize=8192;function v(ke,_e,ce){if(typeof ke=="string")return S(ke,_e);if(ArrayBuffer.isView(ke))return C(ke);if(ke==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke);if(Ie(ke,ArrayBuffer)||ke&&Ie(ke.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ke,SharedArrayBuffer)||ke&&Ie(ke.buffer,SharedArrayBuffer)))return _(ke,_e,ce);if(typeof ke=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ve=ke.valueOf&&ke.valueOf();if(ve!=null&&ve!==ke)return h.from(ve,_e,ce);var le=T(ke);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ke[Symbol.toPrimitive]=="function")return h.from(ke[Symbol.toPrimitive]("string"),_e,ce);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}h.from=function(ke,_e,ce){return v(ke,_e,ce)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function g(ke){if(typeof ke!="number")throw new TypeError('"size" argument must be of type number');if(ke<0)throw new RangeError('The value "'+ke+'" is invalid for option "size"')}function i(ke,_e,ce){return g(ke),ke<=0?m(ke):_e!==void 0?typeof ce=="string"?m(ke).fill(_e,ce):m(ke).fill(_e):m(ke)}h.alloc=function(ke,_e,ce){return i(ke,_e,ce)};function w(ke){return g(ke),m(ke<0?0:f(ke)|0)}h.allocUnsafe=function(ke){return w(ke)},h.allocUnsafeSlow=function(ke){return w(ke)};function S(ke,_e){if((typeof _e!="string"||_e==="")&&(_e="utf8"),!h.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);var ce=A(ke,_e)|0,ve=m(ce),le=ve.write(ke,_e);return le!==ce&&(ve=ve.slice(0,le)),ve}function M(ke){for(var _e=ke.length<0?0:f(ke.length)|0,ce=m(_e),ve=0;ve<_e;ve+=1)ce[ve]=ke[ve]&255;return ce}function C(ke){if(Ie(ke,Uint8Array)){var _e=new Uint8Array(ke);return _(_e.buffer,_e.byteOffset,_e.byteLength)}return M(ke)}function _(ke,_e,ce){if(_e<0||ke.byteLength<_e)throw new RangeError('"offset" is outside of buffer bounds');if(ke.byteLength<_e+(ce||0))throw new RangeError('"length" is outside of buffer bounds');var ve;return _e===void 0&&ce===void 0?ve=new Uint8Array(ke):ce===void 0?ve=new Uint8Array(ke,_e):ve=new Uint8Array(ke,_e,ce),Object.setPrototypeOf(ve,h.prototype),ve}function T(ke){if(h.isBuffer(ke)){var _e=f(ke.length)|0,ce=m(_e);return ce.length===0||ke.copy(ce,0,0,_e),ce}if(ke.length!==void 0)return typeof ke.length!="number"||Ve(ke.length)?m(0):M(ke);if(ke.type==="Buffer"&&Array.isArray(ke.data))return M(ke.data)}function f(ke){if(ke>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return ke|0}function u(ke){return+ke!=ke&&(ke=0),h.alloc(+ke)}h.isBuffer=function(_e){return _e!=null&&_e._isBuffer===!0&&_e!==h.prototype},h.compare=function(_e,ce){if(Ie(_e,Uint8Array)&&(_e=h.from(_e,_e.offset,_e.byteLength)),Ie(ce,Uint8Array)&&(ce=h.from(ce,ce.offset,ce.byteLength)),!h.isBuffer(_e)||!h.isBuffer(ce))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_e===ce)return 0;for(var ve=_e.length,le=ce.length,Ae=0,Be=Math.min(ve,le);Aele.length?h.from(Be).copy(le,Ae):Uint8Array.prototype.set.call(le,Be,Ae);else if(h.isBuffer(Be))Be.copy(le,Ae);else throw new TypeError('"list" argument must be an Array of Buffers');Ae+=Be.length}return le};function A(ke,_e){if(h.isBuffer(ke))return ke.length;if(ArrayBuffer.isView(ke)||Ie(ke,ArrayBuffer))return ke.byteLength;if(typeof ke!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ke);var ce=ke.length,ve=arguments.length>2&&arguments[2]===!0;if(!ve&&ce===0)return 0;for(var le=!1;;)switch(_e){case"ascii":case"latin1":case"binary":return ce;case"utf8":case"utf-8":return he(ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce*2;case"hex":return ce>>>1;case"base64":return Me(ke).length;default:if(le)return ve?-1:he(ke).length;_e=(""+_e).toLowerCase(),le=!0}}h.byteLength=A;function x(ke,_e,ce){var ve=!1;if((_e===void 0||_e<0)&&(_e=0),_e>this.length||((ce===void 0||ce>this.length)&&(ce=this.length),ce<=0)||(ce>>>=0,_e>>>=0,ce<=_e))return"";for(ke||(ke="utf8");;)switch(ke){case"hex":return G(this,_e,ce);case"utf8":case"utf-8":return $(this,_e,ce);case"ascii":return ne(this,_e,ce);case"latin1":case"binary":return se(this,_e,ce);case"base64":return U(this,_e,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,_e,ce);default:if(ve)throw new TypeError("Unknown encoding: "+ke);ke=(ke+"").toLowerCase(),ve=!0}}h.prototype._isBuffer=!0;function z(ke,_e,ce){var ve=ke[_e];ke[_e]=ke[ce],ke[ce]=ve}h.prototype.swap16=function(){var _e=this.length;if(_e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ce=0;ce<_e;ce+=2)z(this,ce,ce+1);return this},h.prototype.swap32=function(){var _e=this.length;if(_e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ce=0;ce<_e;ce+=4)z(this,ce,ce+3),z(this,ce+1,ce+2);return this},h.prototype.swap64=function(){var _e=this.length;if(_e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ce=0;ce<_e;ce+=8)z(this,ce,ce+7),z(this,ce+1,ce+6),z(this,ce+2,ce+5),z(this,ce+3,ce+4);return this},h.prototype.toString=function(){var _e=this.length;return _e===0?"":arguments.length===0?$(this,0,_e):x.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(_e){if(!h.isBuffer(_e))throw new TypeError("Argument must be a Buffer");return this===_e?!0:h.compare(this,_e)===0},h.prototype.inspect=function(){var _e="",ce=e.IS;return _e=this.toString("hex",0,ce).replace(/(.{2})/g,"$1 ").trim(),this.length>ce&&(_e+=" ... "),""},o&&(h.prototype[o]=h.prototype.inspect),h.prototype.compare=function(_e,ce,ve,le,Ae){if(Ie(_e,Uint8Array)&&(_e=h.from(_e,_e.offset,_e.byteLength)),!h.isBuffer(_e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _e);if(ce===void 0&&(ce=0),ve===void 0&&(ve=_e?_e.length:0),le===void 0&&(le=0),Ae===void 0&&(Ae=this.length),ce<0||ve>_e.length||le<0||Ae>this.length)throw new RangeError("out of range index");if(le>=Ae&&ce>=ve)return 0;if(le>=Ae)return-1;if(ce>=ve)return 1;if(ce>>>=0,ve>>>=0,le>>>=0,Ae>>>=0,this===_e)return 0;for(var Be=Ae-le,Xe=ve-ce,Ye=Math.min(Be,Xe),yt=this.slice(le,Ae),gt=_e.slice(ce,ve),Tt=0;Tt2147483647?ce=2147483647:ce<-2147483648&&(ce=-2147483648),ce=+ce,Ve(ce)&&(ce=le?0:ke.length-1),ce<0&&(ce=ke.length+ce),ce>=ke.length){if(le)return-1;ce=ke.length-1}else if(ce<0)if(le)ce=0;else return-1;if(typeof _e=="string"&&(_e=h.from(_e,ve)),h.isBuffer(_e))return _e.length===0?-1:O(ke,_e,ce,ve,le);if(typeof _e=="number")return _e=_e&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(ke,_e,ce):Uint8Array.prototype.lastIndexOf.call(ke,_e,ce):O(ke,[_e],ce,ve,le);throw new TypeError("val must be string, number or Buffer")}function O(ke,_e,ce,ve,le){var Ae=1,Be=ke.length,Xe=_e.length;if(ve!==void 0&&(ve=String(ve).toLowerCase(),ve==="ucs2"||ve==="ucs-2"||ve==="utf16le"||ve==="utf-16le")){if(ke.length<2||_e.length<2)return-1;Ae=2,Be/=2,Xe/=2,ce/=2}function Ye($t,rr){return Ae===1?$t[rr]:$t.readUInt16BE(rr*Ae)}var yt;if(le){var gt=-1;for(yt=ce;ytBe&&(ce=Be-Xe),yt=ce;yt>=0;yt--){for(var Tt=!0,At=0;Atle&&(ve=le)):ve=le;var Ae=_e.length;ve>Ae/2&&(ve=Ae/2);for(var Be=0;Be>>0,isFinite(ve)?(ve=ve>>>0,le===void 0&&(le="utf8")):(le=ve,ve=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ae=this.length-ce;if((ve===void 0||ve>Ae)&&(ve=Ae),_e.length>0&&(ve<0||ce<0)||ce>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var Be=!1;;)switch(le){case"hex":return D(this,_e,ce,ve);case"utf8":case"utf-8":return B(this,_e,ce,ve);case"ascii":case"latin1":case"binary":return F(this,_e,ce,ve);case"base64":return P(this,_e,ce,ve);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,_e,ce,ve);default:if(Be)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),Be=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(ke,_e,ce){return _e===0&&ce===ke.length?r.fromByteArray(ke):r.fromByteArray(ke.slice(_e,ce))}function $(ke,_e,ce){ce=Math.min(ke.length,ce);for(var ve=[],le=_e;le239?4:Ae>223?3:Ae>191?2:1;if(le+Xe<=ce){var Ye,yt,gt,Tt;switch(Xe){case 1:Ae<128&&(Be=Ae);break;case 2:Ye=ke[le+1],(Ye&192)===128&&(Tt=(Ae&31)<<6|Ye&63,Tt>127&&(Be=Tt));break;case 3:Ye=ke[le+1],yt=ke[le+2],(Ye&192)===128&&(yt&192)===128&&(Tt=(Ae&15)<<12|(Ye&63)<<6|yt&63,Tt>2047&&(Tt<55296||Tt>57343)&&(Be=Tt));break;case 4:Ye=ke[le+1],yt=ke[le+2],gt=ke[le+3],(Ye&192)===128&&(yt&192)===128&&(gt&192)===128&&(Tt=(Ae&15)<<18|(Ye&63)<<12|(yt&63)<<6|gt&63,Tt>65535&&Tt<1114112&&(Be=Tt))}}Be===null?(Be=65533,Xe=1):Be>65535&&(Be-=65536,ve.push(Be>>>10&1023|55296),Be=56320|Be&1023),ve.push(Be),le+=Xe}return re(ve)}var Q=4096;function re(ke){var _e=ke.length;if(_e<=Q)return String.fromCharCode.apply(String,ke);for(var ce="",ve=0;ve<_e;)ce+=String.fromCharCode.apply(String,ke.slice(ve,ve+=Q));return ce}function ne(ke,_e,ce){var ve="";ce=Math.min(ke.length,ce);for(var le=_e;leve)&&(ce=ve);for(var le="",Ae=_e;Aeve&&(_e=ve),ce<0?(ce+=ve,ce<0&&(ce=0)):ce>ve&&(ce=ve),ce<_e&&(ce=_e);var le=this.subarray(_e,ce);return Object.setPrototypeOf(le,h.prototype),le};function K(ke,_e,ce){if(ke%1!==0||ke<0)throw new RangeError("offset is not uint");if(ke+_e>ce)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e],Ae=1,Be=0;++Be>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e+--ce],Ae=1;ce>0&&(Ae*=256);)le+=this[_e+--ce]*Ae;return le},h.prototype.readUint8=h.prototype.readUInt8=function(_e,ce){return _e=_e>>>0,ce||K(_e,1,this.length),this[_e]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,2,this.length),this[_e]|this[_e+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,2,this.length),this[_e]<<8|this[_e+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),(this[_e]|this[_e+1]<<8|this[_e+2]<<16)+this[_e+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]*16777216+(this[_e+1]<<16|this[_e+2]<<8|this[_e+3])},h.prototype.readIntLE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e],Ae=1,Be=0;++Be=Ae&&(le-=Math.pow(2,8*ce)),le},h.prototype.readIntBE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=ce,Ae=1,Be=this[_e+--le];le>0&&(Ae*=256);)Be+=this[_e+--le]*Ae;return Ae*=128,Be>=Ae&&(Be-=Math.pow(2,8*ce)),Be},h.prototype.readInt8=function(_e,ce){return _e=_e>>>0,ce||K(_e,1,this.length),this[_e]&128?(255-this[_e]+1)*-1:this[_e]},h.prototype.readInt16LE=function(_e,ce){_e=_e>>>0,ce||K(_e,2,this.length);var ve=this[_e]|this[_e+1]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt16BE=function(_e,ce){_e=_e>>>0,ce||K(_e,2,this.length);var ve=this[_e+1]|this[_e]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt32LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]|this[_e+1]<<8|this[_e+2]<<16|this[_e+3]<<24},h.prototype.readInt32BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]<<24|this[_e+1]<<16|this[_e+2]<<8|this[_e+3]},h.prototype.readFloatLE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),a.read(this,_e,!0,23,4)},h.prototype.readFloatBE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),a.read(this,_e,!1,23,4)},h.prototype.readDoubleLE=function(_e,ce){return _e=_e>>>0,ce||K(_e,8,this.length),a.read(this,_e,!0,52,8)},h.prototype.readDoubleBE=function(_e,ce){return _e=_e>>>0,ce||K(_e,8,this.length),a.read(this,_e,!1,52,8)};function H(ke,_e,ce,ve,le,Ae){if(!h.isBuffer(ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(_e>le||_eke.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,ve=ve>>>0,!le){var Ae=Math.pow(2,8*ve)-1;H(this,_e,ce,ve,Ae,0)}var Be=1,Xe=0;for(this[ce]=_e&255;++Xe>>0,ve=ve>>>0,!le){var Ae=Math.pow(2,8*ve)-1;H(this,_e,ce,ve,Ae,0)}var Be=ve-1,Xe=1;for(this[ce+Be]=_e&255;--Be>=0&&(Xe*=256);)this[ce+Be]=_e/Xe&255;return ce+ve},h.prototype.writeUint8=h.prototype.writeUInt8=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,1,255,0),this[ce]=_e&255,ce+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,65535,0),this[ce]=_e&255,this[ce+1]=_e>>>8,ce+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,65535,0),this[ce]=_e>>>8,this[ce+1]=_e&255,ce+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,4294967295,0),this[ce+3]=_e>>>24,this[ce+2]=_e>>>16,this[ce+1]=_e>>>8,this[ce]=_e&255,ce+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,4294967295,0),this[ce]=_e>>>24,this[ce+1]=_e>>>16,this[ce+2]=_e>>>8,this[ce+3]=_e&255,ce+4},h.prototype.writeIntLE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,!le){var Ae=Math.pow(2,8*ve-1);H(this,_e,ce,ve,Ae-1,-Ae)}var Be=0,Xe=1,Ye=0;for(this[ce]=_e&255;++Be>0)-Ye&255;return ce+ve},h.prototype.writeIntBE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,!le){var Ae=Math.pow(2,8*ve-1);H(this,_e,ce,ve,Ae-1,-Ae)}var Be=ve-1,Xe=1,Ye=0;for(this[ce+Be]=_e&255;--Be>=0&&(Xe*=256);)_e<0&&Ye===0&&this[ce+Be+1]!==0&&(Ye=1),this[ce+Be]=(_e/Xe>>0)-Ye&255;return ce+ve},h.prototype.writeInt8=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,1,127,-128),_e<0&&(_e=255+_e+1),this[ce]=_e&255,ce+1},h.prototype.writeInt16LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,32767,-32768),this[ce]=_e&255,this[ce+1]=_e>>>8,ce+2},h.prototype.writeInt16BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,32767,-32768),this[ce]=_e>>>8,this[ce+1]=_e&255,ce+2},h.prototype.writeInt32LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,2147483647,-2147483648),this[ce]=_e&255,this[ce+1]=_e>>>8,this[ce+2]=_e>>>16,this[ce+3]=_e>>>24,ce+4},h.prototype.writeInt32BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,2147483647,-2147483648),_e<0&&(_e=4294967295+_e+1),this[ce]=_e>>>24,this[ce+1]=_e>>>16,this[ce+2]=_e>>>8,this[ce+3]=_e&255,ce+4};function Y(ke,_e,ce,ve,le,Ae){if(ce+ve>ke.length)throw new RangeError("Index out of range");if(ce<0)throw new RangeError("Index out of range")}function q(ke,_e,ce,ve,le){return _e=+_e,ce=ce>>>0,le||Y(ke,_e,ce,4,34028234663852886e22,-34028234663852886e22),a.write(ke,_e,ce,ve,23,4),ce+4}h.prototype.writeFloatLE=function(_e,ce,ve){return q(this,_e,ce,!0,ve)},h.prototype.writeFloatBE=function(_e,ce,ve){return q(this,_e,ce,!1,ve)};function Z(ke,_e,ce,ve,le){return _e=+_e,ce=ce>>>0,le||Y(ke,_e,ce,8,17976931348623157e292,-17976931348623157e292),a.write(ke,_e,ce,ve,52,8),ce+8}h.prototype.writeDoubleLE=function(_e,ce,ve){return Z(this,_e,ce,!0,ve)},h.prototype.writeDoubleBE=function(_e,ce,ve){return Z(this,_e,ce,!1,ve)},h.prototype.copy=function(_e,ce,ve,le){if(!h.isBuffer(_e))throw new TypeError("argument should be a Buffer");if(ve||(ve=0),!le&&le!==0&&(le=this.length),ce>=_e.length&&(ce=_e.length),ce||(ce=0),le>0&&le=this.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),_e.length-ce>>0,ve=ve===void 0?this.length:ve>>>0,_e||(_e=0);var Be;if(typeof _e=="number")for(Be=ce;Be55295&&ce<57344){if(!le){if(ce>56319){(_e-=3)>-1&&Ae.push(239,191,189);continue}else if(Be+1===ve){(_e-=3)>-1&&Ae.push(239,191,189);continue}le=ce;continue}if(ce<56320){(_e-=3)>-1&&Ae.push(239,191,189),le=ce;continue}ce=(le-55296<<10|ce-56320)+65536}else le&&(_e-=3)>-1&&Ae.push(239,191,189);if(le=null,ce<128){if((_e-=1)<0)break;Ae.push(ce)}else if(ce<2048){if((_e-=2)<0)break;Ae.push(ce>>6|192,ce&63|128)}else if(ce<65536){if((_e-=3)<0)break;Ae.push(ce>>12|224,ce>>6&63|128,ce&63|128)}else if(ce<1114112){if((_e-=4)<0)break;Ae.push(ce>>18|240,ce>>12&63|128,ce>>6&63|128,ce&63|128)}else throw new Error("Invalid code point")}return Ae}function xe(ke){for(var _e=[],ce=0;ce>8,le=ce%256,Ae.push(le),Ae.push(ve);return Ae}function Me(ke){return r.toByteArray(ae(ke))}function Se(ke,_e,ce,ve){for(var le=0;le=_e.length||le>=ke.length);++le)_e[le+ce]=ke[le];return le}function Ie(ke,_e){return ke instanceof _e||ke!=null&&ke.constructor!=null&&ke.constructor.name!=null&&ke.constructor.name===_e.name}function Ve(ke){return ke!==ke}var Ge=function(){for(var ke="0123456789abcdef",_e=new Array(256),ce=0;ce<16;++ce)for(var ve=ce*16,le=0;le<16;++le)_e[ve+le]=ke[ce]+ke[le];return _e}()},9216:function(l){"use strict";l.exports=r,l.exports.isMobile=r,l.exports.default=r;let e=/(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,t=/CrOS/,n=/android|ipad|playbook|silk/i;function r(a){a||(a={});let o=a.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;let s=e.test(o)&&!t.test(o)||!!a.tablet&&n.test(o);return!s&&a.tablet&&a.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(l,e,t){"use strict";l.exports=c;var n=t(7261),r=t(9977),a=t(1811);function o(m,h){this._controllerNames=Object.keys(m),this._controllerList=this._controllerNames.map(function(v){return m[v]}),this._mode=h,this._active=m[h],this._active||(this._mode="turntable",this._active=m.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(m){for(var h=this._controllerList,v=0;v"u"?t(1538):WeakMap,r=t(2762),a=t(8116),o=new n;function s(c){var m=o.get(c),h=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!h||!c.isBuffer(h)){var v=r(c,new Float32Array([-1,-1,-1,4,4,-1]));m=a(c,[{buffer:v,type:c.FLOAT,size:2}]),m._triangleBuffer=v,o.set(c,m)}m.bind(),c.drawArrays(c.TRIANGLES,0,3),m.unbind()}l.exports=s},1085:function(l,e,t){var n=t(1371);l.exports=r;function r(a,o,s){o=typeof o=="number"?o:1,s=s||": ";var c=a.split(/\r?\n/),m=String(c.length+o-1).length;return c.map(function(h,v){var g=v+o,i=String(g).length,w=n(g,m-i);return w+s+h}).join(` +`)}},3952:function(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){for(var c=new Array(s+1),m=0;m0)throw new Error("Invalid string. Length must be a multiple of 4");var C=S.indexOf("=");C===-1&&(C=M);var _=C===M?0:4-C%4;return[C,_]}function m(S){var M=c(S),C=M[0],_=M[1];return(C+_)*3/4-_}function h(S,M,C){return(M+C)*3/4-C}function v(S){var M,C=c(S),_=C[0],T=C[1],f=new r(h(S,_,T)),u=0,A=T>0?_-4:_,x;for(x=0;x>16&255,f[u++]=M>>8&255,f[u++]=M&255;return T===2&&(M=n[S.charCodeAt(x)]<<2|n[S.charCodeAt(x+1)]>>4,f[u++]=M&255),T===1&&(M=n[S.charCodeAt(x)]<<10|n[S.charCodeAt(x+1)]<<4|n[S.charCodeAt(x+2)]>>2,f[u++]=M>>8&255,f[u++]=M&255),f}function g(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function i(S,M,C){for(var _,T=[],f=M;fA?A:u+f));return _===1?(M=S[C-1],T.push(t[M>>2]+t[M<<4&63]+"==")):_===2&&(M=(S[C-2]<<8)+S[C-1],T.push(t[M>>10]+t[M>>4&63]+t[M<<2&63]+"=")),T.join("")}},3865:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).add(o[0].mul(a[1])),a[1].mul(o[1]))}},1318:function(l){"use strict";l.exports=e;function e(t,n){return t[0].mul(n[1]).cmp(n[0].mul(t[1]))}},8697:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]),a[1].mul(o[0]))}},7842:function(l,e,t){"use strict";var n=t(6330),r=t(1533),a=t(2651),o=t(6768),s=t(869),c=t(8697);l.exports=m;function m(h,v){if(n(h))return v?c(h,m(v)):[h[0].clone(),h[1].clone()];var g=0,i,w;if(r(h))i=h.clone();else if(typeof h=="string")i=o(h);else{if(h===0)return[a(0),a(1)];if(h===Math.floor(h))i=a(h);else{for(;h!==Math.floor(h);)h=h*Math.pow(2,256),g-=256;i=a(h)}}if(n(v))i.mul(v[1]),w=v[0].clone();else if(r(v))w=v.clone();else if(typeof v=="string")w=o(v);else if(!v)w=a(1);else if(v===Math.floor(v))w=a(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),g+=256;w=a(v)}return g>0?i=i.ushln(g):g<0&&(w=w.ushln(-g)),s(i,w)}},6330:function(l,e,t){"use strict";var n=t(1533);l.exports=r;function r(a){return Array.isArray(a)&&a.length===2&&n(a[0])&&n(a[1])}},5716:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a.cmp(new n(0))}},1369:function(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){var o=a.length,s=a.words,c=0;if(o===1)c=s[0];else if(o===2)c=s[0]+s[1]*67108864;else for(var m=0;m20?52:c+32}},1533:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a&&typeof a=="object"&&!!a.words}},2651:function(l,e,t){"use strict";var n=t(6859),r=t(2361);l.exports=a;function a(o){var s=r.exponent(o);return s<52?new n(o):new n(o*Math.pow(2,52-s)).ushln(s-52)}},869:function(l,e,t){"use strict";var n=t(2651),r=t(5716);l.exports=a;function a(o,s){var c=r(o),m=r(s);if(c===0)return[n(0),n(1)];if(m===0)return[n(0),n(0)];m<0&&(o=o.neg(),s=s.neg());var h=o.gcd(s);return h.cmpn(1)?[o.div(h),s.div(h)]:[o,s]}},6768:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return new n(a)}},6504:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[0]),a[1].mul(o[1]))}},7721:function(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){return n(a[0])*n(a[1])}},5572:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).sub(a[1].mul(o[0])),a[1].mul(o[1]))}},946:function(l,e,t){"use strict";var n=t(1369),r=t(4025);l.exports=a;function a(o){var s=o[0],c=o[1];if(s.cmpn(0)===0)return 0;var m=s.abs().divmod(c.abs()),h=m.div,v=n(h),g=m.mod,i=s.negative!==c.negative?-1:1;if(g.cmpn(0)===0)return i*v;if(v){var w=r(v)+4,S=n(g.ushln(w).divRound(c));return i*(v+S*Math.pow(2,-w))}else{var M=c.bitLength()-g.bitLength()+53,S=n(g.ushln(M).divRound(c));return M<1023?i*S*Math.pow(2,-M):(S*=Math.pow(2,-1023),i*S*Math.pow(2,1023-M))}}},2478:function(l){"use strict";function e(s,c,m,h,v){for(var g=v+1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>=0?(g=i,v=i-1):h=i+1}return g}function t(s,c,m,h,v){for(var g=v+1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>0?(g=i,v=i-1):h=i+1}return g}function n(s,c,m,h,v){for(var g=h-1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<0?(g=i,h=i+1):v=i-1}return g}function r(s,c,m,h,v){for(var g=h-1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<=0?(g=i,h=i+1):v=i-1}return g}function a(s,c,m,h,v){for(;h<=v;){var g=h+v>>>1,i=s[g],w=m!==void 0?m(i,c):i-c;if(w===0)return g;w<=0?h=g+1:v=g-1}return-1}function o(s,c,m,h,v,g){return typeof m=="function"?g(s,c,m,h===void 0?0:h|0,v===void 0?s.length-1:v|0):g(s,c,void 0,m===void 0?0:m|0,h===void 0?s.length-1:h|0)}l.exports={ge:function(s,c,m,h,v){return o(s,c,m,h,v,e)},gt:function(s,c,m,h,v){return o(s,c,m,h,v,t)},lt:function(s,c,m,h,v){return o(s,c,m,h,v,n)},le:function(s,c,m,h,v){return o(s,c,m,h,v,r)},eq:function(s,c,m,h,v){return o(s,c,m,h,v,a)}}},8828:function(l,e){"use strict";"use restrict";var t=32;e.INT_BITS=t,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},6859:function(l,e,t){l=t.nmd(l),function(n,r){"use strict";function a(F,P){if(!F)throw new Error(P||"Assertion failed")}function o(F,P){F.super_=P;var j=function(){};j.prototype=P.prototype,F.prototype=new j,F.prototype.constructor=F}function s(F,P,j){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((P==="le"||P==="be")&&(j=P,P=10),this._init(F||0,P||10,j||"be"))}typeof n=="object"?n.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=t(7790).Buffer}catch{}s.isBN=function(P){return P instanceof s?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===s.wordSize&&Array.isArray(P.words)},s.max=function(P,j){return P.cmp(j)>0?P:j},s.min=function(P,j){return P.cmp(j)<0?P:j},s.prototype._init=function(P,j,U){if(typeof P=="number")return this._initNumber(P,j,U);if(typeof P=="object")return this._initArray(P,j,U);j==="hex"&&(j=16),a(j===(j|0)&&j>=2&&j<=36),P=P.toString().replace(/\s+/g,"");var $=0;P[0]==="-"&&($++,this.negative=1),$=0;$-=3)re=P[$]|P[$-1]<<8|P[$-2]<<16,this.words[Q]|=re<>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);else if(U==="le")for($=0,Q=0;$>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);return this.strip()};function m(F,P){var j=F.charCodeAt(P);return j>=65&&j<=70?j-55:j>=97&&j<=102?j-87:j-48&15}function h(F,P,j){var U=m(F,j);return j-1>=P&&(U|=m(F,j-1)<<4),U}s.prototype._parseHex=function(P,j,U){this.length=Math.ceil((P.length-j)/6),this.words=new Array(this.length);for(var $=0;$=j;$-=2)ne=h(P,j,$)<=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8;else{var se=P.length-j;for($=se%2===0?j+1:j;$=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8}this.strip()};function v(F,P,j,U){for(var $=0,Q=Math.min(F.length,j),re=P;re=49?$+=ne-49+10:ne>=17?$+=ne-17+10:$+=ne}return $}s.prototype._parseBase=function(P,j,U){this.words=[0],this.length=1;for(var $=0,Q=1;Q<=67108863;Q*=j)$++;$--,Q=Q/j|0;for(var re=P.length-U,ne=re%$,se=Math.min(re,re-ne)+U,G=0,X=U;X1&&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 g=["","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"],i=[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],w=[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,j){P=P||10,j=j|0||1;var U;if(P===16||P==="hex"){U="";for(var $=0,Q=0,re=0;re>>24-$&16777215,$+=2,$>=26&&($-=26,re--),Q!==0||re!==this.length-1?U=g[6-se.length]+se+U:U=se+U}for(Q!==0&&(U=Q.toString(16)+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(P===(P|0)&&P>=2&&P<=36){var G=i[P],X=w[P];U="";var K=this.clone();for(K.negative=0;!K.isZero();){var H=K.modn(X).toString(P);K=K.idivn(X),K.isZero()?U=H+U:U=g[G-H.length]+H+U}for(this.isZero()&&(U="0"+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}a(!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&&a(!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,j){return a(typeof c<"u"),this.toArrayLike(c,P,j)},s.prototype.toArray=function(P,j){return this.toArrayLike(Array,P,j)},s.prototype.toArrayLike=function(P,j,U){var $=this.byteLength(),Q=U||Math.max(1,$);a($<=Q,"byte array longer than desired length"),a(Q>0,"Requested array length <= 0"),this.strip();var re=j==="le",ne=new P(Q),se,G,X=this.clone();if(re){for(G=0;!X.isZero();G++)se=X.andln(255),X.iushrn(8),ne[G]=se;for(;G=4096&&(U+=13,j>>>=13),j>=64&&(U+=7,j>>>=7),j>=8&&(U+=4,j>>>=4),j>=2&&(U+=2,j>>>=2),U+j},s.prototype._zeroBits=function(P){if(P===0)return 26;var j=P,U=0;return j&8191||(U+=13,j>>>=13),j&127||(U+=7,j>>>=7),j&15||(U+=4,j>>>=4),j&3||(U+=2,j>>>=2),j&1||U++,U},s.prototype.bitLength=function(){var P=this.words[this.length-1],j=this._countBits(P);return(this.length-1)*26+j};function S(F){for(var P=new Array(F.bitLength()),j=0;j>>$}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,j=0;jP.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 j;this.length>P.length?j=P:j=this;for(var U=0;UP.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 j,U;this.length>P.length?(j=this,U=P):(j=P,U=this);for(var $=0;$P.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){a(typeof P=="number"&&P>=0);var j=Math.ceil(P/26)|0,U=P%26;this._expand(j),U>0&&j--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-U),this.strip()},s.prototype.notn=function(P){return this.clone().inotn(P)},s.prototype.setn=function(P,j){a(typeof P=="number"&&P>=0);var U=P/26|0,$=P%26;return this._expand(U+1),j?this.words[U]=this.words[U]|1<<$:this.words[U]=this.words[U]&~(1<<$),this.strip()},s.prototype.iadd=function(P){var j;if(this.negative!==0&&P.negative===0)return this.negative=0,j=this.isub(P),this.negative^=1,this._normSign();if(this.negative===0&&P.negative!==0)return P.negative=0,j=this.isub(P),P.negative=1,j._normSign();var U,$;this.length>P.length?(U=this,$=P):(U=P,$=this);for(var Q=0,re=0;re<$.length;re++)j=(U.words[re]|0)+($.words[re]|0)+Q,this.words[re]=j&67108863,Q=j>>>26;for(;Q!==0&&re>>26;if(this.length=U.length,Q!==0)this.words[this.length]=Q,this.length++;else if(U!==this)for(;reP.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var j=this.iadd(P);return P.negative=1,j._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var U=this.cmp(P);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Q;U>0?($=this,Q=P):($=P,Q=this);for(var re=0,ne=0;ne>26,this.words[ne]=j&67108863;for(;re!==0&&ne<$.length;ne++)j=($.words[ne]|0)+re,re=j>>26,this.words[ne]=j&67108863;if(re===0&&ne<$.length&&$!==this)for(;ne<$.length;ne++)this.words[ne]=$.words[ne];return this.length=Math.max(this.length,ne),$!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(P){return this.clone().isub(P)};function M(F,P,j){j.negative=P.negative^F.negative;var U=F.length+P.length|0;j.length=U,U=U-1|0;var $=F.words[0]|0,Q=P.words[0]|0,re=$*Q,ne=re&67108863,se=re/67108864|0;j.words[0]=ne;for(var G=1;G>>26,K=se&67108863,H=Math.min(G,P.length-1),Y=Math.max(0,G-F.length+1);Y<=H;Y++){var q=G-Y|0;$=F.words[q]|0,Q=P.words[Y]|0,re=$*Q+K,X+=re/67108864|0,K=re&67108863}j.words[G]=K|0,se=X|0}return se!==0?j.words[G]=se|0:j.length--,j.strip()}var C=function(P,j,U){var $=P.words,Q=j.words,re=U.words,ne=0,se,G,X,K=$[0]|0,H=K&8191,Y=K>>>13,q=$[1]|0,Z=q&8191,ee=q>>>13,ae=$[2]|0,he=ae&8191,xe=ae>>>13,we=$[3]|0,Me=we&8191,Se=we>>>13,Ie=$[4]|0,Ve=Ie&8191,Ge=Ie>>>13,ke=$[5]|0,_e=ke&8191,ce=ke>>>13,ve=$[6]|0,le=ve&8191,Ae=ve>>>13,Be=$[7]|0,Xe=Be&8191,Ye=Be>>>13,yt=$[8]|0,gt=yt&8191,Tt=yt>>>13,At=$[9]|0,$t=At&8191,rr=At>>>13,_r=Q[0]|0,Xt=_r&8191,or=_r>>>13,Ot=Q[1]|0,vt=Ot&8191,ht=Ot>>>13,De=Q[2]|0,Ne=De&8191,We=De>>>13,Ke=Q[3]|0,Je=Ke&8191,et=Ke>>>13,Mt=Q[4]|0,pt=Mt&8191,Pt=Mt>>>13,Ct=Q[5]|0,qt=Ct&8191,Vt=Ct>>>13,Ht=Q[6]|0,Sr=Ht&8191,Kr=Ht>>>13,Yt=Q[7]|0,Rt=Yt&8191,nr=Yt>>>13,ur=Q[8]|0,cr=ur&8191,Rr=ur>>>13,Qr=Q[9]|0,Zr=Qr&8191,ha=Qr>>>13;U.negative=P.negative^j.negative,U.length=19,se=Math.imul(H,Xt),G=Math.imul(H,or),G=G+Math.imul(Y,Xt)|0,X=Math.imul(Y,or);var Pa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,se=Math.imul(Z,Xt),G=Math.imul(Z,or),G=G+Math.imul(ee,Xt)|0,X=Math.imul(ee,or),se=se+Math.imul(H,vt)|0,G=G+Math.imul(H,ht)|0,G=G+Math.imul(Y,vt)|0,X=X+Math.imul(Y,ht)|0;var La=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(La>>>26)|0,La&=67108863,se=Math.imul(he,Xt),G=Math.imul(he,or),G=G+Math.imul(xe,Xt)|0,X=Math.imul(xe,or),se=se+Math.imul(Z,vt)|0,G=G+Math.imul(Z,ht)|0,G=G+Math.imul(ee,vt)|0,X=X+Math.imul(ee,ht)|0,se=se+Math.imul(H,Ne)|0,G=G+Math.imul(H,We)|0,G=G+Math.imul(Y,Ne)|0,X=X+Math.imul(Y,We)|0;var un=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(un>>>26)|0,un&=67108863,se=Math.imul(Me,Xt),G=Math.imul(Me,or),G=G+Math.imul(Se,Xt)|0,X=Math.imul(Se,or),se=se+Math.imul(he,vt)|0,G=G+Math.imul(he,ht)|0,G=G+Math.imul(xe,vt)|0,X=X+Math.imul(xe,ht)|0,se=se+Math.imul(Z,Ne)|0,G=G+Math.imul(Z,We)|0,G=G+Math.imul(ee,Ne)|0,X=X+Math.imul(ee,We)|0,se=se+Math.imul(H,Je)|0,G=G+Math.imul(H,et)|0,G=G+Math.imul(Y,Je)|0,X=X+Math.imul(Y,et)|0;var Xa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Xa>>>26)|0,Xa&=67108863,se=Math.imul(Ve,Xt),G=Math.imul(Ve,or),G=G+Math.imul(Ge,Xt)|0,X=Math.imul(Ge,or),se=se+Math.imul(Me,vt)|0,G=G+Math.imul(Me,ht)|0,G=G+Math.imul(Se,vt)|0,X=X+Math.imul(Se,ht)|0,se=se+Math.imul(he,Ne)|0,G=G+Math.imul(he,We)|0,G=G+Math.imul(xe,Ne)|0,X=X+Math.imul(xe,We)|0,se=se+Math.imul(Z,Je)|0,G=G+Math.imul(Z,et)|0,G=G+Math.imul(ee,Je)|0,X=X+Math.imul(ee,et)|0,se=se+Math.imul(H,pt)|0,G=G+Math.imul(H,Pt)|0,G=G+Math.imul(Y,pt)|0,X=X+Math.imul(Y,Pt)|0;var ja=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(ja>>>26)|0,ja&=67108863,se=Math.imul(_e,Xt),G=Math.imul(_e,or),G=G+Math.imul(ce,Xt)|0,X=Math.imul(ce,or),se=se+Math.imul(Ve,vt)|0,G=G+Math.imul(Ve,ht)|0,G=G+Math.imul(Ge,vt)|0,X=X+Math.imul(Ge,ht)|0,se=se+Math.imul(Me,Ne)|0,G=G+Math.imul(Me,We)|0,G=G+Math.imul(Se,Ne)|0,X=X+Math.imul(Se,We)|0,se=se+Math.imul(he,Je)|0,G=G+Math.imul(he,et)|0,G=G+Math.imul(xe,Je)|0,X=X+Math.imul(xe,et)|0,se=se+Math.imul(Z,pt)|0,G=G+Math.imul(Z,Pt)|0,G=G+Math.imul(ee,pt)|0,X=X+Math.imul(ee,Pt)|0,se=se+Math.imul(H,qt)|0,G=G+Math.imul(H,Vt)|0,G=G+Math.imul(Y,qt)|0,X=X+Math.imul(Y,Vt)|0;var Nn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,se=Math.imul(le,Xt),G=Math.imul(le,or),G=G+Math.imul(Ae,Xt)|0,X=Math.imul(Ae,or),se=se+Math.imul(_e,vt)|0,G=G+Math.imul(_e,ht)|0,G=G+Math.imul(ce,vt)|0,X=X+Math.imul(ce,ht)|0,se=se+Math.imul(Ve,Ne)|0,G=G+Math.imul(Ve,We)|0,G=G+Math.imul(Ge,Ne)|0,X=X+Math.imul(Ge,We)|0,se=se+Math.imul(Me,Je)|0,G=G+Math.imul(Me,et)|0,G=G+Math.imul(Se,Je)|0,X=X+Math.imul(Se,et)|0,se=se+Math.imul(he,pt)|0,G=G+Math.imul(he,Pt)|0,G=G+Math.imul(xe,pt)|0,X=X+Math.imul(xe,Pt)|0,se=se+Math.imul(Z,qt)|0,G=G+Math.imul(Z,Vt)|0,G=G+Math.imul(ee,qt)|0,X=X+Math.imul(ee,Vt)|0,se=se+Math.imul(H,Sr)|0,G=G+Math.imul(H,Kr)|0,G=G+Math.imul(Y,Sr)|0,X=X+Math.imul(Y,Kr)|0;var yn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(yn>>>26)|0,yn&=67108863,se=Math.imul(Xe,Xt),G=Math.imul(Xe,or),G=G+Math.imul(Ye,Xt)|0,X=Math.imul(Ye,or),se=se+Math.imul(le,vt)|0,G=G+Math.imul(le,ht)|0,G=G+Math.imul(Ae,vt)|0,X=X+Math.imul(Ae,ht)|0,se=se+Math.imul(_e,Ne)|0,G=G+Math.imul(_e,We)|0,G=G+Math.imul(ce,Ne)|0,X=X+Math.imul(ce,We)|0,se=se+Math.imul(Ve,Je)|0,G=G+Math.imul(Ve,et)|0,G=G+Math.imul(Ge,Je)|0,X=X+Math.imul(Ge,et)|0,se=se+Math.imul(Me,pt)|0,G=G+Math.imul(Me,Pt)|0,G=G+Math.imul(Se,pt)|0,X=X+Math.imul(Se,Pt)|0,se=se+Math.imul(he,qt)|0,G=G+Math.imul(he,Vt)|0,G=G+Math.imul(xe,qt)|0,X=X+Math.imul(xe,Vt)|0,se=se+Math.imul(Z,Sr)|0,G=G+Math.imul(Z,Kr)|0,G=G+Math.imul(ee,Sr)|0,X=X+Math.imul(ee,Kr)|0,se=se+Math.imul(H,Rt)|0,G=G+Math.imul(H,nr)|0,G=G+Math.imul(Y,Rt)|0,X=X+Math.imul(Y,nr)|0;var Un=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Un>>>26)|0,Un&=67108863,se=Math.imul(gt,Xt),G=Math.imul(gt,or),G=G+Math.imul(Tt,Xt)|0,X=Math.imul(Tt,or),se=se+Math.imul(Xe,vt)|0,G=G+Math.imul(Xe,ht)|0,G=G+Math.imul(Ye,vt)|0,X=X+Math.imul(Ye,ht)|0,se=se+Math.imul(le,Ne)|0,G=G+Math.imul(le,We)|0,G=G+Math.imul(Ae,Ne)|0,X=X+Math.imul(Ae,We)|0,se=se+Math.imul(_e,Je)|0,G=G+Math.imul(_e,et)|0,G=G+Math.imul(ce,Je)|0,X=X+Math.imul(ce,et)|0,se=se+Math.imul(Ve,pt)|0,G=G+Math.imul(Ve,Pt)|0,G=G+Math.imul(Ge,pt)|0,X=X+Math.imul(Ge,Pt)|0,se=se+Math.imul(Me,qt)|0,G=G+Math.imul(Me,Vt)|0,G=G+Math.imul(Se,qt)|0,X=X+Math.imul(Se,Vt)|0,se=se+Math.imul(he,Sr)|0,G=G+Math.imul(he,Kr)|0,G=G+Math.imul(xe,Sr)|0,X=X+Math.imul(xe,Kr)|0,se=se+Math.imul(Z,Rt)|0,G=G+Math.imul(Z,nr)|0,G=G+Math.imul(ee,Rt)|0,X=X+Math.imul(ee,nr)|0,se=se+Math.imul(H,cr)|0,G=G+Math.imul(H,Rr)|0,G=G+Math.imul(Y,cr)|0,X=X+Math.imul(Y,Rr)|0;var li=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(li>>>26)|0,li&=67108863,se=Math.imul($t,Xt),G=Math.imul($t,or),G=G+Math.imul(rr,Xt)|0,X=Math.imul(rr,or),se=se+Math.imul(gt,vt)|0,G=G+Math.imul(gt,ht)|0,G=G+Math.imul(Tt,vt)|0,X=X+Math.imul(Tt,ht)|0,se=se+Math.imul(Xe,Ne)|0,G=G+Math.imul(Xe,We)|0,G=G+Math.imul(Ye,Ne)|0,X=X+Math.imul(Ye,We)|0,se=se+Math.imul(le,Je)|0,G=G+Math.imul(le,et)|0,G=G+Math.imul(Ae,Je)|0,X=X+Math.imul(Ae,et)|0,se=se+Math.imul(_e,pt)|0,G=G+Math.imul(_e,Pt)|0,G=G+Math.imul(ce,pt)|0,X=X+Math.imul(ce,Pt)|0,se=se+Math.imul(Ve,qt)|0,G=G+Math.imul(Ve,Vt)|0,G=G+Math.imul(Ge,qt)|0,X=X+Math.imul(Ge,Vt)|0,se=se+Math.imul(Me,Sr)|0,G=G+Math.imul(Me,Kr)|0,G=G+Math.imul(Se,Sr)|0,X=X+Math.imul(Se,Kr)|0,se=se+Math.imul(he,Rt)|0,G=G+Math.imul(he,nr)|0,G=G+Math.imul(xe,Rt)|0,X=X+Math.imul(xe,nr)|0,se=se+Math.imul(Z,cr)|0,G=G+Math.imul(Z,Rr)|0,G=G+Math.imul(ee,cr)|0,X=X+Math.imul(ee,Rr)|0,se=se+Math.imul(H,Zr)|0,G=G+Math.imul(H,ha)|0,G=G+Math.imul(Y,Zr)|0,X=X+Math.imul(Y,ha)|0;var Yn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,se=Math.imul($t,vt),G=Math.imul($t,ht),G=G+Math.imul(rr,vt)|0,X=Math.imul(rr,ht),se=se+Math.imul(gt,Ne)|0,G=G+Math.imul(gt,We)|0,G=G+Math.imul(Tt,Ne)|0,X=X+Math.imul(Tt,We)|0,se=se+Math.imul(Xe,Je)|0,G=G+Math.imul(Xe,et)|0,G=G+Math.imul(Ye,Je)|0,X=X+Math.imul(Ye,et)|0,se=se+Math.imul(le,pt)|0,G=G+Math.imul(le,Pt)|0,G=G+Math.imul(Ae,pt)|0,X=X+Math.imul(Ae,Pt)|0,se=se+Math.imul(_e,qt)|0,G=G+Math.imul(_e,Vt)|0,G=G+Math.imul(ce,qt)|0,X=X+Math.imul(ce,Vt)|0,se=se+Math.imul(Ve,Sr)|0,G=G+Math.imul(Ve,Kr)|0,G=G+Math.imul(Ge,Sr)|0,X=X+Math.imul(Ge,Kr)|0,se=se+Math.imul(Me,Rt)|0,G=G+Math.imul(Me,nr)|0,G=G+Math.imul(Se,Rt)|0,X=X+Math.imul(Se,nr)|0,se=se+Math.imul(he,cr)|0,G=G+Math.imul(he,Rr)|0,G=G+Math.imul(xe,cr)|0,X=X+Math.imul(xe,Rr)|0,se=se+Math.imul(Z,Zr)|0,G=G+Math.imul(Z,ha)|0,G=G+Math.imul(ee,Zr)|0,X=X+Math.imul(ee,ha)|0;var on=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(on>>>26)|0,on&=67108863,se=Math.imul($t,Ne),G=Math.imul($t,We),G=G+Math.imul(rr,Ne)|0,X=Math.imul(rr,We),se=se+Math.imul(gt,Je)|0,G=G+Math.imul(gt,et)|0,G=G+Math.imul(Tt,Je)|0,X=X+Math.imul(Tt,et)|0,se=se+Math.imul(Xe,pt)|0,G=G+Math.imul(Xe,Pt)|0,G=G+Math.imul(Ye,pt)|0,X=X+Math.imul(Ye,Pt)|0,se=se+Math.imul(le,qt)|0,G=G+Math.imul(le,Vt)|0,G=G+Math.imul(Ae,qt)|0,X=X+Math.imul(Ae,Vt)|0,se=se+Math.imul(_e,Sr)|0,G=G+Math.imul(_e,Kr)|0,G=G+Math.imul(ce,Sr)|0,X=X+Math.imul(ce,Kr)|0,se=se+Math.imul(Ve,Rt)|0,G=G+Math.imul(Ve,nr)|0,G=G+Math.imul(Ge,Rt)|0,X=X+Math.imul(Ge,nr)|0,se=se+Math.imul(Me,cr)|0,G=G+Math.imul(Me,Rr)|0,G=G+Math.imul(Se,cr)|0,X=X+Math.imul(Se,Rr)|0,se=se+Math.imul(he,Zr)|0,G=G+Math.imul(he,ha)|0,G=G+Math.imul(xe,Zr)|0,X=X+Math.imul(xe,ha)|0;var en=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(en>>>26)|0,en&=67108863,se=Math.imul($t,Je),G=Math.imul($t,et),G=G+Math.imul(rr,Je)|0,X=Math.imul(rr,et),se=se+Math.imul(gt,pt)|0,G=G+Math.imul(gt,Pt)|0,G=G+Math.imul(Tt,pt)|0,X=X+Math.imul(Tt,Pt)|0,se=se+Math.imul(Xe,qt)|0,G=G+Math.imul(Xe,Vt)|0,G=G+Math.imul(Ye,qt)|0,X=X+Math.imul(Ye,Vt)|0,se=se+Math.imul(le,Sr)|0,G=G+Math.imul(le,Kr)|0,G=G+Math.imul(Ae,Sr)|0,X=X+Math.imul(Ae,Kr)|0,se=se+Math.imul(_e,Rt)|0,G=G+Math.imul(_e,nr)|0,G=G+Math.imul(ce,Rt)|0,X=X+Math.imul(ce,nr)|0,se=se+Math.imul(Ve,cr)|0,G=G+Math.imul(Ve,Rr)|0,G=G+Math.imul(Ge,cr)|0,X=X+Math.imul(Ge,Rr)|0,se=se+Math.imul(Me,Zr)|0,G=G+Math.imul(Me,ha)|0,G=G+Math.imul(Se,Zr)|0,X=X+Math.imul(Se,ha)|0;var vi=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(vi>>>26)|0,vi&=67108863,se=Math.imul($t,pt),G=Math.imul($t,Pt),G=G+Math.imul(rr,pt)|0,X=Math.imul(rr,Pt),se=se+Math.imul(gt,qt)|0,G=G+Math.imul(gt,Vt)|0,G=G+Math.imul(Tt,qt)|0,X=X+Math.imul(Tt,Vt)|0,se=se+Math.imul(Xe,Sr)|0,G=G+Math.imul(Xe,Kr)|0,G=G+Math.imul(Ye,Sr)|0,X=X+Math.imul(Ye,Kr)|0,se=se+Math.imul(le,Rt)|0,G=G+Math.imul(le,nr)|0,G=G+Math.imul(Ae,Rt)|0,X=X+Math.imul(Ae,nr)|0,se=se+Math.imul(_e,cr)|0,G=G+Math.imul(_e,Rr)|0,G=G+Math.imul(ce,cr)|0,X=X+Math.imul(ce,Rr)|0,se=se+Math.imul(Ve,Zr)|0,G=G+Math.imul(Ve,ha)|0,G=G+Math.imul(Ge,Zr)|0,X=X+Math.imul(Ge,ha)|0;var Yi=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,se=Math.imul($t,qt),G=Math.imul($t,Vt),G=G+Math.imul(rr,qt)|0,X=Math.imul(rr,Vt),se=se+Math.imul(gt,Sr)|0,G=G+Math.imul(gt,Kr)|0,G=G+Math.imul(Tt,Sr)|0,X=X+Math.imul(Tt,Kr)|0,se=se+Math.imul(Xe,Rt)|0,G=G+Math.imul(Xe,nr)|0,G=G+Math.imul(Ye,Rt)|0,X=X+Math.imul(Ye,nr)|0,se=se+Math.imul(le,cr)|0,G=G+Math.imul(le,Rr)|0,G=G+Math.imul(Ae,cr)|0,X=X+Math.imul(Ae,Rr)|0,se=se+Math.imul(_e,Zr)|0,G=G+Math.imul(_e,ha)|0,G=G+Math.imul(ce,Zr)|0,X=X+Math.imul(ce,ha)|0;var Ja=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Ja>>>26)|0,Ja&=67108863,se=Math.imul($t,Sr),G=Math.imul($t,Kr),G=G+Math.imul(rr,Sr)|0,X=Math.imul(rr,Kr),se=se+Math.imul(gt,Rt)|0,G=G+Math.imul(gt,nr)|0,G=G+Math.imul(Tt,Rt)|0,X=X+Math.imul(Tt,nr)|0,se=se+Math.imul(Xe,cr)|0,G=G+Math.imul(Xe,Rr)|0,G=G+Math.imul(Ye,cr)|0,X=X+Math.imul(Ye,Rr)|0,se=se+Math.imul(le,Zr)|0,G=G+Math.imul(le,ha)|0,G=G+Math.imul(Ae,Zr)|0,X=X+Math.imul(Ae,ha)|0;var Oa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Oa>>>26)|0,Oa&=67108863,se=Math.imul($t,Rt),G=Math.imul($t,nr),G=G+Math.imul(rr,Rt)|0,X=Math.imul(rr,nr),se=se+Math.imul(gt,cr)|0,G=G+Math.imul(gt,Rr)|0,G=G+Math.imul(Tt,cr)|0,X=X+Math.imul(Tt,Rr)|0,se=se+Math.imul(Xe,Zr)|0,G=G+Math.imul(Xe,ha)|0,G=G+Math.imul(Ye,Zr)|0,X=X+Math.imul(Ye,ha)|0;var lt=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(lt>>>26)|0,lt&=67108863,se=Math.imul($t,cr),G=Math.imul($t,Rr),G=G+Math.imul(rr,cr)|0,X=Math.imul(rr,Rr),se=se+Math.imul(gt,Zr)|0,G=G+Math.imul(gt,ha)|0,G=G+Math.imul(Tt,Zr)|0,X=X+Math.imul(Tt,ha)|0;var rt=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(rt>>>26)|0,rt&=67108863,se=Math.imul($t,Zr),G=Math.imul($t,ha),G=G+Math.imul(rr,Zr)|0,X=Math.imul(rr,ha);var fr=(ne+se|0)+((G&8191)<<13)|0;return ne=(X+(G>>>13)|0)+(fr>>>26)|0,fr&=67108863,re[0]=Pa,re[1]=La,re[2]=un,re[3]=Xa,re[4]=ja,re[5]=Nn,re[6]=yn,re[7]=Un,re[8]=li,re[9]=Yn,re[10]=on,re[11]=en,re[12]=vi,re[13]=Yi,re[14]=Ja,re[15]=Oa,re[16]=lt,re[17]=rt,re[18]=fr,ne!==0&&(re[19]=ne,U.length++),U};Math.imul||(C=M);function _(F,P,j){j.negative=P.negative^F.negative,j.length=F.length+P.length;for(var U=0,$=0,Q=0;Q>>26)|0,$+=re>>>26,re&=67108863}j.words[Q]=ne,U=re,re=$}return U!==0?j.words[Q]=U:j.length--,j.strip()}function T(F,P,j){var U=new f;return U.mulp(F,P,j)}s.prototype.mulTo=function(P,j){var U,$=this.length+P.length;return this.length===10&&P.length===10?U=C(this,P,j):$<63?U=M(this,P,j):$<1024?U=_(this,P,j):U=T(this,P,j),U};function f(F,P){this.x=F,this.y=P}f.prototype.makeRBT=function(P){for(var j=new Array(P),U=s.prototype._countBits(P)-1,$=0;$>=1;return $},f.prototype.permute=function(P,j,U,$,Q,re){for(var ne=0;ne>>1)Q++;return 1<>>13,U[2*re+1]=Q&8191,Q=Q>>>13;for(re=2*j;re<$;++re)U[re]=0;a(Q===0),a((Q&-8192)===0)},f.prototype.stub=function(P){for(var j=new Array(P),U=0;U>=26,j+=$/67108864|0,j+=Q>>>26,this.words[U]=Q&67108863}return j!==0&&(this.words[U]=j,this.length++),this.length=P===0?1:this.length,this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var j=S(P);if(j.length===0)return new s(1);for(var U=this,$=0;$=0);var j=P%26,U=(P-j)/26,$=67108863>>>26-j<<26-j,Q;if(j!==0){var re=0;for(Q=0;Q>>26-j}re&&(this.words[Q]=re,this.length++)}if(U!==0){for(Q=this.length-1;Q>=0;Q--)this.words[Q+U]=this.words[Q];for(Q=0;Q=0);var $;j?$=(j-j%26)/26:$=0;var Q=P%26,re=Math.min((P-Q)/26,this.length),ne=67108863^67108863>>>Q<re)for(this.length-=re,G=0;G=0&&(X!==0||G>=$);G--){var K=this.words[G]|0;this.words[G]=X<<26-Q|K>>>Q,X=K&ne}return se&&X!==0&&(se.words[se.length++]=X),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,j,U){return a(this.negative===0),this.iushrn(P,j,U)},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){a(typeof P=="number"&&P>=0);var j=P%26,U=(P-j)/26,$=1<=0);var j=P%26,U=(P-j)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(j!==0&&U++,this.length=Math.min(U,this.length),j!==0){var $=67108863^67108863>>>j<=67108864;j++)this.words[j]-=67108864,j===this.length-1?this.words[j+1]=1:this.words[j+1]++;return this.length=Math.max(this.length,j+1),this},s.prototype.isubn=function(P){if(a(typeof P=="number"),a(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 j=0;j>26)-(se/67108864|0),this.words[Q+U]=re&67108863}for(;Q>26,this.words[Q+U]=re&67108863;if(ne===0)return this.strip();for(a(ne===-1),ne=0,Q=0;Q>26,this.words[Q]=re&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,j){var U=this.length-P.length,$=this.clone(),Q=P,re=Q.words[Q.length-1]|0,ne=this._countBits(re);U=26-ne,U!==0&&(Q=Q.ushln(U),$.iushln(U),re=Q.words[Q.length-1]|0);var se=$.length-Q.length,G;if(j!=="mod"){G=new s(null),G.length=se+1,G.words=new Array(G.length);for(var X=0;X=0;H--){var Y=($.words[Q.length+H]|0)*67108864+($.words[Q.length+H-1]|0);for(Y=Math.min(Y/re|0,67108863),$._ishlnsubmul(Q,Y,H);$.negative!==0;)Y--,$.negative=0,$._ishlnsubmul(Q,1,H),$.isZero()||($.negative^=1);G&&(G.words[H]=Y)}return G&&G.strip(),$.strip(),j!=="div"&&U!==0&&$.iushrn(U),{div:G||null,mod:$}},s.prototype.divmod=function(P,j,U){if(a(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var $,Q,re;return this.negative!==0&&P.negative===0?(re=this.neg().divmod(P,j),j!=="mod"&&($=re.div.neg()),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.iadd(P)),{div:$,mod:Q}):this.negative===0&&P.negative!==0?(re=this.divmod(P.neg(),j),j!=="mod"&&($=re.div.neg()),{div:$,mod:re.mod}):this.negative&P.negative?(re=this.neg().divmod(P.neg(),j),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.isub(P)),{div:re.div,mod:Q}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?j==="div"?{div:this.divn(P.words[0]),mod:null}:j==="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,j)},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 j=this.divmod(P);if(j.mod.isZero())return j.div;var U=j.div.negative!==0?j.mod.isub(P):j.mod,$=P.ushrn(1),Q=P.andln(1),re=U.cmp($);return re<0||Q===1&&re===0?j.div:j.div.negative!==0?j.div.isubn(1):j.div.iaddn(1)},s.prototype.modn=function(P){a(P<=67108863);for(var j=(1<<26)%P,U=0,$=this.length-1;$>=0;$--)U=(j*U+(this.words[$]|0))%P;return U},s.prototype.idivn=function(P){a(P<=67108863);for(var j=0,U=this.length-1;U>=0;U--){var $=(this.words[U]|0)+j*67108864;this.words[U]=$/P|0,j=$%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var $=new s(1),Q=new s(0),re=new s(0),ne=new s(1),se=0;j.isEven()&&U.isEven();)j.iushrn(1),U.iushrn(1),++se;for(var G=U.clone(),X=j.clone();!j.isZero();){for(var K=0,H=1;!(j.words[0]&H)&&K<26;++K,H<<=1);if(K>0)for(j.iushrn(K);K-- >0;)($.isOdd()||Q.isOdd())&&($.iadd(G),Q.isub(X)),$.iushrn(1),Q.iushrn(1);for(var Y=0,q=1;!(U.words[0]&q)&&Y<26;++Y,q<<=1);if(Y>0)for(U.iushrn(Y);Y-- >0;)(re.isOdd()||ne.isOdd())&&(re.iadd(G),ne.isub(X)),re.iushrn(1),ne.iushrn(1);j.cmp(U)>=0?(j.isub(U),$.isub(re),Q.isub(ne)):(U.isub(j),re.isub($),ne.isub(Q))}return{a:re,b:ne,gcd:U.iushln(se)}},s.prototype._invmp=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var $=new s(1),Q=new s(0),re=U.clone();j.cmpn(1)>0&&U.cmpn(1)>0;){for(var ne=0,se=1;!(j.words[0]&se)&&ne<26;++ne,se<<=1);if(ne>0)for(j.iushrn(ne);ne-- >0;)$.isOdd()&&$.iadd(re),$.iushrn(1);for(var G=0,X=1;!(U.words[0]&X)&&G<26;++G,X<<=1);if(G>0)for(U.iushrn(G);G-- >0;)Q.isOdd()&&Q.iadd(re),Q.iushrn(1);j.cmp(U)>=0?(j.isub(U),$.isub(Q)):(U.isub(j),Q.isub($))}var K;return j.cmpn(1)===0?K=$:K=Q,K.cmpn(0)<0&&K.iadd(P),K},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var j=this.clone(),U=P.clone();j.negative=0,U.negative=0;for(var $=0;j.isEven()&&U.isEven();$++)j.iushrn(1),U.iushrn(1);do{for(;j.isEven();)j.iushrn(1);for(;U.isEven();)U.iushrn(1);var Q=j.cmp(U);if(Q<0){var re=j;j=U,U=re}else if(Q===0||U.cmpn(1)===0)break;j.isub(U)}while(!0);return U.iushln($)},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){a(typeof P=="number");var j=P%26,U=(P-j)/26,$=1<>>26,ne&=67108863,this.words[re]=ne}return Q!==0&&(this.words[re]=Q,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var j=P<0;if(this.negative!==0&&!j)return-1;if(this.negative===0&&j)return 1;this.strip();var U;if(this.length>1)U=1;else{j&&(P=-P),a(P<=67108863,"Number is too big");var $=this.words[0]|0;U=$===P?0:$P.length)return 1;if(this.length=0;U--){var $=this.words[U]|0,Q=P.words[U]|0;if($!==Q){$Q&&(j=1);break}}return j},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 D(P)},s.prototype.toRed=function(P){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return a(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 a(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return a(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 A(F,P){this.name=F,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()}A.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},A.prototype.ireduce=function(P){var j=P,U;do this.split(j,this.tmp),j=this.imulK(j),j=j.iadd(this.tmp),U=j.bitLength();while(U>this.n);var $=U0?j.isub(this.p):j.strip!==void 0?j.strip():j._strip(),j},A.prototype.split=function(P,j){P.iushrn(this.n,0,j)},A.prototype.imulK=function(P){return P.imul(this.k)};function x(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(x,A),x.prototype.split=function(P,j){for(var U=4194303,$=Math.min(P.length,9),Q=0;Q<$;Q++)j.words[Q]=P.words[Q];if(j.length=$,P.length<=9){P.words[0]=0,P.length=1;return}var re=P.words[9];for(j.words[j.length++]=re&U,Q=10;Q>>22,re=ne}re>>>=22,P.words[Q-10]=re,re===0&&P.length>10?P.length-=10:P.length-=9},x.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var j=0,U=0;U>>=26,P.words[U]=Q,j=$}return j!==0&&(P.words[P.length++]=j),P},s._prime=function(P){if(u[P])return u[P];var j;if(P==="k256")j=new x;else if(P==="p224")j=new z;else if(P==="p192")j=new I;else if(P==="p25519")j=new O;else throw new Error("Unknown prime "+P);return u[P]=j,j};function D(F){if(typeof F=="string"){var P=s._prime(F);this.m=P.p,this.prime=P}else a(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}D.prototype._verify1=function(P){a(P.negative===0,"red works only with positives"),a(P.red,"red works only with red numbers")},D.prototype._verify2=function(P,j){a((P.negative|j.negative)===0,"red works only with positives"),a(P.red&&P.red===j.red,"red works only with red numbers")},D.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},D.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},D.prototype.add=function(P,j){this._verify2(P,j);var U=P.add(j);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},D.prototype.iadd=function(P,j){this._verify2(P,j);var U=P.iadd(j);return U.cmp(this.m)>=0&&U.isub(this.m),U},D.prototype.sub=function(P,j){this._verify2(P,j);var U=P.sub(j);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},D.prototype.isub=function(P,j){this._verify2(P,j);var U=P.isub(j);return U.cmpn(0)<0&&U.iadd(this.m),U},D.prototype.shl=function(P,j){return this._verify1(P),this.imod(P.ushln(j))},D.prototype.imul=function(P,j){return this._verify2(P,j),this.imod(P.imul(j))},D.prototype.mul=function(P,j){return this._verify2(P,j),this.imod(P.mul(j))},D.prototype.isqr=function(P){return this.imul(P,P.clone())},D.prototype.sqr=function(P){return this.mul(P,P)},D.prototype.sqrt=function(P){if(P.isZero())return P.clone();var j=this.m.andln(3);if(a(j%2===1),j===3){var U=this.m.add(new s(1)).iushrn(2);return this.pow(P,U)}for(var $=this.m.subn(1),Q=0;!$.isZero()&&$.andln(1)===0;)Q++,$.iushrn(1);a(!$.isZero());var re=new s(1).toRed(this),ne=re.redNeg(),se=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new s(2*G*G).toRed(this);this.pow(G,se).cmp(ne)!==0;)G.redIAdd(ne);for(var X=this.pow(G,$),K=this.pow(P,$.addn(1).iushrn(1)),H=this.pow(P,$),Y=Q;H.cmp(re)!==0;){for(var q=H,Z=0;q.cmp(re)!==0;Z++)q=q.redSqr();a(Z=0;Q--){for(var X=j.words[Q],K=G-1;K>=0;K--){var H=X>>K&1;if(re!==$[0]&&(re=this.sqr(re)),H===0&&ne===0){se=0;continue}ne<<=1,ne|=H,se++,!(se!==U&&(Q!==0||K!==0))&&(re=this.mul(re,$[ne]),se=0,ne=0)}G=26}return re},D.prototype.convertTo=function(P){var j=P.umod(this.m);return j===P?j.clone():j},D.prototype.convertFrom=function(P){var j=P.clone();return j.red=null,j},s.mont=function(P){return new B(P)};function B(F){D.call(this,F),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)}o(B,D),B.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},B.prototype.convertFrom=function(P){var j=this.imod(P.mul(this.rinv));return j.red=null,j},B.prototype.imul=function(P,j){if(P.isZero()||j.isZero())return P.words[0]=0,P.length=1,P;var U=P.imul(j),$=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub($).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.mul=function(P,j){if(P.isZero()||j.isZero())return new s(0)._forceRed(this);var U=P.mul(j),$=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub($).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.invm=function(P){var j=this.imod(P._invmp(this.m).mul(this.r2));return j._forceRed(this)}}(l,this)},6204:function(l){"use strict";l.exports=e;function e(t){var n,r,a,o=t.length,s=0;for(n=0;n>>1;if(!(f<=0)){var u,A=n.mallocDouble(2*f*_),x=n.mallocInt32(_);if(_=s(w,f,A,x),_>0){if(f===1&&C)r.init(_),u=r.sweepComplete(f,M,0,_,A,x,0,_,A,x);else{var z=n.mallocDouble(2*f*T),I=n.mallocInt32(T);T=s(S,f,z,I),T>0&&(r.init(_+T),f===1?u=r.sweepBipartite(f,M,0,_,A,x,0,T,z,I):u=a(f,M,C,_,A,x,T,z,I),n.free(z),n.free(I))}n.free(A),n.free(x)}return u}}}var m;function h(w,S){m.push([w,S])}function v(w){return m=[],c(w,w,h,!0),m}function g(w,S){return m=[],c(w,S,h,!1),m}function i(w,S,M){switch(arguments.length){case 1:return v(w);case 2:return typeof S=="function"?c(w,w,S,!0):g(w,S);case 3:return c(w,S,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(l,e){"use strict";function t(){function a(c,m,h,v,g,i,w,S,M,C,_){for(var T=2*c,f=v,u=T*v;fM-S?a(c,m,h,v,g,i,w,S,M,C,_):o(c,m,h,v,g,i,w,S,M,C,_)}return s}function n(){function a(h,v,g,i,w,S,M,C,_,T,f){for(var u=2*h,A=i,x=u*i;AT-_?i?a(h,v,g,w,S,M,C,_,T,f,u):o(h,v,g,w,S,M,C,_,T,f,u):i?s(h,v,g,w,S,M,C,_,T,f,u):c(h,v,g,w,S,M,C,_,T,f,u)}return m}function r(a){return a?t():n()}e.partial=r(!1),e.full=r(!0)},7150:function(l,e,t){"use strict";l.exports=F;var n=t(1888),r=t(8828),a=t(2455),o=a.partial,s=a.full,c=t(855),m=t(3545),h=t(8105),v=128,g=1<<22,i=1<<22,w=h("!(lo>=p0)&&!(p1>=hi)"),S=h("lo===p0"),M=h("lo0;){X-=1;var Y=X*f,q=x[Y],Z=x[Y+1],ee=x[Y+2],ae=x[Y+3],he=x[Y+4],xe=x[Y+5],we=X*u,Me=z[we],Se=z[we+1],Ie=xe&1,Ve=!!(xe&16),Ge=Q,ke=re,_e=se,ce=G;if(Ie&&(Ge=se,ke=G,_e=Q,ce=re),!(xe&2&&(ee=M(P,q,Z,ee,Ge,ke,Se),Z>=ee))&&!(xe&4&&(Z=C(P,q,Z,ee,Ge,ke,Me),Z>=ee))){var ve=ee-Z,le=he-ae;if(Ve){if(P*ve*(ve+le)h&&g[T+m]>C;--_,T-=w){for(var f=T,u=T+w,A=0;A>>1,C=2*c,_=M,T=g[C*M+m];w=z?(_=x,T=z):A>=O?(_=u,T=A):(_=I,T=O):z>=O?(_=x,T=z):O>=A?(_=u,T=A):(_=I,T=O);for(var F=C*(S-1),P=C*_,D=0;D=p0)&&!(p1>=hi)":m};function t(h){return e[h]}function n(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u];if(z===M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function r(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u];if(zI;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function a(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+A];if(z<=M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function o(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+A];if(z<=M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function s(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u],I=w[_+A];if(z<=M&&M<=I)if(f===x)f+=1,T+=C;else{for(var O=0;C>O;++O){var D=w[_+O];w[_+O]=w[T],w[T++]=D}var B=S[x];S[x]=S[f],S[f++]=B}}return f}function c(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u],I=w[_+A];if(zO;++O){var D=w[_+O];w[_+O]=w[T],w[T++]=D}var B=S[x];S[x]=S[f],S[f++]=B}}return f}function m(h,v,g,i,w,S,M,C){for(var _=2*h,T=_*g,f=T,u=g,A=v,x=h+v,z=g;i>z;++z,T+=_){var I=w[T+A],O=w[T+x];if(!(I>=M)&&!(C>=O))if(u===z)u+=1,f+=_;else{for(var D=0;_>D;++D){var B=w[T+D];w[T+D]=w[f],w[f++]=B}var F=S[z];S[z]=S[u],S[u++]=F}}return u}},4192:function(l){"use strict";l.exports=t;var e=32;function t(v,g){g<=4*e?n(0,g-1,v):h(0,g-1,v)}function n(v,g,i){for(var w=2*(v+1),S=v+1;S<=g;++S){for(var M=i[w++],C=i[w++],_=S,T=w-2;_-- >v;){var f=i[T-2],u=i[T-1];if(fi[g+1]:!0}function m(v,g,i,w){v*=2;var S=w[v];return S>1,_=C-w,T=C+w,f=S,u=_,A=C,x=T,z=M,I=v+1,O=g-1,D=0;c(f,u,i)&&(D=f,f=u,u=D),c(x,z,i)&&(D=x,x=z,z=D),c(f,A,i)&&(D=f,f=A,A=D),c(u,A,i)&&(D=u,u=A,A=D),c(f,x,i)&&(D=f,f=x,x=D),c(A,x,i)&&(D=A,A=x,x=D),c(u,z,i)&&(D=u,u=z,z=D),c(u,A,i)&&(D=u,u=A,A=D),c(x,z,i)&&(D=x,x=z,z=D);for(var B=i[2*u],F=i[2*u+1],P=i[2*x],j=i[2*x+1],U=2*f,$=2*A,Q=2*z,re=2*S,ne=2*C,se=2*M,G=0;G<2;++G){var X=i[U+G],K=i[$+G],H=i[Q+G];i[re+G]=X,i[ne+G]=K,i[se+G]=H}a(_,v,i),a(T,g,i);for(var Y=I;Y<=O;++Y)if(m(Y,B,F,i))Y!==I&&r(Y,I,i),++I;else if(!m(Y,P,j,i))for(;;)if(m(O,P,j,i)){m(O,B,F,i)?(o(Y,I,O,i),++I,--O):(r(Y,O,i),--O);break}else{if(--O>>1;a(w,K);for(var H=0,Y=0,ne=0;ne=o)q=q-o|0,M(h,v,Y--,q);else if(q>=0)M(c,m,H--,q);else if(q<=-o){q=-q-o|0;for(var Z=0;Z>>1;a(w,K);for(var H=0,Y=0,q=0,ne=0;ne>1===w[2*ne+3]>>1&&(ee=2,ne+=1),Z<0){for(var ae=-(Z>>1)-1,he=0;he>1)-1;ee===0?M(c,m,H--,ae):ee===1?M(h,v,Y--,ae):ee===2&&M(g,i,q--,ae)}}}function f(A,x,z,I,O,D,B,F,P,j,U,$){var Q=0,re=2*A,ne=x,se=x+A,G=1,X=1;I?X=o:G=o;for(var K=O;K>>1;a(w,Z);for(var ee=0,K=0;K=o?(he=!I,H-=o):(he=!!I,H-=1),he)C(c,m,ee++,H);else{var xe=$[H],we=re*H,Me=U[we+x+1],Se=U[we+x+1+A];e:for(var Ie=0;Ie>>1;a(w,H);for(var Y=0,se=0;se=o)c[Y++]=G-o;else{G-=1;var Z=U[G],ee=Q*G,ae=j[ee+x+1],he=j[ee+x+1+A];e:for(var xe=0;xe=0;--xe)if(c[xe]===G){for(var Ie=xe+1;Ie0;){for(var S=m.pop(),g=m.pop(),M=-1,C=-1,i=v[g],T=1;T=0||(c.flip(g,S),a(s,c,m,M,g,C),a(s,c,m,g,C,M),a(s,c,m,C,S,M),a(s,c,m,S,M,C))}}},5023:function(l,e,t){"use strict";var n=t(2478);l.exports=m;function r(h,v,g,i,w,S,M){this.cells=h,this.neighbor=v,this.flags=i,this.constraint=g,this.active=w,this.next=S,this.boundary=M}var a=r.prototype;function o(h,v){return h[0]-v[0]||h[1]-v[1]||h[2]-v[2]}a.locate=function(){var h=[0,0,0];return function(v,g,i){var w=v,S=g,M=i;return g0||M.length>0;){for(;S.length>0;){var u=S.pop();if(C[u]!==-w){C[u]=w;for(var A=_[u],x=0;x<3;++x){var z=f[3*u+x];z>=0&&C[z]===0&&(T[3*u+x]?M.push(z):(S.push(z),C[z]=w))}}}var I=M;M=S,S=I,M.length=0,w=-w}var O=c(_,C,v);return g?O.concat(i.boundary):O}},8902:function(l,e,t){"use strict";var n=t(2478),r=t(3250)[3],a=0,o=1,s=2;l.exports=M;function c(C,_,T,f,u){this.a=C,this.b=_,this.idx=T,this.lowerIds=f,this.upperIds=u}function m(C,_,T,f){this.a=C,this.b=_,this.type=T,this.idx=f}function h(C,_){var T=C.a[0]-_.a[0]||C.a[1]-_.a[1]||C.type-_.type;return T||C.type!==a&&(T=r(C.a,C.b,_.b),T)?T:C.idx-_.idx}function v(C,_){return r(C.a,C.b,_)}function g(C,_,T,f,u){for(var A=n.lt(_,f,v),x=n.gt(_,f,v),z=A;z1&&r(T[O[B-2]],T[O[B-1]],f)>0;)C.push([O[B-1],O[B-2],u]),B-=1;O.length=B,O.push(u);for(var D=I.upperIds,B=D.length;B>1&&r(T[D[B-2]],T[D[B-1]],f)<0;)C.push([D[B-2],D[B-1],u]),B-=1;D.length=B,D.push(u)}}function i(C,_){var T;return C.a[0]<_.a[0]?T=r(C.a,C.b,_.a):T=r(_.b,_.a,C.a),T||(_.b[0]I[0]&&u.push(new m(I,z,s,A),new m(z,I,o,A))}u.sort(h);for(var O=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),D=[new c([O,1],[O,0],-1,[],[],[],[])],B=[],A=0,F=u.length;A=0}}(),a.removeTriangle=function(c,m,h){var v=this.stars;o(v[c],m,h),o(v[m],h,c),o(v[h],c,m)},a.addTriangle=function(c,m,h){var v=this.stars;v[c].push(m,h),v[m].push(h,c),v[h].push(c,m)},a.opposite=function(c,m){for(var h=this.stars[m],v=1,g=h.length;v=0;--P){var X=B[P];j=X[0];var K=O[j],H=K[0],Y=K[1],q=I[H],Z=I[Y];if((q[0]-Z[0]||q[1]-Z[1])<0){var ee=H;H=Y,Y=ee}K[0]=H;var ae=K[1]=X[1],he;for(F&&(he=K[2]);P>0&&B[P-1][0]===j;){var X=B[--P],xe=X[1];F?O.push([ae,xe,he]):O.push([ae,xe]),ae=xe}F?O.push([ae,Y,he]):O.push([ae,Y])}return U}function _(I,O,D){for(var B=O.length,F=new n(B),P=[],j=0;jO[2]?1:0)}function u(I,O,D){if(I.length!==0){if(O)for(var B=0;B0||j.length>0}function z(I,O,D){var B;if(D){B=O;for(var F=new Array(O.length),P=0;PC+1)throw new Error(S+" map requires nshades to be at least size "+w.length);Array.isArray(m.alpha)?m.alpha.length!==2?_=[1,1]:_=m.alpha.slice():typeof m.alpha=="number"?_=[m.alpha,m.alpha]:_=[1,1],h=w.map(function(z){return Math.round(z.index*C)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var f=w.map(function(z,I){var O=w[I].index,D=w[I].rgb.slice();return D.length===4&&D[3]>=0&&D[3]<=1||(D[3]=_[0]+(_[1]-_[0])*O),D}),u=[];for(T=0;T=0}function m(h,v,g,i){var w=n(v,g,i);if(w===0){var S=r(n(h,v,g)),M=r(n(h,v,i));if(S===M){if(S===0){var C=c(h,v,g),_=c(h,v,i);return C===_?0:C?1:-1}return 0}else{if(M===0)return S>0||c(h,v,i)?-1:1;if(S===0)return M>0||c(h,v,g)?1:-1}return r(M-S)}var T=n(h,v,g);if(T>0)return w>0&&n(h,v,i)>0?1:-1;if(T<0)return w>0||n(h,v,i)>0?1:-1;var f=n(h,v,i);return f>0||c(h,v,g)?1:-1}},8572:function(l){"use strict";l.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(l){l.exports=n;var e=Math.min;function t(r,a){return r-a}function n(r,a){var o=r.length,s=r.length-a.length;if(s)return s;switch(o){case 0:return 0;case 1:return r[0]-a[0];case 2:return r[0]+r[1]-a[0]-a[1]||e(r[0],r[1])-e(a[0],a[1]);case 3:var c=r[0]+r[1],m=a[0]+a[1];if(s=c+r[2]-(m+a[2]),s)return s;var h=e(r[0],r[1]),v=e(a[0],a[1]);return e(h,r[2])-e(v,a[2])||e(h+r[2],c)-e(v+a[2],m);case 4:var g=r[0],i=r[1],w=r[2],S=r[3],M=a[0],C=a[1],_=a[2],T=a[3];return g+i+w+S-(M+C+_+T)||e(g,i,w,S)-e(M,C,_,T,M)||e(g+i,g+w,g+S,i+w,i+S,w+S)-e(M+C,M+_,M+T,C+_,C+T,_+T)||e(g+i+w,g+i+S,g+w+S,i+w+S)-e(M+C+_,M+C+T,M+_+T,C+_+T);default:for(var f=r.slice().sort(t),u=a.slice().sort(t),A=0;At[r][0]&&(r=a);return nr?[[r],[n]]:[[n]]}},4750:function(l,e,t){"use strict";l.exports=r;var n=t(3090);function r(a){var o=n(a),s=o.length;if(s<=2)return[];for(var c=new Array(s),m=o[s-1],h=0;h=m[M]&&(S+=1);i[w]=S}}return c}function s(c,m){try{return n(c,!0)}catch{var h=r(c);if(h.length<=m)return[];var v=a(c,h),g=n(v,!0);return o(g,h)}}},4769:function(l){"use strict";function e(n,r,a,o,s,c){var m=6*s*s-6*s,h=3*s*s-4*s+1,v=-6*s*s+6*s,g=3*s*s-2*s;if(n.length){c||(c=new Array(n.length));for(var i=n.length-1;i>=0;--i)c[i]=m*n[i]+h*r[i]+v*a[i]+g*o[i];return c}return m*n+h*r+v*a[i]+g*o}function t(n,r,a,o,s,c){var m=s-1,h=s*s,v=m*m,g=(1+2*s)*v,i=s*v,w=h*(3-2*s),S=h*m;if(n.length){c||(c=new Array(n.length));for(var M=n.length-1;M>=0;--M)c[M]=g*n[M]+i*r[M]+w*a[M]+S*o[M];return c}return g*n+i*r+w*a+S*o}l.exports=t,l.exports.derivative=e},7642:function(l,e,t){"use strict";var n=t(8954),r=t(1682);l.exports=c;function a(m,h){this.point=m,this.index=h}function o(m,h){for(var v=m.point,g=h.point,i=v.length,w=0;w=2)return!1;D[F]=P}return!0}):O=O.filter(function(D){for(var B=0;B<=g;++B){var F=A[D[B]];if(F<0)return!1;D[B]=F}return!0}),g&1)for(var S=0;S>>31},l.exports.exponent=function(w){var S=l.exports.hi(w);return(S<<1>>>21)-1023},l.exports.fraction=function(w){var S=l.exports.lo(w),M=l.exports.hi(w),C=M&(1<<20)-1;return M&2146435072&&(C+=1048576),[S,C]},l.exports.denormalized=function(w){var S=l.exports.hi(w);return!(S&2146435072)}},1338:function(l){"use strict";function e(r,a,o){var s=r[o]|0;if(s<=0)return[];var c=new Array(s),m;if(o===r.length-1)for(m=0;m"u"&&(a=0),typeof r){case"number":if(r>0)return t(r|0,a);break;case"object":if(typeof r.length=="number")return e(r,a,0);break}return[]}l.exports=n},3134:function(l,e,t){"use strict";l.exports=r;var n=t(1682);function r(a,o){var s=a.length;if(typeof o!="number"){o=0;for(var c=0;c=g-1)for(var T=S.length-1,u=h-v[g-1],f=0;f=g-1)for(var _=S.length-1,T=h-v[g-1],f=0;f=0;--g)if(h[--v])return!1;return!0},s.jump=function(h){var v=this.lastT(),g=this.dimension;if(!(h0;--f)i.push(a(C[f-1],_[f-1],arguments[f])),w.push(0)}},s.push=function(h){var v=this.lastT(),g=this.dimension;if(!(h1e-6?1/M:0;this._time.push(h);for(var u=g;u>0;--u){var A=a(_[u-1],T[u-1],arguments[u]);i.push(A),w.push((A-i[S++])*f)}}},s.set=function(h){var v=this.dimension;if(!(h0;--C)g.push(a(S[C-1],M[C-1],arguments[C])),i.push(0)}},s.move=function(h){var v=this.lastT(),g=this.dimension;if(!(h<=v||arguments.length!==g+1)){var i=this._state,w=this._velocity,S=i.length-this.dimension,M=this.bounds,C=M[0],_=M[1],T=h-v,f=T>1e-6?1/T:0;this._time.push(h);for(var u=g;u>0;--u){var A=arguments[u];i.push(a(C[u-1],_[u-1],i[S++]+A)),w.push(A*f)}}},s.idle=function(h){var v=this.lastT();if(!(h=0;--f)i.push(a(C[f],_[f],i[S]+T*w[S])),w.push(0),S+=1}};function c(h){for(var v=new Array(h),g=0;g=0;--I){var u=A[I];x[I]<=0?A[I]=new n(u._color,u.key,u.value,A[I+1],u.right,u._count+1):A[I]=new n(u._color,u.key,u.value,u.left,A[I+1],u._count+1)}for(var I=A.length-1;I>1;--I){var O=A[I-1],u=A[I];if(O._color===t||u._color===t)break;var D=A[I-2];if(D.left===O)if(O.left===u){var B=D.right;if(B&&B._color===e)O._color=t,D.right=a(t,B),D._color=e,I-=1;else{if(D._color=e,D.left=O.right,O._color=t,O.right=D,A[I-2]=O,A[I-1]=u,o(D),o(O),I>=3){var F=A[I-3];F.left===D?F.left=O:F.right=O}break}}else{var B=D.right;if(B&&B._color===e)O._color=t,D.right=a(t,B),D._color=e,I-=1;else{if(O.right=u.left,D._color=e,D.left=u.right,u._color=t,u.left=O,u.right=D,A[I-2]=u,A[I-1]=O,o(D),o(O),o(u),I>=3){var F=A[I-3];F.left===D?F.left=u:F.right=u}break}}else if(O.right===u){var B=D.left;if(B&&B._color===e)O._color=t,D.left=a(t,B),D._color=e,I-=1;else{if(D._color=e,D.right=O.left,O._color=t,O.left=D,A[I-2]=O,A[I-1]=u,o(D),o(O),I>=3){var F=A[I-3];F.right===D?F.right=O:F.left=O}break}}else{var B=D.left;if(B&&B._color===e)O._color=t,D.left=a(t,B),D._color=e,I-=1;else{if(O.left=u.right,D._color=e,D.right=u.left,u._color=t,u.right=O,u.left=D,A[I-2]=u,A[I-1]=O,o(D),o(O),o(u),I>=3){var F=A[I-3];F.right===D?F.right=u:F.left=u}break}}}return A[0]._color=t,new s(f,A[0])};function m(_,T){if(T.left){var f=m(_,T.left);if(f)return f}var f=_(T.key,T.value);if(f)return f;if(T.right)return m(_,T.right)}function h(_,T,f,u){var A=T(_,u.key);if(A<=0){if(u.left){var x=h(_,T,f,u.left);if(x)return x}var x=f(u.key,u.value);if(x)return x}if(u.right)return h(_,T,f,u.right)}function v(_,T,f,u,A){var x=f(_,A.key),z=f(T,A.key),I;if(x<=0&&(A.left&&(I=v(_,T,f,u,A.left),I)||z>0&&(I=u(A.key,A.value),I)))return I;if(z>0&&A.right)return v(_,T,f,u,A.right)}c.forEach=function(T,f,u){if(this.root)switch(arguments.length){case 1:return m(T,this.root);case 2:return h(f,this._compare,T,this.root);case 3:return this._compare(f,u)>=0?void 0:v(f,u,this._compare,T,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.left;return new g(this,_)}}),Object.defineProperty(c,"end",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.right;return new g(this,_)}}),c.at=function(_){if(_<0)return new g(this,[]);for(var T=this.root,f=[];;){if(f.push(T),T.left){if(_=T.right._count)break;T=T.right}else break}return new g(this,[])},c.ge=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x<=0&&(A=u.length),x<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.gt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x<0&&(A=u.length),x<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.lt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x>0&&(A=u.length),x<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.le=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x>=0&&(A=u.length),x<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.find=function(_){for(var T=this._compare,f=this.root,u=[];f;){var A=T(_,f.key);if(u.push(f),A===0)return new g(this,u);A<=0?f=f.left:f=f.right}return new g(this,[])},c.remove=function(_){var T=this.find(_);return T?T.remove():this},c.get=function(_){for(var T=this._compare,f=this.root;f;){var u=T(_,f.key);if(u===0)return f.value;u<=0?f=f.left:f=f.right}};function g(_,T){this.tree=_,this._stack=T}var i=g.prototype;Object.defineProperty(i,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(i,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),i.clone=function(){return new g(this.tree,this._stack.slice())};function w(_,T){_.key=T.key,_.value=T.value,_.left=T.left,_.right=T.right,_._color=T._color,_._count=T._count}function S(_){for(var T,f,u,A,x=_.length-1;x>=0;--x){if(T=_[x],x===0){T._color=t;return}if(f=_[x-1],f.left===T){if(u=f.right,u.right&&u.right._color===e){if(u=f.right=r(u),A=u.right=r(u.right),f.right=u.left,u.left=f,u.right=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),x>1){var z=_[x-2];z.left===f?z.left=u:z.right=u}_[x-1]=u;return}else if(u.left&&u.left._color===e){if(u=f.right=r(u),A=u.left=r(u.left),f.right=A.left,u.left=A.right,A.left=f,A.right=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),x>1){var z=_[x-2];z.left===f?z.left=A:z.right=A}_[x-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.right=a(e,u);return}else{f.right=a(e,u);continue}else{if(u=r(u),f.right=u.left,u.left=f,u._color=f._color,f._color=e,o(f),o(u),x>1){var z=_[x-2];z.left===f?z.left=u:z.right=u}_[x-1]=u,_[x]=f,x+1<_.length?_[x+1]=T:_.push(T),x=x+2}}else{if(u=f.left,u.left&&u.left._color===e){if(u=f.left=r(u),A=u.left=r(u.left),f.left=u.right,u.right=f,u.left=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),x>1){var z=_[x-2];z.right===f?z.right=u:z.left=u}_[x-1]=u;return}else if(u.right&&u.right._color===e){if(u=f.left=r(u),A=u.right=r(u.right),f.left=A.right,u.right=A.left,A.right=f,A.left=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),x>1){var z=_[x-2];z.right===f?z.right=A:z.left=A}_[x-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.left=a(e,u);return}else{f.left=a(e,u);continue}else{if(u=r(u),f.left=u.right,u.right=f,u._color=f._color,f._color=e,o(f),o(u),x>1){var z=_[x-2];z.right===f?z.right=u:z.left=u}_[x-1]=u,_[x]=f,x+1<_.length?_[x+1]=T:_.push(T),x=x+2}}}}i.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var T=new Array(_.length),f=_[_.length-1];T[T.length-1]=new n(f._color,f.key,f.value,f.left,f.right,f._count);for(var u=_.length-2;u>=0;--u){var f=_[u];f.left===_[u+1]?T[u]=new n(f._color,f.key,f.value,T[u+1],f.right,f._count):T[u]=new n(f._color,f.key,f.value,f.left,T[u+1],f._count)}if(f=T[T.length-1],f.left&&f.right){var A=T.length;for(f=f.left;f.right;)T.push(f),f=f.right;var x=T[A-1];T.push(new n(f._color,x.key,x.value,f.left,f.right,f._count)),T[A-1].key=f.key,T[A-1].value=f.value;for(var u=T.length-2;u>=A;--u)f=T[u],T[u]=new n(f._color,f.key,f.value,f.left,T[u+1],f._count);T[A-1].left=T[A]}if(f=T[T.length-1],f._color===e){var z=T[T.length-2];z.left===f?z.left=null:z.right===f&&(z.right=null),T.pop();for(var u=0;u0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(i,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(i,"index",{get:function(){var _=0,T=this._stack;if(T.length===0){var f=this.tree.root;return f?f._count:0}else T[T.length-1].left&&(_=T[T.length-1].left._count);for(var u=T.length-2;u>=0;--u)T[u+1]===T[u].right&&(++_,T[u].left&&(_+=T[u].left._count));return _},enumerable:!0}),i.next=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.right)for(T=T.right;T;)_.push(T),T=T.left;else for(_.pop();_.length>0&&_[_.length-1].right===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].left===_[T])return!0;return!1}}),i.update=function(_){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var f=new Array(T.length),u=T[T.length-1];f[f.length-1]=new n(u._color,u.key,_,u.left,u.right,u._count);for(var A=T.length-2;A>=0;--A)u=T[A],u.left===T[A+1]?f[A]=new n(u._color,u.key,u.value,f[A+1],u.right,u._count):f[A]=new n(u._color,u.key,u.value,u.left,f[A+1],u._count);return new s(this.tree._compare,f[0])},i.prev=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.left)for(T=T.left;T;)_.push(T),T=T.right;else for(_.pop();_.length>0&&_[_.length-1].left===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].right===_[T])return!0;return!1}});function M(_,T){return _T?1:0}function C(_){return new s(_||M,null)}},3837:function(l,e,t){"use strict";l.exports=I;var n=t(4935),r=t(501),a=t(5304),o=t(6429),s=t(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),m=ArrayBuffer,h=DataView;function v(O){return m.isView(O)&&!(O instanceof h)}function g(O){return Array.isArray(O)||v(O)}function i(O,D){return O[0]=D[0],O[1]=D[1],O[2]=D[2],O}function w(O){this.gl=O,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=a(O)}var S=w.prototype;S.update=function(O){O=O||{};function D(H,Y,q){if(q in O){var Z=O[q],ee=this[q],ae;(H?g(Z)&&g(Z[0]):g(Z))?this[q]=ae=[Y(Z[0]),Y(Z[1]),Y(Z[2])]:this[q]=ae=[Y(Z),Y(Z),Y(Z)];for(var he=0;he<3;++he)if(ae[he]!==ee[he])return!0}return!1}var B=D.bind(this,!1,Number),F=D.bind(this,!1,Boolean),P=D.bind(this,!1,String),j=D.bind(this,!0,function(H){if(g(H)){if(H.length===3)return[+H[0],+H[1],+H[2],1];if(H.length===4)return[+H[0],+H[1],+H[2],+H[3]]}return[0,0,0,1]}),U,$=!1,Q=!1;if("bounds"in O)for(var re=O.bounds,ne=0;ne<2;++ne)for(var se=0;se<3;++se)re[ne][se]!==this.bounds[ne][se]&&(Q=!0),this.bounds[ne][se]=re[ne][se];if("ticks"in O){U=O.ticks,$=!0,this.autoTicks=!1;for(var ne=0;ne<3;++ne)this.tickSpacing[ne]=0}else B("tickSpacing")&&(this.autoTicks=!0,Q=!0);if(this._firstInit&&("ticks"in O||"tickSpacing"in O||(this.autoTicks=!0),Q=!0,$=!0,this._firstInit=!1),Q&&this.autoTicks&&(U=s.create(this.bounds,this.tickSpacing),$=!0),$){for(var ne=0;ne<3;++ne)U[ne].sort(function(Y,q){return Y.x-q.x});s.equal(U,this.ticks)?$=!1:this.ticks=U}F("tickEnable"),P("tickFont")&&($=!0),P("tickFontStyle")&&($=!0),P("tickFontWeight")&&($=!0),P("tickFontVariant")&&($=!0),B("tickSize"),B("tickAngle"),B("tickPad"),j("tickColor");var G=P("labels");P("labelFont")&&(G=!0),P("labelFontStyle")&&(G=!0),P("labelFontWeight")&&(G=!0),P("labelFontVariant")&&(G=!0),F("labelEnable"),B("labelSize"),B("labelPad"),j("labelColor"),F("lineEnable"),F("lineMirror"),B("lineWidth"),j("lineColor"),F("lineTickEnable"),F("lineTickMirror"),B("lineTickLength"),B("lineTickWidth"),j("lineTickColor"),F("gridEnable"),B("gridWidth"),j("gridColor"),F("zeroEnable"),j("zeroLineColor"),B("zeroLineWidth"),F("backgroundEnable"),j("backgroundColor");var X=[{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]}],K=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(G||$)&&this._text.update(this.bounds,this.labels,X,this.ticks,K):this._text=n(this.gl,this.bounds,this.labels,X,this.ticks,K),this._lines&&$&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var C=[new M,new M,new M];function _(O,D,B,F,P){for(var j=O.primalOffset,U=O.primalMinor,$=O.mirrorOffset,Q=O.mirrorMinor,re=F[D],ne=0;ne<3;++ne)if(D!==ne){var se=j,G=$,X=U,K=Q;re&1<0?(X[ne]=-1,K[ne]=0):(X[ne]=0,K[ne]=1)}}var T=[0,0,0],f={model:c,view:c,projection:c,_ortho:!1};S.isOpaque=function(){return!0},S.isTransparent=function(){return!1},S.drawTransparent=function(O){};var u=0,A=[0,0,0],x=[0,0,0],z=[0,0,0];S.draw=function(O){O=O||f;for(var q=this.gl,D=O.model||c,B=O.view||c,F=O.projection||c,P=this.bounds,j=O._ortho||!1,U=o(D,B,F,P,j),$=U.cubeEdges,Q=U.axis,re=B[12],ne=B[13],se=B[14],G=B[15],X=j?2:1,K=X*this.pixelRatio*(F[3]*re+F[7]*ne+F[11]*se+F[15]*G)/q.drawingBufferHeight,H=0;H<3;++H)this.lastCubeProps.cubeEdges[H]=$[H],this.lastCubeProps.axis[H]=Q[H];for(var Y=C,H=0;H<3;++H)_(C[H],H,this.bounds,$,Q);for(var q=this.gl,Z=T,H=0;H<3;++H)this.backgroundEnable[H]?Z[H]=Q[H]:Z[H]=0;this._background.draw(D,B,F,P,Z,this.backgroundColor),this._lines.bind(D,B,F,this);for(var H=0;H<3;++H){var ee=[0,0,0];Q[H]>0?ee[H]=P[1][H]:ee[H]=P[0][H];for(var ae=0;ae<2;++ae){var he=(H+1+ae)%3,xe=(H+1+(ae^1))%3;this.gridEnable[he]&&this._lines.drawGrid(he,xe,this.bounds,ee,this.gridColor[he],this.gridWidth[he]*this.pixelRatio)}for(var ae=0;ae<2;++ae){var he=(H+1+ae)%3,xe=(H+1+(ae^1))%3;this.zeroEnable[xe]&&Math.min(P[0][xe],P[1][xe])<=0&&Math.max(P[0][xe],P[1][xe])>=0&&this._lines.drawZero(he,xe,this.bounds,ee,this.zeroLineColor[xe],this.zeroLineWidth[xe]*this.pixelRatio)}}for(var H=0;H<3;++H){this.lineEnable[H]&&this._lines.drawAxisLine(H,this.bounds,Y[H].primalOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio),this.lineMirror[H]&&this._lines.drawAxisLine(H,this.bounds,Y[H].mirrorOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio);for(var we=i(A,Y[H].primalMinor),Me=i(x,Y[H].mirrorMinor),Se=this.lineTickLength,ae=0;ae<3;++ae){var Ie=K/D[5*ae];we[ae]*=Se[ae]*Ie,Me[ae]*=Se[ae]*Ie}this.lineTickEnable[H]&&this._lines.drawAxisTicks(H,Y[H].primalOffset,we,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio),this.lineTickMirror[H]&&this._lines.drawAxisTicks(H,Y[H].mirrorOffset,Me,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio)}this._lines.unbind(),this._text.bind(D,B,F,this.pixelRatio);var Ve,Ge=.5,ke,_e;function ce(Ye){_e=[0,0,0],_e[Ye]=1}function ve(Ye,yt,gt){var Tt=(Ye+1)%3,At=(Ye+2)%3,$t=yt[Tt],rr=yt[At],_r=gt[Tt],Xt=gt[At];if($t>0&&Xt>0){ce(Tt);return}else if($t>0&&Xt<0){ce(Tt);return}else if($t<0&&Xt>0){ce(Tt);return}else if($t<0&&Xt<0){ce(Tt);return}else if(rr>0&&_r>0){ce(At);return}else if(rr>0&&_r<0){ce(At);return}else if(rr<0&&_r>0){ce(At);return}else if(rr<0&&_r<0){ce(At);return}}for(var H=0;H<3;++H){for(var le=Y[H].primalMinor,Ae=Y[H].mirrorMinor,Be=i(z,Y[H].primalOffset),ae=0;ae<3;++ae)this.lineTickEnable[H]&&(Be[ae]+=K*le[ae]*Math.max(this.lineTickLength[ae],0)/D[5*ae]);var Xe=[0,0,0];if(Xe[H]=1,this.tickEnable[H]){this.tickAngle[H]===-3600?(this.tickAngle[H]=0,this.tickAlign[H]="auto"):this.tickAlign[H]=-1,ke=1,Ve=[this.tickAlign[H],Ge,ke],Ve[0]==="auto"?Ve[0]=u:Ve[0]=parseInt(""+Ve[0]),_e=[0,0,0],ve(H,le,Ae);for(var ae=0;ae<3;++ae)Be[ae]+=K*le[ae]*this.tickPad[ae]/D[5*ae];this._text.drawTicks(H,this.tickSize[H],this.tickAngle[H],Be,this.tickColor[H],Xe,_e,Ve)}if(this.labelEnable[H]){ke=0,_e=[0,0,0],this.labels[H].length>4&&(ce(H),ke=1),Ve=[this.labelAlign[H],Ge,ke],Ve[0]==="auto"?Ve[0]=u:Ve[0]=parseInt(""+Ve[0]);for(var ae=0;ae<3;++ae)Be[ae]+=K*le[ae]*this.labelPad[ae]/D[5*ae];Be[H]+=.5*(P[0][H]+P[1][H]),this._text.drawLabel(H,this.labelSize[H],this.labelAngle[H],Be,this.labelColor[H],[0,0,0],_e,Ve)}}this._text.unbind()},S.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function I(O,D){var B=new w(O);return B.update(D),B}},5304:function(l,e,t){"use strict";l.exports=c;var n=t(2762),r=t(8116),a=t(1879).bg;function o(m,h,v,g){this.gl=m,this.buffer=h,this.vao=v,this.shader=g}var s=o.prototype;s.draw=function(m,h,v,g,i,w){for(var S=!1,M=0;M<3;++M)S=S||i[M];if(S){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:h,projection:v,bounds:g,enable:i,colors:w},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(m){for(var h=[],v=[],g=0,i=0;i<3;++i)for(var w=(i+1)%3,S=(i+2)%3,M=[0,0,0],C=[0,0,0],_=-1;_<=1;_+=2){v.push(g,g+2,g+1,g+1,g+2,g+3),M[i]=_,C[i]=_;for(var T=-1;T<=1;T+=2){M[w]=T;for(var f=-1;f<=1;f+=2)M[S]=f,h.push(M[0],M[1],M[2],C[0],C[1],C[2]),g+=1}var u=w;w=S,S=u}var A=n(m,new Float32Array(h)),x=n(m,new Uint16Array(v),m.ELEMENT_ARRAY_BUFFER),z=r(m,[{buffer:A,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:A,type:m.FLOAT,size:3,offset:12,stride:24}],x),I=a(m);return I.attributes.position.location=0,I.attributes.normal.location=1,new o(m,A,z,I)}},6429:function(l,e,t){"use strict";l.exports=_;var n=t(8828),r=t(6760),a=t(5202),o=t(3250),s=new Array(16),c=new Array(8),m=new Array(8),h=new Array(3),v=[0,0,0];(function(){for(var T=0;T<8;++T)c[T]=[1,1,1,1],m[T]=[1,1,1]})();function g(T,f,u){for(var A=0;A<4;++A){T[A]=u[12+A];for(var x=0;x<3;++x)T[A]+=f[x]*u[4*x+A]}}var i=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function w(T){for(var f=0;fQ&&(B|=1<Q){B|=1<m[I][1])&&(Y=I);for(var q=-1,I=0;I<3;++I){var Z=Y^1<m[ee][0]&&(ee=Z)}}var ae=S;ae[0]=ae[1]=ae[2]=0,ae[n.log2(q^Y)]=Y&q,ae[n.log2(Y^ee)]=Yⅇvar he=ee^7;he===B||he===H?(he=q^7,ae[n.log2(ee^he)]=he&ee):ae[n.log2(q^he)]=he&q;for(var xe=M,we=B,j=0;j<3;++j)we&1<=0;--K){var re=U[Y[K]];T.push(W*re[0],-W*re[1],B)}}for(var S=[0,0,0],A=[0,0,0],F=[0,0,0],D=[0,0,0],R=1.25,P={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},z=0;z<3;++z){F[z]=T.length/g|0,b(.5*(E[0][z]+E[1][z]),M[z],C[z],12,R,P),D[z]=(T.length/g|0)-F[z],S[z]=T.length/g|0;for(var I=0;I=0&&(g=d.length-p-1);var m=Math.pow(10,g),y=Math.round(f*h*m),_=y+"";if(_.indexOf("e")>=0)return _;var v=y/m,x=y%m;y<0?(v=-Math.ceil(v)|0,x=-x|0):(v=Math.floor(v)|0,x=x|0);var E=""+v;if(y<0&&(E="-"+E),g){for(var M=""+x;M.length=f[0][p];--y)g.push({x:y*h[p],text:n(h[p],y)});d.push(g)}return d}function c(f,h){for(var d=0;d<3;++d){if(f[d].length!==h[d].length)return!1;for(var p=0;pE)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return v.bufferSubData(x,w,C),E}function m(v,x){for(var E=u.malloc(v.length,x),M=v.length,C=0;C=0;--M){if(x[M]!==E)return!1;E*=v[M]}return!0}p.update=function(v,x){if(typeof x!="number"&&(x=-1),this.bind(),typeof v=="object"&&typeof v.shape<"u"){var E=v.dtype;if(h.indexOf(E)<0&&(E="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&E!=="uint16"?E="uint32":E="uint16"}if(E===v.dtype&&y(v.shape,v.stride))v.offset===0&&v.data.length===v.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,v.data,x):this.length=g(this.gl,this.type,this.length,this.usage,v.data.subarray(v.offset,v.shape[0]),x);else{var C=u.malloc(v.size,E),w=f(C,v.shape);c.assign(w,v),x<0?this.length=g(this.gl,this.type,this.length,this.usage,C,x):this.length=g(this.gl,this.type,this.length,this.usage,C.subarray(0,v.size),x),u.free(C)}}else if(Array.isArray(v)){var k;this.type===this.gl.ELEMENT_ARRAY_BUFFER?k=m(v,"uint16"):k=m(v,"float32"),x<0?this.length=g(this.gl,this.type,this.length,this.usage,k,x):this.length=g(this.gl,this.type,this.length,this.usage,k.subarray(0,v.length),x),u.free(k)}else if(typeof v=="object"&&typeof v.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,v,x);else if(typeof v=="number"||v===void 0){if(x>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");v=v|0,v<=0&&(v=1),this.gl.bufferData(this.type,v|0,this.usage),this.length=v}else throw new Error("gl-buffer: Invalid data type")};function _(v,x,E,M){if(E=E||v.ARRAY_BUFFER,M=M||v.DYNAMIC_DRAW,E!==v.ARRAY_BUFFER&&E!==v.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(M!==v.DYNAMIC_DRAW&&M!==v.STATIC_DRAW&&M!==v.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 C=v.createBuffer(),w=new d(v,E,C,0,M);return w.update(x),w}s.exports=_},6405(s,l,n){"use strict";var u=n(2931);s.exports=function(f,h){var d=f.positions,p=f.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:f.vertexIntensityBounds,vectors:[],cells:[],coneOffset:f.coneOffset,colormap:f.colormap};if(f.positions.length===0)return h&&(h[0]=[0,0,0],h[1]=[0,0,0]),g;for(var m=0,y=1/0,_=-1/0,v=1/0,x=-1/0,E=1/0,M=-1/0,C=null,w=null,k=[],T=1/0,b=!1,S=f.coneSizemode==="raw",A=0;Am&&(m=u.length(D)),A&&!S){var R=2*u.distance(C,F)/(u.length(w)+u.length(D));R?(T=Math.min(T,R),b=!1):b=!0}b||(C=F,w=D),k.push(D)}var P=[y,v,E],z=[_,x,M];h&&(h[0]=P,h[1]=z),m===0&&(m=1);var I=1/m;isFinite(T)||(T=1),g.vectorScale=T;var L=f.coneSize||(S?1:.5);f.absoluteConeSize&&(L=f.absoluteConeSize*I),g.coneScale=L;for(var A=0,B=0;A=1},v.isTransparent=function(){return this.opacity<1},v.pickSlots=1,v.setPickBase=function(k){this.pickId=k};function x(k){for(var T=m({colormap:k,nshades:256,format:"rgba"}),b=new Uint8Array(256*4),S=0;S<256;++S){for(var A=T[S],F=0;F<3;++F)b[4*S+F]=A[F];b[4*S+3]=A[3]*255}return g(b,[256,256,4],[4,0,1])}function E(k){for(var T=k.length,b=new Array(T),S=0;S0){var B=this.triShader;B.bind(),B.uniforms=R,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},v.drawPick=function(k){k=k||{};for(var T=this.gl,b=k.model||y,S=k.view||y,A=k.projection||y,F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)F[0][D]=Math.max(F[0][D],this.clipBounds[0][D]),F[1][D]=Math.min(F[1][D],this.clipBounds[1][D]);this._model=[].slice.call(b),this._view=[].slice.call(S),this._projection=[].slice.call(A),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var R={model:b,view:S,projection:A,clipBounds:F,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},P=this.pickShader;P.bind(),P.uniforms=R,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},v.pick=function(k){if(!k||k.id!==this.pickId)return null;var T=k.value[0]+256*k.value[1]+65536*k.value[2],b=this.cells[T],S=this.positions[b[1]].slice(0,3),A={position:S,dataCoordinate:S,index:Math.floor(b[1]/48)};return this.traceType==="cone"?A.index=Math.floor(b[1]/48):this.traceType==="streamtube"&&(A.intensity=this.intensity[b[1]],A.velocity=this.vectors[b[1]].slice(0,3),A.divergence=this.vectors[b[1]][3],A.index=T),A},v.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 M(k,T){var b=u(k,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return b.attributes.position.location=0,b.attributes.color.location=2,b.attributes.uv.location=3,b.attributes.vector.location=4,b}function C(k,T){var b=u(k,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return b.attributes.position.location=0,b.attributes.id.location=1,b.attributes.vector.location=4,b}function w(k,T,b){var S=b.shaders;arguments.length===1&&(T=k,k=T.gl);var A=M(k,S),F=C(k,S),D=h(k,g(new Uint8Array([255,255,255,255]),[1,1,4]));D.generateMipmap(),D.minFilter=k.LINEAR_MIPMAP_LINEAR,D.magFilter=k.LINEAR;var R=c(k),P=c(k),z=c(k),I=c(k),L=c(k),B=f(k,[{buffer:R,type:k.FLOAT,size:4},{buffer:L,type:k.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:z,type:k.FLOAT,size:4},{buffer:I,type:k.FLOAT,size:2},{buffer:P,type:k.FLOAT,size:4}]),O=new _(k,D,A,F,R,P,L,z,I,B,b.traceType||"cone");return O.update(T),O}s.exports=w},614(s,l,n){var u=n(3236),c=u([`precision highp float; +}`]);e.bg=function(v){return r(v,m,h,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(l,e,t){"use strict";l.exports=w;var n=t(2762),r=t(8116),a=t(4359),o=t(1879).Q,s=window||process.global||{},c=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var m=3;function h(S,M,C,_){this.gl=S,this.shader=M,this.buffer=C,this.vao=_,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=h.prototype,g=[0,0];v.bind=function(S,M,C,_){this.vao.bind(),this.shader.bind();var T=this.shader.uniforms;T.model=S,T.view=M,T.projection=C,T.pixelScale=_,g[0]=this.gl.drawingBufferWidth,g[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=g},v.unbind=function(){this.vao.unbind()},v.update=function(S,M,C,_,T){var f=[];function u(j,U,$,Q,re,ne){var se=[$.style,$.weight,$.variant,$.family].join("_"),G=c[se];G||(G=c[se]={});var X=G[U];X||(X=G[U]=i(U,{triangles:!0,font:$.family,fontStyle:$.style,fontWeight:$.weight,fontVariant:$.variant,textAlign:"center",textBaseline:"middle",lineSpacing:re,styletags:ne}));for(var K=(Q||12)/12,H=X.positions,Y=X.cells,q=0,Z=Y.length;q=0;--ae){var he=H[ee[ae]];f.push(K*he[0],-K*he[1],j)}}for(var A=[0,0,0],x=[0,0,0],z=[0,0,0],I=[0,0,0],O=1.25,D={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},B=0;B<3;++B){z[B]=f.length/m|0,u(.5*(S[0][B]+S[1][B]),M[B],C[B],12,O,D),I[B]=(f.length/m|0)-z[B],A[B]=f.length/m|0;for(var F=0;F<_[B].length;++F)if(_[B][F].text){var P={family:_[B][F].font||T[B].family,style:T[B].fontStyle||T[B].style,weight:T[B].fontWeight||T[B].weight,variant:T[B].fontVariant||T[B].variant};u(_[B][F].x,_[B][F].text,P,_[B][F].fontSize||12,O,D)}x[B]=(f.length/m|0)-A[B]}this.buffer.update(f),this.tickOffset=A,this.tickCount=x,this.labelOffset=z,this.labelCount=I},v.drawTicks=function(S,M,C,_,T,f,u,A){this.tickCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.tickCount[S],this.tickOffset[S]))},v.drawLabel=function(S,M,C,_,T,f,u,A){this.labelCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.labelCount[S],this.labelOffset[S]))},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function i(S,M){try{return a(S,M)}catch(C){return console.warn('error vectorizing text:"'+S+'" error:',C),{cells:[],positions:[]}}}function w(S,M,C,_,T,f){var u=n(S),A=r(S,[{buffer:u,size:3}]),x=o(S);x.attributes.position.location=0;var z=new h(S,x,u,A);return z.update(M,C,_,T,f),z}},6444:function(l,e){"use strict";e.create=n,e.equal=r;function t(a,o){var s=a+"",c=s.indexOf("."),m=0;c>=0&&(m=s.length-c-1);var h=Math.pow(10,m),v=Math.round(a*o*h),g=v+"";if(g.indexOf("e")>=0)return g;var i=v/h,w=v%h;v<0?(i=-Math.ceil(i)|0,w=-w|0):(i=Math.floor(i)|0,w=w|0);var S=""+i;if(v<0&&(S="-"+S),m){for(var M=""+w;M.length=a[0][c];--v)m.push({x:v*o[c],text:t(o[c],v)});s.push(m)}return s}function r(a,o){for(var s=0;s<3;++s){if(a[s].length!==o[s].length)return!1;for(var c=0;cS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return i.bufferSubData(w,_,C),S}function h(i,w){for(var S=n.malloc(i.length,w),M=i.length,C=0;C=0;--M){if(w[M]!==S)return!1;S*=i[M]}return!0}c.update=function(i,w){if(typeof w!="number"&&(w=-1),this.bind(),typeof i=="object"&&typeof i.shape<"u"){var S=i.dtype;if(o.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&S!=="uint16"?S="uint32":S="uint16"}if(S===i.dtype&&v(i.shape,i.stride))i.offset===0&&i.data.length===i.shape[0]?this.length=m(this.gl,this.type,this.length,this.usage,i.data,w):this.length=m(this.gl,this.type,this.length,this.usage,i.data.subarray(i.offset,i.shape[0]),w);else{var C=n.malloc(i.size,S),_=a(C,i.shape);r.assign(_,i),w<0?this.length=m(this.gl,this.type,this.length,this.usage,C,w):this.length=m(this.gl,this.type,this.length,this.usage,C.subarray(0,i.size),w),n.free(C)}}else if(Array.isArray(i)){var T;this.type===this.gl.ELEMENT_ARRAY_BUFFER?T=h(i,"uint16"):T=h(i,"float32"),w<0?this.length=m(this.gl,this.type,this.length,this.usage,T,w):this.length=m(this.gl,this.type,this.length,this.usage,T.subarray(0,i.length),w),n.free(T)}else if(typeof i=="object"&&typeof i.length=="number")this.length=m(this.gl,this.type,this.length,this.usage,i,w);else if(typeof i=="number"||i===void 0){if(w>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");i=i|0,i<=0&&(i=1),this.gl.bufferData(this.type,i|0,this.usage),this.length=i}else throw new Error("gl-buffer: Invalid data type")};function g(i,w,S,M){if(S=S||i.ARRAY_BUFFER,M=M||i.DYNAMIC_DRAW,S!==i.ARRAY_BUFFER&&S!==i.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(M!==i.DYNAMIC_DRAW&&M!==i.STATIC_DRAW&&M!==i.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 C=i.createBuffer(),_=new s(i,S,C,0,M);return _.update(w),_}l.exports=g},6405:function(l,e,t){"use strict";var n=t(2931);l.exports=function(a,o){var s=a.positions,c=a.vectors,m={positions:[],vertexIntensity:[],vertexIntensityBounds:a.vertexIntensityBounds,vectors:[],cells:[],coneOffset:a.coneOffset,colormap:a.colormap};if(a.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),m;for(var h=0,v=1/0,g=-1/0,i=1/0,w=-1/0,S=1/0,M=-1/0,C=null,_=null,T=[],f=1/0,u=!1,A=a.coneSizemode==="raw",x=0;xh&&(h=n.length(I)),x&&!A){var O=2*n.distance(C,z)/(n.length(_)+n.length(I));O?(f=Math.min(f,O),u=!1):u=!0}u||(C=z,_=I),T.push(I)}var D=[v,i,S],B=[g,w,M];o&&(o[0]=D,o[1]=B),h===0&&(h=1);var F=1/h;isFinite(f)||(f=1),m.vectorScale=f;var P=a.coneSize||(A?1:.5);a.absoluteConeSize&&(P=a.absoluteConeSize*F),m.coneScale=P;for(var x=0,j=0;x=1},i.isTransparent=function(){return this.opacity<1},i.pickSlots=1,i.setPickBase=function(T){this.pickId=T};function w(T){for(var f=h({colormap:T,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),A=0;A<256;++A){for(var x=f[A],z=0;z<3;++z)u[4*A+z]=x[z];u[4*A+3]=x[3]*255}return m(u,[256,256,4],[4,0,1])}function S(T){for(var f=T.length,u=new Array(f),A=0;A0){var j=this.triShader;j.bind(),j.uniforms=O,this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},i.drawPick=function(T){T=T||{};for(var f=this.gl,u=T.model||v,A=T.view||v,x=T.projection||v,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)z[0][I]=Math.max(z[0][I],this.clipBounds[0][I]),z[1][I]=Math.min(z[1][I],this.clipBounds[1][I]);this._model=[].slice.call(u),this._view=[].slice.call(A),this._projection=[].slice.call(x),this._resolution=[f.drawingBufferWidth,f.drawingBufferHeight];var O={model:u,view:A,projection:x,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},D=this.pickShader;D.bind(),D.uniforms=O,this.triangleCount>0&&(this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},i.pick=function(T){if(!T||T.id!==this.pickId)return null;var f=T.value[0]+256*T.value[1]+65536*T.value[2],u=this.cells[f],A=this.positions[u[1]].slice(0,3),x={position:A,dataCoordinate:A,index:Math.floor(u[1]/48)};return this.traceType==="cone"?x.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(x.intensity=this.intensity[u[1]],x.velocity=this.vectors[u[1]].slice(0,3),x.divergence=this.vectors[u[1]][3],x.index=f),x},i.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 M(T,f){var u=n(T,f.meshShader.vertex,f.meshShader.fragment,null,f.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 C(T,f){var u=n(T,f.pickShader.vertex,f.pickShader.fragment,null,f.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function _(T,f,u){var A=u.shaders;arguments.length===1&&(f=T,T=f.gl);var x=M(T,A),z=C(T,A),I=o(T,m(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=T.LINEAR_MIPMAP_LINEAR,I.magFilter=T.LINEAR;var O=r(T),D=r(T),B=r(T),F=r(T),P=r(T),j=a(T,[{buffer:O,type:T.FLOAT,size:4},{buffer:P,type:T.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:B,type:T.FLOAT,size:4},{buffer:F,type:T.FLOAT,size:2},{buffer:D,type:T.FLOAT,size:4}]),U=new g(T,I,x,z,O,D,P,B,F,j,u.traceType||"cone");return U.update(f),U}l.exports=_},614:function(l,e,t){var n=t(3236),r=n([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -419,7 +419,7 @@ void main() { f_position = position.xyz; f_uv = uv; } -`]),f=u([`#extension GL_OES_standard_derivatives : enable +`]),a=n([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 @@ -510,7 +510,7 @@ void main() { gl_FragColor = litColor * opacity; } -`]),h=u([`precision highp float; +`]),o=n([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -609,7 +609,7 @@ void main() { f_id = id; f_position = position.xyz; } -`]),d=u([`precision highp float; +`]),s=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -642,7 +642,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);l.meshShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},l.pickShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737(s){s.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171(s,l,n){var u=n(737);s.exports=function(f){return u[f]}},9165(s,l,n){"use strict";s.exports=_;var u=n(2762),c=n(8116),f=n(3436),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(v,x,E,M){this.gl=v,this.shader=M,this.buffer=x,this.vao=E,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 p=d.prototype;p.isOpaque=function(){return!this.hasAlpha},p.isTransparent=function(){return this.hasAlpha},p.drawTransparent=p.draw=function(v){var x=this.gl,E=this.shader.uniforms;this.shader.bind();var M=E.view=v.view||h,C=E.projection=v.projection||h;E.model=v.model||h,E.clipBounds=this.clipBounds,E.opacity=this.opacity;var w=M[12],k=M[13],T=M[14],b=M[15],S=v._ortho||!1,A=S?2:1,F=A*this.pixelRatio*(C[3]*w+C[7]*k+C[11]*T+C[15]*b)/x.drawingBufferHeight;this.vao.bind();for(var D=0;D<3;++D)x.lineWidth(this.lineWidth[D]*this.pixelRatio),E.capSize=this.capSize[D]*F,this.lineCount[D]&&x.drawArrays(x.LINES,this.lineOffset[D],this.lineCount[D]);this.vao.unbind()};function g(v,x){for(var E=0;E<3;++E)v[0][E]=Math.min(v[0][E],x[E]),v[1][E]=Math.max(v[1][E],x[E])}var m=(function(){for(var v=new Array(3),x=0;x<3;++x){for(var E=[],M=1;M<=2;++M)for(var C=-1;C<=1;C+=2){var w=(M+x)%3,k=[0,0,0];k[w]=C,E.push(k)}v[x]=E}return v})();function y(v,x,E,M){for(var C=m[M],w=0;w0){var R=S.slice();R[T]+=F[1][T],C.push(S[0],S[1],S[2],D[0],D[1],D[2],D[3],0,0,0,R[0],R[1],R[2],D[0],D[1],D[2],D[3],0,0,0),g(this.bounds,R),k+=2+y(C,R,D,T)}}}this.lineCount[T]=k-this.lineOffset[T]}this.buffer.update(C)}},p.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function _(v){var x=v.gl,E=u(x),M=c(x,[{buffer:E,type:x.FLOAT,size:3,offset:0,stride:40},{buffer:E,type:x.FLOAT,size:4,offset:12,stride:40},{buffer:E,type:x.FLOAT,size:3,offset:28,stride:40}]),C=f(x);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var w=new d(x,E,M,C);return w.update(v),w}},3436(s,l,n){"use strict";var u=n(3236),c=n(9405),f=u([`precision highp float; +}`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(l){l.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(l,e,t){var n=t(737);l.exports=function(a){return n[a]}},9165:function(l,e,t){"use strict";l.exports=g;var n=t(2762),r=t(8116),a=t(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(i,w,S,M){this.gl=i,this.shader=M,this.buffer=w,this.vao=S,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 c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(i){var w=this.gl,S=this.shader.uniforms;this.shader.bind();var M=S.view=i.view||o,C=S.projection=i.projection||o;S.model=i.model||o,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var _=M[12],T=M[13],f=M[14],u=M[15],A=i._ortho||!1,x=A?2:1,z=x*this.pixelRatio*(C[3]*_+C[7]*T+C[11]*f+C[15]*u)/w.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)w.lineWidth(this.lineWidth[I]*this.pixelRatio),S.capSize=this.capSize[I]*z,this.lineCount[I]&&w.drawArrays(w.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function m(i,w){for(var S=0;S<3;++S)i[0][S]=Math.min(i[0][S],w[S]),i[1][S]=Math.max(i[1][S],w[S])}var h=function(){for(var i=new Array(3),w=0;w<3;++w){for(var S=[],M=1;M<=2;++M)for(var C=-1;C<=1;C+=2){var _=(M+w)%3,T=[0,0,0];T[_]=C,S.push(T)}i[w]=S}return i}();function v(i,w,S,M){for(var C=h[M],_=0;_0){var O=A.slice();O[f]+=z[1][f],C.push(A[0],A[1],A[2],I[0],I[1],I[2],I[3],0,0,0,O[0],O[1],O[2],I[0],I[1],I[2],I[3],0,0,0),m(this.bounds,O),T+=2+v(C,O,I,f)}}}this.lineCount[f]=T-this.lineOffset[f]}this.buffer.update(C)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function g(i){var w=i.gl,S=n(w),M=r(w,[{buffer:S,type:w.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:w.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:w.FLOAT,size:3,offset:28,stride:40}]),C=a(w);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var _=new s(w,S,M,C);return _.update(i),_}},3436:function(l,e,t){"use strict";var n=t(3236),r=t(9405),a=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -658,7 +658,7 @@ void main() { gl_Position = projection * (view * worldPosition); fragColor = color; fragPosition = position; -}`]),h=u([`precision highp float; +}`]),o=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -693,13 +693,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);s.exports=function(d){return c(d,f,h,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260(s,l,n){"use strict";var u=n(7766);s.exports=k;var c=null,f,h,d,p;function g(T){var b=T.getParameter(T.FRAMEBUFFER_BINDING),S=T.getParameter(T.RENDERBUFFER_BINDING),A=T.getParameter(T.TEXTURE_BINDING_2D);return[b,S,A]}function m(T,b){T.bindFramebuffer(T.FRAMEBUFFER,b[0]),T.bindRenderbuffer(T.RENDERBUFFER,b[1]),T.bindTexture(T.TEXTURE_2D,b[2])}function y(T,b){var S=T.getParameter(b.MAX_COLOR_ATTACHMENTS_WEBGL);c=new Array(S+1);for(var A=0;A<=S;++A){for(var F=new Array(S),D=0;D1&&P.drawBuffersWEBGL(c[R]);var O=S.getExtension("WEBGL_depth_texture");O?z?T.depth=v(S,F,D,O.UNSIGNED_INT_24_8_WEBGL,S.DEPTH_STENCIL,S.DEPTH_STENCIL_ATTACHMENT):I&&(T.depth=v(S,F,D,S.UNSIGNED_SHORT,S.DEPTH_COMPONENT,S.DEPTH_ATTACHMENT)):I&&z?T._depth_rb=x(S,F,D,S.DEPTH_STENCIL,S.DEPTH_STENCIL_ATTACHMENT):I?T._depth_rb=x(S,F,D,S.DEPTH_COMPONENT16,S.DEPTH_ATTACHMENT):z&&(T._depth_rb=x(S,F,D,S.STENCIL_INDEX,S.STENCIL_ATTACHMENT));var G=S.checkFramebufferStatus(S.FRAMEBUFFER);if(G!==S.FRAMEBUFFER_COMPLETE){T._destroyed=!0,S.bindFramebuffer(S.FRAMEBUFFER,null),S.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(S.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var B=0;BF||S<0||S>F)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=b,T._shape[1]=S;for(var D=g(A),R=0;RD||S<0||S>D)throw new Error("gl-fbo: Parameters are too large for FBO");A=A||{};var R=1;if("color"in A){if(R=Math.max(A.color|0,0),R<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(R>1)if(F){if(R>T.getParameter(F.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+R+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var P=T.UNSIGNED_BYTE,z=T.getExtension("OES_texture_float");if(A.float&&R>0){if(!z)throw new Error("gl-fbo: Context does not support floating point textures");P=T.FLOAT}else A.preferFloat&&R>0&&z&&(P=T.FLOAT);var I=!0;"depth"in A&&(I=!!A.depth);var L=!1;return"stencil"in A&&(L=!!A.stencil),new M(T,b,S,P,R,I,L,F)}},2992(s,l,n){var u=n(3387).sprintf,c=n(5171),f=n(1848),h=n(1085);s.exports=d;function d(p,g,m){"use strict";var y=f(g)||"of unknown name (see npm glsl-shader-name)",_="unknown type";m!==void 0&&(_=m===c.FRAGMENT_SHADER?"fragment":"vertex");for(var v=u(`Error compiling %s shader %s: -`,_,y),x=u("%s%s",v,p),E=p.split(` -`),M={},C=0;C1&&D.drawBuffersWEBGL(r[O]);var U=A.getExtension("WEBGL_depth_texture");U?B?f.depth=i(A,z,I,U.UNSIGNED_INT_24_8_WEBGL,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F&&(f.depth=i(A,z,I,A.UNSIGNED_SHORT,A.DEPTH_COMPONENT,A.DEPTH_ATTACHMENT)):F&&B?f._depth_rb=w(A,z,I,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F?f._depth_rb=w(A,z,I,A.DEPTH_COMPONENT16,A.DEPTH_ATTACHMENT):B&&(f._depth_rb=w(A,z,I,A.STENCIL_INDEX,A.STENCIL_ATTACHMENT));var $=A.checkFramebufferStatus(A.FRAMEBUFFER);if($!==A.FRAMEBUFFER_COMPLETE){f._destroyed=!0,A.bindFramebuffer(A.FRAMEBUFFER,null),A.deleteFramebuffer(f.handle),f.handle=null,f.depth&&(f.depth.dispose(),f.depth=null),f._depth_rb&&(A.deleteRenderbuffer(f._depth_rb),f._depth_rb=null);for(var j=0;jz||A<0||A>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");f._shape[0]=u,f._shape[1]=A;for(var I=m(x),O=0;OI||A<0||A>I)throw new Error("gl-fbo: Parameters are too large for FBO");x=x||{};var O=1;if("color"in x){if(O=Math.max(x.color|0,0),O<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(O>1)if(z){if(O>f.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+O+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var D=f.UNSIGNED_BYTE,B=f.getExtension("OES_texture_float");if(x.float&&O>0){if(!B)throw new Error("gl-fbo: Context does not support floating point textures");D=f.FLOAT}else x.preferFloat&&O>0&&B&&(D=f.FLOAT);var F=!0;"depth"in x&&(F=!!x.depth);var P=!1;return"stencil"in x&&(P=!!x.stencil),new M(f,u,A,D,O,F,P,z)}},2992:function(l,e,t){var n=t(3387).sprintf,r=t(5171),a=t(1848),o=t(1085);l.exports=s;function s(c,m,h){"use strict";var v=a(m)||"of unknown name (see npm glsl-shader-name)",g="unknown type";h!==void 0&&(g=h===r.FRAGMENT_SHADER?"fragment":"vertex");for(var i=n(`Error compiling %s shader %s: +`,g,v),w=n("%s%s",i,c),S=c.split(` +`),M={},C=0;C0){for(var J=0;J<24;++J)D.push(D[D.length-12]);I+=2,$=!0}continue e}L[0][A]=Math.min(L[0][A],X[A],Z[A]),L[1][A]=Math.max(L[1][A],X[A],Z[A])}var N,H;Array.isArray(O[0])?(N=O.length>S-1?O[S-1]:O.length>0?O[O.length-1]:[0,0,0,1],H=O.length>S?O[S]:O.length>0?O[O.length-1]:[0,0,0,1]):N=H=O,N.length===3&&(N=[N[0],N[1],N[2],1]),H.length===3&&(H=[H[0],H[1],H[2],1]),!this.hasAlpha&&N[3]<1&&(this.hasAlpha=!0);var W;Array.isArray(G)?W=G.length>S-1?G[S-1]:G.length>0?G[G.length-1]:[0,0,0,1]:W=G;var U=z;if(z+=E(X,Z),$){for(A=0;A<2;++A)D.push(X[0],X[1],X[2],Z[0],Z[1],Z[2],U,W,N[0],N[1],N[2],N[3]);I+=2,$=!1}D.push(X[0],X[1],X[2],Z[0],Z[1],Z[2],U,W,N[0],N[1],N[2],N[3],X[0],X[1],X[2],Z[0],Z[1],Z[2],U,-W,N[0],N[1],N[2],N[3],Z[0],Z[1],Z[2],X[0],X[1],X[2],z,-W,H[0],H[1],H[2],H[3],Z[0],Z[1],Z[2],X[0],X[1],X[2],z,W,H[0],H[1],H[2],H[3]),I+=4}}if(this.buffer.update(D),R.push(z),P.push(B[B.length-1].slice()),this.bounds=L,this.vertexCount=I,this.points=P,this.arcLength=R,"dashes"in b){var V=b.dashes,j=V.slice();for(j.unshift(0),S=1;S1.0001)return null;A+=S[C]}return Math.abs(A-1)>.001?null:[w,p(m,S),S]}},840(s,l,n){var u=n(3236),c=u([`precision highp float; +}`]),c=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(m){return r(m,a,o,null,c)},e.createPickShader=function(m){return r(m,a,s,null,c)}},5714:function(l,e,t){"use strict";l.exports=f;var n=t(2762),r=t(8116),a=t(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer);function c(u,A,x,z){return o[0]=z,o[1]=x,o[2]=A,o[3]=u,s[0]}var m=t(2478),h=t(9618),v=t(7319),g=v.createShader,i=v.createPickShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function S(u,A){for(var x=0,z=0;z<3;++z){var I=u[z]-A[z];x+=I*I}return Math.sqrt(x)}function M(u){for(var A=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],x=0;x<3;++x)A[0][x]=Math.max(u[0][x],A[0][x]),A[1][x]=Math.min(u[1][x],A[1][x]);return A}function C(u,A,x,z){this.arcLength=u,this.position=A,this.index=x,this.dataCoordinate=z}function _(u,A,x,z,I,O){this.gl=u,this.shader=A,this.pickShader=x,this.buffer=z,this.vao=I,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=O,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var T=_.prototype;T.isTransparent=function(){return this.hasAlpha},T.isOpaque=function(){return!this.hasAlpha},T.pickSlots=1,T.setPickBase=function(u){this.pickId=u},T.drawTransparent=T.draw=function(u){if(this.vertexCount){var A=this.gl,x=this.shader,z=this.vao;x.bind(),x.uniforms={model:u.model||w,view:u.view||w,projection:u.projection||w,clipBounds:M(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(A.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},T.drawPick=function(u){if(this.vertexCount){var A=this.gl,x=this.pickShader,z=this.vao;x.bind(),x.uniforms={model:u.model||w,view:u.view||w,projection:u.projection||w,pickId:this.pickId,clipBounds:M(this.clipBounds),screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(A.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},T.update=function(u){var A,x;this.dirty=!0;var z=!!u.connectGaps;"dashScale"in u&&(this.dashScale=u.dashScale),this.hasAlpha=!1,"opacity"in u&&(this.opacity=+u.opacity,this.opacity<1&&(this.hasAlpha=!0));var I=[],O=[],D=[],B=0,F=0,P=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],j=u.position||u.positions;if(j){var U=u.color||u.colors||[0,0,0,1],$=u.lineWidth||1,Q=!1;e:for(A=1;A0){for(var se=0;se<24;++se)I.push(I[I.length-12]);F+=2,Q=!0}continue e}P[0][x]=Math.min(P[0][x],re[x],ne[x]),P[1][x]=Math.max(P[1][x],re[x],ne[x])}var G,X;Array.isArray(U[0])?(G=U.length>A-1?U[A-1]:U.length>0?U[U.length-1]:[0,0,0,1],X=U.length>A?U[A]:U.length>0?U[U.length-1]:[0,0,0,1]):G=X=U,G.length===3&&(G=[G[0],G[1],G[2],1]),X.length===3&&(X=[X[0],X[1],X[2],1]),!this.hasAlpha&&G[3]<1&&(this.hasAlpha=!0);var K;Array.isArray($)?K=$.length>A-1?$[A-1]:$.length>0?$[$.length-1]:[0,0,0,1]:K=$;var H=B;if(B+=S(re,ne),Q){for(x=0;x<2;++x)I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],H,K,G[0],G[1],G[2],G[3]);F+=2,Q=!1}I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],H,K,G[0],G[1],G[2],G[3],re[0],re[1],re[2],ne[0],ne[1],ne[2],H,-K,G[0],G[1],G[2],G[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,-K,X[0],X[1],X[2],X[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,K,X[0],X[1],X[2],X[3]),F+=4}}if(this.buffer.update(I),O.push(B),D.push(j[j.length-1].slice()),this.bounds=P,this.vertexCount=F,this.points=D,this.arcLength=O,"dashes"in u){var Y=u.dashes,q=Y.slice();for(q.unshift(0),A=1;A1.0001)return null;x+=A[C]}return Math.abs(x-1)>.001?null:[_,c(h,A),A]}},840:function(l,e,t){var n=t(3236),r=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -900,7 +900,7 @@ void main() { f_data = position; f_uv = uv; } -`]),f=u([`#extension GL_OES_standard_derivatives : enable +`]),a=n([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 @@ -1005,7 +1005,7 @@ void main() { gl_FragColor = litColor * f_color.a; } -`]),h=u([`precision highp float; +`]),o=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1023,7 +1023,7 @@ void main() { f_color = color; f_data = position; f_uv = uv; -}`]),d=u([`precision highp float; +}`]),s=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1058,7 +1058,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),p=u([`precision highp float; +}`]),c=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1102,7 +1102,7 @@ void main() { gl_PointSize = pointSize; f_color = color; f_uv = uv; -}`]),g=u([`precision highp float; +}`]),m=n([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; @@ -1117,7 +1117,7 @@ void main() { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),m=u([`precision highp float; +}`]),h=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1132,7 +1132,7 @@ void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; -}`]),y=u([`precision highp float; +}`]),v=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1165,7 +1165,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]),_=u([`precision highp float; +}`]),g=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1208,7 +1208,7 @@ void main() { } f_id = id; f_position = position; -}`]),v=u([`precision highp float; +}`]),i=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1217,7 +1217,7 @@ uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); -}`]),x=u([`precision highp float; +}`]),w=n([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; @@ -1225,14 +1225,14 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);l.meshShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},l.wireShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},l.pointShader={vertex:p,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},l.pickShader={vertex:m,fragment:y,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},l.pointPickShader={vertex:_,fragment:y,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},l.contourShader={vertex:v,fragment:x,attributes:[{name:"position",type:"vec3"}]}},7201(s,l,n){"use strict";var u=1e-6,c=1e-6,f=n(9405),h=n(2762),d=n(8116),p=n(7766),g=n(8406),m=n(6760),y=n(7608),_=n(9618),v=n(6729),x=n(7765),E=n(1888),M=n(840),C=n(7626),w=M.meshShader,k=M.wireShader,T=M.pointShader,b=M.pickShader,S=M.pointPickShader,A=M.contourShader,F=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function D(J,N,H,W,U,V,j,q,Y,K,re,se,le,ue,fe,pe,we,xe,he,oe,te,ie,ee,ce,_e,Se,Me){this.gl=J,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=N,this.dirty=!0,this.triShader=H,this.lineShader=W,this.pointShader=U,this.pickShader=V,this.pointPickShader=j,this.contourShader=q,this.trianglePositions=Y,this.triangleColors=re,this.triangleNormals=le,this.triangleUVs=se,this.triangleIds=K,this.triangleVAO=ue,this.triangleCount=0,this.lineWidth=1,this.edgePositions=fe,this.edgeColors=we,this.edgeUVs=xe,this.edgeIds=pe,this.edgeVAO=he,this.edgeCount=0,this.pointPositions=oe,this.pointColors=ie,this.pointUVs=ee,this.pointSizes=ce,this.pointIds=te,this.pointVAO=_e,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Se,this.contourVAO=Me,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=F,this._view=F,this._projection=F,this._resolution=[1,1]}var R=D.prototype;R.isOpaque=function(){return!this.hasAlpha},R.isTransparent=function(){return this.hasAlpha},R.pickSlots=1,R.setPickBase=function(J){this.pickId=J};function P(J,N){if(!N||!N.length)return 1;for(var H=0;HJ&&H>0){var W=(N[H][0]-J)/(N[H][0]-N[H-1][0]);return N[H][1]*(1-W)+W*N[H-1][1]}}return 1}function z(J,N){for(var H=v({colormap:J,nshades:256,format:"rgba"}),W=new Uint8Array(256*4),U=0;U<256;++U){for(var V=H[U],j=0;j<3;++j)W[4*U+j]=V[j];N?W[4*U+3]=255*P(U/255,N):W[4*U+3]=255*V[3]}return _(W,[256,256,4],[4,0,1])}function I(J){for(var N=J.length,H=new Array(N),W=0;W0){var le=this.triShader;le.bind(),le.uniforms=q,this.triangleVAO.bind(),N.drawArrays(N.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var le=this.lineShader;le.bind(),le.uniforms=q,this.edgeVAO.bind(),N.lineWidth(this.lineWidth*this.pixelRatio),N.drawArrays(N.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var le=this.pointShader;le.bind(),le.uniforms=q,this.pointVAO.bind(),N.drawArrays(N.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var le=this.contourShader;le.bind(),le.uniforms=q,this.contourVAO.bind(),N.drawArrays(N.LINES,0,this.contourCount),this.contourVAO.unbind()}},R.drawPick=function(J){J=J||{};for(var N=this.gl,H=J.model||F,W=J.view||F,U=J.projection||F,V=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],j=0;j<3;++j)V[0][j]=Math.max(V[0][j],this.clipBounds[0][j]),V[1][j]=Math.min(V[1][j],this.clipBounds[1][j]);this._model=[].slice.call(H),this._view=[].slice.call(W),this._projection=[].slice.call(U),this._resolution=[N.drawingBufferWidth,N.drawingBufferHeight];var q={model:H,view:W,projection:U,clipBounds:V,pickId:this.pickId/255},Y=this.pickShader;if(Y.bind(),Y.uniforms=q,this.triangleCount>0&&(this.triangleVAO.bind(),N.drawArrays(N.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),N.lineWidth(this.lineWidth*this.pixelRatio),N.drawArrays(N.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Y=this.pointPickShader;Y.bind(),Y.uniforms=q,this.pointVAO.bind(),N.drawArrays(N.POINTS,0,this.pointCount),this.pointVAO.unbind()}},R.pick=function(J){if(!J||J.id!==this.pickId)return null;for(var N=J.value[0]+256*J.value[1]+65536*J.value[2],H=this.cells[N],W=this.positions,U=new Array(H.length),V=0;VMath.abs(b))v.rotate(F,0,0,-T*S*Math.PI*w.rotateSpeed/window.innerWidth);else if(!w._ortho){var D=-w.zoomSpeed*A*b/window.innerHeight*(F-v.lastT())/20;v.pan(F,0,0,E*(Math.exp(D)-1))}}},!0)},w.enableMouseListeners(),w}},799(s,l,n){var u=n(3236),c=n(9405),f=u([`precision mediump float; +`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:c,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:h,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:g,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:i,fragment:w,attributes:[{name:"position",type:"vec3"}]}},7201:function(l,e,t){"use strict";var n=1e-6,r=1e-6,a=t(9405),o=t(2762),s=t(8116),c=t(7766),m=t(8406),h=t(6760),v=t(7608),g=t(9618),i=t(6729),w=t(7765),S=t(1888),M=t(840),C=t(7626),_=M.meshShader,T=M.wireShader,f=M.pointShader,u=M.pickShader,A=M.pointPickShader,x=M.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(se,G,X,K,H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve,Ge,ke,_e,ce,ve,le,Ae,Be,Xe,Ye){this.gl=se,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=G,this.dirty=!0,this.triShader=X,this.lineShader=K,this.pointShader=H,this.pickShader=Y,this.pointPickShader=q,this.contourShader=Z,this.trianglePositions=ee,this.triangleColors=he,this.triangleNormals=we,this.triangleUVs=xe,this.triangleIds=ae,this.triangleVAO=Me,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Se,this.edgeColors=Ve,this.edgeUVs=Ge,this.edgeIds=Ie,this.edgeVAO=ke,this.edgeCount=0,this.pointPositions=_e,this.pointColors=ve,this.pointUVs=le,this.pointSizes=Ae,this.pointIds=ce,this.pointVAO=Be,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Xe,this.contourVAO=Ye,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=z,this._view=z,this._projection=z,this._resolution=[1,1]}var O=I.prototype;O.isOpaque=function(){return!this.hasAlpha},O.isTransparent=function(){return this.hasAlpha},O.pickSlots=1,O.setPickBase=function(se){this.pickId=se};function D(se,G){if(!G||!G.length)return 1;for(var X=0;Xse&&X>0){var K=(G[X][0]-se)/(G[X][0]-G[X-1][0]);return G[X][1]*(1-K)+K*G[X-1][1]}}return 1}function B(se,G){for(var X=i({colormap:se,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),H=0;H<256;++H){for(var Y=X[H],q=0;q<3;++q)K[4*H+q]=Y[q];G?K[4*H+3]=255*D(H/255,G):K[4*H+3]=255*Y[3]}return g(K,[256,256,4],[4,0,1])}function F(se){for(var G=se.length,X=new Array(G),K=0;K0){var we=this.triShader;we.bind(),we.uniforms=Z,this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var we=this.lineShader;we.bind(),we.uniforms=Z,this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var we=this.pointShader;we.bind(),we.uniforms=Z,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var we=this.contourShader;we.bind(),we.uniforms=Z,this.contourVAO.bind(),G.drawArrays(G.LINES,0,this.contourCount),this.contourVAO.unbind()}},O.drawPick=function(se){se=se||{};for(var G=this.gl,X=se.model||z,K=se.view||z,H=se.projection||z,Y=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)Y[0][q]=Math.max(Y[0][q],this.clipBounds[0][q]),Y[1][q]=Math.min(Y[1][q],this.clipBounds[1][q]);this._model=[].slice.call(X),this._view=[].slice.call(K),this._projection=[].slice.call(H),this._resolution=[G.drawingBufferWidth,G.drawingBufferHeight];var Z={model:X,view:K,projection:H,clipBounds:Y,pickId:this.pickId/255},ee=this.pickShader;if(ee.bind(),ee.uniforms=Z,this.triangleCount>0&&(this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ee=this.pointPickShader;ee.bind(),ee.uniforms=Z,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}},O.pick=function(se){if(!se||se.id!==this.pickId)return null;for(var G=se.value[0]+256*se.value[1]+65536*se.value[2],X=this.cells[G],K=this.positions,H=new Array(X.length),Y=0;YMath.abs(u))i.rotate(z,0,0,-f*A*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var I=-_.zoomSpeed*x*u/window.innerHeight*(z-i.lastT())/20;i.pan(z,0,0,S*(Math.exp(I)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(l,e,t){var n=t(3236),r=t(9405),a=n([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); -}`]),h=u([`precision mediump float; +}`]),o=n([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; @@ -1241,7 +1241,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);s.exports=function(d){return c(d,f,h,null,[{name:"position",type:"vec2"}])}},4100(s,l,n){"use strict";var u=n(4437),c=n(3837),f=n(5445),h=n(4449),d=n(3589),p=n(2260),g=n(7169),m=n(351),y=n(4772),_=n(4040),v=n(799),x=n(2431)({tablet:!0,featureDetect:!0});s.exports={createScene:k,createCamera:u};function E(){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 M(b,S){var A=null;try{A=b.getContext("webgl",S),A||(A=b.getContext("experimental-webgl",S))}catch{return null}return A}function C(b){var S=Math.round(Math.log(Math.abs(b))/Math.log(10));if(S<0){var A=Math.round(Math.pow(10,-S));return Math.ceil(b*A)/A}else if(S>0){var A=Math.round(Math.pow(10,S));return Math.ceil(b/A)*A}return Math.ceil(b)}function w(b){return typeof b=="boolean"?b:!0}function k(b){b=b||{},b.camera=b.camera||{};var S=b.canvas;if(!S)if(S=document.createElement("canvas"),b.container){var A=b.container;A.appendChild(S)}else document.body.appendChild(S);var F=b.gl;if(F||(b.glOptions&&(x=!!b.glOptions.preserveDrawingBuffer),F=M(S,b.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:x})),!F)throw new Error("webgl not supported");var D=b.bounds||[[-10,-10,-10],[10,10,10]],R=new E,P=p(F,F.drawingBufferWidth,F.drawingBufferHeight,{preferFloat:!x}),z=v(F),I=b.cameraObject&&b.cameraObject._ortho===!0||b.camera.projection&&b.camera.projection.type==="orthographic"||!1,L={eye:b.camera.eye||[2,0,0],center:b.camera.center||[0,0,0],up:b.camera.up||[0,1,0],zoomMin:b.camera.zoomMax||.1,zoomMax:b.camera.zoomMin||100,mode:b.camera.mode||"turntable",_ortho:I},B=b.axes||{},O=c(F,B);O.enable=!B.disable;var G=b.spikes||{},$=h(F,G),X=[],Z=[],J=[],N=[],H=!0,j=!0,W=new Array(16),U=new Array(16),V={view:null,projection:W,model:U,_ortho:!1},j=!0,q=[F.drawingBufferWidth,F.drawingBufferHeight],Y=b.cameraObject||u(S,L),K={gl:F,contextLost:!1,pixelRatio:b.pixelRatio||1,canvas:S,selection:R,camera:Y,axes:O,axesPixels:null,spikes:$,bounds:D,objects:X,shape:q,aspect:b.aspectRatio||[1,1,1],pickRadius:b.pickRadius||10,zNear:b.zNear||.01,zFar:b.zFar||1e3,fovy:b.fovy||Math.PI/4,clearColor:b.clearColor||[0,0,0,0],autoResize:w(b.autoResize),autoBounds:w(b.autoBounds),autoScale:!!b.autoScale,autoCenter:w(b.autoCenter),clipToBounds:w(b.clipToBounds),snapToData:!!b.snapToData,onselect:b.onselect||null,onrender:b.onrender||null,onclick:b.onclick||null,cameraParams:V,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(oe){this.aspect[0]=oe.x,this.aspect[1]=oe.y,this.aspect[2]=oe.z,j=!0},setBounds:function(oe,te){this.bounds[0][oe]=te.min,this.bounds[1][oe]=te.max},setClearColor:function(oe){this.clearColor=oe},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)}},re=[F.drawingBufferWidth/K.pixelRatio|0,F.drawingBufferHeight/K.pixelRatio|0];function se(){if(!K._stopped&&K.autoResize){var oe=S.parentNode,te=1,ie=1;oe&&oe!==document.body?(te=oe.clientWidth,ie=oe.clientHeight):(te=window.innerWidth,ie=window.innerHeight);var ee=Math.ceil(te*K.pixelRatio)|0,ce=Math.ceil(ie*K.pixelRatio)|0;if(ee!==S.width||ce!==S.height){S.width=ee,S.height=ce;var _e=S.style;_e.position=_e.position||"absolute",_e.left="0px",_e.top="0px",_e.width=te+"px",_e.height=ie+"px",H=!0}}}K.autoResize&&se(),window.addEventListener("resize",se);function le(){for(var oe=X.length,te=N.length,ie=0;ie0&&J[te-1]===0;)J.pop(),N.pop().dispose()}K.update=function(oe){K._stopped||(oe=oe||{},H=!0,j=!0)},K.add=function(oe){K._stopped||(oe.axes=O,X.push(oe),Z.push(-1),H=!0,j=!0,le())},K.remove=function(oe){if(!K._stopped){var te=X.indexOf(oe);te<0||(X.splice(te,1),Z.pop(),H=!0,j=!0,le())}},K.dispose=function(){if(!K._stopped&&(K._stopped=!0,window.removeEventListener("resize",se),S.removeEventListener("webglcontextlost",ue),K.mouseListener.enabled=!1,!K.contextLost)){O.dispose(),$.dispose();for(var oe=0;oeR.distance)continue;for(var Ge=0;Ge1e-6?(x=Math.acos(E),M=Math.sin(x),C=Math.sin((1-f)*x)/M,w=Math.sin(f*x)/M):(C=1-f,w=f),n[0]=C*h+w*m,n[1]=C*d+w*y,n[2]=C*p+w*_,n[3]=C*g+w*v,n}},5964(s){"use strict";s.exports=function(l){return!l&&l!==0?"":l.toString()}},9366(s,l,n){"use strict";var u=n(4359);s.exports=f;var c={};function f(h,d,p){var g=[d.style,d.weight,d.variant,d.family].join("_"),m=c[g];if(m||(m=c[g]={}),h in m)return m[h];var y={textAlign:"center",textBaseline:"middle",lineHeight:1,font:d.family,fontStyle:d.style,fontWeight:d.weight,fontVariant:d.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};y.triangles=!0;var _=u(h,y);y.triangles=!1;var v=u(h,y),x,E;if(p&&p!==1){for(x=0;x<_.positions.length;++x)for(E=0;E<_.positions[x].length;++E)_.positions[x][E]/=p;for(x=0;x0){var x=Math.round(Math.pow(10,A));return Math.ceil(u/x)*x}return Math.ceil(u)}function _(u){return typeof u=="boolean"?u:!0}function T(u){u=u||{},u.camera=u.camera||{};var A=u.canvas;if(!A)if(A=document.createElement("canvas"),u.container){var x=u.container;x.appendChild(A)}else document.body.appendChild(A);var z=u.gl;if(z||(u.glOptions&&(w=!!u.glOptions.preserveDrawingBuffer),z=M(A,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!z)throw new Error("webgl not supported");var I=u.bounds||[[-10,-10,-10],[10,10,10]],O=new S,D=c(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!w}),B=i(z),F=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:F},j=u.axes||{},U=r(z,j);U.enable=!j.disable;var $=u.spikes||{},Q=o(z,$),re=[],ne=[],se=[],G=[],X=!0,q=!0,K=new Array(16),H=new Array(16),Y={view:null,projection:K,model:H,_ortho:!1},q=!0,Z=[z.drawingBufferWidth,z.drawingBufferHeight],ee=u.cameraObject||n(A,P),ae={gl:z,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:A,selection:O,camera:ee,axes:U,axesPixels:null,spikes:Q,bounds:I,objects:re,shape:Z,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:_(u.autoResize),autoBounds:_(u.autoBounds),autoScale:!!u.autoScale,autoCenter:_(u.autoCenter),clipToBounds:_(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:Y,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(_e){this.aspect[0]=_e.x,this.aspect[1]=_e.y,this.aspect[2]=_e.z,q=!0},setBounds:function(_e,ce){this.bounds[0][_e]=ce.min,this.bounds[1][_e]=ce.max},setClearColor:function(_e){this.clearColor=_e},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)}},he=[z.drawingBufferWidth/ae.pixelRatio|0,z.drawingBufferHeight/ae.pixelRatio|0];function xe(){if(!ae._stopped&&ae.autoResize){var _e=A.parentNode,ce=1,ve=1;_e&&_e!==document.body?(ce=_e.clientWidth,ve=_e.clientHeight):(ce=window.innerWidth,ve=window.innerHeight);var le=Math.ceil(ce*ae.pixelRatio)|0,Ae=Math.ceil(ve*ae.pixelRatio)|0;if(le!==A.width||Ae!==A.height){A.width=le,A.height=Ae;var Be=A.style;Be.position=Be.position||"absolute",Be.left="0px",Be.top="0px",Be.width=ce+"px",Be.height=ve+"px",X=!0}}}ae.autoResize&&xe(),window.addEventListener("resize",xe);function we(){for(var _e=re.length,ce=G.length,ve=0;ve0&&se[ce-1]===0;)se.pop(),G.pop().dispose()}ae.update=function(_e){ae._stopped||(_e=_e||{},X=!0,q=!0)},ae.add=function(_e){ae._stopped||(_e.axes=U,re.push(_e),ne.push(-1),X=!0,q=!0,we())},ae.remove=function(_e){if(!ae._stopped){var ce=re.indexOf(_e);ce<0||(re.splice(ce,1),ne.pop(),X=!0,q=!0,we())}},ae.dispose=function(){if(!ae._stopped&&(ae._stopped=!0,window.removeEventListener("resize",xe),A.removeEventListener("webglcontextlost",Me),ae.mouseListener.enabled=!1,!ae.contextLost)){U.dispose(),Q.dispose();for(var _e=0;_eO.distance)continue;for(var gt=0;gt1e-6?(w=Math.acos(S),M=Math.sin(w),C=Math.sin((1-a)*w)/M,_=Math.sin(a*w)/M):(C=1-a,_=a),t[0]=C*o+_*h,t[1]=C*s+_*v,t[2]=C*c+_*g,t[3]=C*m+_*i,t}},5964:function(l){"use strict";l.exports=function(e){return!e&&e!==0?"":e.toString()}},9366:function(l,e,t){"use strict";var n=t(4359);l.exports=a;var r={};function a(o,s,c){var m=[s.style,s.weight,s.variant,s.family].join("_"),h=r[m];if(h||(h=r[m]={}),o in h)return h[o];var v={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};v.triangles=!0;var g=n(o,v);v.triangles=!1;var i=n(o,v),w,S;if(c&&c!==1){for(w=0;w1?1:U}function T(U,V,j,q,Y,K,re,se,le,ue,fe,pe){this.gl=U,this.pixelRatio=1,this.shader=V,this.orthoShader=j,this.projectShader=q,this.pointBuffer=Y,this.colorBuffer=K,this.glyphBuffer=re,this.idBuffer=se,this.vao=le,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=ue,this.pickOrthoShader=fe,this.pickProjectShader=pe,this.points=[],this._selectResult=new w(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 b=T.prototype;b.pickSlots=1,b.setPickBase=function(U){this.pickId=U},b.isTransparent=function(){if(this.hasAlpha)return!0;for(var U=0;U<3;++U)if(this.axesProject[U]&&this.projectHasAlpha)return!0;return!1},b.isOpaque=function(){if(!this.hasAlpha)return!0;for(var U=0;U<3;++U)if(this.axesProject[U]&&!this.projectHasAlpha)return!0;return!1};var S=[0,0],A=[0,0,0],F=[0,0,0],D=[0,0,0,1],R=[0,0,0,1],P=y.slice(),z=[0,0,0],I=[[0,0,0],[0,0,0]];function L(U){return U[0]=U[1]=U[2]=0,U}function B(U,V){return U[0]=V[0],U[1]=V[1],U[2]=V[2],U[3]=1,U}function O(U,V,j,q){return U[0]=V[0],U[1]=V[1],U[2]=V[2],U[j]=q,U}function G(U){for(var V=I,j=0;j<2;++j)for(var q=0;q<3;++q)V[j][q]=Math.max(Math.min(U[j][q],1e8),-1e8);return V}function $(U,V,j,q){var Y=V.axesProject,K=V.gl,re=U.uniforms,se=j.model||y,le=j.view||y,ue=j.projection||y,fe=V.axesBounds,pe=G(V.clipBounds),we;V.axes&&V.axes.lastCubeProps?we=V.axes.lastCubeProps.axis:we=[1,1,1],S[0]=2/K.drawingBufferWidth,S[1]=2/K.drawingBufferHeight,U.bind(),re.view=le,re.projection=ue,re.screenSize=S,re.highlightId=V.highlightId,re.highlightScale=V.highlightScale,re.clipBounds=pe,re.pickGroup=V.pickId/255,re.pixelRatio=q;for(var xe=0;xe<3;++xe)if(Y[xe]){re.scale=V.projectScale[xe],re.opacity=V.projectOpacity[xe];for(var he=P,oe=0;oe<16;++oe)he[oe]=0;for(var oe=0;oe<4;++oe)he[5*oe]=1;he[5*xe]=0,we[xe]<0?he[12+xe]=fe[0][xe]:he[12+xe]=fe[1][xe],d(he,se,he),re.model=he;var te=(xe+1)%3,ie=(xe+2)%3,ee=L(A),ce=L(F);ee[te]=1,ce[ie]=1;var _e=C(ue,le,se,B(D,ee)),Se=C(ue,le,se,B(R,ce));if(Math.abs(_e[1])>Math.abs(Se[1])){var Me=_e;_e=Se,Se=Me,Me=ee,ee=ce,ce=Me;var Ue=te;te=ie,ie=Ue}_e[0]<0&&(ee[te]=-1),Se[1]>0&&(ce[ie]=-1);for(var Ge=0,Ze=0,oe=0;oe<4;++oe)Ge+=Math.pow(se[4*te+oe],2),Ze+=Math.pow(se[4*ie+oe],2);ee[te]/=Math.sqrt(Ge),ce[ie]/=Math.sqrt(Ze),re.axes[0]=ee,re.axes[1]=ce,re.fragClipBounds[0]=O(z,pe[0],xe,-1e8),re.fragClipBounds[1]=O(z,pe[1],xe,1e8),V.vao.bind(),V.vao.draw(K.TRIANGLES,V.vertexCount),V.lineWidth>0&&(K.lineWidth(V.lineWidth*q),V.vao.draw(K.LINES,V.lineVertexCount,V.vertexCount)),V.vao.unbind()}}var X=[-1e8,-1e8,-1e8],Z=[1e8,1e8,1e8],J=[X,Z];function N(U,V,j,q,Y,K,re){var se=j.gl;if((K===j.projectHasAlpha||re)&&$(V,j,q,Y),K===j.hasAlpha||re){U.bind();var le=U.uniforms;le.model=q.model||y,le.view=q.view||y,le.projection=q.projection||y,S[0]=2/se.drawingBufferWidth,S[1]=2/se.drawingBufferHeight,le.screenSize=S,le.highlightId=j.highlightId,le.highlightScale=j.highlightScale,le.fragClipBounds=J,le.clipBounds=j.axes.bounds,le.opacity=j.opacity,le.pickGroup=j.pickId/255,le.pixelRatio=Y,j.vao.bind(),j.vao.draw(se.TRIANGLES,j.vertexCount),j.lineWidth>0&&(se.lineWidth(j.lineWidth*Y),j.vao.draw(se.LINES,j.lineVertexCount,j.vertexCount)),j.vao.unbind()}}b.draw=function(U){var V=this.useOrtho?this.orthoShader:this.shader;N(V,this.projectShader,this,U,this.pixelRatio,!1,!1)},b.drawTransparent=function(U){var V=this.useOrtho?this.orthoShader:this.shader;N(V,this.projectShader,this,U,this.pixelRatio,!0,!1)},b.drawPick=function(U){var V=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;N(V,this.pickProjectShader,this,U,1,!0,!0)},b.pick=function(U){if(!U||U.id!==this.pickId)return null;var V=U.value[2]+(U.value[1]<<8)+(U.value[0]<<16);if(V>=this.pointCount||V<0)return null;var j=this.points[V],q=this._selectResult;q.index=V;for(var Y=0;Y<3;++Y)q.position[Y]=q.dataCoordinate[Y]=j[Y];return q},b.highlight=function(U){if(!U)this.highlightId=[1,1,1,1];else{var V=U.index,j=V&255,q=V>>8&255,Y=V>>16&255;this.highlightId=[j/255,q/255,Y/255,0]}};function H(U,V,j,q){var Y;E(U)?V0){var Tt=0,st=ie,Ve=[0,0,0,1],Ye=[0,0,0,1],me=E(we)&&E(we[0]),be=E(oe)&&E(oe[0]);e:for(var q=0;q0?1-Ze[0][0]:at<0?1+Ze[1][0]:1,tt*=tt>0?1-Ze[0][1]:tt<0?1+Ze[1][1]:1;for(var ct=[at,tt],vt=Ue.cells||[],gt=Ue.positions||[],Se=0;Sethis.buffer.length){c.free(this.buffer);for(var E=this.buffer=c.mallocUint8(h(x*v*4)),M=0;ME)for(v=E;vx)for(v=x;v=0){for(var I=z.type.charAt(z.type.length-1)|0,L=new Array(I),B=0;B=0;)O+=1;R[P]=O}var G=new Array(E.length);function $(){w.program=h.program(k,w._vref,w._fref,D,R);for(var X=0;X=0){var b=k.charCodeAt(k.length-1)-48;if(b<2||b>4)throw new u("","Invalid data type for attribute "+w+": "+k);d(m,y,T[0],v,b,x,w)}else if(k.indexOf("mat")>=0){var b=k.charCodeAt(k.length-1)-48;if(b<2||b>4)throw new u("","Invalid data type for attribute "+w+": "+k);p(m,y,T,v,b,x,w)}else throw new u("","Unknown data type for attribute "+w+": "+k);break}}return x}},3327(s,l,n){"use strict";var u=n(216),c=n(8866);s.exports=d;function f(p){return function(){return p}}function h(p,g){for(var m=new Array(p),y=0;y4)throw new c("","Invalid data type");switch(O.charAt(0)){case"b":case"i":p["uniform"+G+"iv"](y[R],P);break;case"v":p["uniform"+G+"fv"](y[R],P);break;default:throw new c("","Unrecognized data type for vector "+name+": "+O)}}else if(O.indexOf("mat")===0&&O.length===4){if(G=O.charCodeAt(O.length-1)-48,G<2||G>4)throw new c("","Invalid uniform dimension type for matrix "+name+": "+O);p["uniformMatrix"+G+"fv"](y[R],!1,P);break}else throw new c("","Unknown uniform data type for "+name+": "+O)}}}}}function x(k,T){if(typeof T!="object")return[[k,T]];var b=[];for(var S in T){var A=T[S],F=k;parseInt(S)+""===S?F+="["+S+"]":F+="."+S,typeof A=="object"?b.push.apply(b,x(F,A)):b.push([F,A])}return b}function E(k){switch(k){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=k.indexOf("vec");if(0<=T&&T<=1&&k.length===4+T){var b=k.charCodeAt(k.length-1)-48;if(b<2||b>4)throw new c("","Invalid data type");return k.charAt(0)==="b"?h(b,!1):h(b,0)}else if(k.indexOf("mat")===0&&k.length===4){var b=k.charCodeAt(k.length-1)-48;if(b<2||b>4)throw new c("","Invalid uniform dimension type for matrix "+name+": "+k);return h(b*b,0)}else throw new c("","Unknown uniform data type for "+name+": "+k)}}function M(k,T,b){if(typeof b=="object"){var S=C(b);Object.defineProperty(k,T,{get:f(S),set:v(b),enumerable:!0,configurable:!1})}else y[b]?Object.defineProperty(k,T,{get:_(b),set:v(b),enumerable:!0,configurable:!1}):k[T]=E(m[b].type)}function C(k){var T;if(Array.isArray(k)){T=new Array(k.length);for(var b=0;b1){m[0]in p||(p[m[0]]=[]),p=p[m[0]];for(var y=1;y1)for(var x=0;x<_.size;++x)m.push({name:_.name.replace("[0]","["+x+"]"),type:v});else m.push({name:_.name,type:v})}}return m}function h(d,p){for(var g=d.getProgramParameter(p,d.ACTIVE_ATTRIBUTES),m=[],y=0;y"u"?n(606):WeakMap,h=new f,d=0;function p(M,C,w,k,T,b,S){this.id=M,this.src=C,this.type=w,this.shader=k,this.count=b,this.programs=[],this.cache=S}p.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,C=M.gl,w=this.programs,k=0,T=w.length;k1?1:H}function f(H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie){this.gl=H,this.pixelRatio=1,this.shader=Y,this.orthoShader=q,this.projectShader=Z,this.pointBuffer=ee,this.colorBuffer=ae,this.glyphBuffer=he,this.idBuffer=xe,this.vao=we,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=Me,this.pickOrthoShader=Se,this.pickProjectShader=Ie,this.points=[],this._selectResult=new _(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=f.prototype;u.pickSlots=1,u.setPickBase=function(H){this.pickId=H},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&!this.projectHasAlpha)return!0;return!1};var A=[0,0],x=[0,0,0],z=[0,0,0],I=[0,0,0,1],O=[0,0,0,1],D=v.slice(),B=[0,0,0],F=[[0,0,0],[0,0,0]];function P(H){return H[0]=H[1]=H[2]=0,H}function j(H,Y){return H[0]=Y[0],H[1]=Y[1],H[2]=Y[2],H[3]=1,H}function U(H,Y,q,Z){return H[0]=Y[0],H[1]=Y[1],H[2]=Y[2],H[q]=Z,H}function $(H){for(var Y=F,q=0;q<2;++q)for(var Z=0;Z<3;++Z)Y[q][Z]=Math.max(Math.min(H[q][Z],1e8),-1e8);return Y}function Q(H,Y,q,Z){var ee=Y.axesProject,ae=Y.gl,he=H.uniforms,xe=q.model||v,we=q.view||v,Me=q.projection||v,Se=Y.axesBounds,Ie=$(Y.clipBounds),Ve;Y.axes&&Y.axes.lastCubeProps?Ve=Y.axes.lastCubeProps.axis:Ve=[1,1,1],A[0]=2/ae.drawingBufferWidth,A[1]=2/ae.drawingBufferHeight,H.bind(),he.view=we,he.projection=Me,he.screenSize=A,he.highlightId=Y.highlightId,he.highlightScale=Y.highlightScale,he.clipBounds=Ie,he.pickGroup=Y.pickId/255,he.pixelRatio=Z;for(var Ge=0;Ge<3;++Ge)if(ee[Ge]){he.scale=Y.projectScale[Ge],he.opacity=Y.projectOpacity[Ge];for(var ke=D,_e=0;_e<16;++_e)ke[_e]=0;for(var _e=0;_e<4;++_e)ke[5*_e]=1;ke[5*Ge]=0,Ve[Ge]<0?ke[12+Ge]=Se[0][Ge]:ke[12+Ge]=Se[1][Ge],s(ke,xe,ke),he.model=ke;var ce=(Ge+1)%3,ve=(Ge+2)%3,le=P(x),Ae=P(z);le[ce]=1,Ae[ve]=1;var Be=C(Me,we,xe,j(I,le)),Xe=C(Me,we,xe,j(O,Ae));if(Math.abs(Be[1])>Math.abs(Xe[1])){var Ye=Be;Be=Xe,Xe=Ye,Ye=le,le=Ae,Ae=Ye;var yt=ce;ce=ve,ve=yt}Be[0]<0&&(le[ce]=-1),Xe[1]>0&&(Ae[ve]=-1);for(var gt=0,Tt=0,_e=0;_e<4;++_e)gt+=Math.pow(xe[4*ce+_e],2),Tt+=Math.pow(xe[4*ve+_e],2);le[ce]/=Math.sqrt(gt),Ae[ve]/=Math.sqrt(Tt),he.axes[0]=le,he.axes[1]=Ae,he.fragClipBounds[0]=U(B,Ie[0],Ge,-1e8),he.fragClipBounds[1]=U(B,Ie[1],Ge,1e8),Y.vao.bind(),Y.vao.draw(ae.TRIANGLES,Y.vertexCount),Y.lineWidth>0&&(ae.lineWidth(Y.lineWidth*Z),Y.vao.draw(ae.LINES,Y.lineVertexCount,Y.vertexCount)),Y.vao.unbind()}}var re=[-1e8,-1e8,-1e8],ne=[1e8,1e8,1e8],se=[re,ne];function G(H,Y,q,Z,ee,ae,he){var xe=q.gl;if((ae===q.projectHasAlpha||he)&&Q(Y,q,Z,ee),ae===q.hasAlpha||he){H.bind();var we=H.uniforms;we.model=Z.model||v,we.view=Z.view||v,we.projection=Z.projection||v,A[0]=2/xe.drawingBufferWidth,A[1]=2/xe.drawingBufferHeight,we.screenSize=A,we.highlightId=q.highlightId,we.highlightScale=q.highlightScale,we.fragClipBounds=se,we.clipBounds=q.axes.bounds,we.opacity=q.opacity,we.pickGroup=q.pickId/255,we.pixelRatio=ee,q.vao.bind(),q.vao.draw(xe.TRIANGLES,q.vertexCount),q.lineWidth>0&&(xe.lineWidth(q.lineWidth*ee),q.vao.draw(xe.LINES,q.lineVertexCount,q.vertexCount)),q.vao.unbind()}}u.draw=function(H){var Y=this.useOrtho?this.orthoShader:this.shader;G(Y,this.projectShader,this,H,this.pixelRatio,!1,!1)},u.drawTransparent=function(H){var Y=this.useOrtho?this.orthoShader:this.shader;G(Y,this.projectShader,this,H,this.pixelRatio,!0,!1)},u.drawPick=function(H){var Y=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;G(Y,this.pickProjectShader,this,H,1,!0,!0)},u.pick=function(H){if(!H||H.id!==this.pickId)return null;var Y=H.value[2]+(H.value[1]<<8)+(H.value[0]<<16);if(Y>=this.pointCount||Y<0)return null;var q=this.points[Y],Z=this._selectResult;Z.index=Y;for(var ee=0;ee<3;++ee)Z.position[ee]=Z.dataCoordinate[ee]=q[ee];return Z},u.highlight=function(H){if(!H)this.highlightId=[1,1,1,1];else{var Y=H.index,q=Y&255,Z=Y>>8&255,ee=Y>>16&255;this.highlightId=[q/255,Z/255,ee/255,0]}};function X(H,Y,q,Z){var ee;S(H)?Y0){var or=0,Ot=ve,vt=[0,0,0,1],ht=[0,0,0,1],De=S(Ve)&&S(Ve[0]),Ne=S(_e)&&S(_e[0]);e:for(var Z=0;Z0?1-Tt[0][0]:Pt<0?1+Tt[1][0]:1,Ct*=Ct>0?1-Tt[0][1]:Ct<0?1+Tt[1][1]:1;for(var qt=[Pt,Ct],Yt=yt.cells||[],Rt=yt.positions||[],Xe=0;Xethis.buffer.length){r.free(this.buffer);for(var S=this.buffer=r.mallocUint8(o(w*i*4)),M=0;MS)for(i=S;iw)for(i=w;i=0){for(var F=B.type.charAt(B.type.length-1)|0,P=new Array(F),j=0;j=0;)U+=1;O[D]=U}var $=new Array(S.length);function Q(){_.program=o.program(T,_._vref,_._fref,I,O);for(var re=0;re=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+T);s(h,v,f[0],i,u,w,_)}else if(T.indexOf("mat")>=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+T);c(h,v,f,i,u,w,_)}else throw new n("","Unknown data type for attribute "+_+": "+T);break}}return w}},3327:function(l,e,t){"use strict";var n=t(216),r=t(8866);l.exports=s;function a(c){return function(){return c}}function o(c,m){for(var h=new Array(c),v=0;v4)throw new r("","Invalid data type");switch(U.charAt(0)){case"b":case"i":c["uniform"+$+"iv"](v[O],D);break;case"v":c["uniform"+$+"fv"](v[O],D);break;default:throw new r("","Unrecognized data type for vector "+name+": "+U)}}else if(U.indexOf("mat")===0&&U.length===4){if($=U.charCodeAt(U.length-1)-48,$<2||$>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+U);c["uniformMatrix"+$+"fv"](v[O],!1,D);break}else throw new r("","Unknown uniform data type for "+name+": "+U)}}}}}function w(T,f){if(typeof f!="object")return[[T,f]];var u=[];for(var A in f){var x=f[A],z=T;parseInt(A)+""===A?z+="["+A+"]":z+="."+A,typeof x=="object"?u.push.apply(u,w(z,x)):u.push([z,x])}return u}function S(T){switch(T){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var f=T.indexOf("vec");if(0<=f&&f<=1&&T.length===4+f){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid data type");return T.charAt(0)==="b"?o(u,!1):o(u,0)}else if(T.indexOf("mat")===0&&T.length===4){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+T);return o(u*u,0)}else throw new r("","Unknown uniform data type for "+name+": "+T)}}function M(T,f,u){if(typeof u=="object"){var A=C(u);Object.defineProperty(T,f,{get:a(A),set:i(u),enumerable:!0,configurable:!1})}else v[u]?Object.defineProperty(T,f,{get:g(u),set:i(u),enumerable:!0,configurable:!1}):T[f]=S(h[u].type)}function C(T){var f;if(Array.isArray(T)){f=new Array(T.length);for(var u=0;u1){h[0]in c||(c[h[0]]=[]),c=c[h[0]];for(var v=1;v1)for(var w=0;w"u"?t(606):WeakMap,o=new a,s=0;function c(M,C,_,T,f,u,A){this.id=M,this.src=C,this.type=_,this.shader=T,this.count=u,this.programs=[],this.cache=A}c.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,C=M.gl,_=this.programs,T=0,f=_.length;T0)for(var N=0;NC)return k-1}return k},g=function(M,C,w){return Mw?w:M},m=function(M,C,w){var k=C.vectors,T=C.meshgrid,b=M[0],S=M[1],A=M[2],F=T[0].length,D=T[1].length,R=T[2].length,P=p(T[0],b),z=p(T[1],S),I=p(T[2],A),L=P+1,B=z+1,O=I+1;if(P=g(P,0,F-1),L=g(L,0,F-1),z=g(z,0,D-1),B=g(B,0,D-1),I=g(I,0,R-1),O=g(O,0,R-1),P<0||z<0||I<0||L>F-1||B>D-1||O>R-1)return u.create();var G=T[0][P],$=T[0][L],X=T[1][z],Z=T[1][B],J=T[2][I],N=T[2][O],H=(b-G)/($-G),W=(S-X)/(Z-X),U=(A-J)/(N-J);isFinite(H)||(H=.5),isFinite(W)||(W=.5),isFinite(U)||(U=.5);var V,j,q,Y,K,re;switch(w.reversedX&&(P=F-1-P,L=F-1-L),w.reversedY&&(z=D-1-z,B=D-1-B),w.reversedZ&&(I=R-1-I,O=R-1-O),w.filled){case 5:K=I,re=O,q=z*R,Y=B*R,V=P*R*D,j=L*R*D;break;case 4:K=I,re=O,V=P*R,j=L*R,q=z*R*F,Y=B*R*F;break;case 3:q=z,Y=B,K=I*D,re=O*D,V=P*D*R,j=L*D*R;break;case 2:q=z,Y=B,V=P*D,j=L*D,K=I*D*F,re=O*D*F;break;case 1:V=P,j=L,K=I*F,re=O*F,q=z*F*R,Y=B*F*R;break;default:V=P,j=L,q=z*F,Y=B*F,K=I*F*D,re=O*F*D;break}var se=k[V+q+K],le=k[V+q+re],ue=k[V+Y+K],fe=k[V+Y+re],pe=k[j+q+K],we=k[j+q+re],xe=k[j+Y+K],he=k[j+Y+re],oe=u.create(),te=u.create(),ie=u.create(),ee=u.create();u.lerp(oe,se,pe,H),u.lerp(te,le,we,H),u.lerp(ie,ue,xe,H),u.lerp(ee,fe,he,H);var ce=u.create(),_e=u.create();u.lerp(ce,oe,ie,W),u.lerp(_e,te,ee,W);var Se=u.create();return u.lerp(Se,ce,_e,U),Se},y=function(M,C){var w=C[0],k=C[1],T=C[2];return M[0]=w<0?-w:w,M[1]=k<0?-k:k,M[2]=T<0?-T:T,M},_=function(M){var C=1/0;M.sort(function(b,S){return b-S});for(var w=M.length,k=1;kL||heB||oeO)},$=u.distance(C[0],C[1]),X=10*$/k,Z=X*X,J=1,N=0,H=w.length;H>1&&(J=v(w));for(var W=0;WN&&(N=se),K.push(se),R.push({points:V,velocities:j,divergences:K});for(var le=0;leZ&&u.scale(ue,ue,X/Math.sqrt(fe)),u.add(ue,ue,U),q=F(ue),u.squaredDistance(Y,ue)-Z>-1e-4*Z){V.push(ue),Y=ue,j.push(q);var re=D(ue,q),se=u.length(re);isFinite(se)&&se>N&&(N=se),K.push(se)}U=ue}}var pe=d(R,M.colormap,N,J);return b?pe.tubeScale=b:(N===0&&(N=1),pe.tubeScale=T*.5*J/N),pe};var x=n(6740),E=n(6405).createMesh;s.exports.createTubeMesh=function(M,C){return E(M,C,{shaders:x,traceType:"streamtube"})}},990(s,l,n){var u=n(9405),c=n(3236),f=c([`precision highp float; +}`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(l,e,t){"use strict";var n=t(2931),r=t(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(M,C,_,T){for(var f=M.points,u=M.velocities,A=M.divergences,x=[],z=[],I=[],O=[],D=[],B=[],F=0,P=0,j=r.create(),U=r.create(),$=8,Q=0;Q0)for(var G=0;G<$;G++){var X=(G+1)%$;x.push(O[G],D[G],D[X],D[X],O[X],O[G]),I.push(U,j,j,j,U,U),B.push(F,P,P,P,F,F);var K=x.length;z.push([K-6,K-5,K-4],[K-3,K-2,K-1])}var H=O;O=D,D=H;var Y=U;U=j,j=Y;var q=F;F=P,P=q}return{positions:x,cells:z,vectors:I,vertexIntensity:B}},s=function(M,C,_,T){for(var f=0,u=0;uC)return T-1}return T},m=function(M,C,_){return M_?_:M},h=function(M,C,_){var T=C.vectors,f=C.meshgrid,u=M[0],A=M[1],x=M[2],z=f[0].length,I=f[1].length,O=f[2].length,D=c(f[0],u),B=c(f[1],A),F=c(f[2],x),P=D+1,j=B+1,U=F+1;if(D=m(D,0,z-1),P=m(P,0,z-1),B=m(B,0,I-1),j=m(j,0,I-1),F=m(F,0,O-1),U=m(U,0,O-1),D<0||B<0||F<0||P>z-1||j>I-1||U>O-1)return n.create();var $=f[0][D],Q=f[0][P],re=f[1][B],ne=f[1][j],se=f[2][F],G=f[2][U],X=(u-$)/(Q-$),K=(A-re)/(ne-re),H=(x-se)/(G-se);isFinite(X)||(X=.5),isFinite(K)||(K=.5),isFinite(H)||(H=.5);var Y,q,Z,ee,ae,he;switch(_.reversedX&&(D=z-1-D,P=z-1-P),_.reversedY&&(B=I-1-B,j=I-1-j),_.reversedZ&&(F=O-1-F,U=O-1-U),_.filled){case 5:ae=F,he=U,Z=B*O,ee=j*O,Y=D*O*I,q=P*O*I;break;case 4:ae=F,he=U,Y=D*O,q=P*O,Z=B*O*z,ee=j*O*z;break;case 3:Z=B,ee=j,ae=F*I,he=U*I,Y=D*I*O,q=P*I*O;break;case 2:Z=B,ee=j,Y=D*I,q=P*I,ae=F*I*z,he=U*I*z;break;case 1:Y=D,q=P,ae=F*z,he=U*z,Z=B*z*O,ee=j*z*O;break;default:Y=D,q=P,Z=B*z,ee=j*z,ae=F*z*I,he=U*z*I;break}var xe=T[Y+Z+ae],we=T[Y+Z+he],Me=T[Y+ee+ae],Se=T[Y+ee+he],Ie=T[q+Z+ae],Ve=T[q+Z+he],Ge=T[q+ee+ae],ke=T[q+ee+he],_e=n.create(),ce=n.create(),ve=n.create(),le=n.create();n.lerp(_e,xe,Ie,X),n.lerp(ce,we,Ve,X),n.lerp(ve,Me,Ge,X),n.lerp(le,Se,ke,X);var Ae=n.create(),Be=n.create();n.lerp(Ae,_e,ve,K),n.lerp(Be,ce,le,K);var Xe=n.create();return n.lerp(Xe,Ae,Be,H),Xe},v=function(M,C){var _=C[0],T=C[1],f=C[2];return M[0]=_<0?-_:_,M[1]=T<0?-T:T,M[2]=f<0?-f:f,M},g=function(M){var C=1/0;M.sort(function(u,A){return u-A});for(var _=M.length,T=1;T<_;T++){var f=Math.abs(M[T]-M[T-1]);fP||kej||_eU)},Q=n.distance(C[0],C[1]),re=10*Q/T,ne=re*re,se=1,G=0,X=_.length;X>1&&(se=i(_));for(var K=0;KG&&(G=xe),ae.push(xe),O.push({points:Y,velocities:q,divergences:ae});for(var we=0;wene&&n.scale(Me,Me,re/Math.sqrt(Se)),n.add(Me,Me,H),Z=z(Me),n.squaredDistance(ee,Me)-ne>-1e-4*ne){Y.push(Me),ee=Me,q.push(Z);var he=I(Me,Z),xe=n.length(he);isFinite(xe)&&xe>G&&(G=xe),ae.push(xe)}H=Me}}var Ie=s(O,M.colormap,G,se);return u?Ie.tubeScale=u:(G===0&&(G=1),Ie.tubeScale=f*.5*se/G),Ie};var w=t(6740),S=t(6405).createMesh;l.exports.createTubeMesh=function(M,C){return S(M,C,{shaders:w,traceType:"streamtube"})}},990:function(l,e,t){var n=t(9405),r=t(3236),a=r([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1822,7 +1822,7 @@ void main() { eyeDirection = eyePosition - cameraCoordinate.xyz; surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); } -`]),h=c([`precision highp float; +`]),o=r([`precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { @@ -1902,7 +1902,7 @@ void main() { gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; } -`]),d=c([`precision highp float; +`]),s=r([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1941,7 +1941,7 @@ void main() { eyeDirection = vec3(0,1,0); lightDirection = vec3(0,0,1); } -`]),p=c([`precision highp float; +`]),c=r([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1988,13 +1988,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);l.createShader=function(g){var m=u(g,f,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},l.createPickShader=function(g){var m=u(g,f,p,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},l.createContourShader=function(g){var m=u(g,d,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m},l.createPickContourShader=function(g){var m=u(g,d,p,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m}},9499(s,l,n){"use strict";s.exports=V;var u=n(8828),c=n(2762),f=n(8116),h=n(7766),d=n(1888),p=n(6729),g=n(5298),m=n(9994),y=n(9618),_=n(3711),v=n(6760),x=n(7608),E=n(2478),M=n(6199),C=n(990),w=C.createShader,k=C.createContourShader,T=C.createPickShader,b=C.createPickContourShader,S=40,A=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],F=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],D=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var j=0;j<3;++j){var q=D[j],Y=(j+1)%3,K=(j+2)%3;q[Y+0]=1,q[K+3]=1,q[j+6]=1}})();function R(j,q,Y,K,re){this.position=j,this.index=q,this.uv=Y,this.level=K,this.dataCoordinate=re}var P=256;function z(j,q,Y,K,re,se,le,ue,fe,pe,we,xe,he,oe,te){this.gl=j,this.shape=q,this.bounds=Y,this.objectOffset=te,this.intensityBounds=[],this._shader=K,this._pickShader=re,this._coordinateBuffer=se,this._vao=le,this._colorMap=ue,this._contourShader=fe,this._contourPickShader=pe,this._contourBuffer=we,this._contourVAO=xe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new R([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=he,this._dynamicVAO=oe,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[y(d.mallocFloat(1024),[0,0]),y(d.mallocFloat(1024),[0,0]),y(d.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var I=z.prototype;I.genColormap=function(j,q){var Y=!1,K=m([p({colormap:j,nshades:P,format:"rgba"}).map(function(re,se){var le=q?L(se/255,q):re[3];return le<1&&(Y=!0),[re[0],re[1],re[2],255*le]})]);return g.divseq(K,255),this.hasAlphaScale=Y,K},I.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},I.isOpaque=function(){return!this.isTransparent()},I.pickSlots=1,I.setPickBase=function(j){this.pickId=j};function L(j,q){if(!q||!q.length)return 1;for(var Y=0;Yj&&Y>0){var K=(q[Y][0]-j)/(q[Y][0]-q[Y-1][0]);return q[Y][1]*(1-K)+K*q[Y-1][1]}}return 1}var B=[0,0,0],O={showSurface:!1,showContour:!1,projections:[A.slice(),A.slice(),A.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function G(j,q){var Y,K,re,se=q.axes&&q.axes.lastCubeProps.axis||B,le=q.showSurface,ue=q.showContour;for(Y=0;Y<3;++Y)for(le=le||q.surfaceProject[Y],K=0;K<3;++K)ue=ue||q.contourProject[Y][K];for(Y=0;Y<3;++Y){var fe=O.projections[Y];for(K=0;K<16;++K)fe[K]=0;for(K=0;K<4;++K)fe[5*K]=1;fe[5*Y]=0,fe[12+Y]=q.axesBounds[+(se[Y]>0)][Y],v(fe,j.model,fe);var pe=O.clipBounds[Y];for(re=0;re<2;++re)for(K=0;K<3;++K)pe[re][K]=j.clipBounds[re][K];pe[0][Y]=-1e8,pe[1][Y]=1e8}return O.showSurface=le,O.showContour=ue,O}var $={model:A,view:A,projection:A,inverseModel:A.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},X=A.slice(),Z=[1,0,0,0,1,0,0,0,1];function J(j,q){j=j||{};var Y=this.gl;Y.disable(Y.CULL_FACE),this._colorMap.bind(0);var K=$;K.model=j.model||A,K.view=j.view||A,K.projection=j.projection||A,K.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],K.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],K.objectOffset=this.objectOffset,K.contourColor=this.contourColor[0],K.inverseModel=x(K.inverseModel,K.model);for(var re=0;re<2;++re)for(var se=K.clipBounds[re],le=0;le<3;++le)se[le]=Math.min(Math.max(this.clipBounds[re][le],-1e8),1e8);K.kambient=this.ambientLight,K.kdiffuse=this.diffuseLight,K.kspecular=this.specularLight,K.roughness=this.roughness,K.fresnel=this.fresnel,K.opacity=this.opacity,K.height=0,K.permutation=Z,K.vertexColor=this.vertexColor;var ue=X;for(v(ue,K.view,K.model),v(ue,K.projection,ue),x(ue,ue),re=0;re<3;++re)K.eyePosition[re]=ue[12+re]/ue[15];var fe=ue[15];for(re=0;re<3;++re)fe+=this.lightPosition[re]*ue[4*re+3];for(re=0;re<3;++re){var pe=ue[12+re];for(le=0;le<3;++le)pe+=ue[4*le+re]*this.lightPosition[le];K.lightPosition[re]=pe/fe}var we=G(K,this);if(we.showSurface){for(this._shader.bind(),this._shader.uniforms=K,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Y.TRIANGLES,this._vertexCount),re=0;re<3;++re)!this.surfaceProject[re]||!this.vertexCount||(this._shader.uniforms.model=we.projections[re],this._shader.uniforms.clipBounds=we.clipBounds[re],this._vao.draw(Y.TRIANGLES,this._vertexCount));this._vao.unbind()}if(we.showContour){var xe=this._contourShader;K.kambient=1,K.kdiffuse=0,K.kspecular=0,K.opacity=1,xe.bind(),xe.uniforms=K;var he=this._contourVAO;for(he.bind(),re=0;re<3;++re)for(xe.uniforms.permutation=D[re],Y.lineWidth(this.contourWidth[re]*this.pixelRatio),le=0;le>4)/16)/255,re=Math.floor(K),se=K-re,le=q[1]*(j.value[1]+(j.value[2]&15)/16)/255,ue=Math.floor(le),fe=le-ue;re+=1,ue+=1;var pe=Y.position;pe[0]=pe[1]=pe[2]=0;for(var we=0;we<2;++we)for(var xe=we?se:1-se,he=0;he<2;++he)for(var oe=he?fe:1-fe,te=re+we,ie=ue+he,ee=xe*oe,ce=0;ce<3;++ce)pe[ce]+=this._field[ce].get(te,ie)*ee;for(var _e=this._pickResult.level,Se=0;Se<3;++Se)if(_e[Se]=E.le(this.contourLevels[Se],pe[Se]),_e[Se]<0)this.contourLevels[Se].length>0&&(_e[Se]=0);else if(_e[Se]Math.abs(Ue-pe[Se])&&(_e[Se]+=1)}for(Y.index[0]=se<.5?re:re+1,Y.index[1]=fe<.5?ue:ue+1,Y.uv[0]=K/q[0],Y.uv[1]=le/q[1],ce=0;ce<3;++ce)Y.dataCoordinate[ce]=this._field[ce].get(Y.index[0],Y.index[1]);return Y},I.padField=function(j,q){var Y=q.shape.slice(),K=j.shape.slice();g.assign(j.lo(1,1).hi(Y[0],Y[1]),q),g.assign(j.lo(1).hi(Y[0],1),q.hi(Y[0],1)),g.assign(j.lo(1,K[1]-1).hi(Y[0],1),q.lo(0,Y[1]-1).hi(Y[0],1)),g.assign(j.lo(0,1).hi(1,Y[1]),q.hi(1)),g.assign(j.lo(K[0]-1,1).hi(1,Y[1]),q.lo(Y[0]-1)),j.set(0,0,q.get(0,0)),j.set(0,K[1]-1,q.get(0,Y[1]-1)),j.set(K[0]-1,0,q.get(Y[0]-1,0)),j.set(K[0]-1,K[1]-1,q.get(Y[0]-1,Y[1]-1))};function H(j,q){return Array.isArray(j)?[q(j[0]),q(j[1]),q(j[2])]:[q(j),q(j),q(j)]}function W(j){return Array.isArray(j)?j.length===3?[j[0],j[1],j[2],1]:[j[0],j[1],j[2],j[3]]:[0,0,0,1]}function U(j){if(Array.isArray(j)){if(Array.isArray(j))return[W(j[0]),W(j[1]),W(j[2])];var q=W(j);return[q.slice(),q.slice(),q.slice()]}}I.update=function(j){j=j||{},this.objectOffset=j.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in j&&(this.contourWidth=H(j.contourWidth,Number)),"showContour"in j&&(this.showContour=H(j.showContour,Boolean)),"showSurface"in j&&(this.showSurface=!!j.showSurface),"contourTint"in j&&(this.contourTint=H(j.contourTint,Boolean)),"contourColor"in j&&(this.contourColor=U(j.contourColor)),"contourProject"in j&&(this.contourProject=H(j.contourProject,function(ia){return H(ia,Boolean)})),"surfaceProject"in j&&(this.surfaceProject=j.surfaceProject),"dynamicColor"in j&&(this.dynamicColor=U(j.dynamicColor)),"dynamicTint"in j&&(this.dynamicTint=H(j.dynamicTint,Number)),"dynamicWidth"in j&&(this.dynamicWidth=H(j.dynamicWidth,Number)),"opacity"in j&&(this.opacity=j.opacity),"opacityscale"in j&&(this.opacityscale=j.opacityscale),"colorBounds"in j&&(this.colorBounds=j.colorBounds),"vertexColor"in j&&(this.vertexColor=j.vertexColor?1:0),"colormap"in j&&this._colorMap.setPixels(this.genColormap(j.colormap,this.opacityscale));var q=j.field||j.coords&&j.coords[2]||null,Y=!1;if(q||(this._field[2].shape[0]||this._field[2].shape[2]?q=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):q=this._field[2].hi(0,0)),"field"in j||"coords"in j){var K=(q.shape[0]+2)*(q.shape[1]+2);K>this._field[2].data.length&&(d.freeFloat(this._field[2].data),this._field[2].data=d.mallocFloat(u.nextPow2(K))),this._field[2]=y(this._field[2].data,[q.shape[0]+2,q.shape[1]+2]),this.padField(this._field[2],q),this.shape=q.shape.slice();for(var re=this.shape,se=0;se<2;++se)this._field[2].size>this._field[se].data.length&&(d.freeFloat(this._field[se].data),this._field[se].data=d.mallocFloat(this._field[2].size)),this._field[se]=y(this._field[se].data,[re[0]+2,re[1]+2]);if(j.coords){var le=j.coords;if(!Array.isArray(le)||le.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(se=0;se<2;++se){var ue=le[se];for(he=0;he<2;++he)if(ue.shape[he]!==re[he])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[se],ue)}}else if(j.ticks){var fe=j.ticks;if(!Array.isArray(fe)||fe.length!==2)throw new Error("gl-surface: invalid ticks");for(se=0;se<2;++se){var pe=fe[se];if((Array.isArray(pe)||pe.length)&&(pe=y(pe)),pe.shape[0]!==re[se])throw new Error("gl-surface: invalid tick length");var we=y(pe.data,re);we.stride[se]=pe.stride[0],we.stride[se^1]=0,this.padField(this._field[se],we)}}else{for(se=0;se<2;++se){var xe=[0,0];xe[se]=1,this._field[se]=y(this._field[se].data,[re[0]+2,re[1]+2],xe,0)}this._field[0].set(0,0,0);for(var he=0;he0){for(var ti=0;ti<5;++ti)At.pop();me-=1}continue e}}}vt.push(me)}this._contourOffsets[ft]=ar,this._contourCounts[ft]=vt}var Ka=d.mallocFloat(At.length);for(se=0;seR||F<0||F>R)throw new Error("gl-texture2d: Invalid texture size");return S._shape=[A,F],S.bind(),D.texImage2D(D.TEXTURE_2D,0,S.format,A,F,0,S.format,S.type,null),S._mipLevels=[0],S}function v(S,A,F,D,R,P){this.gl=S,this.handle=A,this.format=R,this.type=P,this._shape=[F,D],this._mipLevels=[0],this._magFilter=S.NEAREST,this._minFilter=S.NEAREST,this._wrapS=S.CLAMP_TO_EDGE,this._wrapT=S.CLAMP_TO_EDGE,this._anisoSamples=1;var z=this,I=[this._wrapS,this._wrapT];Object.defineProperties(I,[{get:function(){return z._wrapS},set:function(B){return z.wrapS=B}},{get:function(){return z._wrapT},set:function(B){return z.wrapT=B}}]),this._wrapVector=I;var L=[this._shape[0],this._shape[1]];Object.defineProperties(L,[{get:function(){return z._shape[0]},set:function(B){return z.width=B}},{get:function(){return z._shape[1]},set:function(B){return z.height=B}}]),this._shapeVector=L}var x=v.prototype;Object.defineProperties(x,{minFilter:{get:function(){return this._minFilter},set:function(S){this.bind();var A=this.gl;if(this.type===A.FLOAT&&h.indexOf(S)>=0&&(A.getExtension("OES_texture_float_linear")||(S=A.NEAREST)),d.indexOf(S)<0)throw new Error("gl-texture2d: Unknown filter mode "+S);return A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,S),this._minFilter=S}},magFilter:{get:function(){return this._magFilter},set:function(S){this.bind();var A=this.gl;if(this.type===A.FLOAT&&h.indexOf(S)>=0&&(A.getExtension("OES_texture_float_linear")||(S=A.NEAREST)),d.indexOf(S)<0)throw new Error("gl-texture2d: Unknown filter mode "+S);return A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,S),this._magFilter=S}},mipSamples:{get:function(){return this._anisoSamples},set:function(S){var A=this._anisoSamples;if(this._anisoSamples=Math.max(S,1)|0,A!==this._anisoSamples){var F=this.gl.getExtension("EXT_texture_filter_anisotropic");F&&this.gl.texParameterf(this.gl.TEXTURE_2D,F.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(S){if(this.bind(),p.indexOf(S)<0)throw new Error("gl-texture2d: Unknown wrap mode "+S);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,S),this._wrapS=S}},wrapT:{get:function(){return this._wrapT},set:function(S){if(this.bind(),p.indexOf(S)<0)throw new Error("gl-texture2d: Unknown wrap mode "+S);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,S),this._wrapT=S}},wrap:{get:function(){return this._wrapVector},set:function(S){if(Array.isArray(S)||(S=[S,S]),S.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var A=0;A<2;++A)if(p.indexOf(S[A])<0)throw new Error("gl-texture2d: Unknown wrap mode "+S);this._wrapS=S[0],this._wrapT=S[1];var F=this.gl;return this.bind(),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,this._wrapS),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_T,this._wrapT),S}},shape:{get:function(){return this._shapeVector},set:function(S){if(!Array.isArray(S))S=[S|0,S|0];else if(S.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return _(this,S[0]|0,S[1]|0),[S[0]|0,S[1]|0]}},width:{get:function(){return this._shape[0]},set:function(S){return S=S|0,_(this,S,this._shape[1]),S}},height:{get:function(){return this._shape[1]},set:function(S){return S=S|0,_(this,this._shape[0],S),S}}}),x.bind=function(S){var A=this.gl;return S!==void 0&&A.activeTexture(A.TEXTURE0+(S|0)),A.bindTexture(A.TEXTURE_2D,this.handle),S!==void 0?S|0:A.getParameter(A.ACTIVE_TEXTURE)-A.TEXTURE0},x.dispose=function(){this.gl.deleteTexture(this.handle)},x.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var S=Math.min(this._shape[0],this._shape[1]),A=0;S>0;++A,S>>>=1)this._mipLevels.indexOf(A)<0&&this._mipLevels.push(A)},x.setPixels=function(S,A,F,D){var R=this.gl;this.bind(),Array.isArray(A)?(D=F,F=A[1]|0,A=A[0]|0):(A=A||0,F=F||0),D=D||0;var P=m(S)?S:S.raw;if(P){var z=this._mipLevels.indexOf(D)<0;z?(R.texImage2D(R.TEXTURE_2D,0,this.format,this.format,this.type,P),this._mipLevels.push(D)):R.texSubImage2D(R.TEXTURE_2D,D,A,F,this.format,this.type,P)}else if(S.shape&&S.stride&&S.data){if(S.shape.length<2||A+S.shape[1]>this._shape[1]>>>D||F+S.shape[0]>this._shape[0]>>>D||A<0||F<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(R,A,F,D,this.format,this.type,this._mipLevels,S)}else throw new Error("gl-texture2d: Unsupported data type")};function E(S,A){return S.length===3?A[2]===1&&A[1]===S[0]*S[2]&&A[0]===S[2]:A[0]===1&&A[1]===S[0]}function M(S,A,F,D,R,P,z,I){var L=I.dtype,B=I.shape.slice();if(B.length<2||B.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var O=0,G=0,$=E(B,I.stride.slice());L==="float32"?O=S.FLOAT:L==="float64"?(O=S.FLOAT,$=!1,L="float32"):L==="uint8"?O=S.UNSIGNED_BYTE:(O=S.UNSIGNED_BYTE,$=!1,L="uint8");var X=1;if(B.length===2)G=S.LUMINANCE,B=[B[0],B[1],1],I=u(I.data,B,[I.stride[0],I.stride[1],1],I.offset);else if(B.length===3){if(B[2]===1)G=S.ALPHA;else if(B[2]===2)G=S.LUMINANCE_ALPHA;else if(B[2]===3)G=S.RGB;else if(B[2]===4)G=S.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");X=B[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((G===S.LUMINANCE||G===S.ALPHA)&&(R===S.LUMINANCE||R===S.ALPHA)&&(G=R),G!==R)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Z=I.size,J=z.indexOf(D)<0;if(J&&z.push(D),O===P&&$)I.offset===0&&I.data.length===Z?J?S.texImage2D(S.TEXTURE_2D,D,R,B[0],B[1],0,R,P,I.data):S.texSubImage2D(S.TEXTURE_2D,D,A,F,B[0],B[1],R,P,I.data):J?S.texImage2D(S.TEXTURE_2D,D,R,B[0],B[1],0,R,P,I.data.subarray(I.offset,I.offset+Z)):S.texSubImage2D(S.TEXTURE_2D,D,A,F,B[0],B[1],R,P,I.data.subarray(I.offset,I.offset+Z));else{var N;P===S.FLOAT?N=f.mallocFloat32(Z):N=f.mallocUint8(Z);var H=u(N,B,[B[2],B[2]*B[0],1]);O===S.FLOAT&&P===S.UNSIGNED_BYTE?y(H,I):c.assign(H,I),J?S.texImage2D(S.TEXTURE_2D,D,R,B[0],B[1],0,R,P,N.subarray(0,Z)):S.texSubImage2D(S.TEXTURE_2D,D,A,F,B[0],B[1],R,P,N.subarray(0,Z)),P===S.FLOAT?f.freeFloat32(N):f.freeUint8(N)}}function C(S){var A=S.createTexture();return S.bindTexture(S.TEXTURE_2D,A),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,S.NEAREST),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,S.NEAREST),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),A}function w(S,A,F,D,R){var P=S.getParameter(S.MAX_TEXTURE_SIZE);if(A<0||A>P||F<0||F>P)throw new Error("gl-texture2d: Invalid texture shape");if(R===S.FLOAT&&!S.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var z=C(S);return S.texImage2D(S.TEXTURE_2D,0,D,A,F,0,D,R,null),new v(S,z,A,F,D,R)}function k(S,A,F,D,R,P){var z=C(S);return S.texImage2D(S.TEXTURE_2D,0,R,R,P,A),new v(S,z,F,D,R,P)}function T(S,A){var F=A.dtype,D=A.shape.slice(),R=S.getParameter(S.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>R||D[1]<0||D[1]>R)throw new Error("gl-texture2d: Invalid texture size");var P=E(D,A.stride.slice()),z=0;F==="float32"?z=S.FLOAT:F==="float64"?(z=S.FLOAT,P=!1,F="float32"):F==="uint8"?z=S.UNSIGNED_BYTE:(z=S.UNSIGNED_BYTE,P=!1,F="uint8");var I=0;if(D.length===2)I=S.LUMINANCE,D=[D[0],D[1],1],A=u(A.data,D,[A.stride[0],A.stride[1],1],A.offset);else if(D.length===3)if(D[2]===1)I=S.ALPHA;else if(D[2]===2)I=S.LUMINANCE_ALPHA;else if(D[2]===3)I=S.RGB;else if(D[2]===4)I=S.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");z===S.FLOAT&&!S.getExtension("OES_texture_float")&&(z=S.UNSIGNED_BYTE,P=!1);var L,B,O=A.size;if(P)A.offset===0&&A.data.length===O?L=A.data:L=A.data.subarray(A.offset,A.offset+O);else{var G=[D[2],D[2]*D[0],1];B=f.malloc(O,F);var $=u(B,D,G,0);(F==="float32"||F==="float64")&&z===S.UNSIGNED_BYTE?y($,A):c.assign($,A),L=B.subarray(0,O)}var X=C(S);return S.texImage2D(S.TEXTURE_2D,0,I,D[0],D[1],0,I,z,L),P||f.free(B),new v(S,X,D[0],D[1],I,z)}function b(S){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(h||g(S),typeof arguments[1]=="number")return w(S,arguments[1],arguments[2],arguments[3]||S.RGBA,arguments[4]||S.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return w(S,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||S.RGBA,arguments[3]||S.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var A=arguments[1],F=m(A)?A:A.raw;if(F)return k(S,F,A.width|0,A.height|0,arguments[2]||S.RGBA,arguments[3]||S.UNSIGNED_BYTE);if(A.shape&&A.data&&A.stride)return T(S,A)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433(s){"use strict";function l(n,u,c){u?u.bind():n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,null);var f=n.getParameter(n.MAX_VERTEX_ATTRIBS)|0;if(c){if(c.length>f)throw new Error("gl-vao: Too many vertex attributes");for(var h=0;h1?0:Math.acos(y)}},9226(s){s.exports=l;function l(n,u){return n[0]=Math.ceil(u[0]),n[1]=Math.ceil(u[1]),n[2]=Math.ceil(u[2]),n}},3126(s){s.exports=l;function l(n){var u=new Float32Array(3);return u[0]=n[0],u[1]=n[1],u[2]=n[2],u}},3990(s){s.exports=l;function l(n,u){return n[0]=u[0],n[1]=u[1],n[2]=u[2],n}},1091(s){s.exports=l;function l(){var n=new Float32Array(3);return n[0]=0,n[1]=0,n[2]=0,n}},5911(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2],p=c[0],g=c[1],m=c[2];return n[0]=h*m-d*g,n[1]=d*p-f*m,n[2]=f*g-h*p,n}},5455(s,l,n){s.exports=n(7056)},7056(s){s.exports=l;function l(n,u){var c=u[0]-n[0],f=u[1]-n[1],h=u[2]-n[2];return Math.sqrt(c*c+f*f+h*h)}},4008(s,l,n){s.exports=n(6690)},6690(s){s.exports=l;function l(n,u,c){return n[0]=u[0]/c[0],n[1]=u[1]/c[1],n[2]=u[2]/c[2],n}},244(s){s.exports=l;function l(n,u){return n[0]*u[0]+n[1]*u[1]+n[2]*u[2]}},2613(s){s.exports=1e-6},9922(s,l,n){s.exports=c;var u=n(2613);function c(f,h){var d=f[0],p=f[1],g=f[2],m=h[0],y=h[1],_=h[2];return Math.abs(d-m)<=u*Math.max(1,Math.abs(d),Math.abs(m))&&Math.abs(p-y)<=u*Math.max(1,Math.abs(p),Math.abs(y))&&Math.abs(g-_)<=u*Math.max(1,Math.abs(g),Math.abs(_))}},9265(s){s.exports=l;function l(n,u){return n[0]===u[0]&&n[1]===u[1]&&n[2]===u[2]}},2681(s){s.exports=l;function l(n,u){return n[0]=Math.floor(u[0]),n[1]=Math.floor(u[1]),n[2]=Math.floor(u[2]),n}},5137(s,l,n){s.exports=c;var u=n(1091)();function c(f,h,d,p,g,m){var y,_;for(h||(h=3),d||(d=0),p?_=Math.min(p*h+d,f.length):_=f.length,y=d;y<_;y+=h)u[0]=f[y],u[1]=f[y+1],u[2]=f[y+2],g(u,u,m),f[y]=u[0],f[y+1]=u[1],f[y+2]=u[2];return f}},2825(s){s.exports=l;function l(n,u,c){var f=new Float32Array(3);return f[0]=n,f[1]=u,f[2]=c,f}},2931(s,l,n){s.exports={EPSILON:n(2613),create:n(1091),clone:n(3126),angle:n(8192),fromValues:n(2825),copy:n(3990),set:n(1463),equals:n(9922),exactEquals:n(9265),add:n(5632),subtract:n(6843),sub:n(2229),multiply:n(5847),mul:n(4505),divide:n(6690),div:n(4008),min:n(8107),max:n(7417),floor:n(2681),ceil:n(9226),round:n(2447),scale:n(6621),scaleAndAdd:n(8489),distance:n(7056),dist:n(5455),squaredDistance:n(2953),sqrDist:n(6141),length:n(1387),len:n(868),squaredLength:n(3066),sqrLen:n(5486),negate:n(5093),inverse:n(811),normalize:n(3536),dot:n(244),cross:n(5911),lerp:n(6658),random:n(7636),transformMat4:n(5673),transformMat3:n(492),transformQuat:n(264),rotateX:n(6894),rotateY:n(109),rotateZ:n(8692),forEach:n(5137)}},811(s){s.exports=l;function l(n,u){return n[0]=1/u[0],n[1]=1/u[1],n[2]=1/u[2],n}},868(s,l,n){s.exports=n(1387)},1387(s){s.exports=l;function l(n){var u=n[0],c=n[1],f=n[2];return Math.sqrt(u*u+c*c+f*f)}},6658(s){s.exports=l;function l(n,u,c,f){var h=u[0],d=u[1],p=u[2];return n[0]=h+f*(c[0]-h),n[1]=d+f*(c[1]-d),n[2]=p+f*(c[2]-p),n}},7417(s){s.exports=l;function l(n,u,c){return n[0]=Math.max(u[0],c[0]),n[1]=Math.max(u[1],c[1]),n[2]=Math.max(u[2],c[2]),n}},8107(s){s.exports=l;function l(n,u,c){return n[0]=Math.min(u[0],c[0]),n[1]=Math.min(u[1],c[1]),n[2]=Math.min(u[2],c[2]),n}},4505(s,l,n){s.exports=n(5847)},5847(s){s.exports=l;function l(n,u,c){return n[0]=u[0]*c[0],n[1]=u[1]*c[1],n[2]=u[2]*c[2],n}},5093(s){s.exports=l;function l(n,u){return n[0]=-u[0],n[1]=-u[1],n[2]=-u[2],n}},3536(s){s.exports=l;function l(n,u){var c=u[0],f=u[1],h=u[2],d=c*c+f*f+h*h;return d>0&&(d=1/Math.sqrt(d),n[0]=u[0]*d,n[1]=u[1]*d,n[2]=u[2]*d),n}},7636(s){s.exports=l;function l(n,u){u=u||1;var c=Math.random()*2*Math.PI,f=Math.random()*2-1,h=Math.sqrt(1-f*f)*u;return n[0]=Math.cos(c)*h,n[1]=Math.sin(c)*h,n[2]=f*u,n}},6894(s){s.exports=l;function l(n,u,c,f){var h=c[1],d=c[2],p=u[1]-h,g=u[2]-d,m=Math.sin(f),y=Math.cos(f);return n[0]=u[0],n[1]=h+p*y-g*m,n[2]=d+p*m+g*y,n}},109(s){s.exports=l;function l(n,u,c,f){var h=c[0],d=c[2],p=u[0]-h,g=u[2]-d,m=Math.sin(f),y=Math.cos(f);return n[0]=h+g*m+p*y,n[1]=u[1],n[2]=d+g*y-p*m,n}},8692(s){s.exports=l;function l(n,u,c,f){var h=c[0],d=c[1],p=u[0]-h,g=u[1]-d,m=Math.sin(f),y=Math.cos(f);return n[0]=h+p*y-g*m,n[1]=d+p*m+g*y,n[2]=u[2],n}},2447(s){s.exports=l;function l(n,u){return n[0]=Math.round(u[0]),n[1]=Math.round(u[1]),n[2]=Math.round(u[2]),n}},6621(s){s.exports=l;function l(n,u,c){return n[0]=u[0]*c,n[1]=u[1]*c,n[2]=u[2]*c,n}},8489(s){s.exports=l;function l(n,u,c,f){return n[0]=u[0]+c[0]*f,n[1]=u[1]+c[1]*f,n[2]=u[2]+c[2]*f,n}},1463(s){s.exports=l;function l(n,u,c,f){return n[0]=u,n[1]=c,n[2]=f,n}},6141(s,l,n){s.exports=n(2953)},5486(s,l,n){s.exports=n(3066)},2953(s){s.exports=l;function l(n,u){var c=u[0]-n[0],f=u[1]-n[1],h=u[2]-n[2];return c*c+f*f+h*h}},3066(s){s.exports=l;function l(n){var u=n[0],c=n[1],f=n[2];return u*u+c*c+f*f}},2229(s,l,n){s.exports=n(6843)},6843(s){s.exports=l;function l(n,u,c){return n[0]=u[0]-c[0],n[1]=u[1]-c[1],n[2]=u[2]-c[2],n}},492(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2];return n[0]=f*c[0]+h*c[3]+d*c[6],n[1]=f*c[1]+h*c[4]+d*c[7],n[2]=f*c[2]+h*c[5]+d*c[8],n}},5673(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2],p=c[3]*f+c[7]*h+c[11]*d+c[15];return p=p||1,n[0]=(c[0]*f+c[4]*h+c[8]*d+c[12])/p,n[1]=(c[1]*f+c[5]*h+c[9]*d+c[13])/p,n[2]=(c[2]*f+c[6]*h+c[10]*d+c[14])/p,n}},264(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2],p=c[0],g=c[1],m=c[2],y=c[3],_=g*d-m*h,v=m*f-p*d,x=p*h-g*f;return _*=2,v*=2,x*=2,n[0]=f+y*_+g*x-m*v,n[1]=h+y*v+m*_-p*x,n[2]=d+y*x+p*v-g*_,n}},4361(s){s.exports=l;function l(n,u,c){return n[0]=u[0]+c[0],n[1]=u[1]+c[1],n[2]=u[2]+c[2],n[3]=u[3]+c[3],n}},2335(s){s.exports=l;function l(n){var u=new Float32Array(4);return u[0]=n[0],u[1]=n[1],u[2]=n[2],u[3]=n[3],u}},2933(s){s.exports=l;function l(n,u){return n[0]=u[0],n[1]=u[1],n[2]=u[2],n[3]=u[3],n}},7536(s){s.exports=l;function l(){var n=new Float32Array(4);return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n}},4691(s){s.exports=l;function l(n,u){var c=u[0]-n[0],f=u[1]-n[1],h=u[2]-n[2],d=u[3]-n[3];return Math.sqrt(c*c+f*f+h*h+d*d)}},1373(s){s.exports=l;function l(n,u,c){return n[0]=u[0]/c[0],n[1]=u[1]/c[1],n[2]=u[2]/c[2],n[3]=u[3]/c[3],n}},3750(s){s.exports=l;function l(n,u){return n[0]*u[0]+n[1]*u[1]+n[2]*u[2]+n[3]*u[3]}},3390(s){s.exports=l;function l(n,u,c,f){var h=new Float32Array(4);return h[0]=n,h[1]=u,h[2]=c,h[3]=f,h}},9970(s,l,n){s.exports={create:n(7536),clone:n(2335),fromValues:n(3390),copy:n(2933),set:n(4578),add:n(4361),subtract:n(6860),multiply:n(3576),divide:n(1373),min:n(2334),max:n(160),scale:n(9288),scaleAndAdd:n(4844),distance:n(4691),squaredDistance:n(7960),length:n(6808),squaredLength:n(483),negate:n(1498),inverse:n(4494),normalize:n(5177),dot:n(3750),lerp:n(2573),random:n(9131),transformMat4:n(5352),transformQuat:n(4041)}},4494(s){s.exports=l;function l(n,u){return n[0]=1/u[0],n[1]=1/u[1],n[2]=1/u[2],n[3]=1/u[3],n}},6808(s){s.exports=l;function l(n){var u=n[0],c=n[1],f=n[2],h=n[3];return Math.sqrt(u*u+c*c+f*f+h*h)}},2573(s){s.exports=l;function l(n,u,c,f){var h=u[0],d=u[1],p=u[2],g=u[3];return n[0]=h+f*(c[0]-h),n[1]=d+f*(c[1]-d),n[2]=p+f*(c[2]-p),n[3]=g+f*(c[3]-g),n}},160(s){s.exports=l;function l(n,u,c){return n[0]=Math.max(u[0],c[0]),n[1]=Math.max(u[1],c[1]),n[2]=Math.max(u[2],c[2]),n[3]=Math.max(u[3],c[3]),n}},2334(s){s.exports=l;function l(n,u,c){return n[0]=Math.min(u[0],c[0]),n[1]=Math.min(u[1],c[1]),n[2]=Math.min(u[2],c[2]),n[3]=Math.min(u[3],c[3]),n}},3576(s){s.exports=l;function l(n,u,c){return n[0]=u[0]*c[0],n[1]=u[1]*c[1],n[2]=u[2]*c[2],n[3]=u[3]*c[3],n}},1498(s){s.exports=l;function l(n,u){return n[0]=-u[0],n[1]=-u[1],n[2]=-u[2],n[3]=-u[3],n}},5177(s){s.exports=l;function l(n,u){var c=u[0],f=u[1],h=u[2],d=u[3],p=c*c+f*f+h*h+d*d;return p>0&&(p=1/Math.sqrt(p),n[0]=c*p,n[1]=f*p,n[2]=h*p,n[3]=d*p),n}},9131(s,l,n){var u=n(5177),c=n(9288);s.exports=f;function f(h,d){return d=d||1,h[0]=Math.random(),h[1]=Math.random(),h[2]=Math.random(),h[3]=Math.random(),u(h,h),c(h,h,d),h}},9288(s){s.exports=l;function l(n,u,c){return n[0]=u[0]*c,n[1]=u[1]*c,n[2]=u[2]*c,n[3]=u[3]*c,n}},4844(s){s.exports=l;function l(n,u,c,f){return n[0]=u[0]+c[0]*f,n[1]=u[1]+c[1]*f,n[2]=u[2]+c[2]*f,n[3]=u[3]+c[3]*f,n}},4578(s){s.exports=l;function l(n,u,c,f,h){return n[0]=u,n[1]=c,n[2]=f,n[3]=h,n}},7960(s){s.exports=l;function l(n,u){var c=u[0]-n[0],f=u[1]-n[1],h=u[2]-n[2],d=u[3]-n[3];return c*c+f*f+h*h+d*d}},483(s){s.exports=l;function l(n){var u=n[0],c=n[1],f=n[2],h=n[3];return u*u+c*c+f*f+h*h}},6860(s){s.exports=l;function l(n,u,c){return n[0]=u[0]-c[0],n[1]=u[1]-c[1],n[2]=u[2]-c[2],n[3]=u[3]-c[3],n}},5352(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2],p=u[3];return n[0]=c[0]*f+c[4]*h+c[8]*d+c[12]*p,n[1]=c[1]*f+c[5]*h+c[9]*d+c[13]*p,n[2]=c[2]*f+c[6]*h+c[10]*d+c[14]*p,n[3]=c[3]*f+c[7]*h+c[11]*d+c[15]*p,n}},4041(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2],p=c[0],g=c[1],m=c[2],y=c[3],_=y*f+g*d-m*h,v=y*h+m*f-p*d,x=y*d+p*h-g*f,E=-p*f-g*h-m*d;return n[0]=_*y+E*-p+v*-m-x*-g,n[1]=v*y+E*-g+x*-p-_*-m,n[2]=x*y+E*-m+_*-g-v*-p,n[3]=u[3],n}},1848(s,l,n){var u=n(4905),c=n(6468);s.exports=f;function f(h){for(var d=Array.isArray(h)?h:u(h),p=0;p0)continue;Se=ee.slice(0,1).join("")}return Y(Se),Z+=Se.length,L=L.slice(Se.length),L.length}while(!0)}function he(){return/[^a-fA-F0-9]/.test(z)?(Y(L.join("")),P=p,D):(L.push(z),I=z,D+1)}function oe(){return z==="."||/[eE]/.test(z)?(L.push(z),P=E,I=z,D+1):z==="x"&&L.length===1&&L[0]==="0"?(P=b,L.push(z),I=z,D+1):/[^\d]/.test(z)?(Y(L.join("")),P=p,D):(L.push(z),I=z,D+1)}function te(){return z==="f"&&(L.push(z),I=z,D+=1),/[eE]/.test(z)||(z==="-"||z==="+")&&/[eE]/.test(I)?(L.push(z),I=z,D+1):/[^\d]/.test(z)?(Y(L.join("")),P=p,D):(L.push(z),I=z,D+1)}function ie(){if(/[^\d\w_]/.test(z)){var ee=L.join("");return q[ee]?P=w:j[ee]?P=C:P=M,Y(L.join("")),P=p,D}return L.push(z),I=z,D+1}}},3508(s,l,n){var u=n(6852);u=u.slice().filter(function(c){return!/^(gl\_|texture)/.test(c)}),s.exports=u.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852(s){s.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932(s,l,n){var u=n(620);s.exports=u.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620(s){s.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827(s){s.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905(s,l,n){var u=n(5874);s.exports=c;function c(f,h){var d=u(h),p=[];return p=p.concat(d(f)),p=p.concat(d(null)),p}},3236(s){s.exports=function(l){typeof l=="string"&&(l=[l]);for(var n=[].slice.call(arguments,1),u=[],c=0;c>1,_=-7,v=c?h-1:0,x=c?-1:1,E=n[u+v];for(v+=x,d=E&(1<<-_)-1,E>>=-_,_+=g;_>0;d=d*256+n[u+v],v+=x,_-=8);for(p=d&(1<<-_)-1,d>>=-_,_+=f;_>0;p=p*256+n[u+v],v+=x,_-=8);if(d===0)d=1-y;else{if(d===m)return p?NaN:(E?-1:1)*(1/0);p=p+Math.pow(2,f),d=d-y}return(E?-1:1)*p*Math.pow(2,d-f)},l.write=function(n,u,c,f,h,d){var p,g,m,y=d*8-h-1,_=(1<>1,x=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=f?0:d-1,M=f?1:-1,C=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(g=isNaN(u)?1:0,p=_):(p=Math.floor(Math.log(u)/Math.LN2),u*(m=Math.pow(2,-p))<1&&(p--,m*=2),p+v>=1?u+=x/m:u+=x*Math.pow(2,1-v),u*m>=2&&(p++,m/=2),p+v>=_?(g=0,p=_):p+v>=1?(g=(u*m-1)*Math.pow(2,h),p=p+v):(g=u*Math.pow(2,v-1)*Math.pow(2,h),p=0));h>=8;n[c+E]=g&255,E+=M,g/=256,h-=8);for(p=p<0;n[c+E]=p&255,E+=M,p/=256,y-=8);n[c+E-M]|=C*128}},8954(s,l,n){"use strict";s.exports=v;var u=n(3250),c=n(6803).Fw;function f(x,E,M){this.vertices=x,this.adjacent=E,this.boundary=M,this.lastVisited=-1}f.prototype.flip=function(){var x=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=x;var E=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=E};function h(x,E,M){this.vertices=x,this.cell=E,this.index=M}function d(x,E){return c(x.vertices,E.vertices)}function p(x){return function(){var E=this.tuple;return x.apply(this,E)}}function g(x){var E=u[x+1];return E||(E=u),p(E)}var m=[];function y(x,E,M){this.dimension=x,this.vertices=E,this.simplices=M,this.interior=M.filter(function(k){return!k.boundary}),this.tuple=new Array(x+1);for(var C=0;C<=x;++C)this.tuple[C]=this.vertices[C];var w=m[x];w||(w=m[x]=g(x)),this.orient=w}var _=y.prototype;_.handleBoundaryDegeneracy=function(x,E){var M=this.dimension,C=this.vertices.length-1,w=this.tuple,k=this.vertices,T=[x];for(x.lastVisited=-C;T.length>0;){x=T.pop();for(var b=x.adjacent,S=0;S<=M;++S){var A=b[S];if(!(!A.boundary||A.lastVisited<=-C)){for(var F=A.vertices,D=0;D<=M;++D){var R=F[D];R<0?w[D]=E:w[D]=k[R]}var P=this.orient();if(P>0)return A;A.lastVisited=-C,P===0&&T.push(A)}}}return null},_.walk=function(x,E){var M=this.vertices.length-1,C=this.dimension,w=this.vertices,k=this.tuple,T=E?this.interior.length*Math.random()|0:this.interior.length-1,b=this.interior[T];e:for(;!b.boundary;){for(var S=b.vertices,A=b.adjacent,F=0;F<=C;++F)k[F]=w[S[F]];b.lastVisited=M;for(var F=0;F<=C;++F){var D=A[F];if(!(D.lastVisited>=M)){var R=k[F];k[F]=x;var P=this.orient();if(k[F]=R,P<0){b=D;continue e}else D.boundary?D.lastVisited=-M:D.lastVisited=M}}return}return b},_.addPeaks=function(x,E){var M=this.vertices.length-1,C=this.dimension,w=this.vertices,k=this.tuple,T=this.interior,b=this.simplices,S=[E];E.lastVisited=M,E.vertices[E.vertices.indexOf(-1)]=M,E.boundary=!1,T.push(E);for(var A=[];S.length>0;){var E=S.pop(),F=E.vertices,D=E.adjacent,R=F.indexOf(M);if(!(R<0)){for(var P=0;P<=C;++P)if(P!==R){var z=D[P];if(!(!z.boundary||z.lastVisited>=M)){var I=z.vertices;if(z.lastVisited!==-M){for(var L=0,B=0;B<=C;++B)I[B]<0?(L=B,k[B]=x):k[B]=w[I[B]];var O=this.orient();if(O>0){I[L]=M,z.boundary=!1,T.push(z),S.push(z),z.lastVisited=M;continue}else z.lastVisited=-M}var G=z.adjacent,$=F.slice(),X=D.slice(),Z=new f($,X,!0);b.push(Z);var J=G.indexOf(E);if(!(J<0)){G[J]=Z,X[R]=z,$[P]=-1,X[P]=E,D[P]=Z,Z.flip();for(var B=0;B<=C;++B){var N=$[B];if(!(N<0||N===M)){for(var H=new Array(C-1),W=0,U=0;U<=C;++U){var V=$[U];V<0||U===B||(H[W++]=V)}A.push(new h(H,Z,B))}}}}}}}A.sort(d);for(var P=0;P+1=0?T[S++]=b[F]:A=F&1;if(A===(x&1)){var D=T[0];T[0]=T[1],T[1]=D}E.push(T)}}return E};function v(x,E){var M=x.length;if(M===0)throw new Error("Must have at least d+1 points");var C=x[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var w=x.slice(0,C+1),k=u.apply(void 0,w);if(k===0)throw new Error("Input not in general position");for(var T=new Array(C+1),b=0;b<=C;++b)T[b]=b;k<0&&(T[0]=1,T[1]=0);for(var S=new f(T,new Array(C+1),!1),A=S.adjacent,F=new Array(C+2),b=0;b<=C;++b){for(var D=T.slice(),R=0;R<=C;++R)R===b&&(D[R]=-1);var P=D[0];D[0]=D[1],D[1]=P;var z=new f(D,new Array(C+1),!0);A[b]=z,F[b]=z}F[C+1]=S;for(var b=0;b<=C;++b)for(var D=A[b].vertices,I=A[b].adjacent,R=0;R<=C;++R){var L=D[R];if(L<0){I[R]=S;continue}for(var B=0;B<=C;++B)A[B].vertices.indexOf(L)<0&&(I[R]=A[B])}for(var O=new y(C,w,F),G=!!E,b=C+1;b3*(F+1)?y(this,A):this.left.insert(A):this.left=k([A]);else if(A[0]>this.mid)this.right?4*(this.right.count+1)>3*(F+1)?y(this,A):this.right.insert(A):this.right=k([A]);else{var D=u.ge(this.leftPoints,A,C),R=u.ge(this.rightPoints,A,w);this.leftPoints.splice(D,0,A),this.rightPoints.splice(R,0,A)}},p.remove=function(A){var F=this.count-this.leftPoints;if(A[1]3*(F-1))return _(this,A);var R=this.left.remove(A);return R===h?(this.left=null,this.count-=1,f):(R===f&&(this.count-=1),R)}else if(A[0]>this.mid){if(!this.right)return c;var P=this.left?this.left.count:0;if(4*P>3*(F-1))return _(this,A);var R=this.right.remove(A);return R===h?(this.right=null,this.count-=1,f):(R===f&&(this.count-=1),R)}else{if(this.count===1)return this.leftPoints[0]===A?h:c;if(this.leftPoints.length===1&&this.leftPoints[0]===A){if(this.left&&this.right){for(var z=this,I=this.left;I.right;)z=I,I=I.right;if(z===this)I.right=this.right;else{var L=this.left,R=this.right;z.count-=I.count,z.right=I.left,I.left=L,I.right=R}g(this,I),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?g(this,this.left):g(this,this.right);return f}for(var L=u.ge(this.leftPoints,A,C);L=0&&A[R][1]>=F;--R){var P=D(A[R]);if(P)return P}}function E(A,F){for(var D=0;Dthis.mid){if(this.right){var D=this.right.queryPoint(A,F);if(D)return D}return x(this.rightPoints,A,F)}else return E(this.leftPoints,F)},p.queryInterval=function(A,F,D){if(Athis.mid&&this.right){var R=this.right.queryInterval(A,F,D);if(R)return R}return Fthis.mid?x(this.rightPoints,A,D):E(this.leftPoints,D)};function M(A,F){return A-F}function C(A,F){var D=A[0]-F[0];return D||A[1]-F[1]}function w(A,F){var D=A[1]-F[1];return D||A[0]-F[0]}function k(A){if(A.length===0)return null;for(var F=[],D=0;D>1],P=[],z=[],I=[],D=0;D1&&h.indexOf("Macintosh")!==-1&&h.indexOf("Safari")!==-1&&(d=!0),d}},5219(s){"use strict";s.exports=function(l){for(var n=l.length,u,c=0;c13)&&u!==32&&u!==133&&u!==160&&u!==5760&&u!==6158&&(u<8192||u>8205)&&u!==8232&&u!==8233&&u!==8239&&u!==8287&&u!==8288&&u!==12288&&u!==65279)return!1;return!0}},395(s){function l(n,u,c){return n*(1-c)+u*c}s.exports=l},2652(s,l,n){var u=n(4335),c=n(6864),f=n(1903),h=n(9921),d=n(7608),p=n(5665),g={length:n(1387),normalize:n(3536),dot:n(244),cross:n(5911)},m=c(),y=c(),_=[0,0,0,0],v=[[0,0,0],[0,0,0],[0,0,0]],x=[0,0,0];s.exports=function(k,T,b,S,A,F){if(T||(T=[0,0,0]),b||(b=[0,0,0]),S||(S=[0,0,0]),A||(A=[0,0,0,1]),F||(F=[0,0,0,1]),!u(m,k)||(f(y,m),y[3]=0,y[7]=0,y[11]=0,y[15]=1,Math.abs(h(y)<1e-8)))return!1;var D=m[3],R=m[7],P=m[11],z=m[12],I=m[13],L=m[14],B=m[15];if(D!==0||R!==0||P!==0){_[0]=D,_[1]=R,_[2]=P,_[3]=B;var O=d(y,y);if(!O)return!1;p(y,y),E(A,_,y)}else A[0]=A[1]=A[2]=0,A[3]=1;if(T[0]=z,T[1]=I,T[2]=L,M(v,m),b[0]=g.length(v[0]),g.normalize(v[0],v[0]),S[0]=g.dot(v[0],v[1]),C(v[1],v[1],v[0],1,-S[0]),b[1]=g.length(v[1]),g.normalize(v[1],v[1]),S[0]/=b[1],S[1]=g.dot(v[0],v[2]),C(v[2],v[2],v[0],1,-S[1]),S[2]=g.dot(v[1],v[2]),C(v[2],v[2],v[1],1,-S[2]),b[2]=g.length(v[2]),g.normalize(v[2],v[2]),S[1]/=b[2],S[2]/=b[2],g.cross(x,v[1],v[2]),g.dot(v[0],x)<0)for(var G=0;G<3;G++)b[G]*=-1,v[G][0]*=-1,v[G][1]*=-1,v[G][2]*=-1;return F[0]=.5*Math.sqrt(Math.max(1+v[0][0]-v[1][1]-v[2][2],0)),F[1]=.5*Math.sqrt(Math.max(1-v[0][0]+v[1][1]-v[2][2],0)),F[2]=.5*Math.sqrt(Math.max(1-v[0][0]-v[1][1]+v[2][2],0)),F[3]=.5*Math.sqrt(Math.max(1+v[0][0]+v[1][1]+v[2][2],0)),v[2][1]>v[1][2]&&(F[0]=-F[0]),v[0][2]>v[2][0]&&(F[1]=-F[1]),v[1][0]>v[0][1]&&(F[2]=-F[2]),!0};function E(w,k,T){var b=k[0],S=k[1],A=k[2],F=k[3];return w[0]=T[0]*b+T[4]*S+T[8]*A+T[12]*F,w[1]=T[1]*b+T[5]*S+T[9]*A+T[13]*F,w[2]=T[2]*b+T[6]*S+T[10]*A+T[14]*F,w[3]=T[3]*b+T[7]*S+T[11]*A+T[15]*F,w}function M(w,k){w[0][0]=k[0],w[0][1]=k[1],w[0][2]=k[2],w[1][0]=k[4],w[1][1]=k[5],w[1][2]=k[6],w[2][0]=k[8],w[2][1]=k[9],w[2][2]=k[10]}function C(w,k,T,b,S){w[0]=k[0]*b+T[0]*S,w[1]=k[1]*b+T[1]*S,w[2]=k[2]*b+T[2]*S}},4335(s){s.exports=function(n,u){var c=u[15];if(c===0)return!1;for(var f=1/c,h=0;h<16;h++)n[h]=u[h]*f;return!0}},7442(s,l,n){var u=n(6658),c=n(7182),f=n(2652),h=n(9921),d=n(8648),p=_(),g=_(),m=_();s.exports=y;function y(E,M,C,w){if(h(M)===0||h(C)===0)return!1;var k=f(M,p.translate,p.scale,p.skew,p.perspective,p.quaternion),T=f(C,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!k||!T?!1:(u(m.translate,p.translate,g.translate,w),u(m.skew,p.skew,g.skew,w),u(m.scale,p.scale,g.scale,w),u(m.perspective,p.perspective,g.perspective,w),d(m.quaternion,p.quaternion,g.quaternion,w),c(E,m.translate,m.scale,m.skew,m.perspective,m.quaternion),!0)}function _(){return{translate:v(),scale:v(1),skew:v(),perspective:x(),quaternion:x()}}function v(E){return[E||0,E||0,E||0]}function x(){return[0,0,0,1]}},7182(s,l,n){var u={identity:n(7894),translate:n(7656),multiply:n(6760),create:n(6864),scale:n(2504),fromRotationTranslation:n(6743)},c=u.create(),f=u.create();s.exports=function(d,p,g,m,y,_){return u.identity(d),u.fromRotationTranslation(d,_,p),d[3]=y[0],d[7]=y[1],d[11]=y[2],d[15]=y[3],u.identity(f),m[2]!==0&&(f[9]=m[2],u.multiply(d,d,f)),m[1]!==0&&(f[9]=0,f[8]=m[1],u.multiply(d,d,f)),m[0]!==0&&(f[8]=0,f[4]=m[0],u.multiply(d,d,f)),u.scale(d,d,g),d}},1811(s,l,n){"use strict";var u=n(2478),c=n(7442),f=n(7608),h=n(5567),d=n(2408),p=n(7089),g=n(6582),m=n(7656),y=n(2504),_=n(3536),v=[0,0,0];s.exports=C;function x(w){this._components=w.slice(),this._time=[0],this.prevMatrix=w.slice(),this.nextMatrix=w.slice(),this.computedMatrix=w.slice(),this.computedInverse=w.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var E=x.prototype;E.recalcMatrix=function(w){var k=this._time,T=u.le(k,w),b=this.computedMatrix;if(!(T<0)){var S=this._components;if(T===k.length-1)for(var A=16*T,F=0;F<16;++F)b[F]=S[A++];else{for(var D=k[T+1]-k[T],A=16*T,R=this.prevMatrix,P=!0,F=0;F<16;++F)R[F]=S[A++];for(var z=this.nextMatrix,F=0;F<16;++F)z[F]=S[A++],P=P&&R[F]===z[F];if(D<1e-6||P)for(var F=0;F<16;++F)b[F]=R[F];else c(b,R,z,(w-k[T])/D)}var I=this.computedUp;I[0]=b[1],I[1]=b[5],I[2]=b[9],_(I,I);var L=this.computedInverse;f(L,b);var B=this.computedEye,O=L[15];B[0]=L[12]/O,B[1]=L[13]/O,B[2]=L[14]/O;for(var G=this.computedCenter,$=Math.exp(this.computedRadius[0]),F=0;F<3;++F)G[F]=B[F]-b[2+4*F]*$}},E.idle=function(w){if(!(w1&&u(f[g[v-2]],f[g[v-1]],_)<=0;)v-=1,g.pop();for(g.push(y),v=m.length;v>1&&u(f[m[v-2]],f[m[v-1]],_)>=0;)v-=1,m.pop();m.push(y)}for(var x=new Array(m.length+g.length-2),E=0,d=0,M=g.length;d0;--C)x[E++]=m[C];return x}},351(s,l,n){"use strict";s.exports=c;var u=n(4687);function c(f,h){h||(h=f,f=window);var d=0,p=0,g=0,m={shift:!1,alt:!1,control:!1,meta:!1},y=!1;function _(A){var F=!1;return"altKey"in A&&(F=F||A.altKey!==m.alt,m.alt=!!A.altKey),"shiftKey"in A&&(F=F||A.shiftKey!==m.shift,m.shift=!!A.shiftKey),"ctrlKey"in A&&(F=F||A.ctrlKey!==m.control,m.control=!!A.ctrlKey),"metaKey"in A&&(F=F||A.metaKey!==m.meta,m.meta=!!A.metaKey),F}function v(A,F){var D=u.x(F),R=u.y(F);"buttons"in F&&(A=F.buttons|0),(A!==d||D!==p||R!==g||_(F))&&(d=A|0,p=D||0,g=R||0,h&&h(d,p,g,m))}function x(A){v(0,A)}function E(){(d||p||g||m.shift||m.alt||m.meta||m.control)&&(p=g=0,d=0,m.shift=m.alt=m.control=m.meta=!1,h&&h(0,0,0,m))}function M(A){_(A)&&h&&h(d,p,g,m)}function C(A){u.buttons(A)===0?v(0,A):v(d,A)}function w(A){v(d|u.buttons(A),A)}function k(A){v(d&~u.buttons(A),A)}function T(){y||(y=!0,f.addEventListener("mousemove",C),f.addEventListener("mousedown",w),f.addEventListener("mouseup",k),f.addEventListener("mouseleave",x),f.addEventListener("mouseenter",x),f.addEventListener("mouseout",x),f.addEventListener("mouseover",x),f.addEventListener("blur",E),f.addEventListener("keyup",M),f.addEventListener("keydown",M),f.addEventListener("keypress",M),f!==window&&(window.addEventListener("blur",E),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function b(){y&&(y=!1,f.removeEventListener("mousemove",C),f.removeEventListener("mousedown",w),f.removeEventListener("mouseup",k),f.removeEventListener("mouseleave",x),f.removeEventListener("mouseenter",x),f.removeEventListener("mouseout",x),f.removeEventListener("mouseover",x),f.removeEventListener("blur",E),f.removeEventListener("keyup",M),f.removeEventListener("keydown",M),f.removeEventListener("keypress",M),f!==window&&(window.removeEventListener("blur",E),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}T();var S={element:f};return Object.defineProperties(S,{enabled:{get:function(){return y},set:function(A){A?T():b()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return p},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return m},enumerable:!0}}),S}},24(s){var l={left:0,top:0};s.exports=n;function n(c,f,h){f=f||c.currentTarget||c.srcElement,Array.isArray(h)||(h=[0,0]);var d=c.clientX||0,p=c.clientY||0,g=u(f);return h[0]=d-g.left,h[1]=p-g.top,h}function u(c){return c===window||c===document||c===document.body?l:c.getBoundingClientRect()}},4687(s,l){"use strict";function n(h){if(typeof h=="object"){if("buttons"in h)return h.buttons;if("which"in h){var d=h.which;if(d===2)return 4;if(d===3)return 2;if(d>0)return 1<=0)return 1<0){if(X=1,N[W++]=m(T[F],E,M,C),F+=O,w>0)for($=1,D=T[F],U=N[W]=m(D,E,M,C),q=N[W+V],re=N[W+Y],ue=N[W+se],(U!==q||U!==re||U!==ue)&&(P=T[F+R],I=T[F+z],B=T[F+L],p($,X,D,P,I,B,U,q,re,ue,E,M,C),fe=H[W]=Z++),W+=1,F+=O,$=2;$0)for($=1,D=T[F],U=N[W]=m(D,E,M,C),q=N[W+V],re=N[W+Y],ue=N[W+se],(U!==q||U!==re||U!==ue)&&(P=T[F+R],I=T[F+z],B=T[F+L],p($,X,D,P,I,B,U,q,re,ue,E,M,C),fe=H[W]=Z++,ue!==re&&g(H[W+Y],fe,I,B,re,ue,E,M,C)),W+=1,F+=O,$=2;$0){if($=1,N[W++]=m(T[F],E,M,C),F+=O,k>0)for(X=1,D=T[F],U=N[W]=m(D,E,M,C),re=N[W+Y],q=N[W+V],ue=N[W+se],(U!==re||U!==q||U!==ue)&&(P=T[F+R],I=T[F+z],B=T[F+L],p($,X,D,P,I,B,U,re,q,ue,E,M,C),fe=H[W]=Z++),W+=1,F+=O,X=2;X0)for(X=1,D=T[F],U=N[W]=m(D,E,M,C),re=N[W+Y],q=N[W+V],ue=N[W+se],(U!==re||U!==q||U!==ue)&&(P=T[F+R],I=T[F+z],B=T[F+L],p($,X,D,P,I,B,U,re,q,ue,E,M,C),fe=H[W]=Z++,ue!==re&&g(H[W+Y],fe,B,P,ue,re,E,M,C)),W+=1,F+=O,X=2;X 0"),typeof d.vertex!="function"&&p("Must specify vertex creation function"),typeof d.cell!="function"&&p("Must specify cell creation function"),typeof d.phase!="function"&&p("Must specify phase function");for(var _=d.getters||[],v=new Array(m),x=0;x=0?v[x]=!0:v[x]=!1;return f(d.vertex,d.cell,d.phase,y,g,v)}},6199(s,l,n){"use strict";var u=n(1338),c={zero:function(C,w,k,T){var b=C[0],S=k[0];T|=0;var A=0,F=S;for(A=0;A2&&A[1]>2&&T(S.pick(-1,-1).lo(1,1).hi(A[0]-2,A[1]-2),b.pick(-1,-1,0).lo(1,1).hi(A[0]-2,A[1]-2),b.pick(-1,-1,1).lo(1,1).hi(A[0]-2,A[1]-2)),A[1]>2&&(k(S.pick(0,-1).lo(1).hi(A[1]-2),b.pick(0,-1,1).lo(1).hi(A[1]-2)),w(b.pick(0,-1,0).lo(1).hi(A[1]-2))),A[1]>2&&(k(S.pick(A[0]-1,-1).lo(1).hi(A[1]-2),b.pick(A[0]-1,-1,1).lo(1).hi(A[1]-2)),w(b.pick(A[0]-1,-1,0).lo(1).hi(A[1]-2))),A[0]>2&&(k(S.pick(-1,0).lo(1).hi(A[0]-2),b.pick(-1,0,0).lo(1).hi(A[0]-2)),w(b.pick(-1,0,1).lo(1).hi(A[0]-2))),A[0]>2&&(k(S.pick(-1,A[1]-1).lo(1).hi(A[0]-2),b.pick(-1,A[1]-1,0).lo(1).hi(A[0]-2)),w(b.pick(-1,A[1]-1,1).lo(1).hi(A[0]-2))),b.set(0,0,0,0),b.set(0,0,1,0),b.set(A[0]-1,0,0,0),b.set(A[0]-1,0,1,0),b.set(0,A[1]-1,0,0),b.set(0,A[1]-1,1,0),b.set(A[0]-1,A[1]-1,0,0),b.set(A[0]-1,A[1]-1,1,0),b}}function M(C){var w=C.join(),A=m[w];if(A)return A;for(var k=C.length,T=[_,v],b=1;b<=k;++b)T.push(x(b));var S=E,A=S.apply(void 0,T);return m[w]=A,A}s.exports=function(w,k,T){if(Array.isArray(T)||(typeof T=="string"?T=u(k.dimension,T):T=u(k.dimension,"clamp")),k.size===0)return w;if(k.dimension===0)return w.set(0),w;var b=M(T);return b(w,k)}},4317(s){"use strict";function l(h,d){var p=Math.floor(d),g=d-p,m=0<=p&&p0;){I<64?(w=I,I=0):(w=64,I-=64);for(var L=m[1]|0;L>0;){L<64?(k=L,L=0):(k=64,L-=64),v=P+I*b+L*S,M=z+I*F+L*D;var B=0,O=0,G=0,$=A,X=b-T*A,Z=S-w*b,J=R,N=F-T*R,H=D-w*F;for(G=0;G0;){D<64?(w=D,D=0):(w=64,D-=64);for(var R=m[0]|0;R>0;){R<64?(C=R,R=0):(C=64,R-=64),v=A+D*T+R*k,M=F+D*S+R*b;var P=0,z=0,I=T,L=k-w*T,B=S,O=b-w*S;for(z=0;z0;){z<64?(k=z,z=0):(k=64,z-=64);for(var I=m[0]|0;I>0;){I<64?(C=I,I=0):(C=64,I-=64);for(var L=m[1]|0;L>0;){L<64?(w=L,L=0):(w=64,L-=64),v=R+z*S+I*T+L*b,M=P+z*D+I*A+L*F;var B=0,O=0,G=0,$=S,X=T-k*S,Z=b-C*T,J=D,N=A-k*D,H=F-C*A;for(G=0;Gx;){B=0,O=P-w;t:for(I=0;I$)break t;O+=A,B+=F}for(B=P,O=P-w,I=0;I>1,L=I-R,B=I+R,O=P,G=L,$=I,X=B,Z=z,J=E+1,N=M-1,H=!0,W,U,V,j,q,Y,K,re,se,le=0,ue=0,fe=0,pe,we,xe,he,oe,te,ie,ee,ce,_e,Se,Me,Ue,Ge,Ze,Ke,dt=S,_t=_(dt),Pt=_(dt);we=k*O,xe=k*G,Ke=w;e:for(pe=0;pe0){U=O,O=G,G=U;break e}if(fe<0)break e;Ke+=F}we=k*X,xe=k*Z,Ke=w;e:for(pe=0;pe0){U=X,X=Z,Z=U;break e}if(fe<0)break e;Ke+=F}we=k*O,xe=k*$,Ke=w;e:for(pe=0;pe0){U=O,O=$,$=U;break e}if(fe<0)break e;Ke+=F}we=k*G,xe=k*$,Ke=w;e:for(pe=0;pe0){U=G,G=$,$=U;break e}if(fe<0)break e;Ke+=F}we=k*O,xe=k*X,Ke=w;e:for(pe=0;pe0){U=O,O=X,X=U;break e}if(fe<0)break e;Ke+=F}we=k*$,xe=k*X,Ke=w;e:for(pe=0;pe0){U=$,$=X,X=U;break e}if(fe<0)break e;Ke+=F}we=k*G,xe=k*Z,Ke=w;e:for(pe=0;pe0){U=G,G=Z,Z=U;break e}if(fe<0)break e;Ke+=F}we=k*G,xe=k*$,Ke=w;e:for(pe=0;pe0){U=G,G=$,$=U;break e}if(fe<0)break e;Ke+=F}we=k*X,xe=k*Z,Ke=w;e:for(pe=0;pe0){U=X,X=Z,Z=U;break e}if(fe<0)break e;Ke+=F}for(we=k*O,xe=k*G,he=k*$,oe=k*X,te=k*Z,ie=k*P,ee=k*I,ce=k*z,Ze=0,Ke=w,pe=0;pe0)N--;else if(fe<0){for(we=k*Y,xe=k*J,he=k*N,Ke=w,pe=0;pe0)for(;;){K=w+N*k,Ze=0;e:for(pe=0;pe0){if(--Nz){e:for(;;){for(K=w+J*k,Ze=0,Ke=w,pe=0;pe1&&x?M(v,x[0],x[1]):M(v)}var g={"uint32,1,0":function(y,_){return function(v){var x=v.data,E=v.offset|0,M=v.shape,C=v.stride,w=C[0]|0,k=M[0]|0,T=C[1]|0,b=M[1]|0,S=T,A=T,F=1;k<=32?y(0,k-1,x,E,w,T,k,b,S,A,F):_(0,k-1,x,E,w,T,k,b,S,A,F)}}};function m(y,_){var v=[_,y].join(","),x=g[v],E=h(y,_),M=p(y,_,E);return x(E,M)}s.exports=m},446(s,l,n){"use strict";var u=n(7640),c={};function f(h){var d=h.order,p=h.dtype,g=[d,p],m=g.join(":"),y=c[m];return y||(c[m]=y=u(d,p)),y(h),h}s.exports=f},9618(s,l,n){var u=n(7163),c=typeof Float64Array<"u";function f(_,v){return _[0]-v[0]}function h(){var _=this.stride,v=new Array(_.length),x;for(x=0;x=0&&(T=w|0,k+=S*T,b-=T),new E(this.data,b,S,k)},M.step=function(w){var k=this.shape[0],T=this.stride[0],b=this.offset,S=0,A=Math.ceil;return typeof w=="number"&&(S=w|0,S<0?(b+=T*(k-1),k=A(-k/S)):k=A(k/S),T*=S),new E(this.data,k,T,b)},M.transpose=function(w){w=w===void 0?0:w|0;var k=this.shape,T=this.stride;return new E(this.data,k[w],T[w],this.offset)},M.pick=function(w){var k=[],T=[],b=this.offset;typeof w=="number"&&w>=0?b=b+this.stride[0]*w|0:(k.push(this.shape[0]),T.push(this.stride[0]));var S=v[k.length+1];return S(this.data,k,T,b)},function(w,k,T,b){return new E(w,k[0],T[0],b)}},2:function(_,v,x){function E(C,w,k,T,b,S){this.data=C,this.shape=[w,k],this.stride=[T,b],this.offset=S|0}var M=E.prototype;return M.dtype=_,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(w,k,T){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*k,T):this.data[this.offset+this.stride[0]*w+this.stride[1]*k]=T},M.get=function(w,k){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*k):this.data[this.offset+this.stride[0]*w+this.stride[1]*k]},M.index=function(w,k){return this.offset+this.stride[0]*w+this.stride[1]*k},M.hi=function(w,k){return new E(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof k!="number"||k<0?this.shape[1]:k|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(w,k){var T=this.offset,b=0,S=this.shape[0],A=this.shape[1],F=this.stride[0],D=this.stride[1];return typeof w=="number"&&w>=0&&(b=w|0,T+=F*b,S-=b),typeof k=="number"&&k>=0&&(b=k|0,T+=D*b,A-=b),new E(this.data,S,A,F,D,T)},M.step=function(w,k){var T=this.shape[0],b=this.shape[1],S=this.stride[0],A=this.stride[1],F=this.offset,D=0,R=Math.ceil;return typeof w=="number"&&(D=w|0,D<0?(F+=S*(T-1),T=R(-T/D)):T=R(T/D),S*=D),typeof k=="number"&&(D=k|0,D<0?(F+=A*(b-1),b=R(-b/D)):b=R(b/D),A*=D),new E(this.data,T,b,S,A,F)},M.transpose=function(w,k){w=w===void 0?0:w|0,k=k===void 0?1:k|0;var T=this.shape,b=this.stride;return new E(this.data,T[w],T[k],b[w],b[k],this.offset)},M.pick=function(w,k){var T=[],b=[],S=this.offset;typeof w=="number"&&w>=0?S=S+this.stride[0]*w|0:(T.push(this.shape[0]),b.push(this.stride[0])),typeof k=="number"&&k>=0?S=S+this.stride[1]*k|0:(T.push(this.shape[1]),b.push(this.stride[1]));var A=v[T.length+1];return A(this.data,T,b,S)},function(w,k,T,b){return new E(w,k[0],k[1],T[0],T[1],b)}},3:function(_,v,x){function E(C,w,k,T,b,S,A,F){this.data=C,this.shape=[w,k,T],this.stride=[b,S,A],this.offset=F|0}var M=E.prototype;return M.dtype=_,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var w=Math.abs(this.stride[0]),k=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return w>k?k>T?[2,1,0]:w>T?[1,2,0]:[1,0,2]:w>T?[2,0,1]:T>k?[0,1,2]:[0,2,1]}}),M.set=function(w,k,T,b){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T,b):this.data[this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T]=b},M.get=function(w,k,T){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T):this.data[this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T]},M.index=function(w,k,T){return this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T},M.hi=function(w,k,T){return new E(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof k!="number"||k<0?this.shape[1]:k|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(w,k,T){var b=this.offset,S=0,A=this.shape[0],F=this.shape[1],D=this.shape[2],R=this.stride[0],P=this.stride[1],z=this.stride[2];return typeof w=="number"&&w>=0&&(S=w|0,b+=R*S,A-=S),typeof k=="number"&&k>=0&&(S=k|0,b+=P*S,F-=S),typeof T=="number"&&T>=0&&(S=T|0,b+=z*S,D-=S),new E(this.data,A,F,D,R,P,z,b)},M.step=function(w,k,T){var b=this.shape[0],S=this.shape[1],A=this.shape[2],F=this.stride[0],D=this.stride[1],R=this.stride[2],P=this.offset,z=0,I=Math.ceil;return typeof w=="number"&&(z=w|0,z<0?(P+=F*(b-1),b=I(-b/z)):b=I(b/z),F*=z),typeof k=="number"&&(z=k|0,z<0?(P+=D*(S-1),S=I(-S/z)):S=I(S/z),D*=z),typeof T=="number"&&(z=T|0,z<0?(P+=R*(A-1),A=I(-A/z)):A=I(A/z),R*=z),new E(this.data,b,S,A,F,D,R,P)},M.transpose=function(w,k,T){w=w===void 0?0:w|0,k=k===void 0?1:k|0,T=T===void 0?2:T|0;var b=this.shape,S=this.stride;return new E(this.data,b[w],b[k],b[T],S[w],S[k],S[T],this.offset)},M.pick=function(w,k,T){var b=[],S=[],A=this.offset;typeof w=="number"&&w>=0?A=A+this.stride[0]*w|0:(b.push(this.shape[0]),S.push(this.stride[0])),typeof k=="number"&&k>=0?A=A+this.stride[1]*k|0:(b.push(this.shape[1]),S.push(this.stride[1])),typeof T=="number"&&T>=0?A=A+this.stride[2]*T|0:(b.push(this.shape[2]),S.push(this.stride[2]));var F=v[b.length+1];return F(this.data,b,S,A)},function(w,k,T,b){return new E(w,k[0],k[1],k[2],T[0],T[1],T[2],b)}},4:function(_,v,x){function E(C,w,k,T,b,S,A,F,D,R){this.data=C,this.shape=[w,k,T,b],this.stride=[S,A,F,D],this.offset=R|0}var M=E.prototype;return M.dtype=_,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:x}),M.set=function(w,k,T,b,S){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T+this.stride[3]*b,S):this.data[this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T+this.stride[3]*b]=S},M.get=function(w,k,T,b){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T+this.stride[3]*b):this.data[this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T+this.stride[3]*b]},M.index=function(w,k,T,b){return this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T+this.stride[3]*b},M.hi=function(w,k,T,b){return new E(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof k!="number"||k<0?this.shape[1]:k|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof b!="number"||b<0?this.shape[3]:b|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},M.lo=function(w,k,T,b){var S=this.offset,A=0,F=this.shape[0],D=this.shape[1],R=this.shape[2],P=this.shape[3],z=this.stride[0],I=this.stride[1],L=this.stride[2],B=this.stride[3];return typeof w=="number"&&w>=0&&(A=w|0,S+=z*A,F-=A),typeof k=="number"&&k>=0&&(A=k|0,S+=I*A,D-=A),typeof T=="number"&&T>=0&&(A=T|0,S+=L*A,R-=A),typeof b=="number"&&b>=0&&(A=b|0,S+=B*A,P-=A),new E(this.data,F,D,R,P,z,I,L,B,S)},M.step=function(w,k,T,b){var S=this.shape[0],A=this.shape[1],F=this.shape[2],D=this.shape[3],R=this.stride[0],P=this.stride[1],z=this.stride[2],I=this.stride[3],L=this.offset,B=0,O=Math.ceil;return typeof w=="number"&&(B=w|0,B<0?(L+=R*(S-1),S=O(-S/B)):S=O(S/B),R*=B),typeof k=="number"&&(B=k|0,B<0?(L+=P*(A-1),A=O(-A/B)):A=O(A/B),P*=B),typeof T=="number"&&(B=T|0,B<0?(L+=z*(F-1),F=O(-F/B)):F=O(F/B),z*=B),typeof b=="number"&&(B=b|0,B<0?(L+=I*(D-1),D=O(-D/B)):D=O(D/B),I*=B),new E(this.data,S,A,F,D,R,P,z,I,L)},M.transpose=function(w,k,T,b){w=w===void 0?0:w|0,k=k===void 0?1:k|0,T=T===void 0?2:T|0,b=b===void 0?3:b|0;var S=this.shape,A=this.stride;return new E(this.data,S[w],S[k],S[T],S[b],A[w],A[k],A[T],A[b],this.offset)},M.pick=function(w,k,T,b){var S=[],A=[],F=this.offset;typeof w=="number"&&w>=0?F=F+this.stride[0]*w|0:(S.push(this.shape[0]),A.push(this.stride[0])),typeof k=="number"&&k>=0?F=F+this.stride[1]*k|0:(S.push(this.shape[1]),A.push(this.stride[1])),typeof T=="number"&&T>=0?F=F+this.stride[2]*T|0:(S.push(this.shape[2]),A.push(this.stride[2])),typeof b=="number"&&b>=0?F=F+this.stride[3]*b|0:(S.push(this.shape[3]),A.push(this.stride[3]));var D=v[S.length+1];return D(this.data,S,A,F)},function(w,k,T,b){return new E(w,k[0],k[1],k[2],k[3],T[0],T[1],T[2],T[3],b)}},5:function(v,x,E){function M(w,k,T,b,S,A,F,D,R,P,z,I){this.data=w,this.shape=[k,T,b,S,A],this.stride=[F,D,R,P,z],this.offset=I|0}var C=M.prototype;return C.dtype=v,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:E}),C.set=function(k,T,b,S,A,F){return v==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*T+this.stride[2]*b+this.stride[3]*S+this.stride[4]*A,F):this.data[this.offset+this.stride[0]*k+this.stride[1]*T+this.stride[2]*b+this.stride[3]*S+this.stride[4]*A]=F},C.get=function(k,T,b,S,A){return v==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*T+this.stride[2]*b+this.stride[3]*S+this.stride[4]*A):this.data[this.offset+this.stride[0]*k+this.stride[1]*T+this.stride[2]*b+this.stride[3]*S+this.stride[4]*A]},C.index=function(k,T,b,S,A){return this.offset+this.stride[0]*k+this.stride[1]*T+this.stride[2]*b+this.stride[3]*S+this.stride[4]*A},C.hi=function(k,T,b,S,A){return new M(this.data,typeof k!="number"||k<0?this.shape[0]:k|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof b!="number"||b<0?this.shape[2]:b|0,typeof S!="number"||S<0?this.shape[3]:S|0,typeof A!="number"||A<0?this.shape[4]:A|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(k,T,b,S,A){var F=this.offset,D=0,R=this.shape[0],P=this.shape[1],z=this.shape[2],I=this.shape[3],L=this.shape[4],B=this.stride[0],O=this.stride[1],G=this.stride[2],$=this.stride[3],X=this.stride[4];return typeof k=="number"&&k>=0&&(D=k|0,F+=B*D,R-=D),typeof T=="number"&&T>=0&&(D=T|0,F+=O*D,P-=D),typeof b=="number"&&b>=0&&(D=b|0,F+=G*D,z-=D),typeof S=="number"&&S>=0&&(D=S|0,F+=$*D,I-=D),typeof A=="number"&&A>=0&&(D=A|0,F+=X*D,L-=D),new M(this.data,R,P,z,I,L,B,O,G,$,X,F)},C.step=function(k,T,b,S,A){var F=this.shape[0],D=this.shape[1],R=this.shape[2],P=this.shape[3],z=this.shape[4],I=this.stride[0],L=this.stride[1],B=this.stride[2],O=this.stride[3],G=this.stride[4],$=this.offset,X=0,Z=Math.ceil;return typeof k=="number"&&(X=k|0,X<0?($+=I*(F-1),F=Z(-F/X)):F=Z(F/X),I*=X),typeof T=="number"&&(X=T|0,X<0?($+=L*(D-1),D=Z(-D/X)):D=Z(D/X),L*=X),typeof b=="number"&&(X=b|0,X<0?($+=B*(R-1),R=Z(-R/X)):R=Z(R/X),B*=X),typeof S=="number"&&(X=S|0,X<0?($+=O*(P-1),P=Z(-P/X)):P=Z(P/X),O*=X),typeof A=="number"&&(X=A|0,X<0?($+=G*(z-1),z=Z(-z/X)):z=Z(z/X),G*=X),new M(this.data,F,D,R,P,z,I,L,B,O,G,$)},C.transpose=function(k,T,b,S,A){k=k===void 0?0:k|0,T=T===void 0?1:T|0,b=b===void 0?2:b|0,S=S===void 0?3:S|0,A=A===void 0?4:A|0;var F=this.shape,D=this.stride;return new M(this.data,F[k],F[T],F[b],F[S],F[A],D[k],D[T],D[b],D[S],D[A],this.offset)},C.pick=function(k,T,b,S,A){var F=[],D=[],R=this.offset;typeof k=="number"&&k>=0?R=R+this.stride[0]*k|0:(F.push(this.shape[0]),D.push(this.stride[0])),typeof T=="number"&&T>=0?R=R+this.stride[1]*T|0:(F.push(this.shape[1]),D.push(this.stride[1])),typeof b=="number"&&b>=0?R=R+this.stride[2]*b|0:(F.push(this.shape[2]),D.push(this.stride[2])),typeof S=="number"&&S>=0?R=R+this.stride[3]*S|0:(F.push(this.shape[3]),D.push(this.stride[3])),typeof A=="number"&&A>=0?R=R+this.stride[4]*A|0:(F.push(this.shape[4]),D.push(this.stride[4]));var P=x[F.length+1];return P(this.data,F,D,R)},function(k,T,b,S){return new M(k,T[0],T[1],T[2],T[3],T[4],b[0],b[1],b[2],b[3],b[4],S)}}};function p(_,v){var x=v===-1?"T":String(v),E=d[x];return v===-1?E(_):v===0?E(_,m[_][0]):E(_,m[_],h)}function g(_){if(u(_))return"buffer";if(c)switch(Object.prototype.toString.call(_)){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(_)?"array":"generic"}var m={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function y(_,v,x,E){if(_===void 0){var b=m.array[0];return b([])}else typeof _=="number"&&(_=[_]);v===void 0&&(v=[_.length]);var M=v.length;if(x===void 0){x=new Array(M);for(var C=M-1,w=1;C>=0;--C)x[C]=w,w*=v[C]}if(E===void 0){E=0;for(var C=0;C>>0;s.exports=h;function h(d,p){if(isNaN(d)||isNaN(p))return NaN;if(d===p)return d;if(d===0)return p<0?-c:c;var g=u.hi(d),m=u.lo(d);return p>d==d>0?m===f?(g+=1,m=0):m+=1:m===0?(m=f,g-=1):m-=1,u.pack(m,g)}},8406(s,l){var n=1e-6,u=1e-6;l.vertexNormals=function(c,f,h){for(var d=f.length,p=new Array(d),g=h===void 0?n:h,m=0;mg)for(var F=p[v],D=1/Math.sqrt(T*S),A=0;A<3;++A){var R=(A+1)%3,P=(A+2)%3;F[A]+=D*(b[R]*k[P]-b[P]*k[R])}}for(var m=0;mg)for(var D=1/Math.sqrt(z),A=0;A<3;++A)F[A]*=D;else for(var A=0;A<3;++A)F[A]=0}return p},l.faceNormals=function(c,f,h){for(var d=c.length,p=new Array(d),g=h===void 0?u:h,m=0;mg?C=1/Math.sqrt(C):C=0;for(var v=0;v<3;++v)M[v]*=C;p[m]=M}return p}},4081(s){"use strict";s.exports=l;function l(n,u,c,f,h,d,p,g,m,y){var _=u+d+y;if(v>0){var v=Math.sqrt(_+1);n[0]=.5*(p-m)/v,n[1]=.5*(g-f)/v,n[2]=.5*(c-d)/v,n[3]=.5*v}else{var x=Math.max(u,d,y),v=Math.sqrt(2*x-_+1);u>=x?(n[0]=.5*v,n[1]=.5*(h+c)/v,n[2]=.5*(g+f)/v,n[3]=.5*(p-m)/v):d>=x?(n[0]=.5*(c+h)/v,n[1]=.5*v,n[2]=.5*(m+p)/v,n[3]=.5*(g-f)/v):(n[0]=.5*(f+g)/v,n[1]=.5*(p+m)/v,n[2]=.5*v,n[3]=.5*(c-h)/v)}return n}},9977(s,l,n){"use strict";s.exports=v;var u=n(9215),c=n(6582),f=n(7399),h=n(7608),d=n(4081);function p(x,E,M){return Math.sqrt(Math.pow(x,2)+Math.pow(E,2)+Math.pow(M,2))}function g(x,E,M,C){return Math.sqrt(Math.pow(x,2)+Math.pow(E,2)+Math.pow(M,2)+Math.pow(C,2))}function m(x,E){var M=E[0],C=E[1],w=E[2],k=E[3],T=g(M,C,w,k);T>1e-6?(x[0]=M/T,x[1]=C/T,x[2]=w/T,x[3]=k/T):(x[0]=x[1]=x[2]=0,x[3]=1)}function y(x,E,M){this.radius=u([M]),this.center=u(E),this.rotation=u(x),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var _=y.prototype;_.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},_.recalcMatrix=function(x){this.radius.curve(x),this.center.curve(x),this.rotation.curve(x);var E=this.computedRotation;m(E,E);var M=this.computedMatrix;f(M,E);var C=this.computedCenter,w=this.computedEye,k=this.computedUp,T=Math.exp(this.computedRadius[0]);w[0]=C[0]+T*M[2],w[1]=C[1]+T*M[6],w[2]=C[2]+T*M[10],k[0]=M[1],k[1]=M[5],k[2]=M[9];for(var b=0;b<3;++b){for(var S=0,A=0;A<3;++A)S+=M[b+4*A]*w[A];M[12+b]=-S}},_.getMatrix=function(x,E){this.recalcMatrix(x);var M=this.computedMatrix;if(E){for(var C=0;C<16;++C)E[C]=M[C];return E}return M},_.idle=function(x){this.center.idle(x),this.radius.idle(x),this.rotation.idle(x)},_.flush=function(x){this.center.flush(x),this.radius.flush(x),this.rotation.flush(x)},_.pan=function(x,E,M,C){E=E||0,M=M||0,C=C||0,this.recalcMatrix(x);var w=this.computedMatrix,k=w[1],T=w[5],b=w[9],S=p(k,T,b);k/=S,T/=S,b/=S;var A=w[0],F=w[4],D=w[8],R=A*k+F*T+D*b;A-=k*R,F-=T*R,D-=b*R;var P=p(A,F,D);A/=P,F/=P,D/=P;var z=w[2],I=w[6],L=w[10],B=z*k+I*T+L*b,O=z*A+I*F+L*D;z-=B*k+O*A,I-=B*T+O*F,L-=B*b+O*D;var G=p(z,I,L);z/=G,I/=G,L/=G;var $=A*E+k*M,X=F*E+T*M,Z=D*E+b*M;this.center.move(x,$,X,Z);var J=Math.exp(this.computedRadius[0]);J=Math.max(1e-4,J+C),this.radius.set(x,Math.log(J))},_.rotate=function(x,E,M,C){this.recalcMatrix(x),E=E||0,M=M||0;var w=this.computedMatrix,k=w[0],T=w[4],b=w[8],S=w[1],A=w[5],F=w[9],D=w[2],R=w[6],P=w[10],z=E*k+M*S,I=E*T+M*A,L=E*b+M*F,B=-(R*L-P*I),O=-(P*z-D*L),G=-(D*I-R*z),$=Math.sqrt(Math.max(0,1-Math.pow(B,2)-Math.pow(O,2)-Math.pow(G,2))),X=g(B,O,G,$);X>1e-6?(B/=X,O/=X,G/=X,$/=X):(B=O=G=0,$=1);var Z=this.computedRotation,J=Z[0],N=Z[1],H=Z[2],W=Z[3],U=J*$+W*B+N*G-H*O,V=N*$+W*O+H*B-J*G,j=H*$+W*G+J*O-N*B,q=W*$-J*B-N*O-H*G;if(C){B=D,O=R,G=P;var Y=Math.sin(C)/p(B,O,G);B*=Y,O*=Y,G*=Y,$=Math.cos(E),U=U*$+q*B+V*G-j*O,V=V*$+q*O+j*B-U*G,j=j*$+q*G+U*O-V*B,q=q*$-U*B-V*O-j*G}var K=g(U,V,j,q);K>1e-6?(U/=K,V/=K,j/=K,q/=K):(U=V=j=0,q=1),this.rotation.set(x,U,V,j,q)},_.lookAt=function(x,E,M,C){this.recalcMatrix(x),M=M||this.computedCenter,E=E||this.computedEye,C=C||this.computedUp;var w=this.computedMatrix;c(w,E,M,C);var k=this.computedRotation;d(k,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),m(k,k),this.rotation.set(x,k[0],k[1],k[2],k[3]);for(var T=0,b=0;b<3;++b)T+=Math.pow(M[b]-E[b],2);this.radius.set(x,.5*Math.log(Math.max(T,1e-6))),this.center.set(x,M[0],M[1],M[2])},_.translate=function(x,E,M,C){this.center.move(x,E||0,M||0,C||0)},_.setMatrix=function(x,E){var M=this.computedRotation;d(M,E[0],E[1],E[2],E[4],E[5],E[6],E[8],E[9],E[10]),m(M,M),this.rotation.set(x,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;h(C,E);var w=C[15];if(Math.abs(w)>1e-6){var k=C[12]/w,T=C[13]/w,b=C[14]/w;this.recalcMatrix(x);var S=Math.exp(this.computedRadius[0]);this.center.set(x,k-C[2]*S,T-C[6]*S,b-C[10]*S),this.radius.idle(x)}else this.center.idle(x),this.radius.idle(x)},_.setDistance=function(x,E){E>0&&this.radius.set(x,Math.log(E))},_.setDistanceLimits=function(x,E){x>0?x=Math.log(x):x=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,x),this.radius.bounds[0][0]=x,this.radius.bounds[1][0]=E},_.getDistanceLimits=function(x){var E=this.radius.bounds;return x?(x[0]=Math.exp(E[0][0]),x[1]=Math.exp(E[1][0]),x):[Math.exp(E[0][0]),Math.exp(E[1][0])]},_.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]}},_.fromJSON=function(x){var E=this.lastT(),M=x.center;M&&this.center.set(E,M[0],M[1],M[2]);var C=x.rotation;C&&this.rotation.set(E,C[0],C[1],C[2],C[3]);var w=x.distance;w&&w>0&&this.radius.set(E,Math.log(w)),this.setDistanceLimits(x.zoomMin,x.zoomMax)};function v(x){x=x||{};var E=x.center||[0,0,0],M=x.rotation||[0,0,0,1],C=x.radius||1;E=[].slice.call(E,0,3),M=[].slice.call(M,0,4),m(M,M);var w=new y(M,E,Math.log(C));return w.setDistanceLimits(x.zoomMin,x.zoomMax),("eye"in x||"up"in x)&&w.lookAt(0,x.eye,x.center,x.up),w}},1371(s,l,n){"use strict";var u=n(3233);s.exports=function(f,h,d){return d=typeof d<"u"?d+"":" ",u(d,h)+f}},3202(s){s.exports=function(n,u){u||(u=[0,""]),n=String(n);var c=parseFloat(n,10);return u[0]=c,u[1]=n.match(/[\d.\-\+]*\s*(.*)/)[1]||"",u}},3088(s,l,n){"use strict";s.exports=c;var u=n(3140);function c(f,h){for(var d=h.length|0,p=f.length,g=[new Array(d),new Array(d)],m=0;m0){F=g[P][S][0],R=P;break}D=F[R^1];for(var z=0;z<2;++z)for(var I=g[z][S],L=0;L0&&(F=B,D=O,R=z)}return A||F&&v(F,R),D}function E(b,S){var A=g[S][b][0],F=[b];v(A,S);for(var D=A[S^1],R=S;;){for(;D!==b;)F.push(D),D=x(F[F.length-2],D,!1);if(g[0][b].length+g[1][b].length===0)break;var P=F[F.length-1],z=b,I=F[1],L=x(P,z,!0);if(u(h[P],h[z],h[I],h[L])<0)break;F.push(b),D=x(P,z)}return F}function M(b,S){return S[1]===S[S.length-1]}for(var m=0;m0;){var k=g[0][m].length,T=E(m,C);M(w,T)?w.push.apply(w,T):(w.length>0&&_.push(w),w=T)}w.length>0&&_.push(w)}return _}},5609(s,l,n){"use strict";s.exports=c;var u=n(3134);function c(f,h){for(var d=u(f,h.length),p=new Array(h.length),g=new Array(h.length),m=[],y=0;y0;){var v=m.pop();p[v]=!1;for(var x=d[v],y=0;y0}k=k.filter(T);for(var b=k.length,S=new Array(b),A=new Array(b),w=0;w0;){var K=j.pop(),re=X[K];p(re,function(pe,we){return pe-we});var se=re.length,le=q[K],ue;if(le===0){var I=k[K];ue=[I]}for(var w=0;w=0)&&(q[fe]=le^1,j.push(fe),le===0)){var I=k[fe];V(I)||(I.reverse(),ue.push(I))}}le===0&&Y.push(ue)}return Y}},5085(s,l,n){s.exports=x;var u=n(3250)[3],c=n(4209),f=n(3352),h=n(2478);function d(){return!0}function p(E){return function(M,C){var w=E[M];return w?!!w.queryPoint(C,d):!1}}function g(E){for(var M={},C=0;C0&&M[w]===C[0])k=E[w-1];else return 1;for(var T=1;k;){var b=k.key,S=u(C,b[0],b[1]);if(b[0][0]0)T=-1,k=k.right;else return 0;else if(S>0)k=k.left;else if(S<0)T=1,k=k.right;else return 0}return T}}function y(E){return 1}function _(E){return function(C){return E(C[0],C[1])?0:1}}function v(E,M){return function(w){return E(w[0],w[1])?0:M(w)}}function x(E){for(var M=E.length,C=[],w=[],k=0,T=0;T=y?(b=1,A=y+2*x+M):(b=-x/y,A=x*b+M)):(b=0,E>=0?(S=0,A=M):-E>=v?(S=1,A=v+2*E+M):(S=-E/v,A=E*S+M));else if(S<0)S=0,x>=0?(b=0,A=M):-x>=y?(b=1,A=y+2*x+M):(b=-x/y,A=x*b+M);else{var F=1/T;b*=F,S*=F,A=b*(y*b+_*S+2*x)+S*(_*b+v*S+2*E)+M}else{var D,R,P,z;b<0?(D=_+x,R=v+E,R>D?(P=R-D,z=y-2*_+v,P>=z?(b=1,S=0,A=y+2*x+M):(b=P/z,S=1-b,A=b*(y*b+_*S+2*x)+S*(_*b+v*S+2*E)+M)):(b=0,R<=0?(S=1,A=v+2*E+M):E>=0?(S=0,A=M):(S=-E/v,A=E*S+M))):S<0?(D=_+E,R=y+x,R>D?(P=R-D,z=y-2*_+v,P>=z?(S=1,b=0,A=v+2*E+M):(S=P/z,b=1-S,A=b*(y*b+_*S+2*x)+S*(_*b+v*S+2*E)+M)):(S=0,R<=0?(b=1,A=y+2*x+M):x>=0?(b=0,A=M):(b=-x/y,A=x*b+M))):(P=v+E-_-x,P<=0?(b=0,S=1,A=v+2*E+M):(z=y-2*_+v,P>=z?(b=1,S=0,A=y+2*x+M):(b=P/z,S=1-b,A=b*(y*b+_*S+2*x)+S*(_*b+v*S+2*E)+M)))}for(var I=1-b-S,m=0;m0){var v=d[g-1];if(u(y,v)===0&&f(v)!==_){g-=1;continue}}d[g++]=y}}return d.length=g,d}},3233(s){"use strict";var l="",n;s.exports=u;function u(c,f){if(typeof c!="string")throw new TypeError("expected a string");if(f===1)return c;if(f===2)return c+c;var h=c.length*f;if(n!==c||typeof n>"u")n=c,l="";else if(l.length>=h)return l.substr(0,h);for(;h>l.length&&f>1;)f&1&&(l+=c),f>>=1,c+=c;return l+=c,l=l.substr(0,h),l}},3025(s,l,n){s.exports=n.g.performance&&n.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004(s){"use strict";s.exports=l;function l(n){for(var u=n.length,c=n[n.length-1],f=u,h=u-2;h>=0;--h){var d=c,p=n[h];c=d+p;var g=c-d,m=p-g;m&&(n[--f]=c,c=m)}for(var y=0,h=f;h0){if(R<=0)return P;z=D+R}else if(D<0){if(R>=0)return P;z=-(D+R)}else return P;var I=g*z;return P>=I||P<=-I?P:E(S,A,F)},function(S,A,F,D){var R=S[0]-D[0],P=A[0]-D[0],z=F[0]-D[0],I=S[1]-D[1],L=A[1]-D[1],B=F[1]-D[1],O=S[2]-D[2],G=A[2]-D[2],$=F[2]-D[2],X=P*B,Z=z*L,J=z*I,N=R*B,H=R*L,W=P*I,U=O*(X-Z)+G*(J-N)+$*(H-W),V=(Math.abs(X)+Math.abs(Z))*Math.abs(O)+(Math.abs(J)+Math.abs(N))*Math.abs(G)+(Math.abs(H)+Math.abs(W))*Math.abs($),j=m*V;return U>j||-U>j?U:M(S,A,F,D)}];function w(b){var S=C[b.length];return S||(S=C[b.length]=x(b.length)),S.apply(void 0,b)}function k(b,S,A,F,D,R,P){return function(I,L,B,O,G){switch(arguments.length){case 0:case 1:return 0;case 2:return F(I,L);case 3:return D(I,L,B);case 4:return R(I,L,B,O);case 5:return P(I,L,B,O,G)}for(var $=new Array(arguments.length),X=0;X0&&y>0||m<0&&y<0)return!1;var _=u(p,h,d),v=u(g,h,d);return _>0&&v>0||_<0&&v<0?!1:m===0&&y===0&&_===0&&v===0?c(h,d,p,g):!0}},8545(s){"use strict";s.exports=n;function l(u,c){var f=u+c,h=f-u,d=f-h,p=c-h,g=u-d,m=g+p;return m?[m,f]:[f]}function n(u,c){var f=u.length|0,h=c.length|0;if(f===1&&h===1)return l(u[0],-c[0]);var d=f+h,p=new Array(d),g=0,m=0,y=0,_=Math.abs,v=u[m],x=_(v),E=-c[y],M=_(E),C,w;x=h?(C=v,m+=1,m=h?(C=v,m+=1,m"u"&&(C=d(x));var w=x.length;if(w===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var k=p(E,+M),T=g(x,C),b=m(T,E,k,+M),S=y(T,E.length|0),A=h(C)(x,T.data,S,k),F=_(T),D=[].slice.call(b.data,0,b.shape[0]);return c.free(k),c.free(T.data),c.free(b.data),c.free(S),{cells:A,vertexIds:F,vertexWeights:D}}},1570(s){"use strict";s.exports=n;var l=[function(){function c(h,d,p,g){for(var m=Math.min(p,g)|0,y=Math.max(p,g)|0,_=h[2*m],v=h[2*m+1];_>1,E=d[2*x+1];if(E===y)return x;y>1,E=d[2*x+1];if(E===y)return x;y>1,E=d[2*x+1];if(E===y)return x;y>1,E=d[2*x+1];if(E===y)return x;y>1,z=g(S[P],A);z<=0?(z===0&&(R=P),F=P+1):z>0&&(D=P-1)}return R}u=v;function x(S,A){for(var F=new Array(S.length),D=0,R=F.length;D=S.length||g(S[X],P)!==0););}return F}u=x;function E(S,A){if(!A)return x(_(C(S,0)),S,0);for(var F=new Array(A),D=0;D>>B&1&&L.push(R[B]);A.push(L)}return y(A)}u=M;function C(S,A){if(A<0)return[];for(var F=[],D=(1<0)-(f<0)},l.abs=function(f){var h=f>>n-1;return(f^h)-h},l.min=function(f,h){return h^(f^h)&-(f65535)<<4,f>>>=h,d=(f>255)<<3,f>>>=d,h|=d,d=(f>15)<<2,f>>>=d,h|=d,d=(f>3)<<1,f>>>=d,h|=d,h|f>>1},l.log10=function(f){return f>=1e9?9:f>=1e8?8:f>=1e7?7:f>=1e6?6:f>=1e5?5:f>=1e4?4:f>=1e3?3:f>=100?2:f>=10?1:0},l.popCount=function(f){return f=f-(f>>>1&1431655765),f=(f&858993459)+(f>>>2&858993459),(f+(f>>>4)&252645135)*16843009>>>24};function u(f){var h=32;return f&=-f,f&&h--,f&65535&&(h-=16),f&16711935&&(h-=8),f&252645135&&(h-=4),f&858993459&&(h-=2),f&1431655765&&(h-=1),h}l.countTrailingZeros=u,l.nextPow2=function(f){return f+=f===0,--f,f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f+1},l.prevPow2=function(f){return f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f-(f>>>1)},l.parity=function(f){return f^=f>>>16,f^=f>>>8,f^=f>>>4,f&=15,27030>>>f&1};var c=new Array(256);(function(f){for(var h=0;h<256;++h){var d=h,p=h,g=7;for(d>>>=1;d;d>>>=1)p<<=1,p|=d&1,--g;f[h]=p<>>8&255]<<16|c[f>>>16&255]<<8|c[f>>>24&255]},l.interleave2=function(f,h){return f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,h&=65535,h=(h|h<<8)&16711935,h=(h|h<<4)&252645135,h=(h|h<<2)&858993459,h=(h|h<<1)&1431655765,f|h<<1},l.deinterleave2=function(f,h){return f=f>>>h&1431655765,f=(f|f>>>1)&858993459,f=(f|f>>>2)&252645135,f=(f|f>>>4)&16711935,f=(f|f>>>16)&65535,f<<16>>16},l.interleave3=function(f,h,d){return f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,h&=1023,h=(h|h<<16)&4278190335,h=(h|h<<8)&251719695,h=(h|h<<4)&3272356035,h=(h|h<<2)&1227133513,f|=h<<1,d&=1023,d=(d|d<<16)&4278190335,d=(d|d<<8)&251719695,d=(d|d<<4)&3272356035,d=(d|d<<2)&1227133513,f|d<<2},l.deinterleave3=function(f,h){return f=f>>>h&1227133513,f=(f|f>>>2)&3272356035,f=(f|f>>>4)&251719695,f=(f|f>>>8)&4278190335,f=(f|f>>>16)&1023,f<<22>>22},l.nextCombination=function(f){var h=f|f-1;return h+1|(~h&-~h)-1>>>u(f)+1}},2014(s,l,n){"use strict";"use restrict";var u=n(3105),c=n(4623);function f(b){for(var S=0,A=Math.max,F=0,D=b.length;F>1,P=p(b[R],S);P<=0?(P===0&&(D=R),A=R+1):P>0&&(F=R-1)}return D}l.findCell=_;function v(b,S){for(var A=new Array(b.length),F=0,D=A.length;F=b.length||p(b[$],R)!==0););}return A}l.incidence=v;function x(b,S){if(!S)return v(y(M(b,0)),b,0);for(var A=new Array(S),F=0;F>>L&1&&I.push(D[L]);S.push(I)}return m(S)}l.explode=E;function M(b,S){if(S<0)return[];for(var A=[],F=(1<>1:(N>>1)-1}function F(N){for(var H=S(N);;){var W=H,U=2*N+1,V=2*(N+1),j=N;if(U0;){var W=A(N);if(W>=0){var U=S(W);if(H0){var N=I[0];return b(0,O-1),O-=1,F(0),N}return-1}function P(N,H){var W=I[N];return x[W]===H?N:(x[W]=-1/0,D(N),R(),x[W]=H,O+=1,D(O-1))}function z(N){if(!E[N]){E[N]=!0;var H=_[N],W=v[N];_[W]>=0&&(_[W]=H),v[H]>=0&&(v[H]=W),L[H]>=0&&P(L[H],T(H)),L[W]>=0&&P(L[W],T(W))}}for(var I=[],L=new Array(m),M=0;M>1;M>=0;--M)F(M);for(;;){var G=R();if(G<0||x[G]>g)break;z(G)}for(var $=[],M=0;M=0&&W>=0&&H!==W){var U=L[H],V=L[W];U!==V&&J.push([U,V])}}),c.unique(c.normalize(J)),{positions:$,edges:J}}},1303(s,l,n){"use strict";s.exports=f;var u=n(3250);function c(h,d){var p,g;if(d[0][0]d[1][0])p=d[1],g=d[0];else{var m=Math.min(h[0][1],h[1][1]),y=Math.max(h[0][1],h[1][1]),_=Math.min(d[0][1],d[1][1]),v=Math.max(d[0][1],d[1][1]);return y<_?y-_:m>v?m-v:y-v}var x,E;h[0][1]d[1][0])p=d[1],g=d[0];else return c(d,h);var m,y;if(h[0][0]h[1][0])m=h[1],y=h[0];else return-c(h,d);var _=u(p,g,y),v=u(p,g,m);if(_<0){if(v<=0)return _}else if(_>0){if(v>=0)return _}else if(v)return v;if(_=u(y,m,g),v=u(y,m,p),_<0){if(v<=0)return _}else if(_>0){if(v>=0)return _}else if(v)return v;return g[0]-y[0]}},4209(s,l,n){"use strict";s.exports=v;var u=n(2478),c=n(3840),f=n(3250),h=n(1303);function d(x,E,M){this.slabs=x,this.coordinates=E,this.horizontal=M}var p=d.prototype;function g(x,E){return x.y-E}function m(x,E){for(var M=null;x;){var C=x.key,w,k;C[0][0]0)if(E[0]!==C[1][0])M=x,x=x.right;else{var b=m(x.right,E);if(b)return b;x=x.left}else{if(E[0]!==C[1][0])return x;var b=m(x.right,E);if(b)return b;x=x.left}}return M}p.castUp=function(x){var E=u.le(this.coordinates,x[0]);if(E<0)return-1;var M=this.slabs[E],C=m(this.slabs[E],x),w=-1;if(C&&(w=C.value),this.coordinates[E]===x[0]){var k=null;if(C&&(k=C.key),E>0){var T=m(this.slabs[E-1],x);T&&(k?h(T.key,k)>0&&(k=T.key,w=T.value):(w=T.value,k=T.key))}var b=this.horizontal[E];if(b.length>0){var S=u.ge(b,x[1],g);if(S=b.length)return w;A=b[S]}}if(A.start)if(k){var F=f(k[0],k[1],[x[0],A.y]);k[0][0]>k[1][0]&&(F=-F),F>0&&(w=A.index)}else w=A.index;else A.y!==x[1]&&(w=A.index)}}}return w};function y(x,E,M,C){this.y=x,this.index=E,this.start=M,this.closed=C}function _(x,E,M,C){this.x=x,this.segment=E,this.create=M,this.index=C}function v(x){for(var E=x.length,M=2*E,C=new Array(M),w=0;w1&&(E=1);for(var M=1-E,C=m.length,w=new Array(C),k=0;k0||x>0&&w<0){var k=h(E,w,M,x);_.push(k),v.push(k.slice())}w<0?v.push(M.slice()):w>0?_.push(M.slice()):(_.push(M.slice()),v.push(M.slice())),x=w}return{positive:_,negative:v}}function p(m,y){for(var _=[],v=f(m[m.length-1],y),x=m[m.length-1],E=m[0],M=0;M0||v>0&&C<0)&&_.push(h(x,C,E,v)),C>=0&&_.push(E.slice()),v=C}return _}function g(m,y){for(var _=[],v=f(m[m.length-1],y),x=m[m.length-1],E=m[0],M=0;M0||v>0&&C<0)&&_.push(h(x,C,E,v)),C<=0&&_.push(E.slice()),v=C}return _}},3387(s,l,n){var u;(function(){"use strict";var c={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function f(m){return d(g(m),arguments)}function h(m,y){return f.apply(null,[m].concat(y||[]))}function d(m,y){var _=1,v=m.length,x,E="",M,C,w,k,T,b,S,A;for(M=0;M=0),w.type){case"b":x=parseInt(x,10).toString(2);break;case"c":x=String.fromCharCode(parseInt(x,10));break;case"d":case"i":x=parseInt(x,10);break;case"j":x=JSON.stringify(x,null,w.width?parseInt(w.width):0);break;case"e":x=w.precision?parseFloat(x).toExponential(w.precision):parseFloat(x).toExponential();break;case"f":x=w.precision?parseFloat(x).toFixed(w.precision):parseFloat(x);break;case"g":x=w.precision?String(Number(x.toPrecision(w.precision))):parseFloat(x);break;case"o":x=(parseInt(x,10)>>>0).toString(8);break;case"s":x=String(x),x=w.precision?x.substring(0,w.precision):x;break;case"t":x=String(!!x),x=w.precision?x.substring(0,w.precision):x;break;case"T":x=Object.prototype.toString.call(x).slice(8,-1).toLowerCase(),x=w.precision?x.substring(0,w.precision):x;break;case"u":x=parseInt(x,10)>>>0;break;case"v":x=x.valueOf(),x=w.precision?x.substring(0,w.precision):x;break;case"x":x=(parseInt(x,10)>>>0).toString(16);break;case"X":x=(parseInt(x,10)>>>0).toString(16).toUpperCase();break}c.json.test(w.type)?E+=x:(c.number.test(w.type)&&(!S||w.sign)?(A=S?"+":"-",x=x.toString().replace(c.sign,"")):A="",T=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",b=w.width-(A+x).length,k=w.width&&b>0?T.repeat(b):"",E+=w.align?A+x+k:T==="0"?A+k+x:k+A+x)}return E}var p=Object.create(null);function g(m){if(p[m])return p[m];for(var y=m,_,v=[],x=0;y;){if((_=c.text.exec(y))!==null)v.push(_[0]);else if((_=c.modulo.exec(y))!==null)v.push("%");else if((_=c.placeholder.exec(y))!==null){if(_[2]){x|=1;var E=[],M=_[2],C=[];if((C=c.key.exec(M))!==null)for(E.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=c.key_access.exec(M))!==null)E.push(C[1]);else if((C=c.index_access.exec(M))!==null)E.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");_[2]=E}else x|=2;if(x===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");v.push({placeholder:_[0],param_no:_[1],keys:_[2],sign:_[3],pad_char:_[4],align:_[5],width:_[6],precision:_[7],type:_[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");y=y.substring(_[0].length)}return p[m]=v}l.sprintf=f,l.vsprintf=h,typeof window<"u"&&(window.sprintf=f,window.vsprintf=h,u=(function(){return{sprintf:f,vsprintf:h}}).call(l,n,l,s),u!==void 0&&(s.exports=u))})()},3711(s,l,n){"use strict";s.exports=g;var u=n(2640),c=n(781),f={"2d":function(m,y,_){var v=m({order:y,scalarArguments:3,getters:_==="generic"?[0]:void 0,phase:function(E,M,C,w){return E>w|0},vertex:function(E,M,C,w,k,T,b,S,A,F,D,R,P){var z=(b<<0)+(S<<1)+(A<<2)+(F<<3)|0;if(!(z===0||z===15))switch(z){case 0:D.push([E-.5,M-.5]);break;case 1:D.push([E-.25-.25*(w+C-2*P)/(C-w),M-.25-.25*(k+C-2*P)/(C-k)]);break;case 2:D.push([E-.75-.25*(-w-C+2*P)/(w-C),M-.25-.25*(T+w-2*P)/(w-T)]);break;case 3:D.push([E-.5,M-.5-.5*(k+C+T+w-4*P)/(C-k+w-T)]);break;case 4:D.push([E-.25-.25*(T+k-2*P)/(k-T),M-.75-.25*(-k-C+2*P)/(k-C)]);break;case 5:D.push([E-.5-.5*(w+C+T+k-4*P)/(C-w+k-T),M-.5]);break;case 6:D.push([E-.5-.25*(-w-C+T+k)/(w-C+k-T),M-.5-.25*(-k-C+T+w)/(k-C+w-T)]);break;case 7:D.push([E-.75-.25*(T+k-2*P)/(k-T),M-.75-.25*(T+w-2*P)/(w-T)]);break;case 8:D.push([E-.75-.25*(-T-k+2*P)/(T-k),M-.75-.25*(-T-w+2*P)/(T-w)]);break;case 9:D.push([E-.5-.25*(w+C+-T-k)/(C-w+T-k),M-.5-.25*(k+C+-T-w)/(C-k+T-w)]);break;case 10:D.push([E-.5-.5*(-w-C+-T-k+4*P)/(w-C+T-k),M-.5]);break;case 11:D.push([E-.25-.25*(-T-k+2*P)/(T-k),M-.75-.25*(k+C-2*P)/(C-k)]);break;case 12:D.push([E-.5,M-.5-.5*(-k-C+-T-w+4*P)/(k-C+T-w)]);break;case 13:D.push([E-.75-.25*(w+C-2*P)/(C-w),M-.25-.25*(-T-w+2*P)/(T-w)]);break;case 14:D.push([E-.25-.25*(-w-C+2*P)/(w-C),M-.25-.25*(-k-C+2*P)/(k-C)]);break;case 15:D.push([E-.5,M-.5]);break}},cell:function(E,M,C,w,k,T,b,S,A){k?S.push([E,M]):S.push([M,E])}});return function(x,E){var M=[],C=[];return v(x,M,C,E),{positions:M,cells:C}}}};function h(m,y){var _=m.length+"d",v=f[_];if(v)return v(u,m,y)}function d(m,y){for(var _=c(m,y),v=_.length,x=new Array(v),E=new Array(v),M=0;MMath.max(w,k)?T[2]=1:w>Math.max(C,k)?T[0]=1:T[1]=1;for(var b=0,S=0,A=0;A<3;++A)b+=M[A]*M[A],S+=T[A]*M[A];for(var A=0;A<3;++A)T[A]-=S/b*M[A];return d(T,T),T}function _(M,C,w,k,T,b,S,A){this.center=u(w),this.up=u(k),this.right=u(T),this.radius=u([b]),this.angle=u([S,A]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),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 F=0;F<16;++F)this.computedMatrix[F]=.5;this.recalcMatrix(0)}var v=_.prototype;v.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},v.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},v.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,w=this.computedRight,k=0,T=0,b=0;b<3;++b)T+=C[b]*w[b],k+=C[b]*C[b];for(var S=Math.sqrt(k),A=0,b=0;b<3;++b)w[b]-=C[b]*T/k,A+=w[b]*w[b],C[b]/=S;for(var F=Math.sqrt(A),b=0;b<3;++b)w[b]/=F;var D=this.computedToward;h(D,C,w),d(D,D);for(var R=Math.exp(this.computedRadius[0]),P=this.computedAngle[0],z=this.computedAngle[1],I=Math.cos(P),L=Math.sin(P),B=Math.cos(z),O=Math.sin(z),G=this.computedCenter,$=I*B,X=L*B,Z=O,J=-I*O,N=-L*O,H=B,W=this.computedEye,U=this.computedMatrix,b=0;b<3;++b){var V=$*w[b]+X*D[b]+Z*C[b];U[4*b+1]=J*w[b]+N*D[b]+H*C[b],U[4*b+2]=V,U[4*b+3]=0}var j=U[1],q=U[5],Y=U[9],K=U[2],re=U[6],se=U[10],le=q*se-Y*re,ue=Y*K-j*se,fe=j*re-q*K,pe=g(le,ue,fe);le/=pe,ue/=pe,fe/=pe,U[0]=le,U[4]=ue,U[8]=fe;for(var b=0;b<3;++b)W[b]=G[b]+U[2+4*b]*R;for(var b=0;b<3;++b){for(var A=0,we=0;we<3;++we)A+=U[b+4*we]*W[we];U[12+b]=-A}U[15]=1},v.getMatrix=function(M,C){this.recalcMatrix(M);var w=this.computedMatrix;if(C){for(var k=0;k<16;++k)C[k]=w[k];return C}return w};var x=[0,0,0];v.rotate=function(M,C,w,k){if(this.angle.move(M,C,w),k){this.recalcMatrix(M);var T=this.computedMatrix;x[0]=T[2],x[1]=T[6],x[2]=T[10];for(var b=this.computedUp,S=this.computedRight,A=this.computedToward,F=0;F<3;++F)T[4*F]=b[F],T[4*F+1]=S[F],T[4*F+2]=A[F];f(T,T,k,x);for(var F=0;F<3;++F)b[F]=T[4*F],S[F]=T[4*F+1];this.up.set(M,b[0],b[1],b[2]),this.right.set(M,S[0],S[1],S[2])}},v.pan=function(M,C,w,k){C=C||0,w=w||0,k=k||0,this.recalcMatrix(M);var T=this.computedMatrix,b=Math.exp(this.computedRadius[0]),S=T[1],A=T[5],F=T[9],D=g(S,A,F);S/=D,A/=D,F/=D;var R=T[0],P=T[4],z=T[8],I=R*S+P*A+z*F;R-=S*I,P-=A*I,z-=F*I;var L=g(R,P,z);R/=L,P/=L,z/=L;var B=R*C+S*w,O=P*C+A*w,G=z*C+F*w;this.center.move(M,B,O,G);var $=Math.exp(this.computedRadius[0]);$=Math.max(1e-4,$+k),this.radius.set(M,Math.log($))},v.translate=function(M,C,w,k){this.center.move(M,C||0,w||0,k||0)},v.setMatrix=function(M,C,w,k){var T=1;typeof w=="number"&&(T=w|0),(T<0||T>3)&&(T=1);var b=(T+2)%3,S=(T+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var A=C[T],F=C[T+4],D=C[T+8];if(k){var P=Math.abs(A),z=Math.abs(F),I=Math.abs(D),L=Math.max(P,z,I);P===L?(A=A<0?-1:1,F=D=0):I===L?(D=D<0?-1:1,A=F=0):(F=F<0?-1:1,A=D=0)}else{var R=g(A,F,D);A/=R,F/=R,D/=R}var B=C[b],O=C[b+4],G=C[b+8],$=B*A+O*F+G*D;B-=A*$,O-=F*$,G-=D*$;var X=g(B,O,G);B/=X,O/=X,G/=X;var Z=F*G-D*O,J=D*B-A*G,N=A*O-F*B,H=g(Z,J,N);Z/=H,J/=H,N/=H,this.center.jump(M,ie,ee,ce),this.radius.idle(M),this.up.jump(M,A,F,D),this.right.jump(M,B,O,G);var W,U;if(T===2){var V=C[1],j=C[5],q=C[9],Y=V*B+j*O+q*G,K=V*Z+j*J+q*N;ue<0?W=-Math.PI/2:W=Math.PI/2,U=Math.atan2(K,Y)}else{var re=C[2],se=C[6],le=C[10],ue=re*A+se*F+le*D,fe=re*B+se*O+le*G,pe=re*Z+se*J+le*N;W=Math.asin(m(ue)),U=Math.atan2(pe,fe)}this.angle.jump(M,U,W),this.recalcMatrix(M);var we=C[2],xe=C[6],he=C[10],oe=this.computedMatrix;c(oe,C);var te=oe[15],ie=oe[12]/te,ee=oe[13]/te,ce=oe[14]/te,_e=Math.exp(this.computedRadius[0]);this.center.jump(M,ie-we*_e,ee-xe*_e,ce-he*_e)},v.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},v.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},v.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},v.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},v.lookAt=function(M,C,w,k){this.recalcMatrix(M),C=C||this.computedEye,w=w||this.computedCenter,k=k||this.computedUp;var T=k[0],b=k[1],S=k[2],A=g(T,b,S);if(!(A<1e-6)){T/=A,b/=A,S/=A;var F=C[0]-w[0],D=C[1]-w[1],R=C[2]-w[2],P=g(F,D,R);if(!(P<1e-6)){F/=P,D/=P,R/=P;var z=this.computedRight,I=z[0],L=z[1],B=z[2],O=T*I+b*L+S*B;I-=O*T,L-=O*b,B-=O*S;var G=g(I,L,B);if(!(G<.01&&(I=b*R-S*D,L=S*F-T*R,B=T*D-b*F,G=g(I,L,B),G<1e-6))){I/=G,L/=G,B/=G,this.up.set(M,T,b,S),this.right.set(M,I,L,B),this.center.set(M,w[0],w[1],w[2]),this.radius.set(M,Math.log(P));var $=b*B-S*L,X=S*I-T*B,Z=T*L-b*I,J=g($,X,Z);$/=J,X/=J,Z/=J;var N=T*F+b*D+S*R,H=I*F+L*D+B*R,W=$*F+X*D+Z*R,U=Math.asin(m(N)),V=Math.atan2(W,H),j=this.angle._state,q=j[j.length-1],Y=j[j.length-2];q=q%(2*Math.PI);var K=Math.abs(q+2*Math.PI-V),re=Math.abs(q-V),se=Math.abs(q-2*Math.PI-V);K0?B.pop():new ArrayBuffer(I)}l.mallocArrayBuffer=x;function E(z){return new Uint8Array(x(z),0,z)}l.mallocUint8=E;function M(z){return new Uint16Array(x(2*z),0,z)}l.mallocUint16=M;function C(z){return new Uint32Array(x(4*z),0,z)}l.mallocUint32=C;function w(z){return new Int8Array(x(z),0,z)}l.mallocInt8=w;function k(z){return new Int16Array(x(2*z),0,z)}l.mallocInt16=k;function T(z){return new Int32Array(x(4*z),0,z)}l.mallocInt32=T;function b(z){return new Float32Array(x(4*z),0,z)}l.mallocFloat32=l.mallocFloat=b;function S(z){return new Float64Array(x(8*z),0,z)}l.mallocFloat64=l.mallocDouble=S;function A(z){return h?new Uint8ClampedArray(x(z),0,z):E(z)}l.mallocUint8Clamped=A;function F(z){return d?new BigUint64Array(x(8*z),0,z):null}l.mallocBigUint64=F;function D(z){return p?new BigInt64Array(x(8*z),0,z):null}l.mallocBigInt64=D;function R(z){return new DataView(x(z),0,z)}l.mallocDataView=R;function P(z){z=u.nextPow2(z);var I=u.log2(z),L=y[I];return L.length>0?L.pop():new f(z)}l.mallocBuffer=P,l.clearCache=function(){for(var I=0;I<32;++I)g.UINT8[I].length=0,g.UINT16[I].length=0,g.UINT32[I].length=0,g.INT8[I].length=0,g.INT16[I].length=0,g.INT32[I].length=0,g.FLOAT[I].length=0,g.DOUBLE[I].length=0,g.BIGUINT64[I].length=0,g.BIGINT64[I].length=0,g.UINT8C[I].length=0,m[I].length=0,y[I].length=0}},1755(s){"use strict";"use restrict";s.exports=l;function l(u){this.roots=new Array(u),this.ranks=new Array(u);for(var c=0;c",B="",O=L.length,G=B.length,$=P[0]===x||P[0]===C,X=0,Z=-G;X>-1&&(X=z.indexOf(L,X),!(X===-1||(Z=z.indexOf(B,X+O),Z===-1)||Z<=X));){for(var J=X;J=Z)I[J]=null,z=z.substr(0,J)+" "+z.substr(J+1);else if(I[J]!==null){var N=I[J].indexOf(P[0]);N===-1?I[J]+=P:$&&(I[J]=I[J].substr(0,N+1)+(1+parseInt(I[J][N+1]))+I[J].substr(N+2))}var H=X+O,W=z.substr(H,Z-H),U=W.indexOf(L);U!==-1?X=U:X=Z+G}return I}function T(R,P,z){for(var I=P.textAlign||"start",L=P.textBaseline||"alphabetic",B=[1<<30,1<<30],O=[0,0],G=R.length,$=0;$/g,` -`):z=z.replace(/\/g," ");var O="",G=[];for(q=0;q-1?parseInt(ee[1+Se]):0,Ge=Me>-1?parseInt(ce[1+Me]):0;Ue!==Ge&&(_e=_e.replace(fe(),"?px "),re*=Math.pow(.75,Ge-Ue),_e=_e.replace("?px ",fe())),K+=.25*N*(Ge-Ue)}if(B.superscripts===!0){var Ze=ee.indexOf(x),Ke=ce.indexOf(x),dt=Ze>-1?parseInt(ee[1+Ze]):0,_t=Ke>-1?parseInt(ce[1+Ke]):0;dt!==_t&&(_e=_e.replace(fe(),"?px "),re*=Math.pow(.75,_t-dt),_e=_e.replace("?px ",fe())),K-=.25*N*(_t-dt)}if(B.bolds===!0){var Pt=ee.indexOf(m)>-1,pt=ce.indexOf(m)>-1;!Pt&&pt&&(Tt?_e=_e.replace("italic ","italic bold "):_e="bold "+_e),Pt&&!pt&&(_e=_e.replace("bold ",""))}if(B.italics===!0){var Tt=ee.indexOf(_)>-1,st=ce.indexOf(_)>-1;!Tt&&st&&(_e="italic "+_e),Tt&&!st&&(_e=_e.replace("italic ",""))}P.font=_e}for(j=0;j0&&(L=I.size),I.lineSpacing&&I.lineSpacing>0&&(B=I.lineSpacing),I.styletags&&I.styletags.breaklines&&(O.breaklines=!!I.styletags.breaklines),I.styletags&&I.styletags.bolds&&(O.bolds=!!I.styletags.bolds),I.styletags&&I.styletags.italics&&(O.italics=!!I.styletags.italics),I.styletags&&I.styletags.subscripts&&(O.subscripts=!!I.styletags.subscripts),I.styletags&&I.styletags.superscripts&&(O.superscripts=!!I.styletags.superscripts)),z.font=[I.fontStyle,I.fontVariant,I.fontWeight,L+"px",I.font].filter(function($){return $}).join(" "),z.textAlign="start",z.textBaseline="alphabetic",z.direction="ltr";var G=b(P,z,R,L,B,O);return F(G,I,L)}},1538(s){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function n(A){A.permitHostObjects___&&A.permitHostObjects___(n)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=n);var u=!1;if(typeof WeakMap=="function"){var c=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var f=new c,h=Object.freeze({});if(f.set(h,1),f.get(h)!==1)u=!0;else{s.exports=WeakMap;return}}}var d=Object.prototype.hasOwnProperty,p=Object.getOwnPropertyNames,g=Object.defineProperty,m=Object.isExtensible,y="weakmap:",_=y+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var v=new ArrayBuffer(25),x=new Uint8Array(v);crypto.getRandomValues(x),_=y+"rand:"+Array.prototype.map.call(x,function(A){return(A%36).toString(36)}).join("")+"___"}function E(A){return!(A.substr(0,y.length)==y&&A.substr(A.length-3)==="___")}if(g(Object,"getOwnPropertyNames",{value:function(F){return p(F).filter(E)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;g(Object,"getPropertyNames",{value:function(F){return M(F).filter(E)}})}function C(A){if(A!==Object(A))throw new TypeError("Not an object: "+A);var F=A[_];if(F&&F.key===A)return F;if(m(A)){F={key:A};try{return g(A,_,{value:F,writable:!1,enumerable:!1,configurable:!1}),F}catch{return}}}(function(){var A=Object.freeze;g(Object,"freeze",{value:function(P){return C(P),A(P)}});var F=Object.seal;g(Object,"seal",{value:function(P){return C(P),F(P)}});var D=Object.preventExtensions;g(Object,"preventExtensions",{value:function(P){return C(P),D(P)}})})();function w(A){return A.prototype=null,Object.freeze(A)}var k=!1;function T(){!k&&typeof console<"u"&&(k=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var b=0,S=function(){this instanceof S||T();var A=[],F=[],D=b++;function R(L,B){var O,G=C(L);return G?D in G?G[D]:B:(O=A.indexOf(L),O>=0?F[O]:B)}function P(L){var B=C(L);return B?D in B:A.indexOf(L)>=0}function z(L,B){var O,G=C(L);return G?G[D]=B:(O=A.indexOf(L),O>=0?F[O]=B:(O=A.length,F[O]=B,A[O]=L)),this}function I(L){var B=C(L),O,G;return B?D in B&&delete B[D]:(O=A.indexOf(L),O<0?!1:(G=A.length-1,A[O]=void 0,F[O]=F[G],A[O]=A[G],A.length=G,F.length=G,!0))}return Object.create(S.prototype,{get___:{value:w(R)},has___:{value:w(P)},set___:{value:w(z)},delete___:{value:w(I)}})};S.prototype=Object.create(Object.prototype,{get:{value:function(F,D){return this.get___(F,D)},writable:!0,configurable:!0},has:{value:function(F){return this.has___(F)},writable:!0,configurable:!0},set:{value:function(F,D){return this.set___(F,D)},writable:!0,configurable:!0},delete:{value:function(F){return this.delete___(F)},writable:!0,configurable:!0}}),typeof c=="function"?(function(){u&&typeof Proxy<"u"&&(Proxy=void 0);function A(){this instanceof S||T();var F=new c,D=void 0,R=!1;function P(B,O){return D?F.has(B)?F.get(B):D.get___(B,O):F.get(B,O)}function z(B){return F.has(B)||(D?D.has___(B):!1)}var I;u?I=function(B,O){return F.set(B,O),F.has(B)||(D||(D=new S),D.set(B,O)),this}:I=function(B,O){if(R)try{F.set(B,O)}catch{D||(D=new S),D.set___(B,O)}else F.set(B,O);return this};function L(B){var O=!!F.delete(B);return D&&D.delete___(B)||O}return Object.create(S.prototype,{get___:{value:w(P)},has___:{value:w(z)},set___:{value:w(I)},delete___:{value:w(L)},permitHostObjects___:{value:w(function(B){if(B===n)R=!0;else throw new Error("bogus call to permitHostObjects___")})}})}A.prototype=S.prototype,s.exports=A,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy<"u"&&(Proxy=void 0),s.exports=S)})()},236(s,l,n){var u=n(8284);s.exports=c;function c(){var f={};return function(h){if((typeof h!="object"||h===null)&&typeof h!="function")throw new Error("Weakmap-shim: Key must be object");var d=h.valueOf(f);return d&&d.identity===f?d:u(h,f)}}},8284(s){s.exports=l;function l(n,u){var c={identity:u},f=n.valueOf;return Object.defineProperty(n,"valueOf",{value:function(h){return h!==u?f.apply(this,arguments):c},writable:!0}),c}},606(s,l,n){var u=n(236);s.exports=c;function c(){var f=u();return{get:function(h,d){var p=f(h);return p.hasOwnProperty("value")?p.value:d},set:function(h,d){return f(h).value=d,this},has:function(h){return"value"in f(h)},delete:function(h){return delete f(h).value}}}},3349(s){"use strict";function l(){return function(d,p,g,m,y,_){var v=d[0],x=g[0],E=[0],M=x;m|=0;var C=0,w=x;for(C=0;C=0!=T>=0&&y.push(E[0]+.5+.5*(k+T)/(k-T))}m+=w,++E[0]}}}function n(){return l()}var u=n;function c(d){var p={};return function(m,y,_){var v=m.dtype,x=m.order,E=[v,x.join()].join(),M=p[E];return M||(p[E]=M=d([v,x])),M(m.shape.slice(0),m.data,m.stride,m.offset|0,y,_)}}function f(d){return c(u.bind(void 0,d))}function h(d){return f({funcName:d.funcName})}s.exports=h({funcName:"zeroCrossings"})},781(s,l,n){"use strict";s.exports=c;var u=n(3349);function c(f,h){var d=[];return h=+h||0,u(f.hi(f.shape[0]-1),d,h),d}},7790(){}};let a={};function i(s){let l=a[s];if(l!==void 0)return l.exports;let n=a[s]={id:s,loaded:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),i.nmd=s=>(s.paths=[],s.children||(s.children=[]),s);let o=i(3065);r.exports=o})()}}),g0=ye({"src/lib/str2rgbarray.js"(e,r){"use strict";var{normalize:t}=Ya();function a(i){return i?t(i):[0,0,0,1]}r.exports=a}}),y0=ye({"src/lib/gl_format_color.js"(e,r){"use strict";var t=en(),a=As(),i=Ya(),o=Wl().defaultLine,s=yc().isArrayOrTypedArray,l=i.normalize(o),n=1;function u(p,g){return[p[0],p[1],p[2],p[3]*g]}function c(p){return t(p)||!i.isChannelArray(p)&&!i.isValid(p)?l:i.normalize(p)}function f(p){return t(p)?p:n}function h(p,g,m){var y=p.color;y&&y._inputArray&&(y=y._inputArray);var _=s(y),v=s(g),x=a.extractOpts(p),E=[],M,C,w,k,T;if(x.colorscale!==void 0?M=a.makeColorScaleFuncFromTrace(p):M=c,_?C=(S,A)=>S[A]===void 0?l:x.colorscale===void 0?M(S[A]):i.normalize(M(S[A])):C=c,v?w=function(S,A){return S[A]===void 0?n:f(S[A])}:w=f,_||v)for(var b=0;b0){var y=u.c2l(g);u._lowerLogErrorBound||(u._lowerLogErrorBound=y),u._lowerErrorBound=Math.min(u._lowerLogErrorBound,y)}}else f[h]=[-d[0]*n,d[1]*n]}return f}function i(s){for(var l=0;l-1?-1:F.indexOf("right")>-1?1:0}function E(F){return F==null?0:F.indexOf("top")>-1?-1:F.indexOf("bottom")>-1?1:0}function M(F){var D=0,R=0,P=[D,R];if(Array.isArray(F))for(var z=0;z=0){var G=_(B.position,B.delaunayColor,B.delaunayAxis);G.opacity=F.opacity,this.delaunayMesh?this.delaunayMesh.update(G):(G.gl=D,this.delaunayMesh=o(G),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)},y.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 A(F,D){var R=new m(F,D.uid);return R.update(D),R}r.exports=A}}),pP=ye({"src/traces/scatter3d/attributes.js"(e,r){"use strict";var t=al(),a=vs(),i=rs(),o=zs().axisHoverFormat,{hovertemplateAttrs:s,texttemplateAttrs:l,templatefallbackAttrs:n}=Ro(),u=Oo(),c=dP(),f=dM(),h=Xi().extendFlat,d=Cs().overrideAll,p=(Em(),On(bv)).default,g=t.line,m=t.marker,y=m.line,_=h({width:g.width,dash:{valType:"enumerated",values:p(c),dflt:"solid"}},i("line"));function v(E){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var x=r.exports=d({x:t.x,y:t.y,z:{valType:"data_array"},text:h({},t.text,{}),texttemplate:l(),texttemplatefallback:n({editType:"calc"}),hovertext:h({},t.hovertext,{}),hovertemplate:s(),hovertemplatefallback:n(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),mode:h({},t.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:v("x"),y:v("y"),z:v("z")},connectgaps:t.connectgaps,line:_,marker:h({symbol:{valType:"enumerated",values:p(f),dflt:"circle",arrayOk:!0},size:h({},m.size,{dflt:8}),sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:h({},m.opacity,{arrayOk:!1}),colorbar:m.colorbar,line:h({width:h({},y.width,{arrayOk:!1})},i("marker.line"))},i("marker")),textposition:h({},t.textposition,{dflt:"top center"}),textfont:a({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:u.opacity,hoverinfo:h({},u.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"}}),Foe=ye({"src/traces/scatter3d/defaults.js"(e,r){"use strict";var t=li(),a=Yt(),i=ms(),o=kd(),s=ip(),l=np(),n=pP();r.exports=function(f,h,d,p){function g(C,w){return a.coerce(f,h,n,C,w)}var m=u(f,h,g,p);if(!m){h.visible=!1;return}g("text"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),g("xhoverformat"),g("yhoverformat"),g("zhoverformat"),g("mode"),i.hasMarkers(h)&&o(f,h,d,p,g,{noAngle:!0,noLineDash:!0,noSelect:!0}),i.hasLines(h)&&(g("connectgaps"),s(f,h,d,p,g)),i.hasText(h)&&(g("texttemplate"),g("texttemplatefallback"),l(f,h,p,g,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var y=(h.line||{}).color,_=(h.marker||{}).color;g("surfaceaxis")>=0&&g("surfacecolor",y||_);for(var v=["x","y","z"],x=0;x<3;++x){var E="projection."+v[x];g(E+".show")&&(g(E+".opacity"),g(E+".scale"))}var M=t.getComponentMethod("errorbars","supplyDefaults");M(f,h,y||_||d,{axis:"z"}),M(f,h,y||_||d,{axis:"y",inherit:"z"}),M(f,h,y||_||d,{axis:"x",inherit:"z"})};function u(c,f,h,d){var p=0,g=h("x"),m=h("y"),y=h("z"),_=t.getComponentMethod("calendars","handleTraceDefaults");return _(c,f,["x","y","z"],d),g&&m&&y&&(p=Math.min(g.length,m.length,y.length),f._length=f._xlength=f._ylength=f._zlength=p),p}}}),Poe=ye({"src/traces/scatter3d/calc.js"(e,r){"use strict";var t=Vp(),a=Cd();r.exports=function(o,s){var l=[{x:!1,y:!1,trace:s,t:{}}];return t(l,s),a(o,s),l}}}),Ioe=ye({"node_modules/get-canvas-context/index.js"(e,r){r.exports=t;function t(a,i){if(typeof a!="string")throw new TypeError("must specify type string");if(i=i||{},typeof document>"u"&&!i.canvas)return null;var o=i.canvas||document.createElement("canvas");typeof i.width=="number"&&(o.width=i.width),typeof i.height=="number"&&(o.height=i.height);var s=i,l;try{var n=[a];a.indexOf("webgl")===0&&n.push("experimental-"+a);for(var u=0;u/g," "));h[d]=y,p.tickmode=g}}u.ticks=h;for(var d=0;d<3;++d){o[d]=.5*(n.glplot.bounds[0][d]+n.glplot.bounds[1][d]);for(var _=0;_<2;++_)u.bounds[_][d]=n.glplot.bounds[_][d]}n.contourLevels=s(h)}}}),Noe=ye({"src/plots/gl3d/scene.js"(e,r){"use strict";var t=$u().gl_plot3d,a=t.createCamera,i=t.createScene,o=Roe(),s=AA(),l=li(),n=Yt(),u=n.preserveDrawingBuffer(),c=qi(),f=Hs(),h=g0(),d=vP(),p=S9(),g=zoe(),m=Boe(),y=Ooe(),_=tp().applyAutorangeOptions,v,x,E=!1;function M(R,P){var z=document.createElement("div"),I=R.container;this.graphDiv=R.graphDiv;var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.style.position="absolute",L.style.top=L.style.left="0px",L.style.width=L.style.height="100%",L.style["z-index"]=20,L.style["pointer-events"]="none",z.appendChild(L),this.svgContainer=L,z.id=R.id,z.style.position="absolute",z.style.top=z.style.left="0px",z.style.width=z.style.height="100%",I.appendChild(z),this.fullLayout=P,this.id=R.id||"scene",this.fullSceneLayout=P[this.id],this.plotArgs=[[],{},{}],this.axesOptions=g(P,P[this.id]),this.spikeOptions=m(P[this.id]),this.container=z,this.staticMode=!!R.staticPlot,this.pixelRatio=this.pixelRatio||R.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=l.getComponentMethod("annotations3d","convert"),this.drawAnnotations=l.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var R=this,P={canvas:R.canvas,gl:R.gl,glOptions:{preserveDrawingBuffer:u,premultipliedAlpha:!0,antialias:!0},container:R.container,axes:R.axesOptions,spikes:R.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:R.camera,pixelRatio:R.pixelRatio};if(R.staticMode){if(!x&&(v=document.createElement("canvas"),x=o({canvas:v,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!x))throw new Error("error creating static canvas/context for image server");P.gl=x,P.canvas=v}return P};var w=!0;C.tryCreatePlot=function(){var R=this,P=R.prepareOptions(),z=!0;try{R.glplot=i(P)}catch{if(R.staticMode||!w||u)z=!1;else{n.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{u=P.glOptions.preserveDrawingBuffer=!0,R.glplot=i(P)}catch{u=P.glOptions.preserveDrawingBuffer=!1,z=!1}}}return w=!1,z},C.initializeGLCamera=function(){var R=this,P=R.fullSceneLayout.camera,z=P.projection.type==="orthographic";R.camera=a(R.container,{center:[P.center.x,P.center.y,P.center.z],eye:[P.eye.x,P.eye.y,P.eye.z],up:[P.up.x,P.up.y,P.up.z],_ortho:z,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var R=this;R.initializeGLCamera();var P=R.tryCreatePlot();if(!P)return d(R);R.traces={},R.make4thDimension();var z=R.graphDiv,I=z.layout,L=function(){var O={};return R.isCameraChanged(I)&&(O[R.id+".camera"]=R.getCamera()),R.isAspectChanged(I)&&(O[R.id+".aspectratio"]=R.glplot.getAspectratio(),I[R.id].aspectmode!=="manual"&&(R.fullSceneLayout.aspectmode=I[R.id].aspectmode=O[R.id+".aspectmode"]="manual")),O},B=function(O){if(O.fullSceneLayout.dragmode!==!1){var G=L();O.saveLayout(I),O.graphDiv.emit("plotly_relayout",G)}};return R.glplot.canvas&&(R.glplot.canvas.addEventListener("mouseup",function(){B(R)}),R.glplot.canvas.addEventListener("touchstart",function(){E=!0}),R.glplot.canvas.addEventListener("wheel",function(O){if(z._context._scrollZoom.gl3d){if(R.camera._ortho){var G=O.deltaX>O.deltaY?1.1:.9090909090909091,$=R.glplot.getAspectratio();R.glplot.setAspectratio({x:G*$.x,y:G*$.y,z:G*$.z})}B(R)}},s?{passive:!1}:!1),R.glplot.canvas.addEventListener("mousemove",function(){if(R.fullSceneLayout.dragmode!==!1&&R.camera.mouseListener.buttons!==0){var O=L();R.graphDiv.emit("plotly_relayouting",O)}}),R.staticMode||R.glplot.canvas.addEventListener("webglcontextlost",function(O){z&&z.emit&&z.emit("plotly_webglcontextlost",{event:O,layer:R.id})},!1)),R.glplot.oncontextloss=function(){R.recoverContext()},R.glplot.onrender=function(){R.render()},!0},C.render=function(){var R=this,P=R.graphDiv,z,I=R.svgContainer,L=R.container.getBoundingClientRect();P._fullLayout._calcInverseTransform(P);var B=P._fullLayout._invScaleX,O=P._fullLayout._invScaleY,G=L.width*B,$=L.height*O;I.setAttributeNS(null,"viewBox","0 0 "+G+" "+$),I.setAttributeNS(null,"width",G),I.setAttributeNS(null,"height",$),y(R),R.glplot.axes.update(R.axesOptions);for(var X=Object.keys(R.traces),Z=null,J=R.glplot.selection,N=0;N")):z.type==="isosurface"||z.type==="volume"?(j.valueLabel=c.hoverLabelText(R._mockAxis,R._mockAxis.d2l(J.traceCoordinate[3]),z.valuehoverformat),se.push("value: "+j.valueLabel),J.textLabel&&se.push(J.textLabel),re=se.join("
")):re=J.textLabel;var le={x:J.traceCoordinate[0],y:J.traceCoordinate[1],z:J.traceCoordinate[2],data:U._input,fullData:U,curveNumber:U.index,pointNumber:V};f.appendArrayPointValue(le,U,V),z._module.eventData&&(le=U._module.eventData(le,J,U,{},V));var ue={points:[le]};if(R.fullSceneLayout.hovermode){var fe=[];f.loneHover({trace:U,x:(.5+.5*W[0]/W[3])*G,y:(.5-.5*W[1]/W[3])*$,xLabel:j.xLabel,yLabel:j.yLabel,zLabel:j.zLabel,text:re,name:Z.name,color:f.castHoverOption(U,V,"bgcolor")||Z.color,borderColor:f.castHoverOption(U,V,"bordercolor"),fontFamily:f.castHoverOption(U,V,"font.family"),fontSize:f.castHoverOption(U,V,"font.size"),fontColor:f.castHoverOption(U,V,"font.color"),nameLength:f.castHoverOption(U,V,"namelength"),textAlign:f.castHoverOption(U,V,"align"),hovertemplate:n.castOption(U,V,"hovertemplate"),hovertemplateLabels:n.extendFlat({},le,j),eventData:[le]},{container:I,gd:P,inOut_bbox:fe}),le.bbox=fe[0]}J.distance<5&&(J.buttons||E)?P.emit("plotly_click",ue):P.emit("plotly_hover",ue),this.oldEventData=ue}else f.loneUnhover(I),this.oldEventData&&P.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;R.drawAnnotations(R)},C.recoverContext=function(){var R=this;R.glplot.dispose();var P=function(){if(R.glplot.gl.isContextLost()){requestAnimationFrame(P);return}if(!R.initializeGLPlot()){n.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}R.plot.apply(R,R.plotArgs)};requestAnimationFrame(P)};var k=["xaxis","yaxis","zaxis"];function T(R,P,z){for(var I=R.fullSceneLayout,L=0;L<3;L++){var B=k[L],O=B.charAt(0),G=I[B],$=P[O],X=P[O+"calendar"],Z=P["_"+O+"length"];if(!n.isArrayOrTypedArray($))z[0][L]=Math.min(z[0][L],0),z[1][L]=Math.max(z[1][L],Z-1);else for(var J,N=0;N<(Z||$.length);N++)if(n.isArrayOrTypedArray($[N]))for(var H=0;H<$[N].length;++H)J=G.d2l($[N][H],0,X),!isNaN(J)&&isFinite(J)&&(z[0][L]=Math.min(z[0][L],J),z[1][L]=Math.max(z[1][L],J));else J=G.d2l($[N],0,X),!isNaN(J)&&isFinite(J)&&(z[0][L]=Math.min(z[0][L],J),z[1][L]=Math.max(z[1][L],J))}}function b(R,P){for(var z=R.fullSceneLayout,I=z.annotations||[],L=0;L<3;L++)for(var B=k[L],O=B.charAt(0),G=z[B],$=0;$U[1][O])U[0][O]=-1,U[1][O]=1;else{var we=U[1][O]-U[0][O];U[0][O]-=we/32,U[1][O]+=we/32}if(q=[U[0][O],U[1][O]],q=_(q,$),U[0][O]=q[0],U[1][O]=q[1],$.isReversed()){var xe=U[0][O];U[0][O]=U[1][O],U[1][O]=xe}}else q=$.range,U[0][O]=$.r2l(q[0]),U[1][O]=$.r2l(q[1]);U[0][O]===U[1][O]&&(U[0][O]-=1,U[1][O]+=1),V[O]=U[1][O]-U[0][O],$.range=[U[0][O],U[1][O]],$.limitRange(),I.glplot.setBounds(O,{min:$.range[0]*H[O],max:$.range[1]*H[O]})}var he,oe=Z.aspectmode;if(oe==="cube")he=[1,1,1];else if(oe==="manual"){var te=Z.aspectratio;he=[te.x,te.y,te.z]}else if(oe==="auto"||oe==="data"){var ie=[1,1,1];for(O=0;O<3;++O){$=Z[k[O]],X=$.type;var ee=j[X];ie[O]=Math.pow(ee.acc,1/ee.count)/H[O]}oe==="data"||Math.max.apply(null,ie)/Math.min.apply(null,ie)<=4?he=ie:he=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");Z.aspectratio.x=J.aspectratio.x=he[0],Z.aspectratio.y=J.aspectratio.y=he[1],Z.aspectratio.z=J.aspectratio.z=he[2],I.glplot.setAspectratio(Z.aspectratio),I.viewInitial.aspectratio||(I.viewInitial.aspectratio={x:Z.aspectratio.x,y:Z.aspectratio.y,z:Z.aspectratio.z}),I.viewInitial.aspectmode||(I.viewInitial.aspectmode=Z.aspectmode);var ce=Z.domain||null,_e=P._size||null;if(ce&&_e){var Se=I.container.style;Se.position="absolute",Se.left=_e.l+ce.x[0]*_e.w+"px",Se.top=_e.t+(1-ce.y[1])*_e.h+"px",Se.width=_e.w*(ce.x[1]-ce.x[0])+"px",Se.height=_e.h*(ce.y[1]-ce.y[0])+"px"}I.glplot.redraw()}},C.destroy=function(){var R=this;R.glplot&&(R.camera.mouseListener.enabled=!1,R.container.removeEventListener("wheel",R.camera.wheelListener),R.camera=null,R.glplot.dispose(),R.container.parentNode.removeChild(R.container),R.glplot=null)};function S(R){return[[R.eye.x,R.eye.y,R.eye.z],[R.center.x,R.center.y,R.center.z],[R.up.x,R.up.y,R.up.z]]}function A(R){return{up:{x:R.up[0],y:R.up[1],z:R.up[2]},center:{x:R.center[0],y:R.center[1],z:R.center[2]},eye:{x:R.eye[0],y:R.eye[1],z:R.eye[2]},projection:{type:R._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var R=this;return R.camera.view.recalcMatrix(R.camera.view.lastT()),A(R.camera)},C.setViewport=function(R){var P=this,z=R.camera;P.camera.lookAt.apply(this,S(z)),P.glplot.setAspectratio(R.aspectratio);var I=z.projection.type==="orthographic",L=P.camera._ortho;I!==L&&(P.glplot.redraw(),P.glplot.clearRGBA(),P.glplot.dispose(),P.initializeGLPlot())},C.isCameraChanged=function(R){var P=this,z=P.getCamera(),I=n.nestedProperty(R,P.id+".camera"),L=I.get();function B(X,Z,J,N){var H=["up","center","eye"],W=["x","y","z"];return Z[H[J]]&&X[H[J]][W[N]]===Z[H[J]][W[N]]}var O=!1;if(L===void 0)O=!0;else{for(var G=0;G<3;G++)for(var $=0;$<3;$++)if(!B(z,L,G,$)){O=!0;break}(!L.projection||z.projection&&z.projection.type!==L.projection.type)&&(O=!0)}return O},C.isAspectChanged=function(R){var P=this,z=P.glplot.getAspectratio(),I=n.nestedProperty(R,P.id+".aspectratio"),L=I.get();return L===void 0||L.x!==z.x||L.y!==z.y||L.z!==z.z},C.saveLayout=function(R){var P=this,z=P.fullLayout,I,L,B,O,G,$,X=P.isCameraChanged(R),Z=P.isAspectChanged(R),J=X||Z;if(J){var N={};if(X&&(I=P.getCamera(),L=n.nestedProperty(R,P.id+".camera"),B=L.get(),N[P.id+".camera"]=B),Z&&(O=P.glplot.getAspectratio(),G=n.nestedProperty(R,P.id+".aspectratio"),$=G.get(),N[P.id+".aspectratio"]=$),l.call("_storeDirectGUIEdit",R,z._preGUI,N),X){L.set(I);var H=n.nestedProperty(z,P.id+".camera");H.set(I)}if(Z){G.set(O);var W=n.nestedProperty(z,P.id+".aspectratio");W.set(O),P.glplot.redraw()}}return J},C.updateFx=function(R,P){var z=this,I=z.camera;if(I)if(R==="orbit")I.mode="orbit",I.keyBindingMode="rotate";else if(R==="turntable"){I.up=[0,0,1],I.mode="turntable",I.keyBindingMode="rotate";var L=z.graphDiv,B=L._fullLayout,O=z.fullSceneLayout.camera,G=O.up.x,$=O.up.y,X=O.up.z;if(X/Math.sqrt(G*G+$*$+X*X)<.999){var Z=z.id+".camera.up",J={x:0,y:0,z:1},N={};N[Z]=J;var H=L.layout;l.call("_storeDirectGUIEdit",H,B._preGUI,N),O.up=J,n.nestedProperty(H,Z).set(J)}}else I.keyBindingMode=R;z.fullSceneLayout.hovermode=P};function F(R,P,z){for(var I=0,L=z-1;I0)for(var G=255/O,$=0;$<3;++$)R[B+$]=Math.min(G*R[B+$],255)}}C.toImage=function(R){var P=this;R||(R="png"),P.staticMode&&P.container.appendChild(v),P.glplot.redraw();var z=P.glplot.gl,I=z.drawingBufferWidth,L=z.drawingBufferHeight;z.bindFramebuffer(z.FRAMEBUFFER,null);var B=new Uint8Array(I*L*4);z.readPixels(0,0,I,L,z.RGBA,z.UNSIGNED_BYTE,B),F(B,I,L),D(B,I,L);var O=document.createElement("canvas");O.width=I,O.height=L;var G=O.getContext("2d",{willReadFrequently:!0}),$=G.createImageData(I,L);$.data.set(B),G.putImageData($,0,0);var X;switch(R){case"jpeg":X=O.toDataURL("image/jpeg");break;case"webp":X=O.toDataURL("image/webp");break;default:X=O.toDataURL("image/png")}return P.staticMode&&P.container.removeChild(v),X},C.setConvert=function(){for(var R=this,P=0;P<3;P++){var z=R.fullSceneLayout[k[P]];c.setConvert(z,R.fullLayout),z.setScale=n.noop}},C.make4thDimension=function(){var R=this,P=R.graphDiv,z=P._fullLayout;R._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(R._mockAxis,z)},r.exports=M}}),joe=ye({"src/plots/gl3d/layout/attributes.js"(e,r){"use strict";r.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),mP=ye({"src/plots/gl3d/layout/axis_attributes.js"(e,r){"use strict";var t=Ya(),a=Gu(),i=Xi().extendFlat,o=Cs().overrideAll;r.exports=o({visible:a.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:t.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:a.color,categoryorder:a.categoryorder,categoryarray:a.categoryarray,title:{text:a.title.text,font:a.title.font},type:i({},a.type,{values:["-","linear","log","date","category"]}),autotypenumbers:a.autotypenumbers,autorange:a.autorange,autorangeoptions:{minallowed:a.autorangeoptions.minallowed,maxallowed:a.autorangeoptions.maxallowed,clipmin:a.autorangeoptions.clipmin,clipmax:a.autorangeoptions.clipmax,include:a.autorangeoptions.include,editType:"plot"},rangemode:a.rangemode,minallowed:a.minallowed,maxallowed:a.maxallowed,range:i({},a.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:a.minor.tickmode,nticks:a.nticks,tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,mirror:a.mirror,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,showticklabels:a.showticklabels,labelalias:a.labelalias,tickfont:a.tickfont,tickangle:a.tickangle,tickprefix:a.tickprefix,showtickprefix:a.showtickprefix,ticksuffix:a.ticksuffix,showticksuffix:a.showticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,minexponent:a.minexponent,separatethousands:a.separatethousands,tickformat:a.tickformat,tickformatstops:a.tickformatstops,hoverformat:a.hoverformat,showline:a.showline,linecolor:a.linecolor,linewidth:a.linewidth,showgrid:a.showgrid,gridcolor:i({},a.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:a.gridwidth,zeroline:a.zeroline,zerolinecolor:a.zerolinecolor,zerolinewidth:a.zerolinewidth},"plot","from-root")}}),gP=ye({"src/plots/gl3d/layout/layout_attributes.js"(e,r){"use strict";var t=mP(),a=Ds().attributes,i=Xi().extendFlat,o=Yt().counterRegex;function s(l,n,u){return{x:{valType:"number",dflt:l,editType:"camera"},y:{valType:"number",dflt:n,editType:"camera"},z:{valType:"number",dflt:u,editType:"camera"},editType:"camera"}}r.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(s(0,0,1),{}),center:i(s(0,0,0),{}),eye:i(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:a({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:t,yaxis:t,zaxis:t,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"}}}),Uoe=ye({"src/plots/gl3d/layout/axis_defaults.js"(e,r){"use strict";var t=Ya(),a=Yt(),i=ko(),o=mP(),s=M9(),l=ab(),n=["xaxis","yaxis","zaxis"],u=13600/187;r.exports=function(f,h,d){var p,g;function m(v,x){return a.coerce(p,g,o,v,x)}for(var y=0;y1;function m(y){if(!g){var _=t.validate(h[y],l[y]);if(_)return h[y]}}o(h,d,p,{type:u,attributes:l,handleDefaults:c,fullLayout:d,font:d.font,fullData:p,getDfltFromLayout:m,autotypenumbersDflt:d.autotypenumbers,paper_bgcolor:d.paper_bgcolor,calendar:d.calendar})};function c(f,h,d,p){for(var g=d("bgcolor"),m=a.combine(g,p.paper_bgcolor),y=["up","center","eye"],_=0;_.999)&&(C="turntable")}else C="turntable";d("dragmode",C),d("hovermode",p.getDfltFromLayout("hovermode"))}}}),Bv=ye({"src/plots/gl3d/index.js"(e){"use strict";var r=Cs().overrideAll,t=_v(),a=Noe(),i=_c().getSubplotData,o=Yt(),s=Sd(),l="gl3d",n="scene";e.name=l,e.attr=n,e.idRoot=n,e.idRegex=e.attrRegex=o.counterRegex("scene"),e.attributes=joe(),e.layoutAttributes=gP(),e.baseLayoutAttrOverrides=r({hoverlabel:t.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=qoe(),e.plot=function(c){for(var f=c._fullLayout,h=c._fullData,d=f._subplots[l],p=0;p0){F=p[D];break}return F}function _(S,A){if(!(S<1||A<1)){for(var F=m(S),D=m(A),R=1,P=0;PM;)D--,D/=y(D),D++,D1?R:1};function C(S,A,F){var D=F[8]+F[2]*A[0]+F[5]*A[1];return S[0]=(F[6]+F[0]*A[0]+F[3]*A[1])/D,S[1]=(F[7]+F[1]*A[0]+F[4]*A[1])/D,S}function w(S,A,F){return k(S,A,C,F),S}function k(S,A,F,D){for(var R=[0,0],P=S.shape[0],z=S.shape[1],I=0;I0&&this.contourStart[D]!==null&&this.contourEnd[D]!==null&&this.contourEnd[D]>this.contourStart[D]))for(A[D]=!0,R=this.contourStart[D];R$&&(this.minValues[B]=$),this.maxValues[B]<$&&(this.maxValues[B]=$));for(B=0;B<3;B++)this.objectOffset[B]=.5*(this.minValues[B]+this.maxValues[B]);for(B=0;B<3;B++)for(O=0;Op&&(u.isomin=null,u.isomax=null);var g=h("x"),m=h("y"),y=h("z"),_=h("value");if(!g||!g.length||!m||!m.length||!y||!y.length||!_||!_.length){u.visible=!1;return}var v=a.getComponentMethod("calendars","handleTraceDefaults");v(n,u,["x","y","z"],f),h("valuehoverformat"),["x","y","z"].forEach(function(C){h(C+"hoverformat");var w="caps."+C,k=h(w+".show");k&&h(w+".fill");var T="slices."+C,b=h(T+".show");b&&(h(T+".fill"),h(T+".locations"))});var x=h("spaceframe.show");x&&h("spaceframe.fill");var E=h("surface.show");E&&(h("surface.count"),h("surface.fill"),h("surface.pattern"));var M=h("contour.show");M&&(h("contour.color"),h("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(C){h(C)}),o(n,u,f,h,{prefix:"",cLetter:"c"}),u._length=null}r.exports={supplyDefaults:s,supplyIsoDefaults:l}}}),vM=ye({"src/traces/streamtube/calc.js"(e,r){"use strict";var t=Yt(),a=Nc();function i(n,u){u._len=Math.min(u.u.length,u.v.length,u.w.length,u.x.length,u.y.length,u.z.length),u._u=l(u.u,u._len),u._v=l(u.v,u._len),u._w=l(u.w,u._len),u._x=l(u.x,u._len),u._y=l(u.y,u._len),u._z=l(u.z,u._len);var c=o(u);u._gridFill=c.fill,u._Xs=c.Xs,u._Ys=c.Ys,u._Zs=c.Zs,u._len=c.len;var f=0,h,d,p;u.starts&&(h=l(u.starts.x||[]),d=l(u.starts.y||[]),p=l(u.starts.z||[]),f=Math.min(h.length,d.length,p.length)),u._startsX=h||[],u._startsY=d||[],u._startsZ=p||[];var g=0,m=1/0,y;for(y=0;y1&&(b=u[h-1],A=c[h-1],D=f[h-1]),d=0;db?"-":"+")+"x"),M=M.replace("y",(S>A?"-":"+")+"y"),M=M.replace("z",(F>D?"-":"+")+"z");var I=function(){h=0,R=[],P=[],z=[]};(!h||h0;m--){var y=Math.min(g[m],g[m-1]),_=Math.max(g[m],g[m-1]);if(_>y&&y-1}function Y(st,Ve){return st===null?Ve:st}function K(st,Ve,Ye){X();var me=[Ve],be=[Ye];if(U>=1)me=[Ve],be=[Ye];else if(U>0){var Ee=j(Ve,Ye);me=Ee.xyzv,be=Ee.abc}for(var De=0;De-1?Ye[Fe]:$(Je,qe,at);ct>-1?Ce[Fe]=ct:Ce[Fe]=J(Je,qe,at,Y(st,tt))}N(Ce[0],Ce[1],Ce[2])}}function re(st,Ve,Ye){var me=function(be,Ee,De){K(st,[Ve[be],Ve[Ee],Ve[De]],[Ye[be],Ye[Ee],Ye[De]])};me(0,1,2),me(2,3,0)}function se(st,Ve,Ye){var me=function(be,Ee,De){K(st,[Ve[be],Ve[Ee],Ve[De]],[Ye[be],Ye[Ee],Ye[De]])};me(0,1,2),me(3,0,1),me(2,3,0),me(1,2,3)}function le(st,Ve,Ye,me){var be=st[3];beme&&(be=me);for(var Ee=(st[3]-be)/(st[3]-Ve[3]+1e-9),De=[],Ce=0;Ce<4;Ce++)De[Ce]=(1-Ee)*st[Ce]+Ee*Ve[Ce];return De}function ue(st,Ve,Ye){return st>=Ve&&st<=Ye}function fe(st){var Ve=.001*(I-z);return st>=z-Ve&&st<=I+Ve}function pe(st){for(var Ve=[],Ye=0;Ye<4;Ye++){var me=st[Ye];Ve.push([p._x[me],p._y[me],p._z[me],p._value[me]])}return Ve}var we=3;function xe(st,Ve,Ye,me,be,Ee){Ee||(Ee=1),Ye=[-1,-1,-1];var De=!1,Ce=[ue(Ve[0][3],me,be),ue(Ve[1][3],me,be),ue(Ve[2][3],me,be)];if(!Ce[0]&&!Ce[1]&&!Ce[2])return!1;var Fe=function(qe,at,tt){return fe(at[0][3])&&fe(at[1][3])&&fe(at[2][3])?(K(qe,at,tt),!0):EeCe?[R,Ee]:[Ee,P];Ze(Ve,Fe[0],Fe[1])}}var Je=[[Math.min(z,P),Math.max(z,P)],[Math.min(R,I),Math.max(R,I)]];["x","y","z"].forEach(function(qe){for(var at=[],tt=0;tt0&&(vt.push(Dt.id),qe==="x"?gt.push([Dt.distRatio,0,0]):qe==="y"?gt.push([0,Dt.distRatio,0]):gt.push([0,0,Dt.distRatio]))}else qe==="x"?ar=Pt(1,b-1):qe==="y"?ar=Pt(1,S-1):ar=Pt(1,A-1);vt.length>0&&(qe==="x"?at[ct]=Ke(st,vt,At,ft,gt,at[ct]):qe==="y"?at[ct]=dt(st,vt,At,ft,gt,at[ct]):at[ct]=_t(st,vt,At,ft,gt,at[ct]),ct++),ar.length>0&&(qe==="x"?at[ct]=_e(st,ar,At,ft,at[ct]):qe==="y"?at[ct]=Se(st,ar,At,ft,at[ct]):at[ct]=Me(st,ar,At,ft,at[ct]),ct++)}var kt=p.caps[qe];kt.show&&kt.fill&&(V(kt.fill),qe==="x"?at[ct]=_e(st,[0,b-1],At,ft,at[ct]):qe==="y"?at[ct]=Se(st,[0,S-1],At,ft,at[ct]):at[ct]=Me(st,[0,A-1],At,ft,at[ct]),ct++)}}),E===0&&Z(),p._meshX=L,p._meshY=B,p._meshZ=O,p._meshIntensity=G,p._Xs=w,p._Ys=k,p._Zs=T}return Tt(),p}function d(p,g){var m=p.glplot.gl,y=t({gl:m}),_=new u(p,y,g.uid);return y._trace=_,_.update(g),p.glplot.add(y),_}r.exports={findNearestOnAxis:n,generateIsoMeshes:h,createIsosurfaceTrace:d}}}),Xoe=ye({"src/traces/isosurface/index.js"(e,r){"use strict";r.exports={attributes:pM(),supplyDefaults:_P().supplyDefaults,calc:xP(),colorbar:{min:"cmin",max:"cmax"},plot:mM().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:Bv(),categories:["gl3d","showLegend"],meta:{}}}}),Zoe=ye({"lib/isosurface.js"(e,r){"use strict";r.exports=Xoe()}}),bP=ye({"src/traces/volume/attributes.js"(e,r){"use strict";var t=rs(),a=pM(),i=zb(),o=Oo(),s=Xi().extendFlat,l=Cs().overrideAll,n=r.exports=l(s({x:a.x,y:a.y,z:a.z,value:a.value,isomin:a.isomin,isomax:a.isomax,surface:a.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:a.slices,caps:a.caps,text:a.text,hovertext:a.hovertext,xhoverformat:a.xhoverformat,yhoverformat:a.yhoverformat,zhoverformat:a.zhoverformat,valuehoverformat:a.valuehoverformat,hovertemplate:a.hovertemplate,hovertemplatefallback:a.hovertemplatefallback},t("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:a.colorbar,opacity:a.opacity,opacityscale:i.opacityscale,lightposition:a.lightposition,lighting:a.lighting,flatshading:a.flatshading,contour:a.contour,hoverinfo:s({},o.hoverinfo),showlegend:s({},o.showlegend,{dflt:!1})}),"calc","nested");n.x.editType=n.y.editType=n.z.editType=n.value.editType="calc+clearAxisTypes"}}),Koe=ye({"src/traces/volume/defaults.js"(e,r){"use strict";var t=Yt(),a=bP(),i=_P().supplyIsoDefaults,o=yP().opacityscaleDefaults;r.exports=function(l,n,u,c){function f(h,d){return t.coerce(l,n,a,h,d)}i(l,n,u,c,f),o(l,n,c,f)}}}),Joe=ye({"src/traces/volume/convert.js"(e,r){"use strict";var t=$u().gl_mesh3d,a=y0().parseColorScale,i=Yt().isArrayOrTypedArray,o=g0(),s=As().extractOpts,l=Ny(),n=mM().findNearestOnAxis,u=mM().generateIsoMeshes;function c(d,p,g){this.scene=d,this.uid=g,this.mesh=p,this.name="",this.data=null,this.showContour=!1}var f=c.prototype;f.handlePick=function(d){if(d.object===this.mesh){var p=d.data.index,g=this.data._meshX[p],m=this.data._meshY[p],y=this.data._meshZ[p],_=this.data._Ys.length,v=this.data._Zs.length,x=n(g,this.data._Xs).id,E=n(m,this.data._Ys).id,M=n(y,this.data._Zs).id,C=d.index=M+v*E+v*_*x;d.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var w=this.data.hovertext||this.data.text;return i(w)&&w[C]!==void 0?d.textLabel=w[C]:w&&(d.textLabel=w),!0}},f.update=function(d){var p=this.scene,g=p.fullSceneLayout;this.data=u(d);function m(E,M,C,w){return M.map(function(k){return E.d2l(k,0,w)*C})}var y=l(m(g.xaxis,d._meshX,p.dataScale[0],d.xcalendar),m(g.yaxis,d._meshY,p.dataScale[1],d.ycalendar),m(g.zaxis,d._meshZ,p.dataScale[2],d.zcalendar)),_=l(d._meshI,d._meshJ,d._meshK),v={positions:y,cells:_,lightPosition:[d.lightposition.x,d.lightposition.y,d.lightposition.z],ambient:d.lighting.ambient,diffuse:d.lighting.diffuse,specular:d.lighting.specular,roughness:d.lighting.roughness,fresnel:d.lighting.fresnel,vertexNormalsEpsilon:d.lighting.vertexnormalsepsilon,faceNormalsEpsilon:d.lighting.facenormalsepsilon,opacity:d.opacity,opacityscale:d.opacityscale,contourEnable:d.contour.show,contourColor:o(d.contour.color).slice(0,3),contourWidth:d.contour.width,useFacetNormals:d.flatshading},x=s(d);v.vertexIntensity=d._meshIntensity,v.vertexIntensityBounds=[x.min,x.max],v.colormap=a(d),this.mesh.update(v)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function h(d,p){var g=d.glplot.gl,m=t({gl:g}),y=new c(d,m,p.uid);return m._trace=y,y.update(p),d.glplot.add(m),y}r.exports=h}}),Qoe=ye({"src/traces/volume/index.js"(e,r){"use strict";r.exports={attributes:bP(),supplyDefaults:Koe(),calc:xP(),colorbar:{min:"cmin",max:"cmax"},plot:Joe(),moduleType:"trace",name:"volume",basePlotModule:Bv(),categories:["gl3d","showLegend"],meta:{}}}}),ese=ye({"lib/volume.js"(e,r){"use strict";r.exports=Qoe()}}),tse=ye({"src/traces/mesh3d/defaults.js"(e,r){"use strict";var t=li(),a=Yt(),i=Su(),o=Oy();r.exports=function(l,n,u,c){function f(m,y){return a.coerce(l,n,o,m,y)}function h(m){var y=m.map(function(_){var v=f(_);return v&&a.isArrayOrTypedArray(v)?v:null});return y.every(function(_){return _&&_.length===y[0].length})&&y}var d=h(["x","y","z"]);if(!d){n.visible=!1;return}if(h(["i","j","k"]),n.i&&(!n.j||!n.k)||n.j&&(!n.k||!n.i)||n.k&&(!n.i||!n.j)){n.visible=!1;return}var p=t.getComponentMethod("calendars","handleTraceDefaults");p(l,n,["x","y","z"],c),["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){f(m)});var g=f("contour.show");g&&(f("contour.color"),f("contour.width")),"intensity"in l?(f("intensity"),f("intensitymode"),i(l,n,c,f,{prefix:"",cLetter:"c"})):(n.showscale=!1,"facecolor"in l?f("facecolor"):"vertexcolor"in l?f("vertexcolor"):f("color",u)),f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),n._length=null}}}),rse=ye({"src/traces/mesh3d/calc.js"(e,r){"use strict";var t=Nc();r.exports=function(i,o){o.intensity&&t(i,o,{vals:o.intensity,containerStr:"",cLetter:"c"})}}}),ase=ye({"src/traces/mesh3d/convert.js"(e,r){"use strict";var t=$u().gl_mesh3d,a=$u().delaunay_triangulate,i=$u().alpha_shape,o=$u().convex_hull,s=y0().parseColorScale,l=Yt().isArrayOrTypedArray,n=g0(),u=As().extractOpts,c=Ny();function f(v,x,E){this.scene=v,this.uid=E,this.mesh=x,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var h=f.prototype;h.handlePick=function(v){if(v.object===this.mesh){var x=v.index=v.data.index;v.data._cellCenter?v.traceCoordinate=v.data.dataCoordinate:v.traceCoordinate=[this.data.x[x],this.data.y[x],this.data.z[x]];var E=this.data.hovertext||this.data.text;return l(E)&&E[x]!==void 0?v.textLabel=E[x]:E&&(v.textLabel=E),!0}};function d(v){for(var x=[],E=v.length,M=0;M=x-.5)return!1;return!0}h.update=function(v){var x=this.scene,E=x.fullSceneLayout;this.data=v;var M=v.x.length,C=c(p(E.xaxis,v.x,x.dataScale[0],v.xcalendar),p(E.yaxis,v.y,x.dataScale[1],v.ycalendar),p(E.zaxis,v.z,x.dataScale[2],v.zcalendar)),w;if(v.i&&v.j&&v.k){if(v.i.length!==v.j.length||v.j.length!==v.k.length||!y(v.i,M)||!y(v.j,M)||!y(v.k,M))return;w=c(g(v.i),g(v.j),g(v.k))}else v.alphahull===0?w=o(C):v.alphahull>0?w=i(v.alphahull,C):w=m(v.delaunayaxis,C);var k={positions:C,cells:w,lightPosition:[v.lightposition.x,v.lightposition.y,v.lightposition.z],ambient:v.lighting.ambient,diffuse:v.lighting.diffuse,specular:v.lighting.specular,roughness:v.lighting.roughness,fresnel:v.lighting.fresnel,vertexNormalsEpsilon:v.lighting.vertexnormalsepsilon,faceNormalsEpsilon:v.lighting.facenormalsepsilon,opacity:v.opacity,contourEnable:v.contour.show,contourColor:n(v.contour.color).slice(0,3),contourWidth:v.contour.width,useFacetNormals:v.flatshading};if(v.intensity){var T=u(v);this.color="#fff";var b=v.intensitymode;k[b+"Intensity"]=v.intensity,k[b+"IntensityBounds"]=[T.min,T.max],k.colormap=s(v)}else v.vertexcolor?(this.color=v.vertexcolor[0],k.vertexColors=d(v.vertexcolor)):v.facecolor?(this.color=v.facecolor[0],k.cellColors=d(v.facecolor)):(this.color=v.color,k.meshColor=n(v.color));this.mesh.update(k)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function _(v,x){var E=v.glplot.gl,M=t({gl:E}),C=new f(v,M,x.uid);return M._trace=C,C.update(x),v.glplot.add(M),C}r.exports=_}}),ise=ye({"src/traces/mesh3d/index.js"(e,r){"use strict";r.exports={attributes:Oy(),supplyDefaults:tse(),calc:rse(),colorbar:{min:"cmin",max:"cmax"},plot:ase(),moduleType:"trace",name:"mesh3d",basePlotModule:Bv(),categories:["gl3d","showLegend"],meta:{}}}}),nse=ye({"lib/mesh3d.js"(e,r){"use strict";r.exports=ise()}}),wP=ye({"src/traces/cone/attributes.js"(e,r){"use strict";var t=rs(),a=zs().axisHoverFormat,{hovertemplateAttrs:i,templatefallbackAttrs:o}=Ro(),s=Oy(),l=Oo(),n=Xi().extendFlat,u={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:i({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:o({editType:"calc"}),uhoverformat:a("u",1),vhoverformat:a("v",1),whoverformat:a("w",1),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),showlegend:n({},l.showlegend,{dflt:!1})};n(u,t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var c=["opacity","lightposition","lighting"];c.forEach(function(f){u[f]=s[f]}),u.hoverinfo=n({},l.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),r.exports=u}}),ose=ye({"src/traces/cone/defaults.js"(e,r){"use strict";var t=Yt(),a=Su(),i=wP();r.exports=function(s,l,n,u){function c(_,v){return t.coerce(s,l,i,_,v)}var f=c("u"),h=c("v"),d=c("w"),p=c("x"),g=c("y"),m=c("z");if(!f||!f.length||!h||!h.length||!d||!d.length||!p||!p.length||!g||!g.length||!m||!m.length){l.visible=!1;return}var y=c("sizemode");c("sizeref",y==="raw"?1:.5),c("anchor"),c("lighting.ambient"),c("lighting.diffuse"),c("lighting.specular"),c("lighting.roughness"),c("lighting.fresnel"),c("lightposition.x"),c("lightposition.y"),c("lightposition.z"),a(s,l,u,c,{prefix:"",cLetter:"c"}),c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback"),c("uhoverformat"),c("vhoverformat"),c("whoverformat"),c("xhoverformat"),c("yhoverformat"),c("zhoverformat"),l._length=null}}}),sse=ye({"src/traces/cone/calc.js"(e,r){"use strict";var t=Nc();r.exports=function(i,o){for(var s=o.u,l=o.v,n=o.w,u=Math.min(o.x.length,o.y.length,o.z.length,s.length,l.length,n.length),c=-1/0,f=1/0,h=0;h2?y=g.slice(1,m-1):m===2?y=[(g[0]+g[1])/2]:y=g,y}function h(g){var m=g.length;return m===1?[.5,.5]:[g[1]-g[0],g[m-1]-g[m-2]]}function d(g,m){var y=g.fullSceneLayout,_=g.dataScale,v=m._len,x={};function E(J,N){var H=y[N],W=_[n[N]];return i.simpleMap(J,function(U){return H.d2l(U)*W})}if(x.vectors=l(E(m._u,"xaxis"),E(m._v,"yaxis"),E(m._w,"zaxis"),v),!v)return{positions:[],cells:[]};var M=E(m._Xs,"xaxis"),C=E(m._Ys,"yaxis"),w=E(m._Zs,"zaxis");x.meshgrid=[M,C,w],x.gridFill=m._gridFill;var k=m._slen;if(k)x.startingPositions=l(E(m._startsX,"xaxis"),E(m._startsY,"yaxis"),E(m._startsZ,"zaxis"));else{for(var T=C[0],b=f(M),S=f(w),A=new Array(b.length*S.length),F=0,D=0;DT&&(T=F[0]),F[1]b&&(b=F[1])}function A(F){switch(F.type){case"GeometryCollection":F.geometries.forEach(A);break;case"Point":S(F.coordinates);break;case"MultiPoint":F.coordinates.forEach(S);break}}E.arcs.forEach(function(F){for(var D=-1,R=F.length,P;++DT&&(T=P[0]),P[1]b&&(b=P[1])});for(C in E.objects)A(E.objects[C]);return[w,k,T,b]}function s(E,M){for(var C,w=E.length,k=w-M;k<--w;)C=E[k],E[k++]=E[w],E[w]=C}function l(E,M){return typeof M=="string"&&(M=E.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return n(E,C)})}:n(E,M)}function n(E,M){var C=M.id,w=M.bbox,k=M.properties==null?{}:M.properties,T=u(E,M);return C==null&&w==null?{type:"Feature",properties:k,geometry:T}:w==null?{type:"Feature",id:C,properties:k,geometry:T}:{type:"Feature",id:C,bbox:w,properties:k,geometry:T}}function u(E,M){var C=i(E.transform),w=E.arcs;function k(D,R){R.length&&R.pop();for(var P=w[D<0?~D:D],z=0,I=P.length;z1)w=d(E,M,C);else for(k=0,w=new Array(T=E.arcs.length);k1)for(var R=1,P=S(F[0]),z,I;RP&&(I=F[0],F[0]=F[R],F[R]=I,P=z);return F}).filter(function(A){return A.length>0})}}function y(E,M){for(var C=0,w=E.length;C>>1;E[k]=2))throw new Error("n must be \u22652");A=E.bbox||o(E);var C=A[0],w=A[1],k=A[2],T=A[3],b;M={scale:[k-C?(k-C)/(b-1):1,T-w?(T-w)/(b-1):1],translate:[C,w]}}else A=E.bbox;var S=v(M),A,F,D=E.objects,R={};function P(L){return S(L)}function z(L){var B;switch(L.type){case"GeometryCollection":B={type:"GeometryCollection",geometries:L.geometries.map(z)};break;case"Point":B={type:"Point",coordinates:P(L.coordinates)};break;case"MultiPoint":B={type:"MultiPoint",coordinates:L.coordinates.map(P)};break;default:return L}return L.id!=null&&(B.id=L.id),L.bbox!=null&&(B.bbox=L.bbox),L.properties!=null&&(B.properties=L.properties),B}function I(L){var B=0,O=1,G=L.length,$,X=new Array(G);for(X[0]=S(L[0],0);++B0&&(o.push(s),s=[])}return s.length>0&&o.push(s),o},e.makeLine=function(t){return t.length===1?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},e.makePolygon=function(t){if(t.length===1)return{type:"Polygon",coordinates:t};for(var a=new Array(t.length),i=0;i{for(var E in x)t(v,E,{get:x[E],enumerable:!0})},l=(v,x,E,M)=>{if(x&&typeof x=="object"||typeof x=="function")for(let C of i(x))!o.call(v,C)&&C!==E&&t(v,C,{get:()=>x[C],enumerable:!(M=a(x,C))||M.enumerable});return v},n=v=>l(t({},"__esModule",{value:!0}),v),u={};s(u,{COUNTRIES:()=>c,byAlpha2:()=>y,byAlpha3:()=>m,byM49:()=>_,createLookup:()=>h,lookup:()=>p,lookupAlpha3:()=>g,sanitize:()=>f}),r.exports=n(u);var c=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","east pakistan","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","drc","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","macedonia former yugoslav republic of","macedonia fyr","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Naoero",aliases:["\u{1F1F3}\u{1F1F7}","nauru","pleasant island","republic of naoero","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function f(v){return v.normalize("NFD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").toLowerCase().replace(/[\u064B-\u065F]/g,"").replace(/['\u2018\u2019\u02BB\u02BC\u02BD\u02C8\u2032`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-\u2013\u2014]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function h(v){let x=new Map,E=new Map,M=new Map;for(let T of v)x.set(T.iso3,T),T.iso2&&E.set(T.iso2,T),T.m49&&M.set(T.m49,T);let C=new Map;for(let T of v)for(let b of[T.name,...T.aliases]){let S=f(b),A=C.get(S);if(A!==void 0&&A!==T.iso3)throw new Error(`Duplicate name/alias "${S}": ${A} vs ${T.iso3}`);C.set(S,T.iso3)}function w(T){if(T==null)return;let b=String(T).trim();if(!b)return;if(/^\d+$/.test(b)){let A=M.get(String(parseInt(b,10)).padStart(3,"0"));if(A)return A}if(/^[A-Za-z]{2}$/.test(b)){let A=E.get(b.toUpperCase());if(A)return A}if(/^[A-Za-z]{3}$/.test(b)){let A=x.get(b.toUpperCase());if(A)return A}let S=C.get(f(b));return S===void 0?void 0:x.get(S)}function k(T){var b;return(b=w(T))==null?void 0:b.iso3}return{lookup:w,lookupAlpha3:k,byAlpha3:x,byAlpha2:E,byM49:M}}var d=h(c),p=d.lookup,g=d.lookupAlpha3,m=d.byAlpha3,y=d.byAlpha2,_=d.byM49}}),yM=ye({"node_modules/@turf/helpers/dist/cjs/index.cjs"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=63710088e-1,t={centimeters:r*100,centimetres:r*100,degrees:360/(2*Math.PI),feet:r*3.28084,inches:r*39.37,kilometers:r/1e3,kilometres:r/1e3,meters:r,metres:r,miles:r/1609.344,millimeters:r*1e3,millimetres:r*1e3,nauticalmiles:r/1852,radians:1,yards:r*1.0936},a={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function i(D,R,P={}){let z={type:"Feature"};return(P.id===0||P.id)&&(z.id=P.id),P.bbox&&(z.bbox=P.bbox),z.properties=R||{},z.geometry=D,z}function o(D,R,P={}){switch(D){case"Point":return s(R).geometry;case"LineString":return c(R).geometry;case"Polygon":return n(R).geometry;case"MultiPoint":return p(R).geometry;case"MultiLineString":return d(R).geometry;case"MultiPolygon":return g(R).geometry;default:throw new Error(D+" is invalid")}}function s(D,R,P={}){if(!D)throw new Error("coordinates is required");if(!Array.isArray(D))throw new Error("coordinates must be an Array");if(D.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!b(D[0])||!b(D[1]))throw new Error("coordinates must contain numbers");return i({type:"Point",coordinates:D},R,P)}function l(D,R,P={}){return h(D.map(z=>s(z,R)),P)}function n(D,R,P={}){for(let I of D){if(I.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(I[I.length-1].length!==I[0].length)throw new Error("First and last Position are not equivalent.");for(let L=0;Ln(z,R)),P)}function c(D,R,P={}){if(D.length<2)throw new Error("coordinates must be an array of two or more positions");return i({type:"LineString",coordinates:D},R,P)}function f(D,R,P={}){return h(D.map(z=>c(z,R)),P)}function h(D,R={}){let P={type:"FeatureCollection"};return R.id&&(P.id=R.id),R.bbox&&(P.bbox=R.bbox),P.features=D,P}function d(D,R,P={}){return i({type:"MultiLineString",coordinates:D},R,P)}function p(D,R,P={}){return i({type:"MultiPoint",coordinates:D},R,P)}function g(D,R,P={}){return i({type:"MultiPolygon",coordinates:D},R,P)}function m(D,R,P={}){return i({type:"GeometryCollection",geometries:D},R,P)}function y(D,R=0){if(R&&!(R>=0))throw new Error("precision must be a positive number");let P=Math.pow(10,R||0);return Math.round(D*P)/P}function _(D,R="kilometers"){let P=t[R];if(!P)throw new Error(R+" units is invalid");return D*P}function v(D,R="kilometers"){let P=t[R];if(!P)throw new Error(R+" units is invalid");return D/P}function x(D,R){return C(v(D,R))}function E(D){let R=D%360;return R<0&&(R+=360),R}function M(D){return D=D%360,D>180?D-360:D<-180?D+360:D}function C(D){return D%(2*Math.PI)*180/Math.PI}function w(D){return D%360*Math.PI/180}function k(D,R="kilometers",P="kilometers"){if(!(D>=0))throw new Error("length must be a positive number");return _(v(D,R),P)}function T(D,R="meters",P="kilometers"){if(!(D>=0))throw new Error("area must be a positive number");let z=a[R];if(!z)throw new Error("invalid original units");let I=a[P];if(!I)throw new Error("invalid final units");return D/z*I}function b(D){return!isNaN(D)&&D!==null&&!Array.isArray(D)}function S(D){return D!==null&&typeof D=="object"&&!Array.isArray(D)}function A(D){if(!D)throw new Error("bbox is required");if(!Array.isArray(D))throw new Error("bbox must be an Array");if(D.length!==4&&D.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");D.forEach(R=>{if(!b(R))throw new Error("bbox must only contain numbers")})}function F(D){if(!D)throw new Error("id is required");if(["string","number"].indexOf(typeof D)===-1)throw new Error("id must be a number or a string")}e.areaFactors=a,e.azimuthToBearing=M,e.bearingToAzimuth=E,e.convertArea=T,e.convertLength=k,e.degreesToRadians=w,e.earthRadius=r,e.factors=t,e.feature=i,e.featureCollection=h,e.geometry=o,e.geometryCollection=m,e.isNumber=b,e.isObject=S,e.lengthToDegrees=x,e.lengthToRadians=v,e.lineString=c,e.lineStrings=f,e.multiLineString=d,e.multiPoint=p,e.multiPolygon=g,e.point=s,e.points=l,e.polygon=n,e.polygons=u,e.radiansToDegrees=C,e.radiansToLength=_,e.round=y,e.validateBBox=A,e.validateId=F}}),_M=ye({"node_modules/@turf/meta/dist/cjs/index.cjs"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=yM();function t(v,x,E){if(v!==null)for(var M,C,w,k,T,b,S,A=0,F=0,D,R=v.type,P=R==="FeatureCollection",z=R==="Feature",I=P?v.features.length:1,L=0;Lb||P>S||z>A){T=F,b=M,S=P,A=z,w=0;return}var I=r.lineString.call(void 0,[T,F],E.properties);if(x(I,M,C,z,w)===!1)return!1;w++,T=F})===!1)return!1}}})}function p(v,x,E){var M=E,C=!1;return d(v,function(w,k,T,b,S){C===!1&&E===void 0?M=w:M=x(M,w,k,T,b,S),C=!0}),M}function g(v,x){if(!v)throw new Error("geojson is required");f(v,function(E,M,C){if(E.geometry!==null){var w=E.geometry.type,k=E.geometry.coordinates;switch(w){case"LineString":if(x(E,M,C,0,0)===!1)return!1;break;case"Polygon":for(var T=0;Tf+i(h),0)}function i(c){let f=0,h;switch(c.type){case"Polygon":return o(c.coordinates);case"MultiPolygon":for(h=0;h0){f+=Math.abs(n(c[0]));for(let h=1;h=f?(d+2)%f:d+2],y=p[0]*l,_=g[1]*l,v=m[0]*l;h+=(v-y)*Math.sin(_),d++}return h*s}var u=a;e.area=a,e.default=u}}),_se=ye({"node_modules/@turf/centroid/dist/cjs/index.cjs"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=yM(),t=_M();function a(o,s={}){let l=0,n=0,u=0;return t.coordEach.call(void 0,o,function(c){l+=c[0],n+=c[1],u++},!0),r.point.call(void 0,[l/u,n/u],s.properties)}var i=a;e.centroid=a,e.default=i}}),xse=ye({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(e,r){(function(t,a){a(typeof e=="object"&&typeof r<"u"?e:t.d3=t.d3||{})})(e,(function(t){"use strict";function a(W,U){return WU?1:W>=U?0:NaN}function i(W){return W.length===1&&(W=o(W)),{left:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)<0?j=Y+1:q=Y}return j},right:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)>0?q=Y:j=Y+1}return j}}}function o(W){return function(U,V){return a(W(U),V)}}var s=i(a),l=s.right,n=s.left;function u(W,U){U==null&&(U=c);for(var V=0,j=W.length-1,q=W[0],Y=new Array(j<0?0:j);VW?1:U>=W?0:NaN}function d(W){return W===null?NaN:+W}function p(W,U){var V=W.length,j=0,q=-1,Y=0,K,re,se=0;if(U==null)for(;++q1)return se/(j-1)}function g(W,U){var V=p(W,U);return V&&Math.sqrt(V)}function m(W,U){var V=W.length,j=-1,q,Y,K;if(U==null){for(;++j=q)for(Y=K=q;++jq&&(Y=q),K=q)for(Y=K=q;++jq&&(Y=q),K0)return[W];if((j=U0)for(W=Math.ceil(W/re),U=Math.floor(U/re),K=new Array(Y=Math.ceil(U-W+1));++q=0?(Y>=C?10:Y>=w?5:Y>=k?2:1)*Math.pow(10,q):-Math.pow(10,-q)/(Y>=C?10:Y>=w?5:Y>=k?2:1)}function S(W,U,V){var j=Math.abs(U-W)/Math.max(0,V),q=Math.pow(10,Math.floor(Math.log(j)/Math.LN10)),Y=j/q;return Y>=C?q*=10:Y>=w?q*=5:Y>=k&&(q*=2),Ufe;)pe.pop(),--we;var xe=new Array(we+1),he;for(Y=0;Y<=we;++Y)he=xe[Y]=[],he.x0=Y>0?pe[Y-1]:ue,he.x1=Y=1)return+V(W[j-1],j-1,W);var j,q=(j-1)*U,Y=Math.floor(q),K=+V(W[Y],Y,W),re=+V(W[Y+1],Y+1,W);return K+(re-K)*(q-Y)}}function R(W,U,V){return W=v.call(W,d).sort(a),Math.ceil((V-U)/(2*(D(W,.75)-D(W,.25))*Math.pow(W.length,-1/3)))}function P(W,U,V){return Math.ceil((V-U)/(3.5*g(W)*Math.pow(W.length,-1/3)))}function z(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jY&&(Y=q)}else for(;++j=q)for(Y=q;++jY&&(Y=q);return Y}function I(W,U){var V=W.length,j=V,q=-1,Y,K=0;if(U==null)for(;++q=0;)for(K=W[U],V=K.length;--V>=0;)Y[--q]=K[V];return Y}function O(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jq&&(Y=q)}else for(;++j=q)for(Y=q;++jq&&(Y=q);return Y}function G(W,U){for(var V=U.length,j=new Array(V);V--;)j[V]=W[U[V]];return j}function $(W,U){if(V=W.length){var V,j=0,q=0,Y,K=W[q];for(U==null&&(U=a);++j0?1:it<0?-1:0},T=Math.sqrt,b=Math.tan;function S(it){return it>1?0:it<-1?c:Math.acos(it)}function A(it){return it>1?f:it<-1?-f:Math.asin(it)}function F(it){return(it=w(it/2))*it}function D(){}function R(it,wt){it&&z.hasOwnProperty(it.type)&&z[it.type](it,wt)}var P={Feature:function(it,wt){R(it.geometry,wt)},FeatureCollection:function(it,wt){for(var $t=it.features,Bt=-1,cr=$t.length;++Bt=0?1:-1,cr=Bt*$t,Sr=v(wt),Pr=w(wt),qr=N*Pr,$r=J*Sr+qr*v(cr),va=qr*Bt*w(cr);O.add(_(va,$r)),Z=it,J=Sr,N=Pr}function q(it){return G.reset(),B(it,H),G*2}function Y(it){return[_(it[1],it[0]),A(it[2])]}function K(it){var wt=it[0],$t=it[1],Bt=v($t);return[Bt*v(wt),Bt*w(wt),w($t)]}function re(it,wt){return it[0]*wt[0]+it[1]*wt[1]+it[2]*wt[2]}function se(it,wt){return[it[1]*wt[2]-it[2]*wt[1],it[2]*wt[0]-it[0]*wt[2],it[0]*wt[1]-it[1]*wt[0]]}function le(it,wt){it[0]+=wt[0],it[1]+=wt[1],it[2]+=wt[2]}function ue(it,wt){return[it[0]*wt,it[1]*wt,it[2]*wt]}function fe(it){var wt=T(it[0]*it[0]+it[1]*it[1]+it[2]*it[2]);it[0]/=wt,it[1]/=wt,it[2]/=wt}var pe,we,xe,he,oe,te,ie,ee,ce=i(),_e,Se,Me={point:Ue,lineStart:Ze,lineEnd:Ke,polygonStart:function(){Me.point=dt,Me.lineStart=_t,Me.lineEnd=Pt,ce.reset(),H.polygonStart()},polygonEnd:function(){H.polygonEnd(),Me.point=Ue,Me.lineStart=Ze,Me.lineEnd=Ke,O<0?(pe=-(xe=180),we=-(he=90)):ce>n?he=90:ce<-n&&(we=-90),Se[0]=pe,Se[1]=xe},sphere:function(){pe=-(xe=180),we=-(he=90)}};function Ue(it,wt){_e.push(Se=[pe=it,xe=it]),wthe&&(he=wt)}function Ge(it,wt){var $t=K([it*g,wt*g]);if(ee){var Bt=se(ee,$t),cr=[Bt[1],-Bt[0],0],Sr=se(cr,Bt);fe(Sr),Sr=Y(Sr);var Pr=it-oe,qr=Pr>0?1:-1,$r=Sr[0]*p*qr,va,Rr=m(Pr)>180;Rr^(qr*oe<$r&&$rhe&&(he=va)):($r=($r+360)%360-180,Rr^(qr*oe<$r&&$rhe&&(he=wt))),Rr?itpt(pe,xe)&&(xe=it):pt(it,xe)>pt(pe,xe)&&(pe=it):xe>=pe?(itxe&&(xe=it)):it>oe?pt(pe,it)>pt(pe,xe)&&(xe=it):pt(it,xe)>pt(pe,xe)&&(pe=it)}else _e.push(Se=[pe=it,xe=it]);wthe&&(he=wt),ee=$t,oe=it}function Ze(){Me.point=Ge}function Ke(){Se[0]=pe,Se[1]=xe,Me.point=Ue,ee=null}function dt(it,wt){if(ee){var $t=it-oe;ce.add(m($t)>180?$t+($t>0?360:-360):$t)}else te=it,ie=wt;H.point(it,wt),Ge(it,wt)}function _t(){H.lineStart()}function Pt(){dt(te,ie),H.lineEnd(),m(ce)>n&&(pe=-(xe=180)),Se[0]=pe,Se[1]=xe,ee=null}function pt(it,wt){return(wt-=it)<0?wt+360:wt}function Tt(it,wt){return it[0]-wt[0]}function st(it,wt){return it[0]<=it[1]?it[0]<=wt&&wt<=it[1]:wtpt(Bt[0],Bt[1])&&(Bt[1]=cr[1]),pt(cr[0],Bt[1])>pt(Bt[0],Bt[1])&&(Bt[0]=cr[0])):Sr.push(Bt=cr);for(Pr=-1/0,$t=Sr.length-1,wt=0,Bt=Sr[$t];wt<=$t;Bt=cr,++wt)cr=Sr[wt],(qr=pt(Bt[1],cr[0]))>Pr&&(Pr=qr,pe=cr[0],xe=Bt[1])}return _e=Se=null,pe===1/0||we===1/0?[[NaN,NaN],[NaN,NaN]]:[[pe,we],[xe,he]]}var Ye,me,be,Ee,De,Ce,Fe,Je,qe,at,tt,ct,At,ft,qt,ar,vt={sphere:D,point:gt,lineStart:Dt,lineEnd:lr,polygonStart:function(){vt.lineStart=dr,vt.lineEnd=yr},polygonEnd:function(){vt.lineStart=Dt,vt.lineEnd=lr}};function gt(it,wt){it*=g,wt*=g;var $t=v(wt);St($t*v(it),$t*w(it),w(wt))}function St(it,wt,$t){++Ye,be+=(it-be)/Ye,Ee+=(wt-Ee)/Ye,De+=($t-De)/Ye}function Dt(){vt.point=kt}function kt(it,wt){it*=g,wt*=g;var $t=v(wt);ft=$t*v(it),qt=$t*w(it),ar=w(wt),vt.point=Vt,St(ft,qt,ar)}function Vt(it,wt){it*=g,wt*=g;var $t=v(wt),Bt=$t*v(it),cr=$t*w(it),Sr=w(wt),Pr=_(T((Pr=qt*Sr-ar*cr)*Pr+(Pr=ar*Bt-ft*Sr)*Pr+(Pr=ft*cr-qt*Bt)*Pr),ft*Bt+qt*cr+ar*Sr);me+=Pr,Ce+=Pr*(ft+(ft=Bt)),Fe+=Pr*(qt+(qt=cr)),Je+=Pr*(ar+(ar=Sr)),St(ft,qt,ar)}function lr(){vt.point=gt}function dr(){vt.point=vr}function yr(){Fr(ct,At),vt.point=gt}function vr(it,wt){ct=it,At=wt,it*=g,wt*=g,vt.point=Fr;var $t=v(wt);ft=$t*v(it),qt=$t*w(it),ar=w(wt),St(ft,qt,ar)}function Fr(it,wt){it*=g,wt*=g;var $t=v(wt),Bt=$t*v(it),cr=$t*w(it),Sr=w(wt),Pr=qt*Sr-ar*cr,qr=ar*Bt-ft*Sr,$r=ft*cr-qt*Bt,va=T(Pr*Pr+qr*qr+$r*$r),Rr=A(va),Gr=va&&-Rr/va;qe+=Gr*Pr,at+=Gr*qr,tt+=Gr*$r,me+=Rr,Ce+=Rr*(ft+(ft=Bt)),Fe+=Rr*(qt+(qt=cr)),Je+=Rr*(ar+(ar=Sr)),St(ft,qt,ar)}function la(it){Ye=me=be=Ee=De=Ce=Fe=Je=qe=at=tt=0,B(it,vt);var wt=qe,$t=at,Bt=tt,cr=wt*wt+$t*$t+Bt*Bt;return crc?it+Math.round(-it/d)*d:it,wt]}Oa.invert=Oa;function Da(it,wt,$t){return(it%=d)?wt||$t?jr(ti(it),Ka(wt,$t)):ti(it):wt||$t?Ka(wt,$t):Oa}function _i(it){return function(wt,$t){return wt+=it,[wt>c?wt-d:wt<-c?wt+d:wt,$t]}}function ti(it){var wt=_i(it);return wt.invert=_i(-it),wt}function Ka(it,wt){var $t=v(it),Bt=w(it),cr=v(wt),Sr=w(wt);function Pr(qr,$r){var va=v($r),Rr=v(qr)*va,Gr=w(qr)*va,Yr=w($r),da=Yr*$t+Rr*Bt;return[_(Gr*cr-da*Sr,Rr*$t-Yr*Bt),A(da*cr+Gr*Sr)]}return Pr.invert=function(qr,$r){var va=v($r),Rr=v(qr)*va,Gr=w(qr)*va,Yr=w($r),da=Yr*cr-Gr*Sr;return[_(Gr*cr+Yr*Sr,Rr*$t+da*Bt),A(da*$t-Rr*Bt)]},Pr}function ia(it){it=Da(it[0]*g,it[1]*g,it.length>2?it[2]*g:0);function wt($t){return $t=it($t[0]*g,$t[1]*g),$t[0]*=p,$t[1]*=p,$t}return wt.invert=function($t){return $t=it.invert($t[0]*g,$t[1]*g),$t[0]*=p,$t[1]*=p,$t},wt}function na(it,wt,$t,Bt,cr,Sr){if($t){var Pr=v(wt),qr=w(wt),$r=Bt*$t;cr==null?(cr=wt+Bt*d,Sr=wt-$r/2):(cr=xi(Pr,cr),Sr=xi(Pr,Sr),(Bt>0?crSr)&&(cr+=Bt*d));for(var va,Rr=cr;Bt>0?Rr>Sr:Rr1&&it.push(it.pop().concat(it.shift()))},result:function(){var $t=it;return it=[],wt=null,$t}}}function Nr(it,wt){return m(it[0]-wt[0])=0;--qr)cr.point((Gr=Rr[qr])[0],Gr[1]);else Bt(Yr.x,Yr.p.x,-1,cr);Yr=Yr.p}Yr=Yr.o,Rr=Yr.z,da=!da}while(!Yr.v);cr.lineEnd()}}}function Et(it){if(wt=it.length){for(var wt,$t=0,Bt=it[0],cr;++$t=0?1:-1,ho=Co*ao,No=ho>c,Wn=gi*Ki;if(Mt.add(_(Wn*Co*w(ho),pi*pn+Wn*v(ho))),Pr+=No?ao+Co*d:ao,No^da>=$t^Ra>=$t){var Os=se(K(Yr),K(ji));fe(Os);var fs=se(Sr,Os);fe(fs);var zo=(No^ao>=0?-1:1)*A(fs[2]);(Bt>zo||Bt===zo&&(Os[0]||Os[1]))&&(qr+=No^ao>=0?1:-1)}}return(Pr<-n||Pr0){for($r||(cr.polygonStart(),$r=!0),cr.lineStart(),pn=0;pn1&&Ga&2&&Ki.push(Ki.pop().concat(Ki.shift())),Rr.push(Ki.filter(Be))}}return Yr}}function Be(it){return it.length>1}function et(it,wt){return((it=it.x)[0]<0?it[1]-f-n:f-it[1])-((wt=wt.x)[0]<0?wt[1]-f-n:f-wt[1])}var ut=Ht(function(){return!0},bt,It,[-c,-f]);function bt(it){var wt=NaN,$t=NaN,Bt=NaN,cr;return{lineStart:function(){it.lineStart(),cr=1},point:function(Sr,Pr){var qr=Sr>0?c:-c,$r=m(Sr-wt);m($r-c)0?f:-f),it.point(Bt,$t),it.lineEnd(),it.lineStart(),it.point(qr,$t),it.point(Sr,$t),cr=0):Bt!==qr&&$r>=c&&(m(wt-Bt)n?y((w(wt)*(Sr=v(Bt))*w($t)-w(Bt)*(cr=v(wt))*w(it))/(cr*Sr*Pr)):(wt+Bt)/2}function It(it,wt,$t,Bt){var cr;if(it==null)cr=$t*f,Bt.point(-c,cr),Bt.point(0,cr),Bt.point(c,cr),Bt.point(c,0),Bt.point(c,-cr),Bt.point(0,-cr),Bt.point(-c,-cr),Bt.point(-c,0),Bt.point(-c,cr);else if(m(it[0]-wt[0])>n){var Sr=it[0]0,cr=m(wt)>n;function Sr(Rr,Gr,Yr,da){na(da,it,$t,Yr,Rr,Gr)}function Pr(Rr,Gr){return v(Rr)*v(Gr)>wt}function qr(Rr){var Gr,Yr,da,La,gi;return{lineStart:function(){La=da=!1,gi=1},point:function(pi,Pi){var ji=[pi,Pi],Ra,Ga=Pr(pi,Pi),Ki=Bt?Ga?0:va(pi,Pi):Ga?va(pi+(pi<0?c:-c),Pi):0;if(!Gr&&(La=da=Ga)&&Rr.lineStart(),Ga!==da&&(Ra=$r(Gr,ji),(!Ra||Nr(Gr,Ra)||Nr(ji,Ra))&&(ji[2]=1)),Ga!==da)gi=0,Ga?(Rr.lineStart(),Ra=$r(ji,Gr),Rr.point(Ra[0],Ra[1])):(Ra=$r(Gr,ji),Rr.point(Ra[0],Ra[1],2),Rr.lineEnd()),Gr=Ra;else if(cr&&Gr&&Bt^Ga){var pn;!(Ki&Yr)&&(pn=$r(ji,Gr,!0))&&(gi=0,Bt?(Rr.lineStart(),Rr.point(pn[0][0],pn[0][1]),Rr.point(pn[1][0],pn[1][1]),Rr.lineEnd()):(Rr.point(pn[1][0],pn[1][1]),Rr.lineEnd(),Rr.lineStart(),Rr.point(pn[0][0],pn[0][1],3)))}Ga&&(!Gr||!Nr(Gr,ji))&&Rr.point(ji[0],ji[1]),Gr=ji,da=Ga,Yr=Ki},lineEnd:function(){da&&Rr.lineEnd(),Gr=null},clean:function(){return gi|(La&&da)<<1}}}function $r(Rr,Gr,Yr){var da=K(Rr),La=K(Gr),gi=[1,0,0],pi=se(da,La),Pi=re(pi,pi),ji=pi[0],Ra=Pi-ji*ji;if(!Ra)return!Yr&&Rr;var Ga=wt*Pi/Ra,Ki=-wt*ji/Ra,pn=se(gi,pi),ao=ue(gi,Ga),Co=ue(pi,Ki);le(ao,Co);var ho=pn,No=re(ao,ho),Wn=re(ho,ho),Os=No*No-Wn*(re(ao,ao)-1);if(!(Os<0)){var fs=T(Os),zo=ue(ho,(-No-fs)/Wn);if(le(zo,ao),zo=Y(zo),!Yr)return zo;var Qa=Rr[0],io=Gr[0],Ms=Rr[1],Ns=Gr[1],jl;io0^zo[1]<(m(zo[0]-Qa)c^(Qa<=zo[0]&&zo[0]<=io)){var Cl=ue(ho,(-No+fs)/Wn);return le(Cl,ao),[zo,Y(Cl)]}}}function va(Rr,Gr){var Yr=Bt?it:c-it,da=0;return Rr<-Yr?da|=1:Rr>Yr&&(da|=2),Gr<-Yr?da|=4:Gr>Yr&&(da|=8),da}return Ht(Pr,qr,Sr,Bt?[0,-it]:[-c,it-c])}function jt(it,wt,$t,Bt,cr,Sr){var Pr=it[0],qr=it[1],$r=wt[0],va=wt[1],Rr=0,Gr=1,Yr=$r-Pr,da=va-qr,La;if(La=$t-Pr,!(!Yr&&La>0)){if(La/=Yr,Yr<0){if(La0){if(La>Gr)return;La>Rr&&(Rr=La)}if(La=cr-Pr,!(!Yr&&La<0)){if(La/=Yr,Yr<0){if(La>Gr)return;La>Rr&&(Rr=La)}else if(Yr>0){if(La0)){if(La/=da,da<0){if(La0){if(La>Gr)return;La>Rr&&(Rr=La)}if(La=Sr-qr,!(!da&&La<0)){if(La/=da,da<0){if(La>Gr)return;La>Rr&&(Rr=La)}else if(da>0){if(La0&&(it[0]=Pr+Rr*Yr,it[1]=qr+Rr*da),Gr<1&&(wt[0]=Pr+Gr*Yr,wt[1]=qr+Gr*da),!0}}}}}var sr=1e9,kr=-sr;function Mr(it,wt,$t,Bt){function cr(va,Rr){return it<=va&&va<=$t&&wt<=Rr&&Rr<=Bt}function Sr(va,Rr,Gr,Yr){var da=0,La=0;if(va==null||(da=Pr(va,Gr))!==(La=Pr(Rr,Gr))||$r(va,Rr)<0^Gr>0)do Yr.point(da===0||da===3?it:$t,da>1?Bt:wt);while((da=(da+Gr+4)%4)!==La);else Yr.point(Rr[0],Rr[1])}function Pr(va,Rr){return m(va[0]-it)0?0:3:m(va[0]-$t)0?2:1:m(va[1]-wt)0?1:0:Rr>0?3:2}function qr(va,Rr){return $r(va.x,Rr.x)}function $r(va,Rr){var Gr=Pr(va,1),Yr=Pr(Rr,1);return Gr!==Yr?Gr-Yr:Gr===0?Rr[1]-va[1]:Gr===1?va[0]-Rr[0]:Gr===2?va[1]-Rr[1]:Rr[0]-va[0]}return function(va){var Rr=va,Gr=Qr(),Yr,da,La,gi,pi,Pi,ji,Ra,Ga,Ki,pn,ao={point:Co,lineStart:Os,lineEnd:fs,polygonStart:No,polygonEnd:Wn};function Co(Qa,io){cr(Qa,io)&&Rr.point(Qa,io)}function ho(){for(var Qa=0,io=0,Ms=da.length;ioBt&&(oc-Lc)*(Bt-Cl)>(of-Cl)*(it-Lc)&&++Qa:of<=Bt&&(oc-Lc)*(Bt-Cl)<(of-Cl)*(it-Lc)&&--Qa;return Qa}function No(){Rr=Gr,Yr=[],da=[],pn=!0}function Wn(){var Qa=ho(),io=pn&&Qa,Ms=(Yr=a.merge(Yr)).length;(io||Ms)&&(va.polygonStart(),io&&(va.lineStart(),Sr(null,null,1,va),va.lineEnd()),Ms&&Ie(Yr,qr,Qa,Sr,va),va.polygonEnd()),Rr=va,Yr=da=La=null}function Os(){ao.point=zo,da&&da.push(La=[]),Ki=!0,Ga=!1,ji=Ra=NaN}function fs(){Yr&&(zo(gi,pi),Pi&&Ga&&Gr.rejoin(),Yr.push(Gr.result())),ao.point=Co,Ga&&Rr.lineEnd()}function zo(Qa,io){var Ms=cr(Qa,io);if(da&&La.push([Qa,io]),Ki)gi=Qa,pi=io,Pi=Ms,Ki=!1,Ms&&(Rr.lineStart(),Rr.point(Qa,io));else if(Ms&&Ga)Rr.point(Qa,io);else{var Ns=[ji=Math.max(kr,Math.min(sr,ji)),Ra=Math.max(kr,Math.min(sr,Ra))],jl=[Qa=Math.max(kr,Math.min(sr,Qa)),io=Math.max(kr,Math.min(sr,io))];jt(Ns,jl,it,wt,$t,Bt)?(Ga||(Rr.lineStart(),Rr.point(Ns[0],Ns[1])),Rr.point(jl[0],jl[1]),Ms||Rr.lineEnd(),pn=!1):Ms&&(Rr.lineStart(),Rr.point(Qa,io),pn=!1)}ji=Qa,Ra=io,Ga=Ms}return ao}}function ua(){var it=0,wt=0,$t=960,Bt=500,cr,Sr,Pr;return Pr={stream:function(qr){return cr&&Sr===qr?cr:cr=Mr(it,wt,$t,Bt)(Sr=qr)},extent:function(qr){return arguments.length?(it=+qr[0][0],wt=+qr[0][1],$t=+qr[1][0],Bt=+qr[1][1],cr=Sr=null,Pr):[[it,wt],[$t,Bt]]}}}var ra=i(),ni,Ca,Li,Va={sphere:D,point:D,lineStart:dn,lineEnd:D,polygonStart:D,polygonEnd:D};function dn(){Va.point=pa,Va.lineEnd=rn}function rn(){Va.point=Va.lineEnd=D}function pa(it,wt){it*=g,wt*=g,ni=it,Ca=w(wt),Li=v(wt),Va.point=_n}function _n(it,wt){it*=g,wt*=g;var $t=w(wt),Bt=v(wt),cr=m(it-ni),Sr=v(cr),Pr=w(cr),qr=Bt*Pr,$r=Li*$t-Ca*Bt*Sr,va=Ca*$t+Li*Bt*Sr;ra.add(_(T(qr*qr+$r*$r),va)),ni=it,Ca=$t,Li=Bt}function Zi(it){return ra.reset(),B(it,Va),+ra}var Fi=[null,null],xn={type:"LineString",coordinates:Fi};function Ni(it,wt){return Fi[0]=it,Fi[1]=wt,Zi(xn)}var un={Feature:function(it,wt){return bn(it.geometry,wt)},FeatureCollection:function(it,wt){for(var $t=it.features,Bt=-1,cr=$t.length;++Bt0&&(cr=Ni(it[Sr],it[Sr-1]),cr>0&&$t<=cr&&Bt<=cr&&($t+Bt-cr)*(1-Math.pow(($t-Bt)/cr,2))n}).map(Yr)).concat(a.range(x(Sr/va)*va,cr,va).filter(function(Ra){return m(Ra%Gr)>n}).map(da))}return Pi.lines=function(){return ji().map(function(Ra){return{type:"LineString",coordinates:Ra}})},Pi.outline=function(){return{type:"Polygon",coordinates:[La(Bt).concat(gi(Pr).slice(1),La($t).reverse().slice(1),gi(qr).reverse().slice(1))]}},Pi.extent=function(Ra){return arguments.length?Pi.extentMajor(Ra).extentMinor(Ra):Pi.extentMinor()},Pi.extentMajor=function(Ra){return arguments.length?(Bt=+Ra[0][0],$t=+Ra[1][0],qr=+Ra[0][1],Pr=+Ra[1][1],Bt>$t&&(Ra=Bt,Bt=$t,$t=Ra),qr>Pr&&(Ra=qr,qr=Pr,Pr=Ra),Pi.precision(pi)):[[Bt,qr],[$t,Pr]]},Pi.extentMinor=function(Ra){return arguments.length?(wt=+Ra[0][0],it=+Ra[1][0],Sr=+Ra[0][1],cr=+Ra[1][1],wt>it&&(Ra=wt,wt=it,it=Ra),Sr>cr&&(Ra=Sr,Sr=cr,cr=Ra),Pi.precision(pi)):[[wt,Sr],[it,cr]]},Pi.step=function(Ra){return arguments.length?Pi.stepMajor(Ra).stepMinor(Ra):Pi.stepMinor()},Pi.stepMajor=function(Ra){return arguments.length?(Rr=+Ra[0],Gr=+Ra[1],Pi):[Rr,Gr]},Pi.stepMinor=function(Ra){return arguments.length?($r=+Ra[0],va=+Ra[1],Pi):[$r,va]},Pi.precision=function(Ra){return arguments.length?(pi=+Ra,Yr=Un(Sr,cr,90),da=Kn(wt,it,pi),La=Un(qr,Pr,90),gi=Kn(Bt,$t,pi),Pi):pi},Pi.extentMajor([[-180,-90+n],[180,90-n]]).extentMinor([[-180,-80-n],[180,80+n]])}function Jn(){return To()()}function qn(it,wt){var $t=it[0]*g,Bt=it[1]*g,cr=wt[0]*g,Sr=wt[1]*g,Pr=v(Bt),qr=w(Bt),$r=v(Sr),va=w(Sr),Rr=Pr*v($t),Gr=Pr*w($t),Yr=$r*v(cr),da=$r*w(cr),La=2*A(T(F(Sr-Bt)+Pr*$r*F(cr-$t))),gi=w(La),pi=La?function(Pi){var ji=w(Pi*=La)/gi,Ra=w(La-Pi)/gi,Ga=Ra*Rr+ji*Yr,Ki=Ra*Gr+ji*da,pn=Ra*qr+ji*va;return[_(Ki,Ga)*p,_(pn,T(Ga*Ga+Ki*Ki))*p]}:function(){return[$t*p,Bt*p]};return pi.distance=La,pi}function Fo(it){return it}var zn=i(),wn=i(),os,uo,Yn,go,Cn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){Cn.lineStart=Xo,Cn.lineEnd=sl},polygonEnd:function(){Cn.lineStart=Cn.lineEnd=Cn.point=D,zn.add(m(wn)),wn.reset()},result:function(){var it=zn/2;return zn.reset(),it}};function Xo(){Cn.point=gs}function gs(it,wt){Cn.point=yo,os=Yn=it,uo=go=wt}function yo(it,wt){wn.add(go*it-Yn*wt),Yn=it,go=wt}function sl(){yo(os,uo)}var ss=1/0,oo=ss,Bn=-ss,An=Bn,Po={point:Bl,lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D,result:function(){var it=[[ss,oo],[Bn,An]];return Bn=An=-(oo=ss=1/0),it}};function Bl(it,wt){itBn&&(Bn=it),wtAn&&(An=wt)}var Lu=0,Jl=0,Fu=0,Pu=0,Ku=0,mu=0,$c=0,Ju=0,Ol=0,Yc,Qu,Sl,cs,Qo={point:ml,lineStart:Xc,lineEnd:ed,polygonStart:function(){Qo.lineStart=td,Qo.lineEnd=bp},polygonEnd:function(){Qo.point=ml,Qo.lineStart=Xc,Qo.lineEnd=ed},result:function(){var it=Ol?[$c/Ol,Ju/Ol]:mu?[Pu/mu,Ku/mu]:Fu?[Lu/Fu,Jl/Fu]:[NaN,NaN];return Lu=Jl=Fu=Pu=Ku=mu=$c=Ju=Ol=0,it}};function ml(it,wt){Lu+=it,Jl+=wt,++Fu}function Xc(){Qo.point=Zc}function Zc(it,wt){Qo.point=kc,ml(Sl=it,cs=wt)}function kc(it,wt){var $t=it-Sl,Bt=wt-cs,cr=T($t*$t+Bt*Bt);Pu+=cr*(Sl+it)/2,Ku+=cr*(cs+wt)/2,mu+=cr,ml(Sl=it,cs=wt)}function ed(){Qo.point=ml}function td(){Qo.point=t0}function bp(){ec(Yc,Qu)}function t0(it,wt){Qo.point=ec,ml(Yc=Sl=it,Qu=cs=wt)}function ec(it,wt){var $t=it-Sl,Bt=wt-cs,cr=T($t*$t+Bt*Bt);Pu+=cr*(Sl+it)/2,Ku+=cr*(cs+wt)/2,mu+=cr,cr=cs*it-Sl*wt,$c+=cr*(Sl+it),Ju+=cr*(cs+wt),Ol+=cr*3,ml(Sl=it,cs=wt)}function ys(it){this._context=it}ys.prototype={_radius:4.5,pointRadius:function(it){return this._radius=it,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(it,wt){switch(this._point){case 0:{this._context.moveTo(it,wt),this._point=1;break}case 1:{this._context.lineTo(it,wt);break}default:{this._context.moveTo(it+this._radius,wt),this._context.arc(it,wt,this._radius,0,d);break}}},result:D};var rd=i(),Hf,Kc,ad,Jc,Tf,tc={point:D,lineStart:function(){tc.point=Wf},lineEnd:function(){Hf&&xh(Kc,ad),tc.point=D},polygonStart:function(){Hf=!0},polygonEnd:function(){Hf=null},result:function(){var it=+rd;return rd.reset(),it}};function Wf(it,wt){tc.point=xh,Kc=Jc=it,ad=Tf=wt}function xh(it,wt){Jc-=it,Tf-=wt,rd.add(T(Jc*Jc+Tf*Tf)),Jc=it,Tf=wt}function Qc(){this._string=[]}Qc.prototype={_radius:4.5,_circle:Wd(4.5),pointRadius:function(it){return(it=+it)!==this._radius&&(this._radius=it,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(it,wt){switch(this._point){case 0:{this._string.push("M",it,",",wt),this._point=1;break}case 1:{this._string.push("L",it,",",wt);break}default:{this._circle==null&&(this._circle=Wd(this._radius)),this._string.push("M",it,",",wt,this._circle);break}}},result:function(){if(this._string.length){var it=this._string.join("");return this._string=[],it}else return null}};function Wd(it){return"m0,"+it+"a"+it+","+it+" 0 1,1 0,"+-2*it+"a"+it+","+it+" 0 1,1 0,"+2*it+"z"}function bh(it,wt){var $t=4.5,Bt,cr;function Sr(Pr){return Pr&&(typeof $t=="function"&&cr.pointRadius(+$t.apply(this,arguments)),B(Pr,Bt(cr))),cr.result()}return Sr.area=function(Pr){return B(Pr,Bt(Cn)),Cn.result()},Sr.measure=function(Pr){return B(Pr,Bt(tc)),tc.result()},Sr.bounds=function(Pr){return B(Pr,Bt(Po)),Po.result()},Sr.centroid=function(Pr){return B(Pr,Bt(Qo)),Qo.result()},Sr.projection=function(Pr){return arguments.length?(Bt=Pr==null?(it=null,Fo):(it=Pr).stream,Sr):it},Sr.context=function(Pr){return arguments.length?(cr=Pr==null?(wt=null,new Qc):new ys(wt=Pr),typeof $t!="function"&&cr.pointRadius($t),Sr):wt},Sr.pointRadius=function(Pr){return arguments.length?($t=typeof Pr=="function"?Pr:(cr.pointRadius(+Pr),+Pr),Sr):$t},Sr.projection(it).context(wt)}function wp(it){return{stream:rc(it)}}function rc(it){return function(wt){var $t=new id;for(var Bt in it)$t[Bt]=it[Bt];return $t.stream=wt,$t}}function id(){}id.prototype={constructor:id,point:function(it,wt){this.stream.point(it,wt)},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 Iu(it,wt,$t){var Bt=it.clipExtent&&it.clipExtent();return it.scale(150).translate([0,0]),Bt!=null&&it.clipExtent(null),B($t,it.stream(Po)),wt(Po.result()),Bt!=null&&it.clipExtent(Bt),it}function wh(it,wt,$t){return Iu(it,function(Bt){var cr=wt[1][0]-wt[0][0],Sr=wt[1][1]-wt[0][1],Pr=Math.min(cr/(Bt[1][0]-Bt[0][0]),Sr/(Bt[1][1]-Bt[0][1])),qr=+wt[0][0]+(cr-Pr*(Bt[1][0]+Bt[0][0]))/2,$r=+wt[0][1]+(Sr-Pr*(Bt[1][1]+Bt[0][1]))/2;it.scale(150*Pr).translate([qr,$r])},$t)}function Nl(it,wt,$t){return wh(it,[[0,0],wt],$t)}function $f(it,wt,$t){return Iu(it,function(Bt){var cr=+wt,Sr=cr/(Bt[1][0]-Bt[0][0]),Pr=(cr-Sr*(Bt[1][0]+Bt[0][0]))/2,qr=-Sr*Bt[0][1];it.scale(150*Sr).translate([Pr,qr])},$t)}function ac(it,wt,$t){return Iu(it,function(Bt){var cr=+wt,Sr=cr/(Bt[1][1]-Bt[0][1]),Pr=-Sr*Bt[0][0],qr=(cr-Sr*(Bt[1][1]+Bt[0][1]))/2;it.scale(150*Sr).translate([Pr,qr])},$t)}var Yf=16,Xf=v(30*g);function Ah(it,wt){return+wt?ef(it,wt):nd(it)}function nd(it){return rc({point:function(wt,$t){wt=it(wt,$t),this.stream.point(wt[0],wt[1])}})}function ef(it,wt){function $t(Bt,cr,Sr,Pr,qr,$r,va,Rr,Gr,Yr,da,La,gi,pi){var Pi=va-Bt,ji=Rr-cr,Ra=Pi*Pi+ji*ji;if(Ra>4*wt&&gi--){var Ga=Pr+Yr,Ki=qr+da,pn=$r+La,ao=T(Ga*Ga+Ki*Ki+pn*pn),Co=A(pn/=ao),ho=m(m(pn)-1)wt||m((Pi*fs+ji*zo)/Ra-.5)>.3||Pr*Yr+qr*da+$r*La2?Qa[2]%360*g:0,fs()):[qr*p,$r*p,va*p]},Wn.angle=function(Qa){return arguments.length?(Gr=Qa%360*g,fs()):Gr*p},Wn.reflectX=function(Qa){return arguments.length?(Yr=Qa?-1:1,fs()):Yr<0},Wn.reflectY=function(Qa){return arguments.length?(da=Qa?-1:1,fs()):da<0},Wn.precision=function(Qa){return arguments.length?(pn=Ah(ao,Ki=Qa*Qa),zo()):T(Ki)},Wn.fitExtent=function(Qa,io){return wh(Wn,Qa,io)},Wn.fitSize=function(Qa,io){return Nl(Wn,Qa,io)},Wn.fitWidth=function(Qa,io){return $f(Wn,Qa,io)},Wn.fitHeight=function(Qa,io){return ac(Wn,Qa,io)};function fs(){var Qa=kl($t,0,0,Yr,da,Gr).apply(null,wt(Sr,Pr)),io=(Gr?kl:Ap)($t,Bt-Qa[0],cr-Qa[1],Yr,da,Gr);return Rr=Da(qr,$r,va),ao=jr(wt,io),Co=jr(Rr,ao),pn=Ah(ao,Ki),zo()}function zo(){return ho=No=null,Wn}return function(){return wt=it.apply(this,arguments),Wn.invert=wt.invert&&Os,fs()}}function yl(it){var wt=0,$t=c/3,Bt=tf(it),cr=Bt(wt,$t);return cr.parallels=function(Sr){return arguments.length?Bt(wt=Sr[0]*g,$t=Sr[1]*g):[wt*p,$t*p]},cr}function Th(it){var wt=v(it);function $t(Bt,cr){return[Bt*wt,w(cr)/wt]}return $t.invert=function(Bt,cr){return[Bt/wt,A(cr*wt)]},$t}function ic(it,wt){var $t=w(it),Bt=($t+w(wt))/2;if(m(Bt)=.12&&pi<.234&&gi>=-.425&&gi<-.214?cr:pi>=.166&&pi<.234&&gi>=-.214&&gi<-.115?Pr:$t).invert(Yr)},Rr.stream=function(Yr){return it&&wt===Yr?it:it=Tp([$t.stream(wt=Yr),cr.stream(Yr),Pr.stream(Yr)])},Rr.precision=function(Yr){return arguments.length?($t.precision(Yr),cr.precision(Yr),Pr.precision(Yr),Gr()):$t.precision()},Rr.scale=function(Yr){return arguments.length?($t.scale(Yr),cr.scale(Yr*.35),Pr.scale(Yr),Rr.translate($t.translate())):$t.scale()},Rr.translate=function(Yr){if(!arguments.length)return $t.translate();var da=$t.scale(),La=+Yr[0],gi=+Yr[1];return Bt=$t.translate(Yr).clipExtent([[La-.455*da,gi-.238*da],[La+.455*da,gi+.238*da]]).stream(va),Sr=cr.translate([La-.307*da,gi+.201*da]).clipExtent([[La-.425*da+n,gi+.12*da+n],[La-.214*da-n,gi+.234*da-n]]).stream(va),qr=Pr.translate([La-.205*da,gi+.212*da]).clipExtent([[La-.214*da+n,gi+.166*da+n],[La-.115*da-n,gi+.234*da-n]]).stream(va),Gr()},Rr.fitExtent=function(Yr,da){return wh(Rr,Yr,da)},Rr.fitSize=function(Yr,da){return Nl(Rr,Yr,da)},Rr.fitWidth=function(Yr,da){return $f(Rr,Yr,da)},Rr.fitHeight=function(Yr,da){return ac(Rr,Yr,da)};function Gr(){return it=wt=null,Rr}return Rr.scale(1070)}function nc(it){return function(wt,$t){var Bt=v(wt),cr=v($t),Sr=it(Bt*cr);return[Sr*cr*w(wt),Sr*w($t)]}}function Ql(it){return function(wt,$t){var Bt=T(wt*wt+$t*$t),cr=it(Bt),Sr=w(cr),Pr=v(cr);return[_(wt*Sr,Bt*Pr),A(Bt&&$t*Sr/Bt)]}}var eu=nc(function(it){return T(2/(1+it))});eu.invert=Ql(function(it){return 2*A(it/2)});function Mp(){return Ru(eu).scale(124.75).clipAngle(180-.001)}var Zf=nc(function(it){return(it=S(it))&&it/w(it)});Zf.invert=Ql(function(it){return it});function Yd(){return Ru(Zf).scale(79.4188).clipAngle(180-.001)}function gu(it,wt){return[it,M(b((f+wt)/2))]}gu.invert=function(it,wt){return[it,2*y(E(wt))-f]};function Mf(){return Eh(gu).scale(961/d)}function Eh(it){var wt=Ru(it),$t=wt.center,Bt=wt.scale,cr=wt.translate,Sr=wt.clipExtent,Pr=null,qr,$r,va;wt.scale=function(Gr){return arguments.length?(Bt(Gr),Rr()):Bt()},wt.translate=function(Gr){return arguments.length?(cr(Gr),Rr()):cr()},wt.center=function(Gr){return arguments.length?($t(Gr),Rr()):$t()},wt.clipExtent=function(Gr){return arguments.length?(Gr==null?Pr=qr=$r=va=null:(Pr=+Gr[0][0],qr=+Gr[0][1],$r=+Gr[1][0],va=+Gr[1][1]),Rr()):Pr==null?null:[[Pr,qr],[$r,va]]};function Rr(){var Gr=c*Bt(),Yr=wt(ia(wt.rotate()).invert([0,0]));return Sr(Pr==null?[[Yr[0]-Gr,Yr[1]-Gr],[Yr[0]+Gr,Yr[1]+Gr]]:it===gu?[[Math.max(Yr[0]-Gr,Pr),qr],[Math.min(Yr[0]+Gr,$r),va]]:[[Pr,Math.max(Yr[1]-Gr,qr)],[$r,Math.min(Yr[1]+Gr,va)]])}return Rr()}function Kf(it){return b((f+it)/2)}function Ep(it,wt){var $t=v(it),Bt=it===wt?w(it):M($t/v(wt))/M(Kf(wt)/Kf(it)),cr=$t*C(Kf(it),Bt)/Bt;if(!Bt)return gu;function Sr(Pr,qr){cr>0?qr<-f+n&&(qr=-f+n):qr>f-n&&(qr=f-n);var $r=cr/C(Kf(qr),Bt);return[$r*w(Bt*Pr),cr-$r*v(Bt*Pr)]}return Sr.invert=function(Pr,qr){var $r=cr-qr,va=k(Bt)*T(Pr*Pr+$r*$r),Rr=_(Pr,m($r))*k($r);return $r*Bt<0&&(Rr-=c*k(Pr)*k($r)),[Rr/Bt,2*y(C(cr/va,1/Bt))-f]},Sr}function Ef(){return yl(Ep).scale(109.5).parallels([30,30])}function af(it,wt){return[it,wt]}af.invert=af;function nf(){return Ru(af).scale(152.63)}function Jf(it,wt){var $t=v(it),Bt=it===wt?w(it):($t-v(wt))/(wt-it),cr=$t/Bt+it;if(m(Bt)n&&--Bt>0);return[it/(.8707+(Sr=$t*$t)*(-.131979+Sr*(-.013791+Sr*Sr*Sr*(.003971-.001529*Sr)))),$t]};function ld(){return Ru(Kd).scale(175.295)}function Ks(it,wt){return[v(wt)*w(it),w(wt)]}Ks.invert=Ql(A);function yu(){return Ru(Ks).scale(249.5).clipAngle(90+n)}function Lh(it,wt){var $t=v(wt),Bt=1+v(it)*$t;return[$t*w(it)/Bt,w(wt)/Bt]}Lh.invert=Ql(function(it){return 2*y(it)});function ud(){return Ru(Lh).scale(250).clipAngle(142)}function Fh(it,wt){return[M(b((f+wt)/2)),-it]}Fh.invert=function(it,wt){return[-wt,2*y(E(it))-f]};function eh(){var it=Eh(Fh),wt=it.center,$t=it.rotate;return it.center=function(Bt){return arguments.length?wt([-Bt[1],Bt[0]]):(Bt=wt(),[Bt[1],-Bt[0]])},it.rotate=function(Bt){return arguments.length?$t([Bt[0],Bt[1],Bt.length>2?Bt[2]+90:90]):(Bt=$t(),[Bt[0],Bt[1],Bt[2]-90])},$t([0,0,90]).scale(159.155)}t.geoAlbers=Mh,t.geoAlbersUsa=$d,t.geoArea=q,t.geoAzimuthalEqualArea=Mp,t.geoAzimuthalEqualAreaRaw=eu,t.geoAzimuthalEquidistant=Yd,t.geoAzimuthalEquidistantRaw=Zf,t.geoBounds=Ve,t.geoCentroid=la,t.geoCircle=Yi,t.geoClipAntimeridian=ut,t.geoClipCircle=Wt,t.geoClipExtent=ua,t.geoClipRectangle=Mr,t.geoConicConformal=Ef,t.geoConicConformalRaw=Ep,t.geoConicEqualArea=rf,t.geoConicEqualAreaRaw=ic,t.geoConicEquidistant=Xd,t.geoConicEquidistantRaw=Jf,t.geoContains=ro,t.geoDistance=Ni,t.geoEqualEarth=Zd,t.geoEqualEarthRaw=Ch,t.geoEquirectangular=nf,t.geoEquirectangularRaw=af,t.geoGnomonic=Sp,t.geoGnomonicRaw=sd,t.geoGraticule=To,t.geoGraticule10=Jn,t.geoIdentity=Dh,t.geoInterpolate=qn,t.geoLength=Zi,t.geoMercator=Mf,t.geoMercatorRaw=gu,t.geoNaturalEarth1=ld,t.geoNaturalEarth1Raw=Kd,t.geoOrthographic=yu,t.geoOrthographicRaw=Ks,t.geoPath=bh,t.geoProjection=Ru,t.geoProjectionMutator=tf,t.geoRotation=ia,t.geoStereographic=ud,t.geoStereographicRaw=Lh,t.geoStream=B,t.geoTransform=wp,t.geoTransverseMercator=eh,t.geoTransverseMercatorRaw=Fh,Object.defineProperty(t,"__esModule",{value:!0})}))}}),bse=ye({"src/lib/usa_location_names.js"(e,r){"use strict";var t={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},a=new Set(Object.values(t));r.exports={usaLocationAbbreviations:a,usaLocationList:t}}}),EP={};rl(EP,{COUNTRIES_X:()=>SP});var SP,wse=Si({"src/lib/custom_country_codes.ts"(){"use strict";SP=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),_0=ye({"src/lib/geo_location_utils.js"(e,r){"use strict";var t=ai(),{COUNTRIES:a,createLookup:i}=gse(),{area:o}=yse(),{centroid:s}=_se(),{coordAll:l}=_M(),{geoBounds:n}=xM(),u=Wx(),c=c0(),f=yv(),h=Ux(),d=Qx(),{usaLocationAbbreviations:p,usaLocationList:g}=bse(),{COUNTRIES_X:m}=(wse(),On(EP)),{lookupAlpha3:y}=i([...a,...m]),_={"ISO-3":u,"USA-states":x,"country names":v};function v(L){let B=y(L);return B||(c.log("Unrecognized country name: "+L+"."),!1)}function x(L){L=L.trim();let B=p.has(L.toUpperCase())?L.toUpperCase():g[L.toLowerCase()];return B||(c.log("Unrecognized US location: "+L+"."),!1)}function E(L,B,O){var G;if(!B||typeof B!="string")return!1;let $=_[L](B);if($){let X;if(L==="USA-states"){X=[];for(let Z of O)((G=Z?.properties)==null?void 0:G.gu)==="USA"&&X.push(Z)}else X=O;for(let Z of X)if(Z.id===$)return Z;c.log(`Location with id ${$} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(L){for(let B=0;B0&&L[B+1][0]<0)return B;return null}function w(L){var B=L.geometry,O=B.coordinates,G=L.id,$=[],X,Z,J,N;switch(G==="RUS"||G==="FJI"?X=function(H){var W;if(C(H)===null)W=H;else for(W=new Array(H.length),N=0;NW?U[V++]=[H[N][0]+M,H[N][1]]:N===W?(U[V++]=H[N],U[V++]=[H[N][0],-90]):U[V++]=H[N];var j=d.tester(U);j.pts.pop(),$.push(j)}:X=function(H){$.push(d.tester(H))},B.type){case"MultiPolygon":for(Z=0;Z$&&($=J,O=Z)}else O=B;return!O||!O.coordinates.some(N=>N.length>0)?[NaN,NaN]:s(O).geometry.coordinates}function S(L){var B=window.PlotlyGeoAssets||{},O=[];function G(N){return new Promise(function(H,W){t.json(N,function(U,V){if(U){delete B[N];var j=U.status===404?'GeoJSON at URL "'+N+'" does not exist.':"Unexpected error while fetching from "+N;return W(new Error(j))}return B[N]=V,H(V)})})}function $(N){return new Promise(function(H,W){var U=0,V=setInterval(function(){if(B[N]&&B[N]!=="pending")return clearInterval(V),H(B[N]);if(U>100)return clearInterval(V),W("Unexpected error while fetching from "+N);U++},50)})}for(var X=0;XD(F(L));function F(L){try{return l(L)}catch{return[]}}function D(L){if(L.length===0)return null;if(L.length===1){let[X,Z]=L[0];return[X,Z,X,Z]}let[[B,O],[G,$]]=n({type:"MultiPoint",coordinates:L});return[B,O,I([B,G])[1],$]}var R=(L,B)=>B.fitbounds==="geojson"&&L.locationmode==="geojson-id",P=(L,B)=>R(L,B)?F(k(L)):[],z=(L,B)=>D(P(L,B));function I([L,B]){return[L,L>B?B+M:B]}r.exports={locationToFeature:E,feature2polygons:w,getTraceGeojson:k,extractTraceFeature:T,fetchTraceGeoData:S,boundsOfCoords:D,computeBbox:A,coordsOf:F,doesCrossAntiMeridian:C,fitGeojsonBbox:z,fitGeojsonCoords:P,unwrapLonRange:I,ANTIMERIDIAN_LON_SHIFT:M}}}),kP=ye({"src/traces/scattergeo/style.js"(e,r){"use strict";var t=ai(),a=$i(),i=Ya(),o=Of(),s=o.stylePoints,l=o.styleText;r.exports=function(c,f){f&&n(c,f)};function n(u,c){var f=c[0].trace,h=c[0].node3;h.style("opacity",c[0].trace.opacity),s(h,f,u),l(h,f,u),h.selectAll("path.js-line").style("fill","none").each(function(d){var p=t.select(this),g=d.trace,m=g.line||{};p.call(i.stroke,m.color).call(a.dashLine,m.dash||"",m.width||0),g.fill!=="none"&&p.call(i.fill,g.fillcolor)})}}}),bM=ye({"src/traces/scattergeo/plot.js"(e,r){"use strict";var t=ai(),a=Yt(),i=gM().getTopojsonFeatures,o=Ob(),s=_0(),l=tp().findExtremes,n=Vn().BADNUM,u=Dd().calcMarkerSize,c=ms(),f=kP();function h(g,m,y){var _=m.layers.frontplot.select(".scatterlayer"),v=a.makeTraceGroups(_,y,"trace scattergeo");function x(E,M){E.lonlat[0]===n&&t.select(M).remove()}v.selectAll("*").remove(),v.each(function(E){var M=t.select(this),C=E[0].trace;if(c.hasLines(C)||C.fill!=="none"){var w=o.calcTraceToLineCoords(E),k=C.fill!=="none"?o.makePolygon(w):o.makeLine(w);M.selectAll("path.js-line").data([{geojson:k,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}c.hasMarkers(C)&&M.selectAll("path.point").data(a.identity).enter().append("path").classed("point",!0).each(function(T){x(T,this)}),c.hasText(C)&&M.selectAll("g").data(a.identity).enter().append("g").append("text").each(function(T){x(T,this)}),f(g,E)})}function d(g,m){var y=g[0].trace,_=m[y.geo],v=_._subplot,x=y._length,E,M;if(a.isArrayOrTypedArray(y.locations)){var C=y.locationmode,w=C==="geojson-id"?s.extractTraceFeature(g):i(y,v.topojson);for(E=0;E")}}}),Tse=ye({"src/traces/scattergeo/event_data.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){a.lon=i.lon,a.lat=i.lat,a.location=i.loc?i.loc:null;var n=s[l];return n.fIn&&n.fIn.properties&&(a.properties=n.fIn.properties),a}}}),Mse=ye({"src/traces/scattergeo/select.js"(e,r){"use strict";var t=ms(),a=Vn().BADNUM;r.exports=function(o,s){var l=o.cd,n=o.xaxis,u=o.yaxis,c=[],f=l[0].trace,h,d,p,g,m,y=!t.hasMarkers(f)&&!t.hasText(f);if(y)return[];if(s===!1)for(m=0;mU?1:W>=U?0:NaN}function i(W){return W.length===1&&(W=o(W)),{left:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)<0?j=Y+1:q=Y}return j},right:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)>0?q=Y:j=Y+1}return j}}}function o(W){return function(U,V){return a(W(U),V)}}var s=i(a),l=s.right,n=s.left;function u(W,U){U==null&&(U=c);for(var V=0,j=W.length-1,q=W[0],Y=new Array(j<0?0:j);VW?1:U>=W?0:NaN}function d(W){return W===null?NaN:+W}function p(W,U){var V=W.length,j=0,q=-1,Y=0,K,re,se=0;if(U==null)for(;++q1)return se/(j-1)}function g(W,U){var V=p(W,U);return V&&Math.sqrt(V)}function m(W,U){var V=W.length,j=-1,q,Y,K;if(U==null){for(;++j=q)for(Y=K=q;++jq&&(Y=q),K=q)for(Y=K=q;++jq&&(Y=q),K0)return[W];if((j=U0)for(W=Math.ceil(W/re),U=Math.floor(U/re),K=new Array(Y=Math.ceil(U-W+1));++q=0?(Y>=C?10:Y>=w?5:Y>=k?2:1)*Math.pow(10,q):-Math.pow(10,-q)/(Y>=C?10:Y>=w?5:Y>=k?2:1)}function S(W,U,V){var j=Math.abs(U-W)/Math.max(0,V),q=Math.pow(10,Math.floor(Math.log(j)/Math.LN10)),Y=j/q;return Y>=C?q*=10:Y>=w?q*=5:Y>=k&&(q*=2),Ufe;)pe.pop(),--we;var xe=new Array(we+1),he;for(Y=0;Y<=we;++Y)he=xe[Y]=[],he.x0=Y>0?pe[Y-1]:ue,he.x1=Y=1)return+V(W[j-1],j-1,W);var j,q=(j-1)*U,Y=Math.floor(q),K=+V(W[Y],Y,W),re=+V(W[Y+1],Y+1,W);return K+(re-K)*(q-Y)}}function R(W,U,V){return W=v.call(W,d).sort(a),Math.ceil((V-U)/(2*(D(W,.75)-D(W,.25))*Math.pow(W.length,-1/3)))}function P(W,U,V){return Math.ceil((V-U)/(3.5*g(W)*Math.pow(W.length,-1/3)))}function z(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jY&&(Y=q)}else for(;++j=q)for(Y=q;++jY&&(Y=q);return Y}function I(W,U){var V=W.length,j=V,q=-1,Y,K=0;if(U==null)for(;++q=0;)for(K=W[U],V=K.length;--V>=0;)Y[--q]=K[V];return Y}function O(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jq&&(Y=q)}else for(;++j=q)for(Y=q;++jq&&(Y=q);return Y}function G(W,U){for(var V=U.length,j=new Array(V);V--;)j[V]=W[U[V]];return j}function $(W,U){if(V=W.length){var V,j=0,q=0,Y,K=W[q];for(U==null&&(U=a);++j0?1:ke<0?-1:0},y=Math.sin,_=Math.tan,v=1e-6,x=1e-12,E=Math.PI,M=E/2,C=E/4,w=Math.SQRT1_2,k=P(2),T=P(E),b=E*2,S=180/E,A=E/180;function F(ke){return ke?ke/Math.sin(ke):1}function D(ke){return ke>1?M:ke<-1?-M:Math.asin(ke)}function R(ke){return ke>1?0:ke<-1?E:Math.acos(ke)}function P(ke){return ke>0?Math.sqrt(ke):0}function z(ke){return ke=u(2*ke),(ke-1)/(ke+1)}function I(ke){return(u(ke)-u(-ke))/2}function L(ke){return(u(ke)+u(-ke))/2}function B(ke){return f(ke+P(ke*ke+1))}function O(ke){return f(ke+P(ke*ke-1))}function G(ke){var Re=_(ke/2),He=2*f(n(ke/2))/(Re*Re);function $e(ot,nt){var ht=n(ot),Ut=n(nt),Xt=y(nt),Nt=Ut*ht,Zt=-((1-Nt?f((1+Nt)/2)/(1-Nt):-.5)+He/(1+Nt));return[Zt*Ut*y(ot),Zt*Xt]}return $e.invert=function(ot,nt){var ht=P(ot*ot+nt*nt),Ut=-ke/2,Xt=50,Nt;if(!ht)return[0,0];do{var Zt=Ut/2,or=n(Zt),gr=y(Zt),Er=gr/or,Br=-f(o(or));Ut-=Nt=(2/Er*Br-He*Er-ht)/(-Br/(gr*gr)+1-He/(2*or*or))*(or<0?.7:1)}while(o(Nt)>v&&--Xt>0);var oa=y(Ut);return[l(ot*oa,ht*n(Ut)),D(nt*oa/ht)]},$e}function $(){var ke=M,Re=a.geoProjectionMutator(G),He=Re(ke);return He.radius=function($e){return arguments.length?Re(ke=$e*A):ke*S},He.scale(179.976).clipAngle(147)}function X(ke,Re){var He=n(Re),$e=F(R(He*n(ke/=2)));return[2*He*y(ke)*$e,y(Re)*$e]}X.invert=function(ke,Re){if(!(ke*ke+4*Re*Re>E*E+v)){var He=ke,$e=Re,ot=25;do{var nt=y(He),ht=y(He/2),Ut=n(He/2),Xt=y($e),Nt=n($e),Zt=y(2*$e),or=Xt*Xt,gr=Nt*Nt,Er=ht*ht,Br=1-gr*Ut*Ut,oa=Br?R(Nt*Ut)*P(Ma=1/Br):Ma=0,Ma,si=2*oa*Nt*ht-ke,Wi=oa*Xt-Re,Qi=Ma*(gr*Er+oa*Nt*Ut*or),on=Ma*(.5*nt*Zt-oa*2*Xt*ht),yn=Ma*.25*(Zt*ht-oa*Xt*gr*nt),_o=Ma*(or*Ut+oa*Er*Nt),Io=on*yn-_o*Qi;if(!Io)break;var Pn=(Wi*on-si*_o)/Io,es=(si*yn-Wi*Qi)/Io;He-=Pn,$e-=es}while((o(Pn)>v||o(es)>v)&&--ot>0);return[He,$e]}};function Z(){return a.geoProjection(X).scale(152.63)}function J(ke){var Re=y(ke),He=n(ke),$e=ke>=0?1:-1,ot=_($e*ke),nt=(1+Re-He)/2;function ht(Ut,Xt){var Nt=n(Xt),Zt=n(Ut/=2);return[(1+Nt)*y(Ut),($e*Xt>-l(Zt,ot)-.001?0:-$e*10)+nt+y(Xt)*He-(1+Nt)*Re*Zt]}return ht.invert=function(Ut,Xt){var Nt=0,Zt=0,or=50;do{var gr=n(Nt),Er=y(Nt),Br=n(Zt),oa=y(Zt),Ma=1+Br,si=Ma*Er-Ut,Wi=nt+oa*He-Ma*Re*gr-Xt,Qi=Ma*gr/2,on=-Er*oa,yn=Re*Ma*Er/2,_o=He*Br+Re*gr*oa,Io=on*yn-_o*Qi,Pn=(Wi*on-si*_o)/Io/2,es=(si*yn-Wi*Qi)/Io;o(es)>2&&(es/=2),Nt-=Pn,Zt-=es}while((o(Pn)>v||o(es)>v)&&--or>0);return $e*Zt>-l(n(Nt),ot)-.001?[Nt*2,Zt]:null},ht}function N(){var ke=20*A,Re=ke>=0?1:-1,He=_(Re*ke),$e=a.geoProjectionMutator(J),ot=$e(ke),nt=ot.stream;return ot.parallel=function(ht){return arguments.length?(He=_((Re=(ke=ht*A)>=0?1:-1)*ke),$e(ke)):ke*S},ot.stream=function(ht){var Ut=ot.rotate(),Xt=nt(ht),Nt=(ot.rotate([0,0]),nt(ht)),Zt=ot.precision();return ot.rotate(Ut),Xt.sphere=function(){Nt.polygonStart(),Nt.lineStart();for(var or=Re*-180;Re*or<180;or+=Re*90)Nt.point(or,Re*90);if(ke)for(;Re*(or-=3*Re*Zt)>=-180;)Nt.point(or,Re*-l(n(or*A/2),He)*S);Nt.lineEnd(),Nt.polygonEnd()},Xt},ot.scale(218.695).center([0,28.0974])}function H(ke,Re){var He=_(Re/2),$e=P(1-He*He),ot=1+$e*n(ke/=2),nt=y(ke)*$e/ot,ht=He/ot,Ut=nt*nt,Xt=ht*ht;return[4/3*nt*(3+Ut-3*Xt),4/3*ht*(3+3*Ut-Xt)]}H.invert=function(ke,Re){if(ke*=3/8,Re*=3/8,!ke&&o(Re)>1)return null;var He=ke*ke,$e=Re*Re,ot=1+He+$e,nt=P((ot-P(ot*ot-4*Re*Re))/2),ht=D(nt)/3,Ut=nt?O(o(Re/nt))/3:B(o(ke))/3,Xt=n(ht),Nt=L(Ut),Zt=Nt*Nt-Xt*Xt;return[m(ke)*2*l(I(Ut)*Xt,.25-Zt),m(Re)*2*l(Nt*y(ht),.25+Zt)]};function W(){return a.geoProjection(H).scale(66.1603)}var U=P(8),V=f(1+k);function j(ke,Re){var He=o(Re);return Hex&&--$e>0);return[ke/(n(He)*(U-1/y(He))),m(Re)*He]};function q(){return a.geoProjection(j).scale(112.314)}function Y(ke){var Re=2*E/ke;function He($e,ot){var nt=a.geoAzimuthalEquidistantRaw($e,ot);if(o($e)>M){var ht=l(nt[1],nt[0]),Ut=P(nt[0]*nt[0]+nt[1]*nt[1]),Xt=Re*g((ht-M)/Re)+M,Nt=l(y(ht-=Xt),2-n(ht));ht=Xt+D(E/Ut*y(Nt))-Nt,nt[0]=Ut*n(ht),nt[1]=Ut*y(ht)}return nt}return He.invert=function($e,ot){var nt=P($e*$e+ot*ot);if(nt>M){var ht=l(ot,$e),Ut=Re*g((ht-M)/Re)+M,Xt=ht>Ut?-1:1,Nt=nt*n(Ut-ht),Zt=1/_(Xt*R((Nt-E)/P(E*(E-2*Nt)+nt*nt)));ht=Ut+2*s((Zt+Xt*P(Zt*Zt-3))/3),$e=nt*n(ht),ot=nt*y(ht)}return a.geoAzimuthalEquidistantRaw.invert($e,ot)},He}function K(){var ke=5,Re=a.geoProjectionMutator(Y),He=Re(ke),$e=He.stream,ot=.01,nt=-n(ot*A),ht=y(ot*A);return He.lobes=function(Ut){return arguments.length?Re(ke=+Ut):ke},He.stream=function(Ut){var Xt=He.rotate(),Nt=$e(Ut),Zt=(He.rotate([0,0]),$e(Ut));return He.rotate(Xt),Nt.sphere=function(){Zt.polygonStart(),Zt.lineStart();for(var or=0,gr=360/ke,Er=2*E/ke,Br=90-180/ke,oa=M;or0&&o(ot)>v);return $e<0?NaN:He}function fe(ke,Re,He){return Re===void 0&&(Re=40),He===void 0&&(He=x),function($e,ot,nt,ht){var Ut,Xt,Nt;nt=nt===void 0?0:+nt,ht=ht===void 0?0:+ht;for(var Zt=0;ZtUt){nt-=Xt/=2,ht-=Nt/=2;continue}Ut=Br;var oa=(nt>0?-1:1)*He,Ma=(ht>0?-1:1)*He,si=ke(nt+oa,ht),Wi=ke(nt,ht+Ma),Qi=(si[0]-or[0])/oa,on=(si[1]-or[1])/oa,yn=(Wi[0]-or[0])/Ma,_o=(Wi[1]-or[1])/Ma,Io=_o*Qi-on*yn,Pn=(o(Io)<.5?.5:1)/Io;if(Xt=(Er*yn-gr*_o)*Pn,Nt=(gr*on-Er*Qi)*Pn,nt+=Xt,ht+=Nt,o(Xt)0&&(Ut[1]*=1+Xt/1.5*Ut[0]*Ut[0]),Ut}return $e.invert=fe($e),$e}function we(){return a.geoProjection(pe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function xe(ke,Re){var He=ke*y(Re),$e=30,ot;do Re-=ot=(Re+y(Re)-He)/(1+n(Re));while(o(ot)>v&&--$e>0);return Re/2}function he(ke,Re,He){function $e(ot,nt){return[ke*ot*n(nt=xe(He,nt)),Re*y(nt)]}return $e.invert=function(ot,nt){return nt=D(nt/Re),[ot/(ke*n(nt)),D((2*nt+y(2*nt))/He)]},$e}var oe=he(k/M,k,E);function te(){return a.geoProjection(oe).scale(169.529)}var ie=2.00276,ee=1.11072;function ce(ke,Re){var He=xe(E,Re);return[ie*ke/(1/n(Re)+ee/n(He)),(Re+k*y(He))/ie]}ce.invert=function(ke,Re){var He=ie*Re,$e=Re<0?-C:C,ot=25,nt,ht;do ht=He-k*y($e),$e-=nt=(y(2*$e)+2*$e-E*y(ht))/(2*n(2*$e)+2+E*n(ht)*k*n($e));while(o(nt)>v&&--ot>0);return ht=He-k*y($e),[ke*(1/n(ht)+ee/n($e))/ie,ht]};function _e(){return a.geoProjection(ce).scale(160.857)}function Se(ke){var Re=0,He=a.geoProjectionMutator(ke),$e=He(Re);return $e.parallel=function(ot){return arguments.length?He(Re=ot*A):Re*S},$e}function Me(ke,Re){return[ke*n(Re),Re]}Me.invert=function(ke,Re){return[ke/n(Re),Re]};function Ue(){return a.geoProjection(Me).scale(152.63)}function Ge(ke){if(!ke)return Me;var Re=1/_(ke);function He($e,ot){var nt=Re+ke-ot,ht=nt&&$e*n(ot)/nt;return[nt*y(ht),Re-nt*n(ht)]}return He.invert=function($e,ot){var nt=P($e*$e+(ot=Re-ot)*ot),ht=Re+ke-nt;return[nt/n(ht)*l($e,ot),ht]},He}function Ze(){return Se(Ge).scale(123.082).center([0,26.1441]).parallel(45)}function Ke(ke){function Re(He,$e){var ot=M-$e,nt=ot&&He*ke*y(ot)/ot;return[ot*y(nt)/ke,M-ot*n(nt)]}return Re.invert=function(He,$e){var ot=He*ke,nt=M-$e,ht=P(ot*ot+nt*nt),Ut=l(ot,nt);return[(ht?ht/y(ht):1)*Ut/ke,M-ht]},Re}function dt(){var ke=.5,Re=a.geoProjectionMutator(Ke),He=Re(ke);return He.fraction=function($e){return arguments.length?Re(ke=+$e):ke},He.scale(158.837)}var _t=he(1,4/E,E);function Pt(){return a.geoProjection(_t).scale(152.63)}function pt(ke,Re,He,$e,ot,nt){var ht=n(nt),Ut;if(o(ke)>1||o(nt)>1)Ut=R(He*ot+Re*$e*ht);else{var Xt=y(ke/2),Nt=y(nt/2);Ut=2*D(P(Xt*Xt+Re*$e*Nt*Nt))}return o(Ut)>v?[Ut,l($e*y(nt),Re*ot-He*$e*ht)]:[0,0]}function Tt(ke,Re,He){return R((ke*ke+Re*Re-He*He)/(2*ke*Re))}function st(ke){return ke-2*E*c((ke+E)/(2*E))}function Ve(ke,Re,He){for(var $e=[[ke[0],ke[1],y(ke[1]),n(ke[1])],[Re[0],Re[1],y(Re[1]),n(Re[1])],[He[0],He[1],y(He[1]),n(He[1])]],ot=$e[2],nt,ht=0;ht<3;++ht,ot=nt)nt=$e[ht],ot.v=pt(nt[1]-ot[1],ot[3],ot[2],nt[3],nt[2],nt[0]-ot[0]),ot.point=[0,0];var Ut=Tt($e[0].v[0],$e[2].v[0],$e[1].v[0]),Xt=Tt($e[0].v[0],$e[1].v[0],$e[2].v[0]),Nt=E-Ut;$e[2].point[1]=0,$e[0].point[0]=-($e[1].point[0]=$e[0].v[0]/2);var Zt=[$e[2].point[0]=$e[0].point[0]+$e[2].v[0]*n(Ut),2*($e[0].point[1]=$e[1].point[1]=$e[2].v[0]*y(Ut))];function or(gr,Er){var Br=y(Er),oa=n(Er),Ma=new Array(3),si;for(si=0;si<3;++si){var Wi=$e[si];if(Ma[si]=pt(Er-Wi[1],Wi[3],Wi[2],oa,Br,gr-Wi[0]),!Ma[si][0])return Wi.point;Ma[si][1]=st(Ma[si][1]-Wi.v[1])}var Qi=Zt.slice();for(si=0;si<3;++si){var on=si==2?0:si+1,yn=Tt($e[si].v[0],Ma[si][0],Ma[on][0]);Ma[si][1]<0&&(yn=-yn),si?si==1?(yn=Xt-yn,Qi[0]-=Ma[si][0]*n(yn),Qi[1]-=Ma[si][0]*y(yn)):(yn=Nt-yn,Qi[0]+=Ma[si][0]*n(yn),Qi[1]+=Ma[si][0]*y(yn)):(Qi[0]+=Ma[si][0]*n(yn),Qi[1]-=Ma[si][0]*y(yn))}return Qi[0]/=3,Qi[1]/=3,Qi}return or}function Ye(ke){return ke[0]*=A,ke[1]*=A,ke}function me(){return be([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function be(ke,Re,He){var $e=a.geoCentroid({type:"MultiPoint",coordinates:[ke,Re,He]}),ot=[-$e[0],-$e[1]],nt=a.geoRotation(ot),ht=Ve(Ye(nt(ke)),Ye(nt(Re)),Ye(nt(He)));ht.invert=fe(ht);var Ut=a.geoProjection(ht).rotate(ot),Xt=Ut.center;return delete Ut.rotate,Ut.center=function(Nt){return arguments.length?Xt(nt(Nt)):nt.invert(Xt())},Ut.clipAngle(90)}function Ee(ke,Re){var He=P(1-y(Re));return[2/T*ke*He,T*(1-He)]}Ee.invert=function(ke,Re){var He=(He=Re/T-1)*He;return[He>0?ke*P(E/He)/2:0,D(1-He)]};function De(){return a.geoProjection(Ee).scale(95.6464).center([0,30])}function Ce(ke){var Re=_(ke);function He($e,ot){return[$e,($e?$e/y($e):1)*(y(ot)*n($e)-Re*n(ot))]}return He.invert=Re?function($e,ot){$e&&(ot*=y($e)/$e);var nt=n($e);return[$e,2*l(P(nt*nt+Re*Re-ot*ot)-nt,Re-ot)]}:function($e,ot){return[$e,D($e?ot*_($e)/$e:ot)]},He}function Fe(){return Se(Ce).scale(249.828).clipAngle(90)}var Je=P(3);function qe(ke,Re){return[Je*ke*(2*n(2*Re/3)-1)/T,Je*T*y(Re/3)]}qe.invert=function(ke,Re){var He=3*D(Re/(Je*T));return[T*ke/(Je*(2*n(2*He/3)-1)),He]};function at(){return a.geoProjection(qe).scale(156.19)}function tt(ke){var Re=n(ke);function He($e,ot){return[$e*Re,y(ot)/Re]}return He.invert=function($e,ot){return[$e/Re,D(ot*Re)]},He}function ct(){return Se(tt).parallel(38.58).scale(195.044)}function At(ke){var Re=n(ke);function He($e,ot){return[$e*Re,(1+Re)*_(ot/2)]}return He.invert=function($e,ot){return[$e/Re,s(ot/(1+Re))*2]},He}function ft(){return Se(At).scale(124.75)}function qt(ke,Re){var He=P(8/(3*E));return[He*ke*(1-o(Re)/E),He*Re]}qt.invert=function(ke,Re){var He=P(8/(3*E)),$e=Re/He;return[ke/(He*(1-o($e)/E)),$e]};function ar(){return a.geoProjection(qt).scale(165.664)}function vt(ke,Re){var He=P(4-3*y(o(Re)));return[2/P(6*E)*ke*He,m(Re)*P(2*E/3)*(2-He)]}vt.invert=function(ke,Re){var He=2-o(Re)/P(2*E/3);return[ke*P(6*E)/(2*He),m(Re)*D((4-He*He)/3)]};function gt(){return a.geoProjection(vt).scale(165.664)}function St(ke,Re){var He=P(E*(4+E));return[2/He*ke*(1+P(1-4*Re*Re/(E*E))),4/He*Re]}St.invert=function(ke,Re){var He=P(E*(4+E))/2;return[ke*He/(1+P(1-Re*Re*(4+E)/(4*E))),Re*He/2]};function Dt(){return a.geoProjection(St).scale(180.739)}function kt(ke,Re){var He=(2+M)*y(Re);Re/=2;for(var $e=0,ot=1/0;$e<10&&o(ot)>v;$e++){var nt=n(Re);Re-=ot=(Re+y(Re)*(nt+2)-He)/(2*nt*(1+nt))}return[2/P(E*(4+E))*ke*(1+n(Re)),2*P(E/(4+E))*y(Re)]}kt.invert=function(ke,Re){var He=Re*P((4+E)/E)/2,$e=D(He),ot=n($e);return[ke/(2/P(E*(4+E))*(1+ot)),D(($e+He*(ot+2))/(2+M))]};function Vt(){return a.geoProjection(kt).scale(180.739)}function lr(ke,Re){return[ke*(1+n(Re))/P(2+E),2*Re/P(2+E)]}lr.invert=function(ke,Re){var He=P(2+E),$e=Re*He/2;return[He*ke/(1+n($e)),$e]};function dr(){return a.geoProjection(lr).scale(173.044)}function yr(ke,Re){for(var He=(1+M)*y(Re),$e=0,ot=1/0;$e<10&&o(ot)>v;$e++)Re-=ot=(Re+y(Re)-He)/(1+n(Re));return He=P(2+E),[ke*(1+n(Re))/He,2*Re/He]}yr.invert=function(ke,Re){var He=1+M,$e=P(He/2);return[ke*2*$e/(1+n(Re*=$e)),D((Re+y(Re))/He)]};function vr(){return a.geoProjection(yr).scale(173.044)}var Fr=3+2*k;function la(ke,Re){var He=y(ke/=2),$e=n(ke),ot=P(n(Re)),nt=n(Re/=2),ht=y(Re)/(nt+k*$e*ot),Ut=P(2/(1+ht*ht)),Xt=P((k*nt+($e+He)*ot)/(k*nt+($e-He)*ot));return[Fr*(Ut*(Xt-1/Xt)-2*f(Xt)),Fr*(Ut*ht*(Xt+1/Xt)-2*s(ht))]}la.invert=function(ke,Re){if(!(nt=H.invert(ke/1.2,Re*1.065)))return null;var He=nt[0],$e=nt[1],ot=20,nt;ke/=Fr,Re/=Fr;do{var ht=He/2,Ut=$e/2,Xt=y(ht),Nt=n(ht),Zt=y(Ut),or=n(Ut),gr=n($e),Er=P(gr),Br=Zt/(or+k*Nt*Er),oa=Br*Br,Ma=P(2/(1+oa)),si=k*or+(Nt+Xt)*Er,Wi=k*or+(Nt-Xt)*Er,Qi=si/Wi,on=P(Qi),yn=on-1/on,_o=on+1/on,Io=Ma*yn-2*f(on)-ke,Pn=Ma*Br*_o-2*s(Br)-Re,es=Zt&&w*Er*Xt*oa/Zt,ll=(k*Nt*or+Er)/(2*(or+k*Nt*Er)*(or+k*Nt*Er)*Er),Dl=-.5*Br*Ma*Ma*Ma,lc=Dl*es,sf=Dl*ll,_l=(_l=2*or+k*Er*(Nt-Xt))*_l*on,xl=(k*Nt*or*Er+gr)/_l,Ou=-(k*Xt*Zt)/(Er*_l),Fc=yn*lc-2*xl/on+Ma*(xl+xl/Qi),Pc=yn*sf-2*Ou/on+Ma*(Ou+Ou/Qi),Ic=Br*_o*lc-2*es/(1+oa)+Ma*_o*es+Ma*Br*(xl-xl/Qi),lf=Br*_o*sf-2*ll/(1+oa)+Ma*_o*ll+Ma*Br*(Ou-Ou/Qi),uc=Pc*Ic-lf*Fc;if(!uc)break;var Pf=(Pn*Pc-Io*lf)/uc,Rh=(Io*Ic-Pn*Fc)/uc;He-=Pf,$e=h(-M,d(M,$e-Rh))}while((o(Pf)>v||o(Rh)>v)&&--ot>0);return o(o($e)-M)$e){var or=P(Zt),gr=l(Nt,Xt),Er=He*g(gr/He),Br=gr-Er,oa=ke*n(Br),Ma=(ke*y(Br)-Br*y(oa))/(M-oa),si=Nr(Br,Ma),Wi=(E-ke)/Oe(si,oa,E);Xt=or;var Qi=50,on;do Xt-=on=(ke+Oe(si,oa,Xt)*Wi-or)/(si(Xt)*Wi);while(o(on)>v&&--Qi>0);Nt=Br*y(Xt),Xt$e){var Xt=P(Ut),Nt=l(ht,nt),Zt=He*g(Nt/He),or=Nt-Zt;nt=Xt*n(or),ht=Xt*y(or);for(var gr=nt-M,Er=y(nt),Br=ht/Er,oa=ntv||o(Br)>v)&&--oa>0);return[or,gr]},Xt}var Mt=Et(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function zt(){return a.geoProjection(Mt).scale(149.995)}var Gt=Et(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Ht(){return a.geoProjection(Gt).scale(153.93)}var Be=Et(5/6*E,-.62636,-.0344,0,1.3493,-.05524,0,.045);function et(){return a.geoProjection(Be).scale(130.945)}function ut(ke,Re){var He=ke*ke,$e=Re*Re;return[ke*(1-.162388*$e)*(.87-952426e-9*He*He),Re*(1+$e/12)]}ut.invert=function(ke,Re){var He=ke,$e=Re,ot=50,nt;do{var ht=$e*$e;$e-=nt=($e*(1+ht/12)-Re)/(1+ht/4)}while(o(nt)>v&&--ot>0);ot=50,ke/=1-.162388*ht;do{var Ut=(Ut=He*He)*Ut;He-=nt=(He*(.87-952426e-9*Ut)-ke)/(.87-.00476213*Ut)}while(o(nt)>v&&--ot>0);return[He,$e]};function bt(){return a.geoProjection(ut).scale(131.747)}var Ot=Et(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function It(){return a.geoProjection(Ot).scale(131.087)}function Wt(ke){var Re=ke(M,0)[0]-ke(-M,0)[0];function He($e,ot){var nt=$e>0?-.5:.5,ht=ke($e+nt*E,ot);return ht[0]-=nt*Re,ht}return ke.invert&&(He.invert=function($e,ot){var nt=$e>0?-.5:.5,ht=ke.invert($e+nt*Re,ot),Ut=ht[0]-nt*E;return Ut<-E?Ut+=2*E:Ut>E&&(Ut-=2*E),ht[0]=Ut,ht}),He}function jt(ke,Re){var He=m(ke),$e=m(Re),ot=n(Re),nt=n(ke)*ot,ht=y(ke)*ot,Ut=y($e*Re);ke=o(l(ht,Ut)),Re=D(nt),o(ke-M)>v&&(ke%=M);var Xt=sr(ke>E/4?M-ke:ke,Re);return ke>E/4&&(Ut=Xt[0],Xt[0]=-Xt[1],Xt[1]=-Ut),Xt[0]*=He,Xt[1]*=-$e,Xt}jt.invert=function(ke,Re){o(ke)>1&&(ke=m(ke)*2-ke),o(Re)>1&&(Re=m(Re)*2-Re);var He=m(ke),$e=m(Re),ot=-He*ke,nt=-$e*Re,ht=nt/ot<1,Ut=kr(ht?nt:ot,ht?ot:nt),Xt=Ut[0],Nt=Ut[1],Zt=n(Nt);return ht&&(Xt=-M-Xt),[He*(l(y(Xt)*Zt,-y(Nt))+E),$e*D(n(Xt)*Zt)]};function sr(ke,Re){if(Re===M)return[0,0];var He=y(Re),$e=He*He,ot=$e*$e,nt=1+ot,ht=1+3*ot,Ut=1-ot,Xt=D(1/P(nt)),Nt=Ut+$e*nt*Xt,Zt=(1-He)/Nt,or=P(Zt),gr=Zt*nt,Er=P(gr),Br=or*Ut,oa,Ma;if(ke===0)return[0,-(Br+$e*Er)];var si=n(Re),Wi=1/si,Qi=2*He*si,on=(-3*$e+Xt*ht)*Qi,yn=(-Nt*si-(1-He)*on)/(Nt*Nt),_o=.5*yn/or,Io=Ut*_o-2*$e*or*Qi,Pn=$e*nt*yn+Zt*ht*Qi,es=-Wi*Qi,ll=-Wi*Pn,Dl=-2*Wi*Io,lc=4*ke/E,sf;if(ke>.222*E||Re.175*E){if(oa=(Br+$e*P(gr*(1+ot)-Br*Br))/(1+ot),ke>E/4)return[oa,oa];var _l=oa,xl=.5*oa;oa=.5*(xl+_l),Ma=50;do{var Ou=P(gr-oa*oa),Fc=oa*(Dl+es*Ou)+ll*D(oa/Er)-lc;if(!Fc)break;Fc<0?xl=oa:_l=oa,oa=.5*(xl+_l)}while(o(_l-xl)>v&&--Ma>0)}else{oa=v,Ma=25;do{var Pc=oa*oa,Ic=P(gr-Pc),lf=Dl+es*Ic,uc=oa*lf+ll*D(oa/Er)-lc,Pf=lf+(ll-es*Pc)/Ic;oa-=sf=Ic?uc/Pf:0}while(o(sf)>v&&--Ma>0)}return[oa,-Br-$e*P(gr-oa*oa)]}function kr(ke,Re){for(var He=0,$e=1,ot=.5,nt=50;;){var ht=ot*ot,Ut=P(ot),Xt=D(1/P(1+ht)),Nt=1-ht+ot*(1+ht)*Xt,Zt=(1-Ut)/Nt,or=P(Zt),gr=Zt*(1+ht),Er=or*(1-ht),Br=gr-ke*ke,oa=P(Br),Ma=Re+Er+ot*oa;if(o($e-He)0?He=ot:$e=ot,ot=.5*(He+$e)}if(!nt)return null;var si=D(Ut),Wi=n(si),Qi=1/Wi,on=2*Ut*Wi,yn=(-3*ot+Xt*(1+3*ht))*on,_o=(-Nt*Wi-(1-Ut)*yn)/(Nt*Nt),Io=.5*_o/or,Pn=(1-ht)*Io-2*ot*or*on,es=-2*Qi*Pn,ll=-Qi*on,Dl=-Qi*(ot*(1+ht)*_o+Zt*(1+3*ht)*on);return[E/4*(ke*(es+ll*oa)+Dl*D(ke/P(gr))),si]}function Mr(){return a.geoProjection(Wt(jt)).scale(239.75)}function ua(ke,Re,He){var $e,ot,nt;return ke?($e=ra(ke,He),Re?(ot=ra(Re,1-He),nt=ot[1]*ot[1]+He*$e[0]*$e[0]*ot[0]*ot[0],[[$e[0]*ot[2]/nt,$e[1]*$e[2]*ot[0]*ot[1]/nt],[$e[1]*ot[1]/nt,-$e[0]*$e[2]*ot[0]*ot[2]/nt],[$e[2]*ot[1]*ot[2]/nt,-He*$e[0]*$e[1]*ot[0]/nt]]):[[$e[0],0],[$e[1],0],[$e[2],0]]):(ot=ra(Re,1-He),[[0,ot[0]/ot[1]],[1/ot[1],0],[ot[2]/ot[1],0]])}function ra(ke,Re){var He,$e,ot,nt,ht;if(Re=1-v)return He=(1-Re)/4,$e=L(ke),nt=z(ke),ot=1/$e,ht=$e*I(ke),[nt+He*(ht-ke)/($e*$e),ot-He*nt*ot*(ht-ke),ot+He*nt*ot*(ht+ke),2*s(u(ke))-M+He*(ht-ke)/$e];var Ut=[1,0,0,0,0,0,0,0,0],Xt=[P(Re),0,0,0,0,0,0,0,0],Nt=0;for($e=P(1-Re),ht=1;o(Xt[Nt]/Ut[Nt])>v&&Nt<8;)He=Ut[Nt++],Xt[Nt]=(He-$e)/2,Ut[Nt]=(He+$e)/2,$e=P(He*$e),ht*=2;ot=ht*Ut[Nt]*ke;do nt=Xt[Nt]*y($e=ot)/Ut[Nt],ot=(D(nt)+ot)/2;while(--Nt);return[y(ot),nt=n(ot),nt/n(ot-$e),ot]}function ni(ke,Re,He){var $e=o(ke),ot=o(Re),nt=I(ot);if($e){var ht=1/y($e),Ut=1/(_($e)*_($e)),Xt=-(Ut+He*(nt*nt*ht*ht)-1+He),Nt=(He-1)*Ut,Zt=(-Xt+P(Xt*Xt-4*Nt))/2;return[Ca(s(1/P(Zt)),He)*m(ke),Ca(s(P((Zt/Ut-1)/He)),1-He)*m(Re)]}return[0,Ca(s(nt),1-He)*m(Re)]}function Ca(ke,Re){if(!Re)return ke;if(Re===1)return f(_(ke/2+C));for(var He=1,$e=P(1-Re),ot=P(Re),nt=0;o(ot)>v;nt++){if(ke%E){var ht=s($e*_(ke)/He);ht<0&&(ht+=E),ke+=ht+~~(ke/E)*E}else ke+=ke;ot=(He+$e)/2,$e=P(He*$e),ot=((He=ot)-$e)/2}return ke/(p(2,nt)*He)}function Li(ke,Re){var He=(k-1)/(k+1),$e=P(1-He*He),ot=Ca(M,$e*$e),nt=-1,ht=f(_(E/4+o(Re)/2)),Ut=u(nt*ht)/P(He),Xt=Va(Ut*n(nt*ke),Ut*y(nt*ke)),Nt=ni(Xt[0],Xt[1],$e*$e);return[-Nt[1],(Re>=0?1:-1)*(.5*ot-Nt[0])]}function Va(ke,Re){var He=ke*ke,$e=Re+1,ot=1-He-Re*Re;return[.5*((ke>=0?M:-M)-l(ot,2*ke)),-.25*f(ot*ot+4*He)+.5*f($e*$e+He)]}function dn(ke,Re){var He=Re[0]*Re[0]+Re[1]*Re[1];return[(ke[0]*Re[0]+ke[1]*Re[1])/He,(ke[1]*Re[0]-ke[0]*Re[1])/He]}Li.invert=function(ke,Re){var He=(k-1)/(k+1),$e=P(1-He*He),ot=Ca(M,$e*$e),nt=-1,ht=ua(.5*ot-Re,-ke,$e*$e),Ut=dn(ht[0],ht[1]),Xt=l(Ut[1],Ut[0])/nt;return[Xt,2*s(u(.5/nt*f(He*Ut[0]*Ut[0]+He*Ut[1]*Ut[1])))-M]};function rn(){return a.geoProjection(Wt(Li)).scale(151.496)}function pa(ke){var Re=y(ke),He=n(ke),$e=_n(ke);$e.invert=_n(-ke);function ot(nt,ht){var Ut=$e(nt,ht);nt=Ut[0],ht=Ut[1];var Xt=y(ht),Nt=n(ht),Zt=n(nt),or=R(Re*Xt+He*Nt*Zt),gr=y(or),Er=o(gr)>v?or/gr:1;return[Er*He*y(nt),(o(nt)>M?Er:-Er)*(Re*Nt-He*Xt*Zt)]}return ot.invert=function(nt,ht){var Ut=P(nt*nt+ht*ht),Xt=-y(Ut),Nt=n(Ut),Zt=Ut*Nt,or=-ht*Xt,gr=Ut*Re,Er=P(Zt*Zt+or*or-gr*gr),Br=l(Zt*gr+or*Er,or*gr-Zt*Er),oa=(Ut>M?-1:1)*l(nt*Xt,Ut*n(Br)*Nt+ht*y(Br)*Xt);return $e.invert(oa,Br)},ot}function _n(ke){var Re=y(ke),He=n(ke);return function($e,ot){var nt=n(ot),ht=n($e)*nt,Ut=y($e)*nt,Xt=y(ot);return[l(Ut,ht*He-Xt*Re),D(Xt*He+ht*Re)]}}function Zi(){var ke=0,Re=a.geoProjectionMutator(pa),He=Re(ke),$e=He.rotate,ot=He.stream,nt=a.geoCircle();return He.parallel=function(ht){if(!arguments.length)return ke*S;var Ut=He.rotate();return Re(ke=ht*A).rotate(Ut)},He.rotate=function(ht){return arguments.length?($e.call(He,[ht[0],ht[1]-ke*S]),nt.center([-ht[0],-ht[1]]),He):(ht=$e.call(He),ht[1]+=ke*S,ht)},He.stream=function(ht){return ht=ot(ht),ht.sphere=function(){ht.polygonStart();var Ut=.01,Xt=nt.radius(90-Ut)().coordinates[0],Nt=Xt.length-1,Zt=-1,or;for(ht.lineStart();++Zt=0;)ht.point((or=Xt[Zt])[0],or[1]);ht.lineEnd(),ht.polygonEnd()},ht},He.scale(79.4187).parallel(45).clipAngle(180-.001)}var Fi=3,xn=D(1-1/Fi)*S,Ni=tt(0);function un(ke){var Re=xn*A,He=Ee(E,Re)[0]-Ee(-E,Re)[0],$e=Ni(0,Re)[1],ot=Ee(0,Re)[1],nt=T-ot,ht=b/ke,Ut=4/b,Xt=$e+nt*nt*4/b;function Nt(Zt,or){var gr,Er=o(or);if(Er>Re){var Br=d(ke-1,h(0,c((Zt+E)/ht)));Zt+=E*(ke-1)/ke-Br*ht,gr=Ee(Zt,Er),gr[0]=gr[0]*b/He-b*(ke-1)/(2*ke)+Br*b/ke,gr[1]=$e+(gr[1]-ot)*4*nt/b,or<0&&(gr[1]=-gr[1])}else gr=Ni(Zt,or);return gr[0]*=Ut,gr[1]/=Xt,gr}return Nt.invert=function(Zt,or){Zt/=Ut,or*=Xt;var gr=o(or);if(gr>$e){var Er=d(ke-1,h(0,c((Zt+E)/ht)));Zt=(Zt+E*(ke-1)/ke-Er*ht)*He/b;var Br=Ee.invert(Zt,.25*(gr-$e)*b/nt+ot);return Br[0]-=E*(ke-1)/ke-Er*ht,or<0&&(Br[1]=-Br[1]),Br}return Ni.invert(Zt,or)},Nt}function jn(ke,Re){return[ke,Re&1?90-v:xn]}function bn(ke,Re){return[ke,Re&1?-90+v:-xn]}function Wa(ke){return[ke[0]*(1-v),ke[1]]}function ui(ke){var Re=[].concat(i.range(-180,180+ke/2,ke).map(jn),i.range(180,-180-ke/2,-ke).map(bn));return{type:"Polygon",coordinates:[ke===180?Re.map(Wa):Re]}}function Hi(){var ke=4,Re=a.geoProjectionMutator(un),He=Re(ke),$e=He.stream;return He.lobes=function(ot){return arguments.length?Re(ke=+ot):ke},He.stream=function(ot){var nt=He.rotate(),ht=$e(ot),Ut=(He.rotate([0,0]),$e(ot));return He.rotate(nt),ht.sphere=function(){a.geoStream(ui(180/ke),Ut)},ht},He.scale(239.75)}function Vi(ke){var Re=1+ke,He=y(1/Re),$e=D(He),ot=2*P(E/(nt=E+4*$e*Re)),nt,ht=.5*ot*(Re+P(ke*(2+ke))),Ut=ke*ke,Xt=Re*Re;function Nt(Zt,or){var gr=1-y(or),Er,Br;if(gr&&gr<2){var oa=M-or,Ma=25,si;do{var Wi=y(oa),Qi=n(oa),on=$e+l(Wi,Re-Qi),yn=1+Xt-2*Re*Qi;oa-=si=(oa-Ut*$e-Re*Wi+yn*on-.5*gr*nt)/(2*Re*Wi*on)}while(o(si)>x&&--Ma>0);Er=ot*P(yn),Br=Zt*on/E}else Er=ot*(ke+gr),Br=Zt*$e/E;return[Er*y(Br),ht-Er*n(Br)]}return Nt.invert=function(Zt,or){var gr=Zt*Zt+(or-=ht)*or,Er=(1+Xt-gr/(ot*ot))/(2*Re),Br=R(Er),oa=y(Br),Ma=$e+l(oa,Re-Er);return[D(Zt/P(gr))*E/Ma,D(1-2*(Br-Ut*$e-Re*oa+(1+Xt-2*Re*Er)*Ma)/nt)]},Nt}function $n(){var ke=1,Re=a.geoProjectionMutator(Vi),He=Re(ke);return He.ratio=function($e){return arguments.length?Re(ke=+$e):ke},He.scale(167.774).center([0,18.67])}var ro=.7109889596207567,Un=.0528035274542;function Kn(ke,Re){return Re>-ro?(ke=oe(ke,Re),ke[1]+=Un,ke):Me(ke,Re)}Kn.invert=function(ke,Re){return Re>-ro?oe.invert(ke,Re-Un):Me.invert(ke,Re)};function To(){return a.geoProjection(Kn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Jn(ke,Re){return o(Re)>ro?(ke=oe(ke,Re),ke[1]-=Re>0?Un:-Un,ke):Me(ke,Re)}Jn.invert=function(ke,Re){return o(Re)>ro?oe.invert(ke,Re+(Re>0?Un:-Un)):Me.invert(ke,Re)};function qn(){return a.geoProjection(Jn).scale(152.63)}function Fo(ke,Re,He,$e){var ot=P(4*E/(2*He+(1+ke-Re/2)*y(2*He)+(ke+Re)/2*y(4*He)+Re/2*y(6*He))),nt=P($e*y(He)*P((1+ke*n(2*He)+Re*n(4*He))/(1+ke+Re))),ht=He*Xt(1);function Ut(or){return P(1+ke*n(2*or)+Re*n(4*or))}function Xt(or){var gr=or*He;return(2*gr+(1+ke-Re/2)*y(2*gr)+(ke+Re)/2*y(4*gr)+Re/2*y(6*gr))/He}function Nt(or){return Ut(or)*y(or)}var Zt=function(or,gr){var Er=He*ue(Xt,ht*y(gr)/He,gr/E);isNaN(Er)&&(Er=He*m(gr));var Br=ot*Ut(Er);return[Br*nt*or/E*n(Er),Br/nt*y(Er)]};return Zt.invert=function(or,gr){var Er=ue(Nt,gr*nt/ot);return[or*E/(n(Er)*ot*nt*Ut(Er)),D(He*Xt(Er/He)/ht)]},He===0&&(ot=P($e/E),Zt=function(or,gr){return[or*ot,y(gr)/ot]},Zt.invert=function(or,gr){return[or/ot,D(gr*ot)]}),Zt}function zn(){var ke=1,Re=0,He=45*A,$e=2,ot=a.geoProjectionMutator(Fo),nt=ot(ke,Re,He,$e);return nt.a=function(ht){return arguments.length?ot(ke=+ht,Re,He,$e):ke},nt.b=function(ht){return arguments.length?ot(ke,Re=+ht,He,$e):Re},nt.psiMax=function(ht){return arguments.length?ot(ke,Re,He=+ht*A,$e):He*S},nt.ratio=function(ht){return arguments.length?ot(ke,Re,He,$e=+ht):$e},nt.scale(180.739)}function wn(ke,Re,He,$e,ot,nt,ht,Ut,Xt,Nt,Zt){if(Zt.nanEncountered)return NaN;var or,gr,Er,Br,oa,Ma,si,Wi,Qi,on;if(or=He-Re,gr=ke(Re+or*.25),Er=ke(He-or*.25),isNaN(gr)){Zt.nanEncountered=!0;return}if(isNaN(Er)){Zt.nanEncountered=!0;return}return Br=or*($e+4*gr+ot)/12,oa=or*(ot+4*Er+nt)/12,Ma=Br+oa,on=(Ma-ht)/15,Nt>Xt?(Zt.maxDepthCount++,Ma+on):Math.abs(on)>1;do Xt[Ma]>Er?oa=Ma:Br=Ma,Ma=Br+oa>>1;while(Ma>Br);var si=Xt[Ma+1]-Xt[Ma];return si&&(si=(Er-Xt[Ma+1])/si),(Ma+1+si)/ht}var or=2*Zt(1)/E*nt/He,gr=function(Er,Br){var oa=Zt(o(y(Br))),Ma=$e(oa)*Er;return oa/=or,[Ma,Br>=0?oa:-oa]};return gr.invert=function(Er,Br){var oa;return Br*=or,o(Br)<1&&(oa=m(Br)*D(ot(o(Br))*nt)),[Er/$e(o(Br)),oa]},gr}function Yn(){var ke=0,Re=2.5,He=1.183136,$e=a.geoProjectionMutator(uo),ot=$e(ke,Re,He);return ot.alpha=function(nt){return arguments.length?$e(ke=+nt,Re,He):ke},ot.k=function(nt){return arguments.length?$e(ke,Re=+nt,He):Re},ot.gamma=function(nt){return arguments.length?$e(ke,Re,He=+nt):He},ot.scale(152.63)}function go(ke,Re){return o(ke[0]-Re[0])=0;--Xt)He=ke[1][Xt],$e=He[0][0],ot=He[0][1],nt=He[1][1],ht=He[2][0],Ut=He[2][1],Re.push(Cn([[ht-v,Ut-v],[ht-v,nt+v],[$e+v,nt+v],[$e+v,ot-v]],30));return{type:"Polygon",coordinates:[i.merge(Re)]}}function gs(ke,Re,He){var $e,ot;function nt(Xt,Nt){for(var Zt=Nt<0?-1:1,or=Re[+(Nt<0)],gr=0,Er=or.length-1;gror[gr][2][0];++gr);var Br=ke(Xt-or[gr][1][0],Nt);return Br[0]+=ke(or[gr][1][0],Zt*Nt>Zt*or[gr][0][1]?or[gr][0][1]:Nt)[0],Br}He?nt.invert=He(nt):ke.invert&&(nt.invert=function(Xt,Nt){for(var Zt=ot[+(Nt<0)],or=Re[+(Nt<0)],gr=0,Er=Zt.length;grBr&&(oa=Er,Er=Br,Br=oa),[[or,Er],[gr,Br]]})}),ht):Re.map(function(Nt){return Nt.map(function(Zt){return[[Zt[0][0]*S,Zt[0][1]*S],[Zt[1][0]*S,Zt[1][1]*S],[Zt[2][0]*S,Zt[2][1]*S]]})})},Re!=null&&ht.lobes(Re),ht}var yo=[[[[-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 sl(){return gs(ce,yo).scale(160.857)}var ss=[[[[-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 oo(){return gs(Jn,ss).scale(152.63)}var Bn=[[[[-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 An(){return gs(oe,Bn).scale(169.529)}var Po=[[[[-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 Bl(){return gs(oe,Po).scale(169.529).rotate([20,0])}var Lu=[[[[-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 Jl(){return gs(Kn,Lu,fe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Fu=[[[[-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 Pu(){return gs(Me,Fu).scale(152.63).rotate([-20,0])}function Ku(ke,Re){return[3/b*ke*P(E*E/3-Re*Re),Re]}Ku.invert=function(ke,Re){return[b/3*ke/P(E*E/3-Re*Re),Re]};function mu(){return a.geoProjection(Ku).scale(158.837)}function $c(ke){function Re(He,$e){if(o(o($e)-M)2)return null;He/=2,$e/=2;var nt=He*He,ht=$e*$e,Ut=2*$e/(1+nt+ht);return Ut=p((1+Ut)/(1-Ut),1/ke),[l(2*He,1-nt-ht)/ke,D((Ut-1)/(Ut+1))]},Re}function Ju(){var ke=.5,Re=a.geoProjectionMutator($c),He=Re(ke);return He.spacing=function($e){return arguments.length?Re(ke=+$e):ke},He.scale(124.75)}var Ol=E/k;function Yc(ke,Re){return[ke*(1+P(n(Re)))/2,Re/(n(Re/2)*n(ke/6))]}Yc.invert=function(ke,Re){var He=o(ke),$e=o(Re),ot=v,nt=M;$ev||o(Ma)>v)&&--ot>0);return ot&&[He,$e]};function cs(){return a.geoProjection(Sl).scale(139.98)}function Qo(ke,Re){return[y(ke)/n(Re),_(Re)*n(ke)]}Qo.invert=function(ke,Re){var He=ke*ke,$e=Re*Re,ot=$e+1,nt=He+ot,ht=ke?w*P((nt-P(nt*nt-4*He))/He):1/P(ot);return[D(ke*ht),m(Re)*R(ht)]};function ml(){return a.geoProjection(Qo).scale(144.049).clipAngle(90-.001)}function Xc(ke){var Re=n(ke),He=_(C+ke/2);function $e(ot,nt){var ht=nt-ke,Ut=o(ht)=0;)Zt=ke[Nt],or=Zt[0]+Ut*(Er=or)-Xt*gr,gr=Zt[1]+Ut*gr+Xt*Er;return or=Ut*(Er=or)-Xt*gr,gr=Ut*gr+Xt*Er,[or,gr]}return He.invert=function($e,ot){var nt=20,ht=$e,Ut=ot;do{for(var Xt=Re,Nt=ke[Xt],Zt=Nt[0],or=Nt[1],gr=0,Er=0,Br;--Xt>=0;)Nt=ke[Xt],gr=Zt+ht*(Br=gr)-Ut*Er,Er=or+ht*Er+Ut*Br,Zt=Nt[0]+ht*(Br=Zt)-Ut*or,or=Nt[1]+ht*or+Ut*Br;gr=Zt+ht*(Br=gr)-Ut*Er,Er=or+ht*Er+Ut*Br,Zt=ht*(Br=Zt)-Ut*or-$e,or=ht*or+Ut*Br-ot;var oa=gr*gr+Er*Er,Ma,si;ht-=Ma=(Zt*gr+or*Er)/oa,Ut-=si=(or*gr-Zt*Er)/oa}while(o(Ma)+o(si)>v*v&&--nt>0);if(nt){var Wi=P(ht*ht+Ut*Ut),Qi=2*s(Wi*.5),on=y(Qi);return[l(ht*on,Wi*n(Qi)),Wi?D(Ut*on/Wi):0]}},He}var bp=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],t0=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],ec=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ys=[[.9245,0],[0,0],[.01943,0]],rd=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hf(){return tc(bp,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Kc(){return tc(t0,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function ad(){return tc(ec,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Jc(){return tc(ys,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Tf(){return tc(rd,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function tc(ke,Re){var He=a.geoProjection(td(ke)).rotate(Re).clipAngle(90),$e=a.geoRotation(Re),ot=He.center;return delete He.rotate,He.center=function(nt){return arguments.length?ot($e(nt)):$e.invert(ot())},He}var Wf=P(6),xh=P(7);function Qc(ke,Re){var He=D(7*y(Re)/(3*Wf));return[Wf*ke*(2*n(2*He/3)-1)/xh,9*y(He/3)/xh]}Qc.invert=function(ke,Re){var He=3*D(Re*xh/9);return[ke*xh/(Wf*(2*n(2*He/3)-1)),D(y(He)*3*Wf/7)]};function Wd(){return a.geoProjection(Qc).scale(164.859)}function bh(ke,Re){for(var He=(1+w)*y(Re),$e=Re,ot=0,nt;ot<25&&($e-=nt=(y($e/2)+y($e)-He)/(.5*n($e/2)+n($e)),!(o(nt)x&&--$e>0);return nt=He*He,ht=nt*nt,Ut=nt*ht,[ke/(.84719-.13063*nt+Ut*Ut*(-.04515+.05494*nt-.02326*ht+.00331*Ut)),He]};function wh(){return a.geoProjection(Iu).scale(175.295)}function Nl(ke,Re){return[ke*(1+n(Re))/2,2*(Re-_(Re/2))]}Nl.invert=function(ke,Re){for(var He=Re/2,$e=0,ot=1/0;$e<10&&o(ot)>v;++$e){var nt=n(Re/2);Re-=ot=(Re-_(Re/2)-He)/(1-.5/(nt*nt))}return[2*ke/(1+n(Re)),Re]};function $f(){return a.geoProjection(Nl).scale(152.63)}var ac=[[[[-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 Yf(){return gs(re(1/0),ac).rotate([20,0]).scale(152.63)}function Xf(ke,Re){var He=y(Re),$e=n(Re),ot=m(ke);if(ke===0||o(Re)===M)return[0,Re];if(Re===0)return[ke,0];if(o(ke)===M)return[ke*$e,M*He];var nt=E/(2*ke)-2*ke/E,ht=2*Re/E,Ut=(1-ht*ht)/(He-ht),Xt=nt*nt,Nt=Ut*Ut,Zt=1+Xt/Nt,or=1+Nt/Xt,gr=(nt*He/Ut-nt/2)/Zt,Er=(Nt*He/Xt+Ut/2)/or,Br=gr*gr+$e*$e/Zt,oa=Er*Er-(Nt*He*He/Xt+Ut*He-1)/or;return[M*(gr+P(Br)*ot),M*(Er+P(oa<0?0:oa)*m(-Re*nt)*ot)]}Xf.invert=function(ke,Re){ke/=M,Re/=M;var He=ke*ke,$e=Re*Re,ot=He+$e,nt=E*E;return[ke?(ot-1+P((1-ot)*(1-ot)+4*He))/(2*ke)*M:0,ue(function(ht){return ot*(E*y(ht)-2*ht)*E+4*ht*ht*(Re-y(ht))+2*E*ht-nt*Re},0)]};function Ah(){return a.geoProjection(Xf).scale(127.267)}var nd=1.0148,ef=.23185,od=-.14499,Cc=.02406,Ap=nd,kl=5*ef,Ru=7*od,tf=9*Cc,yl=1.790857183;function Th(ke,Re){var He=Re*Re;return[ke,Re*(nd+He*He*(ef+He*(od+Cc*He)))]}Th.invert=function(ke,Re){Re>yl?Re=yl:Re<-yl&&(Re=-yl);var He=Re,$e;do{var ot=He*He;He-=$e=(He*(nd+ot*ot*(ef+ot*(od+Cc*ot)))-Re)/(Ap+ot*ot*(kl+ot*(Ru+tf*ot)))}while(o($e)>v);return[ke,He]};function ic(){return a.geoProjection(Th).scale(139.319)}function rf(ke,Re){if(o(Re)v&&--ot>0);return ht=_($e),[(o(Re)=0;)if($e=Re[Ut],He[0]===$e[0]&&He[1]===$e[1]){if(nt)return[nt,He];nt=He}}}function Eh(ke){for(var Re=ke.length,He=[],$e=ke[Re-1],ot=0;ot0?[-$e[0],0]:[180-$e[0],180])};var Re=Ef.map(function(He){return{face:He,project:ke(He)}});return[-1,0,0,1,0,1,4,5].forEach(function(He,$e){var ot=Re[He];ot&&(ot.children||(ot.children=[])).push(Re[$e])}),Zf(Re[0],function(He,$e){return Re[He<-E/2?$e<0?6:4:He<0?$e<0?2:0:He$e^Er>$e&&He<(gr-Nt)*($e-Zt)/(Er-Zt)+Nt&&(ot=!ot)}return ot}function sd(ke,Re){var He=Re.stream,$e;if(!He)throw new Error("invalid projection");switch(ke&&ke.type){case"Feature":$e=Dh;break;case"FeatureCollection":$e=Sp;break;default:$e=ld;break}return $e(ke,He)}function Sp(ke,Re){return{type:"FeatureCollection",features:ke.features.map(function(He){return Dh(He,Re)})}}function Dh(ke,Re){return{type:"Feature",id:ke.id,properties:ke.properties,geometry:ld(ke.geometry,Re)}}function Kd(ke,Re){return{type:"GeometryCollection",geometries:ke.geometries.map(function(He){return ld(He,Re)})}}function ld(ke,Re){if(!ke)return null;if(ke.type==="GeometryCollection")return Kd(ke,Re);var He;switch(ke.type){case"Point":He=Lh;break;case"MultiPoint":He=Lh;break;case"LineString":He=ud;break;case"MultiLineString":He=ud;break;case"Polygon":He=Fh;break;case"MultiPolygon":He=Fh;break;case"Sphere":He=Fh;break;default:return null}return a.geoStream(ke,Re(He)),He.result()}var Ks=[],yu=[],Lh={point:function(ke,Re){Ks.push([ke,Re])},result:function(){var ke=Ks.length?Ks.length<2?{type:"Point",coordinates:Ks[0]}:{type:"MultiPoint",coordinates:Ks}:null;return Ks=[],ke}},ud={lineStart:Qf,point:function(ke,Re){Ks.push([ke,Re])},lineEnd:function(){Ks.length&&(yu.push(Ks),Ks=[])},result:function(){var ke=yu.length?yu.length<2?{type:"LineString",coordinates:yu[0]}:{type:"MultiLineString",coordinates:yu}:null;return yu=[],ke}},Fh={polygonStart:Qf,lineStart:Qf,point:function(ke,Re){Ks.push([ke,Re])},lineEnd:function(){var ke=Ks.length;if(ke){do Ks.push(Ks[0].slice());while(++ke<4);yu.push(Ks),Ks=[]}},polygonEnd:Qf,result:function(){if(!yu.length)return null;var ke=[],Re=[];return yu.forEach(function(He){Ch(He)?ke.push([He]):Re.push(He)}),Re.forEach(function(He){var $e=He[0];ke.some(function(ot){if(Zd(ot[0],$e))return ot.push(He),!0})||ke.push([He])}),yu=[],ke.length?ke.length>1?{type:"MultiPolygon",coordinates:ke}:{type:"Polygon",coordinates:ke[0]}:null}};function eh(ke){var Re=ke(M,0)[0]-ke(-M,0)[0];function He($e,ot){var nt=o($e)0?$e-E:$e+E,ot),Ut=(ht[0]-ht[1])*w,Xt=(ht[0]+ht[1])*w;if(nt)return[Ut,Xt];var Nt=Re*w,Zt=Ut>0^Xt>0?-1:1;return[Zt*Ut-m(Xt)*Nt,Zt*Xt-m(Ut)*Nt]}return ke.invert&&(He.invert=function($e,ot){var nt=($e+ot)*w,ht=(ot-$e)*w,Ut=o(nt)<.5*Re&&o(ht)<.5*Re;if(!Ut){var Xt=Re*w,Nt=nt>0^ht>0?-1:1,Zt=-Nt*$e+(ht>0?1:-1)*Xt,or=-Nt*ot+(nt>0?1:-1)*Xt;nt=(-Zt-or)*w,ht=(Zt-or)*w}var gr=ke.invert(nt,ht);return Ut||(gr[0]+=nt>0?E:-E),gr}),a.geoProjection(He).rotate([-90,-90,45]).clipAngle(180-.001)}function it(){return eh(jt).scale(176.423)}function wt(){return eh(Li).scale(111.48)}function $t(ke,Re){if(!(0<=(Re=+Re)&&Re<=20))throw new Error("invalid digits");function He(Nt){var Zt=Nt.length,or=2,gr=new Array(Zt);for(gr[0]=+Nt[0].toFixed(Re),gr[1]=+Nt[1].toFixed(Re);or2||Er[0]!=Zt[0]||Er[1]!=Zt[1])&&(or.push(Er),Zt=Er)}return or.length===1&&Nt.length>1&&or.push(He(Nt[Nt.length-1])),or}function nt(Nt){return Nt.map(ot)}function ht(Nt){if(Nt==null)return Nt;var Zt;switch(Nt.type){case"GeometryCollection":Zt={type:"GeometryCollection",geometries:Nt.geometries.map(ht)};break;case"Point":Zt={type:"Point",coordinates:He(Nt.coordinates)};break;case"MultiPoint":Zt={type:Nt.type,coordinates:$e(Nt.coordinates)};break;case"LineString":Zt={type:Nt.type,coordinates:ot(Nt.coordinates)};break;case"MultiLineString":case"Polygon":Zt={type:Nt.type,coordinates:nt(Nt.coordinates)};break;case"MultiPolygon":Zt={type:"MultiPolygon",coordinates:Nt.coordinates.map(nt)};break;default:return Nt}return Nt.bbox!=null&&(Zt.bbox=Nt.bbox),Zt}function Ut(Nt){var Zt={type:"Feature",properties:Nt.properties,geometry:ht(Nt.geometry)};return Nt.id!=null&&(Zt.id=Nt.id),Nt.bbox!=null&&(Zt.bbox=Nt.bbox),Zt}if(ke!=null)switch(ke.type){case"Feature":return Ut(ke);case"FeatureCollection":{var Xt={type:"FeatureCollection",features:ke.features.map(Ut)};return ke.bbox!=null&&(Xt.bbox=ke.bbox),Xt}default:return ht(ke)}return ke}function Bt(ke){var Re=y(ke);function He($e,ot){var nt=Re?_($e*Re/2)/Re:$e/2;if(!ot)return[2*nt,-ke];var ht=2*s(nt*y(ot)),Ut=1/_(ot);return[y(ht)*Ut,ot+(1-n(ht))*Ut-ke]}return He.invert=function($e,ot){if(o(ot+=ke)v&&--Ut>0);var gr=$e*(Nt=_(ht)),Er=_(o(ot)0?M:-M)*(Xt+ot*(Zt-ht)/2+ot*ot*(Zt-2*Xt+ht)/2)]}Pr.invert=function(ke,Re){var He=Re/M,$e=He*90,ot=d(18,o($e/5)),nt=h(0,c(ot));do{var ht=Sr[nt][1],Ut=Sr[nt+1][1],Xt=Sr[d(19,nt+2)][1],Nt=Xt-ht,Zt=Xt-2*Ut+ht,or=2*(o(He)-Ut)/Nt,gr=Zt/Nt,Er=or*(1-gr*or*(1-2*gr*or));if(Er>=0||nt===1){$e=(Re>=0?5:-5)*(Er+ot);var Br=50,oa;do ot=d(18,o($e)/5),nt=c(ot),Er=ot-nt,ht=Sr[nt][1],Ut=Sr[nt+1][1],Xt=Sr[d(19,nt+2)][1],$e-=(oa=(Re>=0?M:-M)*(Ut+Er*(Xt-ht)/2+Er*Er*(Xt-2*Ut+ht)/2)-Re)*S;while(o(oa)>x&&--Br>0);break}}while(--nt>=0);var Ma=Sr[nt][0],si=Sr[nt+1][0],Wi=Sr[d(19,nt+2)][0];return[ke/(si+Er*(Wi-Ma)/2+Er*Er*(Wi-2*si+Ma)/2),$e*A]};function qr(){return a.geoProjection(Pr).scale(152.63)}function $r(ke){function Re(He,$e){var ot=n($e),nt=(ke-1)/(ke-ot*n(He));return[nt*ot*y(He),nt*y($e)]}return Re.invert=function(He,$e){var ot=He*He+$e*$e,nt=P(ot),ht=(ke-P(1-ot*(ke+1)/(ke-1)))/((ke-1)/nt+nt/(ke-1));return[l(He*ht,nt*P(1-ht*ht)),nt?D($e*ht/nt):0]},Re}function va(ke,Re){var He=$r(ke);if(!Re)return He;var $e=n(Re),ot=y(Re);function nt(ht,Ut){var Xt=He(ht,Ut),Nt=Xt[1],Zt=Nt*ot/(ke-1)+$e;return[Xt[0]*$e/Zt,Nt/Zt]}return nt.invert=function(ht,Ut){var Xt=(ke-1)/(ke-1-Ut*ot);return He.invert(Xt*ht,Xt*Ut*$e)},nt}function Rr(){var ke=2,Re=0,He=a.geoProjectionMutator(va),$e=He(ke,Re);return $e.distance=function(ot){return arguments.length?He(ke=+ot,Re):ke},$e.tilt=function(ot){return arguments.length?He(ke,Re=ot*A):Re*S},$e.scale(432.147).clipAngle(R(1/ke)*S-1e-6)}var Gr=1e-4,Yr=1e4,da=-180,La=da+Gr,gi=180,pi=gi-Gr,Pi=-90,ji=Pi+Gr,Ra=90,Ga=Ra-Gr;function Ki(ke){return ke.length>0}function pn(ke){return Math.floor(ke*Yr)/Yr}function ao(ke){return ke===Pi||ke===Ra?[0,ke]:[da,pn(ke)]}function Co(ke){var Re=ke[0],He=ke[1],$e=!1;return Re<=La?(Re=da,$e=!0):Re>=pi&&(Re=gi,$e=!0),He<=ji?(He=Pi,$e=!0):He>=Ga&&(He=Ra,$e=!0),$e?[Re,He]:ke}function ho(ke){return ke.map(Co)}function No(ke,Re,He){for(var $e=0,ot=ke.length;$e=pi||Zt<=ji||Zt>=Ga){nt[ht]=Co(Xt);for(var or=ht+1;orLa&&Erji&&Br=Ut)break;He.push({index:-1,polygon:Re,ring:nt=nt.slice(or-1)}),nt[0]=ao(nt[0][1]),ht=-1,Ut=nt.length}}}}function Wn(ke){var Re,He=ke.length,$e={},ot={},nt,ht,Ut,Xt,Nt;for(Re=0;Re0?E-Ut:Ut)*S],Nt=a.geoProjection(ke(ht)).rotate(Xt),Zt=a.geoRotation(Xt),or=Nt.center;return delete Nt.rotate,Nt.center=function(gr){return arguments.length?or(Zt(gr)):Zt.invert(or())},Nt.clipAngle(90)}function Ns(ke){var Re=n(ke);function He($e,ot){var nt=a.geoGnomonicRaw($e,ot);return nt[0]*=Re,nt}return He.invert=function($e,ot){return a.geoGnomonicRaw.invert($e/Re,ot)},He}function jl(){return zu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function zu(ke,Re){return Ms(Ns,ke,Re)}function tu(ke){if(!(ke*=2))return a.geoAzimuthalEquidistantRaw;var Re=-ke/2,He=-Re,$e=ke*ke,ot=_(He),nt=.5/y(He);function ht(Ut,Xt){var Nt=R(n(Xt)*n(Ut-Re)),Zt=R(n(Xt)*n(Ut-He)),or=Xt<0?-1:1;return Nt*=Nt,Zt*=Zt,[(Nt-Zt)/(2*ke),or*P(4*$e*Zt-($e-Nt+Zt)*($e-Nt+Zt))/(2*ke)]}return ht.invert=function(Ut,Xt){var Nt=Xt*Xt,Zt=n(P(Nt+(gr=Ut+Re)*gr)),or=n(P(Nt+(gr=Ut+He)*gr)),gr,Er;return[l(Er=Zt-or,gr=(Zt+or)*ot),(Xt<0?-1:1)*R(P(gr*gr+Er*Er)*nt)]},ht}function Lc(){return Cl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Cl(ke,Re){return Ms(tu,ke,Re)}function oc(ke,Re){if(o(Re)v&&--Ut>0);return[m(ke)*(P(ot*ot+4)+ot)*E/4,M*ht]};function ru(){return a.geoProjection(cd).scale(127.16)}function Cp(ke,Re,He,$e,ot){function nt(ht,Ut){var Xt=He*y($e*Ut),Nt=P(1-Xt*Xt),Zt=P(2/(1+Nt*n(ht*=ot)));return[ke*Nt*Zt*y(ht),Re*Xt*Zt]}return nt.invert=function(ht,Ut){var Xt=ht/ke,Nt=Ut/Re,Zt=P(Xt*Xt+Nt*Nt),or=2*D(Zt/2);return[l(ht*_(or),ke*Zt)/ot,Zt&&D(Ut*y(or)/(Re*He*Zt))/$e]},nt}function th(ke,Re,He,$e){var ot=E/3;ke=h(ke,v),Re=h(Re,v),ke=d(ke,M),Re=d(Re,E-v),He=h(He,0),He=d(He,100-v),$e=h($e,v);var nt=He/100+1,ht=$e/100,Ut=R(nt*n(ot))/ot,Xt=y(ke)/y(Ut*M),Nt=Re/E,Zt=P(ht*y(ke/2)/y(Re/2)),or=Zt/P(Nt*Xt*Ut),gr=1/(Zt*P(Nt*Xt*Ut));return Cp(or,gr,Xt,Ut,Nt)}function fd(){var ke=65*A,Re=60*A,He=20,$e=200,ot=a.geoProjectionMutator(th),nt=ot(ke,Re,He,$e);return nt.poleline=function(ht){return arguments.length?ot(ke=+ht*A,Re,He,$e):ke*S},nt.parallels=function(ht){return arguments.length?ot(ke,Re=+ht*A,He,$e):Re*S},nt.inflation=function(ht){return arguments.length?ot(ke,Re,He=+ht,$e):He},nt.ratio=function(ht){return arguments.length?ot(ke,Re,He,$e=+ht):$e},nt.scale(163.775)}function hd(){return fd().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var sc=4*E+3*P(3),Qd=2*P(2*E*P(3)/sc),Df=he(Qd*P(3)/E,Qd,sc/6);function Ih(){return a.geoProjection(Df).scale(176.84)}function Lf(ke,Re){return[ke*P(1-3*Re*Re/(E*E)),Re]}Lf.invert=function(ke,Re){return[ke/P(1-3*Re*Re/(E*E)),Re]};function Bu(){return a.geoProjection(Lf).scale(152.63)}function Ff(ke,Re){var He=n(Re),$e=n(ke)*He,ot=1-$e,nt=n(ke=l(y(ke)*He,-y(Re))),ht=y(ke);return He=P(1-$e*$e),[ht*He-nt*ot,-nt*He-ht*ot]}Ff.invert=function(ke,Re){var He=(ke*ke+Re*Re)/-2,$e=P(-He*(2+He)),ot=Re*He+ke*$e,nt=ke*He-Re*$e,ht=P(nt*nt+ot*ot);return[l($e*ot,ht*(1+He)),ht?-D($e*nt/ht):0]};function rh(){return a.geoProjection(Ff).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function ep(ke,Re){var He=X(ke,Re);return[(He[0]+ke/M)/2,(He[1]+Re)/2]}ep.invert=function(ke,Re){var He=ke,$e=Re,ot=25;do{var nt=n($e),ht=y($e),Ut=y(2*$e),Xt=ht*ht,Nt=nt*nt,Zt=y(He),or=n(He/2),gr=y(He/2),Er=gr*gr,Br=1-Nt*or*or,oa=Br?R(nt*or)*P(Ma=1/Br):Ma=0,Ma,si=.5*(2*oa*nt*gr+He/M)-ke,Wi=.5*(oa*ht+$e)-Re,Qi=.5*Ma*(Nt*Er+oa*nt*or*Xt)+.5/M,on=Ma*(Zt*Ut/4-oa*ht*gr),yn=.125*Ma*(Ut*gr-oa*ht*Nt*Zt),_o=.5*Ma*(Xt*or+oa*Er*nt)+.5,Io=on*yn-_o*Qi,Pn=(Wi*on-si*_o)/Io,es=(si*yn-Wi*Qi)/Io;He-=Pn,$e-=es}while((o(Pn)>v||o(es)>v)&&--ot>0);return[He,$e]};function au(){return a.geoProjection(ep).scale(158.837)}t.geoNaturalEarth=a.geoNaturalEarth1,t.geoNaturalEarthRaw=a.geoNaturalEarth1Raw,t.geoAiry=$,t.geoAiryRaw=G,t.geoAitoff=Z,t.geoAitoffRaw=X,t.geoArmadillo=N,t.geoArmadilloRaw=J,t.geoAugust=W,t.geoAugustRaw=H,t.geoBaker=q,t.geoBakerRaw=j,t.geoBerghaus=K,t.geoBerghausRaw=Y,t.geoBertin1953=we,t.geoBertin1953Raw=pe,t.geoBoggs=_e,t.geoBoggsRaw=ce,t.geoBonne=Ze,t.geoBonneRaw=Ge,t.geoBottomley=dt,t.geoBottomleyRaw=Ke,t.geoBromley=Pt,t.geoBromleyRaw=_t,t.geoChamberlin=be,t.geoChamberlinRaw=Ve,t.geoChamberlinAfrica=me,t.geoCollignon=De,t.geoCollignonRaw=Ee,t.geoCraig=Fe,t.geoCraigRaw=Ce,t.geoCraster=at,t.geoCrasterRaw=qe,t.geoCylindricalEqualArea=ct,t.geoCylindricalEqualAreaRaw=tt,t.geoCylindricalStereographic=ft,t.geoCylindricalStereographicRaw=At,t.geoEckert1=ar,t.geoEckert1Raw=qt,t.geoEckert2=gt,t.geoEckert2Raw=vt,t.geoEckert3=Dt,t.geoEckert3Raw=St,t.geoEckert4=Vt,t.geoEckert4Raw=kt,t.geoEckert5=dr,t.geoEckert5Raw=lr,t.geoEckert6=vr,t.geoEckert6Raw=yr,t.geoEisenlohr=Hr,t.geoEisenlohrRaw=la,t.geoFahey=Da,t.geoFaheyRaw=Oa,t.geoFoucaut=ti,t.geoFoucautRaw=_i,t.geoFoucautSinusoidal=ia,t.geoFoucautSinusoidalRaw=Ka,t.geoGilbert=Yi,t.geoGingery=Ie,t.geoGingeryRaw=Qr,t.geoGinzburg4=zt,t.geoGinzburg4Raw=Mt,t.geoGinzburg5=Ht,t.geoGinzburg5Raw=Gt,t.geoGinzburg6=et,t.geoGinzburg6Raw=Be,t.geoGinzburg8=bt,t.geoGinzburg8Raw=ut,t.geoGinzburg9=It,t.geoGinzburg9Raw=Ot,t.geoGringorten=Mr,t.geoGringortenRaw=jt,t.geoGuyou=rn,t.geoGuyouRaw=Li,t.geoHammer=le,t.geoHammerRaw=re,t.geoHammerRetroazimuthal=Zi,t.geoHammerRetroazimuthalRaw=pa,t.geoHealpix=Hi,t.geoHealpixRaw=un,t.geoHill=$n,t.geoHillRaw=Vi,t.geoHomolosine=qn,t.geoHomolosineRaw=Jn,t.geoHufnagel=zn,t.geoHufnagelRaw=Fo,t.geoHyperelliptical=Yn,t.geoHyperellipticalRaw=uo,t.geoInterrupt=gs,t.geoInterruptedBoggs=sl,t.geoInterruptedHomolosine=oo,t.geoInterruptedMollweide=An,t.geoInterruptedMollweideHemispheres=Bl,t.geoInterruptedSinuMollweide=Jl,t.geoInterruptedSinusoidal=Pu,t.geoKavrayskiy7=mu,t.geoKavrayskiy7Raw=Ku,t.geoLagrange=Ju,t.geoLagrangeRaw=$c,t.geoLarrivee=Qu,t.geoLarriveeRaw=Yc,t.geoLaskowski=cs,t.geoLaskowskiRaw=Sl,t.geoLittrow=ml,t.geoLittrowRaw=Qo,t.geoLoximuthal=Zc,t.geoLoximuthalRaw=Xc,t.geoMiller=ed,t.geoMillerRaw=kc,t.geoModifiedStereographic=tc,t.geoModifiedStereographicRaw=td,t.geoModifiedStereographicAlaska=Hf,t.geoModifiedStereographicGs48=Kc,t.geoModifiedStereographicGs50=ad,t.geoModifiedStereographicMiller=Jc,t.geoModifiedStereographicLee=Tf,t.geoMollweide=te,t.geoMollweideRaw=oe,t.geoMtFlatPolarParabolic=Wd,t.geoMtFlatPolarParabolicRaw=Qc,t.geoMtFlatPolarQuartic=wp,t.geoMtFlatPolarQuarticRaw=bh,t.geoMtFlatPolarSinusoidal=id,t.geoMtFlatPolarSinusoidalRaw=rc,t.geoNaturalEarth2=wh,t.geoNaturalEarth2Raw=Iu,t.geoNellHammer=$f,t.geoNellHammerRaw=Nl,t.geoInterruptedQuarticAuthalic=Yf,t.geoNicolosi=Ah,t.geoNicolosiRaw=Xf,t.geoPatterson=ic,t.geoPattersonRaw=Th,t.geoPolyconic=Mh,t.geoPolyconicRaw=rf,t.geoPolyhedral=Zf,t.geoPolyhedralButterfly=af,t.geoPolyhedralCollignon=Xd,t.geoPolyhedralWaterman=Sh,t.geoProject=sd,t.geoGringortenQuincuncial=it,t.geoPeirceQuincuncial=wt,t.geoPierceQuincuncial=wt,t.geoQuantize=$t,t.geoQuincuncial=eh,t.geoRectangularPolyconic=cr,t.geoRectangularPolyconicRaw=Bt,t.geoRobinson=qr,t.geoRobinsonRaw=Pr,t.geoSatellite=Rr,t.geoSatelliteRaw=va,t.geoSinuMollweide=To,t.geoSinuMollweideRaw=Kn,t.geoSinusoidal=Ue,t.geoSinusoidalRaw=Me,t.geoStitch=zo,t.geoTimes=io,t.geoTimesRaw=Qa,t.geoTwoPointAzimuthal=zu,t.geoTwoPointAzimuthalRaw=Ns,t.geoTwoPointAzimuthalUsa=jl,t.geoTwoPointEquidistant=Cl,t.geoTwoPointEquidistantRaw=tu,t.geoTwoPointEquidistantUsa=Lc,t.geoVanDerGrinten=of,t.geoVanDerGrintenRaw=oc,t.geoVanDerGrinten2=Jd,t.geoVanDerGrinten2Raw=Cf,t.geoVanDerGrinten3=kp,t.geoVanDerGrinten3Raw=Ph,t.geoVanDerGrinten4=ru,t.geoVanDerGrinten4Raw=cd,t.geoWagner=fd,t.geoWagner7=hd,t.geoWagnerRaw=th,t.geoWagner4=Ih,t.geoWagner4Raw=Df,t.geoWagner6=Bu,t.geoWagner6Raw=Lf,t.geoWiechel=rh,t.geoWiechelRaw=Ff,t.geoWinkel3=au,t.geoWinkel3Raw=ep,Object.defineProperty(t,"__esModule",{value:!0})}))}}),kse=ye({"src/plots/geo/zoom.js"(e,r){"use strict";var t=ai(),a=Yt(),i=li(),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},n={cursor:"auto"};function u(S,A){var F=S.projection,D;return A._isScoped?D=h:A._isClipped?D=p:D=d,D(S,F)}r.exports=u;function c(S,A){return t.behavior.zoom().translate(A.translate()).scaleExtent(A.scaleExtent()).scale(A.scale())}function f(S,A,F){var D=S.id,R=S.graphDiv,P=R.layout,z=P[D],I=R._fullLayout,L=I[D],B={},O={};function G($,X){B[D+"."+$]=a.nestedProperty(z,$).get(),i.call("_storeDirectGUIEdit",P,I._preGUI,B);var Z=a.nestedProperty(L,$);Z.get()!==X&&(Z.set(X),a.nestedProperty(z,$).set(X),O[D+"."+$]=X)}F(G),G("projection.scale",A.scale()/S.fitScale),G("fitbounds",!1),R.emit("plotly_relayout",O)}function h(S,A){var F=c(S,A);function D(){t.select(this).style(l)}function R(){A.scale(t.event.scale).translate(t.event.translate),S.render(!0);var I=A.invert(S.midPt);S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":A.scale()/S.fitScale,"geo.center.lon":I[0],"geo.center.lat":I[1]})}function P(I){var L=A.invert(S.midPt);I("center.lon",L[0]),I("center.lat",L[1])}function z(){t.select(this).style(n),f(S,A,P)}return F.on("zoomstart",D).on("zoom",R).on("zoomend",z),F}function d(S,A){var F=c(S,A),D=2,R,P,z,I,L,B,O,G,$;function X(U){return A.invert(U)}function Z(U){var V=X(U);if(!V)return!0;var j=A(V);return Math.abs(j[0]-U[0])>D||Math.abs(j[1]-U[1])>D}function J(){t.select(this).style(l);let{x:U,y:V,width:j,height:q}=this.getBBox();R=t.event.sourceEvent?t.mouse(this):[U+j/2,V+q/2],P=A.rotate(),z=A.translate(),I=P,L=X(R)}function N(){let{x:U,y:V,width:j,height:q}=this.getBBox();if(B=t.event.sourceEvent?t.mouse(this):[U+j/2,V+q/2],Z(R)){F.scale(A.scale()),F.translate(A.translate());return}A.scale(t.event.scale),A.translate([z[0],t.event.translate[1]]),L?X(B)&&(G=X(B),O=[I[0]+(G[0]-L[0]),P[1],P[2]],A.rotate(O),I=O):(R=B,L=X(R)),$=!0,S.render(!0);var Y=A.rotate(),K=A.invert(S.midPt);S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":A.scale()/S.fitScale,"geo.center.lon":K[0],"geo.center.lat":K[1],"geo.projection.rotation.lon":-Y[0]})}function H(){t.select(this).style(n),$&&f(S,A,W)}function W(U){var V=A.rotate(),j=A.invert(S.midPt);U("projection.rotation.lon",-V[0]),U("center.lon",j[0]),U("center.lat",j[1])}return F.on("zoomstart",J).on("zoom",N).on("zoomend",H),F}function p(S,A){var F={r:A.rotate(),k:A.scale()},D=c(S,A),R=b(D,"zoomstart","zoom","zoomend"),P=0,z=D.on,I;D.on("zoomstart",function(){t.select(this).style(l);let{x:$,y:X,width:Z,height:J}=this.getBBox(),N=t.event.sourceEvent?t.mouse(this):[$+Z/2,X+J/2],H=A.rotate(),W=H,U=A.translate(),V=m(H);I=g(A,N),z.call(D,"zoom",function(){let{x:j,y:q,width:Y,height:K}=this.getBBox(),re=t.event.sourceEvent?t.mouse(this):[j+Y/2,q+K/2];if(A.scale(F.k=t.event.scale),!I)N=re,I=g(A,N);else if(g(A,re)){A.rotate(H).translate(U);var se=g(A,re),le=_(I,se),ue=C(y(V,le)),fe=F.r=v(ue,I,W);(!isFinite(fe[0])||!isFinite(fe[1])||!isFinite(fe[2]))&&(fe=W),A.rotate(fe),W=fe}B(R.of(this,arguments))}),L(R.of(this,arguments))}).on("zoomend",function(){t.select(this).style(n),z.call(D,"zoom",null),O(R.of(this,arguments)),f(S,A,G)}).on("zoom.redraw",function(){S.render(!0);var $=A.rotate();S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":A.scale()/S.fitScale,"geo.projection.rotation.lon":-$[0],"geo.projection.rotation.lat":-$[1]})});function L($){P++||$({type:"zoomstart"})}function B($){$({type:"zoom"})}function O($){--P||$({type:"zoomend"})}function G($){var X=A.rotate();$("projection.rotation.lon",-X[0]),$("projection.rotation.lat",-X[1])}return t.rebind(D,R,"on")}function g(S,A){var F=S.invert(A);return F&&isFinite(F[0])&&isFinite(F[1])&&w(F)}function m(S){var A=.5*S[0]*o,F=.5*S[1]*o,D=.5*S[2]*o,R=Math.sin(A),P=Math.cos(A),z=Math.sin(F),I=Math.cos(F),L=Math.sin(D),B=Math.cos(D);return[P*I*B+R*z*L,R*I*B-P*z*L,P*z*B+R*I*L,P*I*L-R*z*B]}function y(S,A){var F=S[0],D=S[1],R=S[2],P=S[3],z=A[0],I=A[1],L=A[2],B=A[3];return[F*z-D*I-R*L-P*B,F*I+D*z+R*B-P*L,F*L-D*B+R*z+P*I,F*B+D*L-R*I+P*z]}function _(S,A){if(!(!S||!A)){var F=T(S,A),D=Math.sqrt(k(F,F)),R=.5*Math.acos(Math.max(-1,Math.min(1,k(S,A)))),P=Math.sin(R)/D;return D&&[Math.cos(R),F[2]*P,-F[1]*P,F[0]*P]}}function v(S,A,F){var D=M(A,2,S[0]);D=M(D,1,S[1]),D=M(D,0,S[2]-F[2]);var R=A[0],P=A[1],z=A[2],I=D[0],L=D[1],B=D[2],O=Math.atan2(P,R)*s,G=Math.sqrt(R*R+P*P),$,X;Math.abs(L)>G?(X=(L>0?90:-90)-O,$=0):(X=Math.asin(L/G)*s-O,$=Math.sqrt(G*G-L*L));var Z=180-X-2*O,J=(Math.atan2(B,I)-Math.atan2(z,$))*s,N=(Math.atan2(B,I)-Math.atan2(z,-$))*s,H=x(F[0],F[1],X,J),W=x(F[0],F[1],Z,N);return H<=W?[X,J,F[2]]:[Z,N,F[2]]}function x(S,A,F,D){var R=E(F-S),P=E(D-A);return Math.sqrt(R*R+P*P)}function E(S){return(S%360+540)%360-180}function M(S,A,F){var D=F*o,R=S.slice(),P=A===0?1:0,z=A===2?1:2,I=Math.cos(D),L=Math.sin(D);return R[P]=S[P]*I-S[z]*L,R[z]=S[z]*I+S[P]*L,R}function C(S){return[Math.atan2(2*(S[0]*S[1]+S[2]*S[3]),1-2*(S[1]*S[1]+S[2]*S[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(S[0]*S[2]-S[3]*S[1]))))*s,Math.atan2(2*(S[0]*S[3]+S[1]*S[2]),1-2*(S[2]*S[2]+S[3]*S[3]))*s]}function w(S){var A=S[0]*o,F=S[1]*o,D=Math.cos(F);return[D*Math.cos(A),D*Math.sin(A),Math.sin(F)]}function k(S,A){for(var F=0,D=0,R=S.length;D0&&G._module.calcGeoJSON(O,z)}if(!I){var $=this.updateProjection(P,z);if($)return;(!this.viewInitial||this.scope!==L.scope)&&this.saveViewInitial(L)}this.scope=L.scope,this.updateBaseLayers(z,L),this.updateDims(z,L),this.updateFx(z,L),d.generalUpdatePerTraceModule(this.graphDiv,this,P,L);var X=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=X.selectAll(".point"),this.dataPoints.text=X.selectAll("text"),this.dataPaths.line=X.selectAll(".js-line");var Z=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=Z.selectAll("path"),this._render()},A.updateProjection=function(P,z){var I=this.graphDiv,L=z[this.id],B=z._size,O=L.domain,G=L.projection,$=L.lonaxis,X=L.lataxis,Z=$._ax,J=X._ax,N=this.projection=F(L),H=[[B.l+B.w*O.x[0],B.t+B.h*(1-O.y[1])],[B.l+B.w*O.x[1],B.t+B.h*(1-O.y[0])]],W=L.center||{},U=G.rotation||{},V=$.range||[],j=X.range||[];if(L.fitbounds){Z._length=H[1][0]-H[0][0],J._length=H[1][1]-H[0][1],Z.range=m(I,Z),J.range=m(I,J);let ie=[];for(let dt of P){let _t=dt[0].trace;_t.visible===!0&&_t._module.fitCoords&&ie.push(_t._module.fitCoords(dt,L))}let ee=g(I,Z),ce=ee.min.reduce((dt,{val:_t})=>Math.min(dt,_t),1/0),Se=ee.max.reduce((dt,{val:_t})=>Math.max(dt,_t),-1/0)-ce,Me=w.boundsOfCoords(ie.flat()),[Ue,,Ge]=Me||[],Ze=Ge-Ue;if(!!Me&&(Se>360||Se<360&&ZeMath.max(Ye,dt(me)),0),pt=ee.max.reduce((Ye,me)=>Math.max(Ye,_t(me)),0),Tt=Z._length-Pt-pt,st=Tt>Z._length/10?Ze*Z._length/Tt:Ze,Ve=(Ue+Ge)/2;Z.range=[Ve-st/2,Ve+st/2]}var q=(Z.range[0]+Z.range[1])/2,Y=(J.range[0]+J.range[1])/2;if(L._isScoped)W={lon:q,lat:Y};else if(L._isClipped){W={lon:q,lat:Y},U={lon:q,lat:Y,roll:U.roll};var K=G.type,re=C.lonaxisSpan[K]/2||180,se=C.lataxisSpan[K]/2||90;V=[q-re,q+re],j=[Y-se,Y+se]}else W={lon:q,lat:Y},U={lon:q,lat:U.lat,roll:U.roll}}N.center([W.lon-U.lon,W.lat-U.lat]).rotate([-U.lon,-U.lat,U.roll]).parallels(G.parallels);var le=R(V,j);N.fitExtent(H,le);var ue=this.bounds=N.getBounds(le),fe=this.fitScale=N.scale(),pe=N.translate();if(N.scaleExtent=()=>{var ie;let{minscale:ee}=G,ce=(ie=G.maxscale)!=null?ie:1/0;return[fe*Math.min(ee,ce),fe*Math.max(ee,ce)]},L.fitbounds){var we=N.getBounds(R(Z.range,J.range)),xe=Math.min((ue[1][0]-ue[0][0])/(we[1][0]-we[0][0]),(ue[1][1]-ue[0][1])/(we[1][1]-we[0][1]));isFinite(xe)?N.scale(xe*fe):n.warn("Something went wrong during"+this.id+"fitbounds computations.")}else N.scale(G.scale*fe);var he=this.midPt=[(ue[0][0]+ue[1][0])/2,(ue[0][1]+ue[1][1])/2];if(N.translate([pe[0]+(he[0]-pe[0]),pe[1]+(he[1]-pe[1])]).clipExtent(ue),L._isAlbersUsa){var oe=N([W.lon,W.lat]);if(oe){var te=N.translate();N.translate([te[0]-(oe[0]-te[0]),te[1]-(oe[1]-te[1])])}}},A.updateBaseLayers=function(P,z){var I=this,L=I.topojson,B=I.layers,O=I.basePaths;function G(H){return H==="lonaxis"||H==="lataxis"}function $(H){return!!C.lineLayers[H]}function X(H){return!!C.fillLayers[H]}var Z=this.hasChoropleth?C.layersForChoropleth:C.layers,J=Z.filter(function(H){return $(H)||X(H)?z["show"+H]:G(H)?z[H].showgrid:!0}),N=I.framework.selectAll(".layer").data(J,String);N.exit().each(function(H){delete B[H],delete O[H],t.select(this).remove()}),N.enter().append("g").attr("class",function(H){return"layer "+H}).each(function(H){var W=B[H]=t.select(this);H==="bg"?I.bgRect=W.append("rect").style("pointer-events","all"):G(H)?O[H]=W.append("path").style("fill","none"):H==="backplot"?W.append("g").classed("choroplethlayer",!0):H==="frontplot"?W.append("g").classed("scatterlayer",!0):$(H)?O[H]=W.append("path").style("fill","none").style("stroke-miterlimit",2):X(H)&&(O[H]=W.append("path").style("stroke","none"))}),N.order(),N.each(function(H){var W=O[H],U=C.layerNameToAdjective[H];H==="frame"?W.datum(C.sphereSVG):$(H)||X(H)?W.datum(b(L,L.objects[H])):G(H)&&W.datum(D(H,z,P)).call(c.stroke,z[H].gridcolor).call(f.dashLine,z[H].griddash,z[H].gridwidth),$(H)?W.call(c.stroke,z[U+"color"]).call(f.dashLine,"",z[U+"width"]):X(H)&&W.call(c.fill,z[U+"color"])})},A.updateDims=function(P,z){var I=this.bounds,L=(z.framewidth||0)/2,B=I[0][0]-L,O=I[0][1]-L,G=I[1][0]-B+L,$=I[1][1]-O+L;f.setRect(this.clipRect,B,O,G,$),this.bgRect.call(f.setRect,B,O,G,$).call(c.fill,z.bgcolor),this.xaxis._offset=B,this.xaxis._length=G,this.yaxis._offset=O,this.yaxis._length=$},A.updateFx=function(P,z){var I=this,L=I.graphDiv,B=I.bgRect,O=P.dragmode,G=P.clickmode;if(I.isStatic)return;function $(){var N=I.viewInitial,H={};for(var W in N)H[I.id+"."+W]=N[W];l.call("_guiRelayout",L,H),L.emit("plotly_doubleclick",null)}function X(N){return I.projection.invert([N[0]+I.xaxis._offset,N[1]+I.yaxis._offset])}var Z=function(N,H){if(H.isRect){var W=N.range={};W[I.id]=[X([H.xmin,H.ymin]),X([H.xmax,H.ymax])]}else{var U=N.lassoPoints={};U[I.id]=H.map(X)}},J={element:I.bgRect.node(),gd:L,plotinfo:{id:I.id,xaxis:I.xaxis,yaxis:I.yaxis,fillRangeItems:Z},xaxes:[I.xaxis],yaxes:[I.yaxis],subplot:I.id,clickFn:function(N){N===2&&x(L)}};if(O==="pan"){B.node().onmousedown=null;let N=M(I,z);if(B.call(N),!t.event){let H=I.projection.scale(),[W,U]=I.projection.scaleExtent();(HU)&&N.event(B)}B.on("dblclick.zoom",$),L._context._scrollZoom.geo||B.on("wheel.zoom",null)}else(O==="select"||O==="lasso")&&(B.on(".zoom",null),J.prepFn=function(N,H,W){v(N,H,W,J,O)},_.init(J));B.on("mousemove",function(){var N=I.projection.invert(n.getPositionFromD3Event());if(!N)return _.unhover(L,t.event);I.xaxis.p2c=function(){return N[0]},I.yaxis.p2c=function(){return N[1]},h.hover(L,t.event,I.id)}),B.on("mouseout",function(){L._dragging||_.unhover(L,t.event)}),B.on("click",function(){O!=="select"&&O!=="lasso"&&(G.indexOf("select")>-1&&E(t.event,L,[I.xaxis],[I.yaxis],I.id,J),G.indexOf("event")>-1&&h.click(L,t.event))})},A.makeFramework=function(){var P=this,z=P.graphDiv,I=z._fullLayout,L="clip"+I._uid+P.id;P.clipDef=I._clips.append("clipPath").attr("id",L),P.clipRect=P.clipDef.append("rect"),P.framework=t.select(P.container).append("g").attr("class","geo "+P.id).call(f.setClipUrl,L,z),P.project=function(B){var O=P.projection(B);return O?[O[0]-P.xaxis._offset,O[1]-P.yaxis._offset]:[null,null]},P.xaxis={_id:"x",c2p:function(B){return P.project(B)[0]}},P.yaxis={_id:"y",c2p:function(B){return P.project(B)[1]}},P.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(P.mockAxis,I)},A.saveViewInitial=function(P){var z=P.center||{},I=P.projection,L=I.rotation||{};this.viewInitial={fitbounds:P.fitbounds,"projection.scale":I.scale};var B;P._isScoped?B={"center.lon":z.lon,"center.lat":z.lat}:P._isClipped?B={"projection.rotation.lon":L.lon,"projection.rotation.lat":L.lat,"center.lon":z.lon,"center.lat":z.lat}:B={"center.lon":z.lon,"center.lat":z.lat,"projection.rotation.lon":L.lon},n.extendFlat(this.viewInitial,B)},A.render=function(P){this._hasMarkerAngles&&P?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},A._render=function(){var P=this.projection,z=P.getPath(),I;function L(O){var G=P(O.lonlat);return G?u(G[0],G[1]):null}function B(O){return P.isLonLatOverEdges(O.lonlat)?"none":null}for(I in this.basePaths)this.basePaths[I].attr("d",z);for(I in this.dataPaths)this.dataPaths[I].attr("d",function(O){return z(O.geojson)});for(I in this.dataPoints)this.dataPoints[I].attr("display",B).attr("transform",L)};function F(P){var z=P.projection,I=z.type,L=C.projNames[I];L="geo"+n.titleCase(L);for(var B=a[L]||s[L],O=B(),G=P._isSatellite?Math.acos(1/z.distance)*180/Math.PI:P._isClipped?C.lonaxisSpan[I]/2:null,$=["center","rotate","parallels","clipExtent"],X=function(N){return N?O:[]},Z=0;Z<$.length;Z++){var J=$[Z];typeof O[J]!="function"&&(O[J]=X)}return O.isLonLatOverEdges=function(N){if(O(N)===null)return!0;if(G){var H=O.rotate(),W=o(N,[-H[0],-H[1]]),U=G*Math.PI/180;return W>U}else return!1},O.getPath=function(){return i().projection(O)},O.getBounds=function(N){return O.getPath().bounds(N)},O.precision(C.precision),P._isSatellite&&O.tilt(z.tilt).distance(z.distance),G&&O.clipAngle(G-C.clipPad),O}function D(P,z,I){var L=1e-6,B=2.5,O=z[P],G=C.scopeDefaults[z.scope],$,X,Z;P==="lonaxis"?($=G.lonaxisRange,X=G.lataxisRange,Z=function(Y,K){return[Y,K]}):P==="lataxis"&&($=G.lataxisRange,X=G.lonaxisRange,Z=function(Y,K){return[K,Y]});var J={type:"linear",range:[$[0],$[1]-L],tick0:O.tick0,dtick:O.dtick};p.setConvert(J,I);var N=p.calcTicks(J);!z.isScoped&&P==="lonaxis"&&N.pop();for(var H=N.length,W=new Array(H),U=0;Ure[se]!=null)||s.fitboundsIncompatible.has(v)?f.fitbounds=!1:Y.forEach(({dst:re,key:se})=>re&&(re[se]=null))}}}}),DP=ye({"src/plots/geo/index.js"(e,r){"use strict";var t=_c().getSubplotCalcData,a=Yt().counterRegex,i=Cse(),o="geo",s=a(o),l={};l[o]={valType:"subplotid",dflt:o,editType:"calc"};function n(f){for(var h=f._fullLayout,d=f.calcdata,p=h._subplots[o],g=0;g")}}}}),PP=ye({"src/traces/choropleth/event_data.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){a.location=i.location,a.z=i.z;var n=s[l];return n.fIn&&n.fIn.properties&&(a.properties=n.fIn.properties),a.ct=n.ct,a}}}),IP=ye({"src/traces/choropleth/select.js"(e,r){"use strict";r.exports=function(a,i){var o=a.cd,s=a.xaxis,l=a.yaxis,n=[],u,c,f,h,d;if(i===!1)for(u=0;u=Math.min(G,$)&&v<=Math.max(G,$)?0:1/0}if(R=Math.min(X,Z)&&x<=Math.max(X,Z)?0:1/0}I=Math.sqrt(R*R+P*P),S=M[D]}}}else for(D=M.length-1;D>-1;D--)b=M[D],A=y[b],F=_[b],R=g.c2p(A)-v,P=m.c2p(F)-x,z=Math.sqrt(R*R+P*P),z100},e.isDotSymbol=function(t){return typeof t=="string"?r.DOT_RE.test(t):t>200}}}),zse=ye({"src/traces/scattergl/defaults.js"(e,r){"use strict";var t=Yt(),a=li(),i=MM(),o=jb(),s=jp(),l=ms(),n=Lm(),u=ap(),c=kd(),f=ip(),h=qp(),d=np();r.exports=function(g,m,y,_){function v(b,S){return t.coerce(g,m,o,b,S)}var x=g.marker?i.isOpenSymbol(g.marker.symbol):!1,E=l.isBubble(g),M=n(g,m,_,v);if(!M){m.visible=!1;return}u(g,m,_,v),v("xhoverformat"),v("yhoverformat");var C=M>>1,g=n[p],m=c!==void 0?c(g,u):g-u;m>=0?(d=p,h=p-1):f=p+1}return d}function a(n,u,c,f,h){for(var d=h+1;f<=h;){var p=f+h>>>1,g=n[p],m=c!==void 0?c(g,u):g-u;m>0?(d=p,h=p-1):f=p+1}return d}function i(n,u,c,f,h){for(var d=f-1;f<=h;){var p=f+h>>>1,g=n[p],m=c!==void 0?c(g,u):g-u;m<0?(d=p,f=p+1):h=p-1}return d}function o(n,u,c,f,h){for(var d=f-1;f<=h;){var p=f+h>>>1,g=n[p],m=c!==void 0?c(g,u):g-u;m<=0?(d=p,f=p+1):h=p-1}return d}function s(n,u,c,f,h){for(;f<=h;){var d=f+h>>>1,p=n[d],g=c!==void 0?c(p,u):p-u;if(g===0)return d;g<=0?f=d+1:h=d-1}return-1}function l(n,u,c,f,h,d){return typeof c=="function"?d(n,u,c,f===void 0?0:f|0,h===void 0?n.length-1:h|0):d(n,u,void 0,c===void 0?0:c|0,f===void 0?n.length-1:f|0)}r.exports={ge:function(n,u,c,f,h){return l(n,u,c,f,h,t)},gt:function(n,u,c,f,h){return l(n,u,c,f,h,a)},lt:function(n,u,c,f,h){return l(n,u,c,f,h,i)},le:function(n,u,c,f,h){return l(n,u,c,f,h,o)},eq:function(n,u,c,f,h){return l(n,u,c,f,h,s)}}}}),RP=ye({"node_modules/clamp/index.js"(e,r){r.exports=t;function t(a,i,o){return io?o:a:ai?i:a}}}),Wp=ye({"node_modules/pick-by-alias/index.js"(e,r){"use strict";r.exports=function(o,s,l){var n={},u,c;if(typeof s=="string"&&(s=a(s)),Array.isArray(s)){var f={};for(c=0;c1&&(i=arguments),typeof i=="string"?i=i.split(/\s/).map(parseFloat):typeof i=="number"&&(i=[i]),i.length&&typeof i[0]=="number"?i.length===1?o={width:i[0],height:i[0],x:0,y:0}:i.length===2?o={width:i[0],height:i[1],x:0,y:0}:o={x:i[0],y:i[1],width:i[2]-i[0]||0,height:i[3]-i[1]||0}:i&&(i=t(i,{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"}),o={x:i.left||0,y:i.top||0},i.width==null?i.right?o.width=i.right-o.x:o.width=0:o.width=i.width,i.height==null?i.bottom?o.height=i.bottom-o.y:o.height=0:o.height=i.height),o}}}),Km=ye({"node_modules/array-bounds/index.js"(e,r){"use strict";r.exports=t;function t(a,i){if(!a||a.length==null)throw Error("Argument should be an array");i==null?i=1:i=Math.floor(i);for(var o=Array(i*2),s=0;sl&&(l=a[u]),a[u]>>1,E;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?E=new(c(m.dtype))(x):m.dtype&&(E=m.dtype,Array.isArray(E)&&(E.length=x));for(let D=0;Dy||L>h){for(let V=0;VK||G>re||$=Z||q===Y)return;let se=M[j];Y===void 0&&(Y=se.length);for(let te=q;te=z&&ee<=L&&ce>=I&&ce<=B&&J.push(ie)}let le=C[j],ue=le[q*4+0],fe=le[q*4+1],pe=le[q*4+2],we=le[q*4+3],xe=H(le,q+1),he=V*.5,oe=j+1;N(W,U,he,oe,ue,fe||pe||we||xe),N(W,U+he,he,oe,fe,pe||we||xe),N(W+he,U,he,oe,pe,we||xe),N(W+he,U+he,he,oe,we,xe)}function H(W,U){let V=null,j=0;for(;V===null;)if(V=W[U*4+j],j++,j>W.length)return null;return V}return J}function A(D,R,P,z,I){let L=[];for(let B=0;B2&&(n.push([c].concat(f.splice(0,2))),h="l",c=c=="m"?"l":"L");;){if(f.length==t[h])return f.unshift(c),n.push(f);if(f.length1&&(g=1),g<-1&&(g=-1),p*Math.acos(g)},l=function(c,f,h,d,p,g,m,y,_,v,x,E){var M=Math.pow(p,2),C=Math.pow(g,2),w=Math.pow(x,2),k=Math.pow(E,2),T=M*C-M*k-C*w;T<0&&(T=0),T/=M*k+C*w,T=Math.sqrt(T)*(m===y?-1:1);var b=T*p/g*E,S=T*-g/p*x,A=v*b-_*S+(c+h)/2,F=_*b+v*S+(f+d)/2,D=(x-b)/p,R=(E-S)/g,P=(-x-b)/p,z=(-E-S)/g,I=s(1,0,D,R),L=s(D,R,P,z);return y===0&&L>0&&(L-=a),y===1&&L<0&&(L+=a),[A,F,I,L]},n=function(c){var f=c.px,h=c.py,d=c.cx,p=c.cy,g=c.rx,m=c.ry,y=c.xAxisRotation,_=y===void 0?0:y,v=c.largeArcFlag,x=v===void 0?0:v,E=c.sweepFlag,M=E===void 0?0:E,C=[];if(g===0||m===0)return[];var w=Math.sin(_*a/360),k=Math.cos(_*a/360),T=k*(f-d)/2+w*(h-p)/2,b=-w*(f-d)/2+k*(h-p)/2;if(T===0&&b===0)return[];g=Math.abs(g),m=Math.abs(m);var S=Math.pow(T,2)/Math.pow(g,2)+Math.pow(b,2)/Math.pow(m,2);S>1&&(g*=Math.sqrt(S),m*=Math.sqrt(S));var A=l(f,h,d,p,g,m,x,M,w,k,T,b),F=t(A,4),D=F[0],R=F[1],P=F[2],z=F[3],I=Math.abs(z)/(a/4);Math.abs(1-I)<1e-7&&(I=1);var L=Math.max(Math.ceil(I),1);z/=L;for(var B=0;B4?(u=v[v.length-4],c=v[v.length-3]):(u=g,c=m),n.push(v)}return n}function i(s,l,n,u){return["C",s,l,n,u,n,u]}function o(s,l,n,u,c,f){return["C",s/3+2/3*n,l/3+2/3*u,c/3+2/3*n,f/3+2/3*u,c,f]}}}),zP=ye({"node_modules/is-svg-path/index.js"(e,r){"use strict";r.exports=function(a){return typeof a!="string"?!1:(a=a.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(a)&&/[\dz]$/i.test(a)&&a.length>4))}}}),$se=ye({"node_modules/svg-path-bounds/index.js"(e,r){"use strict";var t=Vse(),a=Gse(),i=Wse(),o=zP();r.exports=s;function s(l){if(Array.isArray(l)&&l.length===1&&typeof l[0]=="string"&&(l=l[0]),typeof l=="string"){if(!o(l))throw Error("String is not an SVG path.");l=t(l)}if(!Array.isArray(l))throw Error("Argument should be a string or an array of path segments.");if(l=a(l),l=i(l),!l.length)return[0,0,0,0];for(var n=[1/0,1/0,-1/0,-1/0],u=0,c=l.length;un[2]&&(n[2]=f[h+0]),f[h+1]>n[3]&&(n[3]=f[h+1]);return n}}}),Yse=ye({"node_modules/bitmap-sdf/index.js"(e,r){"use strict";r.exports=a;var t=1e20;function a(s,l){l||(l={});var n=l.cutoff==null?.25:l.cutoff,u=l.radius==null?8:l.radius,c=l.channel||0,f,h,d,p,g,m,y,_,v,x,E;if(ArrayBuffer.isView(s)||Array.isArray(s)){if(!l.width||!l.height)throw Error("For raw data width and height should be provided by options");f=l.width,h=l.height,p=s,l.stride?m=l.stride:m=Math.floor(s.length/f/h)}else window.HTMLCanvasElement&&s instanceof window.HTMLCanvasElement?(_=s,y=_.getContext("2d"),f=_.width,h=_.height,v=y.getImageData(0,0,f,h),p=v.data,m=4):window.CanvasRenderingContext2D&&s instanceof window.CanvasRenderingContext2D?(_=s.canvas,y=s,f=_.width,h=_.height,v=y.getImageData(0,0,f,h),p=v.data,m=4):window.ImageData&&s instanceof window.ImageData&&(v=s,f=s.width,h=s.height,p=v.data,m=4);if(d=Math.max(f,h),window.Uint8ClampedArray&&p instanceof window.Uint8ClampedArray||window.Uint8Array&&p instanceof window.Uint8Array)for(g=p,p=Array(f*h),x=0,E=Math.floor(g.length/m);xXse});function Xse(e,r={}){if(!(0,NP.default)(e))throw Error("Invalid SVG path");let t,a;r.shape||Array.isArray(r)?[t,a]=r.shape||r:(t=Ub.width=r.width||r.w||200,a=Ub.height=r.height||r.h||200);let i=Math.min(t,a),o=r.stroke||0,s=r.viewbox||r.viewBox||(0,OP.default)(e),l=[t/(s[2]-s[0]),a/(s[3]-s[1])],n=Math.min(l[0]||0,l[1]||0)/2;Nh.fillStyle="black",Nh.fillRect(0,0,t,a),Nh.fillStyle="white",o&&(typeof o!="number"&&(o=1),Nh.strokeStyle=o>0?"white":"black",Nh.lineWidth=Math.abs(o)),Nh.translate(t*.5,a*.5),Nh.scale(n,n);let u=new Path2D(e);return Nh.fill(u),o&&Nh.stroke(u),Nh.setTransform(1,0,0,1,0,0),(0,jP.default)(Nh,{cutoff:r.cutoff!=null?r.cutoff:.5,radius:r.radius!=null?r.radius:i*.5})}var OP,NP,jP,Ub,Nh,Zse=Si({"node_modules/svg-path-sdf/svg-path-sdf.js"(){OP=Vs($se()),NP=Vs(zP()),jP=Vs(Yse()),Ub=document.createElement("canvas"),Nh=Ub.getContext("2d",{willReadFrequently:!0})}}),Qm=ye({"src/traces/scattergl/convert.js"(e,r){"use strict";var t=en(),a=(Zse(),On(BP)).default,{normalize:i}=Ya(),o=li(),s=Yt(),l=s.isArrayOrTypedArray,n=$i(),u=Gs(),c=y0().formatColor,f=ms(),h=$x(),d=MM(),p=Ov(),g=f0().DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},y=Bf().appendArrayPointValue;function _(z,I){var L,B={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},O=z._context.plotGlPixelRatio;if(I.visible!==!0)return B;if(f.hasText(I)&&(B.text=v(z,I),B.textSel=C(z,I,I.selected),B.textUnsel=C(z,I,I.unselected)),f.hasMarkers(I)&&(B.marker=E(z,I),B.markerSel=M(z,I,I.selected),B.markerUnsel=M(z,I,I.unselected),!I.unselected&&l(I.marker.opacity))){var G=I.marker.opacity;for(B.markerUnsel.opacity=new Array(G.length),L=0;L500?"bold":"normal":z}function E(z,I){var L=I._length,B=I.marker,O={},G,$=l(B.symbol),X=l(B.angle),Z=l(B.color),J=l(B.line.color),N=l(B.opacity),H=l(B.size),W=l(B.line.width),U;if($||(U=d.isOpenSymbol(B.symbol)),$||Z||J||N||X){O.symbols=new Array(L),O.angles=new Array(L),O.colors=new Array(L),O.borderColors=new Array(L);var V=B.symbol,j=B.angle,q=c(B,B.opacity,L),Y=c(B.line,B.opacity,L);if(!l(Y[0])){var K=Y;for(Y=Array(L),G=0;Gp.TOO_MANY_POINTS||f.hasMarkers(I)?"rect":"round";if(J&&I.connectgaps){var H=G[0],W=G[1];for($=0;$1?Z[$]:Z[0]:Z,U=l(J)?J.length>1?J[$]:J[0]:J,V=m[W],j=m[U],q=N?N/.8+1:0,Y=-j*q-j*.5;G.offset[$]=[V*q/H,Y/H]}}return G}r.exports={style:_,markerStyle:E,markerSelection:M,linePositions:D,errorBarPositions:R,textPosition:P}}}),UP=ye({"src/traces/scattergl/scene_update.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o){var s=o._scene,l={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},n={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return o._scene||(s=o._scene={},s.init=function(){t.extendFlat(s,n,l)},s.init(),s.update=function(c){var f=t.repeat(c,s.count);if(s.fill2d&&s.fill2d.update(f),s.scatter2d&&s.scatter2d.update(f),s.line2d&&s.line2d.update(f),s.error2d&&s.error2d.update(f.concat(f)),s.select2d&&s.select2d.update(f),s.glText)for(var h=0;h=g,b=k*2,S={},A,F=M.makeCalcdata(x,"x"),D=C.makeCalcdata(x,"y"),R=s(x,M,"x",F),P=s(x,C,"y",D),z=R.vals,I=P.vals;x._x=z,x._y=I,x.xperiodalignment&&(x._origX=F,x._xStarts=R.starts,x._xEnds=R.ends),x.yperiodalignment&&(x._origY=D,x._yStarts=P.starts,x._yEnds=P.ends);var L=new Array(b),B=new Array(k);for(A=0;A1&&a.extendFlat(w.line,h.linePositions(_,x,E)),w.errorX||w.errorY){var k=h.errorBarPositions(_,x,E,M,C);w.errorX&&a.extendFlat(w.errorX,k.x),w.errorY&&a.extendFlat(w.errorY,k.y)}return w.text&&(a.extendFlat(w.text,{positions:E},h.textPosition(_,x,w.text,w.marker)),a.extendFlat(w.textSel,{positions:E},h.textPosition(_,x,w.text,w.markerSel)),a.extendFlat(w.textUnsel,{positions:E},h.textPosition(_,x,w.text,w.markerUnsel))),w}}}),qP=ye({"src/traces/scattergl/edit_style.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=f0().DESELECTDIM;function o(s){var l=s[0],n=l.trace,u=l.t,c=u._scene,f=u.index,h=c.selectBatch[f],d=c.unselectBatch[f],p=c.textOptions[f],g=c.textSelectedOptions[f]||{},m=c.textUnselectedOptions[f]||{},y=t.extendFlat({},p),_,v;if(h.length||d.length){var x=g.color,E=m.color,M=p.color,C=t.isArrayOrTypedArray(M);for(y.color=new Array(n._length),_=0;_10&&/[0-9](?:\s|\/)/.test(o)&&(l=o.match(/([0-9]+)/g).map(function(g){return parseFloat(g)}),u=o.match(/([a-z])/ig).join("").toLowerCase());else isNaN(o)?Array.isArray(o)||o.length?(l=[o[0],o[1],o[2]],u="rgb",n=o.length===4?o[3]:1):o instanceof Object&&(o.r!=null||o.red!=null||o.R!=null?(u="rgb",l=[o.r||o.red||o.R||0,o.g||o.green||o.G||0,o.b||o.blue||o.B||0]):(u="hsl",l=[o.h||o.hue||o.H||0,o.s||o.saturation||o.S||0,o.l||o.lightness||o.L||o.b||o.brightness]),n=o.a||o.alpha||o.opacity||1,o.opacity!=null&&(n/=100)):(u="rgb",l=[o>>>16,(o&65280)>>>8,o&255]);return{space:u,values:l,alpha:n}}}}),tle=ye({"node_modules/color-rgba/index.js"(e,r){"use strict";var t=ele();r.exports=function(o){Array.isArray(o)&&o.raw&&(o=String.raw.apply(null,arguments));var s,l,n,u=t(o);if(!u.space)return[];var c=[0,0,0],f=u.space[0]==="h"?[360,100,100]:[255,255,255];return s=Array(3),s[0]=Math.min(Math.max(u.values[0],c[0]),f[0]),s[1]=Math.min(Math.max(u.values[1],c[1]),f[1]),s[2]=Math.min(Math.max(u.values[2],c[2]),f[2]),u.space[0]==="h"&&(s=a(s)),s.push(Math.min(Math.max(u.alpha,0),1)),s};function a(i){var o=i[0]/360,s=i[1]/100,l=i[2]/100,n,u,c,f,h,d=0;if(s===0)return h=l*255,[h,h,h];for(u=l<.5?l*(1+s):l+s-l*s,n=2*l-u,f=[0,0,0];d<3;)c=o+1/3*-(d-1),c<0?c++:c>1&&c--,h=6*c<1?n+(u-n)*6*c:2*c<1?u:3*c<2?n+(u-n)*(2/3-c)*6:n,f[d++]=h*255;return f}}}),qb=ye({"node_modules/color-normalize/index.js"(e,r){"use strict";var t=tle(),a=EM();r.exports=function(s,l){(l==="float"||!l)&&(l="array"),l==="uint"&&(l="uint8"),l==="uint_clamped"&&(l="uint8_clamped");var n=a(l),u=new n(4),c=l!=="uint8"&&l!=="uint8_clamped";return(!s.length||typeof s=="string")&&(s=t(s),s[0]/=255,s[1]/=255,s[2]/=255),i(s)?(u[0]=s[0],u[1]=s[1],u[2]=s[2],u[3]=s[3]!=null?s[3]:255,c&&(u[0]/=255,u[1]/=255,u[2]/=255,u[3]/=255),u):(c?(u[0]=s[0],u[1]=s[1],u[2]=s[2],u[3]=s[3]!=null?s[3]:1):(u[0]=Math.min(Math.max(Math.floor(s[0]*255),0),255),u[1]=Math.min(Math.max(Math.floor(s[1]*255),0),255),u[2]=Math.min(Math.max(Math.floor(s[2]*255),0),255),u[3]=s[3]==null?255:Math.min(Math.max(Math.floor(s[3]*255),0),255)),u)};function i(o){return!!(o instanceof Uint8Array||o instanceof Uint8ClampedArray||Array.isArray(o)&&(o[0]>1||o[0]===0)&&(o[1]>1||o[1]===0)&&(o[2]>1||o[2]===0)&&(!o[3]||o[3]>1))}}}),rle=ye({"node_modules/color-id/index.js"(e,r){"use strict";var t=RP();r.exports=a,r.exports.to=a,r.exports.from=i;function a(o,s){s==null&&(s=!0);var l=o[0],n=o[1],u=o[2],c=o[3];c==null&&(c=s?1:255),s&&(l*=255,n*=255,u*=255,c*=255),l=t(l,0,255)&255,n=t(n,0,255)&255,u=t(u,0,255)&255,c=t(c,0,255)&255;var f=l*16777216+(n<<16)+(u<<8)+c;return f}function i(o,s){o=+o;var l=o>>>24,n=(o&16711680)>>>16,u=(o&65280)>>>8,c=o&255;return s===!1?[l,n,u,c]:[l/255,n/255,u/255,c/255]}}}),ale=ye({"node_modules/glslify/browser.js"(e,r){r.exports=function(t){typeof t=="string"&&(t=[t]);for(var a=[].slice.call(arguments,1),i=[],o=0;o[this.tooManyColors?0:w,_.height],pixelRatio:g.context("pixelRatio"),scale:g.prop("scale"),scaleFract:g.prop("scaleFract"),translate:g.prop("translate"),translateFract:g.prop("translateFract"),markerTexture:g.prop("markerTexture"),paletteTexture:_},attributes:{x:(A,F)=>F.xAttr||{buffer:F.positionBuffer,stride:8,offset:0},y:(A,F)=>F.yAttr||{buffer:F.positionBuffer,stride:8,offset:4},xFract:(A,F)=>F.xAttr?{constant:[0,0]}:{buffer:F.positionFractBuffer,stride:8,offset:0},yFract:(A,F)=>F.yAttr?{constant:[0,0]}:{buffer:F.positionFractBuffer,stride:8,offset:4},size:(A,F)=>F.size.length?{buffer:F.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(F.size*255/this.maxSize)]},borderSize:(A,F)=>F.borderSize.length?{buffer:F.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(F.borderSize*255/this.maxSize)]},colorId:(A,F)=>F.color.length?{buffer:F.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?v.slice(F.color*4,F.color*4+4):[F.color]},borderColorId:(A,F)=>F.borderColor.length?{buffer:F.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?v.slice(F.borderColor*4,F.borderColor*4+4):[F.borderColor]},isActive:(A,F)=>F.activation===!0?{constant:[1]}:F.activation?F.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:g.prop("viewport")},viewport:g.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:g.prop("elements"),count:g.prop("count"),offset:g.prop("offset"),primitive:"points"},b=Object.assign({},T);b.frag=s([`precision highp float; +`]);e.createShader=function(m){var h=n(m,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createPickShader=function(m){var h=n(m,a,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createContourShader=function(m){var h=n(m,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h},e.createPickContourShader=function(m){var h=n(m,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h}},9499:function(l,e,t){"use strict";l.exports=Y;var n=t(8828),r=t(2762),a=t(8116),o=t(7766),s=t(1888),c=t(6729),m=t(5298),h=t(9994),v=t(9618),g=t(3711),i=t(6760),w=t(7608),S=t(2478),M=t(6199),C=t(990),_=C.createShader,T=C.createContourShader,f=C.createPickShader,u=C.createPickContourShader,A=4*10,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var q=0;q<3;++q){var Z=I[q],ee=(q+1)%3,ae=(q+2)%3;Z[ee+0]=1,Z[ae+3]=1,Z[q+6]=1}})();function O(q,Z,ee,ae,he){this.position=q,this.index=Z,this.uv=ee,this.level=ae,this.dataCoordinate=he}var D=256;function B(q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve,Ge,ke,_e,ce){this.gl=q,this.shape=Z,this.bounds=ee,this.objectOffset=ce,this.intensityBounds=[],this._shader=ae,this._pickShader=he,this._coordinateBuffer=xe,this._vao=we,this._colorMap=Me,this._contourShader=Se,this._contourPickShader=Ie,this._contourBuffer=Ve,this._contourVAO=Ge,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new O([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ke,this._dynamicVAO=_e,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=B.prototype;F.genColormap=function(q,Z){var ee=!1,ae=h([c({colormap:q,nshades:D,format:"rgba"}).map(function(he,xe){var we=Z?P(xe/255,Z):he[3];return we<1&&(ee=!0),[he[0],he[1],he[2],255*we]})]);return m.divseq(ae,255),this.hasAlphaScale=ee,ae},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(q){this.pickId=q};function P(q,Z){if(!Z||!Z.length)return 1;for(var ee=0;eeq&&ee>0){var ae=(Z[ee][0]-q)/(Z[ee][0]-Z[ee-1][0]);return Z[ee][1]*(1-ae)+ae*Z[ee-1][1]}}return 1}var j=[0,0,0],U={showSurface:!1,showContour:!1,projections:[x.slice(),x.slice(),x.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function $(q,Z){var ee,ae,he,xe=Z.axes&&Z.axes.lastCubeProps.axis||j,we=Z.showSurface,Me=Z.showContour;for(ee=0;ee<3;++ee)for(we=we||Z.surfaceProject[ee],ae=0;ae<3;++ae)Me=Me||Z.contourProject[ee][ae];for(ee=0;ee<3;++ee){var Se=U.projections[ee];for(ae=0;ae<16;++ae)Se[ae]=0;for(ae=0;ae<4;++ae)Se[5*ae]=1;Se[5*ee]=0,Se[12+ee]=Z.axesBounds[+(xe[ee]>0)][ee],i(Se,q.model,Se);var Ie=U.clipBounds[ee];for(he=0;he<2;++he)for(ae=0;ae<3;++ae)Ie[he][ae]=q.clipBounds[he][ae];Ie[0][ee]=-1e8,Ie[1][ee]=1e8}return U.showSurface=we,U.showContour=Me,U}var Q={model:x,view:x,projection:x,inverseModel:x.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},re=x.slice(),ne=[1,0,0,0,1,0,0,0,1];function se(q,Z){q=q||{};var ee=this.gl;ee.disable(ee.CULL_FACE),this._colorMap.bind(0);var ae=Q;ae.model=q.model||x,ae.view=q.view||x,ae.projection=q.projection||x,ae.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ae.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ae.objectOffset=this.objectOffset,ae.contourColor=this.contourColor[0],ae.inverseModel=w(ae.inverseModel,ae.model);for(var he=0;he<2;++he)for(var xe=ae.clipBounds[he],we=0;we<3;++we)xe[we]=Math.min(Math.max(this.clipBounds[he][we],-1e8),1e8);ae.kambient=this.ambientLight,ae.kdiffuse=this.diffuseLight,ae.kspecular=this.specularLight,ae.roughness=this.roughness,ae.fresnel=this.fresnel,ae.opacity=this.opacity,ae.height=0,ae.permutation=ne,ae.vertexColor=this.vertexColor;var Me=re;for(i(Me,ae.view,ae.model),i(Me,ae.projection,Me),w(Me,Me),he=0;he<3;++he)ae.eyePosition[he]=Me[12+he]/Me[15];var Se=Me[15];for(he=0;he<3;++he)Se+=this.lightPosition[he]*Me[4*he+3];for(he=0;he<3;++he){var Ie=Me[12+he];for(we=0;we<3;++we)Ie+=Me[4*we+he]*this.lightPosition[we];ae.lightPosition[he]=Ie/Se}var Ve=$(ae,this);if(Ve.showSurface){for(this._shader.bind(),this._shader.uniforms=ae,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ee.TRIANGLES,this._vertexCount),he=0;he<3;++he)!this.surfaceProject[he]||!this.vertexCount||(this._shader.uniforms.model=Ve.projections[he],this._shader.uniforms.clipBounds=Ve.clipBounds[he],this._vao.draw(ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ve.showContour){var Ge=this._contourShader;ae.kambient=1,ae.kdiffuse=0,ae.kspecular=0,ae.opacity=1,Ge.bind(),Ge.uniforms=ae;var ke=this._contourVAO;for(ke.bind(),he=0;he<3;++he)for(Ge.uniforms.permutation=I[he],ee.lineWidth(this.contourWidth[he]*this.pixelRatio),we=0;we>4)/16)/255,he=Math.floor(ae),xe=ae-he,we=Z[1]*(q.value[1]+(q.value[2]&15)/16)/255,Me=Math.floor(we),Se=we-Me;he+=1,Me+=1;var Ie=ee.position;Ie[0]=Ie[1]=Ie[2]=0;for(var Ve=0;Ve<2;++Ve)for(var Ge=Ve?xe:1-xe,ke=0;ke<2;++ke)for(var _e=ke?Se:1-Se,ce=he+Ve,ve=Me+ke,le=Ge*_e,Ae=0;Ae<3;++Ae)Ie[Ae]+=this._field[Ae].get(ce,ve)*le;for(var Be=this._pickResult.level,Xe=0;Xe<3;++Xe)if(Be[Xe]=S.le(this.contourLevels[Xe],Ie[Xe]),Be[Xe]<0)this.contourLevels[Xe].length>0&&(Be[Xe]=0);else if(Be[Xe]Math.abs(yt-Ie[Xe])&&(Be[Xe]+=1)}for(ee.index[0]=xe<.5?he:he+1,ee.index[1]=Se<.5?Me:Me+1,ee.uv[0]=ae/Z[0],ee.uv[1]=we/Z[1],Ae=0;Ae<3;++Ae)ee.dataCoordinate[Ae]=this._field[Ae].get(ee.index[0],ee.index[1]);return ee},F.padField=function(q,Z){var ee=Z.shape.slice(),ae=q.shape.slice();m.assign(q.lo(1,1).hi(ee[0],ee[1]),Z),m.assign(q.lo(1).hi(ee[0],1),Z.hi(ee[0],1)),m.assign(q.lo(1,ae[1]-1).hi(ee[0],1),Z.lo(0,ee[1]-1).hi(ee[0],1)),m.assign(q.lo(0,1).hi(1,ee[1]),Z.hi(1)),m.assign(q.lo(ae[0]-1,1).hi(1,ee[1]),Z.lo(ee[0]-1)),q.set(0,0,Z.get(0,0)),q.set(0,ae[1]-1,Z.get(0,ee[1]-1)),q.set(ae[0]-1,0,Z.get(ee[0]-1,0)),q.set(ae[0]-1,ae[1]-1,Z.get(ee[0]-1,ee[1]-1))};function X(q,Z){return Array.isArray(q)?[Z(q[0]),Z(q[1]),Z(q[2])]:[Z(q),Z(q),Z(q)]}function K(q){return Array.isArray(q)?q.length===3?[q[0],q[1],q[2],1]:[q[0],q[1],q[2],q[3]]:[0,0,0,1]}function H(q){if(Array.isArray(q)){if(Array.isArray(q))return[K(q[0]),K(q[1]),K(q[2])];var Z=K(q);return[Z.slice(),Z.slice(),Z.slice()]}}F.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=X(q.contourWidth,Number)),"showContour"in q&&(this.showContour=X(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=X(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=H(q.contourColor)),"contourProject"in q&&(this.contourProject=X(q.contourProject,function(on){return X(on,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=H(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=X(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=X(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var Z=q.field||q.coords&&q.coords[2]||null,ee=!1;if(Z||(this._field[2].shape[0]||this._field[2].shape[2]?Z=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Z=this._field[2].hi(0,0)),"field"in q||"coords"in q){var ae=(Z.shape[0]+2)*(Z.shape[1]+2);ae>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(ae))),this._field[2]=v(this._field[2].data,[Z.shape[0]+2,Z.shape[1]+2]),this.padField(this._field[2],Z),this.shape=Z.shape.slice();for(var he=this.shape,xe=0;xe<2;++xe)this._field[2].size>this._field[xe].data.length&&(s.freeFloat(this._field[xe].data),this._field[xe].data=s.mallocFloat(this._field[2].size)),this._field[xe]=v(this._field[xe].data,[he[0]+2,he[1]+2]);if(q.coords){var we=q.coords;if(!Array.isArray(we)||we.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(xe=0;xe<2;++xe){var Me=we[xe];for(ke=0;ke<2;++ke)if(Me.shape[ke]!==he[ke])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[xe],Me)}}else if(q.ticks){var Se=q.ticks;if(!Array.isArray(Se)||Se.length!==2)throw new Error("gl-surface: invalid ticks");for(xe=0;xe<2;++xe){var Ie=Se[xe];if((Array.isArray(Ie)||Ie.length)&&(Ie=v(Ie)),Ie.shape[0]!==he[xe])throw new Error("gl-surface: invalid tick length");var Ve=v(Ie.data,he);Ve.stride[xe]=Ie.stride[0],Ve.stride[xe^1]=0,this.padField(this._field[xe],Ve)}}else{for(xe=0;xe<2;++xe){var Ge=[0,0];Ge[xe]=1,this._field[xe]=v(this._field[xe].data,[he[0]+2,he[1]+2],Ge,0)}this._field[0].set(0,0,0);for(var ke=0;ke0){for(var li=0;li<5;++li)Vt.pop();De-=1}continue e}}}Yt.push(De)}this._contourOffsets[Ht]=Kr,this._contourCounts[Ht]=Yt}var Yn=s.mallocFloat(Vt.length);for(xe=0;xeO||z<0||z>O)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[x,z],A.bind(),I.texImage2D(I.TEXTURE_2D,0,A.format,x,z,0,A.format,A.type,null),A._mipLevels=[0],A}function i(A,x,z,I,O,D){this.gl=A,this.handle=x,this.format=O,this.type=D,this._shape=[z,I],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var B=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return B._wrapS},set:function(j){return B.wrapS=j}},{get:function(){return B._wrapT},set:function(j){return B.wrapT=j}}]),this._wrapVector=F;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return B._shape[0]},set:function(j){return B.width=j}},{get:function(){return B._shape[1]},set:function(j){return B.height=j}}]),this._shapeVector=P}var w=i.prototype;Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(A)>=0&&(x.getExtension("OES_texture_float_linear")||(A=x.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(A)>=0&&(x.getExtension("OES_texture_float_linear")||(A=x.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var x=this._anisoSamples;if(this._anisoSamples=Math.max(A,1)|0,x!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var x=0;x<2;++x)if(c.indexOf(A[x])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(!Array.isArray(A))A=[A|0,A|0];else if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return g(this,A[0]|0,A[1]|0),[A[0]|0,A[1]|0]}},width:{get:function(){return this._shape[0]},set:function(A){return A=A|0,g(this,A,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A=A|0,g(this,this._shape[0],A),A}}}),w.bind=function(A){var x=this.gl;return A!==void 0&&x.activeTexture(x.TEXTURE0+(A|0)),x.bindTexture(x.TEXTURE_2D,this.handle),A!==void 0?A|0:x.getParameter(x.ACTIVE_TEXTURE)-x.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),x=0;A>0;++x,A>>>=1)this._mipLevels.indexOf(x)<0&&this._mipLevels.push(x)},w.setPixels=function(A,x,z,I){var O=this.gl;this.bind(),Array.isArray(x)?(I=z,z=x[1]|0,x=x[0]|0):(x=x||0,z=z||0),I=I||0;var D=h(A)?A:A.raw;if(D){var B=this._mipLevels.indexOf(I)<0;B?(O.texImage2D(O.TEXTURE_2D,0,this.format,this.format,this.type,D),this._mipLevels.push(I)):O.texSubImage2D(O.TEXTURE_2D,I,x,z,this.format,this.type,D)}else if(A.shape&&A.stride&&A.data){if(A.shape.length<2||x+A.shape[1]>this._shape[1]>>>I||z+A.shape[0]>this._shape[0]>>>I||x<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(O,x,z,I,this.format,this.type,this._mipLevels,A)}else throw new Error("gl-texture2d: Unsupported data type")};function S(A,x){return A.length===3?x[2]===1&&x[1]===A[0]*A[2]&&x[0]===A[2]:x[0]===1&&x[1]===A[0]}function M(A,x,z,I,O,D,B,F){var P=F.dtype,j=F.shape.slice();if(j.length<2||j.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var U=0,$=0,Q=S(j,F.stride.slice());P==="float32"?U=A.FLOAT:P==="float64"?(U=A.FLOAT,Q=!1,P="float32"):P==="uint8"?U=A.UNSIGNED_BYTE:(U=A.UNSIGNED_BYTE,Q=!1,P="uint8");var re=1;if(j.length===2)$=A.LUMINANCE,j=[j[0],j[1],1],F=n(F.data,j,[F.stride[0],F.stride[1],1],F.offset);else if(j.length===3){if(j[2]===1)$=A.ALPHA;else if(j[2]===2)$=A.LUMINANCE_ALPHA;else if(j[2]===3)$=A.RGB;else if(j[2]===4)$=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");re=j[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if(($===A.LUMINANCE||$===A.ALPHA)&&(O===A.LUMINANCE||O===A.ALPHA)&&($=O),$!==O)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ne=F.size,se=B.indexOf(I)<0;if(se&&B.push(I),U===D&&Q)F.offset===0&&F.data.length===ne?se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,F.data):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,F.data):se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,F.data.subarray(F.offset,F.offset+ne)):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,F.data.subarray(F.offset,F.offset+ne));else{var G;D===A.FLOAT?G=a.mallocFloat32(ne):G=a.mallocUint8(ne);var X=n(G,j,[j[2],j[2]*j[0],1]);U===A.FLOAT&&D===A.UNSIGNED_BYTE?v(X,F):r.assign(X,F),se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,G.subarray(0,ne)):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,G.subarray(0,ne)),D===A.FLOAT?a.freeFloat32(G):a.freeUint8(G)}}function C(A){var x=A.createTexture();return A.bindTexture(A.TEXTURE_2D,x),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),x}function _(A,x,z,I,O){var D=A.getParameter(A.MAX_TEXTURE_SIZE);if(x<0||x>D||z<0||z>D)throw new Error("gl-texture2d: Invalid texture shape");if(O===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,I,x,z,0,I,O,null),new i(A,B,x,z,I,O)}function T(A,x,z,I,O,D){var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,O,O,D,x),new i(A,B,z,I,O,D)}function f(A,x){var z=x.dtype,I=x.shape.slice(),O=A.getParameter(A.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>O||I[1]<0||I[1]>O)throw new Error("gl-texture2d: Invalid texture size");var D=S(I,x.stride.slice()),B=0;z==="float32"?B=A.FLOAT:z==="float64"?(B=A.FLOAT,D=!1,z="float32"):z==="uint8"?B=A.UNSIGNED_BYTE:(B=A.UNSIGNED_BYTE,D=!1,z="uint8");var F=0;if(I.length===2)F=A.LUMINANCE,I=[I[0],I[1],1],x=n(x.data,I,[x.stride[0],x.stride[1],1],x.offset);else if(I.length===3)if(I[2]===1)F=A.ALPHA;else if(I[2]===2)F=A.LUMINANCE_ALPHA;else if(I[2]===3)F=A.RGB;else if(I[2]===4)F=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");B===A.FLOAT&&!A.getExtension("OES_texture_float")&&(B=A.UNSIGNED_BYTE,D=!1);var P,j,U=x.size;if(D)x.offset===0&&x.data.length===U?P=x.data:P=x.data.subarray(x.offset,x.offset+U);else{var $=[I[2],I[2]*I[0],1];j=a.malloc(U,z);var Q=n(j,I,$,0);(z==="float32"||z==="float64")&&B===A.UNSIGNED_BYTE?v(Q,x):r.assign(Q,x),P=j.subarray(0,U)}var re=C(A);return A.texImage2D(A.TEXTURE_2D,0,F,I[0],I[1],0,F,B,P),D||a.free(j),new i(A,re,I[0],I[1],F,B)}function u(A){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||m(A),typeof arguments[1]=="number")return _(A,arguments[1],arguments[2],arguments[3]||A.RGBA,arguments[4]||A.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(A,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var x=arguments[1],z=h(x)?x:x.raw;if(z)return T(A,z,x.width|0,x.height|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(x.shape&&x.data&&x.stride)return f(A,x)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(l){"use strict";function e(t,n,r){n?n.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var a=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(r){if(r.length>a)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o1?0:Math.acos(v)}},9226:function(l){l.exports=e;function e(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}},3126:function(l){l.exports=e;function e(t){var n=new Float32Array(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}},3990:function(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}},1091:function(l){l.exports=e;function e(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2];return t[0]=o*h-s*m,t[1]=s*c-a*h,t[2]=a*m-o*c,t}},5455:function(l,e,t){l.exports=t(7056)},7056:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+a*a+o*o)}},4008:function(l,e,t){l.exports=t(6690)},6690:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}},244:function(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}},2613:function(l){l.exports=1e-6},9922:function(l,e,t){l.exports=r;var n=t(2613);function r(a,o){var s=a[0],c=a[1],m=a[2],h=o[0],v=o[1],g=o[2];return Math.abs(s-h)<=n*Math.max(1,Math.abs(s),Math.abs(h))&&Math.abs(c-v)<=n*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(m-g)<=n*Math.max(1,Math.abs(m),Math.abs(g))}},9265:function(l){l.exports=e;function e(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}},2681:function(l){l.exports=e;function e(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}},5137:function(l,e,t){l.exports=r;var n=t(1091)();function r(a,o,s,c,m,h){var v,g;for(o||(o=3),s||(s=0),c?g=Math.min(c*o+s,a.length):g=a.length,v=s;v0&&(s=1/Math.sqrt(s),t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s),t}},7636:function(l){l.exports=e;function e(t,n){n=n||1;var r=Math.random()*2*Math.PI,a=Math.random()*2-1,o=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=a*n,t}},6894:function(l){l.exports=e;function e(t,n,r,a){var o=r[1],s=r[2],c=n[1]-o,m=n[2]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=n[0],t[1]=o+c*v-m*h,t[2]=s+c*h+m*v,t}},109:function(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[2],c=n[0]-o,m=n[2]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=o+m*h+c*v,t[1]=n[1],t[2]=s+m*v-c*h,t}},8692:function(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[1],c=n[0]-o,m=n[1]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=o+c*v-m*h,t[1]=s+c*h+m*v,t[2]=n[2],t}},2447:function(l){l.exports=e;function e(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}},6621:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}},8489:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t}},1463:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t}},6141:function(l,e,t){l.exports=t(2953)},5486:function(l,e,t){l.exports=t(3066)},2953:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return r*r+a*a+o*o}},3066:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}},2229:function(l,e,t){l.exports=t(6843)},6843:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}},492:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2];return t[0]=a*r[0]+o*r[3]+s*r[6],t[1]=a*r[1]+o*r[4]+s*r[7],t[2]=a*r[2]+o*r[5]+s*r[8],t}},5673:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[3]*a+r[7]*o+r[11]*s+r[15];return c=c||1,t[0]=(r[0]*a+r[4]*o+r[8]*s+r[12])/c,t[1]=(r[1]*a+r[5]*o+r[9]*s+r[13])/c,t[2]=(r[2]*a+r[6]*o+r[10]*s+r[14])/c,t}},264:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2],v=r[3],g=v*a+m*s-h*o,i=v*o+h*a-c*s,w=v*s+c*o-m*a,S=-c*a-m*o-h*s;return t[0]=g*v+S*-c+i*-h-w*-m,t[1]=i*v+S*-m+w*-c-g*-h,t[2]=w*v+S*-h+g*-m-i*-c,t}},4361:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t}},2335:function(l){l.exports=e;function e(t){var n=new Float32Array(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n}},2933:function(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}},7536:function(l){l.exports=e;function e(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return Math.sqrt(r*r+a*a+o*o+s*s)}},1373:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t[3]=n[3]/r[3],t}},3750:function(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}},3390:function(l){l.exports=e;function e(t,n,r,a){var o=new Float32Array(4);return o[0]=t,o[1]=n,o[2]=r,o[3]=a,o}},9970:function(l,e,t){l.exports={create:t(7536),clone:t(2335),fromValues:t(3390),copy:t(2933),set:t(4578),add:t(4361),subtract:t(6860),multiply:t(3576),divide:t(1373),min:t(2334),max:t(160),scale:t(9288),scaleAndAdd:t(4844),distance:t(4691),squaredDistance:t(7960),length:t(6808),squaredLength:t(483),negate:t(1498),inverse:t(4494),normalize:t(5177),dot:t(3750),lerp:t(2573),random:t(9131),transformMat4:t(5352),transformQuat:t(4041)}},4494:function(l){l.exports=e;function e(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t}},6808:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return Math.sqrt(n*n+r*r+a*a+o*o)}},2573:function(l){l.exports=e;function e(t,n,r,a){var o=n[0],s=n[1],c=n[2],m=n[3];return t[0]=o+a*(r[0]-o),t[1]=s+a*(r[1]-s),t[2]=c+a*(r[2]-c),t[3]=m+a*(r[3]-m),t}},160:function(l){l.exports=e;function e(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t[3]=Math.max(n[3],r[3]),t}},2334:function(l){l.exports=e;function e(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t[3]=Math.min(n[3],r[3]),t}},3576:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t[3]=n[3]*r[3],t}},1498:function(l){l.exports=e;function e(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t}},5177:function(l){l.exports=e;function e(t,n){var r=n[0],a=n[1],o=n[2],s=n[3],c=r*r+a*a+o*o+s*s;return c>0&&(c=1/Math.sqrt(c),t[0]=r*c,t[1]=a*c,t[2]=o*c,t[3]=s*c),t}},9131:function(l,e,t){var n=t(5177),r=t(9288);l.exports=a;function a(o,s){return s=s||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),n(o,o),r(o,o,s),o}},9288:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t}},4844:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t}},4578:function(l){l.exports=e;function e(t,n,r,a,o){return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t}},7960:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return r*r+a*a+o*o+s*s}},483:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return n*n+r*r+a*a+o*o}},6860:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t}},5352:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=n[3];return t[0]=r[0]*a+r[4]*o+r[8]*s+r[12]*c,t[1]=r[1]*a+r[5]*o+r[9]*s+r[13]*c,t[2]=r[2]*a+r[6]*o+r[10]*s+r[14]*c,t[3]=r[3]*a+r[7]*o+r[11]*s+r[15]*c,t}},4041:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2],v=r[3],g=v*a+m*s-h*o,i=v*o+h*a-c*s,w=v*s+c*o-m*a,S=-c*a-m*o-h*s;return t[0]=g*v+S*-c+i*-h-w*-m,t[1]=i*v+S*-m+w*-c-g*-h,t[2]=w*v+S*-h+g*-m-i*-c,t[3]=n[3],t}},1848:function(l,e,t){var n=t(4905),r=t(6468);l.exports=a;function a(o){for(var s=Array.isArray(o)?o:n(o),c=0;c0)continue;Xe=le.slice(0,1).join("")}return ee(Xe),ne+=Xe.length,P=P.slice(Xe.length),P.length}while(!0)}function ke(){return/[^a-fA-F0-9]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function _e(){return B==="."||/[eE]/.test(B)?(P.push(B),D=S,F=B,I+1):B==="x"&&P.length===1&&P[0]==="0"?(D=u,P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ce(){return B==="f"&&(P.push(B),F=B,I+=1),/[eE]/.test(B)||(B==="-"||B==="+")&&/[eE]/.test(F)?(P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ve(){if(/[^\d\w_]/.test(B)){var le=P.join("");return Z[le]?D=_:q[le]?D=C:D=M,ee(P.join("")),D=c,I}return P.push(B),F=B,I+1}}},3508:function(l,e,t){var n=t(6852);n=n.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(l){l.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(l,e,t){var n=t(620);l.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(l,e,t){var n=t(5874);l.exports=r;function r(a,o){var s=n(o),c=[];return c=c.concat(s(a)),c=c.concat(s(null)),c}},3236:function(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r>1,g=-7,i=r?o-1:0,w=r?-1:1,S=t[n+i];for(i+=w,s=S&(1<<-g)-1,S>>=-g,g+=m;g>0;s=s*256+t[n+i],i+=w,g-=8);for(c=s&(1<<-g)-1,s>>=-g,g+=a;g>0;c=c*256+t[n+i],i+=w,g-=8);if(s===0)s=1-v;else{if(s===h)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,a),s=s-v}return(S?-1:1)*c*Math.pow(2,s-a)},e.write=function(t,n,r,a,o,s){var c,m,h,v=s*8-o-1,g=(1<>1,w=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=a?0:s-1,M=a?1:-1,C=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(m=isNaN(n)?1:0,c=g):(c=Math.floor(Math.log(n)/Math.LN2),n*(h=Math.pow(2,-c))<1&&(c--,h*=2),c+i>=1?n+=w/h:n+=w*Math.pow(2,1-i),n*h>=2&&(c++,h/=2),c+i>=g?(m=0,c=g):c+i>=1?(m=(n*h-1)*Math.pow(2,o),c=c+i):(m=n*Math.pow(2,i-1)*Math.pow(2,o),c=0));o>=8;t[r+S]=m&255,S+=M,m/=256,o-=8);for(c=c<0;t[r+S]=c&255,S+=M,c/=256,v-=8);t[r+S-M]|=C*128}},8954:function(l,e,t){"use strict";l.exports=i;var n=t(3250),r=t(6803).Fw;function a(w,S,M){this.vertices=w,this.adjacent=S,this.boundary=M,this.lastVisited=-1}a.prototype.flip=function(){var w=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=w;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function o(w,S,M){this.vertices=w,this.cell=S,this.index=M}function s(w,S){return r(w.vertices,S.vertices)}function c(w){return function(){var S=this.tuple;return w.apply(this,S)}}function m(w){var S=n[w+1];return S||(S=n),c(S)}var h=[];function v(w,S,M){this.dimension=w,this.vertices=S,this.simplices=M,this.interior=M.filter(function(T){return!T.boundary}),this.tuple=new Array(w+1);for(var C=0;C<=w;++C)this.tuple[C]=this.vertices[C];var _=h[w];_||(_=h[w]=m(w)),this.orient=_}var g=v.prototype;g.handleBoundaryDegeneracy=function(w,S){var M=this.dimension,C=this.vertices.length-1,_=this.tuple,T=this.vertices,f=[w];for(w.lastVisited=-C;f.length>0;){w=f.pop();for(var u=w.adjacent,A=0;A<=M;++A){var x=u[A];if(!(!x.boundary||x.lastVisited<=-C)){for(var z=x.vertices,I=0;I<=M;++I){var O=z[I];O<0?_[I]=S:_[I]=T[O]}var D=this.orient();if(D>0)return x;x.lastVisited=-C,D===0&&f.push(x)}}}return null},g.walk=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=S?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[f];e:for(;!u.boundary;){for(var A=u.vertices,x=u.adjacent,z=0;z<=C;++z)T[z]=_[A[z]];u.lastVisited=M;for(var z=0;z<=C;++z){var I=x[z];if(!(I.lastVisited>=M)){var O=T[z];T[z]=w;var D=this.orient();if(T[z]=O,D<0){u=I;continue e}else I.boundary?I.lastVisited=-M:I.lastVisited=M}}return}return u},g.addPeaks=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=this.interior,u=this.simplices,A=[S];S.lastVisited=M,S.vertices[S.vertices.indexOf(-1)]=M,S.boundary=!1,f.push(S);for(var x=[];A.length>0;){var S=A.pop(),z=S.vertices,I=S.adjacent,O=z.indexOf(M);if(!(O<0)){for(var D=0;D<=C;++D)if(D!==O){var B=I[D];if(!(!B.boundary||B.lastVisited>=M)){var F=B.vertices;if(B.lastVisited!==-M){for(var P=0,j=0;j<=C;++j)F[j]<0?(P=j,T[j]=w):T[j]=_[F[j]];var U=this.orient();if(U>0){F[P]=M,B.boundary=!1,f.push(B),A.push(B),B.lastVisited=M;continue}else B.lastVisited=-M}var $=B.adjacent,Q=z.slice(),re=I.slice(),ne=new a(Q,re,!0);u.push(ne);var se=$.indexOf(S);if(!(se<0)){$[se]=ne,re[O]=B,Q[D]=-1,re[D]=S,I[D]=ne,ne.flip();for(var j=0;j<=C;++j){var G=Q[j];if(!(G<0||G===M)){for(var X=new Array(C-1),K=0,H=0;H<=C;++H){var Y=Q[H];Y<0||H===j||(X[K++]=Y)}x.push(new o(X,ne,j))}}}}}}}x.sort(s);for(var D=0;D+1=0?f[A++]=u[z]:x=z&1;if(x===(w&1)){var I=f[0];f[0]=f[1],f[1]=I}S.push(f)}}return S};function i(w,S){var M=w.length;if(M===0)throw new Error("Must have at least d+1 points");var C=w[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var _=w.slice(0,C+1),T=n.apply(void 0,_);if(T===0)throw new Error("Input not in general position");for(var f=new Array(C+1),u=0;u<=C;++u)f[u]=u;T<0&&(f[0]=1,f[1]=0);for(var A=new a(f,new Array(C+1),!1),x=A.adjacent,z=new Array(C+2),u=0;u<=C;++u){for(var I=f.slice(),O=0;O<=C;++O)O===u&&(I[O]=-1);var D=I[0];I[0]=I[1],I[1]=D;var B=new a(I,new Array(C+1),!0);x[u]=B,z[u]=B}z[C+1]=A;for(var u=0;u<=C;++u)for(var I=x[u].vertices,F=x[u].adjacent,O=0;O<=C;++O){var P=I[O];if(P<0){F[O]=A;continue}for(var j=0;j<=C;++j)x[j].vertices.indexOf(P)<0&&(F[O]=x[j])}for(var U=new v(C,_,z),$=!!S,u=C+1;u3*(z+1)?v(this,x):this.left.insert(x):this.left=T([x]);else if(x[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?v(this,x):this.right.insert(x):this.right=T([x]);else{var I=n.ge(this.leftPoints,x,C),O=n.ge(this.rightPoints,x,_);this.leftPoints.splice(I,0,x),this.rightPoints.splice(O,0,x)}},c.remove=function(x){var z=this.count-this.leftPoints;if(x[1]3*(z-1))return g(this,x);var O=this.left.remove(x);return O===o?(this.left=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else if(x[0]>this.mid){if(!this.right)return r;var D=this.left?this.left.count:0;if(4*D>3*(z-1))return g(this,x);var O=this.right.remove(x);return O===o?(this.right=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else{if(this.count===1)return this.leftPoints[0]===x?o:r;if(this.leftPoints.length===1&&this.leftPoints[0]===x){if(this.left&&this.right){for(var B=this,F=this.left;F.right;)B=F,F=F.right;if(B===this)F.right=this.right;else{var P=this.left,O=this.right;B.count-=F.count,B.right=F.left,F.left=P,F.right=O}m(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return a}for(var P=n.ge(this.leftPoints,x,C);P=0&&x[O][1]>=z;--O){var D=I(x[O]);if(D)return D}}function S(x,z){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(x,z);if(I)return I}return w(this.rightPoints,x,z)}else return S(this.leftPoints,z)},c.queryInterval=function(x,z,I){if(xthis.mid&&this.right){var O=this.right.queryInterval(x,z,I);if(O)return O}return zthis.mid?w(this.rightPoints,x,I):S(this.leftPoints,I)};function M(x,z){return x-z}function C(x,z){var I=x[0]-z[0];return I||x[1]-z[1]}function _(x,z){var I=x[1]-z[1];return I||x[0]-z[0]}function T(x){if(x.length===0)return null;for(var z=[],I=0;I>1],D=[],B=[],F=[],I=0;I13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}},395:function(l){function e(t,n,r){return t*(1-r)+n*r}l.exports=e},2652:function(l,e,t){var n=t(4335),r=t(6864),a=t(1903),o=t(9921),s=t(7608),c=t(5665),m={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},h=r(),v=r(),g=[0,0,0,0],i=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];l.exports=function(T,f,u,A,x,z){if(f||(f=[0,0,0]),u||(u=[0,0,0]),A||(A=[0,0,0]),x||(x=[0,0,0,1]),z||(z=[0,0,0,1]),!n(h,T)||(a(v,h),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(o(v)<1e-8)))return!1;var I=h[3],O=h[7],D=h[11],B=h[12],F=h[13],P=h[14],j=h[15];if(I!==0||O!==0||D!==0){g[0]=I,g[1]=O,g[2]=D,g[3]=j;var U=s(v,v);if(!U)return!1;c(v,v),S(x,g,v)}else x[0]=x[1]=x[2]=0,x[3]=1;if(f[0]=B,f[1]=F,f[2]=P,M(i,h),u[0]=m.length(i[0]),m.normalize(i[0],i[0]),A[0]=m.dot(i[0],i[1]),C(i[1],i[1],i[0],1,-A[0]),u[1]=m.length(i[1]),m.normalize(i[1],i[1]),A[0]/=u[1],A[1]=m.dot(i[0],i[2]),C(i[2],i[2],i[0],1,-A[1]),A[2]=m.dot(i[1],i[2]),C(i[2],i[2],i[1],1,-A[2]),u[2]=m.length(i[2]),m.normalize(i[2],i[2]),A[1]/=u[2],A[2]/=u[2],m.cross(w,i[1],i[2]),m.dot(i[0],w)<0)for(var $=0;$<3;$++)u[$]*=-1,i[$][0]*=-1,i[$][1]*=-1,i[$][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+i[0][0]-i[1][1]-i[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-i[0][0]+i[1][1]-i[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-i[0][0]-i[1][1]+i[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+i[0][0]+i[1][1]+i[2][2],0)),i[2][1]>i[1][2]&&(z[0]=-z[0]),i[0][2]>i[2][0]&&(z[1]=-z[1]),i[1][0]>i[0][1]&&(z[2]=-z[2]),!0};function S(_,T,f){var u=T[0],A=T[1],x=T[2],z=T[3];return _[0]=f[0]*u+f[4]*A+f[8]*x+f[12]*z,_[1]=f[1]*u+f[5]*A+f[9]*x+f[13]*z,_[2]=f[2]*u+f[6]*A+f[10]*x+f[14]*z,_[3]=f[3]*u+f[7]*A+f[11]*x+f[15]*z,_}function M(_,T){_[0][0]=T[0],_[0][1]=T[1],_[0][2]=T[2],_[1][0]=T[4],_[1][1]=T[5],_[1][2]=T[6],_[2][0]=T[8],_[2][1]=T[9],_[2][2]=T[10]}function C(_,T,f,u,A){_[0]=T[0]*u+f[0]*A,_[1]=T[1]*u+f[1]*A,_[2]=T[2]*u+f[2]*A}},4335:function(l){l.exports=function(t,n){var r=n[15];if(r===0)return!1;for(var a=1/r,o=0;o<16;o++)t[o]=n[o]*a;return!0}},7442:function(l,e,t){var n=t(6658),r=t(7182),a=t(2652),o=t(9921),s=t(8648),c=g(),m=g(),h=g();l.exports=v;function v(S,M,C,_){if(o(M)===0||o(C)===0)return!1;var T=a(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion),f=a(C,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!T||!f?!1:(n(h.translate,c.translate,m.translate,_),n(h.skew,c.skew,m.skew,_),n(h.scale,c.scale,m.scale,_),n(h.perspective,c.perspective,m.perspective,_),s(h.quaternion,c.quaternion,m.quaternion,_),r(S,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function g(){return{translate:i(),scale:i(1),skew:i(),perspective:w(),quaternion:w()}}function i(S){return[S||0,S||0,S||0]}function w(){return[0,0,0,1]}},7182:function(l,e,t){var n={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=n.create(),a=n.create();l.exports=function(s,c,m,h,v,g){return n.identity(s),n.fromRotationTranslation(s,g,c),s[3]=v[0],s[7]=v[1],s[11]=v[2],s[15]=v[3],n.identity(a),h[2]!==0&&(a[9]=h[2],n.multiply(s,s,a)),h[1]!==0&&(a[9]=0,a[8]=h[1],n.multiply(s,s,a)),h[0]!==0&&(a[8]=0,a[4]=h[0],n.multiply(s,s,a)),n.scale(s,s,m),s}},1811:function(l,e,t){"use strict";var n=t(2478),r=t(7442),a=t(7608),o=t(5567),s=t(2408),c=t(7089),m=t(6582),h=t(7656),v=t(2504),g=t(3536),i=[0,0,0];l.exports=C;function w(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var S=w.prototype;S.recalcMatrix=function(_){var T=this._time,f=n.le(T,_),u=this.computedMatrix;if(!(f<0)){var A=this._components;if(f===T.length-1)for(var x=16*f,z=0;z<16;++z)u[z]=A[x++];else{for(var I=T[f+1]-T[f],x=16*f,O=this.prevMatrix,D=!0,z=0;z<16;++z)O[z]=A[x++];for(var B=this.nextMatrix,z=0;z<16;++z)B[z]=A[x++],D=D&&O[z]===B[z];if(I<1e-6||D)for(var z=0;z<16;++z)u[z]=O[z];else r(u,O,B,(_-T[f])/I)}var F=this.computedUp;F[0]=u[1],F[1]=u[5],F[2]=u[9],g(F,F);var P=this.computedInverse;a(P,u);var j=this.computedEye,U=P[15];j[0]=P[12]/U,j[1]=P[13]/U,j[2]=P[14]/U;for(var $=this.computedCenter,Q=Math.exp(this.computedRadius[0]),z=0;z<3;++z)$[z]=j[z]-u[2+4*z]*Q}},S.idle=function(_){if(!(_1&&n(a[m[i-2]],a[m[i-1]],g)<=0;)i-=1,m.pop();for(m.push(v),i=h.length;i>1&&n(a[h[i-2]],a[h[i-1]],g)>=0;)i-=1,h.pop();h.push(v)}for(var w=new Array(h.length+m.length-2),S=0,s=0,M=m.length;s0;--C)w[S++]=h[C];return w}},351:function(l,e,t){"use strict";l.exports=r;var n=t(4687);function r(a,o){o||(o=a,a=window);var s=0,c=0,m=0,h={shift:!1,alt:!1,control:!1,meta:!1},v=!1;function g(x){var z=!1;return"altKey"in x&&(z=z||x.altKey!==h.alt,h.alt=!!x.altKey),"shiftKey"in x&&(z=z||x.shiftKey!==h.shift,h.shift=!!x.shiftKey),"ctrlKey"in x&&(z=z||x.ctrlKey!==h.control,h.control=!!x.ctrlKey),"metaKey"in x&&(z=z||x.metaKey!==h.meta,h.meta=!!x.metaKey),z}function i(x,z){var I=n.x(z),O=n.y(z);"buttons"in z&&(x=z.buttons|0),(x!==s||I!==c||O!==m||g(z))&&(s=x|0,c=I||0,m=O||0,o&&o(s,c,m,h))}function w(x){i(0,x)}function S(){(s||c||m||h.shift||h.alt||h.meta||h.control)&&(c=m=0,s=0,h.shift=h.alt=h.control=h.meta=!1,o&&o(0,0,0,h))}function M(x){g(x)&&o&&o(s,c,m,h)}function C(x){n.buttons(x)===0?i(0,x):i(s,x)}function _(x){i(s|n.buttons(x),x)}function T(x){i(s&~n.buttons(x),x)}function f(){v||(v=!0,a.addEventListener("mousemove",C),a.addEventListener("mousedown",_),a.addEventListener("mouseup",T),a.addEventListener("mouseleave",w),a.addEventListener("mouseenter",w),a.addEventListener("mouseout",w),a.addEventListener("mouseover",w),a.addEventListener("blur",S),a.addEventListener("keyup",M),a.addEventListener("keydown",M),a.addEventListener("keypress",M),a!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function u(){v&&(v=!1,a.removeEventListener("mousemove",C),a.removeEventListener("mousedown",_),a.removeEventListener("mouseup",T),a.removeEventListener("mouseleave",w),a.removeEventListener("mouseenter",w),a.removeEventListener("mouseout",w),a.removeEventListener("mouseover",w),a.removeEventListener("blur",S),a.removeEventListener("keyup",M),a.removeEventListener("keydown",M),a.removeEventListener("keypress",M),a!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}f();var A={element:a};return Object.defineProperties(A,{enabled:{get:function(){return v},set:function(x){x?f():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),A}},24:function(l){var e={left:0,top:0};l.exports=t;function t(r,a,o){a=a||r.currentTarget||r.srcElement,Array.isArray(o)||(o=[0,0]);var s=r.clientX||0,c=r.clientY||0,m=n(a);return o[0]=s-m.left,o[1]=c-m.top,o}function n(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687:function(l,e){"use strict";function t(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var s=o.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(re=1,G[K++]=h(f[z],S,M,C),z+=U,_>0)for(Q=1,I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==Z&&m(X[K+Y],Se,j,D,Me,Z,S,M,C)),K+=1,z+=U;for(z+=$,K=0,Ie=Y,Y=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,re=2;re0)for(Q=1,I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,F,j,he,Me,S,M,C)),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,F,j,he,Me,S,M,C),Me!==Z&&m(X[K+Y],Se,j,D,Me,Z,S,M,C)),K+=1,z+=U;re&1&&(K=0),Ie=Y,Y=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,z+=$}}g(X),g(G)}},"false,1,0":function(c,m,h,v,g){return function(w,S,M,C){var _=w.shape[0]|0,T=w.shape[1]|0,f=w.data,u=w.offset|0,A=w.stride[0]|0,x=w.stride[1]|0,z=u,I,O=-A|0,D=0,B=-x|0,F=0,P=-A-x|0,j=0,U=x|0,$=A-x*T|0,Q=0,re=0,ne=0,se=2*T|0,G=v(se),X=v(se),K=0,H=0,Y=-1,q=-1,Z=0,ee=-T|0,ae=T|0,he=0,xe=-T-1|0,we=T-1|0,Me=0,Se=0,Ie=0;for(re=0;re0){if(Q=1,G[K++]=h(f[z],S,M,C),z+=U,T>0)for(re=1,I=f[z],H=G[K]=h(I,S,M,C),he=G[K+ee],Z=G[K+Y],Me=G[K+xe],(H!==he||H!==Z||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,he,Z,Me,S,M,C),Se=X[K]=ne++),K+=1,z+=U,re=2;re0)for(re=1,I=f[z],H=G[K]=h(I,S,M,C),he=G[K+ee],Z=G[K+Y],Me=G[K+xe],(H!==he||H!==Z||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,he,Z,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,j,D,Me,he,S,M,C)),K+=1,z+=U,re=2;re 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var g=s.getters||[],i=new Array(h),w=0;w=0?i[w]=!0:i[w]=!1;return a(s.vertex,s.cell,s.phase,v,m,i)}},6199:function(l,e,t){"use strict";var n=t(1338),r={zero:function(C,_,T,f){var u=C[0],A=T[0];f|=0;var x=0,z=A;for(x=0;x2&&x[1]>2&&f(A.pick(-1,-1).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,0).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,1).lo(1,1).hi(x[0]-2,x[1]-2)),x[1]>2&&(T(A.pick(0,-1).lo(1).hi(x[1]-2),u.pick(0,-1,1).lo(1).hi(x[1]-2)),_(u.pick(0,-1,0).lo(1).hi(x[1]-2))),x[1]>2&&(T(A.pick(x[0]-1,-1).lo(1).hi(x[1]-2),u.pick(x[0]-1,-1,1).lo(1).hi(x[1]-2)),_(u.pick(x[0]-1,-1,0).lo(1).hi(x[1]-2))),x[0]>2&&(T(A.pick(-1,0).lo(1).hi(x[0]-2),u.pick(-1,0,0).lo(1).hi(x[0]-2)),_(u.pick(-1,0,1).lo(1).hi(x[0]-2))),x[0]>2&&(T(A.pick(-1,x[1]-1).lo(1).hi(x[0]-2),u.pick(-1,x[1]-1,0).lo(1).hi(x[0]-2)),_(u.pick(-1,x[1]-1,1).lo(1).hi(x[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(x[0]-1,0,0,0),u.set(x[0]-1,0,1,0),u.set(0,x[1]-1,0,0),u.set(0,x[1]-1,1,0),u.set(x[0]-1,x[1]-1,0,0),u.set(x[0]-1,x[1]-1,1,0),u}}function M(C){var _=C.join(),x=h[_];if(x)return x;for(var T=C.length,f=[g,i],u=1;u<=T;++u)f.push(w(u));var A=S,x=A.apply(void 0,f);return h[_]=x,x}l.exports=function(_,T,f){if(Array.isArray(f)||(typeof f=="string"?f=n(T.dimension,f):f=n(T.dimension,"clamp")),T.size===0)return _;if(T.dimension===0)return _.set(0),_;var u=M(f);return u(_,T)}},4317:function(l){"use strict";function e(o,s){var c=Math.floor(s),m=s-c,h=0<=c&&c0;){F<64?(_=F,F=0):(_=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(T=P,P=0):(T=64,P-=64),i=D+F*u+P*A,M=B+F*z+P*I;var j=0,U=0,$=0,Q=x,re=u-f*x,ne=A-_*u,se=O,G=z-f*O,X=I-_*z;for($=0;$0;){I<64?(_=I,I=0):(_=64,I-=64);for(var O=h[0]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),i=x+I*f+O*T,M=z+I*A+O*u;var D=0,B=0,F=f,P=T-_*f,j=A,U=u-_*A;for(B=0;B0;){B<64?(T=B,B=0):(T=64,B-=64);for(var F=h[0]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(_=P,P=0):(_=64,P-=64),i=O+B*A+F*f+P*u,M=D+B*I+F*x+P*z;var j=0,U=0,$=0,Q=A,re=f-T*A,ne=u-C*f,se=I,G=x-T*I,X=z-C*x;for($=0;$<_;++$){for(U=0;Uw;){j=0,U=D-_;t:for(F=0;FQ)break t;U+=x,j+=z}for(j=D,U=D-_,F=0;F>1,P=F-O,j=F+O,U=D,$=P,Q=F,re=j,ne=B,se=S+1,G=M-1,X=!0,K,H,Y,q,Z,ee,ae,he,xe,we=0,Me=0,Se=0,Ie,Ve,Ge,ke,_e,ce,ve,le,Ae,Be,Xe,Ye,yt,gt,Tt,At,$t=A,rr=g($t),_r=g($t);Ve=T*U,Ge=T*$,At=_;e:for(Ie=0;Ie0){H=U,U=$,$=H;break e}if(Se<0)break e;At+=z}Ve=T*re,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}Ve=T*U,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=U,U=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*U,Ge=T*re,At=_;e:for(Ie=0;Ie0){H=U,U=re,re=H;break e}if(Se<0)break e;At+=z}Ve=T*Q,Ge=T*re,At=_;e:for(Ie=0;Ie0){H=Q,Q=re,re=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=$,$=ne,ne=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*re,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}for(Ve=T*U,Ge=T*$,ke=T*Q,_e=T*re,ce=T*ne,ve=T*D,le=T*F,Ae=T*B,Tt=0,At=_,Ie=0;Ie0)G--;else if(Se<0){for(Ve=T*ee,Ge=T*se,ke=T*G,At=_,Ie=0;Ie0)for(;;){ae=_+G*T,Tt=0;e:for(Ie=0;Ie0){if(--GB){e:for(;;){for(ae=_+se*T,Tt=0,At=_,Ie=0;Ie1&&w?M(i,w[0],w[1]):M(i)}var m={"uint32,1,0":function(v,g){return function(i){var w=i.data,S=i.offset|0,M=i.shape,C=i.stride,_=C[0]|0,T=M[0]|0,f=C[1]|0,u=M[1]|0,A=f,x=f,z=1;T<=32?v(0,T-1,w,S,_,f,T,u,A,x,z):g(0,T-1,w,S,_,f,T,u,A,x,z)}}};function h(v,g){var i=[g,v].join(","),w=m[i],S=o(v,g),M=c(v,g,S);return w(S,M)}l.exports=h},446:function(l,e,t){"use strict";var n=t(7640),r={};function a(o){var s=o.order,c=o.dtype,m=[s,c],h=m.join(":"),v=r[h];return v||(r[h]=v=n(s,c)),v(o),o}l.exports=a},9618:function(l,e,t){var n=t(7163),r=typeof Float64Array<"u";function a(g,i){return g[0]-i[0]}function o(){var g=this.stride,i=new Array(g.length),w;for(w=0;w=0&&(f=_|0,T+=A*f,u-=f),new S(this.data,u,A,T)},M.step=function(_){var T=this.shape[0],f=this.stride[0],u=this.offset,A=0,x=Math.ceil;return typeof _=="number"&&(A=_|0,A<0?(u+=f*(T-1),T=x(-T/A)):T=x(T/A),f*=A),new S(this.data,T,f,u)},M.transpose=function(_){_=_===void 0?0:_|0;var T=this.shape,f=this.stride;return new S(this.data,T[_],f[_],this.offset)},M.pick=function(_){var T=[],f=[],u=this.offset;typeof _=="number"&&_>=0?u=u+this.stride[0]*_|0:(T.push(this.shape[0]),f.push(this.stride[0]));var A=i[T.length+1];return A(this.data,T,f,u)},function(_,T,f,u){return new S(_,T[0],f[0],u)}},2:function(g,i,w){function S(C,_,T,f,u,A){this.data=C,this.shape=[_,T],this.stride=[f,u],this.offset=A|0}var M=S.prototype;return M.dtype=g,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(_,T,f){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T,f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]=f},M.get=function(_,T){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]},M.index=function(_,T){return this.offset+this.stride[0]*_+this.stride[1]*T},M.hi=function(_,T){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(_,T){var f=this.offset,u=0,A=this.shape[0],x=this.shape[1],z=this.stride[0],I=this.stride[1];return typeof _=="number"&&_>=0&&(u=_|0,f+=z*u,A-=u),typeof T=="number"&&T>=0&&(u=T|0,f+=I*u,x-=u),new S(this.data,A,x,z,I,f)},M.step=function(_,T){var f=this.shape[0],u=this.shape[1],A=this.stride[0],x=this.stride[1],z=this.offset,I=0,O=Math.ceil;return typeof _=="number"&&(I=_|0,I<0?(z+=A*(f-1),f=O(-f/I)):f=O(f/I),A*=I),typeof T=="number"&&(I=T|0,I<0?(z+=x*(u-1),u=O(-u/I)):u=O(u/I),x*=I),new S(this.data,f,u,A,x,z)},M.transpose=function(_,T){_=_===void 0?0:_|0,T=T===void 0?1:T|0;var f=this.shape,u=this.stride;return new S(this.data,f[_],f[T],u[_],u[T],this.offset)},M.pick=function(_,T){var f=[],u=[],A=this.offset;typeof _=="number"&&_>=0?A=A+this.stride[0]*_|0:(f.push(this.shape[0]),u.push(this.stride[0])),typeof T=="number"&&T>=0?A=A+this.stride[1]*T|0:(f.push(this.shape[1]),u.push(this.stride[1]));var x=i[f.length+1];return x(this.data,f,u,A)},function(_,T,f,u){return new S(_,T[0],T[1],f[0],f[1],u)}},3:function(g,i,w){function S(C,_,T,f,u,A,x,z){this.data=C,this.shape=[_,T,f],this.stride=[u,A,x],this.offset=z|0}var M=S.prototype;return M.dtype=g,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var _=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),f=Math.abs(this.stride[2]);return _>T?T>f?[2,1,0]:_>f?[1,2,0]:[1,0,2]:_>f?[2,0,1]:f>T?[0,1,2]:[0,2,1]}}),M.set=function(_,T,f,u){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f,u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]=u},M.get=function(_,T,f){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]},M.index=function(_,T,f){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f},M.hi=function(_,T,f){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(_,T,f){var u=this.offset,A=0,x=this.shape[0],z=this.shape[1],I=this.shape[2],O=this.stride[0],D=this.stride[1],B=this.stride[2];return typeof _=="number"&&_>=0&&(A=_|0,u+=O*A,x-=A),typeof T=="number"&&T>=0&&(A=T|0,u+=D*A,z-=A),typeof f=="number"&&f>=0&&(A=f|0,u+=B*A,I-=A),new S(this.data,x,z,I,O,D,B,u)},M.step=function(_,T,f){var u=this.shape[0],A=this.shape[1],x=this.shape[2],z=this.stride[0],I=this.stride[1],O=this.stride[2],D=this.offset,B=0,F=Math.ceil;return typeof _=="number"&&(B=_|0,B<0?(D+=z*(u-1),u=F(-u/B)):u=F(u/B),z*=B),typeof T=="number"&&(B=T|0,B<0?(D+=I*(A-1),A=F(-A/B)):A=F(A/B),I*=B),typeof f=="number"&&(B=f|0,B<0?(D+=O*(x-1),x=F(-x/B)):x=F(x/B),O*=B),new S(this.data,u,A,x,z,I,O,D)},M.transpose=function(_,T,f){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0;var u=this.shape,A=this.stride;return new S(this.data,u[_],u[T],u[f],A[_],A[T],A[f],this.offset)},M.pick=function(_,T,f){var u=[],A=[],x=this.offset;typeof _=="number"&&_>=0?x=x+this.stride[0]*_|0:(u.push(this.shape[0]),A.push(this.stride[0])),typeof T=="number"&&T>=0?x=x+this.stride[1]*T|0:(u.push(this.shape[1]),A.push(this.stride[1])),typeof f=="number"&&f>=0?x=x+this.stride[2]*f|0:(u.push(this.shape[2]),A.push(this.stride[2]));var z=i[u.length+1];return z(this.data,u,A,x)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],f[0],f[1],f[2],u)}},4:function(g,i,w){function S(C,_,T,f,u,A,x,z,I,O){this.data=C,this.shape=[_,T,f,u],this.stride=[A,x,z,I],this.offset=O|0}var M=S.prototype;return M.dtype=g,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:w}),M.set=function(_,T,f,u,A){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u,A):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]=A},M.get=function(_,T,f,u){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]},M.index=function(_,T,f,u){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u},M.hi=function(_,T,f,u){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|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)},M.lo=function(_,T,f,u){var A=this.offset,x=0,z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.stride[0],F=this.stride[1],P=this.stride[2],j=this.stride[3];return typeof _=="number"&&_>=0&&(x=_|0,A+=B*x,z-=x),typeof T=="number"&&T>=0&&(x=T|0,A+=F*x,I-=x),typeof f=="number"&&f>=0&&(x=f|0,A+=P*x,O-=x),typeof u=="number"&&u>=0&&(x=u|0,A+=j*x,D-=x),new S(this.data,z,I,O,D,B,F,P,j,A)},M.step=function(_,T,f,u){var A=this.shape[0],x=this.shape[1],z=this.shape[2],I=this.shape[3],O=this.stride[0],D=this.stride[1],B=this.stride[2],F=this.stride[3],P=this.offset,j=0,U=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(P+=O*(A-1),A=U(-A/j)):A=U(A/j),O*=j),typeof T=="number"&&(j=T|0,j<0?(P+=D*(x-1),x=U(-x/j)):x=U(x/j),D*=j),typeof f=="number"&&(j=f|0,j<0?(P+=B*(z-1),z=U(-z/j)):z=U(z/j),B*=j),typeof u=="number"&&(j=u|0,j<0?(P+=F*(I-1),I=U(-I/j)):I=U(I/j),F*=j),new S(this.data,A,x,z,I,O,D,B,F,P)},M.transpose=function(_,T,f,u){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0,u=u===void 0?3:u|0;var A=this.shape,x=this.stride;return new S(this.data,A[_],A[T],A[f],A[u],x[_],x[T],x[f],x[u],this.offset)},M.pick=function(_,T,f,u){var A=[],x=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(A.push(this.shape[0]),x.push(this.stride[0])),typeof T=="number"&&T>=0?z=z+this.stride[1]*T|0:(A.push(this.shape[1]),x.push(this.stride[1])),typeof f=="number"&&f>=0?z=z+this.stride[2]*f|0:(A.push(this.shape[2]),x.push(this.stride[2])),typeof u=="number"&&u>=0?z=z+this.stride[3]*u|0:(A.push(this.shape[3]),x.push(this.stride[3]));var I=i[A.length+1];return I(this.data,A,x,z)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],T[3],f[0],f[1],f[2],f[3],u)}},5:function(i,w,S){function M(_,T,f,u,A,x,z,I,O,D,B,F){this.data=_,this.shape=[T,f,u,A,x],this.stride=[z,I,O,D,B],this.offset=F|0}var C=M.prototype;return C.dtype=i,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:S}),C.set=function(T,f,u,A,x,z){return i==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x,z):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]=z},C.get=function(T,f,u,A,x){return i==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]},C.index=function(T,f,u,A,x){return this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x},C.hi=function(T,f,u,A,x){return new M(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof f!="number"||f<0?this.shape[1]:f|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof A!="number"||A<0?this.shape[3]:A|0,typeof x!="number"||x<0?this.shape[4]:x|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(T,f,u,A,x){var z=this.offset,I=0,O=this.shape[0],D=this.shape[1],B=this.shape[2],F=this.shape[3],P=this.shape[4],j=this.stride[0],U=this.stride[1],$=this.stride[2],Q=this.stride[3],re=this.stride[4];return typeof T=="number"&&T>=0&&(I=T|0,z+=j*I,O-=I),typeof f=="number"&&f>=0&&(I=f|0,z+=U*I,D-=I),typeof u=="number"&&u>=0&&(I=u|0,z+=$*I,B-=I),typeof A=="number"&&A>=0&&(I=A|0,z+=Q*I,F-=I),typeof x=="number"&&x>=0&&(I=x|0,z+=re*I,P-=I),new M(this.data,O,D,B,F,P,j,U,$,Q,re,z)},C.step=function(T,f,u,A,x){var z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.shape[4],F=this.stride[0],P=this.stride[1],j=this.stride[2],U=this.stride[3],$=this.stride[4],Q=this.offset,re=0,ne=Math.ceil;return typeof T=="number"&&(re=T|0,re<0?(Q+=F*(z-1),z=ne(-z/re)):z=ne(z/re),F*=re),typeof f=="number"&&(re=f|0,re<0?(Q+=P*(I-1),I=ne(-I/re)):I=ne(I/re),P*=re),typeof u=="number"&&(re=u|0,re<0?(Q+=j*(O-1),O=ne(-O/re)):O=ne(O/re),j*=re),typeof A=="number"&&(re=A|0,re<0?(Q+=U*(D-1),D=ne(-D/re)):D=ne(D/re),U*=re),typeof x=="number"&&(re=x|0,re<0?(Q+=$*(B-1),B=ne(-B/re)):B=ne(B/re),$*=re),new M(this.data,z,I,O,D,B,F,P,j,U,$,Q)},C.transpose=function(T,f,u,A,x){T=T===void 0?0:T|0,f=f===void 0?1:f|0,u=u===void 0?2:u|0,A=A===void 0?3:A|0,x=x===void 0?4:x|0;var z=this.shape,I=this.stride;return new M(this.data,z[T],z[f],z[u],z[A],z[x],I[T],I[f],I[u],I[A],I[x],this.offset)},C.pick=function(T,f,u,A,x){var z=[],I=[],O=this.offset;typeof T=="number"&&T>=0?O=O+this.stride[0]*T|0:(z.push(this.shape[0]),I.push(this.stride[0])),typeof f=="number"&&f>=0?O=O+this.stride[1]*f|0:(z.push(this.shape[1]),I.push(this.stride[1])),typeof u=="number"&&u>=0?O=O+this.stride[2]*u|0:(z.push(this.shape[2]),I.push(this.stride[2])),typeof A=="number"&&A>=0?O=O+this.stride[3]*A|0:(z.push(this.shape[3]),I.push(this.stride[3])),typeof x=="number"&&x>=0?O=O+this.stride[4]*x|0:(z.push(this.shape[4]),I.push(this.stride[4]));var D=w[z.length+1];return D(this.data,z,I,O)},function(T,f,u,A){return new M(T,f[0],f[1],f[2],f[3],f[4],u[0],u[1],u[2],u[3],u[4],A)}}};function c(g,i){var w=i===-1?"T":String(i),S=s[w];return i===-1?S(g):i===0?S(g,h[g][0]):S(g,h[g],o)}function m(g){if(n(g))return"buffer";if(r)switch(Object.prototype.toString.call(g)){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(g)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(g,i,w,S){if(g===void 0){var u=h.array[0];return u([])}else typeof g=="number"&&(g=[g]);i===void 0&&(i=[g.length]);var M=i.length;if(w===void 0){w=new Array(M);for(var C=M-1,_=1;C>=0;--C)w[C]=_,_*=i[C]}if(S===void 0){S=0;for(var C=0;C>>0;l.exports=o;function o(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var m=n.hi(s),h=n.lo(s);return c>s==s>0?h===a?(m+=1,h=0):h+=1:h===0?(h=a,m-=1):h-=1,n.pack(h,m)}},8406:function(l,e){var t=1e-6,n=1e-6;e.vertexNormals=function(r,a,o){for(var s=a.length,c=new Array(s),m=o===void 0?t:o,h=0;hm)for(var z=c[i],I=1/Math.sqrt(f*A),x=0;x<3;++x){var O=(x+1)%3,D=(x+2)%3;z[x]+=I*(u[O]*T[D]-u[D]*T[O])}}for(var h=0;hm)for(var I=1/Math.sqrt(B),x=0;x<3;++x)z[x]*=I;else for(var x=0;x<3;++x)z[x]=0}return c},e.faceNormals=function(r,a,o){for(var s=r.length,c=new Array(s),m=o===void 0?n:o,h=0;hm?C=1/Math.sqrt(C):C=0;for(var i=0;i<3;++i)M[i]*=C;c[h]=M}return c}},4081:function(l){"use strict";l.exports=e;function e(t,n,r,a,o,s,c,m,h,v){var g=n+s+v;if(i>0){var i=Math.sqrt(g+1);t[0]=.5*(c-h)/i,t[1]=.5*(m-a)/i,t[2]=.5*(r-s)/i,t[3]=.5*i}else{var w=Math.max(n,s,v),i=Math.sqrt(2*w-g+1);n>=w?(t[0]=.5*i,t[1]=.5*(o+r)/i,t[2]=.5*(m+a)/i,t[3]=.5*(c-h)/i):s>=w?(t[0]=.5*(r+o)/i,t[1]=.5*i,t[2]=.5*(h+c)/i,t[3]=.5*(m-a)/i):(t[0]=.5*(a+m)/i,t[1]=.5*(c+h)/i,t[2]=.5*i,t[3]=.5*(r-o)/i)}return t}},9977:function(l,e,t){"use strict";l.exports=i;var n=t(9215),r=t(6582),a=t(7399),o=t(7608),s=t(4081);function c(w,S,M){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2))}function m(w,S,M,C){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2)+Math.pow(C,2))}function h(w,S){var M=S[0],C=S[1],_=S[2],T=S[3],f=m(M,C,_,T);f>1e-6?(w[0]=M/f,w[1]=C/f,w[2]=_/f,w[3]=T/f):(w[0]=w[1]=w[2]=0,w[3]=1)}function v(w,S,M){this.radius=n([M]),this.center=n(S),this.rotation=n(w),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 g=v.prototype;g.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},g.recalcMatrix=function(w){this.radius.curve(w),this.center.curve(w),this.rotation.curve(w);var S=this.computedRotation;h(S,S);var M=this.computedMatrix;a(M,S);var C=this.computedCenter,_=this.computedEye,T=this.computedUp,f=Math.exp(this.computedRadius[0]);_[0]=C[0]+f*M[2],_[1]=C[1]+f*M[6],_[2]=C[2]+f*M[10],T[0]=M[1],T[1]=M[5],T[2]=M[9];for(var u=0;u<3;++u){for(var A=0,x=0;x<3;++x)A+=M[u+4*x]*_[x];M[12+u]=-A}},g.getMatrix=function(w,S){this.recalcMatrix(w);var M=this.computedMatrix;if(S){for(var C=0;C<16;++C)S[C]=M[C];return S}return M},g.idle=function(w){this.center.idle(w),this.radius.idle(w),this.rotation.idle(w)},g.flush=function(w){this.center.flush(w),this.radius.flush(w),this.rotation.flush(w)},g.pan=function(w,S,M,C){S=S||0,M=M||0,C=C||0,this.recalcMatrix(w);var _=this.computedMatrix,T=_[1],f=_[5],u=_[9],A=c(T,f,u);T/=A,f/=A,u/=A;var x=_[0],z=_[4],I=_[8],O=x*T+z*f+I*u;x-=T*O,z-=f*O,I-=u*O;var D=c(x,z,I);x/=D,z/=D,I/=D;var B=_[2],F=_[6],P=_[10],j=B*T+F*f+P*u,U=B*x+F*z+P*I;B-=j*T+U*x,F-=j*f+U*z,P-=j*u+U*I;var $=c(B,F,P);B/=$,F/=$,P/=$;var Q=x*S+T*M,re=z*S+f*M,ne=I*S+u*M;this.center.move(w,Q,re,ne);var se=Math.exp(this.computedRadius[0]);se=Math.max(1e-4,se+C),this.radius.set(w,Math.log(se))},g.rotate=function(w,S,M,C){this.recalcMatrix(w),S=S||0,M=M||0;var _=this.computedMatrix,T=_[0],f=_[4],u=_[8],A=_[1],x=_[5],z=_[9],I=_[2],O=_[6],D=_[10],B=S*T+M*A,F=S*f+M*x,P=S*u+M*z,j=-(O*P-D*F),U=-(D*B-I*P),$=-(I*F-O*B),Q=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(U,2)-Math.pow($,2))),re=m(j,U,$,Q);re>1e-6?(j/=re,U/=re,$/=re,Q/=re):(j=U=$=0,Q=1);var ne=this.computedRotation,se=ne[0],G=ne[1],X=ne[2],K=ne[3],H=se*Q+K*j+G*$-X*U,Y=G*Q+K*U+X*j-se*$,q=X*Q+K*$+se*U-G*j,Z=K*Q-se*j-G*U-X*$;if(C){j=I,U=O,$=D;var ee=Math.sin(C)/c(j,U,$);j*=ee,U*=ee,$*=ee,Q=Math.cos(S),H=H*Q+Z*j+Y*$-q*U,Y=Y*Q+Z*U+q*j-H*$,q=q*Q+Z*$+H*U-Y*j,Z=Z*Q-H*j-Y*U-q*$}var ae=m(H,Y,q,Z);ae>1e-6?(H/=ae,Y/=ae,q/=ae,Z/=ae):(H=Y=q=0,Z=1),this.rotation.set(w,H,Y,q,Z)},g.lookAt=function(w,S,M,C){this.recalcMatrix(w),M=M||this.computedCenter,S=S||this.computedEye,C=C||this.computedUp;var _=this.computedMatrix;r(_,S,M,C);var T=this.computedRotation;s(T,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),h(T,T),this.rotation.set(w,T[0],T[1],T[2],T[3]);for(var f=0,u=0;u<3;++u)f+=Math.pow(M[u]-S[u],2);this.radius.set(w,.5*Math.log(Math.max(f,1e-6))),this.center.set(w,M[0],M[1],M[2])},g.translate=function(w,S,M,C){this.center.move(w,S||0,M||0,C||0)},g.setMatrix=function(w,S){var M=this.computedRotation;s(M,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),h(M,M),this.rotation.set(w,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;o(C,S);var _=C[15];if(Math.abs(_)>1e-6){var T=C[12]/_,f=C[13]/_,u=C[14]/_;this.recalcMatrix(w);var A=Math.exp(this.computedRadius[0]);this.center.set(w,T-C[2]*A,f-C[6]*A,u-C[10]*A),this.radius.idle(w)}else this.center.idle(w),this.radius.idle(w)},g.setDistance=function(w,S){S>0&&this.radius.set(w,Math.log(S))},g.setDistanceLimits=function(w,S){w>0?w=Math.log(w):w=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=S},g.getDistanceLimits=function(w){var S=this.radius.bounds;return w?(w[0]=Math.exp(S[0][0]),w[1]=Math.exp(S[1][0]),w):[Math.exp(S[0][0]),Math.exp(S[1][0])]},g.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]}},g.fromJSON=function(w){var S=this.lastT(),M=w.center;M&&this.center.set(S,M[0],M[1],M[2]);var C=w.rotation;C&&this.rotation.set(S,C[0],C[1],C[2],C[3]);var _=w.distance;_&&_>0&&this.radius.set(S,Math.log(_)),this.setDistanceLimits(w.zoomMin,w.zoomMax)};function i(w){w=w||{};var S=w.center||[0,0,0],M=w.rotation||[0,0,0,1],C=w.radius||1;S=[].slice.call(S,0,3),M=[].slice.call(M,0,4),h(M,M);var _=new v(M,S,Math.log(C));return _.setDistanceLimits(w.zoomMin,w.zoomMax),("eye"in w||"up"in w)&&_.lookAt(0,w.eye,w.center,w.up),_}},1371:function(l,e,t){"use strict";var n=t(3233);l.exports=function(a,o,s){return s=typeof s<"u"?s+"":" ",n(s,o)+a}},3202:function(l){l.exports=function(t,n){n||(n=[0,""]),t=String(t);var r=parseFloat(t,10);return n[0]=r,n[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}},3088:function(l,e,t){"use strict";l.exports=r;var n=t(3140);function r(a,o){for(var s=o.length|0,c=a.length,m=[new Array(s),new Array(s)],h=0;h0){z=m[D][A][0],O=D;break}I=z[O^1];for(var B=0;B<2;++B)for(var F=m[B][A],P=0;P0&&(z=j,I=U,O=B)}return x||z&&i(z,O),I}function S(u,A){var x=m[A][u][0],z=[u];i(x,A);for(var I=x[A^1],O=A;;){for(;I!==u;)z.push(I),I=w(z[z.length-2],I,!1);if(m[0][u].length+m[1][u].length===0)break;var D=z[z.length-1],B=u,F=z[1],P=w(D,B,!0);if(n(o[D],o[B],o[F],o[P])<0)break;z.push(u),I=w(D,B)}return z}function M(u,A){return A[1]===A[A.length-1]}for(var h=0;h0;){var T=m[0][h].length,f=S(h,C);M(_,f)?_.push.apply(_,f):(_.length>0&&g.push(_),_=f)}_.length>0&&g.push(_)}return g}},5609:function(l,e,t){"use strict";l.exports=r;var n=t(3134);function r(a,o){for(var s=n(a,o.length),c=new Array(o.length),m=new Array(o.length),h=[],v=0;v0;){var i=h.pop();c[i]=!1;for(var w=s[i],v=0;v0}T=T.filter(f);for(var u=T.length,A=new Array(u),x=new Array(u),_=0;_0;){var ae=q.pop(),he=re[ae];c(he,function(Ie,Ve){return Ie-Ve});var xe=he.length,we=Z[ae],Me;if(we===0){var F=T[ae];Me=[F]}for(var _=0;_=0)&&(Z[Se]=we^1,q.push(Se),we===0)){var F=T[Se];Y(F)||(F.reverse(),Me.push(F))}}we===0&&ee.push(Me)}return ee}},5085:function(l,e,t){l.exports=w;var n=t(3250)[3],r=t(4209),a=t(3352),o=t(2478);function s(){return!0}function c(S){return function(M,C){var _=S[M];return _?!!_.queryPoint(C,s):!1}}function m(S){for(var M={},C=0;C0&&M[_]===C[0])T=S[_-1];else return 1;for(var f=1;T;){var u=T.key,A=n(C,u[0],u[1]);if(u[0][0]0)f=-1,T=T.right;else return 0;else if(A>0)T=T.left;else if(A<0)f=1,T=T.right;else return 0}return f}}function v(S){return 1}function g(S){return function(C){return S(C[0],C[1])?0:1}}function i(S,M){return function(_){return S(_[0],_[1])?0:M(_)}}function w(S){for(var M=S.length,C=[],_=[],T=0,f=0;f=v?(u=1,x=v+2*w+M):(u=-w/v,x=w*u+M)):(u=0,S>=0?(A=0,x=M):-S>=i?(A=1,x=i+2*S+M):(A=-S/i,x=S*A+M));else if(A<0)A=0,w>=0?(u=0,x=M):-w>=v?(u=1,x=v+2*w+M):(u=-w/v,x=w*u+M);else{var z=1/f;u*=z,A*=z,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M}else{var I,O,D,B;u<0?(I=g+w,O=i+S,O>I?(D=O-I,B=v-2*g+i,D>=B?(u=1,A=0,x=v+2*w+M):(u=D/B,A=1-u,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(u=0,O<=0?(A=1,x=i+2*S+M):S>=0?(A=0,x=M):(A=-S/i,x=S*A+M))):A<0?(I=g+S,O=v+w,O>I?(D=O-I,B=v-2*g+i,D>=B?(A=1,u=0,x=i+2*S+M):(A=D/B,u=1-A,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(A=0,O<=0?(u=1,x=v+2*w+M):w>=0?(u=0,x=M):(u=-w/v,x=w*u+M))):(D=i+S-g-w,D<=0?(u=0,A=1,x=i+2*S+M):(B=v-2*g+i,D>=B?(u=1,A=0,x=v+2*w+M):(u=D/B,A=1-u,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)))}for(var F=1-u-A,h=0;h0){var i=s[m-1];if(n(v,i)===0&&a(i)!==g){m-=1;continue}}s[m++]=v}}return s.length=m,s}},3233:function(l){"use strict";var e="",t;l.exports=n;function n(r,a){if(typeof r!="string")throw new TypeError("expected a string");if(a===1)return r;if(a===2)return r+r;var o=r.length*a;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=o)return e.substr(0,o);for(;o>e.length&&a>1;)a&1&&(e+=r),a>>=1,r+=r;return e+=r,e=e.substr(0,o),e}},3025:function(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(l){"use strict";l.exports=e;function e(t){for(var n=t.length,r=t[t.length-1],a=n,o=n-2;o>=0;--o){var s=r,c=t[o];r=s+c;var m=r-s,h=c-m;h&&(t[--a]=r,r=h)}for(var v=0,o=a;o0){if(O<=0)return D;B=I+O}else if(I<0){if(O>=0)return D;B=-(I+O)}else return D;var F=m*B;return D>=F||D<=-F?D:S(A,x,z)},function(A,x,z,I){var O=A[0]-I[0],D=x[0]-I[0],B=z[0]-I[0],F=A[1]-I[1],P=x[1]-I[1],j=z[1]-I[1],U=A[2]-I[2],$=x[2]-I[2],Q=z[2]-I[2],re=D*j,ne=B*P,se=B*F,G=O*j,X=O*P,K=D*F,H=U*(re-ne)+$*(se-G)+Q*(X-K),Y=(Math.abs(re)+Math.abs(ne))*Math.abs(U)+(Math.abs(se)+Math.abs(G))*Math.abs($)+(Math.abs(X)+Math.abs(K))*Math.abs(Q),q=h*Y;return H>q||-H>q?H:M(A,x,z,I)}];function _(u){var A=C[u.length];return A||(A=C[u.length]=w(u.length)),A.apply(void 0,u)}function T(u,A,x,z,I,O,D){return function(F,P,j,U,$){switch(arguments.length){case 0:case 1:return 0;case 2:return z(F,P);case 3:return I(F,P,j);case 4:return O(F,P,j,U);case 5:return D(F,P,j,U,$)}for(var Q=new Array(arguments.length),re=0;re0&&v>0||h<0&&v<0)return!1;var g=n(c,o,s),i=n(m,o,s);return g>0&&i>0||g<0&&i<0?!1:h===0&&v===0&&g===0&&i===0?r(o,s,c,m):!0}},8545:function(l){"use strict";l.exports=t;function e(n,r){var a=n+r,o=a-n,s=a-o,c=r-o,m=n-s,h=m+c;return h?[h,a]:[a]}function t(n,r){var a=n.length|0,o=r.length|0;if(a===1&&o===1)return e(n[0],-r[0]);var s=a+o,c=new Array(s),m=0,h=0,v=0,g=Math.abs,i=n[h],w=g(i),S=-r[v],M=g(S),C,_;w=o?(C=i,h+=1,h=o?(C=i,h+=1,h"u"&&(C=s(w));var _=w.length;if(_===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var T=c(S,+M),f=m(w,C),u=h(f,S,T,+M),A=v(f,S.length|0),x=o(C)(w,f.data,A,T),z=g(f),I=[].slice.call(u.data,0,u.shape[0]);return r.free(T),r.free(f.data),r.free(u.data),r.free(A),{cells:x,vertexIds:z,vertexWeights:I}}},1570:function(l){"use strict";l.exports=t;var e=[function(){function r(o,s,c,m){for(var h=Math.min(c,m)|0,v=Math.max(c,m)|0,g=o[2*h],i=o[2*h+1];g>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,B=m(A[D],x);B<=0?(B===0&&(O=D),z=D+1):B>0&&(I=D-1)}return O}n=i;function w(A,x){for(var z=new Array(A.length),I=0,O=z.length;I=A.length||m(A[re],D)!==0););}return z}n=w;function S(A,x){if(!x)return w(g(C(A,0)),A,0);for(var z=new Array(x),I=0;I>>j&1&&P.push(O[j]);x.push(P)}return v(x)}n=M;function C(A,x){if(x<0)return[];for(var z=[],I=(1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},2014:function(l,e,t){"use strict";"use restrict";var n=t(3105),r=t(4623);function a(u){for(var A=0,x=Math.max,z=0,I=u.length;z>1,D=c(u[O],A);D<=0?(D===0&&(I=O),x=O+1):D>0&&(z=O-1)}return I}e.findCell=g;function i(u,A){for(var x=new Array(u.length),z=0,I=x.length;z=u.length||c(u[Q],O)!==0););}return x}e.incidence=i;function w(u,A){if(!A)return i(v(M(u,0)),u,0);for(var x=new Array(A),z=0;z>>P&1&&F.push(I[P]);A.push(F)}return h(A)}e.explode=S;function M(u,A){if(A<0)return[];for(var x=[],z=(1<>1:(G>>1)-1}function z(G){for(var X=A(G);;){var K=X,H=2*G+1,Y=2*(G+1),q=G;if(H0;){var K=x(G);if(K>=0){var H=A(K);if(X0){var G=F[0];return u(0,U-1),U-=1,z(0),G}return-1}function D(G,X){var K=F[G];return w[K]===X?G:(w[K]=-1/0,I(G),O(),w[K]=X,U+=1,I(U-1))}function B(G){if(!S[G]){S[G]=!0;var X=g[G],K=i[G];g[K]>=0&&(g[K]=X),i[X]>=0&&(i[X]=K),P[X]>=0&&D(P[X],f(X)),P[K]>=0&&D(P[K],f(K))}}for(var F=[],P=new Array(h),M=0;M>1;M>=0;--M)z(M);for(;;){var $=O();if($<0||w[$]>m)break;B($)}for(var Q=[],M=0;M=0&&K>=0&&X!==K){var H=P[X],Y=P[K];H!==Y&&se.push([H,Y])}}),r.unique(r.normalize(se)),{positions:Q,edges:se}}},1303:function(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){var c,m;if(s[0][0]s[1][0])c=s[1],m=s[0];else{var h=Math.min(o[0][1],o[1][1]),v=Math.max(o[0][1],o[1][1]),g=Math.min(s[0][1],s[1][1]),i=Math.max(s[0][1],s[1][1]);return vi?h-i:v-i}var w,S;o[0][1]s[1][0])c=s[1],m=s[0];else return r(s,o);var h,v;if(o[0][0]o[1][0])h=o[1],v=o[0];else return-r(o,s);var g=n(c,m,v),i=n(c,m,h);if(g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;if(g=n(v,h,m),i=n(v,h,c),g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;return m[0]-v[0]}},4209:function(l,e,t){"use strict";l.exports=i;var n=t(2478),r=t(3840),a=t(3250),o=t(1303);function s(w,S,M){this.slabs=w,this.coordinates=S,this.horizontal=M}var c=s.prototype;function m(w,S){return w.y-S}function h(w,S){for(var M=null;w;){var C=w.key,_,T;C[0][0]0)if(S[0]!==C[1][0])M=w,w=w.right;else{var u=h(w.right,S);if(u)return u;w=w.left}else{if(S[0]!==C[1][0])return w;var u=h(w.right,S);if(u)return u;w=w.left}}return M}c.castUp=function(w){var S=n.le(this.coordinates,w[0]);if(S<0)return-1;var M=this.slabs[S],C=h(this.slabs[S],w),_=-1;if(C&&(_=C.value),this.coordinates[S]===w[0]){var T=null;if(C&&(T=C.key),S>0){var f=h(this.slabs[S-1],w);f&&(T?o(f.key,T)>0&&(T=f.key,_=f.value):(_=f.value,T=f.key))}var u=this.horizontal[S];if(u.length>0){var A=n.ge(u,w[1],m);if(A=u.length)return _;x=u[A]}}if(x.start)if(T){var z=a(T[0],T[1],[w[0],x.y]);T[0][0]>T[1][0]&&(z=-z),z>0&&(_=x.index)}else _=x.index;else x.y!==w[1]&&(_=x.index)}}}return _};function v(w,S,M,C){this.y=w,this.index=S,this.start=M,this.closed=C}function g(w,S,M,C){this.x=w,this.segment=S,this.create=M,this.index=C}function i(w){for(var S=w.length,M=2*S,C=new Array(M),_=0;_1&&(S=1);for(var M=1-S,C=h.length,_=new Array(C),T=0;T0||w>0&&_<0){var T=o(S,_,M,w);g.push(T),i.push(T.slice())}_<0?i.push(M.slice()):_>0?g.push(M.slice()):(g.push(M.slice()),i.push(M.slice())),w=_}return{positive:g,negative:i}}function c(h,v){for(var g=[],i=a(h[h.length-1],v),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C>=0&&g.push(S.slice()),i=C}return g}function m(h,v){for(var g=[],i=a(h[h.length-1],v),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C<=0&&g.push(S.slice()),i=C}return g}},3387:function(l,e,t){var n;(function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(h){return s(m(h),arguments)}function o(h,v){return a.apply(null,[h].concat(v||[]))}function s(h,v){var g=1,i=h.length,w,S="",M,C,_,T,f,u,A,x;for(M=0;M=0),_.type){case"b":w=parseInt(w,10).toString(2);break;case"c":w=String.fromCharCode(parseInt(w,10));break;case"d":case"i":w=parseInt(w,10);break;case"j":w=JSON.stringify(w,null,_.width?parseInt(_.width):0);break;case"e":w=_.precision?parseFloat(w).toExponential(_.precision):parseFloat(w).toExponential();break;case"f":w=_.precision?parseFloat(w).toFixed(_.precision):parseFloat(w);break;case"g":w=_.precision?String(Number(w.toPrecision(_.precision))):parseFloat(w);break;case"o":w=(parseInt(w,10)>>>0).toString(8);break;case"s":w=String(w),w=_.precision?w.substring(0,_.precision):w;break;case"t":w=String(!!w),w=_.precision?w.substring(0,_.precision):w;break;case"T":w=Object.prototype.toString.call(w).slice(8,-1).toLowerCase(),w=_.precision?w.substring(0,_.precision):w;break;case"u":w=parseInt(w,10)>>>0;break;case"v":w=w.valueOf(),w=_.precision?w.substring(0,_.precision):w;break;case"x":w=(parseInt(w,10)>>>0).toString(16);break;case"X":w=(parseInt(w,10)>>>0).toString(16).toUpperCase();break}r.json.test(_.type)?S+=w:(r.number.test(_.type)&&(!A||_.sign)?(x=A?"+":"-",w=w.toString().replace(r.sign,"")):x="",f=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",u=_.width-(x+w).length,T=_.width&&u>0?f.repeat(u):"",S+=_.align?x+w+T:f==="0"?x+T+w:T+x+w)}return S}var c=Object.create(null);function m(h){if(c[h])return c[h];for(var v=h,g,i=[],w=0;v;){if((g=r.text.exec(v))!==null)i.push(g[0]);else if((g=r.modulo.exec(v))!==null)i.push("%");else if((g=r.placeholder.exec(v))!==null){if(g[2]){w|=1;var S=[],M=g[2],C=[];if((C=r.key.exec(M))!==null)for(S.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=r.key_access.exec(M))!==null)S.push(C[1]);else if((C=r.index_access.exec(M))!==null)S.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=S}else w|=2;if(w===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(g[0].length)}return c[h]=i}e.sprintf=a,e.vsprintf=o,typeof window<"u"&&(window.sprintf=a,window.vsprintf=o,n=function(){return{sprintf:a,vsprintf:o}}.call(e,t,e,l),n!==void 0&&(l.exports=n))})()},3711:function(l,e,t){"use strict";l.exports=m;var n=t(2640),r=t(781),a={"2d":function(h,v,g){var i=h({order:v,scalarArguments:3,getters:g==="generic"?[0]:void 0,phase:function(S,M,C,_){return S>_|0},vertex:function(S,M,C,_,T,f,u,A,x,z,I,O,D){var B=(u<<0)+(A<<1)+(x<<2)+(z<<3)|0;if(!(B===0||B===15))switch(B){case 0:I.push([S-.5,M-.5]);break;case 1:I.push([S-.25-.25*(_+C-2*D)/(C-_),M-.25-.25*(T+C-2*D)/(C-T)]);break;case 2:I.push([S-.75-.25*(-_-C+2*D)/(_-C),M-.25-.25*(f+_-2*D)/(_-f)]);break;case 3:I.push([S-.5,M-.5-.5*(T+C+f+_-4*D)/(C-T+_-f)]);break;case 4:I.push([S-.25-.25*(f+T-2*D)/(T-f),M-.75-.25*(-T-C+2*D)/(T-C)]);break;case 5:I.push([S-.5-.5*(_+C+f+T-4*D)/(C-_+T-f),M-.5]);break;case 6:I.push([S-.5-.25*(-_-C+f+T)/(_-C+T-f),M-.5-.25*(-T-C+f+_)/(T-C+_-f)]);break;case 7:I.push([S-.75-.25*(f+T-2*D)/(T-f),M-.75-.25*(f+_-2*D)/(_-f)]);break;case 8:I.push([S-.75-.25*(-f-T+2*D)/(f-T),M-.75-.25*(-f-_+2*D)/(f-_)]);break;case 9:I.push([S-.5-.25*(_+C+-f-T)/(C-_+f-T),M-.5-.25*(T+C+-f-_)/(C-T+f-_)]);break;case 10:I.push([S-.5-.5*(-_-C+-f-T+4*D)/(_-C+f-T),M-.5]);break;case 11:I.push([S-.25-.25*(-f-T+2*D)/(f-T),M-.75-.25*(T+C-2*D)/(C-T)]);break;case 12:I.push([S-.5,M-.5-.5*(-T-C+-f-_+4*D)/(T-C+f-_)]);break;case 13:I.push([S-.75-.25*(_+C-2*D)/(C-_),M-.25-.25*(-f-_+2*D)/(f-_)]);break;case 14:I.push([S-.25-.25*(-_-C+2*D)/(_-C),M-.25-.25*(-T-C+2*D)/(T-C)]);break;case 15:I.push([S-.5,M-.5]);break}},cell:function(S,M,C,_,T,f,u,A,x){T?A.push([S,M]):A.push([M,S])}});return function(w,S){var M=[],C=[];return i(w,M,C,S),{positions:M,cells:C}}}};function o(h,v){var g=h.length+"d",i=a[g];if(i)return i(n,h,v)}function s(h,v){for(var g=r(h,v),i=g.length,w=new Array(i),S=new Array(i),M=0;MMath.max(_,T)?f[2]=1:_>Math.max(C,T)?f[0]=1:f[1]=1;for(var u=0,A=0,x=0;x<3;++x)u+=M[x]*M[x],A+=f[x]*M[x];for(var x=0;x<3;++x)f[x]-=A/u*M[x];return s(f,f),f}function g(M,C,_,T,f,u,A,x){this.center=n(_),this.up=n(T),this.right=n(f),this.radius=n([u]),this.angle=n([A,x]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),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 z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var i=g.prototype;i.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},i.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},i.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,_=this.computedRight,T=0,f=0,u=0;u<3;++u)f+=C[u]*_[u],T+=C[u]*C[u];for(var A=Math.sqrt(T),x=0,u=0;u<3;++u)_[u]-=C[u]*f/T,x+=_[u]*_[u],C[u]/=A;for(var z=Math.sqrt(x),u=0;u<3;++u)_[u]/=z;var I=this.computedToward;o(I,C,_),s(I,I);for(var O=Math.exp(this.computedRadius[0]),D=this.computedAngle[0],B=this.computedAngle[1],F=Math.cos(D),P=Math.sin(D),j=Math.cos(B),U=Math.sin(B),$=this.computedCenter,Q=F*j,re=P*j,ne=U,se=-F*U,G=-P*U,X=j,K=this.computedEye,H=this.computedMatrix,u=0;u<3;++u){var Y=Q*_[u]+re*I[u]+ne*C[u];H[4*u+1]=se*_[u]+G*I[u]+X*C[u],H[4*u+2]=Y,H[4*u+3]=0}var q=H[1],Z=H[5],ee=H[9],ae=H[2],he=H[6],xe=H[10],we=Z*xe-ee*he,Me=ee*ae-q*xe,Se=q*he-Z*ae,Ie=m(we,Me,Se);we/=Ie,Me/=Ie,Se/=Ie,H[0]=we,H[4]=Me,H[8]=Se;for(var u=0;u<3;++u)K[u]=$[u]+H[2+4*u]*O;for(var u=0;u<3;++u){for(var x=0,Ve=0;Ve<3;++Ve)x+=H[u+4*Ve]*K[Ve];H[12+u]=-x}H[15]=1},i.getMatrix=function(M,C){this.recalcMatrix(M);var _=this.computedMatrix;if(C){for(var T=0;T<16;++T)C[T]=_[T];return C}return _};var w=[0,0,0];i.rotate=function(M,C,_,T){if(this.angle.move(M,C,_),T){this.recalcMatrix(M);var f=this.computedMatrix;w[0]=f[2],w[1]=f[6],w[2]=f[10];for(var u=this.computedUp,A=this.computedRight,x=this.computedToward,z=0;z<3;++z)f[4*z]=u[z],f[4*z+1]=A[z],f[4*z+2]=x[z];a(f,f,T,w);for(var z=0;z<3;++z)u[z]=f[4*z],A[z]=f[4*z+1];this.up.set(M,u[0],u[1],u[2]),this.right.set(M,A[0],A[1],A[2])}},i.pan=function(M,C,_,T){C=C||0,_=_||0,T=T||0,this.recalcMatrix(M);var f=this.computedMatrix,u=Math.exp(this.computedRadius[0]),A=f[1],x=f[5],z=f[9],I=m(A,x,z);A/=I,x/=I,z/=I;var O=f[0],D=f[4],B=f[8],F=O*A+D*x+B*z;O-=A*F,D-=x*F,B-=z*F;var P=m(O,D,B);O/=P,D/=P,B/=P;var j=O*C+A*_,U=D*C+x*_,$=B*C+z*_;this.center.move(M,j,U,$);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+T),this.radius.set(M,Math.log(Q))},i.translate=function(M,C,_,T){this.center.move(M,C||0,_||0,T||0)},i.setMatrix=function(M,C,_,T){var f=1;typeof _=="number"&&(f=_|0),(f<0||f>3)&&(f=1);var u=(f+2)%3,A=(f+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var x=C[f],z=C[f+4],I=C[f+8];if(T){var D=Math.abs(x),B=Math.abs(z),F=Math.abs(I),P=Math.max(D,B,F);D===P?(x=x<0?-1:1,z=I=0):F===P?(I=I<0?-1:1,x=z=0):(z=z<0?-1:1,x=I=0)}else{var O=m(x,z,I);x/=O,z/=O,I/=O}var j=C[u],U=C[u+4],$=C[u+8],Q=j*x+U*z+$*I;j-=x*Q,U-=z*Q,$-=I*Q;var re=m(j,U,$);j/=re,U/=re,$/=re;var ne=z*$-I*U,se=I*j-x*$,G=x*U-z*j,X=m(ne,se,G);ne/=X,se/=X,G/=X,this.center.jump(M,ve,le,Ae),this.radius.idle(M),this.up.jump(M,x,z,I),this.right.jump(M,j,U,$);var K,H;if(f===2){var Y=C[1],q=C[5],Z=C[9],ee=Y*j+q*U+Z*$,ae=Y*ne+q*se+Z*G;Me<0?K=-Math.PI/2:K=Math.PI/2,H=Math.atan2(ae,ee)}else{var he=C[2],xe=C[6],we=C[10],Me=he*x+xe*z+we*I,Se=he*j+xe*U+we*$,Ie=he*ne+xe*se+we*G;K=Math.asin(h(Me)),H=Math.atan2(Ie,Se)}this.angle.jump(M,H,K),this.recalcMatrix(M);var Ve=C[2],Ge=C[6],ke=C[10],_e=this.computedMatrix;r(_e,C);var ce=_e[15],ve=_e[12]/ce,le=_e[13]/ce,Ae=_e[14]/ce,Be=Math.exp(this.computedRadius[0]);this.center.jump(M,ve-Ve*Be,le-Ge*Be,Ae-ke*Be)},i.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},i.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},i.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},i.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},i.lookAt=function(M,C,_,T){this.recalcMatrix(M),C=C||this.computedEye,_=_||this.computedCenter,T=T||this.computedUp;var f=T[0],u=T[1],A=T[2],x=m(f,u,A);if(!(x<1e-6)){f/=x,u/=x,A/=x;var z=C[0]-_[0],I=C[1]-_[1],O=C[2]-_[2],D=m(z,I,O);if(!(D<1e-6)){z/=D,I/=D,O/=D;var B=this.computedRight,F=B[0],P=B[1],j=B[2],U=f*F+u*P+A*j;F-=U*f,P-=U*u,j-=U*A;var $=m(F,P,j);if(!($<.01&&(F=u*O-A*I,P=A*z-f*O,j=f*I-u*z,$=m(F,P,j),$<1e-6))){F/=$,P/=$,j/=$,this.up.set(M,f,u,A),this.right.set(M,F,P,j),this.center.set(M,_[0],_[1],_[2]),this.radius.set(M,Math.log(D));var Q=u*j-A*P,re=A*F-f*j,ne=f*P-u*F,se=m(Q,re,ne);Q/=se,re/=se,ne/=se;var G=f*z+u*I+A*O,X=F*z+P*I+j*O,K=Q*z+re*I+ne*O,H=Math.asin(h(G)),Y=Math.atan2(K,X),q=this.angle._state,Z=q[q.length-1],ee=q[q.length-2];Z=Z%(2*Math.PI);var ae=Math.abs(Z+2*Math.PI-Y),he=Math.abs(Z-Y),xe=Math.abs(Z-2*Math.PI-Y);ae0?j.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=w;function S(B){return new Uint8Array(w(B),0,B)}e.mallocUint8=S;function M(B){return new Uint16Array(w(2*B),0,B)}e.mallocUint16=M;function C(B){return new Uint32Array(w(4*B),0,B)}e.mallocUint32=C;function _(B){return new Int8Array(w(B),0,B)}e.mallocInt8=_;function T(B){return new Int16Array(w(2*B),0,B)}e.mallocInt16=T;function f(B){return new Int32Array(w(4*B),0,B)}e.mallocInt32=f;function u(B){return new Float32Array(w(4*B),0,B)}e.mallocFloat32=e.mallocFloat=u;function A(B){return new Float64Array(w(8*B),0,B)}e.mallocFloat64=e.mallocDouble=A;function x(B){return o?new Uint8ClampedArray(w(B),0,B):S(B)}e.mallocUint8Clamped=x;function z(B){return s?new BigUint64Array(w(8*B),0,B):null}e.mallocBigUint64=z;function I(B){return c?new BigInt64Array(w(8*B),0,B):null}e.mallocBigInt64=I;function O(B){return new DataView(w(B),0,B)}e.mallocDataView=O;function D(B){B=n.nextPow2(B);var F=n.log2(B),P=v[F];return P.length>0?P.pop():new a(B)}e.mallocBuffer=D,e.clearCache=function(){for(var F=0;F<32;++F)m.UINT8[F].length=0,m.UINT16[F].length=0,m.UINT32[F].length=0,m.INT8[F].length=0,m.INT16[F].length=0,m.INT32[F].length=0,m.FLOAT[F].length=0,m.DOUBLE[F].length=0,m.BIGUINT64[F].length=0,m.BIGINT64[F].length=0,m.UINT8C[F].length=0,h[F].length=0,v[F].length=0}},1755:function(l){"use strict";"use restrict";l.exports=e;function e(n){this.roots=new Array(n),this.ranks=new Array(n);for(var r=0;r",j="",U=P.length,$=j.length,Q=D[0]===w||D[0]===C,re=0,ne=-$;re>-1&&(re=B.indexOf(P,re),!(re===-1||(ne=B.indexOf(j,re+U),ne===-1)||ne<=re));){for(var se=re;se=ne)F[se]=null,B=B.substr(0,se)+" "+B.substr(se+1);else if(F[se]!==null){var G=F[se].indexOf(D[0]);G===-1?F[se]+=D:Q&&(F[se]=F[se].substr(0,G+1)+(1+parseInt(F[se][G+1]))+F[se].substr(G+2))}var X=re+U,K=B.substr(X,ne-X),H=K.indexOf(P);H!==-1?re=H:re=ne+$}return F}function f(O,D,B){for(var F=D.textAlign||"start",P=D.textBaseline||"alphabetic",j=[1<<30,1<<30],U=[0,0],$=O.length,Q=0;Q<$;++Q)for(var re=O[Q],ne=0;ne<2;++ne)j[ne]=Math.min(j[ne],re[ne])|0,U[ne]=Math.max(U[ne],re[ne])|0;var se=0;switch(F){case"center":se=-.5*(j[0]+U[0]);break;case"right":case"end":se=-U[0];break;case"left":case"start":se=-j[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+F+"'")}var G=0;switch(P){case"hanging":case"top":G=-j[1];break;case"middle":G=-.5*(j[1]+U[1]);break;case"alphabetic":case"ideographic":G=-3*B;break;case"bottom":G=-U[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+P+"'")}var X=1/B;return"lineHeight"in D?X*=+D.lineHeight:"width"in D?X=D.width/(U[0]-j[0]):"height"in D&&(X=D.height/(U[1]-j[1])),O.map(function(K){return[X*(K[0]+se),X*(K[1]+G)]})}function u(O,D,B,F,P,j){B=B.replace(/\n/g,""),j.breaklines===!0?B=B.replace(/\/g,` +`):B=B.replace(/\/g," ");var U="",$=[];for(Z=0;Z-1?parseInt(le[1+Xe]):0,gt=Ye>-1?parseInt(Ae[1+Ye]):0;yt!==gt&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,gt-yt),Be=Be.replace("?px ",Se())),ae+=.25*G*(gt-yt)}if(j.superscripts===!0){var Tt=le.indexOf(w),At=Ae.indexOf(w),$t=Tt>-1?parseInt(le[1+Tt]):0,rr=At>-1?parseInt(Ae[1+At]):0;$t!==rr&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,rr-$t),Be=Be.replace("?px ",Se())),ae-=.25*G*(rr-$t)}if(j.bolds===!0){var _r=le.indexOf(h)>-1,Xt=Ae.indexOf(h)>-1;!_r&&Xt&&(or?Be=Be.replace("italic ","italic bold "):Be="bold "+Be),_r&&!Xt&&(Be=Be.replace("bold ",""))}if(j.italics===!0){var or=le.indexOf(g)>-1,Ot=Ae.indexOf(g)>-1;!or&&Ot&&(Be="italic "+Be),or&&!Ot&&(Be=Be.replace("italic ",""))}D.font=Be}for(q=0;q0&&(P=F.size),F.lineSpacing&&F.lineSpacing>0&&(j=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(U.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(U.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(U.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(U.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(U.superscripts=!!F.styletags.superscripts)),B.font=[F.fontStyle,F.fontVariant,F.fontWeight,P+"px",F.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var $=u(D,B,O,P,j,U);return z($,F,P)}},1538:function(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(x){x.permitHostObjects___&&x.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var n=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new r,o=Object.freeze({});if(a.set(o,1),a.get(o)!==1)n=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,m=Object.defineProperty,h=Object.isExtensible,v="weakmap:",g=v+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var i=new ArrayBuffer(25),w=new Uint8Array(i);crypto.getRandomValues(w),g=v+"rand:"+Array.prototype.map.call(w,function(x){return(x%36).toString(36)}).join("")+"___"}function S(x){return!(x.substr(0,v.length)==v&&x.substr(x.length-3)==="___")}if(m(Object,"getOwnPropertyNames",{value:function(z){return c(z).filter(S)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;m(Object,"getPropertyNames",{value:function(z){return M(z).filter(S)}})}function C(x){if(x!==Object(x))throw new TypeError("Not an object: "+x);var z=x[g];if(z&&z.key===x)return z;if(h(x)){z={key:x};try{return m(x,g,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch{return}}}(function(){var x=Object.freeze;m(Object,"freeze",{value:function(D){return C(D),x(D)}});var z=Object.seal;m(Object,"seal",{value:function(D){return C(D),z(D)}});var I=Object.preventExtensions;m(Object,"preventExtensions",{value:function(D){return C(D),I(D)}})})();function _(x){return x.prototype=null,Object.freeze(x)}var T=!1;function f(){!T&&typeof console<"u"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,A=function(){this instanceof A||f();var x=[],z=[],I=u++;function O(P,j){var U,$=C(P);return $?I in $?$[I]:j:(U=x.indexOf(P),U>=0?z[U]:j)}function D(P){var j=C(P);return j?I in j:x.indexOf(P)>=0}function B(P,j){var U,$=C(P);return $?$[I]=j:(U=x.indexOf(P),U>=0?z[U]=j:(U=x.length,z[U]=j,x[U]=P)),this}function F(P){var j=C(P),U,$;return j?I in j&&delete j[I]:(U=x.indexOf(P),U<0?!1:($=x.length-1,x[U]=void 0,z[U]=z[$],x[U]=x[$],x.length=$,z.length=$,!0))}return Object.create(A.prototype,{get___:{value:_(O)},has___:{value:_(D)},set___:{value:_(B)},delete___:{value:_(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(z,I){return this.get___(z,I)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,I){return this.set___(z,I)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof r=="function"?function(){n&&typeof Proxy<"u"&&(Proxy=void 0);function x(){this instanceof A||f();var z=new r,I=void 0,O=!1;function D(j,U){return I?z.has(j)?z.get(j):I.get___(j,U):z.get(j,U)}function B(j){return z.has(j)||(I?I.has___(j):!1)}var F;n?F=function(j,U){return z.set(j,U),z.has(j)||(I||(I=new A),I.set(j,U)),this}:F=function(j,U){if(O)try{z.set(j,U)}catch{I||(I=new A),I.set___(j,U)}else z.set(j,U);return this};function P(j){var U=!!z.delete(j);return I&&I.delete___(j)||U}return Object.create(A.prototype,{get___:{value:_(D)},has___:{value:_(B)},set___:{value:_(F)},delete___:{value:_(P)},permitHostObjects___:{value:_(function(j){if(j===t)O=!0;else throw new Error("bogus call to permitHostObjects___")})}})}x.prototype=A.prototype,l.exports=x,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=A)})()},236:function(l,e,t){var n=t(8284);l.exports=r;function r(){var a={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var s=o.valueOf(a);return s&&s.identity===a?s:n(o,a)}}},8284:function(l){l.exports=e;function e(t,n){var r={identity:n},a=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(o){return o!==n?a.apply(this,arguments):r},writable:!0}),r}},606:function(l,e,t){var n=t(236);l.exports=r;function r(){var a=n();return{get:function(o,s){var c=a(o);return c.hasOwnProperty("value")?c.value:s},set:function(o,s){return a(o).value=s,this},has:function(o){return"value"in a(o)},delete:function(o){return delete a(o).value}}}},3349:function(l){"use strict";function e(){return function(s,c,m,h,v,g){var i=s[0],w=m[0],S=[0],M=w;h|=0;var C=0,_=w;for(C=0;C=0!=f>=0&&v.push(S[0]+.5+.5*(T+f)/(T-f))}h+=_,++S[0]}}}function t(){return e()}var n=t;function r(s){var c={};return function(h,v,g){var i=h.dtype,w=h.order,S=[i,w.join()].join(),M=c[S];return M||(c[S]=M=s([i,w])),M(h.shape.slice(0),h.data,h.stride,h.offset|0,v,g)}}function a(s){return r(n.bind(void 0,s))}function o(s){return a({funcName:s.funcName})}l.exports=o({funcName:"zeroCrossings"})},781:function(l,e,t){"use strict";l.exports=r;var n=t(3349);function r(a,o){var s=[];return o=+o||0,n(a.hi(a.shape[0]-1),s,o),s}},7790:function(){}},b={};function E(l){var e=b[l];if(e!==void 0)return e.exports;var t=b[l]={id:l,loaded:!1,exports:{}};return p[l].call(t.exports,t,t.exports,E),t.loaded=!0,t.exports}(function(){E.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){E.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var k=E(1964);V.exports=k})()}}),cp=ze({"src/lib/str2rgbarray.js"(J,V){"use strict";var{normalize:p}=Qn();function b(E){return E?p(E):[0,0,0,1]}V.exports=b}}),fp=ze({"src/lib/gl_format_color.js"(J,V){"use strict";var p=ao(),b=fl(),E=Qn(),k=fc().defaultLine,l=Ff().isArrayOrTypedArray,e=E.normalize(k),t=1;function n(c,m){return[c[0],c[1],c[2],c[3]*m]}function r(c){return p(c)||!E.isChannelArray(c)&&!E.isValid(c)?e:E.normalize(c)}function a(c){return p(c)?c:t}function o(c,m,h){var v=c.color;v&&v._inputArray&&(v=v._inputArray);var g=l(v),i=l(m),w=b.extractOpts(c),S=[],M,C,_,T,f;if(w.colorscale!==void 0?M=b.makeColorScaleFuncFromTrace(c):M=r,g?C=(A,x)=>A[x]===void 0?e:w.colorscale===void 0?M(A[x]):E.normalize(M(A[x])):C=r,i?_=function(A,x){return A[x]===void 0?t:a(A[x])}:_=a,g||i)for(var u=0;u0){var v=n.c2l(m);n._lowerLogErrorBound||(n._lowerLogErrorBound=v),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,v)}}else a[o]=[-s[0]*t,s[1]*t]}return a}function E(l){for(var e=0;e-1?-1:z.indexOf("right")>-1?1:0}function S(z){return z==null?0:z.indexOf("top")>-1?-1:z.indexOf("bottom")>-1?1:0}function M(z){var I=0,O=0,D=[I,O];if(Array.isArray(z))for(var B=0;B=0){var $=g(j.position,j.delaunayColor,j.delaunayAxis);$.opacity=z.opacity,this.delaunayMesh?this.delaunayMesh.update($):($.gl=I,this.delaunayMesh=k($),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)},v.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 x(z,I){var O=new h(z,I.uid);return O.update(I),O}V.exports=x}}),mA=ze({"src/traces/scatter3d/attributes.js"(J,V){"use strict";var p=su(),b=Qs(),E=qs(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=ws(),r=vA(),a=w2(),o=Ki().extendFlat,s=Al().overrideAll,c=(Nv(),Po(nv)).default,m=p.line,h=p.marker,v=h.line,g=o({width:m.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},E("line"));function i(S){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 w=V.exports=s({x:p.x,y:p.y,z:{valType:"data_array"},text:o({},p.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:o({},p.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z"),mode:o({},p.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:i("x"),y:i("y"),z:i("z")},connectgaps:p.connectgaps,line:g,marker:o({symbol:{valType:"enumerated",values:c(a),dflt:"circle",arrayOk:!0},size:o({},h.size,{dflt:8}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:o({},h.opacity,{arrayOk:!1}),colorbar:h.colorbar,line:o({width:o({},v.width,{arrayOk:!1})},E("marker.line"))},E("marker")),textposition:o({},p.textposition,{dflt:"top center"}),textfont:b({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:n.opacity,hoverinfo:o({},n.hoverinfo)},"calc","nested");w.x.editType=w.y.editType=w.z.editType="calc+clearAxisTypes"}}),LN=ze({"src/traces/scatter3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=el(),k=id(),l=_d(),e=xd(),t=mA();V.exports=function(a,o,s,c){function m(C,_){return b.coerce(a,o,t,C,_)}var h=n(a,o,m,c);if(!h){o.visible=!1;return}m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),m("zhoverformat"),m("mode"),E.hasMarkers(o)&&k(a,o,s,c,m,{noAngle:!0,noLineDash:!0,noSelect:!0}),E.hasLines(o)&&(m("connectgaps"),l(a,o,s,c,m)),E.hasText(o)&&(m("texttemplate"),m("texttemplatefallback"),e(a,o,c,m,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var v=(o.line||{}).color,g=(o.marker||{}).color;m("surfaceaxis")>=0&&m("surfacecolor",v||g);for(var i=["x","y","z"],w=0;w<3;++w){var S="projection."+i[w];m(S+".show")&&(m(S+".opacity"),m(S+".scale"))}var M=p.getComponentMethod("errorbars","supplyDefaults");M(a,o,v||g||s,{axis:"z"}),M(a,o,v||g||s,{axis:"y",inherit:"z"}),M(a,o,v||g||s,{axis:"x",inherit:"z"})};function n(r,a,o,s){var c=0,m=o("x"),h=o("y"),v=o("z"),g=p.getComponentMethod("calendars","handleTraceDefaults");return g(r,a,["x","y","z"],s),m&&h&&v&&(c=Math.min(m.length,h.length,v.length),a._length=a._xlength=a._ylength=a._zlength=c),c}}}),PN=ze({"src/traces/scatter3d/calc.js"(J,V){"use strict";var p=Nd(),b=od();V.exports=function(k,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return p(e,l),b(k,l),e}}}),RN=ze({"node_modules/get-canvas-context/index.js"(J,V){V.exports=p;function p(b,E){if(typeof b!="string")throw new TypeError("must specify type string");if(E=E||{},typeof document>"u"&&!E.canvas)return null;var k=E.canvas||document.createElement("canvas");typeof E.width=="number"&&(k.width=E.width),typeof E.height=="number"&&(k.height=E.height);var l=E,e;try{var t=[b];b.indexOf("webgl")===0&&t.push("experimental-"+b);for(var n=0;n/g," "));o[s]=v,c.tickmode=m}}n.ticks=o;for(var s=0;s<3;++s){k[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var g=0;g<2;++g)n.bounds[g][s]=t.glplot.bounds[g][s]}t.contourLevels=l(o)}}}),BN=ze({"src/plots/gl3d/scene.js"(J,V){"use strict";var p=df().gl_plot3d,b=p.createCamera,E=p.createScene,k=IN(),l=Rx(),e=mi(),t=Nr(),n=t.preserveDrawingBuffer(),r=Gi(),a=Zl(),o=cp(),s=gA(),c=C5(),m=DN(),h=FN(),v=zN(),g=md().applyAutorangeOptions,i,w,S=!1;function M(O,D){var B=document.createElement("div"),F=O.container;this.graphDiv=O.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",B.appendChild(P),this.svgContainer=P,B.id=O.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",F.appendChild(B),this.fullLayout=D,this.id=O.id||"scene",this.fullSceneLayout=D[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(D,D[this.id]),this.spikeOptions=h(D[this.id]),this.container=B,this.staticMode=!!O.staticPlot,this.pixelRatio=this.pixelRatio||O.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var O=this,D={canvas:O.canvas,gl:O.gl,glOptions:{preserveDrawingBuffer:n,premultipliedAlpha:!0,antialias:!0},container:O.container,axes:O.axesOptions,spikes:O.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:O.camera,pixelRatio:O.pixelRatio};if(O.staticMode){if(!w&&(i=document.createElement("canvas"),w=k({canvas:i,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!w))throw new Error("error creating static canvas/context for image server");D.gl=w,D.canvas=i}return D};var _=!0;C.tryCreatePlot=function(){var O=this,D=O.prepareOptions(),B=!0;try{O.glplot=E(D)}catch{if(O.staticMode||!_||n)B=!1;else{t.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{n=D.glOptions.preserveDrawingBuffer=!0,O.glplot=E(D)}catch{n=D.glOptions.preserveDrawingBuffer=!1,B=!1}}}return _=!1,B},C.initializeGLCamera=function(){var O=this,D=O.fullSceneLayout.camera,B=D.projection.type==="orthographic";O.camera=b(O.container,{center:[D.center.x,D.center.y,D.center.z],eye:[D.eye.x,D.eye.y,D.eye.z],up:[D.up.x,D.up.y,D.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var O=this;O.initializeGLCamera();var D=O.tryCreatePlot();if(!D)return s(O);O.traces={},O.make4thDimension();var B=O.graphDiv,F=B.layout,P=function(){var U={};return O.isCameraChanged(F)&&(U[O.id+".camera"]=O.getCamera()),O.isAspectChanged(F)&&(U[O.id+".aspectratio"]=O.glplot.getAspectratio(),F[O.id].aspectmode!=="manual"&&(O.fullSceneLayout.aspectmode=F[O.id].aspectmode=U[O.id+".aspectmode"]="manual")),U},j=function(U){if(U.fullSceneLayout.dragmode!==!1){var $=P();U.saveLayout(F),U.graphDiv.emit("plotly_relayout",$)}};return O.glplot.canvas&&(O.glplot.canvas.addEventListener("mouseup",function(){j(O)}),O.glplot.canvas.addEventListener("touchstart",function(){S=!0}),O.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(O.camera._ortho){var $=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=O.glplot.getAspectratio();O.glplot.setAspectratio({x:$*Q.x,y:$*Q.y,z:$*Q.z})}j(O)}},l?{passive:!1}:!1),O.glplot.canvas.addEventListener("mousemove",function(){if(O.fullSceneLayout.dragmode!==!1&&O.camera.mouseListener.buttons!==0){var U=P();O.graphDiv.emit("plotly_relayouting",U)}}),O.staticMode||O.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:O.id})},!1)),O.glplot.oncontextloss=function(){O.recoverContext()},O.glplot.onrender=function(){O.render()},!0},C.render=function(){var O=this,D=O.graphDiv,B,F=O.svgContainer,P=O.container.getBoundingClientRect();D._fullLayout._calcInverseTransform(D);var j=D._fullLayout._invScaleX,U=D._fullLayout._invScaleY,$=P.width*j,Q=P.height*U;F.setAttributeNS(null,"viewBox","0 0 "+$+" "+Q),F.setAttributeNS(null,"width",$),F.setAttributeNS(null,"height",Q),v(O),O.glplot.axes.update(O.axesOptions);for(var re=Object.keys(O.traces),ne=null,se=O.glplot.selection,G=0;G")):B.type==="isosurface"||B.type==="volume"?(q.valueLabel=r.hoverLabelText(O._mockAxis,O._mockAxis.d2l(se.traceCoordinate[3]),B.valuehoverformat),xe.push("value: "+q.valueLabel),se.textLabel&&xe.push(se.textLabel),he=xe.join("
")):he=se.textLabel;var we={x:se.traceCoordinate[0],y:se.traceCoordinate[1],z:se.traceCoordinate[2],data:H._input,fullData:H,curveNumber:H.index,pointNumber:Y};a.appendArrayPointValue(we,H,Y),B._module.eventData&&(we=H._module.eventData(we,se,H,{},Y));var Me={points:[we]};if(O.fullSceneLayout.hovermode){var Se=[];a.loneHover({trace:H,x:(.5+.5*K[0]/K[3])*$,y:(.5-.5*K[1]/K[3])*Q,xLabel:q.xLabel,yLabel:q.yLabel,zLabel:q.zLabel,text:he,name:ne.name,color:a.castHoverOption(H,Y,"bgcolor")||ne.color,borderColor:a.castHoverOption(H,Y,"bordercolor"),fontFamily:a.castHoverOption(H,Y,"font.family"),fontSize:a.castHoverOption(H,Y,"font.size"),fontColor:a.castHoverOption(H,Y,"font.color"),nameLength:a.castHoverOption(H,Y,"namelength"),textAlign:a.castHoverOption(H,Y,"align"),hovertemplate:t.castOption(H,Y,"hovertemplate"),hovertemplateLabels:t.extendFlat({},we,q),eventData:[we]},{container:F,gd:D,inOut_bbox:Se}),we.bbox=Se[0]}se.distance<5&&(se.buttons||S)?D.emit("plotly_click",Me):D.emit("plotly_hover",Me),this.oldEventData=Me}else a.loneUnhover(F),this.oldEventData&&D.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;O.drawAnnotations(O)},C.recoverContext=function(){var O=this;O.glplot.dispose();var D=function(){if(O.glplot.gl.isContextLost()){requestAnimationFrame(D);return}if(!O.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}O.plot.apply(O,O.plotArgs)};requestAnimationFrame(D)};var T=["xaxis","yaxis","zaxis"];function f(O,D,B){for(var F=O.fullSceneLayout,P=0;P<3;P++){var j=T[P],U=j.charAt(0),$=F[j],Q=D[U],re=D[U+"calendar"],ne=D["_"+U+"length"];if(!t.isArrayOrTypedArray(Q))B[0][P]=Math.min(B[0][P],0),B[1][P]=Math.max(B[1][P],ne-1);else for(var se,G=0;G<(ne||Q.length);G++)if(t.isArrayOrTypedArray(Q[G]))for(var X=0;XH[1][U])H[0][U]=-1,H[1][U]=1;else{var Ve=H[1][U]-H[0][U];H[0][U]-=Ve/32,H[1][U]+=Ve/32}if(Z=[H[0][U],H[1][U]],Z=g(Z,Q),H[0][U]=Z[0],H[1][U]=Z[1],Q.isReversed()){var Ge=H[0][U];H[0][U]=H[1][U],H[1][U]=Ge}}else Z=Q.range,H[0][U]=Q.r2l(Z[0]),H[1][U]=Q.r2l(Z[1]);H[0][U]===H[1][U]&&(H[0][U]-=1,H[1][U]+=1),Y[U]=H[1][U]-H[0][U],Q.range=[H[0][U],H[1][U]],Q.limitRange(),F.glplot.setBounds(U,{min:Q.range[0]*X[U],max:Q.range[1]*X[U]})}var ke,_e=ne.aspectmode;if(_e==="cube")ke=[1,1,1];else if(_e==="manual"){var ce=ne.aspectratio;ke=[ce.x,ce.y,ce.z]}else if(_e==="auto"||_e==="data"){var ve=[1,1,1];for(U=0;U<3;++U){Q=ne[T[U]],re=Q.type;var le=q[re];ve[U]=Math.pow(le.acc,1/le.count)/X[U]}_e==="data"||Math.max.apply(null,ve)/Math.min.apply(null,ve)<=4?ke=ve:ke=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ne.aspectratio.x=se.aspectratio.x=ke[0],ne.aspectratio.y=se.aspectratio.y=ke[1],ne.aspectratio.z=se.aspectratio.z=ke[2],F.glplot.setAspectratio(ne.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:ne.aspectratio.x,y:ne.aspectratio.y,z:ne.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=ne.aspectmode);var Ae=ne.domain||null,Be=D._size||null;if(Ae&&Be){var Xe=F.container.style;Xe.position="absolute",Xe.left=Be.l+Ae.x[0]*Be.w+"px",Xe.top=Be.t+(1-Ae.y[1])*Be.h+"px",Xe.width=Be.w*(Ae.x[1]-Ae.x[0])+"px",Xe.height=Be.h*(Ae.y[1]-Ae.y[0])+"px"}F.glplot.redraw()}},C.destroy=function(){var O=this;O.glplot&&(O.camera.mouseListener.enabled=!1,O.container.removeEventListener("wheel",O.camera.wheelListener),O.camera=null,O.glplot.dispose(),O.container.parentNode.removeChild(O.container),O.glplot=null)};function A(O){return[[O.eye.x,O.eye.y,O.eye.z],[O.center.x,O.center.y,O.center.z],[O.up.x,O.up.y,O.up.z]]}function x(O){return{up:{x:O.up[0],y:O.up[1],z:O.up[2]},center:{x:O.center[0],y:O.center[1],z:O.center[2]},eye:{x:O.eye[0],y:O.eye[1],z:O.eye[2]},projection:{type:O._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var O=this;return O.camera.view.recalcMatrix(O.camera.view.lastT()),x(O.camera)},C.setViewport=function(O){var D=this,B=O.camera;D.camera.lookAt.apply(this,A(B)),D.glplot.setAspectratio(O.aspectratio);var F=B.projection.type==="orthographic",P=D.camera._ortho;F!==P&&(D.glplot.redraw(),D.glplot.clearRGBA(),D.glplot.dispose(),D.initializeGLPlot())},C.isCameraChanged=function(O){var D=this,B=D.getCamera(),F=t.nestedProperty(O,D.id+".camera"),P=F.get();function j(re,ne,se,G){var X=["up","center","eye"],K=["x","y","z"];return ne[X[se]]&&re[X[se]][K[G]]===ne[X[se]][K[G]]}var U=!1;if(P===void 0)U=!0;else{for(var $=0;$<3;$++)for(var Q=0;Q<3;Q++)if(!j(B,P,$,Q)){U=!0;break}(!P.projection||B.projection&&B.projection.type!==P.projection.type)&&(U=!0)}return U},C.isAspectChanged=function(O){var D=this,B=D.glplot.getAspectratio(),F=t.nestedProperty(O,D.id+".aspectratio"),P=F.get();return P===void 0||P.x!==B.x||P.y!==B.y||P.z!==B.z},C.saveLayout=function(O){var D=this,B=D.fullLayout,F,P,j,U,$,Q,re=D.isCameraChanged(O),ne=D.isAspectChanged(O),se=re||ne;if(se){var G={};if(re&&(F=D.getCamera(),P=t.nestedProperty(O,D.id+".camera"),j=P.get(),G[D.id+".camera"]=j),ne&&(U=D.glplot.getAspectratio(),$=t.nestedProperty(O,D.id+".aspectratio"),Q=$.get(),G[D.id+".aspectratio"]=Q),e.call("_storeDirectGUIEdit",O,B._preGUI,G),re){P.set(F);var X=t.nestedProperty(B,D.id+".camera");X.set(F)}if(ne){$.set(U);var K=t.nestedProperty(B,D.id+".aspectratio");K.set(U),D.glplot.redraw()}}return se},C.updateFx=function(O,D){var B=this,F=B.camera;if(F)if(O==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(O==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var P=B.graphDiv,j=P._fullLayout,U=B.fullSceneLayout.camera,$=U.up.x,Q=U.up.y,re=U.up.z;if(re/Math.sqrt($*$+Q*Q+re*re)<.999){var ne=B.id+".camera.up",se={x:0,y:0,z:1},G={};G[ne]=se;var X=P.layout;e.call("_storeDirectGUIEdit",X,j._preGUI,G),U.up=se,t.nestedProperty(X,ne).set(se)}}else F.keyBindingMode=O;B.fullSceneLayout.hovermode=D};function z(O,D,B){for(var F=0,P=B-1;F0)for(var $=255/U,Q=0;Q<3;++Q)O[j+Q]=Math.min($*O[j+Q],255)}}C.toImage=function(O){var D=this;O||(O="png"),D.staticMode&&D.container.appendChild(i),D.glplot.redraw();var B=D.glplot.gl,F=B.drawingBufferWidth,P=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var j=new Uint8Array(F*P*4);B.readPixels(0,0,F,P,B.RGBA,B.UNSIGNED_BYTE,j),z(j,F,P),I(j,F,P);var U=document.createElement("canvas");U.width=F,U.height=P;var $=U.getContext("2d",{willReadFrequently:!0}),Q=$.createImageData(F,P);Q.data.set(j),$.putImageData(Q,0,0);var re;switch(O){case"jpeg":re=U.toDataURL("image/jpeg");break;case"webp":re=U.toDataURL("image/webp");break;default:re=U.toDataURL("image/png")}return D.staticMode&&D.container.removeChild(i),re},C.setConvert=function(){for(var O=this,D=0;D<3;D++){var B=O.fullSceneLayout[T[D]];r.setConvert(B,O.fullLayout),B.setScale=t.noop}},C.make4thDimension=function(){var O=this,D=O.graphDiv,B=D._fullLayout;O._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(O._mockAxis,B)},V.exports=M}}),ON=ze({"src/plots/gl3d/layout/attributes.js"(J,V){"use strict";V.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),yA=ze({"src/plots/gl3d/layout/axis_attributes.js"(J,V){"use strict";var p=Qn(),b=cf(),E=Ki().extendFlat,k=Al().overrideAll;V.exports=k({visible:b.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:p.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:b.color,categoryorder:b.categoryorder,categoryarray:b.categoryarray,title:{text:b.title.text,font:b.title.font},type:E({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorange:b.autorange,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},rangemode:b.rangemode,minallowed:b.minallowed,maxallowed:b.maxallowed,range:E({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,mirror:b.mirror,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,tickfont:b.tickfont,tickangle:b.tickangle,tickprefix:b.tickprefix,showtickprefix:b.showtickprefix,ticksuffix:b.ticksuffix,showticksuffix:b.showticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickformat:b.tickformat,tickformatstops:b.tickformatstops,hoverformat:b.hoverformat,showline:b.showline,linecolor:b.linecolor,linewidth:b.linewidth,showgrid:b.showgrid,gridcolor:E({},b.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:b.gridwidth,zeroline:b.zeroline,zerolinecolor:b.zerolinecolor,zerolinewidth:b.zerolinewidth},"plot","from-root")}}),_A=ze({"src/plots/gl3d/layout/layout_attributes.js"(J,V){"use strict";var p=yA(),b=Ml().attributes,E=Ki().extendFlat,k=Nr().counterRegex;function l(e,t,n){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}V.exports={_arrayAttrRegexps:[k("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:E(l(0,0,1),{}),center:E(l(0,0,0),{}),eye:E(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:b({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:p,yaxis:p,zaxis:p,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"}}}),NN=ze({"src/plots/gl3d/layout/axis_defaults.js"(J,V){"use strict";var p=Qn(),b=Nr(),E=hs(),k=yA(),l=E5(),e=y1(),t=["xaxis","yaxis","zaxis"],n=100*136/187;V.exports=function(a,o,s){var c,m;function h(i,w){return b.coerce(c,m,k,i,w)}for(var v=0;v1;function h(v){if(!m){var g=p.validate(o[v],e[v]);if(g)return o[v]}}k(o,s,c,{type:n,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:h,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(a,o,s,c){for(var m=s("bgcolor"),h=b.combine(m,c.paper_bgcolor),v=["up","center","eye"],g=0;g.999)&&(C="turntable")}else C="turntable";s("dragmode",C),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),xv=ze({"src/plots/gl3d/index.js"(J){"use strict";var V=Al().overrideAll,p=rv(),b=BN(),E=zf().getSubplotData,k=Nr(),l=nd(),e="gl3d",t="scene";J.name=e,J.attr=t,J.idRoot=t,J.idRegex=J.attrRegex=k.counterRegex("scene"),J.attributes=ON(),J.layoutAttributes=_A(),J.baseLayoutAttrOverrides=V({hoverlabel:p.hoverlabel},"plot","nested"),J.supplyLayoutDefaults=jN(),J.plot=function(r){for(var a=r._fullLayout,o=r._fullData,s=a._subplots[e],c=0;c0){z=c[I];break}return z}function g(A,x){if(!(A<1||x<1)){for(var z=h(A),I=h(x),O=1,D=0;DM;)I--,I/=v(I),I++,I1?O:1};function C(A,x,z){var I=z[8]+z[2]*x[0]+z[5]*x[1];return A[0]=(z[6]+z[0]*x[0]+z[3]*x[1])/I,A[1]=(z[7]+z[1]*x[0]+z[4]*x[1])/I,A}function _(A,x,z){return T(A,x,C,z),A}function T(A,x,z,I){for(var O=[0,0],D=A.shape[0],B=A.shape[1],F=0;F0&&this.contourStart[I]!==null&&this.contourEnd[I]!==null&&this.contourEnd[I]>this.contourStart[I]))for(x[I]=!0,O=this.contourStart[I];OQ&&(this.minValues[j]=Q),this.maxValues[j]c&&(n.isomin=null,n.isomax=null);var m=o("x"),h=o("y"),v=o("z"),g=o("value");if(!m||!m.length||!h||!h.length||!v||!v.length||!g||!g.length){n.visible=!1;return}var i=b.getComponentMethod("calendars","handleTraceDefaults");i(t,n,["x","y","z"],a),o("valuehoverformat"),["x","y","z"].forEach(function(C){o(C+"hoverformat");var _="caps."+C,T=o(_+".show");T&&o(_+".fill");var f="slices."+C,u=o(f+".show");u&&(o(f+".fill"),o(f+".locations"))});var w=o("spaceframe.show");w&&o("spaceframe.fill");var S=o("surface.show");S&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("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(C){o(C)}),k(t,n,a,o,{prefix:"",cLetter:"c"}),n._length=null}V.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),A2=ze({"src/traces/streamtube/calc.js"(J,V){"use strict";var p=Nr(),b=Qf();function E(t,n){n._len=Math.min(n.u.length,n.v.length,n.w.length,n.x.length,n.y.length,n.z.length),n._u=e(n.u,n._len),n._v=e(n.v,n._len),n._w=e(n.w,n._len),n._x=e(n.x,n._len),n._y=e(n.y,n._len),n._z=e(n.z,n._len);var r=k(n);n._gridFill=r.fill,n._Xs=r.Xs,n._Ys=r.Ys,n._Zs=r.Zs,n._len=r.len;var a=0,o,s,c;n.starts&&(o=e(n.starts.x||[]),s=e(n.starts.y||[]),c=e(n.starts.z||[]),a=Math.min(o.length,s.length,c.length)),n._startsX=o||[],n._startsY=s||[],n._startsZ=c||[];var m=0,h=1/0,v;for(v=0;v1&&(u=n[o-1],x=r[o-1],I=a[o-1]),s=0;su?"-":"+")+"x"),M=M.replace("y",(A>x?"-":"+")+"y"),M=M.replace("z",(z>I?"-":"+")+"z");var F=function(){o=0,O=[],D=[],B=[]};(!o||o0;h--){var v=Math.min(m[h],m[h-1]),g=Math.max(m[h],m[h-1]);if(g>v&&v-1}function ee(Ot,vt){return Ot===null?vt:Ot}function ae(Ot,vt,ht){re();var De=[vt],Ne=[ht];if(H>=1)De=[vt],Ne=[ht];else if(H>0){var We=q(vt,ht);De=We.xyzv,Ne=We.abc}for(var Ke=0;Ke-1?ht[et]:Q(Mt,pt,Pt);qt>-1?Je[et]=qt:Je[et]=se(Mt,pt,Pt,ee(Ot,Ct))}G(Je[0],Je[1],Je[2])}}function he(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(2,3,0)}function xe(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(3,0,1),De(2,3,0),De(1,2,3)}function we(Ot,vt,ht,De){var Ne=Ot[3];NeDe&&(Ne=De);for(var We=(Ot[3]-Ne)/(Ot[3]-vt[3]+1e-9),Ke=[],Je=0;Je<4;Je++)Ke[Je]=(1-We)*Ot[Je]+We*vt[Je];return Ke}function Me(Ot,vt,ht){return Ot>=vt&&Ot<=ht}function Se(Ot){var vt=.001*(F-B);return Ot>=B-vt&&Ot<=F+vt}function Ie(Ot){for(var vt=[],ht=0;ht<4;ht++){var De=Ot[ht];vt.push([c._x[De],c._y[De],c._z[De],c._value[De]])}return vt}var Ve=3;function Ge(Ot,vt,ht,De,Ne,We){We||(We=1),ht=[-1,-1,-1];var Ke=!1,Je=[Me(vt[0][3],De,Ne),Me(vt[1][3],De,Ne),Me(vt[2][3],De,Ne)];if(!Je[0]&&!Je[1]&&!Je[2])return!1;var et=function(pt,Pt,Ct){return Se(Pt[0][3])&&Se(Pt[1][3])&&Se(Pt[2][3])?(ae(pt,Pt,Ct),!0):WeJe?[O,We]:[We,D];Tt(vt,et[0],et[1])}}var Mt=[[Math.min(B,D),Math.max(B,D)],[Math.min(O,F),Math.max(O,F)]];["x","y","z"].forEach(function(pt){for(var Pt=[],Ct=0;Ct0&&(Yt.push(ur.id),pt==="x"?Rt.push([ur.distRatio,0,0]):pt==="y"?Rt.push([0,ur.distRatio,0]):Rt.push([0,0,ur.distRatio]))}else pt==="x"?Kr=_r(1,u-1):pt==="y"?Kr=_r(1,A-1):Kr=_r(1,x-1);Yt.length>0&&(pt==="x"?Pt[qt]=At(Ot,Yt,Vt,Ht,Rt,Pt[qt]):pt==="y"?Pt[qt]=$t(Ot,Yt,Vt,Ht,Rt,Pt[qt]):Pt[qt]=rr(Ot,Yt,Vt,Ht,Rt,Pt[qt]),qt++),Kr.length>0&&(pt==="x"?Pt[qt]=Be(Ot,Kr,Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,Kr,Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,Kr,Vt,Ht,Pt[qt]),qt++)}var cr=c.caps[pt];cr.show&&cr.fill&&(Y(cr.fill),pt==="x"?Pt[qt]=Be(Ot,[0,u-1],Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,[0,A-1],Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,[0,x-1],Vt,Ht,Pt[qt]),qt++)}}),S===0&&ne(),c._meshX=P,c._meshY=j,c._meshZ=U,c._meshIntensity=$,c._Xs=_,c._Ys=T,c._Zs=f}return or(),c}function s(c,m){var h=c.glplot.gl,v=p({gl:h}),g=new n(c,v,m.uid);return v._trace=g,g.update(m),c.glplot.add(v),g}V.exports={findNearestOnAxis:t,generateIsoMeshes:o,createIsosurfaceTrace:s}}}),YN=ze({"src/traces/isosurface/index.js"(J,V){"use strict";V.exports={attributes:T2(),supplyDefaults:bA().supplyDefaults,calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:M2().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),XN=ze({"lib/isosurface.js"(J,V){"use strict";V.exports=YN()}}),TA=ze({"src/traces/volume/attributes.js"(J,V){"use strict";var p=qs(),b=T2(),E=K1(),k=ws(),l=Ki().extendFlat,e=Al().overrideAll,t=V.exports=e(l({x:b.x,y:b.y,z:b.z,value:b.value,isomin:b.isomin,isomax:b.isomax,surface:b.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:b.slices,caps:b.caps,text:b.text,hovertext:b.hovertext,xhoverformat:b.xhoverformat,yhoverformat:b.yhoverformat,zhoverformat:b.zhoverformat,valuehoverformat:b.valuehoverformat,hovertemplate:b.hovertemplate,hovertemplatefallback:b.hovertemplatefallback},p("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:b.colorbar,opacity:b.opacity,opacityscale:E.opacityscale,lightposition:b.lightposition,lighting:b.lighting,flatshading:b.flatshading,contour:b.contour,hoverinfo:l({},k.hoverinfo),showlegend:l({},k.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),ZN=ze({"src/traces/volume/defaults.js"(J,V){"use strict";var p=Nr(),b=TA(),E=bA().supplyIsoDefaults,k=xA().opacityscaleDefaults;V.exports=function(e,t,n,r){function a(o,s){return p.coerce(e,t,b,o,s)}E(e,t,n,r,a),k(e,t,r,a)}}}),$N=ze({"src/traces/volume/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=fp().parseColorScale,E=Nr().isArrayOrTypedArray,k=cp(),l=fl().extractOpts,e=mg(),t=M2().findNearestOnAxis,n=M2().generateIsoMeshes;function r(s,c,m){this.scene=s,this.uid=m,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var a=r.prototype;a.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,m=this.data._meshX[c],h=this.data._meshY[c],v=this.data._meshZ[c],g=this.data._Ys.length,i=this.data._Zs.length,w=t(m,this.data._Xs).id,S=t(h,this.data._Ys).id,M=t(v,this.data._Zs).id,C=s.index=M+i*S+i*g*w;s.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var _=this.data.hovertext||this.data.text;return E(_)&&_[C]!==void 0?s.textLabel=_[C]:_&&(s.textLabel=_),!0}},a.update=function(s){var c=this.scene,m=c.fullSceneLayout;this.data=n(s);function h(S,M,C,_){return M.map(function(T){return S.d2l(T,0,_)*C})}var v=e(h(m.xaxis,s._meshX,c.dataScale[0],s.xcalendar),h(m.yaxis,s._meshY,c.dataScale[1],s.ycalendar),h(m.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),g=e(s._meshI,s._meshJ,s._meshK),i={positions:v,cells:g,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:k(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},w=l(s);i.vertexIntensity=s._meshIntensity,i.vertexIntensityBounds=[w.min,w.max],i.colormap=b(s),this.mesh.update(i)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(s,c){var m=s.glplot.gl,h=p({gl:m}),v=new r(s,h,c.uid);return h._trace=v,v.update(c),s.glplot.add(h),v}V.exports=o}}),KN=ze({"src/traces/volume/index.js"(J,V){"use strict";V.exports={attributes:TA(),supplyDefaults:ZN(),calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:$N(),moduleType:"trace",name:"volume",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),JN=ze({"lib/volume.js"(J,V){"use strict";V.exports=KN()}}),QN=ze({"src/traces/mesh3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=qc(),k=vg();V.exports=function(e,t,n,r){function a(h,v){return b.coerce(e,t,k,h,v)}function o(h){var v=h.map(function(g){var i=a(g);return i&&b.isArrayOrTypedArray(i)?i:null});return v.every(function(g){return g&&g.length===v[0].length})&&v}var s=o(["x","y","z"]);if(!s){t.visible=!1;return}if(o(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=p.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["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(h){a(h)});var m=a("contour.show");m&&(a("contour.color"),a("contour.width")),"intensity"in e?(a("intensity"),a("intensitymode"),E(e,t,r,a,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?a("facecolor"):"vertexcolor"in e?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),ej=ze({"src/traces/mesh3d/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){k.intensity&&p(E,k,{vals:k.intensity,containerStr:"",cLetter:"c"})}}}),tj=ze({"src/traces/mesh3d/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=df().delaunay_triangulate,E=df().alpha_shape,k=df().convex_hull,l=fp().parseColorScale,e=Nr().isArrayOrTypedArray,t=cp(),n=fl().extractOpts,r=mg();function a(i,w,S){this.scene=i,this.uid=S,this.mesh=w,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=a.prototype;o.handlePick=function(i){if(i.object===this.mesh){var w=i.index=i.data.index;i.data._cellCenter?i.traceCoordinate=i.data.dataCoordinate:i.traceCoordinate=[this.data.x[w],this.data.y[w],this.data.z[w]];var S=this.data.hovertext||this.data.text;return e(S)&&S[w]!==void 0?i.textLabel=S[w]:S&&(i.textLabel=S),!0}};function s(i){for(var w=[],S=i.length,M=0;M=w-.5)return!1;return!0}o.update=function(i){var w=this.scene,S=w.fullSceneLayout;this.data=i;var M=i.x.length,C=r(c(S.xaxis,i.x,w.dataScale[0],i.xcalendar),c(S.yaxis,i.y,w.dataScale[1],i.ycalendar),c(S.zaxis,i.z,w.dataScale[2],i.zcalendar)),_;if(i.i&&i.j&&i.k){if(i.i.length!==i.j.length||i.j.length!==i.k.length||!v(i.i,M)||!v(i.j,M)||!v(i.k,M))return;_=r(m(i.i),m(i.j),m(i.k))}else i.alphahull===0?_=k(C):i.alphahull>0?_=E(i.alphahull,C):_=h(i.delaunayaxis,C);var T={positions:C,cells:_,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,contourEnable:i.contour.show,contourColor:t(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading};if(i.intensity){var f=n(i);this.color="#fff";var u=i.intensitymode;T[u+"Intensity"]=i.intensity,T[u+"IntensityBounds"]=[f.min,f.max],T.colormap=l(i)}else i.vertexcolor?(this.color=i.vertexcolor[0],T.vertexColors=s(i.vertexcolor)):i.facecolor?(this.color=i.facecolor[0],T.cellColors=s(i.facecolor)):(this.color=i.color,T.meshColor=t(i.color));this.mesh.update(T)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(i,w){var S=i.glplot.gl,M=p({gl:S}),C=new a(i,M,w.uid);return M._trace=C,C.update(w),i.glplot.add(M),C}V.exports=g}}),rj=ze({"src/traces/mesh3d/index.js"(J,V){"use strict";V.exports={attributes:vg(),supplyDefaults:QN(),calc:ej(),colorbar:{min:"cmin",max:"cmax"},plot:tj(),moduleType:"trace",name:"mesh3d",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),aj=ze({"lib/mesh3d.js"(J,V){"use strict";V.exports=rj()}}),AA=ze({"src/traces/cone/attributes.js"(J,V){"use strict";var p=qs(),b=Il().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=vg(),e=ws(),t=Ki().extendFlat,n={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:E({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:k({editType:"calc"}),uhoverformat:b("u",1),vhoverformat:b("v",1),whoverformat:b("w",1),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(n,p("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(a){n[a]=l[a]}),n.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=n}}),nj=ze({"src/traces/cone/defaults.js"(J,V){"use strict";var p=Nr(),b=qc(),E=AA();V.exports=function(l,e,t,n){function r(g,i){return p.coerce(l,e,E,g,i)}var a=r("u"),o=r("v"),s=r("w"),c=r("x"),m=r("y"),h=r("z");if(!a||!a.length||!o||!o.length||!s||!s.length||!c||!c.length||!m||!m.length||!h||!h.length){e.visible=!1;return}var v=r("sizemode");r("sizeref",v==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),b(l,e,n,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),ij=ze({"src/traces/cone/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){for(var l=k.u,e=k.v,t=k.w,n=Math.min(k.x.length,k.y.length,k.z.length,l.length,e.length,t.length),r=-1/0,a=1/0,o=0;o2?v=m.slice(1,h-1):h===2?v=[(m[0]+m[1])/2]:v=m,v}function o(m){var h=m.length;return h===1?[.5,.5]:[m[1]-m[0],m[h-1]-m[h-2]]}function s(m,h){var v=m.fullSceneLayout,g=m.dataScale,i=h._len,w={};function S(se,G){var X=v[G],K=g[t[G]];return E.simpleMap(se,function(H){return X.d2l(H)*K})}if(w.vectors=e(S(h._u,"xaxis"),S(h._v,"yaxis"),S(h._w,"zaxis"),i),!i)return{positions:[],cells:[]};var M=S(h._Xs,"xaxis"),C=S(h._Ys,"yaxis"),_=S(h._Zs,"zaxis");w.meshgrid=[M,C,_],w.gridFill=h._gridFill;var T=h._slen;if(T)w.startingPositions=e(S(h._startsX,"xaxis"),S(h._startsY,"yaxis"),S(h._startsZ,"zaxis"));else{for(var f=C[0],u=a(M),A=a(_),x=new Array(u.length*A.length),z=0,I=0;If&&(f=z[0]),z[1]u&&(u=z[1])}function x(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(x);break;case"Point":A(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(A);break}}S.arcs.forEach(function(z){for(var I=-1,O=z.length,D;++If&&(f=D[0]),D[1]u&&(u=D[1])});for(C in S.objects)x(S.objects[C]);return[_,T,f,u]}function l(S,M){for(var C,_=S.length,T=_-M;T<--_;)C=S[T],S[T++]=S[_],S[_]=C}function e(S,M){return typeof M=="string"&&(M=S.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return t(S,C)})}:t(S,M)}function t(S,M){var C=M.id,_=M.bbox,T=M.properties==null?{}:M.properties,f=n(S,M);return C==null&&_==null?{type:"Feature",properties:T,geometry:f}:_==null?{type:"Feature",id:C,properties:T,geometry:f}:{type:"Feature",id:C,bbox:_,properties:T,geometry:f}}function n(S,M){var C=E(S.transform),_=S.arcs;function T(I,O){O.length&&O.pop();for(var D=_[I<0?~I:I],B=0,F=D.length;B1)_=s(S,M,C);else for(T=0,_=new Array(f=S.arcs.length);T1)for(var O=1,D=A(z[0]),B,F;OD&&(F=z[0],z[0]=z[O],z[O]=F,D=B);return z}).filter(function(x){return x.length>0})}}function v(S,M){for(var C=0,_=S.length;C<_;){var T=C+_>>>1;S[T]=2))throw new Error("n must be \u22652");x=S.bbox||k(S);var C=x[0],_=x[1],T=x[2],f=x[3],u;M={scale:[T-C?(T-C)/(u-1):1,f-_?(f-_)/(u-1):1],translate:[C,_]}}else x=S.bbox;var A=i(M),x,z,I=S.objects,O={};function D(P){return A(P)}function B(P){var j;switch(P.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:P.geometries.map(B)};break;case"Point":j={type:"Point",coordinates:D(P.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:P.coordinates.map(D)};break;default:return P}return P.id!=null&&(j.id=P.id),P.bbox!=null&&(j.bbox=P.bbox),P.properties!=null&&(j.properties=P.properties),j}function F(P){var j=0,U=1,$=P.length,Q,re=new Array($);for(re[0]=A(P[0],0);++j<$;)((Q=A(P[j],j))[0]||Q[1])&&(re[U++]=Q);return U===1&&(re[U++]=[0,0]),re.length=U,re}for(z in I)O[z]=B(I[z]);return{type:"Topology",bbox:x,transform:M,objects:O,arcs:S.arcs.map(F)}}p.bbox=k,p.feature=e,p.merge=m,p.mergeArcs=h,p.mesh=a,p.meshArcs=o,p.neighbors=g,p.quantize=w,p.transform=E,p.untransform=i,Object.defineProperty(p,"__esModule",{value:!0})})}}),S2=ze({"src/lib/topojson_utils.js"(J,V){"use strict";var p=V.exports={},b=J1().locationmodeToLayer,E=EA().feature;p.getTopojsonName=function(k){return[k.scope.replace(/ /g,"-"),"_",k.resolution.toString(),"m"].join("")},p.getTopojsonPath=function(k,l){return k+=k.endsWith("/")?"":"/",`${k}${l}.json`},p.getTopojsonFeatures=function(k,l){var e=b[k.locationmode],t=l.objects[e];return E(l,t).features}}}),Q1=ze({"src/lib/geojson_utils.js"(J){"use strict";var V=No().BADNUM;J.calcTraceToLineCoords=function(p){for(var b=p[0].trace,E=b.connectgaps,k=[],l=[],e=0;e0&&(k.push(l),l=[])}return l.length>0&&k.push(l),k},J.makeLine=function(p){return p.length===1?{type:"LineString",coordinates:p[0]}:{type:"MultiLineString",coordinates:p}},J.makePolygon=function(p){if(p.length===1)return{type:"Polygon",coordinates:p};for(var b=new Array(p.length),E=0;E{for(var S in w)p(i,S,{get:w[S],enumerable:!0})},e=(i,w,S,M)=>{if(w&&typeof w=="object"||typeof w=="function")for(let C of E(w))!k.call(i,C)&&C!==S&&p(i,C,{get:()=>w[C],enumerable:!(M=b(w,C))||M.enumerable});return i},t=i=>e(p({},"__esModule",{value:!0}),i),n={};l(n,{COUNTRIES:()=>r,byAlpha2:()=>v,byAlpha3:()=>h,byM49:()=>g,createLookup:()=>o,lookup:()=>c,lookupAlpha3:()=>m,sanitize:()=>a}),V.exports=t(n);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function a(i){return i.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function o(i){let w=new Map,S=new Map,M=new Map;for(let f of i)w.set(f.iso3,f),f.iso2&&S.set(f.iso2,f),f.m49&&M.set(f.m49,f);let C=new Map;for(let f of i)for(let u of[f.name,...f.aliases]){let A=a(u),x=C.get(A);if(x!==void 0&&x!==f.iso3)throw new Error(`Duplicate name/alias "${A}": ${x} vs ${f.iso3}`);C.set(A,f.iso3)}function _(f){if(f==null)return;let u=String(f).trim();if(!u)return;if(/^\d+$/.test(u)){let x=M.get(String(parseInt(u,10)).padStart(3,"0"));if(x)return x}if(/^[A-Za-z]{2}$/.test(u)){let x=S.get(u.toUpperCase());if(x)return x}if(/^[A-Za-z]{3}$/.test(u)){let x=w.get(u.toUpperCase());if(x)return x}let A=C.get(a(u));return A===void 0?void 0:w.get(A)}function T(f){var u;return(u=_(f))==null?void 0:u.iso3}return{lookup:_,lookupAlpha3:T,byAlpha3:w,byAlpha2:S,byM49:M}}var s=o(r),c=s.lookup,m=s.lookupAlpha3,h=s.byAlpha3,v=s.byAlpha2,g=s.byM49}}),E2=ze({"node_modules/@turf/helpers/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=63710088e-1,p={centimeters:V*100,centimetres:V*100,degrees:360/(2*Math.PI),feet:V*3.28084,inches:V*39.37,kilometers:V/1e3,kilometres:V/1e3,meters:V,metres:V,miles:V/1609.344,millimeters:V*1e3,millimetres:V*1e3,nauticalmiles:V/1852,radians:1,yards:V*1.0936},b={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function E(I,O,D={}){let B={type:"Feature"};return(D.id===0||D.id)&&(B.id=D.id),D.bbox&&(B.bbox=D.bbox),B.properties=O||{},B.geometry=I,B}function k(I,O,D={}){switch(I){case"Point":return l(O).geometry;case"LineString":return r(O).geometry;case"Polygon":return t(O).geometry;case"MultiPoint":return c(O).geometry;case"MultiLineString":return s(O).geometry;case"MultiPolygon":return m(O).geometry;default:throw new Error(I+" is invalid")}}function l(I,O,D={}){if(!I)throw new Error("coordinates is required");if(!Array.isArray(I))throw new Error("coordinates must be an Array");if(I.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(I[0])||!u(I[1]))throw new Error("coordinates must contain numbers");return E({type:"Point",coordinates:I},O,D)}function e(I,O,D={}){return o(I.map(B=>l(B,O)),D)}function t(I,O,D={}){for(let F of I){if(F.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(F[F.length-1].length!==F[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pt(B,O)),D)}function r(I,O,D={}){if(I.length<2)throw new Error("coordinates must be an array of two or more positions");return E({type:"LineString",coordinates:I},O,D)}function a(I,O,D={}){return o(I.map(B=>r(B,O)),D)}function o(I,O={}){let D={type:"FeatureCollection"};return O.id&&(D.id=O.id),O.bbox&&(D.bbox=O.bbox),D.features=I,D}function s(I,O,D={}){return E({type:"MultiLineString",coordinates:I},O,D)}function c(I,O,D={}){return E({type:"MultiPoint",coordinates:I},O,D)}function m(I,O,D={}){return E({type:"MultiPolygon",coordinates:I},O,D)}function h(I,O,D={}){return E({type:"GeometryCollection",geometries:I},O,D)}function v(I,O=0){if(O&&!(O>=0))throw new Error("precision must be a positive number");let D=Math.pow(10,O||0);return Math.round(I*D)/D}function g(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I*D}function i(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I/D}function w(I,O){return C(i(I,O))}function S(I){let O=I%360;return O<0&&(O+=360),O}function M(I){return I=I%360,I>180?I-360:I<-180?I+360:I}function C(I){return I%(2*Math.PI)*180/Math.PI}function _(I){return I%360*Math.PI/180}function T(I,O="kilometers",D="kilometers"){if(!(I>=0))throw new Error("length must be a positive number");return g(i(I,O),D)}function f(I,O="meters",D="kilometers"){if(!(I>=0))throw new Error("area must be a positive number");let B=b[O];if(!B)throw new Error("invalid original units");let F=b[D];if(!F)throw new Error("invalid final units");return I/B*F}function u(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)}function A(I){return I!==null&&typeof I=="object"&&!Array.isArray(I)}function x(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(O=>{if(!u(O))throw new Error("bbox must only contain numbers")})}function z(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}J.areaFactors=b,J.azimuthToBearing=M,J.bearingToAzimuth=S,J.convertArea=f,J.convertLength=T,J.degreesToRadians=_,J.earthRadius=V,J.factors=p,J.feature=E,J.featureCollection=o,J.geometry=k,J.geometryCollection=h,J.isNumber=u,J.isObject=A,J.lengthToDegrees=w,J.lengthToRadians=i,J.lineString=r,J.lineStrings=a,J.multiLineString=s,J.multiPoint=c,J.multiPolygon=m,J.point=l,J.points=e,J.polygon=t,J.polygons=n,J.radiansToDegrees=C,J.radiansToLength=g,J.round=v,J.validateBBox=x,J.validateId=z}}),k2=ze({"node_modules/@turf/meta/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2();function p(i,w,S){if(i!==null)for(var M,C,_,T,f,u,A,x=0,z=0,I,O=i.type,D=O==="FeatureCollection",B=O==="Feature",F=D?i.features.length:1,P=0;Pu||D>A||B>x){f=z,u=M,A=D,x=B,_=0;return}var F=V.lineString.call(void 0,[f,z],S.properties);if(w(F,M,C,B,_)===!1)return!1;_++,f=z})===!1)return!1}}})}function c(i,w,S){var M=S,C=!1;return s(i,function(_,T,f,u,A){C===!1&&S===void 0?M=_:M=w(M,_,T,f,u,A),C=!0}),M}function m(i,w){if(!i)throw new Error("geojson is required");a(i,function(S,M,C){if(S.geometry!==null){var _=S.geometry.type,T=S.geometry.coordinates;switch(_){case"LineString":if(w(S,M,C,0,0)===!1)return!1;break;case"Polygon":for(var f=0;fa+E(o),0)}function E(r){let a=0,o;switch(r.type){case"Polygon":return k(r.coordinates);case"MultiPolygon":for(o=0;o0){a+=Math.abs(t(r[0]));for(let o=1;o=a?(s+2)%a:s+2],v=c[0]*e,g=m[1]*e,i=h[0]*e;o+=(i-v)*Math.sin(g),s++}return o*l}var n=b;J.area=b,J.default=n}}),gj=ze({"node_modules/@turf/centroid/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2(),p=k2();function b(k,l={}){let e=0,t=0,n=0;return p.coordEach.call(void 0,k,function(r){e+=r[0],t+=r[1],n++},!0),V.point.call(void 0,[e/n,t/n],l.properties)}var E=b;J.centroid=b,J.default=E}}),yj=ze({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:Ft<0?-1:0},f=Math.sqrt,u=Math.tan;function A(Ft){return Ft>1?0:Ft<-1?r:Math.acos(Ft)}function x(Ft){return Ft>1?a:Ft<-1?-a:Math.asin(Ft)}function z(Ft){return(Ft=_(Ft/2))*Ft}function I(){}function O(Ft,tr){Ft&&B.hasOwnProperty(Ft.type)&&B[Ft.type](Ft,tr)}var D={Feature:function(Ft,tr){O(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr=0?1:-1,ea=wr*Fr,ba=i(tr),Ia=_(tr),Na=G*Ia,Za=se*ba+Na*i(ea),mn=Na*wr*_(ea);U.add(g(mn,Za)),ne=Ft,se=ba,G=Ia}function Z(Ft){return $.reset(),j(Ft,X),$*2}function ee(Ft){return[g(Ft[1],Ft[0]),x(Ft[2])]}function ae(Ft){var tr=Ft[0],Fr=Ft[1],wr=i(Fr);return[wr*i(tr),wr*_(tr),_(Fr)]}function he(Ft,tr){return Ft[0]*tr[0]+Ft[1]*tr[1]+Ft[2]*tr[2]}function xe(Ft,tr){return[Ft[1]*tr[2]-Ft[2]*tr[1],Ft[2]*tr[0]-Ft[0]*tr[2],Ft[0]*tr[1]-Ft[1]*tr[0]]}function we(Ft,tr){Ft[0]+=tr[0],Ft[1]+=tr[1],Ft[2]+=tr[2]}function Me(Ft,tr){return[Ft[0]*tr,Ft[1]*tr,Ft[2]*tr]}function Se(Ft){var tr=f(Ft[0]*Ft[0]+Ft[1]*Ft[1]+Ft[2]*Ft[2]);Ft[0]/=tr,Ft[1]/=tr,Ft[2]/=tr}var Ie,Ve,Ge,ke,_e,ce,ve,le,Ae=E(),Be,Xe,Ye={point:yt,lineStart:Tt,lineEnd:At,polygonStart:function(){Ye.point=$t,Ye.lineStart=rr,Ye.lineEnd=_r,Ae.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Ye.point=yt,Ye.lineStart=Tt,Ye.lineEnd=At,U<0?(Ie=-(Ge=180),Ve=-(ke=90)):Ae>t?ke=90:Ae<-t&&(Ve=-90),Xe[0]=Ie,Xe[1]=Ge},sphere:function(){Ie=-(Ge=180),Ve=-(ke=90)}};function yt(Ft,tr){Be.push(Xe=[Ie=Ft,Ge=Ft]),trke&&(ke=tr)}function gt(Ft,tr){var Fr=ae([Ft*m,tr*m]);if(le){var wr=xe(le,Fr),ea=[wr[1],-wr[0],0],ba=xe(ea,wr);Se(ba),ba=ee(ba);var Ia=Ft-_e,Na=Ia>0?1:-1,Za=ba[0]*c*Na,mn,Da=h(Ia)>180;Da^(Na*_eke&&(ke=mn)):(Za=(Za+360)%360-180,Da^(Na*_eke&&(ke=tr))),Da?Ft<_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft):Ge>=Ie?(FtGe&&(Ge=Ft)):Ft>_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft)}else Be.push(Xe=[Ie=Ft,Ge=Ft]);trke&&(ke=tr),le=Fr,_e=Ft}function Tt(){Ye.point=gt}function At(){Xe[0]=Ie,Xe[1]=Ge,Ye.point=yt,le=null}function $t(Ft,tr){if(le){var Fr=Ft-_e;Ae.add(h(Fr)>180?Fr+(Fr>0?360:-360):Fr)}else ce=Ft,ve=tr;X.point(Ft,tr),gt(Ft,tr)}function rr(){X.lineStart()}function _r(){$t(ce,ve),X.lineEnd(),h(Ae)>t&&(Ie=-(Ge=180)),Xe[0]=Ie,Xe[1]=Ge,le=null}function Xt(Ft,tr){return(tr-=Ft)<0?tr+360:tr}function or(Ft,tr){return Ft[0]-tr[0]}function Ot(Ft,tr){return Ft[0]<=Ft[1]?Ft[0]<=tr&&tr<=Ft[1]:trXt(wr[0],wr[1])&&(wr[1]=ea[1]),Xt(ea[0],wr[1])>Xt(wr[0],wr[1])&&(wr[0]=ea[0])):ba.push(wr=ea);for(Ia=-1/0,Fr=ba.length-1,tr=0,wr=ba[Fr];tr<=Fr;wr=ea,++tr)ea=ba[tr],(Na=Xt(wr[1],ea[0]))>Ia&&(Ia=Na,Ie=ea[0],Ge=wr[1])}return Be=Xe=null,Ie===1/0||Ve===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ie,Ve],[Ge,ke]]}var ht,De,Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt,Ht,Sr,Kr,Yt={sphere:I,point:Rt,lineStart:ur,lineEnd:Qr,polygonStart:function(){Yt.lineStart=Zr,Yt.lineEnd=ha},polygonEnd:function(){Yt.lineStart=ur,Yt.lineEnd=Qr}};function Rt(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);nr(Fr*i(Ft),Fr*_(Ft),_(tr))}function nr(Ft,tr,Fr){++ht,Ne+=(Ft-Ne)/ht,We+=(tr-We)/ht,Ke+=(Fr-Ke)/ht}function ur(){Yt.point=cr}function cr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),Yt.point=Rr,nr(Ht,Sr,Kr)}function Rr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=g(f((Ia=Sr*ba-Kr*ea)*Ia+(Ia=Kr*wr-Ht*ba)*Ia+(Ia=Ht*ea-Sr*wr)*Ia),Ht*wr+Sr*ea+Kr*ba);De+=Ia,Je+=Ia*(Ht+(Ht=wr)),et+=Ia*(Sr+(Sr=ea)),Mt+=Ia*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function Qr(){Yt.point=Rt}function Zr(){Yt.point=Pa}function ha(){La(qt,Vt),Yt.point=Rt}function Pa(Ft,tr){qt=Ft,Vt=tr,Ft*=m,tr*=m,Yt.point=La;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),nr(Ht,Sr,Kr)}function La(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=Sr*ba-Kr*ea,Na=Kr*wr-Ht*ba,Za=Ht*ea-Sr*wr,mn=f(Ia*Ia+Na*Na+Za*Za),Da=x(mn),Ha=mn&&-Da/mn;pt+=Ha*Ia,Pt+=Ha*Na,Ct+=Ha*Za,De+=Da,Je+=Da*(Ht+(Ht=wr)),et+=Da*(Sr+(Sr=ea)),Mt+=Da*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function un(Ft){ht=De=Ne=We=Ke=Je=et=Mt=pt=Pt=Ct=0,j(Ft,Yt);var tr=pt,Fr=Pt,wr=Ct,ea=tr*tr+Fr*Fr+wr*wr;return ear?Ft+Math.round(-Ft/s)*s:Ft,tr]}Nn.invert=Nn;function yn(Ft,tr,Fr){return(Ft%=s)?tr||Fr?ja(li(Ft),Yn(tr,Fr)):li(Ft):tr||Fr?Yn(tr,Fr):Nn}function Un(Ft){return function(tr,Fr){return tr+=Ft,[tr>r?tr-s:tr<-r?tr+s:tr,Fr]}}function li(Ft){var tr=Un(Ft);return tr.invert=Un(-Ft),tr}function Yn(Ft,tr){var Fr=i(Ft),wr=_(Ft),ea=i(tr),ba=_(tr);function Ia(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*Fr+Da*wr;return[g(Ha*ea-vn*ba,Da*Fr-$a*wr),x(vn*ea+Ha*ba)]}return Ia.invert=function(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*ea-Ha*ba;return[g(Ha*ea+$a*ba,Da*Fr+vn*wr),x(vn*Fr-Da*wr)]},Ia}function on(Ft){Ft=yn(Ft[0]*m,Ft[1]*m,Ft.length>2?Ft[2]*m:0);function tr(Fr){return Fr=Ft(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr}return tr.invert=function(Fr){return Fr=Ft.invert(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr},tr}function en(Ft,tr,Fr,wr,ea,ba){if(Fr){var Ia=i(tr),Na=_(tr),Za=wr*Fr;ea==null?(ea=tr+wr*s,ba=tr-Za/2):(ea=vi(Ia,ea),ba=vi(Ia,ba),(wr>0?eaba)&&(ea+=wr*s));for(var mn,Da=ea;wr>0?Da>ba:Da1&&Ft.push(Ft.pop().concat(Ft.shift()))},result:function(){var Fr=Ft;return Ft=[],tr=null,Fr}}}function Oa(Ft,tr){return h(Ft[0]-tr[0])=0;--Na)ea.point((Ha=Da[Na])[0],Ha[1]);else wr($a.x,$a.p.x,-1,ea);$a=$a.p}$a=$a.o,Da=$a.z,vn=!vn}while(!$a.v);ea.lineEnd()}}}function fr(Ft){if(tr=Ft.length){for(var tr,Fr=0,wr=Ft[0],ea;++Fr=0?1:-1,Fo=Do*Co,Yo=Fo>r,bo=yi*Ni;if(lr.add(g(bo*Do*_(Fo),_i*Zi+bo*i(Fo))),Ia+=Yo?Co+Do*s:Co,Yo^vn>=Fr^kn>=Fr){var Gs=xe(ae($a),ae(ri));Se(Gs);var Es=xe(ba,Gs);Se(Es);var ns=(Yo^Co>=0?-1:1)*x(Es[2]);(wr>ns||wr===ns&&(Gs[0]||Gs[1]))&&(Na+=Yo^Co>=0?1:-1)}}return(Ia<-t||Ia0){for(Za||(ea.polygonStart(),Za=!0),ea.lineStart(),Zi=0;Zi1&&Ln&2&&Ni.push(Ni.pop().concat(Ni.shift())),Da.push(Ni.filter(ot))}}return $a}}function ot(Ft){return Ft.length>1}function kt(Ft,tr){return((Ft=Ft.x)[0]<0?Ft[1]-a-t:a-Ft[1])-((tr=tr.x)[0]<0?tr[1]-a-t:a-tr[1])}var jt=Dr(function(){return!0},ar,xr,[-r,-a]);function ar(Ft){var tr=NaN,Fr=NaN,wr=NaN,ea;return{lineStart:function(){Ft.lineStart(),ea=1},point:function(ba,Ia){var Na=ba>0?r:-r,Za=h(ba-tr);h(Za-r)0?a:-a),Ft.point(wr,Fr),Ft.lineEnd(),Ft.lineStart(),Ft.point(Na,Fr),Ft.point(ba,Fr),ea=0):wr!==Na&&Za>=r&&(h(tr-wr)t?v((_(tr)*(ba=i(wr))*_(Fr)-_(wr)*(ea=i(tr))*_(Ft))/(ea*ba*Ia)):(tr+wr)/2}function xr(Ft,tr,Fr,wr){var ea;if(Ft==null)ea=Fr*a,wr.point(-r,ea),wr.point(0,ea),wr.point(r,ea),wr.point(r,0),wr.point(r,-ea),wr.point(0,-ea),wr.point(-r,-ea),wr.point(-r,0),wr.point(-r,ea);else if(h(Ft[0]-tr[0])>t){var ba=Ft[0]0,ea=h(tr)>t;function ba(Da,Ha,$a,vn){en(vn,Ft,Fr,$a,Da,Ha)}function Ia(Da,Ha){return i(Da)*i(Ha)>tr}function Na(Da){var Ha,$a,vn,En,yi;return{lineStart:function(){En=vn=!1,yi=1},point:function(_i,ki){var ri=[_i,ki],kn,Ln=Ia(_i,ki),Ni=wr?Ln?0:mn(_i,ki):Ln?mn(_i+(_i<0?r:-r),ki):0;if(!Ha&&(En=vn=Ln)&&Da.lineStart(),Ln!==vn&&(kn=Za(Ha,ri),(!kn||Oa(Ha,kn)||Oa(ri,kn))&&(ri[2]=1)),Ln!==vn)yi=0,Ln?(Da.lineStart(),kn=Za(ri,Ha),Da.point(kn[0],kn[1])):(kn=Za(Ha,ri),Da.point(kn[0],kn[1],2),Da.lineEnd()),Ha=kn;else if(ea&&Ha&&wr^Ln){var Zi;!(Ni&$a)&&(Zi=Za(ri,Ha,!0))&&(yi=0,wr?(Da.lineStart(),Da.point(Zi[0][0],Zi[0][1]),Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd()):(Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd(),Da.lineStart(),Da.point(Zi[0][0],Zi[0][1],3)))}Ln&&(!Ha||!Oa(Ha,ri))&&Da.point(ri[0],ri[1]),Ha=ri,vn=Ln,$a=Ni},lineEnd:function(){vn&&Da.lineEnd(),Ha=null},clean:function(){return yi|(En&&vn)<<1}}}function Za(Da,Ha,$a){var vn=ae(Da),En=ae(Ha),yi=[1,0,0],_i=xe(vn,En),ki=he(_i,_i),ri=_i[0],kn=ki-ri*ri;if(!kn)return!$a&&Da;var Ln=tr*ki/kn,Ni=-tr*ri/kn,Zi=xe(yi,_i),Co=Me(yi,Ln),Do=Me(_i,Ni);we(Co,Do);var Fo=Zi,Yo=he(Co,Fo),bo=he(Fo,Fo),Gs=Yo*Yo-bo*(he(Co,Co)-1);if(!(Gs<0)){var Es=f(Gs),ns=Me(Fo,(-Yo-Es)/bo);if(we(ns,Co),ns=ee(ns),!$a)return ns;var Kn=Da[0],zo=Ha[0],gs=Da[1],js=Ha[1],Cl;zo0^ns[1]<(h(ns[0]-Kn)r^(Kn<=ns[0]&&ns[0]<=zo)){var xl=Me(Fo,(-Yo+Es)/bo);return we(xl,Co),[ns,ee(xl)]}}}function mn(Da,Ha){var $a=wr?Ft:r-Ft,vn=0;return Da<-$a?vn|=1:Da>$a&&(vn|=2),Ha<-$a?vn|=4:Ha>$a&&(vn|=8),vn}return Dr(Ia,Na,ba,wr?[0,-Ft]:[-r,Ft-r])}function Lr(Ft,tr,Fr,wr,ea,ba){var Ia=Ft[0],Na=Ft[1],Za=tr[0],mn=tr[1],Da=0,Ha=1,$a=Za-Ia,vn=mn-Na,En;if(En=Fr-Ia,!(!$a&&En>0)){if(En/=$a,$a<0){if(En0){if(En>Ha)return;En>Da&&(Da=En)}if(En=ea-Ia,!(!$a&&En<0)){if(En/=$a,$a<0){if(En>Ha)return;En>Da&&(Da=En)}else if($a>0){if(En0)){if(En/=vn,vn<0){if(En0){if(En>Ha)return;En>Da&&(Da=En)}if(En=ba-Na,!(!vn&&En<0)){if(En/=vn,vn<0){if(En>Ha)return;En>Da&&(Da=En)}else if(vn>0){if(En0&&(Ft[0]=Ia+Da*$a,Ft[1]=Na+Da*vn),Ha<1&&(tr[0]=Ia+Ha*$a,tr[1]=Na+Ha*vn),!0}}}}}var aa=1e9,Sa=-aa;function wa(Ft,tr,Fr,wr){function ea(mn,Da){return Ft<=mn&&mn<=Fr&&tr<=Da&&Da<=wr}function ba(mn,Da,Ha,$a){var vn=0,En=0;if(mn==null||(vn=Ia(mn,Ha))!==(En=Ia(Da,Ha))||Za(mn,Da)<0^Ha>0)do $a.point(vn===0||vn===3?Ft:Fr,vn>1?wr:tr);while((vn=(vn+Ha+4)%4)!==En);else $a.point(Da[0],Da[1])}function Ia(mn,Da){return h(mn[0]-Ft)0?0:3:h(mn[0]-Fr)0?2:1:h(mn[1]-tr)0?1:0:Da>0?3:2}function Na(mn,Da){return Za(mn.x,Da.x)}function Za(mn,Da){var Ha=Ia(mn,1),$a=Ia(Da,1);return Ha!==$a?Ha-$a:Ha===0?Da[1]-mn[1]:Ha===1?mn[0]-Da[0]:Ha===2?mn[1]-Da[1]:Da[0]-mn[0]}return function(mn){var Da=mn,Ha=Ja(),$a,vn,En,yi,_i,ki,ri,kn,Ln,Ni,Zi,Co={point:Do,lineStart:Gs,lineEnd:Es,polygonStart:Yo,polygonEnd:bo};function Do(Kn,zo){ea(Kn,zo)&&Da.point(Kn,zo)}function Fo(){for(var Kn=0,zo=0,gs=vn.length;zowr&&(Hu-Gu)*(wr-xl)>(Su-xl)*(Ft-Gu)&&++Kn:Su<=wr&&(Hu-Gu)*(wr-xl)<(Su-xl)*(Ft-Gu)&&--Kn;return Kn}function Yo(){Da=Ha,$a=[],vn=[],Zi=!0}function bo(){var Kn=Fo(),zo=Zi&&Kn,gs=($a=b.merge($a)).length;(zo||gs)&&(mn.polygonStart(),zo&&(mn.lineStart(),ba(null,null,1,mn),mn.lineEnd()),gs&&rt($a,Na,Kn,ba,mn),mn.polygonEnd()),Da=mn,$a=vn=En=null}function Gs(){Co.point=ns,vn&&vn.push(En=[]),Ni=!0,Ln=!1,ri=kn=NaN}function Es(){$a&&(ns(yi,_i),ki&&Ln&&Ha.rejoin(),$a.push(Ha.result())),Co.point=Do,Ln&&Da.lineEnd()}function ns(Kn,zo){var gs=ea(Kn,zo);if(vn&&En.push([Kn,zo]),Ni)yi=Kn,_i=zo,ki=gs,Ni=!1,gs&&(Da.lineStart(),Da.point(Kn,zo));else if(gs&&Ln)Da.point(Kn,zo);else{var js=[ri=Math.max(Sa,Math.min(aa,ri)),kn=Math.max(Sa,Math.min(aa,kn))],Cl=[Kn=Math.max(Sa,Math.min(aa,Kn)),zo=Math.max(Sa,Math.min(aa,zo))];Lr(js,Cl,Ft,tr,Fr,wr)?(Ln||(Da.lineStart(),Da.point(js[0],js[1])),Da.point(Cl[0],Cl[1]),gs||Da.lineEnd(),Zi=!1):gs&&(Da.lineStart(),Da.point(Kn,zo),Zi=!1)}ri=Kn,kn=zo,Ln=gs}return Co}}function pn(){var Ft=0,tr=0,Fr=960,wr=500,ea,ba,Ia;return Ia={stream:function(Na){return ea&&ba===Na?ea:ea=wa(Ft,tr,Fr,wr)(ba=Na)},extent:function(Na){return arguments.length?(Ft=+Na[0][0],tr=+Na[0][1],Fr=+Na[1][0],wr=+Na[1][1],ea=ba=null,Ia):[[Ft,tr],[Fr,wr]]}}}var tn=E(),ai,rn,Ri,Gn={sphere:I,point:I,lineStart:no,lineEnd:I,polygonStart:I,polygonEnd:I};function no(){Gn.point=fn,Gn.lineEnd=Di}function Di(){Gn.point=Gn.lineEnd=I}function fn(Ft,tr){Ft*=m,tr*=m,ai=Ft,rn=_(tr),Ri=i(tr),Gn.point=Ai}function Ai(Ft,tr){Ft*=m,tr*=m;var Fr=_(tr),wr=i(tr),ea=h(Ft-ai),ba=i(ea),Ia=_(ea),Na=wr*Ia,Za=Ri*Fr-rn*wr*ba,mn=rn*Fr+Ri*wr*ba;tn.add(g(f(Na*Na+Za*Za),mn)),ai=Ft,rn=Fr,Ri=wr}function jn(Ft){return tn.reset(),j(Ft,Gn),+tn}var Xn=[null,null],eo={type:"LineString",coordinates:Xn};function gi(Ft,tr){return Xn[0]=Ft,Xn[1]=tr,jn(eo)}var qi={Feature:function(Ft,tr){return oo(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr0&&(ea=gi(Ft[ba],Ft[ba-1]),ea>0&&Fr<=ea&&wr<=ea&&(Fr+wr-ea)*(1-Math.pow((Fr-wr)/ea,2))t}).map($a)).concat(b.range(w(ba/mn)*mn,ea,mn).filter(function(kn){return h(kn%Ha)>t}).map(vn))}return ki.lines=function(){return ri().map(function(kn){return{type:"LineString",coordinates:kn}})},ki.outline=function(){return{type:"Polygon",coordinates:[En(wr).concat(yi(Ia).slice(1),En(Fr).reverse().slice(1),yi(Na).reverse().slice(1))]}},ki.extent=function(kn){return arguments.length?ki.extentMajor(kn).extentMinor(kn):ki.extentMinor()},ki.extentMajor=function(kn){return arguments.length?(wr=+kn[0][0],Fr=+kn[1][0],Na=+kn[0][1],Ia=+kn[1][1],wr>Fr&&(kn=wr,wr=Fr,Fr=kn),Na>Ia&&(kn=Na,Na=Ia,Ia=kn),ki.precision(_i)):[[wr,Na],[Fr,Ia]]},ki.extentMinor=function(kn){return arguments.length?(tr=+kn[0][0],Ft=+kn[1][0],ba=+kn[0][1],ea=+kn[1][1],tr>Ft&&(kn=tr,tr=Ft,Ft=kn),ba>ea&&(kn=ba,ba=ea,ea=kn),ki.precision(_i)):[[tr,ba],[Ft,ea]]},ki.step=function(kn){return arguments.length?ki.stepMajor(kn).stepMinor(kn):ki.stepMinor()},ki.stepMajor=function(kn){return arguments.length?(Da=+kn[0],Ha=+kn[1],ki):[Da,Ha]},ki.stepMinor=function(kn){return arguments.length?(Za=+kn[0],mn=+kn[1],ki):[Za,mn]},ki.precision=function(kn){return arguments.length?(_i=+kn,$a=Eo(ba,ea,90),vn=Ao(tr,Ft,_i),En=Eo(Na,Ia,90),yi=Ao(wr,Fr,_i),ki):_i},ki.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function jo(){return ds()()}function Wo(Ft,tr){var Fr=Ft[0]*m,wr=Ft[1]*m,ea=tr[0]*m,ba=tr[1]*m,Ia=i(wr),Na=_(wr),Za=i(ba),mn=_(ba),Da=Ia*i(Fr),Ha=Ia*_(Fr),$a=Za*i(ea),vn=Za*_(ea),En=2*x(f(z(ba-wr)+Ia*Za*z(ea-Fr))),yi=_(En),_i=En?function(ki){var ri=_(ki*=En)/yi,kn=_(En-ki)/yi,Ln=kn*Da+ri*$a,Ni=kn*Ha+ri*vn,Zi=kn*Na+ri*mn;return[g(Ni,Ln)*c,g(Zi,f(Ln*Ln+Ni*Ni))*c]}:function(){return[Fr*c,wr*c]};return _i.distance=En,_i}function to(Ft){return Ft}var wo=E(),pi=E(),Vi,Io,Xi,Ko,Uo={point:I,lineStart:I,lineEnd:I,polygonStart:function(){Uo.lineStart=Ls,Uo.lineEnd=Vs},polygonEnd:function(){Uo.lineStart=Uo.lineEnd=Uo.point=I,wo.add(h(pi)),pi.reset()},result:function(){var Ft=wo/2;return wo.reset(),Ft}};function Ls(){Uo.point=Ss}function Ss(Ft,tr){Uo.point=Vo,Vi=Xi=Ft,Io=Ko=tr}function Vo(Ft,tr){pi.add(Ko*Ft-Xi*tr),Xi=Ft,Ko=tr}function Vs(){Vo(Vi,Io)}var Ts=1/0,Bo=Ts,_o=-Ts,Pi=_o,yo={point:bs,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var Ft=[[Ts,Bo],[_o,Pi]];return _o=Pi=-(Bo=Ts=1/0),Ft}};function bs(Ft,tr){Ft_o&&(_o=Ft),trPi&&(Pi=tr)}var Dl=0,hl=0,ps=0,dl=0,wu=0,lu=0,xc=0,Fl=0,pl=0,$u,uu,tl,vs,os={point:ms,lineStart:rl,lineEnd:Ku,polygonStart:function(){os.lineStart=bc,os.lineEnd=Lh},polygonEnd:function(){os.point=ms,os.lineStart=rl,os.lineEnd=Ku},result:function(){var Ft=pl?[xc/pl,Fl/pl]:lu?[dl/lu,wu/lu]:ps?[Dl/ps,hl/ps]:[NaN,NaN];return Dl=hl=ps=dl=wu=lu=xc=Fl=pl=0,Ft}};function ms(Ft,tr){Dl+=Ft,hl+=tr,++ps}function rl(){os.point=Fu}function Fu(Ft,tr){os.point=zu,ms(tl=Ft,vs=tr)}function zu(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ms(tl=Ft,vs=tr)}function Ku(){os.point=ms}function bc(){os.point=rh}function Lh(){Ju($u,uu)}function rh(Ft,tr){os.point=Ju,ms($u=tl=Ft,uu=vs=tr)}function Ju(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ea=vs*Ft-tl*tr,xc+=ea*(tl+Ft),Fl+=ea*(vs+tr),pl+=ea*3,ms(tl=Ft,vs=tr)}function ss(Ft){this._context=Ft}ss.prototype={_radius:4.5,pointRadius:function(Ft){return this._radius=Ft,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(Ft,tr){switch(this._point){case 0:{this._context.moveTo(Ft,tr),this._point=1;break}case 1:{this._context.lineTo(Ft,tr);break}default:{this._context.moveTo(Ft+this._radius,tr),this._context.arc(Ft,tr,this._radius,0,s);break}}},result:I};var ah=E(),wc,pc,Nf,Bu,Tc,Ou={point:I,lineStart:function(){Ou.point=Gc},lineEnd:function(){wc&&pf(pc,Nf),Ou.point=I},polygonStart:function(){wc=!0},polygonEnd:function(){wc=null},result:function(){var Ft=+ah;return ah.reset(),Ft}};function Gc(Ft,tr){Ou.point=pf,pc=Bu=Ft,Nf=Tc=tr}function pf(Ft,tr){Bu-=Ft,Tc-=tr,ah.add(f(Bu*Bu+Tc*Tc)),Bu=Ft,Tc=tr}function $l(){this._string=[]}$l.prototype={_radius:4.5,_circle:jf(4.5),pointRadius:function(Ft){return(Ft=+Ft)!==this._radius&&(this._radius=Ft,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(Ft,tr){switch(this._point){case 0:{this._string.push("M",Ft,",",tr),this._point=1;break}case 1:{this._string.push("L",Ft,",",tr);break}default:{this._circle==null&&(this._circle=jf(this._radius)),this._string.push("M",Ft,",",tr,this._circle);break}}},result:function(){if(this._string.length){var Ft=this._string.join("");return this._string=[],Ft}else return null}};function jf(Ft){return"m0,"+Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+-2*Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+2*Ft+"z"}function Hc(Ft,tr){var Fr=4.5,wr,ea;function ba(Ia){return Ia&&(typeof Fr=="function"&&ea.pointRadius(+Fr.apply(this,arguments)),j(Ia,wr(ea))),ea.result()}return ba.area=function(Ia){return j(Ia,wr(Uo)),Uo.result()},ba.measure=function(Ia){return j(Ia,wr(Ou)),Ou.result()},ba.bounds=function(Ia){return j(Ia,wr(yo)),yo.result()},ba.centroid=function(Ia){return j(Ia,wr(os)),os.result()},ba.projection=function(Ia){return arguments.length?(wr=Ia==null?(Ft=null,to):(Ft=Ia).stream,ba):Ft},ba.context=function(Ia){return arguments.length?(ea=Ia==null?(tr=null,new $l):new ss(tr=Ia),typeof Fr!="function"&&ea.pointRadius(Fr),ba):tr},ba.pointRadius=function(Ia){return arguments.length?(Fr=typeof Ia=="function"?Ia:(ea.pointRadius(+Ia),+Ia),ba):Fr},ba.projection(Ft).context(tr)}function Wc(Ft){return{stream:Qu(Ft)}}function Qu(Ft){return function(tr){var Fr=new Yc;for(var wr in Ft)Fr[wr]=Ft[wr];return Fr.stream=tr,Fr}}function Yc(){}Yc.prototype={constructor:Yc,point:function(Ft,tr){this.stream.point(Ft,tr)},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 Nu(Ft,tr,Fr){var wr=Ft.clipExtent&&Ft.clipExtent();return Ft.scale(150).translate([0,0]),wr!=null&&Ft.clipExtent(null),j(Fr,Ft.stream(yo)),tr(yo.result()),wr!=null&&Ft.clipExtent(wr),Ft}function Uf(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=tr[1][0]-tr[0][0],ba=tr[1][1]-tr[0][1],Ia=Math.min(ea/(wr[1][0]-wr[0][0]),ba/(wr[1][1]-wr[0][1])),Na=+tr[0][0]+(ea-Ia*(wr[1][0]+wr[0][0]))/2,Za=+tr[0][1]+(ba-Ia*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*Ia).translate([Na,Za])},Fr)}function al(Ft,tr,Fr){return Uf(Ft,[[0,0],tr],Fr)}function Xc(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][0]-wr[0][0]),Ia=(ea-ba*(wr[1][0]+wr[0][0]))/2,Na=-ba*wr[0][1];Ft.scale(150*ba).translate([Ia,Na])},Fr)}function ju(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][1]-wr[0][1]),Ia=-ba*wr[0][0],Na=(ea-ba*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*ba).translate([Ia,Na])},Fr)}var Ac=16,Zc=i(30*m);function ec(Ft,tr){return+tr?tc(Ft,tr):cu(Ft)}function cu(Ft){return Qu({point:function(tr,Fr){tr=Ft(tr,Fr),this.stream.point(tr[0],tr[1])}})}function tc(Ft,tr){function Fr(wr,ea,ba,Ia,Na,Za,mn,Da,Ha,$a,vn,En,yi,_i){var ki=mn-wr,ri=Da-ea,kn=ki*ki+ri*ri;if(kn>4*tr&&yi--){var Ln=Ia+$a,Ni=Na+vn,Zi=Za+En,Co=f(Ln*Ln+Ni*Ni+Zi*Zi),Do=x(Zi/=Co),Fo=h(h(Zi)-1)tr||h((ki*Es+ri*ns)/kn-.5)>.3||Ia*$a+Na*vn+Za*En2?Kn[2]%360*m:0,Es()):[Na*c,Za*c,mn*c]},bo.angle=function(Kn){return arguments.length?(Ha=Kn%360*m,Es()):Ha*c},bo.reflectX=function(Kn){return arguments.length?($a=Kn?-1:1,Es()):$a<0},bo.reflectY=function(Kn){return arguments.length?(vn=Kn?-1:1,Es()):vn<0},bo.precision=function(Kn){return arguments.length?(Zi=ec(Co,Ni=Kn*Kn),ns()):f(Ni)},bo.fitExtent=function(Kn,zo){return Uf(bo,Kn,zo)},bo.fitSize=function(Kn,zo){return al(bo,Kn,zo)},bo.fitWidth=function(Kn,zo){return Xc(bo,Kn,zo)},bo.fitHeight=function(Kn,zo){return ju(bo,Kn,zo)};function Es(){var Kn=vl(Fr,0,0,$a,vn,Ha).apply(null,tr(ba,Ia)),zo=(Ha?vl:nh)(Fr,wr-Kn[0],ea-Kn[1],$a,vn,Ha);return Da=yn(Na,Za,mn),Co=ja(tr,zo),Do=ja(Da,Co),Zi=ec(Co,Ni),ns()}function ns(){return Fo=Yo=null,bo}return function(){return tr=Ft.apply(this,arguments),bo.invert=tr.invert&&Gs,Es()}}function yl(Ft){var tr=0,Fr=r/3,wr=rc(Ft),ea=wr(tr,Fr);return ea.parallels=function(ba){return arguments.length?wr(tr=ba[0]*m,Fr=ba[1]*m):[tr*c,Fr*c]},ea}function qf(Ft){var tr=i(Ft);function Fr(wr,ea){return[wr*tr,_(ea)/tr]}return Fr.invert=function(wr,ea){return[wr/tr,x(ea*tr)]},Fr}function ac(Ft,tr){var Fr=_(Ft),wr=(Fr+_(tr))/2;if(h(wr)=.12&&_i<.234&&yi>=-.425&&yi<-.214?ea:_i>=.166&&_i<.234&&yi>=-.214&&yi<-.115?Ia:Fr).invert($a)},Da.stream=function($a){return Ft&&tr===$a?Ft:Ft=Jo([Fr.stream(tr=$a),ea.stream($a),Ia.stream($a)])},Da.precision=function($a){return arguments.length?(Fr.precision($a),ea.precision($a),Ia.precision($a),Ha()):Fr.precision()},Da.scale=function($a){return arguments.length?(Fr.scale($a),ea.scale($a*.35),Ia.scale($a),Da.translate(Fr.translate())):Fr.scale()},Da.translate=function($a){if(!arguments.length)return Fr.translate();var vn=Fr.scale(),En=+$a[0],yi=+$a[1];return wr=Fr.translate($a).clipExtent([[En-.455*vn,yi-.238*vn],[En+.455*vn,yi+.238*vn]]).stream(mn),ba=ea.translate([En-.307*vn,yi+.201*vn]).clipExtent([[En-.425*vn+t,yi+.12*vn+t],[En-.214*vn-t,yi+.234*vn-t]]).stream(mn),Na=Ia.translate([En-.205*vn,yi+.212*vn]).clipExtent([[En-.214*vn+t,yi+.166*vn+t],[En-.115*vn-t,yi+.234*vn-t]]).stream(mn),Ha()},Da.fitExtent=function($a,vn){return Uf(Da,$a,vn)},Da.fitSize=function($a,vn){return al(Da,$a,vn)},Da.fitWidth=function($a,vn){return Xc(Da,$a,vn)},Da.fitHeight=function($a,vn){return ju(Da,$a,vn)};function Ha(){return Ft=tr=null,Da}return Da.scale(1070)}function fu(Ft){return function(tr,Fr){var wr=i(tr),ea=i(Fr),ba=Ft(wr*ea);return[ba*ea*_(tr),ba*_(Fr)]}}function Sl(Ft){return function(tr,Fr){var wr=f(tr*tr+Fr*Fr),ea=Ft(wr),ba=_(ea),Ia=i(ea);return[g(tr*ba,wr*Ia),x(wr&&Fr*ba/wr)]}}var El=fu(function(Ft){return f(2/(1+Ft))});El.invert=Sl(function(Ft){return 2*x(Ft/2)});function oh(){return ml(El).scale(124.75).clipAngle(180-.001)}var Au=fu(function(Ft){return(Ft=A(Ft))&&Ft/_(Ft)});Au.invert=Sl(function(Ft){return Ft});function $c(){return ml(Au).scale(79.4188).clipAngle(180-.001)}function _l(Ft,tr){return[Ft,M(u((a+tr)/2))]}_l.invert=function(Ft,tr){return[Ft,2*v(S(tr))-a]};function nl(){return gf(_l).scale(961/s)}function gf(Ft){var tr=ml(Ft),Fr=tr.center,wr=tr.scale,ea=tr.translate,ba=tr.clipExtent,Ia=null,Na,Za,mn;tr.scale=function(Ha){return arguments.length?(wr(Ha),Da()):wr()},tr.translate=function(Ha){return arguments.length?(ea(Ha),Da()):ea()},tr.center=function(Ha){return arguments.length?(Fr(Ha),Da()):Fr()},tr.clipExtent=function(Ha){return arguments.length?(Ha==null?Ia=Na=Za=mn=null:(Ia=+Ha[0][0],Na=+Ha[0][1],Za=+Ha[1][0],mn=+Ha[1][1]),Da()):Ia==null?null:[[Ia,Na],[Za,mn]]};function Da(){var Ha=r*wr(),$a=tr(on(tr.rotate()).invert([0,0]));return ba(Ia==null?[[$a[0]-Ha,$a[1]-Ha],[$a[0]+Ha,$a[1]+Ha]]:Ft===_l?[[Math.max($a[0]-Ha,Ia),Na],[Math.min($a[0]+Ha,Za),mn]]:[[Ia,Math.max($a[1]-Ha,Na)],[Za,Math.min($a[1]+Ha,mn)]])}return Da()}function Kc(Ft){return u((a+Ft)/2)}function sh(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):M(Fr/i(tr))/M(Kc(tr)/Kc(Ft)),ea=Fr*C(Kc(Ft),wr)/wr;if(!wr)return _l;function ba(Ia,Na){ea>0?Na<-a+t&&(Na=-a+t):Na>a-t&&(Na=a-t);var Za=ea/C(Kc(Na),wr);return[Za*_(wr*Ia),ea-Za*i(wr*Ia)]}return ba.invert=function(Ia,Na){var Za=ea-Na,mn=T(wr)*f(Ia*Ia+Za*Za),Da=g(Ia,h(Za))*T(Za);return Za*wr<0&&(Da-=r*T(Ia)*T(Za)),[Da/wr,2*v(C(ea/mn,1/wr))-a]},ba}function hu(){return yl(sh).scale(109.5).parallels([30,30])}function Uu(Ft,tr){return[Ft,tr]}Uu.invert=Uu;function qu(){return ml(Uu).scale(152.63)}function nc(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):(Fr-i(tr))/(tr-Ft),ea=Fr/wr+Ft;if(h(wr)t&&--wr>0);return[Ft/(.8707+(ba=Fr*Fr)*(-.131979+ba*(-.013791+ba*ba*ba*(.003971-.001529*ba)))),Fr]};function Hf(){return ml(bh).scale(175.295)}function il(Ft,tr){return[i(tr)*_(Ft),_(tr)]}il.invert=Sl(x);function kl(){return ml(il).scale(249.5).clipAngle(90+t)}function kc(Ft,tr){var Fr=i(tr),wr=1+i(Ft)*Fr;return[Fr*_(Ft)/wr,_(tr)/wr]}kc.invert=Sl(function(Ft){return 2*v(Ft)});function Cc(){return ml(kc).scale(250).clipAngle(142)}function Lc(Ft,tr){return[M(u((a+tr)/2)),-Ft]}Lc.invert=function(Ft,tr){return[-tr,2*v(S(Ft))-a]};function vc(){var Ft=gf(Lc),tr=Ft.center,Fr=Ft.rotate;return Ft.center=function(wr){return arguments.length?tr([-wr[1],wr[0]]):(wr=tr(),[wr[1],-wr[0]])},Ft.rotate=function(wr){return arguments.length?Fr([wr[0],wr[1],wr.length>2?wr[2]+90:90]):(wr=Fr(),[wr[0],wr[1],wr[2]-90])},Fr([0,0,90]).scale(159.155)}p.geoAlbers=mf,p.geoAlbersUsa=ih,p.geoArea=Z,p.geoAzimuthalEqualArea=oh,p.geoAzimuthalEqualAreaRaw=El,p.geoAzimuthalEquidistant=$c,p.geoAzimuthalEquidistantRaw=Au,p.geoBounds=vt,p.geoCentroid=un,p.geoCircle=Yi,p.geoClipAntimeridian=jt,p.geoClipCircle=zr,p.geoClipExtent=pn,p.geoClipRectangle=wa,p.geoConicConformal=hu,p.geoConicConformalRaw=sh,p.geoConicEqualArea=Mc,p.geoConicEqualAreaRaw=ac,p.geoConicEquidistant=yf,p.geoConicEquidistantRaw=nc,p.geoContains=go,p.geoDistance=gi,p.geoEqualEarth=xh,p.geoEqualEarthRaw=Ec,p.geoEquirectangular=qu,p.geoEquirectangularRaw=Uu,p.geoGnomonic=xf,p.geoGnomonicRaw=Vf,p.geoGraticule=ds,p.geoGraticule10=jo,p.geoIdentity=Gf,p.geoInterpolate=Wo,p.geoLength=jn,p.geoMercator=nl,p.geoMercatorRaw=_l,p.geoNaturalEarth1=Hf,p.geoNaturalEarth1Raw=bh,p.geoOrthographic=kl,p.geoOrthographicRaw=il,p.geoPath=Hc,p.geoProjection=ml,p.geoProjectionMutator=rc,p.geoRotation=on,p.geoStereographic=Cc,p.geoStereographicRaw=kc,p.geoStream=j,p.geoTransform=Wc,p.geoTransverseMercator=vc,p.geoTransverseMercatorRaw=Lc,Object.defineProperty(p,"__esModule",{value:!0})})}}),_j=ze({"src/lib/usa_location_names.js"(J,V){"use strict";var p={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},b=new Set(Object.values(p));V.exports={usaLocationAbbreviations:b,usaLocationList:p}}}),kA={};bu(kA,{COUNTRIES_X:()=>CA});var CA,xj=zi({"src/lib/custom_country_codes.ts"(){"use strict";CA=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),hp=ze({"src/lib/geo_location_utils.js"(J,V){"use strict";var p=ci(),{COUNTRIES:b,createLookup:E}=vj(),{area:k}=mj(),{centroid:l}=gj(),{coordAll:e}=k2(),{geoBounds:t}=C2(),n=s1(),r=ap(),a=tv(),o=r1(),s=p1(),{usaLocationAbbreviations:c,usaLocationList:m}=_j(),{COUNTRIES_X:h}=(xj(),Po(kA)),{lookupAlpha3:v}=E([...b,...h]),g={"ISO-3":n,"USA-states":w,"country names":i};function i(P){let j=v(P);return j||(r.log("Unrecognized country name: "+P+"."),!1)}function w(P){P=P.trim();let j=c.has(P.toUpperCase())?P.toUpperCase():m[P.toLowerCase()];return j||(r.log("Unrecognized US location: "+P+"."),!1)}function S(P,j,U){var $;if(!j||typeof j!="string")return!1;let Q=g[P](j);if(Q){let re;if(P==="USA-states"){re=[];for(let ne of U)(($=ne?.properties)==null?void 0:$.gu)==="USA"&&re.push(ne)}else re=U;for(let ne of re)if(ne.id===Q)return ne;r.log(`Location with id ${Q} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(P){for(let j=0;j0&&P[j+1][0]<0)return j;return null}function _(P){var j=P.geometry,U=j.coordinates,$=P.id,Q=[],re,ne,se,G;switch($==="RUS"||$==="FJI"?re=function(X){var K;if(C(X)===null)K=X;else for(K=new Array(X.length),G=0;GK?H[Y++]=[X[G][0]+M,X[G][1]]:G===K?(H[Y++]=X[G],H[Y++]=[X[G][0],-90]):H[Y++]=X[G];var q=s.tester(H);q.pts.pop(),Q.push(q)}:re=function(X){Q.push(s.tester(X))},j.type){case"MultiPolygon":for(ne=0;neQ&&(Q=se,U=ne)}else U=j;return!U||!U.coordinates.some(G=>G.length>0)?[NaN,NaN]:l(U).geometry.coordinates}function A(P){var j=window.PlotlyGeoAssets||{},U=[];function $(G){return new Promise(function(X,K){p.json(G,function(H,Y){if(H){delete j[G];var q=H.status===404?'GeoJSON at URL "'+G+'" does not exist.':"Unexpected error while fetching from "+G;return K(new Error(q))}return j[G]=Y,X(Y)})})}function Q(G){return new Promise(function(X,K){var H=0,Y=setInterval(function(){if(j[G]&&j[G]!=="pending")return clearInterval(Y),X(j[G]);if(H>100)return clearInterval(Y),K("Unexpected error while fetching from "+G);H++},50)})}for(var re=0;reI(z(P));function z(P){try{return e(P)}catch{return[]}}function I(P){if(P.length===0)return null;if(P.length===1){let[re,ne]=P[0];return[re,ne,re,ne]}let[[j,U],[$,Q]]=t({type:"MultiPoint",coordinates:P});return[j,U,F([j,$])[1],Q]}var O=(P,j)=>j.fitbounds==="geojson"&&P.locationmode==="geojson-id",D=(P,j)=>O(P,j)?z(T(P)):[],B=(P,j)=>I(D(P,j));function F([P,j]){return[P,P>j?j+M:j]}V.exports={locationToFeature:S,feature2polygons:_,getTraceGeojson:T,extractTraceFeature:f,fetchTraceGeoData:A,boundsOfCoords:I,computeBbox:x,coordsOf:z,doesCrossAntiMeridian:C,fitGeojsonBbox:B,fitGeojsonCoords:D,unwrapLonRange:F,ANTIMERIDIAN_LON_SHIFT:M}}}),LA=ze({"src/traces/scattergeo/style.js"(J,V){"use strict";var p=ci(),b=$i(),E=Qn(),k=Ch(),l=k.stylePoints,e=k.styleText;V.exports=function(r,a){a&&t(r,a)};function t(n,r){var a=r[0].trace,o=r[0].node3;o.style("opacity",r[0].trace.opacity),l(o,a,n),e(o,a,n),o.selectAll("path.js-line").style("fill","none").each(function(s){var c=p.select(this),m=s.trace,h=m.line||{};c.call(E.stroke,h.color).call(b.dashLine,h.dash||"",h.width||0),m.fill!=="none"&&c.call(E.fill,m.fillcolor)})}}}),L2=ze({"src/traces/scattergeo/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=S2().getTopojsonFeatures,k=Q1(),l=hp(),e=md().findExtremes,t=No().BADNUM,n=sd().calcMarkerSize,r=el(),a=LA();function o(m,h,v){var g=h.layers.frontplot.select(".scatterlayer"),i=b.makeTraceGroups(g,v,"trace scattergeo");function w(S,M){S.lonlat[0]===t&&p.select(M).remove()}i.selectAll("*").remove(),i.each(function(S){var M=p.select(this),C=S[0].trace;if(r.hasLines(C)||C.fill!=="none"){var _=k.calcTraceToLineCoords(S),T=C.fill!=="none"?k.makePolygon(_):k.makeLine(_);M.selectAll("path.js-line").data([{geojson:T,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(C)&&M.selectAll("path.point").data(b.identity).enter().append("path").classed("point",!0).each(function(f){w(f,this)}),r.hasText(C)&&M.selectAll("g").data(b.identity).enter().append("g").append("text").each(function(f){w(f,this)}),a(m,S)})}function s(m,h){var v=m[0].trace,g=h[v.geo],i=g._subplot,w=v._length,S,M;if(b.isArrayOrTypedArray(v.locations)){var C=v.locationmode,_=C==="geojson-id"?l.extractTraceFeature(m):E(v,i.topojson);for(S=0;S")}}}),wj=ze({"src/traces/scattergeo/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.lon=E.lon,b.lat=E.lat,b.location=E.loc?E.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b}}}),Tj=ze({"src/traces/scattergeo/select.js"(J,V){"use strict";var p=el(),b=No().BADNUM;V.exports=function(k,l){var e=k.cd,t=k.xaxis,n=k.yaxis,r=[],a=e[0].trace,o,s,c,m,h,v=!p.hasMarkers(a)&&!p.hasText(a);if(v)return[];if(l===!1)for(h=0;hH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:$e<0?-1:0},v=Math.sin,g=Math.tan,i=1e-6,w=1e-12,S=Math.PI,M=S/2,C=S/4,_=Math.SQRT1_2,T=D(2),f=D(S),u=S*2,A=180/S,x=S/180;function z($e){return $e?$e/Math.sin($e):1}function I($e){return $e>1?M:$e<-1?-M:Math.asin($e)}function O($e){return $e>1?0:$e<-1?S:Math.acos($e)}function D($e){return $e>0?Math.sqrt($e):0}function B($e){return $e=n(2*$e),($e-1)/($e+1)}function F($e){return(n($e)-n(-$e))/2}function P($e){return(n($e)+n(-$e))/2}function j($e){return a($e+D($e*$e+1))}function U($e){return a($e+D($e*$e-1))}function $($e){var nt=g($e/2),mt=2*a(t($e/2))/(nt*nt);function xt(Bt,zt){var Wt=t(Bt),Pr=t(zt),Br=v(zt),kr=Pr*Wt,jr=-((1-kr?a((1+kr)/2)/(1-kr):-.5)+mt/(1+kr));return[jr*Pr*v(Bt),jr*Br]}return xt.invert=function(Bt,zt){var Wt=D(Bt*Bt+zt*zt),Pr=-$e/2,Br=50,kr;if(!Wt)return[0,0];do{var jr=Pr/2,Jr=t(jr),la=v(jr),xa=la/Jr,Ba=-a(k(Jr));Pr-=kr=(2/xa*Ba-mt*xa-Wt)/(-Ba/(la*la)+1-mt/(2*Jr*Jr))*(Jr<0?.7:1)}while(k(kr)>i&&--Br>0);var an=v(Pr);return[e(Bt*an,Wt*t(Pr)),I(zt*an/Wt)]},xt}function Q(){var $e=M,nt=b.geoProjectionMutator($),mt=nt($e);return mt.radius=function(xt){return arguments.length?nt($e=xt*x):$e*A},mt.scale(179.976).clipAngle(147)}function re($e,nt){var mt=t(nt),xt=z(O(mt*t($e/=2)));return[2*mt*v($e)*xt,v(nt)*xt]}re.invert=function($e,nt){if(!($e*$e+4*nt*nt>S*S+i)){var mt=$e,xt=nt,Bt=25;do{var zt=v(mt),Wt=v(mt/2),Pr=t(mt/2),Br=v(xt),kr=t(xt),jr=v(2*xt),Jr=Br*Br,la=kr*kr,xa=Wt*Wt,Ba=1-la*Pr*Pr,an=Ba?O(kr*Pr)*D(Tn=1/Ba):Tn=0,Tn,ii=2*an*kr*Wt-$e,Si=an*Br-nt,oi=Tn*(la*xa+an*kr*Pr*Jr),Ji=Tn*(.5*zt*jr-an*2*Br*Wt),Qi=Tn*.25*(jr*Wt-an*Br*la*zt),Oo=Tn*(Jr*Pr+an*xa*kr),Qo=Ji*Qi-Oo*oi;if(!Qo)break;var vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]}};function ne(){return b.geoProjection(re).scale(152.63)}function se($e){var nt=v($e),mt=t($e),xt=$e>=0?1:-1,Bt=g(xt*$e),zt=(1+nt-mt)/2;function Wt(Pr,Br){var kr=t(Br),jr=t(Pr/=2);return[(1+kr)*v(Pr),(xt*Br>-e(jr,Bt)-.001?0:-xt*10)+zt+v(Br)*mt-(1+kr)*nt*jr]}return Wt.invert=function(Pr,Br){var kr=0,jr=0,Jr=50;do{var la=t(kr),xa=v(kr),Ba=t(jr),an=v(jr),Tn=1+Ba,ii=Tn*xa-Pr,Si=zt+an*mt-Tn*nt*la-Br,oi=Tn*la/2,Ji=-xa*an,Qi=nt*Tn*xa/2,Oo=mt*Ba+nt*la*an,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo/2,ys=(ii*Qi-Si*oi)/Qo;k(ys)>2&&(ys/=2),kr-=vo,jr-=ys}while((k(vo)>i||k(ys)>i)&&--Jr>0);return xt*jr>-e(t(kr),Bt)-.001?[kr*2,jr]:null},Wt}function G(){var $e=20*x,nt=$e>=0?1:-1,mt=g(nt*$e),xt=b.geoProjectionMutator(se),Bt=xt($e),zt=Bt.stream;return Bt.parallel=function(Wt){return arguments.length?(mt=g((nt=($e=Wt*x)>=0?1:-1)*$e),xt($e)):$e*A},Bt.stream=function(Wt){var Pr=Bt.rotate(),Br=zt(Wt),kr=(Bt.rotate([0,0]),zt(Wt)),jr=Bt.precision();return Bt.rotate(Pr),Br.sphere=function(){kr.polygonStart(),kr.lineStart();for(var Jr=nt*-180;nt*Jr<180;Jr+=nt*90)kr.point(Jr,nt*90);if($e)for(;nt*(Jr-=3*nt*jr)>=-180;)kr.point(Jr,nt*-e(t(Jr*x/2),mt)*A);kr.lineEnd(),kr.polygonEnd()},Br},Bt.scale(218.695).center([0,28.0974])}function X($e,nt){var mt=g(nt/2),xt=D(1-mt*mt),Bt=1+xt*t($e/=2),zt=v($e)*xt/Bt,Wt=mt/Bt,Pr=zt*zt,Br=Wt*Wt;return[4/3*zt*(3+Pr-3*Br),4/3*Wt*(3+3*Pr-Br)]}X.invert=function($e,nt){if($e*=3/8,nt*=3/8,!$e&&k(nt)>1)return null;var mt=$e*$e,xt=nt*nt,Bt=1+mt+xt,zt=D((Bt-D(Bt*Bt-4*nt*nt))/2),Wt=I(zt)/3,Pr=zt?U(k(nt/zt))/3:j(k($e))/3,Br=t(Wt),kr=P(Pr),jr=kr*kr-Br*Br;return[h($e)*2*e(F(Pr)*Br,.25-jr),h(nt)*2*e(kr*v(Wt),.25+jr)]};function K(){return b.geoProjection(X).scale(66.1603)}var H=D(8),Y=a(1+T);function q($e,nt){var mt=k(nt);return mtw&&--xt>0);return[$e/(t(mt)*(H-1/v(mt))),h(nt)*mt]};function Z(){return b.geoProjection(q).scale(112.314)}function ee($e){var nt=2*S/$e;function mt(xt,Bt){var zt=b.geoAzimuthalEquidistantRaw(xt,Bt);if(k(xt)>M){var Wt=e(zt[1],zt[0]),Pr=D(zt[0]*zt[0]+zt[1]*zt[1]),Br=nt*m((Wt-M)/nt)+M,kr=e(v(Wt-=Br),2-t(Wt));Wt=Br+I(S/Pr*v(kr))-kr,zt[0]=Pr*t(Wt),zt[1]=Pr*v(Wt)}return zt}return mt.invert=function(xt,Bt){var zt=D(xt*xt+Bt*Bt);if(zt>M){var Wt=e(Bt,xt),Pr=nt*m((Wt-M)/nt)+M,Br=Wt>Pr?-1:1,kr=zt*t(Pr-Wt),jr=1/g(Br*O((kr-S)/D(S*(S-2*kr)+zt*zt)));Wt=Pr+2*l((jr+Br*D(jr*jr-3))/3),xt=zt*t(Wt),Bt=zt*v(Wt)}return b.geoAzimuthalEquidistantRaw.invert(xt,Bt)},mt}function ae(){var $e=5,nt=b.geoProjectionMutator(ee),mt=nt($e),xt=mt.stream,Bt=.01,zt=-t(Bt*x),Wt=v(Bt*x);return mt.lobes=function(Pr){return arguments.length?nt($e=+Pr):$e},mt.stream=function(Pr){var Br=mt.rotate(),kr=xt(Pr),jr=(mt.rotate([0,0]),xt(Pr));return mt.rotate(Br),kr.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Jr=0,la=360/$e,xa=2*S/$e,Ba=90-180/$e,an=M;Jr<$e;++Jr,Ba-=la,an-=xa)jr.point(e(Wt*t(an),zt)*A,I(Wt*v(an))*A),Ba<-90?(jr.point(-90,-180-Ba-Bt),jr.point(-90,-180-Ba+Bt)):(jr.point(90,Ba+Bt),jr.point(90,Ba-Bt));jr.lineEnd(),jr.polygonEnd()},kr},mt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function he($e,nt){if(arguments.length<2&&(nt=$e),nt===1)return b.geoAzimuthalEqualAreaRaw;if(nt===1/0)return xe;function mt(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw(xt/nt,Bt);return zt[0]*=$e,zt}return mt.invert=function(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw.invert(xt/$e,Bt);return zt[0]*=nt,zt},mt}function xe($e,nt){return[$e*t(nt)/t(nt/=2),2*v(nt)]}xe.invert=function($e,nt){var mt=2*I(nt/2);return[$e*t(mt/2)/t(mt),mt]};function we(){var $e=2,nt=b.geoProjectionMutator(he),mt=nt($e);return mt.coefficient=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(169.529)}function Me($e,nt,mt){var xt=100,Bt,zt,Wt;mt=mt===void 0?0:+mt,nt=+nt;do zt=$e(mt),Wt=$e(mt+i),zt===Wt&&(Wt=zt+i),mt-=Bt=-1*i*(zt-nt)/(zt-Wt);while(xt-- >0&&k(Bt)>i);return xt<0?NaN:mt}function Se($e,nt,mt){return nt===void 0&&(nt=40),mt===void 0&&(mt=w),function(xt,Bt,zt,Wt){var Pr,Br,kr;zt=zt===void 0?0:+zt,Wt=Wt===void 0?0:+Wt;for(var jr=0;jrPr){zt-=Br/=2,Wt-=kr/=2;continue}Pr=Ba;var an=(zt>0?-1:1)*mt,Tn=(Wt>0?-1:1)*mt,ii=$e(zt+an,Wt),Si=$e(zt,Wt+Tn),oi=(ii[0]-Jr[0])/an,Ji=(ii[1]-Jr[1])/an,Qi=(Si[0]-Jr[0])/Tn,Oo=(Si[1]-Jr[1])/Tn,Qo=Oo*oi-Ji*Qi,vo=(k(Qo)<.5?.5:1)/Qo;if(Br=(xa*Qi-la*Oo)*vo,kr=(la*Ji-xa*oi)*vo,zt+=Br,Wt+=kr,k(Br)0&&(Pr[1]*=1+Br/1.5*Pr[0]*Pr[0]),Pr}return xt.invert=Se(xt),xt}function Ve(){return b.geoProjection(Ie()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ge($e,nt){var mt=$e*v(nt),xt=30,Bt;do nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));while(k(Bt)>i&&--xt>0);return nt/2}function ke($e,nt,mt){function xt(Bt,zt){return[$e*Bt*t(zt=Ge(mt,zt)),nt*v(zt)]}return xt.invert=function(Bt,zt){return zt=I(zt/nt),[Bt/($e*t(zt)),I((2*zt+v(2*zt))/mt)]},xt}var _e=ke(T/M,T,S);function ce(){return b.geoProjection(_e).scale(169.529)}var ve=2.00276,le=1.11072;function Ae($e,nt){var mt=Ge(S,nt);return[ve*$e/(1/t(nt)+le/t(mt)),(nt+T*v(mt))/ve]}Ae.invert=function($e,nt){var mt=ve*nt,xt=nt<0?-C:C,Bt=25,zt,Wt;do Wt=mt-T*v(xt),xt-=zt=(v(2*xt)+2*xt-S*v(Wt))/(2*t(2*xt)+2+S*t(Wt)*T*t(xt));while(k(zt)>i&&--Bt>0);return Wt=mt-T*v(xt),[$e*(1/t(Wt)+le/t(xt))/ve,Wt]};function Be(){return b.geoProjection(Ae).scale(160.857)}function Xe($e){var nt=0,mt=b.geoProjectionMutator($e),xt=mt(nt);return xt.parallel=function(Bt){return arguments.length?mt(nt=Bt*x):nt*A},xt}function Ye($e,nt){return[$e*t(nt),nt]}Ye.invert=function($e,nt){return[$e/t(nt),nt]};function yt(){return b.geoProjection(Ye).scale(152.63)}function gt($e){if(!$e)return Ye;var nt=1/g($e);function mt(xt,Bt){var zt=nt+$e-Bt,Wt=zt&&xt*t(Bt)/zt;return[zt*v(Wt),nt-zt*t(Wt)]}return mt.invert=function(xt,Bt){var zt=D(xt*xt+(Bt=nt-Bt)*Bt),Wt=nt+$e-zt;return[zt/t(Wt)*e(xt,Bt),Wt]},mt}function Tt(){return Xe(gt).scale(123.082).center([0,26.1441]).parallel(45)}function At($e){function nt(mt,xt){var Bt=M-xt,zt=Bt&&mt*$e*v(Bt)/Bt;return[Bt*v(zt)/$e,M-Bt*t(zt)]}return nt.invert=function(mt,xt){var Bt=mt*$e,zt=M-xt,Wt=D(Bt*Bt+zt*zt),Pr=e(Bt,zt);return[(Wt?Wt/v(Wt):1)*Pr/$e,M-Wt]},nt}function $t(){var $e=.5,nt=b.geoProjectionMutator(At),mt=nt($e);return mt.fraction=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(158.837)}var rr=ke(1,4/S,S);function _r(){return b.geoProjection(rr).scale(152.63)}function Xt($e,nt,mt,xt,Bt,zt){var Wt=t(zt),Pr;if(k($e)>1||k(zt)>1)Pr=O(mt*Bt+nt*xt*Wt);else{var Br=v($e/2),kr=v(zt/2);Pr=2*I(D(Br*Br+nt*xt*kr*kr))}return k(Pr)>i?[Pr,e(xt*v(zt),nt*Bt-mt*xt*Wt)]:[0,0]}function or($e,nt,mt){return O(($e*$e+nt*nt-mt*mt)/(2*$e*nt))}function Ot($e){return $e-2*S*r(($e+S)/(2*S))}function vt($e,nt,mt){for(var xt=[[$e[0],$e[1],v($e[1]),t($e[1])],[nt[0],nt[1],v(nt[1]),t(nt[1])],[mt[0],mt[1],v(mt[1]),t(mt[1])]],Bt=xt[2],zt,Wt=0;Wt<3;++Wt,Bt=zt)zt=xt[Wt],Bt.v=Xt(zt[1]-Bt[1],Bt[3],Bt[2],zt[3],zt[2],zt[0]-Bt[0]),Bt.point=[0,0];var Pr=or(xt[0].v[0],xt[2].v[0],xt[1].v[0]),Br=or(xt[0].v[0],xt[1].v[0],xt[2].v[0]),kr=S-Pr;xt[2].point[1]=0,xt[0].point[0]=-(xt[1].point[0]=xt[0].v[0]/2);var jr=[xt[2].point[0]=xt[0].point[0]+xt[2].v[0]*t(Pr),2*(xt[0].point[1]=xt[1].point[1]=xt[2].v[0]*v(Pr))];function Jr(la,xa){var Ba=v(xa),an=t(xa),Tn=new Array(3),ii;for(ii=0;ii<3;++ii){var Si=xt[ii];if(Tn[ii]=Xt(xa-Si[1],Si[3],Si[2],an,Ba,la-Si[0]),!Tn[ii][0])return Si.point;Tn[ii][1]=Ot(Tn[ii][1]-Si.v[1])}var oi=jr.slice();for(ii=0;ii<3;++ii){var Ji=ii==2?0:ii+1,Qi=or(xt[ii].v[0],Tn[ii][0],Tn[Ji][0]);Tn[ii][1]<0&&(Qi=-Qi),ii?ii==1?(Qi=Br-Qi,oi[0]-=Tn[ii][0]*t(Qi),oi[1]-=Tn[ii][0]*v(Qi)):(Qi=kr-Qi,oi[0]+=Tn[ii][0]*t(Qi),oi[1]+=Tn[ii][0]*v(Qi)):(oi[0]+=Tn[ii][0]*t(Qi),oi[1]-=Tn[ii][0]*v(Qi))}return oi[0]/=3,oi[1]/=3,oi}return Jr}function ht($e){return $e[0]*=x,$e[1]*=x,$e}function De(){return Ne([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ne($e,nt,mt){var xt=b.geoCentroid({type:"MultiPoint",coordinates:[$e,nt,mt]}),Bt=[-xt[0],-xt[1]],zt=b.geoRotation(Bt),Wt=vt(ht(zt($e)),ht(zt(nt)),ht(zt(mt)));Wt.invert=Se(Wt);var Pr=b.geoProjection(Wt).rotate(Bt),Br=Pr.center;return delete Pr.rotate,Pr.center=function(kr){return arguments.length?Br(zt(kr)):zt.invert(Br())},Pr.clipAngle(90)}function We($e,nt){var mt=D(1-v(nt));return[2/f*$e*mt,f*(1-mt)]}We.invert=function($e,nt){var mt=(mt=nt/f-1)*mt;return[mt>0?$e*D(S/mt)/2:0,I(1-mt)]};function Ke(){return b.geoProjection(We).scale(95.6464).center([0,30])}function Je($e){var nt=g($e);function mt(xt,Bt){return[xt,(xt?xt/v(xt):1)*(v(Bt)*t(xt)-nt*t(Bt))]}return mt.invert=nt?function(xt,Bt){xt&&(Bt*=v(xt)/xt);var zt=t(xt);return[xt,2*e(D(zt*zt+nt*nt-Bt*Bt)-zt,nt-Bt)]}:function(xt,Bt){return[xt,I(xt?Bt*g(xt)/xt:Bt)]},mt}function et(){return Xe(Je).scale(249.828).clipAngle(90)}var Mt=D(3);function pt($e,nt){return[Mt*$e*(2*t(2*nt/3)-1)/f,Mt*f*v(nt/3)]}pt.invert=function($e,nt){var mt=3*I(nt/(Mt*f));return[f*$e/(Mt*(2*t(2*mt/3)-1)),mt]};function Pt(){return b.geoProjection(pt).scale(156.19)}function Ct($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,v(Bt)/nt]}return mt.invert=function(xt,Bt){return[xt/nt,I(Bt*nt)]},mt}function qt(){return Xe(Ct).parallel(38.58).scale(195.044)}function Vt($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,(1+nt)*g(Bt/2)]}return mt.invert=function(xt,Bt){return[xt/nt,l(Bt/(1+nt))*2]},mt}function Ht(){return Xe(Vt).scale(124.75)}function Sr($e,nt){var mt=D(8/(3*S));return[mt*$e*(1-k(nt)/S),mt*nt]}Sr.invert=function($e,nt){var mt=D(8/(3*S)),xt=nt/mt;return[$e/(mt*(1-k(xt)/S)),xt]};function Kr(){return b.geoProjection(Sr).scale(165.664)}function Yt($e,nt){var mt=D(4-3*v(k(nt)));return[2/D(6*S)*$e*mt,h(nt)*D(2*S/3)*(2-mt)]}Yt.invert=function($e,nt){var mt=2-k(nt)/D(2*S/3);return[$e*D(6*S)/(2*mt),h(nt)*I((4-mt*mt)/3)]};function Rt(){return b.geoProjection(Yt).scale(165.664)}function nr($e,nt){var mt=D(S*(4+S));return[2/mt*$e*(1+D(1-4*nt*nt/(S*S))),4/mt*nt]}nr.invert=function($e,nt){var mt=D(S*(4+S))/2;return[$e*mt/(1+D(1-nt*nt*(4+S)/(4*S))),nt*mt/2]};function ur(){return b.geoProjection(nr).scale(180.739)}function cr($e,nt){var mt=(2+M)*v(nt);nt/=2;for(var xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++){var zt=t(nt);nt-=Bt=(nt+v(nt)*(zt+2)-mt)/(2*zt*(1+zt))}return[2/D(S*(4+S))*$e*(1+t(nt)),2*D(S/(4+S))*v(nt)]}cr.invert=function($e,nt){var mt=nt*D((4+S)/S)/2,xt=I(mt),Bt=t(xt);return[$e/(2/D(S*(4+S))*(1+Bt)),I((xt+mt*(Bt+2))/(2+M))]};function Rr(){return b.geoProjection(cr).scale(180.739)}function Qr($e,nt){return[$e*(1+t(nt))/D(2+S),2*nt/D(2+S)]}Qr.invert=function($e,nt){var mt=D(2+S),xt=nt*mt/2;return[mt*$e/(1+t(xt)),xt]};function Zr(){return b.geoProjection(Qr).scale(173.044)}function ha($e,nt){for(var mt=(1+M)*v(nt),xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++)nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));return mt=D(2+S),[$e*(1+t(nt))/mt,2*nt/mt]}ha.invert=function($e,nt){var mt=1+M,xt=D(mt/2);return[$e*2*xt/(1+t(nt*=xt)),I((nt+v(nt))/mt)]};function Pa(){return b.geoProjection(ha).scale(173.044)}var La=3+2*T;function un($e,nt){var mt=v($e/=2),xt=t($e),Bt=D(t(nt)),zt=t(nt/=2),Wt=v(nt)/(zt+T*xt*Bt),Pr=D(2/(1+Wt*Wt)),Br=D((T*zt+(xt+mt)*Bt)/(T*zt+(xt-mt)*Bt));return[La*(Pr*(Br-1/Br)-2*a(Br)),La*(Pr*Wt*(Br+1/Br)-2*l(Wt))]}un.invert=function($e,nt){if(!(zt=X.invert($e/1.2,nt*1.065)))return null;var mt=zt[0],xt=zt[1],Bt=20,zt;$e/=La,nt/=La;do{var Wt=mt/2,Pr=xt/2,Br=v(Wt),kr=t(Wt),jr=v(Pr),Jr=t(Pr),la=t(xt),xa=D(la),Ba=jr/(Jr+T*kr*xa),an=Ba*Ba,Tn=D(2/(1+an)),ii=T*Jr+(kr+Br)*xa,Si=T*Jr+(kr-Br)*xa,oi=ii/Si,Ji=D(oi),Qi=Ji-1/Ji,Oo=Ji+1/Ji,Qo=Tn*Qi-2*a(Ji)-$e,vo=Tn*Ba*Oo-2*l(Ba)-nt,ys=jr&&_*xa*Br*an/jr,ol=(T*kr*Jr+xa)/(2*(Jr+T*kr*xa)*(Jr+T*kr*xa)*xa),jl=-.5*Ba*Tn*Tn*Tn,Hs=jl*ys,Cu=jl*ol,hi=(hi=2*Jr+T*xa*(kr-Br))*hi*Ji,wi=(T*kr*Jr*xa+la)/hi,sl=-(T*Br*jr)/(xa*hi),sc=Qi*Hs-2*wi/Ji+Tn*(wi+wi/oi),tu=Qi*Cu-2*sl/Ji+Tn*(sl+sl/oi),Ps=Ba*Oo*Hs-2*ys/(1+an)+Tn*Oo*ys+Tn*Ba*(wi-wi/oi),gc=Ba*Oo*Cu-2*ol/(1+an)+Tn*Oo*ol+Tn*Ba*(sl-sl/oi),pu=tu*Ps-gc*sc;if(!pu)break;var ll=(vo*tu-Qo*gc)/pu,ef=(Qo*Ps-vo*sc)/pu;mt-=ll,xt=o(-M,s(M,xt-ef))}while((k(ll)>i||k(ef)>i)&&--Bt>0);return k(k(xt)-M)xt){var Jr=D(jr),la=e(kr,Br),xa=mt*m(la/mt),Ba=la-xa,an=$e*t(Ba),Tn=($e*v(Ba)-Ba*v(an))/(M-an),ii=Oa(Ba,Tn),Si=(S-$e)/lt(ii,an,S);Br=Jr;var oi=50,Ji;do Br-=Ji=($e+lt(ii,an,Br)*Si-Jr)/(ii(Br)*Si);while(k(Ji)>i&&--oi>0);kr=Ba*v(Br),Brxt){var Br=D(Pr),kr=e(Wt,zt),jr=mt*m(kr/mt),Jr=kr-jr;zt=Br*t(Jr),Wt=Br*v(Jr);for(var la=zt-M,xa=v(zt),Ba=Wt/xa,an=zti||k(Ba)>i)&&--an>0);return[Jr,la]},Br}var lr=fr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Tr(){return b.geoProjection(lr).scale(149.995)}var Ir=fr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Dr(){return b.geoProjection(Ir).scale(153.93)}var ot=fr(5/6*S,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return b.geoProjection(ot).scale(130.945)}function jt($e,nt){var mt=$e*$e,xt=nt*nt;return[$e*(1-.162388*xt)*(.87-952426e-9*mt*mt),nt*(1+xt/12)]}jt.invert=function($e,nt){var mt=$e,xt=nt,Bt=50,zt;do{var Wt=xt*xt;xt-=zt=(xt*(1+Wt/12)-nt)/(1+Wt/4)}while(k(zt)>i&&--Bt>0);Bt=50,$e/=1-.162388*Wt;do{var Pr=(Pr=mt*mt)*Pr;mt-=zt=(mt*(.87-952426e-9*Pr)-$e)/(.87-.00476213*Pr)}while(k(zt)>i&&--Bt>0);return[mt,xt]};function ar(){return b.geoProjection(jt).scale(131.747)}var Er=fr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function xr(){return b.geoProjection(Er).scale(131.087)}function zr($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e(xt+zt*S,Bt);return Wt[0]-=zt*nt,Wt}return $e.invert&&(mt.invert=function(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e.invert(xt+zt*nt,Bt),Pr=Wt[0]-zt*S;return Pr<-S?Pr+=2*S:Pr>S&&(Pr-=2*S),Wt[0]=Pr,Wt}),mt}function Lr($e,nt){var mt=h($e),xt=h(nt),Bt=t(nt),zt=t($e)*Bt,Wt=v($e)*Bt,Pr=v(xt*nt);$e=k(e(Wt,Pr)),nt=I(zt),k($e-M)>i&&($e%=M);var Br=aa($e>S/4?M-$e:$e,nt);return $e>S/4&&(Pr=Br[0],Br[0]=-Br[1],Br[1]=-Pr),Br[0]*=mt,Br[1]*=-xt,Br}Lr.invert=function($e,nt){k($e)>1&&($e=h($e)*2-$e),k(nt)>1&&(nt=h(nt)*2-nt);var mt=h($e),xt=h(nt),Bt=-mt*$e,zt=-xt*nt,Wt=zt/Bt<1,Pr=Sa(Wt?zt:Bt,Wt?Bt:zt),Br=Pr[0],kr=Pr[1],jr=t(kr);return Wt&&(Br=-M-Br),[mt*(e(v(Br)*jr,-v(kr))+S),xt*I(t(Br)*jr)]};function aa($e,nt){if(nt===M)return[0,0];var mt=v(nt),xt=mt*mt,Bt=xt*xt,zt=1+Bt,Wt=1+3*Bt,Pr=1-Bt,Br=I(1/D(zt)),kr=Pr+xt*zt*Br,jr=(1-mt)/kr,Jr=D(jr),la=jr*zt,xa=D(la),Ba=Jr*Pr,an,Tn;if($e===0)return[0,-(Ba+xt*xa)];var ii=t(nt),Si=1/ii,oi=2*mt*ii,Ji=(-3*xt+Br*Wt)*oi,Qi=(-kr*ii-(1-mt)*Ji)/(kr*kr),Oo=.5*Qi/Jr,Qo=Pr*Oo-2*xt*Jr*oi,vo=xt*zt*Qi+jr*Wt*oi,ys=-Si*oi,ol=-Si*vo,jl=-2*Si*Qo,Hs=4*$e/S,Cu;if($e>.222*S||nt.175*S){if(an=(Ba+xt*D(la*(1+Bt)-Ba*Ba))/(1+Bt),$e>S/4)return[an,an];var hi=an,wi=.5*an;an=.5*(wi+hi),Tn=50;do{var sl=D(la-an*an),sc=an*(jl+ys*sl)+ol*I(an/xa)-Hs;if(!sc)break;sc<0?wi=an:hi=an,an=.5*(wi+hi)}while(k(hi-wi)>i&&--Tn>0)}else{an=i,Tn=25;do{var tu=an*an,Ps=D(la-tu),gc=jl+ys*Ps,pu=an*gc+ol*I(an/xa)-Hs,ll=gc+(ol-ys*tu)/Ps;an-=Cu=Ps?pu/ll:0}while(k(Cu)>i&&--Tn>0)}return[an,-Ba-xt*D(la-an*an)]}function Sa($e,nt){for(var mt=0,xt=1,Bt=.5,zt=50;;){var Wt=Bt*Bt,Pr=D(Bt),Br=I(1/D(1+Wt)),kr=1-Wt+Bt*(1+Wt)*Br,jr=(1-Pr)/kr,Jr=D(jr),la=jr*(1+Wt),xa=Jr*(1-Wt),Ba=la-$e*$e,an=D(Ba),Tn=nt+xa+Bt*an;if(k(xt-mt)0?mt=Bt:xt=Bt,Bt=.5*(mt+xt)}if(!zt)return null;var ii=I(Pr),Si=t(ii),oi=1/Si,Ji=2*Pr*Si,Qi=(-3*Bt+Br*(1+3*Wt))*Ji,Oo=(-kr*Si-(1-Pr)*Qi)/(kr*kr),Qo=.5*Oo/Jr,vo=(1-Wt)*Qo-2*Bt*Jr*Ji,ys=-2*oi*vo,ol=-oi*Ji,jl=-oi*(Bt*(1+Wt)*Oo+jr*(1+3*Wt)*Ji);return[S/4*($e*(ys+ol*an)+jl*I($e/D(la))),ii]}function wa(){return b.geoProjection(zr(Lr)).scale(239.75)}function pn($e,nt,mt){var xt,Bt,zt;return $e?(xt=tn($e,mt),nt?(Bt=tn(nt,1-mt),zt=Bt[1]*Bt[1]+mt*xt[0]*xt[0]*Bt[0]*Bt[0],[[xt[0]*Bt[2]/zt,xt[1]*xt[2]*Bt[0]*Bt[1]/zt],[xt[1]*Bt[1]/zt,-xt[0]*xt[2]*Bt[0]*Bt[2]/zt],[xt[2]*Bt[1]*Bt[2]/zt,-mt*xt[0]*xt[1]*Bt[0]/zt]]):[[xt[0],0],[xt[1],0],[xt[2],0]]):(Bt=tn(nt,1-mt),[[0,Bt[0]/Bt[1]],[1/Bt[1],0],[Bt[2]/Bt[1],0]])}function tn($e,nt){var mt,xt,Bt,zt,Wt;if(nt=1-i)return mt=(1-nt)/4,xt=P($e),zt=B($e),Bt=1/xt,Wt=xt*F($e),[zt+mt*(Wt-$e)/(xt*xt),Bt-mt*zt*Bt*(Wt-$e),Bt+mt*zt*Bt*(Wt+$e),2*l(n($e))-M+mt*(Wt-$e)/xt];var Pr=[1,0,0,0,0,0,0,0,0],Br=[D(nt),0,0,0,0,0,0,0,0],kr=0;for(xt=D(1-nt),Wt=1;k(Br[kr]/Pr[kr])>i&&kr<8;)mt=Pr[kr++],Br[kr]=(mt-xt)/2,Pr[kr]=(mt+xt)/2,xt=D(mt*xt),Wt*=2;Bt=Wt*Pr[kr]*$e;do zt=Br[kr]*v(xt=Bt)/Pr[kr],Bt=(I(zt)+Bt)/2;while(--kr);return[v(Bt),zt=t(Bt),zt/t(Bt-xt),Bt]}function ai($e,nt,mt){var xt=k($e),Bt=k(nt),zt=F(Bt);if(xt){var Wt=1/v(xt),Pr=1/(g(xt)*g(xt)),Br=-(Pr+mt*(zt*zt*Wt*Wt)-1+mt),kr=(mt-1)*Pr,jr=(-Br+D(Br*Br-4*kr))/2;return[rn(l(1/D(jr)),mt)*h($e),rn(l(D((jr/Pr-1)/mt)),1-mt)*h(nt)]}return[0,rn(l(zt),1-mt)*h(nt)]}function rn($e,nt){if(!nt)return $e;if(nt===1)return a(g($e/2+C));for(var mt=1,xt=D(1-nt),Bt=D(nt),zt=0;k(Bt)>i;zt++){if($e%S){var Wt=l(xt*g($e)/mt);Wt<0&&(Wt+=S),$e+=Wt+~~($e/S)*S}else $e+=$e;Bt=(mt+xt)/2,xt=D(mt*xt),Bt=((mt=Bt)-xt)/2}return $e/(c(2,zt)*mt)}function Ri($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=a(g(S/4+k(nt)/2)),Pr=n(zt*Wt)/D(mt),Br=Gn(Pr*t(zt*$e),Pr*v(zt*$e)),kr=ai(Br[0],Br[1],xt*xt);return[-kr[1],(nt>=0?1:-1)*(.5*Bt-kr[0])]}function Gn($e,nt){var mt=$e*$e,xt=nt+1,Bt=1-mt-nt*nt;return[.5*(($e>=0?M:-M)-e(Bt,2*$e)),-.25*a(Bt*Bt+4*mt)+.5*a(xt*xt+mt)]}function no($e,nt){var mt=nt[0]*nt[0]+nt[1]*nt[1];return[($e[0]*nt[0]+$e[1]*nt[1])/mt,($e[1]*nt[0]-$e[0]*nt[1])/mt]}Ri.invert=function($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=pn(.5*Bt-nt,-$e,xt*xt),Pr=no(Wt[0],Wt[1]),Br=e(Pr[1],Pr[0])/zt;return[Br,2*l(n(.5/zt*a(mt*Pr[0]*Pr[0]+mt*Pr[1]*Pr[1])))-M]};function Di(){return b.geoProjection(zr(Ri)).scale(151.496)}function fn($e){var nt=v($e),mt=t($e),xt=Ai($e);xt.invert=Ai(-$e);function Bt(zt,Wt){var Pr=xt(zt,Wt);zt=Pr[0],Wt=Pr[1];var Br=v(Wt),kr=t(Wt),jr=t(zt),Jr=O(nt*Br+mt*kr*jr),la=v(Jr),xa=k(la)>i?Jr/la:1;return[xa*mt*v(zt),(k(zt)>M?xa:-xa)*(nt*kr-mt*Br*jr)]}return Bt.invert=function(zt,Wt){var Pr=D(zt*zt+Wt*Wt),Br=-v(Pr),kr=t(Pr),jr=Pr*kr,Jr=-Wt*Br,la=Pr*nt,xa=D(jr*jr+Jr*Jr-la*la),Ba=e(jr*la+Jr*xa,Jr*la-jr*xa),an=(Pr>M?-1:1)*e(zt*Br,Pr*t(Ba)*kr+Wt*v(Ba)*Br);return xt.invert(an,Ba)},Bt}function Ai($e){var nt=v($e),mt=t($e);return function(xt,Bt){var zt=t(Bt),Wt=t(xt)*zt,Pr=v(xt)*zt,Br=v(Bt);return[e(Pr,Wt*mt-Br*nt),I(Br*mt+Wt*nt)]}}function jn(){var $e=0,nt=b.geoProjectionMutator(fn),mt=nt($e),xt=mt.rotate,Bt=mt.stream,zt=b.geoCircle();return mt.parallel=function(Wt){if(!arguments.length)return $e*A;var Pr=mt.rotate();return nt($e=Wt*x).rotate(Pr)},mt.rotate=function(Wt){return arguments.length?(xt.call(mt,[Wt[0],Wt[1]-$e*A]),zt.center([-Wt[0],-Wt[1]]),mt):(Wt=xt.call(mt),Wt[1]+=$e*A,Wt)},mt.stream=function(Wt){return Wt=Bt(Wt),Wt.sphere=function(){Wt.polygonStart();var Pr=.01,Br=zt.radius(90-Pr)().coordinates[0],kr=Br.length-1,jr=-1,Jr;for(Wt.lineStart();++jr=0;)Wt.point((Jr=Br[jr])[0],Jr[1]);Wt.lineEnd(),Wt.polygonEnd()},Wt},mt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Xn=3,eo=I(1-1/Xn)*A,gi=Ct(0);function qi($e){var nt=eo*x,mt=We(S,nt)[0]-We(-S,nt)[0],xt=gi(0,nt)[1],Bt=We(0,nt)[1],zt=f-Bt,Wt=u/$e,Pr=4/u,Br=xt+zt*zt*4/u;function kr(jr,Jr){var la,xa=k(Jr);if(xa>nt){var Ba=s($e-1,o(0,r((jr+S)/Wt)));jr+=S*($e-1)/$e-Ba*Wt,la=We(jr,xa),la[0]=la[0]*u/mt-u*($e-1)/(2*$e)+Ba*u/$e,la[1]=xt+(la[1]-Bt)*4*zt/u,Jr<0&&(la[1]=-la[1])}else la=gi(jr,Jr);return la[0]*=Pr,la[1]/=Br,la}return kr.invert=function(jr,Jr){jr/=Pr,Jr*=Br;var la=k(Jr);if(la>xt){var xa=s($e-1,o(0,r((jr+S)/Wt)));jr=(jr+S*($e-1)/$e-xa*Wt)*mt/u;var Ba=We.invert(jr,.25*(la-xt)*u/zt+Bt);return Ba[0]-=S*($e-1)/$e-xa*Wt,Jr<0&&(Ba[1]=-Ba[1]),Ba}return gi.invert(jr,Jr)},kr}function io($e,nt){return[$e,nt&1?90-i:eo]}function oo($e,nt){return[$e,nt&1?-90+i:-eo]}function Vn($e){return[$e[0]*(1-i),$e[1]]}function qn($e){var nt=[].concat(E.range(-180,180+$e/2,$e).map(io),E.range(180,-180-$e/2,-$e).map(oo));return{type:"Polygon",coordinates:[$e===180?nt.map(Vn):nt]}}function Hi(){var $e=4,nt=b.geoProjectionMutator(qi),mt=nt($e),xt=mt.stream;return mt.lobes=function(Bt){return arguments.length?nt($e=+Bt):$e},mt.stream=function(Bt){var zt=mt.rotate(),Wt=xt(Bt),Pr=(mt.rotate([0,0]),xt(Bt));return mt.rotate(zt),Wt.sphere=function(){b.geoStream(qn(180/$e),Pr)},Wt},mt.scale(239.75)}function Mi($e){var nt=1+$e,mt=v(1/nt),xt=I(mt),Bt=2*D(S/(zt=S+4*xt*nt)),zt,Wt=.5*Bt*(nt+D($e*(2+$e))),Pr=$e*$e,Br=nt*nt;function kr(jr,Jr){var la=1-v(Jr),xa,Ba;if(la&&la<2){var an=M-Jr,Tn=25,ii;do{var Si=v(an),oi=t(an),Ji=xt+e(Si,nt-oi),Qi=1+Br-2*nt*oi;an-=ii=(an-Pr*xt-nt*Si+Qi*Ji-.5*la*zt)/(2*nt*Si*Ji)}while(k(ii)>w&&--Tn>0);xa=Bt*D(Qi),Ba=jr*Ji/S}else xa=Bt*($e+la),Ba=jr*xt/S;return[xa*v(Ba),Wt-xa*t(Ba)]}return kr.invert=function(jr,Jr){var la=jr*jr+(Jr-=Wt)*Jr,xa=(1+Br-la/(Bt*Bt))/(2*nt),Ba=O(xa),an=v(Ba),Tn=xt+e(an,nt-xa);return[I(jr/D(la))*S/Tn,I(1-2*(Ba-Pr*xt-nt*an+(1+Br-2*nt*xa)*Tn)/zt)]},kr}function Ro(){var $e=1,nt=b.geoProjectionMutator(Mi),mt=nt($e);return mt.ratio=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(167.774).center([0,18.67])}var go=.7109889596207567,Eo=.0528035274542;function Ao($e,nt){return nt>-go?($e=_e($e,nt),$e[1]+=Eo,$e):Ye($e,nt)}Ao.invert=function($e,nt){return nt>-go?_e.invert($e,nt-Eo):Ye.invert($e,nt)};function ds(){return b.geoProjection(Ao).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function jo($e,nt){return k(nt)>go?($e=_e($e,nt),$e[1]-=nt>0?Eo:-Eo,$e):Ye($e,nt)}jo.invert=function($e,nt){return k(nt)>go?_e.invert($e,nt+(nt>0?Eo:-Eo)):Ye.invert($e,nt)};function Wo(){return b.geoProjection(jo).scale(152.63)}function to($e,nt,mt,xt){var Bt=D(4*S/(2*mt+(1+$e-nt/2)*v(2*mt)+($e+nt)/2*v(4*mt)+nt/2*v(6*mt))),zt=D(xt*v(mt)*D((1+$e*t(2*mt)+nt*t(4*mt))/(1+$e+nt))),Wt=mt*Br(1);function Pr(Jr){return D(1+$e*t(2*Jr)+nt*t(4*Jr))}function Br(Jr){var la=Jr*mt;return(2*la+(1+$e-nt/2)*v(2*la)+($e+nt)/2*v(4*la)+nt/2*v(6*la))/mt}function kr(Jr){return Pr(Jr)*v(Jr)}var jr=function(Jr,la){var xa=mt*Me(Br,Wt*v(la)/mt,la/S);isNaN(xa)&&(xa=mt*h(la));var Ba=Bt*Pr(xa);return[Ba*zt*Jr/S*t(xa),Ba/zt*v(xa)]};return jr.invert=function(Jr,la){var xa=Me(kr,la*zt/Bt);return[Jr*S/(t(xa)*Bt*zt*Pr(xa)),I(mt*Br(xa/mt)/Wt)]},mt===0&&(Bt=D(xt/S),jr=function(Jr,la){return[Jr*Bt,v(la)/Bt]},jr.invert=function(Jr,la){return[Jr/Bt,I(la*Bt)]}),jr}function wo(){var $e=1,nt=0,mt=45*x,xt=2,Bt=b.geoProjectionMutator(to),zt=Bt($e,nt,mt,xt);return zt.a=function(Wt){return arguments.length?Bt($e=+Wt,nt,mt,xt):$e},zt.b=function(Wt){return arguments.length?Bt($e,nt=+Wt,mt,xt):nt},zt.psiMax=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt*x,xt):mt*A},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(180.739)}function pi($e,nt,mt,xt,Bt,zt,Wt,Pr,Br,kr,jr){if(jr.nanEncountered)return NaN;var Jr,la,xa,Ba,an,Tn,ii,Si,oi,Ji;if(Jr=mt-nt,la=$e(nt+Jr*.25),xa=$e(mt-Jr*.25),isNaN(la)){jr.nanEncountered=!0;return}if(isNaN(xa)){jr.nanEncountered=!0;return}return Ba=Jr*(xt+4*la+Bt)/12,an=Jr*(Bt+4*xa+zt)/12,Tn=Ba+an,Ji=(Tn-Wt)/15,kr>Br?(jr.maxDepthCount++,Tn+Ji):Math.abs(Ji)>1;do Br[Tn]>xa?an=Tn:Ba=Tn,Tn=Ba+an>>1;while(Tn>Ba);var ii=Br[Tn+1]-Br[Tn];return ii&&(ii=(xa-Br[Tn+1])/ii),(Tn+1+ii)/Wt}var Jr=2*jr(1)/S*zt/mt,la=function(xa,Ba){var an=jr(k(v(Ba))),Tn=xt(an)*xa;return an/=Jr,[Tn,Ba>=0?an:-an]};return la.invert=function(xa,Ba){var an;return Ba*=Jr,k(Ba)<1&&(an=h(Ba)*I(Bt(k(Ba))*zt)),[xa/xt(k(Ba)),an]},la}function Xi(){var $e=0,nt=2.5,mt=1.183136,xt=b.geoProjectionMutator(Io),Bt=xt($e,nt,mt);return Bt.alpha=function(zt){return arguments.length?xt($e=+zt,nt,mt):$e},Bt.k=function(zt){return arguments.length?xt($e,nt=+zt,mt):nt},Bt.gamma=function(zt){return arguments.length?xt($e,nt,mt=+zt):mt},Bt.scale(152.63)}function Ko($e,nt){return k($e[0]-nt[0])=0;--Br)mt=$e[1][Br],xt=mt[0][0],Bt=mt[0][1],zt=mt[1][1],Wt=mt[2][0],Pr=mt[2][1],nt.push(Uo([[Wt-i,Pr-i],[Wt-i,zt+i],[xt+i,zt+i],[xt+i,Bt-i]],30));return{type:"Polygon",coordinates:[E.merge(nt)]}}function Ss($e,nt,mt){var xt,Bt;function zt(Br,kr){for(var jr=kr<0?-1:1,Jr=nt[+(kr<0)],la=0,xa=Jr.length-1;laJr[la][2][0];++la);var Ba=$e(Br-Jr[la][1][0],kr);return Ba[0]+=$e(Jr[la][1][0],jr*kr>jr*Jr[la][0][1]?Jr[la][0][1]:kr)[0],Ba}mt?zt.invert=mt(zt):$e.invert&&(zt.invert=function(Br,kr){for(var jr=Bt[+(kr<0)],Jr=nt[+(kr<0)],la=0,xa=jr.length;laBa&&(an=xa,xa=Ba,Ba=an),[[Jr,xa],[la,Ba]]})}),Wt):nt.map(function(kr){return kr.map(function(jr){return[[jr[0][0]*A,jr[0][1]*A],[jr[1][0]*A,jr[1][1]*A],[jr[2][0]*A,jr[2][1]*A]]})})},nt!=null&&Wt.lobes(nt),Wt}var Vo=[[[[-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 Vs(){return Ss(Ae,Vo).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 Bo(){return Ss(jo,Ts).scale(152.63)}var _o=[[[[-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 Pi(){return Ss(_e,_o).scale(169.529)}var yo=[[[[-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 bs(){return Ss(_e,yo).scale(169.529).rotate([20,0])}var Dl=[[[[-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 hl(){return Ss(Ao,Dl,Se).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ps=[[[[-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 dl(){return Ss(Ye,ps).scale(152.63).rotate([-20,0])}function wu($e,nt){return[3/u*$e*D(S*S/3-nt*nt),nt]}wu.invert=function($e,nt){return[u/3*$e/D(S*S/3-nt*nt),nt]};function lu(){return b.geoProjection(wu).scale(158.837)}function xc($e){function nt(mt,xt){if(k(k(xt)-M)2)return null;mt/=2,xt/=2;var zt=mt*mt,Wt=xt*xt,Pr=2*xt/(1+zt+Wt);return Pr=c((1+Pr)/(1-Pr),1/$e),[e(2*mt,1-zt-Wt)/$e,I((Pr-1)/(Pr+1))]},nt}function Fl(){var $e=.5,nt=b.geoProjectionMutator(xc),mt=nt($e);return mt.spacing=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(124.75)}var pl=S/T;function $u($e,nt){return[$e*(1+D(t(nt)))/2,nt/(t(nt/2)*t($e/6))]}$u.invert=function($e,nt){var mt=k($e),xt=k(nt),Bt=i,zt=M;xti||k(Tn)>i)&&--Bt>0);return Bt&&[mt,xt]};function vs(){return b.geoProjection(tl).scale(139.98)}function os($e,nt){return[v($e)/t(nt),g(nt)*t($e)]}os.invert=function($e,nt){var mt=$e*$e,xt=nt*nt,Bt=xt+1,zt=mt+Bt,Wt=$e?_*D((zt-D(zt*zt-4*mt))/mt):1/D(Bt);return[I($e*Wt),h(nt)*O(Wt)]};function ms(){return b.geoProjection(os).scale(144.049).clipAngle(90-.001)}function rl($e){var nt=t($e),mt=g(C+$e/2);function xt(Bt,zt){var Wt=zt-$e,Pr=k(Wt)=0;)jr=$e[kr],Jr=jr[0]+Pr*(xa=Jr)-Br*la,la=jr[1]+Pr*la+Br*xa;return Jr=Pr*(xa=Jr)-Br*la,la=Pr*la+Br*xa,[Jr,la]}return mt.invert=function(xt,Bt){var zt=20,Wt=xt,Pr=Bt;do{for(var Br=nt,kr=$e[Br],jr=kr[0],Jr=kr[1],la=0,xa=0,Ba;--Br>=0;)kr=$e[Br],la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=kr[0]+Wt*(Ba=jr)-Pr*Jr,Jr=kr[1]+Wt*Jr+Pr*Ba;la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=Wt*(Ba=jr)-Pr*Jr-xt,Jr=Wt*Jr+Pr*Ba-Bt;var an=la*la+xa*xa,Tn,ii;Wt-=Tn=(jr*la+Jr*xa)/an,Pr-=ii=(Jr*la-jr*xa)/an}while(k(Tn)+k(ii)>i*i&&--zt>0);if(zt){var Si=D(Wt*Wt+Pr*Pr),oi=2*l(Si*.5),Ji=v(oi);return[e(Wt*Ji,Si*t(oi)),Si?I(Pr*Ji/Si):0]}},mt}var Lh=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],rh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ju=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ss=[[.9245,0],[0,0],[.01943,0]],ah=[[.721316,0],[0,0],[-.00881625,-.00617325]];function wc(){return Ou(Lh,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function pc(){return Ou(rh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Nf(){return Ou(Ju,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Bu(){return Ou(ss,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Tc(){return Ou(ah,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ou($e,nt){var mt=b.geoProjection(bc($e)).rotate(nt).clipAngle(90),xt=b.geoRotation(nt),Bt=mt.center;return delete mt.rotate,mt.center=function(zt){return arguments.length?Bt(xt(zt)):xt.invert(Bt())},mt}var Gc=D(6),pf=D(7);function $l($e,nt){var mt=I(7*v(nt)/(3*Gc));return[Gc*$e*(2*t(2*mt/3)-1)/pf,9*v(mt/3)/pf]}$l.invert=function($e,nt){var mt=3*I(nt*pf/9);return[$e*pf/(Gc*(2*t(2*mt/3)-1)),I(v(mt)*3*Gc/7)]};function jf(){return b.geoProjection($l).scale(164.859)}function Hc($e,nt){for(var mt=(1+_)*v(nt),xt=nt,Bt=0,zt;Bt<25&&(xt-=zt=(v(xt/2)+v(xt)-mt)/(.5*t(xt/2)+t(xt)),!(k(zt)w&&--xt>0);return zt=mt*mt,Wt=zt*zt,Pr=zt*Wt,[$e/(.84719-.13063*zt+Pr*Pr*(-.04515+.05494*zt-.02326*Wt+.00331*Pr)),mt]};function Uf(){return b.geoProjection(Nu).scale(175.295)}function al($e,nt){return[$e*(1+t(nt))/2,2*(nt-g(nt/2))]}al.invert=function($e,nt){for(var mt=nt/2,xt=0,Bt=1/0;xt<10&&k(Bt)>i;++xt){var zt=t(nt/2);nt-=Bt=(nt-g(nt/2)-mt)/(1-.5/(zt*zt))}return[2*$e/(1+t(nt)),nt]};function Xc(){return b.geoProjection(al).scale(152.63)}var ju=[[[[-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 Ac(){return Ss(he(1/0),ju).rotate([20,0]).scale(152.63)}function Zc($e,nt){var mt=v(nt),xt=t(nt),Bt=h($e);if($e===0||k(nt)===M)return[0,nt];if(nt===0)return[$e,0];if(k($e)===M)return[$e*xt,M*mt];var zt=S/(2*$e)-2*$e/S,Wt=2*nt/S,Pr=(1-Wt*Wt)/(mt-Wt),Br=zt*zt,kr=Pr*Pr,jr=1+Br/kr,Jr=1+kr/Br,la=(zt*mt/Pr-zt/2)/jr,xa=(kr*mt/Br+Pr/2)/Jr,Ba=la*la+xt*xt/jr,an=xa*xa-(kr*mt*mt/Br+Pr*mt-1)/Jr;return[M*(la+D(Ba)*Bt),M*(xa+D(an<0?0:an)*h(-nt*zt)*Bt)]}Zc.invert=function($e,nt){$e/=M,nt/=M;var mt=$e*$e,xt=nt*nt,Bt=mt+xt,zt=S*S;return[$e?(Bt-1+D((1-Bt)*(1-Bt)+4*mt))/(2*$e)*M:0,Me(function(Wt){return Bt*(S*v(Wt)-2*Wt)*S+4*Wt*Wt*(nt-v(Wt))+2*S*Wt-zt*nt},0)]};function ec(){return b.geoProjection(Zc).scale(127.267)}var cu=1.0148,tc=.23185,vf=-.14499,Tu=.02406,nh=cu,vl=5*tc,ml=7*vf,rc=9*Tu,yl=1.790857183;function qf($e,nt){var mt=nt*nt;return[$e,nt*(cu+mt*mt*(tc+mt*(vf+Tu*mt)))]}qf.invert=function($e,nt){nt>yl?nt=yl:nt<-yl&&(nt=-yl);var mt=nt,xt;do{var Bt=mt*mt;mt-=xt=(mt*(cu+Bt*Bt*(tc+Bt*(vf+Tu*Bt)))-nt)/(nh+Bt*Bt*(vl+Bt*(ml+rc*Bt)))}while(k(xt)>i);return[$e,mt]};function ac(){return b.geoProjection(qf).scale(139.319)}function Mc($e,nt){if(k(nt)i&&--Bt>0);return Wt=g(xt),[(k(nt)=0;)if(xt=nt[Pr],mt[0]===xt[0]&&mt[1]===xt[1]){if(zt)return[zt,mt];zt=mt}}}function gf($e){for(var nt=$e.length,mt=[],xt=$e[nt-1],Bt=0;Bt0?[-xt[0],0]:[180-xt[0],180])};var nt=hu.map(function(mt){return{face:mt,project:$e(mt)}});return[-1,0,0,1,0,1,4,5].forEach(function(mt,xt){var Bt=nt[mt];Bt&&(Bt.children||(Bt.children=[])).push(nt[xt])}),Au(nt[0],function(mt,xt){return nt[mt<-S/2?xt<0?6:4:mt<0?xt<0?2:0:mtxt^xa>xt&&mt<(la-kr)*(xt-jr)/(xa-jr)+kr&&(Bt=!Bt)}return Bt}function Vf($e,nt){var mt=nt.stream,xt;if(!mt)throw new Error("invalid projection");switch($e&&$e.type){case"Feature":xt=Gf;break;case"FeatureCollection":xt=xf;break;default:xt=Hf;break}return xt($e,mt)}function xf($e,nt){return{type:"FeatureCollection",features:$e.features.map(function(mt){return Gf(mt,nt)})}}function Gf($e,nt){return{type:"Feature",id:$e.id,properties:$e.properties,geometry:Hf($e.geometry,nt)}}function bh($e,nt){return{type:"GeometryCollection",geometries:$e.geometries.map(function(mt){return Hf(mt,nt)})}}function Hf($e,nt){if(!$e)return null;if($e.type==="GeometryCollection")return bh($e,nt);var mt;switch($e.type){case"Point":mt=kc;break;case"MultiPoint":mt=kc;break;case"LineString":mt=Cc;break;case"MultiLineString":mt=Cc;break;case"Polygon":mt=Lc;break;case"MultiPolygon":mt=Lc;break;case"Sphere":mt=Lc;break;default:return null}return b.geoStream($e,nt(mt)),mt.result()}var il=[],kl=[],kc={point:function($e,nt){il.push([$e,nt])},result:function(){var $e=il.length?il.length<2?{type:"Point",coordinates:il[0]}:{type:"MultiPoint",coordinates:il}:null;return il=[],$e}},Cc={lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){il.length&&(kl.push(il),il=[])},result:function(){var $e=kl.length?kl.length<2?{type:"LineString",coordinates:kl[0]}:{type:"MultiLineString",coordinates:kl}:null;return kl=[],$e}},Lc={polygonStart:xo,lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){var $e=il.length;if($e){do il.push(il[0].slice());while(++$e<4);kl.push(il),il=[]}},polygonEnd:xo,result:function(){if(!kl.length)return null;var $e=[],nt=[];return kl.forEach(function(mt){Ec(mt)?$e.push([mt]):nt.push(mt)}),nt.forEach(function(mt){var xt=mt[0];$e.some(function(Bt){if(xh(Bt[0],xt))return Bt.push(mt),!0})||$e.push([mt])}),kl=[],$e.length?$e.length>1?{type:"MultiPolygon",coordinates:$e}:{type:"Polygon",coordinates:$e[0]}:null}};function vc($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=k(xt)0?xt-S:xt+S,Bt),Pr=(Wt[0]-Wt[1])*_,Br=(Wt[0]+Wt[1])*_;if(zt)return[Pr,Br];var kr=nt*_,jr=Pr>0^Br>0?-1:1;return[jr*Pr-h(Br)*kr,jr*Br-h(Pr)*kr]}return $e.invert&&(mt.invert=function(xt,Bt){var zt=(xt+Bt)*_,Wt=(Bt-xt)*_,Pr=k(zt)<.5*nt&&k(Wt)<.5*nt;if(!Pr){var Br=nt*_,kr=zt>0^Wt>0?-1:1,jr=-kr*xt+(Wt>0?1:-1)*Br,Jr=-kr*Bt+(zt>0?1:-1)*Br;zt=(-jr-Jr)*_,Wt=(jr-Jr)*_}var la=$e.invert(zt,Wt);return Pr||(la[0]+=zt>0?S:-S),la}),b.geoProjection(mt).rotate([-90,-90,45]).clipAngle(180-.001)}function Ft(){return vc(Lr).scale(176.423)}function tr(){return vc(Ri).scale(111.48)}function Fr($e,nt){if(!(0<=(nt=+nt)&&nt<=20))throw new Error("invalid digits");function mt(kr){var jr=kr.length,Jr=2,la=new Array(jr);for(la[0]=+kr[0].toFixed(nt),la[1]=+kr[1].toFixed(nt);Jr2||xa[0]!=jr[0]||xa[1]!=jr[1])&&(Jr.push(xa),jr=xa)}return Jr.length===1&&kr.length>1&&Jr.push(mt(kr[kr.length-1])),Jr}function zt(kr){return kr.map(Bt)}function Wt(kr){if(kr==null)return kr;var jr;switch(kr.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:kr.geometries.map(Wt)};break;case"Point":jr={type:"Point",coordinates:mt(kr.coordinates)};break;case"MultiPoint":jr={type:kr.type,coordinates:xt(kr.coordinates)};break;case"LineString":jr={type:kr.type,coordinates:Bt(kr.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:kr.type,coordinates:zt(kr.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:kr.coordinates.map(zt)};break;default:return kr}return kr.bbox!=null&&(jr.bbox=kr.bbox),jr}function Pr(kr){var jr={type:"Feature",properties:kr.properties,geometry:Wt(kr.geometry)};return kr.id!=null&&(jr.id=kr.id),kr.bbox!=null&&(jr.bbox=kr.bbox),jr}if($e!=null)switch($e.type){case"Feature":return Pr($e);case"FeatureCollection":{var Br={type:"FeatureCollection",features:$e.features.map(Pr)};return $e.bbox!=null&&(Br.bbox=$e.bbox),Br}default:return Wt($e)}return $e}function wr($e){var nt=v($e);function mt(xt,Bt){var zt=nt?g(xt*nt/2)/nt:xt/2;if(!Bt)return[2*zt,-$e];var Wt=2*l(zt*v(Bt)),Pr=1/g(Bt);return[v(Wt)*Pr,Bt+(1-t(Wt))*Pr-$e]}return mt.invert=function(xt,Bt){if(k(Bt+=$e)i&&--Pr>0);var la=xt*(kr=g(Wt)),xa=g(k(Bt)0?M:-M)*(Br+Bt*(jr-Wt)/2+Bt*Bt*(jr-2*Br+Wt)/2)]}Ia.invert=function($e,nt){var mt=nt/M,xt=mt*90,Bt=s(18,k(xt/5)),zt=o(0,r(Bt));do{var Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],kr=Br-Wt,jr=Br-2*Pr+Wt,Jr=2*(k(mt)-Pr)/kr,la=jr/kr,xa=Jr*(1-la*Jr*(1-2*la*Jr));if(xa>=0||zt===1){xt=(nt>=0?5:-5)*(xa+Bt);var Ba=50,an;do Bt=s(18,k(xt)/5),zt=r(Bt),xa=Bt-zt,Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],xt-=(an=(nt>=0?M:-M)*(Pr+xa*(Br-Wt)/2+xa*xa*(Br-2*Pr+Wt)/2)-nt)*A;while(k(an)>w&&--Ba>0);break}}while(--zt>=0);var Tn=ba[zt][0],ii=ba[zt+1][0],Si=ba[s(19,zt+2)][0];return[$e/(ii+xa*(Si-Tn)/2+xa*xa*(Si-2*ii+Tn)/2),xt*x]};function Na(){return b.geoProjection(Ia).scale(152.63)}function Za($e){function nt(mt,xt){var Bt=t(xt),zt=($e-1)/($e-Bt*t(mt));return[zt*Bt*v(mt),zt*v(xt)]}return nt.invert=function(mt,xt){var Bt=mt*mt+xt*xt,zt=D(Bt),Wt=($e-D(1-Bt*($e+1)/($e-1)))/(($e-1)/zt+zt/($e-1));return[e(mt*Wt,zt*D(1-Wt*Wt)),zt?I(xt*Wt/zt):0]},nt}function mn($e,nt){var mt=Za($e);if(!nt)return mt;var xt=t(nt),Bt=v(nt);function zt(Wt,Pr){var Br=mt(Wt,Pr),kr=Br[1],jr=kr*Bt/($e-1)+xt;return[Br[0]*xt/jr,kr/jr]}return zt.invert=function(Wt,Pr){var Br=($e-1)/($e-1-Pr*Bt);return mt.invert(Br*Wt,Br*Pr*xt)},zt}function Da(){var $e=2,nt=0,mt=b.geoProjectionMutator(mn),xt=mt($e,nt);return xt.distance=function(Bt){return arguments.length?mt($e=+Bt,nt):$e},xt.tilt=function(Bt){return arguments.length?mt($e,nt=Bt*x):nt*A},xt.scale(432.147).clipAngle(O(1/$e)*A-1e-6)}var Ha=1e-4,$a=1e4,vn=-180,En=vn+Ha,yi=180,_i=yi-Ha,ki=-90,ri=ki+Ha,kn=90,Ln=kn-Ha;function Ni($e){return $e.length>0}function Zi($e){return Math.floor($e*$a)/$a}function Co($e){return $e===ki||$e===kn?[0,$e]:[vn,Zi($e)]}function Do($e){var nt=$e[0],mt=$e[1],xt=!1;return nt<=En?(nt=vn,xt=!0):nt>=_i&&(nt=yi,xt=!0),mt<=ri?(mt=ki,xt=!0):mt>=Ln&&(mt=kn,xt=!0),xt?[nt,mt]:$e}function Fo($e){return $e.map(Do)}function Yo($e,nt,mt){for(var xt=0,Bt=$e.length;xt=_i||jr<=ri||jr>=Ln){zt[Wt]=Do(Br);for(var Jr=Wt+1;JrEn&&xa<_i&&Ba>ri&&Ba=Pr)break;mt.push({index:-1,polygon:nt,ring:zt=zt.slice(Jr-1)}),zt[0]=Co(zt[0][1]),Wt=-1,Pr=zt.length}}}}function bo($e){var nt,mt=$e.length,xt={},Bt={},zt,Wt,Pr,Br,kr;for(nt=0;nt0?S-Pr:Pr)*A],kr=b.geoProjection($e(Wt)).rotate(Br),jr=b.geoRotation(Br),Jr=kr.center;return delete kr.rotate,kr.center=function(la){return arguments.length?Jr(jr(la)):jr.invert(Jr())},kr.clipAngle(90)}function js($e){var nt=t($e);function mt(xt,Bt){var zt=b.geoGnomonicRaw(xt,Bt);return zt[0]*=nt,zt}return mt.invert=function(xt,Bt){return b.geoGnomonicRaw.invert(xt/nt,Bt)},mt}function Cl(){return zl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function zl($e,nt){return gs(js,$e,nt)}function Kl($e){if(!($e*=2))return b.geoAzimuthalEquidistantRaw;var nt=-$e/2,mt=-nt,xt=$e*$e,Bt=g(mt),zt=.5/v(mt);function Wt(Pr,Br){var kr=O(t(Br)*t(Pr-nt)),jr=O(t(Br)*t(Pr-mt)),Jr=Br<0?-1:1;return kr*=kr,jr*=jr,[(kr-jr)/(2*$e),Jr*D(4*xt*jr-(xt-kr+jr)*(xt-kr+jr))/(2*$e)]}return Wt.invert=function(Pr,Br){var kr=Br*Br,jr=t(D(kr+(la=Pr+nt)*la)),Jr=t(D(kr+(la=Pr+mt)*la)),la,xa;return[e(xa=jr-Jr,la=(jr+Jr)*Bt),(Br<0?-1:1)*O(D(la*la+xa*xa)*zt)]},Wt}function Gu(){return xl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function xl($e,nt){return gs(Kl,$e,nt)}function Hu($e,nt){if(k(nt)i&&--Pr>0);return[h($e)*(D(Bt*Bt+4)+Bt)*S/4,M*Wt]};function Ql(){return b.geoProjection(Jl).scale(127.16)}function Eu($e,nt,mt,xt,Bt){function zt(Wt,Pr){var Br=mt*v(xt*Pr),kr=D(1-Br*Br),jr=D(2/(1+kr*t(Wt*=Bt)));return[$e*kr*jr*v(Wt),nt*Br*jr]}return zt.invert=function(Wt,Pr){var Br=Wt/$e,kr=Pr/nt,jr=D(Br*Br+kr*kr),Jr=2*I(jr/2);return[e(Wt*g(Jr),$e*jr)/Bt,jr&&I(Pr*v(Jr)/(nt*mt*jr))/xt]},zt}function bf($e,nt,mt,xt){var Bt=S/3;$e=o($e,i),nt=o(nt,i),$e=s($e,M),nt=s(nt,S-i),mt=o(mt,0),mt=s(mt,100-i),xt=o(xt,i);var zt=mt/100+1,Wt=xt/100,Pr=O(zt*t(Bt))/Bt,Br=v($e)/v(Pr*M),kr=nt/S,jr=D(Wt*v($e/2)/v(nt/2)),Jr=jr/D(kr*Br*Pr),la=1/(jr*D(kr*Br*Pr));return Eu(Jr,la,Br,Pr,kr)}function lh(){var $e=65*x,nt=60*x,mt=20,xt=200,Bt=b.geoProjectionMutator(bf),zt=Bt($e,nt,mt,xt);return zt.poleline=function(Wt){return arguments.length?Bt($e=+Wt*x,nt,mt,xt):$e*A},zt.parallels=function(Wt){return arguments.length?Bt($e,nt=+Wt*x,mt,xt):nt*A},zt.inflation=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt,xt):mt},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(163.775)}function Pc(){return lh().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Ks=4*S+3*D(3),Bl=2*D(2*S*D(3)/Ks),Wu=ke(Bl*D(3)/S,Bl,Ks/6);function wf(){return b.geoProjection(Wu).scale(176.84)}function Qc($e,nt){return[$e*D(1-3*nt*nt/(S*S)),nt]}Qc.invert=function($e,nt){return[$e/D(1-3*nt*nt/(S*S)),nt]};function ku(){return b.geoProjection(Qc).scale(152.63)}function Ol($e,nt){var mt=t(nt),xt=t($e)*mt,Bt=1-xt,zt=t($e=e(v($e)*mt,-v(nt))),Wt=v($e);return mt=D(1-xt*xt),[Wt*mt-zt*Bt,-zt*mt-Wt*Bt]}Ol.invert=function($e,nt){var mt=($e*$e+nt*nt)/-2,xt=D(-mt*(2+mt)),Bt=nt*mt+$e*xt,zt=$e*mt-nt*xt,Wt=D(zt*zt+Bt*Bt);return[e(xt*Bt,Wt*(1+mt)),Wt?-I(xt*zt/Wt):0]};function Nl(){return b.geoProjection(Ol).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function fi($e,nt){var mt=re($e,nt);return[(mt[0]+$e/M)/2,(mt[1]+nt)/2]}fi.invert=function($e,nt){var mt=$e,xt=nt,Bt=25;do{var zt=t(xt),Wt=v(xt),Pr=v(2*xt),Br=Wt*Wt,kr=zt*zt,jr=v(mt),Jr=t(mt/2),la=v(mt/2),xa=la*la,Ba=1-kr*Jr*Jr,an=Ba?O(zt*Jr)*D(Tn=1/Ba):Tn=0,Tn,ii=.5*(2*an*zt*la+mt/M)-$e,Si=.5*(an*Wt+xt)-nt,oi=.5*Tn*(kr*xa+an*zt*Jr*Br)+.5/M,Ji=Tn*(jr*Pr/4-an*Wt*la),Qi=.125*Tn*(Pr*la-an*Wt*kr*jr),Oo=.5*Tn*(Br*Jr+an*xa*zt)+.5,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]};function eu(){return b.geoProjection(fi).scale(158.837)}p.geoNaturalEarth=b.geoNaturalEarth1,p.geoNaturalEarthRaw=b.geoNaturalEarth1Raw,p.geoAiry=Q,p.geoAiryRaw=$,p.geoAitoff=ne,p.geoAitoffRaw=re,p.geoArmadillo=G,p.geoArmadilloRaw=se,p.geoAugust=K,p.geoAugustRaw=X,p.geoBaker=Z,p.geoBakerRaw=q,p.geoBerghaus=ae,p.geoBerghausRaw=ee,p.geoBertin1953=Ve,p.geoBertin1953Raw=Ie,p.geoBoggs=Be,p.geoBoggsRaw=Ae,p.geoBonne=Tt,p.geoBonneRaw=gt,p.geoBottomley=$t,p.geoBottomleyRaw=At,p.geoBromley=_r,p.geoBromleyRaw=rr,p.geoChamberlin=Ne,p.geoChamberlinRaw=vt,p.geoChamberlinAfrica=De,p.geoCollignon=Ke,p.geoCollignonRaw=We,p.geoCraig=et,p.geoCraigRaw=Je,p.geoCraster=Pt,p.geoCrasterRaw=pt,p.geoCylindricalEqualArea=qt,p.geoCylindricalEqualAreaRaw=Ct,p.geoCylindricalStereographic=Ht,p.geoCylindricalStereographicRaw=Vt,p.geoEckert1=Kr,p.geoEckert1Raw=Sr,p.geoEckert2=Rt,p.geoEckert2Raw=Yt,p.geoEckert3=ur,p.geoEckert3Raw=nr,p.geoEckert4=Rr,p.geoEckert4Raw=cr,p.geoEckert5=Zr,p.geoEckert5Raw=Qr,p.geoEckert6=Pa,p.geoEckert6Raw=ha,p.geoEisenlohr=Xa,p.geoEisenlohrRaw=un,p.geoFahey=yn,p.geoFaheyRaw=Nn,p.geoFoucaut=li,p.geoFoucautRaw=Un,p.geoFoucautSinusoidal=on,p.geoFoucautSinusoidalRaw=Yn,p.geoGilbert=Yi,p.geoGingery=rt,p.geoGingeryRaw=Ja,p.geoGinzburg4=Tr,p.geoGinzburg4Raw=lr,p.geoGinzburg5=Dr,p.geoGinzburg5Raw=Ir,p.geoGinzburg6=kt,p.geoGinzburg6Raw=ot,p.geoGinzburg8=ar,p.geoGinzburg8Raw=jt,p.geoGinzburg9=xr,p.geoGinzburg9Raw=Er,p.geoGringorten=wa,p.geoGringortenRaw=Lr,p.geoGuyou=Di,p.geoGuyouRaw=Ri,p.geoHammer=we,p.geoHammerRaw=he,p.geoHammerRetroazimuthal=jn,p.geoHammerRetroazimuthalRaw=fn,p.geoHealpix=Hi,p.geoHealpixRaw=qi,p.geoHill=Ro,p.geoHillRaw=Mi,p.geoHomolosine=Wo,p.geoHomolosineRaw=jo,p.geoHufnagel=wo,p.geoHufnagelRaw=to,p.geoHyperelliptical=Xi,p.geoHyperellipticalRaw=Io,p.geoInterrupt=Ss,p.geoInterruptedBoggs=Vs,p.geoInterruptedHomolosine=Bo,p.geoInterruptedMollweide=Pi,p.geoInterruptedMollweideHemispheres=bs,p.geoInterruptedSinuMollweide=hl,p.geoInterruptedSinusoidal=dl,p.geoKavrayskiy7=lu,p.geoKavrayskiy7Raw=wu,p.geoLagrange=Fl,p.geoLagrangeRaw=xc,p.geoLarrivee=uu,p.geoLarriveeRaw=$u,p.geoLaskowski=vs,p.geoLaskowskiRaw=tl,p.geoLittrow=ms,p.geoLittrowRaw=os,p.geoLoximuthal=Fu,p.geoLoximuthalRaw=rl,p.geoMiller=Ku,p.geoMillerRaw=zu,p.geoModifiedStereographic=Ou,p.geoModifiedStereographicRaw=bc,p.geoModifiedStereographicAlaska=wc,p.geoModifiedStereographicGs48=pc,p.geoModifiedStereographicGs50=Nf,p.geoModifiedStereographicMiller=Bu,p.geoModifiedStereographicLee=Tc,p.geoMollweide=ce,p.geoMollweideRaw=_e,p.geoMtFlatPolarParabolic=jf,p.geoMtFlatPolarParabolicRaw=$l,p.geoMtFlatPolarQuartic=Wc,p.geoMtFlatPolarQuarticRaw=Hc,p.geoMtFlatPolarSinusoidal=Yc,p.geoMtFlatPolarSinusoidalRaw=Qu,p.geoNaturalEarth2=Uf,p.geoNaturalEarth2Raw=Nu,p.geoNellHammer=Xc,p.geoNellHammerRaw=al,p.geoInterruptedQuarticAuthalic=Ac,p.geoNicolosi=ec,p.geoNicolosiRaw=Zc,p.geoPatterson=ac,p.geoPattersonRaw=qf,p.geoPolyconic=mf,p.geoPolyconicRaw=Mc,p.geoPolyhedral=Au,p.geoPolyhedralButterfly=Uu,p.geoPolyhedralCollignon=yf,p.geoPolyhedralWaterman=_f,p.geoProject=Vf,p.geoGringortenQuincuncial=Ft,p.geoPeirceQuincuncial=tr,p.geoPierceQuincuncial=tr,p.geoQuantize=Fr,p.geoQuincuncial=vc,p.geoRectangularPolyconic=ea,p.geoRectangularPolyconicRaw=wr,p.geoRobinson=Na,p.geoRobinsonRaw=Ia,p.geoSatellite=Da,p.geoSatelliteRaw=mn,p.geoSinuMollweide=ds,p.geoSinuMollweideRaw=Ao,p.geoSinusoidal=yt,p.geoSinusoidalRaw=Ye,p.geoStitch=ns,p.geoTimes=zo,p.geoTimesRaw=Kn,p.geoTwoPointAzimuthal=zl,p.geoTwoPointAzimuthalRaw=js,p.geoTwoPointAzimuthalUsa=Cl,p.geoTwoPointEquidistant=xl,p.geoTwoPointEquidistantRaw=Kl,p.geoTwoPointEquidistantUsa=Gu,p.geoVanDerGrinten=Su,p.geoVanDerGrintenRaw=Hu,p.geoVanDerGrinten2=Jc,p.geoVanDerGrinten2Raw=mc,p.geoVanDerGrinten3=du,p.geoVanDerGrinten3Raw=oc,p.geoVanDerGrinten4=Ql,p.geoVanDerGrinten4Raw=Jl,p.geoWagner=lh,p.geoWagner7=Pc,p.geoWagnerRaw=bf,p.geoWagner4=wf,p.geoWagner4Raw=Wu,p.geoWagner6=ku,p.geoWagner6Raw=Qc,p.geoWiechel=Nl,p.geoWiechelRaw=Ol,p.geoWinkel3=eu,p.geoWinkel3Raw=fi,Object.defineProperty(p,"__esModule",{value:!0})})}}),Sj=ze({"src/plots/geo/zoom.js"(J,V){"use strict";var p=ci(),b=Nr(),E=mi(),k=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function n(A,x){var z=A.projection,I;return x._isScoped?I=o:x._isClipped?I=c:I=s,I(A,z)}V.exports=n;function r(A,x){return p.behavior.zoom().translate(x.translate()).scaleExtent(x.scaleExtent()).scale(x.scale())}function a(A,x,z){var I=A.id,O=A.graphDiv,D=O.layout,B=D[I],F=O._fullLayout,P=F[I],j={},U={};function $(Q,re){j[I+"."+Q]=b.nestedProperty(B,Q).get(),E.call("_storeDirectGUIEdit",D,F._preGUI,j);var ne=b.nestedProperty(P,Q);ne.get()!==re&&(ne.set(re),b.nestedProperty(B,Q).set(re),U[I+"."+Q]=re)}z($),$("projection.scale",x.scale()/A.fitScale),$("fitbounds",!1),O.emit("plotly_relayout",U)}function o(A,x){var z=r(A,x);function I(){p.select(this).style(e)}function O(){x.scale(p.event.scale).translate(p.event.translate),A.render(!0);var F=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function D(F){var P=x.invert(A.midPt);F("center.lon",P[0]),F("center.lat",P[1])}function B(){p.select(this).style(t),a(A,x,D)}return z.on("zoomstart",I).on("zoom",O).on("zoomend",B),z}function s(A,x){var z=r(A,x),I=2,O,D,B,F,P,j,U,$,Q;function re(H){return x.invert(H)}function ne(H){var Y=re(H);if(!Y)return!0;var q=x(Y);return Math.abs(q[0]-H[0])>I||Math.abs(q[1]-H[1])>I}function se(){p.select(this).style(e);let{x:H,y:Y,width:q,height:Z}=this.getBBox();O=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],D=x.rotate(),B=x.translate(),F=D,P=re(O)}function G(){let{x:H,y:Y,width:q,height:Z}=this.getBBox();if(j=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],ne(O)){z.scale(x.scale()),z.translate(x.translate());return}x.scale(p.event.scale),x.translate([B[0],p.event.translate[1]]),P?re(j)&&($=re(j),U=[F[0]+($[0]-P[0]),D[1],D[2]],x.rotate(U),F=U):(O=j,P=re(O)),Q=!0,A.render(!0);var ee=x.rotate(),ae=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":ae[0],"geo.center.lat":ae[1],"geo.projection.rotation.lon":-ee[0]})}function X(){p.select(this).style(t),Q&&a(A,x,K)}function K(H){var Y=x.rotate(),q=x.invert(A.midPt);H("projection.rotation.lon",-Y[0]),H("center.lon",q[0]),H("center.lat",q[1])}return z.on("zoomstart",se).on("zoom",G).on("zoomend",X),z}function c(A,x){var z={r:x.rotate(),k:x.scale()},I=r(A,x),O=u(I,"zoomstart","zoom","zoomend"),D=0,B=I.on,F;I.on("zoomstart",function(){p.select(this).style(e);let{x:Q,y:re,width:ne,height:se}=this.getBBox(),G=p.event.sourceEvent?p.mouse(this):[Q+ne/2,re+se/2],X=x.rotate(),K=X,H=x.translate(),Y=h(X);F=m(x,G),B.call(I,"zoom",function(){let{x:q,y:Z,width:ee,height:ae}=this.getBBox(),he=p.event.sourceEvent?p.mouse(this):[q+ee/2,Z+ae/2];if(x.scale(z.k=p.event.scale),!F)G=he,F=m(x,G);else if(m(x,he)){x.rotate(X).translate(H);var xe=m(x,he),we=g(F,xe),Me=C(v(Y,we)),Se=z.r=i(Me,F,K);(!isFinite(Se[0])||!isFinite(Se[1])||!isFinite(Se[2]))&&(Se=K),x.rotate(Se),K=Se}j(O.of(this,arguments))}),P(O.of(this,arguments))}).on("zoomend",function(){p.select(this).style(t),B.call(I,"zoom",null),U(O.of(this,arguments)),a(A,x,$)}).on("zoom.redraw",function(){A.render(!0);var Q=x.rotate();A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function P(Q){D++||Q({type:"zoomstart"})}function j(Q){Q({type:"zoom"})}function U(Q){--D||Q({type:"zoomend"})}function $(Q){var re=x.rotate();Q("projection.rotation.lon",-re[0]),Q("projection.rotation.lat",-re[1])}return p.rebind(I,O,"on")}function m(A,x){var z=A.invert(x);return z&&isFinite(z[0])&&isFinite(z[1])&&_(z)}function h(A){var x=.5*A[0]*k,z=.5*A[1]*k,I=.5*A[2]*k,O=Math.sin(x),D=Math.cos(x),B=Math.sin(z),F=Math.cos(z),P=Math.sin(I),j=Math.cos(I);return[D*F*j+O*B*P,O*F*j-D*B*P,D*B*j+O*F*P,D*F*P-O*B*j]}function v(A,x){var z=A[0],I=A[1],O=A[2],D=A[3],B=x[0],F=x[1],P=x[2],j=x[3];return[z*B-I*F-O*P-D*j,z*F+I*B+O*j-D*P,z*P-I*j+O*B+D*F,z*j+I*P-O*F+D*B]}function g(A,x){if(!(!A||!x)){var z=f(A,x),I=Math.sqrt(T(z,z)),O=.5*Math.acos(Math.max(-1,Math.min(1,T(A,x)))),D=Math.sin(O)/I;return I&&[Math.cos(O),z[2]*D,-z[1]*D,z[0]*D]}}function i(A,x,z){var I=M(x,2,A[0]);I=M(I,1,A[1]),I=M(I,0,A[2]-z[2]);var O=x[0],D=x[1],B=x[2],F=I[0],P=I[1],j=I[2],U=Math.atan2(D,O)*l,$=Math.sqrt(O*O+D*D),Q,re;Math.abs(P)>$?(re=(P>0?90:-90)-U,Q=0):(re=Math.asin(P/$)*l-U,Q=Math.sqrt($*$-P*P));var ne=180-re-2*U,se=(Math.atan2(j,F)-Math.atan2(B,Q))*l,G=(Math.atan2(j,F)-Math.atan2(B,-Q))*l,X=w(z[0],z[1],re,se),K=w(z[0],z[1],ne,G);return X<=K?[re,se,z[2]]:[ne,G,z[2]]}function w(A,x,z,I){var O=S(z-A),D=S(I-x);return Math.sqrt(O*O+D*D)}function S(A){return(A%360+540)%360-180}function M(A,x,z){var I=z*k,O=A.slice(),D=x===0?1:0,B=x===2?1:2,F=Math.cos(I),P=Math.sin(I);return O[D]=A[D]*F-A[B]*P,O[B]=A[B]*F+A[D]*P,O}function C(A){return[Math.atan2(2*(A[0]*A[1]+A[2]*A[3]),1-2*(A[1]*A[1]+A[2]*A[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(A[0]*A[2]-A[3]*A[1]))))*l,Math.atan2(2*(A[0]*A[3]+A[1]*A[2]),1-2*(A[2]*A[2]+A[3]*A[3]))*l]}function _(A){var x=A[0]*k,z=A[1]*k,I=Math.cos(z);return[I*Math.cos(x),I*Math.sin(x),Math.sin(z)]}function T(A,x){for(var z=0,I=0,O=A.length;I0&&$._module.calcGeoJSON(U,B)}if(!F){var Q=this.updateProjection(D,B);if(Q)return;(!this.viewInitial||this.scope!==P.scope)&&this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(B,P),this.updateDims(B,P),this.updateFx(B,P),s.generalUpdatePerTraceModule(this.graphDiv,this,D,P);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var ne=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ne.selectAll("path"),this._render()},x.updateProjection=function(D,B){var F=this.graphDiv,P=B[this.id],j=B._size,U=P.domain,$=P.projection,Q=P.lonaxis,re=P.lataxis,ne=Q._ax,se=re._ax,G=this.projection=z(P),X=[[j.l+j.w*U.x[0],j.t+j.h*(1-U.y[1])],[j.l+j.w*U.x[1],j.t+j.h*(1-U.y[0])]],K=P.center||{},H=$.rotation||{},Y=Q.range||[],q=re.range||[];if(P.fitbounds){ne._length=X[1][0]-X[0][0],se._length=X[1][1]-X[0][1],ne.range=h(F,ne),se.range=h(F,se);let ve=[];for(let $t of D){let rr=$t[0].trace;rr.visible===!0&&rr._module.fitCoords&&ve.push(rr._module.fitCoords($t,P))}let le=m(F,ne),Ae=le.min.reduce(($t,{val:rr})=>Math.min($t,rr),1/0),Xe=le.max.reduce(($t,{val:rr})=>Math.max($t,rr),-1/0)-Ae,Ye=_.boundsOfCoords(ve.flat()),[yt,,gt]=Ye||[],Tt=gt-yt;if(!!Ye&&(Xe>360||Xe<360&&TtMath.max(ht,$t(De)),0),Xt=le.max.reduce((ht,De)=>Math.max(ht,rr(De)),0),or=ne._length-_r-Xt,Ot=or>ne._length/10?Tt*ne._length/or:Tt,vt=(yt+gt)/2;ne.range=[vt-Ot/2,vt+Ot/2]}var Z=(ne.range[0]+ne.range[1])/2,ee=(se.range[0]+se.range[1])/2;if(P._isScoped)K={lon:Z,lat:ee};else if(P._isClipped){K={lon:Z,lat:ee},H={lon:Z,lat:ee,roll:H.roll};var ae=$.type,he=C.lonaxisSpan[ae]/2||180,xe=C.lataxisSpan[ae]/2||90;Y=[Z-he,Z+he],q=[ee-xe,ee+xe]}else K={lon:Z,lat:ee},H={lon:Z,lat:H.lat,roll:H.roll}}G.center([K.lon-H.lon,K.lat-H.lat]).rotate([-H.lon,-H.lat,H.roll]).parallels($.parallels);var we=O(Y,q);G.fitExtent(X,we);var Me=this.bounds=G.getBounds(we),Se=this.fitScale=G.scale(),Ie=G.translate();if(G.scaleExtent=()=>{var ve;let{minscale:le}=$,Ae=(ve=$.maxscale)!=null?ve:1/0;return[Se*Math.min(le,Ae),Se*Math.max(le,Ae)]},P.fitbounds){var Ve=G.getBounds(O(ne.range,se.range)),Ge=Math.min((Me[1][0]-Me[0][0])/(Ve[1][0]-Ve[0][0]),(Me[1][1]-Me[0][1])/(Ve[1][1]-Ve[0][1]));isFinite(Ge)?G.scale(Ge*Se):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else G.scale($.scale*Se);var ke=this.midPt=[(Me[0][0]+Me[1][0])/2,(Me[0][1]+Me[1][1])/2];if(G.translate([Ie[0]+(ke[0]-Ie[0]),Ie[1]+(ke[1]-Ie[1])]).clipExtent(Me),P._isAlbersUsa){var _e=G([K.lon,K.lat]);if(_e){var ce=G.translate();G.translate([ce[0]-(_e[0]-ce[0]),ce[1]-(_e[1]-ce[1])])}}},x.updateBaseLayers=function(D,B){var F=this,P=F.topojson,j=F.layers,U=F.basePaths;function $(X){return X==="lonaxis"||X==="lataxis"}function Q(X){return!!C.lineLayers[X]}function re(X){return!!C.fillLayers[X]}var ne=this.hasChoropleth?C.layersForChoropleth:C.layers,se=ne.filter(function(X){return Q(X)||re(X)?B["show"+X]:$(X)?B[X].showgrid:!0}),G=F.framework.selectAll(".layer").data(se,String);G.exit().each(function(X){delete j[X],delete U[X],p.select(this).remove()}),G.enter().append("g").attr("class",function(X){return"layer "+X}).each(function(X){var K=j[X]=p.select(this);X==="bg"?F.bgRect=K.append("rect").style("pointer-events","all"):$(X)?U[X]=K.append("path").style("fill","none"):X==="backplot"?K.append("g").classed("choroplethlayer",!0):X==="frontplot"?K.append("g").classed("scatterlayer",!0):Q(X)?U[X]=K.append("path").style("fill","none").style("stroke-miterlimit",2):re(X)&&(U[X]=K.append("path").style("stroke","none"))}),G.order(),G.each(function(X){var K=U[X],H=C.layerNameToAdjective[X];X==="frame"?K.datum(C.sphereSVG):Q(X)||re(X)?K.datum(u(P,P.objects[X])):$(X)&&K.datum(I(X,B,D)).call(r.stroke,B[X].gridcolor).call(a.dashLine,B[X].griddash,B[X].gridwidth),Q(X)?K.call(r.stroke,B[H+"color"]).call(a.dashLine,"",B[H+"width"]):re(X)&&K.call(r.fill,B[H+"color"])})},x.updateDims=function(D,B){var F=this.bounds,P=(B.framewidth||0)/2,j=F[0][0]-P,U=F[0][1]-P,$=F[1][0]-j+P,Q=F[1][1]-U+P;a.setRect(this.clipRect,j,U,$,Q),this.bgRect.call(a.setRect,j,U,$,Q).call(r.fill,B.bgcolor),this.xaxis._offset=j,this.xaxis._length=$,this.yaxis._offset=U,this.yaxis._length=Q},x.updateFx=function(D,B){var F=this,P=F.graphDiv,j=F.bgRect,U=D.dragmode,$=D.clickmode;if(F.isStatic)return;function Q(){var G=F.viewInitial,X={};for(var K in G)X[F.id+"."+K]=G[K];e.call("_guiRelayout",P,X),P.emit("plotly_doubleclick",null)}function re(G){return F.projection.invert([G[0]+F.xaxis._offset,G[1]+F.yaxis._offset])}var ne=function(G,X){if(X.isRect){var K=G.range={};K[F.id]=[re([X.xmin,X.ymin]),re([X.xmax,X.ymax])]}else{var H=G.lassoPoints={};H[F.id]=X.map(re)}},se={element:F.bgRect.node(),gd:P,plotinfo:{id:F.id,xaxis:F.xaxis,yaxis:F.yaxis,fillRangeItems:ne},xaxes:[F.xaxis],yaxes:[F.yaxis],subplot:F.id,clickFn:function(G){G===2&&w(P)}};if(U==="pan"){j.node().onmousedown=null;let G=M(F,B);if(j.call(G),!p.event){let X=F.projection.scale(),[K,H]=F.projection.scaleExtent();(XH)&&G.event(j)}j.on("dblclick.zoom",Q),P._context._scrollZoom.geo||j.on("wheel.zoom",null)}else(U==="select"||U==="lasso")&&(j.on(".zoom",null),se.prepFn=function(G,X,K){i(G,X,K,se,U)},g.init(se));j.on("mousemove",function(){var G=F.projection.invert(t.getPositionFromD3Event());if(!G)return g.unhover(P,p.event);F.xaxis.p2c=function(){return G[0]},F.yaxis.p2c=function(){return G[1]},o.hover(P,p.event,F.id)}),j.on("mouseout",function(){P._dragging||g.unhover(P,p.event)}),j.on("click",function(){U!=="select"&&U!=="lasso"&&($.indexOf("select")>-1&&S(p.event,P,[F.xaxis],[F.yaxis],F.id,se),$.indexOf("event")>-1&&o.click(P,p.event))})},x.makeFramework=function(){var D=this,B=D.graphDiv,F=B._fullLayout,P="clip"+F._uid+D.id;D.clipDef=F._clips.append("clipPath").attr("id",P),D.clipRect=D.clipDef.append("rect"),D.framework=p.select(D.container).append("g").attr("class","geo "+D.id).call(a.setClipUrl,P,B),D.project=function(j){var U=D.projection(j);return U?[U[0]-D.xaxis._offset,U[1]-D.yaxis._offset]:[null,null]},D.xaxis={_id:"x",c2p:function(j){return D.project(j)[0]}},D.yaxis={_id:"y",c2p:function(j){return D.project(j)[1]}},D.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(D.mockAxis,F)},x.saveViewInitial=function(D){var B=D.center||{},F=D.projection,P=F.rotation||{};this.viewInitial={fitbounds:D.fitbounds,"projection.scale":F.scale};var j;D._isScoped?j={"center.lon":B.lon,"center.lat":B.lat}:D._isClipped?j={"projection.rotation.lon":P.lon,"projection.rotation.lat":P.lat,"center.lon":B.lon,"center.lat":B.lat}:j={"center.lon":B.lon,"center.lat":B.lat,"projection.rotation.lon":P.lon},t.extendFlat(this.viewInitial,j)},x.render=function(D){this._hasMarkerAngles&&D?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},x._render=function(){var D=this.projection,B=D.getPath(),F;function P(U){var $=D(U.lonlat);return $?n($[0],$[1]):null}function j(U){return D.isLonLatOverEdges(U.lonlat)?"none":null}for(F in this.basePaths)this.basePaths[F].attr("d",B);for(F in this.dataPaths)this.dataPaths[F].attr("d",function(U){return B(U.geojson)});for(F in this.dataPoints)this.dataPoints[F].attr("display",j).attr("transform",P)};function z(D){var B=D.projection,F=B.type,P=C.projNames[F];P="geo"+t.titleCase(P);for(var j=b[P]||l[P],U=j(),$=D._isSatellite?Math.acos(1/B.distance)*180/Math.PI:D._isClipped?C.lonaxisSpan[F]/2:null,Q=["center","rotate","parallels","clipExtent"],re=function(G){return G?U:[]},ne=0;neH}else return!1},U.getPath=function(){return E().projection(U)},U.getBounds=function(G){return U.getPath().bounds(G)},U.precision(C.precision),D._isSatellite&&U.tilt(B.tilt).distance(B.distance),$&&U.clipAngle($-C.clipPad),U}function I(D,B,F){var P=1e-6,j=2.5,U=B[D],$=C.scopeDefaults[B.scope],Q,re,ne;D==="lonaxis"?(Q=$.lonaxisRange,re=$.lataxisRange,ne=function(ee,ae){return[ee,ae]}):D==="lataxis"&&(Q=$.lataxisRange,re=$.lonaxisRange,ne=function(ee,ae){return[ae,ee]});var se={type:"linear",range:[Q[0],Q[1]-P],tick0:U.tick0,dtick:U.dtick};c.setConvert(se,F);var G=c.calcTicks(se);!B.isScoped&&D==="lonaxis"&&G.pop();for(var X=G.length,K=new Array(X),H=0;Hhe[xe]!=null)||l.fitboundsIncompatible.has(i)?a.fitbounds=!1:ee.forEach(({dst:he,key:xe})=>he&&(he[xe]=null))}}}}),RA=ze({"src/plots/geo/index.js"(J,V){"use strict";var p=zf().getSubplotCalcData,b=Nr().counterRegex,E=Ej(),k="geo",l=b(k),e={};e[k]={valType:"subplotid",dflt:k,editType:"calc"};function t(a){for(var o=a._fullLayout,s=a.calcdata,c=o._subplots[k],m=0;m")}}}}),FA=ze({"src/traces/choropleth/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.location=E.location,b.z=E.z;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b.ct=t.ct,b}}}),zA=ze({"src/traces/choropleth/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r,a,o,s;if(E===!1)for(n=0;n=Math.min(U,$)&&g<=Math.max(U,$)?0:1/0}if(I=Math.min(Q,re)&&i<=Math.max(Q,re)?0:1/0}B=Math.sqrt(I*I+O*O),u=S[z]}}}else for(z=S.length-1;z>-1;z--)f=S[z],A=h[f],x=v[f],I=c.c2p(A)-g,O=m.c2p(x)-i,D=Math.sqrt(I*I+O*O),D100},J.isDotSymbol=function(p){return typeof p=="string"?V.DOT_RE.test(p):p>200}}}),Dj=ze({"src/traces/scattergl/defaults.js"(J,V){"use strict";var p=Nr(),b=mi(),E=D2(),k=ty(),l=zd(),e=el(),t=Gv(),n=yd(),r=id(),a=_d(),o=Od(),s=xd();V.exports=function(m,h,v,g){function i(u,A){return p.coerce(m,h,k,u,A)}var w=m.marker?E.isOpenSymbol(m.marker.symbol):!1,S=e.isBubble(m),M=t(m,h,g,i);if(!M){h.visible=!1;return}n(m,h,g,i),i("xhoverformat"),i("yhoverformat");var C=M>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>=0?(s=c,o=c-1):a=c+1}return s}function b(t,n,r,a,o){for(var s=o+1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>0?(s=c,o=c-1):a=c+1}return s}function E(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<0?(s=c,a=c+1):o=c-1}return s}function k(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<=0?(s=c,a=c+1):o=c-1}return s}function l(t,n,r,a,o){for(;a<=o;){var s=a+o>>>1,c=t[s],m=r!==void 0?r(c,n):c-n;if(m===0)return s;m<=0?a=s+1:o=s-1}return-1}function e(t,n,r,a,o,s){return typeof r=="function"?s(t,n,r,a===void 0?0:a|0,o===void 0?t.length-1:o|0):s(t,n,void 0,r===void 0?0:r|0,a===void 0?t.length-1:a|0)}V.exports={ge:function(t,n,r,a,o){return e(t,n,r,a,o,p)},gt:function(t,n,r,a,o){return e(t,n,r,a,o,b)},lt:function(t,n,r,a,o){return e(t,n,r,a,o,E)},le:function(t,n,r,a,o){return e(t,n,r,a,o,k)},eq:function(t,n,r,a,o){return e(t,n,r,a,o,l)}}}}),BA=ze({"node_modules/clamp/index.js"(J,V){V.exports=p;function p(b,E,k){return Ek?k:b:bE?E:b}}}),qd=ze({"node_modules/pick-by-alias/index.js"(J,V){"use strict";V.exports=function(k,l,e){var t={},n,r;if(typeof l=="string"&&(l=b(l)),Array.isArray(l)){var a={};for(r=0;r1&&(E=arguments),typeof E=="string"?E=E.split(/\s/).map(parseFloat):typeof E=="number"&&(E=[E]),E.length&&typeof E[0]=="number"?E.length===1?k={width:E[0],height:E[0],x:0,y:0}:E.length===2?k={width:E[0],height:E[1],x:0,y:0}:k={x:E[0],y:E[1],width:E[2]-E[0]||0,height:E[3]-E[1]||0}:E&&(E=p(E,{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"}),k={x:E.left||0,y:E.top||0},E.width==null?E.right?k.width=E.right-k.x:k.width=0:k.width=E.width,E.height==null?E.bottom?k.height=E.bottom-k.y:k.height=0:k.height=E.height),k}}}),c0=ze({"node_modules/array-bounds/index.js"(J,V){"use strict";V.exports=p;function p(b,E){if(!b||b.length==null)throw Error("Argument should be an array");E==null?E=1:E=Math.floor(E);for(var k=Array(E*2),l=0;le&&(e=b[n]),b[n]>>1,S;h.dtype||(h.dtype="array"),typeof h.dtype=="string"?S=new(r(h.dtype))(w):h.dtype&&(S=h.dtype,Array.isArray(S)&&(S.length=w));for(let I=0;Iv||P>o){for(let Y=0;Yae||$>he||Q=ne||Z===ee)return;let xe=M[q];ee===void 0&&(ee=xe.length);for(let ce=Z;ce=B&&le<=P&&Ae>=F&&Ae<=j&&se.push(ve)}let we=C[q],Me=we[Z*4+0],Se=we[Z*4+1],Ie=we[Z*4+2],Ve=we[Z*4+3],Ge=X(we,Z+1),ke=Y*.5,_e=q+1;G(K,H,ke,_e,Me,Se||Ie||Ve||Ge),G(K,H+ke,ke,_e,Se,Ie||Ve||Ge),G(K+ke,H,ke,_e,Ie,Ve||Ge),G(K+ke,H+ke,ke,_e,Ve,Ge)}function X(K,H){let Y=null,q=0;for(;Y===null;)if(Y=K[H*4+q],q++,q>K.length)return null;return Y}return se}function x(I,O,D,B,F){let P=[];for(let j=0;j2&&(t.push([r].concat(a.splice(0,2))),o="l",r=r=="m"?"l":"L");;){if(a.length==p[o])return a.unshift(r),t.push(a);if(a.length1&&(m=1),m<-1&&(m=-1),c*Math.acos(m)},e=function(r,a,o,s,c,m,h,v,g,i,w,S){var M=Math.pow(c,2),C=Math.pow(m,2),_=Math.pow(w,2),T=Math.pow(S,2),f=M*C-M*T-C*_;f<0&&(f=0),f/=M*T+C*_,f=Math.sqrt(f)*(h===v?-1:1);var u=f*c/m*S,A=f*-m/c*w,x=i*u-g*A+(r+o)/2,z=g*u+i*A+(a+s)/2,I=(w-u)/c,O=(S-A)/m,D=(-w-u)/c,B=(-S-A)/m,F=l(1,0,I,O),P=l(I,O,D,B);return v===0&&P>0&&(P-=b),v===1&&P<0&&(P+=b),[x,z,F,P]},t=function(r){var a=r.px,o=r.py,s=r.cx,c=r.cy,m=r.rx,h=r.ry,v=r.xAxisRotation,g=v===void 0?0:v,i=r.largeArcFlag,w=i===void 0?0:i,S=r.sweepFlag,M=S===void 0?0:S,C=[];if(m===0||h===0)return[];var _=Math.sin(g*b/360),T=Math.cos(g*b/360),f=T*(a-s)/2+_*(o-c)/2,u=-_*(a-s)/2+T*(o-c)/2;if(f===0&&u===0)return[];m=Math.abs(m),h=Math.abs(h);var A=Math.pow(f,2)/Math.pow(m,2)+Math.pow(u,2)/Math.pow(h,2);A>1&&(m*=Math.sqrt(A),h*=Math.sqrt(A));var x=e(a,o,s,c,m,h,w,M,_,T,f,u),z=p(x,4),I=z[0],O=z[1],D=z[2],B=z[3],F=Math.abs(B)/(b/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);B/=P;for(var j=0;j4?(n=i[i.length-4],r=i[i.length-3]):(n=m,r=h),t.push(i)}return t}function E(l,e,t,n){return["C",l,e,t,n,t,n]}function k(l,e,t,n,r,a){return["C",l/3+2/3*t,e/3+2/3*n,r/3+2/3*t,a/3+2/3*n,r,a]}}}),OA=ze({"node_modules/is-svg-path/index.js"(J,V){"use strict";V.exports=function(b){return typeof b!="string"?!1:(b=b.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(b)&&/[\dz]$/i.test(b)&&b.length>4))}}}),Hj=ze({"node_modules/svg-path-bounds/index.js"(J,V){"use strict";var p=Uj(),b=qj(),E=Gj(),k=OA();V.exports=l;function l(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!k(e))throw Error("String is not an SVG path.");e=p(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=b(e),e=E(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],n=0,r=e.length;nt[2]&&(t[2]=a[o+0]),a[o+1]>t[3]&&(t[3]=a[o+1]);return t}}}),Wj=ze({"node_modules/bitmap-sdf/index.js"(J,V){"use strict";V.exports=b;var p=1e20;function b(l,e){e||(e={});var t=e.cutoff==null?.25:e.cutoff,n=e.radius==null?8:e.radius,r=e.channel||0,a,o,s,c,m,h,v,g,i,w,S;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");a=e.width,o=e.height,c=l,e.stride?h=e.stride:h=Math.floor(l.length/a/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(g=l,v=g.getContext("2d"),a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(g=l.canvas,v=l,a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.ImageData&&l instanceof window.ImageData&&(i=l,a=l.width,o=l.height,c=i.data,h=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(m=c,c=Array(a*o),w=0,S=Math.floor(m.length/h);wYj});function Yj(J,V={}){if(!(0,UA.default)(J))throw Error("Invalid SVG path");let p,b;V.shape||Array.isArray(V)?[p,b]=V.shape||V:(p=ry.width=V.width||V.w||200,b=ry.height=V.height||V.h||200);let E=Math.min(p,b),k=V.stroke||0,l=V.viewbox||V.viewBox||(0,jA.default)(J),e=[p/(l[2]-l[0]),b/(l[3]-l[1])],t=Math.min(e[0]||0,e[1]||0)/2;Vh.fillStyle="black",Vh.fillRect(0,0,p,b),Vh.fillStyle="white",k&&(typeof k!="number"&&(k=1),Vh.strokeStyle=k>0?"white":"black",Vh.lineWidth=Math.abs(k)),Vh.translate(p*.5,b*.5),Vh.scale(t,t);let n=new Path2D(J);return Vh.fill(n),k&&Vh.stroke(n),Vh.setTransform(1,0,0,1,0,0),(0,qA.default)(Vh,{cutoff:V.cutoff!=null?V.cutoff:.5,radius:V.radius!=null?V.radius:E*.5})}var jA,UA,qA,ry,Vh,Xj=zi({"node_modules/svg-path-sdf/svg-path-sdf.js"(){jA=Yl(Hj()),UA=Yl(OA()),qA=Yl(Wj()),ry=document.createElement("canvas"),Vh=ry.getContext("2d",{willReadFrequently:!0})}}),h0=ze({"src/traces/scattergl/convert.js"(J,V){"use strict";var p=ao(),b=(Xj(),Po(NA)).default,{normalize:E}=Qn(),k=mi(),l=Nr(),e=l.isArrayOrTypedArray,t=$i(),n=Xl(),r=fp().formatColor,a=el(),o=l1(),s=D2(),c=bv(),m=np().DESELECTDIM,h={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=kh().appendArrayPointValue;function g(B,F){var P,j={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},U=B._context.plotGlPixelRatio;if(F.visible!==!0)return j;if(a.hasText(F)&&(j.text=i(B,F),j.textSel=C(B,F,F.selected),j.textUnsel=C(B,F,F.unselected)),a.hasMarkers(F)&&(j.marker=S(B,F),j.markerSel=M(B,F,F.selected),j.markerUnsel=M(B,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var $=F.marker.opacity;for(j.markerUnsel.opacity=new Array($.length),P=0;P<$.length;P++)j.markerUnsel.opacity[P]=m*$[P]}if(a.hasLines(F)){j.line={overlay:!0,thickness:F.line.width*U,color:F.line.color,opacity:F.opacity};var Q=(c.DASHES[F.line.dash]||[1]).slice();for(P=0;P500?"bold":"normal":B}function S(B,F){var P=F._length,j=F.marker,U={},$,Q=e(j.symbol),re=e(j.angle),ne=e(j.color),se=e(j.line.color),G=e(j.opacity),X=e(j.size),K=e(j.line.width),H;if(Q||(H=s.isOpenSymbol(j.symbol)),Q||ne||se||G||re){U.symbols=new Array(P),U.angles=new Array(P),U.colors=new Array(P),U.borderColors=new Array(P);var Y=j.symbol,q=j.angle,Z=r(j,j.opacity,P),ee=r(j.line,j.opacity,P);if(!e(ee[0])){var ae=ee;for(ee=Array(P),$=0;$c.TOO_MANY_POINTS||a.hasMarkers(F)?"rect":"round";if(se&&F.connectgaps){var X=$[0],K=$[1];for(Q=0;Q<$.length;Q+=2)isNaN($[Q])||isNaN($[Q+1])?($[Q]=X,$[Q+1]=K):(X=$[Q],K=$[Q+1])}return{join:G,positions:$}}function O(B,F,P,j,U){var $=k.getComponentMethod("errorbars","makeComputeError"),Q=n.getFromId(B,F.xaxis,"x"),re=n.getFromId(B,F.yaxis,"y"),ne=P.length/2,se={};function G(X,K){var H=K._id.charAt(0),Y=F["error_"+H];if(Y&&Y.visible&&(K.type==="linear"||K.type==="log")){for(var q=$(Y),Z={x:0,y:1}[H],ee={x:[0,1,2,3],y:[2,3,0,1]}[H],ae=new Float64Array(4*ne),he=1/0,xe=-1/0,we=0,Me=0;we1?ne[Q]:ne[0]:ne,H=e(se)?se.length>1?se[Q]:se[0]:se,Y=h[K],q=h[H],Z=G?G/.8+1:0,ee=-q*Z-q*.5;$.offset[Q]=[Y*Z/X,ee/X]}}return $}V.exports={style:g,markerStyle:S,markerSelection:M,linePositions:I,errorBarPositions:O,textPosition:D}}}),VA=ze({"src/traces/scattergl/scene_update.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=k._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return k._scene||(l=k._scene={},l.init=function(){p.extendFlat(l,t,e)},l.init(),l.update=function(r){var a=p.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(a),l.scatter2d&&l.scatter2d.update(a),l.line2d&&l.line2d.update(a),l.error2d&&l.error2d.update(a.concat(a)),l.select2d&&l.select2d.update(a),l.glText)for(var o=0;o=m,u=T*2,A={},x,z=M.makeCalcdata(w,"x"),I=C.makeCalcdata(w,"y"),O=l(w,M,"x",z),D=l(w,C,"y",I),B=O.vals,F=D.vals;w._x=B,w._y=F,w.xperiodalignment&&(w._origX=z,w._xStarts=O.starts,w._xEnds=O.ends),w.yperiodalignment&&(w._origY=I,w._yStarts=D.starts,w._yEnds=D.ends);var P=new Array(u),j=new Array(T);for(x=0;x1&&b.extendFlat(_.line,o.linePositions(g,w,S)),_.errorX||_.errorY){var T=o.errorBarPositions(g,w,S,M,C);_.errorX&&b.extendFlat(_.errorX,T.x),_.errorY&&b.extendFlat(_.errorY,T.y)}return _.text&&(b.extendFlat(_.text,{positions:S},o.textPosition(g,w,_.text,_.marker)),b.extendFlat(_.textSel,{positions:S},o.textPosition(g,w,_.text,_.markerSel)),b.extendFlat(_.textUnsel,{positions:S},o.textPosition(g,w,_.text,_.markerUnsel))),_}}}),GA=ze({"src/traces/scattergl/edit_style.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=np().DESELECTDIM;function k(l){var e=l[0],t=e.trace,n=e.t,r=n._scene,a=n.index,o=r.selectBatch[a],s=r.unselectBatch[a],c=r.textOptions[a],m=r.textSelectedOptions[a]||{},h=r.textUnselectedOptions[a]||{},v=p.extendFlat({},c),g,i;if(o.length||s.length){var w=m.color,S=h.color,M=c.color,C=p.isArrayOrTypedArray(M);for(v.color=new Array(t._length),g=0;g10&&/[0-9](?:\s|\/)/.test(k)&&(e=k.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),n=k.match(/([a-z])/ig).join("").toLowerCase());else isNaN(k)?Array.isArray(k)||k.length?(e=[k[0],k[1],k[2]],n="rgb",t=k.length===4?k[3]:1):k instanceof Object&&(k.r!=null||k.red!=null||k.R!=null?(n="rgb",e=[k.r||k.red||k.R||0,k.g||k.green||k.G||0,k.b||k.blue||k.B||0]):(n="hsl",e=[k.h||k.hue||k.H||0,k.s||k.saturation||k.S||0,k.l||k.lightness||k.L||k.b||k.brightness]),t=k.a||k.alpha||k.opacity||1,k.opacity!=null&&(t/=100)):(n="rgb",e=[k>>>16,(k&65280)>>>8,k&255]);return{space:n,values:e,alpha:t}}}}),Qj=ze({"node_modules/color-rgba/index.js"(J,V){"use strict";var p=Jj();V.exports=function(k){Array.isArray(k)&&k.raw&&(k=String.raw.apply(null,arguments));var l,e,t,n=p(k);if(!n.space)return[];var r=[0,0,0],a=n.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(n.values[0],r[0]),a[0]),l[1]=Math.min(Math.max(n.values[1],r[1]),a[1]),l[2]=Math.min(Math.max(n.values[2],r[2]),a[2]),n.space[0]==="h"&&(l=b(l)),l.push(Math.min(Math.max(n.alpha,0),1)),l};function b(E){var k=E[0]/360,l=E[1]/100,e=E[2]/100,t,n,r,a,o,s=0;if(l===0)return o=e*255,[o,o,o];for(n=e<.5?e*(1+l):e+l-e*l,t=2*e-n,a=[0,0,0];s<3;)r=k+1/3*-(s-1),r<0?r++:r>1&&r--,o=6*r<1?t+(n-t)*6*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[s++]=o*255;return a}}}),ay=ze({"node_modules/color-normalize/index.js"(J,V){"use strict";var p=Qj(),b=F2();V.exports=function(l,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var t=b(e),n=new t(4),r=e!=="uint8"&&e!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=p(l),l[0]/=255,l[1]/=255,l[2]/=255),E(l)?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:255,r&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(r?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:1):(n[0]=Math.min(Math.max(Math.floor(l[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(l[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(l[2]*255),0),255),n[3]=l[3]==null?255:Math.min(Math.max(Math.floor(l[3]*255),0),255)),n)};function E(k){return!!(k instanceof Uint8Array||k instanceof Uint8ClampedArray||Array.isArray(k)&&(k[0]>1||k[0]===0)&&(k[1]>1||k[1]===0)&&(k[2]>1||k[2]===0)&&(!k[3]||k[3]>1))}}}),eU=ze({"node_modules/color-id/index.js"(J,V){"use strict";var p=BA();V.exports=b,V.exports.to=b,V.exports.from=E;function b(k,l){l==null&&(l=!0);var e=k[0],t=k[1],n=k[2],r=k[3];r==null&&(r=l?1:255),l&&(e*=255,t*=255,n*=255,r*=255),e=p(e,0,255)&255,t=p(t,0,255)&255,n=p(n,0,255)&255,r=p(r,0,255)&255;var a=e*16777216+(t<<16)+(n<<8)+r;return a}function E(k,l){k=+k;var e=k>>>24,t=(k&16711680)>>>16,n=(k&65280)>>>8,r=k&255;return l===!1?[e,t,n,r]:[e/255,t/255,n/255,r/255]}}}),tU=ze({"node_modules/glslify/browser.js"(J,V){V.exports=function(p){typeof p=="string"&&(p=[p]);for(var b=[].slice.call(arguments,1),E=[],k=0;k[this.tooManyColors?0:_,g.height],pixelRatio:m.context("pixelRatio"),scale:m.prop("scale"),scaleFract:m.prop("scaleFract"),translate:m.prop("translate"),translateFract:m.prop("translateFract"),markerTexture:m.prop("markerTexture"),paletteTexture:g},attributes:{x:(x,z)=>z.xAttr||{buffer:z.positionBuffer,stride:8,offset:0},y:(x,z)=>z.yAttr||{buffer:z.positionBuffer,stride:8,offset:4},xFract:(x,z)=>z.xAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:0},yFract:(x,z)=>z.yAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:4},size:(x,z)=>z.size.length?{buffer:z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(z.size*255/this.maxSize)]},borderSize:(x,z)=>z.borderSize.length?{buffer:z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(z.borderSize*255/this.maxSize)]},colorId:(x,z)=>z.color.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?i.slice(z.color*4,z.color*4+4):[z.color]},borderColorId:(x,z)=>z.borderColor.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?i.slice(z.borderColor*4,z.borderColor*4+4):[z.borderColor]},isActive:(x,z)=>z.activation===!0?{constant:[1]}:z.activation?z.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:m.prop("viewport")},viewport:m.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:m.prop("elements"),count:m.prop("count"),offset:m.prop("offset"),primitive:"points"},u=Object.assign({},f);u.frag=l([`precision highp float; #define GLSLIFY 1 uniform float opacity; @@ -2031,7 +2031,7 @@ void main() { } } -`]),b.vert=s([`precision highp float; +`]),u.vert=l([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; @@ -2099,7 +2099,7 @@ void main() { fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); } -`]),this.drawMarker=g(b);let S=Object.assign({},T);S.frag=s([`precision highp float; +`]),this.drawMarker=m(u);let A=Object.assign({},f);A.frag=l([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor, fragBorderColor; @@ -2130,7 +2130,7 @@ void main() { color.a *= alpha * opacity; gl_FragColor = color; } -`]),S.vert=s([`precision highp float; +`]),A.vert=l([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; @@ -2194,8 +2194,8 @@ void main() { fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } -`]),this.drawCircle=g(S)}d.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},d.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this},d.prototype.draw=function(){for(var g=arguments.length,m=new Array(g),y=0;y{this.drawItem(x)});return this},d.prototype.drawItem=function(g,m){let{groups:y}=this,_=y[g];if(typeof m=="number"&&(g=m,_=y[m],m=null),!(_&&_.count&&_.opacity))return;_.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,_,m));let v=[];for(let x=1;x<_.activation.length;x++)!_.activation[x]||_.activation[x]!==!0&&!_.activation[x].data.length||v.push(...this.getMarkerDrawOptions(x,_,m));v.length&&this.drawMarker(v)},d.prototype.getMarkerDrawOptions=function(g,m,y){let{range:_,tree:v,viewport:x,activation:E,selectionBuffer:M,count:C}=m;if(!v)return y?[Object.assign({},m,{markerTexture:this.markerTextures[g],activation:E[g],count:y.length,elements:y,offset:0})]:[Object.assign({},m,{markerTexture:this.markerTextures[g],activation:E[g],offset:0})];let w=[],k=v.range(_,{lod:!0,px:[(_[2]-_[0])/x.width,(_[3]-_[1])/x.height]});if(y){let b=E[g].data,S=new Uint8Array(C);for(let A=0;A{let T=_[k];if(w===void 0)return T;w===null?w={positions:null}:typeof w=="function"?w={ondraw:w}:typeof w[0]=="number"&&(w={positions:w}),w=l(w,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),w.positions===null&&(w.positions=[]),w.tooManyColors!=null&&(this.tooManyColors=w.tooManyColors),T||(_[k]=T={id:k,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:x.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:x.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:x.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:x.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:x.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},w=Object.assign({},d.defaults,w)),w.positions&&!("marker"in w)&&(w.marker=T.marker,delete T.marker),w.marker&&!("positions"in w)&&(w.positions=T.positions,delete T.positions);let b=0,S=0;if(n(T,w,[{snap:!0,size:(A,F)=>(A==null&&(A=d.defaults.size),b+=A&&A.length?1:0,A),borderSize:(A,F)=>(A==null&&(A=d.defaults.borderSize),b+=A&&A.length?1:0,A),opacity:parseFloat,color:(A,F)=>(A==null&&(A=d.defaults.color),A=this.updateColor(A),S++,A),borderColor:(A,F)=>(A==null&&(A=d.defaults.borderColor),A=this.updateColor(A),S++,A),bounds:(A,F,D)=>("range"in D||(D.range=null),A),positions:(A,F,D)=>{let{snap:R}=F,{positionBuffer:P,positionFractBuffer:z,selectionBuffer:I}=F;if(A.x||A.y)return A.x.length?F.xAttr={buffer:x.buffer(A.x),offset:0,stride:4,count:A.x.length}:F.xAttr={buffer:A.x.buffer,offset:A.x.offset*4||0,stride:(A.x.stride||1)*4,count:A.x.count},A.y.length?F.yAttr={buffer:x.buffer(A.y),offset:0,stride:4,count:A.y.length}:F.yAttr={buffer:A.y.buffer,offset:A.y.offset*4||0,stride:(A.y.stride||1)*4,count:A.y.count},F.count=Math.max(F.xAttr.count,F.yAttr.count),A;A=u(A,"float64");let L=F.count=Math.floor(A.length/2),B=F.bounds=L?a(A,2):null;if(!D.range&&!F.range&&(delete F.range,D.range=B),!D.marker&&!F.marker&&(delete F.marker,D.marker=null),R&&(R===!0||L>R)?F.tree=o(A,{bounds:B}):R&&R.length&&(F.tree=R),F.tree){let $={primitive:"points",usage:"static",data:F.tree,type:"uint32"};F.elements?F.elements($):F.elements=x.elements($)}var O=c.float32(A);P({data:O,usage:"dynamic"});var G=c.fract32(A,O);return z({data:G,usage:"dynamic"}),I({data:new Uint8Array(L),type:"uint8",usage:"stream"}),A}},{marker:(A,F,D)=>{let{activation:R}=F;if(R.forEach(P=>P&&P.destroy&&P.destroy()),R.length=0,!A||typeof A[0]=="number"){let P=this.addMarker(A);R[P]=!0}else{let P=[];for(let z=0,I=Math.min(A.length,F.count);z{let R=F.bounds;if(R)return A||(A=R),F.scale=[1/(A[2]-A[0]),1/(A[3]-A[1])],F.translate=[-A[0],-A[1]],F.scaleFract=c.fract(F.scale),F.translateFract=c.fract(F.translate),A},viewport:A=>f(A||[v.drawingBufferWidth,v.drawingBufferHeight])}]),b){let{count:A,size:F,borderSize:D,sizeBuffer:R}=T,P=new Uint8Array(A*2);if(F.length||D.length)for(let z=0;z=0)return v;let x;if(g instanceof Uint8Array||g instanceof Uint8ClampedArray)x=g;else{x=new Uint8Array(g.length);for(let M=0,C=g.length;M_*4&&(this.tooManyColors=!0),this.updatePalette(y),v.length===1?v[0]:v},d.prototype.updatePalette=function(g){if(this.tooManyColors)return;let{maxColors:m,paletteTexture:y}=this,_=Math.ceil(g.length*.25/m);if(_>1){g=g.slice();for(let v=g.length*.25%m;v<_*m;v++)g.push(0,0,0,0)}y.height<_&&y.resize(m,_),y.subimage({width:Math.min(g.length*.25,m),height:_,data:g},0,0)},d.prototype.destroy=function(){return this.groups.forEach(g=>{g.sizeBuffer.destroy(),g.positionBuffer.destroy(),g.positionFractBuffer.destroy(),g.colorBuffer.destroy(),g.activation.forEach(m=>m&&m.destroy&&m.destroy()),g.selectionBuffer.destroy(),g.elements&&g.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(g=>g&&g.destroy&&g.destroy()),this};var p=function(g,m){var y=new h(g,m),_=y.render.bind(y);return Object.assign(_,{render:_,update:y.update.bind(y),draw:y.draw.bind(y),destroy:y.destroy.bind(y),regl:y.regl,gl:y.gl,canvas:y.gl.canvas,groups:y.groups,markers:y.markerCache,palette:y.palette}),_};r.exports=p}}),ku=ye({"node_modules/object-assign/index.js"(e,r){"use strict";var t=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(l){if(l==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(l)}function s(){try{if(!Object.assign)return!1;var l=new String("abc");if(l[5]="de",Object.getOwnPropertyNames(l)[0]==="5")return!1;for(var n={},u=0;u<10;u++)n["_"+String.fromCharCode(u)]=u;var c=Object.getOwnPropertyNames(n).map(function(h){return n[h]});if(c.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(h){f[h]=h}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}r.exports=s()?Object.assign:function(l,n){for(var u,c=o(l),f,h=1;h80*L){X=J=z[0],Z=N=z[1];for(var V=L;VJ&&(J=H),W>N&&(N=W);U=Math.max(J-X,N-Z),U=U!==0?32767/U:0}return o(G,$,L,X,Z,U,0),$}function a(z,I,L,B,O){var G,$;if(O===P(z,I,L,B)>0)for(G=I;G=I;G-=B)$=F(G,z[G],z[G+1],$);return $&&M($,$.next)&&(D($),$=$.next),$}function i(z,I){if(!z)return z;I||(I=z);var L=z,B;do if(B=!1,!L.steiner&&(M(L,L.next)||E(L.prev,L,L.next)===0)){if(D(L),L=I=L.prev,L===L.next)break;B=!0}else L=L.next;while(B||L!==I);return I}function o(z,I,L,B,O,G,$){if(z){!$&&G&&g(z,B,O,G);for(var X=z,Z,J;z.prev!==z.next;){if(Z=z.prev,J=z.next,G?l(z,B,O,G):s(z)){I.push(Z.i/L|0),I.push(z.i/L|0),I.push(J.i/L|0),D(z),z=J.next,X=J.next;continue}if(z=J,z===X){$?$===1?(z=n(i(z),I,L),o(z,I,L,B,O,G,2)):$===2&&u(z,I,L,B,O,G):o(i(z),I,L,B,O,G,1);break}}}}function s(z){var I=z.prev,L=z,B=z.next;if(E(I,L,B)>=0)return!1;for(var O=I.x,G=L.x,$=B.x,X=I.y,Z=L.y,J=B.y,N=OG?O>$?O:$:G>$?G:$,U=X>Z?X>J?X:J:Z>J?Z:J,V=B.next;V!==I;){if(V.x>=N&&V.x<=W&&V.y>=H&&V.y<=U&&v(O,X,G,Z,$,J,V.x,V.y)&&E(V.prev,V,V.next)>=0)return!1;V=V.next}return!0}function l(z,I,L,B){var O=z.prev,G=z,$=z.next;if(E(O,G,$)>=0)return!1;for(var X=O.x,Z=G.x,J=$.x,N=O.y,H=G.y,W=$.y,U=XZ?X>J?X:J:Z>J?Z:J,q=N>H?N>W?N:W:H>W?H:W,Y=y(U,V,I,L,B),K=y(j,q,I,L,B),re=z.prevZ,se=z.nextZ;re&&re.z>=Y&&se&&se.z<=K;){if(re.x>=U&&re.x<=j&&re.y>=V&&re.y<=q&&re!==O&&re!==$&&v(X,N,Z,H,J,W,re.x,re.y)&&E(re.prev,re,re.next)>=0||(re=re.prevZ,se.x>=U&&se.x<=j&&se.y>=V&&se.y<=q&&se!==O&&se!==$&&v(X,N,Z,H,J,W,se.x,se.y)&&E(se.prev,se,se.next)>=0))return!1;se=se.nextZ}for(;re&&re.z>=Y;){if(re.x>=U&&re.x<=j&&re.y>=V&&re.y<=q&&re!==O&&re!==$&&v(X,N,Z,H,J,W,re.x,re.y)&&E(re.prev,re,re.next)>=0)return!1;re=re.prevZ}for(;se&&se.z<=K;){if(se.x>=U&&se.x<=j&&se.y>=V&&se.y<=q&&se!==O&&se!==$&&v(X,N,Z,H,J,W,se.x,se.y)&&E(se.prev,se,se.next)>=0)return!1;se=se.nextZ}return!0}function n(z,I,L){var B=z;do{var O=B.prev,G=B.next.next;!M(O,G)&&C(O,B,B.next,G)&&b(O,G)&&b(G,O)&&(I.push(O.i/L|0),I.push(B.i/L|0),I.push(G.i/L|0),D(B),D(B.next),B=z=G),B=B.next}while(B!==z);return i(B)}function u(z,I,L,B,O,G){var $=z;do{for(var X=$.next.next;X!==$.prev;){if($.i!==X.i&&x($,X)){var Z=A($,X);$=i($,$.next),Z=i(Z,Z.next),o($,I,L,B,O,G,0),o(Z,I,L,B,O,G,0);return}X=X.next}$=$.next}while($!==z)}function c(z,I,L,B){var O=[],G,$,X,Z,J;for(G=0,$=I.length;G<$;G++)X=I[G]*B,Z=G<$-1?I[G+1]*B:z.length,J=a(z,X,Z,B,!1),J===J.next&&(J.steiner=!0),O.push(_(J));for(O.sort(f),G=0;G=L.next.y&&L.next.y!==L.y){var X=L.x+(O-L.y)*(L.next.x-L.x)/(L.next.y-L.y);if(X<=B&&X>G&&(G=X,$=L.x=L.x&&L.x>=J&&B!==L.x&&v(O$.x||L.x===$.x&&p($,L)))&&($=L,H=W)),L=L.next;while(L!==Z);return $}function p(z,I){return E(z.prev,z,I.prev)<0&&E(I.next,z,z.next)<0}function g(z,I,L,B){var O=z;do O.z===0&&(O.z=y(O.x,O.y,I,L,B)),O.prevZ=O.prev,O.nextZ=O.next,O=O.next;while(O!==z);O.prevZ.nextZ=null,O.prevZ=null,m(O)}function m(z){var I,L,B,O,G,$,X,Z,J=1;do{for(L=z,z=null,G=null,$=0;L;){for($++,B=L,X=0,I=0;I0||Z>0&&B;)X!==0&&(Z===0||!B||L.z<=B.z)?(O=L,L=L.nextZ,X--):(O=B,B=B.nextZ,Z--),G?G.nextZ=O:z=O,O.prevZ=G,G=O;L=B}G.nextZ=null,J*=2}while($>1);return z}function y(z,I,L,B,O){return z=(z-L)*O|0,I=(I-B)*O|0,z=(z|z<<8)&16711935,z=(z|z<<4)&252645135,z=(z|z<<2)&858993459,z=(z|z<<1)&1431655765,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,z|I<<1}function _(z){var I=z,L=z;do(I.x=(z-$)*(G-X)&&(z-$)*(B-X)>=(L-$)*(I-X)&&(L-$)*(G-X)>=(O-$)*(B-X)}function x(z,I){return z.next.i!==I.i&&z.prev.i!==I.i&&!T(z,I)&&(b(z,I)&&b(I,z)&&S(z,I)&&(E(z.prev,z,I.prev)||E(z,I.prev,I))||M(z,I)&&E(z.prev,z,z.next)>0&&E(I.prev,I,I.next)>0)}function E(z,I,L){return(I.y-z.y)*(L.x-I.x)-(I.x-z.x)*(L.y-I.y)}function M(z,I){return z.x===I.x&&z.y===I.y}function C(z,I,L,B){var O=k(E(z,I,L)),G=k(E(z,I,B)),$=k(E(L,B,z)),X=k(E(L,B,I));return!!(O!==G&&$!==X||O===0&&w(z,L,I)||G===0&&w(z,B,I)||$===0&&w(L,z,B)||X===0&&w(L,I,B))}function w(z,I,L){return I.x<=Math.max(z.x,L.x)&&I.x>=Math.min(z.x,L.x)&&I.y<=Math.max(z.y,L.y)&&I.y>=Math.min(z.y,L.y)}function k(z){return z>0?1:z<0?-1:0}function T(z,I){var L=z;do{if(L.i!==z.i&&L.next.i!==z.i&&L.i!==I.i&&L.next.i!==I.i&&C(L,L.next,z,I))return!0;L=L.next}while(L!==z);return!1}function b(z,I){return E(z.prev,z,z.next)<0?E(z,I,z.next)>=0&&E(z,z.prev,I)>=0:E(z,I,z.prev)<0||E(z,z.next,I)<0}function S(z,I){var L=z,B=!1,O=(z.x+I.x)/2,G=(z.y+I.y)/2;do L.y>G!=L.next.y>G&&L.next.y!==L.y&&O<(L.next.x-L.x)*(G-L.y)/(L.next.y-L.y)+L.x&&(B=!B),L=L.next;while(L!==z);return B}function A(z,I){var L=new R(z.i,z.x,z.y),B=new R(I.i,I.x,I.y),O=z.next,G=I.prev;return z.next=I,I.prev=z,L.next=O,O.prev=L,B.next=L,L.prev=B,G.next=B,B.prev=G,B}function F(z,I,L,B){var O=new R(z,I,L);return B?(O.next=B.next,O.prev=B,B.next.prev=O,B.next=O):(O.prev=O,O.next=O),O}function D(z){z.next.prev=z.prev,z.prev.next=z.next,z.prevZ&&(z.prevZ.nextZ=z.nextZ),z.nextZ&&(z.nextZ.prevZ=z.prevZ)}function R(z,I,L){this.i=z,this.x=I,this.y=L,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}t.deviation=function(z,I,L,B){var O=I&&I.length,G=O?I[0]*L:z.length,$=Math.abs(P(z,0,G,L));if(O)for(var X=0,Z=I.length;X0&&(B+=z[O-1].length,L.holes.push(B))}return L}}}),nle=ye({"node_modules/array-normalize/index.js"(e,r){"use strict";var t=Km();r.exports=a;function a(i,o,s){if(!i||i.length==null)throw Error("Argument should be an array");o==null&&(o=1),s==null&&(s=t(i,o));for(var l=0;l-1}}}),JP=ye({"node_modules/es5-ext/string/#/contains/index.js"(e,r){"use strict";r.exports=yle()()?String.prototype.contains:_le()}}),b0=ye({"node_modules/d/index.js"(e,r){"use strict";var t=e1(),a=ZP(),i=DM(),o=KP(),s=JP(),l=r.exports=function(n,u){var c,f,h,d,p;return arguments.length<2||typeof n!="string"?(d=u,u=n,n=null):d=arguments[2],t(n)?(c=s.call(n,"c"),f=s.call(n,"e"),h=s.call(n,"w")):(c=h=!0,f=!1),p={value:u,configurable:c,enumerable:f,writable:h},d?i(o(d),p):p};l.gs=function(n,u,c){var f,h,d,p;return typeof n!="string"?(d=c,c=u,u=n,n=null):d=arguments[3],t(u)?a(u)?t(c)?a(c)||(d=c,c=void 0):c=void 0:(d=u,u=c=void 0):u=void 0,t(n)?(f=s.call(n,"c"),h=s.call(n,"e")):(f=!0,h=!1),p={get:u,set:c,configurable:f,enumerable:h},d?i(o(d),p):p}}}),Vb=ye({"node_modules/es5-ext/function/is-arguments.js"(e,r){"use strict";var t=Object.prototype.toString,a=t.call((function(){return arguments})());r.exports=function(i){return t.call(i)===a}}}),Gb=ye({"node_modules/es5-ext/string/is-string.js"(e,r){"use strict";var t=Object.prototype.toString,a=t.call("");r.exports=function(i){return typeof i=="string"||i&&typeof i=="object"&&(i instanceof String||t.call(i)===a)||!1}}}),xle=ye({"node_modules/ext/global-this/is-implemented.js"(e,r){"use strict";r.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),ble=ye({"node_modules/ext/global-this/implementation.js"(e,r){var t=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};r.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}})()}}),Hb=ye({"node_modules/ext/global-this/index.js"(e,r){"use strict";r.exports=xle()()?globalThis:ble()}}),wle=ye({"node_modules/es6-symbol/is-implemented.js"(e,r){"use strict";var t=Hb(),a={object:!0,symbol:!0};r.exports=function(){var i=t.Symbol,o;if(typeof i!="function")return!1;o=i("test symbol");try{String(o)}catch{return!1}return!(!a[typeof i.iterator]||!a[typeof i.toPrimitive]||!a[typeof i.toStringTag])}}}),Ale=ye({"node_modules/es6-symbol/is-symbol.js"(e,r){"use strict";r.exports=function(t){return t?typeof t=="symbol"?!0:!t.constructor||t.constructor.name!=="Symbol"?!1:t[t.constructor.toStringTag]==="Symbol":!1}}}),QP=ye({"node_modules/es6-symbol/validate-symbol.js"(e,r){"use strict";var t=Ale();r.exports=function(a){if(!t(a))throw new TypeError(a+" is not a symbol");return a}}}),Tle=ye({"node_modules/es6-symbol/lib/private/generate-name.js"(e,r){"use strict";var t=b0(),a=Object.create,i=Object.defineProperty,o=Object.prototype,s=a(null);r.exports=function(l){for(var n=0,u,c;s[l+(n||"")];)++n;return l+=n||"",s[l]=!0,u="@@"+l,i(o,u,t.gs(null,function(f){c||(c=!0,i(this,u,t(f)),c=!1)})),u}}}),Mle=ye({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(e,r){"use strict";var t=b0(),a=Hb().Symbol;r.exports=function(i){return Object.defineProperties(i,{hasInstance:t("",a&&a.hasInstance||i("hasInstance")),isConcatSpreadable:t("",a&&a.isConcatSpreadable||i("isConcatSpreadable")),iterator:t("",a&&a.iterator||i("iterator")),match:t("",a&&a.match||i("match")),replace:t("",a&&a.replace||i("replace")),search:t("",a&&a.search||i("search")),species:t("",a&&a.species||i("species")),split:t("",a&&a.split||i("split")),toPrimitive:t("",a&&a.toPrimitive||i("toPrimitive")),toStringTag:t("",a&&a.toStringTag||i("toStringTag")),unscopables:t("",a&&a.unscopables||i("unscopables"))})}}}),Ele=ye({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(e,r){"use strict";var t=b0(),a=QP(),i=Object.create(null);r.exports=function(o){return Object.defineProperties(o,{for:t(function(s){return i[s]?i[s]:i[s]=o(String(s))}),keyFor:t(function(s){var l;a(s);for(l in i)if(i[l]===s)return l})})}}}),Sle=ye({"node_modules/es6-symbol/polyfill.js"(e,r){"use strict";var t=b0(),a=QP(),i=Hb().Symbol,o=Tle(),s=Mle(),l=Ele(),n=Object.create,u=Object.defineProperties,c=Object.defineProperty,f,h,d;if(typeof i=="function")try{String(i()),d=!0}catch{}else i=null;h=function(g){if(this instanceof h)throw new TypeError("Symbol is not a constructor");return f(g)},r.exports=f=function p(g){var m;if(this instanceof p)throw new TypeError("Symbol is not a constructor");return d?i(g):(m=n(h.prototype),g=g===void 0?"":String(g),u(m,{__description__:t("",g),__name__:t("",o(g))}))},s(f),l(f),u(h.prototype,{constructor:t(f),toString:t("",function(){return this.__name__})}),u(f.prototype,{toString:t(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:t(function(){return a(this)})}),c(f.prototype,f.toPrimitive,t("",function(){var p=a(this);return typeof p=="symbol"?p:p.toString()})),c(f.prototype,f.toStringTag,t("c","Symbol")),c(h.prototype,f.toStringTag,t("c",f.prototype[f.toStringTag])),c(h.prototype,f.toPrimitive,t("c",f.prototype[f.toPrimitive]))}}),jv=ye({"node_modules/es6-symbol/index.js"(e,r){"use strict";r.exports=wle()()?Hb().Symbol:Sle()}}),kle=ye({"node_modules/es5-ext/array/#/clear.js"(e,r){"use strict";var t=x0();r.exports=function(){return t(this).length=0,this}}}),qy=ye({"node_modules/es5-ext/object/valid-callable.js"(e,r){"use strict";r.exports=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");return t}}}),Cle=ye({"node_modules/type/string/coerce.js"(e,r){"use strict";var t=e1(),a=XP(),i=Object.prototype.toString;r.exports=function(o){if(!t(o))return null;if(a(o)){var s=o.toString;if(typeof s!="function"||s===i)return null}try{return""+o}catch{return null}}}}),Dle=ye({"node_modules/type/lib/safe-to-string.js"(e,r){"use strict";r.exports=function(t){try{return t.toString()}catch{try{return String(t)}catch{return null}}}}}),Lle=ye({"node_modules/type/lib/to-short-string.js"(e,r){"use strict";var t=Dle(),a=/[\n\r\u2028\u2029]/g;r.exports=function(i){var o=t(i);return o===null?"":(o.length>100&&(o=o.slice(0,99)+"\u2026"),o=o.replace(a,function(s){switch(s){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),o)}}}),Fle=ye({"node_modules/type/lib/resolve-error-message.js"(e,r){"use strict";var t=Cle(),a=Lle();r.exports=function(i,o,s){s&&s.errorMessage&&(i=t(s.errorMessage));var l=i.indexOf("%v"),n=l>-1?a(o):null;if(s&&s.name){var u=i.indexOf("%n");if(u>-1){if(l>-1){var c,f,h,d;return u>l?(c=n,h=l,f=s.name,d=u):(c=s.name,h=u,f=n,d=l),i.slice(0,h)+c+i.slice(h+2,d)+f+i.slice(d+2)}return i.slice(0,u)+s.name+i.slice(u+2)}}return l>-1?i.slice(0,l)+n+i.slice(l+2):i}}}),eI=ye({"node_modules/type/lib/resolve-exception.js"(e,r){"use strict";var t=e1(),a=Fle();r.exports=function(i,o,s){if(s&&!t(i)){if("default"in s)return s.default;if(s.isOptional)return null}var l=s&&s.Error||TypeError,n=new l(a(o,i,s));throw s&&s.errorCode&&(n.code=s.errorCode),n}}}),Ple=ye({"node_modules/type/value/ensure.js"(e,r){"use strict";var t=eI(),a=e1();r.exports=function(i){if(a(i))return i;var o=arguments[1],s=o&&o.name?"Expected a value for %n, received %v":"Cannot use %v";return t(i,s,o)}}}),Ile=ye({"node_modules/type/plain-function/ensure.js"(e,r){"use strict";var t=eI(),a=ZP();r.exports=function(i){if(a(i))return i;var o=arguments[1],s=o&&o.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return t(i,s,o)}}}),Rle=ye({"node_modules/es5-ext/array/from/is-implemented.js"(e,r){"use strict";r.exports=function(){var t=Array.from,a,i;return typeof t!="function"?!1:(a=["raz","dwa"],i=t(a),!!(i&&i!==a&&i[1]==="dwa"))}}}),zle=ye({"node_modules/es5-ext/function/is-function.js"(e,r){"use strict";var t=Object.prototype.toString,a=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);r.exports=function(i){return typeof i=="function"&&a(t.call(i))}}}),Ble=ye({"node_modules/es5-ext/math/sign/is-implemented.js"(e,r){"use strict";r.exports=function(){var t=Math.sign;return typeof t!="function"?!1:t(10)===1&&t(-20)===-1}}}),Ole=ye({"node_modules/es5-ext/math/sign/shim.js"(e,r){"use strict";r.exports=function(t){return t=Number(t),isNaN(t)||t===0?t:t>0?1:-1}}}),Nle=ye({"node_modules/es5-ext/math/sign/index.js"(e,r){"use strict";r.exports=Ble()()?Math.sign:Ole()}}),jle=ye({"node_modules/es5-ext/number/to-integer.js"(e,r){"use strict";var t=Nle(),a=Math.abs,i=Math.floor;r.exports=function(o){return isNaN(o)?0:(o=Number(o),o===0||!isFinite(o)?o:t(o)*i(a(o)))}}}),Ule=ye({"node_modules/es5-ext/number/to-pos-integer.js"(e,r){"use strict";var t=jle(),a=Math.max;r.exports=function(i){return a(0,t(i))}}}),qle=ye({"node_modules/es5-ext/array/from/shim.js"(e,r){"use strict";var t=jv().iterator,a=Vb(),i=zle(),o=Ule(),s=qy(),l=x0(),n=Nv(),u=Gb(),c=Array.isArray,f=Function.prototype.call,h={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;r.exports=function(p){var g=arguments[1],m=arguments[2],y,_,v,x,E,M,C,w,k,T;if(p=Object(l(p)),n(g)&&s(g),!this||this===Array||!i(this)){if(!g){if(a(p))return E=p.length,E!==1?Array.apply(null,p):(x=new Array(1),x[0]=p[0],x);if(c(p)){for(x=new Array(E=p.length),_=0;_=55296&&M<=56319&&(T+=p[++_])),T=g?f.call(g,m,T,v):T,y?(h.value=T,d(x,v,h)):x[v]=T,++v;E=v}}if(E===void 0)for(E=o(p.length),y&&(x=new y(E)),_=0;_=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){u(this,"__redo__",s("c",[h]));return}this.__redo__.forEach(function(d,p){d>=h&&(this.__redo__[p]=++d)},this),this.__redo__.push(h)}}),_onDelete:s(function(h){var d;h>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(d=this.__redo__.indexOf(h),d!==-1&&this.__redo__.splice(d,1),this.__redo__.forEach(function(p,g){p>h&&(this.__redo__[g]=--p)},this)))}),_onClear:s(function(){this.__redo__&&t.call(this.__redo__),this.__nextIndex__=0})}))),u(f.prototype,n.iterator,s(function(){return this}))}}),Xle=ye({"node_modules/es6-iterator/array.js"(e,r){"use strict";var t=CM(),a=JP(),i=b0(),o=jv(),s=tI(),l=Object.defineProperty,n;n=r.exports=function(u,c){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");s.call(this,u),c?a.call(c,"key+value")?c="key+value":a.call(c,"key")?c="key":c="value":c="value",l(this,"__kind__",i("",c))},t&&t(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_resolve:i(function(u){return this.__kind__==="value"?this.__list__[u]:this.__kind__==="key+value"?[u,this.__list__[u]]:u})}),l(n.prototype,o.toStringTag,i("c","Array Iterator"))}}),Zle=ye({"node_modules/es6-iterator/string.js"(e,r){"use strict";var t=CM(),a=b0(),i=jv(),o=tI(),s=Object.defineProperty,l;l=r.exports=function(n){if(!(this instanceof l))throw new TypeError("Constructor requires 'new'");n=String(n),o.call(this,n),s(this,"__length__",a("",n.length))},t&&t(l,o),delete l.prototype.constructor,l.prototype=Object.create(o.prototype,{_next:a(function(){if(this.__list__){if(this.__nextIndex__=55296&&c<=56319?u+this.__list__[this.__nextIndex__++]:u)})}),s(l.prototype,i.toStringTag,a("c","String Iterator"))}}),Kle=ye({"node_modules/es6-iterator/is-iterable.js"(e,r){"use strict";var t=Vb(),a=Nv(),i=Gb(),o=jv().iterator,s=Array.isArray;r.exports=function(l){return a(l)?s(l)||i(l)||t(l)?!0:typeof l[o]=="function":!1}}}),Jle=ye({"node_modules/es6-iterator/valid-iterable.js"(e,r){"use strict";var t=Kle();r.exports=function(a){if(!t(a))throw new TypeError(a+" is not iterable");return a}}}),rI=ye({"node_modules/es6-iterator/get.js"(e,r){"use strict";var t=Vb(),a=Gb(),i=Xle(),o=Zle(),s=Jle(),l=jv().iterator;r.exports=function(n){return typeof s(n)[l]=="function"?n[l]():t(n)?new i(n):a(n)?new o(n):new i(n)}}}),Qle=ye({"node_modules/es6-iterator/for-of.js"(e,r){"use strict";var t=Vb(),a=qy(),i=Gb(),o=rI(),s=Array.isArray,l=Function.prototype.call,n=Array.prototype.some;r.exports=function(u,c){var f,h=arguments[2],d,p,g,m,y,_,v;if(s(u)||t(u)?f="array":i(u)?f="string":u=o(u),a(c),p=function(){g=!0},f==="array"){n.call(u,function(x){return l.call(c,h,x,p),g});return}if(f==="string"){for(y=u.length,m=0;m=55296&&v<=56319&&(_+=u[++m])),l.call(c,h,_,p),!g);++m);return}for(d=u.next();!d.done;){if(l.call(c,h,d.value,p),g)return;d=u.next()}}}}),eue=ye({"node_modules/es6-weak-map/is-native-implemented.js"(e,r){"use strict";r.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()}}),tue=ye({"node_modules/es6-weak-map/polyfill.js"(e,r){"use strict";var t=Nv(),a=CM(),i=ule(),o=x0(),s=cle(),l=b0(),n=rI(),u=Qle(),c=jv().toStringTag,f=eue(),h=Array.isArray,d=Object.defineProperty,p=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf,m;r.exports=m=function(){var y=arguments[0],_;if(!(this instanceof m))throw new TypeError("Constructor requires 'new'");return _=f&&a&&WeakMap!==m?a(new WeakMap,g(this)):this,t(y)&&(h(y)||(y=n(y))),d(_,"__weakMapData__",l("c","$weakMap$"+s())),y&&u(y,function(v){o(v),_.set(v[0],v[1])}),_},f&&(a&&a(m,WeakMap),m.prototype=Object.create(WeakMap.prototype,{constructor:l(m)})),Object.defineProperties(m.prototype,{delete:l(function(y){return p.call(i(y),this.__weakMapData__)?(delete y[this.__weakMapData__],!0):!1}),get:l(function(y){if(p.call(i(y),this.__weakMapData__))return y[this.__weakMapData__]}),has:l(function(y){return p.call(i(y),this.__weakMapData__)}),set:l(function(y,_){return d(i(y),this.__weakMapData__,l("c",_)),this}),toString:l(function(){return"[object WeakMap]"})}),d(m.prototype,c,l("c","WeakMap"))}}),aI=ye({"node_modules/es6-weak-map/index.js"(e,r){"use strict";r.exports=ole()()?WeakMap:tue()}}),rue=ye({"node_modules/array-find-index/index.js"(e,r){"use strict";r.exports=function(t,a,i){if(typeof Array.prototype.findIndex=="function")return t.findIndex(a,i);if(typeof a!="function")throw new TypeError("predicate must be a function");var o=Object(t),s=o.length;if(s===0)return-1;for(var l=0;l{this.drawItem(w)});return this},s.prototype.drawItem=function(m,h){let{groups:v}=this,g=v[m];if(typeof h=="number"&&(m=h,g=v[h],h=null),!(g&&g.count&&g.opacity))return;g.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,g,h));let i=[];for(let w=1;w{let f=g[T];if(_===void 0)return f;_===null?_={positions:null}:typeof _=="function"?_={ondraw:_}:typeof _[0]=="number"&&(_={positions:_}),_=e(_,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),_.positions===null&&(_.positions=[]),_.tooManyColors!=null&&(this.tooManyColors=_.tooManyColors),f||(g[T]=f={id:T,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:w.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},_=Object.assign({},s.defaults,_)),_.positions&&!("marker"in _)&&(_.marker=f.marker,delete f.marker),_.marker&&!("positions"in _)&&(_.positions=f.positions,delete f.positions);let u=0,A=0;if(t(f,_,[{snap:!0,size:(x,z)=>(x==null&&(x=s.defaults.size),u+=x&&x.length?1:0,x),borderSize:(x,z)=>(x==null&&(x=s.defaults.borderSize),u+=x&&x.length?1:0,x),opacity:parseFloat,color:(x,z)=>(x==null&&(x=s.defaults.color),x=this.updateColor(x),A++,x),borderColor:(x,z)=>(x==null&&(x=s.defaults.borderColor),x=this.updateColor(x),A++,x),bounds:(x,z,I)=>("range"in I||(I.range=null),x),positions:(x,z,I)=>{let{snap:O}=z,{positionBuffer:D,positionFractBuffer:B,selectionBuffer:F}=z;if(x.x||x.y)return x.x.length?z.xAttr={buffer:w.buffer(x.x),offset:0,stride:4,count:x.x.length}:z.xAttr={buffer:x.x.buffer,offset:x.x.offset*4||0,stride:(x.x.stride||1)*4,count:x.x.count},x.y.length?z.yAttr={buffer:w.buffer(x.y),offset:0,stride:4,count:x.y.length}:z.yAttr={buffer:x.y.buffer,offset:x.y.offset*4||0,stride:(x.y.stride||1)*4,count:x.y.count},z.count=Math.max(z.xAttr.count,z.yAttr.count),x;x=n(x,"float64");let P=z.count=Math.floor(x.length/2),j=z.bounds=P?b(x,2):null;if(!I.range&&!z.range&&(delete z.range,I.range=j),!I.marker&&!z.marker&&(delete z.marker,I.marker=null),O&&(O===!0||P>O)?z.tree=k(x,{bounds:j}):O&&O.length&&(z.tree=O),z.tree){let Q={primitive:"points",usage:"static",data:z.tree,type:"uint32"};z.elements?z.elements(Q):z.elements=w.elements(Q)}var U=r.float32(x);D({data:U,usage:"dynamic"});var $=r.fract32(x,U);return B({data:$,usage:"dynamic"}),F({data:new Uint8Array(P),type:"uint8",usage:"stream"}),x}},{marker:(x,z,I)=>{let{activation:O}=z;if(O.forEach(D=>D&&D.destroy&&D.destroy()),O.length=0,!x||typeof x[0]=="number"){let D=this.addMarker(x);O[D]=!0}else{let D=[];for(let B=0,F=Math.min(x.length,z.count);B{let O=z.bounds;if(O)return x||(x=O),z.scale=[1/(x[2]-x[0]),1/(x[3]-x[1])],z.translate=[-x[0],-x[1]],z.scaleFract=r.fract(z.scale),z.translateFract=r.fract(z.translate),x},viewport:x=>a(x||[i.drawingBufferWidth,i.drawingBufferHeight])}]),u){let{count:x,size:z,borderSize:I,sizeBuffer:O}=f,D=new Uint8Array(x*2);if(z.length||I.length)for(let B=0;B=0)return i;let w;if(m instanceof Uint8Array||m instanceof Uint8ClampedArray)w=m;else{w=new Uint8Array(m.length);for(let M=0,C=m.length;Mg*4&&(this.tooManyColors=!0),this.updatePalette(v),i.length===1?i[0]:i},s.prototype.updatePalette=function(m){if(this.tooManyColors)return;let{maxColors:h,paletteTexture:v}=this,g=Math.ceil(m.length*.25/h);if(g>1){m=m.slice();for(let i=m.length*.25%h;i{m.sizeBuffer.destroy(),m.positionBuffer.destroy(),m.positionFractBuffer.destroy(),m.colorBuffer.destroy(),m.activation.forEach(h=>h&&h.destroy&&h.destroy()),m.selectionBuffer.destroy(),m.elements&&m.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(m=>m&&m.destroy&&m.destroy()),this};var c=function(m,h){var v=new o(m,h),g=v.render.bind(v);return Object.assign(g,{render:g,update:v.update.bind(v),draw:v.draw.bind(v),destroy:v.destroy.bind(v),regl:v.regl,gl:v.gl,canvas:v.gl.canvas,groups:v.groups,markers:v.markerCache,palette:v.palette}),g};V.exports=c}}),Vc=ze({"node_modules/object-assign/index.js"(J,V){"use strict";var p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function k(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function l(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(o){a[o]=o}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}V.exports=l()?Object.assign:function(e,t){for(var n,r=k(e),a,o=1;o80*P){re=se=B[0],ne=G=B[1];for(var Y=P;Yse&&(se=X),K>G&&(G=K);H=Math.max(se-re,G-ne),H=H!==0?32767/H:0}return k($,Q,P,re,ne,H,0),Q}function b(B,F,P,j,U){var $,Q;if(U===D(B,F,P,j)>0)for($=F;$=F;$-=j)Q=z($,B[$],B[$+1],Q);return Q&&M(Q,Q.next)&&(I(Q),Q=Q.next),Q}function E(B,F){if(!B)return B;F||(F=B);var P=B,j;do if(j=!1,!P.steiner&&(M(P,P.next)||S(P.prev,P,P.next)===0)){if(I(P),P=F=P.prev,P===P.next)break;j=!0}else P=P.next;while(j||P!==F);return F}function k(B,F,P,j,U,$,Q){if(B){!Q&&$&&m(B,j,U,$);for(var re=B,ne,se;B.prev!==B.next;){if(ne=B.prev,se=B.next,$?e(B,j,U,$):l(B)){F.push(ne.i/P|0),F.push(B.i/P|0),F.push(se.i/P|0),I(B),B=se.next,re=se.next;continue}if(B=se,B===re){Q?Q===1?(B=t(E(B),F,P),k(B,F,P,j,U,$,2)):Q===2&&n(B,F,P,j,U,$):k(E(B),F,P,j,U,$,1);break}}}}function l(B){var F=B.prev,P=B,j=B.next;if(S(F,P,j)>=0)return!1;for(var U=F.x,$=P.x,Q=j.x,re=F.y,ne=P.y,se=j.y,G=U<$?U$?U>Q?U:Q:$>Q?$:Q,H=re>ne?re>se?re:se:ne>se?ne:se,Y=j.next;Y!==F;){if(Y.x>=G&&Y.x<=K&&Y.y>=X&&Y.y<=H&&i(U,re,$,ne,Q,se,Y.x,Y.y)&&S(Y.prev,Y,Y.next)>=0)return!1;Y=Y.next}return!0}function e(B,F,P,j){var U=B.prev,$=B,Q=B.next;if(S(U,$,Q)>=0)return!1;for(var re=U.x,ne=$.x,se=Q.x,G=U.y,X=$.y,K=Q.y,H=rene?re>se?re:se:ne>se?ne:se,Z=G>X?G>K?G:K:X>K?X:K,ee=v(H,Y,F,P,j),ae=v(q,Z,F,P,j),he=B.prevZ,xe=B.nextZ;he&&he.z>=ee&&xe&&xe.z<=ae;){if(he.x>=H&&he.x<=q&&he.y>=Y&&he.y<=Z&&he!==U&&he!==Q&&i(re,G,ne,X,se,K,he.x,he.y)&&S(he.prev,he,he.next)>=0||(he=he.prevZ,xe.x>=H&&xe.x<=q&&xe.y>=Y&&xe.y<=Z&&xe!==U&&xe!==Q&&i(re,G,ne,X,se,K,xe.x,xe.y)&&S(xe.prev,xe,xe.next)>=0))return!1;xe=xe.nextZ}for(;he&&he.z>=ee;){if(he.x>=H&&he.x<=q&&he.y>=Y&&he.y<=Z&&he!==U&&he!==Q&&i(re,G,ne,X,se,K,he.x,he.y)&&S(he.prev,he,he.next)>=0)return!1;he=he.prevZ}for(;xe&&xe.z<=ae;){if(xe.x>=H&&xe.x<=q&&xe.y>=Y&&xe.y<=Z&&xe!==U&&xe!==Q&&i(re,G,ne,X,se,K,xe.x,xe.y)&&S(xe.prev,xe,xe.next)>=0)return!1;xe=xe.nextZ}return!0}function t(B,F,P){var j=B;do{var U=j.prev,$=j.next.next;!M(U,$)&&C(U,j,j.next,$)&&u(U,$)&&u($,U)&&(F.push(U.i/P|0),F.push(j.i/P|0),F.push($.i/P|0),I(j),I(j.next),j=B=$),j=j.next}while(j!==B);return E(j)}function n(B,F,P,j,U,$){var Q=B;do{for(var re=Q.next.next;re!==Q.prev;){if(Q.i!==re.i&&w(Q,re)){var ne=x(Q,re);Q=E(Q,Q.next),ne=E(ne,ne.next),k(Q,F,P,j,U,$,0),k(ne,F,P,j,U,$,0);return}re=re.next}Q=Q.next}while(Q!==B)}function r(B,F,P,j){var U=[],$,Q,re,ne,se;for($=0,Q=F.length;$=P.next.y&&P.next.y!==P.y){var re=P.x+(U-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(re<=j&&re>$&&($=re,Q=P.x=P.x&&P.x>=se&&j!==P.x&&i(UQ.x||P.x===Q.x&&c(Q,P)))&&(Q=P,X=K)),P=P.next;while(P!==ne);return Q}function c(B,F){return S(B.prev,B,F.prev)<0&&S(F.next,B,B.next)<0}function m(B,F,P,j){var U=B;do U.z===0&&(U.z=v(U.x,U.y,F,P,j)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==B);U.prevZ.nextZ=null,U.prevZ=null,h(U)}function h(B){var F,P,j,U,$,Q,re,ne,se=1;do{for(P=B,B=null,$=null,Q=0;P;){for(Q++,j=P,re=0,F=0;F0||ne>0&&j;)re!==0&&(ne===0||!j||P.z<=j.z)?(U=P,P=P.nextZ,re--):(U=j,j=j.nextZ,ne--),$?$.nextZ=U:B=U,U.prevZ=$,$=U;P=j}$.nextZ=null,se*=2}while(Q>1);return B}function v(B,F,P,j,U){return B=(B-P)*U|0,F=(F-j)*U|0,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,B|F<<1}function g(B){var F=B,P=B;do(F.x=(B-Q)*($-re)&&(B-Q)*(j-re)>=(P-Q)*(F-re)&&(P-Q)*($-re)>=(U-Q)*(j-re)}function w(B,F){return B.next.i!==F.i&&B.prev.i!==F.i&&!f(B,F)&&(u(B,F)&&u(F,B)&&A(B,F)&&(S(B.prev,B,F.prev)||S(B,F.prev,F))||M(B,F)&&S(B.prev,B,B.next)>0&&S(F.prev,F,F.next)>0)}function S(B,F,P){return(F.y-B.y)*(P.x-F.x)-(F.x-B.x)*(P.y-F.y)}function M(B,F){return B.x===F.x&&B.y===F.y}function C(B,F,P,j){var U=T(S(B,F,P)),$=T(S(B,F,j)),Q=T(S(P,j,B)),re=T(S(P,j,F));return!!(U!==$&&Q!==re||U===0&&_(B,P,F)||$===0&&_(B,j,F)||Q===0&&_(P,B,j)||re===0&&_(P,F,j))}function _(B,F,P){return F.x<=Math.max(B.x,P.x)&&F.x>=Math.min(B.x,P.x)&&F.y<=Math.max(B.y,P.y)&&F.y>=Math.min(B.y,P.y)}function T(B){return B>0?1:B<0?-1:0}function f(B,F){var P=B;do{if(P.i!==B.i&&P.next.i!==B.i&&P.i!==F.i&&P.next.i!==F.i&&C(P,P.next,B,F))return!0;P=P.next}while(P!==B);return!1}function u(B,F){return S(B.prev,B,B.next)<0?S(B,F,B.next)>=0&&S(B,B.prev,F)>=0:S(B,F,B.prev)<0||S(B,B.next,F)<0}function A(B,F){var P=B,j=!1,U=(B.x+F.x)/2,$=(B.y+F.y)/2;do P.y>$!=P.next.y>$&&P.next.y!==P.y&&U<(P.next.x-P.x)*($-P.y)/(P.next.y-P.y)+P.x&&(j=!j),P=P.next;while(P!==B);return j}function x(B,F){var P=new O(B.i,B.x,B.y),j=new O(F.i,F.x,F.y),U=B.next,$=F.prev;return B.next=F,F.prev=B,P.next=U,U.prev=P,j.next=P,P.prev=j,$.next=j,j.prev=$,j}function z(B,F,P,j){var U=new O(B,F,P);return j?(U.next=j.next,U.prev=j,j.next.prev=U,j.next=U):(U.prev=U,U.next=U),U}function I(B){B.next.prev=B.prev,B.prev.next=B.next,B.prevZ&&(B.prevZ.nextZ=B.nextZ),B.nextZ&&(B.nextZ.prevZ=B.prevZ)}function O(B,F,P){this.i=B,this.x=F,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}p.deviation=function(B,F,P,j){var U=F&&F.length,$=U?F[0]*P:B.length,Q=Math.abs(D(B,0,$,P));if(U)for(var re=0,ne=F.length;re0&&(j+=B[U-1].length,P.holes.push(j))}return P}}}),aU=ze({"node_modules/array-normalize/index.js"(J,V){"use strict";var p=c0();V.exports=b;function b(E,k,l){if(!E||E.length==null)throw Error("Argument should be an array");k==null&&(k=1),l==null&&(l=p(E,k));for(var e=0;e-1}}}),eM=ze({"node_modules/es5-ext/string/#/contains/index.js"(J,V){"use strict";V.exports=mU()()?String.prototype.contains:gU()}}),pp=ze({"node_modules/d/index.js"(J,V){"use strict";var p=d0(),b=JA(),E=N2(),k=QA(),l=eM(),e=V.exports=function(t,n){var r,a,o,s,c;return arguments.length<2||typeof t!="string"?(s=n,n=t,t=null):s=arguments[2],p(t)?(r=l.call(t,"c"),a=l.call(t,"e"),o=l.call(t,"w")):(r=o=!0,a=!1),c={value:n,configurable:r,enumerable:a,writable:o},s?E(k(s),c):c};e.gs=function(t,n,r){var a,o,s,c;return typeof t!="string"?(s=r,r=n,n=t,t=null):s=arguments[3],p(n)?b(n)?p(r)?b(r)||(s=r,r=void 0):r=void 0:(s=n,n=r=void 0):n=void 0,p(t)?(a=l.call(t,"c"),o=l.call(t,"e")):(a=!0,o=!1),c={get:n,set:r,configurable:a,enumerable:o},s?E(k(s),c):c}}}),ny=ze({"node_modules/es5-ext/function/is-arguments.js"(J,V){"use strict";var p=Object.prototype.toString,b=p.call(function(){return arguments}());V.exports=function(E){return p.call(E)===b}}}),iy=ze({"node_modules/es5-ext/string/is-string.js"(J,V){"use strict";var p=Object.prototype.toString,b=p.call("");V.exports=function(E){return typeof E=="string"||E&&typeof E=="object"&&(E instanceof String||p.call(E)===b)||!1}}}),yU=ze({"node_modules/ext/global-this/is-implemented.js"(J,V){"use strict";V.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),_U=ze({"node_modules/ext/global-this/implementation.js"(J,V){var p=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};V.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return p()}try{return __global__||p()}finally{delete Object.prototype.__global__}}()}}),oy=ze({"node_modules/ext/global-this/index.js"(J,V){"use strict";V.exports=yU()()?globalThis:_U()}}),xU=ze({"node_modules/es6-symbol/is-implemented.js"(J,V){"use strict";var p=oy(),b={object:!0,symbol:!0};V.exports=function(){var E=p.Symbol,k;if(typeof E!="function")return!1;k=E("test symbol");try{String(k)}catch{return!1}return!(!b[typeof E.iterator]||!b[typeof E.toPrimitive]||!b[typeof E.toStringTag])}}}),bU=ze({"node_modules/es6-symbol/is-symbol.js"(J,V){"use strict";V.exports=function(p){return p?typeof p=="symbol"?!0:!p.constructor||p.constructor.name!=="Symbol"?!1:p[p.constructor.toStringTag]==="Symbol":!1}}}),tM=ze({"node_modules/es6-symbol/validate-symbol.js"(J,V){"use strict";var p=bU();V.exports=function(b){if(!p(b))throw new TypeError(b+" is not a symbol");return b}}}),wU=ze({"node_modules/es6-symbol/lib/private/generate-name.js"(J,V){"use strict";var p=pp(),b=Object.create,E=Object.defineProperty,k=Object.prototype,l=b(null);V.exports=function(e){for(var t=0,n,r;l[e+(t||"")];)++t;return e+=t||"",l[e]=!0,n="@@"+e,E(k,n,p.gs(null,function(a){r||(r=!0,E(this,n,p(a)),r=!1)})),n}}}),TU=ze({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(J,V){"use strict";var p=pp(),b=oy().Symbol;V.exports=function(E){return Object.defineProperties(E,{hasInstance:p("",b&&b.hasInstance||E("hasInstance")),isConcatSpreadable:p("",b&&b.isConcatSpreadable||E("isConcatSpreadable")),iterator:p("",b&&b.iterator||E("iterator")),match:p("",b&&b.match||E("match")),replace:p("",b&&b.replace||E("replace")),search:p("",b&&b.search||E("search")),species:p("",b&&b.species||E("species")),split:p("",b&&b.split||E("split")),toPrimitive:p("",b&&b.toPrimitive||E("toPrimitive")),toStringTag:p("",b&&b.toStringTag||E("toStringTag")),unscopables:p("",b&&b.unscopables||E("unscopables"))})}}}),AU=ze({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(J,V){"use strict";var p=pp(),b=tM(),E=Object.create(null);V.exports=function(k){return Object.defineProperties(k,{for:p(function(l){return E[l]?E[l]:E[l]=k(String(l))}),keyFor:p(function(l){var e;b(l);for(e in E)if(E[e]===l)return e})})}}}),MU=ze({"node_modules/es6-symbol/polyfill.js"(J,V){"use strict";var p=pp(),b=tM(),E=oy().Symbol,k=wU(),l=TU(),e=AU(),t=Object.create,n=Object.defineProperties,r=Object.defineProperty,a,o,s;if(typeof E=="function")try{String(E()),s=!0}catch{}else E=null;o=function(m){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return a(m)},V.exports=a=function c(m){var h;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?E(m):(h=t(o.prototype),m=m===void 0?"":String(m),n(h,{__description__:p("",m),__name__:p("",k(m))}))},l(a),e(a),n(o.prototype,{constructor:p(a),toString:p("",function(){return this.__name__})}),n(a.prototype,{toString:p(function(){return"Symbol ("+b(this).__description__+")"}),valueOf:p(function(){return b(this)})}),r(a.prototype,a.toPrimitive,p("",function(){var c=b(this);return typeof c=="symbol"?c:c.toString()})),r(a.prototype,a.toStringTag,p("c","Symbol")),r(o.prototype,a.toStringTag,p("c",a.prototype[a.toStringTag])),r(o.prototype,a.toPrimitive,p("c",a.prototype[a.toPrimitive]))}}),Tv=ze({"node_modules/es6-symbol/index.js"(J,V){"use strict";V.exports=xU()()?oy().Symbol:MU()}}),SU=ze({"node_modules/es5-ext/array/#/clear.js"(J,V){"use strict";var p=dp();V.exports=function(){return p(this).length=0,this}}}),_g=ze({"node_modules/es5-ext/object/valid-callable.js"(J,V){"use strict";V.exports=function(p){if(typeof p!="function")throw new TypeError(p+" is not a function");return p}}}),EU=ze({"node_modules/type/string/coerce.js"(J,V){"use strict";var p=d0(),b=KA(),E=Object.prototype.toString;V.exports=function(k){if(!p(k))return null;if(b(k)){var l=k.toString;if(typeof l!="function"||l===E)return null}try{return""+k}catch{return null}}}}),kU=ze({"node_modules/type/lib/safe-to-string.js"(J,V){"use strict";V.exports=function(p){try{return p.toString()}catch{try{return String(p)}catch{return null}}}}}),CU=ze({"node_modules/type/lib/to-short-string.js"(J,V){"use strict";var p=kU(),b=/[\n\r\u2028\u2029]/g;V.exports=function(E){var k=p(E);return k===null?"":(k.length>100&&(k=k.slice(0,99)+"\u2026"),k=k.replace(b,function(l){switch(l){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),k)}}}),LU=ze({"node_modules/type/lib/resolve-error-message.js"(J,V){"use strict";var p=EU(),b=CU();V.exports=function(E,k,l){l&&l.errorMessage&&(E=p(l.errorMessage));var e=E.indexOf("%v"),t=e>-1?b(k):null;if(l&&l.name){var n=E.indexOf("%n");if(n>-1){if(e>-1){var r,a,o,s;return n>e?(r=t,o=e,a=l.name,s=n):(r=l.name,o=n,a=t,s=e),E.slice(0,o)+r+E.slice(o+2,s)+a+E.slice(s+2)}return E.slice(0,n)+l.name+E.slice(n+2)}}return e>-1?E.slice(0,e)+t+E.slice(e+2):E}}}),rM=ze({"node_modules/type/lib/resolve-exception.js"(J,V){"use strict";var p=d0(),b=LU();V.exports=function(E,k,l){if(l&&!p(E)){if("default"in l)return l.default;if(l.isOptional)return null}var e=l&&l.Error||TypeError,t=new e(b(k,E,l));throw l&&l.errorCode&&(t.code=l.errorCode),t}}}),PU=ze({"node_modules/type/value/ensure.js"(J,V){"use strict";var p=rM(),b=d0();V.exports=function(E){if(b(E))return E;var k=arguments[1],l=k&&k.name?"Expected a value for %n, received %v":"Cannot use %v";return p(E,l,k)}}}),RU=ze({"node_modules/type/plain-function/ensure.js"(J,V){"use strict";var p=rM(),b=JA();V.exports=function(E){if(b(E))return E;var k=arguments[1],l=k&&k.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return p(E,l,k)}}}),IU=ze({"node_modules/es5-ext/array/from/is-implemented.js"(J,V){"use strict";V.exports=function(){var p=Array.from,b,E;return typeof p!="function"?!1:(b=["raz","dwa"],E=p(b),!!(E&&E!==b&&E[1]==="dwa"))}}}),DU=ze({"node_modules/es5-ext/function/is-function.js"(J,V){"use strict";var p=Object.prototype.toString,b=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);V.exports=function(E){return typeof E=="function"&&b(p.call(E))}}}),FU=ze({"node_modules/es5-ext/math/sign/is-implemented.js"(J,V){"use strict";V.exports=function(){var p=Math.sign;return typeof p!="function"?!1:p(10)===1&&p(-20)===-1}}}),zU=ze({"node_modules/es5-ext/math/sign/shim.js"(J,V){"use strict";V.exports=function(p){return p=Number(p),isNaN(p)||p===0?p:p>0?1:-1}}}),BU=ze({"node_modules/es5-ext/math/sign/index.js"(J,V){"use strict";V.exports=FU()()?Math.sign:zU()}}),OU=ze({"node_modules/es5-ext/number/to-integer.js"(J,V){"use strict";var p=BU(),b=Math.abs,E=Math.floor;V.exports=function(k){return isNaN(k)?0:(k=Number(k),k===0||!isFinite(k)?k:p(k)*E(b(k)))}}}),NU=ze({"node_modules/es5-ext/number/to-pos-integer.js"(J,V){"use strict";var p=OU(),b=Math.max;V.exports=function(E){return b(0,p(E))}}}),jU=ze({"node_modules/es5-ext/array/from/shim.js"(J,V){"use strict";var p=Tv().iterator,b=ny(),E=DU(),k=NU(),l=_g(),e=dp(),t=wv(),n=iy(),r=Array.isArray,a=Function.prototype.call,o={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;V.exports=function(c){var m=arguments[1],h=arguments[2],v,g,i,w,S,M,C,_,T,f;if(c=Object(e(c)),t(m)&&l(m),!this||this===Array||!E(this)){if(!m){if(b(c))return S=c.length,S!==1?Array.apply(null,c):(w=new Array(1),w[0]=c[0],w);if(r(c)){for(w=new Array(S=c.length),g=0;g=55296&&M<=56319&&(f+=c[++g])),f=m?a.call(m,h,f,i):f,v?(o.value=f,s(w,i,o)):w[i]=f,++i;S=i}}if(S===void 0)for(S=k(c.length),v&&(w=new v(S)),g=0;g=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){n(this,"__redo__",l("c",[o]));return}this.__redo__.forEach(function(s,c){s>=o&&(this.__redo__[c]=++s)},this),this.__redo__.push(o)}}),_onDelete:l(function(o){var s;o>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(o),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,m){c>o&&(this.__redo__[m]=--c)},this)))}),_onClear:l(function(){this.__redo__&&p.call(this.__redo__),this.__nextIndex__=0})}))),n(a.prototype,t.iterator,l(function(){return this}))}}),YU=ze({"node_modules/es6-iterator/array.js"(J,V){"use strict";var p=O2(),b=eM(),E=pp(),k=Tv(),l=aM(),e=Object.defineProperty,t;t=V.exports=function(n,r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");l.call(this,n),r?b.call(r,"key+value")?r="key+value":b.call(r,"key")?r="key":r="value":r="value",e(this,"__kind__",E("",r))},p&&p(t,l),delete t.prototype.constructor,t.prototype=Object.create(l.prototype,{_resolve:E(function(n){return this.__kind__==="value"?this.__list__[n]:this.__kind__==="key+value"?[n,this.__list__[n]]:n})}),e(t.prototype,k.toStringTag,E("c","Array Iterator"))}}),XU=ze({"node_modules/es6-iterator/string.js"(J,V){"use strict";var p=O2(),b=pp(),E=Tv(),k=aM(),l=Object.defineProperty,e;e=V.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),k.call(this,t),l(this,"__length__",b("",t.length))},p&&p(e,k),delete e.prototype.constructor,e.prototype=Object.create(k.prototype,{_next:b(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?n+this.__list__[this.__nextIndex__++]:n)})}),l(e.prototype,E.toStringTag,b("c","String Iterator"))}}),ZU=ze({"node_modules/es6-iterator/is-iterable.js"(J,V){"use strict";var p=ny(),b=wv(),E=iy(),k=Tv().iterator,l=Array.isArray;V.exports=function(e){return b(e)?l(e)||E(e)||p(e)?!0:typeof e[k]=="function":!1}}}),$U=ze({"node_modules/es6-iterator/valid-iterable.js"(J,V){"use strict";var p=ZU();V.exports=function(b){if(!p(b))throw new TypeError(b+" is not iterable");return b}}}),nM=ze({"node_modules/es6-iterator/get.js"(J,V){"use strict";var p=ny(),b=iy(),E=YU(),k=XU(),l=$U(),e=Tv().iterator;V.exports=function(t){return typeof l(t)[e]=="function"?t[e]():p(t)?new E(t):b(t)?new k(t):new E(t)}}}),KU=ze({"node_modules/es6-iterator/for-of.js"(J,V){"use strict";var p=ny(),b=_g(),E=iy(),k=nM(),l=Array.isArray,e=Function.prototype.call,t=Array.prototype.some;V.exports=function(n,r){var a,o=arguments[2],s,c,m,h,v,g,i;if(l(n)||p(n)?a="array":E(n)?a="string":n=k(n),b(r),c=function(){m=!0},a==="array"){t.call(n,function(w){return e.call(r,o,w,c),m});return}if(a==="string"){for(v=n.length,h=0;h=55296&&i<=56319&&(g+=n[++h])),e.call(r,o,g,c),!m);++h);return}for(s=n.next();!s.done;){if(e.call(r,o,s.value,c),m)return;s=n.next()}}}}),JU=ze({"node_modules/es6-weak-map/is-native-implemented.js"(J,V){"use strict";V.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),QU=ze({"node_modules/es6-weak-map/polyfill.js"(J,V){"use strict";var p=wv(),b=O2(),E=sU(),k=dp(),l=lU(),e=pp(),t=nM(),n=KU(),r=Tv().toStringTag,a=JU(),o=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf,h;V.exports=h=function(){var v=arguments[0],g;if(!(this instanceof h))throw new TypeError("Constructor requires 'new'");return g=a&&b&&WeakMap!==h?b(new WeakMap,m(this)):this,p(v)&&(o(v)||(v=t(v))),s(g,"__weakMapData__",e("c","$weakMap$"+l())),v&&n(v,function(i){k(i),g.set(i[0],i[1])}),g},a&&(b&&b(h,WeakMap),h.prototype=Object.create(WeakMap.prototype,{constructor:e(h)})),Object.defineProperties(h.prototype,{delete:e(function(v){return c.call(E(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:e(function(v){if(c.call(E(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:e(function(v){return c.call(E(v),this.__weakMapData__)}),set:e(function(v,g){return s(E(v),this.__weakMapData__,e("c",g)),this}),toString:e(function(){return"[object WeakMap]"})}),s(h.prototype,r,e("c","WeakMap"))}}),iM=ze({"node_modules/es6-weak-map/index.js"(J,V){"use strict";V.exports=nU()()?WeakMap:QU()}}),eq=ze({"node_modules/array-find-index/index.js"(J,V){"use strict";V.exports=function(p,b,E){if(typeof Array.prototype.findIndex=="function")return p.findIndex(b,E);if(typeof b!="function")throw new TypeError("predicate must be a function");var k=Object(p),l=k.length;if(l===0)return-1;for(var e=0;eS.join==="round"?2:1,miterLimit:E.prop("miterLimit"),scale:E.prop("scale"),scaleFract:E.prop("scaleFract"),translateFract:E.prop("translateFract"),translate:E.prop("translate"),thickness:E.prop("thickness"),dashTexture:E.prop("dashTexture"),opacity:E.prop("opacity"),pixelRatio:E.context("pixelRatio"),id:E.prop("id"),dashLength:E.prop("dashLength"),viewport:(b,S)=>[S.viewport.x,S.viewport.y,b.viewportWidth,b.viewportHeight],depth:E.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:(b,S)=>!S.overlay},stencil:{enable:!1},scissor:{enable:!0,box:E.prop("viewport")},viewport:E.prop("viewport")},w=E(i({vert:p,frag:g,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:E.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:E.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:E.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},C)),k;try{k=E(i({cull:{enable:!0,face:"back"},vert:_,frag:v,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:E.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:E.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},C))}catch{k=w}return{fill:E({primitive:"triangle",elements:(b,S)=>S.triangles,offset:0,vert:m,frag:y,uniforms:{scale:E.prop("scale"),color:E.prop("fill"),scaleFract:E.prop("scaleFract"),translateFract:E.prop("translateFract"),translate:E.prop("translate"),opacity:E.prop("opacity"),pixelRatio:E.context("pixelRatio"),id:E.prop("id"),viewport:(b,S)=>[S.viewport.x,S.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{position:{buffer:E.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:E.prop("positionFractBuffer"),stride:8,offset:8}},blend:C.blend,depth:{enable:!1},scissor:C.scissor,stencil:C.stencil,viewport:C.viewport}),rect:w,miter:k}},x.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},x.prototype.render=function(...E){E.length&&this.update(...E),this.draw()},x.prototype.draw=function(...E){return(E.length?E:this.passes).forEach((M,C)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>x.precisionThreshold||M.scale[1]*M.viewport.height>x.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=x.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},x.prototype.update=function(E){if(!E)return;E.length!=null?typeof E[0]=="number"&&(E=[{positions:E}]):Array.isArray(E)||(E=[E]);let{regl:M,gl:C}=this;if(E.forEach((k,T)=>{let b=this.passes[T];if(k!==void 0){if(k===null){this.passes[T]=null;return}if(typeof k[0]=="number"&&(k={positions:k}),k=o(k,{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"}),b||(this.passes[T]=b={id:T,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},k=i({},x.defaults,k)),k.thickness!=null&&(b.thickness=parseFloat(k.thickness)),k.opacity!=null&&(b.opacity=parseFloat(k.opacity)),k.miterLimit!=null&&(b.miterLimit=parseFloat(k.miterLimit)),k.overlay!=null&&(b.overlay=!!k.overlay,TZ-J),G=[],$=0,X=b.hole!=null?b.hole[0]:null;if(X!=null){let Z=d(O,J=>J>=X);O=O.slice(0,Z),O.push(X)}for(let Z=0;ZW-X+(O[Z]-$)),H=l(J,N);H=H.map(W=>W+$+(W+${E.colorBuffer.destroy(),E.positionBuffer.destroy(),E.dashTexture.destroy()}),this.passes.length=0,this}}}),aue=ye({"node_modules/regl-error2d/index.js"(e,r){"use strict";var t=Km(),a=qb(),i=GP(),o=Wp(),s=ku(),l=Jm(),{float32:n,fract32:u}=kM();r.exports=f;var c=[[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 f(h,d){if(typeof h=="function"?(d||(d={}),d.regl=h):d=h,d.length&&(d.positions=d),h=d.regl,!h.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let p=h._gl,g,m,y,_,v,x,E={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return _=h.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),m=h.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),y=h.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=h.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),x=h.buffer({usage:"static",type:"float",data:c}),T(d),g=h({vert:` +`;V.exports=w;function w(S,M){if(!(this instanceof w))return new w(S,M);if(typeof S=="function"?(M||(M={}),M.regl=S):M=S,M.length&&(M.positions=M),S=M.regl,!S.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=S._gl,this.regl=S,this.passes=[],this.shaders=w.shaders.has(S)?w.shaders.get(S):w.shaders.set(S,w.createShaders(S)).get(S),this.update(M)}w.dashMult=2,w.maxPatternLength=256,w.precisionThreshold=3e6,w.maxPoints=1e4,w.maxLines=2048,w.shaders=new a,w.createShaders=function(S){let M=S.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),C={primitive:"triangle strip",instances:S.prop("count"),count:4,offset:0,uniforms:{miterMode:(u,A)=>A.join==="round"?2:1,miterLimit:S.prop("miterLimit"),scale:S.prop("scale"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),thickness:S.prop("thickness"),dashTexture:S.prop("dashTexture"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),dashLength:S.prop("dashLength"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight],depth:S.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,A)=>!A.overlay},stencil:{enable:!1},scissor:{enable:!0,box:S.prop("viewport")},viewport:S.prop("viewport")},_=S(E({vert:c,frag:m,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},C)),T;try{T=S(E({cull:{enable:!0,face:"back"},vert:g,frag:i,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:S.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},C))}catch{T=_}return{fill:S({primitive:"triangle",elements:(u,A)=>A.triangles,offset:0,vert:h,frag:v,uniforms:{scale:S.prop("scale"),color:S.prop("fill"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:S.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8}},blend:C.blend,depth:{enable:!1},scissor:C.scissor,stencil:C.stencil,viewport:C.viewport}),rect:_,miter:T}},w.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},w.prototype.render=function(...S){S.length&&this.update(...S),this.draw()},w.prototype.draw=function(...S){return(S.length?S:this.passes).forEach((M,C)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>w.precisionThreshold||M.scale[1]*M.viewport.height>w.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=w.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},w.prototype.update=function(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let{regl:M,gl:C}=this;if(S.forEach((T,f)=>{let u=this.passes[f];if(T!==void 0){if(T===null){this.passes[f]=null;return}if(typeof T[0]=="number"&&(T={positions:T}),T=k(T,{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[f]=u={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},T=E({},w.defaults,T)),T.thickness!=null&&(u.thickness=parseFloat(T.thickness)),T.opacity!=null&&(u.opacity=parseFloat(T.opacity)),T.miterLimit!=null&&(u.miterLimit=parseFloat(T.miterLimit)),T.overlay!=null&&(u.overlay=!!T.overlay,fne-se),$=[],Q=0,re=u.hole!=null?u.hole[0]:null;if(re!=null){let ne=s(U,se=>se>=re);U=U.slice(0,ne),U.push(re)}for(let ne=0;neK-re+(U[ne]-Q)),X=e(se,G);X=X.map(K=>K+Q+(K+Q{S.colorBuffer.destroy(),S.positionBuffer.destroy(),S.dashTexture.destroy()}),this.passes.length=0,this}}}),tq=ze({"node_modules/regl-error2d/index.js"(J,V){"use strict";var p=c0(),b=ay(),E=WA(),k=qd(),l=Vc(),e=f0(),{float32:t,fract32:n}=B2();V.exports=a;var r=[[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 a(o,s){if(typeof o=="function"?(s||(s={}),s.regl=o):s=o,s.length&&(s.positions=s),o=s.regl,!o.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=o._gl,m,h,v,g,i,w,S={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return g=o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),h=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),w=o.buffer({usage:"static",type:"float",data:r}),f(s),m=o({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2615,10 +2615,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:h.prop("range"),lineWidth:h.prop("lineWidth"),capSize:h.prop("capSize"),opacity:h.prop("opacity"),scale:h.prop("scale"),translate:h.prop("translate"),scaleFract:h.prop("scaleFract"),translateFract:h.prop("translateFract"),viewport:(S,A)=>[A.viewport.x,A.viewport.y,S.viewportWidth,S.viewportHeight]},attributes:{color:{buffer:_,offset:(S,A)=>A.offset*4,divisor:1},position:{buffer:m,offset:(S,A)=>A.offset*8,divisor:1},positionFract:{buffer:y,offset:(S,A)=>A.offset*8,divisor:1},error:{buffer:v,offset:(S,A)=>A.offset*16,divisor:1},direction:{buffer:x,stride:24,offset:0},lineOffset:{buffer:x,stride:24,offset:8},capOffset:{buffer:x,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:h.prop("viewport")},viewport:h.prop("viewport"),stencil:!1,instances:h.prop("count"),count:c.length}),s(C,{update:T,draw:w,destroy:b,regl:h,gl:p,canvas:p.canvas,groups:M}),C;function C(S){S?T(S):S===null&&b(),w()}function w(S){if(typeof S=="number")return k(S);S&&!Array.isArray(S)&&(S=[S]),h._refresh(),M.forEach((A,F)=>{if(A){if(S&&(S[F]?A.draw=!0:A.draw=!1),!A.draw){A.draw=!0;return}k(F)}})}function k(S){typeof S=="number"&&(S=M[S]),S!=null&&S&&S.count&&S.color&&S.opacity&&S.positions&&S.positions.length>1&&(S.scaleRatio=[S.scale[0]*S.viewport.width,S.scale[1]*S.viewport.height],g(S),S.after&&S.after(S))}function T(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let A=0,F=0;if(C.groups=M=S.map((P,z)=>{let I=M[z];if(P)typeof P=="function"?P={after:P}:typeof P[0]=="number"&&(P={positions:P});else return I;return P=o(P,{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"}),I||(M[z]=I={id:z,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},P=s({},E,P)),i(I,P,[{lineWidth:L=>+L*.5,capSize:L=>+L*.5,opacity:parseFloat,errors:L=>(L=l(L),F+=L.length,L),positions:(L,B)=>(L=l(L,"float64"),B.count=Math.floor(L.length/2),B.bounds=t(L,2),B.offset=A,A+=B.count,L)},{color:(L,B)=>{let O=B.count;if(L||(L="transparent"),!Array.isArray(L)||typeof L[0]=="number"){let $=L;L=Array(O);for(let X=0;X{let G=B.bounds;return L||(L=G),B.scale=[1/(L[2]-L[0]),1/(L[3]-L[1])],B.translate=[-L[0],-L[1]],B.scaleFract=u(B.scale),B.translateFract=u(B.translate),L},viewport:L=>{let B;return Array.isArray(L)?B={x:L[0],y:L[1],width:L[2]-L[0],height:L[3]-L[1]}:L?(B={x:L.x||L.left||0,y:L.y||L.top||0},L.right?B.width=L.right-B.x:B.width=L.w||L.width||0,L.bottom?B.height=L.bottom-B.y:B.height=L.h||L.height||0):B={x:0,y:0,width:p.drawingBufferWidth,height:p.drawingBufferHeight},B}}]),I}),A||F){let P=M.reduce((B,O,G)=>B+(O?O.count:0),0),z=new Float64Array(P*2),I=new Uint8Array(P*4),L=new Float32Array(P*4);M.forEach((B,O)=>{if(!B)return;let{positions:G,count:$,offset:X,color:Z,errors:J}=B;$&&(I.set(Z,X*4),L.set(J,X*4),z.set(G,X*2))});var D=n(z);m(D);var R=u(z,D);y(R),_(I),v(L)}}function b(){m.destroy(),y.destroy(),_.destroy(),v.destroy(),x.destroy()}}}}),iue=ye({"node_modules/unquote/index.js"(e,r){var t=/[\'\"]/;r.exports=function(i){return i?(t.test(i.charAt(0))&&(i=i.substr(1)),t.test(i.charAt(i.length-1))&&(i=i.substr(0,i.length-1)),i):""}}}),nI=ye({"node_modules/css-global-keywords/index.json"(e,r){r.exports=["inherit","initial","unset"]}}),oI=ye({"node_modules/css-system-font-keywords/index.json"(e,r){r.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),sI=ye({"node_modules/css-font-weight-keywords/index.json"(e,r){r.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),lI=ye({"node_modules/css-font-style-keywords/index.json"(e,r){r.exports=["normal","italic","oblique"]}}),uI=ye({"node_modules/css-font-stretch-keywords/index.json"(e,r){r.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),nue=ye({"node_modules/parenthesis/index.js"(e,r){"use strict";function t(o,s){if(typeof o!="string")return[o];var l=[o];typeof s=="string"||Array.isArray(s)?s={brackets:s}:s||(s={});var n=s.brackets?Array.isArray(s.brackets)?s.brackets:[s.brackets]:["{}","[]","()"],u=s.escape||"___",c=!!s.flat;n.forEach(function(d){var p=new RegExp(["\\",d[0],"[^\\",d[0],"\\",d[1],"]*\\",d[1]].join("")),g=[];function m(y,_,v){var x=l.push(y.slice(d[0].length,-d[1].length))-1;return g.push(x),u+x+u}l.forEach(function(y,_){for(var v,x=0;y!=v;)if(v=y,y=y.replace(p,m),x++>1e4)throw Error("References have circular dependency. Please, check them.");l[_]=y}),g=g.reverse(),l=l.map(function(y){return g.forEach(function(_){y=y.replace(new RegExp("(\\"+u+_+"\\"+u+")","g"),d[0]+"$1"+d[1])}),y})});var f=new RegExp("\\"+u+"([0-9]+)\\"+u);function h(d,p,g){for(var m=[],y,_=0;y=f.exec(d);){if(_++>1e4)throw Error("Circular references in parenthesis");m.push(d.slice(0,y.index)),m.push(h(p[y[1]],p)),d=d.slice(y.index+y[0].length)}return m.push(d),m}return c?l:h(l[0],l)}function a(o,s){if(s&&s.flat){var l=s&&s.escape||"___",n=o[0],u;if(!n)return"";for(var c=new RegExp("\\"+l+"([0-9]+)\\"+l),f=0;n!=u;){if(f++>1e4)throw Error("Circular references in "+o);u=n,n=n.replace(c,h)}return n}return o.reduce(function d(p,g){return Array.isArray(g)&&(g=g.reduce(d,"")),p+g},"");function h(d,p){if(o[p]==null)throw Error("Reference "+p+"is undefined");return o[p]}}function i(o,s){return Array.isArray(o)?a(o,s):t(o,s)}i.parse=t,i.stringify=a,r.exports=i}}),oue=ye({"node_modules/string-split-by/index.js"(e,r){"use strict";var t=nue();r.exports=function(i,o,s){if(i==null)throw Error("First argument should be a string");if(o==null)throw Error("Separator should be a string or a RegExp");s?(typeof s=="string"||Array.isArray(s))&&(s={ignore:s}):s={},s.escape==null&&(s.escape=!0),s.ignore==null?s.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof s.ignore=="string"&&(s.ignore=[s.ignore]),s.ignore=s.ignore.map(function(p){return p.length===1&&(p=p+p),p}));var l=t.parse(i,{flat:!0,brackets:s.ignore}),n=l[0],u=n.split(o);if(s.escape){for(var c=[],f=0;f1&&nr===fr&&(nr==='"'||nr==="'"))return['"'+n(xt.substr(1,xt.length-2))+'"'];var Or=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(xt);if(Or)return u(xt.substr(0,Or.index)).concat(u(Or[1])).concat(u(xt.substr(Or.index+Or[0].length)));var Xr=xt.split(".");if(Xr.length===1)return['"'+n(xt)+'"'];for(var aa=[],Wr=0;Wr"u"?1:window.devicePixelRatio,Na=!1,Ji={},ki=function(Ir){},ii=function(){};if(typeof nr=="string"?fr=document.querySelector(nr):typeof nr=="object"&&(x(nr)?fr=nr:E(nr)?(aa=nr,Xr=aa.canvas):("gl"in nr?aa=nr.gl:"canvas"in nr?Xr=C(nr.canvas):"container"in nr&&(Or=C(nr.container)),"attributes"in nr&&(Wr=nr.attributes),"extensions"in nr&&(wa=M(nr.extensions)),"optionalExtensions"in nr&&(za=M(nr.optionalExtensions)),"onDone"in nr&&(ki=nr.onDone),"profile"in nr&&(Na=!!nr.profile),"pixelRatio"in nr&&(Ba=+nr.pixelRatio),"cachedCode"in nr&&(Ji=nr.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?Xr=fr:Or=fr),!aa){if(!Xr){var ma=_(Or||document.body,ki,Ba);if(!ma)return null;Xr=ma.canvas,ii=ma.onDestroy}Wr.premultipliedAlpha===void 0&&(Wr.premultipliedAlpha=!0),aa=v(Xr,Wr)}return aa?{gl:aa,canvas:Xr,container:Or,extensions:wa,optionalExtensions:za,pixelRatio:Ba,profile:Na,cachedCode:Ji,onDone:ki,onDestroy:ii}:(ii(),ki("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function k(xt,nr){var fr={};function Or(Wr){var wa=Wr.toLowerCase(),za;try{za=fr[wa]=xt.getExtension(wa)}catch{}return!!za}for(var Xr=0;Xr65535)<<4,xt>>>=nr,fr=(xt>255)<<3,xt>>>=fr,nr|=fr,fr=(xt>15)<<2,xt>>>=fr,nr|=fr,fr=(xt>3)<<1,xt>>>=fr,nr|=fr,nr|xt>>1}function L(){var xt=T(8,function(){return[]});function nr(aa){var Wr=z(aa),wa=xt[I(Wr)>>2];return wa.length>0?wa.pop():new ArrayBuffer(Wr)}function fr(aa){xt[I(aa.byteLength)>>2].push(aa)}function Or(aa,Wr){var wa=null;switch(aa){case b:wa=new Int8Array(nr(Wr),0,Wr);break;case S:wa=new Uint8Array(nr(Wr),0,Wr);break;case A:wa=new Int16Array(nr(2*Wr),0,Wr);break;case F:wa=new Uint16Array(nr(2*Wr),0,Wr);break;case D:wa=new Int32Array(nr(4*Wr),0,Wr);break;case R:wa=new Uint32Array(nr(4*Wr),0,Wr);break;case P:wa=new Float32Array(nr(4*Wr),0,Wr);break;default:return null}return wa.length!==Wr?wa.subarray(0,Wr):wa}function Xr(aa){fr(aa.buffer)}return{alloc:nr,free:fr,allocType:Or,freeType:Xr}}var B=L();B.zero=L();var O=3408,G=3410,$=3411,X=3412,Z=3413,J=3414,N=3415,H=33901,W=33902,U=3379,V=3386,j=34921,q=36347,Y=36348,K=35661,re=35660,se=34930,le=36349,ue=34076,fe=34024,pe=7936,we=7937,xe=7938,he=35724,oe=34047,te=36063,ie=34852,ee=3553,ce=34067,_e=34069,Se=33984,Me=6408,Ue=5126,Ge=5121,Ze=36160,Ke=36053,dt=36064,_t=16384,Pt=function(xt,nr){var fr=1;nr.ext_texture_filter_anisotropic&&(fr=xt.getParameter(oe));var Or=1,Xr=1;nr.webgl_draw_buffers&&(Or=xt.getParameter(ie),Xr=xt.getParameter(te));var aa=!!nr.oes_texture_float;if(aa){var Wr=xt.createTexture();xt.bindTexture(ee,Wr),xt.texImage2D(ee,0,Me,1,1,0,Me,Ue,null);var wa=xt.createFramebuffer();if(xt.bindFramebuffer(Ze,wa),xt.framebufferTexture2D(Ze,dt,ee,Wr,0),xt.bindTexture(ee,null),xt.checkFramebufferStatus(Ze)!==Ke)aa=!1;else{xt.viewport(0,0,1,1),xt.clearColor(1,0,0,1),xt.clear(_t);var za=B.allocType(Ue,4);xt.readPixels(0,0,1,1,Me,Ue,za),xt.getError()?aa=!1:(xt.deleteFramebuffer(wa),xt.deleteTexture(Wr),aa=za[0]===1),B.freeType(za)}}var Ba=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Na=!0;if(!Ba){var Ji=xt.createTexture(),ki=B.allocType(Ge,36);xt.activeTexture(Se),xt.bindTexture(ce,Ji),xt.texImage2D(_e,0,Me,3,3,0,Me,Ge,ki),B.freeType(ki),xt.bindTexture(ce,null),xt.deleteTexture(Ji),Na=!xt.getError()}return{colorBits:[xt.getParameter(G),xt.getParameter($),xt.getParameter(X),xt.getParameter(Z)],depthBits:xt.getParameter(J),stencilBits:xt.getParameter(N),subpixelBits:xt.getParameter(O),extensions:Object.keys(nr).filter(function(ii){return!!nr[ii]}),maxAnisotropic:fr,maxDrawbuffers:Or,maxColorAttachments:Xr,pointSizeDims:xt.getParameter(H),lineWidthDims:xt.getParameter(W),maxViewportDims:xt.getParameter(V),maxCombinedTextureUnits:xt.getParameter(K),maxCubeMapSize:xt.getParameter(ue),maxRenderbufferSize:xt.getParameter(fe),maxTextureUnits:xt.getParameter(se),maxTextureSize:xt.getParameter(U),maxAttributes:xt.getParameter(j),maxVertexUniforms:xt.getParameter(q),maxVertexTextureUnits:xt.getParameter(re),maxVaryingVectors:xt.getParameter(Y),maxFragmentUniforms:xt.getParameter(le),glsl:xt.getParameter(he),renderer:xt.getParameter(we),vendor:xt.getParameter(pe),version:xt.getParameter(xe),readFloat:aa,npotTextureCube:Na}},pt=function(xt){return xt instanceof Uint8Array||xt instanceof Uint16Array||xt instanceof Uint32Array||xt instanceof Int8Array||xt instanceof Int16Array||xt instanceof Int32Array||xt instanceof Float32Array||xt instanceof Float64Array||xt instanceof Uint8ClampedArray};function Tt(xt){return!!xt&&typeof xt=="object"&&Array.isArray(xt.shape)&&Array.isArray(xt.stride)&&typeof xt.offset=="number"&&xt.shape.length===xt.stride.length&&(Array.isArray(xt.data)||pt(xt.data))}var st=function(xt){return Object.keys(xt).map(function(nr){return xt[nr]})},Ve={shape:Ce,flatten:De};function Ye(xt,nr,fr){for(var Or=0;Or0){var an;if(Array.isArray(fa[0])){oi=kt(fa);for(var Aa=1,ga=1;ga0){if(typeof Aa[0]=="number"){var $a=B.allocType(Ta.dtype,Aa.length);la($a,Aa),oi($a,wi),B.freeType($a)}else if(Array.isArray(Aa[0])||pt(Aa[0])){ri=kt(Aa);var Ja=Dt(Aa,ri,Ta.dtype);oi(Ja,wi),B.freeType(Ja)}}}else if(Tt(Aa)){ri=Aa.shape;var Ai=Aa.stride,nn=0,Ln=0,fi=0,zi=0;ri.length===1?(nn=ri[0],Ln=1,fi=Ai[0],zi=0):ri.length===2&&(nn=ri[0],Ln=ri[1],fi=Ai[0],zi=Ai[1]);var Sn=Array.isArray(Aa.data)?Ta.dtype:Fr(Aa.data),kn=B.allocType(Sn,nn*Ln);Hr(kn,Aa.data,nn,Ln,fi,zi,Aa.offset),oi(kn,wi),B.freeType(kn)}return hi}return Pa||hi(Ir),hi._reglType="buffer",hi._buffer=Ta,hi.subdata=an,fr.profile&&(hi.stats=Ta.stats),hi.destroy=function(){ki(Ta)},hi}function ma(){st(aa).forEach(function(Ir){Ir.buffer=xt.createBuffer(),xt.bindBuffer(Ir.type,Ir.buffer),xt.bufferData(Ir.type,Ir.persistentData||Ir.byteLength,Ir.usage)})}return fr.profile&&(nr.getTotalBufferSize=function(){var Ir=0;return Object.keys(aa).forEach(function(fa){Ir+=aa[fa].stats.size}),Ir}),{create:ii,createStream:za,destroyStream:Ba,clear:function(){st(aa).forEach(ki),wa.forEach(ki)},getBuffer:function(Ir){return Ir&&Ir._buffer instanceof Wr?Ir._buffer:null},restore:ma,_initBuffer:Ji}}var Oa=0,Da=0,_i=1,ti=1,Ka=4,ia=4,na={points:Oa,point:Da,lines:_i,line:ti,triangles:Ka,triangle:ia,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},xi=0,Yi=1,Qr=4,Nr=5120,Oe=5121,Ie=5122,Et=5123,Mt=5124,zt=5125,Gt=34963,Ht=35040,Be=35044;function et(xt,nr,fr,Or){var Xr={},aa=0,Wr={uint8:Oe,uint16:Et};nr.oes_element_index_uint&&(Wr.uint32=zt);function wa(ma){this.id=aa++,Xr[this.id]=this,this.buffer=ma,this.primType=Qr,this.vertCount=0,this.type=0}wa.prototype.bind=function(){this.buffer.bind()};var za=[];function Ba(ma){var Ir=za.pop();return Ir||(Ir=new wa(fr.create(null,Gt,!0,!1)._buffer)),Ji(Ir,ma,Ht,-1,-1,0,0),Ir}function Na(ma){za.push(ma)}function Ji(ma,Ir,fa,Pa,Ha,Ta,hi){ma.buffer.bind();var oi;if(Ir){var an=hi;!hi&&(!pt(Ir)||Tt(Ir)&&!pt(Ir.data))&&(an=nr.oes_element_index_uint?zt:Et),fr._initBuffer(ma.buffer,Ir,fa,an,3)}else xt.bufferData(Gt,Ta,fa),ma.buffer.dtype=oi||Oe,ma.buffer.usage=fa,ma.buffer.dimension=3,ma.buffer.byteLength=Ta;if(oi=hi,!hi){switch(ma.buffer.dtype){case Oe:case Nr:oi=Oe;break;case Et:case Ie:oi=Et;break;case zt:case Mt:oi=zt;break;default:}ma.buffer.dtype=oi}ma.type=oi;var Aa=Ha;Aa<0&&(Aa=ma.buffer.byteLength,oi===Et?Aa>>=1:oi===zt&&(Aa>>=2)),ma.vertCount=Aa;var ga=Pa;if(Pa<0){ga=Qr;var wi=ma.buffer.dimension;wi===1&&(ga=xi),wi===2&&(ga=Yi),wi===3&&(ga=Qr)}ma.primType=ga}function ki(ma){Or.elementsCount--,delete Xr[ma.id],ma.buffer.destroy(),ma.buffer=null}function ii(ma,Ir){var fa=fr.create(null,Gt,!0),Pa=new wa(fa._buffer);Or.elementsCount++;function Ha(Ta){if(!Ta)fa(),Pa.primType=Qr,Pa.vertCount=0,Pa.type=Oe;else if(typeof Ta=="number")fa(Ta),Pa.primType=Qr,Pa.vertCount=Ta|0,Pa.type=Oe;else{var hi=null,oi=Be,an=-1,Aa=-1,ga=0,wi=0;Array.isArray(Ta)||pt(Ta)||Tt(Ta)?hi=Ta:("data"in Ta&&(hi=Ta.data),"usage"in Ta&&(oi=St[Ta.usage]),"primitive"in Ta&&(an=na[Ta.primitive]),"count"in Ta&&(Aa=Ta.count|0),"type"in Ta&&(wi=Wr[Ta.type]),"length"in Ta?ga=Ta.length|0:(ga=Aa,wi===Et||wi===Ie?ga*=2:(wi===zt||wi===Mt)&&(ga*=4))),Ji(Pa,hi,oi,an,Aa,ga,wi)}return Ha}return Ha(ma),Ha._reglType="elements",Ha._elements=Pa,Ha.subdata=function(Ta,hi){return fa.subdata(Ta,hi),Ha},Ha.destroy=function(){ki(Pa)},Ha}return{create:ii,createStream:Ba,destroyStream:Na,getElements:function(ma){return typeof ma=="function"&&ma._elements instanceof wa?ma._elements:null},clear:function(){st(Xr).forEach(ki)}}}var ut=new Float32Array(1),bt=new Uint32Array(ut.buffer),Ot=5123;function It(xt){for(var nr=B.allocType(Ot,xt.length),fr=0;fr>>31<<15,aa=(Or<<1>>>24)-127,Wr=Or>>13&1023;if(aa<-24)nr[fr]=Xr;else if(aa<-14){var wa=-14-aa;nr[fr]=Xr+(Wr+1024>>wa)}else aa>15?nr[fr]=Xr+31744:nr[fr]=Xr+(aa+15<<10)+Wr}return nr}function Wt(xt){return Array.isArray(xt)||pt(xt)}var jt=34467,sr=3553,kr=34067,Mr=34069,ua=6408,ra=6406,ni=6407,Ca=6409,Li=6410,Va=32854,dn=32855,rn=36194,pa=32819,_n=32820,Zi=33635,Fi=34042,xn=6402,Ni=34041,un=35904,jn=35906,bn=36193,Wa=33776,ui=33777,Hi=33778,Vi=33779,$n=35986,ro=35987,Un=34798,Kn=35840,To=35841,Jn=35842,qn=35843,Fo=36196,zn=5121,wn=5123,os=5125,uo=5126,Yn=10242,go=10243,Cn=10497,Xo=33071,gs=33648,yo=10240,sl=10241,ss=9728,oo=9729,Bn=9984,An=9985,Po=9986,Bl=9987,Lu=33170,Jl=4352,Fu=4353,Pu=4354,Ku=34046,mu=3317,$c=37440,Ju=37441,Ol=37443,Yc=37444,Qu=33984,Sl=[Bn,Po,An,Bl],cs=[0,Ca,Li,ni,ua],Qo={};Qo[Ca]=Qo[ra]=Qo[xn]=1,Qo[Ni]=Qo[Li]=2,Qo[ni]=Qo[un]=3,Qo[ua]=Qo[jn]=4;function ml(xt){return"[object "+xt+"]"}var Xc=ml("HTMLCanvasElement"),Zc=ml("OffscreenCanvas"),kc=ml("CanvasRenderingContext2D"),ed=ml("ImageBitmap"),td=ml("HTMLImageElement"),bp=ml("HTMLVideoElement"),t0=Object.keys(Fe).concat([Xc,Zc,kc,ed,td,bp]),ec=[];ec[zn]=1,ec[uo]=4,ec[bn]=2,ec[wn]=2,ec[os]=4;var ys=[];ys[Va]=2,ys[dn]=2,ys[rn]=2,ys[Ni]=4,ys[Wa]=.5,ys[ui]=.5,ys[Hi]=1,ys[Vi]=1,ys[$n]=.5,ys[ro]=1,ys[Un]=1,ys[Kn]=.5,ys[To]=.25,ys[Jn]=.5,ys[qn]=.25,ys[Fo]=.5;function rd(xt){return Array.isArray(xt)&&(xt.length===0||typeof xt[0]=="number")}function Hf(xt){if(!Array.isArray(xt))return!1;var nr=xt.length;return!(nr===0||!Wt(xt[0]))}function Kc(xt){return Object.prototype.toString.call(xt)}function ad(xt){return Kc(xt)===Xc}function Jc(xt){return Kc(xt)===Zc}function Tf(xt){return Kc(xt)===kc}function tc(xt){return Kc(xt)===ed}function Wf(xt){return Kc(xt)===td}function xh(xt){return Kc(xt)===bp}function Qc(xt){if(!xt)return!1;var nr=Kc(xt);return t0.indexOf(nr)>=0?!0:rd(xt)||Hf(xt)||Tt(xt)}function Wd(xt){return Fe[Object.prototype.toString.call(xt)]|0}function bh(xt,nr){var fr=nr.length;switch(xt.type){case zn:case wn:case os:case uo:var Or=B.allocType(xt.type,fr);Or.set(nr),xt.data=Or;break;case bn:xt.data=It(nr);break;default:}}function wp(xt,nr){return B.allocType(xt.type===bn?uo:xt.type,nr)}function rc(xt,nr){xt.type===bn?(xt.data=It(nr),B.freeType(nr)):xt.data=nr}function id(xt,nr,fr,Or,Xr,aa){for(var Wr=xt.width,wa=xt.height,za=xt.channels,Ba=Wr*wa*za,Na=wp(xt,Ba),Ji=0,ki=0;ki=1;)wa+=Wr*za*za,za/=2;return wa}else return Wr*fr*Or}function wh(xt,nr,fr,Or,Xr,aa,Wr){var wa={"don't care":Jl,"dont care":Jl,nice:Pu,fast:Fu},za={repeat:Cn,clamp:Xo,mirror:gs},Ba={nearest:ss,linear:oo},Na=t({mipmap:Bl,"nearest mipmap nearest":Bn,"linear mipmap nearest":An,"nearest mipmap linear":Po,"linear mipmap linear":Bl},Ba),Ji={none:0,browser:Yc},ki={uint8:zn,rgba4:pa,rgb565:Zi,"rgb5 a1":_n},ii={alpha:ra,luminance:Ca,"luminance alpha":Li,rgb:ni,rgba:ua,rgba4:Va,"rgb5 a1":dn,rgb565:rn},ma={};nr.ext_srgb&&(ii.srgb=un,ii.srgba=jn),nr.oes_texture_float&&(ki.float32=ki.float=uo),nr.oes_texture_half_float&&(ki.float16=ki["half float"]=bn),nr.webgl_depth_texture&&(t(ii,{depth:xn,"depth stencil":Ni}),t(ki,{uint16:wn,uint32:os,"depth stencil":Fi})),nr.webgl_compressed_texture_s3tc&&t(ma,{"rgb s3tc dxt1":Wa,"rgba s3tc dxt1":ui,"rgba s3tc dxt3":Hi,"rgba s3tc dxt5":Vi}),nr.webgl_compressed_texture_atc&&t(ma,{"rgb atc":$n,"rgba atc explicit alpha":ro,"rgba atc interpolated alpha":Un}),nr.webgl_compressed_texture_pvrtc&&t(ma,{"rgb pvrtc 4bppv1":Kn,"rgb pvrtc 2bppv1":To,"rgba pvrtc 4bppv1":Jn,"rgba pvrtc 2bppv1":qn}),nr.webgl_compressed_texture_etc1&&(ma["rgb etc1"]=Fo);var Ir=Array.prototype.slice.call(xt.getParameter(jt));Object.keys(ma).forEach(function(ur){var Kr=ma[ur];Ir.indexOf(Kr)>=0&&(ii[ur]=Kr)});var fa=Object.keys(ii);fr.textureFormats=fa;var Pa=[];Object.keys(ii).forEach(function(ur){var Kr=ii[ur];Pa[Kr]=ur});var Ha=[];Object.keys(ki).forEach(function(ur){var Kr=ki[ur];Ha[Kr]=ur});var Ta=[];Object.keys(Ba).forEach(function(ur){var Kr=Ba[ur];Ta[Kr]=ur});var hi=[];Object.keys(Na).forEach(function(ur){var Kr=Na[ur];hi[Kr]=ur});var oi=[];Object.keys(za).forEach(function(ur){var Kr=za[ur];oi[Kr]=ur});var an=fa.reduce(function(ur,Kr){var Jr=ii[Kr];return Jr===Ca||Jr===ra||Jr===Ca||Jr===Li||Jr===xn||Jr===Ni||nr.ext_srgb&&(Jr===un||Jr===jn)?ur[Jr]=Jr:Jr===dn||Kr.indexOf("rgba")>=0?ur[Jr]=ua:ur[Jr]=ni,ur},{});function Aa(){this.internalformat=ua,this.format=ua,this.type=zn,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Yc,this.width=0,this.height=0,this.channels=0}function ga(ur,Kr){ur.internalformat=Kr.internalformat,ur.format=Kr.format,ur.type=Kr.type,ur.compressed=Kr.compressed,ur.premultiplyAlpha=Kr.premultiplyAlpha,ur.flipY=Kr.flipY,ur.unpackAlignment=Kr.unpackAlignment,ur.colorSpace=Kr.colorSpace,ur.width=Kr.width,ur.height=Kr.height,ur.channels=Kr.channels}function wi(ur,Kr){if(!(typeof Kr!="object"||!Kr)){if("premultiplyAlpha"in Kr&&(ur.premultiplyAlpha=Kr.premultiplyAlpha),"flipY"in Kr&&(ur.flipY=Kr.flipY),"alignment"in Kr&&(ur.unpackAlignment=Kr.alignment),"colorSpace"in Kr&&(ur.colorSpace=Ji[Kr.colorSpace]),"type"in Kr){var Jr=Kr.type;ur.type=ki[Jr]}var Gi=ur.width,Eo=ur.height,ds=ur.channels,Ui=!1;"shape"in Kr?(Gi=Kr.shape[0],Eo=Kr.shape[1],Kr.shape.length===3&&(ds=Kr.shape[2],Ui=!0)):("radius"in Kr&&(Gi=Eo=Kr.radius),"width"in Kr&&(Gi=Kr.width),"height"in Kr&&(Eo=Kr.height),"channels"in Kr&&(ds=Kr.channels,Ui=!0)),ur.width=Gi|0,ur.height=Eo|0,ur.channels=ds|0;var tr=!1;if("format"in Kr){var hr=Kr.format,_r=ur.internalformat=ii[hr];ur.format=an[_r],hr in ki&&("type"in Kr||(ur.type=ki[hr])),hr in ma&&(ur.compressed=!0),tr=!0}!Ui&&tr?ur.channels=Qo[ur.format]:Ui&&!tr&&ur.channels!==cs[ur.format]&&(ur.format=ur.internalformat=cs[ur.channels])}}function ri(ur){xt.pixelStorei($c,ur.flipY),xt.pixelStorei(Ju,ur.premultiplyAlpha),xt.pixelStorei(Ol,ur.colorSpace),xt.pixelStorei(mu,ur.unpackAlignment)}function $a(){Aa.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ja(ur,Kr){var Jr=null;if(Qc(Kr)?Jr=Kr:Kr&&(wi(ur,Kr),"x"in Kr&&(ur.xOffset=Kr.x|0),"y"in Kr&&(ur.yOffset=Kr.y|0),Qc(Kr.data)&&(Jr=Kr.data)),Kr.copy){var Gi=Xr.viewportWidth,Eo=Xr.viewportHeight;ur.width=ur.width||Gi-ur.xOffset,ur.height=ur.height||Eo-ur.yOffset,ur.needsCopy=!0}else if(!Jr)ur.width=ur.width||1,ur.height=ur.height||1,ur.channels=ur.channels||4;else if(pt(Jr))ur.channels=ur.channels||4,ur.data=Jr,!("type"in Kr)&&ur.type===zn&&(ur.type=Wd(Jr));else if(rd(Jr))ur.channels=ur.channels||4,bh(ur,Jr),ur.alignment=1,ur.needsFree=!0;else if(Tt(Jr)){var ds=Jr.data;!Array.isArray(ds)&&ur.type===zn&&(ur.type=Wd(ds));var Ui=Jr.shape,tr=Jr.stride,hr,_r,Zr,sa,ve,Ae;Ui.length===3?(Zr=Ui[2],Ae=tr[2]):(Zr=1,Ae=1),hr=Ui[0],_r=Ui[1],sa=tr[0],ve=tr[1],ur.alignment=1,ur.width=hr,ur.height=_r,ur.channels=Zr,ur.format=ur.internalformat=cs[Zr],ur.needsFree=!0,id(ur,ds,sa,ve,Ae,Jr.offset)}else if(ad(Jr)||Jc(Jr)||Tf(Jr))ad(Jr)||Jc(Jr)?ur.element=Jr:ur.element=Jr.canvas,ur.width=ur.element.width,ur.height=ur.element.height,ur.channels=4;else if(tc(Jr))ur.element=Jr,ur.width=Jr.width,ur.height=Jr.height,ur.channels=4;else if(Wf(Jr))ur.element=Jr,ur.width=Jr.naturalWidth,ur.height=Jr.naturalHeight,ur.channels=4;else if(xh(Jr))ur.element=Jr,ur.width=Jr.videoWidth,ur.height=Jr.videoHeight,ur.channels=4;else if(Hf(Jr)){var Le=ur.width||Jr[0].length,We=ur.height||Jr.length,Xe=ur.channels;Wt(Jr[0][0])?Xe=Xe||Jr[0][0].length:Xe=Xe||1;for(var rt=Ve.shape(Jr),Ct=1,Jt=0;Jt>=Eo,Jr.height>>=Eo,Ja(Jr,Gi[Eo]),ur.mipmask|=1<=0&&!("faces"in Kr)&&(ur.genMipmaps=!0)}if("mag"in Kr){var Gi=Kr.mag;ur.magFilter=Ba[Gi]}var Eo=ur.wrapS,ds=ur.wrapT;if("wrap"in Kr){var Ui=Kr.wrap;typeof Ui=="string"?Eo=ds=za[Ui]:Array.isArray(Ui)&&(Eo=za[Ui[0]],ds=za[Ui[1]])}else{if("wrapS"in Kr){var tr=Kr.wrapS;Eo=za[tr]}if("wrapT"in Kr){var hr=Kr.wrapT;ds=za[hr]}}if(ur.wrapS=Eo,ur.wrapT=ds,"anisotropic"in Kr){var _r=Kr.anisotropic;ur.anisotropic=Kr.anisotropic}if("mipmap"in Kr){var Zr=!1;switch(typeof Kr.mipmap){case"string":ur.mipmapHint=wa[Kr.mipmap],ur.genMipmaps=!0,Zr=!0;break;case"boolean":Zr=ur.genMipmaps=Kr.mipmap;break;case"object":ur.genMipmaps=!1,Zr=!0;break;default:}Zr&&!("min"in Kr)&&(ur.minFilter=Bn)}}function Rc(ur,Kr){xt.texParameteri(Kr,sl,ur.minFilter),xt.texParameteri(Kr,yo,ur.magFilter),xt.texParameteri(Kr,Yn,ur.wrapS),xt.texParameteri(Kr,go,ur.wrapT),nr.ext_texture_filter_anisotropic&&xt.texParameteri(Kr,Ku,ur.anisotropic),ur.genMipmaps&&(xt.hint(Lu,ur.mipmapHint),xt.generateMipmap(Kr))}var cf=0,ql={},Vl=fr.maxTextureUnits,nu=Array(Vl).map(function(){return null});function Xn(ur){Aa.call(this),this.mipmask=0,this.internalformat=ua,this.id=cf++,this.refCount=1,this.target=ur,this.texture=xt.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new hs,Wr.profile&&(this.stats={size:0})}function xu(ur){xt.activeTexture(Qu),xt.bindTexture(ur.target,ur.texture)}function xs(){var ur=nu[0];ur?xt.bindTexture(ur.target,ur.texture):xt.bindTexture(sr,null)}function zc(ur){var Kr=ur.texture,Jr=ur.unit,Gi=ur.target;Jr>=0&&(xt.activeTexture(Qu+Jr),xt.bindTexture(Gi,null),nu[Jr]=null),xt.deleteTexture(Kr),ur.texture=null,ur.params=null,ur.pixels=null,ur.refCount=0,delete ql[ur.id],aa.textureCount--}t(Xn.prototype,{bind:function(){var ur=this;ur.bindCount+=1;var Kr=ur.unit;if(Kr<0){for(var Jr=0;Jr0)continue;Gi.unit=-1}nu[Jr]=ur,Kr=Jr;break}Kr>=Vl,Wr.profile&&aa.maxTextureUnits>ve)-Zr,Ae.height=Ae.height||(Jr.height>>ve)-sa,xu(Jr),nn(Ae,sr,Zr,sa,ve),xs(),zi(Ae),Gi}function ds(Ui,tr){var hr=Ui|0,_r=tr|0||hr;if(hr===Jr.width&&_r===Jr.height)return Gi;Gi.width=Jr.width=hr,Gi.height=Jr.height=_r,xu(Jr);for(var Zr=0;Jr.mipmask>>Zr;++Zr){var sa=hr>>Zr,ve=_r>>Zr;if(!sa||!ve)break;xt.texImage2D(sr,Zr,Jr.format,sa,ve,0,Jr.format,Jr.type,null)}return xs(),Wr.profile&&(Jr.stats.size=Iu(Jr.internalformat,Jr.type,hr,_r,!1,!1)),Gi}return Gi(ur,Kr),Gi.subimage=Eo,Gi.resize=ds,Gi._reglType="texture2d",Gi._texture=Jr,Wr.profile&&(Gi.stats=Jr.stats),Gi.destroy=function(){Jr.decRef()},Gi}function hf(ur,Kr,Jr,Gi,Eo,ds){var Ui=new Xn(kr);ql[Ui.id]=Ui,aa.cubeCount++;var tr=new Array(6);function hr(sa,ve,Ae,Le,We,Xe){var rt,Ct=Ui.texInfo;for(hs.call(Ct),rt=0;rt<6;++rt)tr[rt]=bo();if(typeof sa=="number"||!sa){var Jt=sa|0||1;for(rt=0;rt<6;++rt)kn(tr[rt],Jt,Jt)}else if(typeof sa=="object")if(ve)so(tr[0],sa),so(tr[1],ve),so(tr[2],Ae),so(tr[3],Le),so(tr[4],We),so(tr[5],Xe);else if(cc(Ct,sa),wi(Ui,sa),"faces"in sa){var br=sa.faces;for(rt=0;rt<6;++rt)ga(tr[rt],Ui),so(tr[rt],br[rt])}else for(rt=0;rt<6;++rt)so(tr[rt],sa);for(ga(Ui,tr[0]),Ct.genMipmaps?Ui.mipmask=(tr[0].width<<1)-1:Ui.mipmask=tr[0].mipmask,Ui.internalformat=tr[0].internalformat,hr.width=tr[0].width,hr.height=tr[0].height,xu(Ui),rt=0;rt<6;++rt)Us(tr[rt],Mr+rt);for(Rc(Ct,kr),xs(),Wr.profile&&(Ui.stats.size=Iu(Ui.internalformat,Ui.type,hr.width,hr.height,Ct.genMipmaps,!0)),hr.format=Pa[Ui.internalformat],hr.type=Ha[Ui.type],hr.mag=Ta[Ct.magFilter],hr.min=hi[Ct.minFilter],hr.wrapS=oi[Ct.wrapS],hr.wrapT=oi[Ct.wrapT],rt=0;rt<6;++rt)uf(tr[rt]);return hr}function _r(sa,ve,Ae,Le,We){var Xe=Ae|0,rt=Le|0,Ct=We|0,Jt=fi();return ga(Jt,Ui),Jt.width=0,Jt.height=0,Ja(Jt,ve),Jt.width=Jt.width||(Ui.width>>Ct)-Xe,Jt.height=Jt.height||(Ui.height>>Ct)-rt,xu(Ui),nn(Jt,Mr+sa,Xe,rt,Ct),xs(),zi(Jt),hr}function Zr(sa){var ve=sa|0;if(ve!==Ui.width){hr.width=Ui.width=ve,hr.height=Ui.height=ve,xu(Ui);for(var Ae=0;Ae<6;++Ae)for(var Le=0;Ui.mipmask>>Le;++Le)xt.texImage2D(Mr+Ae,Le,Ui.format,ve>>Le,ve>>Le,0,Ui.format,Ui.type,null);return xs(),Wr.profile&&(Ui.stats.size=Iu(Ui.internalformat,Ui.type,hr.width,hr.height,!1,!0)),hr}}return hr(ur,Kr,Jr,Gi,Eo,ds),hr.subimage=_r,hr.resize=Zr,hr._reglType="textureCube",hr._texture=Ui,Wr.profile&&(hr.stats=Ui.stats),hr.destroy=function(){Ui.decRef()},hr}function Nn(){for(var ur=0;ur>Gi,Jr.height>>Gi,0,Jr.internalformat,Jr.type,null);else for(var Eo=0;Eo<6;++Eo)xt.texImage2D(Mr+Eo,Gi,Jr.internalformat,Jr.width>>Gi,Jr.height>>Gi,0,Jr.internalformat,Jr.type,null);Rc(Jr.texInfo,Jr.target)})}function Ps(){for(var ur=0;ur=0?uf=!0:za.indexOf(hs)>=0&&(uf=!1))),("depthTexture"in Xn||"depthStencilTexture"in Xn)&&(nu=!!(Xn.depthTexture||Xn.depthStencilTexture)),"depth"in Xn&&(typeof Xn.depth=="boolean"?Us=Xn.depth:(cf=Xn.depth,iu=!1)),"stencil"in Xn&&(typeof Xn.stencil=="boolean"?iu=Xn.stencil:(ql=Xn.stencil,Us=!1)),"depthStencil"in Xn&&(typeof Xn.depthStencil=="boolean"?Us=iu=Xn.depthStencil:(Vl=Xn.depthStencil,Us=!1,iu=!1))}var xs=null,zc=null,ff=null,hf=null;if(Array.isArray(bo))xs=bo.map(ma);else if(bo)xs=[ma(bo)];else for(xs=new Array(Rc),Sn=0;Sn0&&(zi.depth=Ja[0].depth,zi.stencil=Ja[0].stencil,zi.depthStencil=Ja[0].depthStencil),Ja[fi]?Ja[fi](zi):Ja[fi]=ga(zi)}return t(Ai,{width:Sn,height:Sn,color:hs})}function nn(Ln){var fi,zi=Ln|0;if(zi===Ai.width)return Ai;var Sn=Ai.color;for(fi=0;fi=Sn.byteLength?kn.subdata(Sn):(kn.destroy(),ga.buffers[Ln]=null)),ga.buffers[Ln]||(kn=ga.buffers[Ln]=Xr.create(fi,Ef,!1,!0)),zi.buffer=Xr.getBuffer(kn),zi.size=zi.buffer.dimension|0,zi.normalized=!1,zi.type=zi.buffer.dtype,zi.offset=0,zi.stride=0,zi.divisor=0,zi.state=1,Ai[Ln]=1}else Xr.getBuffer(fi)?(zi.buffer=Xr.getBuffer(fi),zi.size=zi.buffer.dimension|0,zi.normalized=!1,zi.type=zi.buffer.dtype,zi.offset=0,zi.stride=0,zi.divisor=0,zi.state=1):Xr.getBuffer(fi.buffer)?(zi.buffer=Xr.getBuffer(fi.buffer),zi.size=(+fi.size||zi.buffer.dimension)|0,zi.normalized=!!fi.normalized||!1,"type"in fi?zi.type=ar[fi.type]:zi.type=zi.buffer.dtype,zi.offset=(fi.offset||0)|0,zi.stride=(fi.stride||0)|0,zi.divisor=(fi.divisor||0)|0,zi.state=1):"x"in fi&&(zi.x=+fi.x||0,zi.y=+fi.y||0,zi.z=+fi.z||0,zi.w=+fi.w||0,zi.state=2)}for(var so=0;so1)for(var ri=0;riIr&&(Ir=fa.stats.uniformsCount)}),Ir},fr.getMaxAttributesCount=function(){var Ir=0;return Na.forEach(function(fa){fa.stats.attributesCount>Ir&&(Ir=fa.stats.attributesCount)}),Ir});function ma(){Xr={},aa={};for(var Ir=0;Ir16&&(fr=Rr(fr,xt.length*8));for(var Or=Array(16),Xr=Array(16),aa=0;aa<16;aa++)Or[aa]=fr[aa]^909522486,Xr[aa]=fr[aa]^1549556828;var Wr=Rr(Or.concat(eh(nr)),512+nr.length*8);return it(Rr(Xr.concat(Wr),768))}function yu(xt){for(var nr=Sp?"0123456789ABCDEF":"0123456789abcdef",fr="",Or,Xr=0;Xr>>4&15)+nr.charAt(Or&15);return fr}function Lh(xt){for(var nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",Or=xt.length,Xr=0;Xrxt.length*8?fr+=Dh:fr+=nr.charAt(aa>>>6*(3-Wr)&63);return fr}function ud(xt,nr){var fr=nr.length,Or=Array(),Xr,aa,Wr,wa,za=Array(Math.ceil(xt.length/2));for(Xr=0;Xr0;){for(wa=Array(),Wr=0,Xr=0;Xr0||aa>0)&&(wa[wa.length]=aa);Or[Or.length]=Wr,za=wa}var Ba="";for(Xr=Or.length-1;Xr>=0;Xr--)Ba+=nr.charAt(Or[Xr]);var Na=Math.ceil(xt.length*8/(Math.log(nr.length)/Math.log(2)));for(Xr=Ba.length;Xr>>6&31,128|Or&63):Or<=65535?nr+=String.fromCharCode(224|Or>>>12&15,128|Or>>>6&63,128|Or&63):Or<=2097151&&(nr+=String.fromCharCode(240|Or>>>18&7,128|Or>>>12&63,128|Or>>>6&63,128|Or&63));return nr}function eh(xt){for(var nr=Array(xt.length>>2),fr=0;fr>5]|=(xt.charCodeAt(fr/8)&255)<<24-fr%32;return nr}function it(xt){for(var nr="",fr=0;fr>5]>>>24-fr%32&255);return nr}function wt(xt,nr){return xt>>>nr|xt<<32-nr}function $t(xt,nr){return xt>>>nr}function Bt(xt,nr,fr){return xt&nr^~xt&fr}function cr(xt,nr,fr){return xt&nr^xt&fr^nr&fr}function Sr(xt){return wt(xt,2)^wt(xt,13)^wt(xt,22)}function Pr(xt){return wt(xt,6)^wt(xt,11)^wt(xt,25)}function qr(xt){return wt(xt,7)^wt(xt,18)^$t(xt,3)}function $r(xt){return wt(xt,17)^wt(xt,19)^$t(xt,10)}var va=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 Rr(xt,nr){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Or=new Array(64),Xr,aa,Wr,wa,za,Ba,Na,Ji,ki,ii,ma,Ir;for(xt[nr>>5]|=128<<24-nr%32,xt[(nr+64>>9<<4)+15]=nr,ki=0;ki>16)+(nr>>16)+(fr>>16);return Or<<16|fr&65535}function Yr(xt){return Array.prototype.slice.call(xt)}function da(xt){return Yr(xt).join("")}function La(xt){var nr=xt&&xt.cache,fr=0,Or=[],Xr=[],aa=[];function Wr(ma,Ir){var fa=Ir&&Ir.stable;if(!fa){for(var Pa=0;Pa0&&(ma.push(Ha,"="),ma.push.apply(ma,Yr(arguments)),ma.push(";")),Ha}return t(Ir,{def:Pa,toString:function(){return da([fa.length>0?"var "+fa.join(",")+";":"",da(ma)])}})}function za(){var ma=wa(),Ir=wa(),fa=ma.toString,Pa=Ir.toString;function Ha(Ta,hi){Ir(Ta,hi,"=",ma.def(Ta,hi),";")}return t(function(){ma.apply(ma,Yr(arguments))},{def:ma.def,entry:ma,exit:Ir,save:Ha,set:function(Ta,hi,oi){Ha(Ta,hi),ma(Ta,hi,"=",oi,";")},toString:function(){return fa()+Pa()}})}function Ba(){var ma=da(arguments),Ir=za(),fa=za(),Pa=Ir.toString,Ha=fa.toString;return t(Ir,{then:function(){return Ir.apply(Ir,Yr(arguments)),this},else:function(){return fa.apply(fa,Yr(arguments)),this},toString:function(){var Ta=Ha();return Ta&&(Ta="else{"+Ta+"}"),da(["if(",ma,"){",Pa(),"}",Ta])}})}var Na=wa(),Ji={};function ki(ma,Ir){var fa=[];function Pa(){var an="a"+fa.length;return fa.push(an),an}Ir=Ir||0;for(var Ha=0;Ha[x.viewport.x,x.viewport.y,A.viewportWidth,A.viewportHeight]},attributes:{color:{buffer:g,offset:(A,x)=>x.offset*4,divisor:1},position:{buffer:h,offset:(A,x)=>x.offset*8,divisor:1},positionFract:{buffer:v,offset:(A,x)=>x.offset*8,divisor:1},error:{buffer:i,offset:(A,x)=>x.offset*16,divisor:1},direction:{buffer:w,stride:24,offset:0},lineOffset:{buffer:w,stride:24,offset:8},capOffset:{buffer:w,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:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:r.length}),l(C,{update:f,draw:_,destroy:u,regl:o,gl:c,canvas:c.canvas,groups:M}),C;function C(A){A?f(A):A===null&&u(),_()}function _(A){if(typeof A=="number")return T(A);A&&!Array.isArray(A)&&(A=[A]),o._refresh(),M.forEach((x,z)=>{if(x){if(A&&(A[z]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}T(z)}})}function T(A){typeof A=="number"&&(A=M[A]),A!=null&&A&&A.count&&A.color&&A.opacity&&A.positions&&A.positions.length>1&&(A.scaleRatio=[A.scale[0]*A.viewport.width,A.scale[1]*A.viewport.height],m(A),A.after&&A.after(A))}function f(A){if(!A)return;A.length!=null?typeof A[0]=="number"&&(A=[{positions:A}]):Array.isArray(A)||(A=[A]);let x=0,z=0;if(C.groups=M=A.map((D,B)=>{let F=M[B];if(D)typeof D=="function"?D={after:D}:typeof D[0]=="number"&&(D={positions:D});else return F;return D=k(D,{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"}),F||(M[B]=F={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},D=l({},S,D)),E(F,D,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=e(P),z+=P.length,P),positions:(P,j)=>(P=e(P,"float64"),j.count=Math.floor(P.length/2),j.bounds=p(P,2),j.offset=x,x+=j.count,P)},{color:(P,j)=>{let U=j.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let Q=P;P=Array(U);for(let re=0;re{let $=j.bounds;return P||(P=$),j.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],j.translate=[-P[0],-P[1]],j.scaleFract=n(j.scale),j.translateFract=n(j.translate),P},viewport:P=>{let j;return Array.isArray(P)?j={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(j={x:P.x||P.left||0,y:P.y||P.top||0},P.right?j.width=P.right-j.x:j.width=P.w||P.width||0,P.bottom?j.height=P.bottom-j.y:j.height=P.h||P.height||0):j={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},j}}]),F}),x||z){let D=M.reduce((j,U,$)=>j+(U?U.count:0),0),B=new Float64Array(D*2),F=new Uint8Array(D*4),P=new Float32Array(D*4);M.forEach((j,U)=>{if(!j)return;let{positions:$,count:Q,offset:re,color:ne,errors:se}=j;Q&&(F.set(ne,re*4),P.set(se,re*4),B.set($,re*2))});var I=t(B);h(I);var O=n(B,I);v(O),g(F),i(P)}}function u(){h.destroy(),v.destroy(),g.destroy(),i.destroy(),w.destroy()}}}}),rq=ze({"node_modules/unquote/index.js"(J,V){var p=/[\'\"]/;V.exports=function(E){return E?(p.test(E.charAt(0))&&(E=E.substr(1)),p.test(E.charAt(E.length-1))&&(E=E.substr(0,E.length-1)),E):""}}}),sM=ze({"node_modules/css-global-keywords/index.json"(J,V){V.exports=["inherit","initial","unset"]}}),lM=ze({"node_modules/css-system-font-keywords/index.json"(J,V){V.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),uM=ze({"node_modules/css-font-weight-keywords/index.json"(J,V){V.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),cM=ze({"node_modules/css-font-style-keywords/index.json"(J,V){V.exports=["normal","italic","oblique"]}}),fM=ze({"node_modules/css-font-stretch-keywords/index.json"(J,V){V.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),aq=ze({"node_modules/parenthesis/index.js"(J,V){"use strict";function p(k,l){if(typeof k!="string")return[k];var e=[k];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],n=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),m=[];function h(v,g,i){var w=e.push(v.slice(s[0].length,-s[1].length))-1;return m.push(w),n+w+n}e.forEach(function(v,g){for(var i,w=0;v!=i;)if(i=v,v=v.replace(c,h),w++>1e4)throw Error("References have circular dependency. Please, check them.");e[g]=v}),m=m.reverse(),e=e.map(function(v){return m.forEach(function(g){v=v.replace(new RegExp("(\\"+n+g+"\\"+n+")","g"),s[0]+"$1"+s[1])}),v})});var a=new RegExp("\\"+n+"([0-9]+)\\"+n);function o(s,c,m){for(var h=[],v,g=0;v=a.exec(s);){if(g++>1e4)throw Error("Circular references in parenthesis");h.push(s.slice(0,v.index)),h.push(o(c[v[1]],c)),s=s.slice(v.index+v[0].length)}return h.push(s),h}return r?e:o(e[0],e)}function b(k,l){if(l&&l.flat){var e=l&&l.escape||"___",t=k[0],n;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),a=0;t!=n;){if(a++>1e4)throw Error("Circular references in "+k);n=t,t=t.replace(r,o)}return t}return k.reduce(function s(c,m){return Array.isArray(m)&&(m=m.reduce(s,"")),c+m},"");function o(s,c){if(k[c]==null)throw Error("Reference "+c+"is undefined");return k[c]}}function E(k,l){return Array.isArray(k)?b(k,l):p(k,l)}E.parse=p,E.stringify=b,V.exports=E}}),nq=ze({"node_modules/string-split-by/index.js"(J,V){"use strict";var p=aq();V.exports=function(E,k,l){if(E==null)throw Error("First argument should be a string");if(k==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=p.parse(E,{flat:!0,brackets:l.ignore}),t=e[0],n=t.split(k);if(l.escape){for(var r=[],a=0;a1&&It===Ut&&(It==='"'||It==="'"))return['"'+t(st.substr(1,st.length-2))+'"'];var ir=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(st);if(ir)return n(st.substr(0,ir.index)).concat(n(ir[1])).concat(n(st.substr(ir.index+ir[0].length)));var dr=st.split(".");if(dr.length===1)return['"'+t(st)+'"'];for(var Ar=[],hr=0;hr"u"?1:window.devicePixelRatio,ta=!1,ka={},Ta=function(ia){},Ra=function(){};if(typeof It=="string"?Ut=document.querySelector(It):typeof It=="object"&&(w(It)?Ut=It:S(It)?(Ar=It,dr=Ar.canvas):("gl"in It?Ar=It.gl:"canvas"in It?dr=C(It.canvas):"container"in It&&(ir=C(It.container)),"attributes"in It&&(hr=It.attributes),"extensions"in It&&(vr=M(It.extensions)),"optionalExtensions"in It&&(Or=M(It.optionalExtensions)),"onDone"in It&&(Ta=It.onDone),"profile"in It&&(ta=!!It.profile),"pixelRatio"in It&&(Cr=+It.pixelRatio),"cachedCode"in It&&(ka=It.cachedCode))),Ut&&(Ut.nodeName.toLowerCase()==="canvas"?dr=Ut:ir=Ut),!Ar){if(!dr){var ua=g(ir||document.body,Ta,Cr);if(!ua)return null;dr=ua.canvas,Ra=ua.onDestroy}hr.premultipliedAlpha===void 0&&(hr.premultipliedAlpha=!0),Ar=i(dr,hr)}return Ar?{gl:Ar,canvas:dr,container:ir,extensions:vr,optionalExtensions:Or,pixelRatio:Cr,profile:ta,cachedCode:ka,onDone:Ta,onDestroy:Ra}:(Ra(),Ta("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(st,It){var Ut={};function ir(hr){var vr=hr.toLowerCase(),Or;try{Or=Ut[vr]=st.getExtension(vr)}catch{}return!!Or}for(var dr=0;dr65535)<<4,st>>>=It,Ut=(st>255)<<3,st>>>=Ut,It|=Ut,Ut=(st>15)<<2,st>>>=Ut,It|=Ut,Ut=(st>3)<<1,st>>>=Ut,It|=Ut,It|st>>1}function P(){var st=f(8,function(){return[]});function It(Ar){var hr=B(Ar),vr=st[F(hr)>>2];return vr.length>0?vr.pop():new ArrayBuffer(hr)}function Ut(Ar){st[F(Ar.byteLength)>>2].push(Ar)}function ir(Ar,hr){var vr=null;switch(Ar){case u:vr=new Int8Array(It(hr),0,hr);break;case A:vr=new Uint8Array(It(hr),0,hr);break;case x:vr=new Int16Array(It(2*hr),0,hr);break;case z:vr=new Uint16Array(It(2*hr),0,hr);break;case I:vr=new Int32Array(It(4*hr),0,hr);break;case O:vr=new Uint32Array(It(4*hr),0,hr);break;case D:vr=new Float32Array(It(4*hr),0,hr);break;default:return null}return vr.length!==hr?vr.subarray(0,hr):vr}function dr(Ar){Ut(Ar.buffer)}return{alloc:It,free:Ut,allocType:ir,freeType:dr}}var j=P();j.zero=P();var U=3408,$=3410,Q=3411,re=3412,ne=3413,se=3414,G=3415,X=33901,K=33902,H=3379,Y=3386,q=34921,Z=36347,ee=36348,ae=35661,he=35660,xe=34930,we=36349,Me=34076,Se=34024,Ie=7936,Ve=7937,Ge=7938,ke=35724,_e=34047,ce=36063,ve=34852,le=3553,Ae=34067,Be=34069,Xe=33984,Ye=6408,yt=5126,gt=5121,Tt=36160,At=36053,$t=36064,rr=16384,_r=function(st,It){var Ut=1;It.ext_texture_filter_anisotropic&&(Ut=st.getParameter(_e));var ir=1,dr=1;It.webgl_draw_buffers&&(ir=st.getParameter(ve),dr=st.getParameter(ce));var Ar=!!It.oes_texture_float;if(Ar){var hr=st.createTexture();st.bindTexture(le,hr),st.texImage2D(le,0,Ye,1,1,0,Ye,yt,null);var vr=st.createFramebuffer();if(st.bindFramebuffer(Tt,vr),st.framebufferTexture2D(Tt,$t,le,hr,0),st.bindTexture(le,null),st.checkFramebufferStatus(Tt)!==At)Ar=!1;else{st.viewport(0,0,1,1),st.clearColor(1,0,0,1),st.clear(rr);var Or=j.allocType(yt,4);st.readPixels(0,0,1,1,Ye,yt,Or),st.getError()?Ar=!1:(st.deleteFramebuffer(vr),st.deleteTexture(hr),Ar=Or[0]===1),j.freeType(Or)}}var Cr=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ta=!0;if(!Cr){var ka=st.createTexture(),Ta=j.allocType(gt,36);st.activeTexture(Xe),st.bindTexture(Ae,ka),st.texImage2D(Be,0,Ye,3,3,0,Ye,gt,Ta),j.freeType(Ta),st.bindTexture(Ae,null),st.deleteTexture(ka),ta=!st.getError()}return{colorBits:[st.getParameter($),st.getParameter(Q),st.getParameter(re),st.getParameter(ne)],depthBits:st.getParameter(se),stencilBits:st.getParameter(G),subpixelBits:st.getParameter(U),extensions:Object.keys(It).filter(function(Ra){return!!It[Ra]}),maxAnisotropic:Ut,maxDrawbuffers:ir,maxColorAttachments:dr,pointSizeDims:st.getParameter(X),lineWidthDims:st.getParameter(K),maxViewportDims:st.getParameter(Y),maxCombinedTextureUnits:st.getParameter(ae),maxCubeMapSize:st.getParameter(Me),maxRenderbufferSize:st.getParameter(Se),maxTextureUnits:st.getParameter(xe),maxTextureSize:st.getParameter(H),maxAttributes:st.getParameter(q),maxVertexUniforms:st.getParameter(Z),maxVertexTextureUnits:st.getParameter(he),maxVaryingVectors:st.getParameter(ee),maxFragmentUniforms:st.getParameter(we),glsl:st.getParameter(ke),renderer:st.getParameter(Ve),vendor:st.getParameter(Ie),version:st.getParameter(Ge),readFloat:Ar,npotTextureCube:ta}},Xt=function(st){return st instanceof Uint8Array||st instanceof Uint16Array||st instanceof Uint32Array||st instanceof Int8Array||st instanceof Int16Array||st instanceof Int32Array||st instanceof Float32Array||st instanceof Float64Array||st instanceof Uint8ClampedArray};function or(st){return!!st&&typeof st=="object"&&Array.isArray(st.shape)&&Array.isArray(st.stride)&&typeof st.offset=="number"&&st.shape.length===st.stride.length&&(Array.isArray(st.data)||Xt(st.data))}var Ot=function(st){return Object.keys(st).map(function(It){return st[It]})},vt={shape:Je,flatten:Ke};function ht(st,It,Ut){for(var ir=0;ir0){var ui;if(Array.isArray(ga[0])){Dn=cr(ga);for(var cn=1,sn=1;sn0){if(typeof cn[0]=="number"){var Rn=j.allocType(za.dtype,cn.length);un(Rn,cn),Dn(Rn,ei),j.freeType(Rn)}else if(Array.isArray(cn[0])||Xt(cn[0])){Pn=cr(cn);var In=ur(cn,Pn,za.dtype);Dn(In,ei),j.freeType(In)}}}else if(or(cn)){Pn=cn.shape;var Jn=cn.stride,Ei=0,so=0,ti=0,bi=0;Pn.length===1?(Ei=Pn[0],so=1,ti=Jn[0],bi=0):Pn.length===2&&(Ei=Pn[0],so=Pn[1],ti=Jn[0],bi=Jn[1]);var Wi=Array.isArray(cn.data)?za.dtype:La(cn.data),ro=j.allocType(Wi,Ei*so);Xa(ro,cn.data,Ei,so,ti,bi,cn.offset),Dn(ro,ei),j.freeType(ro)}return Cn}return da||Cn(ia),Cn._reglType="buffer",Cn._buffer=za,Cn.subdata=ui,Ut.profile&&(Cn.stats=za.stats),Cn.destroy=function(){Ta(za)},Cn}function ua(){Ot(Ar).forEach(function(ia){ia.buffer=st.createBuffer(),st.bindBuffer(ia.type,ia.buffer),st.bufferData(ia.type,ia.persistentData||ia.byteLength,ia.usage)})}return Ut.profile&&(It.getTotalBufferSize=function(){var ia=0;return Object.keys(Ar).forEach(function(ga){ia+=Ar[ga].stats.size}),ia}),{create:Ra,createStream:Or,destroyStream:Cr,clear:function(){Ot(Ar).forEach(Ta),vr.forEach(Ta)},getBuffer:function(ia){return ia&&ia._buffer instanceof hr?ia._buffer:null},restore:ua,_initBuffer:ka}}var Nn=0,yn=0,Un=1,li=1,Yn=4,on=4,en={points:Nn,point:yn,lines:Un,line:li,triangles:Yn,triangle:on,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},vi=0,Yi=1,Ja=4,Oa=5120,lt=5121,rt=5122,fr=5123,lr=5124,Tr=5125,Ir=34963,Dr=35040,ot=35044;function kt(st,It,Ut,ir){var dr={},Ar=0,hr={uint8:lt,uint16:fr};It.oes_element_index_uint&&(hr.uint32=Tr);function vr(ua){this.id=Ar++,dr[this.id]=this,this.buffer=ua,this.primType=Ja,this.vertCount=0,this.type=0}vr.prototype.bind=function(){this.buffer.bind()};var Or=[];function Cr(ua){var ia=Or.pop();return ia||(ia=new vr(Ut.create(null,Ir,!0,!1)._buffer)),ka(ia,ua,Dr,-1,-1,0,0),ia}function ta(ua){Or.push(ua)}function ka(ua,ia,ga,da,Fa,za,Cn){ua.buffer.bind();var Dn;if(ia){var ui=Cn;!Cn&&(!Xt(ia)||or(ia)&&!Xt(ia.data))&&(ui=It.oes_element_index_uint?Tr:fr),Ut._initBuffer(ua.buffer,ia,ga,ui,3)}else st.bufferData(Ir,za,ga),ua.buffer.dtype=Dn||lt,ua.buffer.usage=ga,ua.buffer.dimension=3,ua.buffer.byteLength=za;if(Dn=Cn,!Cn){switch(ua.buffer.dtype){case lt:case Oa:Dn=lt;break;case fr:case rt:Dn=fr;break;case Tr:case lr:Dn=Tr;break;default:}ua.buffer.dtype=Dn}ua.type=Dn;var cn=Fa;cn<0&&(cn=ua.buffer.byteLength,Dn===fr?cn>>=1:Dn===Tr&&(cn>>=2)),ua.vertCount=cn;var sn=da;if(da<0){sn=Ja;var ei=ua.buffer.dimension;ei===1&&(sn=vi),ei===2&&(sn=Yi),ei===3&&(sn=Ja)}ua.primType=sn}function Ta(ua){ir.elementsCount--,delete dr[ua.id],ua.buffer.destroy(),ua.buffer=null}function Ra(ua,ia){var ga=Ut.create(null,Ir,!0),da=new vr(ga._buffer);ir.elementsCount++;function Fa(za){if(!za)ga(),da.primType=Ja,da.vertCount=0,da.type=lt;else if(typeof za=="number")ga(za),da.primType=Ja,da.vertCount=za|0,da.type=lt;else{var Cn=null,Dn=ot,ui=-1,cn=-1,sn=0,ei=0;Array.isArray(za)||Xt(za)||or(za)?Cn=za:("data"in za&&(Cn=za.data),"usage"in za&&(Dn=nr[za.usage]),"primitive"in za&&(ui=en[za.primitive]),"count"in za&&(cn=za.count|0),"type"in za&&(ei=hr[za.type]),"length"in za?sn=za.length|0:(sn=cn,ei===fr||ei===rt?sn*=2:(ei===Tr||ei===lr)&&(sn*=4))),ka(da,Cn,Dn,ui,cn,sn,ei)}return Fa}return Fa(ua),Fa._reglType="elements",Fa._elements=da,Fa.subdata=function(za,Cn){return ga.subdata(za,Cn),Fa},Fa.destroy=function(){Ta(da)},Fa}return{create:Ra,createStream:Cr,destroyStream:ta,getElements:function(ua){return typeof ua=="function"&&ua._elements instanceof vr?ua._elements:null},clear:function(){Ot(dr).forEach(Ta)}}}var jt=new Float32Array(1),ar=new Uint32Array(jt.buffer),Er=5123;function xr(st){for(var It=j.allocType(Er,st.length),Ut=0;Ut>>31<<15,Ar=(ir<<1>>>24)-127,hr=ir>>13&1023;if(Ar<-24)It[Ut]=dr;else if(Ar<-14){var vr=-14-Ar;It[Ut]=dr+(hr+1024>>vr)}else Ar>15?It[Ut]=dr+31744:It[Ut]=dr+(Ar+15<<10)+hr}return It}function zr(st){return Array.isArray(st)||Xt(st)}var Lr=34467,aa=3553,Sa=34067,wa=34069,pn=6408,tn=6406,ai=6407,rn=6409,Ri=6410,Gn=32854,no=32855,Di=36194,fn=32819,Ai=32820,jn=33635,Xn=34042,eo=6402,gi=34041,qi=35904,io=35906,oo=36193,Vn=33776,qn=33777,Hi=33778,Mi=33779,Ro=35986,go=35987,Eo=34798,Ao=35840,ds=35841,jo=35842,Wo=35843,to=36196,wo=5121,pi=5123,Vi=5125,Io=5126,Xi=10242,Ko=10243,Uo=10497,Ls=33071,Ss=33648,Vo=10240,Vs=10241,Ts=9728,Bo=9729,_o=9984,Pi=9985,yo=9986,bs=9987,Dl=33170,hl=4352,ps=4353,dl=4354,wu=34046,lu=3317,xc=37440,Fl=37441,pl=37443,$u=37444,uu=33984,tl=[_o,yo,Pi,bs],vs=[0,rn,Ri,ai,pn],os={};os[rn]=os[tn]=os[eo]=1,os[gi]=os[Ri]=2,os[ai]=os[qi]=3,os[pn]=os[io]=4;function ms(st){return"[object "+st+"]"}var rl=ms("HTMLCanvasElement"),Fu=ms("OffscreenCanvas"),zu=ms("CanvasRenderingContext2D"),Ku=ms("ImageBitmap"),bc=ms("HTMLImageElement"),Lh=ms("HTMLVideoElement"),rh=Object.keys(et).concat([rl,Fu,zu,Ku,bc,Lh]),Ju=[];Ju[wo]=1,Ju[Io]=4,Ju[oo]=2,Ju[pi]=2,Ju[Vi]=4;var ss=[];ss[Gn]=2,ss[no]=2,ss[Di]=2,ss[gi]=4,ss[Vn]=.5,ss[qn]=.5,ss[Hi]=1,ss[Mi]=1,ss[Ro]=.5,ss[go]=1,ss[Eo]=1,ss[Ao]=.5,ss[ds]=.25,ss[jo]=.5,ss[Wo]=.25,ss[to]=.5;function ah(st){return Array.isArray(st)&&(st.length===0||typeof st[0]=="number")}function wc(st){if(!Array.isArray(st))return!1;var It=st.length;return!(It===0||!zr(st[0]))}function pc(st){return Object.prototype.toString.call(st)}function Nf(st){return pc(st)===rl}function Bu(st){return pc(st)===Fu}function Tc(st){return pc(st)===zu}function Ou(st){return pc(st)===Ku}function Gc(st){return pc(st)===bc}function pf(st){return pc(st)===Lh}function $l(st){if(!st)return!1;var It=pc(st);return rh.indexOf(It)>=0?!0:ah(st)||wc(st)||or(st)}function jf(st){return et[Object.prototype.toString.call(st)]|0}function Hc(st,It){var Ut=It.length;switch(st.type){case wo:case pi:case Vi:case Io:var ir=j.allocType(st.type,Ut);ir.set(It),st.data=ir;break;case oo:st.data=xr(It);break;default:}}function Wc(st,It){return j.allocType(st.type===oo?Io:st.type,It)}function Qu(st,It){st.type===oo?(st.data=xr(It),j.freeType(It)):st.data=It}function Yc(st,It,Ut,ir,dr,Ar){for(var hr=st.width,vr=st.height,Or=st.channels,Cr=hr*vr*Or,ta=Wc(st,Cr),ka=0,Ta=0;Ta=1;)vr+=hr*Or*Or,Or/=2;return vr}else return hr*Ut*ir}function Uf(st,It,Ut,ir,dr,Ar,hr){var vr={"don't care":hl,"dont care":hl,nice:dl,fast:ps},Or={repeat:Uo,clamp:Ls,mirror:Ss},Cr={nearest:Ts,linear:Bo},ta=p({mipmap:bs,"nearest mipmap nearest":_o,"linear mipmap nearest":Pi,"nearest mipmap linear":yo,"linear mipmap linear":bs},Cr),ka={none:0,browser:$u},Ta={uint8:wo,rgba4:fn,rgb565:jn,"rgb5 a1":Ai},Ra={alpha:tn,luminance:rn,"luminance alpha":Ri,rgb:ai,rgba:pn,rgba4:Gn,"rgb5 a1":no,rgb565:Di},ua={};It.ext_srgb&&(Ra.srgb=qi,Ra.srgba=io),It.oes_texture_float&&(Ta.float32=Ta.float=Io),It.oes_texture_half_float&&(Ta.float16=Ta["half float"]=oo),It.webgl_depth_texture&&(p(Ra,{depth:eo,"depth stencil":gi}),p(Ta,{uint16:pi,uint32:Vi,"depth stencil":Xn})),It.webgl_compressed_texture_s3tc&&p(ua,{"rgb s3tc dxt1":Vn,"rgba s3tc dxt1":qn,"rgba s3tc dxt3":Hi,"rgba s3tc dxt5":Mi}),It.webgl_compressed_texture_atc&&p(ua,{"rgb atc":Ro,"rgba atc explicit alpha":go,"rgba atc interpolated alpha":Eo}),It.webgl_compressed_texture_pvrtc&&p(ua,{"rgb pvrtc 4bppv1":Ao,"rgb pvrtc 2bppv1":ds,"rgba pvrtc 4bppv1":jo,"rgba pvrtc 2bppv1":Wo}),It.webgl_compressed_texture_etc1&&(ua["rgb etc1"]=to);var ia=Array.prototype.slice.call(st.getParameter(Lr));Object.keys(ua).forEach(function(ra){var Ya=ua[ra];ia.indexOf(Ya)>=0&&(Ra[ra]=Ya)});var ga=Object.keys(Ra);Ut.textureFormats=ga;var da=[];Object.keys(Ra).forEach(function(ra){var Ya=Ra[ra];da[Ya]=ra});var Fa=[];Object.keys(Ta).forEach(function(ra){var Ya=Ta[ra];Fa[Ya]=ra});var za=[];Object.keys(Cr).forEach(function(ra){var Ya=Cr[ra];za[Ya]=ra});var Cn=[];Object.keys(ta).forEach(function(ra){var Ya=ta[ra];Cn[Ya]=ra});var Dn=[];Object.keys(Or).forEach(function(ra){var Ya=Or[ra];Dn[Ya]=ra});var ui=ga.reduce(function(ra,Ya){var Ka=Ra[Ya];return Ka===rn||Ka===tn||Ka===rn||Ka===Ri||Ka===eo||Ka===gi||It.ext_srgb&&(Ka===qi||Ka===io)?ra[Ka]=Ka:Ka===no||Ya.indexOf("rgba")>=0?ra[Ka]=pn:ra[Ka]=ai,ra},{});function cn(){this.internalformat=pn,this.format=pn,this.type=wo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=$u,this.width=0,this.height=0,this.channels=0}function sn(ra,Ya){ra.internalformat=Ya.internalformat,ra.format=Ya.format,ra.type=Ya.type,ra.compressed=Ya.compressed,ra.premultiplyAlpha=Ya.premultiplyAlpha,ra.flipY=Ya.flipY,ra.unpackAlignment=Ya.unpackAlignment,ra.colorSpace=Ya.colorSpace,ra.width=Ya.width,ra.height=Ya.height,ra.channels=Ya.channels}function ei(ra,Ya){if(!(typeof Ya!="object"||!Ya)){if("premultiplyAlpha"in Ya&&(ra.premultiplyAlpha=Ya.premultiplyAlpha),"flipY"in Ya&&(ra.flipY=Ya.flipY),"alignment"in Ya&&(ra.unpackAlignment=Ya.alignment),"colorSpace"in Ya&&(ra.colorSpace=ka[Ya.colorSpace]),"type"in Ya){var Ka=Ya.type;ra.type=Ta[Ka]}var Bi=ra.width,rs=ra.height,Is=ra.channels,Oi=!1;"shape"in Ya?(Bi=Ya.shape[0],rs=Ya.shape[1],Ya.shape.length===3&&(Is=Ya.shape[2],Oi=!0)):("radius"in Ya&&(Bi=rs=Ya.radius),"width"in Ya&&(Bi=Ya.width),"height"in Ya&&(rs=Ya.height),"channels"in Ya&&(Is=Ya.channels,Oi=!0)),ra.width=Bi|0,ra.height=rs|0,ra.channels=Is|0;var Wr=!1;if("format"in Ya){var na=Ya.format,pa=ra.internalformat=Ra[na];ra.format=ui[pa],na in Ta&&("type"in Ya||(ra.type=Ta[na])),na in ua&&(ra.compressed=!0),Wr=!0}!Oi&&Wr?ra.channels=os[ra.format]:Oi&&!Wr&&ra.channels!==vs[ra.format]&&(ra.format=ra.internalformat=vs[ra.channels])}}function Pn(ra){st.pixelStorei(xc,ra.flipY),st.pixelStorei(Fl,ra.premultiplyAlpha),st.pixelStorei(pl,ra.colorSpace),st.pixelStorei(lu,ra.unpackAlignment)}function Rn(){cn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function In(ra,Ya){var Ka=null;if($l(Ya)?Ka=Ya:Ya&&(ei(ra,Ya),"x"in Ya&&(ra.xOffset=Ya.x|0),"y"in Ya&&(ra.yOffset=Ya.y|0),$l(Ya.data)&&(Ka=Ya.data)),Ya.copy){var Bi=dr.viewportWidth,rs=dr.viewportHeight;ra.width=ra.width||Bi-ra.xOffset,ra.height=ra.height||rs-ra.yOffset,ra.needsCopy=!0}else if(!Ka)ra.width=ra.width||1,ra.height=ra.height||1,ra.channels=ra.channels||4;else if(Xt(Ka))ra.channels=ra.channels||4,ra.data=Ka,!("type"in Ya)&&ra.type===wo&&(ra.type=jf(Ka));else if(ah(Ka))ra.channels=ra.channels||4,Hc(ra,Ka),ra.alignment=1,ra.needsFree=!0;else if(or(Ka)){var Is=Ka.data;!Array.isArray(Is)&&ra.type===wo&&(ra.type=jf(Is));var Oi=Ka.shape,Wr=Ka.stride,na,pa,Wa,ln,Le,Ue;Oi.length===3?(Wa=Oi[2],Ue=Wr[2]):(Wa=1,Ue=1),na=Oi[0],pa=Oi[1],ln=Wr[0],Le=Wr[1],ra.alignment=1,ra.width=na,ra.height=pa,ra.channels=Wa,ra.format=ra.internalformat=vs[Wa],ra.needsFree=!0,Yc(ra,Is,ln,Le,Ue,Ka.offset)}else if(Nf(Ka)||Bu(Ka)||Tc(Ka))Nf(Ka)||Bu(Ka)?ra.element=Ka:ra.element=Ka.canvas,ra.width=ra.element.width,ra.height=ra.element.height,ra.channels=4;else if(Ou(Ka))ra.element=Ka,ra.width=Ka.width,ra.height=Ka.height,ra.channels=4;else if(Gc(Ka))ra.element=Ka,ra.width=Ka.naturalWidth,ra.height=Ka.naturalHeight,ra.channels=4;else if(pf(Ka))ra.element=Ka,ra.width=Ka.videoWidth,ra.height=Ka.videoHeight,ra.channels=4;else if(wc(Ka)){var Qe=ra.width||Ka[0].length,_t=ra.height||Ka.length,wt=ra.channels;zr(Ka[0][0])?wt=wt||Ka[0][0].length:wt=wt||1;for(var Lt=vt.shape(Ka),pr=1,Gr=0;Gr>=rs,Ka.height>>=rs,In(Ka,Bi[rs]),ra.mipmask|=1<=0&&!("faces"in Ya)&&(ra.genMipmaps=!0)}if("mag"in Ya){var Bi=Ya.mag;ra.magFilter=Cr[Bi]}var rs=ra.wrapS,Is=ra.wrapT;if("wrap"in Ya){var Oi=Ya.wrap;typeof Oi=="string"?rs=Is=Or[Oi]:Array.isArray(Oi)&&(rs=Or[Oi[0]],Is=Or[Oi[1]])}else{if("wrapS"in Ya){var Wr=Ya.wrapS;rs=Or[Wr]}if("wrapT"in Ya){var na=Ya.wrapT;Is=Or[na]}}if(ra.wrapS=rs,ra.wrapT=Is,"anisotropic"in Ya){var pa=Ya.anisotropic;ra.anisotropic=Ya.anisotropic}if("mipmap"in Ya){var Wa=!1;switch(typeof Ya.mipmap){case"string":ra.mipmapHint=vr[Ya.mipmap],ra.genMipmaps=!0,Wa=!0;break;case"boolean":Wa=ra.genMipmaps=Ya.mipmap;break;case"object":ra.genMipmaps=!1,Wa=!0;break;default:}Wa&&!("min"in Ya)&&(ra.minFilter=_o)}}function $o(ra,Ya){st.texParameteri(Ya,Vs,ra.minFilter),st.texParameteri(Ya,Vo,ra.magFilter),st.texParameteri(Ya,Xi,ra.wrapS),st.texParameteri(Ya,Ko,ra.wrapT),It.ext_texture_filter_anisotropic&&st.texParameteri(Ya,wu,ra.anisotropic),ra.genMipmaps&&(st.hint(Dl,ra.mipmapHint),st.generateMipmap(Ya))}var _s=0,Go={},Ys=Ut.maxTextureUnits,Ll=Array(Ys).map(function(){return null});function mo(ra){cn.call(this),this.mipmask=0,this.internalformat=pn,this.id=_s++,this.refCount=1,this.target=ra,this.texture=st.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Zo,hr.profile&&(this.stats={size:0})}function ru(ra){st.activeTexture(uu),st.bindTexture(ra.target,ra.texture)}function Rs(){var ra=Ll[0];ra?st.bindTexture(ra.target,ra.texture):st.bindTexture(aa,null)}function Yu(ra){var Ya=ra.texture,Ka=ra.unit,Bi=ra.target;Ka>=0&&(st.activeTexture(uu+Ka),st.bindTexture(Bi,null),Ll[Ka]=null),st.deleteTexture(Ya),ra.texture=null,ra.params=null,ra.pixels=null,ra.refCount=0,delete Go[ra.id],Ar.textureCount--}p(mo.prototype,{bind:function(){var ra=this;ra.bindCount+=1;var Ya=ra.unit;if(Ya<0){for(var Ka=0;Ka0)continue;Bi.unit=-1}Ll[Ka]=ra,Ya=Ka;break}Ya>=Ys,hr.profile&&Ar.maxTextureUnits>Le)-Wa,Ue.height=Ue.height||(Ka.height>>Le)-ln,ru(Ka),Ei(Ue,aa,Wa,ln,Le),Rs(),bi(Ue),Bi}function Is(Oi,Wr){var na=Oi|0,pa=Wr|0||na;if(na===Ka.width&&pa===Ka.height)return Bi;Bi.width=Ka.width=na,Bi.height=Ka.height=pa,ru(Ka);for(var Wa=0;Ka.mipmask>>Wa;++Wa){var ln=na>>Wa,Le=pa>>Wa;if(!ln||!Le)break;st.texImage2D(aa,Wa,Ka.format,ln,Le,0,Ka.format,Ka.type,null)}return Rs(),hr.profile&&(Ka.stats.size=Nu(Ka.internalformat,Ka.type,na,pa,!1,!1)),Bi}return Bi(ra,Ya),Bi.subimage=rs,Bi.resize=Is,Bi._reglType="texture2d",Bi._texture=Ka,hr.profile&&(Bi.stats=Ka.stats),Bi.destroy=function(){Ka.decRef()},Bi}function ql(ra,Ya,Ka,Bi,rs,Is){var Oi=new mo(Sa);Go[Oi.id]=Oi,Ar.cubeCount++;var Wr=new Array(6);function na(ln,Le,Ue,Qe,_t,wt){var Lt,pr=Oi.texInfo;for(Zo.call(pr),Lt=0;Lt<6;++Lt)Wr[Lt]=So();if(typeof ln=="number"||!ln){var Gr=ln|0||1;for(Lt=0;Lt<6;++Lt)ro(Wr[Lt],Gr,Gr)}else if(typeof ln=="object")if(Le)Mo(Wr[0],ln),Mo(Wr[1],Le),Mo(Wr[2],Ue),Mo(Wr[3],Qe),Mo(Wr[4],_t),Mo(Wr[5],wt);else if(es(pr,ln),ei(Oi,ln),"faces"in ln){var va=ln.faces;for(Lt=0;Lt<6;++Lt)sn(Wr[Lt],Oi),Mo(Wr[Lt],va[Lt])}else for(Lt=0;Lt<6;++Lt)Mo(Wr[Lt],ln);for(sn(Oi,Wr[0]),pr.genMipmaps?Oi.mipmask=(Wr[0].width<<1)-1:Oi.mipmask=Wr[0].mipmask,Oi.internalformat=Wr[0].internalformat,na.width=Wr[0].width,na.height=Wr[0].height,ru(Oi),Lt=0;Lt<6;++Lt)zs(Wr[Lt],wa+Lt);for($o(pr,Sa),Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,pr.genMipmaps,!0)),na.format=da[Oi.internalformat],na.type=Fa[Oi.type],na.mag=za[pr.magFilter],na.min=Cn[pr.minFilter],na.wrapS=Dn[pr.wrapS],na.wrapT=Dn[pr.wrapT],Lt=0;Lt<6;++Lt)Ws(Wr[Lt]);return na}function pa(ln,Le,Ue,Qe,_t){var wt=Ue|0,Lt=Qe|0,pr=_t|0,Gr=ti();return sn(Gr,Oi),Gr.width=0,Gr.height=0,In(Gr,Le),Gr.width=Gr.width||(Oi.width>>pr)-wt,Gr.height=Gr.height||(Oi.height>>pr)-Lt,ru(Oi),Ei(Gr,wa+ln,wt,Lt,pr),Rs(),bi(Gr),na}function Wa(ln){var Le=ln|0;if(Le!==Oi.width){na.width=Oi.width=Le,na.height=Oi.height=Le,ru(Oi);for(var Ue=0;Ue<6;++Ue)for(var Qe=0;Oi.mipmask>>Qe;++Qe)st.texImage2D(wa+Ue,Qe,Oi.format,Le>>Qe,Le>>Qe,0,Oi.format,Oi.type,null);return Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,!1,!0)),na}}return na(ra,Ya,Ka,Bi,rs,Is),na.subimage=pa,na.resize=Wa,na._reglType="textureCube",na._texture=Oi,hr.profile&&(na.stats=Oi.stats),na.destroy=function(){Oi.decRef()},na}function fo(){for(var ra=0;ra>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);else for(var rs=0;rs<6;++rs)st.texImage2D(wa+rs,Bi,Ka.internalformat,Ka.width>>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);$o(Ka.texInfo,Ka.target)})}function Os(){for(var ra=0;ra=0?Ws=!0:Or.indexOf(Zo)>=0&&(Ws=!1))),("depthTexture"in mo||"depthStencilTexture"in mo)&&(Ll=!!(mo.depthTexture||mo.depthStencilTexture)),"depth"in mo&&(typeof mo.depth=="boolean"?zs=mo.depth:(_s=mo.depth,Bs=!1)),"stencil"in mo&&(typeof mo.stencil=="boolean"?Bs=mo.stencil:(Go=mo.stencil,zs=!1)),"depthStencil"in mo&&(typeof mo.depthStencil=="boolean"?zs=Bs=mo.depthStencil:(Ys=mo.depthStencil,zs=!1,Bs=!1))}var Rs=null,Yu=null,Ul=null,ql=null;if(Array.isArray(So))Rs=So.map(ua);else if(So)Rs=[ua(So)];else for(Rs=new Array($o),Wi=0;Wi<$o;++Wi)Rs[Wi]=ia(ro,Mo,Ws,Zo,es);ro=ro||Rs[0].width,Mo=Mo||Rs[0].height,_s?Yu=ua(_s):zs&&!Bs&&(Yu=ia(ro,Mo,Ll,"depth","uint32")),Go?Ul=ua(Go):Bs&&!zs&&(Ul=ia(ro,Mo,!1,"stencil","uint8")),Ys?ql=ua(Ys):!_s&&!Go&&Bs&&zs&&(ql=ia(ro,Mo,Ll,"depth stencil","depth stencil"));var fo=null;for(Wi=0;Wi0&&(bi.depth=In[0].depth,bi.stencil=In[0].stencil,bi.depthStencil=In[0].depthStencil),In[ti]?In[ti](bi):In[ti]=sn(bi)}return p(Jn,{width:Wi,height:Wi,color:Zo})}function Ei(so){var ti,bi=so|0;if(bi===Jn.width)return Jn;var Wi=Jn.color;for(ti=0;ti=Wi.byteLength?ro.subdata(Wi):(ro.destroy(),sn.buffers[so]=null)),sn.buffers[so]||(ro=sn.buffers[so]=dr.create(ti,hu,!1,!0)),bi.buffer=dr.getBuffer(ro),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1,Jn[so]=1}else dr.getBuffer(ti)?(bi.buffer=dr.getBuffer(ti),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1):dr.getBuffer(ti.buffer)?(bi.buffer=dr.getBuffer(ti.buffer),bi.size=(+ti.size||bi.buffer.dimension)|0,bi.normalized=!!ti.normalized||!1,"type"in ti?bi.type=Kr[ti.type]:bi.type=bi.buffer.dtype,bi.offset=(ti.offset||0)|0,bi.stride=(ti.stride||0)|0,bi.divisor=(ti.divisor||0)|0,bi.state=1):"x"in ti&&(bi.x=+ti.x||0,bi.y=+ti.y||0,bi.z=+ti.z||0,bi.w=+ti.w||0,bi.state=2)}for(var Mo=0;Mo1)for(var Pn=0;Pnia&&(ia=ga.stats.uniformsCount)}),ia},Ut.getMaxAttributesCount=function(){var ia=0;return ta.forEach(function(ga){ga.stats.attributesCount>ia&&(ia=ga.stats.attributesCount)}),ia});function ua(){dr={},Ar={};for(var ia=0;ia16&&(Ut=Da(Ut,st.length*8));for(var ir=Array(16),dr=Array(16),Ar=0;Ar<16;Ar++)ir[Ar]=Ut[Ar]^909522486,dr[Ar]=Ut[Ar]^1549556828;var hr=Da(ir.concat(vc(It)),512+It.length*8);return Ft(Da(dr.concat(hr),768))}function kl(st){for(var It=xf?"0123456789ABCDEF":"0123456789abcdef",Ut="",ir,dr=0;dr>>4&15)+It.charAt(ir&15);return Ut}function kc(st){for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut="",ir=st.length,dr=0;drst.length*8?Ut+=Gf:Ut+=It.charAt(Ar>>>6*(3-hr)&63);return Ut}function Cc(st,It){var Ut=It.length,ir=Array(),dr,Ar,hr,vr,Or=Array(Math.ceil(st.length/2));for(dr=0;dr0;){for(vr=Array(),hr=0,dr=0;dr0||Ar>0)&&(vr[vr.length]=Ar);ir[ir.length]=hr,Or=vr}var Cr="";for(dr=ir.length-1;dr>=0;dr--)Cr+=It.charAt(ir[dr]);var ta=Math.ceil(st.length*8/(Math.log(It.length)/Math.log(2)));for(dr=Cr.length;dr>>6&31,128|ir&63):ir<=65535?It+=String.fromCharCode(224|ir>>>12&15,128|ir>>>6&63,128|ir&63):ir<=2097151&&(It+=String.fromCharCode(240|ir>>>18&7,128|ir>>>12&63,128|ir>>>6&63,128|ir&63));return It}function vc(st){for(var It=Array(st.length>>2),Ut=0;Ut>5]|=(st.charCodeAt(Ut/8)&255)<<24-Ut%32;return It}function Ft(st){for(var It="",Ut=0;Ut>5]>>>24-Ut%32&255);return It}function tr(st,It){return st>>>It|st<<32-It}function Fr(st,It){return st>>>It}function wr(st,It,Ut){return st&It^~st&Ut}function ea(st,It,Ut){return st&It^st&Ut^It&Ut}function ba(st){return tr(st,2)^tr(st,13)^tr(st,22)}function Ia(st){return tr(st,6)^tr(st,11)^tr(st,25)}function Na(st){return tr(st,7)^tr(st,18)^Fr(st,3)}function Za(st){return tr(st,17)^tr(st,19)^Fr(st,10)}var mn=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 Da(st,It){var Ut=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ir=new Array(64),dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia;for(st[It>>5]|=128<<24-It%32,st[(It+64>>9<<4)+15]=It,Ta=0;Ta>16)+(It>>16)+(Ut>>16);return ir<<16|Ut&65535}function $a(st){return Array.prototype.slice.call(st)}function vn(st){return $a(st).join("")}function En(st){var It=st&&st.cache,Ut=0,ir=[],dr=[],Ar=[];function hr(ua,ia){var ga=ia&&ia.stable;if(!ga){for(var da=0;da0&&(ua.push(Fa,"="),ua.push.apply(ua,$a(arguments)),ua.push(";")),Fa}return p(ia,{def:da,toString:function(){return vn([ga.length>0?"var "+ga.join(",")+";":"",vn(ua)])}})}function Or(){var ua=vr(),ia=vr(),ga=ua.toString,da=ia.toString;function Fa(za,Cn){ia(za,Cn,"=",ua.def(za,Cn),";")}return p(function(){ua.apply(ua,$a(arguments))},{def:ua.def,entry:ua,exit:ia,save:Fa,set:function(za,Cn,Dn){Fa(za,Cn),ua(za,Cn,"=",Dn,";")},toString:function(){return ga()+da()}})}function Cr(){var ua=vn(arguments),ia=Or(),ga=Or(),da=ia.toString,Fa=ga.toString;return p(ia,{then:function(){return ia.apply(ia,$a(arguments)),this},else:function(){return ga.apply(ga,$a(arguments)),this},toString:function(){var za=Fa();return za&&(za="else{"+za+"}"),vn(["if(",ua,"){",da(),"}",za])}})}var ta=vr(),ka={};function Ta(ua,ia){var ga=[];function da(){var ui="a"+ga.length;return ga.push(ui),ui}ia=ia||0;for(var Fa=0;Fa":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},pr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},xr={cw:Te,ccw:Pe};function Dr(xt){return Array.isArray(xt)||pt(xt)||Tt(xt)}function Lr(xt){return xt.sort(function(nr,fr){return nr===sc?-1:fr===sc?1:nr=1,Or>=2,nr)}else if(fr===ao){var Xr=xt.data;return new mr(Xr.thisDep,Xr.contextDep,Xr.propDep,nr)}else{if(fr===Co)return new mr(!1,!1,!1,nr);if(fr===ho){for(var aa=!1,Wr=!1,wa=!1,za=0;za=1&&(Wr=!0),Na>=2&&(wa=!0)}else Ba.type===ao&&(aa=aa||Ba.data.thisDep,Wr=Wr||Ba.data.contextDep,wa=wa||Ba.data.propDep)}return new mr(aa,Wr,wa,nr)}else return new mr(fr===pn,fr===Ki,fr===Ga,nr)}}var ei=new mr(!1,!1,!1,function(){});function bi(xt,nr,fr,Or,Xr,aa,Wr,wa,za,Ba,Na,Ji,ki,ii,ma,Ir){var fa=Ba.Record,Pa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Pa.min=ze,Pa.max=Ne);var Ha=fr.angle_instanced_arrays,Ta=fr.webgl_draw_buffers,hi=fr.oes_vertex_array_object,oi={dirty:!0,profile:Ir.profile},an={},Aa=[],ga={},wi={};function ri(tr){return tr.replace(".","_")}function $a(tr,hr,_r){var Zr=ri(tr);Aa.push(tr),an[Zr]=oi[Zr]=!!_r,ga[Zr]=hr}function Ja(tr,hr,_r){var Zr=ri(tr);Aa.push(tr),Array.isArray(_r)?(oi[Zr]=_r.slice(),an[Zr]=_r.slice()):oi[Zr]=an[Zr]=_r,wi[Zr]=hr}function Ai(tr){return!!isNaN(tr)}$a(No,oa),$a(Wn,Br),Ja(Os,"blendColor",[0,0,0,0]),Ja(fs,"blendEquationSeparate",[Rt,Rt]),Ja(zo,"blendFuncSeparate",[Ft,yt,Ft,yt]),$a(Qa,si,!0),Ja(io,"depthFunc",er),Ja(Ms,"depthRange",[0,1]),Ja(Ns,"depthMask",!0),Ja(jl,jl,[!0,!0,!0,!0]),$a(zu,Er),Ja(tu,"cullFace",de),Ja(Lc,Lc,Pe),Ja(Cl,Cl,1),$a(oc,Qi),Ja(of,"polygonOffset",[0,0]),$a(Cf,on),$a(Jd,yn),Ja(Ph,"sampleCoverage",[1,!1]),$a(kp,Ma),Ja(cd,"stencilMask",-1),Ja(ru,"stencilFunc",[lt,0,-1]),Ja(Cp,"stencilOpSeparate",[ae,Qe,Qe,Qe]),Ja(th,"stencilOpSeparate",[de,Qe,Qe,Qe]),$a(fd,Wi),Ja(hd,"scissor",[0,0,xt.drawingBufferWidth,xt.drawingBufferHeight]),Ja(sc,sc,[0,0,xt.drawingBufferWidth,xt.drawingBufferHeight]);var nn={gl:xt,context:ki,strings:nr,next:an,current:oi,draw:Ji,elements:aa,buffer:Xr,shader:Na,attributes:Ba.state,vao:Ba,uniforms:za,framebuffer:wa,extensions:fr,timer:ii,isBufferArgs:Dr},Ln={primTypes:na,compareFuncs:ir,blendFuncs:Cr,blendEquations:Pa,stencilOps:pr,glTypes:ar,orientationType:xr};Ta&&(Ln.backBuffer=[de],Ln.drawBuffer=T(Or.maxDrawbuffers,function(tr){return tr===0?[0]:T(tr,function(hr){return wr+hr})}));var fi=0;function zi(){var tr=La({cache:ma}),hr=tr.link,_r=tr.global;tr.id=fi++,tr.batchId="0";var Zr=hr(nn),sa=tr.shared={props:"a0"};Object.keys(nn).forEach(function(Xe){sa[Xe]=_r.def(Zr,".",Xe)});var ve=tr.next={},Ae=tr.current={};Object.keys(wi).forEach(function(Xe){Array.isArray(oi[Xe])&&(ve[Xe]=_r.def(sa.next,".",Xe),Ae[Xe]=_r.def(sa.current,".",Xe))});var Le=tr.constants={};Object.keys(Ln).forEach(function(Xe){Le[Xe]=_r.def(JSON.stringify(Ln[Xe]))}),tr.invoke=function(Xe,rt){switch(rt.type){case Ra:var Ct=["this",sa.context,sa.props,tr.batchId];return Xe.def(hr(rt.data),".call(",Ct.slice(0,Math.max(rt.data.length+1,4)),")");case Ga:return Xe.def(sa.props,rt.data);case Ki:return Xe.def(sa.context,rt.data);case pn:return Xe.def("this",rt.data);case ao:return rt.data.append(tr,Xe),rt.data.ref;case Co:return rt.data.toString();case ho:return rt.data.map(function(Jt){return tr.invoke(Xe,Jt)})}},tr.attribCache={};var We={};return tr.scopeAttrib=function(Xe){var rt=nr.id(Xe);if(rt in We)return We[rt];var Ct=Ba.scope[rt];Ct||(Ct=Ba.scope[rt]=new fa);var Jt=We[rt]=hr(Ct);return Jt},tr}function Sn(tr){var hr=tr.static,_r=tr.dynamic,Zr;if(Qd in hr){var sa=!!hr[Qd];Zr=ka(function(Ae,Le){return sa}),Zr.enable=sa}else if(Qd in _r){var ve=_r[Qd];Zr=Ua(ve,function(Ae,Le){return Ae.invoke(Le,ve)})}return Zr}function kn(tr,hr){var _r=tr.static,Zr=tr.dynamic;if(Df in _r){var sa=_r[Df];return sa?(sa=wa.getFramebuffer(sa),ka(function(Ae,Le){var We=Ae.link(sa),Xe=Ae.shared;Le.set(Xe.framebuffer,".next",We);var rt=Xe.context;return Le.set(rt,"."+$e,We+".width"),Le.set(rt,"."+ot,We+".height"),We})):ka(function(Ae,Le){var We=Ae.shared;Le.set(We.framebuffer,".next","null");var Xe=We.context;return Le.set(Xe,"."+$e,Xe+"."+Xt),Le.set(Xe,"."+ot,Xe+"."+Nt),"null"})}else if(Df in Zr){var ve=Zr[Df];return Ua(ve,function(Ae,Le){var We=Ae.invoke(Le,ve),Xe=Ae.shared,rt=Xe.framebuffer,Ct=Le.def(rt,".getFramebuffer(",We,")");Le.set(rt,".next",Ct);var Jt=Xe.context;return Le.set(Jt,"."+$e,Ct+"?"+Ct+".width:"+Jt+"."+Xt),Le.set(Jt,"."+ot,Ct+"?"+Ct+".height:"+Jt+"."+Nt),Ct})}else return null}function so(tr,hr,_r){var Zr=tr.static,sa=tr.dynamic;function ve(We){if(We in Zr){var Xe=Zr[We],rt=!0,Ct=Xe.x|0,Jt=Xe.y|0,br,ea;return"width"in Xe?br=Xe.width|0:rt=!1,"height"in Xe?ea=Xe.height|0:rt=!1,new mr(!rt&&hr&&hr.thisDep,!rt&&hr&&hr.contextDep,!rt&&hr&&hr.propDep,function(ba,ca){var _a=ba.shared.context,Ea=br;"width"in Xe||(Ea=ca.def(_a,".",$e,"-",Ct));var Ia=ea;return"height"in Xe||(Ia=ca.def(_a,".",ot,"-",Jt)),[Ct,Jt,Ea,Ia]})}else if(We in sa){var Vr=sa[We],Ur=Ua(Vr,function(ba,ca){var _a=ba.invoke(ca,Vr),Ea=ba.shared.context,Ia=ca.def(_a,".x|0"),Za=ca.def(_a,".y|0"),Mi=ca.def('"width" in ',_a,"?",_a,".width|0:","(",Ea,".",$e,"-",Ia,")"),lo=ca.def('"height" in ',_a,"?",_a,".height|0:","(",Ea,".",ot,"-",Za,")");return[Ia,Za,Mi,lo]});return hr&&(Ur.thisDep=Ur.thisDep||hr.thisDep,Ur.contextDep=Ur.contextDep||hr.contextDep,Ur.propDep=Ur.propDep||hr.propDep),Ur}else return hr?new mr(hr.thisDep,hr.contextDep,hr.propDep,function(ba,ca){var _a=ba.shared.context;return[0,0,ca.def(_a,".",$e),ca.def(_a,".",ot)]}):null}var Ae=ve(sc);if(Ae){var Le=Ae;Ae=new mr(Ae.thisDep,Ae.contextDep,Ae.propDep,function(We,Xe){var rt=Le.append(We,Xe),Ct=We.shared.context;return Xe.set(Ct,"."+nt,rt[2]),Xe.set(Ct,"."+ht,rt[3]),rt})}return{viewport:Ae,scissor_box:ve(hd)}}function Us(tr,hr){var _r=tr.static,Zr=typeof _r[Lf]=="string"&&typeof _r[Ih]=="string";if(Zr){if(Object.keys(hr.dynamic).length>0)return null;var sa=hr.static,ve=Object.keys(sa);if(ve.length>0&&typeof sa[ve[0]]=="number"){for(var Ae=[],Le=0;Le"+Ia+"?"+rt+".constant["+Ia+"]:0;"}).join(""),"}}else{","if(",br,"(",rt,".buffer)){",ba,"=",ea,".createStream(",or,",",rt,".buffer);","}else{",ba,"=",ea,".getBuffer(",rt,".buffer);","}",ca,'="type" in ',rt,"?",Jt.glTypes,"[",rt,".type]:",ba,".dtype;",Vr.normalized,"=!!",rt,".normalized;");function _a(Ea){Xe(Vr[Ea],"=",rt,".",Ea,"|0;")}return _a("size"),_a("offset"),_a("stride"),_a("divisor"),Xe("}}"),Xe.exit("if(",Vr.isStream,"){",ea,".destroyStream(",ba,");","}"),Vr}sa[ve]=Ua(Ae,Le)}),sa}function Rc(tr){var hr=tr.static,_r=tr.dynamic,Zr={};return Object.keys(hr).forEach(function(sa){var ve=hr[sa];Zr[sa]=ka(function(Ae,Le){return typeof ve=="number"||typeof ve=="boolean"?""+ve:Ae.link(ve)})}),Object.keys(_r).forEach(function(sa){var ve=_r[sa];Zr[sa]=Ua(ve,function(Ae,Le){return Ae.invoke(Le,ve)})}),Zr}function cf(tr,hr,_r,Zr,sa){var ve=tr.static,Ae=tr.dynamic,Le=Us(tr,hr),We=kn(tr,sa),Xe=so(tr,We,sa),rt=bo(tr,sa),Ct=uf(tr,sa),Jt=iu(tr,sa,Le);function br(_a){var Ea=Xe[_a];Ea&&(Ct[_a]=Ea)}br(sc),br(ri(hd));var ea=Object.keys(Ct).length>0,Vr={framebuffer:We,draw:rt,shader:Jt,state:Ct,dirty:ea,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Vr.profile=Sn(tr,sa),Vr.uniforms=hs(_r,sa),Vr.drawVAO=Vr.scopeVAO=rt.vao,!Vr.drawVAO&&Jt.program&&!Le&&fr.angle_instanced_arrays&&rt.static.elements){var Ur=!0,ba=Jt.program.attributes.map(function(_a){var Ea=hr.static[_a];return Ur=Ur&&!!Ea,Ea});if(Ur&&ba.length>0){var ca=Ba.getVAO(Ba.createVAO({attributes:ba,elements:rt.static.elements}));Vr.drawVAO=new mr(null,null,null,function(_a,Ea){return _a.link(ca)}),Vr.useVAO=!0}}return Le?Vr.useVAO=!0:Vr.attributes=cc(hr,sa),Vr.context=Rc(Zr,sa),Vr}function ql(tr,hr,_r){var Zr=tr.shared,sa=Zr.context,ve=tr.scope();Object.keys(_r).forEach(function(Ae){hr.save(sa,"."+Ae);var Le=_r[Ae],We=Le.append(tr,hr);Array.isArray(We)?ve(sa,".",Ae,"=[",We.join(),"];"):ve(sa,".",Ae,"=",We,";")}),hr(ve)}function Vl(tr,hr,_r,Zr){var sa=tr.shared,ve=sa.gl,Ae=sa.framebuffer,Le;Ta&&(Le=hr.def(sa.extensions,".webgl_draw_buffers"));var We=tr.constants,Xe=We.drawBuffer,rt=We.backBuffer,Ct;_r?Ct=_r.append(tr,hr):Ct=hr.def(Ae,".next"),Zr||hr("if(",Ct,"!==",Ae,".cur){"),hr("if(",Ct,"){",ve,".bindFramebuffer(",Qt,",",Ct,".framebuffer);"),Ta&&hr(Le,".drawBuffersWEBGL(",Xe,"[",Ct,".colorAttachments.length]);"),hr("}else{",ve,".bindFramebuffer(",Qt,",null);"),Ta&&hr(Le,".drawBuffersWEBGL(",rt,");"),hr("}",Ae,".cur=",Ct,";"),Zr||hr("}")}function nu(tr,hr,_r){var Zr=tr.shared,sa=Zr.gl,ve=tr.current,Ae=tr.next,Le=Zr.current,We=Zr.next,Xe=tr.cond(Le,".dirty");Aa.forEach(function(rt){var Ct=ri(rt);if(!(Ct in _r.state)){var Jt,br;if(Ct in Ae){Jt=Ae[Ct],br=ve[Ct];var ea=T(oi[Ct].length,function(Ur){return Xe.def(Jt,"[",Ur,"]")});Xe(tr.cond(ea.map(function(Ur,ba){return Ur+"!=="+br+"["+ba+"]"}).join("||")).then(sa,".",wi[Ct],"(",ea,");",ea.map(function(Ur,ba){return br+"["+ba+"]="+Ur}).join(";"),";"))}else{Jt=Xe.def(We,".",Ct);var Vr=tr.cond(Jt,"!==",Le,".",Ct);Xe(Vr),Ct in ga?Vr(tr.cond(Jt).then(sa,".enable(",ga[Ct],");").else(sa,".disable(",ga[Ct],");"),Le,".",Ct,"=",Jt,";"):Vr(sa,".",wi[Ct],"(",Jt,");",Le,".",Ct,"=",Jt,";")}}}),Object.keys(_r.state).length===0&&Xe(Le,".dirty=false;"),hr(Xe)}function Xn(tr,hr,_r,Zr){var sa=tr.shared,ve=tr.current,Ae=sa.current,Le=sa.gl,We;Lr(Object.keys(_r)).forEach(function(Xe){var rt=_r[Xe];if(!(Zr&&!Zr(rt))){var Ct=rt.append(tr,hr);if(ga[Xe]){var Jt=ga[Xe];ha(rt)?(We=tr.link(Ct,{stable:!0}),hr(tr.cond(We).then(Le,".enable(",Jt,");").else(Le,".disable(",Jt,");")),hr(Ae,".",Xe,"=",We,";")):(hr(tr.cond(Ct).then(Le,".enable(",Jt,");").else(Le,".disable(",Jt,");")),hr(Ae,".",Xe,"=",Ct,";"))}else if(Wt(Ct)){var br=ve[Xe];hr(Le,".",wi[Xe],"(",Ct,");",Ct.map(function(ea,Vr){return br+"["+Vr+"]="+ea}).join(";"),";")}else ha(rt)?(We=tr.link(Ct,{stable:!0}),hr(Le,".",wi[Xe],"(",We,");",Ae,".",Xe,"=",We,";")):hr(Le,".",wi[Xe],"(",Ct,");",Ae,".",Xe,"=",Ct,";")}})}function xu(tr,hr){Ha&&(tr.instancing=hr.def(tr.shared.extensions,".angle_instanced_arrays"))}function xs(tr,hr,_r,Zr,sa){var ve=tr.shared,Ae=tr.stats,Le=ve.current,We=ve.timer,Xe=_r.profile;function rt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Ct,Jt;function br(_a){Ct=hr.def(),_a(Ct,"=",rt(),";"),typeof sa=="string"?_a(Ae,".count+=",sa,";"):_a(Ae,".count++;"),ii&&(Zr?(Jt=hr.def(),_a(Jt,"=",We,".getNumPendingQueries();")):_a(We,".beginQuery(",Ae,");"))}function ea(_a){_a(Ae,".cpuTime+=",rt(),"-",Ct,";"),ii&&(Zr?_a(We,".pushScopeStats(",Jt,",",We,".getNumPendingQueries(),",Ae,");"):_a(We,".endQuery();"))}function Vr(_a){var Ea=hr.def(Le,".profile");hr(Le,".profile=",_a,";"),hr.exit(Le,".profile=",Ea,";")}var Ur;if(Xe){if(ha(Xe)){Xe.enable?(br(hr),ea(hr.exit),Vr("true")):Vr("false");return}Ur=Xe.append(tr,hr),Vr(Ur)}else Ur=hr.def(Le,".profile");var ba=tr.block();br(ba),hr("if(",Ur,"){",ba,"}");var ca=tr.block();ea(ca),hr.exit("if(",Ur,"){",ca,"}")}function zc(tr,hr,_r,Zr,sa){var ve=tr.shared;function Ae(We){switch(We){case Io:case Dl:case xl:return 2;case Pn:case lc:case Ou:return 3;case es:case sf:case Fc:return 4;default:return 1}}function Le(We,Xe,rt){var Ct=ve.gl,Jt=hr.def(We,".location"),br=hr.def(ve.attributes,"[",Jt,"]"),ea=rt.state,Vr=rt.buffer,Ur=[rt.x,rt.y,rt.z,rt.w],ba=["buffer","normalized","offset","stride"];function ca(){hr("if(!",br,".buffer){",Ct,".enableVertexAttribArray(",Jt,");}");var Ea=rt.type,Ia;if(rt.size?Ia=hr.def(rt.size,"||",Xe):Ia=Xe,hr("if(",br,".type!==",Ea,"||",br,".size!==",Ia,"||",ba.map(function(Mi){return br+"."+Mi+"!=="+rt[Mi]}).join("||"),"){",Ct,".bindBuffer(",or,",",Vr,".buffer);",Ct,".vertexAttribPointer(",[Jt,Ia,Ea,rt.normalized,rt.stride,rt.offset],");",br,".type=",Ea,";",br,".size=",Ia,";",ba.map(function(Mi){return br+"."+Mi+"="+rt[Mi]+";"}).join(""),"}"),Ha){var Za=rt.divisor;hr("if(",br,".divisor!==",Za,"){",tr.instancing,".vertexAttribDivisorANGLE(",[Jt,Za],");",br,".divisor=",Za,";}")}}function _a(){hr("if(",br,".buffer){",Ct,".disableVertexAttribArray(",Jt,");",br,".buffer=null;","}if(",gi.map(function(Ea,Ia){return br+"."+Ea+"!=="+Ur[Ia]}).join("||"),"){",Ct,".vertexAttrib4f(",Jt,",",Ur,");",gi.map(function(Ea,Ia){return br+"."+Ea+"="+Ur[Ia]+";"}).join(""),"}")}ea===Pi?ca():ea===ji?_a():(hr("if(",ea,"===",Pi,"){"),ca(),hr("}else{"),_a(),hr("}"))}Zr.forEach(function(We){var Xe=We.name,rt=_r.attributes[Xe],Ct;if(rt){if(!sa(rt))return;Ct=rt.append(tr,hr)}else{if(!sa(ei))return;var Jt=tr.scopeAttrib(Xe);Ct={},Object.keys(new fa).forEach(function(br){Ct[br]=hr.def(Jt,".",br)})}Le(tr.link(We),Ae(We.info.type),Ct)})}function ff(tr,hr,_r,Zr,sa,ve){for(var Ae=tr.shared,Le=Ae.gl,We,Xe=0;Xe1){for(var ps=[],Qs=[],bl=0;bl>1)",Vr],");")}function Za(){_r(Ur,".drawArraysInstancedANGLE(",[Jt,br,ea,Vr],");")}rt&&rt!=="null"?ca?Ia():(_r("if(",rt,"){"),Ia(),_r("}else{"),Za(),_r("}")):Za()}function Ea(){function Ia(){_r(ve+".drawElements("+[Jt,ea,ba,br+"<<(("+ba+"-"+pi+")>>1)"]+");")}function Za(){_r(ve+".drawArrays("+[Jt,br,ea]+");")}rt&&rt!=="null"?ca?Ia():(_r("if(",rt,"){"),Ia(),_r("}else{"),Za(),_r("}")):Za()}Ha&&(typeof Vr!="number"||Vr>=0)?typeof Vr=="string"?(_r("if(",Vr,">0){"),_a(),_r("}else if(",Vr,"<0){"),Ea(),_r("}")):_a():Ea()}function Nn(tr,hr,_r,Zr,sa){var ve=zi(),Ae=ve.proc("body",sa);return Ha&&(ve.instancing=Ae.def(ve.shared.extensions,".angle_instanced_arrays")),tr(ve,Ae,_r,Zr),ve.compile().body}function Do(tr,hr,_r,Zr){xu(tr,hr),_r.useVAO?_r.drawVAO?hr(tr.shared.vao,".setVAO(",_r.drawVAO.append(tr,hr),");"):hr(tr.shared.vao,".setVAO(",tr.shared.vao,".targetVAO);"):(hr(tr.shared.vao,".setVAO(null);"),zc(tr,hr,_r,Zr.attributes,function(){return!0})),ff(tr,hr,_r,Zr.uniforms,function(){return!0},!1),hf(tr,hr,hr,_r)}function Ps(tr,hr){var _r=tr.proc("draw",1);xu(tr,_r),ql(tr,_r,hr.context),Vl(tr,_r,hr.framebuffer),nu(tr,_r,hr),Xn(tr,_r,hr.state),xs(tr,_r,hr,!1,!0);var Zr=hr.shader.progVar.append(tr,_r);if(_r(tr.shared.gl,".useProgram(",Zr,".program);"),hr.shader.program)Do(tr,_r,hr,hr.shader.program);else{_r(tr.shared.vao,".setVAO(null);");var sa=tr.global.def("{}"),ve=_r.def(Zr,".id"),Ae=_r.def(sa,"[",ve,"]");_r(tr.cond(Ae).then(Ae,".call(this,a0);").else(Ae,"=",sa,"[",ve,"]=",tr.link(function(Le){return Nn(Do,tr,hr,Le,1)}),"(",Zr,");",Ae,".call(this,a0);"))}Object.keys(hr.state).length>0&&_r(tr.shared.current,".dirty=true;"),tr.shared.vao&&_r(tr.shared.vao,".setVAO(null);")}function ur(tr,hr,_r,Zr){tr.batchId="a1",xu(tr,hr);function sa(){return!0}zc(tr,hr,_r,Zr.attributes,sa),ff(tr,hr,_r,Zr.uniforms,sa,!1),hf(tr,hr,hr,_r)}function Kr(tr,hr,_r,Zr){xu(tr,hr);var sa=_r.contextDep,ve=hr.def(),Ae="a0",Le="a1",We=hr.def();tr.shared.props=We,tr.batchId=ve;var Xe=tr.scope(),rt=tr.scope();hr(Xe.entry,"for(",ve,"=0;",ve,"<",Le,";++",ve,"){",We,"=",Ae,"[",ve,"];",rt,"}",Xe.exit);function Ct(ba){return ba.contextDep&&sa||ba.propDep}function Jt(ba){return!Ct(ba)}if(_r.needsContext&&ql(tr,rt,_r.context),_r.needsFramebuffer&&Vl(tr,rt,_r.framebuffer),Xn(tr,rt,_r.state,Ct),_r.profile&&Ct(_r.profile)&&xs(tr,rt,_r,!1,!0),Zr)_r.useVAO?_r.drawVAO?Ct(_r.drawVAO)?rt(tr.shared.vao,".setVAO(",_r.drawVAO.append(tr,rt),");"):Xe(tr.shared.vao,".setVAO(",_r.drawVAO.append(tr,Xe),");"):Xe(tr.shared.vao,".setVAO(",tr.shared.vao,".targetVAO);"):(Xe(tr.shared.vao,".setVAO(null);"),zc(tr,Xe,_r,Zr.attributes,Jt),zc(tr,rt,_r,Zr.attributes,Ct)),ff(tr,Xe,_r,Zr.uniforms,Jt,!1),ff(tr,rt,_r,Zr.uniforms,Ct,!0),hf(tr,Xe,rt,_r);else{var br=tr.global.def("{}"),ea=_r.shader.progVar.append(tr,rt),Vr=rt.def(ea,".id"),Ur=rt.def(br,"[",Vr,"]");rt(tr.shared.gl,".useProgram(",ea,".program);","if(!",Ur,"){",Ur,"=",br,"[",Vr,"]=",tr.link(function(ba){return Nn(ur,tr,_r,ba,2)}),"(",ea,");}",Ur,".call(this,a0[",ve,"],",ve,");")}}function Jr(tr,hr){var _r=tr.proc("batch",2);tr.batchId="0",xu(tr,_r);var Zr=!1,sa=!0;Object.keys(hr.context).forEach(function(br){Zr=Zr||hr.context[br].propDep}),Zr||(ql(tr,_r,hr.context),sa=!1);var ve=hr.framebuffer,Ae=!1;ve?(ve.propDep?Zr=Ae=!0:ve.contextDep&&Zr&&(Ae=!0),Ae||Vl(tr,_r,ve)):Vl(tr,_r,null),hr.state.viewport&&hr.state.viewport.propDep&&(Zr=!0);function Le(br){return br.contextDep&&Zr||br.propDep}nu(tr,_r,hr),Xn(tr,_r,hr.state,function(br){return!Le(br)}),(!hr.profile||!Le(hr.profile))&&xs(tr,_r,hr,!1,"a1"),hr.contextDep=Zr,hr.needsContext=sa,hr.needsFramebuffer=Ae;var We=hr.shader.progVar;if(We.contextDep&&Zr||We.propDep)Kr(tr,_r,hr,null);else{var Xe=We.append(tr,_r);if(_r(tr.shared.gl,".useProgram(",Xe,".program);"),hr.shader.program)Kr(tr,_r,hr,hr.shader.program);else{_r(tr.shared.vao,".setVAO(null);");var rt=tr.global.def("{}"),Ct=_r.def(Xe,".id"),Jt=_r.def(rt,"[",Ct,"]");_r(tr.cond(Jt).then(Jt,".call(this,a0,a1);").else(Jt,"=",rt,"[",Ct,"]=",tr.link(function(br){return Nn(Kr,tr,hr,br,2)}),"(",Xe,");",Jt,".call(this,a0,a1);"))}}Object.keys(hr.state).length>0&&_r(tr.shared.current,".dirty=true;"),tr.shared.vao&&_r(tr.shared.vao,".setVAO(null);")}function Gi(tr,hr){var _r=tr.proc("scope",3);tr.batchId="a2";var Zr=tr.shared,sa=Zr.current;if(ql(tr,_r,hr.context),hr.framebuffer&&hr.framebuffer.append(tr,_r),Lr(Object.keys(hr.state)).forEach(function(Le){var We=hr.state[Le],Xe=We.append(tr,_r);Wt(Xe)?Xe.forEach(function(rt,Ct){Ai(rt)?_r.set(tr.next[Le],"["+Ct+"]",rt):_r.set(tr.next[Le],"["+Ct+"]",tr.link(rt,{stable:!0}))}):ha(We)?_r.set(Zr.next,"."+Le,tr.link(Xe,{stable:!0})):_r.set(Zr.next,"."+Le,Xe)}),xs(tr,_r,hr,!0,!0),[Bu,ep,rh,au,Ff].forEach(function(Le){var We=hr.draw[Le];if(We){var Xe=We.append(tr,_r);Ai(Xe)?_r.set(Zr.draw,"."+Le,Xe):_r.set(Zr.draw,"."+Le,tr.link(Xe),{stable:!0})}}),Object.keys(hr.uniforms).forEach(function(Le){var We=hr.uniforms[Le].append(tr,_r);Array.isArray(We)&&(We="["+We.map(function(Xe){return Ai(Xe)?Xe:tr.link(Xe,{stable:!0})})+"]"),_r.set(Zr.uniforms,"["+tr.link(nr.id(Le),{stable:!0})+"]",We)}),Object.keys(hr.attributes).forEach(function(Le){var We=hr.attributes[Le].append(tr,_r),Xe=tr.scopeAttrib(Le);Object.keys(new fa).forEach(function(rt){_r.set(Xe,"."+rt,We[rt])})}),hr.scopeVAO){var ve=hr.scopeVAO.append(tr,_r);Ai(ve)?_r.set(Zr.vao,".targetVAO",ve):_r.set(Zr.vao,".targetVAO",tr.link(ve,{stable:!0}))}function Ae(Le){var We=hr.shader[Le];if(We){var Xe=We.append(tr,_r);Ai(Xe)?_r.set(Zr.shader,"."+Le,Xe):_r.set(Zr.shader,"."+Le,tr.link(Xe,{stable:!0}))}}Ae(Ih),Ae(Lf),Object.keys(hr.state).length>0&&(_r(sa,".dirty=true;"),_r.exit(sa,".dirty=true;")),_r("a1(",tr.shared.context,",a0,",tr.batchId,");")}function Eo(tr){if(!(typeof tr!="object"||Wt(tr))){for(var hr=Object.keys(tr),_r=0;_r=0;--Nn){var Do=nn[Nn];Do&&Do(ma,null,0)}fr.flush(),Na&&Na.update()}function so(){!Sn&&nn.length>0&&(Sn=g.next(kn))}function Us(){Sn&&(g.cancel(kn),Sn=null)}function iu(Nn){Nn.preventDefault(),Xr=!0,Us(),Ln.forEach(function(Do){Do()})}function bo(Nn){fr.getError(),Xr=!1,aa.restore(),an.restore(),Ha.restore(),Aa.restore(),ga.restore(),wi.restore(),hi.restore(),Na&&Na.restore(),ri.procs.refresh(),so(),fi.forEach(function(Do){Do()})}Ai&&(Ai.addEventListener(Dn,iu,!1),Ai.addEventListener(Mo,bo,!1));function uf(){nn.length=0,Us(),Ai&&(Ai.removeEventListener(Dn,iu),Ai.removeEventListener(Mo,bo)),an.clear(),wi.clear(),ga.clear(),hi.clear(),Aa.clear(),Ta.clear(),Ha.clear(),Na&&Na.clear(),zi.forEach(function(Nn){Nn()})}function hs(Nn){function Do(ve){var Ae=t({},ve);delete Ae.uniforms,delete Ae.attributes,delete Ae.context,delete Ae.vao,"stencil"in Ae&&Ae.stencil.op&&(Ae.stencil.opBack=Ae.stencil.opFront=Ae.stencil.op,delete Ae.stencil.op);function Le(We){if(We in Ae){var Xe=Ae[We];delete Ae[We],Object.keys(Xe).forEach(function(rt){Ae[We+"."+rt]=Xe[rt]})}}return Le("blend"),Le("depth"),Le("cull"),Le("stencil"),Le("polygonOffset"),Le("scissor"),Le("sample"),"vao"in ve&&(Ae.vao=ve.vao),Ae}function Ps(ve,Ae){var Le={},We={};return Object.keys(ve).forEach(function(Xe){var rt=ve[Xe];if(p.isDynamic(rt)){We[Xe]=p.unbox(rt,Xe);return}else if(Ae&&Array.isArray(rt)){for(var Ct=0;Ct0)return tr.call(this,Zr(ve|0),ve|0)}else if(Array.isArray(ve)){if(ve.length)return tr.call(this,ve,ve.length)}else return Ui.call(this,ve)}return t(sa,{stats:Eo,destroy:function(){ds.destroy()}})}var cc=wi.setFBO=hs({framebuffer:p.define.call(null,_s,"framebuffer")});function Rc(Nn,Do){var Ps=0;ri.procs.poll();var ur=Do.color;ur&&(fr.clearColor(+ur[0]||0,+ur[1]||0,+ur[2]||0,+ur[3]||0),Ps|=js),"depth"in Do&&(fr.clearDepth(+Do.depth),Ps|=Bo),"stencil"in Do&&(fr.clearStencil(Do.stencil|0),Ps|=Xa),fr.clear(Ps)}function cf(Nn){if("framebuffer"in Nn)if(Nn.framebuffer&&Nn.framebuffer_reglType==="framebufferCube")for(var Do=0;Do<6;++Do)cc(t({framebuffer:Nn.framebuffer.faces[Do]},Nn),Rc);else cc(Nn,Rc);else Rc(null,Nn)}function ql(Nn){nn.push(Nn);function Do(){var Ps=Ul(nn,Nn);function ur(){var Kr=Ul(nn,ur);nn[Kr]=nn[nn.length-1],nn.length-=1,nn.length<=0&&Us()}nn[Ps]=ur}return so(),{cancel:Do}}function Vl(){var Nn=Ja.viewport,Do=Ja.scissor_box;Nn[0]=Nn[1]=Do[0]=Do[1]=0,ma.viewportWidth=ma.framebufferWidth=ma.drawingBufferWidth=Nn[2]=Do[2]=fr.drawingBufferWidth,ma.viewportHeight=ma.framebufferHeight=ma.drawingBufferHeight=Nn[3]=Do[3]=fr.drawingBufferHeight}function nu(){ma.tick+=1,ma.time=xu(),Vl(),ri.procs.poll()}function Xn(){Aa.refresh(),Vl(),ri.procs.refresh(),Na&&Na.update()}function xu(){return(m()-Ji)/1e3}Xn();function xs(Nn,Do){var Ps;switch(Nn){case"frame":return ql(Do);case"lost":Ps=Ln;break;case"restore":Ps=fi;break;case"destroy":Ps=zi;break;default:}return Ps.push(Do),{cancel:function(){for(var ur=0;ur=0},read:$a,destroy:uf,_gl:fr,_refresh:Xn,poll:function(){nu(),Na&&Na.update()},now:xu,stats:wa,getCachedCode:zc,preloadCachedCode:ff});return nr.onDone(null,hf),hf}return _u}))}}),cue=ye({"node_modules/gl-util/context.js"(e,r){"use strict";var t=Wp();r.exports=function(u){if(u?typeof u=="string"&&(u={container:u}):u={},i(u)?u={container:u}:o(u)?u={container:u}:s(u)?u={gl:u}:u=t(u,{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),u.pixelRatio||(u.pixelRatio=window.pixelRatio||1),u.gl)return u.gl;if(u.canvas&&(u.container=u.canvas.parentNode),u.container){if(typeof u.container=="string"){var c=document.querySelector(u.container);if(!c)throw Error("Element "+u.container+" is not found");u.container=c}i(u.container)?(u.canvas=u.container,u.container=u.canvas.parentNode):u.canvas||(u.canvas=l(),u.container.appendChild(u.canvas),a(u))}else if(!u.canvas)if(typeof document<"u")u.container=document.body||document.documentElement,u.canvas=l(),u.container.appendChild(u.canvas),a(u);else throw Error("Not DOM environment. Use headless-gl.");return u.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(f){try{u.gl=u.canvas.getContext(f,u.attrs)}catch{}return u.gl}),u.gl};function a(n){if(n.container)if(n.container==document.body)document.body.style.width||(n.canvas.width=n.width||n.pixelRatio*window.innerWidth),document.body.style.height||(n.canvas.height=n.height||n.pixelRatio*window.innerHeight);else{var u=n.container.getBoundingClientRect();n.canvas.width=n.width||u.right-u.left,n.canvas.height=n.height||u.bottom-u.top}}function i(n){return typeof n.getContext=="function"&&"width"in n&&"height"in n}function o(n){return typeof n.nodeName=="string"&&typeof n.appendChild=="function"&&typeof n.getBoundingClientRect=="function"}function s(n){return typeof n.drawArrays=="function"||typeof n.drawElements=="function"}function l(){var n=document.createElement("canvas");return n.style.position="absolute",n.style.top=0,n.style.left=0,n}}}),fue=ye({"node_modules/font-atlas/index.js"(e,r){"use strict";var t=fI(),a=[32,126];r.exports=i;function i(o){o=o||{};var s=o.shape?o.shape:o.canvas?[o.canvas.width,o.canvas.height]:[512,512],l=o.canvas||document.createElement("canvas"),n=o.font,u=typeof o.step=="number"?[o.step,o.step]:o.step||[32,32],c=o.chars||a;if(n&&typeof n!="string"&&(n=t(n)),!Array.isArray(c))c=String(c).split("");else if(c.length===2&&typeof c[0]=="number"&&typeof c[1]=="number"){for(var f=[],h=c[0],d=0;h<=c[1];h++)f[d++]=String.fromCharCode(h);c=f}s=s.slice(),l.width=s[0],l.height=s[1];var p=l.getContext("2d");p.fillStyle="#000",p.fillRect(0,0,l.width,l.height),p.font=n,p.textAlign="center",p.textBaseline="middle",p.fillStyle="#fff";for(var g=u[0]/2,m=u[1]/2,h=0;hs[0]-u[0]/2&&(g=u[0]/2,m+=u[1]);return l}}}),dI=ye({"node_modules/bit-twiddle/twiddle.js"(e){"use strict";"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(i<0)},e.abs=function(i){var o=i>>r-1;return(i^o)-o},e.min=function(i,o){return o^(i^o)&-(i65535)<<4,i>>>=o,s=(i>255)<<3,i>>>=s,o|=s,s=(i>15)<<2,i>>>=s,o|=s,s=(i>3)<<1,i>>>=s,o|=s,o|i>>1},e.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},e.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function t(i){var o=32;return i&=-i,i&&o--,i&65535&&(o-=16),i&16711935&&(o-=8),i&252645135&&(o-=4),i&858993459&&(o-=2),i&1431655765&&(o-=1),o}e.countTrailingZeros=t,e.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},e.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},e.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var a=new Array(256);(function(i){for(var o=0;o<256;++o){var s=o,l=o,n=7;for(s>>>=1;s;s>>>=1)l<<=1,l|=s&1,--n;i[o]=l<>>8&255]<<16|a[i>>>16&255]<<8|a[i>>>24&255]},e.interleave2=function(i,o){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i|o<<1},e.deinterleave2=function(i,o){return i=i>>>o&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},e.interleave3=function(i,o,s){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,i|s<<2},e.deinterleave3=function(i,o){return i=i>>>o&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},e.nextCombination=function(i){var o=i|i-1;return o+1|(~o&-~o)-1>>>t(i)+1}}}),hue=ye({"node_modules/dup/dup.js"(e,r){"use strict";function t(o,s,l){var n=o[l]|0;if(n<=0)return[];var u=new Array(n),c;if(l===o.length-1)for(c=0;c"u"&&(s=0),typeof o){case"number":if(o>0)return a(o|0,s);break;case"object":if(typeof o.length=="number")return t(o,s,0);break}return[]}r.exports=i}}),due=ye({"node_modules/typedarray-pool/pool.js"(e){"use strict";var r=dI(),t=hue(),a=Bm().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:t([32,0]),UINT16:t([32,0]),UINT32:t([32,0]),BIGUINT64:t([32,0]),INT8:t([32,0]),INT16:t([32,0]),INT32:t([32,0]),BIGINT64:t([32,0]),FLOAT:t([32,0]),DOUBLE:t([32,0]),DATA:t([32,0]),UINT8C:t([32,0]),BUFFER:t([32,0])});var i=typeof Uint8ClampedArray<"u",o=typeof BigUint64Array<"u",s=typeof BigInt64Array<"u",l=window.__TYPEDARRAY_POOL;l.UINT8C||(l.UINT8C=t([32,0])),l.BIGUINT64||(l.BIGUINT64=t([32,0])),l.BIGINT64||(l.BIGINT64=t([32,0])),l.BUFFER||(l.BUFFER=t([32,0]));var n=l.DATA,u=l.BUFFER;e.free=function(b){if(a.isBuffer(b))u[r.log2(b.length)].push(b);else{if(Object.prototype.toString.call(b)!=="[object ArrayBuffer]"&&(b=b.buffer),!b)return;var S=b.length||b.byteLength,A=r.log2(S)|0;n[A].push(b)}};function c(T){if(T){var b=T.length||T.byteLength,S=r.log2(b);n[S].push(T)}}function f(T){c(T.buffer)}e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=f,e.freeArrayBuffer=c,e.freeBuffer=function(b){u[r.log2(b.length)].push(b)},e.malloc=function(b,S){if(S===void 0||S==="arraybuffer")return h(b);switch(S){case"uint8":return d(b);case"uint16":return p(b);case"uint32":return g(b);case"int8":return m(b);case"int16":return y(b);case"int32":return _(b);case"float":case"float32":return v(b);case"double":case"float64":return x(b);case"uint8_clamped":return E(b);case"bigint64":return C(b);case"biguint64":return M(b);case"buffer":return k(b);case"data":case"dataview":return w(b);default:return null}return null};function h(b){var b=r.nextPow2(b),S=r.log2(b),A=n[S];return A.length>0?A.pop():new ArrayBuffer(b)}e.mallocArrayBuffer=h;function d(T){return new Uint8Array(h(T),0,T)}e.mallocUint8=d;function p(T){return new Uint16Array(h(2*T),0,T)}e.mallocUint16=p;function g(T){return new Uint32Array(h(4*T),0,T)}e.mallocUint32=g;function m(T){return new Int8Array(h(T),0,T)}e.mallocInt8=m;function y(T){return new Int16Array(h(2*T),0,T)}e.mallocInt16=y;function _(T){return new Int32Array(h(4*T),0,T)}e.mallocInt32=_;function v(T){return new Float32Array(h(4*T),0,T)}e.mallocFloat32=e.mallocFloat=v;function x(T){return new Float64Array(h(8*T),0,T)}e.mallocFloat64=e.mallocDouble=x;function E(T){return i?new Uint8ClampedArray(h(T),0,T):d(T)}e.mallocUint8Clamped=E;function M(T){return o?new BigUint64Array(h(8*T),0,T):null}e.mallocBigUint64=M;function C(T){return s?new BigInt64Array(h(8*T),0,T):null}e.mallocBigInt64=C;function w(T){return new DataView(h(T),0,T)}e.mallocDataView=w;function k(T){T=r.nextPow2(T);var b=r.log2(T),S=u[b];return S.length>0?S.pop():new a(T)}e.mallocBuffer=k,e.clearCache=function(){for(var b=0;b<32;++b)l.UINT8[b].length=0,l.UINT16[b].length=0,l.UINT32[b].length=0,l.INT8[b].length=0,l.INT16[b].length=0,l.INT32[b].length=0,l.FLOAT[b].length=0,l.DOUBLE[b].length=0,l.BIGUINT64[b].length=0,l.BIGINT64[b].length=0,l.UINT8C[b].length=0,n[b].length=0,u[b].length=0}}}),pue=ye({"node_modules/is-plain-obj/index.js"(e,r){"use strict";var t=Object.prototype.toString;r.exports=function(a){var i;return t.call(a)==="[object Object]"&&(i=Object.getPrototypeOf(a),i===null||i===Object.getPrototypeOf({}))}}}),pI=ye({"node_modules/parse-unit/index.js"(e,r){r.exports=function(a,i){i||(i=[0,""]),a=String(a);var o=parseFloat(a,10);return i[0]=o,i[1]=a.match(/[\d.\-\+]*\s*(.*)/)[1]||"",i}}}),vue=ye({"node_modules/gl-text/node_modules/to-px/topx.js"(e,r){"use strict";var t=pI();r.exports=s;var a=96;function i(l,n){var u=t(getComputedStyle(l).getPropertyValue(n));return u[0]*s(u[1],l)}function o(l,n){var u=document.createElement("div");u.style["font-size"]="128"+l,n.appendChild(u);var c=i(u,"font-size")/128;return n.removeChild(u),c}function s(l,n){switch(n=n||document.body,l=(l||"px").trim().toLowerCase(),(n===window||n===document)&&(n=document.body),l){case"%":return n.clientHeight/100;case"ch":case"ex":return o(l,n);case"em":return i(n,"font-size");case"rem":return i(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}}}),mue=ye({"node_modules/detect-kerning/index.js"(e,r){"use strict";r.exports=o;var t=o.canvas=document.createElement("canvas"),a=t.getContext("2d"),i=s([32,126]);o.createPairs=s,o.ascii=i;function o(l,n){Array.isArray(l)&&(l=l.join(", "));var u={},c,f=16,h=.05;n&&(n.length===2&&typeof n[0]=="number"?c=s(n):Array.isArray(n)?c=n:(n.o?c=s(n.o):n.pairs&&(c=n.pairs),n.fontSize&&(f=n.fontSize),n.threshold!=null&&(h=n.threshold))),c||(c=i),a.font=f+"px "+l;for(var d=0;df*h){var y=(m-g)/f;u[p]=y*1e3}}return u}function s(l){for(var n=[],u=l[0];u<=l[1];u++)for(var c=String.fromCharCode(u),f=l[0];f0;u-=4)if(n[u]!==0)return Math.floor((u-3)*.25/l)}}}),yue=ye({"node_modules/gl-text/dist.js"(e,r){"use strict";var t=uue(),a=Wp(),i=hI(),o=cue(),s=aI(),l=qb(),n=fue(),u=due(),c=Uy(),f=pue(),h=pI(),d=vue(),p=mue(),g=ku(),m=gue(),y=Jm(),_=dI(),v=_.nextPow2,x=new s,E=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(E=!0),document.body.removeChild(M));var M,C=function(T){w(T)?(T={regl:T},this.gl=T.regl._gl):this.gl=o(T),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=T.regl||i({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(f(T)?T:{})};C.prototype.createShader=function(){var T=this.regl,b=T({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:T.prop("count"),offset:T.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:T.this("sizeBuffer")},width:{offset:0,stride:8,buffer:T.this("sizeBuffer")},char:T.this("charBuffer"),position:T.this("position")},uniforms:{atlasSize:function(A,F){return[F.atlas.width,F.atlas.height]},atlasDim:function(A,F){return[F.atlas.cols,F.atlas.rows]},atlas:function(A,F){return F.atlas.texture},charStep:function(A,F){return F.atlas.step},em:function(A,F){return F.atlas.em},color:T.prop("color"),opacity:T.prop("opacity"),viewport:T.this("viewportArray"),scale:T.this("scale"),align:T.prop("align"),baseline:T.prop("baseline"),translate:T.this("translate"),positionOffset:T.prop("positionOffset")},primitive:"points",viewport:T.this("viewport"),vert:` +`),ga;if(It&&(ga=bh(ia),It[ga]))return It[ga].apply(null,dr);var da=Function.apply(null,ir.concat(ia));return It&&(It[ga]=da),da.apply(null,dr)}return{global:ta,link:hr,block:vr,proc:Ta,scope:Or,cond:Cr,compile:Ra}}var yi="xyzw".split(""),_i=5121,ki=1,ri=2,kn=0,Ln=1,Ni=2,Zi=3,Co=4,Do=5,Fo=6,Yo="dither",bo="blend.enable",Gs="blend.color",Es="blend.equation",ns="blend.func",Kn="depth.enable",zo="depth.func",gs="depth.range",js="depth.mask",Cl="colorMask",zl="cull.enable",Kl="cull.face",Gu="frontFace",xl="lineWidth",Hu="polygonOffset.enable",Su="polygonOffset.offset",mc="sample.alpha",Jc="sample.enable",oc="sample.coverage",du="stencil.enable",Jl="stencil.mask",Ql="stencil.func",Eu="stencil.opFront",bf="stencil.opBack",lh="scissor.enable",Pc="scissor.box",Ks="viewport",Bl="profile",Wu="framebuffer",wf="vert",Qc="frag",ku="elements",Ol="primitive",Nl="count",fi="offset",eu="instances",$e="vao",nt="Width",mt="Height",xt=Wu+nt,Bt=Wu+mt,zt=Ks+nt,Wt=Ks+mt,Pr="drawingBuffer",Br=Pr+nt,kr=Pr+mt,jr=[ns,Es,Ql,Eu,bf,oc,Ks,Pc,Su],Jr=34962,la=34963,xa=2884,Ba=3042,an=3024,Tn=2960,ii=2929,Si=3089,oi=32823,Ji=32926,Qi=32928,Oo=5126,Qo=35664,vo=35665,ys=35666,ol=5124,jl=35667,Hs=35668,Cu=35669,hi=35670,wi=35671,sl=35672,sc=35673,tu=35674,Ps=35675,gc=35676,pu=35678,ll=35680,ef=4,de=1028,Ee=1029,qe=2304,tt=2305,at=32775,ct=32776,Nt=519,St=7680,Jt=0,mr=1,gr=32774,Hr=513,Vr=36160,ca=36064,Aa={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Xr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},oa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fa={cw:qe,ccw:tt};function Ea(st){return Array.isArray(st)||Xt(st)||or(st)}function Ma(st){return st.sort(function(It,Ut){return It===Ks?-1:Ut===Ks?1:It=1,ir>=2,It)}else if(Ut===Co){var dr=st.data;return new sa(dr.thisDep,dr.contextDep,dr.propDep,It)}else{if(Ut===Do)return new sa(!1,!1,!1,It);if(Ut===Fo){for(var Ar=!1,hr=!1,vr=!1,Or=0;Or=1&&(hr=!0),ta>=2&&(vr=!0)}else Cr.type===Co&&(Ar=Ar||Cr.data.thisDep,hr=hr||Cr.data.contextDep,vr=vr||Cr.data.propDep)}return new sa(Ar,hr,vr,It)}else return new sa(Ut===Zi,Ut===Ni,Ut===Ln,It)}}var $n=new sa(!1,!1,!1,function(){});function xi(st,It,Ut,ir,dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia){var ga=Cr.Record,da={add:32774,subtract:32778,"reverse subtract":32779};Ut.ext_blend_minmax&&(da.min=at,da.max=ct);var Fa=Ut.angle_instanced_arrays,za=Ut.webgl_draw_buffers,Cn=Ut.oes_vertex_array_object,Dn={dirty:!0,profile:ia.profile},ui={},cn=[],sn={},ei={};function Pn(Wr){return Wr.replace(".","_")}function Rn(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),ui[Wa]=Dn[Wa]=!!pa,sn[Wa]=na}function In(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),Array.isArray(pa)?(Dn[Wa]=pa.slice(),ui[Wa]=pa.slice()):Dn[Wa]=ui[Wa]=pa,ei[Wa]=na}function Jn(Wr){return!!isNaN(Wr)}Rn(Yo,an),Rn(bo,Ba),In(Gs,"blendColor",[0,0,0,0]),In(Es,"blendEquationSeparate",[gr,gr]),In(ns,"blendFuncSeparate",[mr,Jt,mr,Jt]),Rn(Kn,ii,!0),In(zo,"depthFunc",Hr),In(gs,"depthRange",[0,1]),In(js,"depthMask",!0),In(Cl,Cl,[!0,!0,!0,!0]),Rn(zl,xa),In(Kl,"cullFace",Ee),In(Gu,Gu,tt),In(xl,xl,1),Rn(Hu,oi),In(Su,"polygonOffset",[0,0]),Rn(mc,Ji),Rn(Jc,Qi),In(oc,"sampleCoverage",[1,!1]),Rn(du,Tn),In(Jl,"stencilMask",-1),In(Ql,"stencilFunc",[Nt,0,-1]),In(Eu,"stencilOpSeparate",[de,St,St,St]),In(bf,"stencilOpSeparate",[Ee,St,St,St]),Rn(lh,Si),In(Pc,"scissor",[0,0,st.drawingBufferWidth,st.drawingBufferHeight]),In(Ks,Ks,[0,0,st.drawingBufferWidth,st.drawingBufferHeight]);var Ei={gl:st,context:Ta,strings:It,next:ui,current:Dn,draw:ka,elements:Ar,buffer:dr,shader:ta,attributes:Cr.state,vao:Cr,uniforms:Or,framebuffer:vr,extensions:Ut,timer:Ra,isBufferArgs:Ea},so={primTypes:en,compareFuncs:Xr,blendFuncs:Aa,blendEquations:da,stencilOps:oa,glTypes:Kr,orientationType:fa};za&&(so.backBuffer=[Ee],so.drawBuffer=f(ir.maxDrawbuffers,function(Wr){return Wr===0?[0]:f(Wr,function(na){return ca+na})}));var ti=0;function bi(){var Wr=En({cache:ua}),na=Wr.link,pa=Wr.global;Wr.id=ti++,Wr.batchId="0";var Wa=na(Ei),ln=Wr.shared={props:"a0"};Object.keys(Ei).forEach(function(wt){ln[wt]=pa.def(Wa,".",wt)});var Le=Wr.next={},Ue=Wr.current={};Object.keys(ei).forEach(function(wt){Array.isArray(Dn[wt])&&(Le[wt]=pa.def(ln.next,".",wt),Ue[wt]=pa.def(ln.current,".",wt))});var Qe=Wr.constants={};Object.keys(so).forEach(function(wt){Qe[wt]=pa.def(JSON.stringify(so[wt]))}),Wr.invoke=function(wt,Lt){switch(Lt.type){case kn:var pr=["this",ln.context,ln.props,Wr.batchId];return wt.def(na(Lt.data),".call(",pr.slice(0,Math.max(Lt.data.length+1,4)),")");case Ln:return wt.def(ln.props,Lt.data);case Ni:return wt.def(ln.context,Lt.data);case Zi:return wt.def("this",Lt.data);case Co:return Lt.data.append(Wr,wt),Lt.data.ref;case Do:return Lt.data.toString();case Fo:return Lt.data.map(function(Gr){return Wr.invoke(wt,Gr)})}},Wr.attribCache={};var _t={};return Wr.scopeAttrib=function(wt){var Lt=It.id(wt);if(Lt in _t)return _t[Lt];var pr=Cr.scope[Lt];pr||(pr=Cr.scope[Lt]=new ga);var Gr=_t[Lt]=na(pr);return Gr},Wr}function Wi(Wr){var na=Wr.static,pa=Wr.dynamic,Wa;if(Bl in na){var ln=!!na[Bl];Wa=An(function(Ue,Qe){return ln}),Wa.enable=ln}else if(Bl in pa){var Le=pa[Bl];Wa=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}return Wa}function ro(Wr,na){var pa=Wr.static,Wa=Wr.dynamic;if(Wu in pa){var ln=pa[Wu];return ln?(ln=vr.getFramebuffer(ln),An(function(Ue,Qe){var _t=Ue.link(ln),wt=Ue.shared;Qe.set(wt.framebuffer,".next",_t);var Lt=wt.context;return Qe.set(Lt,"."+xt,_t+".width"),Qe.set(Lt,"."+Bt,_t+".height"),_t})):An(function(Ue,Qe){var _t=Ue.shared;Qe.set(_t.framebuffer,".next","null");var wt=_t.context;return Qe.set(wt,"."+xt,wt+"."+Br),Qe.set(wt,"."+Bt,wt+"."+kr),"null"})}else if(Wu in Wa){var Le=Wa[Wu];return zn(Le,function(Ue,Qe){var _t=Ue.invoke(Qe,Le),wt=Ue.shared,Lt=wt.framebuffer,pr=Qe.def(Lt,".getFramebuffer(",_t,")");Qe.set(Lt,".next",pr);var Gr=wt.context;return Qe.set(Gr,"."+xt,pr+"?"+pr+".width:"+Gr+"."+Br),Qe.set(Gr,"."+Bt,pr+"?"+pr+".height:"+Gr+"."+kr),pr})}else return null}function Mo(Wr,na,pa){var Wa=Wr.static,ln=Wr.dynamic;function Le(_t){if(_t in Wa){var wt=Wa[_t],Lt=!0,pr=wt.x|0,Gr=wt.y|0,va,Qa;return"width"in wt?va=wt.width|0:Lt=!1,"height"in wt?Qa=wt.height|0:Lt=!1,new sa(!Lt&&na&&na.thisDep,!Lt&&na&&na.contextDep,!Lt&&na&&na.propDep,function(Mn,dn){var _n=Mn.shared.context,Sn=va;"width"in wt||(Sn=dn.def(_n,".",xt,"-",pr));var Bn=Qa;return"height"in wt||(Bn=dn.def(_n,".",Bt,"-",Gr)),[pr,Gr,Sn,Bn]})}else if(_t in ln){var Ga=ln[_t],Ua=zn(Ga,function(Mn,dn){var _n=Mn.invoke(dn,Ga),Sn=Mn.shared.context,Bn=dn.def(_n,".x|0"),Zn=dn.def(_n,".y|0"),Ci=dn.def('"width" in ',_n,"?",_n,".width|0:","(",Sn,".",xt,"-",Bn,")"),qo=dn.def('"height" in ',_n,"?",_n,".height|0:","(",Sn,".",Bt,"-",Zn,")");return[Bn,Zn,Ci,qo]});return na&&(Ua.thisDep=Ua.thisDep||na.thisDep,Ua.contextDep=Ua.contextDep||na.contextDep,Ua.propDep=Ua.propDep||na.propDep),Ua}else return na?new sa(na.thisDep,na.contextDep,na.propDep,function(Mn,dn){var _n=Mn.shared.context;return[0,0,dn.def(_n,".",xt),dn.def(_n,".",Bt)]}):null}var Ue=Le(Ks);if(Ue){var Qe=Ue;Ue=new sa(Ue.thisDep,Ue.contextDep,Ue.propDep,function(_t,wt){var Lt=Qe.append(_t,wt),pr=_t.shared.context;return wt.set(pr,"."+zt,Lt[2]),wt.set(pr,"."+Wt,Lt[3]),Lt})}return{viewport:Ue,scissor_box:Le(Pc)}}function zs(Wr,na){var pa=Wr.static,Wa=typeof pa[Qc]=="string"&&typeof pa[wf]=="string";if(Wa){if(Object.keys(na.dynamic).length>0)return null;var ln=na.static,Le=Object.keys(ln);if(Le.length>0&&typeof ln[Le[0]]=="number"){for(var Ue=[],Qe=0;Qe"+Bn+"?"+Lt+".constant["+Bn+"]:0;"}).join(""),"}}else{","if(",va,"(",Lt,".buffer)){",Mn,"=",Qa,".createStream(",Jr,",",Lt,".buffer);","}else{",Mn,"=",Qa,".getBuffer(",Lt,".buffer);","}",dn,'="type" in ',Lt,"?",Gr.glTypes,"[",Lt,".type]:",Mn,".dtype;",Ga.normalized,"=!!",Lt,".normalized;");function _n(Sn){wt(Ga[Sn],"=",Lt,".",Sn,"|0;")}return _n("size"),_n("offset"),_n("stride"),_n("divisor"),wt("}}"),wt.exit("if(",Ga.isStream,"){",Qa,".destroyStream(",Mn,");","}"),Ga}ln[Le]=zn(Ue,Qe)}),ln}function $o(Wr){var na=Wr.static,pa=Wr.dynamic,Wa={};return Object.keys(na).forEach(function(ln){var Le=na[ln];Wa[ln]=An(function(Ue,Qe){return typeof Le=="number"||typeof Le=="boolean"?""+Le:Ue.link(Le)})}),Object.keys(pa).forEach(function(ln){var Le=pa[ln];Wa[ln]=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}),Wa}function _s(Wr,na,pa,Wa,ln){var Le=Wr.static,Ue=Wr.dynamic,Qe=zs(Wr,na),_t=ro(Wr,ln),wt=Mo(Wr,_t,ln),Lt=So(Wr,ln),pr=Ws(Wr,ln),Gr=Bs(Wr,ln,Qe);function va(_n){var Sn=wt[_n];Sn&&(pr[_n]=Sn)}va(Ks),va(Pn(Pc));var Qa=Object.keys(pr).length>0,Ga={framebuffer:_t,draw:Lt,shader:Gr,state:pr,dirty:Qa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Wi(Wr,ln),Ga.uniforms=Zo(pa,ln),Ga.drawVAO=Ga.scopeVAO=Lt.vao,!Ga.drawVAO&&Gr.program&&!Qe&&Ut.angle_instanced_arrays&&Lt.static.elements){var Ua=!0,Mn=Gr.program.attributes.map(function(_n){var Sn=na.static[_n];return Ua=Ua&&!!Sn,Sn});if(Ua&&Mn.length>0){var dn=Cr.getVAO(Cr.createVAO({attributes:Mn,elements:Lt.static.elements}));Ga.drawVAO=new sa(null,null,null,function(_n,Sn){return _n.link(dn)}),Ga.useVAO=!0}}return Qe?Ga.useVAO=!0:Ga.attributes=es(na,ln),Ga.context=$o(Wa,ln),Ga}function Go(Wr,na,pa){var Wa=Wr.shared,ln=Wa.context,Le=Wr.scope();Object.keys(pa).forEach(function(Ue){na.save(ln,"."+Ue);var Qe=pa[Ue],_t=Qe.append(Wr,na);Array.isArray(_t)?Le(ln,".",Ue,"=[",_t.join(),"];"):Le(ln,".",Ue,"=",_t,";")}),na(Le)}function Ys(Wr,na,pa,Wa){var ln=Wr.shared,Le=ln.gl,Ue=ln.framebuffer,Qe;za&&(Qe=na.def(ln.extensions,".webgl_draw_buffers"));var _t=Wr.constants,wt=_t.drawBuffer,Lt=_t.backBuffer,pr;pa?pr=pa.append(Wr,na):pr=na.def(Ue,".next"),Wa||na("if(",pr,"!==",Ue,".cur){"),na("if(",pr,"){",Le,".bindFramebuffer(",Vr,",",pr,".framebuffer);"),za&&na(Qe,".drawBuffersWEBGL(",wt,"[",pr,".colorAttachments.length]);"),na("}else{",Le,".bindFramebuffer(",Vr,",null);"),za&&na(Qe,".drawBuffersWEBGL(",Lt,");"),na("}",Ue,".cur=",pr,";"),Wa||na("}")}function Ll(Wr,na,pa){var Wa=Wr.shared,ln=Wa.gl,Le=Wr.current,Ue=Wr.next,Qe=Wa.current,_t=Wa.next,wt=Wr.cond(Qe,".dirty");cn.forEach(function(Lt){var pr=Pn(Lt);if(!(pr in pa.state)){var Gr,va;if(pr in Ue){Gr=Ue[pr],va=Le[pr];var Qa=f(Dn[pr].length,function(Ua){return wt.def(Gr,"[",Ua,"]")});wt(Wr.cond(Qa.map(function(Ua,Mn){return Ua+"!=="+va+"["+Mn+"]"}).join("||")).then(ln,".",ei[pr],"(",Qa,");",Qa.map(function(Ua,Mn){return va+"["+Mn+"]="+Ua}).join(";"),";"))}else{Gr=wt.def(_t,".",pr);var Ga=Wr.cond(Gr,"!==",Qe,".",pr);wt(Ga),pr in sn?Ga(Wr.cond(Gr).then(ln,".enable(",sn[pr],");").else(ln,".disable(",sn[pr],");"),Qe,".",pr,"=",Gr,";"):Ga(ln,".",ei[pr],"(",Gr,");",Qe,".",pr,"=",Gr,";")}}}),Object.keys(pa.state).length===0&&wt(Qe,".dirty=false;"),na(wt)}function mo(Wr,na,pa,Wa){var ln=Wr.shared,Le=Wr.current,Ue=ln.current,Qe=ln.gl,_t;Ma(Object.keys(pa)).forEach(function(wt){var Lt=pa[wt];if(!(Wa&&!Wa(Lt))){var pr=Lt.append(Wr,na);if(sn[wt]){var Gr=sn[wt];hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Wr.cond(_t).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",_t,";")):(na(Wr.cond(pr).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",pr,";"))}else if(zr(pr)){var va=Le[wt];na(Qe,".",ei[wt],"(",pr,");",pr.map(function(Qa,Ga){return va+"["+Ga+"]="+Qa}).join(";"),";")}else hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Qe,".",ei[wt],"(",_t,");",Ue,".",wt,"=",_t,";")):na(Qe,".",ei[wt],"(",pr,");",Ue,".",wt,"=",pr,";")}})}function ru(Wr,na){Fa&&(Wr.instancing=na.def(Wr.shared.extensions,".angle_instanced_arrays"))}function Rs(Wr,na,pa,Wa,ln){var Le=Wr.shared,Ue=Wr.stats,Qe=Le.current,_t=Le.timer,wt=pa.profile;function Lt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var pr,Gr;function va(_n){pr=na.def(),_n(pr,"=",Lt(),";"),typeof ln=="string"?_n(Ue,".count+=",ln,";"):_n(Ue,".count++;"),Ra&&(Wa?(Gr=na.def(),_n(Gr,"=",_t,".getNumPendingQueries();")):_n(_t,".beginQuery(",Ue,");"))}function Qa(_n){_n(Ue,".cpuTime+=",Lt(),"-",pr,";"),Ra&&(Wa?_n(_t,".pushScopeStats(",Gr,",",_t,".getNumPendingQueries(),",Ue,");"):_n(_t,".endQuery();"))}function Ga(_n){var Sn=na.def(Qe,".profile");na(Qe,".profile=",_n,";"),na.exit(Qe,".profile=",Sn,";")}var Ua;if(wt){if(hn(wt)){wt.enable?(va(na),Qa(na.exit),Ga("true")):Ga("false");return}Ua=wt.append(Wr,na),Ga(Ua)}else Ua=na.def(Qe,".profile");var Mn=Wr.block();va(Mn),na("if(",Ua,"){",Mn,"}");var dn=Wr.block();Qa(dn),na.exit("if(",Ua,"){",dn,"}")}function Yu(Wr,na,pa,Wa,ln){var Le=Wr.shared;function Ue(_t){switch(_t){case Qo:case jl:case wi:return 2;case vo:case Hs:case sl:return 3;case ys:case Cu:case sc:return 4;default:return 1}}function Qe(_t,wt,Lt){var pr=Le.gl,Gr=na.def(_t,".location"),va=na.def(Le.attributes,"[",Gr,"]"),Qa=Lt.state,Ga=Lt.buffer,Ua=[Lt.x,Lt.y,Lt.z,Lt.w],Mn=["buffer","normalized","offset","stride"];function dn(){na("if(!",va,".buffer){",pr,".enableVertexAttribArray(",Gr,");}");var Sn=Lt.type,Bn;if(Lt.size?Bn=na.def(Lt.size,"||",wt):Bn=wt,na("if(",va,".type!==",Sn,"||",va,".size!==",Bn,"||",Mn.map(function(Ci){return va+"."+Ci+"!=="+Lt[Ci]}).join("||"),"){",pr,".bindBuffer(",Jr,",",Ga,".buffer);",pr,".vertexAttribPointer(",[Gr,Bn,Sn,Lt.normalized,Lt.stride,Lt.offset],");",va,".type=",Sn,";",va,".size=",Bn,";",Mn.map(function(Ci){return va+"."+Ci+"="+Lt[Ci]+";"}).join(""),"}"),Fa){var Zn=Lt.divisor;na("if(",va,".divisor!==",Zn,"){",Wr.instancing,".vertexAttribDivisorANGLE(",[Gr,Zn],");",va,".divisor=",Zn,";}")}}function _n(){na("if(",va,".buffer){",pr,".disableVertexAttribArray(",Gr,");",va,".buffer=null;","}if(",yi.map(function(Sn,Bn){return va+"."+Sn+"!=="+Ua[Bn]}).join("||"),"){",pr,".vertexAttrib4f(",Gr,",",Ua,");",yi.map(function(Sn,Bn){return va+"."+Sn+"="+Ua[Bn]+";"}).join(""),"}")}Qa===ki?dn():Qa===ri?_n():(na("if(",Qa,"===",ki,"){"),dn(),na("}else{"),_n(),na("}"))}Wa.forEach(function(_t){var wt=_t.name,Lt=pa.attributes[wt],pr;if(Lt){if(!ln(Lt))return;pr=Lt.append(Wr,na)}else{if(!ln($n))return;var Gr=Wr.scopeAttrib(wt);pr={},Object.keys(new ga).forEach(function(va){pr[va]=na.def(Gr,".",va)})}Qe(Wr.link(_t),Ue(_t.info.type),pr)})}function Ul(Wr,na,pa,Wa,ln,Le){for(var Ue=Wr.shared,Qe=Ue.gl,_t,wt=0;wt1){for(var As=[],ls=[],Vl=0;Vl>1)",Ga],");")}function Zn(){pa(Ua,".drawArraysInstancedANGLE(",[Gr,va,Qa,Ga],");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}function Sn(){function Bn(){pa(Le+".drawElements("+[Gr,Qa,Mn,va+"<<(("+Mn+"-"+_i+")>>1)"]+");")}function Zn(){pa(Le+".drawArrays("+[Gr,va,Qa]+");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}Fa&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(pa("if(",Ga,">0){"),_n(),pa("}else if(",Ga,"<0){"),Sn(),pa("}")):_n():Sn()}function fo(Wr,na,pa,Wa,ln){var Le=bi(),Ue=Le.proc("body",ln);return Fa&&(Le.instancing=Ue.def(Le.shared.extensions,".angle_instanced_arrays")),Wr(Le,Ue,pa,Wa),Le.compile().body}function Xo(Wr,na,pa,Wa){ru(Wr,na),pa.useVAO?pa.drawVAO?na(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,na),");"):na(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(na(Wr.shared.vao,".setVAO(null);"),Yu(Wr,na,pa,Wa.attributes,function(){return!0})),Ul(Wr,na,pa,Wa.uniforms,function(){return!0},!1),ql(Wr,na,na,pa)}function Os(Wr,na){var pa=Wr.proc("draw",1);ru(Wr,pa),Go(Wr,pa,na.context),Ys(Wr,pa,na.framebuffer),Ll(Wr,pa,na),mo(Wr,pa,na.state),Rs(Wr,pa,na,!1,!0);var Wa=na.shader.progVar.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",Wa,".program);"),na.shader.program)Xo(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var ln=Wr.global.def("{}"),Le=pa.def(Wa,".id"),Ue=pa.def(ln,"[",Le,"]");pa(Wr.cond(Ue).then(Ue,".call(this,a0);").else(Ue,"=",ln,"[",Le,"]=",Wr.link(function(Qe){return fo(Xo,Wr,na,Qe,1)}),"(",Wa,");",Ue,".call(this,a0);"))}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function ra(Wr,na,pa,Wa){Wr.batchId="a1",ru(Wr,na);function ln(){return!0}Yu(Wr,na,pa,Wa.attributes,ln),Ul(Wr,na,pa,Wa.uniforms,ln,!1),ql(Wr,na,na,pa)}function Ya(Wr,na,pa,Wa){ru(Wr,na);var ln=pa.contextDep,Le=na.def(),Ue="a0",Qe="a1",_t=na.def();Wr.shared.props=_t,Wr.batchId=Le;var wt=Wr.scope(),Lt=Wr.scope();na(wt.entry,"for(",Le,"=0;",Le,"<",Qe,";++",Le,"){",_t,"=",Ue,"[",Le,"];",Lt,"}",wt.exit);function pr(Mn){return Mn.contextDep&&ln||Mn.propDep}function Gr(Mn){return!pr(Mn)}if(pa.needsContext&&Go(Wr,Lt,pa.context),pa.needsFramebuffer&&Ys(Wr,Lt,pa.framebuffer),mo(Wr,Lt,pa.state,pr),pa.profile&&pr(pa.profile)&&Rs(Wr,Lt,pa,!1,!0),Wa)pa.useVAO?pa.drawVAO?pr(pa.drawVAO)?Lt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,Lt),");"):wt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,wt),");"):wt(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(wt(Wr.shared.vao,".setVAO(null);"),Yu(Wr,wt,pa,Wa.attributes,Gr),Yu(Wr,Lt,pa,Wa.attributes,pr)),Ul(Wr,wt,pa,Wa.uniforms,Gr,!1),Ul(Wr,Lt,pa,Wa.uniforms,pr,!0),ql(Wr,wt,Lt,pa);else{var va=Wr.global.def("{}"),Qa=pa.shader.progVar.append(Wr,Lt),Ga=Lt.def(Qa,".id"),Ua=Lt.def(va,"[",Ga,"]");Lt(Wr.shared.gl,".useProgram(",Qa,".program);","if(!",Ua,"){",Ua,"=",va,"[",Ga,"]=",Wr.link(function(Mn){return fo(ra,Wr,pa,Mn,2)}),"(",Qa,");}",Ua,".call(this,a0[",Le,"],",Le,");")}}function Ka(Wr,na){var pa=Wr.proc("batch",2);Wr.batchId="0",ru(Wr,pa);var Wa=!1,ln=!0;Object.keys(na.context).forEach(function(va){Wa=Wa||na.context[va].propDep}),Wa||(Go(Wr,pa,na.context),ln=!1);var Le=na.framebuffer,Ue=!1;Le?(Le.propDep?Wa=Ue=!0:Le.contextDep&&Wa&&(Ue=!0),Ue||Ys(Wr,pa,Le)):Ys(Wr,pa,null),na.state.viewport&&na.state.viewport.propDep&&(Wa=!0);function Qe(va){return va.contextDep&&Wa||va.propDep}Ll(Wr,pa,na),mo(Wr,pa,na.state,function(va){return!Qe(va)}),(!na.profile||!Qe(na.profile))&&Rs(Wr,pa,na,!1,"a1"),na.contextDep=Wa,na.needsContext=ln,na.needsFramebuffer=Ue;var _t=na.shader.progVar;if(_t.contextDep&&Wa||_t.propDep)Ya(Wr,pa,na,null);else{var wt=_t.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",wt,".program);"),na.shader.program)Ya(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var Lt=Wr.global.def("{}"),pr=pa.def(wt,".id"),Gr=pa.def(Lt,"[",pr,"]");pa(Wr.cond(Gr).then(Gr,".call(this,a0,a1);").else(Gr,"=",Lt,"[",pr,"]=",Wr.link(function(va){return fo(Ya,Wr,na,va,2)}),"(",wt,");",Gr,".call(this,a0,a1);"))}}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function Bi(Wr,na){var pa=Wr.proc("scope",3);Wr.batchId="a2";var Wa=Wr.shared,ln=Wa.current;if(Go(Wr,pa,na.context),na.framebuffer&&na.framebuffer.append(Wr,pa),Ma(Object.keys(na.state)).forEach(function(Qe){var _t=na.state[Qe],wt=_t.append(Wr,pa);zr(wt)?wt.forEach(function(Lt,pr){Jn(Lt)?pa.set(Wr.next[Qe],"["+pr+"]",Lt):pa.set(Wr.next[Qe],"["+pr+"]",Wr.link(Lt,{stable:!0}))}):hn(_t)?pa.set(Wa.next,"."+Qe,Wr.link(wt,{stable:!0})):pa.set(Wa.next,"."+Qe,wt)}),Rs(Wr,pa,na,!0,!0),[ku,fi,Nl,eu,Ol].forEach(function(Qe){var _t=na.draw[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.draw,"."+Qe,wt):pa.set(Wa.draw,"."+Qe,Wr.link(wt),{stable:!0})}}),Object.keys(na.uniforms).forEach(function(Qe){var _t=na.uniforms[Qe].append(Wr,pa);Array.isArray(_t)&&(_t="["+_t.map(function(wt){return Jn(wt)?wt:Wr.link(wt,{stable:!0})})+"]"),pa.set(Wa.uniforms,"["+Wr.link(It.id(Qe),{stable:!0})+"]",_t)}),Object.keys(na.attributes).forEach(function(Qe){var _t=na.attributes[Qe].append(Wr,pa),wt=Wr.scopeAttrib(Qe);Object.keys(new ga).forEach(function(Lt){pa.set(wt,"."+Lt,_t[Lt])})}),na.scopeVAO){var Le=na.scopeVAO.append(Wr,pa);Jn(Le)?pa.set(Wa.vao,".targetVAO",Le):pa.set(Wa.vao,".targetVAO",Wr.link(Le,{stable:!0}))}function Ue(Qe){var _t=na.shader[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.shader,"."+Qe,wt):pa.set(Wa.shader,"."+Qe,Wr.link(wt,{stable:!0}))}}Ue(wf),Ue(Qc),Object.keys(na.state).length>0&&(pa(ln,".dirty=true;"),pa.exit(ln,".dirty=true;")),pa("a1(",Wr.shared.context,",a0,",Wr.batchId,");")}function rs(Wr){if(!(typeof Wr!="object"||zr(Wr))){for(var na=Object.keys(Wr),pa=0;pa=0;--fo){var Xo=Ei[fo];Xo&&Xo(ua,null,0)}Ut.flush(),ta&&ta.update()}function Mo(){!Wi&&Ei.length>0&&(Wi=m.next(ro))}function zs(){Wi&&(m.cancel(ro),Wi=null)}function Bs(fo){fo.preventDefault(),dr=!0,zs(),so.forEach(function(Xo){Xo()})}function So(fo){Ut.getError(),dr=!1,Ar.restore(),ui.restore(),Fa.restore(),cn.restore(),sn.restore(),ei.restore(),Cn.restore(),ta&&ta.restore(),Pn.procs.refresh(),Mo(),ti.forEach(function(Xo){Xo()})}Jn&&(Jn.addEventListener(je,Bs,!1),Jn.addEventListener(Ze,So,!1));function Ws(){Ei.length=0,zs(),Jn&&(Jn.removeEventListener(je,Bs),Jn.removeEventListener(Ze,So)),ui.clear(),ei.clear(),sn.clear(),Cn.clear(),cn.clear(),za.clear(),Fa.clear(),ta&&ta.clear(),bi.forEach(function(fo){fo()})}function Zo(fo){function Xo(Le){var Ue=p({},Le);delete Ue.uniforms,delete Ue.attributes,delete Ue.context,delete Ue.vao,"stencil"in Ue&&Ue.stencil.op&&(Ue.stencil.opBack=Ue.stencil.opFront=Ue.stencil.op,delete Ue.stencil.op);function Qe(_t){if(_t in Ue){var wt=Ue[_t];delete Ue[_t],Object.keys(wt).forEach(function(Lt){Ue[_t+"."+Lt]=wt[Lt]})}}return Qe("blend"),Qe("depth"),Qe("cull"),Qe("stencil"),Qe("polygonOffset"),Qe("scissor"),Qe("sample"),"vao"in Le&&(Ue.vao=Le.vao),Ue}function Os(Le,Ue){var Qe={},_t={};return Object.keys(Le).forEach(function(wt){var Lt=Le[wt];if(c.isDynamic(Lt)){_t[wt]=c.unbox(Lt,wt);return}else if(Ue&&Array.isArray(Lt)){for(var pr=0;pr0)return Wr.call(this,Wa(Le|0),Le|0)}else if(Array.isArray(Le)){if(Le.length)return Wr.call(this,Le,Le.length)}else return Oi.call(this,Le)}return p(ln,{stats:rs,destroy:function(){Is.destroy()}})}var es=ei.setFBO=Zo({framebuffer:c.define.call(null,ut,"framebuffer")});function $o(fo,Xo){var Os=0;Pn.procs.poll();var ra=Xo.color;ra&&(Ut.clearColor(+ra[0]||0,+ra[1]||0,+ra[2]||0,+ra[3]||0),Os|=ie),"depth"in Xo&&(Ut.clearDepth(+Xo.depth),Os|=fe),"stencil"in Xo&&(Ut.clearStencil(Xo.stencil|0),Os|=be),Ut.clear(Os)}function _s(fo){if("framebuffer"in fo)if(fo.framebuffer&&fo.framebuffer_reglType==="framebufferCube")for(var Xo=0;Xo<6;++Xo)es(p({framebuffer:fo.framebuffer.faces[Xo]},fo),$o);else es(fo,$o);else $o(null,fo)}function Go(fo){Ei.push(fo);function Xo(){var Os=Gt(Ei,fo);function ra(){var Ya=Gt(Ei,ra);Ei[Ya]=Ei[Ei.length-1],Ei.length-=1,Ei.length<=0&&zs()}Ei[Os]=ra}return Mo(),{cancel:Xo}}function Ys(){var fo=In.viewport,Xo=In.scissor_box;fo[0]=fo[1]=Xo[0]=Xo[1]=0,ua.viewportWidth=ua.framebufferWidth=ua.drawingBufferWidth=fo[2]=Xo[2]=Ut.drawingBufferWidth,ua.viewportHeight=ua.framebufferHeight=ua.drawingBufferHeight=fo[3]=Xo[3]=Ut.drawingBufferHeight}function Ll(){ua.tick+=1,ua.time=ru(),Ys(),Pn.procs.poll()}function mo(){cn.refresh(),Ys(),Pn.procs.refresh(),ta&&ta.update()}function ru(){return(h()-ka)/1e3}mo();function Rs(fo,Xo){var Os;switch(fo){case"frame":return Go(Xo);case"lost":Os=so;break;case"restore":Os=ti;break;case"destroy":Os=bi;break;default:}return Os.push(Xo),{cancel:function(){for(var ra=0;ra=0},read:Rn,destroy:Ws,_gl:Ut,_refresh:mo,poll:function(){Ll(),ta&&ta.update()},now:ru,stats:vr,getCachedCode:Yu,preloadCachedCode:Ul});return It.onDone(null,ql),ql}return Kt})}}),lq=ze({"node_modules/gl-util/context.js"(J,V){"use strict";var p=qd();V.exports=function(n){if(n?typeof n=="string"&&(n={container:n}):n={},E(n)?n={container:n}:k(n)?n={container:n}:l(n)?n={gl:n}:n=p(n,{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),n.pixelRatio||(n.pixelRatio=window.pixelRatio||1),n.gl)return n.gl;if(n.canvas&&(n.container=n.canvas.parentNode),n.container){if(typeof n.container=="string"){var r=document.querySelector(n.container);if(!r)throw Error("Element "+n.container+" is not found");n.container=r}E(n.container)?(n.canvas=n.container,n.container=n.canvas.parentNode):n.canvas||(n.canvas=e(),n.container.appendChild(n.canvas),b(n))}else if(!n.canvas)if(typeof document<"u")n.container=document.body||document.documentElement,n.canvas=e(),n.container.appendChild(n.canvas),b(n);else throw Error("Not DOM environment. Use headless-gl.");return n.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{n.gl=n.canvas.getContext(a,n.attrs)}catch{}return n.gl}),n.gl};function b(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var n=t.container.getBoundingClientRect();t.canvas.width=t.width||n.right-n.left,t.canvas.height=t.height||n.bottom-n.top}}function E(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function k(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),uq=ze({"node_modules/font-atlas/index.js"(J,V){"use strict";var p=dM(),b=[32,126];V.exports=E;function E(k){k=k||{};var l=k.shape?k.shape:k.canvas?[k.canvas.width,k.canvas.height]:[512,512],e=k.canvas||document.createElement("canvas"),t=k.font,n=typeof k.step=="number"?[k.step,k.step]:k.step||[32,32],r=k.chars||b;if(t&&typeof t!="string"&&(t=p(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var a=[],o=r[0],s=0;o<=r[1];o++)a[s++]=String.fromCharCode(o);r=a}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var m=n[0]/2,h=n[1]/2,o=0;ol[0]-n[0]/2&&(m=n[0]/2,h+=n[1]);return e}}}),vM=ze({"node_modules/bit-twiddle/twiddle.js"(J){"use strict";"use restrict";var V=32;J.INT_BITS=V,J.INT_MAX=2147483647,J.INT_MIN=-1<0)-(E<0)},J.abs=function(E){var k=E>>V-1;return(E^k)-k},J.min=function(E,k){return k^(E^k)&-(E65535)<<4,E>>>=k,l=(E>255)<<3,E>>>=l,k|=l,l=(E>15)<<2,E>>>=l,k|=l,l=(E>3)<<1,E>>>=l,k|=l,k|E>>1},J.log10=function(E){return E>=1e9?9:E>=1e8?8:E>=1e7?7:E>=1e6?6:E>=1e5?5:E>=1e4?4:E>=1e3?3:E>=100?2:E>=10?1:0},J.popCount=function(E){return E=E-(E>>>1&1431655765),E=(E&858993459)+(E>>>2&858993459),(E+(E>>>4)&252645135)*16843009>>>24};function p(E){var k=32;return E&=-E,E&&k--,E&65535&&(k-=16),E&16711935&&(k-=8),E&252645135&&(k-=4),E&858993459&&(k-=2),E&1431655765&&(k-=1),k}J.countTrailingZeros=p,J.nextPow2=function(E){return E+=E===0,--E,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E+1},J.prevPow2=function(E){return E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E-(E>>>1)},J.parity=function(E){return E^=E>>>16,E^=E>>>8,E^=E>>>4,E&=15,27030>>>E&1};var b=new Array(256);(function(E){for(var k=0;k<256;++k){var l=k,e=k,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;E[k]=e<>>8&255]<<16|b[E>>>16&255]<<8|b[E>>>24&255]},J.interleave2=function(E,k){return E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,k&=65535,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,E|k<<1},J.deinterleave2=function(E,k){return E=E>>>k&1431655765,E=(E|E>>>1)&858993459,E=(E|E>>>2)&252645135,E=(E|E>>>4)&16711935,E=(E|E>>>16)&65535,E<<16>>16},J.interleave3=function(E,k,l){return E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,k&=1023,k=(k|k<<16)&4278190335,k=(k|k<<8)&251719695,k=(k|k<<4)&3272356035,k=(k|k<<2)&1227133513,E|=k<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,E|l<<2},J.deinterleave3=function(E,k){return E=E>>>k&1227133513,E=(E|E>>>2)&3272356035,E=(E|E>>>4)&251719695,E=(E|E>>>8)&4278190335,E=(E|E>>>16)&1023,E<<22>>22},J.nextCombination=function(E){var k=E|E-1;return k+1|(~k&-~k)-1>>>p(E)+1}}}),cq=ze({"node_modules/dup/dup.js"(J,V){"use strict";function p(k,l,e){var t=k[e]|0;if(t<=0)return[];var n=new Array(t),r;if(e===k.length-1)for(r=0;r"u"&&(l=0),typeof k){case"number":if(k>0)return b(k|0,l);break;case"object":if(typeof k.length=="number")return p(k,l,0);break}return[]}V.exports=E}}),fq=ze({"node_modules/typedarray-pool/pool.js"(J){"use strict";var V=vM(),p=cq(),b=$v().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:p([32,0]),UINT16:p([32,0]),UINT32:p([32,0]),BIGUINT64:p([32,0]),INT8:p([32,0]),INT16:p([32,0]),INT32:p([32,0]),BIGINT64:p([32,0]),FLOAT:p([32,0]),DOUBLE:p([32,0]),DATA:p([32,0]),UINT8C:p([32,0]),BUFFER:p([32,0])});var E=typeof Uint8ClampedArray<"u",k=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=p([32,0])),e.BIGUINT64||(e.BIGUINT64=p([32,0])),e.BIGINT64||(e.BIGINT64=p([32,0])),e.BUFFER||(e.BUFFER=p([32,0]));var t=e.DATA,n=e.BUFFER;J.free=function(u){if(b.isBuffer(u))n[V.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var A=u.length||u.byteLength,x=V.log2(A)|0;t[x].push(u)}};function r(f){if(f){var u=f.length||f.byteLength,A=V.log2(u);t[A].push(f)}}function a(f){r(f.buffer)}J.freeUint8=J.freeUint16=J.freeUint32=J.freeBigUint64=J.freeInt8=J.freeInt16=J.freeInt32=J.freeBigInt64=J.freeFloat32=J.freeFloat=J.freeFloat64=J.freeDouble=J.freeUint8Clamped=J.freeDataView=a,J.freeArrayBuffer=r,J.freeBuffer=function(u){n[V.log2(u.length)].push(u)},J.malloc=function(u,A){if(A===void 0||A==="arraybuffer")return o(u);switch(A){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return m(u);case"int8":return h(u);case"int16":return v(u);case"int32":return g(u);case"float":case"float32":return i(u);case"double":case"float64":return w(u);case"uint8_clamped":return S(u);case"bigint64":return C(u);case"biguint64":return M(u);case"buffer":return T(u);case"data":case"dataview":return _(u);default:return null}return null};function o(u){var u=V.nextPow2(u),A=V.log2(u),x=t[A];return x.length>0?x.pop():new ArrayBuffer(u)}J.mallocArrayBuffer=o;function s(f){return new Uint8Array(o(f),0,f)}J.mallocUint8=s;function c(f){return new Uint16Array(o(2*f),0,f)}J.mallocUint16=c;function m(f){return new Uint32Array(o(4*f),0,f)}J.mallocUint32=m;function h(f){return new Int8Array(o(f),0,f)}J.mallocInt8=h;function v(f){return new Int16Array(o(2*f),0,f)}J.mallocInt16=v;function g(f){return new Int32Array(o(4*f),0,f)}J.mallocInt32=g;function i(f){return new Float32Array(o(4*f),0,f)}J.mallocFloat32=J.mallocFloat=i;function w(f){return new Float64Array(o(8*f),0,f)}J.mallocFloat64=J.mallocDouble=w;function S(f){return E?new Uint8ClampedArray(o(f),0,f):s(f)}J.mallocUint8Clamped=S;function M(f){return k?new BigUint64Array(o(8*f),0,f):null}J.mallocBigUint64=M;function C(f){return l?new BigInt64Array(o(8*f),0,f):null}J.mallocBigInt64=C;function _(f){return new DataView(o(f),0,f)}J.mallocDataView=_;function T(f){f=V.nextPow2(f);var u=V.log2(f),A=n[u];return A.length>0?A.pop():new b(f)}J.mallocBuffer=T,J.clearCache=function(){for(var u=0;u<32;++u)e.UINT8[u].length=0,e.UINT16[u].length=0,e.UINT32[u].length=0,e.INT8[u].length=0,e.INT16[u].length=0,e.INT32[u].length=0,e.FLOAT[u].length=0,e.DOUBLE[u].length=0,e.BIGUINT64[u].length=0,e.BIGINT64[u].length=0,e.UINT8C[u].length=0,t[u].length=0,n[u].length=0}}}),hq=ze({"node_modules/is-plain-obj/index.js"(J,V){"use strict";var p=Object.prototype.toString;V.exports=function(b){var E;return p.call(b)==="[object Object]"&&(E=Object.getPrototypeOf(b),E===null||E===Object.getPrototypeOf({}))}}}),mM=ze({"node_modules/parse-unit/index.js"(J,V){V.exports=function(b,E){E||(E=[0,""]),b=String(b);var k=parseFloat(b,10);return E[0]=k,E[1]=b.match(/[\d.\-\+]*\s*(.*)/)[1]||"",E}}}),dq=ze({"node_modules/gl-text/node_modules/to-px/topx.js"(J,V){"use strict";var p=mM();V.exports=l;var b=96;function E(e,t){var n=p(getComputedStyle(e).getPropertyValue(t));return n[0]*l(n[1],e)}function k(e,t){var n=document.createElement("div");n.style["font-size"]="128"+e,t.appendChild(n);var r=E(n,"font-size")/128;return t.removeChild(n),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return k(e,t);case"em":return E(t,"font-size");case"rem":return E(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 b;case"cm":return b/2.54;case"mm":return b/25.4;case"pt":return b/72;case"pc":return b/6}return 1}}}),pq=ze({"node_modules/detect-kerning/index.js"(J,V){"use strict";V.exports=k;var p=k.canvas=document.createElement("canvas"),b=p.getContext("2d"),E=l([32,126]);k.createPairs=l,k.ascii=E;function k(e,t){Array.isArray(e)&&(e=e.join(", "));var n={},r,a=16,o=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(o=t.threshold))),r||(r=E),b.font=a+"px "+e;for(var s=0;sa*o){var v=(h-m)/a;n[c]=v*1e3}}return n}function l(e){for(var t=[],n=e[0];n<=e[1];n++)for(var r=String.fromCharCode(n),a=e[0];a0;n-=4)if(t[n]!==0)return Math.floor((n-3)*.25/e)}}}),mq=ze({"node_modules/gl-text/dist.js"(J,V){"use strict";var p=sq(),b=qd(),E=pM(),k=lq(),l=iM(),e=ay(),t=uq(),n=fq(),r=yg(),a=hq(),o=mM(),s=dq(),c=pq(),m=Vc(),h=vq(),v=f0(),g=vM(),i=g.nextPow2,w=new l,S=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(S=!0),document.body.removeChild(M));var M,C=function(f){_(f)?(f={regl:f},this.gl=f.regl._gl):this.gl=k(f),this.shader=w.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=f.regl||E({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(),w.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(a(f)?f:{})};C.prototype.createShader=function(){var f=this.regl,u=f({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:f.prop("count"),offset:f.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:f.this("sizeBuffer")},width:{offset:0,stride:8,buffer:f.this("sizeBuffer")},char:f.this("charBuffer"),position:f.this("position")},uniforms:{atlasSize:function(x,z){return[z.atlas.width,z.atlas.height]},atlasDim:function(x,z){return[z.atlas.cols,z.atlas.rows]},atlas:function(x,z){return z.atlas.texture},charStep:function(x,z){return z.atlas.step},em:function(x,z){return z.atlas.em},color:f.prop("color"),opacity:f.prop("opacity"),viewport:f.this("viewportArray"),scale:f.this("scale"),align:f.prop("align"),baseline:f.prop("baseline"),translate:f.this("translate"),positionOffset:f.prop("positionOffset")},primitive:"points",viewport:f.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2692,9 +2692,9 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),S={};return{regl:T,draw:b,atlas:S}},C.prototype.update=function(T){var b=this;if(typeof T=="string")T={text:T};else if(!T)return;T=a(T,{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),T.opacity!=null&&(Array.isArray(T.opacity)?this.opacity=T.opacity.map(function(ee){return parseFloat(ee)}):this.opacity=parseFloat(T.opacity)),T.viewport!=null&&(this.viewport=c(T.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]),T.kerning!=null&&(this.kerning=T.kerning),T.offset!=null&&(typeof T.offset=="number"&&(T.offset=[T.offset,0]),this.positionOffset=y(T.offset)),T.direction&&(this.direction=T.direction),T.range&&(this.range=T.range,this.scale=[1/(T.range[2]-T.range[0]),1/(T.range[3]-T.range[1])],this.translate=[-T.range[0],-T.range[1]]),T.scale&&(this.scale=T.scale),T.translate&&(this.translate=T.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!T.font&&(T.font=C.baseFontSize+"px sans-serif");var S=!1,A=!1;if(T.font&&(Array.isArray(T.font)?T.font:[T.font]).forEach(function(ee,ce){if(typeof ee=="string")try{ee=t.parse(ee)}catch{ee=t.parse(C.baseFontSize+"px "+ee)}else{var _e=ee.style,Se=ee.weight,Me=ee.stretch,Ue=ee.variant;ee=t.parse(t.stringify(ee)),_e&&(ee.style=_e),Se&&(ee.weight=Se),Me&&(ee.stretch=Me),Ue&&(ee.variant=Ue)}var Ge=t.stringify({size:C.baseFontSize,family:ee.family,stretch:E?ee.stretch:void 0,variant:ee.variant,weight:ee.weight,style:ee.style}),Ze=h(ee.size),Ke=Math.round(Ze[0]*d(Ze[1]));if(Ke!==b.fontSize[ce]&&(A=!0,b.fontSize[ce]=Ke),(!b.font[ce]||Ge!=b.font[ce].baseString)&&(S=!0,b.font[ce]=C.fonts[Ge],!b.font[ce])){var dt=ee.family.join(", "),_t=[ee.style];ee.style!=ee.variant&&_t.push(ee.variant),ee.variant!=ee.weight&&_t.push(ee.weight),E&&ee.weight!=ee.stretch&&_t.push(ee.stretch),b.font[ce]={baseString:Ge,family:dt,weight:ee.weight,stretch:ee.stretch,style:ee.style,variant:ee.variant,width:{},kerning:{},metrics:m(dt,{origin:"top",fontSize:C.baseFontSize,fontStyle:_t.join(" ")})},C.fonts[Ge]=b.font[ce]}}),(S||A)&&this.font.forEach(function(ee,ce){var _e=t.stringify({size:b.fontSize[ce],family:ee.family,stretch:E?ee.stretch:void 0,variant:ee.variant,weight:ee.weight,style:ee.style});if(b.fontAtlas[ce]=b.shader.atlas[_e],!b.fontAtlas[ce]){var Se=ee.metrics;b.shader.atlas[_e]=b.fontAtlas[ce]={fontString:_e,step:Math.ceil(b.fontSize[ce]*Se.bottom*.5)*2,em:b.fontSize[ce],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:b.regl.texture()}}T.text==null&&(T.text=b.text)}),typeof T.text=="string"&&T.position&&T.position.length>2){for(var F=Array(T.position.length*.5),D=0;D2){for(var z=!T.position[0].length,I=u.mallocFloat(this.count*2),L=0,B=0;L1?b.align[ce]:b.align[0]:b.align;if(typeof _e=="number")return _e;switch(_e){case"right":case"end":return-ee;case"center":case"centre":case"middle":return-ee*.5}return 0})),this.baseline==null&&T.baseline==null&&(T.baseline=0),T.baseline!=null&&(this.baseline=T.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ee,ce){var _e=(b.font[ce]||b.font[0]).metrics,Se=0;return Se+=_e.bottom*.5,typeof ee=="number"?Se+=ee-_e.baseline:Se+=-_e[ee],Se*=-1,Se})),T.color!=null)if(T.color||(T.color="transparent"),typeof T.color=="string"||!isNaN(T.color))this.color=l(T.color,"uint8");else{var ue;if(typeof T.color[0]=="number"&&T.color.length>this.counts.length){var fe=T.color.length;ue=u.mallocUint8(fe);for(var pe=(T.color.subarray||T.color.slice).bind(T.color),we=0;we4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(oe){var te=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(te);for(var ie=0;ie1?this.counts[ie]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ie]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ie*4,ie*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ie]:this.opacity,baseline:this.baselineOffset[ie]!=null?this.baselineOffset[ie]:this.baselineOffset[0],align:this.align?this.alignOffset[ie]!=null?this.alignOffset[ie]:this.alignOffset[0]:0,atlas:this.fontAtlas[ie]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ie*2,ie*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=[]}},C.prototype.destroy=function(){},C.prototype.kerning=!0,C.prototype.position={constant:new Float32Array(2)},C.prototype.translate=null,C.prototype.scale=null,C.prototype.font=null,C.prototype.text="",C.prototype.positionOffset=[0,0],C.prototype.opacity=1,C.prototype.color=new Uint8Array([0,0,0,255]),C.prototype.alignOffset=[0,0],C.maxAtlasSize=1024,C.atlasCanvas=document.createElement("canvas"),C.atlasContext=C.atlasCanvas.getContext("2d",{alpha:!1}),C.baseFontSize=64,C.fonts={};function w(k){return typeof k=="function"&&k._gl&&k.prop&&k.texture&&k.buffer}r.exports=C}}),LM=ye({"src/lib/prepare_regl.js"(e,r){"use strict";var t=vP(),a=hI();r.exports=function(o,s,l){var n=o._fullLayout,u=!0;return n._glcanvas.each(function(c){if(c.regl){c.regl.preloadCachedCode(l);return}if(!(c.pick&&!n._has("parcoords"))){try{c.regl=a({canvas:this,attributes:{antialias:!c.pick,preserveDrawingBuffer:!0},pixelRatio:o._context.plotGlPixelRatio||window.devicePixelRatio,extensions:s||[],cachedCode:l||{}})}catch{u=!1}c.regl||(u=!1),u&&this.addEventListener("webglcontextlost",function(f){o&&o.emit&&o.emit("plotly_webglcontextlost",{event:f,layer:c.key})},!1)}}),u||t({container:n._glcontainer.node()}),u}}}),vI=ye({"src/traces/scattergl/plot.js"(p,r){"use strict";var t=HP(),a=iI(),i=aue(),o=yue(),s=Yt(),l=Np().selectMode,n=LM(),u=ms(),c=T9(),f=qP().styleTextSelection,h={};function d(g,m,y,_){var v=g._size,x=g.width*_,E=g.height*_,M=v.l*_,C=v.b*_,w=v.r*_,k=v.t*_,T=v.w*_,b=v.h*_;return[M+m.domain[0]*T,C+y.domain[0]*b,x-w-(1-m.domain[1])*T,E-k-(1-y.domain[1])*b]}var p=r.exports=function(m,y,_){if(_.length){var v=m._fullLayout,x=y._scene,E=y.xaxis,M=y.yaxis,C,w;if(x){var k=n(m,["ANGLE_instanced_arrays","OES_element_index_uint"],h);if(!k){x.init();return}var T=x.count,b=v._glcanvas.data()[0].regl;if(c(m,y,_),x.dirty){if((x.line2d||x.error2d)&&!(x.scatter2d||x.fill2d||x.glText)&&b.clear({color:!0,depth:!0}),x.error2d===!0&&(x.error2d=i(b)),x.line2d===!0&&(x.line2d=a(b)),x.scatter2d===!0&&(x.scatter2d=t(b)),x.fill2d===!0&&(x.fill2d=a(b)),x.glText===!0)for(x.glText=new Array(T),C=0;Cx.glText.length){var S=T-x.glText.length;for(C=0;CY&&(isNaN(q[K])||isNaN(q[K+1]));)K-=2;j.positions=q.slice(Y,K+2)}return j}),x.line2d.update(x.lineOptions)),x.error2d){var D=(x.errorXOptions||[]).concat(x.errorYOptions||[]).map(function(j){return j||{positions:[],errors:[]}});x.error2d.update(D)}x.scatter2d&&x.scatter2d.update(x.markerOptions),x.fillOrder=s.repeat(null,T),x.fill2d&&(x.fillOptions=x.fillOptions.map(function(j,q){var Y=_[q];if(!(!j||!Y||!Y[0]||!Y[0].trace)){var K=Y[0],re=K.trace,se=K.t,le=x.lineOptions[q],ue,fe,pe=[];re._ownfill&&pe.push(q),re._nexttrace&&pe.push(q+1),pe.length&&(x.fillOrder[q]=pe);var we=[],xe=le&&le.positions||se.positions,he,oe;if(re.fill==="tozeroy"){for(he=0;hehe&&isNaN(xe[oe+1]);)oe-=2;xe[he+1]!==0&&(we=[xe[he],0]),we=we.concat(xe.slice(he,oe+2)),xe[oe+1]!==0&&(we=we.concat([xe[oe],0]))}else if(re.fill==="tozerox"){for(he=0;hehe&&isNaN(xe[oe]);)oe-=2;xe[he]!==0&&(we=[0,xe[he+1]]),we=we.concat(xe.slice(he,oe+2)),xe[oe]!==0&&(we=we.concat([0,xe[oe+1]]))}else if(re.fill==="toself"||re.fill==="tonext"){for(we=[],ue=0,j.splitNull=!0,fe=0;fe-1;for(let[j]of _)if(j){var I=j.trace,L=j.t,B=L.index,O=I._length,G=L.x,$=L.y;if(I.selectedpoints||P||z){if(P||(P=!0),I.selectedpoints){var X=x.selectBatch[B]=I.selectedpoints,Z={};for(w=0;wE&&y||xf,A;for(S?A=y.sizeAvg||Math.max(y.size,3):A=i(p,m),M=0;M{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,o(()=>{this.dirty=!1})),this)},u.prototype.update=function(...d){if(!d.length)return;for(let m=0;mA||!y.lower&&S{p[_+x]=m})}this.scatter.draw(...p)}return this},u.prototype.destroy=function(){return this.traces.forEach(d=>{d.buffer&&d.buffer.destroy&&d.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function c(d,p,g){let m=d.id!=null?d.id:d,y=p,_=g;return m<<16|(y&255)<<8|_&255}function f(d,p,g){let m,y,_,v,x,E,M,C,w=d[p],k=d[g];return w.length>2?(m=w[0],_=w[2],y=w[1],v=w[3]):w.length?(m=y=w[0],_=v=w[1]):(m=w.x,y=w.y,_=w.x+w.width,v=w.y+w.height),k.length>2?(x=k[0],M=k[2],E=k[1],C=k[3]):k.length?(x=E=k[0],M=C=k[1]):(x=k.x,E=k.y,M=k.x+k.width,C=k.y+k.height),[x,y,M,v]}function h(d){if(typeof d=="number")return[d,d,d,d];if(d.length===2)return[d[0],d[1],d[0],d[1]];{let p=l(d);return[p.x,p.y,p.x+p.width,p.y+p.height]}}}}),kue=ye({"src/traces/splom/plot.js"(e,r){"use strict";var t=Sue(),a=Yt(),i=Gs(),o=Np().selectMode;r.exports=function(n,u,c){if(c.length)for(var f=0;f-1,z=o(y)||!!f.selectedpoints||P,I=!0;if(z){var L=f._length;if(f.selectedpoints){d.selectBatch=f.selectedpoints;var B=f.selectedpoints,O={};for(x=0;x=G[$][0]&&O<=G[$][1])return!0;return!1}function p(O){O.attr("x",-t.bar.captureWidth/2).attr("width",t.bar.captureWidth)}function g(O){O.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(O){if(!O.brush.filterSpecified)return"0,"+O.height;for(var G=y(O.brush.filter.getConsolidated(),O.height),$=[0],X,Z,J,N=G.length?G[0][0]:null,H=0;HO[1]+$||G=.9*O[1]+.1*O[0]?"n":G<=.9*O[0]+.1*O[1]?"s":"ns"}function v(){a.select(document.body).style("cursor",null)}function x(O){O.attr("stroke-dasharray",m)}function E(O,G){var $=a.select(O).selectAll(".highlight, .highlight-shadow"),X=G?$.transition().duration(t.bar.snapDuration).each("end",G):$;x(X)}function M(O,G){var $=O.brush,X=$.filterSpecified,Z=NaN,J={},N;if(X){var H=O.height,W=$.filter.getConsolidated(),U=y(W,H),V=NaN,j=NaN,q=NaN;for(N=0;N<=U.length;N++){var Y=U[N];if(Y&&Y[0]<=G&&G<=Y[1]){V=N;break}else if(j=N?N-1:NaN,Y&&Y[0]>G){q=N;break}}if(Z=V,isNaN(Z)&&(isNaN(j)||isNaN(q)?Z=isNaN(j)?q:j:Z=G-U[j][1]=ue[0]&&le<=ue[1]){J.clickableOrdinalRange=ue;break}}}return J}function C(O,G){a.event.sourceEvent.stopPropagation();var $=G.height-a.mouse(O)[1]-2*t.verticalPadding,X=G.unitToPaddedPx.invert($),Z=G.brush,J=M(G,$),N=J.interval,H=Z.svgBrush;if(H.wasDragged=!1,H.grabbingBar=J.region==="ns",H.grabbingBar){var W=N.map(G.unitToPaddedPx);H.grabPoint=$-W[0]-t.verticalPadding,H.barLength=W[1]-W[0]}H.clickableOrdinalRange=J.clickableOrdinalRange,H.stayingIntervals=G.multiselect&&Z.filterSpecified?Z.filter.getConsolidated():[],N&&(H.stayingIntervals=H.stayingIntervals.filter(function(U){return U[0]!==N[0]&&U[1]!==N[1]})),H.startExtent=J.region?N[J.region==="s"?1:0]:X,G.parent.inBrushDrag=!0,H.brushStartCallback()}function w(O,G){a.event.sourceEvent.stopPropagation();var $=G.height-a.mouse(O)[1]-2*t.verticalPadding,X=G.brush.svgBrush;X.wasDragged=!0,X._dragging=!0,X.grabbingBar?X.newExtent=[$-X.grabPoint,$+X.barLength-X.grabPoint].map(G.unitToPaddedPx.invert):X.newExtent=[X.startExtent,G.unitToPaddedPx.invert($)].sort(s),G.brush.filterSpecified=!0,X.extent=X.stayingIntervals.concat([X.newExtent]),X.brushCallback(G),E(O.parentNode)}function k(O,G){var $=G.brush,X=$.filter,Z=$.svgBrush;Z._dragging||(T(O,G),w(O,G),G.brush.svgBrush.wasDragged=!1),Z._dragging=!1;var J=a.event;J.sourceEvent.stopPropagation();var N=Z.grabbingBar;if(Z.grabbingBar=!1,Z.grabLocation=void 0,G.parent.inBrushDrag=!1,v(),!Z.wasDragged){Z.wasDragged=void 0,Z.clickableOrdinalRange?$.filterSpecified&&G.multiselect?Z.extent.push(Z.clickableOrdinalRange):(Z.extent=[Z.clickableOrdinalRange],$.filterSpecified=!0):N?(Z.extent=Z.stayingIntervals,Z.extent.length===0&&R($)):R($),Z.brushCallback(G),E(O.parentNode),Z.brushEndCallback($.filterSpecified?X.getConsolidated():[]);return}var H=function(){X.set(X.getConsolidated())};if(G.ordinal){var W=G.unitTickvals;W[W.length-1]Z.newExtent[0];Z.extent=Z.stayingIntervals.concat(U?[Z.newExtent]:[]),Z.extent.length||R($),Z.brushCallback(G),U?E(O.parentNode,H):(H(),E(O.parentNode))}else H();Z.brushEndCallback($.filterSpecified?X.getConsolidated():[])}function T(O,G){var $=G.height-a.mouse(O)[1]-2*t.verticalPadding,X=M(G,$),Z="crosshair";X.clickableOrdinalRange?Z="pointer":X.region&&(Z=X.region+"-resize"),a.select(document.body).style("cursor",Z)}function b(O){O.on("mousemove",function(G){a.event.preventDefault(),G.parent.inBrushDrag||T(this,G)}).on("mouseleave",function(G){G.parent.inBrushDrag||v()}).call(a.behavior.drag().on("dragstart",function(G){C(this,G)}).on("drag",function(G){w(this,G)}).on("dragend",function(G){k(this,G)}))}function S(O,G){return O[0]-G[0]}function A(O,G,$){var X=$._context.staticPlot,Z=O.selectAll(".background").data(o);Z.enter().append("rect").classed("background",!0).call(p).call(g).style("pointer-events",X?"none":"auto").attr("transform",l(0,t.verticalPadding)),Z.call(b).attr("height",function(H){return H.height-t.verticalPadding});var J=O.selectAll(".highlight-shadow").data(o);J.enter().append("line").classed("highlight-shadow",!0).attr("x",-t.bar.width/2).attr("stroke-width",t.bar.width+t.bar.strokeWidth).attr("stroke",G).attr("opacity",t.bar.strokeOpacity).attr("stroke-linecap","butt"),J.attr("y1",function(H){return H.height}).call(x);var N=O.selectAll(".highlight").data(o);N.enter().append("line").classed("highlight",!0).attr("x",-t.bar.width/2).attr("stroke-width",t.bar.width-t.bar.strokeWidth).attr("stroke",t.bar.fillColor).attr("opacity",t.bar.fillOpacity).attr("stroke-linecap","butt"),N.attr("y1",function(H){return H.height}).call(x)}function F(O,G,$){var X=O.selectAll("."+t.cn.axisBrush).data(o,i);X.enter().append("g").classed(t.cn.axisBrush,!0),A(X,G,$)}function D(O){return O.svgBrush.extent.map(function(G){return G.slice()})}function R(O){O.filterSpecified=!1,O.svgBrush.extent=[[-1/0,1/0]]}function P(O){return function($){var X=$.brush,Z=D(X),J=Z.slice();X.filter.set(J),O()}}function z(O){for(var G=O.slice(),$=[],X,Z=G.shift();Z;){for(X=Z.slice();(Z=G.shift())&&Z[0]<=X[1];)X[1]=Math.max(X[1],Z[1]);$.push(X)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function I(){var O=[],G,$;return{set:function(X){O=X.map(function(Z){return Z.slice().sort(s)}).sort(S),O.length===1&&O[0][0]===-1/0&&O[0][1]===1/0&&(O=[[0,-1]]),G=z(O),$=O.reduce(function(Z,J){return[Math.min(Z[0],J[0]),Math.max(Z[1],J[1])]},[1/0,-1/0])},get:function(){return O.slice()},getConsolidated:function(){return G},getBounds:function(){return $}}}function L(O,G,$,X,Z,J){var N=I();return N.set($),{filter:N,filterSpecified:G,svgBrush:{extent:[],brushStartCallback:X,brushCallback:P(Z),brushEndCallback:J}}}function B(O,G){if(Array.isArray(O[0])?(O=O.map(function(X){return X.sort(s)}),G.multiselect?O=z(O.sort(S)):O=[O[0]]):O=[O.sort(s)],G.tickvals){var $=G.tickvals.slice().sort(s);if(O=O.map(function(X){var Z=[h(0,$,X[0],[]),h(1,$,X[1],[])];if(Z[1]>Z[0])return Z}).filter(function(X){return X}),!O.length)return}return O.length>1?O:O[0]}r.exports={makeBrush:L,ensureAxisBrush:F,cleanRanges:B}}}),zue=ye({"src/traces/parcoords/defaults.js"(e,r){"use strict";var t=Yt(),a=xc().hasColorscale,i=Su(),o=Ds().defaults,s=Oc(),l=qi(),n=yI(),u=_I(),c=Wb().maxDimensionCount,f=FM();function h(p,g,m,y,_){var v=_("line.color",m);if(a(p,"line")&&t.isArrayOrTypedArray(v)){if(v.length)return _("line.colorscale"),i(p,g,y,_,{prefix:"line.",cLetter:"c"}),v.length;g.line.color=m}return 1/0}function d(p,g,m,y){function _(C,w){return t.coerce(p,g,n.dimensions,C,w)}var v=_("values"),x=_("visible");if(v&&v.length||(x=g.visible=!1),x){_("label"),_("tickvals"),_("ticktext"),_("tickformat");var E=_("range");g._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:E},l.setConvert(g._ax,y.layout),_("multiselect");var M=_("constraintrange");M&&(g.constraintrange=u.cleanRanges(M,g))}}r.exports=function(g,m,y,_){function v(w,k){return t.coerce(g,m,n,w,k)}var x=g.dimensions;Array.isArray(x)&&x.length>c&&(t.log("parcoords traces support up to "+c+" dimensions at the moment"),x.splice(c));var E=s(g,m,{name:"dimensions",layout:_,handleItemDefaults:d}),M=h(g,m,y,_,v);o(m,_,v),(!Array.isArray(E)||!E.length)&&(m.visible=!1),f(m,E,"values",M);var C=t.extendFlat({},_.font,{size:Math.round(_.font.size/1.2)});t.coerceFont(v,"labelfont",C),t.coerceFont(v,"tickfont",C,{autoShadowDflt:!0}),t.coerceFont(v,"rangefont",C),v("labelangle"),v("labelside"),v("unselected.line.color"),v("unselected.line.opacity")}}}),Bue=ye({"src/traces/parcoords/calc.js"(e,r){"use strict";var t=Yt().isArrayOrTypedArray,a=As(),i=$p().wrap;r.exports=function(l,n){var u,c;return a.hasColorscale(n,"line")&&t(n.line.color)?(u=n.line.color,c=a.extractOpts(n.line).colorscale,a.calc(l,n,{vals:u,containerStr:"line",cLetter:"c"})):(u=o(n._length),c=[[0,n.line.color],[1,n.line.color]]),i({lineColor:u,cscale:c})};function o(s){for(var l=new Array(s),n=0;n 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(` -`),a=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),i=Wb().maxDimensionCount,o=Yt(),s=1e-6,l=2048,n=new Uint8Array(4),u=new Uint8Array(4),c={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function f(k){k.read({x:0,y:0,width:1,height:1,data:n})}function h(k,T,b,S,A){var F=k._gl;F.enable(F.SCISSOR_TEST),F.scissor(T,b,S,A),k.clear({color:[0,0,0,0],depth:1})}function d(k,T,b,S,A,F){var D=F.key;function R(P){var z=Math.min(S,A-P*S);P===0&&(window.cancelAnimationFrame(b.currentRafs[D]),delete b.currentRafs[D],h(k,F.scissorX,F.scissorY,F.scissorWidth,F.viewBoxSize[1])),!b.clearOnly&&(F.count=2*z,F.offset=2*P*S,T(F),P*S+z>>8*T)%256/255}function y(k,T,b){for(var S=new Array(k*(i+4)),A=0,F=0;Ffe&&(fe=j[re].dim1.canvasX,le=re);K===0&&h(A,0,0,z.canvasWidth,z.canvasHeight);var pe=N(b);for(re=0;rere._length&&(oe=oe.slice(0,re._length));var te=re.tickvals,ie;function ee(Ue,Ge){return{val:Ue,text:ie[Ge]}}function ce(Ue,Ge){return Ue.val-Ge.val}if(i(te)&&te.length){a.isTypedArray(te)&&(te=Array.from(te)),ie=re.ticktext,!i(ie)||!ie.length?ie=te.map(o(re.tickformat)):ie.length>te.length?ie=ie.slice(0,te.length):te.length>ie.length&&(te=te.slice(0,ie.length));for(var _e=1;_e=Ge||_t>=Ze)return;var Pt=Me.lineLayer.readPixel(dt,Ze-1-_t),pt=Pt[3]!==0,Tt=pt?Pt[2]+256*(Pt[1]+256*Pt[0]):null,st={x:dt,y:_t,clientX:Ue.clientX,clientY:Ue.clientY,dataIndex:Me.model.key,curveNumber:Tt};Tt!==le&&(pt?H.hover(st):H.unhover&&H.unhover(st),le=Tt)}}),se.style("opacity",function(Me){return Me.pick?0:1}),V.style("background","rgba(255, 255, 255, 0)");var fe=V.selectAll("."+_.cn.parcoords).data(re,p);fe.exit().remove(),fe.enter().append("g").classed(_.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),fe.attr("transform",function(Me){return u(Me.model.translateX,Me.model.translateY)});var pe=fe.selectAll("."+_.cn.parcoordsControlView).data(g,p);pe.enter().append("g").classed(_.cn.parcoordsControlView,!0),pe.attr("transform",function(Me){return u(Me.model.pad.l,Me.model.pad.t)});var we=pe.selectAll("."+_.cn.yAxis).data(function(Me){return Me.dimensions},p);we.enter().append("g").classed(_.cn.yAxis,!0),pe.each(function(Me){B(we,Me,q)}),se.each(function(Me){if(Me.viewModel){!Me.lineLayer||H?Me.lineLayer=x(this,Me):Me.lineLayer.update(Me),(Me.key||Me.key===0)&&(Me.viewModel[Me.key]=Me.lineLayer);var Ue=!Me.context||H;Me.lineLayer.render(Me.viewModel.panels,Ue)}}),we.attr("transform",function(Me){return u(Me.xScale(Me.xIndex),0)}),we.call(t.behavior.drag().origin(function(Me){return Me}).on("drag",function(Me){var Ue=Me.parent;K.linePickActive(!1),Me.x=Math.max(-_.overdrag,Math.min(Me.model.width+_.overdrag,t.event.x)),Me.canvasX=Me.x*Me.model.canvasPixelRatio,we.sort(function(Ge,Ze){return Ge.x-Ze.x}).each(function(Ge,Ze){Ge.xIndex=Ze,Ge.x=Me===Ge?Ge.x:Ge.xScale(Ge.xIndex),Ge.canvasX=Ge.x*Ge.model.canvasPixelRatio}),B(we,Ue,q),we.filter(function(Ge){return Math.abs(Me.xIndex-Ge.xIndex)!==0}).attr("transform",function(Ge){return u(Ge.xScale(Ge.xIndex),0)}),t.select(this).attr("transform",u(Me.x,0)),we.each(function(Ge,Ze,Ke){Ke===Me.parent.key&&(Ue.dimensions[Ze]=Ge)}),Ue.contextLayer&&Ue.contextLayer.render(Ue.panels,!1,!D(Ue)),Ue.focusLayer.render&&Ue.focusLayer.render(Ue.panels)}).on("dragend",function(Me){var Ue=Me.parent;Me.x=Me.xScale(Me.xIndex),Me.canvasX=Me.x*Me.model.canvasPixelRatio,B(we,Ue,q),t.select(this).attr("transform",function(Ge){return u(Ge.x,0)}),Ue.contextLayer&&Ue.contextLayer.render(Ue.panels,!1,!D(Ue)),Ue.focusLayer&&Ue.focusLayer.render(Ue.panels),Ue.pickLayer&&Ue.pickLayer.render(Ue.panels,!0),K.linePickActive(!0),H&&H.axesMoved&&H.axesMoved(Ue.key,Ue.dimensions.map(function(Ge){return Ge.crossfilterDimensionIndex}))})),we.exit().remove();var xe=we.selectAll("."+_.cn.axisOverlays).data(g,p);xe.enter().append("g").classed(_.cn.axisOverlays,!0),xe.selectAll("."+_.cn.axis).remove();var he=xe.selectAll("."+_.cn.axis).data(g,p);he.enter().append("g").classed(_.cn.axis,!0),he.each(function(Me){var Ue=Me.model.height/Me.model.tickDistance,Ge=Me.domainScale,Ze=Ge.domain();t.select(this).call(t.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ue,Me.tickFormat).tickValues(Me.ordinal?Ze:null).tickFormat(function(Ke){return y.isOrdinal(Me)?Ke:G(Me.model.dimensions[Me.visibleIndex],Ke)}).scale(Ge)),f.font(he.selectAll("text"),Me.model.tickFont)}),he.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),he.selectAll("text").style("cursor","default");var oe=xe.selectAll("."+_.cn.axisHeading).data(g,p);oe.enter().append("g").classed(_.cn.axisHeading,!0);var te=oe.selectAll("."+_.cn.axisTitle).data(g,p);te.enter().append("text").classed(_.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",W?"none":"auto"),te.text(function(Me){return Me.label}).each(function(Me){var Ue=t.select(this);f.font(Ue,Me.model.labelFont),c.convertToTspans(Ue,Z)}).attr("transform",function(Me){var Ue=L(Me.model.labelAngle,Me.model.labelSide),Ge=_.axisTitleOffset;return(Ue.dir>0?"":u(0,2*Ge+Me.model.height))+n(Ue.degrees)+u(-Ge*Ue.dx,-Ge*Ue.dy)}).attr("text-anchor",function(Me){var Ue=L(Me.model.labelAngle,Me.model.labelSide),Ge=Math.abs(Ue.dx),Ze=Math.abs(Ue.dy);return 2*Ge>Ze?Ue.dir*Ue.dx<0?"start":"end":"middle"});var ie=xe.selectAll("."+_.cn.axisExtent).data(g,p);ie.enter().append("g").classed(_.cn.axisExtent,!0);var ee=ie.selectAll("."+_.cn.axisExtentTop).data(g,p);ee.enter().append("g").classed(_.cn.axisExtentTop,!0),ee.attr("transform",u(0,-_.axisExtentOffset));var ce=ee.selectAll("."+_.cn.axisExtentTopText).data(g,p);ce.enter().append("text").classed(_.cn.axisExtentTopText,!0).call(z),ce.text(function(Me){return $(Me,!0)}).each(function(Me){f.font(t.select(this),Me.model.rangeFont)});var _e=ie.selectAll("."+_.cn.axisExtentBottom).data(g,p);_e.enter().append("g").classed(_.cn.axisExtentBottom,!0),_e.attr("transform",function(Me){return u(0,Me.model.height+_.axisExtentOffset)});var Se=_e.selectAll("."+_.cn.axisExtentBottomText).data(g,p);Se.enter().append("text").classed(_.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(z),Se.text(function(Me){return $(Me,!1)}).each(function(Me){f.font(t.select(this),Me.model.rangeFont)}),v.ensureAxisBrush(xe,Y,Z)}}}),bI=ye({"src/traces/parcoords/plot.js"(n,r){"use strict";var t=Nue(),a=LM(),i=xI().isVisible,o={};function s(u,c,f){var h=c.indexOf(f),d=u.indexOf(h);return d===-1&&(d+=c.length),d}function l(u,c){return function(h,d){return s(u,c,h)-s(u,c,d)}}var n=r.exports=function(c,f){var h=c._fullLayout,d=a(c,[],o);if(d){var p={},g={},m={},y=h._size;f.forEach(function(M,C){var w=M[0].trace,k=m[C]=w.index;p[C]=c.data[k].dimensions,g[C]=c.data[k].dimensions.slice()});var _=function(M,C,w){var k=g[M][C],T=w.map(function(R){return R.slice()}),b="dimensions["+C+"].constraintrange",S=h._tracePreGUI[c._fullData[m[M]].uid];if(S[b]===void 0){var A=k.constraintrange;S[b]=A||null}var F=c._fullData[m[M]].dimensions[C];T.length?(T.length===1&&(T=T[0]),k.constraintrange=T,F.constraintrange=T.slice(),T=[T]):(delete k.constraintrange,delete F.constraintrange,T=null);var D={};D[b]=T,c.emit("plotly_restyle",[D,[m[M]]])},v=function(M){c.emit("plotly_hover",M)},x=function(M){c.emit("plotly_unhover",M)},E=function(M,C){var w=l(C,g[M].filter(i));p[M].sort(w),g[M].filter(function(k){return!i(k)}).sort(function(k){return g[M].indexOf(k)}).forEach(function(k){p[M].splice(p[M].indexOf(k),1),p[M].splice(g[M].indexOf(k),0,k)}),c.emit("plotly_restyle",[{dimensions:[p[M]]},[m[M]]])};t(c,f,{width:y.w,height:y.h,margin:{t:y.t,r:y.r,b:y.b,l:y.l}},{filterChanged:_,hover:v,unhover:x,axesMoved:E})}};n.reglPrecompiled=o}}),jue=ye({"src/traces/parcoords/base_plot.js"(e){"use strict";var r=ai(),t=_c().getModuleCalcData,a=bI(),i=Sd();e.name="parcoords",e.plot=function(o){var s=t(o.calcdata,"parcoords")[0];s.length&&a(o,s)},e.clean=function(o,s,l,n){var u=n._has&&n._has("parcoords"),c=s._has&&s._has("parcoords");u&&!c&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},e.toSVG=function(o){var s=o._fullLayout._glimages,l=r.select(o).selectAll(".svg-container"),n=l.filter(function(c,f){return f===l.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function u(){var c=this,f=c.toDataURL("image/png"),h=s.append("svg:image");h.attr({xmlns:i.svg,"xlink:href":f,preserveAspectRatio:"none",x:0,y:0,width:c.style.width,height:c.style.height})}n.each(u),window.setTimeout(function(){r.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Uue=ye({"src/traces/parcoords/base_index.js"(e,r){"use strict";r.exports={attributes:yI(),supplyDefaults:zue(),calc:Bue(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:jue(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),que=ye({"src/traces/parcoords/index.js"(e,r){"use strict";var t=Uue();t.plot=bI(),r.exports=t}}),Vue=ye({"lib/parcoords.js"(e,r){"use strict";r.exports=que()}}),wI=ye({"src/traces/parcats/attributes.js"(e,r){"use strict";var t=Xi().extendFlat,a=Oo(),i=vs(),o=rs(),{hovertemplateAttrs:s,templatefallbackAttrs:l}=Ro(),n=Ds().attributes,u=t({editType:"calc"},o("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:l({editType:"plot"})});r.exports={domain:n({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:t({},a.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:l({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:i({editType:"calc"}),tickfont:i({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:u,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}}}),Gue=ye({"src/traces/parcats/defaults.js"(e,r){"use strict";var t=Yt(),a=xc().hasColorscale,i=Su(),o=Ds().defaults,s=Oc(),l=wI(),n=FM(),u=yc().isTypedArraySpec;function c(h,d,p,g,m){m("line.shape"),m("line.hovertemplate"),m("line.hovertemplatefallback");var y=m("line.color",g.colorway[0]);if(a(h,"line")&&t.isArrayOrTypedArray(y)){if(y.length)return m("line.colorscale"),i(h,d,g,m,{prefix:"line.",cLetter:"c"}),y.length;d.line.color=p}return 1/0}function f(h,d){function p(E,M){return t.coerce(h,d,l.dimensions,E,M)}var g=p("values"),m=p("visible");if(g&&g.length||(m=d.visible=!1),m){p("label"),p("displayindex",d._index);var y=h.categoryarray,_=t.isArrayOrTypedArray(y)&&y.length>0||u(y),v;_&&(v="array");var x=p("categoryorder",v);x==="array"?(p("categoryarray"),p("ticktext")):(delete h.categoryarray,delete h.ticktext),!_&&x==="array"&&(d.categoryorder="trace")}}r.exports=function(d,p,g,m){function y(E,M){return t.coerce(d,p,l,E,M)}var _=s(d,p,{name:"dimensions",handleItemDefaults:f}),v=c(d,p,g,m,y);o(p,m,y),(!Array.isArray(_)||!_.length)&&(p.visible=!1),n(p,_,"values",v),y("hoveron"),y("hovertemplate"),y("hovertemplatefallback"),y("arrangement"),y("bundlecolors"),y("sortpaths"),y("counts");var x=m.font;t.coerceFont(y,"labelfont",x,{overrideDflt:{size:Math.round(x.size)}}),t.coerceFont(y,"tickfont",x,{autoShadowDflt:!0,overrideDflt:{size:Math.round(x.size/1.2)}})}}}),Hue=ye({"src/traces/parcats/calc.js"(e,r){"use strict";var t=$p().wrap,a=xc().hasColorscale,i=Nc(),o=RD(),s=$i(),l=Yt(),n=en();r.exports=function(x,E){var M=l.filterVisible(E.dimensions);if(M.length===0)return[];var C=M.map(function(N){var H;if(N.categoryorder==="trace")H=null;else if(N.categoryorder==="array")H=N.categoryarray;else{H=o(N.values);for(var W=!0,U=0;U=v.length||x[v[E]]!==void 0)return!1;x[v[E]]=!0}return!0}}}),Wue=ye({"src/traces/parcats/parcats.js"(e,r){"use strict";var t=ai(),a=(Xm(),On(zv)).interpolateNumber,i=FA(),o=Ya(),s=Hs(),l=Yt(),n=l.strTranslate,u=$i(),c=Go();function f(V,j,q,Y){var K=j._context.staticPlot,re=V.map(J.bind(0,j,q)),se=Y.selectAll("g.parcatslayer").data([null]);se.enter().append("g").attr("class","parcatslayer").style("pointer-events",K?"none":"all");var le=se.selectAll("g.trace.parcats").data(re,h),ue=le.enter().append("g").attr("class","trace parcats");le.attr("transform",function(ce){return n(ce.x,ce.y)}),ue.append("g").attr("class","paths");var fe=le.select("g.paths"),pe=fe.selectAll("path.path").data(function(ce){return ce.paths},h);pe.attr("fill",function(ce){return ce.model.color});var we=pe.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(ce){return ce.model.color}).attr("fill-opacity",0);E(we),pe.attr("d",function(ce){return ce.svgD}),we.empty()||pe.sort(p),pe.exit().remove(),pe.on("mouseover",m).on("mouseout",y).on("click",x),ue.append("g").attr("class","dimensions");var xe=le.select("g.dimensions"),he=xe.selectAll("g.dimension").data(function(ce){return ce.dimensions},h);he.enter().append("g").attr("class","dimension"),he.attr("transform",function(ce){return n(ce.x,0)}),he.exit().remove();var oe=he.selectAll("g.category").data(function(ce){return ce.categories},h),te=oe.enter().append("g").attr("class","category");oe.attr("transform",function(ce){return n(0,ce.y)}),te.append("rect").attr("class","catrect").attr("pointer-events","none"),oe.select("rect.catrect").attr("fill","none").attr("width",function(ce){return ce.width}).attr("height",function(ce){return ce.height}),w(te);var ie=oe.selectAll("rect.bandrect").data(function(ce){return ce.bands},h);ie.each(function(){l.raiseToTop(this)}),ie.attr("fill",function(ce){return ce.color});var ee=ie.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(ce){return ce.color}).attr("fill-opacity",0);ie.attr("fill",function(ce){return ce.color}).attr("width",function(ce){return ce.width}).attr("height",function(ce){return ce.height}).attr("y",function(ce){return ce.y}).attr("cursor",function(ce){return ce.parcatsViewModel.arrangement==="fixed"?"default":ce.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),T(ee),ie.exit().remove(),te.append("text").attr("class","catlabel").attr("pointer-events","none"),oe.select("text.catlabel").attr("text-anchor",function(ce){return d(ce)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(ce){return d(ce)?ce.width+5:-5}).attr("y",function(ce){return ce.height/2}).text(function(ce){return ce.model.categoryLabel}).each(function(ce){u.font(t.select(this),ce.parcatsViewModel.categorylabelfont),c.convertToTspans(t.select(this),j)}),te.append("text").attr("class","dimlabel"),oe.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(ce){return ce.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(ce){return ce.width/2}).attr("y",-5).text(function(ce,_e){return _e===0?ce.parcatsViewModel.model.dimensions[ce.model.dimensionInd].dimensionLabel:null}).each(function(ce){u.font(t.select(this),ce.parcatsViewModel.labelfont)}),oe.selectAll("rect.bandrect").on("mouseover",I).on("mouseout",L),oe.exit().remove(),he.call(t.behavior.drag().origin(function(ce){return{x:ce.x,y:0}}).on("dragstart",B).on("drag",O).on("dragend",G)),le.each(function(ce){ce.traceSelection=t.select(this),ce.pathSelection=t.select(this).selectAll("g.paths").selectAll("path.path"),ce.dimensionSelection=t.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),le.exit().remove()}r.exports=function(V,j,q,Y){f(q,V,Y,j)};function h(V){return V.key}function d(V){var j=V.parcatsViewModel.dimensions.length,q=V.parcatsViewModel.dimensions[j-1].model.dimensionInd;return V.model.dimensionInd===q}function p(V,j){return V.model.rawColor>j.model.rawColor?1:V.model.rawColorK)return 1;if(Y!==K){var re=isNaN(Y),se=isNaN(K);if(re!==se)return re?1:-1}}return V.length-j.length}function m(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){l.raiseToTop(this),M(t.select(this));var j=_(V),q=v(V);if(V.parcatsViewModel.graphDiv.emit("plotly_hover",{points:j,event:t.event,constraints:q}),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var Y=t.mouse(this)[0],K=V.parcatsViewModel.graphDiv,re=V.parcatsViewModel.trace,se=K._fullLayout,le=se._paperdiv.node().getBoundingClientRect(),ue=V.parcatsViewModel.graphDiv.getBoundingClientRect(),fe,pe,we;for(we=0;we"),Ue=t.mouse(K)[0];s.loneHover({trace:re,x:oe-le.left+ue.left,y:te-le.top+ue.top,text:Me,color:V.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ie,idealAlign:Ueo.mostReadable(j.model.color)).attr("stroke-width",.3)}function C(V){V.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function w(V){V.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function k(V){V.attr("stroke","black").attr("stroke-width",1.5)}function T(V){V.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function b(V){var j=V.parcatsViewModel.pathSelection,q=V.categoryViewModel.model.dimensionInd,Y=V.categoryViewModel.model.categoryInd;return j.filter(function(K){return K.model.categoryInds[q]===Y&&K.model.color===V.color})}function S(V){var j=t.select(V.parentNode).selectAll("rect.bandrect");j.each(function(q){var Y=b(q);M(Y),Y.each(function(){l.raiseToTop(this)})}),C(t.select(V.parentNode))}function A(V){var j=t.select(V).datum(),q=b(j);M(q),q.each(function(){l.raiseToTop(this)}),t.select(V.parentNode).selectAll("rect.bandrect").filter(function(Y){return Y.color===j.color}).each(function(){l.raiseToTop(this),k(t.select(this))})}function F(V,j,q){var Y=t.select(V).datum(),K=Y.categoryViewModel.model,re=Y.parcatsViewModel.graphDiv,se=t.select(V.parentNode).selectAll("rect.bandrect"),le=[];se.each(function(fe){var pe=b(fe);pe.each(function(we){Array.prototype.push.apply(le,_(we))})});var ue={};ue[K.dimensionInd]=K.categoryValue,re.emit(j,{points:le,event:q,constraints:ue})}function D(V,j,q){var Y=t.select(V).datum(),K=Y.categoryViewModel.model,re=Y.parcatsViewModel.graphDiv,se=b(Y),le=[];se.each(function(fe){Array.prototype.push.apply(le,_(fe))});var ue={};ue[K.dimensionInd]=K.categoryValue,Y.rawColor!==void 0&&(ue.color=Y.rawColor),re.emit(j,{points:le,event:q,constraints:ue})}function R(V,j,q){V._fullLayout._calcInverseTransform(V);var Y=V._fullLayout._invScaleX,K=V._fullLayout._invScaleY,re=t.select(q.parentNode).select("rect.catrect"),se=re.node().getBoundingClientRect(),le=re.datum(),ue=le.parcatsViewModel,fe=ue.model.dimensions[le.model.dimensionInd],pe=ue.trace,we=se.top+se.height/2,xe,he;ue.dimensions.length>1&&fe.displayInd===ue.dimensions.length-1?(xe=se.left,he="left"):(xe=se.left+se.width,he="right");var oe=le.model.count,te=le.model.categoryLabel,ie=oe/le.parcatsViewModel.model.count,ee={countLabel:oe,categoryLabel:te,probabilityLabel:ie.toFixed(3)},ce=[];le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ce.push(["Count:",ee.countLabel].join(" ")),le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ce.push(["P("+ee.categoryLabel+"):",ee.probabilityLabel].join(" "));var _e=ce.join("
");return{trace:pe,x:Y*(xe-j.left),y:K*(we-j.top),text:_e,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:he,hovertemplate:pe.hovertemplate,hovertemplateLabels:ee,eventData:[{data:pe._input,fullData:pe,count:oe,category:te,probability:ie}]}}function P(V,j,q){var Y=[];return t.select(q.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var K=this;Y.push(R(V,j,K))}),Y}function z(V,j,q){V._fullLayout._calcInverseTransform(V);var Y=V._fullLayout._invScaleX,K=V._fullLayout._invScaleY,re=q.getBoundingClientRect(),se=t.select(q).datum(),le=se.categoryViewModel,ue=le.parcatsViewModel,fe=ue.model.dimensions[le.model.dimensionInd],pe=ue.trace,we=re.y+re.height/2,xe,he;ue.dimensions.length>1&&fe.displayInd===ue.dimensions.length-1?(xe=re.left,he="left"):(xe=re.left+re.width,he="right");var oe=le.model.categoryLabel,te=se.parcatsViewModel.model.count,ie=0;se.categoryViewModel.bands.forEach(function(dt){dt.color===se.color&&(ie+=dt.count)});var ee=le.model.count,ce=0;ue.pathSelection.each(function(dt){dt.model.color===se.color&&(ce+=dt.model.count)});var _e=ie/te,Se=ie/ce,Me=ie/ee,Ue={countLabel:ie,categoryLabel:oe,probabilityLabel:_e.toFixed(3)},Ge=[];le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ge.push(["Count:",Ue.countLabel].join(" ")),le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Ge.push("P(color \u2229 "+oe+"): "+Ue.probabilityLabel),Ge.push("P("+oe+" | color): "+Se.toFixed(3)),Ge.push("P(color | "+oe+"): "+Me.toFixed(3)));var Ze=Ge.join("
"),Ke=o.mostReadable(se.color);return{trace:pe,x:Y*(xe-j.left),y:K*(we-j.top),text:Ze,color:se.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:Ke,fontSize:10,idealAlign:he,hovertemplate:pe.hovertemplate,hovertemplateLabels:Ue,eventData:[{data:pe._input,fullData:pe,category:oe,count:te,probability:_e,categorycount:ee,colorcount:ce,bandcolorcount:ie}]}}function I(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var j=t.mouse(this)[1];if(j<-1)return;var q=V.parcatsViewModel.graphDiv,Y=q._fullLayout,K=Y._paperdiv.node().getBoundingClientRect(),re=V.parcatsViewModel.hoveron,se=this;if(re==="color"?(A(se),D(se,"plotly_hover",t.event)):(S(se),F(se,"plotly_hover",t.event)),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var le;re==="category"?le=R(q,K,se):re==="color"?le=z(q,K,se):re==="dimension"&&(le=P(q,K,se)),le&&s.loneHover(le,{container:Y._hoverlayer.node(),outerContainer:Y._paper.node(),gd:q})}}}function L(V){var j=V.parcatsViewModel;if(!j.dragDimension&&(E(j.pathSelection),w(j.dimensionSelection.selectAll("g.category")),T(j.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),s.loneUnhover(j.graphDiv._fullLayout._hoverlayer.node()),j.pathSelection.sort(p),j.hoverinfoItems.indexOf("skip")===-1)){var q=V.parcatsViewModel.hoveron,Y=this;q==="color"?D(Y,"plotly_unhover",t.event):F(Y,"plotly_unhover",t.event)}}function B(V){V.parcatsViewModel.arrangement!=="fixed"&&(V.dragDimensionDisplayInd=V.model.displayInd,V.initialDragDimensionDisplayInds=V.parcatsViewModel.model.dimensions.map(function(j){return j.displayInd}),V.dragHasMoved=!1,V.dragCategoryDisplayInd=null,t.select(this).selectAll("g.category").select("rect.catrect").each(function(j){var q=t.mouse(this)[0],Y=t.mouse(this)[1];-2<=q&&q<=j.width+2&&-2<=Y&&Y<=j.height+2&&(V.dragCategoryDisplayInd=j.model.displayInd,V.initialDragCategoryDisplayInds=V.model.categories.map(function(K){return K.displayInd}),j.model.dragY=j.y,l.raiseToTop(this.parentNode),t.select(this.parentNode).selectAll("rect.bandrect").each(function(K){K.ype.y+pe.height/2&&(re.model.displayInd=pe.model.displayInd,pe.model.displayInd=le),V.dragCategoryDisplayInd=re.model.displayInd}if(V.dragCategoryDisplayInd===null||V.parcatsViewModel.arrangement==="freeform"){K.model.dragX=t.event.x;var we=V.parcatsViewModel.dimensions[q],xe=V.parcatsViewModel.dimensions[Y];we!==void 0&&K.model.dragXxe.x&&(K.model.displayInd=xe.model.displayInd,xe.model.displayInd=V.dragDimensionDisplayInd),V.dragDimensionDisplayInd=K.model.displayInd}W(V.parcatsViewModel),H(V.parcatsViewModel),Z(V.parcatsViewModel),X(V.parcatsViewModel)}}function G(V){if(V.parcatsViewModel.arrangement!=="fixed"&&V.dragDimensionDisplayInd!==null){t.select(this).selectAll("text").attr("font-weight","normal");var j={},q=$(V.parcatsViewModel),Y=V.parcatsViewModel.model.dimensions.map(function(xe){return xe.displayInd}),K=V.initialDragDimensionDisplayInds.some(function(xe,he){return xe!==Y[he]});K&&Y.forEach(function(xe,he){var oe=V.parcatsViewModel.model.dimensions[he].containerInd;j["dimensions["+oe+"].displayindex"]=xe});var re=!1;if(V.dragCategoryDisplayInd!==null){var se=V.model.categories.map(function(xe){return xe.displayInd});if(re=V.initialDragCategoryDisplayInds.some(function(xe,he){return xe!==se[he]}),re){var le=V.model.categories.slice().sort(function(xe,he){return xe.displayInd-he.displayInd}),ue=le.map(function(xe){return xe.categoryValue}),fe=le.map(function(xe){return xe.categoryLabel});j["dimensions["+V.model.containerInd+"].categoryarray"]=[ue],j["dimensions["+V.model.containerInd+"].ticktext"]=[fe],j["dimensions["+V.model.containerInd+"].categoryorder"]="array"}}if(V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!V.dragHasMoved&&V.potentialClickBand&&(V.parcatsViewModel.hoveron==="color"?D(V.potentialClickBand,"plotly_click",t.event.sourceEvent):F(V.potentialClickBand,"plotly_click",t.event.sourceEvent)),V.model.dragX=null,V.dragCategoryDisplayInd!==null){var pe=V.parcatsViewModel.dimensions[V.dragDimensionDisplayInd].categories[V.dragCategoryDisplayInd];pe.model.dragY=null,V.dragCategoryDisplayInd=null}V.dragDimensionDisplayInd=null,V.parcatsViewModel.dragDimension=null,V.dragHasMoved=null,V.potentialClickBand=null,W(V.parcatsViewModel),H(V.parcatsViewModel);var we=t.transition().duration(300).ease("cubic-in-out");we.each(function(){Z(V.parcatsViewModel,!0),X(V.parcatsViewModel,!0)}).each("end",function(){(K||re)&&i.restyle(V.parcatsViewModel.graphDiv,j,[q])})}}function $(V){for(var j,q=V.graphDiv._fullData,Y=0;Y=0;ue--)fe+="C"+se[ue]+","+(j[ue+1]+Y)+" "+re[ue]+","+(j[ue]+Y)+" "+(V[ue]+q[ue])+","+(j[ue]+Y),fe+="l-"+q[ue]+",0 ";return fe+="Z",fe}function H(V){var j=V.dimensions,q=V.model,Y=j.map(function(pt){return pt.categories.map(function(Tt){return Tt.y})}),K=V.model.dimensions.map(function(pt){return pt.categories.map(function(Tt){return Tt.displayInd})}),re=V.model.dimensions.map(function(pt){return pt.displayInd}),se=V.dimensions.map(function(pt){return pt.model.dimensionInd}),le=j.map(function(pt){return pt.x}),ue=j.map(function(pt){return pt.width}),fe=[];for(var pe in q.paths)q.paths.hasOwnProperty(pe)&&fe.push(q.paths[pe]);function we(pt){var Tt=pt.categoryInds.map(function(Ve,Ye){return K[Ye][Ve]}),st=se.map(function(Ve){return Tt[Ve]});return st}fe.sort(function(pt,Tt){var st=we(pt),Ve=we(Tt);return V.sortpaths==="backward"&&(st.reverse(),Ve.reverse()),st.push(pt.valueInds[0]),Ve.push(Tt.valueInds[0]),V.bundlecolors&&(st.unshift(pt.rawColor),Ve.unshift(Tt.rawColor)),g(st,Ve)});for(var xe=new Array(fe.length),he=j[0].model.count,oe=j[0].categories.map(function(pt){return pt.height}).reduce(function(pt,Tt){return pt+Tt}),te=0;te0?ee=oe*(ie.count/he):ee=0;for(var ce=new Array(Y.length),_e=0;_e1?se=(V.width-2*q-Y)/(K-1):se=0,le=q,ue=le+se*re;var fe=[],pe=V.model.maxCats,we=j.categories.length,xe=8,he=j.count,oe=V.height-xe*(pe-1),te,ie,ee,ce,_e,Se=(pe-we)*xe/2,Me=j.categories.map(function(Ue){return{displayInd:Ue.displayInd,categoryInd:Ue.categoryInd}});for(Me.sort(function(Ue,Ge){return Ue.displayInd-Ge.displayInd}),_e=0;_e0?te=ie.count/he*oe:te=0,ee={key:ie.valueInds[0],model:ie,width:Y,height:te,y:ie.dragY!==null?ie.dragY:Se,bands:[],parcatsViewModel:V},Se=Se+te+xe,fe.push(ee);return{key:j.dimensionInd,x:j.dragX!==null?j.dragX:ue,y:0,width:Y,model:j,categories:fe,parcatsViewModel:V,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),AI=ye({"src/traces/parcats/plot.js"(e,r){"use strict";var t=Wue();r.exports=function(i,o,s,l){var n=i._fullLayout,u=n._paper,c=n._size;t(i,u,o,{width:c.w,height:c.h,margin:{t:c.t,r:c.r,b:c.b,l:c.l}},s,l)}}}),$ue=ye({"src/traces/parcats/base_plot.js"(e){"use strict";var r=_c().getModuleCalcData,t=AI(),a="parcats";e.name=a,e.plot=function(i,o,s,l){var n=r(i.calcdata,a);if(n.length){var u=n[0];t(i,u,s,l)}},e.clean=function(i,o,s,l){var n=l._has&&l._has("parcats"),u=o._has&&o._has("parcats");n&&!u&&l._paperdiv.selectAll(".parcats").remove()}}}),Yue=ye({"src/traces/parcats/index.js"(e,r){"use strict";r.exports={attributes:wI(),supplyDefaults:Gue(),calc:Hue(),plot:AI(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:$ue(),categories:["noOpacity"],meta:{}}}}),Xue=ye({"lib/parcats.js"(e,r){"use strict";r.exports=Yue()}}),Zue=ye({"src/plots/map/styles/arcgis-sat-hybrid.js"(e,r){"use strict";r.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},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"}},{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} + }`}),A={};return{regl:f,draw:u,atlas:A}},C.prototype.update=function(f){var u=this;if(typeof f=="string")f={text:f};else if(!f)return;f=b(f,{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),f.opacity!=null&&(Array.isArray(f.opacity)?this.opacity=f.opacity.map(function(le){return parseFloat(le)}):this.opacity=parseFloat(f.opacity)),f.viewport!=null&&(this.viewport=r(f.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]),f.kerning!=null&&(this.kerning=f.kerning),f.offset!=null&&(typeof f.offset=="number"&&(f.offset=[f.offset,0]),this.positionOffset=v(f.offset)),f.direction&&(this.direction=f.direction),f.range&&(this.range=f.range,this.scale=[1/(f.range[2]-f.range[0]),1/(f.range[3]-f.range[1])],this.translate=[-f.range[0],-f.range[1]]),f.scale&&(this.scale=f.scale),f.translate&&(this.translate=f.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!f.font&&(f.font=C.baseFontSize+"px sans-serif");var A=!1,x=!1;if(f.font&&(Array.isArray(f.font)?f.font:[f.font]).forEach(function(le,Ae){if(typeof le=="string")try{le=p.parse(le)}catch{le=p.parse(C.baseFontSize+"px "+le)}else{var Be=le.style,Xe=le.weight,Ye=le.stretch,yt=le.variant;le=p.parse(p.stringify(le)),Be&&(le.style=Be),Xe&&(le.weight=Xe),Ye&&(le.stretch=Ye),yt&&(le.variant=yt)}var gt=p.stringify({size:C.baseFontSize,family:le.family,stretch:S?le.stretch:void 0,variant:le.variant,weight:le.weight,style:le.style}),Tt=o(le.size),At=Math.round(Tt[0]*s(Tt[1]));if(At!==u.fontSize[Ae]&&(x=!0,u.fontSize[Ae]=At),(!u.font[Ae]||gt!=u.font[Ae].baseString)&&(A=!0,u.font[Ae]=C.fonts[gt],!u.font[Ae])){var $t=le.family.join(", "),rr=[le.style];le.style!=le.variant&&rr.push(le.variant),le.variant!=le.weight&&rr.push(le.weight),S&&le.weight!=le.stretch&&rr.push(le.stretch),u.font[Ae]={baseString:gt,family:$t,weight:le.weight,stretch:le.stretch,style:le.style,variant:le.variant,width:{},kerning:{},metrics:h($t,{origin:"top",fontSize:C.baseFontSize,fontStyle:rr.join(" ")})},C.fonts[gt]=u.font[Ae]}}),(A||x)&&this.font.forEach(function(le,Ae){var Be=p.stringify({size:u.fontSize[Ae],family:le.family,stretch:S?le.stretch:void 0,variant:le.variant,weight:le.weight,style:le.style});if(u.fontAtlas[Ae]=u.shader.atlas[Be],!u.fontAtlas[Ae]){var Xe=le.metrics;u.shader.atlas[Be]=u.fontAtlas[Ae]={fontString:Be,step:Math.ceil(u.fontSize[Ae]*Xe.bottom*.5)*2,em:u.fontSize[Ae],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}f.text==null&&(f.text=u.text)}),typeof f.text=="string"&&f.position&&f.position.length>2){for(var z=Array(f.position.length*.5),I=0;I2){for(var B=!f.position[0].length,F=n.mallocFloat(this.count*2),P=0,j=0;P1?u.align[Ae]:u.align[0]:u.align;if(typeof Be=="number")return Be;switch(Be){case"right":case"end":return-le;case"center":case"centre":case"middle":return-le*.5}return 0})),this.baseline==null&&f.baseline==null&&(f.baseline=0),f.baseline!=null&&(this.baseline=f.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(le,Ae){var Be=(u.font[Ae]||u.font[0]).metrics,Xe=0;return Xe+=Be.bottom*.5,typeof le=="number"?Xe+=le-Be.baseline:Xe+=-Be[le],Xe*=-1,Xe})),f.color!=null)if(f.color||(f.color="transparent"),typeof f.color=="string"||!isNaN(f.color))this.color=e(f.color,"uint8");else{var Me;if(typeof f.color[0]=="number"&&f.color.length>this.counts.length){var Se=f.color.length;Me=n.mallocUint8(Se);for(var Ie=(f.color.subarray||f.color.slice).bind(f.color),Ve=0;Ve4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(_e){var ce=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(ce);for(var ve=0;ve1?this.counts[ve]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ve]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ve*4,ve*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ve]:this.opacity,baseline:this.baselineOffset[ve]!=null?this.baselineOffset[ve]:this.baselineOffset[0],align:this.align?this.alignOffset[ve]!=null?this.alignOffset[ve]:this.alignOffset[0]:0,atlas:this.fontAtlas[ve]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ve*2,ve*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=[]}},C.prototype.destroy=function(){},C.prototype.kerning=!0,C.prototype.position={constant:new Float32Array(2)},C.prototype.translate=null,C.prototype.scale=null,C.prototype.font=null,C.prototype.text="",C.prototype.positionOffset=[0,0],C.prototype.opacity=1,C.prototype.color=new Uint8Array([0,0,0,255]),C.prototype.alignOffset=[0,0],C.maxAtlasSize=1024,C.atlasCanvas=document.createElement("canvas"),C.atlasContext=C.atlasCanvas.getContext("2d",{alpha:!1}),C.baseFontSize=64,C.fonts={};function _(T){return typeof T=="function"&&T._gl&&T.prop&&T.texture&&T.buffer}V.exports=C}}),j2=ze({"src/lib/prepare_regl.js"(J,V){"use strict";var p=gA(),b=pM();V.exports=function(k,l,e){var t=k._fullLayout,n=!0;return t._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(e);return}if(!(r.pick&&!t._has("parcoords"))){try{r.regl=b({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:k._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:e||{}})}catch{n=!1}r.regl||(n=!1),n&&this.addEventListener("webglcontextlost",function(a){k&&k.emit&&k.emit("plotly_webglcontextlost",{event:a,layer:r.key})},!1)}}),n||p({container:t._glcontainer.node()}),n}}}),gM=ze({"src/traces/scattergl/plot.js"(c,V){"use strict";var p=YA(),b=oM(),E=tq(),k=mq(),l=Nr(),e=Fd().selectMode,t=j2(),n=el(),r=S5(),a=GA().styleTextSelection,o={};function s(m,h,v,g){var i=m._size,w=m.width*g,S=m.height*g,M=i.l*g,C=i.b*g,_=i.r*g,T=i.t*g,f=i.w*g,u=i.h*g;return[M+h.domain[0]*f,C+v.domain[0]*u,w-_-(1-h.domain[1])*f,S-T-(1-v.domain[1])*u]}var c=V.exports=function(h,v,g){if(g.length){var i=h._fullLayout,w=v._scene,S=v.xaxis,M=v.yaxis,C,_;if(w){var T=t(h,["ANGLE_instanced_arrays","OES_element_index_uint"],o);if(!T){w.init();return}var f=w.count,u=i._glcanvas.data()[0].regl;if(r(h,v,g),w.dirty){if((w.line2d||w.error2d)&&!(w.scatter2d||w.fill2d||w.glText)&&u.clear({color:!0,depth:!0}),w.error2d===!0&&(w.error2d=E(u)),w.line2d===!0&&(w.line2d=b(u)),w.scatter2d===!0&&(w.scatter2d=p(u)),w.fill2d===!0&&(w.fill2d=b(u)),w.glText===!0)for(w.glText=new Array(f),C=0;Cw.glText.length){var A=f-w.glText.length;for(C=0;Cee&&(isNaN(Z[ae])||isNaN(Z[ae+1]));)ae-=2;q.positions=Z.slice(ee,ae+2)}return q}),w.line2d.update(w.lineOptions)),w.error2d){var I=(w.errorXOptions||[]).concat(w.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});w.error2d.update(I)}w.scatter2d&&w.scatter2d.update(w.markerOptions),w.fillOrder=l.repeat(null,f),w.fill2d&&(w.fillOptions=w.fillOptions.map(function(q,Z){var ee=g[Z];if(!(!q||!ee||!ee[0]||!ee[0].trace)){var ae=ee[0],he=ae.trace,xe=ae.t,we=w.lineOptions[Z],Me,Se,Ie=[];he._ownfill&&Ie.push(Z),he._nexttrace&&Ie.push(Z+1),Ie.length&&(w.fillOrder[Z]=Ie);var Ve=[],Ge=we&&we.positions||xe.positions,ke,_e;if(he.fill==="tozeroy"){for(ke=0;keke&&isNaN(Ge[_e+1]);)_e-=2;Ge[ke+1]!==0&&(Ve=[Ge[ke],0]),Ve=Ve.concat(Ge.slice(ke,_e+2)),Ge[_e+1]!==0&&(Ve=Ve.concat([Ge[_e],0]))}else if(he.fill==="tozerox"){for(ke=0;keke&&isNaN(Ge[_e]);)_e-=2;Ge[ke]!==0&&(Ve=[0,Ge[ke+1]]),Ve=Ve.concat(Ge.slice(ke,_e+2)),Ge[_e]!==0&&(Ve=Ve.concat([0,Ge[_e+1]]))}else if(he.fill==="toself"||he.fill==="tonext"){for(Ve=[],Me=0,q.splitNull=!0,Se=0;Se-1;for(let[q]of g)if(q){var F=q.trace,P=q.t,j=P.index,U=F._length,$=P.x,Q=P.y;if(F.selectedpoints||D||B){if(D||(D=!0),F.selectedpoints){var re=w.selectBatch[j]=F.selectedpoints,ne={};for(_=0;_S&&v||wa,x;for(A?x=v.sizeAvg||Math.max(v.size,3):x=E(c,h),M=0;M{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,k(()=>{this.dirty=!1})),this)},n.prototype.update=function(...s){if(!s.length)return;for(let h=0;hx||!v.lower&&A{c[g+w]=h})}this.scatter.draw(...c)}return this},n.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 r(s,c,m){let h=s.id!=null?s.id:s,v=c,g=m;return h<<16|(v&255)<<8|g&255}function a(s,c,m){let h,v,g,i,w,S,M,C,_=s[c],T=s[m];return _.length>2?(h=_[0],g=_[2],v=_[1],i=_[3]):_.length?(h=v=_[0],g=i=_[1]):(h=_.x,v=_.y,g=_.x+_.width,i=_.y+_.height),T.length>2?(w=T[0],M=T[2],S=T[1],C=T[3]):T.length?(w=S=T[0],M=C=T[1]):(w=T.x,S=T.y,M=T.x+T.width,C=T.y+T.height),[w,v,M,i]}function o(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=e(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),Sq=ze({"src/traces/splom/plot.js"(J,V){"use strict";var p=Mq(),b=Nr(),E=Xl(),k=Fd().selectMode;V.exports=function(t,n,r){if(r.length)for(var a=0;a-1,B=k(v)||!!a.selectedpoints||D,F=!0;if(B){var P=a._length;if(a.selectedpoints){s.selectBatch=a.selectedpoints;var j=a.selectedpoints,U={};for(w=0;w=$[Q][0]&&U<=$[Q][1])return!0;return!1}function c(U){U.attr("x",-p.bar.captureWidth/2).attr("width",p.bar.captureWidth)}function m(U){U.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function h(U){if(!U.brush.filterSpecified)return"0,"+U.height;for(var $=v(U.brush.filter.getConsolidated(),U.height),Q=[0],re,ne,se,G=$.length?$[0][0]:null,X=0;X<$.length;X++)re=$[X],ne=re[1]-re[0],Q.push(G),Q.push(ne),se=X+1,se<$.length&&(G=$[se][0]-re[1]);return Q.push(U.height),Q}function v(U,$){return U.map(function(Q){return Q.map(function(re){return Math.max(0,re*$)}).sort(l)})}function g(U,$){var Q=p.bar.handleHeight;if(!($>U[1]+Q||$=.9*U[1]+.1*U[0]?"n":$<=.9*U[0]+.1*U[1]?"s":"ns"}function i(){b.select(document.body).style("cursor",null)}function w(U){U.attr("stroke-dasharray",h)}function S(U,$){var Q=b.select(U).selectAll(".highlight, .highlight-shadow"),re=$?Q.transition().duration(p.bar.snapDuration).each("end",$):Q;w(re)}function M(U,$){var Q=U.brush,re=Q.filterSpecified,ne=NaN,se={},G;if(re){var X=U.height,K=Q.filter.getConsolidated(),H=v(K,X),Y=NaN,q=NaN,Z=NaN;for(G=0;G<=H.length;G++){var ee=H[G];if(ee&&ee[0]<=$&&$<=ee[1]){Y=G;break}else if(q=G?G-1:NaN,ee&&ee[0]>$){Z=G;break}}if(ne=Y,isNaN(ne)&&(isNaN(q)||isNaN(Z)?ne=isNaN(q)?Z:q:ne=$-H[q][1]=Me[0]&&we<=Me[1]){se.clickableOrdinalRange=Me;break}}}return se}function C(U,$){b.event.sourceEvent.stopPropagation();var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=$.unitToPaddedPx.invert(Q),ne=$.brush,se=M($,Q),G=se.interval,X=ne.svgBrush;if(X.wasDragged=!1,X.grabbingBar=se.region==="ns",X.grabbingBar){var K=G.map($.unitToPaddedPx);X.grabPoint=Q-K[0]-p.verticalPadding,X.barLength=K[1]-K[0]}X.clickableOrdinalRange=se.clickableOrdinalRange,X.stayingIntervals=$.multiselect&&ne.filterSpecified?ne.filter.getConsolidated():[],G&&(X.stayingIntervals=X.stayingIntervals.filter(function(H){return H[0]!==G[0]&&H[1]!==G[1]})),X.startExtent=se.region?G[se.region==="s"?1:0]:re,$.parent.inBrushDrag=!0,X.brushStartCallback()}function _(U,$){b.event.sourceEvent.stopPropagation();var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=$.brush.svgBrush;re.wasDragged=!0,re._dragging=!0,re.grabbingBar?re.newExtent=[Q-re.grabPoint,Q+re.barLength-re.grabPoint].map($.unitToPaddedPx.invert):re.newExtent=[re.startExtent,$.unitToPaddedPx.invert(Q)].sort(l),$.brush.filterSpecified=!0,re.extent=re.stayingIntervals.concat([re.newExtent]),re.brushCallback($),S(U.parentNode)}function T(U,$){var Q=$.brush,re=Q.filter,ne=Q.svgBrush;ne._dragging||(f(U,$),_(U,$),$.brush.svgBrush.wasDragged=!1),ne._dragging=!1;var se=b.event;se.sourceEvent.stopPropagation();var G=ne.grabbingBar;if(ne.grabbingBar=!1,ne.grabLocation=void 0,$.parent.inBrushDrag=!1,i(),!ne.wasDragged){ne.wasDragged=void 0,ne.clickableOrdinalRange?Q.filterSpecified&&$.multiselect?ne.extent.push(ne.clickableOrdinalRange):(ne.extent=[ne.clickableOrdinalRange],Q.filterSpecified=!0):G?(ne.extent=ne.stayingIntervals,ne.extent.length===0&&O(Q)):O(Q),ne.brushCallback($),S(U.parentNode),ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[]);return}var X=function(){re.set(re.getConsolidated())};if($.ordinal){var K=$.unitTickvals;K[K.length-1]ne.newExtent[0];ne.extent=ne.stayingIntervals.concat(H?[ne.newExtent]:[]),ne.extent.length||O(Q),ne.brushCallback($),H?S(U.parentNode,X):(X(),S(U.parentNode))}else X();ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[])}function f(U,$){var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=M($,Q),ne="crosshair";re.clickableOrdinalRange?ne="pointer":re.region&&(ne=re.region+"-resize"),b.select(document.body).style("cursor",ne)}function u(U){U.on("mousemove",function($){b.event.preventDefault(),$.parent.inBrushDrag||f(this,$)}).on("mouseleave",function($){$.parent.inBrushDrag||i()}).call(b.behavior.drag().on("dragstart",function($){C(this,$)}).on("drag",function($){_(this,$)}).on("dragend",function($){T(this,$)}))}function A(U,$){return U[0]-$[0]}function x(U,$,Q){var re=Q._context.staticPlot,ne=U.selectAll(".background").data(k);ne.enter().append("rect").classed("background",!0).call(c).call(m).style("pointer-events",re?"none":"auto").attr("transform",e(0,p.verticalPadding)),ne.call(u).attr("height",function(X){return X.height-p.verticalPadding});var se=U.selectAll(".highlight-shadow").data(k);se.enter().append("line").classed("highlight-shadow",!0).attr("x",-p.bar.width/2).attr("stroke-width",p.bar.width+p.bar.strokeWidth).attr("stroke",$).attr("opacity",p.bar.strokeOpacity).attr("stroke-linecap","butt"),se.attr("y1",function(X){return X.height}).call(w);var G=U.selectAll(".highlight").data(k);G.enter().append("line").classed("highlight",!0).attr("x",-p.bar.width/2).attr("stroke-width",p.bar.width-p.bar.strokeWidth).attr("stroke",p.bar.fillColor).attr("opacity",p.bar.fillOpacity).attr("stroke-linecap","butt"),G.attr("y1",function(X){return X.height}).call(w)}function z(U,$,Q){var re=U.selectAll("."+p.cn.axisBrush).data(k,E);re.enter().append("g").classed(p.cn.axisBrush,!0),x(re,$,Q)}function I(U){return U.svgBrush.extent.map(function($){return $.slice()})}function O(U){U.filterSpecified=!1,U.svgBrush.extent=[[-1/0,1/0]]}function D(U){return function(Q){var re=Q.brush,ne=I(re),se=ne.slice();re.filter.set(se),U()}}function B(U){for(var $=U.slice(),Q=[],re,ne=$.shift();ne;){for(re=ne.slice();(ne=$.shift())&&ne[0]<=re[1];)re[1]=Math.max(re[1],ne[1]);Q.push(re)}return Q.length===1&&Q[0][0]>Q[0][1]&&(Q=[]),Q}function F(){var U=[],$,Q;return{set:function(re){U=re.map(function(ne){return ne.slice().sort(l)}).sort(A),U.length===1&&U[0][0]===-1/0&&U[0][1]===1/0&&(U=[[0,-1]]),$=B(U),Q=U.reduce(function(ne,se){return[Math.min(ne[0],se[0]),Math.max(ne[1],se[1])]},[1/0,-1/0])},get:function(){return U.slice()},getConsolidated:function(){return $},getBounds:function(){return Q}}}function P(U,$,Q,re,ne,se){var G=F();return G.set(Q),{filter:G,filterSpecified:$,svgBrush:{extent:[],brushStartCallback:re,brushCallback:D(ne),brushEndCallback:se}}}function j(U,$){if(Array.isArray(U[0])?(U=U.map(function(re){return re.sort(l)}),$.multiselect?U=B(U.sort(A)):U=[U[0]]):U=[U.sort(l)],$.tickvals){var Q=$.tickvals.slice().sort(l);if(U=U.map(function(re){var ne=[o(0,Q,re[0],[]),o(1,Q,re[1],[])];if(ne[1]>ne[0])return ne}).filter(function(re){return re}),!U.length)return}return U.length>1?U:U[0]}V.exports={makeBrush:P,ensureAxisBrush:z,cleanRanges:j}}}),Dq=ze({"src/traces/parcoords/defaults.js"(J,V){"use strict";var p=Nr(),b=Bf().hasColorscale,E=qc(),k=Ml().defaults,l=Jf(),e=Gi(),t=xM(),n=bM(),r=sy().maxDimensionCount,a=U2();function o(c,m,h,v,g){var i=g("line.color",h);if(b(c,"line")&&p.isArrayOrTypedArray(i)){if(i.length)return g("line.colorscale"),E(c,m,v,g,{prefix:"line.",cLetter:"c"}),i.length;m.line.color=h}return 1/0}function s(c,m,h,v){function g(C,_){return p.coerce(c,m,t.dimensions,C,_)}var i=g("values"),w=g("visible");if(i&&i.length||(w=m.visible=!1),w){g("label"),g("tickvals"),g("ticktext"),g("tickformat");var S=g("range");m._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:S},e.setConvert(m._ax,v.layout),g("multiselect");var M=g("constraintrange");M&&(m.constraintrange=n.cleanRanges(M,m))}}V.exports=function(m,h,v,g){function i(_,T){return p.coerce(m,h,t,_,T)}var w=m.dimensions;Array.isArray(w)&&w.length>r&&(p.log("parcoords traces support up to "+r+" dimensions at the moment"),w.splice(r));var S=l(m,h,{name:"dimensions",layout:g,handleItemDefaults:s}),M=o(m,h,v,g,i);k(h,g,i),(!Array.isArray(S)||!S.length)&&(h.visible=!1),a(h,S,"values",M);var C=p.extendFlat({},g.font,{size:Math.round(g.font.size/1.2)});p.coerceFont(i,"labelfont",C),p.coerceFont(i,"tickfont",C,{autoShadowDflt:!0}),p.coerceFont(i,"rangefont",C),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}}}),Fq=ze({"src/traces/parcoords/calc.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray,b=fl(),E=Vd().wrap;V.exports=function(e,t){var n,r;return b.hasColorscale(t,"line")&&p(t.line.color)?(n=t.line.color,r=b.extractOpts(t.line).colorscale,b.calc(e,t,{vals:n,containerStr:"line",cLetter:"c"})):(n=k(t._length),r=[[0,t.line.color],[1,t.line.color]]),E({lineColor:n,cscale:r})};function k(l){for(var e=new Array(l),t=0;t 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(` +`),b=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),E=sy().maxDimensionCount,k=Nr(),l=1e-6,e=2048,t=new Uint8Array(4),n=new Uint8Array(4),r={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function a(T){T.read({x:0,y:0,width:1,height:1,data:t})}function o(T,f,u,A,x){var z=T._gl;z.enable(z.SCISSOR_TEST),z.scissor(f,u,A,x),T.clear({color:[0,0,0,0],depth:1})}function s(T,f,u,A,x,z){var I=z.key;function O(D){var B=Math.min(A,x-D*A);D===0&&(window.cancelAnimationFrame(u.currentRafs[I]),delete u.currentRafs[I],o(T,z.scissorX,z.scissorY,z.scissorWidth,z.viewBoxSize[1])),!u.clearOnly&&(z.count=2*B,z.offset=2*D*A,f(z),D*A+B>>8*f)%256/255}function v(T,f,u){for(var A=new Array(T*(E+4)),x=0,z=0;zSe&&(Se=q[he].dim1.canvasX,we=he);ae===0&&o(x,0,0,B.canvasWidth,B.canvasHeight);var Ie=G(u);for(he=0;hehe._length&&(_e=_e.slice(0,he._length));var ce=he.tickvals,ve;function le(yt,gt){return{val:yt,text:ve[gt]}}function Ae(yt,gt){return yt.val-gt.val}if(E(ce)&&ce.length){b.isTypedArray(ce)&&(ce=Array.from(ce)),ve=he.ticktext,!E(ve)||!ve.length?ve=ce.map(k(he.tickformat)):ve.length>ce.length?ve=ve.slice(0,ce.length):ce.length>ve.length&&(ce=ce.slice(0,ve.length));for(var Be=1;Be=gt||rr>=Tt)return;var _r=Ye.lineLayer.readPixel($t,Tt-1-rr),Xt=_r[3]!==0,or=Xt?_r[2]+256*(_r[1]+256*_r[0]):null,Ot={x:$t,y:rr,clientX:yt.clientX,clientY:yt.clientY,dataIndex:Ye.model.key,curveNumber:or};or!==we&&(Xt?X.hover(Ot):X.unhover&&X.unhover(Ot),we=or)}}),xe.style("opacity",function(Ye){return Ye.pick?0:1}),Y.style("background","rgba(255, 255, 255, 0)");var Se=Y.selectAll("."+g.cn.parcoords).data(he,c);Se.exit().remove(),Se.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Se.attr("transform",function(Ye){return n(Ye.model.translateX,Ye.model.translateY)});var Ie=Se.selectAll("."+g.cn.parcoordsControlView).data(m,c);Ie.enter().append("g").classed(g.cn.parcoordsControlView,!0),Ie.attr("transform",function(Ye){return n(Ye.model.pad.l,Ye.model.pad.t)});var Ve=Ie.selectAll("."+g.cn.yAxis).data(function(Ye){return Ye.dimensions},c);Ve.enter().append("g").classed(g.cn.yAxis,!0),Ie.each(function(Ye){j(Ve,Ye,Z)}),xe.each(function(Ye){if(Ye.viewModel){!Ye.lineLayer||X?Ye.lineLayer=w(this,Ye):Ye.lineLayer.update(Ye),(Ye.key||Ye.key===0)&&(Ye.viewModel[Ye.key]=Ye.lineLayer);var yt=!Ye.context||X;Ye.lineLayer.render(Ye.viewModel.panels,yt)}}),Ve.attr("transform",function(Ye){return n(Ye.xScale(Ye.xIndex),0)}),Ve.call(p.behavior.drag().origin(function(Ye){return Ye}).on("drag",function(Ye){var yt=Ye.parent;ae.linePickActive(!1),Ye.x=Math.max(-g.overdrag,Math.min(Ye.model.width+g.overdrag,p.event.x)),Ye.canvasX=Ye.x*Ye.model.canvasPixelRatio,Ve.sort(function(gt,Tt){return gt.x-Tt.x}).each(function(gt,Tt){gt.xIndex=Tt,gt.x=Ye===gt?gt.x:gt.xScale(gt.xIndex),gt.canvasX=gt.x*gt.model.canvasPixelRatio}),j(Ve,yt,Z),Ve.filter(function(gt){return Math.abs(Ye.xIndex-gt.xIndex)!==0}).attr("transform",function(gt){return n(gt.xScale(gt.xIndex),0)}),p.select(this).attr("transform",n(Ye.x,0)),Ve.each(function(gt,Tt,At){At===Ye.parent.key&&(yt.dimensions[Tt]=gt)}),yt.contextLayer&&yt.contextLayer.render(yt.panels,!1,!I(yt)),yt.focusLayer.render&&yt.focusLayer.render(yt.panels)}).on("dragend",function(Ye){var yt=Ye.parent;Ye.x=Ye.xScale(Ye.xIndex),Ye.canvasX=Ye.x*Ye.model.canvasPixelRatio,j(Ve,yt,Z),p.select(this).attr("transform",function(gt){return n(gt.x,0)}),yt.contextLayer&&yt.contextLayer.render(yt.panels,!1,!I(yt)),yt.focusLayer&&yt.focusLayer.render(yt.panels),yt.pickLayer&&yt.pickLayer.render(yt.panels,!0),ae.linePickActive(!0),X&&X.axesMoved&&X.axesMoved(yt.key,yt.dimensions.map(function(gt){return gt.crossfilterDimensionIndex}))})),Ve.exit().remove();var Ge=Ve.selectAll("."+g.cn.axisOverlays).data(m,c);Ge.enter().append("g").classed(g.cn.axisOverlays,!0),Ge.selectAll("."+g.cn.axis).remove();var ke=Ge.selectAll("."+g.cn.axis).data(m,c);ke.enter().append("g").classed(g.cn.axis,!0),ke.each(function(Ye){var yt=Ye.model.height/Ye.model.tickDistance,gt=Ye.domainScale,Tt=gt.domain();p.select(this).call(p.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(yt,Ye.tickFormat).tickValues(Ye.ordinal?Tt:null).tickFormat(function(At){return v.isOrdinal(Ye)?At:$(Ye.model.dimensions[Ye.visibleIndex],At)}).scale(gt)),a.font(ke.selectAll("text"),Ye.model.tickFont)}),ke.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ke.selectAll("text").style("cursor","default");var _e=Ge.selectAll("."+g.cn.axisHeading).data(m,c);_e.enter().append("g").classed(g.cn.axisHeading,!0);var ce=_e.selectAll("."+g.cn.axisTitle).data(m,c);ce.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",K?"none":"auto"),ce.text(function(Ye){return Ye.label}).each(function(Ye){var yt=p.select(this);a.font(yt,Ye.model.labelFont),r.convertToTspans(yt,ne)}).attr("transform",function(Ye){var yt=P(Ye.model.labelAngle,Ye.model.labelSide),gt=g.axisTitleOffset;return(yt.dir>0?"":n(0,2*gt+Ye.model.height))+t(yt.degrees)+n(-gt*yt.dx,-gt*yt.dy)}).attr("text-anchor",function(Ye){var yt=P(Ye.model.labelAngle,Ye.model.labelSide),gt=Math.abs(yt.dx),Tt=Math.abs(yt.dy);return 2*gt>Tt?yt.dir*yt.dx<0?"start":"end":"middle"});var ve=Ge.selectAll("."+g.cn.axisExtent).data(m,c);ve.enter().append("g").classed(g.cn.axisExtent,!0);var le=ve.selectAll("."+g.cn.axisExtentTop).data(m,c);le.enter().append("g").classed(g.cn.axisExtentTop,!0),le.attr("transform",n(0,-g.axisExtentOffset));var Ae=le.selectAll("."+g.cn.axisExtentTopText).data(m,c);Ae.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(B),Ae.text(function(Ye){return Q(Ye,!0)}).each(function(Ye){a.font(p.select(this),Ye.model.rangeFont)});var Be=ve.selectAll("."+g.cn.axisExtentBottom).data(m,c);Be.enter().append("g").classed(g.cn.axisExtentBottom,!0),Be.attr("transform",function(Ye){return n(0,Ye.model.height+g.axisExtentOffset)});var Xe=Be.selectAll("."+g.cn.axisExtentBottomText).data(m,c);Xe.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(B),Xe.text(function(Ye){return Q(Ye,!1)}).each(function(Ye){a.font(p.select(this),Ye.model.rangeFont)}),i.ensureAxisBrush(Ge,ee,ne)}}}),TM=ze({"src/traces/parcoords/plot.js"(t,V){"use strict";var p=Bq(),b=j2(),E=wM().isVisible,k={};function l(n,r,a){var o=r.indexOf(a),s=n.indexOf(o);return s===-1&&(s+=r.length),s}function e(n,r){return function(o,s){return l(n,r,o)-l(n,r,s)}}var t=V.exports=function(r,a){var o=r._fullLayout,s=b(r,[],k);if(s){var c={},m={},h={},v=o._size;a.forEach(function(M,C){var _=M[0].trace,T=h[C]=_.index;c[C]=r.data[T].dimensions,m[C]=r.data[T].dimensions.slice()});var g=function(M,C,_){var T=m[M][C],f=_.map(function(O){return O.slice()}),u="dimensions["+C+"].constraintrange",A=o._tracePreGUI[r._fullData[h[M]].uid];if(A[u]===void 0){var x=T.constraintrange;A[u]=x||null}var z=r._fullData[h[M]].dimensions[C];f.length?(f.length===1&&(f=f[0]),T.constraintrange=f,z.constraintrange=f.slice(),f=[f]):(delete T.constraintrange,delete z.constraintrange,f=null);var I={};I[u]=f,r.emit("plotly_restyle",[I,[h[M]]])},i=function(M){r.emit("plotly_hover",M)},w=function(M){r.emit("plotly_unhover",M)},S=function(M,C){var _=e(C,m[M].filter(E));c[M].sort(_),m[M].filter(function(T){return!E(T)}).sort(function(T){return m[M].indexOf(T)}).forEach(function(T){c[M].splice(c[M].indexOf(T),1),c[M].splice(m[M].indexOf(T),0,T)}),r.emit("plotly_restyle",[{dimensions:[c[M]]},[h[M]]])};p(r,a,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:g,hover:i,unhover:w,axesMoved:S})}};t.reglPrecompiled=k}}),Oq=ze({"src/traces/parcoords/base_plot.js"(J){"use strict";var V=ci(),p=zf().getModuleCalcData,b=TM(),E=nd();J.name="parcoords",J.plot=function(k){var l=p(k.calcdata,"parcoords")[0];l.length&&b(k,l)},J.clean=function(k,l,e,t){var n=t._has&&t._has("parcoords"),r=l._has&&l._has("parcoords");n&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},J.toSVG=function(k){var l=k._fullLayout._glimages,e=V.select(k).selectAll(".svg-container"),t=e.filter(function(r,a){return a===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var r=this,a=r.toDataURL("image/png"),o=l.append("svg:image");o.attr({xmlns:E.svg,"xlink:href":a,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})}t.each(n),window.setTimeout(function(){V.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Nq=ze({"src/traces/parcoords/base_index.js"(J,V){"use strict";V.exports={attributes:xM(),supplyDefaults:Dq(),calc:Fq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:Oq(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),jq=ze({"src/traces/parcoords/index.js"(J,V){"use strict";var p=Nq();p.plot=TM(),V.exports=p}}),Uq=ze({"lib/parcoords.js"(J,V){"use strict";V.exports=jq()}}),AM=ze({"src/traces/parcats/attributes.js"(J,V){"use strict";var p=Ki().extendFlat,b=ws(),E=Qs(),k=qs(),{hovertemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=Ml().attributes,n=p({editType:"calc"},k("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});V.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:p({},b.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({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:E({editType:"calc"}),tickfont:E({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:n,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}}}),qq=ze({"src/traces/parcats/defaults.js"(J,V){"use strict";var p=Nr(),b=Bf().hasColorscale,E=qc(),k=Ml().defaults,l=Jf(),e=AM(),t=U2(),n=Ff().isTypedArraySpec;function r(o,s,c,m,h){h("line.shape"),h("line.hovertemplate"),h("line.hovertemplatefallback");var v=h("line.color",m.colorway[0]);if(b(o,"line")&&p.isArrayOrTypedArray(v)){if(v.length)return h("line.colorscale"),E(o,s,m,h,{prefix:"line.",cLetter:"c"}),v.length;s.line.color=c}return 1/0}function a(o,s){function c(S,M){return p.coerce(o,s,e.dimensions,S,M)}var m=c("values"),h=c("visible");if(m&&m.length||(h=s.visible=!1),h){c("label"),c("displayindex",s._index);var v=o.categoryarray,g=p.isArrayOrTypedArray(v)&&v.length>0||n(v),i;g&&(i="array");var w=c("categoryorder",i);w==="array"?(c("categoryarray"),c("ticktext")):(delete o.categoryarray,delete o.ticktext),!g&&w==="array"&&(s.categoryorder="trace")}}V.exports=function(s,c,m,h){function v(S,M){return p.coerce(s,c,e,S,M)}var g=l(s,c,{name:"dimensions",handleItemDefaults:a}),i=r(s,c,m,h,v);k(c,h,v),(!Array.isArray(g)||!g.length)&&(c.visible=!1),t(c,g,"values",i),v("hoveron"),v("hovertemplate"),v("hovertemplatefallback"),v("arrangement"),v("bundlecolors"),v("sortpaths"),v("counts");var w=h.font;p.coerceFont(v,"labelfont",w,{overrideDflt:{size:Math.round(w.size)}}),p.coerceFont(v,"tickfont",w,{autoShadowDflt:!0,overrideDflt:{size:Math.round(w.size/1.2)}})}}}),Vq=ze({"src/traces/parcats/calc.js"(J,V){"use strict";var p=Vd().wrap,b=Bf().hasColorscale,E=Qf(),k=Bw(),l=$i(),e=Nr(),t=ao();V.exports=function(w,S){var M=e.filterVisible(S.dimensions);if(M.length===0)return[];var C=M.map(function(G){var X;if(G.categoryorder==="trace")X=null;else if(G.categoryorder==="array")X=G.categoryarray;else{X=k(G.values);for(var K=!0,H=0;H=i.length||w[i[S]]!==void 0)return!1;w[i[S]]=!0}return!0}}}),Gq=ze({"src/traces/parcats/parcats.js"(J,V){"use strict";var p=ci(),b=(l0(),Po(_v)).interpolateNumber,E=Ux(),k=Qn(),l=Zl(),e=Nr(),t=e.strTranslate,n=$i(),r=Cs();function a(Y,q,Z,ee){var ae=q._context.staticPlot,he=Y.map(se.bind(0,q,Z)),xe=ee.selectAll("g.parcatslayer").data([null]);xe.enter().append("g").attr("class","parcatslayer").style("pointer-events",ae?"none":"all");var we=xe.selectAll("g.trace.parcats").data(he,o),Me=we.enter().append("g").attr("class","trace parcats");we.attr("transform",function(Ae){return t(Ae.x,Ae.y)}),Me.append("g").attr("class","paths");var Se=we.select("g.paths"),Ie=Se.selectAll("path.path").data(function(Ae){return Ae.paths},o);Ie.attr("fill",function(Ae){return Ae.model.color});var Ve=Ie.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.model.color}).attr("fill-opacity",0);S(Ve),Ie.attr("d",function(Ae){return Ae.svgD}),Ve.empty()||Ie.sort(c),Ie.exit().remove(),Ie.on("mouseover",h).on("mouseout",v).on("click",w),Me.append("g").attr("class","dimensions");var Ge=we.select("g.dimensions"),ke=Ge.selectAll("g.dimension").data(function(Ae){return Ae.dimensions},o);ke.enter().append("g").attr("class","dimension"),ke.attr("transform",function(Ae){return t(Ae.x,0)}),ke.exit().remove();var _e=ke.selectAll("g.category").data(function(Ae){return Ae.categories},o),ce=_e.enter().append("g").attr("class","category");_e.attr("transform",function(Ae){return t(0,Ae.y)}),ce.append("rect").attr("class","catrect").attr("pointer-events","none"),_e.select("rect.catrect").attr("fill","none").attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}),_(ce);var ve=_e.selectAll("rect.bandrect").data(function(Ae){return Ae.bands},o);ve.each(function(){e.raiseToTop(this)}),ve.attr("fill",function(Ae){return Ae.color});var le=ve.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.color}).attr("fill-opacity",0);ve.attr("fill",function(Ae){return Ae.color}).attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}).attr("y",function(Ae){return Ae.y}).attr("cursor",function(Ae){return Ae.parcatsViewModel.arrangement==="fixed"?"default":Ae.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),f(le),ve.exit().remove(),ce.append("text").attr("class","catlabel").attr("pointer-events","none"),_e.select("text.catlabel").attr("text-anchor",function(Ae){return s(Ae)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Ae){return s(Ae)?Ae.width+5:-5}).attr("y",function(Ae){return Ae.height/2}).text(function(Ae){return Ae.model.categoryLabel}).each(function(Ae){n.font(p.select(this),Ae.parcatsViewModel.categorylabelfont),r.convertToTspans(p.select(this),q)}),ce.append("text").attr("class","dimlabel"),_e.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ae){return Ae.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Ae){return Ae.width/2}).attr("y",-5).text(function(Ae,Be){return Be===0?Ae.parcatsViewModel.model.dimensions[Ae.model.dimensionInd].dimensionLabel:null}).each(function(Ae){n.font(p.select(this),Ae.parcatsViewModel.labelfont)}),_e.selectAll("rect.bandrect").on("mouseover",F).on("mouseout",P),_e.exit().remove(),ke.call(p.behavior.drag().origin(function(Ae){return{x:Ae.x,y:0}}).on("dragstart",j).on("drag",U).on("dragend",$)),we.each(function(Ae){Ae.traceSelection=p.select(this),Ae.pathSelection=p.select(this).selectAll("g.paths").selectAll("path.path"),Ae.dimensionSelection=p.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),we.exit().remove()}V.exports=function(Y,q,Z,ee){a(Z,Y,ee,q)};function o(Y){return Y.key}function s(Y){var q=Y.parcatsViewModel.dimensions.length,Z=Y.parcatsViewModel.dimensions[q-1].model.dimensionInd;return Y.model.dimensionInd===Z}function c(Y,q){return Y.model.rawColor>q.model.rawColor?1:Y.model.rawColorae)return 1;if(ee!==ae){var he=isNaN(ee),xe=isNaN(ae);if(he!==xe)return he?1:-1}}return Y.length-q.length}function h(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),M(p.select(this));var q=g(Y),Z=i(Y);if(Y.parcatsViewModel.graphDiv.emit("plotly_hover",{points:q,event:p.event,constraints:Z}),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ee=p.mouse(this)[0],ae=Y.parcatsViewModel.graphDiv,he=Y.parcatsViewModel.trace,xe=ae._fullLayout,we=xe._paperdiv.node().getBoundingClientRect(),Me=Y.parcatsViewModel.graphDiv.getBoundingClientRect(),Se,Ie,Ve;for(Ve=0;Ve"),yt=p.mouse(ae)[0];l.loneHover({trace:he,x:_e-we.left+Me.left,y:ce-we.top+Me.top,text:Ye,color:Y.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ve,idealAlign:yt<_e?"right":"left",hovertemplate:(he.line||{}).hovertemplate,hovertemplateLabels:Be,eventData:[{data:he._input,fullData:he,count:le,probability:Ae}]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:ae})}}}function v(Y){if(!Y.parcatsViewModel.dragDimension&&(S(p.select(this)),l.loneUnhover(Y.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),Y.parcatsViewModel.pathSelection.sort(c),Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var q=g(Y),Z=i(Y);Y.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:q,event:p.event,constraints:Z})}}function g(Y){for(var q=[],Z=Q(Y.parcatsViewModel),ee=0;eek.mostReadable(q.model.color)).attr("stroke-width",.3)}function C(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function _(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function T(Y){Y.attr("stroke","black").attr("stroke-width",1.5)}function f(Y){Y.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function u(Y){var q=Y.parcatsViewModel.pathSelection,Z=Y.categoryViewModel.model.dimensionInd,ee=Y.categoryViewModel.model.categoryInd;return q.filter(function(ae){return ae.model.categoryInds[Z]===ee&&ae.model.color===Y.color})}function A(Y){var q=p.select(Y.parentNode).selectAll("rect.bandrect");q.each(function(Z){var ee=u(Z);M(ee),ee.each(function(){e.raiseToTop(this)})}),C(p.select(Y.parentNode))}function x(Y){var q=p.select(Y).datum(),Z=u(q);M(Z),Z.each(function(){e.raiseToTop(this)}),p.select(Y.parentNode).selectAll("rect.bandrect").filter(function(ee){return ee.color===q.color}).each(function(){e.raiseToTop(this),T(p.select(this))})}function z(Y,q,Z){var ee=p.select(Y).datum(),ae=ee.categoryViewModel.model,he=ee.parcatsViewModel.graphDiv,xe=p.select(Y.parentNode).selectAll("rect.bandrect"),we=[];xe.each(function(Se){var Ie=u(Se);Ie.each(function(Ve){Array.prototype.push.apply(we,g(Ve))})});var Me={};Me[ae.dimensionInd]=ae.categoryValue,he.emit(q,{points:we,event:Z,constraints:Me})}function I(Y,q,Z){var ee=p.select(Y).datum(),ae=ee.categoryViewModel.model,he=ee.parcatsViewModel.graphDiv,xe=u(ee),we=[];xe.each(function(Se){Array.prototype.push.apply(we,g(Se))});var Me={};Me[ae.dimensionInd]=ae.categoryValue,ee.rawColor!==void 0&&(Me.color=ee.rawColor),he.emit(q,{points:we,event:Z,constraints:Me})}function O(Y,q,Z){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ae=Y._fullLayout._invScaleY,he=p.select(Z.parentNode).select("rect.catrect"),xe=he.node().getBoundingClientRect(),we=he.datum(),Me=we.parcatsViewModel,Se=Me.model.dimensions[we.model.dimensionInd],Ie=Me.trace,Ve=xe.top+xe.height/2,Ge,ke;Me.dimensions.length>1&&Se.displayInd===Me.dimensions.length-1?(Ge=xe.left,ke="left"):(Ge=xe.left+xe.width,ke="right");var _e=we.model.count,ce=we.model.categoryLabel,ve=_e/we.parcatsViewModel.model.count,le={countLabel:_e,categoryLabel:ce,probabilityLabel:ve.toFixed(3)},Ae=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ae.push(["Count:",le.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ae.push(["P("+le.categoryLabel+"):",le.probabilityLabel].join(" "));var Be=Ae.join("
");return{trace:Ie,x:ee*(Ge-q.left),y:ae*(Ve-q.top),text:Be,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:le,eventData:[{data:Ie._input,fullData:Ie,count:_e,category:ce,probability:ve}]}}function D(Y,q,Z){var ee=[];return p.select(Z.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ae=this;ee.push(O(Y,q,ae))}),ee}function B(Y,q,Z){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ae=Y._fullLayout._invScaleY,he=Z.getBoundingClientRect(),xe=p.select(Z).datum(),we=xe.categoryViewModel,Me=we.parcatsViewModel,Se=Me.model.dimensions[we.model.dimensionInd],Ie=Me.trace,Ve=he.y+he.height/2,Ge,ke;Me.dimensions.length>1&&Se.displayInd===Me.dimensions.length-1?(Ge=he.left,ke="left"):(Ge=he.left+he.width,ke="right");var _e=we.model.categoryLabel,ce=xe.parcatsViewModel.model.count,ve=0;xe.categoryViewModel.bands.forEach(function($t){$t.color===xe.color&&(ve+=$t.count)});var le=we.model.count,Ae=0;Me.pathSelection.each(function($t){$t.model.color===xe.color&&(Ae+=$t.model.count)});var Be=ve/ce,Xe=ve/Ae,Ye=ve/le,yt={countLabel:ve,categoryLabel:_e,probabilityLabel:Be.toFixed(3)},gt=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&>.push(["Count:",yt.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(gt.push("P(color \u2229 "+_e+"): "+yt.probabilityLabel),gt.push("P("+_e+" | color): "+Xe.toFixed(3)),gt.push("P(color | "+_e+"): "+Ye.toFixed(3)));var Tt=gt.join("
"),At=k.mostReadable(xe.color);return{trace:Ie,x:ee*(Ge-q.left),y:ae*(Ve-q.top),text:Tt,color:xe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:At,fontSize:10,idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:yt,eventData:[{data:Ie._input,fullData:Ie,category:_e,count:ce,probability:Be,categorycount:le,colorcount:Ae,bandcolorcount:ve}]}}function F(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var q=p.mouse(this)[1];if(q<-1)return;var Z=Y.parcatsViewModel.graphDiv,ee=Z._fullLayout,ae=ee._paperdiv.node().getBoundingClientRect(),he=Y.parcatsViewModel.hoveron,xe=this;if(he==="color"?(x(xe),I(xe,"plotly_hover",p.event)):(A(xe),z(xe,"plotly_hover",p.event)),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var we;he==="category"?we=O(Z,ae,xe):he==="color"?we=B(Z,ae,xe):he==="dimension"&&(we=D(Z,ae,xe)),we&&l.loneHover(we,{container:ee._hoverlayer.node(),outerContainer:ee._paper.node(),gd:Z})}}}function P(Y){var q=Y.parcatsViewModel;if(!q.dragDimension&&(S(q.pathSelection),_(q.dimensionSelection.selectAll("g.category")),f(q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),l.loneUnhover(q.graphDiv._fullLayout._hoverlayer.node()),q.pathSelection.sort(c),q.hoverinfoItems.indexOf("skip")===-1)){var Z=Y.parcatsViewModel.hoveron,ee=this;Z==="color"?I(ee,"plotly_unhover",p.event):z(ee,"plotly_unhover",p.event)}}function j(Y){Y.parcatsViewModel.arrangement!=="fixed"&&(Y.dragDimensionDisplayInd=Y.model.displayInd,Y.initialDragDimensionDisplayInds=Y.parcatsViewModel.model.dimensions.map(function(q){return q.displayInd}),Y.dragHasMoved=!1,Y.dragCategoryDisplayInd=null,p.select(this).selectAll("g.category").select("rect.catrect").each(function(q){var Z=p.mouse(this)[0],ee=p.mouse(this)[1];-2<=Z&&Z<=q.width+2&&-2<=ee&&ee<=q.height+2&&(Y.dragCategoryDisplayInd=q.model.displayInd,Y.initialDragCategoryDisplayInds=Y.model.categories.map(function(ae){return ae.displayInd}),q.model.dragY=q.y,e.raiseToTop(this.parentNode),p.select(this.parentNode).selectAll("rect.bandrect").each(function(ae){ae.yIe.y+Ie.height/2&&(he.model.displayInd=Ie.model.displayInd,Ie.model.displayInd=we),Y.dragCategoryDisplayInd=he.model.displayInd}if(Y.dragCategoryDisplayInd===null||Y.parcatsViewModel.arrangement==="freeform"){ae.model.dragX=p.event.x;var Ve=Y.parcatsViewModel.dimensions[Z],Ge=Y.parcatsViewModel.dimensions[ee];Ve!==void 0&&ae.model.dragXGe.x&&(ae.model.displayInd=Ge.model.displayInd,Ge.model.displayInd=Y.dragDimensionDisplayInd),Y.dragDimensionDisplayInd=ae.model.displayInd}K(Y.parcatsViewModel),X(Y.parcatsViewModel),ne(Y.parcatsViewModel),re(Y.parcatsViewModel)}}function $(Y){if(Y.parcatsViewModel.arrangement!=="fixed"&&Y.dragDimensionDisplayInd!==null){p.select(this).selectAll("text").attr("font-weight","normal");var q={},Z=Q(Y.parcatsViewModel),ee=Y.parcatsViewModel.model.dimensions.map(function(Ge){return Ge.displayInd}),ae=Y.initialDragDimensionDisplayInds.some(function(Ge,ke){return Ge!==ee[ke]});ae&&ee.forEach(function(Ge,ke){var _e=Y.parcatsViewModel.model.dimensions[ke].containerInd;q["dimensions["+_e+"].displayindex"]=Ge});var he=!1;if(Y.dragCategoryDisplayInd!==null){var xe=Y.model.categories.map(function(Ge){return Ge.displayInd});if(he=Y.initialDragCategoryDisplayInds.some(function(Ge,ke){return Ge!==xe[ke]}),he){var we=Y.model.categories.slice().sort(function(Ge,ke){return Ge.displayInd-ke.displayInd}),Me=we.map(function(Ge){return Ge.categoryValue}),Se=we.map(function(Ge){return Ge.categoryLabel});q["dimensions["+Y.model.containerInd+"].categoryarray"]=[Me],q["dimensions["+Y.model.containerInd+"].ticktext"]=[Se],q["dimensions["+Y.model.containerInd+"].categoryorder"]="array"}}if(Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!Y.dragHasMoved&&Y.potentialClickBand&&(Y.parcatsViewModel.hoveron==="color"?I(Y.potentialClickBand,"plotly_click",p.event.sourceEvent):z(Y.potentialClickBand,"plotly_click",p.event.sourceEvent)),Y.model.dragX=null,Y.dragCategoryDisplayInd!==null){var Ie=Y.parcatsViewModel.dimensions[Y.dragDimensionDisplayInd].categories[Y.dragCategoryDisplayInd];Ie.model.dragY=null,Y.dragCategoryDisplayInd=null}Y.dragDimensionDisplayInd=null,Y.parcatsViewModel.dragDimension=null,Y.dragHasMoved=null,Y.potentialClickBand=null,K(Y.parcatsViewModel),X(Y.parcatsViewModel);var Ve=p.transition().duration(300).ease("cubic-in-out");Ve.each(function(){ne(Y.parcatsViewModel,!0),re(Y.parcatsViewModel,!0)}).each("end",function(){(ae||he)&&E.restyle(Y.parcatsViewModel.graphDiv,q,[Z])})}}function Q(Y){for(var q,Z=Y.graphDiv._fullData,ee=0;ee=0;Me--)Se+="C"+xe[Me]+","+(q[Me+1]+ee)+" "+he[Me]+","+(q[Me]+ee)+" "+(Y[Me]+Z[Me])+","+(q[Me]+ee),Se+="l-"+Z[Me]+",0 ";return Se+="Z",Se}function X(Y){var q=Y.dimensions,Z=Y.model,ee=q.map(function(Xt){return Xt.categories.map(function(or){return or.y})}),ae=Y.model.dimensions.map(function(Xt){return Xt.categories.map(function(or){return or.displayInd})}),he=Y.model.dimensions.map(function(Xt){return Xt.displayInd}),xe=Y.dimensions.map(function(Xt){return Xt.model.dimensionInd}),we=q.map(function(Xt){return Xt.x}),Me=q.map(function(Xt){return Xt.width}),Se=[];for(var Ie in Z.paths)Z.paths.hasOwnProperty(Ie)&&Se.push(Z.paths[Ie]);function Ve(Xt){var or=Xt.categoryInds.map(function(vt,ht){return ae[ht][vt]}),Ot=xe.map(function(vt){return or[vt]});return Ot}Se.sort(function(Xt,or){var Ot=Ve(Xt),vt=Ve(or);return Y.sortpaths==="backward"&&(Ot.reverse(),vt.reverse()),Ot.push(Xt.valueInds[0]),vt.push(or.valueInds[0]),Y.bundlecolors&&(Ot.unshift(Xt.rawColor),vt.unshift(or.rawColor)),m(Ot,vt)});for(var Ge=new Array(Se.length),ke=q[0].model.count,_e=q[0].categories.map(function(Xt){return Xt.height}).reduce(function(Xt,or){return Xt+or}),ce=0;ce0?le=_e*(ve.count/ke):le=0;for(var Ae=new Array(ee.length),Be=0;Be1?xe=(Y.width-2*Z-ee)/(ae-1):xe=0,we=Z,Me=we+xe*he;var Se=[],Ie=Y.model.maxCats,Ve=q.categories.length,Ge=8,ke=q.count,_e=Y.height-Ge*(Ie-1),ce,ve,le,Ae,Be,Xe=(Ie-Ve)*Ge/2,Ye=q.categories.map(function(yt){return{displayInd:yt.displayInd,categoryInd:yt.categoryInd}});for(Ye.sort(function(yt,gt){return yt.displayInd-gt.displayInd}),Be=0;Be0?ce=ve.count/ke*_e:ce=0,le={key:ve.valueInds[0],model:ve,width:ee,height:ce,y:ve.dragY!==null?ve.dragY:Xe,bands:[],parcatsViewModel:Y},Xe=Xe+ce+Ge,Se.push(le);return{key:q.dimensionInd,x:q.dragX!==null?q.dragX:Me,y:0,width:ee,model:q,categories:Se,parcatsViewModel:Y,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),MM=ze({"src/traces/parcats/plot.js"(J,V){"use strict";var p=Gq();V.exports=function(E,k,l,e){var t=E._fullLayout,n=t._paper,r=t._size;p(E,n,k,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},l,e)}}}),Hq=ze({"src/traces/parcats/base_plot.js"(J){"use strict";var V=zf().getModuleCalcData,p=MM(),b="parcats";J.name=b,J.plot=function(E,k,l,e){var t=V(E.calcdata,b);if(t.length){var n=t[0];p(E,n,l,e)}},J.clean=function(E,k,l,e){var t=e._has&&e._has("parcats"),n=k._has&&k._has("parcats");t&&!n&&e._paperdiv.selectAll(".parcats").remove()}}}),Wq=ze({"src/traces/parcats/index.js"(J,V){"use strict";V.exports={attributes:AM(),supplyDefaults:qq(),calc:Vq(),plot:MM(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:Hq(),categories:["noOpacity"],meta:{}}}}),Yq=ze({"lib/parcats.js"(J,V){"use strict";V.exports=Wq()}}),Xq=ze({"src/plots/map/styles/arcgis-sat-hybrid.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},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"}},{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} @@ -2705,61 +2705,10 @@ void main() { {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"}}}),Kue=ye({"src/plots/map/styles/arcgis-sat.js"(e,r){"use strict";r.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"}}]}}}),Uv=ye({"src/plots/map/constants.js"(e,r){"use strict";var t=(Em(),On(bv)).default,a=Zue(),i=Kue(),o='\xA9 OpenStreetMap contributors',s="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",l="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",u="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",c="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",f="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",h={basic:n,streets:n,outdoors:n,light:s,dark:l,satellite:i,"satellite-streets":a,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:o,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":s,"carto-darkmatter":l,"carto-voyager":n,"carto-positron-nolabels":u,"carto-darkmatter-nolabels":c,"carto-voyager-nolabels":f},d=t(h);r.exports={styleValueDflt:"basic",stylesMap:h,styleValuesMap:d,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",d.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),$b=ye({"src/plots/map/layout_attributes.js"(e,r){"use strict";var t=Yt(),a=Ya().defaultLine,i=Ds().attributes,o=vs(),s=al().textposition,l=Cs().overrideAll,n=ko().templatedArray,u=Uv(),c=o({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});c.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var f=r.exports=l({_arrayAttrRegexps:[t.counterRegex("map",".layers",!0)],domain:i({name:"map"}),style:{valType:"any",values:u.styleValuesMap,dflt:u.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},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:n("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:a},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:a}},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:c,textposition:t.extendFlat({},s,{arrayOk:!1})}})},"plot","from-root");f.uirevision={valType:"any",editType:"none"}}}),PM=ye({"src/traces/scattermap/attributes.js"(e,r){"use strict";var{hovertemplateAttrs:t,texttemplateAttrs:a,templatefallbackAttrs:i}=Ro(),o=Up(),s=jy(),l=al(),n=$b(),u=Oo(),c=rs(),f=Xi().extendFlat,h=Cs().overrideAll,d=$b(),p=s.line,g=s.marker;r.exports=h({lon:s.lon,lat:s.lat,cluster:{enabled:{valType:"boolean"},maxzoom:f({},d.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:f({},g.opacity,{dflt:1})},mode:f({},l.mode,{dflt:"markers"}),text:f({},l.text,{}),texttemplate:a({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:f({},l.hovertext,{}),line:{color:p.color,width:p.width},connectgaps:l.connectgaps,marker:f({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:g.opacity,size:g.size,sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode},c("marker")),fill:s.fill,fillcolor:o(),textfont:n.layers.symbol.textfont,textposition:n.layers.symbol.textposition,below:{valType:"string"},selected:{marker:l.selected.marker},unselected:{marker:l.unselected.marker},hoverinfo:f({},u.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:t(),hovertemplatefallback:i()},"calc","nested")}}),TI=ye({"src/traces/scattermap/constants.js"(e,r){"use strict";var t=["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"];r.exports={isSupportedFont:function(a){return t.indexOf(a)!==-1}}}}),Jue=ye({"src/traces/scattermap/defaults.js"(e,r){"use strict";var t=Yt(),a=ms(),i=kd(),o=ip(),s=np(),l=qp(),n=PM(),u=TI().isSupportedFont;r.exports=function(h,d,p,g){function m(S,A){return t.coerce(h,d,n,S,A)}function y(S,A){return t.coerce2(h,d,n,S,A)}var _=c(h,d,m);if(!_){d.visible=!1;return}if(m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("mode"),m("below"),a.hasMarkers(d)){i(h,d,p,g,m,{noLine:!0,noAngle:!0}),m("marker.allowoverlap"),m("marker.angle");var v=d.marker;v.symbol!=="circle"&&(t.isArrayOrTypedArray(v.size)&&(v.size=v.size[0]),t.isArrayOrTypedArray(v.color)&&(v.color=v.color[0]))}a.hasLines(d)&&(o(h,d,p,g,m,{noDash:!0}),m("connectgaps"));var x=y("cluster.maxzoom"),E=y("cluster.step"),M=y("cluster.color",d.marker&&d.marker.color||p),C=y("cluster.size"),w=y("cluster.opacity"),k=x!==!1||E!==!1||M!==!1||C!==!1||w!==!1,T=m("cluster.enabled",k);if(T||a.hasText(d)){var b=g.font.family;s(h,d,g,m,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:u(b)?b:"Open Sans Regular",weight:g.font.weight,style:g.font.style,size:g.font.size,color:g.font.color}})}m("fill"),d.fill!=="none"&&l(h,d,p,m),t.coerceSelectionMarkerOpacity(d,m)};function c(f,h,d){var p=d("lon")||[],g=d("lat")||[],m=Math.min(p.length,g.length);return h._length=m,m}}}),MI=ye({"src/traces/scattermap/format_labels.js"(e,r){"use strict";var t=qi();r.exports=function(i,o,s){var l={},n=s[o.subplot]._subplot,u=n.mockAxis,c=i.lonlat;return l.lonLabel=t.tickText(u,u.c2l(c[0]),!0).text,l.latLabel=t.tickText(u,u.c2l(c[1]),!0).text,l}}}),EI=ye({"src/plots/map/convert_text_opts.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o){var s=i.split(" "),l=s[0],n=s[1],u=t.isArrayOrTypedArray(o)?t.mean(o):o,c=.5+u/100,f=1.5+u/100,h=["",""],d=[0,0];switch(l){case"top":h[0]="top",d[1]=-f;break;case"bottom":h[0]="bottom",d[1]=f;break}switch(n){case"left":h[1]="right",d[0]=-c;break;case"right":h[1]="left",d[0]=c;break}var p;return h[0]&&h[1]?p=h.join("-"):h[0]?p=h[0]:h[1]?p=h[1]:p="center",{anchor:p,offset:d}}}}),Que=ye({"src/traces/scattermap/convert.js"(e,r){"use strict";var t=en(),a=Yt(),i=Vn().BADNUM,o=Ob(),s=As(),l=$i(),n=$x(),u=ms(),c=TI().isSupportedFont,f=EI(),h=Bf().appendArrayPointValue,d=Go().NEWLINES,p=Go().BR_TAG_ALL;r.exports=function(w,k){var T=k[0].trace,b=T.visible===!0&&T._length!==0,S=T.fill!=="none",A=u.hasLines(T),F=u.hasMarkers(T),D=u.hasText(T),R=F&&T.marker.symbol==="circle",P=F&&T.marker.symbol!=="circle",z=T.cluster&&T.cluster.enabled,I=g("fill"),L=g("line"),B=g("circle"),O=g("symbol"),G={fill:I,line:L,circle:B,symbol:O};if(!b)return G;var $;if((S||A)&&($=o.calcTraceToLineCoords(k)),S&&(I.geojson=o.makePolygon($),I.layout.visibility="visible",a.extendFlat(I.paint,{"fill-color":T.fillcolor})),A&&(L.geojson=o.makeLine($),L.layout.visibility="visible",a.extendFlat(L.paint,{"line-width":T.line.width,"line-color":T.line.color,"line-opacity":T.opacity})),R){var X=m(k);B.geojson=X.geojson,B.layout.visibility="visible",z&&(B.filter=["!",["has","point_count"]],G.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":E(T.cluster.color,T.cluster.step),"circle-radius":E(T.cluster.size,T.cluster.step),"circle-opacity":E(T.cluster.opacity,T.cluster.step)}},G.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(T),"text-size":12}}),a.extendFlat(B.paint,{"circle-color":X.mcc,"circle-radius":X.mrc,"circle-opacity":X.mo})}if(R&&z&&(B.filter=["!",["has","point_count"]]),(P||D)&&(O.geojson=y(k,w),a.extendFlat(O.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),P&&(a.extendFlat(O.layout,{"icon-size":T.marker.size/10}),"angle"in T.marker&&T.marker.angle!=="auto"&&a.extendFlat(O.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),O.layout["icon-allow-overlap"]=T.marker.allowoverlap,a.extendFlat(O.paint,{"icon-opacity":T.opacity*T.marker.opacity,"icon-color":T.marker.color,"icon-halo-color":T.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),D)){var Z=(T.marker||{}).size,J=f(T.textposition,Z);a.extendFlat(O.layout,{"text-size":T.textfont.size,"text-anchor":J.anchor,"text-offset":J.offset,"text-font":M(T)}),a.extendFlat(O.paint,{"text-color":T.textfont.color,"text-opacity":T.opacity})}return G};function g(C){return{type:C,geojson:o.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function m(C){var w=C[0].trace,k=w.marker,T=w.selectedpoints,b=a.isArrayOrTypedArray(k.color),S=a.isArrayOrTypedArray(k.size),A=a.isArrayOrTypedArray(k.opacity),F;function D(Z){return w.opacity*Z}function R(Z){return Z/2}var P;b&&(s.hasColorscale(w,"marker")?P=s.makeColorScaleFuncFromTrace(k):P=a.identity);var z;S&&(z=n(w));var I;A&&(I=function(Z){var J=t(Z)?+a.constrain(Z,0,1):0;return D(J)});var L=[];for(F=0;F850?F+=" Black":b>750?F+=" Extra Bold":b>650?F+=" Bold":b>550?F+=" Semi Bold":b>450?F+=" Medium":b>350?F+=" Regular":b>250?F+=" Light":b>150?F+=" Extra Light":F+=" Thin"):S.slice(0,2).join(" ")==="Open Sans"?(F="Open Sans",b>750?F+=" Extrabold":b>650?F+=" Bold":b>550?F+=" Semibold":b>350?F+=" Regular":F+=" Light"):S.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(F="Klokantech Noto Sans",S[3]==="CJK"&&(F+=" CJK"),F+=b>500?" Bold":" Regular")),A&&(F+=" Italic"),F==="Open Sans Regular Italic"?F="Open Sans Italic":F==="Open Sans Regular Bold"?F="Open Sans Bold":F==="Open Sans Regular Bold Italic"?F="Open Sans Bold Italic":F==="Klokantech Noto Sans Regular Italic"&&(F="Klokantech Noto Sans Italic"),c(F)||(F=k);var D=F.split(", ");return D}}}),ece=ye({"src/traces/scattermap/plot.js"(e,r){"use strict";var t=Yt(),a=Que(),i=Uv().traceLayerPrefix,o={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function s(n,u,c,f){this.type="scattermap",this.subplot=n,this.uid=u,this.clusterEnabled=c,this.isHidden=f,this.sourceIds={fill:"source-"+u+"-fill",line:"source-"+u+"-line",circle:"source-"+u+"-circle",symbol:"source-"+u+"-symbol",cluster:"source-"+u+"-circle",clusterCount:"source-"+u+"-circle"},this.layerIds={fill:i+u+"-fill",line:i+u+"-line",circle:i+u+"-circle",symbol:i+u+"-symbol",cluster:i+u+"-cluster",clusterCount:i+u+"-cluster-count"},this.below=null}var l=s.prototype;l.addSource=function(n,u,c){var f={type:"geojson",data:u.geojson};c&&c.enabled&&t.extendFlat(f,{cluster:!0,clusterMaxZoom:c.maxzoom});var h=this.subplot.map.getSource(this.sourceIds[n]);h?h.setData(u.geojson):this.subplot.map.addSource(this.sourceIds[n],f)},l.setSourceData=function(n,u){this.subplot.map.getSource(this.sourceIds[n]).setData(u.geojson)},l.addLayer=function(n,u,c){var f={type:u.type,id:this.layerIds[n],source:this.sourceIds[n],layout:u.layout,paint:u.paint};u.filter&&(f.filter=u.filter);for(var h=this.layerIds[n],d,p=this.subplot.getMapLayers(),g=0;g=0;A--){var F=S[A];h.removeLayer(y.layerIds[F])}b||h.removeSource(y.sourceIds.circle)}function x(b){for(var S=o.nonCluster,A=0;A=0;A--){var F=S[A];h.removeLayer(y.layerIds[F]),b||h.removeSource(y.sourceIds[F])}}function M(b){m?v(b):E(b)}function C(b){g?_(b):x(b)}function w(){for(var b=g?o.cluster:o.nonCluster,S=0;S=0;f--){var h=c[f];u.removeLayer(this.layerIds[h]),u.removeSource(this.sourceIds[h])}},r.exports=function(u,c){var f=c[0].trace,h=f.cluster&&f.cluster.enabled,d=f.visible!==!0,p=new s(u,f.uid,h,d),g=a(u.gd,c),m=p.below=u.belowLookup["trace-"+f.uid],y,_,v;if(h)for(p.addSource("circle",g.circle,f.cluster),y=0;y=0?Math.floor((f+180)/360):Math.ceil((f-180)/360),C=M*360,w=f-C;function k(z){var I=z.lonlat;if(I[0]===s||x&&_.indexOf(z.i+1)===-1)return 1/0;var L=a.modHalf(I[0],360),B=I[1],O=y.project([L,B]),G=O.x-g.c2p([w,B]),$=O.y-m.c2p([L,h]),X=Math.max(3,z.mrc||0);return Math.max(Math.sqrt(G*G+$*$)-X,1-3/X)}if(t.getClosest(d,k,c),c.index!==!1){var T=d[c.index],b=T.lonlat,S=[a.modHalf(b[0],360)+C,b[1]],A=g.c2p(S),F=m.c2p(S),D=T.mrc||1;c.x0=A-D,c.x1=A+D,c.y0=F-D,c.y1=F+D;var R={};R[p.subplot]={_subplot:y};var P=p._module.formatLabels(T,p,R);return c.lonLabel=P.lonLabel,c.latLabel=P.latLabel,c.color=i(p,T),c.extraText=u(p,T,d[0].t.labels),c.hovertemplate=p.hovertemplate,[c]}}function u(c,f,h){if(c.hovertemplate)return;var d=f.hi||c.hoverinfo,p=d.split("+"),g=p.indexOf("all")!==-1,m=p.indexOf("lon")!==-1,y=p.indexOf("lat")!==-1,_=f.lonlat,v=[];function x(E){return E+"\xB0"}return g||m&&y?v.push("("+x(_[1])+", "+x(_[0])+")"):m?v.push(h.lon+x(_[0])):y&&v.push(h.lat+x(_[1])),(g||p.indexOf("text")!==-1)&&o(f,c,v),v.join("
")}r.exports={hoverPoints:n,getExtraText:u}}}),tce=ye({"src/traces/scattermap/event_data.js"(e,r){"use strict";r.exports=function(a,i){return a.lon=i.lon,a.lat=i.lat,a}}}),rce=ye({"src/traces/scattermap/select.js"(e,r){"use strict";var t=Yt(),a=ms(),{BADNUM:i}=Vn(),o=360,s=.001,l=(c,f,h,d)=>[c.c2p([h,d]),f.c2p([h,d])];function n(c,f,h,d,p){let g=l(c,f,h+o,d),m=l(c,f,h-o,d),y=g[0]-p[0],_=g[1]-p[1],v=Math.abs(y-(p[0]-m[0])){if(Math.abs(m)p?null:[Math.floor(d)-1,Math.ceil(p)+1]}r.exports=function(f,h){var d;let{cd:p,xaxis:g,yaxis:m}=f,{trace:y}=p[0];if(!a.hasMarkers(y))return[];if(h===!1){for(let E of p)E.selected=0;return[]}let _=(d=g._subplot)==null?void 0:d.map,v=!!_?.getRenderWorldCopies()&&h.xmax>h.xmin,x=[];for(let E=0;E=1)return 1;let h=c;for(let g=0;g<8;g++){let m=((s*h+o)*h+i)*h-c;if(Math.abs(m)m?d=h:p=h,h=(d+p)*.5}return((u*h+n)*h+l)*h}}function RM(){return G2??(G2=typeof OffscreenCanvas<"u"&&!!new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),G2}function SI(){if(H2==null&&(H2=!1,RM())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let a=t*4;e.fillStyle=`rgb(${a},${a+1},${a+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let r=e.getImageData(0,0,5,5).data;for(let t=0;t<100;t++)if(t%4!=3&&r[t]!==t){H2=!0;break}}}return H2||!1}function kI(){var e=new fu(9);return fu!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ice(e){var r=e[0],t=e[1],a=e[2],i=e[3],o=e[4],s=e[5],l=e[6],n=e[7],u=e[8];return r*(u*o-s*n)+t*(-u*i+s*l)+a*(n*i-o*l)}function nce(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=-t,e[4]=a,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function oce(e,r){var t=r[0],a=r[1],i=r[2],o=r[3],s=t+t,l=a+a,n=i+i,u=t*s,c=a*s,f=a*l,h=i*s,d=i*l,p=i*n,g=o*s,m=o*l,y=o*n;return e[0]=1-f-p,e[3]=c-y,e[6]=h+m,e[1]=c+y,e[4]=1-u-p,e[7]=d-g,e[2]=h-m,e[5]=d+g,e[8]=1-u-f,e}function w0(){var e=new fu(16);return fu!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function zM(e){var r=new fu(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function sce(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function Id(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Yb(e,r){var t=r[0],a=r[1],i=r[2],o=r[3],s=r[4],l=r[5],n=r[6],u=r[7],c=r[8],f=r[9],h=r[10],d=r[11],p=r[12],g=r[13],m=r[14],y=r[15],_=t*l-a*s,v=t*n-i*s,x=t*u-o*s,E=a*n-i*l,M=a*u-o*l,C=i*u-o*n,w=c*g-f*p,k=c*m-h*p,T=c*y-d*p,b=f*m-h*g,S=f*y-d*g,A=h*y-d*m,F=_*A-v*S+x*b+E*T-M*k+C*w;return F?(F=1/F,e[0]=(l*A-n*S+u*b)*F,e[1]=(i*S-a*A-o*b)*F,e[2]=(g*C-m*M+y*E)*F,e[3]=(h*M-f*C-d*E)*F,e[4]=(n*T-s*A-u*k)*F,e[5]=(t*A-i*T+o*k)*F,e[6]=(m*x-p*C-y*v)*F,e[7]=(c*C-h*x+d*v)*F,e[8]=(s*S-l*T+u*w)*F,e[9]=(a*T-t*S-o*w)*F,e[10]=(p*M-g*x+y*_)*F,e[11]=(f*x-c*M-d*_)*F,e[12]=(l*k-s*b-n*w)*F,e[13]=(t*b-a*k+i*w)*F,e[14]=(g*v-p*E-m*_)*F,e[15]=(c*E-f*v+h*_)*F,e):null}function t1(e,r,t){var a=r[0],i=r[1],o=r[2],s=r[3],l=r[4],n=r[5],u=r[6],c=r[7],f=r[8],h=r[9],d=r[10],p=r[11],g=r[12],m=r[13],y=r[14],_=r[15],v=t[0],x=t[1],E=t[2],M=t[3];return e[0]=v*a+x*l+E*f+M*g,e[1]=v*i+x*n+E*h+M*m,e[2]=v*o+x*u+E*d+M*y,e[3]=v*s+x*c+E*p+M*_,v=t[4],x=t[5],E=t[6],M=t[7],e[4]=v*a+x*l+E*f+M*g,e[5]=v*i+x*n+E*h+M*m,e[6]=v*o+x*u+E*d+M*y,e[7]=v*s+x*c+E*p+M*_,v=t[8],x=t[9],E=t[10],M=t[11],e[8]=v*a+x*l+E*f+M*g,e[9]=v*i+x*n+E*h+M*m,e[10]=v*o+x*u+E*d+M*y,e[11]=v*s+x*c+E*p+M*_,v=t[12],x=t[13],E=t[14],M=t[15],e[12]=v*a+x*l+E*f+M*g,e[13]=v*i+x*n+E*h+M*m,e[14]=v*o+x*u+E*d+M*y,e[15]=v*s+x*c+E*p+M*_,e}function Xl(e,r,t){var a=t[0],i=t[1],o=t[2],s,l,n,u,c,f,h,d,p,g,m,y;return r===e?(e[12]=r[0]*a+r[4]*i+r[8]*o+r[12],e[13]=r[1]*a+r[5]*i+r[9]*o+r[13],e[14]=r[2]*a+r[6]*i+r[10]*o+r[14],e[15]=r[3]*a+r[7]*i+r[11]*o+r[15]):(s=r[0],l=r[1],n=r[2],u=r[3],c=r[4],f=r[5],h=r[6],d=r[7],p=r[8],g=r[9],m=r[10],y=r[11],e[0]=s,e[1]=l,e[2]=n,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=p,e[9]=g,e[10]=m,e[11]=y,e[12]=s*a+c*i+p*o+r[12],e[13]=l*a+f*i+g*o+r[13],e[14]=n*a+h*i+m*o+r[14],e[15]=u*a+d*i+y*o+r[15]),e}function wc(e,r,t){var a=t[0],i=t[1],o=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*i,e[5]=r[5]*i,e[6]=r[6]*i,e[7]=r[7]*i,e[8]=r[8]*o,e[9]=r[9]*o,e[10]=r[10]*o,e[11]=r[11]*o,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function r1(e,r,t){var a=Math.sin(t),i=Math.cos(t),o=r[4],s=r[5],l=r[6],n=r[7],u=r[8],c=r[9],f=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=o*i+u*a,e[5]=s*i+c*a,e[6]=l*i+f*a,e[7]=n*i+h*a,e[8]=u*i-o*a,e[9]=c*i-s*a,e[10]=f*i-l*a,e[11]=h*i-n*a,e}function CI(e,r,t){var a=Math.sin(t),i=Math.cos(t),o=r[0],s=r[1],l=r[2],n=r[3],u=r[8],c=r[9],f=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=o*i-u*a,e[1]=s*i-c*a,e[2]=l*i-f*a,e[3]=n*i-h*a,e[8]=o*a+u*i,e[9]=s*a+c*i,e[10]=l*a+f*i,e[11]=n*a+h*i,e}function A0(e,r,t){var a=Math.sin(t),i=Math.cos(t),o=r[0],s=r[1],l=r[2],n=r[3],u=r[4],c=r[5],f=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=o*i+u*a,e[1]=s*i+c*a,e[2]=l*i+f*a,e[3]=n*i+h*a,e[4]=u*i-o*a,e[5]=c*i-s*a,e[6]=f*i-l*a,e[7]=h*i-n*a,e}function lce(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function uce(e,r,t,a,i){var o=1/Math.tan(r/2);if(e[0]=o/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0){var s=1/(a-i);e[10]=(i+a)*s,e[14]=2*i*a*s}else e[10]=-1,e[14]=-2*a;return e}function cce(e,r,t,a,i,o,s){var l=1/(r-t),n=1/(a-i),u=1/(o-s);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*l,e[13]=(i+a)*n,e[14]=(s+o)*u,e[15]=1,e}function fce(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]&&e[4]===r[4]&&e[5]===r[5]&&e[6]===r[6]&&e[7]===r[7]&&e[8]===r[8]&&e[9]===r[9]&&e[10]===r[10]&&e[11]===r[11]&&e[12]===r[12]&&e[13]===r[13]&&e[14]===r[14]&&e[15]===r[15]}function hce(e,r){var t=e[0],a=e[1],i=e[2],o=e[3],s=e[4],l=e[5],n=e[6],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],m=e[14],y=e[15],_=r[0],v=r[1],x=r[2],E=r[3],M=r[4],C=r[5],w=r[6],k=r[7],T=r[8],b=r[9],S=r[10],A=r[11],F=r[12],D=r[13],R=r[14],P=r[15];return Math.abs(t-_)<=1e-6*Math.max(1,Math.abs(t),Math.abs(_))&&Math.abs(a-v)<=1e-6*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(i-x)<=1e-6*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-E)<=1e-6*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(s-M)<=1e-6*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(l-C)<=1e-6*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(n-w)<=1e-6*Math.max(1,Math.abs(n),Math.abs(w))&&Math.abs(u-k)<=1e-6*Math.max(1,Math.abs(u),Math.abs(k))&&Math.abs(c-T)<=1e-6*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(f-b)<=1e-6*Math.max(1,Math.abs(f),Math.abs(b))&&Math.abs(h-S)<=1e-6*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(d-A)<=1e-6*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-F)<=1e-6*Math.max(1,Math.abs(p),Math.abs(F))&&Math.abs(g-D)<=1e-6*Math.max(1,Math.abs(g),Math.abs(D))&&Math.abs(m-R)<=1e-6*Math.max(1,Math.abs(m),Math.abs(R))&&Math.abs(y-P)<=1e-6*Math.max(1,Math.abs(y),Math.abs(P))}function DI(){var e=new fu(3);return fu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function BM(e){var r=new fu(3);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function Yp(e){var r=e[0],t=e[1],a=e[2];return Math.sqrt(r*r+t*t+a*a)}function LI(e,r,t){var a=new fu(3);return a[0]=e,a[1]=r,a[2]=t,a}function jh(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e}function FI(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e}function Ws(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e}function Xb(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e[2]=r[2]+t[2]*a,e}function dce(e,r){var t=r[0]-e[0],a=r[1]-e[1],i=r[2]-e[2];return Math.sqrt(t*t+a*a+i*i)}function pce(e,r){return e[0]=-r[0],e[1]=-r[1],e[2]=-r[2],e}function xf(e,r){var t=r[0],a=r[1],i=r[2],o=t*t+a*a+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=r[0]*o,e[1]=r[1]*o,e[2]=r[2]*o,e}function uu(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]}function Nf(e,r,t){var a=r[0],i=r[1],o=r[2],s=t[0],l=t[1],n=t[2];return e[0]=i*n-o*l,e[1]=o*s-a*n,e[2]=a*l-i*s,e}function vce(e,r,t){var a=r[0],i=r[1],o=r[2],s=t[3]*a+t[7]*i+t[11]*o+t[15];return s||(s=1),e[0]=(t[0]*a+t[4]*i+t[8]*o+t[12])/s,e[1]=(t[1]*a+t[5]*i+t[9]*o+t[13])/s,e[2]=(t[2]*a+t[6]*i+t[10]*o+t[14])/s,e}function mce(e,r,t){var a=r[0],i=r[1],o=r[2];return e[0]=a*t[0]+i*t[3]+o*t[6],e[1]=a*t[1]+i*t[4]+o*t[7],e[2]=a*t[2]+i*t[5]+o*t[8],e}function OM(e,r,t){var a=t[0],i=t[1],o=t[2],s=t[3],l=r[0],n=r[1],u=r[2],c=i*u-o*n,f=o*l-a*u,h=a*n-i*l;return c+=c,f+=f,h+=h,e[0]=l+s*c+i*h-o*f,e[1]=n+s*f+o*c-a*h,e[2]=u+s*h+a*f-i*c,e}function Vy(e,r,t,a){var i=[],o=[];return i[0]=r[0]-t[0],i[1]=r[1]-t[1],i[2]=r[2]-t[2],o[0]=i[0],o[1]=i[1]*Math.cos(a)-i[2]*Math.sin(a),o[2]=i[1]*Math.sin(a)+i[2]*Math.cos(a),e[0]=o[0]+t[0],e[1]=o[1]+t[1],e[2]=o[2]+t[2],e}function a1(e,r,t,a){var i=[],o=[];return i[0]=r[0]-t[0],i[1]=r[1]-t[1],i[2]=r[2]-t[2],o[0]=i[2]*Math.sin(a)+i[0]*Math.cos(a),o[1]=i[1],o[2]=i[2]*Math.cos(a)-i[0]*Math.sin(a),e[0]=o[0]+t[0],e[1]=o[1]+t[1],e[2]=o[2]+t[2],e}function NM(e,r,t,a){var i=[],o=[];return i[0]=r[0]-t[0],i[1]=r[1]-t[1],i[2]=r[2]-t[2],o[0]=i[0]*Math.cos(a)-i[1]*Math.sin(a),o[1]=i[0]*Math.sin(a)+i[1]*Math.cos(a),o[2]=i[2],e[0]=o[0]+t[0],e[1]=o[1]+t[1],e[2]=o[2]+t[2],e}function gce(e){return e[0]=0,e[1]=0,e[2]=0,e}function yce(){var e=new fu(4);return fu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function _ce(e,r,t,a){var i=new fu(4);return i[0]=e,i[1]=r,i[2]=t,i[3]=a,i}function xce(e,r,t){return e[0]=r[0]*t[0],e[1]=r[1]*t[1],e[2]=r[2]*t[2],e[3]=r[3]*t[3],e}function bce(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e[3]=r[3]*t,e}function wce(e,r){var t=r[0],a=r[1],i=r[2],o=r[3],s=t*t+a*a+i*i+o*o;return s>0&&(s=1/Math.sqrt(s)),e[0]=t*s,e[1]=a*s,e[2]=i*s,e[3]=o*s,e}function Cu(e,r,t){var a=r[0],i=r[1],o=r[2],s=r[3];return e[0]=t[0]*a+t[4]*i+t[8]*o+t[12]*s,e[1]=t[1]*a+t[5]*i+t[9]*o+t[13]*s,e[2]=t[2]*a+t[6]*i+t[10]*o+t[14]*s,e[3]=t[3]*a+t[7]*i+t[11]*o+t[15]*s,e}function PI(){var e=new fu(4);return fu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Ace(e,r,t){t*=.5;var a=Math.sin(t);return e[0]=a*r[0],e[1]=a*r[1],e[2]=a*r[2],e[3]=Math.cos(t),e}function Tce(e,r,t){var a=r[0],i=r[1],o=r[2],s=r[3],l=t[0],n=t[1],u=t[2],c=t[3];return e[0]=a*c+s*l+i*u-o*n,e[1]=i*c+s*n+o*l-a*u,e[2]=o*c+s*u+a*n-i*l,e[3]=s*c-a*l-i*n-o*u,e}function Zb(e,r,t,a){var i=r[0],o=r[1],s=r[2],l=r[3],n=t[0],u=t[1],c=t[2],f=t[3],h,d=i*n+o*u+s*c+l*f,p,g,m;return d<0&&(d=-d,n=-n,u=-u,c=-c,f=-f),1-d>1e-6?(h=Math.acos(d),p=Math.sin(h),g=Math.sin((1-a)*h)/p,m=Math.sin(a*h)/p):(g=1-a,m=a),e[0]=g*i+m*n,e[1]=g*o+m*u,e[2]=g*s+m*c,e[3]=g*l+m*f,e}function Mce(e,r){var t=r[0]+r[4]+r[8],a;if(t>0)a=Math.sqrt(t+1),e[3]=.5*a,a=.5/a,e[0]=(r[5]-r[7])*a,e[1]=(r[6]-r[2])*a,e[2]=(r[1]-r[3])*a;else{var i=0;r[4]>r[0]&&(i=1),r[8]>r[i*3+i]&&(i=2);var o=(i+1)%3,s=(i+2)%3;a=Math.sqrt(r[i*3+i]-r[o*3+o]-r[s*3+s]+1),e[i]=.5*a,a=.5/a,e[3]=(r[o*3+s]-r[s*3+o])*a,e[o]=(r[o*3+i]+r[i*3+o])*a,e[s]=(r[s*3+i]+r[i*3+s])*a}return e}function jM(e,r,t,a){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",o=Math.PI/360;r*=o,a*=o,t*=o;var s=Math.sin(r),l=Math.cos(r),n=Math.sin(t),u=Math.cos(t),c=Math.sin(a),f=Math.cos(a);switch(i){case"xyz":e[0]=s*u*f+l*n*c,e[1]=l*n*f-s*u*c,e[2]=l*u*c+s*n*f,e[3]=l*u*f-s*n*c;break;case"xzy":e[0]=s*u*f-l*n*c,e[1]=l*n*f-s*u*c,e[2]=l*u*c+s*n*f,e[3]=l*u*f+s*n*c;break;case"yxz":e[0]=s*u*f+l*n*c,e[1]=l*n*f-s*u*c,e[2]=l*u*c-s*n*f,e[3]=l*u*f+s*n*c;break;case"yzx":e[0]=s*u*f+l*n*c,e[1]=l*n*f+s*u*c,e[2]=l*u*c-s*n*f,e[3]=l*u*f-s*n*c;break;case"zxy":e[0]=s*u*f-l*n*c,e[1]=l*n*f+s*u*c,e[2]=l*u*c+s*n*f,e[3]=l*u*f-s*n*c;break;case"zyx":e[0]=s*u*f-l*n*c,e[1]=l*n*f+s*u*c,e[2]=l*u*c-s*n*f,e[3]=l*u*f+s*n*c;break;default:throw Error("Unknown angle order "+i)}return e}function UM(){var e=new fu(2);return fu!=Float32Array&&(e[0]=0,e[1]=0),e}function II(e,r){var t=new fu(2);return t[0]=e,t[1]=r,t}function RI(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e}function zI(e){var r=e[0],t=e[1];return Math.sqrt(r*r+t*t)}function Ece(e){var r=e[0],t=e[1];return r*r+t*t}function Sce(e,r){return e[0]*r[0]+e[1]*r[1]}function BI(e){return e[0]=0,e[1]=0,e}function uh(e,r,t){return r*(xa/(e.tileSize*2**(t-e.tileID.overscaledZ)))}function Ac(e){return e instanceof Error?e:Error(typeof e=="string"?e:String(e))}function T0(){return new Float64Array(4)}function as(){return new Float64Array(3)}function qv(){return new Float64Array(16)}function Kb(){let e=new Float64Array(16);return Id(e),e}function OI(){let e=new Float32Array(16);return Id(e),e}function M0(e,r,t,a,i=!1){if(!t[0]&&!t[1])return[0,0];let o=i?a==="map"?-e.bearingInRadians:0:a==="viewport"?e.bearingInRadians:0;if(o){let s=Math.sin(o),l=Math.cos(o);t=[t[0]*l-t[1]*s,t[0]*s+t[1]*l]}return[i?t[0]:uh(r,t[0],e.zoom),i?t[1]:uh(r,t[1],e.zoom)]}function qM(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]}function Uh(e,r,t){let a=ice([e[0],e[1],e[2],r[0],r[1],r[2],t[0],t[1],t[2]]);if(a===0)return null;let i=Nf([],[r[0],r[1],r[2]],[t[0],t[1],t[2]]),o=Nf([],[t[0],t[1],t[2]],[e[0],e[1],e[2]]),s=Nf([],[e[0],e[1],e[2]],[r[0],r[1],r[2]]),l=Ws([],i,-e[3]);return jh(l,l,Ws([],o,-r[3])),jh(l,l,Ws([],s,-t[3])),Ws(l,l,1/a),l}function kce(e,r,t){let a=e[0]*t[0]+e[1]*t[1]+e[2]*t[2],i=r[0]*t[0]+r[1]*t[1]+r[2]*t[2];return i===0?null:(-a-t[3])/i}function Jb(e,r,t,a){let i=Math.sqrt(e*e+r*r),o=Math.sqrt(t*t+a*a);e/=i,r/=i,t/=o,a/=o;let s=e*t+r*a,l=Math.acos(s);return-r*t+e*a>0?l:-l}function ch(e,r){let t=Vv(e,360),a=Vv(r,360),i=a-t,o=a>t?i-360:i+360;return Math.abs(i)n.canonical.z)),t=1/0,a=-1/0,i=1/0,o=-1/0,s=[];for(let n of e){let{x:u,y:c,z:f}=n.canonical,h=2**(r-f),d=u*h,p=c*h;s.push({id:n,x:d,y:p}),da&&(a=d),po&&(o=p)}let l=new Set;for(let n of s)(n.x===t||n.x===a||n.y===i||n.y===o)&&l.add(n.id);return l}function Lce(e){if(e<=0)return 0;if(e>=1)return 1;let r=e*e,t=r*e;return 4*(e<.5?t:3*(e-r)+t-.75)}function VM(e,r,t,a){return ace(e,r,t,a)}function Gn(e,r,t){return Math.min(t,Math.max(r,e))}function qh(e,r,t){let a=t-r,i=((e-r)%a+a)%a+r;return i===r?t:i}function tn(e,...r){for(let t of r)for(let a in t)e[a]=t[a];return e}function Gy(e,r){let t={};for(let a of r)a in e&&(t[a]=e[a]);return t}function NI(){return Uz++}function Fce(e){return Math.log(e)/Math.LN2%1==0}function Pce(e){return e<=1?1:2**Math.ceil(Math.log(e)/Math.LN2)}function bf(e){return 2**e}function Tc(e){return Math.log(e)/Math.LN2}function fh(e,r,t){if(r<=0)return e;let a=1/r;return t===void 0||Math.abs(t)<1e-10?Math.round(e*a)/a:(t>0?Math.ceil(e*a-1e-9):Math.floor(e*a+1e-10))/a}function GM(e,r,t){let a={};for(let i in e)a[i]=r.call(t||this,e[i],i,e);return a}function jI(e,r,t){let a={};for(let i in e)r.call(t||this,e[i],i,e)&&(a[i]=e[i]);return a}function up(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(let t=0;t(r.y-e.y)*(t.x-e.x)}function Ice(e,r,t,a){let i=r.y-e.y,o=r.x-e.x,s=a.y-t.y,l=a.x-t.x,n=s*o-l*i;if(n===0)return null;let u=e.y-t.y,c=e.x-t.x,f=(l*u-s*c)/n;return new zr(e.x+f*o,e.y+f*i)}function Rce([e,r,t]){return r+=90,r*=Math.PI/180,t*=Math.PI/180,[e*Math.cos(r)*Math.sin(t),e*Math.sin(r)*Math.sin(t),e*Math.cos(t)]}function n1(e){return typeof WorkerGlobalScope<"u"&&e!==void 0&&e instanceof WorkerGlobalScope}function zce(e){let r=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,t={};if(e.replace(r,(a,i,o,s)=>{let l=o||s;return t[i]=!l||l.toLowerCase(),""}),t["max-age"]){let a=parseInt(t["max-age"],10);isNaN(a)?delete t["max-age"]:t["max-age"]=a}return t}function Bce(e){if(Y2==null){let r=e.navigator?e.navigator.userAgent:null;Y2=!!e.safari||!!(r&&(/\b(iPad|iPhone|iPod)\b/.test(r)||r.match("Safari")&&!r.match("Chrome")))}return Y2}function Gv(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap}function Oce(e,r,t,a,i){let o=Math.max(-r,0)*4,s=(Math.max(0,t)-t)*a*4+o,l=a*4,n=Math.max(0,r),u=Math.max(0,t),c=Math.min(e.width,r+a),f=Math.min(e.height,t+i);return{rect:{x:n,y:u,width:c-n,height:f-u},layout:[{offset:s,stride:l}]}}function Nce(e,r,t,a,i){return yi(this,null,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let o=new VideoFrame(e,{timestamp:0});try{let s=o?.format;if(!s||!(s.startsWith("BGR")||s.startsWith("RGB")))throw Error(`Unrecognized format ${s}`);let l=s.startsWith("BGR"),n=new Uint8ClampedArray(a*i*4);if(yield o.copyTo(n,Oce(e,r,t,a,i)),l)for(let u=0;u{e.removeEventListener(r,t,a)}}}function il(e){return e*Math.PI/180}function cp(e){return e/Math.PI*180}function UI(e,r){return e.roll==r.roll&&e.pitch==r.pitch&&e.bearing==r.bearing}function jce(e){let r=new Float64Array(9);oce(r,e);let t=cp(-Math.asin(Gn(r[2],-1,1))),a,i;return Math.hypot(r[5],r[8])<.001?(a=0,i=-cp(Math.atan2(r[3],r[4]))):(a=cp(r[5]===0&&r[8]===0?0:Math.atan2(r[5],r[8])),i=cp(r[1]===0&&r[0]===0?0:Math.atan2(r[1],r[0]))),{roll:a,pitch:t+90,bearing:i}}function qI(e,r,t){let a=II(r.x-t.x,r.y-t.y),i=II(e.x-t.x,e.y-t.y),o=a[0]*i[1]-a[1]*i[0];return cp(Math.atan2(o,Sce(a,i)))}function VI(e,r,t){let a=new Float64Array(4);return jM(a,e,r-90,t),a}function Uce(e,r){return lS[r]&&"touches"in e}function qce(e,r){var t,a;if(!uS[r])return!1;let i=e,o=((a=(t=i?.target)==null?void 0:t.ownerDocument)==null?void 0:a.defaultView)||window;return i instanceof o.MouseEvent||i instanceof o.WheelEvent}function Vce(e){return lS[e]||uS[e]}function S0(e){return e instanceof Error&&e.name==="AbortError"}function WM(e){if(e.aborted)throw new T1(e.reason)}function GI(e){return Uf.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}function Gce(e,r){Uf.REGISTERED_PROTOCOLS[e]=r}function Hce(e){delete Uf.REGISTERED_PROTOCOLS[e]}function $M(){var e;if(n1(self))return(e=self.worker)==null?void 0:e.referrer;if(window.location.protocol==="blob:")try{return window.parent.location.href}catch{}return window.location.href}function Wce(e,r){return yi(this,null,function*(){let t=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:$M(),referrerPolicy:e.referrerPolicy,signal:r.signal});e.type==="json"&&!t.headers.has("Accept")&&t.headers.set("Accept","application/json");let a;try{a=yield fetch(t)}catch(s){throw S0(s)?s:new M1(0,Ac(s).message,e.url,new Blob)}if(!a.ok){let s=yield a.blob();throw new M1(a.status,a.statusText,e.url,s)}let i;i=e.type==="arrayBuffer"||e.type==="image"?a.arrayBuffer():e.type==="json"?a.json():a.text();let o=yield i;return WM(r.signal),{data:o,cacheControl:a.headers.get("Cache-Control"),expires:a.headers.get("Expires"),etag:a.headers.get("ETag")}})}function $ce(e,r){return new Promise((t,a)=>{var i;let o=new XMLHttpRequest;o.open(e.method||"GET",e.url,!0),(e.type==="arrayBuffer"||e.type==="image")&&(o.responseType="arraybuffer");for(let s in e.headers)o.setRequestHeader(s,e.headers[s]);e.type==="json"&&(o.responseType="text",(i=e.headers)!=null&&i.Accept||o.setRequestHeader("Accept","application/json")),o.withCredentials=e.credentials==="include",o.onerror=()=>{a(Error(o.statusText))},o.onload=()=>{if(!r.signal.aborted)if((o.status>=200&&o.status<300||o.status===0)&&o.response!==null){let s=o.response;if(e.type==="json")try{s=JSON.parse(o.response)}catch(l){a(l);return}t({data:s,cacheControl:o.getResponseHeader("Cache-Control"),expires:o.getResponseHeader("Expires"),etag:o.getResponseHeader("ETag")})}else{let s=new Blob([o.response],{type:o.getResponseHeader("Content-Type")});a(new M1(o.status,o.statusText,e.url,s))}},r.signal.addEventListener("abort",()=>{o.abort(),a(new T1(r.signal.reason))}),o.send(e.body)})}function HI(e){if(!e||e.startsWith("data:image/"))return!0;if(e.startsWith("blob:")&&(e=e.slice(5),e.startsWith("null")))return!1;if(e.indexOf("://")<=0)return!0;let r=new URL(e),t=window.location;return r.protocol===t.protocol&&r.host===t.host}function WI(e,r,t){var a;(a=t[e])!=null&&a.includes(r)||(t[e]||(t[e]=[]),t[e].push(r))}function YM(e,r,t){if(t?.[e]){let a=t[e].indexOf(r);a!==-1&&t[e].splice(a,1)}}function Uc(e,r){return{kind:"array",itemType:e,N:r}}function dl(e){if(e.kind==="array"){let r=dl(e.itemType);return typeof e.N=="number"?`array<${r}, ${e.N}>`:e.itemType.kind==="value"?"array":`array<${r}>`}return e.kind}function Hy(e,r){if(r.kind==="error")return null;if(e.kind==="array"){if(r.kind==="array"&&(r.N===0&&r.itemType.kind==="value"||!Hy(e.itemType,r.itemType))&&(typeof e.N!="number"||e.N===r.N))return null}else{if(e.kind===r.kind)return null;if(e.kind==="value"){for(let t of Yz)if(!Hy(t,r))return null}}return`Expected ${dl(e)} but found ${dl(r)} instead.`}function XM(e,r){return r.some(t=>t.kind===e.kind)}function Hv(e,r){return r.some(t=>t==="null"?e===null:t==="array"?Array.isArray(e):t==="object"?e&&!Array.isArray(e)&&typeof e=="object":t===typeof e)}function k0(e,r){return e.kind==="array"&&r.kind==="array"?e.itemType.kind===r.itemType.kind&&typeof e.N=="number":e.kind===r.kind}function $I(e){return e%=360,e<0&&(e+=360),e}function YI([e,r,t,a]){e=ZM(e),r=ZM(r),t=ZM(t);let i,o,s=KM((.2225045*e+.7168786*r+.0606169*t)/1);e===r&&r===t?i=o=s:(i=KM((.4360747*e+.3850649*r+.1430804*t)/dS),o=KM((.0139322*e+.0971045*r+.7141733*t)/pS));let l=116*s-16;return[l<0?0:l,500*(i-s),200*(s-o),a]}function ZM(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function KM(e){return e>.008856451679035631?e**.3333333333333333:e/mS+vS}function XI([e,r,t,a]){let i=(e+16)/116,o=isNaN(r)?i:i+r/500,s=isNaN(t)?i:i-t/200;return i=1*QM(i),o=dS*QM(o),s=pS*QM(s),[JM(3.1338561*o-1.6168667*i-.4906146*s),JM(-.9787684*o+1.9161415*i+.033454*s),JM(.0719453*o-.2289914*i+1.4052427*s),a]}function JM(e){return e=e<=.00304?12.92*e:1.055*e**.4166666666666667-.055,e<0?0:e>1?1:e}function QM(e){return e>Z2?e*e*e:mS*(e-vS)}function Yce(e){let[r,t,a,i]=YI(e),o=Math.sqrt(t*t+a*a);return[Math.round(o*1e4)?$I(Math.atan2(a,t)*Zz):NaN,o,r,i]}function Xce([e,r,t,a]){return e=isNaN(e)?0:e*Xz,XI([t,Math.cos(e)*r,Math.sin(e)*r,a])}function Zce([e,r,t,a]){e=$I(e),r/=100,t/=100;function i(o){let s=(o+e/30)%12,l=r*Math.min(t,1-t);return t-l*Math.max(-1,Math.min(s-3,9-s,1))}return[i(0),i(8),i(4),a]}function Wy(e,r){return Kz(e,r)?e[r]:void 0}function Kce(e){if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let r=Wy(Jz,e);if(r){let[a,i,o]=r;return[a/255,i/255,o/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let a=e.length<6?1:2,i=1;return[t2(e.slice(i,i+=a)),t2(e.slice(i,i+=a)),t2(e.slice(i,i+=a)),t2(e.slice(i,i+a)||"ff")]}if(e.startsWith("rgb")){let a=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(a){let[i,o,s,l,n,u,c,f,h,d,p,g]=a,m=[l||" ",c||" ",d].join("");if(m===" "||m===" /"||m===",,"||m===",,,"){let y=[s,u,h].join(""),_=y==="%%%"?100:y===""?255:0;if(_){let v=[o1(+o/_,0,1),o1(+n/_,0,1),o1(+f/_,0,1),p?ZI(+p,g):1];if(KI(v))return v}}return}}let t=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[a,i,o,s,l,n,u,c,f]=t,h=[o||" ",l||" ",u].join("");if(h===" "||h===" /"||h===",,"||h===",,,"){let d=[+i,o1(+s,0,100),o1(+n,0,100),c?ZI(+c,f):1];if(KI(d))return Zce(d)}}}function t2(e){return parseInt(e.padEnd(2,e),16)/255}function ZI(e,r){return o1(r?e/100:e,0,1)}function o1(e,r,t){return Math.min(Math.max(r,e),t)}function KI(e){return!e.some(Number.isNaN)}function C0(e,r,t){return e+t*(r-e)}function s1(e,r,t){return e.map((a,i)=>C0(a,r[i],t))}function Jce(e){return e==="rgb"||e==="hcl"||e==="lab"}function JI(e,r,t,a){return typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255&&typeof t=="number"&&t>=0&&t<=255?a===void 0||typeof a=="number"&&a>=0&&a<=1?null:`Invalid rgba value [${[e,r,t,a].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof a=="number"?[e,r,t,a]:[e,r,t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function l1(e){if(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||e instanceof Zp||e instanceof Hn||e instanceof J2||e instanceof dp||e instanceof Bd||e instanceof Od||e instanceof ph||e instanceof Nd||e instanceof jd)return!0;if(Array.isArray(e)){for(let r of e)if(!l1(r))return!1;return!0}if(typeof e=="object"){for(let r in e)if(!l1(e[r]))return!1;return!0}return!1}function Il(e){if(e===null)return E1;if(typeof e=="string")return Zn;if(typeof e=="boolean")return mo;if(typeof e=="number")return mi;if(e instanceof Hn)return Hh;if(e instanceof Zp)return b_;if(e instanceof J2)return w_;if(e instanceof dp)return S1;if(e instanceof Bd)return A_;if(e instanceof Od)return T_;if(e instanceof ph)return k1;if(e instanceof Nd)return M_;if(e instanceof jd)return C1;if(Array.isArray(e)){let r=e.length,t;for(let a of e){let i=Il(a);if(!t)t=i;else{if(t===i)continue;t=eo;break}}return Uc(t||eo,r)}return I0}function $y(e){let r=typeof e;return e===null?"":r==="string"||r==="number"||r==="boolean"?String(e):e instanceof Hn||e instanceof Zp||e instanceof dp||e instanceof Bd||e instanceof Od||e instanceof ph||e instanceof Nd||e instanceof jd?e.toString():JSON.stringify(e)}function r2(e,r,t){let a=e.length-1,i=0,o=a,s=0,l,n;for(;i<=o;)if(s=Math.floor((i+o)/2),l=e[s],n=e[s+1],l<=r){if(s===a||rr)o=s-1;else throw new Ys("Input is not a number.",t);return 0}function Qce(e,r,t,a){let i=3*e,o=3*(t-e)-i,s=1-i-o,l=3*r,n=3*(a-r)-l,u=1-l-n;return function(c,f=1e-6){if(c<=0)return 0;if(c>=1)return 1;let h=c;for(let g=0;g<8;g++){let m=((s*h+o)*h+i)*h-c;if(Math.abs(m)m?d=h:p=h,h=(d+p)*.5}return((u*h+n)*h+l)*h}}function eE(e,r,t,a){let i=a-t,o=e-t;return i===0?0:r===1?o/i:(r**+o-1)/(r**+i-1)}function QI(e,r,t=0,a=e.length-1,i=efe){for(;a>t;){if(a-t>600){let n=a-t+1,u=r-t+1,c=Math.log(n),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(n-f)/n)*(u-n/2<0?-1:1);QI(e,r,Math.max(t,Math.floor(r-u*f/n+h)),Math.min(a,Math.floor(r+(n-u)*f/n+h)),i)}let o=e[r],s=t,l=a;for(Yy(e,t,r),i(e[a],o)>0&&Yy(e,t,a);s0;)l--}i(e[t],o)===0?Yy(e,t,l):(l++,Yy(e,l,a)),l<=r&&(t=l+1),r<=l&&(a=l-1)}}function Yy(e,r,t){let a=e[r];e[r]=e[t],e[t]=a}function efe(e,r){return er)}function a2(e,r){if(e.length<=1)return[e];let t=[],a,i;for(let o of e){let s=rfe(o);s!==0&&(o.area=Math.abs(s),i===void 0&&(i=s<0),i===s<0?(a&&t.push(a),a=[o]):a.push(o))}if(a&&t.push(a),r>1)for(let o=0;ot}function sfe(e,r,t){return r<=t}function lfe(e,r,t){return r>=t}function tR(e,r,t,a){return a.compare(r,t)===0}function ufe(e,r,t,a){return!tR(e,r,t,a)}function cfe(e,r,t,a){return a.compare(r,t)<0}function ffe(e,r,t,a){return a.compare(r,t)>0}function hfe(e,r,t,a){return a.compare(r,t)<=0}function dfe(e,r,t,a){return a.compare(r,t)>=0}function u1(e,r,t){let a=e!=="=="&&e!=="!=";return class YJ{constructor(o,s,l,n){this.lhs=o,this.rhs=s,this.key=l,this.collator=n,this.type=mo,this.hasUntypedArgument=o.type.kind==="value"||s.type.kind==="value"}static parse(o,s){if(o.length!==3&&o.length!==4)return s.error("Expected two or three arguments.");let l=o[0],n=s.parse(o[1],1,eo);if(!n)return null;if(!eR(l,n.type))return s.concat(1).error(`"${l}" comparisons are not supported for type '${dl(n.type)}'.`);let u=s.parse(o[2],2,eo);if(!u)return null;if(!eR(l,u.type))return s.concat(2).error(`"${l}" comparisons are not supported for type '${dl(u.type)}'.`);if(n.type.kind!==u.type.kind&&n.type.kind!=="value"&&u.type.kind!=="value")return s.error(`Cannot compare types '${dl(n.type)}' and '${dl(u.type)}'.`);a&&(n.type.kind==="value"&&u.type.kind!=="value"?n=new pp(u.type,[n],s.key):n.type.kind!=="value"&&u.type.kind==="value"&&(u=new pp(n.type,[u],s.key)));let c=null;if(o.length===4){if(n.type.kind!=="string"&&u.type.kind!=="string"&&n.type.kind!=="value"&&u.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(c=s.parse(o[3],3,w_),!c)return null}return new YJ(n,u,s.key,c)}evaluate(o){let s=this.lhs.evaluate(o),l=this.rhs.evaluate(o);if(a&&this.hasUntypedArgument){let n=Il(s),u=Il(l);if(n.kind!==u.kind||n.kind!=="string"&&n.kind!=="number")throw new Ys(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${n.kind}, ${u.kind}) instead.`,this.key)}if(this.collator&&!a&&this.hasUntypedArgument){let n=Il(s),u=Il(l);if(n.kind!=="string"||u.kind!=="string")return r(o,s,l)}return this.collator?t(o,s,l,this.collator.evaluate(o)):r(o,s,l)}eachChild(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)}outputDefined(){return!0}}}function pfe(e,r){let t=vfe(e[0]),a=gfe(e[1]),i=2**r.z;return[Math.round(t*i*Ud),Math.round(a*i*Ud)]}function tE(e,r){let t=2**r.z,a=(e[0]/Ud+r.x)/t,i=(e[1]/Ud+r.y)/t;return[mfe(a),yfe(i)]}function vfe(e){return(180+e)/360}function mfe(e){return e*360-180}function gfe(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function yfe(e){return 360/Math.PI*Math.atan(Math.exp((180-e*360)*Math.PI/180))-90}function Xy(e,r){e[0]=Math.min(e[0],r[0]),e[1]=Math.min(e[1],r[1]),e[2]=Math.max(e[2],r[0]),e[3]=Math.max(e[3],r[1])}function Zy(e,r){return!(e[0]<=r[0]||e[2]>=r[2]||e[1]<=r[1]||e[3]>=r[3])}function _fe(e,r,t){return r[1]>e[1]!=t[1]>e[1]&&e[0]<(t[0]-r[0])*(e[1]-r[1])/(t[1]-r[1])+r[0]}function xfe(e,r,t){let a=e[0]-r[0],i=e[1]-r[1],o=e[0]-t[0],s=e[1]-t[1];return a*s-o*i===0&&a*o<=0&&i*s<=0}function i2(e,r,t,a){let i=[r[0]-e[0],r[1]-e[1]];return Tfe([a[0]-t[0],a[1]-t[1]],i)!==0&&!!(aR(e,r,t,a)&&aR(t,a,e,r))}function bfe(e,r,t){for(let a of t)for(let i=0;i0&&f<0||c<0&&f>0}function rE(e,r,t){let a=[];for(let i=0;it[2]){let i=a*.5,o=e[0]-t[0]>i?-a:t[0]-e[0]>i?a:0;o===0&&(o=e[0]-t[2]>i?-a:t[2]-e[0]>i?a:0),e[0]+=o}Xy(r,e)}function Mfe(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function oR(e,r,t,a){let i=2**a.z*Ud,o=[a.x*Ud,a.y*Ud],s=[];for(let l of e)for(let n of l){let u=[n.x+o[0],n.y+o[1]];nR(u,r,t,i),s.push(u)}return s}function sR(e,r,t,a){let i=2**a.z*Ud,o=[a.x*Ud,a.y*Ud],s=[];for(let l of e){let n=[];for(let u of l){let c=[u.x+o[0],u.y+o[1]];Xy(r,c),n.push(c)}s.push(n)}if(r[2]-r[0]<=i/2){Mfe(r);for(let l of s)for(let n of l)nR(n,r,t,i)}return s}function Efe(e,r){let t=[1/0,1/0,-1/0,-1/0],a=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if(r.type==="Polygon"){let o=rE(r.coordinates,a,i),s=oR(e.geometry(),t,a,i);if(!Zy(t,a))return!1;for(let l of s)if(!c1(l,o))return!1}if(r.type==="MultiPolygon"){let o=iR(r.coordinates,a,i),s=oR(e.geometry(),t,a,i);if(!Zy(t,a))return!1;for(let l of s)if(!wfe(l,o))return!1}return!0}function Sfe(e,r){let t=[1/0,1/0,-1/0,-1/0],a=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if(r.type==="Polygon"){let o=rE(r.coordinates,a,i),s=sR(e.geometry(),t,a,i);if(!Zy(t,a))return!1;for(let l of s)if(!rR(l,o))return!1}if(r.type==="MultiPolygon"){let o=iR(r.coordinates,a,i),s=sR(e.geometry(),t,a,i);if(!Zy(t,a))return!1;for(let l of s)if(!Afe(l,o))return!1}return!0}function lR(e,r){return r[0]-e[0]}function n2(e){return e[1]-e[0]+1}function Xp(e,r){return e[1]>=e[0]&&e[1]e[1])return[null,null];let t=n2(e);if(r){if(t===2)return[e,null];let i=Math.floor(t/2);return[[e[0],e[0]+i],[e[0]+i,e[1]]]}if(t===1)return[e,null];let a=Math.floor(t/2)-1;return[[e[0],e[0]+a],[e[0]+a+1,e[1]]]}function iE(e,r){if(!Xp(r,e.length))return[1/0,1/0,-1/0,-1/0];let t=[1/0,1/0,-1/0,-1/0];for(let a=r[0];a<=r[1];++a)Xy(t,e[a]);return t}function nE(e){let r=[1/0,1/0,-1/0,-1/0];for(let t of e)for(let a of t)Xy(r,a);return r}function uR(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function oE(e,r,t){if(!uR(e)||!uR(r))return NaN;let a=0,i=0;return e[2]r[2]&&(a=e[0]-r[2]),e[1]>r[3]&&(i=e[1]-r[3]),e[3]=a)return a;if(Zy(i,o)){if(cR(e,r))return 0}else if(cR(r,e))return 0;let s=1/0;for(let l of e)for(let n=0,u=l.length,c=u-1;n0;){let n=s.pop();if(n[0]>=o)continue;let u=n[1],c=r?50:100;if(n2(u)<=c){if(!Xp(u,e.length))return NaN;if(r){let f=Lfe(e,u,t,a);if(isNaN(f)||f===0)return f;o=Math.min(o,f)}else for(let f=u[0];f<=u[1];++f){let h=Dfe(e[f],t,a);if(o=Math.min(o,h),o===0)return 0}}else{let f=aE(u,r);fR(s,o,a,e,l,f[0]),fR(s,o,a,e,l,f[1])}}return o}function l2(e,r,t,a,i,o=1/0){let s=Math.min(o,i.distance(e[0],t[0]));if(s===0)return s;let l=new TS([[0,[0,e.length-1],[0,t.length-1]]],lR);for(;l.length>0;){let n=l.pop();if(n[0]>=s)continue;let u=n[1],c=n[2],f=r?50:100,h=a?50:100;if(n2(u)<=f&&n2(c)<=h){if(!Xp(u,e.length)&&Xp(c,t.length))return NaN;let d;if(r&&a)d=kfe(e,u,t,c,i),s=Math.min(s,d);else if(r&&!a){let p=e.slice(u[0],u[1]+1);for(let g=c[0];g<=c[1];++g)if(d=Wv(t[g],p,i),s=Math.min(s,d),s===0)return s}else if(!r&&a){let p=t.slice(c[0],c[1]+1);for(let g=u[0];g<=u[1];++g)if(d=Wv(e[g],p,i),s=Math.min(s,d),s===0)return s}else d=Cfe(e,u,t,c,i),s=Math.min(s,d)}else{let d=aE(u,r),p=aE(c,a);o2(l,s,i,e,t,d[0],p[0]),o2(l,s,i,e,t,d[0],p[1]),o2(l,s,i,e,t,d[1],p[0]),o2(l,s,i,e,t,d[1],p[1])}}return s}function Pfe(e,r){let t=e.geometry(),a=t.flat().map(s=>tE([s.x,s.y],e.canonical));if(t.length===0)return NaN;let i=new tw(a[0][1]),o=1/0;for(let s of r){switch(s.type){case"Point":o=Math.min(o,l2(a,!1,[s.coordinates],!1,i,o));break;case"LineString":o=Math.min(o,l2(a,!1,s.coordinates,!0,i,o));break;case"Polygon":o=Math.min(o,s2(a,!1,s.coordinates,i,o))}if(o===0)return o}return o}function Ife(e,r){let t=e.geometry(),a=t.flat().map(s=>tE([s.x,s.y],e.canonical));if(t.length===0)return NaN;let i=new tw(a[0][1]),o=1/0;for(let s of r){switch(s.type){case"Point":o=Math.min(o,l2(a,!0,[s.coordinates],!1,i,o));break;case"LineString":o=Math.min(o,l2(a,!0,s.coordinates,!0,i,o));break;case"Polygon":o=Math.min(o,s2(a,!0,s.coordinates,i,o))}if(o===0)return o}return o}function Rfe(e,r){let t=e.geometry();if(t.length===0||t[0].length===0)return NaN;let a=a2(t,0).map(s=>s.map(l=>l.map(n=>tE([n.x,n.y],e.canonical)))),i=new tw(a[0][0][0][1]),o=1/0;for(let s of r)for(let l of a){switch(s.type){case"Point":o=Math.min(o,s2([s.coordinates],!1,l,i,o));break;case"LineString":o=Math.min(o,s2(s.coordinates,!0,l,i,o));break;case"Polygon":o=Math.min(o,Ffe(l,s.coordinates,i,o))}if(o===0)return o}return o}function lE(e){return e.type==="MultiPolygon"?e.coordinates.map(r=>({type:"Polygon",coordinates:r})):e.type==="MultiLineString"?e.coordinates.map(r=>({type:"LineString",coordinates:r})):e.type==="MultiPoint"?e.coordinates.map(r=>({type:"Point",coordinates:r})):[e]}function hR(e,[r,t,a,i],o){r=r.evaluate(e),t=t.evaluate(e),a=a.evaluate(e);let s=i?i.evaluate(e):1,l=JI(r,t,a,s);if(l)throw new Ys(l,o);return new Hn(r/255,t/255,a/255,s,!1)}function dR(e,r){return e in r&&r[e]!==void 0}function uE(e,r){let t=r[e];return t===void 0?null:t}function zfe(e,r,t,a){for(;t<=a;){let i=t+a>>1;if(r[i]===e)return!0;r[i]>e?a=i-1:t=i+1}return!1}function $v(e){return{type:e}}function Bfe(e){return Array.isArray(e)?`(${e.map(dl).join(", ")})`:`(${dl(e.type)}...)`}function u2(e){if(e instanceof bS)return u2(e.boundExpression);if(e instanceof R0&&e.name==="error"||e instanceof AS||e instanceof ew||e instanceof rw||e instanceof aw)return!1;let r=e instanceof am||e instanceof pp,t=!0;return e.eachChild(a=>{t&&(t=r?u2(a):a instanceof rm)}),t?c2(e)&&f2(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function c2(e){if(e instanceof R0&&(e.name==="get"&&e.args.length===1||e.name==="feature-state"||e.name==="has"&&e.args.length===1||e.name==="properties"||e.name==="geometry-type"||e.name==="id"||/^filter-/.test(e.name))||e instanceof ew||e instanceof rw)return!1;let r=!0;return e.eachChild(t=>{r&&!c2(t)&&(r=!1)}),r}function Ky(e){if(e instanceof R0&&e.name==="feature-state")return!1;let r=!0;return e.eachChild(t=>{r&&!Ky(t)&&(r=!1)}),r}function f2(e,r){if(e instanceof R0&&r.indexOf(e.name)>=0)return!1;let t=!0;return e.eachChild(a=>{t&&!f2(a,r)&&(t=!1)}),t}function f1(e){return e["property-type"]==="data-driven"||e["property-type"]==="cross-faded-data-driven"}function pR(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function cE(e){return!!e.expression&&e.expression.interpolated}function Jy(e,...r){for(let t of r)for(let a in t)e[a]=t[a];return e}function fo(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":e===null?"null":typeof e}function h2(e){return typeof e=="object"&&!!e&&!Array.isArray(e)&&Il(e)===I0}function Ofe(e){return e}function Nfe(e){switch(e.type){case"color":return Hn.parse;case"padding":return Bd.parse;case"numberArray":return Od.parse;case"colorArray":return ph.parse;default:return null}}function jfe(e){switch(e){case"exponential":return mR;case"interval":return qfe;case"categorical":return Ufe;case"identity":return Vfe;default:throw Error(`Unknown function type "${e}"`)}}function vR(e,r){let t=e.stops&&typeof e.stops[0][0]=="object",a=t||e.property!==void 0,i=t||!a,o=e.type||(cE(r)?"exponential":"interval"),s=Nfe(r);if(s&&(e=Jy({},e),e.stops&&(e.stops=e.stops.map(c=>[c[0],s(c[1])])),e.default?e.default=s(e.default):e.default=s(r.default)),e.colorSpace&&!Jce(e.colorSpace))throw Error(`Unknown color space: "${e.colorSpace}"`);let l=jfe(o),n,u;if(o==="categorical"){n=Object.create(null);for(let c of e.stops)n[c[0]]=c[1];u=typeof e.stops[0][0]}if(t){let c={},f=[];for(let p=0;pp[0]),evaluate({zoom:p},g){return mR({stops:h,base:e.base},r,p).evaluate(p,g)}}}if(i){let c=o==="exponential"?{name:"exponential",base:e.base===void 0?1:e.base}:null;return{kind:"camera",interpolationType:c,interpolationFactor:vh.interpolationFactor.bind(void 0,c),zoomStops:e.stops.map(f=>f[0]),evaluate:({zoom:f})=>l(e,r,f,n,u)}}return{kind:"source",evaluate(c,f){let h=f&&f.properties?f.properties[e.property]:void 0;return h===void 0?Qy(e.default,r.default):l(e,r,h,n,u)}}}function Qy(e,r,t){if(e!==void 0)return e;if(r!==void 0)return r;if(t!==void 0)return t}function Ufe(e,r,t,a,i){return Qy(typeof t===i?a[t]:void 0,e.default,r.default)}function qfe(e,r,t){if(fo(t)!=="number")return Qy(e.default,r.default);let a=e.stops.length;if(a===1||t<=e.stops[0][0])return e.stops[0][1];if(t>=e.stops[a-1][0])return e.stops[a-1][1];let i=r2(e.stops.map(o=>o[0]),t,"");return e.stops[i][1]}function mR(e,r,t){let a=e.base===void 0?1:e.base;if(fo(t)!=="number")return Qy(e.default,r.default);let i=e.stops.length;if(i===1||t<=e.stops[0][0])return e.stops[0][1];if(t>=e.stops[i-1][0])return e.stops[i-1][1];let o=r2(e.stops.map(c=>c[0]),t,""),s=Gfe(t,a,e.stops[o][0],e.stops[o+1][0]),l=e.stops[o][1],n=e.stops[o+1][1],u=Xs[r.type]||Ofe;return typeof l.evaluate=="function"?{evaluate(...c){let f=l.evaluate.apply(void 0,c),h=n.evaluate.apply(void 0,c);if(f!==void 0&&h!==void 0)return u(f,h,s,e.colorSpace)}}:u(l,n,s,e.colorSpace)}function Vfe(e,r,t){switch(r.type){case"color":t=Hn.parse(t);break;case"formatted":t=dp.fromString(t.toString());break;case"resolvedImage":t=jd.fromString(t.toString());break;case"padding":t=Bd.parse(t);break;case"colorArray":t=ph.parse(t);break;case"numberArray":t=Od.parse(t);break;default:fo(t)!==r.type&&(r.type!=="enum"||!r.values[t])&&(t=void 0)}return Qy(t,e.default,r.default)}function Gfe(e,r,t,a){let i=a-t,o=e-t;return i===0?0:r===1?o/i:(r**+o-1)/(r**+i-1)}function fE(e){return{result:"success",value:e}}function h1(e){return{result:"error",value:e}}function gR(e,r,t,a){return`${e}${r}: ${t}${a==null?"":` Falling back to ${String(a)}.`}`}function yR(e){if(!e)throw Error('rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".')}function d2(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="string"&&e[0]in im}function p2(e,r,t,a){yR(r);let i=new ES(im,u2,[],t?$fe(t):void 0),o=i.parse(e,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?fE(new nw(o,r,t,a)):h1(i.errors)}function Hfe(e){return e._styleExpression!==void 0}function _R(e,r,t,a){let i=p2(e,r,t,a);if(i.result==="error")return i;let o=i.value.expression,s=c2(o);if(!s&&!f1(t))return h1([new qd("","data expressions not supported")]);let l=f2(o,["zoom"]);if(!l&&!pR(t))return h1([new qd("","zoom expressions not supported")]);let n=v2(o);if(!n&&!l)return h1([new qd("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(n instanceof qd)return h1([n]);if(n instanceof vh&&!cE(t))return h1([new qd("",'"interpolate" expressions cannot be used with this property')]);if(!n)return fE(s?new D1("constant",i.value,a):new D1("source",i.value,a));let u=n instanceof vh?n.interpolation:void 0;return fE(s?new S_("camera",i.value,n.labels,u,a):new S_("composite",i.value,n.labels,u,a))}function Wfe(e,r,t,a){if(h2(e))return new SS(e,r,t);if(d2(e)){let i=_R(e,r,t,a);if(i.result==="error")throw Error(i.value.map(o=>`${o.key}: ${o.message}`).join(", "));return i.value}{let i=e;return t.type==="color"&&typeof e=="string"?i=Hn.parse(e):t.type==="padding"&&(typeof e=="number"||Array.isArray(e))?i=Bd.parse(e):t.type==="numberArray"&&(typeof e=="number"||Array.isArray(e))?i=Od.parse(e):t.type==="colorArray"&&(typeof e=="string"||Array.isArray(e))?i=ph.parse(e):t.type==="variableAnchorOffsetCollection"&&Array.isArray(e)?i=Nd.parse(e):t.type==="projectionDefinition"&&typeof e=="string"&&(i=Zp.parse(e)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>i}}}function v2(e){let r=null;if(e instanceof xS)r=v2(e.result);else if(e instanceof wS){for(let t of e.args)if(r=v2(t),r)break}else(e instanceof Q2||e instanceof vh)&&e.input instanceof R0&&e.input.name==="zoom"&&(r=e);return r instanceof qd||e.eachChild(t=>{let a=v2(t);a instanceof qd?r=a:!r&&a?r=new qd("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&a&&r!==a&&(r=new qd("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}function e_(e,r=new Set){return e instanceof aw&&r.add(e.key),e.eachChild(t=>{e_(t,r)}),r}function $fe(e){let r={color:Hh,string:Zn,number:mi,enum:Zn,boolean:mo,formatted:S1,padding:A_,numberArray:T_,colorArray:k1,projectionDefinition:b_,resolvedImage:C1,variableAnchorOffsetCollection:M_};return e.type==="array"?Uc(r[e.value]||eo,e.length):r[e.type]}function xR(e){if(e.type==="color"&&h2(e.default))return new Hn(0,0,0,0);switch(e.type){case"color":return Hn.parse(e.default)||null;case"padding":return Bd.parse(e.default)||null;case"numberArray":return Od.parse(e.default)||null;case"colorArray":return ph.parse(e.default)||null;case"variableAnchorOffsetCollection":return Nd.parse(e.default)||null;case"projectionDefinition":return Zp.parse(e.default)||null;default:return e.default===void 0?null:e.default}}function d1(e,r){let{zoom:t,heatmapDensity:a,elevation:i,lineProgress:o,isSupportedScript:s,accumulated:l}=e??{};return{zoom:t,heatmapDensity:a,elevation:i,lineProgress:o,isSupportedScript:s,accumulated:l,globalState:r}}function Yfe(e){let r=!1;for(let t of e){let a=bR(t);if(a==="expression")return"expression";a==="legacy"&&(r=!0)}return r?"legacy":"neutral"}function bR(e){if(typeof e=="boolean")return"neutral";if(!Array.isArray(e)||e.length===0)return"legacy";switch(e[0]){case"has":return e.length<2||e[1]==="$id"||e[1]==="$type"?"legacy":e.length===2?"neutral":"expression";case"in":return e.length>=3&&(typeof e[1]!="string"||Array.isArray(e[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return e.length!==3||Array.isArray(e[1])||Array.isArray(e[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return Yfe(e.slice(1));default:return"expression"}}function hE(e){return bR(e)!=="legacy"}function wR(e){return e==="$type"?["geometry-type"]:e==="$id"?["id"]:["get",e]}function Xfe(e){switch(e[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return e.length!==3||typeof e[1]!="string"?null:[e[0],wR(e[1]),e[2]];case"in":case"!in":{if(e.length<2||typeof e[1]!="string")return null;let r=["in",wR(e[1]),["literal",e.slice(2)]];return e[0]==="!in"?["!",r]:r}case"has":case"!has":{if(e.length!==2||typeof e[1]!="string"||e[1]==="$type"||e[1]==="$id")return null;let r=["has",e[1]];return e[0]==="!has"?["!",r]:r}default:return null}}function AR(e){if((e[0]==="<"||e[0]==="<="||e[0]===">"||e[0]===">=")&&e[1]==="$type")return`"$type" cannot be use with operator "${e[0]}"`;let r=Xfe(e);return r?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(e)} with ${JSON.stringify(r)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(e)} to expression syntax.`}function dE(e,r,t){let a=t[e];return Array.isArray(a)?hE(a)?pE(a,r.concat(e)):{path:r.concat(e),legacyFilter:a}:null}function pE(e,r=[]){if(!Array.isArray(e)||e.length<1)return null;switch(e[0]){case"all":case"any":case"none":for(let t=1;t"u")return;let a=t.path.map(i=>`[${i}]`).join("");console.warn(`${r}${a}: ${AR(t.legacyFilter)}`)}function t_(e,r,t){if(e==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};hE(e)?Zfe(e,r):e=m2(e);let a=p2(e,r,_B,t);if(a.result==="error")throw Error(a.value.map(i=>`${i.key}: ${i.message}`).join(", "));return{filter:(i,o,s)=>a.value.evaluate(i,o,{},s),needGeometry:TR(e),getGlobalStateRefs:()=>e_(a.value.expression)}}function Kfe(e,r){return er)}function TR(e){if(!Array.isArray(e))return!1;if(e[0]==="within"||e[0]==="distance")return!0;for(let r=1;r"||r==="<="||r===">="?vE(e[1],e[2],r):r==="any"?Jfe(e.slice(1)):r==="all"?["all"].concat(e.slice(1).map(m2)):r==="none"?["all"].concat(e.slice(1).map(m2).map(g2)):r==="in"?MR(e[1],e.slice(2)):r==="!in"?g2(MR(e[1],e.slice(2))):r==="has"?ER(e[1]):r!=="!has"||g2(ER(e[1]))}function vE(e,r,t){switch(e){case"$type":return[`filter-type-${t}`,r];case"$id":return[`filter-id-${t}`,r];default:return[`filter-${t}`,e,r]}}function Jfe(e){return["any"].concat(e.map(m2))}function MR(e,r){if(r.length===0)return!1;switch(e){case"$type":return["filter-type-in",["literal",r]];case"$id":return["filter-id-in",["literal",r]];default:return r.length>200&&!r.some(t=>typeof t!=typeof r[0])?["filter-in-large",e,["literal",r.sort(Kfe)]]:["filter-in-small",e,["literal",r]]}}function ER(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function g2(e){return["!",e]}function SR(e){let r=e.key,t=e.value;return t?[new qa(r,t,"constants have been deprecated as of v8")]:[]}function Rl(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function Yv(e){if(Array.isArray(e))return e.map(Yv);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let r={};for(let t in e)r[t]=Yv(e[t]);return r}return Rl(e)}function hh(e){let r=e.key,t=e.value,a=e.valueSpec||{},i=e.objectElementValidators||{},o=e.style,s=e.styleSpec,l=e.validateSpec,n=[],u=fo(t);if(u!=="object")return[new qa(r,t,`object expected, ${u} found`)];for(let c in t){let f=c.split(".")[0],h=Wy(a,f)||a["*"],d;if(Wy(i,f))d=i[f];else if(Wy(a,f)){if(t[c]===void 0)continue;d=l}else if(i["*"])d=i["*"];else if(a["*"])d=l;else{n.push(new qa(r,t[c],`unknown property "${c}"`));continue}n=n.concat(d({key:(r&&`${r}.`)+c,value:t[c],valueSpec:h,style:o,styleSpec:s,object:t,objectKey:c,validateSpec:l},t))}for(let c in a)i[c]||a[c].required&&a[c].default===void 0&&t[c]===void 0&&n.push(new qa(r,t,`missing required property "${c}"`));return n}function mE(e){let r=e.value,t=e.valueSpec,a=e.validateSpec,i=e.style,o=e.styleSpec,s=e.key,l=e.arrayElementValidator||a;if(fo(r)!=="array")return[new qa(s,r,`array expected, ${fo(r)} found`)];if(t.length&&r.length!==t.length)return[new qa(s,r,`array length ${t.length} expected, length ${r.length} found`)];let n={type:t.value,values:t.values};o.$version<7&&(n.function=t.function),fo(t.value)==="object"&&(n=t.value);let u=[];for(let c=0;ca.maximum?[new qa(r,t,`${t} is greater than the maximum value ${a.maximum}`)]:[]:[new qa(r,t,`number expected, ${i} found`)]}function kR(e){let r=e.valueSpec,t=Rl(e.value.type),a,i={},o,s,l=t!=="categorical"&&e.value.property===void 0,n=!l,u=fo(e.value.stops)==="array"&&fo(e.value.stops[0])==="array"&&fo(e.value.stops[0][0])==="object",c=hh({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:f,default:p}});return t==="identity"&&l&&c.push(new qa(e.key,e.value,'missing required property "property"')),t!=="identity"&&!e.value.stops&&c.push(new qa(e.key,e.value,'missing required property "stops"')),t==="exponential"&&e.valueSpec.expression&&!cE(e.valueSpec)&&c.push(new qa(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(n&&!f1(e.valueSpec)?c.push(new qa(e.key,e.value,"property functions not supported")):l&&!pR(e.valueSpec)&&c.push(new qa(e.key,e.value,"zoom functions not supported"))),(t==="categorical"||u)&&e.value.property===void 0&&c.push(new qa(e.key,e.value,'"property" property is required')),c;function f(g){if(t==="identity")return[new qa(g.key,g.value,'identity function may not have a "stops" property')];let m=[],y=g.value;return m=m.concat(mE({key:g.key,value:y,valueSpec:g.valueSpec,validateSpec:g.validateSpec,style:g.style,styleSpec:g.styleSpec,arrayElementValidator:h})),fo(y)==="array"&&y.length===0&&m.push(new qa(g.key,y,"array must have at least one stop")),m}function h(g){let m=[],y=g.value,_=g.key;if(fo(y)!=="array")return[new qa(_,y,`array expected, ${fo(y)} found`)];if(y.length!==2)return[new qa(_,y,`array length 2 expected, length ${y.length} found`)];if(u){if(fo(y[0])!=="object")return[new qa(_,y,`object expected, ${fo(y[0])} found`)];if(y[0].zoom===void 0)return[new qa(_,y,"object stop key must have zoom")];if(y[0].value===void 0)return[new qa(_,y,"object stop key must have value")];if(s&&s>Rl(y[0].zoom))return[new qa(_,y[0].zoom,"stop zoom values must appear in ascending order")];Rl(y[0].zoom)!==s&&(s=Rl(y[0].zoom),o=void 0,i={}),m=m.concat(hh({key:`${_}[0]`,value:y[0],valueSpec:{zoom:{}},validateSpec:g.validateSpec,style:g.style,styleSpec:g.styleSpec,objectElementValidators:{zoom:y2,value:d}}))}else m=m.concat(d({key:`${_}[0]`,value:y[0],valueSpec:{},validateSpec:g.validateSpec,style:g.style,styleSpec:g.styleSpec},y));return d2(Yv(y[1]))?m.concat([new qa(`${_}[1]`,y[1],"expressions are not allowed in function stops.")]):m.concat(g.validateSpec({key:`${_}[1]`,value:y[1],valueSpec:r,validateSpec:g.validateSpec,style:g.style,styleSpec:g.styleSpec}))}function d(g,m){let y=fo(g.value),_=Rl(g.value),v=g.value===null?m:g.value;if(!a)a=y;else if(y!==a)return[new qa(g.key,v,`${y} stop domain type must match previous stop domain type ${a}`)];if(y!=="number"&&y!=="string"&&y!=="boolean")return[new qa(g.key,v,"stop domain value must be a number, string, or boolean")];if(y!=="number"&&t!=="categorical"){let x=`number expected, ${y} found`;return f1(r)&&t===void 0&&(x+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new qa(g.key,v,x)]}return t==="categorical"&&y==="number"&&(!isFinite(_)||Math.floor(_)!==_)?[new qa(g.key,v,`integer expected, found ${_}`)]:t!=="categorical"&&y==="number"&&o!==void 0&&_new qa(`${e.key}${a.key}`,e.value,a.message));let t=r.value.expression||r.value._styleExpression.expression;if(e.expressionContext==="property"&&e.propertyKey==="text-font"&&!t.outputDefined())return[new qa(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if(e.expressionContext==="property"&&e.propertyType==="layout"&&!Ky(t))return[new qa(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if(e.expressionContext==="filter"&&!Ky(t))return[new qa(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&e.expressionContext.indexOf("cluster")===0){if(!f2(t,["zoom","feature-state"]))return[new qa(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(e.expressionContext==="cluster-initial"&&!c2(t))return[new qa(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Qfe(e){let r=e.value,t=e.key,a=fo(r);return a==="boolean"?[]:[new qa(t,r,`boolean expected, ${a} found`)]}function gE(e){let r=e.key,t=e.value,a=fo(t);return a==="string"?Hn.parse(String(t))?[]:[new qa(r,t,`color expected, "${t}" found`)]:[new qa(r,t,`color expected, ${a} found`)]}function r_(e){let r=e.key,t=e.value,a=e.valueSpec,i=[];return Array.isArray(a.values)?a.values.indexOf(Rl(t))===-1&&i.push(new qa(r,t,`expected one of [${a.values.join(", ")}], ${JSON.stringify(t)} found`)):Object.keys(a.values).indexOf(Rl(t))===-1&&i.push(new qa(r,t,`expected one of [${Object.keys(a.values).join(", ")}], ${JSON.stringify(t)} found`)),i}function ehe(e,r){let t=e;for(let a of r)t=t[a];return t}function the(e,r){let t=pE(r);return t?[new qa(`${e.key}${t.path.map(a=>`[${a}]`).join("")}`,ehe(e.value,t.path),AR(t.legacyFilter),null,"warning")]:[]}function yE(e){let r=Yv(e.value);return hE(r)?[...the(e,r),...p1(Jy({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:CR(e)}function CR(e){let r=e.value,t=e.key;if(fo(r)!=="array")return[new qa(t,r,`array expected, ${fo(r)} found`)];let a=e.styleSpec,i,o=[];if(r.length<1)return[new qa(t,r,"filter array must have at least 1 element")];switch(o=o.concat(r_({key:`${t}[0]`,value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Rl(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&Rl(r[1])==="$type"&&o.push(new qa(t,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":r.length!==3&&o.push(new qa(t,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&(i=fo(r[1]),i!=="string"&&o.push(new qa(`${t}[1]`,r[1],`string expected, ${i} found`)));for(let s=2;s{f in i&&a.push(new qa(o,i[f],`"${f}" is prohibited for ref layers`))});let c;s.layers.forEach(f=>{Rl(f.id)===u&&(c=f)}),c?c.ref?a.push(new qa(o,i.ref,"ref cannot reference another ref layer")):n=Rl(c.type):a.push(new qa(o,i.ref,`ref layer "${u}" not found`))}else if(n!=="background")if(!i.source)a.push(new qa(o,i,'missing required property "source"'));else{let c=s.sources&&s.sources[i.source],f=c&&Rl(c.type);c?f==="vector"&&n==="raster"?a.push(new qa(o,i.source,`layer "${i.id}" requires a raster source`)):f!=="raster-dem"&&n==="hillshade"||f!=="raster-dem"&&n==="color-relief"?a.push(new qa(o,i.source,`layer "${i.id}" requires a raster-dem source`)):f==="raster"&&n!=="raster"?a.push(new qa(o,i.source,`layer "${i.id}" requires a vector source`)):f==="vector"&&!i["source-layer"]?a.push(new qa(o,i,`layer "${i.id}" must specify a "source-layer"`)):f==="raster-dem"&&n!=="hillshade"&&n!=="color-relief"?a.push(new qa(o,i.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):n==="line"&&i.paint&&i.paint["line-gradient"]&&(f!=="geojson"||!c.lineMetrics)&&a.push(new qa(o,i,`layer "${i.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):a.push(new qa(o,i.source,`source "${i.source}" not found`))}return n==="raster"&&((r=i.paint)!=null&&r.resampling)&&((t=i.paint)!=null&&t["raster-resampling"])&&a.push(new qa(o,i.paint,`layer "${i.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),a=a.concat(hh({key:o,value:i,valueSpec:l.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*"(){return[]},type(){return e.validateSpec({key:`${o}.type`,value:i.type,valueSpec:l.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:i,objectKey:"type"})},filter:yE,layout(c){return hh({layer:i,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(f){return FR(Jy({layerType:n},f))}}})},paint(c){return hh({layer:i,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(f){return LR(Jy({layerType:n},f))}}})}}})),a}function D0(e){let r=e.value,t=e.key,a=fo(r);return a==="string"?[]:[new qa(t,r,`string expected, ${a} found`)]}function rhe(e){var r;let t=(r=e.sourceName)!=null?r:"",a=e.value,i=e.styleSpec,o=i.source_raster_dem,s=e.style,l=[],n=fo(a);if(a===void 0)return l;if(n!=="object")return l.push(new qa("source_raster_dem",a,`object expected, ${n} found`)),l;let u=Rl(a.encoding)==="custom",c=["redFactor","greenFactor","blueFactor","baseShift"],f=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let h in a)!u&&c.includes(h)?l.push(new qa(h,a[h],`In "${t}": "${h}" is only valid when "encoding" is set to "custom". ${f} encoding found`)):o[h]?l=l.concat(e.validateSpec({key:h,value:a[h],valueSpec:o[h],validateSpec:e.validateSpec,style:s,styleSpec:i})):l.push(new qa(h,a[h],`unknown property "${h}"`));return l}function IR(e){let r=e.value,t=e.key,a=e.styleSpec,i=e.style,o=e.validateSpec;if(!r.type)return[new qa(t,r,'"type" is required')];let s=Rl(r.type),l;switch(s){case"vector":case"raster":return l=hh({key:t,value:r,valueSpec:a[`source_${s.replace("-","_")}`],style:e.style,styleSpec:a,objectElementValidators:kS,validateSpec:o}),l;case"raster-dem":return l=rhe({sourceName:t,value:r,style:e.style,styleSpec:a,validateSpec:o}),l;case"geojson":if(l=hh({key:t,value:r,valueSpec:a.source_geojson,style:i,styleSpec:a,validateSpec:o,objectElementValidators:kS}),r.cluster)for(let n in r.clusterProperties){let[u,c]=r.clusterProperties[n],f=typeof u=="string"?[u,["accumulated"],["get",n]]:u;l.push(...p1({key:`${t}.${n}.map`,value:c,validateSpec:o,expressionContext:"cluster-map"})),l.push(...p1({key:`${t}.${n}.reduce`,value:f,validateSpec:o,expressionContext:"cluster-reduce"}))}return l;case"video":return hh({key:t,value:r,valueSpec:a.source_video,style:i,validateSpec:o,styleSpec:a});case"image":return hh({key:t,value:r,valueSpec:a.source_image,style:i,validateSpec:o,styleSpec:a});case"canvas":return[new qa(t,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return r_({key:`${t}.type`,value:r.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:o,styleSpec:a})}}function ahe({key:e,value:r}){if(fo(r)==="string")return D0({key:e,value:r});{let t=[];for(let a in r)t.push(...D0({key:`${e}.${a}`,value:r[a]}));return t}}function RR(e){let r=e.value,t=e.styleSpec,a=t.light,i=e.style,o=[],s=fo(r);if(r===void 0)return o;if(s!=="object")return o=o.concat([new qa("light",r,`object expected, ${s} found`)]),o;for(let l in r){let n=l.match(iw);o=n&&a[n[1]]&&a[n[1]].transition?o.concat(e.validateSpec({key:l,value:r[l],valueSpec:t.transition,validateSpec:e.validateSpec,style:i,styleSpec:t})):a[l]?o.concat(e.validateSpec({key:l,value:r[l],valueSpec:a[l],validateSpec:e.validateSpec,style:i,styleSpec:t})):o.concat([new qa(l,r[l],`unknown property "${l}"`)])}return o}function zR(e){let r=e.value,t=e.styleSpec,a=t.sky,i=e.style,o=fo(r);if(r===void 0)return[];if(o!=="object")return[new qa("sky",r,`object expected, ${o} found`)];let s=[];for(let l in r){let n=l.match(iw);s=n&&a[n[1]]&&a[n[1]].transition?s.concat(e.validateSpec({key:l,value:r[l],valueSpec:t.transition,style:i,styleSpec:t})):a[l]?s.concat(e.validateSpec({key:l,value:r[l],valueSpec:a[l],style:i,styleSpec:t})):s.concat([new qa(l,r[l],`unknown property "${l}"`)])}return s}function BR(e){let r=e.value,t=e.styleSpec,a=t.terrain,i=e.style,o=[],s=fo(r);if(r===void 0)return o;if(s!=="object")return o=o.concat([new qa("terrain",r,`object expected, ${s} found`)]),o;for(let l in r)o=a[l]?o.concat(e.validateSpec({key:l,value:r[l],valueSpec:a[l],validateSpec:e.validateSpec,style:i,styleSpec:t})):o.concat([new qa(l,r[l],`unknown property "${l}"`)]);return o}function ihe(e){return D0(e).length===0?[]:p1(e)}function nhe(e){return D0(e).length===0?[]:p1(e)}function ohe(e){let r=e.key,t=e.value;if(fo(t)==="array"){if(t.length<1||t.length>4)return[new qa(r,t,`padding requires 1 to 4 values; ${t.length} values found`)];let a={type:"number"},i=[];for(let o=0;o[new qa(e,r,'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"')],i=t.match(xB);if(!i)return a();let[,o,s,l]=i;if(l!==void 0)return l.length>6?a():[];let n=parseInt(o,16),u=s===void 0?n:parseInt(s,16);return n>CS||u>CS?[new qa(e,r,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:n>u?[new qa(e,r,`unicode range start must not be greater than its end, but ${t} is`)]:[]}function jR(e){var r,t;let a=(r=e.key)!=null?r:"font-faces",i=e.value,o=e.validateSpec,s=(t=e.styleSpec)!=null?t:hS,l=e.style;if(!_E(i))return[new qa(a,i,`object expected, ${fo(i)} found`)];let n=[];for(let u in i){let c=i[u],f=fo(c);if(f==="string")n.push(...D0({key:`${a}.${u}`,value:c}));else if(f==="array"){let h={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[d,p]of c.entries()){let g=`${a}.${u}[${d}]`;n.push(...hh({key:g,value:p,valueSpec:h,styleSpec:s,style:l,validateSpec:o}));let m=_E(p)?p["unicode-range"]:void 0;if(fo(m)==="array")for(let[y,_]of m.entries())n.push(...phe(`${g}.unicode-range[${y}]`,_))}}else n.push(new qa(`${a}.${u}`,c,`string or array expected, ${f} found`))}return n}function a_(e){let r=e.value,t=e.valueSpec,a=e.styleSpec;return e.validateSpec=a_,t.expression&&h2(Rl(r))?kR(e):t.expression&&d2(Yv(r))?p1(e):t.type&&DS[t.type]?DS[t.type](e):hh(Jy({},e,{valueSpec:t.type?a[t.type]:t}))}function UR(e){let r=e.value,t=e.key,a=D0(e);return a.length||(r.indexOf("{fontstack}")===-1&&a.push(new qa(t,r,'"glyphs" url must include a "{fontstack}" token')),r.indexOf("{range}")===-1&&a.push(new qa(t,r,'"glyphs" url must include a "{range}" token'))),a}function dh(e,r=ta){let t=[];return t=t.concat(a_({key:"",value:e,valueSpec:r.$root,styleSpec:r,style:e,validateSpec:a_,objectElementValidators:{glyphs:UR,"*"(){return[]}}})),e.constants&&(t=t.concat(SR({key:"constants",value:e.constants,style:e,styleSpec:r,validateSpec:a_}))),qR(t)}function Vh(e){return function(r){return e(Object.assign({},r,{validateSpec:a_}))}}function qR(e){return[].concat(e).sort((r,t)=>r.line-t.line)}function Gh(e){return function(...r){return qR(e.apply(this,r))}}function vhe(e,r,t){return new wB(e,r,t)}function mhe(e){var r;return Object.entries((r=e.sources)!=null?r:{}).filter(([,t])=>!LS.has(t.type)).map(([t])=>`sources.${t}`)}function VR(e,r){let t=mhe(r);return xE(e,Af(r).filter(({message:a})=>!t.some(i=>a.startsWith(`${i}:`)||a.startsWith(`${i}.`))))}function xE(e,r){let t=!1;for(let a of r){if(a.severity==="warning"){vo(a.message);continue}e.fire(new mn(Error(a.message))),t=!0}return t}function i_(e,r,t,a){return a?.validate!==!1&&xE(e,r(ja({styleSpec:ta},t)))}function Ri(e,r,t={}){if(vp[e])throw Error(`${e} is already registered.`);Object.defineProperty(r,"_classRegistryKey",{value:e,writeable:!1}),vp[e]={klass:r,omit:t.omit||[],shallow:t.shallow||[]}}function GR(e){var r;return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||((r=e.constructor)==null?void 0:r.name)==="ArrayBuffer")}function bE(e){let r=e.constructor;return e.$name||r._classRegistryKey}function ghe(e){if(typeof e!="object"||!e)return!1;let r=bE(e);return r&&r!=="Object"}function HR(e){return!ghe(e)&&(e==null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||GR(e)||Gv(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function n_(e,r){if(HR(e))return(GR(e)||Gv(e))&&r&&r.push(e),ArrayBuffer.isView(e)&&r&&r.push(e.buffer),e instanceof ImageData&&r&&r.push(e.data.buffer),e;if(Array.isArray(e)){let o=[];for(let s of e)o.push(n_(s,r));return o}if(typeof e!="object")throw Error(`can't serialize object of type ${typeof e}`);let t=bE(e);if(!t)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!vp[t])throw Error(`${t} is not registered.`);let{klass:a}=vp[t],i=a.serialize?a.serialize(e,r):{};if(a.serialize){if(i===r?.[r.length-1])throw Error("statically serialized object won't survive transfer of $name property")}else{for(let o in e){if(!e.hasOwnProperty(o)||vp[t].omit.includes(o))continue;let s=e[o];s!==void 0&&(i[o]=vp[t].shallow.includes(o)?s:n_(s,r))}e instanceof Error&&(i.message=e.message)}if(i.$name)throw Error("$name property is reserved for worker serialization logic.");return t!=="Object"&&(i.$name=t),i}function o_(e){if(HR(e))return e;if(Array.isArray(e))return e.map(o_);if(typeof e!="object")throw Error(`can't deserialize object of type ${typeof e}`);let r=bE(e)||"Object";if(!vp[r])throw Error(`can't deserialize unregistered class ${r}`);let{klass:t}=vp[r];if(!t)throw Error(`can't deserialize unregistered class ${r}`);if(t.deserialize)return t.deserialize(e);let a=Object.create(t.prototype);for(let i of Object.keys(e)){if(i==="$name")continue;let o=e[i];a[i]=vp[r].shallow.includes(i)?o:o_(o)}return a}function WR(e){if(Array.isArray(e))return e.length;let r=e?.values;return Array.isArray(r)?r.length:void 0}function $R(e,r){let t=WR(e),a=WR(r);return t!==void 0&&a!==void 0&&t!==a}function pl(e,r=1){let t=0,a=0;return{members:e.map(i=>{let o=yhe(i.type),s=t=YR(t,Math.max(r,o)),l=i.components||1;return a=Math.max(a,o),t+=o*l,{name:i.name,type:i.type,components:l,offset:s}}),size:YR(t,Math.max(a,r)),alignment:r}}function yhe(e){return kB[e].BYTES_PER_ELEMENT}function YR(e,r){return Math.ceil(e/r)*r}function XR(e,r){return e=Gn(Math.floor(e),0,255),r=Gn(Math.floor(r),0,255),256*e+r}function ZR(e){let r=+e;return!isNaN(r)&&r<=9007199254740991?r:(0,Pw.default)(String(e))}function wE(e,r,t,a){for(;t>1],o=t-1,s=a+1;for(;;){do o++;while(e[o]i);if(o>=s)break;_2(e,o,s),_2(r,3*o,3*s),_2(r,3*o+1,3*s+1),_2(r,3*o+2,3*s+2)}s-ti.x+1||si.y+1)&&vo("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return t}function Zv(e,r){return{type:e.type,id:e.id,properties:e.properties,geometry:r?Xv(e):[]}}function bhe(e,r,t,a,i){e.emplaceBack(ak+r*8+a,ak+t*8+i)}function JR(e,r){for(let t of e)if(v1(r,t))return!0;for(let t of r)if(v1(e,t))return!0;return TE(e,r)}function x2(e,r,t){return v1(e,r)?!0:ME(r,e,t)}function QR(e,r){if(e.length===1)return t5(r,e[0]);for(let t of r)for(let a of t)if(v1(e,a))return!0;for(let t of e)if(t5(r,t))return!0;for(let t of r)if(TE(e,t))return!0;return!1}function whe(e,r,t){for(let a of r){if(e.length>=3){for(let i of a)if(v1(e,i))return!0}if(Ahe(e,a,t))return!0}return!1}function Ahe(e,r,t){if(e.length>1){if(TE(e,r))return!0;for(let a of r)if(ME(a,e,t))return!0}for(let a of e)if(ME(a,r,t))return!0;return!1}function TE(e,r){if(e.length===0||r.length===0)return!1;for(let t=0;t1?e.distSqr(t):e.distSqr(t.sub(r)._mult(i)._add(r))}function t5(e,r){let t=!1,a,i,o;for(let s of e){a=s;for(let l=0,n=a.length-1;lr.y!=o.y>r.y&&r.x<(o.x-i.x)*(r.y-i.y)/(o.y-i.y)+i.x&&(t=!t)}return t}function v1(e,r){let t=!1;for(let a=0,i=e.length-1;ar.y!=s.y>r.y&&r.x<(s.x-o.x)*(r.y-o.y)/(s.y-o.y)+o.x&&(t=!t)}return t}function Mhe(e,r,t,a,i){for(let s of e)if(r<=s.x&&t<=s.y&&a>=s.x&&i>=s.y)return!0;let o=[new zr(r,t),new zr(r,i),new zr(a,i),new zr(a,t)];if(e.length>2){for(let s of o)if(v1(e,s))return!0}for(let s=0;si.x&&r.x>i.x||e.yi.y&&r.y>i.y)return!1;let o=E0(e,r,t[0]);return o!==E0(e,r,t[1])||o!==E0(e,r,t[2])||o!==E0(e,r,t[3])}function m1(e,r,t){let a=r.paint.get(e).value;return a.kind==="constant"?a.value:t.programConfigurations.get(r.id).getMaxValue(e)}function b2(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function w2(e,r,t,a,i){if(!r[0]&&!r[1])return e;let o=zr.convert(r)._mult(i);t==="viewport"&&o._rotate(-a);let s=[];for(let l of e)s.push(l.sub(o));return s}function She(e){let r=[];for(let t=0;tEE(i,r,t,a))}function SE(e,{width:r,height:t},a,i){if(!i)i=new Uint8Array(r*t*a);else if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==r*t*a)throw RangeError(`mismatched image size. expected: ${i.length} but got: ${r*t*a}`);return e.width=r,e.height=t,e.data=i,e}function a5(e,{width:r,height:t},a){if(r===e.width&&t===e.height)return;let i=SE({},{width:r,height:t},a);kE(e,i,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,r),height:Math.min(e.height,t)},a),e.width=r,e.height=t,e.data=i.data}function kE(e,r,t,a,i,o){if(i.width===0||i.height===0)return r;if(i.width>e.width||i.height>e.height||t.x>e.width-i.width||t.y>e.height-i.height)throw RangeError("out of range source coordinates for image copy");if(i.width>r.width||i.height>r.height||a.x>r.width-i.width||a.y>r.height-i.height)throw RangeError("out of range destination coordinates for image copy");let s=e.data,l=r.data;if(s===l)throw Error("srcData equals dstData, so image is already copied");for(let n=0;n{r[e.evaluationKey]=n;let u=e.expression.evaluate(r);i.setPixel(s/4/t,l/4,u)};if(e.clips)for(let s=0,l=0;s80*t){l=e[0],n=e[1];let c=l,f=n;for(let h=t;hc&&(c=d),p>f&&(f=p)}u=Math.max(c-l,f-n),u=u===0?0:32767/u}return LE(o,s,l,n,u),s}function o5(e,r,t,a,i){let o=null;if(i===Jhe(e,r,t,a)>0)for(let s=r;s=r;s-=a)o=h5(s/a|0,e[s],e[s+1],o);return o&&s_(o,o.next)&&(u_(o),o=o.next),o}function Kv(e,r=e){let t=r===e,a=e,i;do i=!1,a!==a.next&&(O1.size===0||!O1.has(a))&&(s_(a,a.next)||cu(a.prev,a,a.next)===0)?((t||a===r)&&(r=a.prev),Ow=!0,u_(a),a=a.prev,i=!0):(t||a!==r)&&(a=a.next,i=!t);while(i||a!==r);return r}function LE(e,r,t,a,i){i&&Whe(e,t,a,i);let o=e,s=!1;for(;e.prev!==e.next;){let l=e.prev,n=e.next;if(cu(l,e,n)<0&&(i?zhe(e,t,a,i):Rhe(e))){r.push(l.i,e.i,n.i),u_(e),e=n,o=n;continue}if(e=n,e===o){if(Ow=!1,e=Kv(e),Ow){o=e;continue}if(!s){e=Bhe(e,r),o=e,s=!0;continue}Ohe(e,r,t,a,i);break}}}function Rhe(e){let r=e.prev,t=e,a=e.next,i=r.x,o=t.x,s=a.x,l=r.y,n=t.y,u=a.y,c=Math.min(i,o,s),f=Math.min(l,n,u),h=Math.max(i,o,s),d=Math.max(l,n,u),p=a.next;for(;p!==r;){if(p.x>=c&&p.x<=h&&p.y>=f&&p.y<=d&&(i!==p.x||l!==p.y)&&E2(i,l,o,n,s,u,p.x,p.y)&&cu(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function zhe(e,r,t,a){let i=e.prev,o=e,s=e.next,l=i.x,n=o.x,u=s.x,c=i.y,f=o.y,h=s.y,d=Math.min(l,n,u),p=Math.min(c,f,h),g=Math.max(l,n,u),m=Math.max(c,f,h),y=FE(d,p,r,t,a),_=FE(g,m,r,t,a),v=e.prevZ;for(;v&&v.z>=y;){if(v.x>=d&&v.x<=g&&v.y>=p&&v.y<=m&&v!==s&&(l!==v.x||c!==v.y)&&E2(l,c,n,f,u,h,v.x,v.y)&&cu(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let x=e.nextZ;for(;x&&x.z<=_;){if(x.x>=d&&x.x<=g&&x.y>=p&&x.y<=m&&x!==s&&(l!==x.x||c!==x.y)&&E2(l,c,n,f,u,h,x.x,x.y)&&cu(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Bhe(e,r){let t=e,a=!1;do{let i=t.prev,o=t.next.next;c5(i,t,t.next,o,!1)&&l_(i,o)&&l_(o,i)&&(r.push(i.i,t.i,o.i),u_(t),u_(t.next),t=e=o,a=!0),t=t.next}while(t!==e);return a?Kv(t):t}function Ohe(e,r,t,a,i){let o=e;do{let s=o.next.next;for(;s!==o.prev;){if(o.i!==s.i&&Xhe(o,s)){let l=f5(o,s);o=Kv(o,o.next),l=Kv(l,l.next),LE(o,r,t,a,i),LE(l,r,t,a,i);return}s=s.next}o=o.next}while(o!==e)}function Nhe(e,r,t,a){let i=[];for(let o=0,s=r.length;os&&(s=t.x),t.yl&&(l=t.y),c.xs&&(s=c.x),c.yl&&(l=c.y),t=c}while(++n<16&&t!==r);Uw[a]=t;let u=a*4;El[u]=i,El[u+1]=o,El[u+2]=s,El[u+3]=l}while(t!==r)}function Vhe(e,r){let t=e.z*4;r.xEl[t+2]&&(El[t+2]=r.x),r.y>El[t+3]&&(El[t+3]=r.y)}function l5(e){let r=Uw[e];for(;r.prev.next!==r;)r=r.next;return Uw[e]=r,r}function u5(e){let r=jw[e];for(;r.prev.next!==r;)r=r.next;return jw[e]=r,r}function Ghe(e,r){let t=r,a=e.x,i=e.y,o=-1/0,s;if(s_(e,t))return t;for(let h=0,d=0;hEl[d+3]||El[d]>a||El[d+2]<=o)continue;let p=l5(h);t=u5(h);do{if(t.prev.next===t){if(s_(e,t.next))return t.next;if(i<=t.y&&i>=t.next.y&&t.next.y!==t.y){let g=t.x+(i-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(g<=a&&g>o&&(o=g,s=t.xa||El[d+3]c)continue;let p=l5(h);t=u5(h);do{if(t.prev.next===t&&a>=t.x&&t.x>=l&&a!==t.x&&E2(ia)&&(gs.x||t.x===s.x&&Hhe(s,t)))&&(s=t,f=g)}t=t.next}while(t!==p)}return s}function Hhe(e,r){return cu(e.prev,e,r.prev)<0&&cu(r.next,e,e.next)<0}function Whe(e,r,t,a){let i=e,o=0;do i.z=FE(i.x,i.y,r,t,a),gh[o++]=i,i=i.next;while(i!==e);$he(o);let s=null;for(let l=0;l=0&&gh[i].z>a;)gh[i+1]=gh[i],i--;gh[i+1]=t}return}O0.length>>o&255]++;let s=0;for(let l=0;l<256;l++){let n=U1[l];U1[l]=s,s+=n}for(let l=0;l>>o&255]++;a[u]=r[l],i[u]=n}}function FE(e,r,t,a,i){return e=(e-t)*i|0,r=(r-a)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e|r<<1}function Yhe(e){let r=e,t=e;do(r.x=(e-s)*(o-l)&&(e-s)*(a-l)>=(t-s)*(r-l)&&(t-s)*(o-l)>=(i-s)*(a-l)}function Xhe(e,r){let t=s_(e,r)&&cu(e.prev,e,e.next)>0&&cu(r.prev,r,r.next)>0;return e.next.i!==r.i&&(t||l_(e,r)&&l_(r,e)&&(cu(e.prev,e,r.prev)!==0||cu(e,r.prev,r)!==0))&&!Zhe(e,r)&&(t||Khe(e,r))}function cu(e,r,t){return(r.y-e.y)*(t.x-r.x)-(r.x-e.x)*(t.y-r.y)}function s_(e,r){return e.x===r.x&&e.y===r.y}function c5(e,r,t,a,i=!0){let o=cu(e,r,t),s=cu(e,r,a),l=cu(t,a,e),n=cu(t,a,r);return(o>0&&s<0||o<0&&s>0)&&(l>0&&n<0||l<0&&n>0)?!0:i?!!(o===0&&S2(e,t,r)||s===0&&S2(e,a,r)||l===0&&S2(t,e,a)||n===0&&S2(t,r,a)):!1}function S2(e,r,t){return r.x<=Math.max(e.x,t.x)&&r.x>=Math.min(e.x,t.x)&&r.y<=Math.max(e.y,t.y)&&r.y>=Math.min(e.y,t.y)}function Zhe(e,r){let t=Math.min(e.x,r.x),a=Math.max(e.x,r.x),i=Math.min(e.y,r.y),o=Math.max(e.y,r.y),s=e;do{let l=s.next;if(s.x>a&&l.x>a||s.xo&&l.y>o||s.y=0&&cu(e,e.prev,r)>=0:cu(e,r,e.prev)<0||cu(e,e.next,r)<0}function Khe(e,r){let t=e,a=!1,i=(e.x+r.x)/2,o=(e.y+r.y)/2;do{let s=t.next;t.y>o!=s.y>o&&i<(s.x-t.x)*(o-t.y)/(s.y-t.y)+t.x&&(a=!a),t=s}while(t!==e);return a}function f5(e,r){let t=PE(e.i,e.x,e.y),a=PE(r.i,r.x,r.y),i=e.next,o=r.prev;return e.next=r,r.prev=e,t.next=i,i.prev=t,a.next=t,t.prev=a,o.next=a,a.prev=o,a}function h5(e,r,t,a){let i=PE(e,r,t);return a?(i.next=a.next,i.prev=a,a.next.prev=i,a.next=i):(i.prev=i,i.next=i),i}function u_(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),Nw&&Vhe(e.prev,e.next)}function PE(e,r,t){return{i:e,x:r,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function Jhe(e,r,t,a){let i=0;for(let o=r,s=t-a;o0?(Math.floor(C/s)+1)*s:(Math.ceil(C/s)-1)*s,b=x>0?(Math.floor(w/s)+1)*s:(Math.ceil(w/s)-1)*s,S=Math.abs(C-T),A=Math.abs(w-b),F=Math.abs(C-g),D=Math.abs(w-m),R=y?S/E:1/0,P=_?A/M:1/0;if((F<=S||!y)&&(D<=A||!_))break;if(R0?(t.push(i),t.push(s),t.push(o)):(t.push(i),t.push(o),t.push(s))}return t}function tde(e,r,t){if(r.length===0)throw Error("Subdivision vertex ring is empty.");let a=0,i=e[r[0]*2];for(let n=1;n=0?s-1:o-1,u=(l+1)%o,c=e[r[n]*2],f=e[r[n]*2+1],h=e[r[u]*2],d=e[r[u]*2+1],p=e[r[s]*2],g=e[r[s]*2+1],m=e[r[l]*2],y=e[r[l]*2+1],_=!1;if(ch)_=!1;else{let v=y-g,x=-(m-p),E=g((h-p)*v+(d-g)*x)*E&&(_=!0)}if(_){let v=r[n],x=r[s],E=r[l];v!==x&&v!==E&&x!==E&&t.push(E,x,v),s--,s<0&&(s=o-1)}else{let v=r[u],x=r[s],E=r[l];v!==x&&v!==E&&x!==E&&t.push(E,x,v),l++,l>=o&&(l=0)}if(n===u)break}}function p5(e,r,t,a,i,o,s,l,n){let u=i.length/2,c=s&&l&&n;if(uZs.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(r,t),n=l.count,g=!0,m=!0,y=!0,c=0);let v=c_(s,a,o,l,h,g,u),x=c_(s,a,o,l,d,m,u),E=c_(s,a,o,l,p,y,u);t.emplaceBack(c+v-n,c+x-n,c+E-n),u.primitiveLength++}}function ade(e,r,t,a,i,o){let s=[];for(let f=0;fZs.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(r,t),n=l.count,g=!0,m=!0,c=0);let _=c_(s,a,o,l,d,g,u),v=c_(s,a,o,l,p,m,u);t.emplaceBack(c+_-n,c+v-n),u.primitiveLength++}}function IE(e,r){return e.x===r.x&&(e.x<0||e.x>8192)||e.y===r.y&&(e.y<0||e.y>8192)}function v5(e){return e.every(r=>r.x<0)||e.every(r=>r.x>8192)||e.every(r=>r.y<0)||e.every(r=>r.y>8192)}function m5(e){let r=e.length;if(r<=1)return[e];let t=[],a,i;for(let o=0;ocde(i,a))}function ude(e,r){let t=sde(xa/2,xa/2,r),a=$o.fromLngLat(t).meterInMercatorCoordinateUnits(),i=(1<1&&r[0].x===r[r.length-1].x&&r[0].y===r[r.length-1].y;)r.pop();return r}function hde(e,r,t,a,i){let o=r.sub(t),s=a.sub(t),l=o.mag(),n=s.mag();if(l<1e-6||n<1e-6){e.push(t.clone());return}o._div(l),s._div(n);let u=o.x*s.x+o.y*s.y;if(Math.abs(u)>Math.cos(5*Math.PI/180)){e.push(t.clone());return}let c=.2,f=Math.min(i,l*c,n*c),h=t.add(o.mult(f)),d=t.add(s.mult(f)),p=Math.sqrt((1+u)/2),g=t.add(o.add(s)._unit()._mult(f/p)),m=h.sub(g).angleWith(d.sub(g)),y=Math.max(2,Math.ceil(Math.abs(m)/(Math.PI/6)-1e-6));for(let _=0;_<=y;_++)e.push(h.rotateAround(_/y*m,g))}function p_(e,r,t,a,i,o,s,l){e.emplaceBack(r,t,Math.floor(a*Hw)*2+s,i*Hw*2,o*Hw*2,Math.round(l))}function dde(e,r){for(let t=0;t0?r+2*e:e}function gde(e){return/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u070D\u070F-\u074A\u074D-\u077F\u07C0-\u07FA\u07FD-\u07FF\u0840-\u085B\u085E\u0860-\u086A\u0870-\u0891\u0897-\u08E1\u08E3-\u08FF\u1800\u1801\u1804\u1806-\u1819\u1820-\u1878\u1880-\u18AA\uA840-\uA877\uFB50-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]|\uD803[\uDD00-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDEC2-\uDEC7\uDED0-\uDED8\uDEFA-\uDEFF\uDF30-\uDF59\uDF70-\uDF89\uDFB0-\uDFCB]|\uD805[\uDE60-\uDE6C]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]|\uD83A[\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/gim.test(String.fromCodePoint(e))}function yde(e){return/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u0891\u0897-\u08E1\u08E3-\u08FF\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC57-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD1F-\uDD39\uDD3F-\uDD59\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58\uDE60-\uDE9F\uDEC0-\uDEE6\uDEEB-\uDEF6\uDF00-\uDF35\uDF39-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDD40-\uDD65\uDD69-\uDD85\uDD8E\uDD8F\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB-\uDEAD\uDEB0\uDEB1\uDEC2-\uDEC7\uDED0-\uDED8\uDEFA-\uDF27\uDF30-\uDF59\uDF70-\uDF89\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/gim.test(String.fromCodePoint(e))}function _de(e){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function xde(e){return/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function k2(e){return/[\u02EA\u02EB\u1100-\u11FF\u1401-\u167F\u18B0-\u18FF\u2065\u20DD-\u20E0\u20E2-\u20E4\u2B97\u2BF0-\u2BFF\u2E50\u2E51\u2E80-\u3007\u3012\u3013\u3020-\u302F\u3031-\u30FB\u30FD-\uA4CF\uA960-\uA97F\uAC00-\uD7FF\uF900-\uFAFF\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7\uFFF0-\uFFF8]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|[\uD80C-\uD810\uD81C-\uD822\uD83C\uD83D\uD840-\uD87E\uD880-\uD8BE][\uDC00-\uDFFF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFFF]|\uD823[\uDC00-\uDDFF]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFF]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83E[\uDD00-\uDEFF]|[\uD87F\uD8BF][\uDC00-\uDFFD]/gim.test(String.fromCodePoint(e))}function bde(e){return/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e))}function wde(e){return/[\r\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0600-\u0605\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DD\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0890\u0891\u0897-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E33-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB3-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1037\u1039-\u103E\u1056-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1084-\u1086\u108D\u109D\u1100-\u11FF\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60\u1A62\u1A65-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA960-\uA97C\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCBD\uDCC2\uDCCD\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC2\uDDC3\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDFB8-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD2\uDFE1\uDFE2]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF1F\uDF22-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE84-\uDE99\uDF60-\uDF67]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00-\uDF03\uDF34-\uDF3A\uDF3E-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDD63\uDD67-\uDD6A\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDDE6-\uDDFF\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]/.test(e)}function T5(e){return/[\u0E01-\u0E3A\u0E40-\u0E4E\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA\u1000-\u103F\u1050-\u108F\u109A-\u109F\u1780-\u17D3\u17D7\u17DC\u17DD\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19DE\u19DF\u1A20-\u1A5E\u1A60-\u1A7C\u1AA0-\u1AAD\u1B00-\u1B4C\u1B4E-\u1B7F\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE-\uA9EF\uA9FA-\uA9FE\uAA60-\uAAC2\uAADB-\uAADF]|\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF3A\uDF3B\uDF3F-\uDF46]/gim.test(String.fromCodePoint(e))}function Ade(e,r){return/(?:[\u1039\u17D2\u1A60\u1BAB\u200D\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807[\uDD45\uDD97\uDF42])$/.test(e)||new RegExp("^\\p{gc=Mc}","u").test(r)}function Tde(e,r,t){let a=0;for(let i of e.split(";")){let[o,s]=i.split(",").map(n=>parseInt(n,36)),l=a+o;for(let n=l;n{let t=r.codePointAt(0);return{codePoint:t,type:Mde(t),form:null}})}function Dde(e){let r=e.filter(t=>t.type!=="T");for(let t=0;t0&&Ede(r[t-1].type),o=t+1String.fromCodePoint(Pde(t))).join("")}function Rde(e,r,t){var a;let i=r.layout.get("text-transform").evaluate(t,{});return i==="uppercase"?e=e.toLocaleUpperCase():i==="lowercase"&&(e=e.toLocaleLowerCase()),((a=B_.applyArabicShaping)!=null?a:Ide)(e)}function zde(e,r,t){for(let a of e.sections)a.text=Rde(a.text,r,t);return e}function Bde(e){let r={},t={},a=[],i=0;function o(u){a.push(e[u]),i++}function s(u,c,f){let h=t[u];return delete t[u],t[c]=h,a[h].geometry[0].pop(),a[h].geometry[0]=a[h].geometry[0].concat(f[0]),h}function l(u,c,f){let h=r[c];return delete r[c],r[u]=h,a[h].geometry[0].shift(),a[h].geometry[0]=f[0].concat(a[h].geometry[0]),h}function n(u,c,f){let h=f?c[0][c[0].length-1]:c[0][0];return`${u}:${h.x}:${h.y}`}for(let u=0;uu.geometry)}function OE(e){if(!vk||!wde(e))return[...e];Xw??(Xw=new Intl.Segmenter(void 0,{granularity:"grapheme"}));let r=[];for(let{segment:t}of Xw.segment(e)){let a=r.length-1;a>=0&&Ade(r[a],t)?r[a]+=t:r.push(t)}return r}function Ode(e){let r=new Set;if(vk){Zw??(Zw=new Intl.Segmenter(void 0,{granularity:"word"}));for(let{index:a}of Zw.segment(e))r.add(a);return r}let t=0;for(let a of e.split(new RegExp("\\b|(?=\\p{Ideo})","u")))r.add(t),t+=a.length;return r}function C2(e){let r=e.codePointAt(0);return e.length>(r>65535?2:1)}function NE(e){return/\s/u.test(String.fromCodePoint(e))}function jE(e){for(let r of e)if(k2(r.codePointAt(0)))return!0;return!1}function Nde(e){for(let r of e)if(!jde(r.codePointAt(0)))return!1;return!0}function jde(e){return!gde(e)}function M5(e){return!(k2(e)||bde(e))}function E5(e){return new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(e))}function S5(e){return yde(e)}function k5(e){for(let r of e)if(S5(r.codePointAt(0)))return!0;return!1}function Ude(e){let r="",t={premature:!0,value:void 0},a=e[Symbol.iterator](),i=a.next(),o=e[Symbol.iterator]();o.next();let s=o.next();for(;!i.done;)(s.done||!M5(s.value.codePointAt(0))||om[s.value])&&(t.premature||!M5(t.value.codePointAt(0))||om[t.value])&&om[i.value]?r+=om[i.value]:r+=i.value,t={value:i.value,premature:!1},i=a.next(),s=o.next();return r}function C5(e,r,t,a,i,o){if("fontStack"in r){let s=t[r.fontStack],l=s?.[e];if(l)return l.metrics.advance*r.scale+i;let n=0;for(let u of e){let c=s?.[u];c&&(n+=c.metrics.advance*r.scale+i)}return n}{let s=a[r.imageName];return s?s.displaySize[0]*r.scale*24/o+i:0}}function D5(e,r,t,a){let i=(e-r)**2;return a?e1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function p(re,se){var le=0,ue=new Map,fe=se&&new Map,pe;return re.split(",").forEach(function we(xe){if(xe.indexOf("+")!==-1)for(var he=+xe;he--;)we(pe);else{pe=xe;var oe=xe.split(">"),te=oe[0],ie=oe[1];te=String.fromCodePoint(le+=parseInt(te,36)),ie=String.fromCodePoint(le+=parseInt(ie,36)),ue.set(te,ie),se&&fe.set(ie,te)}}),{map:ue,reverseMap:fe}}var g,m,y;function _(){if(!g){var re=p(d.pairs,!0),se=re.map,le=re.reverseMap;g=se,m=le,y=p(d.canonical,!1).map}}function v(re){return _(),g.get(re)||null}function x(re){return _(),m.get(re)||null}function E(re){return _(),y.get(re)||null}var M=t.L,C=t.R,w=t.EN,k=t.ES,T=t.ET,b=t.AN,S=t.CS,A=t.B,F=t.S,D=t.ON,R=t.BN,P=t.NSM,z=t.AL,I=t.LRO,L=t.RLO,B=t.LRE,O=t.RLE,G=t.PDF,$=t.LRI,X=t.RLI,Z=t.FSI,J=t.PDI;function N(re,se){for(var le=125,ue=new Uint32Array(re.length),fe=0;fe0)Ge--;else if(Ke>0){for(Ze=0;!Me[Me.length-1]._isolate;)Me.pop();var st=Me[Me.length-1]._isolInitIndex;st!=null&&(he.set(st,dt),he.set(dt,st)),Me.pop(),Ke--}Ue=Me[Me.length-1],xe[dt]=Ue._level,Ue._override&&we(dt,Ue._override)}else _t&G?(Ge===0&&(Ze>0?Ze--:!Ue._isolate&&Me.length>1&&(Me.pop(),Ue=Me[Me.length-1])),xe[dt]=Ue._level):_t&A&&(xe[dt]=te.level);else xe[dt]=Ue._level,Ue._override&&_t!==R&&we(dt,Ue._override)}for(var Ve=[],Ye=null,me=te.start;me<=te.end;me++){var be=ue[me];if(!(be&l)){var Ee=xe[me],De=be&i,Ce=be===J;Ye&&Ee===Ye._level?(Ye._end=me,Ye._endsWithIsolInit=De):Ve.push(Ye={_start:me,_end:me,_level:Ee,_startsWithPDI:Ce,_endsWithIsolInit:De})}}for(var Fe=[],Je=0;Je=0;St--)if(!(ue[St]&l)){gt=xe[St];break}var Dt=At[At.length-1],kt=xe[Dt],Vt=te.level;if(!(ue[Dt]&i)){for(var lr=Dt+1;lr<=te.end;lr++)if(!(ue[lr]&l)){Vt=xe[lr];break}}Fe.push({_seqIndices:At,_sosType:Math.max(gt,vt)%2?C:M,_eosType:Math.max(Vt,kt)%2?C:M})}}for(var dr=0;dr=0;_i--)if(!(ue[vr[_i]]&l)){Da=ue[vr[_i]];break}we(Oa,Da&(i|J)?D:Da)}}if(pe.get(w))for(var ti=0;ti=-1;ia--){var na=ia===-1?Fr:ue[vr[ia]];if(na&o){na===z&&we(Ka,b);break}}}if(pe.get(z))for(var xi=0;xi=0&&(Oe=ue[vr[Et]],Oe&l);Et--);for(var Mt=Qr+1;Mt=0&&ue[vr[Gt]]&(T|l);Gt--)we(vr[Gt],w);for(zt++;zt=0&&ue[vr[et]]&l;et--)we(vr[et],D);for(var ut=Ht+1;ut=0;Ca--){var Li=Mr[Ca].char;if(Li===ni||Li===x(E(ra))||v(E(Li))===ra){kr.push([Mr[Ca].seqIndex,ua]),Mr.length=Ca;break}}}kr.sort(function(Yn,go){return Yn[0]-go[0]});for(var Va=0;Va=0;un--){var jn=vr[un];if(ue[jn]&sr){var bn=ue[jn]&jt?C:M;Zi=bn===Hr?Hr:bn;break}}}if(Zi){if(ue[vr[rn]]=ue[vr[pa]]=Zi,Zi!==Hr){for(var Wa=rn+1;Wa=0;Un--)if(ue[vr[Un]]&l)Vi=Un;else{ro=ue[vr[Un]]&jt?C:M;break}for(var Kn=la,To=Hi+1;To=0&&f(re[wn])&n;wn--)xe[wn]=te.level}}return{levels:xe,paragraphs:oe};function os(Yn,go){for(var Cn=Yn;Cn=xe&&f(re[te])&n;te--)oe[te]=we.level;for(var ie=we.level,ee=1/0,ce=0;ceie&&(ie=_e),_e=ee;Se--)for(var Me=0;Me=Se){for(var Ue=Me;Me+1=Se;)Me++;Me>Ue&&pe.push([Ue+xe,Me+xe])}}}),pe}function Y(re,se,le,ue){var fe=K(re,se,le,ue),pe=[].concat(re);return fe.forEach(function(we,xe){pe[xe]=(se.levels[we]&1?V(re[we]):null)||re[we]}),pe.join("")}function K(re,se,le,ue){for(var fe=q(re,se,le,ue),pe=[],we=0;we=0;a--){let i=Jw.getBidiCharTypeName(e[a].text[0]);uN.has(i)?(e[a].level=r,t=!0):t&&lN.has(i)?e[a].level=r:t=!1}}function Wde(e,r){let t=r,a=1/0;for(let{level:o}of e)o>t&&(t=o),(o|1)=a;o--)for(let s=0;s=o;)l++;for(let n=s,u=l;nr>=i.start&&r<=i.end))==null?void 0:t.level)!=null?a:0}function Xde(e,r,t,a,i){let o=Gde(e,r,a,i);Hde(o,t);let s="",l=[];for(let n of Wde(o,t)){if(sN.test(n.text))continue;let u=$de(n);s+=u,l.push(...Array(u.length).fill(n.index))}return{text:s,sourceIndices:l}}function Zde(e,r){let t=r.filter(o=>o>0&&oo-s),i=[];for(let o=0;o+1i.start))).map(([i,o])=>Xde(e,t,Yde(a,i),i,o))}function Kde(e,r){return I5(e,r).map(t=>t.text)}function Jde(e,r,t){return I5(e,t).map(a=>[a.text,a.sourceIndices.map(i=>{var o;return(o=r[i])!=null?o:0})])}function Qde(e,r,t){let a=t.buf,i,o;if(o=a[t.pos++],i=(o&112)>>4,o<128||(o=a[t.pos++],i|=(o&127)<<3,o<128)||(o=a[t.pos++],i|=(o&127)<<10,o<128)||(o=a[t.pos++],i|=(o&127)<<17,o<128)||(o=a[t.pos++],i|=(o&127)<<24,o<128)||(o=a[t.pos++],i|=(o&1)<<31,o<128))return epe(e,i,r);throw Error("Expected varint not more than 10 bytes")}function epe(e,r,t){return t?r*4294967296+(e>>>0):(r>>>0)*4294967296+(e>>>0)}function tpe(e,r,t){let a="",i=r;for(;i239?4:o>223?3:o>191?2:1;if(i+l>t)break;let n,u,c;l===1?o<128&&(s=o):l===2?(n=e[i+1],(n&192)==128&&(s=(o&31)<<6|n&63,s<=127&&(s=null))):l===3?(n=e[i+1],u=e[i+2],(n&192)==128&&(u&192)==128&&(s=(o&15)<<12|(n&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):l===4&&(n=e[i+1],u=e[i+2],c=e[i+3],(n&192)==128&&(u&192)==128&&(c&192)==128&&(s=(o&15)<<18|(n&63)<<12|(u&63)<<6|c&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,l=1):s>65535&&(s-=65536,a+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),a+=String.fromCharCode(s),i+=l}return a}function rpe(e,r,t){e===1&&t.readMessage(ape,r)}function ape(e,r,t){if(e===3){let{id:a,bitmap:i,width:o,height:s,left:l,top:n,advance:u}=t.readMessage(ipe,{});r.push({id:a,bitmap:new zw({width:o+6,height:s+6},i),metrics:{width:o,height:s,left:l,top:n,advance:u}})}}function ipe(e,r,t){e===1?r.id=t.readVarint():e===2?r.bitmap=t.readBytes():e===3?r.width=t.readVarint():e===4?r.height=t.readVarint():e===5?r.left=t.readSVarint():e===6?r.top=t.readSVarint():e===7&&(r.advance=t.readVarint())}function npe(e){return new gk(e).readFields(rpe,[])}function D2(e){return typeof e?.renderWithWebGL=="function"}function ope(e){let{userImage:r}=e;return!r?.render||!r.render()?!1:(D2(r.data)||e.data.replace(new Uint8Array(r.data.buffer)),!0)}function R5(e){let r=0,t=0;for(let s of e)r+=s.w*s.h,t=Math.max(t,s.w);e.sort((s,l)=>l.h-s.h);let a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(r/.95)),t),h:1/0}],i=0,o=0;for(let s of e)for(let l=a.length-1;l>=0;l--){let n=a[l];if(!(s.w>n.w||s.h>n.h)){if(s.x=n.x,s.y=n.y,o=Math.max(o,s.y+s.h),i=Math.max(i,s.x+s.w),s.w===n.w&&s.h===n.h){let u=a.pop();u&&l=t;o--)r.push(o);t=a+1}else{for(let o=t;oe.toCodeUnitIndex(o)),a=B_.isParsed()?B_:null;if(e.sections.length===1)return a?a.processBidirectionalText(e.toString(),t).map(o=>B5(o,e.sections,[...o].map(()=>0))):Kde(e.toString(),t).map(o=>UE([...o],e.sections,[...o].map(()=>0)));let i=cpe(e);return a?a.processStyledBidirectionalText(e.text,i,t).map(([o,s])=>B5(o,e.sections,s)):Jde(e.text,i,t).map(([o,s])=>{let l=[...o];return UE(l,e.sections,z5(l).map(n=>{var u;return(u=s[n])!=null?u:0}))})}function UE(e,r,t){var a;let i=new Kw(e.join(""),r,[]),o=0;for(let s of i.graphemes())i.sectionIndex.push((a=t[o])!=null?a:0),o+=[...s].length;return i}function z5(e){let r=[],t=0;for(let a of e)r.push(t),t+=a.length;return r}function B5(e,r,t){let a=[...e],i=z5(a),o=upe(a);return UE(o.map(s=>a[s]),r,o.map(s=>{var l;return(l=t[i[s]])!=null?l:0}))}function L2(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p){let g=Kw.fromFeature(e,i);f===2&&g.verticalizePunctuation();let m=g.determineLineBreaks(u,o,r,a,d),y=k5(g.text)?fpe(g,m):lpe(g,m),_=[],v={positionedLines:_,text:g.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:f,iconsInText:!1,verticalizable:!1};return xpe(v,r,t,a,y,s,l,n,f,u,h,p),!spe(_)&&v}function F2(e){let r=.5,t=.5;switch(e){case"right":case"top-right":case"bottom-right":r=1;break;case"left":case"top-left":case"bottom-left":r=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":t=1;break;case"top":case"top-right":case"top-left":t=0}return{horizontalAlign:r,verticalAlign:t}}function hpe(e,r,t){let a=r.getMaxScale()*24,{maxImageWidth:i,maxImageHeight:o}=r.getMaxImageSize(e),s=Math.max(a,o*t);return{verticalLineContentWidth:Math.max(a,i*t),horizontalLineContentHeight:s}}function O5(e){switch(e){case"top":return 0;case"center":return .5;default:return 1}}function dpe(e,r,t,a){var i;if(e?.rect)return e;let o=(i=r[t.fontStack])==null?void 0:i[a];return o?{rect:null,metrics:o.metrics}:null}function ppe(e,r,t){return!(e===1||!r&&!k2(t)||r&&(NE(t)||E5(t)))}function P2(e){return new RegExp("\\p{Nd}","u").test(String.fromCodePoint(e))}function N5(e){return new RegExp("\\p{Lu}","u").test(String.fromCodePoint(e))}function vpe(e){return/[\p{P}\p{S}]/u.test(String.fromCodePoint(e))}function mpe(e){let r=e.some(P2)&&e.every(a=>P2(a)||vpe(a)),t=e.length<=3&&e.every(a=>N5(a)||P2(a));return r||t}function gpe(e){return(P2(e)||N5(e))&&!E5(e)}function ype(e,r){let t=!1;for(let a=0;ao.codePointAt(0)),a=t.map(k2),i=o=>!a[o]&&!NE(t[o])&&!("imageName"in e.getSection(o));for(let o=0;of){let h=Math.ceil(o/f);i*=h/s,s=h}return{x1:a,y1:i,x2:a+o,y2:i+s}}function U5(e,r,t,a,i,o){let s=e.image,l;if(s.content){let m=s.content,y=s.pixelRatio||1;l=[m[0]/y,m[1]/y,s.displaySize[0]-m[2]/y,s.displaySize[1]-m[3]/y]}let n=r.left*o,u=r.right*o,c,f,h,d;t==="width"||t==="both"?(d=i[0]+n-a[3],f=i[0]+u+a[1]):(d=i[0]+(n+u-s.displaySize[0])/2,f=d+s.displaySize[0]);let p=r.top*o,g=r.bottom*o;return t==="height"||t==="both"?(c=i[1]+p-a[0],h=i[1]+g+a[2]):(c=i[1]+(p+g-s.displaySize[1])/2,h=c+s.displaySize[1]),{image:s,top:c,right:f,bottom:h,left:d,collisionPadding:l}}function q5(e,r){let{expression:t}=r;if(t.kind==="constant")return{kind:"constant",layoutSize:t.evaluate(new Ko(e+1))};if(t.kind==="source")return{kind:"source"};if(t.kind==="composite"){let{minZoom:a,maxZoom:i}=Epe(t.zoomStops,e);return{kind:"composite",minZoom:a,maxZoom:i,interpolationType:t.interpolationType}}{let a=Spe(t),i=t.evaluate(new Ko(e+1));return{kind:"camera",zoomStops:t.zoomStops,sizes:a,layoutSize:i,interpolationType:t.interpolationType}}}function Epe(e,r){let t=0;for(;te.evaluate(new Ko(r===-1/0?e.zoomStops[1]-1:r)))}function qE(e,{uSize:r,uSizeT:t},{lowerSize:a,upperSize:i}){return e.kind==="source"?a/128:e.kind==="composite"?Xs.number(a/128,i/128,t):r}function I2(e,r){let t=0,a=0;return e.kind==="constant"?a=e.layoutSize:e.kind==="camera"?a=kpe(e,r):e.kind==="composite"&&(t=Cpe(e,r)),{uSizeT:t,uSize:a}}function kpe({zoomStops:e,sizes:r,layoutSize:t,interpolationType:a},i){let o=e.length-1;for(;o>0&&e[o]>i;)o--;let s=Math.min(o+1,e.length-1),l=a?Gn(vh.interpolationFactor(a,i,e[o],e[s]),0,1):0;return Math.min(Xs.number(r[o],r[s],l),t)}function Cpe({interpolationType:e,minZoom:r,maxZoom:t},a){return e?Gn(vh.interpolationFactor(e,a,r,t),0,1):0}function V5(e,r,t,a,i){if(r.segment===void 0||t===0)return!0;let o=r,s=r.segment+1,l=0;for(;l>-t/2;){if(s--,s<0)return!1;l-=e[s].dist(o),o=e[s]}l+=e[s].dist(e[s+1]),s++;let n=[],u=0;for(;la;)u-=n.shift().angleDelta;if(u>i)return!1;s++,l+=f.dist(h)}return!0}function G5(e){let r=0;for(let t=0;tu){let p=(u-n)/d,g=new sm(Xs.number(f.x,h.x,p),Xs.number(f.y,h.y,p),h.angleTo(f),c);return g._round(),!s||V5(e,g,l,s,r)?g:void 0}n+=d}}function Lpe(e,r,t,a,i,o,s,l,n){let u=H5(a,o,s),c=W5(a,i),f=c*s,h=e[0].x===0||e[0].x===n||e[0].y===0||e[0].y===n;r-f=0&&x=0&&E=0&&h+u<=c){let M=new sm(x,E,_,p);M._round(),(!a||V5(e,M,o,a,i))&&d.push(M)}}f+=y}return!l&&!d.length&&!s&&(d=$5(e,f/2,t,a,i,o,s,!0,n)),d}function Y5(e,r,t,a,i){let o=[];for(let s of e){let l;for(let n=0;n=a&&c.x>=a)&&(u.x>=a?u=new zr(a,u.y+(c.y-u.y)*((a-u.x)/(c.x-u.x)))._round():c.x>=a&&(c=new zr(a,u.y+(c.y-u.y)*((a-u.x)/(c.x-u.x)))._round()),!(u.y>=i&&c.y>=i)&&(u.y>=i?u=new zr(u.x+(c.x-u.x)*((i-u.y)/(c.y-u.y)),i)._round():c.y>=i&&(c=new zr(u.x+(c.x-u.x)*((i-u.y)/(c.y-u.y)),i)._round()),(!l||!u.equals(l[l.length-1]))&&(l=[u],o.push(l)),l.push(c)))))}}return o}function X5(e,r,t,a){let i=[],o=e.image,s=o.pixelRatio,l=o.paddedRect.w-2,n=o.paddedRect.h-2,u={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},c=o.stretchX||[[0,l]],f=o.stretchY||[[0,n]],h=(F,D)=>F+D[1]-D[0],d=c.reduce(h,0),p=f.reduce(h,0),g=l-d,m=n-p,y=0,_=d,v=0,x=p,E=0,M=g,C=0,w=m;if(o.content&&a){let F=o.content,D=F[2]-F[0],R=F[3]-F[1];(o.textFitWidth||o.textFitHeight)&&(u=j5(e)),y=R2(c,0,F[0]),v=R2(f,0,F[1]),_=R2(c,F[0],F[2]),x=R2(f,F[1],F[3]),E=F[0]-y,C=F[1]-v,M=D-_,w=R-x}let k=u.x1,T=u.y1,b=u.x2-k,S=u.y2-T,A=(F,D,R,P)=>{let z=z2(F.stretch-y,_,b,k),I=B2(F.fixed-E,M,F.stretch,d),L=z2(D.stretch-v,x,S,T),B=B2(D.fixed-C,w,D.stretch,p),O=z2(R.stretch-y,_,b,k),G=B2(R.fixed-E,M,R.stretch,d),$=z2(P.stretch-v,x,S,T),X=B2(P.fixed-C,w,P.stretch,p),Z=new zr(z,L),J=new zr(O,L),N=new zr(O,$),H=new zr(z,$),W=new zr(I/s,B/s),U=new zr(G/s,X/s),V=r*Math.PI/180;if(V){let re=Math.sin(V),se=Math.cos(V),le=[se,-re,re,se];Z._matMult(le),J._matMult(le),H._matMult(le),N._matMult(le)}let j=F.stretch+F.fixed,q=R.stretch+R.fixed,Y=D.stretch+D.fixed,K=P.stretch+P.fixed;return{tl:Z,tr:J,bl:H,br:N,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+Y,w:q-j,h:K-Y},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:W,pixelOffsetBR:U,minFontScaleX:M/s/b,minFontScaleY:w/s/S,isSDF:t}};if(!a||!o.stretchX&&!o.stretchY)i.push(A({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:l+1},{fixed:0,stretch:n+1}));else{let F=Z5(c,g,d),D=Z5(f,m,p);for(let R=0;Rf.d||!f.d)&&(f=h),!(h.max-f.d<=r)&&(i=h.h/2,o.push(new lm(h.p.x-i,h.p.y-i,i,e)),o.push(new lm(h.p.x+i,h.p.y-i,i,e)),o.push(new lm(h.p.x-i,h.p.y+i,i,e)),o.push(new lm(h.p.x+i,h.p.y+i,i,e)))}return c.d>0&&f.d-c.d<=r?c.p:f.p}function Ipe(e,r){return r.max-e.max}function Rpe(e,r){let t=!1,a=1/0;for(let i of r)for(let o=0,s=i.length,l=s-1;oe.y!=u.y>e.y&&e.x<(u.x-n.x)*(e.y-n.y)/(u.y-n.y)+n.x&&(t=!t),a=Math.min(a,e5(e,n,u))}return(t?1:-1)*Math.sqrt(a)}function zpe(e){let r=0,t=0,a=0,i=e[0];for(let o=0,s=i.length,l=s-1;oh*24);c.startsWith("top")?f[1]-=7:c.startsWith("bottom")&&(f[1]+=7),n[u+1]=f}return new Nd(n)}let s=i.get("text-variable-anchor");if(s){let l;l=e._unevaluatedLayout.getValue("text-radial-offset")===void 0?i.get("text-offset").evaluate(r,{},t).map(u=>u*24):[i.get("text-radial-offset").evaluate(r,{},t)*24,r3];let n=[];for(let u of s)n.push(u,K5(u,l));return new Nd(n)}return null}function Bpe(e){var r,t;e.bucket.createArrays();let a=512*e.bucket.overscaling;e.bucket.tilePixelRatio=xa/a,e.bucket.compareText={},e.bucket.iconsNeedLinear=!1;let i=e.bucket.layers[0],o=i.layout,s=i._unevaluatedLayout._values,l={layoutIconSize:s["icon-size"].possiblyEvaluate(new Ko(e.bucket.zoom+1),e.canonical),layoutTextSize:s["text-size"].possiblyEvaluate(new Ko(e.bucket.zoom+1),e.canonical),textMaxSize:s["text-size"].possiblyEvaluate(new Ko(18))};if(e.bucket.textSizeData.kind==="composite"){let{minZoom:h,maxZoom:d}=e.bucket.textSizeData;l.compositeTextSizes=[s["text-size"].possiblyEvaluate(new Ko(h),e.canonical),s["text-size"].possiblyEvaluate(new Ko(d),e.canonical)]}if(e.bucket.iconSizeData.kind==="composite"){let{minZoom:h,maxZoom:d}=e.bucket.iconSizeData;l.compositeIconSizes=[s["icon-size"].possiblyEvaluate(new Ko(h),e.canonical),s["icon-size"].possiblyEvaluate(new Ko(d),e.canonical)]}let n=o.get("text-line-height")*24,u=o.get("text-rotation-alignment")!=="viewport"&&o.get("symbol-placement")!=="point",c=o.get("text-keep-upright"),f=o.get("text-size");for(let h of e.bucket.features){let d=o.get("text-font").evaluate(h,{},e.canonical).join(","),p=f.evaluate(h,{},e.canonical),g=l.layoutTextSize.evaluate(h,{},e.canonical),m=l.layoutIconSize.evaluate(h,{},e.canonical),y={horizontal:{},vertical:void 0},_=h.text,v=[0,0];if(_){let C=_.toString(),w=o.get("text-letter-spacing").evaluate(h,{},e.canonical)*24,k=Nde(C)?w:0,T=o.get("text-anchor").evaluate(h,{},e.canonical),b=J5(i,h,e.canonical);if(!b){let D=o.get("text-radial-offset").evaluate(h,{},e.canonical);v=D?K5(T,[D*24,r3]):o.get("text-offset").evaluate(h,{},e.canonical).map(R=>R*24)}let S=u?"center":o.get("text-justify").evaluate(h,{},e.canonical),A=o.get("symbol-placement")==="point"?o.get("text-max-width").evaluate(h,{},e.canonical)*24:1/0,F=()=>{e.bucket.allowVerticalPlacement&&jE(C)&&(y.vertical=L2(_,e.glyphMap,e.glyphPositions,e.imagePositions,d,A,n,T,"left",k,v,2,!0,g,p))};if(!u&&b){let D=new Set;if(S==="auto")for(let P=0;P{P.x<0||P.x>=8192||P.y<0||P.y>=8192||jpe(e,P,R,t,a,i,A,e.layers[0],e.collisionBoxArray,r.index,r.sourceLayerIndex,e.index,y,[E,E,E,E],w,n,v,M,k,p,r,o,u,c,s)};if(T==="line")for(let R of Y5(r.geometry,0,0,xa,xa)){let P=Jv(R,F),z=Lpe(P,x,C,t.vertical||g,a,24,_,e.overscaling,xa);for(let I of z){let L=g;(!L||!Upe(e,L.text,b,I))&&D(P,I)}}else if(T==="line-center"){for(let R of r.geometry)if(R.length>1){let P=Jv(R,F),z=Dpe(P,C,t.vertical||g,a,24,_);z&&D(P,z)}}else if(r.type==="Polygon")for(let R of a2(r.geometry,0)){let P=Ppe(R,16);D(Jv(R[0],F,!0),new sm(P.x,P.y,0))}else if(r.type==="LineString")for(let R of r.geometry){let P=Jv(R,F);D(P,new sm(P[0].x,P[0].y,0))}else if(r.type==="Point")for(let R of r.geometry)for(let P of R)D([P],new sm(P.x,P.y,0))}function Npe(e,r){let t=e.length,a=r?.values;if(a?.length>0)for(let i=0;i32640&&vo(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):y.kind==="composite"&&(_=[128*p.compositeTextSizes[0].evaluate(s,{},g),128*p.compositeTextSizes[1].evaluate(s,{},g)],(_[0]>32640||_[1]>32640)&&vo(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),e.addSymbols(e.text,m,_,l,o,s,c,r,u.lineStartIndex,u.lineLength,d,g,n);for(let v of f)h[v]=e.text.placedSymbolArray.length-1;return m.length*4}function ez(e){for(let r in e)return e[r];return null}function jpe(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_,v,x,E,M,C,w){let k=e.addToLineVertexArray(r,t),T=l.layout.get("symbol-height-offset").evaluate(x,{},C);T>e.maxHeightOffset&&(e.maxHeightOffset=T);let b,S,A,F,D=0,R=0,P=0,z=0,I=-1,L=-1,B={},O=(0,Pw.default)("");if(e.allowVerticalPlacement&&a.vertical){let se=l.layout.get("text-rotate").evaluate(x,{},C)+90,le=a.vertical;A=new O_(n,r,u,c,f,le,h,d,p,se),s&&(F=new O_(n,r,u,c,f,s,m,y,p,se))}if(i){let se=l.layout.get("icon-rotate").evaluate(x,{}),le=l.layout.get("icon-text-fit")!=="none",ue=X5(i,se,M,le),fe=s?X5(s,se,M,le):void 0;S=new O_(n,r,u,c,f,i,m,y,!1,se),D=ue.length*4;let pe=e.iconSizeData,we=null;pe.kind==="source"?(we=[128*l.layout.get("icon-size").evaluate(x,{})],we[0]>32640&&vo(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):pe.kind==="composite"&&(we=[128*E.compositeIconSizes[0].evaluate(x,{},C),128*E.compositeIconSizes[1].evaluate(x,{},C)],(we[0]>32640||we[1]>32640)&&vo(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),e.addSymbols(e.icon,ue,we,v,_,x,0,r,k.lineStartIndex,k.lineLength,-1,C,T),I=e.icon.placedSymbolArray.length-1,fe&&(R=fe.length*4,e.addSymbols(e.icon,fe,we,v,_,x,2,r,k.lineStartIndex,k.lineLength,-1,C,T),L=e.icon.placedSymbolArray.length-1)}let G=Object.keys(a.horizontal);for(let se of G){let le=a.horizontal[se];b||(b=(O=(0,Pw.default)(le.text),new O_(n,r,u,c,f,le,h,d,p,l.layout.get("text-rotate").evaluate(x,{},C))));let ue=le.positionedLines.length===1;if(P+=Q5(e,r,le,o,l,p,x,g,T,k,a.vertical?1:3,ue?G:[se],B,I,E,C),ue)break}a.vertical&&(z+=Q5(e,r,a.vertical,o,l,p,x,g,T,k,2,["vertical"],B,L,E,C));let $=b?b.boxStartIndex:e.collisionBoxArray.length,X=b?b.boxEndIndex:e.collisionBoxArray.length,Z=A?A.boxStartIndex:e.collisionBoxArray.length,J=A?A.boxEndIndex:e.collisionBoxArray.length,N=S?S.boxStartIndex:e.collisionBoxArray.length,H=S?S.boxEndIndex:e.collisionBoxArray.length,W=F?F.boxStartIndex:e.collisionBoxArray.length,U=F?F.boxEndIndex:e.collisionBoxArray.length,V=-1,j=(se,le)=>se?.circleDiameter?Math.max(se.circleDiameter,le):le;V=j(b,V),V=j(A,V),V=j(S,V),V=j(F,V);let q=+(V>-1);q&&(V*=w/24),e.glyphOffsetArray.length>=e.maxGlyphs&&vo("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),x.sortKey!==void 0&&e.addToSortKeyRanges(e.symbolInstances.length,x.sortKey);let Y=J5(l,x,C),[K,re]=Npe(e.textAnchorOffsets,Y);e.symbolInstances.emplaceBack(r.x,r.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,I,L,O,$,X,Z,J,N,H,W,U,u,P,z,D,R,q,0,h,V,K,re,T)}function Upe(e,r,t,a){let i=e.compareText;if(!(r in i))i[r]=[];else{let o=i[r];for(let s=o.length-1;s>=0;s--)if(a.dist(o[s])e&&a in e?String(e[a]):"")}function Gpe(e,r,t,a=1){var i;let o=(i=e.get("icon-padding").evaluate(r,{},t))==null?void 0:i.values;return[o[0]*a,o[1]*a,o[2]*a,o[3]*a]}function Hpe(e){let r=[],t=e.id;return t===void 0&&r.push(new qa(`layers.${t}`,null,'missing required property "id"')),e.render===void 0&&r.push(new qa(`layers.${t}`,null,'missing required method "render"')),e.renderingMode&&e.renderingMode!=="2d"&&e.renderingMode!=="3d"&&r.push(new qa(`layers.${t}`,null,'property "renderingMode" must be either "2d" or "3d"')),r}function GE(e,r){if(e.type==="custom")return new TN(e,r);switch(e.type){case"background":return new wN(e,r);case"circle":return new tO(e,r);case"color-relief":return new gO(e,r);case"fill":return new EO(e,r);case"fill-extrusion":return new OO(e,r);case"heatmap":return new oO(e,r);case"hillshade":return new fO(e,r);case"line":return new ZO(e,r);case"raster":return new SB(e,r);case"symbol":return new gN(e,r)}}function Wpe(e,r,t){return!(e<0||e>25||t<0||t>=2**e||r<0||r>=2**e)}function tz(e,r){let{x:t,y:a}=$o.fromLngLat(r);return!(e<0||e>25||a<0||a>=1||t<0||t>=1)}function _1(e,r,t,a,i){e*=2,e<0&&(e=e*-1-1);let o=1<0;i--){let o=1<>>0;return((r&255)<<24|(r&65280)<<8|r>>>8&65280|r>>>24&255)>>>0}function Jpe(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0;t[i++]=o>>>0&3,t[i++]=o>>>2&3,t[i++]=o>>>4&3,t[i++]=o>>>6&3,t[i++]=o>>>8&3,t[i++]=o>>>10&3,t[i++]=o>>>12&3,t[i++]=o>>>14&3,t[i++]=o>>>16&3,t[i++]=o>>>18&3,t[i++]=o>>>20&3,t[i++]=o>>>22&3,t[i++]=o>>>24&3,t[i++]=o>>>26&3,t[i++]=o>>>28&3,t[i++]=o>>>30&3,t[i++]=s>>>0&3,t[i++]=s>>>2&3,t[i++]=s>>>4&3,t[i++]=s>>>6&3,t[i++]=s>>>8&3,t[i++]=s>>>10&3,t[i++]=s>>>12&3,t[i++]=s>>>14&3,t[i++]=s>>>16&3,t[i++]=s>>>18&3,t[i++]=s>>>20&3,t[i++]=s>>>22&3,t[i++]=s>>>24&3,t[i++]=s>>>26&3,t[i++]=s>>>28&3,t[i]=s>>>30&3}function Qpe(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0;t[i++]=o>>>0&7,t[i++]=o>>>3&7,t[i++]=o>>>6&7,t[i++]=o>>>9&7,t[i++]=o>>>12&7,t[i++]=o>>>15&7,t[i++]=o>>>18&7,t[i++]=o>>>21&7,t[i++]=o>>>24&7,t[i++]=o>>>27&7,t[i++]=(o>>>30|(s&1)<<2)&7,t[i++]=s>>>1&7,t[i++]=s>>>4&7,t[i++]=s>>>7&7,t[i++]=s>>>10&7,t[i++]=s>>>13&7,t[i++]=s>>>16&7,t[i++]=s>>>19&7,t[i++]=s>>>22&7,t[i++]=s>>>25&7,t[i++]=s>>>28&7,t[i++]=(s>>>31|(l&3)<<1)&7,t[i++]=l>>>2&7,t[i++]=l>>>5&7,t[i++]=l>>>8&7,t[i++]=l>>>11&7,t[i++]=l>>>14&7,t[i++]=l>>>17&7,t[i++]=l>>>20&7,t[i++]=l>>>23&7,t[i++]=l>>>26&7,t[i]=l>>>29&7}function e0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0;t[i++]=o>>>0&15,t[i++]=o>>>4&15,t[i++]=o>>>8&15,t[i++]=o>>>12&15,t[i++]=o>>>16&15,t[i++]=o>>>20&15,t[i++]=o>>>24&15,t[i++]=o>>>28&15,t[i++]=s>>>0&15,t[i++]=s>>>4&15,t[i++]=s>>>8&15,t[i++]=s>>>12&15,t[i++]=s>>>16&15,t[i++]=s>>>20&15,t[i++]=s>>>24&15,t[i++]=s>>>28&15,t[i++]=l>>>0&15,t[i++]=l>>>4&15,t[i++]=l>>>8&15,t[i++]=l>>>12&15,t[i++]=l>>>16&15,t[i++]=l>>>20&15,t[i++]=l>>>24&15,t[i++]=l>>>28&15,t[i++]=n>>>0&15,t[i++]=n>>>4&15,t[i++]=n>>>8&15,t[i++]=n>>>12&15,t[i++]=n>>>16&15,t[i++]=n>>>20&15,t[i++]=n>>>24&15,t[i]=n>>>28&15}function t0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0;t[i++]=o>>>0&31,t[i++]=o>>>5&31,t[i++]=o>>>10&31,t[i++]=o>>>15&31,t[i++]=o>>>20&31,t[i++]=o>>>25&31,t[i++]=(o>>>30|(s&7)<<2)&31,t[i++]=s>>>3&31,t[i++]=s>>>8&31,t[i++]=s>>>13&31,t[i++]=s>>>18&31,t[i++]=s>>>23&31,t[i++]=(s>>>28|(l&1)<<4)&31,t[i++]=l>>>1&31,t[i++]=l>>>6&31,t[i++]=l>>>11&31,t[i++]=l>>>16&31,t[i++]=l>>>21&31,t[i++]=l>>>26&31,t[i++]=(l>>>31|(n&15)<<1)&31,t[i++]=n>>>4&31,t[i++]=n>>>9&31,t[i++]=n>>>14&31,t[i++]=n>>>19&31,t[i++]=n>>>24&31,t[i++]=(n>>>29|(u&3)<<3)&31,t[i++]=u>>>2&31,t[i++]=u>>>7&31,t[i++]=u>>>12&31,t[i++]=u>>>17&31,t[i++]=u>>>22&31,t[i]=u>>>27&31}function r0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0;t[i++]=o>>>0&63,t[i++]=o>>>6&63,t[i++]=o>>>12&63,t[i++]=o>>>18&63,t[i++]=o>>>24&63,t[i++]=(o>>>30|(s&15)<<2)&63,t[i++]=s>>>4&63,t[i++]=s>>>10&63,t[i++]=s>>>16&63,t[i++]=s>>>22&63,t[i++]=(s>>>28|(l&3)<<4)&63,t[i++]=l>>>2&63,t[i++]=l>>>8&63,t[i++]=l>>>14&63,t[i++]=l>>>20&63,t[i++]=l>>>26&63,t[i++]=n>>>0&63,t[i++]=n>>>6&63,t[i++]=n>>>12&63,t[i++]=n>>>18&63,t[i++]=n>>>24&63,t[i++]=(n>>>30|(u&15)<<2)&63,t[i++]=u>>>4&63,t[i++]=u>>>10&63,t[i++]=u>>>16&63,t[i++]=u>>>22&63,t[i++]=(u>>>28|(c&3)<<4)&63,t[i++]=c>>>2&63,t[i++]=c>>>8&63,t[i++]=c>>>14&63,t[i++]=c>>>20&63,t[i]=c>>>26&63}function a0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0;t[i++]=o>>>0&127,t[i++]=o>>>7&127,t[i++]=o>>>14&127,t[i++]=o>>>21&127,t[i++]=(o>>>28|(s&7)<<4)&127,t[i++]=s>>>3&127,t[i++]=s>>>10&127,t[i++]=s>>>17&127,t[i++]=s>>>24&127,t[i++]=(s>>>31|(l&63)<<1)&127,t[i++]=l>>>6&127,t[i++]=l>>>13&127,t[i++]=l>>>20&127,t[i++]=(l>>>27|(n&3)<<5)&127,t[i++]=n>>>2&127,t[i++]=n>>>9&127,t[i++]=n>>>16&127,t[i++]=n>>>23&127,t[i++]=(n>>>30|(u&31)<<2)&127,t[i++]=u>>>5&127,t[i++]=u>>>12&127,t[i++]=u>>>19&127,t[i++]=(u>>>26|(c&1)<<6)&127,t[i++]=c>>>1&127,t[i++]=c>>>8&127,t[i++]=c>>>15&127,t[i++]=c>>>22&127,t[i++]=(c>>>29|(f&15)<<3)&127,t[i++]=f>>>4&127,t[i++]=f>>>11&127,t[i++]=f>>>18&127,t[i]=f>>>25&127}function i0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0;t[i++]=o>>>0&255,t[i++]=o>>>8&255,t[i++]=o>>>16&255,t[i++]=o>>>24&255,t[i++]=s>>>0&255,t[i++]=s>>>8&255,t[i++]=s>>>16&255,t[i++]=s>>>24&255,t[i++]=l>>>0&255,t[i++]=l>>>8&255,t[i++]=l>>>16&255,t[i++]=l>>>24&255,t[i++]=n>>>0&255,t[i++]=n>>>8&255,t[i++]=n>>>16&255,t[i++]=n>>>24&255,t[i++]=u>>>0&255,t[i++]=u>>>8&255,t[i++]=u>>>16&255,t[i++]=u>>>24&255,t[i++]=c>>>0&255,t[i++]=c>>>8&255,t[i++]=c>>>16&255,t[i++]=c>>>24&255,t[i++]=f>>>0&255,t[i++]=f>>>8&255,t[i++]=f>>>16&255,t[i++]=f>>>24&255,t[i++]=h>>>0&255,t[i++]=h>>>8&255,t[i++]=h>>>16&255,t[i]=h>>>24&255}function n0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0,d=e[r+8]>>>0;t[i++]=o>>>0&511,t[i++]=o>>>9&511,t[i++]=o>>>18&511,t[i++]=(o>>>27|(s&15)<<5)&511,t[i++]=s>>>4&511,t[i++]=s>>>13&511,t[i++]=s>>>22&511,t[i++]=(s>>>31|(l&255)<<1)&511,t[i++]=l>>>8&511,t[i++]=l>>>17&511,t[i++]=(l>>>26|(n&7)<<6)&511,t[i++]=n>>>3&511,t[i++]=n>>>12&511,t[i++]=n>>>21&511,t[i++]=(n>>>30|(u&127)<<2)&511,t[i++]=u>>>7&511,t[i++]=u>>>16&511,t[i++]=(u>>>25|(c&3)<<7)&511,t[i++]=c>>>2&511,t[i++]=c>>>11&511,t[i++]=c>>>20&511,t[i++]=(c>>>29|(f&63)<<3)&511,t[i++]=f>>>6&511,t[i++]=f>>>15&511,t[i++]=(f>>>24|(h&1)<<8)&511,t[i++]=h>>>1&511,t[i++]=h>>>10&511,t[i++]=h>>>19&511,t[i++]=(h>>>28|(d&31)<<4)&511,t[i++]=d>>>5&511,t[i++]=d>>>14&511,t[i]=d>>>23&511}function o0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0,d=e[r+8]>>>0,p=e[r+9]>>>0;t[i++]=o>>>0&1023,t[i++]=o>>>10&1023,t[i++]=o>>>20&1023,t[i++]=(o>>>30|(s&255)<<2)&1023,t[i++]=s>>>8&1023,t[i++]=s>>>18&1023,t[i++]=(s>>>28|(l&63)<<4)&1023,t[i++]=l>>>6&1023,t[i++]=l>>>16&1023,t[i++]=(l>>>26|(n&15)<<6)&1023,t[i++]=n>>>4&1023,t[i++]=n>>>14&1023,t[i++]=(n>>>24|(u&3)<<8)&1023,t[i++]=u>>>2&1023,t[i++]=u>>>12&1023,t[i++]=u>>>22&1023,t[i++]=c>>>0&1023,t[i++]=c>>>10&1023,t[i++]=c>>>20&1023,t[i++]=(c>>>30|(f&255)<<2)&1023,t[i++]=f>>>8&1023,t[i++]=f>>>18&1023,t[i++]=(f>>>28|(h&63)<<4)&1023,t[i++]=h>>>6&1023,t[i++]=h>>>16&1023,t[i++]=(h>>>26|(d&15)<<6)&1023,t[i++]=d>>>4&1023,t[i++]=d>>>14&1023,t[i++]=(d>>>24|(p&3)<<8)&1023,t[i++]=p>>>2&1023,t[i++]=p>>>12&1023,t[i]=p>>>22&1023}function s0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0,d=e[r+8]>>>0,p=e[r+9]>>>0,g=e[r+10]>>>0;t[i++]=o>>>0&2047,t[i++]=o>>>11&2047,t[i++]=(o>>>22|(s&1)<<10)&2047,t[i++]=s>>>1&2047,t[i++]=s>>>12&2047,t[i++]=(s>>>23|(l&3)<<9)&2047,t[i++]=l>>>2&2047,t[i++]=l>>>13&2047,t[i++]=(l>>>24|(n&7)<<8)&2047,t[i++]=n>>>3&2047,t[i++]=n>>>14&2047,t[i++]=(n>>>25|(u&15)<<7)&2047,t[i++]=u>>>4&2047,t[i++]=u>>>15&2047,t[i++]=(u>>>26|(c&31)<<6)&2047,t[i++]=c>>>5&2047,t[i++]=c>>>16&2047,t[i++]=(c>>>27|(f&63)<<5)&2047,t[i++]=f>>>6&2047,t[i++]=f>>>17&2047,t[i++]=(f>>>28|(h&127)<<4)&2047,t[i++]=h>>>7&2047,t[i++]=h>>>18&2047,t[i++]=(h>>>29|(d&255)<<3)&2047,t[i++]=d>>>8&2047,t[i++]=d>>>19&2047,t[i++]=(d>>>30|(p&511)<<2)&2047,t[i++]=p>>>9&2047,t[i++]=p>>>20&2047,t[i++]=(p>>>31|(g&1023)<<1)&2047,t[i++]=g>>>10&2047,t[i]=g>>>21&2047}function l0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0,d=e[r+8]>>>0,p=e[r+9]>>>0,g=e[r+10]>>>0,m=e[r+11]>>>0;t[i++]=o>>>0&4095,t[i++]=o>>>12&4095,t[i++]=(o>>>24|(s&15)<<8)&4095,t[i++]=s>>>4&4095,t[i++]=s>>>16&4095,t[i++]=(s>>>28|(l&255)<<4)&4095,t[i++]=l>>>8&4095,t[i++]=l>>>20&4095,t[i++]=n>>>0&4095,t[i++]=n>>>12&4095,t[i++]=(n>>>24|(u&15)<<8)&4095,t[i++]=u>>>4&4095,t[i++]=u>>>16&4095,t[i++]=(u>>>28|(c&255)<<4)&4095,t[i++]=c>>>8&4095,t[i++]=c>>>20&4095,t[i++]=f>>>0&4095,t[i++]=f>>>12&4095,t[i++]=(f>>>24|(h&15)<<8)&4095,t[i++]=h>>>4&4095,t[i++]=h>>>16&4095,t[i++]=(h>>>28|(d&255)<<4)&4095,t[i++]=d>>>8&4095,t[i++]=d>>>20&4095,t[i++]=p>>>0&4095,t[i++]=p>>>12&4095,t[i++]=(p>>>24|(g&15)<<8)&4095,t[i++]=g>>>4&4095,t[i++]=g>>>16&4095,t[i++]=(g>>>28|(m&255)<<4)&4095,t[i++]=m>>>8&4095,t[i]=m>>>20&4095}function u0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0,d=e[r+8]>>>0,p=e[r+9]>>>0,g=e[r+10]>>>0,m=e[r+11]>>>0,y=e[r+12]>>>0,_=e[r+13]>>>0,v=e[r+14]>>>0,x=e[r+15]>>>0;t[i++]=o>>>0&65535,t[i++]=o>>>16&65535,t[i++]=s>>>0&65535,t[i++]=s>>>16&65535,t[i++]=l>>>0&65535,t[i++]=l>>>16&65535,t[i++]=n>>>0&65535,t[i++]=n>>>16&65535,t[i++]=u>>>0&65535,t[i++]=u>>>16&65535,t[i++]=c>>>0&65535,t[i++]=c>>>16&65535,t[i++]=f>>>0&65535,t[i++]=f>>>16&65535,t[i++]=h>>>0&65535,t[i++]=h>>>16&65535,t[i++]=d>>>0&65535,t[i++]=d>>>16&65535,t[i++]=p>>>0&65535,t[i++]=p>>>16&65535,t[i++]=g>>>0&65535,t[i++]=g>>>16&65535,t[i++]=m>>>0&65535,t[i++]=m>>>16&65535,t[i++]=y>>>0&65535,t[i++]=y>>>16&65535,t[i++]=_>>>0&65535,t[i++]=_>>>16&65535,t[i++]=v>>>0&65535,t[i++]=v>>>16&65535,t[i++]=x>>>0&65535,t[i]=x>>>16&65535}function c0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0;t[i++]=l>>>0&1,t[i++]=l>>>1&1,t[i++]=l>>>2&1,t[i++]=l>>>3&1,t[i++]=l>>>4&1,t[i++]=l>>>5&1,t[i++]=l>>>6&1,t[i++]=l>>>7&1,t[i++]=l>>>8&1,t[i++]=l>>>9&1,t[i++]=l>>>10&1,t[i++]=l>>>11&1,t[i++]=l>>>12&1,t[i++]=l>>>13&1,t[i++]=l>>>14&1,t[i++]=l>>>15&1,t[i++]=l>>>16&1,t[i++]=l>>>17&1,t[i++]=l>>>18&1,t[i++]=l>>>19&1,t[i++]=l>>>20&1,t[i++]=l>>>21&1,t[i++]=l>>>22&1,t[i++]=l>>>23&1,t[i++]=l>>>24&1,t[i++]=l>>>25&1,t[i++]=l>>>26&1,t[i++]=l>>>27&1,t[i++]=l>>>28&1,t[i++]=l>>>29&1,t[i++]=l>>>30&1,t[i++]=l>>>31&1}}function f0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0;t[i++]=l>>>0&3,t[i++]=l>>>2&3,t[i++]=l>>>4&3,t[i++]=l>>>6&3,t[i++]=l>>>8&3,t[i++]=l>>>10&3,t[i++]=l>>>12&3,t[i++]=l>>>14&3,t[i++]=l>>>16&3,t[i++]=l>>>18&3,t[i++]=l>>>20&3,t[i++]=l>>>22&3,t[i++]=l>>>24&3,t[i++]=l>>>26&3,t[i++]=l>>>28&3,t[i++]=l>>>30&3,t[i++]=n>>>0&3,t[i++]=n>>>2&3,t[i++]=n>>>4&3,t[i++]=n>>>6&3,t[i++]=n>>>8&3,t[i++]=n>>>10&3,t[i++]=n>>>12&3,t[i++]=n>>>14&3,t[i++]=n>>>16&3,t[i++]=n>>>18&3,t[i++]=n>>>20&3,t[i++]=n>>>22&3,t[i++]=n>>>24&3,t[i++]=n>>>26&3,t[i++]=n>>>28&3,t[i++]=n>>>30&3}}function h0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0;t[i++]=l>>>0&7,t[i++]=l>>>3&7,t[i++]=l>>>6&7,t[i++]=l>>>9&7,t[i++]=l>>>12&7,t[i++]=l>>>15&7,t[i++]=l>>>18&7,t[i++]=l>>>21&7,t[i++]=l>>>24&7,t[i++]=l>>>27&7,t[i++]=(l>>>30|(n&1)<<2)&7,t[i++]=n>>>1&7,t[i++]=n>>>4&7,t[i++]=n>>>7&7,t[i++]=n>>>10&7,t[i++]=n>>>13&7,t[i++]=n>>>16&7,t[i++]=n>>>19&7,t[i++]=n>>>22&7,t[i++]=n>>>25&7,t[i++]=n>>>28&7,t[i++]=(n>>>31|(u&3)<<1)&7,t[i++]=u>>>2&7,t[i++]=u>>>5&7,t[i++]=u>>>8&7,t[i++]=u>>>11&7,t[i++]=u>>>14&7,t[i++]=u>>>17&7,t[i++]=u>>>20&7,t[i++]=u>>>23&7,t[i++]=u>>>26&7,t[i++]=u>>>29&7}}function d0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0;t[i++]=l>>>0&15,t[i++]=l>>>4&15,t[i++]=l>>>8&15,t[i++]=l>>>12&15,t[i++]=l>>>16&15,t[i++]=l>>>20&15,t[i++]=l>>>24&15,t[i++]=l>>>28&15,t[i++]=n>>>0&15,t[i++]=n>>>4&15,t[i++]=n>>>8&15,t[i++]=n>>>12&15,t[i++]=n>>>16&15,t[i++]=n>>>20&15,t[i++]=n>>>24&15,t[i++]=n>>>28&15,t[i++]=u>>>0&15,t[i++]=u>>>4&15,t[i++]=u>>>8&15,t[i++]=u>>>12&15,t[i++]=u>>>16&15,t[i++]=u>>>20&15,t[i++]=u>>>24&15,t[i++]=u>>>28&15,t[i++]=c>>>0&15,t[i++]=c>>>4&15,t[i++]=c>>>8&15,t[i++]=c>>>12&15,t[i++]=c>>>16&15,t[i++]=c>>>20&15,t[i++]=c>>>24&15,t[i++]=c>>>28&15}}function p0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0,f=e[o++]>>>0;t[i++]=l>>>0&31,t[i++]=l>>>5&31,t[i++]=l>>>10&31,t[i++]=l>>>15&31,t[i++]=l>>>20&31,t[i++]=l>>>25&31,t[i++]=(l>>>30|(n&7)<<2)&31,t[i++]=n>>>3&31,t[i++]=n>>>8&31,t[i++]=n>>>13&31,t[i++]=n>>>18&31,t[i++]=n>>>23&31,t[i++]=(n>>>28|(u&1)<<4)&31,t[i++]=u>>>1&31,t[i++]=u>>>6&31,t[i++]=u>>>11&31,t[i++]=u>>>16&31,t[i++]=u>>>21&31,t[i++]=u>>>26&31,t[i++]=(u>>>31|(c&15)<<1)&31,t[i++]=c>>>4&31,t[i++]=c>>>9&31,t[i++]=c>>>14&31,t[i++]=c>>>19&31,t[i++]=c>>>24&31,t[i++]=(c>>>29|(f&3)<<3)&31,t[i++]=f>>>2&31,t[i++]=f>>>7&31,t[i++]=f>>>12&31,t[i++]=f>>>17&31,t[i++]=f>>>22&31,t[i++]=f>>>27&31}}function v0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0,f=e[o++]>>>0,h=e[o++]>>>0;t[i++]=l>>>0&63,t[i++]=l>>>6&63,t[i++]=l>>>12&63,t[i++]=l>>>18&63,t[i++]=l>>>24&63,t[i++]=(l>>>30|(n&15)<<2)&63,t[i++]=n>>>4&63,t[i++]=n>>>10&63,t[i++]=n>>>16&63,t[i++]=n>>>22&63,t[i++]=(n>>>28|(u&3)<<4)&63,t[i++]=u>>>2&63,t[i++]=u>>>8&63,t[i++]=u>>>14&63,t[i++]=u>>>20&63,t[i++]=u>>>26&63,t[i++]=c>>>0&63,t[i++]=c>>>6&63,t[i++]=c>>>12&63,t[i++]=c>>>18&63,t[i++]=c>>>24&63,t[i++]=(c>>>30|(f&15)<<2)&63,t[i++]=f>>>4&63,t[i++]=f>>>10&63,t[i++]=f>>>16&63,t[i++]=f>>>22&63,t[i++]=(f>>>28|(h&3)<<4)&63,t[i++]=h>>>2&63,t[i++]=h>>>8&63,t[i++]=h>>>14&63,t[i++]=h>>>20&63,t[i++]=h>>>26&63}}function m0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0,f=e[o++]>>>0,h=e[o++]>>>0,d=e[o++]>>>0;t[i++]=l>>>0&127,t[i++]=l>>>7&127,t[i++]=l>>>14&127,t[i++]=l>>>21&127,t[i++]=(l>>>28|(n&7)<<4)&127,t[i++]=n>>>3&127,t[i++]=n>>>10&127,t[i++]=n>>>17&127,t[i++]=n>>>24&127,t[i++]=(n>>>31|(u&63)<<1)&127,t[i++]=u>>>6&127,t[i++]=u>>>13&127,t[i++]=u>>>20&127,t[i++]=(u>>>27|(c&3)<<5)&127,t[i++]=c>>>2&127,t[i++]=c>>>9&127,t[i++]=c>>>16&127,t[i++]=c>>>23&127,t[i++]=(c>>>30|(f&31)<<2)&127,t[i++]=f>>>5&127,t[i++]=f>>>12&127,t[i++]=f>>>19&127,t[i++]=(f>>>26|(h&1)<<6)&127,t[i++]=h>>>1&127,t[i++]=h>>>8&127,t[i++]=h>>>15&127,t[i++]=h>>>22&127,t[i++]=(h>>>29|(d&15)<<3)&127,t[i++]=d>>>4&127,t[i++]=d>>>11&127,t[i++]=d>>>18&127,t[i++]=d>>>25&127}}function g0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0,f=e[o++]>>>0,h=e[o++]>>>0,d=e[o++]>>>0,p=e[o++]>>>0;t[i++]=l>>>0&255,t[i++]=l>>>8&255,t[i++]=l>>>16&255,t[i++]=l>>>24&255,t[i++]=n>>>0&255,t[i++]=n>>>8&255,t[i++]=n>>>16&255,t[i++]=n>>>24&255,t[i++]=u>>>0&255,t[i++]=u>>>8&255,t[i++]=u>>>16&255,t[i++]=u>>>24&255,t[i++]=c>>>0&255,t[i++]=c>>>8&255,t[i++]=c>>>16&255,t[i++]=c>>>24&255,t[i++]=f>>>0&255,t[i++]=f>>>8&255,t[i++]=f>>>16&255,t[i++]=f>>>24&255,t[i++]=h>>>0&255,t[i++]=h>>>8&255,t[i++]=h>>>16&255,t[i++]=h>>>24&255,t[i++]=d>>>0&255,t[i++]=d>>>8&255,t[i++]=d>>>16&255,t[i++]=d>>>24&255,t[i++]=p>>>0&255,t[i++]=p>>>8&255,t[i++]=p>>>16&255,t[i++]=p>>>24&255}}function y0e(e,r,t,a){let i=a,o=r;for(let s=0;s<128;s++){let l=e[o++]>>>0;t[i++]=l&65535,t[i++]=l>>>16&65535}}function _0e(e,r,t,a,i){let o=h3[i]>>>0,s=r,l=0,n=e[s]>>>0,u=a;for(let c=0;c<8;c++){for(let f=0;f<32;f++)if(l+i<=32){let h=n>>>l&o;t[u+f]=h|0,l+=i,l===32&&(l=0,s++,f!==31&&(n=e[s]>>>0))}else{let h=32-l,d=n>>>l;s++,n=e[s]>>>0;let p=i-h,g=-1>>>32-p>>>0,m=(d|(n&g)<>>0)}}function iz(){let e=new Uint8Array(DN);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:e,byteContainerI32:new Int32Array(e.buffer,e.byteOffset,e.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function x0e(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);let r=Math.max(16,e|0);return{encodedWords:new Uint32Array(r),decoderWorkspace:iz()}}function b0e(e,r){if(r<=e.encodedWords.length)return e.encodedWords;let t=new Uint32Array(Math.max(16,r*2));return e.encodedWords=t,t}function w0e(e,r,t,a){a.byteContainer.length>>2;if(i.byteOffset&3)for(let l=0;l>>8&255,i[u+2|0]=n>>>16&255,i[u+3|0]=n>>>24&255}else{let l=a.byteContainerI32;(!l||l.buffer!==i.buffer||l.byteOffset!==i.byteOffset||l.length>>2)),l.set(e.subarray(r,r+o))}let s=t&3;if(s>0){let l=e[r+o|0]|0,n=o<<2;for(let u=0;u>>(u<<3)&255}return i}function A0e(e,r,t){let a=e[r++]|0,i=t.dataToBePacked;for(let o=2;o<=32;o=o+1|0){if(!(a>>>o-1&1))continue;if(r>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${o}, streamWordIndex=${r}, needWords=1, availableWords=${e.length-r}, encodedWords=${e.length})`);let s=e[r++]>>>0,l=Xpe(s),n=s*o+31>>>5;if(r+n>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${o}, size=${s}, streamWordIndex=${r}, needWords=${n}, availableWords=${e.length-r}, encodedWords=${e.length})`);let u=i[o];(!u||u.length>>5)|0,t.exceptionSizes[o]=s}return r}function T0e(e,r,t,a,i){switch(i){case 1:c0e(e,r,t,a);break;case 2:f0e(e,r,t,a);break;case 3:h0e(e,r,t,a);break;case 4:d0e(e,r,t,a);break;case 5:p0e(e,r,t,a);break;case 6:v0e(e,r,t,a);break;case 7:m0e(e,r,t,a);break;case 8:g0e(e,r,t,a);break;case 16:y0e(e,r,t,a);break;default:_0e(e,r,t,a,i)}return r+(i<<3)|0}function M0e(e,r,t,a){if(t+2>r)throw Error(`FastPFOR decode: byteContainer underflow at block=${a} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${t}, byteSize=${r})`);let i=e[t++],o=e[t++];if(i>32)throw Error(`FastPFOR decode: invalid bitWidth=${i} at block=${a} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:i,exceptionCount:o,bytePosIn:t}}function E0e(e,r,t,a,i,o){if(t+1>r)throw Error(`FastPFOR decode: exception header underflow at block=${o} (need 1 byte for maxBits, bytePos=${t}, byteSize=${r})`);let s=e[t++];if(s32)throw Error(`FastPFOR decode: invalid maxBits=${s} at block=${o} (bitWidth=${a}, expected ${a}..32)`);let l=s-a|0;if(l<1||l>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${l} at block=${o} (bitWidth=${a}, maxBits=${s})`);if(t+i>r)throw Error(`FastPFOR decode: exception positions underflow at block=${o} (need=${i}, have=${r-t})`);return{maxBits:s,exceptionBitWidth:l,bytePosIn:t}}function S0e(e,r,t,a,i,o,s,l,n){let{maxBits:u,exceptionBitWidth:c,bytePosIn:f}=E0e(i,o,s,t,a,n);if(s=f,c===1){let m=1<g)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${c} (ptr=${p}, need ${a}, size=${g}) at block ${n}`);for(let m=0;m0&&(f=S0e(i,m,p,g,l,n,f,u,h))}if(c!==a)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${r}, packedStart=${t}, consumedPackedEnd=${c}, expectedPackedEnd=${a}, packedWords=${a-t}, encoded.length=${e.length})`)}function C0e(e,r,t,a,i,o){let s=t|0,l=e[s]|0;if(l<=0||s+l>e.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${l} at pageStart=${s} (expected > 0 and pageStart+whereMeta < encoded.length=${e.length})`);let n=s+1|0,u=s+l|0,c=e[u]>>>0,f=c+3>>>2,h=u+1,d=h+f;if(d>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${c} (metaInts=${f}, pageStart=${s}, packedEnd=${u}, byteContainerStart=${h}) causes bitmapPos=${d} out of bounds (encoded.length=${e.length})`);let p=w0e(e,h,c,o),g=c,m=A0e(e,d,o);return o.dataPointers.fill(0),k0e(e,s,n,u,r,a|0,i/256|0,p,g,o),m}function D0e(e,r,t,a,i,o){let s=a+HE(i,256),l=a,n=t;for(;l!==s;){let u=Math.min(d3,s-l);n=C0e(e,r,n,l,u,o),l=l+u|0}return n}function L0e(e,r,t,a,i,o){if(o===0)return r;let s=0,l=r,n=r+t,u=i,c=i,f=i+o,h=0,d=0;for(;l>>s&255;if(s+=8,l+=s>>>5,s&=31,h|=(p&127)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${d}, partial=${h}, decoded=${c-u}/${o}, inPos=${l}, inEnd=${n})`)}if(c!==f)throw Error(`FastPFOR VByte: truncated stream (decoded=${c-u}, expected=${o}, consumedWords=${l-r}/${t}, vbyteStart=${r}, vbyteEnd=${n})`);return l}function F0e(e,r,t){let a=0,i=0,o=new Uint32Array(r),s=t??iz();if(e.length>0){let u=e[a]|0;if(a=a+1|0,u&255)throw Error(`FastPFOR decode: invalid alignedLength=${u} (expected multiple of 256)`);if(i+u>o.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${i}, alignedLength=${u}, out.length=${o.length})`);a=D0e(e,o,a,i,u,s),i=i+u|0}let l=e.length-a|0,n=r-i|0;return L0e(e,a,l,o,i,n),o}function P0e(e,r,t,a,i){switch(i){case 2:Jpe(e,r,t,a);return;case 3:Qpe(e,r,t,a);return;case 4:e0e(e,r,t,a);return;case 5:t0e(e,r,t,a);return;case 6:r0e(e,r,t,a);return;case 7:a0e(e,r,t,a);return;case 8:i0e(e,r,t,a);return;case 9:n0e(e,r,t,a);return;case 10:o0e(e,r,t,a);return;case 11:s0e(e,r,t,a);return;case 12:l0e(e,r,t,a);return;case 16:u0e(e,r,t,a);return;case 32:for(let u=0;u<32;u=u+1|0)t[a+u|0]=e[r+u|0]|0;return}let o=h3[i]>>>0,s=r,l=0,n=e[s]>>>0;for(let u=0;u<32;u++)if(l+i<=32){let c=n>>>l&o;t[a+u]=c|0,l+=i,l===32&&(l=0,s++,u!==31&&(n=e[s]>>>0))}else{let c=32-l,f=n>>>l;s++,n=e[s]>>>0;let h=h3[i-c]>>>0,d=(f|(n&h)<e.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${r}, byteLength=${t}, bytes.length=${e.length})`);let i=Math.floor(t/4),o=t%4!=0,s=o?i+1:i;if(a.length0){let l=e.byteOffset+r;if(l&3)for(let n=0;n=64)throw Error("Varint too long")}return r.set(i),t}function z0e(e,r,t){let a=new Float64Array(t);for(let i=0;i>4,i<128||(i=r[t.get()],t.increment(),a|=(i&127)<<3,i<128)||(i=r[t.get()],t.increment(),a|=(i&127)<<10,i<128)||(i=r[t.get()],t.increment(),a|=(i&127)<<17,i<128)||(i=r[t.get()],t.increment(),a|=(i&127)<<24,i<128)||(i=r[t.get()],t.increment(),a|=(i&1)<<31,i<128))return a*4294967296+(e>>>0);throw Error("Expected varint not more than 10 bytes")}function N0e(e,r,t,a){return j0e(e,r,t,a,x0e(t>>>2))}function j0e(e,r,t,a,i){let o=a.get();if(t&3)throw Error(`FastPFOR: invalid encodedByteLength=${t} at offset=${o} (encodedBytes.length=${e.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let s=t>>>2,l=b0e(i,s);I0e(e,o,t,l);let n=F0e(l.subarray(0,s),r,i.decoderWorkspace);return a.add(t),n}function Lo(e){return e>>>1^-(e&1)}function Ec(e){return e>>BigInt("1")^-(e&BigInt("1"))}function L0(e){return e%2==1?(e+1)/-2:e/2}function U0e(e){let r=new Int32Array(e.length);for(let t=0;t=4)for(;a=4)for(;a=4)for(;t=4)for(let a=e[0];t=4)for(;a=4)for(;n>>0;for(let t=1;t>>0;return r}function cz(e){let r=new BigUint64Array(e.length);r[0]=BigInt.asUintN(64,Ec(e[0]));for(let t=1;t>>0,r[1]=Lo(e[1])>>>0;for(let t=2;t>>0,r[t+1]=r[t-1]+Lo(e[t+1])>>>0;return r}function rve(e,r,t,a){let i=lz(e,r,t,a);return new Uint32Array(i)}function ave(e){return e[1]}function ive(e){return Lo(e[1])}function nve(e){if(e.length===2){let r=Lo(e[1]);return[r,r]}return[Lo(e[2]),Lo(e[3])]}function ove(e){return e[1]}function sve(e){return Ec(e[1])}function lve(e){if(e.length===2){let r=Ec(e[1]);return[r,r]}return[Ec(e[2]),Ec(e[3])]}function $s(e,r){let t=fve(e,r);return t.logicalLevelTechnique1===to.MORTON?uve(t,e,r):(to.RLE===t.logicalLevelTechnique1||to.RLE===t.logicalLevelTechnique2)&&yh.NONE!==t.physicalLevelTechnique?cve(t,e,r):t}function uve(e,r,t){let a=Mc(r,t,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:e.decompressedCount,numBits:a[0],coordinateShift:a[1]}}function cve(e,r,t){let a=Mc(r,t,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:a[1],runs:a[0],numRleValues:a[1]}}function fve(e,r){let t=e[r.get()],a=LN[t>>4],i={};switch(a){case zl.DATA:i={dictionaryType:PN[t&15]};break;case zl.OFFSET:i={offsetType:IN[t&15]};break;case zl.LENGTH:i={lengthType:RN[t&15]}}r.increment();let o=e[r.get()],s=kk[o>>5],l=kk[o>>2&7],n=FN[o&3];r.increment();let u=Mc(e,r,2),c=u[0],f=u[1];return{physicalStreamType:a,logicalStreamType:i,logicalLevelTechnique1:s,logicalLevelTechnique2:l,physicalLevelTechnique:n,numValues:c,byteLength:f,decompressedCount:c}}function em(e,r,t){if(!r)return e;let a=r.size(),i=e.constructor,o=new i(a),s=0;for(let l=0;l=s);){let l=e[a.increment()];if(l<=127){let n=l+3,u=e[a.increment()],c=Math.min(o+n,r);i.fill(u,o,c),o=c}else{let n=256-l;for(let u=0;u=12?zN.decode(e.subarray(r,t)):mve(e,r,t)}function mve(e,r,t){let a="",i=r;for(;i239?4:o>223?3:o>191?2:1;if(i+l>t)break;let n,u,c;l===1?o<128&&(s=o):l===2?(n=e[i+1],(n&192)==128&&(s=(o&31)<<6|n&63,s<=127&&(s=null))):l===3?(n=e[i+1],u=e[i+2],(n&192)==128&&(u&192)==128&&(s=(o&15)<<12|(n&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):l===4&&(n=e[i+1],u=e[i+2],c=e[i+3],(n&192)==128&&(u&192)==128&&(c&192)==128&&(s=(o&15)<<18|(n&63)<<12|(u&63)<<6|c&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,l=1):s>65535&&(s-=65536,a+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),a+=String.fromCharCode(s),i+=l}return a}function U2(e,r,t,a,i){return bve(b1(e,r,t),t,a,i)}function Sc(e,r,t,a,i){return wve(b1(e,r,t),t,a,i)}function P0(e,r,t){return Tve(b1(e,r,t),t)}function b1(e,r,t){let a=t.physicalLevelTechnique;switch(a){case yh.FAST_PFOR:return N0e(e,t.numValues,t.byteLength,r);case yh.VARINT:return Mc(e,r,t.numValues);case yh.NONE:return pve(e,r,t.numValues);default:throw Error(`Specified physicalLevelTechnique ${a} is not supported (yet).`)}}function m_(e,r,t){let a=t.physicalLevelTechnique;switch(a){case yh.VARINT:return WE(e,r,t.numValues);case yh.NONE:return vve(e,r,t.numValues);default:throw Error(`Specified physicalLevelTechnique ${a} is not supported (yet).`)}}function gve(e,r,t){let a=b1(e,r,t);return a.length===1?Lo(a[0]):ive(a)}function KE(e,r,t){let a=b1(e,r,t);return a.length===1?t.logicalLevelTechnique1===to.DELTA?Lo(a[0]):a[0]:ave(a)}function pz(e,r,t){return nve(b1(e,r,t))}function vz(e,r,t){return lve(WE(e,r,t.numValues))}function mz(e,r,t,a){return yz(m_(e,r,t),t,a)}function JE(e,r,t,a){return _z(m_(e,r,t),t,a)}function yve(e,r,t,a){let i=_ve(e,r,t,!1);return a?em(i,a,0):i}function _ve(e,r,t,a){if(t.physicalLevelTechnique===yh.VARINT)return Ave(z0e(e,r,t.numValues),t,a);let i=m_(e,r,t),o=a?yz(i,t):_z(i,t);return Float64Array.from(o,Number)}function xve(e,r,t){let a=m_(e,r,t);return a.length===1?Ec(a[0]):sve(a)}function gz(e,r,t){let a=m_(e,r,t);return a.length===1?t.logicalLevelTechnique1===to.DELTA?Ec(a[0]):a[0]:ove(a)}function bve(e,r,t,a){let i;switch(r.logicalLevelTechnique1){case to.DELTA:if(r.logicalLevelTechnique2===to.RLE){let o=r;if(!a)return Q0e(e,o.runs,o.numRleValues);e=$E(e,o.runs,o.numRleValues),i=oz(e)}else i=oz(e);break;case to.RLE:i=H0e(e,r.runs,r.numRleValues);break;case to.MORTON:XE(e),i=new Int32Array(e);break;case to.COMPONENTWISE_DELTA:if(t&&!a)return lz(e,t.scale,t.min,t.max);i=X0e(e);break;case to.NONE:i=U0e(e);break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return a?em(i,a,0):i}function wve(e,r,t,a){let i;switch(r.logicalLevelTechnique1){case to.DELTA:if(r.logicalLevelTechnique2===to.RLE){let o=r;i=uz($E(e,o.runs,o.numRleValues))}else i=uz(e);break;case to.RLE:i=$E(e,r.runs,r.numRleValues);break;case to.MORTON:XE(e),i=e;break;case to.COMPONENTWISE_DELTA:i=t&&!a?rve(e,t.scale,t.min,t.max):tve(e);break;case to.NONE:i=e;break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return a?em(i,a,0):i}function yz(e,r,t){let a;switch(r.logicalLevelTechnique1){case to.DELTA:if(r.logicalLevelTechnique2===to.RLE){let i=r;if(!t)return eve(e,i.runs,i.numRleValues);e=YE(e,i.runs,i.numRleValues),a=sz(e)}else a=sz(e);break;case to.RLE:a=W0e(e,r.runs,r.numRleValues);break;case to.NONE:a=q0e(e);break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return t?em(a,t,BigInt("0")):a}function _z(e,r,t){let a;switch(r.logicalLevelTechnique1){case to.DELTA:if(r.logicalLevelTechnique2===to.RLE){let i=r;a=cz(YE(e,i.runs,i.numRleValues))}else a=cz(e);break;case to.RLE:a=YE(e,r.runs,r.numRleValues);break;case to.NONE:a=e;break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return t?em(a,t,BigInt("0")):a}function Ave(e,r,t){switch(r.logicalLevelTechnique1){case to.DELTA:if(r.logicalLevelTechnique2===to.RLE){let a=r;e=nz(e,a.runs,a.numRleValues)}return G0e(e),e;case to.RLE:return Eve(e,r,t);case to.NONE:return t&&V0e(e),e;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}}function Tve(e,r){if(r.logicalLevelTechnique1===to.DELTA&&r.logicalLevelTechnique2===to.NONE)return Z0e(e);if(r.logicalLevelTechnique1===to.RLE&&r.logicalLevelTechnique2===to.NONE){let t=r;return J0e(e,t.runs,t.numRleValues)}if(r.logicalLevelTechnique1===to.NONE&&r.logicalLevelTechnique2===to.NONE){Y0e(e);let t=new Uint32Array(r.numValues+1);return t[0]=0,t.set(e,1),t}if(r.logicalLevelTechnique1===to.DELTA&&r.logicalLevelTechnique2===to.RLE){let t=r,a=K0e(e,t.runs,t.numRleValues);return XE(a),new Uint32Array(a)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function q2(e,r,t,a,i="int32"){let o=e.logicalLevelTechnique1;if(o===to.RLE)return e.runs===1?Bs.CONST:Bs.FLAT;if(o!==to.DELTA||e.logicalLevelTechnique2!==to.RLE)return e.numValues===1?Bs.CONST:Bs.FLAT;let s=r instanceof Zh?r.size():r,l=e;if(l.numRleValues!==s)return Bs.FLAT;if(l.runs===1)return Bs.SEQUENCE;if(l.runs!==2)return e.numValues===1?Bs.CONST:Bs.FLAT;let n=a.get();if(e.physicalLevelTechnique===yh.VARINT)return Mve(t,a,i)?Bs.SEQUENCE:e.numValues===1?Bs.CONST:Bs.FLAT;let u=a.get(),c=new Int32Array(t.buffer,t.byteOffset+u,4);return a.set(n),c[2]===2&&c[3]===2?Bs.SEQUENCE:e.numValues===1?Bs.CONST:Bs.FLAT}function Mve(e,r,t){let a=new Ek(r.get());if(t==="int64"){let o=WE(e,a,4);return o[2]===BigInt("2")&&o[3]===BigInt("2")}let i=Mc(e,a,4);return i[2]===2&&i[3]===2}function Eve(e,r,t){return t?$0e(e,r.runs,r.numRleValues):nz(e,r.runs,r.numRleValues)}function QE(e,r,t){return{x:xz(e,r)-t,y:xz(e>>1,r)-t}}function xz(e,r){let t=0;for(let a=0;a>a;return t}function Sve(e){let r=Array(e.numGeometries),t=1,a=1,i=1,o=0,s=0,l=0,n=e.mortonSettings,u=e.topologyVector,c=u.geometryOffsets,f=u.partOffsets,h=u.ringOffsets,d=e.vertexOffsets,p=!d||d.length===0,g=e.containsPolygonGeometry(),m=e.vertexBuffer;for(let y=0;y[E]),t+=v,a+=v}break;case Xu.LINESTRING:{let v;g?(v=h[a]-h[a-1],a++):v=f[t]-f[t-1],t++;let x;p?(x=w1(m,s,v,!1),s+=v*2):(x=tm(e.vertexBufferType,m,d,l,v,!1,n),l+=v),r[o++]=[x],c&&i++}break;case Xu.POLYGON:{let v=f[t]-f[t-1];t++;let x=Array(v-1),E,M=h[a]-h[a-1];if(a++,p){E=w1(m,s,M,!0),s+=M*2;for(let C=0;Ct?r[o++]:1);return a}function Tz(e,r,t,a){let i=new Uint32Array(r[r.length-1]+1),o=0;i[0]=o;let s=1,l=0;for(let n=0;n0;)i[o++]=e[u++]}}return i}function Mz(e,r,t,a,i){var o,s;let l,n,u,c,f,h=i,d,p;for(let g=0;g1&&!d.nullable||p===1&&d.nullable)throw Error(`The number of streams for the child field ${d.name} does not match its nullability. nullibilty: ${d.nullable}, numStreams: ${p}`);let m;if(d.nullable){let _=$s(e,r);m=new Zh(x1(e,_.numValues,_.byteLength,r),_.numValues)}let y=Sc(e,r,$s(e,r),void 0,m);if(l){if(!s)throw Error(`Incomplete shared FSST dictionary for column "${g}"`);c[h++]=new Bk(g,y,i,o,s,l,m,f)}else c[h++]=new um(g,y,i,o,m)}return c}function qve(e,r,t,a){let i=Vve(t);if(a===0)return i.map(c=>new Ok(c,[]));let o=Gve(e,r,a),s=(o.presentStream?o.presentCount:o.lengthStream.length)/i.length,l=[],n=0,u=0;for(let c=0;c{var a;return e.name+((a=t.name)!=null?a:"")})}function Gve(e,r,t){let a=e[r.get()];r.add(1);let i=Sc(e,r,$s(e,r)),o=t-1,s=[];a&xp.STRING&&(o-=Hve(e,r,s)),o-=Wve(e,r,a,s),o-=$ve(e,r,a,s);let l,n=0;if(a&xp.PRESENCE){let c=Yve(e,r);l=c.value,n=c.count,o--}let u=new Uint32Array;if(o>0&&(u=Sc(e,r,$s(e,r)),o--),o!==0)throw Error(`Unexpected number of remaining streams while decoding map column: ${o}`);return{lengthStream:i,dictionary:s,presentStream:l,presentCount:n,flattenedValues:u}}function Hve(e,r,t){let a=e[r.get()];r.add(1);let i=Mz("",e,r,a);if(i)for(let o=0;oo.length)throw Error("Merged map counts underflow while decoding child streams");let d=Array(t),p=a,g=i;for(let _=0;_s.length)throw Error("Map value stream underflow while decoding feature payload");let x=Zve(s,g,v,n);d[_]=x.value,g=x.nextIndex}let m=0;for(let _=a;_=t)throw Error("Unexpected end of map value stream");let i=e[r];if(i===q0.FALSE)return{value:!1,nextIndex:r+1};if(i===q0.TRUE)return{value:!0,nextIndex:r+1};if(i===q0.START_MAP){let o=Sz(e,r,t);return{value:Ez(e,r+2,o,a).value,nextIndex:o}}if(i===q0.START_LIST){let o=Sz(e,r,t),s=[],l=r+2;for(;l=t)throw Error("Missing length for nested map/list payload");let a=e[r+1];if(a<2)throw Error(`Invalid nested payload length: ${a}`);let i=r+a;if(i>t)throw Error("Nested payload exceeds containing payload bounds");return i}function kz(e,r){let t=e-q0.COUNT;if(t<0||t>=r.length)throw Error(`Scalar dictionary index out of range: ${e}`);return r[t]}function A1(e,r){for(let t of r)e.push(t)}function Kve(e,r,t,a,i,o){var s;return t.type==="scalarType"?o&&!o.has(t.name)?(fz(a,e,r),null):Jve(a,e,r,i,t.scalarType,t):((s=t.complexType)==null?void 0:s.physicalType)===e0.MAP?qve(e,r,t,a):a===0?null:Uve(e,r,t,o)}function Jve(e,r,t,a,i,o){var s;let l;if(e===0)return null;if(o.nullable){let u=$s(r,t),c=u.numValues,f=t.get(),h=x1(r,c,u.byteLength,t);t.set(f+u.byteLength),l=new Zh(h,u.numValues)}let n=l??a;switch(i.physicalType){case Uo.UINT_32:case Uo.INT_32:return ame(r,t,o,i,n);case Uo.STRING:{let u=o.nullable?e-1:e;return(s=Mz(o.name,r,t,u,l))!=null?s:null}case Uo.BOOLEAN:return Qve(r,t,o,a,n);case Uo.UINT_64:case Uo.INT_64:return rme(r,t,o,n,i);case Uo.FLOAT:return eme(r,t,o,n);case Uo.DOUBLE:return tme(r,t,o,n);default:throw Error(`The specified data type for the field is currently not supported: ${i}`)}}function Qve(e,r,t,a,i){let o=$s(e,r),s=o.numValues,l=r.get(),n=g_(i)?i:void 0,u=x1(e,s,o.byteLength,r,n);r.set(l+o.byteLength);let c=new Zh(u,s);return new jN(t.name,c,i)}function eme(e,r,t,a){let i=$s(e,r),o=g_(a)?a:void 0,s=hz(e,r,i.numValues,o);return new UN(t.name,s,a)}function tme(e,r,t,a){let i=$s(e,r),o=g_(a)?a:void 0,s=dz(e,r,i.numValues,o);return new l3(t.name,s,a)}function rme(e,r,t,a,i){let o=$s(e,r),s=q2(o,a,e,r,"int64"),l=i.physicalType===Uo.INT_64;if(s===Bs.FLAT){let u=g_(a)?a:void 0,c=l?mz(e,r,o,u):JE(e,r,o,u);return new Ck(t.name,c,a)}if(s===Bs.SEQUENCE){let u=vz(e,r,o);return new Dk(t.name,u[0],u[1],o.numRleValues,l)}let n=l?xve(e,r,o):gz(e,r,o);return new Rk(t.name,n,a,l)}function ame(e,r,t,a,i){let o=$s(e,r),s=q2(o,i,e,r),l=a.physicalType===Uo.INT_32;if(s===Bs.FLAT){let u=g_(i)?i:void 0,c=l?U2(e,r,o,void 0,u):Sc(e,r,o,void 0,u);return new s3(t.name,c,i)}if(s===Bs.SEQUENCE){let u=pz(e,r,o);return new u3(t.name,u[0],u[1],o.numRleValues,l)}let n=l?gve(e,r,o):KE(e,r,o);return new c3(t.name,n,i,l)}function g_(e){return e instanceof Zh}function Cz(e){switch(e){case du.ID:case du.ID|du.ID_NULLABLE:case du.ID|du.ID_LONG:case du.ID|du.ID_LONG|du.ID_NULLABLE:return{nullable:(e&du.ID_NULLABLE)!==0,columnScope:H1.FEATURE,type:"scalarType",scalarType:{longID:(e&du.ID_LONG)!==0,type:"logicalType",logicalType:Mk.ID}};case du.GEOMETRY:return{nullable:!1,columnScope:H1.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:e0.GEOMETRY,children:[]}};case du.STRUCT:return{nullable:!1,columnScope:H1.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:e0.STRUCT,children:[]}};case du.MAP:return{nullable:!0,columnScope:H1.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:e0.MAP,children:[]}};default:return lme(e)}}function ime(e){return e>=du.SCALAR_BASE}function Dz(e){return e===du.STRUCT||e===du.MAP}function nme(e){if(e.type==="scalarType"){let r=e.scalarType;if(r.type==="physicalType")switch(r.physicalType){case Uo.BOOLEAN:case Uo.INT_8:case Uo.UINT_8:case Uo.INT_32:case Uo.UINT_32:case Uo.INT_64:case Uo.UINT_64:case Uo.FLOAT:case Uo.DOUBLE:return!1;case Uo.STRING:return!0;default:return!1}if(r.type==="logicalType")return!1}else if(e.type==="complexType"){let r=e.complexType;if(r.type==="physicalType")switch(r.physicalType){case e0.GEOMETRY:case e0.STRUCT:case e0.MAP:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",e),!1}function ome(e){var r;return e.type==="scalarType"&&((r=e.scalarType)==null?void 0:r.type)==="logicalType"&&e.scalarType.logicalType===Mk.ID}function sme(e){var r;return e.type==="complexType"&&((r=e.complexType)==null?void 0:r.type)==="physicalType"&&e.complexType.physicalType===e0.GEOMETRY}function lme(e){let r;switch(e){case 10:case 11:r=Uo.BOOLEAN;break;case 12:case 13:r=Uo.INT_8;break;case 14:case 15:r=Uo.UINT_8;break;case 16:case 17:r=Uo.INT_32;break;case 18:case 19:r=Uo.UINT_32;break;case 20:case 21:r=Uo.INT_64;break;case 22:case 23:r=Uo.UINT_64;break;case 24:case 25:r=Uo.FLOAT;break;case 26:case 27:r=Uo.DOUBLE;break;case 28:case 29:r=Uo.STRING;break;default:return null}return{nullable:!!(e&1),columnScope:H1.FEATURE,type:"scalarType",scalarType:{longID:!1,type:"physicalType",physicalType:r}}}function rS(e,r){let t=Mc(e,r,1)[0];if(t===0)return"";let a=r.get(),i=a+t,o=e.subarray(a,i);return r.add(t),qN.decode(o)}function ume(e){let r=e.name,t=e.nullable;return e.type==="scalarType"?{type:"scalarField",scalarField:e.scalarType,name:r,nullable:t}:{type:"complexField",complexField:e.complexType,name:r,nullable:t}}function Lz(e,r){let t=Mc(e,r,1)[0]>>>0,a=t>=du.SCALAR_BASE?Cz(t):null;if(!a)throw Error(`Unsupported field type code ${t}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let i=Ci(ja({},a),{name:rS(e,r)});if(i.type==="complexType"&&Dz(t)){let o=i.complexType,s=Mc(e,r,1)[0]>>>0;o.children=Array(s);for(let l=0;l>>0,a=Cz(t);if(!a)throw Error(`Unsupported column type code ${t}. Supported: ${Nk}`);let i;if(ime(t))i=rS(e,r);else if(t>>0,l=o.complexType;l.children=Array(s);for(let n=0;n>>0,o=Mc(e,r,1)[0]>>>0;a.columns=Array(o);for(let s=0;s>>0,s=a.get()+o;if(s>e.length)throw Error(`Block overruns tile: ${s} > ${e.length}`);let l=Mc(e,a,1)[0]>>>0;if(l!==1&&l!==2){a.set(s);continue}let[n,u]=fme(e,a),c=n.featureTables[0],f=null,h=null,d=[],p=0;for(let m of c.columns){let y=m.name;if(ome(m)){let _=null;if(m.nullable){let x=$s(e,a),E=a.get(),M=x1(e,x.numValues,x.byteLength,a);a.set(E+x.byteLength),_=new Zh(M,x.numValues)}let v=$s(e,a);p=_?_.size():v.decompressedCount,f=dme(e,m,a,y,v,_??p,t)}else if(sme(m)){let _=Mc(e,a,1)[0];if(p===0){let v=a.get();p=$s(e,a).decompressedCount,a.set(v)}r&&(r.scale=r.extent/u),h=Pve(e,_,a,p,r)}else{let _=nme(m)?Mc(e,a,1)[0]:1;if(_===0)continue;let v=Kve(e,a,m,_,p,void 0);if(v)if(Array.isArray(v))for(let x of v)d.push(x);else d.push(v)}}let g=new CN(c.name,h,f,d,u);i.push(g),a.set(s)}return i}function dme(e,r,t,a,i,o,s=!1){var l;let n=(l=r.scalarType)!=null&&l.longID?Uo.UINT_64:Uo.UINT_32,u=typeof o=="number"?void 0:o,c=q2(i,o,e,t,n===Uo.UINT_64?"int64":"int32");if(n===Uo.UINT_32)switch(c){case Bs.FLAT:return new s3(a,Sc(e,t,i,void 0,u),o);case Bs.SEQUENCE:{let f=pz(e,t,i);return new u3(a,f[0],f[1],i.numRleValues,!1)}case Bs.CONST:return new c3(a,KE(e,t,i),o,!1)}switch(c){case Bs.FLAT:return s?new l3(a,yve(e,t,i,u),o):new Ck(a,JE(e,t,i,u),o);case Bs.SEQUENCE:{let f=vz(e,t,i);return new Dk(a,f[0],f[1],i.numRleValues,!1)}case Bs.CONST:return new Rk(a,gz(e,t,i),o,!1)}throw Error("Vector type not supported for id column.")}function pme(e){return typeof e=="object"&&!!e&&"evaluate"in e}function Fz(e,r,t,a,i){return GM(e,(o,s)=>{let l=r instanceof D_?r.get(s):null;return pme(l)?l.evaluate(t,a,void 0,i):l})}function vme(e,r){return r-e}var Pz,aS,Iz,Rz,zz,iS,V2,Bz,Oz,G2,H2,fu,W2,Rd,hp,y_,Nz,nS,oS,jz,xa,$2,Uz,sS,Y2,qz,Vz,zd,lS,uS,cS,T1,Uf,X2,M1,Gz,__,x_,fS,Hz,qf,mn,Zl,hS,ta,Wz,qa,E1,mi,Zn,mo,Hh,b_,I0,eo,$z,w_,S1,A_,k1,T_,C1,M_,Yz,dS,pS,vS,Z2,mS,Xz,Zz,Kz,Jz,wf,Hn,Qz,K2,dp,Bd,Od,ph,Ys,eB,Nd,jd,Zp,J2,rm,tB,gS,Q2,vh,Xs,yS,E_,pp,_S,am,xS,bS,rB,aB,iB,nB,oB,sB,wS,lB,uB,cB,fB,hB,dB,AS,pB,vB,mB,Ud,ew,TS,MS,tw,rw,gB,aw,im,qd,yB,ES,R0,iw,nw,D1,S_,SS,_B,kS,CS,xB,DS,bB,wB,Af,LS,ow,vp,sw,Ko,lw,k_,uw,C_,FS,PS,AB,mh,D_,Ti,gn,L1,IS,L_,Du,RS,cw,Wh,TB,MB,EB,fw,SB,kB,F1,nl,P1,F_,hw,dw,pw,I1,vw,mw,gw,yw,_w,xw,bw,ww,Aw,P_,Tw,Mw,I_,Ew,Sw,kw,Cw,Dw,zS,BS,OS,NS,jS,US,qS,VS,GS,HS,WS,$S,Kp,CB,DB,LB,FB,PB,IB,RB,nm,YS,zB,BB,OB,XS,NB,jB,UB,Vd,Lw,qB,Fw,VB,Zs,GB,HB,WB,$B,Pw,ZS,mp,fn,Di,no,qc,R1,Jp,KS,JS,YB,$h,z1,z0,gp,Yh,Qp,QS,ek,tk,B0,Iw,rk,ak,Rw,XB,ZB,KB,JB,QB,eO,tO,ik,rO,aO,iO,zw,Ls,R_,nO,oO,sO,lO,uO,cO,fO,hO,dO,pO,Kl,B1,vO,mO,gO,Bw,yO,O1,Ow,Nw,El,z_,jw,Uw,gh,N1,O0,j1,U1,yp,qw,Vw,q1,V1,_O,nk,xO,bO,wO,AO,TO,MO,EO,Gw,SO,kO,Xh,CO,G1,DO,LO,Vc,ln,ok,$o,N0,Hw,sk,FO,PO,IO,RO,zO,BO,OO,mme,NO,jO,Ww,UO,$w,qO,VO,lk,uk,ck,GO,HO,WO,$O,fk,YO,Yw,XO,ZO,KO,JO,QO,hk,eN,B_,tN,rN,aN,dk,iN,pk,vk,Xw,Zw,om,nN,oN,Kw,Jw,sN,lN,uN,Qw,gme,mk,gk,e3,cN,yk,_k,xk,sm,O_,fN,lm,t3,r3,hN,a3,i3,N_,dN,pN,vN,mN,n3,bk,wk,gN,yN,_N,xN,bN,wN,AN,TN,MN,EN,SN,j_,U_,Yu,o3,q_,kN,Ak,j0,V_,s3,l3,Tk,u3,c3,CN,H1,Uo,e0,Mk,Ek,to,yh,f3,h3,Sk,d3,DN,zl,Gc,_p,hu,LN,kk,FN,PN,IN,RN,Bs,Zh,zN,Ck,Dk,Xu,BN,U0,Lk,Fk,Pk,Ik,ON,NN,jN,UN,Rk,p3,zk,um,Bk,Ok,xp,q0,du,qN,Nk,VN,GN,HN,WN,$N,yme=Si({"node_modules/maplibre-gl/dist/maplibre-gl-shared.mjs"(){Pz=Object.create,aS=Object.defineProperty,Iz=Object.getOwnPropertyDescriptor,Rz=Object.getOwnPropertyNames,zz=Object.getPrototypeOf,iS=Object.prototype.hasOwnProperty,V2=(e,r)=>()=>(r||(e((r={exports:{}}).exports,r),e=null),r.exports),Bz=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(var i=Rz(r),o=0,s=i.length,l;or[n]).bind(null,l),enumerable:!(a=Iz(r,l))||a.enumerable});return e},Oz=(e,r,t)=>(t=e==null?{}:Pz(zz(e)),Bz(r||!e||!e.__esModule||!iS.call(e,"default")?aS(t,"default",{value:e,enumerable:!0}):t,e)),zr.prototype={clone(){return new zr(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,r){return this.clone()._rotateAround(e,r)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let r=e.x-this.x,t=e.y-this.y;return r*r+t*t},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,r){return Math.atan2(this.x*r-this.y*e,this.x*e+this.y*r)},_matMult(e){let r=e[0]*this.x+e[1]*this.y,t=e[2]*this.x+e[3]*this.y;return this.x=r,this.y=t,this},_add(e){return this.x+=e.x,this.y+=e.y,this},_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let r=Math.cos(e),t=Math.sin(e),a=r*this.x-t*this.y,i=t*this.x+r*this.y;return this.x=a,this.y=i,this},_rotateAround(e,r){let t=Math.cos(e),a=Math.sin(e),i=r.x+t*(this.x-r.x)-a*(this.y-r.y),o=r.y+a*(this.x-r.x)+t*(this.y-r.y);return this.x=i,this.y=o,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:zr},zr.convert=function(e){if(e instanceof zr)return e;if(Array.isArray(e))return new zr(+e[0],+e[1]);if(e.x!==void 0&&e.y!==void 0)return new zr(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")},fu=typeof Float32Array<"u"?Float32Array:Array,Math.PI/180,180/Math.PI,W2=uce,Rd=cce,hp=FI,y_=Yp,(function(){var e=DI();return function(r,t,a,i,o,s){var l,n;for(t||(t=3),a||(a=0),n=i?Math.min(i*t+a,r.length):r.length,l=a;l.999999?(a[0]=0,a[1]=0,a[2]=0,a[3]=1,a):(Nf(e,i,o),a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=1+s,oS(a,a))}})(),(function(){var e=PI(),r=PI();return function(t,a,i,o,s,l){return Zb(e,a,s,l),Zb(r,i,o,l),Zb(t,e,r,2*l*(1-l)),t}})(),(function(){var e=kI();return function(r,t,a,i){return e[0]=a[0],e[3]=a[1],e[6]=a[2],e[1]=i[0],e[4]=i[1],e[7]=i[2],e[2]=-t[0],e[5]=-t[1],e[8]=-t[2],oS(r,Mce(r,e))}})(),jz=Ece,(function(){var e=UM();return function(r,t,a,i,o,s){var l,n;for(t||(t=2),a||(a=0),n=i?Math.min(i*t+a,r.length):r.length,l=a;lyi(null,null,function*(){let t=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(t,r)}catch(a){throw Error(`Could not load image because of ${Ac(a).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),Vz=e=>new Promise((r,t)=>{let a=new Image;a.onload=()=>{r(a),URL.revokeObjectURL(a.src),a.onload=null,window.requestAnimationFrame(()=>a.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=")},a.onerror=()=>t(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 i=new Blob([new Uint8Array(e)],{type:"image/png"});a.src=URL.createObjectURL(i)}),zd=85.051129,lS={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},uS={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},cS="AbortError",T1=class extends Error{constructor(e=cS){super(e instanceof Error?e.message:e),this.name=cS,e instanceof Error&&e.stack&&(this.stack=e.stack)}},Uf={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""},X2="global-dispatcher",M1=class extends Error{constructor(e,r,t,a){super(`AJAXError: ${r} (${e}): ${t}`),this.status=e,this.statusText=r,this.url=t,this.body=a}},Gz=e=>{var r;return e.startsWith("file:")||((r=$M())==null?void 0:r.startsWith("file:"))&&!/^\w+:/.test(e)},__=function(e,r){return yi(this,null,function*(){var t,a;if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let i=GI(e.url);if(i){let o=yield i(e,r);return!o.data&&e.type==="arrayBuffer"?tn(o,{data:new ArrayBuffer(0)}):o}if(n1(self)&&((t=self.worker)!=null&&t.actor))return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:X2},r)}if(!Gz(e.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return Wce(e,r);if(n1(self)&&((a=self.worker)!=null&&a.actor))return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:X2},r)}return $ce(e,r)})},x_=(e,r)=>__(tn(e,{type:"json"}),r),fS=(e,r)=>__(tn(e,{type:"arrayBuffer"}),r),Hz=e=>{let r=window.document.createElement("video");return r.muted=!0,new Promise(t=>{r.onloadstart=()=>{t(r)};for(let a of e){let i=window.document.createElement("source");HI(a)||(r.crossOrigin="Anonymous"),i.src=a,r.appendChild(i)}})},qf=class{constructor(e,r={}){tn(this,r),this.type=e}},mn=class extends qf{constructor(e,r={}){super("error",tn({error:e},r))}},Zl=class{on(e,r){return this._listeners||(this._listeners={}),WI(e,r,this._listeners),{unsubscribe:()=>{this.off(e,r)}}}off(e,r){return YM(e,r,this._listeners),YM(e,r,this._oneTimeListeners),this}once(e,r){return r?(this._oneTimeListeners||(this._oneTimeListeners={}),WI(e,r,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,r){var t,a,i,o,s,l;let n=typeof e=="string"?new qf(e,r||{}):e,u=n.type;if(this.listens(u)){n.target=this;let c=(i=(a=(t=this._listeners)==null?void 0:t[u])==null?void 0:a.slice())!=null?i:[];for(let d of c)d.call(this,n);let f=(l=(s=(o=this._oneTimeListeners)==null?void 0:o[u])==null?void 0:s.slice())!=null?l:[];for(let d of f)YM(u,d,this._oneTimeListeners),d.call(this,n);let h=this._eventedParent;h&&(tn(n,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),h.fire(n))}else n instanceof mn&&console.error(n.error);return this}listens(e){var r,t,a,i,o;return!!((t=(r=this._listeners)==null?void 0:r[e])!=null&&t.length||(i=(a=this._oneTimeListeners)==null?void 0:a[e])!=null&&i.length||(o=this._eventedParent)!=null&&o.listens(e))}setEventedParent(e,r){return this._eventedParent=e,this._eventedParentData=r,this}},hS={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},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},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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:"filter"},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:{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:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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","feature"]},"property-type":"data-driven"},"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"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,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,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default: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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"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","feature"]},"property-type":"cross-faded-data-driven"},"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"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}},ta=hS,Wz=["type","source","source-layer","minzoom","maxzoom","filter","layout"],qa=class{constructor(e,r,t,a,i="error"){this.message=(e?`${e}: `:"")+t,a&&(this.identifier=a),this.severity=i,r!=null&&r.__line__&&(this.line=r.__line__)}},E1={kind:"null"},mi={kind:"number"},Zn={kind:"string"},mo={kind:"boolean"},Hh={kind:"color"},b_={kind:"projectionDefinition"},I0={kind:"object"},eo={kind:"value"},$z={kind:"error"},w_={kind:"collator"},S1={kind:"formatted"},A_={kind:"padding"},k1={kind:"colorArray"},T_={kind:"numberArray"},C1={kind:"resolvedImage"},M_={kind:"variableAnchorOffsetCollection"},Yz=[E1,mi,Zn,mo,Hh,b_,S1,I0,Uc(eo),A_,T_,k1,C1,M_],dS=.96422,pS=.82521,vS=4/29,Z2=6/29,mS=3*Z2*Z2,Xz=Math.PI/180,Zz=180/Math.PI,Kz=Object.hasOwn||function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},Jz={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Hn=(wf=class{constructor(e,r,t,a=1,i=!0){this.r=e,this.g=r,this.b=t,this.a=a,i||(this.r*=a,this.g*=a,this.b*=a,a||this.overwriteGetter("rgb",[e,r,t,a]))}static parse(e){if(e instanceof wf)return e;if(typeof e!="string")return;let r=Kce(e);if(r)return new wf(...r,!1)}get rgb(){let{r:e,g:r,b:t,a}=this,i=a||1/0;return this.overwriteGetter("rgb",[e/i,r/i,t/i,a])}get hcl(){return this.overwriteGetter("hcl",Yce(this.rgb))}get lab(){return this.overwriteGetter("lab",YI(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){let[e,r,t,a]=this.rgb;return`rgba(${[e,r,t].map(i=>Math.round(i*255)).join(",")},${a})`}static interpolate(e,r,t,a="rgb"){switch(a){case"rgb":{let[i,o,s,l]=s1(e.rgb,r.rgb,t);return new wf(i,o,s,l,!1)}case"hcl":{let[i,o,s,l]=e.hcl,[n,u,c,f]=r.hcl,h,d;if(!isNaN(i)&&!isNaN(n)){let _=n-i;n>i&&_>180?_-=360:n180&&(_+=360),h=i+t*_}else isNaN(i)?isNaN(n)?h=NaN:(h=n,(s===1||s===0)&&(d=u)):(h=i,(c===1||c===0)&&(d=o));let[p,g,m,y]=Xce([h,d??C0(o,u,t),C0(s,c,t),C0(l,f,t)]);return new wf(p,g,m,y,!1)}case"lab":{let[i,o,s,l]=XI(s1(e.lab,r.lab,t));return new wf(i,o,s,l,!1)}}}},wf.black=new wf(0,0,0,1),wf.white=new wf(1,1,1,1),wf.transparent=new wf(0,0,0,0),wf.red=new wf(1,0,0,1),wf),Qz=["bottom","center","top"],K2=class{constructor(e,r,t,a,i,o){this.text=e,this.image=r,this.scale=t,this.fontStack=a,this.textColor=i,this.verticalAlign=o}},dp=class lA{constructor(r){this.sections=r}static fromString(r){return new lA([new K2(r,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(r=>r.text.length!==0||r.image&&r.image.name.length!==0)}static factory(r){return r instanceof lA?r:lA.fromString(r)}toString(){return this.sections.length===0?"":this.sections.map(r=>r.text).join("")}},Bd=class Px{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof Px)return r;if(typeof r=="number")return new Px([r,r,r,r]);if(Array.isArray(r)&&!(r.length<1||r.length>4)){for(let t of r)if(typeof t!="number")return;switch(r.length){case 1:r=[r[0],r[0],r[0],r[0]];break;case 2:r=[r[0],r[1],r[0],r[1]];break;case 3:r=[r[0],r[1],r[2],r[1]]}return new Px(r)}}toString(){return JSON.stringify(this.values)}static interpolate(r,t,a){return new Px(s1(r.values,t.values,a))}},Od=class Ix{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof Ix)return r;if(typeof r=="number")return new Ix([r]);if(Array.isArray(r)){for(let t of r)if(typeof t!="number")return;return new Ix(r)}}toString(){return JSON.stringify(this.values)}static interpolate(r,t,a){return new Ix(s1(r.values,t.values,a))}},ph=class Rx{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof Rx)return r;if(typeof r=="string"){let a=Hn.parse(r);return a?new Rx([a]):void 0}if(!Array.isArray(r))return;let t=[];for(let a of r){if(typeof a!="string")return;let i=Hn.parse(a);if(!i)return;t.push(i)}return new Rx(t)}toString(){return JSON.stringify(this.values)}static interpolate(r,t,a,i="rgb"){let o=[];if(r.values.length!=t.values.length)throw Error(`colorArray: Arrays have mismatched length (${r.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let s=0;s=l)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);let f=t.parse(n,c,o);if(!f)return null;o||(o=f.type),i.push([l,f])}return new KJ(o,a,i,t.key)}evaluate(r){let t=this.labels,a=this.outputs;if(t.length===1)return a[0].evaluate(r);let i=this.input.evaluate(r);if(i<=t[0])return a[0].evaluate(r);let o=t.length;return i>=t[o-1]?a[o-1].evaluate(r):a[r2(t,i,this.key)].evaluate(r)}eachChild(r){r(this.input);for(let t of this.outputs)r(t)}outputDefined(){return this.outputs.every(r=>r.outputDefined())}},vh=class mD{constructor(r,t,a,i,o,s){this.type=r,this.operator=t,this.interpolation=a,this.input=i,this.key=s,this.labels=[],this.outputs=[];for(let[l,n]of o)this.labels.push(l),this.outputs.push(n)}static interpolationFactor(r,t,a,i){let o=0;if(r.name==="exponential")o=eE(t,r.base,a,i);else if(r.name==="linear")o=eE(t,1,a,i);else if(r.name==="cubic-bezier"){let s=r.controlPoints;o=Qce(s[0],s[1],s[2],s[3])(eE(t,1,a,i))}return o}static parse(r,t){let[a,i,o,...s]=r;if(!Array.isArray(i)||i.length===0)return t.error("Expected an interpolation type expression.",1);if(i[0]==="linear")i={name:"linear"};else if(i[0]==="exponential"){let u=i[1];if(typeof u!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:u}}else if(i[0]==="cubic-bezier"){let u=i.slice(1);if(u.length!==4||u.some(c=>typeof c!="number"||c<0||c>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:u}}else return t.error(`Unknown interpolation type ${String(i[0])}`,1,0);if(r.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${r.length-1}.`);if((r.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,mi),!o)return null;let l=[],n=null;(a==="interpolate-hcl"||a==="interpolate-lab")&&t.expectedType!=k1?n=Hh:t.expectedType&&t.expectedType.kind!=="value"&&(n=t.expectedType);for(let u=0;u=c)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);let p=t.parse(f,d,n);if(!p)return null;n||(n=p.type),l.push([c,p])}return!k0(n,mi)&&!k0(n,b_)&&!k0(n,Hh)&&!k0(n,A_)&&!k0(n,T_)&&!k0(n,k1)&&!k0(n,M_)&&!k0(n,Uc(mi))?t.error(`Type ${dl(n)} is not interpolatable.`):new mD(n,a,i,o,l,t.key)}evaluate(r){let t=this.labels,a=this.outputs;if(t.length===1)return a[0].evaluate(r);let i=this.input.evaluate(r);if(i<=t[0])return a[0].evaluate(r);let o=t.length;if(i>=t[o-1])return a[o-1].evaluate(r);let s=r2(t,i,this.key),l=t[s],n=t[s+1],u=mD.interpolationFactor(this.interpolation,i,l,n),c=a[s].evaluate(r),f=a[s+1].evaluate(r);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return C0(c,f,u);case"color":return Hn.interpolate(c,f,u);case"padding":return Bd.interpolate(c,f,u);case"colorArray":return ph.interpolate(c,f,u);case"numberArray":return Od.interpolate(c,f,u);case"variableAnchorOffsetCollection":return Nd.interpolate(c,f,u,this.key);case"array":return s1(c,f,u);case"projectionDefinition":return Zp.interpolate(c,f,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return Hn.interpolate(c,f,u,"hcl");case"colorArray":return ph.interpolate(c,f,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Hn.interpolate(c,f,u,"lab");case"colorArray":return ph.interpolate(c,f,u,"lab")}}}eachChild(r){r(this.input);for(let t of this.outputs)r(t)}outputDefined(){return this.outputs.every(r=>r.outputDefined())}},Xs={color:Hn.interpolate,number:C0,padding:Bd.interpolate,numberArray:Od.interpolate,colorArray:ph.interpolate,variableAnchorOffsetCollection:Nd.interpolate,array:s1},yS=class JJ{constructor(r){this.type=S1,this.sections=r}static parse(r,t){if(r.length<2)return t.error("Expected at least one argument.");let a=r[1];if(!Array.isArray(a)&&typeof a=="object")return t.error("First argument must be an image or text section.");let i=[],o=!1;for(let s=1;s<=r.length-1;++s){let l=r[s];if(o&&typeof l=="object"&&!Array.isArray(l)){o=!1;let n=null;if(l["font-scale"]&&(n=t.parse(l["font-scale"],1,mi),!n))return null;let u=null;if(l["text-font"]&&(u=t.parse(l["text-font"],1,Uc(Zn)),!u))return null;let c=null;if(l["text-color"]&&(c=t.parse(l["text-color"],1,Hh),!c))return null;let f=null;if(l["vertical-align"]){if(typeof l["vertical-align"]=="string"&&!Qz.includes(l["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${l["vertical-align"]}' instead.`);if(f=t.parse(l["vertical-align"],1,Zn),!f)return null}let h=i[i.length-1];h.scale=n,h.font=u,h.textColor=c,h.verticalAlign=f}else{let n=t.parse(r[s],1,eo);if(!n)return null;let u=n.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,i.push({content:n,scale:null,font:null,textColor:null,verticalAlign:null})}}return new JJ(i)}evaluate(r){return new dp(this.sections.map(t=>{let a=t.content.evaluate(r);return Il(a)===C1?new K2("",a,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(r):null):new K2($y(a),null,t.scale?t.scale.evaluate(r):null,t.font?t.font.evaluate(r).join(","):null,t.textColor?t.textColor.evaluate(r):null,t.verticalAlign?t.verticalAlign.evaluate(r):null)}))}eachChild(r){for(let t of this.sections)r(t.content),t.scale&&r(t.scale),t.font&&r(t.font),t.textColor&&r(t.textColor),t.verticalAlign&&r(t.verticalAlign)}outputDefined(){return!1}},E_={string:Zn,number:mi,boolean:mo,object:I0},pp=class QJ{constructor(r,t,a){this.type=r,this.args=t,this.key=a}static parse(r,t){if(r.length<2)return t.error("Expected at least one argument.");let a=1,i,o=r[0];if(o==="array"){let l;if(r.length>2){let u=r[1];if(typeof u!="string"||!(u in E_)||u==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);l=E_[u],a++}else l=eo;let n;if(r.length>3){if(r[2]!==null&&(typeof r[2]!="number"||r[2]<0||r[2]!==Math.floor(r[2])))return t.error('The length argument to "array" must be a positive integer literal',2);n=r[2],a++}i=Uc(l,n)}else{if(!E_[o])throw Error(`Types doesn't contain name = ${o}`);i=E_[o]}let s=[];for(;ar.outputDefined())}},_S={"to-boolean":mo,"to-color":Hh,"to-number":mi,"to-string":Zn},am=class eQ{constructor(r,t,a){this.type=r,this.args=t,this.key=a}static parse(r,t){if(r.length<2)return t.error("Expected at least one argument.");let a=r[0];if(!_S[a])throw Error(`Can't parse ${a} as it is not part of the known types`);if((a==="to-boolean"||a==="to-string")&&r.length!==2)return t.error("Expected one argument.");let i=_S[a],o=[];for(let s=1;s4?`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:JI(t[0],t[1],t[2],t[3]),!a))return new Hn(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Ys(a||`Could not parse color from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}case"padding":{let t;for(let a of this.args){t=a.evaluate(r);let i=Bd.parse(t);if(i)return i}throw new Ys(`Could not parse padding from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}case"numberArray":{let t;for(let a of this.args){t=a.evaluate(r);let i=Od.parse(t);if(i)return i}throw new Ys(`Could not parse numberArray from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}case"colorArray":{let t;for(let a of this.args){t=a.evaluate(r);let i=ph.parse(t);if(i)return i}throw new Ys(`Could not parse colorArray from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}case"variableAnchorOffsetCollection":{let t;for(let a of this.args){t=a.evaluate(r);let i=Nd.parse(t);if(i)return i}throw new Ys(`Could not parse variableAnchorOffsetCollection from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}case"number":{let t=null;for(let a of this.args){if(t=a.evaluate(r),t===null)return 0;let i=Number(t);if(!isNaN(i))return i}throw new Ys(`Could not convert ${JSON.stringify(t)} to number.`,this.key)}case"formatted":return dp.fromString($y(this.args[0].evaluate(r)));case"resolvedImage":return jd.fromString($y(this.args[0].evaluate(r)));case"projectionDefinition":{let t=this.args[0].evaluate(r);if(Zp.parse(t))return t;throw new Ys(`Could not parse projectionDefinition from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}default:return $y(this.args[0].evaluate(r))}}eachChild(r){this.args.forEach(r)}outputDefined(){return this.args.every(r=>r.outputDefined())}},xS=class tQ{constructor(r,t){this.type=t.type,this.bindings=[].concat(r),this.result=t}evaluate(r){return this.result.evaluate(r)}eachChild(r){for(let t of this.bindings)r(t[1]);r(this.result)}static parse(r,t){if(r.length<4)return t.error(`Expected at least 3 arguments, but found ${r.length-1} instead.`);let a=[];for(let o=1;o=a.length)throw new Ys(`Array index out of bounds: ${t} > ${a.length-1}.`,this.key);if(t!==Math.floor(t))throw new Ys(`Array index must be an integer, but found ${t} instead.`,this.key);return a[t]}eachChild(r){r(this.index),r(this.input)}outputDefined(){return!1}},aB=class iQ{constructor(r,t,a){this.needle=r,this.haystack=t,this.key=a,this.type=mo}static parse(r,t){if(r.length!==3)return t.error(`Expected 2 arguments, but found ${r.length-1} instead.`);let a=t.parse(r[1],1,eo),i=t.parse(r[2],2,eo);return!a||!i?null:XM(a.type,[mo,Zn,mi,E1,eo])?new iQ(a,i,t.key):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${dl(a.type)} instead`)}evaluate(r){let t=this.needle.evaluate(r),a=this.haystack.evaluate(r);if(!a)return!1;if(!Hv(t,["boolean","string","number","null"]))throw new Ys(`Expected first argument to be of type boolean, string, number or null, but found ${dl(Il(t))} instead.`,this.key);if(!Hv(a,["string","array"]))throw new Ys(`Expected second argument to be of type array or string, but found ${dl(Il(a))} instead.`,this.key);return a.indexOf(t)>=0}eachChild(r){r(this.needle),r(this.haystack)}outputDefined(){return!0}},iB=class gD{constructor(r,t,a,i){this.needle=r,this.haystack=t,this.key=a,this.fromIndex=i,this.type=mi}static parse(r,t){if(r.length<=2||r.length>=5)return t.error(`Expected 2 or 3 arguments, but found ${r.length-1} instead.`);let a=t.parse(r[1],1,eo),i=t.parse(r[2],2,eo);if(!a||!i)return null;if(!XM(a.type,[mo,Zn,mi,E1,eo]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${dl(a.type)} instead`);if(r.length===4){let o=t.parse(r[3],3,mi);return o?new gD(a,i,t.key,o):null}return new gD(a,i,t.key)}evaluate(r){let t=this.needle.evaluate(r),a=this.haystack.evaluate(r);if(!Hv(t,["boolean","string","number","null"]))throw new Ys(`Expected first argument to be of type boolean, string, number or null, but found ${dl(Il(t))} instead.`,this.key);let i;if(this.fromIndex&&(i=this.fromIndex.evaluate(r)),Hv(a,["string"])){let o=a.indexOf(t,i);return o===-1?-1:[...a.slice(0,o)].length}if(Hv(a,["array"]))return a.indexOf(t,i);throw new Ys(`Expected second argument to be of type array or string, but found ${dl(Il(a))} instead.`,this.key)}eachChild(r){r(this.needle),r(this.haystack),this.fromIndex&&r(this.fromIndex)}outputDefined(){return!1}},nB=class nQ{constructor(r,t,a,i,o,s){this.inputType=r,this.type=t,this.input=a,this.cases=i,this.outputs=o,this.otherwise=s}static parse(r,t){if(r.length<5)return t.error(`Expected at least 4 arguments, but found only ${r.length-1}.`);if(r.length%2!=1)return t.error("Expected an even number of arguments.");let a,i;t.expectedType&&t.expectedType.kind!=="value"&&(i=t.expectedType);let o={},s=[];for(let u=2;u2**53-1)return h.error(`Branch labels must be integers no larger than ${2**53-1}.`);if(typeof p=="number"&&Math.floor(p)!==p)return h.error("Numeric branch labels must be integer values.");if(!a)a=Il(p);else if(h.checkSubtype(a,Il(p)))return null;if(o[String(p)]!==void 0)return h.error("Branch labels must be unique.");o[String(p)]=s.length}let d=t.parse(f,u,i);if(!d)return null;i||(i=d.type),s.push(d)}let l=t.parse(r[1],1,eo);if(!l)return null;let n=t.parse(r[r.length-1],r.length-1,i);return!n||l.type.kind!=="value"&&t.concat(1).checkSubtype(a,l.type)?null:new nQ(a,i,l,o,s,n)}evaluate(r){let t=this.input.evaluate(r);return(Il(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(r)}eachChild(r){r(this.input),this.outputs.forEach(r),r(this.otherwise)}outputDefined(){return this.outputs.every(r=>r.outputDefined())&&this.otherwise.outputDefined()}},oB=class oQ{constructor(r,t,a){this.type=r,this.branches=t,this.otherwise=a}static parse(r,t){if(r.length<4)return t.error(`Expected at least 3 arguments, but found only ${r.length-1}.`);if(r.length%2!=0)return t.error("Expected an odd number of arguments.");let a;t.expectedType&&t.expectedType.kind!=="value"&&(a=t.expectedType);let i=[];for(let s=1;st.outputDefined())&&this.otherwise.outputDefined()}},sB=class yD{constructor(r,t,a,i,o){this.type=r,this.input=t,this.beginIndex=a,this.key=i,this.endIndex=o}static parse(r,t){if(r.length<=2||r.length>=5)return t.error(`Expected 2 or 3 arguments, but found ${r.length-1} instead.`);let a=t.parse(r[1],1,eo),i=t.parse(r[2],2,mi);if(!a||!i)return null;if(!XM(a.type,[Uc(eo),Zn,eo]))return t.error(`Expected first argument to be of type array or string, but found ${dl(a.type)} instead`);if(r.length===4){let o=t.parse(r[3],3,mi);return o?new yD(a.type,a,i,t.key,o):null}return new yD(a.type,a,i,t.key)}evaluate(r){let t=this.input.evaluate(r),a=this.beginIndex.evaluate(r),i;if(this.endIndex&&(i=this.endIndex.evaluate(r)),Hv(t,["string"]))return[...t].slice(a,i).join("");if(Hv(t,["array"]))return t.slice(a,i);throw new Ys(`Expected first argument to be of type array or string, but found ${dl(Il(t))} instead.`,this.key)}eachChild(r){r(this.input),r(this.beginIndex),this.endIndex&&r(this.endIndex)}outputDefined(){return!1}},wS=class _D{constructor(r,t){this.type=r,this.args=t}static parse(r,t){if(r.length<2)return t.error("Expected at least one argument.");let a=null,i=t.expectedType;i&&i.kind!=="value"&&(a=i);let o=[];for(let s of r.slice(1)){let l=t.parse(s,1+o.length,a,void 0,{typeAnnotation:"omit"});if(!l)return null;a||(a=l.type),o.push(l)}if(!a)throw Error("No output type");return i&&o.some(s=>Hy(i,s.type))?new _D(eo,o):new _D(a,o)}evaluate(r){let t=null,a=0,i;for(let o of this.args)if(a++,t=o.evaluate(r),t&&t instanceof jd&&!t.available&&(i||(i=t.name),t=null,a===this.args.length&&(t=i)),t!==null)break;return t}eachChild(r){this.args.forEach(r)}outputDefined(){return this.args.every(r=>r.outputDefined())}},lB=u1("==",afe,tR),uB=u1("!=",ife,ufe),cB=u1("<",nfe,cfe),fB=u1(">",ofe,ffe),hB=u1("<=",sfe,hfe),dB=u1(">=",lfe,dfe),AS=class sQ{constructor(r,t,a){this.type=w_,this.locale=a,this.caseSensitive=r,this.diacriticSensitive=t}static parse(r,t){if(r.length!==2)return t.error("Expected one argument.");let a=r[1];if(typeof a!="object"||Array.isArray(a))return t.error("Collator options argument must be an object.");let i=t.parse(a["case-sensitive"]!==void 0&&a["case-sensitive"],1,mo);if(!i)return null;let o=t.parse(a["diacritic-sensitive"]!==void 0&&a["diacritic-sensitive"],1,mo);if(!o)return null;let s=null;return a.locale&&(s=t.parse(a.locale,1,Zn),!s)?null:new sQ(i,o,s)}evaluate(r){return new J2(this.caseSensitive.evaluate(r),this.diacriticSensitive.evaluate(r),this.locale?this.locale.evaluate(r):null)}eachChild(r){r(this.caseSensitive),r(this.diacriticSensitive),this.locale&&r(this.locale)}outputDefined(){return!1}},pB=class lQ{constructor(r,t,a,i,o,s){this.type=Zn,this.number=r,this.locale=t,this.currency=a,this.unit=i,this.minFractionDigits=o,this.maxFractionDigits=s}static parse(r,t){if(r.length!==3)return t.error("Expected two arguments.");let a=t.parse(r[1],1,mi);if(!a)return null;let i=r[2];if(typeof i!="object"||Array.isArray(i))return t.error("NumberFormat options argument must be an object.");let o=null;if(i.locale&&(o=t.parse(i.locale,1,Zn),!o))return null;let s=null;if(i.currency&&(s=t.parse(i.currency,1,Zn),!s))return null;let l=null;if(i.unit&&(l=t.parse(i.unit,1,Zn),!l))return null;if(s&&l)return t.error("NumberFormat options `currency` and `unit` are mutually exclusive");let n=null;if(i["min-fraction-digits"]&&(n=t.parse(i["min-fraction-digits"],1,mi),!n))return null;let u=null;return i["max-fraction-digits"]&&(u=t.parse(i["max-fraction-digits"],1,mi),!u)?null:new lQ(a,o,s,l,n,u)}evaluate(r){return new Intl.NumberFormat(this.locale?this.locale.evaluate(r):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(r):void 0,unit:this.unit?this.unit.evaluate(r):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(r):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(r):void 0}).format(this.number.evaluate(r))}eachChild(r){r(this.number),this.locale&&r(this.locale),this.currency&&r(this.currency),this.unit&&r(this.unit),this.minFractionDigits&&r(this.minFractionDigits),this.maxFractionDigits&&r(this.maxFractionDigits)}outputDefined(){return!1}},vB=class uQ{constructor(r){this.type=C1,this.input=r}static parse(r,t){if(r.length!==2)return t.error("Expected two arguments.");let a=t.parse(r[1],1,Zn);return a?new uQ(a):t.error("No image name provided.")}evaluate(r){let t=this.input.evaluate(r),a=jd.fromString(t);return a&&r.availableImages&&(a.available=r.availableImages.indexOf(t)>-1),a}eachChild(r){r(this.input)}outputDefined(){return!1}},mB=class cQ{constructor(r,t){this.input=r,this.key=t,this.type=mi}static parse(r,t){if(r.length!==2)return t.error(`Expected 1 argument, but found ${r.length-1} instead.`);let a=t.parse(r[1],1);return a?a.type.kind!=="array"&&a.type.kind!=="string"&&a.type.kind!=="value"?t.error(`Expected argument of type string or array, but found ${dl(a.type)} instead.`):new cQ(a,t.key):null}evaluate(r){let t=this.input.evaluate(r);if(typeof t=="string")return[...t].length;if(Array.isArray(t))return t.length;throw new Ys(`Expected value to be of type string or array, but found ${dl(Il(t))} instead.`,this.key)}eachChild(r){r(this.input)}outputDefined(){return!1}},Ud=8192,ew=class cA{constructor(r,t){this.type=mo,this.geojson=r,this.geometries=t}static parse(r,t){if(r.length!==2)return t.error(`'within' expression requires exactly one argument, but found ${r.length-1} instead.`);if(l1(r[1])){let a=r[1];if(a.type==="FeatureCollection"){let i=[];for(let o of a.features){let{type:s,coordinates:l}=o.geometry;s==="Polygon"&&i.push(l),s==="MultiPolygon"&&i.push(...l)}if(i.length)return new cA(a,{type:"MultiPolygon",coordinates:i})}else if(a.type==="Feature"){let i=a.geometry.type;if(i==="Polygon"||i==="MultiPolygon")return new cA(a,a.geometry)}else if(a.type==="Polygon"||a.type==="MultiPolygon")return new cA(a,a)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(r){if(r.geometry()!=null&&r.canonicalID()!=null){if(r.geometryType()==="Point")return Efe(r,this.geometries);if(r.geometryType()==="LineString")return Sfe(r,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},TS=class{constructor(e=[],r=(t,a)=>ta)){if(this.data=e,this.length=this.data.length,this.compare=r,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;let e=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:r,compare:t}=this,a=r[e];for(;e>0;){let i=e-1>>1,o=r[i];if(t(a,o)>=0)break;r[e]=o,e=i}r[e]=a}_down(e){let{data:r,compare:t}=this,a=this.length>>1,i=r[e];for(;e=0)break;r[e]=r[o],e=o}r[e]=i}},MS=Math.PI/180,tw=class{constructor(e){let r=MS*6378.137*1e3,t=Math.cos(e*MS),a=1/(1-.0066943799901413165*(1-t*t)),i=Math.sqrt(a);this.kx=r*i*t,this.ky=r*i*a*.9933056200098587}distance(e,r){let t=this.wrap(e[0]-r[0])*this.kx,a=(e[1]-r[1])*this.ky;return Math.sqrt(t*t+a*a)}pointOnLine(e,r){let t=1/0,a,i,o,s;for(let l=0;l1?(n=e[l+1][0],u=e[l+1][1]):h>0&&(n+=c/this.kx*h,u+=f/this.ky*h)),c=this.wrap(r[0]-n)*this.kx,f=(r[1]-u)*this.ky;let d=c*c+f*f;d180;)e-=360;return e}},rw=class fA{constructor(r,t){this.type=mi,this.geojson=r,this.geometries=t}static parse(r,t){if(r.length!==2)return t.error(`'distance' expression requires exactly one argument, but found ${r.length-1} instead.`);if(l1(r[1])){let a=r[1];if(a.type==="FeatureCollection")return new fA(a,a.features.map(i=>lE(i.geometry)).flat());if(a.type==="Feature")return new fA(a,lE(a.geometry));if("type"in a&&"coordinates"in a)return new fA(a,lE(a))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(r){if(r.geometry()!=null&&r.canonicalID()!=null){if(r.geometryType()==="Point")return Pfe(r,this.geometries);if(r.geometryType()==="LineString")return Ife(r,this.geometries);if(r.geometryType()==="Polygon")return Rfe(r,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},gB=class fQ{constructor(r){let t=null;for(let a of r)if(!t)t=a.type;else{if(t===a.type)continue;t=eo;break}this.type=Uc(t??eo,r.length),this.arr=r}static parse(r,t){if(r.length!==2)return t.error(`'semiliteral' expression requires exactly one argument, but found ${r.length-1} instead.`);if(!l1(r[1]))return t.error(`invalid value of type "${typeof r[1]}"`);let a=r[1],i=Il(a);if(i.kind==="array"){let o=a.map(s=>t.parse(s,null,eo));return new fQ(o)}return new rm(i,a)}evaluate(r){return this.arr.map(t=>t.evaluate(r))}eachChild(r){this.arr.forEach(r)}outputDefined(){return this.arr.every(r=>r.outputDefined())}},aw=class hQ{constructor(r){this.key=r,this.type=eo}static parse(r,t){if(r.length!==2)return t.error(`Expected 1 argument, but found ${r.length-1} instead.`);let a=r[1];return a==null?t.error("Global state property must be defined."):typeof a=="string"?new hQ(a):t.error(`Global state property must be string, but found ${typeof r[1]} instead.`)}evaluate(r){var t,a;let i=(t=r.globals)==null?void 0:t.globalState;return!i||Object.keys(i).length===0?null:(a=Wy(i,this.key))!=null?a:null}eachChild(){}outputDefined(){return!1}},im={"==":lB,"!=":uB,">":fB,"<":cB,">=":dB,"<=":hB,array:pp,at:rB,boolean:pp,case:oB,coalesce:wS,collator:AS,format:yS,image:vB,in:aB,"index-of":iB,interpolate:vh,"interpolate-hcl":vh,"interpolate-lab":vh,length:mB,let:xS,literal:rm,match:nB,number:pp,"number-format":pB,object:pp,semiliteral:gB,slice:sB,step:Q2,string:pp,"to-boolean":am,"to-color":am,"to-number":am,"to-string":am,var:bS,within:ew,distance:rw,"global-state":aw},qd=class extends Error{constructor(e,r){super(r),this.message=r,this.key=e}},yB=class dQ{constructor(r,t=[]){this.parent=r,this.bindings={};for(let[a,i]of t)this.bindings[a]=i}concat(r){return new dQ(this,r)}get(r){if(this.bindings[r])return this.bindings[r];if(this.parent)return this.parent.get(r);throw Error(`${r} not found in scope.`)}has(r){return this.bindings[r]?!0:this.parent?this.parent.has(r):!1}},ES=class pQ{constructor(r,t,a=[],i,o=new yB,s=[]){this.registry=r,this.path=a,this.key=a.map(l=>`[${l}]`).join(""),this.scope=o,this.errors=s,this.expectedType=i,this._isConstant=t}parse(r,t,a,i,o={}){return t?this.concat(t,a,i)._parse(r,o):this._parse(r,o)}_parse(r,t){(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number")&&(r=["literal",r]);let a=this.key;function i(o,s,l){return l==="assert"?new pp(s,[o],a):l==="coerce"?new am(s,[o],a):o}if(Array.isArray(r)){if(r.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let o=r[0];if(typeof o!="string")return this.error(`Expression name must be a string, but found ${typeof o} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let s=this.registry[o];if(s){let l=s.parse(r,this);if(!l)return null;if(this.expectedType){let n=this.expectedType,u=l.type;if((n.kind==="string"||n.kind==="number"||n.kind==="boolean"||n.kind==="object"||n.kind==="array")&&u.kind==="value")l=i(l,n,t.typeAnnotation||"assert");else if(n.kind==="projectionDefinition"&&["string","array","value"].includes(u.kind)||["color","formatted","resolvedImage"].includes(n.kind)&&["value","string"].includes(u.kind)||["padding","numberArray"].includes(n.kind)&&["value","number","array"].includes(u.kind)||n.kind==="colorArray"&&["value","string","array"].includes(u.kind)||n.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(u.kind))l=i(l,n,t.typeAnnotation||"coerce");else if(this.checkSubtype(n,u))return null}if(!(l instanceof rm)&&l.type.kind!=="resolvedImage"&&this._isConstant(l)){let n=new gS;try{l=new rm(l.type,l.evaluate(n))}catch(u){return this.error(u.message),null}}return l}return this.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0)}return r===void 0?this.error("'undefined' value invalid. Use null instead."):typeof r=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof r} instead.`)}concat(r,t,a){let i=typeof r=="number"?this.path.concat(r):this.path,o=a?this.scope.concat(a):this.scope;return new pQ(this.registry,this._isConstant,i,t||null,o,this.errors)}error(r,...t){let a=`${this.key}${t.map(i=>`[${i}]`).join("")}`;this.errors.push(new qd(a,r))}checkSubtype(r,t){let a=Hy(r,t);return a&&this.error(a),a}},R0=class zx{constructor(r,t,a,i,o){this.name=r,this.type=t,this._evaluate=a,this.args=i,this.key=o}evaluate(r){return this._evaluate(r,this.args,this.key)}eachChild(r){this.args.forEach(r)}outputDefined(){return!1}static parse(r,t){let a=r[0],i=zx.definitions[a];if(!i)return t.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0);let o=Array.isArray(i)?i[0]:i.type,s=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,l=s.filter(([u])=>!Array.isArray(u)||u.length===r.length-1),n=null;for(let[u,c]of l){n=new ES(t.registry,u2,t.path,null,t.scope);let f=[],h=!1;for(let d=1;dBfe(f)).join(" | "),c=[];for(let f=1;f{throw new Ys(r.evaluate(e),t)}],typeof:[Zn,[eo],(e,[r])=>dl(Il(r.evaluate(e)))],"to-rgba":[Uc(mi,4),[Hh],(e,[r])=>{let[t,a,i,o]=r.evaluate(e).rgb;return[t*255,a*255,i*255,o]}],rgb:[Hh,[mi,mi,mi],hR],rgba:[Hh,[mi,mi,mi,mi],hR],has:{type:mo,overloads:[[[Zn],(e,[r])=>dR(r.evaluate(e),e.properties())],[[Zn,I0],(e,[r,t])=>dR(r.evaluate(e),t.evaluate(e))]]},get:{type:eo,overloads:[[[Zn],(e,[r])=>uE(r.evaluate(e),e.properties())],[[Zn,I0],(e,[r,t])=>uE(r.evaluate(e),t.evaluate(e))]]},"feature-state":[eo,[Zn],(e,[r])=>uE(r.evaluate(e),e.featureState||{})],properties:[I0,[],e=>e.properties()],"geometry-type":[Zn,[],e=>e.geometryType()],id:[eo,[],e=>e.id()],zoom:[mi,[],e=>e.globals.zoom],"heatmap-density":[mi,[],e=>e.globals.heatmapDensity||0],elevation:[mi,[],e=>e.globals.elevation||0],"line-progress":[mi,[],e=>e.globals.lineProgress||0],accumulated:[eo,[],e=>e.globals.accumulated===void 0?null:e.globals.accumulated],"+":[mi,$v(mi),(e,r)=>{let t=0;for(let a of r)t+=a.evaluate(e);return t}],"*":[mi,$v(mi),(e,r)=>{let t=1;for(let a of r)t*=a.evaluate(e);return t}],"-":{type:mi,overloads:[[[mi,mi],(e,[r,t])=>r.evaluate(e)-t.evaluate(e)],[[mi],(e,[r])=>-r.evaluate(e)]]},"/":[mi,[mi,mi],(e,[r,t])=>r.evaluate(e)/t.evaluate(e)],"%":[mi,[mi,mi],(e,[r,t])=>r.evaluate(e)%t.evaluate(e)],ln2:[mi,[],()=>Math.LN2],pi:[mi,[],()=>Math.PI],e:[mi,[],()=>Math.E],"^":[mi,[mi,mi],(e,[r,t])=>r.evaluate(e)**+t.evaluate(e)],sqrt:[mi,[mi],(e,[r])=>Math.sqrt(r.evaluate(e))],log10:[mi,[mi],(e,[r])=>Math.log(r.evaluate(e))/Math.LN10],ln:[mi,[mi],(e,[r])=>Math.log(r.evaluate(e))],log2:[mi,[mi],(e,[r])=>Math.log(r.evaluate(e))/Math.LN2],sin:[mi,[mi],(e,[r])=>Math.sin(r.evaluate(e))],cos:[mi,[mi],(e,[r])=>Math.cos(r.evaluate(e))],tan:[mi,[mi],(e,[r])=>Math.tan(r.evaluate(e))],asin:[mi,[mi],(e,[r])=>Math.asin(r.evaluate(e))],acos:[mi,[mi],(e,[r])=>Math.acos(r.evaluate(e))],atan:[mi,[mi],(e,[r])=>Math.atan(r.evaluate(e))],min:[mi,$v(mi),(e,r)=>Math.min(...r.map(t=>t.evaluate(e)))],max:[mi,$v(mi),(e,r)=>Math.max(...r.map(t=>t.evaluate(e)))],abs:[mi,[mi],(e,[r])=>Math.abs(r.evaluate(e))],round:[mi,[mi],(e,[r])=>{let t=r.evaluate(e);return t<0?-Math.round(-t):Math.round(t)}],floor:[mi,[mi],(e,[r])=>Math.floor(r.evaluate(e))],ceil:[mi,[mi],(e,[r])=>Math.ceil(r.evaluate(e))],"filter-==":[mo,[Zn,eo],(e,[r,t])=>e.properties()[r.value]===t.value],"filter-id-==":[mo,[eo],(e,[r])=>e.id()===r.value],"filter-type-==":[mo,[Zn],(e,[r])=>e.geometryType()===r.value],"filter-<":[mo,[Zn,eo],(e,[r,t])=>{let a=e.properties()[r.value],i=t.value;return typeof a==typeof i&&a{let t=e.id(),a=r.value;return typeof t==typeof a&&t":[mo,[Zn,eo],(e,[r,t])=>{let a=e.properties()[r.value],i=t.value;return typeof a==typeof i&&a>i}],"filter-id->":[mo,[eo],(e,[r])=>{let t=e.id(),a=r.value;return typeof t==typeof a&&t>a}],"filter-<=":[mo,[Zn,eo],(e,[r,t])=>{let a=e.properties()[r.value],i=t.value;return typeof a==typeof i&&a<=i}],"filter-id-<=":[mo,[eo],(e,[r])=>{let t=e.id(),a=r.value;return typeof t==typeof a&&t<=a}],"filter->=":[mo,[Zn,eo],(e,[r,t])=>{let a=e.properties()[r.value],i=t.value;return typeof a==typeof i&&a>=i}],"filter-id->=":[mo,[eo],(e,[r])=>{let t=e.id(),a=r.value;return typeof t==typeof a&&t>=a}],"filter-has":[mo,[eo],(e,[r])=>{let t=r.value,a=e.properties();return t in a&&a[t]!==void 0}],"filter-has-id":[mo,[],e=>e.id()!==null&&e.id()!==void 0],"filter-type-in":[mo,[Uc(Zn)],(e,[r])=>r.value.indexOf(e.geometryType())>=0],"filter-id-in":[mo,[Uc(eo)],(e,[r])=>r.value.indexOf(e.id())>=0],"filter-in-small":[mo,[Zn,Uc(eo)],(e,[r,t])=>t.value.indexOf(e.properties()[r.value])>=0],"filter-in-large":[mo,[Zn,Uc(eo)],(e,[r,t])=>zfe(e.properties()[r.value],t.value,0,t.value.length-1)],all:{type:mo,overloads:[[[mo,mo],(e,[r,t])=>r.evaluate(e)&&t.evaluate(e)],[$v(mo),(e,r)=>{for(let t of r)if(!t.evaluate(e))return!1;return!0}]]},any:{type:mo,overloads:[[[mo,mo],(e,[r,t])=>r.evaluate(e)||t.evaluate(e)],[$v(mo),(e,r)=>{for(let t of r)if(t.evaluate(e))return!0;return!1}]]},"!":[mo,[mo],(e,[r])=>!r.evaluate(e)],"is-supported-script":[mo,[Zn],(e,[r])=>{let t=e.globals&&e.globals.isSupportedScript;return!t||t(r.evaluate(e))}],upcase:[Zn,[Zn],(e,[r])=>r.evaluate(e).toUpperCase()],downcase:[Zn,[Zn],(e,[r])=>r.evaluate(e).toLowerCase()],concat:[Zn,$v(eo),(e,r)=>r.map(t=>$y(t.evaluate(e))).join("")],split:[Uc(Zn),[Zn,Zn],(e,[r,t])=>r.evaluate(e).split(t.evaluate(e))],join:[Zn,[Uc(Zn),Zn],(e,[r,t])=>r.evaluate(e).join(t.evaluate(e))],"resolved-locale":[Zn,[w_],(e,[r])=>r.evaluate(e).resolvedLocale()]}),iw=/^(.*)-transition$/,nw=class{constructor(e,r,t,a){this.expression=e,this._warningHistory={},this._evaluator=new gS,this._defaultValue=t?xR(t):null,this._enumValues=t&&t.type==="enum"?t.values:null,this._globalState=a,this._rootKey=r}evaluateWithoutErrorHandling(e,r,t,a,i,o){return this._globalState&&(e=d1(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=r,this._evaluator.featureState=t,this._evaluator.canonical=a,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}evaluate(e,r,t,a,i,o){this._globalState&&(e=d1(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=r||null,this._evaluator.featureState=t||null,this._evaluator.canonical=a,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{let s=this.expression.evaluate(this._evaluator);if(s==null||typeof s=="number"&&s!==s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new Ys(`Expected value to be one of ${Object.keys(this._enumValues).map(l=>JSON.stringify(l)).join(", ")}, but found ${JSON.stringify(s)} instead.`,"");return s}catch(s){let l=s instanceof Ys?s.path:"",n=`${l}|${s.message}`;return this._warningHistory[n]||(this._warningHistory[n]=!0,typeof console<"u"&&console.warn(gR(this._rootKey,l,s.message,this._defaultValue))),this._defaultValue}}},D1=class{constructor(e,r,t){this.kind=e,this._styleExpression=r,this.isStateDependent=e!=="constant"&&!Ky(r.expression),this.globalStateRefs=e_(r.expression),this._globalState=t}evaluateWithoutErrorHandling(e,r,t,a,i,o){return this._globalState&&(e=d1(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,r,t,a,i,o)}evaluate(e,r,t,a,i,o){return this._globalState&&(e=d1(e,this._globalState)),this._styleExpression.evaluate(e,r,t,a,i,o)}},S_=class{constructor(e,r,t,a,i){this.kind=e,this.zoomStops=t,this._styleExpression=r,this.isStateDependent=e!=="camera"&&!Ky(r.expression),this.globalStateRefs=e_(r.expression),this.interpolationType=a,this._globalState=i}evaluateWithoutErrorHandling(e,r,t,a,i,o){return this._globalState&&(e=d1(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,r,t,a,i,o)}evaluate(e,r,t,a,i,o){return this._globalState&&(e=d1(e,this._globalState)),this._styleExpression.evaluate(e,r,t,a,i,o)}interpolationFactor(e,r,t){return this.interpolationType?vh.interpolationFactor(this.interpolationType,e,r,t):0}},SS=class vQ{constructor(r,t,a){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,yR(t),this._parameters=r,this._specification=a,this._rootKey=t,this._defaultValue=xR(a),this._warningHistory={};let i=vR(this._parameters,this._specification);this.kind=i.kind,this.interpolationFactor=i.interpolationFactor,this.zoomStops=i.zoomStops,this.interpolationType=i.interpolationType,this._innerEvaluate=i.evaluate}evaluate(r,t){try{return this._innerEvaluate(r,t)}catch(a){let i=a instanceof Error?a.message:String(a),o=`|${i}`;return this._warningHistory[o]||(this._warningHistory[o]=!0,typeof console<"u"&&console.warn(gR(this._rootKey,"",i,this._defaultValue))),this._defaultValue}}static deserialize(r){return new vQ(r._parameters,r._rootKey,r._specification)}static serialize(r){return{_parameters:r._parameters,_specification:r._specification,_rootKey:r._rootKey}}},_B={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},kS={promoteId:ahe},CS=1114111,xB=/^u\+(?:([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?|([0-9a-f]{0,5}\?{1,6}))$/i,DS={"*"(){return[]},array:mE,boolean:Qfe,number:y2,color:gE,constants:SR,enum:r_,filter:yE,function:kR,layer:PR,object:hh,source:IR,light:RR,sky:zR,terrain:BR,projection:che,projectionDefinition:fhe,string:D0,formatted:ihe,resolvedImage:nhe,padding:ohe,numberArray:she,colorArray:lhe,variableAnchorOffsetCollection:uhe,sprite:OR,state:NR,fontFaces:jR},dh.source=Gh(Vh(IR)),dh.sprite=Gh(Vh(OR)),dh.glyphs=Gh(Vh(UR)),dh.fontFaces=Gh(Vh(jR)),dh.light=Gh(Vh(RR)),dh.sky=Gh(Vh(zR)),dh.terrain=Gh(Vh(BR)),dh.state=Gh(Vh(NR)),dh.layer=Gh(Vh(PR)),dh.filter=Gh(Vh(yE)),dh.paintProperty=Gh(Vh(LR)),dh.layoutProperty=Gh(Vh(FR)),bB={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"},wB=class{constructor(e,r,t){this._rootKey=r,this._globalState=t,this.setValue(e)}evaluate(){var e;return(e=this._literalValue)!=null?e:this._compiledValue.evaluate({})}setValue(e){if(e==null||e==="visible"||e==="none"){this._literalValue=e==="none"?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let r=p2(e,this._rootKey,bB,this._globalState);if(r.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,Error(r.value.map(t=>`${t.key}: ${t.message}`).join(", "));this._literalValue=void 0,this._compiledValue=r.value,this._globalStateRefs=e_(r.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}},Af=dh,LS=new Set(Object.keys(ta).filter(e=>e.startsWith("source_")).map(e=>e.slice(7).replaceAll("_","-"))),ow=class mQ{constructor(r,t,a){let i=this.cells=[];if(r instanceof ArrayBuffer){this.arrayBuffer=r;let s=new Int32Array(this.arrayBuffer);r=s[0],t=s[1],a=s[2],this.d=t+2*a;for(let u=0;u=f[d+0]&&i>=f[d+1])?(l[h]=!0,s.push(c[h])):l[h]=!1}}}_forEachCell(r,t,a,i,o,s,l,n){let u=this._convertToCellCoord(r),c=this._convertToCellCoord(t),f=this._convertToCellCoord(a),h=this._convertToCellCoord(i);for(let d=u;d<=f;d++)for(let p=c;p<=h;p++){let g=this.d*p+d;if((!n||n(this._convertFromCellCoord(d),this._convertFromCellCoord(p),this._convertFromCellCoord(d+1),this._convertFromCellCoord(p+1)))&&o.call(this,r,t,a,i,g,s,l,n))return}}_convertFromCellCoord(r){return(r-this.padding)/this.scale}_convertToCellCoord(r){return Math.max(0,Math.min(this.d-1,Math.floor(r*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let r=this.cells,t=3+this.cells.length+1+1,a=0;for(let s of this.cells)a+=s.length;let i=new Int32Array(t+a+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;let o=t;for(let s=0;st?(this.lastIntegerZoom=t+1,this.lastIntegerZoomTime=r):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*t}:{fromScale:.5,toScale:1,t:1-(1-t)*r}}},lw="-transition",k_=class{constructor(e,r,t,a){this.property=e,this.value=r,this.expression=Wfe(r===void 0?e.specification.default:r,t,e.specification,a)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(e,r,t){return this.property.possiblyEvaluate(this,e,r,t)}},uw=class{constructor(e,r,t){this.property=e,this.value=new k_(e,void 0,r,t)}transitioned(e,r){return new FS(this.property,this.value,r,tn({},e.transition,this.transition),e.now)}untransitioned(){return new FS(this.property,this.value,null,{},0)}},C_=class{constructor(e,r,t){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=t,this._rootKey=r}_propertyRootKey(e){return`${this._rootKey}.${String(e)}`}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return jf(this._values[e].value.value)}setValue(e,r){Object.hasOwn(this._values,e)||(this._values[e]=new uw(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].value=new k_(this._values[e].property,r===null?void 0:jf(r),this._propertyRootKey(e),this._globalState)}getTransition(e){return jf(this._values[e].transition)}setTransition(e,r){Object.hasOwn(this._values,e)||(this._values[e]=new uw(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].transition=jf(r)||void 0}serialize(){let e={};for(let r of Object.keys(this._values)){let t=this.getValue(r);t!==void 0&&(e[r]=t);let a=this.getTransition(r);a!==void 0&&(e[`${r}${lw}`]=a)}return e}transitioned(e,r){let t=new PS(this._properties);for(let a of Object.keys(this._values))t._values[a]=this._values[a].transitioned(e,r._values[a]);return t}untransitioned(){let e=new PS(this._properties);for(let r of Object.keys(this._values))e._values[r]=this._values[r].untransitioned();return e}},FS=class{constructor(e,r,t,a,i){this.property=e,this.value=r,this.begin=i+a.delay||0,this.end=this.begin+a.duration||0,e.specification.transition&&(a.delay||a.duration)&&(this.prior=t)}possiblyEvaluate(e,r,t){let a=e.now||0,i=this.value.possiblyEvaluate(e,r,t),o=this.prior;if(!o)return i;if(a>this.end||this.value.isDataDriven())return this.prior=null,i;if(aa.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:t,to:r}}interpolate(e){return e}},IS=class{constructor(e,r){this.specification=e,this.name=r}possiblyEvaluate(e,r,t,a){if(e.value!==void 0){if(e.expression.kind==="constant"){let i=e.expression.evaluate(r,null,{},t,a);return this._calculate(i,i,i,r)}return this._calculate(e.expression.evaluate(new Ko(Math.floor(r.zoom-1),r)),e.expression.evaluate(new Ko(Math.floor(r.zoom),r)),e.expression.evaluate(new Ko(Math.floor(r.zoom+1),r)),r)}}_calculate(e,r,t,a){return a.zoom>a.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:t,to:r}}interpolate(e){return e}},L_=class{constructor(e,r){this.specification=e,this.name=r}possiblyEvaluate(e,r,t,a){return!!e.expression.evaluate(r,null,{},t,a)}interpolate(){return!1}},Du=class{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let r in e){let t=e[r];t.specification.overridable&&this.overridableProperties.push(r);let a=this.defaultPropertyValues[r]=new k_(t,void 0,t.name,void 0),i=this.defaultTransitionablePropertyValues[r]=new uw(t,t.name,void 0);this.defaultTransitioningPropertyValues[r]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=a.possiblyEvaluate({})}}},Ri("DataDrivenProperty",gn),Ri("DataConstantProperty",Ti),Ri("CrossFadedDataDrivenProperty",L1),Ri("CrossFadedProperty",IS),Ri("ColorRampProperty",L_),RS=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",cw=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?",Wh=class extends Zl{constructor(e,r,t){if(super(),this.id=e.id,this.type=e.type,this._globalState=t,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=vhe(this.visibility,`layers[${this.id}].layout.visibility`,t),e.type!=="custom"&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,e.type!=="background"&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=t_(e.filter,`layers[${this.id}].filter`,t)),r.layout&&(this._unevaluatedLayout=new AB(r.layout,`layers[${this.id}].layout`,t)),r.paint)){this._transitionablePaint=new C_(r.paint,`layers[${this.id}].paint`,t);for(let a in e.paint)this.setPaintProperty(a,e.paint[a],{validate:!1});for(let a in e.layout)this.setLayoutProperty(a,e.layout[a],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new D_(r.paint)}}setFilter(e){this.filter=e,this._featureFilter=t_(e,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){var r;if(e==="visibility")return this.visibility;if((r=this._transitionablePaint)!=null&&r.hasProperty(e))throw Error(e+RS);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${e}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(e)}getLayoutAffectingGlobalStateRefs(){let e=new Set;for(let r of this._visibilityExpression.getGlobalStateRefs())e.add(r);if(this._unevaluatedLayout)for(let r in this._unevaluatedLayout._values){let t=this._unevaluatedLayout._values[r];for(let a of t.getGlobalStateRefs())e.add(a)}for(let r of this._featureFilter.getGlobalStateRefs())e.add(r);return e}getPaintAffectingGlobalStateRefs(){var e;let r=new globalThis.Map;if(this._transitionablePaint)for(let t in this._transitionablePaint._values){let a=this._transitionablePaint._values[t].value;for(let i of a.getGlobalStateRefs()){let o=(e=r.get(i))!=null?e:[];o.push({name:t,value:a.value}),r.set(i,o)}}return r}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,r,t={}){var a;if(e==="visibility"){this.visibility=r,this._visibilityExpression.setValue(r),this.recalculateVisibility();return}if((a=this._transitionablePaint)!=null&&a.hasProperty(e)){this.fire(new mn(Error(e+RS)));return}r!=null&&this._validate(Af.layoutProperty,`layers.${this.id}.layout.${e}`,e,r,t)||this._unevaluatedLayout.setValue(e,r)}getPaintProperty(e){var r,t;if(e.endsWith("-transition")){let a=e.slice(0,-11);if(a==="visibility"||(r=this._unevaluatedLayout)!=null&&r.hasProperty(a))throw Error(e+cw);return this._transitionablePaint.getTransition(a)}if(e==="visibility"||(t=this._unevaluatedLayout)!=null&&t.hasProperty(e))throw Error(e+cw);return this._transitionablePaint.getValue(e)}setPaintProperty(e,r,t={}){var a;if(e==="visibility"||(a=this._unevaluatedLayout)!=null&&a.hasProperty(e))return this.fire(new mn(Error(e+cw))),!1;if(r!=null&&this._validate(Af.paintProperty,`layers.${this.id}.paint.${e}`,e,r,t))return!1;if(e.endsWith("-transition"))return this._transitionablePaint.setTransition(e.slice(0,-11),r||void 0),!1;{let i=this._transitionablePaint._values[e],o=i.property.specification["property-type"]==="cross-faded-data-driven",s=i.value.isDataDriven(),l=i.value;this._transitionablePaint.setValue(e,r),this._handleSpecialPaintPropertyUpdate(e);let n=this._transitionablePaint._values[e].value;return n.isDataDriven()||s||o||this._handleOverridablePaintPropertyUpdate(e,l,n)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,r,t){return!1}isHidden(e=this.minzoom,r=!1){return this.minzoom&&e<(r?Math.floor(this.minzoom):this.minzoom)||this.maxzoom&&e>=this.maxzoom?!0:this._evaluatedVisibility==="none"}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,r){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,r)}serialize(){var e,r;let t={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:(e=this._unevaluatedLayout)==null?void 0:e.serialize(),paint:(r=this._transitionablePaint)==null?void 0:r.serialize()};return this.visibility&&(t.layout||(t.layout={}),t.layout.visibility=this.visibility),jI(t,(a,i)=>a!==void 0&&!(i==="layout"&&!Object.keys(a).length)&&!(i==="paint"&&!Object.keys(a).length))}_validate(e,r,t,a,i={}){return i_(this,e,{key:r,layerType:this.type,objectKey:t,value:a},i)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let r=this.paint.get(e);if(r instanceof mh&&f1(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}},MB=()=>TB||(TB=new Du({"raster-opacity":new Ti(ta.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new Ti(ta.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new Ti(ta.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new Ti(ta.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new Ti(ta.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new Ti(ta.paint_raster["raster-contrast"],"raster-contrast"),resampling:new Ti(ta.paint_raster.resampling,"resampling"),"raster-resampling":new Ti(ta.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new Ti(ta.paint_raster["raster-fade-duration"],"raster-fade-duration")})),EB={get paint(){return MB()}},fw=e=>e.type==="raster",SB=class extends Wh{constructor(e,r){super(e,EB,r)}},kB={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},F1=class{constructor(e,r){this._structArray=e,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},nl=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,r){return e._trim(),r&&(e.isTransferred=!0,r.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let r=Object.create(this.prototype);return r.arrayBuffer=e.arrayBuffer,r.length=e.length,r.capacity=e.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}_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(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*5),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}},P1=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r){let t=this.length;return this.resize(t+1),this.emplace(t,e,r)}emplace(e,r,t){let a=e*2;return this.int16[a+0]=r,this.int16[a+1]=t,e}},P1.prototype.bytesPerElement=4,Ri("StructArrayLayout2i4",P1),F_=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t){let a=this.length;return this.resize(a+1),this.emplace(a,e,r,t)}emplace(e,r,t,a){let i=e*3;return this.int16[i+0]=r,this.int16[i+1]=t,this.int16[i+2]=a,e}},F_.prototype.bytesPerElement=6,Ri("StructArrayLayout3i6",F_),hw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a){let i=this.length;return this.resize(i+1),this.emplace(i,e,r,t,a)}emplace(e,r,t,a,i){let o=e*4;return this.int16[o+0]=r,this.int16[o+1]=t,this.int16[o+2]=a,this.int16[o+3]=i,e}},hw.prototype.bytesPerElement=8,Ri("StructArrayLayout4i8",hw),dw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o){let s=this.length;return this.resize(s+1),this.emplace(s,e,r,t,a,i,o)}emplace(e,r,t,a,i,o,s){let l=e*6;return this.int16[l+0]=r,this.int16[l+1]=t,this.int16[l+2]=a,this.int16[l+3]=i,this.int16[l+4]=o,this.int16[l+5]=s,e}},dw.prototype.bytesPerElement=12,Ri("StructArrayLayout2i4i12",dw),pw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o){let s=this.length;return this.resize(s+1),this.emplace(s,e,r,t,a,i,o)}emplace(e,r,t,a,i,o,s){let l=e*4,n=e*8;return this.int16[l+0]=r,this.int16[l+1]=t,this.uint8[n+4]=a,this.uint8[n+5]=i,this.uint8[n+6]=o,this.uint8[n+7]=s,e}},pw.prototype.bytesPerElement=8,Ri("StructArrayLayout2i4ub8",pw),I1=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r){let t=this.length;return this.resize(t+1),this.emplace(t,e,r)}emplace(e,r,t){let a=e*2;return this.float32[a+0]=r,this.float32[a+1]=t,e}},I1.prototype.bytesPerElement=8,Ri("StructArrayLayout2f8",I1),vw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o,s,l,n,u){let c=this.length;return this.resize(c+1),this.emplace(c,e,r,t,a,i,o,s,l,n,u)}emplace(e,r,t,a,i,o,s,l,n,u,c){let f=e*10;return this.uint16[f+0]=r,this.uint16[f+1]=t,this.uint16[f+2]=a,this.uint16[f+3]=i,this.uint16[f+4]=o,this.uint16[f+5]=s,this.uint16[f+6]=l,this.uint16[f+7]=n,this.uint16[f+8]=u,this.uint16[f+9]=c,e}},vw.prototype.bytesPerElement=20,Ri("StructArrayLayout10ui20",vw),mw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o,s,l){let n=this.length;return this.resize(n+1),this.emplace(n,e,r,t,a,i,o,s,l)}emplace(e,r,t,a,i,o,s,l,n){let u=e*8;return this.uint16[u+0]=r,this.uint16[u+1]=t,this.uint16[u+2]=a,this.uint16[u+3]=i,this.uint16[u+4]=o,this.uint16[u+5]=s,this.uint16[u+6]=l,this.uint16[u+7]=n,e}},mw.prototype.bytesPerElement=16,Ri("StructArrayLayout8ui16",mw),gw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o,s,l,n,u,c,f,h){let d=this.length;return this.resize(d+1),this.emplace(d,e,r,t,a,i,o,s,l,n,u,c,f,h)}emplace(e,r,t,a,i,o,s,l,n,u,c,f,h,d){let p=e*14,g=e*7;return this.int16[p+0]=r,this.int16[p+1]=t,this.int16[p+2]=a,this.int16[p+3]=i,this.uint16[p+4]=o,this.uint16[p+5]=s,this.uint16[p+6]=l,this.uint16[p+7]=n,this.int16[p+8]=u,this.int16[p+9]=c,this.int16[p+10]=f,this.int16[p+11]=h,this.float32[g+6]=d,e}},gw.prototype.bytesPerElement=28,Ri("StructArrayLayout4i4ui4i1f28",gw),yw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,t){let a=this.length;return this.resize(a+1),this.emplace(a,e,r,t)}emplace(e,r,t,a){let i=e*3;return this.float32[i+0]=r,this.float32[i+1]=t,this.float32[i+2]=a,e}},yw.prototype.bytesPerElement=12,Ri("StructArrayLayout3f12",yw),_w=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){let t=e*1;return this.uint32[t+0]=r,e}},_w.prototype.bytesPerElement=4,Ri("StructArrayLayout1ul4",_w),xw=class extends nl{_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(e,r,t,a,i,o,s,l,n){let u=this.length;return this.resize(u+1),this.emplace(u,e,r,t,a,i,o,s,l,n)}emplace(e,r,t,a,i,o,s,l,n,u){let c=e*10,f=e*5;return this.int16[c+0]=r,this.int16[c+1]=t,this.int16[c+2]=a,this.int16[c+3]=i,this.int16[c+4]=o,this.int16[c+5]=s,this.uint32[f+3]=l,this.uint16[c+8]=n,this.uint16[c+9]=u,e}},xw.prototype.bytesPerElement=20,Ri("StructArrayLayout6i1ul2ui20",xw),bw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o){let s=this.length;return this.resize(s+1),this.emplace(s,e,r,t,a,i,o)}emplace(e,r,t,a,i,o,s){let l=e*6;return this.int16[l+0]=r,this.int16[l+1]=t,this.int16[l+2]=a,this.int16[l+3]=i,this.int16[l+4]=o,this.int16[l+5]=s,e}},bw.prototype.bytesPerElement=12,Ri("StructArrayLayout2i2i2i12",bw),ww=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i){let o=this.length;return this.resize(o+1),this.emplace(o,e,r,t,a,i)}emplace(e,r,t,a,i,o){let s=e*4,l=e*8;return this.float32[s+0]=r,this.float32[s+1]=t,this.float32[s+2]=a,this.int16[l+6]=i,this.int16[l+7]=o,e}},ww.prototype.bytesPerElement=16,Ri("StructArrayLayout2f1f2i16",ww),Aw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o){let s=this.length;return this.resize(s+1),this.emplace(s,e,r,t,a,i,o)}emplace(e,r,t,a,i,o,s){let l=e*16,n=e*4,u=e*8;return this.uint8[l+0]=r,this.uint8[l+1]=t,this.float32[n+1]=a,this.float32[n+2]=i,this.int16[u+6]=o,this.int16[u+7]=s,e}},Aw.prototype.bytesPerElement=16,Ri("StructArrayLayout2ub2f2i16",Aw),P_=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,t){let a=this.length;return this.resize(a+1),this.emplace(a,e,r,t)}emplace(e,r,t,a){let i=e*3;return this.uint16[i+0]=r,this.uint16[i+1]=t,this.uint16[i+2]=a,e}},P_.prototype.bytesPerElement=6,Ri("StructArrayLayout3ui6",P_),Tw=class extends nl{_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(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y){let _=this.length;return this.resize(_+1),this.emplace(_,e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y)}emplace(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_){let v=e*26,x=e*13,E=e*52;return this.int16[v+0]=r,this.int16[v+1]=t,this.uint16[v+2]=a,this.uint16[v+3]=i,this.uint32[x+2]=o,this.uint32[x+3]=s,this.uint32[x+4]=l,this.uint16[v+10]=n,this.uint16[v+11]=u,this.uint16[v+12]=c,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[E+36]=d,this.uint8[E+37]=p,this.uint8[E+38]=g,this.uint32[x+10]=m,this.int16[v+22]=y,this.float32[x+12]=_,e}},Tw.prototype.bytesPerElement=52,Ri("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",Tw),Mw=class extends nl{_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(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_,v,x,E,M,C,w,k,T,b,S){let A=this.length;return this.resize(A+1),this.emplace(A,e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_,v,x,E,M,C,w,k,T,b,S)}emplace(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_,v,x,E,M,C,w,k,T,b,S,A){let F=e*34,D=e*17;return this.int16[F+0]=r,this.int16[F+1]=t,this.int16[F+2]=a,this.int16[F+3]=i,this.int16[F+4]=o,this.int16[F+5]=s,this.int16[F+6]=l,this.int16[F+7]=n,this.uint16[F+8]=u,this.uint16[F+9]=c,this.uint16[F+10]=f,this.uint16[F+11]=h,this.uint16[F+12]=d,this.uint16[F+13]=p,this.uint16[F+14]=g,this.uint16[F+15]=m,this.uint16[F+16]=y,this.uint16[F+17]=_,this.uint16[F+18]=v,this.uint16[F+19]=x,this.uint16[F+20]=E,this.uint16[F+21]=M,this.uint16[F+22]=C,this.uint32[D+12]=w,this.float32[D+13]=k,this.float32[D+14]=T,this.uint16[F+30]=b,this.uint16[F+31]=S,this.float32[D+16]=A,e}},Mw.prototype.bytesPerElement=68,Ri("StructArrayLayout8i15ui1ul2f2ui1f68",Mw),I_=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){let t=e*1;return this.float32[t+0]=r,e}},I_.prototype.bytesPerElement=4,Ri("StructArrayLayout1f4",I_),Ew=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,t){let a=this.length;return this.resize(a+1),this.emplace(a,e,r,t)}emplace(e,r,t,a){let i=e*6,o=e*3;return this.uint16[i+0]=r,this.float32[o+1]=t,this.float32[o+2]=a,e}},Ew.prototype.bytesPerElement=12,Ri("StructArrayLayout1ui2f12",Ew),Sw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,t){let a=this.length;return this.resize(a+1),this.emplace(a,e,r,t)}emplace(e,r,t,a){let i=e*2,o=e*4;return this.uint32[i+0]=r,this.uint16[o+2]=t,this.uint16[o+3]=a,e}},Sw.prototype.bytesPerElement=8,Ri("StructArrayLayout1ul2ui8",Sw),kw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r){let t=this.length;return this.resize(t+1),this.emplace(t,e,r)}emplace(e,r,t){let a=e*2;return this.uint16[a+0]=r,this.uint16[a+1]=t,e}},kw.prototype.bytesPerElement=4,Ri("StructArrayLayout2ui4",kw),Cw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){let t=e*1;return this.uint16[t+0]=r,e}},Cw.prototype.bytesPerElement=2,Ri("StructArrayLayout1ui2",Cw),Dw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,t,a){let i=this.length;return this.resize(i+1),this.emplace(i,e,r,t,a)}emplace(e,r,t,a,i){let o=e*4;return this.float32[o+0]=r,this.float32[o+1]=t,this.float32[o+2]=a,this.float32[o+3]=i,e}},Dw.prototype.bytesPerElement=16,Ri("StructArrayLayout4f16",Dw),zS=class extends F1{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 zr(this.anchorPointX,this.anchorPointY)}},zS.prototype.size=20,BS=class extends xw{get(e){return new zS(this,e)}},Ri("CollisionBoxArray",BS),OS=class extends F1{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(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}},OS.prototype.size=52,NS=class extends Tw{get(e){return new OS(this,e)}},Ri("PlacedSymbolArray",NS),jS=class extends F1{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(e){this._structArray.uint32[this._pos4+12]=e}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]}get heightOffset(){return this._structArray.float32[this._pos4+16]}},jS.prototype.size=68,US=class extends Mw{get(e){return new jS(this,e)}},Ri("SymbolInstanceArray",US),qS=class extends I_{getoffsetX(e){return this.float32[e*1+0]}},Ri("GlyphOffsetArray",qS),VS=class extends F_{getx(e){return this.int16[e*3+0]}gety(e){return this.int16[e*3+1]}gettileUnitDistanceFromAnchor(e){return this.int16[e*3+2]}},Ri("SymbolLineVertexArray",VS),GS=class extends F1{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]}},GS.prototype.size=12,HS=class extends Ew{get(e){return new GS(this,e)}},Ri("TextAnchorOffsetArray",HS),WS=class extends F1{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]}},WS.prototype.size=8,$S=class extends Sw{get(e){return new WS(this,e)}},Ri("FeatureIndexArray",$S),Kp=class extends P1{},CB=class extends F_{},DB=class extends hw{},LB=class extends P1{},FB=class extends P1{},PB=class extends dw{},IB=class extends pw{},RB=class extends I1{},nm=class extends vw{},YS=class extends mw{},zB=class extends gw{},BB=class extends yw{},OB=class extends _w{},XS=class extends bw{},NB=class extends ww{},jB=class extends Aw{},UB=class extends P_{},Vd=class extends P_{},Lw=class extends kw{},qB=class extends Cw{},Fw=pl([{name:"a_pos",components:2,type:"Int16"}],4),VB=Fw.members,Fw.size,Fw.alignment,Zs=class ly{constructor(r=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=r}prepareSegment(r,t,a,i){let o=this.segments[this.segments.length-1];return r>ly.MAX_VERTEX_ARRAY_LENGTH&&vo(`Max vertices per segment is ${ly.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${r}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${ly.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!o||o.vertexLength+r>ly.MAX_VERTEX_ARRAY_LENGTH||o.sortKey!==i?this.createNewSegment(t,a,i):o}createNewSegment(r,t,a){let i={vertexOffset:r.length,primitiveOffset:t.length,vertexLength:0,primitiveLength:0,vaos:{}};return a!==void 0&&(i.sortKey=a),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(i),i}getOrCreateLatestSegment(r,t,a){return this.prepareSegment(0,r,t,a)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let r of this.segments)for(let t in r.vaos)r.vaos[t].destroy()}static simpleSegment(r,t,a,i){return new ly([{vertexOffset:r,primitiveOffset:t,vertexLength:a,primitiveLength:i,vaos:{},sortKey:0}])}},Zs.MAX_VERTEX_ARRAY_LENGTH=2**16-1,Ri("SegmentVector",Zs),GB=pl([{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"}]),HB=pl([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]),WB=V2(((e,r)=>{function t(a,i){for(var o=a.length&3,s=a.length-o,l=i,n,u=3432918353,c=461845907,f,h=0;h>>16)*u&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,l^=f,l=l<<13|l>>>19,n=(l&65535)*5+(((l>>>16)*5&65535)<<16)&4294967295,l=(n&65535)+27492+(((n>>>16)+58964&65535)<<16);switch(f=0,o){case 3:f^=(a.charCodeAt(h+2)&255)<<16;case 2:f^=(a.charCodeAt(h+1)&255)<<8;case 1:f^=a.charCodeAt(h)&255,f=(f&65535)*u+(((f>>>16)*u&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,l^=f}return l^=a.length,l^=l>>>16,l=(l&65535)*2246822507+(((l>>>16)*2246822507&65535)<<16)&4294967295,l^=l>>>13,l=(l&65535)*3266489909+(((l>>>16)*3266489909&65535)<<16)&4294967295,l^=l>>>16,l>>>0}r!==void 0&&(r.exports=t)})),$B=V2(((e,r)=>{function t(a,i){for(var o=a.length,s=i^o,l=0,n;o>=4;)n=a.charCodeAt(l)&255|(a.charCodeAt(++l)&255)<<8|(a.charCodeAt(++l)&255)<<16|(a.charCodeAt(++l)&255)<<24,n=(n&65535)*1540483477+(((n>>>16)*1540483477&65535)<<16),n^=n>>>24,n=(n&65535)*1540483477+(((n>>>16)*1540483477&65535)<<16),s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)^n,o-=4,++l;switch(o){case 3:s^=(a.charCodeAt(l+2)&255)<<16;case 2:s^=(a.charCodeAt(l+1)&255)<<8;case 1:s^=a.charCodeAt(l)&255,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)}return s^=s>>>13,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>15,s>>>0}r.exports=t})),Pw=Oz(V2(((e,r)=>{var t=WB(),a=$B();r.exports=t,r.exports.murmur3=t,r.exports.murmur2=a}))(),1),ZS=class gQ{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(r,t,a,i){this.ids.push(ZR(r)),this.positions.push(t,a,i)}getPositions(r){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let t=ZR(r),a=0,i=this.ids.length-1;for(;a>1;this.ids[s]>=t?i=s:a=s+1}let o=[];for(;this.ids[a]===t;){let s=this.positions[3*a],l=this.positions[3*a+1],n=this.positions[3*a+2];o.push({index:s,start:l,end:n}),a++}return o}static serialize(r,t){let a=new Float64Array(r.ids),i=new Uint32Array(r.positions);return wE(a,i,0,a.length-1),t&&t.push(a.buffer,i.buffer),{ids:a,positions:i}}static deserialize(r){let t=new gQ;return t.ids=r.ids,t.positions=r.positions,t.indexed=!0,t}},Ri("FeaturePositionMap",ZS),mp=class{constructor(e,r){this.gl=e.gl,this.location=r}},fn=class extends mp{constructor(e,r){super(e,r),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},Di=class extends mp{constructor(e,r){super(e,r),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}},no=class extends mp{constructor(e,r){super(e,r),this.current=[0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},qc=class extends mp{constructor(e,r){super(e,r),this.current=[0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},R1=class extends mp{constructor(e,r){super(e,r),this.current=[0,0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}},Jp=class extends mp{constructor(e,r){super(e,r),this.current=Hn.transparent}set(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}},KS=class extends mp{constructor(e,r){super(e,r),this.current=[]}set(e){if(e!=this.current){this.current=e;let r=new Float32Array(e.length*4);for(let t=0;t`u_${a}`),this.type=t}setUniform(e,r,t){e.set(t.constantOr(this.value))}getBinding(e,r,t){return this.type==="color"?new Jp(e,r):new Di(e,r)}},z0=class{constructor(e,r){this.uniformNames=r.map(t=>`u_${t}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=e.tlbr}setConstantDashPositions(e,r){this.dashTo=[0,e.y,e.height,e.width],this.dashFrom=[0,r.y,r.height,r.width]}setUniform(e,r,t,a){let i=null;a==="u_pattern_to"?i=this.patternTo:a==="u_pattern_from"?i=this.patternFrom:a==="u_dasharray_to"?i=this.dashTo:a==="u_dasharray_from"?i=this.dashFrom:a==="u_pixel_ratio_to"?i=this.pixelRatioTo:a==="u_pixel_ratio_from"&&(i=this.pixelRatioFrom),i!==null&&e.set(i)}getBinding(e,r,t){return t.startsWith("u_pattern")||t.startsWith("u_dasharray_")?new R1(e,r):new Di(e,r)}},gp=class{constructor(e,r,t,a){this.expression=e,this.type=t,this.maxValue=0,this.paintVertexAttributes=r.map(i=>({name:`a_${i}`,type:"Float32",components:t==="color"?2:1,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,r,t){let a=this.paintVertexArray.length,i=this.expression.evaluate(new Ko(0,t),r,{},t.canonical,[],t.formattedSection);this.paintVertexArray.resize(e),this._setPaintValue(a,e,i)}updatePaintArray(e,r,t,a,i){let o=this.expression.evaluate(new Ko(0,i),t,a);this._setPaintValue(e,r,o)}_setPaintValue(e,r,t){if(this.type==="color"){let a=AE(t);for(let i=e;i`u_${s}_t`),this.type=t,this.useIntegerZoom=a,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=r.map(s=>({name:`a_${s}`,type:"Float32",components:t==="color"?4:2,offset:0})),this.paintVertexArray=new o}populatePaintArray(e,r,t){let a=this.expression.evaluate(new Ko(this.zoom,t),r,{},t.canonical,[],t.formattedSection),i=this.expression.evaluate(new Ko(this.zoom+1,t),r,{},t.canonical,[],t.formattedSection),o=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(o,e,a,i)}updatePaintArray(e,r,t,a,i){let o=this.expression.evaluate(new Ko(this.zoom,i),t,a),s=this.expression.evaluate(new Ko(this.zoom+1,i),t,a);this._setPaintValue(e,r,o,s)}_setPaintValue(e,r,t,a){if(this.type==="color"){let i=AE(t),o=AE(a);for(let s=e;s`#define HAS_UNIFORM_${a}`))}return e}getBinderAttributes(){let e=[];for(let r in this.binders){let t=this.binders[r];if(t instanceof gp||t instanceof Yh)for(let a of t.paintVertexAttributes)e.push(a.name);else if(t instanceof Qp){let a=t.getVertexAttributes();for(let i of a)e.push(i.name)}}return e}getBinderUniforms(){let e=[];for(let r in this.binders){let t=this.binders[r];if(t instanceof z1||t instanceof z0||t instanceof Yh)for(let a of t.uniformNames)e.push(a)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,r){let t=[];for(let a in this.binders){let i=this.binders[a];if(i instanceof z1||i instanceof z0||i instanceof Yh){for(let o of i.uniformNames)if(r[o]){let s=i.getBinding(e,r[o],o);t.push({name:o,property:a,binding:s})}}}return t}setUniforms(e,r,t,a){for(let{name:i,property:o,binding:s}of r)this.binders[o].setUniform(s,a,t.get(o),i)}updatePaintBuffers(e){this._buffers=[];for(let r in this.binders){let t=this.binders[r];if(e&&t instanceof Qp){let a=e.fromScale===2?t.zoomInPaintVertexBuffer:t.zoomOutPaintVertexBuffer;a&&this._buffers.push(a)}else(t instanceof gp||t instanceof Yh)&&t.paintVertexBuffer&&this._buffers.push(t.paintVertexBuffer)}}upload(e){for(let r in this.binders){let t=this.binders[r];(t instanceof gp||t instanceof Yh||t instanceof Qp)&&t.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let r=this.binders[e];(r instanceof gp||r instanceof Yh||r instanceof Qp)&&r.destroy()}}},B0=class{constructor(e,r,t=()=>!0){this.programConfigurations={};for(let a of e)this.programConfigurations[a.id]=new tk(a,r,t);this.needsUpload=!1,this._featureMap=new ZS,this._bufferOffset=0}populatePaintArrays(e,r,t,a){for(let i in this.programConfigurations)this.programConfigurations[i].populatePaintArrays(e,r,a);r.id!==void 0&&this._featureMap.add(r.id,t,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,r,t,a){for(let i of t)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,r,i,a)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let r in this.programConfigurations)this.programConfigurations[r].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}},Ri("ConstantBinder",z1),Ri("CrossFadedConstantBinder",z0),Ri("SourceExpressionBinder",gp),Ri("CrossFadedPatternBinder",QS),Ri("CrossFadedDasharrayBinder",ek),Ri("CompositeExpressionBinder",Yh),Ri("ProgramConfiguration",tk,{omit:["_buffers"]}),Ri("ProgramConfigurationSet",B0),Iw=2**14-1,rk=-Iw-1,ak=-32768,Rw=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new LB,this.indexArray=new Vd,this.segments=new Zs,this.programConfigurations=new B0(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,t){let a=this.layers[0],i=[],o=null,s=!1,l=a.type==="heatmap";if(a.type==="circle"){let f=a;o=f.layout.get("circle-sort-key"),s=!o.isConstant(),l||(l=f.paint.get("circle-pitch-alignment")==="map")}let n=l?r.subdivisionGranularity.circle:1,u=new Ko(this.zoom),c=this.layers[0]._featureFilter.needGeometry;for(let{feature:f,id:h,index:d,sourceLayerIndex:p}of e){let g=Zv(f,c);if(!this.layers[0]._featureFilter.filter(u,g,t))continue;let m=s?o.evaluate(g,{},t):void 0,y={id:h,properties:f.properties,type:f.type,sourceLayerIndex:p,index:d,geometry:c?g.geometry:Xv(f),patterns:{},sortKey:m};i.push(y)}s&&i.sort((f,h)=>f.sortKey-h.sortKey);for(let f of i){let{geometry:h,index:d,sourceLayerIndex:p}=f,g=e[d].feature;this.addFeature(f,h,d,t,n),r.featureIndex.insert(g,h,d,p,this.index)}}update(e,r,t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,{imagePositions:t})}addFeatures(e){}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,VB),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,r,t,a,i=1){let o;switch(i){case 1:o=[0,7];break;case 3:o=[0,2,5,7];break;case 5:o=[0,1,3,4,6,7];break;case 7:o=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${i}; valid values are 1, 3, 5, 7.`)}let s=o.length;for(let l of r)for(let n of l){let u=n.x,c=n.y;if(u<0||u>=8192||c<0||c>=8192)continue;let f=this.segments.prepareSegment(s*s,this.layoutVertexArray,this.indexArray,e.sortKey),h=f.vertexLength;for(let d=0;dXB||(XB=new Du({"circle-sort-key":new gn(ta.layout_circle["circle-sort-key"],"circle-sort-key")})),JB=()=>KB||(KB=new Du({"circle-radius":new gn(ta.paint_circle["circle-radius"],"circle-radius"),"circle-color":new gn(ta.paint_circle["circle-color"],"circle-color"),"circle-blur":new gn(ta.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new gn(ta.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new Ti(ta.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new Ti(ta.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new Ti(ta.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new Ti(ta.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new gn(ta.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new gn(ta.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new gn(ta.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})),QB={get paint(){return JB()},get layout(){return ZB()}},eO=e=>e.type==="circle",tO=class extends Wh{constructor(e,r){super(e,QB,r)}createBucket(e){return new Rw(e)}queryRadius(e){let r=e;return m1("circle-radius",this,r)+m1("circle-stroke-width",this,r)+b2(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:t,geometry:a,transform:i,pixelsToTileUnits:o,unwrappedTileID:s,getElevation:l}){let n=w2(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-i.bearingInRadians,o),u=this.paint.get("circle-radius").evaluate(r,t)+this.paint.get("circle-stroke-width").evaluate(r,t),c=this.paint.get("circle-pitch-scale"),f=this.paint.get("circle-pitch-alignment"),h,d;return f==="map"?(h=n,d=u*o):(h=Phe(n,i,s,l),d=u),r5({queryGeometry:h,size:d,transform:i,unwrappedTileID:s,getElevation:l,pitchAlignment:f,pitchScale:c},a)}},ik=class extends Rw{},Ri("HeatmapBucket",ik,{omit:["layers"]}),aO=()=>rO||(rO=new Du({"heatmap-radius":new gn(ta.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new gn(ta.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new Ti(ta.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new L_(ta.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new Ti(ta.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})),iO={get paint(){return aO()}},zw=class yQ{constructor(r,t){SE(this,r,1,t)}resize(r){a5(this,r,1)}clone(){return new yQ({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(r,t,a,i,o){kE(r,t,a,i,o,1)}},Ls=class _Q{constructor(r,t){SE(this,r,4,t)}resize(r){a5(this,r,4)}replace(r,t){t?this.data.set(r):this.data=r instanceof Uint8ClampedArray?new Uint8Array(r.buffer):r}clone(){return new _Q({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(r,t,a,i,o){kE(r,t,a,i,o,4)}setPixel(r,t,a){let i=(r*this.width+t)*4;this.data[i+0]=Math.round(a.r*255/a.a),this.data[i+1]=Math.round(a.g*255/a.a),this.data[i+2]=Math.round(a.b*255/a.a),this.data[i+3]=Math.round(a.a*255)}},Ri("AlphaImage",zw),Ri("RGBAImage",Ls),R_="big-fb",nO=e=>e.type==="heatmap",oO=class extends Wh{createBucket(e){return new ik(e)}constructor(e,r){super(e,iO,r),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){e==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){let e=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=i5({expression:e,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has("big-fb")&&this.heatmapFbos.delete(R_)}queryRadius(e){return m1("heatmap-radius",this,e)}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:t,geometry:a,transform:i,pixelsToTileUnits:o,unwrappedTileID:s,getElevation:l}){return r5({queryGeometry:e,size:this.paint.get("heatmap-radius").evaluate(r,t)*o,transform:i,unwrappedTileID:s,getElevation:l},a)}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&!this.isHidden()}},lO=()=>sO||(sO=new Du({"hillshade-illumination-direction":new Ti(ta.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new Ti(ta.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new Ti(ta.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new Ti(ta.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new Ti(ta.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new Ti(ta.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new Ti(ta.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new Ti(ta.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new Ti(ta.paint_hillshade.resampling,"resampling")})),uO={get paint(){return lO()}},cO=e=>e.type==="hillshade",fO=class extends Wh{constructor(e,r){super(e,uO,r),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let e=this.paint.get("hillshade-illumination-direction").values,r=this.paint.get("hillshade-illumination-altitude").values,t=this.paint.get("hillshade-highlight-color").values,a=this.paint.get("hillshade-shadow-color").values,i=Math.max(e.length,r.length,t.length,a.length);e=e.concat(Array(i-e.length).fill(e.at(-1))),r=r.concat(Array(i-r.length).fill(r.at(-1))),t=t.concat(Array(i-t.length).fill(t.at(-1))),a=a.concat(Array(i-a.length).fill(a.at(-1)));let o=r.map(il);return{directionRadians:e.map(il),altitudeRadians:o,shadowColor:a,highlightColor:t}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}},dO=()=>hO||(hO=new Du({"color-relief-opacity":new Ti(ta["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new L_(ta["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new Ti(ta["paint_color-relief"].resampling,"resampling")})),pO={get paint(){return dO()}},Kl=class{constructor(e,r,t,a){this.context=e,this.format=t,this.texture=e.gl.createTexture(),this._ownedHandle=this.texture,this.update(r,a)}update(e,r,t){var a;let{width:i,height:o}=e,s=(((a=this.size)==null?void 0:a[0])!==i||this.size[1]!==o)&&!t,{context:l}=this,{gl:n}=l;this.useMipmap=!!r?.useMipmap,s&&this.size&&this.format===n.RGBA&&(n.deleteTexture(this.texture),this.texture=n.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),n.bindTexture(n.TEXTURE_2D,this.texture),l.pixelStoreUnpackFlipY.set(!1),l.pixelStoreUnpack.set(1);let u=this.format===n.RGBA&&r?.premultiply!==!1;if(s)if(this.size=[i,o],this.format===n.RGBA&&i>0&&o>0){let c=this.useMipmap?Math.floor(Math.log2(Math.max(i,o)))+1:1;if(n.texStorage2D(n.TEXTURE_2D,c,n.RGBA8,i,o),A2(e)){l.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:f}=e;u&&f&&(f=CE(f)),f&&n.texSubImage2D(n.TEXTURE_2D,0,0,0,i,o,n.RGBA,n.UNSIGNED_BYTE,f)}else l.pixelStoreUnpackPremultiplyAlpha.set(u),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,e)}else A2(e)?(l.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(e,u,i,o,n)):(l.pixelStoreUnpackPremultiplyAlpha.set(u),this._uploadDomImage(e,n));else{let{x:c,y:f}=t||{x:0,y:0};A2(e)?(l.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(e,u,c,f,i,o,n)):(l.pixelStoreUnpackPremultiplyAlpha.set(u),this._updateDomImage(e,c,f,n))}this.useMipmap&&!(A2(e)&&e.data===null)&&n.generateMipmap(n.TEXTURE_2D),l.pixelStoreUnpackFlipY.setDefault(),l.pixelStoreUnpack.setDefault(),l.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(e,r){r.texImage2D(r.TEXTURE_2D,0,this.format,this.format,r.UNSIGNED_BYTE,e)}_uploadRawData(e,r,t,a,i){let{data:o}=e;r&&o&&(o=CE(o)),i.texImage2D(i.TEXTURE_2D,0,this.format,t,a,0,this.format,i.UNSIGNED_BYTE,o)}_updateDomImage(e,r,t,a){a.texSubImage2D(a.TEXTURE_2D,0,r,t,a.RGBA,a.UNSIGNED_BYTE,e)}_updateRawData(e,r,t,a,i,o,s){let{data:l}=e;r&&l&&(l=CE(l)),s.texSubImage2D(s.TEXTURE_2D,0,t,a,i,o,s.RGBA,s.UNSIGNED_BYTE,l)}bind(e,r,t){let{context:a}=this,{gl:i}=a;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),i.bindTexture(i.TEXTURE_2D,this.texture),(t===i.LINEAR_MIPMAP_NEAREST||t===i.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(t=i.LINEAR);let o=t||e;e!==this.magFilter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),this.magFilter=e),o!==this.minFilter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,o),this.minFilter=o),r!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,r),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,r),this.wrap=r)}generateMipmap(){if(!this.useMipmap)return;let{gl:e}=this.context;e.bindTexture(e.TEXTURE_2D,this.texture),e.generateMipmap(e.TEXTURE_2D)}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},vO=(B1=class{constructor(e,r,t,a=1,i=1,o=1,s=0){if(this.uid=e,r.height!==r.width)throw RangeError("DEM tiles must be square");if(t&&!["mapbox","terrarium","custom"].includes(t)){vo(`"${t}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);return}this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),B1.byteViewCache.set(this,new Uint8Array(this.data.buffer)),t){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=a,this.greenFactor=i,this.blueFactor=o,this.baseShift=s;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let u=-2;u=l)&&this.data.copyWithin(this._idx(0,u),c,c+l),this.data.fill(this.data[c],this._idx(-2,u),this._idx(0,u)),this.data.fill(this.data[c+l-1],this._idx(l,u),this._idx(l+1,u)+1)}let n=this._getByteView();this.min=2**53-1,this.max=-(2**53-1);for(let u=0;uthis.max&&(this.max=h),h=this.dim||a<-1||a>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);let i=this._getByteView(),o=((a+2)*this.stride+t+2)*4,s=this.stride*4,l=e-t,n=r-a,u=this._unpackAtIndex(i,o),c=this._unpackAtIndex(i,o+4),f=this._unpackAtIndex(i,o+s),h=this._unpackAtIndex(i,o+s+4);return u*(1-l)*(1-n)+c*l*(1-n)+f*(1-l)*n+h*l*n}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,r){if(e<-2||e>=this.dim+2||r<-2||r>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);return(r+2)*this.stride+(e+2)}unpack(e,r,t){return e*this.redFactor+r*this.greenFactor+t*this.blueFactor-this.baseShift}pack(e){return n5(e,this.getUnpackVector())}getPixels(){return new Ls({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(e,r,t){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let a=r*this.dim,i=r*this.dim+this.dim,o=t*this.dim,s=t*this.dim+this.dim;switch(r){case-1:a=i-2;break;case 1:i=a+2}switch(t){case-1:o=s-2;break;case 1:s=o+2}let l=-r*this.dim,n=-t*this.dim;for(let u=o;ue.type==="color-relief",gO=class extends Wh{constructor(e,r){super(e,pO,r)}_createColorRamp(e){let r={elevationStops:[],colorStops:[]},t=this._transitionablePaint._values["color-relief-color"].value.expression;if(t instanceof D1&&t._styleExpression.expression instanceof vh){this.colorRampExpression=t;let o=t._styleExpression.expression;r.elevationStops=o.labels,r.colorStops=[];for(let s of r.elevationStops)r.colorStops.push(o.evaluate({globals:{elevation:s}}))}if(r.elevationStops.length<1&&(r.elevationStops=[0],r.colorStops=[Hn.transparent]),r.elevationStops.length<2&&(r.elevationStops.push(r.elevationStops[0]+1),r.colorStops.push(r.colorStops[0])),r.elevationStops.length<=e)return r;let a={elevationStops:[],colorStops:[]},i=(r.elevationStops.length-1)/(e-1);for(let o=0;oe)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=r}getGranularityForZoomLevel(e){let r=1<32767||r>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let t=Math.round(e)|0,a=Math.round(r)|0,i=this._getKey(t,a);if(this._vertexDictionary.has(i))return this._vertexDictionary.get(i);let o=this._vertexBuffer.length/2;return this._vertexDictionary.set(i,o),this._vertexBuffer.push(t,a),o}_subdivideTrianglesScanline(e){if(this._granularity<2)return ede(this._vertexBuffer,e);let r=[],t=e.length;for(let a=0;a=1||x<=0)||m&&(ni)){c>=a&&c<=i&&o.push(t[(s+1)%3]);continue}if(!m&&v>0){let C=l+d*v,w=n+p*v;o.push(this._vertexToIndex(C,w))}let E=l+d*Math.max(v,0),M=l+d*Math.min(x,1);if(g||this._generateIntraEdgeVertices(o,l,n,u,c,E,M),!m&&x<1){let C=l+d*x,w=n+p*x;o.push(this._vertexToIndex(C,w))}(m||c>=a&&c<=i)&&o.push(t[(s+1)%3]),!m&&(c<=a||c>=i)&&this._generateInterEdgeVertices(o,l,n,u,c,f,h,M,a,i)}return o}_generateIntraEdgeVertices(e,r,t,a,i,o,s){let l=a-r,n=i-t,u=n===0,c=u?Math.min(r,a):Math.min(o,s),f=u?Math.max(r,a):Math.max(o,s),h=Math.floor(c/this._granularityCellSize)+1,d=Math.ceil(f/this._granularityCellSize)-1;if(u?r=h;p--){let g=p*this._granularityCellSize,m=t+n*(g-r)/l;e.push(this._vertexToIndex(g,m))}}_generateInterEdgeVertices(e,r,t,a,i,o,s,l,n,u){let c=i-t,f=o-a,h=s-i,d=(n-i)/h,p=(u-i)/h,g=Math.min(d,p),m=Math.max(d,p),y=a+f*g,_=Math.floor(Math.min(y,l)/this._granularityCellSize)+1,v=Math.ceil(Math.max(y,l)/this._granularityCellSize)-1,x=l=1||m<=0){let C=r-o,w=t-s,k=(n-s)/w,T=(u-s)/w,b=o+C*Math.min(k,T);_=Math.floor(Math.min(b,l)/this._granularityCellSize)+1,v=Math.ceil(Math.max(b,l)/this._granularityCellSize)-1,x=l0?u:n;if(x)for(let C=_;C<=v;C++){let w=C*this._granularityCellSize;e.push(this._vertexToIndex(w,M))}else for(let C=v;C>=_;C--){let w=C*this._granularityCellSize;e.push(this._vertexToIndex(w,M))}}_generateOutline(e){let r=[];for(let t of e){let a=Jv(t,this._granularity,!0),i=this._pointArrayToIndices(a),o=[];for(let s=1;si==(o===-32768)?(e.push(t),e.push(r),e.push(this._vertexToIndex(a,o)),e.push(this._vertexToIndex(i,o)),e.push(t),e.push(this._vertexToIndex(a,o))):(e.push(r),e.push(t),e.push(this._vertexToIndex(a,o)),e.push(t),e.push(this._vertexToIndex(i,o)),e.push(this._vertexToIndex(a,o)))}_fillPoles(e,r,t){let a=this._vertexBuffer,i=xa,o=e.length;for(let s=2;s=2&&((t=this._canonical)==null?void 0:t.z)===0&&(o=this._removeTrianglesOutsideTileX(o),s=s.map(l=>this._removeLinesOutsideTileX(l))),{verticesFlattened:this._vertexBuffer,indicesTriangles:o,indicesLineList:s}}_vertexOutsideTileX(e){let r=this._vertexBuffer[e*2];return r<0||r>8192}_removeTrianglesOutsideTileX(e){let r=[];for(let t=0;tr.id),this.index=e.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new FB,this.indexArray=new Vd,this.indexArray2=new Lw,this.programConfigurations=new B0(e.layers,e.zoom),this.segments=new Zs,this.segments2=new Zs,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,t){this.hasDependencies=T2("fill",this.layers,r);let a=this.layers[0].layout.get("fill-sort-key"),i=!a.isConstant(),o=[],s=new Ko(this.zoom),l=this.layers[0]._featureFilter.needGeometry;for(let{feature:n,id:u,index:c,sourceLayerIndex:f}of e){let h=Zv(n,l);if(!this.layers[0]._featureFilter.filter(s,h,t))continue;let d=i?a.evaluate(h,{},t,r.availableImages):void 0,p={id:u,properties:n.properties,type:n.type,sourceLayerIndex:f,index:c,geometry:l?h.geometry:Xv(n),patterns:{},sortKey:d};o.push(p)}i&&o.sort((n,u)=>n.sortKey-u.sortKey);for(let n of o){let{geometry:u,index:c,sourceLayerIndex:f}=n;if(this.hasDependencies){let d=DE("fill",this.layers,n,{zoom:this.zoom},r);this.patternFeatures.push(d)}else this.addFeature(n,u,c,t,{},r.subdivisionGranularity);let h=e[c].feature;r.featureIndex.insert(h,u,c,f,this.index)}}update(e,r,t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,{imagePositions:t})}addFeatures({options:e,canonical:r,patternPositions:t,patternMap:a}){this.detectSdfPatterns(a);for(let i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,r,t,e.subdivisionGranularity)}detectSdfPatterns(e){for(let r of this.patternFeatures)for(let t in r.patterns){let a=r.patterns[t];this.recordSdfPattern(t,e[a.min]),this.recordSdfPattern(t,e[a.mid]),this.recordSdfPattern(t,e[a.max])}for(let r of this.layers){let t=r.paint.get("fill-pattern").constantOr(null);t&&(this.recordSdfPattern(r.id,e[t.from.toString()]),this.recordSdfPattern(r.id,e[t.to.toString()]))}}recordSdfPattern(e,r){if(!r)return;let t=r.sdf===!0,a=this.sdfPatterns[e];a===void 0?this.sdfPatterns[e]=t:a!==t&&vo(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${e}"`)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,yO),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),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(e,r,t,a,i,o){for(let s of a2(r,500)){let l=d5(s,a,o.fill.getGranularityForZoomLevel(a.z)),n=this.layoutVertexArray;p5((u,c)=>{n.emplaceBack(u,c)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles,this.segments2,this.indexArray2,l.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,t,{imagePositions:i,canonical:a})}},Ri("FillBucket",nk,{omit:["layers","patternFeatures"]}),bO=()=>xO||(xO=new Du({"fill-sort-key":new gn(ta.layout_fill["fill-sort-key"],"fill-sort-key")})),AO=()=>wO||(wO=new Du({"fill-antialias":new Ti(ta.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new gn(ta.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new Ti(ta.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new gn(ta.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new gn(ta.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new Ti(ta.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new Ti(ta.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new L1(ta.paint_fill["fill-pattern"],"fill-pattern")})),TO={get paint(){return AO()},get layout(){return bO()}},MO=e=>e.type==="fill",EO=class extends Wh{constructor(e,r){super(e,TO,r)}recalculate(e,r){super.recalculate(e,r);let t=this.paint._values["fill-outline-color"];t.value.kind==="constant"&&t.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new nk(e)}queryRadius(){return b2(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:r,transform:t,pixelsToTileUnits:a}){return QR(w2(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-t.bearingInRadians,a),r)}isTileClipped(){return!0}},Gw=pl([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),SO=pl([{name:"a_centroid",components:2,type:"Int16"}],4),kO=Gw.members,Gw.size,Gw.alignment,Xh=class xD{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(r){return this.minX=Math.min(this.minX,r.x),this.minY=Math.min(this.minY,r.y),this.maxX=Math.max(this.maxX,r.x),this.maxY=Math.max(this.maxY,r.y),this}expandBy(r){return this.minX-=r,this.minY-=r,this.maxX+=r,this.maxY+=r,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(r){return this.expandBy(-r)}map(r){let t=new xD;return t.extend(r(new zr(this.minX,this.minY))),t.extend(r(new zr(this.maxX,this.minY))),t.extend(r(new zr(this.minX,this.maxY))),t.extend(r(new zr(this.maxX,this.maxY))),t}static fromPoints(r){let t=new xD;for(let a of r)t.extend(a);return t}contains(r){return r.x>=this.minX&&r.x<=this.maxX&&r.y>=this.minY&&r.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(r){return!this.empty()&&!r.empty()&&r.minX>=this.minX&&r.maxX<=this.maxX&&r.minY>=this.minY&&r.maxY<=this.maxY}intersects(r){return!this.empty()&&!r.empty()&&r.minX<=this.maxX&&r.maxX>=this.minX&&r.minY<=this.maxY&&r.maxY>=this.minY}},CO=Xh.fromPoints([new zr(0,0),new zr(xa,xa)]),G1=class{constructor(e,r,t,a,i){for(this.properties=Object.create(null),this.extent=t,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=a,this._values=i;e.pos>3,o===0)continue}if(o--,i===1)s+=e.readSVarint(),l+=e.readSVarint(),a&&t.push(a),a=[new zr(s,l)];else if(i===2)s+=e.readSVarint(),l+=e.readSVarint(),a&&a.push(new zr(s,l));else if(i===7)a&&a.push(a[0].clone());else throw Error(`unknown command ${i}`)}return a&&t.push(a),t}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let e=this._pbf;e.pos=this._geometry;let r=e.readVarint()+e.pos,t=1,a=0,i=0,o=0,s=1/0,l=-1/0,n=1/0,u=-1/0;for(;e.pos>3,a===0)continue}if(a--,t===1||t===2)i+=e.readSVarint(),o+=e.readSVarint(),il&&(l=i),ou&&(u=o);else if(t!==7)throw Error(`unknown command ${t}`)}return[s,n,l,u]}toGeoJSON(e,r,t){let a=this.extent*2**t,i=this.extent*e,o=this.extent*r,s=this.loadGeometry();function l(f){return[(f.x+i)*360/a-180,360/Math.PI*Math.atan(Math.exp((1-(f.y+o)*2/a)*Math.PI))-90]}function n(f){return f.map(l)}let u;if(this.type===1){let f=[];for(let d of s)f.push(d[0]);let h=n(f);u=f.length===1?{type:"Point",coordinates:h[0]}:{type:"MultiPoint",coordinates:h}}else if(this.type===2){let f=s.map(n);u=f.length===1?{type:"LineString",coordinates:f[0]}:{type:"MultiLineString",coordinates:f}}else if(this.type===3){let f=m5(s),h=[];for(let d of f)h.push(d.map(n));u=h.length===1?{type:"Polygon",coordinates:h[0]}:{type:"MultiPolygon",coordinates:h}}else throw Error("unknown feature type");let c={type:"Feature",geometry:u,properties:this.properties};return this.id!=null&&(c.id=this.id),c}},G1.types=["Unknown","Point","LineString","Polygon"],DO=class{constructor(e,r){for(this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],r===void 0&&(r=e.length);e.pos=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];let r=this._pbf.readVarint()+this._pbf.pos;return new G1(this._pbf,r,this.extent,this._keys,this._values)}},LO=class{constructor(e,r=e.length){let t=Object.create(null);for(;e.pos90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Bx(qh(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(r){let t=Math.PI/180,a=this.lat*t,i=r.lat*t,o=Math.sin(a)*Math.sin(i)+Math.cos(a)*Math.cos(i)*Math.cos((r.lng-this.lng)*t);return Vc*Math.acos(Math.min(o,1))}static convert(r){if(r instanceof Bx)return r;if(Array.isArray(r)&&(r.length===2||r.length===3))return new Bx(Number(r[0]),Number(r[1]));if(!Array.isArray(r)&&typeof r=="object"&&r)return new Bx(Number("lng"in r?r.lng:r.lon),Number(r.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}},ok=2*Math.PI*Vc,$o=class xQ{constructor(r,t,a=0){this.x=+r,this.y=+t,this.z=+a}static fromLngLat(r,t=0){let a=ln.convert(r);return new xQ(g1(a.lng),y1(a.lat),Qv(t,a.lat))}toLngLat(){return new ln(RE(this.x),f_(this.y))}toAltitude(){return y5(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/ok*ode(f_(this.y))}},N0=89.25,Hw=8192,sk=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new PB,this.centroidVertexArray=new Kp,this.indexArray=new Vd,this.programConfigurations=new B0(e.layers,e.zoom),this.segments=new Zs,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,t){this.features=[],this.hasDependencies=T2("fill-extrusion",this.layers,r);let a=new Ko(this.zoom),i=this.layers[0],o=i.layout.get("fill-extrusion-rounded-corner-distance"),s=i._featureFilter.needGeometry;for(let{feature:l,id:n,index:u,sourceLayerIndex:c}of e){let f=Zv(l,s);if(!i._featureFilter.filter(a,f,t))continue;let h=s?f.geometry:Xv(l),d={id:n,sourceLayerIndex:c,index:u,geometry:o>0?b5(h,o,t):h,properties:l.properties,type:l.type,patterns:{}};this.hasDependencies?this.features.push(DE("fill-extrusion",this.layers,d,{zoom:this.zoom},r)):this.addFeature(d,d.geometry,u,t,{},r.subdivisionGranularity),r.featureIndex.insert(l,d.geometry,u,c,this.index,!0)}}addFeatures({options:e,canonical:r,patternPositions:t}){for(let a of this.features){let{geometry:i}=a;this.addFeature(a,i,a.index,r,t,e.subdivisionGranularity)}}update(e,r,t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,{imagePositions:t})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,kO),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,SO.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,r,t,a,i,o){let s=this.layers[0],l=s.layout?s.layout.get("fill-extrusion-rounded-corner-distance"):0,n=l>0?b5(r,l,a):r;for(let u of a2(n,500)){let c={x:0,y:0,sampleCount:0},f=this.layoutVertexArray.length;this.processPolygon(c,a,e,u,o);let h=this.layoutVertexArray.length-f,d=Math.floor(c.x/c.sampleCount),p=Math.floor(c.y/c.sampleCount);for(let g=0;g{p_(u,c,f,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,n.verticesFlattened,n.indicesTriangles)}_generateSideFaces(e,r){let t=0;for(let a=1;aZs.MAX_VERTEX_ARRAY_LENGTH&&(r.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let s=i.sub(o)._perp()._unit(),l=o.dist(i);t+l>32768&&(t=0),p_(this.layoutVertexArray,i.x,i.y,s.x,s.y,0,0,t),p_(this.layoutVertexArray,i.x,i.y,s.x,s.y,0,1,t),t+=l,p_(this.layoutVertexArray,o.x,o.y,s.x,s.y,0,0,t),p_(this.layoutVertexArray,o.x,o.y,s.x,s.y,0,1,t);let n=r.segment.vertexLength;this.indexArray.emplaceBack(n,n+2,n+1),this.indexArray.emplaceBack(n+1,n+2,n+3),r.segment.vertexLength+=4,r.segment.primitiveLength+=2}}},Ri("FillExtrusionBucket",sk,{omit:["layers","features"]}),PO=()=>FO||(FO=new Du({"fill-extrusion-rounded-corner-distance":new Ti(ta["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})),RO=()=>IO||(IO=new Du({"fill-extrusion-opacity":new Ti(ta["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new gn(ta["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new Ti(ta["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new Ti(ta["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new L1(ta["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new gn(ta["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new gn(ta["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new Ti(ta["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})),zO={get paint(){return RO()},get layout(){return PO()}},BO=e=>e.type==="fill-extrusion",OO=class extends Wh{constructor(e,r){super(e,zO,r)}createBucket(e){return new sk(e)}queryRadius(){return b2(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:t,geometry:a,transform:i,pixelsToTileUnits:o,pixelPosMatrix:s}){let l=w2(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-i.bearingInRadians,o),n=this.paint.get("fill-extrusion-height").evaluate(r,t),u=this.paint.get("fill-extrusion-base").evaluate(r,t),c=mde(l,s,0),f=vde(a,u,n,s),h=f[0],d=f[1];return pde(h,d,c)}},mme=new Uint32Array(96),NO="geojsonvt_clip_start",jO="geojsonvt_clip_end",Ww=pl([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),UO=Ww.members,Ww.size,Ww.alignment,$w=pl([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),qO=$w.members,$w.size,$w.alignment,VO=Math.cos(75/2*(Math.PI/180)),lk=1/2,uk=2**14/lk,ck=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let r of this.layers)this.gradients[r.id]={};this.layoutVertexArray=new IB,this.layoutVertexArray2=new RB,this.indexArray=new Vd,this.programConfigurations=new B0(e.layers,e.zoom),this.segments=new Zs,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,t){this.hasDependencies=T2("line",this.layers,r)||this.hasLineDasharray(this.layers);let a=this.layers[0].layout.get("line-sort-key"),i=!a.isConstant(),o=[],s=new Ko(this.zoom),l=this.layers[0]._featureFilter.needGeometry;for(let{feature:n,id:u,index:c,sourceLayerIndex:f}of e){let h=Zv(n,l);if(!this.layers[0]._featureFilter.filter(s,h,t))continue;let d=i?a.evaluate(h,{},t):void 0,p={id:u,properties:n.properties,type:n.type,sourceLayerIndex:f,index:c,geometry:l?h.geometry:Xv(n),patterns:{},dashes:{},sortKey:d};o.push(p)}i&&o.sort((n,u)=>n.sortKey-u.sortKey);for(let n of o){let{geometry:u,index:c,sourceLayerIndex:f}=n;this.hasDependencies?(T2("line",this.layers,r)?DE("line",this.layers,n,{zoom:this.zoom},r):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,n,this.zoom,r),this.patternFeatures.push(n)):this.addFeature(n,u,c,t,{},{},r.subdivisionGranularity);let h=e[c].feature;r.featureIndex.insert(h,u,c,f,this.index)}}update(e,r,t,a){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,{imagePositions:t,dashPositions:a})}addFeatures({options:e,canonical:r,patternPositions:t,dashPositions:a}){for(let i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,r,t,a,e.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,qO)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,UO),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.hasOwn(e.properties,"geojsonvt_clip_start")&&Object.hasOwn(e.properties,"geojsonvt_clip_end"))return{start:+e.properties[NO],end:+e.properties[jO]}}addFeature(e,r,t,a,i,o,s){let l=this.layers[0].layout,n=l.get("line-join").evaluate(e,{}),u=l.get("line-cap").evaluate(e,{}),c=l.get("line-miter-limit").evaluate(e,{}),f=l.get("line-round-limit").evaluate(e,{});this.lineClips=this.lineFeatureClips(e);for(let h of r)this.addLine(h,e,n,u,c,f,a,s);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,t,{imagePositions:i,dashPositions:o,canonical:a})}addLine(e,r,t,a,i,o,s,l){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let n=s?l.line.getGranularityForZoomLevel(s.z):1;if(e=Jv(e,n),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let v=0;v=2&&e[c-1].equals(e[c-2]);)c--;let f=0;for(;f0;if(k&&v>f){let A=p.dist(g);if(A>2*h){let F=p.sub(p.sub(g)._mult(h/A)._round());this.updateDistance(g,F),this.addCurrentVertex(F,y,0,0,d),g=F}}let b=g&&m,S=b?t:u?"butt":a;if(b&&S==="round"&&(Ci&&(S="bevel"),S==="bevel"&&(C>2&&(S="flipbevel"),C100)x=_.mult(-1);else{let A=C*y.add(_).mag()/y.sub(_).mag();x._perp()._mult(A*(T?-1:1))}this.addCurrentVertex(p,x,0,0,d),this.addCurrentVertex(p,x.mult(-1),0,0,d)}else if(S==="bevel"||S==="fakeround"){let A=-Math.sqrt(C*C-1),F=T?A:0,D=T?0:A;if(g&&this.addCurrentVertex(p,y,F,D,d),S==="fakeround"){let R=Math.round(w*180/Math.PI/20);for(let P=1;P2*h){let F=p.add(m.sub(p)._mult(h/A)._round());this.updateDistance(p,F),this.addCurrentVertex(F,_,0,0,d),p=F}}}}addCurrentVertex(e,r,t,a,i,o=!1){let s=r.x+r.y*t,l=r.y-r.x*t,n=-r.x+r.y*a,u=-r.y-r.x*a;this.addHalfVertex(e,s,l,o,!1,t,i),this.addHalfVertex(e,n,u,o,!0,-a,i),this.distance>uk/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,r,t,a,i,o))}addHalfVertex({x:e,y:r},t,a,i,o,s,l){let n=(this.lineClips?this.scaledDistance*(uk-1):this.scaledDistance)*lk;if(this.layoutVertexArray.emplaceBack((e<<1)+ +!!i,(r<<1)+ +!!o,Math.round(63*t)+128,Math.round(63*a)+128,(s===0?0:s<0?-1:1)+1|(n&63)<<2,n>>6),this.lineClips){let c=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(c,this.lineClipsArray.length)}let u=l.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),l.primitiveLength++),o?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,r){this.distance+=e.dist(r),this.updateScaledDistance()}hasLineDasharray(e){for(let r of e){let t=r.paint.get("line-dasharray");if(t&&!t.isConstant())return!0}return!1}addLineDashDependencies(e,r,t,a){for(let i of e){let o=i.paint.get("line-dasharray");if(!o||o.value.kind==="constant")continue;let s=i.layout.get("line-cap").evaluate(r,{})==="round",l={dasharray:o.value.evaluate({zoom:t-1},r,{}),round:s},n={dasharray:o.value.evaluate({zoom:t},r,{}),round:s},u={dasharray:o.value.evaluate({zoom:t+1},r,{}),round:s},c=`${l.dasharray.join(",")},${l.round}`,f=`${n.dasharray.join(",")},${n.round}`,h=`${u.dasharray.join(",")},${u.round}`;a.dashDependencies[c]=l,a.dashDependencies[f]=n,a.dashDependencies[h]=u,r.dashes[i.id]={min:c,mid:f,max:h}}}},Ri("LineBucket",ck,{omit:["layers","patternFeatures"]}),HO=()=>GO||(GO=new Du({"line-cap":new gn(ta.layout_line["line-cap"],"line-cap"),"line-join":new gn(ta.layout_line["line-join"],"line-join"),"line-miter-limit":new gn(ta.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new gn(ta.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new gn(ta.layout_line["line-sort-key"],"line-sort-key")})),$O=()=>WO||(WO=new Du({"line-opacity":new gn(ta.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new Ti(ta.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new gn(ta.paint_line["line-color"],"line-color"),"line-translate":new Ti(ta.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new Ti(ta.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new gn(ta.paint_line["line-width"],"line-width"),"line-gap-width":new gn(ta.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new gn(ta.paint_line["line-offset"],"line-offset"),"line-blur":new gn(ta.paint_line["line-blur"],"line-blur"),"line-dasharray":new L1(ta.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new L1(ta.paint_line["line-pattern"],"line-pattern"),"line-gradient":new L_(ta.paint_line["line-gradient"],"line-gradient")})),fk={get paint(){return $O()},get layout(){return HO()}},YO=class extends gn{possiblyEvaluate(e,r){return r=new Ko(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(e,r)}evaluate(e,r,t,a){return r=tn({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(e,r,t,a)}},XO=e=>e.type==="line",ZO=class extends Wh{constructor(e,r){super(e,fk,r),this.gradientVersion=0,Yw||(Yw=new YO(fk.paint.properties["line-width"].specification,"line-floorwidth"),Yw.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if(e==="line-gradient"){let r=this.gradientExpression();this.stepInterpolant=Hfe(r)?r._styleExpression.expression instanceof Q2:!1,this.gradientVersion=(this.gradientVersion+1)%(2**53-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,r){super.recalculate(e,r),this.paint._values["line-floorwidth"]=Yw.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new ck(e)}queryRadius(e){let r=e,t=A5(m1("line-width",this,r),m1("line-gap-width",this,r)),a=m1("line-offset",this,r);return t/2+Math.abs(a)+b2(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:t,geometry:a,transform:i,pixelsToTileUnits:o}){let s=w2(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-i.bearingInRadians,o),l=o/2*A5(this.paint.get("line-width").evaluate(r,t),this.paint.get("line-gap-width").evaluate(r,t)),n=this.paint.get("line-offset").evaluate(r,t);return n&&(a=khe(a,n*o)),whe(s,a,l)}isTileClipped(){return!0}},KO=pl([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),JO=pl([{name:"a_projected_pos",components:3,type:"Float32"}],4),pl([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),QO=pl([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]),pl([{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"}]),hk=pl([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),eN=pl([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4),pl([{name:"triangle",components:3,type:"Uint16"}]),pl([{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"},{type:"Float32",name:"heightOffset"}]),pl([{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"},{type:"Float32",name:"heightOffset"}]),pl([{type:"Float32",name:"offsetX"}]),pl([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),pl([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]),B_=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){if(B_.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(e,r){return yi(this,null,function*(){if(this.isParsed())return this.getState();if(e.pluginStatus!=="loading")return this.setState(e),e;let t=e.pluginURL,a=new Promise(o=>{this.loadScriptResolve=o}),i=new Promise(o=>setTimeout(()=>o(),this.TIMEOUT));if(yield r(t),yield Promise.race([a,i]),this.isParsed()){let o={pluginStatus:"loaded",pluginURL:t};return this.setState(o),o}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${t}`)})}},tN={C:"18g,1;g2,3;4nb,1",D:"17k,1;5,1;1,1;1,5;4,d;1,7;1,2;z,2;8,g;i,12;1,2;9,1;1,1;1,2;14,3;2,1;28,9;3,f;2,4;1,1;2,3;2,6;7a,1;2,5;1,1;g,a;5,2;2,6;1,f",R:"17m,4;1,1;1,1;5,4;l,1;14,3;1,3;g,i;12,1;2,9;1,1;1,1;2,2;1,1;o,2;2x,3;f,2;4,1;1,2;3,2;6u,j;b,1;r,3;1,1;2,2;6,1",T:"174,b;1,1;1a,l;g,1;2t,7;2,6;2,2;1,4;bt,9;16,o;1,t;1clb,1"},rN={1569:[65152,0,0,0],1570:[65153,65154,0,0],1571:[65155,65156,0,0],1572:[65157,65158,0,0],1573:[65159,65160,0,0],1574:[65161,65162,65163,65164],1575:[65165,65166,0,0],1576:[65167,65168,65169,65170],1577:[65171,65172,0,0],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194,0,0],1584:[65195,65196,0,0],1585:[65197,65198,0,0],1586:[65199,65200,0,0],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262,0,0],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1611:[65136,0,0,65137],1612:[65138,0,0,0],1613:[65140,0,0,0],1614:[65142,0,0,65143],1615:[65144,0,0,65145],1616:[65146,0,0,65147],1617:[65148,0,0,65149],1618:[65150,0,0,65151],1649:[64336,64337,0,0],1655:[64477,0,0,0],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393,0,0],1676:[64388,64389,0,0],1677:[64386,64387,0,0],1678:[64390,64391,0,0],1681:[64396,64397,0,0],1688:[64394,64395,0,0],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415,0,0],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421,0,0],1729:[64422,64423,64424,64425],1733:[64480,64481,0,0],1734:[64473,64474,0,0],1735:[64471,64472,0,0],1736:[64475,64476,0,0],1737:[64482,64483,0,0],1739:[64478,64479,0,0],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431,0,0],1747:[64432,64433,0,0]},aN={\u0644\u0622:[65269,65270],\u0644\u0623:[65271,65272],\u0644\u0625:[65273,65274],\u0644\u0627:[65275,65276]},dk=1604,iN=/[\u0600-\u06ff\u0750-\u077f\u0870-\u089f\u08a0-\u08ff\ufb50-\ufdff\ufe70-\ufeff]/,pk=new Map;for(let[e,r]of Object.entries(tN))Tde(r,e,pk);vk=typeof Intl<"u"&&"Segmenter"in Intl,om={"!":"\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","\u22EF":"\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"},nN={10:!0,13:!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},oN={40:!0},Kw=class bD{constructor(r="",t=[],a=[]){this.text=r,this.sections=t,this.sectionIndex=a,this.imageSectionID=null,this._graphemes=null}graphemes(){var r;return(r=this._graphemes)!=null||(this._graphemes=OE(this.text)),this._graphemes}static fromFeature(r,t){let a=new bD;for(let i of r.sections)i.image?a.addImageSection(i):a.addTextSection(i,t);return a}length(){return this.graphemes().length}getSection(r){return this.sections[this.sectionIndex[r]]}getSectionIndex(r){return this.sectionIndex[r]}verticalizePunctuation(){this.text=Ude(this.text),this._graphemes=null}hasZeroWidthSpaces(){return this.text.includes("\u200B")}trim(){let r=this.graphemes(),t=0;for(;tt&&L5(r[a-1]);)a--;this.text=r.slice(t,a).join(""),this.sectionIndex=this.sectionIndex.slice(t,a),this._graphemes=null}substring(r,t){let a=this.graphemes().slice(r,t).join(""),i=this.sectionIndex.slice(r,t);return new bD(a,this.sections,i)}toCodeUnitIndex(r){return this.graphemes().slice(0,r).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((r,t)=>Math.max(r,this.sections[t].scale),0)}getMaxImageSize(r){let t=0,a=0;for(let i=0;i0?a[a.length-1]:"",o=OE(i+r);this.text+=r,this._graphemes=a.slice(0,i?-1:void 0).concat(o);let s=o.length-+!!i;for(let l=0;l=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(r,t,a,i,o){let s=[],l=this.determineAverageLineWidth(r,t,a,i,o),n=this.hasZeroWidthSpaces(),u=this.graphemes(),c=null,f=0,h=0;for(let d=0;d0){let g=u[d-1].codePointAt(0),m=p.codePointAt(0),y=xde(g),_=T5(g)&&T5(m);(nN[g]||y||"imageName"in this.getSection(d-1)||u[d+1]!==void 0&&oN[m]||_&&(c??(c=Ode(this.text))).has(h))&&s.push(F5(d,f,l,s,qde(g,m,y&&n),!1))}NE(p.codePointAt(0))||(f+=C5(p,this.getSection(d),a,i,r,o)),h+=p.length}return P5(F5(this.length(),f,l,s,0,!0))}determineAverageLineWidth(r,t,a,i,o){let s=0,l=0;for(let u of this.graphemes()){let c=this.getSection(l);s+=C5(u,c,a,i,r,o),l++}let n=Math.max(1,Math.ceil(s/t));return s/n}},Jw=Vde(),sN=/[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/,lN=new Set(["WS","FSI","LRI","RLI","PDI"]),uN=new Set(["S","B"]),Qw=4294967296,gme=1/Qw,mk=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),gk=class{constructor(e){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(e,r,t=this.length){let a;for(;a=this.nextField(t);)e(a,r,this);return r}readMessage(e,r){return this.readFields(e,r,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*Qw;return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*Qw;return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){let r=this.buf,t=r[this.pos++];if(t<128)return t;let a=t&127,i;return i=r[this.pos++],a|=(i&127)<<7,i<128||(i=r[this.pos++],a|=(i&127)<<14,i<128)||(i=r[this.pos++],a|=(i&127)<<21,i<128)?a:(i=r[this.pos],a|=(i&15)<<28,Qde(a,e,this))}readSVarint(){let e=this.readVarint();return e%2==1?(e+1)/-2:e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,r=this.pos;return this.pos=e,e-r>=12&&mk?mk.decode(this.buf.subarray(r,e)):tpe(this.buf,r,e)}readBytes(){let e=this.readVarint()+this.pos,r=this.buf.subarray(this.pos,e);return this.pos=e,r}readPackedVarint(e=[],r){let t=this.readPackedEnd();for(;this.pos=e)return 0;let r=this.readVarint();return this.type=r&7,this._valueStart=this.pos,r>>>3}skip(e){let r=e&7;if(r===0)for(;this.buf[this.pos++]>127;);else if(r===2)this.pos=this.readVarint()+this.pos;else if(r===5)this.pos+=4;else if(r===1)this.pos+=8;else throw Error(`Unimplemented type: ${r}`)}},e3=class{constructor(e,{pixelRatio:r,version:t,isWebGLImage:a=!1,stretchX:i,stretchY:o,content:s,textFitWidth:l,textFitHeight:n}){this.paddedRect=e,this.pixelRatio=r,this.stretchX=i,this.stretchY=o,this.content=s,this.version=t,this.needsFirstWebGLRender=a,this.textFitWidth=l,this.textFitHeight=n}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}},cN=class{constructor(e,r){let t={},a={};this.haveRenderCallbacks=[],this.patchedUpdateVersion=-1;let i=[];this.addImages(e,t,i),this.addImages(r,a,i);let{w:o,h:s}=R5(i),l=new Ls({width:o||1,height:s||1});for(let n in e){let u=e[n];if(u.isWebGLImage)continue;let c=t[n].paddedRect;Ls.copy(u.data,l,{x:0,y:0},{x:c.x+1,y:c.y+1},u.data)}for(let n in r){let u=r[n],c=a[n].paddedRect,f=c.x+1,h=c.y+1,d=u.data.width,p=u.data.height;Ls.copy(u.data,l,{x:0,y:0},{x:f,y:h},u.data),Ls.copy(u.data,l,{x:0,y:p-1},{x:f,y:h-1},{width:d,height:1}),Ls.copy(u.data,l,{x:0,y:0},{x:f,y:h+p},{width:d,height:1}),Ls.copy(u.data,l,{x:d-1,y:0},{x:f-1,y:h},{width:1,height:p}),Ls.copy(u.data,l,{x:0,y:0},{x:f+d,y:h},{width:1,height:p})}this.image=l,this.iconPositions=t,this.patternPositions=a}addImages(e,r,t){for(let a in e){let i=e[a],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};t.push(o),r[a]=new e3(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(a)}}patchUpdatedImages(e,r){if(e.dispatchRenderCallbacks(this.haveRenderCallbacks),this.patchedUpdateVersion!==e.updateVersion){this.patchedUpdateVersion=e.updateVersion;for(let t in this.iconPositions)this.patchUpdatedImage(this.iconPositions[t],e.getImage(t),r);for(let t in this.patternPositions)this.patchUpdatedImage(this.patternPositions[t],e.getImage(t),r)}}patchUpdatedImage(e,r,t){var a;if(!e||!r||!e.needsFirstWebGLRender&&e.version===r.version)return;e.needsFirstWebGLRender=!1,e.version=r.version;let[i,o]=e.tl,s=(a=r.userImage)==null?void 0:a.data;if(!D2(s)){t.update(r.data,void 0,{x:i,y:o});return}let{width:l,height:n}=r.data;t.context.setCustomLayerDefaults(),s.renderWithWebGL({gl:t.context.gl,texture:t.texture,x:i,y:o,width:l,height:n}),t.context.setDirty()}},Ri("ImagePosition",e3),Ri("ImageAtlas",cN),yk=(function(e){return e[e.none=0]="none",e[e.horizontal=1]="horizontal",e[e.vertical=2]="vertical",e[e.horizontalOnly=3]="horizontalOnly",e})(yk||{}),_k=new RegExp("^\\p{gc=M}$","u"),xk=32640,sm=class bQ extends zr{constructor(r,t,a,i){super(r,t),this.angle=a,i!==void 0&&(this.segment=i)}clone(){return new bQ(this.x,this.y,this.angle,this.segment)}},Ri("Anchor",sm),O_=class{constructor(e,r,t,a,i,o,s,l,n,u){var c;if(this.boxStartIndex=e.length,n){let f=o.top,h=o.bottom,d=o.collisionPadding;d&&(f-=d[1],h+=d[3]);let p=h-f;p>0&&(p=Math.max(10,p),this.circleDiameter=p)}else{let f=(c=o.image)!=null&&c.content&&(o.image.textFitWidth||o.image.textFitHeight)?j5(o):{x1:o.left,y1:o.top,x2:o.right,y2:o.bottom};f.y1=f.y1*s-l[0],f.y2=f.y2*s+l[2],f.x1=f.x1*s-l[3],f.x2=f.x2*s+l[1];let h=o.collisionPadding;if(h&&(f.x1-=h[0]*s,f.y1-=h[1]*s,f.x2+=h[2]*s,f.y2+=h[3]*s),u){let d=new zr(f.x1,f.y1),p=new zr(f.x2,f.y1),g=new zr(f.x1,f.y2),m=new zr(f.x2,f.y2),y=u*Math.PI/180;d._rotate(y),p._rotate(y),g._rotate(y),m._rotate(y),f.x1=Math.min(d.x,p.x,g.x,m.x),f.x2=Math.max(d.x,p.x,g.x,m.x),f.y1=Math.min(d.y,p.y,g.y,m.y),f.y2=Math.max(d.y,p.y,g.y,m.y)}e.emplaceBack(r.x,r.y,f.x1,f.y1,f.x2,f.y2,t,a,i)}this.boxEndIndex=e.length}},fN=class{constructor(e=[],r=(t,a)=>ta)){if(this.data=e,this.length=this.data.length,this.compare=r,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;let e=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:r,compare:t}=this,a=r[e];for(;e>0;){let i=e-1>>1,o=r[i];if(t(a,o)>=0)break;r[e]=o,e=i}r[e]=a}_down(e){let{data:r,compare:t}=this,a=this.length>>1,i=r[e];for(;e=0)break;r[e]=r[o],e=o}r[e]=i}},lm=class{constructor(e,r,t,a){this.p=new zr(e,r),this.h=t,this.d=Rpe(this.p,a),this.max=this.d+this.h*Math.SQRT2}},t3=(function(e){return e[e.center=1]="center",e[e.left=2]="left",e[e.right=3]="right",e[e.top=4]="top",e[e.bottom=5]="bottom",e[e["top-left"]=6]="top-left",e[e["top-right"]=7]="top-right",e[e["bottom-left"]=8]="bottom-left",e[e["bottom-right"]=9]="bottom-right",e})({}),r3=1/0,hN=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}],a3=class{constructor(e){this.layoutVertexArray=new zB,this.indexArray=new Vd,this.programConfigurations=e,this.segments=new Zs,this.dynamicLayoutVertexArray=new BB,this.opacityVertexArray=new OB,this.hasVisibleVertices=!1,this.placedSymbolArray=new NS}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(e,r,t,a){this.isEmpty()||(t&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,KO.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,r),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,JO.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,hN,!0),this.opacityVertexBuffer.itemSize=1),(t||a)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}},Ri("SymbolBuffers",a3),i3=class{constructor(e,r,t){this.layoutVertexArray=new e,this.layoutAttributes=r,this.indexArray=new t,this.segments=new Zs,this.collisionVertexArray=new jB}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,QO.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}},Ri("CollisionBuffers",i3),N_=class{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(s=>s.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=q5(this.zoom,r["text-size"]),this.iconSizeData=q5(this.zoom,r["icon-size"]);let t=this.layers[0].layout,a=t.get("symbol-sort-key"),i=t.get("symbol-z-order");this.canOverlap=O2(t,"text-overlap","text-allow-overlap")!=="never"||O2(t,"icon-overlap","icon-allow-overlap")!=="never"||t.get("text-ignore-placement")||t.get("icon-ignore-placement"),this.sortFeaturesByKey=i!=="viewport-y"&&!a.isConstant();let o=i==="viewport-y"||i==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&this.canOverlap,t.get("symbol-placement")==="point"&&(this.writingModes=t.get("text-writing-mode").map(s=>yk[s])),this.stateDependentLayerIds=this.layers.filter(s=>s.isStateDependent()).map(s=>s.id),this.sourceID=e.sourceID}createArrays(){this.text=new a3(new B0(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new a3(new B0(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new qS,this.lineVertexArray=new VS,this.symbolInstances=new US,this.textAnchorOffsets=new HS}calculateGlyphDependencies(e,r,t,a,i){var o;let s=(a||this.allowVerticalPlacement)&&i,l=Kw.fromFeature(e,t),n=l.graphemes();for(let u=0;u0)&&(s.value.kind!=="constant"||s.value.value.length>0),c=n.value.kind!=="constant"||!!n.value.value||Object.keys(n.parameters).length>0,f=o.get("symbol-sort-key");if(this.features=[],!u&&!c)return;let h=r.iconDependencies,d=r.glyphDependencies,p=r.availableImages,g=new Ko(this.zoom);for(let{feature:m,id:y,index:_,sourceLayerIndex:v}of e){let x=i._featureFilter.needGeometry,E=Zv(m,x);if(!i._featureFilter.filter(g,E,t))continue;x||(E.geometry=Xv(m));let M;if(u){let T=i.getValueAndResolveTokens("text-field",E,t,p),b=dp.factory(T);this.hasRTLText||(this.hasRTLText=qpe(b)),M=zde(b,i,E)}let C;if(c){let T=i.getValueAndResolveTokens("icon-image",E,t,p);C=T instanceof jd?T:jd.fromString(T)}if(!M&&!C)continue;let w=this.sortFeaturesByKey?f.evaluate(E,{},t):void 0,k={id:y,text:M,icon:C,index:_,sourceLayerIndex:v,geometry:E.geometry,properties:m.properties,type:G1.types[m.type],sortKey:w};if(this.features.push(k),C&&(h[C.name]=!0),M){let T=s.evaluate(E,{},t).join(","),b=o.get("text-rotation-alignment")!=="viewport"&&o.get("symbol-placement")!=="point";this.allowVerticalPlacement=(a=this.writingModes)==null?void 0:a.includes(2);let S=jE(M.toString());this.calculateGlyphDependencies(M,d,T,b,S);for(let A of M.sections)A.image&&(h[A.image.name]=!0)}}o.get("symbol-placement")==="line"&&(this.features=Bde(this.features)),this.sortFeaturesByKey&&this.features.sort((m,y)=>m.sortKey-y.sortKey)}update(e,r,t){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,r,this.layers,{imagePositions:t}),this.icon.programConfigurations.updatePaintArrays(e,r,this.layers,{imagePositions:t}))}addFeatures({options:e,canonical:r,glyphMap:t,glyphPositions:a,iconMap:i,iconPositions:o,showCollisionBoxes:s}){Bpe({bucket:this,glyphMap:t,glyphPositions:a,imageMap:i,imagePositions:o,showCollisionBoxes:s,canonical:r,subdivisionGranularity:e.subdivisionGranularity})}isEmpty(){return this.symbolInstances.length===0}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,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(e,r){let t=this.lineVertexArray.length;if(e.segment!==void 0){let a=e.dist(r[e.segment+1]),i=e.dist(r[e.segment]),o={};for(let s=e.segment+1;s=0;s--)o[s]={x:r[s].x,y:r[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=r[s-1].dist(r[s]));for(let s=0;s0}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(e,r){let t=e.placedSymbolArray.get(r),a=t.vertexStartIndex+t.numGlyphs*4;for(let i=t.vertexStartIndex;ia[s]-a[l]||i[l]-i[s]),o}addToSortKeyRanges(e,r){let t=this.sortKeyRanges[this.sortKeyRanges.length-1];t?.sortKey===r?t.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:r,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let r of this.symbolInstanceIndexes){let t=this.symbolInstances.get(r);this.featureSortOrder.push(t.featureIndex);let a=[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex];for(let i=0;i=0&&a.indexOf(o)===i&&this.addIndicesForPlacedSymbol(this.text,o)}t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}},Ri("SymbolBucket",N_,{omit:["layers","collisionBoxArray","features","compareText"]}),pN=()=>dN||(dN=new Du({"symbol-placement":new Ti(ta.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new Ti(ta.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new Ti(ta.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new gn(ta.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new Ti(ta.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new Ti(ta.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new Ti(ta.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new Ti(ta.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new Ti(ta.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new gn(ta.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new gn(ta.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new Ti(ta.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new Ti(ta.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new gn(ta.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new gn(ta.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new gn(ta.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new Ti(ta.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new gn(ta.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new gn(ta.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new Ti(ta.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new Ti(ta.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new Ti(ta.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new gn(ta.layout_symbol["text-field"],"text-field"),"text-font":new gn(ta.layout_symbol["text-font"],"text-font"),"text-size":new gn(ta.layout_symbol["text-size"],"text-size"),"text-max-width":new gn(ta.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new Ti(ta.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new gn(ta.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new gn(ta.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new gn(ta.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new Ti(ta.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new gn(ta.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new gn(ta.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new Ti(ta.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new Ti(ta.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new gn(ta.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new Ti(ta.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new Ti(ta.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new gn(ta.layout_symbol["text-transform"],"text-transform"),"text-offset":new gn(ta.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new Ti(ta.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new Ti(ta.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new Ti(ta.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new Ti(ta.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new gn(ta.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new Ti(ta.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})),mN=()=>vN||(vN=new Du({"icon-opacity":new gn(ta.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new gn(ta.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new gn(ta.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new gn(ta.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new gn(ta.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new Ti(ta.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new Ti(ta.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new gn(ta.paint_symbol["text-opacity"],"text-opacity"),"text-color":new gn(ta.paint_symbol["text-color"],"text-color",{runtimeType:Hh,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new gn(ta.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new gn(ta.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new gn(ta.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new Ti(ta.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new Ti(ta.paint_symbol["text-translate-anchor"],"text-translate-anchor")})),n3={get paint(){return mN()},get layout(){return pN()}},bk=class{constructor(e){if(e.property.overrides===void 0)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:E1,this.defaultValue=e}evaluate(e){if(e.formattedSection){let r=this.defaultValue.property.overrides;if(r?.hasOverride(e.formattedSection))return r.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){if(!this.defaultValue.isConstant()){let r=this.defaultValue.value;e(r._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}},Ri("FormatSectionOverride",bk,{omit:["defaultValue"]}),wk=e=>e.type==="symbol",gN=class wD extends Wh{constructor(r,t){super(r,n3,t)}recalculate(r,t){super.recalculate(r,t);let a=this.layout.get("icon-rotation-alignment");if((a.value.kind!=="constant"||a.value.value==="auto")&&(this.layout._values["icon-rotation-alignment"]=new mh(a.property,{kind:"constant",value:this.layout.get("symbol-placement")==="point"?"viewport":"map"},a.parameters)),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="point"?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),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").constantOr("viewport")),this.layout.get("symbol-placement")==="point"){let i=this.layout.get("text-writing-mode");if(i){let o=[];for(let s of i)o.includes(s)||o.push(s);this.layout._values["text-writing-mode"]=o}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(r,t,a,i){let o=this.layout.get(r).evaluate(t,{},a,i),s=this._unevaluatedLayout._values[r];return!s.isDataDriven()&&!d2(s.value)&&o?Vpe(t.properties,o):o}createBucket(r){return new N_(r)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let r of n3.paint.overridableProperties){if(!wD.hasPaintOverride(this.layout,r))continue;let t=this.paint.get(r),a=new nw(new bk(t),`layers[${this.id}].paint.${t.property.name}`,t.property.specification),i=null;i=t.value.kind==="constant"||t.value.kind==="source"?new D1("source",a):new S_("composite",a,t.value.zoomStops),this.paint._values[r]=new mh(t.property,i,t.parameters)}}_handleOverridablePaintPropertyUpdate(r,t,a){return!this.layout||t.isDataDriven()||a.isDataDriven()?!1:wD.hasPaintOverride(this.layout,r)}static hasPaintOverride(r,t){let a=r.get("text-field"),i=n3.paint.properties[t],o=!1,s=l=>{var n;for(let u of l)if((n=i.overrides)!=null&&n.hasOverride(u)){o=!0;return}};if(a.value.kind==="constant"&&a.value.value instanceof dp)s(a.value.value.sections);else if(a.value.kind==="source"||a.value.kind==="composite"){let l=u=>{if(!o)if(u instanceof rm&&Il(u.value)===S1){let c=u.value;s(c.sections)}else u instanceof yS?s(u.sections):u.eachChild(l)},n=a.value;n._styleExpression&&l(n._styleExpression.expression)}return o}},_N=()=>yN||(yN=new Du({"background-color":new Ti(ta.paint_background["background-color"],"background-color"),"background-pattern":new IS(ta.paint_background["background-pattern"],"background-pattern"),"background-opacity":new Ti(ta.paint_background["background-opacity"],"background-opacity")})),xN={get paint(){return _N()}},bN=e=>e.type==="background",wN=class extends Wh{constructor(e,r){super(e,xN,r)}},AN=e=>e.type==="custom",TN=class extends Wh{constructor(e,r){super(e,{},r),this.onAdd=t=>{this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},this.onRemove=t=>{this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},this.implementation=e}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}},MN=class{constructor(e){this._methodToThrottle=e,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var e;this._triggered||(this._triggered=!0,(e=this._channel)==null||e.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}},EN={once:!0},SN=class{constructor(e,r){this.target=e,this.mapId=r,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new MN(()=>this.process()),this.subscription=HM(this.target,"message",t=>this.receive(t),!1),this.globalScope=n1(self)?e:window}registerMessageHandler(e,r){this.messageHandlers[e]=r}unregisterMessageHandler(e){delete this.messageHandlers[e]}sendAsync(e,r){return new Promise((t,a)=>{let i=Math.round(Math.random()*1e18).toString(36).substring(0,10),o=r?HM(r.signal,"abort",()=>{o?.unsubscribe(),delete this.resolveRejects[i];let n={id:i,type:"",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(n),a(new T1(r.signal.reason))},EN):null;this.resolveRejects[i]={resolve:n=>{o?.unsubscribe(),t(n)},reject:n=>{o?.unsubscribe(),a(n)}};let s=[],l=Ci(ja({},e),{id:i,sourceMapId:this.mapId,origin:location.origin,data:n_(e.data,s)});this.target.postMessage(l,{transfer:s})})}receive(e){let r=e.data,t=r.id,a=["file://","resource://android","null"],i=[r.origin,location.origin],o=r.origin===location.origin,s=i.some(l=>a.includes(l));if((o||s)&&!(r.targetMapId&&this.mapId!==r.targetMapId)){if(r.type===""){delete this.tasks[t];let l=this.abortControllers[t];delete this.abortControllers[t],l&&l.abort();return}if(n1(self)||r.mustQueue){this.tasks[t]=r,this.taskQueue.push(t),this.invoker.trigger();return}this.processTask(t,r)}}process(){if(this.taskQueue.length===0)return;let e=this.taskQueue.shift(),r=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),r&&this.processTask(e,r)}processTask(e,r){return yi(this,null,function*(){if(r.type===""){let i=this.resolveRejects[e];if(delete this.resolveRejects[e],!i)return;r.error?i.reject(Ac(o_(r.error))):i.resolve(o_(r.data));return}if(!this.messageHandlers[r.type]){this.completeTask(e,null,null);return}let t=o_(r.data),a=new AbortController;this.abortControllers[e]=a;try{let i=yield this.messageHandlers[r.type](r.sourceMapId,t,a);this.completeTask(e,null,i)}catch(i){this.completeTask(e,Ac(i))}})}completeTask(e,r,t){let a=[];delete this.abortControllers[e];let i={id:e,type:"",sourceMapId:this.mapId,origin:location.origin,error:r?n_(r):null,data:n_(t,a)};this.target.postMessage(i,{transfer:a})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},j_=class{constructor(e,r,t){if(!Wpe(e,r,t))throw Error(`x=${r}, y=${t}, z=${e} outside of bounds. 0<=x<${2**e}, 0<=y<${2**e} 0<=z<=25 `);this.z=e,this.x=r,this.y=t,this.key=_1(0,e,e,r,t)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,r,t){let a=$pe(this.x,this.y,this.z),i=Ype(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(t==="tms"?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,r>1?"@2x":"").replace(/{quadkey}/g,i).replace(/{bbox-epsg-3857}/g,a)}isChildOf(e){let r=this.z-e.z;return r>0&&e.x===this.x>>r&&e.y===this.y>>r}getTilePoint(e){let r=2**this.z;return new zr((e.x*r-this.x)*xa,(e.y*r-this.y)*xa)}toString(){return`${this.z}/${this.x}/${this.y}`}},U_=class{constructor(e,r){this.wrap=e,this.canonical=r,this.key=_1(e,r.z,r.z,r.x,r.y)}},Yu=class Td{constructor(r,t,a,i,o){if(this.terrainRttPosMatrix32f=null,r= z; overscaledZ = ${r}; z = ${a}`);this.overscaledZ=r,this.wrap=t,this.canonical=new j_(a,+i,+o),this.key=_1(t,r,a,i,o)}clone(){return new Td(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(r){return this.overscaledZ===r.overscaledZ&&this.wrap===r.wrap&&this.canonical.equals(r.canonical)}scaledTo(r){if(r>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${r}; overscaledZ = ${this.overscaledZ}`);let t=this.canonical.z-r;return r>this.canonical.z?new Td(r,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Td(r,this.wrap,r,this.canonical.x>>t,this.canonical.y>>t)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(r,t){if(r>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${r}; overscaledZ = ${this.overscaledZ}`);let a=this.canonical.z-r;return r>this.canonical.z?_1(this.wrap*+t,r,this.canonical.z,this.canonical.x,this.canonical.y):_1(this.wrap*+t,r,r,this.canonical.x>>a,this.canonical.y>>a)}isChildOf(r){if(r.wrap!==this.wrap||this.overscaledZ-r.overscaledZ<=0)return!1;if(r.overscaledZ===0)return this.overscaledZ>0;let t=this.canonical.z-r.canonical.z;return t<0?!1:r.canonical.x===this.canonical.x>>t&&r.canonical.y===this.canonical.y>>t}children(r){if(this.overscaledZ>=r)return[new Td(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let t=this.canonical.z+1,a=this.canonical.x*2,i=this.canonical.y*2;return[new Td(t,this.wrap,t,a,i),new Td(t,this.wrap,t,a+1,i),new Td(t,this.wrap,t,a,i+1),new Td(t,this.wrap,t,a+1,i+1)]}isLessThan(r){return this.wrapr.wrap?!1:this.overscaledZr.overscaledZ?!1:this.canonical.xr.canonical.x?!1:this.canonical.y=0&&r=0&&t=u)return null;let f=this.canonical.x+i,h=this.wrap;return f<0?(h-=Math.ceil(-f/u),f=(f%u+u)%u):f>=u&&(h+=Math.floor(f/u),f%=u),{tileID:new Td(this.overscaledZ,h,n,f,c),x:s,y:l}}},o3=Math.PI*6378137,Ri("CanonicalTileID",j_),Ri("OverscaledTileID",Yu,{omit:["terrainRttPosMatrix32f"]}),q_="_geojsonTileLayer",kN=class{constructor(e){this._stringToNumber={},this._numberToString=[];for(let r=0;r=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}},Ak=class{constructor(e,r,t,a,i){this.type="Feature",this._vectorTileFeature=e,this._x=t,this._y=a,this._z=r;for(let o in e.properties)typeof e.properties[o]=="string"&&e.properties[o].startsWith("__$json__:")&&(e.properties[o]=JSON.parse(e.properties[o].slice(10)));this.properties=e.properties,this.id=i}projectPoint(e,r,t,a){return[(e.x+r)*360/a-180,360/Math.PI*Math.atan(Math.exp((1-(e.y+t)*2/a)*Math.PI))-90]}projectLine(e,r,t,a){return e.map(i=>this.projectPoint(i,r,t,a))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,r=e.extent*2**this._z,t=e.extent*this._x,a=e.extent*this._y,i=e.loadGeometry();switch(e.type){case 1:{let o=[];for(let l of i)o.push(l[0]);let s=this.projectLine(o,t,a,r);this._geometry=o.length===1?{type:"Point",coordinates:s[0]}:{type:"MultiPoint",coordinates:s};break}case 2:{let o=i.map(s=>this.projectLine(s,t,a,r));this._geometry=o.length===1?{type:"LineString",coordinates:o[0]}:{type:"MultiLineString",coordinates:o};break}case 3:{let o=m5(i),s=[];for(let l of o)s.push(l.map(n=>this.projectLine(n,t,a,r)));this._geometry=s.length===1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s};break}default:throw Error(`unknown feature type: ${e.type}`)}return this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&r!=="_x"&&r!=="_y"&&r!=="_z"&&(e[r]=this[r]);return e}},j0=class{constructor(e,r,t){this._name=e,this.dataBuffer=r,typeof t=="number"?this._size=t:(this.nullabilityBuffer=t,this._size=t.size())}getValue(e){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(e)?null:this.getValueFromBuffer(e)}has(e){var r;return((r=this.nullabilityBuffer)==null?void 0:r.get(e))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},V_=class extends j0{},s3=class extends V_{getValueFromBuffer(e){return this.dataBuffer[e]}},l3=class extends V_{getValueFromBuffer(e){return this.dataBuffer[e]}},Tk=class extends j0{constructor(e,r,t,a){super(e,r,a),this.delta=t}},u3=class extends Tk{constructor(e,r,t,a,i){super(e,i?Int32Array.of(r):Uint32Array.of(r),t,a)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}},c3=class extends j0{constructor(e,r,t,a){super(e,a?Int32Array.of(r):Uint32Array.of(r),t)}getValueFromBuffer(e){return this.dataBuffer[0]}},CN=class{constructor(e,r,t,a,i=4096){if(this._name=e,this._geometryVector=r,this._idVector=t,this._propertyVectors=a,this._extent=i,e.length===0)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){var e;return(e=this._propertyVectors)!=null?e:[]}getPropertyVector(e){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this.propertyVectors.map(r=>[r.name,r]))),this.propertyVectorsMap.get(e)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let e=[],r=this.geometryVector.getGeometries();for(let t=0;t>>32-e;h3=f3,Sk=65536,d3=Zpe(Sk),DN=3*d3/256+d3|0,(function(e){e.PRESENT="PRESENT",e.DATA="DATA",e.OFFSET="OFFSET",e.LENGTH="LENGTH"})(zl||(zl={})),(function(e){e.NONE="NONE",e.SINGLE="SINGLE",e.SHARED="SHARED",e.VERTEX="VERTEX",e.MORTON="MORTON",e.FSST="FSST"})(Gc||(Gc={})),(function(e){e.VERTEX="VERTEX",e.INDEX="INDEX",e.STRING="STRING",e.KEY="KEY"})(_p||(_p={})),(function(e){e.VAR_BINARY="VAR_BINARY",e.GEOMETRIES="GEOMETRIES",e.PARTS="PARTS",e.RINGS="RINGS",e.TRIANGLES="TRIANGLES",e.SYMBOL="SYMBOL",e.DICTIONARY="DICTIONARY"})(hu||(hu={})),LN=[zl.PRESENT,zl.DATA,zl.OFFSET,zl.LENGTH],kk=[to.NONE,to.DELTA,to.COMPONENTWISE_DELTA,to.RLE,to.MORTON],FN=[yh.NONE,yh.FAST_PFOR,yh.VARINT],PN=[Gc.NONE,Gc.SINGLE,Gc.SHARED,Gc.VERTEX,Gc.MORTON,Gc.FSST],IN=[_p.VERTEX,_p.INDEX,_p.STRING,_p.KEY],RN=[hu.VAR_BINARY,hu.GEOMETRIES,hu.PARTS,hu.RINGS,hu.TRIANGLES,hu.SYMBOL,hu.DICTIONARY],(function(e){e[e.FLAT=0]="FLAT",e[e.CONST=1]="CONST",e[e.SEQUENCE=2]="SEQUENCE",e[e.DICTIONARY=3]="DICTIONARY",e[e.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(Bs||(Bs={})),Zh=class{constructor(e,r){this.values=e,this._size=r}get(e){let r=Math.floor(e/8),t=e%8;return(this.values[r]>>t&1)==1}set(e,r){let t=Math.floor(e/8),a=e%8;this.values[t]=this.values[t]|+!!r<>t&1}size(){return this._size}getBuffer(){return this.values}},zN=new TextDecoder,Ck=class extends V_{getValueFromBuffer(e){return this.dataBuffer[e]}},Dk=class extends Tk{constructor(e,r,t,a,i){super(e,i?BigInt64Array.of(r):BigUint64Array.of(r),t,a)}getValueFromBuffer(e){return this.dataBuffer[0]+BigInt(e)*this.delta}},(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON",e[e.MULTIPOINT=3]="MULTIPOINT",e[e.MULTILINESTRING=4]="MULTILINESTRING",e[e.MULTIPOLYGON=5]="MULTIPOLYGON"})(Xu||(Xu={})),(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON"})(BN||(BN={})),(function(e){e[e.MORTON=0]="MORTON",e[e.VEC_2=1]="VEC_2",e[e.VEC_3=2]="VEC_3"})(U0||(U0={})),Lk=class{constructor(e,r,t,a,i){this._vertexBufferType=e,this._topologyVector=r,this._vertexOffsets=t,this._vertexBuffer=a,this._mortonSettings=i}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(e){let r=this.vertexOffsets?this.vertexOffsets[e]*2:e*2;return[this.vertexBuffer[r],this.vertexBuffer[r+1]]}getVertex(e){if(this.vertexOffsets&&this.mortonSettings){let t=this.vertexOffsets[e],a=this.vertexBuffer[t],i=QE(a,this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[i.x,i.y]}let r=this.vertexOffsets?this.vertexOffsets[e]*2:e*2;return[this.vertexBuffer[r],this.vertexBuffer[r+1]]}getGeometries(){return Sve(this)}get mortonSettings(){return this._mortonSettings}},Fk=class extends Lk{constructor(e,r,t,a,i,o,s){super(t,a,i,o,s),this._numGeometries=e,this._geometryType=r}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===Xu.POLYGON||this._geometryType===Xu.MULTIPOLYGON}containsSingleGeometryType(){return!0}},Pk=class extends Lk{constructor(e,r,t,a,i,o){super(e,t,a,i,o),this._geometryTypes=r}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let e=0;eCi(ja({},t),{[a.name]:new GN(a)}),{})}},WN=class{constructor(e,r){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new ow(xa,16,0),this.grid3D=new ow(xa,16,0),this.featureIndexArray=new $S,this.promoteId=r}insert(e,r,t,a,i,o){let s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(t,a,i);let l=o?this.grid3D:this.grid;for(let n of r){let u=[1/0,1/0,-1/0,-1/0];for(let c of n)u[0]=Math.min(u[0],c.x),u[1]=Math.min(u[1],c.y),u[2]=Math.max(u[2],c.x),u[3]=Math.max(u[3],c.y);u[0]<8192&&u[1]<8192&&u[2]>=0&&u[3]>=0&&l.insert(s,u[0],u[1],u[2],u[3])}}loadVTLayers(){return this.vtLayers||(this.encoding==="mlt"?this.vtLayers=new HN(this.rawTileData).layers:this.vtLayers=new LO(new gk(this.rawTileData)).layers,this.sourceLayerCoder=new kN(this.vtLayers?Object.keys(this.vtLayers).sort():[q_])),this.vtLayers}query(e,r,t,a){this.loadVTLayers();let i=e.params,o=xa/e.tileSize/e.scale,s=t_(i.filter,"queryRenderedFeatures filter",i.globalState),l=e.queryGeometry,n=e.queryPadding*o,u=Xh.fromPoints(l),c=this.grid.query(u.minX-n,u.minY-n,u.maxX+n,u.maxY+n),f=Xh.fromPoints(e.cameraQueryGeometry).expandBy(n),h=this.grid3D.query(f.minX,f.minY,f.maxX,f.maxY,(g,m,y,_)=>Mhe(e.cameraQueryGeometry,g-n,m-n,y+n,_+n));for(let g of h)c.push(g);c.sort(vme);let d={},p;for(let g of c){if(g===p)continue;p=g;let m=this.featureIndexArray.get(g),y=null;this.loadMatchingFeature(d,m.bucketIndex,m.sourceLayerIndex,m.featureIndex,s,i.layers,i.availableImages,r,t,a,(_,v,x)=>(y||(y=Xv(_)),v.queryIntersectsFeature({queryGeometry:l,feature:_,featureState:x,geometry:y,zoom:this.z,transform:e.transform,pixelsToTileUnits:o,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return d}loadMatchingFeature(e,r,t,a,i,o,s,l,n,u,c){let f=this.bucketLayerIDs[r];if(o&&!f.some(g=>o.has(g)))return;let h=this.sourceLayerCoder.decode(t),d=this.vtLayers[h].feature(a);if(i.needGeometry){let g=Zv(d,!0);if(!i.filter(new Ko(this.tileID.overscaledZ),g,this.tileID.canonical))return}else if(!i.filter(new Ko(this.tileID.overscaledZ),d))return;let p=this.getId(d,h);for(let g of f){if(o&&!o.has(g))continue;let m=l[g];if(!m)continue;let y={};p&&u&&(y=u.getState(m.sourceLayer||"_geojsonTileLayer",p));let _=tn({},n[g]);_.paint=Fz(_.paint,m.paint,d,y,s),_.layout=Fz(_.layout,m.layout,d,y,s);let v=!c||c(d,m,y);if(!v)continue;let x=new Ak(d,this.z,this.x,this.y,p);x.layer=_;let E=e[g];E===void 0&&(E=e[g]=[]),E.push({featureIndex:a,feature:x,intersectionZ:v})}}lookupSymbolFeatures(e,r,t,a,i,o,s,l){let n={};this.loadVTLayers();let u=t_(i.filterSpec,"queryRenderedFeatures symbol filter",i.globalState);for(let c of e)this.loadMatchingFeature(n,t,a,c,u,o,s,l,r);return n}hasLayer(e){for(let r of this.bucketLayerIDs)for(let t of r)if(e===t)return!0;return!1}getId(e,r){var t;let a=e.id;if(this.promoteId){let i=typeof this.promoteId=="string"?this.promoteId:this.promoteId[r];a=e.properties[i],typeof a=="boolean"&&(a=Number(a)),a===void 0&&((t=e.properties)!=null&&t.cluster)&&this.promoteId&&(a=Number(e.properties.cluster_id))}return a}},Ri("FeatureIndex",WN,{omit:["rawTileData","sourceLayerCoder"]}),$N=class{constructor(e,r){this.max=e,this.onRemove=r,this.reset()}reset(){for(let e in this.data)for(let r of this.data[e])r.timeout&&clearTimeout(r.timeout),this.onRemove(r.value);return this.data={},this.order=[],this}add(e,r,t){let a=e.wrapped().key;this.data[a]===void 0&&(this.data[a]=[]);let i={value:r,timeout:void 0};if(t!==void 0&&(i.timeout=setTimeout(()=>{this.remove(e,i)},t)),this.data[a].push(i),this.order.push(a),this.order.length>this.max){let o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let r=this.data[e].shift();return r.timeout&&clearTimeout(r.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),r.value}getByKey(e){let r=this.data[e];return r?r[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,r){if(!this.has(e))return this;let t=e.wrapped().key,a=r===void 0?0:this.data[t].indexOf(r),i=this.data[t][a];return this.data[t].splice(a,1),i.timeout&&clearTimeout(i.timeout),this.data[t].length===0&&delete this.data[t],this.onRemove(i.value),this.order.splice(this.order.indexOf(t),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let r=this._getAndRemoveByKey(this.order[0]);r&&this.onRemove(r)}return this}filter(e){let r=[];for(let t in this.data)for(let a of this.data[t])e(a.value)||r.push(a);for(let t of r)this.remove(t.value.tileID,t)}}}}),YN={};rl(YN,{AJAXError:()=>M1,AttributionControl:()=>b7,BoxZoomHandler:()=>s7,CanvasSource:()=>MC,CooperativeGesturesHandler:()=>_7,DoubleClickZoomHandler:()=>v7,DragPanHandler:()=>m7,DragRotateHandler:()=>g7,EXTENT:()=>xa,EdgeInsets:()=>$3,ErrorEvent:()=>mn,Event:()=>qf,Evented:()=>Zl,FullscreenControl:()=>WV,FullscreenEvent:()=>h4,GPUInitializationError:()=>n7,GeoJSONSource:()=>AC,GeolocateControl:()=>VV,GeolocateErrorEvent:()=>D7,GeolocateEvent:()=>W0,GeolocatePositionEvent:()=>f4,GlobeControl:()=>YV,Hash:()=>o7,ImageSource:()=>dm,KeyboardHandler:()=>h7,LngLat:()=>ln,LngLatBounds:()=>Qh,LogoControl:()=>w7,Map:()=>M7,MapBoxZoomEvent:()=>I3,MapContextEvent:()=>J_,MapLibreEvent:()=>vu,MapLibreMap:()=>M7,MapMouseEvent:()=>Vf,MapMovementEvent:()=>hn,MapProjectionEvent:()=>gC,MapSourceDataEvent:()=>Fs,MapStyleDataEvent:()=>_h,MapStyleImageMissingEvent:()=>yC,MapStyleLoadEvent:()=>P3,MapTerrainEvent:()=>mC,MapTouchEvent:()=>X1,MapWheelEvent:()=>vC,Marker:()=>c4,MarkerClickEvent:()=>C7,MarkerDragEvent:()=>H0,MercatorCoordinate:()=>$o,NavigationControl:()=>jV,Point:()=>zr,Popup:()=>KV,PopupEvent:()=>d4,RasterDEMTileSource:()=>wC,RasterTileSource:()=>j3,ScaleControl:()=>HV,ScrollZoomHandler:()=>p7,Style:()=>J3,TerrainControl:()=>$V,TwoFingersTouchPitchHandler:()=>f7,TwoFingersTouchRotateHandler:()=>c7,TwoFingersTouchZoomHandler:()=>u7,TwoFingersTouchZoomRotateHandler:()=>y7,VectorTileSource:()=>bC,VideoSource:()=>TC,addProtocol:()=>Gce,addSourceType:()=>Bj,clearPrewarmedResources:()=>qme,config:()=>Uf,createTileMesh:()=>d8,getGlobalDispatcher:()=>qk,getMaxParallelImageRequests:()=>cye,getRTLTextPluginStatus:()=>oye,getVersion:()=>sye,getWorkerCount:()=>lye,getWorkerUrl:()=>hye,importScriptInWorkers:()=>pye,isTimeFrozen:()=>Tme,now:()=>is,prewarm:()=>Ume,removeProtocol:()=>Hce,restoreNow:()=>Ame,setMaxParallelImageRequests:()=>fye,setNow:()=>wme,setRTLTextPlugin:()=>nye,setWorkerCount:()=>uye,setWorkerUrl:()=>dye});function XN(){var e=new fu(4);return fu!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function _me(e,r){var t=r[0],a=r[1],i=r[2],o=r[3],s=t*o-i*a;return s?(s=1/s,e[0]=o*s,e[1]=-a*s,e[2]=-i*s,e[3]=t*s,e):null}function xme(e){return e[0]*e[3]-e[2]*e[1]}function bme(e,r,t){var a=r[0],i=r[1],o=r[2],s=r[3],l=Math.sin(t),n=Math.cos(t);return e[0]=a*n+o*l,e[1]=i*n+s*l,e[2]=a*-l+o*n,e[3]=i*-l+s*n,e}function is(){return K_.getCurrentTime()}function wme(e){K_.setNow(e)}function Ame(){K_.restoreNow()}function Tme(){return K_.isFrozen()}function Mme(e,r){let t={};for(let a in e)a!=="ref"&&(t[a]=e[a]);return Wz.forEach(a=>{a in r&&(t[a]=r[a])}),t}function ZN(e){e=e.slice();let r=Object.create(null);for(let t=0;t{"source"in s&&a[s.source]?t.push({command:"removeLayer",args:[s.id]}):o.push(s)}),t=t.concat(i),Cme(o,r.layers,t)}catch(a){console.warn("Unable to compute style diff:",a),t=[{command:"setStyle",args:[r]}]}return t}function Lme(){let e={},r=ta.$version;for(let t in ta.$root){let a=ta.$root[t];if(a.required){let i=null;i=t==="version"?r:a.type==="array"?[]:{},i!=null&&(e[t]=i)}}return e}function m3(e){let r=[];if(typeof e=="string")r.push({id:"default",url:e});else if(e&&e.length>0){let t=[];for(let{id:a,url:i}of e){let o=`${a}${i}`;t.includes(o)||(t.push(o),r.push({id:a,url:i}))}}return r}function t8(e,r,t){try{let a=new URL(e);return a.pathname+=`${r}${t}`,a.toString()}catch{throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function Fme(e,r,t,a){return yi(this,null,function*(){let i=m3(e),o=t>1?"@2x":"",s={},l={};for(let{id:n,url:u}of i){let c=yield r.transformRequest(t8(u,o,".json"),"SpriteJSON");s[n]=x_(c,a);let f=yield r.transformRequest(t8(u,o,".png"),"SpriteImage");l[n]=Gd.getImage(f,a)}return yield Promise.all([...Object.values(s),...Object.values(l)]),Pme(s,l)})}function Pme(e,r){return yi(this,null,function*(){let t={};for(let a in e){t[a]={};let i=(yield r[a]).data;if(!i)throw Error(`Could not load sprite image for ${a}: the response is empty`);let o=Hc.getImageCanvasContext(i),s=(yield e[a]).data;for(let l in s){let{width:n,height:u,x:c,y:f,sdf:h,pixelRatio:d,stretchX:p,stretchY:g,content:m,textFitWidth:y,textFitHeight:_}=s[l],v={width:n,height:u,x:c,y:f,context:o};t[a][l]={data:null,pixelRatio:d,sdf:h,stretchX:p,stretchY:g,content:m,textFitWidth:y,textFitHeight:_,spriteData:v}}}return t})}function Ime(e){let r=/^u\+([0-9a-f]*)(\?+)$/i.exec(e);if(r){let[,i,o]=r;return i.length+o.length>6?null:r8(parseInt(`${i}${"0".repeat(o.length)}`,16),parseInt(`${i}${"f".repeat(o.length)}`,16))}let t=/^u\+([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?$/i.exec(e);if(!t)return null;let a=parseInt(t[1],16);return r8(a,t[2]===void 0?a:parseInt(t[2],16))}function r8(e,r){return e>r||e>R3?null:{start:e,end:Math.min(r,R3)}}function Rme(e,r){return e.ranges.some(({start:t,end:a})=>r>=t&&r<=a)}function a8(e,r,t,a,i,o,s,l,n){for(let u=r;u-1);n++,o[n]=l,s[n]=u,s[n+1]=z3}for(let l=0,n=0;l__(r,t))),N3}function Vme(e,r){let t=w0();return Xl(t,t,[1,1,0]),wc(t,t,[e.width*.5,e.height*.5,1]),e.calculatePosMatrix?t1(t,t,e.calculatePosMatrix(r.toUnwrapped())):t}function Gme(e,r,t){if(e)for(let a of e){let i=r[a];if(i?.source===t&&i.type==="fill-extrusion")return!0}else for(let a in r){let i=r[a];if(i.source===t&&i.type==="fill-extrusion")return!0}return!1}function Hme(e,r,t,a,i,o,s){var l;let n=Gme((l=i?.layers)!=null?l:null,r,e.id),u=o.maxPitchScaleFactor(),c=e.tilesIn(a,u,n);c.sort(n8);let f=[];for(let h of c)f.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(r,t,e.getState(),h.queryGeometry,h.cameraQueryGeometry,h.scale,i,o,u,Vme(o,h.tileID),s?(d,p)=>s(h.tileID,d,p):void 0)});return Xme(Yme(f),e)}function Wme(e,r,t,a,i,o,s){let l={},n=o.queryRenderedSymbols(a),u=[];for(let c of Object.keys(n).map(Number))u.push(s[c]);u.sort(n8);for(let c of u){let f=c.featureIndex.lookupSymbolFeatures(n[c.bucketInstanceId],r,c.bucketIndex,c.sourceLayerIndex,{filterSpec:i.filter,globalState:i.globalState},i.layers,i.availableImages,e);for(let h in f){l[h]||(l[h]=[]);let d=f[h];d.sort((p,g)=>{let m=c.featureSortOrder;if(m){let y=m.indexOf(p.featureIndex);return m.indexOf(g.featureIndex)-y}return g.featureIndex-p.featureIndex});for(let p of d)l[h].push(p)}}return Zme(l,e,t)}function $me(e,r){let t=e.getRenderableIds().map(o=>e.getTileByID(o)),a=[],i={};for(let o of t){let s=o.tileID.canonical.key;i[s]||(i[s]=!0,o.querySourceFeatures(a,r))}return a}function n8(e,r){let t=e.tileID,a=r.tileID;return t.overscaledZ-a.overscaledZ||t.canonical.y-a.canonical.y||t.wrap-a.wrap||t.canonical.x-a.canonical.x}function Yme(e){let r={},t={};for(let{queryResults:a,wrappedTileID:i}of e){t[i]||(t[i]={});let o=t[i];for(let s in a){let l=a[s];o[s]||(o[s]={});let n=o[s];r[s]||(r[s]=[]);for(let u of l)n[u.featureIndex]||(n[u.featureIndex]=!0,r[s].push(u))}}return r}function Xme(e,r){for(let t in e)for(let a of e[t])o8(a,r);return e}function Zme(e,r,t){for(let a in e)for(let i of e[a]){let o=t[r[a].source];o8(i,o)}return e}function o8(e,r){let t=e.feature,a=r.getFeatureState(t.layer["source-layer"],t.id);t.source=t.layer.source,t.layer["source-layer"]&&(t.sourceLayer=t.layer["source-layer"]),t.state=a}function s8(e,r,t,a){return yi(this,null,function*(){let i=e;if(e.url?i=(yield x_(yield r.transformRequest(e.url,"Source"),t)).data:yield Hc.frameAsync(t,a),!i)return null;let o=Gy(tn(i,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in i&&i.vector_layers&&(o.vectorLayerIds=i.vector_layers.map(s=>s.id)),o})}function G_(e,r){return r?e.properties[r]:e.id}function Kme(e,r){let t=new Map;if(e==null||e.type==null)return t;if(e.type==="Feature"){let a=G_(e,r);return a==null?void 0:(t.set(a,e),t)}if(e.type==="FeatureCollection"){let a=new Set;for(let i of e.features){let o=G_(i,r);if(o==null||a.has(o))return;a.add(o),t.set(o,i)}return t}}function Jme(e,r,t){var a,i;let o=[];if(r.removeAll)e.clear();else if(r.remove)for(let s of r.remove){let l=e.get(s);l&&(o.push(l.geometry),e.delete(s))}if(r.add)for(let s of r.add){let l=G_(s,t);if(l==null)continue;let n=e.get(l);n&&o.push(n.geometry),o.push(s.geometry),e.set(l,s)}if(r.update)for(let s of r.update){let l=e.get(s.id);if(!l)continue;let n=!!s.newGeometry,u=s.removeAllProperties||((a=s.removeProperties)==null?void 0:a.length)>0||((i=s.addOrUpdateProperties)==null?void 0:i.length)>0;if(!n&&!u)continue;o.push(l.geometry);let c=ja({},l);if(e.set(s.id,c),n&&(o.push(s.newGeometry),c.geometry=s.newGeometry),u){if(c.properties=s.removeAllProperties?{}:ja({},c.properties||{}),s.removeProperties)for(let f of s.removeProperties)delete c.properties[f];if(s.addOrUpdateProperties)for(let{key:f,value:h}of s.addOrUpdateProperties)c.properties[f]=h}}return o}function Qme(e,r,t){if(!e)return r||{};if(!r)return e||{};t&&(l8(e.add,t),l8(r.add,t));let a=u8(e),i=u8(r);e1e(a,i);let o={};if((a.removeAll||i.removeAll)&&(o.removeAll=!0),o.remove=new Set([...a.remove,...i.remove]),o.add=new Map([...a.add,...i.add]),o.update=new Map([...a.update,...i.update]),o.remove.size&&o.add.size)for(let l of o.add.keys())o.remove.delete(l);let s=a1e(o);return t&&r1e(s.add,t),s}function e1e(e,r){r.removeAll&&(e.add.clear(),e.update.clear(),e.remove.clear(),r.remove.clear());for(let t of r.remove)e.add.delete(t),e.update.delete(t);for(let[t,a]of r.update){let i=e.update.get(t);i&&(r.update.set(t,t1e(i,a)),e.update.delete(t))}}function t1e(e,r){let t={id:e.id};if(r.removeAllProperties&&(delete e.removeProperties,delete e.addOrUpdateProperties,delete r.removeProperties),r.removeProperties&&e.addOrUpdateProperties){let a=new Set(r.removeProperties);e.addOrUpdateProperties=e.addOrUpdateProperties.filter(i=>!a.has(i.key))}return(e.removeAllProperties||r.removeAllProperties)&&(t.removeAllProperties=!0),(e.removeProperties||r.removeProperties)&&(t.removeProperties=[...e.removeProperties||[],...r.removeProperties||[]]),(e.addOrUpdateProperties||r.addOrUpdateProperties)&&(t.addOrUpdateProperties=[...e.addOrUpdateProperties||[],...r.addOrUpdateProperties||[]]),(e.newGeometry||r.newGeometry)&&(t.newGeometry=r.newGeometry||e.newGeometry),t}function l8(e,r){if(e)for(let t of e){let a=G_(t,r);a!=null&&(t.id=a)}}function r1e(e,r){if(e)for(let t of e)G_(t,r)!=null&&delete t.id}function u8(e){var r,t;if(!e)return{};let a={};return a.removeAll=e.removeAll,a.remove=new Set(e.remove||[]),a.add=new Map((r=e.add)==null?void 0:r.map(i=>[i.id,i])),a.update=new Map((t=e.update)==null?void 0:t.map(i=>[i.id,i])),a}function a1e(e){let r={};return e.removeAll&&(r.removeAll=e.removeAll),e.remove&&(r.remove=Array.from(e.remove)),e.add&&(r.add=Array.from(e.add.values())),e.update&&(r.update=Array.from(e.update.values())),r}function c8(e){return!e||e.length===0?[]:typeof e[0]=="number"?[e]:e.flatMap(r=>c8(r))}function g3(e){return e.type==="GeometryCollection"?e.geometries.flatMap(r=>g3(r)):c8(e.coordinates)}function f8(e){let r=new Qh,t;switch(e.type){case"FeatureCollection":t=e.features.flatMap(a=>g3(a.geometry));break;case"Feature":t=g3(e.geometry);break;default:t=g3(e)}if(t.length===0)return r;for(let a of t){let[i,o]=a;r.extend([i,o])}return r}function i1e({x:e,y:r,z:t},a=0){let i=RE((e-a)/2**t),o=f_((r+1+a)/2**t),s=RE((e+1+a)/2**t),l=f_((r-a)/2**t);return new Qh([i,o],[s,l])}function n1e(e){e*=Math.PI/180;let r=Math.sin(e),t=Math.cos(e);return[(2*t+1)/3,(-Math.sqrt(3)*r-t+1)/3,(Math.sqrt(3)*r-t+1)/3]}function o1e(e){return e>0?1/(1-e):1+e}function s1e(e){return e>0?1-1/(1.001-e):-e}function h8(e,r){let t=d8(r,"16bit"),a=Kp.deserialize({arrayBuffer:t.vertices,length:t.vertices.byteLength/2/2}),i=Vd.deserialize({arrayBuffer:t.indices,length:t.indices.byteLength/2/3});return new Z1(e.createVertexBuffer(a,G0.members),e.createIndexBuffer(i),Zs.simpleSegment(0,0,a.length,i.length))}function d8(e,r){let t=e.granularity===void 0?1:Math.max(e.granularity,1),a=t+(e.generateBorders?2:0),i=t+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),o=a+1,s=i+1,l=e.generateBorders?-1:0,n=e.generateBorders||e.extendToNorthPole?-1:0,u=t+ +!!e.generateBorders,c=t+(e.generateBorders||e.extendToSouthPole?1:0),f=o*s,h=a*i*6,d=o*s>65536;if(d&&r==="16bit")throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let p=d||r==="32bit",g=new Int16Array(f*2),m=0;for(let v=n;v<=c;v++)for(let x=l;x<=u;x++){let E=x/t*xa;x===-1&&(E=-tx),x===t+1&&(E=xa+tx);let M=v/t*xa;v===-1&&(M=e.extendToNorthPole?q1:-tx),v===t+1&&(M=e.extendToSouthPole?V1:xa+tx),g[m++]=E,g[m++]=M}let y=p?new Uint32Array(h):new Uint16Array(h),_=0;for(let v=0;v=1&&y<=512)||_>=1?hm:[p,g,_]}function f1e(e){let r=(1-4/e)/.9921875;return Math.max(0,r)}function p8(e){let[r,t,a,i]=e;return r.x+a.x===t.x+i.x&&r.y+a.y===t.y+i.y}function h1e(e,r){let t={};if(!r)return t;for(let a of e){let i=a.layerIds.map(o=>r.getLayer(o)).filter(Boolean);if(i.length!==0){a.layers=i,a.stateDependentLayerIds&&(a.stateDependentLayers=a.stateDependentLayerIds.map(o=>i.filter(s=>s.id===o)[0]));for(let o of i)t[o.id]=a}}return t}function H_(){return q3||(q3=new Oj),q3}function v8(e){let r=[];for(let t in e)r.push({id:t,state:e[t]});return r}function d1e(e,r,t,a){let i=Cu([],e,r),o=1/i[3]/t*a;return Nz(i,i,[o,o,1/i[3],o])}function p1e(e,r,t,a){let i=a?4:0,o=a?0:4,s=0,l=[],n=[];for(let f=0;f<4;f++){let h=hp([],e[f+o],e[f+i]),d=Yp(h);Ws(h,h,1/d),l.push(d),n.push(h)}for(let f=0;f<4;f++){let h=kce(e[f+i],n[f],t);s=h!==null&&h>=0?Math.max(s,h):Math.max(s,l[f])}let u=v1e(e,r),c=m1e(t,u);if(c!==null){let f=c/uu(n[0],u);s=Math.min(s,f)}for(let f=0;f<4;f++){let h=Math.min(s,l[f]);e[f+o]=[e[f+i][0]+n[f][0]*h,e[f+i][1]+n[f][1]*h,e[f+i][2]+n[f][2]*h,1]}}function v1e(e,r){let t=hp([],e[r[0]],e[r[1]]),a=hp([],e[r[2]],e[r[1]]),i=[0,0,0,0];return xf(i,Nf([],t,a)),i[3]=-uu(i,e[r[0]]),i}function m1e(e,r){let t=y_(e),a=bce([],e,1/t),i=hp([],r,Ws([],a,uu(r,a))),o=y_(i);if(o>0){let s=Math.sqrt(1-a[3]*a[3]),l=Ws([],a,-a[3]),n=jh([],l,Ws([],i,s/o));return qM(r,n)}return null}function g1e(e,r,t){let a=r.intersectsFrustum(e);if(!t||a===0)return a;let i=r.intersectsPlane(t);return i===0?0:a===2&&i===2?2:1}function m8(e,r,t){let a=0,i=(t-r)/10;for(let o=0;o<10;o++){let s=r+(o+.5)/10*(t-r);a+=i*Math.cos(s)**+e}return a}function Vk(e,r){return function(t,a,i,o,s){let l=2*((e-1)/Tc(Math.cos(il(N0-s))/Math.cos(il(N0)))-1),n=Math.acos(i/o),u=2*m8(l-1,0,il(s/2)),c=Math.min(il(N0),n+il(s/2)),f=Math.min(c,n-il(s/2)),h=m8(l-1,f,c),d=Math.atan(a/i),p=Math.hypot(a,i),g=t;return g+=Tc(o/p/Math.max(.5,Math.cos(il(s/2)))),g+=l*Tc(Math.cos(d))/2,g-=Tc(Math.max(1,h/u/r))/2,g}}function Gk(e,r){let t=(r.roundZoom?Math.round:Math.floor)(e.zoom+Tc(e.tileSize/r.tileSize));return Math.max(0,t)}function y1e(e,r){let t=N0-e.pitch-e.fov/2,a=Gn((15-t)/15,0,1),i=Math.max(500,r??0);return e.elevation+a*i}function _1e(e,r,t){let a=e.planes[1],i=e.points.map(n=>{let u=a[0]*n[0]+a[1]*n[1]+a[2]*n[2]+a[3];if(Math.abs(u)>1e-6)return n;let c=[n[0]-t[0],n[1]-t[1],n[2]-t[2]],f=a[0]*c[0]+a[1]*c[1]+a[2]*c[2];if(f>=-1e-9)return n;let h=r/-f;return[n[0]+c[0]*h,n[1]+c[1]*h,n[2]+c[2]*h,n[3]]}),o=e.planes.map((n,u)=>u===1?[n[0],n[1],n[2],n[3]+r]:n),s=[1/0,1/0,1/0],l=[-1/0,-1/0,-1/0];for(let n of i)for(let u=0;u<3;u++)s[u]=Math.min(s[u],n[u]),l[u]=Math.max(l[u],n[u]);return new G3(i,o,new V3(s,l))}function W1(e,r){let t=e.getCameraFrustum(),a=e.getClippingPlane();if(a&&r.maxContentElevation>0){let M=Math.hypot(a[0],a[1],a[2]);if(M>0){let C=1+r.maxContentElevation/Vc,w=Gn(-a[3]/M,-1,1),k=Math.cos(Math.acos(w)+Math.acos(1/C));a=[a[0],a[1],a[2],-k*M],t=_1e(t,Math.sqrt(C*C-1),e.cameraPosition)}}let i=lde(e),o=$o.fromLngLat(e.center,e.elevation),s=y1e(e,r.maxContentElevation),l=e.getCoveringTilesDetailsProvider(),n=l.allowVariableZoom(e,r),u=Gk(e,r),c=r.minzoom||0,f=r.maxzoom===void 0?e.maxZoom:r.maxzoom,h=Math.min(Math.max(0,u),f),d=2**h,p=[d*i.x,d*i.y,0],g=[d*o.x,d*o.y,0],m=Math.hypot(o.x-i.x,o.y-i.y),y=Math.abs(o.z-i.z),_=Math.hypot(m,y),v=M=>({zoom:0,x:0,y:0,wrap:M,fullyVisible:!1}),x=[],E=[];if(e.renderWorldCopies&&l.allowWorldCopies())for(let M=1;M<=3;M++)x.push(v(-M)),x.push(v(M));for(x.push(v(0));x.length>0;){let M=x.pop(),C=M.x,w=M.y,k=M.fullyVisible,T={x:C,y:w,z:M.zoom},b=l.getTileBoundingVolume(T,M.wrap,s,r);if(!k){let D=g1e(t,b,a);if(D===0)continue;k=D===2}let S=l.distanceToTile2d(i.x,i.y,T,b),A=u;n&&(A=(r.calculateTileZoom||jj)(e.zoom+Tc(e.tileSize/r.tileSize),S,y,_,e.fov)),A=(r.roundZoom?Math.round:Math.floor)(A),A=Math.max(0,A);let F=Math.min(A,f);if(M.wrap=l.getWrap(o,T,M.wrap),M.zoom>=F){if(M.zoom>1),z=M.zoom+1;x.push({zoom:z,x:R,y:P,wrap:M.wrap,fullyVisible:k})}}return E.sort((M,C)=>M.distanceSq-C.distanceSq).map(M=>M.tileID)}function g8(e){return e==="raster"||e==="image"||e==="video"}function x1e(e,r,t,a,i,o,s){let l=is(),n=Dce(r);for(let u of r){let c=e.getTileById(u.key);(c.fadingDirection===0||c.fadeOpacity===0)&&c.resetFadeLogic(),!b1e(e,c,t,l,a,i,s)&&(w1e(e,c,t,l,o,s)||A1e(c,n,l,s)||c.resetFadeLogic())}}function b1e(e,r,t,a,i,o,s){if(!r.hasData())return!1;let{tileID:l,fadingRole:n,fadingDirection:u,fadingParentID:c}=r;if(n===0&&u===1&&c)return t[c.key]=c,!0;let f=Math.max(l.overscaledZ-i,o);for(let h=l.overscaledZ-1;h>=f;h--){let d=l.scaledTo(h),p=e.getLoadedTile(d);if(p)return r.setCrossFadeLogic({fadingRole:0,fadingDirection:1,fadingParentID:p.tileID,fadeEndTime:a+s}),p.setCrossFadeLogic({fadingRole:1,fadingDirection:0,fadeEndTime:a+s}),t[d.key]=d,!0}return!1}function w1e(e,r,t,a,i,o){if(!r.hasData())return!1;let s=r.tileID.children(i),l=y8(e,r,s,t,a,i,o);if(l)return!0;for(let n of s)y8(e,r,n.children(i),t,a,i,o)&&(l=!0);return l}function y8(e,r,t,a,i,o,s){if(t[0].overscaledZ>=o)return!1;let l=!1;for(let n of t){let u=e.getLoadedTile(n);if(!u)continue;let{fadingRole:c,fadingDirection:f,fadingParentID:h}=u;(c!==0||f!==0||!h)&&(u.setCrossFadeLogic({fadingRole:0,fadingDirection:0,fadingParentID:r.tileID,fadeEndTime:i+s}),r.setCrossFadeLogic({fadingRole:1,fadingDirection:1,fadeEndTime:i+s})),a[n.key]=n,l=!0}return l}function A1e(e,r,t,a){let i=e.tileID;if(e.selfFading)return!0;if(e.hasData())return!1;if(r.has(i)){let o=t+a;return e.setSelfFadeLogic(o),!0}return!1}function T1e(e,r){if(r<=0)return!1;let t=is();for(let a of e.getAllTiles())if(a.fadeEndTime>=t)return!0;return!1}function M1e(e,r){var t,a,i;let o=r.getRenderableIds();for(let s of o){if(!((t=e.neighboringTiles)!=null&&t[s]))continue;let l=r.getTileById(s);e.neighboringTiles[s].backfilled||_8(e,l),!((i=(a=l.neighboringTiles)==null?void 0:a[e.tileID.key])!=null&&i.backfilled)&&_8(l,e)}}function _8(e,r){var t;e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0;let a=r.tileID.canonical.x-e.tileID.canonical.x,i=r.tileID.canonical.y-e.tileID.canonical.y,o=2**e.tileID.canonical.z,s=r.tileID.key;(a!==0||i!==0)&&(Math.abs(i)>1||(Math.abs(a)>1&&(Math.abs(a+o)===1?a+=o:Math.abs(a-o)===1&&(a-=o)),r.dem&&e.dem&&(e.dem.backfillBorder(r.dem,a,i),(t=e.neighboringTiles)!=null&&t[s]&&(e.neighboringTiles[s].backfilled=!0))))}function y3(e,r,t,a,i){return i?e?e(r,t)+a:a===0?void 0:a:a}function _3(e,r){let t=!0;return e==="always"||(e==="never"||r==="never")&&(t=!1),t}function E1e(e,r){let t=1/(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),a=1/(r[8]*r[8]+r[9]*r[9]+r[10]*r[10]),i=r[0]*t,o=r[4]*t,s=r[8]*a,l=r[1]*t,n=r[5]*t,u=r[9]*a,c=r[2]*t,f=r[6]*t,h=r[10]*a;e[0]=i,e[1]=o,e[2]=s,e[4]=l,e[5]=n,e[6]=u,e[8]=c,e[9]=f,e[10]=h;let d=r[12],p=r[13],g=r[14];return e[12]=-i*d-l*p-c*g,e[13]=-o*d-n*p-f*g,e[14]=-s*d-u*p-h*g,e[3]=0,e[7]=0,e[11]=0,e[15]=1,e}function S1e(e,r){return e[0]=1/r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1/r[5],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=0,e[11]=1/r[14],e[12]=0,e[13]=0,e[14]=-1,e[15]=r[10]/r[14],e}function k1e(e,r){let t=1/(r[0]*r[5]-r[1]*r[4]);return e[0]=r[5]*t,e[1]=-r[1]*t,e[2]=0,e[3]=0,e[4]=-r[4]*t,e[5]=r[0]*t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1/r[10],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1/r[15],e}function Hk(e,r,t){let a=w0();if(!e){let{vecSouth:i,vecEast:o}=Wk(r),s=XN();s[0]=o[0],s[1]=o[1],s[2]=i[0],s[3]=i[1],_me(s,s),a[0]=s[0],a[1]=s[1],a[4]=s[2],a[5]=s[3]}return wc(a,a,[1/t,1/t,1]),a}function C1e(e,r,t,a){if(e){let i=w0();if(!r){let{vecSouth:o,vecEast:s}=Wk(t);i[0]=s[0],i[1]=s[1],i[4]=o[0],i[5]=o[1]}return wc(i,i,[a,a,1]),i}return t.pixelsToClipSpaceMatrix}function Wk(e){let r=Math.cos(e.rollInRadians),t=Math.sin(e.rollInRadians),a=Math.cos(e.pitchInRadians),i=Math.cos(e.bearingInRadians),o=Math.sin(e.bearingInRadians),s=UM();s[0]=-i*a*t-o*r,s[1]=-o*a*t+i*r;let l=zI(s);l<1e-9?BI(s):RI(s,s,1/l);let n=UM();n[0]=i*a*r-o*t,n[1]=o*a*r+i*t;let u=zI(n);return u<1e-9?BI(n):RI(n,n,1/u),{vecEast:n,vecSouth:s}}function cm(e,r,t){var a,i;return y3(e.getElevation,r,t,(a=e.heightOffset)!=null?a:0,(i=e.heightAnchorGround)!=null?i:!0)}function $k(e,r,t,a){let i;a==null?(i=[e,r,0,1],Zk(i,i,t)):(i=[e,r,a,1],Cu(i,i,t));let o=i[3];return{point:new zr(i[0]/o,i[1]/o),signedDistanceFromCamera:o,isOccluded:!1}}function x8(e,r){return .5+e/r*.5}function D1e(e,r){return e.x>=-r[0]&&e.x<=r[0]&&e.y>=-r[1]&&e.y<=r[1]}function L1e(e,r,t,a,i,o,s,l,n,u,c,f,h){let d=t?e.textSizeData:e.iconSizeData,p=I2(d,r.transform.zoom),g=[256/r.width*2+1,256/r.height*2+1],m=t?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;m.clear();let y=e.lineVertexArray,_=t?e.text.placedSymbolArray:e.icon.placedSymbolArray,v=r.transform.width/r.transform.height,x=!1;for(let E=0;E<_.length;E++){let M=_.get(E);if(M.hidden||M.writingMode===2&&!x){$1(M.numGlyphs,m);continue}x=!1;let C=new zr(M.anchorX,M.anchorY),w={getElevation:h,pitchedLabelPlaneMatrix:a,lineVertexArray:y,pitchWithMap:o,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:r.transform,tileAnchorPoint:C,unwrappedTileID:n,width:u,height:c,translation:f},k=M8(M.anchorX,M.anchorY,w);if(!D1e(k.point,g)){$1(M.numGlyphs,m);continue}let T=k.signedDistanceFromCamera,b=x8(r.transform.cameraToCenterDistance,T),S=qE(d,p,M),A=o?S*r.transform.getPitchedTextCorrection(M.anchorX,M.anchorY,n)/b:S*b,F=A8({projectionContext:w,pitchedLabelPlaneMatrixInverse:i,symbol:M,fontSize:A,flip:!1,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:m,aspectRatio:v,rotateToLine:l});x=F.useVertical,(F.notEnoughRoom||x||F.needsFlipping&&A8({projectionContext:w,pitchedLabelPlaneMatrixInverse:i,symbol:M,fontSize:A,flip:!0,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:m,aspectRatio:v,rotateToLine:l}).notEnoughRoom)&&$1(M.numGlyphs,m)}t?e.text.dynamicLayoutVertexBuffer.updateData(m):e.icon.dynamicLayoutVertexBuffer.updateData(m)}function b8(e,r,t,a,i,o,s,l){let n=o.glyphStartIndex+o.numGlyphs,u=o.lineStartIndex,c=o.lineStartIndex+o.lineLength,f=r.getoffsetX(o.glyphStartIndex),h=r.getoffsetX(n-1),d=b3(e*f,t,a,i,o.segment,u,c,l,s);if(!d)return null;let p=b3(e*h,t,a,i,o.segment,u,c,l,s);return!p||l.projectionCache.anyProjectionOccluded?null:{first:d,last:p}}function w8(e,r,t,a){return e===1&&Math.abs(t.y-r.y)>Math.abs(t.x-r.x)*a?{useVertical:!0}:(e===2?r.yt.x)?{needsFlipping:!0}:null}function A8(e){let{projectionContext:r,pitchedLabelPlaneMatrixInverse:t,symbol:a,fontSize:i,flip:o,keepUpright:s,glyphOffsetArray:l,dynamicLayoutVertexArray:n,aspectRatio:u,rotateToLine:c}=e,f=i/24,h=a.lineOffsetX*f,d=a.lineOffsetY*f,p;if(a.numGlyphs>1){let g=a.glyphStartIndex+a.numGlyphs,m=a.lineStartIndex,y=a.lineStartIndex+a.lineLength,_=b8(f,l,h,d,o,a,c,r);if(!_)return{notEnoughRoom:!0};let v=x3(_.first.point.x,_.first.point.y,r,t),x=x3(_.last.point.x,_.last.point.y,r,t);if(s&&!o){let E=w8(a.writingMode,v,x,u);if(E)return E}p=[_.first];for(let E=a.glyphStartIndex+1;E0?v.point:T8(r.tileAnchorPoint,_,m,1,r),E=x3(m.x,m.y,r,t),M=x3(x.x,x.y,r,t),C=w8(a.writingMode,E,M,u);if(C)return C}let g=b3(f*l.getoffsetX(a.glyphStartIndex),h,d,o,a.segment,a.lineStartIndex,a.lineStartIndex+a.lineLength,r,c);if(!g||r.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};p=[g]}for(let g of p)j2(n,g.point,g.angle);return{}}function T8(e,r,t,a,i){let o=e.add(e.sub(r)._unit()),s=fm(o.x,o.y,i).point,l=t.sub(s);return t.add(l._mult(a/l.mag()))}function Yk(e,r,t){let a=r.projectionCache;if(a.projections[e])return a.projections[e];let i=new zr(r.lineVertexArray.getx(e),r.lineVertexArray.gety(e)),o=fm(i.x,i.y,r);if(o.signedDistanceFromCamera>0)return a.projections[e]=o.point,a.anyProjectionOccluded||(a.anyProjectionOccluded=o.isOccluded),o.point;let s=e-t.direction,l=t.distanceFromAnchor===0?r.tileAnchorPoint:new zr(r.lineVertexArray.getx(s),r.lineVertexArray.gety(s)),n=t.absOffsetX-t.distanceFromAnchor+1;return T8(l,i,t.previousVertex,n,r)}function fm(e,r,t){let a=e+t.translation[0],i=r+t.translation[1],o;return t.pitchWithMap?(o=$k(a,i,t.pitchedLabelPlaneMatrix,cm(t,a,i)),o.isOccluded=!1):(o=t.transform.projectTileCoordinates(a,i,t.unwrappedTileID,cm(t,a,i)),o.point.x=(o.point.x*.5+.5)*t.width,o.point.y=(-o.point.y*.5+.5)*t.height),o}function x3(e,r,t,a){if(t.pitchWithMap){let i=[e,r,0,1];Cu(i,i,a);let o=i[0]/i[3],s=i[1]/i[3];return t.transform.projectTileCoordinates(o,s,t.unwrappedTileID,cm(t,o,s)).point}return{x:e/t.width*2-1,y:1-r/t.height*2}}function M8(e,r,t){return t.transform.projectTileCoordinates(e,r,t.unwrappedTileID,cm(t,e,r))}function Xk(e,r,t){return e._unit()._perp()._mult(r*t)}function F1e(e,r,t,a,i,o,s,l,n){if(l.projectionCache.offsets[e])return l.projectionCache.offsets[e];let u=t.add(r);if(e+n.direction=i)return l.projectionCache.offsets[e]=u,u;let c=Yk(e+n.direction,l,n),f=Xk(c.sub(t),s,n.direction),h=t.add(f),d=c.add(f);return l.projectionCache.offsets[e]=Ice(o,u,h,d)||u,l.projectionCache.offsets[e]}function b3(e,r,t,a,i,o,s,l,n){let u=a?e-r:e+r,c=u>0?1:-1,f=0;a&&(c*=-1,f=Math.PI),c<0&&(f+=Math.PI);let h=c>0?o+i:o+i+1,d;l.projectionCache.cachedAnchorPoint?d=l.projectionCache.cachedAnchorPoint:(d=fm(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l).point,l.projectionCache.cachedAnchorPoint=d);let p=d,g=d,m,y,_=0,v=0,x=Math.abs(u),E=[],M;for(;_+v<=x;){if(h+=c,h=s)return null;_+=v,g=p,y=m;let T={absOffsetX:x,direction:c,distanceFromAnchor:_,previousVertex:g};if(p=Yk(h,l,T),t===0)E.push(g),M=p.sub(g);else{let b,S=p.sub(g);b=S.mag()===0?Xk(Yk(h+c,l,T).sub(p),t,c):Xk(S,t,c),y||(y=g.add(b)),m=F1e(h,b,p,o,s,y,t,l,T),E.push(y),M=m.sub(y)}v=M.mag()}let C=(x-_)/v,w=M._mult(C)._add(y||g),k=f+Math.atan2(p.y-g.y,p.x-g.x);return E.push(w),{point:w,angle:n?k:0,path:E}}function $1(e,r){for(let t=0;t{let i=$k(a.x,a.y,t,cm(r,a.x,a.y)),o=r.transform.projectTileCoordinates(i.point.x,i.point.y,r.unwrappedTileID,cm(r,i.point.x,i.point.y));return o.point.x=(o.point.x*.5+.5)*r.width,o.point.y=(-o.point.y*.5+.5)*r.height,o})}function I1e(e){let r=0,t=0,a=0,i=0;for(let o=0;ot&&(t=i,r=a));return e.slice(r,r+t)}function E8(e,r,t,a,i){let{horizontalAlign:o,verticalAlign:s}=F2(e),l=-(o-.5)*r,n=-(s-.5)*t;return new zr(l+a[0]*i,n+a[1]*i)}function S8(e,r,t,a,i,o){(!a||a.length===0)&&(a=[0,0,0,0]);let s=a[0]-100,l=a[1]-100,n=a[2]-100,u=a[3]-100;e.emplaceBack(+!!r,+!!t,i||0,o||0,s,l),e.emplaceBack(+!!r,+!!t,i||0,o||0,n,l),e.emplaceBack(+!!r,+!!t,i||0,o||0,n,u),e.emplaceBack(+!!r,+!!t,i||0,o||0,s,u)}function k8(e){if(e.opacity===0&&!e.placed)return 0;if(e.opacity===1&&e.placed)return 4294967295;let r=+!!e.placed,t=Math.floor(e.opacity*127);return t*Yj+r*Xj+t*Zj+r*Kj+t*512+r*256+t*2+r}function Kk(e,r,t,a,i,o){if(i-a<=t)return;let s=a+i>>1;C8(e,r,s,a,i,o),Kk(e,r,t,a,s-1,1-o),Kk(e,r,t,s+1,i,1-o)}function C8(e,r,t,a,i,o){for(;i>a;){if(i-a>600){let u=i-a+1,c=t-a+1,f=Math.log(u),h=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*h*(u-h)/u)*(c-u/2<0?-1:1);C8(e,r,t,Math.max(a,Math.floor(t-c*h/u+d)),Math.min(i,Math.floor(t+(u-c)*h/u+d)),o)}let s=r[2*t+o],l=a,n=i;for(W_(e,r,a,t),r[2*i+o]>s&&W_(e,r,a,i);ls;)n--}r[2*a+o]===s?W_(e,r,a,n):(n++,W_(e,r,n,i)),n<=t&&(a=n+1),t<=n&&(i=n-1)}}function W_(e,r,t,a){Jk(e,t,a),Jk(r,2*t,2*a),Jk(r,2*t+1,2*a+1)}function Jk(e,r,t){let a=e[r];e[r]=e[t],e[t]=a}function D8(e,r,t,a){let i=e-t,o=r-a;return i*i+o*o}function qo(e,r){let t=/#pragma maplibre: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,a=r.match(/in ([\w]+) ([\w]+)/g),i=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=r.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),s=o?o.concat(i):i,l=a?a.length:0,n={};return e=e.replace(t,(u,c,f,h,d)=>(n[d]=!0,c==="define"?` -#ifndef HAS_UNIFORM_u_${d} -in ${f} ${h} ${d}; -#else -uniform ${f} ${h} u_${d}; -#endif -`:` -#ifdef HAS_UNIFORM_u_${d} - ${f} ${h} ${d} = u_${d}; -#endif -`)),r=r.replace(t,(u,c,f,h,d)=>{let p=h==="float"?"vec2":"vec4",g=d.match(/color/)?"color":p;return n[d]?c==="define"?` -#ifndef HAS_UNIFORM_u_${d} -uniform lowp float u_${d}_t; -layout(location = ${l++}) in ${f} ${p} a_${d}; -out ${f} ${h} ${d}; -#else -uniform ${f} ${h} u_${d}; -#endif -`:g==="vec4"?` -#ifndef HAS_UNIFORM_u_${d} - ${d} = a_${d}; -#else - ${f} ${h} ${d} = u_${d}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${d} - ${d} = unpack_mix_${g}(a_${d}, u_${d}_t); -#else - ${f} ${h} ${d} = u_${d}; -#endif -`:c==="define"?` -#ifndef HAS_UNIFORM_u_${d} -uniform lowp float u_${d}_t; -layout(location = ${l++}) in ${f} ${p} a_${d}; -#else -uniform ${f} ${h} u_${d}; -#endif -`:g==="vec4"?` -#ifndef HAS_UNIFORM_u_${d} - ${f} ${h} ${d} = a_${d}; -#else - ${f} ${h} ${d} = u_${d}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${d} - ${f} ${h} ${d} = unpack_mix_${g}(a_${d}, u_${d}_t); -#else - ${f} ${h} ${d} = u_${d}; -#endif -`}),{fragmentSource:e,vertexSource:r,staticAttributes:a,staticUniforms:s}}function w3(e,r){if(!e.renderWorldCopies||e.lngRange)return;let t=r.lng-e.center.lng;r.lng+=t>180?-360:t<-180?360:0}function L8(e){return Math.max(0,Math.floor(e))}function Qk(e,r,t,a){if(a<0||a>=1)return NC;let i=Math.floor(t),o=t-i;for(let s of e.zooms){let l=1<i;o++){let s=(t+a)/2;r(e,s)?a=s:t=s}return{lo:t,hi:a}}function A3(e,r){return Qk(e.index,e.exaggeration,(e.near[0]+r*e.dx)/e.worldSize,(e.near[1]+r*e.dy)/e.worldSize)}function T3(e,r){return F8(A3(e,r),e.near[2]+r*e.dz)}function I8(){vo("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function R8(e){if(e.useSlerp)if(e.k<1){let r=VI(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),t=VI(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),a=new Float64Array(4);Zb(a,r,t,e.k);let i=jce(a);e.tr.setRoll(i.roll),e.tr.setPitch(i.pitch),e.tr.setBearing(i.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll(Xs.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch(Xs.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing(Xs.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function z8(e,r,t,a,i){let o=i.padding,s=fp(i.worldSize,t.getNorthWest()),l=fp(i.worldSize,t.getNorthEast()),n=fp(i.worldSize,t.getSouthEast()),u=fp(i.worldSize,t.getSouthWest()),c=il(-a),f=s.rotate(c),h=l.rotate(c),d=n.rotate(c),p=u.rotate(c),g=new zr(Math.max(f.x,h.x,p.x,d.x),Math.max(f.y,h.y,p.y,d.y)),m=new zr(Math.min(f.x,h.x,p.x,d.x),Math.min(f.y,h.y,p.y,d.y)),y=g.sub(m),_=i.width-(o.left+o.right+r.left+r.right),v=i.height-(o.top+o.bottom+r.top+r.bottom),x=_/y.x,E=v/y.y;if(E<0||x<0){I8();return}let M=Math.min(Tc(i.scale*Math.min(x,E)),e.maxZoom),C=zr.convert(e.offset),w=(r.left-r.right)/2,k=(r.top-r.bottom)/2,T=new zr(w,k).rotate(il(a)),b=C.add(T).mult(i.scale/bf(M));return{center:h_(i.worldSize,s.add(n).div(2).sub(b)),zoom:M,bearing:a}}function B8(e){let r=Y1(e.worldSize,e.center.lat);return 2*Math.PI*r}function R1e(e,r,t){let a=pu(r),i=pu(t),o=uu(a,i),s=Math.acos(o),l=B8(e);return s/(2*Math.PI)*l}function z1e(e,r){return[Vv(e*Math.PI*2+Math.PI,Math.PI*2),2*Math.atan(Math.exp(Math.PI-r*Math.PI*2))-Math.PI*.5]}function B1e(e,r){let t=Math.cos(r),a=new Float64Array(3);return a[0]=Math.sin(e)*t,a[1]=Math.sin(r),a[2]=Math.cos(e)*t,a}function V0(e,r,t,a,i){let o=1/(1<1e-6){let a=e[0]/t,i=e[2]/t,o=Math.acos(i),s=(a>0?o:-o)/Math.PI*180;return new ln(qh(s,-180,180),r)}return new ln(0,r)}function O1e(e,r){return jM(T0(),-e.lng,-e.lat,r)}function N1e(e){let r=e[0],t=e[1],a=e[2],i=e[3];return{lng:-Math.atan2(2*(i*r+t*a),1-2*(r*r+t*t))*180/Math.PI,lat:-Math.asin(Gn(2*(i*t-a*r),-1,1))*180/Math.PI,bearing:Math.atan2(2*(i*a+r*t),1-2*(t*t+a*a))*180/Math.PI}}function N8(e,r){let t=e.cameraPosition,a=Yp(t);if(a<=1)return e.screenPointToLocation(r);let i=as();xf(i,t);let o=e.getRayDirectionFromPixel(r),s=-uu(o,i),l=as();Xb(l,o,i,s);let n=Yp(l);if(n<1e-9)return e.screenPointToLocation(r);let u=Math.atan2(n,s),c=Math.asin(1/a)*.9;if(u=0?90:-90,l=e.locationToScreenPoint(new ln(0,s)),n=r.x-l.x,u=r.y-l.y,c=n*n+u*u,f=Gn(1-(zd-Math.abs(o))/12,0,1),h=f*f*(3-2*f),d=Vv(a-i+180,360)-180,p=0;if(h>0&&t){let g=(n*t.y-u*t.x)/Math.max(c,400);p=(s>0?1:-1)*g*180/Math.PI}return i+(1-h)*d+h*p}function q1e(e){let r=as();return r[0]=e[0]*-e[3],r[1]=e[1]*-e[3],r[2]=e[2]*-e[3],{center:r,radius:Math.sqrt(1-e[3]*e[3])}}function V1e(e,r,t){let a=as();hp(a,t,e);let i=as();return Xb(i,e,a,r/y_(a)),i}function M3(e){return Math.cos(e*Math.PI/180)}function Zu(e,r){let t=M3(e),a=M3(r);return Tc(a/t)}function G1e(e,r){return 360/B8({worldSize:e,center:{lat:r}})}function H1e(e,r){let t=e.rotate(r.bearingInRadians),a=r.zoom+Zu(r.center.lat,0),i=i1(1/M3(r.center.lat),1/M3(Math.min(Math.abs(r.center.lat),60)),e2(a,7,3,0,1)),o=G1e(r.worldSize,r.center.lat);return new ln(r.center.lng-t.x*o*i,Gn(r.center.lat+t.y*o,-zd,zd))}function eC(e){let r=.5*e,t=Math.sin(r),a=Math.cos(r);return Math.log(t+a)-Math.log(a-t)}function j8(e,r,t,a){let i=e.lat+t*a;if(Math.abs(t)>1){let o=e.lat+t,s=(Math.sign(o)===Math.sign(e.lat)?Math.abs(e.lat):-Math.abs(e.lat))*Math.PI/180,l=Math.abs(e.lat+t)*Math.PI/180,n=eC(s+a*(l-s)),u=eC(s),c=eC(l),f=(n-u)/(c-u),h=e.lng+r*f;return new ln(h,i)}{let o=e.lng+r*a;return new ln(o,i)}}function E3(e,r,t=1){let a=uu(e,r),i=t*t,o=as(),s=as();Ws(s,r,a),hp(o,e,s);let l=i-uu(o,o);if(l<0)return null;let n=uu(e,e)-i,u=-a+(a<0?1:-1)*Math.sqrt(l),c=n/u,f=u;return{tMin:Math.min(c,f),tMax:Math.max(c,f)}}function S3(e,r,t){let a=e-r;return a<0?-a:Math.max(0,a-t)}function tC(e,r,t,a,i){let o=e-t,s;return s=o<0?Math.min(-o,1+o-i):o>i?Math.min(Math.max(o-i,0),1-o):0,Math.max(s,S3(r,a,i))}function U8(e,r){let t=1/0,a=-1/0;for(let i of r){let o=uu(e,i);t=Math.min(t,o),a=Math.max(a,o)}return{min:t,max:a}}function q8(e,r){let t=as();Xb(t,e.origin,e.direction,r);let a=Yp(t),i=as();Ws(i,t,1/a);let o=$_(i),s=$o.fromLngLat(o),l=new $o(s.x,Gn(s.y,0,.999999999)),n=Qk(e.index,e.exaggeration,l.x,l.y),u=Math.abs(o.lat)>85.051129?0:n.elevation;return{sample:Ci(ja({},n),{elevation:u}),radius:a,mercator:l}}function V8(e,r){let{sample:t,radius:a}=q8(e,r);return F8(t,(a-1)*Vc)}function W1e(e,r,t){let a={constrainOverride:r};if(Array.isArray(e)){let i=new UC({type:e},t);return{projection:i,transform:new GC(a),cameraHelper:new WC(i)}}switch(e){case"mercator":return{projection:new W3,transform:new rx(a),cameraHelper:new ax};case"globe":{let i=new UC({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]},{});return{projection:i,transform:new GC(a),cameraHelper:new WC(i)}}case"vertical-perspective":return{projection:new jC,transform:new VC(a),cameraHelper:new HC};default:return vo(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new W3,transform:new rx(a),cameraHelper:new ax}}}function $1e(e,r){for(let[t,a]of Object.entries(ix)){let i=e.getUniformBlockIndex(r,t);i!==e.INVALID_INDEX&&e.uniformBlockBinding(r,i,a)}}function rC(e){let r={},t=0;for(let{name:a,type:i}of e){let[o,s]=kU[i];t=Math.ceil(t/s)*s,r[a]=t,t+=o}return{offsets:r,contentWords:t,sizeWords:Math.ceil(t/4)*4}}function Y1e(e){return new Q3(e,ix.ProjectionUBO,$C)}function X1e(e,r){let t=e.pending;t.set(r.mainMatrix,pm.u_projection_matrix),t.set(r.fallbackMatrix,pm.u_projection_fallback_matrix),t.set(r.tileMercatorCoords,pm.u_projection_tile_mercator_coords),t.set(r.clippingPlane,pm.u_projection_clipping_plane),t[pm.u_projection_transition]=r.projectionTransition,e.pendingWords[pm.u_projection_clip_antimeridian]=+!!r.clipAntimeridian,e.upload()}function Z1e(e){return new Q3(e,ix.TerrainUBO,YC)}function K1e(e,r){let t=e.pending;t.set(r.u_terrain_matrix,nx.u_terrain_matrix),t.set(r.u_terrain_unpack,nx.u_terrain_unpack),t[nx.u_terrain_dim]=r.u_terrain_dim,t[nx.u_terrain_exaggeration]=r.u_terrain_exaggeration,e.upload()}function aC(e){let r=[];for(let t of e){if(t===null)continue;let a=t.split(" ");r.push(a.pop())}return r}function J1e(e,r){let t=new Set([e.INT,e.INT_VEC2,e.INT_VEC3,e.INT_VEC4,e.UNSIGNED_INT,e.UNSIGNED_INT_VEC2,e.UNSIGNED_INT_VEC3,e.UNSIGNED_INT_VEC4]),a=new Set,i=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES);for(let o=0;o>16,l>>16],u_pixel_coord_lower:[s&65535,l&65535]}}function Q1e(e,r,t,a){let i=t.patternAtlas.getPattern(e.from.toString()),o=t.patternAtlas.getPattern(e.to.toString()),{width:s,height:l}=t.patternAtlas.getPixelSize(),n=2**a.tileID.overscaledZ,u=a.tileSize*2**t.transform.tileZoom/n,c=u*(a.tileID.canonical.x+a.tileID.wrap*n),f=u*a.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:r.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:r.fromScale,u_scale_b:r.toScale,u_tile_units_to_pixels:1/uh(a,1,t.transform.tileZoom),u_pixel_coord_upper:[c>>16,f>>16],u_pixel_coord_lower:[c&65535,f&65535]}}function ege(e,r){let t=2**r.canonical.z,a=r.canonical.y;return[new $o(0,a/t).toLngLat().lat,new $o(0,(a+1)/t).toLngLat().lat]}function iC(e,r){return 1/uh(e,1,r.tileZoom)}function H8(e,r,t){return M0(e.transform,r,t.paint.get("line-translate"),t.paint.get("line-translate-anchor"))}function tge(e){return new Q3(e,ix.FrameUBO,a7)}function rge(e,r){let t=e.pending,{transform:a}=r,i=r.context.gl;t[Gf.u_units_to_pixels]=1/a.pixelsToGLUnits[0],t[Gf.u_units_to_pixels+1]=1/a.pixelsToGLUnits[1],t[Gf.u_world_size]=i.drawingBufferWidth,t[Gf.u_world_size+1]=i.drawingBufferHeight,t[Gf.u_camera_to_center_distance]=a.cameraToCenterDistance,t[Gf.u_symbol_fade_change]=r.options.fadeDuration?r.symbolFadeChange:1,t[Gf.u_aspect_ratio]=a.width/a.height,t[Gf.u_device_pixel_ratio]=r.pixelRatio,t[Gf.u_viewport_size]=a.width,t[Gf.u_viewport_size+1]=a.height,t[Gf.u_pixel_extrude_scale]=1/a.width,t[Gf.u_pixel_extrude_scale+1]=1/a.height,t[Gf.u_pitch]=a.pitch/360*2*Math.PI,e.upload()}function W8(e,r,t,a,i){var o,s;let l=e.context,n=e.transform,u=l.gl,c=e.useProgram("collisionBox"),f=[],h=0,d=0;for(let v of a){let x=r.getTile(v).getBucket(t);if(!x)continue;let E=i?x.textCollisionBox:x.iconCollisionBox,M=x.collisionCircleArray;M.length>0&&(f.push({circleArray:M,circleOffset:d,coord:v}),h+=M.length/4,d=h),E&&c.draw(l,u.LINES,Ao.disabled,Yo.disabled,e.colorModeForRenderPass(),Ho.disabled,null,(o=e.style.map.terrain)==null?void 0:o.getTerrainData(v),n.getProjectionData({overscaledTileID:v,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),t.id,E.layoutVertexBuffer,E.indexBuffer,E.segments,null,e.transform.zoom,null,null,E.collisionVertexBuffer)}if(!i||!f.length)return;let p=e.useProgram("collisionCircle"),g=new NB;g.resize(h*4),g._trim();let m=0;for(let v of f)for(let x=0;xf.getElevation(p,w,k):void 0;lge(m,h,d,n,c,x,M,_,E,M0(c,g,s,l),p.toUnwrapped(),C,t.layout.get("symbol-height-anchor")==="ground")}}}function sge(e,r,t,a,i,o){let s=r.tileAnchorPoint.add(new zr(r.translation[0],r.translation[1]));if(r.pitchWithMap){let l=a.mult(o);t||(l=l.rotate(-i));let n=s.add(l);return $k(n.x,n.y,r.pitchedLabelPlaneMatrix,cm(r,n.x,n.y)).point}if(t){let l=fm(r.tileAnchorPoint.x+1,r.tileAnchorPoint.y,r).point.sub(e),n=Math.atan(l.y/l.x)+(l.x<0?Math.PI:0);return e.add(a.rotate(n))}return e.add(a)}function lge(e,r,t,a,i,o,s,l,n,u,c,f,h){let d=e.text.placedSymbolArray,p=e.text.dynamicLayoutVertexArray,g=e.icon.dynamicLayoutVertexArray,m={};p.clear();for(let y=0;y=0&&(m[_.associatedIconIndex]={shiftedAnchor:P,angle:z})}}if(n){g.clear();let y=e.icon.placedSymbolArray;for(let _=0;_e.style.map.terrain.getElevation(F,ie,ee):void 0;L1e(R,e,i,V,oe,v,u,t.layout.get("text-rotation-alignment")==="map",F.toUnwrapped(),y.width,y.height,q,te)}let ue=i&&k||re,fe=v?V:e.transform.clipSpaceToPixelsMatrix,pe=x||ue?nV:fe,we=I&&t.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(1)!==0,xe;xe=I?R.iconsInText?fq(L.kind,G,E,v,x,ue,e,pe,j,q,X,Z,b,se,le):t7(L.kind,G,E,v,x,ue,e,pe,j,q,i,X,we,b,se,le):e7(L.kind,G,E,v,x,ue,e,pe,j,q,i,X,b,se,le);let he={program:O,buffers:P,uniformValues:xe,projectionData:Y,atlasTexture:J,atlasTextureIcon:H,atlasInterpolation:N,atlasInterpolationIcon:W,isSDF:I,hasHalo:we};if(M&&R.canOverlap){C=!0;let oe=P.segments.get();for(let te of oe)T.push({segments:new Zs([te]),sortKey:te.sortKey,state:he,terrainData:$})}else T.push({segments:P.segments,sortKey:0,state:he,terrainData:$})}C&&T.sort((F,D)=>F.sortKey-D.sortKey);let S=(p=t.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(null))!=null?p:1/0,A=t.layout.get("text-letter-spacing").constantOr(0)*24<0||S>1;for(let F of T){let D=F.state;g.activeTexture.set(m.TEXTURE0),D.atlasTexture.bind(D.atlasInterpolation,m.CLAMP_TO_EDGE),D.atlasTextureIcon&&(g.activeTexture.set(m.TEXTURE1),D.atlasTextureIcon&&D.atlasTextureIcon.bind(D.atlasInterpolationIcon,m.CLAMP_TO_EDGE));let R=D.isSDF&&D.hasHalo;if(R){let P=D.uniformValues;P.u_is_halo=1,A&&(P.u_is_plain=0,Y8(D.buffers,F.segments,t,e,D.program,w,c,f,P,D.projectionData,F.terrainData),P.u_is_halo=0,P.u_is_plain=1)}Y8(D.buffers,F.segments,t,e,D.program,w,c,f,D.uniformValues,D.projectionData,F.terrainData),R&&!A&&(D.uniformValues.u_is_halo=0)}}function Y8(e,r,t,a,i,o,s,l,n,u,c){let f=a.context,h=f.gl;i.draw(f,h.TRIANGLES,o,s,l,Ho.backCCW,n,c,u,t.id,e.layoutVertexBuffer,e.indexBuffer,r,t.paint,a.transform.zoom,e.programConfigurations.get(t.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function cge(e,r,t,a,i){var o;if(i.currentPass!=="translucent")return;let{isRenderingToTexture:s}=i,l=t.paint.get("circle-opacity"),n=t.paint.get("circle-stroke-width"),u=t.paint.get("circle-stroke-opacity"),c=!t.layout.get("circle-sort-key").isConstant();if(l.constantOr(1)===0&&(n.constantOr(1)===0||u.constantOr(1)===0))return;let f=e.context,h=f.gl,d=e.transform,p=e.getDepthModeForSublayer(0,Ao.ReadOnly),g=Yo.disabled,m=e.colorModeForRenderPass(),y=[],_=d.getCircleRadiusCorrection();for(let v of a){let x=r.getTile(v),E=x.getBucket(t);if(!E)continue;let M=t.paint.get("circle-translate"),C=t.paint.get("circle-translate-anchor"),w=M0(d,x,M,C),k=E.programConfigurations.get(t.id),T=e.useProgram("circle",k),b=E.layoutVertexBuffer,S=E.indexBuffer,A=(o=e.style.map.terrain)==null?void 0:o.getTerrainData(v),F={programConfiguration:k,program:T,layoutVertexBuffer:b,indexBuffer:S,uniformValues:UU(e,x,t,w,_),terrainData:A,projectionData:d.getProjectionData({overscaledTileID:v,applyGlobeMatrix:!s,applyTerrainMatrix:!0})};if(c){let D=E.segments.get();for(let R of D)y.push({segments:new Zs([R]),sortKey:R.sortKey,state:F})}else y.push({segments:E.segments,sortKey:0,state:F})}c&&y.sort((v,x)=>v.sortKey-x.sortKey);for(let v of y){let{programConfiguration:x,program:E,layoutVertexBuffer:M,indexBuffer:C,uniformValues:w,terrainData:k,projectionData:T}=v.state,b=v.segments;E.draw(f,h.TRIANGLES,p,g,m,Ho.backCCW,w,k,T,t.id,M,C,b,t.paint,e.transform.zoom,x)}}function fge(e,r,t,a,i){if(t.paint.get("heatmap-opacity")===0)return;let o=e.context,{isRenderingToTexture:s,isRenderingGlobe:l}=i;if(e.style.map.terrain){for(let n of a){let u=r.getTile(n);r.hasRenderableParent(n)||(i.currentPass==="offscreen"?pge(e,u,t,n,l):i.currentPass==="translucent"&&vge(e,t,n,s,l))}o.viewport.set([0,0,e.width,e.height])}else i.currentPass==="offscreen"?hge(e,r,t,a):i.currentPass==="translucent"&&dge(e,t)}function hge(e,r,t,a){let i=e.context,o=i.gl,s=e.transform,l=Yo.disabled,n=new vl([o.ONE,o.ONE],Hn.transparent,[!0,!0,!0,!0]);mge(i,e,t),i.clear({color:Hn.transparent});for(let u of a){if(r.hasRenderableParent(u))continue;let c=r.getTile(u),f=c.getBucket(t);if(!f)continue;let h=f.programConfigurations.get(t.id),d=e.useProgram("heatmap",h),p=s.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),g=s.getCircleRadiusCorrection();d.draw(i,o.TRIANGLES,Ao.disabled,l,n,Ho.backCCW,JC(c,s.zoom,t.paint.get("heatmap-intensity"),g),null,p,t.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,t.paint,s.zoom,h)}i.viewport.set([0,0,e.width,e.height])}function dge(e,r){let t=e.context,a=t.gl;t.setColorMode(e.colorModeForRenderPass());let i=r.heatmapFbos.get(R_);i&&(t.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,i.colorAttachment.get()),t.activeTexture.set(a.TEXTURE1),Z8(t,r).bind(a.LINEAR,a.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(t,a.TRIANGLES,Ao.disabled,Yo.disabled,e.colorModeForRenderPass(),Ho.disabled,QC(e,r,0,1),null,null,r.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,r.paint,e.transform.zoom))}function pge(e,r,t,a,i){let o=e.context,s=o.gl,l=Yo.disabled,n=new vl([s.ONE,s.ONE],Hn.transparent,[!0,!0,!0,!0]),u=r.getBucket(t);if(!u)return;let c=a.key,f=t.heatmapFbos.get(c);f||(f=X8(o,r.tileSize,r.tileSize),t.heatmapFbos.set(c,f)),o.bindFramebuffer.set(f.framebuffer),o.viewport.set([0,0,r.tileSize,r.tileSize]),o.clear({color:Hn.transparent});let h=u.programConfigurations.get(t.id),d=e.useProgram("heatmap",h,!i),p=e.transform.getProjectionData({overscaledTileID:r.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),g=e.style.map.terrain.getTerrainData(a);d.draw(o,s.TRIANGLES,Ao.disabled,l,n,Ho.disabled,JC(r,e.transform.zoom,t.paint.get("heatmap-intensity"),1),g,p,t.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,t.paint,e.transform.zoom,h)}function vge(e,r,t,a,i){let o=e.context,s=o.gl,l=e.transform;o.setColorMode(e.colorModeForRenderPass());let n=Z8(o,r),u=t.key,c=r.heatmapFbos.get(u);if(!c)return;o.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,c.colorAttachment.get()),o.activeTexture.set(s.TEXTURE1),n.bind(s.LINEAR,s.CLAMP_TO_EDGE);let f=l.getProjectionData({overscaledTileID:t,applyTerrainMatrix:i,applyGlobeMatrix:!a});e.useProgram("heatmapTexture").draw(o,s.TRIANGLES,Ao.disabled,Yo.disabled,e.colorModeForRenderPass(),Ho.disabled,QC(e,r,0,1),null,f,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,r.paint,l.zoom),c.destroy(),r.heatmapFbos.delete(u)}function mge(e,r,t){let a=e.gl;e.activeTexture.set(a.TEXTURE1),e.viewport.set([0,0,r.width/4,r.height/4]);let i=t.heatmapFbos.get(R_);i?(a.bindTexture(a.TEXTURE_2D,i.colorAttachment.get()),e.bindFramebuffer.set(i.framebuffer)):(i=X8(e,r.width/4,r.height/4),t.heatmapFbos.set(R_,i))}function X8(e,r,t){let a=e.gl,i=a.createTexture();a.bindTexture(a.TEXTURE_2D,i),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texStorage2D(a.TEXTURE_2D,1,a.RGBA16F,r,t);let o=e.createFramebuffer(r,t,!1,!1);return o.colorAttachment.set(i),o}function Z8(e,r){return r.colorRampTexture||(r.colorRampTexture=new Kl(e,r.colorRamp,e.gl.RGBA)),r.colorRampTexture}function K8(e,r,t,a){let i=e.context,o=i.bindFramebuffer.get(),s=i.viewport.get(),[,,l,n]=s;return gge(e,l,n),i.viewport.set([0,0,l,n]),i.clear({color:Hn.transparent,depth:1,stencil:0}),e.currentStencilSource=void 0,e.renderTileClippingMasks(r,t,a),{compositeTarget:o,compositeViewport:s}}function gge(e,r,t){let a=e.context.gl;if(!e.layerOpacityFbo){let o=e.context.createFramebuffer(r,t,!0,!0),s=a.createTexture();a.bindTexture(a.TEXTURE_2D,s),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,r,t,0,a.RGBA,a.UNSIGNED_BYTE,null),o.colorAttachment.set(s),o.depthAttachment.set(e.context.createRenderbuffer(a.DEPTH_STENCIL,r,t)),e.layerOpacityFbo=o,e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);return}if(e.layerOpacityFbo.width===r&&e.layerOpacityFbo.height===t){e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);return}let i=e.layerOpacityFbo;a.bindTexture(a.TEXTURE_2D,i.colorAttachment.get()),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,r,t,0,a.RGBA,a.UNSIGNED_BYTE,null),e.context.bindRenderbuffer.set(i.depthAttachment.get()),a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,r,t),e.context.bindRenderbuffer.set(null),i.width=r,i.height=t,e.context.bindFramebuffer.set(i.framebuffer)}function J8(e,r,t,a){let i=e.context,o=i.gl;i.bindFramebuffer.set(t.compositeTarget),i.viewport.set(t.compositeViewport),i.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,e.layerOpacityFbo.colorAttachment.get()),e.useProgram("layerOpacity").draw(i,o.TRIANGLES,Ao.disabled,Yo.disabled,e.colorModeForRenderPass(),Ho.disabled,sq(r,0),null,null,a.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,a.paint,e.transform.zoom),e.currentStencilSource=void 0}function Q8(e,r,t,a,i,o,s,l){let n=256;if(i.stepInterpolant){let u=r.getSource().maxzoom,c=s.canonical.z===u?Math.ceil(1<e.options.anisotropicFilterPitch&&p.texParameterf(p.TEXTURE_2D,d.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,d.extTextureFilterAnisotropicMax);let D=e.getTerrainDataForTile(w,c),R=m.getProjectionData({overscaledTileID:w,aligned:v,applyGlobeMatrix:!c,applyTerrainMatrix:!0}),P=Ij(A,S,F.fadeMix,t,l,n),z=f??y.getMeshFromTileID(d,w.canonical,o,s,"raster"),I=i?i[w.overscaledZ]:Yo.disabled;g.draw(d,p.TRIANGLES,k,I,_,u?Ho.frontCCW:Ho.backCCW,P,D,R,t.id,z.vertexBuffer,z.indexBuffer,z.segments)}}function Cge(e,r,t,a){let i={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(t===0||a)return i;if(e.fadingParentID){let o=r.getLoadedTile(e.fadingParentID);if(!o)return i;let s=2**(o.tileID.overscaledZ-e.tileID.overscaledZ);return{parentTile:o,parentScaleBy:s,parentTopLeft:[e.tileID.canonical.x*s%1,e.tileID.canonical.y*s%1],fadeValues:Dge(e,o,t)}}return e.selfFading?{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:Lge(e,t)}:i}function Dge(e,r,t){let a=is(),i=(a-e.timeAdded)/t,o=(a-r.timeAdded)/t,s=e.fadingDirection===1,l=Gn(i,0,1),n=Gn(1-o,0,1),u=s?l:n;return{tileOpacity:u,parentTileOpacity:s?n:l,fadeMix:{opacity:1,mix:1-u}}}function Lge(e,r){let t=(is()-e.timeAdded)/r,a=Gn(t,0,1);return{tileOpacity:a,fadeMix:{opacity:a,mix:0}}}function Fge(e,r,t,a,i){let o=t.paint.get("background-color"),s=t.paint.get("background-opacity");if(s===0)return;let{isRenderingToTexture:l}=i,n=e.context,u=n.gl,c=e.style.projection,f=e.transform,h=f.tileSize,d=t.paint.get("background-pattern");if(e.isPatternMissing(d))return;let p=!d&&o.a===1&&s===1&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(i.currentPass!==p)return;let g=Yo.disabled,m=e.getDepthModeForSublayer(0,p==="opaque"?Ao.ReadWrite:Ao.ReadOnly),y=e.colorModeForRenderPass(),_=e.useProgram(d?"backgroundPattern":"background"),v=a||W1(f,{tileSize:h,terrain:e.style.map.terrain});d&&(n.activeTexture.set(u.TEXTURE0),e.patternAtlas.bind(e.context));let x=t.getCrossfadeParameters();for(let E of v){let M=f.getProjectionData({overscaledTileID:E,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),C=d?vq(s,e,d,{tileID:E,tileSize:h},x):pq(s,o),w=e.getTerrainDataForTile(E,l),k=c.getMeshFromTileID(n,E.canonical,!1,!0,"raster");_.draw(n,u.TRIANGLES,m,g,y,Ho.backCCW,C,w,M,t.id,k.vertexBuffer,k.indexBuffer,k.segments)}}function Pge(e){let r=e.transform.padding;ij(e,e.transform.height-(r.top||0),3,oV),ij(e,r.bottom||0,3,sV),nj(e,r.left||0,3,lV),nj(e,e.transform.width-(r.right||0),3,uV);let t=e.transform.centerPoint;Ige(e,t.x,e.transform.height-t.y,cV)}function Ige(e,r,t,a){C3(e,r-1,t-10,2,20,a),C3(e,r-10,t-1,20,2,a)}function ij(e,r,t,a){C3(e,0,r+t/2,e.transform.width,t,a)}function nj(e,r,t,a){C3(e,r-t/2,0,t,e.transform.height,a)}function C3(e,r,t,a,i,o){let s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*e.pixelRatio,t*e.pixelRatio,a*e.pixelRatio,i*e.pixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function Rge(e,r,t){for(let a of t)zge(e,r,a)}function zge(e,r,t){var a,i;let o=e.context,s=o.gl,l=e.useProgram("debug"),n=Ao.disabled,u=Yo.disabled,c=e.colorModeForRenderPass(),f="$debug",h=(a=e.style.map.terrain)==null?void 0:a.getTerrainData(t);o.activeTexture.set(s.TEXTURE0);let d=((i=r.getTileByID(t.key).latestRawTileData)==null?void 0:i.byteLength)||0,p=Math.floor(d/1024),g=r.getTile(t).tileSize,m=512/Math.min(g,512)*(t.overscaledZ/e.transform.zoom)*.5,y=t.canonical.toString();t.overscaledZ!==t.canonical.z&&(y+=` => ${t.overscaledZ}`),Bge(e,`${y} ${p}kB`);let _=e.transform.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!0,applyTerrainMatrix:!0});l.draw(o,s.TRIANGLES,n,u,vl.alphaBlended,Ho.disabled,KC(Hn.transparent,m),null,_,f,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),l.draw(o,s.LINE_STRIP,n,u,c,Ho.disabled,KC(Hn.red),h,_,f,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}function Bge(e,r){e.initDebugOverlayCanvas();let t=e.debugOverlayCanvas,a=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,t.width,t.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(r,5,5),i.strokeText(r,5,5),e.debugOverlayTexture.update(t),e.debugOverlayTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE)}function Oge(e,r){let t=null,a=Object.values(e._layers).flatMap(l=>l.source&&!l.isHidden(r)?[e.tileManagers[l.source]]:[]),i=a.filter(l=>l.getSource().type==="vector"),o=a.filter(l=>l.getSource().type!=="vector"),s=l=>{(!t||t.getSource().maxzoom{var d;return n.getProjectionData({overscaledTileID:new Yu(h.tileID.canonical.z,(d=h.tileID.wrap)!=null?d:0,h.tileID.canonical.z,h.tileID.canonical.x,h.tileID.canonical.y),aligned:h.aligned,applyGlobeMatrix:h.applyGlobeMatrix,applyTerrainMatrix:h.applyTerrainMatrix})}},f=s.renderingMode?s.renderingMode:"2d";if(a.currentPass==="offscreen"){let h=s.prerender;h&&(e.setCustomLayerDefaults(),o.setColorMode(e.colorModeForRenderPass()),h.call(s,o.gl,c),o.setDirty(),e.setBaseState())}else if(a.currentPass==="translucent"){e.setCustomLayerDefaults(),o.setColorMode(e.colorModeForRenderPass()),o.setStencilMode(Yo.disabled);let h=f==="3d"?e.getDepthModeFor3D():e.getDepthModeForSublayer(0,Ao.ReadOnly);o.setDepthMode(h),s.render(o.gl,c),o.setDirty(),e.setBaseState(),o.bindFramebuffer.set(null)}}function jge(e,r){let t=e.context,a=t.gl,i=e.transform,o=vl.unblended,s=new Ao(a.LEQUAL,Ao.ReadWrite,[0,1]),l=r.tileManager.getRenderableTiles(),n=e.useProgram("terrainDepth");t.bindFramebuffer.set(r.getFramebuffer().framebuffer),t.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),t.clear({color:Hn.white,depth:1});for(let u of l){let c=r.getTerrainMesh(u.tileID),f=r.getTerrainData(u.tileID),h=i.getProjectionData({overscaledTileID:u.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),d=SU(r.getSkirtLength(i.zoom));n.draw(t,a.TRIANGLES,s,Yo.disabled,o,Ho.backCCW,d,f,h,"terrain",c.vertexBuffer,c.indexBuffer,c.segments)}t.bindFramebuffer.set(null),t.viewport.set([0,0,e.width,e.height])}function Uge(e,r,t,a){let{isRenderingGlobe:i}=a,o=e.context,s=o.gl,l=e.transform,n=e.colorModeForRenderPass(),u=e.getDepthModeFor3D(),c=e.useProgram("terrain");o.bindFramebuffer.set(null),o.viewport.set([0,0,e.width,e.height]);for(let f of t){let h=r.getTerrainMesh(f.tileID),d=e.renderToTexture.getTexture(f),p=r.getTerrainData(f.tileID);o.activeTexture.set(s.TEXTURE0),d.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_LINEAR);let g=r.getSkirtLength(l.zoom),m=l.calculateFogMatrix(f.tileID.toUnwrapped()),y=EU(g,m,e.style.sky,l.pitch,i),_=l.getProjectionData({overscaledTileID:f.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});c.draw(o,s.TRIANGLES,u,Yo.disabled,n,Ho.backCCW,y,p,_,"terrain",h.vertexBuffer,h.indexBuffer,h.segments)}}function oj(e,r){if(!r.mesh){let t=new Kp;t.emplaceBack(-1,-1),t.emplaceBack(1,-1),t.emplaceBack(1,1),t.emplaceBack(-1,1);let a=new Vd;a.emplaceBack(0,1,2),a.emplaceBack(0,2,3),r.mesh=new Z1(e.createVertexBuffer(t,G0.members),e.createIndexBuffer(a),Zs.simpleSegment(0,0,t.length,a.length))}return r.mesh}function qge(e,r){let t=e.context,a=t.gl,i=_q(r,e.transform,e.pixelRatio),o=new Ao(a.LEQUAL,Ao.ReadWrite,[0,1]),s=Yo.disabled,l=e.colorModeForRenderPass(),n=e.useProgram("sky"),u=oj(t,r);n.draw(t,a.TRIANGLES,o,s,l,Ho.disabled,i,null,void 0,"sky",u.vertexBuffer,u.indexBuffer,u.segments)}function Vge(e,r){let t=e.getCartesianPosition();pce(t,t);let a=Id(new Float64Array(16));return e.properties.get("anchor")==="map"&&(A0(a,a,r.rollInRadians),r1(a,a,-r.pitchInRadians),A0(a,a,r.bearingInRadians),r1(a,a,r.center.lat*Math.PI/180),CI(a,a,-r.center.lng*Math.PI/180)),vce(t,t,a),t}function Gge(e,r,t){let a=e.context,i=a.gl,o=e.useProgram("atmosphere"),s=new Ao(i.LEQUAL,Ao.ReadOnly,[0,1]),l=e.transform,n=Vge(t,e.transform),u=l.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),c=r.properties.get("atmosphere-blend")*u.projectionTransition;if(c===0)return;let f=Y1(l.worldSize,l.center.lat),h=O8(l),d=gq(n,c,h,f,l.inverseProjectionMatrix),p=oj(a,r);o.draw(a,i.TRIANGLES,s,Yo.disabled,vl.alphaBlended,Ho.disabled,d,null,null,"atmosphere",p.vertexBuffer,p.indexBuffer,p.segments)}function Hge(e,r,t){var a;let i=(a=r?.transitionState)!=null?a:0;return{currentPass:"offscreen",currentLayer:0,opaquePassCutoff:1/0,depthRangeFor3D:[0,1],isRenderingToTexture:!1,transform:e,terrain:t,projectionTransition:i,isRenderingGlobe:i>0}}function sj(e,r){let t=!1,a=null,i,o=()=>{a=null,t&&(t=(e(...i),a=setTimeout(o,r),!1))};return(...s)=>(t=!0,i=s,a||o(),a)}function Y_(e,r){(!e.duration||e.duration({around:a,panDelta:a.sub(t)}),activateOnStart:!0,moveStateManager:new ag({checkCorrectEvent:t=>t.button===0&&!t.ctrlKey}),enable:e,assignEvents:lx})}function Xge({enable:e,clickTolerance:r,aroundCenter:t=!0,minPixelCenterThreshold:a=100,rotateSpeed:i=.8},o){return new rg({clickTolerance:r,move:(s,l)=>{let n=o();if(t&&Math.abs(n.y-s.y)>a)return{bearingDelta:qI(new zr(s.x,l.y),l,n)};let u=(l.x-s.x)*i;return t&&l.ys.button===0&&s.ctrlKey||s.button===2&&!s.ctrlKey}),enable:e,assignEvents:lx})}function Zge({enable:e,clickTolerance:r,pitchSpeed:t=-.5}){return new rg({clickTolerance:r,move:(a,i)=>({pitchDelta:(i.y-a.y)*t}),moveStateManager:new ag({checkCorrectEvent:a=>a.button===0&&a.ctrlKey||a.button===2}),enable:e,assignEvents:lx})}function Kge({enable:e,clickTolerance:r,rollDegreesPerPixelMoved:t=.3},a){return new rg({clickTolerance:r,move:(i,o)=>{let s=a(),l=(o.x-i.x)*t;return o.yi.button===2&&i.ctrlKey}),enable:e,assignEvents:lx})}function D3(e,r,t){for(let a=0;aMath.abs(e.x)}function Jge(e){return e*(2-e)}function fC(e){var r;return((r=e.panDelta)==null?void 0:r.mag())||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}function Qge(e=!1){return yi(this,null,function*(){if(mm!==void 0&&!e)return mm;if(window.navigator.permissions===void 0)return mm=!!window.navigator.geolocation,mm;try{mm=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{mm=!!window.navigator.geolocation}return mm})}function cj(e,r,t,a=!1){if(a||!t.getCoveringTilesDetailsProvider().allowWorldCopies())return e?.wrap();let i=new ln(e.lng,e.lat);if(e=new ln(e.lng,e.lat),r){let o=new ln(e.lng-360,e.lat),s=new ln(e.lng+360,e.lat),l=t.locationToScreenPoint(e).distSqr(r);t.locationToScreenPoint(o).distSqr(r)180;){let o=t.locationToScreenPoint(e);if(o.x>=0&&o.y>=0&&o.x<=t.width&&o.y<=t.height)break;e.lng>t.center.lng?e.lng-=360:e.lng+=360}return e.lng!==i.lng&&t.isPointOnMapSurface(t.locationToScreenPoint(e))?e:i}function fj(e,r,t){let a=e.classList;for(let i in u4)a.remove(`maplibregl-${t}-anchor-${i}`);a.add(`maplibregl-${t}-anchor-${r}`)}function Jh(e,r,t=[]){let a=Fn.createNS("http://www.w3.org/2000/svg",e);for(let i in r)a.setAttributeNS(null,i,r[i]);for(let i of t)a.appendChild(i);return a}function eye(){return k7||(k7=Jh("svg",{display:"block",height:"41px",width:"27px",viewBox:"0 0 27 41"},[Jh("g",{"fill-rule":"nonzero"},[Jh("g",{transform:"translate(3.0, 29.0)",fill:"#000000"},[["10.5","5.25002273"],["10.5","5.25002273"],["9.5","4.77275007"],["8.5","4.29549936"],["7.5","3.81822308"],["6.5","3.34094679"],["5.5","2.86367051"],["4.5","2.38636864"]].map(([e,r])=>Jh("ellipse",{opacity:"0.04",cx:"10.5",cy:"5.80029008",rx:e,ry:r}))),Jh("g",{fill:S7},[Jh("path",{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"})]),Jh("g",{opacity:"0.25",fill:"#000000"},[Jh("path",{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"})]),Jh("g",{transform:"translate(6.0, 7.0)",fill:"#FFFFFF"}),Jh("g",{transform:"translate(8.0, 8.0)"},[Jh("circle",{fill:"#000000",opacity:"0.25",cx:"5.5",cy:"5.5",r:"5.4999962"}),Jh("circle",{fill:"#FFFFFF",cx:"5.5",cy:"5.5",r:"5.4999962"})])])]),k7)}function tye(e){return e.firstElementChild.children[1]}function hj(e,r,t){let a=t?.maxWidth||100,i=e._container.clientHeight/2,o=e._container.clientWidth/2,s=e.unproject([o-a/2,i]),l=e.unproject([o+a/2,i]),n=Math.round(e.project(l).x-e.project(s).x),u=Math.min(a,n,e._container.clientWidth),c=s.distanceTo(l);if(t?.unit==="imperial"){let f=3.2808*c;f>5280?Z_(r,u,f/5280,e._getUIString("ScaleControl.Miles")):Z_(r,u,f,e._getUIString("ScaleControl.Feet"))}else t?.unit==="nautical"?Z_(r,u,c/1852,e._getUIString("ScaleControl.NauticalMiles")):c>=1e3?Z_(r,u,c/1e3,e._getUIString("ScaleControl.Kilometers")):Z_(r,u,c,e._getUIString("ScaleControl.Meters"))}function Z_(e,r,t,a){let i=aye(t),o=i/t;e.style.width=`${r*o}px`,e.innerHTML=`${i} ${a}`}function rye(e){let r=10**Math.ceil(-Math.log(e)/Math.LN10);return Math.round(e*r)/r}function aye(e){let r=10**(`${Math.floor(e)}`.length-1),t=e/r;return t=t>=10?10:t>=5?5:t>=3?3:t>=2?2:t>=1?1:rye(t),r*t}function dj(e){if(!e)return dj(new zr(0,0));if(typeof e=="number"){let r=Math.round(Math.abs(e)/Math.SQRT2);return{center:new zr(0,0),top:new zr(0,e),"top-left":new zr(r,r),"top-right":new zr(-r,r),bottom:new zr(0,-e),"bottom-left":new zr(r,-r),"bottom-right":new zr(-r,-r),left:new zr(e,0),right:new zr(-e,0)}}if(e instanceof zr||Array.isArray(e)){let r=zr.convert(e);return{center:r,top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{center:zr.convert(e.center||[0,0]),top:zr.convert(e.top||[0,0]),"top-left":zr.convert(e["top-left"]||[0,0]),"top-right":zr.convert(e["top-right"]||[0,0]),bottom:zr.convert(e.bottom||[0,0]),"bottom-left":zr.convert(e["bottom-left"]||[0,0]),"bottom-right":zr.convert(e["bottom-right"]||[0,0]),left:zr.convert(e.left||[0,0]),right:zr.convert(e.right||[0,0])}}function iye(e){var r,t,a,i;return e?{top:(r=e.top)!=null?r:0,right:(t=e.right)!=null?t:0,bottom:(a=e.bottom)!=null?a:0,left:(i=e.left)!=null?i:0}:{top:0,right:0,bottom:0,left:0}}function nye(e,r){return H_().setRTLTextPlugin(e,r)}function oye(){return H_().getRTLTextPluginStatus()}function sye(){return JV}function lye(){return Q_.workerCount}function uye(e){Q_.workerCount=e}function cye(){return Uf.MAX_PARALLEL_IMAGE_REQUESTS}function fye(e){Uf.MAX_PARALLEL_IMAGE_REQUESTS=e}function hye(){return Uf.WORKER_URL}function dye(e){Uf.WORKER_URL=e}function pye(e){return yi(this,null,function*(){yield qk().broadcast("IS",e)})}var hC,dC,L3,F3,pC,Hc,K_,pj,Ts,Fn,Gd,vj,vu,hn,P3,_h,Fs,Vf,X1,vC,I3,mC,gC,J_,yC,mj,gj,R3,yj,_j,xj,z3,B3,bj,wj,Aj,Tj,Mj,Ej,Sj,kj,Cj,Dj,Lj,O3,Q_,Fj,ex,_C,N3,Qh,xC,bC,j3,wC,AC,hm,Pj,Ij,Z1,G0,tx,dm,TC,MC,EC,Rj,SC,zj,Bj,U3,Oj,q3,kC,Nj,V3,G3,jj,CC,K1,H3,Uj,DC,qj,Vj,Gj,LC,J1,FC,Hj,Wj,$j,Yj,Xj,Zj,Kj,Q1,Jj,Qj,PC,ol,eU,eg,tU,rU,aU,IC,iU,nU,oU,sU,lU,uU,cU,fU,RC,Hd,zC,BC,W3,$3,Y3,hU,dU,pU,OC,vU,NC,rx,ax,mU,gU,X3,jC,UC,Z3,yU,K3,_U,qC,VC,GC,HC,WC,xU,J3,bU,wU,AU,TU,MU,EU,SU,ix,kU,Q3,$C,pm,YC,nx,CU,DU,LU,XC,FU,PU,IU,RU,zU,ZC,BU,OU,NU,jU,UU,qU,KC,VU,GU,JC,QC,HU,WU,$U,YU,XU,ZU,KU,JU,QU,eq,tq,ox,rq,aq,iq,nq,oq,sq,lq,uq,cq,e7,t7,fq,hq,dq,pq,vq,mq,gq,yq,_q,sx,xq,bq,r7,wq,Jo,Aq,Tq,Mq,Eq,Sq,kq,Cq,Dq,Lq,Fq,Pq,Iq,Rq,zq,Bq,Oq,Nq,jq,Uq,qq,Vq,Gq,Hq,Wq,$q,Yq,Xq,Zq,Kq,Jq,Qq,e4,eV,tV,rV,aV,a7,Gf,vl,iV,Ao,t4,Yo,i7,r4,Ho,a4,nV,i4,n4,oV,sV,lV,uV,cV,fV,o4,hV,n7,o7,tg,dV,pV,vV,mV,gV,yV,_V,xV,s7,bV,s4,wV,rg,AV,ag,TV,MV,lx,EV,l4,l7,u7,c7,f7,SV,h7,d7,p7,v7,kV,CV,m7,g7,y7,_7,DV,ux,LV,FV,PV,x7,b7,w7,IV,A7,RV,vm,zV,BV,OV,T7,M7,NV,jV,UV,mm,u4,E7,S7,k7,H0,C7,c4,qV,cx,ig,W0,f4,D7,VV,GV,HV,h4,WV,$V,YV,XV,ZV,d4,KV,JV,vye=Si({"node_modules/maplibre-gl/dist/maplibre-gl.mjs"(){yme(),hC={},dC="6.9.0",Hc={frame(e,r,t,a){let i=a||window,o=i.requestAnimationFrame(l=>{s(),r(l)}),{unsubscribe:s}=HM(e.signal,"abort",()=>{s(),i.cancelAnimationFrame(o),t(new T1(e.signal.reason))},!1)},frameAsync(e,r){return new Promise((t,a)=>{this.frame(e,t,a,r)})},getImageData(e,r=0){return this.getImageCanvasContext(e).getImageData(-r,-r,e.width+2*r,e.height+2*r)},getImageCanvasContext(e){let r;if(RM()&&!SI())r=new OffscreenCanvas(e.width,e.height).getContext("2d",{willReadFrequently:!0});else{let t=window.document.createElement("canvas");t.width=e.width,t.height=e.height,r=t.getContext("2d",{willReadFrequently:!0})}if(!r)throw Error("failed to create canvas 2d context");return r.drawImage(e,0,0,e.width,e.height),r},resolveURL(e){return L3||(L3=document.createElement("a")),L3.href=e,L3.href},get hardwareConcurrency(){return typeof navigator<"u"&&navigator.hardwareConcurrency||4},get prefersReducedMotion(){return pC===void 0?matchMedia?(F3??(F3=matchMedia("(prefers-reduced-motion: reduce)")),F3.matches):!1:pC},set prefersReducedMotion(e){pC=e}},K_=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt===null?performance.now():this._frozenAt}setNow(e){this._frozenAt=e}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}},Fn=(Ts=class{static create(e,r,t){let a=window.document.createElement(e);return r!==void 0&&(a.className=r),t&&t.appendChild(a),a}static createNS(e,r){return window.document.createElementNS(e,r)}static disableDrag(){Ts.docStyle&&Ts.selectProp&&(Ts.userSelect=Ts.docStyle[Ts.selectProp],Ts.docStyle[Ts.selectProp]="none")}static enableDrag(){Ts.docStyle&&Ts.selectProp&&(Ts.docStyle[Ts.selectProp]=Ts.userSelect)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",Ts.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",Ts.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",Ts.suppressClickInternal,!0)},0)}static getScale(e){let r=e.getBoundingClientRect();return{x:r.width/e.offsetWidth||1,y:r.height/e.offsetHeight||1,boundingClientRect:r}}static getPoint(e,r,t){let a=r.boundingClientRect;return new zr((t.clientX-a.left)/r.x-e.clientLeft,(t.clientY-a.top)/r.y-e.clientTop)}static mousePos(e,r){let t=Ts.getScale(e);return Ts.getPoint(e,t,r)}static touchPos(e,r){let t=[],a=Ts.getScale(e);for(let i of r)t.push(Ts.getPoint(e,a,i));return t}static sanitize(e){let r=new DOMParser().parseFromString(e,"text/html").body||document.createElement("body"),t=r.querySelectorAll("script, iframe");for(let a of t)a.remove();return Ts.clean(r),r.innerHTML}static isPossiblyDangerous(e,r){let t=r.replace(/\s+/g,"").toLowerCase();if(["src","href","xlink:href"].includes(e)&&(t.includes("javascript:")||t.includes("data:"))||e==="srcdoc"||e.startsWith("on"))return!0}static clean(e){let r=e.children;for(let t of r)Ts.removeAttributes(t),Ts.clean(t)}static removeAttributes(e){for(let{name:r,value:t}of Array.from(e.attributes))Ts.isPossiblyDangerous(r,t)&&e.removeAttribute(r)}},Ts.docStyle=typeof window<"u"&&((pj=window.document)==null?void 0:pj.documentElement.style),Ts.selectProp=!Ts.docStyle||"userSelect"in Ts.docStyle?"userSelect":"webkitUserSelect",Ts),(function(e){let r,t,a,i;e.resetRequestQueue=()=>{r=[],t=0,a=0,i={}},e.addThrottleControl=f=>{let h=a++;return i[h]=f,h},e.removeThrottleControl=f=>{delete i[f],u()};let o=()=>{for(let f of Object.keys(i))if(i[f]())return!0;return!1};function s(f,h,d,p,g=!0,m){return yi(this,null,function*(){let y=yield f.transformRequest(h,d);return WM(p.signal),Gd.getImage(y,p,g,m)})}e.transformAndGetImage=s,e.getImage=(f,h,d=!0,p)=>new Promise((g,m)=>{f.headers||(f.headers={}),f.headers.accept="image/webp,*/*",tn(f,{type:"image"});let y={abortController:h,requestParameters:f,supportImageRefresh:d,imageBitmapOptions:p,state:"queued",onError:_=>{m(_)},onSuccess:_=>{g(_)}};r.push(y),u()});let l=(f,h)=>typeof createImageBitmap=="function"?qz(f,h):Vz(f),n=f=>yi(null,null,function*(){f.state="running";let{requestParameters:h,supportImageRefresh:d,imageBitmapOptions:p,onError:g,onSuccess:m,abortController:y}=f,_=d===!1&&!p&&!n1(self)&&!GI(h.url)&&(!h.headers||Object.keys(h.headers).reduce((x,E)=>x&&E==="accept",!0));t++;let v=_?c(h,y):__(h,y);try{let x=yield v;delete f.abortController,f.state="completed",x.data instanceof HTMLImageElement||Gv(x.data)?m(x):!x.data||x.data.byteLength===0?m({data:null,cacheControl:x.cacheControl,expires:x.expires}):m({data:yield l(x.data,p),cacheControl:x.cacheControl,expires:x.expires})}catch(x){delete f.abortController,g(Ac(x))}finally{t--,u()}}),u=()=>{let f=o()?Uf.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:Uf.MAX_PARALLEL_IMAGE_REQUESTS;for(let h=t;h0;h++){let d=r.shift();if(d.abortController.signal.aborted){h--;continue}n(d)}},c=(f,h)=>new Promise((d,p)=>{let g=new Image,m=f.url,y=f.credentials;y&&y==="include"?g.crossOrigin="use-credentials":(y&&y==="same-origin"||!HI(m))&&(g.crossOrigin="anonymous"),h.signal.addEventListener("abort",()=>{g.src="",p(new T1(h.signal.reason))}),g.fetchPriority="high",g.onload=()=>{g.onerror=g.onload=null,d({data:g})},g.onerror=()=>{g.onerror=g.onload=null,!h.signal.aborted&&p(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."))},g.src=m})})(Gd||(Gd={})),Gd.resetRequestQueue(),vj=class{constructor(e){this._transformRequestFn=e??null}transformRequest(e,r){return this._transformRequestFn&&this._transformRequestFn(e,r)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}},vu=class extends qf{},hn=class extends vu{},P3=class extends vu{constructor(e={}){super("style.load",e)}},_h=class extends vu{constructor(e,r={}){super(e,r),this.dataType="style"}},Fs=class extends vu{constructor(e,r={}){super(e,r),this.dataType="source"}},Vf=class extends vu{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,t,a={}){t=t instanceof MouseEvent?t:new MouseEvent(e,t);let i=Fn.mousePos(r.getCanvas(),t),o=r.unproject(i);super(e,tn({point:i,lngLat:o,originalEvent:t},a)),this._defaultPrevented=!1,this.target=r}},X1=class extends vu{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,t){let a=e==="touchend"?t.changedTouches:t.touches,i=Fn.touchPos(r.getCanvasContainer(),a),o=i.map(n=>r.unproject(n)),s=i.reduce((n,u,c,f)=>n.add(u.div(f.length)),new zr(0,0)),l=r.unproject(s);super(e,{points:i,point:s,lngLats:o,lngLat:l,originalEvent:t}),this._defaultPrevented=!1}},vC=class extends vu{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r){super("wheel",{originalEvent:r}),this._defaultPrevented=!1}},I3=class extends vu{},mC=class extends vu{constructor(e={}){super("terrain",e)}},gC=class extends vu{constructor(e={}){super("projectiontransition",e)}},J_=class extends vu{},yC=class extends vu{constructor(e={}){super("styleimagemissing",e)}},mj=class extends Zl{constructor(){super(),this.images={},this.updateVersion=0,this.loaded=!1,this.requestors=[],this.missingImageResolver=null,this._spriteImagesIds={},this._imagesIds=null,this._renderCallbacksDispatchedThisFrame={}}destroy(){for(let e of Object.keys(this.images))this.removeImage(e);this._spriteImagesIds={}}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:r,promiseResolve:t}of this.requestors)t(this._getImagesForIds(r));this.requestors=[]}}getImage(e){let r=this.images[e];if(r&&!r.data&&r.spriteData){let t=r.spriteData;r.data=new Ls({width:t.width,height:t.height},t.context.getImageData(t.x,t.y,t.width,t.height).data),r.spriteData=null}return r}addImage(e,r){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,r)&&(this.images[e]=r,this._imagesIds=null,r.isWebGLImage&&this.updateImage(e,r,!1))}_validate(e,r){let t=!0,a=r.data||r.spriteData;return this._validateStretch(r.stretchX,a?.width)||(this.fire(new mn(Error(`Image "${e}" has invalid "stretchX" value`))),t=!1),this._validateStretch(r.stretchY,a?.height)||(this.fire(new mn(Error(`Image "${e}" has invalid "stretchY" value`))),t=!1),this._validateContent(r.content,r)||(this.fire(new mn(Error(`Image "${e}" has invalid "content" value`))),t=!1),t}_validateStretch(e,r){if(!e)return!0;let t=0;for(let a of e){if(a[0]=e[1]}updateImage(e,r,t=!0){var a;let i=this.images[e];if(t){let o=i.data||i.spriteData;if(o.width!==r.data.width||o.height!==r.data.height)throw Error(`size mismatch between old image (${o.width}x${o.height}) and new image (${r.data.width}x${r.data.height}).`)}r.version=((a=i.version)!=null?a:0)+1,this.images[e]=r,this.updateVersion++}removeImage(e){var r;let t=this.images[e];t&&(delete this.images[e],this._imagesIds=null,(r=t.userImage)!=null&&r.onRemove&&t.userImage.onRemove())}listImages(){var e;return(e=this._imagesIds)!=null||(this._imagesIds=Object.keys(this.images)),this._imagesIds}_getSpriteImageId(e,r){return e==="default"?r:`${e}:${r}`}setSpriteImages(e,r){var t;let a=(t=this._spriteImagesIds[e])!=null?t:[],i=[];for(let l in r){let n=this._getSpriteImageId(e,l);i.push(n),n in this.images?this.updateImage(n,r[l],!1):this.addImage(n,r[l])}let o=new Set(i),s=a.filter(l=>!o.has(l));for(let l of s)this.removeImage(l);return this._spriteImagesIds[e]=i,{loaded:i,removed:s}}removeSpriteImages(e){var r;let t=(r=this._spriteImagesIds[e])!=null?r:[];for(let a of t)this.removeImage(a);return delete this._spriteImagesIds[e],t}removeAllSpriteImages(){let e=Object.values(this._spriteImagesIds).flat();for(let r of e)this.removeImage(r);return this._spriteImagesIds={},e}setMissingImageResolver(e){this.missingImageResolver=e}getImages(e){return new Promise((r,t)=>{let a=!0;if(!this.isLoaded())for(let i of e)this.images[i]||(a=!1);this.isLoaded()||a?r(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:r})})}_getImagesForIds(e){return yi(this,null,function*(){var r;let t=new Set(e.filter(o=>!this.getImage(o))),a=this.missingImageResolver;a&&(yield Promise.allSettled(Array.from(t,o=>a(o))));let i={};for(let o of e){let s=this.getImage(o);s&&(t.delete(o),i[o]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,stretchX:s.stretchX,stretchY:s.stretchY,content:s.content,textFitWidth:s.textFitWidth,textFitHeight:s.textFitHeight,hasRenderCallback:!!((r=s.userImage)!=null&&r.render),isWebGLImage:s.isWebGLImage})}for(let o of t)this.fire(new yC({id:o})),vo(`Image "${o}" could not be loaded. Please make sure you have added the image before it is needed with map.addImage(), resolved it with map.setMissingStyleImageResolver(), or included it in a "sprite" property in your style.`);return i})}beginFrame(){this._renderCallbacksDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let r of e){if(this._renderCallbacksDispatchedThisFrame[r])continue;this._renderCallbacksDispatchedThisFrame[r]=!0;let t=this.getImage(r);t||vo(`Image with ID: "${r}" was not found`),ope(t)&&this.updateImage(r,t)}}cloneImages(){let e={};for(let r in this.images){let t=this.images[r];e[r]=Ci(ja({},t),{data:t.data?t.data.clone():null})}return e}},gj=class{constructor(e){this._imageManager=e,this._entries={},this._image=new Ls({width:1,height:1}),this._dirty=!0}destroy(){this._texture&&(this._texture=(this._texture.destroy(),null)),this._entries={},this._image=new Ls({width:1,height:1}),this._dirty=!0}getPixelSize(){let{width:e,height:r}=this._image;return{width:e,height:r}}getPattern(e){let r=this._imageManager.getImage(e);if(!r)return null;let t=this._entries[e];if(t?.image!==r){let a={w:r.data.width+2,h:r.data.height+2,x:0,y:0};this._entries[e]={bin:a,position:new e3(a,r),image:r}}else if(t.position.version!==r.version)t.position.version=r.version;else return t.position;return this._update(),this._entries[e].position}bind(e){let r=e.gl;this._texture?this._dirty&&(this._dirty=(this._texture.update(this._image),!1)):(this._texture=new Kl(e,this._image,r.RGBA),this._dirty=!1),this._texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}_update(){for(let i in this._entries)this._imageManager.getImage(i)||delete this._entries[i];let e=[];for(let i in this._entries)e.push(this._entries[i].bin);let{w:r,h:t}=R5(e),a=this._image;a.resize({width:r||1,height:t||1});for(let i in this._entries){let{bin:o}=this._entries[i],s=o.x+1,l=o.y+1,n=this._entries[i].image.data,u=n.width,c=n.height;Ls.copy(n,a,{x:0,y:0},{x:s,y:l},{width:u,height:c}),Ls.copy(n,a,{x:0,y:c-1},{x:s,y:l-1},{width:u,height:1}),Ls.copy(n,a,{x:0,y:0},{x:s,y:l+c},{width:u,height:1}),Ls.copy(n,a,{x:u-1,y:0},{x:s-1,y:l},{width:1,height:c}),Ls.copy(n,a,{x:0,y:0},{x:s+u,y:l},{width:1,height:c})}this._dirty=!0}},R3=1114111,yj={start:0,end:R3},_j=0,xj=class{constructor(e){this.requestManager=e,this._faces={},this._registered=new Set}setFontFaces(e){this._unregisterAll(),this._faces={};for(let[r,t]of Object.entries(e??{})){let a=Array.isArray(t)?t:[t];this._faces[r]=a.map(i=>this._declareFontFace(r,i)).filter(i=>i!==null)}}hasFontFaces(){return Object.keys(this._faces).length>0}getFontFamily(e,r){return yi(this,null,function*(){var t,a;for(let i of e.split(","))for(let o of(t=this._faces[i.trim()])!=null?t:[])if(Rme(o,r)&&((a=o.loaded)!=null||(o.loaded=this._loadFontFace(o)),yield o.loaded))return o.family;return null})}_declareFontFace(e,r){let t=typeof r=="string"?{url:r}:r;if(typeof t?.url!="string")return vo(`Ignoring the font face declared for "${e}": it has no URL.`),null;let a=`maplibre-gl-font-face-${_j++}`,i=t["unicode-range"];if(!i?.length)return{url:t.url,ranges:[yj],family:a};let o=[];for(let s of i){let l=Ime(s);if(!l){vo(`Ignoring the unicode range "${s}" of the font face at ${t.url}: it is not a valid range.`);continue}o.push(l)}return o.length?{url:t.url,ranges:o,family:a}:null}_loadFontFace(e){return yi(this,null,function*(){if(typeof FontFace>"u"||typeof document>"u"||!document.fonts)return vo(`Ignoring the font face at ${e.url}: this environment has no CSS Font Loading API.`),!1;let r;try{return r=new FontFace(e.family,yield this._downloadFontFile(e.url)),Object.values(this._faces).some(t=>t.includes(e))?(document.fonts.add(r),this._registered.add(r),yield r.load(),!0):!1}catch(t){return r&&this._unregister(r),vo(`Ignoring the font face at ${e.url}: ${Ac(t).message}`),!1}})}_downloadFontFile(e){return yi(this,null,function*(){let r=yield this.requestManager.transformRequest(e,"Glyphs"),t=yield fS(r,new AbortController);if(!t?.data)throw Error(`the response was empty for the font file at ${e}`);return t.data})}_unregister(e){var r;(r=document.fonts)==null||r.delete(e),this._registered.delete(e)}_unregisterAll(){var e;for(let r of this._registered)(e=document.fonts)==null||e.delete(r);this._registered.clear()}destroy(){this._unregisterAll(),this._faces={}}},z3=1e20,B3=new Float64Array(256);for(let e=0;e<256;e++){let r=.5-(e/255)**.45454545454545453;B3[e]=r*Math.abs(r)}B3[255]=-1e20,bj=class{constructor({fontSize:e=24,buffer:r=3,radius:t=8,cutoff:a=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:s="normal",lang:l=null}={}){this.buffer=r,this.radius=t,this.cutoff=a,this.lang=l;let n=this.size=e+r*4,u=this._createCanvas(n),c=this.ctx=u.getContext("2d",{willReadFrequently:!0});c.font=`${s} ${o} ${e}px ${i}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(n*n),this.gridInner=new Float64Array(n*n),this.f=new Float64Array(n),this.z=new Float64Array(n+1),this.v=new Uint16Array(n)}_createCanvas(e){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(e,e);let r=document.createElement("canvas");return r.width=r.height=e,r}draw(e){let{width:r,actualBoundingBoxAscent:t,actualBoundingBoxDescent:a,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(e),s=Math.ceil(t),l=Math.floor(-i),n=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o)-l)),u=Math.max(0,Math.min(this.size-this.buffer,s+Math.ceil(a))),c=n+2*this.buffer,f=u+2*this.buffer,h=Math.max(c*f,0),d=new Uint8ClampedArray(h),p={data:d,width:c,height:f,glyphWidth:n,glyphHeight:u,glyphTop:s,glyphLeft:l,glyphAdvance:r};if(n===0||u===0)return p;let{ctx:g,buffer:m,gridInner:y,gridOuter:_}=this;this.lang&&(g.lang=this.lang),g.clearRect(m,m,n,u),g.fillText(e,m-l,m+s);let v=g.getImageData(m,m,n,u);_.fill(z3,0,h),y.fill(0,0,h);let x=3;for(let w=0;w{let t=new bj(e);return t.buffer=r,t},Tj=class{constructor(e,r,t,a=Aj){this.requestManager=e,this.localIdeographFontFamily=r,this.entries={},this.lang=t,this.fontFaceManager=new xj(e),this.createRasterizer=a}setURL(e){this.url=e}setFontFaces(e){this.fontFaceManager.setFontFaces(e),this.entries={}}getGlyphs(e){return yi(this,null,function*(){let r=[];for(let i in e)for(let o of e[i])r.push(this._getAndCacheGlyphsPromise(i,o));let t=yield Promise.all(r),a={};for(let{stack:i,id:o,glyph:s}of t)a[i]||(a[i]={}),a[i][o]=s&&{id:s.id,bitmap:s.bitmap.clone(),metrics:s.metrics};return a})}_getAndCacheGlyphsPromise(e,r){return yi(this,null,function*(){var t,a;(a=(t=this.entries)[e])!=null||(t[e]={glyphs:{},requests:{},ranges:{}});let i=this.entries[e],o=i.glyphs[r];if(o!==void 0)return{stack:e,id:r,glyph:o};let s=r.codePointAt(0),l=this.fontFaceManager.hasFontFaces()?yield this.fontFaceManager.getFontFamily(e,s):null;return l?(o=i.glyphs[r]=yield this._drawGlyph(i,e,r,l),{stack:e,id:r,glyph:o}):!this.url||C2(r)||this._charUsesLocalIdeographFontFamily(s)?(o=i.glyphs[r]=yield this._drawGlyph(i,e,r),{stack:e,id:r,glyph:o}):yield this._downloadAndCacheRangePromise(e,r)})}_downloadAndCacheRangePromise(e,r){return yi(this,null,function*(){var t;let a=r.codePointAt(0),i=this.entries[e],o=Math.floor(a/256);if(i.ranges[o])return{stack:e,id:r,glyph:null};(t=i.requests)[o]||(t[o]=this._loadGlyphRange(e,o));try{let s=yield i.requests[o];for(let l in s)i.glyphs[String.fromCodePoint(+l)]=s[+l];return i.ranges[o]=!0,{stack:e,id:r,glyph:s[a]||null}}catch(s){let l=i.glyphs[r]=yield this._drawGlyph(i,e,r);return this._warnOnMissingGlyphRange(l,o,a,Ac(s)),{stack:e,id:r,glyph:l}}})}_loadGlyphRange(e,r){return yi(this,null,function*(){let t=r*256,a=t+255,i=yield this.requestManager.transformRequest(this.url.replace("{fontstack}",e).replace("{range}",`${t}-${a}`),"Glyphs"),o=yield fS(i,new AbortController);if(!o?.data)throw Error(`Could not load glyph range. range: ${r}, ${t}-${a}`);let s={};for(let l of npe(o.data))s[l.id]=l;return s})}_warnOnMissingGlyphRange(e,r,t,a){let i=r*256,o=i+255,s=t.toString(16).padStart(4,"0").toUpperCase();vo(`Unable to load glyph range ${r}, ${i}-${o}. Rendering codepoint U+${s} locally instead. ${a}`)}_charUsesLocalIdeographFontFamily(e){return!!this.localIdeographFontFamily&&_de(e)}_drawGlyph(e,r,t,a){return yi(this,null,function*(){let i=(yield this._getTinySDF(e,r,t,a)).draw(t),o=new RegExp("^\\p{gc=Cf}+$","u").test(t);return{id:t.codePointAt(0),bitmap:new zw({width:i.width||60,height:i.height||60},i.data),metrics:{width:o?0:i.glyphWidth/2||24,height:i.glyphHeight/2||24,left:i.glyphLeft/2+.5||0,top:i.glyphTop/2-27.5||-8,advance:o?0:i.glyphAdvance/2||24,isDoubleResolution:!0}}})}_getTinySDF(e,r,t,a){var i,o,s,l;let n=C2(t);if(a){let h=n?"clusterTinySDFs":"fontFaceTinySDFs";return(i=e[h])!=null||(e[h]={}),(o=e[h])[a]||(o[a]=this._createTinySDF(a,!1,n?3:1)),e[h][a]}let u=r===wj&&this.localIdeographFontFamily!==""&&this._charUsesLocalIdeographFontFamily(t.codePointAt(0)),c=u?this.localIdeographFontFamily:r;if(n)return(s=e.clusterTinySDFs)!=null||(e.clusterTinySDFs={}),(l=e.clusterTinySDFs)[c]||(l[c]=this._createTinySDF(c,!0,3)),e.clusterTinySDFs[c];let f=u?"ideographTinySDF":"tinySDF";return e[f]||(e[f]=this._createTinySDF(c)),e[f]}_createTinySDF(e,r=!0,t=1){return yi(this,null,function*(){var a;let i=e?e.split(","):[];i.push("sans-serif");let o=i.map(n=>/[-\w]+/.test(n)?n:`'${CSS.escape(n)}'`).join(","),s=r?this._fontWeight(i[0]):void 0,l=r?this._fontStyle(i[0]):"normal";if(typeof document<"u"&&((a=document.fonts)!=null&&a.load))try{yield document.fonts.load(`${l} ${s||"normal"} 48px ${o}`)}catch(n){vo(`Failed to load font "${o}": ${Ac(n).message}`)}return this.createRasterizer({fontSize:48,buffer:Math.max(6,Math.ceil(48*(t-1)/4)),radius:16,cutoff:.25,fontFamily:o,fontWeight:s,fontStyle:l,lang:this.lang},6)})}_fontStyle(e){return/italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){let r={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},t;for(let[a,i]of Object.entries(r))RegExp(`\\b${a}\\b`,"i").test(e)&&(t=`${i}`);return t}destroy(){for(let e in this.entries){let r=this.entries[e];r.tinySDF=null,r.ideographTinySDF=null,r.fontFaceTinySDFs={},r.glyphs={},r.requests={},r.ranges={}}this.entries={},this.fontFaceManager.destroy()}},Ej=()=>Mj||(Mj=new Du({anchor:new Ti(ta.light.anchor,"anchor"),position:new Ti(ta.light.position,"position"),color:new Ti(ta.light.color,"color"),intensity:new Ti(ta.light.intensity,"intensity")})),Sj=class extends Zl{constructor(e,r){super(),this._transitionable=new C_(Ej(),"light",r),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}getCartesianPosition(){return Rce(this.properties.get("position"))}setLight(e,r={}){if(!this._validate(Af.light,e,r))for(let t in e){let a=e[t];t.endsWith("-transition")?this._transitionable.setTransition(t.slice(0,-lw.length),a):this._transitionable.setValue(t,a)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,r,t){return i_(this,e,{value:r},t)}},Cj=()=>kj||(kj=new Du({"sky-color":new Ti(ta.sky["sky-color"],"sky-color"),"horizon-color":new Ti(ta.sky["horizon-color"],"horizon-color"),"fog-color":new Ti(ta.sky["fog-color"],"fog-color"),"fog-ground-blend":new Ti(ta.sky["fog-ground-blend"],"fog-ground-blend"),"horizon-fog-blend":new Ti(ta.sky["horizon-fog-blend"],"horizon-fog-blend"),"sky-horizon-blend":new Ti(ta.sky["sky-horizon-blend"],"sky-horizon-blend"),"atmosphere-blend":new Ti(ta.sky["atmosphere-blend"],"atmosphere-blend")})),Dj=class extends Zl{constructor(e,r){super(),this._transitionable=new C_(Cj(),"sky",r),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new Ko(0))}setSky(e,r={}){if(!this._validate(Af.sky,e,r)){e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let t in e){let a=e[t];t.endsWith("-transition")?this._transitionable.setTransition(t.slice(0,-lw.length),a):this._transitionable.setValue(t,a)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,r,t={}){return i_(this,e,{value:r},t)}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}},Lj=class{constructor(e,r){this.width=e,this.height=r,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,r){var t;let a=e.join(",")+String(r);return(t=this.dashEntry)[a]||(t[a]=this.addDash(e,r)),this.dashEntry[a]}getDashRanges(e,r,t){let a=e.length%2==1,i=[],o=a?-e[e.length-1]*t:0,s=e[0]*t,l=!0;i.push({left:o,right:s,isDash:l,zeroLength:e[0]===0});let n=e[0];for(let u=1;u1&&(n=e[++l]);let c=Math.abs(u-n.left),f=Math.abs(u-n.right),h=Math.min(c,f),d,p=i/t*(a+1);if(n.isDash){let g=a-Math.abs(p);d=Math.sqrt(h*h+g*g)}else d=a-Math.sqrt(h*h+p*p);this.data[s+u]=Math.max(0,Math.min(255,d+128))}}}addRegularDash(e){for(let s=e.length-1;s>=0;--s){let l=e[s],n=e[s+1];l.zeroLength?e.splice(s,1):n?.isDash===l.isDash&&(n.left=l.left,e.splice(s,1))}let r=e[0],t=e[e.length-1];r.isDash===t.isDash&&(r.left=t.left-this.width,t.right=r.right+this.width);let a=this.width*this.nextRow,i=0,o=e[i];for(let s=0;s1&&(o=e[++i]);let l=Math.abs(s-o.left),n=Math.abs(s-o.right),u=Math.min(l,n),c=o.isDash?u:-u;this.data[a+s]=Math.max(0,Math.min(255,c+128))}}addDash(e,r){let t=r?7:0,a=2*t+1;if(this.nextRow+a>this.height)return vo("LineAtlas out of space"),null;let i=0;for(let s of e)i+=s;if(i!==0){let s=this.width/i,l=this.getDashRanges(e,this.width,s);r?this.addRoundDash(l,s,t):this.addRegularDash(l)}let o={y:this.nextRow+t,height:2*t,width:i};return this.nextRow+=a,this.dirty=!0,o}bind(e){let r=e.gl;this.texture?(r.bindTexture(r.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,r.texSubImage2D(r.TEXTURE_2D,0,0,0,this.width,this.height,r.ALPHA,r.UNSIGNED_BYTE,this.data))):(this.texture=r.createTexture(),r.bindTexture(r.TEXTURE_2D,this.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.REPEAT),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.REPEAT),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texImage2D(r.TEXTURE_2D,0,r.ALPHA,this.width,this.height,0,r.ALPHA,r.UNSIGNED_BYTE,this.data))}},O3="maplibre_preloaded_worker_pool",Q_=class wQ{constructor(){this.active={},this.workersPromise=null}acquire(r){return yi(this,null,function*(){if(this.active[r]=!0,!this.workersPromise){let t=[];for(;t.length{for(let i of a)i.terminate()})}}isPreloaded(){return!!this.active[O3]}numActive(){return Object.keys(this.active).length}},Fj=Math.floor(Hc.hardwareConcurrency/2),Q_.workerCount=Bce(globalThis)?Math.max(Math.min(Fj,3),1):1,_C=class{constructor(e,r){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=r,this.removed=!1,this.actorsPromise=this.initActors(r)}initActors(e){return yi(this,null,function*(){let r=yield this.workerPool.acquire(e);if(this.removed)return[];if(this.actors=r.map((t,a)=>{let i=new SN(t,e);return i.name=`Worker ${a}`,i}),!this.actors.length)throw Error("No actors found");return this.actors})}broadcast(e,r){return yi(this,null,function*(){let t=yield this.actorsPromise;return Promise.all(t.map(a=>a.sendAsync({type:e,data:r})))})}getActor(){return yi(this,null,function*(){let e=yield this.actorsPromise;return this.currentActor=(this.currentActor+1)%e.length,e[this.currentActor]})}waitForInitComplete(){return yi(this,null,function*(){this.actors.length===0&&(yield this.actorsPromise)})}getReadyActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.removed=!0;for(let r of this.actors)r.remove();this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,r){return yi(this,null,function*(){let t=yield this.actorsPromise;for(let a of t)a.registerMessageHandler(e,r)})}unregisterMessageHandler(e){return yi(this,null,function*(){let r=yield this.actorsPromise;for(let t of r)t.unregisterMessageHandler(e)})}},Qh=class l0{constructor(r,t){r&&(t?this.setSouthWest(r).setNorthEast(t):Array.isArray(r)&&(r.length===4?this.setSouthWest([r[0],r[1]]).setNorthEast([r[2],r[3]]):this.setSouthWest(r[0]).setNorthEast(r[1])))}setNorthEast(r){return this._ne=r instanceof ln?new ln(r.lng,r.lat):ln.convert(r),this}setSouthWest(r){return this._sw=r instanceof ln?new ln(r.lng,r.lat):ln.convert(r),this}extend(r){let t=this._sw,a=this._ne,i,o;if(r instanceof ln)i=r,o=r;else if(r instanceof l0){if(i=r._sw,o=r._ne,!i||!o)return this}else{if(Array.isArray(r)){if(r.length===4||r.every(Array.isArray)){let s=r;return this.extend(l0.convert(s))}{let s=r;return this.extend(ln.convert(s))}}return r&&("lng"in r||"lon"in r)&&"lat"in r?this.extend(ln.convert(r)):this}return!t&&!a?(this._sw=new ln(i.lng,i.lat),this._ne=new ln(o.lng,o.lat)):(t.lng=Math.min(i.lng,t.lng),t.lat=Math.min(i.lat,t.lat),a.lng=Math.max(o.lng,a.lng),a.lat=Math.max(o.lat,a.lat)),this}getCenter(){return new ln((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 ln(this.getWest(),this.getNorth())}getSouthEast(){return new ln(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(r){let{lng:t,lat:a}=ln.convert(r),i=this._sw.lat<=a&&a<=this._ne.lat,o=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(o=this._sw.lng>=t&&t>=this._ne.lng),i&&o}intersects(r){if(r=l0.convert(r),!(r.getNorth()>=this.getSouth()&&r.getSouth()<=this.getNorth()))return!1;let t=Math.abs(this.getEast()-this.getWest()),a=Math.abs(r.getEast()-r.getWest());if(t>=360||a>=360)return!0;let i=qh(this.getWest(),-180,180),o=qh(this.getEast(),-180,180),s=qh(r.getWest(),-180,180),l=qh(r.getEast(),-180,180),n=i>o,u=s>l;return n&&u?!0:n?l>=i||s<=o:u?o>=s||i<=l:s<=o&&l>=i}static convert(r){return r instanceof l0||!r?r:new l0(r)}static fromLngLat(r,t=0){let a=360*t/40075017,i=a/Math.cos(Math.PI/180*r.lat);return new l0(new ln(r.lng-i,r.lat-a),new ln(r.lng+i,r.lat+a))}adjustAntiMeridian(){let r=new ln(this._sw.lng,this._sw.lat),t=new ln(this._ne.lng,this._ne.lat);return r.lng>t.lng?new l0(r,new ln(t.lng+360,t.lat)):new l0(r,t)}},xC=class{constructor(e,r,t){this.bounds=Qh.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=t||24}validateBounds(e){return!Array.isArray(e)||e.length!==4?[-180,-90,180,90]:[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]}contains(e){let r=2**e.z,t={minX:Math.floor(g1(this.bounds.getWest())*r),minY:Math.floor(y1(this.bounds.getNorth())*r),maxX:Math.ceil(g1(this.bounds.getEast())*r),maxY:Math.ceil(y1(this.bounds.getSouth())*r)};return e.x>=t.minX&&e.x=t.minY&&e.y{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null))}serialize(){return tn({},this._options)}loadTile(e){return yi(this,null,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),t={request:yield this.map._requestManager.transformRequest(r,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(e),etag:e.etag};t.request.collectResourceTiming=this._collectResourceTiming,yield this.dispatcher.waitForInitComplete();let a="RT";if(!e.actor||e.state==="expired")e.actor=this.dispatcher.getReadyActor(),a="LT";else if(e.state==="loading")return new Promise((i,o)=>{e.reloadPromise={resolve:i,reject:o}});e.abortController=new AbortController;try{let i=yield e.actor.sendAsync({type:a,data:t},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,i);let o={};return i?.etagUnmodified&&(o.unmodified=!0),o}catch(i){if(delete e.abortController,e.aborted||S0(i))return;if(i&&i.status!==404)throw i;this._afterTileLoadWorkerResponse(e,null)}})}_getOverzoomParameters(e){return yi(this,null,function*(){if(e.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let r=e.tileID.scaledTo(this.maxzoom).canonical,t=r.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:r,overzoomRequest:yield this.map._requestManager.transformRequest(t,"Tile")}})}_afterTileLoadWorkerResponse(e,r){if(r?.resourceTiming&&(e.resourceTiming=r.resourceTiming),r&&this.map._refreshExpiredTiles&&e.setExpiryData(r),e.etag=r?.etag,e.loadVectorData(r,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}abortTile(e){return yi(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return yi(this,null,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}},j3=class extends Zl{constructor(e,r,t,a){super(),this.id=e,this.dispatcher=t,this.setEventedParent(a),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._premultiplyAlpha=!0,this._options=tn({type:"raster"},r),tn(this,Gy(r,["url","scheme","tileSize"]))}load(e=!1){return yi(this,null,function*(){this._loaded=!1,this.fire(new Fs("dataloading")),this._tileJSONRequest=new AbortController;try{let r=yield s8(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,r&&(tn(this,r),r.bounds&&(this.tileBounds=new xC(r.bounds,this.minzoom,this.maxzoom)),this.fire(new Fs("data",{sourceDataType:"metadata"})),this.fire(new Fs("data",{sourceDataType:"content",sourceDataChanged:e})))}catch(r){this._tileJSONRequest=null,this._loaded=!0,S0(r)||this.fire(new mn(Ac(r)))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null))}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null)),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return tn({},this._options)}setPremultiplyAlpha(e){return this._premultiplyAlpha===e||this.setSourceProperty(()=>{this._premultiplyAlpha=e}),this}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return yi(this,null,function*(){var r;let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),a=this._premultiplyAlpha,i=a?void 0:{premultiplyAlpha:"none"};e.abortController=new AbortController;try{let o=yield Gd.transformAndGetImage(this.map._requestManager,t,"Tile",e.abortController,this.map._refreshExpiredTiles,i);if(delete e.abortController,e.aborted){e.state="unloaded";return}if(o){this.map._refreshExpiredTiles&&(o.cacheControl||o.expires)&&e.setExpiryData({cacheControl:o.cacheControl,expires:o.expires});let s=this.map.painter.context,l=s.gl,n=(r=o.data)!=null?r:new Ls({width:1,height:1},new Uint8Array(4));e.texture=this.map.painter.getTileTexture(n.width),e.texture?e.texture.update(n,{useMipmap:!0,premultiply:a}):(e.texture=new Kl(s,n,l.RGBA,{useMipmap:!0,premultiply:a}),e.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE,l.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(o){if(delete e.abortController,e.aborted)e.state="unloaded";else if(o)throw e.state="errored",o}})}abortTile(e){return yi(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return yi(this,null,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}},wC=class extends j3{constructor(e,r,t,a){super(e,r,t,a),this.type="raster-dem",this.maxzoom=22,this._options=tn({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return yi(this,null,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let t=yield Gd.transformAndGetImage(this.map._requestManager,r,"Tile",e.abortController,this.map._refreshExpiredTiles,{colorSpaceConversion:"none"});if(delete e.abortController,e.aborted){e.state="unloaded";return}if(t){if(this.map._refreshExpiredTiles&&(t.cacheControl||t.expires)&&e.setExpiryData({cacheControl:t.cacheControl,expires:t.expires}),!t.data){e.state="loaded";return}let a=t.data,i=Gv(a)&&RM()?a:yield this.readImageNow(a),o={type:this.type,uid:e.uid,source:this.id,rawImageData:i,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(e.actor&&e.state!=="expired"&&e.state!=="reloading")return;yield this.dispatcher.waitForInitComplete(),(!e.actor||e.state==="expired")&&(e.actor=this.dispatcher.getReadyActor()),e.dem=yield e.actor.sendAsync({type:"LDT",data:o}),e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0,e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}readImageNow(e){return yi(this,null,function*(){if(typeof VideoFrame<"u"&&SI()){let r=e.width+4,t=e.height+4;try{return new Ls({width:r,height:t},yield Nce(e,-2,-2,r,t))}catch{}}return Hc.getImageData(e,2)})}_getNeighboringTiles(e){let r=e.canonical,t=2**r.z,a=(r.x-1+t)%t,i=r.x===0?e.wrap-1:e.wrap,o=(r.x+1+t)%t,s=r.x+1===t?e.wrap+1:e.wrap,l={};return l[new Yu(e.overscaledZ,i,r.z,a,r.y).key]={backfilled:!1},l[new Yu(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new Yu(e.overscaledZ,i,r.z,a,r.y-1).key]={backfilled:!1},l[new Yu(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new Yu(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1f8(r))}}shouldReloadTile(e,{affectedBounds:r}){if(e.state==="loading")return!0;if(e.state==="unloaded")return!1;let{buffer:t,extent:a}=this.workerOptions.geojsonVtOptions,i=i1e(e.tileID.canonical,t/a);for(let o of r)if(i.intersects(o))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(e){return yi(this,null,function*(){let r=e.actor?"RT":"LT";e.actor=yield this.actorPromise;let t={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;try{let a=yield(yield this.actorPromise).sendAsync({type:r,data:t},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(a,this.map.painter,r==="RT")}catch(a){if(delete e.abortController,e.aborted||S0(a))return;throw a}})}abortTile(e){return yi(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return yi(this,null,function*(){e.unloadVectorData(),yield(yield this.actorPromise).sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actorPromise.then(e=>e.sendAsync({type:"RS",data:{type:this.type,source:this.id}}))}serialize(){return tn({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}},hm=[0,0,1],Pj=(e,r)=>({u_tl_parent:new no(e,r.u_tl_parent),u_scale_parent:new Di(e,r.u_scale_parent),u_buffer_scale:new Di(e,r.u_buffer_scale),u_image_warp:new qc(e,r.u_image_warp),u_fade_t:new Di(e,r.u_fade_t),u_opacity:new Di(e,r.u_opacity),u_image0:new fn(e,r.u_image0),u_image1:new fn(e,r.u_image1),u_brightness_low:new Di(e,r.u_brightness_low),u_brightness_high:new Di(e,r.u_brightness_high),u_saturation_factor:new Di(e,r.u_saturation_factor),u_contrast_factor:new Di(e,r.u_contrast_factor),u_spin_weights:new qc(e,r.u_spin_weights),u_coords_top:new R1(e,r.u_coords_top),u_coords_bottom:new R1(e,r.u_coords_bottom)}),Ij=(e,r,t,a,i,o)=>({u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_image_warp:o,u_fade_t:t.mix,u_opacity:t.opacity*a.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:a.paint.get("raster-brightness-min"),u_brightness_high:a.paint.get("raster-brightness-max"),u_saturation_factor:s1e(a.paint.get("raster-saturation")),u_contrast_factor:o1e(a.paint.get("raster-contrast")),u_spin_weights:n1e(a.paint.get("raster-hue-rotate")),u_coords_top:[i[0].x,i[0].y,i[1].x,i[1].y],u_coords_bottom:[i[3].x,i[3].y,i[2].x,i[2].y]}),Z1=class{constructor(e,r,t){this.vertexBuffer=e,this.indexBuffer=r,this.segments=t}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}},G0=pl([{name:"a_pos",type:"Int16",components:2}]),tx=xa/128,dm=class extends Zl{constructor(e,r,t,a){super(),this.imageWarp=hm,this.flippedWindingOrder=!1,this._warp="auto",this._imageDirty=!1,this._subdividedQuad=!1,this._subdividedMesh=null,this.id=e,this.dispatcher=t,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(a),this.options=r}load(e){return yi(this,null,function*(){if(this.options.url===void 0){this._loaded=!0,this._finishLoading();return}this._loaded=!1,this.fire(new Fs("dataloading")),this.url=this.options.url,this._abortController=new AbortController;try{let r=yield Gd.transformAndGetImage(this.map._requestManager,this.url,"Image",this._abortController);this._abortController=null,this._loaded=!0,r?.data?(this._setImage(r.data),e&&(this.coordinates=e),this._finishLoading()):this.fire(new mn(Error(`Could not load image ${this.url}: the response is empty`)))}catch(r){if(S0(r))return;this._abortController=null,this._loaded=!0,this.fire(new mn(Ac(r)))}})}loaded(){return this._loaded}updateImage(e){return this._abortController&&(this._abortController=(this._abortController.abort(),null)),"image"in e?(this._loaded=!0,this._setImage(e.image),e.coordinates&&(this.coordinates=e.coordinates),this._finishLoading(),this):e.url?(this.options.url=e.url,this.load(e.coordinates),this):this}_setImage(e){this.image=e,this._imageDirty=!0}getMesh(e,r){var t;return!this._subdividedQuad||r?null:((t=this._subdividedMesh)!=null||(this._subdividedMesh=h8(e,{granularity:16})),this._subdividedMesh)}_disposeTexture(){var e;(e=this.texture)==null||e.destroy(),this.texture=null}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new Fs("data",{sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){var e;this._abortController&&(this._abortController=(this._abortController.abort(),null)),this._disposeTexture(),(e=this._subdividedMesh)==null||e.destroy(),this._subdividedMesh=null,this.image=null,this.tiles={}}setWarp(e){return this._warp===e?this:(this._warp=e,this.tileCoords&&this.setCoordinates(this.coordinates),this)}getWarp(){return this._warp}setCoordinates(e){this.coordinates=e;let r=e.map($o.fromLngLat);return this.tileID=l1e(r),this.terrainTileRanges=this._getOverlappingTileRanges(r),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=r.map(t=>this.tileID.getTilePoint(t)._round()),this.imageWarp=c1e(this.tileCoords,this._warp),this._subdividedQuad=this.imageWarp[2]>0&&!p8(this.tileCoords),this.flippedWindingOrder=u1e(this.tileCoords),this.fire(new Fs("data",{sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let e=this.map.painter.context,r=e.gl;this.texture?this._imageDirty&&(this.texture.update(this.image),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)):(this.texture=new Kl(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this._imageDirty=!1;let t=!1;for(let a in this.tiles){let i=this.tiles[a];i.state!=="loaded"&&(i.state="loaded",i.texture=this.texture,t=!0)}t&&this.fire(new Fs("data",{sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return yi(this,null,function*(){var r;(r=this.tileID)!=null&&r.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){let e={type:"image",coordinates:this.coordinates};return this.options.url!==void 0&&(e.url=this.options.url),e}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:r,minY:t,maxX:a,maxY:i}=Xh.fromPoints(e),o={};for(let s=0;s<=25;s++){let l=2**s,n=Math.floor(r*l),u=Math.floor(t*l),c=Math.floor(a*l),f=Math.floor(i*l),h=(n%l+l)%l,d=c%l,p=Math.floor(n/l),g=Math.floor(c/l);o[s]={minWrap:p,maxWrap:g,minTileXWrapped:h,maxTileXWrapped:d,minTileY:u,maxTileY:f}}return o}},TC=class extends dm{constructor(e,r,t,a){super(e,r,t,a),this._onPlayingHandler=()=>{var i;(i=this.map)==null||i.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=r}load(){return yi(this,null,function*(){this._loaded=!1;let e=this.options;this.urls=[];for(let r of e.urls)this.urls.push((yield this.map._requestManager.transformRequest(r,"Source")).url);try{let r=yield Hz(this.urls);if(this._loaded=!0,!r)return;this.video=r,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(r){this.fire(new mn(Ac(r)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let r=this.video.seekable;er.end(0)?this.fire(new mn(new qa(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let e=this.map.painter.context,r=e.gl;this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new Kl(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let t=!1;for(let a in this.tiles){let i=this.tiles[a];i.state!=="loaded"&&(i.state="loaded",i.texture=this.texture,t=!0)}t&&this.fire(new Fs("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},MC=class extends dm{constructor(e,r,t,a){super(e,r,t,a),r.coordinates?(!Array.isArray(r.coordinates)||r.coordinates.length!==4||r.coordinates.some(i=>!Array.isArray(i)||i.length!==2||i.some(o=>typeof o!="number")))&&this.fire(new mn(new qa(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new mn(new qa(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&typeof r.animate!="boolean"&&this.fire(new mn(new qa(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?typeof r.canvas!="string"&&!(r.canvas instanceof HTMLCanvasElement)&&this.fire(new mn(new qa(`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 mn(new qa(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=r.animate===void 0||r.animate}load(){return yi(this,null,function*(){if(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 mn(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._playing=(this.prepare(),!1))},this._finishLoading()})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this._playing=!1,super.onRemove()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let r=this.map.painter.context,t=r.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new Kl(r,this.canvas,t.RGBA,{premultiply:!0}),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE));let a=!1;for(let i in this.tiles){let o=this.tiles[i];o.state!=="loaded"&&(o.state="loaded",o.texture=this.texture,a=!0)}a&&this.fire(new Fs("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}},EC={},Rj=(e,r,t,a)=>{let i=new(SC(r.type))(e,r,t,a);if(i.id!==e)throw Error(`Expected Source id to be ${e} instead of ${i.id}`);return i},SC=e=>{switch(e){case"geojson":return AC;case"image":return dm;case"raster":return j3;case"raster-dem":return wC;case"vector":return bC;case"video":return TC;case"canvas":return MC}return EC[e]},zj=(e,r)=>{EC[e]=r},Bj=(e,r)=>yi(null,null,function*(){if(SC(e))throw Error(`A source type called "${e}" already exists.`);zj(e,r)}),U3="RTLPluginLoaded",Oj=class extends Zl{constructor(...e){super(...e),this.status="unavailable",this.url=null,this.dispatcher=qk()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(r=>{throw this.status="error",r})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e,r=!1){return yi(this,null,function*(){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=Hc.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if(this.status==="unavailable")if(r)this.status="deferred",this._syncState(this.status);else return this._requestImport();else if(this.status==="requested")return this._requestImport()})}_requestImport(){return yi(this,null,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new qf(U3))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}},q3=null,kC=class{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=NI(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rttObjects=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading",this.featureStateRevision=-1}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection:r,fadingParentID:t,fadeEndTime:a}){this.resetFadeLogic(),this.fadingRole=e,this.fadingDirection=r,this.fadingParentID=t,this.fadeEndTime=a}setSelfFadeLogic(e){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=e}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=is(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}getRTT(e){return this.rttObjects[e]}acquireRTT(e,r,t){return this.rttObjects[r]=e.acquireRTT(t)}releaseRTT(e){if(this.rttObjects.length!==0){for(let r of this.rttObjects)r&&e.releaseRTT(r);this.rttObjects.length=0}}loadVectorData(e,r,t){if(e?.etagUnmodified===!0){this.state="loaded";return}if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!e){this.collisionBoxArray=new BS;return}e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestEncoding=e.encoding,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=h1e(e.buckets,r?.style),this.hasSymbolBuckets=!1;for(let a in this.buckets){let i=this.buckets[a];if(i instanceof N_)if(this.hasSymbolBuckets=!0,t)i.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let a in this.buckets){let i=this.buckets[a];if(i instanceof N_&&i.hasRTLText){this.hasRTLText=!0,H_().lazyLoad();break}}this.queryPadding=0;for(let a in this.buckets){let i=this.buckets[a];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(a).queryRadius(i))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let a=this.buckets[t];a.uploadPending()&&a.upload(e)}let r=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Kl(e,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasImage=(this.glyphAtlasTexture=new Kl(e,this.glyphAtlasImage,r.ALPHA),null))}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,r,t,a,i,o,s,l,n,u,c){var f;return(f=this.latestFeatureIndex)!=null&&f.rawTileData?this.latestFeatureIndex.query({queryGeometry:a,cameraQueryGeometry:i,scale:o,tileSize:this.tileSize,pixelPosMatrix:u,transform:l,params:s,queryPadding:this.queryPadding*n,getElevation:c},e,r,t):{}}querySourceFeatures(e,r){let t=this.latestFeatureIndex;if(!t?.rawTileData)return;let a=t.loadVTLayers(),i=r?.sourceLayer?r.sourceLayer:"",o=a._geojsonTileLayer||a[i];if(!o)return;let s=t_(r?.filter,`querySourceFeatures[${i}].filter`,r?.globalState),{z:l,x:n,y:u}=this.tileID.canonical,c={z:l,x:n,y:u};for(let f=0;ft)a=!1;else if(!r)a=!0;else if(this.expirationTimethis.max[0]||r.aabb.min[1]>this.max[1]||r.aabb.min[2]>this.max[2]||r.aabb.max[0]0?(t+=r[i]*this.min[i],a+=r[i]*this.max[i]):(a+=r[i]*this.min[i],t+=r[i]*this.max[i]);return t>=0?2:a<0?0:1}},G3=class TQ{constructor(r,t,a){this.points=r,this.planes=t,this.aabb=a}static fromInvProjectionMatrix(r,t=1,a=0,i,o){let s=[[-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]],l=o?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],n=2**a,u=s.map(d=>d1e(d,r,t,n));i&&p1e(u,l[0],i,o);let c=l.map(d=>{let p=hp([],u[d[0]],u[d[1]]),g=hp([],u[d[2]],u[d[1]]),m=xf([],Nf([],p,g)),y=-uu(m,u[d[1]]);return m.concat(y)}),f=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let d of u)for(let p=0;p<3;p++)f[p]=Math.min(f[p],d[p]),h[p]=Math.max(h[p],d[p]);return new TQ(u,c,new V3(f,h))}},jj=Vk(9.314,3),CC=class{constructor(){this._tiles={}}handleWrapJump(e){let r={};for(let t in this._tiles){let a=this._tiles[t];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),r[a.tileID.key]=a}this._tiles=r}setFeatureState(e,r,t){for(let a in this._tiles)this._tiles[a].setFeatureState(e,r,t)}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map(r=>r.tileID).sort(az).map(r=>r.key):Object.keys(this._tiles)}getTileById(e){return this._tiles[e]}setTile(e,r){this._tiles[e]=r}deleteTileById(e){delete this._tiles[e]}getLoadedTile(e){let r=this.getTileById(e.key);return r?.hasData()?r:null}isIdRenderable(e,r=!1){var t;return(t=this.getTileById(e))==null?void 0:t.isRenderable(r)}getRenderableIds(e=0,r){let t=[];for(let a of this.getAllIds())this.isIdRenderable(a,r)&&t.push(this.getTileById(a));return r?t.sort((a,i)=>{let o=a.tileID,s=i.tileID,l=new zr(o.canonical.x,o.canonical.y)._rotate(-e),n=new zr(s.canonical.x,s.canonical.y)._rotate(-e);return o.overscaledZ-s.overscaledZ||n.y-l.y||n.x-l.x}).map(a=>a.tileID.key):t.map(a=>a.tileID).sort(az).map(a=>a.key)}},H3=(K1=class extends Zl{constructor(e,r,t){super(),this._maxContentElevationSeen=0,this.id=e,this.dispatcher=t,this.on("data",a=>{this._dataHandler(a)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=Rj(e,r,t,this),this._inViewTiles=new CC,this._outOfViewCache=new $N(0,a=>this._unloadTile(a)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new Nj,this._didEmitContent=!1,this._updated=!1}onAdd(e){var r;this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,(r=this._source)!=null&&r.onAdd&&this._source.onAdd(e)}onRemove(e){var r;for(let t of this._inViewTiles.getAllTiles())t.unloadVectorData();this.clearTiles(),(r=this._source)!=null&&r.onRemove&&this._source.onRemove(e),this._inViewTiles=new CC}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 e of this._inViewTiles.getAllTiles())if(e.state!=="loaded"&&e.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,t,a){return yi(this,null,function*(){try{let i=yield this._source.loadTile(e);this._tileLoaded(e,r,t,a,i)}catch(i){e.state="errored",i.status===404?this.update(this.transform,this.terrain):this._source.fire(new mn(Ac(i),{tile:e}))}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new Fs("dataabort",{tile:e,coord:e.tileID}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let r of this._inViewTiles.getAllTiles())r.upload(e),r.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(e){var r;return this._inViewTiles.getRenderableIds((r=this.transform)==null?void 0:r.bearingInRadians,e)}hasRenderableParent(e){let r=e.overscaledZ-1;if(r>=this._source.minzoom){let t=this.getLoadedTile(e.scaledTo(r));if(t)return this._inViewTiles.isIdRenderable(t.tileID.key)}return!1}reload(e,r=void 0){if(this._paused){this._shouldReloadOnResume=!0;return}this._outOfViewCache.reset();for(let t of this._inViewTiles.getAllIds()){let a=this._inViewTiles.getTileById(t);(!r||this._source.shouldReloadTile(a,r))&&(e?this._reloadTile(t,a.state==="errored"?"loading":"expired"):a.state!=="errored"&&this._reloadTile(t,"reloading"))}}_reloadTile(e,r){return yi(this,null,function*(){let t=this._inViewTiles.getTileById(e);if(!t)return;let a=t.hasData();t.state!=="loading"&&(t.state=r),yield this._loadTile(t,e,r,a)})}_tileLoaded(e,r,t,a,i){a||(e.timeAdded=is(),e.selfFading&&(e.fadeEndTime=e.timeAdded+this._rasterFadeDuration)),t==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),!i?.unmodified&&(this.getSource().type==="raster-dem"&&e.dem&&M1e(e,this._inViewTiles),e.featureStateRevision=-1,this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new Fs("data",{tile:e,coord:e.tileID})))}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._inViewTiles.getTileById(e)}_retainLoadedChildren(e,r){let t=this._getLoadedDescendents(r),a=new Set;for(let i of r){let o=t[i.key];if(!o?.length){a.add(i);continue}let s=i.overscaledZ+K1.maxOverzooming,l=o.filter(c=>c.tileID.overscaledZ<=s);if(!l.length){a.add(i);continue}let n=Math.min(...l.map(c=>c.tileID.overscaledZ)),u=l.filter(c=>c.tileID.overscaledZ===n).map(c=>c.tileID);for(let c of u)e[c.key]=c;this._areDescendentsComplete(u,n,i.overscaledZ)||a.add(i)}return a}_getLoadedDescendents(e){var r;let t={};for(let a of this._inViewTiles.getAllTiles().filter(i=>i.hasData()))for(let i of e)a.tileID.isChildOf(i)&&(t[r=i.key]||(t[r]=[]),t[i.key].push(a));return t}_areDescendentsComplete(e,r,t){return e.length===1&&e[0].isOverscaled()?e[0].overscaledZ===r:4**(r-t)===e.length}getLoadedTile(e){return this._inViewTiles.getLoadedTile(e)}updateCacheSize(e){let r=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),t=this._maxTileCacheZoomLevels===null?Uf.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels,a=Math.floor(r*t),i=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,a):a;this._outOfViewCache.setMaxSize(i)}handleWrapJump(e){let r=(e-(this._prevLng===void 0?e:this._prevLng))/360,t=Math.round(r);this._prevLng=e,t&&(this._inViewTiles.handleWrapJump(t),this._resetTileReloadTimers())}_updateMaxContentElevation(){var e,r;let t=this._maxContentElevationSeen,a=(r=(e=this.map)==null?void 0:e.style)==null?void 0:r._layers;if(!a)return t;let i=this._inViewTiles.getAllTiles();for(let o in a){let s=a[o];if(s.type!=="symbol"||s.source!==this.id||s.isHidden(this.transform.zoom))continue;let l=s;if(l.layout){t=Math.max(t,l.layout.get("symbol-height-offset").constantOr(0));for(let n of i){let u=n.getBucket(s);u&&u.maxHeightOffset>t&&(t=u.maxHeightOffset)}}}return this._maxContentElevationSeen=t,t}update(e,r){if(!this._sourceLoaded||this._paused)return;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng);let t;!this.used&&!this.usedForTerrain?t=[]:this._source.tileID?t=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(l=>new Yu(l.canonical.z,l.wrap,l.canonical.z,l.canonical.x,l.canonical.y)):(t=W1(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?Math.max(this._source.maxzoom,e.maxZoom-this.map._zoomLevelsToOverscale):this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom,maxContentElevation:this._updateMaxContentElevation()}),this._source.hasTile&&(t=t.filter(l=>this._source.hasTile(l)))),this.usedForTerrain&&(t=this._addTerrainIdealTiles(t));let a=t.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,a&&this.fire(new Fs("data",{sourceDataType:"idle",sourceId:this.id}));let i=Gk(e,this._source),o=this._updateRetainedTiles(t,i),s=g8(this._source.type);s&&this._rasterFadeDuration>0&&!r&&x1e(this._inViewTiles,t,o,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),s?this._cleanUpRasterTiles(o):this._cleanUpVectorTiles(o)}_cleanUpRasterTiles(e){for(let r of this._inViewTiles.getAllIds())e[r]||this._removeTile(r)}_cleanUpVectorTiles(e){for(let r of this._inViewTiles.getAllIds()){let t=this._inViewTiles.getTileById(r);if(e[r]){t.clearSymbolFadeHold();continue}if(!t.hasSymbolBuckets){this._removeTile(r);continue}t.holdingForSymbolFade()?t.symbolFadeFinished()&&this._removeTile(r):t.setSymbolHoldDuration(this.map._fadeDuration)}}_addTerrainIdealTiles(e){let r=[];for(let t of e)if(t.canonical.z>this._source.minzoom){let a=t.scaledTo(t.canonical.z-1);r.push(a);let i=t.scaledTo(Math.max(this._source.minzoom,Math.min(t.canonical.z,5)));r.push(i)}return e.concat(r)}releaseSymbolFadeTiles(){for(let e of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(e).holdingForSymbolFade()&&this._removeTile(e)}_updateRetainedTiles(e,r){var t;let a=new Set;for(let n of e)this._addTile(n).hasData()||a.add(n);let i=e.reduce((n,u)=>(n[u.key]=u,n),{}),o=this._retainLoadedChildren(i,a),s={},l=Math.max(r-K1.maxUnderzooming,this._source.minzoom);for(let n of o){let u=this._inViewTiles.getTileById(n.key),c=u?.wasRequested();for(let f=n.overscaledZ-1;f>=l;--f){let h=n.scaledTo(f);if(s[h.key])break;if(s[h.key]=!0,u=this.getTile(h),!u&&c&&(u=this._addTile(h)),u){let d=u.hasData();if((d||!((t=this.map)!=null&&t.cancelPendingTileRequestsWhileZooming)||c)&&(i[h.key]=h),c=u.wasRequested(),d)break}}}return i}_addTile(e){let r=this._inViewTiles.getTileById(e.key);if(r)return r;r=this._outOfViewCache.getAndRemove(e),r&&(r.resetFadeLogic(),this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null));let t=r;return r||(r=new kC(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state,!1)),r.uses++,this._inViewTiles.setTile(e.key,r),t||this._source.fire(new Fs("dataloading",{tile:r,coord:r.tileID})),r}_setTileReloadTimer(e,r){this._clearTileReloadTimer(e);let t=r.getExpiryTimeout();if(t){let a=()=>{this._reloadTile(e,"expired"),delete this._timers[e]};this._timers[e]=setTimeout(a,t)}}_clearTileReloadTimer(e){let r=this._timers[e];r&&(clearTimeout(r),delete this._timers[e])}_resetTileReloadTimers(){for(let e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(let e of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(e);this._setTileReloadTimer(e,r)}}refreshTiles(e){for(let r of this._inViewTiles.getAllIds()){let t=this._inViewTiles.getTileById(r);(this._inViewTiles.isIdRenderable(r)||t.state=="errored")&&e.some(a=>a.equals(t.tileID.canonical))&&this._reloadTile(r,"expired")}}_removeTile(e){let r=this._inViewTiles.getTileById(e);r&&(r.uses--,this._inViewTiles.deleteTileById(e),this._clearTileReloadTimer(e),!(r.uses>0)&&(r.hasData()&&r.state!=="reloading"?this._outOfViewCache.add(r.tileID,r,r.getExpiryTimeout()):(r.aborted=!0,this._abortTile(r),this._unloadTile(r))))}_dataHandler(e){if(e.dataType==="source"){if(e.sourceDataType==="metadata"){this._sourceLoaded=!0;return}e.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(e.sourceDataChanged,e.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}}resetMaxContentElevation(){this._maxContentElevationSeen=0}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1,this.resetMaxContentElevation();for(let e of this._inViewTiles.getAllIds())this._removeTile(e);this._outOfViewCache.reset()}tilesIn(e,r,t){let a=[],i=this.transform;if(!i)return a;let o=i.getCoveringTilesDetailsProvider().allowWorldCopies(),s=t?i.getCameraQueryGeometry(e):e,l=h=>i.screenPointToMercatorCoordinate(h,this.terrain),n=this.transformBbox(e,l,!o),u=this.transformBbox(s,l,!o),c=this.getIds(),f=Xh.fromPoints(u);for(let h of c){let d=this._inViewTiles.getTileById(h);if(d.holdingForSymbolFade())continue;let p=o?[d.tileID]:[d.tileID.unwrapTo(-1),d.tileID.unwrapTo(0)],g=2**(i.zoom-d.tileID.overscaledZ),m=r*d.queryPadding*xa/d.tileSize/g;for(let y of p){let _=f.map(v=>y.getTilePoint(new $o(v.x,v.y)));if(_.expandBy(m),_.intersects(CO)){let v=n.map(E=>y.getTilePoint(E)),x=u.map(E=>y.getTilePoint(E));a.push({tile:d,tileID:o?y:y.unwrapTo(0),queryGeometry:v,cameraQueryGeometry:x,scale:g})}}}return a}transformBbox(e,r,t){let a=e.map(r);if(t){let i=Xh.fromPoints(e);i.shrinkBy(Math.min(i.width(),i.height())*.001);let o=i.map(r);Xh.fromPoints(a).covers(o)||(a=a.map(s=>s.x>.5?new $o(s.x-1,s.y,s.z):s))}return a}getVisibleCoordinates(e){let r=this.getRenderableIds(e).map(t=>this._inViewTiles.getTileById(t).tileID);return this.transform&&this.transform.populateCache(r),r}hasTransition(){return this._source.hasTransition()?!0:g8(this._source.type)&&T1e(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(e){this._rasterFadeDuration=e}setFeatureState(e,r,t){e||(e=q_),this._state.updateState(e,r,t)}removeFeatureState(e,r,t){e||(e=q_),this._state.removeFeatureState(e,r,t)}getFeatureState(e,r){return e||(e=q_),this._state.getState(e,r)}setDependencies(e,r,t){let a=this._inViewTiles.getTileById(e);a&&a.setDependencies(r,t)}reloadTilesForDependencies(e,r){for(let t of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(t).hasDependency(e,r)&&this._reloadTile(t,"reloading");this._outOfViewCache.filter(t=>!t.hasDependency(e,r))}areTilesLoaded(){for(let e of this._inViewTiles.getAllTiles())if(e.state!=="loaded"&&e.state!=="errored")return!1;return!0}},K1.maxUnderzooming=10,K1.maxOverzooming=3,K1),Uj=class{constructor(e,r){this.reset(e,r)}reset(e,r){this.points=e||[],this._distances=[0];for(let t=1;t0?(a-o)/s:0;return this.points[i].mult(1-l).add(this.points[r].mult(l))}},DC=class{constructor(e,r,t){let a=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/t),this.yCellCount=Math.ceil(r/t);for(let o=0;othis.width||a<0||r>this.height)return[];let l=[];if(e<=0&&r<=0&&this.width<=t&&this.height<=a){if(i)return[{key:null,x1:e,y1:r,x2:t,y2:a}];for(let n=0;n0}hitTestCircle(e,r,t,a,i){let o=e-t,s=e+t,l=r-t,n=r+t;if(s<0||o>this.width||n<0||l>this.height)return!1;let u=[],c={hitTest:!0,overlapMode:a,circle:{x:e,y:r,radius:t},seenUids:{box:{},circle:{}}};return this._forEachCell(o,l,s,n,this._queryCellCircle,u,c,i),u.length>0}_queryCell(e,r,t,a,i,o,s,l){let{seenUids:n,hitTest:u,overlapMode:c}=s,f=this.boxCells[i],h=1e-6;if(f!==null){let p=this.bboxes;for(let g of f)if(!n.box[g]){n.box[g]=!0;let m=g*4,y=this.boxKeys[g];if(e<=p[m+2]+h&&r<=p[m+3]+h&&t>=p[m+0]-h&&a>=p[m+1]-h&&(!l||l(y))&&(!u||!_3(c,y.overlapMode))&&(o.push({key:y,x1:p[m],y1:p[m+1],x2:p[m+2],y2:p[m+3]}),u))return!0}}let d=this.circleCells[i];if(d!==null){let p=this.circles;for(let g of d)if(!n.circle[g]){n.circle[g]=!0;let m=g*3,y=this.circleKeys[g];if(this._circleAndRectCollide(p[m],p[m+1],p[m+2],e,r,t,a)&&(!l||l(y))&&(!u||!_3(c,y.overlapMode))){let _=p[m],v=p[m+1],x=p[m+2];if(o.push({key:y,x1:_-x,y1:v-x,x2:_+x,y2:v+x}),u)return!0}}}return!1}_queryCellCircle(e,r,t,a,i,o,s,l){let{circle:n,seenUids:u,overlapMode:c}=s,f=this.boxCells[i];if(f!==null){let d=this.bboxes;for(let p of f)if(!u.box[p]){u.box[p]=!0;let g=p*4,m=this.boxKeys[p];if(this._circleAndRectCollide(n.x,n.y,n.radius,d[g+0],d[g+1],d[g+2],d[g+3])&&(!l||l(m))&&!_3(c,m.overlapMode))return o.push(!0),!0}}let h=this.circleCells[i];if(h!==null){let d=this.circles;for(let p of h)if(!u.circle[p]){u.circle[p]=!0;let g=p*3,m=this.circleKeys[p];if(this._circlesCollide(d[g],d[g+1],d[g+2],n.x,n.y,n.radius)&&(!l||l(m))&&!_3(c,m.overlapMode))return o.push(!0),!0}}}_forEachCell(e,r,t,a,i,o,s,l){let n=this._convertToXCellCoord(e),u=this._convertToYCellCoord(r),c=this._convertToXCellCoord(t),f=this._convertToYCellCoord(a);for(let h=n;h<=c;h++)for(let d=u;d<=f;d++){let p=this.xCellCount*d+h;if(i.call(this,e,r,t,a,p,o,s,l))return}}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,r,t,a,i,o){let s=a-e,l=i-r,n=t+o;return n*n>s*s+l*l}_circleAndRectCollide(e,r,t,a,i,o,s){let l=(o-a)/2,n=Math.abs(e-(a+l));if(n>l+t)return!1;let u=(s-i)/2,c=Math.abs(r-(i+u));if(c>u+t)return!1;if(n<=l||c<=u)return!0;let f=n-l,h=c-u;return f*f+h*h<=t*t}},qj=w0(),Vj=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]),Gj=class{constructor(e,r=new DC(e.width+200,e.height+200,25),t=new DC(e.width+200,e.height+200,25)){this.transform=e,this.grid=r,this.ignoredGrid=t,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+100,this.screenBottomBoundary=e.height+100,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,r,t,a,i,o,s,l,n,u,c,f,h=0,d=!0){let p=e.anchorPointX+l[0],g=e.anchorPointY+l[1],m=this.projectAndGetPerspectiveRatio(p,g,i,y3(u,p,g,h,d),f),y=t*m.perspectiveRatio,_;if(!o&&!s){let k=m.x+(c?c.x*y:0),T=m.y+(c?c.y*y:0);_={allPointsOccluded:!1,box:[k+e.x1*y,T+e.y1*y,k+e.x2*y,T+e.y2*y]}}else _=this._projectCollisionBox(e,y,a,i,o,s,l,m,u,c,f,h,d);let[v,x,E,M]=_.box,C=o?_.allPointsOccluded:m.isOccluded,w=C;return w||(w=m.perspectiveRatio=1;I--)R.push(F.path[I]);for(let I=1;IL.signedDistanceFromCamera<=0)?[]:I.map(L=>L.point)}let z=[];if(R.length>0){let I=R[0].clone(),L=R[0].clone();for(let B=1;B=b.x&&L.x<=S.x&&I.y>=b.y&&L.y<=S.y?[R]:L.xS.x||L.yS.y?[]:Y5([R],b.x,b.y,S.x,S.y)}for(let I of z){A.reset(I,T*.25);let L=0;L=A.length<=.5*T?1:Math.ceil(A.paddedLength/P)+1;for(let B=0;B=this.screenRightBoundary||a<100||r>this.screenBottomBoundary}isInsideGrid(e,r,t,a){return t>=0&&e=0&&rthis.projectAndGetPerspectiveRatio(R.x,R.y,a,y3(n,R.x,R.y,f,h),c));F=D.some(R=>!R.isOccluded),A=D.map(R=>new zr(R.x,R.y))}else F=!0;return{box:Cce(A),allPointsOccluded:!F}}},LC=class{constructor(e,r,t,a){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?r:-r))):a&&t?1:0,this.placed=t}isHidden(){return this.opacity===0&&!this.placed}},J1=class{constructor(e,r,t,a,i){this.text=new LC(e?e.text:null,r,t,i),this.icon=new LC(e?e.icon:null,r,a,i)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}},FC=class{constructor(e,r,t){this.text=e,this.icon=r,this.skipFade=t}},Hj=class{constructor(e,r,t,a,i){this.bucketInstanceId=e,this.featureIndex=r,this.sourceLayerIndex=t,this.bucketIndex=a,this.tileID=i}},Wj=class{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let r=++this.maxGroupID;this.collisionGroups[e]={ID:r,predicate:t=>t.collisionGroupID===r}}return this.collisionGroups[e]}},$j=class{constructor(e,r,t,a,i){this.transform=e.clone(),this.terrain=r,this.collisionIndex=new Gj(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=t,this.retainedQueryData={},this.collisionGroups=new Wj(a),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=i,i&&(i.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let r=this.terrain;if(r)return(t,a)=>r.getElevation(e,t,a)}getBucketParts(e,r,t,a){let i=t.getBucket(r),o=t.latestFeatureIndex;if(!i||!o||r.id!==i.layerIds[0])return;let s=t.collisionBoxArray,l=i.layers[0].layout,n=i.layers[0].paint,u=2**(this.transform.zoom-t.tileID.overscaledZ),c=t.tileSize/xa,f=t.tileID.toUnwrapped(),h=l.get("text-rotation-alignment")==="map",d=uh(t,1,this.transform.zoom),p=M0(this.collisionIndex.transform,t,n.get("text-translate"),n.get("text-translate-anchor")),g=M0(this.collisionIndex.transform,t,n.get("icon-translate"),n.get("icon-translate-anchor")),m=Hk(h,this.transform,d);this.retainedQueryData[i.bucketInstanceId]=new Hj(i.bucketInstanceId,o,i.sourceLayerIndex,i.index,t.tileID);let y={bucket:i,layout:l,translationText:p,translationIcon:g,unwrappedTileID:f,pitchedLabelPlaneMatrix:m,scale:u,textPixelRatio:c,holdingForFade:t.holdingForSymbolFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:I2(i.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(i.sourceID)};if(a)for(let _ of i.sortKeyRanges){let{sortKey:v,symbolInstanceStart:x,symbolInstanceEnd:E}=_;e.push({sortKey:v,symbolInstanceStart:x,symbolInstanceEnd:E,parameters:y})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:i.symbolInstances.length,parameters:y})}attemptAnchorPlacement(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_,v,x,E){var M,C,w;let k=t3[e.textAnchor],T=[e.textOffset0,e.textOffset1],b=E8(k,t,a,T,i),S=this.collisionIndex.placeCollisionBox(r,f,l,n,u,s,o,g,c.predicate,_,b,v,x,E);if((!y||this.collisionIndex.placeCollisionBox(y,f,l,n,u,s,o,m,c.predicate,_,b,v,x,E).placeable)&&S.placeable){let A;if((M=this.prevPlacement)!=null&&M.variableOffsets[h.crossTileID]&&((w=(C=this.prevPlacement)==null?void 0:C.placements[h.crossTileID])!=null&&w.text)&&(A=this.prevPlacement.variableOffsets[h.crossTileID].anchor),h.crossTileID===0)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[h.crossTileID]={textOffset:T,width:t,height:a,anchor:k,textBoxScale:i,prevAnchor:A},this.markUsedJustification(d,k,h,p),d.allowVerticalPlacement&&(this.markUsedOrientation(d,p,h),this.placedOrientations[h.crossTileID]=p),{shift:b,placedGlyphBoxes:S}}}placeLayerBucketPart(e,r,t){let{bucket:a,layout:i,translationText:o,translationIcon:s,unwrappedTileID:l,pitchedLabelPlaneMatrix:n,textPixelRatio:u,holdingForFade:c,collisionBoxArray:f,partiallyEvaluatedTextSize:h,collisionGroup:d}=e.parameters,p=i.get("text-optional"),g=i.get("icon-optional"),m=O2(i,"text-overlap","text-allow-overlap"),y=m==="always",_=O2(i,"icon-overlap","icon-allow-overlap"),v=_==="always",x=i.get("text-rotation-alignment")==="map",E=i.get("text-pitch-alignment")==="map",M=i.get("icon-text-fit")!=="none",C=i.get("symbol-z-order")==="viewport-y",w=i.get("symbol-height-anchor")==="ground",k=y&&(v||!a.hasIconData()||g),T=v&&(y||!a.hasTextData()||p);!a.collisionArrays&&f&&a.deserializeCollisionBoxes(f);let b=this.retainedQueryData[a.bucketInstanceId].tileID,S=this._getTerrainElevationFunc(b),A=this.transform.getFastPathSimpleProjectionMatrix(b),F=(D,R,P)=>{var z,I;if(r[D.crossTileID])return;if(c){this.placements[D.crossTileID]=new FC(!1,!1,!1);return}let L=D.heightOffset,B=!1,O=!1,G=!0,$=null,X={box:null,placeable:!1,offscreen:null,occluded:!1},Z={box:null,placeable:!1,offscreen:null},J=null,N=null,H=null,W=0,U=0,V=0;R.textFeatureIndex?W=R.textFeatureIndex:D.useRuntimeCollisionCircles&&(W=D.featureIndex),R.verticalTextFeatureIndex&&(U=R.verticalTextFeatureIndex);let j=R.textBox;if(j){let ue=xe=>{let he=1;if(a.allowVerticalPlacement&&!xe&&this.prevPlacement){let oe=this.prevPlacement.placedOrientations[D.crossTileID];oe&&(this.placedOrientations[D.crossTileID]=oe,he=oe,this.markUsedOrientation(a,he,D))}return he},fe=(xe,he)=>{if(a.allowVerticalPlacement&&D.numVerticalGlyphVertices>0&&R.verticalTextBox){for(let oe of a.writingModes)if(oe===2?(X=he(),Z=X):X=xe(),X?.placeable)break}else X=xe()},pe=D.textAnchorOffsetStartIndex,we=D.textAnchorOffsetEndIndex;if(we===pe){let xe=(he,oe)=>{let te=this.collisionIndex.placeCollisionBox(he,m,u,b,l,E,x,o,d.predicate,S,void 0,A,L,w);return te?.placeable&&(this.markUsedOrientation(a,oe,D),this.placedOrientations[D.crossTileID]=oe),te};fe(()=>xe(j,1),()=>{let he=R.verticalTextBox;return a.allowVerticalPlacement&&D.numVerticalGlyphVertices>0&&he?xe(he,2):{box:null,offscreen:null}}),ue(X?.placeable)}else{let xe=t3[(I=(z=this.prevPlacement)==null?void 0:z.variableOffsets[D.crossTileID])==null?void 0:I.anchor],he=(te,ie,ee)=>{let ce=te.x2-te.x1,_e=te.y2-te.y1,Se=D.textBoxScale,Me=M&&_==="never"?ie:null,Ue=null,Ge=m==="never"?1:2,Ze="never";xe&&Ge++;for(let Ke=0;Kehe(j,R.iconBox,1),()=>{let te=R.verticalTextBox,ie=X?.placeable;return a.allowVerticalPlacement&&!ie&&D.numVerticalGlyphVertices>0&&te?he(te,R.verticalIconBox,2):{box:null,occluded:!0,offscreen:null}}),X&&(B=X.placeable,G=X.offscreen);let oe=ue(X?.placeable);if(!B&&this.prevPlacement){let te=this.prevPlacement.variableOffsets[D.crossTileID];te&&(this.variableOffsets[D.crossTileID]=te,this.markUsedJustification(a,te.anchor,D,oe))}}}if(J=X,B=J?.placeable,G=J?.offscreen,D.useRuntimeCollisionCircles&&D.centerJustifiedTextSymbolIndex>=0){let ue=a.text.placedSymbolArray.get(D.centerJustifiedTextSymbolIndex),fe=qE(a.textSizeData,h,ue),pe=i.get("text-padding"),we=D.collisionCircleDiameter;N=this.collisionIndex.placeCollisionCircles(m,ue,a.lineVertexArray,a.glyphOffsetArray,fe,l,n,t,E,d.predicate,we,pe,o,S),N.circles.length&&N.collisionDetected&&!t&&vo("Collisions detected, but collision boxes are not shown"),B=y||N.circles.length>0&&!N.collisionDetected,G&&(G=N.offscreen)}if(R.iconFeatureIndex&&(V=R.iconFeatureIndex),R.iconBox){let ue=fe=>this.collisionIndex.placeCollisionBox(fe,_,u,b,l,E,x,s,d.predicate,S,M&&$?$:void 0,A,L,w);Z&&Z.placeable&&R.verticalIconBox?(H=ue(R.verticalIconBox),O=H.placeable):(H=ue(R.iconBox),O=H.placeable),G&&(G=H.offscreen)}let q=p||D.numHorizontalGlyphVertices===0&&D.numVerticalGlyphVertices===0,Y=g||D.numIconVertices===0;!q&&!Y?O=B=O&&B:Y?q||O&&(O=B):B=O&&B;let K=B&&J.placeable,re=O&&H.placeable;if(K&&(Z&&Z.placeable&&U?this.collisionIndex.insertCollisionBox(J.box,m,i.get("text-ignore-placement"),a.bucketInstanceId,U,d.ID):this.collisionIndex.insertCollisionBox(J.box,m,i.get("text-ignore-placement"),a.bucketInstanceId,W,d.ID)),re&&this.collisionIndex.insertCollisionBox(H.box,_,i.get("icon-ignore-placement"),a.bucketInstanceId,V,d.ID),N&&B&&this.collisionIndex.insertCollisionCircles(N.circles,m,i.get("text-ignore-placement"),a.bucketInstanceId,W,d.ID),t&&this.storeCollisionData(a.bucketInstanceId,P,R,J,H,N),D.crossTileID===0)throw Error("symbolInstance.crossTileID can't be 0");if(a.bucketInstanceId===0)throw Error("bucket.bucketInstanceId can't be 0");let se=(B||k)&&!J?.occluded,le=(O||T)&&!H?.occluded;this.placements[D.crossTileID]=new FC(se,le,G||a.justReloaded),r[D.crossTileID]=!0};if(C){if(e.symbolInstanceStart!==0)throw Error("bucket.bucketInstanceId should be 0");let D=a.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let R=D.length-1;R>=0;--R){let P=D[R];F(a.symbolInstances.get(P),a.collisionArrays[P],P)}}else for(let D=e.symbolInstanceStart;D=0&&(o>=0&&l!==o?e.text.placedSymbolArray.get(l).crossTileID=0:e.text.placedSymbolArray.get(l).crossTileID=t.crossTileID)}markUsedOrientation(e,r,t){let a=r===1||r===3?r:0,i=r===2?r:0,o=[t.leftJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.rightJustifiedTextSymbolIndex];for(let s of o)e.text.placedSymbolArray.get(s).placedOrientation=a;t.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(t.verticalPlacedTextSymbolIndex).placedOrientation=i)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let r=this.prevPlacement,t=!1;this.prevZoomAdjustment=r?r.zoomAdjustment(this.transform.zoom):0;let a=r?r.symbolFadeChange(e):1,i=r?r.opacities:{},o=r?r.variableOffsets:{},s=r?r.placedOrientations:{};for(let l in this.placements){let n=this.placements[l],u=i[l];u?(this.opacities[l]=new J1(u,a,n.text,n.icon),t||(t=n.text!==u.text.placed),t||(t=n.icon!==u.icon.placed)):(this.opacities[l]=new J1(null,a,n.text,n.icon,n.skipFade),t||(t=n.text||n.icon))}for(let l in i){let n=i[l];if(!this.opacities[l]){let u=new J1(n,a,!1,!1);u.isHidden()||(this.opacities[l]=u,t||(t=n.text.placed),t||(t=n.icon.placed))}}for(let l in o)!this.variableOffsets[l]&&this.opacities[l]&&!this.opacities[l].isHidden()&&(this.variableOffsets[l]=o[l]);for(let l in s)!this.placedOrientations[l]&&this.opacities[l]&&!this.opacities[l].isHidden()&&(this.placedOrientations[l]=s[l]);if(r&&r.lastPlacementChangeTime===void 0)throw Error("Last placement time for previous placement is not defined");t?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=r?r.lastPlacementChangeTime:e)}updateLayerOpacities(e,r){let t={};for(let a of r){let i=a.getBucket(e);i&&a.latestFeatureIndex&&e.id===i.layerIds[0]&&this.updateBucketOpacities(i,a.tileID,t,a.collisionBoxArray)}}updateBucketOpacities(e,r,t,a){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let i=e.layers[0],o=i.layout,s=new J1(null,0,!1,!1,!0),l=o.get("text-allow-overlap"),n=o.get("icon-allow-overlap"),u=i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"),c=o.get("text-rotation-alignment")==="map",f=o.get("text-pitch-alignment")==="map",h=o.get("icon-text-fit")!=="none",d=new J1(null,0,l&&(n||!e.hasIconData()||o.get("icon-optional")),n&&(l||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&a&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(a);let p=(m,y,_)=>{for(let v=0;v0||v>0,w=y.numIconVertices>0,k=this.placedOrientations[y.crossTileID],T=k===2,b=k===1||k===3;if(C){let A=k8(M.text),F=T?Q1:A;p(e.text,_,F);let D=b?Q1:A;p(e.text,v,D);let R=M.text.isHidden(),P=[y.rightJustifiedTextSymbolIndex,y.centerJustifiedTextSymbolIndex,y.leftJustifiedTextSymbolIndex];for(let L of P)L>=0&&(e.text.placedSymbolArray.get(L).hidden=R||T?1:0);y.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(y.verticalPlacedTextSymbolIndex).hidden=R||b?1:0);let z=this.variableOffsets[y.crossTileID];z&&this.markUsedJustification(e,z.anchor,y,k);let I=this.placedOrientations[y.crossTileID];I&&(this.markUsedJustification(e,"left",y,I),this.markUsedOrientation(e,I,y))}if(w){let A=k8(M.icon),F=!(h&&y.verticalPlacedIconSymbolIndex&&T);if(y.placedIconSymbolIndex>=0){let D=F?A:Q1;p(e.icon,y.numIconVertices,D),e.icon.placedSymbolArray.get(y.placedIconSymbolIndex).hidden=M.icon.isHidden()}if(y.verticalPlacedIconSymbolIndex>=0){let D=F?Q1:A;p(e.icon,y.numVerticalIconVertices,D),e.icon.placedSymbolArray.get(y.verticalPlacedIconSymbolIndex).hidden=M.icon.isHidden()}}let S=g?.has(m)?g.get(m):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let A=e.collisionArrays[m];if(A){let F=new zr(0,0);if(A.textBox||A.verticalTextBox){let D=!0;if(u){let R=this.variableOffsets[x];R?(F=E8(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),c&&F._rotate(f?-this.transform.bearingInRadians:this.transform.bearingInRadians)):D=!1}if(A.textBox||A.verticalTextBox){let R;A.textBox&&(R=T),A.verticalTextBox&&(R=b),S8(e.textCollisionBox.collisionVertexArray,M.text.placed,!D||R,S.text,F.x,F.y)}}if(A.iconBox||A.verticalIconBox){let D=!(b||!A.verticalIconBox),R;A.iconBox&&(R=D),A.verticalIconBox&&(R=!D),S8(e.iconCollisionBox.collisionVertexArray,M.icon.placed,R,S.icon,h?F.x:0,h?F.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}},Yj=2**25,Xj=2**24,Zj=2**17,Kj=2**16,Q1=0,Jj=class{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,r,t,a,i){let o=this._bucketParts;for(;this._currentTileIndexs.sortKey-l.sortKey));this._currentPartIndex!this._forceFullPlacement&&is()-a>2;for(;this._currentPlacementIndex>=0;){let o=r[e[this._currentPlacementIndex]],s=this.placement.collisionIndex.transform.zoom;if(wk(o)&&o.layout&&(!o.minzoom||o.minzoom<=s)&&(!o.maxzoom||o.maxzoom>s)){if(this._inProgressLayer||(this._inProgressLayer=new Jj(o)),this._inProgressLayer.continuePlacement(t[o.source],this.placement,this._showCollisionBoxes,o,i))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}},PC=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ol=new Uint32Array(96),eU=class MQ{static from(r){if(!r||r.byteLength===void 0||r.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[t,a]=new Uint8Array(r,0,2);if(t!==219)throw Error("Data does not appear to be in a KDBush format.");let i=a>>4;if(i!==1)throw Error(`Got v${i} data when expected v1.`);let o=PC[a&15];if(!o)throw Error("Unrecognized array type.");let[s]=new Uint16Array(r,2,1),[l]=new Uint32Array(r,4,1);return new MQ(l,s,o,void 0,r)}constructor(r,t=64,a=Float64Array,i=ArrayBuffer,o){if(isNaN(r)||r<0)throw Error(`Unexpected numItems value: ${r}.`);this.numItems=+r,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=a,this.IndexArrayType=r<65536?Uint16Array:Uint32Array;let s=PC.indexOf(this.ArrayType),l=r*2*this.ArrayType.BYTES_PER_ELEMENT,n=r*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-n%8)%8;if(s<0)throw Error(`Unexpected typed array class: ${a}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,8,r),this.coords=new a(o,8+n+u,r*2),this._pos=r*2,this._finished=!0;else{let c=this.data=new i(8+l+n+u);this.ids=new this.IndexArrayType(c,8,r),this.coords=new a(c,8+n+u,r*2),this._pos=0,this._finished=!1,new Uint8Array(c,0,2).set([219,16+s]),new Uint16Array(c,2,1)[0]=t,new Uint32Array(c,4,1)[0]=r}}add(r,t){let a=this._pos>>1;return this.ids[a]=a,this.coords[this._pos++]=r,this.coords[this._pos++]=t,a}finish(){let r=this._pos>>1;if(r!==this.numItems)throw Error(`Added ${r} items when expected ${this.numItems}.`);return Kk(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(r,t,a,i){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:o,coords:s,nodeSize:l}=this;ol[0]=0,ol[1]=o.length-1,ol[2]=0;let n=3,u=[];for(;n>0;){let c=ol[--n],f=ol[--n],h=ol[--n];if(f-h<=l){for(let m=h;m<=f;m++){let y=s[2*m],_=s[2*m+1];y>=r&&y<=a&&_>=t&&_<=i&&u.push(o[m])}continue}let d=h+f>>1,p=s[2*d],g=s[2*d+1];p>=r&&p<=a&&g>=t&&g<=i&&u.push(o[d]),(c===0?r<=p:t<=g)&&(ol[n++]=h,ol[n++]=d-1,ol[n++]=1-c),(c===0?a>=p:i>=g)&&(ol[n++]=d+1,ol[n++]=f,ol[n++]=1-c)}return u}within(r,t,a){let i=[];return this.withinInto(r,t,a,i),i}withinInto(r,t,a,i){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:o,coords:s,nodeSize:l}=this;ol[0]=0,ol[1]=o.length-1,ol[2]=0;let n=3,u=0,c=a*a;for(;n>0;){let f=ol[--n],h=ol[--n],d=ol[--n];if(h-d<=l){for(let y=d;y<=h;y++)D8(s[2*y],s[2*y+1],r,t)<=c&&(i[u++]=o[y]);continue}let p=d+h>>1,g=s[2*p],m=s[2*p+1];D8(g,m,r,t)<=c&&(i[u++]=o[p]),(f===0?r-a<=g:t-a<=m)&&(ol[n++]=d,ol[n++]=p-1,ol[n++]=1-f),(f===0?r+a>=g:t+a>=m)&&(ol[n++]=p+1,ol[n++]=h,ol[n++]=1-f)}return u}},eg=512/xa/2,tU=class{constructor(e,r,t){this.tileID=e,this.bucketInstanceId=t,this._symbolsByKey={};let a=new Map;for(let i=0;i({x:Math.floor(l.anchorX*eg),y:Math.floor(l.anchorY*eg)})),crossTileIDs:o.map(l=>l.crossTileID)};if(s.positions.length>128){let l=new eU(s.positions.length,16,Uint16Array);for(let{x:n,y:u}of s.positions)l.add(n,u);l.finish(),delete s.positions,s.index=l}this._symbolsByKey[i]=s}}getScaledCoordinates(e,r){let{x:t,y:a,z:i}=this.tileID.canonical,{x:o,y:s,z:l}=r.canonical,n=l-i,u=eg/2**n,c=(o*xa+e.anchorX)*u,f=(s*xa+e.anchorY)*u,h=t*xa*eg,d=a*xa*eg;return{x:Math.floor(c-h),y:Math.floor(f-d)}}findMatches(e,r,t){let a=this.tileID.canonical.ze)}},rU=class{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}},aU=class{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let r=Math.round((e-this.lng)/360);if(r!==0)for(let t in this.indexes){let a=this.indexes[t],i={};for(let o in a){let s=a[o];s.tileID=s.tileID.unwrapTo(s.tileID.wrap+r),i[s.tileID.key]=s}this.indexes[t]=i}this.lng=e}addBucket(e,r,t){var a,i,o;if((a=this.indexes[e.overscaledZ])!=null&&a[e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===r.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let l=0;le.overscaledZ)for(let u in n){let c=n[u];c.tileID.isChildOf(e)&&c.findMatches(r.symbolInstances,e,s)}else{let u=n[e.scaledTo(Number(l)).key];u&&u.findMatches(r.symbolInstances,e,s)}}for(let l=0;l=","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"}}}),Zq=ze({"src/plots/map/styles/arcgis-sat.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),Av=ze({"src/plots/map/constants.js"(J,V){"use strict";var p=(Nv(),Po(nv)).default,b=Xq(),E=Zq(),k='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:E,"satellite-streets":b,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:k,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":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":n,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":a},s=p(o);V.exports={styleValueDflt:"basic",stylesMap:o,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.",fitBoundsPadding:20}}}),ly=ze({"src/plots/map/layout_attributes.js"(J,V){"use strict";var p=Nr(),b=Qn().defaultLine,E=Ml().attributes,k=Qs(),l=su().textposition,e=Al().overrideAll,t=hs().templatedArray,n=Av(),r=k({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=V.exports=e({_arrayAttrRegexps:[p.counterRegex("map",".layers",!0)],domain:E({name:"map"}),style:{valType:"any",values:n.styleValuesMap,dflt:n.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},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("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:b},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:b}},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:r,textposition:p.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}}),q2=ze({"src/traces/scattermap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=gg(),e=su(),t=ly(),n=ws(),r=qs(),a=Ki().extendFlat,o=Al().overrideAll,s=ly(),c=l.line,m=l.marker;V.exports=o({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:a({},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:a({},m.opacity,{dflt:1})},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:b({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:e.connectgaps,marker:a({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},r("marker")),fill:l.fill,fillcolor:k(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:a({},n.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:p(),hovertemplatefallback:E()},"calc","nested")}}),SM=ze({"src/traces/scattermap/constants.js"(J,V){"use strict";var p=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];V.exports={isSupportedFont:function(b){return p.indexOf(b)!==-1}}}}),$q=ze({"src/traces/scattermap/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=id(),k=_d(),l=xd(),e=Od(),t=q2(),n=SM().isSupportedFont;V.exports=function(o,s,c,m){function h(A,x){return p.coerce(o,s,t,A,x)}function v(A,x){return p.coerce2(o,s,t,A,x)}var g=r(o,s,h);if(!g){s.visible=!1;return}if(h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("mode"),h("below"),b.hasMarkers(s)){E(o,s,c,m,h,{noLine:!0,noAngle:!0}),h("marker.allowoverlap"),h("marker.angle");var i=s.marker;i.symbol!=="circle"&&(p.isArrayOrTypedArray(i.size)&&(i.size=i.size[0]),p.isArrayOrTypedArray(i.color)&&(i.color=i.color[0]))}b.hasLines(s)&&(k(o,s,c,m,h,{noDash:!0}),h("connectgaps"));var w=v("cluster.maxzoom"),S=v("cluster.step"),M=v("cluster.color",s.marker&&s.marker.color||c),C=v("cluster.size"),_=v("cluster.opacity"),T=w!==!1||S!==!1||M!==!1||C!==!1||_!==!1,f=h("cluster.enabled",T);if(f||b.hasText(s)){var u=m.font.family;l(o,s,m,h,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:n(u)?u:"Open Sans Regular",weight:m.font.weight,style:m.font.style,size:m.font.size,color:m.font.color}})}h("fill"),s.fill!=="none"&&e(o,s,c,h),p.coerceSelectionMarkerOpacity(s,h)};function r(a,o,s){var c=s("lon")||[],m=s("lat")||[],h=Math.min(c.length,m.length);return o._length=h,h}}}),EM=ze({"src/traces/scattermap/format_labels.js"(J,V){"use strict";var p=Gi();V.exports=function(E,k,l){var e={},t=l[k.subplot]._subplot,n=t.mockAxis,r=E.lonlat;return e.lonLabel=p.tickText(n,n.c2l(r[0]),!0).text,e.latLabel=p.tickText(n,n.c2l(r[1]),!0).text,e}}}),kM=ze({"src/plots/map/convert_text_opts.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=E.split(" "),e=l[0],t=l[1],n=p.isArrayOrTypedArray(k)?p.mean(k):k,r=.5+n/100,a=1.5+n/100,o=["",""],s=[0,0];switch(e){case"top":o[0]="top",s[1]=-a;break;case"bottom":o[0]="bottom",s[1]=a;break}switch(t){case"left":o[1]="right",s[0]=-r;break;case"right":o[1]="left",s[0]=r;break}var c;return o[0]&&o[1]?c=o.join("-"):o[0]?c=o[0]:o[1]?c=o[1]:c="center",{anchor:c,offset:s}}}}),Kq=ze({"src/traces/scattermap/convert.js"(J,V){"use strict";var p=ao(),b=Nr(),E=No().BADNUM,k=Q1(),l=fl(),e=$i(),t=l1(),n=el(),r=SM().isSupportedFont,a=kM(),o=kh().appendArrayPointValue,s=Cs().NEWLINES,c=Cs().BR_TAG_ALL;V.exports=function(_,T){var f=T[0].trace,u=f.visible===!0&&f._length!==0,A=f.fill!=="none",x=n.hasLines(f),z=n.hasMarkers(f),I=n.hasText(f),O=z&&f.marker.symbol==="circle",D=z&&f.marker.symbol!=="circle",B=f.cluster&&f.cluster.enabled,F=m("fill"),P=m("line"),j=m("circle"),U=m("symbol"),$={fill:F,line:P,circle:j,symbol:U};if(!u)return $;var Q;if((A||x)&&(Q=k.calcTraceToLineCoords(T)),A&&(F.geojson=k.makePolygon(Q),F.layout.visibility="visible",b.extendFlat(F.paint,{"fill-color":f.fillcolor})),x&&(P.geojson=k.makeLine(Q),P.layout.visibility="visible",b.extendFlat(P.paint,{"line-width":f.line.width,"line-color":f.line.color,"line-opacity":f.opacity})),O){var re=h(T);j.geojson=re.geojson,j.layout.visibility="visible",B&&(j.filter=["!",["has","point_count"]],$.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":S(f.cluster.color,f.cluster.step),"circle-radius":S(f.cluster.size,f.cluster.step),"circle-opacity":S(f.cluster.opacity,f.cluster.step)}},$.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(f),"text-size":12}}),b.extendFlat(j.paint,{"circle-color":re.mcc,"circle-radius":re.mrc,"circle-opacity":re.mo})}if(O&&B&&(j.filter=["!",["has","point_count"]]),(D||I)&&(U.geojson=v(T,_),b.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),D&&(b.extendFlat(U.layout,{"icon-size":f.marker.size/10}),"angle"in f.marker&&f.marker.angle!=="auto"&&b.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=f.marker.allowoverlap,b.extendFlat(U.paint,{"icon-opacity":f.opacity*f.marker.opacity,"icon-color":f.marker.color,"icon-halo-color":f.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),I)){var ne=(f.marker||{}).size,se=a(f.textposition,ne);b.extendFlat(U.layout,{"text-size":f.textfont.size,"text-anchor":se.anchor,"text-offset":se.offset,"text-font":M(f)}),b.extendFlat(U.paint,{"text-color":f.textfont.color,"text-opacity":f.opacity})}return $};function m(C){return{type:C,geojson:k.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function h(C){var _=C[0].trace,T=_.marker,f=_.selectedpoints,u=b.isArrayOrTypedArray(T.color),A=b.isArrayOrTypedArray(T.size),x=b.isArrayOrTypedArray(T.opacity),z;function I(ne){return _.opacity*ne}function O(ne){return ne/2}var D;u&&(l.hasColorscale(_,"marker")?D=l.makeColorScaleFuncFromTrace(T):D=b.identity);var B;A&&(B=t(_));var F;x&&(F=function(ne){var se=p(ne)?+b.constrain(ne,0,1):0;return I(se)});var P=[];for(z=0;z850?z+=" Black":u>750?z+=" Extra Bold":u>650?z+=" Bold":u>550?z+=" Semi Bold":u>450?z+=" Medium":u>350?z+=" Regular":u>250?z+=" Light":u>150?z+=" Extra Light":z+=" Thin"):A.slice(0,2).join(" ")==="Open Sans"?(z="Open Sans",u>750?z+=" Extrabold":u>650?z+=" Bold":u>550?z+=" Semibold":u>350?z+=" Regular":z+=" Light"):A.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(z="Klokantech Noto Sans",A[3]==="CJK"&&(z+=" CJK"),z+=u>500?" Bold":" Regular")),x&&(z+=" Italic"),z==="Open Sans Regular Italic"?z="Open Sans Italic":z==="Open Sans Regular Bold"?z="Open Sans Bold":z==="Open Sans Regular Bold Italic"?z="Open Sans Bold Italic":z==="Klokantech Noto Sans Regular Italic"&&(z="Klokantech Noto Sans Italic"),r(z)||(z=T);var I=z.split(", ");return I}}}),Jq=ze({"src/traces/scattermap/plot.js"(J,V){"use strict";var p=Nr(),b=Kq(),E=Av().traceLayerPrefix,k={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,n,r,a){this.type="scattermap",this.subplot=t,this.uid=n,this.clusterEnabled=r,this.isHidden=a,this.sourceIds={fill:"source-"+n+"-fill",line:"source-"+n+"-line",circle:"source-"+n+"-circle",symbol:"source-"+n+"-symbol",cluster:"source-"+n+"-circle",clusterCount:"source-"+n+"-circle"},this.layerIds={fill:E+n+"-fill",line:E+n+"-line",circle:E+n+"-circle",symbol:E+n+"-symbol",cluster:E+n+"-cluster",clusterCount:E+n+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,n,r){var a={type:"geojson",data:n.geojson};r&&r.enabled&&p.extendFlat(a,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[t]);o?o.setData(n.geojson):this.subplot.map.addSource(this.sourceIds[t],a)},e.setSourceData=function(t,n){this.subplot.map.getSource(this.sourceIds[t]).setData(n.geojson)},e.addLayer=function(t,n,r){var a={type:n.type,id:this.layerIds[t],source:this.sourceIds[t],layout:n.layout,paint:n.paint};n.filter&&(a.filter=n.filter);for(var o=this.layerIds[t],s,c=this.subplot.getMapLayers(),m=0;m=0;x--){var z=A[x];o.removeLayer(v.layerIds[z])}u||o.removeSource(v.sourceIds.circle)}function w(u){for(var A=k.nonCluster,x=0;x=0;x--){var z=A[x];o.removeLayer(v.layerIds[z]),u||o.removeSource(v.sourceIds[z])}}function M(u){h?i(u):S(u)}function C(u){m?g(u):w(u)}function _(){for(var u=m?k.cluster:k.nonCluster,A=0;A=0;a--){var o=r[a];n.removeLayer(this.layerIds[o]),n.removeSource(this.sourceIds[o])}},V.exports=function(n,r){var a=r[0].trace,o=a.cluster&&a.cluster.enabled,s=a.visible!==!0,c=new l(n,a.uid,o,s),m=b(n.gd,r),h=c.below=n.belowLookup["trace-"+a.uid],v,g,i;if(o)for(c.addSource("circle",m.circle,a.cluster),v=0;v=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),C=M*360,_=a-C;function T(B){var F=B.lonlat;if(F[0]===l||w&&g.indexOf(B.i+1)===-1)return 1/0;var P=b.modHalf(F[0],360),j=F[1],U=v.project([P,j]),$=U.x-m.c2p([_,j]),Q=U.y-h.c2p([P,o]),re=Math.max(3,B.mrc||0);return Math.max(Math.sqrt($*$+Q*Q)-re,1-3/re)}if(p.getClosest(s,T,r),r.index!==!1){var f=s[r.index],u=f.lonlat,A=[b.modHalf(u[0],360)+C,u[1]],x=m.c2p(A),z=h.c2p(A),I=f.mrc||1;r.x0=x-I,r.x1=x+I,r.y0=z-I,r.y1=z+I;var O={};O[c.subplot]={_subplot:v};var D=c._module.formatLabels(f,c,O);return r.lonLabel=D.lonLabel,r.latLabel=D.latLabel,r.color=E(c,f),r.extraText=n(c,f,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function n(r,a,o){if(r.hovertemplate)return;var s=a.hi||r.hoverinfo,c=s.split("+"),m=c.indexOf("all")!==-1,h=c.indexOf("lon")!==-1,v=c.indexOf("lat")!==-1,g=a.lonlat,i=[];function w(S){return S+"\xB0"}return m||h&&v?i.push("("+w(g[1])+", "+w(g[0])+")"):h?i.push(o.lon+w(g[0])):v&&i.push(o.lat+w(g[1])),(m||c.indexOf("text")!==-1)&&k(a,r,i),i.join("
")}V.exports={hoverPoints:t,getExtraText:n}}}),Qq=ze({"src/traces/scattermap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b}}}),eV=ze({"src/traces/scattermap/select.js"(J,V){"use strict";var p=Nr(),b=el(),{BADNUM:E}=No();V.exports=function(l,e){var t;let{cd:n,xaxis:r,yaxis:a}=l,{trace:o}=n[0];if(!b.hasMarkers(o))return[];if(e===!1){for(let h of n)h.selected=0;return[]}let s=(t=r._subplot)==null?void 0:t.map,c=s?.getRenderWorldCopies()&&e.xmax>e.xmin?s.transform.worldSize:0,m=[];for(let h=0;h1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},r}(),s=n(o);let c,m;function h(){return c!=null||(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function v(){if(m==null&&(m=!1,h())){let d=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(d){for(let W=0;W<5*5;W++){let te=4*W;d.fillStyle=`rgb(${te},${te+1},${te+2})`,d.fillRect(W%5,Math.floor(W/5),1,1)}let L=d.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&L[W]!==W){m=!0;break}}}return m||!1}var g=1e-6,i=typeof Float32Array<"u"?Float32Array:Array;function w(){var R=new i(9);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[5]=0,R[6]=0,R[7]=0),R[0]=1,R[4]=1,R[8]=1,R}function S(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}function M(){var R=new i(3);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R}function C(R){var d=R[0],L=R[1],W=R[2];return Math.sqrt(d*d+L*L+W*W)}function _(R,d,L){var W=new i(3);return W[0]=R,W[1]=d,W[2]=L,W}function T(R,d,L){return R[0]=d[0]+L[0],R[1]=d[1]+L[1],R[2]=d[2]+L[2],R}function f(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R}function u(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[0],ge=L[1],Ce=L[2];return R[0]=te*Ce-ue*ge,R[1]=ue*me-W*Ce,R[2]=W*ge-te*me,R}var A,x=C;function z(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3];return R[0]=L[0]*W+L[4]*te+L[8]*ue+L[12]*me,R[1]=L[1]*W+L[5]*te+L[9]*ue+L[13]*me,R[2]=L[2]*W+L[6]*te+L[10]*ue+L[14]*me,R[3]=L[3]*W+L[7]*te+L[11]*ue+L[15]*me,R}function I(){var R=new i(4);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R[3]=1,R}function O(R,d,L,W){var te=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",ue=Math.PI/360;d*=ue,W*=ue,L*=ue;var me=Math.sin(d),ge=Math.cos(d),Ce=Math.sin(L),Te=Math.cos(L),Oe=Math.sin(W),Pe=Math.cos(W);switch(te){case"xyz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"xzy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yxz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yzx":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zxy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zyx":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;default:throw new Error("Unknown angle order "+te)}return R}function D(){var R=new i(2);return i!=Float32Array&&(R[0]=0,R[1]=0),R}function B(R,d){var L=new i(2);return L[0]=R,L[1]=d,L}M(),A=new i(4),i!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),M(),_(1,0,0),_(0,1,0),I(),I(),w(),D();let F=8192;function P(R,d,L){return d*(F/(R.tileSize*Math.pow(2,L-R.tileID.overscaledZ)))}function j(R){return R instanceof Error?R:new Error(typeof R=="string"?R:String(R))}function U(R,d){return(R%d+d)%d}function $(R,d,L){return R*(1-L)+d*L}function Q(R){if(R<=0)return 0;if(R>=1)return 1;let d=R*R,L=d*R;return 4*(R<.5?L:3*(R-d)+L-.75)}function re(R,d,L,W){let te=new s(R,d,L,W);return ue=>te.solve(ue)}let ne=re(.25,.1,.25,1);function se(R,d,L){return Math.min(L,Math.max(d,R))}function G(R,d,L){let W=L-d,te=((R-d)%W+W)%W+d;return te===d?L:te}function X(R,...d){for(let L of d)for(let W in L)R[W]=L[W];return R}let K=1;function H(R,d,L){let W={};for(let te in R)W[te]=d.call(this,R[te],te,R);return W}function Y(R,d,L){let W={};for(let te in R)d.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function q(R){return Array.isArray(R)?R.map(q):typeof R=="object"&&R?H(R,q):R}let Z={};function ee(R){Z[R]||(typeof console<"u"&&console.warn(R),Z[R]=!0)}function ae(R,d,L){return(L.y-R.y)*(d.x-R.x)>(d.y-R.y)*(L.x-R.x)}function he(R){return typeof WorkerGlobalScope<"u"&&R!==void 0&&R instanceof WorkerGlobalScope}let xe=null;function we(R){return typeof ImageBitmap<"u"&&R instanceof ImageBitmap}let Me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Se(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let ue=new VideoFrame(R,{timestamp:0});try{let me=ue?.format;if(!me||!me.startsWith("BGR")&&!me.startsWith("RGB"))throw new Error(`Unrecognized format ${me}`);let ge=me.startsWith("BGR"),Ce=new Uint8ClampedArray(W*te*4);if(yield ue.copyTo(Ce,function(Te,Oe,Pe,it,He){let bt=4*Math.max(-Oe,0),Et=(Math.max(0,Pe)-Pe)*it*4+bt,Qt=4*it,er=Math.max(0,Oe),br=Math.max(0,Pe);return{rect:{x:er,y:br,width:Math.min(Te.width,Oe+it)-er,height:Math.min(Te.height,Pe+He)-br},layout:[{offset:Et,stride:Qt}]}}(R,d,L,W,te)),ge)for(let Te=0;Te{R.removeEventListener(d,L,W)}}}function ke(R){return R*Math.PI/180}function _e(R){return R/Math.PI*180}let ce={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ve={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},le="AbortError";class Ae extends Error{constructor(d=le){super(d instanceof Error?d.message:d),this.name=le,d instanceof Error&&d.stack&&(this.stack=d.stack)}}function Be(R){return R instanceof Error&&R.name===le}function Xe(R){if(R.aborted)throw new Ae(R.reason)}let Ye={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function yt(R){return Ye.REGISTERED_PROTOCOLS[R.substring(0,R.indexOf("://"))]}let gt="global-dispatcher";class Tt extends Error{constructor(d,L,W,te){super(`AJAXError: ${L} (${d}): ${W}`),this.status=d,this.statusText=L,this.url=W,this.body=te}}let At=()=>{var R;return he(self)?(R=self.worker)===null||R===void 0?void 0:R.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},$t=function(R,d){return e(this,void 0,void 0,function*(){var L,W;if(R.url.includes("://")&&!/^https?:|^file:/.test(R.url)){let te=yt(R.url);if(te){let ue=yield te(R,d);return ue.data||R.type!=="arrayBuffer"?ue:X(ue,{data:new ArrayBuffer(0)})}if(he(self)&&(!((L=self.worker)===null||L===void 0)&&L.actor))return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:gt},d)}if(!(te=>{var ue;return te.startsWith("file:")||((ue=At())===null||ue===void 0?void 0:ue.startsWith("file:"))&&!/^\w+:/.test(te)})(R.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(te,ue){return e(this,void 0,void 0,function*(){let me=new Request(te.url,{method:te.method||"GET",body:te.body,credentials:te.credentials,headers:te.headers,cache:te.cache,referrer:At(),referrerPolicy:te.referrerPolicy,signal:ue.signal}),ge,Ce;te.type!=="json"||me.headers.has("Accept")||me.headers.set("Accept","application/json");try{ge=yield fetch(me)}catch(Oe){throw Be(Oe)?Oe:new Tt(0,j(Oe).message,te.url,new Blob)}if(!ge.ok){let Oe=yield ge.blob();throw new Tt(ge.status,ge.statusText,te.url,Oe)}Ce=te.type==="arrayBuffer"||te.type==="image"?ge.arrayBuffer():te.type==="json"?ge.json():ge.text();let Te=yield Ce;return Xe(ue.signal),{data:Te,cacheControl:ge.headers.get("Cache-Control"),expires:ge.headers.get("Expires"),etag:ge.headers.get("ETag")}})}(R,d);if(he(self)&&(!((W=self.worker)===null||W===void 0)&&W.actor))return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:gt},d)}return function(te,ue){return new Promise((me,ge)=>{var Ce;let Te=new XMLHttpRequest;Te.open(te.method||"GET",te.url,!0),te.type!=="arrayBuffer"&&te.type!=="image"||(Te.responseType="arraybuffer");for(let Oe in te.headers)Te.setRequestHeader(Oe,te.headers[Oe]);te.type==="json"&&(Te.responseType="text",!((Ce=te.headers)===null||Ce===void 0)&&Ce.Accept||Te.setRequestHeader("Accept","application/json")),Te.withCredentials=te.credentials==="include",Te.onerror=()=>{ge(new Error(Te.statusText))},Te.onload=()=>{if(!ue.signal.aborted)if((Te.status>=200&&Te.status<300||Te.status===0)&&Te.response!==null){let Oe=Te.response;if(te.type==="json")try{Oe=JSON.parse(Te.response)}catch(Pe){return void ge(Pe)}me({data:Oe,cacheControl:Te.getResponseHeader("Cache-Control"),expires:Te.getResponseHeader("Expires"),etag:Te.getResponseHeader("ETag")})}else{let Oe=new Blob([Te.response],{type:Te.getResponseHeader("Content-Type")});ge(new Tt(Te.status,Te.statusText,te.url,Oe))}},ue.signal.addEventListener("abort",()=>{Te.abort(),ge(new Ae(ue.signal.reason))}),Te.send(te.body)})}(R,d)})};function rr(R){if(!R||R.indexOf("://")<=0||R.startsWith("data:image/")||R.startsWith("blob:"))return!0;let d=new URL(R),L=window.location;return d.protocol===L.protocol&&d.host===L.host}function _r(R,d,L){var W;!((W=L[R])===null||W===void 0)&&W.includes(d)||(L[R]||(L[R]=[]),L[R].push(d))}function Xt(R,d,L){if(L?.[R]){let W=L[R].indexOf(d);W!==-1&&L[R].splice(W,1)}}class or{constructor(d,L={}){X(this,L),this.type=d}}class Ot extends or{constructor(d,L={}){super("error",X({error:d},L))}}class vt{on(d,L){return this._listeners||(this._listeners={}),_r(d,L,this._listeners),{unsubscribe:()=>{this.off(d,L)}}}off(d,L){return Xt(d,L,this._listeners),Xt(d,L,this._oneTimeListeners),this}once(d,L){return L?(this._oneTimeListeners||(this._oneTimeListeners={}),_r(d,L,this._oneTimeListeners),this):new Promise(W=>this.once(d,W))}fire(d,L){var W,te;typeof d=="string"&&(d=new or(d,L||{}));let ue=d.type;if(this.listens(ue)){d.target=this;let me=!((W=this._listeners)===null||W===void 0)&&W[ue]?this._listeners[ue].slice():[];for(let Te of me)Te.call(this,d);let ge=!((te=this._oneTimeListeners)===null||te===void 0)&&te[ue]?this._oneTimeListeners[ue].slice():[];for(let Te of ge)Xt(ue,Te,this._oneTimeListeners),Te.call(this,d);let Ce=this._eventedParent;Ce&&(X(d,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ce.fire(d))}else d instanceof Ot&&console.error(d.error);return this}listens(d){var L,W,te,ue,me;return((W=(L=this._listeners)===null||L===void 0?void 0:L[d])===null||W===void 0?void 0:W.length)>0||((ue=(te=this._oneTimeListeners)===null||te===void 0?void 0:te[d])===null||ue===void 0?void 0:ue.length)>0||((me=this._eventedParent)===null||me===void 0?void 0:me.listens(d))}setEventedParent(d,L){return this._eventedParent=d,this._eventedParentData=L,this}}var ht={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},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},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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:"filter"},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:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","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","feature"]},"property-type":"cross-faded-data-driven"},"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"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let De=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ne(R,d){let L={};for(let W in R)W!=="ref"&&(L[W]=R[W]);return De.forEach(W=>{W in d&&(L[W]=d[W])}),L}function We(R,d){if(Array.isArray(R)){if(!Array.isArray(d)||R.length!==d.length)return!1;for(let L=0;L`:R.itemType.kind==="value"?"array":`array<${d}>`}return R.kind}let li=[Yt,Rt,nr,ur,cr,Rr,Pa,Qr,yn(Zr),La,Xa,un,ja,Nn];function Yn(R,d){if(d.kind==="error")return null;if(R.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!Yn(R.itemType,d.itemType))&&(typeof R.N!="number"||R.N===d.N))return null}else{if(R.kind===d.kind)return null;if(R.kind==="value"){for(let L of li)if(!Yn(L,d))return null}}return`Expected ${Un(R)} but found ${Un(d)} instead.`}function on(R,d){return d.some(L=>L.kind===R.kind)}function en(R,d){return d.some(L=>L==="null"?R===null:L==="array"?Array.isArray(R):L==="object"?R&&!Array.isArray(R)&&typeof R=="object":L===typeof R)}function vi(R,d){return R.kind==="array"&&d.kind==="array"?R.itemType.kind===d.itemType.kind&&typeof R.N=="number":R.kind===d.kind}let Yi=.96422,Ja=.82521,Oa=4/29,lt=6/29,rt=3*lt*lt,fr=lt*lt*lt,lr=Math.PI/180,Tr=180/Math.PI;function Ir(R){return(R%=360)<0&&(R+=360),R}function Dr([R,d,L,W]){let te,ue,me=kt((.2225045*(R=ot(R))+.7168786*(d=ot(d))+.0606169*(L=ot(L)))/1);R===d&&d===L?te=ue=me:(te=kt((.4360747*R+.3850649*d+.1430804*L)/Yi),ue=kt((.0139322*R+.0971045*d+.7141733*L)/Ja));let ge=116*me-16;return[ge<0?0:ge,500*(te-me),200*(me-ue),W]}function ot(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function kt(R){return R>fr?Math.pow(R,1/3):R/rt+Oa}function jt([R,d,L,W]){let te=(R+16)/116,ue=isNaN(d)?te:te+d/500,me=isNaN(L)?te:te-L/200;return te=1*Er(te),ue=Yi*Er(ue),me=Ja*Er(me),[ar(3.1338561*ue-1.6168667*te-.4906146*me),ar(-.9787684*ue+1.9161415*te+.033454*me),ar(.0719453*ue-.2289914*te+1.4052427*me),W]}function ar(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Er(R){return R>lt?R*R*R:rt*(R-Oa)}let xr=Object.hasOwn||function(R,d){return Object.prototype.hasOwnProperty.call(R,d)};function zr(R,d){return xr(R,d)?R[d]:void 0}function Lr(R){return parseInt(R.padEnd(2,R),16)/255}function aa(R,d){return Sa(d?R/100:R,0,1)}function Sa(R,d,L){return Math.min(Math.max(d,R),L)}function wa(R){return!R.some(Number.isNaN)}let pn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function tn(R,d,L){return R+L*(d-R)}function ai(R,d,L){return R.map((W,te)=>tn(W,d[te],L))}class rn{constructor(d,L,W,te=1,ue=!0){this.r=d,this.g=L,this.b=W,this.a=te,ue||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[d,L,W,te]))}static parse(d){if(d instanceof rn)return d;if(typeof d!="string")return;let L=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=zr(pn,W);if(te){let[me,ge,Ce]=te;return[me/255,ge/255,Ce/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let me=W.length<6?1:2,ge=1;return[Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+me)||"ff")]}if(W.startsWith("rgb")){let me=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(me){let[ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br]=me,sr=[Oe||" ",He||" ",Qt].join("");if(sr===" "||sr===" /"||sr===",,"||sr===",,,"){let Mr=[Te,it,Et].join(""),qr=Mr==="%%%"?100:Mr===""?255:0;if(qr){let $r=[Sa(+Ce/qr,0,1),Sa(+Pe/qr,0,1),Sa(+bt/qr,0,1),er?aa(+er,br):1];if(wa($r))return $r}}return}}let ue=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ue){let[me,ge,Ce,Te,Oe,Pe,it,He,bt]=ue,Et=[Ce||" ",Oe||" ",it].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){let Qt=[+ge,Sa(+Te,0,100),Sa(+Pe,0,100),He?aa(+He,bt):1];if(wa(Qt))return function([er,br,sr,Mr]){function qr($r){let _a=($r+er/30)%12,Ca=br*Math.min(sr,1-sr);return sr-Ca*Math.max(-1,Math.min(_a-3,9-_a,1))}return er=Ir(er),br/=100,sr/=100,[qr(0),qr(8),qr(4),Mr]}(Qt)}}}(d);return L?new rn(...L,!1):void 0}get rgb(){let{r:d,g:L,b:W,a:te}=this,ue=te||1/0;return this.overwriteGetter("rgb",[d/ue,L/ue,W/ue,te])}get hcl(){return this.overwriteGetter("hcl",function(d){let[L,W,te,ue]=Dr(d),me=Math.sqrt(W*W+te*te);return[Math.round(1e4*me)?Ir(Math.atan2(te,W)*Tr):NaN,me,L,ue]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Dr(this.rgb))}overwriteGetter(d,L){return Object.defineProperty(this,d,{value:L}),L}toString(){let[d,L,W,te]=this.rgb;return`rgba(${[d,L,W].map(ue=>Math.round(255*ue)).join(",")},${te})`}static interpolate(d,L,W,te="rgb"){switch(te){case"rgb":{let[ue,me,ge,Ce]=ai(d.rgb,L.rgb,W);return new rn(ue,me,ge,Ce,!1)}case"hcl":{let[ue,me,ge,Ce]=d.hcl,[Te,Oe,Pe,it]=L.hcl,He,bt;if(isNaN(ue)||isNaN(Te))isNaN(ue)?isNaN(Te)?He=NaN:(He=Te,ge!==1&&ge!==0||(bt=Oe)):(He=ue,Pe!==1&&Pe!==0||(bt=me));else{let sr=Te-ue;Te>ue&&sr>180?sr-=360:Te180&&(sr+=360),He=ue+W*sr}let[Et,Qt,er,br]=function([sr,Mr,qr,$r]){return sr=isNaN(sr)?0:sr*lr,jt([qr,Math.cos(sr)*Mr,Math.sin(sr)*Mr,$r])}([He,bt??tn(me,Oe,W),tn(ge,Pe,W),tn(Ce,it,W)]);return new rn(Et,Qt,er,br,!1)}case"lab":{let[ue,me,ge,Ce]=jt(ai(d.lab,L.lab,W));return new rn(ue,me,ge,Ce,!1)}}}}rn.black=new rn(0,0,0,1),rn.white=new rn(1,1,1,1),rn.transparent=new rn(0,0,0,0),rn.red=new rn(1,0,0,1);class Ri{constructor(d,L,W){this.sensitivity=d?L?"variant":"case":L?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(d,L){return this.collator.compare(d,L)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let Gn=["bottom","center","top"];class no{constructor(d,L,W,te,ue,me){this.text=d,this.image=L,this.scale=W,this.fontStack=te,this.textColor=ue,this.verticalAlign=me}}class Di{constructor(d){this.sections=d}static fromString(d){return new Di([new no(d,null,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 Di?d:Di.fromString(d)}toString(){return this.sections.length===0?"":this.sections.map(d=>d.text).join("")}}class fn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof fn)return d;if(typeof d=="number")return new fn([d,d,d,d]);if(Array.isArray(d)&&!(d.length<1||d.length>4)){for(let L of d)if(typeof L!="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 fn(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new fn(ai(d.values,L.values,W))}}class Ai{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Ai)return d;if(typeof d=="number")return new Ai([d]);if(Array.isArray(d)){for(let L of d)if(typeof L!="number")return;return new Ai(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new Ai(ai(d.values,L.values,W))}}class jn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof jn)return d;if(typeof d=="string"){let W=rn.parse(d);return W?new jn([W]):void 0}if(!Array.isArray(d))return;let L=[];for(let W of d){if(typeof W!="string")return;let te=rn.parse(W);if(!te)return;L.push(te)}return new jn(L)}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W,te="rgb"){let ue=[];if(d.values.length!=L.values.length)throw new Error(`colorArray: Arrays have mismatched length (${d.values.length} vs. ${L.values.length}), cannot interpolate.`);for(let me=0;me=0&&R<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof L=="number"&&L>=0&&L<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,d,L,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,d,L,W]:[R,d,L]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Vn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof io||R instanceof rn||R instanceof Ri||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi)return!0;if(Array.isArray(R)){for(let d of R)if(!Vn(d))return!1;return!0}if(typeof R=="object"){for(let d in R)if(!Vn(R[d]))return!1;return!0}return!1}function qn(R){if(R===null)return Yt;if(typeof R=="string")return nr;if(typeof R=="boolean")return ur;if(typeof R=="number")return Rt;if(R instanceof rn)return cr;if(R instanceof io)return Rr;if(R instanceof Ri)return ha;if(R instanceof Di)return Pa;if(R instanceof fn)return La;if(R instanceof Ai)return Xa;if(R instanceof jn)return un;if(R instanceof gi)return Nn;if(R instanceof qi)return ja;if(Array.isArray(R)){let d=R.length,L;for(let W of R){let te=qn(W);if(L){if(L===te)continue;L=Zr;break}L=te}return yn(L||Zr,d)}return Qr}function Hi(R){let d=typeof R;return R===null?"":d==="string"||d==="number"||d==="boolean"?String(R):R instanceof rn||R instanceof io||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi?R.toString():JSON.stringify(R)}class Mi{constructor(d,L){this.type=d,this.value=L}static parse(d,L){if(d.length!==2)return L.error(`'literal' expression requires exactly one argument, but found ${d.length-1} instead.`);if(!Vn(d[1]))return L.error("invalid value");let W=d[1],te=qn(W),ue=L.expectedType;return te.kind!=="array"||te.N!==0||!ue||ue.kind!=="array"||typeof ue.N=="number"&&ue.N!==0||(te=ue),new Mi(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let Ro={string:nr,number:Rt,boolean:ur,object:Qr};class go{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W,te=1,ue=d[0];if(ue==="array"){let ge,Ce;if(d.length>2){let Te=d[1];if(typeof Te!="string"||!(Te in Ro)||Te==="object")return L.error('The item type argument of "array" must be one of string, number, boolean',1);ge=Ro[Te],te++}else ge=Zr;if(d.length>3){if(d[2]!==null&&(typeof d[2]!="number"||d[2]<0||d[2]!==Math.floor(d[2])))return L.error('The length argument to "array" must be a positive integer literal',2);Ce=d[2],te++}W=yn(ge,Ce)}else{if(!Ro[ue])throw new Error(`Types doesn't contain name = ${ue}`);W=Ro[ue]}let me=[];for(;ted.outputDefined())}}let Eo={"to-boolean":ur,"to-color":cr,"to-number":Rt,"to-string":nr};class Ao{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[0];if(!Eo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&d.length!==2)return L.error("Expected one argument.");let te=Eo[W],ue=[];for(let me=1;me4?`Invalid rgba value ${JSON.stringify(L)}: expected an array containing either three or four numeric values.`:oo(L[0],L[1],L[2],L[3]),!W))return new rn(L[0]/255,L[1]/255,L[2]/255,L[3])}throw new Xn(W||`Could not parse color from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"padding":{let L;for(let W of this.args){L=W.evaluate(d);let te=fn.parse(L);if(te)return te}throw new Xn(`Could not parse padding from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"numberArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=Ai.parse(L);if(te)return te}throw new Xn(`Could not parse numberArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"colorArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=jn.parse(L);if(te)return te}throw new Xn(`Could not parse colorArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"variableAnchorOffsetCollection":{let L;for(let W of this.args){L=W.evaluate(d);let te=gi.parse(L);if(te)return te}throw new Xn(`Could not parse variableAnchorOffsetCollection from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"number":{let L=null;for(let W of this.args){if(L=W.evaluate(d),L===null)return 0;let te=Number(L);if(!isNaN(te))return te}throw new Xn(`Could not convert ${JSON.stringify(L)} to number.`)}case"formatted":return Di.fromString(Hi(this.args[0].evaluate(d)));case"resolvedImage":return qi.fromString(Hi(this.args[0].evaluate(d)));case"projectionDefinition":return this.args[0].evaluate(d);default:return Hi(this.args[0].evaluate(d))}}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}let ds=["Unknown","Point","LineString","Polygon"];class jo{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ds[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 L=this._parseColorCache.get(d);return L||(L=rn.parse(d),this._parseColorCache.set(d,L)),L}}class Wo{constructor(d,L,W=[],te,ue=new Kr,me=[]){this.registry=d,this.path=W,this.key=W.map(ge=>`[${ge}]`).join(""),this.scope=ue,this.errors=me,this.expectedType=te,this._isConstant=L}parse(d,L,W,te,ue={}){return L?this.concat(L,W,te)._parse(d,ue):this._parse(d,ue)}_parse(d,L){function W(te,ue,me){return me==="assert"?new go(ue,[te]):me==="coerce"?new Ao(ue,[te]):te}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 te=d[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ue=this.registry[te];if(ue){let me=ue.parse(d,this);if(!me)return null;if(this.expectedType){let ge=this.expectedType,Ce=me.type;if(ge.kind!=="string"&&ge.kind!=="number"&&ge.kind!=="boolean"&&ge.kind!=="object"&&ge.kind!=="array"||Ce.kind!=="value"){if(ge.kind==="projectionDefinition"&&["string","array"].includes(Ce.kind)||["color","formatted","resolvedImage"].includes(ge.kind)&&["value","string"].includes(Ce.kind)||["padding","numberArray"].includes(ge.kind)&&["value","number","array"].includes(Ce.kind)||ge.kind==="colorArray"&&["value","string","array"].includes(Ce.kind)||ge.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(Ce.kind))me=W(me,ge,L.typeAnnotation||"coerce");else if(this.checkSubtype(ge,Ce))return null}else me=W(me,ge,L.typeAnnotation||"assert")}if(!(me instanceof Mi)&&me.type.kind!=="resolvedImage"&&this._isConstant(me)){let ge=new jo;try{me=new Mi(me.type,me.evaluate(ge))}catch(Ce){return this.error(Ce.message),null}}return me}return this.error(`Unknown expression "${te}". 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,L,W){let te=typeof d=="number"?this.path.concat(d):this.path,ue=W?this.scope.concat(W):this.scope;return new Wo(this.registry,this._isConstant,te,L||null,ue,this.errors)}error(d,...L){let W=`${this.key}${L.map(te=>`[${te}]`).join("")}`;this.errors.push(new Sr(W,d))}checkSubtype(d,L){let W=Yn(d,L);return W&&this.error(W),W}}class to{constructor(d,L){this.type=L.type,this.bindings=[].concat(d),this.result=L}evaluate(d){return this.result.evaluate(d)}eachChild(d){for(let L of this.bindings)d(L[1]);d(this.result)}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found ${d.length-1} instead.`);let W=[];for(let ue=1;ue=W.length)throw new Xn(`Array index out of bounds: ${L} > ${W.length-1}.`);if(L!==Math.floor(L))throw new Xn(`Array index must be an integer, but found ${L} instead.`);return W[L]}eachChild(d){d(this.index),d(this.input)}outputDefined(){return!1}}class Vi{constructor(d,L){this.type=ur,this.needle=d,this.haystack=L}static parse(d,L){if(d.length!==3)return L.error(`Expected 2 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);return W&&te?on(W.type,[ur,nr,Rt,Yt,Zr])?new Vi(W,te):L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`):null}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!W)return!1;if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);if(!en(W,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`);return W.indexOf(L)>=0}eachChild(d){d(this.needle),d(this.haystack)}outputDefined(){return!0}}class Io{constructor(d,L,W){this.type=Rt,this.needle=d,this.haystack=L,this.fromIndex=W}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);if(!W||!te)return null;if(!on(W.type,[ur,nr,Rt,Yt,Zr]))return L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Io(W,te,ue):null}return new Io(W,te)}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(d)),en(W,["string"])){let ue=W.indexOf(L,te);return ue===-1?-1:[...W.slice(0,ue)].length}if(en(W,["array"]))return W.indexOf(L,te);throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`)}eachChild(d){d(this.needle),d(this.haystack),this.fromIndex&&d(this.fromIndex)}outputDefined(){return!1}}class Xi{constructor(d,L,W,te,ue,me){this.inputType=d,this.type=L,this.input=W,this.cases=te,this.outputs=ue,this.otherwise=me}static parse(d,L){if(d.length<5)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if(d.length%2!=1)return L.error("Expected an even number of arguments.");let W,te;L.expectedType&&L.expectedType.kind!=="value"&&(te=L.expectedType);let ue={},me=[];for(let Te=2;TeNumber.MAX_SAFE_INTEGER)return it.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return it.error("Numeric branch labels must be integer values.");if(W){if(it.checkSubtype(W,qn(bt)))return null}else W=qn(bt);if(ue[String(bt)]!==void 0)return it.error("Branch labels must be unique.");ue[String(bt)]=me.length}let He=L.parse(Pe,Te,te);if(!He)return null;te=te||He.type,me.push(He)}let ge=L.parse(d[1],1,Zr);if(!ge)return null;let Ce=L.parse(d[d.length-1],d.length-1,te);return Ce?ge.type.kind!=="value"&&L.concat(1).checkSubtype(W,ge.type)?null:new Xi(W,te,ge,ue,me,Ce):null}evaluate(d){let L=this.input.evaluate(d);return(qn(L)===this.inputType&&this.outputs[this.cases[L]]||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 Ko{constructor(d,L,W){this.type=d,this.branches=L,this.otherwise=W}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found only ${d.length-1}.`);if(d.length%2!=0)return L.error("Expected an odd number of arguments.");let W;L.expectedType&&L.expectedType.kind!=="value"&&(W=L.expectedType);let te=[];for(let me=1;meL.outputDefined())&&this.otherwise.outputDefined()}}class Uo{constructor(d,L,W,te){this.type=d,this.input=L,this.beginIndex=W,this.endIndex=te}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Rt);if(!W||!te)return null;if(!on(W.type,[yn(Zr),nr,Zr]))return L.error(`Expected first argument to be of type array or string, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Uo(W.type,W,te,ue):null}return new Uo(W.type,W,te)}evaluate(d){let L=this.input.evaluate(d),W=this.beginIndex.evaluate(d),te;if(this.endIndex&&(te=this.endIndex.evaluate(d)),en(L,["string"]))return[...L].slice(W,te).join("");if(en(L,["array"]))return L.slice(W,te);throw new Xn(`Expected first argument to be of type array or string, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input),d(this.beginIndex),this.endIndex&&d(this.endIndex)}outputDefined(){return!1}}function Ls(R,d){let L=R.length-1,W,te,ue=0,me=L,ge=0;for(;ue<=me;)if(ge=Math.floor((ue+me)/2),W=R[ge],te=R[ge+1],W<=d){if(ge===L||dd))throw new Xn("Input is not a number.");me=ge-1}return 0}class Ss{constructor(d,L,W){this.type=d,this.input=L,this.labels=[],this.outputs=[];for(let[te,ue]of W)this.labels.push(te),this.outputs.push(ue)}static parse(d,L){if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=[],ue=null;L.expectedType&&L.expectedType.kind!=="value"&&(ue=L.expectedType);for(let me=1;me=ge)return L.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Te);let Pe=L.parse(Ce,Oe,ue);if(!Pe)return null;ue=ue||Pe.type,te.push([ge,Pe])}return new Ss(ue,W,te)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;return te>=L[ue-1]?W[ue-1].evaluate(d):W[Ls(L,te)].evaluate(d)}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function Vo(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var Vs,Ts,Bo=function(){if(Ts)return Vs;function R(d,L,W,te){this.cx=3*d,this.bx=3*(W-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*L,this.by=3*(te-L)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=L,this.p2x=W,this.p2y=te}return Ts=1,Vs=R,R.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,L){if(L===void 0&&(L=1e-6),d<0)return 0;if(d>1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},Vs}(),_o=Vo(Bo);class Pi{constructor(d,L,W,te,ue){this.type=d,this.operator=L,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[me,ge]of ue)this.labels.push(me),this.outputs.push(ge)}static interpolationFactor(d,L,W,te){let ue=0;if(d.name==="exponential")ue=yo(L,d.base,W,te);else if(d.name==="linear")ue=yo(L,1,W,te);else if(d.name==="cubic-bezier"){let me=d.controlPoints;ue=new _o(me[0],me[1],me[2],me[3]).solve(yo(L,1,W,te))}return ue}static parse(d,L){let[W,te,ue,...me]=d;if(!Array.isArray(te)||te.length===0)return L.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let Te=te[1];if(typeof Te!="number")return L.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:Te}}else{if(te[0]!=="cubic-bezier")return L.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let Te=te.slice(1);if(Te.length!==4||Te.some(Oe=>typeof Oe!="number"||Oe<0||Oe>1))return L.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:Te}}}if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");if(ue=L.parse(ue,2,Rt),!ue)return null;let ge=[],Ce=null;W!=="interpolate-hcl"&&W!=="interpolate-lab"||L.expectedType==un?L.expectedType&&L.expectedType.kind!=="value"&&(Ce=L.expectedType):Ce=cr;for(let Te=0;Te=Oe)return L.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',it);let bt=L.parse(Pe,He,Ce);if(!bt)return null;Ce=Ce||bt.type,ge.push([Oe,bt])}return vi(Ce,Rt)||vi(Ce,Rr)||vi(Ce,cr)||vi(Ce,La)||vi(Ce,Xa)||vi(Ce,un)||vi(Ce,Nn)||vi(Ce,yn(Rt))?new Pi(Ce,W,te,ue,ge):L.error(`Type ${Un(Ce)} is not interpolatable.`)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;if(te>=L[ue-1])return W[ue-1].evaluate(d);let me=Ls(L,te),ge=Pi.interpolationFactor(this.interpolation,te,L[me],L[me+1]),Ce=W[me].evaluate(d),Te=W[me+1].evaluate(d);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return tn(Ce,Te,ge);case"color":return rn.interpolate(Ce,Te,ge);case"padding":return fn.interpolate(Ce,Te,ge);case"colorArray":return jn.interpolate(Ce,Te,ge);case"numberArray":return Ai.interpolate(Ce,Te,ge);case"variableAnchorOffsetCollection":return gi.interpolate(Ce,Te,ge);case"array":return ai(Ce,Te,ge);case"projectionDefinition":return io.interpolate(Ce,Te,ge)}case"interpolate-hcl":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"hcl");case"colorArray":return jn.interpolate(Ce,Te,ge,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"lab");case"colorArray":return jn.interpolate(Ce,Te,ge,"lab")}}}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function yo(R,d,L,W){let te=W-L,ue=R-L;return te===0?0:d===1?ue/te:(Math.pow(d,ue)-1)/(Math.pow(d,te)-1)}let bs={color:rn.interpolate,number:tn,padding:fn.interpolate,numberArray:Ai.interpolate,colorArray:jn.interpolate,variableAnchorOffsetCollection:gi.interpolate,array:ai};class Dl{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=null,te=L.expectedType;te&&te.kind!=="value"&&(W=te);let ue=[];for(let ge of d.slice(1)){let Ce=L.parse(ge,1+ue.length,W,void 0,{typeAnnotation:"omit"});if(!Ce)return null;W=W||Ce.type,ue.push(Ce)}if(!W)throw new Error("No output type");let me=te&&ue.some(ge=>Yn(te,ge.type));return new Dl(me?Zr:W,ue)}evaluate(d){let L,W=null,te=0;for(let ue of this.args)if(te++,W=ue.evaluate(d),W&&W instanceof qi&&!W.available&&(L||(L=W.name),W=null,te===this.args.length&&(W=L)),W!==null)break;return W}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}function hl(R,d){return R==="=="||R==="!="?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 ps(R,d,L,W){return W.compare(d,L)===0}function dl(R,d,L){let W=R!=="=="&&R!=="!=";return class ER{constructor(ue,me,ge){this.type=ur,this.lhs=ue,this.rhs=me,this.collator=ge,this.hasUntypedArgument=ue.type.kind==="value"||me.type.kind==="value"}static parse(ue,me){if(ue.length!==3&&ue.length!==4)return me.error("Expected two or three arguments.");let ge=ue[0],Ce=me.parse(ue[1],1,Zr);if(!Ce)return null;if(!hl(ge,Ce.type))return me.concat(1).error(`"${ge}" comparisons are not supported for type '${Un(Ce.type)}'.`);let Te=me.parse(ue[2],2,Zr);if(!Te)return null;if(!hl(ge,Te.type))return me.concat(2).error(`"${ge}" comparisons are not supported for type '${Un(Te.type)}'.`);if(Ce.type.kind!==Te.type.kind&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error(`Cannot compare types '${Un(Ce.type)}' and '${Un(Te.type)}'.`);W&&(Ce.type.kind==="value"&&Te.type.kind!=="value"?Ce=new go(Te.type,[Ce]):Ce.type.kind!=="value"&&Te.type.kind==="value"&&(Te=new go(Ce.type,[Te])));let Oe=null;if(ue.length===4){if(Ce.type.kind!=="string"&&Te.type.kind!=="string"&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error("Cannot use collator to compare non-string types.");if(Oe=me.parse(ue[3],3,ha),!Oe)return null}return new ER(Ce,Te,Oe)}evaluate(ue){let me=this.lhs.evaluate(ue),ge=this.rhs.evaluate(ue);if(W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!==Te.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new Xn(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ce.kind}, ${Te.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!=="string"||Te.kind!=="string")return d(ue,me,ge)}return this.collator?L(ue,me,ge,this.collator.evaluate(ue)):d(ue,me,ge)}eachChild(ue){ue(this.lhs),ue(this.rhs),this.collator&&ue(this.collator)}outputDefined(){return!0}}}let wu=dl("==",function(R,d,L){return d===L},ps),lu=dl("!=",function(R,d,L){return d!==L},function(R,d,L,W){return!ps(0,d,L,W)}),xc=dl("<",function(R,d,L){return d",function(R,d,L){return d>L},function(R,d,L,W){return W.compare(d,L)>0}),pl=dl("<=",function(R,d,L){return d<=L},function(R,d,L,W){return W.compare(d,L)<=0}),$u=dl(">=",function(R,d,L){return d>=L},function(R,d,L,W){return W.compare(d,L)>=0});class uu{constructor(d,L,W){this.type=ha,this.locale=W,this.caseSensitive=d,this.diacriticSensitive=L}static parse(d,L){if(d.length!==2)return L.error("Expected one argument.");let W=d[1];if(typeof W!="object"||Array.isArray(W))return L.error("Collator options argument must be an object.");let te=L.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,ur);if(!te)return null;let ue=L.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,ur);if(!ue)return null;let me=null;return W.locale&&(me=L.parse(W.locale,1,nr),!me)?null:new uu(te,ue,me)}evaluate(d){return new Ri(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 tl{constructor(d,L,W,te,ue,me){this.type=nr,this.number=d,this.locale=L,this.currency=W,this.unit=te,this.minFractionDigits=ue,this.maxFractionDigits=me}static parse(d,L){if(d.length!==3)return L.error("Expected two arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=d[2];if(typeof te!="object"||Array.isArray(te))return L.error("NumberFormat options argument must be an object.");let ue=null;if(te.locale&&(ue=L.parse(te.locale,1,nr),!ue))return null;let me=null;if(te.currency&&(me=L.parse(te.currency,1,nr),!me))return null;let ge=null;if(te.unit&&(ge=L.parse(te.unit,1,nr),!ge))return null;if(me&&ge)return L.error("NumberFormat options `currency` and `unit` are mutually exclusive");let Ce=null;if(te["min-fraction-digits"]&&(Ce=L.parse(te["min-fraction-digits"],1,Rt),!Ce))return null;let Te=null;return te["max-fraction-digits"]&&(Te=L.parse(te["max-fraction-digits"],1,Rt),!Te)?null:new tl(W,ue,me,ge,Ce,Te)}evaluate(d){return new Intl.NumberFormat(this.locale?this.locale.evaluate(d):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(d):void 0,unit:this.unit?this.unit.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.unit&&d(this.unit),this.minFractionDigits&&d(this.minFractionDigits),this.maxFractionDigits&&d(this.maxFractionDigits)}outputDefined(){return!1}}class vs{constructor(d){this.type=Pa,this.sections=d}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[1];if(!Array.isArray(W)&&typeof W=="object")return L.error("First argument must be an image or text section.");let te=[],ue=!1;for(let me=1;me<=d.length-1;++me){let ge=d[me];if(ue&&typeof ge=="object"&&!Array.isArray(ge)){ue=!1;let Ce=null;if(ge["font-scale"]&&(Ce=L.parse(ge["font-scale"],1,Rt),!Ce))return null;let Te=null;if(ge["text-font"]&&(Te=L.parse(ge["text-font"],1,yn(nr)),!Te))return null;let Oe=null;if(ge["text-color"]&&(Oe=L.parse(ge["text-color"],1,cr),!Oe))return null;let Pe=null;if(ge["vertical-align"]){if(typeof ge["vertical-align"]=="string"&&!Gn.includes(ge["vertical-align"]))return L.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${ge["vertical-align"]}' instead.`);if(Pe=L.parse(ge["vertical-align"],1,nr),!Pe)return null}let it=te[te.length-1];it.scale=Ce,it.font=Te,it.textColor=Oe,it.verticalAlign=Pe}else{let Ce=L.parse(d[me],1,Zr);if(!Ce)return null;let Te=Ce.type.kind;if(Te!=="string"&&Te!=="value"&&Te!=="null"&&Te!=="resolvedImage")return L.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ue=!0,te.push({content:Ce,scale:null,font:null,textColor:null,verticalAlign:null})}}return new vs(te)}evaluate(d){return new Di(this.sections.map(L=>{let W=L.content.evaluate(d);return qn(W)===ja?new no("",W,null,null,null,L.verticalAlign?L.verticalAlign.evaluate(d):null):new no(Hi(W),null,L.scale?L.scale.evaluate(d):null,L.font?L.font.evaluate(d).join(","):null,L.textColor?L.textColor.evaluate(d):null,L.verticalAlign?L.verticalAlign.evaluate(d):null)}))}eachChild(d){for(let L of this.sections)d(L.content),L.scale&&d(L.scale),L.font&&d(L.font),L.textColor&&d(L.textColor),L.verticalAlign&&d(L.verticalAlign)}outputDefined(){return!1}}class os{constructor(d){this.type=ja,this.input=d}static parse(d,L){if(d.length!==2)return L.error("Expected two arguments.");let W=L.parse(d[1],1,nr);return W?new os(W):L.error("No image name provided.")}evaluate(d){let L=this.input.evaluate(d),W=qi.fromString(L);return W&&d.availableImages&&(W.available=d.availableImages.indexOf(L)>-1),W}eachChild(d){d(this.input)}outputDefined(){return!1}}class ms{constructor(d){this.type=Rt,this.input=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=L.parse(d[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?L.error(`Expected argument of type string or array, but found ${Un(W.type)} instead.`):new ms(W):null}evaluate(d){let L=this.input.evaluate(d);if(typeof L=="string")return[...L].length;if(Array.isArray(L))return L.length;throw new Xn(`Expected value to be of type string or array, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input)}outputDefined(){return!1}}let rl=8192;function Fu(R,d){let L=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,d.z);return[Math.round(L*te*rl),Math.round(W*te*rl)]}function zu(R,d){let L=Math.pow(2,d.z);return[(te=(R[0]/rl+d.x)/L,360*te-180),(W=(R[1]/rl+d.y)/L,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Ku(R,d){R[0]=Math.min(R[0],d[0]),R[1]=Math.min(R[1],d[1]),R[2]=Math.max(R[2],d[0]),R[3]=Math.max(R[3],d[1])}function bc(R,d){return!(R[0]<=d[0]||R[2]>=d[2]||R[1]<=d[1]||R[3]>=d[3])}function Lh(R,d,L){let W=R[0]-d[0],te=R[1]-d[1],ue=R[0]-L[0],me=R[1]-L[1];return W*me-ue*te==0&&W*ue<=0&&te*me<=0}function rh(R,d,L,W){return(te=[W[0]-L[0],W[1]-L[1]])[0]*(ue=[d[0]-R[0],d[1]-R[1]])[1]-te[1]*ue[0]!=0&&!(!Nf(R,d,L,W)||!Nf(L,W,R,d));var te,ue}function Ju(R,d,L){for(let W of L)for(let te=0;te(te=R)[1]!=(me=ge[Ce+1])[1]>te[1]&&te[0]<(me[0]-ue[0])*(te[1]-ue[1])/(me[1]-ue[1])+ue[0]&&(W=!W)}var te,ue,me;return W}function ah(R,d){for(let L of d)if(ss(R,L))return!0;return!1}function wc(R,d){for(let L of R)if(!ss(L,d))return!1;for(let L=0;L0&&ge<0||me<0&&ge>0}function Bu(R,d,L){let W=[];for(let te=0;teL[2]){let te=.5*W,ue=R[0]-L[0]>te?-W:L[0]-R[0]>te?W:0;ue===0&&(ue=R[0]-L[2]>te?-W:L[2]-R[0]>te?W:0),R[0]+=ue}Ku(d,R)}function Gc(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let ge of R)for(let Ce of ge){let Te=[Ce.x+ue[0],Ce.y+ue[1]];Ou(Te,d,L,te),me.push(Te)}return me}function pf(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let Ce of R){let Te=[];for(let Oe of Ce){let Pe=[Oe.x+ue[0],Oe.y+ue[1]];Ku(d,Pe),Te.push(Pe)}me.push(Te)}if(d[2]-d[0]<=te/2){(ge=d)[0]=ge[1]=1/0,ge[2]=ge[3]=-1/0;for(let Ce of me)for(let Te of Ce)Ou(Te,d,L,te)}var ge;return me}class $l{constructor(d,L){this.type=ur,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'within' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection"){let te=[];for(let ue of W.features){let{type:me,coordinates:ge}=ue.geometry;me==="Polygon"&&te.push(ge),me==="MultiPolygon"&&te.push(...ge)}if(te.length)return new $l(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new $l(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new $l(W,W)}return L.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(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ss(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ah(Te,ge))return!1}return!0}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!wc(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!pc(Te,ge))return!1}return!0}(d,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let jf=class{constructor(R=[],d=(L,W)=>LW?1:0){if(this.data=R,this.length=this.data.length,this.compare=d,this.length>0)for(let L=(this.length>>1)-1;L>=0;L--)this._down(L)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:d,compare:L}=this,W=d[R];for(;R>0;){let te=R-1>>1,ue=d[te];if(L(W,ue)>=0)break;d[R]=ue,R=te}d[R]=W}_down(R){let{data:d,compare:L}=this,W=this.length>>1,te=d[R];for(;R=0)break;d[R]=d[ue],R=ue}d[R]=te}};function Hc(R,d,L=0,W=R.length-1,te=Qu){for(;W>L;){if(W-L>600){let Ce=W-L+1,Te=d-L+1,Oe=Math.log(Ce),Pe=.5*Math.exp(2*Oe/3),it=.5*Math.sqrt(Oe*Pe*(Ce-Pe)/Ce)*(Te-Ce/2<0?-1:1);Hc(R,d,Math.max(L,Math.floor(d-Te*Pe/Ce+it)),Math.min(W,Math.floor(d+(Ce-Te)*Pe/Ce+it)),te)}let ue=R[d],me=L,ge=W;for(Wc(R,L,d),te(R[W],ue)>0&&Wc(R,L,W);me0;)ge--}te(R[L],ue)===0?Wc(R,L,ge):(ge++,Wc(R,ge,W)),ge<=d&&(L=ge+1),d<=ge&&(W=ge-1)}}function Wc(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function Qu(R,d){return Rd?1:0}function Yc(R,d){if(R.length<=1)return[R];let L=[],W,te;for(let ue of R){let me=Uf(ue);me!==0&&(ue.area=Math.abs(me),te===void 0&&(te=me<0),te===me<0?(W&&L.push(W),W=[ue]):W.push(ue))}if(W&&L.push(W),d>1)for(let ue=0;ue1?(Te=d[Ce+1][0],Oe=d[Ce+1][1]):He>0&&(Te+=Pe/this.kx*He,Oe+=it/this.ky*He)),Pe=this.wrap(L[0]-Te)*this.kx,it=(L[1]-Oe)*this.ky;let bt=Pe*Pe+it*it;bt180;)d-=360;return d}}function Zc(R,d){return d[0]-R[0]}function ec(R){return R[1]-R[0]+1}function cu(R,d){return R[1]>=R[0]&&R[1]R[1])return[null,null];let L=ec(R);if(d){if(L===2)return[R,null];let te=Math.floor(L/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(L===1)return[R,null];let W=Math.floor(L/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function vf(R,d){if(!cu(d,R.length))return[1/0,1/0,-1/0,-1/0];let L=[1/0,1/0,-1/0,-1/0];for(let W=d[0];W<=d[1];++W)Ku(L,R[W]);return L}function Tu(R){let d=[1/0,1/0,-1/0,-1/0];for(let L of R)for(let W of L)Ku(d,W);return d}function nh(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function vl(R,d,L){if(!nh(R)||!nh(d))return NaN;let W=0,te=0;return R[2]d[2]&&(W=R[0]-d[2]),R[1]>d[3]&&(te=R[1]-d[3]),R[3]=W)return W;if(bc(te,ue)){if(mf(R,d))return 0}else if(mf(d,R))return 0;let me=1/0;for(let ge of R)for(let Ce=0,Te=ge.length,Oe=Te-1;Ce0;){let Ce=me.pop();if(Ce[0]>=ue)continue;let Te=Ce[1],Oe=d?50:100;if(ec(Te)<=Oe){if(!cu(Te,R.length))return NaN;if(d){let Pe=Mc(R,Te,L,W);if(isNaN(Pe)||Pe===0)return Pe;ue=Math.min(ue,Pe)}else for(let Pe=Te[0];Pe<=Te[1];++Pe){let it=ac(R[Pe],L,W);if(ue=Math.min(ue,it),ue===0)return 0}}else{let Pe=tc(Te,d);ih(me,ue,W,R,ge,Pe[0]),ih(me,ue,W,R,ge,Pe[1])}}return ue}function El(R,d,L,W,te,ue=1/0){let me=Math.min(ue,te.distance(R[0],L[0]));if(me===0)return me;let ge=new jf([[0,[0,R.length-1],[0,L.length-1]]],Zc);for(;ge.length>0;){let Ce=ge.pop();if(Ce[0]>=me)continue;let Te=Ce[1],Oe=Ce[2],Pe=d?50:100,it=W?50:100;if(ec(Te)<=Pe&&ec(Oe)<=it){if(!cu(Te,R.length)&&cu(Oe,L.length))return NaN;let He;if(d&&W)He=yl(R,Te,L,Oe,te),me=Math.min(me,He);else if(d&&!W){let bt=R.slice(Te[0],Te[1]+1);for(let Et=Oe[0];Et<=Oe[1];++Et)if(He=ml(L[Et],bt,te),me=Math.min(me,He),me===0)return me}else if(!d&&W){let bt=L.slice(Oe[0],Oe[1]+1);for(let Et=Te[0];Et<=Te[1];++Et)if(He=ml(R[Et],bt,te),me=Math.min(me,He),me===0)return me}else He=qf(R,Te,L,Oe,te),me=Math.min(me,He)}else{let He=tc(Te,d),bt=tc(Oe,W);fu(ge,me,te,R,L,He[0],bt[0]),fu(ge,me,te,R,L,He[0],bt[1]),fu(ge,me,te,R,L,He[1],bt[0]),fu(ge,me,te,R,L,He[1],bt[1])}}return me}function oh(R){return R.type==="MultiPolygon"?R.coordinates.map(d=>({type:"Polygon",coordinates:d})):R.type==="MultiLineString"?R.coordinates.map(d=>({type:"LineString",coordinates:d})):R.type==="MultiPoint"?R.coordinates.map(d=>({type:"Point",coordinates:d})):[R]}class Au{constructor(d,L){this.type=Rt,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'distance' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection")return new Au(W,W.features.map(te=>oh(te.geometry)).flat());if(W.type==="Feature")return new Au(W,oh(W.geometry));if("type"in W&&"coordinates"in W)return new Au(W,oh(W))}return L.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(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!1,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!1,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!1,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!0,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!0,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!0,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="Polygon")return function(L,W){let te=L.geometry();if(te.length===0||te[0].length===0)return NaN;let ue=Yc(te,0).map(Ce=>Ce.map(Te=>Te.map(Oe=>zu([Oe.x,Oe.y],L.canonical)))),me=new Ac(ue[0][0][0][1]),ge=1/0;for(let Ce of W)for(let Te of ue){switch(Ce.type){case"Point":ge=Math.min(ge,Sl([Ce.coordinates],!1,Te,me,ge));break;case"LineString":ge=Math.min(ge,Sl(Ce.coordinates,!0,Te,me,ge));break;case"Polygon":ge=Math.min(ge,Jo(Te,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class $c{constructor(d){this.type=Zr,this.key=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=d[1];return W==null?L.error("Global state property must be defined."):typeof W!="string"?L.error(`Global state property must be string, but found ${typeof d[1]} instead.`):new $c(W)}evaluate(d){var L;let W=(L=d.globals)===null||L===void 0?void 0:L.globalState;return W&&Object.keys(W).length!==0?zr(W,this.key):null}eachChild(){}outputDefined(){return!1}}let _l={"==":wu,"!=":lu,">":Fl,"<":xc,">=":$u,"<=":pl,array:go,at:pi,boolean:go,case:Ko,coalesce:Dl,collator:uu,format:vs,image:os,in:Vi,"index-of":Io,interpolate:Pi,"interpolate-hcl":Pi,"interpolate-lab":Pi,length:ms,let:to,literal:Mi,match:Xi,number:go,"number-format":tl,object:go,slice:Uo,step:Ss,string:go,"to-boolean":Ao,"to-color":Ao,"to-number":Ao,"to-string":Ao,var:wo,within:$l,distance:Au,"global-state":$c};class nl{constructor(d,L,W,te){this.name=d,this.type=L,this._evaluate=W,this.args=te}evaluate(d){return this._evaluate(d,this.args)}eachChild(d){this.args.forEach(d)}outputDefined(){return!1}static parse(d,L){let W=d[0],te=nl.definitions[W];if(!te)return L.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let ue=Array.isArray(te)?te[0]:te.type,me=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,ge=me.filter(([Te])=>!Array.isArray(Te)||Te.length===d.length-1),Ce=null;for(let[Te,Oe]of ge){Ce=new Wo(L.registry,Uu,L.path,null,L.scope);let Pe=[],it=!1;for(let He=1;He{return it=Pe,Array.isArray(it)?`(${it.map(Un).join(", ")})`:`(${Un(it.type)}...)`;var it}).join(" | "),Oe=[];for(let Pe=1;Pe{L=d?L&&Uu(W):L&&W instanceof Mi}),!!L&&qu(R)&&yf(R,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function qu(R){if(R instanceof nl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof $l||R instanceof Au)return!1;let d=!0;return R.eachChild(L=>{d&&!qu(L)&&(d=!1)}),d}function nc(R){if(R instanceof nl&&R.name==="feature-state")return!1;let d=!0;return R.eachChild(L=>{d&&!nc(L)&&(d=!1)}),d}function yf(R,d){if(R instanceof nl&&d.indexOf(R.name)>=0)return!1;let L=!0;return R.eachChild(W=>{L&&!yf(W,d)&&(L=!1)}),L}function _f(R){return{result:"success",value:R}}function Mu(R){return{result:"error",value:R}}function ic(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Sc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Vu(R){return!!R.expression&&R.expression.interpolated}function xo(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Ec(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&qn(R)===Qr}function xh(R){return R}function Vf(R,d){let L=R.stops&&typeof R.stops[0][0]=="object",W=L||!(L||R.property!==void 0),te=R.type||(Vu(d)?"exponential":"interval"),ue=function(Oe){switch(Oe.type){case"color":return rn.parse;case"padding":return fn.parse;case"numberArray":return Ai.parse;case"colorArray":return jn.parse;default:return null}}(d);if(ue&&((R=Ht({},R)).stops&&(R.stops=R.stops.map(Oe=>[Oe[0],ue(Oe[1])])),R.default=ue(R.default?R.default:d.default)),R.colorSpace&&(me=R.colorSpace)!=="rgb"&&me!=="hcl"&&me!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var me;let ge=function(Oe){switch(Oe){case"exponential":return Hf;case"interval":return bh;case"categorical":return Gf;case"identity":return il;default:throw new Error(`Unknown function type "${Oe}"`)}}(te),Ce,Te;if(te==="categorical"){Ce=Object.create(null);for(let Oe of R.stops)Ce[Oe[0]]=Oe[1];Te=typeof R.stops[0][0]}if(L){let Oe={},Pe=[];for(let bt=0;btbt[0]),evaluate:({zoom:bt},Et)=>Hf({stops:it,base:R.base},d,bt).evaluate(bt,Et)}}if(W){let Oe=te==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Oe,interpolationFactor:Pi.interpolationFactor.bind(void 0,Oe),zoomStops:R.stops.map(Pe=>Pe[0]),evaluate:({zoom:Pe})=>ge(R,d,Pe,Ce,Te)}}return{kind:"source",evaluate(Oe,Pe){let it=Pe&&Pe.properties?Pe.properties[R.property]:void 0;return it===void 0?xf(R.default,d.default):ge(R,d,it,Ce,Te)}}}function xf(R,d,L){return R!==void 0?R:d!==void 0?d:L!==void 0?L:void 0}function Gf(R,d,L,W,te){return xf(typeof L===te?W[L]:void 0,R.default,d.default)}function bh(R,d,L){if(xo(L)!=="number")return xf(R.default,d.default);let W=R.stops.length;if(W===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[W-1][0])return R.stops[W-1][1];let te=Ls(R.stops.map(ue=>ue[0]),L);return R.stops[te][1]}function Hf(R,d,L){let W=R.base!==void 0?R.base:1;if(xo(L)!=="number")return xf(R.default,d.default);let te=R.stops.length;if(te===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[te-1][0])return R.stops[te-1][1];let ue=Ls(R.stops.map(Oe=>Oe[0]),L),me=function(Oe,Pe,it,He){let bt=He-it,Et=Oe-it;return bt===0?0:Pe===1?Et/bt:(Math.pow(Pe,Et)-1)/(Math.pow(Pe,bt)-1)}(L,W,R.stops[ue][0],R.stops[ue+1][0]),ge=R.stops[ue][1],Ce=R.stops[ue+1][1],Te=bs[d.type]||xh;return typeof ge.evaluate=="function"?{evaluate(...Oe){let Pe=ge.evaluate.apply(void 0,Oe),it=Ce.evaluate.apply(void 0,Oe);if(Pe!==void 0&&it!==void 0)return Te(Pe,it,me,R.colorSpace)}}:Te(ge,Ce,me,R.colorSpace)}function il(R,d,L){switch(d.type){case"color":L=rn.parse(L);break;case"formatted":L=Di.fromString(L.toString());break;case"resolvedImage":L=qi.fromString(L.toString());break;case"padding":L=fn.parse(L);break;case"colorArray":L=jn.parse(L);break;case"numberArray":L=Ai.parse(L);break;default:xo(L)===d.type||d.type==="enum"&&d.values[L]||(L=void 0)}return xf(L,R.default,d.default)}nl.register(_l,{error:[{kind:"error"},[nr],(R,[d])=>{throw new Xn(d.evaluate(R))}],typeof:[nr,[Zr],(R,[d])=>Un(qn(d.evaluate(R)))],"to-rgba":[yn(Rt,4),[cr],(R,[d])=>{let[L,W,te,ue]=d.evaluate(R).rgb;return[255*L,255*W,255*te,ue]}],rgb:[cr,[Rt,Rt,Rt],gf],rgba:[cr,[Rt,Rt,Rt,Rt],gf],has:{type:ur,overloads:[[[nr],(R,[d])=>Kc(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>Kc(d.evaluate(R),L.evaluate(R))]]},get:{type:Zr,overloads:[[[nr],(R,[d])=>sh(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>sh(d.evaluate(R),L.evaluate(R))]]},"feature-state":[Zr,[nr],(R,[d])=>sh(d.evaluate(R),R.featureState||{})],properties:[Qr,[],R=>R.properties()],"geometry-type":[nr,[],R=>R.geometryType()],id:[Zr,[],R=>R.id()],zoom:[Rt,[],R=>R.globals.zoom],"heatmap-density":[Rt,[],R=>R.globals.heatmapDensity||0],elevation:[Rt,[],R=>R.globals.elevation||0],"line-progress":[Rt,[],R=>R.globals.lineProgress||0],accumulated:[Zr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[Rt,hu(Rt),(R,d)=>{let L=0;for(let W of d)L+=W.evaluate(R);return L}],"*":[Rt,hu(Rt),(R,d)=>{let L=1;for(let W of d)L*=W.evaluate(R);return L}],"-":{type:Rt,overloads:[[[Rt,Rt],(R,[d,L])=>d.evaluate(R)-L.evaluate(R)],[[Rt],(R,[d])=>-d.evaluate(R)]]},"/":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)/L.evaluate(R)],"%":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)%L.evaluate(R)],ln2:[Rt,[],()=>Math.LN2],pi:[Rt,[],()=>Math.PI],e:[Rt,[],()=>Math.E],"^":[Rt,[Rt,Rt],(R,[d,L])=>Math.pow(d.evaluate(R),L.evaluate(R))],sqrt:[Rt,[Rt],(R,[d])=>Math.sqrt(d.evaluate(R))],log10:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN10],ln:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))],log2:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN2],sin:[Rt,[Rt],(R,[d])=>Math.sin(d.evaluate(R))],cos:[Rt,[Rt],(R,[d])=>Math.cos(d.evaluate(R))],tan:[Rt,[Rt],(R,[d])=>Math.tan(d.evaluate(R))],asin:[Rt,[Rt],(R,[d])=>Math.asin(d.evaluate(R))],acos:[Rt,[Rt],(R,[d])=>Math.acos(d.evaluate(R))],atan:[Rt,[Rt],(R,[d])=>Math.atan(d.evaluate(R))],min:[Rt,hu(Rt),(R,d)=>Math.min(...d.map(L=>L.evaluate(R)))],max:[Rt,hu(Rt),(R,d)=>Math.max(...d.map(L=>L.evaluate(R)))],abs:[Rt,[Rt],(R,[d])=>Math.abs(d.evaluate(R))],round:[Rt,[Rt],(R,[d])=>{let L=d.evaluate(R);return L<0?-Math.round(-L):Math.round(L)}],floor:[Rt,[Rt],(R,[d])=>Math.floor(d.evaluate(R))],ceil:[Rt,[Rt],(R,[d])=>Math.ceil(d.evaluate(R))],"filter-==":[ur,[nr,Zr],(R,[d,L])=>R.properties()[d.value]===L.value],"filter-id-==":[ur,[Zr],(R,[d])=>R.id()===d.value],"filter-type-==":[ur,[nr],(R,[d])=>R.geometryType()===d.value],"filter-<":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W{let L=R.id(),W=d.value;return typeof L==typeof W&&L":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>te}],"filter-id->":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>W}],"filter-<=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L<=W}],"filter->=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>=W}],"filter-has":[ur,[Zr],(R,[d])=>d.value in R.properties()],"filter-has-id":[ur,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[ur,[yn(nr)],(R,[d])=>d.value.indexOf(R.geometryType())>=0],"filter-id-in":[ur,[yn(Zr)],(R,[d])=>d.value.indexOf(R.id())>=0],"filter-in-small":[ur,[nr,yn(Zr)],(R,[d,L])=>L.value.indexOf(R.properties()[d.value])>=0],"filter-in-large":[ur,[nr,yn(Zr)],(R,[d,L])=>function(W,te,ue,me){for(;ue<=me;){let ge=ue+me>>1;if(te[ge]===W)return!0;te[ge]>W?me=ge-1:ue=ge+1}return!1}(R.properties()[d.value],L.value,0,L.value.length-1)],all:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)&&L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(!L.evaluate(R))return!1;return!0}]]},any:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)||L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(L.evaluate(R))return!0;return!1}]]},"!":[ur,[ur],(R,[d])=>!d.evaluate(R)],"is-supported-script":[ur,[nr],(R,[d])=>{let L=R.globals&&R.globals.isSupportedScript;return!L||L(d.evaluate(R))}],upcase:[nr,[nr],(R,[d])=>d.evaluate(R).toUpperCase()],downcase:[nr,[nr],(R,[d])=>d.evaluate(R).toLowerCase()],concat:[nr,hu(Zr),(R,d)=>d.map(L=>Hi(L.evaluate(R))).join("")],split:[yn(nr),[nr,nr],(R,[d,L])=>d.evaluate(R).split(L.evaluate(R))],join:[nr,[yn(nr),nr],(R,[d,L])=>d.evaluate(R).join(L.evaluate(R))],"resolved-locale":[nr,[ha],(R,[d])=>d.evaluate(R).resolvedLocale()]});class kl{constructor(d,L,W){this.expression=d,this._warningHistory={},this._evaluator=new jo,this._defaultValue=L?function(te){if(te.type==="color"&&Ec(te.default))return new rn(0,0,0,0);switch(te.type){case"color":return rn.parse(te.default)||null;case"padding":return fn.parse(te.default)||null;case"numberArray":return Ai.parse(te.default)||null;case"colorArray":return jn.parse(te.default)||null;case"variableAnchorOffsetCollection":return gi.parse(te.default)||null;case"projectionDefinition":return io.parse(te.default)||null;default:return te.default===void 0?null:te.default}}(L):null,this._enumValues=L&&L.type==="enum"?L.values:null,this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me,this.expression.evaluate(this._evaluator)}evaluate(d,L,W,te,ue,me){this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me||null;try{let ge=this.expression.evaluate(this._evaluator);if(ge==null||typeof ge=="number"&&ge!=ge)return this._defaultValue;if(this._enumValues&&!(ge in this._enumValues))throw new Xn(`Expected value to be one of ${Object.keys(this._enumValues).map(Ce=>JSON.stringify(Ce)).join(", ")}, but found ${JSON.stringify(ge)} instead.`);return ge}catch(ge){return this._warningHistory[ge.message]||(this._warningHistory[ge.message]=!0,typeof console<"u"&&console.warn(ge.message)),this._defaultValue}}}function kc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in _l}function Cc(R,d,L){let W=new Wo(_l,Uu,[],d?function(ue){let me={color:cr,string:nr,number:Rt,enum:nr,boolean:ur,formatted:Pa,padding:La,numberArray:Xa,colorArray:un,projectionDefinition:Rr,resolvedImage:ja,variableAnchorOffsetCollection:Nn};return ue.type==="array"?yn(me[ue.value]||Zr,ue.length):me[ue.type]}(d):void 0),te=W.parse(R,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return te?_f(new kl(te,d,L)):Mu(W.errors)}class Lc{constructor(d,L,W){this.kind=d,this._styleExpression=L,this.isStateDependent=d!=="constant"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}}class vc{constructor(d,L,W,te,ue){this.kind=d,this.zoomStops=W,this._styleExpression=L,this.isStateDependent=d!=="camera"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this.interpolationType=te,this._globalState=ue}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}interpolationFactor(d,L,W){return this.interpolationType?Pi.interpolationFactor(this.interpolationType,d,L,W):0}}function Ft(R,d,L){let W=Cc(R,d,L);if(W.result==="error")return W;let te=W.value.expression,ue=qu(te);if(!ue&&!ic(d))return Mu([new Sr("","data expressions not supported")]);let me=yf(te,["zoom"]);if(!me&&!Sc(d))return Mu([new Sr("","zoom expressions not supported")]);let ge=Fr(te);return ge||me?ge instanceof Sr?Mu([ge]):ge instanceof Pi&&!Vu(d)?Mu([new Sr("",'"interpolate" expressions cannot be used with this property')]):_f(ge?new vc(ue?"camera":"composite",W.value,ge.labels,ge instanceof Pi?ge.interpolation:void 0,L):new Lc(ue?"constant":"source",W.value,L)):Mu([new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class tr{constructor(d,L){this._parameters=d,this._specification=L,Ht(this,Vf(this._parameters,this._specification))}static deserialize(d){return new tr(d._parameters,d._specification)}static serialize(d){return{_parameters:d._parameters,_specification:d._specification}}}function Fr(R){let d=null;if(R instanceof to)d=Fr(R.result);else if(R instanceof Dl){for(let L of R.args)if(d=Fr(L),d)break}else(R instanceof Ss||R instanceof Pi)&&R.input instanceof nl&&R.input.name==="zoom"&&(d=R);return d instanceof Sr||R.eachChild(L=>{let W=Fr(L);W instanceof Sr?d=W:!d&&W?d=new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):d&&W&&d!==W&&(d=new Sr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),d}function wr(R,d=new Set){return R instanceof $c&&d.add(R.key),R.eachChild(L=>{wr(L,d)}),d}function ea(R,d){let{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge}=R??{};return{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge,globalState:d}}function ba(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let d of R.slice(1))if(!ba(d)&&typeof d!="boolean")return!1;return!0;default:return!0}}let Ia={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Na(R,d){if(R==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};ba(R)||(R=Da(R));let L=Cc(R,Ia,d);if(L.result==="error")throw new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));return{filter:(W,te,ue)=>L.value.evaluate(W,te,{},ue),needGeometry:mn(R),getGlobalStateRefs:()=>wr(L.value.expression)}}function Za(R,d){return Rd?1:0}function mn(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let d=1;d"||d==="<="||d===">="?Ha(R[1],R[2],d):d==="any"?(L=R.slice(1),["any"].concat(L.map(Da))):d==="all"?["all"].concat(R.slice(1).map(Da)):d==="none"?["all"].concat(R.slice(1).map(Da).map(En)):d==="in"?$a(R[1],R.slice(2)):d==="!in"?En($a(R[1],R.slice(2))):d==="has"?vn(R[1]):d!=="!has"||En(vn(R[1]));var L}function Ha(R,d,L){switch(R){case"$type":return[`filter-type-${L}`,d];case"$id":return[`filter-id-${L}`,d];default:return[`filter-${L}`,R,d]}}function $a(R,d){if(d.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(L=>typeof L!=typeof d[0])?["filter-in-large",R,["literal",d.sort(Za)]]:["filter-in-small",R,["literal",d]]}}function vn(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function En(R){return["!",R]}function yi(R){let d=typeof R;if(d==="number"||d==="boolean"||d==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let ue of R)te+=`${yi(ue)},`;return`${te}]`}let L=Object.keys(R).sort(),W="{";for(let te=0;teW.maximum?[new Vt(d,L,`${L} is greater than the maximum value ${W.maximum}`)]:[]}function Co(R){let d=R.valueSpec,L=ri(R.value.type),W,te,ue,me={},ge=L!=="categorical"&&R.value.property===void 0,Ce=!ge,Te=xo(R.value.stops)==="array"&&xo(R.value.stops[0])==="array"&&xo(R.value.stops[0][0])==="object",Oe=Ln({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(He){if(L==="identity")return[new Vt(He.key,He.value,'identity function may not have a "stops" property')];let bt=[],Et=He.value;return bt=bt.concat(Ni({key:He.key,value:Et,valueSpec:He.valueSpec,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,arrayElementValidator:Pe})),xo(Et)==="array"&&Et.length===0&&bt.push(new Vt(He.key,Et,"array must have at least one stop")),bt},default:function(He){return He.validateSpec({key:He.key,value:He.value,valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec})}}});return L==="identity"&&ge&&Oe.push(new Vt(R.key,R.value,'missing required property "property"')),L==="identity"||R.value.stops||Oe.push(new Vt(R.key,R.value,'missing required property "stops"')),L==="exponential"&&R.valueSpec.expression&&!Vu(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ce&&!ic(R.valueSpec)?Oe.push(new Vt(R.key,R.value,"property functions not supported")):ge&&!Sc(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"zoom functions not supported"))),L!=="categorical"&&!Te||R.value.property!==void 0||Oe.push(new Vt(R.key,R.value,'"property" property is required')),Oe;function Pe(He){let bt=[],Et=He.value,Qt=He.key;if(xo(Et)!=="array")return[new Vt(Qt,Et,`array expected, ${xo(Et)} found`)];if(Et.length!==2)return[new Vt(Qt,Et,`array length 2 expected, length ${Et.length} found`)];if(Te){if(xo(Et[0])!=="object")return[new Vt(Qt,Et,`object expected, ${xo(Et[0])} found`)];if(Et[0].zoom===void 0)return[new Vt(Qt,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new Vt(Qt,Et,"object stop key must have value")];if(ue&&ue>ri(Et[0].zoom))return[new Vt(Qt,Et[0].zoom,"stop zoom values must appear in ascending order")];ri(Et[0].zoom)!==ue&&(ue=ri(Et[0].zoom),te=void 0,me={}),bt=bt.concat(Ln({key:`${Qt}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,objectElementValidators:{zoom:Zi,value:it}}))}else bt=bt.concat(it({key:`${Qt}[0]`,value:Et[0],validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec},Et));return kc(kn(Et[1]))?bt.concat([new Vt(`${Qt}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(He.validateSpec({key:`${Qt}[1]`,value:Et[1],valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec}))}function it(He,bt){let Et=xo(He.value),Qt=ri(He.value),er=He.value!==null?He.value:bt;if(W){if(Et!==W)return[new Vt(He.key,er,`${Et} stop domain type must match previous stop domain type ${W}`)]}else W=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new Vt(He.key,er,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&L!=="categorical"){let br=`number expected, ${Et} found`;return ic(d)&&L===void 0&&(br+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Vt(He.key,er,br)]}return L!=="categorical"||Et!=="number"||isFinite(Qt)&&Math.floor(Qt)===Qt?L!=="categorical"&&Et==="number"&&te!==void 0&&Qtnew Vt(`${R.key}${W.key}`,R.value,W.message));let L=d.value.expression||d.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!L.outputDefined())return[new Vt(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!yf(L,["zoom","feature-state"]))return[new Vt(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!qu(L))return[new Vt(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fo(R){let d=R.key,L=R.value,W=xo(L);return W!=="string"?[new Vt(d,L,`color expected, ${W} found`)]:rn.parse(String(L))?[]:[new Vt(d,L,`color expected, "${L}" found`)]}function Yo(R){let d=R.key,L=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${W.values.join(", ")}], ${JSON.stringify(L)} found`)):Object.keys(W.values).indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(L)} found`)),te}function bo(R){return ba(kn(R.value))?Do(Ht({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Gs(R)}function Gs(R){let d=R.value,L=R.key;if(xo(d)!=="array")return[new Vt(L,d,`array expected, ${xo(d)} found`)];let W=R.styleSpec,te,ue=[];if(d.length<1)return[new Vt(L,d,"filter array must have at least 1 element")];switch(ue=ue.concat(Yo({key:`${L}[0]`,value:d[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),ri(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&ri(d[1])==="$type"&&ue.push(new Vt(L,d,`"$type" cannot be use with operator "${d[0]}"`));case"==":case"!=":d.length!==3&&ue.push(new Vt(L,d,`filter array for operator "${d[0]}" must have 3 elements`));case"in":case"!in":d.length>=2&&(te=xo(d[1]),te!=="string"&&ue.push(new Vt(`${L}[1]`,d[1],`string expected, ${te} found`)));for(let me=2;me{Pe in te&&W.push(new Vt(ue,te[Pe],`"${Pe}" is prohibited for ref layers`))}),me.layers.forEach(Pe=>{ri(Pe.id)===Te&&(Oe=Pe)}),Oe?Oe.ref?W.push(new Vt(ue,te.ref,"ref cannot reference another ref layer")):Ce=ri(Oe.type):W.push(new Vt(ue,te.ref,`ref layer "${Te}" not found`))}else if(Ce!=="background")if(te.source){let Oe=me.sources&&me.sources[te.source],Pe=Oe&&ri(Oe.type);Oe?Pe==="vector"&&Ce==="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster source`)):Pe!=="raster-dem"&&Ce==="hillshade"||Pe!=="raster-dem"&&Ce==="color-relief"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster-dem source`)):Pe==="raster"&&Ce!=="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a vector source`)):Pe!=="vector"||te["source-layer"]?Pe==="raster-dem"&&Ce!=="hillshade"&&Ce!=="color-relief"?W.push(new Vt(ue,te.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):Ce!=="line"||!te.paint||!te.paint["line-gradient"]||Pe==="geojson"&&Oe.lineMetrics||W.push(new Vt(ue,te,`layer "${te.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):W.push(new Vt(ue,te,`layer "${te.id}" must specify a "source-layer"`)):W.push(new Vt(ue,te.source,`source "${te.source}" not found`))}else W.push(new Vt(ue,te,'missing required property "source"'));return Ce==="raster"&&(!((d=te.paint)===null||d===void 0)&&d.resampling)&&(!((L=te.paint)===null||L===void 0)&&L["raster-resampling"])&&W.push(new Vt(ue,te.paint,`layer "${te.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),W=W.concat(Ln({key:ue,value:te,valueSpec:ge.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${ue}.type`,value:te.type,valueSpec:ge.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:te,objectKey:"type"}),filter:bo,layout:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>Kn(Ht({layerType:Ce},Pe))}}),paint:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>ns(Ht({layerType:Ce},Pe))}})}})),W}function gs(R){let d=R.value,L=R.key,W=xo(d);return W!=="string"?[new Vt(L,d,`string expected, ${W} found`)]:[]}let js={promoteId:function({key:R,value:d}){if(xo(d)==="string")return gs({key:R,value:d});{let L=[];for(let W in d)L.push(...gs({key:`${R}.${W}`,value:d[W]}));return L}}};function Cl(R){let d=R.value,L=R.key,W=R.styleSpec,te=R.style,ue=R.validateSpec;if(!d.type)return[new Vt(L,d,'"type" is required')];let me=ri(d.type),ge;switch(me){case"vector":case"raster":return ge=Ln({key:L,value:d,valueSpec:W[`source_${me.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:js,validateSpec:ue}),ge;case"raster-dem":return ge=function(Ce){var Te;let Oe=(Te=Ce.sourceName)!==null&&Te!==void 0?Te:"",Pe=Ce.value,it=Ce.styleSpec,He=it.source_raster_dem,bt=Ce.style,Et=[],Qt=xo(Pe);if(Pe===void 0)return Et;if(Qt!=="object")return Et.push(new Vt("source_raster_dem",Pe,`object expected, ${Qt} found`)),Et;let er=ri(Pe.encoding)==="custom",br=["redFactor","greenFactor","blueFactor","baseShift"],sr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let Mr in Pe)!er&&br.includes(Mr)?Et.push(new Vt(Mr,Pe[Mr],`In "${Oe}": "${Mr}" is only valid when "encoding" is set to "custom". ${sr} encoding found`)):He[Mr]?Et=Et.concat(Ce.validateSpec({key:Mr,value:Pe[Mr],valueSpec:He[Mr],validateSpec:Ce.validateSpec,style:bt,styleSpec:it})):Et.push(new Vt(Mr,Pe[Mr],`unknown property "${Mr}"`));return Et}({sourceName:L,value:d,style:R.style,styleSpec:W,validateSpec:ue}),ge;case"geojson":if(ge=Ln({key:L,value:d,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:ue,objectElementValidators:js}),d.cluster)for(let Ce in d.clusterProperties){let[Te,Oe]=d.clusterProperties[Ce],Pe=typeof Te=="string"?[Te,["accumulated"],["get",Ce]]:Te;ge.push(...Do({key:`${L}.${Ce}.map`,value:Oe,expressionContext:"cluster-map"})),ge.push(...Do({key:`${L}.${Ce}.reduce`,value:Pe,expressionContext:"cluster-reduce"}))}return ge;case"video":return Ln({key:L,value:d,valueSpec:W.source_video,style:te,validateSpec:ue,styleSpec:W});case"image":return Ln({key:L,value:d,valueSpec:W.source_image,style:te,validateSpec:ue,styleSpec:W});case"canvas":return[new Vt(L,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yo({key:`${L}.type`,value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function zl(R){let d=R.value,L=R.styleSpec,W=L.light,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("light",d,`object expected, ${me} found`)]),ue;for(let ge in d){let Ce=ge.match(/^(.*)-transition$/);ue=ue.concat(Ce&&W[Ce[1]]&&W[Ce[1]].transition?R.validateSpec({key:ge,value:d[ge],valueSpec:L.transition,validateSpec:R.validateSpec,style:te,styleSpec:L}):W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)])}return ue}function Kl(R){let d=R.value,L=R.styleSpec,W=L.sky,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("sky",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me}function Gu(R){let d=R.value,L=R.styleSpec,W=L.terrain,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("terrain",d,`object expected, ${me} found`)]),ue;for(let ge in d)ue=ue.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return ue}function xl(R){let d=[],L=R.value,W=R.key;if(Array.isArray(L)){let te=[],ue=[];for(let me in L)L[me].id&&te.includes(L[me].id)&&d.push(new Vt(W,L,`all the sprites' ids must be unique, but ${L[me].id} is duplicated`)),te.push(L[me].id),L[me].url&&ue.includes(L[me].url)&&d.push(new Vt(W,L,`all the sprites' URLs must be unique, but ${L[me].url} is duplicated`)),ue.push(L[me].url),d=d.concat(Ln({key:`${W}[${me}]`,value:L[me],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return d}return gs({key:W,value:L})}function Hu(R){return!!R&&R.constructor===Object}function Su(R){return Hu(R.value)?[]:[new Vt(R.key,R.value,`object expected, ${xo(R.value)} found`)]}let mc={"*":()=>[],array:Ni,boolean:function(R){let d=R.value,L=R.key,W=xo(d);return W!=="boolean"?[new Vt(L,d,`boolean expected, ${W} found`)]:[]},number:Zi,color:Fo,constants:ki,enum:Yo,filter:bo,function:Co,layer:zo,object:Ln,source:Cl,light:zl,sky:Kl,terrain:Gu,projection:function(R){let d=R.value,L=R.styleSpec,W=L.projection,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("projection",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me},projectionDefinition:function(R){let d=R.key,L=R.value;L=L instanceof String?L.valueOf():L;let W=xo(L);return W!=="array"||function(te){return Array.isArray(te)&&te.length===3&&typeof te[0]=="string"&&typeof te[1]=="string"&&typeof te[2]=="number"}(L)||function(te){return!!["interpolate","step","literal"].includes(te[0])}(L)?["array","string"].includes(W)?[]:[new Vt(d,L,`projection expected, invalid type "${W}" found`)]:[new Vt(d,L,`projection expected, invalid array ${JSON.stringify(L)} found`)]},string:gs,formatted:function(R){return gs(R).length===0?[]:Do(R)},resolvedImage:function(R){return gs(R).length===0?[]:Do(R)},padding:function(R){let d=R.key,L=R.value;if(xo(L)==="array"){if(L.length<1||L.length>4)return[new Vt(d,L,`padding requires 1 to 4 values; ${L.length} values found`)];let W={type:"number"},te=[];for(let ue=0;ue[]}})),R.constants&&(L=L.concat(ki({key:"constants",value:R.constants}))),Ql(L)}function Jl(R){return function(d){return R(Object.assign({},d,{validateSpec:Jc}))}}function Ql(R){return[].concat(R).sort((d,L)=>d.line-L.line)}function Eu(R){return function(...d){return Ql(R.apply(this,d))}}du.source=Eu(Jl(Cl)),du.sprite=Eu(Jl(xl)),du.glyphs=Eu(Jl(oc)),du.light=Eu(Jl(zl)),du.sky=Eu(Jl(Kl)),du.terrain=Eu(Jl(Gu)),du.state=Eu(Jl(Su)),du.layer=Eu(Jl(zo)),du.filter=Eu(Jl(bo)),du.paintProperty=Eu(Jl(ns)),du.layoutProperty=Eu(Jl(Kn));let bf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class lh{constructor(d,L){this._globalState=L,this.setValue(d)}evaluate(){var d;return(d=this._literalValue)!==null&&d!==void 0?d:this._compiledValue.evaluate({})}setValue(d){if(d==null||d==="visible"||d==="none")return this._literalValue=d==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let L=Cc(d,bf,this._globalState);if(L.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));this._literalValue=void 0,this._compiledValue=L.value,this._globalStateRefs=wr(L.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Pc=ht,Ks=du,Bl=Ks.light,Wu=Ks.sky,wf=Ks.paintProperty,Qc=Ks.layoutProperty;function ku(R,d){let L=!1;if(d?.length)for(let W of d)R.fire(new Ot(new Error(W.message))),L=!0;return L}class Ol{constructor(d,L,W){let te=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;let me=new Int32Array(this.arrayBuffer);d=me[0],this.d=(L=me[1])+2*(W=me[2]);for(let Ce=0;Ce=Pe[He+0]&&te>=Pe[He+1])?(ge[it]=!0,me.push(Oe[it])):ge[it]=!1}}}_forEachCell(d,L,W,te,ue,me,ge,Ce){let Te=this._convertToCellCoord(d),Oe=this._convertToCellCoord(L),Pe=this._convertToCellCoord(W),it=this._convertToCellCoord(te);for(let He=Te;He<=Pe;He++)for(let bt=Oe;bt<=it;bt++){let Et=this.d*bt+He;if((!Ce||Ce(this._convertFromCellCoord(He),this._convertFromCellCoord(bt),this._convertFromCellCoord(He+1),this._convertFromCellCoord(bt+1)))&&ue.call(this,d,L,W,te,Et,me,ge,Ce))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,L=3+this.cells.length+1+1,W=0;for(let me of this.cells)W+=me.length;let te=new Int32Array(L+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let ue=L;for(let me=0;meW?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=L):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${L}}`,"u").source}catch{return null}}).filter(L=>L);return new RegExp(d.join("|"),"u")}let Jr=jr(["Arab","Dupl","Mong","Ougr","Syrc"]);function la(R){return!Jr.test(String.fromCodePoint(R))}function xa(R){return!(Wt(R)||(d=R,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(d))));var d}let Ba=jr(["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 an(R){return Ba.test(String.fromCodePoint(R))}function Tn(R,d){return!(!d&&an(R)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(R)))}function ii(R){for(let d of R)if(an(d.codePointAt(0)))return!0;return!1}let Si=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){if(Si.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(R,d){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(R.pluginStatus!=="loading")return this.setState(R),R;let L=R.pluginURL,W=new Promise(ue=>{this.loadScriptResolve=ue});d(L);let te=new Promise(ue=>setTimeout(()=>ue(),this.TIMEOUT));if(yield Promise.race([W,te]),this.isParsed()){let ue={pluginStatus:"loaded",pluginURL:L};return this.setState(ue),ue}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${L}`)})}};class oi{constructor(d,L){this.isSupportedScript=Ji,this.zoom=d,L?(this.now=L.now||0,this.fadeDuration=L.fadeDuration||0,this.zoomHistory=L.zoomHistory||new Bt,this.transition=L.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Bt,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let d=this.zoom,L=d-Math.floor(d),W=this.crossFadingFactor();return d>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:L+(1-L)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*L}}}function Ji(R){return function(d,L){for(let W of d)if(!Tn(W.codePointAt(0),L))return!1;return!0}(R,Si.getRTLTextPluginStatus()==="loaded")}let Qi="-transition";class Oo{constructor(d,L,W){this.property=d,this.value=L,this.expression=function(te,ue,me){if(Ec(te))return new tr(te,ue);if(kc(te)){let ge=Ft(te,ue,me);if(ge.result==="error")throw new Error(ge.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));return ge.value}{let ge=te;return ue.type==="color"&&typeof te=="string"?ge=rn.parse(te):ue.type!=="padding"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="numberArray"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="colorArray"||typeof te!="string"&&!Array.isArray(te)?ue.type==="variableAnchorOffsetCollection"&&Array.isArray(te)?ge=gi.parse(te):ue.type==="projectionDefinition"&&typeof te=="string"&&(ge=io.parse(te)):ge=jn.parse(te):ge=Ai.parse(te):ge=fn.parse(te),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>ge}}}(L===void 0?d.specification.default:L,d.specification,W)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(d,L,W){return this.property.possiblyEvaluate(this,d,L,W)}}class Qo{constructor(d,L){this.property=d,this.value=new Oo(d,void 0,L)}transitioned(d,L){return new ys(this.property,this.value,L,X({},d.transition,this.transition),d.now)}untransitioned(){return new ys(this.property,this.value,null,{},0)}}class vo{constructor(d,L){this._properties=d,this._values=Object.create(d.defaultTransitionablePropertyValues),this._globalState=L}hasProperty(d){return d in this._properties.defaultTransitionablePropertyValues}getValue(d){return q(this._values[d].value.value)}setValue(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].value=new Oo(this._values[d].property,L===null?void 0:q(L),this._globalState)}getTransition(d){return q(this._values[d].transition)}setTransition(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].transition=q(L)||void 0}serialize(){let d={};for(let L of Object.keys(this._values)){let W=this.getValue(L);W!==void 0&&(d[L]=W);let te=this.getTransition(L);te!==void 0&&(d[`${L}${Qi}`]=te)}return d}transitioned(d,L){let W=new ol(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(d,L._values[te]);return W}untransitioned(){let d=new ol(this._properties);for(let L of Object.keys(this._values))d._values[L]=this._values[L].untransitioned();return d}}class ys{constructor(d,L,W,te,ue){this.property=d,this.value=L,this.begin=ue+te.delay||0,this.end=this.begin+te.duration||0,d.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(d,L,W){let te=d.now||0,ue=this.value.possiblyEvaluate(d,L,W),me=this.prior;if(me){if(te>this.end)return this.prior=null,ue;if(this.value.isDataDriven())return this.prior=null,ue;if(tete.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class sc{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){if(d.value!==void 0){if(d.expression.kind==="constant"){let ue=d.expression.evaluate(L,null,{},W,te);return this._calculate(ue,ue,ue,L)}return this._calculate(d.expression.evaluate(new oi(Math.floor(L.zoom-1),L)),d.expression.evaluate(new oi(Math.floor(L.zoom),L)),d.expression.evaluate(new oi(Math.floor(L.zoom+1),L)),L)}}_calculate(d,L,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class tu{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){return!!d.expression.evaluate(L,null,{},W,te)}interpolate(){return!1}}class Ps{constructor(d){this.properties=d,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let L in d){let W=d[L];W.specification.overridable&&this.overridableProperties.push(L);let te=this.defaultPropertyValues[L]=new Oo(W,void 0,void 0),ue=this.defaultTransitionablePropertyValues[L]=new Qo(W,void 0);this.defaultTransitioningPropertyValues[L]=ue.untransitioned(),this.defaultPossiblyEvaluatedValues[L]=te.possiblyEvaluate({})}}}fi("DataDrivenProperty",wi),fi("DataConstantProperty",hi),fi("CrossFadedDataDrivenProperty",sl),fi("CrossFadedProperty",sc),fi("ColorRampProperty",tu);let gc=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",pu=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class ll extends vt{constructor(d,L,W){if(super(),this.id=d.id,this.type=d.type,this._globalState=W,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(te,ue){return new lh(te,ue)}(this.visibility,W),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,this._featureFilter=Na(d.filter,W)),L.layout&&(this._unevaluatedLayout=new jl(L.layout,W)),L.paint)){this._transitionablePaint=new vo(L.paint,W);for(let te in d.paint)this.setPaintProperty(te,d.paint[te],{validate:!1});for(let te in d.layout)this.setLayoutProperty(te,d.layout[te],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Cu(L.paint)}}setFilter(d){this.filter=d,this._featureFilter=Na(d,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(d){var L;if(d==="visibility")return this.visibility;if(!((L=this._transitionablePaint)===null||L===void 0)&&L.hasProperty(d))throw new Error(d+gc);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${d}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(d)}getLayoutAffectingGlobalStateRefs(){let d=new Set;for(let L of this._visibilityExpression.getGlobalStateRefs())d.add(L);if(this._unevaluatedLayout)for(let L in this._unevaluatedLayout._values){let W=this._unevaluatedLayout._values[L];for(let te of W.getGlobalStateRefs())d.add(te)}for(let L of this._featureFilter.getGlobalStateRefs())d.add(L);return d}getPaintAffectingGlobalStateRefs(){var d;let L=new globalThis.Map;if(this._transitionablePaint)for(let W in this._transitionablePaint._values){let te=this._transitionablePaint._values[W].value;for(let ue of te.getGlobalStateRefs()){let me=(d=L.get(ue))!==null&&d!==void 0?d:[];me.push({name:W,value:te.value}),L.set(ue,me)}}return L}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(d,L,W={}){var te;if(d==="visibility")return this.visibility=L,this._visibilityExpression.setValue(L),void this.recalculateVisibility();!((te=this._transitionablePaint)===null||te===void 0)&&te.hasProperty(d)?this.fire(new Ot(new Error(d+gc))):L!=null&&this._validate(Qc,`layers.${this.id}.layout.${d}`,d,L,W)||this._unevaluatedLayout.setValue(d,L)}getPaintProperty(d){var L,W;if(d.endsWith(Qi)){let te=d.slice(0,-11);if(te==="visibility"||!((L=this._unevaluatedLayout)===null||L===void 0)&&L.hasProperty(te))throw new Error(d+pu);return this._transitionablePaint.getTransition(te)}if(d==="visibility"||!((W=this._unevaluatedLayout)===null||W===void 0)&&W.hasProperty(d))throw new Error(d+pu);return this._transitionablePaint.getValue(d)}setPaintProperty(d,L,W={}){var te;if(d==="visibility"||!((te=this._unevaluatedLayout)===null||te===void 0)&&te.hasProperty(d))return this.fire(new Ot(new Error(d+pu))),!1;if(L!=null&&this._validate(wf,`layers.${this.id}.paint.${d}`,d,L,W))return!1;if(d.endsWith(Qi))return this._transitionablePaint.setTransition(d.slice(0,-11),L||void 0),!1;{let ue=this._transitionablePaint._values[d],me=ue.property.specification["property-type"]==="cross-faded-data-driven",ge=ue.value.isDataDriven(),Ce=ue.value;this._transitionablePaint.setValue(d,L),this._handleSpecialPaintPropertyUpdate(d);let Te=this._transitionablePaint._values[d].value;return Te.isDataDriven()||ge||me||this._handleOverridablePaintPropertyUpdate(d,Ce,Te)}}_handleSpecialPaintPropertyUpdate(d){}_handleOverridablePaintPropertyUpdate(d,L,W){return!1}isHidden(d=this.minzoom,L=!1){return!!(this.minzoom&&d<(L?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&d>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(d){this._transitioningPaint=this._transitionablePaint.transitioned(d,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(d,L){d.getCrossfadeParameters&&(this._crossfadeParameters=d.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(d,void 0,L)),this.paint=this._transitioningPaint.possiblyEvaluate(d,void 0,L)}serialize(){var d,L;let W={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:(d=this._unevaluatedLayout)===null||d===void 0?void 0:d.serialize(),paint:(L=this._transitionablePaint)===null||L===void 0?void 0:L.serialize()};return this.visibility&&(W.layout||(W.layout={}),W.layout.visibility=this.visibility),Y(W,(te,ue)=>!(te===void 0||ue==="layout"&&!Object.keys(te).length||ue==="paint"&&!Object.keys(te).length))}_validate(d,L,W,te,ue={}){return ue?.validate!==!1&&ku(this,d.call(Ks,{key:L,layerType:this.type,objectKey:W,value:te,styleSpec:ht,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let d in this.paint._values){let L=this.paint.get(d);if(L instanceof Hs&&ic(L.property.specification)&&(L.value.kind==="source"||L.value.kind==="composite")&&L.value.isStateDependent)return!0}return!1}}let ef;var de={get paint(){return ef=ef||new Ps({"raster-opacity":new hi(ht.paint_raster["raster-opacity"]),"raster-hue-rotate":new hi(ht.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new hi(ht.paint_raster["raster-brightness-min"]),"raster-brightness-max":new hi(ht.paint_raster["raster-brightness-max"]),"raster-saturation":new hi(ht.paint_raster["raster-saturation"]),"raster-contrast":new hi(ht.paint_raster["raster-contrast"]),resampling:new hi(ht.paint_raster.resampling),"raster-resampling":new hi(ht.paint_raster["raster-resampling"]),"raster-fade-duration":new hi(ht.paint_raster["raster-fade-duration"])})}};class Ee extends ll{constructor(d,L){super(d,de,L)}}let qe={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class tt{constructor(d,L){this._structArray=d,this._pos1=L*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class at{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(d,L){return d._trim(),L&&(d.isTransferred=!0,L.push(d.arrayBuffer)),{length:d.length,arrayBuffer:d.arrayBuffer}}static deserialize(d){let L=Object.create(this.prototype);return L.arrayBuffer=d.arrayBuffer,L.length=d.length,L.capacity=d.arrayBuffer.byteLength/L.bytesPerElement,L._refreshViews(),L}_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 L=this.uint8;this._refreshViews(),L&&this.uint8.set(L)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ct(R,d=1){let L=0,W=0;return{members:R.map(te=>{let ue=qe[te.type].BYTES_PER_ELEMENT,me=L=Nt(L,Math.max(d,ue)),ge=te.components||1;return W=Math.max(W,ue),L+=ue*ge,{name:te.name,type:te.type,components:ge,offset:me}}),size:Nt(L,Math.max(W,d)),alignment:d}}function Nt(R,d){return Math.ceil(R/d)*d}class St extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.int16[te+0]=L,this.int16[te+1]=W,d}}St.prototype.bytesPerElement=4,fi("StructArrayLayout2i4",St);class Jt extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.int16[ue+0]=L,this.int16[ue+1]=W,this.int16[ue+2]=te,d}}Jt.prototype.bytesPerElement=6,fi("StructArrayLayout3i6",Jt);class mr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.int16[me+0]=L,this.int16[me+1]=W,this.int16[me+2]=te,this.int16[me+3]=ue,d}}mr.prototype.bytesPerElement=8,fi("StructArrayLayout4i8",mr);class gr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}gr.prototype.bytesPerElement=12,fi("StructArrayLayout2i4i12",gr);class Hr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=4*d,Te=8*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.uint8[Te+4]=te,this.uint8[Te+5]=ue,this.uint8[Te+6]=me,this.uint8[Te+7]=ge,d}}Hr.prototype.bytesPerElement=8,fi("StructArrayLayout2i4ub8",Hr);class Vr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.float32[te+0]=L,this.float32[te+1]=W,d}}Vr.prototype.bytesPerElement=8,fi("StructArrayLayout2f8",Vr);class ca extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,d,L,W,te,ue,me,ge,Ce,Te,Oe)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=10*d;return this.uint16[it+0]=L,this.uint16[it+1]=W,this.uint16[it+2]=te,this.uint16[it+3]=ue,this.uint16[it+4]=me,this.uint16[it+5]=ge,this.uint16[it+6]=Ce,this.uint16[it+7]=Te,this.uint16[it+8]=Oe,this.uint16[it+9]=Pe,d}}ca.prototype.bytesPerElement=20,fi("StructArrayLayout10ui20",ca);class Aa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce){let Te=this.length;return this.resize(Te+1),this.emplace(Te,d,L,W,te,ue,me,ge,Ce)}emplace(d,L,W,te,ue,me,ge,Ce,Te){let Oe=8*d;return this.uint16[Oe+0]=L,this.uint16[Oe+1]=W,this.uint16[Oe+2]=te,this.uint16[Oe+3]=ue,this.uint16[Oe+4]=me,this.uint16[Oe+5]=ge,this.uint16[Oe+6]=Ce,this.uint16[Oe+7]=Te,d}}Aa.prototype.bytesPerElement=16,fi("StructArrayLayout8ui16",Aa);class Xr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it){let He=this.length;return this.resize(He+1),this.emplace(He,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He){let bt=12*d;return this.int16[bt+0]=L,this.int16[bt+1]=W,this.int16[bt+2]=te,this.int16[bt+3]=ue,this.uint16[bt+4]=me,this.uint16[bt+5]=ge,this.uint16[bt+6]=Ce,this.uint16[bt+7]=Te,this.int16[bt+8]=Oe,this.int16[bt+9]=Pe,this.int16[bt+10]=it,this.int16[bt+11]=He,d}}Xr.prototype.bytesPerElement=24,fi("StructArrayLayout4i4ui4i24",Xr);class oa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.float32[ue+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}oa.prototype.bytesPerElement=12,fi("StructArrayLayout3f12",oa);class fa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint32[1*d+0]=L,d}}fa.prototype.bytesPerElement=4,fi("StructArrayLayout1ul4",fa);class Ea extends at{_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,L,W,te,ue,me,ge,Ce,Te){let Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,d,L,W,te,ue,me,ge,Ce,Te)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=10*d,it=5*d;return this.int16[Pe+0]=L,this.int16[Pe+1]=W,this.int16[Pe+2]=te,this.int16[Pe+3]=ue,this.int16[Pe+4]=me,this.int16[Pe+5]=ge,this.uint32[it+3]=Ce,this.uint16[Pe+8]=Te,this.uint16[Pe+9]=Oe,d}}Ea.prototype.bytesPerElement=20,fi("StructArrayLayout6i1ul2ui20",Ea);class Ma extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}Ma.prototype.bytesPerElement=12,fi("StructArrayLayout2i2i2i12",Ma);class sa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,ue)}emplace(d,L,W,te,ue,me){let ge=4*d,Ce=8*d;return this.float32[ge+0]=L,this.float32[ge+1]=W,this.float32[ge+2]=te,this.int16[Ce+6]=ue,this.int16[Ce+7]=me,d}}sa.prototype.bytesPerElement=16,fi("StructArrayLayout2f1f2i16",sa);class hn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=16*d,Te=4*d,Oe=8*d;return this.uint8[Ce+0]=L,this.uint8[Ce+1]=W,this.float32[Te+1]=te,this.float32[Te+2]=ue,this.int16[Oe+6]=me,this.int16[Oe+7]=ge,d}}hn.prototype.bytesPerElement=16,fi("StructArrayLayout2ub2f2i16",hn);class An extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[ue+0]=L,this.uint16[ue+1]=W,this.uint16[ue+2]=te,d}}An.prototype.bytesPerElement=6,fi("StructArrayLayout3ui6",An);class zn extends at{_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,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er){let br=this.length;return this.resize(br+1),this.emplace(br,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br){let sr=24*d,Mr=12*d,qr=48*d;return this.int16[sr+0]=L,this.int16[sr+1]=W,this.uint16[sr+2]=te,this.uint16[sr+3]=ue,this.uint32[Mr+2]=me,this.uint32[Mr+3]=ge,this.uint32[Mr+4]=Ce,this.uint16[sr+10]=Te,this.uint16[sr+11]=Oe,this.uint16[sr+12]=Pe,this.float32[Mr+7]=it,this.float32[Mr+8]=He,this.uint8[qr+36]=bt,this.uint8[qr+37]=Et,this.uint8[qr+38]=Qt,this.uint32[Mr+10]=er,this.int16[sr+22]=br,d}}zn.prototype.bytesPerElement=48,fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",zn);class $n extends at{_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,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn){let gn=this.length;return this.resize(gn+1),this.emplace(gn,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn,gn){let Va=32*d,Hn=16*d;return this.int16[Va+0]=L,this.int16[Va+1]=W,this.int16[Va+2]=te,this.int16[Va+3]=ue,this.int16[Va+4]=me,this.int16[Va+5]=ge,this.int16[Va+6]=Ce,this.int16[Va+7]=Te,this.uint16[Va+8]=Oe,this.uint16[Va+9]=Pe,this.uint16[Va+10]=it,this.uint16[Va+11]=He,this.uint16[Va+12]=bt,this.uint16[Va+13]=Et,this.uint16[Va+14]=Qt,this.uint16[Va+15]=er,this.uint16[Va+16]=br,this.uint16[Va+17]=sr,this.uint16[Va+18]=Mr,this.uint16[Va+19]=qr,this.uint16[Va+20]=$r,this.uint16[Va+21]=_a,this.uint16[Va+22]=Ca,this.uint32[Hn+12]=nn,this.float32[Hn+13]=qa,this.float32[Hn+14]=bn,this.uint16[Va+30]=Fn,this.uint16[Va+31]=gn,d}}$n.prototype.bytesPerElement=64,fi("StructArrayLayout8i15ui1ul2f2ui64",$n);class xi extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.float32[1*d+0]=L,d}}xi.prototype.bytesPerElement=4,fi("StructArrayLayout1f4",xi);class di extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[6*d+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}di.prototype.bytesPerElement=12,fi("StructArrayLayout1ui2f12",di);class uo extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=4*d;return this.uint32[2*d+0]=L,this.uint16[ue+2]=W,this.uint16[ue+3]=te,d}}uo.prototype.bytesPerElement=8,fi("StructArrayLayout1ul2ui8",uo);class pe extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.uint16[te+0]=L,this.uint16[te+1]=W,d}}pe.prototype.bytesPerElement=4,fi("StructArrayLayout2ui4",pe);class y extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint16[1*d+0]=L,d}}y.prototype.bytesPerElement=2,fi("StructArrayLayout1ui2",y);class N extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.float32[me+0]=L,this.float32[me+1]=W,this.float32[me+2]=te,this.float32[me+3]=ue,d}}N.prototype.bytesPerElement=16,fi("StructArrayLayout4f16",N);class ie extends tt{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 t(this.anchorPointX,this.anchorPointY)}}ie.prototype.size=20;class fe extends Ea{get(d){return new ie(this,d)}}fi("CollisionBoxArray",fe);class be extends tt{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]}}be.prototype.size=48;class Re extends zn{get(d){return new be(this,d)}}fi("PlacedSymbolArray",Re);class je extends tt{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]}}je.prototype.size=64;class Ze extends $n{get(d){return new je(this,d)}}fi("SymbolInstanceArray",Ze);class ut extends xi{getoffsetX(d){return this.float32[1*d+0]}}fi("GlyphOffsetArray",ut);class ft extends Jt{getx(d){return this.int16[3*d+0]}gety(d){return this.int16[3*d+1]}gettileUnitDistanceFromAnchor(d){return this.int16[3*d+2]}}fi("SymbolLineVertexArray",ft);class Dt extends tt{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]}}Dt.prototype.size=12;class Gt extends di{get(d){return new Dt(this,d)}}fi("TextAnchorOffsetArray",Gt);class Kt extends tt{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]}}Kt.prototype.size=8;class st extends uo{get(d){return new Kt(this,d)}}fi("FeatureIndexArray",st);class It extends St{}class Ut extends St{}class ir extends St{}class dr extends gr{}class Ar extends Hr{}class hr extends Vr{}class vr extends ca{}class Or extends Aa{}class Cr extends Xr{}class ta extends oa{}class ka extends fa{}class Ta extends Ma{}class Ra extends hn{}class ua extends An{}class ia extends pe{}let ga=ct([{name:"a_pos",components:2,type:"Int16"}],4),{members:da}=ga;class Fa{constructor(d=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=d}prepareSegment(d,L,W,te){let ue=this.segments[this.segments.length-1];return d>Fa.MAX_VERTEX_ARRAY_LENGTH&&ee(`Max vertices per segment is ${Fa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${d}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Fa.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!ue||ue.vertexLength+d>Fa.MAX_VERTEX_ARRAY_LENGTH||ue.sortKey!==te?this.createNewSegment(L,W,te):ue}createNewSegment(d,L,W){let te={vertexOffset:d.length,primitiveOffset:L.length,vertexLength:0,primitiveLength:0,vaos:{}};return W!==void 0&&(te.sortKey=W),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(te),te}getOrCreateLatestSegment(d,L,W){return this.prepareSegment(0,d,L,W)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let d of this.segments)for(let L in d.vaos)d.vaos[L].destroy()}static simpleSegment(d,L,W,te){return new Fa([{vertexOffset:d,primitiveOffset:L,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function za(R,d){return 256*(R=se(Math.floor(R),0,255))+se(Math.floor(d),0,255)}Fa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,fi("SegmentVector",Fa);let Cn=ct([{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"}]),Dn=ct([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var ui,cn,sn,ei={exports:{}},Pn={exports:{}},Rn={exports:{}},In=function(){if(sn)return ei.exports;sn=1;var R=(ui||(ui=1,Pn.exports=function(L,W){var te,ue,me,ge,Ce,Te,Oe,Pe;for(ue=L.length-(te=3&L.length),me=W,Ce=3432918353,Te=461845907,Pe=0;Pe>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295)<<13|me>>>19))+((5*(me>>>16)&65535)<<16)&4294967295))+((58964+(ge>>>16)&65535)<<16);switch(Oe=0,te){case 3:Oe^=(255&L.charCodeAt(Pe+2))<<16;case 2:Oe^=(255&L.charCodeAt(Pe+1))<<8;case 1:me^=Oe=(65535&(Oe=(Oe=(65535&(Oe^=255&L.charCodeAt(Pe)))*Ce+(((Oe>>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295}return me^=L.length,me=2246822507*(65535&(me^=me>>>16))+((2246822507*(me>>>16)&65535)<<16)&4294967295,me=3266489909*(65535&(me^=me>>>13))+((3266489909*(me>>>16)&65535)<<16)&4294967295,(me^=me>>>16)>>>0}),Pn.exports),d=(cn||(cn=1,Rn.exports=function(L,W){for(var te,ue=L.length,me=W^ue,ge=0;ue>=4;)te=1540483477*(65535&(te=255&L.charCodeAt(ge)|(255&L.charCodeAt(++ge))<<8|(255&L.charCodeAt(++ge))<<16|(255&L.charCodeAt(++ge))<<24))+((1540483477*(te>>>16)&65535)<<16),me=1540483477*(65535&me)+((1540483477*(me>>>16)&65535)<<16)^(te=1540483477*(65535&(te^=te>>>24))+((1540483477*(te>>>16)&65535)<<16)),ue-=4,++ge;switch(ue){case 3:me^=(255&L.charCodeAt(ge+2))<<16;case 2:me^=(255&L.charCodeAt(ge+1))<<8;case 1:me=1540483477*(65535&(me^=255&L.charCodeAt(ge)))+((1540483477*(me>>>16)&65535)<<16)}return me=1540483477*(65535&(me^=me>>>13))+((1540483477*(me>>>16)&65535)<<16),(me^=me>>>15)>>>0}),Rn.exports);return ei.exports=R,ei.exports.murmur3=R,ei.exports.murmur2=d,ei.exports}(),Jn=n(In);class Ei{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(d,L,W,te){this.ids.push(so(d)),this.positions.push(L,W,te)}getPositions(d){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let L=so(d),W=0,te=this.ids.length-1;for(;W>1;this.ids[me]>=L?te=me:W=me+1}let ue=[];for(;this.ids[W]===L;)ue.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return ue}static serialize(d,L){let W=new Float64Array(d.ids),te=new Uint32Array(d.positions);return ti(W,te,0,W.length-1),L&&L.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(d){let L=new Ei;return L.ids=d.ids,L.positions=d.positions,L.indexed=!0,L}}function so(R){let d=+R;return!isNaN(d)&&d<=Number.MAX_SAFE_INTEGER?d:Jn(String(R))}function ti(R,d,L,W){for(;L>1],ue=L-1,me=W+1;for(;;){do ue++;while(R[ue]te);if(ue>=me)break;bi(R,ue,me),bi(d,3*ue,3*me),bi(d,3*ue+1,3*me+1),bi(d,3*ue+2,3*me+2)}me-L`u_${te}`),this.type=W}setUniform(d,L,W){d.set(W.constantOr(this.value))}getBinding(d,L,W){return this.type==="color"?new zs(d,L):new ro(d,L)}}class Zo{constructor(d,L){this.uniformNames=L.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(d,L){this.pixelRatioFrom=L.pixelRatio,this.pixelRatioTo=d.pixelRatio,this.patternFrom=L.tlbr,this.patternTo=d.tlbr}setConstantDashPositions(d,L){this.dashTo=[0,d.y,d.height,d.width],this.dashFrom=[0,L.y,L.height,L.width]}setUniform(d,L,W,te){let ue=null;te==="u_pattern_to"?ue=this.patternTo:te==="u_pattern_from"?ue=this.patternFrom:te==="u_dasharray_to"?ue=this.dashTo:te==="u_dasharray_from"?ue=this.dashFrom:te==="u_pixel_ratio_to"?ue=this.pixelRatioTo:te==="u_pixel_ratio_from"&&(ue=this.pixelRatioFrom),ue!==null&&d.set(ue)}getBinding(d,L,W){return W.startsWith("u_pattern")||W.startsWith("u_dasharray_")?new Mo(d,L):new ro(d,L)}}class es{constructor(d,L,W,te){this.expression=d,this.type=W,this.maxValue=0,this.paintVertexAttributes=L.map(ue=>({name:`a_${ue}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(d,L,W){let te=this.paintVertexArray.length,ue=this.expression.evaluate(new oi(0,W),L,{},W.canonical,[],W.formattedSection);this.paintVertexArray.resize(d),this._setPaintValue(te,d,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(0,ue),W,te);this._setPaintValue(d,L,me)}_setPaintValue(d,L,W){if(this.type==="color"){let te=So(W);for(let ue=d;ue`u_${ge}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=ue,this.maxValue=0,this.paintVertexAttributes=L.map(ge=>({name:`a_${ge}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new me}populatePaintArray(d,L,W){let te=this.expression.evaluate(new oi(this.zoom,W),L,{},W.canonical,[],W.formattedSection),ue=this.expression.evaluate(new oi(this.zoom+1,W),L,{},W.canonical,[],W.formattedSection),me=this.paintVertexArray.length;this.paintVertexArray.resize(d),this._setPaintValue(me,d,te,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(this.zoom,ue),W,te),ge=this.expression.evaluate(new oi(this.zoom+1,ue),W,te);this._setPaintValue(d,L,me,ge)}_setPaintValue(d,L,W,te){if(this.type==="color"){let ue=So(W),me=So(te);for(let ge=d;ge`#define HAS_UNIFORM_${te}`))}return d}getBinderAttributes(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof es||W instanceof $o)for(let te of W.paintVertexAttributes)d.push(te.name);else if(W instanceof _s){let te=W.getVertexAttributes();for(let ue of te)d.push(ue.name)}}return d}getBinderUniforms(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof Ws||W instanceof Zo||W instanceof $o)for(let te of W.uniformNames)d.push(te)}return d}getPaintVertexBuffers(){return this._buffers}getUniforms(d,L){let W=[];for(let te in this.binders){let ue=this.binders[te];if(ue instanceof Ws||ue instanceof Zo||ue instanceof $o){for(let me of ue.uniformNames)if(L[me]){let ge=ue.getBinding(d,L[me],me);W.push({name:me,property:te,binding:ge})}}}return W}setUniforms(d,L,W,te){for(let{name:ue,property:me,binding:ge}of L)this.binders[me].setUniform(ge,te,W.get(me),ue)}updatePaintBuffers(d){this._buffers=[];for(let L in this.binders){let W=this.binders[L];if(d&&W instanceof _s){let te=d.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof es||W instanceof $o)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(d){for(let L in this.binders){let W=this.binders[L];(W instanceof es||W instanceof $o||W instanceof _s)&&W.upload(d)}this.updatePaintBuffers()}destroy(){for(let d in this.binders){let L=this.binders[d];(L instanceof es||L instanceof $o||L instanceof _s)&&L.destroy()}}}class mo{constructor(d,L,W=()=>!0){this.programConfigurations={};for(let te of d)this.programConfigurations[te.id]=new Ll(te,L,W);this.needsUpload=!1,this._featureMap=new Ei,this._bufferOffset=0}populatePaintArrays(d,L,W,te){for(let ue in this.programConfigurations)this.programConfigurations[ue].populatePaintArrays(d,L,te);L.id!==void 0&&this._featureMap.add(L.id,W,this._bufferOffset,d),this._bufferOffset=d,this.needsUpload=!0}updatePaintArrays(d,L,W,te){for(let ue of W)this.needsUpload=this.programConfigurations[ue.id].updatePaintArrays(d,this._featureMap,L,ue,te)||this.needsUpload}get(d){return this.programConfigurations[d]}upload(d){if(this.needsUpload){for(let L in this.programConfigurations)this.programConfigurations[L].upload(d);this.needsUpload=!1}}destroy(){for(let d in this.programConfigurations)this.programConfigurations[d].destroy()}}function ru(R,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-dasharray":["dasharray_to","dasharray_from"],"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"]}[R]||[R.replace(`${d}-`,"").replace(/-/g,"_")]}function Rs(R,d,L){let W={color:{source:Vr,composite:N},number:{source:xi,composite:Vr}},te=function(ue){return{"line-pattern":{source:vr,composite:vr},"fill-pattern":{source:vr,composite:vr},"fill-extrusion-pattern":{source:vr,composite:vr},"line-dasharray":{source:Or,composite:Or}}[ue]}(R);return te?.[L]||W[d][L]}fi("ConstantBinder",Ws),fi("CrossFadedConstantBinder",Zo),fi("SourceExpressionBinder",es),fi("CrossFadedPatternBinder",Go),fi("CrossFadedDasharrayBinder",Ys),fi("CompositeExpressionBinder",$o),fi("ProgramConfiguration",Ll,{omit:["_buffers"]}),fi("ProgramConfigurationSet",mo);let Yu=Math.pow(2,14)-1,Ul=-Yu-1;function ql(R){let d=F/R.extent,L=R.loadGeometry();for(let W of L)for(let te of W){let ue=Math.round(te.x*d),me=Math.round(te.y*d);te.x=se(ue,Ul,Yu),te.y=se(me,Ul,Yu),(uete.x+1||mete.y+1)&&ee("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return L}function fo(R,d){return{type:R.type,id:R.id,properties:R.properties,geometry:d?ql(R):[]}}let Xo=-32768;function Os(R,d,L,W,te){R.emplaceBack(Xo+8*d+W,Xo+8*L+te)}class ra{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new Ut,this.indexArray=new ua,this.segments=new Fa,this.programConfigurations=new mo(d.layers,d.zoom),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){let te=this.layers[0],ue=[],me=null,ge=!1,Ce=te.type==="heatmap";if(te.type==="circle"){let Oe=te;me=Oe.layout.get("circle-sort-key"),ge=!me.isConstant(),Ce||(Ce=Oe.paint.get("circle-pitch-alignment")==="map")}let Te=Ce?L.subdivisionGranularity.circle:1;for(let{feature:Oe,id:Pe,index:it,sourceLayerIndex:He}of d){let bt=this.layers[0]._featureFilter.needGeometry,Et=fo(Oe,bt);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Et,W))continue;let Qt=ge?me.evaluate(Et,{},W):void 0,er={id:Pe,properties:Oe.properties,type:Oe.type,sourceLayerIndex:He,index:it,geometry:bt?Et.geometry:ql(Oe),patterns:{},sortKey:Qt};ue.push(er)}ge&&ue.sort((Oe,Pe)=>Oe.sortKey-Pe.sortKey);for(let Oe of ue){let{geometry:Pe,index:it,sourceLayerIndex:He}=Oe,bt=d[it].feature;this.addFeature(Oe,Pe,it,W,Te),L.featureIndex.insert(bt,Pe,it,He,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,da),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,L,W,te,ue=1){let me;switch(ue){case 1:me=[0,7];break;case 3:me=[0,2,5,7];break;case 5:me=[0,1,3,4,6,7];break;case 7:me=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${ue}; valid values are 1, 3, 5, 7.`)}let ge=me.length;for(let Ce of L)for(let Te of Ce){let Oe=Te.x,Pe=Te.y;if(Oe<0||Oe>=F||Pe<0||Pe>=F)continue;let it=this.segments.prepareSegment(ge*ge,this.layoutVertexArray,this.indexArray,d.sortKey),He=it.vertexLength;for(let bt=0;bt1){if(Is(R,d))return!0;for(let W of d)if(Wr(W,R,L))return!0}for(let W of R)if(Wr(W,d,L))return!0;return!1}function Is(R,d){if(R.length===0||d.length===0)return!1;for(let L=0;L1?L:L.sub(d)._mult(te)._add(d))}function pa(R,d){let L,W,te,ue=!1;for(let me of R){L=me;for(let ge=0,Ce=L.length-1;ged.y!=te.y>d.y&&d.x<(te.x-W.x)*(d.y-W.y)/(te.y-W.y)+W.x&&(ue=!ue)}return ue}function Wa(R,d){let L=!1;for(let W=0,te=R.length-1;Wd.y!=me.y>d.y&&d.x<(me.x-ue.x)*(d.y-ue.y)/(me.y-ue.y)+ue.x&&(L=!L)}return L}function ln(R,d,L){let W=L[0],te=L[2];if(R.xte.x&&d.x>te.x||R.yte.y&&d.y>te.y)return!1;let ue=ae(R,d,L[0]);return ue!==ae(R,d,L[1])||ue!==ae(R,d,L[2])||ue!==ae(R,d,L[3])}function Le(R,d,L){let W=d.paint.get(R).value;return W.kind==="constant"?W.value:L.programConfigurations.get(d.id).getMaxValue(R)}function Ue(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qe(R,d,L,W,te){if(!d[0]&&!d[1])return R;let ue=t.convert(d)._mult(te);L==="viewport"&&ue._rotate(-W);let me=[];for(let ge of R)me.push(ge.sub(ue));return me}function _t(R){let d=[];for(let L=0;LQa(sr,Qt,er,br))}(Te,ue,ge,Ce),bt=Oe),va({queryGeometry:He,size:bt,transform:ue,unwrappedTileID:ge,getElevation:Ce,pitchAlignment:it,pitchScale:Pe},te)}}class _n extends ra{}let Sn;fi("HeatmapBucket",_n,{omit:["layers"]});var Bn={get paint(){return Sn=Sn||new Ps({"heatmap-radius":new wi(ht.paint_heatmap["heatmap-radius"]),"heatmap-weight":new wi(ht.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new hi(ht.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tu(ht.paint_heatmap["heatmap-color"]),"heatmap-opacity":new hi(ht.paint_heatmap["heatmap-opacity"])})}};function Zn(R,{width:d,height:L},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==d*L*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${d*L*W}`)}else te=new Uint8Array(d*L*W);return R.width=d,R.height=L,R.data=te,R}function Ci(R,{width:d,height:L},W){if(d===R.width&&L===R.height)return;let te=Zn({},{width:d,height:L},W);qo(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,d),height:Math.min(R.height,L)},W),R.width=d,R.height=L,R.data=te.data}function qo(R,d,L,W,te,ue){if(te.width===0||te.height===0)return d;if(te.width>R.width||te.height>R.height||L.x>R.width-te.width||L.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>d.width||te.height>d.height||W.x>d.width-te.width||W.y>d.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let me=R.data,ge=d.data;if(me===ge)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{d[R.evaluationKey]=Ce;let Te=R.expression.evaluate(d);te.setPixel(me/4/L,ge/4,Te)};if(R.clips)for(let me=0,ge=0;methis.max&&(this.max=Pe),Pe=this.dim+1||L<-1||L>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${d}, y: ${L}, dim: ${this.dim}`);return(L+1)*this.stride+(d+1)}unpack(d,L,W){return d*this.redFactor+L*this.greenFactor+W*this.blueFactor-this.baseShift}pack(d){return gp(d,this.getUnpackVector())}getPixels(){return new ls({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(d,L,W){if(this.dim!==d.dim)throw new Error("dem dimension mismatch");let te=L*this.dim,ue=L*this.dim+this.dim,me=W*this.dim,ge=W*this.dim+this.dim;switch(L){case-1:te=ue-1;break;case 1:ue=te+1}switch(W){case-1:me=ge-1;break;case 1:ge=me+1}let Ce=-L*this.dim,Te=-W*this.dim;for(let Oe=me;Oe0)for(let me=d;me=d;me-=W)ue=m4(me/W|0,R[me],R[me+1],ue);return ue&&g0(ue,ue.next)&&(Ag(ue),ue=ue.next),ue}function Hd(R,d){if(!R)return R;d||(d=R);let L,W=R;do if(L=!1,W.steiner||!g0(W,W.next)&&Xu(W.prev,W,W.next)!==0)W=W.next;else{if(Ag(W),W=d=W.prev,W===W.next)break;L=!0}while(L||W!==d);return d}function _p(R,d,L,W,te,ue,me){if(!R)return;!me&&ue&&function(Ce,Te,Oe,Pe){let it=Ce;do it.z===0&&(it.z=t3(it.x,it.y,Te,Oe,Pe)),it.prevZ=it.prev,it.nextZ=it.next,it=it.next;while(it!==Ce);it.prevZ.nextZ=null,it.prevZ=null,function(He){let bt,Et=1;do{let Qt,er=He;He=null;let br=null;for(bt=0;er;){bt++;let sr=er,Mr=0;for(let $r=0;$r0||qr>0&&sr;)Mr!==0&&(qr===0||!sr||er.z<=sr.z)?(Qt=er,er=er.nextZ,Mr--):(Qt=sr,sr=sr.nextZ,qr--),br?br.nextZ=Qt:He=Qt,Qt.prevZ=br,br=Qt;er=sr}br.nextZ=null,Et*=2}while(bt>1)}(it)}(R,W,te,ue);let ge=R;for(;R.prev!==R.next;){let Ce=R.prev,Te=R.next;if(ue?GH(R,W,te,ue):bg(R))d.push(Ce.i,R.i,Te.i),Ag(R),R=Te.next,ge=Te.next;else if((R=Te)===ge){me?me===1?_p(R=HH(Hd(R),d),d,L,W,te,ue,2):me===2&&WH(R,d,L,W,te,ue):_p(Hd(R),d,L,W,te,ue,1);break}}}function bg(R){let d=R.prev,L=R,W=R.next;if(Xu(d,L,W)>=0)return!1;let te=d.x,ue=L.x,me=W.x,ge=d.y,Ce=L.y,Te=W.y,Oe=Math.min(te,ue,me),Pe=Math.min(ge,Ce,Te),it=Math.max(te,ue,me),He=Math.max(ge,Ce,Te),bt=W.next;for(;bt!==d;){if(bt.x>=Oe&&bt.x<=it&&bt.y>=Pe&&bt.y<=He&&wg(te,ge,ue,Ce,me,Te,bt.x,bt.y)&&Xu(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function GH(R,d,L,W){let te=R.prev,ue=R,me=R.next;if(Xu(te,ue,me)>=0)return!1;let ge=te.x,Ce=ue.x,Te=me.x,Oe=te.y,Pe=ue.y,it=me.y,He=Math.min(ge,Ce,Te),bt=Math.min(Oe,Pe,it),Et=Math.max(ge,Ce,Te),Qt=Math.max(Oe,Pe,it),er=t3(He,bt,d,L,W),br=t3(Et,Qt,d,L,W),sr=R.prevZ,Mr=R.nextZ;for(;sr&&sr.z>=er&&Mr&&Mr.z<=br;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0||(sr=sr.prevZ,Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0))return!1;Mr=Mr.nextZ}for(;sr&&sr.z>=er;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0)return!1;sr=sr.prevZ}for(;Mr&&Mr.z<=br;){if(Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0)return!1;Mr=Mr.nextZ}return!0}function HH(R,d){let L=R;do{let W=L.prev,te=L.next.next;!g0(W,te)&&p4(W,L,L.next,te)&&Tg(W,te)&&Tg(te,W)&&(d.push(W.i,L.i,te.i),Ag(L),Ag(L.next),L=R=te),L=L.next}while(L!==R);return Hd(L)}function WH(R,d,L,W,te,ue){let me=R;do{let ge=me.next.next;for(;ge!==me.prev;){if(me.i!==ge.i&&KH(me,ge)){let Ce=v4(me,ge);return me=Hd(me,me.next),Ce=Hd(Ce,Ce.next),_p(me,d,L,W,te,ue,0),void _p(Ce,d,L,W,te,ue,0)}ge=ge.next}me=me.next}while(me!==R)}function YH(R,d){let L=R.x-d.x;return L===0&&(L=R.y-d.y,L===0)&&(L=(R.next.y-R.y)/(R.next.x-R.x)-(d.next.y-d.y)/(d.next.x-d.x)),L}function XH(R,d){let L=function(te,ue){let me=ue,ge=te.x,Ce=te.y,Te,Oe=-1/0;if(g0(te,me))return me;do{if(g0(te,me.next))return me.next;if(Ce<=me.y&&Ce>=me.next.y&&me.next.y!==me.y){let Et=me.x+(Ce-me.y)*(me.next.x-me.x)/(me.next.y-me.y);if(Et<=ge&&Et>Oe&&(Oe=Et,Te=me.x=me.x&&me.x>=it&&ge!==me.x&&d4(CeTe.x||me.x===Te.x&&ZH(Te,me)))&&(Te=me,bt=Et)}me=me.next}while(me!==Pe);return Te}(R,d);if(!L)return d;let W=v4(L,R);return Hd(W,W.next),Hd(L,L.next)}function ZH(R,d){return Xu(R.prev,R,d.prev)<0&&Xu(d.next,R,R.next)<0}function t3(R,d,L,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-L)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-W)*te|0)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function $H(R){let d=R,L=R;do(d.x=(R-me)*(ue-ge)&&(R-me)*(W-ge)>=(L-me)*(d-ge)&&(L-me)*(ue-ge)>=(te-me)*(W-ge)}function wg(R,d,L,W,te,ue,me,ge){return!(R===me&&d===ge)&&d4(R,d,L,W,te,ue,me,ge)}function KH(R,d){return R.next.i!==d.i&&R.prev.i!==d.i&&!function(L,W){let te=L;do{if(te.i!==L.i&&te.next.i!==L.i&&te.i!==W.i&&te.next.i!==W.i&&p4(te,te.next,L,W))return!0;te=te.next}while(te!==L);return!1}(R,d)&&(Tg(R,d)&&Tg(d,R)&&function(L,W){let te=L,ue=!1,me=(L.x+W.x)/2,ge=(L.y+W.y)/2;do te.y>ge!=te.next.y>ge&&te.next.y!==te.y&&me<(te.next.x-te.x)*(ge-te.y)/(te.next.y-te.y)+te.x&&(ue=!ue),te=te.next;while(te!==L);return ue}(R,d)&&(Xu(R.prev,R,d.prev)||Xu(R,d.prev,d))||g0(R,d)&&Xu(R.prev,R,R.next)>0&&Xu(d.prev,d,d.next)>0)}function Xu(R,d,L){return(d.y-R.y)*(L.x-d.x)-(d.x-R.x)*(L.y-d.y)}function g0(R,d){return R.x===d.x&&R.y===d.y}function p4(R,d,L,W){let te=fy(Xu(R,d,L)),ue=fy(Xu(R,d,W)),me=fy(Xu(L,W,R)),ge=fy(Xu(L,W,d));return te!==ue&&me!==ge||!(te!==0||!cy(R,L,d))||!(ue!==0||!cy(R,W,d))||!(me!==0||!cy(L,R,W))||!(ge!==0||!cy(L,d,W))}function cy(R,d,L){return d.x<=Math.max(R.x,L.x)&&d.x>=Math.min(R.x,L.x)&&d.y<=Math.max(R.y,L.y)&&d.y>=Math.min(R.y,L.y)}function fy(R){return R>0?1:R<0?-1:0}function Tg(R,d){return Xu(R.prev,R,R.next)<0?Xu(R,d,R.next)>=0&&Xu(R,R.prev,d)>=0:Xu(R,d,R.prev)<0||Xu(R,R.next,d)<0}function v4(R,d){let L=r3(R.i,R.x,R.y),W=r3(d.i,d.x,d.y),te=R.next,ue=d.prev;return R.next=d,d.prev=R,L.next=te,te.prev=L,W.next=L,L.prev=W,ue.next=W,W.prev=ue,W}function m4(R,d,L,W){let te=r3(R,d,L);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ag(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function r3(R,d,L){return{i:R,x:d,y:L,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class y0{constructor(d,L){if(L>d)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=d,this._minGranularity=L}getGranularityForZoomLevel(d){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||L>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let W=0|Math.round(d),te=0|Math.round(L),ue=this._getKey(W,te);if(this._vertexDictionary.has(ue))return this._vertexDictionary.get(ue);let me=this._vertexBuffer.length/2;return this._vertexDictionary.set(ue,me),this._vertexBuffer.push(W,te),me}_subdivideTrianglesScanline(d){if(this._granularity<2)return function(te,ue){let me=[];for(let ge=0;ge0?(me.push(Ce),me.push(Oe),me.push(Te)):(me.push(Ce),me.push(Te),me.push(Oe))}return me}(this._vertexBuffer,d);let L=[],W=d.length;for(let te=0;te=1||qr<=0)||er&&(Teue)){Pe>=te&&Pe<=ue&&me.push(W[(ge+1)%3]);continue}!er&&Mr>0&&me.push(this._vertexToIndex(Ce+bt*Mr,Te+Et*Mr));let $r=Ce+bt*Math.max(Mr,0),_a=Ce+bt*Math.min(qr,1);Qt||this._generateIntraEdgeVertices(me,Ce,Te,Oe,Pe,$r,_a),!er&&qr<1&&me.push(this._vertexToIndex(Ce+bt*qr,Te+Et*qr)),(er||Pe>=te&&Pe<=ue)&&me.push(W[(ge+1)%3]),!er&&(Pe<=te||Pe>=ue)&&this._generateInterEdgeVertices(me,Ce,Te,Oe,Pe,it,He,_a,te,ue)}return me}_generateIntraEdgeVertices(d,L,W,te,ue,me,ge){let Ce=te-L,Te=ue-W,Oe=Te===0,Pe=Oe?Math.min(L,te):Math.min(me,ge),it=Oe?Math.max(L,te):Math.max(me,ge),He=Math.floor(Pe/this._granularityCellSize)+1,bt=Math.ceil(it/this._granularityCellSize)-1;if(Oe?L=He;Et--){let Qt=Et*this._granularityCellSize;d.push(this._vertexToIndex(Qt,W+Te*(Qt-L)/Ce))}}_generateInterEdgeVertices(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=ue-W,it=me-te,He=ge-ue,bt=(Te-ue)/He,Et=(Oe-ue)/He,Qt=Math.min(bt,Et),er=Math.max(bt,Et),br=te+it*Qt,sr=Math.floor(Math.min(br,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(br,Ce)/this._granularityCellSize)-1,qr=Ce=1||er<=0){let Ca=W-ge,nn=me+(L-me)*Math.min((Te-ge)/Ca,(Oe-ge)/Ca);sr=Math.floor(Math.min(nn,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(nn,Ce)/this._granularityCellSize)-1,qr=Ce0?Oe:Te;if(qr)for(let Ca=sr;Ca<=Mr;Ca++)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a));else for(let Ca=Mr;Ca>=sr;Ca--)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a))}_generateOutline(d){let L=[];for(let W of d){let te=Sv(W,this._granularity,!0),ue=this._pointArrayToIndices(te),me=[];for(let ge=1;geue!=(me===_0)?(d.push(L),d.push(W),d.push(this._vertexToIndex(te,me)),d.push(W),d.push(this._vertexToIndex(ue,me)),d.push(this._vertexToIndex(te,me))):(d.push(W),d.push(L),d.push(this._vertexToIndex(te,me)),d.push(this._vertexToIndex(ue,me)),d.push(W),d.push(this._vertexToIndex(te,me)))}_fillPoles(d,L,W){let te=this._vertexBuffer,ue=F,me=d.length;for(let ge=2;ge80*Pe){Qt=Te[0],er=Te[1];let sr=Qt,Mr=er;for(let qr=Pe;qrsr&&(sr=$r),_a>Mr&&(Mr=_a)}br=Math.max(sr-Qt,Mr-er),br=br!==0?32767/br:0}return _p(bt,Et,Pe,Qt,er,br,0),Et}(W,te),Ce=this._convertIndices(W,ge);ue=this._subdivideTrianglesScanline(Ce)}catch(ge){console.error(ge)}let me=[];return L&&(me=this._generateOutline(d)),this._ensureNoPoleVertices(),this._handlePoles(ue),{verticesFlattened:this._vertexBuffer,indicesTriangles:ue,indicesLineList:me}}_convertIndices(d,L){let W=[];for(let te of L)W.push(this._vertexToIndex(d[2*te],d[2*te+1]));return W}_pointArrayToIndices(d){let L=[];for(let W of d)L.push(this._vertexToIndex(W.x,W.y));return L}}function g4(R,d,L,W=!0){return new JH(L,d).subdividePolygonInternal(R,W)}function Sv(R,d,L=!1){if(!R||R.length<1)return[];if(R.length<2)return[];let W=R[0],te=R[R.length-1],ue=L&&(W.x!==te.x||W.y!==te.y);if(d<2)return ue?[...R,R[0]]:[...R];let me=Math.floor(F/d),ge=[];ge.push(new t(R[0].x,R[0].y));let Ce=R.length,Te=ue?Ce:Ce-1;for(let Oe=0;Oe0?(Math.floor(_a/me)+1)*me:(Math.ceil(_a/me)-1)*me,bn=Mr>0?(Math.floor(Ca/me)+1)*me:(Math.ceil(Ca/me)-1)*me,Fn=Math.abs(_a-qa),gn=Math.abs(Ca-bn),Va=Math.abs(_a-Et),Hn=Math.abs(Ca-Qt),ni=er?Fn/qr:Number.POSITIVE_INFINITY,Wn=br?gn/$r:Number.POSITIVE_INFINITY;if((Va<=Fn||!er)&&(Hn<=gn||!br))break;if(ni=0?me-1:ue-1,Te=(ge+1)%ue,Oe=R[2*d[Ce]],Pe=R[2*d[Te]],it=R[2*d[me]],He=R[2*d[me]+1],bt=R[2*d[ge]+1],Et=!1;if(OePe)Et=!1;else{let Qt=bt-He,er=-(R[2*d[ge]]-it),br=He((Pe-it)*Qt+(R[2*d[Te]+1]-He)*er)*br&&(Et=!0)}if(Et){let Qt=d[Ce],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),me--,me<0&&(me=ue-1)}else{let Qt=d[Te],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),ge++,ge>=ue&&(ge=0)}if(Ce===Te)break}}function y4(R,d,L,W,te,ue,me,ge,Ce){let Te=te.length/2,Oe=me&&ge&&Ce;if(TeFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,Fn=!0,qr=0);let gn=Sg(er,bt,Qt,br,_a,qa,Mr),Va=Sg(er,bt,Qt,br,Ca,bn,Mr),Hn=Sg(er,bt,Qt,br,nn,Fn,Mr);He.emplaceBack(qr+gn-sr,qr+Va-sr,qr+Hn-sr),Mr.primitiveLength++}})(d,L,W,te,ue,R),Oe&&function(Pe,it,He,bt,Et,Qt){let er=[];for(let $r=0;$rFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,qr=0);let Fn=Sg(er,bt,Qt,br,Ca,qa,Mr),gn=Sg(er,bt,Qt,br,nn,bn,Mr);He.emplaceBack(qr+Fn-sr,qr+gn-sr),Mr.primitiveLength++}}(me,L,ge,te,Ce,R),d.forceNewSegmentOnNextPrepare(),me?.forceNewSegmentOnNextPrepare()}function Sg(R,d,L,W,te,ue,me){if(ue){let ge=W.count;return L(d[2*te],d[2*te+1]),R[te]=W.count,W.count++,me.vertexLength++,ge}return R[te]}class a3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new ir,this.indexArray=new ua,this.indexArray2=new ia,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.segments2=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("fill",this.layers,L);let te=this.layers[0].layout.get("fill-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W,L.availableImages):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;if(this.hasDependencies){let Pe=v0("fill",this.layers,ge,{zoom:this.zoom},L);this.patternFeatures.push(Pe)}else this.addFeature(ge,Ce,Te,W,{},L.subdivisionGranularity);L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}addFeatures(d,L,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,L,W,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,p0),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,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce=g4(ge,te,me.fill.getGranularityForZoomLevel(te.z)),Te=this.layoutVertexArray;y4((Oe,Pe)=>{Te.emplaceBack(Oe,Pe)},this.segments,this.layoutVertexArray,this.indexArray,Ce.verticesFlattened,Ce.indicesTriangles,this.segments2,this.indexArray2,Ce.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,canonical:te})}}let _4,x4;fi("FillBucket",a3,{omit:["layers","patternFeatures"]});var eW={get paint(){return x4=x4||new Ps({"fill-antialias":new hi(ht.paint_fill["fill-antialias"]),"fill-opacity":new wi(ht.paint_fill["fill-opacity"]),"fill-color":new wi(ht.paint_fill["fill-color"]),"fill-outline-color":new wi(ht.paint_fill["fill-outline-color"]),"fill-translate":new hi(ht.paint_fill["fill-translate"]),"fill-translate-anchor":new hi(ht.paint_fill["fill-translate-anchor"]),"fill-pattern":new sl(ht.paint_fill["fill-pattern"])})},get layout(){return _4=_4||new Ps({"fill-sort-key":new wi(ht.layout_fill["fill-sort-key"])})}};class tW extends ll{constructor(d,L){super(d,eW,L)}recalculate(d,L){super.recalculate(d,L);let W=this.paint._values["fill-outline-color"];W.value.kind==="constant"&&W.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new a3(d)}queryRadius(){return Ue(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:d,geometry:L,transform:W,pixelsToTileUnits:te}){return Bi(Qe(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-W.bearingInRadians,te),L)}isTileClipped(){return!0}}let rW=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),aW=ct([{name:"a_centroid",components:2,type:"Int16"}],4),{members:nW}=rW;class Eg{constructor(d,L,W,te,ue){this.properties={},this.extent=W,this.type=0,this.id=void 0,this._pbf=d,this._geometry=-1,this._keys=te,this._values=ue,d.readFields(iW,this,L)}loadGeometry(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=[],te,ue=1,me=0,ge=0,Ce=0;for(;d.pos>3}if(me--,ue===1||ue===2)ge+=d.readSVarint(),Ce+=d.readSVarint(),ue===1&&(te&&W.push(te),te=[]),te&&te.push(new t(ge,Ce));else{if(ue!==7)throw new Error(`unknown command ${ue}`);te&&te.push(te[0].clone())}}return te&&W.push(te),W}bbox(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=1,te=0,ue=0,me=0,ge=1/0,Ce=-1/0,Te=1/0,Oe=-1/0;for(;d.pos>3}if(te--,W===1||W===2)ue+=d.readSVarint(),me+=d.readSVarint(),ueCe&&(Ce=ue),meOe&&(Oe=me);else if(W!==7)throw new Error(`unknown command ${W}`)}return[ge,Te,Ce,Oe]}toGeoJSON(d,L,W){let te=this.extent*Math.pow(2,W),ue=this.extent*d,me=this.extent*L,ge=this.loadGeometry();function Ce(it){return[360*(it.x+ue)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(it.y+me)/te)*Math.PI))-90]}function Te(it){return it.map(Ce)}let Oe;if(this.type===1){let it=[];for(let bt of ge)it.push(bt[0]);let He=Te(it);Oe=it.length===1?{type:"Point",coordinates:He[0]}:{type:"MultiPoint",coordinates:He}}else if(this.type===2){let it=ge.map(Te);Oe=it.length===1?{type:"LineString",coordinates:it[0]}:{type:"MultiLineString",coordinates:it}}else{if(this.type!==3)throw new Error("unknown feature type");{let it=b4(ge),He=[];for(let bt of it)He.push(bt.map(Te));Oe=He.length===1?{type:"Polygon",coordinates:He[0]}:{type:"MultiPolygon",coordinates:He}}}let Pe={type:"Feature",geometry:Oe,properties:this.properties};return this.id!=null&&(Pe.id=this.id),Pe}}function iW(R,d,L){R===1?d.id=L.readVarint():R===2?function(W,te){let ue=W.readVarint()+W.pos;for(;W.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];let L=this._pbf.readVarint()+this._pbf.pos;return new Eg(this._pbf,L,this.extent,this._keys,this._values)}}function lW(R,d,L){R===15?d.version=L.readVarint():R===1?d.name=L.readString():R===5?d.extent=L.readVarint():R===2?d._features.push(L.pos):R===3?d._keys.push(L.readString()):R===4&&d._values.push(function(W){let te=null,ue=W.readVarint()+W.pos;for(;W.pos>3;te=me===1?W.readString():me===2?W.readFloat():me===3?W.readDouble():me===4?W.readVarint64():me===5?W.readVarint():me===6?W.readSVarint():me===7?W.readBoolean():null}if(te==null)throw new Error("unknown feature value");return te}(L))}class w4{constructor(d,L){this.layers=d.readFields(uW,{},L)}}function uW(R,d,L){if(R===3){let W=new sW(L,L.readVarint()+L.pos);W.length&&(d[W.name]=W)}}let n3=Math.pow(2,13);function kg(R,d,L,W,te,ue,me,ge){R.emplaceBack(d,L,2*Math.floor(W*n3)+me,te*n3*2,ue*n3*2,Math.round(ge))}class i3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new dr,this.centroidVertexArray=new It,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.features=[],this.hasDependencies=Md("fill-extrusion",this.layers,L);for(let{feature:te,id:ue,index:me,sourceLayerIndex:ge}of d){let Ce=this.layers[0]._featureFilter.needGeometry,Te=fo(te,Ce);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Te,W))continue;let Oe={id:ue,sourceLayerIndex:ge,index:me,geometry:Ce?Te.geometry:ql(te),properties:te.properties,type:te.type,patterns:{}};this.hasDependencies?this.features.push(v0("fill-extrusion",this.layers,Oe,{zoom:this.zoom},L)):this.addFeature(Oe,Oe.geometry,me,W,{},L.subdivisionGranularity),L.featureIndex.insert(te,Oe.geometry,me,ge,this.index,!0)}}addFeatures(d,L,W){for(let te of this.features){let{geometry:ue}=te;this.addFeature(te,ue,te.index,L,W,d.subdivisionGranularity)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}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,nW),this.centroidVertexBuffer=d.createVertexBuffer(this.centroidVertexArray,aW.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,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce={x:0,y:0,sampleCount:0},Te=this.layoutVertexArray.length;this.processPolygon(Ce,te,d,ge,me);let Oe=this.layoutVertexArray.length-Te,Pe=Math.floor(Ce.x/Ce.sampleCount),it=Math.floor(Ce.y/Ce.sampleCount);for(let He=0;He{kg(Oe,Pe,it,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,Te.verticesFlattened,Te.indicesTriangles)}_generateSideFaces(d,L){let W=0;for(let te=1;teFa.MAX_VERTEX_ARRAY_LENGTH&&(L.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let ge=ue.sub(me)._perp()._unit(),Ce=me.dist(ue);W+Ce>32768&&(W=0),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,1,W),W+=Ce,kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,1,W);let Te=L.segment.vertexLength;this.indexArray.emplaceBack(Te,Te+2,Te+1),this.indexArray.emplaceBack(Te+1,Te+2,Te+3),L.segment.vertexLength+=4,L.segment.primitiveLength+=2}}}function cW(R,d){for(let L=0;LF)||R.y===d.y&&(R.y<0||R.y>F)}function T4(R){return R.every(d=>d.x<0)||R.every(d=>d.x>F)||R.every(d=>d.y<0)||R.every(d=>d.y>F)}let A4;fi("FillExtrusionBucket",i3,{omit:["layers","features"]});var hW={get paint(){return A4=A4||new Ps({"fill-extrusion-opacity":new hi(ht["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new wi(ht["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new sl(ht["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new wi(ht["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new wi(ht["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new hi(ht["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class dW extends ll{constructor(d,L){super(d,hW,L)}createBucket(d){return new i3(d)}queryRadius(){return Ue(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me,pixelPosMatrix:ge}){let Ce=Qe(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-ue.bearingInRadians,me),Te=this.paint.get("fill-extrusion-height").evaluate(L,W),Oe=this.paint.get("fill-extrusion-base").evaluate(L,W),Pe=function(He,bt){let Et=[];for(let Qt of He){let er=[Qt.x,Qt.y,0,1];z(er,er,bt),Et.push(new t(er[0]/er[3],er[1]/er[3]))}return Et}(Ce,ge),it=function(He,bt,Et,Qt){let er=[],br=[],sr=Qt[8]*bt,Mr=Qt[9]*bt,qr=Qt[10]*bt,$r=Qt[11]*bt,_a=Qt[8]*Et,Ca=Qt[9]*Et,nn=Qt[10]*Et,qa=Qt[11]*Et;for(let bn of He){let Fn=[],gn=[];for(let Va of bn){let Hn=Va.x,ni=Va.y,Wn=Qt[0]*Hn+Qt[4]*ni+Qt[12],si=Qt[1]*Hn+Qt[5]*ni+Qt[13],po=Qt[2]*Hn+Qt[6]*ni+Qt[14],cs=Qt[3]*Hn+Qt[7]*ni+Qt[15],Ds=po+qr,Xs=cs+$r,Mf=Wn+_a,vu=si+Ca,yc=po+nn,Dc=cs+qa,Hl=new t((Wn+sr)/Xs,(si+Mr)/Xs);Hl.z=Ds/Xs,Fn.push(Hl);let rf=new t(Mf/Dc,vu/Dc);rf.z=yc/Dc,gn.push(rf)}er.push(Fn),br.push(gn)}return[er,br]}(te,Oe,Te,ge);return function(He,bt,Et){let Qt=1/0;Bi(Et,bt)&&(Qt=M4(Et,bt[0]));for(let er=0;er>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let ue=S4[15&W];if(!ue)throw new Error("Unrecognized array type.");let[me]=new Uint16Array(d,2,1),[ge]=new Uint32Array(d,4,1);return new dy(ge,me,ue,d)}constructor(d,L=64,W=Float64Array,te){if(isNaN(d)||d<0)throw new Error(`Unpexpected numItems value: ${d}.`);this.numItems=+d,this.nodeSize=Math.min(Math.max(+L,2),65535),this.ArrayType=W,this.IndexArrayType=d<65536?Uint16Array:Uint32Array;let ue=S4.indexOf(this.ArrayType),me=2*d*this.ArrayType.BYTES_PER_ELEMENT,ge=d*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-ge%8)%8;if(ue<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=2*d,this._finished=!0):(this.data=new ArrayBuffer(8+me+ge+Ce),this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ue]),new Uint16Array(this.data,2,1)[0]=L,new Uint32Array(this.data,4,1)[0]=d)}add(d,L){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=d,this.coords[this._pos++]=L,W}finish(){let d=this._pos>>1;if(d!==this.numItems)throw new Error(`Added ${d} items when expected ${this.numItems}.`);return o3(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(d,L,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ue,coords:me,nodeSize:ge}=this,Ce=[0,ue.length-1,0],Te=[];for(;Ce.length;){let Oe=Ce.pop()||0,Pe=Ce.pop()||0,it=Ce.pop()||0;if(Pe-it<=ge){for(let Qt=it;Qt<=Pe;Qt++){let er=me[2*Qt],br=me[2*Qt+1];er>=d&&er<=W&&br>=L&&br<=te&&Te.push(ue[Qt])}continue}let He=it+Pe>>1,bt=me[2*He],Et=me[2*He+1];bt>=d&&bt<=W&&Et>=L&&Et<=te&&Te.push(ue[He]),(Oe===0?d<=bt:L<=Et)&&(Ce.push(it),Ce.push(He-1),Ce.push(1-Oe)),(Oe===0?W>=bt:te>=Et)&&(Ce.push(He+1),Ce.push(Pe),Ce.push(1-Oe))}return Te}within(d,L,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:ue,nodeSize:me}=this,ge=[0,te.length-1,0],Ce=[],Te=W*W;for(;ge.length;){let Oe=ge.pop()||0,Pe=ge.pop()||0,it=ge.pop()||0;if(Pe-it<=me){for(let Qt=it;Qt<=Pe;Qt++)k4(ue[2*Qt],ue[2*Qt+1],d,L)<=Te&&Ce.push(te[Qt]);continue}let He=it+Pe>>1,bt=ue[2*He],Et=ue[2*He+1];k4(bt,Et,d,L)<=Te&&Ce.push(te[He]),(Oe===0?d-W<=bt:L-W<=Et)&&(ge.push(it),ge.push(He-1),ge.push(1-Oe)),(Oe===0?d+W>=bt:L+W>=Et)&&(ge.push(He+1),ge.push(Pe),ge.push(1-Oe))}return Ce}}function o3(R,d,L,W,te,ue){if(te-W<=L)return;let me=W+te>>1;E4(R,d,me,W,te,ue),o3(R,d,L,W,me-1,1-ue),o3(R,d,L,me+1,te,1-ue)}function E4(R,d,L,W,te,ue){for(;te>W;){if(te-W>600){let Te=te-W+1,Oe=L-W+1,Pe=Math.log(Te),it=.5*Math.exp(2*Pe/3),He=.5*Math.sqrt(Pe*it*(Te-it)/Te)*(Oe-Te/2<0?-1:1);E4(R,d,L,Math.max(W,Math.floor(L-Oe*it/Te+He)),Math.min(te,Math.floor(L+(Te-Oe)*it/Te+He)),ue)}let me=d[2*L+ue],ge=W,Ce=te;for(Lg(R,d,W,L),d[2*te+ue]>me&&Lg(R,d,W,te);geme;)Ce--}d[2*W+ue]===me?Lg(R,d,W,Ce):(Ce++,Lg(R,d,Ce,te)),Ce<=L&&(W=Ce+1),L<=Ce&&(te=Ce-1)}}function Lg(R,d,L,W){s3(R,L,W),s3(d,2*L,2*W),s3(d,2*L+1,2*W+1)}function s3(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function k4(R,d,L,W){let te=R-L,ue=d-W;return te*te+ue*ue}function l3(R,d,L,W){let te=W,ue=d+(L-d>>1),me,ge=L-d,Ce=R[d],Te=R[d+1],Oe=R[L],Pe=R[L+1];for(let it=d+3;itte)me=it,te=He;else if(He===te){let bt=Math.abs(it-ue);btW&&(me-d>3&&l3(R,d,me,W),R[me+2]=te,L-me>3&&l3(R,me,L,W))}function pW(R,d,L,W,te,ue){let me=te-L,ge=ue-W;if(me!==0||ge!==0){let Ce=((R-L)*me+(d-W)*ge)/(me*me+ge*ge);Ce>1?(L=te,W=ue):Ce>0&&(L+=me*Ce,W+=ge*Ce)}return me=R-L,ge=d-W,me*me+ge*ge}function tf(R,d,L,W){let te={type:d,geom:L},ue={id:R??null,type:te.type,geometry:te.geom,tags:W,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(te.type){case"Point":case"MultiPoint":Pg(ue,te.geom);break;case"LineString":Pg(ue,te.geom.points);break;case"Polygon":Pg(ue,te.geom[0].points);break;case"MultiLineString":for(let me of te.geom)Pg(ue,me.points);break;case"MultiPolygon":for(let me of te.geom)Pg(ue,me[0].points)}return ue}function u3(R){R.points.length>64&&(R.points=new Float64Array(R.points))}function Pg(R,d){for(let L=0;L0&&(me+=W?(te*Oe-Te*ue)/2:Math.sqrt(Math.pow(Te-te,2)+Math.pow(Oe-ue,2))),te=Te,ue=Oe}let ge=d.points.length-3;d.points[2]=1,L>0&&l3(d.points,0,ge,L),d.points[ge+2]=1,u3(d),d.size=Math.abs(me),d.start=0,d.end=d.size}function h3(R,d,L,W){for(let te=0;te1?1:L}function vy(R){let d={type:"Feature",geometry:vW(R),properties:R.tags};return R.id!=null&&(d.id=R.id),d}function vW(R){let{type:d,geometry:L}=R;switch(d){case"Point":return{type:d,coordinates:C4(L[0],L[1])};case"MultiPoint":return{type:d,coordinates:my(L)};case"LineString":return{type:d,coordinates:my(L.points)};case"MultiLineString":case"Polygon":return{type:d,coordinates:L.map(W=>my(W.points))};case"MultiPolygon":return{type:d,coordinates:L.map(W=>W.map(te=>my(te.points)))}}}function my(R){let d=[];for(let L=0;L=(L/=d)&&me=W)return null;let Ce=[];for(let Te of R){let Oe=te===Wf.X?Te.minX:Te.minY,Pe=te===Wf.X?Te.maxX:Te.maxY;if(Oe>=L&&Pe=W))switch(Te.type){case"Point":case"MultiPoint":mW(Te,Ce,L,W,te);continue;case"LineString":gW(Te,Ce,L,W,te,ge);continue;case"MultiLineString":yW(Te,Ce,L,W,te);continue;case"Polygon":_W(Te,Ce,L,W,te);continue;case"MultiPolygon":xW(Te,Ce,L,W,te);continue}}return Ce.length?Ce:null}function mW(R,d,L,W,te){let ue=[];(function(me,ge,Ce,Te,Oe){for(let Pe=0;Pe=Ce&&it<=Te&&w0(ge,me[Pe],me[Pe+1],me[Pe+2])}})(R.geometry,ue,L,W,te),ue.length&&d.push(tf(R.id,ue.length===3?"Point":"MultiPoint",ue,R.tags))}function gW(R,d,L,W,te,ue){let me=[];if(R4(R.geometry,me,L,W,te,!1,ue.lineMetrics),me.length)if(ue.lineMetrics)for(let ge of me)d.push(tf(R.id,"LineString",ge,R.tags));else d.push(me.length>1?tf(R.id,"MultiLineString",me,R.tags):tf(R.id,"LineString",me[0],R.tags))}function yW(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!1),ue.length&&d.push(ue.length!==1?tf(R.id,"MultiLineString",ue,R.tags):tf(R.id,"LineString",ue[0],R.tags))}function _W(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!0),ue.length&&d.push(tf(R.id,"Polygon",ue,R.tags))}function xW(R,d,L,W,te){let ue=[];for(let me of R.geometry){let ge=[];d3(me,ge,L,W,te,!0),ge.length&&ue.push(ge)}ue.length&&d.push(tf(R.id,"MultiPolygon",ue,R.tags))}function R4(R,d,L,W,te,ue,me){let ge=I4(R),Ce=te===Wf.X?bW:wW,Te,Oe,Pe=R.start;for(let Qt=0;QtL&&(Oe=Ce(ge,er,br,Mr,qr,L),me&&(ge.start=Pe+Te*Oe)):$r>W?_a=L&&(Oe=Ce(ge,er,br,Mr,qr,L),Ca=!0),_a>W&&$r<=W&&(Oe=Ce(ge,er,br,Mr,qr,W),Ca=!0),!ue&&Ca&&(me&&(ge.end=Pe+Te*Oe),d.push(ge),ge=I4(R)),me&&(Pe+=Te)}let it=R.points.length-3,He=R.points[it],bt=R.points[it+1],Et=te===Wf.X?He:bt;Et>=L&&Et<=W&&w0(ge.points,He,bt,R.points[it+2]),it=ge.points.length-3,ue&&it>=3&&(ge.points[it]!==ge.points[0]||ge.points[it+1]!==ge.points[1])&&w0(ge.points,ge.points[0],ge.points[1],ge.points[2]),ge.points.length&&(u3(ge),d.push(ge))}function I4(R){return{points:[],size:R.size,start:R.start,end:R.end}}function d3(R,d,L,W,te,ue){for(let me of R)R4(me,d,L,W,te,ue,!1)}function w0(R,d,L,W){R.push(d,L,W)}function bW(R,d,L,W,te,ue){let me=(ue-d)/(W-d);return w0(R.points,ue,L+(te-L)*me,1),me}function wW(R,d,L,W,te,ue){let me=(ue-L)/(te-L);return w0(R.points,d+(W-d)*me,ue,1),me}function p3(R,d){let L=d.buffer/d.extent,W=R,te=Wd(R,1,-1-L,L,Wf.X,-1,2,d),ue=Wd(R,1,1-L,2+L,Wf.X,-1,2,d);return(te||ue)&&(W=Wd(R,1,-L,1+L,Wf.X,-1,2,d)||[],te&&(W=D4(te,1).concat(W)),ue&&(W=W.concat(D4(ue,-1)))),W}function D4(R,d){let L=[];for(let W of R)switch(W.type){case"Point":case"MultiPoint":{let te=TW(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"LineString":{let te=v3(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiLineString":case"Polygon":{let te=[];for(let ue of W.geometry)te.push(v3(ue,d));L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiPolygon":{let te=[];for(let ue of W.geometry){let me=[];for(let ge of ue)me.push(v3(ge,d));te.push(me)}L.push(tf(W.id,W.type,te,W.tags));continue}}return L}function TW(R,d){let L=[];for(let W=0;W0||((te=d.addOrUpdateProperties)==null?void 0:te.length)>0;if(ue){let ge=R[0],Ce=c3({type:"FeatureCollection",features:[{type:"Feature",id:ge.id,geometry:d.newGeometry,properties:me?F4(ge.tags,d):ge.tags}]},L);return Ce=p3(Ce,L),Ce}if(me){let ge=[];for(let Ce of R){let Te=Li({},Ce);Te.tags=F4(Te.tags,d),ge.push(Te)}return ge}return R}function F4(R,d){if(d.removeAllProperties)return{};let L=Li({},R||{});if(d.removeProperties)for(let W of d.removeProperties)delete L[W];if(d.addOrUpdateProperties)for(let{key:W,value:te}of d.addOrUpdateProperties)L[W]=te;return L}(function(R){R[R.X=0]="X",R[R.Y=1]="Y"})(Wf||(Wf={}));let m3={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:R=>R};class MW{constructor(d){this.options=Object.assign(Object.create(m3),d),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(d){let L=[];for(let W of d){if(!W.geometry)continue;let[te,ue]=W.geometry.coordinates,[me,ge]=[x0(te),b0(ue)];L.push({id:W.id,type:"Point",geometry:[me,ge],tags:W.properties})}this.createIndex(L)}initialize(d){let L=[];for(let W of d)W.type==="Point"&&L.push(W);this.createIndex(L)}updateIndex(d,L,W){this.options=Object.assign(Object.create(m3),W.clusterOptions),this.initialize(d)}createIndex(d){let{log:L,minZoom:W,maxZoom:te}=this.options;L&&console.time("total time");let ue=`prepare ${d.length} points`;L&&console.time(ue),this.points=d;let me=[];for(let Ce=0;Ce=W;Ce--){let Te=Date.now();ge=this.trees[Ce]=this.createTree(this.cluster(ge,Ce)),L&&console.log("z%d: %d clusters in %dms",Ce,ge.numItems,Date.now()-Te)}L&&console.timeEnd("total time")}getClusters(d,L){return this.getClustersInternal(d,L).map(W=>vy(W))}getClustersInternal(d,L){let W=((d[0]+180)%360+360)%360-180,te=Math.max(-90,Math.min(90,d[1])),ue=d[2]===180?180:((d[2]+180)%360+360)%360-180,me=Math.max(-90,Math.min(90,d[3]));if(d[2]-d[0]>=360)W=-180,ue=180;else if(W>ue){let Pe=this.getClustersInternal([W,te,180,me],L),it=this.getClustersInternal([-180,te,ue,me],L);return Pe.concat(it)}let ge=this.trees[this.limitZoom(L)],Ce=ge.range(x0(W),b0(me),x0(ue),b0(te)),Te=ge.flatData,Oe=[];for(let Pe of Ce){let it=this.stride*Pe;Oe.push(Te[it+5]>1?SW(Te,it,this.clusterProps):this.points[Te[it+3]])}return Oe}getChildren(d){let L=this.getOriginId(d),W=this.getOriginZoom(d),te=new Error("No cluster with the specified id: "+d),ue=this.trees[W];if(!ue)throw te;let me=ue.flatData;if(L*this.stride>=me.length)throw te;let ge=this.options.radius/(this.options.extent*Math.pow(2,W-1)),Ce=ue.within(me[L*this.stride],me[L*this.stride+1],ge),Te=[];for(let Oe of Ce){let Pe=Oe*this.stride;me[Pe+4]===d&&Te.push(me[Pe+5]>1?EW(me,Pe,this.clusterProps):vy(this.points[me[Pe+3]]))}if(Te.length===0)throw te;return Te}getLeaves(d,L,W){let te=[];return this.appendLeaves(te,d,L=L||10,W=W||0,0),te}getTile(d,L,W){let te=this.trees[this.limitZoom(d)];if(!te)return null;let ue=Math.pow(2,d),{extent:me,radius:ge}=this.options,Ce=ge/me,Te=(W-Ce)/ue,Oe=(W+1+Ce)/ue,Pe={transformed:!0,features:[],source:null,x:L,y:W,z:d};return this.addTileFeatures(te.range((L-Ce)/ue,Te,(L+1+Ce)/ue,Oe),te.flatData,L,W,ue,Pe),L===0&&this.addTileFeatures(te.range(1-Ce/ue,Te,1,Oe),te.flatData,ue,W,ue,Pe),L===ue-1&&this.addTileFeatures(te.range(0,Te,Ce/ue,Oe),te.flatData,-1,W,ue,Pe),Pe}getClusterExpansionZoom(d){return this.getOriginZoom(d)}appendLeaves(d,L,W,te,ue){let me=this.getChildren(L);for(let ge of me){let Ce=ge.properties;if(Ce?.cluster?ue+Ce.point_count<=te?ue+=Ce.point_count:ue=this.appendLeaves(d,Ce.cluster_id,W,te,ue):ue1,Oe,Pe,it;if(Te)Oe=g3(L,Ce,this.clusterProps),Pe=L[Ce],it=L[Ce+1];else{let Et=this.points[L[Ce+3]];Oe=Et.tags,[Pe,it]=Et.geometry}let He={type:1,geometry:[[Math.round(this.options.extent*(Pe*ue-W)),Math.round(this.options.extent*(it*ue-te))]],tags:Oe},bt;bt=Te||this.options.generateId?L[Ce+3]:this.points[L[Ce+3]].id,bt!==void 0&&(He.id=bt),me.features.push(He)}}limitZoom(d){return Math.max(this.options.minZoom,Math.min(Math.floor(+d),this.options.maxZoom+1))}cluster(d,L){let{radius:W,extent:te,reduce:ue,minPoints:me}=this.options,ge=W/(te*Math.pow(2,L)),Ce=d.flatData,Te=[],Oe=this.stride;for(let Pe=0;PeL&&(Qt+=Ce[br+5])}if(Qt>Et&&Qt>=me){let er,br=it*Et,sr=He*Et,Mr=-1,qr=(Pe/Oe<<5)+(L+1)+this.points.length;for(let $r of bt){let _a=$r*Oe;if(Ce[_a+2]<=L)continue;Ce[_a+2]=L;let Ca=Ce[_a+5];br+=Ce[_a]*Ca,sr+=Ce[_a+1]*Ca,Ce[_a+4]=qr,ue&&(er||(er=this.map(Ce,Pe,!0),Mr=this.clusterProps.length,this.clusterProps.push(er)),ue(er,this.map(Ce,_a)))}Ce[Pe+4]=qr,Te.push(br/Qt,sr/Qt,1/0,qr,-1,Qt),ue&&Te.push(Mr)}else{for(let er=0;er1)for(let er of bt){let br=er*Oe;if(!(Ce[br+2]<=L)){Ce[br+2]=L;for(let sr=0;sr>5}getOriginZoom(d){return(d-this.points.length)%32}map(d,L,W){if(d[L+5]>1){let me=this.clusterProps[d[L+6]];return W?Object.assign({},me):me}let te=this.points[d[L+3]].tags,ue=this.options.map(te);return W&&ue===te?Object.assign({},ue):ue}}function SW(R,d,L){return{id:R[d+3],type:"Point",tags:g3(R,d,L),geometry:[R[d],R[d+1]]}}function EW(R,d,L){return{type:"Feature",id:R[d+3],properties:g3(R,d,L),geometry:{type:"Point",coordinates:[L4(R[d]),P4(R[d+1])]}}}function g3(R,d,L){let W=R[d+5],te=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W,ue=R[d+6],me=ue===-1?{}:Object.assign({},L[ue]);return Object.assign(me,{cluster:!0,cluster_id:R[d+3],point_count:W,point_count_abbreviated:te})}let y3="geojsonvt_clip_start",_3="geojsonvt_clip_end";function z4(R,d,L,W,te){let ue=d===te.maxZoom?0:te.tolerance/((1<0&&d.size<(te?me:W))return void(L.numPoints+=d.points.length/3);let ge=[];for(let Ce=0;Ceme)&&(L.numSimplified++,ge.push(d.points[Ce],d.points[Ce+1])),L.numPoints++;te&&function(Ce,Te){let Oe=0;for(let Pe=0,it=Ce.length,He=it-2;Pe0===Te)for(let Pe=0,it=Ce.length;Pe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(L),W.debug>1&&console.timeEnd("invalidating");let[te,ue,me]=[0,0,0],ge=z4(d,te,ue,me,W);ge.source=d;let Ce=gy(te,ue,me);if(this.tiles[Ce]=ge,this.tileCoords.push({z:te,x:ue,y:me,id:Ce}),W.debug){let Te=`z${te}`;this.stats[Te]=(this.stats[Te]||0)+1,this.total++}}getClusterExpansionZoom(d){return null}getChildren(d){return null}getLeaves(d,L,W){return null}getTile(d,L,W){let{extent:te,debug:ue}=this.options,me=1<1&&console.log("drilling down to z%d-%d-%d",d,L,W);let Ce,Te=d,Oe=L,Pe=W;for(;!Ce&&Te>0;)Te--,Oe>>=1,Pe>>=1,Ce=this.tiles[gy(Te,Oe,Pe)];return Ce?.source?(ue>1&&(console.log("found parent tile z%d-%d-%d",Te,Oe,Pe),console.time("drilling down")),this.splitTile(Ce.source,Te,Oe,Pe,d,L,W),ue>1&&console.timeEnd("drilling down"),this.tiles[ge]?B4(this.tiles[ge],te):null):null}splitTile(d,L,W,te,ue,me,ge){let Ce=[d,L,W,te],Te=this.options,Oe=Te.debug;for(;Ce.length;){te=Ce.pop(),W=Ce.pop(),L=Ce.pop(),d=Ce.pop();let Pe=1<1&&console.time("creation"),He=this.tiles[it]=z4(d,L,W,te,Te),this.tileCoords.push({z:L,x:W,y:te,id:it}),Oe)){Oe>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,W,te,He.numFeatures,He.numPoints,He.numSimplified),console.timeEnd("creation"));let Ca=`z${L}`;this.stats[Ca]=(this.stats[Ca]||0)+1,this.total++}if(He.source=d,ue==null){if(L===Te.indexMaxZoom||He.numPoints<=Te.indexMaxPoints)continue}else{if(L===Te.maxZoom||L===ue)continue;if(ue!=null){let Ca=ue-L;if(W!==me>>Ca||te!==ge>>Ca)continue}}if(He.source=null,!d.length)continue;Oe>1&&console.time("clipping");let bt=.5*Te.buffer/Te.extent,Et=.5-bt,Qt=.5+bt,er=1+bt,br=null,sr=null,Mr=null,qr=null,$r=Wd(d,Pe,W-bt,W+Qt,Wf.X,He.minX,He.maxX,Te),_a=Wd(d,Pe,W+Et,W+er,Wf.X,He.minX,He.maxX,Te);$r&&(br=Wd($r,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),sr=Wd($r,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),_a&&(Mr=Wd(_a,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),qr=Wd(_a,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),Oe>1&&console.timeEnd("clipping"),Ce.push(br||[],L+1,2*W,2*te),Ce.push(sr||[],L+1,2*W,2*te+1),Ce.push(Mr||[],L+1,2*W+1,2*te),Ce.push(qr||[],L+1,2*W+1,2*te+1)}}invalidateTiles(d){if(!d.length)return;let L=this.options,{debug:W}=L,te=1/0,ue=-1/0,me=1/0,ge=-1/0;for(let Oe of d)te=Math.min(te,Oe.minX),ue=Math.max(ue,Oe.maxX),me=Math.min(me,Oe.minY),ge=Math.max(ge,Oe.maxY);let Ce=L.buffer/L.extent,Te=new Set;for(let Oe in this.tiles){let Pe=this.tiles[Oe],it=1<=bt||ge=Qt)continue;let er=!1;for(let br of d)if(br.maxX>=He&&br.minX=Et&&br.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Pe.z,Pe.x,Pe.y,Pe.numFeatures,Pe.numPoints,Pe.numSimplified);let br=`z${Pe.z}`;this.stats[br]=(this.stats[br]||0)-1,this.total--}delete this.tiles[Oe],Te.add(Oe)}}Te.size&&(this.tileCoords=this.tileCoords.filter(Oe=>!Te.has(Oe.id)))}}function gy(R,d,L){return 32*((1<L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let L of this.layers)this.gradients[L.id]={};this.layoutVertexArray=new Ar,this.layoutVertexArray2=new hr,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("line",this.layers,L)||this.hasLineDasharray(this.layers);let te=this.layers[0].layout.get("line-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},dashes:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;this.hasDependencies?(Md("line",this.layers,L)?v0("line",this.layers,ge,{zoom:this.zoom},L):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,ge,this.zoom,L),this.patternFeatures.push(ge)):this.addFeature(ge,Ce,Te,W,{},{},L.subdivisionGranularity),L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W,te){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W,dashPositions:te})}addFeatures(d,L,W,te){for(let ue of this.patternFeatures)this.addFeature(ue,ue.geometry,ue.index,L,W,te,d.subdivisionGranularity)}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,zW)),this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,DW),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.hasOwn(d.properties,y3)&&Object.hasOwn(d.properties,_3))return{start:+d.properties[y3],end:+d.properties[_3]}}addFeature(d,L,W,te,ue,me,ge){let Ce=this.layers[0].layout,Te=Ce.get("line-join").evaluate(d,{}),Oe=Ce.get("line-cap").evaluate(d,{}),Pe=Ce.get("line-miter-limit").evaluate(d,{}),it=Ce.get("line-round-limit").evaluate(d,{});this.lineClips=this.lineFeatureClips(d);for(let He of L)this.addLine(He,d,Te,Oe,Pe,it,te,ge);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,dashPositions:me,canonical:te})}addLine(d,L,W,te,ue,me,ge,Ce){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,d=Sv(d,ge?Ce.line.getGranularityForZoomLevel(ge.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let sr=0;sr=2&&d[Oe-1].equals(d[Oe-2]);)Oe--;let Pe=0;for(;Pe0;if(nn&&sr>Pe){let gn=bt.dist(Et);if(gn>2*it){let Va=bt.sub(bt.sub(Et)._mult(it/gn)._round());this.updateDistance(Et,Va),this.addCurrentVertex(Va,er,0,0,He),Et=Va}}let bn=Et&&Qt,Fn=bn?W:Te?"butt":te;if(bn&&Fn==="round"&&(_aue&&(Fn="bevel"),Fn==="bevel"&&(_a>2&&(Fn="flipbevel"),_a100)Mr=br.mult(-1);else{let gn=_a*er.add(br).mag()/er.sub(br).mag();Mr._perp()._mult(gn*(qa?-1:1))}this.addCurrentVertex(bt,Mr,0,0,He),this.addCurrentVertex(bt,Mr.mult(-1),0,0,He)}else if(Fn==="bevel"||Fn==="fakeround"){let gn=-Math.sqrt(_a*_a-1),Va=qa?gn:0,Hn=qa?0:gn;if(Et&&this.addCurrentVertex(bt,er,Va,Hn,He),Fn==="fakeround"){let ni=Math.round(180*Ca/Math.PI/20);for(let Wn=1;Wn2*it){let Va=bt.add(Qt.sub(bt)._mult(it/gn)._round());this.updateDistance(bt,Va),this.addCurrentVertex(Va,br,0,0,He),bt=Va}}}}addCurrentVertex(d,L,W,te,ue,me=!1){let ge=L.y*te-L.x,Ce=-L.y-L.x*te;this.addHalfVertex(d,L.x+L.y*W,L.y-L.x*W,me,!1,W,ue),this.addHalfVertex(d,ge,Ce,me,!0,-te,ue),this.distance>N4/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(d,L,W,te,ue,me))}addHalfVertex({x:d,y:L},W,te,ue,me,ge,Ce){let Te=.5*(this.lineClips?this.scaledDistance*(N4-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((d<<1)+(ue?1:0),(L<<1)+(me?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(ge===0?0:ge<0?-1:1)|(63&Te)<<2,Te>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Oe=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,Oe,this.e2),Ce.primitiveLength++),me?this.e2=Oe:this.e1=Oe}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(d,L){this.distance+=d.dist(L),this.updateScaledDistance()}hasLineDasharray(d){for(let L of d){let W=L.paint.get("line-dasharray");if(W&&!W.isConstant())return!0}return!1}addLineDashDependencies(d,L,W,te){for(let ue of d){let me=ue.paint.get("line-dasharray");if(!me||me.value.kind==="constant")continue;let ge=ue.layout.get("line-cap").evaluate(L,{})==="round",Ce={dasharray:me.value.evaluate({zoom:W-1},L,{}),round:ge},Te={dasharray:me.value.evaluate({zoom:W},L,{}),round:ge},Oe={dasharray:me.value.evaluate({zoom:W+1},L,{}),round:ge},Pe=`${Ce.dasharray.join(",")},${Ce.round}`,it=`${Te.dasharray.join(",")},${Te.round}`,He=`${Oe.dasharray.join(",")},${Oe.round}`;te.dashDependencies[Pe]=Ce,te.dashDependencies[it]=Te,te.dashDependencies[He]=Oe,L.dashes[ue.id]={min:Pe,mid:it,max:He}}}}let j4,U4;fi("LineBucket",b3,{omit:["layers","patternFeatures"]});var q4={get paint(){return U4=U4||new Ps({"line-opacity":new wi(ht.paint_line["line-opacity"]),"line-color":new wi(ht.paint_line["line-color"]),"line-translate":new hi(ht.paint_line["line-translate"]),"line-translate-anchor":new hi(ht.paint_line["line-translate-anchor"]),"line-width":new wi(ht.paint_line["line-width"]),"line-gap-width":new wi(ht.paint_line["line-gap-width"]),"line-offset":new wi(ht.paint_line["line-offset"]),"line-blur":new wi(ht.paint_line["line-blur"]),"line-dasharray":new sl(ht.paint_line["line-dasharray"]),"line-pattern":new sl(ht.paint_line["line-pattern"]),"line-gradient":new tu(ht.paint_line["line-gradient"])})},get layout(){return j4=j4||new Ps({"line-cap":new wi(ht.layout_line["line-cap"]),"line-join":new wi(ht.layout_line["line-join"]),"line-miter-limit":new wi(ht.layout_line["line-miter-limit"]),"line-round-limit":new wi(ht.layout_line["line-round-limit"]),"line-sort-key":new wi(ht.layout_line["line-sort-key"])})}};class OW extends wi{possiblyEvaluate(d,L){return L=new oi(Math.floor(L.zoom),{now:L.now,fadeDuration:L.fadeDuration,zoomHistory:L.zoomHistory,transition:L.transition}),super.possiblyEvaluate(d,L)}evaluate(d,L,W,te){return L=X({},L,{zoom:Math.floor(L.zoom)}),super.evaluate(d,L,W,te)}}let yy;class NW extends ll{constructor(d,L){super(d,q4,L),this.gradientVersion=0,yy||(yy=new OW(q4.paint.properties["line-width"].specification),yy.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(d){if(d==="line-gradient"){let L=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(L)&&L._styleExpression.expression instanceof Ss,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,L){super.recalculate(d,L),this.paint._values["line-floorwidth"]=yy.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new b3(d)}queryRadius(d){let L=d,W=V4(Le("line-width",this,L),Le("line-gap-width",this,L)),te=Le("line-offset",this,L);return W/2+Math.abs(te)+Ue(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me}){let ge=Qe(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-ue.bearingInRadians,me),Ce=me/2*V4(this.paint.get("line-width").evaluate(L,W),this.paint.get("line-gap-width").evaluate(L,W)),Te=this.paint.get("line-offset").evaluate(L,W);return Te&&(te=function(Oe,Pe){let it=[];for(let He of Oe){let bt=_t(He),Et=[];for(let Qt=0;Qt=3){for(let bt of He)if(Wa(Oe,bt))return!0}if(rs(Oe,He,it))return!0}return!1}(ge,te,Ce)}isTileClipped(){return!0}}function V4(R,d){return d>0?d+2*R:R}let jW=ct([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),UW=ct([{name:"a_projected_pos",components:3,type:"Float32"}],4);ct([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let qW=ct([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ct([{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 G4=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),VW=ct([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function GW(R,d,L){let W=d.layout.get("text-transform").evaluate(L,{});return W==="uppercase"?R=R.toLocaleUpperCase():W==="lowercase"&&(R=R.toLocaleLowerCase()),Si.applyArabicShaping&&(R=Si.applyArabicShaping(R)),R}function HW(R,d,L){for(let W of R.sections)W.text=GW(W.text,d,L);return R}ct([{name:"triangle",components:3,type:"Uint16"}]),ct([{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"}]),ct([{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"}]),ct([{type:"Float32",name:"offsetX"}]),ct([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ct([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let Rg={"!":"\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","\u22EF":"\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"},WW={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},YW={40:!0};function H4(R,d,L,W,te,ue){if("fontStack"in d){let me=L[d.fontStack],ge=me?.[R];return ge?ge.metrics.advance*d.scale+te:0}{let me=W[d.imageName];return me?me.displaySize[0]*d.scale*Rc/ue+te:0}}function W4(R,d,L,W){let te=Math.pow(R-d,2);return W?RMath.max(d,this.sections[L].scale),0)}getMaxImageSize(d){let L=0,W=0;for(let te=0;teW))}addImageSection(d){let L=d.image?d.image.name:"";if(L.length===0)return void ee("Can't add FormattedSection with an empty image.");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push({scale:1,verticalAlign:d.verticalAlign||"bottom",imageName:L}),this.sectionIndex.push(this.sections.length-1)):ee("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(d,L,W,te,ue){let me=[],ge=this.determineAverageLineWidth(d,L,W,te,ue),Ce=this.hasZeroWidthSpaces(),Te=0,Oe=0,Pe=this.text[Symbol.iterator](),it=Pe.next(),He=this.text[Symbol.iterator]();He.next();let bt=He.next(),Et=this.text[Symbol.iterator]();Et.next(),Et.next();let Qt=Et.next();for(;!it.done;){let er=this.getSection(Oe),br=it.value.codePointAt(0);if(Pr(br)||(Te+=H4(br,er,W,te,d,ue)),!bt.done){let sr=zt(br),Mr=bt.value.codePointAt(0);(WW[br]||sr||"imageName"in er||!Qt.done&&YW[Mr])&&me.push(Y4(Oe+1,Te,ge,me,XW(br,Mr,sr&&Ce),!1))}Oe++,it=Pe.next(),bt=He.next(),Qt=Et.next()}return X4(Y4(this.length(),Te,ge,me,0,!0))}determineAverageLineWidth(d,L,W,te,ue){let me=0,ge=0;for(let Ce of this.text){let Te=this.getSection(ge);me+=H4(Ce.codePointAt(0),Te,W,te,d,ue),ge++}return me/Math.max(1,Math.ceil(me/L))}}let w3=4294967296,Z4=1/w3,$4=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class _y{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,L,W=this.length){for(;this.pos>3,me=this.pos;this.type=7&te,d(ue,L,this),this.pos===me&&this.skip(te)}return L}readMessage(d,L){return this.readFields(d,L,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*w3;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*w3;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let L=this.buf,W,te;return te=L[this.pos++],W=127&te,te<128?W:(te=L[this.pos++],W|=(127&te)<<7,te<128?W:(te=L[this.pos++],W|=(127&te)<<14,te<128?W:(te=L[this.pos++],W|=(127&te)<<21,te<128?W:(te=L[this.pos],W|=(15&te)<<28,function(ue,me,ge){let Ce=ge.buf,Te,Oe;if(Oe=Ce[ge.pos++],Te=(112&Oe)>>4,Oe<128||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<3,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<10,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<17,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<24,Oe<128)||(Oe=Ce[ge.pos++],Te|=(1&Oe)<<31,Oe<128))return A0(ue,Te,me);throw new Error("Expected varint not more than 10 bytes")}(W,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,L=this.pos;return this.pos=d,d-L>=12&&$4?$4.decode(this.buf.subarray(L,d)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(this.buf,L,d)}readBytes(){let d=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,d);return this.pos=d,L}readPackedVarint(d=[],L){let W=this.readPackedEnd();for(;this.pos127;);else if(L===2)this.pos=this.readVarint()+this.pos;else if(L===5)this.pos+=4;else{if(L!==1)throw new Error(`Unimplemented type: ${L}`);this.pos+=8}}writeTag(d,L){this.writeVarint(d<<3|L)}realloc(d){let L=this.length||16;for(;L268435455||d<0?function(L,W){let te,ue;if(L>=0?(te=L%4294967296|0,ue=L/4294967296|0):(te=~(-L%4294967296),ue=~(-L/4294967296),4294967295^te?te=te+1|0:(te=0,ue=ue+1|0)),L>=18446744073709552e3||L<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");W.realloc(10),function(me,ge,Ce){Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,Ce.buf[Ce.pos]=127&(me>>>=7)}(te,0,W),function(me,ge){let Ce=(7&me)<<4;ge.buf[ge.pos++]|=Ce|((me>>>=3)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me)))))}(ue,W)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let L=this.pos;this.pos=function(te,ue,me){for(let ge,Ce,Te=0;Te55295&&ge<57344){if(!Ce){ge>56319||Te+1===ue.length?(te[me++]=239,te[me++]=191,te[me++]=189):Ce=ge;continue}if(ge<56320){te[me++]=239,te[me++]=191,te[me++]=189,Ce=ge;continue}ge=Ce-55296<<10|ge-56320|65536,Ce=null}else Ce&&(te[me++]=239,te[me++]=191,te[me++]=189,Ce=null);ge<128?te[me++]=ge:(ge<2048?te[me++]=ge>>6|192:(ge<65536?te[me++]=ge>>12|224:(te[me++]=ge>>18|240,te[me++]=ge>>12&63|128),te[me++]=ge>>6&63|128),te[me++]=63&ge|128)}return me}(this.buf,d,this.pos);let W=this.pos-L;W>=128&&K4(L,W,this),this.pos=L-1,this.writeVarint(W),this.pos+=W}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let L=d.length;this.writeVarint(L),this.realloc(L);for(let W=0;W=128&&K4(W,te,this),this.pos=W-1,this.writeVarint(te),this.pos+=te}writeMessage(d,L,W){this.writeTag(d,2),this.writeRawMessage(L,W)}writePackedVarint(d,L){L.length&&this.writeMessage(d,ZW,L)}writePackedSVarint(d,L){L.length&&this.writeMessage(d,$W,L)}writePackedBoolean(d,L){L.length&&this.writeMessage(d,QW,L)}writePackedFloat(d,L){L.length&&this.writeMessage(d,KW,L)}writePackedDouble(d,L){L.length&&this.writeMessage(d,JW,L)}writePackedFixed32(d,L){L.length&&this.writeMessage(d,eY,L)}writePackedSFixed32(d,L){L.length&&this.writeMessage(d,tY,L)}writePackedFixed64(d,L){L.length&&this.writeMessage(d,rY,L)}writePackedSFixed64(d,L){L.length&&this.writeMessage(d,aY,L)}writeBytesField(d,L){this.writeTag(d,2),this.writeBytes(L)}writeFixed32Field(d,L){this.writeTag(d,5),this.writeFixed32(L)}writeSFixed32Field(d,L){this.writeTag(d,5),this.writeSFixed32(L)}writeFixed64Field(d,L){this.writeTag(d,1),this.writeFixed64(L)}writeSFixed64Field(d,L){this.writeTag(d,1),this.writeSFixed64(L)}writeVarintField(d,L){this.writeTag(d,0),this.writeVarint(L)}writeSVarintField(d,L){this.writeTag(d,0),this.writeSVarint(L)}writeStringField(d,L){this.writeTag(d,2),this.writeString(L)}writeFloatField(d,L){this.writeTag(d,5),this.writeFloat(L)}writeDoubleField(d,L){this.writeTag(d,1),this.writeDouble(L)}writeBooleanField(d,L){this.writeVarintField(d,+L)}}function A0(R,d,L){return L?4294967296*d+(R>>>0):4294967296*(d>>>0)+(R>>>0)}function K4(R,d,L){let W=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));L.realloc(W);for(let te=L.pos-1;te>=R;te--)L.buf[te+W]=L.buf[te]}function ZW(R,d){for(let L=0;Lge.h-me.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),L),h:1/0}],te=0,ue=0;for(let me of R)for(let ge=W.length-1;ge>=0;ge--){let Ce=W[ge];if(!(me.w>Ce.w||me.h>Ce.h)){if(me.x=Ce.x,me.y=Ce.y,ue=Math.max(ue,me.y+me.h),te=Math.max(te,me.x+me.w),me.w===Ce.w&&me.h===Ce.h){let Te=W.pop();Te&&geEt.toCodeUnitIndex(_a));let $r=br(Et.toString(),er);for(let _a of $r){let Ca=[..._a].map(()=>0);Qt.push(new T0(_a,Et.sections,Ca))}}else if(sr){Qt=[],er=er.map(nn=>Et.toCodeUnitIndex(nn));let $r=0,_a=[];for(let nn of Et.text)_a.push(...Array(nn.length).fill(Et.sectionIndex[$r])),$r++;let Ca=sr(Et.text,_a,er);for(let nn of Ca){let qa=[],bn="";for(let Fn of nn[0])qa.push(nn[1][bn.length]),bn+=Fn;Qt.push(new T0(nn[0],Et.sections,qa))}}else Qt=function($r,_a){let Ca=[],nn=0;for(let qa of _a)Ca.push($r.substring(nn,qa)),nn=qa;return nn<$r.length()&&Ca.push($r.substring(nn,$r.length())),Ca}(Et,er);let Mr=[],qr={positionedLines:Mr,text:Et.toString(),top:Oe[1],bottom:Oe[1],left:Oe[0],right:Oe[0],writingMode:Pe,iconsInText:!1,verticalizable:!1};return function($r,_a,Ca,nn,qa,bn,Fn,gn,Va,Hn,ni,Wn){let si=0,po=0,cs=0,Ds=0,Xs=gn==="right"?1:gn==="left"?0:.5,Mf=Rc/Wn,vu=0;for(let Hl of qa){Hl.trim();let rf=Hl.getMaxScale(),Xf={positionedGlyphs:[],lineOffset:0};$r.positionedLines[vu]=Xf;let Zf=Xf.positionedGlyphs,Th=0;if(!Hl.length()){po+=bn,++vu;continue}let Sf=sY(nn,Hl,Mf),Ah=0;for(let Fc of Hl.text){let nu=Hl.getSection(Ah),lc=Fc.codePointAt(0),mu=lY(Va,ni,lc),zc={glyph:lc,imageName:null,x:si,y:po+-17,vertical:mu,scale:1,fontStack:"",sectionIndex:Hl.getSectionIndex(Ah),metrics:null,rect:null},Zd;if("fontStack"in nu){if(Zd=uY(nu,lc,mu,Sf,_a,Ca),!Zd)continue;zc.fontStack=nu.fontStack}else{if($r.iconsInText=!0,nu.scale*=Mf,Zd=cY(nu,mu,rf,Sf,nn),!Zd)continue;Th=Math.max(Th,Zd.imageOffset),zc.imageName=nu.imageName}let{rect:dd,metrics:Bg,baselineOffset:Ep}=Zd;zc.y+=Ep,zc.scale=nu.scale,zc.metrics=Bg,zc.rect=dd,Zf.push(zc),mu?($r.verticalizable=!0,si+=("imageName"in nu?Bg.advance:Rc)*nu.scale+Hn):si+=Bg.advance*nu.scale+Hn,Ah++}Zf.length!==0&&(cs=Math.max(si-Hn,cs),fY(Zf,0,Zf.length-1,Xs)),si=0,Xf.lineOffset=Math.max(Th,(rf-1)*Rc);let Hh=bn*rf+Th;po+=Hh,Ds=Math.max(Hh,Ds),++vu}let{horizontalAlign:yc,verticalAlign:Dc}=A3(Fn);(function(Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc){let nu=(rf-Xf)*Th,lc=0;lc=Sf!==Ah?-Hh*Zf- -17:-Zf*Fc*Ah+.5*Ah;for(let mu of Hl)for(let zc of mu.positionedGlyphs)zc.x+=nu,zc.y+=lc})($r.positionedLines,Xs,yc,Dc,cs,Ds,bn,po,qa.length),$r.top+=-Dc*po,$r.bottom=$r.top+po,$r.left+=-yc*cs,$r.right=$r.left+cs}(qr,d,L,W,Qt,me,ge,Ce,Pe,Te,it,bt),!function($r){for(let _a of $r)if(_a.positionedGlyphs.length!==0)return!1;return!0}(Mr)&&qr}function A3(R){let d=.5,L=.5;switch(R){case"right":case"top-right":case"bottom-right":d=1;break;case"left":case"top-left":case"bottom-left":d=0}switch(R){case"bottom":case"bottom-right":case"bottom-left":L=1;break;case"top":case"top-right":case"top-left":L=0}return{horizontalAlign:d,verticalAlign:L}}function sY(R,d,L){let W=d.getMaxScale()*Rc,{maxImageWidth:te,maxImageHeight:ue}=d.getMaxImageSize(R),me=Math.max(W,ue*L);return{verticalLineContentWidth:Math.max(W,te*L),horizontalLineContentHeight:me}}function eS(R){switch(R){case"top":return 0;case"center":return .5;default:return 1}}function lY(R,d,L){return!(R===l.ax.horizontal||!d&&!Wt(L)||d&&(Pr(L)||(W=L,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(W)))));var W}function uY(R,d,L,W,te,ue){let me=ue[R.fontStack],ge=function(Te,Oe,Pe,it){if(Te?.rect)return Te;let He=Oe[Pe.fontStack],bt=He?.[it];return bt?{rect:null,metrics:bt.metrics}:null}(me?.[d],te,R,d);if(ge===null)return null;let Ce;if(L)Ce=W.verticalLineContentWidth-R.scale*Rc;else{let Te=eS(R.verticalAlign);Ce=(W.horizontalLineContentHeight-R.scale*Rc)*Te}return{rect:ge.rect,metrics:ge.metrics,baselineOffset:Ce}}function cY(R,d,L,W,te){let ue=te[R.imageName];if(!ue)return null;let me=ue.paddedRect,ge=ue.displaySize,Ce={width:ge[0],height:ge[1],left:1,top:-3,advance:d?ge[1]:ge[0]},Te;if(d)Te=W.verticalLineContentWidth-ge[1]*R.scale;else{let Oe=eS(R.verticalAlign);Te=(W.horizontalLineContentHeight-ge[1]*R.scale)*Oe}return{rect:me,metrics:Ce,baselineOffset:Te,imageOffset:(d?ge[0]:ge[1])*R.scale-Rc*L}}function fY(R,d,L,W){if(W===0)return;let te=R[L],ue=(R[L].x+te.metrics.advance*te.scale)*W;for(let me=d;me<=L;me++)R[me].x-=ue}function hY(R,d,L){let{horizontalAlign:W,verticalAlign:te}=A3(L),ue=d[0]-R.displaySize[0]*W,me=d[1]-R.displaySize[1]*te;return{image:R,top:me,bottom:me+R.displaySize[1],left:ue,right:ue+R.displaySize[0]}}function tS(R){var d,L;let W=R.left,te=R.top,ue=R.right-W,me=R.bottom-te,ge=(d=R.image.textFitWidth)!==null&&d!==void 0?d:"stretchOrShrink",Ce=(L=R.image.textFitHeight)!==null&&L!==void 0?L:"stretchOrShrink",Te=(R.image.content[2]-R.image.content[0])/(R.image.content[3]-R.image.content[1]);if(Ce==="proportional"){if(ge==="stretchOnly"&&ue/meTe){let Oe=Math.ceil(ue/Te);te*=Oe/me,me=Oe}return{x1:W,y1:te,x2:W+ue,y2:te+me}}function rS(R,d,L,W,te,ue){let me=R.image,ge;if(me.content){let Qt=me.content,er=me.pixelRatio||1;ge=[Qt[0]/er,Qt[1]/er,me.displaySize[0]-Qt[2]/er,me.displaySize[1]-Qt[3]/er]}let Ce=d.left*ue,Te=d.right*ue,Oe,Pe,it,He;L==="width"||L==="both"?(He=te[0]+Ce-W[3],Pe=te[0]+Te+W[1]):(He=te[0]+(Ce+Te-me.displaySize[0])/2,Pe=He+me.displaySize[0]);let bt=d.top*ue,Et=d.bottom*ue;return L==="height"||L==="both"?(Oe=te[1]+bt-W[0],it=te[1]+Et+W[2]):(Oe=te[1]+(bt+Et-me.displaySize[1])/2,it=Oe+me.displaySize[1]),{image:me,top:Oe,right:Pe,bottom:it,left:He,collisionPadding:ge}}fi("ImagePosition",T3),fi("ImageAtlas",Q4),l.ax=void 0,(xp=l.ax||(l.ax={}))[xp.none=0]="none",xp[xp.horizontal=1]="horizontal",xp[xp.vertical=2]="vertical",xp[xp.horizontalOnly=3]="horizontalOnly";let Yd=128,bp=32640;function aS(R,d){let{expression:L}=d;if(L.kind==="constant")return{kind:"constant",layoutSize:L.evaluate(new oi(R+1))};if(L.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=L,ue=0;for(;ueme.id),this.index=d.index,this.pixelRatio=d.pixelRatio,this.sourceLayerIndex=d.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let L=this.layers[0]._unevaluatedLayout._values;this.textSizeData=aS(this.zoom,L["text-size"]),this.iconSizeData=aS(this.zoom,L["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),ue=W.get("symbol-z-order");this.canOverlap=M3(W,"text-overlap","text-allow-overlap")!=="never"||M3(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=ue!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(ue==="viewport-y"||ue==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(me=>l.ax[me])),this.stateDependentLayerIds=this.layers.filter(me=>me.isStateDependent()).map(me=>me.id),this.sourceID=d.sourceID}createArrays(){this.text=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("text"))),this.icon=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("icon"))),this.glyphOffsetArray=new ut,this.lineVertexArray=new ft,this.symbolInstances=new Ze,this.textAnchorOffsets=new Gt}calculateGlyphDependencies(d,L,W,te,ue){for(let me of d)if(L[me.codePointAt(0)]=!0,(W||te)&&ue){let ge=Rg[me];ge&&(L[ge.codePointAt(0)]=!0)}}populate(d,L,W){var te;let ue=this.layers[0],me=ue.layout,ge=me.get("text-font"),Ce=me.get("text-field"),Te=me.get("icon-image"),Oe=(Ce.value.kind!=="constant"||Ce.value.value instanceof Di&&!Ce.value.value.isEmpty()||Ce.value.value.toString().length>0)&&(ge.value.kind!=="constant"||ge.value.value.length>0),Pe=Te.value.kind!=="constant"||!!Te.value.value||Object.keys(Te.parameters).length>0,it=me.get("symbol-sort-key");if(this.features=[],!Oe&&!Pe)return;let He=L.iconDependencies,bt=L.glyphDependencies,Et=L.availableImages,Qt=new oi(this.zoom);for(let{feature:er,id:br,index:sr,sourceLayerIndex:Mr}of d){let qr=ue._featureFilter.needGeometry,$r=fo(er,qr);if(!ue._featureFilter.filter(Qt,$r,W))continue;let _a,Ca;if(qr||($r.geometry=ql(er)),Oe){let qa=ue.getValueAndResolveTokens("text-field",$r,W,Et),bn=Di.factory(qa);this.hasRTLText||(this.hasRTLText=pY(bn)),(!this.hasRTLText||Si.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Si.isParsed())&&(_a=HW(bn,ue,$r))}if(Pe){let qa=ue.getValueAndResolveTokens("icon-image",$r,W,Et);Ca=qa instanceof qi?qa:qi.fromString(qa)}if(!_a&&!Ca)continue;let nn=this.sortFeaturesByKey?it.evaluate($r,{},W):void 0;if(this.features.push({id:br,text:_a,icon:Ca,index:sr,sourceLayerIndex:Mr,geometry:$r.geometry,properties:er.properties,type:Eg.types[er.type],sortKey:nn}),Ca&&(He[Ca.name]=!0),_a){let qa=ge.evaluate($r,{},W).join(","),bn=me.get("text-rotation-alignment")!=="viewport"&&me.get("symbol-placement")!=="point";this.allowVerticalPlacement=(te=this.writingModes)===null||te===void 0?void 0:te.includes(l.ax.vertical);for(let Fn of _a.sections)if(Fn.image)He[Fn.image.name]=!0;else{let gn=Br(_a.toString()),Va=Fn.fontStack||qa;bt[Va]||(bt[Va]={}),this.calculateGlyphDependencies(Fn.text,bt[Va],bn,this.allowVerticalPlacement,gn)}}}me.get("symbol-placement")==="line"&&(this.features=function(er){let br={},sr={},Mr=[],qr=0;function $r(qa){Mr.push(er[qa]),qr++}function _a(qa,bn,Fn){let gn=sr[qa];return delete sr[qa],sr[bn]=gn,Mr[gn].geometry[0].pop(),Mr[gn].geometry[0]=Mr[gn].geometry[0].concat(Fn[0]),gn}function Ca(qa,bn,Fn){let gn=br[bn];return delete br[bn],br[qa]=gn,Mr[gn].geometry[0].shift(),Mr[gn].geometry[0]=Fn[0].concat(Mr[gn].geometry[0]),gn}function nn(qa,bn,Fn){let gn=Fn?bn[0][bn[0].length-1]:bn[0][0];return`${qa}:${gn.x}:${gn.y}`}for(let qa=0;qaqa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((er,br)=>er.sortKey-br.sortKey)}update(d,L,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}),this.icon.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}))}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,L){let W=this.lineVertexArray.length;if(d.segment!==void 0){let te=d.dist(L[d.segment+1]),ue=d.dist(L[d.segment]),me={};for(let ge=d.segment+1;ge=0;ge--)me[ge]={x:L[ge].x,y:L[ge].y,tileUnitDistanceFromAnchor:ue},ge>0&&(ue+=L[ge-1].dist(L[ge]));for(let ge=0;ge0}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,L){let W=d.placedSymbolArray.get(L),te=W.vertexStartIndex+4*W.numGlyphs;for(let ue=W.vertexStartIndex;uete[ge]-te[Ce]||ue[Ce]-ue[ge]),me}addToSortKeyRanges(d,L){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W?.sortKey===L?W.symbolInstanceEnd=d+1:this.sortKeyRanges.push({sortKey:L,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 L of this.symbolInstanceIndexes){let W=this.symbolInstances.get(L);this.featureSortOrder.push(W.featureIndex);let te=[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex];for(let ue=0;ue=0&&te.indexOf(me)===ue&&this.addIndicesForPlacedSymbol(this.text,me)}W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let nS,iS;fi("SymbolBucket",M0,{omit:["layers","collisionBoxArray","features","compareText"]}),M0.MAX_GLYPHS=65535,M0.addDynamicAttributes=S3;var C3={get paint(){return iS=iS||new Ps({"icon-opacity":new wi(ht.paint_symbol["icon-opacity"]),"icon-color":new wi(ht.paint_symbol["icon-color"]),"icon-halo-color":new wi(ht.paint_symbol["icon-halo-color"]),"icon-halo-width":new wi(ht.paint_symbol["icon-halo-width"]),"icon-halo-blur":new wi(ht.paint_symbol["icon-halo-blur"]),"icon-translate":new hi(ht.paint_symbol["icon-translate"]),"icon-translate-anchor":new hi(ht.paint_symbol["icon-translate-anchor"]),"text-opacity":new wi(ht.paint_symbol["text-opacity"]),"text-color":new wi(ht.paint_symbol["text-color"],{runtimeType:cr,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new wi(ht.paint_symbol["text-halo-color"]),"text-halo-width":new wi(ht.paint_symbol["text-halo-width"]),"text-halo-blur":new wi(ht.paint_symbol["text-halo-blur"]),"text-translate":new hi(ht.paint_symbol["text-translate"]),"text-translate-anchor":new hi(ht.paint_symbol["text-translate-anchor"])})},get layout(){return nS=nS||new Ps({"symbol-placement":new hi(ht.layout_symbol["symbol-placement"]),"symbol-spacing":new hi(ht.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new hi(ht.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new wi(ht.layout_symbol["symbol-sort-key"]),"symbol-z-order":new hi(ht.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new hi(ht.layout_symbol["icon-allow-overlap"]),"icon-overlap":new hi(ht.layout_symbol["icon-overlap"]),"icon-ignore-placement":new hi(ht.layout_symbol["icon-ignore-placement"]),"icon-optional":new hi(ht.layout_symbol["icon-optional"]),"icon-rotation-alignment":new hi(ht.layout_symbol["icon-rotation-alignment"]),"icon-size":new wi(ht.layout_symbol["icon-size"]),"icon-text-fit":new hi(ht.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new hi(ht.layout_symbol["icon-text-fit-padding"]),"icon-image":new wi(ht.layout_symbol["icon-image"]),"icon-rotate":new wi(ht.layout_symbol["icon-rotate"]),"icon-padding":new wi(ht.layout_symbol["icon-padding"]),"icon-keep-upright":new hi(ht.layout_symbol["icon-keep-upright"]),"icon-offset":new wi(ht.layout_symbol["icon-offset"]),"icon-anchor":new wi(ht.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new hi(ht.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new hi(ht.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new hi(ht.layout_symbol["text-rotation-alignment"]),"text-field":new wi(ht.layout_symbol["text-field"]),"text-font":new wi(ht.layout_symbol["text-font"]),"text-size":new wi(ht.layout_symbol["text-size"]),"text-max-width":new wi(ht.layout_symbol["text-max-width"]),"text-line-height":new hi(ht.layout_symbol["text-line-height"]),"text-letter-spacing":new wi(ht.layout_symbol["text-letter-spacing"]),"text-justify":new wi(ht.layout_symbol["text-justify"]),"text-radial-offset":new wi(ht.layout_symbol["text-radial-offset"]),"text-variable-anchor":new hi(ht.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new wi(ht.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new wi(ht.layout_symbol["text-anchor"]),"text-max-angle":new hi(ht.layout_symbol["text-max-angle"]),"text-writing-mode":new hi(ht.layout_symbol["text-writing-mode"]),"text-rotate":new wi(ht.layout_symbol["text-rotate"]),"text-padding":new hi(ht.layout_symbol["text-padding"]),"text-keep-upright":new hi(ht.layout_symbol["text-keep-upright"]),"text-transform":new wi(ht.layout_symbol["text-transform"]),"text-offset":new wi(ht.layout_symbol["text-offset"]),"text-allow-overlap":new hi(ht.layout_symbol["text-allow-overlap"]),"text-overlap":new hi(ht.layout_symbol["text-overlap"]),"text-ignore-placement":new hi(ht.layout_symbol["text-ignore-placement"]),"text-optional":new hi(ht.layout_symbol["text-optional"])})}};class oS{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:Yt,this.defaultValue=d}evaluate(d){if(d.formattedSection){let L=this.defaultValue.property.overrides;if(L?.hasOverride(d.formattedSection))return L.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}}fi("FormatSectionOverride",oS,{omit:["defaultValue"]});class wy extends ll{constructor(d,L){super(d,C3,L)}recalculate(d,L){if(super.recalculate(d,L),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 W=this.layout.get("text-writing-mode");if(W){let te=[];for(let ue of W)te.includes(ue)||te.push(ue);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(d,L,W,te){let ue=this.layout.get(d).evaluate(L,{},W,te),me=this._unevaluatedLayout._values[d];return me.isDataDriven()||kc(me.value)||!ue?ue:function(ge,Ce){return Ce.replace(/{([^{}]+)}/g,(Te,Oe)=>ge&&Oe in ge?String(ge[Oe]):"")}(L.properties,ue)}createBucket(d){return new M0(d)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let d of C3.paint.overridableProperties){if(!wy.hasPaintOverride(this.layout,d))continue;let L=this.paint.get(d),W=new oS(L),te=new kl(W,L.property.specification),ue=null;ue=L.value.kind==="constant"||L.value.kind==="source"?new Lc("source",te):new vc("composite",te,L.value.zoomStops),this.paint._values[d]=new Hs(L.property,ue,L.parameters)}}_handleOverridablePaintPropertyUpdate(d,L,W){return!(!this.layout||L.isDataDriven()||W.isDataDriven())&&wy.hasPaintOverride(this.layout,d)}static hasPaintOverride(d,L){let W=d.get("text-field"),te=C3.paint.properties[L],ue=!1,me=ge=>{var Ce;for(let Te of ge)if(!((Ce=te.overrides)===null||Ce===void 0)&&Ce.hasOverride(Te))return void(ue=!0)};if(W.value.kind==="constant"&&W.value.value instanceof Di)me(W.value.value.sections);else if(W.value.kind==="source"||W.value.kind==="composite"){let ge=Te=>{ue||(Te instanceof Mi&&qn(Te.value)===Pa?me(Te.value.sections):Te instanceof vs?me(Te.sections):Te.eachChild(ge))},Ce=W.value;Ce._styleExpression&&ge(Ce._styleExpression.expression)}return ue}}let sS;var vY={get paint(){return sS=sS||new Ps({"background-color":new hi(ht.paint_background["background-color"]),"background-pattern":new sc(ht.paint_background["background-pattern"]),"background-opacity":new hi(ht.paint_background["background-opacity"])})}};class mY extends ll{constructor(d,L){super(d,vY,L)}}class gY extends ll{constructor(d,L){super(d,{},L),this.onAdd=W=>{this.implementation.onAdd&&this.implementation.onAdd(W,W.painter.context.gl)},this.onRemove=W=>{this.implementation.onRemove&&this.implementation.onRemove(W,W.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 yY{constructor(d){this._methodToThrottle=d,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var d;this._triggered||(this._triggered=!0,(d=this._channel)===null||d===void 0||d.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let _Y={once:!0},L3=63710088e-1;class wp{constructor(d,L){if(isNaN(d)||isNaN(L))throw new Error(`Invalid LngLat object: (${d}, ${L})`);if(this.lng=+d,this.lat=+L,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new wp(G(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(d){let L=Math.PI/180,W=this.lat*L,te=d.lat*L,ue=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((d.lng-this.lng)*L);return L3*Math.acos(Math.min(ue,1))}static convert(d){if(d instanceof wp)return d;if(Array.isArray(d)&&(d.length===2||d.length===3))return new wp(Number(d[0]),Number(d[1]));if(!Array.isArray(d)&&typeof d=="object"&&d!==null)return new wp(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 lS=2*Math.PI*L3;function uS(R){return lS*Math.cos(R*Math.PI/180)}function cS(R){return(180+R)/360}function fS(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function hS(R,d){return R/uS(d)}function dS(R){return 360*R-180}function Ty(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}function pS(R,d){return R*uS(Ty(d))}class Ig{constructor(d,L,W=0){this.x=+d,this.y=+L,this.z=+W}static fromLngLat(d,L=0){let W=wp.convert(d);return new Ig(cS(W.lng),fS(W.lat),hS(L,W.lat))}toLngLat(){return new wp(dS(this.x),Ty(this.y))}toAltitude(){return pS(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/lS*(d=Ty(this.y),1/Math.cos(d*Math.PI/180));var d}}function vS(R,d,L){var W=2*Math.PI*6378137/256/Math.pow(2,L);return[R*W-2*Math.PI*6378137/2,d*W-2*Math.PI*6378137/2]}class P3{constructor(d,L,W){if(!function(te,ue,me){return!(te<0||te>25||me<0||me>=Math.pow(2,te)||ue<0||ue>=Math.pow(2,te))}(d,L,W))throw new Error(`x=${L}, y=${W}, 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=L,this.y=W,this.key=S0(0,d,d,L,W)}equals(d){return this.z===d.z&&this.x===d.x&&this.y===d.y}url(d,L,W){let te=(me=this.y,ge=this.z,Ce=vS(256*(ue=this.x),256*(me=Math.pow(2,ge)-me-1),ge),Te=vS(256*(ue+1),256*(me+1),ge),Ce[0]+","+Ce[1]+","+Te[0]+","+Te[1]);var ue,me,ge,Ce,Te;let Oe=function(Pe,it,He){let bt="";for(let Et=Pe;Et>0;Et--){let Qt=1<1?"@2x":"").replace(/{quadkey}/g,Oe).replace(/{bbox-epsg-3857}/g,te)}isChildOf(d){let L=this.z-d.z;return L>0&&d.x===this.x>>L&&d.y===this.y>>L}getTilePoint(d){let L=Math.pow(2,this.z);return new t((d.x*L-this.x)*F,(d.y*L-this.y)*F)}toString(){return`${this.z}/${this.x}/${this.y}`}}class mS{constructor(d,L){this.wrap=d,this.canonical=L,this.key=S0(d,L.z,L.z,L.x,L.y)}}class Ph{constructor(d,L,W,te,ue){if(this.terrainRttPosMatrix32f=null,d= z; overscaledZ = ${d}; z = ${W}`);this.overscaledZ=d,this.wrap=L,this.canonical=new P3(W,+te,+ue),this.key=S0(L,d,W,te,ue)}clone(){return new Ph(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 L=this.canonical.z-d;return d>this.canonical.z?new Ph(d,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ph(d,this.wrap,d,this.canonical.x>>L,this.canonical.y>>L)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(d,L){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-d;return d>this.canonical.z?S0(this.wrap*+L,d,this.canonical.z,this.canonical.x,this.canonical.y):S0(this.wrap*+L,d,d,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(d){if(d.wrap!==this.wrap||this.overscaledZ-d.overscaledZ<=0)return!1;if(d.overscaledZ===0)return this.overscaledZ>0;let L=this.canonical.z-d.canonical.z;return!(L<0)&&d.canonical.x===this.canonical.x>>L&&d.canonical.y===this.canonical.y>>L}children(d){if(this.overscaledZ>=d)return[new Ph(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let L=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new Ph(L,this.wrap,L,W,te),new Ph(L,this.wrap,L,W+1,te),new Ph(L,this.wrap,L,W,te+1),new Ph(L,this.wrap,L,W+1,te+1)]}isLessThan(d){return this.wrapd.wrap)&&(this.overscaledZd.overscaledZ)&&(this.canonical.xd.canonical.x)&&this.canonical.y=0&&d=0&&L=Te)return null;let Pe=this.canonical.x+te,it=this.wrap;return Pe<0?(it-=Math.ceil(-Pe/Te),Pe=(Pe%Te+Te)%Te):Pe>=Te&&(it+=Math.floor(Pe/Te),Pe%=Te),{tileID:new Ph(this.overscaledZ,it,Ce,Pe,Oe),x:me,y:ge}}}function S0(R,d,L,W,te){(R*=2)<0&&(R=-1*R-1);let ue=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(d){return this.expandBy(-d)}map(d){let L=new Ev;return L.extend(d(new t(this.minX,this.minY))),L.extend(d(new t(this.maxX,this.minY))),L.extend(d(new t(this.minX,this.maxY))),L.extend(d(new t(this.maxX,this.maxY))),L}static fromPoints(d){let L=new Ev;for(let W of d)L.extend(W);return L}contains(d){return d.x>=this.minX&&d.x<=this.maxX&&d.y>=this.minY&&d.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(d){return!this.empty()&&!d.empty()&&d.minX>=this.minX&&d.maxX<=this.maxX&&d.minY>=this.minY&&d.maxY<=this.maxY}intersects(d){return!this.empty()&&!d.empty()&&d.minX<=this.maxX&&d.maxX>=this.minX&&d.minY<=this.maxY&&d.maxY>=this.minY}}class gS{constructor(d){this._stringToNumber={},this._numberToString=[];for(let L=0;L=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 yS{constructor(d,L,W,te,ue){this.type="Feature",this._vectorTileFeature=d,this._x=W,this._y=te,this._z=L,this.properties=d.properties,this.id=ue}projectPoint(d,L,W,te){return[360*(d.x+L)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(d.y+W)/te)*Math.PI))-90]}projectLine(d,L,W,te){return d.map(ue=>this.projectPoint(ue,L,W,te))}get geometry(){if(this._geometry)return this._geometry;let d=this._vectorTileFeature,L=d.extent*Math.pow(2,this._z),W=d.extent*this._x,te=d.extent*this._y,ue=d.loadGeometry();switch(d.type){case 1:{let me=[];for(let Ce of ue)me.push(Ce[0]);let ge=this.projectLine(me,W,te,L);this._geometry=me.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge};break}case 2:{let me=ue.map(ge=>this.projectLine(ge,W,te,L));this._geometry=me.length===1?{type:"LineString",coordinates:me[0]}:{type:"MultiLineString",coordinates:me};break}case 3:{let me=b4(ue),ge=[];for(let Ce of me)ge.push(Ce.map(Te=>this.projectLine(Te,W,te,L)));this._geometry=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge};break}default:throw new Error(`unknown feature type: ${d.type}`)}return this._geometry}set geometry(d){this._geometry=d}toJSON(){let d={geometry:this.geometry};for(let L in this)L!=="_geometry"&&L!=="_vectorTileFeature"&&L!=="_x"&&L!=="_y"&&L!=="_z"&&(d[L]=this[L]);return d}}class E0{constructor(d,L,W){this._name=d,this.dataBuffer=L,typeof W=="number"?this._size=W:(this.nullabilityBuffer=W,this._size=W.size())}getValue(d){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(d)?null:this.getValueFromBuffer(d)}has(d){var L;return((L=this.nullabilityBuffer)==null?void 0:L.get(d))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Ay extends E0{}class R3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class I3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class _S extends E0{constructor(d,L,W,te){super(d,L,te),this.delta=W}}class D3 extends _S{constructor(d,L,W,te){super(d,Int32Array.of(L),W,te)}getValueFromBuffer(d){return this.dataBuffer[0]+d*this.delta}}class F3 extends E0{constructor(d,L,W,te){super(d,te?Int32Array.of(L):Uint32Array.of(L),W)}getValueFromBuffer(d){return this.dataBuffer[0]}}class xY{constructor(d,L,W,te,ue=4096){this._name=d,this._geometryVector=L,this._idVector=W,this._propertyVectors=te,this._extent=ue}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(d){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(L=>[L.name,L]))),this.propertyVectorsMap.get(d)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let d=[],L=this.geometryVector.getGeometries();for(let W=0;W>>32-R;let B3=z3,Xd=256;function O3(R,d){return R-R%d}function bY(R){let d=R>>>0;return((255&d)<<24|(65280&d)<<8|d>>>8&65280|d>>>24&255)>>>0}let N3=function(){if(!Number.isFinite(65536))return 65536;let R=O3(Math.floor(65536),Xd);return R===0?Xd:R}(),wY=3*N3/Xd+N3|0;function bS(){let R=new Uint8Array(wY);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:R,byteContainerI32:new Int32Array(R.buffer,R.byteOffset,R.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function TY(R,d,L,W,te){switch(te){case 1:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=it>>>0&1,ge[Te++]=it>>>1&1,ge[Te++]=it>>>2&1,ge[Te++]=it>>>3&1,ge[Te++]=it>>>4&1,ge[Te++]=it>>>5&1,ge[Te++]=it>>>6&1,ge[Te++]=it>>>7&1,ge[Te++]=it>>>8&1,ge[Te++]=it>>>9&1,ge[Te++]=it>>>10&1,ge[Te++]=it>>>11&1,ge[Te++]=it>>>12&1,ge[Te++]=it>>>13&1,ge[Te++]=it>>>14&1,ge[Te++]=it>>>15&1,ge[Te++]=it>>>16&1,ge[Te++]=it>>>17&1,ge[Te++]=it>>>18&1,ge[Te++]=it>>>19&1,ge[Te++]=it>>>20&1,ge[Te++]=it>>>21&1,ge[Te++]=it>>>22&1,ge[Te++]=it>>>23&1,ge[Te++]=it>>>24&1,ge[Te++]=it>>>25&1,ge[Te++]=it>>>26&1,ge[Te++]=it>>>27&1,ge[Te++]=it>>>28&1,ge[Te++]=it>>>29&1,ge[Te++]=it>>>30&1,ge[Te++]=it>>>31&1}})(R,d,L,W);break;case 2:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0;ge[Te++]=it>>>0&3,ge[Te++]=it>>>2&3,ge[Te++]=it>>>4&3,ge[Te++]=it>>>6&3,ge[Te++]=it>>>8&3,ge[Te++]=it>>>10&3,ge[Te++]=it>>>12&3,ge[Te++]=it>>>14&3,ge[Te++]=it>>>16&3,ge[Te++]=it>>>18&3,ge[Te++]=it>>>20&3,ge[Te++]=it>>>22&3,ge[Te++]=it>>>24&3,ge[Te++]=it>>>26&3,ge[Te++]=it>>>28&3,ge[Te++]=it>>>30&3,ge[Te++]=He>>>0&3,ge[Te++]=He>>>2&3,ge[Te++]=He>>>4&3,ge[Te++]=He>>>6&3,ge[Te++]=He>>>8&3,ge[Te++]=He>>>10&3,ge[Te++]=He>>>12&3,ge[Te++]=He>>>14&3,ge[Te++]=He>>>16&3,ge[Te++]=He>>>18&3,ge[Te++]=He>>>20&3,ge[Te++]=He>>>22&3,ge[Te++]=He>>>24&3,ge[Te++]=He>>>26&3,ge[Te++]=He>>>28&3,ge[Te++]=He>>>30&3}})(R,d,L,W);break;case 3:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0;ge[Te++]=it>>>0&7,ge[Te++]=it>>>3&7,ge[Te++]=it>>>6&7,ge[Te++]=it>>>9&7,ge[Te++]=it>>>12&7,ge[Te++]=it>>>15&7,ge[Te++]=it>>>18&7,ge[Te++]=it>>>21&7,ge[Te++]=it>>>24&7,ge[Te++]=it>>>27&7,ge[Te++]=7&(it>>>30|(1&He)<<2),ge[Te++]=He>>>1&7,ge[Te++]=He>>>4&7,ge[Te++]=He>>>7&7,ge[Te++]=He>>>10&7,ge[Te++]=He>>>13&7,ge[Te++]=He>>>16&7,ge[Te++]=He>>>19&7,ge[Te++]=He>>>22&7,ge[Te++]=He>>>25&7,ge[Te++]=He>>>28&7,ge[Te++]=7&(He>>>31|(3&bt)<<1),ge[Te++]=bt>>>2&7,ge[Te++]=bt>>>5&7,ge[Te++]=bt>>>8&7,ge[Te++]=bt>>>11&7,ge[Te++]=bt>>>14&7,ge[Te++]=bt>>>17&7,ge[Te++]=bt>>>20&7,ge[Te++]=bt>>>23&7,ge[Te++]=bt>>>26&7,ge[Te++]=bt>>>29&7}})(R,d,L,W);break;case 4:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0;ge[Te++]=it>>>0&15,ge[Te++]=it>>>4&15,ge[Te++]=it>>>8&15,ge[Te++]=it>>>12&15,ge[Te++]=it>>>16&15,ge[Te++]=it>>>20&15,ge[Te++]=it>>>24&15,ge[Te++]=it>>>28&15,ge[Te++]=He>>>0&15,ge[Te++]=He>>>4&15,ge[Te++]=He>>>8&15,ge[Te++]=He>>>12&15,ge[Te++]=He>>>16&15,ge[Te++]=He>>>20&15,ge[Te++]=He>>>24&15,ge[Te++]=He>>>28&15,ge[Te++]=bt>>>0&15,ge[Te++]=bt>>>4&15,ge[Te++]=bt>>>8&15,ge[Te++]=bt>>>12&15,ge[Te++]=bt>>>16&15,ge[Te++]=bt>>>20&15,ge[Te++]=bt>>>24&15,ge[Te++]=bt>>>28&15,ge[Te++]=Et>>>0&15,ge[Te++]=Et>>>4&15,ge[Te++]=Et>>>8&15,ge[Te++]=Et>>>12&15,ge[Te++]=Et>>>16&15,ge[Te++]=Et>>>20&15,ge[Te++]=Et>>>24&15,ge[Te++]=Et>>>28&15}})(R,d,L,W);break;case 5:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0;ge[Te++]=it>>>0&31,ge[Te++]=it>>>5&31,ge[Te++]=it>>>10&31,ge[Te++]=it>>>15&31,ge[Te++]=it>>>20&31,ge[Te++]=it>>>25&31,ge[Te++]=31&(it>>>30|(7&He)<<2),ge[Te++]=He>>>3&31,ge[Te++]=He>>>8&31,ge[Te++]=He>>>13&31,ge[Te++]=He>>>18&31,ge[Te++]=He>>>23&31,ge[Te++]=31&(He>>>28|(1&bt)<<4),ge[Te++]=bt>>>1&31,ge[Te++]=bt>>>6&31,ge[Te++]=bt>>>11&31,ge[Te++]=bt>>>16&31,ge[Te++]=bt>>>21&31,ge[Te++]=bt>>>26&31,ge[Te++]=31&(bt>>>31|(15&Et)<<1),ge[Te++]=Et>>>4&31,ge[Te++]=Et>>>9&31,ge[Te++]=Et>>>14&31,ge[Te++]=Et>>>19&31,ge[Te++]=Et>>>24&31,ge[Te++]=31&(Et>>>29|(3&Qt)<<3),ge[Te++]=Qt>>>2&31,ge[Te++]=Qt>>>7&31,ge[Te++]=Qt>>>12&31,ge[Te++]=Qt>>>17&31,ge[Te++]=Qt>>>22&31,ge[Te++]=Qt>>>27&31}})(R,d,L,W);break;case 6:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0;ge[Te++]=it>>>0&63,ge[Te++]=it>>>6&63,ge[Te++]=it>>>12&63,ge[Te++]=it>>>18&63,ge[Te++]=it>>>24&63,ge[Te++]=63&(it>>>30|(15&He)<<2),ge[Te++]=He>>>4&63,ge[Te++]=He>>>10&63,ge[Te++]=He>>>16&63,ge[Te++]=He>>>22&63,ge[Te++]=63&(He>>>28|(3&bt)<<4),ge[Te++]=bt>>>2&63,ge[Te++]=bt>>>8&63,ge[Te++]=bt>>>14&63,ge[Te++]=bt>>>20&63,ge[Te++]=bt>>>26&63,ge[Te++]=Et>>>0&63,ge[Te++]=Et>>>6&63,ge[Te++]=Et>>>12&63,ge[Te++]=Et>>>18&63,ge[Te++]=Et>>>24&63,ge[Te++]=63&(Et>>>30|(15&Qt)<<2),ge[Te++]=Qt>>>4&63,ge[Te++]=Qt>>>10&63,ge[Te++]=Qt>>>16&63,ge[Te++]=Qt>>>22&63,ge[Te++]=63&(Qt>>>28|(3&er)<<4),ge[Te++]=er>>>2&63,ge[Te++]=er>>>8&63,ge[Te++]=er>>>14&63,ge[Te++]=er>>>20&63,ge[Te++]=er>>>26&63}})(R,d,L,W);break;case 7:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0;ge[Te++]=it>>>0&127,ge[Te++]=it>>>7&127,ge[Te++]=it>>>14&127,ge[Te++]=it>>>21&127,ge[Te++]=127&(it>>>28|(7&He)<<4),ge[Te++]=He>>>3&127,ge[Te++]=He>>>10&127,ge[Te++]=He>>>17&127,ge[Te++]=He>>>24&127,ge[Te++]=127&(He>>>31|(63&bt)<<1),ge[Te++]=bt>>>6&127,ge[Te++]=bt>>>13&127,ge[Te++]=bt>>>20&127,ge[Te++]=127&(bt>>>27|(3&Et)<<5),ge[Te++]=Et>>>2&127,ge[Te++]=Et>>>9&127,ge[Te++]=Et>>>16&127,ge[Te++]=Et>>>23&127,ge[Te++]=127&(Et>>>30|(31&Qt)<<2),ge[Te++]=Qt>>>5&127,ge[Te++]=Qt>>>12&127,ge[Te++]=Qt>>>19&127,ge[Te++]=127&(Qt>>>26|(1&er)<<6),ge[Te++]=er>>>1&127,ge[Te++]=er>>>8&127,ge[Te++]=er>>>15&127,ge[Te++]=er>>>22&127,ge[Te++]=127&(er>>>29|(15&br)<<3),ge[Te++]=br>>>4&127,ge[Te++]=br>>>11&127,ge[Te++]=br>>>18&127,ge[Te++]=br>>>25&127}})(R,d,L,W);break;case 8:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0,sr=ue[Oe++]>>>0;ge[Te++]=it>>>0&255,ge[Te++]=it>>>8&255,ge[Te++]=it>>>16&255,ge[Te++]=it>>>24&255,ge[Te++]=He>>>0&255,ge[Te++]=He>>>8&255,ge[Te++]=He>>>16&255,ge[Te++]=He>>>24&255,ge[Te++]=bt>>>0&255,ge[Te++]=bt>>>8&255,ge[Te++]=bt>>>16&255,ge[Te++]=bt>>>24&255,ge[Te++]=Et>>>0&255,ge[Te++]=Et>>>8&255,ge[Te++]=Et>>>16&255,ge[Te++]=Et>>>24&255,ge[Te++]=Qt>>>0&255,ge[Te++]=Qt>>>8&255,ge[Te++]=Qt>>>16&255,ge[Te++]=Qt>>>24&255,ge[Te++]=er>>>0&255,ge[Te++]=er>>>8&255,ge[Te++]=er>>>16&255,ge[Te++]=er>>>24&255,ge[Te++]=br>>>0&255,ge[Te++]=br>>>8&255,ge[Te++]=br>>>16&255,ge[Te++]=br>>>24&255,ge[Te++]=sr>>>0&255,ge[Te++]=sr>>>8&255,ge[Te++]=sr>>>16&255,ge[Te++]=sr>>>24&255}})(R,d,L,W);break;case 16:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<128;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=65535&it,ge[Te++]=it>>>16&65535}})(R,d,L,W);break;default:(function(ue,me,ge,Ce,Te){let Oe=B3[Te]>>>0,Pe=me,it=0,He=ue[Pe]>>>0,bt=Ce;for(let Et=0;Et<8;Et++){for(let Qt=0;Qt<32;Qt++)if(it+Te<=32)ge[bt+Qt]=He>>>it&Oe,it+=Te,it===32&&(it=0,Pe++,Qt!==31&&(He=ue[Pe]>>>0));else{let er=32-it,br=He>>>it;Pe++,He=ue[Pe]>>>0;let sr=Te-er;ge[bt+Qt]=(br|(He&-1>>>32-sr>>>0)<>>0)}})(R,d,L,W,te)}return d+(te<<3)|0}function AY(R,d,L,W){if(L+2>d)throw new Error(`FastPFOR decode: byteContainer underflow at block=${W} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${L}, byteSize=${d})`);let te=R[L++],ue=R[L++];if(te>32)throw new Error(`FastPFOR decode: invalid bitWidth=${te} at block=${W} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:te,exceptionCount:ue,bytePosIn:L}}function MY(R,d,L,W,te,ue,me,ge,Ce){let{maxBits:Te,exceptionBitWidth:Oe,bytePosIn:Pe}=function(Qt,er,br,sr,Mr,qr){if(br+1>er)throw new Error(`FastPFOR decode: exception header underflow at block=${qr} (need 1 byte for maxBits, bytePos=${br}, byteSize=${er})`);let $r=Qt[br++];if($r32)throw new Error(`FastPFOR decode: invalid maxBits=${$r} at block=${qr} (bitWidth=${sr}, expected ${sr}..32)`);let _a=$r-sr|0;if(_a<1||_a>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${_a} at block=${qr} (bitWidth=${sr}, maxBits=${$r})`);if(br+Mr>er)throw new Error(`FastPFOR decode: exception positions underflow at block=${qr} (need=${Mr}, have=${er-br})`);return{maxBits:$r,exceptionBitWidth:_a,bytePosIn:br}}(te,ue,me,L,W,Ce);if(me=Pe,Oe===1){let Qt=1<Et)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${Oe} (ptr=${bt}, need ${W}, size=${Et}) at block ${Ce}`);for(let Qt=0;QtR.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${ge} at pageStart=${me} (expected > 0 and pageStart+whereMeta < encoded.length=${R.length})`);let Ce=me+1|0,Te=me+ge|0,Oe=R[Te]>>>0,Pe=Oe+3>>>2,it=Te+1,He=it+Pe;if(He>=R.length)throw new Error(`FastPFOR decode: invalid byteSize=${Oe} (metaInts=${Pe}, pageStart=${me}, packedEnd=${Te}, byteContainerStart=${it}) causes bitmapPos=${He} out of bounds (encoded.length=${R.length})`);let bt=function(er,br,sr,Mr){Mr.byteContainer.length>>2;if(3&qr.byteOffset)for(let Ca=0;Ca<$r;Ca=Ca+1|0){let nn=0|er[br+Ca|0],qa=Ca<<2;qr[qa]=255&nn,qr[qa+1|0]=nn>>>8&255,qr[qa+2|0]=nn>>>16&255,qr[qa+3|0]=nn>>>24&255}else{let Ca=Mr.byteContainerI32;(!Ca||Ca.buffer!==qr.buffer||Ca.byteOffset!==qr.byteOffset||Ca.length<$r)&&(Ca=Mr.byteContainerI32=new Int32Array(qr.buffer,qr.byteOffset,qr.byteLength>>>2)),Ca.set(er.subarray(br,br+$r))}let _a=3&sr;if(_a>0){let Ca=0|er[br+$r|0],nn=$r<<2;for(let qa=0;qa<_a;qa=qa+1|0)qr[nn+qa|0]=Ca>>>(qa<<3)&255}return qr}(R,it,Oe,ue),Et=Oe,Qt=function(er,br,sr){let Mr=0|er[br++],qr=sr.dataToBePacked;for(let $r=2;$r<=32;$r=$r+1|0){if(!(Mr>>>$r-1&1))continue;if(br>=er.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${$r}, streamWordIndex=${br}, needWords=1, availableWords=${er.length-br}, encodedWords=${er.length})`);let _a=er[br++]>>>0,Ca=O3(_a+31,32),nn=_a*$r+31>>>5;if(br+nn>er.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${$r}, size=${_a}, streamWordIndex=${br}, needWords=${nn}, availableWords=${er.length-br}, encodedWords=${er.length})`);let qa=qr[$r];(!qa||qa.length>>5)|0,sr.exceptionSizes[$r]=_a}return br}(R,He,ue);return ue.dataPointers.fill(0),function(er,br,sr,Mr,qr,$r,_a,Ca,nn,qa){let bn=0|sr,Fn=0;for(let gn=0;gn<_a;gn=gn+1|0){let Va=AY(Ca,nn,Fn,gn);Fn=Va.bytePosIn;let Hn=Va.bitWidth,ni=Va.exceptionCount,Wn=$r+gn*Xd|0;switch(Hn){case 0:qr.fill(0,Wn,Wn+Xd);break;case 32:for(let si=0;si0&&(Fn=MY(qr,Wn,Hn,ni,Ca,nn,Fn,qa,gn))}if(bn!==Mr)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${br}, packedStart=${sr}, consumedPackedEnd=${bn}, expectedPackedEnd=${Mr}, packedWords=${Mr-sr}, encoded.length=${er.length})`)}(R,me,Ce,Te,d,0|W,te/Xd|0,bt,Et,ue),Qt}function EY(R,d,L,W,te){switch(te){case 2:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0;Pe[He++]=bt>>>0&3,Pe[He++]=bt>>>2&3,Pe[He++]=bt>>>4&3,Pe[He++]=bt>>>6&3,Pe[He++]=bt>>>8&3,Pe[He++]=bt>>>10&3,Pe[He++]=bt>>>12&3,Pe[He++]=bt>>>14&3,Pe[He++]=bt>>>16&3,Pe[He++]=bt>>>18&3,Pe[He++]=bt>>>20&3,Pe[He++]=bt>>>22&3,Pe[He++]=bt>>>24&3,Pe[He++]=bt>>>26&3,Pe[He++]=bt>>>28&3,Pe[He++]=bt>>>30&3,Pe[He++]=Et>>>0&3,Pe[He++]=Et>>>2&3,Pe[He++]=Et>>>4&3,Pe[He++]=Et>>>6&3,Pe[He++]=Et>>>8&3,Pe[He++]=Et>>>10&3,Pe[He++]=Et>>>12&3,Pe[He++]=Et>>>14&3,Pe[He++]=Et>>>16&3,Pe[He++]=Et>>>18&3,Pe[He++]=Et>>>20&3,Pe[He++]=Et>>>22&3,Pe[He++]=Et>>>24&3,Pe[He++]=Et>>>26&3,Pe[He++]=Et>>>28&3,Pe[He]=Et>>>30&3}(R,d,L,W);case 3:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0;Pe[He++]=bt>>>0&7,Pe[He++]=bt>>>3&7,Pe[He++]=bt>>>6&7,Pe[He++]=bt>>>9&7,Pe[He++]=bt>>>12&7,Pe[He++]=bt>>>15&7,Pe[He++]=bt>>>18&7,Pe[He++]=bt>>>21&7,Pe[He++]=bt>>>24&7,Pe[He++]=bt>>>27&7,Pe[He++]=7&(bt>>>30|(1&Et)<<2),Pe[He++]=Et>>>1&7,Pe[He++]=Et>>>4&7,Pe[He++]=Et>>>7&7,Pe[He++]=Et>>>10&7,Pe[He++]=Et>>>13&7,Pe[He++]=Et>>>16&7,Pe[He++]=Et>>>19&7,Pe[He++]=Et>>>22&7,Pe[He++]=Et>>>25&7,Pe[He++]=Et>>>28&7,Pe[He++]=7&(Et>>>31|(3&Qt)<<1),Pe[He++]=Qt>>>2&7,Pe[He++]=Qt>>>5&7,Pe[He++]=Qt>>>8&7,Pe[He++]=Qt>>>11&7,Pe[He++]=Qt>>>14&7,Pe[He++]=Qt>>>17&7,Pe[He++]=Qt>>>20&7,Pe[He++]=Qt>>>23&7,Pe[He++]=Qt>>>26&7,Pe[He]=Qt>>>29&7}(R,d,L,W);case 4:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0;Pe[He++]=bt>>>0&15,Pe[He++]=bt>>>4&15,Pe[He++]=bt>>>8&15,Pe[He++]=bt>>>12&15,Pe[He++]=bt>>>16&15,Pe[He++]=bt>>>20&15,Pe[He++]=bt>>>24&15,Pe[He++]=bt>>>28&15,Pe[He++]=Et>>>0&15,Pe[He++]=Et>>>4&15,Pe[He++]=Et>>>8&15,Pe[He++]=Et>>>12&15,Pe[He++]=Et>>>16&15,Pe[He++]=Et>>>20&15,Pe[He++]=Et>>>24&15,Pe[He++]=Et>>>28&15,Pe[He++]=Qt>>>0&15,Pe[He++]=Qt>>>4&15,Pe[He++]=Qt>>>8&15,Pe[He++]=Qt>>>12&15,Pe[He++]=Qt>>>16&15,Pe[He++]=Qt>>>20&15,Pe[He++]=Qt>>>24&15,Pe[He++]=Qt>>>28&15,Pe[He++]=er>>>0&15,Pe[He++]=er>>>4&15,Pe[He++]=er>>>8&15,Pe[He++]=er>>>12&15,Pe[He++]=er>>>16&15,Pe[He++]=er>>>20&15,Pe[He++]=er>>>24&15,Pe[He]=er>>>28&15}(R,d,L,W);case 5:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0;Pe[He++]=bt>>>0&31,Pe[He++]=bt>>>5&31,Pe[He++]=bt>>>10&31,Pe[He++]=bt>>>15&31,Pe[He++]=bt>>>20&31,Pe[He++]=bt>>>25&31,Pe[He++]=31&(bt>>>30|(7&Et)<<2),Pe[He++]=Et>>>3&31,Pe[He++]=Et>>>8&31,Pe[He++]=Et>>>13&31,Pe[He++]=Et>>>18&31,Pe[He++]=Et>>>23&31,Pe[He++]=31&(Et>>>28|(1&Qt)<<4),Pe[He++]=Qt>>>1&31,Pe[He++]=Qt>>>6&31,Pe[He++]=Qt>>>11&31,Pe[He++]=Qt>>>16&31,Pe[He++]=Qt>>>21&31,Pe[He++]=Qt>>>26&31,Pe[He++]=31&(Qt>>>31|(15&er)<<1),Pe[He++]=er>>>4&31,Pe[He++]=er>>>9&31,Pe[He++]=er>>>14&31,Pe[He++]=er>>>19&31,Pe[He++]=er>>>24&31,Pe[He++]=31&(er>>>29|(3&br)<<3),Pe[He++]=br>>>2&31,Pe[He++]=br>>>7&31,Pe[He++]=br>>>12&31,Pe[He++]=br>>>17&31,Pe[He++]=br>>>22&31,Pe[He]=br>>>27&31}(R,d,L,W);case 6:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0;Pe[He++]=bt>>>0&63,Pe[He++]=bt>>>6&63,Pe[He++]=bt>>>12&63,Pe[He++]=bt>>>18&63,Pe[He++]=bt>>>24&63,Pe[He++]=63&(bt>>>30|(15&Et)<<2),Pe[He++]=Et>>>4&63,Pe[He++]=Et>>>10&63,Pe[He++]=Et>>>16&63,Pe[He++]=Et>>>22&63,Pe[He++]=63&(Et>>>28|(3&Qt)<<4),Pe[He++]=Qt>>>2&63,Pe[He++]=Qt>>>8&63,Pe[He++]=Qt>>>14&63,Pe[He++]=Qt>>>20&63,Pe[He++]=Qt>>>26&63,Pe[He++]=er>>>0&63,Pe[He++]=er>>>6&63,Pe[He++]=er>>>12&63,Pe[He++]=er>>>18&63,Pe[He++]=er>>>24&63,Pe[He++]=63&(er>>>30|(15&br)<<2),Pe[He++]=br>>>4&63,Pe[He++]=br>>>10&63,Pe[He++]=br>>>16&63,Pe[He++]=br>>>22&63,Pe[He++]=63&(br>>>28|(3&sr)<<4),Pe[He++]=sr>>>2&63,Pe[He++]=sr>>>8&63,Pe[He++]=sr>>>14&63,Pe[He++]=sr>>>20&63,Pe[He]=sr>>>26&63}(R,d,L,W);case 7:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0;Pe[He++]=bt>>>0&127,Pe[He++]=bt>>>7&127,Pe[He++]=bt>>>14&127,Pe[He++]=bt>>>21&127,Pe[He++]=127&(bt>>>28|(7&Et)<<4),Pe[He++]=Et>>>3&127,Pe[He++]=Et>>>10&127,Pe[He++]=Et>>>17&127,Pe[He++]=Et>>>24&127,Pe[He++]=127&(Et>>>31|(63&Qt)<<1),Pe[He++]=Qt>>>6&127,Pe[He++]=Qt>>>13&127,Pe[He++]=Qt>>>20&127,Pe[He++]=127&(Qt>>>27|(3&er)<<5),Pe[He++]=er>>>2&127,Pe[He++]=er>>>9&127,Pe[He++]=er>>>16&127,Pe[He++]=er>>>23&127,Pe[He++]=127&(er>>>30|(31&br)<<2),Pe[He++]=br>>>5&127,Pe[He++]=br>>>12&127,Pe[He++]=br>>>19&127,Pe[He++]=127&(br>>>26|(1&sr)<<6),Pe[He++]=sr>>>1&127,Pe[He++]=sr>>>8&127,Pe[He++]=sr>>>15&127,Pe[He++]=sr>>>22&127,Pe[He++]=127&(sr>>>29|(15&Mr)<<3),Pe[He++]=Mr>>>4&127,Pe[He++]=Mr>>>11&127,Pe[He++]=Mr>>>18&127,Pe[He]=Mr>>>25&127}(R,d,L,W);case 8:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0;Pe[He++]=bt>>>0&255,Pe[He++]=bt>>>8&255,Pe[He++]=bt>>>16&255,Pe[He++]=bt>>>24&255,Pe[He++]=Et>>>0&255,Pe[He++]=Et>>>8&255,Pe[He++]=Et>>>16&255,Pe[He++]=Et>>>24&255,Pe[He++]=Qt>>>0&255,Pe[He++]=Qt>>>8&255,Pe[He++]=Qt>>>16&255,Pe[He++]=Qt>>>24&255,Pe[He++]=er>>>0&255,Pe[He++]=er>>>8&255,Pe[He++]=er>>>16&255,Pe[He++]=er>>>24&255,Pe[He++]=br>>>0&255,Pe[He++]=br>>>8&255,Pe[He++]=br>>>16&255,Pe[He++]=br>>>24&255,Pe[He++]=sr>>>0&255,Pe[He++]=sr>>>8&255,Pe[He++]=sr>>>16&255,Pe[He++]=sr>>>24&255,Pe[He++]=Mr>>>0&255,Pe[He++]=Mr>>>8&255,Pe[He++]=Mr>>>16&255,Pe[He++]=Mr>>>24&255,Pe[He++]=qr>>>0&255,Pe[He++]=qr>>>8&255,Pe[He++]=qr>>>16&255,Pe[He]=qr>>>24&255}(R,d,L,W);case 9:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0;Pe[He++]=bt>>>0&511,Pe[He++]=bt>>>9&511,Pe[He++]=bt>>>18&511,Pe[He++]=511&(bt>>>27|(15&Et)<<5),Pe[He++]=Et>>>4&511,Pe[He++]=Et>>>13&511,Pe[He++]=Et>>>22&511,Pe[He++]=511&(Et>>>31|(255&Qt)<<1),Pe[He++]=Qt>>>8&511,Pe[He++]=Qt>>>17&511,Pe[He++]=511&(Qt>>>26|(7&er)<<6),Pe[He++]=er>>>3&511,Pe[He++]=er>>>12&511,Pe[He++]=er>>>21&511,Pe[He++]=511&(er>>>30|(127&br)<<2),Pe[He++]=br>>>7&511,Pe[He++]=br>>>16&511,Pe[He++]=511&(br>>>25|(3&sr)<<7),Pe[He++]=sr>>>2&511,Pe[He++]=sr>>>11&511,Pe[He++]=sr>>>20&511,Pe[He++]=511&(sr>>>29|(63&Mr)<<3),Pe[He++]=Mr>>>6&511,Pe[He++]=Mr>>>15&511,Pe[He++]=511&(Mr>>>24|(1&qr)<<8),Pe[He++]=qr>>>1&511,Pe[He++]=qr>>>10&511,Pe[He++]=qr>>>19&511,Pe[He++]=511&(qr>>>28|(31&$r)<<4),Pe[He++]=$r>>>5&511,Pe[He++]=$r>>>14&511,Pe[He]=$r>>>23&511}(R,d,L,W);case 10:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0;Pe[He++]=bt>>>0&1023,Pe[He++]=bt>>>10&1023,Pe[He++]=bt>>>20&1023,Pe[He++]=1023&(bt>>>30|(255&Et)<<2),Pe[He++]=Et>>>8&1023,Pe[He++]=Et>>>18&1023,Pe[He++]=1023&(Et>>>28|(63&Qt)<<4),Pe[He++]=Qt>>>6&1023,Pe[He++]=Qt>>>16&1023,Pe[He++]=1023&(Qt>>>26|(15&er)<<6),Pe[He++]=er>>>4&1023,Pe[He++]=er>>>14&1023,Pe[He++]=1023&(er>>>24|(3&br)<<8),Pe[He++]=br>>>2&1023,Pe[He++]=br>>>12&1023,Pe[He++]=br>>>22&1023,Pe[He++]=sr>>>0&1023,Pe[He++]=sr>>>10&1023,Pe[He++]=sr>>>20&1023,Pe[He++]=1023&(sr>>>30|(255&Mr)<<2),Pe[He++]=Mr>>>8&1023,Pe[He++]=Mr>>>18&1023,Pe[He++]=1023&(Mr>>>28|(63&qr)<<4),Pe[He++]=qr>>>6&1023,Pe[He++]=qr>>>16&1023,Pe[He++]=1023&(qr>>>26|(15&$r)<<6),Pe[He++]=$r>>>4&1023,Pe[He++]=$r>>>14&1023,Pe[He++]=1023&($r>>>24|(3&_a)<<8),Pe[He++]=_a>>>2&1023,Pe[He++]=_a>>>12&1023,Pe[He]=_a>>>22&1023}(R,d,L,W);case 11:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0;Pe[He++]=bt>>>0&2047,Pe[He++]=bt>>>11&2047,Pe[He++]=2047&(bt>>>22|(1&Et)<<10),Pe[He++]=Et>>>1&2047,Pe[He++]=Et>>>12&2047,Pe[He++]=2047&(Et>>>23|(3&Qt)<<9),Pe[He++]=Qt>>>2&2047,Pe[He++]=Qt>>>13&2047,Pe[He++]=2047&(Qt>>>24|(7&er)<<8),Pe[He++]=er>>>3&2047,Pe[He++]=er>>>14&2047,Pe[He++]=2047&(er>>>25|(15&br)<<7),Pe[He++]=br>>>4&2047,Pe[He++]=br>>>15&2047,Pe[He++]=2047&(br>>>26|(31&sr)<<6),Pe[He++]=sr>>>5&2047,Pe[He++]=sr>>>16&2047,Pe[He++]=2047&(sr>>>27|(63&Mr)<<5),Pe[He++]=Mr>>>6&2047,Pe[He++]=Mr>>>17&2047,Pe[He++]=2047&(Mr>>>28|(127&qr)<<4),Pe[He++]=qr>>>7&2047,Pe[He++]=qr>>>18&2047,Pe[He++]=2047&(qr>>>29|(255&$r)<<3),Pe[He++]=$r>>>8&2047,Pe[He++]=$r>>>19&2047,Pe[He++]=2047&($r>>>30|(511&_a)<<2),Pe[He++]=_a>>>9&2047,Pe[He++]=_a>>>20&2047,Pe[He++]=2047&(_a>>>31|(1023&Ca)<<1),Pe[He++]=Ca>>>10&2047,Pe[He]=Ca>>>21&2047}(R,d,L,W);case 12:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0;Pe[He++]=bt>>>0&4095,Pe[He++]=bt>>>12&4095,Pe[He++]=4095&(bt>>>24|(15&Et)<<8),Pe[He++]=Et>>>4&4095,Pe[He++]=Et>>>16&4095,Pe[He++]=4095&(Et>>>28|(255&Qt)<<4),Pe[He++]=Qt>>>8&4095,Pe[He++]=Qt>>>20&4095,Pe[He++]=er>>>0&4095,Pe[He++]=er>>>12&4095,Pe[He++]=4095&(er>>>24|(15&br)<<8),Pe[He++]=br>>>4&4095,Pe[He++]=br>>>16&4095,Pe[He++]=4095&(br>>>28|(255&sr)<<4),Pe[He++]=sr>>>8&4095,Pe[He++]=sr>>>20&4095,Pe[He++]=Mr>>>0&4095,Pe[He++]=Mr>>>12&4095,Pe[He++]=4095&(Mr>>>24|(15&qr)<<8),Pe[He++]=qr>>>4&4095,Pe[He++]=qr>>>16&4095,Pe[He++]=4095&(qr>>>28|(255&$r)<<4),Pe[He++]=$r>>>8&4095,Pe[He++]=$r>>>20&4095,Pe[He++]=_a>>>0&4095,Pe[He++]=_a>>>12&4095,Pe[He++]=4095&(_a>>>24|(15&Ca)<<8),Pe[He++]=Ca>>>4&4095,Pe[He++]=Ca>>>16&4095,Pe[He++]=4095&(Ca>>>28|(255&nn)<<4),Pe[He++]=nn>>>8&4095,Pe[He]=nn>>>20&4095}(R,d,L,W);case 16:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0,qa=Te[Oe+12]>>>0,bn=Te[Oe+13]>>>0,Fn=Te[Oe+14]>>>0,gn=Te[Oe+15]>>>0;Pe[He++]=bt>>>0&65535,Pe[He++]=bt>>>16&65535,Pe[He++]=Et>>>0&65535,Pe[He++]=Et>>>16&65535,Pe[He++]=Qt>>>0&65535,Pe[He++]=Qt>>>16&65535,Pe[He++]=er>>>0&65535,Pe[He++]=er>>>16&65535,Pe[He++]=br>>>0&65535,Pe[He++]=br>>>16&65535,Pe[He++]=sr>>>0&65535,Pe[He++]=sr>>>16&65535,Pe[He++]=Mr>>>0&65535,Pe[He++]=Mr>>>16&65535,Pe[He++]=qr>>>0&65535,Pe[He++]=qr>>>16&65535,Pe[He++]=$r>>>0&65535,Pe[He++]=$r>>>16&65535,Pe[He++]=_a>>>0&65535,Pe[He++]=_a>>>16&65535,Pe[He++]=Ca>>>0&65535,Pe[He++]=Ca>>>16&65535,Pe[He++]=nn>>>0&65535,Pe[He++]=nn>>>16&65535,Pe[He++]=qa>>>0&65535,Pe[He++]=qa>>>16&65535,Pe[He++]=bn>>>0&65535,Pe[He++]=bn>>>16&65535,Pe[He++]=Fn>>>0&65535,Pe[He++]=Fn>>>16&65535,Pe[He++]=gn>>>0&65535,Pe[He]=gn>>>16&65535}(R,d,L,W);case 32:for(let Te=0;Te<32;Te=Te+1|0)L[W+Te|0]=0|R[d+Te|0];return}let ue=B3[te]>>>0,me=d,ge=0,Ce=R[me]>>>0;for(let Te=0;Te<32;Te++)if(ge+te<=32)L[W+Te]=Ce>>>ge&ue,ge+=te,ge===32&&(ge=0,me++,Te!==31&&(Ce=R[me]>>>0));else{let Oe=32-ge,Pe=Ce>>>ge;me++,Ce=R[me]>>>0,L[W+Te]=(Pe|(Ce&B3[te-Oe]>>>0)<=64)throw new Error("Varint too long")}return d.set(te),L}function CY(R,d){let L,W;return W=R[d.get()],d.increment(),L=127&W,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<7,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<14,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<21,W<128?L:(W=R[d.get()],L|=(15&W)<<28,function(te,ue,me){let ge,Ce;if(Ce=ue[me.get()],me.increment(),ge=(112&Ce)>>4,Ce<128||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<3,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<10,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<17,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<24,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(1&Ce)<<31,Ce<128))return 4294967296*ge+(te>>>0);throw new Error("Expected varint not more than 10 bytes")}(L,R,d)))))}function Js(R){return R>>>1^-(1&R)}function fh(R){return R>>BigInt("1")^-(BigInt("1")&R)}function C0(R){return R%2==1?(R+1)/-2:R/2}function j3(R,d,L){if(L===void 0){L=0;for(let ue=0;ue=4)for(;W=4)for(;W=4)for(let W=R[0];L>4],ge=null;switch(me){case Tf.DATA:ge={dictionaryType:Object.values(fd)[15&ue]};break;case Tf.OFFSET:ge={offsetType:Object.values(kv)[15&ue]};break;case Tf.LENGTH:ge={lengthType:Object.values(Rh)[15&ue]}}te.increment();let Ce=W[te.get()],Te=Object.values(us)[Ce>>5],Oe=Object.values(us)[Ce>>2&7],Pe=Object.values(Tp)[3&Ce];te.increment();let it=Yf(W,te,2),He=it[0];return{physicalStreamType:me,logicalStreamType:ge,logicalLevelTechnique1:Te,logicalLevelTechnique2:Oe,physicalLevelTechnique:Pe,numValues:He,byteLength:it[1],decompressedCount:He}}(R,d);return L.logicalLevelTechnique1===us.MORTON?function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:W.decompressedCount,numBits:me[0],coordinateShift:me[1]}}(L,R,d):us.RLE!==L.logicalLevelTechnique1&&us.RLE!==L.logicalLevelTechnique2||Tp.NONE===L.physicalLevelTechnique?L:function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:me[1],runs:me[0],numRleValues:me[1]}}(L,R,d)}(function(R){R.PRESENT="PRESENT",R.DATA="DATA",R.OFFSET="OFFSET",R.LENGTH="LENGTH"})(Tf||(Tf={})),function(R){R.NONE="NONE",R.SINGLE="SINGLE",R.SHARED="SHARED",R.VERTEX="VERTEX",R.MORTON="MORTON",R.FSST="FSST"}(fd||(fd={})),function(R){R.VERTEX="VERTEX",R.INDEX="INDEX",R.STRING="STRING",R.KEY="KEY"}(kv||(kv={})),function(R){R.VAR_BINARY="VAR_BINARY",R.GEOMETRIES="GEOMETRIES",R.PARTS="PARTS",R.RINGS="RINGS",R.TRIANGLES="TRIANGLES",R.SYMBOL="SYMBOL",R.DICTIONARY="DICTIONARY"}(Rh||(Rh={})),function(R){R[R.FLAT=0]="FLAT",R[R.CONST=1]="CONST",R[R.SEQUENCE=2]="SEQUENCE",R[R.DICTIONARY=3]="DICTIONARY",R[R.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(Gl||(Gl={}));class hd{constructor(d,L){this.values=d,this._size=L}get(d){let L=Math.floor(d/8);return(this.values[L]>>d%8&1)==1}set(d,L){let W=Math.floor(d/8);this.values[W]=this.values[W]|(L?1:0)<>d%8&1}size(){return this._size}getBuffer(){return this.values}}function L0(R,d,L){if(!d)return R;let W=d.size(),te=new R.constructor(W),ue=0;for(let me=0;me=4)for(;He>>0;for(let it=1;it>>0;return Pe}(me.logicalLevelTechnique2===us.RLE?j3(ue,me.runs,me.numRleValues):ue);break;case us.RLE:Te=j3(ue,me.runs,me.numRleValues);break;case us.MORTON:q3(ue),Te=ue;break;case us.COMPONENTWISE_DELTA:Te=function(Oe){if(Oe.length<2)return new Uint32Array(Oe);let Pe=new Uint32Array(Oe.length);Pe[0]=Js(Oe[0])>>>0,Pe[1]=Js(Oe[1])>>>0;for(let it=2;it>>0,Pe[it+1]=Pe[it-1]+Js(Oe[it+1])>>>0;return Pe}(ue);break;case us.NONE:Te=ue;break;default:throw new Error(`The specified Logical level technique is not supported: ${me.logicalLevelTechnique1}`)}return Ce?L0(Te,Ce,0):Te}(P0(R,d,L),L,0,te)}function Mp(R,d,L){return function(W,te){if(te.logicalLevelTechnique1===us.DELTA&&te.logicalLevelTechnique2===us.NONE)return function(ue){let me=new Int32Array(ue.length+1);me[0]=0,me[1]=Js(ue[0]);let ge=me[1];for(let Ce=2;Ce!==me.length;++Ce)ge+=Js(ue[Ce-1]),me[Ce]=me[Ce-1]+ge;return new Uint32Array(me)}(W);if(te.logicalLevelTechnique1===us.RLE&&te.logicalLevelTechnique2===us.NONE)return function(ue,me,ge){let Ce=new Uint32Array(ge+1);Ce[0]=0;let Te=1,Oe=Ce[0];for(let Pe=0;Pe>>2,Et=function(er,br){if(br<=er.encodedWords.length)return er.encodedWords;let sr=new Uint32Array(Math.max(16,2*br));return er.encodedWords=sr,sr}(it,bt);(function(er,br,sr,Mr){if(br<0||sr<0||br+sr>er.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${br}, byteLength=${sr}, bytes.length=${er.length})`);let qr=Math.floor(sr/4),$r=sr%4!=0,_a=$r?qr+1:qr;if(Mr.length<_a)throw new RangeError(`decodeBigEndianInt32sInto: out.length=${Mr.length} < ${_a}`);if(qr>0){let Ca=er.byteOffset+br;if(3&Ca)for(let nn=0;nn0){let Ca=0|er[Mr];if(Mr=Mr+1|0,255&Ca)throw new Error(`FastPFOR decode: invalid alignedLength=${Ca} (expected multiple of 256)`);if(qr+Ca>$r.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${qr}, alignedLength=${Ca}, out.length=${$r.length})`);Mr=function(nn,qa,bn,Fn,gn,Va){let Hn=Fn+O3(gn,Xd),ni=Fn,Wn=bn;for(;ni!==Hn;){let si=Math.min(N3,Hn-ni);Wn=SY(nn,qa,Wn,ni,si,Va),ni=ni+si|0}return Wn}(er,$r,Mr,qr,Ca,_a),qr=qr+Ca|0}return function(Ca,nn,qa,bn,Fn,gn){if(gn===0)return nn;let Va=0,Hn=nn,ni=nn+qa,Wn=Fn,si=Fn,po=Fn+gn,cs=0,Ds=0;for(;Hn>>Va&255;if(Va+=8,Hn+=Va>>>5,Va&=31,cs|=(127&Xs)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${Ds}, partial=${cs}, decoded=${si-Wn}/${gn}, inPos=${Hn}, inEnd=${ni})`)}if(si!==po)throw new Error(`FastPFOR VByte: truncated stream (decoded=${si-Wn}, expected=${gn}, consumedWords=${Hn-nn}/${qa}, vbyteStart=${nn}, vbyteEnd=${ni})`)}(er,Mr,er.length-Mr|0,$r,qr,br-qr|0),$r}(Et.subarray(0,bt),Te,it.decoderWorkspace);return Pe.add(Oe),Qt}(te,ue,me,ge,function(Ce=16){if(Ce<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${Ce}`);let Te=Math.max(16,0|Ce);return{encodedWords:new Uint32Array(Te),decoderWorkspace:bS()}}(me>>>2))}(R,L.numValues,L.byteLength,d);case Tp.VARINT:return Yf(R,d,L.numValues);case Tp.NONE:{let te=d.get();d.add(L.byteLength);let ue=R.subarray(te,d.get());return new Uint32Array(ue)}default:throw new Error(`Specified physicalLevelTechnique ${W} is not supported (yet).`)}}function G3(R,d,L){let W=P0(R,d,L);return W.length===1?W[0]:function(te){return te[1]}(W)}function SS(R,d,L){return function(W){if(W.length===2){let te=Js(W[1]);return[te,te]}return[Js(W[2]),Js(W[3])]}(P0(R,d,L))}function ES(R,d,L){return function(W){if(W.length===2){let te=fh(W[1]);return[te,te]}return[fh(W[2]),fh(W[3])]}(k0(R,d,L.numValues))}function kS(R,d,L,W){return function(te,ue,me){let ge;switch(ue.logicalLevelTechnique1){case us.DELTA:ge=function(Ce){let Te=new BigUint64Array(Ce.length);Te[0]=BigInt.asUintN(64,fh(Ce[0]));for(let Oe=1;Oe>1,d)-L}}function RS(R,d){let L=0;for(let W=0;W>W;return L}function R0(R,d,L,W,te,ue,me){return R===Ap.MORTON?function(ge,Ce,Te,Oe,Pe,it){let He=new Array(Pe?Oe+1:Oe);for(let bt=0;bt[qr]),W+=sr,te+=sr}break;case Ic.LINESTRING:{let sr,Mr;Qt?(sr=He[te]-He[te-1],te++):sr=it[W]-it[W-1],W++,Et?(Mr=I0(er,ge,sr,!1),ge+=2*sr):(Mr=R0(d.vertexBufferType,er,bt,Ce,sr,!1,Te),Ce+=sr),L[me++]=[Mr],Pe&&ue++}break;case Ic.POLYGON:{let sr=it[W]-it[W-1];W++;let Mr=new Array(sr-1),qr,$r=He[te]-He[te-1];if(te++,Et){qr=I0(er,ge,$r,!0),ge+=2*$r;for(let _a=0;_a0&&Et.push(Et[0]),it.push(Et)}d[Oe]=it,ue&&Te++}break;case Ic.MULTIPOLYGON:{let Pe=ue[Te]-ue[Te-1];Te++;let it=[];for(let He=0;He0&&er.push(er[0]),it.push(er)}}d[Oe]=it}}return d}[Symbol.iterator](){return null}}function BS(R,d,L,W,te,ue){return new LY(R,d,L,W,te,ue)}class LY extends zS{constructor(d,L,W,te,ue,me){super(W,te,ue,me),this._numGeometries=d,this._geometryType=L}geometryType(d){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function OS(R,d,L,W,te){return new PY(R,d,L,W,te)}class PY extends zS{constructor(d,L,W,te,ue){super(L,W,te,ue),this._geometryTypes=d}geometryType(d){return this._geometryTypes[d]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function RY(R,d,L,W,te){let ue=hh(R,L),me,ge,Ce,Te;if(My(ue,W,R,L)===Gl.CONST){let br=G3(R,L,ue),sr,Mr,qr,$r;for(let _a=0;_aL?d[ue++]:1);return W}function NS(R,d,L,W){let te=new Uint32Array(d[d.length-1]+1),ue=0;te[0]=ue;let me=1,ge=0;for(let Ce=0;Ce=it);){let He=me[Te.increment()];if(He<=127){let bt=He+3,Et=me[Te.increment()],Qt=Math.min(Pe+bt,ge);Oe.fill(Et,Pe,Qt),Pe=Qt}else{let bt=256-He;for(let Et=0;Et=12?FY.decode(R.subarray(d,L)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(R,d,L)}class X3 extends E0{constructor(d,L,W,te){super(d,W,te),this.offsetBuffer=L}}class US extends X3{constructor(d,L,W,te){super(d,L,W,te??L.length-1)}getValueFromBuffer(d){return Y3(this.dataBuffer,this.offsetBuffer[d],this.offsetBuffer[d+1])}}class D0 extends X3{constructor(d,L,W,te,ue){super(d,W,te,ue??L.length),this.indexBuffer=L,this.indexBuffer=L}getValueFromBuffer(d){let L=this.indexBuffer[d];return Y3(this.dataBuffer,this.offsetBuffer[L],this.offsetBuffer[L+1])}}class qS extends X3{constructor(d,L,W,te,ue,me,ge){super(d,W,te,ge),this.indexBuffer=L,this.symbolOffsetBuffer=ue,this.symbolTableBuffer=me}getValueFromBuffer(d){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(W,te,ue){let me=[],ge=new Array(te.length).fill(0);for(let Ce=1;Ce=10}function HS(R){return R===30}function BY(R){if(R.type==="scalarType"){let d=R.scalarType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(d.type==="logicalType")return!1}else if(R.type==="complexType"){let d=R.complexType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",R),!1}function OY(R){var d;return R.type==="complexType"&&((d=R.complexType)==null?void 0:d.type)==="physicalType"&&R.complexType.physicalType===0}let NY=new TextDecoder;function Z3(R,d){let L=Yf(R,d,1)[0];if(L===0)return"";let W=d.get(),te=R.subarray(W,W+L);return d.add(L),NY.decode(te)}function WS(R,d){let L=Yf(R,d,1)[0]>>>0;if(L<10||L>30)throw new Error(`Unsupported field type code ${L}. Supported: 10-29(scalars), 30(STRUCT)`);let W=VS(L);if(GS(L)&&(W.name=Z3(R,d)),HS(L)){let te=Yf(R,d,1)[0]>>>0;W.complexType.children=new Array(te);for(let ue=0;ue>>0,W=VS(L);if(!W)throw new Error(`Unsupported column type code ${L}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(GS(L)?W.name=Z3(R,d):L>=0&&L<=3?W.name="id":L===4&&(W.name="geometry"),HS(L)){let te=Yf(R,d,1)[0]>>>0,ue=W.complexType;ue.children=new Array(te);for(let me=0;me>>0,ue=Yf(R,d,1)[0]>>>0;W.columns=new Array(ue);for(let me=0;me=4)for(;qr>>0,Pe=ge.get()+Oe;if(Pe>W.length)throw new Error(`Block overruns tile: ${Pe} > ${W.length}`);if(Yf(W,ge,1)[0]>>>0!=1){ge.set(Pe);continue}let[it,He]=UY(W,ge),bt=it.featureTables[0],Et=null,Qt=null,er=[],br=0;for(let Mr of bt.columns){let qr=Mr.name;if((Te=Mr).type==="scalarType"&&((me=Te.scalarType)==null?void 0:me.type)==="logicalType"&&Te.scalarType.logicalType===0){let $r=null;if(Mr.nullable){let Ca=hh(W,ge),nn=ge.get(),qa=Dg(W,Ca.numValues,Ca.byteLength,ge);ge.set(nn+Ca.byteLength),$r=new hd(qa,Ca.numValues)}let _a=hh(W,ge);br=$r?$r.size():_a.decompressedCount,Et=qY(W,Mr,ge,qr,_a,$r??br,ue)}else if(OY(Mr)){let $r=Yf(W,ge,1)[0];if(br===0){let _a=ge.get();br=hh(W,ge).decompressedCount,ge.set(_a)}Qt=RY(W,$r,ge,br)}else{let $r=BY(Mr)?Yf(W,ge,1)[0]:1;if($r===0)continue;let _a=zY(W,ge,Mr,$r,br);if(_a)if(Array.isArray(_a))for(let Ca of _a)er.push(Ca);else er.push(_a)}}let sr=new xY(bt.name,Qt,Et,er,He);Ce.push(sr),ge.set(Pe)}var Te;return Ce}(new Uint8Array(d));this.layers=L.reduce((W,te)=>Object.assign(Object.assign({},W),{[te.name]:new GY(te)}),{})}}class HY{constructor(d,L){this.feature=d,this.type=d.type,this.properties=d.tags?d.tags:{},this.extent=L,"id"in d&&(typeof d.id=="string"?this.id=parseInt(d.id,10):typeof d.id!="number"||isNaN(d.id)||(this.id=d.id))}loadGeometry(){let d=[],L=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let W of L){let te=[];for(let ue of W)te.push(new t(ue[0],ue[1]));d.push(te)}return d}}let zg="_geojsonTileLayer";function WY(R,d,L=""){d.writeVarintField(15,R.version||1),d.writeStringField(1,R.name||""),d.writeVarintField(5,R.extent||4096);let W={jsonPrefix:L,keys:[],values:[],keycache:{},valuecache:{}};for(let me=0;me>31}function ZY(R,d){let L=R.loadGeometry(),W=R.type,te=0,ue=0;for(let me of L){let ge=1;W===1&&(ge=me.length),d.writeVarint($3(1,ge));let Ce=W===3?me.length-1:me.length;for(let Te=0;Te=0&&Oe[3]>=0&&Ce.insert(ge,Oe[0],Oe[1],Oe[2],Oe[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new w4(new _y(this.rawTileData)).layers:new YS(this.rawTileData).layers,this.sourceLayerCoder=new gS(this.vtLayers?Object.keys(this.vtLayers).sort():[zg])),this.vtLayers}query(d,L,W,te){this.loadVTLayers();let ue=d.params,me=F/d.tileSize/d.scale,ge=Na(ue.filter,ue.globalState),Ce=d.queryGeometry,Te=d.queryPadding*me,Oe=Ev.fromPoints(Ce),Pe=this.grid.query(Oe.minX-Te,Oe.minY-Te,Oe.maxX+Te,Oe.maxY+Te),it=Ev.fromPoints(d.cameraQueryGeometry).expandBy(Te),He=this.grid3D.query(it.minX,it.minY,it.maxX,it.maxY,(Qt,er,br,sr)=>function(Mr,qr,$r,_a,Ca){for(let qa of Mr)if(qr<=qa.x&&$r<=qa.y&&_a>=qa.x&&Ca>=qa.y)return!0;let nn=[new t(qr,$r),new t(qr,Ca),new t(_a,Ca),new t(_a,$r)];if(Mr.length>2){for(let qa of nn)if(Wa(Mr,qa))return!0}for(let qa=0;qa(br||(br=ql(sr)),Mr.queryIntersectsFeature({queryGeometry:Ce,feature:sr,featureState:qr,geometry:br,zoom:this.z,transform:d.transform,pixelsToTileUnits:me,pixelPosMatrix:d.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:d.getElevation})))}return bt}loadMatchingFeature(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=this.bucketLayerIDs[L];if(me&&!it.some(Qt=>me.has(Qt)))return;let He=this.sourceLayerCoder.decode(W),bt=this.vtLayers[He].feature(te);if(ue.needGeometry){let Qt=fo(bt,!0);if(!ue.filter(new oi(this.tileID.overscaledZ),Qt,this.tileID.canonical))return}else if(!ue.filter(new oi(this.tileID.overscaledZ),bt))return;let Et=this.getId(bt,He);for(let Qt of it){if(me&&!me.has(Qt))continue;let er=Ce[Qt];if(!er)continue;let br={};Et&&Oe&&(br=Oe.getState(er.sourceLayer||zg,Et));let sr=X({},Te[Qt]);sr.paint=$S(sr.paint,er.paint,bt,br,ge),sr.layout=$S(sr.layout,er.layout,bt,br,ge);let Mr=!Pe||Pe(bt,er,br);if(!Mr)continue;let qr=new yS(bt,this.z,this.x,this.y,Et);qr.layer=sr;let $r=d[Qt];$r===void 0&&($r=d[Qt]=[]),$r.push({featureIndex:te,feature:qr,intersectionZ:Mr})}}lookupSymbolFeatures(d,L,W,te,ue,me,ge,Ce){let Te={};this.loadVTLayers();let Oe=Na(ue.filterSpec,ue.globalState);for(let Pe of d)this.loadMatchingFeature(Te,W,te,Pe,Oe,me,ge,Ce,L);return Te}hasLayer(d){for(let L of this.bucketLayerIDs)for(let W of L)if(d===W)return!0;return!1}getId(d,L){var W;let te=d.id;return this.promoteId&&(te=d.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[L]],typeof te=="boolean"&&(te=Number(te)),te===void 0&&(!((W=d.properties)===null||W===void 0)&&W.cluster)&&this.promoteId&&(te=Number(d.properties.cluster_id))),te}}function $S(R,d,L,W,te){return H(R,(ue,me)=>{let ge=d instanceof Cu?d.get(me):null;return ge?.evaluate?ge.evaluate(L,W,te):ge})}function KY(R,d){return d-R}function KS(R,d,L,W,te){let ue=[];for(let me of R){let ge;for(let Ce=0;Ce=W&&Oe.x>=W||(Te.x>=W?Te=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round():Oe.x>=W&&(Oe=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round()),Te.y>=te&&Oe.y>=te||(Te.y>=te?Te=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round():Oe.y>=te&&(Oe=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round()),ge&&Te.equals(ge[ge.length-1])||(ge=[Te],ue.push(ge)),ge.push(Oe)))))}}return ue}function JS(R,d,L,W,te){switch(d){case 1:return function(ue,me,ge,Ce){let Te=[];for(let Oe of ue)for(let Pe of Oe){let it=Ce===0?Pe.x:Pe.y;it>=me&&it<=ge&&Te.push([Pe])}return Te}(R,L,W,te);case 2:return QS(R,L,W,te,!1);case 3:return QS(R,L,W,te,!0)}return[]}function JY(R,d,L,W,te){let ue=W===0?QY:eX,me=[],ge=[];for(let Oe=0;Oed&&me.push(ue(Pe,it,d)):He>L?bt=d&&(me.push(ue(Pe,it,d)),Et=!0),bt>L&&He<=L&&(me.push(ue(Pe,it,L)),Et=!0),!te&&Et&&(ge.push(me),me=[])}let Ce=R.length-1,Te=W===0?R[Ce].x:R[Ce].y;return Te>=d&&Te<=L&&me.push(R[Ce]),te&&me.length>0&&!me[0].equals(me[me.length-1])&&me.push(new t(me[0].x,me[0].y)),me.length>0&&ge.push(me),ge}function QS(R,d,L,W,te){let ue=[];for(let me of R){let ge=JY(me,d,L,W,te);ge.length>0&&ue.push(...ge)}return ue}function QY(R,d,L){return new t(L,R.y+(L-R.x)/(d.x-R.x)*(d.y-R.y))}function eX(R,d,L){return new t(R.x+(L-R.y)/(d.y-R.y)*(d.x-R.x),L)}fi("FeatureIndex",ZS,{omit:["rawTileData","sourceLayerCoder"]});class Sp extends t{constructor(d,L,W,te){super(d,L),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new Sp(this.x,this.y,this.angle,this.segment)}}function eE(R,d,L,W,te){if(d.segment===void 0||L===0)return!0;let ue=d,me=d.segment+1,ge=0;for(;ge>-L/2;){if(me--,me<0)return!1;ge-=R[me].dist(ue),ue=R[me]}ge+=R[me].dist(R[me+1]),me++;let Ce=[],Te=0;for(;geW;)Te-=Ce.shift().angleDelta;if(Te>te)return!1;me++,ge+=Oe.dist(Pe)}return!0}function tE(R){let d=0;for(let L=0;LTe){let bt=(Te-Ce)/He,Et=bs.number(Pe.x,it.x,bt),Qt=bs.number(Pe.y,it.y,bt),er=new Sp(Et,Qt,it.angleTo(Pe),Oe);return er._round(),!me||eE(R,er,ge,me,d)?er:void 0}Ce+=He}}function rX(R,d,L,W,te,ue,me,ge,Ce){let Te=rE(W,ue,me),Oe=aE(W,te),Pe=Oe*me,it=R[0].x===0||R[0].x===Ce||R[0].y===0||R[0].y===Ce;return d-Pe=0&&Mr=0&&qr=0&&it+Te<=Oe){let $r=new Sp(Mr,qr,br,bt);$r._round(),W&&!eE(R,$r,ue,W,te)||He.push($r)}}Pe+=er}return ge||He.length||me||(He=nE(R,Pe/2,L,W,te,ue,me,!0,Ce)),He}function iE(R,d,L,W){let te=[],ue=R.image,me=ue.pixelRatio,ge=ue.paddedRect.w-2,Ce=ue.paddedRect.h-2,Te={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Oe=ue.stretchX||[[0,ge]],Pe=ue.stretchY||[[0,Ce]],it=(Va,Hn)=>Va+Hn[1]-Hn[0],He=Oe.reduce(it,0),bt=Pe.reduce(it,0),Et=ge-He,Qt=Ce-bt,er=0,br=He,sr=0,Mr=bt,qr=0,$r=Et,_a=0,Ca=Qt;if(ue.content&&W){let Va=ue.content,Hn=Va[2]-Va[0],ni=Va[3]-Va[1];(ue.textFitWidth||ue.textFitHeight)&&(Te=tS(R)),er=Sy(Oe,0,Va[0]),sr=Sy(Pe,0,Va[1]),br=Sy(Oe,Va[0],Va[2]),Mr=Sy(Pe,Va[1],Va[3]),qr=Va[0]-er,_a=Va[1]-sr,$r=Hn-br,Ca=ni-Mr}let nn=Te.x1,qa=Te.y1,bn=Te.x2-nn,Fn=Te.y2-qa,gn=(Va,Hn,ni,Wn)=>{let si=Ey(Va.stretch-er,br,bn,nn),po=ky(Va.fixed-qr,$r,Va.stretch,He),cs=Ey(Hn.stretch-sr,Mr,Fn,qa),Ds=ky(Hn.fixed-_a,Ca,Hn.stretch,bt),Xs=Ey(ni.stretch-er,br,bn,nn),Mf=ky(ni.fixed-qr,$r,ni.stretch,He),vu=Ey(Wn.stretch-sr,Mr,Fn,qa),yc=ky(Wn.fixed-_a,Ca,Wn.stretch,bt),Dc=new t(si,cs),Hl=new t(Xs,cs),rf=new t(Xs,vu),Xf=new t(si,vu),Zf=new t(po/me,Ds/me),Th=new t(Mf/me,yc/me),Sf=d*Math.PI/180;if(Sf){let Fc=Math.sin(Sf),nu=Math.cos(Sf),lc=[nu,-Fc,Fc,nu];Dc._matMult(lc),Hl._matMult(lc),Xf._matMult(lc),rf._matMult(lc)}let Ah=Va.stretch+Va.fixed,Hh=Hn.stretch+Hn.fixed;return{tl:Dc,tr:Hl,bl:Xf,br:rf,tex:{x:ue.paddedRect.x+1+Ah,y:ue.paddedRect.y+1+Hh,w:ni.stretch+ni.fixed-Ah,h:Wn.stretch+Wn.fixed-Hh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Zf,pixelOffsetBR:Th,minFontScaleX:$r/me/bn,minFontScaleY:Ca/me/Fn,isSDF:L}};if(W&&(ue.stretchX||ue.stretchY)){let Va=oE(Oe,Et,He),Hn=oE(Pe,Qt,bt);for(let ni=0;ni0&&(Et=Math.max(10,Et),this.circleDiameter=Et)}else{let it=!((Pe=me.image)===null||Pe===void 0)&&Pe.content&&(me.image.textFitWidth||me.image.textFitHeight)?tS(me):{x1:me.left,y1:me.top,x2:me.right,y2:me.bottom};it.y1=it.y1*ge-Ce[0],it.y2=it.y2*ge+Ce[2],it.x1=it.x1*ge-Ce[3],it.x2=it.x2*ge+Ce[1];let He=me.collisionPadding;if(He&&(it.x1-=He[0]*ge,it.y1-=He[1]*ge,it.x2+=He[2]*ge,it.y2+=He[3]*ge),Oe){let bt=new t(it.x1,it.y1),Et=new t(it.x2,it.y1),Qt=new t(it.x1,it.y2),er=new t(it.x2,it.y2),br=Oe*Math.PI/180;bt._rotate(br),Et._rotate(br),Qt._rotate(br),er._rotate(br),it.x1=Math.min(bt.x,Et.x,Qt.x,er.x),it.x2=Math.max(bt.x,Et.x,Qt.x,er.x),it.y1=Math.min(bt.y,Et.y,Qt.y,er.y),it.y2=Math.max(bt.y,Et.y,Qt.y,er.y)}d.emplaceBack(L.x,L.y,it.x1,it.y1,it.x2,it.y2,W,te,ue)}this.boxEndIndex=d.length}}class aX{constructor(d=[],L=(W,te)=>Wte?1:0){if(this.data=d,this.length=this.data.length,this.compare=L,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(d){this.data.push(d),this._up(this.length++)}pop(){if(this.length===0)return;let d=this.data[0],L=this.data.pop();return--this.length>0&&(this.data[0]=L,this._down(0)),d}peek(){return this.data[0]}_up(d){let{data:L,compare:W}=this,te=L[d];for(;d>0;){let ue=d-1>>1,me=L[ue];if(W(te,me)>=0)break;L[d]=me,d=ue}L[d]=te}_down(d){let{data:L,compare:W}=this,te=this.length>>1,ue=L[d];for(;d=0)break;L[d]=L[me],d=me}L[d]=ue}}function nX(R,d=1){let L=Ev.fromPoints(R[0]),W=Math.min(L.width(),L.height()),te=W/2,ue=new aX([],iX),{minX:me,minY:ge,maxX:Ce,maxY:Te}=L;if(W===0)return new t(me,ge);for(let it=me;itPe.d||!Pe.d)&&(Pe=it),it.max-Pe.d<=d||(te=it.h/2,ue.push(new F0(it.p.x-te,it.p.y-te,te,R)),ue.push(new F0(it.p.x+te,it.p.y-te,te,R)),ue.push(new F0(it.p.x-te,it.p.y+te,te,R)),ue.push(new F0(it.p.x+te,it.p.y+te,te,R)))}return Oe.d>0&&Pe.d-Oe.d<=d?Oe.p:Pe.p}function iX(R,d){return d.max-R.max}class F0{constructor(d,L,W,te){this.p=new t(d,L),this.h=W,this.d=function(ue,me){let ge=!1,Ce=1/0;for(let Te of me)for(let Oe=0,Pe=Te.length,it=Pe-1;Oeue.y!=bt.y>ue.y&&ue.x<(bt.x-He.x)*(ue.y-He.y)/(bt.y-He.y)+He.x&&(ge=!ge),Ce=Math.min(Ce,na(ue,He,bt))}return(ge?1:-1)*Math.sqrt(Ce)}(this.p,te),this.max=this.d+this.h*Math.SQRT2}}var Af;l.aM=void 0,(Af=l.aM||(l.aM={}))[Af.center=1]="center",Af[Af.left=2]="left",Af[Af.right=3]="right",Af[Af.top=4]="top",Af[Af.bottom=5]="bottom",Af[Af["top-left"]=6]="top-left",Af[Af["top-right"]=7]="top-right",Af[Af["bottom-left"]=8]="bottom-left",Af[Af["bottom-right"]=9]="bottom-right";let K3=Number.POSITIVE_INFINITY;function sE(R,d){return d[1]!==K3?function(L,W,te){let ue=0,me=0;switch(W=Math.abs(W),te=Math.abs(te),L){case"top-right":case"top-left":case"top":me=te-7;break;case"bottom-right":case"bottom-left":case"bottom":me=7-te}switch(L){case"top-right":case"bottom-right":case"right":ue=-W;break;case"top-left":case"bottom-left":case"left":ue=W}return[ue,me]}(R,d[0],d[1]):function(L,W){let te=0,ue=0;W<0&&(W=0);let me=W/Math.SQRT2;switch(L){case"top-right":case"top-left":ue=me-7;break;case"bottom-right":case"bottom-left":ue=7-me;break;case"bottom":ue=7-W;break;case"top":ue=W-7}switch(L){case"top-right":case"bottom-right":te=-me;break;case"top-left":case"bottom-left":te=me;break;case"left":te=W;break;case"right":te=-W}return[te,ue]}(R,d[0])}function lE(R,d,L){var W;let te=R.layout,ue=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(d,{},L);if(ue){let ge=ue.values,Ce=[];for(let Te=0;Teit*Rc);Oe.startsWith("top")?Pe[1]-=7:Oe.startsWith("bottom")&&(Pe[1]+=7),Ce[Te+1]=Pe}return new gi(Ce)}let me=te.get("text-variable-anchor");if(me){let ge;ge=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(d,{},L)*Rc,K3]:te.get("text-offset").evaluate(d,{},L).map(Te=>Te*Rc);let Ce=[];for(let Te of me)Ce.push(Te,sE(Te,ge));return new gi(Ce)}return null}function J3(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function oX(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=ue.textMaxSize.evaluate(d,{});it===void 0&&(it=me);let He=R.layers[0].layout,bt=He.get("icon-offset").evaluate(d,{},Oe),Et=cE(L.horizontal),Qt=me/24,er=R.tilePixelRatio*Qt,br=R.tilePixelRatio*it/24,sr=R.tilePixelRatio*ge,Mr=R.tilePixelRatio*He.get("symbol-spacing"),qr=He.get("text-padding")*R.tilePixelRatio,$r=function(ni,Wn,si,po=1){let cs=ni.get("icon-padding").evaluate(Wn,{},si),Ds=cs?.values;return[Ds[0]*po,Ds[1]*po,Ds[2]*po,Ds[3]*po]}(He,d,Oe,R.tilePixelRatio),_a=He.get("text-max-angle")/180*Math.PI,Ca=He.get("text-rotation-alignment")!=="viewport"&&He.get("symbol-placement")!=="point",nn=He.get("icon-rotation-alignment")==="map"&&He.get("symbol-placement")!=="point",qa=He.get("symbol-placement"),bn=Mr/2,Fn=He.get("icon-text-fit"),gn;W&&Fn!=="none"&&(R.allowVerticalPlacement&&L.vertical&&(gn=rS(W,L.vertical,Fn,He.get("icon-text-fit-padding"),bt,Qt)),Et&&(W=rS(W,Et,Fn,He.get("icon-text-fit-padding"),bt,Qt)));let Va=Oe?Pe.line.getGranularityForZoomLevel(Oe.z):1,Hn=(ni,Wn)=>{Wn.x<0||Wn.x>=F||Wn.y<0||Wn.y>=F||function(si,po,cs,Ds,Xs,Mf,vu,yc,Dc,Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc,nu,lc,mu,zc,Zd,dd,Bg){let Ep=si.addToLineVertexArray(po,cs),Cv,z0,B0,O0,fE=0,hE=0,dE=0,pE=0,Q3=-1,ew=-1,$d={},vE=Jn("");if(si.allowVerticalPlacement&&Ds.vertical){let $f=yc.layout.get("text-rotate").evaluate(mu,{},dd)+90;B0=new Cy(Dc,po,Hl,rf,Xf,Ds.vertical,Zf,Th,Sf,$f),vu&&(O0=new Cy(Dc,po,Hl,rf,Xf,vu,Hh,Fc,Sf,$f))}if(Xs){let $f=yc.layout.get("icon-rotate").evaluate(mu,{}),Nh=yc.layout.get("icon-text-fit")!=="none",Lv=iE(Xs,$f,Zd,Nh),vd=vu?iE(vu,$f,Zd,Nh):void 0;z0=new Cy(Dc,po,Hl,rf,Xf,Xs,Hh,Fc,!1,$f),fE=4*Lv.length;let Pv=si.iconSizeData,Sd=null;Pv.kind==="source"?(Sd=[Yd*yc.layout.get("icon-size").evaluate(mu,{})],Sd[0]>bp&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):Pv.kind==="composite"&&(Sd=[Yd*zc.compositeIconSizes[0].evaluate(mu,{},dd),Yd*zc.compositeIconSizes[1].evaluate(mu,{},dd)],(Sd[0]>bp||Sd[1]>bp)&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),si.addSymbols(si.icon,Lv,Sd,lc,nu,mu,l.ax.none,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),Q3=si.icon.placedSymbolArray.length-1,vd&&(hE=4*vd.length,si.addSymbols(si.icon,vd,Sd,lc,nu,mu,l.ax.vertical,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),ew=si.icon.placedSymbolArray.length-1)}let mE=Object.keys(Ds.horizontal);for(let $f of mE){let Nh=Ds.horizontal[$f];if(!Cv){vE=Jn(Nh.text);let vd=yc.layout.get("text-rotate").evaluate(mu,{},dd);Cv=new Cy(Dc,po,Hl,rf,Xf,Nh,Zf,Th,Sf,vd)}let Lv=Nh.positionedLines.length===1;if(dE+=uE(si,po,Nh,Mf,yc,Sf,mu,Ah,Ep,Ds.vertical?l.ax.horizontal:l.ax.horizontalOnly,Lv?mE:[$f],$d,Q3,zc,dd),Lv)break}Ds.vertical&&(pE+=uE(si,po,Ds.vertical,Mf,yc,Sf,mu,Ah,Ep,l.ax.vertical,["vertical"],$d,ew,zc,dd));let lX=Cv?Cv.boxStartIndex:si.collisionBoxArray.length,uX=Cv?Cv.boxEndIndex:si.collisionBoxArray.length,cX=B0?B0.boxStartIndex:si.collisionBoxArray.length,fX=B0?B0.boxEndIndex:si.collisionBoxArray.length,hX=z0?z0.boxStartIndex:si.collisionBoxArray.length,dX=z0?z0.boxEndIndex:si.collisionBoxArray.length,pX=O0?O0.boxStartIndex:si.collisionBoxArray.length,vX=O0?O0.boxEndIndex:si.collisionBoxArray.length,pd=-1,Ly=($f,Nh)=>$f?.circleDiameter?Math.max($f.circleDiameter,Nh):Nh;pd=Ly(Cv,pd),pd=Ly(B0,pd),pd=Ly(z0,pd),pd=Ly(O0,pd);let gE=pd>-1?1:0;gE&&(pd*=Bg/Rc),si.glyphOffsetArray.length>=M0.MAX_GLYPHS&&ee("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),mu.sortKey!==void 0&&si.addToSortKeyRanges(si.symbolInstances.length,mu.sortKey);let mX=lE(yc,mu,dd),[gX,yX]=function($f,Nh){let Lv=$f.length,vd=Nh?.values;if(vd?.length>0)for(let Pv=0;Pv=0?$d.right:-1,$d.center>=0?$d.center:-1,$d.left>=0?$d.left:-1,$d.vertical||-1,Q3,ew,vE,lX,uX,cX,fX,hX,dX,pX,vX,Hl,dE,pE,fE,hE,gE,0,Zf,pd,gX,yX)}(R,Wn,ni,L,W,te,gn,R.layers[0],R.collisionBoxArray,d.index,d.sourceLayerIndex,R.index,er,[qr,qr,qr,qr],Ca,Ce,sr,$r,nn,bt,d,ue,Te,Oe,me)};if(qa==="line")for(let ni of KS(d.geometry,0,0,F,F)){let Wn=Sv(ni,Va),si=rX(Wn,Mr,_a,L.vertical||Et,W,24,br,R.overscaling,F);for(let po of si)Et&&sX(R,Et.text,bn,po)||Hn(Wn,po)}else if(qa==="line-center"){for(let ni of d.geometry)if(ni.length>1){let Wn=Sv(ni,Va),si=tX(Wn,_a,L.vertical||Et,W,24,br);si&&Hn(Wn,si)}}else if(d.type==="Polygon")for(let ni of Yc(d.geometry,0)){let Wn=nX(ni,16);Hn(Sv(ni[0],Va,!0),new Sp(Wn.x,Wn.y,0))}else if(d.type==="LineString")for(let ni of d.geometry){let Wn=Sv(ni,Va);Hn(Wn,new Sp(Wn[0].x,Wn[0].y,0))}else if(d.type==="Point")for(let ni of d.geometry)for(let Wn of ni)Hn([Wn],new Sp(Wn.x,Wn.y,0))}function uE(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt){let Et=function(br,sr,Mr,qr,$r,_a,Ca,nn){let qa=qr.layout.get("text-rotate").evaluate(_a,{})*Math.PI/180,bn=[];for(let Fn of sr.positionedLines)for(let gn of Fn.positionedGlyphs){if(!gn.rect)continue;let Va=gn.rect||{},Hn=4,ni=!0,Wn=1,si=0,po=($r||nn)&&gn.vertical,cs=gn.metrics.advance*gn.scale/2;if(nn&&sr.verticalizable&&(si=Fn.lineOffset/2-(gn.imageName?-(Rc-gn.metrics.width*gn.scale)/2:(gn.scale-1)*Rc)),gn.imageName){let Fc=Ca[gn.imageName];ni=Fc.sdf,Wn=Fc.pixelRatio,Hn=1/Wn}let Ds=$r?[gn.x+cs,gn.y]:[0,0],Xs=$r?[0,0]:[gn.x+cs+Mr[0],gn.y+Mr[1]-si],Mf=[0,0];po&&(Mf=Xs,Xs=[0,0]);let vu=gn.metrics.isDoubleResolution?2:1,yc=(gn.metrics.left-Hn)*gn.scale-cs+Xs[0],Dc=(-gn.metrics.top-Hn)*gn.scale+Xs[1],Hl=yc+Va.w/vu*gn.scale/Wn,rf=Dc+Va.h/vu*gn.scale/Wn,Xf=new t(yc,Dc),Zf=new t(Hl,Dc),Th=new t(yc,rf),Sf=new t(Hl,rf);if(po){let Fc=new t(-cs,cs- -17),nu=-Math.PI/2,lc=12-cs,mu=new t(22-lc,-(gn.imageName?lc:0)),zc=new t(...Mf);Xf._rotateAround(nu,Fc)._add(mu)._add(zc),Zf._rotateAround(nu,Fc)._add(mu)._add(zc),Th._rotateAround(nu,Fc)._add(mu)._add(zc),Sf._rotateAround(nu,Fc)._add(mu)._add(zc)}if(qa){let Fc=Math.sin(qa),nu=Math.cos(qa),lc=[nu,-Fc,Fc,nu];Xf._matMult(lc),Zf._matMult(lc),Th._matMult(lc),Sf._matMult(lc)}let Ah=new t(0,0),Hh=new t(0,0);bn.push({tl:Xf,tr:Zf,bl:Th,br:Sf,tex:Va,writingMode:sr.writingMode,glyphOffset:Ds,sectionIndex:gn.sectionIndex,isSDF:ni,pixelOffsetTL:Ah,pixelOffsetBR:Hh,minFontScaleX:0,minFontScaleY:0})}return bn}(0,L,ge,te,ue,me,W,R.allowVerticalPlacement),Qt=R.textSizeData,er=null;Qt.kind==="source"?(er=[Yd*te.layout.get("text-size").evaluate(me,{})],er[0]>bp&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Qt.kind==="composite"&&(er=[Yd*He.compositeTextSizes[0].evaluate(me,{},bt),Yd*He.compositeTextSizes[1].evaluate(me,{},bt)],(er[0]>bp||er[1]>bp)&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),R.addSymbols(R.text,Et,er,ge,ue,me,Te,d,Ce.lineStartIndex,Ce.lineLength,it,bt);for(let br of Oe)Pe[br]=R.text.placedSymbolArray.length-1;return 4*Et.length}function cE(R){for(let d in R)return R[d];return null}function sX(R,d,L,W){let te=R.compareText;if(d in te){let ue=te[d];for(let me=ue.length-1;me>=0;me--)if(W.dist(ue[me])this.process()),this.subscription=Ge(this.target,"message",L=>this.receive(L),!1),this.globalScope=he(self)?R:window}registerMessageHandler(R,d){this.messageHandlers[R]=d}unregisterMessageHandler(R){delete this.messageHandlers[R]}sendAsync(R,d){return new Promise((L,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10),ue=d?Ge(d.signal,"abort",()=>{ue?.unsubscribe(),delete this.resolveRejects[te];let Ce={id:te,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ce)},_Y):null;this.resolveRejects[te]={resolve:Ce=>{ue?.unsubscribe(),L(Ce)},reject:Ce=>{ue?.unsubscribe(),W(Ce)}};let me=[],ge=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:mt(R.data,me)});this.target.postMessage(ge,{transfer:me})})}receive(R){let d=R.data,L=d.id,W=["file://","resource://android","null"],te=[d.origin,location.origin],ue=d.origin===location.origin,me=te.some(ge=>W.includes(ge));if((ue||me)&&(!d.targetMapId||this.mapId===d.targetMapId)){if(d.type===""){delete this.tasks[L];let ge=this.abortControllers[L];return delete this.abortControllers[L],void(ge&&ge.abort())}if(he(self)||d.mustQueue)return this.tasks[L]=d,this.taskQueue.push(L),void this.invoker.trigger();this.processTask(L,d)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),d=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),d&&this.processTask(R,d)}processTask(R,d){return e(this,void 0,void 0,function*(){if(d.type===""){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(d.error?te.reject(j(xt(d.error))):te.resolve(xt(d.data))):void 0}if(!this.messageHandlers[d.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${d.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let L=xt(d.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[d.type](d.sourceMapId,L,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,j(te))}})}completeTask(R,d,L){let W=[];delete this.abortControllers[R];let te={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:d?mt(d):null,data:mt(L,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.O=function(){var R=new i(16);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},l.P=t,l.Q=function(R,d,L){var W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et=L[0],Qt=L[1],er=L[2];return d===R?(R[12]=d[0]*Et+d[4]*Qt+d[8]*er+d[12],R[13]=d[1]*Et+d[5]*Qt+d[9]*er+d[13],R[14]=d[2]*Et+d[6]*Qt+d[10]*er+d[14],R[15]=d[3]*Et+d[7]*Qt+d[11]*er+d[15]):(te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],R[0]=W=d[0],R[1]=te,R[2]=ue,R[3]=me,R[4]=ge,R[5]=Ce,R[6]=Te,R[7]=Oe,R[8]=Pe,R[9]=it,R[10]=He,R[11]=bt,R[12]=W*Et+ge*Qt+Pe*er+d[12],R[13]=te*Et+Ce*Qt+it*er+d[13],R[14]=ue*Et+Te*Qt+He*er+d[14],R[15]=me*Et+Oe*Qt+bt*er+d[15]),R},l.R=ls,l.S=function(R,d,L){var W=L[0],te=L[1],ue=L[2];return R[0]=d[0]*W,R[1]=d[1]*W,R[2]=d[2]*W,R[3]=d[3]*W,R[4]=d[4]*te,R[5]=d[5]*te,R[6]=d[6]*te,R[7]=d[7]*te,R[8]=d[8]*ue,R[9]=d[9]*ue,R[10]=d[10]*ue,R[11]=d[11]*ue,R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.T=vp,l.U=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],Et=d[12],Qt=d[13],er=d[14],br=d[15],sr=L[0],Mr=L[1],qr=L[2],$r=L[3];return R[0]=sr*W+Mr*ge+qr*Pe+$r*Et,R[1]=sr*te+Mr*Ce+qr*it+$r*Qt,R[2]=sr*ue+Mr*Te+qr*He+$r*er,R[3]=sr*me+Mr*Oe+qr*bt+$r*br,R[4]=(sr=L[4])*W+(Mr=L[5])*ge+(qr=L[6])*Pe+($r=L[7])*Et,R[5]=sr*te+Mr*Ce+qr*it+$r*Qt,R[6]=sr*ue+Mr*Te+qr*He+$r*er,R[7]=sr*me+Mr*Oe+qr*bt+$r*br,R[8]=(sr=L[8])*W+(Mr=L[9])*ge+(qr=L[10])*Pe+($r=L[11])*Et,R[9]=sr*te+Mr*Ce+qr*it+$r*Qt,R[10]=sr*ue+Mr*Te+qr*He+$r*er,R[11]=sr*me+Mr*Oe+qr*bt+$r*br,R[12]=(sr=L[12])*W+(Mr=L[13])*ge+(qr=L[14])*Pe+($r=L[15])*Et,R[13]=sr*te+Mr*Ce+qr*it+$r*Qt,R[14]=sr*ue+Mr*Te+qr*He+$r*er,R[15]=sr*me+Mr*Oe+qr*bt+$r*br,R},l.V=function(R,d){let L={};for(let W of d)W in R&&(L[W]=R[W]);return L},l.W=wp,l.X=G,l.Y=fS,l.Z=cS,l._=e,l.a=Ae,l.a$=function(R){var d=new i(3);return d[0]=R[0],d[1]=R[1],d[2]=R[2],d},l.a0=h,l.a1=v,l.a2=Se,l.a3=Ph,l.a4=dS,l.a5=Ty,l.a6=F,l.a7=Ig,l.a8=Ev,l.a9=25,l.aA=function(R){var d=R[0],L=R[1];return Math.sqrt(d*d+L*L)},l.aB=function(R){return R[0]=0,R[1]=0,R},l.aC=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R},l.aD=S3,l.aE=z,l.aF=function(R,d,L,W){let te=d.y-R.y,ue=d.x-R.x,me=W.y-L.y,ge=W.x-L.x,Ce=me*ue-ge*te;if(Ce===0)return null;let Te=(ge*(R.y-L.y)-me*(R.x-L.x))/Ce;return new t(R.x+Te*ue,R.y+Te*te)},l.aG=KS,l.aH=Ya,l.aI=function(R){let d=1/0,L=1/0,W=-1/0,te=-1/0;for(let ue of R)d=Math.min(d,ue.x),L=Math.min(L,ue.y),W=Math.max(W,ue.x),te=Math.max(te,ue.y);return[d,L,W,te]},l.aJ=Rc,l.aK=P,l.aL=function(R,d,L,W,te=!1){if(!L[0]&&!L[1])return[0,0];let ue=te?W==="map"?-R.bearingInRadians:0:W==="viewport"?R.bearingInRadians:0;if(ue){let me=Math.sin(ue),ge=Math.cos(ue);L=[L[0]*ge-L[1]*me,L[0]*me+L[1]*ge]}return[te?L[0]:P(d,L[0],R.zoom),te?L[1]:P(d,L[1],R.zoom)]},l.aN=M3,l.aO=J3,l.aP=A3,l.aQ=R=>R.type==="symbol",l.aR=dy,l.aS=ct,l.aT=hy,l.aU=It,l.aV=Fa,l.aW=ua,l.aX=_e,l.aY=pS,l.aZ=f,l.a_=T,l.aa=P3,l.ab=R=>{let d=window.document.createElement("video");return d.muted=!0,new Promise(L=>{d.onloadstart=()=>{L(d)};for(let W of R){let te=window.document.createElement("source");rr(W)||(d.crossOrigin="Anonymous"),te.src=W,d.appendChild(te)}})},l.ac=Vt,l.ad=function(){return K++},l.ae=fe,l.af=M0,l.ag=zg,l.ah=Na,l.ai=fo,l.aj=yS,l.ak=function(R){let d={};if(R.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(L,W,te,ue)=>{let me=te||ue;return d[W]=!me||me.toLowerCase(),""}),d["max-age"]){let L=parseInt(d["max-age"],10);isNaN(L)?delete d["max-age"]:d["max-age"]=L}return d},l.al=se,l.am=85.051129,l.an=ke,l.ao=function(R){return Math.pow(2,R)},l.ap=S,l.aq=hS,l.ar=function(R){return Math.log(R)/Math.LN2},l.as=function(R){var d=R[0],L=R[1];return d*d+L*L},l.at=function(R){if(!R.length)return new Set;let d=Math.max(...R.map(Ce=>Ce.canonical.z)),L=1/0,W=-1/0,te=1/0,ue=-1/0,me=[];for(let Ce of R){let{x:Te,y:Oe,z:Pe}=Ce.canonical,it=Math.pow(2,d-Pe),He=Te*it,bt=Oe*it;me.push({id:Ce,x:He,y:bt}),HeW&&(W=He),btue&&(ue=bt)}let ge=new Set;for(let Ce of me)Ce.x!==L&&Ce.x!==W&&Ce.y!==te&&Ce.y!==ue||ge.add(Ce.id);return ge},l.au=function(R,d){let L=Math.abs(2*R.wrap)-+(R.wrap<0),W=Math.abs(2*d.wrap)-+(d.wrap<0);return R.overscaledZ-d.overscaledZ||W-L||d.canonical.y-R.canonical.y||d.canonical.x-R.canonical.x},l.av=class{constructor(R,d){this.max=R,this.onRemove=d,this.reset()}reset(){for(let R in this.data)for(let d of this.data[R])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(R,d,L){let W=R.wrapped().key;this.data[W]===void 0&&(this.data[W]=[]);let te={value:d,timeout:void 0};if(L!==void 0&&(te.timeout=setTimeout(()=>{this.remove(R,te)},L)),this.data[W].push(te),this.order.push(W),this.order.length>this.max){let ue=this._getAndRemoveByKey(this.order[0]);ue&&this.onRemove(ue)}return this}has(R){return R.wrapped().key in this.data}getAndRemove(R){return this.has(R)?this._getAndRemoveByKey(R.wrapped().key):null}_getAndRemoveByKey(R){let d=this.data[R].shift();return d.timeout&&clearTimeout(d.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),d.value}getByKey(R){let d=this.data[R];return d?d[0].value:null}get(R){return this.has(R)?this.data[R.wrapped().key][0].value:null}remove(R,d){if(!this.has(R))return this;let L=R.wrapped().key,W=d===void 0?0:this.data[L].indexOf(d),te=this.data[L][W];return this.data[L].splice(W,1),te.timeout&&clearTimeout(te.timeout),this.data[L].length===0&&delete this.data[L],this.onRemove(te.value),this.order.splice(this.order.indexOf(L),1),this}setMaxSize(R){for(this.max=R;this.order.length>this.max;){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(R){let d=[];for(let L in this.data)for(let W of this.data[L])R(W.value)||d.push(W);for(let L of d)this.remove(L.value.tileID,L)}},l.aw=function(R,d){let L=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:ue,maxZoom:me}=R,ge=te?se(Pi.interpolationFactor(te,d,ue,me),0,1):0;R.kind==="camera"?W=bs.number(R.minSize,R.maxSize,ge):L=ge}return{uSizeT:L,uSize:W}},l.ay=function(R,{uSize:d,uSizeT:L},{lowerSize:W,upperSize:te}){return R.kind==="source"?W/Yd:R.kind==="composite"?bs.number(W/Yd,te/Yd,L):d},l.az=D,l.b=we,l.b$=zs,l.b0=function(R,d,L){return R[0]=d[0]-L[0],R[1]=d[1]-L[1],R[2]=d[2]-L[2],R},l.b1=function(R,d){var L=d[0],W=d[1],te=d[2],ue=L*L+W*W+te*te;return ue>0&&(ue=1/Math.sqrt(ue)),R[0]=d[0]*ue,R[1]=d[1]*ue,R[2]=d[2]*ue,R},l.b2=u,l.b3=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]},l.b4=function(R,d,L){return R[0]=d[0]*L[0],R[1]=d[1]*L[1],R[2]=d[2]*L[2],R[3]=d[3]*L[3],R},l.b5=C,l.b6=function(R,d,L){let W=d[0]*L[0]+d[1]*L[1]+d[2]*L[2];return W===0?null:(-(R[0]*L[0]+R[1]*L[1]+R[2]*L[2])-L[3])/W},l.b7=x,l.b8=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R[3]=d[3]*L,R},l.b9=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]+R[3]},l.bA=O,l.bB=function(R,d,L){var W=L[0],te=L[1],ue=L[2],me=L[3],ge=d[0],Ce=d[1],Te=d[2],Oe=te*Te-ue*Ce,Pe=ue*ge-W*Te,it=W*Ce-te*ge;return R[0]=ge+me*(Oe+=Oe)+te*(it+=it)-ue*(Pe+=Pe),R[1]=Ce+me*Pe+ue*Oe-W*it,R[2]=Te+me*it+W*Pe-te*Oe,R},l.bC=function(R,d,L){let W=(te=[R[0],R[1],R[2],d[0],d[1],d[2],L[0],L[1],L[2]])[0]*((Oe=te[8])*(me=te[4])-(ge=te[5])*(Te=te[7]))+te[1]*(-Oe*(ue=te[3])+ge*(Ce=te[6]))+te[2]*(Te*ue-me*Ce);var te,ue,me,ge,Ce,Te,Oe;if(W===0)return null;let Pe=u([],[d[0],d[1],d[2]],[L[0],L[1],L[2]]),it=u([],[L[0],L[1],L[2]],[R[0],R[1],R[2]]),He=u([],[R[0],R[1],R[2]],[d[0],d[1],d[2]]),bt=f([],Pe,-R[3]);return T(bt,bt,f([],it,-d[3])),T(bt,bt,f([],He,-L[3])),f(bt,bt,1/W),bt},l.bD=L3,l.bE=function(){return new Float64Array(4)},l.bF=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0]*Math.cos(W)-te[1]*Math.sin(W),ue[1]=te[0]*Math.sin(W)+te[1]*Math.cos(W),ue[2]=te[2],R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bG=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0],ue[1]=te[1]*Math.cos(W)-te[2]*Math.sin(W),ue[2]=te[1]*Math.sin(W)+te[2]*Math.cos(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bH=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[2]*Math.sin(W)+te[0]*Math.cos(W),ue[1]=te[1],ue[2]=te[2]*Math.cos(W)-te[0]*Math.sin(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bI=function(R,d,L){var W=Math.sin(L),te=Math.cos(L),ue=d[0],me=d[1],ge=d[2],Ce=d[3],Te=d[8],Oe=d[9],Pe=d[10],it=d[11];return d!==R&&(R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15]),R[0]=ue*te-Te*W,R[1]=me*te-Oe*W,R[2]=ge*te-Pe*W,R[3]=Ce*te-it*W,R[8]=ue*W+Te*te,R[9]=me*W+Oe*te,R[10]=ge*W+Pe*te,R[11]=Ce*W+it*te,R},l.bJ=function(R,d){let L=U(R,360),W=U(d,360),te=W-L,ue=W>L?te-360:te+360;return Math.abs(te)0?me:-me},l.bM=function(R,d){let L=U(R,2*Math.PI),W=U(d,2*Math.PI);return Math.min(Math.abs(L-W),Math.abs(L-W+2*Math.PI),Math.abs(L-W-2*Math.PI))},l.bN=function(){let R={},d=ht.$version;for(let L in ht.$root){let W=ht.$root[L];if(W.required){let te=null;te=L==="version"?d:W.type==="array"?[]:{},te!=null&&(R[L]=te)}}return R},l.bO=At,l.bP=Bt,l.bQ=function R(d,L){if(Array.isArray(d)){if(!Array.isArray(L)||d.length!==L.length)return!1;for(let W=0;WR.type==="raster",l.bV=q,l.bW=function(R,d){if(!R)return[{command:"setStyle",args:[d]}];let L=[];try{if(!We(R.version,d.version))return[{command:"setStyle",args:[d]}];We(R.center,d.center)||L.push({command:"setCenter",args:[d.center]}),We(R.state,d.state)||L.push({command:"setGlobalState",args:[d.state]}),We(R.centerAltitude,d.centerAltitude)||L.push({command:"setCenterAltitude",args:[d.centerAltitude]}),We(R.zoom,d.zoom)||L.push({command:"setZoom",args:[d.zoom]}),We(R.bearing,d.bearing)||L.push({command:"setBearing",args:[d.bearing]}),We(R.pitch,d.pitch)||L.push({command:"setPitch",args:[d.pitch]}),We(R.roll,d.roll)||L.push({command:"setRoll",args:[d.roll]}),We(R.sprite,d.sprite)||L.push({command:"setSprite",args:[d.sprite]}),We(R.glyphs,d.glyphs)||L.push({command:"setGlyphs",args:[d.glyphs]}),We(R.transition,d.transition)||L.push({command:"setTransition",args:[d.transition]}),We(R.light,d.light)||L.push({command:"setLight",args:[d.light]}),We(R.terrain,d.terrain)||L.push({command:"setTerrain",args:[d.terrain]}),We(R.sky,d.sky)||L.push({command:"setSky",args:[d.sky]}),We(R.projection,d.projection)||L.push({command:"setProjection",args:[d.projection]});let W={},te=[];(function(me,ge,Ce,Te){let Oe;for(Oe in ge=ge||{},me=me||{})Object.prototype.hasOwnProperty.call(me,Oe)&&(Object.prototype.hasOwnProperty.call(ge,Oe)||et(Oe,Ce,Te));for(Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&(Object.prototype.hasOwnProperty.call(me,Oe)?We(me[Oe],ge[Oe])||(me[Oe].type==="geojson"&&ge[Oe].type==="geojson"&&pt(me,ge,Oe)?Ke(Ce,{command:"setGeoJSONSourceData",args:[Oe,ge[Oe].data]}):Mt(Oe,ge,Ce,Te)):Je(Oe,ge,Ce))})(R.sources,d.sources,te,W);let ue=[];R.layers&&R.layers.forEach(me=>{"source"in me&&W[me.source]?L.push({command:"removeLayer",args:[me.id]}):ue.push(me)}),L=L.concat(te),function(me,ge,Ce){ge=ge||[];let Te=(me=me||[]).map(Ct),Oe=ge.map(Ct),Pe=me.reduce(qt,{}),it=ge.reduce(qt,{}),He=Te.slice(),bt=Object.create(null),Et,Qt,er,br,sr;for(let Mr=0,qr=0;Mrg?(te=Math.acos(ue),me=Math.sin(te),ge=Math.sin((1-W)*te)/me,Ce=Math.sin(W*te)/me):(ge=1-W,Ce=W),R[0]=ge*Te+Ce*He,R[1]=ge*Oe+Ce*bt,R[2]=ge*Pe+Ce*Et,R[3]=ge*it+Ce*Qt,R},l.bm=function(R){let d=new Float64Array(9);var L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr;Pe=(te=(W=R)[0])*(Ce=te+te),it=(ue=W[1])*Ce,bt=(me=W[2])*Ce,Et=me*(Te=ue+ue),er=(ge=W[3])*Ce,br=ge*Te,sr=ge*(Oe=me+me),(L=d)[0]=1-(He=ue*Te)-(Qt=me*Oe),L[3]=it-sr,L[6]=bt+br,L[1]=it+sr,L[4]=1-Pe-Qt,L[7]=Et-er,L[2]=bt-br,L[5]=Et+er,L[8]=1-Pe-He;let Mr=_e(-Math.asin(se(d[2],-1,1))),qr,$r;return Math.hypot(d[5],d[8])<.001?(qr=0,$r=-_e(Math.atan2(d[3],d[4]))):(qr=_e(d[5]===0&&d[8]===0?0:Math.atan2(d[5],d[8])),$r=_e(d[1]===0&&d[0]===0?0:Math.atan2(d[1],d[0]))),{roll:qr,pitch:Mr+90,bearing:$r}},l.bn=function(R,d){return R.roll==d.roll&&R.pitch==d.pitch&&R.bearing==d.bearing},l.bo=rn,l.bp=ro,l.bq=_0,l.br=Mg,l.bs=y0,l.bt=$,l.bu=Q,l.bv=io,l.bw=function(R,d,L,W,te){return $(W,te,se((R-d)/(L-d),0,1))},l.bx=function(R,d,L,W){return R[0]=d[0]+L[0]*W,R[1]=d[1]+L[1]*W,R[2]=d[2]+L[2]*W,R},l.by=U,l.bz=function(){return new Float64Array(3)},l.c=Ye,l.c$=Cc,l.c0=class extends Wi{constructor(R,d){super(R,d),this.current=Bs}set(R){if(R[12]!==this.current[12]||R[0]!==this.current[0])return this.current=R,void this.gl.uniformMatrix4fv(this.location,!1,R);for(let d=1;d<16;d++)if(R[d]!==this.current[d]){this.current=R,this.gl.uniformMatrix4fv(this.location,!1,R);break}}},l.c1=Mo,l.c2=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]&&R[2]===this.current[2]||(this.current=R,this.gl.uniform3f(this.location,R[0],R[1],R[2]))}},l.c3=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]||(this.current=R,this.gl.uniform2f(this.location,R[0],R[1]))}},l.c4=w,l.c5=function(R,d){var L=Math.sin(d),W=Math.cos(d);return R[0]=W,R[1]=L,R[2]=0,R[3]=-L,R[4]=W,R[5]=0,R[6]=0,R[7]=0,R[8]=1,R},l.c6=function(R,d,L){var W=d[0],te=d[1],ue=d[2];return R[0]=W*L[0]+te*L[3]+ue*L[6],R[1]=W*L[1]+te*L[4]+ue*L[7],R[2]=W*L[2]+te*L[5]+ue*L[8],R},l.c7=function(R,d,L,W,te,ue,me){var ge=1/(d-L),Ce=1/(W-te),Te=1/(ue-me);return R[0]=-2*ge,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Ce,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*Te,R[11]=0,R[12]=(d+L)*ge,R[13]=(te+W)*Ce,R[14]=(me+ue)*Te,R[15]=1,R},l.c8=class extends Wi{constructor(R,d){super(R,d),this.current=new Array}set(R){if(R!=this.current){this.current=R;let d=new Float32Array(4*R.length);for(let L=0;L25||W<0||W>=1||L<0||L>=1)},l.cE=function(R,d){return R[0]=d[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=d[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=d[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},l.cF=class extends Jt{},l.cG=Tt,l.cH=function(R,d){Ye.REGISTERED_PROTOCOLS[R]=d},l.cI=function(R){delete Ye.REGISTERED_PROTOCOLS[R]},l.cJ=function(R,d){let L={};for(let te=0;teHn*Rc)}let bn=Ce?"center":te.get("text-justify").evaluate(Pe,{},R.canonical),Fn=te.get("symbol-placement")==="point"?te.get("text-max-width").evaluate(Pe,{},R.canonical)*Rc:1/0,gn=()=>{R.bucket.allowVerticalPlacement&&Br($r)&&(Qt.vertical=xy(er,R.glyphMap,R.glyphPositions,R.imagePositions,it,Fn,ge,nn,"left",Ca,sr,l.ax.vertical,!0,bt,He))};if(!Ce&&qa){let Va=new Set;if(bn==="auto")for(let ni=0;niWY(ge,Ce,ue),W.layers[me])}(R,L,d),L.finish()},l.cT=function(R,d,L,W,te,ue){let me=JS(R,d,L,te,0);return me=JS(me,d,W,ue,1),me},l.cU=class{constructor(R){this.maxEntries=R,this.map=new Map}get(R){let d=this.map.get(R);return d!==void 0&&(this.map.delete(R),this.map.set(R,d)),d}set(R,d){if(this.map.has(R))this.map.delete(R);else if(this.map.size>=this.maxEntries){let L=this.map.keys().next().value;this.map.delete(L)}this.map.set(R,d)}clear(){this.map.clear()}},l.cV=w4,l.cW=_y,l.cX=YS,l.cY=function(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(v())try{return yield Se(R,d,L,W,te)}catch{}return function(ue,me,ge,Ce,Te){let Oe=ue.width,Pe=ue.height;Ie&&Ve||(Ie=new OffscreenCanvas(Oe,Pe),Ve=Ie.getContext("2d",{willReadFrequently:!0})),Ie.width=Oe,Ie.height=Pe,Ve.drawImage(ue,0,0,Oe,Pe);let it=Ve.getImageData(me,ge,Ce,Te);return Ve.clearRect(0,0,Oe,Pe),it.data}(R,d,L,W,te)})},l.cZ=mp,l.c_=class{constructor(R,d){this.layers={[zg]:this},this.name=zg,this.version=d?d.version:1,this.extent=d?d.extent:4096,this.length=R.length,this.features=R}feature(R){return new HY(this.features[R],this.extent)}},l.ca=class extends sa{},l.cb=VW,l.cc=class extends An{},l.cd=Lu,l.ce=function(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))},l.cf=au,l.cg=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[3]*W+L[7]*te+L[11]*ue+L[15];return R[0]=(L[0]*W+L[4]*te+L[8]*ue+L[12])/(me=me||1),R[1]=(L[1]*W+L[5]*te+L[9]*ue+L[13])/me,R[2]=(L[2]*W+L[6]*te+L[10]*ue+L[14])/me,R},l.ch=class extends mr{},l.ci=class extends y{},l.cj=function(R,d){return R[0]===d[0]&&R[1]===d[1]&&R[2]===d[2]&&R[3]===d[3]&&R[4]===d[4]&&R[5]===d[5]&&R[6]===d[6]&&R[7]===d[7]&&R[8]===d[8]&&R[9]===d[9]&&R[10]===d[10]&&R[11]===d[11]&&R[12]===d[12]&&R[13]===d[13]&&R[14]===d[14]&&R[15]===d[15]},l.ck=function(R,d){var L=R[0],W=R[1],te=R[2],ue=R[3],me=R[4],ge=R[5],Ce=R[6],Te=R[7],Oe=R[8],Pe=R[9],it=R[10],He=R[11],bt=R[12],Et=R[13],Qt=R[14],er=R[15],br=d[0],sr=d[1],Mr=d[2],qr=d[3],$r=d[4],_a=d[5],Ca=d[6],nn=d[7],qa=d[8],bn=d[9],Fn=d[10],gn=d[11],Va=d[12],Hn=d[13],ni=d[14],Wn=d[15];return Math.abs(L-br)<=g*Math.max(1,Math.abs(L),Math.abs(br))&&Math.abs(W-sr)<=g*Math.max(1,Math.abs(W),Math.abs(sr))&&Math.abs(te-Mr)<=g*Math.max(1,Math.abs(te),Math.abs(Mr))&&Math.abs(ue-qr)<=g*Math.max(1,Math.abs(ue),Math.abs(qr))&&Math.abs(me-$r)<=g*Math.max(1,Math.abs(me),Math.abs($r))&&Math.abs(ge-_a)<=g*Math.max(1,Math.abs(ge),Math.abs(_a))&&Math.abs(Ce-Ca)<=g*Math.max(1,Math.abs(Ce),Math.abs(Ca))&&Math.abs(Te-nn)<=g*Math.max(1,Math.abs(Te),Math.abs(nn))&&Math.abs(Oe-qa)<=g*Math.max(1,Math.abs(Oe),Math.abs(qa))&&Math.abs(Pe-bn)<=g*Math.max(1,Math.abs(Pe),Math.abs(bn))&&Math.abs(it-Fn)<=g*Math.max(1,Math.abs(it),Math.abs(Fn))&&Math.abs(He-gn)<=g*Math.max(1,Math.abs(He),Math.abs(gn))&&Math.abs(bt-Va)<=g*Math.max(1,Math.abs(bt),Math.abs(Va))&&Math.abs(Et-Hn)<=g*Math.max(1,Math.abs(Et),Math.abs(Hn))&&Math.abs(Qt-ni)<=g*Math.max(1,Math.abs(Qt),Math.abs(ni))&&Math.abs(er-Wn)<=g*Math.max(1,Math.abs(er),Math.abs(Wn))},l.cl=function(R,d){return R[0]=d[0],R[1]=d[1],R[2]=d[2],R[3]=d[3],R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[8]=d[8],R[9]=d[9],R[10]=d[10],R[11]=d[11],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.cm=R=>R.type==="circle",l.cn=R=>R.type==="heatmap",l.co=R=>R.type==="line",l.cp=R=>R.type==="fill",l.cq=R=>R.type==="fill-extrusion",l.cr=R=>R.type==="hillshade",l.cs=R=>R.type==="color-relief",l.ct=R=>R.type==="background",l.cu=R=>R.type==="custom",l.cv=re,l.cw=function(R,d,L){if(d<=0)return R;let W=1/d;return L===void 0||Math.abs(L)<1e-10?Math.round(R*W)/W:(L>0?Math.ceil(R*W-1e-9):Math.floor(R*W+1e-10))/W},l.cx=function(R,d,L){let W=B(d.x-L.x,d.y-L.y),te=B(R.x-L.x,R.y-L.y);var ue,me;return _e(Math.atan2(W[0]*te[1]-W[1]*te[0],(ue=W)[0]*(me=te)[0]+ue[1]*me[1]))},l.cy=ne,l.cz=function(R,d){var L;if(!ve[d])return!1;let W=R?.target,te=((L=W?.ownerDocument)===null||L===void 0?void 0:L.defaultView)||window;return R instanceof te.MouseEvent||R instanceof te.WheelEvent},l.d=j,l.d0=class{constructor(R,d){let L=(d=this.options=Object.assign({},RW,d)).debug;if(L&&console.time("preprocess data"),d.maxZoom<0||d.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(d.promoteId&&d.generateId)throw new Error("promoteId and generateId cannot be used together.");let W=c3(R,d);L&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",d.indexMaxZoom,d.indexMaxPoints),console.time("generate tiles")),W=p3(W,d),d.updateable&&(this.source=W),this.initializeIndex(W,d)}initializeIndex(R,d){this.tileIndex=d.cluster?new MW(d.clusterOptions):new PW(d),R.length&&this.tileIndex.initialize(R)}getTile(R,d,L){return d=+d,L=+L,(R=+R)<0||R>24?null:this.tileIndex.getTile(R,d,L)}updateData(R,d){let L=this.options;if(!L.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:W,source:te}=function(ue,me,ge){let Ce=function(Oe,Pe){var it,He;return Oe?{removeAll:Oe.removeAll,remove:new Set(Oe.remove||[]),add:new Map((it=Oe.add)==null?void 0:it.map(bt=>[Pe.promoteId?bt.properties[Pe.promoteId]:bt.id,bt])),update:new Map((He=Oe.update)==null?void 0:He.map(bt=>[bt.id,bt]))}:{remove:new Set,add:new Map,update:new Map}}(me,ge),Te=[];if(Ce.removeAll&&(Te=ue,ue=[]),Ce.remove.size||Ce.add.size){let Oe=[];for(let Pe of ue)(Ce.remove.has(Pe.id)||Ce.add.has(Pe.id))&&Oe.push(Pe);if(Oe.length){Te.push(...Oe);let Pe=new Set(Oe.map(it=>it.id));ue=ue.filter(it=>!Pe.has(it.id))}if(Ce.add.size){let Pe=c3({type:"FeatureCollection",features:Array.from(Ce.add.values())},ge);Pe=p3(Pe,ge),Te.push(...Pe),ue.push(...Pe)}}if(Ce.update.size){let Oe=new Map,Pe=[];for(let it of ue)Ce.update.has(it.id)?Oe.set(it.id,[...Oe.get(it.id)||[],it]):Pe.push(it);for(let[it,He]of Ce.update){let bt=Oe.get(it);if(!bt||bt.length===0)continue;let Et=AW(bt,He,ge);Te.push(...bt,...Et),Pe.push(...Et)}ue=Pe}return{affected:Te,source:ue}}(this.source,R,L);d&&({affected:W,source:te}=this.filterUpdate(te,W,d)),W.length&&(this.source=te,this.tileIndex.updateIndex(te,W,L))}filterUpdate(R,d,L){let W=new Set;for(let te of R)te.id!=null&&(L(vy(te))||(d.push(te),W.add(te.id)));return{affected:d,source:R=R.filter(te=>!W.has(te.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(R=>vy(R))}}updateClusterOptions(R,d){let L=this.options.cluster;this.options.cluster=R,this.options.clusterOptions=d,L!=R?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(R){return this.tileIndex.getClusterExpansionZoom(R)}getClusterChildren(R){return this.tileIndex.getChildren(R)}getClusterLeaves(R,d,L){return this.tileIndex.getLeaves(R,d,L)}},l.d1=Si,l.e=X,l.f=rr,l.g=yt,l.h=R=>e(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let d=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(d)}catch(L){throw new Error(`Could not load image because of ${j(L).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.i=he,l.j=R=>new Promise((d,L)=>{let W=new Image;W.onload=()=>{d(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>W.src=Me)},W.onerror=()=>L(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 te=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(te):Me}),l.k=(R,d)=>$t(X(R,{type:"json"}),d),l.l=Ot,l.m=$t,l.n=or,l.o=(R,d)=>$t(X(R,{type:"arrayBuffer"}),d),l.p=J4,l.q=function(R){return new _y(R).readFields(nY,[])},l.r=function(R){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(R))},l.s=Ge,l.t=As,l.u=Ps,l.v=Pc,l.w=ee,l.x=ht,l.y=vo,l.z=Bl}),E("worker",["./shared"],function(l){"use strict";class e{constructor(T,f){this.keyCache={},T&&this.replace(T,f)}replace(T,f){this._layerConfigs={},this._layers={},this.update(T,[],f)}update(T,f,u){for(let x of T){this._layerConfigs[x.id]=x;let z=this._layers[x.id]=l.bT(x,u);z._featureFilter=l.ah(z.filter,u),this.keyCache[x.id]&&delete this.keyCache[x.id]}for(let x of f)delete this.keyCache[x],delete this._layerConfigs[x],delete this._layers[x];this.familiesBySource={};let A=l.cJ(Object.values(this._layerConfigs),this.keyCache);for(let x of A){let z=x.map(P=>this._layers[P.id]),I=z[0];if(I.isHidden())continue;let O=I.source||"",D=this.familiesBySource[O];D||(D=this.familiesBySource[O]={});let B=I.sourceLayer||l.ag,F=D[B];F||(F=D[B]=[]),F.push(z)}}}class t{constructor(T){let f={},u=[];for(let I in T){let O=T[I],D=f[I]={};for(let B in O){let F=O[+B];if(!F||F.bitmap.width===0||F.bitmap.height===0)continue;let P={x:0,y:0,w:F.bitmap.width+2,h:F.bitmap.height+2};u.push(P),D[B]={rect:P,metrics:F.metrics}}}let{w:A,h:x}=l.p(u),z=new l.t({width:A||1,height:x||1});for(let I in T){let O=T[I];for(let D in O){let B=O[+D];if(!B||B.bitmap.width===0||B.bitmap.height===0)continue;let F=f[I][D].rect;l.t.copy(B.bitmap,z,{x:0,y:0},{x:F.x+1,y:F.y+1},B.bitmap)}}this.image=z,this.positions=f}}l.cK("GlyphAtlas",t);class n{constructor(T){this.tileID=new l.a3(T.tileID.overscaledZ,T.tileID.wrap,T.tileID.canonical.z,T.tileID.canonical.x,T.tileID.canonical.y),this.uid=T.uid,this.zoom=T.zoom,this.pixelRatio=T.pixelRatio,this.tileSize=T.tileSize,this.source=T.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=T.showCollisionBoxes,this.collectResourceTiming=!!T.collectResourceTiming,this.returnDependencies=!!T.returnDependencies,this.promoteId=T.promoteId,this.inFlightDependencies=[]}parse(T,f,u,A,x){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=T,this.collisionBoxArray=new l.ae;let z=new l.cL(Object.keys(T.layers).sort()),I=new l.cM(this.tileID,this.promoteId);I.bucketLayerIDs=[];let O={},D={featureIndex:I,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:u,subdivisionGranularity:x},B=f.familiesBySource[this.source];for(let q in B){let Z=T.layers[q];if(!Z)continue;Z.version===1&&l.w(`Vector tile source "${this.source}" layer "${q}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ee=z.encode(q),ae=[];for(let he=0;hewe.id)))}}let F=l.bY(D.glyphDependencies,q=>Object.keys(q).map(Number));for(let q of this.inFlightDependencies)q?.abort();this.inFlightDependencies=[];let P=Promise.resolve({});if(Object.keys(F).length){let q=new AbortController;this.inFlightDependencies.push(q),P=A.sendAsync({type:"GG",data:{stacks:F,source:this.source,tileID:this.tileID,type:"glyphs"}},q)}let j=Object.keys(D.iconDependencies),U=Promise.resolve({});if(j.length){let q=new AbortController;this.inFlightDependencies.push(q),U=A.sendAsync({type:"GI",data:{icons:j,source:this.source,tileID:this.tileID,type:"icons"}},q)}let $=Object.keys(D.patternDependencies),Q=Promise.resolve({});if($.length){let q=new AbortController;this.inFlightDependencies.push(q),Q=A.sendAsync({type:"GI",data:{icons:$,source:this.source,tileID:this.tileID,type:"patterns"}},q)}let re=D.dashDependencies,ne=Promise.resolve({});if(Object.keys(re).length){let q=new AbortController;this.inFlightDependencies.push(q),ne=A.sendAsync({type:"GDA",data:{dashes:re}},q)}let[se,G,X,K]=yield Promise.all([P,U,Q,ne]),H=new t(se),Y=new l.cN(G,X);for(let q in O){let Z=O[q];Z instanceof l.af?(r(Z.layers,this.zoom,u),l.cO({bucket:Z,glyphMap:se,glyphPositions:H.positions,imageMap:G,imagePositions:Y.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:D.subdivisionGranularity})):Z.hasDependencies&&(Z instanceof l.cP||Z instanceof l.cQ||Z instanceof l.cR)&&(r(Z.layers,this.zoom,u),Z.addFeatures(D,this.tileID.canonical,Y.patternPositions,K))}return this.status="done",{buckets:Object.values(O).filter(q=>!q.isEmpty()),featureIndex:I,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:H.image,imageAtlas:Y,dashPositions:K,glyphMap:this.returnDependencies?se:null,iconMap:this.returnDependencies?G:null,glyphPositions:this.returnDependencies?H.positions:null}})}}function r(_,T,f){let u=new l.J(T);for(let A of _)A.recalculate(u,f)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(T,f){this.loading[T]=f}finishLoading(T){delete this.loading[T]}abort(T){let f=this.loading[T];f?.abort&&(f.abort.abort(),delete this.loading[T])}setParsing(T,f){this.parsing[T]=f}consumeParsing(T){let f=this.parsing[T];if(f)return delete this.parsing[T],f}clearParsing(T){delete this.parsing[T]}markLoaded(T,f){this.loaded[T]=f}getLoaded(T){let f=this.loaded[T];if(f)return f}removeLoaded(T){delete this.loaded[T]}clearLoaded(){this.loaded={}}}class o{constructor(T){this.start=`${T}#start`,this.end=`${T}#end`,this.measure=T,performance.mark(this.start)}finish(){performance.mark(this.end);let T=performance.getEntriesByName(this.measure);return T.length===0&&(performance.measure(this.measure,this.start,this.end),T=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),T}}class s{constructor(T,f,u,A,x){this.type=T,this.properties=u||{},this.extent=x,this.pointsArray=f,this.id=A}loadGeometry(){return this.pointsArray.map(T=>T.map(f=>new l.P(f.x,f.y)))}}class c{constructor(T,f,u){this.version=2,this._myFeatures=T,this.name=f,this.length=T.length,this.extent=u}feature(T){return this._myFeatures[T]}}class m{constructor(){this.layers={}}addLayer(T){this.layers[T.name]=T}}function h(_){let T=l.cS(_);return T.byteOffset===0&&T.byteLength===T.buffer.byteLength||(T=new Uint8Array(T)),{vectorTile:_,rawData:T.buffer}}function v(_,T,f){let{extent:u}=_,A=Math.pow(2,f.z-T.z),x=(f.x-T.x*A)*u,z=(f.y-T.y*A)*u,I=[];for(let O=0;O<_.length;O++){let D=_.feature(O),B=D.loadGeometry();for(let P of B)for(let j of P)j.x=j.x*A-x,j.y=j.y*A-z;let F=128;B=l.cT(B,D.type,-F,-F,u+F,u+F),B.length!==0&&I.push(new s(D.type,B,D.properties,D.id,u))}return new c(I,_.name,u)}class g{constructor(T,f,u){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this.overzoomedTileResultCache=new l.cU(1e3)}loadVectorTile(T,f){try{return{vectorTile:T.encoding!=="mlt"?new l.cV(new l.cW(f)):new l.cX(f),rawData:f}}catch(u){let A=new Uint8Array(f),x=`Unable to parse the tile at ${T.request.url}, `;throw x+=A[0]===31&&A[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${l.d(u).message}`,new Error(x)}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,overzoomParameters:u}=T;u&&(T.request=u.overzoomRequest);let A=this._startRequestTiming(T),x=new n(T);this.tileState.startLoading(f,x);let z=new AbortController;x.abort=z;try{let I=yield l.o(T.request,z);if(T.etag&&T.etag===I.etag)return this.tileState.finishLoading(f),this._getEtagUnmodifiedResult(I,A);let O=this.loadVectorTile(T,I.data);if(this.tileState.finishLoading(f),!O)return null;let{vectorTile:D,rawData:B}=O;u&&({vectorTile:D,rawData:B}=this._getOverzoomTile(T,D));let F=this._getExpiryData(I),P=this._finishRequestTiming(A);x.vectorTile=D,this.tileState.markLoaded(f,x);let j={rawData:B,cacheControl:F,resourceTiming:P};this.tileState.setParsing(f,j);try{return yield this._parseWorkerTile(x,T,j)}finally{this.tileState.clearParsing(f)}}catch(I){throw this.tileState.finishLoading(f),x.status="done",this.tileState.markLoaded(f,x),I}})}_getEtagUnmodifiedResult(T,f){let u=this._getExpiryData(T),A=this._finishRequestTiming(f);return l.e({etagUnmodified:!0},u,A)}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x,cacheControl:z,resourceTiming:I}=u;A=l.e({rawTileData:x.slice(0),encoding:f.encoding},A,z,I)}return A})}_getExpiryData({expires:T,cacheControl:f,etag:u}){let A={};return T&&(A.expires=T),f&&(A.cacheControl=f),u&&(A.etag=u),A}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T){let f=T?.finish();return f?{resourceTiming:JSON.parse(JSON.stringify(f))}:{}}_getOverzoomTile(T,f){var u;let{tileID:A,source:x,overzoomParameters:z}=T,{maxZoomTileID:I}=z,O=`${I.key}_${A.key}_${(u=T.request)===null||u===void 0?void 0:u.url}`,D=this.overzoomedTileResultCache.get(O);if(D)return D;let B=new m,F=this.layerIndex.familiesBySource[x];for(let j in F){let U=f.layers[j];if(!U)continue;let $=v(U,I,A.canonical);$.length>0&&B.addLayer($)}let P=h(B);return this.overzoomedTileResultCache.set(O,P),P}reloadTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}}class i{constructor(){this.loaded={}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,encoding:u,rawImageData:A,redFactor:x,greenFactor:z,blueFactor:I,baseShift:O}=T,D=A.width+2,B=A.height+2,F=l.b(A)?new l.R({width:D,height:B},yield l.cY(A,-1,-1,D,B)):A,P=new l.cZ(f,F,u,x,z,I,O);return this.loaded||(this.loaded={}),this.loaded[f]=P,P})}removeTile(T){let f=this.loaded,u=T.uid;f?.[u]&&delete f[u]}}class w{constructor(T,f,u,A=S){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this._createGeoJSONIndex=A}loadVectorTile(T){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:f,x:u,y:A}=T.tileID.canonical,x=this._geoJSONIndex.getTile(f,u,A);return x?h(new l.c_(x.features,{version:2,extent:l.a6})):null}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f}=T,u=new n(T);u.abort=new AbortController;try{let A=this.loadVectorTile(T);if(!A)return null;let{vectorTile:x,rawData:z}=A;u.vectorTile=x,this.tileState.markLoaded(f,u);let I={rawData:z};this.tileState.setParsing(f,I);try{return yield this._parseWorkerTile(u,T,I)}finally{this.tileState.clearParsing(f)}}catch(A){throw u.status="done",this.tileState.markLoaded(f,u),A}})}_reloadLoadedTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x}=u;A=l.e({rawTileData:x.slice(0),encoding:"mvt"},A)}return A})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}loadData(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort();let u=this._startRequestTiming(T);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(T,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let A={};return T.request&&(A.data=T.data),this._finishRequestTiming(u,T,A),A}catch(A){if(delete this._pendingRequest,!l.$(A))throw A;return{abandoned:!0}}})}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T,f,u){let A=T?.finish();A&&(u.resourceTiming={[f.source]:JSON.parse(JSON.stringify(A))})}reloadTile(T){return this.tileState.getLoaded(T.uid)?this._reloadLoadedTile(T):this.loadTile(T)}loadAndProcessGeoJSON(T,f){return l._(this,void 0,void 0,function*(){var u;if(T.request&&(T.data=(yield l.k(T.request,f)).data),T.data)return T.data=this._filterGeoJSON(T.data,T.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(T.data,T));if(T.dataDiff)return(u=this._geoJSONIndex)!==null&&u!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},T)),void this._geoJSONIndex.updateData(T.dataDiff,this._getFilterPredicate(T.filter));if(T.updateCluster&&this._geoJSONIndex.updateClusterOptions(T.geojsonVtOptions.cluster,M(T)),this._geoJSONIndex==null)throw new Error(`Input data given to '${T.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(T,f){if(T.type!=="FeatureCollection")return T;let u=this._getFilterPredicate(f);return u?{type:"FeatureCollection",features:T.features.filter(A=>u(A))}:T}_getFilterPredicate(T){if(typeof T!="boolean"&&!T?.length)return;let f=l.c$(T,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(f.result==="error")throw new Error(f.value.map(u=>`${u.key}: ${u.message}`).join(", "));return u=>f.value.evaluate({zoom:0},u)}removeSource(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort()})}getClusterExpansionZoom(T){return this._geoJSONIndex.getClusterExpansionZoom(T.clusterId)}getClusterChildren(T){return this._geoJSONIndex.getClusterChildren(T.clusterId)}getClusterLeaves(T){return this._geoJSONIndex.getClusterLeaves(T.clusterId,T.limit,T.offset)}}function S(_,T){let f=l.e(T.geojsonVtOptions||{},{updateable:!0,clusterOptions:M(T)});return new l.d0(_,f)}function M({geojsonVtOptions:_,clusterProperties:T}){if(!T||!_.clusterOptions)return _.clusterOptions;let f={},u={},A={accumulated:null,zoom:0},x={properties:null},z=Object.keys(T);for(let I of z){let[O,D]=T[I],B=l.c$(D),F=l.c$(typeof O=="string"?[O,["accumulated"],["get",I]]:O);f[I]=B.value,u[I]=F.value}return _.clusterOptions.map=I=>{x.properties=I;let O={};for(let D of z)O[D]=f[D].evaluate(A,x);return O},_.clusterOptions.reduce=(I,O)=>{x.properties=O;for(let D of z)A.accumulated=I[D],I[D]=u[D].evaluate(A,x)},_.clusterOptions}class C{constructor(T){this.self=T,this.actor=new l.N(T),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(f,u)=>{if(this.externalWorkerSourceTypes[f])throw new Error(`Worker source with name "${f}" already registered.`);this.externalWorkerSourceTypes[f]=u},this.self.addProtocol=l.cH,this.self.removeProtocol=l.cI,this.self.registerRTLTextPlugin=f=>{l.d1.setMethods(f)},this.self.makeRequest=l.m,this.actor.registerMessageHandler("LDT",(f,u)=>this._getDEMWorkerSource(f,u.source).loadTile(u)),this.actor.registerMessageHandler("RDT",(f,u)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(f,u.source).removeTile(u)})),this.actor.registerMessageHandler("GCEZ",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterExpansionZoom(u)})),this.actor.registerMessageHandler("GCC",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterChildren(u)})),this.actor.registerMessageHandler("GCL",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterLeaves(u)})),this.actor.registerMessageHandler("LD",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadData(u)),this.actor.registerMessageHandler("LT",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadTile(u)),this.actor.registerMessageHandler("RT",(f,u)=>this._getWorkerSource(f,u.type,u.source).reloadTile(u)),this.actor.registerMessageHandler("AT",(f,u)=>this._getWorkerSource(f,u.type,u.source).abortTile(u)),this.actor.registerMessageHandler("RMT",(f,u)=>this._getWorkerSource(f,u.type,u.source).removeTile(u)),this.actor.registerMessageHandler("RS",(f,u)=>l._(this,void 0,void 0,function*(){var A,x;if(!(!((x=(A=this.workerSources[f])===null||A===void 0?void 0:A[u.type])===null||x===void 0)&&x[u.source]))return;let z=this.workerSources[f][u.type][u.source];delete this.workerSources[f][u.type][u.source],z.removeSource!==void 0&&z.removeSource(u)})),this.actor.registerMessageHandler("RM",f=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[f],delete this.availableImages[f],delete this.workerSources[f],delete this.demWorkerSources[f],this.globalStates.delete(f)})),this.actor.registerMessageHandler("SR",(f,u)=>l._(this,void 0,void 0,function*(){this.referrer=u})),this.actor.registerMessageHandler("SRPS",(f,u)=>this._syncRTLPluginState(f,u)),this.actor.registerMessageHandler("IS",(f,u)=>l._(this,void 0,void 0,function*(){this.self.importScripts(u)})),this.actor.registerMessageHandler("SI",(f,u)=>this._setImages(f,u)),this.actor.registerMessageHandler("UL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).update(u.layers,u.removedIds,this._getGlobalState(f))})),this.actor.registerMessageHandler("UGS",(f,u)=>l._(this,void 0,void 0,function*(){let A=this._getGlobalState(f);for(let x in u)A[x]=u[x]})),this.actor.registerMessageHandler("SL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).replace(u,this._getGlobalState(f))}))}_getGlobalState(T){let f=this.globalStates.get(T);return f||(f={},this.globalStates.set(T,f)),f}_setImages(T,f){return l._(this,void 0,void 0,function*(){this.availableImages[T]=f;for(let u in this.workerSources[T]){let A=this.workerSources[T][u];for(let x in A)A[x].availableImages=f}})}_syncRTLPluginState(T,f){return l._(this,void 0,void 0,function*(){return yield l.d1.syncState(f,this.self.importScripts)})}_getAvailableImages(T){let f=this.availableImages[T];return f||(f=[]),f}_getLayerIndex(T){let f=this.layerIndexes[T];return f||(f=this.layerIndexes[T]=new e),f}_getWorkerSource(T,f,u){var A,x;if((A=this.workerSources)[T]||(A[T]={}),(x=this.workerSources[T])[f]||(x[f]={}),!this.workerSources[T][f][u]){let z={sendAsync:(I,O)=>(I.targetMapId=T,this.actor.sendAsync(I,O))};switch(f){case"vector":this.workerSources[T][f][u]=new g(z,this._getLayerIndex(T),this._getAvailableImages(T));break;case"geojson":this.workerSources[T][f][u]=new w(z,this._getLayerIndex(T),this._getAvailableImages(T));break;default:this.workerSources[T][f][u]=new this.externalWorkerSourceTypes[f](z,this._getLayerIndex(T),this._getAvailableImages(T))}}return this.workerSources[T][f][u]}_getDEMWorkerSource(T,f){var u,A;return(u=this.demWorkerSources)[T]||(u[T]={}),(A=this.demWorkerSources[T])[f]||(A[f]=new i),this.demWorkerSources[T][f]}}return l.i(self)&&(self.worker=new C(self)),C}),E("index",["exports","./shared"],function(l,e){"use strict";var t="5.24.0";function n(){var pe=new e.A(4);return e.A!=Float32Array&&(pe[1]=0,pe[2]=0),pe[0]=1,pe[3]=1,pe}let r,a,o,s={frame(pe,y,N,ie){let fe=ie||window,be=fe.requestAnimationFrame(je=>{Re(),y(je)}),{unsubscribe:Re}=e.s(pe.signal,"abort",()=>{Re(),fe.cancelAnimationFrame(be),N(new e.a(pe.signal.reason))},!1)},frameAsync(pe,y){return new Promise((N,ie)=>{this.frame(pe,N,ie,y)})},getImageData(pe,y=0){return this.getImageCanvasContext(pe).getImageData(-y,-y,pe.width+2*y,pe.height+2*y)},getImageCanvasContext(pe){let y=window.document.createElement("canvas"),N=y.getContext("2d",{willReadFrequently:!0});if(!N)throw new Error("failed to create canvas 2d context");return y.width=pe.width,y.height=pe.height,N.drawImage(pe,0,0,pe.width,pe.height),N},resolveURL:pe=>(r||(r=document.createElement("a")),r.href=pe,r.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return o!==void 0?o:!!matchMedia&&(a!=null||(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)},set prefersReducedMotion(pe){o=pe}},c=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(pe){this._frozenAt=pe}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function m(){return c.getCurrentTime()}var h,v;class g{static create(y,N,ie){let fe=window.document.createElement(y);return N!==void 0&&(fe.className=N),ie&&ie.appendChild(fe),fe}static createNS(y,N){return window.document.createElementNS(y,N)}static disableDrag(){g.docStyle&&g.selectProp&&(g.userSelect=g.docStyle[g.selectProp],g.docStyle[g.selectProp]="none")}static enableDrag(){g.docStyle&&g.selectProp&&(g.docStyle[g.selectProp]=g.userSelect)}static suppressClickInternal(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",g.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",g.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",g.suppressClickInternal,!0)},0)}static getScale(y){let N=y.getBoundingClientRect();return{x:N.width/y.offsetWidth||1,y:N.height/y.offsetHeight||1,boundingClientRect:N}}static getPoint(y,N,ie){let fe=N.boundingClientRect;return new e.P((ie.clientX-fe.left)/N.x-y.clientLeft,(ie.clientY-fe.top)/N.y-y.clientTop)}static mousePos(y,N){let ie=g.getScale(y);return g.getPoint(y,ie,N)}static touchPos(y,N){let ie=[],fe=g.getScale(y);for(let be of N)ie.push(g.getPoint(y,fe,be));return ie}static sanitize(y){let N=new DOMParser().parseFromString(y,"text/html").body||document.createElement("body"),ie=N.querySelectorAll("script");for(let fe of ie)fe.remove();return g.clean(N),N.innerHTML}static isPossiblyDangerous(y,N){let ie=N.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(y)||!ie.includes("javascript:")&&!ie.includes("data:"))||!!y.startsWith("on")||void 0}static clean(y){let N=y.children;for(let ie of N)g.removeAttributes(ie),g.clean(ie)}static removeAttributes(y){for(let{name:N,value:ie}of y.attributes)g.isPossiblyDangerous(N,ie)&&y.removeAttribute(N)}}g.docStyle=typeof window<"u"&&((h=window.document)===null||h===void 0?void 0:h.documentElement.style),g.selectProp=!g.docStyle||"userSelect"in g.docStyle?"userSelect":"webkitUserSelect",function(pe){let y,N,ie,fe;pe.resetRequestQueue=()=>{y=[],N=0,ie=0,fe={}},pe.addThrottleControl=Ze=>{let ut=ie++;return fe[ut]=Ze,ut},pe.removeThrottleControl=Ze=>{delete fe[Ze],Re()},pe.getImage=(Ze,ut,ft=!0)=>new Promise((Dt,Gt)=>{Ze.headers||(Ze.headers={}),Ze.headers.accept="image/webp,*/*",e.e(Ze,{type:"image"}),y.push({abortController:ut,requestParameters:Ze,supportImageRefresh:ft,state:"queued",onError:Kt=>{Gt(Kt)},onSuccess:Kt=>{Dt(Kt)}}),Re()});let be=Ze=>e._(this,void 0,void 0,function*(){Ze.state="running";let{requestParameters:ut,supportImageRefresh:ft,onError:Dt,onSuccess:Gt,abortController:Kt}=Ze,st=ft===!1&&!e.i(self)&&!e.g(ut.url)&&(!ut.headers||Object.keys(ut.headers).reduce((ir,dr)=>ir&&dr==="accept",!0));N++;let It=st?je(ut,Kt):e.m(ut,Kt);try{let ir=yield It;delete Ze.abortController,Ze.state="completed",ir.data instanceof HTMLImageElement||e.b(ir.data)?Gt(ir):ir.data&&Gt({data:yield(Ut=ir.data,typeof createImageBitmap=="function"?e.h(Ut):e.j(Ut)),cacheControl:ir.cacheControl,expires:ir.expires})}catch(ir){delete Ze.abortController,Dt(e.d(ir))}finally{N--,Re()}var Ut}),Re=()=>{let Ze=(()=>{for(let ut of Object.keys(fe))if(fe[ut]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let ut=N;ut0;ut++){let ft=y.shift();ft.abortController.signal.aborted?ut--:be(ft)}},je=(Ze,ut)=>new Promise((ft,Dt)=>{let Gt=new Image,Kt=Ze.url,st=Ze.credentials;st&&st==="include"?Gt.crossOrigin="use-credentials":(st&&st==="same-origin"||!e.f(Kt))&&(Gt.crossOrigin="anonymous"),ut.signal.addEventListener("abort",()=>{Gt.src="",Dt(new e.a(ut.signal.reason))}),Gt.fetchPriority="high",Gt.onload=()=>{Gt.onerror=Gt.onload=null,ft({data:Gt})},Gt.onerror=()=>{Gt.onerror=Gt.onload=null,ut.signal.aborted||Dt(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."))},Gt.src=Kt})}(v||(v={})),v.resetRequestQueue();class i{constructor(y){this._transformRequestFn=y??null}transformRequest(y,N){return this._transformRequestFn&&this._transformRequestFn(y,N)||{url:y}}setTransformRequest(y){this._transformRequestFn=y}}function w(pe){let y=[];if(typeof pe=="string")y.push({id:"default",url:pe});else if(pe&&pe.length>0){let N=[];for(let{id:ie,url:fe}of pe){let be=`${ie}${fe}`;N.includes(be)||(N.push(be),y.push({id:ie,url:fe}))}}return y}function S(pe,y,N){try{let ie=new URL(pe);return ie.pathname+=`${y}${N}`,ie.toString()}catch{throw new Error(`Invalid sprite URL "${pe}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function M(pe){let{userImage:y}=pe;return!(!y?.render||!y.render()||(pe.data.replace(new Uint8Array(y.data.buffer)),0))}class C extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let y of Object.keys(this.images))this.removeImage(y);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(y){if(this.loaded!==y&&(this.loaded=y,y)){for(let{ids:N,promiseResolve:ie}of this.requestors)ie(this._getImagesForIds(N));this.requestors=[]}}getImage(y){let N=this.images[y];if(N&&!N.data&&N.spriteData){let ie=N.spriteData;N.data=new e.R({width:ie.width,height:ie.height},ie.context.getImageData(ie.x,ie.y,ie.width,ie.height).data),N.spriteData=null}return N}addImage(y,N){if(this.images[y])throw new Error(`Image id ${y} already exist, use updateImage instead`);this._validate(y,N)&&(this.images[y]=N)}_validate(y,N){let ie=!0,fe=N.data||N.spriteData;return this._validateStretch(N.stretchX,fe?.width)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchX" value`))),ie=!1),this._validateStretch(N.stretchY,fe?.height)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchY" value`))),ie=!1),this._validateContent(N.content,N)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "content" value`))),ie=!1),ie}_validateStretch(y,N){if(!y)return!0;let ie=0;for(let fe of y){if(fe[0]=y[1]))}updateImage(y,N,ie=!0){let fe=this.getImage(y);if(ie&&(fe.data.width!==N.data.width||fe.data.height!==N.data.height))throw new Error(`size mismatch between old image (${fe.data.width}x${fe.data.height}) and new image (${N.data.width}x${N.data.height}).`);N.version=fe.version+1,this.images[y]=N,this.updatedImages[y]=!0}removeImage(y){var N;let ie=this.images[y];delete this.images[y],delete this.patterns[y],!((N=ie.userImage)===null||N===void 0)&&N.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(y){return new Promise((N,ie)=>{let fe=!0;if(!this.isLoaded())for(let be of y)this.images[be]||(fe=!1);this.isLoaded()||fe?N(this._getImagesForIds(y)):this.requestors.push({ids:y,promiseResolve:N})})}_getImagesForIds(y){var N;let ie={};for(let fe of y){let be=this.getImage(fe);be||(this.fire(new e.n("styleimagemissing",{id:fe})),be=this.getImage(fe)),be?ie[fe]={data:be.data.clone(),pixelRatio:be.pixelRatio,sdf:be.sdf,version:be.version,stretchX:be.stretchX,stretchY:be.stretchY,content:be.content,textFitWidth:be.textFitWidth,textFitHeight:be.textFitHeight,hasRenderCallback:!!(!((N=be.userImage)===null||N===void 0)&&N.render)}:e.w(`Image "${fe}" 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:y,height:N}=this.atlasImage;return{width:y,height:N}}getPattern(y){let N=this.patterns[y],ie=this.getImage(y);if(!ie)return null;if(N&&N.position.version===ie.version)return N.position;if(N)N.position.version=ie.version;else{let fe={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},be=new e.I(fe,ie);this.patterns[y]={bin:fe,position:be}}return this._updatePatternAtlas(),this.patterns[y].position}bind(y){let N=y.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(y,this.atlasImage,N.RGBA),this.atlasTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE)}_updatePatternAtlas(){let y=[];for(let be in this.patterns)y.push(this.patterns[be].bin);let{w:N,h:ie}=e.p(y),fe=this.atlasImage;fe.resize({width:N||1,height:ie||1});for(let be in this.patterns){let{bin:Re}=this.patterns[be],je=Re.x+1,Ze=Re.y+1,ut=this.getImage(be).data,ft=ut.width,Dt=ut.height;e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze},{width:ft,height:Dt}),e.R.copy(ut,fe,{x:0,y:Dt-1},{x:je,y:Ze-1},{width:ft,height:1}),e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze+Dt},{width:ft,height:1}),e.R.copy(ut,fe,{x:ft-1,y:0},{x:je-1,y:Ze},{width:1,height:Dt}),e.R.copy(ut,fe,{x:0,y:0},{x:je+ft,y:Ze},{width:1,height:Dt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(y){for(let N of y){if(this.callbackDispatchedThisFrame[N])continue;this.callbackDispatchedThisFrame[N]=!0;let ie=this.getImage(N);ie||e.w(`Image with ID: "${N}" was not found`),M(ie)&&this.updateImage(N,ie)}}cloneImages(){let y={};for(let N in this.images){let ie=this.images[N];y[N]=Object.assign(Object.assign({},ie),{data:ie.data?ie.data.clone():null})}return y}}let _=1e20,T=new Float64Array(256);for(let pe=0;pe<256;pe++){let y=.5-Math.pow(pe/255,.45454545454545453);T[pe]=y*Math.abs(y)}function f(pe,y,N,ie,fe,be,Re,je,Ze){for(let ut=y;ut-1);Ze++,be[Ze]=je,Re[Ze]=ut,Re[Ze+1]=_}for(let je=0,Ze=0;je/[-\w]+/.test(fe)?fe:`'${CSS.escape(fe)}'`).join(",");return new x.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ie,fontWeight:this._fontWeight(N[0]),fontStyle:this._fontStyle(N[0]),lang:this.lang})}_fontStyle(y){return/italic/i.test(y)?"italic":/oblique/i.test(y)?"oblique":"normal"}_fontWeight(y){let N={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},ie;for(let[fe,be]of Object.entries(N))new RegExp(`\\b${fe}\\b`,"i").test(y)&&(ie=`${be}`);return ie}destroy(){for(let y in this.entries){let N=this.entries[y];N.tinySDF=null,N.ideographTinySDF=null,N.glyphs={},N.requests={},N.ranges={}}this.entries={}}}x.loadGlyphRange=function(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=256*y,be=fe+255,Re=yield ie.transformRequest(N.replace("{fontstack}",pe).replace("{range}",`${fe}-${be}`),"Glyphs"),je=yield e.o(Re,new AbortController);if(!je?.data)throw new Error(`Could not load glyph range. range: ${y}, ${fe}-${be}`);let Ze={};for(let ut of e.q(je.data))Ze[ut.id]=ut;return Ze})},x.TinySDF=class{constructor({fontSize:pe=24,buffer:y=3,radius:N=8,cutoff:ie=.25,fontFamily:fe="sans-serif",fontWeight:be="normal",fontStyle:Re="normal",lang:je=null}={}){this.buffer=y,this.radius=N,this.cutoff=ie,this.lang=je;let Ze=this.size=pe+4*y,ut=this._createCanvas(Ze),ft=this.ctx=ut.getContext("2d",{willReadFrequently:!0});ft.font=`${Re} ${be} ${pe}px ${fe}`,ft.textBaseline="alphabetic",ft.textAlign="left",ft.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(pe){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(pe,pe);let y=document.createElement("canvas");return y.width=y.height=pe,y}draw(pe){let{width:y,actualBoundingBoxAscent:N,actualBoundingBoxDescent:ie,actualBoundingBoxLeft:fe,actualBoundingBoxRight:be}=this.ctx.measureText(pe),Re=Math.ceil(N),je=Math.floor(fe),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(be)-je)),ut=Math.max(0,Math.min(this.size-this.buffer,Re+Math.ceil(ie))),ft=Ze+2*this.buffer,Dt=ut+2*this.buffer,Gt=Math.max(ft*Dt,0),Kt=new Uint8ClampedArray(Gt),st={data:Kt,width:ft,height:Dt,glyphWidth:Ze,glyphHeight:ut,glyphTop:Re,glyphLeft:je,glyphAdvance:y};if(Ze===0||ut===0)return st;let{ctx:It,buffer:Ut,gridInner:ir,gridOuter:dr}=this;this.lang&&(It.lang=this.lang),It.clearRect(Ut,Ut,Ze,ut),It.fillText(pe,Ut-je,Ut+Re);let Ar=It.getImageData(Ut,Ut,Ze,ut);dr.fill(_,0,Gt),ir.fill(0,0,Gt);let hr=3;for(let Cr=0;Cr1&&(Ze=y[++je]);let ft=Math.abs(ut-Ze.left),Dt=Math.abs(ut-Ze.right),Gt=Math.min(ft,Dt),Kt,st=be/ie*(fe+1);if(Ze.isDash){let It=fe-Math.abs(st);Kt=Math.sqrt(Gt*Gt+It*It)}else Kt=fe-Math.sqrt(Gt*Gt+st*st);this.data[Re+ut]=Math.max(0,Math.min(255,Kt+128))}}}addRegularDash(y){for(let je=y.length-1;je>=0;--je){let Ze=y[je],ut=y[je+1];Ze.zeroLength?y.splice(je,1):ut&&ut.isDash===Ze.isDash&&(ut.left=Ze.left,y.splice(je,1))}let N=y[0],ie=y[y.length-1];N.isDash===ie.isDash&&(N.left=ie.left-this.width,ie.right=N.right+this.width);let fe=this.width*this.nextRow,be=0,Re=y[be];for(let je=0;je1&&(Re=y[++be]);let Ze=Math.abs(je-Re.left),ut=Math.abs(je-Re.right),ft=Math.min(Ze,ut);this.data[fe+je]=Math.max(0,Math.min(255,(Re.isDash?ft:-ft)+128))}}addDash(y,N){let ie=N?7:0,fe=2*ie+1;if(this.nextRow+fe>this.height)return e.w("LineAtlas out of space"),null;let be=0;for(let je of y)be+=je;if(be!==0){let je=this.width/be,Ze=this.getDashRanges(y,this.width,je);N?this.addRoundDash(Ze,je,ie):this.addRegularDash(Ze)}let Re={y:this.nextRow+ie,height:2*ie,width:be};return this.nextRow+=fe,this.dirty=!0,Re}bind(y){let N=y.gl;this.texture?(N.bindTexture(N.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,N.texSubImage2D(N.TEXTURE_2D,0,0,0,this.width,this.height,N.ALPHA,N.UNSIGNED_BYTE,this.data))):(this.texture=N.createTexture(),N.bindTexture(N.TEXTURE_2D,this.texture),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.LINEAR),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.LINEAR),N.texImage2D(N.TEXTURE_2D,0,N.ALPHA,this.width,this.height,0,N.ALPHA,N.UNSIGNED_BYTE,this.data))}}let P="maplibre_preloaded_worker_pool";class j{constructor(){this.active={}}acquire(y){if(!this.workers)for(this.workers=[];this.workers.lengthe.m(y,N))),Q}function G(pe,y){let N=e.O();return e.Q(N,N,[1,1,0]),e.S(N,N,[.5*pe.width,.5*pe.height,1]),pe.calculatePosMatrix?e.U(N,N,pe.calculatePosMatrix(y.toUnwrapped())):N}function X(pe,y,N,ie,fe,be,Re){var je;let Ze=function(Gt,Kt,st){if(Gt)for(let It of Gt){let Ut=Kt[It];if(Ut?.source===st&&Ut.type==="fill-extrusion")return!0}else for(let It in Kt){let Ut=Kt[It];if(Ut.source===st&&Ut.type==="fill-extrusion")return!0}return!1}((je=fe?.layers)!==null&&je!==void 0?je:null,y,pe.id),ut=be.maxPitchScaleFactor(),ft=pe.tilesIn(ie,ut,Ze);ft.sort(K);let Dt=[];for(let Gt of ft)Dt.push({wrappedTileID:Gt.tileID.wrapped().key,queryResults:Gt.tile.queryRenderedFeatures(y,N,pe.getState(),Gt.queryGeometry,Gt.cameraQueryGeometry,Gt.scale,fe,be,ut,G(be,Gt.tileID),Re?(Kt,st)=>Re(Gt.tileID,Kt,st):void 0)});return function(Gt,Kt){for(let st in Gt)for(let It of Gt[st])H(It,Kt);return Gt}(function(Gt){let Kt={},st={};for(let{queryResults:It,wrappedTileID:Ut}of Gt){st[Ut]||(st[Ut]={});let ir=st[Ut];for(let dr in It){let Ar=It[dr];ir[dr]||(ir[dr]={});let hr=ir[dr];Kt[dr]||(Kt[dr]=[]);for(let vr of Ar)hr[vr.featureIndex]||(hr[vr.featureIndex]=!0,Kt[dr].push(vr))}}return Kt}(Dt),pe)}function K(pe,y){let N=pe.tileID,ie=y.tileID;return N.overscaledZ-ie.overscaledZ||N.canonical.y-ie.canonical.y||N.wrap-ie.wrap||N.canonical.x-ie.canonical.x}function H(pe,y){let N=pe.feature,ie=y.getFeatureState(N.layer["source-layer"],N.id);N.source=N.layer.source,N.layer["source-layer"]&&(N.sourceLayer=N.layer["source-layer"]),N.state=ie}function Y(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=pe;if(pe.url?fe=(yield e.k(yield y.transformRequest(pe.url,"Source"),N)).data:yield s.frameAsync(N,ie),!fe)return null;let be=e.V(e.e(fe,pe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in fe&&fe.vector_layers&&(be.vectorLayerIds=fe.vector_layers.map(Re=>Re.id)),be})}class q{constructor(y,N){y&&(N?this.setSouthWest(y).setNorthEast(N):Array.isArray(y)&&(y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1])))}setNorthEast(y){return this._ne=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}setSouthWest(y){return this._sw=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}extend(y){let N=this._sw,ie=this._ne,fe,be;if(y instanceof e.W)fe=y,be=y;else{if(!(y instanceof q))return Array.isArray(y)?y.length===4||y.every(Array.isArray)?this.extend(q.convert(y)):this.extend(e.W.convert(y)):y&&("lng"in y||"lon"in y)&&"lat"in y?this.extend(e.W.convert(y)):this;if(fe=y._sw,be=y._ne,!fe||!be)return this}return N||ie?(N.lng=Math.min(fe.lng,N.lng),N.lat=Math.min(fe.lat,N.lat),ie.lng=Math.max(be.lng,ie.lng),ie.lat=Math.max(be.lat,ie.lat)):(this._sw=new e.W(fe.lng,fe.lat),this._ne=new e.W(be.lng,be.lat)),this}getCenter(){return new e.W((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 e.W(this.getWest(),this.getNorth())}getSouthEast(){return new e.W(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(y){let{lng:N,lat:ie}=e.W.convert(y),fe=this._sw.lng<=N&&N<=this._ne.lng;return this._sw.lng>this._ne.lng&&(fe=this._sw.lng>=N&&N>=this._ne.lng),this._sw.lat<=ie&&ie<=this._ne.lat&&fe}intersects(y){if(!((y=q.convert(y)).getNorth()>=this.getSouth()&&y.getSouth()<=this.getNorth()))return!1;let N=Math.abs(this.getEast()-this.getWest()),ie=Math.abs(y.getEast()-y.getWest());if(N>=360||ie>=360)return!0;let fe=e.X(this.getWest(),-180,180),be=e.X(this.getEast(),-180,180),Re=e.X(y.getWest(),-180,180),je=e.X(y.getEast(),-180,180),Ze=fe>be,ut=Re>je;return!(!Ze||!ut)||(Ze?je>=fe||Re<=be:ut?be>=Re||fe<=je:Re<=be&&je>=fe)}static convert(y){return y instanceof q?y:y&&new q(y)}static fromLngLat(y,N=0){let ie=360*N/40075017,fe=ie/Math.cos(Math.PI/180*y.lat);return new q(new e.W(y.lng-fe,y.lat-ie),new e.W(y.lng+fe,y.lat+ie))}adjustAntiMeridian(){let y=new e.W(this._sw.lng,this._sw.lat),N=new e.W(this._ne.lng,this._ne.lat);return new q(y,y.lng>N.lng?new e.W(N.lng+360,N.lat):N)}}class Z{constructor(y,N,ie){this.bounds=q.convert(this.validateBounds(y)),this.minzoom=N||0,this.maxzoom=ie||24}validateBounds(y){return Array.isArray(y)&&y.length===4?[Math.max(-180,y[0]),Math.max(-90,y[1]),Math.min(180,y[2]),Math.min(90,y[3])]:[-180,-90,180,90]}contains(y){let N=Math.pow(2,y.z),ie=Math.floor(e.Z(this.bounds.getWest())*N),fe=Math.floor(e.Y(this.bounds.getNorth())*N),be=Math.ceil(e.Z(this.bounds.getEast())*N),Re=Math.ceil(e.Y(this.bounds.getSouth())*N);return y.x>=ie&&y.x=fe&&y.y{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie={request:yield this.map._requestManager.transformRequest(N,"Tile"),uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(y),etag:y.etag};ie.request.collectResourceTiming=this._collectResourceTiming;let fe="RT";if(y.actor&&y.state!=="expired"){if(y.state==="loading")return new Promise((be,Re)=>{y.reloadPromise={resolve:be,reject:Re}})}else y.actor=this.dispatcher.getActor(),fe="LT";y.abortController=new AbortController;try{let be=yield y.actor.sendAsync({type:fe,data:ie},y.abortController);if(delete y.abortController,y.aborted)return;this._afterTileLoadWorkerResponse(y,be);let Re={};return be?.etagUnmodified&&(Re.unmodified=!0),Re}catch(be){if(delete y.abortController,y.aborted)return;if(be&&be.status!==404)throw be;this._afterTileLoadWorkerResponse(y,null)}})}_getOverzoomParameters(y){return e._(this,void 0,void 0,function*(){if(y.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let N=y.tileID.scaledTo(this.maxzoom).canonical,ie=N.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:N,overzoomRequest:yield this.map._requestManager.transformRequest(ie,"Tile")}})}_afterTileLoadWorkerResponse(y,N){if(N?.resourceTiming&&(y.resourceTiming=N.resourceTiming),N&&this.map._refreshExpiredTiles&&y.setExpiryData(N),y.etag=N?.etag,y.loadVectorData(N,this.map.painter),y.reloadPromise){let ie=y.reloadPromise;y.reloadPromise=null,this.loadTile(y).then(ie.resolve).catch(ie.reject)}}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.actor&&(yield y.actor.sendAsync({type:"AT",data:{uid:y.uid,type:this.type,source:this.id}}))})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),y.actor&&(yield y.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ae extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.dispatcher=ie,this.setEventedParent(fe),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},N),e.e(this,e.V(N,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(y=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let N=yield Y(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,N&&(e.e(this,N),N.bounds&&(this.tileBounds=new Z(N.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:y})))}catch(N){this._tileJSONRequest=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}onAdd(y){this.map=y,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(y){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),y(),this.load(!0)}setTiles(y){return this.setSourceProperty(()=>{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}serialize(){return e.e({},this._options)}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);y.abortController=new AbortController;try{let ie=yield v.getImage(yield this.map._requestManager.transformRequest(N,"Tile"),y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ie?.data){this.map._refreshExpiredTiles&&(ie.cacheControl||ie.expires)&&y.setExpiryData({cacheControl:ie.cacheControl,expires:ie.expires});let fe=this.map.painter.context,be=fe.gl,Re=ie.data;y.texture=this.map.painter.getTileTexture(Re.width),y.texture?y.texture.update(Re,{useMipmap:!0}):(y.texture=new e.T(fe,Re,be.RGBA,{useMipmap:!0}),y.texture.bind(be.LINEAR,be.CLAMP_TO_EDGE,be.LINEAR_MIPMAP_NEAREST)),y.state="loaded"}}catch(ie){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ie)throw y.state="errored",ie}})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController)})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.texture&&this.map.painter.saveTileTexture(y.texture)})}hasTransition(){return!1}}class he extends ae{constructor(y,N,ie,fe){super(y,N,ie,fe),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},N),this.encoding=N.encoding||"mapbox",this.redFactor=N.redFactor,this.greenFactor=N.greenFactor,this.blueFactor=N.blueFactor,this.baseShift=N.baseShift}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie=yield this.map._requestManager.transformRequest(N,"Tile");y.neighboringTiles=this._getNeighboringTiles(y.tileID),y.abortController=new AbortController;try{let fe=yield v.getImage(ie,y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(fe?.data){let be=fe.data;this.map._refreshExpiredTiles&&(fe.cacheControl||fe.expires)&&y.setExpiryData({cacheControl:fe.cacheControl,expires:fe.expires});let Re=e.b(be)&&e.a0()?be:yield this.readImageNow(be),je={type:this.type,uid:y.uid,source:this.id,rawImageData:Re,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(y.actor&&y.state!=="expired"&&y.state!=="reloading")return;y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor()),y.dem=yield y.actor.sendAsync({type:"LDT",data:je}),y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0,y.state="loaded"}}catch(fe){if(delete y.abortController,y.aborted)y.state="unloaded";else if(fe)throw y.state="errored",fe}})}readImageNow(y){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.a1()){let N=y.width+2,ie=y.height+2;try{return new e.R({width:N,height:ie},yield e.a2(y,-1,-1,N,ie))}catch{}}return s.getImageData(y,1)})}_getNeighboringTiles(y){let N=y.canonical,ie=Math.pow(2,N.z),fe=(N.x-1+ie)%ie,be=N.x===0?y.wrap-1:y.wrap,Re=(N.x+1+ie)%ie,je=N.x+1===ie?y.wrap+1:y.wrap,Ze={};return Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y).key]={backfilled:!1},N.y>0&&(Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,y.wrap,N.z,N.x,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y-1).key]={backfilled:!1}),N.y+1be.key===ie);fe>-1&&pe.addOrUpdateProperties.splice(fe,1)}return(pe.removeAllProperties||y.removeAllProperties)&&(N.removeAllProperties=!0),(pe.removeProperties||y.removeProperties)&&(N.removeProperties=[...pe.removeProperties||[],...y.removeProperties||[]]),(pe.addOrUpdateProperties||y.addOrUpdateProperties)&&(N.addOrUpdateProperties=[...pe.addOrUpdateProperties||[],...y.addOrUpdateProperties||[]]),(pe.newGeometry||y.newGeometry)&&(N.newGeometry=y.newGeometry||pe.newGeometry),N}function Me(pe){var y,N;if(!pe)return{};let ie={};return ie.removeAll=pe.removeAll,ie.remove=new Set(pe.remove||[]),ie.add=new Map((y=pe.add)===null||y===void 0?void 0:y.map(fe=>[fe.id,fe])),ie.update=new Map((N=pe.update)===null||N===void 0?void 0:N.map(fe=>[fe.id,fe])),ie}function Se(pe){return pe&&pe.length!==0?typeof pe[0]=="number"?[pe]:pe.flatMap(y=>Se(y)):[]}function Ie(pe){return pe.type==="GeometryCollection"?pe.geometries.flatMap(y=>Ie(y)):Se(pe.coordinates)}function Ve(pe){let y=new q,N;switch(pe.type){case"FeatureCollection":N=pe.features.flatMap(ie=>Ie(ie.geometry));break;case"Feature":N=Ie(pe.geometry);break;default:N=Ie(pe)}if(N.length===0)return y;for(let ie of N){let[fe,be]=ie;y.extend([fe,be])}return y}class Ge extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:N.data},this.actor=ie.getActor(),this.setEventedParent(fe),this._data=typeof N.data=="string"?{url:N.data}:{geojson:N.data},this._options=e.e({},N),this._collectResourceTiming=N.collectResourceTiming,N.maxzoom!==void 0&&(this.maxzoom=N.maxzoom),N.type&&(this.type=N.type),N.attribution&&(this.attribution=N.attribution),this.promoteId=N.promoteId,N.clusterMaxZoom!==void 0&&this.maxzoom<=N.clusterMaxZoom&&e.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${N.clusterMaxZoom}".`),this.workerOptions=e.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(N.buffer!==void 0?N.buffer:128),tolerance:this._pixelsToTileUnits(N.tolerance!==void 0?N.tolerance:.375),extent:e.a6,maxZoom:this.maxzoom,lineMetrics:N.lineMetrics||!1,generateId:N.generateId||!1,promoteId:typeof N.promoteId=="string"?N.promoteId:void 0,cluster:N.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(N.clusterMaxZoom),minPoints:Math.max(2,N.clusterMinPoints||2),extent:e.a6,radius:this._pixelsToTileUnits(N.clusterRadius||50),log:!1,generateId:N.generateId||!1}},clusterProperties:N.clusterProperties,filter:N.filter},N.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(y){return y*(e.a6/this.tileSize)}_getClusterMaxZoom(y){let N=y?Math.round(y):this.maxzoom-1;return Number.isInteger(y)||y===void 0||e.w(`Integer expected for option 'clusterMaxZoom': provided value "${y}" rounded to "${N}"`),N}load(){return e._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(y){this.map=y,this.load()}setData(y,N){this._data=typeof y=="string"?{url:y}:{geojson:y},this._pendingWorkerUpdate={data:y};let ie=this._updateWorkerData();return N?ie:this}updateData(y,N){this._pendingWorkerUpdate.diff=function(fe,be){if(!fe)return be||{};if(!be)return fe||{};let Re=Me(fe),je=Me(be);(function(ut,ft){ft.removeAll&&(ut.add.clear(),ut.update.clear(),ut.remove.clear(),ft.remove.clear());for(let Dt of ft.remove)ut.add.delete(Dt),ut.update.delete(Dt);for(let[Dt,Gt]of ft.update){let Kt=ut.update.get(Dt);Kt&&(ft.update.set(Dt,we(Kt,Gt)),ut.update.delete(Dt))}})(Re,je);let Ze={};if((Re.removeAll||je.removeAll)&&(Ze.removeAll=!0),Ze.remove=new Set([...Re.remove,...je.remove]),Ze.add=new Map([...Re.add,...je.add]),Ze.update=new Map([...Re.update,...je.update]),Ze.remove.size&&Ze.add.size)for(let ut of Ze.add.keys())Ze.remove.delete(ut);return function(ut){let ft={};return ut.removeAll&&(ft.removeAll=ut.removeAll),ut.remove&&(ft.remove=Array.from(ut.remove)),ut.add&&(ft.add=Array.from(ut.add.values())),ut.update&&(ft.update=Array.from(ut.update.values())),ft}(Ze)}(this._pendingWorkerUpdate.diff,y);let ie=this._updateWorkerData();return N?ie:this}getData(){return e._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return e._(this,void 0,void 0,function*(){return Ve(yield this.getData())})}setClusterOptions(y){return this.workerOptions.geojsonVtOptions.cluster=y.cluster,y.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(y.clusterRadius)),y.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(y.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(y){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:y,source:this.id}})}getClusterChildren(y){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:y,source:this.id}})}getClusterLeaves(y,N,ie){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:y,limit:N,offset:ie}})}_updateWorkerData(){return e._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void e.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:y,diff:N,updateCluster:ie}=this._pendingWorkerUpdate,fe=this._getLoadGeoJSONParameters(y,N,ie);y!==void 0?this._pendingWorkerUpdate.data=void 0:N?this._pendingWorkerUpdate.diff=void 0:ie&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(fe)})}_getLoadGeoJSONParameters(y,N,ie){return e._(this,void 0,void 0,function*(){let fe=e.e({type:this.type},this.workerOptions);return typeof y=="string"?(fe.request=yield this.map._requestManager.transformRequest(s.resolveURL(y),"Source"),fe.request.collectResourceTiming=this._collectResourceTiming,fe):y!==void 0?(fe.data=y,fe):N?(fe.dataDiff=N,fe):ie?(fe.updateCluster=!0,fe):void 0})}_dispatchWorkerUpdate(y){return e._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new e.n("dataloading",{dataType:"source"}));try{let N=yield y,ie=yield this.actor.sendAsync({type:"LD",data:N});if(this._isUpdatingWorker=!1,this._removed||ie.abandoned)return void this.fire(new e.n("dataabort",{dataType:"source"}));ie.data&&(this._data={geojson:ie.data});let fe=this._applyDiffToSource(N.dataDiff),be=this._getShouldReloadTileOptions(fe),Re={dataType:"source"};this._applyResourceTiming(Re,ie),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"metadata"}))),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"content",shouldReloadTileOptions:be})))}catch(N){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new e.n("dataabort",{dataType:"source"}));this.fire(new e.l(e.d(N)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(y,N){var ie;if(!this._collectResourceTiming)return;let fe=(ie=N.resourceTiming)===null||ie===void 0?void 0:ie[this.id];if(!fe)return;let be=fe.slice(0);be?.length&&e.e(y,{resourceTiming:be})}_applyDiffToSource(y){if(!y)return;let N=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let fe=function(be,Re){let je=new Map;if(be==null||be.type==null)return je;if(be.type==="Feature"){let Ze=xe(be,Re);return Ze==null?void 0:(je.set(Ze,be),je)}if(be.type==="FeatureCollection"){let Ze=new Set;for(let ut of be.features){let ft=xe(ut,Re);if(ft==null||Ze.has(ft))return;Ze.add(ft),je.set(ft,ut)}return je}}(this._data.geojson,N);if(!fe)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:fe}}if(!this._data.updateable)return;let ie=function(fe,be,Re){var je,Ze;let ut=[];if(be.removeAll)fe.clear();else if(be.remove)for(let ft of be.remove){let Dt=fe.get(ft);Dt&&(ut.push(Dt.geometry),fe.delete(ft))}if(be.add)for(let ft of be.add){let Dt=xe(ft,Re);if(Dt==null)continue;let Gt=fe.get(Dt);Gt&&ut.push(Gt.geometry),ut.push(ft.geometry),fe.set(Dt,ft)}if(be.update)for(let ft of be.update){let Dt=fe.get(ft.id);if(!Dt)continue;let Gt=!!ft.newGeometry,Kt=ft.removeAllProperties||((je=ft.removeProperties)===null||je===void 0?void 0:je.length)>0||((Ze=ft.addOrUpdateProperties)===null||Ze===void 0?void 0:Ze.length)>0;if(!Gt&&!Kt)continue;ut.push(Dt.geometry);let st=Object.assign({},Dt);if(fe.set(ft.id,st),Gt&&(ut.push(ft.newGeometry),st.geometry=ft.newGeometry),Kt){if(st.properties=ft.removeAllProperties?{}:Object.assign({},st.properties||{}),ft.removeProperties)for(let It of ft.removeProperties)delete st.properties[It];if(ft.addOrUpdateProperties)for(let{key:It,value:Ut}of ft.addOrUpdateProperties)st.properties[It]=Ut}}return ut}(this._data.updateable,y,N);return y.removeAll||this._options.cluster?void 0:ie}_getShouldReloadTileOptions(y){if(y)return{affectedBounds:y.filter(Boolean).map(N=>Ve(N))}}shouldReloadTile(y,{affectedBounds:N}){if(y.state==="loading")return!0;if(y.state==="unloaded")return!1;let{buffer:ie,extent:fe}=this.workerOptions.geojsonVtOptions,be=function({x:Re,y:je,z:Ze},ut=0){let ft=e.a4((Re-ut)/Math.pow(2,Ze)),Dt=e.a5((je+1+ut)/Math.pow(2,Ze)),Gt=e.a4((Re+1+ut)/Math.pow(2,Ze)),Kt=e.a5((je-ut)/Math.pow(2,Ze));return new q([ft,Dt],[Gt,Kt])}(y.tileID.canonical,ie/fe);for(let Re of N)if(be.intersects(Re))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.actor?"RT":"LT";y.actor=this.actor;let ie={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};y.abortController=new AbortController;let fe=yield this.actor.sendAsync({type:N,data:ie},y.abortController);delete y.abortController,y.unloadVectorData(),y.aborted||y.loadVectorData(fe,this.map.painter,N==="RT")})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.aborted=!0})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:y.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 e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class ke extends e.E{constructor(y,N,ie,fe){super(),this.flippedWindingOrder=!1,this.id=y,this.dispatcher=ie,this.coordinates=N.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(fe),this.options=N}load(y){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let N=yield v.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,N?.data&&(this.image=N.data,y&&(this.coordinates=y),this._finishLoading())}catch(N){this._request=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}updateImage(y){return y.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=y.url,this.load(y.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(y){this.map=y,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(y){this.coordinates=y;let N=y.map(e.a7.fromLngLat);var ie;return this.tileID=function(fe){let be=e.a8.fromPoints(fe),Re=be.width(),je=be.height(),Ze=Math.max(Re,je),ut=Math.max(0,Math.floor(-Math.log(Ze)/Math.LN2)),ft=Math.pow(2,ut);return new e.aa(ut,Math.floor((be.minX+be.maxX)/2*ft),Math.floor((be.minY+be.maxY)/2*ft))}(N),this.terrainTileRanges=this._getOverlappingTileRanges(N),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=N.map(fe=>this.tileID.getTilePoint(fe)._round()),this.flippedWindingOrder=((ie=this.tileCoords)[1].x-ie[0].x)*(ie[2].y-ie[0].y)-(ie[1].y-ie[0].y)*(ie[2].x-ie[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let y=this.map.painter.context,N=y.gl;this.texture||(this.texture=new e.T(y,this.image,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(y){return e._(this,void 0,void 0,function*(){var N;!((N=this.tileID)===null||N===void 0)&&N.equals(y.tileID.canonical)?(this.tiles[String(y.tileID.wrap)]=y,y.buckets={}):y.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(y){let{minX:N,minY:ie,maxX:fe,maxY:be}=e.a8.fromPoints(y),Re={};for(let je=0;je<=e.a9;je++){let Ze=Math.pow(2,je),ut=Math.floor(N*Ze),ft=Math.floor(ie*Ze),Dt=Math.floor(fe*Ze),Gt=Math.floor(be*Ze),Kt=(ut%Ze+Ze)%Ze,st=Dt%Ze,It=Math.floor(ut/Ze),Ut=Math.floor(Dt/Ze);Re[je]={minWrap:It,maxWrap:Ut,minTileXWrapped:Kt,maxTileXWrapped:st,minTileY:ft,maxTileY:Gt}}return Re}}class _e extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),this._onPlayingHandler=()=>{var be;(be=this.map)===null||be===void 0||be.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=N}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let y=this.options;this.urls=[];for(let N of y.urls)this.urls.push((yield this.map._requestManager.transformRequest(N,"Source")).url);try{let N=yield e.ab(this.urls);if(this._loaded=!0,!N)return;this.video=N,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(N){this.fire(new e.l(e.d(N)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(y){if(this.video){let N=this.video.seekable;yN.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${N.start(0)} and ${N.end(0)}-second mark.`))):this.video.currentTime=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let y=this.map.painter.context,N=y.gl;this.texture?this.video.paused||(this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE),N.texSubImage2D(N.TEXTURE_2D,0,0,0,N.RGBA,N.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(y,this.video,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("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 ce extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),N.coordinates?Array.isArray(N.coordinates)&&N.coordinates.length===4&&!N.coordinates.some(be=>!Array.isArray(be)||be.length!==2||be.some(Re=>typeof Re!="number"))||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "coordinates"'))),N.animate&&typeof N.animate!="boolean"&&this.fire(new e.l(new e.ac(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),N.canvas?typeof N.canvas=="string"||N.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${y}`,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.l(new e.ac(`sources.${y}`,null,'missing required property "canvas"'))),this.options=N,this.animate=N.animate===void 0||N.animate}load(){return e._(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 e.l(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(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let N=this.map.painter.context,ie=N.gl;this.texture?(y||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(N,this.canvas,ie.RGBA,{premultiply:!0}),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let fe=!1;for(let be in this.tiles){let Re=this.tiles[be];Re.state!=="loaded"&&(Re.state="loaded",Re.texture=this.texture,fe=!0)}fe&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}}let ve={},le=pe=>{switch(pe){case"geojson":return Ge;case"image":return ke;case"raster":return ae;case"raster-dem":return he;case"vector":return ee;case"video":return _e;case"canvas":return ce}return ve[pe]},Ae="RTLPluginLoaded";class Be extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=se()}_syncState(y){return this.status=y,this.dispatcher.broadcast("SRPS",{pluginStatus:y,pluginURL:this.url}).catch(N=>{throw this.status="error",N})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(y){return e._(this,arguments,void 0,function*(N,ie=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(N),!this.url)throw new Error(`requested url ${N} is invalid`);if(this.status==="unavailable"){if(!ie)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(Ae))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Xe=null;function Ye(){return Xe||(Xe=new Be),Xe}var yt,gt;(function(pe){pe[pe.Base=0]="Base",pe[pe.Parent=1]="Parent"})(yt||(yt={})),function(pe){pe[pe.Departing=0]="Departing",pe[pe.Incoming=1]="Incoming"}(gt||(gt={}));class Tt{constructor(y,N){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=y,this.uid=e.ad(),this.uses=0,this.tileSize=N,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(y){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(y||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:y,fadingDirection:N,fadingParentID:ie,fadeEndTime:fe}){this.resetFadeLogic(),this.fadingRole=y,this.fadingDirection=N,this.fadingParentID=ie,this.fadeEndTime=fe}setSelfFadeLogic(y){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=y}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=m(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(y){this.demTexture&&y.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(y,N,ie){if(y?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",y){y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestEncoding=y.encoding,this.latestFeatureIndex.rawTileData=y.rawTileData,this.latestFeatureIndex.encoding=y.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=function(fe,be){let Re={};if(!be)return Re;for(let je of fe){let Ze=je.layerIds.map(ut=>be.getLayer(ut)).filter(Boolean);if(Ze.length!==0){je.layers=Ze,je.stateDependentLayerIds&&(je.stateDependentLayers=je.stateDependentLayerIds.map(ut=>Ze.filter(ft=>ft.id===ut)[0]));for(let ut of Ze)Re[ut.id]=je}}return Re}(y.buckets,N?.style),this.hasSymbolBuckets=!1;for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af){if(this.hasSymbolBuckets=!0,!ie)break;be.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af&&be.hasRTLText){this.hasRTLText=!0,Ye().lazyLoad();break}}this.queryPadding=0;for(let fe in this.buckets){let be=this.buckets[fe];this.queryPadding=Math.max(this.queryPadding,N.style.getLayer(fe).queryRadius(be))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage),this.dashPositions=y.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(let y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(y){return this.buckets[y.id]}upload(y){for(let ie in this.buckets){let fe=this.buckets[ie];fe.uploadPending()&&fe.upload(y)}let N=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(y,this.imageAtlas.image,N.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(y,this.glyphAtlasImage,N.ALPHA),this.glyphAtlasImage=null)}prepare(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)}queryRenderedFeatures(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt){var Gt;return!((Gt=this.latestFeatureIndex)===null||Gt===void 0)&&Gt.rawTileData?this.latestFeatureIndex.query({queryGeometry:fe,cameraQueryGeometry:be,scale:Re,tileSize:this.tileSize,pixelPosMatrix:ft,transform:Ze,params:je,queryPadding:this.queryPadding*ut,getElevation:Dt},y,N,ie):{}}querySourceFeatures(y,N){let ie=this.latestFeatureIndex;if(!ie?.rawTileData)return;let fe=ie.loadVTLayers(),be=N?.sourceLayer?N.sourceLayer:"",Re=fe[e.ag]||fe[be];if(!Re)return;let je=e.ah(N?.filter,N?.globalState),{z:Ze,x:ut,y:ft}=this.tileID.canonical,Dt={z:Ze,x:ut,y:ft};for(let Gt=0;Gtie)fe=!1;else if(N)if(this.expirationTime({zoom:0,x:0,y:0,wrap:vr,fullyVisible:!1}),Ar=[],hr=[];if(pe.renderWorldCopies&&Re.allowWorldCopies())for(let vr=1;vr<=3;vr++)Ar.push(dr(-vr)),Ar.push(dr(vr));for(Ar.push(dr(0));Ar.length>0;){let vr=Ar.pop(),Or=vr.x,Cr=vr.y,ta=vr.fullyVisible,ka={x:Or,y:Cr,z:vr.zoom},Ta=Re.getTileBoundingVolume(ka,vr.wrap,pe.elevation,y);if(!ta){let ga=ht(N,Ta,ie);if(ga===0)continue;ta=ga===2}let Ra=Re.distanceToTile2d(fe.x,fe.y,ka,Ta),ua=Ze;je&&(ua=(y.calculateTileZoom||We)(pe.zoom+e.ar(pe.tileSize/y.tileSize),Ra,Ut,ir,pe.fov)),ua=(y.roundZoom?Math.round:Math.floor)(ua),ua=Math.max(0,ua);let ia=Math.min(ua,ft);if(vr.wrap=Re.getWrap(be,ka,vr.wrap),vr.zoom>=ia){if(vr.zoom>1),wrap:vr.wrap,fullyVisible:ta})}return hr.sort((vr,Or)=>vr.distanceSq-Or.distanceSq).map(vr=>vr.tileID)}let et=e.a8.fromPoints([new e.P(0,0),new e.P(e.a6,e.a6)]);function Mt(pe){return pe==="raster"||pe==="image"||pe==="video"}function pt(pe,y,N,ie,fe,be,Re){if(!y.hasData())return!1;let{tileID:je,fadingRole:Ze,fadingDirection:ut,fadingParentID:ft}=y;if(Ze===yt.Base&&ut===gt.Incoming&&ft)return N[ft.key]=ft,!0;let Dt=Math.max(je.overscaledZ-fe,be);for(let Gt=je.overscaledZ-1;Gt>=Dt;Gt--){let Kt=je.scaledTo(Gt),st=pe.getLoadedTile(Kt);if(st)return y.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Incoming,fadingParentID:st.tileID,fadeEndTime:ie+Re}),st.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Departing,fadeEndTime:ie+Re}),N[Kt.key]=Kt,!0}return!1}function Pt(pe,y,N,ie,fe,be){if(!y.hasData())return!1;let Re=y.tileID.children(fe),je=Ct(pe,y,Re,N,ie,fe,be);if(je)return!0;for(let Ze of Re)Ct(pe,y,Ze.children(fe),N,ie,fe,be)&&(je=!0);return je}function Ct(pe,y,N,ie,fe,be,Re){if(N[0].overscaledZ>=be)return!1;let je=!1;for(let Ze of N){let ut=pe.getLoadedTile(Ze);if(!ut)continue;let{fadingRole:ft,fadingDirection:Dt,fadingParentID:Gt}=ut;ft===yt.Base&&Dt===gt.Departing&&Gt||(ut.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Departing,fadingParentID:y.tileID,fadeEndTime:fe+Re}),y.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Incoming,fadeEndTime:fe+Re})),ie[Ze.key]=Ze,je=!0}return je}function qt(pe,y,N,ie){let fe=pe.tileID;return!!pe.selfFading||!pe.hasData()&&!!y.has(fe)&&(pe.setSelfFadeLogic(N+ie),!0)}function Vt(pe,y){var N;pe.needsHillshadePrepare=!0,pe.needsTerrainPrepare=!0;let ie=y.tileID.canonical.x-pe.tileID.canonical.x,fe=y.tileID.canonical.y-pe.tileID.canonical.y,be=Math.pow(2,pe.tileID.canonical.z),Re=y.tileID.key;ie===0&&fe===0||Math.abs(fe)>1||(Math.abs(ie)>1&&(Math.abs(ie+be)===1?ie+=be:Math.abs(ie-be)===1&&(ie-=be)),y.dem&&pe.dem&&(pe.dem.backfillBorder(y.dem,ie,fe),!((N=pe.neighboringTiles)===null||N===void 0)&&N[Re]&&(pe.neighboringTiles[Re].backfilled=!0)))}class Ht{constructor(){this._tiles={}}handleWrapJump(y){let N={};for(let ie in this._tiles){let fe=this._tiles[ie];fe.tileID=fe.tileID.unwrapTo(fe.tileID.wrap+y),N[fe.tileID.key]=fe}this._tiles=N}setFeatureState(y,N){for(let ie in this._tiles)this._tiles[ie].setFeatureState(y,N)}getAllTiles(){return Object.values(this._tiles)}getAllIds(y=!1){return y?Object.values(this._tiles).map(N=>N.tileID).sort(e.au).map(N=>N.key):Object.keys(this._tiles)}getTileById(y){return this._tiles[y]}setTile(y,N){this._tiles[y]=N}deleteTileById(y){delete this._tiles[y]}getLoadedTile(y){let N=this.getTileById(y.key);return N?.hasData()?N:null}isIdRenderable(y,N=!1){var ie;return(ie=this.getTileById(y))===null||ie===void 0?void 0:ie.isRenderable(N)}getRenderableIds(y=0,N){let ie=[];for(let fe of this.getAllIds())this.isIdRenderable(fe,N)&&ie.push(this.getTileById(fe));return N?ie.sort((fe,be)=>{let Re=fe.tileID,je=be.tileID,Ze=new e.P(Re.canonical.x,Re.canonical.y)._rotate(-y),ut=new e.P(je.canonical.x,je.canonical.y)._rotate(-y);return Re.overscaledZ-je.overscaledZ||ut.y-Ze.y||ut.x-Ze.x}).map(fe=>fe.tileID.key):ie.map(fe=>fe.tileID).sort(e.au).map(fe=>fe.key)}}class Sr extends e.E{constructor(y,N,ie){super(),this.id=y,this.dispatcher=ie,this.on("data",fe=>{this._dataHandler(fe)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((fe,be,Re,je)=>{let Ze=new(le(be.type))(fe,be,Re,je);if(Ze.id!==fe)throw new Error(`Expected Source id to be ${fe} instead of ${Ze.id}`);return Ze})(y,N,ie,this),this._inViewTiles=new Ht,this._outOfViewCache=new e.av(0,fe=>this._unloadTile(fe)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new At,this._didEmitContent=!1,this._updated=!1}onAdd(y){var N;this.map=y,this._maxTileCacheSize=y?y._maxTileCacheSize:null,this._maxTileCacheZoomLevels=y?y._maxTileCacheZoomLevels:null,!((N=this._source)===null||N===void 0)&&N.onAdd&&this._source.onAdd(y)}onRemove(y){var N;for(let ie of this._inViewTiles.getAllTiles())ie.unloadVectorData();this.clearTiles(),!((N=this._source)===null||N===void 0)&&N.onRemove&&this._source.onRemove(y),this._inViewTiles=new Ht}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 y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let y=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,y&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(y,N,ie){return e._(this,void 0,void 0,function*(){try{let fe=yield this._source.loadTile(y);this._tileLoaded(y,N,ie,fe)}catch(fe){y.state="errored",fe.status!==404?this._source.fire(new e.l(e.d(fe),{tile:y})):this.update(this.transform,this.terrain)}})}_unloadTile(y){this._source.unloadTile&&this._source.unloadTile(y)}_abortTile(y){this._source.abortTile&&this._source.abortTile(y),this._source.fire(new e.n("dataabort",{tile:y,coord:y.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(y){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let N of this._inViewTiles.getAllTiles())N.upload(y),N.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(y){var N;return this._inViewTiles.getRenderableIds((N=this.transform)===null||N===void 0?void 0:N.bearingInRadians,y)}hasRenderableParent(y){let N=y.overscaledZ-1;if(N>=this._source.minzoom){let ie=this.getLoadedTile(y.scaledTo(N));if(ie)return this._inViewTiles.isIdRenderable(ie.tileID.key)}return!1}reload(y,N=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let ie of this._inViewTiles.getAllIds()){let fe=this._inViewTiles.getTileById(ie);N&&!this._source.shouldReloadTile(fe,N)||(y?this._reloadTile(ie,"expired"):fe.state!=="errored"&&this._reloadTile(ie,"reloading"))}}}_reloadTile(y,N){return e._(this,void 0,void 0,function*(){let ie=this._inViewTiles.getTileById(y);ie&&(ie.state!=="loading"&&(ie.state=N),yield this._loadTile(ie,y,N))})}_tileLoaded(y,N,ie,fe){y.timeAdded=m(),y.selfFading&&(y.fadeEndTime=y.timeAdded+this._rasterFadeDuration),ie==="expired"&&(y.refreshedUponExpiration=!0),this._setTileReloadTimer(N,y),fe?.unmodified||(this.getSource().type==="raster-dem"&&y.dem&&function(be,Re){var je,Ze,ut;let ft=Re.getRenderableIds();for(let Dt of ft){if(!(!((je=be.neighboringTiles)===null||je===void 0)&&je[Dt]))continue;let Gt=Re.getTileById(Dt);be.neighboringTiles[Dt].backfilled||Vt(be,Gt),!((ut=(Ze=Gt.neighboringTiles)===null||Ze===void 0?void 0:Ze[be.tileID.key])===null||ut===void 0)&&ut.backfilled||Vt(Gt,be)}}(y,this._inViewTiles),this._state.initializeTileState(y,this.map?this.map.painter:null),y.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:y,coord:y.tileID})))}getTile(y){return this.getTileByID(y.key)}getTileByID(y){return this._inViewTiles.getTileById(y)}_retainLoadedChildren(y,N){let ie=this._getLoadedDescendents(N),fe=new Set;for(let be of N){let Re=ie[be.key];if(!Re?.length){fe.add(be);continue}let je=be.overscaledZ+Sr.maxOverzooming,Ze=Re.filter(Dt=>Dt.tileID.overscaledZ<=je);if(!Ze.length){fe.add(be);continue}let ut=Math.min(...Ze.map(Dt=>Dt.tileID.overscaledZ)),ft=Ze.filter(Dt=>Dt.tileID.overscaledZ===ut).map(Dt=>Dt.tileID);for(let Dt of ft)y[Dt.key]=Dt;this._areDescendentsComplete(ft,ut,be.overscaledZ)||fe.add(be)}return fe}_getLoadedDescendents(y){var N;let ie={};for(let fe of this._inViewTiles.getAllTiles().filter(be=>be.hasData()))for(let be of y)fe.tileID.isChildOf(be)&&(ie[N=be.key]||(ie[N]=[]),ie[be.key].push(fe));return ie}_areDescendentsComplete(y,N,ie){return y.length===1&&y[0].isOverscaled()?y[0].overscaledZ===N:Math.pow(4,N-ie)===y.length}getLoadedTile(y){return this._inViewTiles.getLoadedTile(y)}updateCacheSize(y){let N=Math.ceil(y.width/this._source.tileSize)+1,ie=Math.ceil(y.height/this._source.tileSize)+1,fe=Math.floor(N*ie*(this._maxTileCacheZoomLevels===null?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),be=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,fe):fe;this._outOfViewCache.setMaxSize(be)}handleWrapJump(y){let N=Math.round((y-(this._prevLng===void 0?y:this._prevLng))/360);this._prevLng=y,N&&(this._inViewTiles.handleWrapJump(N),this._resetTileReloadTimers())}update(y,N){if(!this._sourceLoaded||this._paused)return;let ie;this.transform=y,this.terrain=N,this.updateCacheSize(y),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?ie=y.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ze=>new e.a3(Ze.canonical.z,Ze.wrap,Ze.canonical.z,Ze.canonical.x,Ze.canonical.y)):(ie=Je(y,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?y.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:N,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(ie=ie.filter(Ze=>this._source.hasTile(Ze)))):ie=[],this.usedForTerrain&&(ie=this._addTerrainIdealTiles(ie));let fe=ie.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,fe&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let be=Ke(y,this._source),Re=this._updateRetainedTiles(ie,be),je=Mt(this._source.type);je&&this._rasterFadeDuration>0&&!N&&function(Ze,ut,ft,Dt,Gt,Kt,st){let It=m(),Ut=e.at(ut);for(let ir of ut){let dr=Ze.getTileById(ir.key);dr.fadingDirection!==gt.Departing&&dr.fadeOpacity!==0||dr.resetFadeLogic(),pt(Ze,dr,ft,It,Dt,Gt,st)||Pt(Ze,dr,ft,It,Kt,st)||qt(dr,Ut,It,st)||dr.resetFadeLogic()}}(this._inViewTiles,ie,Re,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),je?this._cleanUpRasterTiles(Re):this._cleanUpVectorTiles(Re)}_cleanUpRasterTiles(y){for(let N of this._inViewTiles.getAllIds())y[N]||this._removeTile(N)}_cleanUpVectorTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);y[N]?ie.clearSymbolFadeHold():ie.hasSymbolBuckets?ie.holdingForSymbolFade()?ie.symbolFadeFinished()&&this._removeTile(N):ie.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(N)}}_addTerrainIdealTiles(y){let N=[];for(let ie of y)if(ie.canonical.z>this._source.minzoom){let fe=ie.scaledTo(ie.canonical.z-1);N.push(fe);let be=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));N.push(be)}return y.concat(N)}releaseSymbolFadeTiles(){for(let y of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(y).holdingForSymbolFade()&&this._removeTile(y)}_updateRetainedTiles(y,N){var ie;let fe=new Set;for(let ut of y)this._addTile(ut).hasData()||fe.add(ut);let be=y.reduce((ut,ft)=>(ut[ft.key]=ft,ut),{}),Re=this._retainLoadedChildren(be,fe),je={},Ze=Math.max(N-Sr.maxUnderzooming,this._source.minzoom);for(let ut of Re){let ft=this._inViewTiles.getTileById(ut.key),Dt=ft?.wasRequested();for(let Gt=ut.overscaledZ-1;Gt>=Ze;--Gt){let Kt=ut.scaledTo(Gt);if(je[Kt.key])break;if(je[Kt.key]=!0,ft=this.getTile(Kt),!ft&&Dt&&(ft=this._addTile(Kt)),ft){let st=ft.hasData();if((st||!(!((ie=this.map)===null||ie===void 0)&&ie.cancelPendingTileRequestsWhileZooming)||Dt)&&(be[Kt.key]=Kt),Dt=ft.wasRequested(),st)break}}}return be}_addTile(y){let N=this._inViewTiles.getTileById(y.key);if(N)return N;N=this._outOfViewCache.getAndRemove(y),N&&(N.resetFadeLogic(),this._setTileReloadTimer(y.key,N),N.tileID=y,this._state.initializeTileState(N,this.map?this.map.painter:null));let ie=N;return N||(N=new Tt(y,this._source.tileSize*y.overscaleFactor()),this._loadTile(N,y.key,N.state)),N.uses++,this._inViewTiles.setTile(y.key,N),ie||this._source.fire(new e.n("dataloading",{tile:N,coord:N.tileID,dataType:"source"})),N}_setTileReloadTimer(y,N){this._clearTileReloadTimer(y);let ie=N.getExpiryTimeout();ie&&(this._timers[y]=setTimeout(()=>{this._reloadTile(y,"expired"),delete this._timers[y]},ie))}_clearTileReloadTimer(y){let N=this._timers[y];N&&(clearTimeout(N),delete this._timers[y])}_resetTileReloadTimers(){for(let y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(let y of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(y);this._setTileReloadTimer(y,N)}}refreshTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);(this._inViewTiles.isIdRenderable(N)||ie.state=="errored")&&y.some(fe=>fe.equals(ie.tileID.canonical))&&this._reloadTile(N,"expired")}}_removeTile(y){let N=this._inViewTiles.getTileById(y);N&&(N.uses--,this._inViewTiles.deleteTileById(y),this._clearTileReloadTimer(y),N.uses>0||(N.hasData()&&N.state!=="reloading"?this._outOfViewCache.add(N.tileID,N,N.getExpiryTimeout()):(N.aborted=!0,this._abortTile(N),this._unloadTile(N))))}_dataHandler(y){y.dataType==="source"&&(y.sourceDataType!=="metadata"?y.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(y.sourceDataChanged,y.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let y of this._inViewTiles.getAllIds())this._removeTile(y);this._outOfViewCache.reset()}tilesIn(y,N,ie){let fe=[],be=this.transform;if(!be)return fe;let Re=be.getCoveringTilesDetailsProvider().allowWorldCopies(),je=ie?be.getCameraQueryGeometry(y):y,Ze=Kt=>be.screenPointToMercatorCoordinate(Kt,this.terrain),ut=this.transformBbox(y,Ze,!Re),ft=this.transformBbox(je,Ze,!Re),Dt=this.getIds(),Gt=e.a8.fromPoints(ft);for(let Kt of Dt){let st=this._inViewTiles.getTileById(Kt);if(st.holdingForSymbolFade())continue;let It=Re?[st.tileID]:[st.tileID.unwrapTo(-1),st.tileID.unwrapTo(0)],Ut=Math.pow(2,be.zoom-st.tileID.overscaledZ),ir=N*st.queryPadding*e.a6/st.tileSize/Ut;for(let dr of It){let Ar=Gt.map(hr=>dr.getTilePoint(new e.a7(hr.x,hr.y)));if(Ar.expandBy(ir),Ar.intersects(et)){let hr=ut.map(Or=>dr.getTilePoint(Or)),vr=ft.map(Or=>dr.getTilePoint(Or));fe.push({tile:st,tileID:Re?dr:dr.unwrapTo(0),queryGeometry:hr,cameraQueryGeometry:vr,scale:Ut})}}}return fe}transformBbox(y,N,ie){let fe=y.map(N);if(ie){let be=e.a8.fromPoints(y);be.shrinkBy(.001*Math.min(be.width(),be.height()));let Re=be.map(N);e.a8.fromPoints(fe).covers(Re)||(fe=fe.map(je=>je.x>.5?new e.a7(je.x-1,je.y,je.z):je))}return fe}getVisibleCoordinates(y){let N=this.getRenderableIds(y).map(ie=>this._inViewTiles.getTileById(ie).tileID);return this.transform&&this.transform.populateCache(N),N}hasTransition(){return!!this._source.hasTransition()||Mt(this._source.type)&&function(y,N){if(N<=0)return!1;let ie=m();for(let fe of y.getAllTiles())if(fe.fadeEndTime>=ie)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(y){this._rasterFadeDuration=y}setFeatureState(y,N,ie){y||(y=e.ag),this._state.updateState(y,N,ie)}removeFeatureState(y,N,ie){y||(y=e.ag),this._state.removeFeatureState(y,N,ie)}getFeatureState(y,N){return y||(y=e.ag),this._state.getState(y,N)}setDependencies(y,N,ie){let fe=this._inViewTiles.getTileById(y);fe&&fe.setDependencies(N,ie)}reloadTilesForDependencies(y,N){for(let ie of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(ie).hasDependency(y,N)&&this._reloadTile(ie,"reloading");this._outOfViewCache.filter(ie=>!ie.hasDependency(y,N))}areTilesLoaded(){for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}}Sr.maxUnderzooming=10,Sr.maxOverzooming=3;class Kr{constructor(y,N){this.reset(y,N)}reset(y,N){this.points=y||[],this._distances=[0];for(let ie=1;ie0?(fe-Re)/je:0;return this.points[be].mult(1-Ze).add(this.points[N].mult(Ze))}}function Yt(pe,y){let N=!0;return pe==="always"||pe!=="never"&&y!=="never"||(N=!1),N}class Rt{constructor(y,N,ie){let fe=this.boxCells=[],be=this.circleCells=[];this.xCellCount=Math.ceil(y/ie),this.yCellCount=Math.ceil(N/ie);for(let Re=0;Rethis.width||fe<0||N>this.height)return[];let Ze=[];if(y<=0&&N<=0&&this.width<=ie&&this.height<=fe){if(be)return[{key:null,x1:y,y1:N,x2:ie,y2:fe}];for(let ut=0;ut0}hitTestCircle(y,N,ie,fe,be){let Re=y-ie,je=y+ie,Ze=N-ie,ut=N+ie;if(je<0||Re>this.width||ut<0||Ze>this.height)return!1;let ft=[];return this._forEachCell(Re,Ze,je,ut,this._queryCellCircle,ft,{hitTest:!0,overlapMode:fe,circle:{x:y,y:N,radius:ie},seenUids:{box:{},circle:{}}},be),ft.length>0}_queryCell(y,N,ie,fe,be,Re,je,Ze){let{seenUids:ut,hitTest:ft,overlapMode:Dt}=je,Gt=this.boxCells[be],Kt=1e-6;if(Gt!==null){let It=this.bboxes;for(let Ut of Gt)if(!ut.box[Ut]){ut.box[Ut]=!0;let ir=4*Ut,dr=this.boxKeys[Ut];if(y<=It[ir+2]+Kt&&N<=It[ir+3]+Kt&&ie>=It[ir+0]-Kt&&fe>=It[ir+1]-Kt&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))&&(Re.push({key:dr,x1:It[ir],y1:It[ir+1],x2:It[ir+2],y2:It[ir+3]}),ft))return!0}}let st=this.circleCells[be];if(st!==null){let It=this.circles;for(let Ut of st)if(!ut.circle[Ut]){ut.circle[Ut]=!0;let ir=3*Ut,dr=this.circleKeys[Ut];if(this._circleAndRectCollide(It[ir],It[ir+1],It[ir+2],y,N,ie,fe)&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))){let Ar=It[ir],hr=It[ir+1],vr=It[ir+2];if(Re.push({key:dr,x1:Ar-vr,y1:hr-vr,x2:Ar+vr,y2:hr+vr}),ft)return!0}}}return!1}_queryCellCircle(y,N,ie,fe,be,Re,je,Ze){let{circle:ut,seenUids:ft,overlapMode:Dt}=je,Gt=this.boxCells[be];if(Gt!==null){let st=this.bboxes;for(let It of Gt)if(!ft.box[It]){ft.box[It]=!0;let Ut=4*It,ir=this.boxKeys[It];if(this._circleAndRectCollide(ut.x,ut.y,ut.radius,st[Ut+0],st[Ut+1],st[Ut+2],st[Ut+3])&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}let Kt=this.circleCells[be];if(Kt!==null){let st=this.circles;for(let It of Kt)if(!ft.circle[It]){ft.circle[It]=!0;let Ut=3*It,ir=this.circleKeys[It];if(this._circlesCollide(st[Ut],st[Ut+1],st[Ut+2],ut.x,ut.y,ut.radius)&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}}_forEachCell(y,N,ie,fe,be,Re,je,Ze){let ut=this._convertToXCellCoord(y),ft=this._convertToYCellCoord(N),Dt=this._convertToXCellCoord(ie),Gt=this._convertToYCellCoord(fe);for(let Kt=ut;Kt<=Dt;Kt++)for(let st=ft;st<=Gt;st++)if(be.call(this,y,N,ie,fe,this.xCellCount*st+Kt,Re,je,Ze))return}_convertToXCellCoord(y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(y*this.xScale)))}_convertToYCellCoord(y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(y*this.yScale)))}_circlesCollide(y,N,ie,fe,be,Re){let je=fe-y,Ze=be-N,ut=ie+Re;return ut*ut>je*je+Ze*Ze}_circleAndRectCollide(y,N,ie,fe,be,Re,je){let Ze=(Re-fe)/2,ut=Math.abs(y-(fe+Ze));if(ut>Ze+ie)return!1;let ft=(je-be)/2,Dt=Math.abs(N-(be+ft));if(Dt>ft+ie)return!1;if(ut<=Ze||Dt<=ft)return!0;let Gt=ut-Ze,Kt=Dt-ft;return Gt*Gt+Kt*Kt<=ie*ie}}function nr(pe,y){let N=1/(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]),ie=1/(y[8]*y[8]+y[9]*y[9]+y[10]*y[10]),fe=y[0]*N,be=y[4]*N,Re=y[8]*ie,je=y[1]*N,Ze=y[5]*N,ut=y[9]*ie,ft=y[2]*N,Dt=y[6]*N,Gt=y[10]*ie;pe[0]=fe,pe[1]=be,pe[2]=Re,pe[4]=je,pe[5]=Ze,pe[6]=ut,pe[8]=ft,pe[9]=Dt,pe[10]=Gt;let Kt=y[12],st=y[13],It=y[14];return pe[12]=-fe*Kt-je*st-ft*It,pe[13]=-be*Kt-Ze*st-Dt*It,pe[14]=-Re*Kt-ut*st-Gt*It,pe[3]=0,pe[7]=0,pe[11]=0,pe[15]=1,pe}let ur=e.O();function cr(pe,y,N){let ie=e.O();if(!pe){let{vecSouth:Dt,vecEast:Gt}=Qr(y),Kt=n();Kt[0]=Gt[0],Kt[1]=Gt[1],Kt[2]=Dt[0],Kt[3]=Dt[1],fe=Kt,(ft=(Re=(be=Kt)[0])*(ut=be[3])-(Ze=be[2])*(je=be[1]))&&(fe[0]=ut*(ft=1/ft),fe[1]=-je*ft,fe[2]=-Ze*ft,fe[3]=Re*ft),ie[0]=Kt[0],ie[1]=Kt[1],ie[4]=Kt[2],ie[5]=Kt[3]}var fe,be,Re,je,Ze,ut,ft;return e.S(ie,ie,[1/N,1/N,1]),ie}function Rr(pe,y,N,ie){if(pe){let fe=e.O();if(!y){let{vecSouth:be,vecEast:Re}=Qr(N);fe[0]=Re[0],fe[1]=Re[1],fe[4]=be[0],fe[5]=be[1]}return e.S(fe,fe,[ie,ie,1]),fe}return N.pixelsToClipSpaceMatrix}function Qr(pe){let y=Math.cos(pe.rollInRadians),N=Math.sin(pe.rollInRadians),ie=Math.cos(pe.pitchInRadians),fe=Math.cos(pe.bearingInRadians),be=Math.sin(pe.bearingInRadians),Re=e.az();Re[0]=-fe*ie*N-be*y,Re[1]=-be*ie*N+fe*y;let je=e.aA(Re);je<1e-9?e.aB(Re):e.aC(Re,Re,1/je);let Ze=e.az();Ze[0]=fe*ie*y-be*N,Ze[1]=be*ie*y+fe*N;let ut=e.aA(Ze);return ut<1e-9?e.aB(Ze):e.aC(Ze,Ze,1/ut),{vecEast:Ze,vecSouth:Re}}function Zr(pe,y,N,ie){let fe;ie?(fe=[pe,y,ie(pe,y),1],e.aE(fe,fe,N)):(fe=[pe,y,0,1],Oa(fe,fe,N));let be=fe[3];return{point:new e.P(fe[0]/be,fe[1]/be),signedDistanceFromCamera:be,isOccluded:!1}}function ha(pe,y){return .5+pe/y*.5}function Pa(pe,y){return pe.x>=-y[0]&&pe.x<=y[0]&&pe.y>=-y[1]&&pe.y<=y[1]}function La(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt){let Kt=N?pe.textSizeData:pe.iconSizeData,st=e.aw(Kt,y.transform.zoom),It=[256/y.width*2+1,256/y.height*2+1],Ut=N?pe.text.dynamicLayoutVertexArray:pe.icon.dynamicLayoutVertexArray;Ut.clear();let ir=pe.lineVertexArray,dr=N?pe.text.placedSymbolArray:pe.icon.placedSymbolArray,Ar=y.transform.width/y.transform.height,hr=!1;for(let vr=0;vrMath.abs(N.x-y.x)*ie?{useVertical:!0}:(pe===e.ax.vertical?y.yN.x)?{needsFlipping:!0}:null}function ja(pe){let{projectionContext:y,pitchedLabelPlaneMatrixInverse:N,symbol:ie,fontSize:fe,flip:be,keepUpright:Re,glyphOffsetArray:je,dynamicLayoutVertexArray:Ze,aspectRatio:ut,rotateToLine:ft}=pe,Dt=fe/24,Gt=ie.lineOffsetX*Dt,Kt=ie.lineOffsetY*Dt,st;if(ie.numGlyphs>1){let It=ie.glyphStartIndex+ie.numGlyphs,Ut=ie.lineStartIndex,ir=ie.lineStartIndex+ie.lineLength,dr=un(Dt,je,Gt,Kt,be,ie,ft,y);if(!dr)return{notEnoughRoom:!0};let Ar=li(dr.first.point.x,dr.first.point.y,y,N),hr=li(dr.last.point.x,dr.last.point.y,y,N);if(Re&&!be){let vr=Xa(ie.writingMode,Ar,hr,ut);if(vr)return vr}st=[dr.first];for(let vr=ie.glyphStartIndex+1;vr0?Ar.point:Nn(y.tileAnchorPoint,dr,Ut,1,y),vr=li(Ut.x,Ut.y,y,N),Or=li(hr.x,hr.y,y,N),Cr=Xa(ie.writingMode,vr,Or,ut);if(Cr)return Cr}let It=vi(Dt*je.getoffsetX(ie.glyphStartIndex),Gt,Kt,be,ie.segment,ie.lineStartIndex,ie.lineStartIndex+ie.lineLength,y,ft);if(!It||y.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};st=[It]}for(let It of st)e.aD(Ze,It.point,It.angle);return{}}function Nn(pe,y,N,ie,fe){let be=pe.add(pe.sub(y)._unit()),Re=Un(be.x,be.y,fe).point,je=N.sub(Re);return N.add(je._mult(ie/je.mag()))}function yn(pe,y,N){let ie=y.projectionCache;if(ie.projections[pe])return ie.projections[pe];let fe=new e.P(y.lineVertexArray.getx(pe),y.lineVertexArray.gety(pe)),be=Un(fe.x,fe.y,y);if(be.signedDistanceFromCamera>0)return ie.projections[pe]=be.point,ie.anyProjectionOccluded||(ie.anyProjectionOccluded=be.isOccluded),be.point;let Re=pe-N.direction;return Nn(N.distanceFromAnchor===0?y.tileAnchorPoint:new e.P(y.lineVertexArray.getx(Re),y.lineVertexArray.gety(Re)),fe,N.previousVertex,N.absOffsetX-N.distanceFromAnchor+1,y)}function Un(pe,y,N){let ie=pe+N.translation[0],fe=y+N.translation[1],be;return N.pitchWithMap?(be=Zr(ie,fe,N.pitchedLabelPlaneMatrix,N.getElevation),be.isOccluded=!1):(be=N.transform.projectTileCoordinates(ie,fe,N.unwrappedTileID,N.getElevation),be.point.x=(.5*be.point.x+.5)*N.width,be.point.y=(.5*-be.point.y+.5)*N.height),be}function li(pe,y,N,ie){if(N.pitchWithMap){let fe=[pe,y,0,1];return e.aE(fe,fe,ie),N.transform.projectTileCoordinates(fe[0]/fe[3],fe[1]/fe[3],N.unwrappedTileID,N.getElevation).point}return{x:pe/N.width*2-1,y:1-y/N.height*2}}function Yn(pe,y,N){return N.transform.projectTileCoordinates(pe,y,N.unwrappedTileID,N.getElevation)}function on(pe,y,N){return pe._unit()._perp()._mult(y*N)}function en(pe,y,N,ie,fe,be,Re,je,Ze){if(je.projectionCache.offsets[pe])return je.projectionCache.offsets[pe];let ut=N.add(y);if(pe+Ze.direction=fe)return je.projectionCache.offsets[pe]=ut,ut;let ft=yn(pe+Ze.direction,je,Ze),Dt=on(ft.sub(N),Re,Ze.direction),Gt=N.add(Dt),Kt=ft.add(Dt);return je.projectionCache.offsets[pe]=e.aF(be,ut,Gt,Kt)||ut,je.projectionCache.offsets[pe]}function vi(pe,y,N,ie,fe,be,Re,je,Ze){let ut=ie?pe-y:pe+y,ft=ut>0?1:-1,Dt=0;ie&&(ft*=-1,Dt=Math.PI),ft<0&&(Dt+=Math.PI);let Gt,Kt=ft>0?be+fe:be+fe+1;je.projectionCache.cachedAnchorPoint?Gt=je.projectionCache.cachedAnchorPoint:(Gt=Un(je.tileAnchorPoint.x,je.tileAnchorPoint.y,je).point,je.projectionCache.cachedAnchorPoint=Gt);let st,It,Ut=Gt,ir=Gt,dr=0,Ar=0,hr=Math.abs(ut),vr=[],Or;for(;dr+Ar<=hr;){if(Kt+=ft,Kt=Re)return null;dr+=Ar,ir=Ut,It=st;let ka={absOffsetX:hr,direction:ft,distanceFromAnchor:dr,previousVertex:ir};if(Ut=yn(Kt,je,ka),N===0)vr.push(ir),Or=Ut.sub(ir);else{let Ta,Ra=Ut.sub(ir);Ta=Ra.mag()===0?on(yn(Kt+ft,je,ka).sub(Ut),N,ft):on(Ra,N,ft),It||(It=ir.add(Ta)),st=en(Kt,Ta,Ut,be,Re,It,N,je,ka),vr.push(It),Or=st.sub(It)}Ar=Or.mag()}let Cr=Or._mult((hr-dr)/Ar)._add(It||ir),ta=Dt+Math.atan2(Ut.y-ir.y,Ut.x-ir.x);return vr.push(Cr),{point:Cr,angle:Ze?ta:0,path:vr}}let Yi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ja(pe,y){for(let N=0;N=1;za--)ga.push(ua.path[za]);for(let za=1;zaCn.signedDistanceFromCamera<=0)?[]:za.map(Cn=>Cn.point)}let Fa=[];if(ga.length>0){let za=ga[0].clone(),Cn=ga[0].clone();for(let Dn=1;Dn=ka.x&&Cn.x<=Ta.x&&za.y>=ka.y&&Cn.y<=Ta.y?[ga]:Cn.xTa.x||Cn.yTa.y?[]:e.aG([ga],ka.x,ka.y,Ta.x,Ta.y)}for(let za of Fa){Ra.reset(za,.25*ta);let Cn=0;Cn=Ra.length<=.5*ta?1:Math.ceil(Ra.paddedLength/da)+1;for(let Dn=0;Dn{let Ze=Zr(je.x,je.y,Re,be.getElevation),ut=be.transform.projectTileCoordinates(Ze.point.x,Ze.point.y,be.unwrappedTileID,be.getElevation);return ut.point.x=(.5*ut.point.x+.5)*be.width,ut.point.y=(.5*-ut.point.y+.5)*be.height,ut})}(y,N);return function(fe){let be=0,Re=0,je=0,Ze=0;for(let ut=0;utRe&&(Re=Ze,be=je));return fe.slice(be,be+Re)}(ie)}queryRenderedSymbols(y){if(y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let N=[],ie=new e.a8;for(let Dt of y){let Gt=new e.P(Dt.x+lt,Dt.y+lt);ie.extend(Gt),N.push(Gt)}let{minX:fe,minY:be,maxX:Re,maxY:je}=ie,Ze=this.grid.query(fe,be,Re,je).concat(this.ignoredGrid.query(fe,be,Re,je)),ut={},ft={};for(let Dt of Ze){let Gt=Dt.key;if(ut[Gt.bucketInstanceId]===void 0&&(ut[Gt.bucketInstanceId]={}),ut[Gt.bucketInstanceId][Gt.featureIndex])continue;let Kt=[new e.P(Dt.x1,Dt.y1),new e.P(Dt.x2,Dt.y1),new e.P(Dt.x2,Dt.y2),new e.P(Dt.x1,Dt.y2)];e.aH(N,Kt)&&(ut[Gt.bucketInstanceId][Gt.featureIndex]=!0,ft[Gt.bucketInstanceId]===void 0&&(ft[Gt.bucketInstanceId]=[]),ft[Gt.bucketInstanceId].push(Gt.featureIndex))}return ft}insertCollisionBox(y,N,ie,fe,be,Re){(ie?this.ignoredGrid:this.grid).insert({bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N},y[0],y[1],y[2],y[3])}insertCollisionCircles(y,N,ie,fe,be,Re){let je=ie?this.ignoredGrid:this.grid,Ze={bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N};for(let ut=0;ut=this.screenRightBoundary||fethis.screenBottomBoundary}isInsideGrid(y,N,ie,fe){return ie>=0&&y=0&&Nthis.projectAndGetPerspectiveRatio(da.x,da.y,fe,ut,Dt));ia=ga.some(da=>!da.isOccluded),ua=ga.map(da=>new e.P(da.x,da.y))}else ia=!0;return{box:e.aI(ua),allPointsOccluded:!ia}}}class fr{constructor(y,N,ie,fe){this.opacity=y?Math.max(0,Math.min(1,y.opacity+(y.placed?N:-N))):fe&&ie?1:0,this.placed=ie}isHidden(){return this.opacity===0&&!this.placed}}class lr{constructor(y,N,ie,fe,be){this.text=new fr(y?y.text:null,N,ie,be),this.icon=new fr(y?y.icon:null,N,fe,be)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tr{constructor(y,N,ie){this.text=y,this.icon=N,this.skipFade=ie}}class Ir{constructor(y,N,ie,fe,be){this.bucketInstanceId=y,this.featureIndex=N,this.sourceLayerIndex=ie,this.bucketIndex=fe,this.tileID=be}}class Dr{constructor(y){this.crossSourceCollisions=y,this.maxGroupID=0,this.collisionGroups={}}get(y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[y]){let N=++this.maxGroupID;this.collisionGroups[y]={ID:N,predicate:ie=>ie.collisionGroupID===N}}return this.collisionGroups[y]}}function ot(pe,y,N,ie,fe){let{horizontalAlign:be,verticalAlign:Re}=e.aP(pe);return new e.P(-(be-.5)*y+ie[0]*fe,-(Re-.5)*N+ie[1]*fe)}class kt{constructor(y,N,ie,fe,be){this.transform=y.clone(),this.terrain=N,this.collisionIndex=new rt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ie,this.retainedQueryData={},this.collisionGroups=new Dr(fe),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=be,be&&(be.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(y){let N=this.terrain;return N?(ie,fe)=>N.getElevation(y,ie,fe):null}getBucketParts(y,N,ie,fe){let be=ie.getBucket(N),Re=ie.latestFeatureIndex;if(!be||!Re||N.id!==be.layerIds[0])return;let je=ie.collisionBoxArray,Ze=be.layers[0].layout,ut=be.layers[0].paint,ft=Math.pow(2,this.transform.zoom-ie.tileID.overscaledZ),Dt=ie.tileSize/e.a6,Gt=ie.tileID.toUnwrapped(),Kt=Ze.get("text-rotation-alignment")==="map",st=e.aK(ie,1,this.transform.zoom),It=e.aL(this.collisionIndex.transform,ie,ut.get("text-translate"),ut.get("text-translate-anchor")),Ut=e.aL(this.collisionIndex.transform,ie,ut.get("icon-translate"),ut.get("icon-translate-anchor")),ir=cr(Kt,this.transform,st);this.retainedQueryData[be.bucketInstanceId]=new Ir(be.bucketInstanceId,Re,be.sourceLayerIndex,be.index,ie.tileID);let dr={bucket:be,layout:Ze,translationText:It,translationIcon:Ut,unwrappedTileID:Gt,pitchedLabelPlaneMatrix:ir,scale:ft,textPixelRatio:Dt,holdingForFade:ie.holdingForSymbolFade(),collisionBoxArray:je,partiallyEvaluatedTextSize:e.aw(be.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(be.sourceID)};if(fe)for(let Ar of be.sortKeyRanges){let{sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or}=Ar;y.push({sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or,parameters:dr})}else y.push({symbolInstanceStart:0,symbolInstanceEnd:be.symbolInstances.length,parameters:dr})}attemptAnchorPlacement(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar,hr){var vr,Or,Cr;let ta=e.aM[y.textAnchor],ka=[y.textOffset0,y.textOffset1],Ta=ot(ta,ie,fe,ka,be),Ra=this.collisionIndex.placeCollisionBox(N,Gt,Ze,ut,ft,je,Re,Ut,Dt.predicate,Ar,Ta,hr);if((!dr||this.collisionIndex.placeCollisionBox(dr,Gt,Ze,ut,ft,je,Re,ir,Dt.predicate,Ar,Ta,hr).placeable)&&Ra.placeable){let ua;if(!((vr=this.prevPlacement)===null||vr===void 0)&&vr.variableOffsets[Kt.crossTileID]&&(!((Cr=(Or=this.prevPlacement)===null||Or===void 0?void 0:Or.placements[Kt.crossTileID])===null||Cr===void 0)&&Cr.text)&&(ua=this.prevPlacement.variableOffsets[Kt.crossTileID].anchor),Kt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Kt.crossTileID]={textOffset:ka,width:ie,height:fe,anchor:ta,textBoxScale:be,prevAnchor:ua},this.markUsedJustification(st,ta,Kt,It),st.allowVerticalPlacement&&(this.markUsedOrientation(st,It,Kt),this.placedOrientations[Kt.crossTileID]=It),{shift:Ta,placedGlyphBoxes:Ra}}}placeLayerBucketPart(y,N,ie){let{bucket:fe,layout:be,translationText:Re,translationIcon:je,unwrappedTileID:Ze,pitchedLabelPlaneMatrix:ut,textPixelRatio:ft,holdingForFade:Dt,collisionBoxArray:Gt,partiallyEvaluatedTextSize:Kt,collisionGroup:st}=y.parameters,It=be.get("text-optional"),Ut=be.get("icon-optional"),ir=e.aN(be,"text-overlap","text-allow-overlap"),dr=ir==="always",Ar=e.aN(be,"icon-overlap","icon-allow-overlap"),hr=Ar==="always",vr=be.get("text-rotation-alignment")==="map",Or=be.get("text-pitch-alignment")==="map",Cr=be.get("icon-text-fit")!=="none",ta=be.get("symbol-z-order")==="viewport-y",ka=dr&&(hr||!fe.hasIconData()||Ut),Ta=hr&&(dr||!fe.hasTextData()||It);!fe.collisionArrays&&Gt&&fe.deserializeCollisionBoxes(Gt);let Ra=this.retainedQueryData[fe.bucketInstanceId].tileID,ua=this._getTerrainElevationFunc(Ra),ia=this.transform.getFastPathSimpleProjectionMatrix(Ra),ga=(da,Fa,za)=>{var Cn,Dn;if(N[da.crossTileID])return;if(Dt)return void(this.placements[da.crossTileID]=new Tr(!1,!1,!1));let ui=!1,cn=!1,sn=!0,ei=null,Pn={box:null,placeable:!1,offscreen:null,occluded:!1},Rn={placeable:!1},In=null,Jn=null,Ei=null,so=0,ti=0,bi=0;Fa.textFeatureIndex?so=Fa.textFeatureIndex:da.useRuntimeCollisionCircles&&(so=da.featureIndex),Fa.verticalTextFeatureIndex&&(ti=Fa.verticalTextFeatureIndex);let Wi=Fa.textBox;if(Wi){let Bs=es=>{let $o=e.ax.horizontal;if(fe.allowVerticalPlacement&&!es&&this.prevPlacement){let _s=this.prevPlacement.placedOrientations[da.crossTileID];_s&&(this.placedOrientations[da.crossTileID]=_s,$o=_s,this.markUsedOrientation(fe,$o,da))}return $o},So=(es,$o)=>{if(fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&Fa.verticalTextBox){for(let _s of fe.writingModes)if(_s===e.ax.vertical?(Pn=$o(),Rn=Pn):Pn=es(),Pn?.placeable)break}else Pn=es()},Ws=da.textAnchorOffsetStartIndex,Zo=da.textAnchorOffsetEndIndex;if(Zo===Ws){let es=($o,_s)=>{let Go=this.collisionIndex.placeCollisionBox($o,ir,ft,Ra,Ze,Or,vr,Re,st.predicate,ua,void 0,ia);return Go?.placeable&&(this.markUsedOrientation(fe,_s,da),this.placedOrientations[da.crossTileID]=_s),Go};So(()=>es(Wi,e.ax.horizontal),()=>{let $o=Fa.verticalTextBox;return fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&$o?es($o,e.ax.vertical):{box:null,offscreen:null}}),Bs(Pn?.placeable)}else{let es=e.aM[(Dn=(Cn=this.prevPlacement)===null||Cn===void 0?void 0:Cn.variableOffsets[da.crossTileID])===null||Dn===void 0?void 0:Dn.anchor],$o=(Go,Ys,Ll)=>{let mo=Go.x2-Go.x1,ru=Go.y2-Go.y1,Rs=da.textBoxScale,Yu=Cr&&Ar==="never"?Ys:null,Ul=null,ql=ir==="never"?1:2,fo="never";es&&ql++;for(let Xo=0;Xo$o(Wi,Fa.iconBox,e.ax.horizontal),()=>{let Go=Fa.verticalTextBox;return fe.allowVerticalPlacement&&!Pn?.placeable&&da.numVerticalGlyphVertices>0&&Go?$o(Go,Fa.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Pn&&(ui=Pn.placeable,sn=Pn.offscreen);let _s=Bs(Pn?.placeable);if(!ui&&this.prevPlacement){let Go=this.prevPlacement.variableOffsets[da.crossTileID];Go&&(this.variableOffsets[da.crossTileID]=Go,this.markUsedJustification(fe,Go.anchor,da,_s))}}}if(In=Pn,ui=In?.placeable,sn=In?.offscreen,da.useRuntimeCollisionCircles&&da.centerJustifiedTextSymbolIndex>=0){let Bs=fe.text.placedSymbolArray.get(da.centerJustifiedTextSymbolIndex),So=e.ay(fe.textSizeData,Kt,Bs),Ws=be.get("text-padding");Jn=this.collisionIndex.placeCollisionCircles(ir,Bs,fe.lineVertexArray,fe.glyphOffsetArray,So,Ze,ut,ie,Or,st.predicate,da.collisionCircleDiameter,Ws,Re,ua),Jn.circles.length&&Jn.collisionDetected&&!ie&&e.w("Collisions detected, but collision boxes are not shown"),ui=dr||Jn.circles.length>0&&!Jn.collisionDetected,sn&&(sn=Jn.offscreen)}if(Fa.iconFeatureIndex&&(bi=Fa.iconFeatureIndex),Fa.iconBox){let Bs=So=>this.collisionIndex.placeCollisionBox(So,Ar,ft,Ra,Ze,Or,vr,je,st.predicate,ua,Cr&&ei?ei:void 0,ia);Rn&&Rn.placeable&&Fa.verticalIconBox?(Ei=Bs(Fa.verticalIconBox),cn=Ei.placeable):(Ei=Bs(Fa.iconBox),cn=Ei.placeable),sn&&(sn=Ei.offscreen)}let ro=It||da.numHorizontalGlyphVertices===0&&da.numVerticalGlyphVertices===0,Mo=Ut||da.numIconVertices===0;ro||Mo?Mo?ro||cn&&(cn=ui):ui=cn&&ui:cn=ui=cn&&ui;let zs=cn&&Ei.placeable;if(ui&&In.placeable&&this.collisionIndex.insertCollisionBox(In.box,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,Rn&&Rn.placeable&&ti?ti:so,st.ID),zs&&this.collisionIndex.insertCollisionBox(Ei.box,Ar,be.get("icon-ignore-placement"),fe.bucketInstanceId,bi,st.ID),Jn&&ui&&this.collisionIndex.insertCollisionCircles(Jn.circles,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,so,st.ID),ie&&this.storeCollisionData(fe.bucketInstanceId,za,Fa,In,Ei,Jn),da.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(fe.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[da.crossTileID]=new Tr((ui||ka)&&!In?.occluded,(cn||Ta)&&!Ei?.occluded,sn||fe.justReloaded),N[da.crossTileID]=!0};if(ta){if(y.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let da=fe.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Fa=da.length-1;Fa>=0;--Fa){let za=da[Fa];ga(fe.symbolInstances.get(za),fe.collisionArrays[za],za)}}else for(let da=y.symbolInstanceStart;da=0&&(y.text.placedSymbolArray.get(je).crossTileID=be>=0&&je!==be?0:ie.crossTileID)}markUsedOrientation(y,N,ie){let fe=N===e.ax.horizontal||N===e.ax.horizontalOnly?N:0,be=N===e.ax.vertical?N:0,Re=[ie.leftJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.rightJustifiedTextSymbolIndex];for(let je of Re)y.text.placedSymbolArray.get(je).placedOrientation=fe;ie.verticalPlacedTextSymbolIndex&&(y.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).placedOrientation=be)}commit(y){this.commitTime=y,this.zoomAtLastRecencyCheck=this.transform.zoom;let N=this.prevPlacement,ie=!1;this.prevZoomAdjustment=N?N.zoomAdjustment(this.transform.zoom):0;let fe=N?N.symbolFadeChange(y):1,be=N?N.opacities:{},Re=N?N.variableOffsets:{},je=N?N.placedOrientations:{};for(let Ze in this.placements){let ut=this.placements[Ze],ft=be[Ze];ft?(this.opacities[Ze]=new lr(ft,fe,ut.text,ut.icon),ie||(ie=ut.text!==ft.text.placed),ie||(ie=ut.icon!==ft.icon.placed)):(this.opacities[Ze]=new lr(null,fe,ut.text,ut.icon,ut.skipFade),ie||(ie=ut.text||ut.icon))}for(let Ze in be){let ut=be[Ze];if(!this.opacities[Ze]){let ft=new lr(ut,fe,!1,!1);ft.isHidden()||(this.opacities[Ze]=ft,ie||(ie=ut.text.placed),ie||(ie=ut.icon.placed))}}for(let Ze in Re)this.variableOffsets[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.variableOffsets[Ze]=Re[Ze]);for(let Ze in je)this.placedOrientations[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.placedOrientations[Ze]=je[Ze]);if(N&&N.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");ie?this.lastPlacementChangeTime=y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=N?N.lastPlacementChangeTime:y)}updateLayerOpacities(y,N){let ie={};for(let fe of N){let be=fe.getBucket(y);be&&fe.latestFeatureIndex&&y.id===be.layerIds[0]&&this.updateBucketOpacities(be,fe.tileID,ie,fe.collisionBoxArray)}}updateBucketOpacities(y,N,ie,fe){y.hasTextData()&&(y.text.opacityVertexArray.clear(),y.text.hasVisibleVertices=!1),y.hasIconData()&&(y.icon.opacityVertexArray.clear(),y.icon.hasVisibleVertices=!1),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexArray.clear(),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexArray.clear();let be=y.layers[0],Re=be.layout,je=new lr(null,0,!1,!1,!0),Ze=Re.get("text-allow-overlap"),ut=Re.get("icon-allow-overlap"),ft=be._unevaluatedLayout.hasValue("text-variable-anchor")||be._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Dt=Re.get("text-rotation-alignment")==="map",Gt=Re.get("text-pitch-alignment")==="map",Kt=Re.get("icon-text-fit")!=="none",st=new lr(null,0,Ze&&(ut||!y.hasIconData()||Re.get("icon-optional")),ut&&(Ze||!y.hasTextData()||Re.get("text-optional")),!0);!y.collisionArrays&&fe&&(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData())&&y.deserializeCollisionBoxes(fe);let It=(ir,dr,Ar)=>{for(let hr=0;hr0,ta=this.placedOrientations[dr.crossTileID],ka=ta===e.ax.vertical,Ta=ta===e.ax.horizontal||ta===e.ax.horizontalOnly;if(Ar>0||hr>0){let ua=wa(Or.text);It(y.text,Ar,ka?pn:ua),It(y.text,hr,Ta?pn:ua);let ia=Or.text.isHidden(),ga=[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex];for(let za of ga)za>=0&&(y.text.placedSymbolArray.get(za).hidden=ia||ka?1:0);dr.verticalPlacedTextSymbolIndex>=0&&(y.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=ia||Ta?1:0);let da=this.variableOffsets[dr.crossTileID];da&&this.markUsedJustification(y,da.anchor,dr,ta);let Fa=this.placedOrientations[dr.crossTileID];Fa&&(this.markUsedJustification(y,"left",dr,Fa),this.markUsedOrientation(y,Fa,dr))}if(Cr){let ua=wa(Or.icon),ia=!(Kt&&dr.verticalPlacedIconSymbolIndex&&ka);dr.placedIconSymbolIndex>=0&&(It(y.icon,dr.numIconVertices,ia?ua:pn),y.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Or.icon.isHidden()),dr.verticalPlacedIconSymbolIndex>=0&&(It(y.icon,dr.numVerticalIconVertices,ia?pn:ua),y.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let Ra=Ut?.has(ir)?Ut.get(ir):{text:null,icon:null};if(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData()){let ua=y.collisionArrays[ir];if(ua){let ia=new e.P(0,0);if(ua.textBox||ua.verticalTextBox){let ga=!0;if(ft){let da=this.variableOffsets[vr];da?(ia=ot(da.anchor,da.width,da.height,da.textOffset,da.textBoxScale),Dt&&ia._rotate(Gt?-this.transform.bearingInRadians:this.transform.bearingInRadians)):ga=!1}if(ua.textBox||ua.verticalTextBox){let da;ua.textBox&&(da=ka),ua.verticalTextBox&&(da=Ta),jt(y.textCollisionBox.collisionVertexArray,Or.text.placed,!ga||da,Ra.text,ia.x,ia.y)}}if(ua.iconBox||ua.verticalIconBox){let ga=!!(!Ta&&ua.verticalIconBox),da;ua.iconBox&&(da=ga),ua.verticalIconBox&&(da=!ga),jt(y.iconCollisionBox.collisionVertexArray,Or.icon.placed,da,Ra.icon,Kt?ia.x:0,Kt?ia.y:0)}}}}if(y.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[y.bucketInstanceId]&&(this.retainedQueryData[y.bucketInstanceId].featureSortOrder=y.featureSortOrder),y.hasTextData()&&y.text.opacityVertexBuffer&&y.text.opacityVertexBuffer.updateData(y.text.opacityVertexArray),y.hasIconData()&&y.icon.opacityVertexBuffer&&y.icon.opacityVertexBuffer.updateData(y.icon.opacityVertexArray),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexBuffer&&y.iconCollisionBox.collisionVertexBuffer.updateData(y.iconCollisionBox.collisionVertexArray),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexBuffer&&y.textCollisionBox.collisionVertexBuffer.updateData(y.textCollisionBox.collisionVertexArray),y.text.opacityVertexArray.length!==y.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);if(y.icon.opacityVertexArray.length!==y.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);y.bucketInstanceId in this.collisionCircleArrays&&(y.collisionCircleArray=this.collisionCircleArrays[y.bucketInstanceId],delete this.collisionCircleArrays[y.bucketInstanceId])}symbolFadeChange(y){return this.fadeDuration===0?1:(y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(y){return Math.max(0,(this.transform.zoom-y)/1.5)}hasTransitions(y){return this.stale||y-this.lastPlacementChangeTimey}setStale(){this.stale=!0}}function jt(pe,y,N,ie,fe,be){ie&&ie.length!==0||(ie=[0,0,0,0]);let Re=ie[0]-lt,je=ie[1]-lt,Ze=ie[2]-lt,ut=ie[3]-lt;pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,ut),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,ut)}let ar=Math.pow(2,25),Er=Math.pow(2,24),xr=Math.pow(2,17),zr=Math.pow(2,16),Lr=Math.pow(2,9),aa=Math.pow(2,8),Sa=Math.pow(2,1);function wa(pe){if(pe.opacity===0&&!pe.placed)return 0;if(pe.opacity===1&&pe.placed)return 4294967295;let y=pe.placed?1:0,N=Math.floor(127*pe.opacity);return N*ar+y*Er+N*xr+y*zr+N*Lr+y*aa+N*Sa+y}let pn=0;class tn{constructor(y){this._sortAcrossTiles=y.layout.get("symbol-z-order")!=="viewport-y"&&!y.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(y,N,ie,fe,be){let Re=this._bucketParts;for(;this._currentTileIndexje.sortKey-Ze.sortKey));this._currentPartIndex!this._forceFullPlacement&&m()-fe>2;for(;this._currentPlacementIndex>=0;){let Re=N[y[this._currentPlacementIndex]],je=this.placement.collisionIndex.transform.zoom;if(e.aQ(Re)&&Re.layout&&(!Re.minzoom||Re.minzoom<=je)&&(!Re.maxzoom||Re.maxzoom>je)){if(this._inProgressLayer||(this._inProgressLayer=new tn(Re)),this._inProgressLayer.continuePlacement(ie[Re.source],this.placement,this._showCollisionBoxes,Re,be))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(y){return this.placement.commit(y),this.placement}}let rn=512/e.a6/2;class Ri{constructor(y,N,ie){this.tileID=y,this.bucketInstanceId=ie,this._symbolsByKey={};let fe=new Map;for(let be=0;be({x:Math.floor(Ze.anchorX*rn),y:Math.floor(Ze.anchorY*rn)})),crossTileIDs:Re.map(Ze=>Ze.crossTileID)};if(je.positions.length>128){let Ze=new e.aR(je.positions.length,16,Uint16Array);for(let{x:ut,y:ft}of je.positions)Ze.add(ut,ft);Ze.finish(),delete je.positions,je.index=Ze}this._symbolsByKey[be]=je}}getScaledCoordinates(y,N){let{x:ie,y:fe,z:be}=this.tileID.canonical,{x:Re,y:je,z:Ze}=N.canonical,ut=rn/Math.pow(2,Ze-be),ft=(je*e.a6+y.anchorY)*ut,Dt=fe*e.a6*rn;return{x:Math.floor((Re*e.a6+y.anchorX)*ut-ie*e.a6*rn),y:Math.floor(ft-Dt)}}findMatches(y,N,ie){let fe=this.tileID.canonical.zy)}}class Gn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class no{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(y){let N=Math.round((y-this.lng)/360);if(N!==0)for(let ie in this.indexes){let fe=this.indexes[ie],be={};for(let Re in fe){let je=fe[Re];je.tileID=je.tileID.unwrapTo(je.tileID.wrap+N),be[je.tileID.key]=je}this.indexes[ie]=be}this.lng=y}addBucket(y,N,ie){var fe,be,Re;if(!((fe=this.indexes[y.overscaledZ])===null||fe===void 0)&&fe[y.key]){if(this.indexes[y.overscaledZ][y.key].bucketInstanceId===N.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(y.overscaledZ,this.indexes[y.overscaledZ][y.key])}for(let Ze=0;Zey.overscaledZ)for(let ft in ut){let Dt=ut[ft];Dt.tileID.isChildOf(y)&&Dt.findMatches(N.symbolInstances,y,je)}else{let ft=ut[y.scaledTo(Number(Ze)).key];ft&&ft.findMatches(N.symbolInstances,y,je)}}for(let Ze=0;Ze> 1u)/127.0,float(packedOpacity & 1u));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 +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;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c );} #ifdef TERRAIN3D -uniform sampler2D u_terrain;uniform highp sampler2D u_depth;layout(std140) uniform TerrainUBO {highp mat4 u_terrain_matrix;highp vec4 u_terrain_unpack;highp float u_terrain_dim;highp float u_terrain_exaggeration;}; +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 @@ -2803,9 +2752,9 @@ vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1. #else return 1.0; #endif -}float ele(ivec2 pos) { +}float ele(vec2 pos) { #ifdef TERRAIN3D -vec4 rgb=(texelFetch(u_terrain,pos,0)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; +vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; #else return 0.0; #endif @@ -2814,57 +2763,59 @@ return 0.0; #ifdef GLOBE if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} #endif -vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+2.0;vec2 f=fract(coord);ivec2 c=ivec2(floor(coord));ivec2 hi=textureSize(u_terrain,0)-1;float tl=ele(clamp(c,ivec2(0),hi));float tr=ele(clamp(c+ivec2(1,0),ivec2(0),hi));float bl=ele(clamp(c+ivec2(0,1),ivec2(0),hi));float br=ele(clamp(c+ivec2(1,1),ivec2(0),hi));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; +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 -}const float PI=3.141592653589793; -#define PROJECTION_UBO -layout(std140) uniform ProjectionUBO {highp mat4 u_projection_matrix;highp mat4 u_projection_fallback_matrix;highp vec4 u_projection_tile_mercator_coords;highp vec4 u_projection_clipping_plane;highp float u_projection_transition;highp int u_projection_clip_antimeridian;};layout(std140) uniform FrameUBO {highp vec2 u_units_to_pixels;highp vec2 u_world_size;highp float u_camera_to_center_distance;highp float u_symbol_fade_change;highp float u_aspect_ratio;highp float u_device_pixel_ratio;highp vec2 u_viewport_size;highp vec2 u_pixel_extrude_scale;highp float u_pitch;};`,oU=`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; +}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:jn("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:jn("",`#define GLOBE_RADIUS 6371008.8 +uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos +);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); +if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len +);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:jn(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,sU="layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}",lU=`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;in vec2 v_pos_a;in 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; +}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:jn(`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;in vec2 v_pos_a;in 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,uU="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;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);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);}",cU=`in vec3 v_data;flat in float v_visibility; -#pragma maplibre: define highp vec4 color -#pragma maplibre: define mediump float radius -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity -#pragma maplibre: define highp vec4 stroke_color -#pragma maplibre: define mediump float stroke_width -#pragma maplibre: define lowp float stroke_opacity -void main() { -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize mediump float radius -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize highp vec4 stroke_color -#pragma maplibre: initialize mediump float stroke_width -#pragma maplibre: initialize lowp float stroke_opacity +}`,"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;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);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:jn(`in vec3 v_data;in 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));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,fU=`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform vec2 u_translate;layout(location=0) in ivec2 a_pos;out vec3 v_data;flat out float v_visibility; -#pragma maplibre: define highp vec4 color -#pragma maplibre: define mediump float radius -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity -#pragma maplibre: define highp vec4 stroke_color -#pragma maplibre: define mediump float stroke_width -#pragma maplibre: define lowp float stroke_opacity +}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out 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 maplibre: initialize highp vec4 color -#pragma maplibre: initialize mediump float radius -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize highp vec4 stroke_color -#pragma maplibre: initialize mediump float stroke_width -#pragma maplibre: initialize lowp float stroke_opacity -ivec2 pos_raw=a_pos+32768;vec2 extrude=vec2(pos_raw & 7)/7.0*2.0-1.0;vec2 circle_center=vec2(pos_raw >> 3)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { +#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 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { #ifdef GLOBE vec3 center_vector=projectToSphere(circle_center); #endif @@ -2880,78 +2831,71 @@ vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vect #else gl_Position=projectTileWithElevation(corner_position,ele); #endif -} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}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);}`,RC="void main() {fragColor=vec4(1.0);}",Hd={prelude:qo(iU,nU),projectionMercator:qo(` -void clipAntimeridian() {}`,"float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:qo("in highp float v_projection_tile_x;void clipAntimeridian() {if (u_projection_clip_antimeridian !=0 && (v_projection_tile_x < 0.0 || v_projection_tile_x >=8192.0)) {discard;}}",`#define GLOBE_RADIUS 6371008.8 -#ifndef PROJECTION_UBO -uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix; -#endif -out highp float v_projection_tile_x;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos -);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float t=exp(PI-(mercator_pos_y*PI*2.0));return (2.0*t)/(t*t+1.0);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;float spherical_x=mercator_pos.x*PI*2.0+PI;float t=exp(PI-(mercator_pos.y*PI*2.0));float t2=t*t;float denom=t2+1.0;float sin_sy=(t2-1.0)/denom;float cos_sy=(2.0*t)/denom;vec3 pos=vec3(sin(spherical_x)*cos_sy,sin_sy,cos(spherical_x)*cos_sy -);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:qo(oU,sU),backgroundPattern:qo(lU,uU),circle:qo(cU,fU),clippingMask:qo(RC,"layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:qo(`uniform highp float u_intensity;in vec2 v_extrude; -#pragma maplibre: define highp float weight +} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}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:jn(fn,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:jn(`uniform highp float u_intensity;in vec2 v_extrude; +#pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { -#pragma maplibre: initialize highp float weight +#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);fragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;layout(location=0) in ivec2 a_pos;out vec2 v_extrude; -#pragma maplibre: define highp float weight -#pragma maplibre: define mediump float radius +}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out 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 maplibre: initialize highp float weight -#pragma maplibre: initialize mediump float radius -ivec2 pos_raw=a_pos+32768;vec2 unscaled_extrude=vec2(pos_raw & 7)/7.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;vec2 circle_center=vec2(pos_raw >> 3); +#pragma mapbox: initialize highp float weight +#pragma mapbox: initialize mediump float radius +vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.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;vec2 circle_center=floor(pos_raw/8.0); #ifdef GLOBE vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); #else gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); #endif -}`),heatmapTexture:qo(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; +}`),heatmapTexture:jn(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(0.0); #endif -}`,"uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world_size,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:qo("flat in float v_placed;flat in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","layout(location=0) in vec2 a_anchor_pos;layout(location=1) in vec2 a_placed;layout(location=2) in vec2 a_box_real;flat out float v_placed;flat out float v_notUsed;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:qo("flat in float v_radius;in vec2 v_extrude;flat in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;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);fragColor=color*alpha*opacity_t;}","layout(location=0) in vec2 a_pos;layout(location=1) in float a_radius;layout(location=2) in vec2 a_flags;flat out float v_radius;out vec2 v_extrude;flat out float v_collision;void main() {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;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:qo(`#ifdef GL_ES +}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out 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:jn("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;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:jn("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;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);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {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;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:jn(`#ifdef GL_ES precision highp float; #endif -uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {vec4 data=texelFetch(u_elevation_stops,ivec2(stop,0),0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else +uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else {l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0)); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,"uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=2.0/u_dimension;float scale=(u_dimension.x-4.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:qo("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","layout(location=0) in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:qo(RC,`layout(location=0) in vec2 a_pos;void main() { +}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:jn("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:jn(fn,`in vec2 a_pos;void main() { #ifdef GLOBE gl_Position=projectTileFor3D(a_pos,0.0); #else gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); #endif -}`),fill:qo(`#pragma maplibre: define highp vec4 color -#pragma maplibre: define lowp float opacity +}`),fill:jn(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity void main() { -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity fragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos; -#pragma maplibre: define highp vec4 color -#pragma maplibre: define lowp float opacity +}`,`uniform vec2 u_fill_translate;in vec2 a_pos; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity void main() { -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize lowp float opacity -if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:qo(`in vec2 v_pos; +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:jn(`in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif -#pragma maplibre: define highp vec4 outline_color -#pragma maplibre: define lowp float opacity +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity void main() { -#pragma maplibre: initialize highp vec4 outline_color -#pragma maplibre: initialize lowp float opacity +#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);fragColor=outline_color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} @@ -2959,114 +2903,106 @@ if (v_depth > 1.0) {discard;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos; +}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif -#pragma maplibre: define highp vec4 outline_color -#pragma maplibre: define lowp float opacity +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity void main() { -#pragma maplibre: initialize highp vec4 outline_color -#pragma maplibre: initialize lowp float opacity -if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world_size; +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif -}`),fillOutlinePattern:qo(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;uniform bool u_sdf_pattern;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; +}`),fillOutlinePattern:jn(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif -#pragma maplibre: define lowp float opacity -#pragma maplibre: define highp vec4 color -#pragma maplibre: define lowp vec4 pattern_from -#pragma maplibre: define lowp vec4 pattern_to +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to void main() { -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize mediump vec4 pattern_from -#pragma maplibre: 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=texture(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=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*alpha*opacity;} else {fragColor=mix(color1,color2,u_fade)*alpha*opacity;} +#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=texture(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=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity; #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; +}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif -#pragma maplibre: define lowp float opacity -#pragma maplibre: define highp vec4 color -#pragma maplibre: define lowp vec4 pattern_from -#pragma maplibre: define lowp vec4 pattern_to -#pragma maplibre: define lowp float pixel_ratio_from -#pragma maplibre: define lowp float pixel_ratio_to -void main() { -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize mediump vec4 pattern_from -#pragma maplibre: initialize mediump vec4 pattern_to -#pragma maplibre: initialize lowp float pixel_ratio_from -#pragma maplibre: initialize lowp float pixel_ratio_to -if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}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=projectTile(a_pos+u_fill_translate,a_pos);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_size; +#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=projectTile(a_pos+u_fill_translate,a_pos);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; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif -}`),fillPattern:qo(`#ifdef GL_ES +}`),fillPattern:jn(`#ifdef GL_ES precision highp float; #endif -uniform vec2 u_texsize;uniform float u_fade;uniform bool u_sdf_pattern;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; -#pragma maplibre: define lowp float opacity -#pragma maplibre: define highp vec4 color -#pragma maplibre: define lowp vec4 pattern_from -#pragma maplibre: define lowp vec4 pattern_to -void main() { -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize mediump vec4 pattern_from -#pragma maplibre: 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=texture(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=texture(u_image,pos2);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*opacity;} else {fragColor=mix(color1,color2,u_fade)*opacity;} +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; -#pragma maplibre: define lowp float opacity -#pragma maplibre: define highp vec4 color -#pragma maplibre: define lowp vec4 pattern_from -#pragma maplibre: define lowp vec4 pattern_to -#pragma maplibre: define lowp float pixel_ratio_from -#pragma maplibre: define lowp float pixel_ratio_to -void main() { -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize mediump vec4 pattern_from -#pragma maplibre: initialize mediump vec4 pattern_to -#pragma maplibre: initialize lowp float pixel_ratio_from -#pragma maplibre: initialize lowp float pixel_ratio_to -if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}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=projectTile(a_pos+u_fill_translate,a_pos);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:qo(`in vec4 v_color;void main() {fragColor=v_color; +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out 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=projectTile(a_pos+u_fill_translate,a_pos);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:jn(`in vec4 v_color;void main() {fragColor=v_color; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed; +}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D -layout(location=2) in vec2 a_centroid; +in vec2 a_centroid; #endif out vec4 v_color; -#pragma maplibre: define highp float base -#pragma maplibre: define highp float height -#pragma maplibre: define highp vec4 color -void main() { -#pragma maplibre: initialize highp float base -#pragma maplibre: initialize highp float height -#pragma maplibre: initialize highp vec4 color -vec3 normal=vec3(a_normal_ed.xyz); +#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=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else @@ -3076,67 +3012,67 @@ float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0 #ifdef GLOBE mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); #endif -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:qo(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; -#pragma maplibre: define lowp float base -#pragma maplibre: define lowp float height -#pragma maplibre: define lowp vec4 pattern_from -#pragma maplibre: define lowp vec4 pattern_to -#pragma maplibre: define lowp float pixel_ratio_from -#pragma maplibre: define lowp float pixel_ratio_to -void main() { -#pragma maplibre: initialize lowp float base -#pragma maplibre: initialize lowp float height -#pragma maplibre: initialize mediump vec4 pattern_from -#pragma maplibre: initialize mediump vec4 pattern_to -#pragma maplibre: initialize lowp float pixel_ratio_from -#pragma maplibre: initialize lowp float pixel_ratio_to +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:jn(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in 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=texture(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=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`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 vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed; +}`,`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 vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D -layout(location=2) in vec2 a_centroid; +in vec2 a_centroid; #endif #ifdef GLOBE out vec3 v_sphere_pos; #endif out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; -#pragma maplibre: define lowp float base -#pragma maplibre: define lowp float height -#pragma maplibre: define lowp vec4 pattern_from -#pragma maplibre: define lowp vec4 pattern_to -#pragma maplibre: define lowp float pixel_ratio_from -#pragma maplibre: define lowp float pixel_ratio_to -void main() { -#pragma maplibre: initialize lowp float base -#pragma maplibre: initialize lowp float height -#pragma maplibre: initialize mediump vec4 pattern_from -#pragma maplibre: initialize mediump vec4 pattern_to -#pragma maplibre: initialize lowp float pixel_ratio_from -#pragma maplibre: 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=vec3(a_normal_ed.xyz);float edgedistance=float(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; +#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=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); #endif -vec2 pos=a_normal_ed.x==1 && a_normal_ed.y==0 && a_normal_ed.z==16384 +vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos -: vec2(edgedistance,elevation*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:qo(`#ifdef GL_ES +: vec2(edgedistance,elevation*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:jn(`#ifdef GL_ES precision highp float; #endif -uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(ivec2 texel) {vec4 data=texelFetch(u_image,texel,0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {ivec2 pos=ivec2(gl_FragCoord.xy)+ivec2(1);float tileSize=u_dimension.x-4.0;float a=getElevation(pos+ivec2(-1,-1));float b=getElevation(pos+ivec2(0,-1));float c=getElevation(pos+ivec2(1,-1));float d=getElevation(pos+ivec2(-1,0));float e=getElevation(pos);float f=getElevation(pos+ivec2(1,0));float g=getElevation(pos+ivec2(-1,1));float h=getElevation(pos+ivec2(0,1));float i=getElevation(pos+ivec2(1,1));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))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); +uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;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))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;layout(location=1) in vec2 a_texture_pos;out 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:qo(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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:jn(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; #define PI 3.141592653589793 #define STANDARD 0 #define COMBINED 1 @@ -3145,22 +3081,22 @@ fragColor=vec4(1.0); #define BASIC 4 float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;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_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else {fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else -{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec2 size=vec2(textureSize(u_image,0));vec2 texturePos=(v_pos*(size-2.0)+1.0)/size;vec4 pixel=texture(u_image,texturePos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} +{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:qo(`flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; +}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:jn(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif -#pragma maplibre: define highp vec4 color -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity void main() { -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -clipAntimeridian();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);fragColor=color*(alpha*opacity); +#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);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif @@ -3169,24 +3105,24 @@ fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 -layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; #ifdef GLOBE out float v_depth; #endif -#pragma maplibre: define highp vec4 color -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity -#pragma maplibre: define mediump float gapwidth -#pragma maplibre: define lowp float offset -#pragma maplibre: define mediump float width -void main() { -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize mediump float gapwidth -#pragma maplibre: initialize lowp float offset -#pragma maplibre: initialize mediump float width -if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);v_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*2.0;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif @@ -3195,16 +3131,16 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),lineGradient:qo(`uniform sampler2D u_image;flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; +v_width2=vec2(outset,inset);}`),lineGradient:jn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity void main() { -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -clipAntimeridian();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=texture(u_image,v_uv);fragColor=color*(alpha*opacity); +#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=texture(u_image,v_uv);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif @@ -3213,22 +3149,22 @@ fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 -layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; +in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; #ifdef GLOBE out float v_depth; #endif -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity -#pragma maplibre: define mediump float gapwidth -#pragma maplibre: define lowp float offset -#pragma maplibre: define mediump float width -void main() { -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize mediump float gapwidth -#pragma maplibre: initialize lowp float offset -#pragma maplibre: initialize mediump float width -if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);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=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif @@ -3237,27 +3173,27 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),linePattern:qo(`#ifdef GL_ES +v_width2=vec2(outset,inset);}`),linePattern:jn(`#ifdef GL_ES precision highp float; #endif -uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;flat in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;flat in float v_width; +uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width; #ifdef GLOBE in float v_depth; #endif -#pragma maplibre: define lowp vec4 pattern_from -#pragma maplibre: define lowp vec4 pattern_to -#pragma maplibre: define lowp float pixel_ratio_from -#pragma maplibre: define lowp float pixel_ratio_to -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity -void main() { -#pragma maplibre: initialize mediump vec4 pattern_from -#pragma maplibre: initialize mediump vec4 pattern_to -#pragma maplibre: initialize lowp float pixel_ratio_from -#pragma maplibre: initialize lowp float pixel_ratio_to -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -clipAntimeridian();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(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*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 +#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(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif @@ -3267,32 +3203,32 @@ fragColor=vec4(1.0); }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;flat out float v_width; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width; #ifdef GLOBE out float v_depth; #endif -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity -#pragma maplibre: define lowp float offset -#pragma maplibre: define mediump float gapwidth -#pragma maplibre: define mediump float width -#pragma maplibre: define lowp float floorwidth -#pragma maplibre: define lowp vec4 pattern_from -#pragma maplibre: define lowp vec4 pattern_to -#pragma maplibre: define lowp float pixel_ratio_from -#pragma maplibre: define lowp float pixel_ratio_to -void main() { -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize lowp float offset -#pragma maplibre: initialize mediump float gapwidth -#pragma maplibre: initialize mediump float width -#pragma maplibre: initialize lowp float floorwidth -#pragma maplibre: initialize mediump vec4 pattern_from -#pragma maplibre: initialize mediump vec4 pattern_to -#pragma maplibre: initialize lowp float pixel_ratio_from -#pragma maplibre: initialize lowp float pixel_ratio_to -if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif @@ -3301,26 +3237,26 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.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:qo(`uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:jn(`uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif -#pragma maplibre: define highp vec4 color -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity -#pragma maplibre: define mediump float width -#pragma maplibre: define lowp float floorwidth -#pragma maplibre: define mediump vec4 dasharray_from -#pragma maplibre: define mediump vec4 dasharray_to -void main() { -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize mediump float width -#pragma maplibre: initialize lowp float floorwidth -#pragma maplibre: initialize mediump vec4 dasharray_from -#pragma maplibre: initialize mediump vec4 dasharray_to -clipAntimeridian();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=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); +#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 +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +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 +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +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=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif @@ -3330,30 +3266,30 @@ fragColor=vec4(1.0); }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; #ifdef GLOBE out float v_depth; #endif -#pragma maplibre: define highp vec4 color -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity -#pragma maplibre: define mediump float gapwidth -#pragma maplibre: define lowp float offset -#pragma maplibre: define mediump float width -#pragma maplibre: define lowp float floorwidth -#pragma maplibre: define mediump vec4 dasharray_from -#pragma maplibre: define mediump vec4 dasharray_to -void main() { -#pragma maplibre: initialize highp vec4 color -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize mediump float gapwidth -#pragma maplibre: initialize lowp float offset -#pragma maplibre: initialize mediump float width -#pragma maplibre: initialize lowp float floorwidth -#pragma maplibre: initialize mediump vec4 dasharray_from -#pragma maplibre: initialize mediump vec4 dasharray_to -if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#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 +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +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 +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif @@ -3362,24 +3298,24 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:qo(`uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:jn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity -#pragma maplibre: define mediump float width -#pragma maplibre: define lowp float floorwidth -#pragma maplibre: define mediump vec4 dasharray_from -#pragma maplibre: define mediump vec4 dasharray_to -void main() { -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize mediump float width -#pragma maplibre: initialize lowp float floorwidth -#pragma maplibre: initialize mediump vec4 dasharray_from -#pragma maplibre: initialize mediump vec4 dasharray_to -clipAntimeridian();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=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +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=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif @@ -3389,28 +3325,28 @@ fragColor=vec4(1.0); }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; +in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; #ifdef GLOBE out float v_depth; #endif -#pragma maplibre: define lowp float blur -#pragma maplibre: define lowp float opacity -#pragma maplibre: define mediump float gapwidth -#pragma maplibre: define lowp float offset -#pragma maplibre: define mediump float width -#pragma maplibre: define lowp float floorwidth -#pragma maplibre: define mediump vec4 dasharray_from -#pragma maplibre: define mediump vec4 dasharray_to -void main() { -#pragma maplibre: initialize lowp float blur -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize mediump float gapwidth -#pragma maplibre: initialize lowp float offset -#pragma maplibre: initialize mediump float width -#pragma maplibre: initialize lowp float floorwidth -#pragma maplibre: initialize mediump vec4 dasharray_from -#pragma maplibre: initialize mediump vec4 dasharray_to -if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#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 +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +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 +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_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;float texel_height=1.0/u_image_height;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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif @@ -3419,79 +3355,75 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),layerOpacity:qo(`uniform sampler2D u_image;uniform float u_opacity;in vec2 v_pos;void main() {fragColor=texture(u_image,v_pos)*u_opacity; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(0.0); -#endif -}`,"layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=vec4(a_pos.x*2.0-1.0,1.0-a_pos.y*2.0,0.0,1.0);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),raster:qo(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec3 v_pos0;in vec3 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=texture(u_image0,v_pos0.xy/v_pos0.z);vec4 color1=texture(u_image1,v_pos1.xy/v_pos1.z);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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),raster:jn(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in 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=texture(u_image0,v_pos0);vec4 color1=texture(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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec3 u_image_warp;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;layout(location=0) in vec2 a_pos;out vec3 v_pos0;out vec3 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 topLeft=u_coords_top.xy;vec2 topRight=u_coords_top.zw;vec2 bottomLeft=u_coords_bottom.xy;vec2 bottomRight=u_coords_bottom.zw;vec2 bilinearPos=mix(mix(topLeft,topRight,fractionalPos.x),mix(bottomLeft,bottomRight,fractionalPos.x),fractionalPos.y);float denominator=dot(u_image_warp.xy,fractionalPos)+1.0;vec2 acrossTop=topRight-topLeft+u_image_warp.x*topRight;vec2 downLeft=bottomLeft-topLeft+u_image_warp.y*bottomLeft;vec2 projectivePos=(acrossTop*fractionalPos.x+downLeft*fractionalPos.y+topLeft)/denominator;vec2 position=mix(projectivePos,bilinearPos,u_image_warp.z);gl_Position=projectTile(position,position);vec2 texturePos=((fractionalPos-0.5)/u_buffer_scale)+0.5; +}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5; #ifdef GLOBE -if (a_pos.y <-32767.5) {texturePos.y=0.0;}if (a_pos.y > 32766.5) {texturePos.y=1.0;} +if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} #endif -float perspectiveRatio=mix(1.0/denominator,1.0,u_image_warp.z);v_pos0=vec3(texturePos*perspectiveRatio,perspectiveRatio);vec2 parentPos=(texturePos*u_scale_parent)+u_tl_parent;v_pos1=vec3(parentPos*perspectiveRatio,perspectiveRatio);}`),symbolIcon:qo(`uniform sampler2D u_texture;in vec2 v_tex;flat in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; +v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:jn(`uniform sampler2D u_texture;in vec2 v_tex;in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;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 bool u_rotate_symbol;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;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_tex;flat out float v_total_opacity; -#pragma maplibre: define lowp float opacity +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_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;out vec2 v_tex;out float v_total_opacity; +#pragma mapbox: define lowp float opacity void main() { -#pragma maplibre: initialize lowp float opacity -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +#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);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_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}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);if (!u_is_offset) {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; +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; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif -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;}`),symbolSDF:qo(`#define SDF_PX 8.0 -uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; -#pragma maplibre: define highp vec4 fill_color -#pragma maplibre: define highp vec4 halo_color -#pragma maplibre: define lowp float halo_width -#pragma maplibre: define lowp float halo_blur -void main() { -#pragma maplibre: initialize highp vec4 fill_color -#pragma maplibre: initialize highp vec4 halo_color -#pragma maplibre: initialize lowp float halo_width -#pragma maplibre: initialize lowp float halo_blur +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;}`),symbolSDF:jn(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#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 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 total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;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_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 bool u_rotate_symbol;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_data0;out vec3 v_data1; -#pragma maplibre: define highp vec4 fill_color -#pragma maplibre: define highp vec4 halo_color -#pragma maplibre: define lowp float opacity -#pragma maplibre: define lowp float halo_width -#pragma maplibre: define lowp float halo_blur -void main() { -#pragma maplibre: initialize highp vec4 fill_color -#pragma maplibre: initialize highp vec4 halo_color -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize lowp float halo_width -#pragma maplibre: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_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;out vec2 v_data0;out 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/16.0;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);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));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}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);if (!u_is_offset) {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; +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; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif -vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,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;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:qo(`#define SDF_PX 8.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)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:jn(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 -uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;in vec4 v_data0;in vec3 v_data1;flat in float v_is_sdf; -#pragma maplibre: define highp vec4 fill_color -#pragma maplibre: define highp vec4 halo_color -#pragma maplibre: define lowp float halo_width -#pragma maplibre: define lowp float halo_blur -void main() { -#pragma maplibre: initialize highp vec4 fill_color -#pragma maplibre: initialize highp vec4 halo_color -#pragma maplibre: initialize lowp float halo_width -#pragma maplibre: initialize lowp float halo_blur -float total_opacity=v_data1[2];if (v_is_sdf==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; +uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#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 halo_width +#pragma mapbox: initialize lowp float halo_blur +float total_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif @@ -3499,50 +3431,101 @@ return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float ga #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec3 a_projected_pos;layout(location=3) in uint a_fade_opacity;layout(location=4) in float a_height_offset;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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;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;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec4 v_data0;out vec3 v_data1;flat out float v_is_sdf; -#pragma maplibre: define highp vec4 fill_color -#pragma maplibre: define highp vec4 halo_color -#pragma maplibre: define lowp float opacity -#pragma maplibre: define lowp float halo_width -#pragma maplibre: define lowp float halo_blur -void main() { -#pragma maplibre: initialize highp vec4 fill_color -#pragma maplibre: initialize highp vec4 halo_color -#pragma maplibre: initialize lowp float opacity -#pragma maplibre: initialize lowp float halo_width -#pragma maplibre: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);float is_sdf=float(a_data.z & 1u);float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in 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_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;out vec4 v_data0;out 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;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);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));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}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);if (!u_is_offset) {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; +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; #ifdef GLOBE if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif -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;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec3(gamma_scale,size,total_opacity);v_is_sdf=is_sdf;}`),terrain:qo("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;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in 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=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && 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);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","layout(location=0) in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out 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=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:qo("in 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() {fragColor=pack(v_depth);}","layout(location=0) in vec3 a_pos3d;uniform float u_ele_delta;out 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=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),atmosphere:qo(`#ifdef GL_ES +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;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,total_opacity,is_sdf);}`),terrain:jn("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;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in 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=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && 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);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out 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=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:jn("in 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() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out 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=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:jn("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out 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=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:jn("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:jn(`#ifdef GL_ES precision highp float; #endif in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 -);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:qo("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;uniform vec3 u_globe_position;uniform float u_globe_radius;in vec3 v_view_direction;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (u_sky_blend > 0.0) {vec3 ray=normalize(v_view_direction);float globe_distance=length(u_globe_position);float angle_to_globe_center=acos(clamp(dot(ray,u_globe_position)/globe_distance,-1.0,1.0));float horizon_angle=asin(min(u_globe_radius/globe_distance,1.0));blend=mix(blend,(angle_to_globe_center-horizon_angle)*u_camera_to_center_distance*u_device_pixel_ratio,u_sky_blend);}if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 v_view_direction;void main() {v_view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,1.0,1.0);}")},zC="#define PROJECTION_MERCATOR",BC="mercator",W3=class{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return BC}get shaderDefine(){return zC}get shaderPreludeCode(){return Hd.projectionMercator}get vertexShaderPreludeCode(){return Hd.projectionMercator.vertexSource}get subdivisionGranularity(){return Vw.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}destroy(){}getMeshFromTileID(e,r,t,a,i){if(this._cachedMesh)return this._cachedMesh;let o=new Kp;o.emplaceBack(0,0),o.emplaceBack(xa,0),o.emplaceBack(0,xa),o.emplaceBack(xa,xa);let s=e.createVertexBuffer(o,G0.members),l=Zs.simpleSegment(0,0,4,2),n=new Vd;n.emplaceBack(1,0,2),n.emplaceBack(1,2,3);let u=e.createIndexBuffer(n);return this._cachedMesh=new Z1(s,u,l),this._cachedMesh}recalculate(){}hasTransition(){return!1}},$3=class EQ{constructor(r=0,t=0,a=0,i=0){if(isNaN(r)||r<0||isNaN(t)||t<0||isNaN(a)||a<0||isNaN(i)||i<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=r,this.bottom=t,this.left=a,this.right=i}interpolate(r,t,a){return t.top!=null&&r.top!=null&&(this.top=Xs.number(r.top,t.top,a)),t.bottom!=null&&r.bottom!=null&&(this.bottom=Xs.number(r.bottom,t.bottom,a)),t.left!=null&&r.left!=null&&(this.left=Xs.number(r.left,t.left,a)),t.right!=null&&r.right!=null&&(this.right=Xs.number(r.right,t.right,a)),this}getCenter(r,t){let a=Gn((this.left+r-this.right)/2,0,r),i=Gn((this.top+t-this.bottom)/2,0,t);return new zr(a,i)}equals(r){return this.top===r.top&&this.bottom===r.bottom&&this.left===r.left&&this.right===r.right}clone(){return new EQ(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}},Y3=class{constructor(e,r){var t;this.applyConstrain=(a,i)=>this._constrainOverride===null?this._callbacks.defaultConstrain(a,i):this._constrainOverride(a,i),this._callbacks=e,this._tileSize=512,this._renderWorldCopies=r?.renderWorldCopies===void 0||!!r?.renderWorldCopies,this._minZoom=r?.minZoom||0,this._maxZoom=r?.maxZoom||22,this._minPitch=r?.minPitch===void 0||r?.minPitch===null?0:r?.minPitch,this._maxPitch=r?.maxPitch===void 0||r?.maxPitch===null?60:r?.maxPitch,this._constrainOverride=(t=r?.constrainOverride)!=null?t:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new ln(0,0),this._elevation=0,this._zoom=0,this._tileZoom=L8(this._zoom),this._scale=bf(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new $3,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,r,t){this._constrainOverride=e.constrainOverride,this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=L8(this._zoom),this._scale=bf(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new $3(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!t&&e.autoCalculateNearFarZ,r&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){if(this._minZoom===e)return;this._minZoom=e;let r=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=r}get maxZoom(){return this._maxZoom}setMaxZoom(e){if(this._maxZoom===e)return;this._maxZoom=e;let r=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=r}get minPitch(){return this._minPitch}setMinPitch(e){if(this._minPitch===e)return;this._minPitch=e;let r=this._unmodified;this.setPitch(Math.max(this.pitch,e)),this._unmodified=r}get maxPitch(){return this._maxPitch}setMaxPitch(e){if(this._maxPitch===e)return;this._maxPitch=e;let r=this._unmodified;this.setPitch(Math.min(this.pitch,e)),this._unmodified=r}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){e===void 0&&(e=null),this._constrainOverride!==e&&(this._constrainOverride=e,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new zr(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){let r=qh(e,-180,180)*Math.PI/180;this._bearingInRadians!==r&&(this._unmodified=!1,this._bearingInRadians=r,this._calcMatrices(),this._rotationMatrix=XN(),bme(this._rotationMatrix,this._rotationMatrix,-this._bearingInRadians))}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let r=Gn(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==r&&(this._unmodified=!1,this._pitchInRadians=r,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){let r=e/180*Math.PI;this._rollInRadians!==r&&(this._unmodified=!1,this._rollInRadians=r,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return cp(this._fovInRadians)}setFov(e){e=Gn(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=il(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let r=this.applyConstrain(this._center,e).zoom;this._zoom!==r&&(this._unmodified=!1,this._zoom=r,this._tileZoom=Math.max(0,Math.floor(r)),this._scale=bf(r),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(e){(e.lat!==this._center.lat||e.lng!==this._center.lng)&&(this._unmodified=!1,this._center=e,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,r){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=r,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,r,t){this._unmodified=!1,this._edgeInsets.interpolate(e,r,t),this.constrainInternal(),this._calcMatrices()}resize(e,r,t=!0){this._width=e,this._height=r,t&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var e,r;return((e=this._latRange)==null?void 0:e.length)!==2||((r=this._lngRange)==null?void 0:r.length)!==2?null:new Qh([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-zd,zd])}getCameraQueryGeometry(e,r){if(r.length===1)return[r[0],e];{let{minX:t,minY:a,maxX:i,maxY:o}=Xh.fromPoints(r).extend(e);return[new zr(t,a),new zr(i,a),new zr(i,o),new zr(t,o),new zr(t,a)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:r,zoom:t}=this.applyConstrain(this.center,this.zoom);this.setCenter(r),this.setZoom(t),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._pixelPerMeter=Qv(1,this.center.lat)*this.worldSize,!this._width||!this._height)return;this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=Id(new Float64Array(16));wc(e,e,[this._width/2,-this._height/2,1]),Xl(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=Id(new Float64Array(16)),wc(e,e,[1,-1,1]),Xl(e,e,[-1,-1,0]),wc(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e;let r=this.fovInRadians/2;this._cameraToCenterDistance=.5/Math.tan(r)*this._height,this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,r,t,a){let i=t===void 0?this.bearing:t,o=a=a===void 0?this.pitch:a,{distanceToCenter:s,clampedElevation:l}=this._distanceToCenterFromAltElevationPitch(r,this.elevation,o),{x:n,y:u}=BE(o,i),c=$o.fromLngLat(e,r),f=y5(1,c.y),h,d,p=0;do{if(p+=1,p>10)break;d=s/f;let g=n*d,m=u*d;h=new $o(c.x+g,c.y+m),f=1/h.meterInMercatorCoordinateUnits()}while(Math.abs(s-d*f)>1e-12);return{center:h.toLngLat(),elevation:l,zoom:Tc(this.height/2/Math.tan(this.fovInRadians/2)/d/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e===0)return;let r=1/this.worldSize,t=Qv(1,this.center.lat)*this.worldSize,a=$o.fromLngLat(this.center,this.elevation),i=a.x/r,o=a.y/r,s=a.z/r,l=this.pitch,n=this.bearing,{x:u,y:c,z:f}=BE(l,n),h=this.cameraToCenterDistance,d=i+h*-u,p=o+h*-c,g=s+h*f,{distanceToCenter:m,clampedElevation:y}=this._distanceToCenterFromAltElevationPitch(g/t,e,l),_=m*t,v=d+u*_,x=p+c*_,E=new $o(v*r,x*r,0).toLngLat(),M=Qv(1,E.lat),C=Tc(this.height/2/Math.tan(this.fovInRadians/2)/m/M/this.tileSize);this._elevation=y,this._center=E,this.setZoom(C)}_distanceToCenterFromAltElevationPitch(e,r,t){let a=-Math.cos(il(t)),i=e-r,o,s=r;return a*i>=0||Math.abs(a)<.1?(o=1e4,s=e+o*a):o=-i/a,{distanceToCenter:o,clampedElevation:s}}getCameraPoint(){let e=this.pitchInRadians,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new zr(r*Math.sin(this.rollInRadians),r*Math.cos(this.rollInRadians)))}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let r=e.canonical.z>=0?1<a}allowWorldCopies(){return!0}prepareNextFrame(){}},dU=pl([{name:"a_pos3d",type:"Int16",components:3}]),pU=class extends Zl{constructor(e){super(),this._lastTilesetChange=is(),this.tileManager=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null,this.releaseAllRTT()}getSource(){return this.tileManager._source}update(e,r){this.tileManager.update(e,r),this._renderableTilesKeys=[];let t={},a=!1;for(let i of W1(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r,calculateTileZoom:this.tileManager._source.calculateTileZoom}))t[i.key]=!0,this._renderableTilesKeys.push(i.key),this._tiles[i.key]||(i.terrainRttPosMatrix32f=new Float32Array(16),Rd(i.terrainRttPosMatrix32f,0,xa,xa,0,0,1),this._tiles[i.key]=new kC(i,this.tileSize),this._lastTilesetChange=is(),a=!0);for(let i in this._tiles)t[i]||(this._tiles[i].releaseRTT(this.tileManager.map.painter),delete this._tiles[i],a=!0);return a}releaseRTT(e){for(let r in this._tiles){let t=this._tiles[r];(t.tileID.equals(e)||t.tileID.isChildOf(e)||e.isChildOf(t.tileID))&&t.releaseRTT(this.tileManager.map.painter)}}releaseAllRTT(){for(let e in this._tiles)this._tiles[e].releaseRTT(this.tileManager.map.painter)}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,r){return r?this._getTerrainCoordsForTileRanges(e,r):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let r={};for(let t of this._renderableTilesKeys){let a=this._tiles[t].tileID,i=e.clone(),o=qv();if(a.canonical.equals(e.canonical))Rd(o,0,xa,xa,0,0,1);else if(a.canonical.isChildOf(e.canonical)){let s=a.canonical.z-e.canonical.z,l=a.canonical.x-(a.canonical.x>>s<>s<>s;Rd(o,0,u,u,0,0,1),Xl(o,o,[-l*u,-n*u,0])}else if(e.canonical.isChildOf(a.canonical)){let s=e.canonical.z-a.canonical.z,l=e.canonical.x-(e.canonical.x>>s<>s<>s;Rd(o,0,xa,xa,0,0,1),Xl(o,o,[l*u,n*u,0]),wc(o,o,[1/2**s,1/2**s,0])}else continue;i.terrainRttPosMatrix32f=new Float32Array(o),r[t]=i}return r}_getTerrainCoordsForTileRanges(e,r){let t={};for(let a of this._renderableTilesKeys){let i=this._tiles[a].tileID;if(!this._isWithinTileRanges(i,r))continue;let o=e.clone(),s=qv();if(i.canonical.z===e.canonical.z){let l=e.canonical.x-i.canonical.x+e.wrap*(1<e.canonical.z){let l=i.canonical.z-e.canonical.z,n=i.canonical.x-(i.canonical.x>>l<>l<>l),f=e.canonical.y-(i.canonical.y>>l),h=xa>>l;Rd(s,0,h,h,0,0,1),Xl(s,s,[-n*h+c*xa,-u*h+f*xa,0])}else{let l=e.canonical.z-i.canonical.z,n=e.canonical.x-(e.canonical.x>>l<>l<>l)-i.canonical.x,f=(e.canonical.y>>l)-i.canonical.y,h=xa<i.maxzoom&&(o=i.maxzoom),o=i.minzoom&&!s?.dem;)s=this.findTileInCaches(e.scaledTo(o--).key);return s}findTileInCaches(e){let r=this.tileManager.getTileByID(e);return r||(r=this.tileManager._outOfViewCache.getByKey(e),r)}anyTilesAfterTime(e=is()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,r){let t=r[e.canonical.z];return!!t&&(e.wrap>t.minWrap||e.wrap=t.minTileXWrapped&&e.canonical.x<=t.maxTileXWrapped&&e.canonical.y>=t.minTileY&&e.canonical.y<=t.maxTileY)}},OC=xa*(1-1e-12),vU=class{constructor(e,r,t,a="auto"){this._meshCache={},this.painter=e,this.tileManager=new pU(r),this.options=t,this.exaggeration=typeof t.exaggeration=="number"?t.exaggeration:1,this._terrainSkirtLength=a,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache=new Map,this._elevationSamplerCache=new Map}destroy(){this._fbo&&(this._fbo=(this._fbo.destroy(),null)),this._fboDepthTexture&&(this._fboDepthTexture=(this._fboDepthTexture.destroy(),null)),this._emptyDemTexture&&(this._emptyDemTexture=(this._emptyDemTexture.destroy(),null)),this._emptyDepthTexture&&(this._emptyDepthTexture=(this._emptyDepthTexture.destroy(),null));for(let e in this._meshCache)this._meshCache[e].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(e,r,t,a=xa){let i=e.normalizeCoordinates(r,t,a);if(!i)return 0;let o=this.getElevationSampler(i.tileID);return o?o(i.x,i.y,a):0}getElevationForLngLatZoom(e,r){if(!tz(r,e.wrap()))return 0;let{tileID:t,mercatorX:a,mercatorY:i}=this._getOverscaledTileIDFromLngLatZoom(e,r);return this.getElevation(t,a%xa,i%xa,xa)}getElevationForLngLat(e,r){let t=this.getCoverageIndex();if(t){let o=$o.fromLngLat(e),s=Qk(t,this.exaggeration,o.x,o.y);if(s.demLoaded)return s.elevation}let a=W1(r,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),i=0;for(let o of a)o.canonical.z>i&&(i=Math.min(o.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,i)}getElevation(e,r,t,a=xa){return this.getDEMElevation(e,r,t,a)*this.exaggeration}resetElevationCache(){this._elevationSamplerCache.clear(),this._coverageIndex=void 0}getCoverageIndex(){return this._coverageIndex===void 0&&(this._coverageIndex=this._buildCoverageIndex()),this._coverageIndex}_buildCoverageIndex(){let e=[],r=new Map,t=0,a=0;for(let i of this.tileManager.getRenderableTiles()){if(!i)continue;let{canonical:o,wrap:s}=i.tileID;e.includes(o.z)||e.push(o.z);let l=this.getElevationSampler(i.tileID);r.set(`${s}/${o.z}/${o.x}/${o.y}`,l);let{minElevation:n,maxElevation:u}=this.getMinMaxElevation(i.tileID);t=Math.min(t,n??0),a=Math.max(a,u??0)}return r.size===0?null:(e.sort((i,o)=>o-i),{zooms:e,samplerPerTile:r,minElevation:t-10,maxElevation:a+10})}getElevationSampler(e){let r=e.key,t=this._elevationSamplerCache.get(r);if(t)return t;let a=this.tileManager.getSourceTile(e,!0),i=a?.dem;if(!a||!i)return null;let o=this._getDEMTileMatrix(e,a),s=o[0]*i.dim,l=o[5]*i.dim,n=o[12]*i.dim,u=o[13]*i.dim,c=(f,h,d)=>{let p=d===8192?1:xa/d;return i.sampleBilinear(f*p*s+n,h*p*l+u)};return this._elevationSamplerCache.set(r,c),c}_getDEMTileMatrix(e,r){let t=`${r.tileID.key}/${e.key}`,a=this._demMatrixCache.get(t);if(a)return a;let i=this.tileManager.getSource().maxzoom,o=e.canonical.z-r.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=i?o=e.canonical.z-i:vo("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let s=e.canonical.x-(e.canonical.x>>o<>o<0,a=t&&e.canonical.y===0,i=t&&e.canonical.y===(1<{a=Gn(+a,this.minZoom,this.maxZoom);let i={center:new ln(t.lng,t.lat),zoom:a},o=this._helper._lngRange;!this._helper._renderWorldCopies&&o===null&&(o=[-179.9999999999,180-1e-10]);let s=this.tileSize*bf(i.zoom),l=0,n=s,u=0,c=s,f=0,h=0,{x:d,y:p}=this.size;if(this._helper._latRange){let x=this._helper._latRange;l=y1(x[1])*s,n=y1(x[0])*s,n-ln&&(_=n-x)}if(o){let x=(u+c)/2,E=g;this._helper._renderWorldCopies&&(E=qh(g,x-s/2,x+s/2));let M=d/2;E-Mc&&(y=c-M)}if(y!==void 0||_!==void 0){let x=new zr(y??g,_??m);i.center=h_(s,x).wrap()}return i},this.applyConstrain=(t,a)=>this._helper.applyConstrain(t,a),this._helper=new Y3({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(t,a)=>this.defaultConstrain(t,a)},r),this._coveringTilesDetailsProvider=new hU}clone(){let r=new SQ;return r.apply(this,!1),r}apply(r,t,a){this._helper.apply(r,t,a)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(r){let t=[new U_(0,r)];if(this._helper._renderWorldCopies){let a=this.screenPointToMercatorCoordinate(new zr(0,0)),i=this.screenPointToMercatorCoordinate(new zr(this._helper._width,0)),o=this.screenPointToMercatorCoordinate(new zr(this._helper._width,this._helper._height)),s=this.screenPointToMercatorCoordinate(new zr(0,this._helper._height)),l=Math.floor(Math.min(a.x,i.x,o.x,s.x)),n=Math.floor(Math.max(a.x,i.x,o.x,s.x));for(let u=l-1;u<=n+1;u++)u!==0&&t.push(new U_(u,r))}return t}getCameraFrustum(){return G3.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(r){let t=this.screenPointToLocation(this.centerPoint,r),a=r?r.getElevationForLngLat(t,this):0;this._helper.recalculateZoomAndCenter(a)}setLocationAtPoint(r,t,a=this.elevation){let i=a-this.elevation,o=this.screenPointToMercatorCoordinateAtZ(t,i),s=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,0),l=$o.fromLngLat(r),n=new $o(l.x-(o.x-s.x),l.y-(o.y-s.y));this.setCenter(n?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(r,t){return t?this.coordinatePoint($o.fromLngLat(r),t.getElevationForLngLat(r,this),this._pixelMatrix3D):this.coordinatePoint($o.fromLngLat(r))}screenPointToLocation(r,t){var a;return(a=this.screenPointToMercatorCoordinate(r,t))==null?void 0:a.toLngLat()}screenPointToLocationAtElevation(r,t){var a;return(a=this.screenPointToMercatorCoordinateAtZ(r,t-this.elevation))==null?void 0:a.toLngLat()}screenPointToMercatorCoordinate(r,t){if(t){let a=this.screenTerrainPointToMercatorCoordinate(r,t);if(a!=null)return a}return this.screenPointToMercatorCoordinateAtZ(r)}screenTerrainPointToMercatorCoordinate(r,t){let a=t.getCoverageIndex();if(!a)return null;let{near:i,far:o}=this.getRaySegmentFromPixel(r),s=this.worldSize,l=o[0]-i[0],n=o[1]-i[1],u=o[2]-i[2],c={index:a,exaggeration:t.exaggeration,near:i,dx:l,dy:n,dz:u,worldSize:s},f=0,h=1;if(u===0){if(i[2]>a.maxElevation||i[2]h)return null}let d=Math.hypot(l,n),p=Gn(Math.ceil(d*(h-f)/4),1,512),g=0,m=!T3(c,0);for(let y=0;y<=p;y++){let _=f+(h-f)*y/p;if(!m)m=!T3(c,_);else if(T3(c,_)){let{lo:v,hi:x}=P8(c,T3,g,_,.001/d),E=A3(c,v),M=A3(c,x),C=i[2]+v*u-E.elevation,w=i[2]+x*u-M.elevation,k=E.covered&&C>w?Gn(v+C*(x-v)/(C-w),v,x):x;return new $o((i[0]+k*l)/s,(i[1]+k*n)/s,A3(c,k).elevation)}g=_}return null}getRaySegmentFromPixel(r){let t=[r.x,r.y,0,1],a=[r.x,r.y,1,1];Cu(t,t,this._pixelMatrixInverse),Cu(a,a,this._pixelMatrixInverse);let i=t[3],o=a[3],s=this.elevation;return{near:[t[0]/i,t[1]/i,t[2]/i+s],far:[a[0]/o,a[1]/o,a[2]/o+s]}}screenPointToMercatorCoordinateAtZ(r,t){let a=t||0,{near:i,far:o}=this.getRaySegmentFromPixel(r),s=i[2]===o[2]?0:(a+this.elevation-i[2])/(o[2]-i[2]);return new $o(Xs.number(i[0],o[0],s)/this.worldSize,Xs.number(i[1],o[1],s)/this.worldSize,a)}coordinatePoint(r,t=0,a=this._pixelMatrix){let i=[r.x*this.worldSize,r.y*this.worldSize,t,1];return Cu(i,i,a),new zr(i[0]/i[3],i[1]/i[3])}getBounds(){let r=Math.max(0,this._helper._height/2-d_(this));return new Qh().extend(this.screenPointToLocation(new zr(0,r))).extend(this.screenPointToLocation(new zr(this._helper._width,r))).extend(this.screenPointToLocation(new zr(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new zr(0,this._helper._height)))}isPointOnMapSurface(r,t){return t?this.screenTerrainPointToMercatorCoordinate(r,t)!=null:r.y>this.height/2-d_(this)}calculatePosMatrix(r,t=!1,a=!1){var i;let o=(i=r.key)!=null?i:_1(r.wrap,r.canonical.z,r.canonical.z,r.canonical.x,r.canonical.y),s=t?this._alignedPosMatrixCache:this._posMatrixCache;if(s.has(o)){let u=s.get(o);return a?u.f32:u.f64}let l=zE(r,this.worldSize);t1(l,t?this._alignedProjMatrix:this._viewProjMatrix,l);let n={f64:l,f32:new Float32Array(l)};return s.set(o,n),a?n.f32:n.f64}calculateFogMatrix(r){let t=r.key,a=this._fogMatrixCacheF32;if(a.has(t))return a.get(t);let i=zE(r,this.worldSize);return t1(i,this._fogMatrix,i),a.set(t,new Float32Array(i)),a.get(t)}calculateCenterFromCameraLngLatAlt(r,t,a,i){return this._helper.calculateCenterFromCameraLngLatAlt(r,t,a,i)}calculateCameraOptionsFromTo(r,t,a,i){let o=$o.fromLngLat(r,t),s=$o.fromLngLat(a,i),l=s.x-o.x,n=s.y-o.y,u=s.z-o.z,c=Math.hypot(l,n,u);if(c===0)throw Error("Can't calculate camera options with same From and To");let f=Math.hypot(l,n),h=Tc(this.cameraToCenterDistance/c/this.tileSize),d=cp(Math.atan2(l,-n)),p=cp(Math.acos(f/c));return p=u<0?90-p:90+p,{center:s.toLngLat(),elevation:i,zoom:h,pitch:p,bearing:d}}_calculateNearFarZIfNeeded(r,t,a){if(!this._helper.autoCalculateNearFarZ)return;let i=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),o=r-i*this._helper._pixelPerMeter/Math.cos(t),s=i<0?o:r,l=Math.PI/2+this.pitchInRadians,n=il(this.fov)*(Math.abs(Math.cos(il(this.roll)))*this.height+Math.abs(Math.sin(il(this.roll)))*this.width)/this.height*(.5+a.y/this.height),u=Math.sin(n)*s/Math.sin(Gn(Math.PI-l-n,.01,Math.PI-.01)),c=d_(this),f=Math.atan(c/this._helper.cameraToCenterDistance),h=il(90-N0),d=f>h?2*f*(.5+a.y/(c*2)):h,p=Math.sin(d)*s/Math.sin(Gn(Math.PI-l-d,.01,Math.PI-.01)),g=Math.min(u,p);this._helper._farZ=(Math.cos(Math.PI/2-t)*g+s)*1.01,this._helper._nearZ=this._helper._height/50}_calcMatrices(){let r=this.centerOffset,t=fp(this.worldSize,this.center),a=t.x,i=t.y,o=il(Math.min(this.pitch,N0)),s=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(o));this._calculateNearFarZIfNeeded(s,o,r);let l;l=new Float64Array(16),W2(l,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),S1e(this._invProjMatrix,l),l[8]=-r.x*2/this._helper._width,l[9]=r.y*2/this._helper._height,this._projectionMatrix=zM(l),wc(l,l,[1,-1,1]),Xl(l,l,[0,0,-this._helper.cameraToCenterDistance]),A0(l,l,-this.rollInRadians),r1(l,l,this.pitchInRadians),A0(l,l,-this.bearingInRadians),Xl(l,l,[-a,-i,0]),this._mercatorMatrix=wc([],l,[this.worldSize,this.worldSize,this.worldSize]),wc(l,l,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=t1(new Float64Array(16),this.clipSpaceToPixelsMatrix,l),Xl(l,l,[0,0,-this.elevation]),this._viewProjMatrix=l,this._invViewProjMatrix=Yb([],l);let n=[0,0,-1,1];Cu(n,n,this._invViewProjMatrix),this._cameraPosition=[n[0]/n[3],n[1]/n[3],n[2]/n[3]],this._fogMatrix=new Float64Array(16),W2(this._fogMatrix,this.fovInRadians,this.width/this.height,s,this._helper._farZ),this._fogMatrix[8]=-r.x*2/this.width,this._fogMatrix[9]=r.y*2/this.height,wc(this._fogMatrix,this._fogMatrix,[1,-1,1]),Xl(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),A0(this._fogMatrix,this._fogMatrix,-this.rollInRadians),r1(this._fogMatrix,this._fogMatrix,this.pitchInRadians),A0(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),Xl(this._fogMatrix,this._fogMatrix,[-a,-i,0]),wc(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),Xl(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=t1(new Float64Array(16),this.clipSpaceToPixelsMatrix,l);let u=this._helper._width%2/2,c=this._helper._height%2/2,f=Math.cos(this.bearingInRadians),h=Math.sin(-this.bearingInRadians),d=a-Math.round(a)+f*u+h*c,p=i-Math.round(i)+f*c+h*u,g=new Float64Array(l);if(Xl(g,g,[d>.5?d-1:d,p>.5?p-1:p,0]),this._alignedProjMatrix=g,l=Yb(new Float64Array(16),this._pixelMatrix),!l)throw Error("failed to invert matrix");this._pixelMatrixInverse=l,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let r=this.screenPointToMercatorCoordinate(new zr(0,0)),t=[r.x*this.worldSize,r.y*this.worldSize,0,1];return Cu(t,t,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this.cameraToCenterDistance/this.pixelsPerMeter+this.elevation}getCameraLngLat(){let r=Qv(1,this.center.lat)*this.worldSize,t=this._helper.cameraToCenterDistance/r;return x5(this.center,this.elevation,this.pitch,this.bearing,t).toLngLat()}lngLatToCameraDepth(r,t){let a=$o.fromLngLat(r),i=[a.x*this.worldSize,a.y*this.worldSize,t,1];return Cu(i,i,this._viewProjMatrix),i[2]/i[3]}getProjectionData(r){let{overscaledTileID:t,aligned:a,applyTerrainMatrix:i}=r,o=this._helper.getMercatorTileCoordinates(t),s=t?this.calculatePosMatrix(t,a,!0):null,l;return l=t?.terrainRttPosMatrix32f&&i?t.terrainRttPosMatrix32f:s||OI(),{mainMatrix:l,tileMercatorCoords:o,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:l,clipAntimeridian:!1}}isLocationOccluded(r){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(r,t,a){return 1}transformLightDirection(r){return BM(r)}getRayDirectionFromPixel(r){throw Error("Not implemented.")}projectTileCoordinates(r,t,a,i){let o=this.calculatePosMatrix(a),s;i==null?(s=[r,t,0,1],Zk(s,s,o)):(s=[r,t,i,1],Cu(s,s,o));let l=s[3];return{point:new zr(s[0]/l,s[1]/l),signedDistanceFromCamera:l,isOccluded:!1}}populateCache(r){for(let t of r)this.calculatePosMatrix(t)}getProjectionDataForCustomLayer(r=!0){let t=new Yu(0,0,0,0,0),a=this.getProjectionData({overscaledTileID:t,applyGlobeMatrix:r}),i=zE(t,this.worldSize);t1(i,this._viewProjMatrix,i);let o=[xa,xa,this.worldSize/this._helper.pixelsPerMeter],s=qv();return wc(s,i,o),Ci(ja({},a),{tileMercatorCoords:[0,0,1,1],fallbackMatrix:s,mainMatrix:s})}getFastPathSimpleProjectionMatrix(r){return this.calculatePosMatrix(r)}},ax=class{get useGlobeControls(){return!1}handlePanInertia(e,r){let t=e.mag(),a=Math.abs(d_(r));return{easingOffset:e.mult(Math.min(a*.75/t,1)),easingCenter:r.center}}handleMapControlsRollPitchBearingZoom(e,r){e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta),e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta)}handleMapControlsPan(e,r,t){e.around.distSqr(r.centerPoint)<.01||r.setLocationAtPoint(t,e.around,e.aroundElevation)}cameraForBoxAndBearing(e,r,t,a,i){return z8(e,r,t,a,i)}handleJumpToCenterZoom(e,r){let t=r.zoom===void 0?e.zoom:+r.zoom;e.zoom!==t&&e.setZoom(+r.zoom),r.center!==void 0&&e.setCenter(ln.convert(r.center))}handleEaseTo(e,r){let t=e.zoom,a=e.padding,i={roll:e.roll,pitch:e.pitch,bearing:e.bearing},o={roll:r.roll===void 0?e.roll:r.roll,pitch:r.pitch===void 0?e.pitch:r.pitch,bearing:r.bearing===void 0?e.bearing:r.bearing},s=r.zoom!==void 0,l=!e.isPaddingEqual(r.padding),n=!1,u=s?+r.zoom:e.zoom,c=e.centerPoint.add(r.offsetAsPoint),f=e.screenPointToLocation(c),{center:h,zoom:d}=e.applyConstrain(ln.convert(r.center||f),u??t);w3(e,h);let p=fp(e.worldSize,f),g=fp(e.worldSize,h).sub(p),m=bf(d-t);return n=d!==t,{easeFunc:y=>{if(n&&e.setZoom(Xs.number(t,d,y)),UI(i,o)||R8({startEulerAngles:i,endEulerAngles:o,tr:e,k:y,useSlerp:i.roll!=o.roll}),l&&(e.interpolatePadding(a,r.padding,y),c=e.centerPoint.add(r.offsetAsPoint)),r.around)e.setLocationAtPoint(r.around,r.aroundPoint);else{let _=bf(e.zoom-t),v=(d>t?Math.min(2,m):Math.max(.5,m))**(1-y),x=h_(e.worldSize,p.add(g.mult(y*v)).mult(_));e.setLocationAtPoint(e.renderWorldCopies?x.wrap():x,c)}},isZooming:n,elevationCenter:h}}handleFlyTo(e,r){let t=r.zoom!==void 0,a=e.zoom,i=e.applyConstrain(ln.convert(r.center||r.locationAtOffset),t?+r.zoom:a),o=i.center,s=i.zoom;w3(e,o);let l=e.worldSize,n=fp(l,r.locationAtOffset),u=fp(l,o).sub(n),c=u.mag(),f=bf(s-a),h=r.minZoom===void 0?e.minZoom:+r.minZoom,d=Math.max(h,e.minZoom),p=Math.min(d,a,s),g=e.applyConstrain(o,p).zoom;return{easeFunc:(m,y,_,v)=>{e.setZoom(m===1?s:a+Tc(y));let x=m===1?o:h_(l,n.add(u.mult(_)));e.setLocationAtPoint(e.renderWorldCopies?x.wrap():x,v)},scaleOfZoom:f,targetCenter:o,scaleOfMinZoom:bf(g-a),pixelPathLength:c}}},gU=()=>mU||(mU=new Du({type:new Ti(ta.projection.type,"type")})),X3=new Vw({fill:new yp(128,2),line:new yp(512,0),tile:new yp(128,32),stencil:new yp(128,1),circle:3}),jC=class{constructor(){this._tileMeshCache={}}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return Hd.projectionGlobe}get vertexShaderPreludeCode(){return Hd.projectionMercator.vertexSource}get subdivisionGranularity(){return X3}get useGlobeControls(){return!0}destroy(){}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,r,t,a,i){let o=(i==="stencil"?X3.stencil:X3.tile).getGranularityForZoomLevel(r.z),s=r.y===0&&a,l=r.y===(1<0}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}getMeshFromTileID(e,r,t,a,i){return this.currentProjection.getMeshFromTileID(e,r,t,a,i)}setProjection(e){this._transitionable.setValue("type",e?.type||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}},Z3=Math.PI*.98,yU=class{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,r,t,a){let i=`${e.z}_${e.x}_${e.y}_${a?.terrain?"t":""}_${Math.round(t)}`,o=this._cache.get(i);if(o)return o;let s=this._cachePrevious.get(i);if(s)return this._cache.set(i,s),s;let l=this._boundingVolumeFactory(e,r,t,a);return this._cache.set(i,l),this._hadAnyChanges=!0,l}},K3=class AD{constructor(r,t,a,i){this.min=a,this.max=i,this.points=r,this.planes=t}static fromAabb(r,t){let a=[];for(let i=0;i<8;i++)a.push([(i>>0&1)==1?t[0]:r[0],(i>>1&1)==1?t[1]:r[1],(i>>2&1)==1?t[2]:r[2]]);return new AD(a,[[-1,0,0,t[0]],[1,0,0,-r[0]],[0,-1,0,t[1]],[0,1,0,-r[1]],[0,0,-1,t[2]],[0,0,1,-r[2]]],r,t)}static fromCenterSizeAngles(r,t,a){let i=jM([],a[0],a[1],a[2]),o=OM([],[t[0],0,0],i),s=OM([],[0,t[1],0],i),l=OM([],[0,0,t[2]],i),n=[...r],u=[...r];for(let f=0;f<8;f++)for(let h=0;h<3;h++){let d=r[h]+o[h]*((f>>0&1)==1?1:-1)+s[h]*((f>>1&1)==1?1:-1)+l[h]*((f>>2&1)==1?1:-1);n[h]=Math.min(n[h],d),u[h]=Math.max(u[h],d)}let c=[];for(let f=0;f<8;f++){let h=[...r];jh(h,h,Ws([],o,(f>>0&1)==1?1:-1)),jh(h,h,Ws([],s,(f>>1&1)==1?1:-1)),jh(h,h,Ws([],l,(f>>2&1)==1?1:-1)),c.push(h)}return new AD(c,[[...o,-uu(o,c[0])],[...s,-uu(s,c[0])],[...l,-uu(l,c[0])],[-o[0],-o[1],-o[2],-uu(o,c[7])],[-s[0],-s[1],-s[2],-uu(s,c[7])],[-l[0],-l[1],-l[2],-uu(l,c[7])]],n,u)}intersectsFrustum(r){let t=!0,a=this.points.length,i=this.planes.length,o=r.planes.length,s=r.points.length;for(let l=0;l=0&&u++}if(u===0)return 0;u=0&&u++}if(u===0)return 0}return 1}intersectsPlane(r){let t=this.points.length,a=0;for(let i=0;i=0&&a++}return a===t?2:a===0?0:1}},_U=class{constructor(){this._boundingVolumeCache=new yU(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,r,t,a){let i=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(e,r,t,a){return this._boundingVolumeCache.getTileBoundingVolume(e,r,t,a)}_computeTileBoundingVolume(e,r,t,a){var i,o;let s=Math.min(0,t),l=Math.max(0,t);if(a?.terrain){let n=new Yu(e.z,r,e.z,e.x,e.y),u=a.terrain.getMinMaxElevation(n);s=(i=u.minElevation)!=null?i:s,l=Math.max((o=u.maxElevation)!=null?o:l,l)}if(s/=Vc,l/=Vc,s+=1,l+=1,e.z<=0)return K3.fromAabb([-l,-l,-l],[l,l,l]);if(e.z===1)return K3.fromAabb([e.x===0?-l:0,e.y===0?0:-l,-l],[e.x===0?0:l,e.y===0?l:0,l]);{let n=[V0(0,0,e.x,e.y,e.z),V0(xa,0,e.x,e.y,e.z),V0(xa,xa,e.x,e.y,e.z),V0(0,xa,e.x,e.y,e.z)],u=[];for(let T of n)u.push(Ws([],T,l));if(l!==s)for(let T of n)u.push(Ws([],T,s));e.y===0&&u.push([0,1,0]),e.y===(1<=(1<{let i=Gn(t.lat,-zd,zd),o=Gn(+a,this.minZoom+Zu(0,i),this.maxZoom);return{center:new ln(t.lng,i),zoom:o}},this.applyConstrain=(t,a)=>this._helper.applyConstrain(t,a),this._helper=new Y3({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(t,a)=>this.defaultConstrain(t,a)},r),this._coveringTilesDetailsProvider=new _U}clone(){let r=new kQ;return r.apply(this,!1),r}apply(r,t){this._helper.apply(r,t)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixF64}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let r=as();return r[0]=this._cameraPosition[0],r[1]=this._cameraPosition[1],r[2]=this._cameraPosition[2],r}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(r){let{overscaledTileID:t,applyGlobeMatrix:a}=r,i=this._helper.getMercatorTileCoordinates(t);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:i,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!a,fallbackMatrix:this._globeViewProjMatrix32f,clipAntimeridian:t?.canonical.z===0}}_computeClippingPlane(r){let t=this.pitchInRadians,a=this.cameraToCenterDistance/r,i=Math.sin(t)*a,o=Math.cos(t)*a+1,s=1/Math.sqrt(i*i+o*o)*1,l=-i,n=o,u=Math.sqrt(l*l+n*n);l/=u,n/=u;let c=[0,l,n];NM(c,c,[0,0,0],-this.bearingInRadians),Vy(c,c,[0,0,0],-1*this.center.lat*Math.PI/180),a1(c,c,[0,0,0],this.center.lng*Math.PI/180);let f=1/Yp(c);return Ws(c,c,f),[...c,-s*f]}isLocationOccluded(r){return!this.isSurfacePointVisible(pu(r))}transformLightDirection(r){let t=this._helper._center.lng*Math.PI/180,a=this._helper._center.lat*Math.PI/180,i=Math.cos(a),o=[Math.sin(t)*i,Math.sin(a),Math.cos(t)*i],s=[o[2],0,-o[0]],l=[0,0,0];Nf(l,s,o),xf(s,s),xf(l,l);let n=[s[0]*r[0]+l[0]*r[1]+o[0]*r[2],s[1]*r[0]+l[1]*r[1]+o[1]*r[2],s[2]*r[0]+l[2]*r[1]+o[2]*r[2]],u=[0,0,0];return xf(u,n),u}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(r,t,a){let i=_5(r,t,a.canonical),o=z1e(i.x,i.y);return this.getCircleRadiusCorrection()/Math.cos(o[1])}projectTileCoordinates(r,t,a,i){let o=a.canonical,s=V0(r,t,o.x,o.y,o.z),l=1+(i??0)/Vc,n=s[0]*l,u=s[1]*l,c=s[2]*l,f=[n,u,c,1];Cu(f,f,this._globeViewProjMatrixF64);let h;if(l<=1){let d=this._cachedClippingPlane;h=d[0]*s[0]+d[1]*s[1]+d[2]*s[2]+d[3]<0}else h=this._isLineOfSightBlocked(n,u,c);return{point:new zr(f[0]/f[3],f[1]/f[3]),signedDistanceFromCamera:f[3],isOccluded:h}}_isLineOfSightBlocked(r,t,a){let i=this._cameraPosition,o=r-i[0],s=t-i[1],l=a-i[2],n=o*o+s*s+l*l;if(n===0)return!1;let u=Gn(-(i[0]*o+i[1]*s+i[2]*l)/n,0,1),c=i[0]+u*o,f=i[1]+u*s,h=i[2]+u*l;return c*c+f*f+h*h<1}_calcMatrices(){let r=Y1(this.worldSize,this.center.lat),t=qv();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+r*2),W2(t,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let a=this.centerOffset;t[8]=-a.x*2/this._helper._width,t[9]=a.y*2/this._helper._height,this._projectionMatrix=zM(t),this._globeProjMatrixInverted=qv(),Yb(this._globeProjMatrixInverted,t),Xl(t,t,[0,0,-this.cameraToCenterDistance]),A0(t,t,this.rollInRadians),r1(t,t,-this.pitchInRadians),A0(t,t,this.bearingInRadians),Xl(t,t,[0,0,-r]);let i=as();i[0]=r,i[1]=r,i[2]=r,r1(t,t,this.center.lat*Math.PI/180),CI(t,t,-this.center.lng*Math.PI/180),wc(t,t,i),this._globeViewProjMatrixF64=t,this._globeViewProjMatrix32f=new Float32Array(t),this._globeViewProjMatrixF64Inverted=qv(),Yb(this._globeViewProjMatrixF64Inverted,t);let o=as();this._cameraPosition=as(),this._cameraPosition[2]=this.cameraToCenterDistance/r,NM(this._cameraPosition,this._cameraPosition,o,-this.rollInRadians),Vy(this._cameraPosition,this._cameraPosition,o,this.pitchInRadians),NM(this._cameraPosition,this._cameraPosition,o,-this.bearingInRadians),jh(this._cameraPosition,this._cameraPosition,[0,0,1]),Vy(this._cameraPosition,this._cameraPosition,o,-this.center.lat*Math.PI/180),a1(this._cameraPosition,this._cameraPosition,o,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(r);let s=zM(this._globeViewProjMatrixF64Inverted);wc(s,s,[1,1,-1]),this._cachedFrustum=G3.fromInvProjectionMatrix(s,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(r){vo("calculateFogMatrix is not supported on globe projection.");let t=qv();return Id(t),t}getVisibleUnwrappedCoordinates(r){return[new U_(0,r)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(r){if(r){vo("terrain is not fully supported on vertical perspective projection.");return}this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return(Yp(this._cameraPosition)-1)*Vc}getCameraLngLat(){let r=as();return xf(r,this._cameraPosition),$_(r)}lngLatToCameraDepth(r,t){let a=pu(r);Ws(a,a,1+t/Vc);let i=T0();return Cu(i,[a[0],a[1],a[2],1],this._globeViewProjMatrixF64),i[2]/i[3]}populateCache(r){}getBounds(){let r=this.width*.5,t=this.height*.5,a=[new zr(0,0),new zr(r,0),new zr(this.width,0),new zr(this.width,t),new zr(this.width,this.height),new zr(r,this.height),new zr(0,this.height),new zr(0,t)],i=[];for(let f of a)i.push(this.unprojectScreenPoint(f));let o=0,s=0,l=0,n=0,u=this.center;for(let f of i){let h=ch(u.lng,f.lng),d=ch(u.lat,f.lat);ho&&(o=h),dl&&(l=d)}let c=[u.lng+s,u.lat+n,u.lng+o,u.lat+l];return this.isSurfacePointOnScreen([0,1,0])&&(c[3]=90,c[0]=-180,c[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(c[1]=-90,c[0]=-180,c[2]=180),new Qh(c)}calculateCenterFromCameraLngLatAlt(r,t,a,i){return this._helper.calculateCenterFromCameraLngLatAlt(r,t,a,i)}calculateCameraOptionsFromTo(r,t,a,i){let o=ln.convert(a),s=pu(ln.convert(r));Ws(s,s,1+t/Vc);let l=pu(o),n=Ws(as(),l,1+i/Vc),u=FI(as(),s,l),c=Yp(u);if(c=-_&&g<=_,x=y>=-_&&y<=_,E,M;if(v&&x){let T=this.center.lng*Math.PI/180,b=this.center.lat*Math.PI/180,S=Qb(h,T),A=Qb(g,b),F=Qb(d,T),D=Qb(y,b);S+A=0}isSurfacePointOnScreen(r){if(!this.isSurfacePointVisible(r))return!1;let t=T0();return Cu(t,[...r,1],this._globeViewProjMatrixF64),t[0]/=t[3],t[1]/=t[3],t[2]/=t[3],t[0]>-1&&t[0]<1&&t[1]>-1&&t[1]<1&&t[2]>-1&&t[2]<1}unprojectScreenPoint(r){let t=this._cameraPosition,a=this.getRayDirectionFromPixel(r),i=E3(t,a);if(i){let c=as();jh(c,t,[a[0]*i.tMin,a[1]*i.tMin,a[2]*i.tMin]);let f=as();return xf(f,c),$_(f)}let o=this._cachedClippingPlane,s=o[0]*a[0]+o[1]*a[1]+o[2]*a[2],l=-qM(o,t)/s,n=as();if(l>0)jh(n,t,[a[0]*l,a[1]*l,a[2]*l]);else{let c=as();jh(c,t,[a[0]*2,a[1]*2,a[2]*2]);let f=qM(this._cachedClippingPlane,c);hp(n,c,[this._cachedClippingPlane[0]*f,this._cachedClippingPlane[1]*f,this._cachedClippingPlane[2]*f])}let u=q1e(o);return $_(V1e(u.center,u.radius,n))}getProjectionDataForCustomLayer(r=!0){let t=this.getProjectionData({overscaledTileID:new Yu(0,0,0,0,0),applyGlobeMatrix:r});return t.tileMercatorCoords=[0,0,1,1],t}getFastPathSimpleProjectionMatrix(r){}},GC=class CQ{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(r){this._helper.setMinZoom(r)}setMaxZoom(r){this._helper.setMaxZoom(r)}setMinPitch(r){this._helper.setMinPitch(r)}setMaxPitch(r){this._helper.setMaxPitch(r)}setRenderWorldCopies(r){this._helper.setRenderWorldCopies(r)}setBearing(r){this._helper.setBearing(r)}setPitch(r){this._helper.setPitch(r)}setRoll(r){this._helper.setRoll(r)}setFov(r){this._helper.setFov(r)}setZoom(r){this._helper.setZoom(r)}setCenter(r){this._helper.setCenter(r)}setElevation(r){this._helper.setElevation(r)}setMinElevationForCurrentTile(r){this._helper.setMinElevationForCurrentTile(r)}setPadding(r){this._helper.setPadding(r)}interpolatePadding(r,t,a){this._helper.interpolatePadding(r,t,a)}isPaddingEqual(r){return this._helper.isPaddingEqual(r)}resize(r,t,a=!0){this._helper.resize(r,t,a)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(r){this._helper.setMaxBounds(r)}setConstrainOverride(r){this._helper.setConstrainOverride(r)}overrideNearFarZ(r,t){this._helper.overrideNearFarZ(r,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(r){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),r)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(r){this._globeness=r,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(r){this._globeness=1,this.defaultConstrain=(t,a)=>this.currentTransform.defaultConstrain(t,a),this.applyConstrain=(t,a)=>this._helper.applyConstrain(t,a),this._helper=new Y3({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(t,a)=>this.defaultConstrain(t,a)},r),this._globeness=1,this._mercatorTransform=new rx,this._verticalPerspectiveTransform=new VC}clone(){let r=new CQ;return r._globeness=this._globeness,r.apply(this,!1),r}apply(r,t){this._helper.apply(r,t),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(r){let t=this._mercatorTransform.getProjectionData(r),a=this._verticalPerspectiveTransform.getProjectionData(r);return{mainMatrix:this.isGlobeRendering?a.mainMatrix:t.mainMatrix,clippingPlane:a.clippingPlane,tileMercatorCoords:a.tileMercatorCoords,projectionTransition:r.applyGlobeMatrix?this._globeness:0,fallbackMatrix:t.fallbackMatrix,clipAntimeridian:a.clipAntimeridian}}isLocationOccluded(r){return this.currentTransform.isLocationOccluded(r)}transformLightDirection(r){return this.currentTransform.transformLightDirection(r)}getPixelScale(){return i1(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return i1(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(r,t,a){let i=this._mercatorTransform.getPitchedTextCorrection(r,t,a),o=this._verticalPerspectiveTransform.getPitchedTextCorrection(r,t,a);return i1(i,o,this._globeness)}projectTileCoordinates(r,t,a,i){return this.currentTransform.projectTileCoordinates(r,t,a,i)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(r){return this.currentTransform.calculateFogMatrix(r)}getVisibleUnwrappedCoordinates(r){return this.currentTransform.getVisibleUnwrappedCoordinates(r)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(r){this.currentTransform.recalculateZoomAndCenter(r)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this.currentTransform.getCameraAltitude()}getCameraLngLat(){return this.currentTransform.getCameraLngLat()}lngLatToCameraDepth(r,t){return this.currentTransform.lngLatToCameraDepth(r,t)}populateCache(r){this._mercatorTransform.populateCache(r),this._verticalPerspectiveTransform.populateCache(r)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(r,t,a,i){return this._helper.calculateCenterFromCameraLngLatAlt(r,t,a,i)}calculateCameraOptionsFromTo(r,t,a,i){return this.currentTransform.calculateCameraOptionsFromTo(r,t,a,i)}setLocationAtPoint(r,t,a){if(!this.isGlobeRendering){this._mercatorTransform.setLocationAtPoint(r,t,a),this.apply(this._mercatorTransform,!1);return}this._verticalPerspectiveTransform.setLocationAtPoint(r,t,a),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(r,t){return this.currentTransform.locationToScreenPoint(r,t)}screenPointToMercatorCoordinate(r,t){return this.currentTransform.screenPointToMercatorCoordinate(r,t)}screenTerrainPointToMercatorCoordinate(r,t){return this.currentTransform.screenTerrainPointToMercatorCoordinate(r,t)}screenPointToLocation(r,t){return this.currentTransform.screenPointToLocation(r,t)}screenPointToLocationAtElevation(r,t){return this.currentTransform.screenPointToLocationAtElevation(r,t)}isPointOnMapSurface(r,t){return this.currentTransform.isPointOnMapSurface(r,t)}getRayDirectionFromPixel(r){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(r)}getProjectionDataForCustomLayer(r=!0){let t=this._mercatorTransform.getProjectionDataForCustomLayer(r);if(!this.isGlobeRendering)return t;let a=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(r);return a.fallbackMatrix=t.mainMatrix,a.projectionTransition=this._globeness,a}getFastPathSimpleProjectionMatrix(r){return this.currentTransform.getFastPathSimpleProjectionMatrix(r)}},HC=class u0{get useGlobeControls(){return!0}handlePanInertia(r,t){let a=H1e(r,t);return Math.abs(a.lng-t.center.lng)>180&&(a.lng=t.center.lng+179.5*Math.sign(a.lng-t.center.lng)),{easingCenter:a,easingOffset:new zr(0,0)}}handleMapControlsRollPitchBearingZoom(r,t){let a=r.around,i=t.screenPointToLocation(a);r.bearingDelta&&t.setBearing(t.bearing+r.bearingDelta),r.pitchDelta&&t.setPitch(t.pitch+r.pitchDelta),r.rollDelta&&t.setRoll(t.roll+r.rollDelta);let o=t.zoom;r.zoomDelta&&t.setZoom(t.zoom+r.zoomDelta);let s=t.zoom-o;if(s===0)return;let l=ch(t.center.lng,i.lng),n=l/(Math.abs(l/180)+1),u=ch(t.center.lat,i.lat),c=t.getRayDirectionFromPixel(a),f=t.cameraPosition,h=uu(f,c)*-1,d=as();jh(d,f,[c[0]*h,c[1]*h,c[2]*h]);let p=Yp(d),g=p-1,m=Math.exp(-Math.max(g-.3,0)*.5),y=e2(p,.95,.999,0,1),_=Y1(t.worldSize,t.center.lat)/Math.min(t.width,t.height),v=e2(_,.9,.5,1,.25),x=Math.min(m,i1(1,v,y)),E=(1-bf(-s))*x,M=t.center.lat,C=t.zoom,w=new ln(t.center.lng+n*E,Gn(t.center.lat+u*E,-zd,zd));t.setLocationAtPoint(i,a);let k=t.center,T=e2(Math.abs(l),45,85,0,1),b=Math.max(T,y)**.25,S=ch(k.lng,w.lng),A=ch(k.lat,w.lat);t.setCenter(new ln(k.lng+S*b,k.lat+A*b).wrap()),t.setZoom(C+Zu(M,t.center.lat))}handleMapControlsPan(r,t,a){r.panDelta&&j1e(t,a,t.isPointOnMapSurface(r.around)?r.around:t.centerPoint,r.panDelta)}cameraForBoxAndBearing(r,t,a,i,o){let s=z8(r,t,a,i,o),l=t.left/o.width*2-1,n=(o.width-t.right)/o.width*2-1,u=t.top/o.height*-2+1,c=(o.height-t.bottom)/o.height*-2+1,f=ch(a.getWest(),a.getEast())<0,h=f?a.getEast():a.getWest(),d=f?a.getWest():a.getEast(),p=Math.max(a.getNorth(),a.getSouth()),g=Math.min(a.getNorth(),a.getSouth()),m=h+ch(h,d)*.5,y=p+ch(p,g)*.5,_=o.clone();_.setCenter(s.center),_.setBearing(s.bearing),_.setPitch(0),_.setRoll(0),_.setZoom(s.zoom);let v=_.modelViewProjectionMatrix,x=[pu(a.getNorthWest()),pu(a.getNorthEast()),pu(a.getSouthWest()),pu(a.getSouthEast()),pu(new ln(d,y)),pu(new ln(h,y)),pu(new ln(m,p)),pu(new ln(m,g))],E=pu(s.center),M=1/0;for(let C of x)l<0&&(M=u0.getLesserNonNegativeNonNull(M,u0.solveVectorScale(C,E,v,"x",l))),n>0&&(M=u0.getLesserNonNegativeNonNull(M,u0.solveVectorScale(C,E,v,"x",n))),u>0&&(M=u0.getLesserNonNegativeNonNull(M,u0.solveVectorScale(C,E,v,"y",u))),c<0&&(M=u0.getLesserNonNegativeNonNull(M,u0.solveVectorScale(C,E,v,"y",c)));if(!Number.isFinite(M)||M===0){I8();return}return s.zoom=Math.min(_.zoom+Tc(M),r.maxZoom),s}handleJumpToCenterZoom(r,t){let a=r.center.lat,i=r.applyConstrain(t.center?ln.convert(t.center):r.center,r.zoom).center;r.setCenter(i.wrap());let o=t.zoom===void 0?r.zoom+Zu(a,i.lat):+t.zoom;r.zoom!==o&&r.setZoom(o)}handleEaseTo(r,t){let a=r.zoom,i=r.center,o=r.padding,s={roll:r.roll,pitch:r.pitch,bearing:r.bearing},l={roll:t.roll===void 0?r.roll:t.roll,pitch:t.pitch===void 0?r.pitch:t.pitch,bearing:t.bearing===void 0?r.bearing:t.bearing},n=t.zoom!==void 0,u=!r.isPaddingEqual(t.padding),c=!1,f=t.center?ln.convert(t.center):i,h=r.applyConstrain(f,a).center;w3(r,h);let d=r.clone();d.setCenter(h),d.setZoom(n?+t.zoom:a+Zu(i.lat,f.lat)),d.setBearing(t.bearing);let p=new zr(Gn(r.centerPoint.x+t.offsetAsPoint.x,0,r.width),Gn(r.centerPoint.y+t.offsetAsPoint.y,0,r.height));d.setLocationAtPoint(h,p);let g=(t.offset&&t.offsetAsPoint.mag())>0?d.center:h,m=n?+t.zoom:a+Zu(i.lat,g.lat),y=a+Zu(i.lat,0),_=m+Zu(g.lat,0),v=ch(i.lng,g.lng),x=ch(i.lat,g.lat),E=bf(_-y);return c=m!==a,{easeFunc:M=>{if(UI(s,l)||R8({startEulerAngles:s,endEulerAngles:l,tr:r,k:M,useSlerp:s.roll!=l.roll}),u&&r.interpolatePadding(o,t.padding,M),t.around)vo("Easing around a point is not supported under globe projection."),r.setLocationAtPoint(t.around,t.aroundPoint);else{let C=M*(_>y?Math.min(2,E):Math.max(.5,E))**(1-M),w=j8(i,v,x,C);r.setCenter(w.wrap())}if(c){let C=Xs.number(y,_,M)+Zu(0,r.center.lat);r.setZoom(C)}},isZooming:c,elevationCenter:g}}handleFlyTo(r,t){let a=t.zoom!==void 0,i=r.center,o=r.zoom,s=r.padding,l=!r.isPaddingEqual(t.padding),n=r.applyConstrain(ln.convert(t.center||t.locationAtOffset),o).center,u=a?+t.zoom:r.zoom+Zu(r.center.lat,n.lat),c=r.clone();c.setCenter(n),c.setZoom(u),c.setBearing(t.bearing);let f=new zr(Gn(r.centerPoint.x+t.offsetAsPoint.x,0,r.width),Gn(r.centerPoint.y+t.offsetAsPoint.y,0,r.height));c.setLocationAtPoint(n,f);let h=c.center;w3(r,h);let d=R1e(r,i,h),p=o+Zu(i.lat,0),g=u+Zu(h.lat,0),m=bf(g-p),y=typeof t.minZoom=="number"?+t.minZoom:r.minZoom,_=Math.max(y,r.minZoom)+Zu(h.lat,0),v=Math.min(_,p,g)+Zu(0,h.lat),x=r.applyConstrain(h,v).zoom+Zu(h.lat,0),E=bf(x-p),M=ch(i.lng,h.lng),C=ch(i.lat,h.lat);return{easeFunc:(w,k,T,b)=>{let S=j8(i,M,C,T);l&&r.interpolatePadding(s,t.padding,w);let A=w===1?h:S;r.setCenter(A.wrap());let F=p+Tc(k);r.setZoom(w===1?u:F+Zu(0,A.lat))},scaleOfZoom:m,targetCenter:h,scaleOfMinZoom:E,pixelPathLength:d}}static solveVectorScale(r,t,a,i,o){let s=o,l=i==="x"?[a[0],a[4],a[8],a[12]]:[a[1],a[5],a[9],a[13]],n=[a[3],a[7],a[11],a[15]],u=r[0]*l[0]+r[1]*l[1]+r[2]*l[2],c=r[0]*n[0]+r[1]*n[1]+r[2]*n[2],f=t[0]*l[0]+t[1]*l[1]+t[2]*l[2],h=t[0]*n[0]+t[1]*n[1]+t[2]*n[2],d=(f+l[3]-s*h-s*n[3])/(f-u-s*h+s*c);return f+s*c===u+s*h||n[3]*(u-f)+l[3]*(h-c)+u*h===f*c?null:d}static getLesserNonNegativeNonNull(r,t){return t!==null&&t>=0&&t{for(let o in this.tileManagers){let s=this.tileManagers[o].getSource().type;(s==="vector"||s==="geojson")&&this.tileManagers[o].reload()}},this.map=e,this.dispatcher=new _C(Uk(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(o,s)=>this.getGlyphs(o,s)),this.dispatcher.registerMessageHandler("GI",(o,s)=>this.getImages(o,s)),this.dispatcher.registerMessageHandler("GDA",(o,s)=>this.getDashes(o,s)),this.imageManager=new mj,this.imageManager.setEventedParent(this),this.imageManager.setMissingImageResolver(e._missingStyleImageResolver),this.patternAtlas=new gj(this.imageManager);let i=((t=e._container)==null?void 0:t.lang)||typeof document<"u"&&((a=document.documentElement)==null?void 0:a.lang)||void 0;this.glyphManager=new Tj(e._requestManager,r.localIdeographFontFamily,i),this.lineAtlas=new Lj(256,512),this.crossTileSymbolIndex=new IC,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",$M()),H_().on(U3,this._rtlPluginLoaded),this.on("data",o=>{if(o.dataType!=="source"||o.sourceDataType!=="metadata")return;let s=this.tileManagers[o.sourceId];if(!s)return;let l=s.getSource();if(l?.vectorLayerIds)for(let n in this._layers){let u=this._layers[n];u.source===l.id&&this._validateLayer(u)}})}_setInitialValues(){var e;this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new sw,this._imagesListDirty=!1,this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this._symbolPlacementTriggered=!1,this._placedProjectionTransition=void 0,this.crossTileSymbolIndex=new(((e=this.crossTileSymbolIndex)==null?void 0:e.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(e,r){var t,a,i;this._checkLoaded();let o=r===null?(i=(a=(t=this.stylesheet.state)==null?void 0:t[e])==null?void 0:a.default)!=null?i:null:r;if(up(o,this._globalState[e]))return this;this._globalState[e]=o,this._applyGlobalStateChanges([e])}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();let r=[];for(let t in e)up(this._globalState[t],e[t].default)||(r.push(t),this._globalState[t]=e[t].default);this._applyGlobalStateChanges(r)}_applyGlobalStateChanges(e){if(e.length===0)return;let r=new Set,t={};for(let a of e){t[a]=this._globalState[a];for(let i in this._layers){let o=this._layers[i],s=o.getLayoutAffectingGlobalStateRefs(),l=o.getPaintAffectingGlobalStateRefs(),n=o.getVisibilityAffectingGlobalStateRefs();if(s.has(a)&&r.add(o.source),l.has(a))for(let{name:u,value:c}of l.get(a))this._updatePaintProperty(o,u,c);n?.has(a)&&(o.recalculateVisibility(),this._updateLayer(o))}}this.dispatcher.broadcast("UGS",t);for(let a in this.tileManagers)r.has(a)&&(this._reloadSource(a),this._changed=!0)}loadURL(e){return yi(this,arguments,function*(r,t={},a){this.fire(new _h("dataloading")),t.validate=typeof t.validate!="boolean"||t.validate,this._loadStyleRequest=new AbortController;let i=this._loadStyleRequest;try{let o=yield this.map._requestManager.transformRequest(r,"Style");WM(i.signal);let s=yield x_(o,i);this._loadStyleRequest===i&&(this._loadStyleRequest=null),this._load(s.data,t,a)}catch(o){this._loadStyleRequest===i&&(this._loadStyleRequest=null),o&&!i.signal.aborted&&this.fire(new mn(Ac(o)))}})}loadJSON(e,r={},t){this.fire(new _h("dataloading")),this._frameRequest=new AbortController,Hc.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,r.validate=r.validate!==!1,this._load(e,r,t)}).catch(()=>{})}loadEmpty(){this.fire(new _h("dataloading")),this._load(xU,{validate:!1})}_load(e,r,t){var a,i,o;let s=r.transformStyle?r.transformStyle(t,e):e;if(!(r.validate&&VR(this,s))){s=ja({},s),this._loaded=!0,this.stylesheet=s;for(let l in s.sources)this.addSource(l,s.sources[l],{validate:!1});s.sprite?this._loadSprite(s.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(s.glyphs),this.glyphManager.setFontFaces(s["font-faces"]),this._createLayers(),this.light=new Sj((a=this.stylesheet.light)!=null?a:{},this._globalState),this._setProjectionInternal(((i=this.stylesheet.projection)==null?void 0:i.type)||"mercator"),this.sky=new Dj(this.stylesheet.sky,this._globalState),this.map.setTerrain((o=this.stylesheet.terrain)!=null?o:null,{validate:!1}),this.fire(new _h("data")),this.fire(new P3)}}_createLayers(){var e,r,t;let a=ZN(this.stylesheet.layers);this.setGlobalState((e=this.stylesheet.state)!=null?e:null),this.dispatcher.broadcast("SL",a),this._order=a.map(i=>i.id),this._layers={},this._serializedLayers=null;for(let i of a){let o=GE(i,this._globalState);if(o.setEventedParent(this,{layer:{id:i.id}}),this._layers[i.id]=o,fw(o)&&this.tileManagers[o.source]){let s=(t=(r=i.paint)==null?void 0:r["raster-fade-duration"])!=null?t:o.paint.get("raster-fade-duration");this.tileManagers[o.source].setRasterFadeDuration(s)}}}_loadSprite(e,r=!1,t=void 0){return yi(this,null,function*(){this.imageManager.setLoaded(!1);let a=new AbortController;this._spriteRequest=a;let i;try{let o=yield Fme(e,this.map._requestManager,this.map.getPixelRatio(),a);if(!o)return;for(let s in o){let{loaded:l,removed:n}=this.imageManager.setSpriteImages(s,o[s]);this._markImagesChanged(n),r&&this._markImagesChanged(l)}}catch(o){i=o,a.signal.aborted||this.fire(new mn(i))}finally{this._spriteRequest=null,this.imageManager.setLoaded(!0),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this.imageManager.listImages()),this.fire(new _h("data")),t?.(i)}})}_unloadSprite(){this._markImagesChanged(this.imageManager.removeAllSpriteImages()),this._imagesListDirty=!0,this._changed=!0,this.fire(new _h("data"))}_validateLayer(e){let r=this.tileManagers[e.source];if(!r)return;let t=e.sourceLayer;if(!t)return;let a=r.getSource();(a.type==="geojson"||a.vectorLayerIds&&!a.vectorLayerIds.includes(t))&&this.fire(new mn(Error(`Source layer "${t}" does not exist on source "${a.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.tileManagers)if(!this.tileManagers[e].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(e,r=!1){let t=this._serializedAllLayers();if(!e||e.length===0)return Object.values(r?jf(t):t);let a=[];for(let i of e)if(t[i]){let o=r?jf(t[i]):t[i];a.push(o)}return a}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};let r=Object.keys(this._layers);for(let t of r){let a=this._layers[t];a.type!=="custom"&&(e[t]=a.serialize())}return e}hasTransitions(){var e,r,t;if((e=this.light)!=null&&e.hasTransition()||(r=this.sky)!=null&&r.hasTransition()||(t=this.projection)!=null&&t.hasTransition())return!0;for(let a in this.tileManagers)if(this.tileManagers[a].hasTransition())return!0;for(let a in this._layers)if(this._layers[a].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw Error("Style is not done loading.")}update(e){if(!this._loaded)return;let r=this._changed;if(r){this._imagesListDirty&&(this._imagesListDirty=(this.dispatcher.broadcast("SI",this.imageManager.listImages()),!1));let i=Object.keys(this._updatedLayers),o=Object.keys(this._removedLayers);(i.length||o.length)&&this._updateWorkerLayers(i,o);for(let s in this._updatedSources){let l=this._updatedSources[s];if(l==="reload")this._reloadSource(s);else if(l==="clear")this._clearSource(s);else throw Error(`Invalid action ${l}`)}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let s in this._updatedPaintProps)this._layers[s].updateTransitions(e);this._resetUpdates()}let t={};for(let i in this.tileManagers){let o=this.tileManagers[i];t[i]=o.used,o.used=!1}let a=this.imageManager.listImages();for(let i of this._order){let o=this._layers[i];o.recalculate(e,a),!o.isHidden(e.zoom)&&o.source&&(this.tileManagers[o.source].used=!0)}for(let i in t){let o=this.tileManagers[i];!!t[i]!=!!o.used&&o.fire(new Fs("data",{sourceDataType:"visibility",sourceId:i}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,r&&this.fire(new _h("data"))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let r in this.tileManagers)this.tileManagers[r].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.tileManagers)this.tileManagers[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,r){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:r})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var t;this._checkLoaded();let a=this.serialize();if(e=r.transformStyle?r.transformStyle(a,e):e,((t=r.validate)!=null?t:!0)&&VR(this,e))return!1;e=jf(e),e.layers=ZN(e.layers);let i=Dme(a,e),o=this._getOperationsToPerform(i);if(o.unimplemented.length>0)throw Error(`Unimplemented: ${o.unimplemented.join(", ")}.`);if(o.operations.length===0)return!1;for(let s of o.operations)s();return this.stylesheet=e,this._serializedLayers=null,this.fire(new P3({style:this})),!0}_getOperationsToPerform(e){let r=[],t=[];for(let a of e)switch(a.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":r.push(()=>this.addLayer.apply(this,a.args));break;case"removeLayer":r.push(()=>this.removeLayer.apply(this,a.args));break;case"setPaintProperty":r.push(()=>this.setPaintProperty.apply(this,a.args));break;case"setLayoutProperty":r.push(()=>this.setLayoutProperty.apply(this,a.args));break;case"setFilter":r.push(()=>this.setFilter.apply(this,a.args));break;case"addSource":r.push(()=>this.addSource.apply(this,a.args));break;case"removeSource":r.push(()=>this.removeSource.apply(this,a.args));break;case"setLayerZoomRange":r.push(()=>this.setLayerZoomRange.apply(this,a.args));break;case"setLight":r.push(()=>this.setLight.apply(this,a.args));break;case"setGeoJSONSourceData":r.push(()=>this.setGeoJSONSourceData.apply(this,a.args));break;case"setGlyphs":r.push(()=>this.setGlyphs.apply(this,a.args));break;case"setFontFaces":r.push(()=>this.setFontFaces.apply(this,a.args));break;case"setSprite":r.push(()=>this.setSprite.apply(this,a.args));break;case"setTerrain":r.push(()=>this.map.setTerrain.apply(this,a.args));break;case"setSky":r.push(()=>this.setSky.apply(this,a.args));break;case"setProjection":this.setProjection.apply(this,a.args);break;case"setGlobalState":r.push(()=>this.setGlobalState.apply(this,a.args));break;case"setTransition":r.push(()=>{});break;default:t.push(a.command)}return{operations:r,unimplemented:t}}addImage(e,r){if(this.getImage(e)){this.fire(new mn(Error(`An image named "${e}" already exists.`)));return}this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,r){this.imageManager.updateImage(e,r)}getImage(e){return this.imageManager.getImage(e)}setMissingImageResolver(e){this.imageManager.setMissingImageResolver(e)}removeImage(e){if(!this.getImage(e)){this.fire(new mn(Error(`An image named "${e}" does not exist.`)));return}this.imageManager.removeImage(e),this._afterImageUpdated(e)}_markImagesChanged(e){for(let r of e)this._changedImages[r]=!0}_afterImageUpdated(e){this._changedImages[e]=!0,this._imagesListDirty=!0,this._changed=!0,this.fire(new _h("data"))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,t={}){var a;if(this._checkLoaded(),this.tileManagers[e]!==void 0)throw Error(`Source "${e}" already exists.`);if(!r.type)throw Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(LS.has(r.type)&&this._validate(Af.source,`sources.${e}`,r,null,t))return;(a=this.map)!=null&&a._collectResourceTiming&&(r.collectResourceTiming=!0);let i=this.tileManagers[e]=new H3(e,r,this.dispatcher);i.style=this,i.setEventedParent(this,()=>({isSourceLoaded:i.loaded(),source:i.serialize(),sourceId:e})),i.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.tileManagers[e]===void 0)throw Error(`There is no source with this ID=${e}`);for(let t in this._layers)if(this._layers[t].source===e)return this.fire(new mn(Error(`Source "${e}" cannot be removed while layer "${t}" is using it.`)));let r=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],r.fire(new Fs("data",{sourceDataType:"metadata",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,r){if(this._checkLoaded(),this.tileManagers[e]===void 0)throw Error(`There is no source with this ID=${e}`);let t=this.tileManagers[e].getSource();if(t.type!=="geojson")throw Error(`geojsonSource.type is ${t.type}, which is !== 'geojson`);t.setData(r),this._changed=!0}getSource(e){var r;return(r=this.tileManagers[e])==null?void 0:r.getSource()}addLayer(e,r,t={}){this._checkLoaded();let a=e.id;if(this.getLayer(a)){this.fire(new mn(Error(`Layer "${a}" already exists on this map.`)));return}let i;if(e.type==="custom"){if(xE(this,Hpe(e)))return;i=GE(e,this._globalState)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(a,e.source),e=jf(e),e=tn(e,{source:a})),this._validate(Af.layer,`layers.${a}`,e,{arrayIndex:-1},t))return;i=GE(e,this._globalState),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}})}let o=r?this._order.indexOf(r):this._order.length;if(r&&o===-1){this.fire(new mn(Error(`Cannot add layer "${a}" before non-existing layer "${r}".`)));return}if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&i.type!=="custom"){let s=this._removedLayers[a];delete this._removedLayers[a],s.type===i.type?(this._updatedSources[i.source]="reload",this.tileManagers[i.source].pause()):this._updatedSources[i.source]="clear"}this._updateLayer(i),i.onAdd&&i.onAdd(this.map)}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e]){this.fire(new mn(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));return}if(e===r)return;if(r&&!this._order.includes(r)){this.fire(new mn(Error(`Cannot move layer "${e}" before non-existing layer "${r}".`)));return}let t=this._order.indexOf(e);this._order.splice(t,1);let a=r?this._order.indexOf(r):this._order.length;this._order.splice(a,0,e),this._layerOrderChanged=!0}removeLayer(e){var r;this._checkLoaded();let t=this._layers[e];if(!t){this.fire(new mn(Error(`Cannot remove non-existing layer "${e}".`)));return}t.setEventedParent(null);let a=this._order.indexOf(e);this._order.splice(a,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],t.type==="symbol"&&t.source&&((r=this.tileManagers[t.source])==null||r.resetMaxContentElevation()),t.onRemove&&t.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,t){this._checkLoaded();let a=this.getLayer(e);if(!a){this.fire(new mn(Error(`Cannot set the zoom range of non-existing layer "${e}".`)));return}(a.minzoom!==r||a.maxzoom!==t)&&(r!=null&&(a.minzoom=r),t!=null&&(a.maxzoom=t),this._updateLayer(a))}setFilter(e,r,t={}){this._checkLoaded();let a=this.getLayer(e);if(!a){this.fire(new mn(Error(`Cannot filter non-existing layer "${e}".`)));return}if(!up(a.filter,r)){if(r==null){a.setFilter(void 0),this._updateLayer(a);return}this._validate(Af.filter,`layers.${a.id}.filter`,r,null,t)||(a.setFilter(jf(r)),this._updateLayer(a))}}getFilter(e){return jf(this.getLayer(e).filter)}setLayoutProperty(e,r,t,a={}){this._checkLoaded();let i=this.getLayer(e);if(!i){this.fire(new mn(Error(`Cannot style non-existing layer "${e}".`)));return}up(i.getLayoutProperty(r),t)||(i.setLayoutProperty(r,t,a),this._updateLayer(i))}getLayoutProperty(e,r){let t=this.getLayer(e);if(!t){this.fire(new mn(Error(`Cannot get style of non-existing layer "${e}".`)));return}return t.getLayoutProperty(r)}setPaintProperty(e,r,t,a={}){this._checkLoaded();let i=this.getLayer(e);if(!i){this.fire(new mn(Error(`Cannot style non-existing layer "${e}".`)));return}up(i.getPaintProperty(r),t)||this._updatePaintProperty(i,r,t,a)}_updatePaintProperty(e,r,t,a={}){e.setPaintProperty(r,t,a)&&this._updateLayer(e),fw(e)&&r==="raster-fade-duration"&&this.tileManagers[e.source].setRasterFadeDuration(t),this._changed=!0,this._updatedPaintProps[e.id]=!0,e.type==="symbol"&&this.triggerSymbolPlacement(),this._serializedLayers=null}getPaintProperty(e,r){return this.getLayer(e).getPaintProperty(r)}setFeatureState(e,r){this._checkLoaded();let t=e.source,a=e.sourceLayer,i=this.tileManagers[t];if(i===void 0){this.fire(new mn(Error(`The source '${t}' does not exist in the map's style.`)));return}let o=i.getSource().type;if(o==="geojson"&&a){this.fire(new mn(Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(o==="vector"&&!a){this.fire(new mn(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(e.id===void 0){this.fire(new mn(Error("The feature id parameter must be provided.")));return}let s=["__proto__","constructor","prototype"];if(r&&Object.keys(r).some(l=>s.includes(l))){this.fire(new mn(Error(`The feature state should not include one of the following keys: ${s}`)));return}i.setFeatureState(a,e.id,r)}removeFeatureState(e,r){this._checkLoaded();let t=e.source,a=this.tileManagers[t];if(a===void 0){this.fire(new mn(Error(`The source '${t}' does not exist in the map's style.`)));return}let i=a.getSource().type,o=i==="vector"?e.sourceLayer:void 0;if(i==="vector"&&!o){this.fire(new mn(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(r&&typeof e.id!="string"&&typeof e.id!="number"){this.fire(new mn(Error("A feature id is required to remove its specific state property.")));return}a.removeFeatureState(o,e.id,r)}getFeatureState(e){this._checkLoaded();let r=e.source,t=e.sourceLayer,a=this.tileManagers[r];if(a===void 0){this.fire(new mn(Error(`The source '${r}' does not exist in the map's style.`)));return}if(a.getSource().type==="vector"&&!t){this.fire(new mn(Error("The sourceLayer parameter must be provided for vector source types.")));return}return e.id===void 0&&this.fire(new mn(Error("The feature id parameter must be provided."))),a.getFeatureState(t,e.id)}getTransition(){var e;return tn({duration:300,delay:0},(e=this.stylesheet)==null?void 0:e.transition)}serialize(){if(!this._loaded)return;let e=GM(this.tileManagers,i=>i.serialize()),r=this._serializeByIds(this._order,!0),t=this.map.getTerrain()||void 0,a=this.stylesheet;return jI({version:a.version,name:a.name,metadata:a.metadata,light:a.light,sky:a.sky,center:a.center,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,sprite:a.sprite,glyphs:a.glyphs,"font-faces":a["font-faces"],transition:a.transition,projection:a.projection,state:a.state,sources:e,layers:r,terrain:t},i=>i!==void 0)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.tileManagers[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let r=o=>this._layers[o].type==="fill-extrusion",t={},a=[];for(let o=this._order.length-1;o>=0;o--){let s=this._order[o];if(r(s)){t[s]=o;for(let l of e){let n=l[s];if(n)for(let u of n)a.push(u)}}}a.sort((o,s)=>s.intersectionZ-o.intersectionZ);let i=[];for(let o=this._order.length-1;o>=0;o--){let s=this._order[o];if(r(s))for(let l=a.length-1;l>=0;l--){let n=a[l].feature;if(t[n.layer.id]this.map.terrain.getElevation(u,c,f):void 0));return this.placement&&i.push(Wme(this._layers,o,this.tileManagers,e,l,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(i)}querySourceFeatures(e,r){r?.filter&&this._validate(Af.filter,"querySourceFeatures.filter",r.filter,null,r);let t=this.tileManagers[e];return t?$me(t,r?Ci(ja({},r),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,r={}){this._checkLoaded();let t=this.light.getLight(),a=!1;for(let o in e)if(!up(e[o],t[o])){a=!0;break}if(!a)return;let i={now:is(),transition:tn({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(i)}getProjection(){var e;return(e=this.stylesheet)==null?void 0:e.projection}setProjection(e){this._checkLoaded();let r=e??{type:"mercator"};if(this.stylesheet.projection=e,this.projection){if(this.projection.name===r.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(r.type)}getSky(){var e;return(e=this.stylesheet)==null?void 0:e.sky}setSky(e,r={}){this._checkLoaded();let t=this.getSky(),a=!1;if(!e&&!t)return;if(e&&!t)a=!0;else if(!e&&t)a=!0;else for(let o in e)if(!up(e[o],t[o])){a=!0;break}if(!a)return;let i={now:is(),transition:tn({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,r),this.sky.updateTransitions(i)}_setProjectionInternal(e){var r;let t=W1e(e,(r=this.map._camera)==null?void 0:r.transform.constrainOverride,this._globalState);this.projection=t.projection,this.map.migrateProjection(t.transform,t.cameraHelper);for(let a in this.tileManagers)this.tileManagers[a].reload()}_validate(e,r,t,a,i={}){return i.validate!==!1&&i_(this,e,ja({key:r,style:this.serialize(),value:t},a),i)}_remove(e=!0){this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._loadStyleRequest&&(this._loadStyleRequest=(this._loadStyleRequest.abort(),null)),this._spriteRequest&&(this._spriteRequest=(this._spriteRequest.abort(),null)),H_().off(U3,this._rtlPluginLoaded);for(let r in this._layers)this._layers[r].setEventedParent(null);for(let r in this.tileManagers){let t=this.tileManagers[r];t.setEventedParent(null),t.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.tileManagers[e].clearTiles()}_reloadSource(e){this.tileManagers[e].resume(),this.tileManagers[e].reload()}_updateSources(e){for(let r in this.tileManagers)this.tileManagers[r].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.tileManagers)this._reloadSource(e)}triggerSymbolPlacement(){this._symbolPlacementTriggered=!0}_placementInputsChanged(e,r,t){var a;let i=this.pauseablePlacement;return!i||this._symbolPlacementTriggered||this._placedProjectionTransition!==((a=this.projection)==null?void 0:a.transitionState)||i._showCollisionBoxes!==r||i.placement.collisionGroups.crossSourceCollisions!==t||i.placement.transform.renderWorldCopies!==e.renderWorldCopies||!fce(i.placement.transform.modelViewProjectionMatrix,e.modelViewProjectionMatrix)}_updatePlacement(e,r,t,a,i=!1){var o,s;let l=!1,n=!1,u={};for(let h of this._order){let d=this._layers[h];if(d.type!=="symbol")continue;if(!u[d.source]){let g=this.tileManagers[d.source];u[d.source]=g.getRenderableIds(!0).map(m=>g.getTileByID(m)).sort((m,y)=>y.tileID.overscaledZ-m.tileID.overscaledZ||(m.tileID.isLessThan(y.tileID)?-1:1))}let p=this.crossTileSymbolIndex.addLayer(d,u[d.source],e.center.lng);l||(l=p)}this.crossTileSymbolIndex.pruneUnusedLayers(this._order),i||(i=this._layerOrderChanged||t===0);let c=l||this._placementInputsChanged(e,r,a),f=((o=this.pauseablePlacement)==null?void 0:o.isDone())&&!this.placement.stillRecent(is(),e.zoom);if((i||!this.pauseablePlacement||f&&(c||this.placement.stale))&&(this._symbolPlacementTriggered=!1,this._placedProjectionTransition=(s=this.projection)==null?void 0:s.transitionState,this.pauseablePlacement=new Qj(e,this.map.terrain,this._order,i,r,t,a,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?c&&this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,u),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(is()),n=!0),l&&this.pauseablePlacement.placement.setStale()),n||l)for(let h of this._order){let d=this._layers[h];d.type==="symbol"&&this.placement.updateLayerOpacities(d,u[d.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(is())}_releaseSymbolFadeTiles(){for(let e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles()}getImages(e,r){return yi(this,null,function*(){let t=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();let a=this.tileManagers[r.source];return a&&a.setDependencies(r.tileID.key,r.type,r.icons),t})}getGlyphs(e,r){return yi(this,null,function*(){let t=yield this.glyphManager.getGlyphs(r.stacks),a=this.tileManagers[r.source];return a&&a.setDependencies(r.tileID.key,r.type,[""]),t})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),!(e&&this._validate(Af.glyphs,"glyphs",e,null,r))&&(this._changed=!0,this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getFontFaces(){return this.stylesheet["font-faces"]||null}setFontFaces(e){this._checkLoaded(),this._changed=!0,this._glyphsDidChange=!0,this.stylesheet["font-faces"]=e,this.glyphManager.setFontFaces(e)}getDashes(e,r){return yi(this,null,function*(){let t={};for(let[a,i]of Object.entries(r.dashes))t[a]=this.lineAtlas.getDash(i.dasharray,i.round);return t})}addSprite(e,r,t={},a){this._checkLoaded();let i=[{id:e,url:r}],o=[...m3(this.stylesheet.sprite),...i];this._validate(Af.sprite,"sprite",o,null,t)||(this.stylesheet.sprite=o,this._loadSprite(i,!0,a))}removeSprite(e){this._checkLoaded();let r=m3(this.stylesheet.sprite);if(!r.find(a=>a.id===e)){this.fire(new mn(Error(`Sprite "${e}" doesn't exists on this map.`)));return}let t=this.imageManager.removeSpriteImages(e);this._markImagesChanged(t),r.splice(r.findIndex(a=>a.id===e),1),this.stylesheet.sprite=r.length>0?r:void 0,this._imagesListDirty=!0,this._changed=!0,this.fire(new _h("data"))}getSprite(){return m3(this.stylesheet.sprite)}setSprite(e,r={},t){this._checkLoaded(),!(e&&this._validate(Af.sprite,"sprite",e,null,r))&&(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,t):(this._unloadSprite(),t&&t(null)))}destroy(){this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._loadStyleRequest&&(this._loadStyleRequest=(this._loadStyleRequest.abort(),null)),this._spriteRequest&&(this._spriteRequest=(this._spriteRequest.abort(),null));for(let e in this.tileManagers){let r=this.tileManagers[e];r.setEventedParent(null),r.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this.patternAtlas.destroy()),this.glyphManager&&this.glyphManager.destroy();for(let e in this._layers){let r=this._layers[e];r.setEventedParent(null),r.onRemove&&r.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}},bU=pl([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),wU=class{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,r,t,a,i,o,s,l,n){this.context=e;let u=this.boundPaintVertexBuffers.length!==a.length;for(let c=0;!u&&c({u_depth:new fn(e,r.u_depth),u_terrain:new fn(e,r.u_terrain)}),TU=(e,r)=>({u_texture:new fn(e,r.u_texture),u_ele_delta:new Di(e,r.u_ele_delta),u_fog_matrix:new $h(e,r.u_fog_matrix),u_fog_color:new Jp(e,r.u_fog_color),u_fog_ground_blend:new Di(e,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new Di(e,r.u_fog_ground_blend_opacity),u_horizon_color:new Jp(e,r.u_horizon_color),u_horizon_fog_blend:new Di(e,r.u_horizon_fog_blend),u_is_globe_mode:new Di(e,r.u_is_globe_mode)}),MU=(e,r)=>({u_ele_delta:new Di(e,r.u_ele_delta)}),EU=(e,r,t,a,i)=>({u_texture:0,u_ele_delta:e,u_fog_matrix:r,u_fog_color:t?t.properties.get("fog-color"):Hn.white,u_fog_ground_blend:t?t.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:i?0:t?t.calculateFogBlendOpacity(a):0,u_horizon_color:t?t.properties.get("horizon-color"):Hn.white,u_horizon_fog_blend:t?t.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!i}),SU=e=>({u_ele_delta:e}),ix={ProjectionUBO:0,TerrainUBO:1,FrameUBO:2},kU={float:[1,1],int:[1,1],vec2:[2,2],vec4:[4,4],mat4:[16,4]},Q3=class{constructor(e,r,t){this.context=e,this.binding=r,this.contentWords=t.contentWords;let a=e.gl;this.buffer=a.createBuffer(),a.bindBuffer(a.UNIFORM_BUFFER,this.buffer),a.bufferData(a.UNIFORM_BUFFER,t.sizeWords*4,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,r,this.buffer),this.uploaded=new Float32Array(t.sizeWords),this.pending=new Float32Array(t.sizeWords),this.uploadedWords=new Uint32Array(this.uploaded.buffer),this.pendingWords=new Uint32Array(this.pending.buffer),this.hasData=!1,this.bindingDirty=!1}upload(){let e=this.context.gl,r=!this.hasData;if(!r){let t=this.pendingWords,a=this.uploadedWords;for(let i=0;i=0&&(this.attributes[k]={location:T,isInteger:w.has(k)})}u.deleteShader(M),u.deleteShader(E);for(let k of y)if(k&&!C[k]){let T=u.getUniformLocation(this.program,k);T&&(C[k]=T)}this.fixedUniforms=a(e,C),this.terrainUniforms=AU(e,C),this.binderUniforms=t?t.getUniforms(e,C):[]}draw(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_){var v;let x=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(t),e.setStencilMode(a),e.setColorMode(i),e.setCullFace(o),l){e.activeTexture.set(x.TEXTURE2),x.bindTexture(x.TEXTURE_2D,l.depthTexture),e.activeTexture.set(x.TEXTURE3),x.bindTexture(x.TEXTURE_2D,l.texture);for(let M in this.terrainUniforms)this.terrainUniforms[M].set(l[M]);K1e(e.terrainUniformBuffer,l)}if(n&&X1e(e.projectionUniformBuffer,n),s)for(let M in this.fixedUniforms)this.fixedUniforms[M].set(s[M]);g&&g.setUniforms(e,this.binderUniforms,d,{zoom:p});let E=0;switch(r){case x.LINES:E=2;break;case x.TRIANGLES:E=3;break;case x.LINE_STRIP:E=1}for(let M of h.get())M.vaos||(M.vaos={}),(v=M.vaos)[u]||(v[u]=new wU),M.vaos[u].bind(e,this,c,g?g.getPaintVertexBuffers():[],f,M.vertexOffset,m,y,_),x.drawElements(r,M.primitiveLength*E,x.UNSIGNED_SHORT,M.primitiveOffset*E*2)}},DU=(e,r)=>({u_lightpos:new qc(e,r.u_lightpos),u_lightpos_globe:new qc(e,r.u_lightpos_globe),u_lightintensity:new Di(e,r.u_lightintensity),u_lightcolor:new qc(e,r.u_lightcolor),u_vertical_gradient:new Di(e,r.u_vertical_gradient),u_opacity:new Di(e,r.u_opacity),u_fill_translate:new no(e,r.u_fill_translate)}),LU=(e,r)=>({u_lightpos:new qc(e,r.u_lightpos),u_lightpos_globe:new qc(e,r.u_lightpos_globe),u_lightintensity:new Di(e,r.u_lightintensity),u_lightcolor:new qc(e,r.u_lightcolor),u_vertical_gradient:new Di(e,r.u_vertical_gradient),u_height_factor:new Di(e,r.u_height_factor),u_opacity:new Di(e,r.u_opacity),u_fill_translate:new no(e,r.u_fill_translate),u_image:new fn(e,r.u_image),u_texsize:new no(e,r.u_texsize),u_pixel_coord_upper:new no(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new no(e,r.u_pixel_coord_lower),u_scale:new qc(e,r.u_scale),u_fade:new Di(e,r.u_fade)}),XC=(e,r,t,a)=>{let i=e.style.light,o=i.getCartesianPosition(),s=kI();i.properties.get("anchor")==="viewport"&&nce(s,e.transform.bearingInRadians),mce(o,o,s);let l=e.transform.transformLightDirection(o),n=i.properties.get("color");return{u_lightpos:o,u_lightpos_globe:l,u_lightintensity:i.properties.get("intensity"),u_lightcolor:[n.r,n.g,n.b],u_vertical_gradient:+r,u_opacity:t,u_fill_translate:a}},FU=(e,r,t,a,i,o,s)=>tn(XC(e,r,t,a),G8(o,e,s),{u_height_factor:-(2**i.overscaledZ)/s.tileSize/8}),PU=(e,r)=>({u_fill_translate:new no(e,r.u_fill_translate)}),IU=(e,r)=>({u_image:new fn(e,r.u_image),u_texsize:new no(e,r.u_texsize),u_pixel_coord_upper:new no(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new no(e,r.u_pixel_coord_lower),u_scale:new qc(e,r.u_scale),u_fade:new Di(e,r.u_fade),u_sdf_pattern:new fn(e,r.u_sdf_pattern),u_fill_translate:new no(e,r.u_fill_translate)}),RU=(e,r)=>({u_fill_translate:new no(e,r.u_fill_translate)}),zU=(e,r)=>({u_image:new fn(e,r.u_image),u_texsize:new no(e,r.u_texsize),u_pixel_coord_upper:new no(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new no(e,r.u_pixel_coord_lower),u_scale:new qc(e,r.u_scale),u_fade:new Di(e,r.u_fade),u_sdf_pattern:new fn(e,r.u_sdf_pattern),u_fill_translate:new no(e,r.u_fill_translate)}),ZC=(e,r,t,a,i)=>tn(G8(r,e,t),{u_fill_translate:a,u_sdf_pattern:+!!i}),BU=e=>({u_fill_translate:e}),OU=e=>({u_fill_translate:e}),NU=(e,r,t,a,i)=>ZC(e,r,t,a,i),jU=(e,r)=>({u_scale_with_map:new fn(e,r.u_scale_with_map),u_pitch_with_map:new fn(e,r.u_pitch_with_map),u_extrude_scale:new no(e,r.u_extrude_scale),u_globe_extrude_scale:new Di(e,r.u_globe_extrude_scale),u_translate:new no(e,r.u_translate)}),UU=(e,r,t,a,i)=>{let o=e.transform,s,l,n=0;if(t.paint.get("circle-pitch-alignment")==="map"){let u=uh(r,1,o.zoom);s=!0,l=[u,u],n=u/(xa*2**r.tileID.overscaledZ)*2*Math.PI*i}else s=!1,l=o.pixelsToGLUnits;return{u_scale_with_map:+(t.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+s,u_extrude_scale:l,u_globe_extrude_scale:n,u_translate:a}},qU=(e,r)=>({u_color:new Jp(e,r.u_color),u_overlay:new fn(e,r.u_overlay),u_overlay_scale:new Di(e,r.u_overlay_scale)}),KC=(e,r=1)=>({u_color:e,u_overlay:0,u_overlay_scale:r}),VU=(e,r)=>({u_extrude_scale:new Di(e,r.u_extrude_scale),u_intensity:new Di(e,r.u_intensity),u_globe_extrude_scale:new Di(e,r.u_globe_extrude_scale)}),GU=(e,r)=>({u_matrix:new $h(e,r.u_matrix),u_image:new fn(e,r.u_image),u_color_ramp:new fn(e,r.u_color_ramp),u_opacity:new Di(e,r.u_opacity)}),JC=(e,r,t,a)=>{let i=uh(e,1,r)/(xa*2**e.tileID.overscaledZ)*2*Math.PI*a;return{u_extrude_scale:uh(e,1,r),u_intensity:t,u_globe_extrude_scale:i}},QC=(e,r,t,a)=>{let i=w0();return Rd(i,0,e.width,e.height,0,0,1),{u_matrix:i,u_image:t,u_color_ramp:a,u_opacity:r.paint.get("heatmap-opacity")}},HU=(e,r)=>({u_image:new fn(e,r.u_image),u_latrange:new no(e,r.u_latrange),u_exaggeration:new Di(e,r.u_exaggeration),u_altitudes:new JS(e,r.u_altitudes),u_azimuths:new JS(e,r.u_azimuths),u_accent:new Jp(e,r.u_accent),u_method:new fn(e,r.u_method),u_shadows:new KS(e,r.u_shadows),u_highlights:new KS(e,r.u_highlights)}),WU=(e,r)=>({u_matrix:new $h(e,r.u_matrix),u_image:new fn(e,r.u_image),u_dimension:new no(e,r.u_dimension),u_zoom:new Di(e,r.u_zoom),u_unpack:new R1(e,r.u_unpack)}),$U=(e,r,t)=>{let a=t.paint.get("hillshade-accent-color"),i;switch(t.paint.get("hillshade-method")){case"basic":i=4;break;case"combined":i=1;break;case"igor":i=2;break;case"multidirectional":i=3;break;default:i=0}let o=t.getIlluminationProperties();for(let s=0;s{let t=r.stride,a=w0();return Rd(a,0,xa,-xa,0,0,1),Xl(a,a,[0,-xa,0]),{u_matrix:a,u_image:1,u_dimension:[t,t],u_zoom:e.overscaledZ,u_unpack:r.getUnpackVector()}},XU=(e,r)=>({u_image:new fn(e,r.u_image),u_unpack:new R1(e,r.u_unpack),u_dimension:new no(e,r.u_dimension),u_elevation_stops:new fn(e,r.u_elevation_stops),u_color_stops:new fn(e,r.u_color_stops),u_color_ramp_size:new fn(e,r.u_color_ramp_size),u_opacity:new Di(e,r.u_opacity)}),ZU=(e,r,t=0)=>({u_image:0,u_unpack:r.getUnpackVector(),u_dimension:[r.stride,r.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:t,u_opacity:e.paint.get("color-relief-opacity")}),KU=(e,r)=>({u_translation:new no(e,r.u_translation),u_ratio:new Di(e,r.u_ratio)}),JU=(e,r)=>({u_translation:new no(e,r.u_translation),u_ratio:new Di(e,r.u_ratio),u_image:new fn(e,r.u_image),u_image_height:new Di(e,r.u_image_height)}),QU=(e,r)=>({u_translation:new no(e,r.u_translation),u_texsize:new no(e,r.u_texsize),u_ratio:new Di(e,r.u_ratio),u_image:new fn(e,r.u_image),u_scale:new qc(e,r.u_scale),u_fade:new Di(e,r.u_fade)}),eq=(e,r)=>({u_translation:new no(e,r.u_translation),u_ratio:new Di(e,r.u_ratio),u_image:new fn(e,r.u_image),u_mix:new Di(e,r.u_mix),u_tileratio:new Di(e,r.u_tileratio),u_crossfade_from:new Di(e,r.u_crossfade_from),u_crossfade_to:new Di(e,r.u_crossfade_to),u_lineatlas_width:new Di(e,r.u_lineatlas_width),u_lineatlas_height:new Di(e,r.u_lineatlas_height)}),tq=(e,r)=>({u_translation:new no(e,r.u_translation),u_ratio:new Di(e,r.u_ratio),u_image:new fn(e,r.u_image),u_image_height:new Di(e,r.u_image_height),u_tileratio:new Di(e,r.u_tileratio),u_crossfade_from:new Di(e,r.u_crossfade_from),u_crossfade_to:new Di(e,r.u_crossfade_to),u_image_dash:new fn(e,r.u_image_dash),u_mix:new Di(e,r.u_mix),u_lineatlas_width:new Di(e,r.u_lineatlas_width),u_lineatlas_height:new Di(e,r.u_lineatlas_height)}),ox=(e,r,t,a)=>{let i=e.transform;return{u_translation:H8(e,r,t),u_ratio:a/uh(r,1,i.zoom)}},rq=(e,r,t,a,i)=>tn(ox(e,r,t,a),{u_image:0,u_image_height:i}),aq=(e,r,t,a,i)=>{let o=e.transform,s=iC(r,o);return{u_translation:H8(e,r,t),u_texsize:r.imageAtlasTexture.size,u_ratio:a/uh(r,1,o.zoom),u_image:0,u_scale:[s,i.fromScale,i.toScale],u_fade:i.t}},iq=(e,r,t,a,i)=>{let o=e.transform,s=iC(r,o);return tn(ox(e,r,t,a),{u_tileratio:s,u_crossfade_from:i.fromScale,u_crossfade_to:i.toScale,u_image:0,u_mix:i.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},nq=(e,r,t,a,i,o)=>{let s=e.transform,l=iC(r,s);return tn(ox(e,r,t,a),{u_image:0,u_image_height:o,u_tileratio:l,u_crossfade_from:i.fromScale,u_crossfade_to:i.toScale,u_image_dash:1,u_mix:i.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},oq=(e,r)=>({u_image:new fn(e,r.u_image),u_opacity:new Di(e,r.u_opacity)}),sq=(e,r)=>({u_image:r,u_opacity:e}),lq=(e,r)=>({u_is_size_zoom_constant:new fn(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new fn(e,r.u_is_size_feature_constant),u_size_t:new Di(e,r.u_size_t),u_size:new Di(e,r.u_size),u_rotate_symbol:new fn(e,r.u_rotate_symbol),u_label_plane_matrix:new $h(e,r.u_label_plane_matrix),u_coord_matrix:new $h(e,r.u_coord_matrix),u_is_text:new fn(e,r.u_is_text),u_pitch_with_map:new fn(e,r.u_pitch_with_map),u_is_along_line:new fn(e,r.u_is_along_line),u_is_variable_anchor:new fn(e,r.u_is_variable_anchor),u_texsize:new no(e,r.u_texsize),u_texture:new fn(e,r.u_texture),u_translation:new no(e,r.u_translation),u_pitched_scale:new Di(e,r.u_pitched_scale),u_is_offset:new fn(e,r.u_is_offset),u_height_anchor_ground:new fn(e,r.u_height_anchor_ground)}),uq=(e,r)=>({u_is_size_zoom_constant:new fn(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new fn(e,r.u_is_size_feature_constant),u_size_t:new Di(e,r.u_size_t),u_size:new Di(e,r.u_size),u_rotate_symbol:new fn(e,r.u_rotate_symbol),u_label_plane_matrix:new $h(e,r.u_label_plane_matrix),u_coord_matrix:new $h(e,r.u_coord_matrix),u_is_text:new fn(e,r.u_is_text),u_pitch_with_map:new fn(e,r.u_pitch_with_map),u_is_along_line:new fn(e,r.u_is_along_line),u_is_variable_anchor:new fn(e,r.u_is_variable_anchor),u_texsize:new no(e,r.u_texsize),u_texture:new fn(e,r.u_texture),u_gamma_scale:new Di(e,r.u_gamma_scale),u_is_halo:new fn(e,r.u_is_halo),u_is_plain:new fn(e,r.u_is_plain),u_translation:new no(e,r.u_translation),u_pitched_scale:new Di(e,r.u_pitched_scale),u_is_offset:new fn(e,r.u_is_offset),u_height_anchor_ground:new fn(e,r.u_height_anchor_ground)}),cq=(e,r)=>({u_is_size_zoom_constant:new fn(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new fn(e,r.u_is_size_feature_constant),u_size_t:new Di(e,r.u_size_t),u_size:new Di(e,r.u_size),u_rotate_symbol:new fn(e,r.u_rotate_symbol),u_label_plane_matrix:new $h(e,r.u_label_plane_matrix),u_coord_matrix:new $h(e,r.u_coord_matrix),u_is_text:new fn(e,r.u_is_text),u_pitch_with_map:new fn(e,r.u_pitch_with_map),u_is_along_line:new fn(e,r.u_is_along_line),u_is_variable_anchor:new fn(e,r.u_is_variable_anchor),u_texsize:new no(e,r.u_texsize),u_texsize_icon:new no(e,r.u_texsize_icon),u_texture:new fn(e,r.u_texture),u_texture_icon:new fn(e,r.u_texture_icon),u_gamma_scale:new Di(e,r.u_gamma_scale),u_is_halo:new fn(e,r.u_is_halo),u_translation:new no(e,r.u_translation),u_pitched_scale:new Di(e,r.u_pitched_scale),u_is_offset:new fn(e,r.u_is_offset),u_height_anchor_ground:new fn(e,r.u_height_anchor_ground)}),e7=(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p)=>({u_is_size_zoom_constant:+(e==="constant"||e==="source"),u_is_size_feature_constant:+(e==="constant"||e==="camera"),u_size_t:r?r.uSizeT:0,u_size:r?r.uSize:0,u_rotate_symbol:+t,u_label_plane_matrix:l,u_coord_matrix:n,u_is_text:+c,u_pitch_with_map:+a,u_is_along_line:i,u_is_variable_anchor:o,u_texsize:f,u_texture:0,u_translation:u,u_pitched_scale:h,u_is_offset:d,u_height_anchor_ground:+p}),t7=(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g)=>{let m=s.transform;return tn(e7(e,r,t,a,i,o,s,l,n,u,c,f,d,p,g),{u_gamma_scale:a?Math.cos(m.pitch*Math.PI/180)*m.cameraToCenterDistance:1,u_is_halo:+!!h,u_is_plain:1})},fq=(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p)=>tn(t7(e,r,t,a,i,o,s,l,n,u,!0,c,!0,h,d,p),{u_texsize_icon:f,u_texture_icon:1}),hq=(e,r)=>({u_opacity:new Di(e,r.u_opacity),u_color:new Jp(e,r.u_color)}),dq=(e,r)=>({u_opacity:new Di(e,r.u_opacity),u_image:new fn(e,r.u_image),u_pattern_tl_a:new no(e,r.u_pattern_tl_a),u_pattern_br_a:new no(e,r.u_pattern_br_a),u_pattern_tl_b:new no(e,r.u_pattern_tl_b),u_pattern_br_b:new no(e,r.u_pattern_br_b),u_texsize:new no(e,r.u_texsize),u_mix:new Di(e,r.u_mix),u_pattern_size_a:new no(e,r.u_pattern_size_a),u_pattern_size_b:new no(e,r.u_pattern_size_b),u_scale_a:new Di(e,r.u_scale_a),u_scale_b:new Di(e,r.u_scale_b),u_pixel_coord_upper:new no(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new no(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new Di(e,r.u_tile_units_to_pixels)}),pq=(e,r)=>({u_opacity:e,u_color:r}),vq=(e,r,t,a,i)=>tn(Q1e(t,i,r,a),{u_opacity:e}),mq=(e,r)=>({u_sun_pos:new qc(e,r.u_sun_pos),u_atmosphere_blend:new Di(e,r.u_atmosphere_blend),u_globe_position:new qc(e,r.u_globe_position),u_globe_radius:new Di(e,r.u_globe_radius),u_inv_proj_matrix:new $h(e,r.u_inv_proj_matrix)}),gq=(e,r,t,a,i)=>({u_sun_pos:e,u_atmosphere_blend:r,u_globe_position:t,u_globe_radius:a,u_inv_proj_matrix:i}),yq=(e,r)=>({u_sky_color:new Jp(e,r.u_sky_color),u_horizon_color:new Jp(e,r.u_horizon_color),u_horizon:new no(e,r.u_horizon),u_horizon_normal:new no(e,r.u_horizon_normal),u_sky_horizon_blend:new Di(e,r.u_sky_horizon_blend),u_sky_blend:new Di(e,r.u_sky_blend),u_inv_proj_matrix:new $h(e,r.u_inv_proj_matrix),u_globe_position:new qc(e,r.u_globe_position),u_globe_radius:new Di(e,r.u_globe_radius)}),_q=(e,r,t)=>{let a=Math.cos(r.rollInRadians),i=Math.sin(r.rollInRadians),o=d_(r),s=r.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:e.properties.get("sky-color"),u_horizon_color:e.properties.get("horizon-color"),u_horizon:[(r.width/2-o*i)*t,(r.height/2+o*a)*t],u_horizon_normal:[-i,a],u_sky_horizon_blend:e.properties.get("sky-horizon-blend")*r.height/2*t,u_sky_blend:s,u_inv_proj_matrix:r.inverseProjectionMatrix,u_globe_position:O8(r),u_globe_radius:Y1(r.worldSize,r.center.lat)}},sx=(e,r)=>({}),xq={fillExtrusion:DU,fillExtrusionPattern:LU,fill:PU,fillPattern:IU,fillOutline:RU,fillOutlinePattern:zU,circle:jU,collisionBox:sx,collisionCircle:sx,debug:qU,depth:sx,clippingMask:sx,heatmap:VU,heatmapTexture:GU,hillshade:HU,hillshadePrepare:WU,colorRelief:XU,line:KU,lineGradient:JU,linePattern:QU,lineSDF:eq,lineGradientSDF:tq,layerOpacity:oq,raster:Pj,symbolIcon:lq,symbolSDF:uq,symbolTextAndIcon:cq,background:hq,backgroundPattern:dq,terrain:TU,terrainDepth:MU,atmosphere:mq,sky:yq},bq=class{constructor(e,r,t){this.context=e;let a=e.gl;this.buffer=a.createBuffer(),this.dynamicDraw=!!t,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,r.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||r.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let r=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},r7={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},wq=class{constructor(e,r,t,a){this.length=r.length,this.attributes=t,this.itemSize=r.bytesPerElement,this.dynamicDraw=a,this.context=e;let i=e.gl;this.buffer=i.createBuffer(),e.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,r.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||r.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let r=this.context.gl;this.bind(),r.bufferSubData(r.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,r){for(let t of this.attributes){let a=r.attributes[t.name];a!==void 0&&e.enableVertexAttribArray(a.location)}}setVertexAttribPointers(e,r,t){for(let a of this.attributes){let i=r.attributes[a.name];if(i!==void 0){let o=a.offset+this.itemSize*(t||0);i.isInteger?e.vertexAttribIPointer(i.location,a.components,e[r7[a.type]],this.itemSize,o):e.vertexAttribPointer(i.location,a.components,e[r7[a.type]],!1,this.itemSize,o)}}}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},Jo=class{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}},Aq=class extends Jo{getDefault(){return Hn.transparent}set(e){let r=this.current;(e.r!==r.r||e.g!==r.g||e.b!==r.b||e.a!==r.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}},Tq=class extends Jo{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}},Mq=class extends Jo{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}},Eq=class extends Jo{getDefault(){return[!0,!0,!0,!0]}set(e){let r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||e[3]!==r[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}},Sq=class extends Jo{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}},kq=class extends Jo{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}},Cq=class extends Jo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let r=this.current;(e.func!==r.func||e.ref!==r.ref||e.mask!==r.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}},Dq=class extends Jo{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}},Lq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;e?r.enable(r.STENCIL_TEST):r.disable(r.STENCIL_TEST),this.current=e,this.dirty=!1}},Fq=class extends Jo{getDefault(){return[0,1]}set(e){let r=this.current;(e[0]!==r[0]||e[1]!==r[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}},Pq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;e?r.enable(r.DEPTH_TEST):r.disable(r.DEPTH_TEST),this.current=e,this.dirty=!1}},Iq=class extends Jo{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}},Rq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;e?r.enable(r.BLEND):r.disable(r.BLEND),this.current=e,this.dirty=!1}},zq=class extends Jo{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let r=this.current;(e[0]!==r[0]||e[1]!==r[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}},Bq=class extends Jo{getDefault(){return Hn.transparent}set(e){let r=this.current;(e.r!==r.r||e.g!==r.g||e.b!==r.b||e.a!==r.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}},Oq=class extends Jo{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}},Nq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;e?r.enable(r.CULL_FACE):r.disable(r.CULL_FACE),this.current=e,this.dirty=!1}},jq=class extends Jo{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}},Uq=class extends Jo{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}},qq=class extends Jo{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}},Vq=class extends Jo{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}},Gq=class extends Jo{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||e[3]!==r[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}},Hq=class extends Jo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.bindFramebuffer(r.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},Wq=class extends Jo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.bindRenderbuffer(r.RENDERBUFFER,e),this.current=e,this.dirty=!1}},$q=class extends Jo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.bindTexture(r.TEXTURE_2D,e),this.current=e,this.dirty=!1}},Yq=class extends Jo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.bindBuffer(r.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},Xq=class extends Jo{getDefault(){return null}set(e){let r=this.gl;r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},Zq=class extends Jo{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.bindVertexArray(e),this.current=e,this.dirty=!1)}},Kq=class extends Jo{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.pixelStorei(r.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},Jq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},Qq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},e4=class extends Jo{constructor(e,r){super(e),this.context=e,this.parent=r}getDefault(){return null}},eV=class extends e4{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let r=this.gl;r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},tV=class extends e4{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let r=this.gl;r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,e),this.current=e,this.dirty=!1}},rV=class extends e4{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let r=this.gl;r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,e),this.current=e,this.dirty=!1}},aV=class{constructor(e,r,t,a,i){this.context=e,this.width=r,this.height=t;let o=e.gl,s=this.framebuffer=o.createFramebuffer();if(this.colorAttachment=new eV(e,s),a)this.depthAttachment=i?new rV(e,s):new tV(e,s);else if(i)throw Error("Stencil cannot be set without depth")}destroy(){let e=this.context.gl,r=this.colorAttachment.get();if(r&&e.deleteTexture(r),this.depthAttachment){let t=this.depthAttachment.get();t&&e.deleteRenderbuffer(t)}e.deleteFramebuffer(this.framebuffer)}},a7=rC([{name:"u_units_to_pixels",type:"vec2"},{name:"u_world_size",type:"vec2"},{name:"u_camera_to_center_distance",type:"float"},{name:"u_symbol_fade_change",type:"float"},{name:"u_aspect_ratio",type:"float"},{name:"u_device_pixel_ratio",type:"float"},{name:"u_viewport_size",type:"vec2"},{name:"u_pixel_extrude_scale",type:"vec2"},{name:"u_pitch",type:"float"}]),Gf=a7.offsets,vl=class{constructor(e,r,t){this.blendFunction=e,this.blendColor=r,this.mask=t}},vl.Replace=[1,0],vl.disabled=new vl(vl.Replace,Hn.transparent,[!1,!1,!1,!1]),vl.unblended=new vl(vl.Replace,Hn.transparent,[!0,!0,!0,!0]),vl.alphaBlended=new vl([1,771],Hn.transparent,[!0,!0,!0,!0]),iV=class{constructor(e){this.gl=e,this.clearColor=new Aq(this),this.clearDepth=new Tq(this),this.clearStencil=new Mq(this),this.colorMask=new Eq(this),this.depthMask=new Sq(this),this.stencilMask=new kq(this),this.stencilFunc=new Cq(this),this.stencilOp=new Dq(this),this.stencilTest=new Lq(this),this.depthRange=new Fq(this),this.depthTest=new Pq(this),this.depthFunc=new Iq(this),this.blend=new Rq(this),this.blendFunc=new zq(this),this.blendColor=new Bq(this),this.blendEquation=new Oq(this),this.cullFace=new Nq(this),this.cullFaceSide=new jq(this),this.frontFace=new Uq(this),this.program=new qq(this),this.activeTexture=new Vq(this),this.viewport=new Gq(this),this.bindFramebuffer=new Hq(this),this.bindRenderbuffer=new Wq(this),this.bindTexture=new $q(this),this.bindVertexBuffer=new Yq(this),this.bindElementBuffer=new Xq(this),this.bindVertexArray=new Zq(this),this.pixelStoreUnpack=new Kq(this),this.pixelStoreUnpackPremultiplyAlpha=new Jq(this),this.pixelStoreUnpackFlipY=new Qq(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),e.getExtension("EXT_color_buffer_half_float"),e.getExtension("EXT_color_buffer_float"),this.projectionUniformBuffer=Y1e(this),this.terrainUniformBuffer=Z1e(this),this.frameUniformBuffer=tge(this)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0,this.projectionUniformBuffer.bindingDirty=!0,this.terrainUniformBuffer.bindingDirty=!0,this.frameUniformBuffer.bindingDirty=!0}setCustomLayerDefaults(){this.unbindVAO(),this.cullFace.setDefault(),this.activeTexture.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}createIndexBuffer(e,r){return new bq(this,e,r)}createVertexBuffer(e,r,t){return new wq(this,e,r,t)}createRenderbuffer(e,r,t){let a=this.gl,i=a.createRenderbuffer();return this.bindRenderbuffer.set(i),a.renderbufferStorage(a.RENDERBUFFER,e,r,t),this.bindRenderbuffer.set(null),i}createFramebuffer(e,r,t,a){return new aV(this,e,r,t,a)}clear({color:e,depth:r,stencil:t}){let a=this.gl,i=0;e&&(i|=a.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),r!==void 0&&(i|=a.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),t!==void 0&&(i|=a.STENCIL_BUFFER_BIT,this.clearStencil.set(t),this.stencilMask.set(255)),a.clear(i)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func===this.gl.ALWAYS&&!e.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range))}setStencilMode(e){e.test.func===this.gl.ALWAYS&&!e.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask}))}setColorMode(e){up(e.blendFunction,vl.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){return this.gl.createVertexArray()}deleteVertexArray(e){this.gl.deleteVertexArray(e)}unbindVAO(){this.bindVertexArray.set(null)}},Ao=class{constructor(e,r,t){this.func=e,this.mask=r,this.range=t}},Ao.ReadOnly=!1,Ao.ReadWrite=!0,Ao.disabled=new Ao(519,Ao.ReadOnly,[0,1]),t4=7680,Yo=class{constructor(e,r,t,a,i,o){this.test=e,this.ref=r,this.mask=t,this.fail=a,this.depthFail=i,this.pass=o}},Yo.disabled=new Yo({func:519,mask:0},0,0,t4,t4,t4),i7=1029,r4=2305,Ho=class{constructor(e,r,t){this.enable=e,this.mode=r,this.frontFace=t}},Ho.disabled=new Ho(!1,i7,r4),Ho.backCCW=new Ho(!0,i7,r4),Ho.frontCCW=new Ho(!0,1028,r4),nV=Id(new Float32Array(16)),i4=0,n4=[new zr(0,0),new zr(xa,0),new zr(xa,xa),new zr(0,xa)],oV=new Hn(1,0,0,1),sV=new Hn(0,1,0,1),lV=new Hn(0,0,1,1),uV=new Hn(1,0,1,1),cV=new Hn(0,1,1,1),fV={symbol:ige,circle:cge,heatmap:fge,line:wge,fill:Age,fillExtrusion:Tge,hillshade:Mge,colorRelief:Sge,raster:kge,background:Fge,sky:qge,atmosphere:Gge,custom:Nge,debug:Rge,debugPadding:Pge,terrainDepth:jge},hV=(o4=class{constructor(e,r){this.drawFunctions=fV,this.context=new iV(e),this.transform=r,this.layerOpacityFbo=null,this._tileTextures={},this._rttObjectRecyclePool=[],this._rttSharedFbo=null,this.terrainFacilitator={depthDirty:!0,matrix:Id(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=H3.maxOverzooming+H3.maxUnderzooming+1,this.depthEpsilon=1/2**16,this.crossTileSymbolIndex=new IC}resize(e,r,t){if(this.width=Math.floor(e*t),this.height=Math.floor(r*t),this.pixelRatio=t,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let a of this.style._order)this.style._layers[a].resize()}setup(){let e=this.context,r=new Kp;r.emplaceBack(0,0),r.emplaceBack(xa,0),r.emplaceBack(0,xa),r.emplaceBack(xa,xa),this.tileExtentBuffer=e.createVertexBuffer(r,G0.members),this.tileExtentSegments=Zs.simpleSegment(0,0,4,2);let t=new Kp;t.emplaceBack(0,0),t.emplaceBack(xa,0),t.emplaceBack(0,xa),t.emplaceBack(xa,xa),this.debugBuffer=e.createVertexBuffer(t,G0.members),this.debugSegments=Zs.simpleSegment(0,0,4,5);let a=new DB;a.emplaceBack(0,0,0,0),a.emplaceBack(xa,0,xa,0),a.emplaceBack(0,xa,0,xa),a.emplaceBack(xa,xa,xa,xa),this.rasterBoundsBuffer=e.createVertexBuffer(a,bU.members),this.rasterBoundsSegments=Zs.simpleSegment(0,0,4,2);let i=new Kp;i.emplaceBack(0,0),i.emplaceBack(xa,0),i.emplaceBack(0,xa),i.emplaceBack(xa,xa),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(i,G0.members),this.rasterBoundsSegmentsPosOnly=Zs.simpleSegment(0,0,4,5);let o=new Kp;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,G0.members),this.viewportSegments=Zs.simpleSegment(0,0,4,2);let s=new qB;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(s);let l=new Vd;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(l);let n=this.context.gl;this.stencilClearMode=new Yo({func:n.ALWAYS,mask:0},0,255,n.ZERO,n.ZERO,n.ZERO),this.tileExtentMesh=new Z1(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let t=w0();Rd(t,0,this.width,this.height,0,0,1),wc(t,t,[r.drawingBufferWidth,r.drawingBufferHeight,0]);let a={mainMatrix:t,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:t,clipAntimeridian:!1};this.useProgram("clippingMask",null,!0).draw(e,r.TRIANGLES,Ao.disabled,this.stencilClearMode,vl.disabled,Ho.disabled,null,null,a,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}renderTileClippingMasks(e,r,t){if(this.currentStencilSource===e.source||!e.isTileClipped()||!r?.length)return;this.currentStencilSource=e.source,this.nextStencilID+r.length>256&&this.clearStencil();let a=this.context;a.setColorMode(vl.disabled),a.setDepthMode(Ao.disabled);let i={};for(let o of r)i[o.key]=this.nextStencilID++;this.style.projection.useSubdivision&&this._renderTileMasks(i,r,t,!0),this._renderTileMasks(i,r,t,!1),this._tileClippingMaskIDs=i}_renderTileMasks(e,r,t,a){let i=this.context,o=i.gl,s=this.style.projection,l=this.transform,n=this.useProgram("clippingMask");for(let u of r){let c=e[u.key],f=this.getTerrainDataForTile(u,t),h=s.getMeshFromTileID(this.context,u.canonical,a,!0,"stencil"),d=l.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!t,applyTerrainMatrix:!0});n.draw(i,o.TRIANGLES,Ao.disabled,new Yo({func:o.ALWAYS,mask:0},c,255,o.KEEP,o.KEEP,o.REPLACE),vl.disabled,t?Ho.disabled:Ho.backCCW,null,f,d,"$clipping",h.vertexBuffer,h.indexBuffer,h.segments)}}getTerrainDataForTile(e,r){var t,a;return r&&((t=this.style.projection)==null?void 0:t.name)==="mercator"?null:((a=this.style.map.terrain)==null?void 0:a.getTerrainData(e))||null}_renderTilesDepthBuffer(){var e;let r=this.context,t=r.gl,a=this.style.projection,i=this.transform,o=this.useProgram("depth"),s=this.getDepthModeFor3D(),l=W1(i,{tileSize:i.tileSize});for(let n of l){let u=(e=this.style.map.terrain)==null?void 0:e.getTerrainData(n),c=a.getMeshFromTileID(this.context,n.canonical,!0,!0,"raster"),f=i.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!0,applyTerrainMatrix:!0});o.draw(r,t.TRIANGLES,s,Yo.disabled,vl.disabled,Ho.backCCW,null,u,f,"$clipping",c.vertexBuffer,c.indexBuffer,c.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,r=this.context.gl;return new Yo({func:r.NOTEQUAL,mask:255},e,255,r.KEEP,r.KEEP,r.REPLACE)}stencilModeForClipping(e){let r=this.context.gl;return new Yo({func:r.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,r.KEEP,r.KEEP,r.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){let r=this.context.gl,t=e.sort((o,s)=>s.overscaledZ-o.overscaledZ),a=t[t.length-1].overscaledZ,i=t[0].overscaledZ-a+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();let o={};for(let s=0;ss.overscaledZ-o.overscaledZ),a=t[t.length-1].overscaledZ,i=t[0].overscaledZ-a+1;if(this.clearStencil(),i>1){let o={},s={};for(let l=0;l=0;i.currentLayer--){let f=this.style._layers[o[i.currentLayer]];if(f.isHidden(this.transform.zoom))continue;let h=s[f.source],d=l[f.source];this.renderTileClippingMasks(f,d,!1),this.renderLayer(this,h,f,d,i)}i.currentPass="translucent";let c=!1;for(i.currentLayer=0;i.currentLayer0?r.pop():null}acquireRTT(e){let r=this.context.gl,t=this._rttObjectRecyclePool.pop();if(t)return t.size!==e&&(t.texture.update({width:e,height:e,data:null},{premultiply:!1,useMipmap:!0}),t.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),t.size=e),t;let a=new Kl(this.context,{width:e,height:e,data:null},r.RGBA,{premultiply:!1,useMipmap:!0});return a.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),{texture:a,size:e}}bindRTT(e){let r=this.context.gl,t=e.size;if(!this._rttSharedFbo){let a=this.context.createFramebuffer(t,t,!0,!0),i=this.context.createRenderbuffer(r.DEPTH_STENCIL,t,t);a.depthAttachment.set(i),this._rttSharedFbo={fbo:a,depthRenderbuffer:i,size:t}}this._rttSharedFbo.size!==t&&(this.context.bindRenderbuffer.set(this._rttSharedFbo.depthRenderbuffer),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,t),this.context.bindRenderbuffer.set(null),this._rttSharedFbo.fbo.width=t,this._rttSharedFbo.fbo.height=t,this._rttSharedFbo.size=t),this._rttSharedFbo.fbo.colorAttachment.set(e.texture.texture),this.context.bindFramebuffer.set(this._rttSharedFbo.fbo.framebuffer)}releaseRTT(e){this._rttObjectRecyclePool.push(e)}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let r=this.patternAtlas.getPattern(e.from.toString()),t=this.patternAtlas.getPattern(e.to.toString());return!r||!t}useProgram(e,r,t=!1,a=[]){var i;this.cache||(this.cache={});let o=!!this.style.map.terrain,s=this.style.projection,l=t?Hd.projectionMercator:s.shaderPreludeCode,n=t?zC:s.shaderDefine,u=`/${t?BC:s.shaderVariantName}`,c=r?r.cacheKey:"",f=this._showOverdrawInspector?"/overdraw":"",h=o?"/terrain":"",d=a?`/${a.join("/")}`:"",p=e+c+u+f+h+d;return(i=this.cache)[p]||(i[p]=new CU(this.context,Hd[e],r,xq[e],this._showOverdrawInspector,o,l,n,a)),this.cache[p]}setCustomLayerDefaults(){this.context.setCustomLayerDefaults()}setBaseState(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;let e=this.context.gl;this.debugOverlayTexture=new Kl(this.context,this.debugOverlayCanvas,e.RGBA)}}destroy(){var e,r,t;if(this._tileTextures){for(let a in this._tileTextures){let i=this._tileTextures[a];if(i)for(let o of i)o.destroy()}this._tileTextures={}}for(let a of this._rttObjectRecyclePool)a.texture.destroy();if(this._rttObjectRecyclePool=[],this._rttSharedFbo){this._rttSharedFbo.fbo.colorAttachment.set(null),this._rttSharedFbo.fbo.depthAttachment.set(null);let a=this.context.gl;a.deleteRenderbuffer(this._rttSharedFbo.depthRenderbuffer),a.deleteFramebuffer(this._rttSharedFbo.fbo.framebuffer),this._rttSharedFbo=null}if((e=this.layerOpacityFbo)==null||e.destroy(),this.layerOpacityFbo=null,this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((r=this.tileExtentMesh.vertexBuffer)==null||r.destroy()),this.tileExtentMesh&&((t=this.tileExtentMesh.indexBuffer)==null||t.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.context.projectionUniformBuffer.destroy(),this.context.terrainUniformBuffer.destroy(),this.context.frameUniformBuffer.destroy(),this.cache){for(let a in this.cache){let i=this.cache[a];i?.program&&this.context.gl.deleteProgram(i.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:r}=this.context.gl;return this.width!==e||this.height!==r}},o4.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50,o4),n7=class extends Error{constructor(e,r){var t;super("WebGL2 is required to display this map. We are sorry, but it seems that your browser does not support WebGL2, a technology for rendering 3D graphics on the web. Read more on https://wiki.openstreetmap.org/wiki/This_map_requires_WebGL"),this.name="GPUInitializationError",this.requestedAttributes=e,this.statusMessage=(t=r?.statusMessage)!=null?t:null}},o7=class{constructor(e){this._getHashParams=()=>new URLSearchParams(window.location.hash.replace("#","")),this._getCurrentHash=()=>{var r;let t=this._getHashParams();return this._hashName?(t.get(this._hashName)||"").split("/"):((r=[...t.keys()][0])!=null?r:"").split("/")},this._onHashChange=()=>{let r=this._getCurrentHash();if(!this._isValidHash(r))return!1;let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(r[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+r[2],+r[1]],zoom:+r[0],bearing:t,pitch:+(r[4]||0)}),!0},this._updateHashUnthrottled=()=>{let r=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,r)},this._removeHash=()=>{let r=this._getHashParams();if(this._hashName)r.delete(this._hashName);else{let o=Array.from(r.keys());o.length>0&&r.delete(o[0])}let t=decodeURIComponent(r.toString()).replace(/=&/g,"&").replace(/=$/g,""),a=t?`#${t}`:"",i=window.location.href.replace(/(#.+)?$/,a);i=i.replace("&&","&"),window.history.replaceState(window.history.state,null,i)},this._updateHash=sj(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,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(e){let r=this._map.getCenter(),t=Math.round(this._map.getZoom()*100)/100,a=10**Math.ceil((t*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.round(r.lng*a)/a,o=Math.round(r.lat*a)/a,s=this._map.getBearing(),l=this._map.getPitch(),n="";if(n+=e?`/${i}/${o}/${t}`:`${t}/${o}/${i}`,(s||l)&&(n+=`/${Math.round(s*10)/10}`),l&&(n+=`/${Math.round(l)}`),this._hashName){let u=this._getHashParams();return u.set(this._hashName,n),`#${decodeURIComponent(u.toString()).replace(/=&/g,"&").replace(/=$/g,"")}`}return`#${n}`}_isValidHash(e){if(e.length<3||e.some(i=>isNaN(+i)))return!1;try{new ln(+e[2],+e[1])}catch{return!1}let r=+e[0],t=+(e[3]||0),a=+(e[4]||0);return r>=this._map.getMinZoom()&&r<=this._map.getMaxZoom()&&t>=-180&&t<=180&&a>=this._map.getMinPitch()&&a<=this._map.getMaxPitch()}},tg={linearity:.3,easing:VM(0,0,.3,1)},dV=tn({deceleration:2500,maxSpeed:1400},tg),pV=tn({deceleration:20,maxSpeed:1400},tg),vV=tn({deceleration:1e3,maxSpeed:360},tg),mV=tn({deceleration:1e3,maxSpeed:90},tg),gV=tn({deceleration:1e3,maxSpeed:360},tg),yV=class{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:is(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,r=is();for(;e.length>0&&r-e[0].time>160;)e.shift()}_getVelocityEntries(){let e=this._inertiaBuffer,r=is()-60,t=Math.max(0,e.length-2);for(;t>0&&e[t-1].time>=r;)t--;return e.slice(t)}_onMoveEnd(e){this._drainInertiaBuffer();let r=this._getVelocityEntries();if(r.length<2){this.clear();return}let t={zoom:0,bearing:0,pitch:0,roll:0,pan:new zr(0,0),pinchAround:void 0,around:void 0};for(let{settings:o}of r)o.around&&(t.around=o.around),o.pinchAround&&(t.pinchAround=o.pinchAround);for(let{settings:o}of r.slice(1))t.zoom+=o.zoomDelta||0,t.bearing+=o.bearingDelta||0,t.pitch+=o.pitchDelta||0,t.roll+=o.rollDelta||0,o.panDelta&&t.pan._add(o.panDelta);if(!t.pan.mag()&&!t.zoom&&!t.bearing&&!t.pitch&&!t.roll){this.clear();return}let a=is()-r[0].time,i={};if(t.pan.mag()){let o=X_(t.pan.mag(),a,tn({},dV,e||{})),s=t.pan.mult(o.amount/t.pan.mag()),l=this._map._camera.cameraHelper.handlePanInertia(s,this._map._camera.transform);i.center=l.easingCenter,i.offset=l.easingOffset,Y_(i,o)}if(t.zoom){let o=X_(t.zoom,a,pV);i.zoom=fh(this._map.getZoom()+o.amount,this._map.getZoomSnap(),o.amount),Y_(i,o)}if(t.bearing){let o=X_(t.bearing,a,vV);i.bearing=this._map.getBearing()+Gn(o.amount,-179,179),Y_(i,o)}if(t.pitch){let o=X_(t.pitch,a,mV);i.pitch=this._map.getPitch()+o.amount,Y_(i,o)}if(t.roll){let o=X_(t.roll,a,gV);i.roll=this._map.getRoll()+Gn(o.amount,-179,179),Y_(i,o)}if(i.zoom||i.bearing){let o=t.pinchAround===void 0?t.around:t.pinchAround;i.around=o?this._map.unproject(o):this._map.getCenter()}return this.clear(),tn(i,{noMoveStart:!0})}},_V=class{constructor(e,r){this._map=e,this._clickTolerance=r.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new vC(this._map,e))}mousedown(e,r){return this._mousedownPos=r,this._firePreventable(new Vf(e.type,this._map,e))}mouseup(e){this._map.fire(new Vf(e.type,this._map,e))}click(e,r){this._mousedownPos&&this._mousedownPos.dist(r)>=this._clickTolerance||this._map.fire(new Vf(e.type,this._map,e))}dblclick(e){return this._firePreventable(new Vf(e.type,this._map,e))}mouseover(e){this._map.fire(new Vf(e.type,this._map,e))}mouseout(e){this._map.fire(new Vf(e.type,this._map,e))}touchstart(e){return this._firePreventable(new X1(e.type,this._map,e))}touchmove(e){this._map.fire(new X1(e.type,this._map,e))}touchend(e){this._map.fire(new X1(e.type,this._map,e))}touchcancel(e){this._map.fire(new X1(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},xV=class{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new Vf(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Vf("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new Vf(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},s7=class{constructor(e,r,t){this._map=e,this._tr=t,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1,r.boxZoom&&typeof r.boxZoom=="object"&&(this._boxZoomEnd=r.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,r){this.isEnabled()&&e.shiftKey&&e.button===0&&(Fn.disableDrag(),this._startPos=this._lastPos=r,this._active=!0)}mousemoveWindow(e,r){if(!this._active)return;let t=r;if(this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)i.fitScreenCoordinates(t,a,this._tr.bearing,{linear:!0})}}}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box=(this._box.remove(),null)),Fn.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new I3(e,{originalEvent:r}))}},bV=class{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,r,t){(this.centroid||t.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=e.timeStamp),t.length===this.numTouches&&(this.centroid=Wge(r),this.touches=uC(t,r)))}touchmove(e,r,t){if(this.aborted||!this.centroid)return;let a=uC(t,r);for(let i in this.touches){let o=this.touches[i],s=a[i];(!s||s.dist(o)>30)&&(this.aborted=!0)}}touchend(e,r,t){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),t.length===0){let a=!this.aborted&&this.centroid;if(this.reset(),a)return a}}},s4=class{constructor(e){this.singleTap=new bV(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,r,t){this.singleTap.touchstart(e,r,t)}touchmove(e,r,t){this.singleTap.touchmove(e,r,t)}touchend(e,r,t){let a=this.singleTap.touchend(e,r,t);if(a){let i=e.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(a)<30;if((!i||!o)&&this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=a,this.count===this.numTaps)return this.reset(),a}}},wV=class{constructor(e,r){this._tr=r,this._zoomIn=new s4({numTouches:1,numTaps:2}),this._zoomOut=new s4({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,r,t){this._zoomIn.touchstart(e,r,t),this._zoomOut.touchstart(e,r,t)}touchmove(e,r,t){this._zoomIn.touchmove(e,r,t),this._zoomOut.touchmove(e,r,t)}touchend(e,r,t){let a=this._zoomIn.touchend(e,r,t),i=this._zoomOut.touchend(e,r,t),o=this._tr;if(a)return this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:s=>s.easeTo({duration:300,zoom:fh(o.zoom+1,s.getZoomSnap()),around:o.unproject(a)},{originalEvent:e})};if(i)return this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:s=>s.easeTo({duration:300,zoom:fh(o.zoom-1,s.getZoomSnap()),around:o.unproject(i)},{originalEvent:e})}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},rg=class{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let r=this._moveFunction(...e);if(r.bearingDelta||r.pitchDelta||r.rollDelta||r.around||r.panDelta)return this._active=!0,r}dragStart(e,r){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(r)?r[0]:r,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,r){if(!this.isEnabled())return;let t=this._lastPoint;if(!t)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e)){this.reset(e);return}let a=Array.isArray(r)?r[0]:r;if(!(!this._moved&&a.dist(t)!0}),r=new TV){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=r}_executeRelevantHandler(e,r,t){if(e instanceof MouseEvent)return r(e);if(typeof TouchEvent<"u"&&e instanceof TouchEvent)return t(e)}startMove(e){this._executeRelevantHandler(e,r=>{this.mouseMoveStateManager.startMove(r)},r=>{this.oneFingerTouchMoveStateManager.startMove(r)})}endMove(e){this._executeRelevantHandler(e,r=>{this.mouseMoveStateManager.endMove(r)},r=>{this.oneFingerTouchMoveStateManager.endMove(r)})}isValidStartEvent(e){return!!this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidStartEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidStartEvent(r))}isValidMoveEvent(e){return!!this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidMoveEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(r))}isValidEndEvent(e){return!!this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidEndEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidEndEvent(r))}},lx=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=r=>{r.preventDefault()}},EV=class{constructor(e,r){this._clickTolerance=e.clickTolerance||1,this._map=r,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new zr(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,r,t){return this._calculateTransform(e,r,t)}touchmove(e,r,t){if(this._active){if(this._shouldBePrevented(t.length)){this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e);return}return e.preventDefault(),this._calculateTransform(e,r,t)}}touchend(e,r,t){this._calculateTransform(e,r,t),this._active&&this._shouldBePrevented(t.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,t){t.length>0&&(this._active=!0);let a=uC(t,r),i=new zr(0,0),o=new zr(0,0),s=0;for(let n in a){let u=a[n],c=this._touches[n];c&&(i._add(u),o._add(u.sub(c)),s++,a[n]=u)}if(this._touches=a,this._shouldBePrevented(s)||!o.mag())return;let l=o.div(s);if(this._sum._add(l),!(this._sum.mag()=2,i=r.mag()>=2;if(!a&&!i)return;if(!a||!i)return this._firstMove===void 0&&(this._firstMove=t),t-this._firstMove<100&&void 0;let o=e.y>0==r.y>0;return cC(e)&&cC(r)&&o}},SV={panStep:100,bearingStep:15,pitchStep:10},h7=class{constructor(e,r){this._tr=r;let t=SV;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let r=0,t=0,a=0,i=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?t=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?t=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?a=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?a=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(t=0,a=0),{cameraAnimation:s=>{let l=this._tr;s.easeTo({duration:300,easeId:"keyboardHandler",easing:Jge,zoom:r?fh(l.zoom+r*(e.shiftKey?2:1),s.getZoomSnap()):l.zoom,bearing:l.bearing+t*this._bearingStep,pitch:l.pitch+a*this._pitchStep,offset:[-i*this._panStep,-o*this._panStep],center:l.center},{originalEvent:e})}}}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}},d7=4.000244140625,p7=class{constructor(e,r,t){this._onTimeout=a=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(a)},this._map=e,this._tr=t,this._triggerRenderFrame=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return this._map.cooperativeGestures.isEnabled()?!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e)):!1}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e)){this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);return}let r=e.deltaMode===WheelEvent.DOM_DELTA_LINE?e.deltaY*40:e.deltaY,t=is(),a=t-(this._lastWheelEventTime||0);this._lastWheelEventTime=t,r!==0&&r%d7==0?this._type="wheel":r!==0&&Math.abs(r)<4?this._type="trackpad":a>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(a*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let r=Fn.mousePos(this._map.getCanvas(),e),t=this._tr;this._aroundPoint=this._aroundCenter?t.transform.locationToScreenPoint(ln.convert(t.center)):r,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let s=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=s),typeof this._targetZoom=="number"&&(this._targetZoom+=s)}if(this._delta!==0){let s=this._type==="wheel"&&Math.abs(this._delta)>d7?this._wheelZoomRate:this._defaultZoomRate,l=2/(1+Math.exp(-Math.abs(this._delta*s)));this._delta<0&&l!==0&&(l=1/l);let n=typeof this._targetZoom=="number"?bf(this._targetZoom):e.scale,u=e.applyConstrain(e.getCameraLngLat(),Tc(n*l)).zoom,c=this._map.getZoomSnap();if(this._type==="wheel"&&c>0){let f=fh(e.zoom,c);this._targetZoom=fh(u,c,u-f)}else this._targetZoom=u;this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let r=typeof this._targetZoom=="number"?this._targetZoom:e.zoom,t=this._startZoom,a=this._easing,i=!1,o;if(this._type==="wheel"&&t&&a){let s=is()-this._lastWheelEventTime,l=Math.min((s+5)/200,1),n=a(l);o=Xs.number(t,r,n),l<1?this._needsRerender=!0:i=!0}else o=r,i=!0;return this._active=!0,i&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=o,{noInertia:!0,needsRenderFrame:!i,zoomDelta:o-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=$2;if(this._prevEase){let t=this._prevEase,a=(is()-t.start)/t.duration,i=t.easing(a+.01)-t.easing(a),o=.27/Math.sqrt(i*i+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=VM(o,s,.25,1)}return this._prevEase={start:is(),duration:e,easing:r},r}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}},v7=class{constructor(e,r){this._clickZoom=e,this._tapZoom=r}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()}},kV=class{constructor(e,r){this._tr=r,this.reset()}reset(){this._active=!1}dblclick(e,r){return e.preventDefault(),{cameraAnimation:t=>{t.easeTo({duration:300,zoom:fh(this._tr.zoom+(e.shiftKey?-1:1),t.getZoomSnap()),around:this._tr.unproject(r)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},CV=class{constructor(){this._tap=new s4({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(e){this._zoomRate=e??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,r,t){if(!this._swipePoint)if(!this._tapTime)this._tap.touchstart(e,r,t);else{let a=r[0],i=e.timeStamp-this._tapTime<500,o=this._tapPoint.dist(a)<30;!i||!o?this.reset():t.length>0&&(this._swipePoint=a,this._swipeTouch=t[0].identifier)}}touchmove(e,r,t){if(!this._tapTime)this._tap.touchmove(e,r,t);else if(this._swipePoint){if(t[0].identifier!==this._swipeTouch)return;let a=r[0],i=a.y-this._swipePoint.y;return this._swipePoint=a,e.preventDefault(),this._active=!0,{zoomDelta:i/128*this._zoomRate}}}touchend(e,r,t){if(this._tapTime)this._swipePoint&&t.length===0&&this.reset();else{let a=this._tap.touchend(e,r,t);a&&(this._tapTime=e.timeStamp,this._tapPoint=a)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},m7=class{constructor(e,r,t){this._el=e,this._mousePan=r,this._touchPan=t}enable(e){this._inertiaOptions=e||{},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()}},g7=class{constructor(e,r,t,a){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=r,this._mousePitch=t,this._mouseRoll=a}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}},y7=class{constructor(e,r,t,a){this._el=e,this._touchZoom=r,this._touchRotate=t,this._tapDragZoom=a,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),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()}setZoomRate(e){this._touchZoom.setZoomRate(e),this._tapDragZoom.setZoomRate(e)}setZoomThreshold(e){this._touchZoom.setZoomThreshold(e)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}},_7=class{constructor(e,r){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=r,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=Fn.create("div","maplibregl-cooperative-gesture-screen",e);let r=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(r=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let t=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),a=document.createElement("div");a.className="maplibregl-desktop-message",a.textContent=r,this._container.appendChild(a);let i=document.createElement("div");i.className="maplibregl-mobile-message",i.textContent=t,this._container.appendChild(i),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),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(e){return e[this._bypassKey]}notifyGestureBlocked(e,r){this._enabled&&(this._map.fire(new vu("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}},DV=class{constructor(e){this._camera=e}get transform(){return this._camera._requestedCameraState||this._camera.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(e){return this.transform.screenPointToLocation(zr.convert(e),this._camera.terrain)}},ux=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate,LV=class extends qf{},FV=class{get _ownerDocument(){var e;return((e=this._el)==null?void 0:e.ownerDocument)||document}get _ownerWindow(){var e,r;return((r=(e=this._el)==null?void 0:e.ownerDocument)==null?void 0:r.defaultView)||window}constructor(e,r,t){this._terrainGestureAnchorElevation=null,this.handleWindowEvent=i=>{this.handleEvent(i,`${i.type}Window`)},this.handleEvent=(i,o)=>{if(i.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;let s=i.type==="renderFrame"?void 0:i,l={needsRenderFrame:!1},n={},u={};for(let{handlerName:h,handler:d,allowed:p}of this._handlers){if(!d.isEnabled())continue;let g;if(this._blockedByActive(u,p,h))d.reset();else if(d[o||i.type]){if(qce(i,o||i.type)){let m=Fn.mousePos(this._map.getCanvas(),i);g=d[o||i.type](i,m)}else if(Uce(i,o||i.type)){let m=i.touches,y=this._getMapTouches(m),_=Fn.touchPos(this._map.getCanvas(),y);g=d[o||i.type](i,_,y)}else Vce(o||i.type)||(g=d[o||i.type](i));this.mergeHandlerResult(l,n,g,h,s),g?.needsRenderFrame&&this._triggerRenderFrame()}(g||d.isActive())&&(u[h]=d)}let c={};for(let h in this._previousActiveHandlers)u[h]||(c[h]=s);this._previousActiveHandlers=u,(Object.keys(c).length||fC(l))&&(this._changes.push([l,n,c]),this._triggerRenderFrame()),(Object.keys(u).length||fC(l))&&this._camera.stop(!0),this._updatingCamera=!1;let{cameraAnimation:f}=l;f&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],f(this._map))},this._map=e,this._camera=r,this._transformProvider=new DV(this._camera),this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new yV(e),this._bearingSnap=t.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(t);let a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[i,o,s]of this._listeners)i.addEventListener(o,i===this._ownerDocument?this.handleWindowEvent:this.handleEvent,s)}destroy(){for(let[e,r,t]of this._listeners)e.removeEventListener(r,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,t)}_addDefaultHandlers(e){let r=this._map,t=r.getCanvasContainer();this._add("mapEvent",new _V(r,e));let a=r.boxZoom=new s7(r,e,this._transformProvider);this._add("boxZoom",a),e.interactive&&e.boxZoom&&a.enable();let i=r.cooperativeGestures=new _7(r,e.cooperativeGestures);this._add("cooperativeGestures",i),e.cooperativeGestures&&i.enable();let o=new wV(r,this._transformProvider),s=new kV(r,this._transformProvider);r.doubleClickZoom=new v7(s,o),this._add("tapZoom",o),this._add("clickZoom",s),e.interactive&&e.doubleClickZoom&&r.doubleClickZoom.enable();let l=new CV;this._add("tapDragZoom",l);let n=r.touchPitch=new f7(r);this._add("touchPitch",n),e.interactive&&e.touchPitch&&r.touchPitch.enable(e.touchPitch);let u=()=>r.project(r.getCenter()),c=Xge(e,u),f=Zge(e),h=Kge(e,u);r.dragRotate=new g7(e,c,f,h),this._add("mouseRotate",c,["mousePitch"]),this._add("mousePitch",f,["mouseRotate","mouseRoll"]),this._add("mouseRoll",h,["mousePitch"]),e.interactive&&e.dragRotate&&r.dragRotate.enable();let d=Yge(e),p=new EV(e,r);r.dragPan=new m7(t,d,p),this._add("mousePan",d),this._add("touchPan",p,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&r.dragPan.enable(e.dragPan);let g=new c7,m=new u7;r.touchZoomRotate=new y7(t,m,g,l),this._add("touchRotate",g,["touchPan","touchZoom"]),this._add("touchZoom",m,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&r.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new xV(r));let y=r.scrollZoom=new p7(r,()=>this._triggerRenderFrame(),this._transformProvider);this._add("scrollZoom",y,["mousePan"]),e.interactive&&e.scrollZoom&&r.scrollZoom.enable(e.scrollZoom);let _=r.keyboard=new h7(r,this._transformProvider);this._add("keyboard",_),e.interactive&&e.keyboard&&r.keyboard.enable()}_add(e,r,t){this._handlers.push({handlerName:e,handler:r,allowed:t}),this._handlersById[e]=r}stop(e){if(!this._updatingCamera){for(let{handler:r}of this._handlers)r.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!ux(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,r,t){for(let a in e)if(a!==t&&!r?.includes(a))return!0;return!1}_getMapTouches(e){let r=[];for(let t of e){let a=t.target;this._el.contains(a)&&r.push(t)}return r}mergeHandlerResult(e,r,t,a,i){if(!t)return;tn(e,t);let o={handlerName:a,originalEvent:t.originalEvent||i};t.zoomDelta!==void 0&&(r.zoom=o),t.panDelta!==void 0&&(r.drag=o),t.rollDelta!==void 0&&(r.roll=o),t.pitchDelta!==void 0&&(r.pitch=o),t.bearingDelta!==void 0&&(r.rotate=o)}_applyChanges(){let e={},r={},t={};for(let[a,i,o]of this._changes)a.panDelta&&(e.panDelta=(e.panDelta||new zr(0,0))._add(a.panDelta)),a.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+a.zoomDelta),a.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+a.bearingDelta),a.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+a.pitchDelta),a.rollDelta&&(e.rollDelta=(e.rollDelta||0)+a.rollDelta),a.around!==void 0&&(e.around=a.around),a.pinchAround!==void 0&&(e.pinchAround=a.pinchAround),a.noInertia&&(e.noInertia=a.noInertia),tn(r,i),tn(t,o);this._updateMapTransform(e,r,t),this._changes=[]}_updateMapTransform(e,r,t){let a=this._map,i=this._camera.getTransformForUpdate(),o=a.terrain;if(!fC(e)&&!(o&&this._terrainMovement)){this._fireEvents(r,t,!0);return}this._camera.stop(!0);let{panDelta:s,zoomDelta:l,bearingDelta:n,pitchDelta:u,rollDelta:c}=e,{around:f,aroundOnSurface:h}=this._resolveAround(e,o,i),d=o?this._terrainGestureElevation(o,f,h,i,r):void 0,p={panDelta:s,zoomDelta:l,rollDelta:c,pitchDelta:u,bearingDelta:n,around:f,aroundElevation:d};this._camera.cameraHelper.useGlobeControls&&!i.isPointOnMapSurface(f)&&(f=i.centerPoint);let g=this._computePreZoomAroundLoc(i,f,s,d);this._handleMapControls({terrain:o,tr:i,deltasForHelper:p,preZoomAroundLoc:g,combinedEventsInProgress:r,panDelta:s}),this._camera.applyUpdatedTransform(i),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(r,t,!0)}_resolveAround(e,r,t){let a=e.pinchAround===void 0?e.around:e.pinchAround;return a||(a=this._camera.transform.centerPoint),r&&!t.isPointOnMapSurface(a)?{around:t.centerPoint,aroundOnSurface:!1}:{around:a,aroundOnSurface:!0}}_terrainGestureElevation(e,r,t,a,i){if(!t)return;if(!this._terrainMovement&&(i.drag||i.zoom)){let s=a.screenTerrainPointToMercatorCoordinate(r,e);this._terrainGestureAnchorElevation=s?s.z:null}if(this._terrainGestureAnchorElevation===null)return;let o=this._terrainGestureAnchorElevation;if(!(r.distSqr(a.centerPoint)<.01)&&!(o-a.elevation>=.9*(a.getCameraAltitude()-a.elevation)))return o}_computePreZoomAroundLoc(e,r,t,a){if(r.distSqr(e.centerPoint)<.01)return e.center;let i=t?r.sub(t):r;return a===void 0?e.screenPointToLocation(i):e.screenPointToLocationAtElevation(i,a)}_handleMapControls({terrain:e,tr:r,deltasForHelper:t,preZoomAroundLoc:a,combinedEventsInProgress:i,panDelta:o}){let s=this._camera.cameraHelper;if(s.handleMapControlsRollPitchBearingZoom(t,r),!e){s.handleMapControlsPan(t,r,a);return}if(s.useGlobeControls){!this._terrainMovement&&(i.drag||i.zoom)&&(this._terrainMovement=!0,this._camera.elevationFreeze=!0),s.handleMapControlsPan(t,r,a);return}if(!this._terrainMovement&&(i.drag||i.zoom)){this._terrainMovement=!0,this._camera.elevationFreeze=!0,s.handleMapControlsPan(t,r,a);return}if(t.aroundElevation===void 0&&i.drag&&this._terrainMovement&&o){r.setCenter(r.screenPointToLocation(r.centerPoint.sub(o)));return}s.handleMapControlsPan(t,r,a)}_fireEvents(e,r,t){let a=ux(this._eventsInProgress),i=ux(e),o={};for(let c in e){let{originalEvent:f}=e[c];this._eventsInProgress[c]||(o[`${c}start`]=f),this._eventsInProgress[c]=e[c]}!a&&i&&this._fireEvent("movestart",i.originalEvent);for(let c in o)this._fireEvent(c,o[c]);i&&this._fireEvent("move",i.originalEvent);for(let c in e){let{originalEvent:f}=e[c];this._fireEvent(c,f)}let s={},l;for(let c in this._eventsInProgress){let{handlerName:f,originalEvent:h}=this._eventsInProgress[c];this._handlersById[f].isActive()||(delete this._eventsInProgress[c],l=r[f]||h,s[`${c}end`]=l)}for(let c in s)this._fireEvent(c,s[c]);let n=ux(this._eventsInProgress),u=(a||i)&&!n;if(u&&this._terrainMovement){this._camera.elevationFreeze=!1,this._terrainMovement=!1,this._terrainGestureAnchorElevation=null;let c=this._camera.getTransformForUpdate();this._map.getCenterClampedToGround()&&c.recalculateZoomAndCenter(this._map.terrain),this._camera.applyUpdatedTransform(c)}if(t&&u){this._updatingCamera=!0;let c=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),f=h=>h!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new LV("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}},PV=class extends Zl{constructor(e){var r,t,a;super(),this._renderFrameCallback=()=>{let i=Math.min((is()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(i)),i<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this.transform=new rx,this.cameraHelper=new ax,e.minZoom!==void 0&&this.transform.setMinZoom(e.minZoom),e.maxZoom!==void 0&&this.transform.setMaxZoom(e.maxZoom),e.minPitch!==void 0&&this.transform.setMinPitch(e.minPitch),e.maxPitch!==void 0&&this.transform.setMaxPitch(e.maxPitch),e.renderWorldCopies!==void 0&&this.transform.setRenderWorldCopies(e.renderWorldCopies),e.transformConstrain!==null&&this.transform.setConstrainOverride(e.transformConstrain),this._moving=!1,this._zooming=!1,this._bearingSnap=e.bearingSnap,this._zoomSnap=e.zoomSnap,this._requestRenderFrame=e.requestRenderFrame,this._cancelRenderFrame=e.cancelRenderFrame,this.terrain=e.terrain,this._centerClampedToGround=(r=e.centerClampedToGround)!=null?r:!0,this.transformCameraUpdate=(t=e.transformCameraUpdate)!=null?t:null,this._stopHandlers=(a=e.stopHandlers)!=null?a:(()=>{}),this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,r){if(e.apply(this.transform,!0),this.transform=e,this.cameraHelper=r,this._requestedCameraState){let t=e.clone();t.apply(this._requestedCameraState,!0),this._requestedCameraState=t}}getCenter(){return new ln(this.transform.center.lng,this.transform.center.lat)}setCenter(e,r){return this.jumpTo({center:e},r)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,r){return this.jumpTo({elevation:e},r),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,r,t){return e=zr.convert(e).mult(-1),this.panTo(this.transform.center,tn({offset:e},r),t)}panTo(e,r,t){return this.easeTo(tn({center:e},r),t)}getZoom(){return this.transform.zoom}setZoom(e,r){return this.jumpTo({zoom:e},r),this}zoomTo(e,r,t){return this.easeTo(tn({zoom:e},r),t)}zoomIn(e,r){return this.zoomTo(fh(this.getZoom()+1,this._zoomSnap),e,r),this}zoomOut(e,r){return this.zoomTo(fh(this.getZoom()-1,this._zoomSnap),e,r),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,r){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new hn("movestart",r)).fire(new hn("move",r)).fire(new hn("moveend",r))),this}getBearing(){return this.transform.bearing}setZoomSnap(e){return this._zoomSnap=e,this}getZoomSnap(){return this._zoomSnap}setBearing(e,r){return this.jumpTo({bearing:e},r),this}getPadding(){return this.transform.padding}setPadding(e,r){return this.jumpTo({padding:e},r),this}rotateTo(e,r,t){return this.easeTo(tn({bearing:e},r),t)}resetNorth(e,r){return this.rotateTo(0,tn({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(tn({bearing:0,pitch:0,roll:0,duration:1e3},e),r),this}snapToNorth(e,r){return Math.abs(this.getBearing()){p.easeFunc(g),this.terrain&&!e.freezeElevation&&this._updateElevation(g),this.applyUpdatedTransform(t),this._fireMoveEvents(r)},g=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,g)},e),this}_prepareEase(e,r,t={}){this._moving=!0,!r&&!t.moving&&this.fire(new hn("movestart",e)),this._zooming&&!t.zooming&&this.fire(new hn("zoomstart",e)),this._rotating&&!t.rotating&&this.fire(new hn("rotatestart",e)),this._pitching&&!t.pitching&&this.fire(new hn("pitchstart",e)),this._rolling&&!t.rolling&&this.fire(new hn("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLat(e,this.transform),this.elevationFreeze=!0}_updateElevation(e){(this._elevationStart===void 0||this._elevationCenter===void 0)&&this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let r=this.terrain.getElevationForLngLat(this._elevationCenter,this.transform);if(e<1&&r!==this._elevationTarget){let t=this._elevationTarget-this._elevationStart,a=(r-(t*e+this._elevationStart))/(1-e);this._elevationStart+=e*(t-a),this._elevationTarget=r}this.transform.setElevation(Xs.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this.elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}getTransformForUpdate(){return!this.transformCameraUpdate&&!this.terrain?this.transform:(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState)}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let r=e.getCameraLngLat(),t=e.getCameraAltitude(),a=this.terrain?this.terrain.getElevationForLngLatZoom(r,e.zoom):0;if(tthis._elevateCameraIfInsideTerrain(a)),this.transformCameraUpdate&&r.push(a=>this.transformCameraUpdate(a)),!r.length)return;let t=e.clone();for(let a of r){let i=t.clone(),{center:o,zoom:s,roll:l,pitch:n,bearing:u,elevation:c}=a(i);o&&i.setCenter(o),c!==void 0&&i.setElevation(c),s!==void 0&&i.setZoom(s),l!==void 0&&i.setRoll(l),n!==void 0&&i.setPitch(n),u!==void 0&&i.setBearing(u),t.apply(i,!1)}this.transform.apply(t,!1)}_fireMoveEvents(e){this.fire(new hn("move",e)),this._zooming&&this.fire(new hn("zoom",e)),this._rotating&&this.fire(new hn("rotate",e)),this._pitching&&this.fire(new hn("pitch",e)),this._rolling&&this.fire(new hn("roll",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;let t=this._zooming,a=this._rotating,i=this._pitching,o=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,t&&this.fire(new hn("zoomend",e)),a&&this.fire(new hn("rotateend",e)),i&&this.fire(new hn("pitchend",e)),o&&this.fire(new hn("rollend",e)),this.fire(new hn("moveend",e))}flyTo(e,r){if(!e.essential&&Hc.prefersReducedMotion){let A=Gy(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(A,r)}this.stop(),e=tn({offset:[0,0],speed:1.2,curve:1.42,easing:$2},e),e.zoom!==void 0&&this._zoomSnap&&(e.zoom=fh(e.zoom,this._zoomSnap));let t=this.getTransformForUpdate(),a=t.bearing,i=t.pitch,o=t.roll,s=t.padding,l=e.bearing===void 0?a:this._normalizeBearing(e.bearing,a),n=e.pitch===void 0?i:+e.pitch,u=e.roll===void 0?o:this._normalizeBearing(e.roll,o),c=e.padding===void 0?t.padding:e.padding,f=zr.convert(e.offset),h=t.centerPoint.add(f),d=t.screenPointToLocation(h),p=this.cameraHelper.handleFlyTo(t,{bearing:l,pitch:n,roll:u,padding:c,locationAtOffset:d,offsetAsPoint:f,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),g=e.curve,m=Math.max(t.width,t.height),y=m/p.scaleOfZoom,_=p.pixelPathLength,v=m/p.scaleOfMinZoom;g=Math.min(g,Math.sqrt(v/_*2));let x=g*g;function E(A){let F=(y*y-m*m+(A?-1:1)*x*x*_*_)/(2*(A?y:m)*x*_);return Math.log(Math.sqrt(F*F+1)-F)}function M(A){return(Math.exp(A)-Math.exp(-A))/2}function C(A){return(Math.exp(A)+Math.exp(-A))/2}function w(A){return M(A)/C(A)}let k=E(!1),T=function(A){return C(k)/C(k+g*A)},b=function(A){return m*((C(k)*w(k+g*A)-M(k))/x)/_},S=(E(!0)-k)/g;if(Math.abs(_)<2e-6||!isFinite(S)){if(Math.abs(m-y)<1e-6)return this.easeTo(e,r);let A=y0,T=F=>Math.exp(A*g*F)}if(e.duration!==void 0)e.duration=+e.duration;else{let A=e.screenSpeed===void 0?+e.speed:+e.screenSpeed/g;e.duration=1e3*S/A}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==l,this._pitching=n!==i,this._rolling=u!==o,this._padding=!t.isPaddingEqual(c),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(p.targetCenter),this._ease(A=>{let F=A*S,D=1/T(F),R=b(F);this._rotating&&t.setBearing(Xs.number(a,l,A)),this._pitching&&t.setPitch(Xs.number(i,n,A)),this._rolling&&t.setRoll(Xs.number(o,u,A)),this._padding&&(t.interpolatePadding(s,c,A),h=t.centerPoint.add(f)),p.easeFunc(A,D,R,h),this.terrain&&!e.freezeElevation&&this._updateElevation(A),this.applyUpdatedTransform(t),this._fireMoveEvents(r)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)},e),this}isEasing(){return!!this._easeFrameId}stop(e){return this._stop(e)}_stop(e,r){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let t=this._onEaseEnd;delete this._onEaseEnd,t.call(this,r)}return e||this._stopHandlers(),this}_ease(e,r,t){t.animate===!1||t.duration===0?(e(1),r()):(this._easeStart=is(),this._easeOptions=t,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){e=qh(e,-180,180);let t=Math.abs(e-r);return Math.abs(e-360-r)MapLibre'},b7=class{constructor(e=x7){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=r=>{r&&(r.type==="terrain"||r.dataType==="style"||r.dataType==="source"&&(r.sourceDataType==="metadata"||r.sourceDataType==="visibility"))&&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=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=Fn.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=Fn.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=Fn.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(){this._container.remove(),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(e,r){let t=this._map._getUIString(`AttributionControl.${r}`);e.title=t,e.setAttribute("aria-label",t)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(a=>typeof a=="string"?a:"")):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let a=this._map.style.stylesheet;this.styleOwner=a.owner,this.styleId=a.id}let r=this._map.style.tileManagers;for(let a in r){let i=r[a];if(i.used||i.usedForTerrain){let o=i.getSource();o.attribution&&!e.includes(o.attribution)&&e.push(o.attribution)}}e=e.filter(a=>String(a).trim()),e.sort((a,i)=>a.length-i.length),e=e.filter((a,i)=>{for(let o=i+1;o{let r=this._container.children;if(r.length){let t=r[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){var r;this._map=e,this._compact=(r=this.options)==null?void 0:r.compact,this._container=Fn.create("div","maplibregl-ctrl");let t=Fn.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}},IV=class{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let r=++this._id;return this._queue.push({callback:e,id:r,cancelled:!1}),r}remove(e){let r=this._currentlyRunning,t=r?this._queue.concat(r):this._queue;for(let a of t)if(a.id===e){a.cancelled=!0;return}}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let r=this._currentlyRunning=this._queue;this._queue=[];let t=!1,a;for(let i of r)if(!i.cancelled){try{i.callback(e)}catch(o){t||(t=!0,a=o)}if(this._cleared)break}if(this._cleared=!1,this._currentlyRunning=!1,t)throw a}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}},A7=["none","zoom","sourceTiles","visibleLayers","revision"],RV=class{constructor(e,r,t,a){this._tileKeys=e.map(i=>i.key).sort().join(),this._revision=r,this._zoom=t,this._visibleLayerIds=a}difference(e){return this._revision===e?._revision?this._visibleLayerIds===e._visibleLayerIds?this._tileKeys===e._tileKeys?this._zoom===e._zoom?"none":"zoom":"sourceTiles":"visibleLayers":"revision"}},vm={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0},zV=class{constructor(e,r){this.needsFollowUpFrame=!1,this.painter=e,this.terrain=r,this.rttSize=r.tileManager.tileSize*r.qualityFactor}getTexture(e){return e.getRTT(this._stacks.length-1).texture}prepareForRender(e,r){let t=r!==this._lastPrepareZoom;this._lastPrepareZoom=r,this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter(l=>!e._layers[l].isHidden(r));let a=this._renderableLayerIds.join(),i=new Set;for(let l of this._renderableLayerIds){let n=e._layers[l],u=n.source;u&&vm[n.type]&&i.add(u)}this._coordsAscending={},this._rttFingerprints={};for(let l of i){let n=e.tileManagers[l];if(!n)continue;this._coordsAscending[l]={};let u=this._coordsAscending[l],c=n.getSource(),f=c instanceof dm?c.terrainTileRanges:null;for(let p of n.getVisibleCoordinates()){let g=this.terrain.tileManager.getTerrainCoords(p,f);for(let m in g)u[m]||(u[m]=[]),u[m].push(g[m])}this._rttFingerprints[l]={};let h=this._rttFingerprints[l],d=n.getState().revision;for(let p in u)h[p]=new RV(u[p],d,r,a)}this.needsFollowUpFrame=!1;let o=t||this.painter.options.moving,s=!1;for(let l of this._renderableTiles){let n=this._textureDifference(l);n!=="none"&&(n==="zoom"&&o||n==="visibleLayers"&&t?this.needsFollowUpFrame=!0:n==="zoom"||n==="sourceTiles"?(s?this.needsFollowUpFrame=!0:l.releaseRTT(this.painter),s=!0):l.releaseRTT(this.painter))}}_textureDifference(e){let r="none";for(let t in this._rttFingerprints){let a=this._rttFingerprints[t][e.tileID.key];if(!a)continue;let i=a.difference(e.rttFingerprint[t]);A7.indexOf(i)>A7.indexOf(r)&&(r=i)}return r}renderLayer(e,r){if(e.isHidden(this.painter.transform.zoom))return!1;let t=Ci(ja({},r),{isRenderingToTexture:!0}),a=e.type,i=this.painter,o=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(vm[a]&&((!this._prevType||!vm[this._prevType])&&this._stacks.push([]),this._prevType=a,this._stacks[this._stacks.length-1].push(e.id),!o))return!0;if(vm[this._prevType]||vm[a]&&o){this._prevType=a;let s=this._stacks.length-1,l=this._stacks[s]||[];for(let n of this._renderableTiles){if(this._rttTiles.push(n),n.getRTT(s))continue;let u=n.acquireRTT(i,s,this.rttSize);i.bindRTT(u),i.context.clear({color:Hn.transparent,stencil:0}),i.currentStencilSource=void 0;for(let c of l){let f=i.style._layers[c],h=f.source?this._coordsAscending[f.source][n.tileID.key]:[n.tileID];i.context.viewport.set([0,0,this.rttSize,this.rttSize]),i.renderTileClippingMasks(f,h,!0),i.renderLayer(i,i.style.tileManagers[f.source],f,h,t),f.source&&(n.rttFingerprint[f.source]=this._rttFingerprints[f.source][n.tileID.key])}u.texture.generateMipmap()}return Uge(this.painter,this.terrain,this._rttTiles,t),this._rttTiles=[],vm[a]}return!1}},BV={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},OV=dC,T7={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:x7,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:Uf.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,rotateSpeed:.8,pitchSpeed:-.5,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,terrainSkirtLength:"auto",zoomLevelsToOverscale:4,anisotropicFilterPitch:20},M7=class extends Zl{get _ownerWindow(){var e,r;return((r=(e=this._container)==null?void 0:e.ownerDocument)==null?void 0:r.defaultView)||window}constructor(e){var r,t,a;super(),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new IV,this._controls=[],this._mapId=NI(),this._styleUrl=null,this._missingStyleImageResolver=null,this._lostContextStyle={style:null,images:null},this._contextLost=l=>{if(l.preventDefault(),this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),!this.style){this.fire(new J_("webglcontextlost",{originalEvent:l}));return}for(let n of Object.values(this.style._layers))if(n.type==="custom"&&console.warn(`Custom layer with id '${n.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),n._listeners)for(let[u]of Object.entries(n._listeners))console.warn(`Custom layer with id '${n.id}' had event listeners for event '${u}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new J_("webglcontextlost",{originalEvent:l}))},this._contextRestored=l=>{if(this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style){this.style.imageManager.images=this._lostContextStyle.images;for(let n in this._lostContextStyle.images){let u=this._lostContextStyle.images[n];u.isWebGLImage&&this.style.imageManager.updateImage(n,u,!1)}}this._lostContextStyle={style:null,images:null};try{this._setupPainter()}catch(n){this.fire(new mn(n));return}this.resize(),this._update(),this._resizeInternal(),this.fire(new J_("webglcontextrestored",{originalEvent:l}))},this._onMapScroll=l=>{if(l.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()};let i=Ci(ja(ja({},T7),e),{canvasContextAttributes:ja(ja({},T7.canvasContextAttributes),e.canvasContextAttributes)});if(i.minZoom!=null&&i.maxZoom!=null&&i.minZoom>i.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(i.minPitch!=null&&i.maxPitch!=null&&i.minPitch>i.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(i.minPitch!=null&&i.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(i.maxPitch!=null&&i.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");this._camera=new PV({minZoom:i.minZoom,maxZoom:i.maxZoom,minPitch:i.minPitch,maxPitch:i.maxPitch,bearingSnap:i.bearingSnap,zoomSnap:i.zoomSnap,renderWorldCopies:i.renderWorldCopies,centerClampedToGround:i.centerClampedToGround,terrain:this.terrain,transformConstrain:i.transformConstrain,requestRenderFrame:l=>this._requestRenderFrame(l),cancelRenderFrame:l=>this._cancelRenderFrame(l),transformCameraUpdate:i.transformCameraUpdate,stopHandlers:()=>{var l;return(l=this._handlers)==null?void 0:l.stop(!1)}}),this._camera.setEventedParent(this),this._interactive=i.interactive,this._maxTileCacheSize=i.maxTileCacheSize,this._maxTileCacheZoomLevels=i.maxTileCacheZoomLevels,this._canvasContextAttributes=ja({},i.canvasContextAttributes),this._trackResize=i.trackResize===!0,this._terrainSkirtLength=i.terrainSkirtLength,this._refreshExpiredTiles=i.refreshExpiredTiles===!0,this._fadeDuration=i.fadeDuration,this._crossSourceCollisions=i.crossSourceCollisions===!0,this._collectResourceTiming=i.collectResourceTiming===!0,this._locale=ja(ja({},BV),i.locale),this._clickTolerance=i.clickTolerance,this._overridePixelRatio=i.pixelRatio,this._maxCanvasSize=i.maxCanvasSize,this._zoomLevelsToOverscale=i.zoomLevelsToOverscale,this.cancelPendingTileRequestsWhileZooming=i.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(i.anisotropicFilterPitch),i.reduceMotion!==void 0&&(Hc.prefersReducedMotion=i.reduceMotion),this._requestManager=new vj(i.transformRequest),this._container=this._resolveContainer(i.container),i.maxBounds&&this.setMaxBounds(i.maxBounds),this._setupContainer();try{this._setupPainter()}catch(l){throw this._cleanupContainer(),l}this._imageQueueHandle=Gd.addThrottleControl(()=>this.isMoving()),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),this._handlers=new FV(this,this._camera,i),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver());let o=typeof i.hash=="string"&&i.hash||void 0;this._hash=i.hash?new o7(o).addTo(this):void 0,(r=this._hash)!=null&&r._onHashChange()||(this.jumpTo({center:i.center,elevation:i.elevation,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,roll:i.roll}),i.bounds&&(this.resize(),this.fitBounds(i.bounds,tn({},i.fitBoundsOptions,{duration:0}))));let s=typeof i.style=="string"||((a=(t=i.style)==null?void 0:t.projection)==null?void 0:a.type)!=="globe";this.resize(null,s),this._localIdeographFontFamily=i.localIdeographFontFamily,this._validateStyle=i.validateStyle,i.style&&this.setStyle(i.style,{localIdeographFontFamily:i.localIdeographFontFamily}),i.attributionControl&&this.addControl(new b7(typeof i.attributionControl=="boolean"?void 0:i.attributionControl)),i.maplibreLogo&&this.addControl(new w7,i.logoPosition),this.on("style.load",()=>{if(s||this._resizeTransform(),this._camera.transform.unmodified){let l=Gy(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(l)}}),this.on("data",l=>{this._update(l.dataType==="style"),this.fire(l.dataType==="style"?new _h("styledata",l):new Fs("sourcedata",l))}),this.on("dataloading",l=>{this.fire(l.dataType==="style"?new _h("styledataloading",l):new Fs("sourcedataloading",l))}),this.on("dataabort",l=>{this.fire(new Fs("sourcedataabort",l))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,r){return this.style.setGlobalStateProperty(e,r),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,r){if(r===void 0&&(r=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e?.onAdd)return this.fire(new mn(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let t=e.onAdd(this);this._controls.push(e);let a=this._controlPositions[r];return r.includes("bottom")?a.insertBefore(t,a.firstChild):a.appendChild(t),this}removeControl(e){if(!e?.onRemove)return this.fire(new mn(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this}hasControl(e){return this._controls.includes(e)}coveringTiles(e){return W1(this._camera.transform,e)}setTransformCameraUpdate(e){this._camera.transformCameraUpdate=e}getCenter(){return new ln(this._camera.transform.center.lng,this._camera.transform.center.lat)}setCenter(e,r){return this._camera.setCenter(e,r),this}getCenterElevation(){return this._camera.transform.elevation}setCenterElevation(e,r){return this._camera.setCenterElevation(e,r),this}setCenterClampedToGround(e){this._camera.setCenterClampedToGround(e)}panBy(e,r,t){return this._camera.panBy(e,r,t),this}panTo(e,r,t){return this._camera.panTo(e,r,t),this}getZoom(){return this._camera.transform.zoom}setZoom(e,r){return this._camera.setZoom(e,r),this}zoomTo(e,r,t){return this._camera.zoomTo(e,r,t),this}zoomIn(e,r){return this._camera.zoomIn(e,r),this}zoomOut(e,r){return this._camera.zoomOut(e,r),this}getVerticalFieldOfView(){return this._camera.transform.fov}setVerticalFieldOfView(e,r){return this._camera.setVerticalFieldOfView(e,r),this}getBearing(){return this._camera.transform.bearing}setBearing(e,r){return this._camera.setBearing(e,r),this}getZoomSnap(){return this._camera.getZoomSnap()}setZoomSnap(e){return this._camera.setZoomSnap(e),this}getPadding(){return this._camera.transform.padding}setPadding(e,r){return this._camera.setPadding(e,r),this}rotateTo(e,r,t){return this._camera.rotateTo(e,r,t),this}resetNorth(e,r){return this._camera.resetNorth(e,r),this}resetNorthPitch(e,r){return this._camera.resetNorthPitch(e,r),this}snapToNorth(e,r){return this._camera.snapToNorth(e,r),this}getPitch(){return this._camera.transform.pitch}setPitch(e,r){return this._camera.setPitch(e,r),this}getRoll(){return this._camera.transform.roll}setRoll(e,r){return this._camera.setRoll(e,r),this}cameraForBounds(e,r){return this._camera.cameraForBounds(e,r)}fitBounds(e,r,t){return this._camera.fitBounds(e,r,t),this}fitScreenCoordinates(e,r,t,a,i){return this._camera.fitScreenCoordinates(e,r,t,a,i),this}jumpTo(e,r){return this._camera.jumpTo(e,r),this}calculateCameraOptionsFromCameraLngLatAltRotation(e,r,t,a,i){return this._camera.calculateCameraOptionsFromCameraLngLatAltRotation(e,r,t,a,i)}easeTo(e,r){return this._camera.easeTo(e,r),this}flyTo(e,r){return this._camera.flyTo(e,r),this}stop(){return this._camera.stop(),this}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLat(ln.convert(e),this._camera.transform):null}getCenterClampedToGround(){return this._camera.getCenterClampedToGround()}calculateCameraOptionsFromTo(e,r,t,a){return a==null&&this.terrain&&(a=this.terrain.getElevationForLngLat(t,this._camera.transform)),this._camera.transform.calculateCameraOptionsFromTo(e,r,t,a??0)}resize(e,r=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(r);let t=!this._camera._moving;return t&&(this.stop(),this.fire(new hn("movestart",e)).fire(new hn("move",e))),this.fire(new vu("resize",e)),t&&this.fire(new hn("moveend",e)),this}_resizeInternal(e=!0){let[r,t]=this._containerDimensions(),a=this._getClampedPixelRatio(r,t);if(this._resizeCanvas(r,t,a),this.painter.resize(r,t,a),this.painter.overLimit()){let i=this.painter.context.gl;this._maxCanvasSize=[i.drawingBufferWidth,i.drawingBufferHeight];let o=this._getClampedPixelRatio(r,t);this._resizeCanvas(r,t,o),this.painter.resize(r,t,o)}this._resizeTransform(e)}_resizeTransform(e=!0){var r;let[t,a]=this._containerDimensions();this._camera.transform.resize(t,a,e),(r=this._camera._requestedCameraState)==null||r.resize(t,a,e)}_getClampedPixelRatio(e,r){let{0:t,1:a}=this._maxCanvasSize,i=this.getPixelRatio(),o=e*i,s=r*i,l=o>t?t/o:1,n=s>a?a/s:1,u=Math.min(l,n);return u<1&&vo("The canvas is larger than maxCanvasSize and is rendered at a lower pixel ratio to fit. Increase maxCanvasSize, within MAX_TEXTURE_SIZE, to render at full resolution."),u*i}getPixelRatio(){var e;return(e=this._overridePixelRatio)!=null?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this._camera.transform.getBounds()}getMaxBounds(){return this._camera.transform.getMaxBounds()}setMaxBounds(e){return this._camera.transform.setMaxBounds(Qh.convert(e)),this._update()}setMinZoom(e){if(e??(e=-2),e>=-2&&e<=this._camera.transform.maxZoom){let r=this._camera.transform.zoom,t=this._camera.getTransformForUpdate();return t.setMinZoom(e),this._camera.applyUpdatedTransform(t),this._update(),r!==this._camera.transform.zoom&&this.fire(new hn("zoomstart")).fire(new hn("zoom")).fire(new hn("zoomend")).fire(new hn("movestart")).fire(new hn("move")).fire(new hn("moveend")),this}throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(e=!1){let r=this._camera.transform;return e?r.applyConstrain(r.center,r.minZoom).zoom:r.minZoom}setMaxZoom(e){if(e??(e=22),e>=this._camera.transform.minZoom){let r=this._camera.transform.zoom,t=this._camera.getTransformForUpdate();return t.setMaxZoom(e),this._camera.applyUpdatedTransform(t),this._update(),r!==this._camera.transform.zoom&&this.fire(new hn("zoomstart")).fire(new hn("zoom")).fire(new hn("zoomend")).fire(new hn("movestart")).fire(new hn("move")).fire(new hn("moveend")),this}throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this._camera.transform.maxZoom}setMinPitch(e){if(e??(e=0),e<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this._camera.transform.maxPitch){let r=this._camera.transform.pitch,t=this._camera.getTransformForUpdate();return t.setMinPitch(e),this._camera.applyUpdatedTransform(t),this._update(),r!==this._camera.transform.pitch&&this.fire(new hn("pitchstart")).fire(new hn("pitch")).fire(new hn("pitchend")).fire(new hn("movestart")).fire(new hn("move")).fire(new hn("moveend")),this}throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this._camera.transform.minPitch}setMaxPitch(e){if(e??(e=60),e>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this._camera.transform.minPitch){let r=this._camera.transform.pitch,t=this._camera.getTransformForUpdate();return t.setMaxPitch(e),this._camera.applyUpdatedTransform(t),this._update(),r!==this._camera.transform.pitch&&this.fire(new hn("pitchstart")).fire(new hn("pitch")).fire(new hn("pitchend")).fire(new hn("movestart")).fire(new hn("move")).fire(new hn("moveend")),this}throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this._camera.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(e){if(e??(e=20),e>180)throw Error("anisotropicFilterPitch must be less than or equal to 180");if(e<0)throw Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=e,this._update()}getRenderWorldCopies(){return this._camera.transform.renderWorldCopies}setRenderWorldCopies(e){return this._camera.transform.setRenderWorldCopies(e),this._update()}setTransformConstrain(e){return this._camera.transform.setConstrainOverride(e),this._update()}project(e){return this._camera.transform.locationToScreenPoint(ln.convert(e),this.style&&this.terrain)}unproject(e){return this._camera.transform.screenPointToLocation(zr.convert(e),this.terrain)}isMoving(){var e;return this._camera.isMoving()||((e=this._handlers)==null?void 0:e.isMoving())||!1}isZooming(){var e;return this._camera.isZooming()||((e=this._handlers)==null?void 0:e.isZooming())||!1}isRotating(){var e;return this._camera.isRotating()||((e=this._handlers)==null?void 0:e.isRotating())||!1}_createDelegatedListener(e,r,t){if(e==="mouseenter"||e==="mouseover"){let a=!1;return{layers:r,listener:t,delegates:{mousemove:i=>{let o=r.filter(l=>this.getLayer(l)),s=o.length===0?[]:this.queryRenderedFeatures(i.point,{layers:o});s.length?a||(a=!0,t.call(this,new Vf(e,this,i.originalEvent,{features:s}))):a=!1},mouseout:()=>{a=!1}}}}if(e==="mouseleave"||e==="mouseout"){let a=!1;return{layers:r,listener:t,delegates:{mousemove:i=>{let o=r.filter(s=>this.getLayer(s));(o.length===0?[]:this.queryRenderedFeatures(i.point,{layers:o})).length?a=!0:a&&(a=!1,t.call(this,new Vf(e,this,i.originalEvent)))},mouseout:i=>{a&&(a=!1,t.call(this,new Vf(e,this,i.originalEvent)))}}}}{let a=i=>{let o=r.filter(l=>this.getLayer(l)),s=o.length===0?[]:this.queryRenderedFeatures(i.point,{layers:o});s.length&&(i.features=s,t.call(this,i),delete i.features)};return{layers:r,listener:t,delegates:{[e]:a}}}}_saveDelegatedListener(e,r){var t;this._delegatedListeners||(this._delegatedListeners={}),(t=this._delegatedListeners)[e]||(t[e]=[]),this._delegatedListeners[e].push(r)}_removeDelegatedListener(e,r,t){var a;if(!((a=this._delegatedListeners)!=null&&a[e]))return;let i=this._delegatedListeners[e];for(let o=0;or.includes(l))){for(let l in s.delegates)this.off(l,s.delegates[l]);i.splice(o,1);return}}}on(e,r,t){if(t===void 0)return super.on(e,r);let a=typeof r=="string"?[r]:r,i=this._createDelegatedListener(e,a,t);this._saveDelegatedListener(e,i);for(let o in i.delegates)this.on(o,i.delegates[o]);return{unsubscribe:()=>{this._removeDelegatedListener(e,a,t)}}}once(e,r,t){if(t===void 0)return super.once(e,r);let a=typeof r=="string"?[r]:r,i=this._createDelegatedListener(e,a,t);for(let o in i.delegates){let s=i.delegates[o];i.delegates[o]=(...l)=>{this._removeDelegatedListener(e,a,t),s(...l)}}this._saveDelegatedListener(e,i);for(let o in i.delegates)this.once(o,i.delegates[o]);return this}off(e,r,t){if(t===void 0)return super.off(e,r);let a=typeof r=="string"?[r]:r;return this._removeDelegatedListener(e,a,t),this}queryRenderedFeatures(e,r){if(!this.style)return[];let t,a=e instanceof zr||Array.isArray(e),i=a?e:[[0,0],[this._camera.transform.width,this._camera.transform.height]];if(r||(r=(a?{}:e)||{}),i instanceof zr||typeof i[0]=="number")t=[zr.convert(i)];else{let o=zr.convert(i[0]),s=zr.convert(i[1]);t=[o,new zr(s.x,o.y),s,new zr(o.x,s.y),o]}return this.style.queryRenderedFeatures(t,r,this._camera.transform)}querySourceFeatures(e,r){return this.style.querySourceFeatures(e,r)}setStyle(e,r){return r=tn({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},r),this._styleUrl=typeof e=="string"?e:null,r.diff!==!1&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let r=this._locale[e];if(r==null)throw Error(`Missing UI string '${e}'`);return r}_updateStyle(e,r){var t,a,i;if((t=this._diffStyleRequest)==null||t.abort(),this._diffStyleRequest=null,r.transformStyle&&this.style&&!this.style._loaded){this.style.once("style.load",()=>this._updateStyle(e,r));return}let o=this.style&&r.transformStyle?this.style.serialize():void 0;if(this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e)this.style=new J3(this,r||{});else return this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),(i=(a=this.style)==null?void 0:a.projection)==null||i.destroy(),delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof e=="string"?this.style.loadURL(e,r,o):this.style.loadJSON(e,r,o),this}_lazyInitEmptyStyle(){this.style||(this.style=new J3(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,r){return yi(this,null,function*(){var t;if((t=this._diffStyleRequest)==null||t.abort(),typeof e=="string"){let a=e;this._diffStyleRequest=new AbortController;let i=this._diffStyleRequest;try{let o=yield this._requestManager.transformRequest(a,"Style");if(i.signal.aborted){this._diffStyleRequest=null;return}let s=yield x_(o,i);this._diffStyleRequest=null,this._updateDiff(s.data,r)}catch(o){this._diffStyleRequest=null,S0(o)||this.fire(new mn(Ac(o)))}}else typeof e=="object"&&(this._diffStyleRequest=null,this._updateDiff(e,r))})}_updateDiff(e,r){try{this.style.setState(e,r)&&this._update(!0)}catch(t){vo(`Unable to perform style diff: ${Ac(t).message}. Rebuilding the style from scratch.`),this._updateStyle(e,r)}}getStyle(){if(this.style)return this.style.serialize()}getStyleUrl(){return this._styleUrl}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(!this.style){vo("There is no style added to the map.");return}return this.style.loaded()}addSource(e,r){return this._lazyInitEmptyStyle(),this.style.addSource(e,r),this._update(!0)}isSourceLoaded(e){var r;let t=(r=this.style)==null?void 0:r.tileManagers[e];if(t===void 0){this.fire(new mn(Error(`There is no tile manager with ID '${e}'`)));return}return t.loaded()}setTerrain(e,r={}){if(this.style._checkLoaded(),e&&i_(this,Af.terrain,{value:e},r))return this;if(this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),!e)this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture=null,this._camera.terrain=null,this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGround()&&this._camera.transform.setElevation(0);else{let t=this.style.tileManagers[e.source];if(!t)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);this.terrain===null&&t.reload();for(let a in this.style._layers){let i=this.style._layers[a];i.type==="hillshade"&&i.source===e.source&&vo("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),i.type==="color-relief"&&i.source===e.source&&vo("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain&&this.terrain.destroy(),this.terrain=new vU(this.painter,t,e,this._terrainSkirtLength),this.painter.renderToTexture=new zV(this.painter,this.terrain),this._camera.terrain=this.terrain,this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform)),this._terrainDataCallback=a=>this._handleTerrainDataEvent(a,e.source),this.style.on("data",this._terrainDataCallback)}return this.style.triggerSymbolPlacement(),this.fire(new mC({terrain:e})),this}_handleTerrainDataEvent(e,r){var t;if(e.dataType==="style"){this.terrain.tileManager.releaseAllRTT();return}let a=e.sourceId===r;if(a&&(this.terrain.resetElevationCache(),this.style.triggerSymbolPlacement()),a&&e.tile&&!this._camera.elevationFreeze&&(this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))),e.tile){if(((t=e.source)==null?void 0:t.type)==="image"){this.terrain.tileManager.releaseAllRTT();return}this.terrain.tileManager.releaseRTT(e.tile.tileID)}}getTerrain(){var e,r;return(r=(e=this.terrain)==null?void 0:e.options)!=null?r:null}areTilesLoaded(){var e;let r=(e=this.style)==null?void 0:e.tileManagers;for(let t of Object.values(r))if(!t.areTilesLoaded())return!1;return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){var r;return(r=this.style)==null?void 0:r.getSource(e)}setSourceTileLodParams(e,r,t){if(t){let a=this.getSource(t);if(!a)throw Error(`There is no source with ID "${t}", cannot set LOD parameters`);a.calculateTileZoom=Vk(Math.max(1,e),Math.max(1,r))}else for(let a in this.style.tileManagers)this.style.tileManagers[a].getSource().calculateTileZoom=Vk(Math.max(1,e),Math.max(1,r));return this._update(!0),this}refreshTiles(e,r){let t=this.style.tileManagers[e];if(!t)throw Error(`There is no tile manager with ID "${e}", cannot refresh tile`);r===void 0?t.reload(!0):t.refreshTiles(r.map(a=>new j_(a.z,a.x,a.y)))}addImage(e,r,t={}){var a;this._lazyInitEmptyStyle();let i=this._createStyleImage(r,t);return i?(this.style.addImage(e,i),(a=i.userImage)!=null&&a.onAdd&&i.userImage.onAdd(this,e),this):this}setMissingStyleImageResolver(e){var r;return this._missingStyleImageResolver=e,(r=this.style)==null||r.setMissingImageResolver(e),this}_createStyleImage(e,r={}){let{pixelRatio:t=1,sdf:a=!1,stretchX:i,stretchY:o,content:s,textFitWidth:l,textFitHeight:n}=r;if(e instanceof HTMLImageElement||Gv(e)){let{width:u,height:c,data:f}=Hc.getImageData(e);return{data:new Ls({width:u,height:c},f),pixelRatio:t,stretchX:i,stretchY:o,content:s,textFitWidth:l,textFitHeight:n,sdf:a,version:0}}if(e.width===void 0||e.height===void 0)return this.fire(new mn(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`"))),null;{let{width:u,height:c,data:f}=e,h=e,d=D2(h.data);return{data:d?new Ls({width:u,height:c}):new Ls({width:u,height:c},new Uint8Array(f)),pixelRatio:t,stretchX:i,stretchY:o,content:s,textFitWidth:l,textFitHeight:n,sdf:a,version:0,isWebGLImage:d,userImage:h}}}updateImage(e,r){let t=this.style.getImage(e);if(!t)return this.fire(new mn(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:a,height:i,data:o}=r instanceof HTMLImageElement||Gv(r)?Hc.getImageData(r):r;if(a===void 0||i===void 0)return this.fire(new mn(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(a!==t.data.width||i!==t.data.height)return this.fire(new mn(Error("The width and height of the updated image must be that same as the previous version of the image")));if(t.isWebGLImage=D2(o),t.isWebGLImage)t.userImage=r;else{let s=!(r instanceof HTMLImageElement||Gv(r));t.data.replace(o,s)}return this.style.updateImage(e,t),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new mn(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return yi(this,null,function*(){let r=yield Gd.getImage(yield this._requestManager.transformRequest(e,"Image"),new AbortController);if(!r.data)throw Error(`Could not load image ${e}: the response is empty`);return r})}listImages(){var e,r;return(r=(e=this.style)==null?void 0:e.listImages())!=null?r:[]}addLayer(e,r){return this._lazyInitEmptyStyle(),this.style.addLayer(e,r),this._update(!0)}moveLayer(e,r){return this.style.moveLayer(e,r),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){var r;return(r=this.style)==null?void 0:r.getLayer(e)}getLayersOrder(){var e,r;return(r=(e=this.style)==null?void 0:e.getLayersOrder())!=null?r:[]}setLayerZoomRange(e,r,t){return this.style.setLayerZoomRange(e,r,t),this._update(!0)}setFilter(e,r,t={}){var a;return(a=this.style)==null||a.setFilter(e,r,t),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,r,t,a={}){var i;return(i=this.style)==null||i.setPaintProperty(e,r,t,a),this._update(!0)}getPaintProperty(e,r){return this.style.getPaintProperty(e,r)}setLayoutProperty(e,r,t,a={}){return this.style.setLayoutProperty(e,r,t,a),this._update(!0)}getLayoutProperty(e,r){return this.style.getLayoutProperty(e,r)}setGlyphs(e,r={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,r),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}setFontFaces(e){return this._lazyInitEmptyStyle(),this.style.setFontFaces(e),this._update(!0)}getFontFaces(){return this.style.getFontFaces()}addSprite(e,r,t={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,r,t,a=>{a||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,r={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,r,t=>{t||this._update(!0)}),this}setLight(e,r={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,r),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,r={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,r),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,r){return this.style.setFeatureState(e,r),this._update()}removeFeatureState(e,r){return this.style.removeFeatureState(e,r),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,r=0;return this._container&&(e=this._container.clientWidth||400,r=this._container.clientHeight||300),[e,r]}_shouldHandleInitialResize(){var e;if(!((e=this._container)!=null&&e.clientWidth)||!this._container.clientHeight)return!1;let[r,t]=this._containerDimensions();return r!==this._camera.transform.width||t!==this._camera.transform.height}_setupResizeObserver(){var e;let r=!1,t=sj(i=>{this._trackResize&&!this._removed&&(this.resize(i),this.redraw())},50),a=(e=this._ownerWindow.ResizeObserver)!=null?e:ResizeObserver;this._resizeObserver=new a(i=>{!r&&(r=!0,!this._shouldHandleInitialResize())||t(i)}),this._resizeObserver.observe(this._container)}_resolveContainer(e){if(typeof e=="string"){let r=document.getElementById(e);if(!r)throw Error(`Container '${e}' not found.`);return r}if(e instanceof HTMLElement||e&&typeof e=="object"&&e.nodeType===1)return e;throw Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let r=this._canvasContainer=Fn.create("div","maplibregl-canvas-container",e);this._interactive&&r.classList.add("maplibregl-interactive"),this._canvas=Fn.create("canvas","maplibregl-canvas",r),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 t=this._containerDimensions(),a=this._getClampedPixelRatio(t[0],t[1]);this._resizeCanvas(t[0],t[1],a);let i=this._controlContainer=Fn.create("div","maplibregl-control-container",e),o=this._controlPositions={};for(let s of["top-left","top-right","bottom-left","bottom-right"])o[s]=Fn.create("div",`maplibregl-ctrl-${s} `,i);this._container.addEventListener("scroll",this._onMapScroll,!1)}_cleanupContainer(){this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map")}_resizeCanvas(e,r,t){this._canvas.width=Math.floor(t*e),this._canvas.height=Math.floor(t*r),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${r}px`}_setupPainter(){let e=Ci(ja({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),r=null;this._canvas.addEventListener("webglcontextcreationerror",a=>{r=a},{once:!0});let t=this._canvas.getContext("webgl2",e);if(!t)throw new n7(e,r);this.painter=new hV(t,this._camera.transform)}migrateProjection(e,r){this._camera.migrateProjection(e,r),this.painter.transform=e,this.fire(new gC({newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){var r;return(r=this.style)!=null&&r._loaded?(this._styleDirty||(this._styleDirty=e),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){var r,t,a,i,o;let s=this._idleTriggered?this._fadeDuration:0,l=((r=this.style.projection)==null?void 0:r.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let n=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let f=this._camera.transform.zoom,h=is();this.style.zoomHistory.update(f,h);let d=new Ko(f,{now:h,fadeDuration:s,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),p=d.crossFadingFactor();(p!==1||p!==this._crossFadingFactor)&&(n=!0,this._crossFadingFactor=p),this.style.update(d)}let u=((t=this.style.projection)==null?void 0:t.transitionState)>0!==l;this._camera.transform.setTransitionState((a=this.style.projection)==null?void 0:a.transitionState),this.style&&(this._sourcesDirty||u)&&(this._sourcesDirty=!1,this.style._updateSources(this._camera.transform)),this.terrain?(this.terrain.tileManager.update(this._camera.transform,this.terrain)&&this.terrain.resetElevationCache(),this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),!this._camera.elevationFreeze&&this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))):(this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGround()&&this._camera.transform.setElevation(0)),this._placementDirty=(i=this.style)==null?void 0:i._updatePlacement(this._camera.transform,this.showCollisionBoxes,s,this._crossSourceCollisions,u),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:s,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new vu("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new vu("load"))),this.style&&(this.style.hasTransitions()||n)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let c=this._sourcesDirty||this._styleDirty||this._placementDirty||((o=this.painter.renderToTexture)==null?void 0:o.needsFollowUpFrame);return c||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new vu("idle")),this._loaded&&!this._fullyLoaded&&!c&&(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._render(0)),this}remove(){var e,r;this._hash&&this._hash.remove();for(let a of this._controls)a.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._renderTaskQueue.clear(),(e=this._diffStyleRequest)==null||e.abort(),this.painter.destroy(),this._handlers.destroy(),this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),Gd.removeThrottleControl(this._imageQueueHandle),(r=this._resizeObserver)==null||r.disconnect();let t=this.painter.context.gl.getExtension("WEBGL_lose_context");t?.loseContext&&t.loseContext(),this._cleanupContainer(),this._removed=!0,this.fire(new vu("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,Hc.frame(this._frameRequest,e=>{this._frameRequest=null;try{this._render(e)}catch(r){if(!S0(r))throw r}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return OV}getCameraTargetElevation(){return this._camera.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(e){return this._lazyInitEmptyStyle(),this.style.setProjection(e),this._update(!0)}},NV={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0},jV=class{constructor(e){this._updateZoomButtons=()=>{let r=this._map.getZoom(),t=r===this._map.getMaxZoom(),a=r===this._map.getMinZoom(!0);this._zoomInButton.disabled=t,this._zoomOutButton.disabled=a,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",a.toString())},this._rotateCompassArrow=()=>{let r=this._map.getPitch(),t=this._map.getRoll(),a=this._map.getBearing(),i=1/Math.cos(il(r))**.5;if(this.options.visualizePitch&&this.options.visualizeRoll){this._compassIcon.style.transform=`scale(${i}) rotateZ(${-t}deg) rotateX(${r}deg) rotateZ(${-a}deg)`;return}if(this.options.visualizePitch){this._compassIcon.style.transform=`scale(${i}) rotateX(${r}deg) rotateZ(${-a}deg)`;return}if(this.options.visualizeRoll){this._compassIcon.style.transform=`rotate(${-a-t}deg)`;return}this._compassIcon.style.transform=`rotate(${-a}deg)`},this._setButtonTitle=(r,t)=>{let a=this._map._getUIString(`NavigationControl.${t}`);r.title=a,r.setAttribute("aria-label",a)},this.options=tn({},NV,e),this._container=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",r=>r.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",r=>this._map.zoomIn({},{originalEvent:r})),Fn.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",r=>this._map.zoomOut({},{originalEvent:r})),Fn.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",r=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:r}):this._map.resetNorth({},{originalEvent:r})}),this._compassIcon=Fn.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("move",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new UV(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("move",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,r){let t=Fn.create("button",e,this._container);return t.type="button",t.addEventListener("click",r),t}},UV=class{constructor(e,r,t=!1){this.mousedown=i=>{this.startMove(i,Fn.mousePos(this.element,i)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=i=>{this.move(i,Fn.mousePos(this.element,i))},this.mouseup=i=>{this._rotatePitchHandler.dragEnd(i),this.offTemp()},this.touchstart=i=>{i.targetTouches.length===1?(this._startPos=this._lastPos=Fn.touchPos(this.element,i.targetTouches)[0],this.startMove(i,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend)):this.reset()},this.touchmove=i=>{i.targetTouches.length===1?(this._lastPos=Fn.touchPos(this.element,i.targetTouches)[0],this.move(i,this._lastPos)):this.reset()},this.touchend=i=>{i.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=r;let a=new MV;this._rotatePitchHandler=new rg({clickTolerance:3,move:(i,o)=>{let s=r.getBoundingClientRect(),l=new zr((s.bottom-s.top)/2,(s.right-s.left)/2);return{bearingDelta:qI(new zr(i.x,o.y),o,l),pitchDelta:t?(o.y-i.y)*-.5:void 0}},moveStateManager:a,enable:!0,assignEvents:()=>{}}),this.map=e,r.addEventListener("mousedown",this.mousedown),r.addEventListener("touchstart",this.touchstart,{passive:!1}),r.addEventListener("touchcancel",this.reset)}startMove(e,r){this._rotatePitchHandler.dragStart(e,r),Fn.disableDrag()}move(e,r){let t=this.map,{bearingDelta:a,pitchDelta:i}=this._rotatePitchHandler.dragMove(e,r)||{};a&&t.setBearing(t.getBearing()+a),i&&t.setPitch(t.getPitch()+i)}off(){let e=this.element;e.removeEventListener("mousedown",this.mousedown),e.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){Fn.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}},u4={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%)"},E7={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]},S7="#3FB1CE",H0=class extends qf{},C7=class extends qf{},c4=class extends Zl{constructor(e){if(super(),this._onClick=r=>{this.fire(new C7("click",{originalEvent:r}))},this._onKeyPress=r=>{(r.code==="Space"||r.code==="Enter")&&this.togglePopup()},this._onKeyDown=r=>{if(!this._defaultMarker||!this._draggable||!this._map||!this._lngLat||r.composedPath()[0]!==this._element||r.altKey||r.ctrlKey||r.metaKey)return;let t=E7[r.key];if(!t)return;r.preventDefault(),r.stopPropagation();let a=r.shiftKey?10:1,i=this._map.project(this._lngLat);this.setLngLat(this._map.unproject(new zr(i.x+t[0]*a,i.y+t[1]*a))),this._keyboardDragActive||(this._keyboardDragActive=!0,this.fire(new H0("dragstart"))),this.fire(new H0("drag"))},this._onKeyUp=r=>{E7[r.key]&&this._endKeyboardDrag()},this._onBlur=()=>{this._endKeyboardDrag()},this._onMapClick=r=>{let t=r.originalEvent.target,a=this._element;this._popup&&(t===a||a.contains(t))&&this.togglePopup()},this._update=r=>{if(!this._map)return;let t=this._map.loaded()&&!this._map.isMoving();(r?.type==="terrain"||r?.type==="render"&&!t)&&this._map.once("render",this._update),this._lngLat=cj(this._lngLat,this._flatPos,this._map._camera.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map._camera.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let a="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?a=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(a=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?i="rotateX(0deg)":this._pitchAlignment==="map"&&(i=`rotateX(${this._map.getPitch()}deg)`),!this._subpixelPositioning&&(!r||r.type==="moveend")&&(this._pos=this._pos.round()),this._element.style.transform=`${u4[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${a}`,Hc.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(r?.type==="moveend")}).catch(()=>{})},this._onMove=r=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=r.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=r.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 H0("dragstart"))),this.fire(new H0("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 H0("dragend")),this._state="inactive"},this._addDragHandler=r=>{this._element.contains(r.originalEvent.target)&&(r.preventDefault(),this._positionDelta=r.point.sub(this._pos).add(this._offset),this._pointerdownPos=r.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=e?.anchor||"center",this._color=e?.color||S7,this._scale=e?.scale||1,this._draggable=e?.draggable||!1,this._clickTolerance=e?.clickTolerance||0,this._subpixelPositioning=e?.subpixelPositioning||!1,this._isDragging=!1,this._roleManaged=!1,this._tabIndexManaged=!1,this._keyboardDragActive=!1,this._state="inactive",this._rotation=e?.rotation||0,this._rotationAlignment=e?.rotationAlignment||"auto",this._pitchAlignment=e?.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e?.opacity,e?.opacityWhenCovered),e?.element)this._element=e.element,this._offset=zr.convert(e?.offset||[0,0]);else{this._defaultMarker=!0,this._element=Fn.create("div");let r=eye().cloneNode(!0);r.setAttributeNS(null,"height",`${41*this._scale}px`),r.setAttributeNS(null,"width",`${27*this._scale}px`),tye(r).setAttributeNS(null,"fill",this._color),this._element.appendChild(r),this._offset=zr.convert(e?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",r=>{r.preventDefault()}),this._element.addEventListener("mousedown",r=>{r.preventDefault()}),fj(this._element,this._anchor,"marker"),e?.className)for(let r of e.className.split(" "))this._element.classList.add(r);this._popup=null}addTo(e){return this.remove(),this._map=e,this._defaultMarker&&!this._element.hasAttribute("aria-label")&&this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._updateAccessibilityRole(),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),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("projectiontransition",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),this._element.removeEventListener("click",this._onClick),this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._element.removeEventListener("keypress",this._onKeyPress),this._keyboardDragActive=!1,this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=ln.convert(e),this._pos=null,this._update(),this._popup&&this._popup.setLngLat(this._lngLat),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress)),e){if(!("offset"in e.options)){let r=13.5/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[r,(24.6+r)*-1],"bottom-right":[-r,(24.6+r)*-1],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._element.addEventListener("keypress",this._onKeyPress)}return this._updateTabIndex(),this._updateAccessibilityRole(),this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}_endKeyboardDrag(){this._keyboardDragActive&&(this._keyboardDragActive=!1,this.fire(new H0("dragend")))}getPopup(){return this._popup}togglePopup(){let e=this._popup;if(this._element.style.opacity===this._opacityWhenCovered)return this;if(e)e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map));else return this;return this}_updateOpacity(e=!1){var r,t;let a=(r=this._map)==null?void 0:r.terrain,i=this._map._camera.transform.isLocationOccluded(this._lngLat);if(!a||i){let p=i?this._opacityWhenCovered:this._opacity;this._element.style.opacity!==p&&(this._element.style.opacity=p,this._element.classList.toggle("maplibregl-marker-covered",i));return}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let o=this._map,s=o.terrain.depthAtPoint(this._pos),l=o.terrain.getElevationForLngLat(this._lngLat,o._camera.transform),n=o._camera.transform.lngLatToCameraDepth(this._lngLat,l),u=.006;if(n-su;(t=this._popup)!=null&&t.isOpen()&&d&&this._popup.remove(),this._element.style.opacity=d?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",d)}getOffset(){return this._offset}setOffset(e){return this._offset=zr.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._element.classList.toggle("maplibregl-marker-draggable",this._draggable),this._map&&(e?(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._defaultMarker&&(this._draggable?(this._element.addEventListener("keydown",this._onKeyDown),this._element.addEventListener("keyup",this._onKeyUp),this._element.addEventListener("blur",this._onBlur)):(this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._endKeyboardDrag())),this._updateTabIndex(),this._updateAccessibilityRole(),this}isDraggable(){return this._draggable}_updateTabIndex(){this._popup||this._defaultMarker&&this._draggable?this._element.hasAttribute("tabindex")||(this._element.setAttribute("tabindex","0"),this._tabIndexManaged=!0):this._tabIndexManaged&&(this._tabIndexManaged=(this._element.getAttribute("tabindex")==="0"&&this._element.removeAttribute("tabindex"),!1))}_updateAccessibilityRole(){if(!this._defaultMarker||this._element.hasAttribute("role")&&!this._roleManaged)return;let e=this._draggable||this._popup?"button":"img";this._element.setAttribute("role",e),this._roleManaged=!0}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,r){return(this._opacity===void 0||e===void 0&&r===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=String(e)),r!==void 0&&(this._opacityWhenCovered=String(r)),this._map&&this._updateOpacity(!0),this}},qV={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},cx=0,ig=!1,W0=class extends qf{},f4=class extends qf{},D7=class extends qf{},VV=class extends Zl{constructor(e){super(),this._onSuccess=r=>{if(this._map){if(this._isOutOfMapMaxBounds(r)){this._setErrorState(),this.fire(new f4("outofmaxbounds",r)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=r,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 Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(r),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(r),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new f4("geolocate",r)),this._finish()}},this._updateCamera=r=>{let t=new ln(r.coords.longitude,r.coords.latitude),a=r.coords.accuracy,i=this._map.getBearing(),o=tn({bearing:i},this.options.fitBoundsOptions),s=Qh.fromLngLat(t,a);this._map.fitBounds(s,o,{geolocateSource:!0})},this._updateMarker=r=>{if(r){let t=new ln(r.coords.longitude,r.coords.latitude);this._accuracyCircleMarker.setLngLat(t).addTo(this._map),this._userLocationDotMarker.setLngLat(t).addTo(this._map),this._accuracy=r.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=r=>{if(this._map){if(r.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 t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(r.code===3&&ig)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new D7("error",r)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=r=>{if(!this._map)return;let t=r?.[0]instanceof ResizeObserverEntry;!r.geolocateSource&&this._watchState==="ACTIVE_LOCK"&&!t&&!this._map.isZooming()&&(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new W0("trackuserlocationend")),this.fire(new W0("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",r=>{r.preventDefault()}),this._geolocateButton=Fn.create("button","maplibregl-ctrl-geolocate",this._container),Fn.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=r=>{if(this._map){if(r===!1){vo("Geolocation support is not available so the GeolocateControl will be disabled.");let t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}else{let t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Fn.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new c4({element:this._dotElement}),this._circleElement=Fn.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new c4({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=tn({},qV,e)}onAdd(e){return this._map=e,this._container=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),Qge().then(r=>this._finishSetupUI(r)),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(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,cx=0,ig=!1}_isOutOfMapMaxBounds(e){let r=this._map.getMaxBounds(),t=e.coords;return r&&(t.longituder.getEast()||t.latituder.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":case"BACKGROUND_ERROR":break;case"OFF":case void 0:break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let e=this._userLocationDotMarker.getLngLat();if(!this.options.showUserLocation||!this.options.showAccuracyCircle||!this._accuracy||!e)return;let r=this._map.project(e),t=this._map.unproject([r.x+100,r.y]),a=e.distanceTo(t)/100,i=2*this._accuracy/a;this._circleElement.style.width=`${i.toFixed(2)}px`,this._circleElement.style.height=`${i.toFixed(2)}px`}trigger(){if(!this._setup)return vo("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 W0("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":cx--,ig=!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 W0("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 W0("trackuserlocationstart")),this.fire(new W0("userlocationfocus"));break;default:throw 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 Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),cx++;let e;cx>1?(e={maximumAge:6e5,timeout:0},ig=!0):(e=this.options.positionOptions,ig=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}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)}},GV={maxWidth:100,unit:"metric"},HV=class{constructor(e){this._onMove=()=>{hj(this._map,this._container,this.options)},this.setUnit=r=>{this.options.unit=r,hj(this._map,this._container,this.options)},this.options=ja(ja({},GV),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},h4=class extends qf{},WV=class extends Zl{constructor(e={}){var r;super(),this._onFullscreenChange=()=>{var t;let a=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;(t=a?.shadowRoot)!=null&&t.fullscreenElement;)a=a.shadowRoot.fullscreenElement;a===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(r=e.pseudo)!=null?r:!1,e?.container&&(e.container instanceof HTMLElement?this._container=e.container:vo("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(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let e=this._fullscreenButton=Fn.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);Fn.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_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 h4("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new h4("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},$V=class{constructor(e){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=e}onAdd(e){return this._map=e,this._container=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=Fn.create("button","maplibregl-ctrl-terrain",this._container),Fn.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(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},YV=class{constructor(){this._toggleProjection=()=>{var e;let r=(e=this._map.getProjection())==null?void 0:e.type;r==="mercator"||!r?this._map.setProjection({type:"globe"}):this._map.setProjection({type:"mercator"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((e=this._map.getProjection())==null?void 0:e.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(e){return this._map=e,this._container=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=Fn.create("button","maplibregl-ctrl-globe",this._container),Fn.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},XV={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},ZV=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),d4=class extends qf{},KV=class extends Zl{constructor(e){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._map._camera.transform.isLocationOccluded(this.getLngLat())?this._container.style.opacity=`${this.options.locationOccludedOpacity}`:this._container.style.opacity="")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),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("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new d4("close"))),this),this._update=r=>{let t=this._lngLat||this._trackPointer;if(!this._map||!t||!this._content)return;if(!this._container){if(this._container=Fn.create("div","maplibregl-popup",this._map.getContainer()),this._tip=Fn.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let n of this.options.className.split(" "))this._container.classList.add(n);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=cj(this._lngLat,this._flatPos,this._map._camera.transform,this._trackPointer);let a;if(r&&"point"in r&&r.point&&(a=r.point),this._trackPointer&&!a)return;let i=this._flatPos=this._pos=this._trackPointer&&a?a:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&a?a:this._map._camera.transform.locationToScreenPoint(this._lngLat));let o=this.options.anchor,s=dj(this.options.offset);if(!o){let n=this._container.offsetWidth,u=this._container.offsetHeight,c=iye(this.options.padding),f;f=i.y+s.bottom.ythis._map._camera.transform.height-u-c.bottom?["bottom"]:[],i.xthis._map._camera.transform.width-n/2-c.right&&f.push("right"),o=f.length===0?"bottom":f.join("-")}let l=i.add(s[o]);this.options.subpixelPositioning||(l=l.round()),this._container.style.transform=`${u4[o]} translate(${l.x}px,${l.y}px)`,fj(this._container,o,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=tn(Object.create(XV),e)}addTo(e){return this._map&&this.remove(),this._map=e,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._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),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 d4("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=ln.convert(e),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),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._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let r=document.createDocumentFragment(),t=document.createElement("body"),a;for(t.innerHTML=e;a=t.firstChild,a;)r.appendChild(a);return this.setDOMContent(r)}getMaxWidth(){var e;return(e=this._container)==null?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=Fn.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}setPadding(e){this.options.padding=e,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=Fn.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 e=this._container.querySelector(ZV);e&&e.focus()}},JV=dC}}),mye=ye({"build/maplibre_worker.js"(e,r){"use strict";r.exports='var t1=Object.defineProperty,e1=Object.defineProperties;var r1=Object.getOwnPropertyDescriptors;var nh=Object.getOwnPropertySymbols;var i1=Object.prototype.hasOwnProperty,n1=Object.prototype.propertyIsEnumerable;var ah=(t,e,r)=>e in t?t1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,je=(t,e)=>{for(var r in e||(e={}))i1.call(e,r)&&ah(t,r,e[r]);if(nh)for(var r of nh(e))n1.call(e,r)&&ah(t,r,e[r]);return t},Si=(t,e)=>e1(t,r1(e));var rt=(t,e,r)=>new Promise((i,n)=>{var a=l=>{try{o(r.next(l))}catch(u){n(u)}},s=l=>{try{o(r.throw(l))}catch(u){n(u)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(a,s);o((r=r.apply(t,e)).next())});var a1=Object.create,ep=Object.defineProperty,s1=Object.getOwnPropertyDescriptor,o1=Object.getOwnPropertyNames,l1=Object.getPrototypeOf,rp=Object.prototype.hasOwnProperty,fl=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),u1=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=o1(e),a=0,s=n.length,o;ae[l]).bind(null,o),enumerable:!(i=s1(e,o))||i.enumerable});return t},h1=(t,e,r)=>(r=t==null?{}:a1(l1(t)),u1(e||!t||!t.__esModule||!rp.call(t,"default")?ep(r,"default",{value:t,enumerable:!0}):r,t));function B(t,e){this.x=t,this.y=e}B.prototype={clone(){return new B(this.x,this.y)},add(t){return this.clone()._add(t)},sub(t){return this.clone()._sub(t)},multByPoint(t){return this.clone()._multByPoint(t)},divByPoint(t){return this.clone()._divByPoint(t)},mult(t){return this.clone()._mult(t)},div(t){return this.clone()._div(t)},rotate(t){return this.clone()._rotate(t)},rotateAround(t,e){return this.clone()._rotateAround(t,e)},matMult(t){return this.clone()._matMult(t)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(t){return this.x===t.x&&this.y===t.y},dist(t){return Math.sqrt(this.distSqr(t))},distSqr(t){let e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith(t){return this.angleWithSep(t.x,t.y)},angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult(t){let e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add(t){return this.x+=t.x,this.y+=t.y,this},_sub(t){return this.x-=t.x,this.y-=t.y,this},_mult(t){return this.x*=t,this.y*=t,this},_div(t){return this.x/=t,this.y/=t,this},_multByPoint(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint(t){return this.x/=t.x,this.y/=t.y,this},_unit(){return this._div(this.mag()),this},_perp(){let t=this.y;return this.y=this.x,this.x=-t,this},_rotate(t){let e=Math.cos(t),r=Math.sin(t),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround(t,e){let r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),a=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:B},B.convert=function(t){if(t instanceof B)return t;if(Array.isArray(t))return new B(+t[0],+t[1]);if(t.x!==void 0&&t.y!==void 0)return new B(+t.x,+t.y);throw Error("Expected [x, y] or {x, y} point format")};function c1(t,e,r,i){let n=3*t,a=3*(r-t)-n,s=1-n-a,o=3*e,l=3*(i-e)-o,u=1-o-l;return function(h,c=1e-6){if(h<=0)return 0;if(h>=1)return 1;let p=h;for(let y=0;y<8;y++){let m=((s*p+a)*p+n)*p-h;if(Math.abs(m)m?f=p:d=p,p=(f+d)*.5}return((u*p+l)*p+o)*p}}var Nn;function p1(){return Nn!=null||(Nn=typeof OffscreenCanvas<"u"&&!!new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Nn}var Un;function f1(){if(Un==null&&(Un=!1,p1())){let t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let r=0;r<25;r++){let i=r*4;t.fillStyle=`rgb(${i},${i+1},${i+2})`,t.fillRect(r%5,Math.floor(r/5),1,1)}let e=t.getImageData(0,0,5,5).data;for(let r=0;r<100;r++)if(r%4!=3&&e[r]!==r){Un=!0;break}}}return Un||!1}var pe=typeof Float32Array<"u"?Float32Array:Array;Math.PI/180,180/Math.PI;function d1(){var t=new pe(9);return pe!=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}function ip(){var t=new pe(3);return pe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function y1(t){var e=t[0],r=t[1],i=t[2];return Math.sqrt(e*e+r*r+i*i)}function sh(t,e,r){var i=new pe(3);return i[0]=t,i[1]=e,i[2]=r,i}function m1(t,e){var r=e[0],i=e[1],n=e[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function g1(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ks(t,e,r){var i=e[0],n=e[1],a=e[2],s=r[0],o=r[1],l=r[2];return t[0]=n*l-a*o,t[1]=a*s-i*l,t[2]=i*o-n*s,t}var x1=y1;(function(){var t=ip();return function(e,r,i,n,a,s){var o,l;for(r||(r=3),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o0&&(s=1/Math.sqrt(s)),t[0]=r*s,t[1]=i*s,t[2]=n*s,t[3]=a*s,t}function w1(t,e,r){var i=e[0],n=e[1],a=e[2],s=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*s,t[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*s,t[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*s,t[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*s,t}(function(){var t=v1();return function(e,r,i,n,a,s){var o,l;for(r||(r=4),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o1e-6?(p=Math.acos(f),d=Math.sin(p),y=Math.sin((1-i)*p)/d,m=Math.sin(i*p)/d):(y=1-i,m=i),t[0]=y*n+m*l,t[1]=y*a+m*u,t[2]=y*s+m*h,t[3]=y*o+m*c,t}function _1(t,e){var r=e[0]+e[4]+e[8],i;if(r>0)i=Math.sqrt(r+1),t[3]=.5*i,i=.5/i,t[0]=(e[5]-e[7])*i,t[1]=(e[6]-e[2])*i,t[2]=(e[1]-e[3])*i;else{var n=0;e[4]>e[0]&&(n=1),e[8]>e[n*3+n]&&(n=2);var a=(n+1)%3,s=(n+2)%3;i=Math.sqrt(e[n*3+n]-e[a*3+a]-e[s*3+s]+1),t[n]=.5*i,i=.5/i,t[3]=(e[a*3+s]-e[s*3+a])*i,t[a]=(e[a*3+n]+e[n*3+a])*i,t[s]=(e[s*3+n]+e[n*3+s])*i}return t}var lh=b1;(function(){var t=ip(),e=sh(1,0,0),r=sh(0,1,0);return function(i,n,a){var s=g1(n,a);return s<-.999999?(ks(t,e,n),x1(t)<1e-6&&ks(t,r,n),m1(t,t),D1(i,t,Math.PI),i):s>.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(ks(t,n,a),i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=1+s,lh(i,i))}})(),(function(){var t=oh(),e=oh();return function(r,i,n,a,s,o){return Ts(t,i,s,o),Ts(e,n,a,o),Ts(r,t,e,2*o*(1-o)),r}})(),(function(){var t=d1();return function(e,r,i,n){return t[0]=i[0],t[3]=i[1],t[6]=i[2],t[1]=n[0],t[4]=n[1],t[7]=n[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],lh(e,_1(e,t))}})();function A1(){var t=new pe(2);return pe!=Float32Array&&(t[0]=0,t[1]=0),t}(function(){var t=A1();return function(e,r,i,n,a,s){var o,l;for(r||(r=2),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o=1)return 1;let e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function E1(t,e,r,i){return c1(t,e,r,i)}var d5=E1(.25,.1,.25,1);function Ji(t,e,r){return Math.min(r,Math.max(e,t))}function F1(t,e,r){let i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n}function Gt(t,...e){for(let r of e)for(let i in r)t[i]=r[i];return t}function k1(t){return Math.log(t)/Math.LN2%1==0}function Ia(t,e,r){let i={};for(let n in t)i[n]=e.call(r||this,t[n],n,t);return i}function T1(t,e,r){let i={};for(let n in t)e.call(r||this,t[n],n,t)&&(i[n]=t[n]);return i}function He(t){return Array.isArray(t)?t.map(He):typeof t=="object"&&t?Ia(t,He):t}var uh={};function Bt(t){uh[t]||(typeof console<"u"&&console.warn(t),uh[t]=!0)}function Ke(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function mr(t){return typeof WorkerGlobalScope<"u"&&t!==void 0&&t instanceof WorkerGlobalScope}function Ca(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap}function I1(t,e,r,i,n){let a=Math.max(-e,0)*4,s=(Math.max(0,r)-r)*i*4+a,o=i*4,l=Math.max(0,e),u=Math.max(0,r),h=Math.min(t.width,e+i),c=Math.min(t.height,r+n);return{rect:{x:l,y:u,width:h-l,height:c-u},layout:[{offset:s,stride:o}]}}function C1(t,e,r,i,n){return rt(this,null,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(t,{timestamp:0});try{let s=a==null?void 0:a.format;if(!s||!(s.startsWith("BGR")||s.startsWith("RGB")))throw Error(`Unrecognized format ${s}`);let o=s.startsWith("BGR"),l=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(l,I1(t,e,r,i,n)),o)for(let u=0;u{t.removeEventListener(e,r,i)}}}function ch(t){return t*Math.PI/180}var ph="AbortError",dl=class extends Error{constructor(t=ph){super(t instanceof Error?t.message:t),this.name=ph,t instanceof Error&&t.stack&&(this.stack=t.stack)}};function yl(t){return t instanceof Error&&t.name==="AbortError"}function B1(t){if(t.aborted)throw new dl(t.reason)}var ml={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function P1(t){return ml.REGISTERED_PROTOCOLS[t.substring(0,t.indexOf("://"))]}function sp(t,e){ml.REGISTERED_PROTOCOLS[t]=e}function op(t){delete ml.REGISTERED_PROTOCOLS[t]}var fh="global-dispatcher",ya=class extends Error{constructor(t,e,r,i){super(`AJAXError: ${e} (${t}): ${r}`),this.status=t,this.statusText=e,this.url=r,this.body=i}};function lp(){var t;if(mr(self))return(t=self.worker)==null?void 0:t.referrer;if(window.location.protocol==="blob:")try{return window.parent.location.href}catch(e){}return window.location.href}var z1=t=>{var e;return t.startsWith("file:")||((e=lp())==null?void 0:e.startsWith("file:"))&&!/^\\w+:/.test(t)};function L1(t,e){return rt(this,null,function*(){let r=new Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,cache:t.cache,referrer:lp(),referrerPolicy:t.referrerPolicy,signal:e.signal});t.type==="json"&&!r.headers.has("Accept")&&r.headers.set("Accept","application/json");let i;try{i=yield fetch(r)}catch(s){throw yl(s)?s:new ya(0,Ki(s).message,t.url,new Blob)}if(!i.ok){let s=yield i.blob();throw new ya(i.status,i.statusText,t.url,s)}let n;n=t.type==="arrayBuffer"||t.type==="image"?i.arrayBuffer():t.type==="json"?i.json():i.text();let a=yield n;return B1(e.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}function V1(t,e){return new Promise((r,i)=>{var a;let n=new XMLHttpRequest;n.open(t.method||"GET",t.url,!0),(t.type==="arrayBuffer"||t.type==="image")&&(n.responseType="arraybuffer");for(let s in t.headers)n.setRequestHeader(s,t.headers[s]);t.type==="json"&&(n.responseType="text",(a=t.headers)!=null&&a.Accept||n.setRequestHeader("Accept","application/json")),n.withCredentials=t.credentials==="include",n.onerror=()=>{i(Error(n.statusText))},n.onload=()=>{if(!e.signal.aborted)if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let s=n.response;if(t.type==="json")try{s=JSON.parse(n.response)}catch(o){i(o);return}r({data:s,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires"),etag:n.getResponseHeader("ETag")})}else{let s=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});i(new ya(n.status,n.statusText,t.url,s))}},e.signal.addEventListener("abort",()=>{n.abort(),i(new dl(e.signal.reason))}),n.send(t.body)})}var Ma=function(t,e){return rt(this,null,function*(){var r,i;if(t.url.includes("://")&&!/^https?:|^file:/.test(t.url)){let n=P1(t.url);if(n){let a=yield n(t,e);return!a.data&&t.type==="arrayBuffer"?Gt(a,{data:new ArrayBuffer(0)}):a}if(mr(self)&&((r=self.worker)!=null&&r.actor))return self.worker.actor.sendAsync({type:"GR",data:t,targetMapId:fh},e)}if(!z1(t.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return L1(t,e);if(mr(self)&&((i=self.worker)!=null&&i.actor))return self.worker.actor.sendAsync({type:"GR",data:t,mustQueue:!0,targetMapId:fh},e)}return V1(t,e)})},up=(t,e)=>Ma(Gt(t,{type:"json"}),e),hp=(t,e)=>Ma(Gt(t,{type:"arrayBuffer"}),e);function dh(t,e,r){var i;(i=r[t])!=null&&i.includes(e)||(r[t]||(r[t]=[]),r[t].push(e))}function Is(t,e,r){if(r!=null&&r[t]){let i=r[t].indexOf(e);i!==-1&&r[t].splice(i,1)}}var cp=class{constructor(t,e={}){Gt(this,e),this.type=t}},ma=class extends cp{constructor(t,e={}){super("error",Gt({error:t},e))}},O1=class{on(t,e){return this._listeners||(this._listeners={}),dh(t,e,this._listeners),{unsubscribe:()=>{this.off(t,e)}}}off(t,e){return Is(t,e,this._listeners),Is(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners||(this._oneTimeListeners={}),dh(t,e,this._oneTimeListeners),this):new Promise(r=>this.once(t,r))}fire(t,e){var n,a,s,o,l,u;let r=typeof t=="string"?new cp(t,e||{}):t,i=r.type;if(this.listens(i)){r.target=this;let h=(s=(a=(n=this._listeners)==null?void 0:n[i])==null?void 0:a.slice())!=null?s:[];for(let f of h)f.call(this,r);let c=(u=(l=(o=this._oneTimeListeners)==null?void 0:o[i])==null?void 0:l.slice())!=null?u:[];for(let f of c)Is(i,f,this._oneTimeListeners),f.call(this,r);let p=this._eventedParent;p&&(Gt(r,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(r))}else r instanceof ma&&console.error(r.error);return this}listens(t){var e,r,i,n,a;return!!((r=(e=this._listeners)==null?void 0:e[t])!=null&&r.length||(n=(i=this._oneTimeListeners)==null?void 0:i[t])!=null&&n.length||(a=this._eventedParent)!=null&&a.listens(t))}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}},pp={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},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},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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:"filter"},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:{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:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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","feature"]},"property-type":"data-driven"},"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"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,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,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default: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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"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","feature"]},"property-type":"cross-faded-data-driven"},"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"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}},w=pp,fp=["type","source","source-layer","minzoom","maxzoom","filter","layout"],E=class{constructor(t,e,r,i,n="error"){this.message=(t?`${t}: `:"")+r,i&&(this.identifier=i),this.severity=n,e!=null&&e.__line__&&(this.line=e.__line__)}},dn={kind:"null"},I={kind:"number"},Y={kind:"string"},tt={kind:"boolean"},ce={kind:"color"},Ba={kind:"projectionDefinition"},fr={kind:"object"},Z={kind:"value"},R1={kind:"error"},Pa={kind:"collator"},yn={kind:"formatted"},za={kind:"padding"},Qi={kind:"colorArray"},La={kind:"numberArray"},mn={kind:"resolvedImage"},Va={kind:"variableAnchorOffsetCollection"};function Ut(t,e){return{kind:"array",itemType:t,N:e}}function yt(t){if(t.kind==="array"){let e=yt(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}var $1=[dn,I,Y,tt,ce,Ba,yn,fr,Ut(Z),za,La,Qi,mn,Va];function tn(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!tn(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(let r of $1)if(!tn(r,e))return null}}return`Expected ${yt(t)} but found ${yt(e)} instead.`}function gl(t,e){return e.some(r=>r.kind===t.kind)}function dr(t,e){return e.some(r=>r==="null"?t===null:r==="array"?Array.isArray(t):r==="object"?t&&!Array.isArray(t)&&typeof t=="object":r===typeof t)}function Ge(t,e){return t.kind==="array"&&e.kind==="array"?t.itemType.kind===e.itemType.kind&&typeof t.N=="number":t.kind===e.kind}var dp=.96422,yp=.82521,mp=4/29,Ks=6/29,gp=3*Ks*Ks,N1=Math.PI/180,U1=180/Math.PI;function xp(t){return t%=360,t<0&&(t+=360),t}function vp([t,e,r,i]){t=Cs(t),e=Cs(e),r=Cs(r);let n,a,s=Ms((.2225045*t+.7168786*e+.0606169*r)/1);t===e&&e===r?n=a=s:(n=Ms((.4360747*t+.3850649*e+.1430804*r)/dp),a=Ms((.0139322*t+.0971045*e+.7141733*r)/yp));let o=116*s-16;return[o<0?0:o,500*(n-s),200*(s-a),i]}function Cs(t){return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function Ms(t){return t>.008856451679035631?t**(1/3):t/gp+mp}function bp([t,e,r,i]){let n=(t+16)/116,a=isNaN(e)?n:n+e/500,s=isNaN(r)?n:n-r/200;return n=1*Ps(n),a=dp*Ps(a),s=yp*Ps(s),[Bs(3.1338561*a-1.6168667*n-.4906146*s),Bs(-.9787684*a+1.9161415*n+.033454*s),Bs(.0719453*a-.2289914*n+1.4052427*s),i]}function Bs(t){return t=t<=.00304?12.92*t:1.055*t**(1/2.4)-.055,t<0?0:t>1?1:t}function Ps(t){return t>Ks?t*t*t:gp*(t-mp)}function q1(t){let[e,r,i,n]=vp(t),a=Math.sqrt(r*r+i*i);return[Math.round(a*1e4)?xp(Math.atan2(i,r)*U1):NaN,a,e,n]}function j1([t,e,r,i]){return t=isNaN(t)?0:t*N1,bp([r,Math.cos(t)*e,Math.sin(t)*e,i])}function G1([t,e,r,i]){t=xp(t),e/=100,r/=100;function n(a){let s=(a+t/30)%12,o=e*Math.min(r,1-r);return r-o*Math.max(-1,Math.min(s-3,9-s,1))}return[n(0),n(8),n(4),i]}var X1=Object.hasOwn||function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};function ji(t,e){return X1(t,e)?t[e]:void 0}function Y1(t){if(t=t.toLowerCase().trim(),t==="transparent")return[0,0,0,0];let e=ji(W1,t);if(e){let[i,n,a]=e;return[i/255,n/255,a/255,1]}if(t.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(t)){let i=t.length<6?1:2,n=1;return[qn(t.slice(n,n+=i)),qn(t.slice(n,n+=i)),qn(t.slice(n,n+=i)),qn(t.slice(n,n+i)||"ff")]}if(t.startsWith("rgb")){let i=t.match(/^rgba?\\(\\s*([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(i){let[n,a,s,o,l,u,h,c,p,f,d,y]=i,m=[o||" ",h||" ",f].join("");if(m===" "||m===" /"||m===",,"||m===",,,"){let g=[s,u,p].join(""),x=g==="%%%"?100:g===""?255:0;if(x){let v=[Rr(+a/x,0,1),Rr(+l/x,0,1),Rr(+c/x,0,1),d?yh(+d,y):1];if(mh(v))return v}}return}}let r=t.match(/^hsla?\\(\\s*([\\de.+-]+)(?:deg)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(r){let[i,n,a,s,o,l,u,h,c]=r,p=[a||" ",o||" ",u].join("");if(p===" "||p===" /"||p===",,"||p===",,,"){let f=[+n,Rr(+s,0,100),Rr(+l,0,100),h?yh(+h,c):1];if(mh(f))return G1(f)}}}function qn(t){return parseInt(t.padEnd(2,t),16)/255}function yh(t,e){return Rr(e?t/100:t,0,1)}function Rr(t,e,r){return Math.min(Math.max(e,t),r)}function mh(t){return!t.some(Number.isNaN)}var W1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function Je(t,e,r){return t+r*(e-t)}function ti(t,e,r){return t.map((i,n)=>Je(i,e[n],r))}function Z1(t){return t==="rgb"||t==="hcl"||t==="lab"}var Pt,gt=(Pt=class{constructor(e,r,i,n=1,a=!0){this.r=e,this.g=r,this.b=i,this.a=n,a||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,r,i,n]))}static parse(e){if(e instanceof Pt)return e;if(typeof e!="string")return;let r=Y1(e);if(r)return new Pt(...r,!1)}get rgb(){let{r:e,g:r,b:i,a:n}=this,a=n||1/0;return this.overwriteGetter("rgb",[e/a,r/a,i/a,n])}get hcl(){return this.overwriteGetter("hcl",q1(this.rgb))}get lab(){return this.overwriteGetter("lab",vp(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){let[e,r,i,n]=this.rgb;return`rgba(${[e,r,i].map(a=>Math.round(a*255)).join(",")},${n})`}static interpolate(e,r,i,n="rgb"){switch(n){case"rgb":{let[a,s,o,l]=ti(e.rgb,r.rgb,i);return new Pt(a,s,o,l,!1)}case"hcl":{let[a,s,o,l]=e.hcl,[u,h,c,p]=r.hcl,f,d;if(!isNaN(a)&&!isNaN(u)){let v=u-a;u>a&&v>180?v-=360:u180&&(v+=360),f=a+i*v}else isNaN(a)?isNaN(u)?f=NaN:(f=u,(o===1||o===0)&&(d=h)):(f=a,(c===1||c===0)&&(d=s));let[y,m,g,x]=j1([f,d!=null?d:Je(s,h,i),Je(o,c,i),Je(l,p,i)]);return new Pt(y,m,g,x,!1)}case"lab":{let[a,s,o,l]=bp(ti(e.lab,r.lab,i));return new Pt(a,s,o,l,!1)}}}},Pt.black=new Pt(0,0,0,1),Pt.white=new Pt(1,1,1,1),Pt.transparent=new Pt(0,0,0,0),Pt.red=new Pt(1,0,0,1),Pt),H1=["bottom","center","top"],Js=class{constructor(t,e,r,i,n,a){this.text=t,this.image=e,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=a}},ze=class la{constructor(e){this.sections=e}static fromString(e){return new la([new Js(e,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof la?e:la.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}},Ae=class Li{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Li)return e;if(typeof e=="number")return new Li([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Li(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i){return new Li(ti(e.values,r.values,i))}},Se=class Vi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Vi)return e;if(typeof e=="number")return new Vi([e]);if(Array.isArray(e)){for(let r of e)if(typeof r!="number")return;return new Vi(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i){return new Vi(ti(e.values,r.values,i))}},oe=class Oi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Oi)return e;if(typeof e=="string"){let i=gt.parse(e);return i?new Oi([i]):void 0}if(!Array.isArray(e))return;let r=[];for(let i of e){if(typeof i!="string")return;let n=gt.parse(i);if(!n)return;r.push(n)}return new Oi(r)}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i,n="rgb"){let a=[];if(e.values.length!=r.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let s=0;s=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?i===void 0||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[t,e,r,i].join(", ")}]: \'a\' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[t,e,r,i]:[t,e,r]).join(", ")}]: \'r\', \'g\', and \'b\' must be between 0 and 255.`}function ei(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof Dr||t instanceof gt||t instanceof xl||t instanceof ze||t instanceof Ae||t instanceof Se||t instanceof oe||t instanceof De||t instanceof _e)return!0;if(Array.isArray(t)){for(let e of t)if(!ei(e))return!1;return!0}if(typeof t=="object"){for(let e in t)if(!ei(t[e]))return!1;return!0}return!1}function _t(t){if(t===null)return dn;if(typeof t=="string")return Y;if(typeof t=="boolean")return tt;if(typeof t=="number")return I;if(t instanceof gt)return ce;if(t instanceof Dr)return Ba;if(t instanceof xl)return Pa;if(t instanceof ze)return yn;if(t instanceof Ae)return za;if(t instanceof Se)return La;if(t instanceof oe)return Qi;if(t instanceof De)return Va;if(t instanceof _e)return mn;if(Array.isArray(t)){let e=t.length,r;for(let i of t){let n=_t(i);if(!r)r=n;else{if(r===n)continue;r=Z;break}}return Ut(r||Z,e)}return fr}function Gi(t){let e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof gt||t instanceof Dr||t instanceof ze||t instanceof Ae||t instanceof Se||t instanceof oe||t instanceof De||t instanceof _e?t.toString():JSON.stringify(t)}var ri=class _p{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`\'literal\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ei(e[1]))return r.error(`invalid value of type "${typeof e[1]}"`);let i=e[1],n=_t(i),a=r.expectedType;return n.kind==="array"&&n.N===0&&a&&a.kind==="array"&&(typeof a.N!="number"||a.N===0)&&(n=a),new _p(n,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}},J1=["Unknown","Point","LineString","Polygon"],Ap=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?J1[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let e=this._parseColorCache.get(t);return e||(e=gt.parse(t),this._parseColorCache.set(t,e)),e}};function Oa(t,e,r){let i=t.length-1,n=0,a=i,s=0,o,l;for(;n<=a;)if(s=Math.floor((n+a)/2),o=t[s],l=t[s+1],o<=e){if(s===i||ee)a=s-1;else throw new ft("Input is not a number.",r);return 0}var vl=class Sp{constructor(e,r,i,n){this.type=e,this.input=r,this.key=n,this.labels=[],this.outputs=[];for(let[a,s]of i)this.labels.push(a),this.outputs.push(s)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");let i=r.parse(e[1],1,I);if(!i)return null;let n=[],a=null;r.expectedType&&r.expectedType.kind!=="value"&&(a=r.expectedType);for(let s=1;s=o)return r.error(\'Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.\',u);let c=r.parse(l,h,a);if(!c)return null;a||(a=c.type),n.push([o,c])}return new Sp(a,i,n,r.key)}evaluate(e){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(e);let n=this.input.evaluate(e);if(n<=r[0])return i[0].evaluate(e);let a=r.length;return n>=r[a-1]?i[a-1].evaluate(e):i[Oa(r,n,this.key)].evaluate(e)}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function Q1(t,e,r,i){let n=3*t,a=3*(r-t)-n,s=1-n-a,o=3*e,l=3*(i-e)-o,u=1-o-l;return function(h,c=1e-6){if(h<=0)return 0;if(h>=1)return 1;let p=h;for(let y=0;y<8;y++){let m=((s*p+a)*p+n)*p-h;if(Math.abs(m)m?f=p:d=p,p=(f+d)*.5}return((u*p+l)*p+o)*p}}var be=class Qs{constructor(e,r,i,n,a,s){this.type=e,this.operator=r,this.interpolation=i,this.input=n,this.key=s,this.labels=[],this.outputs=[];for(let[o,l]of a)this.labels.push(o),this.outputs.push(l)}static interpolationFactor(e,r,i,n){let a=0;if(e.name==="exponential")a=zs(r,e.base,i,n);else if(e.name==="linear")a=zs(r,1,i,n);else if(e.name==="cubic-bezier"){let s=e.controlPoints;a=Q1(s[0],s[1],s[2],s[3])(zs(r,1,i,n))}return a}static parse(e,r){let[i,n,a,...s]=e;if(!Array.isArray(n)||n.length===0)return r.error("Expected an interpolation type expression.",1);if(n[0]==="linear")n={name:"linear"};else if(n[0]==="exponential"){let u=n[1];if(typeof u!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:u}}else if(n[0]==="cubic-bezier"){let u=n.slice(1);if(u.length!==4||u.some(h=>typeof h!="number"||h<0||h>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:u}}else return r.error(`Unknown interpolation type ${String(n[0])}`,1,0);if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(a=r.parse(a,2,I),!a)return null;let o=[],l=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&r.expectedType!=Qi?l=ce:r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(let u=0;u=h)return r.error(\'Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.\',p);let d=r.parse(c,f,l);if(!d)return null;l||(l=d.type),o.push([h,d])}return!Ge(l,I)&&!Ge(l,Ba)&&!Ge(l,ce)&&!Ge(l,za)&&!Ge(l,La)&&!Ge(l,Qi)&&!Ge(l,Va)&&!Ge(l,Ut(I))?r.error(`Type ${yt(l)} is not interpolatable.`):new Qs(l,i,n,a,o,r.key)}evaluate(e){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(e);let n=this.input.evaluate(e);if(n<=r[0])return i[0].evaluate(e);let a=r.length;if(n>=r[a-1])return i[a-1].evaluate(e);let s=Oa(r,n,this.key),o=r[s],l=r[s+1],u=Qs.interpolationFactor(this.interpolation,n,o,l),h=i[s].evaluate(e),c=i[s+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Je(h,c,u);case"color":return gt.interpolate(h,c,u);case"padding":return Ae.interpolate(h,c,u);case"colorArray":return oe.interpolate(h,c,u);case"numberArray":return Se.interpolate(h,c,u);case"variableAnchorOffsetCollection":return De.interpolate(h,c,u,this.key);case"array":return ti(h,c,u);case"projectionDefinition":return Dr.interpolate(h,c,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return gt.interpolate(h,c,u,"hcl");case"colorArray":return oe.interpolate(h,c,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return gt.interpolate(h,c,u,"lab");case"colorArray":return oe.interpolate(h,c,u,"lab")}}}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function zs(t,e,r,i){let n=i-r,a=t-r;return n===0?0:e===1?a/n:(e**+a-1)/(e**+n-1)}var gr={color:gt.interpolate,number:Je,padding:Ae.interpolate,numberArray:Se.interpolate,colorArray:oe.interpolate,variableAnchorOffsetCollection:De.interpolate,array:ti},Ep=class Fp{constructor(e){this.type=yn,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=e[1];if(!Array.isArray(i)&&typeof i=="object")return r.error("First argument must be an image or text section.");let n=[],a=!1;for(let s=1;s<=e.length-1;++s){let o=e[s];if(a&&typeof o=="object"&&!Array.isArray(o)){a=!1;let l=null;if(o["font-scale"]&&(l=r.parse(o["font-scale"],1,I),!l))return null;let u=null;if(o["text-font"]&&(u=r.parse(o["text-font"],1,Ut(Y)),!u))return null;let h=null;if(o["text-color"]&&(h=r.parse(o["text-color"],1,ce),!h))return null;let c=null;if(o["vertical-align"]){if(typeof o["vertical-align"]=="string"&&!H1.includes(o["vertical-align"]))return r.error(`\'vertical-align\' must be one of: \'bottom\', \'center\', \'top\' but found \'${o["vertical-align"]}\' instead.`);if(c=r.parse(o["vertical-align"],1,Y),!c)return null}let p=n[n.length-1];p.scale=l,p.font=u,p.textColor=h,p.verticalAlign=c}else{let l=r.parse(e[s],1,Z);if(!l)return null;let u=l.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return r.error("Formatted text type must be \'string\', \'value\', \'image\' or \'null\'.");a=!0,n.push({content:l,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Fp(n)}evaluate(e){return new ze(this.sections.map(r=>{let i=r.content.evaluate(e);return _t(i)===mn?new Js("",i,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(e):null):new Js(Gi(i),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null,r.verticalAlign?r.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor),r.verticalAlign&&e(r.verticalAlign)}outputDefined(){return!1}};function kp(t,e,r=0,i=t.length-1,n=t0){for(;i>r;){if(i-r>600){let l=i-r+1,u=e-r+1,h=Math.log(l),c=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*c*(l-c)/l)*(u-l/2<0?-1:1);kp(t,e,Math.max(r,Math.floor(e-u*c/l+p)),Math.min(i,Math.floor(e+(l-u)*c/l+p)),n)}let a=t[e],s=r,o=i;for(ki(t,r,e),n(t[i],a)>0&&ki(t,r,i);s0;)o--}n(t[r],a)===0?ki(t,r,o):(o++,ki(t,o,i)),o<=e&&(r=o+1),e<=o&&(i=o-1)}}function ki(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function t0(t,e){return te)}function Ra(t,e){if(t.length<=1)return[t];let r=[],i,n;for(let a of t){let s=r0(a);s!==0&&(a.area=Math.abs(s),n===void 0&&(n=s<0),n===s<0?(i&&r.push(i),i=[a]):i.push(a))}if(i&&r.push(i),e>1)for(let a=0;a2){let u=e[1];if(typeof u!="string"||!(u in jn)||u==="object")return r.error(\'The item type argument of "array" must be one of string, number, boolean\',1);o=jn[u],i++}else o=Z;let l;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error(\'The length argument to "array" must be a positive integer literal\',2);l=e[2],i++}n=Ut(o,l)}else{if(!jn[a])throw Error(`Types doesn\'t contain name = ${a}`);n=jn[a]}let s=[];for(;ie.outputDefined())}},gh={"to-boolean":tt,"to-color":ce,"to-number":I,"to-string":Y},jr=class Ip{constructor(e,r,i){this.type=e,this.args=r,this.key=i}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=e[0];if(!gh[i])throw Error(`Can\'t parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&e.length!==2)return r.error("Expected one argument.");let n=gh[i],a=[];for(let s=1;s4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:Dp(r[0],r[1],r[2],r[3]),!i))return new gt(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new ft(i||`Could not parse color from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"padding":{let r;for(let i of this.args){r=i.evaluate(e);let n=Ae.parse(r);if(n)return n}throw new ft(`Could not parse padding from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"numberArray":{let r;for(let i of this.args){r=i.evaluate(e);let n=Se.parse(r);if(n)return n}throw new ft(`Could not parse numberArray from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"colorArray":{let r;for(let i of this.args){r=i.evaluate(e);let n=oe.parse(r);if(n)return n}throw new ft(`Could not parse colorArray from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"variableAnchorOffsetCollection":{let r;for(let i of this.args){r=i.evaluate(e);let n=De.parse(r);if(n)return n}throw new ft(`Could not parse variableAnchorOffsetCollection from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"number":{let r=null;for(let i of this.args){if(r=i.evaluate(e),r===null)return 0;let n=Number(r);if(!isNaN(n))return n}throw new ft(`Could not convert ${JSON.stringify(r)} to number.`,this.key)}case"formatted":return ze.fromString(Gi(this.args[0].evaluate(e)));case"resolvedImage":return _e.fromString(Gi(this.args[0].evaluate(e)));case"projectionDefinition":{let r=this.args[0].evaluate(e);if(Dr.parse(r))return r;throw new ft(`Could not parse projectionDefinition from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}default:return Gi(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}},Cp=class Mp{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let i=[];for(let a=1;a=i.length)throw new ft(`Array index out of bounds: ${r} > ${i.length-1}.`,this.key);if(r!==Math.floor(r))throw new ft(`Array index must be an integer, but found ${r} instead.`,this.key);return i[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},n0=class Lp{constructor(e,r,i){this.needle=e,this.haystack=r,this.key=i,this.type=tt}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,Z);return!i||!n?null:gl(i.type,[tt,Y,I,dn,Z])?new Lp(i,n,r.key):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${yt(i.type)} instead`)}evaluate(e){let r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!i)return!1;if(!dr(r,["boolean","string","number","null"]))throw new ft(`Expected first argument to be of type boolean, string, number or null, but found ${yt(_t(r))} instead.`,this.key);if(!dr(i,["string","array"]))throw new ft(`Expected second argument to be of type array or string, but found ${yt(_t(i))} instead.`,this.key);return i.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},a0=class to{constructor(e,r,i,n){this.needle=e,this.haystack=r,this.key=i,this.fromIndex=n,this.type=I}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,Z);if(!i||!n)return null;if(!gl(i.type,[tt,Y,I,dn,Z]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${yt(i.type)} instead`);if(e.length===4){let a=r.parse(e[3],3,I);return a?new to(i,n,r.key,a):null}return new to(i,n,r.key)}evaluate(e){let r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!dr(r,["boolean","string","number","null"]))throw new ft(`Expected first argument to be of type boolean, string, number or null, but found ${yt(_t(r))} instead.`,this.key);let n;if(this.fromIndex&&(n=this.fromIndex.evaluate(e)),dr(i,["string"])){let a=i.indexOf(r,n);return a===-1?-1:[...i.slice(0,a)].length}if(dr(i,["array"]))return i.indexOf(r,n);throw new ft(`Expected second argument to be of type array or string, but found ${yt(_t(i))} instead.`,this.key)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},s0=class Vp{constructor(e,r,i,n,a,s){this.inputType=e,this.type=r,this.input=i,this.cases=n,this.outputs=a,this.otherwise=s}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let i,n;r.expectedType&&r.expectedType.kind!=="value"&&(n=r.expectedType);let a={},s=[];for(let u=2;u2**53-1)return p.error(`Branch labels must be integers no larger than ${2**53-1}.`);if(typeof d=="number"&&Math.floor(d)!==d)return p.error("Numeric branch labels must be integer values.");if(!i)i=_t(d);else if(p.checkSubtype(i,_t(d)))return null;if(a[String(d)]!==void 0)return p.error("Branch labels must be unique.");a[String(d)]=s.length}let f=r.parse(c,u,n);if(!f)return null;n||(n=f.type),s.push(f)}let o=r.parse(e[1],1,Z);if(!o)return null;let l=r.parse(e[e.length-1],e.length-1,n);return!l||o.type.kind!=="value"&&r.concat(1).checkSubtype(i,o.type)?null:new Vp(i,n,o,a,s,l)}evaluate(e){let r=this.input.evaluate(e);return(_t(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},o0=class Op{constructor(e,r,i){this.type=e,this.branches=r,this.otherwise=i}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);let n=[];for(let s=1;sr.outputDefined())&&this.otherwise.outputDefined()}},l0=class eo{constructor(e,r,i,n,a){this.type=e,this.input=r,this.beginIndex=i,this.key=n,this.endIndex=a}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,I);if(!i||!n)return null;if(!gl(i.type,[Ut(Z),Y,Z]))return r.error(`Expected first argument to be of type array or string, but found ${yt(i.type)} instead`);if(e.length===4){let a=r.parse(e[3],3,I);return a?new eo(i.type,i,n,r.key,a):null}return new eo(i.type,i,n,r.key)}evaluate(e){let r=this.input.evaluate(e),i=this.beginIndex.evaluate(e),n;if(this.endIndex&&(n=this.endIndex.evaluate(e)),dr(r,["string"]))return[...r].slice(i,n).join("");if(dr(r,["array"]))return r.slice(i,n);throw new ft(`Expected first argument to be of type array or string, but found ${yt(_t(r))} instead.`,this.key)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},Rp=class ro{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=null,n=r.expectedType;n&&n.kind!=="value"&&(i=n);let a=[];for(let s of e.slice(1)){let o=r.parse(s,1+a.length,i,void 0,{typeAnnotation:"omit"});if(!o)return null;i||(i=o.type),a.push(o)}if(!i)throw Error("No output type");return n&&a.some(s=>tn(n,s.type))?new ro(Z,a):new ro(i,a)}evaluate(e){let r=null,i=0,n;for(let a of this.args)if(i++,r=a.evaluate(e),r&&r instanceof _e&&!r.available&&(n||(n=r.name),r=null,i===this.args.length&&(r=n)),r!==null)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};function xh(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function u0(t,e,r){return e===r}function h0(t,e,r){return e!==r}function c0(t,e,r){return er}function f0(t,e,r){return e<=r}function d0(t,e,r){return e>=r}function $p(t,e,r,i){return i.compare(e,r)===0}function y0(t,e,r,i){return!$p(t,e,r,i)}function m0(t,e,r,i){return i.compare(e,r)<0}function g0(t,e,r,i){return i.compare(e,r)>0}function x0(t,e,r,i){return i.compare(e,r)<=0}function v0(t,e,r,i){return i.compare(e,r)>=0}function li(t,e,r){let i=t!=="=="&&t!=="!=";return class Np{constructor(a,s,o,l){this.lhs=a,this.rhs=s,this.key=o,this.collator=l,this.type=tt,this.hasUntypedArgument=a.type.kind==="value"||s.type.kind==="value"}static parse(a,s){if(a.length!==3&&a.length!==4)return s.error("Expected two or three arguments.");let o=a[0],l=s.parse(a[1],1,Z);if(!l)return null;if(!xh(o,l.type))return s.concat(1).error(`"${o}" comparisons are not supported for type \'${yt(l.type)}\'.`);let u=s.parse(a[2],2,Z);if(!u)return null;if(!xh(o,u.type))return s.concat(2).error(`"${o}" comparisons are not supported for type \'${yt(u.type)}\'.`);if(l.type.kind!==u.type.kind&&l.type.kind!=="value"&&u.type.kind!=="value")return s.error(`Cannot compare types \'${yt(l.type)}\' and \'${yt(u.type)}\'.`);i&&(l.type.kind==="value"&&u.type.kind!=="value"?l=new Ie(u.type,[l],s.key):l.type.kind!=="value"&&u.type.kind==="value"&&(u=new Ie(l.type,[u],s.key)));let h=null;if(a.length===4){if(l.type.kind!=="string"&&u.type.kind!=="string"&&l.type.kind!=="value"&&u.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(h=s.parse(a[3],3,Pa),!h)return null}return new Np(l,u,s.key,h)}evaluate(a){let s=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){let l=_t(s),u=_t(o);if(l.kind!==u.kind||l.kind!=="string"&&l.kind!=="number")throw new ft(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`,this.key)}if(this.collator&&!i&&this.hasUntypedArgument){let l=_t(s),u=_t(o);if(l.kind!=="string"||u.kind!=="string")return e(a,s,o)}return this.collator?r(a,s,o,this.collator.evaluate(a)):e(a,s,o)}eachChild(a){a(this.lhs),a(this.rhs),this.collator&&a(this.collator)}outputDefined(){return!0}}}var b0=li("==",u0,$p),w0=li("!=",h0,y0),D0=li("<",c0,m0),_0=li(">",p0,g0),A0=li("<=",f0,x0),S0=li(">=",d0,v0),Up=class qp{constructor(e,r,i){this.type=Pa,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");let i=e[1];if(typeof i!="object"||Array.isArray(i))return r.error("Collator options argument must be an object.");let n=r.parse(i["case-sensitive"]!==void 0&&i["case-sensitive"],1,tt);if(!n)return null;let a=r.parse(i["diacritic-sensitive"]!==void 0&&i["diacritic-sensitive"],1,tt);if(!a)return null;let s=null;return i.locale&&(s=r.parse(i.locale,1,Y),!s)?null:new qp(n,a,s)}evaluate(e){return new xl(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}},E0=class jp{constructor(e,r,i,n,a,s){this.type=Y,this.number=e,this.locale=r,this.currency=i,this.unit=n,this.minFractionDigits=a,this.maxFractionDigits=s}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");let i=r.parse(e[1],1,I);if(!i)return null;let n=e[2];if(typeof n!="object"||Array.isArray(n))return r.error("NumberFormat options argument must be an object.");let a=null;if(n.locale&&(a=r.parse(n.locale,1,Y),!a))return null;let s=null;if(n.currency&&(s=r.parse(n.currency,1,Y),!s))return null;let o=null;if(n.unit&&(o=r.parse(n.unit,1,Y),!o))return null;if(s&&o)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(n["min-fraction-digits"]&&(l=r.parse(n["min-fraction-digits"],1,I),!l))return null;let u=null;return n["max-fraction-digits"]&&(u=r.parse(n["max-fraction-digits"],1,I),!u)?null:new jp(i,a,s,o,l,u)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},F0=class Gp{constructor(e){this.type=mn,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");let i=r.parse(e[1],1,Y);return i?new Gp(i):r.error("No image name provided.")}evaluate(e){let r=this.input.evaluate(e),i=_e.fromString(r);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(r)>-1),i}eachChild(e){e(this.input)}outputDefined(){return!1}},k0=class Xp{constructor(e,r){this.input=e,this.key=r,this.type=I}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=r.parse(e[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${yt(i.type)} instead.`):new Xp(i,r.key):null}evaluate(e){let r=this.input.evaluate(e);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new ft(`Expected value to be of type string or array, but found ${yt(_t(r))} instead.`,this.key)}eachChild(e){e(this.input)}outputDefined(){return!1}},we=8192;function T0(t,e){let r=I0(t[0]),i=M0(t[1]),n=2**e.z;return[Math.round(r*n*we),Math.round(i*n*we)]}function bl(t,e){let r=2**e.z,i=(t[0]/we+e.x)/r,n=(t[1]/we+e.y)/r;return[C0(i),B0(n)]}function I0(t){return(180+t)/360}function C0(t){return t*360-180}function M0(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function B0(t){return 360/Math.PI*Math.atan(Math.exp((180-t*360)*Math.PI/180))-90}function gn(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function en(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function P0(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function z0(t,e,r){let i=t[0]-e[0],n=t[1]-e[1],a=t[0]-r[0],s=t[1]-r[1];return i*s-a*n===0&&i*a<=0&&n*s<=0}function $a(t,e,r,i){let n=[e[0]-t[0],e[1]-t[1]];return R0([i[0]-r[0],i[1]-r[1]],n)!==0&&!!(vh(t,e,r,i)&&vh(r,i,t,e))}function L0(t,e,r){for(let i of r)for(let n=0;n0&&c<0||h<0&&c>0}function wl(t,e,r){let i=[];for(let n=0;nr[2]){let n=i*.5,a=t[0]-r[0]>n?-i:r[0]-t[0]>n?i:0;a===0&&(a=t[0]-r[2]>n?-i:r[2]-t[0]>n?i:0),t[0]+=a}gn(e,t)}function $0(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}function bh(t,e,r,i){let n=2**i.z*we,a=[i.x*we,i.y*we],s=[];for(let o of t)for(let l of o){let u=[l.x+a[0],l.y+a[1]];Zp(u,e,r,n),s.push(u)}return s}function wh(t,e,r,i){let n=2**i.z*we,a=[i.x*we,i.y*we],s=[];for(let o of t){let l=[];for(let u of o){let h=[u.x+a[0],u.y+a[1]];gn(e,h),l.push(h)}s.push(l)}if(e[2]-e[0]<=n/2){$0(e);for(let o of s)for(let l of o)Zp(l,e,r,n)}return s}function N0(t,e){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(e.type==="Polygon"){let a=wl(e.coordinates,i,n),s=bh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!ui(o,a))return!1}if(e.type==="MultiPolygon"){let a=Wp(e.coordinates,i,n),s=bh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!V0(o,a))return!1}return!0}function U0(t,e){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(e.type==="Polygon"){let a=wl(e.coordinates,i,n),s=wh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!Yp(o,a))return!1}if(e.type==="MultiPolygon"){let a=Wp(e.coordinates,i,n),s=wh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!O0(o,a))return!1}return!0}var Dl=class ha{constructor(e,r){this.type=tt,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`\'within\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ei(e[1])){let i=e[1];if(i.type==="FeatureCollection"){let n=[];for(let a of i.features){let{type:s,coordinates:o}=a.geometry;s==="Polygon"&&n.push(o),s==="MultiPolygon"&&n.push(...o)}if(n.length)return new ha(i,{type:"MultiPolygon",coordinates:n})}else if(i.type==="Feature"){let n=i.geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new ha(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new ha(i,i)}return r.error("\'within\' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return N0(e,this.geometries);if(e.geometryType()==="LineString")return U0(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},Hp=class{constructor(t=[],e=(r,i)=>ri)){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:r}=this,i=e[t];for(;t>0;){let n=t-1>>1,a=e[n];if(r(i,a)>=0)break;e[t]=a,t=n}e[t]=i}_down(t){let{data:e,compare:r}=this,i=this.length>>1,n=e[t];for(;t=0)break;e[t]=e[a],t=a}e[t]=n}},Dh=Math.PI/180,_l=class{constructor(t){let e=Dh*6378.137*1e3,r=Math.cos(t*Dh),i=1/(1-.0066943799901413165*(1-r*r)),n=Math.sqrt(i);this.kx=e*n*r,this.ky=e*n*i*.9933056200098587}distance(t,e){let r=this.wrap(t[0]-e[0])*this.kx,i=(t[1]-e[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(t,e){let r=1/0,i,n,a,s;for(let o=0;o1?(l=t[o+1][0],u=t[o+1][1]):p>0&&(l+=h/this.kx*p,u+=c/this.ky*p)),h=this.wrap(e[0]-l)*this.kx,c=(e[1]-u)*this.ky;let f=h*h+c*c;f180;)t-=360;return t}};function Kp(t,e){return e[0]-t[0]}function ga(t){return t[1]-t[0]+1}function Le(t,e){return t[1]>=t[0]&&t[1]t[1])return[null,null];let r=ga(t);if(e){if(r===2)return[t,null];let n=Math.floor(r/2);return[[t[0],t[0]+n],[t[0]+n,t[1]]]}if(r===1)return[t,null];let i=Math.floor(r/2)-1;return[[t[0],t[0]+i],[t[0]+i+1,t[1]]]}function no(t,e){if(!Le(e,t.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=e[0];i<=e[1];++i)gn(r,t[i]);return r}function ao(t){let e=[1/0,1/0,-1/0,-1/0];for(let r of t)for(let i of r)gn(e,i);return e}function _h(t){return t[0]!==-1/0&&t[1]!==-1/0&&t[2]!==1/0&&t[3]!==1/0}function Al(t,e,r){if(!_h(t)||!_h(e))return NaN;let i=0,n=0;return t[2]e[2]&&(i=t[0]-e[2]),t[1]>e[3]&&(n=t[1]-e[3]),t[3]=i)return i;if(en(n,a)){if(Ah(t,e))return 0}else if(Ah(e,t))return 0;let s=1/0;for(let o of t)for(let l=0,u=o.length,h=u-1;l0;){let l=s.pop();if(l[0]>=a)continue;let u=l[1],h=e?50:100;if(ga(u)<=h){if(!Le(u,t.length))return NaN;if(e){let c=X0(t,u,r,i);if(isNaN(c)||c===0)return c;a=Math.min(a,c)}else for(let c=u[0];c<=u[1];++c){let p=G0(t[c],r,i);if(a=Math.min(a,p),a===0)return 0}}else{let c=io(u,e);Sh(s,a,i,t,o,c[0]),Sh(s,a,i,t,o,c[1])}}return a}function va(t,e,r,i,n,a=1/0){let s=Math.min(a,n.distance(t[0],r[0]));if(s===0)return s;let o=new Hp([[0,[0,t.length-1],[0,r.length-1]]],Kp);for(;o.length>0;){let l=o.pop();if(l[0]>=s)continue;let u=l[1],h=l[2],c=e?50:100,p=i?50:100;if(ga(u)<=c&&ga(h)<=p){if(!Le(u,t.length)&&Le(h,r.length))return NaN;let f;if(e&&i)f=q0(t,u,r,h,n),s=Math.min(s,f);else if(e&&!i){let d=t.slice(u[0],u[1]+1);for(let y=h[0];y<=h[1];++y)if(f=hr(r[y],d,n),s=Math.min(s,f),s===0)return s}else if(!e&&i){let d=r.slice(h[0],h[1]+1);for(let y=u[0];y<=u[1];++y)if(f=hr(t[y],d,n),s=Math.min(s,f),s===0)return s}else f=j0(t,u,r,h,n),s=Math.min(s,f)}else{let f=io(u,e),d=io(h,i);Gn(o,s,n,t,r,f[0],d[0]),Gn(o,s,n,t,r,f[0],d[1]),Gn(o,s,n,t,r,f[1],d[0]),Gn(o,s,n,t,r,f[1],d[1])}}return s}function W0(t,e){let r=t.geometry(),i=r.flat().map(s=>bl([s.x,s.y],t.canonical));if(r.length===0)return NaN;let n=new _l(i[0][1]),a=1/0;for(let s of e){switch(s.type){case"Point":a=Math.min(a,va(i,!1,[s.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,va(i,!1,s.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,xa(i,!1,s.coordinates,n,a))}if(a===0)return a}return a}function Z0(t,e){let r=t.geometry(),i=r.flat().map(s=>bl([s.x,s.y],t.canonical));if(r.length===0)return NaN;let n=new _l(i[0][1]),a=1/0;for(let s of e){switch(s.type){case"Point":a=Math.min(a,va(i,!0,[s.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,va(i,!0,s.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,xa(i,!0,s.coordinates,n,a))}if(a===0)return a}return a}function H0(t,e){let r=t.geometry();if(r.length===0||r[0].length===0)return NaN;let i=Ra(r,0).map(s=>s.map(o=>o.map(l=>bl([l.x,l.y],t.canonical)))),n=new _l(i[0][0][0][1]),a=1/0;for(let s of e)for(let o of i){switch(s.type){case"Point":a=Math.min(a,xa([s.coordinates],!1,o,n,a));break;case"LineString":a=Math.min(a,xa(s.coordinates,!0,o,n,a));break;case"Polygon":a=Math.min(a,Y0(o,s.coordinates,n,a))}if(a===0)return a}return a}function Ls(t){return t.type==="MultiPolygon"?t.coordinates.map(e=>({type:"Polygon",coordinates:e})):t.type==="MultiLineString"?t.coordinates.map(e=>({type:"LineString",coordinates:e})):t.type==="MultiPoint"?t.coordinates.map(e=>({type:"Point",coordinates:e})):[t]}var El=class ca{constructor(e,r){this.type=I,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`\'distance\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ei(e[1])){let i=e[1];if(i.type==="FeatureCollection")return new ca(i,i.features.map(n=>Ls(n.geometry)).flat());if(i.type==="Feature")return new ca(i,Ls(i.geometry));if("type"in i&&"coordinates"in i)return new ca(i,Ls(i))}return r.error("\'distance\' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return W0(e,this.geometries);if(e.geometryType()==="LineString")return Z0(e,this.geometries);if(e.geometryType()==="Polygon")return H0(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},K0=class Jp{constructor(e){let r=null;for(let i of e)if(!r)r=i.type;else{if(r===i.type)continue;r=Z;break}this.type=Ut(r!=null?r:Z,e.length),this.arr=e}static parse(e,r){if(e.length!==2)return r.error(`\'semiliteral\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ei(e[1]))return r.error(`invalid value of type "${typeof e[1]}"`);let i=e[1],n=_t(i);if(n.kind==="array"){let a=i.map(s=>r.parse(s,null,Z));return new Jp(a)}return new ri(n,i)}evaluate(e){return this.arr.map(r=>r.evaluate(e))}eachChild(e){this.arr.forEach(e)}outputDefined(){return this.arr.every(e=>e.outputDefined())}},Fl=class Qp{constructor(e){this.key=e,this.type=Z}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=e[1];return i==null?r.error("Global state property must be defined."):typeof i=="string"?new Qp(i):r.error(`Global state property must be string, but found ${typeof e[1]} instead.`)}evaluate(e){var i,n;let r=(i=e.globals)==null?void 0:i.globalState;return!r||Object.keys(r).length===0?null:(n=ji(r,this.key))!=null?n:null}eachChild(){}outputDefined(){return!1}},Yr={"==":b0,"!=":w0,">":_0,"<":D0,">=":S0,"<=":A0,array:Ie,at:i0,boolean:Ie,case:o0,coalesce:Rp,collator:Up,format:Ep,image:F0,in:n0,"index-of":a0,interpolate:be,"interpolate-hcl":be,"interpolate-lab":be,length:k0,let:Cp,literal:ri,match:s0,number:Ie,"number-format":E0,object:Ie,semiliteral:K0,slice:l0,step:vl,string:Ie,"to-boolean":jr,"to-color":jr,"to-number":jr,"to-string":jr,var:Bp,within:Dl,distance:El,"global-state":Fl},ve=class extends Error{constructor(t,e){super(e),this.message=e,this.key=t}},J0=class tf{constructor(e,r=[]){this.parent=e,this.bindings={};for(let[i,n]of r)this.bindings[i]=n}concat(e){return new tf(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}},ef=class rf{constructor(e,r,i=[],n,a=new J0,s=[]){this.registry=e,this.path=i,this.key=i.map(o=>`[${o}]`).join(""),this.scope=a,this.errors=s,this.expectedType=n,this._isConstant=r}parse(e,r,i,n,a={}){return r?this.concat(r,i,n)._parse(e,a):this._parse(e,a)}_parse(e,r){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);let i=this.key;function n(a,s,o){return o==="assert"?new Ie(s,[a],i):o==="coerce"?new jr(s,[a],i):a}if(Array.isArray(e)){if(e.length===0)return this.error(\'Expected an array with at least one element. If you wanted a literal array, use ["literal", []].\');let a=e[0];if(typeof a!="string")return this.error(`Expression name must be a string, but found ${typeof a} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let s=this.registry[a];if(s){let o=s.parse(e,this);if(!o)return null;if(this.expectedType){let l=this.expectedType,u=o.type;if((l.kind==="string"||l.kind==="number"||l.kind==="boolean"||l.kind==="object"||l.kind==="array")&&u.kind==="value")o=n(o,l,r.typeAnnotation||"assert");else if(l.kind==="projectionDefinition"&&["string","array","value"].includes(u.kind)||["color","formatted","resolvedImage"].includes(l.kind)&&["value","string"].includes(u.kind)||["padding","numberArray"].includes(l.kind)&&["value","number","array"].includes(u.kind)||l.kind==="colorArray"&&["value","string","array"].includes(u.kind)||l.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(u.kind))o=n(o,l,r.typeAnnotation||"coerce");else if(this.checkSubtype(l,u))return null}if(!(o instanceof ri)&&o.type.kind!=="resolvedImage"&&this._isConstant(o)){let l=new Ap;try{o=new ri(o.type,o.evaluate(l))}catch(u){return this.error(u.message),null}}return o}return this.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0)}return e===void 0?this.error("\'undefined\' value invalid. Use null instead."):typeof e=="object"?this.error(\'Bare objects invalid. Use ["literal", {...}] instead.\'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,r,i){let n=typeof e=="number"?this.path.concat(e):this.path,a=i?this.scope.concat(i):this.scope;return new rf(this.registry,this._isConstant,n,r||null,a,this.errors)}error(e,...r){let i=`${this.key}${r.map(n=>`[${n}]`).join("")}`;this.errors.push(new ve(i,e))}checkSubtype(e,r){let i=tn(e,r);return i&&this.error(i),i}},_r=class Ri{constructor(e,r,i,n,a){this.name=e,this.type=r,this._evaluate=i,this.args=n,this.key=a}evaluate(e){return this._evaluate(e,this.args,this.key)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,r){let i=e[0],n=Ri.definitions[i];if(!n)return r.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(n)?n[0]:n.type,s=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=s.filter(([u])=>!Array.isArray(u)||u.length===e.length-1),l=null;for(let[u,h]of o){l=new ef(r.registry,ba,r.path,null,r.scope);let c=[],p=!1;for(let f=1;ftm(c)).join(" | "),h=[];for(let c=1;c>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}function sr(t){return{type:t}}_r.register(Yr,{error:[R1,[Y],(t,[e],r)=>{throw new ft(e.evaluate(t),r)}],typeof:[Y,[Z],(t,[e])=>yt(_t(e.evaluate(t)))],"to-rgba":[Ut(I,4),[ce],(t,[e])=>{let[r,i,n,a]=e.evaluate(t).rgb;return[r*255,i*255,n*255,a]}],rgb:[ce,[I,I,I],Eh],rgba:[ce,[I,I,I,I],Eh],has:{type:tt,overloads:[[[Y],(t,[e])=>Fh(e.evaluate(t),t.properties())],[[Y,fr],(t,[e,r])=>Fh(e.evaluate(t),r.evaluate(t))]]},get:{type:Z,overloads:[[[Y],(t,[e])=>Vs(e.evaluate(t),t.properties())],[[Y,fr],(t,[e,r])=>Vs(e.evaluate(t),r.evaluate(t))]]},"feature-state":[Z,[Y],(t,[e])=>Vs(e.evaluate(t),t.featureState||{})],properties:[fr,[],t=>t.properties()],"geometry-type":[Y,[],t=>t.geometryType()],id:[Z,[],t=>t.id()],zoom:[I,[],t=>t.globals.zoom],"heatmap-density":[I,[],t=>t.globals.heatmapDensity||0],elevation:[I,[],t=>t.globals.elevation||0],"line-progress":[I,[],t=>t.globals.lineProgress||0],accumulated:[Z,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[I,sr(I),(t,e)=>{let r=0;for(let i of e)r+=i.evaluate(t);return r}],"*":[I,sr(I),(t,e)=>{let r=1;for(let i of e)r*=i.evaluate(t);return r}],"-":{type:I,overloads:[[[I,I],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[I],(t,[e])=>-e.evaluate(t)]]},"/":[I,[I,I],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[I,[I,I],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[I,[],()=>Math.LN2],pi:[I,[],()=>Math.PI],e:[I,[],()=>Math.E],"^":[I,[I,I],(t,[e,r])=>e.evaluate(t)**+r.evaluate(t)],sqrt:[I,[I],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[I,[I],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[I,[I],(t,[e])=>Math.log(e.evaluate(t))],log2:[I,[I],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[I,[I],(t,[e])=>Math.sin(e.evaluate(t))],cos:[I,[I],(t,[e])=>Math.cos(e.evaluate(t))],tan:[I,[I],(t,[e])=>Math.tan(e.evaluate(t))],asin:[I,[I],(t,[e])=>Math.asin(e.evaluate(t))],acos:[I,[I],(t,[e])=>Math.acos(e.evaluate(t))],atan:[I,[I],(t,[e])=>Math.atan(e.evaluate(t))],min:[I,sr(I),(t,e)=>Math.min(...e.map(r=>r.evaluate(t)))],max:[I,sr(I),(t,e)=>Math.max(...e.map(r=>r.evaluate(t)))],abs:[I,[I],(t,[e])=>Math.abs(e.evaluate(t))],round:[I,[I],(t,[e])=>{let r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[I,[I],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[I,[I],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[tt,[Y,Z],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[tt,[Z],(t,[e])=>t.id()===e.value],"filter-type-==":[tt,[Y],(t,[e])=>t.geometryType()===e.value],"filter-<":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i{let r=t.id(),i=e.value;return typeof r==typeof i&&r":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r>i}],"filter-<=":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r<=i}],"filter->=":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r>=i}],"filter-has":[tt,[Z],(t,[e])=>{let r=e.value,i=t.properties();return r in i&&i[r]!==void 0}],"filter-has-id":[tt,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[tt,[Ut(Y)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[tt,[Ut(Z)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[tt,[Y,Ut(Z)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[tt,[Y,Ut(Z)],(t,[e,r])=>Q0(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:tt,overloads:[[[tt,tt],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[sr(tt),(t,e)=>{for(let r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:tt,overloads:[[[tt,tt],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[sr(tt),(t,e)=>{for(let r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[tt,[tt],(t,[e])=>!e.evaluate(t)],"is-supported-script":[tt,[Y],(t,[e])=>{let r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[Y,[Y],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Y,[Y],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Y,sr(Z),(t,e)=>e.map(r=>Gi(r.evaluate(t))).join("")],split:[Ut(Y),[Y,Y],(t,[e,r])=>e.evaluate(t).split(r.evaluate(t))],join:[Y,[Ut(Y),Y],(t,[e,r])=>e.evaluate(t).join(r.evaluate(t))],"resolved-locale":[Y,[Pa],(t,[e])=>e.evaluate(t).resolvedLocale()]});function tm(t){return Array.isArray(t)?`(${t.map(yt).join(", ")})`:`(${yt(t.type)}...)`}function ba(t){if(t instanceof Bp)return ba(t.boundExpression);if(t instanceof _r&&t.name==="error"||t instanceof Up||t instanceof Dl||t instanceof El||t instanceof Fl)return!1;let e=t instanceof jr||t instanceof Ie,r=!0;return t.eachChild(i=>{r&&(r=e?ba(i):i instanceof ri)}),r?Na(t)&&Ua(t,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function Na(t){if(t instanceof _r&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof Dl||t instanceof El)return!1;let e=!0;return t.eachChild(r=>{e&&!Na(r)&&(e=!1)}),e}function rn(t){if(t instanceof _r&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(r=>{e&&!rn(r)&&(e=!1)}),e}function Ua(t,e){if(t instanceof _r&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild(i=>{r&&!Ua(i,e)&&(r=!1)}),r}function ii(t){return t["property-type"]==="data-driven"||t["property-type"]==="cross-faded-data-driven"}function nf(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function kl(t){return!!t.expression&&t.expression.interpolated}var Tl=/^(.*)-transition$/;function nn(t,...e){for(let r of e)for(let i in r)t[i]=r[i];return t}function Q(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}function qa(t){return typeof t=="object"&&!!t&&!Array.isArray(t)&&_t(t)===fr}function em(t){return t}function rm(t){switch(t.type){case"color":return gt.parse;case"padding":return Ae.parse;case"numberArray":return Se.parse;case"colorArray":return oe.parse;default:return null}}function im(t){switch(t){case"exponential":return sf;case"interval":return am;case"categorical":return nm;case"identity":return sm;default:throw Error(`Unknown function type "${t}"`)}}function af(t,e){let r=t.stops&&typeof t.stops[0][0]=="object",i=r||t.property!==void 0,n=r||!i,a=t.type||(kl(e)?"exponential":"interval"),s=rm(e);if(s&&(t=nn({},t),t.stops&&(t.stops=t.stops.map(h=>[h[0],s(h[1])])),t.default?t.default=s(t.default):t.default=s(e.default)),t.colorSpace&&!Z1(t.colorSpace))throw Error(`Unknown color space: "${t.colorSpace}"`);let o=im(a),l,u;if(a==="categorical"){l=Object.create(null);for(let h of t.stops)l[h[0]]=h[1];u=typeof t.stops[0][0]}if(r){let h={},c=[];for(let d=0;dd[0]),evaluate({zoom:d},y){return sf({stops:p,base:t.base},e,d).evaluate(d,y)}}}if(n){let h=a==="exponential"?{name:"exponential",base:t.base===void 0?1:t.base}:null;return{kind:"camera",interpolationType:h,interpolationFactor:be.interpolationFactor.bind(void 0,h),zoomStops:t.stops.map(c=>c[0]),evaluate:({zoom:c})=>o(t,e,c,l,u)}}return{kind:"source",evaluate(h,c){let p=c&&c.properties?c.properties[t.property]:void 0;return p===void 0?xn(t.default,e.default):o(t,e,p,l,u)}}}function xn(t,e,r){if(t!==void 0)return t;if(e!==void 0)return e;if(r!==void 0)return r}function nm(t,e,r,i,n){return xn(typeof r===n?i[r]:void 0,t.default,e.default)}function am(t,e,r){if(Q(r)!=="number")return xn(t.default,e.default);let i=t.stops.length;if(i===1||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];let n=Oa(t.stops.map(a=>a[0]),r,"");return t.stops[n][1]}function sf(t,e,r){let i=t.base===void 0?1:t.base;if(Q(r)!=="number")return xn(t.default,e.default);let n=t.stops.length;if(n===1||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];let a=Oa(t.stops.map(h=>h[0]),r,""),s=om(r,i,t.stops[a][0],t.stops[a+1][0]),o=t.stops[a][1],l=t.stops[a+1][1],u=gr[e.type]||em;return typeof o.evaluate=="function"?{evaluate(...h){let c=o.evaluate.apply(void 0,h),p=l.evaluate.apply(void 0,h);if(c!==void 0&&p!==void 0)return u(c,p,s,t.colorSpace)}}:u(o,l,s,t.colorSpace)}function sm(t,e,r){switch(e.type){case"color":r=gt.parse(r);break;case"formatted":r=ze.fromString(r.toString());break;case"resolvedImage":r=_e.fromString(r.toString());break;case"padding":r=Ae.parse(r);break;case"colorArray":r=oe.parse(r);break;case"numberArray":r=Se.parse(r);break;default:Q(r)!==e.type&&(e.type!=="enum"||!e.values[r])&&(r=void 0)}return xn(r,t.default,e.default)}function om(t,e,r,i){let n=i-r,a=t-r;return n===0?0:e===1?a/n:(e**+a-1)/(e**+n-1)}function so(t){return{result:"success",value:t}}function Nr(t){return{result:"error",value:t}}var Il=class{constructor(t,e,r,i){this.expression=t,this._warningHistory={},this._evaluator=new Ap,this._defaultValue=r?pf(r):null,this._enumValues=r&&r.type==="enum"?r.values:null,this._globalState=i,this._rootKey=e}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(t,e,r,i,n,a){this._globalState&&(t=ni(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a||null;try{let s=this.expression.evaluate(this._evaluator);if(s==null||typeof s=="number"&&s!==s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new ft(`Expected value to be one of ${Object.keys(this._enumValues).map(o=>JSON.stringify(o)).join(", ")}, but found ${JSON.stringify(s)} instead.`,"");return s}catch(s){let o=s instanceof ft?s.path:"",l=`${o}|${s.message}`;return this._warningHistory[l]||(this._warningHistory[l]=!0,typeof console<"u"&&console.warn(of(this._rootKey,o,s.message,this._defaultValue))),this._defaultValue}}};function of(t,e,r,i){return`${t}${e}: ${r}${i==null?"":` Falling back to ${String(i)}.`}`}function lf(t){if(!t)throw Error(\'rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".\')}function ja(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Yr}function er(t,e,r,i){lf(e);let n=new ef(Yr,ba,[],r?hm(r):void 0),a=n.parse(t,void 0,void 0,void 0,r&&r.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?so(new Il(a,e,r,i)):Nr(n.errors)}var an=class{constructor(t,e,r){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!rn(e.expression),this.globalStateRefs=vn(e.expression),this._globalState=r}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,a)}evaluate(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluate(t,e,r,i,n,a)}},wa=class{constructor(t,e,r,i,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!rn(e.expression),this.globalStateRefs=vn(e.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,a)}evaluate(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluate(t,e,r,i,n,a)}interpolationFactor(t,e,r){return this.interpolationType?be.interpolationFactor(this.interpolationType,t,e,r):0}};function lm(t){return t._styleExpression!==void 0}function uf(t,e,r,i){let n=er(t,e,r,i);if(n.result==="error")return n;let a=n.value.expression,s=Na(a);if(!s&&!ii(r))return Nr([new ve("","data expressions not supported")]);let o=Ua(a,["zoom"]);if(!o&&!nf(r))return Nr([new ve("","zoom expressions not supported")]);let l=pa(a);if(!l&&!o)return Nr([new ve("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\')]);if(l instanceof ve)return Nr([l]);if(l instanceof be&&!kl(r))return Nr([new ve("",\'"interpolate" expressions cannot be used with this property\')]);if(!l)return so(s?new an("constant",n.value,i):new an("source",n.value,i));let u=l instanceof be?l.interpolation:void 0;return so(s?new wa("camera",n.value,l.labels,u,i):new wa("composite",n.value,l.labels,u,i))}var hf=class cf{constructor(e,r,i){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,lf(r),this._parameters=e,this._specification=i,this._rootKey=r,this._defaultValue=pf(i),this._warningHistory={};let n=af(this._parameters,this._specification);this.kind=n.kind,this.interpolationFactor=n.interpolationFactor,this.zoomStops=n.zoomStops,this.interpolationType=n.interpolationType,this._innerEvaluate=n.evaluate}evaluate(e,r){try{return this._innerEvaluate(e,r)}catch(i){let n=i instanceof Error?i.message:String(i),a=`|${n}`;return this._warningHistory[a]||(this._warningHistory[a]=!0,typeof console<"u"&&console.warn(of(this._rootKey,"",n,this._defaultValue))),this._defaultValue}}static deserialize(e){return new cf(e._parameters,e._rootKey,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification,_rootKey:e._rootKey}}};function um(t,e,r,i){if(qa(t))return new hf(t,e,r);if(ja(t)){let n=uf(t,e,r,i);if(n.result==="error")throw Error(n.value.map(a=>`${a.key}: ${a.message}`).join(", "));return n.value}{let n=t;return r.type==="color"&&typeof t=="string"?n=gt.parse(t):r.type==="padding"&&(typeof t=="number"||Array.isArray(t))?n=Ae.parse(t):r.type==="numberArray"&&(typeof t=="number"||Array.isArray(t))?n=Se.parse(t):r.type==="colorArray"&&(typeof t=="string"||Array.isArray(t))?n=oe.parse(t):r.type==="variableAnchorOffsetCollection"&&Array.isArray(t)?n=De.parse(t):r.type==="projectionDefinition"&&typeof t=="string"&&(n=Dr.parse(t)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>n}}}function pa(t){let e=null;if(t instanceof Cp)e=pa(t.result);else if(t instanceof Rp){for(let r of t.args)if(e=pa(r),e)break}else(t instanceof vl||t instanceof be)&&t.input instanceof _r&&t.input.name==="zoom"&&(e=t);return e instanceof ve||t.eachChild(r=>{let i=pa(r);i instanceof ve?e=i:!e&&i?e=new ve("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\'):e&&i&&e!==i&&(e=new ve("",\'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.\'))}),e}function vn(t,e=new Set){return t instanceof Fl&&e.add(t.key),t.eachChild(r=>{vn(r,e)}),e}function hm(t){let e={color:ce,string:Y,number:I,enum:Y,boolean:tt,formatted:yn,padding:za,numberArray:La,colorArray:Qi,projectionDefinition:Ba,resolvedImage:mn,variableAnchorOffsetCollection:Va};return t.type==="array"?Ut(e[t.value]||Z,t.length):e[t.type]}function pf(t){if(t.type==="color"&&qa(t.default))return new gt(0,0,0,0);switch(t.type){case"color":return gt.parse(t.default)||null;case"padding":return Ae.parse(t.default)||null;case"numberArray":return Se.parse(t.default)||null;case"colorArray":return oe.parse(t.default)||null;case"variableAnchorOffsetCollection":return De.parse(t.default)||null;case"projectionDefinition":return Dr.parse(t.default)||null;default:return t.default===void 0?null:t.default}}function ni(t,e){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:s,accumulated:o}=t!=null?t:{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:s,accumulated:o,globalState:e}}function cm(t){let e=!1;for(let r of t){let i=ff(r);if(i==="expression")return"expression";i==="legacy"&&(e=!0)}return e?"legacy":"neutral"}function ff(t){if(typeof t=="boolean")return"neutral";if(!Array.isArray(t)||t.length===0)return"legacy";switch(t[0]){case"has":return t.length<2||t[1]==="$id"||t[1]==="$type"?"legacy":t.length===2?"neutral":"expression";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return cm(t.slice(1));default:return"expression"}}function Cl(t){return ff(t)!=="legacy"}function kh(t){return t==="$type"?["geometry-type"]:t==="$id"?["id"]:["get",t]}function pm(t){switch(t[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return t.length!==3||typeof t[1]!="string"?null:[t[0],kh(t[1]),t[2]];case"in":case"!in":{if(t.length<2||typeof t[1]!="string")return null;let e=["in",kh(t[1]),["literal",t.slice(2)]];return t[0]==="!in"?["!",e]:e}case"has":case"!has":{if(t.length!==2||typeof t[1]!="string"||t[1]==="$type"||t[1]==="$id")return null;let e=["has",t[1]];return t[0]==="!has"?["!",e]:e}default:return null}}function df(t){if((t[0]==="<"||t[0]==="<="||t[0]===">"||t[0]===">=")&&t[1]==="$type")return`"$type" cannot be use with operator "${t[0]}"`;let e=pm(t);return e?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(t)} with ${JSON.stringify(e)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(t)} to expression syntax.`}function Os(t,e,r){let i=r[t];return Array.isArray(i)?Cl(i)?Ml(i,e.concat(t)):{path:e.concat(t),legacyFilter:i}:null}function Ml(t,e=[]){if(!Array.isArray(t)||t.length<1)return null;switch(t[0]){case"all":case"any":case"none":for(let r=1;r"u")return;let i=r.path.map(n=>`[${n}]`).join("");console.warn(`${e}${i}: ${df(r.legacyFilter)}`)}var dm={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ai(t,e,r){if(t==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Cl(t)?fm(t,e):t=Da(t);let i=er(t,e,dm,r);if(i.result==="error")throw Error(i.value.map(n=>`${n.key}: ${n.message}`).join(", "));return{filter:(n,a,s)=>i.value.evaluate(n,a,{},s),needGeometry:yf(t),getGlobalStateRefs:()=>vn(i.value.expression)}}function ym(t,e){return te)}function yf(t){if(!Array.isArray(t))return!1;if(t[0]==="within"||t[0]==="distance")return!0;for(let e=1;e"||e==="<="||e===">="?Rs(t[1],t[2],e):e==="any"?mm(t.slice(1)):e==="all"?["all"].concat(t.slice(1).map(Da)):e==="none"?["all"].concat(t.slice(1).map(Da).map(Xn)):e==="in"?Th(t[1],t.slice(2)):e==="!in"?Xn(Th(t[1],t.slice(2))):e==="has"?Ih(t[1]):e!=="!has"||Xn(Ih(t[1]))}function Rs(t,e,r){switch(t){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,t,e]}}function mm(t){return["any"].concat(t.map(Da))}function Th(t,e){if(e.length===0)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",t,["literal",e.sort(ym)]]:["filter-in-small",t,["literal",e]]}}function Ih(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Xn(t){return["!",t]}function mf(t){let e=t.key,r=t.value;return r?[new E(e,r,"constants have been deprecated as of v8")]:[]}function Dt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function xr(t){if(Array.isArray(t))return t.map(xr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){let e={};for(let r in t)e[r]=xr(t[r]);return e}return Dt(t)}function te(t){let e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},a=t.style,s=t.styleSpec,o=t.validateSpec,l=[],u=Q(r);if(u!=="object")return[new E(e,r,`object expected, ${u} found`)];for(let h in r){let c=h.split(".")[0],p=ji(i,c)||i["*"],f;if(ji(n,c))f=n[c];else if(ji(i,c)){if(r[h]===void 0)continue;f=o}else if(n["*"])f=n["*"];else if(i["*"])f=o;else{l.push(new E(e,r[h],`unknown property "${h}"`));continue}l=l.concat(f({key:(e&&`${e}.`)+h,value:r[h],valueSpec:p,style:a,styleSpec:s,object:r,objectKey:h,validateSpec:o},r))}for(let h in i)n[h]||i[h].required&&i[h].default===void 0&&r[h]===void 0&&l.push(new E(e,r,`missing required property "${h}"`));return l}function Bl(t){let e=t.value,r=t.valueSpec,i=t.validateSpec,n=t.style,a=t.styleSpec,s=t.key,o=t.arrayElementValidator||i;if(Q(e)!=="array")return[new E(s,e,`array expected, ${Q(e)} found`)];if(r.length&&e.length!==r.length)return[new E(s,e,`array length ${r.length} expected, length ${e.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),Q(r.value)==="object"&&(l=r.value);let u=[];for(let h=0;hi.maximum?[new E(e,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]:[new E(e,r,`number expected, ${n} found`)]}function gf(t){let e=t.valueSpec,r=Dt(t.value.type),i,n={},a,s,o=r!=="categorical"&&t.value.property===void 0,l=!o,u=Q(t.value.stops)==="array"&&Q(t.value.stops[0])==="array"&&Q(t.value.stops[0][0])==="object",h=te({key:t.key,value:t.value,valueSpec:t.styleSpec.function,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:c,default:d}});return r==="identity"&&o&&h.push(new E(t.key,t.value,\'missing required property "property"\')),r!=="identity"&&!t.value.stops&&h.push(new E(t.key,t.value,\'missing required property "stops"\')),r==="exponential"&&t.valueSpec.expression&&!kl(t.valueSpec)&&h.push(new E(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ii(t.valueSpec)?h.push(new E(t.key,t.value,"property functions not supported")):o&&!nf(t.valueSpec)&&h.push(new E(t.key,t.value,"zoom functions not supported"))),(r==="categorical"||u)&&t.value.property===void 0&&h.push(new E(t.key,t.value,\'"property" property is required\')),h;function c(y){if(r==="identity")return[new E(y.key,y.value,\'identity function may not have a "stops" property\')];let m=[],g=y.value;return m=m.concat(Bl({key:y.key,value:g,valueSpec:y.valueSpec,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec,arrayElementValidator:p})),Q(g)==="array"&&g.length===0&&m.push(new E(y.key,g,"array must have at least one stop")),m}function p(y){let m=[],g=y.value,x=y.key;if(Q(g)!=="array")return[new E(x,g,`array expected, ${Q(g)} found`)];if(g.length!==2)return[new E(x,g,`array length 2 expected, length ${g.length} found`)];if(u){if(Q(g[0])!=="object")return[new E(x,g,`object expected, ${Q(g[0])} found`)];if(g[0].zoom===void 0)return[new E(x,g,"object stop key must have zoom")];if(g[0].value===void 0)return[new E(x,g,"object stop key must have value")];if(s&&s>Dt(g[0].zoom))return[new E(x,g[0].zoom,"stop zoom values must appear in ascending order")];Dt(g[0].zoom)!==s&&(s=Dt(g[0].zoom),a=void 0,n={}),m=m.concat(te({key:`${x}[0]`,value:g[0],valueSpec:{zoom:{}},validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{zoom:Ga,value:f}}))}else m=m.concat(f({key:`${x}[0]`,value:g[0],valueSpec:{},validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec},g));return ja(xr(g[1]))?m.concat([new E(`${x}[1]`,g[1],"expressions are not allowed in function stops.")]):m.concat(y.validateSpec({key:`${x}[1]`,value:g[1],valueSpec:e,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec}))}function f(y,m){let g=Q(y.value),x=Dt(y.value),v=y.value===null?m:y.value;if(!i)i=g;else if(g!==i)return[new E(y.key,v,`${g} stop domain type must match previous stop domain type ${i}`)];if(g!=="number"&&g!=="string"&&g!=="boolean")return[new E(y.key,v,"stop domain value must be a number, string, or boolean")];if(g!=="number"&&r!=="categorical"){let b=`number expected, ${g} found`;return ii(e)&&r===void 0&&(b+=\'\\nIf you intended to use a categorical function, specify `"type": "categorical"`.\'),[new E(y.key,v,b)]}return r==="categorical"&&g==="number"&&(!isFinite(x)||Math.floor(x)!==x)?[new E(y.key,v,`integer expected, found ${x}`)]:r!=="categorical"&&g==="number"&&a!==void 0&&xnew E(`${t.key}${i.key}`,t.value,i.message));let r=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!r.outputDefined())return[new E(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!rn(r))return[new E(t.key,t.value,\'"feature-state" data expressions are not supported with layout properties.\')];if(t.expressionContext==="filter"&&!rn(r))return[new E(t.key,t.value,\'"feature-state" data expressions are not supported with filters.\')];if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!Ua(r,["zoom","feature-state"]))return[new E(t.key,t.value,\'"zoom" and "feature-state" expressions are not supported with cluster properties.\')];if(t.expressionContext==="cluster-initial"&&!Na(r))return[new E(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function gm(t){let e=t.value,r=t.key,i=Q(e);return i==="boolean"?[]:[new E(r,e,`boolean expected, ${i} found`)]}function oo(t){let e=t.key,r=t.value,i=Q(r);return i==="string"?gt.parse(String(r))?[]:[new E(e,r,`color expected, "${r}" found`)]:[new E(e,r,`color expected, ${i} found`)]}function sn(t){let e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?i.values.indexOf(Dt(r))===-1&&n.push(new E(e,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(i.values).indexOf(Dt(r))===-1&&n.push(new E(e,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function xm(t,e){let r=t;for(let i of e)r=r[i];return r}function vm(t,e){let r=Ml(e);return r?[new E(`${t.key}${r.path.map(i=>`[${i}]`).join("")}`,xm(t.value,r.path),df(r.legacyFilter),null,"warning")]:[]}function Pl(t){let e=xr(t.value);return Cl(e)?[...vm(t,e),...si(nn({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:xf(t)}function xf(t){let e=t.value,r=t.key;if(Q(e)!=="array")return[new E(r,e,`array expected, ${Q(e)} found`)];let i=t.styleSpec,n,a=[];if(e.length<1)return[new E(r,e,"filter array must have at least 1 element")];switch(a=a.concat(sn({key:`${r}[0]`,value:e[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),Dt(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Dt(e[1])==="$type"&&a.push(new E(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&a.push(new E(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(n=Q(e[1]),n!=="string"&&a.push(new E(`${r}[1]`,e[1],`string expected, ${n} found`)));for(let s=2;s{c in r&&e.push(new E(i,r[c],`"${c}" is prohibited for ref layers`))});let h;n.layers.forEach(c=>{Dt(c.id)===o&&(h=c)}),h?h.ref?e.push(new E(i,r.ref,"ref cannot reference another ref layer")):s=Dt(h.type):e.push(new E(i,r.ref,`ref layer "${o}" not found`))}else if(s!=="background")if(!r.source)e.push(new E(i,r,\'missing required property "source"\'));else{let h=n.sources&&n.sources[r.source],c=h&&Dt(h.type);h?c==="vector"&&s==="raster"?e.push(new E(i,r.source,`layer "${r.id}" requires a raster source`)):c!=="raster-dem"&&s==="hillshade"||c!=="raster-dem"&&s==="color-relief"?e.push(new E(i,r.source,`layer "${r.id}" requires a raster-dem source`)):c==="raster"&&s!=="raster"?e.push(new E(i,r.source,`layer "${r.id}" requires a vector source`)):c==="vector"&&!r["source-layer"]?e.push(new E(i,r,`layer "${r.id}" must specify a "source-layer"`)):c==="raster-dem"&&s!=="hillshade"&&s!=="color-relief"?e.push(new E(i,r.source,"raster-dem source can only be used with layer type \'hillshade\' or \'color-relief\'.")):s==="line"&&r.paint&&r.paint["line-gradient"]&&(c!=="geojson"||!h.lineMetrics)&&e.push(new E(i,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`)):e.push(new E(i,r.source,`source "${r.source}" not found`))}return s==="raster"&&((l=r.paint)!=null&&l.resampling)&&((u=r.paint)!=null&&u["raster-resampling"])&&e.push(new E(i,r.paint,`layer "${r.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),e=e.concat(te({key:i,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*"(){return[]},type(){return t.validateSpec({key:`${i}.type`,value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,object:r,objectKey:"type"})},filter:Pl,layout(h){return te({layer:r,key:h.key,value:h.value,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*"(c){return wf(nn({layerType:s},c))}}})},paint(h){return te({layer:r,key:h.key,value:h.value,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*"(c){return bf(nn({layerType:s},c))}}})}}})),e}function tr(t){let e=t.value,r=t.key,i=Q(e);return i==="string"?[]:[new E(r,e,`string expected, ${i} found`)]}function bm(t){var c;let e=(c=t.sourceName)!=null?c:"",r=t.value,i=t.styleSpec,n=i.source_raster_dem,a=t.style,s=[],o=Q(r);if(r===void 0)return s;if(o!=="object")return s.push(new E("source_raster_dem",r,`object expected, ${o} found`)),s;let l=Dt(r.encoding)==="custom",u=["redFactor","greenFactor","blueFactor","baseShift"],h=t.value.encoding?`"${t.value.encoding}"`:"Default";for(let p in r)!l&&u.includes(p)?s.push(new E(p,r[p],`In "${e}": "${p}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):n[p]?s=s.concat(t.validateSpec({key:p,value:r[p],valueSpec:n[p],validateSpec:t.validateSpec,style:a,styleSpec:i})):s.push(new E(p,r[p],`unknown property "${p}"`));return s}var Ch={promoteId:wm};function _f(t){let e=t.value,r=t.key,i=t.styleSpec,n=t.style,a=t.validateSpec;if(!e.type)return[new E(r,e,\'"type" is required\')];let s=Dt(e.type),o;switch(s){case"vector":case"raster":return o=te({key:r,value:e,valueSpec:i[`source_${s.replace("-","_")}`],style:t.style,styleSpec:i,objectElementValidators:Ch,validateSpec:a}),o;case"raster-dem":return o=bm({sourceName:r,value:e,style:t.style,styleSpec:i,validateSpec:a}),o;case"geojson":if(o=te({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:Ch}),e.cluster)for(let l in e.clusterProperties){let[u,h]=e.clusterProperties[l],c=typeof u=="string"?[u,["accumulated"],["get",l]]:u;o.push(...si({key:`${r}.${l}.map`,value:h,validateSpec:a,expressionContext:"cluster-map"})),o.push(...si({key:`${r}.${l}.reduce`,value:c,validateSpec:a,expressionContext:"cluster-reduce"}))}return o;case"video":return te({key:r,value:e,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return te({key:r,value:e,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new E(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return sn({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,validateSpec:a,styleSpec:i})}}function wm({key:t,value:e}){if(Q(e)==="string")return tr({key:t,value:e});{let r=[];for(let i in e)r.push(...tr({key:`${t}.${i}`,value:e[i]}));return r}}function Af(t){let e=t.value,r=t.styleSpec,i=r.light,n=t.style,a=[],s=Q(e);if(e===void 0)return a;if(s!=="object")return a=a.concat([new E("light",e,`object expected, ${s} found`)]),a;for(let o in e){let l=o.match(Tl);a=l&&i[l[1]]&&i[l[1]].transition?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:r.transition,validateSpec:t.validateSpec,style:n,styleSpec:r})):i[o]?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],validateSpec:t.validateSpec,style:n,styleSpec:r})):a.concat([new E(o,e[o],`unknown property "${o}"`)])}return a}function Sf(t){let e=t.value,r=t.styleSpec,i=r.sky,n=t.style,a=Q(e);if(e===void 0)return[];if(a!=="object")return[new E("sky",e,`object expected, ${a} found`)];let s=[];for(let o in e){let l=o.match(Tl);s=l&&i[l[1]]&&i[l[1]].transition?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:r.transition,style:n,styleSpec:r})):i[o]?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],style:n,styleSpec:r})):s.concat([new E(o,e[o],`unknown property "${o}"`)])}return s}function Ef(t){let e=t.value,r=t.styleSpec,i=r.terrain,n=t.style,a=[],s=Q(e);if(e===void 0)return a;if(s!=="object")return a=a.concat([new E("terrain",e,`object expected, ${s} found`)]),a;for(let o in e)a=i[o]?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],validateSpec:t.validateSpec,style:n,styleSpec:r})):a.concat([new E(o,e[o],`unknown property "${o}"`)]);return a}function Dm(t){return tr(t).length===0?[]:si(t)}function _m(t){return tr(t).length===0?[]:si(t)}function Am(t){let e=t.key,r=t.value;if(Q(r)==="array"){if(r.length<1||r.length>4)return[new E(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a[new E(t,e,\'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"\')],n=r.match(Mm);if(!n)return i();let[,a,s,o]=n;if(o!==void 0)return o.length>6?i():[];let l=parseInt(a,16),u=s===void 0?l:parseInt(s,16);return l>Mh||u>Mh?[new E(t,e,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:l>u?[new E(t,e,`unicode range start must not be greater than its end, but ${r} is`)]:[]}function Tf(t){var o,l;let e=(o=t.key)!=null?o:"font-faces",r=t.value,i=t.validateSpec,n=(l=t.styleSpec)!=null?l:pp,a=t.style;if(!lo(r))return[new E(e,r,`object expected, ${Q(r)} found`)];let s=[];for(let u in r){let h=r[u],c=Q(h);if(c==="string")s.push(...tr({key:`${e}.${u}`,value:h}));else if(c==="array"){let p={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[f,d]of h.entries()){let y=`${e}.${u}[${f}]`;s.push(...te({key:y,value:d,valueSpec:p,styleSpec:n,style:a,validateSpec:i}));let m=lo(d)?d["unicode-range"]:void 0;if(Q(m)==="array")for(let[g,x]of m.entries())s.push(...Bm(`${y}.unicode-range[${g}]`,x))}}else s.push(new E(`${e}.${u}`,h,`string or array expected, ${c} found`))}return s}var Bh={"*"(){return[]},array:Bl,boolean:gm,number:Ga,color:oo,constants:mf,enum:sn,filter:Pl,function:gf,layer:Df,object:te,source:_f,light:Af,sky:Sf,terrain:Ef,projection:km,projectionDefinition:Tm,string:tr,formatted:Dm,resolvedImage:_m,padding:Am,numberArray:Sm,colorArray:Em,variableAnchorOffsetCollection:Fm,sprite:Ff,state:kf,fontFaces:Tf};function Xi(t){let e=t.value,r=t.valueSpec,i=t.styleSpec;return t.validateSpec=Xi,r.expression&&qa(Dt(e))?gf(t):r.expression&&ja(xr(e))?si(t):r.type&&Bh[r.type]?Bh[r.type](t):te(nn({},t,{valueSpec:r.type?i[r.type]:r}))}function If(t){let e=t.value,r=t.key,i=tr(t);return i.length||(e.indexOf("{fontstack}")===-1&&i.push(new E(r,e,\'"glyphs" url must include a "{fontstack}" token\')),e.indexOf("{range}")===-1&&i.push(new E(r,e,\'"glyphs" url must include a "{range}" token\'))),i}function Qt(t,e=w){let r=[];return r=r.concat(Xi({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,validateSpec:Xi,objectElementValidators:{glyphs:If,"*"(){return[]}}})),t.constants&&(r=r.concat(mf({key:"constants",value:t.constants,style:t,styleSpec:e,validateSpec:Xi}))),Cf(r)}Qt.source=ie(re(_f)),Qt.sprite=ie(re(Ff)),Qt.glyphs=ie(re(If)),Qt.fontFaces=ie(re(Tf)),Qt.light=ie(re(Af)),Qt.sky=ie(re(Sf)),Qt.terrain=ie(re(Ef)),Qt.state=ie(re(kf)),Qt.layer=ie(re(Df)),Qt.filter=ie(re(Pl)),Qt.paintProperty=ie(re(bf)),Qt.layoutProperty=ie(re(wf));function re(t){return function(e){return t(Object.assign({},e,{validateSpec:Xi}))}}function Cf(t){return[].concat(t).sort((e,r)=>e.line-r.line)}function ie(t){return function(...e){return Cf(t.apply(this,e))}}var Pm={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"},zm=class{constructor(t,e,r){this._rootKey=e,this._globalState=r,this.setValue(t)}evaluate(){var t;return(t=this._literalValue)!=null?t:this._compiledValue.evaluate({})}setValue(t){if(t==null||t==="visible"||t==="none"){this._literalValue=t==="none"?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let e=er(t,this._rootKey,Pm,this._globalState);if(e.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));this._literalValue=void 0,this._compiledValue=e.value,this._globalStateRefs=vn(e.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}};function Lm(t,e,r){return new zm(t,e,r)}var Ph=Qt,y5=new Set(Object.keys(w).filter(t=>t.startsWith("source_")).map(t=>t.slice(7).replaceAll("_","-")));function Vm(t,e){let r=!1;for(let i of e){if(i.severity==="warning"){Bt(i.message);continue}t.fire(new ma(Error(i.message))),r=!0}return r}function Om(t,e,r,i){return(i==null?void 0:i.validate)!==!1&&Vm(t,e(je({styleSpec:w},r)))}var uo=class Mf{constructor(e,r,i){let n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let s=new Int32Array(this.arrayBuffer);e=s[0],r=s[1],i=s[2],this.d=r+2*i;for(let u=0;u=c[f+0]&&n>=c[f+1])?(o[p]=!0,s.push(h[p])):o[p]=!1}}}_forEachCell(e,r,i,n,a,s,o,l){let u=this._convertToCellCoord(e),h=this._convertToCellCoord(r),c=this._convertToCellCoord(i),p=this._convertToCellCoord(n);for(let f=u;f<=c;f++)for(let d=h;d<=p;d++){let y=this.d*d+f;if((!l||l(this._convertFromCellCoord(f),this._convertFromCellCoord(d),this._convertFromCellCoord(f+1),this._convertFromCellCoord(d+1)))&&a.call(this,e,r,i,n,y,s,o,l))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,r=3+this.cells.length+1+1,i=0;for(let s of this.cells)i+=s.length;let n=new Int32Array(r+i+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;let a=r;for(let s=0;sr?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}}},$m="-transition",Xa=class{constructor(t,e,r,i){this.property=t,this.value=e,this.expression=um(e===void 0?t.specification.default:e,r,t.specification,i)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)}},ho=class{constructor(t,e,r){this.property=t,this.value=new Xa(t,void 0,e,r)}transitioned(t,e){return new Lh(this.property,this.value,e,Gt({},t.transition,this.transition),t.now)}untransitioned(){return new Lh(this.property,this.value,null,{},0)}},Nm=class{constructor(t,e,r){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=r,this._rootKey=e}_propertyRootKey(t){return`${this._rootKey}.${String(t)}`}hasProperty(t){return t in this._properties.defaultTransitionablePropertyValues}getValue(t){return He(this._values[t].value.value)}setValue(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new ho(this._values[t].property,this._propertyRootKey(t),this._globalState)),this._values[t].value=new Xa(this._values[t].property,e===null?void 0:He(e),this._propertyRootKey(t),this._globalState)}getTransition(t){return He(this._values[t].transition)}setTransition(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new ho(this._values[t].property,this._propertyRootKey(t),this._globalState)),this._values[t].transition=He(e)||void 0}serialize(){let t={};for(let e of Object.keys(this._values)){let r=this.getValue(e);r!==void 0&&(t[e]=r);let i=this.getTransition(e);i!==void 0&&(t[`${e}${$m}`]=i)}return t}transitioned(t,e){let r=new Vh(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(t,e._values[i]);return r}untransitioned(){let t=new Vh(this._properties);for(let e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}},Lh=class{constructor(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(t,e,r){let i=t.now||0,n=this.value.possiblyEvaluate(t,e,r),a=this.prior;if(!a)return n;if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(ii.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}},Lf=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e,r,i){if(t.value!==void 0){if(t.expression.kind==="constant"){let n=t.expression.evaluate(e,null,{},r,i);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new st(Math.floor(e.zoom-1),e)),t.expression.evaluate(new st(Math.floor(e.zoom),e)),t.expression.evaluate(new st(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}},Wa=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e,r,i){return!!t.expression.evaluate(e,null,{},r,i)}interpolate(){return!1}},Xt=class{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let e in t){let r=t[e];r.specification.overridable&&this.overridableProperties.push(e);let i=this.defaultPropertyValues[e]=new Xa(r,void 0,r.name,void 0),n=this.defaultTransitionablePropertyValues[e]=new ho(r,r.name,void 0);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}}};C("DataDrivenProperty",N),C("DataConstantProperty",V),C("CrossFadedDataDrivenProperty",on),C("CrossFadedProperty",Lf),C("ColorRampProperty",Wa);var Rh=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",$s=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?",de=class extends O1{constructor(t,e,r){if(super(),this.id=t.id,this.type=t.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=Lm(this.visibility,`layers[${this.id}].layout.visibility`,r),t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=ai(t.filter,`layers[${this.id}].filter`,r)),e.layout&&(this._unevaluatedLayout=new Um(e.layout,`layers[${this.id}].layout`,r)),e.paint)){this._transitionablePaint=new Nm(e.paint,`layers[${this.id}].paint`,r);for(let i in t.paint)this.setPaintProperty(i,t.paint[i],{validate:!1});for(let i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ya(e.paint)}}setFilter(t){this.filter=t,this._featureFilter=ai(t,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){var e;if(t==="visibility")return this.visibility;if((e=this._transitionablePaint)!=null&&e.hasProperty(t))throw Error(t+Rh);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${t}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){let t=new Set;for(let e of this._visibilityExpression.getGlobalStateRefs())t.add(e);if(this._unevaluatedLayout)for(let e in this._unevaluatedLayout._values){let r=this._unevaluatedLayout._values[e];for(let i of r.getGlobalStateRefs())t.add(i)}for(let e of this._featureFilter.getGlobalStateRefs())t.add(e);return t}getPaintAffectingGlobalStateRefs(){var e;let t=new globalThis.Map;if(this._transitionablePaint)for(let r in this._transitionablePaint._values){let i=this._transitionablePaint._values[r].value;for(let n of i.getGlobalStateRefs()){let a=(e=t.get(n))!=null?e:[];a.push({name:r,value:i.value}),t.set(n,a)}}return t}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(t,e,r={}){var i;if(t==="visibility"){this.visibility=e,this._visibilityExpression.setValue(e),this.recalculateVisibility();return}if((i=this._transitionablePaint)!=null&&i.hasProperty(t)){this.fire(new ma(Error(t+Rh)));return}e!=null&&this._validate(Ph.layoutProperty,`layers.${this.id}.layout.${t}`,t,e,r)||this._unevaluatedLayout.setValue(t,e)}getPaintProperty(t){var e,r;if(t.endsWith("-transition")){let i=t.slice(0,-11);if(i==="visibility"||(e=this._unevaluatedLayout)!=null&&e.hasProperty(i))throw Error(t+$s);return this._transitionablePaint.getTransition(i)}if(t==="visibility"||(r=this._unevaluatedLayout)!=null&&r.hasProperty(t))throw Error(t+$s);return this._transitionablePaint.getValue(t)}setPaintProperty(t,e,r={}){var i;if(t==="visibility"||(i=this._unevaluatedLayout)!=null&&i.hasProperty(t))return this.fire(new ma(Error(t+$s))),!1;if(e!=null&&this._validate(Ph.paintProperty,`layers.${this.id}.paint.${t}`,t,e,r))return!1;if(t.endsWith("-transition"))return this._transitionablePaint.setTransition(t.slice(0,-11),e||void 0),!1;{let n=this._transitionablePaint._values[t],a=n.property.specification["property-type"]==="cross-faded-data-driven",s=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);let l=this._transitionablePaint._values[t].value;return l.isDataDriven()||s||a||this._handleOverridablePaintPropertyUpdate(t,o,l)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,e,r){return!1}isHidden(t=this.minzoom,e=!1){return this.minzoom&&t<(e?Math.floor(this.minzoom):this.minzoom)||this.maxzoom&&t>=this.maxzoom?!0:this._evaluatedVisibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}serialize(){var e,r;let t={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:(e=this._unevaluatedLayout)==null?void 0:e.serialize(),paint:(r=this._transitionablePaint)==null?void 0:r.serialize()};return this.visibility&&(t.layout||(t.layout={}),t.layout.visibility=this.visibility),T1(t,(i,n)=>i!==void 0&&!(n==="layout"&&!Object.keys(i).length)&&!(n==="paint"&&!Object.keys(i).length))}_validate(t,e,r,i,n={}){return Om(this,t,{key:e,layerType:this.type,objectKey:r,value:i},n)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let t in this.paint._values){let e=this.paint.get(t);if(e instanceof se&&ii(e.property.specification)&&(e.value.kind==="source"||e.value.kind==="composite")&&e.value.isStateDependent)return!0}return!1}},qm,jm=()=>qm||(qm=new Xt({"raster-opacity":new V(w.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new V(w.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new V(w.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new V(w.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new V(w.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new V(w.paint_raster["raster-contrast"],"raster-contrast"),resampling:new V(w.paint_raster.resampling,"resampling"),"raster-resampling":new V(w.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new V(w.paint_raster["raster-fade-duration"],"raster-fade-duration")})),Gm={get paint(){return jm()}};var Xm=class extends de{constructor(t,e){super(t,Gm,e)}},Ym={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bn=class{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},xt=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){let e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_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(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*5),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}};function At(t,e=1){let r=0,i=0;return{members:t.map(n=>{let a=Wm(n.type),s=r=$h(r,Math.max(e,a)),o=n.components||1;return i=Math.max(i,a),r+=a*o,{name:n.name,type:n.type,components:o,offset:s}}),size:$h(r,Math.max(i,e)),alignment:e}}function Wm(t){return Ym[t].BYTES_PER_ELEMENT}function $h(t,e){return Math.ceil(t/e)*e}var ln=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.int16[i+0]=e,this.int16[i+1]=r,t}};ln.prototype.bytesPerElement=4,C("StructArrayLayout2i4",ln);var co=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.int16[n+0]=e,this.int16[n+1]=r,this.int16[n+2]=i,t}};co.prototype.bytesPerElement=6,C("StructArrayLayout3i6",co);var Nh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)}emplace(t,e,r,i,n){let a=t*4;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,t}};Nh.prototype.bytesPerElement=8,C("StructArrayLayout4i8",Nh);var po=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*6;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,this.int16[o+4]=a,this.int16[o+5]=s,t}};po.prototype.bytesPerElement=12,C("StructArrayLayout2i4i12",po);var fo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*4,l=t*8;return this.int16[o+0]=e,this.int16[o+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=a,this.uint8[l+7]=s,t}};fo.prototype.bytesPerElement=8,C("StructArrayLayout2i4ub8",fo);var un=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.float32[i+0]=e,this.float32[i+1]=r,t}};un.prototype.bytesPerElement=8,C("StructArrayLayout2f8",un);var yo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u){let h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,i,n,a,s,o,l,u)}emplace(t,e,r,i,n,a,s,o,l,u,h){let c=t*10;return this.uint16[c+0]=e,this.uint16[c+1]=r,this.uint16[c+2]=i,this.uint16[c+3]=n,this.uint16[c+4]=a,this.uint16[c+5]=s,this.uint16[c+6]=o,this.uint16[c+7]=l,this.uint16[c+8]=u,this.uint16[c+9]=h,t}};yo.prototype.bytesPerElement=20,C("StructArrayLayout10ui20",yo);var mo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o){let l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,i,n,a,s,o)}emplace(t,e,r,i,n,a,s,o,l){let u=t*8;return this.uint16[u+0]=e,this.uint16[u+1]=r,this.uint16[u+2]=i,this.uint16[u+3]=n,this.uint16[u+4]=a,this.uint16[u+5]=s,this.uint16[u+6]=o,this.uint16[u+7]=l,t}};mo.prototype.bytesPerElement=16,C("StructArrayLayout8ui16",mo);var go=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u,h,c,p){let f=this.length;return this.resize(f+1),this.emplace(f,t,e,r,i,n,a,s,o,l,u,h,c,p)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f){let d=t*14,y=t*7;return this.int16[d+0]=e,this.int16[d+1]=r,this.int16[d+2]=i,this.int16[d+3]=n,this.uint16[d+4]=a,this.uint16[d+5]=s,this.uint16[d+6]=o,this.uint16[d+7]=l,this.int16[d+8]=u,this.int16[d+9]=h,this.int16[d+10]=c,this.int16[d+11]=p,this.float32[y+6]=f,t}};go.prototype.bytesPerElement=28,C("StructArrayLayout4i4ui4i1f28",go);var xo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.float32[n+0]=e,this.float32[n+1]=r,this.float32[n+2]=i,t}};xo.prototype.bytesPerElement=12,C("StructArrayLayout3f12",xo);var vo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.uint32[r+0]=e,t}};vo.prototype.bytesPerElement=4,C("StructArrayLayout1ul4",vo);var bo=class extends xt{_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(t,e,r,i,n,a,s,o,l){let u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,a,s,o,l)}emplace(t,e,r,i,n,a,s,o,l,u){let h=t*10,c=t*5;return this.int16[h+0]=e,this.int16[h+1]=r,this.int16[h+2]=i,this.int16[h+3]=n,this.int16[h+4]=a,this.int16[h+5]=s,this.uint32[c+3]=o,this.uint16[h+8]=l,this.uint16[h+9]=u,t}};bo.prototype.bytesPerElement=20,C("StructArrayLayout6i1ul2ui20",bo);var wo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*6;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,this.int16[o+4]=a,this.int16[o+5]=s,t}};wo.prototype.bytesPerElement=12,C("StructArrayLayout2i2i2i12",wo);var Uh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n){let a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n)}emplace(t,e,r,i,n,a){let s=t*4,o=t*8;return this.float32[s+0]=e,this.float32[s+1]=r,this.float32[s+2]=i,this.int16[o+6]=n,this.int16[o+7]=a,t}};Uh.prototype.bytesPerElement=16,C("StructArrayLayout2f1f2i16",Uh);var Do=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*16,l=t*4,u=t*8;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[u+6]=a,this.int16[u+7]=s,t}};Do.prototype.bytesPerElement=16,C("StructArrayLayout2ub2f2i16",Do);var _o=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.uint16[n+0]=e,this.uint16[n+1]=r,this.uint16[n+2]=i,t}};_o.prototype.bytesPerElement=6,C("StructArrayLayout3ui6",_o);var Ao=class extends xt{_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(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g){let x=this.length;return this.resize(x+1),this.emplace(x,t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x){let v=t*26,b=t*13,D=t*52;return this.int16[v+0]=e,this.int16[v+1]=r,this.uint16[v+2]=i,this.uint16[v+3]=n,this.uint32[b+2]=a,this.uint32[b+3]=s,this.uint32[b+4]=o,this.uint16[v+10]=l,this.uint16[v+11]=u,this.uint16[v+12]=h,this.float32[b+7]=c,this.float32[b+8]=p,this.uint8[D+36]=f,this.uint8[D+37]=d,this.uint8[D+38]=y,this.uint32[b+10]=m,this.int16[v+22]=g,this.float32[b+12]=x,t}};Ao.prototype.bytesPerElement=52,C("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",Ao);var So=class extends xt{_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(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P){let L=this.length;return this.resize(L+1),this.emplace(L,t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P,L){let F=t*34,$=t*17;return this.int16[F+0]=e,this.int16[F+1]=r,this.int16[F+2]=i,this.int16[F+3]=n,this.int16[F+4]=a,this.int16[F+5]=s,this.int16[F+6]=o,this.int16[F+7]=l,this.uint16[F+8]=u,this.uint16[F+9]=h,this.uint16[F+10]=c,this.uint16[F+11]=p,this.uint16[F+12]=f,this.uint16[F+13]=d,this.uint16[F+14]=y,this.uint16[F+15]=m,this.uint16[F+16]=g,this.uint16[F+17]=x,this.uint16[F+18]=v,this.uint16[F+19]=b,this.uint16[F+20]=D,this.uint16[F+21]=A,this.uint16[F+22]=_,this.uint32[$+12]=S,this.float32[$+13]=k,this.float32[$+14]=z,this.uint16[F+30]=O,this.uint16[F+31]=P,this.float32[$+16]=L,t}};So.prototype.bytesPerElement=68,C("StructArrayLayout8i15ui1ul2f2ui1f68",So);var _a=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.float32[r+0]=e,t}};_a.prototype.bytesPerElement=4,C("StructArrayLayout1f4",_a);var Eo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*6,a=t*3;return this.uint16[n+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,t}};Eo.prototype.bytesPerElement=12,C("StructArrayLayout1ui2f12",Eo);var Fo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*2,a=t*4;return this.uint32[n+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=i,t}};Fo.prototype.bytesPerElement=8,C("StructArrayLayout1ul2ui8",Fo);var ko=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.uint16[i+0]=e,this.uint16[i+1]=r,t}};ko.prototype.bytesPerElement=4,C("StructArrayLayout2ui4",ko);var qh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.uint16[r+0]=e,t}};qh.prototype.bytesPerElement=2,C("StructArrayLayout1ui2",qh);var To=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)}emplace(t,e,r,i,n){let a=t*4;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,t}};To.prototype.bytesPerElement=16,C("StructArrayLayout4f16",To);var Vf=class extends bn{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 B(this.anchorPointX,this.anchorPointY)}};Vf.prototype.size=20;var Ll=class extends bo{get(t){return new Vf(this,t)}};C("CollisionBoxArray",Ll);var Of=class extends bn{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(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}};Of.prototype.size=52;var Rf=class extends Ao{get(t){return new Of(this,t)}};C("PlacedSymbolArray",Rf);var $f=class extends bn{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(t){this._structArray.uint32[this._pos4+12]=t}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]}get heightOffset(){return this._structArray.float32[this._pos4+16]}};$f.prototype.size=68;var Nf=class extends So{get(t){return new $f(this,t)}};C("SymbolInstanceArray",Nf);var Uf=class extends _a{getoffsetX(t){return this.float32[t*1+0]}};C("GlyphOffsetArray",Uf);var qf=class extends co{getx(t){return this.int16[t*3+0]}gety(t){return this.int16[t*3+1]}gettileUnitDistanceFromAnchor(t){return this.int16[t*3+2]}};C("SymbolLineVertexArray",qf);var jf=class extends bn{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]}};jf.prototype.size=12;var Gf=class extends Eo{get(t){return new jf(this,t)}};C("TextAnchorOffsetArray",Gf);var Xf=class extends bn{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]}};Xf.prototype.size=8;var Yf=class extends Fo{get(t){return new Xf(this,t)}};C("FeatureIndexArray",Yf);var Zm=class extends ln{};var Hm=class extends ln{},Km=class extends ln{},Jm=class extends po{},Qm=class extends fo{},tg=class extends un{},Vr=class extends yo{},jh=class extends mo{},eg=class extends go{},rg=class extends xo{},ig=class extends vo{},Gh=class extends wo{};var ng=class extends Do{};var wn=class extends _o{},Io=class extends ko{};var Co=At([{name:"a_pos",components:2,type:"Int16"}],4),ag=Co.members;Co.size,Co.alignment;var ee=class Ur{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,r,i,n){let a=this.segments[this.segments.length-1];return e>Ur.MAX_VERTEX_ARRAY_LENGTH&&Bt(`Max vertices per segment is ${Ur.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \\`fillLargeMeshArrays\\` function if you require meshes with more than ${Ur.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+e>Ur.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n?this.createNewSegment(r,i,n):a}createNewSegment(e,r,i){let n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return i!==void 0&&(n.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(e,r,i){return this.prepareSegment(0,e,r,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let r in e.vaos)e.vaos[r].destroy()}static simpleSegment(e,r,i,n){return new Ur([{vertexOffset:e,primitiveOffset:r,vertexLength:i,primitiveLength:n,vaos:{},sortKey:0}])}};ee.MAX_VERTEX_ARRAY_LENGTH=2**16-1,C("SegmentVector",ee);function Xh(t,e){return t=Ji(Math.floor(t),0,255),e=Ji(Math.floor(e),0,255),256*t+e}var sg=At([{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"}]),og=At([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]),lg=fl(((t,e)=>{function r(i,n){for(var a=i.length&3,s=i.length-a,o=n,l,u=3432918353,h=461845907,c,p=0;p>>16)*u&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(c&65535)*h+(((c>>>16)*h&65535)<<16)&4294967295,o^=c,o=o<<13|o>>>19,l=(o&65535)*5+(((o>>>16)*5&65535)<<16)&4294967295,o=(l&65535)+27492+(((l>>>16)+58964&65535)<<16);switch(c=0,a){case 3:c^=(i.charCodeAt(p+2)&255)<<16;case 2:c^=(i.charCodeAt(p+1)&255)<<8;case 1:c^=i.charCodeAt(p)&255,c=(c&65535)*u+(((c>>>16)*u&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(c&65535)*h+(((c>>>16)*h&65535)<<16)&4294967295,o^=c}return o^=i.length,o^=o>>>16,o=(o&65535)*2246822507+(((o>>>16)*2246822507&65535)<<16)&4294967295,o^=o>>>13,o=(o&65535)*3266489909+(((o>>>16)*3266489909&65535)<<16)&4294967295,o^=o>>>16,o>>>0}e!==void 0&&(e.exports=r)})),ug=fl(((t,e)=>{function r(i,n){for(var a=i.length,s=n^a,o=0,l;a>=4;)l=i.charCodeAt(o)&255|(i.charCodeAt(++o)&255)<<8|(i.charCodeAt(++o)&255)<<16|(i.charCodeAt(++o)&255)<<24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),l^=l>>>24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)^l,a-=4,++o;switch(a){case 3:s^=(i.charCodeAt(o+2)&255)<<16;case 2:s^=(i.charCodeAt(o+1)&255)<<8;case 1:s^=i.charCodeAt(o)&255,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)}return s^=s>>>13,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>15,s>>>0}e.exports=r})),Mo=h1(fl(((t,e)=>{var r=lg(),i=ug();e.exports=r,e.exports.murmur3=r,e.exports.murmur2=i}))(),1),Wf=class Zf{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,r,i,n){this.ids.push(Yh(e)),this.positions.push(r,i,n)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let r=Yh(e),i=0,n=this.ids.length-1;for(;i>1;this.ids[s]>=r?n=s:i=s+1}let a=[];for(;this.ids[i]===r;){let s=this.positions[3*i],o=this.positions[3*i+1],l=this.positions[3*i+2];a.push({index:s,start:o,end:l}),i++}return a}static serialize(e,r){let i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Bo(i,n,0,i.length-1),r&&r.push(i.buffer,n.buffer),{ids:i,positions:n}}static deserialize(e){let r=new Zf;return r.ids=e.ids,r.positions=e.positions,r.indexed=!0,r}};function Yh(t){let e=+t;return!isNaN(e)&&e<=2**53-1?e:(0,Mo.default)(String(t))}function Bo(t,e,r,i){for(;r>1],a=r-1,s=i+1;for(;;){do a++;while(t[a]n);if(a>=s)break;Yn(t,a,s),Yn(e,3*a,3*s),Yn(e,3*a+1,3*s+1),Yn(e,3*a+2,3*s+2)}s-r`u_${i}`),this.type=r}setUniform(t,e,r){t.set(r.constantOr(this.value))}getBinding(t,e,r){return this.type==="color"?new cg(t,e):new Ol(t,e)}},ur=class{constructor(t,e){this.uniformNames=e.map(r=>`u_${r}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr}setConstantDashPositions(t,e){this.dashTo=[0,t.y,t.height,t.width],this.dashFrom=[0,e.y,e.height,e.width]}setUniform(t,e,r,i){let n=null;i==="u_pattern_to"?n=this.patternTo:i==="u_pattern_from"?n=this.patternFrom:i==="u_dasharray_to"?n=this.dashTo:i==="u_dasharray_from"?n=this.dashFrom:i==="u_pixel_ratio_to"?n=this.pixelRatioTo:i==="u_pixel_ratio_from"&&(n=this.pixelRatioFrom),n!==null&&t.set(n)}getBinding(t,e,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new hg(t,e):new Ol(t,e)}},ke=class{constructor(t,e,r,i){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map(n=>({name:`a_${n}`,type:"Float32",components:r==="color"?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(t,e,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new st(0,r),e,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(i,t,n)}updatePaintArray(t,e,r,i,n){let a=this.expression.evaluate(new st(0,n),r,i);this._setPaintValue(t,e,a)}_setPaintValue(t,e,r){if(this.type==="color"){let i=Po(r);for(let n=t;n`u_${s}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=e.map(s=>({name:`a_${s}`,type:"Float32",components:r==="color"?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(t,e,r){let i=this.expression.evaluate(new st(this.zoom,r),e,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new st(this.zoom+1,r),e,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(a,t,i,n)}updatePaintArray(t,e,r,i,n){let a=this.expression.evaluate(new st(this.zoom,n),r,i),s=this.expression.evaluate(new st(this.zoom+1,n),r,i);this._setPaintValue(t,e,a,s)}_setPaintValue(t,e,r,i){if(this.type==="color"){let n=Po(r),a=Po(i);for(let s=t;s`#define HAS_UNIFORM_${i}`))}return t}getBinderAttributes(){let t=[];for(let e in this.binders){let r=this.binders[e];if(r instanceof ke||r instanceof he)for(let i of r.paintVertexAttributes)t.push(i.name);else if(r instanceof Ye){let i=r.getVertexAttributes();for(let n of i)t.push(n.name)}}return t}getBinderUniforms(){let t=[];for(let e in this.binders){let r=this.binders[e];if(r instanceof $i||r instanceof ur||r instanceof he)for(let i of r.uniformNames)t.push(i)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,e){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof $i||n instanceof ur||n instanceof he){for(let a of n.uniformNames)if(e[a]){let s=n.getBinding(t,e[a],a);r.push({name:a,property:i,binding:s})}}}return r}setUniforms(t,e,r,i){for(let{name:n,property:a,binding:s}of e)this.binders[a].setUniform(s,i,r.get(a),n)}updatePaintBuffers(t){this._buffers=[];for(let e in this.binders){let r=this.binders[e];if(t&&r instanceof Ye){let i=t.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;i&&this._buffers.push(i)}else(r instanceof ke||r instanceof he)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(t){for(let e in this.binders){let r=this.binders[e];(r instanceof ke||r instanceof he||r instanceof Ye)&&r.upload(t)}this.updatePaintBuffers()}destroy(){for(let t in this.binders){let e=this.binders[t];(e instanceof ke||e instanceof he||e instanceof Ye)&&e.destroy()}}},vr=class{constructor(t,e,r=()=>!0){this.programConfigurations={};for(let i of t)this.programConfigurations[i.id]=new Jf(i,e,r);this.needsUpload=!1,this._featureMap=new Wf,this._bufferOffset=0}populatePaintArrays(t,e,r,i){for(let n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e,i);e.id!==void 0&&this._featureMap.add(e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(t,this._featureMap,e,n,i)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(let e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(let t in this.programConfigurations)this.programConfigurations[t].destroy()}};function pg(t,e){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-dasharray":["dasharray_to","dasharray_from"],"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"]}[t]||[t.replace(`${e}-`,"").replace(/-/g,"_")]}function fg(t){return{"line-pattern":{source:Vr,composite:Vr},"fill-pattern":{source:Vr,composite:Vr},"fill-extrusion-pattern":{source:Vr,composite:Vr},"line-dasharray":{source:jh,composite:jh}}[t]}function Wh(t,e,r){var n;let i={color:{source:un,composite:To},number:{source:_a,composite:un}};return((n=fg(t))==null?void 0:n[r])||i[e][r]}C("ConstantBinder",$i),C("CrossFadedConstantBinder",ur),C("SourceExpressionBinder",ke),C("CrossFadedPatternBinder",Hf),C("CrossFadedDasharrayBinder",Kf),C("CompositeExpressionBinder",he),C("ProgramConfiguration",Jf,{omit:["_buffers"]}),C("ProgramConfigurationSet",vr);var zo=2**14-1,Zh=-zo-1;function Ar(t){let e=mt/t.extent,r=t.loadGeometry();for(let i of r)for(let n of i){let a=Math.round(n.x*e),s=Math.round(n.y*e);n.x=Ji(a,Zh,zo),n.y=Ji(s,Zh,zo),(an.x+1||sn.y+1)&&Bt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function hi(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Ar(t):[]}}var Hh=-32768;function dg(t,e,r,i,n){t.emplaceBack(Hh+e*8+i,Hh+r*8+n)}var Rl=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Hm,this.indexArray=new wn,this.segments=new ee,this.programConfigurations=new vr(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){let i=this.layers[0],n=[],a=null,s=!1,o=i.type==="heatmap";if(i.type==="circle"){let c=i;a=c.layout.get("circle-sort-key"),s=!a.isConstant(),o||(o=c.paint.get("circle-pitch-alignment")==="map")}let l=o?e.subdivisionGranularity.circle:1,u=new st(this.zoom),h=this.layers[0]._featureFilter.needGeometry;for(let{feature:c,id:p,index:f,sourceLayerIndex:d}of t){let y=hi(c,h);if(!this.layers[0]._featureFilter.filter(u,y,r))continue;let m=s?a.evaluate(y,{},r):void 0,g={id:p,properties:c.properties,type:c.type,sourceLayerIndex:d,index:f,geometry:h?y.geometry:Ar(c),patterns:{},sortKey:m};n.push(g)}s&&n.sort((c,p)=>c.sortKey-p.sortKey);for(let c of n){let{geometry:p,index:f,sourceLayerIndex:d}=c,y=t[f].feature;this.addFeature(c,p,f,r,l),e.featureIndex.insert(y,p,f,d,this.index)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}addFeatures(t){}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ag),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,r,i,n=1){let a;switch(n){case 1:a=[0,7];break;case 3:a=[0,2,5,7];break;case 5:a=[0,1,3,4,6,7];break;case 7:a=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${n}; valid values are 1, 3, 5, 7.`)}let s=a.length;for(let o of e)for(let l of o){let u=l.x,h=l.y;if(u<0||u>=8192||h<0||h>=8192)continue;let c=this.segments.prepareSegment(s*s,this.layoutVertexArray,this.indexArray,t.sortKey),p=c.vertexLength;for(let f=0;f=3){for(let n of i)if(oi(t,n))return!0}if(gg(t,i,r))return!0}return!1}function gg(t,e,r){if(t.length>1){if($l(t,e))return!0;for(let i of e)if(Lo(i,t,r))return!0}for(let i of t)if(Lo(i,e,r))return!0;return!1}function $l(t,e){if(t.length===0||e.length===0)return!1;for(let r=0;r1?t.distSqr(r):t.distSqr(r.sub(e)._mult(n)._add(e))}function Kh(t,e){let r=!1,i,n,a;for(let s of t){i=s;for(let o=0,l=i.length-1;oe.y!=a.y>e.y&&e.x<(a.x-n.x)*(e.y-n.y)/(a.y-n.y)+n.x&&(r=!r)}return r}function oi(t,e){let r=!1;for(let i=0,n=t.length-1;ie.y!=s.y>e.y&&e.x<(s.x-a.x)*(e.y-a.y)/(s.y-a.y)+a.x&&(r=!r)}return r}function vg(t,e,r,i,n){for(let s of t)if(e<=s.x&&r<=s.y&&i>=s.x&&n>=s.y)return!0;let a=[new B(e,r),new B(e,n),new B(i,n),new B(i,r)];if(t.length>2){for(let s of a)if(oi(t,s))return!0}for(let s=0;sn.x&&e.x>n.x||t.yn.y&&e.y>n.y)return!1;let a=Ke(t,e,r[0]);return a!==Ke(t,e,r[1])||a!==Ke(t,e,r[2])||a!==Ke(t,e,r[3])}function Wr(t,e,r){let i=e.paint.get(t).value;return i.kind==="constant"?i.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Ha(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ka(t,e,r,i,n){if(!e[0]&&!e[1])return t;let a=B.convert(e)._mult(n);r==="viewport"&&a._rotate(-i);let s=[];for(let o of t)s.push(o.sub(a));return s}function wg(t){let e=[];for(let r=0;rNl(n,e,r,i))}var kg,Tg=()=>kg||(kg=new Xt({"circle-sort-key":new N(w.layout_circle["circle-sort-key"],"circle-sort-key")})),Ig,Cg=()=>Ig||(Ig=new Xt({"circle-radius":new N(w.paint_circle["circle-radius"],"circle-radius"),"circle-color":new N(w.paint_circle["circle-color"],"circle-color"),"circle-blur":new N(w.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new N(w.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new V(w.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new V(w.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new V(w.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new V(w.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new N(w.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new N(w.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new N(w.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})),Mg={get paint(){return Cg()},get layout(){return Tg()}};var Bg=class extends de{constructor(t,e){super(t,Mg,e)}createBucket(t){return new Rl(t)}queryRadius(t){let e=t;return Wr("circle-radius",this,e)+Wr("circle-stroke-width",this,e)+Ha(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:s,getElevation:o}){let l=Ka(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),h=this.paint.get("circle-pitch-scale"),c=this.paint.get("circle-pitch-alignment"),p,f;return c==="map"?(p=l,f=u*a):(p=Fg(l,n,s,o),f=u),ed({queryGeometry:p,size:f,transform:n,unwrappedTileID:s,getElevation:o,pitchAlignment:c,pitchScale:h},i)}},rd=class extends Rl{};C("HeatmapBucket",rd,{omit:["layers"]});var Pg,zg=()=>Pg||(Pg=new Xt({"heatmap-radius":new N(w.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new N(w.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new V(w.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new Wa(w.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new V(w.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})),Lg={get paint(){return zg()}};function Ul(t,{width:e,height:r},i,n){if(!n)n=new Uint8Array(e*r*i);else if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==e*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${e*r*i}`);return t.width=e,t.height=r,t.data=n,t}function id(t,{width:e,height:r},i){if(e===t.width&&r===t.height)return;let n=Ul({},{width:e,height:r},i);ql(t,n,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,e),height:Math.min(t.height,r)},i),t.width=e,t.height=r,t.data=n.data}function ql(t,e,r,i,n,a){if(n.width===0||n.height===0)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw RangeError("out of range destination coordinates for image copy");let s=t.data,o=e.data;if(s===o)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l{e[t.evaluationKey]=l;let u=t.expression.evaluate(e);n.setPixel(s/4/r,o/4,u)};if(t.clips)for(let s=0,o=0;s$g||($g=new Xt({"hillshade-illumination-direction":new V(w.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new V(w.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new V(w.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new V(w.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new V(w.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new V(w.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new V(w.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new V(w.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new V(w.paint_hillshade.resampling,"resampling")})),Ug={get paint(){return Ng()}};var qg=class extends de{constructor(t,e){super(t,Ug,e),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,e=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,i=this.paint.get("hillshade-shadow-color").values,n=Math.max(t.length,e.length,r.length,i.length);t=t.concat(Array(n-t.length).fill(t.at(-1))),e=e.concat(Array(n-e.length).fill(e.at(-1))),r=r.concat(Array(n-r.length).fill(r.at(-1))),i=i.concat(Array(n-i.length).fill(i.at(-1)));let a=e.map(ch);return{directionRadians:t.map(ch),altitudeRadians:a,shadowColor:i,highlightColor:r}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}},jg,Gg=()=>jg||(jg=new Xt({"color-relief-opacity":new V(w["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new Wa(w["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new V(w["paint_color-relief"].resampling,"resampling")})),Xg={get paint(){return Gg()}};function Wn(t){return"data"in t}var Jh=class{constructor(t,e,r,i){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this._ownedHandle=this.texture,this.update(e,i)}update(t,e,r){var u;let{width:i,height:n}=t,a=(((u=this.size)==null?void 0:u[0])!==i||this.size[1]!==n)&&!r,{context:s}=this,{gl:o}=s;this.useMipmap=!!(e!=null&&e.useMipmap),a&&this.size&&this.format===o.RGBA&&(o.deleteTexture(this.texture),this.texture=o.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),o.bindTexture(o.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1);let l=this.format===o.RGBA&&(e==null?void 0:e.premultiply)!==!1;if(a)if(this.size=[i,n],this.format===o.RGBA&&i>0&&n>0){let h=this.useMipmap?Math.floor(Math.log2(Math.max(i,n)))+1:1;if(o.texStorage2D(o.TEXTURE_2D,h,o.RGBA8,i,n),Wn(t)){s.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:c}=t;l&&c&&(c=Ns(c)),c&&o.texSubImage2D(o.TEXTURE_2D,0,0,0,i,n,o.RGBA,o.UNSIGNED_BYTE,c)}else s.pixelStoreUnpackPremultiplyAlpha.set(l),o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,t)}else Wn(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(t,l,i,n,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._uploadDomImage(t,o));else{let{x:h,y:c}=r||{x:0,y:0};Wn(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(t,l,h,c,i,n,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._updateDomImage(t,h,c,o))}this.useMipmap&&!(Wn(t)&&t.data===null)&&o.generateMipmap(o.TEXTURE_2D),s.pixelStoreUnpackFlipY.setDefault(),s.pixelStoreUnpack.setDefault(),s.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(t,e){e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,e.UNSIGNED_BYTE,t)}_uploadRawData(t,e,r,i,n){let{data:a}=t;e&&a&&(a=Ns(a)),n.texImage2D(n.TEXTURE_2D,0,this.format,r,i,0,this.format,n.UNSIGNED_BYTE,a)}_updateDomImage(t,e,r,i){i.texSubImage2D(i.TEXTURE_2D,0,e,r,i.RGBA,i.UNSIGNED_BYTE,t)}_updateRawData(t,e,r,i,n,a,s){let{data:o}=t;e&&o&&(o=Ns(o)),s.texSubImage2D(s.TEXTURE_2D,0,r,i,n,a,s.RGBA,s.UNSIGNED_BYTE,o)}bind(t,e,r){let{context:i}=this,{gl:n}=i;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),n.bindTexture(n.TEXTURE_2D,this.texture),(r===n.LINEAR_MIPMAP_NEAREST||r===n.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(r=n.LINEAR);let a=r||t;t!==this.magFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),this.magFilter=t),a!==this.minFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,a),this.minFilter=a),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)}generateMipmap(){if(!this.useMipmap)return;let{gl:t}=this.context;t.bindTexture(t.TEXTURE_2D,this.texture),t.generateMipmap(t.TEXTURE_2D)}destroy(){let{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},Pe,jl=(Pe=class{constructor(e,r,i,n=1,a=1,s=1,o=0){if(this.uid=e,r.height!==r.width)throw RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i)){Bt(`"${i}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);return}this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),Pe.byteViewCache.set(this,new Uint8Array(this.data.buffer)),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=n,this.greenFactor=a,this.blueFactor=s,this.baseShift=o;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let h=-2;h=l)&&this.data.copyWithin(this._idx(0,h),c,c+l),this.data.fill(this.data[c],this._idx(-2,h),this._idx(0,h)),this.data.fill(this.data[c+l-1],this._idx(l,h),this._idx(l+1,h)+1)}let u=this._getByteView();this.min=2**53-1,this.max=-(2**53-1);for(let h=0;hthis.max&&(this.max=f),f=this.dim||n<-1||n>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);let a=this._getByteView(),s=((n+2)*this.stride+i+2)*4,o=this.stride*4,l=e-i,u=r-n,h=this._unpackAtIndex(a,s),c=this._unpackAtIndex(a,s+4),p=this._unpackAtIndex(a,s+o),f=this._unpackAtIndex(a,s+o+4);return h*(1-l)*(1-u)+c*l*(1-u)+p*(1-l)*u+f*l*u}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,r){if(e<-2||e>=this.dim+2||r<-2||r>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);return(r+2)*this.stride+(e+2)}unpack(e,r,i){return e*this.redFactor+r*this.greenFactor+i*this.blueFactor-this.baseShift}pack(e){return sd(e,this.getUnpackVector())}getPixels(){return new Zt({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(e,r,i){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let n=r*this.dim,a=r*this.dim+this.dim,s=i*this.dim,o=i*this.dim+this.dim;switch(r){case-1:n=a-2;break;case 1:a=n+2}switch(i){case-1:s=o-2;break;case 1:o=s+2}let l=-r*this.dim,u=-i*this.dim;for(let h=s;h80*r){o=t[0],l=t[1];let h=o,c=l;for(let p=r;ph&&(h=f),d>c&&(c=d)}u=Math.max(h-o,c-l),u=u===0?0:32767/u}return Ro(a,s,o,l,u),s}function od(t,e,r,i,n){let a=null;if(n===fx(t,e,r,i)>0)for(let s=e;s=e;s-=i)a=ec(s/i|0,t[s],t[s+1],a);return a&&cn(a,a.next)&&(fn(a),a=a.next),a}function br(t,e=t){let r=e===t,i=t,n;do n=!1,i!==i.next&&(hn.size===0||!hn.has(i))&&(cn(i,i.next)||Ft(i.prev,i,i.next)===0)?((r||i===e)&&(e=i.prev),Oo=!0,fn(i),i=i.prev,n=!0):(r||i!==e)&&(i=i.next,n=!r);while(n||i!==e);return e}function Ro(t,e,r,i,n){n&&ox(t,r,i,n);let a=t,s=!1;for(;t.prev!==t.next;){let o=t.prev,l=t.next;if(Ft(o,t,l)<0&&(n?Kg(t,r,i,n):Hg(t))){e.push(o.i,t.i,l.i),fn(t),t=l,a=l;continue}if(t=l,t===a){if(Oo=!1,t=br(t),Oo){a=t;continue}if(!s){t=Jg(t,e),a=t,s=!0;continue}Qg(t,e,r,i,n);break}}}function Hg(t){let e=t.prev,r=t,i=t.next,n=e.x,a=r.x,s=i.x,o=e.y,l=r.y,u=i.y,h=Math.min(n,a,s),c=Math.min(o,l,u),p=Math.max(n,a,s),f=Math.max(o,l,u),d=i.next;for(;d!==e;){if(d.x>=h&&d.x<=p&&d.y>=c&&d.y<=f&&(n!==d.x||o!==d.y)&&Ea(n,o,a,l,s,u,d.x,d.y)&&Ft(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function Kg(t,e,r,i){let n=t.prev,a=t,s=t.next,o=n.x,l=a.x,u=s.x,h=n.y,c=a.y,p=s.y,f=Math.min(o,l,u),d=Math.min(h,c,p),y=Math.max(o,l,u),m=Math.max(h,c,p),g=qo(f,d,e,r,i),x=qo(y,m,e,r,i),v=t.prevZ;for(;v&&v.z>=g;){if(v.x>=f&&v.x<=y&&v.y>=d&&v.y<=m&&v!==s&&(o!==v.x||h!==v.y)&&Ea(o,h,l,c,u,p,v.x,v.y)&&Ft(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let b=t.nextZ;for(;b&&b.z<=x;){if(b.x>=f&&b.x<=y&&b.y>=d&&b.y<=m&&b!==s&&(o!==b.x||h!==b.y)&&Ea(o,h,l,c,u,p,b.x,b.y)&&Ft(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Jg(t,e){let r=t,i=!1;do{let n=r.prev,a=r.next.next;ud(n,r,r.next,a,!1)&&pn(n,a)&&pn(a,n)&&(e.push(n.i,r.i,a.i),fn(r),fn(r.next),r=t=a,i=!0),r=r.next}while(r!==t);return i?br(r):r}function Qg(t,e,r,i,n){let a=t;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&hx(a,s)){let o=hd(a,s);a=br(a,a.next),o=br(o,o.next),Ro(a,e,r,i,n),Ro(o,e,r,i,n);return}s=s.next}a=a.next}while(a!==t)}var $o=!1;function tx(t,e,r,i){let n=[];for(let a=0,s=e.length;as&&(s=r.x),r.yo&&(o=r.y),h.xs&&(s=h.x),h.yo&&(o=h.y),r=h}while(++l<16&&r!==e);Uo[i]=r;let u=i*4;wt[u]=n,wt[u+1]=a,wt[u+2]=s,wt[u+3]=o}while(r!==e)}function nx(t,e){let r=t.z*4;e.xwt[r+2]&&(wt[r+2]=e.x),e.y>wt[r+3]&&(wt[r+3]=e.y)}function Qh(t){let e=Uo[t];for(;e.prev.next!==e;)e=e.next;return Uo[t]=e,e}function tc(t){let e=No[t];for(;e.prev.next!==e;)e=e.next;return No[t]=e,e}function ax(t,e){let r=e,i=t.x,n=t.y,a=-1/0,s;if(cn(t,r))return r;for(let p=0,f=0;pwt[f+3]||wt[f]>i||wt[f+2]<=a)continue;let d=Qh(p);r=tc(p);do{if(r.prev.next===r){if(cn(t,r.next))return r.next;if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){let y=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(y<=i&&y>a&&(a=y,s=r.xi||wt[f+3]h)continue;let d=Qh(p);r=tc(p);do{if(r.prev.next===r&&i>=r.x&&r.x>=o&&i!==r.x&&Ea(ni)&&(ys.x||r.x===s.x&&sx(s,r)))&&(s=r,c=y)}r=r.next}while(r!==d)}return s}function sx(t,e){return Ft(t.prev,t,e.prev)<0&&Ft(e.next,t,t.next)<0}var ae=[],Ti=[],or=new Uint32Array,Ii=new Uint32Array,Ci=new Uint32Array(256);function ox(t,e,r,i){let n=t,a=0;do n.z=qo(n.x,n.y,e,r,i),ae[a++]=n,n=n.next;while(n!==t);lx(a);let s=null;for(let o=0;o=0&&ae[n].z>i;)ae[n+1]=ae[n],n--;ae[n+1]=r}return}or.length>>a&255]++;let s=0;for(let o=0;o<256;o++){let l=Ci[o];Ci[o]=s,s+=l}for(let o=0;o>>a&255]++;i[u]=e[o],n[u]=l}}function qo(t,e,r,i,n){return t=(t-r)*n|0,e=(e-i)*n|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function ux(t){let e=t,r=t;do(e.x=(t-s)*(a-o)&&(t-s)*(i-o)>=(r-s)*(e-o)&&(r-s)*(a-o)>=(n-s)*(i-o)}function hx(t,e){let r=cn(t,e)&&Ft(t.prev,t,t.next)>0&&Ft(e.prev,e,e.next)>0;return t.next.i!==e.i&&(r||pn(t,e)&&pn(e,t)&&(Ft(t.prev,t,e.prev)!==0||Ft(t,e.prev,e)!==0))&&!cx(t,e)&&(r||px(t,e))}function Ft(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function cn(t,e){return t.x===e.x&&t.y===e.y}function ud(t,e,r,i,n=!0){let a=Ft(t,e,r),s=Ft(t,e,i),o=Ft(r,i,t),l=Ft(r,i,e);return(a>0&&s<0||a<0&&s>0)&&(o>0&&l<0||o<0&&l>0)?!0:n?!!(a===0&&Hn(t,r,e)||s===0&&Hn(t,i,e)||o===0&&Hn(r,t,i)||l===0&&Hn(r,e,i)):!1}function Hn(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function cx(t,e){let r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.y,e.y),s=t;do{let o=s.next;if(s.x>i&&o.x>i||s.xa&&o.y>a||s.y=0&&Ft(t,t.prev,e)>=0:Ft(t,e,t.prev)<0||Ft(t,t.next,e)<0}function px(t,e){let r=t,i=!1,n=(t.x+e.x)/2,a=(t.y+e.y)/2;do{let s=r.next;r.y>a!=s.y>a&&n<(s.x-r.x)*(a-r.y)/(s.y-r.y)+r.x&&(i=!i),r=s}while(r!==t);return i}function hd(t,e){let r=jo(t.i,t.x,t.y),i=jo(e.i,e.x,e.y),n=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function ec(t,e,r,i){let n=jo(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function fn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),$o&&nx(t.prev,t.next)}function jo(t,e,r){return{i:t,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function fx(t,e,r,i){let n=0;for(let a=e,s=r-i;at)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=e}getGranularityForZoomLevel(t){let e=1<32767||e>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=Math.round(t)|0,i=Math.round(e)|0,n=this._getKey(r,i);if(this._vertexDictionary.has(n))return this._vertexDictionary.get(n);let a=this._vertexBuffer.length/2;return this._vertexDictionary.set(n,a),this._vertexBuffer.push(r,i),a}_subdivideTrianglesScanline(t){if(this._granularity<2)return gx(this._vertexBuffer,t);let e=[],r=t.length;for(let i=0;i=1||b<=0)||m&&(ln)){h>=i&&h<=n&&a.push(r[(s+1)%3]);continue}if(!m&&v>0){let _=o+f*v,S=l+d*v;a.push(this._vertexToIndex(_,S))}let D=o+f*Math.max(v,0),A=o+f*Math.min(b,1);if(y||this._generateIntraEdgeVertices(a,o,l,u,h,D,A),!m&&b<1){let _=o+f*b,S=l+d*b;a.push(this._vertexToIndex(_,S))}(m||h>=i&&h<=n)&&a.push(r[(s+1)%3]),!m&&(h<=i||h>=n)&&this._generateInterEdgeVertices(a,o,l,u,h,c,p,A,i,n)}return a}_generateIntraEdgeVertices(t,e,r,i,n,a,s){let o=i-e,l=n-r,u=l===0,h=u?Math.min(e,i):Math.min(a,s),c=u?Math.max(e,i):Math.max(a,s),p=Math.floor(h/this._granularityCellSize)+1,f=Math.ceil(c/this._granularityCellSize)-1;if(u?e=p;d--){let y=d*this._granularityCellSize,m=r+l*(y-e)/o;t.push(this._vertexToIndex(y,m))}}_generateInterEdgeVertices(t,e,r,i,n,a,s,o,l,u){let h=n-r,c=a-i,p=s-n,f=(l-n)/p,d=(u-n)/p,y=Math.min(f,d),m=Math.max(f,d),g=i+c*y,x=Math.floor(Math.min(g,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(g,o)/this._granularityCellSize)-1,b=o=1||m<=0){let _=e-a,S=r-s,k=(l-s)/S,z=(u-s)/S,O=a+_*Math.min(k,z);x=Math.floor(Math.min(O,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(O,o)/this._granularityCellSize)-1,b=o0?u:l;if(b)for(let _=x;_<=v;_++){let S=_*this._granularityCellSize;t.push(this._vertexToIndex(S,A))}else for(let _=v;_>=x;_--){let S=_*this._granularityCellSize;t.push(this._vertexToIndex(S,A))}}_generateOutline(t){let e=[];for(let r of t){let i=cr(r,this._granularity,!0),n=this._pointArrayToIndices(i),a=[];for(let s=1;sn==(a===-32768)?(t.push(r),t.push(e),t.push(this._vertexToIndex(i,a)),t.push(this._vertexToIndex(n,a)),t.push(r),t.push(this._vertexToIndex(i,a))):(t.push(e),t.push(r),t.push(this._vertexToIndex(i,a)),t.push(r),t.push(this._vertexToIndex(n,a)),t.push(this._vertexToIndex(i,a)))}_fillPoles(t,e,r){let i=this._vertexBuffer,n=mt,a=t.length;for(let s=2;s=2&&((s=this._canonical)==null?void 0:s.z)===0&&(n=this._removeTrianglesOutsideTileX(n),a=a.map(o=>this._removeLinesOutsideTileX(o))),{verticesFlattened:this._vertexBuffer,indicesTriangles:n,indicesLineList:a}}_vertexOutsideTileX(t){let e=this._vertexBuffer[t*2];return e<0||e>8192}_removeTrianglesOutsideTileX(t){let e=[];for(let r=0;r0?(Math.floor(_/s)+1)*s:(Math.ceil(_/s)-1)*s,O=b>0?(Math.floor(S/s)+1)*s:(Math.ceil(S/s)-1)*s,P=Math.abs(_-z),L=Math.abs(S-O),F=Math.abs(_-y),$=Math.abs(S-m),U=g?P/D:1/0,T=x?L/A:1/0;if((F<=P||!g)&&($<=L||!x))break;if(U0?(r.push(n),r.push(s),r.push(a)):(r.push(n),r.push(a),r.push(s))}return r}function xx(t,e,r){if(e.length===0)throw Error("Subdivision vertex ring is empty.");let i=0,n=t[e[0]*2];for(let l=1;l=0?s-1:a-1,u=(o+1)%a,h=t[e[l]*2],c=t[e[l]*2+1],p=t[e[u]*2],f=t[e[u]*2+1],d=t[e[s]*2],y=t[e[s]*2+1],m=t[e[o]*2],g=t[e[o]*2+1],x=!1;if(hp)x=!1;else{let v=g-y,b=-(m-d),D=y((p-d)*v+(f-y)*b)*D&&(x=!0)}if(x){let v=e[l],b=e[s],D=e[o];v!==b&&v!==D&&b!==D&&r.push(D,b,v),s--,s<0&&(s=a-1)}else{let v=e[u],b=e[s],D=e[o];v!==b&&v!==D&&b!==D&&r.push(D,b,v),o++,o>=a&&(o=0)}if(l===u)break}}function pd(t,e,r,i,n,a,s,o,l){let u=n.length/2,h=s&&o&&l;if(uee.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,g=!0,h=0);let v=Zi(s,i,a,o,p,y,u),b=Zi(s,i,a,o,f,m,u),D=Zi(s,i,a,o,d,g,u);r.emplaceBack(h+v-l,h+b-l,h+D-l),u.primitiveLength++}}function bx(t,e,r,i,n,a){let s=[];for(let c=0;cee.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,h=0);let x=Zi(s,i,a,o,f,y,u),v=Zi(s,i,a,o,d,m,u);r.emplaceBack(h+x-l,h+v-l),u.primitiveLength++}}var fd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new Km,this.indexArray=new wn,this.indexArray2=new Io,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.segments2=new ee,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.hasDependencies=Aa("fill",this.layers,e);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[],s=new st(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!this.layers[0]._featureFilter.filter(s,p,r))continue;let f=n?i.evaluate(p,{},r,e.availableImages):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?p.geometry:Ar(l),patterns:{},sortKey:f};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:h,sourceLayerIndex:c}=l;if(this.hasDependencies){let f=Gl("fill",this.layers,l,{zoom:this.zoom},e);this.patternFeatures.push(f)}else this.addFeature(l,u,h,r,{},e.subdivisionGranularity);let p=t[h].feature;e.featureIndex.insert(p,u,h,c,this.index)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}addFeatures({options:t,canonical:e,patternPositions:r,patternMap:i}){this.detectSdfPatterns(i);for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,t.subdivisionGranularity)}detectSdfPatterns(t){for(let e of this.patternFeatures)for(let r in e.patterns){let i=e.patterns[r];this.recordSdfPattern(r,t[i.min]),this.recordSdfPattern(r,t[i.mid]),this.recordSdfPattern(r,t[i.max])}for(let e of this.layers){let r=e.paint.get("fill-pattern").constantOr(null);r&&(this.recordSdfPattern(e.id,t[r.from.toString()]),this.recordSdfPattern(e.id,t[r.to.toString()]))}}recordSdfPattern(t,e){if(!e)return;let r=e.sdf===!0,i=this.sdfPatterns[t];i===void 0?this.sdfPatterns[t]=r:i!==r&&Bt(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${t}"`)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Wg),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),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(t,e,r,i,n,a){for(let s of Ra(e,500)){let o=cd(s,i,a.fill.getGranularityForZoomLevel(i.z)),l=this.layoutVertexArray;pd((u,h)=>{l.emplaceBack(u,h)},this.segments,this.layoutVertexArray,this.indexArray,o.verticesFlattened,o.indicesTriangles,this.segments2,this.indexArray2,o.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,canonical:i})}};C("FillBucket",fd,{omit:["layers","patternFeatures"]});var wx,Dx=()=>wx||(wx=new Xt({"fill-sort-key":new N(w.layout_fill["fill-sort-key"],"fill-sort-key")})),_x,Ax=()=>_x||(_x=new Xt({"fill-antialias":new V(w.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new N(w.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new V(w.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new N(w.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new N(w.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new V(w.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new V(w.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new on(w.paint_fill["fill-pattern"],"fill-pattern")})),Sx={get paint(){return Ax()},get layout(){return Dx()}};var Ex=class extends de{constructor(t,e){super(t,Sx,e)}recalculate(t,e){super.recalculate(t,e);let r=this.paint._values["fill-outline-color"];r.value.kind==="constant"&&r.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new fd(t)}queryRadius(){return Ha(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:e,transform:r,pixelsToTileUnits:i}){return Qf(Ka(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),e)}isTileClipped(){return!0}},Go=At([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Fx=At([{name:"a_centroid",components:2,type:"Int16"}],4),kx=Go.members;Go.size,Go.alignment;var Fa=class Xo{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(e){return this.minX=Math.min(this.minX,e.x),this.minY=Math.min(this.minY,e.y),this.maxX=Math.max(this.maxX,e.x),this.maxY=Math.max(this.maxY,e.y),this}expandBy(e){return this.minX-=e,this.minY-=e,this.maxX+=e,this.maxY+=e,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(e){let r=new Xo;return r.extend(e(new B(this.minX,this.minY))),r.extend(e(new B(this.maxX,this.minY))),r.extend(e(new B(this.minX,this.maxY))),r.extend(e(new B(this.maxX,this.maxY))),r}static fromPoints(e){let r=new Xo;for(let i of e)r.extend(i);return r}contains(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(e){return!this.empty()&&!e.empty()&&e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY}intersects(e){return!this.empty()&&!e.empty()&&e.minX<=this.maxX&&e.maxX>=this.minX&&e.minY<=this.maxY&&e.maxY>=this.minY}},g5=Fa.fromPoints([new B(0,0),new B(mt,mt)]);function Yo(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function rc(t){return t.every(e=>e.x<0)||t.every(e=>e.x>8192)||t.every(e=>e.y<0)||t.every(e=>e.y>8192)}var Dn=class{constructor(t,e,r,i,n){for(this.properties=Object.create(null),this.extent=r,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n;t.pos>3,a===0)continue}if(a--,n===1)s+=t.readSVarint(),o+=t.readSVarint(),i&&r.push(i),i=[new B(s,o)];else if(n===2)s+=t.readSVarint(),o+=t.readSVarint(),i&&i.push(new B(s,o));else if(n===7)i&&i.push(i[0].clone());else throw Error(`unknown command ${n}`)}return i&&r.push(i),r}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let t=this._pbf;t.pos=this._geometry;let e=t.readVarint()+t.pos,r=1,i=0,n=0,a=0,s=1/0,o=-1/0,l=1/0,u=-1/0;for(;t.pos>3,i===0)continue}if(i--,r===1||r===2)n+=t.readSVarint(),a+=t.readSVarint(),no&&(o=n),au&&(u=a);else if(r!==7)throw Error(`unknown command ${r}`)}return[s,l,o,u]}toGeoJSON(t,e,r){let i=this.extent*2**r,n=this.extent*t,a=this.extent*e,s=this.loadGeometry();function o(c){return[(c.x+n)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(c.y+a)*2/i)*Math.PI))-90]}function l(c){return c.map(o)}let u;if(this.type===1){let c=[];for(let f of s)c.push(f[0]);let p=l(c);u=c.length===1?{type:"Point",coordinates:p[0]}:{type:"MultiPoint",coordinates:p}}else if(this.type===2){let c=s.map(l);u=c.length===1?{type:"LineString",coordinates:c[0]}:{type:"MultiLineString",coordinates:c}}else if(this.type===3){let c=dd(s),p=[];for(let f of c)p.push(f.map(l));u=p.length===1?{type:"Polygon",coordinates:p[0]}:{type:"MultiPolygon",coordinates:p}}else throw Error("unknown feature type");let h={type:"Feature",geometry:u,properties:this.properties};return this.id!=null&&(h.id=this.id),h}};Dn.types=["Unknown","Point","LineString","Polygon"];function dd(t){let e=t.length;if(e<=1)return[t];let r=[],i,n;for(let a=0;a=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[t];let e=this._pbf.readVarint()+this._pbf.pos;return new Dn(this._pbf,e,this.extent,this._keys,this._values)}};function Cx(t){let e=null,r=t.readVarint()+t.pos;for(;t.pos90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Ui(F1(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let r=Math.PI/180,i=this.lat*r,n=e.lat*r,a=Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos((e.lng-this.lng)*r);return yd*Math.acos(Math.min(a,1))}static convert(e){if(e instanceof Ui)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new Ui(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e)return new Ui(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}},md=2*Math.PI*yd;function gd(t){return md*Math.cos(t*Math.PI/180)}function Mx(t){return(180+t)/360}function Bx(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Px(t,e){return t/gd(e)}function zx(t){return t*360-180}function Wo(t){let e=180-t*360;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function Lx(t,e){return t*gd(Wo(e))}function Vx(t){return 1/Math.cos(t*Math.PI/180)}var Yl=class xd{constructor(e,r,i=0){this.x=+e,this.y=+r,this.z=+i}static fromLngLat(e,r=0){let i=ic.convert(e);return new xd(Mx(i.lng),Bx(i.lat),Px(r,i.lat))}toLngLat(){return new ic(zx(this.x),Wo(this.y))}toAltitude(){return Lx(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/md*Vx(Wo(this.y))}};function Ox(t,e,r){let i=1/(1<Nx(n,i))}function $x(t,e){let r=Rx(mt/2,mt/2,e),i=Yl.fromLngLat(r).meterInMercatorCoordinateUnits(),n=(1<1&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y;)e.pop();return e}function qx(t,e,r,i,n){let a=e.sub(r),s=i.sub(r),o=a.mag(),l=s.mag();if(o<1e-6||l<1e-6){t.push(r.clone());return}a._div(o),s._div(l);let u=a.x*s.x+a.y*s.y;if(Math.abs(u)>Math.cos(5*Math.PI/180)){t.push(r.clone());return}let h=.2,c=Math.min(n,o*h,l*h),p=r.add(a.mult(c)),f=r.add(s.mult(c)),d=Math.sqrt((1+u)/2),y=r.add(a.add(s)._unit()._mult(c/d)),m=p.sub(y).angleWith(f.sub(y)),g=Math.max(2,Math.ceil(Math.abs(m)/(Math.PI/6)-1e-6));for(let x=0;x<=g;x++)t.push(p.rotateAround(x/g*m,y))}var js=8192;function Mi(t,e,r,i,n,a,s,o){t.emplaceBack(e,r,Math.floor(i*js)*2+s,n*js*2,a*js*2,Math.round(o))}var vd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Jm,this.centroidVertexArray=new Zm,this.indexArray=new wn,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.features=[],this.hasDependencies=Aa("fill-extrusion",this.layers,e);let i=new st(this.zoom),n=this.layers[0],a=n.layout.get("fill-extrusion-rounded-corner-distance"),s=n._featureFilter.needGeometry;for(let{feature:o,id:l,index:u,sourceLayerIndex:h}of t){let c=hi(o,s);if(!n._featureFilter.filter(i,c,r))continue;let p=s?c.geometry:Ar(o),f={id:l,sourceLayerIndex:h,index:u,geometry:a>0?nc(p,a,r):p,properties:o.properties,type:o.type,patterns:{}};this.hasDependencies?this.features.push(Gl("fill-extrusion",this.layers,f,{zoom:this.zoom},e)):this.addFeature(f,f.geometry,u,r,{},e.subdivisionGranularity),e.featureIndex.insert(o,f.geometry,u,h,this.index,!0)}}addFeatures({options:t,canonical:e,patternPositions:r}){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,e,r,t.subdivisionGranularity)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,kx),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Fx.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,e,r,i,n,a){let s=this.layers[0],o=s.layout?s.layout.get("fill-extrusion-rounded-corner-distance"):0,l=o>0?nc(e,o,i):e;for(let u of Ra(l,500)){let h={x:0,y:0,sampleCount:0},c=this.layoutVertexArray.length;this.processPolygon(h,i,t,u,a);let p=this.layoutVertexArray.length-c,f=Math.floor(h.x/h.sampleCount),d=Math.floor(h.y/h.sampleCount);for(let y=0;y{Mi(u,h,c,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(t,e){let r=0;for(let i=1;iee.MAX_VERTEX_ARRAY_LENGTH&&(e.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let s=n.sub(a)._perp()._unit(),o=a.dist(n);r+o>32768&&(r=0),Mi(this.layoutVertexArray,n.x,n.y,s.x,s.y,0,0,r),Mi(this.layoutVertexArray,n.x,n.y,s.x,s.y,0,1,r),r+=o,Mi(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,0,r),Mi(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,1,r);let l=e.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),e.segment.vertexLength+=4,e.segment.primitiveLength+=2}}};function jx(t,e){for(let r=0;rGx||(Gx=new Xt({"fill-extrusion-rounded-corner-distance":new V(w["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})),Yx,Wx=()=>Yx||(Yx=new Xt({"fill-extrusion-opacity":new V(w["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new N(w["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new V(w["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new V(w["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new on(w["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new N(w["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new N(w["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new V(w["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})),Zx={get paint(){return Wx()},get layout(){return Xx()}};var Hx=class extends de{constructor(t,e){super(t,Zx,e)}createBucket(t){return new vd(t)}queryRadius(){return Ha(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,pixelPosMatrix:s}){let o=Ka(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(e,r),u=this.paint.get("fill-extrusion-base").evaluate(e,r),h=Qx(o,s,0),c=Jx(i,u,l,s),p=c[0],f=c[1];return Kx(p,f,h)}};function Bi(t,e){return t.x*e.x+t.y*e.y}function ac(t,e){if(t.length===1){let r=0,i=e[r++],n;for(;!n||i.equals(n);)if(n=e[r++],!n)return 1/0;for(;r>1),s=r-e,o,l=t[e],u=t[e+1],h=t[r],c=t[r+1];for(let p=e+3;pn){o=p,n=f;continue}if(f===n){let d=Math.abs(p-a);di&&(o-e>3&&Zo(t,e,o,i),t[o+2]=n,r-o>3&&Zo(t,o,r,i))}function t2(t,e,r,i,n,a){let s=n-r,o=a-i;if(s!==0||o!==0){let l=((t-r)*s+(e-i)*o)/(s*s+o*o);l>1?(r=n,i=a):l>0&&(r+=s*l,i+=o*l)}return s=t-r,o=e-i,s*s+o*o}function Mt(t,e,r,i){let n={type:e,geom:r},a={id:t!=null?t:null,type:n.type,geometry:n.geom,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(n.type){case"Point":case"MultiPoint":Pi(a,n.geom);break;case"LineString":Pi(a,n.geom.points);break;case"Polygon":Pi(a,n.geom[0].points);break;case"MultiLineString":for(let s of n.geom)Pi(a,s.points);break;case"MultiPolygon":for(let s of n.geom)Pi(a,s[0].points)}return a}function Wl(t){let e=t;t.points.length>64&&(e.points=new Float64Array(t.points))}function Pi(t,e){for(let r=0;r1024)throw Error("GeometryCollection nesting exceeds supported depth: 1024");if(e.geometry.type==="GeometryCollection"){r2(t,e,e.geometry,r,i,n+1);return}if(!((o=e.geometry.coordinates)!=null&&o.length))return;let a=e2(e,r,i),s=(r.tolerance/((1<0&&(s+=i?(n*h-u*a)/2:Math.sqrt((u-n)**2+(h-a)**2)),n=u,a=h}let o=e.points.length-3;e.points[2]=1,r>0&&Zo(e.points,0,o,r),e.points[o+2]=1,Wl(e),e.size=Math.abs(s),e.start=0,e.end=e.size}function Kl(t,e,r,i){for(let n=0;n1?1:r}function u2(t){return{type:"FeatureCollection",features:t.map(e=>ka(e))}}function ka(t){let e={type:"Feature",geometry:h2(t),properties:t.tags};return t.id!=null&&(e.id=t.id),e}function h2(t){let{type:e,geometry:r}=t;switch(e){case"Point":return{type:e,coordinates:bd(r[0],r[1])};case"MultiPoint":return{type:e,coordinates:Kn(r)};case"LineString":return{type:e,coordinates:Kn(r.points)};case"MultiLineString":case"Polygon":return{type:e,coordinates:r.map(i=>Kn(i.points))};case"MultiPolygon":return{type:e,coordinates:r.map(i=>i.map(n=>Kn(n.points)))}}}function Kn(t){let e=[];for(let r=0;r=r&&s=i)return null;let l=[];for(let u of t){let h=n===0?u.minX:u.minY,c=n===0?u.maxX:u.maxY;if(h>=r&&c=i))switch(u.type){case"Point":case"MultiPoint":c2(u,l,r,i,n);continue;case"LineString":p2(u,l,r,i,n,o);continue;case"MultiLineString":f2(u,l,r,i,n);continue;case"Polygon":d2(u,l,r,i,n);continue;case"MultiPolygon":y2(u,l,r,i,n);continue}}return l.length?l:null}function c2(t,e,r,i,n){let a=[];if(m2(t.geometry,a,r,i,n),!a.length)return;let s=a.length===3?"Point":"MultiPoint";e.push(Mt(t.id,s,a,t.tags))}function p2(t,e,r,i,n,a){let s=[];if(_d(t.geometry,s,r,i,n,!1,a.lineMetrics),s.length){if(a.lineMetrics){for(let o of s)e.push(Mt(t.id,"LineString",o,t.tags));return}if(s.length>1){e.push(Mt(t.id,"MultiLineString",s,t.tags));return}e.push(Mt(t.id,"LineString",s[0],t.tags))}}function f2(t,e,r,i,n){let a=[];if(Jl(t.geometry,a,r,i,n,!1),a.length){if(a.length===1){e.push(Mt(t.id,"LineString",a[0],t.tags));return}e.push(Mt(t.id,"MultiLineString",a,t.tags))}}function d2(t,e,r,i,n){let a=[];Jl(t.geometry,a,r,i,n,!0),a.length&&e.push(Mt(t.id,"Polygon",a,t.tags))}function y2(t,e,r,i,n){let a=[];for(let s of t.geometry){let o=[];Jl(s,o,r,i,n,!0),o.length&&a.push(o)}a.length&&e.push(Mt(t.id,"MultiPolygon",a,t.tags))}function m2(t,e,r,i,n){for(let a=0;a=r&&s<=i&&Kr(e,t[a],t[a+1],t[a+2])}}function _d(t,e,r,i,n,a,s){let o=sc(t),l=n===0?g2:x2,u=t.start,h,c;for(let g=0;gr&&(c=l(o,x,v,D,A,r),s&&(o.start=u+h*c)):_>i?S=r&&(c=l(o,x,v,D,A,r),k=!0),S>i&&_<=i&&(c=l(o,x,v,D,A,i),k=!0),!a&&k&&(s&&(o.end=u+h*c),e.push(o),o=sc(t)),s&&(u+=h)}let p=t.points.length-3,f=t.points[p],d=t.points[p+1],y=t.points[p+2],m=n===0?f:d;m>=r&&m<=i&&Kr(o.points,f,d,y),p=o.points.length-3,a&&p>=3&&(o.points[p]!==o.points[0]||o.points[p+1]!==o.points[1])&&Kr(o.points,o.points[0],o.points[1],o.points[2]),o.points.length&&(Wl(o),e.push(o))}function sc(t){return{points:[],size:t.size,start:t.start,end:t.end}}function Jl(t,e,r,i,n,a){for(let s of t)_d(s,e,r,i,n,a,!1)}function Kr(t,e,r,i){t.push(e,r,i)}function g2(t,e,r,i,n,a){let s=(a-e)/(i-e);return Kr(t.points,a,r+(n-r)*s,1),s}function x2(t,e,r,i,n,a){let s=(a-r)/(n-r);return Kr(t.points,e+(i-e)*s,a,1),s}function Ql(t,e){let r=e.buffer/e.extent,i=t,n=Te(t,1,-1-r,r,0,-1,2,e),a=Te(t,1,1-r,2+r,0,-1,2,e);return!n&&!a||(i=Te(t,1,-r,1+r,0,-1,2,e)||[],n&&(i=oc(n,1).concat(i)),a&&(i=i.concat(oc(a,-1)))),i}function oc(t,e){let r=[];for(let i of t)switch(i.type){case"Point":case"MultiPoint":{let n=v2(i.geometry,e);r.push(Mt(i.id,i.type,n,i.tags));continue}case"LineString":{let n=Gs(i.geometry,e);r.push(Mt(i.id,i.type,n,i.tags));continue}case"MultiLineString":case"Polygon":{let n=[];for(let a of i.geometry)n.push(Gs(a,e));r.push(Mt(i.id,i.type,n,i.tags));continue}case"MultiPolygon":{let n=[];for(let a of i.geometry){let s=[];for(let o of a)s.push(Gs(o,e));n.push(s)}r.push(Mt(i.id,i.type,n,i.tags));continue}}return r}function v2(t,e){let r=[];for(let i=0;io.id));t=t.filter(o=>!s.has(o.id))}if(i.add.size){let s=Zl({type:"FeatureCollection",features:Array.from(i.add.values())},r);s=Ql(s,r),n=n.concat(s),t=t.concat(s)}}if(i.update.size){let a=new Map,s=[];for(let o of t)i.update.has(o.id)?a.set(o.id,[...a.get(o.id)||[],o]):s.push(o);for(let[o,l]of i.update){let u=a.get(o);if(!u||u.length===0)continue;let h=w2(u,l,r);n=n.concat(u,h),s=s.concat(h)}t=s}return{affected:n,source:t}}function w2(t,e,r){var a,s;let i=!!e.newGeometry,n=e.removeAllProperties||((a=e.removeProperties)==null?void 0:a.length)>0||((s=e.addOrUpdateProperties)==null?void 0:s.length)>0;if(i){let o=t[0],l=Zl({type:"FeatureCollection",features:[{type:"Feature",id:o.id,geometry:e.newGeometry,properties:n?lc(o.tags,e):o.tags}]},r);return l=Ql(l,r),l}if(n){let o=[];for(let l of t){let u=je({},l);u.tags=lc(u.tags,e),o.push(u)}return o}return t}function lc(t,e){if(e.removeAllProperties)return{};let r=je({},t||{});if(e.removeProperties)for(let i of e.removeProperties)delete r[i];if(e.addOrUpdateProperties)for(let{key:i,value:n}of e.addOrUpdateProperties)r[i]=n;return r}function D2(t,e){var r,i;return t?{removeAll:t.removeAll,remove:new Set(t.remove||[]),add:new Map((r=t.add)==null?void 0:r.map(n=>[e.promoteId?n.properties[e.promoteId]:n.id,n])),update:new Map((i=t.update)==null?void 0:i.map(n=>[n.id,n]))}:{remove:new Set,add:new Map,update:new Map}}var uc=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],dt=new Uint32Array(96),_2=class Ad{static from(e){if(!e||e.byteLength===void 0||e.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[r,i]=new Uint8Array(e,0,2);if(r!==219)throw Error("Data does not appear to be in a KDBush format.");let n=i>>4;if(n!==1)throw Error(`Got v${n} data when expected v1.`);let a=uc[i&15];if(!a)throw Error("Unrecognized array type.");let[s]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new Ad(o,s,a,void 0,e)}constructor(e,r=64,i=Float64Array,n=ArrayBuffer,a){if(isNaN(e)||e<0)throw Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=i,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let s=uc.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,l=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-l%8)%8;if(s<0)throw Error(`Unexpected typed array class: ${i}.`);if(a)this.data=a,this.ids=new this.IndexArrayType(a,8,e),this.coords=new i(a,8+l+u,e*2),this._pos=e*2,this._finished=!0;else{let h=this.data=new n(8+o+l+u);this.ids=new this.IndexArrayType(h,8,e),this.coords=new i(h,8+l+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(h,0,2).set([219,16+s]),new Uint16Array(h,2,1)[0]=r,new Uint32Array(h,4,1)[0]=e}}add(e,r){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=e,this.coords[this._pos++]=r,i}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return Ho(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:s,nodeSize:o}=this;dt[0]=0,dt[1]=a.length-1,dt[2]=0;let l=3,u=[];for(;l>0;){let h=dt[--l],c=dt[--l],p=dt[--l];if(c-p<=o){for(let m=p;m<=c;m++){let g=s[2*m],x=s[2*m+1];g>=e&&g<=i&&x>=r&&x<=n&&u.push(a[m])}continue}let f=p+c>>1,d=s[2*f],y=s[2*f+1];d>=e&&d<=i&&y>=r&&y<=n&&u.push(a[f]),(h===0?e<=d:r<=y)&&(dt[l++]=p,dt[l++]=f-1,dt[l++]=1-h),(h===0?i>=d:n>=y)&&(dt[l++]=f+1,dt[l++]=c,dt[l++]=1-h)}return u}within(e,r,i){let n=[];return this.withinInto(e,r,i,n),n}withinInto(e,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:s,nodeSize:o}=this;dt[0]=0,dt[1]=a.length-1,dt[2]=0;let l=3,u=0,h=i*i;for(;l>0;){let c=dt[--l],p=dt[--l],f=dt[--l];if(p-f<=o){for(let g=f;g<=p;g++)hc(s[2*g],s[2*g+1],e,r)<=h&&(n[u++]=a[g]);continue}let d=f+p>>1,y=s[2*d],m=s[2*d+1];hc(y,m,e,r)<=h&&(n[u++]=a[d]),(c===0?e-i<=y:r-i<=m)&&(dt[l++]=f,dt[l++]=d-1,dt[l++]=1-c),(c===0?e+i>=y:r+i>=m)&&(dt[l++]=d+1,dt[l++]=p,dt[l++]=1-c)}return u}};function Ho(t,e,r,i,n,a){if(n-i<=r)return;let s=i+n>>1;Sd(t,e,s,i,n,a),Ho(t,e,r,i,s-1,1-a),Ho(t,e,r,s+1,n,1-a)}function Sd(t,e,r,i,n,a){for(;n>i;){if(n-i>600){let u=n-i+1,h=r-i+1,c=Math.log(u),p=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*p*(u-p)/u)*(h-u/2<0?-1:1);Sd(t,e,r,Math.max(i,Math.floor(r-h*p/u+f)),Math.min(n,Math.floor(r+(u-h)*p/u+f)),a)}let s=e[2*r+a],o=i,l=n;for(zi(t,e,i,r),e[2*n+a]>s&&zi(t,e,i,n);os;)l--}e[2*i+a]===s?zi(t,e,i,l):(l++,zi(t,e,l,n)),l<=r&&(i=l+1),r<=l&&(n=l-1)}}function zi(t,e,r,i){Xs(t,r,i),Xs(e,2*r,2*i),Xs(e,2*r+1,2*i+1)}function Xs(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function hc(t,e,r,i){let n=t-r,a=e-i;return n*n+a*a}var Ko={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},A2=class{constructor(t){this.options=Object.assign(Object.create(Ko),t),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(t){let e=[];for(let r of t){if(!r.geometry)continue;let[i,n]=r.geometry.coordinates,[a,s]=[Zr(i),Hr(n)],o={id:r.id,type:"Point",geometry:[a,s],tags:r.properties};e.push(o)}this.createIndex(e)}initialize(t){let e=[];for(let r of t)r.type==="Point"&&e.push(r);this.createIndex(e)}updateIndex(t,e,r){this.options=Object.assign(Object.create(Ko),r.clusterOptions),this.initialize(t)}createIndex(t){let{log:e,minZoom:r,maxZoom:i}=this.options;e&&console.time("total time");let n=`prepare ${t.length} points`;e&&console.time(n),this.points=t;let a=[];for(let o=0;o=r;o--){let l=Date.now();s=this.trees[o]=this.createTree(this.cluster(s,o)),e&&console.log("z%d: %d clusters in %dms",o,s.numItems,Date.now()-l)}e&&console.timeEnd("total time")}getClusters(t,e){return this.getClustersInternal(t,e).map(r=>ka(r))}getClustersInternal(t,e){let r=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),n=t[2]===180?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,n=180;else if(r>n){let h=this.getClustersInternal([r,i,180,a],e),c=this.getClustersInternal([-180,i,n,a],e);return h.concat(c)}let s=this.trees[this.limitZoom(e)],o=s.range(Zr(r),Hr(a),Zr(n),Hr(i)),l=s.flatData,u=[];for(let h of o){let c=this.stride*h;u.push(l[c+5]>1?S2(l,c,this.clusterProps):this.points[l[c+3]])}return u}getChildren(t){let e=this.getOriginId(t),r=this.getOriginZoom(t),i=Error("No cluster with the specified id: "+t),n=this.trees[r];if(!n)throw i;let a=n.flatData;if(e*this.stride>=a.length)throw i;let s=this.options.radius/(this.options.extent*2**(r-1)),o=a[e*this.stride],l=a[e*this.stride+1],u=n.within(o,l,s),h=[];for(let c of u){let p=c*this.stride;a[p+4]===t&&h.push(a[p+5]>1?E2(a,p,this.clusterProps):ka(this.points[a[p+3]]))}if(h.length===0)throw i;return h}getLeaves(t,e,r){e||(e=10),r||(r=0);let i=[];return this.appendLeaves(i,t,e,r,0),i}getTile(t,e,r){let i=this.trees[this.limitZoom(t)];if(!i)return null;let n=2**t,{extent:a,radius:s}=this.options,o=s/a,l=(r-o)/n,u=(r+1+o)/n,h={transformed:!0,features:[],source:null,x:e,y:r,z:t};return this.addTileFeatures(i.range((e-o)/n,l,(e+1+o)/n,u),i.flatData,e,r,n,h),e===0&&this.addTileFeatures(i.range(1-o/n,l,1,u),i.flatData,n,r,n,h),e===n-1&&this.addTileFeatures(i.range(0,l,o/n,u),i.flatData,-1,r,n,h),h}getClusterExpansionZoom(t){return this.getOriginZoom(t)}appendLeaves(t,e,r,i,n){let a=this.getChildren(e);for(let s of a){let o=s.properties;if(o!=null&&o.cluster?n+o.point_count<=i?n+=o.point_count:n=this.appendLeaves(t,o.cluster_id,r,i,n):n1,u,h,c;if(l)u=tu(e,o,this.clusterProps),h=e[o],c=e[o+1];else{let d=this.points[e[o+3]];u=d.tags,[h,c]=d.geometry}let p={type:1,geometry:[[Math.round(this.options.extent*(h*n-r)),Math.round(this.options.extent*(c*n-i))]],tags:u},f;f=l||this.options.generateId?e[o+3]:this.points[e[o+3]].id,f!==void 0&&(p.id=f),a.features.push(p)}}limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}cluster(t,e){let{radius:r,extent:i,reduce:n,minPoints:a}=this.options,s=r/(i*2**e),o=t.flatData,l=[],u=this.stride;for(let h=0;he&&(y+=o[g+5])}if(y>d&&y>=a){let m=c*d,g=p*d,x,v=-1,b=((h/u|0)<<5)+(e+1)+this.points.length;for(let D of f){let A=D*u;if(o[A+2]<=e)continue;o[A+2]=e;let _=o[A+5];m+=o[A]*_,g+=o[A+1]*_,o[A+4]=b,n&&(x||(x=this.map(o,h,!0),v=this.clusterProps.length,this.clusterProps.push(x)),n(x,this.map(o,A)))}o[h+4]=b,l.push(m/y,g/y,1/0,b,-1,y),n&&l.push(v)}else{for(let m=0;m1)for(let m of f){let g=m*u;if(!(o[g+2]<=e)){o[g+2]=e;for(let x=0;x>5}getOriginZoom(t){return(t-this.points.length)%32}map(t,e,r){if(t[e+5]>1){let a=this.clusterProps[t[e+6]];return r?Object.assign({},a):a}let i=this.points[t[e+3]].tags,n=this.options.map(i);return r&&n===i?Object.assign({},n):n}};function S2(t,e,r){return{id:t[e+3],type:"Point",tags:tu(t,e,r),geometry:[t[e],t[e+1]]}}function E2(t,e,r){return{type:"Feature",id:t[e+3],properties:tu(t,e,r),geometry:{type:"Point",coordinates:[wd(t[e]),Dd(t[e+1])]}}}function tu(t,e,r){let i=t[e+5],n=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?`${Math.round(i/100)/10}k`:i,a=t[e+6],s=a===-1?{}:Object.assign({},r[a]);return Object.assign(s,{cluster:!0,cluster_id:t[e+3],point_count:i,point_count_abbreviated:n})}var Ed="geojsonvt_clip_start",Fd="geojsonvt_clip_end";function cc(t,e,r,i,n){let a=e===n.maxZoom?0:n.tolerance/((1<0&&e.size<(n?s:i)){r.numPoints+=e.points.length/3;return}let o=[];for(let l=0;ls)&&(r.numSimplified++,o.push(e.points[l],e.points[l+1])),r.numPoints++;n&&M2(o,a),t.push(o)}function M2(t,e){let r=0;for(let i=0,n=t.length,a=n-2;i0===e)for(let i=0,n=t.length;i1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(e),r.debug>1&&console.timeEnd("invalidating");let[i,n,a]=[0,0,0],s=cc(t,i,n,a,r);s.source=t;let o=Jn(i,n,a);if(this.tiles[o]=s,this.tileCoords.push({z:i,x:n,y:a,id:o}),r.debug){let l=`z${i}`;this.stats[l]=(this.stats[l]||0)+1,this.total++}}getClusterExpansionZoom(t){return null}getChildren(t){return null}getLeaves(t,e,r){return null}getTile(t,e,r){let{extent:i,debug:n}=this.options,a=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);let o=t,l=e,u=r,h;for(;!h&&o>0;)o--,l>>=1,u>>=1,h=this.tiles[Jn(o,l,u)];return!(h!=null&&h.source)||(n>1&&(console.log("found parent tile z%d-%d-%d",o,l,u),console.time("drilling down")),this.splitTile(h.source,o,l,u,t,e,r),n>1&&console.timeEnd("drilling down"),!this.tiles[s])?null:pc(this.tiles[s],i)}splitTile(t,e,r,i,n,a,s){let o=[t,e,r,i],l=this.options,u=l.debug;for(;o.length;){i=o.pop(),r=o.pop(),e=o.pop(),t=o.pop();let h=1<1&&console.time("creation"),p=this.tiles[c]=cc(t,e,r,i,l),this.tileCoords.push({z:e,x:r,y:i,id:c}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));let _=`z${e}`;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(p.source=t,n==null){if(e===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue}else{if(e===l.maxZoom||e===n)continue;if(n!=null){let _=n-e;if(r!==a>>_||i!==s>>_)continue}}if(p.source=null,!t.length)continue;u>1&&console.time("clipping");let f=.5*l.buffer/l.extent,d=.5-f,y=.5+f,m=1+f,g=null,x=null,v=null,b=null,D=Te(t,h,r-f,r+y,0,p.minX,p.maxX,l),A=Te(t,h,r+d,r+m,0,p.minX,p.maxX,l);D&&(g=Te(D,h,i-f,i+y,1,p.minY,p.maxY,l),x=Te(D,h,i+d,i+m,1,p.minY,p.maxY,l)),A&&(v=Te(A,h,i-f,i+y,1,p.minY,p.maxY,l),b=Te(A,h,i+d,i+m,1,p.minY,p.maxY,l)),u>1&&console.timeEnd("clipping"),o.push(g||[],e+1,r*2,i*2),o.push(x||[],e+1,r*2,i*2+1),o.push(v||[],e+1,r*2+1,i*2),o.push(b||[],e+1,r*2+1,i*2+1)}}invalidateTiles(t){if(!t.length)return;let e=this.options,{debug:r}=e,i=1/0,n=-1/0,a=1/0,s=-1/0;for(let u of t)i=Math.min(i,u.minX),n=Math.max(n,u.maxX),a=Math.min(a,u.minY),s=Math.max(s,u.maxY);let o=e.buffer/e.extent,l=new Set;for(let u in this.tiles){let h=this.tiles[u],c=1<=f||s=y)continue;let m=!1;for(let g of t)if(g.maxX>=p&&g.minX=d&&g.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",h.z,h.x,h.y,h.numFeatures,h.numPoints,h.numSimplified);let g=`z${h.z}`;this.stats[g]=(this.stats[g]||0)-1,this.total--}delete this.tiles[u],l.add(u)}}l.size&&(this.tileCoords=this.tileCoords.filter(u=>!l.has(u.id)))}};function Jn(t,e,r){return((1<24)throw Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw Error("promoteId and generateId cannot be used together.");let i=Zl(t,e);r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles")),i=Ql(i,e),e.updateable&&(this.source=i),this.initializeIndex(i,e)}initializeIndex(t,e){this.tileIndex=e.cluster?new A2(e.clusterOptions):new z2(e),t.length&&this.tileIndex.initialize(t)}getTile(t,e,r){return t=+t,e=+e,r=+r,t<0||t>24?null:this.tileIndex.getTile(t,e,r)}updateData(t,e){let r=this.options;if(!r.updateable)throw Error("to update tile geojson `updateable` option must be set to true");let{affected:i,source:n}=b2(this.source,t,r);e&&({affected:i,source:n}=this.filterUpdate(n,i,e)),i.length&&(this.source=n,this.tileIndex.updateIndex(n,i,r))}filterUpdate(t,e,r){let i=new Set;for(let n of t)n.id!=null&&(r(ka(n))||(e.push(n),i.add(n.id)));return t=t.filter(n=>!i.has(n.id)),{affected:e,source:t}}getData(){if(!this.options.updateable)throw Error("to retrieve data the `updateable` option must be set to true");return u2(this.source)}updateClusterOptions(t,e){let r=this.options.cluster;if(this.options.cluster=t,this.options.clusterOptions=e,r==t){this.tileIndex.updateIndex(this.source,[],this.options);return}this.initializeIndex(this.source,this.options)}getClusterExpansionZoom(t){return this.tileIndex.getClusterExpansionZoom(t)}getClusterChildren(t){return this.tileIndex.getChildren(t)}getClusterLeaves(t,e,r){return this.tileIndex.getLeaves(t,e,r)}},Jo=At([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),V2=Jo.members;Jo.size,Jo.alignment;var Qo=At([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),O2=Qo.members;Qo.size,Qo.alignment;var R2=Math.cos(75/2*(Math.PI/180)),Id=1/2,fc=2**14/Id,Cd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let e of this.layers)this.gradients[e.id]={};this.layoutVertexArray=new Qm,this.layoutVertexArray2=new tg,this.indexArray=new wn,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.hasDependencies=Aa("line",this.layers,e)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[],s=new st(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!this.layers[0]._featureFilter.filter(s,p,r))continue;let f=n?i.evaluate(p,{},r):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?p.geometry:Ar(l),patterns:{},dashes:{},sortKey:f};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:h,sourceLayerIndex:c}=l;this.hasDependencies?(Aa("line",this.layers,e)?Gl("line",this.layers,l,{zoom:this.zoom},e):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,l,this.zoom,e),this.patternFeatures.push(l)):this.addFeature(l,u,h,r,{},{},e.subdivisionGranularity);let p=t[h].feature;e.featureIndex.insert(p,u,h,c,this.index)}}update(t,e,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures({options:t,canonical:e,patternPositions:r,dashPositions:i}){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,i,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,O2)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,V2),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.hasOwn(t.properties,"geojsonvt_clip_start")&&Object.hasOwn(t.properties,"geojsonvt_clip_end"))return{start:+t.properties[Ed],end:+t.properties[Fd]}}addFeature(t,e,r,i,n,a,s){let o=this.layers[0].layout,l=o.get("line-join").evaluate(t,{}),u=o.get("line-cap").evaluate(t,{}),h=o.get("line-miter-limit").evaluate(t,{}),c=o.get("line-round-limit").evaluate(t,{});this.lineClips=this.lineFeatureClips(t);for(let p of e)this.addLine(p,t,l,u,h,c,i,s);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,dashPositions:a,canonical:i})}addLine(t,e,r,i,n,a,s,o){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let l=s?o.line.getGranularityForZoomLevel(s.z):1;if(t=cr(t,l),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let v=0;v=2&&t[h-1].equals(t[h-2]);)h--;let c=0;for(;c0;if(k&&v>c){let L=d.dist(y);if(L>2*p){let F=d.sub(d.sub(y)._mult(p/L)._round());this.updateDistance(y,F),this.addCurrentVertex(F,g,0,0,f),y=F}}let O=y&&m,P=O?r:u?"butt":i;if(O&&P==="round"&&(_n&&(P="bevel"),P==="bevel"&&(_>2&&(P="flipbevel"),_100)b=x.mult(-1);else{let L=_*g.add(x).mag()/g.sub(x).mag();b._perp()._mult(L*(z?-1:1))}this.addCurrentVertex(d,b,0,0,f),this.addCurrentVertex(d,b.mult(-1),0,0,f)}else if(P==="bevel"||P==="fakeround"){let L=-Math.sqrt(_*_-1),F=z?L:0,$=z?0:L;if(y&&this.addCurrentVertex(d,g,F,$,f),P==="fakeround"){let U=Math.round(S*180/Math.PI/20);for(let T=1;T2*p){let F=d.add(m.sub(d)._mult(p/L)._round());this.updateDistance(d,F),this.addCurrentVertex(F,x,0,0,f),d=F}}}}addCurrentVertex(t,e,r,i,n,a=!1){let s=e.x+e.y*r,o=e.y-e.x*r,l=-e.x+e.y*i,u=-e.y-e.x*i;this.addHalfVertex(t,s,o,a,!1,r,n),this.addHalfVertex(t,l,u,a,!0,-i,n),this.distance>fc/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,e,r,i,n,a))}addHalfVertex({x:t,y:e},r,i,n,a,s,o){let l=(this.lineClips?this.scaledDistance*(fc-1):this.scaledDistance)*Id;if(this.layoutVertexArray.emplaceBack((t<<1)+ +!!n,(e<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,(s===0?0:s<0?-1:1)+1|(l&63)<<2,l>>6),this.lineClips){let h=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(h,this.lineClipsArray.length)}let u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),o.primitiveLength++),a?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}hasLineDasharray(t){for(let e of t){let r=e.paint.get("line-dasharray");if(r&&!r.isConstant())return!0}return!1}addLineDashDependencies(t,e,r,i){for(let n of t){let a=n.paint.get("line-dasharray");if(!a||a.value.kind==="constant")continue;let s=n.layout.get("line-cap").evaluate(e,{})==="round",o={dasharray:a.value.evaluate({zoom:r-1},e,{}),round:s},l={dasharray:a.value.evaluate({zoom:r},e,{}),round:s},u={dasharray:a.value.evaluate({zoom:r+1},e,{}),round:s},h=`${o.dasharray.join(",")},${o.round}`,c=`${l.dasharray.join(",")},${l.round}`,p=`${u.dasharray.join(",")},${u.round}`;i.dashDependencies[h]=o,i.dashDependencies[c]=l,i.dashDependencies[p]=u,e.dashes[n.id]={min:h,mid:c,max:p}}}};C("LineBucket",Cd,{omit:["layers","patternFeatures"]});var $2,N2=()=>$2||($2=new Xt({"line-cap":new N(w.layout_line["line-cap"],"line-cap"),"line-join":new N(w.layout_line["line-join"],"line-join"),"line-miter-limit":new N(w.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new N(w.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new N(w.layout_line["line-sort-key"],"line-sort-key")})),U2,q2=()=>U2||(U2=new Xt({"line-opacity":new N(w.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new V(w.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new N(w.paint_line["line-color"],"line-color"),"line-translate":new V(w.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new V(w.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new N(w.paint_line["line-width"],"line-width"),"line-gap-width":new N(w.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new N(w.paint_line["line-offset"],"line-offset"),"line-blur":new N(w.paint_line["line-blur"],"line-blur"),"line-dasharray":new on(w.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new on(w.paint_line["line-pattern"],"line-pattern"),"line-gradient":new Wa(w.paint_line["line-gradient"],"line-gradient")})),dc={get paint(){return q2()},get layout(){return N2()}},j2=class extends N{possiblyEvaluate(t,e){return e=new st(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,r,i){return e=Gt({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,r,i)}},Qn;var G2=class extends de{constructor(t,e){super(t,dc,e),this.gradientVersion=0,Qn||(Qn=new j2(dc.paint.properties["line-width"].specification,"line-floorwidth"),Qn.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){let e=this.gradientExpression();this.stepInterpolant=lm(e)?e._styleExpression.expression instanceof vl:!1,this.gradientVersion=(this.gradientVersion+1)%(2**53-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=Qn.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Cd(t)}queryRadius(t){let e=t,r=yc(Wr("line-width",this,e),Wr("line-gap-width",this,e)),i=Wr("line-offset",this,e);return r/2+Math.abs(i)+Ha(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){let s=Ka(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),o=a/2*yc(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),l=this.paint.get("line-offset").evaluate(e,r);return l&&(i=Dg(i,l*a)),mg(s,i,o)}isTileClipped(){return!0}};function yc(t,e){return e>0?e+2*t:t}var X2=At([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),Y2=At([{name:"a_projected_pos",components:3,type:"Float32"}],4);At([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var W2=At([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);At([{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"}]);var mc=At([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),x5=At([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);At([{name:"triangle",components:3,type:"Uint16"}]),At([{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"},{type:"Float32",name:"heightOffset"}]),At([{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"},{type:"Float32",name:"heightOffset"}]),At([{type:"Float32",name:"offsetX"}]),At([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),At([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var wr=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(t){this.pluginStatus=t.pluginStatus,this.pluginURL=t.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(t){if(wr.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=t.applyArabicShaping,this.processBidirectionalText=t.processBidirectionalText,this.processStyledBidirectionalText=t.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(t,e){return rt(this,null,function*(){if(this.isParsed())return this.getState();if(t.pluginStatus!=="loading")return this.setState(t),t;let r=t.pluginURL,i=new Promise(a=>{this.loadScriptResolve=a}),n=new Promise(a=>setTimeout(()=>a(),this.TIMEOUT));if(yield e(r),yield Promise.race([i,n]),this.isParsed()){let a={pluginStatus:"loaded",pluginURL:r};return this.setState(a),a}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};function Z2(t){return/[\\u0600-\\u0604\\u0606-\\u060B\\u060D-\\u061A\\u061C-\\u061E\\u0620-\\u063F\\u0641-\\u064A\\u0656-\\u066F\\u0671-\\u06DC\\u06DE-\\u070D\\u070F-\\u074A\\u074D-\\u077F\\u07C0-\\u07FA\\u07FD-\\u07FF\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u08E1\\u08E3-\\u08FF\\u1800\\u1801\\u1804\\u1806-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\uA840-\\uA877\\uFB50-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFF\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\\uD802[\\uDEC0-\\uDEE6\\uDEEB-\\uDEF6\\uDF80-\\uDF91\\uDF99-\\uDF9C\\uDFA9-\\uDFAF]|\\uD803[\\uDD00-\\uDD27\\uDD30-\\uDD39\\uDE60-\\uDE7E\\uDEC2-\\uDEC7\\uDED0-\\uDED8\\uDEFA-\\uDEFF\\uDF30-\\uDF59\\uDF70-\\uDF89\\uDFB0-\\uDFCB]|\\uD805[\\uDE60-\\uDE6C]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9C-\\uDC9F]|\\uD83A[\\uDD00-\\uDD4B\\uDD50-\\uDD59\\uDD5E\\uDD5F]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB\\uDEF0\\uDEF1]/gim.test(String.fromCodePoint(t))}function H2(t){return/[\\u0591-\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u0604\\u0606-\\u060B\\u060D-\\u061A\\u061C-\\u061E\\u0620-\\u063F\\u0641-\\u064A\\u0656-\\u066F\\u0671-\\u06DC\\u06DE-\\u070D\\u070F-\\u074A\\u074D-\\u07B1\\u07C0-\\u07FA\\u07FD-\\u082D\\u0830-\\u083E\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u08E1\\u08E3-\\u08FF\\uFB1D-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFF\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC57-\\uDC9E\\uDCA7-\\uDCAF\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDCFB-\\uDD1B\\uDD1F-\\uDD39\\uDD3F-\\uDD59\\uDD80-\\uDDB7\\uDDBC-\\uDDCF\\uDDD2-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE38-\\uDE3A\\uDE3F-\\uDE48\\uDE50-\\uDE58\\uDE60-\\uDE9F\\uDEC0-\\uDEE6\\uDEEB-\\uDEF6\\uDF00-\\uDF35\\uDF39-\\uDF55\\uDF58-\\uDF72\\uDF78-\\uDF91\\uDF99-\\uDF9C\\uDFA9-\\uDFAF]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDCFA-\\uDD27\\uDD30-\\uDD39\\uDD40-\\uDD65\\uDD69-\\uDD85\\uDD8E\\uDD8F\\uDE60-\\uDE7E\\uDE80-\\uDEA9\\uDEAB-\\uDEAD\\uDEB0\\uDEB1\\uDEC2-\\uDEC7\\uDED0-\\uDED8\\uDEFA-\\uDF27\\uDF30-\\uDF59\\uDF70-\\uDF89\\uDFB0-\\uDFCB\\uDFE0-\\uDFF6]|\\uD83A[\\uDC00-\\uDCC4\\uDCC7-\\uDCD6\\uDD00-\\uDD4B\\uDD50-\\uDD59\\uDD5E\\uDD5F]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB\\uDEF0\\uDEF1]/gim.test(String.fromCodePoint(t))}function K2(t){return/[\\u02EA\\u02EB\\u2E80-\\u2FDF\\u2FF0-\\u303F\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FD-\\u30FF\\u3105-\\u312F\\u31A0-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFE10-\\uFE1F\\uFE30-\\uFE4F\\uFF00-\\uFFEF]|\\uD81B[\\uDFE0-\\uDFFF]|[\\uD81C-\\uD822\\uD840-\\uD868\\uD86A-\\uD86D\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD88C][\\uDC00-\\uDFFF]|\\uD823[\\uDC00-\\uDCD5\\uDCFF-\\uDD1E\\uDD80-\\uDDF2]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFB]|\\uD83C[\\uDE00-\\uDEFF]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEAD\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0\\uDFF0-\\uDFFF]|\\uD87B[\\uDC00-\\uDE5D]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD88D[\\uDC00-\\uDC79]/gim.test(String.fromCodePoint(t))}function Qa(t){return/[\\u02EA\\u02EB\\u1100-\\u11FF\\u1401-\\u167F\\u18B0-\\u18FF\\u2065\\u20DD-\\u20E0\\u20E2-\\u20E4\\u2B97\\u2BF0-\\u2BFF\\u2E50\\u2E51\\u2E80-\\u3007\\u3012\\u3013\\u3020-\\u302F\\u3031-\\u30FB\\u30FD-\\uA4CF\\uA960-\\uA97F\\uAC00-\\uD7FF\\uF900-\\uFAFF\\uFE10-\\uFE1F\\uFE30-\\uFE48\\uFE50-\\uFE57\\uFE5F-\\uFE62\\uFE67-\\uFE6F\\uFF00-\\uFF07\\uFF0A-\\uFF0C\\uFF0E-\\uFF19\\uFF1F-\\uFF3A\\uFF3C\\uFF3E\\uFF40-\\uFF5A\\uFFE0-\\uFFE2\\uFFE4-\\uFFE7\\uFFF0-\\uFFF8]|\\uD802[\\uDD80-\\uDD9F]|\\uD805[\\uDD80-\\uDDFF]|\\uD806[\\uDE00-\\uDEBF]|[\\uD80C-\\uD810\\uD81C-\\uD822\\uD83C\\uD83D\\uD840-\\uD87E\\uD880-\\uD8BE][\\uDC00-\\uDFFF]|\\uD811[\\uDC00-\\uDE7F]|\\uD81B[\\uDFE0-\\uDFFF]|\\uD823[\\uDC00-\\uDDFF]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFF]|\\uD833[\\uDEC0-\\uDFCF]|\\uD834[\\uDC00-\\uDDFF\\uDEE0-\\uDF7F]|\\uD836[\\uDC00-\\uDEAF]|\\uD83E[\\uDD00-\\uDEFF]|[\\uD87F\\uD8BF][\\uDC00-\\uDFFD]/gim.test(String.fromCodePoint(t))}function J2(t){return/[\\xA7\\xA9\\xAE\\xB1\\xBC-\\xBE\\xD7\\xF7\\u2016\\u2020\\u2021\\u2030\\u2031\\u203B\\u203C\\u2042\\u2047-\\u2049\\u2051\\u2100-\\u218F\\u221E\\u2234\\u2235\\u2300-\\u2307\\u230C-\\u231F\\u2324-\\u2328\\u232B\\u237D-\\u239A\\u23BE-\\u23CD\\u23CF\\u23D1-\\u23DB\\u23E2-\\u2422\\u2424-\\u24FF\\u25A0-\\u2619\\u2620-\\u2767\\u2776-\\u2793\\u2B12-\\u2B2F\\u2B50-\\u2B59\\u2BB8-\\u2BEB\\u3000-\\u303F\\u30A0-\\u30FF\\uE000-\\uF8FF\\uFE30-\\uFE6F\\uFF00-\\uFFEF\\uFFFC\\uFFFD]|[\\uDB80-\\uDBFF][\\uDC00-\\uDFFF]/gim.test(String.fromCodePoint(t))}function Q2(t){return/[\\r\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0600-\\u0605\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DD\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u070F\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0890\\u0891\\u0897-\\u089F\\u08CA-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E33-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB3-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1037\\u1039-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1084-\\u1086\\u108D\\u109D\\u1100-\\u11FF\\u135D-\\u135F\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u200C\\u200D\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA960-\\uA97C\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E\\uFF9F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDD69-\\uDD6D\\uDEAB\\uDEAC\\uDEFA-\\uDEFF\\uDF46-\\uDF50\\uDF82-\\uDF85]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC70\\uDC73\\uDC74\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDCBD\\uDCC2\\uDCCD\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD45\\uDD46\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDDC2\\uDDC3\\uDDC9-\\uDDCC\\uDDCE\\uDDCF\\uDE2C-\\uDE37\\uDE3E\\uDE41\\uDEDF-\\uDEEA\\uDF00-\\uDF03\\uDF3B\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74\\uDFB8-\\uDFC0\\uDFC2\\uDFC5\\uDFC7-\\uDFCA\\uDFCC-\\uDFD2\\uDFE1\\uDFE2]|\\uD805[\\uDC35-\\uDC46\\uDC5E\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDDDC\\uDDDD\\uDE30-\\uDE40\\uDEAB-\\uDEB7\\uDF1D-\\uDF1F\\uDF22-\\uDF2B]|\\uD806[\\uDC2C-\\uDC3A\\uDD30-\\uDD35\\uDD37\\uDD38\\uDD3B-\\uDD43\\uDDD1-\\uDDD7\\uDDDA-\\uDDE0\\uDDE4\\uDE01-\\uDE0A\\uDE33-\\uDE39\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE5B\\uDE84-\\uDE99\\uDF60-\\uDF67]|\\uD807[\\uDC2F-\\uDC36\\uDC38-\\uDC3F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD8A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD97\\uDEF3-\\uDEF6\\uDF00-\\uDF03\\uDF34-\\uDF3A\\uDF3E-\\uDF42\\uDF5A]|\\uD80D[\\uDC40\\uDC47-\\uDC55]|\\uD818[\\uDD1E-\\uDD2F]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDD63\\uDD67-\\uDD6A\\uDF4F\\uDF51-\\uDF87\\uDF8F-\\uDF92\\uDFE4\\uDFF0\\uDFF1]|\\uD82F[\\uDC9D\\uDC9E]|\\uD833[\\uDF00-\\uDF2D\\uDF30-\\uDF46]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDC8F\\uDD30-\\uDD36\\uDEAE\\uDEEC-\\uDEEF]|\\uD839[\\uDCEC-\\uDCEF\\uDDEE\\uDDEF\\uDEE3\\uDEE6\\uDEEE\\uDEEF\\uDEF5]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A]|\\uD83C[\\uDDE6-\\uDDFF\\uDFFB-\\uDFFF]|\\uDB40[\\uDC20-\\uDC7F\\uDD00-\\uDDEF]/.test(t)}function gc(t){return/[\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECE\\u0EDC-\\u0EDF\\u0F00-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F97\\u0F99-\\u0FBC\\u0FBE-\\u0FCC\\u0FCE-\\u0FD4\\u0FD9\\u0FDA\\u1000-\\u103F\\u1050-\\u108F\\u109A-\\u109F\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19DE\\u19DF\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1AA0-\\u1AAD\\u1B00-\\u1B4C\\u1B4E-\\u1B7F\\uA980-\\uA9CD\\uA9D0-\\uA9D9\\uA9DE-\\uA9EF\\uA9FA-\\uA9FE\\uAA60-\\uAAC2\\uAADB-\\uAADF]|\\uD805[\\uDF00-\\uDF1A\\uDF1D-\\uDF2B\\uDF3A\\uDF3B\\uDF3F-\\uDF46]/gim.test(String.fromCodePoint(t))}function tv(t,e){return/(?:[\\u1039\\u17D2\\u1A60\\u1BAB\\u200D\\uAAF6]|\\uD802\\uDE3F|\\uD804[\\uDD33\\uDFD0]|\\uD806[\\uDD3E\\uDE47\\uDE99]|\\uD807[\\uDD45\\uDD97\\uDF42])$/.test(t)||new RegExp("^\\\\p{gc=Mc}","u").test(e)}var ev={C:"18g,1;g2,3;4nb,1",D:"17k,1;5,1;1,1;1,5;4,d;1,7;1,2;z,2;8,g;i,12;1,2;9,1;1,1;1,2;14,3;2,1;28,9;3,f;2,4;1,1;2,3;2,6;7a,1;2,5;1,1;g,a;5,2;2,6;1,f",R:"17m,4;1,1;1,1;5,4;l,1;14,3;1,3;g,i;12,1;2,9;1,1;1,1;2,2;1,1;o,2;2x,3;f,2;4,1;1,2;3,2;6u,j;b,1;r,3;1,1;2,2;6,1",T:"174,b;1,1;1a,l;g,1;2t,7;2,6;2,2;1,4;bt,9;16,o;1,t;1clb,1"},rv={1569:[65152,0,0,0],1570:[65153,65154,0,0],1571:[65155,65156,0,0],1572:[65157,65158,0,0],1573:[65159,65160,0,0],1574:[65161,65162,65163,65164],1575:[65165,65166,0,0],1576:[65167,65168,65169,65170],1577:[65171,65172,0,0],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194,0,0],1584:[65195,65196,0,0],1585:[65197,65198,0,0],1586:[65199,65200,0,0],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262,0,0],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1611:[65136,0,0,65137],1612:[65138,0,0,0],1613:[65140,0,0,0],1614:[65142,0,0,65143],1615:[65144,0,0,65145],1616:[65146,0,0,65147],1617:[65148,0,0,65149],1618:[65150,0,0,65151],1649:[64336,64337,0,0],1655:[64477,0,0,0],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393,0,0],1676:[64388,64389,0,0],1677:[64386,64387,0,0],1678:[64390,64391,0,0],1681:[64396,64397,0,0],1688:[64394,64395,0,0],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415,0,0],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421,0,0],1729:[64422,64423,64424,64425],1733:[64480,64481,0,0],1734:[64473,64474,0,0],1735:[64471,64472,0,0],1736:[64475,64476,0,0],1737:[64482,64483,0,0],1739:[64478,64479,0,0],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431,0,0],1747:[64432,64433,0,0]},iv={\\u0644\\u0622:[65269,65270],\\u0644\\u0623:[65271,65272],\\u0644\\u0625:[65273,65274],\\u0644\\u0627:[65275,65276]},xc=1604,nv=/[\\u0600-\\u06ff\\u0750-\\u077f\\u0870-\\u089f\\u08a0-\\u08ff\\ufb50-\\ufdff\\ufe70-\\ufeff]/;function av(t,e,r){let i=0;for(let n of t.split(";")){let[a,s]=n.split(",").map(l=>parseInt(l,36)),o=i+a;for(let l=o;l{let r=e.codePointAt(0);return{codePoint:r,type:sv(r),form:null}})}function cv(t){let e=t.filter(r=>r.type!=="T");for(let r=0;r0&&ov(e[r-1].type),a=r+1String.fromCodePoint(dv(r))).join("")}function mv(t,e,r){var n;let i=e.layout.get("text-transform").evaluate(r,{});return i==="uppercase"?t=t.toLocaleUpperCase():i==="lowercase"&&(t=t.toLocaleLowerCase()),((n=wr.applyArabicShaping)!=null?n:yv)(t)}function gv(t,e,r){for(let i of t.sections)i.text=mv(i.text,e,r);return t}function xv(t){let e={},r={},i=[],n=0;function a(u){i.push(t[u]),n++}function s(u,h,c){let p=r[u];return delete r[u],r[h]=p,i[p].geometry[0].pop(),i[p].geometry[0]=i[p].geometry[0].concat(c[0]),p}function o(u,h,c){let p=e[h];return delete e[h],e[u]=p,i[p].geometry[0].shift(),i[p].geometry[0]=c[0].concat(i[p].geometry[0]),p}function l(u,h,c){let p=c?h[0][h[0].length-1]:h[0][0];return`${u}:${p.x}:${p.y}`}for(let u=0;uu.geometry)}var Bd=typeof Intl<"u"&&"Segmenter"in Intl,ta,ea;function tl(t){if(!Bd||!Q2(t))return[...t];ta!=null||(ta=new Intl.Segmenter(void 0,{granularity:"grapheme"}));let e=[];for(let{segment:r}of ta.segment(t)){let i=e.length-1;i>=0&&tv(e[i],r)?e[i]+=r:e.push(r)}return e}function vv(t){let e=new Set;if(Bd){ea!=null||(ea=new Intl.Segmenter(void 0,{granularity:"word"}));for(let{index:i}of ea.segment(t))e.add(i);return e}let r=0;for(let i of t.split(new RegExp("\\\\b|(?=\\\\p{Ideo})","u")))e.add(r),r+=i.length;return e}function Pd(t){let e=t.codePointAt(0);return t.length>(e>65535?2:1)}function ru(t){return/\\s/u.test(String.fromCodePoint(t))}function el(t){for(let e of t)if(Qa(e.codePointAt(0)))return!0;return!1}function bv(t){for(let e of t)if(!wv(e.codePointAt(0)))return!1;return!0}function wv(t){return!Z2(t)}function vc(t){return!(Qa(t)||J2(t))}function zd(t){return new RegExp("\\\\p{sc=Arab}","u").test(String.fromCodePoint(t))}function Ld(t){return H2(t)}function Vd(t){for(let e of t)if(Ld(e.codePointAt(0)))return!0;return!1}var Gr={"!":"\\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","\\u22EF":"\\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 Dv(t){let e="",r={premature:!0,value:void 0},i=t[Symbol.iterator](),n=i.next(),a=t[Symbol.iterator]();a.next();let s=a.next();for(;!n.done;)(s.done||!vc(s.value.codePointAt(0))||Gr[s.value])&&(r.premature||!vc(r.value.codePointAt(0))||Gr[r.value])&&Gr[n.value]?e+=Gr[n.value]:e+=n.value,r={value:n.value,premature:!1},n=i.next(),s=a.next();return e}var _v={10:!0,13:!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},Av={40:!0};function bc(t,e,r,i,n,a){if("fontStack"in e){let s=r[e.fontStack],o=s==null?void 0:s[t];if(o)return o.metrics.advance*e.scale+n;let l=0;for(let u of t){let h=s==null?void 0:s[u];h&&(l+=h.metrics.advance*e.scale+n)}return l}{let s=i[e.imageName];return s?s.displaySize[0]*e.scale*24/a+n:0}}function wc(t,e,r,i){let n=(t-e)**2;return i?tr&&Dc(e[i-1]);)i--;this.text=e.slice(r,i).join(""),this.sectionIndex=this.sectionIndex.slice(r,i),this._graphemes=null}substring(e,r){let i=this.graphemes().slice(e,r).join(""),n=this.sectionIndex.slice(e,r);return new rl(i,this.sections,n)}toCodeUnitIndex(e){return this.graphemes().slice(0,e).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,r)=>Math.max(e,this.sections[r].scale),0)}getMaxImageSize(e){let r=0,i=0;for(let n=0;n0?i[i.length-1]:"",a=tl(n+e);this.text+=e,this._graphemes=i.slice(0,n?-1:void 0).concat(a);let s=a.length-+!!n;for(let o=0;o=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,r,i,n,a){let s=[],o=this.determineAverageLineWidth(e,r,i,n,a),l=this.hasZeroWidthSpaces(),u=this.graphemes(),h=null,c=0,p=0;for(let f=0;f0){let y=u[f-1].codePointAt(0),m=d.codePointAt(0),g=K2(y),x=gc(y)&&gc(m);(_v[y]||g||"imageName"in this.getSection(f-1)||u[f+1]!==void 0&&Av[m]||x&&(h!=null?h:h=vv(this.text)).has(p))&&s.push(_c(f,c,o,s,Sv(y,m,g&&l),!1))}ru(d.codePointAt(0))||(c+=bc(d,this.getSection(f),i,n,e,a)),p+=d.length}return Od(_c(this.length(),c,o,s,0,!0))}determineAverageLineWidth(e,r,i,n,a){let s=0,o=0;for(let u of this.graphemes()){let h=this.getSection(o);s+=bc(u,h,i,n,e,a),o++}let l=Math.max(1,Math.ceil(s/r));return s/l}};function Ev(){return(function(t){var e={R:"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",EN:"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",ES:"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",ET:"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj",AN:"16o+5,2j+9,2+1,35,ed,1ff2+9,87+u",CS:"18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b",B:"a,3,f+2,2v,690",S:"9,2,k",WS:"c,k,4f4,1vk+a,u,1j,335",ON:"x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i",BN:"0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1",NSM:"lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",AL:"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",LRO:"6ct",RLO:"6cu",LRE:"6cq",RLE:"6cr",PDF:"6cs",LRI:"6ee",RLI:"6ef",FSI:"6eg",PDI:"6eh"},r={},i={};r.L=1,i[1]="L",Object.keys(e).forEach(function(R,J){r[R]=1<1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function d(R,J){var W=0,M=new Map,ut=J&&new Map,X;return R.split(",").forEach(function G(K){if(K.indexOf("+")!==-1)for(var Nt=+K;Nt--;)G(X);else{X=K;var vt=K.split(">"),nt=vt[0],Tt=vt[1];nt=String.fromCodePoint(W+=parseInt(nt,36)),Tt=String.fromCodePoint(W+=parseInt(Tt,36)),M.set(nt,Tt),J&&ut.set(Tt,nt)}}),{map:M,reverseMap:ut}}var y,m,g;function x(){if(!y){var R=d(f.pairs,!0),J=R.map,W=R.reverseMap;y=J,m=W,g=d(f.canonical,!1).map}}function v(R){return x(),y.get(R)||null}function b(R){return x(),m.get(R)||null}function D(R){return x(),g.get(R)||null}var A=r.L,_=r.R,S=r.EN,k=r.ES,z=r.ET,O=r.AN,P=r.CS,L=r.B,F=r.S,$=r.ON,U=r.BN,T=r.NSM,q=r.AL,at=r.LRO,ot=r.RLO,pt=r.LRE,Et=r.RLE,qt=r.PDF,Ht=r.LRI,Ve=r.RLI,ye=r.FSI,Kt=r.PDI;function Oe(R,J){for(var W=125,M=new Uint32Array(R.length),ut=0;ut0)Fe--;else if(rs>0){for(Ne=0;!lt[lt.length-1]._isolate;)lt.pop();var is=lt[lt.length-1]._isolInitIndex;is!=null&&(Nt.set(is,zt),Nt.set(zt,is)),lt.pop(),rs--}bt=lt[lt.length-1],K[zt]=bt._level,bt._override&&G(zt,bt._override)}else Lt&qt?(Fe===0&&(Ne>0?Ne--:!bt._isolate&<.length>1&&(lt.pop(),bt=lt[lt.length-1])),K[zt]=bt._level):Lt&L&&(K[zt]=nt.level);else K[zt]=bt._level,bt._override&&Lt!==U&&G(zt,bt._override)}for(var Cr=[],me=null,ar=nt.start;ar<=nt.end;ar++){var ns=M[ar];if(!(ns&o)){var Bu=K[ar],Pu=ns&n,Wy=ns===Kt;me&&Bu===me._level?(me._end=ar,me._endsWithIsolInit=Pu):Cr.push(me={_start:ar,_end:ar,_level:Bu,_startsWithPDI:Wy,_endsWithIsolInit:Pu})}}for(var as=[],Sn=0;Sn=0;kn--)if(!(M[kn]&o)){Vu=K[kn];break}var us=Mr[Mr.length-1],Hy=K[us],Ou=nt.level;if(!(M[us]&n)){for(var Tn=us+1;Tn<=nt.end;Tn++)if(!(M[Tn]&o)){Ou=K[Tn];break}}as.push({_seqIndices:Mr,_sosType:Math.max(Vu,Zy)%2?_:A,_eosType:Math.max(Ou,Hy)%2?_:A})}}for(var hs=0;hs=0;Cn--)if(!(M[j[Cn]]&o)){ps=M[j[Cn]];break}G(Ru,ps&(n|Kt)?$:ps)}}if(X.get(S))for(var Mn=0;Mn=-1;Bn--){var Nu=Bn===-1?yi:M[j[Bn]];if(Nu&a){Nu===q&&G($u,O);break}}}if(X.get(q))for(var fs=0;fs=0&&(Pr=M[j[ms]],Pr&o);ms--);for(var gs=mi+1;gs=0&&M[j[Pn]]&(z|o);Pn--)G(j[Pn],S);for(ge++;ge=0&&M[j[zn]]&o;zn--)G(j[zn],$);for(var Ln=gi+1;Ln=0;bi--){var bs=zr[bi].char;if(bs===Yu||bs===b(D(vi))||v(D(bs))===vi){Vn.push([zr[bi].seqIndex,Lr]),zr.length=bi;break}}}Vn.sort(function(Yt,ue){return Yt[0]-ue[0]});for(var ws=0;ws=0;As--){var Ju=j[As];if(M[Ju]&Xu){var Qu=M[Ju]&xi?_:A;xe=Qu===Br?Br:Qu;break}}}if(xe){if(M[j[On]]=M[j[Ds]]=xe,xe!==Br){for(var wi=On+1;wi=0;_i--)if(M[j[_i]]&o)th=_i;else{Es=M[j[_i]]&xi?_:A;break}for(var eh=Ky,Ai=Ue+1;Ai=0&&c(R[$n])&l;$n--)K[$n]=nt.level}}return{levels:K,paragraphs:vt};function rh(Yt,ue){for(var Wt=Yt;Wt=K&&c(R[nt])&l;nt--)vt[nt]=G.level;for(var Tt=G.level,di=1/0,nr=0;nrTt&&(Tt=Re),Re=di;$e--)for(var lt=0;lt=$e){for(var bt=lt;lt+1=$e;)lt++;lt>bt&&X.push([bt+K,lt+K])}}}),X}function Tr(R,J,W,M){var ut=Ir(R,J,W,M),X=[].concat(R);return ut.forEach(function(G,K){X[K]=(J.levels[G]&1?kt(R[G]):null)||R[G]}),X.join("")}function Ir(R,J,W,M){for(var ut=ir(R,J,W,M),X=[],G=0;G=0;i--){let n=nu.getBidiCharTypeName(t[i].text[0]);Tv.has(n)?(t[i].level=e,r=!0):r&&kv.has(n)?t[i].level=e:r=!1}}function Mv(t,e){let r=e,i=1/0;for(let{level:a}of t)a>r&&(r=a),(a|1)=i;a--)for(let s=0;s=a;)o++;for(let l=s,u=o;le>=n.start&&e<=n.end))==null?void 0:r.level)!=null?i:0}function zv(t,e,r,i,n){let a=Iv(t,e,i,n);Cv(a,r);let s="",o=[];for(let l of Mv(a,r)){if(Fv.test(l.text))continue;let u=Bv(l);s+=u,o.push(...Array(u.length).fill(l.index))}return{text:s,sourceIndices:o}}function Lv(t,e){let r=e.filter(a=>a>0&&aa-s),n=[];for(let a=0;a+1n.start))).map(([n,a])=>zv(t,r,Pv(i,n),n,a))}function Vv(t,e){return Rd(t,e).map(r=>r.text)}function Ov(t,e,r){return Rd(t,r).map(i=>[i.text,i.sourceIndices.map(n=>{var a;return(a=e[n])!=null?a:0})])}var il=4294967296,Ac=1/il,Sc=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),au=class{constructor(t){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(t,e,r=this.length){let i;for(;i=this.nextField(r);)t(i,e,this);return e}readMessage(t,e){return this.readFields(t,e,this.readVarint()+this.pos)}readFixed32(){let t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){let t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*il;return this.pos+=8,t}readSFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*il;return this.pos+=8,t}readFloat(){let t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){let t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){let e=this.buf,r=e[this.pos++];if(r<128)return r;let i=r&127,n;return n=e[this.pos++],i|=(n&127)<<7,n<128||(n=e[this.pos++],i|=(n&127)<<14,n<128)||(n=e[this.pos++],i|=(n&127)<<21,n<128)?i:(n=e[this.pos],i|=(n&15)<<28,$v(i,t,this))}readSVarint(){let t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return!!this.readVarint()}readString(){let t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Sc?Sc.decode(this.buf.subarray(e,t)):tb(this.buf,e,t)}readBytes(){let t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}readPackedVarint(t=[],e){let r=this.readPackedEnd();for(;this.pos=t)return 0;let e=this.readVarint();return this.type=e&7,this._valueStart=this.pos,e>>>3}skip(t){let e=t&7;if(e===0)for(;this.buf[this.pos++]>127;);else if(e===2)this.pos=this.readVarint()+this.pos;else if(e===5)this.pos+=4;else if(e===1)this.pos+=8;else throw Error(`Unimplemented type: ${e}`)}},Rv=class{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.length=this.buf.length}writeTag(t,e){this.writeVarint(t<<3|e)}realloc(t){let e=this.length||16;for(;e=0&&t<128){this.pos>=this.length&&this.realloc(1),this.buf[this.pos++]=t;return}if(t>268435455||t<0){Uv(t,this);return}this.realloc(4),this.buf[this.pos++]=t&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127)))}writeSVarint(t){this.writeVarint(t<0?-t*2-1:t*2)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(t.length*4),this.pos++;let e=this.pos;this.pos=eb(this.buf,t,this.pos);let r=this.pos-e;r>=128&&Ec(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){let e=t.length;this.writeVarint(e),this.realloc(e),this.buf.set(t,this.pos),this.pos+=e}writeRawMessage(t,e){this.pos++;let r=this.pos;t(e,this);let i=this.pos-r;i>=128&&Ec(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i}writeMessage(t,e,r){this.writeTag(t,2),this.writeRawMessage(e,r)}writePackedVarint(t,e){e.length&&this.writeMessage(t,Gv,e)}writePackedSVarint(t,e){e.length&&this.writeMessage(t,Xv,e)}writePackedBoolean(t,e){e.length&&this.writeMessage(t,Zv,e)}writePackedFloat(t,e){e.length&&this.writeMessage(t,Yv,e)}writePackedDouble(t,e){e.length&&this.writeMessage(t,Wv,e)}writePackedFixed32(t,e){e.length&&this.writeMessage(t,Hv,e)}writePackedSFixed32(t,e){e.length&&this.writeMessage(t,Kv,e)}writePackedFixed64(t,e){e.length&&this.writeMessage(t,Jv,e)}writePackedSFixed64(t,e){e.length&&this.writeMessage(t,Qv,e)}writeBytesField(t,e){this.writeTag(t,2),this.writeBytes(e)}writeFixed32Field(t,e){this.writeTag(t,5),this.writeFixed32(e)}writeSFixed32Field(t,e){this.writeTag(t,5),this.writeSFixed32(e)}writeFixed64Field(t,e){this.writeTag(t,1),this.writeFixed64(e)}writeSFixed64Field(t,e){this.writeTag(t,1),this.writeSFixed64(e)}writeVarintField(t,e){this.writeTag(t,0),this.writeVarint(e)}writeSVarintField(t,e){this.writeTag(t,0),this.writeSVarint(e)}writeStringField(t,e){this.writeTag(t,2),this.writeString(e)}writeFloatField(t,e){this.writeTag(t,5),this.writeFloat(e)}writeDoubleField(t,e){this.writeTag(t,1),this.writeDouble(e)}writeBooleanField(t,e){this.writeVarintField(t,+e)}};function $v(t,e,r){let i=r.buf,n,a;if(a=i[r.pos++],n=(a&112)>>4,a<128||(a=i[r.pos++],n|=(a&127)<<3,a<128)||(a=i[r.pos++],n|=(a&127)<<10,a<128)||(a=i[r.pos++],n|=(a&127)<<17,a<128)||(a=i[r.pos++],n|=(a&127)<<24,a<128)||(a=i[r.pos++],n|=(a&1)<<31,a<128))return Nv(t,n,e);throw Error("Expected varint not more than 10 bytes")}function Nv(t,e,r){return r?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function Uv(t,e){let r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(r=~(-t%4294967296),i=~(-t/4294967296),r^4294967295?r=r+1|0:(r=0,i=i+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw Error("Given varint doesn\'t fit into 10 bytes");e.realloc(10),qv(r,i,e),jv(i,e)}function qv(t,e,r){r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos]=t&127}function jv(t,e){let r=(t&7)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function Ec(t,e,r){let i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));r.realloc(i),r.buf.copyWithin(t+i,t,r.pos)}function Gv(t,e){let r=t.length,i=e.buf,n=e.pos,a=e.length;for(let s=0;sa){e.pos=n,e.writeVarint(o),i=e.buf,n=e.pos,a=e.length;continue}for(;o>127;)i[n++]=o%128|128,o=Math.floor(o/128);i[n++]=o}e.pos=n}function Xv(t,e){for(let r=0;r239?4:a>223?3:a>191?2:1;if(n+o>r)break;let l,u,h;o===1?a<128&&(s=a):o===2?(l=t[n+1],(l&192)==128&&(s=(a&31)<<6|l&63,s<=127&&(s=null))):o===3?(l=t[n+1],u=t[n+2],(l&192)==128&&(u&192)==128&&(s=(a&15)<<12|(l&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):o===4&&(l=t[n+1],u=t[n+2],h=t[n+3],(l&192)==128&&(u&192)==128&&(h&192)==128&&(s=(a&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,o=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=o}return i}function eb(t,e,r){for(let i=0,n,a;i55295&&n<57344)if(a){if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,a=n;continue}n=a-55296<<10|n-56320|65536,a=null}else{n>56319||i+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):a=n;continue}else a&&(a=(t[r++]=239,t[r++]=191,t[r++]=189,null));n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=n&63|128)}return r}function rb(t){return typeof(t==null?void 0:t.renderWithWebGL)=="function"}function su(t){let e=0,r=0;for(let s of t)e+=s.w*s.h,r=Math.max(r,s.w);t.sort((s,o)=>o.h-s.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],n=0,a=0;for(let s of t)for(let o=i.length-1;o>=0;o--){let l=i[o];if(!(s.w>l.w||s.h>l.h)){if(s.x=l.x,s.y=l.y,a=Math.max(a,s.y+s.h),n=Math.max(n,s.x+s.w),s.w===l.w&&s.h===l.h){let u=i.pop();u&&o=r;a--)e.push(a);r=i+1}else{for(let a=r;at.toCodeUnitIndex(a)),i=wr.isParsed()?wr:null;if(t.sections.length===1)return i?i.processBidirectionalText(t.toString(),r).map(a=>kc(a,t.sections,[...a].map(()=>0))):Vv(t.toString(),r).map(a=>nl([...a],t.sections,[...a].map(()=>0)));let n=sb(t);return i?i.processStyledBidirectionalText(t.text,n,r).map(([a,s])=>kc(a,t.sections,s)):Ov(t.text,n,r).map(([a,s])=>{let o=[...a];return nl(o,t.sections,Ud(o).map(l=>{var u;return(u=s[l])!=null?u:0}))})}function nl(t,e,r){var a;let i=new iu(t.join(""),e,[]),n=0;for(let s of i.graphemes())i.sectionIndex.push((a=r[n])!=null?a:0),n+=[...s].length;return i}function Ud(t){let e=[],r=0;for(let i of t)e.push(r),r+=i.length;return e}function kc(t,e,r){let i=[...t],n=Ud(i),a=ab(i);return nl(a.map(s=>i[s]),e,a.map(s=>{var o;return(o=r[n[s]])!=null?o:0}))}function ra(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d){let y=iu.fromFeature(t,n);c===2&&y.verticalizePunctuation();let m=y.determineLineBreaks(u,a,e,i,f),g=Vd(y.text)?ob(y,m):nb(y,m),x=[],v={positionedLines:x,text:y.toString(),top:h[1],bottom:h[1],left:h[0],right:h[0],writingMode:c,iconsInText:!1,verticalizable:!1};return mb(v,e,r,i,g,s,o,l,c,u,p,d),!ib(x)&&v}function qd(t){let e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function lb(t,e,r){let i=e.getMaxScale()*24,{maxImageWidth:n,maxImageHeight:a}=e.getMaxImageSize(t),s=Math.max(i,a*r);return{verticalLineContentWidth:Math.max(i,n*r),horizontalLineContentHeight:s}}function jd(t){switch(t){case"top":return 0;case"center":return .5;default:return 1}}function ub(t,e,r,i){var a;if(t!=null&&t.rect)return t;let n=(a=e[r.fontStack])==null?void 0:a[i];return n?{rect:null,metrics:n.metrics}:null}function hb(t,e,r){return!(t===1||!e&&!Qa(r)||e&&(ru(r)||zd(r)))}function da(t){return new RegExp("\\\\p{Nd}","u").test(String.fromCodePoint(t))}function Gd(t){return new RegExp("\\\\p{Lu}","u").test(String.fromCodePoint(t))}function cb(t){return/[\\p{P}\\p{S}]/u.test(String.fromCodePoint(t))}function pb(t){let e=t.some(da)&&t.every(i=>da(i)||cb(i)),r=t.length<=3&&t.every(i=>Gd(i)||da(i));return e||r}function fb(t){return(da(t)||Gd(t))&&!zd(t)}function db(t,e){let r=!1;for(let i=0;ia.codePointAt(0)),i=r.map(Qa),n=a=>!i[a]&&!ru(r[a])&&!("imageName"in t.getSection(a));for(let a=0;au){let p=Math.ceil(i/u);r*=p/n,n=p}return{x1:e,y1:r,x2:e+i,y2:r+n}}function Tc(t,e,r,i,n,a){let s=t.image,o;if(s.content){let m=s.content,g=s.pixelRatio||1;o=[m[0]/g,m[1]/g,s.displaySize[0]-m[2]/g,s.displaySize[1]-m[3]/g]}let l=e.left*a,u=e.right*a,h,c,p,f;r==="width"||r==="both"?(f=n[0]+l-i[3],c=n[0]+u+i[1]):(f=n[0]+(l+u-s.displaySize[0])/2,c=f+s.displaySize[0]);let d=e.top*a,y=e.bottom*a;return r==="height"||r==="both"?(h=n[1]+d-i[0],p=n[1]+y+i[2]):(h=n[1]+(d+y-s.displaySize[1])/2,p=h+s.displaySize[1]),{image:s,top:h,right:c,bottom:p,left:f,collisionPadding:o}}var Ic=32640;function Cc(t,e){let{expression:r}=e;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new st(t+1))};if(r.kind==="source")return{kind:"source"};if(r.kind==="composite"){let{minZoom:i,maxZoom:n}=Db(r.zoomStops,t);return{kind:"composite",minZoom:i,maxZoom:n,interpolationType:r.interpolationType}}{let i=_b(r),n=r.evaluate(new st(t+1));return{kind:"camera",zoomStops:r.zoomStops,sizes:i,layoutSize:n,interpolationType:r.interpolationType}}}function Db(t,e){let r=0;for(;rt.evaluate(new st(e===-1/0?t.zoomStops[1]-1:e)))}var Jr=class Yd extends B{constructor(e,r,i,n){super(e,r),this.angle=i,n!==void 0&&(this.segment=n)}clone(){return new Yd(this.x,this.y,this.angle,this.segment)}};C("Anchor",Jr);function Wd(t,e,r,i,n){if(e.segment===void 0||r===0)return!0;let a=e,s=e.segment+1,o=0;for(;o>-r/2;){if(s--,s<0)return!1;o-=t[s].dist(a),a=t[s]}o+=t[s].dist(t[s+1]),s++;let l=[],u=0;for(;oi;)u-=l.shift().angleDelta;if(u>n)return!1;s++,o+=c.dist(p)}return!0}function Zd(t){let e=0;for(let r=0;ru){let d=(u-l)/f,y=new Jr(gr.number(c.x,p.x,d),gr.number(c.y,p.y,d),p.angleTo(c),h);return y._round(),!s||Wd(t,y,o,s,e)?y:void 0}l+=f}}function Sb(t,e,r,i,n,a,s,o,l){let u=Hd(i,a,s),h=Kd(i,n),c=h*s,p=t[0].x===0||t[0].x===l||t[0].y===0||t[0].y===l;e-c=0&&b=0&&D=0&&p+u<=h){let A=new Jr(b,D,x,d);A._round(),(!i||Wd(t,A,a,i,n))&&f.push(A)}}c+=g}return!o&&!f.length&&!s&&(f=Jd(t,c/2,r,i,n,a,s,!0,l)),f}function Eb(t,e,r,i,n){let a=[];for(let s of t){let o;for(let l=0;l=i&&h.x>=i)&&(u.x>=i?u=new B(i,u.y+(h.y-u.y)*((i-u.x)/(h.x-u.x)))._round():h.x>=i&&(h=new B(i,u.y+(h.y-u.y)*((i-u.x)/(h.x-u.x)))._round()),!(u.y>=n&&h.y>=n)&&(u.y>=n?u=new B(u.x+(h.x-u.x)*((n-u.y)/(h.y-u.y)),n)._round():h.y>=n&&(h=new B(u.x+(h.x-u.x)*((n-u.y)/(h.y-u.y)),n)._round()),(!o||!u.equals(o[o.length-1]))&&(o=[u],a.push(o)),o.push(h)))))}}return a}function Qd(t,e,r,i,n,a){let s=Mc(t,e,r,n,0);return s=Mc(s,e,i,a,1),s}function Mc(t,e,r,i,n){switch(e){case 1:return Fb(t,r,i,n);case 2:return Bc(t,r,i,n,!1);case 3:return Bc(t,r,i,n,!0)}return[]}function Fb(t,e,r,i){let n=[];for(let a of t)for(let s of a){let o=i===0?s.x:s.y;o>=e&&o<=r&&n.push([s])}return n}function kb(t,e,r,i,n){let a=i===0?Tb:Ib,s=[],o=[];for(let h=0;he&&s.push(a(c,p,e)):f>r?d=e&&(s.push(a(c,p,e)),y=!0),d>r&&f<=r&&(s.push(a(c,p,r)),y=!0),!n&&y&&(o.push(s),s=[])}let l=t.length-1,u=i===0?t[l].x:t[l].y;return u>=e&&u<=r&&s.push(t[l]),n&&s.length>0&&!s[0].equals(s[s.length-1])&&s.push(new B(s[0].x,s[0].y)),s.length>0&&o.push(s),o}function Bc(t,e,r,i,n){let a=[];for(let s of t){let o=kb(s,e,r,i,n);o.length>0&&a.push(...o)}return a}function Tb(t,e,r){let i=(r-t.x)/(e.x-t.x);return new B(r,t.y+(e.y-t.y)*i)}function Ib(t,e,r){let i=(r-t.y)/(e.y-t.y);return new B(t.x+(e.x-t.x)*i,r)}function Pc(t,e,r,i){let n=[],a=t.image,s=a.pixelRatio,o=a.paddedRect.w-2,l=a.paddedRect.h-2,u={x1:t.left,y1:t.top,x2:t.right,y2:t.bottom},h=a.stretchX||[[0,o]],c=a.stretchY||[[0,l]],p=(F,$)=>F+$[1]-$[0],f=h.reduce(p,0),d=c.reduce(p,0),y=o-f,m=l-d,g=0,x=f,v=0,b=d,D=0,A=y,_=0,S=m;if(a.content&&i){let F=a.content,$=F[2]-F[0],U=F[3]-F[1];(a.textFitWidth||a.textFitHeight)&&(u=Xd(t)),g=ia(h,0,F[0]),v=ia(c,0,F[1]),x=ia(h,F[0],F[2]),b=ia(c,F[1],F[3]),D=F[0]-g,_=F[1]-v,A=$-x,S=U-b}let k=u.x1,z=u.y1,O=u.x2-k,P=u.y2-z,L=(F,$,U,T)=>{let q=na(F.stretch-g,x,O,k),at=aa(F.fixed-D,A,F.stretch,f),ot=na($.stretch-v,b,P,z),pt=aa($.fixed-_,S,$.stretch,d),Et=na(U.stretch-g,x,O,k),qt=aa(U.fixed-D,A,U.stretch,f),Ht=na(T.stretch-v,b,P,z),Ve=aa(T.fixed-_,S,T.stretch,d),ye=new B(q,ot),Kt=new B(Et,ot),Oe=new B(Et,Ht),kr=new B(q,Ht),rr=new B(at/s,pt/s),fi=new B(qt/s,Ve/s),kt=e*Math.PI/180;if(kt){let R=Math.sin(kt),J=Math.cos(kt),W=[J,-R,R,J];ye._matMult(W),Kt._matMult(W),kr._matMult(W),Oe._matMult(W)}let Ee=F.stretch+F.fixed,ir=U.stretch+U.fixed,Tr=$.stretch+$.fixed,Ir=T.stretch+T.fixed;return{tl:ye,tr:Kt,bl:kr,br:Oe,tex:{x:a.paddedRect.x+1+Ee,y:a.paddedRect.y+1+Tr,w:ir-Ee,h:Ir-Tr},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:rr,pixelOffsetBR:fi,minFontScaleX:A/s/O,minFontScaleY:S/s/P,isSDF:r}};if(!i||!a.stretchX&&!a.stretchY)n.push(L({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:o+1},{fixed:0,stretch:l+1}));else{let F=zc(h,y,f),$=zc(c,m,d);for(let U=0;U0&&(d=Math.max(10,d),this.circleDiameter=d)}else{let c=(h=a.image)!=null&&h.content&&(a.image.textFitWidth||a.image.textFitHeight)?Xd(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};c.y1=c.y1*s-o[0],c.y2=c.y2*s+o[2],c.x1=c.x1*s-o[3],c.x2=c.x2*s+o[1];let p=a.collisionPadding;if(p&&(c.x1-=p[0]*s,c.y1-=p[1]*s,c.x2+=p[2]*s,c.y2+=p[3]*s),u){let f=new B(c.x1,c.y1),d=new B(c.x2,c.y1),y=new B(c.x1,c.y2),m=new B(c.x2,c.y2),g=u*Math.PI/180;f._rotate(g),d._rotate(g),y._rotate(g),m._rotate(g),c.x1=Math.min(f.x,d.x,y.x,m.x),c.x2=Math.max(f.x,d.x,y.x,m.x),c.y1=Math.min(f.y,d.y,y.y,m.y),c.y2=Math.max(f.y,d.y,y.y,m.y)}t.emplaceBack(e.x,e.y,c.x1,c.y1,c.x2,c.y2,r,i,n)}this.boxEndIndex=t.length}},Mb=class{constructor(t=[],e=(r,i)=>ri)){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:r}=this,i=e[t];for(;t>0;){let n=t-1>>1,a=e[n];if(r(i,a)>=0)break;e[t]=a,t=n}e[t]=i}_down(t){let{data:e,compare:r}=this,i=this.length>>1,n=e[t];for(;t=0)break;e[t]=e[a],t=a}e[t]=n}};function Bb(t,e=1){let r=Fa.fromPoints(t[0]),i=Math.min(r.width(),r.height()),n=i/2,a=new Mb([],Pb),{minX:s,minY:o,maxX:l,maxY:u}=r;if(i===0)return new B(s,o);for(let p=s;pc.d||!c.d)&&(c=p),!(p.max-c.d<=e)&&(n=p.h/2,a.push(new qr(p.p.x-n,p.p.y-n,n,t)),a.push(new qr(p.p.x+n,p.p.y-n,n,t)),a.push(new qr(p.p.x-n,p.p.y+n,n,t)),a.push(new qr(p.p.x+n,p.p.y+n,n,t)))}return h.d>0&&c.d-h.d<=e?h.p:c.p}function Pb(t,e){return e.max-t.max}var qr=class{constructor(t,e,r,i){this.p=new B(t,e),this.h=r,this.d=zb(this.p,i),this.max=this.d+this.h*Math.SQRT2}};function zb(t,e){let r=!1,i=1/0;for(let n of e)for(let a=0,s=n.length,o=s-1;at.y!=u.y>t.y&&t.x<(u.x-l.x)*(t.y-l.y)/(u.y-l.y)+l.x&&(r=!r),i=Math.min(i,td(t,l,u))}return(r?1:-1)*Math.sqrt(i)}function Lb(t){let e=0,r=0,i=0,n=t[0];for(let a=0,s=n.length,o=s-1;ap*24);h.startsWith("top")?c[1]-=7:h.startsWith("bottom")&&(c[1]+=7),l[u+1]=c}return new De(l)}let a=i.get("text-variable-anchor");if(a){let o;o=t._unevaluatedLayout.getValue("text-radial-offset")===void 0?i.get("text-offset").evaluate(e,{},r).map(u=>u*24):[i.get("text-radial-offset").evaluate(e,{},r)*24,lu];let l=[];for(let u of a)l.push(u,ty(u,o));return new De(l)}return null}function Ob(t){var h,c;t.bucket.createArrays();let e=512*t.bucket.overscaling;t.bucket.tilePixelRatio=mt/e,t.bucket.compareText={},t.bucket.iconsNeedLinear=!1;let r=t.bucket.layers[0],i=r.layout,n=r._unevaluatedLayout._values,a={layoutIconSize:n["icon-size"].possiblyEvaluate(new st(t.bucket.zoom+1),t.canonical),layoutTextSize:n["text-size"].possiblyEvaluate(new st(t.bucket.zoom+1),t.canonical),textMaxSize:n["text-size"].possiblyEvaluate(new st(18))};if(t.bucket.textSizeData.kind==="composite"){let{minZoom:p,maxZoom:f}=t.bucket.textSizeData;a.compositeTextSizes=[n["text-size"].possiblyEvaluate(new st(p),t.canonical),n["text-size"].possiblyEvaluate(new st(f),t.canonical)]}if(t.bucket.iconSizeData.kind==="composite"){let{minZoom:p,maxZoom:f}=t.bucket.iconSizeData;a.compositeIconSizes=[n["icon-size"].possiblyEvaluate(new st(p),t.canonical),n["icon-size"].possiblyEvaluate(new st(f),t.canonical)]}let s=i.get("text-line-height")*24,o=i.get("text-rotation-alignment")!=="viewport"&&i.get("symbol-placement")!=="point",l=i.get("text-keep-upright"),u=i.get("text-size");for(let p of t.bucket.features){let f=i.get("text-font").evaluate(p,{},t.canonical).join(","),d=u.evaluate(p,{},t.canonical),y=a.layoutTextSize.evaluate(p,{},t.canonical),m=a.layoutIconSize.evaluate(p,{},t.canonical),g={horizontal:{},vertical:void 0},x=p.text,v=[0,0];if(x){let _=x.toString(),S=i.get("text-letter-spacing").evaluate(p,{},t.canonical)*24,k=bv(_)?S:0,z=i.get("text-anchor").evaluate(p,{},t.canonical),O=ey(r,p,t.canonical);if(!O){let $=i.get("text-radial-offset").evaluate(p,{},t.canonical);v=$?ty(z,[$*24,lu]):i.get("text-offset").evaluate(p,{},t.canonical).map(U=>U*24)}let P=o?"center":i.get("text-justify").evaluate(p,{},t.canonical),L=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(p,{},t.canonical)*24:1/0,F=()=>{t.bucket.allowVerticalPlacement&&el(_)&&(g.vertical=ra(x,t.glyphMap,t.glyphPositions,t.imagePositions,f,L,s,z,"left",k,v,2,!0,y,d))};if(!o&&O){let $=new Set;if(P==="auto")for(let T=0;T{T.x<0||T.x>=8192||T.y<0||T.y>=8192||Nb(t,T,U,r,i,n,L,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,[D,D,D,D],S,l,v,A,k,d,e,a,u,h,s)};if(z==="line")for(let U of Eb(e.geometry,0,0,mt,mt)){let T=cr(U,F),q=Sb(T,b,_,r.vertical||y,i,24,x,t.overscaling,mt);for(let at of q){let ot=y;(!ot||!Ub(t,ot.text,O,at))&&$(T,at)}}else if(z==="line-center"){for(let U of e.geometry)if(U.length>1){let T=cr(U,F),q=Ab(T,_,r.vertical||y,i,24,x);q&&$(T,q)}}else if(e.type==="Polygon")for(let U of Ra(e.geometry,0)){let T=Bb(U,16);$(cr(U[0],F,!0),new Jr(T.x,T.y,0))}else if(e.type==="LineString")for(let U of e.geometry){let T=cr(U,F);$(T,new Jr(T[0].x,T[0].y,0))}else if(e.type==="Point")for(let U of e.geometry)for(let T of U)$([T],new Jr(T.x,T.y,0))}function $b(t,e){let r=t.length,i=e==null?void 0:e.values;if((i==null?void 0:i.length)>0)for(let n=0;n32640&&Bt(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):g.kind==="composite"&&(x=[128*d.compositeTextSizes[0].evaluate(s,{},y),128*d.compositeTextSizes[1].evaluate(s,{},y)],(x[0]>32640||x[1]>32640)&&Bt(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),t.addSymbols(t.text,m,x,o,a,s,h,e,u.lineStartIndex,u.lineLength,f,y,l);for(let v of c)p[v]=t.text.placedSymbolArray.length-1;return m.length*4}function ry(t){for(let e in t)return t[e];return null}function Nb(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S){let k=t.addToLineVertexArray(e,r),z=o.layout.get("symbol-height-offset").evaluate(b,{},_);z>t.maxHeightOffset&&(t.maxHeightOffset=z);let O,P,L,F,$=0,U=0,T=0,q=0,at=-1,ot=-1,pt={},Et=(0,Mo.default)("");if(t.allowVerticalPlacement&&i.vertical){let J=o.layout.get("text-rotate").evaluate(b,{},_)+90,W=i.vertical;L=new sa(l,e,u,h,c,W,p,f,d,J),s&&(F=new sa(l,e,u,h,c,s,m,g,d,J))}if(n){let J=o.layout.get("icon-rotate").evaluate(b,{}),W=o.layout.get("icon-text-fit")!=="none",M=Pc(n,J,A,W),ut=s?Pc(s,J,A,W):void 0;P=new sa(l,e,u,h,c,n,m,g,!1,J),$=M.length*4;let X=t.iconSizeData,G=null;X.kind==="source"?(G=[128*o.layout.get("icon-size").evaluate(b,{})],G[0]>32640&&Bt(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):X.kind==="composite"&&(G=[128*D.compositeIconSizes[0].evaluate(b,{},_),128*D.compositeIconSizes[1].evaluate(b,{},_)],(G[0]>32640||G[1]>32640)&&Bt(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),t.addSymbols(t.icon,M,G,v,x,b,0,e,k.lineStartIndex,k.lineLength,-1,_,z),at=t.icon.placedSymbolArray.length-1,ut&&(U=ut.length*4,t.addSymbols(t.icon,ut,G,v,x,b,2,e,k.lineStartIndex,k.lineLength,-1,_,z),ot=t.icon.placedSymbolArray.length-1)}let qt=Object.keys(i.horizontal);for(let J of qt){let W=i.horizontal[J];O||(O=(Et=(0,Mo.default)(W.text),new sa(l,e,u,h,c,W,p,f,d,o.layout.get("text-rotate").evaluate(b,{},_))));let M=W.positionedLines.length===1;if(T+=Vc(t,e,W,a,o,d,b,y,z,k,i.vertical?1:3,M?qt:[J],pt,at,D,_),M)break}i.vertical&&(q+=Vc(t,e,i.vertical,a,o,d,b,y,z,k,2,["vertical"],pt,ot,D,_));let Ht=O?O.boxStartIndex:t.collisionBoxArray.length,Ve=O?O.boxEndIndex:t.collisionBoxArray.length,ye=L?L.boxStartIndex:t.collisionBoxArray.length,Kt=L?L.boxEndIndex:t.collisionBoxArray.length,Oe=P?P.boxStartIndex:t.collisionBoxArray.length,kr=P?P.boxEndIndex:t.collisionBoxArray.length,rr=F?F.boxStartIndex:t.collisionBoxArray.length,fi=F?F.boxEndIndex:t.collisionBoxArray.length,kt=-1,Ee=(J,W)=>J!=null&&J.circleDiameter?Math.max(J.circleDiameter,W):W;kt=Ee(O,kt),kt=Ee(L,kt),kt=Ee(P,kt),kt=Ee(F,kt);let ir=+(kt>-1);ir&&(kt*=S/24),t.glyphOffsetArray.length>=t.maxGlyphs&&Bt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),b.sortKey!==void 0&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);let Tr=ey(o,b,_),[Ir,R]=$b(t.textAnchorOffsets,Tr);t.symbolInstances.emplaceBack(e.x,e.y,pt.right>=0?pt.right:-1,pt.center>=0?pt.center:-1,pt.left>=0?pt.left:-1,pt.vertical||-1,at,ot,Et,Ht,Ve,ye,Kt,Oe,kr,rr,fi,u,T,q,$,U,ir,0,p,kt,Ir,R,z)}function Ub(t,e,r,i){let n=t.compareText;if(!(e in n))n[e]=[];else{let a=n[e];for(let s=a.length-1;s>=0;s--)if(i.dist(a[s])s.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Cc(this.zoom,e["text-size"]),this.iconSizeData=Cc(this.zoom,e["icon-size"]);let r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap=Oc(r,"text-overlap","text-allow-overlap")!=="never"||Oc(r,"icon-overlap","icon-allow-overlap")!=="never"||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey=n!=="viewport-y"&&!i.isConstant();let a=n==="viewport-y"||n==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,r.get("symbol-placement")==="point"&&(this.writingModes=r.get("text-writing-mode").map(s=>Nd[s])),this.stateDependentLayerIds=this.layers.filter(s=>s.isStateDependent()).map(s=>s.id),this.sourceID=t.sourceID}createArrays(){this.text=new al(new vr(this.layers,this.zoom,t=>t.startsWith("text"))),this.icon=new al(new vr(this.layers,this.zoom,t=>t.startsWith("icon"))),this.glyphOffsetArray=new Uf,this.lineVertexArray=new qf,this.symbolInstances=new Nf,this.textAnchorOffsets=new Gf}calculateGlyphDependencies(t,e,r,i,n){var l;let a=(i||this.allowVerticalPlacement)&&n,s=iu.fromFeature(t,r),o=s.graphemes();for(let u=0;u0)&&(a.value.kind!=="constant"||a.value.value.length>0),u=o.value.kind!=="constant"||!!o.value.value||Object.keys(o.parameters).length>0,h=n.get("symbol-sort-key");if(this.features=[],!l&&!u)return;let c=e.iconDependencies,p=e.glyphDependencies,f=e.availableImages,d=new st(this.zoom);for(let{feature:m,id:g,index:x,sourceLayerIndex:v}of t){let b=i._featureFilter.needGeometry,D=hi(m,b);if(!i._featureFilter.filter(d,D,r))continue;b||(D.geometry=Ar(m));let A;if(l){let z=i.getValueAndResolveTokens("text-field",D,r,f),O=ze.factory(z);this.hasRTLText||(this.hasRTLText=Gb(O)),A=gv(O,i,D)}let _;if(u){let z=i.getValueAndResolveTokens("icon-image",D,r,f);_=z instanceof _e?z:_e.fromString(z)}if(!A&&!_)continue;let S=this.sortFeaturesByKey?h.evaluate(D,{},r):void 0,k={id:g,text:A,icon:_,index:x,sourceLayerIndex:v,geometry:D.geometry,properties:m.properties,type:Dn.types[m.type],sortKey:S};if(this.features.push(k),_&&(c[_.name]=!0),A){let z=a.evaluate(D,{},r).join(","),O=n.get("text-rotation-alignment")!=="viewport"&&n.get("symbol-placement")!=="point";this.allowVerticalPlacement=(y=this.writingModes)==null?void 0:y.includes(2);let P=el(A.toString());this.calculateGlyphDependencies(A,p,z,O,P);for(let L of A.sections)L.image&&(c[L.image.name]=!0)}}n.get("symbol-placement")==="line"&&(this.features=xv(this.features)),this.sortFeaturesByKey&&this.features.sort((m,g)=>m.sortKey-g.sortKey)}update(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}))}addFeatures({options:t,canonical:e,glyphMap:r,glyphPositions:i,iconMap:n,iconPositions:a,showCollisionBoxes:s}){Ob({bucket:this,glyphMap:r,glyphPositions:i,imageMap:n,imagePositions:a,showCollisionBoxes:s,canonical:e,subdivisionGranularity:t.subdivisionGranularity})}isEmpty(){return this.symbolInstances.length===0}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,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(t,e){let r=this.lineVertexArray.length;if(t.segment!==void 0){let i=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),a={};for(let s=t.segment+1;s=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s>0&&(n+=e[s-1].dist(e[s]));for(let s=0;s0}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(t,e){let r=t.placedSymbolArray.get(e),i=r.vertexStartIndex+r.numGlyphs*4;for(let n=r.vertexStartIndex;ni[s]-i[o]||n[o]-n[s]),a}addToSortKeyRanges(t,e){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];(r==null?void 0:r.sortKey)===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let e of this.symbolInstanceIndexes){let r=this.symbolInstances.get(e);this.featureSortOrder.push(r.featureIndex);let i=[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex];for(let n=0;n=0&&i.indexOf(a)===n&&this.addIndicesForPlacedSymbol(this.text,a)}r.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,r.verticalPlacedTextSymbolIndex),r.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.placedIconSymbolIndex),r.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}};C("SymbolBucket",iy,{omit:["layers","collisionBoxArray","features","compareText"]});function Xb(t,e){return e.replace(/{([^{}]+)}/g,(r,i)=>t&&i in t?String(t[i]):"")}var Yb,Wb=()=>Yb||(Yb=new Xt({"symbol-placement":new V(w.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new V(w.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new V(w.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new N(w.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new V(w.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new V(w.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new V(w.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new V(w.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new V(w.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new N(w.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new N(w.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new V(w.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new V(w.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new N(w.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new N(w.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new N(w.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new V(w.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new N(w.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new N(w.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new V(w.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new V(w.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new V(w.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new N(w.layout_symbol["text-field"],"text-field"),"text-font":new N(w.layout_symbol["text-font"],"text-font"),"text-size":new N(w.layout_symbol["text-size"],"text-size"),"text-max-width":new N(w.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new V(w.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new N(w.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new N(w.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new N(w.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new V(w.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new N(w.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new N(w.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new V(w.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new V(w.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new N(w.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new V(w.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new V(w.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new N(w.layout_symbol["text-transform"],"text-transform"),"text-offset":new N(w.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new V(w.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new V(w.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new V(w.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new V(w.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new N(w.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new V(w.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})),Zb,Hb=()=>Zb||(Zb=new Xt({"icon-opacity":new N(w.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new N(w.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new N(w.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new N(w.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new N(w.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new V(w.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new V(w.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new N(w.paint_symbol["text-opacity"],"text-opacity"),"text-color":new N(w.paint_symbol["text-color"],"text-color",{runtimeType:ce,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new N(w.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new N(w.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new N(w.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new V(w.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new V(w.paint_symbol["text-translate-anchor"],"text-translate-anchor")})),Ys={get paint(){return Hb()},get layout(){return Wb()}},ny=class{constructor(t){if(t.property.overrides===void 0)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:dn,this.defaultValue=t}evaluate(t){if(t.formattedSection){let e=this.defaultValue.property.overrides;if(e!=null&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){if(!this.defaultValue.isConstant()){let e=this.defaultValue.value;t(e._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}};C("FormatSectionOverride",ny,{omit:["defaultValue"]});var Kb=class ol extends de{constructor(e,r){super(e,Ys,r)}recalculate(e,r){super.recalculate(e,r);let i=this.layout.get("icon-rotation-alignment");if((i.value.kind!=="constant"||i.value.value==="auto")&&(this.layout._values["icon-rotation-alignment"]=new se(i.property,{kind:"constant",value:this.layout.get("symbol-placement")==="point"?"viewport":"map"},i.parameters)),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="point"?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),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").constantOr("viewport")),this.layout.get("symbol-placement")==="point"){let n=this.layout.get("text-writing-mode");if(n){let a=[];for(let s of n)a.includes(s)||a.push(s);this.layout._values["text-writing-mode"]=a}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,r,i,n){let a=this.layout.get(e).evaluate(r,{},i,n),s=this._unevaluatedLayout._values[e];return!s.isDataDriven()&&!ja(s.value)&&a?Xb(r.properties,a):a}createBucket(e){return new iy(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of Ys.paint.overridableProperties){if(!ol.hasPaintOverride(this.layout,e))continue;let r=this.paint.get(e),i=new Il(new ny(r),`layers[${this.id}].paint.${r.property.name}`,r.property.specification),n=null;n=r.value.kind==="constant"||r.value.kind==="source"?new an("source",i):new wa("composite",i,r.value.zoomStops),this.paint._values[e]=new se(r.property,n,r.parameters)}}_handleOverridablePaintPropertyUpdate(e,r,i){return!this.layout||r.isDataDriven()||i.isDataDriven()?!1:ol.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,r){let i=e.get("text-field"),n=Ys.paint.properties[r],a=!1,s=o=>{var l;for(let u of o)if((l=n.overrides)!=null&&l.hasOverride(u)){a=!0;return}};if(i.value.kind==="constant"&&i.value.value instanceof ze)s(i.value.value.sections);else if(i.value.kind==="source"||i.value.kind==="composite"){let o=u=>{if(!a)if(u instanceof ri&&_t(u.value)===yn){let h=u.value;s(h.sections)}else u instanceof Ep?s(u.sections):u.eachChild(o)},l=i.value;l._styleExpression&&o(l._styleExpression.expression)}return a}};function Jb(t,e,r,i=1){var a;let n=(a=t.get("icon-padding").evaluate(e,{},r))==null?void 0:a.values;return[n[0]*i,n[1]*i,n[2]*i,n[3]*i]}var Qb,tw=()=>Qb||(Qb=new Xt({"background-color":new V(w.paint_background["background-color"],"background-color"),"background-pattern":new Lf(w.paint_background["background-pattern"],"background-pattern"),"background-opacity":new V(w.paint_background["background-opacity"],"background-opacity")})),ew={get paint(){return tw()}};var rw=class extends de{constructor(t,e){super(t,ew,e)}};var iw=class extends de{constructor(t,e){super(t,{},e),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=t}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}};function ay(t,e){if(t.type==="custom")return new iw(t,e);switch(t.type){case"background":return new rw(t,e);case"circle":return new Bg(t,e);case"color-relief":return new Yg(t,e);case"fill":return new Ex(t,e);case"fill-extrusion":return new Hx(t,e);case"heatmap":return new Rg(t,e);case"hillshade":return new qg(t,e);case"line":return new G2(t,e);case"raster":return new Xm(t,e);case"symbol":return new Kb(t,e)}}var nw=class{constructor(t){this._methodToThrottle=t,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var t;this._triggered||(this._triggered=!0,(t=this._channel)==null||t.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}},aw={once:!0},sy=class{constructor(t,e){this.target=t,this.mapId=e,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new nw(()=>this.process()),this.subscription=hh(this.target,"message",r=>this.receive(r),!1),this.globalScope=mr(self)?t:window}registerMessageHandler(t,e){this.messageHandlers[t]=e}unregisterMessageHandler(t){delete this.messageHandlers[t]}sendAsync(t,e){return new Promise((r,i)=>{let n=Math.round(Math.random()*1e18).toString(36).substring(0,10),a=e?hh(e.signal,"abort",()=>{a==null||a.unsubscribe(),delete this.resolveRejects[n];let l={id:n,type:"",origin:location.origin,targetMapId:t.targetMapId,sourceMapId:this.mapId};this.target.postMessage(l),i(new dl(e.signal.reason))},aw):null;this.resolveRejects[n]={resolve:l=>{a==null||a.unsubscribe(),r(l)},reject:l=>{a==null||a.unsubscribe(),i(l)}};let s=[],o=Si(je({},t),{id:n,sourceMapId:this.mapId,origin:location.origin,data:Yi(t.data,s)});this.target.postMessage(o,{transfer:s})})}receive(t){let e=t.data,r=e.id,i=["file://","resource://android","null"],n=[e.origin,location.origin],a=e.origin===location.origin,s=n.some(o=>i.includes(o));if((a||s)&&!(e.targetMapId&&this.mapId!==e.targetMapId)){if(e.type===""){delete this.tasks[r];let o=this.abortControllers[r];delete this.abortControllers[r],o&&o.abort();return}if(mr(self)||e.mustQueue){this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger();return}this.processTask(r,e)}}process(){if(this.taskQueue.length===0)return;let t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length>0&&this.invoker.trigger(),e&&this.processTask(t,e)}processTask(t,e){return rt(this,null,function*(){if(e.type===""){let n=this.resolveRejects[t];if(delete this.resolveRejects[t],!n)return;e.error?n.reject(Ki(Wi(e.error))):n.resolve(Wi(e.data));return}if(!this.messageHandlers[e.type]){this.completeTask(t,null,null);return}let r=Wi(e.data),i=new AbortController;this.abortControllers[t]=i;try{let n=yield this.messageHandlers[e.type](e.sourceMapId,r,i);this.completeTask(t,null,n)}catch(n){this.completeTask(t,Ki(n))}})}completeTask(t,e,r){let i=[];delete this.abortControllers[t];let n={id:t,type:"",sourceMapId:this.mapId,origin:location.origin,error:e?Yi(e):null,data:Yi(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}};function sw(t,e,r){return!(t<0||t>25||r<0||r>=2**t||e<0||e>=2**t)}var oy=class{constructor(t,e,r){if(!sw(t,e,r))throw Error(`x=${e}, y=${r}, z=${t} outside of bounds. 0<=x<${2**t}, 0<=y<${2**t} 0<=z<=25 `);this.z=t,this.x=e,this.y=r,this.key=Hi(0,t,t,e,r)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e,r){let i=lw(this.x,this.y,this.z),n=uw(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(r==="tms"?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,e>1?"@2x":"").replace(/{quadkey}/g,n).replace(/{bbox-epsg-3857}/g,i)}isChildOf(t){let e=this.z-t.z;return e>0&&t.x===this.x>>e&&t.y===this.y>>e}getTilePoint(t){let e=2**this.z;return new B((t.x*e-this.x)*mt,(t.y*e-this.y)*mt)}toString(){return`${this.z}/${this.x}/${this.y}`}},ow=class{constructor(t,e){this.wrap=t,this.canonical=e,this.key=Hi(t,e.z,e.z,e.x,e.y)}},uu=class ne{constructor(e,r,i,n,a){if(this.terrainRttPosMatrix32f=null,e= z; overscaledZ = ${e}; z = ${i}`);this.overscaledZ=e,this.wrap=r,this.canonical=new oy(i,+n,+a),this.key=Hi(r,e,i,n,a)}clone(){return new ne(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?new ne(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ne(e,this.wrap,e,this.canonical.x>>r,this.canonical.y>>r)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,r){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let i=this.canonical.z-e;return e>this.canonical.z?Hi(this.wrap*+r,e,this.canonical.z,this.canonical.x,this.canonical.y):Hi(this.wrap*+r,e,e,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(e.overscaledZ===0)return this.overscaledZ>0;let r=this.canonical.z-e.canonical.z;return r<0?!1:e.canonical.x===this.canonical.x>>r&&e.canonical.y===this.canonical.y>>r}children(e){if(this.overscaledZ>=e)return[new ne(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,i=this.canonical.x*2,n=this.canonical.y*2;return[new ne(r,this.wrap,r,i,n),new ne(r,this.wrap,r,i+1,n),new ne(r,this.wrap,r,i,n+1),new ne(r,this.wrap,r,i+1,n+1)]}isLessThan(e){return this.wrape.wrap?!1:this.overscaledZe.overscaledZ?!1:this.canonical.xe.canonical.x?!1:this.canonical.y=0&&e=0&&r=u)return null;let c=this.canonical.x+n,p=this.wrap;return c<0?(p-=Math.ceil(-c/u),c=(c%u+u)%u):c>=u&&(p+=Math.floor(c/u),c%=u),{tileID:new ne(this.overscaledZ,p,l,c,h),x:s,y:o}}};function Hi(t,e,r,i,n){t*=2,t<0&&(t=t*-1-1);let a=1<0;n--){let a=1<pw(n,a,r),t.layers[i])}function pw(t,e,r=""){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);let i={jsonPrefix:r,keys:[],values:[],keycache:{},valuecache:{}};for(let s=0;s>31}function yw(t,e){let r=t.loadGeometry(),i=t.type,n=0,a=0;for(let s of r){let o=1;i===1&&(o=s.length),e.writeVarint(Zs(1,o));let l=i===3?s.length-1:s.length;for(let u=0;u=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${t} can\'t be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}},gw=class{constructor(t,e,r,i,n){this.type="Feature",this._vectorTileFeature=t,this._x=r,this._y=i,this._z=e;for(let a in t.properties)typeof t.properties[a]=="string"&&t.properties[a].startsWith("__$json__:")&&(t.properties[a]=JSON.parse(t.properties[a].slice(10)));this.properties=t.properties,this.id=n}projectPoint(t,e,r,i){return[(t.x+e)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(t.y+r)*2/i)*Math.PI))-90]}projectLine(t,e,r,i){return t.map(n=>this.projectPoint(n,e,r,i))}get geometry(){if(this._geometry)return this._geometry;let t=this._vectorTileFeature,e=t.extent*2**this._z,r=t.extent*this._x,i=t.extent*this._y,n=t.loadGeometry();switch(t.type){case 1:{let a=[];for(let o of n)a.push(o[0]);let s=this.projectLine(a,r,i,e);this._geometry=a.length===1?{type:"Point",coordinates:s[0]}:{type:"MultiPoint",coordinates:s};break}case 2:{let a=n.map(s=>this.projectLine(s,r,i,e));this._geometry=a.length===1?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a};break}case 3:{let a=dd(n),s=[];for(let o of a)s.push(o.map(l=>this.projectLine(l,r,i,e)));this._geometry=s.length===1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s};break}default:throw Error(`unknown feature type: ${t.type}`)}return this._geometry}set geometry(t){this._geometry=t}toJSON(){let t={geometry:this.geometry};for(let e in this)e!=="_geometry"&&e!=="_vectorTileFeature"&&e!=="_x"&&e!=="_y"&&e!=="_z"&&(t[e]=this[e]);return t}},Sr=class{constructor(t,e,r){this._name=t,this.dataBuffer=e,typeof r=="number"?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(t){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(t)?null:this.getValueFromBuffer(t)}has(t){var e;return((e=this.nullabilityBuffer)==null?void 0:e.get(t))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},ts=class extends Sr{},pu=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},fu=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},uy=class extends Sr{constructor(t,e,r,i){super(t,e,i),this.delta=r}},du=class extends uy{constructor(t,e,r,i,n){super(t,n?Int32Array.of(e):Uint32Array.of(e),r,i)}getValueFromBuffer(t){return this.dataBuffer[0]+t*this.delta}},yu=class extends Sr{constructor(t,e,r,i){super(t,i?Int32Array.of(e):Uint32Array.of(e),r)}getValueFromBuffer(t){return this.dataBuffer[0]}},xw=class{constructor(t,e,r,i,n=4096){if(this._name=t,this._geometryVector=e,this._idVector=r,this._propertyVectors=i,this._extent=n,t.length===0)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){var t;return(t=this._propertyVectors)!=null?t:[]}getPropertyVector(t){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this.propertyVectors.map(e=>[e.name,e]))),this.propertyVectorsMap.get(t)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let t=[],e=this.geometryVector.getGeometries();for(let r=0;r>>32-t;var ul=mu,py=65536;function gu(t,e){return t-t%e}function vw(t){return gu(t+31,32)}function bw(t){if(!Number.isFinite(t)||t<=0)return py;let e=gu(Math.floor(t),256);return e===0?256:e}function ww(t){let e=t>>>0;return((e&255)<<24|(e&65280)<<8|e>>>8&65280|e>>>24&255)>>>0}function Dw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0;r[n++]=a>>>0&3,r[n++]=a>>>2&3,r[n++]=a>>>4&3,r[n++]=a>>>6&3,r[n++]=a>>>8&3,r[n++]=a>>>10&3,r[n++]=a>>>12&3,r[n++]=a>>>14&3,r[n++]=a>>>16&3,r[n++]=a>>>18&3,r[n++]=a>>>20&3,r[n++]=a>>>22&3,r[n++]=a>>>24&3,r[n++]=a>>>26&3,r[n++]=a>>>28&3,r[n++]=a>>>30&3,r[n++]=s>>>0&3,r[n++]=s>>>2&3,r[n++]=s>>>4&3,r[n++]=s>>>6&3,r[n++]=s>>>8&3,r[n++]=s>>>10&3,r[n++]=s>>>12&3,r[n++]=s>>>14&3,r[n++]=s>>>16&3,r[n++]=s>>>18&3,r[n++]=s>>>20&3,r[n++]=s>>>22&3,r[n++]=s>>>24&3,r[n++]=s>>>26&3,r[n++]=s>>>28&3,r[n]=s>>>30&3}function _w(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0;r[n++]=a>>>0&7,r[n++]=a>>>3&7,r[n++]=a>>>6&7,r[n++]=a>>>9&7,r[n++]=a>>>12&7,r[n++]=a>>>15&7,r[n++]=a>>>18&7,r[n++]=a>>>21&7,r[n++]=a>>>24&7,r[n++]=a>>>27&7,r[n++]=(a>>>30|(s&1)<<2)&7,r[n++]=s>>>1&7,r[n++]=s>>>4&7,r[n++]=s>>>7&7,r[n++]=s>>>10&7,r[n++]=s>>>13&7,r[n++]=s>>>16&7,r[n++]=s>>>19&7,r[n++]=s>>>22&7,r[n++]=s>>>25&7,r[n++]=s>>>28&7,r[n++]=(s>>>31|(o&3)<<1)&7,r[n++]=o>>>2&7,r[n++]=o>>>5&7,r[n++]=o>>>8&7,r[n++]=o>>>11&7,r[n++]=o>>>14&7,r[n++]=o>>>17&7,r[n++]=o>>>20&7,r[n++]=o>>>23&7,r[n++]=o>>>26&7,r[n]=o>>>29&7}function Aw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0;r[n++]=a>>>0&15,r[n++]=a>>>4&15,r[n++]=a>>>8&15,r[n++]=a>>>12&15,r[n++]=a>>>16&15,r[n++]=a>>>20&15,r[n++]=a>>>24&15,r[n++]=a>>>28&15,r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15,r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n]=l>>>28&15}function Sw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0;r[n++]=a>>>0&31,r[n++]=a>>>5&31,r[n++]=a>>>10&31,r[n++]=a>>>15&31,r[n++]=a>>>20&31,r[n++]=a>>>25&31,r[n++]=(a>>>30|(s&7)<<2)&31,r[n++]=s>>>3&31,r[n++]=s>>>8&31,r[n++]=s>>>13&31,r[n++]=s>>>18&31,r[n++]=s>>>23&31,r[n++]=(s>>>28|(o&1)<<4)&31,r[n++]=o>>>1&31,r[n++]=o>>>6&31,r[n++]=o>>>11&31,r[n++]=o>>>16&31,r[n++]=o>>>21&31,r[n++]=o>>>26&31,r[n++]=(o>>>31|(l&15)<<1)&31,r[n++]=l>>>4&31,r[n++]=l>>>9&31,r[n++]=l>>>14&31,r[n++]=l>>>19&31,r[n++]=l>>>24&31,r[n++]=(l>>>29|(u&3)<<3)&31,r[n++]=u>>>2&31,r[n++]=u>>>7&31,r[n++]=u>>>12&31,r[n++]=u>>>17&31,r[n++]=u>>>22&31,r[n]=u>>>27&31}function Ew(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0;r[n++]=a>>>0&63,r[n++]=a>>>6&63,r[n++]=a>>>12&63,r[n++]=a>>>18&63,r[n++]=a>>>24&63,r[n++]=(a>>>30|(s&15)<<2)&63,r[n++]=s>>>4&63,r[n++]=s>>>10&63,r[n++]=s>>>16&63,r[n++]=s>>>22&63,r[n++]=(s>>>28|(o&3)<<4)&63,r[n++]=o>>>2&63,r[n++]=o>>>8&63,r[n++]=o>>>14&63,r[n++]=o>>>20&63,r[n++]=o>>>26&63,r[n++]=l>>>0&63,r[n++]=l>>>6&63,r[n++]=l>>>12&63,r[n++]=l>>>18&63,r[n++]=l>>>24&63,r[n++]=(l>>>30|(u&15)<<2)&63,r[n++]=u>>>4&63,r[n++]=u>>>10&63,r[n++]=u>>>16&63,r[n++]=u>>>22&63,r[n++]=(u>>>28|(h&3)<<4)&63,r[n++]=h>>>2&63,r[n++]=h>>>8&63,r[n++]=h>>>14&63,r[n++]=h>>>20&63,r[n]=h>>>26&63}function Fw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0;r[n++]=a>>>0&127,r[n++]=a>>>7&127,r[n++]=a>>>14&127,r[n++]=a>>>21&127,r[n++]=(a>>>28|(s&7)<<4)&127,r[n++]=s>>>3&127,r[n++]=s>>>10&127,r[n++]=s>>>17&127,r[n++]=s>>>24&127,r[n++]=(s>>>31|(o&63)<<1)&127,r[n++]=o>>>6&127,r[n++]=o>>>13&127,r[n++]=o>>>20&127,r[n++]=(o>>>27|(l&3)<<5)&127,r[n++]=l>>>2&127,r[n++]=l>>>9&127,r[n++]=l>>>16&127,r[n++]=l>>>23&127,r[n++]=(l>>>30|(u&31)<<2)&127,r[n++]=u>>>5&127,r[n++]=u>>>12&127,r[n++]=u>>>19&127,r[n++]=(u>>>26|(h&1)<<6)&127,r[n++]=h>>>1&127,r[n++]=h>>>8&127,r[n++]=h>>>15&127,r[n++]=h>>>22&127,r[n++]=(h>>>29|(c&15)<<3)&127,r[n++]=c>>>4&127,r[n++]=c>>>11&127,r[n++]=c>>>18&127,r[n]=c>>>25&127}function kw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0;r[n++]=a>>>0&255,r[n++]=a>>>8&255,r[n++]=a>>>16&255,r[n++]=a>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n]=p>>>24&255}function Tw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0;r[n++]=a>>>0&511,r[n++]=a>>>9&511,r[n++]=a>>>18&511,r[n++]=(a>>>27|(s&15)<<5)&511,r[n++]=s>>>4&511,r[n++]=s>>>13&511,r[n++]=s>>>22&511,r[n++]=(s>>>31|(o&255)<<1)&511,r[n++]=o>>>8&511,r[n++]=o>>>17&511,r[n++]=(o>>>26|(l&7)<<6)&511,r[n++]=l>>>3&511,r[n++]=l>>>12&511,r[n++]=l>>>21&511,r[n++]=(l>>>30|(u&127)<<2)&511,r[n++]=u>>>7&511,r[n++]=u>>>16&511,r[n++]=(u>>>25|(h&3)<<7)&511,r[n++]=h>>>2&511,r[n++]=h>>>11&511,r[n++]=h>>>20&511,r[n++]=(h>>>29|(c&63)<<3)&511,r[n++]=c>>>6&511,r[n++]=c>>>15&511,r[n++]=(c>>>24|(p&1)<<8)&511,r[n++]=p>>>1&511,r[n++]=p>>>10&511,r[n++]=p>>>19&511,r[n++]=(p>>>28|(f&31)<<4)&511,r[n++]=f>>>5&511,r[n++]=f>>>14&511,r[n]=f>>>23&511}function Iw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0;r[n++]=a>>>0&1023,r[n++]=a>>>10&1023,r[n++]=a>>>20&1023,r[n++]=(a>>>30|(s&255)<<2)&1023,r[n++]=s>>>8&1023,r[n++]=s>>>18&1023,r[n++]=(s>>>28|(o&63)<<4)&1023,r[n++]=o>>>6&1023,r[n++]=o>>>16&1023,r[n++]=(o>>>26|(l&15)<<6)&1023,r[n++]=l>>>4&1023,r[n++]=l>>>14&1023,r[n++]=(l>>>24|(u&3)<<8)&1023,r[n++]=u>>>2&1023,r[n++]=u>>>12&1023,r[n++]=u>>>22&1023,r[n++]=h>>>0&1023,r[n++]=h>>>10&1023,r[n++]=h>>>20&1023,r[n++]=(h>>>30|(c&255)<<2)&1023,r[n++]=c>>>8&1023,r[n++]=c>>>18&1023,r[n++]=(c>>>28|(p&63)<<4)&1023,r[n++]=p>>>6&1023,r[n++]=p>>>16&1023,r[n++]=(p>>>26|(f&15)<<6)&1023,r[n++]=f>>>4&1023,r[n++]=f>>>14&1023,r[n++]=(f>>>24|(d&3)<<8)&1023,r[n++]=d>>>2&1023,r[n++]=d>>>12&1023,r[n]=d>>>22&1023}function Cw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0;r[n++]=a>>>0&2047,r[n++]=a>>>11&2047,r[n++]=(a>>>22|(s&1)<<10)&2047,r[n++]=s>>>1&2047,r[n++]=s>>>12&2047,r[n++]=(s>>>23|(o&3)<<9)&2047,r[n++]=o>>>2&2047,r[n++]=o>>>13&2047,r[n++]=(o>>>24|(l&7)<<8)&2047,r[n++]=l>>>3&2047,r[n++]=l>>>14&2047,r[n++]=(l>>>25|(u&15)<<7)&2047,r[n++]=u>>>4&2047,r[n++]=u>>>15&2047,r[n++]=(u>>>26|(h&31)<<6)&2047,r[n++]=h>>>5&2047,r[n++]=h>>>16&2047,r[n++]=(h>>>27|(c&63)<<5)&2047,r[n++]=c>>>6&2047,r[n++]=c>>>17&2047,r[n++]=(c>>>28|(p&127)<<4)&2047,r[n++]=p>>>7&2047,r[n++]=p>>>18&2047,r[n++]=(p>>>29|(f&255)<<3)&2047,r[n++]=f>>>8&2047,r[n++]=f>>>19&2047,r[n++]=(f>>>30|(d&511)<<2)&2047,r[n++]=d>>>9&2047,r[n++]=d>>>20&2047,r[n++]=(d>>>31|(y&1023)<<1)&2047,r[n++]=y>>>10&2047,r[n]=y>>>21&2047}function Mw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0,m=t[e+11]>>>0;r[n++]=a>>>0&4095,r[n++]=a>>>12&4095,r[n++]=(a>>>24|(s&15)<<8)&4095,r[n++]=s>>>4&4095,r[n++]=s>>>16&4095,r[n++]=(s>>>28|(o&255)<<4)&4095,r[n++]=o>>>8&4095,r[n++]=o>>>20&4095,r[n++]=l>>>0&4095,r[n++]=l>>>12&4095,r[n++]=(l>>>24|(u&15)<<8)&4095,r[n++]=u>>>4&4095,r[n++]=u>>>16&4095,r[n++]=(u>>>28|(h&255)<<4)&4095,r[n++]=h>>>8&4095,r[n++]=h>>>20&4095,r[n++]=c>>>0&4095,r[n++]=c>>>12&4095,r[n++]=(c>>>24|(p&15)<<8)&4095,r[n++]=p>>>4&4095,r[n++]=p>>>16&4095,r[n++]=(p>>>28|(f&255)<<4)&4095,r[n++]=f>>>8&4095,r[n++]=f>>>20&4095,r[n++]=d>>>0&4095,r[n++]=d>>>12&4095,r[n++]=(d>>>24|(y&15)<<8)&4095,r[n++]=y>>>4&4095,r[n++]=y>>>16&4095,r[n++]=(y>>>28|(m&255)<<4)&4095,r[n++]=m>>>8&4095,r[n]=m>>>20&4095}function Bw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0,m=t[e+11]>>>0,g=t[e+12]>>>0,x=t[e+13]>>>0,v=t[e+14]>>>0,b=t[e+15]>>>0;r[n++]=a>>>0&65535,r[n++]=a>>>16&65535,r[n++]=s>>>0&65535,r[n++]=s>>>16&65535,r[n++]=o>>>0&65535,r[n++]=o>>>16&65535,r[n++]=l>>>0&65535,r[n++]=l>>>16&65535,r[n++]=u>>>0&65535,r[n++]=u>>>16&65535,r[n++]=h>>>0&65535,r[n++]=h>>>16&65535,r[n++]=c>>>0&65535,r[n++]=c>>>16&65535,r[n++]=p>>>0&65535,r[n++]=p>>>16&65535,r[n++]=f>>>0&65535,r[n++]=f>>>16&65535,r[n++]=d>>>0&65535,r[n++]=d>>>16&65535,r[n++]=y>>>0&65535,r[n++]=y>>>16&65535,r[n++]=m>>>0&65535,r[n++]=m>>>16&65535,r[n++]=g>>>0&65535,r[n++]=g>>>16&65535,r[n++]=x>>>0&65535,r[n++]=x>>>16&65535,r[n++]=v>>>0&65535,r[n++]=v>>>16&65535,r[n++]=b>>>0&65535,r[n]=b>>>16&65535}function Pw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0;r[n++]=o>>>0&1,r[n++]=o>>>1&1,r[n++]=o>>>2&1,r[n++]=o>>>3&1,r[n++]=o>>>4&1,r[n++]=o>>>5&1,r[n++]=o>>>6&1,r[n++]=o>>>7&1,r[n++]=o>>>8&1,r[n++]=o>>>9&1,r[n++]=o>>>10&1,r[n++]=o>>>11&1,r[n++]=o>>>12&1,r[n++]=o>>>13&1,r[n++]=o>>>14&1,r[n++]=o>>>15&1,r[n++]=o>>>16&1,r[n++]=o>>>17&1,r[n++]=o>>>18&1,r[n++]=o>>>19&1,r[n++]=o>>>20&1,r[n++]=o>>>21&1,r[n++]=o>>>22&1,r[n++]=o>>>23&1,r[n++]=o>>>24&1,r[n++]=o>>>25&1,r[n++]=o>>>26&1,r[n++]=o>>>27&1,r[n++]=o>>>28&1,r[n++]=o>>>29&1,r[n++]=o>>>30&1,r[n++]=o>>>31&1}}function zw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0;r[n++]=o>>>0&3,r[n++]=o>>>2&3,r[n++]=o>>>4&3,r[n++]=o>>>6&3,r[n++]=o>>>8&3,r[n++]=o>>>10&3,r[n++]=o>>>12&3,r[n++]=o>>>14&3,r[n++]=o>>>16&3,r[n++]=o>>>18&3,r[n++]=o>>>20&3,r[n++]=o>>>22&3,r[n++]=o>>>24&3,r[n++]=o>>>26&3,r[n++]=o>>>28&3,r[n++]=o>>>30&3,r[n++]=l>>>0&3,r[n++]=l>>>2&3,r[n++]=l>>>4&3,r[n++]=l>>>6&3,r[n++]=l>>>8&3,r[n++]=l>>>10&3,r[n++]=l>>>12&3,r[n++]=l>>>14&3,r[n++]=l>>>16&3,r[n++]=l>>>18&3,r[n++]=l>>>20&3,r[n++]=l>>>22&3,r[n++]=l>>>24&3,r[n++]=l>>>26&3,r[n++]=l>>>28&3,r[n++]=l>>>30&3}}function Lw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0;r[n++]=o>>>0&7,r[n++]=o>>>3&7,r[n++]=o>>>6&7,r[n++]=o>>>9&7,r[n++]=o>>>12&7,r[n++]=o>>>15&7,r[n++]=o>>>18&7,r[n++]=o>>>21&7,r[n++]=o>>>24&7,r[n++]=o>>>27&7,r[n++]=(o>>>30|(l&1)<<2)&7,r[n++]=l>>>1&7,r[n++]=l>>>4&7,r[n++]=l>>>7&7,r[n++]=l>>>10&7,r[n++]=l>>>13&7,r[n++]=l>>>16&7,r[n++]=l>>>19&7,r[n++]=l>>>22&7,r[n++]=l>>>25&7,r[n++]=l>>>28&7,r[n++]=(l>>>31|(u&3)<<1)&7,r[n++]=u>>>2&7,r[n++]=u>>>5&7,r[n++]=u>>>8&7,r[n++]=u>>>11&7,r[n++]=u>>>14&7,r[n++]=u>>>17&7,r[n++]=u>>>20&7,r[n++]=u>>>23&7,r[n++]=u>>>26&7,r[n++]=u>>>29&7}}function Vw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0;r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n++]=l>>>28&15,r[n++]=u>>>0&15,r[n++]=u>>>4&15,r[n++]=u>>>8&15,r[n++]=u>>>12&15,r[n++]=u>>>16&15,r[n++]=u>>>20&15,r[n++]=u>>>24&15,r[n++]=u>>>28&15,r[n++]=h>>>0&15,r[n++]=h>>>4&15,r[n++]=h>>>8&15,r[n++]=h>>>12&15,r[n++]=h>>>16&15,r[n++]=h>>>20&15,r[n++]=h>>>24&15,r[n++]=h>>>28&15}}function Ow(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0;r[n++]=o>>>0&31,r[n++]=o>>>5&31,r[n++]=o>>>10&31,r[n++]=o>>>15&31,r[n++]=o>>>20&31,r[n++]=o>>>25&31,r[n++]=(o>>>30|(l&7)<<2)&31,r[n++]=l>>>3&31,r[n++]=l>>>8&31,r[n++]=l>>>13&31,r[n++]=l>>>18&31,r[n++]=l>>>23&31,r[n++]=(l>>>28|(u&1)<<4)&31,r[n++]=u>>>1&31,r[n++]=u>>>6&31,r[n++]=u>>>11&31,r[n++]=u>>>16&31,r[n++]=u>>>21&31,r[n++]=u>>>26&31,r[n++]=(u>>>31|(h&15)<<1)&31,r[n++]=h>>>4&31,r[n++]=h>>>9&31,r[n++]=h>>>14&31,r[n++]=h>>>19&31,r[n++]=h>>>24&31,r[n++]=(h>>>29|(c&3)<<3)&31,r[n++]=c>>>2&31,r[n++]=c>>>7&31,r[n++]=c>>>12&31,r[n++]=c>>>17&31,r[n++]=c>>>22&31,r[n++]=c>>>27&31}}function Rw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0;r[n++]=o>>>0&63,r[n++]=o>>>6&63,r[n++]=o>>>12&63,r[n++]=o>>>18&63,r[n++]=o>>>24&63,r[n++]=(o>>>30|(l&15)<<2)&63,r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=(l>>>28|(u&3)<<4)&63,r[n++]=u>>>2&63,r[n++]=u>>>8&63,r[n++]=u>>>14&63,r[n++]=u>>>20&63,r[n++]=u>>>26&63,r[n++]=h>>>0&63,r[n++]=h>>>6&63,r[n++]=h>>>12&63,r[n++]=h>>>18&63,r[n++]=h>>>24&63,r[n++]=(h>>>30|(c&15)<<2)&63,r[n++]=c>>>4&63,r[n++]=c>>>10&63,r[n++]=c>>>16&63,r[n++]=c>>>22&63,r[n++]=(c>>>28|(p&3)<<4)&63,r[n++]=p>>>2&63,r[n++]=p>>>8&63,r[n++]=p>>>14&63,r[n++]=p>>>20&63,r[n++]=p>>>26&63}}function $w(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0,f=t[a++]>>>0;r[n++]=o>>>0&127,r[n++]=o>>>7&127,r[n++]=o>>>14&127,r[n++]=o>>>21&127,r[n++]=(o>>>28|(l&7)<<4)&127,r[n++]=l>>>3&127,r[n++]=l>>>10&127,r[n++]=l>>>17&127,r[n++]=l>>>24&127,r[n++]=(l>>>31|(u&63)<<1)&127,r[n++]=u>>>6&127,r[n++]=u>>>13&127,r[n++]=u>>>20&127,r[n++]=(u>>>27|(h&3)<<5)&127,r[n++]=h>>>2&127,r[n++]=h>>>9&127,r[n++]=h>>>16&127,r[n++]=h>>>23&127,r[n++]=(h>>>30|(c&31)<<2)&127,r[n++]=c>>>5&127,r[n++]=c>>>12&127,r[n++]=c>>>19&127,r[n++]=(c>>>26|(p&1)<<6)&127,r[n++]=p>>>1&127,r[n++]=p>>>8&127,r[n++]=p>>>15&127,r[n++]=p>>>22&127,r[n++]=(p>>>29|(f&15)<<3)&127,r[n++]=f>>>4&127,r[n++]=f>>>11&127,r[n++]=f>>>18&127,r[n++]=f>>>25&127}}function Nw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0,f=t[a++]>>>0,d=t[a++]>>>0;r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n++]=p>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=d>>>0&255,r[n++]=d>>>8&255,r[n++]=d>>>16&255,r[n++]=d>>>24&255}}function Uw(t,e,r,i){let n=i,a=e;for(let s=0;s<128;s++){let o=t[a++]>>>0;r[n++]=o&65535,r[n++]=o>>>16&65535}}function qw(t,e,r,i,n){let a=ul[n]>>>0,s=e,o=0,l=t[s]>>>0,u=i;for(let h=0;h<8;h++){for(let c=0;c<32;c++)if(o+n<=32){let p=l>>>o&a;r[u+c]=p|0,o+=n,o===32&&(o=0,s++,c!==31&&(l=t[s]>>>0))}else{let p=32-o,f=l>>>o;s++,l=t[s]>>>0;let d=n-p,y=-1>>>32-d>>>0,m=(f|(l&y)<>>0)}}var hl=bw(py),jw=3*hl/256+hl|0;function fy(){let t=new Uint8Array(jw);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:t,byteContainerI32:new Int32Array(t.buffer,t.byteOffset,t.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function Gw(t=16){if(t<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${t}`);let e=Math.max(16,t|0);return{encodedWords:new Uint32Array(e),decoderWorkspace:fy()}}function Xw(t,e){if(e<=t.encodedWords.length)return t.encodedWords;let r=new Uint32Array(Math.max(16,e*2));return t.encodedWords=r,r}function Yw(t,e,r,i){i.byteContainer.length>>2;if(n.byteOffset&3)for(let o=0;o>>8&255,n[u+2|0]=l>>>16&255,n[u+3|0]=l>>>24&255}else{let o=i.byteContainerI32;(!o||o.buffer!==n.buffer||o.byteOffset!==n.byteOffset||o.length>>2)),o.set(t.subarray(e,e+a))}let s=r&3;if(s>0){let o=t[e+a|0]|0,l=a<<2;for(let u=0;u>>(u<<3)&255}return n}function Ww(t,e,r){let i=t[e++]|0,n=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){if(!(i>>>a-1&1))continue;if(e>=t.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${e}, needWords=1, availableWords=${t.length-e}, encodedWords=${t.length})`);let s=t[e++]>>>0,o=vw(s),l=s*a+31>>>5;if(e+l>t.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${s}, streamWordIndex=${e}, needWords=${l}, availableWords=${t.length-e}, encodedWords=${t.length})`);let u=n[a];(!u||u.length>>5)|0,r.exceptionSizes[a]=s}return e}function Zw(t,e,r,i,n){switch(n){case 1:Pw(t,e,r,i);break;case 2:zw(t,e,r,i);break;case 3:Lw(t,e,r,i);break;case 4:Vw(t,e,r,i);break;case 5:Ow(t,e,r,i);break;case 6:Rw(t,e,r,i);break;case 7:$w(t,e,r,i);break;case 8:Nw(t,e,r,i);break;case 16:Uw(t,e,r,i);break;default:qw(t,e,r,i,n)}return e+(n<<3)|0}function Hw(t,e,r,i){if(r+2>e)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${e})`);let n=t[r++],a=t[r++];if(n>32)throw Error(`FastPFOR decode: invalid bitWidth=${n} at block=${i} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:n,exceptionCount:a,bytePosIn:r}}function Kw(t,e,r,i,n,a){if(r+1>e)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${e})`);let s=t[r++];if(s32)throw Error(`FastPFOR decode: invalid maxBits=${s} at block=${a} (bitWidth=${i}, expected ${i}..32)`);let o=s-i|0;if(o<1||o>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${o} at block=${a} (bitWidth=${i}, maxBits=${s})`);if(r+n>e)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${n}, have=${e-r})`);return{maxBits:s,exceptionBitWidth:o,bytePosIn:r}}function Jw(t,e,r,i,n,a,s,o,l){let{maxBits:u,exceptionBitWidth:h,bytePosIn:c}=Kw(n,a,s,r,i,l);if(s=c,h===1){let m=1<y)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${h} (ptr=${d}, need ${i}, size=${y}) at block ${l}`);for(let m=0;m0&&(c=Jw(n,m,d,y,o,l,c,u,p))}if(h!==i)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${e}, packedStart=${r}, consumedPackedEnd=${h}, expectedPackedEnd=${i}, packedWords=${i-r}, encoded.length=${t.length})`)}function t3(t,e,r,i,n,a){let s=r|0,o=t[s]|0;if(o<=0||s+o>t.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${o} at pageStart=${s} (expected > 0 and pageStart+whereMeta < encoded.length=${t.length})`);let l=s+1|0,u=s+o|0,h=t[u]>>>0,c=h+3>>>2,p=u+1,f=p+c;if(f>=t.length)throw Error(`FastPFOR decode: invalid byteSize=${h} (metaInts=${c}, pageStart=${s}, packedEnd=${u}, byteContainerStart=${p}) causes bitmapPos=${f} out of bounds (encoded.length=${t.length})`);let d=Yw(t,p,h,a),y=h,m=Ww(t,f,a);return a.dataPointers.fill(0),Qw(t,s,l,u,e,i|0,n/256|0,d,y,a),m}function e3(t,e,r,i,n,a){let s=i+gu(n,256),o=i,l=r;for(;o!==s;){let u=Math.min(hl,s-o);l=t3(t,e,l,o,u,a),o=o+u|0}return l}function r3(t,e,r,i,n,a){if(a===0)return e;let s=0,o=e,l=e+r,u=n,h=n,c=n+a,p=0,f=0;for(;o>>s&255;if(s+=8,o+=s>>>5,s&=31,p|=(d&127)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${f}, partial=${p}, decoded=${h-u}/${a}, inPos=${o}, inEnd=${l})`)}if(h!==c)throw Error(`FastPFOR VByte: truncated stream (decoded=${h-u}, expected=${a}, consumedWords=${o-e}/${r}, vbyteStart=${e}, vbyteEnd=${l})`);return o}function i3(t,e,r){let i=0,n=0,a=new Uint32Array(e),s=r!=null?r:fy();if(t.length>0){let u=t[i]|0;if(i=i+1|0,u&255)throw Error(`FastPFOR decode: invalid alignedLength=${u} (expected multiple of 256)`);if(n+u>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${u}, out.length=${a.length})`);i=e3(t,a,i,n,u,s),n=n+u|0}let o=t.length-i|0,l=e-n|0;return r3(t,i,o,a,n,l),a}function n3(t,e,r,i,n){switch(n){case 2:Dw(t,e,r,i);return;case 3:_w(t,e,r,i);return;case 4:Aw(t,e,r,i);return;case 5:Sw(t,e,r,i);return;case 6:Ew(t,e,r,i);return;case 7:Fw(t,e,r,i);return;case 8:kw(t,e,r,i);return;case 9:Tw(t,e,r,i);return;case 10:Iw(t,e,r,i);return;case 11:Cw(t,e,r,i);return;case 12:Mw(t,e,r,i);return;case 16:Bw(t,e,r,i);return;case 32:for(let u=0;u<32;u=u+1|0)r[i+u|0]=t[e+u|0]|0;return}let a=ul[n]>>>0,s=e,o=0,l=t[s]>>>0;for(let u=0;u<32;u++)if(o+n<=32){let h=l>>>o&a;r[i+u]=h|0,o+=n,o===32&&(o=0,s++,u!==31&&(l=t[s]>>>0))}else{let h=32-o,c=l>>>o;s++,l=t[s]>>>0;let p=ul[n-h]>>>0,f=(c|(l&p)<t.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${e}, byteLength=${r}, bytes.length=${t.length})`);let n=Math.floor(r/4),a=r%4!=0,s=a?n+1:n;if(i.length0){let o=t.byteOffset+e;if(o&3)for(let l=0;l=64)throw Error("Varint too long")}return e.set(n),r}function o3(t,e,r){let i=new Float64Array(r);for(let n=0;n>4,n<128||(n=e[r.get()],r.increment(),i|=(n&127)<<3,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<10,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<17,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<24,n<128)||(n=e[r.get()],r.increment(),i|=(n&1)<<31,n<128))return i*4294967296+(t>>>0);throw Error("Expected varint not more than 10 bytes")}function h3(t,e,r,i){return c3(t,e,r,i,Gw(r>>>2))}function c3(t,e,r,i,n){let a=i.get();if(r&3)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${a} (encodedBytes.length=${t.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let s=r>>>2,o=Xw(n,s);a3(t,a,r,o);let l=i3(o.subarray(0,s),e,n.decoderWorkspace);return i.add(r),l}function et(t){return t>>>1^-(t&1)}function Ot(t){return t>>BigInt(1)^-(t&BigInt(1))}function We(t){return t%2==1?(t+1)/-2:t/2}function p3(t){let e=new Int32Array(t.length);for(let r=0;r=4)for(;i=4)for(;i=4)for(;r=4)for(let i=t[0];r=4)for(;i=4)for(;l>>0;for(let r=1;r>>0;return e}function jc(t){let e=new BigUint64Array(t.length);e[0]=BigInt.asUintN(64,Ot(t[0]));for(let r=1;r>>0,e[1]=et(t[1])>>>0;for(let r=2;r>>0,e[r+1]=e[r-1]+et(t[r+1])>>>0;return e}function F3(t,e,r,i){let n=yy(t,e,r,i);return new Uint32Array(n)}function k3(t){return t[1]}function T3(t){return et(t[1])}function I3(t){if(t.length===2){let e=et(t[1]);return[e,e]}return[et(t[2]),et(t[3])]}function C3(t){return t[1]}function M3(t){return Ot(t[1])}function B3(t){if(t.length===2){let e=Ot(t[1]);return[e,e]}return[Ot(t[2]),Ot(t[3])]}var St;(function(t){t.PRESENT="PRESENT",t.DATA="DATA",t.OFFSET="OFFSET",t.LENGTH="LENGTH"})(St||(St={}));var jt;(function(t){t.NONE="NONE",t.SINGLE="SINGLE",t.SHARED="SHARED",t.VERTEX="VERTEX",t.MORTON="MORTON",t.FSST="FSST"})(jt||(jt={}));var Me;(function(t){t.VERTEX="VERTEX",t.INDEX="INDEX",t.STRING="STRING",t.KEY="KEY"})(Me||(Me={}));var Ct;(function(t){t.VAR_BINARY="VAR_BINARY",t.GEOMETRIES="GEOMETRIES",t.PARTS="PARTS",t.RINGS="RINGS",t.TRIANGLES="TRIANGLES",t.SYMBOL="SYMBOL",t.DICTIONARY="DICTIONARY"})(Ct||(Ct={}));var P3=[St.PRESENT,St.DATA,St.OFFSET,St.LENGTH],Gc=[H.NONE,H.DELTA,H.COMPONENTWISE_DELTA,H.RLE,H.MORTON],z3=[le.NONE,le.FAST_PFOR,le.VARINT],L3=[jt.NONE,jt.SINGLE,jt.SHARED,jt.VERTEX,jt.MORTON,jt.FSST],V3=[Me.VERTEX,Me.INDEX,Me.STRING,Me.KEY],O3=[Ct.VAR_BINARY,Ct.GEOMETRIES,Ct.PARTS,Ct.RINGS,Ct.TRIANGLES,Ct.SYMBOL,Ct.DICTIONARY];function ct(t,e){let r=N3(t,e);return r.logicalLevelTechnique1===H.MORTON?R3(r,t,e):(H.RLE===r.logicalLevelTechnique1||H.RLE===r.logicalLevelTechnique2)&&le.NONE!==r.physicalLevelTechnique?$3(r,t,e):r}function R3(t,e,r){let i=$t(e,r,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:t.decompressedCount,numBits:i[0],coordinateShift:i[1]}}function $3(t,e,r){let i=$t(e,r,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]}}function N3(t,e){let r=t[e.get()],i=P3[r>>4],n={};switch(i){case St.DATA:n={dictionaryType:L3[r&15]};break;case St.OFFSET:n={offsetType:V3[r&15]};break;case St.LENGTH:n={lengthType:O3[r&15]}}e.increment();let a=t[e.get()],s=Gc[a>>5],o=Gc[a>>2&7],l=z3[a&3];e.increment();let u=$t(t,e,2),h=u[0],c=u[1];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:s,logicalLevelTechnique2:o,physicalLevelTechnique:l,numValues:h,byteLength:c,decompressedCount:h}}var ht;(function(t){t[t.FLAT=0]="FLAT",t[t.CONST=1]="CONST",t[t.SEQUENCE=2]="SEQUENCE",t[t.DICTIONARY=3]="DICTIONARY",t[t.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(ht||(ht={}));var fe=class{constructor(t,e){this.values=t,this._size=e}get(t){let e=Math.floor(t/8),r=t%8;return(this.values[e]>>r&1)==1}set(t,e){let r=Math.floor(t/8),i=t%8;this.values[r]=this.values[r]|+!!e<>r&1}size(){return this._size}getBuffer(){return this.values}};function Er(t,e,r){if(!e)return t;let i=e.size(),n=t.constructor,a=new n(i),s=0;for(let o=0;o=s);){let o=t[i.increment()];if(o<=127){let l=o+3,u=t[i.increment()],h=Math.min(a+l,e);n.fill(u,a,h),a=h}else{let l=256-o;for(let u=0;u=12?X3.decode(t.subarray(e,r)):Y3(t,e,r)}function Y3(t,e,r){let i="",n=e;for(;n239?4:a>223?3:a>191?2:1;if(n+o>r)break;let l,u,h;o===1?a<128&&(s=a):o===2?(l=t[n+1],(l&192)==128&&(s=(a&31)<<6|l&63,s<=127&&(s=null))):o===3?(l=t[n+1],u=t[n+2],(l&192)==128&&(u&192)==128&&(s=(a&15)<<12|(l&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):o===4&&(l=t[n+1],u=t[n+2],h=t[n+3],(l&192)==128&&(u&192)==128&&(h&192)==128&&(s=(a&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,o=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=o}return i}function Ta(t,e,r,i,n){return J3(pi(t,e,r),r,i,n)}function Vt(t,e,r,i,n){return Q3(pi(t,e,r),r,i,n)}function Ze(t,e,r){return e6(pi(t,e,r),r)}function pi(t,e,r){let i=r.physicalLevelTechnique;switch(i){case le.FAST_PFOR:return h3(t,r.numValues,r.byteLength,e);case le.VARINT:return $t(t,e,r.numValues);case le.NONE:return j3(t,e,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function _n(t,e,r){let i=r.physicalLevelTechnique;switch(i){case le.VARINT:return xu(t,e,r.numValues);case le.NONE:return G3(t,e,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function W3(t,e,r){let i=pi(t,e,r);return i.length===1?et(i[0]):T3(i)}function wu(t,e,r){let i=pi(t,e,r);return i.length===1?r.logicalLevelTechnique1===H.DELTA?et(i[0]):i[0]:k3(i)}function vy(t,e,r){return I3(pi(t,e,r))}function by(t,e,r){return B3(xu(t,e,r.numValues))}function wy(t,e,r,i){return _y(_n(t,e,r),r,i)}function Du(t,e,r,i){return Ay(_n(t,e,r),r,i)}function Z3(t,e,r,i){let n=H3(t,e,r,!1);return i?Er(n,i,0):n}function H3(t,e,r,i){if(r.physicalLevelTechnique===le.VARINT)return t6(o3(t,e,r.numValues),r,i);let n=_n(t,e,r),a=i?_y(n,r):Ay(n,r);return Float64Array.from(a,Number)}function K3(t,e,r){let i=_n(t,e,r);return i.length===1?Ot(i[0]):M3(i)}function Dy(t,e,r){let i=_n(t,e,r);return i.length===1?r.logicalLevelTechnique1===H.DELTA?Ot(i[0]):i[0]:C3(i)}function J3(t,e,r,i){let n;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let a=e;if(!i)return A3(t,a.runs,a.numRleValues);t=cl(t,a.runs,a.numRleValues),n=Nc(t)}else n=Nc(t);break;case H.RLE:n=m3(t,e.runs,e.numRleValues);break;case H.MORTON:vu(t),n=new Int32Array(t);break;case H.COMPONENTWISE_DELTA:if(r&&!i)return yy(t,r.scale,r.min,r.max);n=b3(t);break;case H.NONE:n=p3(t);break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return i?Er(n,i,0):n}function Q3(t,e,r,i){let n;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let a=e;n=qc(cl(t,a.runs,a.numRleValues))}else n=qc(t);break;case H.RLE:n=cl(t,e.runs,e.numRleValues);break;case H.MORTON:vu(t),n=t;break;case H.COMPONENTWISE_DELTA:n=r&&!i?F3(t,r.scale,r.min,r.max):E3(t);break;case H.NONE:n=t;break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return i?Er(n,i,0):n}function _y(t,e,r){let i;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let n=e;if(!r)return S3(t,n.runs,n.numRleValues);t=pl(t,n.runs,n.numRleValues),i=Uc(t)}else i=Uc(t);break;case H.RLE:i=g3(t,e.runs,e.numRleValues);break;case H.NONE:i=f3(t);break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?Er(i,r,BigInt(0)):i}function Ay(t,e,r){let i;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let n=e;i=jc(pl(t,n.runs,n.numRleValues))}else i=jc(t);break;case H.RLE:i=pl(t,e.runs,e.numRleValues);break;case H.NONE:i=t;break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?Er(i,r,BigInt(0)):i}function t6(t,e,r){switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let i=e;t=dy(t,i.runs,i.numRleValues)}return y3(t),t;case H.RLE:return i6(t,e,r);case H.NONE:return r&&d3(t),t;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}}function e6(t,e){if(e.logicalLevelTechnique1===H.DELTA&&e.logicalLevelTechnique2===H.NONE)return w3(t);if(e.logicalLevelTechnique1===H.RLE&&e.logicalLevelTechnique2===H.NONE){let r=e;return _3(t,r.runs,r.numRleValues)}if(e.logicalLevelTechnique1===H.NONE&&e.logicalLevelTechnique2===H.NONE){v3(t);let r=new Uint32Array(e.numValues+1);return r[0]=0,r.set(t,1),r}if(e.logicalLevelTechnique1===H.DELTA&&e.logicalLevelTechnique2===H.RLE){let r=e,i=D3(t,r.runs,r.numRleValues);return vu(i),new Uint32Array(i)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function es(t,e,r,i,n="int32"){let a=t.logicalLevelTechnique1;if(a===H.RLE)return t.runs===1?ht.CONST:ht.FLAT;if(a!==H.DELTA||t.logicalLevelTechnique2!==H.RLE)return t.numValues===1?ht.CONST:ht.FLAT;let s=e instanceof fe?e.size():e,o=t;if(o.numRleValues!==s)return ht.FLAT;if(o.runs===1)return ht.SEQUENCE;if(o.runs!==2)return t.numValues===1?ht.CONST:ht.FLAT;let l=i.get();if(t.physicalLevelTechnique===le.VARINT)return r6(r,i,n)?ht.SEQUENCE:t.numValues===1?ht.CONST:ht.FLAT;let u=i.get(),h=new Int32Array(r.buffer,r.byteOffset+u,4);return i.set(l),h[2]===2&&h[3]===2?ht.SEQUENCE:t.numValues===1?ht.CONST:ht.FLAT}function r6(t,e,r){let i=new cy(e.get());if(r==="int64"){let a=xu(t,i,4);return a[2]===BigInt(2)&&a[3]===BigInt(2)}let n=$t(t,i,4);return n[2]===2&&n[3]===2}function i6(t,e,r){return r?x3(t,e.runs,e.numRleValues):dy(t,e.runs,e.numRleValues)}var Sy=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},Ey=class extends uy{constructor(t,e,r,i,n){super(t,n?BigInt64Array.of(e):BigUint64Array.of(e),r,i)}getValueFromBuffer(t){return this.dataBuffer[0]+BigInt(t)*this.delta}};function _u(t,e,r){return{x:Xc(t,e)-r,y:Xc(t>>1,e)-r}}function Xc(t,e){let r=0;for(let i=0;i>i;return r}var Rt;(function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON",t[t.MULTIPOINT=3]="MULTIPOINT",t[t.MULTILINESTRING=4]="MULTILINESTRING",t[t.MULTIPOLYGON=5]="MULTIPOLYGON"})(Rt||(Rt={}));var n6;(function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON"})(n6||(n6={}));var Fr;(function(t){t[t.MORTON=0]="MORTON",t[t.VEC_2=1]="VEC_2",t[t.VEC_3=2]="VEC_3"})(Fr||(Fr={}));function a6(t){let e=Array(t.numGeometries),r=1,i=1,n=1,a=0,s=0,o=0,l=t.mortonSettings,u=t.topologyVector,h=u.geometryOffsets,c=u.partOffsets,p=u.ringOffsets,f=t.vertexOffsets,d=!f||f.length===0,y=t.containsPolygonGeometry(),m=t.vertexBuffer;for(let g=0;g[D]),r+=v,i+=v}break;case Rt.LINESTRING:{let v;y?(v=p[i]-p[i-1],i++):v=c[r]-c[r-1],r++;let b;d?(b=Or(m,s,v,!1),s+=v*2):(b=lr(t.vertexBufferType,m,f,o,v,!1,l),o+=v),e[a++]=[b],h&&n++}break;case Rt.POLYGON:{let v=c[r]-c[r-1];r++;let b=Array(v-1),D,A=p[i]-p[i-1];if(i++,d){D=Or(m,s,A,!0),s+=A*2;for(let _=0;_r?e[a++]:1);return i}function Zc(t,e,r,i){let n=new Uint32Array(e[e.length-1]+1),a=0;n[0]=a;let s=1,o=0;for(let l=0;l0;)n[a++]=t[u++]}}return n}var By=class extends Au{constructor(t,e,r,i,n,a,s,o){super(t,r,i,s!=null?s:e.length),this.indexBuffer=e,this.symbolOffsetBuffer=n,this.symbolTableBuffer=a,this.sharedDictionaryCache=o}getValueFromBuffer(t){var n,a,s;(s=this.decodedDictionary)!=null||(this.decodedDictionary=(n=this.sharedDictionaryCache)==null?void 0:n.decodedDictionary,(a=this.decodedDictionary)!=null||(this.decodedDictionary=this.decodeDictionary(),this.sharedDictionaryCache&&(this.sharedDictionaryCache.decodedDictionary=this.decodedDictionary)));let e=this.indexBuffer[t],r=this.offsetBuffer[e],i=this.offsetBuffer[e+1];return bu(this.decodedDictionary,r,i)}decodeDictionary(){var t;return(t=this.symbolLengthBuffer)!=null||(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),v6(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer)}offsetToLengthBuffer(t){let e=new Uint32Array(t.length-1),r=t[0];for(let i=1;i1&&!f.nullable||d===1&&f.nullable)throw Error(`The number of streams for the child field ${f.name} does not match its nullability. nullibilty: ${f.nullable}, numStreams: ${d}`);let m;if(f.nullable){let x=ct(t,e);m=new fe(ci(t,x.numValues,x.byteLength,e),x.numValues)}let g=Vt(t,e,ct(t,e),void 0,m);if(o){if(!s)throw Error(`Incomplete shared FSST dictionary for column "${y}"`);h[p++]=new By(y,g,n,a,s,o,m,c)}else h[p++]=new Qr(y,g,n,a,m)}return h}var Kc=class extends Sr{constructor(t,e,r){super(t,new Uint8Array,r!=null?r:e.length),this.values=e}getValueFromBuffer(t){return this.values[t]}},Be;(function(t){t[t.STRING=1]="STRING",t[t.INT32=2]="INT32",t[t.UINT32=4]="UINT32",t[t.INT64=8]="INT64",t[t.UINT64=16]="UINT64",t[t.FLOAT=32]="FLOAT",t[t.DOUBLE=64]="DOUBLE",t[t.PRESENCE=128]="PRESENCE"})(Be||(Be={}));var pr;(function(t){t[t.FALSE=0]="FALSE",t[t.TRUE=1]="TRUE",t[t.START_MAP=2]="START_MAP",t[t.START_LIST=3]="START_LIST",t[t.COUNT=4]="COUNT"})(pr||(pr={}));function A6(t,e,r,i){let n=S6(r);if(i===0)return n.map(h=>new Kc(h,[]));let a=E6(t,e,i),s=(a.presentStream?a.presentCount:a.lengthStream.length)/n.length,o=[],l=0,u=0;for(let h=0;h{var i;return t.name+((i=r.name)!=null?i:"")})}function E6(t,e,r){let i=t[e.get()];e.add(1);let n=Vt(t,e,ct(t,e)),a=r-1,s=[];i&Be.STRING&&(a-=F6(t,e,s)),a-=k6(t,e,i,s),a-=T6(t,e,i,s);let o,l=0;if(i&Be.PRESENCE){let h=I6(t,e);o=h.value,l=h.count,a--}let u=new Uint32Array;if(a>0&&(u=Vt(t,e,ct(t,e)),a--),a!==0)throw Error(`Unexpected number of remaining streams while decoding map column: ${a}`);return{lengthStream:n,dictionary:s,presentStream:o,presentCount:l,flattenedValues:u}}function F6(t,e,r){let i=t[e.get()];e.add(1);let n=Py("",t,e,i);if(n)for(let a=0;aa.length)throw Error("Merged map counts underflow while decoding child streams");let f=Array(r),d=i,y=n;for(let x=0;xs.length)throw Error("Map value stream underflow while decoding feature payload");let b=M6(s,y,v,l);f[x]=b.value,y=b.nextIndex}let m=0;for(let x=i;x=r)throw Error("Unexpected end of map value stream");let n=t[e];if(n===pr.FALSE)return{value:!1,nextIndex:e+1};if(n===pr.TRUE)return{value:!0,nextIndex:e+1};if(n===pr.START_MAP){let a=Jc(t,e,r);return{value:zy(t,e+2,a,i).value,nextIndex:a}}if(n===pr.START_LIST){let a=Jc(t,e,r),s=[],o=e+2;for(;o=r)throw Error("Missing length for nested map/list payload");let i=t[e+1];if(i<2)throw Error(`Invalid nested payload length: ${i}`);let n=e+i;if(n>r)throw Error("Nested payload exceeds containing payload bounds");return n}function Ly(t,e){let r=t-pr.COUNT;if(r<0||r>=e.length)throw Error(`Scalar dictionary index out of range: ${t}`);return e[r]}function Xr(t,e){for(let r of e)t.push(r)}function B6(t,e,r,i,n,a){var s;return r.type==="scalarType"?a&&!a.has(r.name)?(my(i,t,e),null):P6(i,t,e,n,r.scalarType,r):((s=r.complexType)==null?void 0:s.physicalType)===Qe.MAP?A6(t,e,r,i):i===0?null:_6(t,e,r,a)}function P6(t,e,r,i,n,a){var l;let s;if(t===0)return null;if(a.nullable){let u=ct(e,r),h=u.numValues,c=r.get(),p=ci(e,h,u.byteLength,r);r.set(c+u.byteLength),s=new fe(p,u.numValues)}let o=s!=null?s:i;switch(n.physicalType){case it.UINT_32:case it.INT_32:return R6(e,r,a,n,o);case it.STRING:{let u=a.nullable?t-1:t;return(l=Py(a.name,e,r,u,s))!=null?l:null}case it.BOOLEAN:return z6(e,r,a,i,o);case it.UINT_64:case it.INT_64:return O6(e,r,a,o,n);case it.FLOAT:return L6(e,r,a,o);case it.DOUBLE:return V6(e,r,a,o);default:throw Error(`The specified data type for the field is currently not supported: ${n}`)}}function z6(t,e,r,i,n){let a=ct(t,e),s=a.numValues,o=e.get(),l=An(n)?n:void 0,u=ci(t,s,a.byteLength,e,l);e.set(o+a.byteLength);let h=new fe(u,s);return new m6(r.name,h,n)}function L6(t,e,r,i){let n=ct(t,e),a=An(i)?i:void 0,s=gy(t,e,n.numValues,a);return new g6(r.name,s,i)}function V6(t,e,r,i){let n=ct(t,e),a=An(i)?i:void 0,s=xy(t,e,n.numValues,a);return new fu(r.name,s,i)}function O6(t,e,r,i,n){let a=ct(t,e),s=es(a,i,t,e,"int64"),o=n.physicalType===it.INT_64;if(s===ht.FLAT){let u=An(i)?i:void 0,h=o?wy(t,e,a,u):Du(t,e,a,u);return new Sy(r.name,h,i)}if(s===ht.SEQUENCE){let u=by(t,e,a);return new Ey(r.name,u[0],u[1],a.numRleValues,o)}let l=o?K3(t,e,a):Dy(t,e,a);return new My(r.name,l,i,o)}function R6(t,e,r,i,n){let a=ct(t,e),s=es(a,n,t,e),o=i.physicalType===it.INT_32;if(s===ht.FLAT){let u=An(n)?n:void 0,h=o?Ta(t,e,a,void 0,u):Vt(t,e,a,void 0,u);return new pu(r.name,h,n)}if(s===ht.SEQUENCE){let u=vy(t,e,a);return new du(r.name,u[0],u[1],a.numRleValues,o)}let l=o?W3(t,e,a):wu(t,e,a);return new yu(r.name,l,n,o)}function An(t){return t instanceof fe}var It={ID:0,ID_NULLABLE:1,ID_LONG:2,GEOMETRY:4,SCALAR_BASE:10,STRUCT:30,MAP:31};function Vy(t){switch(t){case It.ID:case It.ID|It.ID_NULLABLE:case It.ID|It.ID_LONG:case It.ID|It.ID_LONG|It.ID_NULLABLE:return{nullable:(t&It.ID_NULLABLE)!==0,columnScope:qi.FEATURE,type:"scalarType",scalarType:{longID:(t&It.ID_LONG)!==0,type:"logicalType",logicalType:hy.ID}};case It.GEOMETRY:return{nullable:!1,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.GEOMETRY,children:[]}};case It.STRUCT:return{nullable:!1,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.STRUCT,children:[]}};case It.MAP:return{nullable:!0,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.MAP,children:[]}};default:return j6(t)}}function $6(t){return t>=It.SCALAR_BASE}function Oy(t){return t===It.STRUCT||t===It.MAP}function N6(t){if(t.type==="scalarType"){let e=t.scalarType;if(e.type==="physicalType")switch(e.physicalType){case it.BOOLEAN:case it.INT_8:case it.UINT_8:case it.INT_32:case it.UINT_32:case it.INT_64:case it.UINT_64:case it.FLOAT:case it.DOUBLE:return!1;case it.STRING:return!0;default:return!1}if(e.type==="logicalType")return!1}else if(t.type==="complexType"){let e=t.complexType;if(e.type==="physicalType")switch(e.physicalType){case Qe.GEOMETRY:case Qe.STRUCT:case Qe.MAP:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",t),!1}function U6(t){var e;return t.type==="scalarType"&&((e=t.scalarType)==null?void 0:e.type)==="logicalType"&&t.scalarType.logicalType===hy.ID}function q6(t){var e;return t.type==="complexType"&&((e=t.complexType)==null?void 0:e.type)==="physicalType"&&t.complexType.physicalType===Qe.GEOMETRY}function j6(t){let e;switch(t){case 10:case 11:e=it.BOOLEAN;break;case 12:case 13:e=it.INT_8;break;case 14:case 15:e=it.UINT_8;break;case 16:case 17:e=it.INT_32;break;case 18:case 19:e=it.UINT_32;break;case 20:case 21:e=it.INT_64;break;case 22:case 23:e=it.UINT_64;break;case 24:case 25:e=it.FLOAT;break;case 26:case 27:e=it.DOUBLE;break;case 28:case 29:e=it.STRING;break;default:return null}return{nullable:!!(t&1),columnScope:qi.FEATURE,type:"scalarType",scalarType:{longID:!1,type:"physicalType",physicalType:e}}}var G6=new TextDecoder,Qc="0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT), 31(MAP)";function Eu(t,e){let r=$t(t,e,1)[0];if(r===0)return"";let i=e.get(),n=i+r,a=t.subarray(i,n);return e.add(r),G6.decode(a)}function X6(t){let e=t.name,r=t.nullable;return t.type==="scalarType"?{type:"scalarField",scalarField:t.scalarType,name:e,nullable:r}:{type:"complexField",complexField:t.complexType,name:e,nullable:r}}function Ry(t,e){let r=$t(t,e,1)[0]>>>0,i=r>=It.SCALAR_BASE?Vy(r):null;if(!i)throw Error(`Unsupported field type code ${r}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let n=Si(je({},i),{name:Eu(t,e)});if(n.type==="complexType"&&Oy(r)){let a=n.complexType,s=$t(t,e,1)[0]>>>0;a.children=Array(s);for(let o=0;o>>0,i=Vy(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: ${Qc}`);let n;if($6(r))n=Eu(t,e);else if(r>>0,o=a.complexType;o.children=Array(s);for(let l=0;l>>0,a=$t(t,e,1)[0]>>>0;i.columns=Array(a);for(let s=0;s>>0,s=i.get()+a;if(s>t.length)throw Error(`Block overruns tile: ${s} > ${t.length}`);let o=$t(t,i,1)[0]>>>0;if(o!==1&&o!==2){i.set(s);continue}let[l,u]=W6(t,i),h=l.featureTables[0],c=null,p=null,f=[],d=0;for(let m of h.columns){let g=m.name;if(U6(m)){let x=null;if(m.nullable){let b=ct(t,i),D=i.get(),A=ci(t,b.numValues,b.byteLength,i);i.set(D+b.byteLength),x=new fe(A,b.numValues)}let v=ct(t,i);d=x?x.size():v.decompressedCount,c=H6(t,m,i,g,v,x!=null?x:d,r)}else if(q6(m)){let x=$t(t,i,1)[0];if(d===0){let v=i.get();d=ct(t,i).decompressedCount,i.set(v)}e&&(e.scale=e.extent/u),p=f6(t,x,i,d,e)}else{let x=N6(m)?$t(t,i,1)[0]:1;if(x===0)continue;let v=B6(t,i,m,x,d,void 0);if(v)if(Array.isArray(v))for(let b of v)f.push(b);else f.push(v)}}let y=new xw(h.name,p,c,f,u);n.push(y),i.set(s)}return n}function H6(t,e,r,i,n,a,s=!1){var h;let o=(h=e.scalarType)!=null&&h.longID?it.UINT_64:it.UINT_32,l=typeof a=="number"?void 0:a,u=es(n,a,t,r,o===it.UINT_64?"int64":"int32");if(o===it.UINT_32)switch(u){case ht.FLAT:return new pu(i,Vt(t,r,n,void 0,l),a);case ht.SEQUENCE:{let c=vy(t,r,n);return new du(i,c[0],c[1],n.numRleValues,!1)}case ht.CONST:return new yu(i,wu(t,r,n),a,!1)}switch(u){case ht.FLAT:return s?new fu(i,Z3(t,r,n,l),a):new Sy(i,Du(t,r,n,l),a);case ht.SEQUENCE:{let c=by(t,r,n);return new Ey(i,c[0],c[1],n.numRleValues,!1)}case ht.CONST:return new My(i,Dy(t,r,n),a,!1)}throw Error("Vector type not supported for id column.")}var K6=class{constructor(t,e){var r;switch(this._featureData=t,this.properties=this._featureData.properties||{},(r=this._featureData.geometry)==null?void 0:r.type){case Rt.POINT:case Rt.MULTIPOINT:this.type=1;break;case Rt.LINESTRING:case Rt.MULTILINESTRING:this.type=2;break;case Rt.POLYGON:case Rt.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=e,this.id=Number(this._featureData.id)}loadGeometry(){let t=[];for(let e of this._featureData.geometry.coordinates){let r=[];for(let i of e)r.push(new B(i.x,i.y));t.push(r)}return t}},J6=class{constructor(t){this.features=[],this.featureTable=t,this.name=t.name,this.extent=t.extent,this.version=2,this.features=t.getFeatures(),this.length=this.features.length}feature(t){return new K6(this.features[t],this.extent)}},Fu=class{constructor(t){this.layers={};let e=Z6(new Uint8Array(t));this.layers=e.reduce((r,i)=>Si(je({},r),{[i.name]:new J6(i)}),{})}},ku=class{constructor(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new uo(mt,16,0),this.grid3D=new uo(mt,16,0),this.featureIndexArray=new Yf,this.promoteId=e}insert(t,e,r,i,n,a){let s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let o=a?this.grid3D:this.grid;for(let l of e){let u=[1/0,1/0,-1/0,-1/0];for(let h of l)u[0]=Math.min(u[0],h.x),u[1]=Math.min(u[1],h.y),u[2]=Math.max(u[2],h.x),u[3]=Math.max(u[3],h.y);u[0]<8192&&u[1]<8192&&u[2]>=0&&u[3]>=0&&o.insert(s,u[0],u[1],u[2],u[3])}}loadVTLayers(){return this.vtLayers||(this.encoding==="mlt"?this.vtLayers=new Fu(this.rawTileData).layers:this.vtLayers=new Xl(new au(this.rawTileData)).layers,this.sourceLayerCoder=new cu(this.vtLayers?Object.keys(this.vtLayers).sort():[ll])),this.vtLayers}query(t,e,r,i){this.loadVTLayers();let n=t.params,a=mt/t.tileSize/t.scale,s=ai(n.filter,"queryRenderedFeatures filter",n.globalState),o=t.queryGeometry,l=t.queryPadding*a,u=Fa.fromPoints(o),h=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l),c=Fa.fromPoints(t.cameraQueryGeometry).expandBy(l),p=this.grid3D.query(c.minX,c.minY,c.maxX,c.maxY,(y,m,g,x)=>vg(t.cameraQueryGeometry,y-l,m-l,g+l,x+l));for(let y of p)h.push(y);h.sort(t5);let f={},d;for(let y of h){if(y===d)continue;d=y;let m=this.featureIndexArray.get(y),g=null;this.loadMatchingFeature(f,m.bucketIndex,m.sourceLayerIndex,m.featureIndex,s,n.layers,n.availableImages,e,r,i,(x,v,b)=>(g||(g=Ar(x)),v.queryIntersectsFeature({queryGeometry:o,feature:x,featureState:b,geometry:g,zoom:this.z,transform:t.transform,pixelsToTileUnits:a,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation})))}return f}loadMatchingFeature(t,e,r,i,n,a,s,o,l,u,h){let c=this.bucketLayerIDs[e];if(a&&!c.some(y=>a.has(y)))return;let p=this.sourceLayerCoder.decode(r),f=this.vtLayers[p].feature(i);if(n.needGeometry){let y=hi(f,!0);if(!n.filter(new st(this.tileID.overscaledZ),y,this.tileID.canonical))return}else if(!n.filter(new st(this.tileID.overscaledZ),f))return;let d=this.getId(f,p);for(let y of c){if(a&&!a.has(y))continue;let m=o[y];if(!m)continue;let g={};d&&u&&(g=u.getState(m.sourceLayer||"_geojsonTileLayer",d));let x=Gt({},l[y]);x.paint=tp(x.paint,m.paint,f,g,s),x.layout=tp(x.layout,m.layout,f,g,s);let v=!h||h(f,m,g);if(!v)continue;let b=new gw(f,this.z,this.x,this.y,d);b.layer=x;let D=t[y];D===void 0&&(D=t[y]=[]),D.push({featureIndex:i,feature:b,intersectionZ:v})}}lookupSymbolFeatures(t,e,r,i,n,a,s,o){let l={};this.loadVTLayers();let u=ai(n.filterSpec,"queryRenderedFeatures symbol filter",n.globalState);for(let h of t)this.loadMatchingFeature(l,r,i,h,u,a,s,o,e);return l}hasLayer(t){for(let e of this.bucketLayerIDs)for(let r of e)if(t===r)return!0;return!1}getId(t,e){var i;let r=t.id;if(this.promoteId){let n=typeof this.promoteId=="string"?this.promoteId:this.promoteId[e];r=t.properties[n],typeof r=="boolean"&&(r=Number(r)),r===void 0&&((i=t.properties)!=null&&i.cluster)&&this.promoteId&&(r=Number(t.properties.cluster_id))}return r}};C("FeatureIndex",ku,{omit:["rawTileData","sourceLayerCoder"]});function Q6(t){return typeof t=="object"&&!!t&&"evaluate"in t}function tp(t,e,r,i,n){return Ia(t,(a,s)=>{let o=e instanceof Ya?e.get(s):null;return Q6(o)?o.evaluate(r,i,void 0,n):o})}function t5(t,e){return e-t}var $y=class{constructor(t){this.maxEntries=t,this.map=new Map}get(t){let e=this.map.get(t);return e!==void 0&&(this.map.delete(t),this.map.set(t,e)),e}set(t,e){if(this.map.has(t))this.map.delete(t);else if(this.map.size>=this.maxEntries){let r=this.map.keys().next().value;this.map.delete(r)}this.map.set(t,e)}clear(){this.map.clear()}};function Tu(t){let e=typeof t;if(e==="number"||e==="boolean"||e==="string"||t==null)return JSON.stringify(t);if(Array.isArray(t)){let n="[";for(let a of t)n+=`${Tu(a)},`;return`${n}]`}let r=Object.keys(t).sort(),i="{";for(let n=0;nthis._layers[c.id]),s=a[0];if(s.isHidden())continue;let o=s.source||"",l=this.familiesBySource[o];l||(l=this.familiesBySource[o]={});let u=s.sourceLayer||"_geojsonTileLayer",h=l[u];h||(h=l[u]=[]),h.push(a)}}},qy=class{constructor(t){let e={},r=[];for(let s in t){let o=t[s],l=e[s]={};for(let u in o){let h=o[u];if(!h||h.bitmap.width===0||h.bitmap.height===0)continue;let c={x:0,y:0,w:h.bitmap.width+2,h:h.bitmap.height+2};r.push(c),l[u]={rect:c,metrics:h.metrics}}}let{w:i,h:n}=su(r),a=new Ja({width:i||1,height:n||1});for(let s in t){let o=t[s];for(let l in o){let u=o[l];if(!u||u.bitmap.width===0||u.bitmap.height===0)continue;let h=e[s][l].rect;Ja.copy(u.bitmap,a,{x:0,y:0},{x:h.x+1,y:h.y+1},u.bitmap)}}this.image=a,this.positions=e}};C("GlyphAtlas",qy);var jy=class{constructor(t){this.tileID=new uu(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,e,r,i,n){return rt(this,null,function*(){this.data=t,this.collisionBoxArray=new Ll;let a=new cu(Object.keys(t.layers).sort()),s=new ku(this.tileID,this.promoteId);s.bucketLayerIDs=[];let o={},l={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:r,subdivisionGranularity:n},u=e.familiesBySource[this.source];for(let S in u){let k=t.layers[S];if(!k)continue;k.version===1&&Bt(`Vector tile source "${this.source}" layer "${S}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let z=a.encode(S),O=[];for(let P=0;PF.id)))}}let h=Ia(l.glyphDependencies,S=>Object.keys(S));for(let S of this.inFlightDependencies)S==null||S.abort();this.inFlightDependencies=[];let c=Promise.resolve({});if(Object.keys(h).length){let S=new AbortController;this.inFlightDependencies.push(S),c=i.sendAsync({type:"GG",data:{stacks:h,source:this.source,tileID:this.tileID,type:"glyphs"}},S)}let p=Object.keys(l.iconDependencies),f=Promise.resolve({});if(p.length){let S=new AbortController;this.inFlightDependencies.push(S),f=i.sendAsync({type:"GI",data:{icons:p,source:this.source,tileID:this.tileID,type:"icons"}},S)}let d=Object.keys(l.patternDependencies),y=Promise.resolve({});if(d.length){let S=new AbortController;this.inFlightDependencies.push(S),y=i.sendAsync({type:"GI",data:{icons:d,source:this.source,tileID:this.tileID,type:"patterns"}},S)}let m=l.dashDependencies,g=Promise.resolve({});if(Object.keys(m).length){let S=new AbortController;this.inFlightDependencies.push(S),g=i.sendAsync({type:"GDA",data:{dashes:m}},S)}let[x,v,b,D]=yield Promise.all([c,f,y,g]),A=new qy(x),_=new ou(v,b);for(let S in o){let k=o[S];k.hasDependencies&&(Ny(k.layers,this.zoom,r),k.addFeatures({options:l,canonical:this.tileID.canonical,glyphMap:x,glyphPositions:A.positions,iconMap:v,iconPositions:_.iconPositions,patternMap:b,patternPositions:_.patternPositions,dashPositions:D,showCollisionBoxes:this.showCollisionBoxes}))}return{buckets:Object.values(o).filter(S=>!S.isEmpty()),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:A.image,imageAtlas:_,dashPositions:D,glyphMap:this.returnDependencies?x:null,iconMap:this.returnDependencies?v:null,glyphPositions:this.returnDependencies?A.positions:null}})}};function Ny(t,e,r){let i=new st(e);for(let n of t)n.recalculate(i,r)}var Gy=class{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(t,e){this.loading[t]=e}finishLoading(t){delete this.loading[t]}abort(t){let e=this.loading[t];e!=null&&e.abort&&(e.abort.abort(),delete this.loading[t])}getParsing(t){return this.parsing[t]}setParsing(t,e){this.parsing[t]=e}removeParsing(t){delete this.parsing[t]}markLoaded(t,e){this.loaded[t]=e}getLoaded(t){let e=this.loaded[t];if(e)return e}removeLoaded(t){delete this.loaded[t]}clearLoaded(){this.loaded={}}},Xy=class{constructor(t){this.start=`${t}#start`,this.end=`${t}#end`,this.measure=t,performance.mark(this.start)}finish(){performance.mark(this.end);let t=performance.getEntriesByName(this.measure);return t.length===0&&(performance.measure(this.measure,this.start,this.end),t=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),t}},n5=class{constructor(t,e,r,i,n){this.type=t,this.properties=r||{},this.extent=n,this.pointsArray=e,this.id=i}loadGeometry(){return this.pointsArray.map(t=>t.map(e=>new B(e.x,e.y)))}},a5=class{constructor(t,e,r){this.version=2,this._myFeatures=t,this.name=e,this.length=t.length,this.extent=r}feature(t){return this._myFeatures[t]}},s5=class{constructor(){this.layers={}}addLayer(t){this.layers[t.name]=t}};function o5(t,e,r){let{extent:i}=t,n=2**(r.z-e.z),a=(r.x-e.x*n)*i,s=(r.y-e.y*n)*i,o=[];for(let l=0;l0&&l.addLayer(d)}let h={vectorTile:l,rawData:hu(l).buffer};return this.overzoomedTileResultCache.set(s,h),h}reloadTile(t){return rt(this,null,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)throw Error("Should not be trying to reload a tile that was never loaded or has been removed");if(r.vectorTile)return r.showCollisionBoxes=t.showCollisionBoxes,yield this._parseWorkerTile(r,t)})}abortTile(t){return rt(this,null,function*(){this.tileState.abort(t.uid)})}removeTile(t){return rt(this,null,function*(){this.tileState.removeLoaded(t.uid)})}},u5=class{constructor(){this.loaded={}}loadTile(t){return rt(this,null,function*(){let{uid:e,encoding:r,rawImageData:i,redFactor:n,greenFactor:a,blueFactor:s,baseShift:o}=t,l=i.width+4,u=i.height+4,h=Ca(i)?new Zt({width:l,height:u},yield ap(i,-2,-2,l,u)):i,c=new jl(e,h,r,n,a,s,o);return this.loaded||(this.loaded={}),this.loaded[e]=c,c})}removeTile(t){let e=this.loaded,r=t.uid;e!=null&&e[r]&&delete e[r]}},h5=class{constructor(t,e,r,i=c5){this.actor=t,this.layerIndex=e,this.availableImages=r,this.tileState=new Gy,this._createGeoJSONIndex=i}loadVectorTile(t){if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let{z:e,x:r,y:i}=t.tileID.canonical,n=this._geoJSONIndex.getTile(e,r,i);if(!n)return null;let a=new ly(n.features,{version:2,extent:mt});return{vectorTile:a,rawData:hu(a,np).buffer}}loadTile(t){return rt(this,null,function*(){let{uid:e}=t,r=new jy(t);r.abort=new AbortController;try{let i=this.loadVectorTile(t);if(!i)return null;let{vectorTile:n,rawData:a}=i;r.vectorTile=n,this.tileState.markLoaded(e,r);let s={rawData:a};return this.tileState.setParsing(e,s),yield this._parseWorkerTile(r,t)}catch(i){throw this.tileState.markLoaded(e,r),i}})}_parseWorkerTile(t,e){return rt(this,null,function*(){let r=this.tileState.getParsing(t.uid),i=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,e.subdivisionGranularity);if(r){let{rawData:n}=r;i=Gt({rawTileData:n.slice(0),encoding:"mvt"},i),this.tileState.removeParsing(t.uid)}return i})}abortTile(t){return rt(this,null,function*(){this.tileState.abort(t.uid)})}removeTile(t){return rt(this,null,function*(){this.tileState.removeLoaded(t.uid)})}loadData(t){return rt(this,null,function*(){var r;(r=this._pendingRequest)==null||r.abort();let e=this._startRequestTiming(t);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(t,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let i={};return t.request&&(i.data=t.data),this._finishRequestTiming(e,t,i),i}catch(i){if(delete this._pendingRequest,!yl(i))throw i;return{abandoned:!0}}})}_startRequestTiming(t){var e;if((e=t.request)!=null&&e.collectResourceTiming)return new Xy(t.request.url)}_finishRequestTiming(t,e,r){let i=t==null?void 0:t.finish();i&&(r.resourceTiming={[e.source]:JSON.parse(JSON.stringify(i))})}reloadTile(t){return rt(this,null,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)return yield this.loadTile(t);if(r.vectorTile)return r.showCollisionBoxes=t.showCollisionBoxes,yield this._parseWorkerTile(r,t)})}loadAndProcessGeoJSON(t,e){return rt(this,null,function*(){var r;if(t.request&&(t.data=(yield up(t.request,e)).data),t.data){t.data=this._filterGeoJSON(t.data,t.filter,t.source),this._geoJSONIndex=this._createGeoJSONIndex(t.data,t);return}if(t.dataDiff){(r=this._geoJSONIndex)!=null||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},t)),this._geoJSONIndex.updateData(t.dataDiff,this._getFilterPredicate(t.filter,t.source));return}if(t.updateCluster&&this._geoJSONIndex.updateClusterOptions(t.geojsonVtOptions.cluster,Yy(t)),this._geoJSONIndex==null)throw Error(`Input data given to \'${t.source}\' is not a valid GeoJSON object.`)})}_filterGeoJSON(t,e,r){if(t.type!=="FeatureCollection")return t;let i=this._getFilterPredicate(e,r);return i?{type:"FeatureCollection",features:t.features.filter(n=>i(n))}:t}_getFilterPredicate(t,e){if(typeof t!="boolean"&&!(t!=null&&t.length))return;let r=er(t,`sources.${e}.filter`,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(r.result==="error")throw Error(r.value.map(i=>`${i.key}: ${i.message}`).join(", "));return i=>r.value.evaluate({zoom:0},i)}removeSource(t){return rt(this,null,function*(){var e;(e=this._pendingRequest)==null||e.abort()})}getClusterExpansionZoom(t){return this._geoJSONIndex.getClusterExpansionZoom(t.clusterId)}getClusterChildren(t){return this._geoJSONIndex.getClusterChildren(t.clusterId)}getClusterLeaves(t){return this._geoJSONIndex.getClusterLeaves(t.clusterId,t.limit,t.offset)}};function c5(t,e){let r=Gt(e.geojsonVtOptions||{},{updateable:!0,clusterOptions:Yy(e)});return new Td(t,r)}function Yy({geojsonVtOptions:t,clusterProperties:e,source:r}){if(!e||!t.clusterOptions)return t.clusterOptions;let i={},n={},a={accumulated:null,zoom:0},s={properties:null},o=Object.keys(e);for(let l of o){let[u,h]=e[l],c=er(h,`sources.${r}.clusterProperties.${l}[1]`),p=er(typeof u=="string"?[u,["accumulated"],["get",l]]:u,`sources.${r}.clusterProperties.${l}[0]`);i[l]=c.value,n[l]=p.value}return t.clusterOptions.map=l=>{s.properties=l;let u={};for(let h of o)u[h]=i[h].evaluate(a,s);return u},t.clusterOptions.reduce=(l,u)=>{s.properties=u;for(let h of o)a.accumulated=l[h],l[h]=n[h].evaluate(a,s)},t.clusterOptions}function Uy(t){return rt(this,null,function*(){if(t.endsWith(".mjs")){yield import(t);return}let e=yield fetch(t,{credentials:"same-origin"});if(!e.ok)throw Error(`Failed to load ${t}: ${e.status}`);let r=yield e.text();if(/^[ \\t]*(import|export)\\s/m.test(r)){let i=URL.createObjectURL(new Blob([r],{type:"text/javascript"}));try{yield import(i)}finally{URL.revokeObjectURL(i)}return}globalThis.eval(r)})}var p5=class{constructor(t){this.self=t,this.actor=new sy(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,r)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=r},this.self.addProtocol=sp,this.self.removeProtocol=op,this.self.registerRTLTextPlugin=e=>{wr.setMethods(e)},this.self.makeRequest=Ma,this.actor.registerMessageHandler("LDT",(e,r)=>this._getDEMWorkerSource(e,r.source).loadTile(r)),this.actor.registerMessageHandler("RDT",(e,r)=>rt(this,null,function*(){this._getDEMWorkerSource(e,r.source).removeTile(r)})),this.actor.registerMessageHandler("GCEZ",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterExpansionZoom(r)})),this.actor.registerMessageHandler("GCC",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterChildren(r)})),this.actor.registerMessageHandler("GCL",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterLeaves(r)})),this.actor.registerMessageHandler("LD",(e,r)=>this._getWorkerSource(e,r.type,r.source).loadData(r)),this.actor.registerMessageHandler("LT",(e,r)=>this._getWorkerSource(e,r.type,r.source).loadTile(r)),this.actor.registerMessageHandler("RT",(e,r)=>this._getWorkerSource(e,r.type,r.source).reloadTile(r)),this.actor.registerMessageHandler("AT",(e,r)=>this._getWorkerSource(e,r.type,r.source).abortTile(r)),this.actor.registerMessageHandler("RMT",(e,r)=>this._getWorkerSource(e,r.type,r.source).removeTile(r)),this.actor.registerMessageHandler("RS",(e,r)=>rt(this,null,function*(){var n,a;if(!((a=(n=this.workerSources[e])==null?void 0:n[r.type])!=null&&a[r.source]))return;let i=this.workerSources[e][r.type][r.source];delete this.workerSources[e][r.type][r.source],i.removeSource!==void 0&&i.removeSource(r)})),this.actor.registerMessageHandler("RM",e=>rt(this,null,function*(){delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],this.globalStates.delete(e)})),this.actor.registerMessageHandler("SR",(e,r)=>rt(this,null,function*(){this.referrer=r})),this.actor.registerMessageHandler("SRPS",(e,r)=>this._syncRTLPluginState(e,r)),this.actor.registerMessageHandler("IS",(e,r)=>rt(this,null,function*(){yield Uy(r)})),this.actor.registerMessageHandler("SI",(e,r)=>this._setImages(e,r)),this.actor.registerMessageHandler("UL",(e,r)=>rt(this,null,function*(){this._getLayerIndex(e).update(r.layers,r.removedIds,this._getGlobalState(e))})),this.actor.registerMessageHandler("UGS",(e,r)=>rt(this,null,function*(){let i=this._getGlobalState(e);for(let n in r)i[n]=r[n]})),this.actor.registerMessageHandler("SL",(e,r)=>rt(this,null,function*(){this._getLayerIndex(e).replace(r,this._getGlobalState(e))}))}_getGlobalState(t){let e=this.globalStates.get(t);return e||(e={},this.globalStates.set(t,e)),e}_setImages(t,e){return rt(this,null,function*(){this.availableImages[t]=e;for(let r in this.workerSources[t]){let i=this.workerSources[t][r];for(let n in i)i[n].availableImages=e}})}_syncRTLPluginState(t,e){return rt(this,null,function*(){return yield wr.syncState(e,Uy)})}_getAvailableImages(t){let e=this.availableImages[t];return e||(e=[]),e}_getLayerIndex(t){let e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i5),e}_getWorkerSource(t,e,r){var i,n;if((i=this.workerSources)[t]||(i[t]={}),(n=this.workerSources[t])[e]||(n[e]={}),!this.workerSources[t][e][r]){let a={sendAsync:(s,o)=>(s.targetMapId=t,this.actor.sendAsync(s,o))};switch(e){case"vector":this.workerSources[t][e][r]=new l5(a,this._getLayerIndex(t),this._getAvailableImages(t));break;case"geojson":this.workerSources[t][e][r]=new h5(a,this._getLayerIndex(t),this._getAvailableImages(t));break;default:this.workerSources[t][e][r]=new this.externalWorkerSourceTypes[e](a,this._getLayerIndex(t),this._getAvailableImages(t))}}return this.workerSources[t][e][r]}_getDEMWorkerSource(t,e){var r,i;return(r=this.demWorkerSources)[t]||(r[t]={}),(i=this.demWorkerSources[t])[e]||(i[e]=new u5),this.demWorkerSources[t][e]}};mr(self)&&(self.worker=new p5(self));export{p5 as default};\n/*! Bundled license information:\n\nmaplibre-gl/dist/maplibre-gl-shared.mjs:\nmaplibre-gl/dist/maplibre-gl-worker.mjs:\n (**\n * MapLibre GL JS\n * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.9.0/LICENSE.txt\n *)\n*/\n'}}),gye=ye({"src/plots/map/layers.js"(e,r){"use strict";var t=Yt(),a=Go().sanitizeHTML,i=EI(),o=Uv();function s(f,h){this.subplot=f,this.uid=f.uid+"-"+h,this.index=h,this.idSource="source-"+this.uid,this.idLayer=o.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var l=s.prototype;l.update=function(h){this.visible?this.needsNewImage(h)?this.updateImage(h):this.needsNewSource(h)?(this.removeLayer(),this.updateSource(h),this.updateLayer(h)):this.needsNewLayer(h)?this.updateLayer(h):this.updateStyle(h):(this.updateSource(h),this.updateLayer(h)),this.visible=n(h)},l.needsNewImage=function(f){var h=this.subplot.map;return h.getSource(this.idSource)&&this.sourceType==="image"&&f.sourcetype==="image"&&(this.source!==f.source||JSON.stringify(this.coordinates)!==JSON.stringify(f.coordinates))},l.needsNewSource=function(f){return this.sourceType!==f.sourcetype||JSON.stringify(this.source)!==JSON.stringify(f.source)||this.layerType!==f.type},l.needsNewLayer=function(f){return this.layerType!==f.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(f){var h=this.subplot.map;h.getSource(this.idSource).updateImage({url:f.source,coordinates:f.coordinates});var d=this.findFollowingMapLayerId(this.lookupBelow());d!==null&&this.subplot.map.moveLayer(this.idLayer,d)},l.updateSource=function(f){var h=this.subplot.map;if(h.getSource(this.idSource)&&h.removeSource(this.idSource),this.sourceType=f.sourcetype,this.source=f.source,!!n(f)){var d=c(f);h.addSource(this.idSource,d)}},l.findFollowingMapLayerId=function(f){if(f==="traces")for(var h=this.subplot.getMapLayers(),d=0;d0){for(var d=0;d0}function u(f){var h={},d={};switch(f.type){case"circle":t.extendFlat(d,{"circle-radius":f.circle.radius,"circle-color":f.color,"circle-opacity":f.opacity});break;case"line":t.extendFlat(d,{"line-width":f.line.width,"line-color":f.color,"line-opacity":f.opacity,"line-dasharray":f.line.dash});break;case"fill":t.extendFlat(d,{"fill-color":f.color,"fill-outline-color":f.fill.outlinecolor,"fill-opacity":f.opacity});break;case"symbol":var p=f.symbol,g=i(p.textposition,p.iconsize);t.extendFlat(h,{"icon-image":p.icon,"icon-size":p.iconsize/10,"text-field":p.text,"text-size":p.textfont.size,"text-anchor":g.anchor,"text-offset":g.offset,"symbol-placement":p.placement}),t.extendFlat(d,{"icon-color":f.color,"text-color":p.textfont.color,"text-opacity":f.opacity});break;case"raster":t.extendFlat(d,{"raster-fade-duration":0,"raster-opacity":f.opacity});break}return{layout:h,paint:d}}function c(f){var h=f.sourcetype,d=f.source,p={type:h},g;return h==="geojson"?g="data":h==="vector"?g=typeof d=="string"?"url":"tiles":h==="raster"?(g="tiles",p.tileSize=256):h==="image"&&(g="url",p.coordinates=f.coordinates),p[g]=d,f.sourceattribution&&(p.attribution=a(f.sourceattribution)),p}r.exports=function(h,d,p){var g=new s(h,d);return g.update(p),g}}}),yye=ye({"src/plots/map/map.js"(e,r){"use strict";var t=(vye(),On(YN)),a=mye(),i=!1,o=()=>{i||(i=!0,t.setWorkerUrl(URL.createObjectURL(new Blob([a],{type:"text/javascript"}))))},s=Yt(),l=_0(),n=li(),u=qi(),c=_f(),f=Hs(),h=Np(),d=h.drawMode,p=h.selectMode,g=lu().prepSelect,m=lu().clearOutline,y=lu().clearSelectionsCache,_=lu().selectOnClick,v=Uv(),x=gye();function E(S,A){this.id=A,this.gd=S;var F=S._fullLayout,D=S._context;this.container=F._glcontainer.node(),this.isStatic=D.staticPlot,this.uid=F._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(F),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var M=E.prototype;M.plot=function(S,A,F){var D=this,R;D.map?R=new Promise(function(P,z){D.updateMap(S,A,P,z)}):R=new Promise(function(P,z){D.createMap(S,A,P,z)}),F.push(R)},M.createMap=function(S,A,F,D){var R=this,P=A[R.id],z=R.styleObj=T(P.style),I=P.bounds,L=I?[[I.west,I.south],[I.east,I.north]]:null;let B={container:R.div,style:z.style,center:b(P.center),zoom:P.zoom,bearing:P.bearing,pitch:P.pitch,maxBounds:L,interactive:!R.isStatic,canvasContextAttributes:{preserveDrawingBuffer:R.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},O=P._fitBounds;O&&(B.bounds=[[O.west,O.south],[O.east,O.north]],B.fitBoundsOptions={padding:v.fitBoundsPadding}),o();let G=R.map=new t.Map(B).addControl(new t.AttributionControl({compact:!0})),$={};G.setMissingStyleImageResolver(Z=>(!$[Z]&&/^[a-zA-Z0-9-]+$/.test(Z)&&($[Z]=new Promise(J=>{let N=new Image(15,15);N.onload=()=>{G.addImage(Z,N,{sdf:!0}),J()},N.onerror=()=>J(),N.crossOrigin="Anonymous",N.src=`https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/${Z}.svg`})),$[Z])),G.setTransformRequest(function(Z){return Z=Z.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),Z=Z.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),Z=Z.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:Z}}),G._canvas.style.left="0px",G._canvas.style.top="0px",R.rejectOnError(D),R.isStatic||R.initFx(S,A);var X=[];X.push(new Promise(function(Z){G.once("load",Z)})),X=X.concat(l.fetchTraceGeoData(S)),Promise.all(X).then(function(){O&&C(R,P),w(R,P),R.fillBelowLookup(S,A),R.updateData(S),R.updateLayout(A),R.resolveOnRender(F)}).catch(D)},M.updateMap=function(S,A,F,D){var R=this,P=R.map,z=A[this.id];R.rejectOnError(D);var I=[],L=T(z.style);JSON.stringify(R.styleObj)!==JSON.stringify(L)&&(R.styleObj=L,P.setStyle(L.style),R.traceHash={},I.push(new Promise(function(B){P.once("styledata",B)}))),I=I.concat(l.fetchTraceGeoData(S)),Promise.all(I).then(function(){R.fillBelowLookup(S,A),R.updateData(S);let B=z._fitBounds;B&&(P.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:v.fitBoundsPadding,animate:!1}),C(R,z),w(R,z)),R.updateLayout(A),R.resolveOnRender(F)}).catch(D)};function C(S,A){let{center:F,zoom:D}=S.getView();A._input.center=A.center=F,A._input.zoom=A.zoom=D,A._input._fitView={center:ja({},F),zoom:D}}function w(S,A){let F=S.getView();S.viewInitial={center:s.extendFlat({},F.center),bearing:A.bearing,pitch:A.pitch,zoom:F.zoom}}M.fillBelowLookup=function(S,A){var F=A[this.id],D=F.layers,R,P,z=this.belowLookup={},I=!1;for(R=0;R1)for(R=0;RA.project(D).x,_subplot:A},A.yaxis={_id:"y",c2p:D=>A.project(D).y,_subplot:A},A.updateFramework(S),A.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},u.setConvert(A.mockAxis,S)},M.initFx=function(S,A){var F=this,D=F.gd,R=F.map;R.on("moveend",function(I){if(F.map){var L=D._fullLayout;if(I.originalEvent||F.wheeling){var B=L[F.id];n.call("_storeDirectGUIEdit",D.layout,L._preGUI,F.getViewEdits(B));var O=F.getView();B._input.center=B.center=O.center,B._input.zoom=B.zoom=O.zoom,B._input.bearing=B.bearing=O.bearing,B._input.pitch=B.pitch=O.pitch,D.emit("plotly_relayout",F.getViewEditsWithDerived(O))}I.originalEvent&&I.originalEvent.type==="mouseup"?F.dragging=!1:F.wheeling&&(F.wheeling=!1),L&&L._rehover&&L._rehover()}}),R.on("wheel",function(){F.wheeling=!0}),R.on("mousemove",function(I){var L=F.div.getBoundingClientRect(),B=[I.originalEvent.offsetX,I.originalEvent.offsetY];I.target.getBoundingClientRect=function(){return L},F.xaxis.p2c=function(){return R.unproject(B).lng},F.yaxis.p2c=function(){return R.unproject(B).lat},D._fullLayout._rehover=function(){D._fullLayout._hoversubplot===F.id&&D._fullLayout[F.id]&&f.hover(D,I,F.id)},f.hover(D,I,F.id),D._fullLayout._hoversubplot=F.id});function P(){f.loneUnhover(A._hoverlayer)}R.on("dragstart",function(){F.dragging=!0,P()}),R.on("zoomstart",P),R.on("mouseout",function(){D._fullLayout._hoversubplot=null});function z(){var I=F.getView();D.emit("plotly_relayouting",F.getViewEditsWithDerived(I))}R.on("drag",z),R.on("zoom",z),R.on("dblclick",function(){var I=D._fullLayout[F.id];n.call("_storeDirectGUIEdit",D.layout,D._fullLayout._preGUI,F.getViewEdits(I));var L=F.viewInitial;R.setCenter(b(L.center)),R.setZoom(L.zoom),R.setBearing(L.bearing),R.setPitch(L.pitch);var B=F.getView();I._input.center=I.center=B.center,I._input.zoom=I.zoom=B.zoom,I._input.bearing=I.bearing=B.bearing,I._input.pitch=I.pitch=B.pitch,D.emit("plotly_doubleclick",null),D.emit("plotly_relayout",F.getViewEditsWithDerived(B))}),F.clearOutline=function(){y(F.dragOptions),m(F.dragOptions.gd)},F.onClickInPanFn=function(I){return function(L){var B=D._fullLayout.clickmode;B.indexOf("select")>-1&&_(L.originalEvent,D,[F.xaxis],[F.yaxis],F.id,I),B.indexOf("event")>-1&&f.click(D,L.originalEvent)}}},M.updateFx=function(S){var A=this,F=A.map,D=A.gd;if(A.isStatic)return;function R(L){var B=A.map.unproject(L);return[B.lng,B.lat]}var P=S.dragmode,z;z=function(L,B){if(B.isRect){var O=L.range={};O[A.id]=[R([B.xmin,B.ymin]),R([B.xmax,B.ymax])]}else{var G=L.lassoPoints={};G[A.id]=B.map(R)}};var I=A.dragOptions;A.dragOptions=s.extendDeep(I||{},{dragmode:S.dragmode,element:A.div,gd:D,plotinfo:{id:A.id,domain:S[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:z},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),F.off("click",A.onClickInPanHandler),p(P)||d(P)?(F.dragPan.disable(),F.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(L,B,O){g(L,B,O,A.dragOptions,P)},c.init(A.dragOptions)):(F.dragPan.enable(),F.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),F.on("click",A.onClickInPanHandler))},M.updateFramework=function(S){var A=S[this.id].domain,F=S._size,D=this.div.style;D.width=F.w*(A.x[1]-A.x[0])+"px",D.height=F.h*(A.y[1]-A.y[0])+"px",D.left=F.l+A.x[0]*F.w+"px",D.top=F.t+(1-A.y[1])*F.h+"px",this.xaxis._offset=F.l+A.x[0]*F.w,this.xaxis._length=F.w*(A.x[1]-A.x[0]),this.yaxis._offset=F.t+(1-A.y[1])*F.h,this.yaxis._length=F.h*(A.y[1]-A.y[0])},M.updateLayers=function(S){var A=S[this.id],F=A.layers,D=this.layerList,R;if(F.length!==D.length){for(R=0;R_ye});function _ye(e,r){let t=[];for(let n of e){if(n.subplot!==r||n.visible!==!0)continue;if(n.type==="choroplethmap")return null;let{lat:u,lon:c}=n;if(!c||!u)continue;let f=Math.min(c.length,u.length);for(let h=0;hT/2){var b=M.split("|").join("
");w.text(b).attr("data-unformatted",b).call(n.convertToTspans,f),k=l.bBox(w.node())}w.attr("transform",t(-3,-k.height+8)),C.insert("rect",".static-attribution").attr({x:-k.width-6,y:-k.height-3,width:k.width+6,height:k.height+3,fill:"rgba(255, 255, 255, 0.75)"});var S=1;k.width+6>T&&(S=T/(k.width+6));var A=[p.l+p.w*y.x[1],p.t+p.h*(1-y.y[0])];C.attr("transform",t(A[0],A[1])+a(S))}},e.updateFx=function(f){for(var h=f._fullLayout,d=h._subplots[c],p=0;p=0;u--)l.removeLayer(n[u][1])},s.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},r.exports=function(n,u){var c=u[0].trace,f=new o(n,c.uid),h=f.sourceId,d=t(u),p=f.below=n.belowLookup["trace-"+c.uid];return n.map.addSource(h,{type:"geojson",data:d.geojson}),f._addLayers(d,p),u[0].trace._glTrace=f,f}}}),Eye=ye({"src/traces/choroplethmap/index.js"(e,r){"use strict";r.exports={attributes:tG(),supplyDefaults:Tye(),colorbar:Ey(),calc:LP(),plot:Mye(),hoverPoints:FP(),eventData:PP(),selectPoints:IP(),styleOnSelect:function(t,a){if(a){var i=a[0].trace;i._glTrace.updateOnSelect(a)}},getBelow:function(t,a){for(var i=a.getMapLayers(),o=i.length-2;o>=0;o--){var s=i[o].id;if(typeof s=="string"&&s.indexOf("water")===0){for(var l=o+1;l0?+y[g]:0),p.push({type:"Feature",geometry:{type:"Point",coordinates:E},properties:M})}}var w=o.extractOpts(c),k=w.reversescale?o.flipScale(w.colorscale):w.colorscale,T=k[0][1],b=i.opacity(T)<1?T:i.addOpacity(T,0),S=["interpolate",["linear"],["heatmap-density"],0,b];for(g=1;g=0;n--)s.removeLayer(l[n][1])},o.dispose=function(){var s=this.subplot.map;this._removeLayers(),s.removeSource(this.sourceId)},r.exports=function(l,n){var u=n[0].trace,c=new i(l,u.uid),f=c.sourceId,h=t(n),d=c.below=l.belowLookup["trace-"+u.uid];return l.map.addSource(f,{type:"geojson",data:h.geojson}),c._addLayers(h,d),c}}}),Fye=ye({"src/traces/densitymap/hover.js"(e,r){"use strict";var t=qi(),a=IM().hoverPoints,i=IM().getExtraText;r.exports=function(s,l,n){var u=a(s,l,n);if(u){var c=u[0],f=c.cd,h=f[0].trace,d=f[c.index];if(delete c.color,"z"in d){var p=c.subplot.mockAxis;c.z=d.z,c.zLabel=t.tickText(p,p.c2l(d.z),"hover").text}return c.extraText=i(h,d,f[0].t.labels),[c]}}}}),Pye=ye({"src/traces/densitymap/event_data.js"(e,r){"use strict";r.exports=function(a,i){return a.lon=i.lon,a.lat=i.lat,a.z=i.z,a}}}),Iye=ye({"src/traces/densitymap/index.js"(e,r){"use strict";r.exports={attributes:aG(),supplyDefaults:kye(),colorbar:Ey(),formatLabels:MI(),calc:Cye(),plot:Lye(),hoverPoints:Fye(),eventData:Pye(),getBelow:function(t,a){for(var i=a.getMapLayers(),o=0;ox[F%x.length];v("color",_.label.map((F,D)=>i.addOpacity(E(D),.8))),v("customdata");var M=f.link||{},C=l.newContainer(h,"link");function w(F,D){return t.coerce(M,C,a.link,F,D)}w("label"),w("arrowlen"),w("source"),w("target"),w("value"),w("line.color"),w("line.width"),w("hoverinfo",f.hoverinfo),s(M,C,w,m),w("hovertemplate"),w("sort");var k=i.luminosity(p.paper_bgcolor)<.333,T=k?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",b=w("color",T);function S(F){if(!i.isValid(F))return F;let D=i.opacity(F);return D<=.8?i.addOpacity(F,D+.2):k?i.brighten(F,10):i.adjustLightness(F,-10)}w("hovercolor",Array.isArray(b)?b.map(S):S(b)),w("customdata"),n(M,C,{name:"colorscales",handleItemDefaults:u}),o(h,p,g),g("orientation"),g("direction"),g("valueformat"),g("valuesuffix");let A=_.x.length&&_.y.length?"freeform":void 0;g("arrangement",A),t.coerceFont(g,"textfont",p.font,{autoShadowDflt:!0}),h._length=null};function u(c,f){function h(d,p){return t.coerce(c,f,a.link.colorscales,d,p)}h("label"),h("cmin"),h("cmax"),h("colorscale")}}}),nG=ye({"node_modules/strongly-connected-components/scc.js"(e,r){"use strict";r.exports=t;function t(a){for(var i=a.length,o=new Array(i),s=new Array(i),l=new Array(i),n=new Array(i),u=new Array(i),c=new Array(i),f=0;f0;){v=E[E.length-1];var M=a[v];if(n[v]=0&&c[v].push(u[w])}n[v]=C}else{if(s[v]===o[v]){for(var k=[],T=[],b=0,C=x.length-1;C>=0;--C){var S=x[C];if(l[S]=!1,k.push(S),T.push(c[S]),b+=c[S].length,u[S]=d.length,S===v){x.length=C;break}}d.push(k);for(var A=new Array(b),C=0;Cw&&(w=h.source[x]),h.target[x]>w&&(w=h.target[x]);var k=w+1;c.node._count=k;var T,b=c.node.groups,S={};for(x=0;x0&&s(z,k)&&s(I,k)&&!(S.hasOwnProperty(z)&&S.hasOwnProperty(I)&&S[z]===S[I])){S.hasOwnProperty(I)&&(I=S[I]),S.hasOwnProperty(z)&&(z=S[z]),z=+z,I=+I,y[z]=y[I]=!0;var L="";h.label&&h.label[x]&&(L=h.label[x]);var B=null;L&&_.hasOwnProperty(L)&&(B=_[L]),d.push({pointNumber:x,label:L,color:p?h.color[x]:h.color,hovercolor:g?h.hovercolor[x]:h.hovercolor,customdata:m?h.customdata[x]:h.customdata,concentrationscale:B,source:z,target:I,value:+P}),R.source.push(z),R.target.push(I)}}var O=k+b.length,G=o(f.color),$=o(f.customdata),X=[];for(x=0;xk-1,childrenNodes:[],pointNumber:x,label:Z,color:G?f.color[x]:f.color,customdata:$?f.customdata[x]:f.customdata})}var J=!1;return u(O,R.source,R.target)&&(J=!0),{circular:J,links:d,nodes:X,groups:b,groupLookup:S}}function u(c,f,h){for(var d=a.init2dArray(c,0),p=0;p1})}r.exports=function(f,h){var d=n(h);return i({circular:d.circular,_nodes:d.nodes,_links:d.links,_groups:d.groups,_groupLookup:d.groupLookup})}}}),Oye=ye({"node_modules/d3-quadtree/dist/d3-quadtree.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e):(t=t||self,a(t.d3=t.d3||{}))})(e,function(t){"use strict";function a(k){var T=+this._x.call(null,k),b=+this._y.call(null,k);return i(this.cover(T,b),T,b,k)}function i(k,T,b,S){if(isNaN(T)||isNaN(b))return k;var A,F=k._root,D={data:S},R=k._x0,P=k._y0,z=k._x1,I=k._y1,L,B,O,G,$,X,Z,J;if(!F)return k._root=D,k;for(;F.length;)if(($=T>=(L=(R+z)/2))?R=L:z=L,(X=b>=(B=(P+I)/2))?P=B:I=B,A=F,!(F=F[Z=X<<1|$]))return A[Z]=D,k;if(O=+k._x.call(null,F.data),G=+k._y.call(null,F.data),T===O&&b===G)return D.next=F,A?A[Z]=D:k._root=D,k;do A=A?A[Z]=new Array(4):k._root=new Array(4),($=T>=(L=(R+z)/2))?R=L:z=L,(X=b>=(B=(P+I)/2))?P=B:I=B;while((Z=X<<1|$)===(J=(G>=B)<<1|O>=L));return A[J]=F,A[Z]=D,k}function o(k){var T,b,S=k.length,A,F,D=new Array(S),R=new Array(S),P=1/0,z=1/0,I=-1/0,L=-1/0;for(b=0;bI&&(I=A),FL&&(L=F));if(P>I||z>L)return this;for(this.cover(P,z).cover(I,L),b=0;bk||k>=A||S>T||T>=F;)switch(z=(TI||(R=G.y0)>L||(P=G.x1)=Z)<<1|k>=X)&&(G=B[B.length-1],B[B.length-1]=B[B.length-1-$],B[B.length-1-$]=G)}else{var J=k-+this._x.call(null,O.data),N=T-+this._y.call(null,O.data),H=J*J+N*N;if(H=(B=(D+P)/2))?D=B:P=B,($=L>=(O=(R+z)/2))?R=O:z=O,T=b,!(b=b[X=$<<1|G]))return this;if(!b.length)break;(T[X+1&3]||T[X+2&3]||T[X+3&3])&&(S=T,Z=X)}for(;b.data!==k;)if(A=b,!(b=b.next))return this;return(F=b.next)&&delete b.next,A?(F?A.next=F:delete A.next,this):T?(F?T[X]=F:delete T[X],(b=T[0]||T[1]||T[2]||T[3])&&b===(T[3]||T[2]||T[1]||T[0])&&!b.length&&(S?S[Z]=b:this._root=b),this):(this._root=F,this)}function h(k){for(var T=0,b=k.length;T=y.length)return v!=null&&w.sort(v),x!=null?x(w):w;for(var S=-1,A=w.length,F=y[k++],D,R,P=o(),z,I=T();++Sy.length)return w;var T,b=_[k-1];return x!=null&&k>=y.length?T=w.entries():(T=[],w.each(function(S,A){T.push({key:A,values:C(S,k)})})),b!=null?T.sort(function(S,A){return b(S.key,A.key)}):T}return E={object:function(w){return M(w,0,l,n)},map:function(w){return M(w,0,u,c)},entries:function(w){return C(M(w,0,u,c),0)},key:function(w){return y.push(w),E},sortKeys:function(w){return _[y.length-1]=w,E},sortValues:function(w){return v=w,E},rollup:function(w){return x=w,E}}}function l(){return{}}function n(y,_,v){y[_]=v}function u(){return o()}function c(y,_,v){y.set(_,v)}function f(){}var h=o.prototype;f.prototype=d.prototype={constructor:f,has:h.has,add:function(y){return y+="",this[a+y]=y,this},remove:h.remove,clear:h.clear,values:h.keys,size:h.size,empty:h.empty,each:h.each};function d(y,_){var v=new f;if(y instanceof f)y.each(function(M){v.add(M)});else if(y){var x=-1,E=y.length;if(_==null)for(;++x=0&&(h=f.slice(d+1),f=f.slice(0,d)),f&&!c.hasOwnProperty(f))throw new Error("unknown type: "+f);return{type:f,name:h}})}o.prototype=i.prototype={constructor:o,on:function(u,c){var f=this._,h=s(u+"",f),d,p=-1,g=h.length;if(arguments.length<2){for(;++p0)for(var f=new Array(d),h=0,d,p;h=0&&k._call.call(null,T),k=k._next;--a}function v(){c=(u=h.now())+f,a=i=0;try{_()}finally{a=0,E(),c=0}}function x(){var k=h.now(),T=k-u;T>s&&(f-=T,u=k)}function E(){for(var k,T=l,b,S=1/0;T;)T._call?(S>T._time&&(S=T._time),k=T,T=T._next):(b=T._next,T._next=null,T=k?k._next=b:l=b);n=k,M(S)}function M(k){if(!a){i&&(i=clearTimeout(i));var T=k-c;T>24?(k<1/0&&(i=setTimeout(v,k-h.now()-f)),o&&(o=clearInterval(o))):(o||(u=h.now(),o=setInterval(x,s)),a=1,d(v))}}function C(k,T,b){var S=new m;return T=T==null?0:+T,S.restart(function(A){S.stop(),k(A+T)},T,b),S}function w(k,T,b){var S=new m,A=T;return T==null?(S.restart(k,T,b),S):(T=+T,b=b==null?p():+b,S.restart(function F(D){D+=A,S.restart(F,A+=T,b),k(D)},T,b),S)}t.interval=w,t.now=p,t.timeout=C,t.timer=y,t.timerFlush=_,Object.defineProperty(t,"__esModule",{value:!0})})}}),Uye=ye({"node_modules/d3-force/dist/d3-force.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e,Oye(),oG(),Nye(),jye()):a(t.d3=t.d3||{},t.d3,t.d3,t.d3,t.d3)})(e,(function(t,a,i,o,s){"use strict";function l(k,T){var b;k==null&&(k=0),T==null&&(T=0);function S(){var A,F=b.length,D,R=0,P=0;for(A=0;AL.index){var Y=B-V.x-V.vx,K=O-V.y-V.vy,re=Y*Y+K*K;reB+q||WO+q||UP.r&&(P.r=P[z].r)}function R(){if(T){var P,z=T.length,I;for(b=new Array(z),P=0;P1?($==null?R.remove(G):R.set(G,O($)),T):R.get(G)},find:function(G,$,X){var Z=0,J=k.length,N,H,W,U,V;for(X==null?X=1/0:X*=X,Z=0;Z1?(z.on(G,$),T):z.on(G)}}}function E(){var k,T,b,S=n(-30),A,F=1,D=1/0,R=.81;function P(B){var O,G=k.length,$=a.quadtree(k,m,y).visitAfter(I);for(b=B,O=0;O=D)return;(B.data!==T||B.next)&&(X===0&&(X=u(),N+=X*X),Z===0&&(Z=u(),N+=Z*Z),Ngt?1:vt>=gt?0:NaN}function i(vt){let gt=vt,St=vt;vt.length===1&&(gt=(lr,dr)=>vt(lr)-dr,St=o(vt));function Dt(lr,dr,yr,vr){for(yr==null&&(yr=0),vr==null&&(vr=lr.length);yr>>1;St(lr[Fr],dr)<0?yr=Fr+1:vr=Fr}return yr}function kt(lr,dr,yr,vr){for(yr==null&&(yr=0),vr==null&&(vr=lr.length);yr>>1;St(lr[Fr],dr)>0?vr=Fr:yr=Fr+1}return yr}function Vt(lr,dr,yr,vr){yr==null&&(yr=0),vr==null&&(vr=lr.length);let Fr=Dt(lr,dr,yr,vr-1);return Fr>yr&>(lr[Fr-1],dr)>-gt(lr[Fr],dr)?Fr-1:Fr}return{left:Dt,center:Vt,right:kt}}function o(vt){return(gt,St)=>a(vt(gt),St)}function s(vt){return vt===null?NaN:+vt}function*l(vt,gt){if(gt===void 0)for(let St of vt)St!=null&&(St=+St)>=St&&(yield St);else{let St=-1;for(let Dt of vt)(Dt=gt(Dt,++St,vt))!=null&&(Dt=+Dt)>=Dt&&(yield Dt)}}let n=i(a),u=n.right,c=n.left,f=i(s).center;function h(vt,gt){let St=0;if(gt===void 0)for(let Dt of vt)Dt!=null&&(Dt=+Dt)>=Dt&&++St;else{let Dt=-1;for(let kt of vt)(kt=gt(kt,++Dt,vt))!=null&&(kt=+kt)>=kt&&++St}return St}function d(vt){return vt.length|0}function p(vt){return!(vt>0)}function g(vt){return typeof vt!="object"||"length"in vt?vt:Array.from(vt)}function m(vt){return gt=>vt(...gt)}function y(...vt){let gt=typeof vt[vt.length-1]=="function"&&m(vt.pop());vt=vt.map(g);let St=vt.map(d),Dt=vt.length-1,kt=new Array(Dt+1).fill(0),Vt=[];if(Dt<0||St.some(p))return Vt;for(;;){Vt.push(kt.map((dr,yr)=>vt[yr][dr]));let lr=Dt;for(;++kt[lr]===St[lr];){if(lr===0)return gt?Vt.map(gt):Vt;kt[lr--]=0}}}function _(vt,gt){var St=0,Dt=0;return Float64Array.from(vt,gt===void 0?kt=>St+=+kt||0:kt=>St+=+gt(kt,Dt++,vt)||0)}function v(vt,gt){return gtvt?1:gt>=vt?0:NaN}function x(vt,gt){let St=0,Dt,kt=0,Vt=0;if(gt===void 0)for(let lr of vt)lr!=null&&(lr=+lr)>=lr&&(Dt=lr-kt,kt+=Dt/++St,Vt+=Dt*(lr-kt));else{let lr=-1;for(let dr of vt)(dr=gt(dr,++lr,vt))!=null&&(dr=+dr)>=dr&&(Dt=dr-kt,kt+=Dt/++St,Vt+=Dt*(dr-kt))}if(St>1)return Vt/(St-1)}function E(vt,gt){let St=x(vt,gt);return St&&Math.sqrt(St)}function M(vt,gt){let St,Dt;if(gt===void 0)for(let kt of vt)kt!=null&&(St===void 0?kt>=kt&&(St=Dt=kt):(St>kt&&(St=kt),Dt=Vt&&(St=Dt=Vt):(St>Vt&&(St=Vt),Dt0){for(lr=gt[--St];St>0&&(Dt=lr,kt=gt[--St],lr=Dt+kt,Vt=kt-(lr-Dt),!Vt););St>0&&(Vt<0&>[St-1]<0||Vt>0&>[St-1]>0)&&(kt=Vt*2,Dt=lr+kt,kt==Dt-lr&&(lr=Dt))}return lr}}function w(vt,gt){let St=new C;if(gt===void 0)for(let Dt of vt)(Dt=+Dt)&&St.add(Dt);else{let Dt=-1;for(let kt of vt)(kt=+gt(kt,++Dt,vt))&&St.add(kt)}return+St}function k(vt,gt){let St=new C,Dt=-1;return Float64Array.from(vt,gt===void 0?kt=>St.add(+kt||0):kt=>St.add(+gt(kt,++Dt,vt)||0))}class T extends Map{constructor(gt,St=D){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:St}}),gt!=null)for(let[Dt,kt]of gt)this.set(Dt,kt)}get(gt){return super.get(S(this,gt))}has(gt){return super.has(S(this,gt))}set(gt,St){return super.set(A(this,gt),St)}delete(gt){return super.delete(F(this,gt))}}class b extends Set{constructor(gt,St=D){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:St}}),gt!=null)for(let Dt of gt)this.add(Dt)}has(gt){return super.has(S(this,gt))}add(gt){return super.add(A(this,gt))}delete(gt){return super.delete(F(this,gt))}}function S({_intern:vt,_key:gt},St){let Dt=gt(St);return vt.has(Dt)?vt.get(Dt):St}function A({_intern:vt,_key:gt},St){let Dt=gt(St);return vt.has(Dt)?vt.get(Dt):(vt.set(Dt,St),St)}function F({_intern:vt,_key:gt},St){let Dt=gt(St);return vt.has(Dt)&&(St=vt.get(St),vt.delete(Dt)),St}function D(vt){return vt!==null&&typeof vt=="object"?vt.valueOf():vt}function R(vt){return vt}function P(vt,...gt){return $(vt,R,R,gt)}function z(vt,...gt){return $(vt,Array.from,R,gt)}function I(vt,gt,...St){return $(vt,R,gt,St)}function L(vt,gt,...St){return $(vt,Array.from,gt,St)}function B(vt,...gt){return $(vt,R,G,gt)}function O(vt,...gt){return $(vt,Array.from,G,gt)}function G(vt){if(vt.length!==1)throw new Error("duplicate key");return vt[0]}function $(vt,gt,St,Dt){return(function kt(Vt,lr){if(lr>=Dt.length)return St(Vt);let dr=new T,yr=Dt[lr++],vr=-1;for(let Fr of Vt){let la=yr(Fr,++vr,Vt),Hr=dr.get(la);Hr?Hr.push(Fr):dr.set(la,[Fr])}for(let[Fr,la]of dr)dr.set(Fr,kt(la,lr));return gt(dr)})(vt,0)}function X(vt,gt){return Array.from(gt,St=>vt[St])}function Z(vt,...gt){if(typeof vt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");vt=Array.from(vt);let[St=a]=gt;if(St.length===1||gt.length>1){let Dt=Uint32Array.from(vt,(kt,Vt)=>Vt);return gt.length>1?(gt=gt.map(kt=>vt.map(kt)),Dt.sort((kt,Vt)=>{for(let lr of gt){let dr=a(lr[kt],lr[Vt]);if(dr)return dr}})):(St=vt.map(St),Dt.sort((kt,Vt)=>a(St[kt],St[Vt]))),X(vt,Dt)}return vt.sort(St)}function J(vt,gt,St){return(gt.length===1?Z(I(vt,gt,St),(([Dt,kt],[Vt,lr])=>a(kt,lr)||a(Dt,Vt))):Z(P(vt,St),(([Dt,kt],[Vt,lr])=>gt(kt,lr)||a(Dt,Vt)))).map(([Dt])=>Dt)}var N=Array.prototype,H=N.slice;function W(vt){return function(){return vt}}var U=Math.sqrt(50),V=Math.sqrt(10),j=Math.sqrt(2);function q(vt,gt,St){var Dt,kt=-1,Vt,lr,dr;if(gt=+gt,vt=+vt,St=+St,vt===gt&&St>0)return[vt];if((Dt=gt0){let yr=Math.round(vt/dr),vr=Math.round(gt/dr);for(yr*drgt&&--vr,lr=new Array(Vt=vr-yr+1);++ktgt&&--vr,lr=new Array(Vt=vr-yr+1);++kt=0?(Vt>=U?10:Vt>=V?5:Vt>=j?2:1)*Math.pow(10,kt):-Math.pow(10,-kt)/(Vt>=U?10:Vt>=V?5:Vt>=j?2:1)}function K(vt,gt,St){var Dt=Math.abs(gt-vt)/Math.max(0,St),kt=Math.pow(10,Math.floor(Math.log(Dt)/Math.LN10)),Vt=Dt/kt;return Vt>=U?kt*=10:Vt>=V?kt*=5:Vt>=j&&(kt*=2),gt0?(vt=Math.floor(vt/kt)*kt,gt=Math.ceil(gt/kt)*kt):kt<0&&(vt=Math.ceil(vt*kt)/kt,gt=Math.floor(gt*kt)/kt),Dt=kt}}function se(vt){return Math.ceil(Math.log(h(vt))/Math.LN2)+1}function le(){var vt=R,gt=M,St=se;function Dt(kt){Array.isArray(kt)||(kt=Array.from(kt));var Vt,lr=kt.length,dr,yr=new Array(lr);for(Vt=0;Vt=la)if(_i>=la&>===M){let Ka=Y(Fr,la,ti);isFinite(Ka)&&(Ka>0?la=(Math.floor(la/Ka)+1)*Ka:Ka<0&&(la=(Math.ceil(la*-Ka)+1)/-Ka))}else Hr.pop()}for(var jr=Hr.length;Hr[0]<=Fr;)Hr.shift(),--jr;for(;Hr[jr-1]>la;)Hr.pop(),--jr;var Oa=new Array(jr+1),Da;for(Vt=0;Vt<=jr;++Vt)Da=Oa[Vt]=[],Da.x0=Vt>0?Hr[Vt-1]:Fr,Da.x1=Vt=Dt)&&(St=Dt);else{let Dt=-1;for(let kt of vt)(kt=gt(kt,++Dt,vt))!=null&&(St=kt)&&(St=kt)}return St}function fe(vt,gt){let St;if(gt===void 0)for(let Dt of vt)Dt!=null&&(St>Dt||St===void 0&&Dt>=Dt)&&(St=Dt);else{let Dt=-1;for(let kt of vt)(kt=gt(kt,++Dt,vt))!=null&&(St>kt||St===void 0&&kt>=kt)&&(St=kt)}return St}function pe(vt,gt,St=0,Dt=vt.length-1,kt=a){for(;Dt>St;){if(Dt-St>600){let yr=Dt-St+1,vr=gt-St+1,Fr=Math.log(yr),la=.5*Math.exp(2*Fr/3),Hr=.5*Math.sqrt(Fr*la*(yr-la)/yr)*(vr-yr/2<0?-1:1),jr=Math.max(St,Math.floor(gt-vr*la/yr+Hr)),Oa=Math.min(Dt,Math.floor(gt+(yr-vr)*la/yr+Hr));pe(vt,gt,jr,Oa,kt)}let Vt=vt[gt],lr=St,dr=Dt;for(we(vt,St,gt),kt(vt[Dt],Vt)>0&&we(vt,St,Dt);lr0;)--dr}kt(vt[St],Vt)===0?we(vt,St,dr):(++dr,we(vt,dr,Dt)),dr<=gt&&(St=dr+1),gt<=dr&&(Dt=dr-1)}return vt}function we(vt,gt,St){let Dt=vt[gt];vt[gt]=vt[St],vt[St]=Dt}function xe(vt,gt,St){if(vt=Float64Array.from(l(vt,St)),!!(Dt=vt.length)){if((gt=+gt)<=0||Dt<2)return fe(vt);if(gt>=1)return ue(vt);var Dt,kt=(Dt-1)*gt,Vt=Math.floor(kt),lr=ue(pe(vt,Vt).subarray(0,Vt+1)),dr=fe(vt.subarray(Vt+1));return lr+(dr-lr)*(kt-Vt)}}function he(vt,gt,St=s){if(Dt=vt.length){if((gt=+gt)<=0||Dt<2)return+St(vt[0],0,vt);if(gt>=1)return+St(vt[Dt-1],Dt-1,vt);var Dt,kt=(Dt-1)*gt,Vt=Math.floor(kt),lr=+St(vt[Vt],Vt,vt),dr=+St(vt[Vt+1],Vt+1,vt);return lr+(dr-lr)*(kt-Vt)}}function oe(vt,gt,St){return Math.ceil((St-gt)/(2*(xe(vt,.75)-xe(vt,.25))*Math.pow(h(vt),-1/3)))}function te(vt,gt,St){return Math.ceil((St-gt)/(3.5*E(vt)*Math.pow(h(vt),-1/3)))}function ie(vt,gt){let St,Dt=-1,kt=-1;if(gt===void 0)for(let Vt of vt)++kt,Vt!=null&&(St=Vt)&&(St=Vt,Dt=kt);else for(let Vt of vt)(Vt=gt(Vt,++kt,vt))!=null&&(St=Vt)&&(St=Vt,Dt=kt);return Dt}function ee(vt,gt){let St=0,Dt=0;if(gt===void 0)for(let kt of vt)kt!=null&&(kt=+kt)>=kt&&(++St,Dt+=kt);else{let kt=-1;for(let Vt of vt)(Vt=gt(Vt,++kt,vt))!=null&&(Vt=+Vt)>=Vt&&(++St,Dt+=Vt)}if(St)return Dt/St}function ce(vt,gt){return xe(vt,.5,gt)}function*_e(vt){for(let gt of vt)yield*Nx(gt)}function Se(vt){return Array.from(_e(vt))}function Me(vt,gt){let St,Dt=-1,kt=-1;if(gt===void 0)for(let Vt of vt)++kt,Vt!=null&&(St>Vt||St===void 0&&Vt>=Vt)&&(St=Vt,Dt=kt);else for(let Vt of vt)(Vt=gt(Vt,++kt,vt))!=null&&(St>Vt||St===void 0&&Vt>=Vt)&&(St=Vt,Dt=kt);return Dt}function Ue(vt,gt=Ge){let St=[],Dt,kt=!1;for(let Vt of vt)kt&&St.push(gt(Dt,Vt)),Dt=Vt,kt=!0;return St}function Ge(vt,gt){return[vt,gt]}function Ze(vt,gt,St){vt=+vt,gt=+gt,St=(kt=arguments.length)<2?(gt=vt,vt=0,1):kt<3?1:+St;for(var Dt=-1,kt=Math.max(0,Math.ceil((gt-vt)/St))|0,Vt=new Array(kt);++Dt0:a(lr,lr)===0)&&(St=Vt,kt=lr,Dt=!0)}}else for(let kt of vt)(Dt?gt(kt,St)>0:gt(kt,kt)===0)&&(St=kt,Dt=!0);return St}function Pt(vt,gt=a){if(gt.length===1)return ie(vt,gt);let St,Dt=-1,kt=-1;for(let Vt of vt)++kt,(Dt<0?gt(Vt,Vt)===0:gt(Vt,St)>0)&&(St=Vt,Dt=kt);return Dt}function pt(vt,gt){let St=dt(vt,gt);return St<0?void 0:St}var Tt=st(Math.random);function st(vt){return function(St,Dt=0,kt=St.length){let Vt=kt-(Dt=+Dt);for(;Vt;){let lr=vt()*Vt--|0,dr=St[Vt+Dt];St[Vt+Dt]=St[lr+Dt],St[lr+Dt]=dr}return St}}function Ve(vt,gt){let St=0;if(gt===void 0)for(let Dt of vt)(Dt=+Dt)&&(St+=Dt);else{let Dt=-1;for(let kt of vt)(kt=+gt(kt,++Dt,vt))&&(St+=kt)}return St}function Ye(vt){if(!(Vt=vt.length))return[];for(var gt=-1,St=fe(vt,me),Dt=new Array(St);++gtgt(St,Dt,vt))}function Je(vt,gt,St){if(typeof gt!="function")throw new TypeError("reducer is not a function");let Dt=vt[Symbol.iterator](),kt,Vt,lr=-1;if(arguments.length<3){if({done:kt,value:St}=Dt.next(),kt)return;++lr}for(;{done:kt,value:Vt}=Dt.next(),!kt;)St=gt(St,Vt,++lr,vt);return St}function qe(vt){if(typeof vt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(vt).reverse()}function at(vt,...gt){vt=new Set(vt);for(let St of gt)for(let Dt of St)vt.delete(Dt);return vt}function tt(vt,gt){let St=gt[Symbol.iterator](),Dt=new Set;for(let kt of vt){if(Dt.has(kt))return!1;let Vt,lr;for(;({value:Vt,done:lr}=St.next())&&!lr;){if(Object.is(kt,Vt))return!1;Dt.add(Vt)}}return!0}function ct(vt){return vt instanceof Set?vt:new Set(vt)}function At(vt,...gt){vt=new Set(vt),gt=gt.map(ct);e:for(let St of vt)for(let Dt of gt)if(!Dt.has(St)){vt.delete(St);continue e}return vt}function ft(vt,gt){let St=vt[Symbol.iterator](),Dt=new Set;for(let kt of gt){if(Dt.has(kt))continue;let Vt,lr;for(;{value:Vt,done:lr}=St.next();){if(lr)return!1;if(Dt.add(Vt),Object.is(kt,Vt))break}}return!0}function qt(vt,gt){return ft(gt,vt)}function ar(...vt){let gt=new Set;for(let St of vt)for(let Dt of St)gt.add(Dt);return gt}t.Adder=C,t.InternMap=T,t.InternSet=b,t.ascending=a,t.bin=le,t.bisect=u,t.bisectCenter=f,t.bisectLeft=c,t.bisectRight=u,t.bisector=i,t.count=h,t.cross=y,t.cumsum=_,t.descending=v,t.deviation=E,t.difference=at,t.disjoint=tt,t.every=Ee,t.extent=M,t.fcumsum=k,t.filter=Ce,t.fsum=w,t.greatest=_t,t.greatestIndex=Pt,t.group=P,t.groupSort=J,t.groups=z,t.histogram=le,t.index=B,t.indexes=O,t.intersection=At,t.least=Ke,t.leastIndex=dt,t.map=Fe,t.max=ue,t.maxIndex=ie,t.mean=ee,t.median=ce,t.merge=Se,t.min=fe,t.minIndex=Me,t.nice=re,t.pairs=Ue,t.permute=X,t.quantile=xe,t.quantileSorted=he,t.quickselect=pe,t.range=Ze,t.reduce=Je,t.reverse=qe,t.rollup=I,t.rollups=L,t.scan=pt,t.shuffle=Tt,t.shuffler=st,t.some=De,t.sort=Z,t.subset=qt,t.sum=Ve,t.superset=ft,t.thresholdFreedmanDiaconis=oe,t.thresholdScott=te,t.thresholdSturges=se,t.tickIncrement=Y,t.tickStep=K,t.ticks=q,t.transpose=Ye,t.union=ar,t.variance=x,t.zip=be,Object.defineProperty(t,"__esModule",{value:!0})}))}}),Vye=ye({"node_modules/d3-path/dist/d3-path.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e):(t=t||self,a(t.d3=t.d3||{}))})(e,function(t){"use strict";var a=Math.PI,i=2*a,o=1e-6,s=i-o;function l(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function n(){return new l}l.prototype=n.prototype={constructor:l,moveTo:function(u,c){this._+="M"+(this._x0=this._x1=+u)+","+(this._y0=this._y1=+c)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(u,c){this._+="L"+(this._x1=+u)+","+(this._y1=+c)},quadraticCurveTo:function(u,c,f,h){this._+="Q"+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},bezierCurveTo:function(u,c,f,h,d,p){this._+="C"+ +u+","+ +c+","+ +f+","+ +h+","+(this._x1=+d)+","+(this._y1=+p)},arcTo:function(u,c,f,h,d){u=+u,c=+c,f=+f,h=+h,d=+d;var p=this._x1,g=this._y1,m=f-u,y=h-c,_=p-u,v=g-c,x=_*_+v*v;if(d<0)throw new Error("negative radius: "+d);if(this._x1===null)this._+="M"+(this._x1=u)+","+(this._y1=c);else if(x>o)if(!(Math.abs(v*m-y*_)>o)||!d)this._+="L"+(this._x1=u)+","+(this._y1=c);else{var E=f-p,M=h-g,C=m*m+y*y,w=E*E+M*M,k=Math.sqrt(C),T=Math.sqrt(x),b=d*Math.tan((a-Math.acos((C+x-w)/(2*k*T)))/2),S=b/T,A=b/k;Math.abs(S-1)>o&&(this._+="L"+(u+S*_)+","+(c+S*v)),this._+="A"+d+","+d+",0,0,"+ +(v*E>_*M)+","+(this._x1=u+A*m)+","+(this._y1=c+A*y)}},arc:function(u,c,f,h,d,p){u=+u,c=+c,f=+f,p=!!p;var g=f*Math.cos(h),m=f*Math.sin(h),y=u+g,_=c+m,v=1^p,x=p?h-d:d-h;if(f<0)throw new Error("negative radius: "+f);this._x1===null?this._+="M"+y+","+_:(Math.abs(this._x1-y)>o||Math.abs(this._y1-_)>o)&&(this._+="L"+y+","+_),f&&(x<0&&(x=x%i+i),x>s?this._+="A"+f+","+f+",0,1,"+v+","+(u-g)+","+(c-m)+"A"+f+","+f+",0,1,"+v+","+(this._x1=y)+","+(this._y1=_):x>o&&(this._+="A"+f+","+f+",0,"+ +(x>=a)+","+v+","+(this._x1=u+f*Math.cos(d))+","+(this._y1=c+f*Math.sin(d))))},rect:function(u,c,f,h){this._+="M"+(this._x0=this._x1=+u)+","+(this._y0=this._y1=+c)+"h"+ +f+"v"+ +h+"h"+-f+"Z"},toString:function(){return this._}},t.path=n,Object.defineProperty(t,"__esModule",{value:!0})})}}),sG=ye({"node_modules/d3-shape/dist/d3-shape.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e,Vye()):(t=t||self,a(t.d3=t.d3||{},t.d3))})(e,function(t,a){"use strict";function i(Be){return function(){return Be}}var o=Math.abs,s=Math.atan2,l=Math.cos,n=Math.max,u=Math.min,c=Math.sin,f=Math.sqrt,h=1e-12,d=Math.PI,p=d/2,g=2*d;function m(Be){return Be>1?0:Be<-1?d:Math.acos(Be)}function y(Be){return Be>=1?p:Be<=-1?-p:Math.asin(Be)}function _(Be){return Be.innerRadius}function v(Be){return Be.outerRadius}function x(Be){return Be.startAngle}function E(Be){return Be.endAngle}function M(Be){return Be&&Be.padAngle}function C(Be,et,ut,bt,Ot,It,Wt,jt){var sr=ut-Be,kr=bt-et,Mr=Wt-Ot,ua=jt-It,ra=ua*sr-Mr*kr;if(!(ra*raHi*Hi+Vi*Vi&&(Ni=jn,un=bn),{cx:Ni,cy:un,x01:-Mr,y01:-ua,x11:Ni*(Ot/Zi-1),y11:un*(Ot/Zi-1)}}function k(){var Be=_,et=v,ut=i(0),bt=null,Ot=x,It=E,Wt=M,jt=null;function sr(){var kr,Mr,ua=+Be.apply(this,arguments),ra=+et.apply(this,arguments),ni=Ot.apply(this,arguments)-p,Ca=It.apply(this,arguments)-p,Li=o(Ca-ni),Va=Ca>ni;if(jt||(jt=kr=a.path()),rah))jt.moveTo(0,0);else if(Li>g-h)jt.moveTo(ra*l(ni),ra*c(ni)),jt.arc(0,0,ra,ni,Ca,!Va),ua>h&&(jt.moveTo(ua*l(Ca),ua*c(Ca)),jt.arc(0,0,ua,Ca,ni,Va));else{var dn=ni,rn=Ca,pa=ni,_n=Ca,Zi=Li,Fi=Li,xn=Wt.apply(this,arguments)/2,Ni=xn>h&&(bt?+bt.apply(this,arguments):f(ua*ua+ra*ra)),un=u(o(ra-ua)/2,+ut.apply(this,arguments)),jn=un,bn=un,Wa,ui;if(Ni>h){var Hi=y(Ni/ua*c(xn)),Vi=y(Ni/ra*c(xn));(Zi-=Hi*2)>h?(Hi*=Va?1:-1,pa+=Hi,_n-=Hi):(Zi=0,pa=_n=(ni+Ca)/2),(Fi-=Vi*2)>h?(Vi*=Va?1:-1,dn+=Vi,rn-=Vi):(Fi=0,dn=rn=(ni+Ca)/2)}var $n=ra*l(dn),ro=ra*c(dn),Un=ua*l(_n),Kn=ua*c(_n);if(un>h){var To=ra*l(rn),Jn=ra*c(rn),qn=ua*l(pa),Fo=ua*c(pa),zn;if(Lih?bn>h?(Wa=w(qn,Fo,$n,ro,ra,bn,Va),ui=w(To,Jn,Un,Kn,ra,bn,Va),jt.moveTo(Wa.cx+Wa.x01,Wa.cy+Wa.y01),bnh)||!(Zi>h)?jt.lineTo(Un,Kn):jn>h?(Wa=w(Un,Kn,To,Jn,ua,-jn,Va),ui=w($n,ro,qn,Fo,ua,-jn,Va),jt.lineTo(Wa.cx+Wa.x01,Wa.cy+Wa.y01),jn=ra;--ni)jt.point(rn[ni],pa[ni]);jt.lineEnd(),jt.areaEnd()}Va&&(rn[ua]=+Be(Li,ua,Mr),pa[ua]=+ut(Li,ua,Mr),jt.point(et?+et(Li,ua,Mr):rn[ua],bt?+bt(Li,ua,Mr):pa[ua]))}if(dn)return jt=null,dn+""||null}function kr(){return F().defined(Ot).curve(Wt).context(It)}return sr.x=function(Mr){return arguments.length?(Be=typeof Mr=="function"?Mr:i(+Mr),et=null,sr):Be},sr.x0=function(Mr){return arguments.length?(Be=typeof Mr=="function"?Mr:i(+Mr),sr):Be},sr.x1=function(Mr){return arguments.length?(et=Mr==null?null:typeof Mr=="function"?Mr:i(+Mr),sr):et},sr.y=function(Mr){return arguments.length?(ut=typeof Mr=="function"?Mr:i(+Mr),bt=null,sr):ut},sr.y0=function(Mr){return arguments.length?(ut=typeof Mr=="function"?Mr:i(+Mr),sr):ut},sr.y1=function(Mr){return arguments.length?(bt=Mr==null?null:typeof Mr=="function"?Mr:i(+Mr),sr):bt},sr.lineX0=sr.lineY0=function(){return kr().x(Be).y(ut)},sr.lineY1=function(){return kr().x(Be).y(bt)},sr.lineX1=function(){return kr().x(et).y(ut)},sr.defined=function(Mr){return arguments.length?(Ot=typeof Mr=="function"?Mr:i(!!Mr),sr):Ot},sr.curve=function(Mr){return arguments.length?(Wt=Mr,It!=null&&(jt=Wt(It)),sr):Wt},sr.context=function(Mr){return arguments.length?(Mr==null?It=jt=null:jt=Wt(It=Mr),sr):It},sr}function R(Be,et){return etBe?1:et>=Be?0:NaN}function P(Be){return Be}function z(){var Be=P,et=R,ut=null,bt=i(0),Ot=i(g),It=i(0);function Wt(jt){var sr,kr=jt.length,Mr,ua,ra=0,ni=new Array(kr),Ca=new Array(kr),Li=+bt.apply(this,arguments),Va=Math.min(g,Math.max(-g,Ot.apply(this,arguments)-Li)),dn,rn=Math.min(Math.abs(Va)/kr,It.apply(this,arguments)),pa=rn*(Va<0?-1:1),_n;for(sr=0;sr0&&(ra+=_n);for(et!=null?ni.sort(function(Zi,Fi){return et(Ca[Zi],Ca[Fi])}):ut!=null&&ni.sort(function(Zi,Fi){return ut(jt[Zi],jt[Fi])}),sr=0,ua=ra?(Va-kr*pa)/ra:0;sr0?_n*ua:0)+pa,Ca[Mr]={data:jt[Mr],index:sr,value:_n,startAngle:Li,endAngle:dn,padAngle:rn};return Ca}return Wt.value=function(jt){return arguments.length?(Be=typeof jt=="function"?jt:i(+jt),Wt):Be},Wt.sortValues=function(jt){return arguments.length?(et=jt,ut=null,Wt):et},Wt.sort=function(jt){return arguments.length?(ut=jt,et=null,Wt):ut},Wt.startAngle=function(jt){return arguments.length?(bt=typeof jt=="function"?jt:i(+jt),Wt):bt},Wt.endAngle=function(jt){return arguments.length?(Ot=typeof jt=="function"?jt:i(+jt),Wt):Ot},Wt.padAngle=function(jt){return arguments.length?(It=typeof jt=="function"?jt:i(+jt),Wt):It},Wt}var I=B(b);function L(Be){this._curve=Be}L.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Be,et){this._curve.point(et*Math.sin(Be),et*-Math.cos(Be))}};function B(Be){function et(ut){return new L(Be(ut))}return et._curve=Be,et}function O(Be){var et=Be.curve;return Be.angle=Be.x,delete Be.x,Be.radius=Be.y,delete Be.y,Be.curve=function(ut){return arguments.length?et(B(ut)):et()._curve},Be}function G(){return O(F().curve(I))}function $(){var Be=D().curve(I),et=Be.curve,ut=Be.lineX0,bt=Be.lineX1,Ot=Be.lineY0,It=Be.lineY1;return Be.angle=Be.x,delete Be.x,Be.startAngle=Be.x0,delete Be.x0,Be.endAngle=Be.x1,delete Be.x1,Be.radius=Be.y,delete Be.y,Be.innerRadius=Be.y0,delete Be.y0,Be.outerRadius=Be.y1,delete Be.y1,Be.lineStartAngle=function(){return O(ut())},delete Be.lineX0,Be.lineEndAngle=function(){return O(bt())},delete Be.lineX1,Be.lineInnerRadius=function(){return O(Ot())},delete Be.lineY0,Be.lineOuterRadius=function(){return O(It())},delete Be.lineY1,Be.curve=function(Wt){return arguments.length?et(B(Wt)):et()._curve},Be}function X(Be,et){return[(et=+et)*Math.cos(Be-=Math.PI/2),et*Math.sin(Be)]}var Z=Array.prototype.slice;function J(Be){return Be.source}function N(Be){return Be.target}function H(Be){var et=J,ut=N,bt=S,Ot=A,It=null;function Wt(){var jt,sr=Z.call(arguments),kr=et.apply(this,sr),Mr=ut.apply(this,sr);if(It||(It=jt=a.path()),Be(It,+bt.apply(this,(sr[0]=kr,sr)),+Ot.apply(this,sr),+bt.apply(this,(sr[0]=Mr,sr)),+Ot.apply(this,sr)),jt)return It=null,jt+""||null}return Wt.source=function(jt){return arguments.length?(et=jt,Wt):et},Wt.target=function(jt){return arguments.length?(ut=jt,Wt):ut},Wt.x=function(jt){return arguments.length?(bt=typeof jt=="function"?jt:i(+jt),Wt):bt},Wt.y=function(jt){return arguments.length?(Ot=typeof jt=="function"?jt:i(+jt),Wt):Ot},Wt.context=function(jt){return arguments.length?(It=jt??null,Wt):It},Wt}function W(Be,et,ut,bt,Ot){Be.moveTo(et,ut),Be.bezierCurveTo(et=(et+bt)/2,ut,et,Ot,bt,Ot)}function U(Be,et,ut,bt,Ot){Be.moveTo(et,ut),Be.bezierCurveTo(et,ut=(ut+Ot)/2,bt,ut,bt,Ot)}function V(Be,et,ut,bt,Ot){var It=X(et,ut),Wt=X(et,ut=(ut+Ot)/2),jt=X(bt,ut),sr=X(bt,Ot);Be.moveTo(It[0],It[1]),Be.bezierCurveTo(Wt[0],Wt[1],jt[0],jt[1],sr[0],sr[1])}function j(){return H(W)}function q(){return H(U)}function Y(){var Be=H(V);return Be.angle=Be.x,delete Be.x,Be.radius=Be.y,delete Be.y,Be}var K={draw:function(Be,et){var ut=Math.sqrt(et/d);Be.moveTo(ut,0),Be.arc(0,0,ut,0,g)}},re={draw:function(Be,et){var ut=Math.sqrt(et/5)/2;Be.moveTo(-3*ut,-ut),Be.lineTo(-ut,-ut),Be.lineTo(-ut,-3*ut),Be.lineTo(ut,-3*ut),Be.lineTo(ut,-ut),Be.lineTo(3*ut,-ut),Be.lineTo(3*ut,ut),Be.lineTo(ut,ut),Be.lineTo(ut,3*ut),Be.lineTo(-ut,3*ut),Be.lineTo(-ut,ut),Be.lineTo(-3*ut,ut),Be.closePath()}},se=Math.sqrt(1/3),le=se*2,ue={draw:function(Be,et){var ut=Math.sqrt(et/le),bt=ut*se;Be.moveTo(0,-ut),Be.lineTo(bt,0),Be.lineTo(0,ut),Be.lineTo(-bt,0),Be.closePath()}},fe=.8908130915292852,pe=Math.sin(d/10)/Math.sin(7*d/10),we=Math.sin(g/10)*pe,xe=-Math.cos(g/10)*pe,he={draw:function(Be,et){var ut=Math.sqrt(et*fe),bt=we*ut,Ot=xe*ut;Be.moveTo(0,-ut),Be.lineTo(bt,Ot);for(var It=1;It<5;++It){var Wt=g*It/5,jt=Math.cos(Wt),sr=Math.sin(Wt);Be.lineTo(sr*ut,-jt*ut),Be.lineTo(jt*bt-sr*Ot,sr*bt+jt*Ot)}Be.closePath()}},oe={draw:function(Be,et){var ut=Math.sqrt(et),bt=-ut/2;Be.rect(bt,bt,ut,ut)}},te=Math.sqrt(3),ie={draw:function(Be,et){var ut=-Math.sqrt(et/(te*3));Be.moveTo(0,ut*2),Be.lineTo(-te*ut,-ut),Be.lineTo(te*ut,-ut),Be.closePath()}},ee=-.5,ce=Math.sqrt(3)/2,_e=1/Math.sqrt(12),Se=(_e/2+1)*3,Me={draw:function(Be,et){var ut=Math.sqrt(et/Se),bt=ut/2,Ot=ut*_e,It=bt,Wt=ut*_e+ut,jt=-It,sr=Wt;Be.moveTo(bt,Ot),Be.lineTo(It,Wt),Be.lineTo(jt,sr),Be.lineTo(ee*bt-ce*Ot,ce*bt+ee*Ot),Be.lineTo(ee*It-ce*Wt,ce*It+ee*Wt),Be.lineTo(ee*jt-ce*sr,ce*jt+ee*sr),Be.lineTo(ee*bt+ce*Ot,ee*Ot-ce*bt),Be.lineTo(ee*It+ce*Wt,ee*Wt-ce*It),Be.lineTo(ee*jt+ce*sr,ee*sr-ce*jt),Be.closePath()}},Ue=[K,re,ue,oe,he,ie,Me];function Ge(){var Be=i(K),et=i(64),ut=null;function bt(){var Ot;if(ut||(ut=Ot=a.path()),Be.apply(this,arguments).draw(ut,+et.apply(this,arguments)),Ot)return ut=null,Ot+""||null}return bt.type=function(Ot){return arguments.length?(Be=typeof Ot=="function"?Ot:i(Ot),bt):Be},bt.size=function(Ot){return arguments.length?(et=typeof Ot=="function"?Ot:i(+Ot),bt):et},bt.context=function(Ot){return arguments.length?(ut=Ot??null,bt):ut},bt}function Ze(){}function Ke(Be,et,ut){Be._context.bezierCurveTo((2*Be._x0+Be._x1)/3,(2*Be._y0+Be._y1)/3,(Be._x0+2*Be._x1)/3,(Be._y0+2*Be._y1)/3,(Be._x0+4*Be._x1+et)/6,(Be._y0+4*Be._y1+ut)/6)}function dt(Be){this._context=Be}dt.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:Ke(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(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1,this._line?this._context.lineTo(Be,et):this._context.moveTo(Be,et);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:Ke(this,Be,et);break}this._x0=this._x1,this._x1=Be,this._y0=this._y1,this._y1=et}};function _t(Be){return new dt(Be)}function Pt(Be){this._context=Be}Pt.prototype={areaStart:Ze,areaEnd:Ze,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(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1,this._x2=Be,this._y2=et;break;case 1:this._point=2,this._x3=Be,this._y3=et;break;case 2:this._point=3,this._x4=Be,this._y4=et,this._context.moveTo((this._x0+4*this._x1+Be)/6,(this._y0+4*this._y1+et)/6);break;default:Ke(this,Be,et);break}this._x0=this._x1,this._x1=Be,this._y0=this._y1,this._y1=et}};function pt(Be){return new Pt(Be)}function Tt(Be){this._context=Be}Tt.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(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var ut=(this._x0+4*this._x1+Be)/6,bt=(this._y0+4*this._y1+et)/6;this._line?this._context.lineTo(ut,bt):this._context.moveTo(ut,bt);break;case 3:this._point=4;default:Ke(this,Be,et);break}this._x0=this._x1,this._x1=Be,this._y0=this._y1,this._y1=et}};function st(Be){return new Tt(Be)}function Ve(Be,et){this._basis=new dt(Be),this._beta=et}Ve.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Be=this._x,et=this._y,ut=Be.length-1;if(ut>0)for(var bt=Be[0],Ot=et[0],It=Be[ut]-bt,Wt=et[ut]-Ot,jt=-1,sr;++jt<=ut;)sr=jt/ut,this._basis.point(this._beta*Be[jt]+(1-this._beta)*(bt+sr*It),this._beta*et[jt]+(1-this._beta)*(Ot+sr*Wt));this._x=this._y=null,this._basis.lineEnd()},point:function(Be,et){this._x.push(+Be),this._y.push(+et)}};var Ye=(function Be(et){function ut(bt){return et===1?new dt(bt):new Ve(bt,et)}return ut.beta=function(bt){return Be(+bt)},ut})(.85);function me(Be,et,ut){Be._context.bezierCurveTo(Be._x1+Be._k*(Be._x2-Be._x0),Be._y1+Be._k*(Be._y2-Be._y0),Be._x2+Be._k*(Be._x1-et),Be._y2+Be._k*(Be._y1-ut),Be._x2,Be._y2)}function be(Be,et){this._context=Be,this._k=(1-et)/6}be.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:me(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1,this._line?this._context.lineTo(Be,et):this._context.moveTo(Be,et);break;case 1:this._point=2,this._x1=Be,this._y1=et;break;case 2:this._point=3;default:me(this,Be,et);break}this._x0=this._x1,this._x1=this._x2,this._x2=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var Ee=(function Be(et){function ut(bt){return new be(bt,et)}return ut.tension=function(bt){return Be(+bt)},ut})(0);function De(Be,et){this._context=Be,this._k=(1-et)/6}De.prototype={areaStart:Ze,areaEnd:Ze,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(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1,this._x3=Be,this._y3=et;break;case 1:this._point=2,this._context.moveTo(this._x4=Be,this._y4=et);break;case 2:this._point=3,this._x5=Be,this._y5=et;break;default:me(this,Be,et);break}this._x0=this._x1,this._x1=this._x2,this._x2=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var Ce=(function Be(et){function ut(bt){return new De(bt,et)}return ut.tension=function(bt){return Be(+bt)},ut})(0);function Fe(Be,et){this._context=Be,this._k=(1-et)/6}Fe.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(Be,et){switch(Be=+Be,et=+et,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:me(this,Be,et);break}this._x0=this._x1,this._x1=this._x2,this._x2=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var Je=(function Be(et){function ut(bt){return new Fe(bt,et)}return ut.tension=function(bt){return Be(+bt)},ut})(0);function qe(Be,et,ut){var bt=Be._x1,Ot=Be._y1,It=Be._x2,Wt=Be._y2;if(Be._l01_a>h){var jt=2*Be._l01_2a+3*Be._l01_a*Be._l12_a+Be._l12_2a,sr=3*Be._l01_a*(Be._l01_a+Be._l12_a);bt=(bt*jt-Be._x0*Be._l12_2a+Be._x2*Be._l01_2a)/sr,Ot=(Ot*jt-Be._y0*Be._l12_2a+Be._y2*Be._l01_2a)/sr}if(Be._l23_a>h){var kr=2*Be._l23_2a+3*Be._l23_a*Be._l12_a+Be._l12_2a,Mr=3*Be._l23_a*(Be._l23_a+Be._l12_a);It=(It*kr+Be._x1*Be._l23_2a-et*Be._l12_2a)/Mr,Wt=(Wt*kr+Be._y1*Be._l23_2a-ut*Be._l12_2a)/Mr}Be._context.bezierCurveTo(bt,Ot,It,Wt,Be._x2,Be._y2)}function at(Be,et){this._context=Be,this._alpha=et}at.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(Be,et){if(Be=+Be,et=+et,this._point){var ut=this._x2-Be,bt=this._y2-et;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(ut*ut+bt*bt,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Be,et):this._context.moveTo(Be,et);break;case 1:this._point=2;break;case 2:this._point=3;default:qe(this,Be,et);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=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var tt=(function Be(et){function ut(bt){return et?new at(bt,et):new be(bt,0)}return ut.alpha=function(bt){return Be(+bt)},ut})(.5);function ct(Be,et){this._context=Be,this._alpha=et}ct.prototype={areaStart:Ze,areaEnd:Ze,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(Be,et){if(Be=+Be,et=+et,this._point){var ut=this._x2-Be,bt=this._y2-et;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(ut*ut+bt*bt,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Be,this._y3=et;break;case 1:this._point=2,this._context.moveTo(this._x4=Be,this._y4=et);break;case 2:this._point=3,this._x5=Be,this._y5=et;break;default:qe(this,Be,et);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=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var At=(function Be(et){function ut(bt){return et?new ct(bt,et):new De(bt,0)}return ut.alpha=function(bt){return Be(+bt)},ut})(.5);function ft(Be,et){this._context=Be,this._alpha=et}ft.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(Be,et){if(Be=+Be,et=+et,this._point){var ut=this._x2-Be,bt=this._y2-et;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(ut*ut+bt*bt,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:qe(this,Be,et);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=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var qt=(function Be(et){function ut(bt){return et?new ft(bt,et):new Fe(bt,0)}return ut.alpha=function(bt){return Be(+bt)},ut})(.5);function ar(Be){this._context=Be}ar.prototype={areaStart:Ze,areaEnd:Ze,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Be,et){Be=+Be,et=+et,this._point?this._context.lineTo(Be,et):(this._point=1,this._context.moveTo(Be,et))}};function vt(Be){return new ar(Be)}function gt(Be){return Be<0?-1:1}function St(Be,et,ut){var bt=Be._x1-Be._x0,Ot=et-Be._x1,It=(Be._y1-Be._y0)/(bt||Ot<0&&-0),Wt=(ut-Be._y1)/(Ot||bt<0&&-0),jt=(It*Ot+Wt*bt)/(bt+Ot);return(gt(It)+gt(Wt))*Math.min(Math.abs(It),Math.abs(Wt),.5*Math.abs(jt))||0}function Dt(Be,et){var ut=Be._x1-Be._x0;return ut?(3*(Be._y1-Be._y0)/ut-et)/2:et}function kt(Be,et,ut){var bt=Be._x0,Ot=Be._y0,It=Be._x1,Wt=Be._y1,jt=(It-bt)/3;Be._context.bezierCurveTo(bt+jt,Ot+jt*et,It-jt,Wt-jt*ut,It,Wt)}function Vt(Be){this._context=Be}Vt.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:kt(this,this._t0,Dt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Be,et){var ut=NaN;if(Be=+Be,et=+et,!(Be===this._x1&&et===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Be,et):this._context.moveTo(Be,et);break;case 1:this._point=2;break;case 2:this._point=3,kt(this,Dt(this,ut=St(this,Be,et)),ut);break;default:kt(this,this._t0,ut=St(this,Be,et));break}this._x0=this._x1,this._x1=Be,this._y0=this._y1,this._y1=et,this._t0=ut}}};function lr(Be){this._context=new dr(Be)}(lr.prototype=Object.create(Vt.prototype)).point=function(Be,et){Vt.prototype.point.call(this,et,Be)};function dr(Be){this._context=Be}dr.prototype={moveTo:function(Be,et){this._context.moveTo(et,Be)},closePath:function(){this._context.closePath()},lineTo:function(Be,et){this._context.lineTo(et,Be)},bezierCurveTo:function(Be,et,ut,bt,Ot,It){this._context.bezierCurveTo(et,Be,bt,ut,It,Ot)}};function yr(Be){return new Vt(Be)}function vr(Be){return new lr(Be)}function Fr(Be){this._context=Be}Fr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Be=this._x,et=this._y,ut=Be.length;if(ut)if(this._line?this._context.lineTo(Be[0],et[0]):this._context.moveTo(Be[0],et[0]),ut===2)this._context.lineTo(Be[1],et[1]);else for(var bt=la(Be),Ot=la(et),It=0,Wt=1;Wt=0;--et)Ot[et]=(Wt[et]-Ot[et+1])/It[et];for(It[ut-1]=(Be[ut]+Ot[ut-1])/2,et=0;et=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1,this._line?this._context.lineTo(Be,et):this._context.moveTo(Be,et);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,et),this._context.lineTo(Be,et);else{var ut=this._x*(1-this._t)+Be*this._t;this._context.lineTo(ut,this._y),this._context.lineTo(ut,et)}break}}this._x=Be,this._y=et}};function Oa(Be){return new jr(Be,.5)}function Da(Be){return new jr(Be,0)}function _i(Be){return new jr(Be,1)}function ti(Be,et){if((Wt=Be.length)>1)for(var ut=1,bt,Ot,It=Be[et[0]],Wt,jt=It.length;ut=0;)ut[et]=et;return ut}function ia(Be,et){return Be[et]}function na(){var Be=i([]),et=Ka,ut=ti,bt=ia;function Ot(It){var Wt=Be.apply(this,arguments),jt,sr=It.length,kr=Wt.length,Mr=new Array(kr),ua;for(jt=0;jt0){for(var ut,bt,Ot=0,It=Be[0].length,Wt;Ot0)for(var ut,bt=0,Ot,It,Wt,jt,sr,kr=Be[et[0]].length;bt0?(Ot[0]=Wt,Ot[1]=Wt+=It):It<0?(Ot[1]=jt,Ot[0]=jt+=It):(Ot[0]=0,Ot[1]=It)}function Qr(Be,et){if((Ot=Be.length)>0){for(var ut=0,bt=Be[et[0]],Ot,It=bt.length;ut0)||!((It=(Ot=Be[et[0]]).length)>0))){for(var ut=0,bt=1,Ot,It,Wt;btIt&&(It=Ot,ut=et);return ut}function Et(Be){var et=Be.map(Mt);return Ka(Be).sort(function(ut,bt){return et[ut]-et[bt]})}function Mt(Be){for(var et=0,ut=-1,bt=Be.length,Ot;++ut[D(we,xe,ue),we]));for(let[we,xe]of fe.entries()){xe.index=we;let{source:he,target:oe}=xe;typeof he!="object"&&(he=xe.source=_(pe,he)),typeof oe!="object"&&(oe=xe.target=_(pe,oe)),he.sourceLinks.push(xe),oe.targetLinks.push(xe)}if(z!=null)for(let{sourceLinks:we,targetLinks:xe}of ue)we.sort(z),xe.sort(z)}function X({nodes:ue}){for(let fe of ue)fe.value=fe.fixedValue===void 0?Math.max(a.sum(fe.sourceLinks,p),a.sum(fe.targetLinks,p)):fe.fixedValue}function Z({nodes:ue}){let fe=ue.length,pe=new Set(ue),we=new Set,xe=0;for(;pe.size;){for(let he of pe){he.depth=xe;for(let{target:oe}of he.sourceLinks)we.add(oe)}if(++xe>fe)throw new Error("circular link");pe=we,we=new Set}}function J({nodes:ue}){let fe=ue.length,pe=new Set(ue),we=new Set,xe=0;for(;pe.size;){for(let he of pe){he.height=xe;for(let{source:oe}of he.targetLinks)we.add(oe)}if(++xe>fe)throw new Error("circular link");pe=we,we=new Set}}function N({nodes:ue}){let fe=a.max(ue,xe=>xe.depth)+1,pe=(T-w-S)/(fe-1),we=new Array(fe);for(let xe of ue){let he=Math.max(0,Math.min(fe-1,Math.floor(R.call(null,xe,fe))));xe.layer=he,xe.x0=w+he*pe,xe.x1=xe.x0+S,we[he]?we[he].push(xe):we[he]=[xe]}if(P)for(let xe of we)xe.sort(P);return we}function H(ue){let fe=a.min(ue,pe=>(b-k-(pe.length-1)*F)/a.sum(pe,p));for(let pe of ue){let we=k;for(let xe of pe){xe.y0=we,xe.y1=we+xe.value*fe,we=xe.y1+F;for(let he of xe.sourceLinks)he.width=he.value*fe}we=(b-we+F)/(pe.length+1);for(let xe=0;xepe.length)-1)),H(fe);for(let pe=0;pe0))continue;let ee=(te/ie-oe.y0)*fe;oe.y0+=ee,oe.y1+=ee,K(oe)}P===void 0&&he.sort(d),j(he,pe)}}function V(ue,fe,pe){for(let we=ue.length,xe=we-2;xe>=0;--xe){let he=ue[xe];for(let oe of he){let te=0,ie=0;for(let{target:ce,value:_e}of oe.sourceLinks){let Se=_e*(ce.layer-oe.layer);te+=le(oe,ce)*Se,ie+=Se}if(!(ie>0))continue;let ee=(te/ie-oe.y0)*fe;oe.y0+=ee,oe.y1+=ee,K(oe)}P===void 0&&he.sort(d),j(he,pe)}}function j(ue,fe){let pe=ue.length>>1,we=ue[pe];Y(ue,we.y0-F,pe-1,fe),q(ue,we.y1+F,pe+1,fe),Y(ue,b,ue.length-1,fe),q(ue,k,0,fe)}function q(ue,fe,pe,we){for(;pe1e-6&&(xe.y0+=he,xe.y1+=he),fe=xe.y1+F}}function Y(ue,fe,pe,we){for(;pe>=0;--pe){let xe=ue[pe],he=(xe.y1-fe)*we;he>1e-6&&(xe.y0-=he,xe.y1-=he),fe=xe.y0-F}}function K({sourceLinks:ue,targetLinks:fe}){if(z===void 0){for(let{source:{sourceLinks:pe}}of fe)pe.sort(h);for(let{target:{targetLinks:pe}}of ue)pe.sort(f)}}function re(ue){if(z===void 0)for(let{sourceLinks:fe,targetLinks:pe}of ue)fe.sort(h),pe.sort(f)}function se(ue,fe){let pe=ue.y0-(ue.sourceLinks.length-1)*F/2;for(let{target:we,width:xe}of ue.sourceLinks){if(we===fe)break;pe+=xe+F}for(let{source:we,width:xe}of fe.targetLinks){if(we===ue)break;pe-=xe}return pe}function le(ue,fe){let pe=fe.y0-(fe.targetLinks.length-1)*F/2;for(let{source:we,width:xe}of fe.targetLinks){if(we===ue)break;pe+=xe+F}for(let{target:we,width:xe}of ue.sourceLinks){if(we===fe)break;pe-=xe}return pe}return G}function E(w){return[w.source.x1,w.y0]}function M(w){return[w.target.x0,w.y1]}function C(){return i.linkHorizontal().source(E).target(M)}t.sankey=x,t.sankeyCenter=u,t.sankeyJustify=n,t.sankeyLeft=s,t.sankeyLinkHorizontal=C,t.sankeyRight=l,Object.defineProperty(t,"__esModule",{value:!0})})}}),Hye=ye({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(e,r){(function(t,a){a(typeof e=="object"&&typeof r<"u"?e:t.d3=t.d3||{})})(e,(function(t){"use strict";function a(W,U){return WU?1:W>=U?0:NaN}function i(W){return W.length===1&&(W=o(W)),{left:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)<0?j=Y+1:q=Y}return j},right:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)>0?q=Y:j=Y+1}return j}}}function o(W){return function(U,V){return a(W(U),V)}}var s=i(a),l=s.right,n=s.left;function u(W,U){U==null&&(U=c);for(var V=0,j=W.length-1,q=W[0],Y=new Array(j<0?0:j);VW?1:U>=W?0:NaN}function d(W){return W===null?NaN:+W}function p(W,U){var V=W.length,j=0,q=-1,Y=0,K,re,se=0;if(U==null)for(;++q1)return se/(j-1)}function g(W,U){var V=p(W,U);return V&&Math.sqrt(V)}function m(W,U){var V=W.length,j=-1,q,Y,K;if(U==null){for(;++j=q)for(Y=K=q;++jq&&(Y=q),K=q)for(Y=K=q;++jq&&(Y=q),K0)return[W];if((j=U0)for(W=Math.ceil(W/re),U=Math.floor(U/re),K=new Array(Y=Math.ceil(U-W+1));++q=0?(Y>=C?10:Y>=w?5:Y>=k?2:1)*Math.pow(10,q):-Math.pow(10,-q)/(Y>=C?10:Y>=w?5:Y>=k?2:1)}function S(W,U,V){var j=Math.abs(U-W)/Math.max(0,V),q=Math.pow(10,Math.floor(Math.log(j)/Math.LN10)),Y=j/q;return Y>=C?q*=10:Y>=w?q*=5:Y>=k&&(q*=2),Ufe;)pe.pop(),--we;var xe=new Array(we+1),he;for(Y=0;Y<=we;++Y)he=xe[Y]=[],he.x0=Y>0?pe[Y-1]:ue,he.x1=Y=1)return+V(W[j-1],j-1,W);var j,q=(j-1)*U,Y=Math.floor(q),K=+V(W[Y],Y,W),re=+V(W[Y+1],Y+1,W);return K+(re-K)*(q-Y)}}function R(W,U,V){return W=v.call(W,d).sort(a),Math.ceil((V-U)/(2*(D(W,.75)-D(W,.25))*Math.pow(W.length,-1/3)))}function P(W,U,V){return Math.ceil((V-U)/(3.5*g(W)*Math.pow(W.length,-1/3)))}function z(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jY&&(Y=q)}else for(;++j=q)for(Y=q;++jY&&(Y=q);return Y}function I(W,U){var V=W.length,j=V,q=-1,Y,K=0;if(U==null)for(;++q=0;)for(K=W[U],V=K.length;--V>=0;)Y[--q]=K[V];return Y}function O(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jq&&(Y=q)}else for(;++j=q)for(Y=q;++jq&&(Y=q);return Y}function G(W,U){for(var V=U.length,j=new Array(V);V--;)j[V]=W[U[V]];return j}function $(W,U){if(V=W.length){var V,j=0,q=0,Y,K=W[q];for(U==null&&(U=a);++j=M})}function m(M){g(M);for(var C=i,w=t(C),k=w.components.filter(function(R){return R.length>1}),T=1/0,b,S=0;S"u"?"undefined":d(be))!=="object"&&(be=Ye.source=w(Ve,be)),(typeof Ee>"u"?"undefined":d(Ee))!=="object"&&(Ee=Ye.target=w(Ve,Ee)),be.sourceLinks.push(Ye),Ee.targetLinks.push(Ye)}),st}function Ke(st){st.nodes.forEach(function(Ve){Ve.partOfCycle=!1,Ve.value=Math.max(a.sum(Ve.sourceLinks,y),a.sum(Ve.targetLinks,y)),Ve.sourceLinks.forEach(function(Ye){Ye.circular&&(Ve.partOfCycle=!0,Ve.circularLinkType=Ye.circularLinkType)}),Ve.targetLinks.forEach(function(Ye){Ye.circular&&(Ve.partOfCycle=!0,Ve.circularLinkType=Ye.circularLinkType)})})}function dt(st){var Ve=0,Ye=0,me=0,be=0,Ee=a.max(st.nodes,function(De){return De.column});return st.links.forEach(function(De){De.circular&&(De.circularLinkType=="top"?Ve=Ve+De.width:Ye=Ye+De.width,De.target.column==0&&(be=be+De.width),De.source.column==Ee&&(me=me+De.width))}),Ve=Ve>0?Ve+T+b:Ve,Ye=Ye>0?Ye+T+b:Ye,me=me>0?me+T+b:me,be=be>0?be+T+b:be,{top:Ve,bottom:Ye,left:be,right:me}}function _t(st,Ve){var Ye=a.max(st.nodes,function(Je){return Je.column}),me=we-fe,be=xe-pe,Ee=me+Ve.right+Ve.left,De=be+Ve.top+Ve.bottom,Ce=me/Ee,Fe=be/De;return fe=fe*Ce+Ve.left,we=Ve.right==0?we:we*Ce,pe=pe*Fe+Ve.top,xe=xe*Fe,st.nodes.forEach(function(Je){Je.x0=fe+Je.column*((we-fe-he)/Ye),Je.x1=Je.x0+he}),Fe}function Pt(st){var Ve,Ye,me;for(Ve=st.nodes,Ye=[],me=0;Ve.length;++me,Ve=Ye,Ye=[])Ve.forEach(function(be){be.depth=me,be.sourceLinks.forEach(function(Ee){Ye.indexOf(Ee.target)<0&&!Ee.circular&&Ye.push(Ee.target)})});for(Ve=st.nodes,Ye=[],me=0;Ve.length;++me,Ve=Ye,Ye=[])Ve.forEach(function(be){be.height=me,be.targetLinks.forEach(function(Ee){Ye.indexOf(Ee.source)<0&&!Ee.circular&&Ye.push(Ee.source)})});st.nodes.forEach(function(be){be.column=Math.floor(ie.call(null,be,me))})}function pt(st,Ve,Ye){var me=i.nest().key(function(Je){return Je.column}).sortKeys(a.ascending).entries(st.nodes).map(function(Je){return Je.values});De(Ye),Fe();for(var be=1,Ee=Ve;Ee>0;--Ee)Ce(be*=.99,Ye),Fe();function De(Je){if(Me){var qe=1/0;me.forEach(function(At){var ft=xe*Me/(At.length+1);qe=ft0))if(At==0&&ct==1)qt=ft.y1-ft.y0,ft.y0=xe/2-qt/2,ft.y1=xe/2+qt/2;else if(At==at-1&&ct==1)qt=ft.y1-ft.y0,ft.y0=xe/2-qt/2,ft.y1=xe/2+qt/2;else{var ar=0,vt=a.mean(ft.sourceLinks,x),gt=a.mean(ft.targetLinks,v);vt&>?ar=(vt+gt)/2:ar=vt||gt;var St=(ar-_(ft))*Je;ft.y0+=St,ft.y1+=St}})})}function Fe(){me.forEach(function(Je){var qe,at,tt=pe,ct=Je.length,At;for(Je.sort(m),At=0;At0&&(qe.y0+=at,qe.y1+=at),tt=qe.y1+oe;if(at=tt-oe-xe,at>0)for(tt=qe.y0-=at,qe.y1-=at,At=ct-2;At>=0;--At)qe=Je[At],at=qe.y1+oe-tt,at>0&&(qe.y0-=at,qe.y1-=at),tt=qe.y0})}}function Tt(st){st.nodes.forEach(function(Ve){Ve.sourceLinks.sort(g),Ve.targetLinks.sort(p)}),st.nodes.forEach(function(Ve){var Ye=Ve.y0,me=Ye,be=Ve.y1,Ee=be;Ve.sourceLinks.forEach(function(De){De.circular?(De.y0=be-De.width/2,be=be-De.width):(De.y0=Ye+De.width/2,Ye+=De.width)}),Ve.targetLinks.forEach(function(De){De.circular?(De.y1=Ee-De.width/2,Ee=Ee-De.width):(De.y1=me+De.width/2,me+=De.width)})})}return Ge}function F(fe,pe,we){var xe=0;if(we===null){for(var he=[],oe=0;oepe.source.column)}function z(fe,pe){var we=0;fe.sourceLinks.forEach(function(he){we=he.circular&&!le(he,pe)?we+1:we});var xe=0;return fe.targetLinks.forEach(function(he){xe=he.circular&&!le(he,pe)?xe+1:xe}),we+xe}function I(fe){var pe=fe.source.sourceLinks,we=0;pe.forEach(function(oe){we=oe.circular?we+1:we});var xe=fe.target.targetLinks,he=0;return xe.forEach(function(oe){he=oe.circular?he+1:he}),!(we>1||he>1)}function L(fe,pe,we){return fe.sort(G),fe.forEach(function(xe,he){var oe=0;if(le(xe,we)&&I(xe))xe.circularPathData.verticalBuffer=oe+xe.width/2;else{var te=0;for(te;teoe?ie:oe}xe.circularPathData.verticalBuffer=oe+xe.width/2}}),fe}function B(fe,pe,we,xe){var he=5,oe=a.min(fe.links,function(ee){return ee.source.y0});fe.links.forEach(function(ee){ee.circular&&(ee.circularPathData={})});var te=fe.links.filter(function(ee){return ee.circularLinkType=="top"});L(te,pe,xe);var ie=fe.links.filter(function(ee){return ee.circularLinkType=="bottom"});L(ie,pe,xe),fe.links.forEach(function(ee){if(ee.circular){if(ee.circularPathData.arcRadius=ee.width+b,ee.circularPathData.leftNodeBuffer=he,ee.circularPathData.rightNodeBuffer=he,ee.circularPathData.sourceWidth=ee.source.x1-ee.source.x0,ee.circularPathData.sourceX=ee.source.x0+ee.circularPathData.sourceWidth,ee.circularPathData.targetX=ee.target.x0,ee.circularPathData.sourceY=ee.y0,ee.circularPathData.targetY=ee.y1,le(ee,xe)&&I(ee))ee.circularPathData.leftSmallArcRadius=b+ee.width/2,ee.circularPathData.leftLargeArcRadius=b+ee.width/2,ee.circularPathData.rightSmallArcRadius=b+ee.width/2,ee.circularPathData.rightLargeArcRadius=b+ee.width/2,ee.circularLinkType=="bottom"?(ee.circularPathData.verticalFullExtent=ee.source.y1+T+ee.circularPathData.verticalBuffer,ee.circularPathData.verticalLeftInnerExtent=ee.circularPathData.verticalFullExtent-ee.circularPathData.leftLargeArcRadius,ee.circularPathData.verticalRightInnerExtent=ee.circularPathData.verticalFullExtent-ee.circularPathData.rightLargeArcRadius):(ee.circularPathData.verticalFullExtent=ee.source.y0-T-ee.circularPathData.verticalBuffer,ee.circularPathData.verticalLeftInnerExtent=ee.circularPathData.verticalFullExtent+ee.circularPathData.leftLargeArcRadius,ee.circularPathData.verticalRightInnerExtent=ee.circularPathData.verticalFullExtent+ee.circularPathData.rightLargeArcRadius);else{var ce=ee.source.column,_e=ee.circularLinkType,Se=fe.links.filter(function(Ge){return Ge.source.column==ce&&Ge.circularLinkType==_e});ee.circularLinkType=="bottom"?Se.sort(X):Se.sort($);var Me=0;Se.forEach(function(Ge,Ze){Ge.circularLinkID==ee.circularLinkID&&(ee.circularPathData.leftSmallArcRadius=b+ee.width/2+Me,ee.circularPathData.leftLargeArcRadius=b+ee.width/2+Ze*pe+Me),Me=Me+Ge.width}),ce=ee.target.column,Se=fe.links.filter(function(Ge){return Ge.target.column==ce&&Ge.circularLinkType==_e}),ee.circularLinkType=="bottom"?Se.sort(J):Se.sort(Z),Me=0,Se.forEach(function(Ge,Ze){Ge.circularLinkID==ee.circularLinkID&&(ee.circularPathData.rightSmallArcRadius=b+ee.width/2+Me,ee.circularPathData.rightLargeArcRadius=b+ee.width/2+Ze*pe+Me),Me=Me+Ge.width}),ee.circularLinkType=="bottom"?(ee.circularPathData.verticalFullExtent=Math.max(we,ee.source.y1,ee.target.y1)+T+ee.circularPathData.verticalBuffer,ee.circularPathData.verticalLeftInnerExtent=ee.circularPathData.verticalFullExtent-ee.circularPathData.leftLargeArcRadius,ee.circularPathData.verticalRightInnerExtent=ee.circularPathData.verticalFullExtent-ee.circularPathData.rightLargeArcRadius):(ee.circularPathData.verticalFullExtent=oe-T-ee.circularPathData.verticalBuffer,ee.circularPathData.verticalLeftInnerExtent=ee.circularPathData.verticalFullExtent+ee.circularPathData.leftLargeArcRadius,ee.circularPathData.verticalRightInnerExtent=ee.circularPathData.verticalFullExtent+ee.circularPathData.rightLargeArcRadius)}ee.circularPathData.leftInnerExtent=ee.circularPathData.sourceX+ee.circularPathData.leftNodeBuffer,ee.circularPathData.rightInnerExtent=ee.circularPathData.targetX-ee.circularPathData.rightNodeBuffer,ee.circularPathData.leftFullExtent=ee.circularPathData.sourceX+ee.circularPathData.leftLargeArcRadius+ee.circularPathData.leftNodeBuffer,ee.circularPathData.rightFullExtent=ee.circularPathData.targetX-ee.circularPathData.rightLargeArcRadius-ee.circularPathData.rightNodeBuffer}if(ee.circular)ee.path=O(ee);else{var Ue=o.linkHorizontal().source(function(Ge){var Ze=Ge.source.x0+(Ge.source.x1-Ge.source.x0),Ke=Ge.y0;return[Ze,Ke]}).target(function(Ge){var Ze=Ge.target.x0,Ke=Ge.y1;return[Ze,Ke]});ee.path=Ue(ee)}})}function O(fe){var pe="";return fe.circularLinkType=="top"?pe="M"+fe.circularPathData.sourceX+" "+fe.circularPathData.sourceY+" L"+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.sourceY+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftSmallArcRadius+" 0 0 0 "+fe.circularPathData.leftFullExtent+" "+(fe.circularPathData.sourceY-fe.circularPathData.leftSmallArcRadius)+" L"+fe.circularPathData.leftFullExtent+" "+fe.circularPathData.verticalLeftInnerExtent+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftLargeArcRadius+" 0 0 0 "+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.verticalFullExtent+" L"+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.verticalFullExtent+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightLargeArcRadius+" 0 0 0 "+fe.circularPathData.rightFullExtent+" "+fe.circularPathData.verticalRightInnerExtent+" L"+fe.circularPathData.rightFullExtent+" "+(fe.circularPathData.targetY-fe.circularPathData.rightSmallArcRadius)+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightSmallArcRadius+" 0 0 0 "+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.targetY+" L"+fe.circularPathData.targetX+" "+fe.circularPathData.targetY:pe="M"+fe.circularPathData.sourceX+" "+fe.circularPathData.sourceY+" L"+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.sourceY+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftSmallArcRadius+" 0 0 1 "+fe.circularPathData.leftFullExtent+" "+(fe.circularPathData.sourceY+fe.circularPathData.leftSmallArcRadius)+" L"+fe.circularPathData.leftFullExtent+" "+fe.circularPathData.verticalLeftInnerExtent+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftLargeArcRadius+" 0 0 1 "+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.verticalFullExtent+" L"+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.verticalFullExtent+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightLargeArcRadius+" 0 0 1 "+fe.circularPathData.rightFullExtent+" "+fe.circularPathData.verticalRightInnerExtent+" L"+fe.circularPathData.rightFullExtent+" "+(fe.circularPathData.targetY+fe.circularPathData.rightSmallArcRadius)+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightSmallArcRadius+" 0 0 1 "+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.targetY+" L"+fe.circularPathData.targetX+" "+fe.circularPathData.targetY,pe}function G(fe,pe){return N(fe)==N(pe)?fe.circularLinkType=="bottom"?X(fe,pe):$(fe,pe):N(pe)-N(fe)}function $(fe,pe){return fe.y0-pe.y0}function X(fe,pe){return pe.y0-fe.y0}function Z(fe,pe){return fe.y1-pe.y1}function J(fe,pe){return pe.y1-fe.y1}function N(fe){return fe.target.column-fe.source.column}function H(fe){return fe.target.x0-fe.source.x1}function W(fe,pe){var we=R(fe),xe=H(pe)/Math.tan(we),he=se(fe)=="up"?fe.y1+xe:fe.y1-xe;return he}function U(fe,pe){var we=R(fe),xe=H(pe)/Math.tan(we),he=se(fe)=="up"?fe.y1-xe:fe.y1+xe;return he}function V(fe,pe,we,xe){fe.links.forEach(function(he){if(!he.circular&&he.target.column-he.source.column>1){var oe=he.source.column+1,te=he.target.column-1,ie=1,ee=te-oe+1;for(ie=1;oe<=te;oe++,ie++)fe.nodes.forEach(function(ce){if(ce.column==oe){var _e=ie/(ee+1),Se=Math.pow(1-_e,3),Me=3*_e*Math.pow(1-_e,2),Ue=3*Math.pow(_e,2)*(1-_e),Ge=Math.pow(_e,3),Ze=Se*he.y0+Me*he.y0+Ue*he.y1+Ge*he.y1,Ke=Ze-he.width/2,dt=Ze+he.width/2,_t;Ke>ce.y0&&Kece.y0&&dtce.y1&&q(Pt,_t,pe,we)})):Kece.y1&&(_t=dt-ce.y0+10,ce=q(ce,_t,pe,we),fe.nodes.forEach(function(Pt){k(Pt,xe)==k(ce,xe)||Pt.column!=ce.column||Pt.y0ce.y1&&q(Pt,_t,pe,we)}))}})}})}function j(fe,pe){return fe.y0>pe.y0&&fe.y0pe.y0&&fe.y1pe.y1}function q(fe,pe,we,xe){return fe.y0+pe>=we&&fe.y1+pe<=xe&&(fe.y0=fe.y0+pe,fe.y1=fe.y1+pe,fe.targetLinks.forEach(function(he){he.y1=he.y1+pe}),fe.sourceLinks.forEach(function(he){he.y0=he.y0+pe})),fe}function Y(fe,pe,we,xe){fe.nodes.forEach(function(he){xe&&he.y+(he.y1-he.y0)>pe&&(he.y=he.y-(he.y+(he.y1-he.y0)-pe));var oe=fe.links.filter(function(ee){return k(ee.source,we)==k(he,we)}),te=oe.length;te>1&&oe.sort(function(ee,ce){if(!ee.circular&&!ce.circular){if(ee.target.column==ce.target.column)return ee.y1-ce.y1;if(re(ee,ce)){if(ee.target.column>ce.target.column){var _e=U(ce,ee);return ee.y1-_e}if(ce.target.column>ee.target.column){var Se=U(ee,ce);return Se-ce.y1}}else return ee.y1-ce.y1}if(ee.circular&&!ce.circular)return ee.circularLinkType=="top"?-1:1;if(ce.circular&&!ee.circular)return ce.circularLinkType=="top"?1:-1;if(ee.circular&&ce.circular)return ee.circularLinkType===ce.circularLinkType&&ee.circularLinkType=="top"?ee.target.column===ce.target.column?ee.target.y1-ce.target.y1:ce.target.column-ee.target.column:ee.circularLinkType===ce.circularLinkType&&ee.circularLinkType=="bottom"?ee.target.column===ce.target.column?ce.target.y1-ee.target.y1:ee.target.column-ce.target.column:ee.circularLinkType=="top"?-1:1});var ie=he.y0;oe.forEach(function(ee){ee.y0=ie+ee.width/2,ie=ie+ee.width}),oe.forEach(function(ee,ce){if(ee.circularLinkType=="bottom"){var _e=ce+1,Se=0;for(_e;_e1&&he.sort(function(ie,ee){if(!ie.circular&&!ee.circular){if(ie.source.column==ee.source.column)return ie.y0-ee.y0;if(re(ie,ee)){if(ee.source.column0?"up":"down"}function le(fe,pe){return k(fe.source,pe)==k(fe.target,pe)}function ue(fe,pe,we){var xe=fe.nodes,he=fe.links,oe=!1,te=!1;if(he.forEach(function(Me){Me.circularLinkType=="top"?oe=!0:Me.circularLinkType=="bottom"&&(te=!0)}),oe==!1||te==!1){var ie=a.min(xe,function(Me){return Me.y0}),ee=a.max(xe,function(Me){return Me.y1}),ce=ee-ie,_e=we-pe,Se=_e/ce;xe.forEach(function(Me){var Ue=(Me.y1-Me.y0)*Se;Me.y0=(Me.y0-ie)*Se,Me.y1=Me.y0+Ue}),he.forEach(function(Me){Me.y0=(Me.y0-ie)*Se,Me.y1=(Me.y1-ie)*Se,Me.width=Me.width*Se})}}t.sankeyCircular=A,t.sankeyCenter=f,t.sankeyLeft=n,t.sankeyRight=u,t.sankeyJustify=c,Object.defineProperty(t,"__esModule",{value:!0})}))}}),lG=ye({"src/traces/sankey/constants.js"(e,r){"use strict";r.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"}}}}),Yye=ye({"src/traces/sankey/render.js"(e,r){"use strict";var t=Uye(),a=(Xm(),On(zv)).interpolateNumber,i=ai(),o=Gye(),s=$ye(),l=lG(),n=Ya(),u=$i(),c=Yt(),f=c.strTranslate,h=c.strRotate,d=$p(),p=d.keyFun,g=d.repeat,m=d.unwrap,y=Go(),_=li(),v=Yl(),x=v.CAP_SHIFT,E=v.LINE_SPACING,M=3;function C(H,W,U){var V=m(W),j=V.trace,q=j.domain,Y=j.orientation==="h",K=j.direction==="reversed",re=j.node.pad,se=j.node.thickness,le={justify:o.sankeyJustify,left:o.sankeyLeft,right:o.sankeyRight,center:o.sankeyCenter}[j.node.align],ue=H.width*(q.x[1]-q.x[0]),fe=H.height*(q.y[1]-q.y[0]),pe=V._nodes,we=V._links,xe=V.circular,he;xe?he=s.sankeyCircular().circularLinkGap(0):he=o.sankey(),he.iterations(l.sankeyIterations).size(Y?[ue,fe]:[fe,ue]).nodeWidth(se).nodePadding(re).nodeId(function(pt){return pt.pointNumber}).nodeAlign(le).nodes(pe).links(we);function oe(pt){j[pt].sort==="input"&&(xe?c.warn(`Circular Sankey diagrams do not support the "input" ${pt}.sort mode; falling back to the default sort.`):he[`${pt}Sort`](null))}oe("link"),oe("node");var te=he();he.nodePadding()=Ye||(Ve=Ye-st.y0,Ve>1e-6&&(st.y0+=Ve,st.y1+=Ve)),Ye=st.y1+re})}function Ke(pt){var Tt=pt.map(function(De,Ce){return{x0:De.x0,index:Ce}}).sort(function(De,Ce){return De.x0-Ce.x0}),st=[],Ve=-1,Ye,me=-1/0,be;for(ie=0;ieme+se&&(Ve+=1,Ye=Ee.x0),me=Ee.x0,st[Ve]||(st[Ve]=[]),st[Ve].push(Ee),be=Ye-Ee.x0,Ee.x0+=be,Ee.x1+=be}return st}if(j.node.x.length&&j.node.y.length){for(ie=0;ie0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(U="M "+(j.targetX-W)+" "+(j.targetY-V)+" L "+(j.rightInnerExtent-W)+" "+(j.targetY-V)+" A "+(j.rightLargeArcRadius+V)+" "+(j.rightSmallArcRadius+V)+" 0 0 0 "+(j.rightFullExtent-V-W)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-V-W)+" "+j.verticalRightInnerExtent,q&&Y?U+=" A "+(j.rightLargeArcRadius+V)+" "+(j.rightLargeArcRadius+V)+" 0 0 0 "+(j.rightInnerExtent-V-W)+" "+(j.verticalFullExtent+V)+" L "+(j.rightFullExtent+V-W-(j.rightLargeArcRadius-V))+" "+(j.verticalFullExtent+V)+" A "+(j.rightLargeArcRadius+V)+" "+(j.rightLargeArcRadius+V)+" 0 0 0 "+(j.leftFullExtent+V)+" "+j.verticalLeftInnerExtent:q?U+=" A "+(j.rightLargeArcRadius-V)+" "+(j.rightSmallArcRadius-V)+" 0 0 1 "+(j.rightFullExtent-W-V-(j.rightLargeArcRadius-V))+" "+(j.verticalFullExtent-V)+" L "+(j.leftFullExtent+V+(j.rightLargeArcRadius-V))+" "+(j.verticalFullExtent-V)+" A "+(j.rightLargeArcRadius-V)+" "+(j.rightSmallArcRadius-V)+" 0 0 1 "+(j.leftFullExtent+V)+" "+j.verticalLeftInnerExtent:U+=" A "+(j.rightLargeArcRadius+V)+" "+(j.rightLargeArcRadius+V)+" 0 0 0 "+(j.rightInnerExtent-W)+" "+(j.verticalFullExtent+V)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+V)+" A "+(j.leftLargeArcRadius+V)+" "+(j.leftLargeArcRadius+V)+" 0 0 0 "+(j.leftFullExtent+V)+" "+j.verticalLeftInnerExtent,U+=" L "+(j.leftFullExtent+V)+" "+(j.sourceY+j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+V)+" "+(j.leftSmallArcRadius+V)+" 0 0 0 "+j.leftInnerExtent+" "+(j.sourceY-V)+" L "+j.sourceX+" "+(j.sourceY-V)+" L "+j.sourceX+" "+(j.sourceY+V)+" L "+j.leftInnerExtent+" "+(j.sourceY+V)+" A "+(j.leftLargeArcRadius-V)+" "+(j.leftSmallArcRadius-V)+" 0 0 1 "+(j.leftFullExtent-V)+" "+(j.sourceY+j.leftSmallArcRadius)+" L "+(j.leftFullExtent-V)+" "+j.verticalLeftInnerExtent,q&&Y?U+=" A "+(j.rightLargeArcRadius-V)+" "+(j.rightSmallArcRadius-V)+" 0 0 1 "+(j.leftFullExtent-V-(j.rightLargeArcRadius-V))+" "+(j.verticalFullExtent-V)+" L "+(j.rightFullExtent+V-W+(j.rightLargeArcRadius-V))+" "+(j.verticalFullExtent-V)+" A "+(j.rightLargeArcRadius-V)+" "+(j.rightSmallArcRadius-V)+" 0 0 1 "+(j.rightFullExtent+V-W)+" "+j.verticalRightInnerExtent:q?U+=" A "+(j.rightLargeArcRadius+V)+" "+(j.rightLargeArcRadius+V)+" 0 0 0 "+(j.leftFullExtent+V)+" "+(j.verticalFullExtent+V)+" L "+(j.rightFullExtent-W-V)+" "+(j.verticalFullExtent+V)+" A "+(j.rightLargeArcRadius+V)+" "+(j.rightLargeArcRadius+V)+" 0 0 0 "+(j.rightFullExtent+V-W)+" "+j.verticalRightInnerExtent:U+=" A "+(j.leftLargeArcRadius-V)+" "+(j.leftLargeArcRadius-V)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-V)+" L "+(j.rightInnerExtent-W)+" "+(j.verticalFullExtent-V)+" A "+(j.rightLargeArcRadius-V)+" "+(j.rightLargeArcRadius-V)+" 0 0 1 "+(j.rightFullExtent+V-W)+" "+j.verticalRightInnerExtent,U+=" L "+(j.rightFullExtent+V-W)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-V)+" "+(j.rightSmallArcRadius-V)+" 0 0 1 "+(j.rightInnerExtent-W)+" "+(j.targetY+V)+" L "+(j.targetX-W)+" "+(j.targetY+V)+(W>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),U}function T(){var H=.5;function W(U){var V=U.linkArrowLength;if(U.link.circular)return k(U.link,V);var j=Math.abs((U.link.target.x0-U.link.source.x1)/2);V>j&&(V=j);var q=U.link.source.x1,Y=U.link.target.x0-V,K=a(q,Y),re=K(H),se=K(1-H),le=U.link.y0-U.link.width/2,ue=U.link.y0+U.link.width/2,fe=U.link.y1-U.link.width/2,pe=U.link.y1+U.link.width/2,we="M"+q+","+le,xe="C"+re+","+le+" "+se+","+fe+" "+Y+","+fe,he="C"+se+","+pe+" "+re+","+ue+" "+q+","+ue,oe=V>0?"L"+(Y+V)+","+(fe+U.link.width/2):"";return oe+="L"+Y+","+pe,we+xe+oe+he+"Z"}return W}function b(H,W){var U=l.nodePadAcross,V=H.nodePad/2;W.dx=W.x1-W.x0,W.dy=W.y1-W.y0;var j=W.dx,q=Math.max(.5,W.dy),Y="node_"+W.pointNumber;return W.group&&(Y=c.randstr()),W.trace=H.trace,W.curveNumber=H.trace.index,{index:W.pointNumber,key:Y,partOfGroup:W.partOfGroup||!1,group:W.group,traceId:H.key,trace:H.trace,node:W,nodePad:H.nodePad,nodeLineColor:H.nodeLineColor,nodeLineWidth:H.nodeLineWidth,textFont:H.textFont,size:H.horizontal?H.height:H.width,visibleWidth:Math.ceil(j),visibleHeight:q,zoneX:-U,zoneY:-V,zoneWidth:j+2*U,zoneHeight:q+2*V,labelY:H.horizontal?W.dy/2+1:W.dx/2+1,left:W.originalLayer===1,sizeAcross:H.width,forceLayouts:H.forceLayouts,horizontal:H.horizontal,reversed:H.reversed,rgb:n.rgb(W.color),alpha:n.parse(W.color).alpha,valueFormat:H.valueFormat,valueSuffix:H.valueSuffix,sankey:H.sankey,graph:H.graph,arrangement:H.arrangement,uniqueNodeLabelPathId:[H.guid,H.key,Y].join("_"),interactionState:H.interactionState,figure:H}}function S(H){H.attr("transform",function(W){return f(W.node.x0.toFixed(3),W.node.y0.toFixed(3))})}function A(H){H.call(S)}function F(H,W){H.call(A),W.attr("d",T())}function D(H){H.attr("width",function(W){return W.node.x1-W.node.x0}).attr("height",function(W){return W.visibleHeight})}function R(H){return H.link.width>1||H.linkLineWidth>0}function P(H){return H.horizontal?H.reversed?f(H.translateX+H.width,H.translateY)+"matrix(-1 0 0 1 0 0)":f(H.translateX,H.translateY)+"matrix(1 0 0 1 0 0)":H.reversed?f(H.translateX,H.translateY+H.height)+"matrix(0 -1 1 0 0 0)":f(H.translateX,H.translateY)+"matrix(0 1 1 0 0 0)"}function z(H,W,U){H.on(".basic",null).on("mouseover.basic",function(V){!V.interactionState.dragInProgress&&!V.partOfGroup&&(U.hover(this,V,W),V.interactionState.hovered=[this,V])}).on("mousemove.basic",function(V){!V.interactionState.dragInProgress&&!V.partOfGroup&&(U.follow(this,V),V.interactionState.hovered=[this,V])}).on("mouseout.basic",function(V){!V.interactionState.dragInProgress&&!V.partOfGroup&&(U.unhover(this,V,W),V.interactionState.hovered=!1)}).on("click.basic",function(V){V.interactionState.hovered&&(U.unhover(this,V,W),V.interactionState.hovered=!1),!V.interactionState.dragInProgress&&!V.partOfGroup&&U.select(this,V,W)})}function I(H,W,U,V){var j=i.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"&&(c.ensureSingle(V._fullLayout._infolayer,"g","dragcover",function(K){V._fullLayout._dragCover=K}),c.raiseToTop(this),q.interactionState.dragInProgress=q.node,X(q.node),q.interactionState.hovered&&(U.nodeEvents.unhover.apply(0,q.interactionState.hovered),q.interactionState.hovered=!1),q.arrangement==="snap")){var Y=q.traceId+"|"+q.key;q.forceLayouts[Y]?q.forceLayouts[Y].alpha(1):L(H,Y,q,V),B(H,W,q,Y,V)}}).on("drag",function(q){if(q.arrangement!=="fixed"){var Y=i.event.x,K=i.event.y;q.arrangement==="snap"?(q.node.x0=Y-q.visibleWidth/2,q.node.x1=Y+q.visibleWidth/2,q.node.y0=K-q.visibleHeight/2,q.node.y1=K+q.visibleHeight/2):(q.arrangement==="freeform"&&(q.node.x0=Y-q.visibleWidth/2,q.node.x1=Y+q.visibleWidth/2),K=Math.max(0,Math.min(q.size-q.visibleHeight/2,K)),q.node.y0=K-q.visibleHeight/2,q.node.y1=K+q.visibleHeight/2),X(q.node),q.arrangement!=="snap"&&(q.sankey.update(q.graph),F(H.filter(Z(q)),W))}}).on("dragend",function(q){if(q.arrangement!=="fixed"){q.interactionState.dragInProgress=!1;for(var Y=0;Y0)window.requestAnimationFrame(q);else{var re=U.node.originalX;U.node.x0=re-U.visibleWidth/2,U.node.x1=re+U.visibleWidth/2,G(U,j)}})}function O(H,W,U,V){return function(){for(var q=0,Y=0;Y0&&V.forceLayouts[W].alpha(0)}}function G(H,W){for(var U=[],V=[],j=0;jR(he)?n.rgb(he.linkLineColor):he.rgb).style("stroke-opacity",he=>R(he)?n.opacity(he.linkLineColor):he.alpha).style("fill",he=>he.rgb).style("fill-opacity",he=>he.alpha).style("stroke-width",he=>R(he)?he.linkLineWidth:1).attr("d",T()),ue.style("opacity",function(){return H._context.staticPlot||Y||K?1:0}).transition().ease(l.ease).duration(l.duration).style("opacity",1),ue.exit().transition().ease(l.ease).duration(l.duration).style("opacity",0).remove();var fe=se.selectAll("."+l.cn.sankeyNodeSet).data(g,p);fe.enter().append("g").classed(l.cn.sankeyNodeSet,!0),fe.style("cursor",function(he){switch(he.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var pe=fe.selectAll("."+l.cn.sankeyNode).data(function(he){var oe=he.graph.nodes;return $(oe),oe.map(b.bind(null,he))},p);pe.enter().append("g").classed(l.cn.sankeyNode,!0).call(S).style("opacity",function(he){return(H._context.staticPlot||Y)&&!he.partOfGroup?1:0}),pe.call(z,se,j.nodeEvents).call(I,ue,j,H),pe.transition().ease(l.ease).duration(l.duration).call(S).style("opacity",function(he){return he.partOfGroup?0:1}),pe.exit().transition().ease(l.ease).duration(l.duration).style("opacity",0).remove();var we=pe.selectAll("."+l.cn.nodeRect).data(g);we.enter().append("rect").classed(l.cn.nodeRect,!0).call(D),we.style("stroke-width",function(he){return he.nodeLineWidth}).style("stroke",function(he){return n.rgb(he.nodeLineColor)}).style("stroke-opacity",function(he){return n.opacity(he.nodeLineColor)}).style("fill",he=>he.rgb).style("fill-opacity",he=>he.alpha),we.transition().ease(l.ease).duration(l.duration).call(D);var xe=pe.selectAll("."+l.cn.nodeLabel).data(g);xe.enter().append("text").classed(l.cn.nodeLabel,!0).style("cursor","default"),xe.attr("data-notex",1).text(function(he){return he.node.label}).each(function(he){var oe=i.select(this);u.font(oe,he.textFont),y.convertToTspans(oe,H)}).attr("text-anchor",function(he){return he.horizontal&&he.left!==he.reversed?"end":"start"}).attr("transform",function(he){var oe=i.select(this),te=y.lineCount(oe),ie=he.textFont.size*((te-1)*E-x),ee=he.nodeLineWidth/2+M;if(!he.horizontal){var Se=he.reversed?(he.visibleWidth+ie)/2:(he.visibleWidth-ie)/2,ce=he.reversed?h(90):"scale(-1,1)"+h(90);return f(Se,ee)+ce}var _e=ee,Se=(he.visibleHeight-ie)/2;return he.left?_e=-_e:_e+=he.visibleWidth,f(_e,Se)+(he.reversed?"scale(-1,1)":"")}),xe.transition().ease(l.ease).duration(l.duration)}}}),uG=ye({"src/traces/sankey/plot.js"(e,r){"use strict";var t=ai(),a=Yt(),i=a.numberFormat,o=Yye(),s=Hs(),l=Ya(),n=lG().cn,u=a._;function c(E){return E!==""}function f(E,M){return E.filter(function(C){return C.key===M.traceId})}function h(E,M){t.select(E).select("path").style("fill-opacity",M),t.select(E).select("rect").style("fill-opacity",M)}function d(E){t.select(E).select("text.name").style("fill","black")}function p(E){return function(M){return E.node.sourceLinks.indexOf(M.link)!==-1||E.node.targetLinks.indexOf(M.link)!==-1}}function g(E){return function(M){return M.node.sourceLinks.indexOf(E.link)!==-1||M.node.targetLinks.indexOf(E.link)!==-1}}function m(E,M,C){M&&C&&f(C,M).selectAll("."+n.sankeyLink).filter(p(M)).call(_.bind(0,M,C,!1))}function y(E,M,C){M&&C&&f(C,M).selectAll("."+n.sankeyLink).filter(p(M)).call(v.bind(0,M,C,!1))}function _(E,M,C,w){w.style("fill",function(k){if(!k.link.concentrationscale)return k.hoverRgb}).style("fill-opacity",function(k){if(!k.link.concentrationscale)return k.hoverAlpha}),w.each(function(k){var T=k.link.label;T!==""&&f(M,E).selectAll("."+n.sankeyLink).filter(function(b){return b.link.label===T}).style("fill",function(b){if(!b.link.concentrationscale)return b.hoverRgb}).style("fill-opacity",function(b){if(!b.link.concentrationscale)return b.hoverAlpha})}),C&&f(M,E).selectAll("."+n.sankeyNode).filter(g(E)).call(m)}function v(E,M,C,w){w.style("fill",function(k){return k.rgb}).style("fill-opacity",function(k){return k.alpha}),w.each(function(k){var T=k.link.label;T!==""&&f(M,E).selectAll("."+n.sankeyLink).filter(function(b){return b.link.label===T}).style("fill",b=>b.rgb).style("fill-opacity",b=>b.alpha)}),C&&f(M,E).selectAll(n.sankeyNode).filter(g(E)).call(y)}function x(E,M){var C=E.hoverlabel||{},w=a.nestedProperty(C,M).get();return Array.isArray(w)?!1:w}r.exports=function(M,C){for(var w=M._fullLayout,k=w._paper,T=w._size,b=0;b"),color:x(N,"bgcolor")||l.addOpacity(j.color,1),borderColor:x(N,"bordercolor"),fontFamily:x(N,"font.family"),fontSize:x(N,"font.size"),fontColor:x(N,"font.color"),fontWeight:x(N,"font.weight"),fontStyle:x(N,"font.style"),fontVariant:x(N,"font.variant"),fontTextcase:x(N,"font.textcase"),fontLineposition:x(N,"font.lineposition"),fontShadow:x(N,"font.shadow"),nameLength:x(N,"namelength"),textAlign:x(N,"align"),idealAlign:t.event.x"),color:x(N,"bgcolor")||J.rgb,borderColor:x(N,"bordercolor"),fontFamily:x(N,"font.family"),fontSize:x(N,"font.size"),fontColor:x(N,"font.color"),fontWeight:x(N,"font.weight"),fontStyle:x(N,"font.style"),fontVariant:x(N,"font.variant"),fontTextcase:x(N,"font.textcase"),fontLineposition:x(N,"font.lineposition"),fontShadow:x(N,"font.shadow"),nameLength:x(N,"namelength"),textAlign:x(N,"align"),idealAlign:"left",hovertemplate:N.hovertemplate,hovertemplateLabels:Y,eventData:[J.node]},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:M});h(se,.85),d(se)}}},X=function(Z,J,N){M._fullLayout.hovermode!==!1&&(t.select(Z).call(y,J,N),J.node.trace.node.hoverinfo!=="skip"&&(J.node.fullData=J.node.trace,M.emit("plotly_unhover",{event:t.event,points:[J.node]})),s.loneUnhover(w._hoverlayer.node()))};o(M,k,C,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{linkEvents:{hover:F,follow:L,unhover:B,select:A},nodeEvents:{hover:G,follow:$,unhover:X,select:O}})}}}),Xye=ye({"src/traces/sankey/base_plot.js"(e){"use strict";var r=Cs().overrideAll,t=_c().getModuleCalcData,a=uG(),i=_v(),o=rp(),s=_f(),l=lu().prepSelect,n=Yt(),u=li(),c="sankey";e.name=c,e.baseLayoutAttrOverrides=r({hoverlabel:i.hoverlabel},"plot","nested"),e.plot=function(h){var d=t(h.calcdata,c)[0];a(h,d),e.updateFx(h)},e.clean=function(h,d,p,g){var m=g._has&&g._has(c),y=d._has&&d._has(c);m&&!y&&(g._paperdiv.selectAll(".sankey").remove(),g._paperdiv.selectAll(".bgsankey").remove())},e.updateFx=function(h){for(var d=0;d0}r.exports=function(P,z,I,L){var B=P._fullLayout,O;E(I)&&L&&(O=L()),o.makeTraceGroups(B._indicatorlayer,z,"trace").each(function(G){var $=G[0],X=$.trace,Z=t.select(this),J=X._hasGauge,N=X._isAngular,H=X._isBullet,W=X.domain,U={w:B._size.w*(W.x[1]-W.x[0]),h:B._size.h*(W.y[1]-W.y[0]),l:B._size.l+B._size.w*W.x[0],r:B._size.r+B._size.w*(1-W.x[1]),t:B._size.t+B._size.h*(1-W.y[1]),b:B._size.b+B._size.h*W.y[0]},V=U.l+U.w/2,j=U.t+U.h/2,q=Math.min(U.w/2,U.h),Y=f.innerRadius*q,K,re,se,le=X.align||"center";if(re=j,!J)K=U.l+v[le]*U.w,se=function(ee){return S(ee,U.w,U.h)};else if(N&&(K=V,re=j+q/2,se=function(ee){return A(ee,.9*Y)}),H){var ue=f.bulletPadding,fe=1-f.bulletNumberDomainSize+ue;K=U.l+(fe+(1-fe)*v[le])*U.w,se=function(ee){return S(ee,(f.bulletNumberDomainSize-ue)*U.w,U.h)}}w(P,Z,G,{numbersX:K,numbersY:re,numbersScaler:se,transitionOpts:I,onComplete:O});var pe,we;J&&(pe={range:X.gauge.axis.range,color:X.gauge.bgcolor,line:{color:X.gauge.bordercolor,width:0},thickness:1},we={range:X.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:X.gauge.bordercolor,width:X.gauge.borderwidth},thickness:1});var xe=Z.selectAll("g.angular").data(N?G:[]);xe.exit().remove();var he=Z.selectAll("g.angularaxis").data(N?G:[]);he.exit().remove(),N&&C(P,Z,G,{radius:q,innerRadius:Y,gauge:xe,layer:he,size:U,gaugeBg:pe,gaugeOutline:we,transitionOpts:I,onComplete:O});var oe=Z.selectAll("g.bullet").data(H?G:[]);oe.exit().remove();var te=Z.selectAll("g.bulletaxis").data(H?G:[]);te.exit().remove(),H&&M(P,Z,G,{gauge:oe,layer:te,size:U,gaugeBg:pe,gaugeOutline:we,transitionOpts:I,onComplete:O});var ie=Z.selectAll("text.title").data(G);ie.exit().remove(),ie.enter().append("text").classed("title",!0),ie.attr("text-anchor",function(){return H?_.right:_[X.title.align]}).text(X.title.text).call(c.font,X.title.font).call(h.convertToTspans,P),ie.attr("transform",function(){var ee=U.l+U.w*v[X.title.align],ce,_e=f.titlePadding,Se=c.bBox(ie.node());if(J){if(N)if(X.gauge.axis.visible){var Me=c.bBox(he.node());ce=Me.top-_e-Se.bottom}else ce=U.t+U.h/2-q/2-Se.bottom-_e;H&&(ce=re-(Se.top+Se.bottom)/2,ee=U.l-f.bulletPadding*U.w)}else ce=X._numbersTop-_e-Se.bottom;return l(ee,ce)})})};function M(R,P,z,I){var L=z[0].trace,B=I.gauge,O=I.layer,G=I.gaugeBg,$=I.gaugeOutline,X=I.size,Z=L.domain,J=I.transitionOpts,N=I.onComplete,H,W,U,V,j;B.enter().append("g").classed("bullet",!0),B.attr("transform",l(X.l,X.t)),O.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),O.selectAll("g.xbulletaxistick,path,text").remove();var q=X.h,Y=L.gauge.bar.thickness*q,K=Z.x[0],re=Z.x[0]+(Z.x[1]-Z.x[0])*(L._hasNumber||L._hasDelta?1-f.bulletNumberDomainSize:1);H=b(R,L.gauge.axis),H._id="xbulletaxis",H.domain=[K,re],H.setScale(),W=d.calcTicks(H),U=d.makeTransTickFn(H),V=d.getTickSigns(H)[2],j=X.t+X.h,H.visible&&(d.drawTicks(R,H,{vals:H.ticks==="inside"?d.clipEnds(H,W):W,layer:O,path:d.makeTickPath(H,j,V),transFn:U}),d.drawLabels(R,H,{vals:W,layer:O,transFn:U,labelFns:d.makeLabelFns(H,j)}));function se(he){he.attr("width",function(oe){return Math.max(0,H.c2p(oe.range[1])-H.c2p(oe.range[0]))}).attr("x",function(oe){return H.c2p(oe.range[0])}).attr("y",function(oe){return .5*(1-oe.thickness)*q}).attr("height",function(oe){return oe.thickness*q})}var le=[G].concat(L.gauge.steps),ue=B.selectAll("g.bg-bullet").data(le);ue.enter().append("g").classed("bg-bullet",!0).append("rect"),ue.select("rect").call(se).call(k),ue.exit().remove();var fe=B.selectAll("g.value-bullet").data([L.gauge.bar]);fe.enter().append("g").classed("value-bullet",!0).append("rect"),fe.select("rect").attr("height",Y).attr("y",(q-Y)/2).call(k),E(J)?fe.select("rect").transition().duration(J.duration).ease(J.easing).each("end",function(){N&&N()}).each("interrupt",function(){N&&N()}).attr("width",Math.max(0,H.c2p(Math.min(L.gauge.axis.range[1],z[0].y)))):fe.select("rect").attr("width",typeof z[0].y=="number"?Math.max(0,H.c2p(Math.min(L.gauge.axis.range[1],z[0].y))):0),fe.exit().remove();var pe=z.filter(function(){return L.gauge.threshold.value||L.gauge.threshold.value===0}),we=B.selectAll("g.threshold-bullet").data(pe);we.enter().append("g").classed("threshold-bullet",!0).append("line"),we.select("line").attr("x1",H.c2p(L.gauge.threshold.value)).attr("x2",H.c2p(L.gauge.threshold.value)).attr("y1",(1-L.gauge.threshold.thickness)/2*q).attr("y2",(1-(1-L.gauge.threshold.thickness)/2)*q).call(y.stroke,L.gauge.threshold.line.color).style("stroke-width",L.gauge.threshold.line.width),we.exit().remove();var xe=B.selectAll("g.gauge-outline").data([$]);xe.enter().append("g").classed("gauge-outline",!0).append("rect"),xe.select("rect").call(se).call(k),xe.exit().remove()}function C(R,P,z,I){var L=z[0].trace,B=I.size,O=I.radius,G=I.innerRadius,$=I.gaugeBg,X=I.gaugeOutline,Z=[B.l+B.w/2,B.t+B.h/2+O/2],J=I.gauge,N=I.layer,H=I.transitionOpts,W=I.onComplete,U=Math.PI/2;function V(Ue){var Ge=L.gauge.axis.range[0],Ze=L.gauge.axis.range[1],Ke=(Ue-Ge)/(Ze-Ge)*Math.PI-U;return Ke<-U?-U:Ke>U?U:Ke}function j(Ue){return t.svg.arc().innerRadius((G+O)/2-Ue/2*(O-G)).outerRadius((G+O)/2+Ue/2*(O-G)).startAngle(-U)}function q(Ue){Ue.attr("d",function(Ge){return j(Ge.thickness).startAngle(V(Ge.range[0])).endAngle(V(Ge.range[1]))()})}var Y,K,re,se;J.enter().append("g").classed("angular",!0),J.attr("transform",l(Z[0],Z[1])),N.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),N.selectAll("g.xangularaxistick,path,text").remove(),Y=b(R,L.gauge.axis),Y.type="linear",Y.range=L.gauge.axis.range,Y._id="xangularaxis",Y.ticklabeloverflow="allow",Y.setScale();var le=function(Ue){return(Y.range[0]-Ue.x)/(Y.range[1]-Y.range[0])*Math.PI+Math.PI},ue={},fe=d.makeLabelFns(Y,0),pe=fe.labelStandoff;ue.xFn=function(Ue){var Ge=le(Ue);return Math.cos(Ge)*pe},ue.yFn=function(Ue){var Ge=le(Ue),Ze=Math.sin(Ge)>0?.2:1;return-Math.sin(Ge)*(pe+Ue.fontSize*Ze)+Math.abs(Math.cos(Ge))*(Ue.fontSize*u)},ue.anchorFn=function(Ue){var Ge=le(Ue),Ze=Math.cos(Ge);return Math.abs(Ze)<.1?"middle":Ze>0?"start":"end"},ue.heightFn=function(Ue,Ge,Ze){var Ke=le(Ue);return-.5*(1+Math.sin(Ke))*Ze};var we=function(Ue){return l(Z[0]+O*Math.cos(Ue),Z[1]-O*Math.sin(Ue))};re=function(Ue){return we(le(Ue))};var xe=function(Ue){var Ge=le(Ue);return we(Ge)+"rotate("+-n(Ge)+")"};if(K=d.calcTicks(Y),se=d.getTickSigns(Y)[2],Y.visible){se=Y.ticks==="inside"?-1:1;var he=(Y.linewidth||1)/2;d.drawTicks(R,Y,{vals:K,layer:N,path:"M"+se*he+",0h"+se*Y.ticklen,transFn:xe}),d.drawLabels(R,Y,{vals:K,layer:N,transFn:re,labelFns:ue})}var oe=[$].concat(L.gauge.steps),te=J.selectAll("g.bg-arc").data(oe);te.enter().append("g").classed("bg-arc",!0).append("path"),te.select("path").call(q).call(k),te.exit().remove();var ie=j(L.gauge.bar.thickness),ee=J.selectAll("g.value-arc").data([L.gauge.bar]);ee.enter().append("g").classed("value-arc",!0).append("path");var ce=ee.select("path");E(H)?(ce.transition().duration(H.duration).ease(H.easing).each("end",function(){W&&W()}).each("interrupt",function(){W&&W()}).attrTween("d",T(ie,V(z[0].lastY),V(z[0].y))),L._lastValue=z[0].y):ce.attr("d",typeof z[0].y=="number"?ie.endAngle(V(z[0].y)):"M0,0Z"),ce.call(k),ee.exit().remove(),oe=[];var _e=L.gauge.threshold.value;(_e||_e===0)&&oe.push({range:[_e,_e],color:L.gauge.threshold.color,line:{color:L.gauge.threshold.line.color,width:L.gauge.threshold.line.width},thickness:L.gauge.threshold.thickness});var Se=J.selectAll("g.threshold-arc").data(oe);Se.enter().append("g").classed("threshold-arc",!0).append("path"),Se.select("path").call(q).call(k),Se.exit().remove();var Me=J.selectAll("g.gauge-outline").data([X]);Me.enter().append("g").classed("gauge-outline",!0).append("path"),Me.select("path").call(q).call(k),Me.exit().remove()}function w(R,P,z,I){var L=z[0].trace,B=I.numbersX,O=I.numbersY,G=L.align||"center",$=_[G],X=I.transitionOpts,Z=I.onComplete,J=o.ensureSingle(P,"g","numbers"),N,H,W,U=[];L._hasNumber&&U.push("number"),L._hasDelta&&(U.push("delta"),L.delta.position==="left"&&U.reverse());var V=J.selectAll("text").data(U);V.enter().append("text"),V.attr("text-anchor",function(){return $}).attr("class",function(we){return we}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),V.exit().remove();function j(we,xe,he,oe){if(we.match("s")&&he>=0!=oe>=0&&!xe(he).slice(-1).match(x)&&!xe(oe).slice(-1).match(x)){var te=we.slice().replace("s","f").replace(/\d+/,function(ee){return parseInt(ee)-1}),ie=b(R,{tickformat:te});return function(ee){return Math.abs(ee)<1?d.tickText(ie,ee).text:xe(ee)}}else return xe}function q(){var we=b(R,{tickformat:L.number.valueformat},L._range);we.setScale(),d.prepTicks(we);var xe=function(ee){return d.tickText(we,ee).text},he=L.number.suffix,oe=L.number.prefix,te=J.select("text.number");function ie(){var ee=typeof z[0].y=="number"?oe+xe(z[0].y)+he:"-";te.text(ee).call(c.font,L.number.font).call(h.convertToTspans,R)}return E(X)?te.transition().duration(X.duration).ease(X.easing).each("end",function(){ie(),Z&&Z()}).each("interrupt",function(){ie(),Z&&Z()}).attrTween("text",function(){var ee=t.select(this),ce=i(z[0].lastY,z[0].y);L._lastValue=z[0].y;var _e=j(L.number.valueformat,xe,z[0].lastY,z[0].y);return function(Se){ee.text(oe+_e(ce(Se))+he)}}):ie(),N=F(oe+xe(z[0].y)+he,L.number.font,$,R),te}function Y(){var we=b(R,{tickformat:L.delta.valueformat},L._range);we.setScale(),d.prepTicks(we);var xe=function(Se){return d.tickText(we,Se).text},he=L.delta.suffix,oe=L.delta.prefix,te=function(Se){var Me=L.delta.relative?Se.relativeDelta:Se.delta;return Me},ie=function(Se,Me){return Se===0||typeof Se!="number"||isNaN(Se)?"-":(Se>0?L.delta.increasing.symbol:L.delta.decreasing.symbol)+oe+Me(Se)+he},ee=function(Se){return Se.delta>=0?L.delta.increasing.color:L.delta.decreasing.color};L._deltaLastValue===void 0&&(L._deltaLastValue=te(z[0]));var ce=J.select("text.delta");ce.call(c.font,L.delta.font).call(y.fill,ee({delta:L._deltaLastValue}));function _e(){ce.text(ie(te(z[0]),xe)).call(y.fill,ee(z[0])).call(h.convertToTspans,R)}return E(X)?ce.transition().duration(X.duration).ease(X.easing).tween("text",function(){var Se=t.select(this),Me=te(z[0]),Ue=L._deltaLastValue,Ge=j(L.delta.valueformat,xe,Ue,Me),Ze=i(Ue,Me);return L._deltaLastValue=Me,function(Ke){Se.text(ie(Ze(Ke),Ge)),Se.call(y.fill,ee({delta:Ze(Ke)}))}}).each("end",function(){_e(),Z&&Z()}).each("interrupt",function(){_e(),Z&&Z()}):_e(),H=F(ie(te(z[0]),xe),L.delta.font,$,R),ce}var K=L.mode+L.align,re;if(L._hasDelta&&(re=Y(),K+=L.delta.position+L.delta.font.size+L.delta.font.family+L.delta.valueformat,K+=L.delta.increasing.symbol+L.delta.decreasing.symbol,W=H),L._hasNumber&&(q(),K+=L.number.font.size+L.number.font.family+L.number.valueformat+L.number.suffix+L.number.prefix,W=N),L._hasDelta&&L._hasNumber){var se=[(N.left+N.right)/2,(N.top+N.bottom)/2],le=[(H.left+H.right)/2,(H.top+H.bottom)/2],ue,fe,pe=.75*L.delta.font.size;L.delta.position==="left"&&(ue=D(L,"deltaPos",0,-1*(N.width*v[L.align]+H.width*(1-v[L.align])+pe),K,Math.min),fe=se[1]-le[1],W={width:N.width+H.width+pe,height:Math.max(N.height,H.height),left:H.left+ue,right:N.right,top:Math.min(N.top,H.top+fe),bottom:Math.max(N.bottom,H.bottom+fe)}),L.delta.position==="right"&&(ue=D(L,"deltaPos",0,N.width*(1-v[L.align])+H.width*v[L.align]+pe,K,Math.max),fe=se[1]-le[1],W={width:N.width+H.width+pe,height:Math.max(N.height,H.height),left:N.left,right:H.right+ue,top:Math.min(N.top,H.top+fe),bottom:Math.max(N.bottom,H.bottom+fe)}),L.delta.position==="bottom"&&(ue=null,fe=H.height,W={width:Math.max(N.width,H.width),height:N.height+H.height,left:Math.min(N.left,H.left),right:Math.max(N.right,H.right),top:N.bottom-N.height,bottom:N.bottom+H.height}),L.delta.position==="top"&&(ue=null,fe=N.top,W={width:Math.max(N.width,H.width),height:N.height+H.height,left:Math.min(N.left,H.left),right:Math.max(N.right,H.right),top:N.bottom-N.height-H.height,bottom:N.bottom}),re.attr({dx:ue,dy:fe})}(L._hasNumber||L._hasDelta)&&J.attr("transform",function(){var we=I.numbersScaler(W);K+=we[2];var xe=D(L,"numbersScale",1,we[0],K,Math.min),he;L._scaleNumbers||(xe=1),L._isAngular?he=O-xe*W.bottom:he=O-xe*(W.top+W.bottom)/2,L._numbersTop=xe*W.top+he;var oe=W[G];G==="center"&&(oe=(W.left+W.right)/2);var te=B-xe*oe;return te=D(L,"numbersTranslate",0,te,K,Math.max),l(te,he)+s(xe)})}function k(R){R.each(function(P){y.stroke(t.select(this),P.line.color)}).each(function(P){y.fill(t.select(this),P.color)}).style("stroke-width",function(P){return P.line.width})}function T(R,P,z){return function(){var I=a(P,z);return function(L){return R.endAngle(I(L))()}}}function b(R,P,z){var I=R._fullLayout,L=o.extendFlat({type:"linear",ticks:"outside",range:z,showline:!0},P),B={type:"linear",_id:"x"+P._id},O={letter:"x",font:I.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function G($,X){return o.coerce(L,B,m,$,X)}return p(L,B,G,O,I),g(L,B,G,O),B}function S(R,P,z){var I=Math.min(P/R.width,z/R.height);return[I,R,P+"x"+z]}function A(R,P){var z=Math.sqrt(R.width/2*(R.width/2)+R.height*R.height),I=P/z;return[I,R,P]}function F(R,P,z,I){var L=document.createElementNS("http://www.w3.org/2000/svg","text"),B=t.select(L);return B.text(R).attr("x",0).attr("y",0).attr("text-anchor",z).attr("data-unformatted",R).call(h.convertToTspans,I).call(c.font,P),c.bBox(B.node())}function D(R,P,z,I,L,B){var O="_cache"+P;R[O]&&R[O].key===L||(R[O]={key:L,value:z});var G=o.aggNums(B,null,[R[O].value,I],2);return R[O].value=G,G}}}),a_e=ye({"src/traces/indicator/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"indicator",basePlotModule:Qye(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:cG(),supplyDefaults:e_e().supplyDefaults,calc:t_e().calc,plot:r_e(),meta:{}}}}),i_e=ye({"lib/indicator.js"(e,r){"use strict";r.exports=a_e()}}),hG=ye({"src/traces/table/attributes.js"(e,r){"use strict";var t=kv(),a=Xi().extendFlat,i=Cs().overrideAll,o=vs(),s=Ds().attributes,l=zs().descriptionOnlyNumbers,n=r.exports=i({domain:s({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:l("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:a({},t.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:a({},o({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:l("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:a({},t.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:a({},o({arrayOk:!0}))}},"calc","from-root")}}),n_e=ye({"src/traces/table/defaults.js"(e,r){"use strict";var t=Yt(),a=hG(),i=Ds().defaults;function o(s,l){for(var n=s.columnorder||[],u=s.header.values.length,c=n.slice(0,u),f=c.slice().sort(function(p,g){return p-g}),h=c.map(function(p){return f.indexOf(p)}),d=h.length;d",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"}}}}),s_e=ye({"src/traces/table/data_preparation_helper.js"(e,r){"use strict";var t=dG(),a=Xi().extendFlat,i=en(),o=yc().isTypedArray,s=yc().isArrayOrTypedArray;r.exports=function(m,y){var _=u(y.cells.values),v=function($){return $.slice(y.header.values.length,$.length)},x=u(y.header.values);x.length&&!x[0].length&&(x[0]=[""],x=u(x));var E=x.concat(v(_).map(function(){return c((x[0]||[""]).length)})),M=y.domain,C=Math.floor(m._fullLayout._size.w*(M.x[1]-M.x[0])),w=Math.floor(m._fullLayout._size.h*(M.y[1]-M.y[0])),k=y.header.values.length?E[0].map(function(){return y.header.height}):[t.emptyHeaderHeight],T=_.length?_[0].map(function(){return y.cells.height}):[],b=k.reduce(n,0),S=w-b,A=S+t.uplift,F=d(T,A),D=d(k,b),R=h(D,[]),P=h(F,R),z={},I=y.columnorder;s(I)&&(I=Array.from(I)),I=I.concat(v(_.map(function($,X){return X})));var L=E.map(function($,X){var Z=s(y.columnwidth)?y.columnwidth[Math.min(X,y.columnwidth.length-1)]:y.columnwidth;return i(Z)?Number(Z):1}),B=L.reduce(n,0);L=L.map(function($){return $/B*C});var O=Math.max(l(y.header.line.width),l(y.cells.line.width)),G={key:y.uid+m._context.staticPlot,translateX:M.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-M.y[1]),size:m._fullLayout._size,width:C,maxLineWidth:O,height:w,columnOrder:I,groupHeight:w,rowBlocks:P,headerRowBlocks:R,scrollY:0,cells:a({},y.cells,{values:_}),headerCells:a({},y.header,{values:E}),gdColumns:E.map(function($){return $[0]}),gdColumnsOriginalOrder:E.map(function($){return $[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:E.map(function($,X){var Z=z[$];z[$]=(Z||0)+1;var J=$+"__"+z[$];return{key:J,label:$,specIndex:X,xIndex:I[X],xScale:f,x:void 0,calcdata:void 0,columnWidth:L[X]}})};return G.columns.forEach(function($){$.calcdata=G,$.x=f($)}),G};function l(g){if(s(g)){for(var m=0,y=0;y=m||w===g.length-1)&&(y[v]=E,E.key=C++,E.firstRowIndex=M,E.lastRowIndex=w,E=p(),v+=x,M=w+1,x=0);return y}function p(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),l_e=ye({"src/traces/table/data_split_helpers.js"(e){"use strict";var r=Xi().extendFlat;e.splitToPanels=function(a){var i=[0,0],o=r({},a,{key:"header",type:"header",page:0,prevPages:i,currentRepaint:[null,null],dragHandle:!0,values:a.calcdata.headerCells.values[a.specIndex],rowBlocks:a.calcdata.headerRowBlocks,calcdata:r({},a.calcdata,{cells:a.calcdata.headerCells})}),s=r({},a,{key:"cells1",type:"cells",page:0,prevPages:i,currentRepaint:[null,null],dragHandle:!1,values:a.calcdata.cells.values[a.specIndex],rowBlocks:a.calcdata.rowBlocks}),l=r({},a,{key:"cells2",type:"cells",page:1,prevPages:i,currentRepaint:[null,null],dragHandle:!1,values:a.calcdata.cells.values[a.specIndex],rowBlocks:a.calcdata.rowBlocks});return[s,l,o]},e.splitToCells=function(a){var i=t(a);return(a.values||[]).slice(i[0],i[1]).map(function(o,s){var l=typeof o=="string"&&o.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:s+l,key:i[0]+s,column:a,calcdata:a.calcdata,page:a.page,rowBlocks:a.rowBlocks,value:o}})};function t(a){var i=a.rowBlocks[a.page],o=i?i.rows[0].rowIndex:0,s=i?o+i.rows.length:0;return[o,s]}}}),pG=ye({"src/traces/table/plot.js"(e,r){"use strict";var t=dG(),a=ai(),i=Yt(),o=i.numberFormat,s=$p(),l=$i(),n=Go(),u=Yt().raiseToTop,c=Yt().strTranslate,f=Yt().cancelTransition,h=s_e(),d=l_e(),p=Ya();r.exports=function(K,re){var se=!K._context.staticPlot,le=K._fullLayout._paper.selectAll("."+t.cn.table).data(re.map(function(Me){var Ue=s.unwrap(Me),Ge=Ue.trace;return h(K,Ge)}),s.keyFun);le.exit().remove(),le.enter().append("g").classed(t.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"),le.attr("width",function(Me){return Me.width+Me.size.l+Me.size.r}).attr("height",function(Me){return Me.height+Me.size.t+Me.size.b}).attr("transform",function(Me){return c(Me.translateX,Me.translateY)});var ue=le.selectAll("."+t.cn.tableControlView).data(s.repeat,s.keyFun),fe=ue.enter().append("g").classed(t.cn.tableControlView,!0).style("box-sizing","content-box");if(se){var pe="onwheel"in document?"wheel":"mousewheel";fe.on("mousemove",function(Me){ue.filter(function(Ue){return Me===Ue}).call(v,K)}).on(pe,function(Me){if(!Me.scrollbarState.wheeling){Me.scrollbarState.wheeling=!0;var Ue=Me.scrollY+a.event.deltaY,Ge=$(K,ue,null,Ue)(Me);Ge||(a.event.stopPropagation(),a.event.preventDefault()),Me.scrollbarState.wheeling=!1}}).call(v,K,!0)}ue.attr("transform",function(Me){return c(Me.size.l,Me.size.t)});var we=ue.selectAll("."+t.cn.scrollBackground).data(s.repeat,s.keyFun);we.enter().append("rect").classed(t.cn.scrollBackground,!0).attr("fill","none"),we.attr("width",function(Me){return Me.width}).attr("height",function(Me){return Me.height}),ue.each(function(Me){l.setClipUrl(a.select(this),m(K,Me),K)});var xe=ue.selectAll("."+t.cn.yColumn).data(function(Me){return Me.columns},s.keyFun);xe.enter().append("g").classed(t.cn.yColumn,!0),xe.exit().remove(),xe.attr("transform",function(Me){return c(Me.x,0)}),se&&xe.call(a.behavior.drag().origin(function(Me){var Ue=a.select(this);return z(Ue,Me,-t.uplift),u(this),Me.calcdata.columnDragInProgress=!0,v(ue.filter(function(Ge){return Me.calcdata.key===Ge.key}),K),Me}).on("drag",function(Me){var Ue=a.select(this),Ge=function(dt){return(Me===dt?a.event.x:dt.x)+dt.columnWidth/2};Me.x=Math.max(-t.overdrag,Math.min(Me.calcdata.width+t.overdrag-Me.columnWidth,a.event.x));var Ze=_(xe).filter(function(dt){return dt.calcdata.key===Me.calcdata.key}),Ke=Ze.sort(function(dt,_t){return Ge(dt)-Ge(_t)});Ke.forEach(function(dt,_t){dt.xIndex=_t,dt.x=Me===dt?dt.x:dt.xScale(dt)}),xe.filter(function(dt){return Me!==dt}).transition().ease(t.transitionEase).duration(t.transitionDuration).attr("transform",function(dt){return c(dt.x,0)}),Ue.call(f).attr("transform",c(Me.x,-t.uplift))}).on("dragend",function(Me){var Ue=a.select(this),Ge=Me.calcdata;Me.x=Me.xScale(Me),Me.calcdata.columnDragInProgress=!1,z(Ue,Me,0),R(K,Ge,Ge.columns.map(function(Ze){return Ze.xIndex}))})),xe.each(function(Me){l.setClipUrl(a.select(this),y(K,Me),K)});var he=xe.selectAll("."+t.cn.columnBlock).data(d.splitToPanels,s.keyFun);he.enter().append("g").classed(t.cn.columnBlock,!0).attr("id",function(Me){return Me.key}),he.style("cursor",function(Me){return Me.dragHandle?"ew-resize":Me.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var oe=he.filter(L),te=he.filter(I);se&&te.call(a.behavior.drag().origin(function(Me){return a.event.stopPropagation(),Me}).on("drag",$(K,ue,-1)).on("dragend",function(){})),x(K,ue,oe,he),x(K,ue,te,he);var ie=ue.selectAll("."+t.cn.scrollAreaClip).data(s.repeat,s.keyFun);ie.enter().append("clipPath").classed(t.cn.scrollAreaClip,!0).attr("id",function(Me){return m(K,Me)});var ee=ie.selectAll("."+t.cn.scrollAreaClipRect).data(s.repeat,s.keyFun);ee.enter().append("rect").classed(t.cn.scrollAreaClipRect,!0).attr("x",-t.overdrag).attr("y",-t.uplift).attr("fill","none"),ee.attr("width",function(Me){return Me.width+2*t.overdrag}).attr("height",function(Me){return Me.height+t.uplift});var ce=xe.selectAll("."+t.cn.columnBoundary).data(s.repeat,s.keyFun);ce.enter().append("g").classed(t.cn.columnBoundary,!0);var _e=xe.selectAll("."+t.cn.columnBoundaryClippath).data(s.repeat,s.keyFun);_e.enter().append("clipPath").classed(t.cn.columnBoundaryClippath,!0),_e.attr("id",function(Me){return y(K,Me)});var Se=_e.selectAll("."+t.cn.columnBoundaryRect).data(s.repeat,s.keyFun);Se.enter().append("rect").classed(t.cn.columnBoundaryRect,!0).attr("fill","none"),Se.attr("width",function(Me){return Me.columnWidth+2*g(Me)}).attr("height",function(Me){return Me.calcdata.height+2*g(Me)+t.uplift}).attr("x",function(Me){return-g(Me)}).attr("y",function(Me){return-g(Me)}),G(null,te,ue)};function g(Y){return Math.ceil(Y.calcdata.maxLineWidth/2)}function m(Y,K){return"clip"+Y._fullLayout._uid+"_scrollAreaBottomClip_"+K.key}function y(Y,K){return"clip"+Y._fullLayout._uid+"_columnBoundaryClippath_"+K.calcdata.key+"_"+K.specIndex}function _(Y){return[].concat.apply([],Y.map(function(K){return K})).map(function(K){return K.__data__})}function v(Y,K,re){function se(xe){var he=xe.rowBlocks;return W(he,he.length-1)+(he.length?U(he[he.length-1],1/0):1)}var le=Y.selectAll("."+t.cn.scrollbarKit).data(s.repeat,s.keyFun);le.enter().append("g").classed(t.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),le.each(function(xe){var he=xe.scrollbarState;he.totalHeight=se(xe),he.scrollableAreaHeight=xe.groupHeight-B(xe),he.currentlyVisibleHeight=Math.min(he.totalHeight,he.scrollableAreaHeight),he.ratio=he.currentlyVisibleHeight/he.totalHeight,he.barLength=Math.max(he.ratio*he.currentlyVisibleHeight,t.goldenRatio*t.scrollbarWidth),he.barWiggleRoom=he.currentlyVisibleHeight-he.barLength,he.wiggleRoom=Math.max(0,he.totalHeight-he.scrollableAreaHeight),he.topY=he.barWiggleRoom===0?0:xe.scrollY/he.wiggleRoom*he.barWiggleRoom,he.bottomY=he.topY+he.barLength,he.dragMultiplier=he.wiggleRoom/he.barWiggleRoom}).attr("transform",function(xe){var he=xe.width+t.scrollbarWidth/2+t.scrollbarOffset;return c(he,B(xe))});var ue=le.selectAll("."+t.cn.scrollbar).data(s.repeat,s.keyFun);ue.enter().append("g").classed(t.cn.scrollbar,!0);var fe=ue.selectAll("."+t.cn.scrollbarSlider).data(s.repeat,s.keyFun);fe.enter().append("g").classed(t.cn.scrollbarSlider,!0),fe.attr("transform",function(xe){return c(0,xe.scrollbarState.topY||0)});var pe=fe.selectAll("."+t.cn.scrollbarGlyph).data(s.repeat,s.keyFun);pe.enter().append("line").classed(t.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",t.scrollbarWidth).attr("stroke-linecap","round").attr("y1",t.scrollbarWidth/2),pe.attr("y2",function(xe){return xe.scrollbarState.barLength-t.scrollbarWidth/2}).attr("stroke-opacity",function(xe){return xe.columnDragInProgress||!xe.scrollbarState.barWiggleRoom||re?0:.4}),pe.transition().delay(0).duration(0),pe.transition().delay(t.scrollbarHideDelay).duration(t.scrollbarHideDuration).attr("stroke-opacity",0);var we=ue.selectAll("."+t.cn.scrollbarCaptureZone).data(s.repeat,s.keyFun);we.enter().append("line").classed(t.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",t.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(xe){var he=a.event.y,oe=this.getBoundingClientRect(),te=xe.scrollbarState,ie=he-oe.top,ee=a.scale.linear().domain([0,te.scrollableAreaHeight]).range([0,te.totalHeight]).clamp(!0);te.topY<=ie&&ie<=te.bottomY||$(K,Y,null,ee(ie-te.barLength/2))(xe)}).call(a.behavior.drag().origin(function(xe){return a.event.stopPropagation(),xe.scrollbarState.scrollbarScrollInProgress=!0,xe}).on("drag",$(K,Y)).on("dragend",function(){})),we.attr("y2",function(xe){return xe.scrollbarState.scrollableAreaHeight}),K._context.staticPlot&&(pe.remove(),we.remove())}function x(Y,K,re,se){var le=E(re),ue=M(le);T(ue);var fe=C(ue);S(fe);var pe=k(ue),we=w(pe);b(we),A(we,K,se,Y),H(ue)}function E(Y){var K=Y.selectAll("."+t.cn.columnCells).data(s.repeat,s.keyFun);return K.enter().append("g").classed(t.cn.columnCells,!0),K.exit().remove(),K}function M(Y){var K=Y.selectAll("."+t.cn.columnCell).data(d.splitToCells,function(re){return re.keyWithinBlock});return K.enter().append("g").classed(t.cn.columnCell,!0),K.exit().remove(),K}function C(Y){var K=Y.selectAll("."+t.cn.cellRect).data(s.repeat,function(re){return re.keyWithinBlock});return K.enter().append("rect").classed(t.cn.cellRect,!0),K}function w(Y){var K=Y.selectAll("."+t.cn.cellText).data(s.repeat,function(re){return re.keyWithinBlock});return K.enter().append("text").classed(t.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){a.event.stopPropagation()}),K}function k(Y){var K=Y.selectAll("."+t.cn.cellTextHolder).data(s.repeat,function(re){return re.keyWithinBlock});return K.enter().append("g").classed(t.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),K}function T(Y){Y.each(function(K,re){var se=K.calcdata.cells.font,le=K.column.specIndex,ue={size:P(se.size,le,re),color:P(se.color,le,re),family:P(se.family,le,re),weight:P(se.weight,le,re),style:P(se.style,le,re),variant:P(se.variant,le,re),textcase:P(se.textcase,le,re),lineposition:P(se.lineposition,le,re),shadow:P(se.shadow,le,re)};K.rowNumber=K.key,K.align=P(K.calcdata.cells.align,le,re),K.cellBorderWidth=P(K.calcdata.cells.line.width,le,re),K.font=ue})}function b(Y){Y.each(function(K){l.font(a.select(this),K.font)})}function S(Y){Y.attr("width",function(K){return K.column.columnWidth}).attr("stroke-width",function(K){return K.cellBorderWidth}).each(function(K){var re=a.select(this);p.stroke(re,P(K.calcdata.cells.line.color,K.column.specIndex,K.rowNumber)),p.fill(re,P(K.calcdata.cells.fill.color,K.column.specIndex,K.rowNumber))})}function A(Y,K,re,se){Y.text(function(le){var ue=le.column.specIndex,fe=le.rowNumber,pe=le.value,we=typeof pe=="string",xe=we&&pe.match(/
/i),he=!we||xe;le.mayHaveMarkup=we&&pe.match(/[<&>]/);var oe=F(pe);le.latex=oe;var te=oe?"":P(le.calcdata.cells.prefix,ue,fe)||"",ie=oe?"":P(le.calcdata.cells.suffix,ue,fe)||"",ee=oe?null:P(le.calcdata.cells.format,ue,fe)||null,ce=te+(ee?o(ee)(le.value):le.value)+ie,_e;le.wrappingNeeded=!le.wrapped&&!he&&!oe&&(_e=D(ce)),le.cellHeightMayIncrease=xe||oe||le.mayHaveMarkup||(_e===void 0?D(ce):_e),le.needsConvertToTspans=le.mayHaveMarkup||le.wrappingNeeded||le.latex;var Se;if(le.wrappingNeeded){var Me=t.wrapSplitCharacter===" "?ce.replace(/le&&se.push(ue),le+=we}return se}function G(Y,K,re){var se=_(K)[0];if(se!==void 0){var le=se.rowBlocks,ue=se.calcdata,fe=W(le,le.length),pe=se.calcdata.groupHeight-B(se),we=ue.scrollY=Math.max(0,Math.min(fe-pe,ue.scrollY)),xe=O(le,we,pe);xe.length===1&&(xe[0]===le.length-1?xe.unshift(xe[0]-1):xe.push(xe[0]+1)),xe[0]%2&&xe.reverse(),K.each(function(he,oe){he.page=xe[oe],he.scrollY=we}),K.attr("transform",function(he){var oe=W(he.rowBlocks,he.page)-he.scrollY;return c(0,oe)}),Y&&(X(Y,re,K,xe,se.prevPages,se,0),X(Y,re,K,xe,se.prevPages,se,1),v(re,Y))}}function $(Y,K,re,se){return function(ue){var fe=ue.calcdata?ue.calcdata:ue,pe=K.filter(function(oe){return fe.key===oe.key}),we=re||fe.scrollbarState.dragMultiplier,xe=fe.scrollY;fe.scrollY=se===void 0?fe.scrollY+we*a.event.dy:se;var he=pe.selectAll("."+t.cn.yColumn).selectAll("."+t.cn.columnBlock).filter(I);return G(Y,he,pe),fe.scrollY===xe}}function X(Y,K,re,se,le,ue,fe){var pe=se[fe]!==le[fe];pe&&(clearTimeout(ue.currentRepaint[fe]),ue.currentRepaint[fe]=setTimeout(function(){var we=re.filter(function(xe,he){return he===fe&&se[he]!==le[he]});x(Y,K,we,re),le[fe]=se[fe]}))}function Z(Y,K,re,se){return function(){var ue=a.select(K.parentNode);ue.each(function(fe){var pe=fe.fragments;ue.selectAll("tspan.line").each(function(ce,_e){pe[_e].width=this.getComputedTextLength()});var we=pe[pe.length-1].width,xe=pe.slice(0,-1),he=[],oe,te,ie=0,ee=fe.column.columnWidth-2*t.cellPad;for(fe.value="";xe.length;)oe=xe.shift(),te=oe.width+we,ie+te>ee&&(fe.value+=he.join(t.wrapSpacer)+t.lineBreaker,he=[],ie=0),he.push(oe.text),ie+=te;ie&&(fe.value+=he.join(t.wrapSpacer)),fe.wrapped=!0}),ue.selectAll("tspan.line").remove(),A(ue.select("."+t.cn.cellText),re,Y,se),a.select(K.parentNode.parentNode).call(H)}}function J(Y,K,re,se,le){return function(){if(!le.settledY){var fe=a.select(K.parentNode),pe=j(le),we=le.key-pe.firstRowIndex,xe=pe.rows[we].rowHeight,he=le.cellHeightMayIncrease?K.parentNode.getBoundingClientRect().height+2*t.cellPad:xe,oe=Math.max(he,xe),te=oe-pe.rows[we].rowHeight;te&&(pe.rows[we].rowHeight=oe,Y.selectAll("."+t.cn.columnCell).call(H),G(null,Y.filter(I),0),v(re,se,!0)),fe.attr("transform",function(){var ie=this,ee=ie.parentNode,ce=ee.getBoundingClientRect(),_e=a.select(ie.parentNode).select("."+t.cn.cellRect).node().getBoundingClientRect(),Se=ie.transform.baseVal.consolidate(),Me=_e.top-ce.top+(Se?Se.matrix.f:t.cellPad);return c(N(le,a.select(ie.parentNode).select("."+t.cn.cellTextHolder).node().getBoundingClientRect().width),Me)}),le.settledY=!0}}}function N(Y,K){switch(Y.align){case"left":return t.cellPad;case"right":return Y.column.columnWidth-(K||0)-t.cellPad;case"center":return(Y.column.columnWidth-(K||0))/2;default:return t.cellPad}}function H(Y){Y.attr("transform",function(K){var re=K.rowBlocks[0].auxiliaryBlocks.reduce(function(fe,pe){return fe+U(pe,1/0)},0),se=j(K),le=U(se,K.key),ue=le+re;return c(0,ue)}).selectAll("."+t.cn.cellRect).attr("height",function(K){return q(j(K),K.key).rowHeight})}function W(Y,K){for(var re=0,se=K-1;se>=0;se--)re+=V(Y[se]);return re}function U(Y,K){for(var re=0,se=0;seo.length&&(i=i.slice(0,o.length)):i=[],l=0;l90&&(m-=180,f=-f),{angle:m,flip:f,p:a.c2p(s,i,o),offsetMultplier:h}}}}),y_e=ye({"src/traces/carpet/plot.js"(e,r){"use strict";var t=ai(),a=$i(),i=vG(),o=mG(),s=g_e(),l=Go(),n=Yt(),u=n.strRotate,c=n.strTranslate,f=Yl();r.exports=function(x,E,M,C){var w=x._context.staticPlot,k=E.xaxis,T=E.yaxis,b=x._fullLayout,S=b._clips;n.makeTraceGroups(C,M,"trace").each(function(A){var F=t.select(this),D=A[0],R=D.trace,P=R.aaxis,z=R.baxis,I=n.ensureSingle(F,"g","minorlayer"),L=n.ensureSingle(F,"g","majorlayer"),B=n.ensureSingle(F,"g","boundarylayer"),O=n.ensureSingle(F,"g","labellayer");F.style("opacity",R.opacity),d(k,T,L,P,"a",P._gridlines,!0,w),d(k,T,L,z,"b",z._gridlines,!0,w),d(k,T,I,P,"a",P._minorgridlines,!0,w),d(k,T,I,z,"b",z._minorgridlines,!0,w),d(k,T,B,P,"a-boundary",P._boundarylines,w),d(k,T,B,z,"b-boundary",z._boundarylines,w);var G=p(x,k,T,R,D,O,P._labels,"a-label"),$=p(x,k,T,R,D,O,z._labels,"b-label");g(x,O,R,D,k,T,G,$),h(R,D,S,k,T)})};function h(v,x,E,M,C){var w,k,T,b,S=E.select("#"+v._clipPathId);S.size()||(S=E.append("clipPath").classed("carpetclip",!0));var A=n.ensureSingle(S,"path","carpetboundary"),F=x.clipsegments,D=[];for(b=0;b0?"start":"end","data-notex":1}).call(a.font,F.font).text(F.text).call(l.convertToTspans,v),L=a.bBox(this);I.attr("transform",c(R.p[0],R.p[1])+u(R.angle)+c(F.axis.labelpadding*z,L.height*.3)),S=Math.max(S,L.width+F.axis.labelpadding)}),b.exit().remove(),A.maxExtent=S,A}function g(v,x,E,M,C,w,k,T){var b,S,A,F,D=n.aggNums(Math.min,null,E.a),R=n.aggNums(Math.max,null,E.a),P=n.aggNums(Math.min,null,E.b),z=n.aggNums(Math.max,null,E.b);b=.5*(D+R),S=P,A=E.ab2xy(b,S,!0),F=E.dxyda_rough(b,S),k.angle===void 0&&n.extendFlat(k,s(E,C,w,A,E.dxydb_rough(b,S))),_(v,x,E,M,A,F,E.aaxis,C,w,k,"a-title"),b=D,S=.5*(P+z),A=E.ab2xy(b,S,!0),F=E.dxydb_rough(b,S),T.angle===void 0&&n.extendFlat(T,s(E,C,w,A,E.dxyda_rough(b,S))),_(v,x,E,M,A,F,E.baxis,C,w,T,"b-title")}var m=f.LINE_SPACING,y=(1-f.MID_SHIFT)/m+1;function _(v,x,E,M,C,w,k,T,b,S,A){var F=[];k.title.text&&F.push(k.title.text);var D=x.selectAll("text."+A).data(F),R=S.maxExtent;D.enter().append("text").classed(A,!0),D.each(function(){var P=s(E,T,b,C,w);["start","both"].indexOf(k.showticklabels)===-1&&(R=0);var z=k.title.font.size;R+=z+k.title.offset;var I=S.angle+(S.flip<0?180:0),L=(I-P.angle+450)%360,B=L>90&&L<270,O=t.select(this);O.text(k.title.text).call(l.convertToTspans,v),B&&(R=(-l.lineCount(O)+y)*m*z-R),O.attr("transform",c(P.p[0],P.p[1])+u(P.angle)+c(0,R)).attr("text-anchor","middle").call(a.font,k.title.font)}),D.exit().remove()}}}),__e=ye({"src/traces/carpet/cheater_basis.js"(e,r){"use strict";var t=Yt().isArrayOrTypedArray;r.exports=function(a,i,o){var s,l,n,u,c,f,h=[],d=t(a)?a.length:a,p=t(i)?i.length:i,g=t(a)?a:null,m=t(i)?i:null;g&&(n=(g.length-1)/(g[g.length-1]-g[0])/(d-1)),m&&(u=(m.length-1)/(m[m.length-1]-m[0])/(p-1));var y,_=1/0,v=-1/0;for(l=0;l=10)return null;for(var s=1/0,l=-1/0,n=i.length,u=0;u0&&(U=o.dxydi([],G-1,X,0,Z),Y.push(J[0]+U[0]/3),K.push(J[1]+U[1]/3),V=o.dxydi([],G-1,X,1,Z),Y.push(W[0]-V[0]/3),K.push(W[1]-V[1]/3)),Y.push(W[0]),K.push(W[1]),J=W;else for(G=o.a2i(O),N=Math.floor(Math.max(0,Math.min(P-2,G))),H=G-N,re.length=P,re.crossLength=z,re.xy=function(se){return o.evalxy([],G,se)},re.dxy=function(se,le){return o.dxydj([],N,se,H,le)},$=0;$0&&(j=o.dxydj([],N,$-1,H,0),Y.push(J[0]+j[0]/3),K.push(J[1]+j[1]/3),q=o.dxydj([],N,$-1,H,1),Y.push(W[0]-q[0]/3),K.push(W[1]-q[1]/3)),Y.push(W[0]),K.push(W[1]),J=W;return re.axisLetter=s,re.axis=C,re.crossAxis=S,re.value=O,re.constvar=l,re.index=g,re.x=Y,re.y=K,re.smoothing=S.smoothing,re}function B(O){var G,$,X,Z,J,N=[],H=[],W={};if(W.length=M.length,W.crossLength=b.length,s==="b")for(X=Math.max(0,Math.min(z-2,O)),J=Math.min(1,Math.max(0,O-X)),W.xy=function(U){return o.evalxy([],U,O)},W.dxy=function(U,V){return o.dxydi([],U,X,V,J)},G=0;GM.length-1)&&w.push(a(B(u),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(g=d;gM.length-1)&&!(_<0||_>M.length-1))for(v=M[c],x=M[_],n=0;nM[M.length-1])&&k.push(a(L(y),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&T.push(a(B(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&T.push(a(B(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(f=5e-15,h=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+f)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+f))].sort(function(O,G){return O-G}),d=h[0],p=h[1],g=d;g<=p;g++)m=C.tick0+C.dtick*g,w.push(a(L(m),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(g=d-1;gM[M.length-1])&&k.push(a(L(y),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&T.push(a(L(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&T.push(a(L(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),w_e=ye({"src/traces/carpet/calc_labels.js"(e,r){"use strict";var t=qi(),a=Xi().extendFlat;r.exports=function(o,s){var l,n,u,c,f,h=s._labels=[],d=s._gridlines;for(l=0;l=0;l--)n[d-l]=a[p][l],u[d-l]=i[p][l];for(c.push({x:n,y:u,bicubic:f}),l=p,n=[],u=[];l>=0;l--)n[p-l]=a[l][0],u[p-l]=i[l][0];return c.push({x:n,y:u,bicubic:h}),c}}}),T_e=ye({"src/traces/carpet/smooth_fill_2d_array.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o,s){var l,n,u,c=[],f=[],h=i[0].length,d=i.length;function p($,X){var Z=0,J,N=0;return $>0&&(J=i[X][$-1])!==void 0&&(N++,Z+=J),$0&&(J=i[X-1][$])!==void 0&&(N++,Z+=J),X0&&n0&&lb);return t.log("Smoother converged to",S,"after",F,"iterations"),i}}}),M_e=ye({"src/traces/carpet/constants.js"(e,r){"use strict";r.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),E_e=ye({"src/traces/carpet/catmull_rom.js"(e,r){"use strict";var t=.5;r.exports=function(i,o,s,l){var n=i[0]-o[0],u=i[1]-o[1],c=s[0]-o[0],f=s[1]-o[1],h=Math.pow(n*n+u*u,t/2),d=Math.pow(c*c+f*f,t/2),p=(d*d*n-h*h*c)*l,g=(d*d*u-h*h*f)*l,m=d*(h+d)*3,y=h*(h+d)*3;return[[o[0]+(m&&p/m),o[1]+(m&&g/m)],[o[0]-(y&&p/y),o[1]-(y&&g/y)]]}}}),S_e=ye({"src/traces/carpet/compute_control_points.js"(e,r){"use strict";var t=E_e(),a=Yt().ensureArray;function i(o,s,l){var n=-.5*l[0]+1.5*s[0],u=-.5*l[1]+1.5*s[1];return[(2*n+o[0])/3,(2*u+o[1])/3]}r.exports=function(s,l,n,u,c,f){var h,d,p,g,m,y,_,v,x,E,M=n[0].length,C=n.length,w=c?3*M-2:M,k=f?3*C-2:C;for(s=a(s,k),l=a(l,k),p=0;pm&&w_&&ky||k<_||k>v},u.setScale=function(){var w=u._x,k=u._y,T=i(u._xctrl,u._yctrl,w,k,p.smoothing,g.smoothing);u._xctrl=T[0],u._yctrl=T[1],u.evalxy=o([u._xctrl,u._yctrl],h,d,p.smoothing,g.smoothing),u.dxydi=s([u._xctrl,u._yctrl],p.smoothing,g.smoothing),u.dxydj=l([u._xctrl,u._yctrl],p.smoothing,g.smoothing)},u.i2a=function(w){var k=Math.max(0,Math.floor(w[0]),h-2),T=w[0]-k;return(1-T)*c[k]+T*c[k+1]},u.j2b=function(w){var k=Math.max(0,Math.floor(w[1]),h-2),T=w[1]-k;return(1-T)*f[k]+T*f[k+1]},u.ij2ab=function(w){return[u.i2a(w[0]),u.j2b(w[1])]},u.a2i=function(w){var k=Math.max(0,Math.min(a(w,c),h-2)),T=c[k],b=c[k+1];return Math.max(0,Math.min(h-1,k+(w-T)/(b-T)))},u.b2j=function(w){var k=Math.max(0,Math.min(a(w,f),d-2)),T=f[k],b=f[k+1];return Math.max(0,Math.min(d-1,k+(w-T)/(b-T)))},u.ab2ij=function(w){return[u.a2i(w[0]),u.b2j(w[1])]},u.i2c=function(w,k){return u.evalxy([],w,k)},u.ab2xy=function(w,k,T){if(!T&&(wc[h-1]|kf[d-1]))return[!1,!1];var b=u.a2i(w),S=u.b2j(k),A=u.evalxy([],b,S);if(T){var F=0,D=0,R=[],P,z,I,L;wc[h-1]?(P=h-2,z=1,F=(w-c[h-1])/(c[h-1]-c[h-2])):(P=Math.max(0,Math.min(h-2,Math.floor(b))),z=b-P),kf[d-1]?(I=d-2,L=1,D=(k-f[d-1])/(f[d-1]-f[d-2])):(I=Math.max(0,Math.min(d-2,Math.floor(S))),L=S-I),F&&(u.dxydi(R,P,I,z,L),A[0]+=R[0]*F,A[1]+=R[1]*F),D&&(u.dxydj(R,P,I,z,L),A[0]+=R[0]*D,A[1]+=R[1]*D)}return A},u.c2p=function(w,k,T){return[k.c2p(w[0]),T.c2p(w[1])]},u.p2x=function(w,k,T){return[k.p2c(w[0]),T.p2c(w[1])]},u.dadi=function(w){var k=Math.max(0,Math.min(c.length-2,w));return c[k+1]-c[k]},u.dbdj=function(w){var k=Math.max(0,Math.min(f.length-2,w));return f[k+1]-f[k]},u.dxyda=function(w,k,T,b){var S=u.dxydi(null,w,k,T,b),A=u.dadi(w,T);return[S[0]/A,S[1]/A]},u.dxydb=function(w,k,T,b){var S=u.dxydj(null,w,k,T,b),A=u.dbdj(k,b);return[S[0]/A,S[1]/A]},u.dxyda_rough=function(w,k,T){var b=x*(T||.1),S=u.ab2xy(w+b,k,!0),A=u.ab2xy(w-b,k,!0);return[(S[0]-A[0])*.5/b,(S[1]-A[1])*.5/b]},u.dxydb_rough=function(w,k,T){var b=E*(T||.1),S=u.ab2xy(w,k+b,!0),A=u.ab2xy(w,k-b,!0);return[(S[0]-A[0])*.5/b,(S[1]-A[1])*.5/b]},u.dpdx=function(w){return w._m},u.dpdy=function(w){return w._m}}}}),F_e=ye({"src/traces/carpet/calc.js"(e,r){"use strict";var t=qi(),a=Yt().isArray1D,i=__e(),o=x_e(),s=b_e(),l=w_e(),n=A_e(),u=QA(),c=T_e(),f=JA(),h=L_e();r.exports=function(p,g){var m=t.getFromId(p,g.xaxis),y=t.getFromId(p,g.yaxis),_=g.aaxis,v=g.baxis,x=g.x,E=g.y,M=[];x&&a(x)&&M.push("x"),E&&a(E)&&M.push("y"),M.length&&f(g,_,v,"a","b",M);var C=g._a=g._a||g.a,w=g._b=g._b||g.b;x=g._x||g.x,E=g._y||g.y;var k={};if(g._cheater){var T=_.cheatertype==="index"?C.length:C,b=v.cheatertype==="index"?w.length:w;x=i(T,b,g.cheaterslope)}g._x=x=u(x),g._y=E=u(E),c(x,C,w),c(E,C,w),h(g),g.setScale();var S=o(x),A=o(E),F=.5*(S[1]-S[0]),D=.5*(S[1]+S[0]),R=.5*(A[1]-A[0]),P=.5*(A[1]+A[0]),z=1.3;return S=[D-F*z,D+F*z],A=[P-R*z,P+R*z],g._extremes[m._id]=t.findExtremes(m,S,{padded:!0}),g._extremes[y._id]=t.findExtremes(y,A,{padded:!0}),s(g,"a","b"),s(g,"b","a"),l(g,_),l(g,v),k.clipsegments=n(g._xctrl,g._yctrl,_,v),k.x=x,k.y=E,k.a=C,k.b=w,[k]}}}),P_e=ye({"src/traces/carpet/index.js"(e,r){"use strict";r.exports={attributes:F7(),supplyDefaults:m_e(),plot:y_e(),calc:F_e(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Ml(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),I_e=ye({"lib/carpet.js"(e,r){"use strict";r.exports=P_e()}}),gG=ye({"src/traces/scattercarpet/attributes.js"(e,r){"use strict";var t=Up(),a=al(),i=Oo(),{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=Ro(),n=rs(),u=Xi().extendFlat,c=a.marker,f=a.line,h=c.line;r.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:u({},a.mode,{dflt:"markers"}),text:u({},a.text,{}),texttemplate:s({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:l({editType:"plot"}),hovertext:u({},a.hovertext,{}),line:{color:f.color,width:f.width,dash:f.dash,backoff:f.backoff,shape:u({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:a.connectgaps,fill:u({},a.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),marker:u({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,angle:c.angle,angleref:c.angleref,standoff:c.standoff,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:u({width:h.width,dash:h.dash,editType:"calc"},n("marker.line")),gradient:c.gradient,editType:"calc"},n("marker")),textfont:a.textfont,textposition:a.textposition,selected:a.selected,unselected:a.unselected,hoverinfo:u({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:a.hoveron,hovertemplate:o(),hovertemplatefallback:l(),zorder:a.zorder}}}),R_e=ye({"src/traces/scattercarpet/defaults.js"(e,r){"use strict";var t=Yt(),a=jp(),i=ms(),o=kd(),s=ip(),l=_y(),n=np(),u=qp(),c=gG();r.exports=function(h,d,p,g){function m(C,w){return t.coerce(h,d,c,C,w)}m("carpet"),d.xaxis="x",d.yaxis="y";var y=m("a"),_=m("b"),v=Math.min(y.length,_.length);if(!v){d.visible=!1;return}d._length=v,m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext");var x=v0?k=C.labelprefix.replace(/ = $/,""):k=C._hovertitle,v.push(k+": "+w.toFixed(3)+C.labelsuffix)}if(!m.hovertemplate){var E=g.hi||m.hoverinfo,M=E.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&x(y.aaxis,g.a),M.indexOf("b")!==-1&&x(y.baxis,g.b),v.push("y: "+c.yLabel),M.indexOf("text")!==-1&&a(g,m,v),c.extraText=v.join("
")}return u}}}),j_e=ye({"src/traces/scattercarpet/event_data.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){var n=s[l];return a.a=n.a,a.b=n.b,a.y=n.y,a}}}),U_e=ye({"src/traces/scattercarpet/index.js"(e,r){"use strict";r.exports={attributes:gG(),supplyDefaults:R_e(),colorbar:bc(),formatLabels:z_e(),calc:B_e(),plot:O_e(),style:Of().style,styleOnSelect:Of().styleOnSelect,hoverPoints:N_e(),selectPoints:Im(),eventData:j_e(),moduleType:"trace",name:"scattercarpet",basePlotModule:Ml(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),q_e=ye({"lib/scattercarpet.js"(e,r){"use strict";r.exports=U_e()}}),yG=ye({"src/traces/contourcarpet/attributes.js"(e,r){"use strict";var t=My(),a=cb(),i=rs(),o=Xi().extendFlat,s=a.contours;r.exports=o({carpet:{valType:"string",editType:"calc"},z:t.z,a:t.x,a0:t.x0,da:t.dx,b:t.y,b0:t.y0,db:t.dy,text:t.text,hovertext:t.hovertext,transpose:t.transpose,atype:t.xtype,btype:t.ytype,fillcolor:a.fillcolor,autocontour:a.autocontour,ncontours:a.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:a.line.color,width:a.line.width,dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},zorder:a.zorder},i("",{cLetter:"z",autoColorDflt:!1}))}}),_G=ye({"src/traces/contourcarpet/defaults.js"(e,r){"use strict";var t=Yt(),a=KA(),i=yG(),o=cL(),s=fT(),l=hT();r.exports=function(u,c,f,h){function d(y,_){return t.coerce(u,c,i,y,_)}function p(y){return t.coerce2(u,c,i,y)}if(d("carpet"),u.a&&u.b){var g=a(u,c,d,h,"a","b");if(!g){c.visible=!1;return}d("text");var m=d("contours.type")==="constraint";m?o(u,c,d,h,f,{hasHover:!1}):(s(u,c,d,p),l(u,c,d,h,{hasHover:!1}))}else c._defaultColor=f,c._length=null;d("zorder")}}}),V_e=ye({"src/traces/contourcarpet/calc.js"(e,r){"use strict";var t=Nc(),a=Yt(),i=JA(),o=QA(),s=eT(),l=tT(),n=Y9(),u=_G(),c=P7(),f=tL();r.exports=function(p,g){var m=g._carpetTrace=c(p,g);if(!(!m||!m.visible||m.visible==="legendonly")){if(!g.a||!g.b){var y=p.data[m.index],_=p.data[g.index];_.a||(_.a=y.a),_.b||(_.b=y.b),u(_,g,g._defaultColor,p._fullLayout)}var v=h(p,g);return f(g,g._z),v}};function h(d,p){var g=p._carpetTrace,m=g.aaxis,y=g.baxis,_,v,x,E,M,C,w;m._minDtick=0,y._minDtick=0,a.isArray1D(p.z)&&i(p,m,y,"a","b",["z"]),_=p._a=p._a||p.a,E=p._b=p._b||p.b,_=_?m.makeCalcdata(p,"_a"):[],E=E?y.makeCalcdata(p,"_b"):[],v=p.a0||0,x=p.da||1,M=p.b0||0,C=p.db||1,w=p._z=o(p._z||p.z,p.transpose),p._emptypoints=l(w),s(w,p._emptypoints);var k=a.maxRowLength(w),T=p.xtype==="scaled"?"":_,b=n(p,T,v,x,k,m),S=p.ytype==="scaled"?"":E,A=n(p,S,M,C,w.length,y),F={a:b,b:A,z:w};return p.contours.type==="levels"&&p.contours.coloring!=="none"&&t(d,p,{vals:w,containerStr:"",cLetter:"z"}),[F]}}}),G_e=ye({"src/traces/carpet/axis_aligned_line.js"(e,r){"use strict";var t=Yt().isArrayOrTypedArray;r.exports=function(a,i,o,s){var l,n,u,c,f,h,d,p,g,m,y,_,v,x=t(o)?"a":"b",E=x==="a"?a.aaxis:a.baxis,M=E.smoothing,C=x==="a"?a.a2i:a.b2j,w=x==="a"?o:s,k=x==="a"?s:o,T=x==="a"?i.a.length:i.b.length,b=x==="a"?i.b.length:i.a.length,S=Math.floor(x==="a"?a.b2j(k):a.a2i(k)),A=x==="a"?function(X){return a.evalxy([],X,S)}:function(X){return a.evalxy([],S,X)};M&&(u=Math.max(0,Math.min(b-2,S)),c=S-u,n=x==="a"?function(X,Z){return a.dxydi([],X,u,Z,c)}:function(X,Z){return a.dxydj([],u,X,c,Z)});var F=C(w[0]),D=C(w[1]),R=F0?Math.floor:Math.ceil,I=R>0?Math.ceil:Math.floor,L=R>0?Math.min:Math.max,B=R>0?Math.max:Math.min,O=z(F+P),G=I(D-P);d=A(F);var $=[[d]];for(l=O;l*R=0;re--)q=B.clipsegments[re],Y=a([],q.x,F.c2p),K=a([],q.y,D.c2p),Y.reverse(),K.reverse(),se.push(i(Y,K,q.bicubic));var le="M"+se.join("L")+"Z";M(P,B.clipsegments,F,D,Z,N),C(I,P,F,D,j,W,H,L,B,N,le),y(P,X,T,z,$,b,L),o.setClipUrl(P,L._clipPathId,T)})};function m(k,T){var b,S,A,F,D,R,P,z,I;for(b=0;bX&&(S.max=X),S.len=S.max-S.min}function v(k,T,b){var S=k.getPointAtLength(T),A=k.getPointAtLength(b),F=A.x-S.x,D=A.y-S.y,R=Math.sqrt(F*F+D*D);return[F/R,D/R]}function x(k){var T=Math.sqrt(k[0]*k[0]+k[1]*k[1]);return[k[0]/T,k[1]/T]}function E(k,T){var b=Math.abs(k[0]*T[0]+k[1]*T[1]),S=Math.sqrt(1-b*b);return S/b}function M(k,T,b,S,A,F){var D,R,P,z,I=s.ensureSingle(k,"g","contourbg"),L=I.selectAll("path").data(F==="fill"&&!A?[0]:[]);L.enter().append("path"),L.exit().remove();var B=[];for(z=0;z=0&&(O=Y,$=X):Math.abs(B[1]-O[1])=0&&(O=Y,$=X):s.log("endpt to newendpt is not vert. or horz.",B,O,Y)}if($>=0)break;z+=j(B,O),B=O}if($===T.edgepaths.length){s.log("unclosed perimeter path");break}P=$,L=I.indexOf(P)===-1,L&&(P=I[0],z+=j(B,O)+"Z",B=null)}for(P=0;Pw):C=R>A,w=R;var P=m(A,F,D,R);P.pos=S,P.yc=(A+R)/2,P.i=b,P.dir=C?"increasing":"decreasing",P.x=P.pos,P.y=[D,F],k&&(P.orig_p=d[b]),E&&(P.tx=h.text[b]),M&&(P.htx=h.hovertext[b]),T.push(P)}else T.push({pos:S,empty:!0})}return h._extremes[g._id]=i.findExtremes(g,t.concat(v,_),{padded:!0}),T.length&&(T[0].t={labels:{open:a(f,"open:")+" ",high:a(f,"high:")+" ",low:a(f,"low:")+" ",close:a(f,"close:")+" "}}),T}function c(f,h,d){var p=d._minDiff;if(!p){var g=f._fullData,m=[];p=1/0;var y;for(y=0;y"+x.labels[S]+t.hoverLabelText(_,A,v.yhoverformat)):(D=a.extendFlat({},M),D.y0=D.y1=F,D.yLabelVal=A,D.yLabel=x.labels[S]+t.hoverLabelText(_,A,v.yhoverformat),D.name="",E.push(D),T[A]=D)}return E}function h(d,p,g,m){var y=d.cd,_=d.ya,v=y[0].trace,x=y[0].t,E=c(d,p,g,m);if(!E)return[];var M=E.index,C=y[M],w=E.index=C.i,k=C.dir;function T(P){return x.labels[P]+t.hoverLabelText(_,v[P][w],v.yhoverformat)}var b=C.hi||v.hoverinfo||"",S=b.split("+"),A=b==="all",F=A||S.indexOf("y")!==-1,D=A||S.indexOf("text")!==-1,R=F?[T("open"),T("high"),T("low"),T("close")+" "+n[k]]:[];return D&&s(C,v,R),E.extraText=R.join("
"),E.y0=E.y1=_.c2p(C.yc,!0),[E]}r.exports={hoverPoints:u,hoverSplit:f,hoverOnPoints:h}}}),AG=ye({"src/traces/ohlc/select.js"(e,r){"use strict";r.exports=function(a,i){var o=a.cd,s=a.xaxis,l=a.yaxis,n=[],u,c=o[0].t.bPos||0;if(i===!1)for(u=0;up?function(v){return v<=0}:function(v){return v>=0};c.c2g=function(v){var x=c.c2l(v)-d;return(_(x)?x:0)+y},c.g2c=function(v){return c.l2c(v+d-y)},c.g2p=function(v){return v*m},c.c2p=function(v){return c.g2p(c.c2g(v))}}}function l(c,f){return f==="degrees"?i(c):c}function n(c,f){return f==="degrees"?o(c):c}function u(c,f){var h=c.type;if(h==="linear"){var d=c.d2c,p=c.c2d;c.d2c=function(g,m){return l(d(g),m)},c.c2d=function(g,m){return p(n(g,m))}}c.makeCalcdata=function(g,m){var y=g[m],_=g._length,v,x,E=function(T){return c.d2c(T,g.thetaunit)};if(y)for(v=new Array(_),x=0;x<_;x++)v[x]=E(y[x]);else{var M=m+"0",C="d"+m,w=M in g?E(g[M]):0,k=g[C]?E(g[C]):(c.period||2*Math.PI)/_;for(v=new Array(_),x=0;x<_;x++)v[x]=w+x*k}return v},c.setGeometry=function(){var g=f.sector,m=g.map(i),y={clockwise:-1,counterclockwise:1}[c.direction],_=i(c.rotation),v=function(b){return y*b+_},x=function(b){return(b-_)/y},E,M,C,w;switch(h){case"linear":M=E=t.identity,w=i,C=o,c.range=t.isFullCircle(m)?[g[0],g[0]+360]:m.map(x).map(o);break;case"category":var k=c._categories.length,T=c.period?Math.max(c.period,k):k;T===0&&(T=1),M=w=function(b){return b*2*Math.PI/T},E=C=function(b){return b*T/Math.PI/2},c.range=[0,T];break}c.c2g=function(b){return v(M(b))},c.g2c=function(b){return E(x(b))},c.t2g=function(b){return v(w(b))},c.g2t=function(b){return C(x(b))}}}}}),R7=ye({"src/plots/polar/constants.js"(e,r){"use strict";r.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}}}),z7=ye({"src/plots/polar/helpers.js"(e,r){"use strict";var t=Yt(),a=Qx().tester,i=t.findIndexOfMin,o=t.isAngleInsideSector,s=t.angleDelta,l=t.angleDist;function n(x,E,M,C,w){if(!o(E,C))return!1;var k,T;M[0]0?T:1/0},C=i(E,M),w=t.mod(C+1,E.length);return[E[C],E[w]]}function m(x){return Math.abs(x)>1e-10?x:0}function y(x,E,M){E=E||0,M=M||0;for(var C=x.length,w=new Array(C),k=0;k0?1:0}function a(n){var u=n[0],c=n[1];if(!isFinite(u)||!isFinite(c))return[1,0];var f=(u+1)*(u+1)+c*c;return[(u*u+c*c-1)/f,2*c/f]}function i(n,u){var c=u[0],f=u[1];return[c*n.radius+n.cx,-f*n.radius+n.cy]}function o(n,u){return u*n.radius}function s(n,u,c,f){var h=i(n,a([c,u])),d=h[0],p=h[1],g=i(n,a([f,u])),m=g[0],y=g[1];if(u===0)return["M"+d+","+p,"L"+m+","+y].join(" ");var _=o(n,1/Math.abs(u));return["M"+d+","+p,"A"+_+","+_+" 0 0,"+(u<0?1:0)+" "+m+","+y].join(" ")}function l(n,u,c,f){var h=o(n,1/(u+1)),d=i(n,a([u,c])),p=d[0],g=d[1],m=i(n,a([u,f])),y=m[0],_=m[1];if(t(c)!==t(f)){var v=i(n,a([u,0])),x=v[0],E=v[1];return["M"+p+","+g,"A"+h+","+h+" 0 0,"+(0pe?(we=Y,xe=Y*pe,te=(K-xe)/W.h/2,he=[j[0],j[1]],oe=[q[0]+te,q[1]-te]):(we=K/pe,xe=K,te=(Y-we)/W.w/2,he=[j[0]+te,j[1]-te],oe=[q[0],q[1]]),N.xLength2=we,N.yLength2=xe,N.xDomain2=he,N.yDomain2=oe;var ie=N.xOffset2=W.l+W.w*he[0],ee=N.yOffset2=W.t+W.h*(1-oe[1]),ce=N.radius=we/le,_e=N.innerRadius=N.getHole(J)*ce,Se=N.cx=ie-ce*se[0],Me=N.cy=ee+ce*se[3],Ue=N.cxx=Se-ie,Ge=N.cyy=Me-ee,Ze=U.side,Ke;Ze==="counterclockwise"?(Ke=Ze,Ze="top"):Ze==="clockwise"&&(Ke=Ze,Ze="bottom"),N.radialAxis=N.mockAxis(Z,J,U,{_id:"x",side:Ze,_trueSide:Ke,domain:[_e/W.w,ce/W.w]}),N.angularAxis=N.mockAxis(Z,J,V,{side:"right",domain:[0,Math.PI],autorange:!1}),N.doAutoRange(Z,J),N.updateAngularAxis(Z,J),N.updateRadialAxis(Z,J),N.updateRadialAxisTitle(Z,J),N.xaxis=N.mockCartesianAxis(Z,J,{_id:"x",domain:he}),N.yaxis=N.mockCartesianAxis(Z,J,{_id:"y",domain:oe});var dt=N.pathSubplot();N.clipPaths.forTraces.select("path").attr("d",dt).attr("transform",s(Ue,Ge)),H.frontplot.attr("transform",s(ie,ee)).call(n.setClipUrl,N._hasClipOnAxisFalse?null:N.clipIds.forTraces,N.gd),H.bg.attr("d",dt).attr("transform",s(Se,Me)).call(l.fill,J.bgcolor)},B.mockAxis=function(Z,J,N,H){var W=i.extendFlat({},N,H);return h(W,J,Z),W},B.mockCartesianAxis=function(Z,J,N){var H=this,W=H.isSmith,U=N._id,V=i.extendFlat({type:"linear"},N);f(V,Z);var j={x:[0,2],y:[1,3]};return V.setRange=function(){var q=H.sectorBBox,Y=j[U],K=H.radialAxis._rl,re=(K[1]-K[0])/(1-H.getHole(J));V.range=[q[Y[0]]*re,q[Y[1]]*re]},V.isPtWithinRange=U==="x"&&!W?function(q){return H.isPtInside(q)}:function(){return!0},V.setRange(),V.setScale(),V},B.doAutoRange=function(Z,J){var N=this,H=N.gd,W=N.radialAxis,U=N.getRadial(J);d(H,W);var V=W.range;if(U.range=V.slice(),U._input.range=V.slice(),W._rl=[W.r2l(V[0],null,"gregorian"),W.r2l(V[1],null,"gregorian")],W.minallowed!==void 0){var j=W.r2l(W.minallowed);W._rl[0]>W._rl[1]?W._rl[1]=Math.max(W._rl[1],j):W._rl[0]=Math.max(W._rl[0],j)}if(W.maxallowed!==void 0){var q=W.r2l(W.maxallowed);W._rl[0]90&&K<=270&&(re.tickangle=180);var ue=le?function(ce){var _e=D(N,S([ce.x,0]));return s(_e[0]-j,_e[1]-q)}:function(ce){return s(re.l2p(ce.x)+V,0)},fe=le?function(ce){return F(N,ce.x,-1/0,1/0)}:function(ce){return N.pathArc(re.r2p(ce.x)+V)},pe=O(Y);if(N.radialTickLayout!==pe&&(W["radial-axis"].selectAll(".xtick").remove(),N.radialTickLayout=pe),se){re.setScale();var we=0,xe=le?(re.tickvals||[]).filter(function(ce){return ce>=0}).map(function(ce){return c.tickText(re,ce,!0,!1)}):c.calcTicks(re),he=le?xe:c.clipEnds(re,xe),oe=c.getTickSigns(re)[2];le&&((re.ticks==="top"&&re.side==="bottom"||re.ticks==="bottom"&&re.side==="top")&&(oe=-oe),re.ticks==="top"&&re.side==="top"&&(we=-re.ticklen),re.ticks==="bottom"&&re.side==="bottom"&&(we=re.ticklen)),c.drawTicks(H,re,{vals:xe,layer:W["radial-axis"],path:c.makeTickPath(re,0,oe),transFn:ue,crisp:!1}),c.drawGrid(H,re,{vals:he,layer:W["radial-grid"],path:fe,transFn:i.noop,crisp:!1}),c.drawLabels(H,re,{vals:xe,layer:W["radial-axis"],transFn:ue,labelFns:c.makeLabelFns(re,we)})}var te=N.radialAxisAngle=N.vangles?I($(z(Y.angle),N.vangles)):Y.angle,ie=s(j,q),ee=ie+o(-te);X(W["radial-axis"],se&&(Y.showticklabels||Y.ticks),{transform:ee}),X(W["radial-grid"],se&&Y.showgrid,{transform:le?"":ie}),X(W["radial-line"].select("line"),se&&Y.showline,{x1:le?-U:V,y1:0,x2:U,y2:0,transform:ee}).attr("stroke-width",Y.linewidth).call(l.stroke,Y.linecolor)},B.updateRadialAxisTitle=function(Z,J,N){if(!this.isSmith){var H=this,W=H.gd,U=H.radius,V=H.cx,j=H.cy,q=H.getRadial(J),Y=H.id+"title",K=0;if(q.title){var re=n.bBox(H.layers["radial-axis"].node()).height,se=q.title.font.size,le=q.side;K=le==="top"?se:le==="counterclockwise"?-(re+se*.4):re+se*.8}var ue=N!==void 0?N:H.radialAxisAngle,fe=z(ue),pe=Math.cos(fe),we=Math.sin(fe),xe=V+U/2*pe+K*we,he=j-U/2*we+K*pe;H.layers["radial-axis-title"]=y.draw(W,Y,{propContainer:q,propName:H.id+".radialaxis.title.text",placeholder:R(W,"Click to enter radial axis title"),attributes:{x:xe,y:he,"text-anchor":"middle"},transform:{rotate:-ue}})}},B.updateAngularAxis=function(Z,J){var N=this,H=N.gd,W=N.layers,U=N.radius,V=N.innerRadius,j=N.cx,q=N.cy,Y=N.getAngular(J),K=N.angularAxis,re=N.isSmith;re||(N.fillViewInitialKey("angularaxis.rotation",Y.rotation),K.setGeometry(),K.setScale());var se=re?function(_e){var Se=D(N,S([0,_e.x]));return Math.atan2(Se[0]-j,Se[1]-q)-Math.PI/2}:function(_e){return K.t2g(_e.x)};K.type==="linear"&&K.thetaunit==="radians"&&(K.tick0=I(K.tick0),K.dtick=I(K.dtick));var le=function(_e){return s(j+U*Math.cos(_e),q-U*Math.sin(_e))},ue=re?function(_e){var Se=D(N,S([0,_e.x]));return s(Se[0],Se[1])}:function(_e){return le(se(_e))},fe=re?function(_e){var Se=D(N,S([0,_e.x])),Me=Math.atan2(Se[0]-j,Se[1]-q)-Math.PI/2;return s(Se[0],Se[1])+o(-I(Me))}:function(_e){var Se=se(_e);return le(Se)+o(-I(Se))},pe=re?function(_e){return A(N,_e.x,0,1/0)}:function(_e){var Se=se(_e),Me=Math.cos(Se),Ue=Math.sin(Se);return"M"+[j+V*Me,q-V*Ue]+"L"+[j+U*Me,q-U*Ue]},we=c.makeLabelFns(K,0),xe=we.labelStandoff,he={};he.xFn=function(_e){var Se=se(_e);return Math.cos(Se)*xe},he.yFn=function(_e){var Se=se(_e),Me=Math.sin(Se)>0?.2:1;return-Math.sin(Se)*(xe+_e.fontSize*Me)+Math.abs(Math.cos(Se))*(_e.fontSize*w)},he.anchorFn=function(_e){var Se=se(_e),Me=Math.cos(Se);return Math.abs(Me)<.1?"middle":Me>0?"start":"end"},he.heightFn=function(_e,Se,Me){var Ue=se(_e);return-.5*(1+Math.sin(Ue))*Me};var oe=O(Y);N.angularTickLayout!==oe&&(W["angular-axis"].selectAll("."+K._id+"tick").remove(),N.angularTickLayout=oe);var te=re?[1/0].concat(K.tickvals||[]).map(function(_e){return c.tickText(K,_e,!0,!1)}):c.calcTicks(K);re&&(te[0].text="\u221E",te[0].fontSize*=1.75);var ie;if(J.gridshape==="linear"?(ie=te.map(se),i.angleDelta(ie[0],ie[1])<0&&(ie=ie.slice().reverse())):ie=null,N.vangles=ie,K.type==="category"&&(te=te.filter(function(_e){return i.isAngleInsideSector(se(_e),N.sectorInRad)})),K.visible){var ee=K.ticks==="inside"?-1:1,ce=(K.linewidth||1)/2;c.drawTicks(H,K,{vals:te,layer:W["angular-axis"],path:"M"+ee*ce+",0h"+ee*K.ticklen,transFn:fe,crisp:!1}),c.drawGrid(H,K,{vals:te,layer:W["angular-grid"],path:pe,transFn:i.noop,crisp:!1}),c.drawLabels(H,K,{vals:te,layer:W["angular-axis"],repositionOnUpdate:!0,transFn:ue,labelFns:he})}X(W["angular-line"].select("path"),Y.showline,{d:N.pathSubplot(),transform:s(j,q)}).attr("stroke-width",Y.linewidth).call(l.stroke,Y.linecolor)},B.updateFx=function(Z,J){if(!this.gd._context.staticPlot){var N=!this.isSmith;N&&(this.updateAngularDrag(Z),this.updateRadialDrag(Z,J,0),this.updateRadialDrag(Z,J,1)),this.updateHoverAndMainDrag(Z)}},B.updateHoverAndMainDrag=function(Z){var J=this,N=J.isSmith,H=J.gd,W=J.layers,U=Z._zoomlayer,V=k.MINZOOM,j=k.OFFEDGE,q=J.radius,Y=J.innerRadius,K=J.cx,re=J.cy,se=J.cxx,le=J.cyy,ue=J.sectorInRad,fe=J.vangles,pe=J.radialAxis,we=T.clampTiny,xe=T.findXYatLength,he=T.findEnclosingVertexAngles,oe=k.cornerHalfWidth,te=k.cornerLen/2,ie,ee,ce=p.makeDragger(W,"path","maindrag",Z.dragmode===!1?"none":"crosshair");t.select(ce).attr("d",J.pathSubplot()).attr("transform",s(K,re)),ce.onmousemove=function(ct){m.hover(H,ct,J.id),H._fullLayout._lasthover=ce,H._fullLayout._hoversubplot=J.id},ce.onmouseout=function(ct){H._dragging||g.unhover(H,ct)};var _e={element:ce,gd:H,subplot:J.id,plotinfo:{id:J.id,xaxis:J.xaxis,yaxis:J.yaxis},xaxes:[J.xaxis],yaxes:[J.yaxis]},Se,Me,Ue,Ge,Ze,Ke,dt,_t,Pt;function pt(ct,At){return Math.sqrt(ct*ct+At*At)}function Tt(ct,At){return pt(ct-se,At-le)}function st(ct,At){return Math.atan2(le-At,ct-se)}function Ve(ct,At){return[ct*Math.cos(At),ct*Math.sin(-At)]}function Ye(ct,At){if(ct===0)return J.pathSector(2*oe);var ft=te/ct,qt=At-ft,ar=At+ft,vt=Math.max(0,Math.min(ct,q)),gt=vt-oe,St=vt+oe;return"M"+Ve(gt,qt)+"A"+[gt,gt]+" 0,0,0 "+Ve(gt,ar)+"L"+Ve(St,ar)+"A"+[St,St]+" 0,0,1 "+Ve(St,qt)+"Z"}function me(ct,At,ft){if(ct===0)return J.pathSector(2*oe);var qt=Ve(ct,At),ar=Ve(ct,ft),vt=we((qt[0]+ar[0])/2),gt=we((qt[1]+ar[1])/2),St,Dt;if(vt&>){var kt=gt/vt,Vt=-1/kt,lr=xe(oe,kt,vt,gt);St=xe(te,Vt,lr[0][0],lr[0][1]),Dt=xe(te,Vt,lr[1][0],lr[1][1])}else{var dr,yr;gt?(dr=te,yr=oe):(dr=oe,yr=te),St=[[vt-dr,gt-yr],[vt+dr,gt-yr]],Dt=[[vt-dr,gt+yr],[vt+dr,gt+yr]]}return"M"+St.join("L")+"L"+Dt.reverse().join("L")+"Z"}function be(){Ue=null,Ge=null,Ze=J.pathSubplot(),Ke=!1;var ct=H._fullLayout[J.id];dt=l.luminosity(ct.bgcolor),_t=p.makeZoombox(U,dt,K,re,Ze),_t.attr("fill-rule","evenodd"),Pt=p.makeCorners(U,K,re),x(H)}function Ee(ct,At){return At=Math.max(Math.min(At,q),Y),ctV?(ct-1&&ct===1&&v(At,H,[J.xaxis],[J.yaxis],J.id,_e),ft.indexOf("event")>-1&&m.click(H,At,J.id)}_e.prepFn=function(ct,At,ft){var qt=H._fullLayout.dragmode,ar=ce.getBoundingClientRect();H._fullLayout._calcInverseTransform(H);var vt=H._fullLayout._invTransform;ie=H._fullLayout._invScaleX,ee=H._fullLayout._invScaleY;var gt=i.apply3DTransform(vt)(At-ar.left,ft-ar.top);if(Se=gt[0],Me=gt[1],fe){var St=T.findPolygonOffset(q,ue[0],ue[1],fe);Se+=se+St[0],Me+=le+St[1]}switch(qt){case"zoom":_e.clickFn=tt,N||(fe?_e.moveFn=Je:_e.moveFn=Ce,_e.doneFn=qe,be(ct,At,ft));break;case"select":case"lasso":_(ct,At,ft,_e,qt);break}},g.init(_e)},B.updateRadialDrag=function(Z,J,N){var H=this,W=H.gd,U=H.layers,V=H.radius,j=H.innerRadius,q=H.cx,Y=H.cy,K=H.radialAxis,re=k.radialDragBoxSize,se=re/2;if(!K.visible)return;var le=z(H.radialAxisAngle),ue=K._rl,fe=ue[0],pe=ue[1],we=ue[N],xe=.75*(ue[1]-ue[0])/(1-H.getHole(J))/V,he,oe,te;N?(he=q+(V+se)*Math.cos(le),oe=Y-(V+se)*Math.sin(le),te="radialdrag"):(he=q+(j-se)*Math.cos(le),oe=Y-(j-se)*Math.sin(le),te="radialdrag-inner");var ie=p.makeRectDragger(U,te,"crosshair",-se,-se,re,re),ee={element:ie,gd:W};Z.dragmode===!1&&(ee.dragmode=!1),X(t.select(ie),K.visible&&j0!=(N?Se>fe:Se=90||W>90&&U>=450?le=1:j<=0&&Y<=0?le=0:le=Math.max(j,Y),W<=180&&U>=180||W>180&&U>=540?K=-1:V>=0&&q>=0?K=0:K=Math.min(V,q),W<=270&&U>=270||W>270&&U>=630?re=-1:j>=0&&Y>=0?re=0:re=Math.min(j,Y),U>=360?se=1:V<=0&&q<=0?se=0:se=Math.max(V,q),[K,re,se,le]}function $(Z,J){var N=function(W){return i.angleDist(Z,W)},H=i.findIndexOfMin(J,N);return J[H]}function X(Z,J,N){return J?(Z.attr("display",null),Z.attr(N)):Z&&Z.attr("display","none"),Z}}}),kG=ye({"src/plots/polar/layout_attributes.js"(e,r){"use strict";var t=Wl(),a=Gu(),i=Ds().attributes,o=Yt().extendFlat,s=Cs().overrideAll,l=s({color:a.color,showline:o({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:o({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth,griddash:a.griddash},"plot","from-root"),n=s({tickmode:a.minor.tickmode,nticks:a.nticks,tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,ticklabelstep:a.ticklabelstep,showticklabels:a.showticklabels,labelalias:a.labelalias,minorloglabels:a.minorloglabels,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,minexponent:a.minexponent,separatethousands:a.separatethousands,tickfont:a.tickfont,tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,layer:a.layer},"plot","from-root"),u={visible:o({},a.visible,{dflt:!0}),type:o({},a.type,{values:["-","linear","log","date","category"]}),autotypenumbers:a.autotypenumbers,autorangeoptions:{minallowed:a.autorangeoptions.minallowed,maxallowed:a.autorangeoptions.maxallowed,clipmin:a.autorangeoptions.clipmin,clipmax:a.autorangeoptions.clipmax,include:a.autorangeoptions.include,editType:"plot"},autorange:o({},a.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:o({},a.minallowed,{editType:"plot"}),maxallowed:o({},a.maxallowed,{editType:"plot"}),range:o({},a.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:a.categoryorder,categoryarray:a.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:a.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:o({},a.title.text,{editType:"plot",dflt:""}),font:o({},a.title.font,{editType:"plot"}),editType:"plot"},hoverformat:a.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};o(u,l,n);var c={visible:o({},a.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:a.autotypenumbers,categoryorder:a.categoryorder,categoryarray:a.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:a.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};o(c,l,n),r.exports={domain:i({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:t.background},radialaxis:u,angularaxis:c,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),axe=ye({"src/plots/polar/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=ko(),o=zm(),s=_c().getSubplotData,l=km(),n=my(),u=Av(),c=Tv(),f=zA(),h=rb(),d=ZD(),p=gy(),g=kG(),m=MG(),y=R7(),_=y.axisNames;function v(E,M,C,w){var k=C("bgcolor");w.bgColor=a.combine(k,w.paper_bgcolor);var T=C("sector");C("hole");var b=s(w.fullData,y.name,w.id),S=w.layoutOut,A;function F(se,le){return C(A+"."+se,le)}for(var D=0;D<_.length;D++){A=_[D],t.isPlainObject(E[A])||(E[A]={});var R=E[A],P=i.newContainer(M,A);P._id=P._name=A,P._attr=w.id+"."+A,P._traceIndices=b.map(function(se){return se.index});var z=y.axisName2dataArray[A],I=x(R,P,F,b,z,w);f(R,P,F,{axData:b,dataAttr:z});var L=F("visible");switch(m(P,M,S),F("uirevision",M.uirevision),P._m=1,A){case"radialaxis":F("minallowed"),F("maxallowed");var B=F("range"),O=P.getAutorangeDflt(B),G=F("autorange",O),$;B&&(B[0]===null&&B[1]===null||(B[0]===null||B[1]===null)&&(G==="reversed"||G===!0)||B[0]!==null&&(G==="min"||G==="max reversed")||B[1]!==null&&(G==="max"||G==="min reversed"))&&(B=void 0,delete P.range,P.autorange=!0,$=!0),$||(O=P.getAutorangeDflt(B),G=F("autorange",O)),R.autorange=G,G&&(d(F,G,B),(I==="linear"||I==="-")&&F("rangemode"),P.isReversed()&&(P._m=-1)),P.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(I==="date"){t.log("Polar plots do not support date angular axes yet.");for(var X=0;X")}}r.exports={hoverPoints:a,makeHoverPointText:i}}}),oxe=ye({"src/traces/scatterpolar/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:B7(),categories:["polar","symbols","showLegend","scatter-like"],attributes:p4(),supplyDefaults:O7().supplyDefaults,colorbar:bc(),formatLabels:N7(),calc:ixe(),plot:nxe(),style:Of().style,styleOnSelect:Of().styleOnSelect,hoverPoints:j7().hoverPoints,selectPoints:Im(),meta:{}}}}),sxe=ye({"lib/scatterpolar.js"(e,r){"use strict";r.exports=oxe()}}),CG=ye({"src/traces/scatterpolargl/attributes.js"(e,r){"use strict";var t=p4(),{cliponaxis:a,hoveron:i}=t,o=Rn(t,["cliponaxis","hoveron"]),{connectgaps:s,line:{color:l,dash:n,width:u},fill:c,fillcolor:f,marker:h,textfont:d,textposition:p}=jb();r.exports=Ci(ja({},o),{connectgaps:s,fill:c,fillcolor:f,line:{color:l,dash:n,editType:"calc",width:u},marker:h,textfont:d,textposition:p})}}),lxe=ye({"src/traces/scatterpolargl/defaults.js"(e,r){"use strict";var t=Yt(),a=ms(),i=O7().handleRThetaDefaults,o=kd(),s=ip(),l=np(),n=qp(),u=jp().PTS_LINESONLY,c=CG();r.exports=function(h,d,p,g){function m(_,v){return t.coerce(h,d,c,_,v)}var y=i(h,d,g,m);if(!y){d.visible=!1;return}m("thetaunit"),m("mode",y=n&&(w.marker.cluster=x.tree),w.marker&&(w.markerSel.positions=w.markerUnsel.positions=w.marker.positions=S),w.line&&S.length>1&&l.extendFlat(w.line,s.linePositions(f,v,S)),w.text&&(l.extendFlat(w.text,{positions:S},s.textPosition(f,v,w.text,w.marker)),l.extendFlat(w.textSel,{positions:S},s.textPosition(f,v,w.text,w.markerSel)),l.extendFlat(w.textUnsel,{positions:S},s.textPosition(f,v,w.text,w.markerUnsel))),w.fill&&!m.fill2d&&(m.fill2d=!0),w.marker&&!m.scatter2d&&(m.scatter2d=!0),w.line&&!m.line2d&&(m.line2d=!0),w.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(w.line),m.fillOptions.push(w.fill),m.markerOptions.push(w.marker),m.markerSelectedOptions.push(w.markerSel),m.markerUnselectedOptions.push(w.markerUnsel),m.textOptions.push(w.text),m.textSelectedOptions.push(w.textSel),m.textUnselectedOptions.push(w.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),x.x=A,x.y=F,x.rawx=A,x.rawy=F,x.r=M,x.theta=C,x.positions=S,x._scene=m,x.index=m.count,m.count++}}),i(f,h,d)}},r.exports.reglPrecompiled=u}}),pxe=ye({"src/traces/scatterpolargl/index.js"(e,r){"use strict";var t=hxe();t.plot=dxe(),r.exports=t}}),vxe=ye({"lib/scatterpolargl.js"(e,r){"use strict";r.exports=pxe()}}),DG=ye({"src/traces/barpolar/attributes.js"(e,r){"use strict";var{hovertemplateAttrs:t,templatefallbackAttrs:a}=Ro(),i=Xi().extendFlat,o=p4(),s=Gp();r.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:i({},s.base,{}),offset:i({},s.offset,{}),width:i({},s.width,{}),text:i({},s.text,{}),hovertext:i({},s.hovertext,{}),marker:l(),hoverinfo:o.hoverinfo,hovertemplate:t(),hovertemplatefallback:a(),selected:s.selected,unselected:s.unselected};function l(){var n=i({},s.marker);return delete n.cornerradius,n}}}),LG=ye({"src/traces/barpolar/layout_attributes.js"(e,r){"use strict";r.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),mxe=ye({"src/traces/barpolar/defaults.js"(e,r){"use strict";var t=Yt(),a=O7().handleRThetaDefaults,i=HA(),o=DG();r.exports=function(l,n,u,c){function f(d,p){return t.coerce(l,n,o,d,p)}var h=a(l,n,c,f);if(!h){n.visible=!1;return}f("thetaunit"),f("base"),f("offset"),f("width"),f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),i(l,n,f,u,c),t.coerceSelectionMarkerOpacity(n,f)}}}),gxe=ye({"src/traces/barpolar/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=LG();r.exports=function(i,o,s){var l={},n;function u(h,d){return t.coerce(i[n]||{},o[n],a,h,d)}for(var c=0;c0?(g=d,m=p):(g=p,m=d);var y=s.findEnclosingVertexAngles(g,n.vangles)[0],_=s.findEnclosingVertexAngles(m,n.vangles)[1],v=[y,(g+m)/2,_];return s.pathPolygonAnnulus(f,h,g,m,v,u,c)}:function(f,h,d,p){return i.pathAnnulus(f,h,d,p,u,c)}}}}),_xe=ye({"src/traces/barpolar/hover.js"(e,r){"use strict";var t=Hs(),a=Yt(),i=Ay().getTraceColor,o=a.fillText,s=j7().makeHoverPointText,l=z7().isPtInsidePolygon;r.exports=function(u,c,f){var h=u.cd,d=h[0].trace,p=u.subplot,g=p.radialAxis,m=p.angularAxis,y=p.vangles,_=y?l:a.isPtInsideSector,v=u.maxHoverDistance,x=m._period||2*Math.PI,E=Math.abs(g.g2p(Math.sqrt(c*c+f*f))),M=Math.atan2(f,c);g.range[0]>g.range[1]&&(M+=Math.PI);var C=function(b){return _(E,M,[b.rp0,b.rp1],[b.thetag0,b.thetag1],y)?v+Math.min(1,Math.abs(b.thetag1-b.thetag0)/x)-1+(b.rp1-E)/(b.rp1-b.rp0)-1:1/0};if(t.getClosest(h,C,u),u.index!==!1){var w=u.index,k=h[w];u.x0=u.x1=k.ct[0],u.y0=u.y1=k.ct[1];var T=a.extendFlat({},k,{r:k.s,theta:k.p});return o(k,d,u),s(T,d,p,u),u.hovertemplate=d.hovertemplate,u.color=i(d,k),u.xLabelVal=u.yLabelVal=void 0,k.s<0&&(u.idealAlign="left"),[u]}}}}),xxe=ye({"src/traces/barpolar/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"barpolar",basePlotModule:B7(),categories:["polar","bar","showLegend"],attributes:DG(),layoutAttributes:LG(),supplyDefaults:mxe(),supplyLayoutDefaults:gxe(),calc:FG().calc,crossTraceCalc:FG().crossTraceCalc,plot:yxe(),colorbar:bc(),formatLabels:N7(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:_xe(),selectPoints:Ty(),meta:{}}}}),bxe=ye({"lib/barpolar.js"(e,r){"use strict";r.exports=xxe()}}),PG=ye({"src/plots/smith/constants.js"(e,r){"use strict";r.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),IG=ye({"src/plots/smith/layout_attributes.js"(e,r){"use strict";var t=Wl(),a=Gu(),i=Ds().attributes,o=Yt().extendFlat,s=Cs().overrideAll,l=s({color:a.color,showline:o({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:o({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth,griddash:a.griddash},"plot","from-root"),n=s({ticklen:a.ticklen,tickwidth:o({},a.tickwidth,{dflt:2}),tickcolor:a.tickcolor,showticklabels:a.showticklabels,labelalias:a.labelalias,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,tickfont:a.tickfont,tickformat:a.tickformat,hoverformat:a.hoverformat,layer:a.layer},"plot","from-root"),u=o({visible:o({},a.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:o({},a.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},l,n),c=o({visible:o({},a.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:a.ticks,editType:"calc"},l,n);r.exports={domain:i({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:t.background},realaxis:u,imaginaryaxis:c,editType:"calc"}}}),wxe=ye({"src/plots/smith/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=ko(),o=zm(),s=_c().getSubplotData,l=Tv(),n=Av(),u=rb(),c=Op(),f=IG(),h=PG(),d=h.axisNames,p=m(function(y){return t.isTypedArray(y)&&(y=Array.from(y)),y.slice().reverse().map(function(_){return-_}).concat([0]).concat(y)},String);function g(y,_,v,x){var E=v("bgcolor");x.bgColor=a.combine(E,x.paper_bgcolor);var M=s(x.fullData,h.name,x.id),C=x.layoutOut,w;function k(O,G){return v(w+"."+O,G)}for(var T=0;T")}}r.exports={hoverPoints:a,makeHoverPointText:i}}}),Cxe=ye({"src/traces/scattersmith/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"scattersmith",basePlotModule:Axe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:RG(),supplyDefaults:Txe(),colorbar:bc(),formatLabels:Mxe(),calc:Exe(),plot:Sxe(),style:Of().style,styleOnSelect:Of().styleOnSelect,hoverPoints:kxe().hoverPoints,selectPoints:Im(),meta:{}}}}),Dxe=ye({"lib/scattersmith.js"(e,r){"use strict";r.exports=Cxe()}}),zG=ye({"src/traces/quiver/attributes.js"(e,r){"use strict";var t=Oo(),a=Ro().hovertemplateAttrs,i=zs().axisHoverFormat,o=Xi().extendFlat,s=rs(),l=Eu().dash,n=kv(),u=al(),c={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:u.x0,dx:u.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:u.y0,dy:u.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:i("x"),yhoverformat:i("y"),uhoverformat:i("u","noDate"),vhoverformat:i("v","noDate"),hoverinfo:o({},t.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:a({},{keys:["x","y","u","v","text","name"]}),text:u.text,textposition:u.textposition,textfont:u.textfont,marker:o({arrowsize:o({},n.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:l,editType:"style"},editType:"calc"},s("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};r.exports=c}}),Lxe=ye({"src/traces/quiver/defaults.js"(e,r){"use strict";var t=Yt(),a=zG(),i=Lm(),o=xc().hasColorscale,s=Su();r.exports=function(n,u,c,f){function h(E,M){return t.coerce(n,u,a,E,M)}var d=i(n,u,f,h);if(!d){u.visible=!1;return}var p=h("u"),g=h("v");if(!t.isArrayOrTypedArray(p)||p.length===0){u.u=new Array(d);for(var m=0;mR&&(R=p[$]),g[$]z&&(z=g[$]),NL&&(L=N),HO&&(O=H);var W=Math.sqrt(N*N+H*H);if(W>v&&(v=W),W<_&&(_=W),C){var U=M[$];X.mc=U,i(U)&&(UE&&(E=U))}}else X.x=o,X.y=o}if(f._maxNorm=v,b==="scaled"||S==="paper"){let ue=R-D,fe=z-P;var V;ue===0&&fe===0?V=1:V=(ue+fe+Math.sqrt((ue-fe)*(ue-fe)+4*G*ue*fe))/(2*(G-1)),V*=n,f._scaleFactor=V/f._maxNorm}else f._scaleFactor=1;f._scaleFactor*=f.lengthfactor;let j=new Array(m),q=new Array(m),Y=new Array(m),K=new Array(m);for(var re,se,$=0;$g.i&&isFinite(m[g.i]))y=m[g.i];else{var _=h.u&&h.u[g.i]||0,v=h.v&&h.v[g.i]||0;y=Math.sqrt(_*_+v*v)}return g.mcc=p(y),g.mcc})}function n(f){var h=t.select(f).selectAll("g.trace.quiver");h.each(function(d){c(f,d,t.select(this))})}function u(f,h,d){c(f,h,d)}function c(f,h,d){var p=h[0].trace,g=p.marker||{},m=g.line||{},y=a.isArrayOrTypedArray(g.color)?void 0:g.color,_=p._hasColorscale;if(d)if(p.selectedpoints){var v=(p.selected||{}).marker||{},x=(p.unselected||{}).marker||{},E=v.line||{},M=x.line||{};d.selectAll("path.js-line").each(function(w){var k=t.select(this),T=!w.selected,b=T?x.color:v.color,S=T?M.width!==void 0?M.width:m.width:E.width!==void 0?E.width:m.width;b?(i.lineGroupStyle(k,S,b,m.dash),k.style("stroke-opacity",1)):(i.lineGroupStyle(k,S,y,m.dash),_&&l(k,p),k.style("stroke-opacity",T?s:1))}),i.selectedTextStyle(d.selectAll("text"),p)}else{var C=d.selectAll("path.js-line");C.call(i.lineGroupStyle,m.width,y,m.dash),_&&l(C,p),C.style("stroke-opacity",1),i.textPointStyle(d.selectAll("text"),p,f)}}r.exports={style:n,styleOnSelect:u,colorscaleStroke:l}}}),Ixe=ye({"src/traces/quiver/plot.js"(e,r){"use strict";var t=ai(),a=Yt(),i=$i(),o=U7().colorscaleStroke,s=Math.PI/12,l=5.8,n=1.5,u=.7;r.exports=function(h,d,p,g,m,y){var _,v,x=!m,E=!!m&&m.duration>0;if(_=g.selectAll("g.trace").data(p,function(C){return C[0].trace.uid}),_.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),_.order(),E){y&&(v=y());var M=t.transition().duration(m.duration).ease(m.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()});M.each(function(){g.selectAll("g.trace").each(function(C,w){c(h,w,d,C,p,this,m)})})}else _.each(function(C,w){c(h,w,d,C,p,this,m)});x&&_.exit().remove()};function c(f,h,d,p,g,m,y){var _=p[0].trace,v=d.xaxis,x=d.yaxis;p[0][d.isRangePlot?"nodeRangePlot3":"node3"]=t.select(m);var E=t.select(m).selectAll("g.lines").data([p]);E.enter().append("g").classed("lines",!0),i.setClipUrl(E,d.layerClipId,f);var M=E.selectAll("path.js-line").data(p);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:w=0,arrowref:k}=_,T=k==="paper"?_._scaleFactor*Math.sqrt(Math.abs(v._m*x._m)):_._scaleFactor,b=_.marker.arrowsize;M.each(function(z){let I=t.select(this);if(z.x===void 0||z.y===void 0){I.attr("d",null);return}let L=(k==="paper"?z._u*Math.sign(v._m):t.round(v._m*z._u))*T,B=(k==="paper"?z._v*Math.sign(x._m):t.round(x._m*z._v))*T,O=(_._input.marker||{}).arrowsize!==void 0;var G,$,X,Z;C==="tip"?(G=v.c2p(z.x)-L,X=x.c2p(z.y)-B,$=v.c2p(z.x),Z=x.c2p(z.y)):C==="center"?(G=v.c2p(z.x)-L/2,X=x.c2p(z.y)-B/2,$=v.c2p(z.x)+L/2,Z=x.c2p(z.y)+B/2):(G=v.c2p(z.x),X=x.c2p(z.y),$=v.c2p(z.x)+L,Z=x.c2p(z.y)+B),z._px0=G,z._py0=X,z._px1=$,z._py1=Z;var J=_.marker.line.width;O||(J=Math.max(J,n));let N=Math.sqrt(($-G)*($-G)+(Z-X)*(Z-X)),H=u*N,W=Math.min(l*b*J,H),U=Math.atan2(Z-X,$-G),V=$-W*Math.cos(U-s),j=Z-W*Math.sin(U-s),q=$-W*Math.cos(U+s),Y=Z-W*Math.sin(U+s),K="M"+G+","+X+"L"+$+","+Z+"L"+V+","+j+"L"+$+","+Z+"L"+q+","+Y;I.attr("d",K)});var S=_.marker||{},A=S.line||{},F=a.isArrayOrTypedArray(S.color)?void 0:S.color;i.lineGroupStyle(M,A.width,F,A.dash),_._hasColorscale&&o(M,_);var D=t.select(m).selectAll("g.text").data([p]);D.enter().append("g").classed("text",!0),i.setClipUrl(D,d.layerClipId,f);var R=D.selectAll("g.textpoint").data(p);if(R.enter().append("g").classed("textpoint",!0).append("text"),R.exit().remove(),R.each(function(z){var I=t.select(this),L=i.translatePoint(z,I.select("text"),v,x);L||I.remove()}),R.selectAll("text").call(i.textPointStyle,_,f).each(function(z){var I=v.c2p(z.x),L=x.c2p(z.y);t.select(this).selectAll("tspan.line").each(function(){t.select(this).attr({x:I,y:L})})}),y&&y.duration>0){var P=t.transition().duration(y.duration).ease(y.easing);M.transition(P).style("opacity",1)}}}}),Rxe=ye({"src/traces/quiver/hover.js"(e,r){"use strict";var t=Yt(),a=Hs(),i=by();function o(s,l,n,u,c,f){let h=c-n,d=f-u,p=h*h+d*d;if(!p)return Math.sqrt((s-n)*(s-n)+(l-u)*(l-u));var g=((s-n)*h+(l-u)*d)/p;g=Math.max(0,Math.min(1,g));let m=n+g*h,y=u+g*d;return Math.sqrt((s-m)*(s-m)+(l-y)*(l-y))}r.exports=function(l,n,u,c){var f=l.cd,h=f[0].trace,d=l.xa,p=l.ya,g=d.c2p(n),m=p.c2p(u),y=function(k){return k._px0===void 0?1/0:o(g,m,k._px0,k._py0,k._px1,k._py1)};if(a.getClosest(f,y,l),l.index!==!1){var _=f[l.index],v=d.c2p(_.x,!0),x=p.c2p(_.y,!0),E=Math.sqrt((g-v)*(g-v)+(m-x)*(m-x));l.index=_.i;var M=h.u?h.u[_.i]:0,C=h.v?h.v[_.i]:0,w="u: "+M+", v: "+C;return t.extendFlat(l,{color:i(h,_),x0:v-3,x1:v+3,xLabelVal:_.x,y0:x-3,y1:x+3,yLabelVal:_.y,uLabelVal:M,vLabelVal:C,extraText:w,spikeDistance:E,hovertemplate:h.hovertemplate}),t.fillText(_,h,l),[l]}}}}),zxe=ye({"src/traces/quiver/format_labels.js"(e,r){"use strict";var t=qi(),a=Yt();r.exports=function(o,s,l){var n={},u={_fullLayout:l},c=t.getFromTrace(u,s,"x"),f=t.getFromTrace(u,s,"y"),h=o.x,d=o.y;n.xLabel=t.tickText(c,c.c2l(h),!0).text,n.yLabel=t.tickText(f,f.c2l(d),!0).text;var p=s.u?s.u[o.i]:0,g=s.v?s.v[o.i]:0,m=s.uhoverformat,y=s.vhoverformat;return n.uLabel=m?a.numberFormat(m)(p):String(p),n.vLabel=y?a.numberFormat(y)(g):String(g),n}}}),Bxe=ye({"src/traces/quiver/event_data.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){return a.x=i.x,a.y=i.y,a.u=o.u?o.u[l]:void 0,a.v=o.v?o.v[l]:void 0,a}}}),Oxe=ye({"src/traces/quiver/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"quiver",basePlotModule:Ml(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:zG(),supplyDefaults:Lxe(),calc:Fxe(),crossTraceCalc:Pxe(),plot:Ixe(),style:U7().style,styleOnSelect:U7().styleOnSelect,hoverPoints:Rxe(),formatLabels:zxe(),eventData:Bxe(),selectPoints:Im(),colorbar:bc(),animatable:!0,meta:{}}}}),Nxe=ye({"lib/quiver.js"(e,r){"use strict";r.exports=Oxe()}}),Wc=ye({"node_modules/world-calendars/dist/main.js"(e,r){var t=ku();function a(){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={}}t(a.prototype,{instance:function(u,c){u=(u||"gregorian").toLowerCase(),c=c||"";var f=this._localCals[u+"-"+c];if(!f&&this.calendars[u]&&(f=new this.calendars[u](c),this._localCals[u+"-"+c]=f),!f)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,u);return f},newDate:function(u,c,f,h,d){return h=(u!=null&&u.year?u.calendar():typeof h=="string"?this.instance(h,d):h)||this.instance(),h.newDate(u,c,f)},substituteDigits:function(u){return function(c){return(c+"").replace(/[0-9]/g,function(f){return u[f]})}},substituteChineseDigits:function(u,c){return function(f){for(var h="",d=0;f>0;){var p=f%10;h=(p===0?"":u[p]+c[d])+h,d++,f=Math.floor(f/10)}return h.indexOf(u[1]+c[1])===0&&(h=h.substr(1)),h||u[0]}}});function i(u,c,f,h){if(this._calendar=u,this._year=c,this._month=f,this._day=h,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(n.local.invalidDate||n.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(u,c){return u=""+u,"000000".substring(0,c-u.length)+u}t(i.prototype,{newDate:function(u,c,f){return this._calendar.newDate(u??this,c,f)},year:function(u){return arguments.length===0?this._year:this.set(u,"y")},month:function(u){return arguments.length===0?this._month:this.set(u,"m")},day:function(u){return arguments.length===0?this._day:this.set(u,"d")},date:function(u,c,f){if(!this._calendar.isValid(u,c,f))throw(n.local.invalidDate||n.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=u,this._month=c,this._day=f,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(u,c){return this._calendar.add(this,u,c)},set:function(u,c){return this._calendar.set(this,u,c)},compareTo:function(u){if(this._calendar.name!==u._calendar.name)throw(n.local.differentCalendars||n.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,u._calendar.local.name);var c=this._year!==u._year?this._year-u._year:this._month!==u._month?this.monthOfYear()-u.monthOfYear():this._day-u._day;return c===0?0:c<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(u){return this._calendar.fromJD(u)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(u){return this._calendar.fromJSDate(u)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}});function s(){this.shortYearCutoff="+10"}t(s.prototype,{_validateLevel:0,newDate:function(u,c,f){return u==null?this.today():(u.year&&(this._validate(u,c,f,n.local.invalidDate||n.regionalOptions[""].invalidDate),f=u.day(),c=u.month(),u=u.year()),new i(this,u,c,f))},today:function(){return this.fromJSDate(new Date)},epoch:function(u){var c=this._validate(u,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return c.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(u){var c=this._validate(u,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return(c.year()<0?"-":"")+o(Math.abs(c.year()),4)},monthsInYear:function(u){return this._validate(u,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),12},monthOfYear:function(u,c){var f=this._validate(u,c,this.minDay,n.local.invalidMonth||n.regionalOptions[""].invalidMonth);return(f.month()+this.monthsInYear(f)-this.firstMonth)%this.monthsInYear(f)+this.minMonth},fromMonthOfYear:function(u,c){var f=(c+this.firstMonth-2*this.minMonth)%this.monthsInYear(u)+this.minMonth;return this._validate(u,f,this.minDay,n.local.invalidMonth||n.regionalOptions[""].invalidMonth),f},daysInYear:function(u){var c=this._validate(u,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return this.leapYear(c)?366:365},dayOfYear:function(u,c,f){var h=this._validate(u,c,f,n.local.invalidDate||n.regionalOptions[""].invalidDate);return h.toJD()-this.newDate(h.year(),this.fromMonthOfYear(h.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(u,c,f){var h=this._validate(u,c,f,n.local.invalidDate||n.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(h))+2)%this.daysInWeek()},extraInfo:function(u,c,f){return this._validate(u,c,f,n.local.invalidDate||n.regionalOptions[""].invalidDate),{}},add:function(u,c,f){return this._validate(u,this.minMonth,this.minDay,n.local.invalidDate||n.regionalOptions[""].invalidDate),this._correctAdd(u,this._add(u,c,f),c,f)},_add:function(u,c,f){if(this._validateLevel++,f==="d"||f==="w"){var h=u.toJD()+c*(f==="w"?this.daysInWeek():1),d=u.calendar().fromJD(h);return this._validateLevel--,[d.year(),d.month(),d.day()]}try{var p=u.year()+(f==="y"?c:0),g=u.monthOfYear()+(f==="m"?c:0),d=u.day(),m=function(v){for(;gx-1+v.minMonth;)p++,g-=x,x=v.monthsInYear(p)};f==="y"?(u.month()!==this.fromMonthOfYear(p,g)&&(g=this.newDate(p,u.month(),this.minDay).monthOfYear()),g=Math.min(g,this.monthsInYear(p)),d=Math.min(d,this.daysInMonth(p,this.fromMonthOfYear(p,g)))):f==="m"&&(m(this),d=Math.min(d,this.daysInMonth(p,this.fromMonthOfYear(p,g))));var y=[p,this.fromMonthOfYear(p,g),d];return this._validateLevel--,y}catch(_){throw this._validateLevel--,_}},_correctAdd:function(u,c,f,h){if(!this.hasYearZero&&(h==="y"||h==="m")&&(c[0]===0||u.year()>0!=c[0]>0)){var d={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[h],p=f<0?-1:1;c=this._add(u,f*d[0]+p*d[1],d[2])}return u.date(c[0],c[1],c[2])},set:function(u,c,f){this._validate(u,this.minMonth,this.minDay,n.local.invalidDate||n.regionalOptions[""].invalidDate);var h=f==="y"?c:u.year(),d=f==="m"?c:u.month(),p=f==="d"?c:u.day();return(f==="y"||f==="m")&&(p=Math.min(p,this.daysInMonth(h,d))),u.date(h,d,p)},isValid:function(u,c,f){this._validateLevel++;var h=this.hasYearZero||u!==0;if(h){var d=this.newDate(u,c,this.minDay);h=c>=this.minMonth&&c-this.minMonth=this.minDay&&f-this.minDay13.5?13:1),_=d-(y>2.5?4716:4715);return _<=0&&_--,this.newDate(_,y,m)},toJSDate:function(u,c,f){var h=this._validate(u,c,f,n.local.invalidDate||n.regionalOptions[""].invalidDate),d=new Date(h.year(),h.month()-1,h.day());return d.setHours(0),d.setMinutes(0),d.setSeconds(0),d.setMilliseconds(0),d.setHours(d.getHours()>12?d.getHours()+2:0),d},fromJSDate:function(u){return this.newDate(u.getFullYear(),u.getMonth()+1,u.getDate())}});var n=r.exports=new a;n.cdate=i,n.baseCalendar=s,n.calendars.gregorian=l}}),jxe=ye({"node_modules/world-calendars/dist/plus.js"(){var e=ku(),r=Wc();e(r.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"}),r.local=r.regionalOptions[""],e(r.cdate.prototype,{formatDate:function(t,a){return typeof t!="string"&&(a=t,t=""),this._calendar.formatDate(t||"",this,a)}}),e(r.baseCalendar.prototype,{UNIX_EPOCH:r.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:r.instance().jdEpoch,TICKS_PER_DAY:1440*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(t,a,i){if(typeof t!="string"&&(i=a,a=t,t=""),!a)return"";if(a.calendar()!==this)throw r.local.invalidFormat||r.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat,i=i||{};for(var o=i.dayNamesShort||this.local.dayNamesShort,s=i.dayNames||this.local.dayNames,l=i.monthNumbers||this.local.monthNumbers,n=i.monthNamesShort||this.local.monthNamesShort,u=i.monthNames||this.local.monthNames,c=i.calculateWeek||this.local.calculateWeek,f=function(M,C){for(var w=1;E+w1},h=function(M,C,w,k){var T=""+C;if(f(M,k))for(;T.length1},x=function(F,D){var R=v(F,D),P=[2,3,R?4:2,R?4:2,10,11,20]["oyYJ@!".indexOf(F)+1],z=new RegExp("^-?\\d{1,"+P+"}"),I=a.substring(T).match(z);if(!I)throw(r.local.missingNumberAt||r.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=I[0].length,parseInt(I[0],10)},E=this,M=function(){if(typeof u=="function"){v("m");var F=u.call(E,a.substring(T));return T+=F.length,F}return x("m")},C=function(F,D,R,P){for(var z=v(F,P)?R:D,I=0;I-1){p=1,g=m;for(var A=this.daysInMonth(d,p);g>A;A=this.daysInMonth(d,p))p++,g-=A}return h>-1?this.fromJD(h):this.newDate(d,p,g)},determineDate:function(t,a,i,o,s){i&&typeof i!="object"&&(s=o,o=i,i=null),typeof o!="string"&&(s=o,o="");var l=this,n=function(u){try{return l.parseDate(o,u,s)}catch{}u=u.toLowerCase();for(var c=(u.match(/^c/)&&i?i.newDate():null)||l.today(),f=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,h=f.exec(u);h;)c.add(parseInt(h[1],10),h[2]||"d"),h=f.exec(u);return c};return a=a?a.newDate():null,t=t==null?a:typeof t=="string"?n(t):typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?a:l.today().add(t,"d"):l.newDate(t),t}})}}),Uxe=ye({"node_modules/world-calendars/dist/calendars/chinese.js"(){var e=Wc(),r=ku(),t=e.instance();function a(h){this.local=this.regionalOptions[h||""]||this.regionalOptions[""]}a.prototype=new e.baseCalendar,r(a.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(h,d){if(typeof h=="string"){var p=h.match(o);return p?p[0]:""}var g=this._validateYear(h),m=h.month(),y=""+this.toChineseMonth(g,m);return d&&y.length<2&&(y="0"+y),this.isIntercalaryMonth(g,m)&&(y+="i"),y},monthNames:function(h){if(typeof h=="string"){var d=h.match(s);return d?d[0]:""}var p=this._validateYear(h),g=h.month(),m=this.toChineseMonth(p,g),y=["\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(p,g)&&(y="\u95F0"+y),y},monthNamesShort:function(h){if(typeof h=="string"){var d=h.match(l);return d?d[0]:""}var p=this._validateYear(h),g=h.month(),m=this.toChineseMonth(p,g),y=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][m-1];return this.isIntercalaryMonth(p,g)&&(y="\u95F0"+y),y},parseMonth:function(h,d){h=this._validateYear(h);var p=parseInt(d),g;if(isNaN(p))d[0]==="\u95F0"&&(g=!0,d=d.substring(1)),d[d.length-1]==="\u6708"&&(d=d.substring(0,d.length-1)),p=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(d);else{var m=d[d.length-1];g=m==="i"||m==="I"}var y=this.toMonthIndex(h,p,g);return y},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(h,d){if(h.year&&(h=h.year()),typeof h!="number"||h<1888||h>2111)throw d.replace(/\{0\}/,this.local.name);return h},toMonthIndex:function(h,d,p){var g=this.intercalaryMonth(h),m=p&&d!==g;if(m||d<1||d>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);var y;return g?!p&&d<=g?y=d-1:y=d:y=d-1,y},toChineseMonth:function(h,d){h.year&&(h=h.year(),d=h.month());var p=this.intercalaryMonth(h),g=p?12:11;if(d<0||d>g)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return p?d>13;return p},isIntercalaryMonth:function(h,d){h.year&&(h=h.year(),d=h.month());var p=this.intercalaryMonth(h);return!!p&&p===d},leapYear:function(h){return this.intercalaryMonth(h)!==0},weekOfYear:function(h,d,p){var g=this._validateYear(h,e.local.invalidyear),m=u[g-u[0]],y=m>>9&4095,_=m>>5&15,v=m&31,x;x=t.newDate(y,_,v),x.add(4-(x.dayOfWeek()||7),"d");var E=this.toJD(h,d,p)-x.toJD();return 1+Math.floor(E/7)},monthsInYear:function(h){return this.leapYear(h)?13:12},daysInMonth:function(h,d){h.year&&(d=h.month(),h=h.year()),h=this._validateYear(h);var p=n[h-n[0]],g=p>>13,m=g?12:11;if(d>m)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);var y=p&1<<12-d?30:29;return y},weekDay:function(h,d,p){return(this.dayOfWeek(h,d,p)||7)<6},toJD:function(h,d,p){var g=this._validate(h,y,p,e.local.invalidDate);h=this._validateYear(g.year()),d=g.month(),p=g.day();var m=this.isIntercalaryMonth(h,d),y=this.toChineseMonth(h,d),_=f(h,y,p,m);return t.toJD(_.year,_.month,_.day)},fromJD:function(h){var d=t.fromJD(h),p=c(d.year(),d.month(),d.day()),g=this.toMonthIndex(p.year,p.month,p.isIntercalary);return this.newDate(p.year,g,p.day)},fromString:function(h){var d=h.match(i),p=this._validateYear(+d[1]),g=+d[2],m=!!d[3],y=this.toMonthIndex(p,g,m),_=+d[4];return this.newDate(p,y,_)},add:function(h,d,p){var g=h.year(),m=h.month(),y=this.isIntercalaryMonth(g,m),_=this.toChineseMonth(g,m),v=Object.getPrototypeOf(a.prototype).add.call(this,h,d,p);if(p==="y"){var x=v.year(),E=v.month(),M=this.isIntercalaryMonth(x,_),C=y&&M?this.toMonthIndex(x,_,!0):this.toMonthIndex(x,_,!1);C!==E&&v.month(C)}return v}});var i=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,o=/^\d?\d[iI]?/m,s=/^闰?十?[一二三四五六七八九]?月/m,l=/^闰?十?[一二三四五六七八九]?/m;e.calendars.chinese=a;var n=[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],u=[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 c(h,d,p,g){var m,y;if(typeof h=="object")m=h,y=d||{};else{var _=typeof h=="number"&&h>=1888&&h<=2111;if(!_)throw new Error("Solar year outside range 1888-2111");var v=typeof d=="number"&&d>=1&&d<=12;if(!v)throw new Error("Solar month outside range 1 - 12");var x=typeof p=="number"&&p>=1&&p<=31;if(!x)throw new Error("Solar day outside range 1 - 31");m={year:h,month:d,day:p},y=g||{}}var E=u[m.year-u[0]],M=m.year<<9|m.month<<5|m.day;y.year=M>=E?m.year:m.year-1,E=u[y.year-u[0]];var C=E>>9&4095,w=E>>5&15,k=E&31,T,b=new Date(C,w-1,k),S=new Date(m.year,m.month-1,m.day);T=Math.round((S-b)/(24*3600*1e3));var A=n[y.year-n[0]],F;for(F=0;F<13;F++){var D=A&1<<12-F?30:29;if(T>13;return!R||F=1888&&h<=2111;if(!v)throw new Error("Lunar year outside range 1888-2111");var x=typeof d=="number"&&d>=1&&d<=12;if(!x)throw new Error("Lunar month outside range 1 - 12");var E=typeof p=="number"&&p>=1&&p<=30;if(!E)throw new Error("Lunar day outside range 1 - 30");var M;typeof g=="object"?(M=!1,y=g):(M=!!g,y=m||{}),_={year:h,month:d,day:p,isIntercalary:M}}var C;C=_.day-1;var w=n[_.year-n[0]],k=w>>13,T;k&&(_.month>k||_.isIntercalary)?T=_.month:T=_.month-1;for(var b=0;b>9&4095,D=A>>5&15,R=A&31,P=new Date(F,D-1,R+C);return y.year=P.getFullYear(),y.month=1+P.getMonth(),y.day=P.getDate(),y}}}),qxe=ye({"node_modules/world-calendars/dist/calendars/coptic.js"(){var e=Wc(),r=ku();function t(a){this.local=this.regionalOptions[a||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(o){var i=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),o=i.year()+(i.year()<0?1:0);return o%4===3||o%4===-1},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(a,i,o){var s=this.newDate(a,i,o);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(a,i){var o=this._validate(a,i,this.minDay,e.local.invalidMonth);return this.daysPerMonth[o.month()-1]+(o.month()===13&&this.leapYear(o.year())?1:0)},weekDay:function(a,i,o){return(this.dayOfWeek(a,i,o)||7)<6},toJD:function(a,i,o){var s=this._validate(a,i,o,e.local.invalidDate);return a=s.year(),a<0&&a++,s.day()+(s.month()-1)*30+(a-1)*365+Math.floor(a/4)+this.jdEpoch-1},fromJD:function(a){var i=Math.floor(a)+.5-this.jdEpoch,o=Math.floor((i-Math.floor((i+366)/1461))/365)+1;o<=0&&o--,i=Math.floor(a)+.5-this.newDate(o,1,1).toJD();var s=Math.floor(i/30)+1,l=i-(s-1)*30+1;return this.newDate(o,s,l)}}),e.calendars.coptic=t}}),Vxe=ye({"node_modules/world-calendars/dist/calendars/discworld.js"(){var e=Wc(),r=ku();function t(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(i){return this._validate(i,this.minMonth,this.minDay,e.local.invalidYear),!1},monthsInYear:function(i){return this._validate(i,this.minMonth,this.minDay,e.local.invalidYear),13},daysInYear:function(i){return this._validate(i,this.minMonth,this.minDay,e.local.invalidYear),400},weekOfYear:function(i,o,s){var l=this.newDate(i,o,s);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/8)+1},daysInMonth:function(i,o){var s=this._validate(i,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);return(l.day()+1)%8},weekDay:function(i,o,s){var l=this.dayOfWeek(i,o,s);return l>=2&&l<=6},extraInfo:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);return{century:a[Math.floor((l.year()-1)/100)+1]||""}},toJD:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);return i=l.year()+(l.year()<0?1:0),o=l.month(),s=l.day(),s+(o>1?16:0)+(o>2?(o-2)*32:0)+(i-1)*400+this.jdEpoch-1},fromJD:function(i){i=Math.floor(i+.5)-Math.floor(this.jdEpoch)-1;var o=Math.floor(i/400)+1;i-=(o-1)*400,i+=i>15?16:0;var s=Math.floor(i/32)+1,l=i-(s-1)*32+1;return this.newDate(o<=0?o-1:o,s,l)}});var a={20:"Fruitbat",21:"Anchovy"};e.calendars.discworld=t}}),Gxe=ye({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var e=Wc(),r=ku();function t(a){this.local=this.regionalOptions[a||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(o){var i=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),o=i.year()+(i.year()<0?1:0);return o%4===3||o%4===-1},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(a,i,o){var s=this.newDate(a,i,o);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(a,i){var o=this._validate(a,i,this.minDay,e.local.invalidMonth);return this.daysPerMonth[o.month()-1]+(o.month()===13&&this.leapYear(o.year())?1:0)},weekDay:function(a,i,o){return(this.dayOfWeek(a,i,o)||7)<6},toJD:function(a,i,o){var s=this._validate(a,i,o,e.local.invalidDate);return a=s.year(),a<0&&a++,s.day()+(s.month()-1)*30+(a-1)*365+Math.floor(a/4)+this.jdEpoch-1},fromJD:function(a){var i=Math.floor(a)+.5-this.jdEpoch,o=Math.floor((i-Math.floor((i+366)/1461))/365)+1;o<=0&&o--,i=Math.floor(a)+.5-this.newDate(o,1,1).toJD();var s=Math.floor(i/30)+1,l=i-(s-1)*30+1;return this.newDate(o,s,l)}}),e.calendars.ethiopian=t}}),Hxe=ye({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var e=Wc(),r=ku();function t(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(i){var o=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(o.year())},_leapYear:function(i){return i=i<0?i+1:i,a(i*7+1,19)<7},monthsInYear:function(i){return this._validate(i,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(i.year?i.year():i)?13:12},weekOfYear:function(i,o,s){var l=this.newDate(i,o,s);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(i){var o=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear);return i=o.year(),this.toJD(i===-1?1:i+1,7,1)-this.toJD(i,7,1)},daysInMonth:function(i,o){return i.year&&(o=i.month(),i=i.year()),this._validate(i,o,this.minDay,e.local.invalidMonth),o===12&&this.leapYear(i)||o===8&&a(this.daysInYear(i),10)===5?30:o===9&&a(this.daysInYear(i),10)===3?29:this.daysPerMonth[o-1]},weekDay:function(i,o,s){return this.dayOfWeek(i,o,s)!==6},extraInfo:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);return{yearType:(this.leapYear(l)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(l)%10-3]}},toJD:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);i=l.year(),o=l.month(),s=l.day();var n=i<=0?i+1:i,u=this.jdEpoch+this._delay1(n)+this._delay2(n)+s+1;if(o<7){for(var c=7;c<=this.monthsInYear(i);c++)u+=this.daysInMonth(i,c);for(var c=1;c=this.toJD(o===-1?1:o+1,7,1);)o++;for(var s=ithis.toJD(o,s,this.daysInMonth(o,s));)s++;var l=i-this.toJD(o,s,1)+1;return this.newDate(o,s,l)}});function a(i,o){return i-o*Math.floor(i/o)}e.calendars.hebrew=t}}),Wxe=ye({"node_modules/world-calendars/dist/calendars/islamic.js"(){var e=Wc(),r=ku();function t(a){this.local=this.regionalOptions[a||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(a){var i=this._validate(a,this.minMonth,this.minDay,e.local.invalidYear);return(i.year()*11+14)%30<11},weekOfYear:function(a,i,o){var s=this.newDate(a,i,o);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInYear:function(a){return this.leapYear(a)?355:354},daysInMonth:function(a,i){var o=this._validate(a,i,this.minDay,e.local.invalidMonth);return this.daysPerMonth[o.month()-1]+(o.month()===12&&this.leapYear(o.year())?1:0)},weekDay:function(a,i,o){return this.dayOfWeek(a,i,o)!==5},toJD:function(a,i,o){var s=this._validate(a,i,o,e.local.invalidDate);return a=s.year(),i=s.month(),o=s.day(),a=a<=0?a+1:a,o+Math.ceil(29.5*(i-1))+(a-1)*354+Math.floor((3+11*a)/30)+this.jdEpoch-1},fromJD:function(a){a=Math.floor(a)+.5;var i=Math.floor((30*(a-this.jdEpoch)+10646)/10631);i=i<=0?i-1:i;var o=Math.min(12,Math.ceil((a-29-this.toJD(i,1,1))/29.5)+1),s=a-this.toJD(i,o,1)+1;return this.newDate(i,o,s)}}),e.calendars.islamic=t}}),$xe=ye({"node_modules/world-calendars/dist/calendars/julian.js"(){var e=Wc(),r=ku();function t(a){this.local=this.regionalOptions[a||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(o){var i=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),o=i.year()<0?i.year()+1:i.year();return o%4===0},weekOfYear:function(a,i,o){var s=this.newDate(a,i,o);return s.add(4-(s.dayOfWeek()||7),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(a,i){var o=this._validate(a,i,this.minDay,e.local.invalidMonth);return this.daysPerMonth[o.month()-1]+(o.month()===2&&this.leapYear(o.year())?1:0)},weekDay:function(a,i,o){return(this.dayOfWeek(a,i,o)||7)<6},toJD:function(a,i,o){var s=this._validate(a,i,o,e.local.invalidDate);return a=s.year(),i=s.month(),o=s.day(),a<0&&a++,i<=2&&(a--,i+=12),Math.floor(365.25*(a+4716))+Math.floor(30.6001*(i+1))+o-1524.5},fromJD:function(a){var i=Math.floor(a+.5),o=i+1524,s=Math.floor((o-122.1)/365.25),l=Math.floor(365.25*s),n=Math.floor((o-l)/30.6001),u=n-Math.floor(n<14?1:13),c=s-Math.floor(u>2?4716:4715),f=o-l-Math.floor(30.6001*n);return c<=0&&c--,this.newDate(c,u,f)}}),e.calendars.julian=t}}),Yxe=ye({"node_modules/world-calendars/dist/calendars/mayan.js"(){var e=Wc(),r=ku();function t(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(o){return this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),!1},formatYear:function(o){var s=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear);o=s.year();var l=Math.floor(o/400);o=o%400,o+=o<0?400:0;var n=Math.floor(o/20);return l+"."+n+"."+o%20},forYear:function(o){if(o=o.split("."),o.length<3)throw"Invalid Mayan year";for(var s=0,l=0;l19||l>0&&n<0)throw"Invalid Mayan year";s=s*20+n}return s},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(o,s,l){return this._validate(o,s,l,e.local.invalidDate),0},daysInYear:function(o){return this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(o,s){return this._validate(o,s,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(o,s,l){var n=this._validate(o,s,l,e.local.invalidDate);return n.day()},weekDay:function(o,s,l){return this._validate(o,s,l,e.local.invalidDate),!0},extraInfo:function(o,s,l){var n=this._validate(o,s,l,e.local.invalidDate),u=n.toJD(),c=this._toHaab(u),f=this._toTzolkin(u);return{haabMonthName:this.local.haabMonths[c[0]-1],haabMonth:c[0],haabDay:c[1],tzolkinDayName:this.local.tzolkinMonths[f[0]-1],tzolkinDay:f[0],tzolkinTrecena:f[1]}},_toHaab:function(o){o-=this.jdEpoch;var s=a(o+8+340,365);return[Math.floor(s/20)+1,a(s,20)]},_toTzolkin:function(o){return o-=this.jdEpoch,[i(o+20,20),i(o+4,13)]},toJD:function(o,s,l){var n=this._validate(o,s,l,e.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(o){o=Math.floor(o)+.5-this.jdEpoch;var s=Math.floor(o/360);o=o%360,o+=o<0?360:0;var l=Math.floor(o/20),n=o%20;return this.newDate(s,l,n)}});function a(o,s){return o-s*Math.floor(o/s)}function i(o,s){return a(o-1,s)+1}e.calendars.mayan=t}}),Xxe=ye({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var e=Wc(),r=ku();function t(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar;var a=e.instance("gregorian");r(t.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(i){var o=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear);return a.leapYear(o.year()+(o.year()<1?1:0)+1469)},weekOfYear:function(i,o,s){var l=this.newDate(i,o,s);return l.add(1-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(i,o){var s=this._validate(i,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(i,o,s){return(this.dayOfWeek(i,o,s)||7)<6},toJD:function(n,o,s){var l=this._validate(n,o,s,e.local.invalidMonth),n=l.year();n<0&&n++;for(var u=l.day(),c=1;c=this.toJD(o+1,1,1);)o++;for(var s=i-Math.floor(this.toJD(o,1,1)+.5)+1,l=1;s>this.daysInMonth(o,l);)s-=this.daysInMonth(o,l),l++;return this.newDate(o,l,s)}}),e.calendars.nanakshahi=t}}),Zxe=ye({"node_modules/world-calendars/dist/calendars/nepali.js"(){var e=Wc(),r=ku();function t(a){this.local=this.regionalOptions[a||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(a){return this.daysInYear(a)!==this.daysPerYear},weekOfYear:function(a,i,o){var s=this.newDate(a,i,o);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInYear:function(a){var i=this._validate(a,this.minMonth,this.minDay,e.local.invalidYear);if(a=i.year(),typeof this.NEPALI_CALENDAR_DATA[a]>"u")return this.daysPerYear;for(var o=0,s=this.minMonth;s<=12;s++)o+=this.NEPALI_CALENDAR_DATA[a][s];return o},daysInMonth:function(a,i){return a.year&&(i=a.month(),a=a.year()),this._validate(a,i,this.minDay,e.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[a]>"u"?this.daysPerMonth[i-1]:this.NEPALI_CALENDAR_DATA[a][i]},weekDay:function(a,i,o){return this.dayOfWeek(a,i,o)!==6},toJD:function(a,i,o){var s=this._validate(a,i,o,e.local.invalidDate);a=s.year(),i=s.month(),o=s.day();var l=e.instance(),n=0,u=i,c=a;this._createMissingCalendarData(a);var f=a-(u>9||u===9&&o>=this.NEPALI_CALENDAR_DATA[c][0]?56:57);for(i!==9&&(n=o,u--);u!==9;)u<=0&&(u=12,c--),n+=this.NEPALI_CALENDAR_DATA[c][u],u--;return i===9?(n+=o-this.NEPALI_CALENDAR_DATA[c][0],n<0&&(n+=l.daysInYear(f))):n+=this.NEPALI_CALENDAR_DATA[c][9]-this.NEPALI_CALENDAR_DATA[c][0],l.newDate(f,1,1).add(n,"d").toJD()},fromJD:function(a){var i=e.instance(),o=i.fromJD(a),s=o.year(),l=o.dayOfYear(),n=s+56;this._createMissingCalendarData(n);for(var u=9,c=this.NEPALI_CALENDAR_DATA[n][0],f=this.NEPALI_CALENDAR_DATA[n][u]-c+1;l>f;)u++,u>12&&(u=1,n++),f+=this.NEPALI_CALENDAR_DATA[n][u];var h=this.NEPALI_CALENDAR_DATA[n][u]-(f-l);return this.newDate(n,u,h)},_createMissingCalendarData:function(a){var i=this.daysPerMonth.slice(0);i.unshift(17);for(var o=a-1;o"u"&&(this.NEPALI_CALENDAR_DATA[o]=i)},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]}}),e.calendars.nepali=t}}),Kxe=ye({"node_modules/world-calendars/dist/calendars/persian.js"(){var e=Wc(),r=ku();function t(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}function a(i){var o=i-475;i<0&&o++;var s=.242197,l=s*o,n=s*(o+1),u=l-Math.floor(l),c=n-Math.floor(n);return u>c}t.prototype=new e.baseCalendar,r(t.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(i){var o=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear);return a(o.year())},weekOfYear:function(i,o,s){var l=this.newDate(i,o,s);return l.add(-((l.dayOfWeek()+1)%7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(i,o){var s=this._validate(i,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(i,o,s){return this.dayOfWeek(i,o,s)!==5},toJD:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);i=l.year(),o=l.month(),s=l.day();var n=0;if(i>0)for(var u=1;u0?i-1:i)*365+n+this.jdEpoch-1},fromJD:function(i){i=Math.floor(i)+.5;var o=475+(i-this.toJD(475,1,1))/365.242197,s=Math.floor(o);s<=0&&s--,i>this.toJD(s,12,a(s)?30:29)&&(s++,s===0&&s++);var l=i-this.toJD(s,1,1)+1,n=l<=186?Math.ceil(l/31):Math.ceil((l-6)/30),u=i-this.toJD(s,n,1)+1;return this.newDate(s,n,u)}}),e.calendars.persian=t,e.calendars.jalali=t}}),Jxe=ye({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var e=Wc(),r=ku(),t=e.instance();function a(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}a.prototype=new e.baseCalendar,r(a.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(s){var o=this._validate(s,this.minMonth,this.minDay,e.local.invalidYear),s=this._t2gYear(o.year());return t.leapYear(s)},weekOfYear:function(n,o,s){var l=this._validate(n,this.minMonth,this.minDay,e.local.invalidYear),n=this._t2gYear(l.year());return t.weekOfYear(n,l.month(),l.day())},daysInMonth:function(i,o){var s=this._validate(i,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(i,o,s){return(this.dayOfWeek(i,o,s)||7)<6},toJD:function(n,o,s){var l=this._validate(n,o,s,e.local.invalidDate),n=this._t2gYear(l.year());return t.toJD(n,l.month(),l.day())},fromJD:function(i){var o=t.fromJD(i),s=this._g2tYear(o.year());return this.newDate(s,o.month(),o.day())},_t2gYear:function(i){return i+this.yearsOffset+(i>=-this.yearsOffset&&i<=-1?1:0)},_g2tYear:function(i){return i-this.yearsOffset-(i>=1&&i<=this.yearsOffset?1:0)}}),e.calendars.taiwan=a}}),Qxe=ye({"node_modules/world-calendars/dist/calendars/thai.js"(){var e=Wc(),r=ku(),t=e.instance();function a(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}a.prototype=new e.baseCalendar,r(a.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(s){var o=this._validate(s,this.minMonth,this.minDay,e.local.invalidYear),s=this._t2gYear(o.year());return t.leapYear(s)},weekOfYear:function(n,o,s){var l=this._validate(n,this.minMonth,this.minDay,e.local.invalidYear),n=this._t2gYear(l.year());return t.weekOfYear(n,l.month(),l.day())},daysInMonth:function(i,o){var s=this._validate(i,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(i,o,s){return(this.dayOfWeek(i,o,s)||7)<6},toJD:function(n,o,s){var l=this._validate(n,o,s,e.local.invalidDate),n=this._t2gYear(l.year());return t.toJD(n,l.month(),l.day())},fromJD:function(i){var o=t.fromJD(i),s=this._g2tYear(o.year());return this.newDate(s,o.month(),o.day())},_t2gYear:function(i){return i-this.yearsOffset-(i>=1&&i<=this.yearsOffset?1:0)},_g2tYear:function(i){return i+this.yearsOffset+(i>=-this.yearsOffset&&i<=-1?1:0)}}),e.calendars.thai=a}}),ebe=ye({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var e=Wc(),r=ku();function t(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(i){var o=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear);return this.daysInYear(o.year())===355},weekOfYear:function(i,o,s){var l=this.newDate(i,o,s);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(i){for(var o=0,s=1;s<=12;s++)o+=this.daysInMonth(i,s);return o},daysInMonth:function(i,o){for(var s=this._validate(i,o,this.minDay,e.local.invalidMonth),l=s.toJD()-24e5+.5,n=0,u=0;ul)return a[n]-a[n-1];n++}return 30},weekDay:function(i,o,s){return this.dayOfWeek(i,o,s)!==5},toJD:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate),n=12*(l.year()-1)+l.month()-15292,u=l.day()+a[n-1]-1;return u+24e5-.5},fromJD:function(i){for(var o=i-24e5+.5,s=0,l=0;lo);l++)s++;var n=s+15292,u=Math.floor((n-1)/12),c=u+1,f=n-12*u,h=o-a[s-1]+1;return this.newDate(c,f,h)},isValid:function(i,o,s){var l=e.baseCalendar.prototype.isValid.apply(this,arguments);return l&&(i=i.year!=null?i.year:i,l=i>=1276&&i<=1500),l},_validate:function(i,o,s,l){var n=e.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw l.replace(/\{0\}/,this.local.name);return n}}),e.calendars.ummalqura=t;var a=[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]}}),tbe=ye({"src/components/calendars/calendars.js"(e,r){"use strict";r.exports=Wc(),jxe(),Uxe(),qxe(),Vxe(),Gxe(),Hxe(),Wxe(),$xe(),Yxe(),Xxe(),Zxe(),Kxe(),Jxe(),Qxe(),ebe()}}),rbe=ye({"src/components/calendars/index.js"(e,r){"use strict";var t=tbe(),a=Yt(),i=Vn(),o=i.EPOCHJD,s=i.ONEDAY,l={valType:"enumerated",values:a.sortObjectKeys(t.calendars),editType:"calc",dflt:"gregorian"},n=function(w,k,T,b){var S={};return S[T]=l,a.coerce(w,k,S,T,b)},u=function(w,k,T,b){for(var S=0;S0){if(++ne>=H2e)return arguments[0]}else ne=0;return Q.apply(void 0,arguments)}}var C4=Y2e;var X2e=C4(w4),D4=X2e;var Z2e=/\{\n\/\* \[wrapped with (.+)\] \*/,K2e=/,? & /;function J2e(Q){var ne=Q.match(Z2e);return ne?ne[1].split(K2e):[]}var aH=J2e;var Q2e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function ewe(Q,ne){var ge=ne.length;if(!ge)return Q;var je=ge-1;return ne[je]=(ge>1?"& ":"")+ne[je],ne=ne.join(ge>2?", ":" "),Q.replace(Q2e,`{ -/* [wrapped with `+ne+`] */ -`)}var iH=ewe;function twe(Q){return function(){return Q}}var fg=twe;var rwe=(function(){try{var Q=oh(Object,"defineProperty");return Q({},"",{}),Q}catch{}})(),hg=rwe;var awe=hg?function(Q,ne){return hg(Q,"toString",{configurable:!0,enumerable:!1,value:fg(ne),writable:!0})}:Ss,nH=awe;var iwe=C4(nH),dg=iwe;function nwe(Q,ne){for(var ge=-1,je=Q==null?0:Q.length;++ge-1}var K0=cwe;var fwe=1,hwe=2,dwe=8,pwe=16,vwe=32,mwe=64,gwe=128,ywe=256,_we=512,xwe=[["ary",gwe],["bind",fwe],["bindKey",hwe],["curry",dwe],["curryRight",pwe],["flip",_we],["partial",vwe],["partialRight",mwe],["rearg",ywe]];function bwe(Q,ne){return ou(xwe,function(ge){var je="_."+ge[0];ne&ge[1]&&!K0(Q,je)&&Q.push(je)}),Q.sort()}var sH=bwe;function wwe(Q,ne,ge){var je=ne+"";return dg(Q,iH(je,sH(aH(je),ge)))}var F4=wwe;var Awe=1,Twe=2,Mwe=4,Ewe=8,lH=32,uH=64;function Swe(Q,ne,ge,je,mt,Lt,rr,Ar,Tr,Sa){var ya=ne&Ewe,Fa=ya?rr:void 0,Ii=ya?void 0:rr,vn=ya?Lt:void 0,ja=ya?void 0:Lt;ne|=ya?lH:uH,ne&=~(ya?uH:lH),ne&Mwe||(ne&=~(Awe|Twe));var Ci=[Q,ne,mt,vn,Fa,ja,Ii,Ar,Tr,Sa],Rn=ge.apply(void 0,Ci);return vx(Q)&&D4(Rn,Ci),Rn.placeholder=je,F4(Rn,Q,ne)}var P4=Swe;function kwe(Q){var ne=Q;return ne.placeholder}var md=kwe;var Cwe=9007199254740991,Dwe=/^(?:0|[1-9]\d*)$/;function Lwe(Q,ne){var ge=typeof Q;return ne=ne??Cwe,!!ne&&(ge=="number"||ge!="symbol"&&Dwe.test(Q))&&Q>-1&&Q%1==0&&Q1&&ye.reverse(),ya&&Tr-1&&Q%1==0&&Q<=s3e}var J0=l3e;function u3e(Q){return Q!=null&&J0(Q.length)&&!fc(Q)}var Is=u3e;function c3e(Q,ne,ge){if(!po(ge))return!1;var je=typeof ne;return(je=="number"?Is(ge)&&hc(ne,ge.length):je=="string"&&ne in ge)?Hl(ge[ne],Q):!1}var ks=c3e;function f3e(Q){return Oi(function(ne,ge){var je=-1,mt=ge.length,Lt=mt>1?ge[mt-1]:void 0,rr=mt>2?ge[2]:void 0;for(Lt=Q.length>3&&typeof Lt=="function"?(mt--,Lt):void 0,rr&&ks(ge[0],ge[1],rr)&&(Lt=mt<3?void 0:Lt,mt=1),ne=Object(ne);++je-1}var qH=j4e;function U4e(Q,ne){var ge=this.__data__,je=Q0(ge,Q);return je<0?(++this.size,ge.push([Q,ne])):ge[je][1]=ne,this}var VH=U4e;function xg(Q){var ne=-1,ge=Q==null?0:Q.length;for(this.clear();++ne0&&ge(Ar)?ne>1?QH(Ar,ne-1,ge,je,mt):vf(mt,Ar):je||(mt[mt.length]=Ar)}return mt}var ls=QH;function f6e(Q){var ne=Q==null?0:Q.length;return ne?ls(Q,1):[]}var j4=f6e;function h6e(Q){return dg(R4(Q,void 0,j4),Q+"")}var vc=h6e;var d6e=vc(Ag),eW=d6e;var p6e=B4(Object.getPrototypeOf,Object),av=p6e;var v6e="[object Object]",m6e=Function.prototype,g6e=Object.prototype,tW=m6e.toString,y6e=g6e.hasOwnProperty,_6e=tW.call(Object);function x6e(Q){if(!wo(Q)||Es(Q)!=v6e)return!1;var ne=av(Q);if(ne===null)return!0;var ge=y6e.call(ne,"constructor")&&ne.constructor;return typeof ge=="function"&&ge instanceof ge&&tW.call(ge)==_6e}var Pp=x6e;var b6e="[object DOMException]",w6e="[object Error]";function A6e(Q){if(!wo(Q))return!1;var ne=Es(Q);return ne==w6e||ne==b6e||typeof Q.message=="string"&&typeof Q.name=="string"&&!Pp(Q)}var Tg=A6e;var T6e=Oi(function(Q,ne){try{return ul(Q,void 0,ne)}catch(ge){return Tg(ge)?ge:new Error(ge)}}),U4=T6e;var M6e="Expected a function";function E6e(Q,ne){var ge;if(typeof ne!="function")throw new TypeError(M6e);return Q=Bi(Q),function(){return--Q>0&&(ge=ne.apply(this,arguments)),Q<=1&&(ne=void 0),ge}}var q4=E6e;var S6e=1,k6e=32,eD=Oi(function(Q,ne,ge){var je=S6e;if(ge.length){var mt=If(ge,md(eD));je|=k6e}return dc(Q,je,ne,ge,mt)});eD.placeholder={};var V4=eD;var C6e=vc(function(Q,ne){return ou(ne,function(ge){ge=su(ge),Au(Q,ge,V4(Q[ge],Q))}),Q}),rW=C6e;var D6e=1,L6e=2,F6e=32,tD=Oi(function(Q,ne,ge){var je=D6e|L6e;if(ge.length){var mt=If(ge,md(tD));je|=F6e}return dc(ne,je,Q,ge,mt)});tD.placeholder={};var aW=tD;function P6e(Q,ne,ge){var je=-1,mt=Q.length;ne<0&&(ne=-ne>mt?0:mt+ne),ge=ge>mt?mt:ge,ge<0&&(ge+=mt),mt=ne>ge?0:ge-ne>>>0,ne>>>=0;for(var Lt=Array(mt);++je=je?Q:Pl(Q,ne,ge)}var mf=I6e;var R6e="\\ud800-\\udfff",z6e="\\u0300-\\u036f",B6e="\\ufe20-\\ufe2f",O6e="\\u20d0-\\u20ff",N6e=z6e+B6e+O6e,j6e="\\ufe0e\\ufe0f",U6e="\\u200d",q6e=RegExp("["+U6e+R6e+N6e+j6e+"]");function V6e(Q){return q6e.test(Q)}var _d=V6e;function G6e(Q){return Q.split("")}var iW=G6e;var nW="\\ud800-\\udfff",H6e="\\u0300-\\u036f",W6e="\\ufe20-\\ufe2f",$6e="\\u20d0-\\u20ff",Y6e=H6e+W6e+$6e,X6e="\\ufe0e\\ufe0f",Z6e="["+nW+"]",rD="["+Y6e+"]",aD="\\ud83c[\\udffb-\\udfff]",K6e="(?:"+rD+"|"+aD+")",oW="[^"+nW+"]",sW="(?:\\ud83c[\\udde6-\\uddff]){2}",lW="[\\ud800-\\udbff][\\udc00-\\udfff]",J6e="\\u200d",uW=K6e+"?",cW="["+X6e+"]?",Q6e="(?:"+J6e+"(?:"+[oW,sW,lW].join("|")+")"+cW+uW+")*",eAe=cW+uW+Q6e,tAe="(?:"+[oW+rD+"?",rD,sW,lW,Z6e].join("|")+")",rAe=RegExp(aD+"(?="+aD+")|"+tAe+eAe,"g");function aAe(Q){return Q.match(rAe)||[]}var fW=aAe;function iAe(Q){return _d(Q)?fW(Q):iW(Q)}var Nu=iAe;function nAe(Q){return function(ne){ne=En(ne);var ge=_d(ne)?Nu(ne):void 0,je=ge?ge[0]:ne.charAt(0),mt=ge?mf(ge,1).join(""):ne.slice(1);return je[Q]()+mt}}var G4=nAe;var oAe=G4("toUpperCase"),Mg=oAe;function sAe(Q){return Mg(En(Q).toLowerCase())}var H4=sAe;function lAe(Q,ne,ge,je){var mt=-1,Lt=Q==null?0:Q.length;for(je&&Lt&&(ge=Q[++mt]);++mt=ne?Q:ne)),Q}var lh=sTe;function lTe(Q,ne,ge){return ge===void 0&&(ge=ne,ne=void 0),ge!==void 0&&(ge=wu(ge),ge=ge===ge?ge:0),ne!==void 0&&(ne=wu(ne),ne=ne===ne?ne:0),lh(wu(Q),ne,ge)}var BW=lTe;function uTe(){this.__data__=new ev,this.size=0}var OW=uTe;function cTe(Q){var ne=this.__data__,ge=ne.delete(Q);return this.size=ne.size,ge}var NW=cTe;function fTe(Q){return this.__data__.get(Q)}var jW=fTe;function hTe(Q){return this.__data__.has(Q)}var UW=hTe;var dTe=200;function pTe(Q,ne){var ge=this.__data__;if(ge instanceof ev){var je=ge.__data__;if(!tv||je.lengthAr))return!1;var Sa=Lt.get(Q),ya=Lt.get(ne);if(Sa&&ya)return Sa==ne&&ya==Q;var Fa=-1,Ii=!0,vn=ge&pEe?new nv:void 0;for(Lt.set(Q,ne),Lt.set(ne,Q);++Fa=ne||yi<0||Fa&&Ed>=Lt}function Si(){var On=Vg();if(Rn(On))return ye(On);Ar=setTimeout(Si,Ci(On))}function ye(On){return Ar=void 0,Ii&&je?vn(On):(je=mt=void 0,rr)}function rl(){Ar!==void 0&&clearTimeout(Ar),Sa=0,je=Tr=mt=Ar=void 0}function Vu(){return Ar===void 0?rr:ye(Vg())}function Vs(){var On=Vg(),yi=Rn(On);if(je=arguments,mt=this,Tr=On,yi){if(Ar===void 0)return ja(Tr);if(Fa)return clearTimeout(Ar),Ar=setTimeout(Si,ne),vn(Tr)}return Ar===void 0&&(Ar=setTimeout(Si,ne)),rr}return Vs.cancel=rl,Vs.flush=Vu,Vs}var y6=SSe;function kSe(Q,ne){return Q==null||Q!==Q?ne:Q}var H$=kSe;var W$=Object.prototype,CSe=W$.hasOwnProperty,DSe=Oi(function(Q,ne){Q=Object(Q);var ge=-1,je=ne.length,mt=je>2?ne[2]:void 0;for(mt&&ks(ne[0],ne[1],mt)&&(je=1);++ge=VSe&&(Lt=n0,rr=!1,ne=new nv(ne));e:for(;++mt=0&&Q.slice(ge,mt)==ne}var cY=lke;function uke(Q,ne){return co(ne,function(ge){return[ge,Q[ge]]})}var fY=uke;function cke(Q){var ne=-1,ge=Array(Q.size);return Q.forEach(function(je){ge[++ne]=[je,je]}),ge}var hY=cke;var fke="[object Map]",hke="[object Set]";function dke(Q){return function(ne){var ge=ju(ne);return ge==fke?Bg(ne):ge==hke?hY(ne):fY(ne,Q(ne))}}var T6=dke;var pke=T6(jo),Ex=pke;var vke=T6(Rs),Sx=vke;var mke={"&":"&","<":"<",">":">",'"':""","'":"'"},gke=Sg(mke),dY=gke;var pY=/[&<>"']/g,yke=RegExp(pY.source);function _ke(Q){return Q=En(Q),Q&&yke.test(Q)?Q.replace(pY,dY):Q}var M6=_ke;var vY=/[\\^$.*+?()[\]{}|]/g,xke=RegExp(vY.source);function bke(Q){return Q=En(Q),Q&&xke.test(Q)?Q.replace(vY,"\\$&"):Q}var mY=bke;function wke(Q,ne){for(var ge=-1,je=Q==null?0:Q.length;++gemt?0:mt+ge),je=je===void 0||je>mt?mt:Bi(je),je<0&&(je+=mt),je=ge>je?0:S6(je);ge-1?mt[Lt?ne[rr]:rr]:void 0}}var C6=Lke;var Fke=Math.max;function Pke(Q,ne,ge){var je=Q==null?0:Q.length;if(!je)return-1;var mt=ge==null?0:Bi(ge);return mt<0&&(mt=Fke(je+mt,0)),Z0(Q,vi(ne,3),mt)}var D6=Pke;var Ike=C6(D6),wY=Ike;function Rke(Q,ne,ge){var je;return ge(Q,function(mt,Lt,rr){if(ne(mt,Lt,rr))return je=Lt,!1}),je}var L6=Rke;function zke(Q,ne){return L6(Q,vi(ne,3),gc)}var AY=zke;var Bke=Math.max,Oke=Math.min;function Nke(Q,ne,ge){var je=Q==null?0:Q.length;if(!je)return-1;var mt=je-1;return ge!==void 0&&(mt=Bi(ge),mt=ge<0?Bke(je+mt,0):Oke(mt,je-1)),Z0(Q,vi(ne,3),mt,!0)}var F6=Nke;var jke=C6(F6),TY=jke;function Uke(Q,ne){return L6(Q,vi(ne,3),Wg)}var MY=Uke;function qke(Q){return Q&&Q.length?Q[0]:void 0}var kx=qke;function Vke(Q,ne){var ge=-1,je=Is(Q)?Array(Q.length):[];return yf(Q,function(mt,Lt,rr){je[++ge]=ne(mt,Lt,rr)}),je}var P6=Vke;function Gke(Q,ne){var ge=Ei(Q)?co:P6;return ge(Q,vi(ne,3))}var cv=Gke;function Hke(Q,ne){return ls(cv(Q,ne),1)}var EY=Hke;var Wke=1/0;function $ke(Q,ne){return ls(cv(Q,ne),Wke)}var SY=$ke;function Yke(Q,ne,ge){return ge=ge===void 0?1:Bi(ge),ls(cv(Q,ne),ge)}var kY=Yke;var Xke=1/0;function Zke(Q){var ne=Q==null?0:Q.length;return ne?ls(Q,Xke):[]}var CY=Zke;function Kke(Q,ne){var ge=Q==null?0:Q.length;return ge?(ne=ne===void 0?1:Bi(ne),ls(Q,ne)):[]}var DY=Kke;var Jke=512;function Qke(Q){return dc(Q,Jke)}var LY=Qke;var eCe=Cg("floor"),FY=eCe;var tCe="Expected a function",rCe=8,aCe=32,iCe=128,nCe=256;function oCe(Q){return vc(function(ne){var ge=ne.length,je=ge,mt=df.prototype.thru;for(Q&&ne.reverse();je--;){var Lt=ne[je];if(typeof Lt!="function")throw new TypeError(tCe);if(mt&&!rr&&cg(Lt)=="wrapper")var rr=new df([],!0)}for(je=rr?je:ge;++jene}var $g=xCe;function bCe(Q){return function(ne,ge){return typeof ne=="string"&&typeof ge=="string"||(ne=wu(ne),ge=wu(ge)),Q(ne,ge)}}var hv=bCe;var wCe=hv($g),VY=wCe;var ACe=hv(function(Q,ne){return Q>=ne}),GY=ACe;var TCe=Object.prototype,MCe=TCe.hasOwnProperty;function ECe(Q,ne){return Q!=null&&MCe.call(Q,ne)}var HY=ECe;function SCe(Q,ne){return Q!=null&&h6(Q,ne,HY)}var WY=SCe;var kCe=Math.max,CCe=Math.min;function DCe(Q,ne,ge){return Q>=CCe(ne,ge)&&Q-1:!!mt&&vd(Q,ne,ge)>-1}var XY=BCe;var OCe=Math.max;function NCe(Q,ne,ge){var je=Q==null?0:Q.length;if(!je)return-1;var mt=ge==null?0:Bi(ge);return mt<0&&(mt=OCe(je+mt,0)),vd(Q,ne,mt)}var ZY=NCe;function jCe(Q){var ne=Q==null?0:Q.length;return ne?Pl(Q,0,-1):[]}var KY=jCe;var UCe=Math.min;function qCe(Q,ne,ge){for(var je=ge?Hg:K0,mt=Q[0].length,Lt=Q.length,rr=Lt,Ar=Array(Lt),Tr=1/0,Sa=[];rr--;){var ya=Q[rr];rr&&ne&&(ya=co(ya,fl(ne))),Tr=UCe(ya.length,Tr),Ar[rr]=!ge&&(ne||mt>=120&&ya.length>=120)?new nv(rr&&ya):void 0}ya=Q[0];var Fa=-1,Ii=Ar[0];e:for(;++Fa=-kX&&Q<=kX}var CX=B7e;function O7e(Q){return Q===void 0}var DX=O7e;var N7e="[object WeakMap]";function j7e(Q){return wo(Q)&&ju(Q)==N7e}var LX=j7e;var U7e="[object WeakSet]";function q7e(Q){return wo(Q)&&Es(Q)==U7e}var FX=q7e;var V7e=1;function G7e(Q){return vi(typeof Q=="function"?Q:mc(Q,V7e))}var PX=G7e;var H7e=Array.prototype,W7e=H7e.join;function $7e(Q,ne){return Q==null?"":W7e.call(Q,ne)}var IX=$7e;var Y7e=xd(function(Q,ne,ge){return Q+(ge?"-":"")+ne.toLowerCase()}),RX=Y7e;var X7e=lv(function(Q,ne,ge){Au(Q,ge,ne)}),zX=X7e;function Z7e(Q,ne,ge){for(var je=ge+1;je--;)if(Q[je]===ne)return je;return je}var BX=Z7e;var K7e=Math.max,J7e=Math.min;function Q7e(Q,ne,ge){var je=Q==null?0:Q.length;if(!je)return-1;var mt=je;return ge!==void 0&&(mt=Bi(ge),mt=mt<0?K7e(je+mt,0):J7e(mt,je-1)),ne===ne?BX(Q,ne,mt):Z0(Q,L4,mt,!0)}var OX=Q7e;var eDe=xd(function(Q,ne,ge){return Q+(ge?" ":"")+ne.toLowerCase()}),NX=eDe;var tDe=G4("toLowerCase"),jX=tDe;function rDe(Q,ne){return Q=this.__values__.length,ne=Q?void 0:this.__values__[this.__index__++];return{done:Q,value:ne}}var iZ=FDe;function PDe(Q,ne){var ge=Q.length;if(ge)return ne+=ne<0?ge:0,hc(ne,ge)?Q[ne]:void 0}var q6=PDe;function IDe(Q,ne){return Q&&Q.length?q6(Q,Bi(ne)):void 0}var nZ=IDe;function RDe(Q){return Q=Bi(Q),Oi(function(ne){return q6(ne,Q)})}var oZ=RDe;var zDe=Object.prototype,BDe=zDe.hasOwnProperty;function ODe(Q,ne){ne=pf(ne,Q);var ge=-1,je=ne.length;if(!je)return!0;for(;++ge1),Lt}),Tu(Q,Pg(Q),ge),je&&(ge=mc(ge,jDe|UDe|qDe,sZ));for(var mt=ne.length;mt--;)ey(ge,ne[mt]);return ge}),lZ=VDe;function GDe(Q,ne,ge,je){if(!po(Q))return Q;ne=pf(ne,Q);for(var mt=-1,Lt=ne.length,rr=Lt-1,Ar=Q;Ar!=null&&++mtne||Lt&&rr&&Tr&&!Ar&&!Sa||je&&rr&&Tr||!ge&&Tr||!mt)return 1;if(!je&&!Lt&&!Sa&&Q=Ar)return Tr;var Sa=ge[je];return Tr*(Sa=="desc"?-1:1)}}return Q.index-ne.index}var hZ=KDe;function JDe(Q,ne,ge){ne.length?ne=co(ne,function(Lt){return Ei(Lt)?function(rr){return sh(rr,Lt.length===1?Lt[0]:Lt)}:Lt}):ne=[Ss];var je=-1;ne=co(ne,fl(vi));var mt=P6(Q,function(Lt,rr,Ar){var Tr=co(ne,function(Sa){return Sa(Lt)});return{criteria:Tr,index:++je,value:Lt}});return fZ(mt,function(Lt,rr){return hZ(Lt,rr,ge)})}var W6=JDe;function QDe(Q,ne,ge,je){return Q==null?[]:(Ei(ne)||(ne=ne==null?[]:[ne]),ge=je?void 0:ge,Ei(ge)||(ge=ge==null?[]:[ge]),W6(Q,ne,ge))}var dZ=QDe;function e9e(Q){return vc(function(ne){return ne=co(ne,fl(vi)),Oi(function(ge){var je=this;return Q(ne,function(mt){return ul(mt,je,ge)})})})}var ty=e9e;var t9e=ty(co),pZ=t9e;var r9e=Oi,vZ=r9e;var a9e=Math.min,i9e=vZ(function(Q,ne){ne=ne.length==1&&Ei(ne[0])?co(ne[0],fl(vi)):co(ls(ne,1),fl(vi));var ge=ne.length;return Oi(function(je){for(var mt=-1,Lt=a9e(je.length,ge);++mts9e)return ge;do ne%2&&(ge+=Q),ne=l9e(ne/2),ne&&(Q+=Q);while(ne);return ge}var Cx=u9e;var c9e=Ug("length"),_Z=c9e;var bZ="\\ud800-\\udfff",f9e="\\u0300-\\u036f",h9e="\\ufe20-\\ufe2f",d9e="\\u20d0-\\u20ff",p9e=f9e+h9e+d9e,v9e="\\ufe0e\\ufe0f",m9e="["+bZ+"]",lD="["+p9e+"]",uD="\\ud83c[\\udffb-\\udfff]",g9e="(?:"+lD+"|"+uD+")",wZ="[^"+bZ+"]",AZ="(?:\\ud83c[\\udde6-\\uddff]){2}",TZ="[\\ud800-\\udbff][\\udc00-\\udfff]",y9e="\\u200d",MZ=g9e+"?",EZ="["+v9e+"]?",_9e="(?:"+y9e+"(?:"+[wZ,AZ,TZ].join("|")+")"+EZ+MZ+")*",x9e=EZ+MZ+_9e,b9e="(?:"+[wZ+lD+"?",lD,AZ,TZ,m9e].join("|")+")",xZ=RegExp(uD+"(?="+uD+")|"+b9e+x9e,"g");function w9e(Q){for(var ne=xZ.lastIndex=0;xZ.test(Q);)++ne;return ne}var SZ=w9e;function A9e(Q){return _d(Q)?SZ(Q):_Z(Q)}var wd=A9e;var T9e=Math.ceil;function M9e(Q,ne){ne=ne===void 0?" ":Gl(ne);var ge=ne.length;if(ge<2)return ge?Cx(ne,Q):ne;var je=Cx(ne,T9e(Q/wd(ne)));return _d(ne)?mf(Nu(je),0,Q).join(""):je.slice(0,Q)}var wm=M9e;var E9e=Math.ceil,S9e=Math.floor;function k9e(Q,ne,ge){Q=En(Q),ne=Bi(ne);var je=ne?wd(Q):0;if(!ne||je>=ne)return Q;var mt=(ne-je)/2;return wm(S9e(mt),ge)+Q+wm(E9e(mt),ge)}var kZ=k9e;function C9e(Q,ne,ge){Q=En(Q),ne=Bi(ne);var je=ne?wd(Q):0;return ne&&je-1;)Ar!==Q&&NZ.call(Ar,Tr,1),NZ.call(Q,Tr,1);return Q}var ry=V9e;function G9e(Q,ne){return Q&&Q.length&&ne&&ne.length?ry(Q,ne):Q}var Y6=G9e;var H9e=Oi(Y6),jZ=H9e;function W9e(Q,ne,ge){return Q&&Q.length&&ne&&ne.length?ry(Q,ne,vi(ge,2)):Q}var UZ=W9e;function $9e(Q,ne,ge){return Q&&Q.length&&ne&&ne.length?ry(Q,ne,void 0,ge):Q}var qZ=$9e;var Y9e=Array.prototype,X9e=Y9e.splice;function Z9e(Q,ne){for(var ge=Q?ne.length:0,je=ge-1;ge--;){var mt=ne[ge];if(ge==je||mt!==Lt){var Lt=mt;hc(mt)?X9e.call(Q,mt,1):ey(Q,mt)}}return Q}var X6=Z9e;var K9e=vc(function(Q,ne){var ge=Q==null?0:Q.length,je=Ag(Q,ne);return X6(Q,co(ne,function(mt){return hc(mt,ge)?+mt:mt}).sort(H6)),je}),VZ=K9e;var J9e=Math.floor,Q9e=Math.random;function eLe(Q,ne){return Q+J9e(Q9e()*(ne-Q+1))}var ay=eLe;var tLe=parseFloat,rLe=Math.min,aLe=Math.random;function iLe(Q,ne,ge){if(ge&&typeof ge!="boolean"&&ks(Q,ne,ge)&&(ne=ge=void 0),ge===void 0&&(typeof ne=="boolean"?(ge=ne,ne=void 0):typeof Q=="boolean"&&(ge=Q,Q=void 0)),Q===void 0&&ne===void 0?(Q=0,ne=1):(Q=nh(Q),ne===void 0?(ne=Q,Q=0):ne=nh(ne)),Q>ne){var je=Q;Q=ne,ne=je}if(ge||Q%1||ne%1){var mt=aLe();return rLe(Q+mt*(ne-Q+tLe("1e-"+((mt+"").length-1))),ne)}return ay(Q,ne)}var GZ=iLe;var nLe=Math.ceil,oLe=Math.max;function sLe(Q,ne,ge,je){for(var mt=-1,Lt=oLe(nLe((ne-Q)/(ge||1)),0),rr=Array(Lt);Lt--;)rr[je?Lt:++mt]=Q,Q+=ge;return rr}var HZ=sLe;function lLe(Q){return function(ne,ge,je){return je&&typeof je!="number"&&ks(ne,ge,je)&&(ge=je=void 0),ne=nh(ne),ge===void 0?(ge=ne,ne=0):ge=nh(ge),je=je===void 0?ne1&&ks(Q,ne[0],ne[1])?ne=[]:ge>2&&ks(ne[0],ne[1],ne[2])&&(ne=[ne[0]]),W6(Q,ls(ne,1),[])}),xK=$Le;var YLe=4294967295,XLe=YLe-1,ZLe=Math.floor,KLe=Math.min;function JLe(Q,ne,ge,je){var mt=0,Lt=Q==null?0:Q.length;if(Lt===0)return 0;ne=ge(ne);for(var rr=ne!==ne,Ar=ne===null,Tr=Al(ne),Sa=ne===void 0;mt>>1;function tFe(Q,ne,ge){var je=0,mt=Q==null?je:Q.length;if(typeof ne=="number"&&ne===ne&&mt<=eFe){for(;je>>1,rr=Q[Lt];rr!==null&&!Al(rr)&&(ge?rr<=ne:rr>>0,ge?(Q=En(Q),Q&&(typeof ne=="string"||ne!=null&&!Kg(ne))&&(ne=Gl(ne),!ne&&_d(Q))?mf(Nu(Q),0,ge):Q.split(ne,ge)):[]}var CK=hFe;var dFe="Expected a function",pFe=Math.max;function vFe(Q,ne){if(typeof Q!="function")throw new TypeError(dFe);return ne=ne==null?0:pFe(Bi(ne),0),Oi(function(ge){var je=ge[ne],mt=mf(ge,0,ne);return je&&vf(mt,je),ul(Q,this,mt)})}var DK=vFe;var mFe=xd(function(Q,ne,ge){return Q+(ge?" ":"")+Mg(ne)}),LK=mFe;function gFe(Q,ne,ge){return Q=En(Q),ge=ge==null?0:lh(Bi(ge),0,Q.length),ne=Gl(ne),Q.slice(ge,ge+ne.length)==ne}var FK=gFe;function yFe(){return{}}var PK=yFe;function _Fe(){return""}var IK=_Fe;function xFe(){return!0}var RK=xFe;var bFe=$0(function(Q,ne){return Q-ne},0),zK=bFe;function wFe(Q){return Q&&Q.length?Qg(Q,Ss):0}var BK=wFe;function AFe(Q,ne){return Q&&Q.length?Qg(Q,vi(ne,2)):0}var OK=AFe;function TFe(Q){var ne=Q==null?0:Q.length;return ne?Pl(Q,1,ne):[]}var NK=TFe;function MFe(Q,ne,ge){return Q&&Q.length?(ne=ge||ne===void 0?1:Bi(ne),Pl(Q,0,ne<0?0:ne)):[]}var jK=MFe;function EFe(Q,ne,ge){var je=Q==null?0:Q.length;return je?(ne=ge||ne===void 0?1:Bi(ne),ne=je-ne,Pl(Q,ne<0?0:ne,je)):[]}var UK=EFe;function SFe(Q,ne){return Q&&Q.length?uv(Q,vi(ne,3),!1,!0):[]}var qK=SFe;function kFe(Q,ne){return Q&&Q.length?uv(Q,vi(ne,3)):[]}var VK=kFe;function CFe(Q,ne){return ne(Q),Q}var GK=CFe;var HK=Object.prototype,DFe=HK.hasOwnProperty;function LFe(Q,ne,ge,je){return Q===void 0||Hl(Q,HK[ge])&&!DFe.call(je,ge)?ne:Q}var hD=LFe;var FFe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function PFe(Q){return"\\"+FFe[Q]}var WK=PFe;var IFe=/<%=([\s\S]+?)%>/g,eA=IFe;var RFe=/<%-([\s\S]+?)%>/g,$K=RFe;var zFe=/<%([\s\S]+?)%>/g,YK=zFe;var BFe={escape:$K,evaluate:YK,interpolate:eA,variable:"",imports:{_:{escape:M6}}},Lx=BFe;var OFe="Invalid `variable` option passed into `_.template`",NFe="Invalid `imports` option passed into `_.template`",jFe=/\b__p \+= '';/g,UFe=/\b(__p \+=) '' \+/g,qFe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,XK=/[()=,{}\[\]\/\s]/,VFe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,tA=/($^)/,GFe=/['\n\r\u2028\u2029\\]/g,HFe=Object.prototype,ZK=HFe.hasOwnProperty;function WFe(Q,ne,ge){var je=Lx.imports._.templateSettings||Lx;ge&&ks(Q,ne,ge)&&(ne=void 0),Q=En(Q),ne=xx({},ne,je,hD);var mt=xx({},ne.imports,je.imports,hD),Lt=jo(mt),rr=Yg(mt,Lt);ou(Lt,function(Rn){if(XK.test(Rn))throw new Error(NFe)});var Ar,Tr,Sa=0,ya=ne.interpolate||tA,Fa="__p += '",Ii=RegExp((ne.escape||tA).source+"|"+ya.source+"|"+(ya===eA?VFe:tA).source+"|"+(ne.evaluate||tA).source+"|$","g"),vn=ZK.call(ne,"sourceURL")?"//# sourceURL="+(ne.sourceURL+"").replace(/\s/g," ")+` -`:"";Q.replace(Ii,function(Rn,Si,ye,rl,Vu,Vs){return ye||(ye=rl),Fa+=Q.slice(Sa,Vs).replace(GFe,WK),Si&&(Ar=!0,Fa+=`' + -__e(`+Si+`) + -'`),Vu&&(Tr=!0,Fa+=`'; -`+Vu+`; -__p += '`),ye&&(Fa+=`' + -((__t = (`+ye+`)) == null ? '' : __t) + -'`),Sa=Vs+Rn.length,Rn}),Fa+=`'; -`;var ja=ZK.call(ne,"variable")&&ne.variable;if(!ja)Fa=`with (obj) { -`+Fa+` -} -`;else if(XK.test(ja))throw new Error(OFe);Fa=(Tr?Fa.replace(jFe,""):Fa).replace(UFe,"$1").replace(qFe,"$1;"),Fa="function("+(ja||"obj")+`) { -`+(ja?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(Ar?", __e = _.escape":"")+(Tr?`, __j = Array.prototype.join; +);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:jn("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function jn(pe,y){let N=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,ie=y.match(/in ([\w]+) ([\w]+)/g),fe=pe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),be=y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Re=be?be.concat(fe):fe,je={};return{fragmentSource:pe=pe.replace(N,(Ze,ut,ft,Dt,Gt)=>(je[Gt]=!0,ut==="define"?` +#ifndef HAS_UNIFORM_u_${Gt} +in ${ft} ${Dt} ${Gt}; +#else +uniform ${ft} ${Dt} u_${Gt}; +#endif +`:` +#ifdef HAS_UNIFORM_u_${Gt} + ${ft} ${Dt} ${Gt} = u_${Gt}; +#endif +`)),vertexSource:y=y.replace(N,(Ze,ut,ft,Dt,Gt)=>{let Kt=Dt==="float"?"vec2":"vec4",st=Gt.match(/color/)?"color":Kt;return je[Gt]?ut==="define"?` +#ifndef HAS_UNIFORM_u_${Gt} +uniform lowp float u_${Gt}_t; +in ${ft} ${Kt} a_${Gt}; +out ${ft} ${Dt} ${Gt}; +#else +uniform ${ft} ${Dt} u_${Gt}; +#endif +`:st==="vec4"?` +#ifndef HAS_UNIFORM_u_${Gt} + ${Gt} = a_${Gt}; +#else + ${ft} ${Dt} ${Gt} = u_${Gt}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${Gt} + ${Gt} = unpack_mix_${st}(a_${Gt}, u_${Gt}_t); +#else + ${ft} ${Dt} ${Gt} = u_${Gt}; +#endif +`:ut==="define"?` +#ifndef HAS_UNIFORM_u_${Gt} +uniform lowp float u_${Gt}_t; +in ${ft} ${Kt} a_${Gt}; +#else +uniform ${ft} ${Dt} u_${Gt}; +#endif +`:st==="vec4"?` +#ifndef HAS_UNIFORM_u_${Gt} + ${ft} ${Dt} ${Gt} = a_${Gt}; +#else + ${ft} ${Dt} ${Gt} = u_${Gt}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${Gt} + ${ft} ${Dt} ${Gt} = unpack_mix_${st}(a_${Gt}, u_${Gt}_t); +#else + ${ft} ${Dt} ${Gt} = u_${Gt}; +#endif +`}),staticAttributes:ie,staticUniforms:Re}}class Xn{constructor(y,N,ie){this.vertexBuffer=y,this.indexBuffer=N,this.segments=ie}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var eo=e.aS([{name:"a_pos",type:"Int16",components:2}]);let gi="#define PROJECTION_MERCATOR",qi="mercator";class io{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return qi}get shaderDefine(){return gi}get shaderPreludeCode(){return Ai.projectionMercator}get vertexShaderPreludeCode(){return Ai.projectionMercator.vertexSource}get subdivisionGranularity(){return e.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(y){}getMeshFromTileID(y,N,ie,fe,be){if(this._cachedMesh)return this._cachedMesh;let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(e.a6,0),Re.emplaceBack(0,e.a6),Re.emplaceBack(e.a6,e.a6);let je=y.createVertexBuffer(Re,eo.members),Ze=e.aV.simpleSegment(0,0,4,2),ut=new e.aW;ut.emplaceBack(1,0,2),ut.emplaceBack(1,2,3);let ft=y.createIndexBuffer(ut);return this._cachedMesh=new Xn(je,ft,Ze),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(y){}}class oo{constructor(y=0,N=0,ie=0,fe=0){if(isNaN(y)||y<0||isNaN(N)||N<0||isNaN(ie)||ie<0||isNaN(fe)||fe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=y,this.bottom=N,this.left=ie,this.right=fe}interpolate(y,N,ie){return N.top!=null&&y.top!=null&&(this.top=e.H.number(y.top,N.top,ie)),N.bottom!=null&&y.bottom!=null&&(this.bottom=e.H.number(y.bottom,N.bottom,ie)),N.left!=null&&y.left!=null&&(this.left=e.H.number(y.left,N.left,ie)),N.right!=null&&y.right!=null&&(this.right=e.H.number(y.right,N.right,ie)),this}getCenter(y,N){let ie=e.al((this.left+y-this.right)/2,0,y),fe=e.al((this.top+N-this.bottom)/2,0,N);return new e.P(ie,fe)}equals(y){return this.top===y.top&&this.bottom===y.bottom&&this.left===y.left&&this.right===y.right}clone(){return new oo(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Vn(pe,y){if(!pe.renderWorldCopies||pe.lngRange)return;let N=y.lng-pe.center.lng;y.lng+=N>180?-360:N<-180?360:0}function qn(pe){return Math.max(0,Math.floor(pe))}class Hi{constructor(y,N){var ie;this.applyConstrain=(fe,be)=>this._constrainOverride!==null?this._constrainOverride(fe,be):this._callbacks.defaultConstrain(fe,be),this._callbacks=y,this._tileSize=512,this._renderWorldCopies=N?.renderWorldCopies===void 0||!!N?.renderWorldCopies,this._minZoom=N?.minZoom||0,this._maxZoom=N?.maxZoom||22,this._minPitch=N?.minPitch==null?0:N?.minPitch,this._maxPitch=N?.maxPitch==null?60:N?.maxPitch,this._constrainOverride=(ie=N?.constrainOverride)!==null&&ie!==void 0?ie:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new oo,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(y,N,ie){this._constrainOverride=y.constrainOverride,this._latRange=y.latRange,this._lngRange=y.lngRange,this._width=y.width,this._height=y.height,this._center=y.center,this._elevation=y.elevation,this._minElevationForCurrentTile=y.minElevationForCurrentTile,this._zoom=y.zoom,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=y.bearingInRadians,this._fovInRadians=y.fovInRadians,this._pitchInRadians=y.pitchInRadians,this._rollInRadians=y.rollInRadians,this._unmodified=y.unmodified,this._edgeInsets=new oo(y.padding.top,y.padding.bottom,y.padding.left,y.padding.right),this._minZoom=y.minZoom,this._maxZoom=y.maxZoom,this._minPitch=y.minPitch,this._maxPitch=y.maxPitch,this._renderWorldCopies=y.renderWorldCopies,this._cameraToCenterDistance=y.cameraToCenterDistance,this._nearZ=y.nearZ,this._farZ=y.farZ,this._autoCalculateNearFarZ=!ie&&y.autoCalculateNearFarZ,N&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(y){this._minElevationForCurrentTile=y}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(y){this._minZoom!==y&&(this._minZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(y){this._maxZoom!==y&&(this._maxZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(y){this._minPitch!==y&&(this._minPitch=y,this.setPitch(Math.max(this.pitch,y)))}get maxPitch(){return this._maxPitch}setMaxPitch(y){this._maxPitch!==y&&(this._maxPitch=y,this.setPitch(Math.min(this.pitch,y)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(y){y===void 0?y=!0:y===null&&(y=!1),this._renderWorldCopies=y}get constrainOverride(){return this._constrainOverride}setConstrainOverride(y){y===void 0&&(y=null),this._constrainOverride!==y&&(this._constrainOverride=y,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(y){let N=e.X(y,-180,180)*Math.PI/180;var ie,fe,be,Re,je,Ze,ut,ft,Dt;this._bearingInRadians!==N&&(this._unmodified=!1,this._bearingInRadians=N,this._calcMatrices(),this._rotationMatrix=n(),ie=this._rotationMatrix,be=-this._bearingInRadians,Re=(fe=this._rotationMatrix)[0],je=fe[1],Ze=fe[2],ut=fe[3],ft=Math.sin(be),Dt=Math.cos(be),ie[0]=Re*Dt+Ze*ft,ie[1]=je*Dt+ut*ft,ie[2]=Re*-ft+Ze*Dt,ie[3]=je*-ft+ut*Dt)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(y){let N=e.al(y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==N&&(this._unmodified=!1,this._pitchInRadians=N,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(y){let N=y/180*Math.PI;this._rollInRadians!==N&&(this._unmodified=!1,this._rollInRadians=N,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(y){y=e.al(y,.1,150),this.fov!==y&&(this._unmodified=!1,this._fovInRadians=e.an(y),this._calcMatrices())}get zoom(){return this._zoom}setZoom(y){let N=this.applyConstrain(this._center,y).zoom;this._zoom!==N&&(this._unmodified=!1,this._zoom=N,this._tileZoom=Math.max(0,Math.floor(N)),this._scale=e.ao(N),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(y){y.lat===this._center.lat&&y.lng===this._center.lng||(this._unmodified=!1,this._center=y,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(y){y!==this._elevation&&(this._elevation=y,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(y){this._edgeInsets.equals(y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,y,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(y,N){this._autoCalculateNearFarZ=!1,this._nearZ=y,this._farZ=N,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(y){return this._edgeInsets.equals(y)}interpolatePadding(y,N,ie){this._unmodified=!1,this._edgeInsets.interpolate(y,N,ie),this.constrainInternal(),this._calcMatrices()}resize(y,N,ie=!0){this._width=y,this._height=N,ie&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var y,N;return((y=this._latRange)===null||y===void 0?void 0:y.length)!==2||((N=this._lngRange)===null||N===void 0?void 0:N.length)!==2?null:new q([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(y){y?(this._lngRange=[y.getWest(),y.getEast()],this._latRange=[y.getSouth(),y.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(y,N){if(N.length===1)return[N[0],y];{let{minX:ie,minY:fe,maxX:be,maxY:Re}=e.a8.fromPoints(N).extend(y);return[new e.P(ie,fe),new e.P(be,fe),new e.P(be,Re),new e.P(ie,Re),new e.P(ie,fe)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let y=this._unmodified,{center:N,zoom:ie}=this.applyConstrain(this.center,this.zoom);this.setCenter(N),this.setZoom(ie),this._unmodified=y,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let y=e.ap(new Float64Array(16));e.S(y,y,[this._width/2,-this._height/2,1]),e.Q(y,y,[1,-1,0]),this._clipSpaceToPixelsMatrix=y,y=e.ap(new Float64Array(16)),e.S(y,y,[1,-1,1]),e.Q(y,y,[-1,-1,0]),e.S(y,y,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=y,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){let be=ie!==void 0?ie:this.bearing,Re=fe=fe!==void 0?fe:this.pitch,{distanceToCenter:je,clampedElevation:Ze}=this._distanceToCenterFromAltElevationPitch(N,this.elevation,Re),{x:ut,y:ft}=vt(Re,be),Dt=e.a7.fromLngLat(y,N),Gt,Kt,st=e.aY(1,Dt.y),It=0;do{if(It+=1,It>10)break;Kt=je/st,Gt=new e.a7(Dt.x+ut*Kt,Dt.y+ft*Kt),st=1/Gt.meterInMercatorCoordinateUnits()}while(Math.abs(je-Kt*st)>1e-12);return{center:Gt.toLngLat(),elevation:Ze,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/Kt/this.tileSize)}}recalculateZoomAndCenter(y){if(this.elevation-y==0)return;let N=1/this.worldSize,ie=e.aq(1,this.center.lat)*this.worldSize,fe=e.a7.fromLngLat(this.center,this.elevation),be=fe.x/N,Re=fe.y/N,je=fe.z/N,Ze=this.pitch,ut=this.bearing,{x:ft,y:Dt,z:Gt}=vt(Ze,ut),Kt=this.cameraToCenterDistance,st=be+Kt*-ft,It=Re+Kt*-Dt,Ut=je+Kt*Gt,{distanceToCenter:ir,clampedElevation:dr}=this._distanceToCenterFromAltElevationPitch(Ut/ie,y,Ze),Ar=ir*ie,hr=new e.a7((st+ft*Ar)*N,(It+Dt*Ar)*N,0).toLngLat(),vr=e.aq(1,hr.lat),Or=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/ir/vr/this.tileSize);this._elevation=dr,this._center=hr,this.setZoom(Or)}_distanceToCenterFromAltElevationPitch(y,N,ie){let fe=-Math.cos(e.an(ie)),be=y-N,Re,je=N;return fe*be>=0||Math.abs(fe)<.1?(Re=1e4,je=y+Re*fe):Re=-be/fe,{distanceToCenter:Re,clampedElevation:je}}getCameraPoint(){let y=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(y*Math.sin(this.rollInRadians),y*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/y).toLngLat()}getMercatorTileCoordinates(y){if(!y)return[0,0,1,1];let N=y.canonical.z>=0?1<this.max[0]||y.aabb.min[1]>this.max[1]||y.aabb.min[2]>this.max[2]||y.aabb.max[0]0?(N+=y[fe]*this.min[fe],ie+=y[fe]*this.max[fe]):(ie+=y[fe]*this.min[fe],N+=y[fe]*this.max[fe]);return N>=0?2:ie<0?0:1}}class Ro{distanceToTile2d(y,N,ie,fe){let be=fe,Re=be.distanceX([y,N]),je=be.distanceY([y,N]);return Math.hypot(Re,je)}getWrap(y,N,ie){return ie}getTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ft=new e.a3(y.z,N,y.z,y.x,y.y),Dt=fe.terrain.getMinMaxElevation(ft);je=(be=Dt.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=Dt.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}let ut=1<fe}allowWorldCopies(){return!0}prepareNextFrame(){}}class go{constructor(y,N,ie){this.points=y,this.planes=N,this.aabb=ie}static fromInvProjectionMatrix(y,N=1,ie=0,fe,be){let Re=be?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],je=Math.pow(2,ie),Ze=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Gt=>function(Kt,st,It,Ut){let ir=e.aE([],Kt,st),dr=1/ir[3]/It*Ut;return e.b4(ir,ir,[dr,dr,1/ir[3],dr])}(Gt,y,N,je));fe&&function(Gt,Kt,st,It){let Ut=It?4:0,ir=It?0:4,dr=0,Ar=[],hr=[];for(let Cr=0;Cr<4;Cr++){let ta=e.b0([],Gt[Cr+ir],Gt[Cr+Ut]),ka=e.b5(ta);e.aZ(ta,ta,1/ka),Ar.push(ka),hr.push(ta)}for(let Cr=0;Cr<4;Cr++){let ta=e.b6(Gt[Cr+Ut],hr[Cr],st);dr=ta!==null&&ta>=0?Math.max(dr,ta):Math.max(dr,Ar[Cr])}let vr=function(Cr,ta){let ka=e.b0([],Cr[ta[0]],Cr[ta[1]]),Ta=e.b0([],Cr[ta[2]],Cr[ta[1]]),Ra=[0,0,0,0];return e.b1(Ra,e.b2([],ka,Ta)),Ra[3]=-e.b3(Ra,Cr[ta[0]]),Ra}(Gt,Kt),Or=function(Cr,ta){let ka=e.b7(Cr),Ta=e.b8([],Cr,1/ka),Ra=e.b0([],ta,e.aZ([],Ta,e.b3(ta,Ta))),ua=e.b7(Ra);if(ua>0){let ia=Math.sqrt(1-Ta[3]*Ta[3]),ga=e.aZ([],Ta,-Ta[3]),da=e.a_([],ga,e.aZ([],Ra,ia/ua));return e.b9(ta,da)}return null}(st,vr);if(Or!==null){let Cr=Or/e.b3(hr[0],vr);dr=Math.min(dr,Cr)}for(let Cr=0;Cr<4;Cr++){let ta=Math.min(dr,Ar[Cr]);Gt[Cr+ir]=[Gt[Cr+Ut][0]+hr[Cr][0]*ta,Gt[Cr+Ut][1]+hr[Cr][1]*ta,Gt[Cr+Ut][2]+hr[Cr][2]*ta,1]}}(Ze,Re[0],fe,be);let ut=Re.map(Gt=>{let Kt=e.b0([],Ze[Gt[0]],Ze[Gt[1]]),st=e.b0([],Ze[Gt[2]],Ze[Gt[1]]),It=e.b1([],e.b2([],Kt,st)),Ut=-e.b3(It,Ze[Gt[1]]);return It.concat(Ut)}),ft=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Dt=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let Gt of Ze)for(let Kt=0;Kt<3;Kt++)ft[Kt]=Math.min(ft[Kt],Gt[Kt]),Dt[Kt]=Math.max(Dt[Kt],Gt[Kt]);return new go(Ze,ut,new Mi(ft,Dt))}}class Eo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(y,N){}constructor(y){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(N,ie)=>{ie=e.al(+ie,this.minZoom,this.maxZoom);let fe={center:new e.W(N.lng,N.lat),zoom:ie},be=this._helper._lngRange;if(!this._helper._renderWorldCopies&&be===null){let hr=179.9999999999;be=[-hr,hr]}let Re=this.tileSize*e.ao(fe.zoom),je=0,Ze=Re,ut=0,ft=Re,Dt=0,Gt=0,{x:Kt,y:st}=this.size;if(this._helper._latRange){let hr=this._helper._latRange;je=e.Y(hr[1])*Re,Ze=e.Y(hr[0])*Re,Ze-jeZe&&(dr=Ze-hr)}if(be){let hr=(ut+ft)/2,vr=It;this._helper._renderWorldCopies&&(vr=e.X(It,hr-Re/2,hr+Re/2));let Or=Kt/2;vr-Orft&&(ir=ft-Or)}if(ir!==void 0||dr!==void 0){let hr=new e.P(ir??It,dr??Ut);fe.center=_r(Re,hr).wrap()}return fe},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new Ro}clone(){let y=new Eo;return y.apply(this,!1),y}apply(y,N,ie){this._helper.apply(y,N,ie)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(y){let N=[new e.ba(0,y)];if(this._helper._renderWorldCopies){let ie=this.screenPointToMercatorCoordinate(new e.P(0,0)),fe=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),be=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),Re=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),je=Math.floor(Math.min(ie.x,fe.x,be.x,Re.x)),Ze=Math.floor(Math.max(ie.x,fe.x,be.x,Re.x)),ut=1;for(let ft=je-ut;ft<=Ze+ut;ft++)ft!==0&&N.push(new e.ba(ft,y))}return N}getCameraFrustum(){return go.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(y){let N=this.screenPointToLocation(this.centerPoint,y),ie=y?y.getElevationForLngLatZoom(N,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(ie)}setLocationAtPoint(y,N){let ie=e.aq(this.elevation,this.center.lat),fe=this.screenPointToMercatorCoordinateAtZ(N,ie),be=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,ie),Re=e.a7.fromLngLat(y),je=new e.a7(Re.x-(fe.x-be.x),Re.y-(fe.y-be.y));this.setCenter(je?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(y,N){return N?this.coordinatePoint(e.a7.fromLngLat(y),N.getElevationForLngLat(y,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(y))}screenPointToLocation(y,N){var ie;return(ie=this.screenPointToMercatorCoordinate(y,N))===null||ie===void 0?void 0:ie.toLngLat()}screenPointToMercatorCoordinate(y,N){if(N){let ie=N.pointCoordinate(y);if(ie!=null)return ie}return this.screenPointToMercatorCoordinateAtZ(y)}screenPointToMercatorCoordinateAtZ(y,N){let ie=N||0,fe=[y.x,y.y,0,1],be=[y.x,y.y,1,1];e.aE(fe,fe,this._pixelMatrixInverse),e.aE(be,be,this._pixelMatrixInverse);let Re=fe[3],je=be[3],Ze=fe[1]/Re,ut=be[1]/je,ft=fe[2]/Re,Dt=be[2]/je,Gt=ft===Dt?0:(ie-ft)/(Dt-ft);return new e.a7(e.H.number(fe[0]/Re,be[0]/je,Gt)/this.worldSize,e.H.number(Ze,ut,Gt)/this.worldSize,ie)}coordinatePoint(y,N=0,ie=this._pixelMatrix){let fe=[y.x*this.worldSize,y.y*this.worldSize,N,1];return e.aE(fe,fe,ie),new e.P(fe[0]/fe[3],fe[1]/fe[3])}getBounds(){let y=Math.max(0,this._helper._height/2-Xt(this));return new q().extend(this.screenPointToLocation(new e.P(0,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(y,N){return N?N.pointCoordinate(y)!=null:y.y>this.height/2-Xt(this)}calculatePosMatrix(y,N=!1,ie){var fe;let be=(fe=y.key)!==null&&fe!==void 0?fe:e.bb(y.wrap,y.canonical.z,y.canonical.z,y.canonical.x,y.canonical.y),Re=N?this._alignedPosMatrixCache:this._posMatrixCache;if(Re.has(be)){let ut=Re.get(be);return ie?ut.f32:ut.f64}let je=or(y,this.worldSize);e.U(je,N?this._alignedProjMatrix:this._viewProjMatrix,je);let Ze={f64:je,f32:new Float32Array(je)};return Re.set(be,Ze),ie?Ze.f32:Ze.f64}calculateFogMatrix(y){let N=y.key,ie=this._fogMatrixCacheF32;if(ie.has(N))return ie.get(N);let fe=or(y,this.worldSize);return e.U(fe,this._fogMatrix,fe),ie.set(N,new Float32Array(fe)),ie.get(N)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}_calculateNearFarZIfNeeded(y,N,ie){if(!this._helper.autoCalculateNearFarZ)return;let fe=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),be=y-fe*this._helper._pixelPerMeter/Math.cos(N),Re=fe<0?be:y,je=Math.PI/2+this.pitchInRadians,Ze=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+ie.y/this.height),ut=Math.sin(Ze)*Re/Math.sin(e.al(Math.PI-je-Ze,.01,Math.PI-.01)),ft=Xt(this),Dt=Math.atan(ft/this._helper.cameraToCenterDistance),Gt=e.an(.75),Kt=Dt>Gt?2*Dt*(.5+ie.y/(2*ft)):Gt,st=Math.sin(Kt)*Re/Math.sin(e.al(Math.PI-je-Kt,.01,Math.PI-.01)),It=Math.min(ut,st);this._helper._farZ=1.01*(Math.cos(Math.PI/2-N)*It+Re),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let y=this.centerOffset,N=rr(this.worldSize,this.center),ie=N.x,fe=N.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;let be=e.an(Math.min(this.pitch,$t)),Re=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(be)),je;var Ze,ut;this._calculateNearFarZIfNeeded(Re,be,y),je=new Float64Array(16),e.bc(je,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ze=this._invProjMatrix)[0]=1/(ut=je)[0],Ze[1]=0,Ze[2]=0,Ze[3]=0,Ze[4]=0,Ze[5]=1/ut[5],Ze[6]=0,Ze[7]=0,Ze[8]=0,Ze[9]=0,Ze[10]=0,Ze[11]=1/ut[14],Ze[12]=0,Ze[13]=0,Ze[14]=-1,Ze[15]=ut[10]/ut[14],je[8]=2*-y.x/this._helper._width,je[9]=2*y.y/this._helper._height,this._projectionMatrix=e.bd(je),e.S(je,je,[1,-1,1]),e.Q(je,je,[0,0,-this._helper.cameraToCenterDistance]),e.be(je,je,-this.rollInRadians),e.bf(je,je,this.pitchInRadians),e.be(je,je,-this.bearingInRadians),e.Q(je,je,[-ie,-fe,0]),this._mercatorMatrix=e.S([],je,[this.worldSize,this.worldSize,this.worldSize]),e.S(je,je,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je),e.Q(je,je,[0,0,-this.elevation]),this._viewProjMatrix=je,this._invViewProjMatrix=e.bg([],je);let ft=[0,0,-1,1];e.aE(ft,ft,this._invViewProjMatrix),this._cameraPosition=[ft[0]/ft[3],ft[1]/ft[3],ft[2]/ft[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,Re,this._helper._farZ),this._fogMatrix[8]=2*-y.x/this.width,this._fogMatrix[9]=2*y.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-ie,-fe,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je);let Dt=this._helper._width%2/2,Gt=this._helper._height%2/2,Kt=Math.cos(this.bearingInRadians),st=Math.sin(-this.bearingInRadians),It=ie-Math.round(ie)+Kt*Dt+st*Gt,Ut=fe-Math.round(fe)+Kt*Gt+st*Dt,ir=new Float64Array(je);if(e.Q(ir,ir,[It>.5?It-1:It,Ut>.5?Ut-1:Ut,0]),this._alignedProjMatrix=ir,je=e.bg(new Float64Array(16),this._pixelMatrix),!je)throw new Error("failed to invert matrix");this._pixelMatrixInverse=je,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let y=this.screenPointToMercatorCoordinate(new e.P(0,0)),N=[y.x*this.worldSize,y.y*this.worldSize,0,1];return e.aE(N,N,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/y).toLngLat()}lngLatToCameraDepth(y,N){let ie=e.a7.fromLngLat(y),fe=[ie.x*this.worldSize,ie.y*this.worldSize,N,1];return e.aE(fe,fe,this._viewProjMatrix),fe[2]/fe[3]}getProjectionData(y){let{overscaledTileID:N,aligned:ie,applyTerrainMatrix:fe}=y,be=this._helper.getMercatorTileCoordinates(N),Re=N?this.calculatePosMatrix(N,ie,!0):null,je;return je=N?.terrainRttPosMatrix32f&&fe?N.terrainRttPosMatrix32f:Re||e.bh(),{mainMatrix:je,tileMercatorCoords:be,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:je}}isLocationOccluded(y){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(y,N,ie){return 1}transformLightDirection(y){return e.a$(y)}getRayDirectionFromPixel(y){throw new Error("Not implemented.")}projectTileCoordinates(y,N,ie,fe){let be=this.calculatePosMatrix(ie),Re;fe?(Re=[y,N,fe(y,N),1],e.aE(Re,Re,be)):(Re=[y,N,0,1],Oa(Re,Re,be));let je=Re[3];return{point:new e.P(Re[0]/je,Re[1]/je),signedDistanceFromCamera:je,isOccluded:!1}}populateCache(y){for(let N of y)this.calculatePosMatrix(N)}getMatrixForModel(y,N){let ie=e.a7.fromLngLat(y,N),fe=ie.meterInMercatorCoordinateUnits(),be=e.bi();return e.Q(be,be,[ie.x,ie.y,ie.z]),e.be(be,be,Math.PI),e.bf(be,be,Math.PI/2),e.S(be,be,[-fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=new e.a3(0,0,0,0,0),ie=this.getProjectionData({overscaledTileID:N,applyGlobeMatrix:y}),fe=or(N,this.worldSize);e.U(fe,this._viewProjMatrix,fe),ie.tileMercatorCoords=[0,0,1,1];let be=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],Re=e.bj();return e.S(Re,fe,be),ie.fallbackMatrix=Re,ie.mainMatrix=Re,ie}getFastPathSimpleProjectionMatrix(y){return this.calculatePosMatrix(y)}}function Ao(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ds(pe){if(pe.useSlerp)if(pe.k<1){let y=e.bk(pe.startEulerAngles.roll,pe.startEulerAngles.pitch,pe.startEulerAngles.bearing),N=e.bk(pe.endEulerAngles.roll,pe.endEulerAngles.pitch,pe.endEulerAngles.bearing),ie=new Float64Array(4);e.bl(ie,y,N,pe.k);let fe=e.bm(ie);pe.tr.setRoll(fe.roll),pe.tr.setPitch(fe.pitch),pe.tr.setBearing(fe.bearing)}else pe.tr.setRoll(pe.endEulerAngles.roll),pe.tr.setPitch(pe.endEulerAngles.pitch),pe.tr.setBearing(pe.endEulerAngles.bearing);else pe.tr.setRoll(e.H.number(pe.startEulerAngles.roll,pe.endEulerAngles.roll,pe.k)),pe.tr.setPitch(e.H.number(pe.startEulerAngles.pitch,pe.endEulerAngles.pitch,pe.k)),pe.tr.setBearing(e.H.number(pe.startEulerAngles.bearing,pe.endEulerAngles.bearing,pe.k))}function jo(pe,y,N,ie,fe){let be=fe.padding,Re=rr(fe.worldSize,N.getNorthWest()),je=rr(fe.worldSize,N.getNorthEast()),Ze=rr(fe.worldSize,N.getSouthEast()),ut=rr(fe.worldSize,N.getSouthWest()),ft=e.an(-ie),Dt=Re.rotate(ft),Gt=je.rotate(ft),Kt=Ze.rotate(ft),st=ut.rotate(ft),It=new e.P(Math.max(Dt.x,Gt.x,st.x,Kt.x),Math.max(Dt.y,Gt.y,st.y,Kt.y)),Ut=new e.P(Math.min(Dt.x,Gt.x,st.x,Kt.x),Math.min(Dt.y,Gt.y,st.y,Kt.y)),ir=It.sub(Ut),dr=(fe.width-(be.left+be.right+y.left+y.right))/ir.x,Ar=(fe.height-(be.top+be.bottom+y.top+y.bottom))/ir.y;if(Ar<0||dr<0)return void Ao();let hr=Math.min(e.ar(fe.scale*Math.min(dr,Ar)),pe.maxZoom),vr=e.P.convert(pe.offset),Or=new e.P((y.left-y.right)/2,(y.top-y.bottom)/2).rotate(e.an(ie)),Cr=vr.add(Or).mult(fe.scale/e.ao(hr));return{center:_r(fe.worldSize,Re.add(Ze).div(2).sub(Cr)),zoom:hr,bearing:ie}}class Wo{get useGlobeControls(){return!1}handlePanInertia(y,N){let ie=y.mag(),fe=Math.abs(Xt(N));return{easingOffset:y.mult(Math.min(.75*fe/ie,1)),easingCenter:N.center}}handleMapControlsRollPitchBearingZoom(y,N){y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta),y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta)}handleMapControlsPan(y,N,ie){y.around.distSqr(N.centerPoint)<.01||N.setLocationAtPoint(ie,y.around)}cameraForBoxAndBearing(y,N,ie,fe,be){return jo(y,N,ie,fe,be)}handleJumpToCenterZoom(y,N){y.zoom!==(N.zoom!==void 0?+N.zoom:y.zoom)&&y.setZoom(+N.zoom),N.center!==void 0&&y.setCenter(e.W.convert(N.center))}handleEaseTo(y,N){let ie=y.zoom,fe=y.padding,be={roll:y.roll,pitch:y.pitch,bearing:y.bearing},Re={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},je=N.zoom!==void 0,Ze=!y.isPaddingEqual(N.padding),ut=!1,ft=je?+N.zoom:y.zoom,Dt=y.centerPoint.add(N.offsetAsPoint),Gt=y.screenPointToLocation(Dt),{center:Kt,zoom:st}=y.applyConstrain(e.W.convert(N.center||Gt),ft??ie);Vn(y,Kt);let It=rr(y.worldSize,Gt),Ut=rr(y.worldSize,Kt).sub(It),ir=e.ao(st-ie);return ut=st!==ie,{easeFunc:dr=>{if(ut&&y.setZoom(e.H.number(ie,st,dr)),e.bn(be,Re)||ds({startEulerAngles:be,endEulerAngles:Re,tr:y,k:dr,useSlerp:be.roll!=Re.roll}),Ze&&(y.interpolatePadding(fe,N.padding,dr),Dt=y.centerPoint.add(N.offsetAsPoint)),N.around)y.setLocationAtPoint(N.around,N.aroundPoint);else{let Ar=e.ao(y.zoom-ie),hr=st>ie?Math.min(2,ir):Math.max(.5,ir),vr=Math.pow(hr,1-dr),Or=_r(y.worldSize,It.add(Ut.mult(dr*vr)).mult(Ar));y.setLocationAtPoint(y.renderWorldCopies?Or.wrap():Or,Dt)}},isZooming:ut,elevationCenter:Kt}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.zoom,be=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),ie?+N.zoom:fe),Re=be.center,je=be.zoom;Vn(y,Re);let Ze=rr(y.worldSize,N.locationAtOffset),ut=rr(y.worldSize,Re).sub(Ze),ft=ut.mag(),Dt=e.ao(je-fe),Gt;if(N.minZoom!==void 0){let Kt=Math.min(+N.minZoom,fe,je),st=y.applyConstrain(Re,Kt).zoom;Gt=e.ao(st-fe)}return{easeFunc:(Kt,st,It,Ut)=>{y.setZoom(Kt===1?je:fe+e.ar(st));let ir=Kt===1?Re:_r(y.worldSize,Ze.add(ut.mult(It)).mult(st));y.setLocationAtPoint(y.renderWorldCopies?ir.wrap():ir,Ut)},scaleOfZoom:Dt,targetCenter:Re,scaleOfMinZoom:Gt,pixelPathLength:ft}}}class to{constructor(y,N,ie){this.blendFunction=y,this.blendColor=N,this.mask=ie}}to.Replace=[1,0],to.disabled=new to(to.Replace,e.bo.transparent,[!1,!1,!1,!1]),to.unblended=new to(to.Replace,e.bo.transparent,[!0,!0,!0,!0]),to.alphaBlended=new to([1,771],e.bo.transparent,[!0,!0,!0,!0]);let wo=2305;class pi{constructor(y,N,ie){this.enable=y,this.mode=N,this.frontFace=ie}}pi.disabled=new pi(!1,1029,wo),pi.backCCW=new pi(!0,1029,wo),pi.frontCCW=new pi(!0,1028,wo);class Vi{constructor(y,N,ie){this.func=y,this.mask=N,this.range=ie}}Vi.ReadOnly=!1,Vi.ReadWrite=!0,Vi.disabled=new Vi(519,Vi.ReadOnly,[0,1]);let Io=7680;class Xi{constructor(y,N,ie,fe,be,Re){this.test=y,this.ref=N,this.mask=ie,this.fail=fe,this.depthFail=be,this.pass=Re}}function Ko(pe){return typeof WebGL2RenderingContext<"u"&&pe instanceof WebGL2RenderingContext}Xi.disabled=new Xi({func:519,mask:0},0,0,Io,Io,Io);class Uo{get awaitingQuery(){return!!this._readbackQueue}constructor(y){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=y;let N=y.context,ie=N.gl;this._texFormat=ie.RGBA,this._texType=ie.UNSIGNED_BYTE;let fe=new e.aU;fe.emplaceBack(-1,-1),fe.emplaceBack(2,-1),fe.emplaceBack(-1,2);let be=new e.aW;be.emplaceBack(0,1,2),this._fullscreenTriangle=new Xn(N.createVertexBuffer(fe,eo.members),N.createIndexBuffer(be),e.aV.simpleSegment(0,0,fe.length,be.length)),this._resultBuffer=new Uint8Array(4),N.activeTexture.set(ie.TEXTURE1);let Re=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,Re),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.NEAREST),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.NEAREST),ie.texImage2D(ie.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=N.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(Re),Ko(ie)&&(this._pbo=ie.createBuffer(),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,this._pbo),ie.bufferData(ie.PIXEL_PACK_BUFFER,4,ie.STREAM_READ),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,null))}destroy(){let y=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),y.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(y,N){let ie=this._updateCount;return this._readbackQueue?ie>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():ie>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(y,N),this._updateCount++,this._measuredError}_bindFramebuffer(){let y=this._cachedRenderContext.context,N=y.gl;y.activeTexture.set(N.TEXTURE1),N.bindTexture(N.TEXTURE_2D,this._fbo.colorAttachment.get()),y.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(y,N){let ie=this._cachedRenderContext.context,fe=ie.gl;if(this._bindFramebuffer(),ie.viewport.set([0,0,this._texWidth,this._texHeight]),ie.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(ie,fe.TRIANGLES,Vi.disabled,Xi.disabled,to.unblended,pi.disabled,((be,Re)=>({u_input:be,u_output_expected:Re}))(y,N),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Ko(fe)){fe.bindBuffer(fe.PIXEL_PACK_BUFFER,this._pbo),fe.readBuffer(fe.COLOR_ATTACHMENT0),fe.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),fe.bindBuffer(fe.PIXEL_PACK_BUFFER,null);let be=fe.fenceSync(fe.SYNC_GPU_COMMANDS_COMPLETE,0);fe.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:be}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let y=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Ko(y)){let N=y.clientWaitSync(this._readbackQueue.sync,0,0);if(N===y.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(N===y.TIMEOUT_EXPIRED)return;y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.getBufferSubData(y.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),y.bindBuffer(y.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Uo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(y){let N=0;return N+=y[0]/256,N+=y[1]/65536,N+=y[2]/16777216,y[3]<127&&(N=-N),N/128}}let Ls=e.a6/128;function Ss(pe,y){let N=pe.granularity!==void 0?Math.max(pe.granularity,1):1,ie=N+(pe.generateBorders?2:0),fe=N+(pe.extendToNorthPole||pe.generateBorders?1:0)+(pe.extendToSouthPole||pe.generateBorders?1:0),be=ie+1,Re=fe+1,je=pe.generateBorders?-1:0,Ze=pe.generateBorders||pe.extendToNorthPole?-1:0,ut=N+(pe.generateBorders?1:0),ft=N+(pe.generateBorders||pe.extendToSouthPole?1:0),Dt=be*Re,Gt=ie*fe*6,Kt=be*Re>65536;if(Kt&&y==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let st=Kt||y==="32bit",It=new Int16Array(2*Dt),Ut=0;for(let Ar=Ze;Ar<=ft;Ar++)for(let hr=je;hr<=ut;hr++){let vr=hr/N*e.a6;hr===-1&&(vr=-Ls),hr===N+1&&(vr=e.a6+Ls);let Or=Ar/N*e.a6;Ar===-1&&(Or=pe.extendToNorthPole?e.bq:-Ls),Ar===N+1&&(Or=pe.extendToSouthPole?e.br:e.a6+Ls),It[Ut++]=vr,It[Ut++]=Or}let ir=st?new Uint32Array(Gt):new Uint16Array(Gt),dr=0;for(let Ar=0;Ar0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(y){this._mercatorProjection.updateGPUdependent(y),this._verticalPerspectiveProjection.updateGPUdependent(y)}getMeshFromTileID(y,N,ie,fe,be){return this.currentProjection.getMeshFromTileID(y,N,ie,fe,be)}setProjection(y){this._transitionable.setValue("type",y?.type||"mercator")}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}setErrorQueryLatitudeDegrees(y){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(y),this._mercatorProjection.setErrorQueryLatitudeDegrees(y)}}function _o(pe){let y=bs(pe.worldSize,pe.center.lat);return 2*Math.PI*y}function Pi(pe,y,N,ie,fe){let be=1/(1<1e-6){let ie=pe[0]/N,fe=Math.acos(pe[2]/N),be=(ie>0?fe:-fe)/Math.PI*180;return new e.W(e.X(be,-180,180),y)}return new e.W(0,y)}function hl(pe){return Math.cos(pe*Math.PI/180)}function ps(pe,y){let N=hl(pe),ie=hl(y);return e.ar(ie/N)}function dl(pe,y){let N=pe.rotate(y.bearingInRadians),ie=y.zoom+ps(y.center.lat,0),fe=e.bt(1/hl(y.center.lat),1/hl(Math.min(Math.abs(y.center.lat),60)),e.bw(ie,7,3,0,1)),be=360/_o({worldSize:y.worldSize,center:{lat:y.center.lat}});return new e.W(y.center.lng-N.x*be*fe,e.al(y.center.lat+N.y*be,-e.am,e.am))}function wu(pe){let y=.5*pe,N=Math.sin(y),ie=Math.cos(y);return Math.log(N+ie)-Math.log(ie-N)}function lu(pe,y,N,ie){let fe=pe.lat+N*ie;if(Math.abs(N)>1){let be=(Math.sign(pe.lat+N)!==Math.sign(pe.lat)?-Math.abs(pe.lat):Math.abs(pe.lat))*Math.PI/180,Re=Math.abs(pe.lat+N)*Math.PI/180,je=wu(be+ie*(Re-be)),Ze=wu(be),ut=wu(Re);return new e.W(pe.lng+y*((je-Ze)/(ut-Ze)),fe)}return new e.W(pe.lng+y*ie,fe)}class xc{constructor(y){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=y}swapBuffers(){if(!this._hadAnyChanges)return;let y=this._cachePrevious;this._cachePrevious=this._cache,this._cache=y,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(y,N,ie,fe){let be=`${y.z}_${y.x}_${y.y}_${fe?.terrain?"t":""}`,Re=this._cache.get(be);if(Re)return Re;let je=this._cachePrevious.get(be);if(je)return this._cache.set(be,je),je;let Ze=this._boundingVolumeFactory(y,N,ie,fe);return this._cache.set(be,Ze),this._hadAnyChanges=!0,Ze}}class Fl{constructor(y,N,ie,fe){this.min=ie,this.max=fe,this.points=y,this.planes=N}static fromAabb(y,N){let ie=[];for(let fe=0;fe<8;fe++)ie.push([1&~fe?y[0]:N[0],(fe>>1&1)==1?N[1]:y[1],(fe>>2&1)==1?N[2]:y[2]]);return new Fl(ie,[[-1,0,0,N[0]],[1,0,0,-y[0]],[0,-1,0,N[1]],[0,1,0,-y[1]],[0,0,-1,N[2]],[0,0,1,-y[2]]],y,N)}static fromCenterSizeAngles(y,N,ie){let fe=e.bA([],ie[0],ie[1],ie[2]),be=e.bB([],[N[0],0,0],fe),Re=e.bB([],[0,N[1],0],fe),je=e.bB([],[0,0,N[2]],fe),Ze=[...y],ut=[...y];for(let Dt=0;Dt<8;Dt++)for(let Gt=0;Gt<3;Gt++){let Kt=y[Gt]+be[Gt]*(1&~Dt?-1:1)+Re[Gt]*((Dt>>1&1)==1?1:-1)+je[Gt]*((Dt>>2&1)==1?1:-1);Ze[Gt]=Math.min(Ze[Gt],Kt),ut[Gt]=Math.max(ut[Gt],Kt)}let ft=[];for(let Dt=0;Dt<8;Dt++){let Gt=[...y];e.a_(Gt,Gt,e.aZ([],be,1&~Dt?-1:1)),e.a_(Gt,Gt,e.aZ([],Re,(Dt>>1&1)==1?1:-1)),e.a_(Gt,Gt,e.aZ([],je,(Dt>>2&1)==1?1:-1)),ft.push(Gt)}return new Fl(ft,[[...be,-e.b3(be,ft[0])],[...Re,-e.b3(Re,ft[0])],[...je,-e.b3(je,ft[0])],[-be[0],-be[1],-be[2],-e.b3(be,ft[7])],[-Re[0],-Re[1],-Re[2],-e.b3(Re,ft[7])],[-je[0],-je[1],-je[2],-e.b3(je,ft[7])]],Ze,ut)}intersectsFrustum(y){let N=!0,ie=this.points.length,fe=this.planes.length,be=y.planes.length,Re=y.points.length;for(let je=0;je=0&&ut++}if(ut===0)return 0;ut=0&&ut++}if(ut===0)return 0}return 1}intersectsPlane(y){let N=this.points.length,ie=0;for(let fe=0;fe=0&&ie++}return ie===N?2:ie===0?0:1}}function pl(pe,y,N){let ie=pe-y;return ie<0?-ie:Math.max(0,ie-N)}function $u(pe,y,N,ie,fe){let be=pe-N,Re;return Re=be<0?Math.min(-be,1+be-fe):be>fe?Math.min(Math.max(be-fe,0),1-be):0,Math.max(Re,pl(y,ie,fe))}class uu{constructor(){this._boundingVolumeCache=new xc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(y,N,ie,fe){let be=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(y,N,ie,fe){return this._boundingVolumeCache.getTileBoundingVolume(y,N,ie,fe)}_computeTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ut=new e.a3(y.z,N,y.z,y.x,y.y),ft=fe.terrain.getMinMaxElevation(ut);je=(be=ft.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=ft.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}if(je/=e.bD,Ze/=e.bD,je+=1,Ze+=1,y.z<=0)return Fl.fromAabb([-Ze,-Ze,-Ze],[Ze,Ze,Ze]);if(y.z===1)return Fl.fromAabb([y.x===0?-Ze:0,y.y===0?0:-Ze,-Ze],[y.x===0?0:Ze,y.y===0?Ze:0,Ze]);{let ut=[Pi(0,0,y.x,y.y,y.z),Pi(e.a6,0,y.x,y.y,y.z),Pi(e.a6,e.a6,y.x,y.y,y.z),Pi(0,e.a6,y.x,y.y,y.z)],ft=[];for(let Ra of ut)ft.push(e.aZ([],Ra,Ze));if(Ze!==je)for(let Ra of ut)ft.push(e.aZ([],Ra,je));y.y===0&&ft.push([0,1,0]),y.y===(1<=(1<{let fe=e.al(N.lat,-e.am,e.am),be=e.al(+ie,this.minZoom+ps(0,fe),this.maxZoom);return{center:new e.W(N.lng,fe),zoom:be}},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new uu}clone(){let y=new vs;return y.apply(this,!1),y}apply(y,N,ie){this._globeLatitudeErrorCorrectionRadians=ie||0,this._helper.apply(y,N)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let y=e.bz();return y[0]=this._cameraPosition[0],y[1]=this._cameraPosition[1],y[2]=this._cameraPosition[2],y}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(y){let{overscaledTileID:N,applyGlobeMatrix:ie}=y,fe=this._helper.getMercatorTileCoordinates(N);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:fe,clippingPlane:this._cachedClippingPlane,projectionTransition:ie?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(y){let N=this.pitchInRadians,ie=this.cameraToCenterDistance/y,fe=Math.sin(N)*ie,be=Math.cos(N)*ie+1,Re=1/Math.sqrt(fe*fe+be*be)*1,je=-fe,Ze=be,ut=Math.sqrt(je*je+Ze*Ze);je/=ut,Ze/=ut;let ft=[0,je,Ze];e.bF(ft,ft,[0,0,0],-this.bearingInRadians),e.bG(ft,ft,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(ft,ft,[0,0,0],this.center.lng*Math.PI/180);let Dt=1/e.b5(ft);return e.aZ(ft,ft,Dt),[...ft,-Re*Dt]}isLocationOccluded(y){return!this.isSurfacePointVisible(yo(y))}transformLightDirection(y){let N=this._helper._center.lng*Math.PI/180,ie=this._helper._center.lat*Math.PI/180,fe=Math.cos(ie),be=[Math.sin(N)*fe,Math.sin(ie),Math.cos(N)*fe],Re=[be[2],0,-be[0]],je=[0,0,0];e.b2(je,Re,be),e.b1(Re,Re),e.b1(je,je);let Ze=[0,0,0];return e.b1(Ze,[Re[0]*y[0]+je[0]*y[1]+be[0]*y[2],Re[1]*y[0]+je[1]*y[1]+be[1]*y[2],Re[2]*y[0]+je[2]*y[1]+be[2]*y[2]]),Ze}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(y,N,ie){let fe=function(je,Ze,ut){let ft=1/(1<be&&(be=Gt),Ktje&&(je=Kt)}let ft=[ut.lng+Re,ut.lat+Ze,ut.lng+be,ut.lat+je];return this.isSurfacePointOnScreen([0,1,0])&&(ft[3]=90,ft[0]=-180,ft[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(ft[1]=-90,ft[0]=-180,ft[2]=180),new q(ft)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){let ie=yo(this.unprojectScreenPoint(N)),fe=yo(y),be=e.bz();e.bK(be);let Re=e.bz();e.bH(Re,ie,be,-this.center.lng*Math.PI/180),e.bG(Re,Re,be,this.center.lat*Math.PI/180);let je=fe[0]*fe[0]+fe[2]*fe[2],Ze=Re[0]*Re[0];if(je=-ir&&st<=ir,Ar=Ut>=-ir&&Ut<=ir,hr,vr;if(dr&&Ar){let ka=this.center.lng*Math.PI/180,Ta=this.center.lat*Math.PI/180;e.bM(Dt,ka)+e.bM(st,Ta)=0}isSurfacePointOnScreen(y){if(!this.isSurfacePointVisible(y))return!1;let N=e.bE();return e.aE(N,[...y,1],this._globeViewProjMatrixNoCorrection),N[0]/=N[3],N[1]/=N[3],N[2]/=N[3],N[0]>-1&&N[0]<1&&N[1]>-1&&N[1]<1&&N[2]>-1&&N[2]<1}rayPlanetIntersection(y,N){let ie=e.b3(y,N),fe=e.bz(),be=e.bz();e.aZ(be,N,ie),e.b0(fe,y,be);let Re=1-e.b3(fe,fe);if(Re<0)return null;let je=e.b3(y,y)-1,Ze=-ie+(ie<0?1:-1)*Math.sqrt(Re),ut=je/Ze,ft=Ze;return{tMin:Math.min(ut,ft),tMax:Math.max(ut,ft)}}unprojectScreenPoint(y){let N=this._cameraPosition,ie=this.getRayDirectionFromPixel(y),fe=this.rayPlanetIntersection(N,ie);if(fe){let ft=e.bz();e.a_(ft,N,[ie[0]*fe.tMin,ie[1]*fe.tMin,ie[2]*fe.tMin]);let Dt=e.bz();return e.b1(Dt,ft),Dl(Dt)}let be=this._cachedClippingPlane,Re=be[0]*ie[0]+be[1]*ie[1]+be[2]*ie[2],je=-e.b9(be,N)/Re,Ze=e.bz();if(je>0)e.a_(Ze,N,[ie[0]*je,ie[1]*je,ie[2]*je]);else{let ft=e.bz();e.a_(ft,N,[2*ie[0],2*ie[1],2*ie[2]]);let Dt=e.b9(this._cachedClippingPlane,ft);e.b0(Ze,ft,[this._cachedClippingPlane[0]*Dt,this._cachedClippingPlane[1]*Dt,this._cachedClippingPlane[2]*Dt])}let ut=function(ft){let Dt=e.bz();return Dt[0]=ft[0]*-ft[3],Dt[1]=ft[1]*-ft[3],Dt[2]=ft[2]*-ft[3],{center:Dt,radius:Math.sqrt(1-ft[3]*ft[3])}}(be);return Dl(function(ft,Dt,Gt){let Kt=e.bz();e.b0(Kt,Gt,ft);let st=e.bz();return e.bx(st,ft,Kt,Dt/e.b7(Kt)),st}(ut.center,ut.radius,Ze))}getMatrixForModel(y,N){let ie=e.W.convert(y),fe=1/e.bD,be=e.bi();return e.bI(be,be,ie.lng/180*Math.PI),e.bf(be,be,-ie.lat/180*Math.PI),e.Q(be,be,[0,0,1+N/e.bD]),e.bf(be,be,.5*Math.PI),e.S(be,be,[fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:y});return N.tileMercatorCoords=[0,0,1,1],N}getFastPathSimpleProjectionMatrix(y){}}class os{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(y,N){this._globeness=y,this._globeLatitudeErrorCorrectionRadians=N,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(y){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(N,ie)=>this.currentTransform.defaultConstrain(N,ie),this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._globeness=1,this._mercatorTransform=new Eo,this._verticalPerspectiveTransform=new vs}clone(){let y=new os;return y._globeness=this._globeness,y._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,y.apply(this,!1),y}apply(y,N){this._helper.apply(y,N),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(y){let N=this._mercatorTransform.getProjectionData(y),ie=this._verticalPerspectiveTransform.getProjectionData(y);return{mainMatrix:this.isGlobeRendering?ie.mainMatrix:N.mainMatrix,clippingPlane:ie.clippingPlane,tileMercatorCoords:ie.tileMercatorCoords,projectionTransition:y.applyGlobeMatrix?this._globeness:0,fallbackMatrix:N.fallbackMatrix}}isLocationOccluded(y){return this.currentTransform.isLocationOccluded(y)}transformLightDirection(y){return this.currentTransform.transformLightDirection(y)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(y,N,ie){let fe=this._mercatorTransform.getPitchedTextCorrection(y,N,ie),be=this._verticalPerspectiveTransform.getPitchedTextCorrection(y,N,ie);return e.bt(fe,be,this._globeness)}projectTileCoordinates(y,N,ie,fe){return this.currentTransform.projectTileCoordinates(y,N,ie,fe)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(y){return this.currentTransform.calculateFogMatrix(y)}getVisibleUnwrappedCoordinates(y){return this.currentTransform.getVisibleUnwrappedCoordinates(y)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(y){this._mercatorTransform.recalculateZoomAndCenter(y),this._verticalPerspectiveTransform.recalculateZoomAndCenter(y)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(y,N){return this.currentTransform.lngLatToCameraDepth(y,N)}populateCache(y){this._mercatorTransform.populateCache(y),this._verticalPerspectiveTransform.populateCache(y)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(y,N),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(y,N),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(y,N){return this.currentTransform.locationToScreenPoint(y,N)}screenPointToMercatorCoordinate(y,N){return this.currentTransform.screenPointToMercatorCoordinate(y,N)}screenPointToLocation(y,N){return this.currentTransform.screenPointToLocation(y,N)}isPointOnMapSurface(y,N){return this.currentTransform.isPointOnMapSurface(y,N)}getRayDirectionFromPixel(y){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(y)}getMatrixForModel(y,N){return this.currentTransform.getMatrixForModel(y,N)}getProjectionDataForCustomLayer(y=!0){let N=this._mercatorTransform.getProjectionDataForCustomLayer(y);if(!this.isGlobeRendering)return N;let ie=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(y);return ie.fallbackMatrix=N.mainMatrix,ie}getFastPathSimpleProjectionMatrix(y){return this.currentTransform.getFastPathSimpleProjectionMatrix(y)}}class ms{get useGlobeControls(){return!0}handlePanInertia(y,N){let ie=dl(y,N);return Math.abs(ie.lng-N.center.lng)>180&&(ie.lng=N.center.lng+179.5*Math.sign(ie.lng-N.center.lng)),{easingCenter:ie,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(y,N){let ie=y.around,fe=N.screenPointToLocation(ie);y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta);let be=N.zoom;y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta);let Re=N.zoom-be;if(Re===0)return;let je=e.bJ(N.center.lng,fe.lng),Ze=je/(Math.abs(je/180)+1),ut=e.bJ(N.center.lat,fe.lat),ft=N.getRayDirectionFromPixel(ie),Dt=N.cameraPosition,Gt=-1*e.b3(Dt,ft),Kt=e.bz();e.a_(Kt,Dt,[ft[0]*Gt,ft[1]*Gt,ft[2]*Gt]);let st=e.b5(Kt)-1,It=Math.exp(.5*-Math.max(st-.3,0)),Ut=bs(N.worldSize,N.center.lat)/Math.min(N.width,N.height),ir=e.bw(Ut,.9,.5,1,.25),dr=(1-e.ao(-Re))*Math.min(It,ir),Ar=N.center.lat,hr=N.zoom,vr=new e.W(N.center.lng+Ze*dr,e.al(N.center.lat+ut*dr,-e.am,e.am));N.setLocationAtPoint(fe,ie);let Or=N.center,Cr=e.bw(Math.abs(je),45,85,0,1),ta=e.bw(Ut,.75,.35,0,1),ka=Math.pow(Math.max(Cr,ta),.25),Ta=e.bJ(Or.lng,vr.lng),Ra=e.bJ(Or.lat,vr.lat);N.setCenter(new e.W(Or.lng+Ta*ka,Or.lat+Ra*ka).wrap()),N.setZoom(hr+ps(Ar,N.center.lat))}handleMapControlsPan(y,N,ie){if(!y.panDelta)return;let fe=N.center.lat,be=N.zoom;N.setCenter(dl(y.panDelta,N).wrap()),N.setZoom(be+ps(fe,N.center.lat))}cameraForBoxAndBearing(y,N,ie,fe,be){let Re=jo(y,N,ie,fe,be),je=N.left/be.width*2-1,Ze=(be.width-N.right)/be.width*2-1,ut=N.top/be.height*-2+1,ft=(be.height-N.bottom)/be.height*-2+1,Dt=e.bJ(ie.getWest(),ie.getEast())<0,Gt=Dt?ie.getEast():ie.getWest(),Kt=Dt?ie.getWest():ie.getEast(),st=Math.max(ie.getNorth(),ie.getSouth()),It=Math.min(ie.getNorth(),ie.getSouth()),Ut=Gt+.5*e.bJ(Gt,Kt),ir=st+.5*e.bJ(st,It),dr=be.clone();dr.setCenter(Re.center),dr.setBearing(Re.bearing),dr.setPitch(0),dr.setRoll(0),dr.setZoom(Re.zoom);let Ar=dr.modelViewProjectionMatrix,hr=[yo(ie.getNorthWest()),yo(ie.getNorthEast()),yo(ie.getSouthWest()),yo(ie.getSouthEast()),yo(new e.W(Kt,ir)),yo(new e.W(Gt,ir)),yo(new e.W(Ut,st)),yo(new e.W(Ut,It))],vr=yo(Re.center),Or=Number.POSITIVE_INFINITY;for(let Cr of hr)je<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",je))),Ze>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",Ze))),ut>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ut))),ft<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ft)));if(Number.isFinite(Or)&&Or!==0)return Re.zoom=Math.min(dr.zoom+e.ar(Or),y.maxZoom),Re;Ao()}handleJumpToCenterZoom(y,N){let ie=y.center.lat,fe=y.applyConstrain(N.center?e.W.convert(N.center):y.center,y.zoom).center;y.setCenter(fe.wrap());let be=N.zoom!==void 0?+N.zoom:y.zoom+ps(ie,fe.lat);y.zoom!==be&&y.setZoom(be)}handleEaseTo(y,N){let ie=y.zoom,fe=y.center,be=y.padding,Re={roll:y.roll,pitch:y.pitch,bearing:y.bearing},je={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},Ze=N.zoom!==void 0,ut=!y.isPaddingEqual(N.padding),ft=!1,Dt=N.center?e.W.convert(N.center):fe,Gt=y.applyConstrain(Dt,ie).center;Vn(y,Gt);let Kt=y.clone();Kt.setCenter(Gt),Kt.setZoom(Ze?+N.zoom:ie+ps(fe.lat,Dt.lat)),Kt.setBearing(N.bearing);let st=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));Kt.setLocationAtPoint(Gt,st);let It=(N.offset&&N.offsetAsPoint.mag())>0?Kt.center:Gt,Ut=Ze?+N.zoom:ie+ps(fe.lat,It.lat),ir=ie+ps(fe.lat,0),dr=Ut+ps(It.lat,0),Ar=e.bJ(fe.lng,It.lng),hr=e.bJ(fe.lat,It.lat),vr=e.ao(dr-ir);return ft=Ut!==ie,{easeFunc:Or=>{if(e.bn(Re,je)||ds({startEulerAngles:Re,endEulerAngles:je,tr:y,k:Or,useSlerp:Re.roll!=je.roll}),ut&&y.interpolatePadding(be,N.padding,Or),N.around)e.w("Easing around a point is not supported under globe projection."),y.setLocationAtPoint(N.around,N.aroundPoint);else{let Cr=dr>ir?Math.min(2,vr):Math.max(.5,vr),ta=Math.pow(Cr,1-Or),ka=lu(fe,Ar,hr,Or*ta);y.setCenter(ka.wrap())}if(ft){let Cr=e.H.number(ir,dr,Or)+ps(0,y.center.lat);y.setZoom(Cr)}},isZooming:ft,elevationCenter:It}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.center,be=y.zoom,Re=y.padding,je=!y.isPaddingEqual(N.padding),Ze=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),be).center,ut=ie?+N.zoom:y.zoom+ps(y.center.lat,Ze.lat),ft=y.clone();ft.setCenter(Ze),ft.setZoom(ut),ft.setBearing(N.bearing);let Dt=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));ft.setLocationAtPoint(Ze,Dt);let Gt=ft.center;Vn(y,Gt);let Kt=function(hr,vr,Or){let Cr=yo(vr),ta=yo(Or),ka=e.b3(Cr,ta),Ta=Math.acos(ka),Ra=_o(hr);return Ta/(2*Math.PI)*Ra}(y,fe,Gt),st=be+ps(fe.lat,0),It=ut+ps(Gt.lat,0),Ut=e.ao(It-st),ir;if(typeof N.minZoom=="number"){let hr=+N.minZoom+ps(Gt.lat,0),vr=Math.min(hr,st,It)+ps(0,Gt.lat),Or=y.applyConstrain(Gt,vr).zoom+ps(Gt.lat,0);ir=e.ao(Or-st)}let dr=e.bJ(fe.lng,Gt.lng),Ar=e.bJ(fe.lat,Gt.lat);return{easeFunc:(hr,vr,Or,Cr)=>{let ta=lu(fe,dr,Ar,Or);je&&y.interpolatePadding(Re,N.padding,hr);let ka=hr===1?Gt:ta;y.setCenter(ka.wrap());let Ta=st+e.ar(vr);y.setZoom(hr===1?ut:Ta+ps(0,ka.lat))},scaleOfZoom:Ut,targetCenter:Gt,scaleOfMinZoom:ir,pixelPathLength:Kt}}static solveVectorScale(y,N,ie,fe,be){let Re=fe==="x"?[ie[0],ie[4],ie[8],ie[12]]:[ie[1],ie[5],ie[9],ie[13]],je=[ie[3],ie[7],ie[11],ie[15]],Ze=y[0]*Re[0]+y[1]*Re[1]+y[2]*Re[2],ut=y[0]*je[0]+y[1]*je[1]+y[2]*je[2],ft=N[0]*Re[0]+N[1]*Re[1]+N[2]*Re[2],Dt=N[0]*je[0]+N[1]*je[1]+N[2]*je[2];return ft+be*ut===Ze+be*Dt||je[3]*(Ze-ft)+Re[3]*(Dt-ut)+Ze*Dt==ft*ut?null:(ft+Re[3]-be*Dt-be*je[3])/(ft-Ze-be*Dt+be*ut)}static getLesserNonNegativeNonNull(y,N){return N!==null&&N>=0&&Ne.C(pe,y?.filter(N=>N.identifier!=="source.canvas")),zu=e.bN();class Ku extends e.E{constructor(y,N={}){var ie,fe;super(),this._rtlPluginLoaded=()=>{for(let Re in this.tileManagers){let je=this.tileManagers[Re].getSource().type;je!=="vector"&&je!=="geojson"||this.tileManagers[Re].reload()}},this.map=y,this.dispatcher=new ne(re(),y._getMapId()),this.dispatcher.registerMessageHandler("GG",(Re,je)=>this.getGlyphs(Re,je)),this.dispatcher.registerMessageHandler("GI",(Re,je)=>this.getImages(Re,je)),this.dispatcher.registerMessageHandler("GDA",(Re,je)=>this.getDashes(Re,je)),this.imageManager=new C,this.imageManager.setEventedParent(this);let be=((ie=y._container)===null||ie===void 0?void 0:ie.lang)||typeof document<"u"&&((fe=document.documentElement)===null||fe===void 0?void 0:fe.lang)||void 0;this.glyphManager=new x(y._requestManager,N.localIdeographFontFamily,be),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new Di,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),Ye().on(Ae,this._rtlPluginLoaded),this.on("data",Re=>{if(Re.dataType!=="source"||Re.sourceDataType!=="metadata")return;let je=this.tileManagers[Re.sourceId];if(!je)return;let Ze=je.getSource();if(Ze?.vectorLayerIds)for(let ut in this._layers){let ft=this._layers[ut];ft.source===Ze.id&&this._validateLayer(ft)}})}_setInitialValues(){var y;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((y=this.crossTileSymbolIndex)===null||y===void 0?void 0:y.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(y,N){var ie,fe,be;this._checkLoaded();let Re=N===null?(be=(fe=(ie=this.stylesheet.state)===null||ie===void 0?void 0:ie[y])===null||fe===void 0?void 0:fe.default)!==null&&be!==void 0?be:null:N;if(e.bQ(Re,this._globalState[y]))return this;this._globalState[y]=Re,this._applyGlobalStateChanges([y])}getGlobalState(){return this._globalState}setGlobalState(y){this._checkLoaded();let N=[];for(let ie in y)!e.bQ(this._globalState[ie],y[ie].default)&&(N.push(ie),this._globalState[ie]=y[ie].default);this._applyGlobalStateChanges(N)}_applyGlobalStateChanges(y){if(y.length===0)return;let N=new Set,ie={};for(let fe of y){ie[fe]=this._globalState[fe];for(let be in this._layers){let Re=this._layers[be],je=Re.getLayoutAffectingGlobalStateRefs(),Ze=Re.getPaintAffectingGlobalStateRefs(),ut=Re.getVisibilityAffectingGlobalStateRefs();if(je.has(fe)&&N.add(Re.source),Ze.has(fe))for(let{name:ft,value:Dt}of Ze.get(fe))this._updatePaintProperty(Re,ft,Dt);ut?.has(fe)&&(Re.recalculateVisibility(),this._updateLayer(Re))}}this.dispatcher.broadcast("UGS",ie);for(let fe in this.tileManagers)N.has(fe)&&(this._reloadSource(fe),this._changed=!0)}loadURL(y){return e._(this,arguments,void 0,function*(N,ie={},fe){this.fire(new e.n("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate,this._loadStyleRequest=new AbortController;let be=this._loadStyleRequest;try{let Re=yield this.map._requestManager.transformRequest(N,"Style");e.bR(be.signal);let je=yield e.k(Re,be);this._loadStyleRequest===be&&(this._loadStyleRequest=null),this._load(je.data,ie,fe)}catch(Re){this._loadStyleRequest===be&&(this._loadStyleRequest=null),Re&&!be.signal.aborted&&this.fire(new e.l(e.d(Re)))}})}loadJSON(y,N={},ie){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,N.validate=N.validate!==!1,this._load(y,N,ie)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(zu,{validate:!1})}_load(y,N,ie){var fe,be;let Re=N.transformStyle?N.transformStyle(ie,y):y;if(!N.validate||!Fu(this,e.F(Re))){Re=Object.assign({},Re),this._loaded=!0,this.stylesheet=Re;for(let je in Re.sources)this.addSource(je,Re.sources[je],{validate:!1});Re.sprite?this._loadSprite(Re.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Re.glyphs),this._createLayers(),this.light=new O(this.stylesheet.light),this._setProjectionInternal(((fe=this.stylesheet.projection)===null||fe===void 0?void 0:fe.type)||"mercator"),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((be=this.stylesheet.terrain)!==null&&be!==void 0?be:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var y,N,ie;let fe=e.bS(this.stylesheet.layers);this.setGlobalState((y=this.stylesheet.state)!==null&&y!==void 0?y:null),this.dispatcher.broadcast("SL",fe),this._order=fe.map(be=>be.id),this._layers={},this._serializedLayers=null;for(let be of fe){let Re=e.bT(be,this._globalState);if(Re.setEventedParent(this,{layer:{id:be.id}}),this._layers[be.id]=Re,e.bU(Re)&&this.tileManagers[Re.source]){let je=(ie=(N=be.paint)===null||N===void 0?void 0:N["raster-fade-duration"])!==null&&ie!==void 0?ie:Re.paint.get("raster-fade-duration");this.tileManagers[Re.source].setRasterFadeDuration(je)}}}_loadSprite(y,N=!1,ie=void 0){this.imageManager.setLoaded(!1);let fe=new AbortController,be;this._spriteRequest=fe,function(Re,je,Ze,ut){return e._(this,void 0,void 0,function*(){let ft=w(Re),Dt=Ze>1?"@2x":"",Gt={},Kt={};for(let{id:st,url:It}of ft){let Ut=yield je.transformRequest(S(It,Dt,".json"),"SpriteJSON");Gt[st]=e.k(Ut,ut);let ir=yield je.transformRequest(S(It,Dt,".png"),"SpriteImage");Kt[st]=v.getImage(ir,ut)}return yield Promise.all([...Object.values(Gt),...Object.values(Kt)]),function(st,It){return e._(this,void 0,void 0,function*(){let Ut={};for(let ir in st){Ut[ir]={};let dr=s.getImageCanvasContext((yield It[ir]).data),Ar=(yield st[ir]).data;for(let hr in Ar){let{width:vr,height:Or,x:Cr,y:ta,sdf:ka,pixelRatio:Ta,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ga,textFitHeight:da}=Ar[hr];Ut[ir][hr]={data:null,pixelRatio:Ta,sdf:ka,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ga,textFitHeight:da,spriteData:{width:vr,height:Or,x:Cr,y:ta,context:dr}}}}return Ut})}(Gt,Kt)})}(y,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Re=>{if(this._spriteRequest=null,Re)for(let je in Re){this._spritesImagesIds[je]=[];let Ze=this._spritesImagesIds[je]?this._spritesImagesIds[je].filter(ut=>!(ut in Re)):[];for(let ut of Ze)this.imageManager.removeImage(ut),this._changedImages[ut]=!0;for(let ut in Re[je]){let ft=je==="default"?ut:`${je}:${ut}`;this._spritesImagesIds[je].push(ft),ft in this.imageManager.images?this.imageManager.updateImage(ft,Re[je][ut],!1):this.imageManager.addImage(ft,Re[je][ut]),N&&(this._changedImages[ft]=!0)}}}).catch(Re=>{this._spriteRequest=null,be=Re,fe.signal.aborted||this.fire(new e.l(be))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),N&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),ie&&ie(be)})}_unloadSprite(){for(let y of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(y),this._changedImages[y]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(y){let N=this.tileManagers[y.source];if(!N)return;let ie=y.sourceLayer;if(!ie)return;let fe=N.getSource();(fe.type==="geojson"||fe.vectorLayerIds&&!fe.vectorLayerIds.includes(ie))&&this.fire(new e.l(new Error(`Source layer "${ie}" does not exist on source "${fe.id}" as specified by style layer "${y.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let y in this.tileManagers)if(!this.tileManagers[y].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(y,N=!1){let ie=this._serializedAllLayers();if(!y||y.length===0)return Object.values(N?e.bV(ie):ie);let fe=[];for(let be of y)if(ie[be]){let Re=N?e.bV(ie[be]):ie[be];fe.push(Re)}return fe}_serializedAllLayers(){let y=this._serializedLayers;if(y)return y;y=this._serializedLayers={};let N=Object.keys(this._layers);for(let ie of N){let fe=this._layers[ie];fe.type!=="custom"&&(y[ie]=fe.serialize())}return y}hasTransitions(){var y,N,ie;if(!((y=this.light)===null||y===void 0)&&y.hasTransition()||!((N=this.sky)===null||N===void 0)&&N.hasTransition()||!((ie=this.projection)===null||ie===void 0)&&ie.hasTransition())return!0;for(let fe in this.tileManagers)if(this.tileManagers[fe].hasTransition())return!0;for(let fe in this._layers)if(this._layers[fe].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(y){if(!this._loaded)return;let N=this._changed;if(N){let fe=Object.keys(this._updatedLayers),be=Object.keys(this._removedLayers);(fe.length||be.length)&&this._updateWorkerLayers(fe,be);for(let Re in this._updatedSources){let je=this._updatedSources[Re];if(je==="reload")this._reloadSource(Re);else{if(je!=="clear")throw new Error(`Invalid action ${je}`);this._clearSource(Re)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Re in this._updatedPaintProps)this._layers[Re].updateTransitions(y);this.light.updateTransitions(y),this.sky.updateTransitions(y),this._resetUpdates()}let ie={};for(let fe in this.tileManagers){let be=this.tileManagers[fe];ie[fe]=be.used,be.used=!1}for(let fe of this._order){let be=this._layers[fe];be.recalculate(y,this._availableImages),!be.isHidden(y.zoom)&&be.source&&(this.tileManagers[be.source].used=!0)}for(let fe in ie){let be=this.tileManagers[fe];!!ie[fe]!=!!be.used&&be.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:fe}))}this.light.recalculate(y),this.sky.recalculate(y),this.projection.recalculate(y),this.z=y.zoom,N&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let y=Object.keys(this._changedImages);if(y.length){for(let N in this.tileManagers)this.tileManagers[N].reloadTilesForDependencies(["icons","patterns"],y);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let y in this.tileManagers)this.tileManagers[y].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(y,N){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(y,!1),removedIds:N})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(y,N={}){var ie;this._checkLoaded();let fe=this.serialize();if(y=N.transformStyle?N.transformStyle(fe,y):y,((ie=N.validate)===null||ie===void 0||ie)&&Fu(this,e.F(y)))return!1;(y=e.bV(y)).layers=e.bS(y.layers);let be=e.bW(fe,y),Re=this._getOperationsToPerform(be);if(Re.unimplemented.length>0)throw new Error(`Unimplemented: ${Re.unimplemented.join(", ")}.`);if(Re.operations.length===0)return!1;for(let je of Re.operations)je();return this.stylesheet=y,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(y){let N=[],ie=[];for(let fe of y)switch(fe.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":N.push(()=>this.addLayer.apply(this,fe.args));break;case"removeLayer":N.push(()=>this.removeLayer.apply(this,fe.args));break;case"setPaintProperty":N.push(()=>this.setPaintProperty.apply(this,fe.args));break;case"setLayoutProperty":N.push(()=>this.setLayoutProperty.apply(this,fe.args));break;case"setFilter":N.push(()=>this.setFilter.apply(this,fe.args));break;case"addSource":N.push(()=>this.addSource.apply(this,fe.args));break;case"removeSource":N.push(()=>this.removeSource.apply(this,fe.args));break;case"setLayerZoomRange":N.push(()=>this.setLayerZoomRange.apply(this,fe.args));break;case"setLight":N.push(()=>this.setLight.apply(this,fe.args));break;case"setGeoJSONSourceData":N.push(()=>this.setGeoJSONSourceData.apply(this,fe.args));break;case"setGlyphs":N.push(()=>this.setGlyphs.apply(this,fe.args));break;case"setSprite":N.push(()=>this.setSprite.apply(this,fe.args));break;case"setTerrain":N.push(()=>this.map.setTerrain.apply(this,fe.args));break;case"setSky":N.push(()=>this.setSky.apply(this,fe.args));break;case"setProjection":this.setProjection.apply(this,fe.args);break;case"setGlobalState":N.push(()=>this.setGlobalState.apply(this,fe.args));break;case"setTransition":N.push(()=>{});break;default:ie.push(fe.command)}return{operations:N,unimplemented:ie}}addImage(y,N){if(this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" already exists.`)));this.imageManager.addImage(y,N),this._afterImageUpdated(y)}updateImage(y,N){this.imageManager.updateImage(y,N)}getImage(y){return this.imageManager.getImage(y)}removeImage(y){if(!this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" does not exist.`)));this.imageManager.removeImage(y),this._afterImageUpdated(y)}_afterImageUpdated(y){this._availableImages=this.imageManager.listImages(),this._changedImages[y]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(y,N,ie={}){var fe;if(this._checkLoaded(),this.tileManagers[y]!==void 0)throw new Error(`Source "${y}" already exists.`);if(!N.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(N).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(N.type)&&this._validate(e.F.source,`sources.${y}`,N,null,ie))return;!((fe=this.map)===null||fe===void 0)&&fe._collectResourceTiming&&(N.collectResourceTiming=!0);let be=this.tileManagers[y]=new Sr(y,N,this.dispatcher);be.style=this,be.setEventedParent(this,()=>({isSourceLoaded:be.loaded(),source:be.serialize(),sourceId:y})),be.onAdd(this.map),this._changed=!0}removeSource(y){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);for(let ie in this._layers)if(this._layers[ie].source===y)return this.fire(new e.l(new Error(`Source "${y}" cannot be removed while layer "${ie}" is using it.`)));let N=this.tileManagers[y];delete this.tileManagers[y],delete this._updatedSources[y],N.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:y})),N.setEventedParent(null),N.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(y,N){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);let ie=this.tileManagers[y].getSource();if(ie.type!=="geojson")throw new Error(`geojsonSource.type is ${ie.type}, which is !== 'geojson`);ie.setData(N),this._changed=!0}getSource(y){var N;return(N=this.tileManagers[y])===null||N===void 0?void 0:N.getSource()}addLayer(y,N,ie={}){this._checkLoaded();let fe=y.id;if(this.getLayer(fe))return void this.fire(new e.l(new Error(`Layer "${fe}" already exists on this map.`)));let be;if(y.type==="custom"){if(Fu(this,e.bX(y)))return;be=e.bT(y,this._globalState)}else{if("source"in y&&typeof y.source=="object"&&(this.addSource(fe,y.source),y=e.bV(y),y=e.e(y,{source:fe})),this._validate(e.F.layer,`layers.${fe}`,y,{arrayIndex:-1},ie))return;be=e.bT(y,this._globalState),this._validateLayer(be),be.setEventedParent(this,{layer:{id:fe}})}let Re=N?this._order.indexOf(N):this._order.length;if(N&&Re===-1)this.fire(new e.l(new Error(`Cannot add layer "${fe}" before non-existing layer "${N}".`)));else{if(this._order.splice(Re,0,fe),this._layerOrderChanged=!0,this._layers[fe]=be,this._removedLayers[fe]&&be.source&&be.type!=="custom"){let je=this._removedLayers[fe];delete this._removedLayers[fe],je.type!==be.type?this._updatedSources[be.source]="clear":(this._updatedSources[be.source]="reload",this.tileManagers[be.source].pause())}this._updateLayer(be),be.onAdd&&be.onAdd(this.map)}}moveLayer(y,N){if(this._checkLoaded(),this._changed=!0,!this._layers[y])return void this.fire(new e.l(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));if(y===N)return;let ie=this._order.indexOf(y);this._order.splice(ie,1);let fe=N?this._order.indexOf(N):this._order.length;N&&fe===-1?this.fire(new e.l(new Error(`Cannot move layer "${y}" before non-existing layer "${N}".`))):(this._order.splice(fe,0,y),this._layerOrderChanged=!0)}removeLayer(y){this._checkLoaded();let N=this._layers[y];if(!N)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${y}".`)));N.setEventedParent(null);let ie=this._order.indexOf(y);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[y]=N,delete this._layers[y],this._serializedLayers&&delete this._serializedLayers[y],delete this._updatedLayers[y],delete this._updatedPaintProps[y],N.onRemove&&N.onRemove(this.map)}getLayer(y){return this._layers[y]}getLayersOrder(){return[...this._order]}hasLayer(y){return y in this._layers}setLayerZoomRange(y,N,ie){this._checkLoaded();let fe=this.getLayer(y);fe?fe.minzoom===N&&fe.maxzoom===ie||(N!=null&&(fe.minzoom=N),ie!=null&&(fe.maxzoom=ie),this._updateLayer(fe)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)))}setFilter(y,N,ie={}){this._checkLoaded();let fe=this.getLayer(y);if(fe){if(!e.bQ(fe.filter,N))return N==null?(fe.setFilter(void 0),void this._updateLayer(fe)):void(this._validate(e.F.filter,`layers.${fe.id}.filter`,N,null,ie)||(fe.setFilter(e.bV(N)),this._updateLayer(fe)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${y}".`)))}getFilter(y){return e.bV(this.getLayer(y).filter)}setLayoutProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getLayoutProperty(N),ie)||(be.setLayoutProperty(N,ie,fe),this._updateLayer(be)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}getLayoutProperty(y,N){let ie=this.getLayer(y);if(ie)return ie.getLayoutProperty(N);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${y}".`)))}setPaintProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getPaintProperty(N),ie)||this._updatePaintProperty(be,N,ie,fe):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}_updatePaintProperty(y,N,ie,fe={}){y.setPaintProperty(N,ie,fe)&&this._updateLayer(y),e.bU(y)&&N==="raster-fade-duration"&&this.tileManagers[y.source].setRasterFadeDuration(ie),this._changed=!0,this._updatedPaintProps[y.id]=!0,this._serializedLayers=null}getPaintProperty(y,N){return this.getLayer(y).getPaintProperty(N)}setFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=y.sourceLayer,be=this.tileManagers[ie];if(be===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let Re=be.getSource().type;Re==="geojson"&&fe?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Re!=="vector"||fe?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),be.setFeatureState(fe,y.id,N)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=this.tileManagers[ie];if(fe===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let be=fe.getSource().type,Re=be==="vector"?y.sourceLayer:void 0;be!=="vector"||Re?N&&typeof y.id!="string"&&typeof y.id!="number"?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):fe.removeFeatureState(Re,y.id,N):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(y){this._checkLoaded();let N=y.source,ie=y.sourceLayer,fe=this.tileManagers[N];if(fe!==void 0)return fe.getSource().type!=="vector"||ie?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),fe.getFeatureState(ie,y.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${N}' does not exist in the map's style.`)))}getTransition(){var y;return e.e({duration:300,delay:0},(y=this.stylesheet)===null||y===void 0?void 0:y.transition)}serialize(){if(!this._loaded)return;let y=e.bY(this.tileManagers,be=>be.serialize()),N=this._serializeByIds(this._order,!0),ie=this.map.getTerrain()||void 0,fe=this.stylesheet;return e.bZ({version:fe.version,name:fe.name,metadata:fe.metadata,light:fe.light,sky:fe.sky,center:fe.center,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,sprite:fe.sprite,glyphs:fe.glyphs,transition:fe.transition,projection:fe.projection,sources:y,layers:N,terrain:ie},be=>be!==void 0)}_updateLayer(y){this._updatedLayers[y.id]=!0,y.source&&!this._updatedSources[y.source]&&this.tileManagers[y.source].getSource().type!=="raster"&&(this._updatedSources[y.source]="reload",this.tileManagers[y.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(y){let N=Re=>this._layers[Re].type==="fill-extrusion",ie={},fe=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je)){ie[je]=Re;for(let Ze of y){let ut=Ze[je];if(ut)for(let ft of ut)fe.push(ft)}}}fe.sort((Re,je)=>je.intersectionZ-Re.intersectionZ);let be=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je))for(let Ze=fe.length-1;Ze>=0;Ze--){let ut=fe[Ze].feature;if(ie[ut.layer.id]this.map.terrain.getElevation(ft,Dt,Gt):void 0));return this.placement&&be.push(function(ut,ft,Dt,Gt,Kt,st,It){let Ut={},ir=st.queryRenderedSymbols(Gt),dr=[];for(let Ar of Object.keys(ir).map(Number))dr.push(It[Ar]);dr.sort(K);for(let Ar of dr){let hr=Ar.featureIndex.lookupSymbolFeatures(ir[Ar.bucketInstanceId],ft,Ar.bucketIndex,Ar.sourceLayerIndex,{filterSpec:Kt.filter,globalState:Kt.globalState},Kt.layers,Kt.availableImages,ut);for(let vr in hr){Ut[vr]||(Ut[vr]=[]);let Or=hr[vr];Or.sort((Cr,ta)=>{let ka=Ar.featureSortOrder;if(ka){let Ta=ka.indexOf(Cr.featureIndex);return ka.indexOf(ta.featureIndex)-Ta}return ta.featureIndex-Cr.featureIndex});for(let Cr of Or)Ut[vr].push(Cr)}}return function(Ar,hr,vr){for(let Or in Ar)for(let Cr of Ar[Or])H(Cr,vr[hr[Or].source]);return Ar}(Ut,ut,Dt)}(this._layers,Re,this.tileManagers,y,Ze,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(be)}querySourceFeatures(y,N){N?.filter&&this._validate(e.F.filter,"querySourceFeatures.filter",N.filter,null,N);let ie=this.tileManagers[y];return ie?function(fe,be){let Re=fe.getRenderableIds().map(ut=>fe.getTileByID(ut)),je=[],Ze={};for(let ut of Re){let ft=ut.tileID.canonical.key;Ze[ft]||(Ze[ft]=!0,ut.querySourceFeatures(je,be))}return je}(ie,N?Object.assign(Object.assign({},N),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(y,N={}){this._checkLoaded();let ie=this.light.getLight(),fe=!1;for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(y,N),this.light.updateTransitions(be)}getProjection(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.projection}setProjection(y){this._checkLoaded();let N=y??{type:"mercator"};if(this.stylesheet.projection=y,this.projection){if(this.projection.name===N.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(N.type)}getSky(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.sky}setSky(y,N={}){this._checkLoaded();let ie=this.getSky(),fe=!1;if(!y&&!ie)return;if(y&&!ie)fe=!0;else if(!y&&ie)fe=!0;else for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=y,this.sky.setSky(y,N),this.sky.updateTransitions(be)}_setProjectionInternal(y){let N=function(ie,fe){let be={constrainOverride:fe};if(Array.isArray(ie)){let Re=new Bo({type:ie});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}switch(ie){case"mercator":return{projection:new io,transform:new Eo(be),cameraHelper:new Wo};case"globe":{let Re=new Bo({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}case"vertical-perspective":return{projection:new Vs,transform:new vs(be),cameraHelper:new ms};default:return e.w(`Unknown projection name: ${ie}. Falling back to mercator projection.`),{projection:new io,transform:new Eo(be),cameraHelper:new Wo}}}(y,this.map.transformConstrain);this.projection=N.projection,this.map.migrateProjection(N.transform,N.cameraHelper);for(let ie in this.tileManagers)this.tileManagers[ie].reload()}_validate(y,N,ie,fe,be={}){return be?.validate!==!1&&Fu(this,y.call(e.F,e.e({key:N,style:this.serialize(),value:ie,styleSpec:e.x},fe)))}_remove(y=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Ye().off(Ae,this._rtlPluginLoaded);for(let N in this._layers)this._layers[N].setEventedParent(null);for(let N in this.tileManagers){let ie=this.tileManagers[N];ie.setEventedParent(null),ie.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),y&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(y)}_clearSource(y){this.tileManagers[y].clearTiles()}_reloadSource(y){this.tileManagers[y].resume(),this.tileManagers[y].reload()}_updateSources(y){for(let N in this.tileManagers)this.tileManagers[N].update(y,this.map.terrain)}_generateCollisionBoxes(){for(let y in this.tileManagers)this._reloadSource(y)}_updatePlacement(y,N,ie,fe,be=!1){let Re=!1,je=!1,Ze={};for(let ut of this._order){let ft=this._layers[ut];if(ft.type!=="symbol")continue;if(!Ze[ft.source]){let Gt=this.tileManagers[ft.source];Ze[ft.source]=Gt.getRenderableIds(!0).map(Kt=>Gt.getTileByID(Kt)).sort((Kt,st)=>st.tileID.overscaledZ-Kt.tileID.overscaledZ||(Kt.tileID.isLessThan(st.tileID)?-1:1))}let Dt=this.crossTileSymbolIndex.addLayer(ft,Ze[ft.source],y.center.lng);Re||(Re=Dt)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),be||(be=this._layerOrderChanged||ie===0),(be||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(m(),y.zoom))&&(this.pauseablePlacement=new ai(y,this.map.terrain,this._order,be,N,ie,fe,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ze),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(m()),je=!0),Re&&this.pauseablePlacement.placement.setStale()),je||Re)for(let ut of this._order){let ft=this._layers[ut];ft.type==="symbol"&&this.placement.updateLayerOpacities(ft,Ze[ft.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(m())}_releaseSymbolFadeTiles(){for(let y in this.tileManagers)this.tileManagers[y].releaseSymbolFadeTiles()}getImages(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.imageManager.getImages(N.icons);this._updateTilesForChangedImages();let fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,N.icons),ie})}getGlyphs(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.glyphManager.getGlyphs(N.stacks),fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,[""]),ie})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(y,N={}){this._checkLoaded(),y&&this._validate(e.F.glyphs,"glyphs",y,null,N)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=y,this.glyphManager.entries={},this.glyphManager.setURL(y))}getDashes(y,N){return e._(this,void 0,void 0,function*(){let ie={};for(let[fe,be]of Object.entries(N.dashes))ie[fe]=this.lineAtlas.getDash(be.dasharray,be.round);return ie})}addSprite(y,N,ie={},fe){this._checkLoaded();let be=[{id:y,url:N}],Re=[...w(this.stylesheet.sprite),...be];this._validate(e.F.sprite,"sprite",Re,null,ie)||(this.stylesheet.sprite=Re,this._loadSprite(be,!0,fe))}removeSprite(y){this._checkLoaded();let N=w(this.stylesheet.sprite);if(N.find(ie=>ie.id===y)){if(this._spritesImagesIds[y])for(let ie of this._spritesImagesIds[y])this.imageManager.removeImage(ie),this._changedImages[ie]=!0;N.splice(N.findIndex(ie=>ie.id===y),1),this.stylesheet.sprite=N.length>0?N:void 0,delete this._spritesImagesIds[y],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${y}" doesn't exists on this map.`)))}getSprite(){return w(this.stylesheet.sprite)}setSprite(y,N={},ie){this._checkLoaded(),y&&this._validate(e.F.sprite,"sprite",y,null,N)||(this.stylesheet.sprite=y,y?this._loadSprite(y,!0,ie):(this._unloadSprite(),ie&&ie(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let y in this.tileManagers){let N=this.tileManagers[y];N.setEventedParent(null),N.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let y in this._layers){let N=this._layers[y];N.setEventedParent(null),N.onRemove&&N.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var bc=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Lh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(y,N,ie,fe,be,Re,je,Ze,ut){this.context=y;let ft=this.boundPaintVertexBuffers.length!==fe.length;for(let Dt=0;!ft&&Dt({u_texture:0,u_ele_delta:pe,u_fog_matrix:y,u_fog_color:N?N.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:N?N.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:fe?0:N?N.calculateFogBlendOpacity(ie):0,u_horizon_color:N?N.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:N?N.properties.get("horizon-fog-blend"):1,u_is_globe_mode:fe?1:0}),Ju={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function ss(pe){let y=[];for(let N of pe){if(N===null)continue;let ie=N.split(" ");y.push(ie.pop())}return y}class ah{constructor(y,N,ie,fe,be,Re,je,Ze,ut=[]){let ft=y.gl;this.program=ft.createProgram();let Dt=ss(N.staticAttributes),Gt=ie?ie.getBinderAttributes():[],Kt=Dt.concat(Gt),st=Ai.prelude.staticUniforms?ss(Ai.prelude.staticUniforms):[],It=je.staticUniforms?ss(je.staticUniforms):[],Ut=N.staticUniforms?ss(N.staticUniforms):[],ir=ie?ie.getBinderUniforms():[],dr=st.concat(It).concat(Ut).concat(ir),Ar=[];for(let Ta of dr)Ar.includes(Ta)||Ar.push(Ta);let hr=ie?ie.defines():[];Ko(ft)&&hr.unshift("#version 300 es"),be&&hr.push("#define OVERDRAW_INSPECTOR;"),Re&&hr.push("#define TERRAIN3D;"),Ze&&hr.push(Ze),ut&&hr.push(...ut);let vr=hr.concat(Ai.prelude.fragmentSource,je.fragmentSource,N.fragmentSource).join(` +`),Or=hr.concat(Ai.prelude.vertexSource,je.vertexSource,N.vertexSource).join(` +`);Ko(ft)||(vr=function(Ta){return Ta.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(vr),Or=function(Ta){return Ta.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Or));let Cr=ft.createShader(ft.FRAGMENT_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(Cr,vr),ft.compileShader(Cr),!ft.getShaderParameter(Cr,ft.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ft.getShaderInfoLog(Cr)}`);ft.attachShader(this.program,Cr);let ta=ft.createShader(ft.VERTEX_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(ta,Or),ft.compileShader(ta),!ft.getShaderParameter(ta,ft.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ft.getShaderInfoLog(ta)}`);ft.attachShader(this.program,ta),this.attributes={};let ka={};this.numAttributes=Kt.length;for(let Ta=0;Ta({u_depth:new e.b_(Ta,Ra.u_depth),u_terrain:new e.b_(Ta,Ra.u_terrain),u_terrain_dim:new e.bp(Ta,Ra.u_terrain_dim),u_terrain_matrix:new e.c0(Ta,Ra.u_terrain_matrix),u_terrain_unpack:new e.c1(Ta,Ra.u_terrain_unpack),u_terrain_exaggeration:new e.bp(Ta,Ra.u_terrain_exaggeration)}))(y,ka),this.projectionUniforms=((Ta,Ra)=>({u_projection_matrix:new e.c0(Ta,Ra.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(Ta,Ra.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(Ta,Ra.u_projection_clipping_plane),u_projection_transition:new e.bp(Ta,Ra.u_projection_transition),u_projection_fallback_matrix:new e.c0(Ta,Ra.u_projection_fallback_matrix)}))(y,ka),this.binderUniforms=ie?ie.getUniforms(y,ka):[]}draw(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar){var hr;let vr=y.gl;if(this.failedToCreate)return;if(y.program.set(this.program),y.setDepthMode(ie),y.setStencilMode(fe),y.setColorMode(be),y.setCullFace(Re),Ze){y.activeTexture.set(vr.TEXTURE2),vr.bindTexture(vr.TEXTURE_2D,Ze.depthTexture),y.activeTexture.set(vr.TEXTURE3),vr.bindTexture(vr.TEXTURE_2D,Ze.texture);for(let Cr in this.terrainUniforms)this.terrainUniforms[Cr].set(Ze[Cr])}if(ut)for(let Cr in ut)this.projectionUniforms[Ju[Cr]].set(ut[Cr]);if(je)for(let Cr in this.fixedUniforms)this.fixedUniforms[Cr].set(je[Cr]);Ut&&Ut.setUniforms(y,this.binderUniforms,st,{zoom:It});let Or=0;switch(N){case vr.LINES:Or=2;break;case vr.TRIANGLES:Or=3;break;case vr.LINE_STRIP:Or=1}for(let Cr of Kt.get())Cr.vaos||(Cr.vaos={}),(hr=Cr.vaos)[ft]||(hr[ft]=new Lh),Cr.vaos[ft].bind(y,this,Dt,Ut?Ut.getPaintVertexBuffers():[],Gt,Cr.vertexOffset,ir,dr,Ar),vr.drawElements(N,Cr.primitiveLength*Or,vr.UNSIGNED_SHORT,Cr.primitiveOffset*Or*2)}}function wc(pe,y,N){let ie=1/e.aK(N,1,y.transform.tileZoom),fe=Math.pow(2,N.tileID.overscaledZ),be=N.tileSize*Math.pow(2,y.transform.tileZoom)/fe,Re=be*(N.tileID.canonical.x+N.tileID.wrap*fe),je=be*N.tileID.canonical.y;return{u_image:0,u_texsize:N.imageAtlasTexture.size,u_scale:[ie,pe.fromScale,pe.toScale],u_fade:pe.t,u_pixel_coord_upper:[Re>>16,je>>16],u_pixel_coord_lower:[65535&Re,65535&je]}}let pc=(pe,y,N,ie)=>{let fe=pe.style.light,be=fe.properties.get("position"),Re=[be.x,be.y,be.z],je=e.c4();fe.properties.get("anchor")==="viewport"&&e.c5(je,pe.transform.bearingInRadians),e.c6(Re,Re,je);let Ze=pe.transform.transformLightDirection(Re),ut=fe.properties.get("color");return{u_lightpos:Re,u_lightpos_globe:Ze,u_lightintensity:fe.properties.get("intensity"),u_lightcolor:[ut.r,ut.g,ut.b],u_vertical_gradient:+y,u_opacity:N,u_fill_translate:ie}},Nf=(pe,y,N,ie,fe,be,Re)=>e.e(pc(pe,y,N,ie),wc(be,pe,Re),{u_height_factor:-Math.pow(2,fe.overscaledZ)/Re.tileSize/8}),Bu=(pe,y,N,ie)=>e.e(wc(y,pe,N),{u_fill_translate:ie}),Tc=(pe,y)=>({u_world:pe,u_fill_translate:y}),Ou=(pe,y,N,ie,fe)=>e.e(Bu(pe,y,N,fe),{u_world:ie}),Gc=(pe,y,N,ie,fe)=>{let be=pe.transform,Re,je,Ze=0;if(N.paint.get("circle-pitch-alignment")==="map"){let ut=e.aK(y,1,be.zoom);Re=!0,je=[ut,ut],Ze=ut/(e.a6*Math.pow(2,y.tileID.overscaledZ))*2*Math.PI*fe}else Re=!1,je=be.pixelsToGLUnits;return{u_camera_to_center_distance:be.cameraToCenterDistance,u_scale_with_map:+(N.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+Re,u_device_pixel_ratio:pe.pixelRatio,u_extrude_scale:je,u_globe_extrude_scale:Ze,u_translate:ie}},pf=pe=>({u_pixel_extrude_scale:[1/pe.width,1/pe.height]}),$l=pe=>({u_viewport_size:[pe.width,pe.height]}),jf=(pe,y=1)=>({u_color:pe,u_overlay:0,u_overlay_scale:y}),Hc=(pe,y,N,ie)=>{let fe=e.aK(pe,1,y)/(e.a6*Math.pow(2,pe.tileID.overscaledZ))*2*Math.PI*ie;return{u_extrude_scale:e.aK(pe,1,y),u_intensity:N,u_globe_extrude_scale:fe}},Wc=(pe,y,N,ie)=>{let fe=e.O();e.c7(fe,0,pe.width,pe.height,0,0,1);let be=pe.context.gl;return{u_matrix:fe,u_world:[be.drawingBufferWidth,be.drawingBufferHeight],u_image:N,u_color_ramp:ie,u_opacity:y.paint.get("heatmap-opacity")}},Qu=(pe,y,N)=>{let ie=N.paint.get("hillshade-accent-color"),fe;switch(N.paint.get("hillshade-method")){case"basic":fe=4;break;case"combined":fe=1;break;case"igor":fe=2;break;case"multidirectional":fe=3;break;default:fe=0}let be=N.getIlluminationProperties();for(let Re=0;Re{let N=y.stride,ie=e.O();return e.c7(ie,0,e.a6,-e.a6,0,0,1),e.Q(ie,ie,[0,-e.a6,0]),{u_matrix:ie,u_image:1,u_dimension:[N,N],u_zoom:pe.overscaledZ,u_unpack:y.getUnpackVector()}};function Nu(pe,y){let N=Math.pow(2,y.canonical.z),ie=y.canonical.y;return[new e.a7(0,ie/N).toLngLat().lat,new e.a7(0,(ie+1)/N).toLngLat().lat]}let Uf=(pe,y,N=0)=>({u_image:0,u_unpack:y.getUnpackVector(),u_dimension:[y.stride,y.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:N,u_opacity:pe.paint.get("color-relief-opacity")}),al=(pe,y,N,ie)=>{let fe=pe.transform;return{u_translation:cu(pe,y,N),u_ratio:ie/e.aK(y,1,fe.zoom),u_device_pixel_ratio:pe.pixelRatio,u_units_to_pixels:[1/fe.pixelsToGLUnits[0],1/fe.pixelsToGLUnits[1]]}},Xc=(pe,y,N,ie,fe)=>e.e(al(pe,y,N,ie),{u_image:0,u_image_height:fe}),ju=(pe,y,N,ie,fe)=>{let be=pe.transform,Re=ec(y,be);return{u_translation:cu(pe,y,N),u_texsize:y.imageAtlasTexture.size,u_ratio:ie/e.aK(y,1,be.zoom),u_device_pixel_ratio:pe.pixelRatio,u_image:0,u_scale:[Re,fe.fromScale,fe.toScale],u_fade:fe.t,u_units_to_pixels:[1/be.pixelsToGLUnits[0],1/be.pixelsToGLUnits[1]]}},Ac=(pe,y,N,ie,fe)=>{let be=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_tileratio:be,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image:0,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})},Zc=(pe,y,N,ie,fe,be)=>{let Re=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_image:0,u_image_height:be,u_tileratio:Re,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image_dash:1,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})};function ec(pe,y){return 1/e.aK(pe,1,y.tileZoom)}function cu(pe,y,N){return e.aL(pe.transform,y,N.paint.get("line-translate"),N.paint.get("line-translate-anchor"))}let tc=(pe,y,N,ie,fe)=>{return{u_tl_parent:pe,u_scale_parent:y,u_buffer_scale:1,u_fade_t:N.mix,u_opacity:N.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(Re=ie.paint.get("raster-saturation"),Re>0?1-1/(1.001-Re):-Re),u_contrast_factor:(be=ie.paint.get("raster-contrast"),be>0?1/(1-be):1+be),u_spin_weights:vf(ie.paint.get("raster-hue-rotate")),u_coords_top:[fe[0].x,fe[0].y,fe[1].x,fe[1].y],u_coords_bottom:[fe[3].x,fe[3].y,fe[2].x,fe[2].y]};var be,Re};function vf(pe){pe*=Math.PI/180;let y=Math.sin(pe),N=Math.cos(pe);return[(2*N+1)/3,(-Math.sqrt(3)*y-N+1)/3,(Math.sqrt(3)*y-N+1)/3]}let Tu=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>{let Kt=Re.transform;return{u_is_size_zoom_constant:+(pe==="constant"||pe==="source"),u_is_size_feature_constant:+(pe==="constant"||pe==="camera"),u_size_t:y?y.uSizeT:0,u_size:y?y.uSize:0,u_camera_to_center_distance:Kt.cameraToCenterDistance,u_pitch:Kt.pitch/360*2*Math.PI,u_rotate_symbol:+N,u_aspect_ratio:Kt.width/Kt.height,u_fade_change:Re.options.fadeDuration?Re.symbolFadeChange:1,u_label_plane_matrix:je,u_coord_matrix:Ze,u_is_text:+ft,u_pitch_with_map:+ie,u_is_along_line:fe,u_is_variable_anchor:be,u_texsize:Dt,u_texture:0,u_translation:ut,u_pitched_scale:Gt}},nh=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt)=>{let st=Re.transform;return e.e(Tu(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Kt),{u_gamma_scale:ie?Math.cos(st.pitch*Math.PI/180)*st.cameraToCenterDistance:1,u_device_pixel_ratio:Re.pixelRatio,u_is_halo:Gt?1:0,u_is_plain:1})},vl=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>e.e(nh(pe,y,N,ie,fe,be,Re,je,Ze,ut,!0,ft,!0,Gt),{u_texsize_icon:Dt,u_texture_icon:1}),ml=(pe,y)=>({u_opacity:pe,u_color:y}),rc=(pe,y,N,ie,fe)=>e.e(function(be,Re,je,Ze){let ut=je.imageManager.getPattern(be.from.toString()),ft=je.imageManager.getPattern(be.to.toString()),{width:Dt,height:Gt}=je.imageManager.getPixelSize(),Kt=Math.pow(2,Ze.tileID.overscaledZ),st=Ze.tileSize*Math.pow(2,je.transform.tileZoom)/Kt,It=st*(Ze.tileID.canonical.x+Ze.tileID.wrap*Kt),Ut=st*Ze.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ut.tl,u_pattern_br_a:ut.br,u_pattern_tl_b:ft.tl,u_pattern_br_b:ft.br,u_texsize:[Dt,Gt],u_mix:Re.t,u_pattern_size_a:ut.displaySize,u_pattern_size_b:ft.displaySize,u_scale_a:Re.fromScale,u_scale_b:Re.toScale,u_tile_units_to_pixels:1/e.aK(Ze,1,je.transform.tileZoom),u_pixel_coord_upper:[It>>16,Ut>>16],u_pixel_coord_lower:[65535&It,65535&Ut]}}(N,fe,y,ie),{u_opacity:pe}),yl=(pe,y)=>{},qf={fillExtrusion:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillExtrusionPattern:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_height_factor:new e.bp(pe,y.u_height_factor),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),fill:(pe,y)=>({u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillPattern:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutline:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutlinePattern:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),circle:(pe,y)=>({u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_scale_with_map:new e.b_(pe,y.u_scale_with_map),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_extrude_scale:new e.c3(pe,y.u_extrude_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale),u_translate:new e.c3(pe,y.u_translate)}),collisionBox:(pe,y)=>({u_pixel_extrude_scale:new e.c3(pe,y.u_pixel_extrude_scale)}),collisionCircle:(pe,y)=>({u_viewport_size:new e.c3(pe,y.u_viewport_size)}),debug:(pe,y)=>({u_color:new e.b$(pe,y.u_color),u_overlay:new e.b_(pe,y.u_overlay),u_overlay_scale:new e.bp(pe,y.u_overlay_scale)}),depth:yl,clippingMask:yl,heatmap:(pe,y)=>({u_extrude_scale:new e.bp(pe,y.u_extrude_scale),u_intensity:new e.bp(pe,y.u_intensity),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale)}),heatmapTexture:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_color_ramp:new e.b_(pe,y.u_color_ramp),u_opacity:new e.bp(pe,y.u_opacity)}),hillshade:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_latrange:new e.c3(pe,y.u_latrange),u_exaggeration:new e.bp(pe,y.u_exaggeration),u_altitudes:new e.c9(pe,y.u_altitudes),u_azimuths:new e.c9(pe,y.u_azimuths),u_accent:new e.b$(pe,y.u_accent),u_method:new e.b_(pe,y.u_method),u_shadows:new e.c8(pe,y.u_shadows),u_highlights:new e.c8(pe,y.u_highlights)}),hillshadePrepare:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_image:new e.b_(pe,y.u_image),u_dimension:new e.c3(pe,y.u_dimension),u_zoom:new e.bp(pe,y.u_zoom),u_unpack:new e.c1(pe,y.u_unpack)}),colorRelief:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_unpack:new e.c1(pe,y.u_unpack),u_dimension:new e.c3(pe,y.u_dimension),u_elevation_stops:new e.b_(pe,y.u_elevation_stops),u_color_stops:new e.b_(pe,y.u_color_stops),u_color_ramp_size:new e.b_(pe,y.u_color_ramp_size),u_opacity:new e.bp(pe,y.u_opacity)}),line:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels)}),lineGradient:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height)}),linePattern:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_texsize:new e.c3(pe,y.u_texsize),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_image:new e.b_(pe,y.u_image),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),lineSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_mix:new e.bp(pe,y.u_mix),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),lineGradientSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_image_dash:new e.b_(pe,y.u_image_dash),u_mix:new e.bp(pe,y.u_mix),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),raster:(pe,y)=>({u_tl_parent:new e.c3(pe,y.u_tl_parent),u_scale_parent:new e.bp(pe,y.u_scale_parent),u_buffer_scale:new e.bp(pe,y.u_buffer_scale),u_fade_t:new e.bp(pe,y.u_fade_t),u_opacity:new e.bp(pe,y.u_opacity),u_image0:new e.b_(pe,y.u_image0),u_image1:new e.b_(pe,y.u_image1),u_brightness_low:new e.bp(pe,y.u_brightness_low),u_brightness_high:new e.bp(pe,y.u_brightness_high),u_saturation_factor:new e.bp(pe,y.u_saturation_factor),u_contrast_factor:new e.bp(pe,y.u_contrast_factor),u_spin_weights:new e.c2(pe,y.u_spin_weights),u_coords_top:new e.c1(pe,y.u_coords_top),u_coords_bottom:new e.c1(pe,y.u_coords_bottom)}),symbolIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolSDF:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_is_plain:new e.b_(pe,y.u_is_plain),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolTextAndIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texsize_icon:new e.c3(pe,y.u_texsize_icon),u_texture:new e.b_(pe,y.u_texture),u_texture_icon:new e.b_(pe,y.u_texture_icon),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),background:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_color:new e.b$(pe,y.u_color)}),backgroundPattern:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_image:new e.b_(pe,y.u_image),u_pattern_tl_a:new e.c3(pe,y.u_pattern_tl_a),u_pattern_br_a:new e.c3(pe,y.u_pattern_br_a),u_pattern_tl_b:new e.c3(pe,y.u_pattern_tl_b),u_pattern_br_b:new e.c3(pe,y.u_pattern_br_b),u_texsize:new e.c3(pe,y.u_texsize),u_mix:new e.bp(pe,y.u_mix),u_pattern_size_a:new e.c3(pe,y.u_pattern_size_a),u_pattern_size_b:new e.c3(pe,y.u_pattern_size_b),u_scale_a:new e.bp(pe,y.u_scale_a),u_scale_b:new e.bp(pe,y.u_scale_b),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(pe,y.u_tile_units_to_pixels)}),terrain:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_ele_delta:new e.bp(pe,y.u_ele_delta),u_fog_matrix:new e.c0(pe,y.u_fog_matrix),u_fog_color:new e.b$(pe,y.u_fog_color),u_fog_ground_blend:new e.bp(pe,y.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(pe,y.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon_fog_blend:new e.bp(pe,y.u_horizon_fog_blend),u_is_globe_mode:new e.bp(pe,y.u_is_globe_mode)}),terrainDepth:(pe,y)=>({u_ele_delta:new e.bp(pe,y.u_ele_delta)}),terrainCoords:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_terrain_coords_id:new e.bp(pe,y.u_terrain_coords_id),u_ele_delta:new e.bp(pe,y.u_ele_delta)}),projectionErrorMeasurement:(pe,y)=>({u_input:new e.bp(pe,y.u_input),u_output_expected:new e.bp(pe,y.u_output_expected)}),atmosphere:(pe,y)=>({u_sun_pos:new e.c2(pe,y.u_sun_pos),u_atmosphere_blend:new e.bp(pe,y.u_atmosphere_blend),u_globe_position:new e.c2(pe,y.u_globe_position),u_globe_radius:new e.bp(pe,y.u_globe_radius),u_inv_proj_matrix:new e.c0(pe,y.u_inv_proj_matrix)}),sky:(pe,y)=>({u_sky_color:new e.b$(pe,y.u_sky_color),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon:new e.c3(pe,y.u_horizon),u_horizon_normal:new e.c3(pe,y.u_horizon_normal),u_sky_horizon_blend:new e.bp(pe,y.u_sky_horizon_blend),u_sky_blend:new e.bp(pe,y.u_sky_blend)})};class ac{constructor(y,N,ie){this.context=y;let fe=y.gl;this.buffer=fe.createBuffer(),this.dynamicDraw=!!ie,this.context.unbindVAO(),y.bindElementBuffer.set(this.buffer),fe.bufferData(fe.ELEMENT_ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?fe.DYNAMIC_DRAW:fe.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(y){let N=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),N.bufferSubData(N.ELEMENT_ARRAY_BUFFER,0,y.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Mc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class mf{constructor(y,N,ie,fe){this.length=N.length,this.attributes=ie,this.itemSize=N.bytesPerElement,this.dynamicDraw=fe,this.context=y;let be=y.gl;this.buffer=be.createBuffer(),y.bindVertexBuffer.set(this.buffer),be.bufferData(be.ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?be.DYNAMIC_DRAW:be.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(y){if(y.length!==this.length)throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);let N=this.context.gl;this.bind(),N.bufferSubData(N.ARRAY_BUFFER,0,y.arrayBuffer)}enableAttributes(y,N){for(let ie of this.attributes){let fe=N.attributes[ie.name];fe!==void 0&&y.enableVertexAttribArray(fe)}}setVertexAttribPointers(y,N,ie){for(let fe of this.attributes){let be=N.attributes[fe.name];be!==void 0&&y.vertexAttribPointer(be,fe.components,y[Mc[fe.type]],!1,this.itemSize,fe.offset+this.itemSize*(ie||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Jo{constructor(y){this.gl=y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(y){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ih extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.clearColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class fu extends Jo{getDefault(){return 1}set(y){(y!==this.current||this.dirty)&&(this.gl.clearDepth(y),this.current=y,this.dirty=!1)}}class Sl extends Jo{getDefault(){return 0}set(y){(y!==this.current||this.dirty)&&(this.gl.clearStencil(y),this.current=y,this.dirty=!1)}}class El extends Jo{getDefault(){return[!0,!0,!0,!0]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.colorMask(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class oh extends Jo{getDefault(){return!0}set(y){(y!==this.current||this.dirty)&&(this.gl.depthMask(y),this.current=y,this.dirty=!1)}}class Au extends Jo{getDefault(){return 255}set(y){(y!==this.current||this.dirty)&&(this.gl.stencilMask(y),this.current=y,this.dirty=!1)}}class $c extends Jo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(y){let N=this.current;(y.func!==N.func||y.ref!==N.ref||y.mask!==N.mask||this.dirty)&&(this.gl.stencilFunc(y.func,y.ref,y.mask),this.current=y,this.dirty=!1)}}class _l extends Jo{getDefault(){let y=this.gl;return[y.KEEP,y.KEEP,y.KEEP]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||this.dirty)&&(this.gl.stencilOp(y[0],y[1],y[2]),this.current=y,this.dirty=!1)}}class nl extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.STENCIL_TEST):N.disable(N.STENCIL_TEST),this.current=y,this.dirty=!1}}class gf extends Jo{getDefault(){return[0,1]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.depthRange(y[0],y[1]),this.current=y,this.dirty=!1)}}class Kc extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.DEPTH_TEST):N.disable(N.DEPTH_TEST),this.current=y,this.dirty=!1}}class sh extends Jo{getDefault(){return this.gl.LESS}set(y){(y!==this.current||this.dirty)&&(this.gl.depthFunc(y),this.current=y,this.dirty=!1)}}class hu extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.BLEND):N.disable(N.BLEND),this.current=y,this.dirty=!1}}class Uu extends Jo{getDefault(){let y=this.gl;return[y.ONE,y.ZERO]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.blendFunc(y[0],y[1]),this.current=y,this.dirty=!1)}}class qu extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.blendColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class nc extends Jo{getDefault(){return this.gl.FUNC_ADD}set(y){(y!==this.current||this.dirty)&&(this.gl.blendEquation(y),this.current=y,this.dirty=!1)}}class yf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.CULL_FACE):N.disable(N.CULL_FACE),this.current=y,this.dirty=!1}}class _f extends Jo{getDefault(){return this.gl.BACK}set(y){(y!==this.current||this.dirty)&&(this.gl.cullFace(y),this.current=y,this.dirty=!1)}}class Mu extends Jo{getDefault(){return this.gl.CCW}set(y){(y!==this.current||this.dirty)&&(this.gl.frontFace(y),this.current=y,this.dirty=!1)}}class ic extends Jo{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}}class Sc extends Jo{getDefault(){return this.gl.TEXTURE0}set(y){(y!==this.current||this.dirty)&&(this.gl.activeTexture(y),this.current=y,this.dirty=!1)}}class Vu extends Jo{getDefault(){let y=this.gl;return[0,0,y.drawingBufferWidth,y.drawingBufferHeight]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.viewport(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class xo extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindFramebuffer(N.FRAMEBUFFER,y),this.current=y,this.dirty=!1}}class Ec extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindRenderbuffer(N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class xh extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindTexture(N.TEXTURE_2D,y),this.current=y,this.dirty=!1}}class Vf extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindBuffer(N.ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class xf extends Jo{getDefault(){return null}set(y){let N=this.gl;N.bindBuffer(N.ELEMENT_ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class Gf extends Jo{getDefault(){return null}set(y){var N;if(y===this.current&&!this.dirty)return;let ie=this.gl;Ko(ie)?ie.bindVertexArray(y):(N=ie.getExtension("OES_vertex_array_object"))===null||N===void 0||N.bindVertexArrayOES(y),this.current=y,this.dirty=!1}}class bh extends Jo{getDefault(){return 4}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_ALIGNMENT,y),this.current=y,this.dirty=!1}}class Hf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),this.current=y,this.dirty=!1}}class il extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,y),this.current=y,this.dirty=!1}}class kl extends Jo{constructor(y,N){super(y),this.context=y,this.parent=N}getDefault(){return null}}class kc extends kl{setDirty(){this.dirty=!0}set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,y,0),this.current=y,this.dirty=!1}}class Cc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class Lc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_STENCIL_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}let vc="Framebuffer is not complete";class Ft{constructor(y,N,ie,fe,be){this.context=y,this.width=N,this.height=ie;let Re=y.gl,je=this.framebuffer=Re.createFramebuffer();if(this.colorAttachment=new kc(y,je),fe)this.depthAttachment=be?new Lc(y,je):new Cc(y,je);else if(be)throw new Error("Stencil cannot be set without depth");if(Re.checkFramebufferStatus(Re.FRAMEBUFFER)!==Re.FRAMEBUFFER_COMPLETE)throw new Error(vc)}destroy(){let y=this.context.gl,N=this.colorAttachment.get();if(N&&y.deleteTexture(N),this.depthAttachment){let ie=this.depthAttachment.get();ie&&y.deleteRenderbuffer(ie)}y.deleteFramebuffer(this.framebuffer)}}class tr{constructor(y){var N,ie;if(this.gl=y,this.clearColor=new ih(this),this.clearDepth=new fu(this),this.clearStencil=new Sl(this),this.colorMask=new El(this),this.depthMask=new oh(this),this.stencilMask=new Au(this),this.stencilFunc=new $c(this),this.stencilOp=new _l(this),this.stencilTest=new nl(this),this.depthRange=new gf(this),this.depthTest=new Kc(this),this.depthFunc=new sh(this),this.blend=new hu(this),this.blendFunc=new Uu(this),this.blendColor=new qu(this),this.blendEquation=new nc(this),this.cullFace=new yf(this),this.cullFaceSide=new _f(this),this.frontFace=new Mu(this),this.program=new ic(this),this.activeTexture=new Sc(this),this.viewport=new Vu(this),this.bindFramebuffer=new xo(this),this.bindRenderbuffer=new Ec(this),this.bindTexture=new xh(this),this.bindVertexBuffer=new Vf(this),this.bindElementBuffer=new xf(this),this.bindVertexArray=new Gf(this),this.pixelStoreUnpack=new bh(this),this.pixelStoreUnpackPremultiplyAlpha=new Hf(this),this.pixelStoreUnpackFlipY=new il(this),this.extTextureFilterAnisotropic=y.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE),Ko(y)){this.HALF_FLOAT=y.HALF_FLOAT;let fe=y.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(N=y.RGBA16F)!==null&&N!==void 0?N:fe?.RGBA16F_EXT,this.RGB16F=(ie=y.RGB16F)!==null&&ie!==void 0?ie:fe?.RGB16F_EXT,y.getExtension("EXT_color_buffer_float")}else{y.getExtension("EXT_color_buffer_half_float"),y.getExtension("OES_texture_half_float_linear");let fe=y.getExtension("OES_texture_half_float");this.HALF_FLOAT=fe?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(y,N){return new ac(this,y,N)}createVertexBuffer(y,N,ie){return new mf(this,y,N,ie)}createRenderbuffer(y,N,ie){let fe=this.gl,be=fe.createRenderbuffer();return this.bindRenderbuffer.set(be),fe.renderbufferStorage(fe.RENDERBUFFER,y,N,ie),this.bindRenderbuffer.set(null),be}createFramebuffer(y,N,ie,fe){return new Ft(this,y,N,ie,fe)}clear({color:y,depth:N,stencil:ie}){let fe=this.gl,be=0;y&&(be|=fe.COLOR_BUFFER_BIT,this.clearColor.set(y),this.colorMask.set([!0,!0,!0,!0])),N!==void 0&&(be|=fe.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(N),this.depthMask.set(!0)),ie!==void 0&&(be|=fe.STENCIL_BUFFER_BIT,this.clearStencil.set(ie),this.stencilMask.set(255)),fe.clear(be)}setCullFace(y){y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(y.mode),this.frontFace.set(y.frontFace))}setDepthMode(y){y.func!==this.gl.ALWAYS||y.mask?(this.depthTest.set(!0),this.depthFunc.set(y.func),this.depthMask.set(y.mask),this.depthRange.set(y.range)):this.depthTest.set(!1)}setStencilMode(y){y.test.func!==this.gl.ALWAYS||y.mask?(this.stencilTest.set(!0),this.stencilMask.set(y.mask),this.stencilOp.set([y.fail,y.depthFail,y.pass]),this.stencilFunc.set({func:y.test.func,ref:y.ref,mask:y.test.mask})):this.stencilTest.set(!1)}setColorMode(y){e.bQ(y.blendFunction,to.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(y.blendFunction),this.blendColor.set(y.blendColor)),this.colorMask.set(y.mask)}createVertexArray(){var y;return Ko(this.gl)?this.gl.createVertexArray():(y=this.gl.getExtension("OES_vertex_array_object"))===null||y===void 0?void 0:y.createVertexArrayOES()}deleteVertexArray(y){var N;Ko(this.gl)?this.gl.deleteVertexArray(y):(N=this.gl.getExtension("OES_vertex_array_object"))===null||N===void 0||N.deleteVertexArrayOES(y)}unbindVAO(){this.bindVertexArray.set(null)}}let Fr;function wr(pe,y,N,ie,fe){var be,Re;let je=pe.context,Ze=pe.transform,ut=je.gl,ft=pe.useProgram("collisionBox"),Dt=[],Gt=0,Kt=0;for(let Ar of ie){let hr=y.getTile(Ar).getBucket(N);if(!hr)continue;let vr=fe?hr.textCollisionBox:hr.iconCollisionBox,Or=hr.collisionCircleArray;Or.length>0&&(Dt.push({circleArray:Or,circleOffset:Kt,coord:Ar}),Gt+=Or.length/4,Kt=Gt),vr&&ft.draw(je,ut.LINES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,pf(pe.transform),(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),Ze.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),N.id,vr.layoutVertexBuffer,vr.indexBuffer,vr.segments,null,pe.transform.zoom,null,null,vr.collisionVertexBuffer)}if(!fe||!Dt.length)return;let st=pe.useProgram("collisionCircle"),It=new e.ca;It.resize(4*Gt),It._trim();let Ut=0;for(let Ar of Dt)for(let hr=0;hr=0&&(It[ir.associatedIconIndex]={shiftedAnchor:da,angle:Fa})}else Ja(ir.numGlyphs,Kt)}if(Ze){st.clear();let Ut=pe.icon.placedSymbolArray;for(let ir=0;irpe.style.map.terrain.getElevation(ga,mo,ru):null,Ll=N.layout.get("text-rotation-alignment")==="map";La(Fa,pe,fe,Wi,Go,Ar,ut,Ll,ga.toUnwrapped(),ir.width,ir.height,Mo,Ys)}let Ws=fe&&ka||So,Zo=hr||Ws?ea:Ar?Wi:pe.transform.clipSpaceToPixelsMatrix,es=Dn&&N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(1)!==0,$o;$o=Dn?Fa.iconsInText?vl(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,Rn,so,Ra):nh(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,es,Ra):Tu(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,Ra);let _s={program:sn,buffers:za,uniformValues:$o,projectionData:zs,atlasTexture:In,atlasTextureIcon:ti,atlasInterpolation:Jn,atlasInterpolationIcon:Ei,isSDF:Dn,hasHalo:es};if(Or&&Fa.canOverlap){Cr=!0;let Go=za.segments.get();for(let Ys of Go)Ta.push({segments:new e.aV([Ys]),sortKey:Ys.sortKey,state:_s,terrainData:Pn})}else Ta.push({segments:za.segments,sortKey:0,state:_s,terrainData:Pn})}Cr&&Ta.sort((ga,da)=>ga.sortKey-da.sortKey);let ua=(st=N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&st!==void 0?st:1/0,ia=N.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||ua>1;for(let ga of Ta){let da=ga.state;It.activeTexture.set(Ut.TEXTURE0),da.atlasTexture.bind(da.atlasInterpolation,Ut.CLAMP_TO_EDGE),da.atlasTextureIcon&&(It.activeTexture.set(Ut.TEXTURE1),da.atlasTextureIcon&&da.atlasTextureIcon.bind(da.atlasInterpolationIcon,Ut.CLAMP_TO_EDGE));let Fa=da.isSDF&&da.hasHalo;if(Fa){let za=da.uniformValues;za.u_is_halo=1,ia&&(za.u_is_plain=0,Da(da.buffers,ga.segments,N,pe,da.program,ta,ft,Dt,za,da.projectionData,ga.terrainData),za.u_is_halo=0,za.u_is_plain=1)}Da(da.buffers,ga.segments,N,pe,da.program,ta,ft,Dt,da.uniformValues,da.projectionData,ga.terrainData),Fa&&!ia&&(da.uniformValues.u_is_halo=0)}}function Da(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft){let Dt=ie.context;fe.draw(Dt,Dt.gl.TRIANGLES,be,Re,je,pi.backCCW,Ze,ft,ut,N.id,pe.layoutVertexBuffer,pe.indexBuffer,y,N.paint,ie.transform.zoom,pe.programConfigurations.get(N.id),pe.dynamicLayoutVertexBuffer,pe.opacityVertexBuffer)}function Ha(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=Xi.disabled,Ze=new to([Re.ONE,Re.ONE],e.bo.transparent,[!0,!0,!0,!0]),ut=y.getBucket(N);if(!ut)return;let ft=ie.key,Dt=N.heatmapFbos.get(ft);Dt||(Dt=vn(be,y.tileSize,y.tileSize),N.heatmapFbos.set(ft,Dt)),be.bindFramebuffer.set(Dt.framebuffer),be.viewport.set([0,0,y.tileSize,y.tileSize]),be.clear({color:e.bo.transparent});let Gt=ut.programConfigurations.get(N.id),Kt=pe.useProgram("heatmap",Gt,!fe),st=pe.transform.getProjectionData({overscaledTileID:y.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),It=pe.style.map.terrain.getTerrainData(ie);Kt.draw(be,Re.TRIANGLES,Vi.disabled,je,Ze,pi.disabled,Hc(y,pe.transform.zoom,N.paint.get("heatmap-intensity"),1),It,st,N.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,N.paint,pe.transform.zoom,Gt)}function $a(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=pe.transform;be.setColorMode(pe.colorModeForRenderPass());let Ze=En(be,y),ut=N.key,ft=y.heatmapFbos.get(ut);if(!ft)return;be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,ft.colorAttachment.get()),be.activeTexture.set(Re.TEXTURE1),Ze.bind(Re.LINEAR,Re.CLAMP_TO_EDGE);let Dt=je.getProjectionData({overscaledTileID:N,applyTerrainMatrix:fe,applyGlobeMatrix:!ie});pe.useProgram("heatmapTexture").draw(be,Re.TRIANGLES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,Wc(pe,y,0,1),null,Dt,y.id,pe.rasterBoundsBuffer,pe.quadTriangleIndexBuffer,pe.rasterBoundsSegments,y.paint,je.zoom),ft.destroy(),y.heatmapFbos.delete(ut)}function vn(pe,y,N){var ie,fe;let be=pe.gl,Re=be.createTexture();be.bindTexture(be.TEXTURE_2D,Re),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 je=(ie=pe.HALF_FLOAT)!==null&&ie!==void 0?ie:be.UNSIGNED_BYTE,Ze=(fe=pe.RGBA16F)!==null&&fe!==void 0?fe:be.RGBA;be.texImage2D(be.TEXTURE_2D,0,Ze,y,N,0,be.RGBA,je,null);let ut=pe.createFramebuffer(y,N,!1,!1);return ut.colorAttachment.set(Re),ut}function En(pe,y){return y.colorRampTexture||(y.colorRampTexture=new e.T(pe,y.colorRamp,pe.gl.RGBA)),y.colorRampTexture}function yi(pe,y,N,ie,fe,be,Re,je){let Ze=256;if(fe.stepInterpolant){let ut=y.getSource().maxzoom,ft=Re.canonical.z===ut?Math.ceil(1<pe.options.anisotropicFilterPitch&&Kt.texParameterf(Kt.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax);let ga=(ft=pe.style.map.terrain)===null||ft===void 0?void 0:ft.getTerrainData(Cr),da=It.getProjectionData({overscaledTileID:Cr,aligned:dr,applyGlobeMatrix:!ut,applyTerrainMatrix:!0}),Fa=tc(ua,Ra,ia.fadeMix,N,je),za=Ut.getMeshFromTileID(Gt,Cr.canonical,be,Re,"raster");st.draw(Gt,Kt.TRIANGLES,ta,fe?fe[Cr.overscaledZ]:Xi.disabled,ir,Ze?pi.frontCCW:pi.backCCW,Fa,ga,da,N.id,za.vertexBuffer,za.indexBuffer,za.segments)}}function Gs(pe,y,N,ie){let fe={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(N===0||ie)return fe;if(pe.fadingParentID){let be=y.getLoadedTile(pe.fadingParentID);if(!be)return fe;let Re=Math.pow(2,be.tileID.overscaledZ-pe.tileID.overscaledZ),je=[pe.tileID.canonical.x*Re%1,pe.tileID.canonical.y*Re%1],Ze=function(ut,ft,Dt){let Gt=m(),Kt=(Gt-ft.timeAdded)/Dt,st=ut.fadingDirection===gt.Incoming,It=e.al((Gt-ut.timeAdded)/Dt,0,1),Ut=e.al(1-Kt,0,1),ir=st?It:Ut;return{tileOpacity:ir,parentTileOpacity:st?Ut:It,fadeMix:{opacity:1,mix:1-ir}}}(pe,be,N);return{parentTile:be,parentScaleBy:Re,parentTopLeft:je,fadeValues:Ze}}if(pe.selfFading){let be=function(Re,je){let Ze=(m()-Re.timeAdded)/je,ut=e.al(Ze,0,1);return{tileOpacity:ut,fadeMix:{opacity:ut,mix:0}}}(pe,N);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:be}}return fe}let Es=new e.bo(1,0,0,1),ns=new e.bo(0,1,0,1),Kn=new e.bo(0,0,1,1),zo=new e.bo(1,0,1,1),gs=new e.bo(0,1,1,1);function js(pe,y,N,ie){zl(pe,0,y+N/2,pe.transform.width,N,ie)}function Cl(pe,y,N,ie){zl(pe,y-N/2,0,N,pe.transform.height,ie)}function zl(pe,y,N,ie,fe,be){let Re=pe.context,je=Re.gl;je.enable(je.SCISSOR_TEST),je.scissor(y*pe.pixelRatio,N*pe.pixelRatio,ie*pe.pixelRatio,fe*pe.pixelRatio),Re.clear({color:be}),je.disable(je.SCISSOR_TEST)}function Kl(pe,y,N){var ie;let fe=pe.context,be=fe.gl,Re=pe.useProgram("debug"),je=Vi.disabled,Ze=Xi.disabled,ut=pe.colorModeForRenderPass(),ft="$debug",Dt=(ie=pe.style.map.terrain)===null||ie===void 0?void 0:ie.getTerrainData(N);fe.activeTexture.set(be.TEXTURE0);let Gt=y.getTileByID(N.key).latestRawTileData,Kt=Math.floor((Gt?.byteLength||0)/1024),st=y.getTile(N).tileSize,It=512/Math.min(st,512)*(N.overscaledZ/pe.transform.zoom)*.5,Ut=N.canonical.toString();N.overscaledZ!==N.canonical.z&&(Ut+=` => ${N.overscaledZ}`),function(dr,Ar){dr.initDebugOverlayCanvas();let hr=dr.debugOverlayCanvas,vr=dr.context.gl,Or=dr.debugOverlayCanvas.getContext("2d");Or.clearRect(0,0,hr.width,hr.height),Or.shadowColor="white",Or.shadowBlur=2,Or.lineWidth=1.5,Or.strokeStyle="white",Or.textBaseline="top",Or.font="bold 36px Open Sans, sans-serif",Or.fillText(Ar,5,5),Or.strokeText(Ar,5,5),dr.debugOverlayTexture.update(hr),dr.debugOverlayTexture.bind(vr.LINEAR,vr.CLAMP_TO_EDGE)}(pe,`${Ut} ${Kt}kB`);let ir=pe.transform.getProjectionData({overscaledTileID:N,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(fe,be.TRIANGLES,je,Ze,to.alphaBlended,pi.disabled,jf(e.bo.transparent,It),null,ir,ft,pe.debugBuffer,pe.quadTriangleIndexBuffer,pe.debugSegments),Re.draw(fe,be.LINE_STRIP,je,Ze,ut,pi.disabled,jf(e.bo.red),Dt,ir,ft,pe.debugBuffer,pe.tileBorderIndexBuffer,pe.debugSegments)}function Gu(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=be.gl,je=pe.transform,Ze=pe.colorModeForRenderPass(),ut=pe.getDepthModeFor3D(),ft=pe.useProgram("terrain");be.bindFramebuffer.set(null),be.viewport.set([0,0,pe.width,pe.height]);for(let Dt of N){let Gt=y.getTerrainMesh(Dt.tileID),Kt=pe.renderToTexture.getTexture(Dt),st=y.getTerrainData(Dt.tileID);be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,Kt.texture);let It=y.getMeshFrameDelta(je.zoom),Ut=je.calculateFogMatrix(Dt.tileID.toUnwrapped()),ir=rh(It,Ut,pe.style.sky,je.pitch,fe),dr=je.getProjectionData({overscaledTileID:Dt.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ft.draw(be,Re.TRIANGLES,ut,Xi.disabled,Ze,pi.backCCW,ir,st,dr,"terrain",Gt.vertexBuffer,Gt.indexBuffer,Gt.segments)}}function xl(pe,y){if(!y.mesh){let N=new e.aU;N.emplaceBack(-1,-1),N.emplaceBack(1,-1),N.emplaceBack(1,1),N.emplaceBack(-1,1);let ie=new e.aW;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),y.mesh=new Xn(pe.createVertexBuffer(N,eo.members),pe.createIndexBuffer(ie),e.aV.simpleSegment(0,0,N.length,ie.length))}return y.mesh}let Hu={symbol:function(pe,y,N,ie,fe,be){if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=be,je=Xi.disabled,Ze=pe.colorModeForRenderPass();(N._unevaluatedLayout.hasValue("text-variable-anchor")||N._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ut,ft,Dt,Gt,Kt,st,It,Ut,ir){var dr;let Ar=ft.transform,hr=ft.style.map.terrain,vr=Kt==="map",Or=st==="map";for(let Cr of ut){let ta=Gt.getTile(Cr),ka=ta.getBucket(Dt);if(!(!((dr=ka?.text)===null||dr===void 0)&&dr.segments.get().length))continue;let Ta=e.aw(ka.textSizeData,Ar.zoom),Ra=e.aK(ta,1,ft.transform.zoom),ua=cr(vr,ft.transform,Ra),ia=Dt.layout.get("icon-text-fit")!=="none"&&ka.hasIconData();if(Ta){let ga=Math.pow(2,Ar.zoom-ta.tileID.overscaledZ),da=hr?(Fa,za)=>hr.getElevation(Cr,Fa,za):null;Na(ka,vr,Or,ir,Ar,ua,ga,Ta,ia,e.aL(Ar,ta,It,Ut),Cr.toUnwrapped(),da)}}}(ie,pe,N,y,N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),fe),N.paint.get("icon-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!1,N.paint.get("icon-translate"),N.paint.get("icon-translate-anchor"),N.layout.get("icon-rotation-alignment"),N.layout.get("icon-pitch-alignment"),N.layout.get("icon-keep-upright"),je,Ze,Re),N.paint.get("text-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!0,N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.layout.get("text-keep-upright"),je,Ze,Re),y.map.showCollisionBoxes&&(wr(pe,y,N,ie,!0),wr(pe,y,N,ie,!1))},circle:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("circle-opacity"),Ze=N.paint.get("circle-stroke-width"),ut=N.paint.get("circle-stroke-opacity"),ft=!N.layout.get("circle-sort-key").isConstant();if(je.constantOr(1)===0&&(Ze.constantOr(1)===0||ut.constantOr(1)===0))return;let Dt=pe.context,Gt=Dt.gl,Kt=pe.transform,st=pe.getDepthModeForSublayer(0,Vi.ReadOnly),It=Xi.disabled,Ut=pe.colorModeForRenderPass(),ir=[],dr=Kt.getCircleRadiusCorrection();for(let Ar of ie){let hr=y.getTile(Ar),vr=hr.getBucket(N);if(!vr)continue;let Or=N.paint.get("circle-translate"),Cr=N.paint.get("circle-translate-anchor"),ta=e.aL(Kt,hr,Or,Cr),ka=vr.programConfigurations.get(N.id),Ta=pe.useProgram("circle",ka),Ra=vr.layoutVertexBuffer,ua=vr.indexBuffer,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),ga={programConfiguration:ka,program:Ta,layoutVertexBuffer:Ra,indexBuffer:ua,uniformValues:Gc(pe,hr,N,ta,dr),terrainData:ia,projectionData:Kt.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!Re,applyTerrainMatrix:!0})};if(ft){let da=vr.segments.get();for(let Fa of da)ir.push({segments:new e.aV([Fa]),sortKey:Fa.sortKey,state:ga})}else ir.push({segments:vr.segments,sortKey:0,state:ga})}ft&&ir.sort((Ar,hr)=>Ar.sortKey-hr.sortKey);for(let Ar of ir){let{programConfiguration:hr,program:vr,layoutVertexBuffer:Or,indexBuffer:Cr,uniformValues:ta,terrainData:ka,projectionData:Ta}=Ar.state;vr.draw(Dt,Gt.TRIANGLES,st,It,Ut,pi.backCCW,ta,ka,Ta,N.id,Or,Cr,Ar.segments,N.paint,pe.transform.zoom,hr)}},heatmap:function(pe,y,N,ie,fe){if(N.paint.get("heatmap-opacity")===0)return;let be=pe.context,{isRenderingToTexture:Re,isRenderingGlobe:je}=fe;if(pe.style.map.terrain){for(let Ze of ie){let ut=y.getTile(Ze);y.hasRenderableParent(Ze)||(pe.renderPass==="offscreen"?Ha(pe,ut,N,Ze,je):pe.renderPass==="translucent"&&$a(pe,N,Ze,Re,je))}be.viewport.set([0,0,pe.width,pe.height])}else pe.renderPass==="offscreen"?function(Ze,ut,ft,Dt){let Gt=Ze.context,Kt=Gt.gl,st=Ze.transform,It=Xi.disabled,Ut=new to([Kt.ONE,Kt.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(ir,dr,Ar){let hr=ir.gl;ir.activeTexture.set(hr.TEXTURE1),ir.viewport.set([0,0,dr.width/4,dr.height/4]);let vr=Ar.heatmapFbos.get(e.cd);vr?(hr.bindTexture(hr.TEXTURE_2D,vr.colorAttachment.get()),ir.bindFramebuffer.set(vr.framebuffer)):(vr=vn(ir,dr.width/4,dr.height/4),Ar.heatmapFbos.set(e.cd,vr))})(Gt,Ze,ft),Gt.clear({color:e.bo.transparent});for(let ir of Dt){if(ut.hasRenderableParent(ir))continue;let dr=ut.getTile(ir),Ar=dr.getBucket(ft);if(!Ar)continue;let hr=Ar.programConfigurations.get(ft.id),vr=Ze.useProgram("heatmap",hr),Or=st.getProjectionData({overscaledTileID:ir,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Cr=st.getCircleRadiusCorrection();vr.draw(Gt,Kt.TRIANGLES,Vi.disabled,It,Ut,pi.backCCW,Hc(dr,st.zoom,ft.paint.get("heatmap-intensity"),Cr),null,Or,ft.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,ft.paint,st.zoom,hr)}Gt.viewport.set([0,0,Ze.width,Ze.height])}(pe,y,N,ie):pe.renderPass==="translucent"&&function(Ze,ut){let ft=Ze.context,Dt=ft.gl;ft.setColorMode(Ze.colorModeForRenderPass());let Gt=ut.heatmapFbos.get(e.cd);Gt&&(ft.activeTexture.set(Dt.TEXTURE0),Dt.bindTexture(Dt.TEXTURE_2D,Gt.colorAttachment.get()),ft.activeTexture.set(Dt.TEXTURE1),En(ft,ut).bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE),Ze.useProgram("heatmapTexture").draw(ft,Dt.TRIANGLES,Vi.disabled,Xi.disabled,Ze.colorModeForRenderPass(),pi.disabled,Wc(Ze,ut,0,1),null,null,ut.id,Ze.viewportBuffer,Ze.quadTriangleIndexBuffer,Ze.viewportSegments,ut.paint,Ze.transform.zoom))}(pe,N)},line:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("line-opacity"),Ze=N.paint.get("line-width");if(je.constantOr(1)===0||Ze.constantOr(1)===0)return;let ut=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ft=pe.colorModeForRenderPass(),Dt=N.paint.get("line-dasharray"),Gt=Dt.constantOr(1),Kt=N.paint.get("line-pattern"),st=Kt.constantOr(1),It=N.paint.get("line-gradient"),Ut=N.getCrossfadeParameters(),ir;ir=st?"linePattern":Gt&&It?"lineGradientSDF":Gt?"lineSDF":It?"lineGradient":"line";let dr=pe.context,Ar=dr.gl,hr=pe.transform,vr=!0;for(let Or of ie){let Cr=y.getTile(Or);if(st&&!Cr.patternsLoaded())continue;let ta=Cr.getBucket(N);if(!ta)continue;let ka=ta.programConfigurations.get(N.id),Ta=pe.context.program.get(),Ra=pe.useProgram(ir,ka),ua=vr||Ra.program!==Ta,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),ga=Kt.constantOr(null),da=Dt?.constantOr(null);if(ga&&Cr.imageAtlas){let ui=Cr.imageAtlas,cn=ui.patternPositions[ga.to.toString()],sn=ui.patternPositions[ga.from.toString()];cn&&sn&&ka.setConstantPatternPositions(cn,sn)}else if(da){let ui=N.layout.get("line-cap").constantOr(null)==="round",cn=pe.lineAtlas.getDash(da.to,ui),sn=pe.lineAtlas.getDash(da.from,ui);ka.setConstantDashPositions(cn,sn)}let Fa=hr.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Re,applyTerrainMatrix:!0}),za=hr.getPixelScale(),Cn;st?(Cn=ju(pe,Cr,N,za,Ut),_i(dr,Ar,Cr,ka,Ut)):Gt&&It?(Cn=Zc(pe,Cr,N,za,Ut,ta.lineClipsArray.length),kn(pe,y,dr,Ar,N,ta,Or,ka,Ut)):Gt?(Cn=Ac(pe,Cr,N,za,Ut),ki(pe,dr,Ar,ka,ua,Ut)):It?(Cn=Xc(pe,Cr,N,za,ta.lineClipsArray.length),ri(pe,y,dr,Ar,N,ta,Or)):Cn=al(pe,Cr,N,za);let Dn=pe.stencilModeForClipping(Or);Ra.draw(dr,Ar.TRIANGLES,ut,Dn,ft,pi.disabled,Cn,ia,Fa,N.id,ta.layoutVertexBuffer,ta.indexBuffer,ta.segments,N.paint,pe.transform.zoom,ka,ta.layoutVertexBuffer2),vr=!1}},fill:function(pe,y,N,ie,fe){let be=N.paint.get("fill-color"),Re=N.paint.get("fill-opacity");if(Re.constantOr(1)===0)return;let{isRenderingToTexture:je}=fe,Ze=pe.colorModeForRenderPass(),ut=N.paint.get("fill-pattern"),ft=pe.opaquePassEnabledForLayer()&&!ut.constantOr(1)&&be.constantOr(e.bo.transparent).a===1&&Re.constantOr(0)===1?"opaque":"translucent";if(pe.renderPass===ft){let Dt=pe.getDepthModeForSublayer(1,pe.renderPass==="opaque"?Vi.ReadWrite:Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!1,je)}if(pe.renderPass==="translucent"&&N.paint.get("fill-antialias")){let Dt=pe.getDepthModeForSublayer(N.getPaintProperty("fill-outline-color")?2:0,Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!0,je)}},fillExtrusion:function(pe,y,N,ie,fe){let be=N.paint.get("fill-extrusion-opacity");if(be===0)return;let{isRenderingToTexture:Re}=fe;if(pe.renderPass==="translucent"){let je=new Vi(pe.context.gl.LEQUAL,Vi.ReadWrite,pe.depthRangeFor3D);if(be!==1||N.paint.get("fill-extrusion-pattern").constantOr(1))Zi(pe,y,N,ie,je,Xi.disabled,to.disabled,Re),Zi(pe,y,N,ie,je,pe.stencilModeFor3D(),pe.colorModeForRenderPass(),Re);else{let Ze=pe.colorModeForRenderPass();Zi(pe,y,N,ie,je,Xi.disabled,Ze,Re)}}},hillshade:function(pe,y,N,ie,fe){if(pe.renderPass!=="offscreen"&&pe.renderPass!=="translucent")return;let{isRenderingToTexture:be}=fe,Re=pe.context,je=pe.style.projection.useSubdivision,Ze=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ut=pe.colorModeForRenderPass();if(pe.renderPass==="offscreen")(function(ft,Dt,Gt,Kt,st,It,Ut){let ir=ft.context,dr=ir.gl,Ar=Kt.paint.get("resampling")==="nearest"?dr.NEAREST:dr.LINEAR;for(let hr of Gt){let vr=Dt.getTile(hr),Or=vr.dem;if(!Or?.data||!vr.needsHillshadePrepare)continue;let Cr=Or.dim,ta=Or.stride,ka=Or.getPixels();if(ir.activeTexture.set(dr.TEXTURE1),ir.pixelStoreUnpackPremultiplyAlpha.set(!1),vr.demTexture||(vr.demTexture=ft.getTileTexture(ta)),vr.demTexture){let Ra=vr.demTexture;Ra.update(ka,{premultiply:!1}),Ra.bind(dr.NEAREST,dr.CLAMP_TO_EDGE)}else vr.demTexture=new e.T(ir,ka,dr.RGBA,{premultiply:!1}),vr.demTexture.bind(dr.NEAREST,dr.CLAMP_TO_EDGE);ir.activeTexture.set(dr.TEXTURE0);let Ta=vr.fbo;if(!Ta){let Ra=new e.T(ir,{width:Cr,height:Cr,data:null},dr.RGBA);Ra.bind(Ar,dr.CLAMP_TO_EDGE),Ta=vr.fbo=ir.createFramebuffer(Cr,Cr,!0,!1),Ta.colorAttachment.set(Ra.texture)}ir.bindFramebuffer.set(Ta.framebuffer),ir.viewport.set([0,0,Cr,Cr]),ft.useProgram("hillshadePrepare").draw(ir,dr.TRIANGLES,st,It,Ut,pi.disabled,Yc(vr.tileID,Or),null,null,Kt.id,ft.rasterBoundsBuffer,ft.quadTriangleIndexBuffer,ft.rasterBoundsSegments),vr.needsHillshadePrepare=!1}})(pe,y,ie,N,Ze,Xi.disabled,ut),Re.viewport.set([0,0,pe.width,pe.height]);else if(pe.renderPass==="translucent")if(je){let[ft,Dt,Gt]=pe.stencilConfigForOverlapTwoPass(ie);Co(pe,y,N,Gt,ft,Ze,ut,!1,be),Co(pe,y,N,Gt,Dt,Ze,ut,!0,be)}else{let[ft,Dt]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Co(pe,y,N,Dt,ft,Ze,ut,!1,be)}},colorRelief:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=pe.style.projection.useSubdivision,je=pe.getDepthModeForSublayer(0,Vi.ReadOnly),Ze=pe.colorModeForRenderPass();if(Re){let[ut,ft,Dt]=pe.stencilConfigForOverlapTwoPass(ie);Fo(pe,y,N,Dt,ut,je,Ze,!1,be),Fo(pe,y,N,Dt,ft,je,Ze,!0,be)}else{let[ut,ft]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Fo(pe,y,N,ft,ut,je,Ze,!1,be)}},raster:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||N.paint.get("raster-opacity")===0||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=y.getSource(),je=pe.style.projection.useSubdivision;if(Re instanceof ke)bo(pe,y,N,ie,null,!1,!1,Re.tileCoords,Re.flippedWindingOrder,be);else if(je){let[Ze,ut,ft]=pe.stencilConfigForOverlapTwoPass(ie);bo(pe,y,N,ft,Ze,!1,!0,Yo,!1,be),bo(pe,y,N,ft,ut,!0,!0,Yo,!1,be)}else{let[Ze,ut]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);bo(pe,y,N,ut,Ze,!1,!0,Yo,!1,be)}},background:function(pe,y,N,ie,fe){var be;let Re=N.paint.get("background-color"),je=N.paint.get("background-opacity");if(je===0)return;let{isRenderingToTexture:Ze}=fe,ut=pe.context,ft=ut.gl,Dt=pe.style.projection,Gt=pe.transform,Kt=Gt.tileSize,st=N.paint.get("background-pattern");if(pe.isPatternMissing(st))return;let It=!st&&Re.a===1&&je===1&&pe.opaquePassEnabledForLayer()?"opaque":"translucent";if(pe.renderPass!==It)return;let Ut=Xi.disabled,ir=pe.getDepthModeForSublayer(0,It==="opaque"?Vi.ReadWrite:Vi.ReadOnly),dr=pe.colorModeForRenderPass(),Ar=pe.useProgram(st?"backgroundPattern":"background"),hr=ie||Je(Gt,{tileSize:Kt,terrain:pe.style.map.terrain});st&&(ut.activeTexture.set(ft.TEXTURE0),pe.imageManager.bind(pe.context));let vr=N.getCrossfadeParameters();for(let Or of hr){let Cr=Gt.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Ze,applyTerrainMatrix:!0}),ta=st?rc(je,pe,st,{tileID:Or,tileSize:Kt},vr):ml(je,Re),ka=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),Ta=Dt.getMeshFromTileID(ut,Or.canonical,!1,!0,"raster");Ar.draw(ut,ft.TRIANGLES,ir,Ut,dr,pi.backCCW,ta,ka,Cr,N.id,Ta.vertexBuffer,Ta.indexBuffer,Ta.segments)}},sky:function(pe,y){let N=pe.context,ie=N.gl,fe=((ft,Dt,Gt)=>{let Kt=Math.cos(Dt.rollInRadians),st=Math.sin(Dt.rollInRadians),It=Xt(Dt),Ut=Dt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ft.properties.get("sky-color"),u_horizon_color:ft.properties.get("horizon-color"),u_horizon:[(Dt.width/2-It*st)*Gt,(Dt.height/2+It*Kt)*Gt],u_horizon_normal:[-st,Kt],u_sky_horizon_blend:ft.properties.get("sky-horizon-blend")*Dt.height/2*Gt,u_sky_blend:Ut}})(y,pe.style.map.transform,pe.pixelRatio),be=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),Re=Xi.disabled,je=pe.colorModeForRenderPass(),Ze=pe.useProgram("sky"),ut=xl(N,y);Ze.draw(N,ie.TRIANGLES,be,Re,je,pi.disabled,fe,null,void 0,"sky",ut.vertexBuffer,ut.indexBuffer,ut.segments)},atmosphere:function(pe,y,N){let ie=pe.context,fe=ie.gl,be=pe.useProgram("atmosphere"),Re=new Vi(fe.LEQUAL,Vi.ReadOnly,[0,1]),je=pe.transform,Ze=function(Ut,ir){let dr=Ut.properties.get("position"),Ar=[-dr.x,-dr.y,-dr.z],hr=e.ap(new Float64Array(16));return Ut.properties.get("anchor")==="map"&&(e.be(hr,hr,ir.rollInRadians),e.bf(hr,hr,-ir.pitchInRadians),e.be(hr,hr,ir.bearingInRadians),e.bf(hr,hr,ir.center.lat*Math.PI/180),e.bI(hr,hr,-ir.center.lng*Math.PI/180)),e.cg(Ar,Ar,hr),Ar}(N,pe.transform),ut=je.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ft=y.properties.get("atmosphere-blend")*ut.projectionTransition;if(ft===0)return;let Dt=bs(je.worldSize,je.center.lat),Gt=je.inverseProjectionMatrix,Kt=new Float64Array(4);Kt[3]=1,e.aE(Kt,Kt,je.modelViewProjectionMatrix),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1,e.aE(Kt,Kt,Gt),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1;let st=((Ut,ir,dr,Ar,hr)=>({u_sun_pos:Ut,u_atmosphere_blend:ir,u_globe_position:dr,u_globe_radius:Ar,u_inv_proj_matrix:hr}))(Ze,ft,[Kt[0],Kt[1],Kt[2]],Dt,Gt),It=xl(ie,y);be.draw(ie,fe.TRIANGLES,Re,Xi.disabled,to.alphaBlended,pi.disabled,st,null,null,"atmosphere",It.vertexBuffer,It.indexBuffer,It.segments)},custom:function(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=N.implementation,je=pe.style.projection,Ze=pe.transform,ut=Ze.getProjectionDataForCustomLayer(fe),ft={farZ:Ze.farZ,nearZ:Ze.nearZ,fov:Ze.fov*Math.PI/180,modelViewProjectionMatrix:Ze.modelViewProjectionMatrix,projectionMatrix:Ze.projectionMatrix,shaderData:{variantName:je.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; +uniform mat4 u_projection_matrix; +${je.shaderPreludeCode.vertexSource}`,define:je.shaderDefine},defaultProjectionData:ut},Dt=Re.renderingMode?Re.renderingMode:"2d";if(pe.renderPass==="offscreen"){let Gt=Re.prerender;Gt&&(pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),Gt.call(Re,be.gl,ft),be.setDirty(),pe.setBaseState())}else if(pe.renderPass==="translucent"){pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),be.setStencilMode(Xi.disabled);let Gt=Dt==="3d"?pe.getDepthModeFor3D():pe.getDepthModeForSublayer(0,Vi.ReadOnly);be.setDepthMode(Gt),Re.render(be.gl,ft),be.setDirty(),pe.setBaseState(),be.bindFramebuffer.set(null)}},debug:function(pe,y,N){for(let ie of N)Kl(pe,y,ie)},debugPadding:function(pe){let y=pe.transform.padding;js(pe,pe.transform.height-(y.top||0),3,Es),js(pe,y.bottom||0,3,ns),Cl(pe,y.left||0,3,Kn),Cl(pe,pe.transform.width-(y.right||0),3,zo);let N=pe.transform.centerPoint;(function(ie,fe,be,Re){zl(ie,fe-1,be-10,2,20,Re),zl(ie,fe-10,be-1,20,2,Re)})(pe,N.x,pe.transform.height-N.y,gs)},terrainDepth:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.tileManager.getRenderableTiles(),Ze=pe.useProgram("terrainDepth");N.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1});for(let ut of je){let ft=y.getTerrainMesh(ut.tileID),Dt=y.getTerrainData(ut.tileID),Gt=fe.getProjectionData({overscaledTileID:ut.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Kt={u_ele_delta:y.getMeshFrameDelta(fe.zoom)};Ze.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Dt,Gt,"terrain",ft.vertexBuffer,ft.indexBuffer,ft.segments)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])},terrainCoords:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.getCoordsTexture(),Ze=y.tileManager.getRenderableTiles(),ut=pe.useProgram("terrainCoords");N.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1}),y.coordsIndex=[];for(let ft of Ze){let Dt=y.getTerrainMesh(ft.tileID),Gt=y.getTerrainData(ft.tileID);N.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,je.texture);let Kt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(fe.zoom)},st=fe.getProjectionData({overscaledTileID:ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ut.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Gt,st,"terrain",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments),y.coordsIndex.push(ft.tileID.key)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])}};class Su{constructor(y,N){this.drawFunctions=Hu,this.context=new tr(y),this.transform=N,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Sr.maxOverzooming+Sr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Di}resize(y,N,ie){if(this.width=Math.floor(y*ie),this.height=Math.floor(N*ie),this.pixelRatio=ie,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let fe of this.style._order)this.style._layers[fe].resize()}setup(){let y=this.context,N=new e.aU;N.emplaceBack(0,0),N.emplaceBack(e.a6,0),N.emplaceBack(0,e.a6),N.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=y.createVertexBuffer(N,eo.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);let ie=new e.aU;ie.emplaceBack(0,0),ie.emplaceBack(e.a6,0),ie.emplaceBack(0,e.a6),ie.emplaceBack(e.a6,e.a6),this.debugBuffer=y.createVertexBuffer(ie,eo.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);let fe=new e.ch;fe.emplaceBack(0,0,0,0),fe.emplaceBack(e.a6,0,e.a6,0),fe.emplaceBack(0,e.a6,0,e.a6),fe.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=y.createVertexBuffer(fe,bc.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);let be=new e.aU;be.emplaceBack(0,0),be.emplaceBack(e.a6,0),be.emplaceBack(0,e.a6),be.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=y.createVertexBuffer(be,eo.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(1,0),Re.emplaceBack(0,1),Re.emplaceBack(1,1),this.viewportBuffer=y.createVertexBuffer(Re,eo.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);let je=new e.ci;je.emplaceBack(0),je.emplaceBack(1),je.emplaceBack(3),je.emplaceBack(2),je.emplaceBack(0),this.tileBorderIndexBuffer=y.createIndexBuffer(je);let Ze=new e.aW;Ze.emplaceBack(1,0,2),Ze.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=y.createIndexBuffer(Ze);let ut=this.context.gl;this.stencilClearMode=new Xi({func:ut.ALWAYS,mask:0},0,255,ut.ZERO,ut.ZERO,ut.ZERO),this.tileExtentMesh=new Xn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let y=this.context,N=y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let ie=e.O();e.c7(ie,0,this.width,this.height,0,0,1),e.S(ie,ie,[N.drawingBufferWidth,N.drawingBufferHeight,0]);let fe={mainMatrix:ie,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:ie};this.useProgram("clippingMask",null,!0).draw(y,N.TRIANGLES,Vi.disabled,this.stencilClearMode,to.disabled,pi.disabled,null,null,fe,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(y,N,ie){if(this.currentStencilSource===y.source||!y.isTileClipped()||!N?.length)return;this.currentStencilSource=y.source,this.nextStencilID+N.length>256&&this.clearStencil();let fe=this.context;fe.setColorMode(to.disabled),fe.setDepthMode(Vi.disabled);let be={};for(let Re of N)be[Re.key]=this.nextStencilID++;this._renderTileMasks(be,N,ie,!0),this._renderTileMasks(be,N,ie,!1),this._tileClippingMaskIDs=be}_renderTileMasks(y,N,ie,fe){var be;let Re=this.context,je=Re.gl,Ze=this.style.projection,ut=this.transform,ft=this.useProgram("clippingMask");for(let Dt of N){let Gt=y[Dt.key],Kt=(be=this.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Dt),st=Ze.getMeshFromTileID(this.context,Dt.canonical,fe,!0,"stencil"),It=ut.getProjectionData({overscaledTileID:Dt,applyGlobeMatrix:!ie,applyTerrainMatrix:!0});ft.draw(Re,je.TRIANGLES,Vi.disabled,new Xi({func:je.ALWAYS,mask:0},Gt,255,je.KEEP,je.KEEP,je.REPLACE),to.disabled,ie?pi.disabled:pi.backCCW,null,Kt,It,"$clipping",st.vertexBuffer,st.indexBuffer,st.segments)}}_renderTilesDepthBuffer(){var y;let N=this.context,ie=N.gl,fe=this.style.projection,be=this.transform,Re=this.useProgram("depth"),je=this.getDepthModeFor3D(),Ze=Je(be,{tileSize:be.tileSize});for(let ut of Ze){let ft=(y=this.style.map.terrain)===null||y===void 0?void 0:y.getTerrainData(ut),Dt=fe.getMeshFromTileID(this.context,ut.canonical,!0,!0,"raster"),Gt=be.getProjectionData({overscaledTileID:ut,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(N,ie.TRIANGLES,je,Xi.disabled,to.disabled,pi.backCCW,null,ft,Gt,"$clipping",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let y=this.nextStencilID++,N=this.context.gl;return new Xi({func:N.NOTEQUAL,mask:255},y,255,N.KEEP,N.KEEP,N.REPLACE)}stencilModeForClipping(y){let N=this.context.gl;return new Xi({func:N.EQUAL,mask:255},this._tileClippingMaskIDs[y.key],0,N.KEEP,N.KEEP,N.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(y){let N=this.context.gl,ie=y.sort((Re,je)=>je.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(be>1){this.currentStencilSource=void 0,this.nextStencilID+be>256&&this.clearStencil();let Re={};for(let je=0;jeje.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(this.clearStencil(),be>1){let Re={},je={};for(let Ze=0;Ze0};for(let Kt in je){let st=je[Kt];st.used&&st.prepare(this.context),Ze[Kt]=st.getVisibleCoordinates(!1),ut[Kt]=Ze[Kt].slice().reverse(),ft[Kt]=st.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Kt=0;Ktthis.useProgram(Kt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:N.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=N.showOverdrawInspector,this.depthRangeFor3D=[0,1-(y._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Re.length-1;this.currentLayer>=0;this.currentLayer--){let Kt=this.style._layers[Re[this.currentLayer]],st=je[Kt.source],It=Ze[Kt.source];this._renderTileClippingMasks(Kt,It,!1),this.renderLayer(this,st,Kt,It,Dt)}this.renderPass="translucent";let Gt=!1;for(this.currentLayer=0;this.currentLayervr.source&&!vr.isHidden(It)?[st.tileManagers[vr.source]]:[]),dr=ir.filter(vr=>vr.getSource().type==="vector"),Ar=ir.filter(vr=>vr.getSource().type!=="vector"),hr=vr=>{(!Ut||Ut.getSource().maxzoom0?N.pop():null}isPatternMissing(y){if(!y)return!1;if(!y.from||!y.to)return!0;let N=this.imageManager.getPattern(y.from.toString()),ie=this.imageManager.getPattern(y.to.toString());return!N||!ie}useProgram(y,N,ie=!1,fe=[]){var be;this.cache||(this.cache={});let Re=!!this.style.map.terrain,je=this.style.projection,Ze=ie?Ai.projectionMercator:je.shaderPreludeCode,ut=ie?gi:je.shaderDefine,ft=y+(N?N.cacheKey:"")+`/${ie?qi:je.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(Re?"/terrain":"")+(fe?`/${fe.join("/")}`:"");return(be=this.cache)[ft]||(be[ft]=new ah(this.context,Ai[y],N,qf[y],this._showOverdrawInspector,Re,Ze,ut,fe)),this.cache[ft]}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 y=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(y.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var y,N;if(this._tileTextures){for(let ie in this._tileTextures){let fe=this._tileTextures[ie];if(fe)for(let be of fe)be.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((y=this.tileExtentMesh.vertexBuffer)===null||y===void 0||y.destroy()),this.tileExtentMesh&&((N=this.tileExtentMesh.indexBuffer)===null||N===void 0||N.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let ie in this.cache){let fe=this.cache[ie];fe?.program&&this.context.gl.deleteProgram(fe.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:y,drawingBufferHeight:N}=this.context.gl;return this.width!==y||this.height!==N}}function mc(pe,y){let N,ie=!1,fe=null,be=()=>{fe=null,ie&&(pe(...N),fe=setTimeout(be,y),ie=!1)};return(...Re)=>(ie=!0,N=Re,fe||be(),fe)}Su.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Jc{constructor(y){this._getCurrentHash=()=>{let N=window.location.hash.replace("#","");if(this._hashName){let ie,fe=N.split("&").map(be=>be.split("="));for(let be of fe)be[0]===this._hashName&&(ie=be);return(ie&&ie[1]||"").split("/")}return N.split("/")},this._onHashChange=()=>{let N=this._getCurrentHash();if(!this._isValidHash(N))return!1;let ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(N[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+N[2],+N[1]],zoom:+N[0],bearing:ie,pitch:+(N[4]||0)}),!0},this._updateHashUnthrottled=()=>{let N=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,N)},this._removeHash=()=>{let N=this._getCurrentHash();if(N.length===0)return;let ie=N.join("/"),fe=ie;fe.split("&").length>0&&(fe=fe.split("&")[0]),this._hashName&&(fe=`${this._hashName}=${ie}`);let be=window.location.hash.replace(fe,"");be.startsWith("#&")?be=be.slice(0,1)+be.slice(2):be==="#"&&(be="");let Re=window.location.href.replace(/(#.+)?$/,be);Re=Re.replace("&&","&"),window.history.replaceState(window.history.state,null,Re)},this._updateHash=mc(this._updateHashUnthrottled,300),this._hashName=y&&encodeURIComponent(y)}addTo(y){return this._map=y,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(y){let N=this._map.getCenter(),ie=Math.round(100*this._map.getZoom())/100,fe=Math.ceil((ie*Math.LN2+Math.log(512/360/.5))/Math.LN10),be=Math.pow(10,fe),Re=Math.round(N.lng*be)/be,je=Math.round(N.lat*be)/be,Ze=this._map.getBearing(),ut=this._map.getPitch(),ft="";if(ft+=y?`/${Re}/${je}/${ie}`:`${ie}/${je}/${Re}`,(Ze||ut)&&(ft+="/"+Math.round(10*Ze)/10),ut&&(ft+=`/${Math.round(ut)}`),this._hashName){let Dt=this._hashName,Gt=!1,Kt=window.location.hash.slice(1).split("&").map(st=>{let It=st.split("=")[0];return It===Dt?(Gt=!0,`${It}=${ft}`):st}).filter(st=>st);return Gt||Kt.push(`${Dt}=${ft}`),`#${Kt.join("&")}`}return`#${ft}`}_isValidHash(y){if(y.length<3||y.some(isNaN))return!1;try{new e.W(+y[2],+y[1])}catch{return!1}let N=+y[0],ie=+(y[3]||0),fe=+(y[4]||0);return N>=this._map.getMinZoom()&&N<=this._map.getMaxZoom()&&ie>=-180&&ie<=180&&fe>=this._map.getMinPitch()&&fe<=this._map.getMaxPitch()}}let oc={linearity:.3,easing:e.cv(0,0,.3,1)},du=e.e({deceleration:2500,maxSpeed:1400},oc),Jl=e.e({deceleration:20,maxSpeed:1400},oc),Ql=e.e({deceleration:1e3,maxSpeed:360},oc),Eu=e.e({deceleration:1e3,maxSpeed:90},oc),bf=e.e({deceleration:1e3,maxSpeed:360},oc);class lh{constructor(y){this._map=y,this.clear()}clear(){this._inertiaBuffer=[]}record(y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:m(),settings:y})}_drainInertiaBuffer(){let y=this._inertiaBuffer,N=m();for(;y.length>0&&N-y[0].time>160;)y.shift()}_onMoveEnd(y){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let N={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:be}of this._inertiaBuffer)N.zoom+=be.zoomDelta||0,N.bearing+=be.bearingDelta||0,N.pitch+=be.pitchDelta||0,N.roll+=be.rollDelta||0,be.panDelta&&N.pan._add(be.panDelta),be.around&&(N.around=be.around),be.pinchAround&&(N.pinchAround=be.pinchAround);let ie=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,fe={};if(N.pan.mag()){let be=Ks(N.pan.mag(),ie,e.e({},du,y||{})),Re=N.pan.mult(be.amount/N.pan.mag()),je=this._map.cameraHelper.handlePanInertia(Re,this._map.transform);fe.center=je.easingCenter,fe.offset=je.easingOffset,Pc(fe,be)}if(N.zoom){let be=Ks(N.zoom,ie,Jl);fe.zoom=e.cw(this._map.transform.zoom+be.amount,this._map.getZoomSnap(),be.amount),Pc(fe,be)}if(N.bearing){let be=Ks(N.bearing,ie,Ql);fe.bearing=this._map.transform.bearing+e.al(be.amount,-179,179),Pc(fe,be)}if(N.pitch){let be=Ks(N.pitch,ie,Eu);fe.pitch=this._map.transform.pitch+be.amount,Pc(fe,be)}if(N.roll){let be=Ks(N.roll,ie,bf);fe.roll=this._map.transform.roll+e.al(be.amount,-179,179),Pc(fe,be)}if(fe.zoom||fe.bearing){let be=N.pinchAround===void 0?N.around:N.pinchAround;fe.around=be?this._map.unproject(be):this._map.getCenter()}return this.clear(),e.e(fe,{noMoveStart:!0})}}function Pc(pe,y){(!pe.duration||pe.durationN.unproject(Ze)),je=be.reduce((Ze,ut,ft,Dt)=>Ze.add(ut.div(Dt.length)),new e.P(0,0));super(y,{points:be,point:je,lngLats:Re,lngLat:N.unproject(je),originalEvent:ie}),this._defaultPrevented=!1}}class wf extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(y,N,ie){super(y,{originalEvent:ie}),this._defaultPrevented=!1}}class Qc{constructor(y,N){this._map=y,this._clickTolerance=N.clickTolerance}reset(){delete this._mousedownPos}wheel(y){return this._firePreventable(new wf(y.type,this._map,y))}mousedown(y,N){return this._mousedownPos=N,this._firePreventable(new Bl(y.type,this._map,y))}mouseup(y){this._map.fire(new Bl(y.type,this._map,y))}click(y,N){this._mousedownPos&&this._mousedownPos.dist(N)>=this._clickTolerance||this._map.fire(new Bl(y.type,this._map,y))}dblclick(y){return this._firePreventable(new Bl(y.type,this._map,y))}mouseover(y){this._map.fire(new Bl(y.type,this._map,y))}mouseout(y){this._map.fire(new Bl(y.type,this._map,y))}touchstart(y){return this._firePreventable(new Wu(y.type,this._map,y))}touchmove(y){this._map.fire(new Wu(y.type,this._map,y))}touchend(y){this._map.fire(new Wu(y.type,this._map,y))}touchcancel(y){this._map.fire(new Wu(y.type,this._map,y))}_firePreventable(y){if(this._map.fire(y),y.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ku{constructor(y){this._map=y}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(y){this._map.fire(new Bl(y.type,this._map,y))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(y){this._delayContextMenu?this._contextMenuEvent=y:this._ignoreContextMenu||this._map.fire(new Bl(y.type,this._map,y)),this._map.listens("contextmenu")&&y.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ol{constructor(y){this._map=y}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(y){return this.transform.screenPointToLocation(e.P.convert(y),this._map.terrain)}}class Nl{constructor(y,N){this._map=y,this._tr=new Ol(y),this._el=y.getCanvasContainer(),this._container=y.getContainer(),this._clickTolerance=N.clickTolerance||1,N.boxZoom&&typeof N.boxZoom=="object"&&(this._boxZoomEnd=N.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(y,N){this.isEnabled()&&y.shiftKey&&y.button===0&&(g.disableDrag(),this._startPos=this._lastPos=N,this._active=!0)}mousemoveWindow(y,N){if(!this._active)return;let ie=N;if(this._lastPos.equals(ie)||!this._box&&ie.dist(this._startPos)be.fitScreenCoordinates(ie,fe,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",y)}keydown(y){this._active&&y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",y))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),g.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(y,N){return this._map.fire(new e.n(y,{originalEvent:N}))}}function fi(pe,y){if(pe.length!==y.length)throw new Error(`The number of touches and points are not equal - touches ${pe.length}, points ${y.length}`);let N={};for(let ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=y.timeStamp),ie.length===this.numTouches&&(this.centroid=function(fe){let be=new e.P(0,0);for(let Re of fe)be._add(Re);return be.div(fe.length)}(N),this.touches=fi(ie,N)))}touchmove(y,N,ie){if(this.aborted||!this.centroid)return;let fe=fi(ie,N);for(let be in this.touches){let Re=fe[be];(!Re||Re.dist(this.touches[be])>30)&&(this.aborted=!0)}}touchend(y,N,ie){if((!this.centroid||y.timeStamp-this.startTime>500)&&(this.aborted=!0),ie.length===0){let fe=!this.aborted&&this.centroid;if(this.reset(),fe)return fe}}}class $e{constructor(y){this.singleTap=new eu(y),this.numTaps=y.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(y,N,ie){this.singleTap.touchstart(y,N,ie)}touchmove(y,N,ie){this.singleTap.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this.singleTap.touchend(y,N,ie);if(fe){let be=y.timeStamp-this.lastTime<500,Re=!this.lastTap||this.lastTap.dist(fe)<30;if(be&&Re||this.reset(),this.count++,this.lastTime=y.timeStamp,this.lastTap=fe,this.count===this.numTaps)return this.reset(),fe}}}class nt{constructor(y){this._tr=new Ol(y),this._zoomIn=new $e({numTouches:1,numTaps:2}),this._zoomOut=new $e({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(y,N,ie){this._zoomIn.touchstart(y,N,ie),this._zoomOut.touchstart(y,N,ie)}touchmove(y,N,ie){this._zoomIn.touchmove(y,N,ie),this._zoomOut.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this._zoomIn.touchend(y,N,ie),be=this._zoomOut.touchend(y,N,ie),Re=this._tr;return fe?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom+1,je.getZoomSnap()),around:Re.unproject(fe)},{originalEvent:y})}):be?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom-1,je.getZoomSnap()),around:Re.unproject(be)},{originalEvent:y})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mt{constructor(y){this._enabled=!!y.enable,this._moveStateManager=y.moveStateManager,this._clickTolerance=y.clickTolerance||1,this._moveFunction=y.move,this._activateOnStart=!!y.activateOnStart,y.assignEvents(this),this.reset()}reset(y){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(y)}_move(...y){let N=this._moveFunction(...y);if(N.bearingDelta||N.pitchDelta||N.rollDelta||N.around||N.panDelta)return this._active=!0,N}dragStart(y,N){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(y)&&(this._moveStateManager.startMove(y),this._lastPoint=Array.isArray(N)?N[0]:N,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(y,N){if(!this.isEnabled())return;let ie=this._lastPoint;if(!ie)return;if(y.preventDefault(),!this._moveStateManager.isValidMoveEvent(y))return void this.reset(y);let fe=Array.isArray(N)?N[0]:N;return!this._moved&&fe.dist(ie)!0}),N=new Pr){this.mouseMoveStateManager=y,this.oneFingerTouchMoveStateManager=N}_executeRelevantHandler(y,N,ie){return y instanceof MouseEvent?N(y):typeof TouchEvent<"u"&&y instanceof TouchEvent?ie(y):void 0}startMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.startMove(N)},N=>{this.oneFingerTouchMoveStateManager.startMove(N)})}endMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.endMove(N)},N=>{this.oneFingerTouchMoveStateManager.endMove(N)})}isValidStartEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidStartEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidStartEvent(N))}isValidMoveEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidMoveEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(N))}isValidEndEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidEndEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidEndEvent(N))}}let kr=pe=>{pe.mousedown=pe.dragStart,pe.mousemoveWindow=pe.dragMove,pe.mouseup=pe.dragEnd,pe.contextmenu=y=>{y.preventDefault()}};class jr{constructor(y,N){this._clickTolerance=y.clickTolerance||1,this._map=N,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(y){return y<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(y,N,ie){return this._calculateTransform(y,N,ie)}touchmove(y,N,ie){if(this._active){if(!this._shouldBePrevented(ie.length))return y.preventDefault(),this._calculateTransform(y,N,ie);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",y)}}touchend(y,N,ie){this._calculateTransform(y,N,ie),this._active&&this._shouldBePrevented(ie.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(y,N,ie){ie.length>0&&(this._active=!0);let fe=fi(ie,N),be=new e.P(0,0),Re=new e.P(0,0),je=0;for(let ut in fe){let ft=fe[ut],Dt=this._touches[ut];Dt&&(be._add(ft),Re._add(ft.sub(Dt)),je++,fe[ut]=ft)}if(this._touches=fe,this._shouldBePrevented(je)||!Re.mag())return;let Ze=Re.div(je);return this._sum._add(Ze),this._sum.mag()Math.abs(pe.x)}class Si extends Jr{constructor(y){super(),this._currentTouchCount=0,this._map=y}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(y,N,ie){super.touchstart(y,N,ie),this._currentTouchCount=ie.length}_start(y){this._lastPoints=y,ii(y[0].sub(y[1]))&&(this._valid=!1)}_move(y,N,ie){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let fe=y[0].sub(this._lastPoints[0]),be=y[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(fe,be,ie.timeStamp),this._valid?(this._lastPoints=y,this._active=!0,{pitchDelta:(fe.y+be.y)/2*-.5}):void 0}gestureBeginsVertically(y,N,ie){if(this._valid!==void 0)return this._valid;let fe=y.mag()>=2,be=N.mag()>=2;if(!fe&&!be)return;if(!fe||!be)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;let Re=y.y>0==N.y>0;return ii(y)&&ii(N)&&Re}}let oi={panStep:100,bearingStep:15,pitchStep:10};class Ji{constructor(y){this._tr=new Ol(y);let N=oi;this._panStep=N.panStep,this._bearingStep=N.bearingStep,this._pitchStep=N.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(y){if(y.altKey||y.ctrlKey||y.metaKey)return;let N=0,ie=0,fe=0,be=0,Re=0;switch(y.keyCode){case 61:case 107:case 171:case 187:N=1;break;case 189:case 109:case 173:N=-1;break;case 37:y.shiftKey?ie=-1:(y.preventDefault(),be=-1);break;case 39:y.shiftKey?ie=1:(y.preventDefault(),be=1);break;case 38:y.shiftKey?fe=1:(y.preventDefault(),Re=-1);break;case 40:y.shiftKey?fe=-1:(y.preventDefault(),Re=1);break;default:return}return this._rotationDisabled&&(ie=0,fe=0),{cameraAnimation:je=>{let Ze=this._tr;je.easeTo({duration:300,easeId:"keyboardHandler",easing:Qi,zoom:N?e.cw(Ze.zoom+N*(y.shiftKey?2:1),je.getZoomSnap()):Ze.zoom,bearing:Ze.bearing+ie*this._bearingStep,pitch:Ze.pitch+fe*this._pitchStep,offset:[-be*this._panStep,-Re*this._panStep],center:Ze.center},{originalEvent:y})}}}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 Qi(pe){return pe*(2-pe)}let Oo=4.000244140625,Qo=1/450;class vo{constructor(y,N){this._onTimeout=ie=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ie)},this._map=y,this._tr=new Ol(y),this._triggerRenderFrame=N,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Qo}setZoomRate(y){this._defaultZoomRate=y}setWheelZoomRate(y){this._wheelZoomRate=y}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!y&&y.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(y){return!!this._map.cooperativeGestures.isEnabled()&&!(y.ctrlKey||this._map.cooperativeGestures.isBypassed(y))}wheel(y){if(!this.isEnabled())return;if(this._shouldBePrevented(y))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",y);let N=y.deltaMode===WheelEvent.DOM_DELTA_LINE?40*y.deltaY:y.deltaY,ie=m(),fe=ie-(this._lastWheelEventTime||0);this._lastWheelEventTime=ie,N!==0&&N%Oo==0?this._type="wheel":N!==0&&Math.abs(N)<4?this._type="trackpad":fe>400?(this._type=null,this._lastValue=N,this._timeout=setTimeout(this._onTimeout,40,y)):this._type||(this._type=Math.abs(fe*N)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,N+=this._lastValue)),y.shiftKey&&N&&(N/=4),this._type&&(this._lastWheelEvent=y,this._delta-=N,this._active||this._start(y)),y.preventDefault()}_start(y){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let N=g.mousePos(this._map.getCanvas(),y),ie=this._tr;this._aroundPoint=this._aroundCenter?ie.transform.locationToScreenPoint(e.W.convert(ie.center)):N,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let y=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let je=y.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=je),typeof this._targetZoom=="number"&&(this._targetZoom+=je)}if(this._delta!==0){let je=this._type==="wheel"&&Math.abs(this._delta)>Oo?this._wheelZoomRate:this._defaultZoomRate,Ze=2/(1+Math.exp(-Math.abs(this._delta*je)));this._delta<0&&Ze!==0&&(Ze=1/Ze);let ut=typeof this._targetZoom!="number"?y.scale:e.ao(this._targetZoom),ft=y.applyConstrain(y.getCameraLngLat(),e.ar(ut*Ze)).zoom,Dt=this._map.getZoomSnap();if(this._type==="wheel"&&Dt>0){let Gt=e.cw(y.zoom,Dt);this._targetZoom=e.cw(ft,Dt,ft-Gt)}else this._targetZoom=ft;this._type==="wheel"&&(this._startZoom=y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let N=typeof this._targetZoom!="number"?y.zoom:this._targetZoom,ie=this._startZoom,fe=this._easing,be,Re=!1;if(this._type==="wheel"&&ie&&fe){let je=m()-this._lastWheelEventTime,Ze=Math.min((je+5)/200,1),ut=fe(Ze);be=e.H.number(ie,N,ut),Ze<1?this._needsRerender=!0:Re=!0}else be=N,Re=!0;return this._active=!0,Re&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=be,{noInertia:!0,needsRenderFrame:!Re,zoomDelta:be-y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(y){let N=e.cy;if(this._prevEase){let ie=this._prevEase,fe=(m()-ie.start)/ie.duration,be=ie.easing(fe+.01)-ie.easing(fe),Re=.27/Math.sqrt(be*be+1e-4)*.01,je=Math.sqrt(.0729-Re*Re);N=e.cv(Re,je,.25,1)}return this._prevEase={start:m(),duration:y,easing:N},N}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ys{constructor(y,N){this._clickZoom=y,this._tapZoom=N}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 ol{constructor(y){this._tr=new Ol(y),this.reset()}reset(){this._active=!1}dblclick(y,N){return y.preventDefault(),{cameraAnimation:ie=>{ie.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(y.shiftKey?-1:1),ie.getZoomSnap()),around:this._tr.unproject(N)},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class jl{constructor(){this._tap=new $e({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(y){this._zoomRate=y??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(y,N,ie){if(!this._swipePoint)if(this._tapTime){let fe=N[0],be=y.timeStamp-this._tapTime<500,Re=this._tapPoint.dist(fe)<30;be&&Re?ie.length>0&&(this._swipePoint=fe,this._swipeTouch=ie[0].identifier):this.reset()}else this._tap.touchstart(y,N,ie)}touchmove(y,N,ie){if(this._tapTime){if(this._swipePoint){if(ie[0].identifier!==this._swipeTouch)return;let fe=N[0],be=fe.y-this._swipePoint.y;return this._swipePoint=fe,y.preventDefault(),this._active=!0,{zoomDelta:be/128*this._zoomRate}}}else this._tap.touchmove(y,N,ie)}touchend(y,N,ie){if(this._tapTime)this._swipePoint&&ie.length===0&&this.reset();else{let fe=this._tap.touchend(y,N,ie);fe&&(this._tapTime=y.timeStamp,this._tapPoint=fe)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hs{constructor(y,N,ie){this._el=y,this._mousePan=N,this._touchPan=ie}enable(y){this._inertiaOptions=y||{},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 Cu{constructor(y,N,ie,fe){this._pitchWithRotate=y.pitchWithRotate,this._rollEnabled=y.rollEnabled,this._mouseRotate=N,this._mousePitch=ie,this._mouseRoll=fe}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class hi{constructor(y,N,ie,fe){this._el=y,this._touchZoom=N,this._touchRotate=ie,this._tapDragZoom=fe,this._rotationDisabled=!1,this._enabled=!0}enable(y){this._touchZoom.enable(y),this._rotationDisabled||this._touchRotate.enable(y),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()}setZoomRate(y){this._touchZoom.setZoomRate(y),this._tapDragZoom.setZoomRate(y)}setZoomThreshold(y){this._touchZoom.setZoomThreshold(y)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class wi{constructor(y,N){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=y,this._options=N,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let y=this._map.getCanvasContainer();y.classList.add("maplibregl-cooperative-gestures"),this._container=g.create("div","maplibregl-cooperative-gesture-screen",y);let N=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(N=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let ie=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),fe=document.createElement("div");fe.className="maplibregl-desktop-message",fe.textContent=N,this._container.appendChild(fe);let be=document.createElement("div");be.className="maplibregl-mobile-message",be.textContent=ie,this._container.appendChild(be),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),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(y){return y[this._bypassKey]}notifyGestureBlocked(y,N){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:y,originalEvent:N})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let sl=pe=>pe.zoom||pe.drag||pe.roll||pe.pitch||pe.rotate;class sc extends e.n{}function tu(pe){var y;return((y=pe.panDelta)===null||y===void 0?void 0:y.mag())||pe.zoomDelta||pe.bearingDelta||pe.pitchDelta||pe.rollDelta}class Ps{get _ownerDocument(){var y;return((y=this._el)===null||y===void 0?void 0:y.ownerDocument)||document}get _ownerWindow(){var y,N;return((N=(y=this._el)===null||y===void 0?void 0:y.ownerDocument)===null||N===void 0?void 0:N.defaultView)||window}constructor(y,N){this.handleWindowEvent=fe=>{this.handleEvent(fe,`${fe.type}Window`)},this.handleEvent=(fe,be)=>{if(fe.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Re=fe.type==="renderFrame"?void 0:fe,je={needsRenderFrame:!1},Ze={},ut={};for(let{handlerName:Gt,handler:Kt,allowed:st}of this._handlers){if(!Kt.isEnabled())continue;let It;if(this._blockedByActive(ut,st,Gt))Kt.reset();else if(Kt[be||fe.type]){if(e.cz(fe,be||fe.type)){let Ut=g.mousePos(this._map.getCanvas(),fe);It=Kt[be||fe.type](fe,Ut)}else if(e.cA(fe,be||fe.type)){let Ut=this._getMapTouches(fe.touches),ir=g.touchPos(this._map.getCanvas(),Ut);It=Kt[be||fe.type](fe,ir,Ut)}else e.cB(be||fe.type)||(It=Kt[be||fe.type](fe));this.mergeHandlerResult(je,Ze,It,Gt,Re),It?.needsRenderFrame&&this._triggerRenderFrame()}(It||Kt.isActive())&&(ut[Gt]=Kt)}let ft={};for(let Gt in this._previousActiveHandlers)ut[Gt]||(ft[Gt]=Re);this._previousActiveHandlers=ut,(Object.keys(ft).length||tu(je))&&(this._changes.push([je,Ze,ft]),this._triggerRenderFrame()),(Object.keys(ut).length||tu(je))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Dt}=je;Dt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Dt(this._map))},this._map=y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lh(y),this._bearingSnap=N.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(N);let ie=this._el;this._listeners=[[ie,"touchstart",{passive:!0}],[ie,"touchmove",{passive:!1}],[ie,"touchend",void 0],[ie,"touchcancel",void 0],[ie,"mousedown",void 0],[ie,"mousemove",void 0],[ie,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[ie,"mouseover",void 0],[ie,"mouseout",void 0],[ie,"dblclick",void 0],[ie,"click",void 0],[ie,"keydown",{capture:!1}],[ie,"keyup",void 0],[ie,"wheel",{passive:!1}],[ie,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[fe,be,Re]of this._listeners)fe.addEventListener(be,fe===this._ownerDocument?this.handleWindowEvent:this.handleEvent,Re)}destroy(){for(let[y,N,ie]of this._listeners)y.removeEventListener(N,y===this._ownerDocument?this.handleWindowEvent:this.handleEvent,ie)}_addDefaultHandlers(y){let N=this._map,ie=N.getCanvasContainer();this._add("mapEvent",new Qc(N,y));let fe=N.boxZoom=new Nl(N,y);this._add("boxZoom",fe),y.interactive&&y.boxZoom&&fe.enable();let be=N.cooperativeGestures=new wi(N,y.cooperativeGestures);this._add("cooperativeGestures",be),y.cooperativeGestures&&be.enable();let Re=new nt(N),je=new ol(N);N.doubleClickZoom=new ys(je,Re),this._add("tapZoom",Re),this._add("clickZoom",je),y.interactive&&y.doubleClickZoom&&N.doubleClickZoom.enable();let Ze=new jl;this._add("tapDragZoom",Ze);let ut=N.touchPitch=new Si(N);this._add("touchPitch",ut),y.interactive&&y.touchPitch&&N.touchPitch.enable(y.touchPitch);let ft=()=>N.project(N.getCenter()),Dt=function({enable:hr,clickTolerance:vr,aroundCenter:Or=!0,minPixelCenterThreshold:Cr=100,rotateDegreesPerPixelMoved:ta=.8},ka){let Ta=new Wt({checkCorrectEvent:Ra=>Ra.button===0&&Ra.ctrlKey||Ra.button===2&&!Ra.ctrlKey});return new mt({clickTolerance:vr,move:(Ra,ua)=>{let ia=ka();if(Or&&Math.abs(ia.y-Ra.y)>Cr)return{bearingDelta:e.cx(new e.P(Ra.x,ua.y),ua,ia)};let ga=(ua.x-Ra.x)*ta;return Or&&ua.yta.button===0&&ta.ctrlKey||ta.button===2});return new mt({clickTolerance:vr,move:(ta,ka)=>({pitchDelta:(ka.y-ta.y)*Or}),moveStateManager:Cr,enable:hr,assignEvents:kr})}(y),Kt=function({enable:hr,clickTolerance:vr,rollDegreesPerPixelMoved:Or=.3},Cr){let ta=new Wt({checkCorrectEvent:ka=>ka.button===2&&ka.ctrlKey});return new mt({clickTolerance:vr,move:(ka,Ta)=>{let Ra=Cr(),ua=(Ta.x-ka.x)*Or;return Ta.yCr.button===0&&!Cr.ctrlKey});return new mt({clickTolerance:vr,move:(Cr,ta)=>({around:ta,panDelta:ta.sub(Cr)}),activateOnStart:!0,moveStateManager:Or,enable:hr,assignEvents:kr})}(y),It=new jr(y,N);N.dragPan=new Hs(ie,st,It),this._add("mousePan",st),this._add("touchPan",It,["touchZoom","touchRotate"]),y.interactive&&y.dragPan&&N.dragPan.enable(y.dragPan);let Ut=new Tn,ir=new Ba;N.touchZoomRotate=new hi(ie,ir,Ut,Ze),this._add("touchRotate",Ut,["touchPan","touchZoom"]),this._add("touchZoom",ir,["touchPan","touchRotate"]),y.interactive&&y.touchZoomRotate&&N.touchZoomRotate.enable(y.touchZoomRotate),this._add("blockableMapEvent",new ku(N));let dr=N.scrollZoom=new vo(N,()=>this._triggerRenderFrame());this._add("scrollZoom",dr,["mousePan"]),y.interactive&&y.scrollZoom&&N.scrollZoom.enable(y.scrollZoom);let Ar=N.keyboard=new Ji(N);this._add("keyboard",Ar),y.interactive&&y.keyboard&&N.keyboard.enable()}_add(y,N,ie){this._handlers.push({handlerName:y,handler:N,allowed:ie}),this._handlersById[y]=N}stop(y){if(!this._updatingCamera){for(let{handler:N}of this._handlers)N.reset();this._inertia.clear(),this._fireEvents({},{},y),this._changes=[]}}isActive(){for(let{handler:y}of this._handlers)if(y.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!sl(this._eventsInProgress)||this.isZooming()}_blockedByActive(y,N,ie){for(let fe in y)if(fe!==ie&&!N?.includes(fe))return!0;return!1}_getMapTouches(y){let N=[];for(let ie of y)this._el.contains(ie.target)&&N.push(ie);return N}mergeHandlerResult(y,N,ie,fe,be){if(!ie)return;e.e(y,ie);let Re={handlerName:fe,originalEvent:ie.originalEvent||be};ie.zoomDelta!==void 0&&(N.zoom=Re),ie.panDelta!==void 0&&(N.drag=Re),ie.rollDelta!==void 0&&(N.roll=Re),ie.pitchDelta!==void 0&&(N.pitch=Re),ie.bearingDelta!==void 0&&(N.rotate=Re)}_applyChanges(){let y={},N={},ie={};for(let[fe,be,Re]of this._changes)fe.panDelta&&(y.panDelta=(y.panDelta||new e.P(0,0))._add(fe.panDelta)),fe.zoomDelta&&(y.zoomDelta=(y.zoomDelta||0)+fe.zoomDelta),fe.bearingDelta&&(y.bearingDelta=(y.bearingDelta||0)+fe.bearingDelta),fe.pitchDelta&&(y.pitchDelta=(y.pitchDelta||0)+fe.pitchDelta),fe.rollDelta&&(y.rollDelta=(y.rollDelta||0)+fe.rollDelta),fe.around!==void 0&&(y.around=fe.around),fe.pinchAround!==void 0&&(y.pinchAround=fe.pinchAround),fe.noInertia&&(y.noInertia=fe.noInertia),e.e(N,be),e.e(ie,Re);this._updateMapTransform(y,N,ie),this._changes=[]}_updateMapTransform(y,N,ie){let fe=this._map,be=fe._getTransformForUpdate(),Re=fe.terrain;if(!(tu(y)||Re&&this._terrainMovement))return void this._fireEvents(N,ie,!0);fe._stop(!0);let{panDelta:je,zoomDelta:Ze,bearingDelta:ut,pitchDelta:ft,rollDelta:Dt,around:Gt,pinchAround:Kt}=y;Kt!==void 0&&(Gt=Kt),Gt||(Gt=fe.transform.centerPoint),Re&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let st={panDelta:je,zoomDelta:Ze,rollDelta:Dt,pitchDelta:ft,bearingDelta:ut,around:Gt};this._map.cameraHelper.useGlobeControls&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let It=Gt.distSqr(be.centerPoint)<.01?be.center:be.screenPointToLocation(je?Gt.sub(je):Gt);this._handleMapControls({terrain:Re,tr:be,deltasForHelper:st,preZoomAroundLoc:It,combinedEventsInProgress:N,panDelta:je}),fe._applyUpdatedTransform(be),this._map._update(),y.noInertia||this._inertia.record(y),this._fireEvents(N,ie,!0)}_handleMapControls({terrain:y,tr:N,deltasForHelper:ie,preZoomAroundLoc:fe,combinedEventsInProgress:be,panDelta:Re}){let je=this._map.cameraHelper;if(je.handleMapControlsRollPitchBearingZoom(ie,N),y)return je.useGlobeControls?(this._terrainMovement||!be.drag&&!be.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void je.handleMapControlsPan(ie,N,fe)):this._terrainMovement||!be.drag&&!be.zoom?void(be.drag&&this._terrainMovement&&Re?N.setCenter(N.screenPointToLocation(N.centerPoint.sub(Re))):je.handleMapControlsPan(ie,N,fe)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void je.handleMapControlsPan(ie,N,fe));je.handleMapControlsPan(ie,N,fe)}_fireEvents(y,N,ie){let fe=sl(this._eventsInProgress),be=sl(y),Re={};for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._eventsInProgress[Dt]||(Re[`${Dt}start`]=Gt),this._eventsInProgress[Dt]=y[Dt]}!fe&&be&&this._fireEvent("movestart",be.originalEvent);for(let Dt in Re)this._fireEvent(Dt,Re[Dt]);be&&this._fireEvent("move",be.originalEvent);for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._fireEvent(Dt,Gt)}let je={},Ze;for(let Dt in this._eventsInProgress){let{handlerName:Gt,originalEvent:Kt}=this._eventsInProgress[Dt];this._handlersById[Gt].isActive()||(delete this._eventsInProgress[Dt],Ze=N[Gt]||Kt,je[`${Dt}end`]=Ze)}for(let Dt in je)this._fireEvent(Dt,je[Dt]);let ut=sl(this._eventsInProgress),ft=(fe||be)&&!ut;if(ft&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Dt=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Dt.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Dt)}if(ie&&ft){this._updatingCamera=!0;let Dt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Gt=Kt=>Kt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new sc("renderFrame",{timeStamp:y})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class gc extends e.E{constructor(y,N,ie){super(),this._renderFrameCallback=()=>{let fe=Math.min((m()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(fe)),fe<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=y,this._bearingSnap=ie.bearingSnap,this._zoomSnap=ie.zoomSnap,this.cameraHelper=N,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(y,N){y.apply(this.transform,!0),this.transform=y,this.cameraHelper=N}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(y,N){return this.jumpTo({center:y},N)}getCenterElevation(){return this.transform.elevation}setCenterElevation(y,N){return this.jumpTo({elevation:y},N),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(y){this._centerClampedToGround=y}panBy(y,N,ie){return y=e.P.convert(y).mult(-1),this.panTo(this.transform.center,e.e({offset:y},N),ie)}panTo(y,N,ie){return this.easeTo(e.e({center:y},N),ie)}getZoom(){return this.transform.zoom}setZoom(y,N){return this.jumpTo({zoom:y},N),this}zoomTo(y,N,ie){return this.easeTo(e.e({zoom:y},N),ie)}zoomIn(y,N){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),y,N),this}zoomOut(y,N){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),y,N),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(y,N){return y!=this.transform.fov&&(this.transform.setFov(y),this.fire(new e.n("movestart",N)).fire(new e.n("move",N)).fire(new e.n("moveend",N))),this}getBearing(){return this.transform.bearing}setZoomSnap(y){return this._zoomSnap=y,this}getZoomSnap(){return this._zoomSnap}setBearing(y,N){return this.jumpTo({bearing:y},N),this}getPadding(){return this.transform.padding}setPadding(y,N){return this.jumpTo({padding:y},N),this}rotateTo(y,N,ie){return this.easeTo(e.e({bearing:y},N),ie)}resetNorth(y,N){return this.rotateTo(0,e.e({duration:1e3},y),N),this}resetNorthPitch(y,N){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},y),N),this}snapToNorth(y,N){return Math.abs(this.getBearing()){It.easeFunc(Ut),this.terrain&&!y.freezeElevation&&this._updateElevation(Ut),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},Ut=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N,Ut)},y),this}_prepareEase(y,N,ie={}){this._moving=!0,N||ie.moving||this.fire(new e.n("movestart",y)),this._zooming&&!ie.zooming&&this.fire(new e.n("zoomstart",y)),this._rotating&&!ie.rotating&&this.fire(new e.n("rotatestart",y)),this._pitching&&!ie.pitching&&this.fire(new e.n("pitchstart",y)),this._rolling&&!ie.rolling&&this.fire(new e.n("rollstart",y))}_prepareElevation(y){this._elevationCenter=y,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(y,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(y){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let N=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(y<1&&N!==this._elevationTarget){let ie=this._elevationTarget-this._elevationStart;this._elevationStart+=y*(ie-(N-(ie*y+this._elevationStart))/(1-y)),this._elevationTarget=N}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,y))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(y){if(!this.terrain&&y.elevation>=0&&y.pitch<=90)return{};let N=y.getCameraLngLat(),ie=y.getCameraAltitude(),fe=this.terrain?this.terrain.getElevationForLngLatZoom(N,y.zoom):0;if(iethis._elevateCameraIfInsideTerrain(fe)),this.transformCameraUpdate&&N.push(fe=>this.transformCameraUpdate(fe)),!N.length)return;let ie=y.clone();for(let fe of N){let be=ie.clone(),{center:Re,zoom:je,roll:Ze,pitch:ut,bearing:ft,elevation:Dt}=fe(be);Re&&be.setCenter(Re),Dt!==void 0&&be.setElevation(Dt),je!==void 0&&be.setZoom(je),Ze!==void 0&&be.setRoll(Ze),ut!==void 0&&be.setPitch(ut),ft!==void 0&&be.setBearing(ft),ie.apply(be,!1)}this.transform.apply(ie,!1)}_fireMoveEvents(y){this.fire(new e.n("move",y)),this._zooming&&this.fire(new e.n("zoom",y)),this._rotating&&this.fire(new e.n("rotate",y)),this._pitching&&this.fire(new e.n("pitch",y)),this._rolling&&this.fire(new e.n("roll",y))}_afterEase(y,N){if(this._easeId&&N&&this._easeId===N)return;delete this._easeId;let ie=this._zooming,fe=this._rotating,be=this._pitching,Re=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,ie&&this.fire(new e.n("zoomend",y)),fe&&this.fire(new e.n("rotateend",y)),be&&this.fire(new e.n("pitchend",y)),Re&&this.fire(new e.n("rollend",y)),this.fire(new e.n("moveend",y))}flyTo(y,N){if(!y.essential&&s.prefersReducedMotion){let ua=e.V(y,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(ua,N)}this.stop(),"zoom"in(y=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},y))&&this._zoomSnap&&(y.zoom=e.cw(y.zoom,this._zoomSnap));let ie=this._getTransformForUpdate(),fe=ie.bearing,be=ie.pitch,Re=ie.roll,je=ie.padding,Ze="bearing"in y?this._normalizeBearing(y.bearing,fe):fe,ut="pitch"in y?+y.pitch:be,ft="roll"in y?this._normalizeBearing(y.roll,Re):Re,Dt="padding"in y?y.padding:ie.padding,Gt=e.P.convert(y.offset),Kt=ie.centerPoint.add(Gt),st=ie.screenPointToLocation(Kt),It=this.cameraHelper.handleFlyTo(ie,{bearing:Ze,pitch:ut,roll:ft,padding:Dt,locationAtOffset:st,offsetAsPoint:Gt,center:y.center,minZoom:y.minZoom,zoom:y.zoom}),Ut=y.curve,ir=Math.max(ie.width,ie.height),dr=ir/It.scaleOfZoom,Ar=It.pixelPathLength;typeof It.scaleOfMinZoom=="number"&&(Ut=Math.sqrt(ir/It.scaleOfMinZoom/Ar*2));let hr=Ut*Ut;function vr(ua){let ia=(dr*dr-ir*ir+(ua?-1:1)*hr*hr*Ar*Ar)/(2*(ua?dr:ir)*hr*Ar);return Math.log(Math.sqrt(ia*ia+1)-ia)}function Or(ua){return(Math.exp(ua)-Math.exp(-ua))/2}function Cr(ua){return(Math.exp(ua)+Math.exp(-ua))/2}let ta=vr(!1),ka=function(ua){return Cr(ta)/Cr(ta+Ut*ua)},Ta=function(ua){return ir*((Cr(ta)*(Or(ia=ta+Ut*ua)/Cr(ia))-Or(ta))/hr)/Ar;var ia},Ra=(vr(!0)-ta)/Ut;if(Math.abs(Ar)<2e-6||!isFinite(Ra)){if(Math.abs(ir-dr)<1e-6)return this.easeTo(y,N);let ua=dr0,ka=ia=>Math.exp(ua*Ut*ia)}return y.duration="duration"in y?+y.duration:1e3*Ra/("screenSpeed"in y?+y.screenSpeed/Ut:+y.speed),y.maxDuration&&y.duration>y.maxDuration&&(y.duration=0),this._zooming=!0,this._rotating=fe!==Ze,this._pitching=ut!==be,this._rolling=ft!==Re,this._padding=!ie.isPaddingEqual(Dt),this._prepareEase(N,!1),this.terrain&&this._prepareElevation(It.targetCenter),this._ease(ua=>{let ia=ua*Ra,ga=1/ka(ia),da=Ta(ia);this._rotating&&ie.setBearing(e.H.number(fe,Ze,ua)),this._pitching&&ie.setPitch(e.H.number(be,ut,ua)),this._rolling&&ie.setRoll(e.H.number(Re,ft,ua)),this._padding&&(ie.interpolatePadding(je,Dt,ua),Kt=ie.centerPoint.add(Gt)),It.easeFunc(ua,ga,da,Kt),this.terrain&&!y.freezeElevation&&this._updateElevation(ua),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},()=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N)},y),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(y,N){var ie;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let fe=this._onEaseEnd;delete this._onEaseEnd,fe.call(this,N)}return y||(ie=this.handlers)===null||ie===void 0||ie.stop(!1),this}_ease(y,N,ie){ie.animate===!1||ie.duration===0?(y(1),N()):(this._easeStart=m(),this._easeOptions=ie,this._onEaseFrame=y,this._onEaseEnd=N,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(y,N){y=e.X(y,-180,180);let ie=Math.abs(y-N);return Math.abs(y-360-N)MapLibre
'};class ll{constructor(y=pu){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=N=>{!N||N.sourceDataType!=="metadata"&&N.sourceDataType!=="visibility"&&N.dataType!=="style"&&N.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=y}getDefaultPosition(){return"bottom-right"}onAdd(y){return this._map=y,this._compact=this.options.compact,this._container=g.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=g.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=g.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(){this._container.remove(),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(y,N){let ie=this._map._getUIString(`AttributionControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)}_updateAttributions(){if(!this._map.style)return;let y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?y=y.concat(this.options.customAttribution.map(fe=>typeof fe!="string"?"":fe)):typeof this.options.customAttribution=="string"&&y.push(this.options.customAttribution)),this._map.style.stylesheet){let fe=this._map.style.stylesheet;this.styleOwner=fe.owner,this.styleId=fe.id}let N=this._map.style.tileManagers;for(let fe in N){let be=N[fe];if(be.used||be.usedForTerrain){let Re=be.getSource();Re.attribution&&!y.includes(Re.attribution)&&y.push(Re.attribution)}}y=y.filter(fe=>String(fe).trim()),y.sort((fe,be)=>fe.length-be.length),y=y.filter((fe,be)=>{for(let Re=be+1;Re{let N=this._container.children;if(N.length){let ie=N[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&ie.classList.add("maplibregl-compact"):ie.classList.remove("maplibregl-compact")}},this.options=y}getDefaultPosition(){return"bottom-left"}onAdd(y){var N;this._map=y,this._compact=(N=this.options)===null||N===void 0?void 0:N.compact,this._container=g.create("div","maplibregl-ctrl");let ie=g.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(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class de{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(y){let N=++this._id;return this._queue.push({callback:y,id:N,cancelled:!1}),N}remove(y){let N=this._currentlyRunning,ie=N?this._queue.concat(N):this._queue;for(let fe of ie)if(fe.id===y)return void(fe.cancelled=!0)}run(y=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let N=this._currentlyRunning=this._queue;this._queue=[];for(let ie of N)if(!ie.cancelled&&(ie.callback(y),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ee=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class qe extends e.E{constructor(y){super(),this._lastTilesetChange=m(),this.tileManager=y,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=y._source.tileSize*2**this.deltaZoom,y.usedForTerrain=!0,y.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(y,N){this.tileManager.update(y,N),this._renderableTilesKeys=[];let ie={};for(let fe of Je(y,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:N,calculateTileZoom:this.tileManager._source.calculateTileZoom}))ie[fe.key]=!0,this._renderableTilesKeys.push(fe.key),this._tiles[fe.key]||(fe.terrainRttPosMatrix32f=new Float64Array(16),e.c7(fe.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[fe.key]=new Tt(fe,this.tileSize),this._lastTilesetChange=m());for(let fe in this._tiles)ie[fe]||delete this._tiles[fe]}freeRtt(y){for(let N in this._tiles){let ie=this._tiles[N];(!y||ie.tileID.equals(y)||ie.tileID.isChildOf(y)||y.isChildOf(ie.tileID))&&(ie.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(y=>this.getTileByID(y))}getTileByID(y){return this._tiles[y]}getTerrainCoords(y,N){return N?this._getTerrainCoordsForTileRanges(y,N):this._getTerrainCoordsForRegularTile(y)}_getTerrainCoordsForRegularTile(y){let N={};for(let ie of this._renderableTilesKeys){let fe=this._tiles[ie].tileID,be=y.clone(),Re=e.bj();if(fe.canonical.equals(y.canonical))e.c7(Re,0,e.a6,e.a6,0,0,1);else if(fe.canonical.isChildOf(y.canonical)){let je=fe.canonical.z-y.canonical.z,Ze=fe.canonical.x-(fe.canonical.x>>je<>je<>je;e.c7(Re,0,ft,ft,0,0,1),e.Q(Re,Re,[-Ze*ft,-ut*ft,0])}else{if(!y.canonical.isChildOf(fe.canonical))continue;{let je=y.canonical.z-fe.canonical.z,Ze=y.canonical.x-(y.canonical.x>>je<>je<>je;e.c7(Re,0,e.a6,e.a6,0,0,1),e.Q(Re,Re,[Ze*ft,ut*ft,0]),e.S(Re,Re,[1/2**je,1/2**je,0])}}be.terrainRttPosMatrix32f=new Float32Array(Re),N[ie]=be}return N}_getTerrainCoordsForTileRanges(y,N){let ie={};for(let fe of this._renderableTilesKeys){let be=this._tiles[fe].tileID;if(!this._isWithinTileRanges(be,N))continue;let Re=y.clone(),je=e.bj();if(be.canonical.z===y.canonical.z){let Ze=y.canonical.x-be.canonical.x+y.wrap*(1<y.canonical.z){let Ze=be.canonical.z-y.canonical.z,ut=be.canonical.x-(be.canonical.x>>Ze<>Ze<>Ze),Gt=y.canonical.y-(be.canonical.y>>Ze),Kt=e.a6>>Ze;e.c7(je,0,Kt,Kt,0,0,1),e.Q(je,je,[-ut*Kt+Dt*e.a6,-ft*Kt+Gt*e.a6,0])}else{let Ze=y.canonical.z-be.canonical.z,ut=y.canonical.x-(y.canonical.x>>Ze<>Ze<>Ze)-be.canonical.x,Gt=(y.canonical.y>>Ze)-be.canonical.y,Kt=e.a6<be.maxzoom&&(Re=be.maxzoom),Re=be.minzoom&&!je?.dem;)je=this.findTileInCaches(y.scaledTo(Re--).key);return je}findTileInCaches(y){let N=this.tileManager.getTileByID(y);return N||(N=this.tileManager._outOfViewCache.getByKey(y),N)}anyTilesAfterTime(y=Date.now()){return this._lastTilesetChange>=y}_isWithinTileRanges(y,N){let ie=N[y.canonical.z];return!!ie&&(y.wrap>ie.minWrap||y.wrap=ie.minTileXWrapped&&y.canonical.x<=ie.maxTileXWrapped&&y.canonical.y>=ie.minTileY&&y.canonical.y<=ie.maxTileY)}}class tt{constructor(y,N,ie){this._meshCache={},this.painter=y,this.tileManager=new qe(N),this.options=ie,this.exaggeration=typeof ie.exaggeration=="number"?ie.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let y in this._meshCache)this._meshCache[y].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(y,N,ie,fe=e.a6){var be;let Re=y.normalizeCoordinates(N,ie,fe);if(!Re)return 0;let je=this.getTerrainData(Re.tileID),Ze=(be=je.tile)===null||be===void 0?void 0:be.dem;if(!Ze)return 0;let ut=e.cC([],[Re.x/fe*e.a6,Re.y/fe*e.a6],je.u_terrain_matrix),ft=[ut[0]*Ze.dim,ut[1]*Ze.dim],Dt=Math.floor(ft[0]),Gt=Math.floor(ft[1]),Kt=ft[0]-Dt,st=ft[1]-Gt;return Ze.get(Dt,Gt)*(1-Kt)*(1-st)+Ze.get(Dt+1,Gt)*Kt*(1-st)+Ze.get(Dt,Gt+1)*(1-Kt)*st+Ze.get(Dt+1,Gt+1)*Kt*st}getElevationForLngLatZoom(y,N){if(!e.cD(N,y.wrap()))return 0;let{tileID:ie,mercatorX:fe,mercatorY:be}=this._getOverscaledTileIDFromLngLatZoom(y,N);return this.getElevation(ie,fe%e.a6,be%e.a6,e.a6)}getElevationForLngLat(y,N){let ie=Je(N,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),fe=0;for(let be of ie)be.canonical.z>fe&&(fe=Math.min(be.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(y,fe)}getElevation(y,N,ie,fe=e.a6){return this.getDEMElevation(y,N,ie,fe)*this.exaggeration}getTerrainData(y){var N,ie;if(!this._emptyDemTexture){let Re=this.painter.context,je=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(Re,je,Re.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(Re,new e.R({width:1,height:1}),Re.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}let fe=this.tileManager.getSourceTile(y,!0);if(fe?.dem&&(!fe.demTexture||fe.needsTerrainPrepare)){let Re=this.painter.context;fe.demTexture=this.painter.getTileTexture(fe.dem.stride),fe.demTexture?fe.demTexture.update(fe.dem.getPixels(),{premultiply:!1}):fe.demTexture=new e.T(Re,fe.dem.getPixels(),Re.gl.RGBA,{premultiply:!1}),fe.demTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),fe.needsTerrainPrepare=!1}let be=fe&&fe.toString()+fe.tileID.key+y.key;if(be&&!this._demMatrixCache[be]){let Re=this.tileManager.getSource().maxzoom,je=y.canonical.z-fe.tileID.canonical.z;y.overscaledZ>y.canonical.z&&(y.canonical.z>=Re?je=y.canonical.z-Re:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ze=y.canonical.x-(y.canonical.x>>je<>je<>8<<4|be>>8,N[Re+3]=0;let ie=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(N.buffer)),fe=new e.T(y,ie,y.gl.RGBA,{premultiply:!1});return fe.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._coordsTexture=fe,fe}pointCoordinate(y){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let N=new Uint8Array(4),ie=this.painter.context,fe=ie.gl,be=Math.round(y.x*this.painter.pixelRatio/devicePixelRatio),Re=Math.round(y.y*this.painter.pixelRatio/devicePixelRatio),je=Math.round(this.painter.height/devicePixelRatio);ie.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),fe.readPixels(be,je-Re-1,1,1,fe.RGBA,fe.UNSIGNED_BYTE,N),ie.bindFramebuffer.set(null);let Ze=N[0]+(N[2]>>4<<8),ut=N[1]+((15&N[2])<<8),ft=this.coordsIndex[255-N[3]],Dt=ft&&this.tileManager.getTileByID(ft);if(!Dt)return null;let Gt=this._coordsTextureSize,Kt=(1<0,fe=ie&&y.canonical.y===0,be=ie&&y.canonical.y===(1<y.id!==N),this._recentlyUsed.push(y.id)}stampObject(y){y.stamp=++this._stamp}getOrCreateFreeObject(){for(let N of this._recentlyUsed)if(!this._objects[N].inUse)return this._objects[N];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let y=this._createObject(this._objects.length);return this._objects.push(y),y}freeObject(y){y.inUse=!1}freeAllObjects(){for(let y of this._objects)this.freeObject(y)}isFull(){return!(this._objects.length!y.inUse)===!1}}let ct={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Nt{constructor(y,N){this.painter=y,this.terrain=N,this.pool=new at(y.context,30,N.tileManager.tileSize*N.qualityFactor)}destruct(){this.pool.destruct()}getTexture(y){return this.pool.getObjectForId(y.rtt[this._stacks.length-1].id).texture}prepareForRender(y,N){var ie,fe,be;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=y._order.filter(Re=>!y._layers[Re].isHidden(N)),this._coordsAscending={};for(let Re in y.tileManagers){this._coordsAscending[Re]={};let je=y.tileManagers[Re].getVisibleCoordinates(),Ze=y.tileManagers[Re].getSource(),ut=Ze instanceof ke?Ze.terrainTileRanges:null;for(let ft of je){let Dt=this.terrain.tileManager.getTerrainCoords(ft,ut);for(let Gt in Dt)(be=this._coordsAscending[Re])[Gt]||(be[Gt]=[]),this._coordsAscending[Re][Gt].push(Dt[Gt])}}this._rttFingerprints={};for(let Re of y._order){let je=y._layers[Re],Ze=je.source;if(ct[je.type]&&!this._rttFingerprints[Ze]){this._rttFingerprints[Ze]={};let ut=(fe=(ie=y.tileManagers[Ze])===null||ie===void 0?void 0:ie.getState().revision)!==null&&fe!==void 0?fe:0;for(let ft in this._coordsAscending[Ze])this._rttFingerprints[Ze][ft]=`${this._coordsAscending[Ze][ft].map(Dt=>Dt.key).sort().join()}#${ut}`}}for(let Re of this._renderableTiles)for(let je in this._rttFingerprints){let Ze=this._rttFingerprints[je][Re.tileID.key];Ze&&Ze!==Re.rttFingerprint[je]&&(Re.rtt=[])}}renderLayer(y,N){if(y.isHidden(this.painter.transform.zoom))return!1;let ie=Object.assign(Object.assign({},N),{isRenderingToTexture:!0}),fe=y.type,be=this.painter,Re=this._renderableLayerIds[this._renderableLayerIds.length-1]===y.id;if(ct[fe]&&(this._prevType&&ct[this._prevType]||this._stacks.push([]),this._prevType=fe,this._stacks[this._stacks.length-1].push(y.id),!Re))return!0;if(ct[this._prevType]||ct[fe]&&Re){this._prevType=fe;let je=this._stacks.length-1,Ze=this._stacks[je]||[];for(let ut of this._renderableTiles){if(this.pool.isFull()&&(Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(ut),ut.rtt[je]){let Dt=this.pool.getObjectForId(ut.rtt[je].id);if(Dt.stamp===ut.rtt[je].stamp){this.pool.useObject(Dt);continue}}let ft=this.pool.getOrCreateFreeObject();this.pool.useObject(ft),this.pool.stampObject(ft),ut.rtt[je]={id:ft.id,stamp:ft.stamp},be.context.bindFramebuffer.set(ft.fbo.framebuffer),be.context.clear({color:e.bo.transparent,stencil:0}),be.currentStencilSource=void 0;for(let Dt of Ze){let Gt=be.style._layers[Dt],Kt=Gt.source?this._coordsAscending[Gt.source][ut.tileID.key]:[ut.tileID];be.context.viewport.set([0,0,ft.fbo.width,ft.fbo.height]),be._renderTileClippingMasks(Gt,Kt,!0),be.renderLayer(be,be.style.tileManagers[Gt.source],Gt,Kt,ie),Gt.source&&(ut.rttFingerprint[Gt.source]=this._rttFingerprints[Gt.source][ut.tileID.key])}}return Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects(),ct[fe]}return!1}}let St={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Jt=t,mr={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:pu,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},gr=class extends gc{get _ownerWindow(){var pe,y;return((y=(pe=this._container)===null||pe===void 0?void 0:pe.ownerDocument)===null||y===void 0?void 0:y.defaultView)||window}constructor(pe){var y,N,ie;let fe=Object.assign(Object.assign(Object.assign({},mr),pe),{canvasContextAttributes:Object.assign(Object.assign({},mr.canvasContextAttributes),pe.canvasContextAttributes)});if(fe.minZoom!=null&&fe.maxZoom!=null&&fe.minZoom>fe.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(fe.minPitch!=null&&fe.maxPitch!=null&&fe.minPitch>fe.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(fe.minPitch!=null&&fe.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(fe.maxPitch!=null&&fe.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let be=new Eo,Re=new Wo;fe.minZoom!==void 0&&be.setMinZoom(fe.minZoom),fe.maxZoom!==void 0&&be.setMaxZoom(fe.maxZoom),fe.minPitch!==void 0&&be.setMinPitch(fe.minPitch),fe.maxPitch!==void 0&&be.setMaxPitch(fe.maxPitch),fe.renderWorldCopies!==void 0&&be.setRenderWorldCopies(fe.renderWorldCopies),fe.transformConstrain!==null&&be.setConstrainOverride(fe.transformConstrain),super(be,Re,{bearingSnap:fe.bearingSnap,zoomSnap:fe.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new de,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ze=>{if(Ze.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let ut of Object.values(this.style._layers))if(ut.type==="custom"&&console.warn(`Custom layer with id '${ut.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),ut._listeners)for(let[ft]of Object.entries(ut._listeners))console.warn(`Custom layer with id '${ut.id}' had event listeners for event '${ft}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))}else this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))},this._contextRestored=Ze=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:Ze}))},this._onMapScroll=Ze=>{if(Ze.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=fe.interactive,this._maxTileCacheSize=fe.maxTileCacheSize,this._maxTileCacheZoomLevels=fe.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},fe.canvasContextAttributes),this._trackResize=fe.trackResize===!0,this._bearingSnap=fe.bearingSnap,this._zoomSnap=fe.zoomSnap,this._centerClampedToGround=fe.centerClampedToGround,this._refreshExpiredTiles=fe.refreshExpiredTiles===!0,this._fadeDuration=fe.fadeDuration,this._crossSourceCollisions=fe.crossSourceCollisions===!0,this._collectResourceTiming=fe.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},St),fe.locale),this._clickTolerance=fe.clickTolerance,this._overridePixelRatio=fe.pixelRatio,this._maxCanvasSize=fe.maxCanvasSize,this._zoomLevelsToOverscale=fe.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=fe.transformCameraUpdate,this.transformConstrain=fe.transformConstrain,this.cancelPendingTileRequestsWhileZooming=fe.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(fe.anisotropicFilterPitch),fe.reduceMotion!==void 0&&(s.prefersReducedMotion=fe.reduceMotion),this._imageQueueHandle=v.addThrottleControl(()=>this.isMoving()),this._requestManager=new i(fe.transformRequest),this._container=this._resolveContainer(fe.container),fe.maxBounds&&this.setMaxBounds(fe.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Ps(this,fe),this._hash=fe.hash?new Jc(typeof fe.hash=="string"&&fe.hash||void 0).addTo(this):void 0,!((y=this._hash)===null||y===void 0)&&y._onHashChange()||(this.jumpTo({center:fe.center,elevation:fe.elevation,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,roll:fe.roll}),fe.bounds&&(this.resize(),this.fitBounds(fe.bounds,e.e({},fe.fitBoundsOptions,{duration:0}))));let je=typeof fe.style=="string"||((ie=(N=fe.style)===null||N===void 0?void 0:N.projection)===null||ie===void 0?void 0:ie.type)!=="globe";this.resize(null,je),this._localIdeographFontFamily=fe.localIdeographFontFamily,this._validateStyle=fe.validateStyle,fe.style&&this.setStyle(fe.style,{localIdeographFontFamily:fe.localIdeographFontFamily}),fe.attributionControl&&this.addControl(new ll(typeof fe.attributionControl=="boolean"?void 0:fe.attributionControl)),fe.maplibreLogo&&this.addControl(new ef,fe.logoPosition),this.on("style.load",()=>{if(je||this._resizeTransform(),this.transform.unmodified){let Ze=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ze)}}),this.on("data",Ze=>{this._update(Ze.dataType==="style"),this.fire(new e.n(`${Ze.dataType}data`,Ze))}),this.on("dataloading",Ze=>{this.fire(new e.n(`${Ze.dataType}dataloading`,Ze))}),this.on("dataabort",Ze=>{this.fire(new e.n("sourcedataabort",Ze))})}_getMapId(){return this._mapId}setGlobalStateProperty(pe,y){return this.style.setGlobalStateProperty(pe,y),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(pe,y){if(y===void 0&&(y=pe.getDefaultPosition?pe.getDefaultPosition():"top-right"),!pe?.onAdd)return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let N=pe.onAdd(this);this._controls.push(pe);let ie=this._controlPositions[y];return y.includes("bottom")?ie.insertBefore(N,ie.firstChild):ie.appendChild(N),this}removeControl(pe){if(!pe?.onRemove)return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let y=this._controls.indexOf(pe);return y>-1&&this._controls.splice(y,1),pe.onRemove(this),this}hasControl(pe){return this._controls.includes(pe)}coveringTiles(pe){return Je(this.transform,pe)}calculateCameraOptionsFromTo(pe,y,N,ie){return ie==null&&this.terrain&&(ie=this.terrain.getElevationForLngLat(N,this.transform)),super.calculateCameraOptionsFromTo(pe,y,N,ie)}resize(pe,y=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(y);let N=!this._moving;return N&&(this.stop(),this.fire(new e.n("movestart",pe)).fire(new e.n("move",pe))),this.fire(new e.n("resize",pe)),N&&this.fire(new e.n("moveend",pe)),this}_resizeInternal(pe=!0){let[y,N]=this._containerDimensions(),ie=this._getClampedPixelRatio(y,N);if(this._resizeCanvas(y,N,ie),this.painter.resize(y,N,ie),this.painter.overLimit()){let fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];let be=this._getClampedPixelRatio(y,N);this._resizeCanvas(y,N,be),this.painter.resize(y,N,be)}this._resizeTransform(pe)}_resizeTransform(pe=!0){var y;let[N,ie]=this._containerDimensions();this.transform.resize(N,ie,pe),(y=this._requestedCameraState)===null||y===void 0||y.resize(N,ie,pe)}_getClampedPixelRatio(pe,y){let{0:N,1:ie}=this._maxCanvasSize,fe=this.getPixelRatio(),be=pe*fe,Re=y*fe;return Math.min(be>N?N/be:1,Re>ie?ie/Re:1)*fe}getPixelRatio(){var pe;return(pe=this._overridePixelRatio)!==null&&pe!==void 0?pe:devicePixelRatio}setPixelRatio(pe){this._overridePixelRatio=pe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(pe){return this.transform.setMaxBounds(q.convert(pe)),this._update()}setMinZoom(pe){if((pe=pe??-2)>=-2&&pe<=this.transform.maxZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMinZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(pe){if((pe=pe??22)>=this.transform.minZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMaxZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(pe){if((pe=pe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(pe>=0&&pe<=this.transform.maxPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMinPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(pe){if((pe=pe??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(pe>=this.transform.minPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMaxPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(pe){if((pe=pe??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(pe<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=pe,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(pe){return this.transform.setRenderWorldCopies(pe),this._update()}setTransformConstrain(pe){return this.transform.setConstrainOverride(pe),this._update()}project(pe){return this.transform.locationToScreenPoint(e.W.convert(pe),this.style&&this.terrain)}unproject(pe){return this.transform.screenPointToLocation(e.P.convert(pe),this.terrain)}isMoving(){var pe;return this._moving||((pe=this.handlers)===null||pe===void 0?void 0:pe.isMoving())}isZooming(){var pe;return this._zooming||((pe=this.handlers)===null||pe===void 0?void 0:pe.isZooming())}isRotating(){var pe;return this._rotating||((pe=this.handlers)===null||pe===void 0?void 0:pe.isRotating())}_createDelegatedListener(pe,y,N){if(pe==="mouseenter"||pe==="mouseover"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:be=>{let Re=y.filter(Ze=>this.getLayer(Ze)),je=Re.length!==0?this.queryRenderedFeatures(be.point,{layers:Re}):[];je.length?ie||(ie=!0,N.call(this,new Bl(pe,this,be.originalEvent,{features:je}))):ie=!1},mouseout:()=>{ie=!1}}}}if(pe==="mouseleave"||pe==="mouseout"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:Re=>{let je=y.filter(Ze=>this.getLayer(Ze));(je.length!==0?this.queryRenderedFeatures(Re.point,{layers:je}):[]).length?ie=!0:ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))},mouseout:Re=>{ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))}}}}{let ie=fe=>{let be=y.filter(je=>this.getLayer(je)),Re=be.length!==0?this.queryRenderedFeatures(fe.point,{layers:be}):[];Re.length&&(fe.features=Re,N.call(this,fe),delete fe.features)};return{layers:y,listener:N,delegates:{[pe]:ie}}}}_saveDelegatedListener(pe,y){var N;this._delegatedListeners||(this._delegatedListeners={}),(N=this._delegatedListeners)[pe]||(N[pe]=[]),this._delegatedListeners[pe].push(y)}_removeDelegatedListener(pe,y,N){var ie;if(!(!((ie=this._delegatedListeners)===null||ie===void 0)&&ie[pe]))return;let fe=this._delegatedListeners[pe];for(let be=0;bey.includes(je))){for(let je in Re.delegates)this.off(je,Re.delegates[je]);return void fe.splice(be,1)}}}on(pe,y,N){if(N===void 0)return super.on(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.on(be,fe.delegates[be]);return{unsubscribe:()=>{this._removeDelegatedListener(pe,ie,N)}}}once(pe,y,N){if(N===void 0)return super.once(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);for(let be in fe.delegates){let Re=fe.delegates[be];fe.delegates[be]=(...je)=>{this._removeDelegatedListener(pe,ie,N),Re(...je)}}this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.once(be,fe.delegates[be]);return this}off(pe,y,N){return N===void 0?super.off(pe,y):(this._removeDelegatedListener(pe,typeof y=="string"?[y]:y,N),this)}queryRenderedFeatures(pe,y){if(!this.style)return[];let N,ie=pe instanceof e.P||Array.isArray(pe),fe=ie?pe:[[0,0],[this.transform.width,this.transform.height]];if(y||(y=(ie?{}:pe)||{}),fe instanceof e.P||typeof fe[0]=="number")N=[e.P.convert(fe)];else{let be=e.P.convert(fe[0]),Re=e.P.convert(fe[1]);N=[be,new e.P(Re.x,be.y),Re,new e.P(be.x,Re.y),be]}return this.style.queryRenderedFeatures(N,y,this.transform)}querySourceFeatures(pe,y){return this.style.querySourceFeatures(pe,y)}setStyle(pe,y){return(y=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&pe?(this._diffStyle(pe,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(pe,y))}setTransformRequest(pe){return this._requestManager.setTransformRequest(pe),this}_getUIString(pe){let y=this._locale[pe];if(y==null)throw new Error(`Missing UI string '${pe}'`);return y}_updateStyle(pe,y){var N,ie,fe;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),this._diffStyleRequest=null,y.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(pe,y));let be=this.style&&y.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!pe)),pe?(this.style=new Ku(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof pe=="string"?this.style.loadURL(pe,y,be):this.style.loadJSON(pe,y,be),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(fe=(ie=this.style)===null||ie===void 0?void 0:ie.projection)===null||fe===void 0||fe.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ku(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(pe,y){return e._(this,void 0,void 0,function*(){var N;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),typeof pe=="string"){let ie=pe;this._diffStyleRequest=new AbortController;let fe=this._diffStyleRequest;try{let be=yield this._requestManager.transformRequest(ie,"Style");if(fe.signal.aborted)return void(this._diffStyleRequest=null);let Re=yield e.k(be,fe);this._diffStyleRequest=null,this._updateDiff(Re.data,y)}catch(be){this._diffStyleRequest=null,e.$(be)||this.fire(new e.l(e.d(be)))}}else typeof pe=="object"&&(this._diffStyleRequest=null,this._updateDiff(pe,y))})}_updateDiff(pe,y){try{this.style.setState(pe,y)&&this._update(!0)}catch(N){e.w(`Unable to perform style diff: ${e.d(N).message}. Rebuilding the style from scratch.`),this._updateStyle(pe,y)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(pe,y){return this._lazyInitEmptyStyle(),this.style.addSource(pe,y),this._update(!0)}isSourceLoaded(pe){var y;let N=(y=this.style)===null||y===void 0?void 0:y.tileManagers[pe];if(N!==void 0)return N.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${pe}'`)))}setTerrain(pe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),pe){let y=this.style.tileManagers[pe.source];if(!y)throw new Error(`cannot load terrain, because there exists no source with ID: ${pe.source}`);this.terrain===null&&y.reload();for(let N in this.style._layers){let ie=this.style._layers[N];ie.type==="hillshade"&&ie.source===pe.source&&e.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."),ie.type==="color-relief"&&ie.source===pe.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new tt(this.painter,y,pe),this.painter.renderToTexture=new Nt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=N=>{var ie;N.dataType==="style"?this.terrain.tileManager.freeRtt():N.dataType==="source"&&N.tile&&(N.sourceId!==pe.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((ie=N.source)===null||ie===void 0?void 0:ie.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(N.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:pe})),this}getTerrain(){var pe,y;return(y=(pe=this.terrain)===null||pe===void 0?void 0:pe.options)!==null&&y!==void 0?y:null}areTilesLoaded(){var pe;let y=(pe=this.style)===null||pe===void 0?void 0:pe.tileManagers;for(let N of Object.values(y))if(!N.areTilesLoaded())return!1;return!0}removeSource(pe){return this.style.removeSource(pe),this._update(!0)}getSource(pe){return this.style.getSource(pe)}setSourceTileLodParams(pe,y,N){if(N){let ie=this.getSource(N);if(!ie)throw new Error(`There is no source with ID "${N}", cannot set LOD parameters`);ie.calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y))}else for(let ie in this.style.tileManagers)this.style.tileManagers[ie].getSource().calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y));return this._update(!0),this}refreshTiles(pe,y){let N=this.style.tileManagers[pe];if(!N)throw new Error(`There is no tile manager with ID "${pe}", cannot refresh tile`);y===void 0?N.reload(!0):N.refreshTiles(y.map(ie=>new e.aa(ie.z,ie.x,ie.y)))}addImage(pe,y,N={}){let{pixelRatio:ie=1,sdf:fe=!1,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut}=N;if(this._lazyInitEmptyStyle(),!(y instanceof HTMLImageElement||e.b(y))){if(y.width===void 0||y.height===void 0)return this.fire(new e.l(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:ft,height:Dt,data:Gt}=y,Kt=y;return this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},new Uint8Array(Gt)),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0,userImage:Kt}),Kt.onAdd&&Kt.onAdd(this,pe),this}}{let{width:ft,height:Dt,data:Gt}=s.getImageData(y);this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},Gt),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0})}}updateImage(pe,y){let N=this.style.getImage(pe);if(!N)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let ie=y instanceof HTMLImageElement||e.b(y)?s.getImageData(y):y,{width:fe,height:be,data:Re}=ie;if(fe===void 0||be===void 0)return this.fire(new e.l(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(fe!==N.data.width||be!==N.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let je=!(y instanceof HTMLImageElement||e.b(y));return N.data.replace(Re,je),this.style.updateImage(pe,N),this}getImage(pe){return this.style.getImage(pe)}hasImage(pe){return pe?!!this.style.getImage(pe):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(pe){this.style.removeImage(pe)}loadImage(pe){return e._(this,void 0,void 0,function*(){return v.getImage(yield this._requestManager.transformRequest(pe,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(pe,y){return this._lazyInitEmptyStyle(),this.style.addLayer(pe,y),this._update(!0)}moveLayer(pe,y){return this.style.moveLayer(pe,y),this._update(!0)}removeLayer(pe){return this.style.removeLayer(pe),this._update(!0)}getLayer(pe){return this.style.getLayer(pe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(pe,y,N){return this.style.setLayerZoomRange(pe,y,N),this._update(!0)}setFilter(pe,y,N={}){return this.style.setFilter(pe,y,N),this._update(!0)}getFilter(pe){return this.style.getFilter(pe)}setPaintProperty(pe,y,N,ie={}){return this.style.setPaintProperty(pe,y,N,ie),this._update(!0)}getPaintProperty(pe,y){return this.style.getPaintProperty(pe,y)}setLayoutProperty(pe,y,N,ie={}){return this.style.setLayoutProperty(pe,y,N,ie),this._update(!0)}getLayoutProperty(pe,y){return this.style.getLayoutProperty(pe,y)}setGlyphs(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(pe,y),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(pe,y,N={}){return this._lazyInitEmptyStyle(),this.style.addSprite(pe,y,N,ie=>{ie||this._update(!0)}),this}removeSprite(pe){return this._lazyInitEmptyStyle(),this.style.removeSprite(pe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSprite(pe,y,N=>{N||this._update(!0)}),this}setLight(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setLight(pe,y),this._update(!0)}getLight(){return this.style.getLight()}setSky(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSky(pe,y),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(pe,y){return this.style.setFeatureState(pe,y),this._update()}removeFeatureState(pe,y){return this.style.removeFeatureState(pe,y),this._update()}getFeatureState(pe){return this.style.getFeatureState(pe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let pe=0,y=0;return this._container&&(pe=this._container.clientWidth||400,y=this._container.clientHeight||300),[pe,y]}_setupResizeObserver(){var pe;let y=!1,N=mc(fe=>{this._trackResize&&!this._removed&&(this.resize(fe),this.redraw())},50),ie=(pe=this._ownerWindow.ResizeObserver)!==null&&pe!==void 0?pe:ResizeObserver;this._resizeObserver=new ie(fe=>{y?N(fe):y=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(pe){if(typeof pe=="string"){let y=document.getElementById(pe);if(!y)throw new Error(`Container '${pe}' not found.`);return y}if(pe instanceof HTMLElement||pe&&typeof pe=="object"&&pe.nodeType===1)return pe;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let pe=this._container;pe.classList.add("maplibregl-map");let y=this._canvasContainer=g.create("div","maplibregl-canvas-container",pe);this._interactive&&y.classList.add("maplibregl-interactive"),this._canvas=g.create("canvas","maplibregl-canvas",y),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 N=this._containerDimensions(),ie=this._getClampedPixelRatio(N[0],N[1]);this._resizeCanvas(N[0],N[1],ie);let fe=this._controlContainer=g.create("div","maplibregl-control-container",pe),be=this._controlPositions={};for(let Re of["top-left","top-right","bottom-left","bottom-right"])be[Re]=g.create("div",`maplibregl-ctrl-${Re} `,fe);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(pe,y,N){this._canvas.width=Math.floor(N*pe),this._canvas.height=Math.floor(N*y),this._canvas.style.width=`${pe}px`,this._canvas.style.height=`${y}px`}_setupPainter(){let pe=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),y=null;this._canvas.addEventListener("webglcontextcreationerror",ie=>{y={requestedAttributes:pe},ie&&(y.statusMessage=ie.statusMessage,y.type=ie.type)},{once:!0});let N=null;if(N=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,pe):this._canvas.getContext("webgl2",pe)||this._canvas.getContext("webgl",pe),!N){let ie="Failed to initialize WebGL";throw y?(y.message=ie,new Error(JSON.stringify(y))):new Error(ie)}this.painter=new Su(N,this.transform)}migrateProjection(pe,y){super.migrateProjection(pe,y),this.painter.transform=pe,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(pe){var y;return!((y=this.style)===null||y===void 0)&&y._loaded?(this._styleDirty||(this._styleDirty=pe),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(pe){return this._update(),this._renderTaskQueue.add(pe)}_cancelRenderFrame(pe){this._renderTaskQueue.remove(pe)}_render(pe){var y,N,ie,fe,be,Re;let je=this._idleTriggered?this._fadeDuration:0,Ze=((y=this.style.projection)===null||y===void 0?void 0:y.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(pe),this._removed)return;let ut=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Gt=this.transform.zoom,Kt=m();this.style.zoomHistory.update(Gt,Kt);let st=new e.J(Gt,{now:Kt,fadeDuration:je,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),It=st.crossFadingFactor();It===1&&It===this._crossFadingFactor||(ut=!0,this._crossFadingFactor=It),this.style.update(st)}let ft=((N=this.style.projection)===null||N===void 0?void 0:N.transitionState)>0!==Ze;(ie=this.style.projection)===null||ie===void 0||ie.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((fe=this.style.projection)===null||fe===void 0?void 0:fe.transitionState,(be=this.style.projection)===null||be===void 0?void 0:be.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ft)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(Re=this.style)===null||Re===void 0?void 0:Re._updatePlacement(this.transform,this.showCollisionBoxes,je,this._crossSourceCollisions,ft),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:je,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||ut)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Dt=this._sourcesDirty||this._styleDirty||this._placementDirty;return Dt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||Dt||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var pe,y;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(),(pe=this._diffStyleRequest)===null||pe===void 0||pe.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),v.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();let N=this.painter.context.gl.getExtension("WEBGL_lose_context");N?.loseContext&&N.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frame(this._frameRequest,pe=>{this._frameRequest=null;try{this._render(pe)}catch(y){if(!e.$(y)&&!function(N){return N.message===vc}(y))throw y}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(pe){this._showTileBoundaries!==pe&&(this._showTileBoundaries=pe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(pe){this._showPadding!==pe&&(this._showPadding=pe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(pe){this._showCollisionBoxes!==pe&&(this._showCollisionBoxes=pe,pe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(pe){this._showOverdrawInspector!==pe&&(this._showOverdrawInspector=pe,this._update())}get repaint(){return!!this._repaint}set repaint(pe){this._repaint!==pe&&(this._repaint=pe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(pe){this._vertices=pe,this._update()}get version(){return Jt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(pe){return this._lazyInitEmptyStyle(),this.style.setProjection(pe),this._update(!0)}},Hr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Vr{constructor(y,N,ie=!1){this.mousedown=be=>{this.startMove(be,g.mousePos(this.element,be)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=be=>{this.move(be,g.mousePos(this.element,be))},this.mouseup=be=>{this._rotatePitchHandler.dragEnd(be),this.offTemp()},this.touchstart=be=>{be.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.startMove(be,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=be=>{be.targetTouches.length!==1?this.reset():(this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.move(be,this._lastPos))},this.touchend=be=>{be.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=N;let fe=new Br;this._rotatePitchHandler=new mt({clickTolerance:3,move:(be,Re)=>{let je=N.getBoundingClientRect(),Ze=new e.P((je.bottom-je.top)/2,(je.right-je.left)/2);return{bearingDelta:e.cx(new e.P(be.x,Re.y),Re,Ze),pitchDelta:ie?-.5*(Re.y-be.y):void 0}},moveStateManager:fe,enable:!0,assignEvents:()=>{}}),this.map=y,N.addEventListener("mousedown",this.mousedown),N.addEventListener("touchstart",this.touchstart,{passive:!1}),N.addEventListener("touchcancel",this.reset)}startMove(y,N){this._rotatePitchHandler.dragStart(y,N),g.disableDrag()}move(y,N){let ie=this.map,{bearingDelta:fe,pitchDelta:be}=this._rotatePitchHandler.dragMove(y,N)||{};fe&&ie.setBearing(ie.getBearing()+fe),be&&ie.setPitch(ie.getPitch()+be)}off(){let y=this.element;y.removeEventListener("mousedown",this.mousedown),y.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),y.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){g.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let ca;function Aa(pe,y,N,ie=!1){if(ie||!N.getCoveringTilesDetailsProvider().allowWorldCopies())return pe?.wrap();let fe=new e.W(pe.lng,pe.lat);if(pe=new e.W(pe.lng,pe.lat),y){let be=new e.W(pe.lng-360,pe.lat),Re=new e.W(pe.lng+360,pe.lat),je=N.locationToScreenPoint(pe).distSqr(y);N.locationToScreenPoint(be).distSqr(y)180;){let be=N.locationToScreenPoint(pe);if(be.x>=0&&be.y>=0&&be.x<=N.width&&be.y<=N.height)break;pe.lng>N.center.lng?pe.lng-=360:pe.lng+=360}return pe.lng!==fe.lng&&N.isPointOnMapSurface(N.locationToScreenPoint(pe))?pe:fe}let Xr={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 oa(pe,y,N){let ie=pe.classList;for(let fe in Xr)ie.remove(`maplibregl-${N}-anchor-${fe}`);ie.add(`maplibregl-${N}-anchor-${y}`)}class fa extends e.E{constructor(y){if(super(),this._onClick=N=>{this.fire(new e.n("click",{originalEvent:N}))},this._onKeyPress=N=>{N.code!=="Space"&&N.code!=="Enter"||this.togglePopup()},this._onMapClick=N=>{let ie=N.originalEvent.target,fe=this._element;this._popup&&(ie===fe||fe.contains(ie))&&this.togglePopup()},this._update=N=>{if(!this._map)return;let ie=this._map.loaded()&&!this._map.isMoving();(N?.type==="terrain"||N?.type==="render"&&!ie)&&this._map.once("render",this._update),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let fe="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?fe=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(fe=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let be="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?be="rotateX(0deg)":this._pitchAlignment==="map"&&(be=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||N&&N.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${Xr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${be} ${fe}`,s.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(N?.type==="moveend")}).catch(()=>{})},this._onMove=N=>{if(!this._isDragging){let ie=this._clickTolerance||this._map._clickTolerance;this._isDragging=N.point.dist(this._pointerdownPos)>=ie}this._isDragging&&(this._pos=N.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.n("dragstart"))),this.fire(new e.n("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 e.n("dragend")),this._state="inactive"},this._addDragHandler=N=>{this._element.contains(N.originalEvent.target)&&(N.preventDefault(),this._positionDelta=N.point.sub(this._pos).add(this._offset),this._pointerdownPos=N.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=y?.anchor||"center",this._color=y?.color||"#3FB1CE",this._scale=y?.scale||1,this._draggable=y?.draggable||!1,this._clickTolerance=y?.clickTolerance||0,this._subpixelPositioning=y?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=y?.rotation||0,this._rotationAlignment=y?.rotationAlignment||"auto",this._pitchAlignment=y?.pitchAlignment&&y.pitchAlignment!=="auto"?y.pitchAlignment:this._rotationAlignment,this.setOpacity(y?.opacity,y?.opacityWhenCovered),y?.element)this._element=y.element,this._offset=e.P.convert(y?.offset||[0,0]);else{this._defaultMarker=!0,this._element=g.create("div");let N=g.createNS("http://www.w3.org/2000/svg","svg"),ie=41,fe=27;N.setAttributeNS(null,"display","block"),N.setAttributeNS(null,"height",`${ie}px`),N.setAttributeNS(null,"width",`${fe}px`),N.setAttributeNS(null,"viewBox",`0 0 ${fe} ${ie}`);let be=g.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 Re=g.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"fill-rule","nonzero");let je=g.createNS("http://www.w3.org/2000/svg","g");je.setAttributeNS(null,"transform","translate(3.0, 29.0)"),je.setAttributeNS(null,"fill","#000000");let Ze=[{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 ir of Ze){let dr=g.createNS("http://www.w3.org/2000/svg","ellipse");dr.setAttributeNS(null,"opacity","0.04"),dr.setAttributeNS(null,"cx","10.5"),dr.setAttributeNS(null,"cy","5.80029008"),dr.setAttributeNS(null,"rx",ir.rx),dr.setAttributeNS(null,"ry",ir.ry),je.appendChild(dr)}let ut=g.createNS("http://www.w3.org/2000/svg","g");ut.setAttributeNS(null,"fill",this._color);let ft=g.createNS("http://www.w3.org/2000/svg","path");ft.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"),ut.appendChild(ft);let Dt=g.createNS("http://www.w3.org/2000/svg","g");Dt.setAttributeNS(null,"opacity","0.25"),Dt.setAttributeNS(null,"fill","#000000");let Gt=g.createNS("http://www.w3.org/2000/svg","path");Gt.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"),Dt.appendChild(Gt);let Kt=g.createNS("http://www.w3.org/2000/svg","g");Kt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Kt.setAttributeNS(null,"fill","#FFFFFF");let st=g.createNS("http://www.w3.org/2000/svg","g");st.setAttributeNS(null,"transform","translate(8.0, 8.0)");let It=g.createNS("http://www.w3.org/2000/svg","circle");It.setAttributeNS(null,"fill","#000000"),It.setAttributeNS(null,"opacity","0.25"),It.setAttributeNS(null,"cx","5.5"),It.setAttributeNS(null,"cy","5.5"),It.setAttributeNS(null,"r","5.4999962");let Ut=g.createNS("http://www.w3.org/2000/svg","circle");Ut.setAttributeNS(null,"fill","#FFFFFF"),Ut.setAttributeNS(null,"cx","5.5"),Ut.setAttributeNS(null,"cy","5.5"),Ut.setAttributeNS(null,"r","5.4999962"),st.appendChild(It),st.appendChild(Ut),Re.appendChild(je),Re.appendChild(ut),Re.appendChild(Dt),Re.appendChild(Kt),Re.appendChild(st),N.appendChild(Re),N.setAttributeNS(null,"height",ie*this._scale+"px"),N.setAttributeNS(null,"width",fe*this._scale+"px"),this._element.appendChild(N),this._offset=e.P.convert(y?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",N=>{N.preventDefault()}),this._element.addEventListener("mousedown",N=>{N.preventDefault()}),oa(this._element,this._anchor,"marker"),y?.className)for(let N of y.className.split(" "))this._element.classList.add(N);this._popup=null}addTo(y){return this.remove(),this._map=y,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",y._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),y.getCanvasContainer().appendChild(this._element),y.on("move",this._update),y.on("moveend",this._update),y.on("terrain",this._update),y.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),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("projectiontransition",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),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=e.W.convert(y),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(y){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),y){if(!("offset"in y.options)){let fe=Math.abs(13.5)/Math.SQRT2;y.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[fe,-1*(38.1-13.5+fe)],"bottom-right":[-fe,-1*(38.1-13.5+fe)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=y,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(y){return this._subpixelPositioning=y,this}getPopup(){return this._popup}togglePopup(){let y=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:y?(y.isOpen()?y.remove():(y.setLngLat(this._lngLat),y.addTo(this._map)),this):this}_updateOpacity(y=!1){var N,ie;let fe=(N=this._map)===null||N===void 0?void 0:N.terrain,be=this._map.transform.isLocationOccluded(this._lngLat);if(!fe||be){let Kt=be?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Kt&&(this._element.style.opacity=Kt,this._element.classList.toggle("maplibregl-marker-covered",be)))}if(y)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Re=this._map,je=Re.terrain.depthAtPoint(this._pos),Ze=Re.terrain.getElevationForLngLat(this._lngLat,Re.transform);if(Re.transform.lngLatToCameraDepth(this._lngLat,Ze)-je<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let ut=-this._offset.y/Re.transform.pixelsPerMeter,ft=Math.sin(Re.getPitch()*Math.PI/180)*ut,Dt=Re.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=Re.transform.lngLatToCameraDepth(this._lngLat,Ze+ft)-Dt>.006;!((ie=this._popup)===null||ie===void 0)&&ie.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",Gt)}getOffset(){return this._offset}setOffset(y){return this._offset=e.P.convert(y),this._update(),this}addClassName(y){this._element.classList.add(y)}removeClassName(y){this._element.classList.remove(y)}toggleClassName(y){return this._element.classList.toggle(y)}setDraggable(y){return this._draggable=!!y,this._map&&(y?(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(y){return this._rotation=y||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(y){return this._rotationAlignment=y||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(y){return this._pitchAlignment=y&&y!=="auto"?y:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(y,N){return(this._opacity===void 0||y===void 0&&N===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),y!==void 0&&(this._opacity=String(y)),N!==void 0&&(this._opacityWhenCovered=String(N)),this._map&&this._updateOpacity(!0),this}}let Ea={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ma=0,sa=!1,hn={maxWidth:100,unit:"metric"};function An(pe,y,N){let ie=N?.maxWidth||100,fe=pe._container.clientHeight/2,be=pe._container.clientWidth/2,Re=pe.unproject([be-ie/2,fe]),je=pe.unproject([be+ie/2,fe]),Ze=Math.round(pe.project(je).x-pe.project(Re).x),ut=Math.min(ie,Ze,pe._container.clientWidth),ft=Re.distanceTo(je);if(N?.unit==="imperial"){let Dt=3.2808*ft;Dt>5280?zn(y,ut,Dt/5280,pe._getUIString("ScaleControl.Miles")):zn(y,ut,Dt,pe._getUIString("ScaleControl.Feet"))}else N?.unit==="nautical"?zn(y,ut,ft/1852,pe._getUIString("ScaleControl.NauticalMiles")):ft>=1e3?zn(y,ut,ft/1e3,pe._getUIString("ScaleControl.Kilometers")):zn(y,ut,ft,pe._getUIString("ScaleControl.Meters"))}function zn(pe,y,N,ie){let fe=function(be){let Re=Math.pow(10,`${Math.floor(be)}`.length-1),je=be/Re;return je=je>=10?10:je>=5?5:je>=3?3:je>=2?2:je>=1?1:function(Ze){let ut=Math.pow(10,Math.ceil(-Math.log(Ze)/Math.LN10));return Math.round(Ze*ut)/ut}(je),Re*je}(N);pe.style.width=y*(fe/N)+"px",pe.innerHTML=`${fe} ${ie}`}let $n={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},xi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function di(pe){if(pe){if(typeof pe=="number"){let y=Math.round(Math.abs(pe)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,pe),"top-left":new e.P(y,y),"top-right":new e.P(-y,y),bottom:new e.P(0,-pe),"bottom-left":new e.P(y,-y),"bottom-right":new e.P(-y,-y),left:new e.P(pe,0),right:new e.P(-pe,0)}}if(pe instanceof e.P||Array.isArray(pe)){let y=e.P.convert(pe);return{center:y,top:y,"top-left":y,"top-right":y,bottom:y,"bottom-left":y,"bottom-right":y,left:y,right:y}}return{center:e.P.convert(pe.center||[0,0]),top:e.P.convert(pe.top||[0,0]),"top-left":e.P.convert(pe["top-left"]||[0,0]),"top-right":e.P.convert(pe["top-right"]||[0,0]),bottom:e.P.convert(pe.bottom||[0,0]),"bottom-left":e.P.convert(pe["bottom-left"]||[0,0]),"bottom-right":e.P.convert(pe["bottom-right"]||[0,0]),left:e.P.convert(pe.left||[0,0]),right:e.P.convert(pe.right||[0,0])}}return di(new e.P(0,0))}let uo=t;l.AJAXError=e.cG,l.EXTENT=e.a6,l.Event=e.n,l.Evented=e.E,l.LngLat=e.W,l.MercatorCoordinate=e.a7,l.Point=e.P,l.addProtocol=e.cH,l.config=e.c,l.removeProtocol=e.cI,l.AttributionControl=ll,l.BoxZoomHandler=Nl,l.CanvasSource=ce,l.CooperativeGesturesHandler=wi,l.DoubleClickZoomHandler=ys,l.DragPanHandler=Hs,l.DragRotateHandler=Cu,l.EdgeInsets=oo,l.FullscreenControl=class extends e.E{constructor(pe={}){var y;super(),this._onFullscreenChange=()=>{var N;let ie=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((N=ie?.shadowRoot)===null||N===void 0)&&N.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(y=pe.pseudo)!==null&&y!==void 0&&y,pe?.container&&(pe.container instanceof HTMLElement?this._container=pe.container:e.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(pe){return this._map=pe,this._container||(this._container=this._map.getContainer()),this._controlContainer=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let pe=this._fullscreenButton=g.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);g.create("span","maplibregl-ctrl-icon",pe).setAttribute("aria-hidden","true"),pe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let pe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",pe),this._fullscreenButton.title=pe}_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 e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=Ge,l.GeolocateControl=class extends e.E{constructor(pe){super(),this._onSuccess=y=>{if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,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(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",y)),this._finish()}},this._updateCamera=y=>{let N=new e.W(y.coords.longitude,y.coords.latitude),ie=y.coords.accuracy,fe=this._map.getBearing(),be=e.e({bearing:fe},this.options.fitBoundsOptions),Re=q.fromLngLat(N,ie);this._map.fitBounds(Re,be,{geolocateSource:!0})},this._updateMarker=y=>{if(y){let N=new e.W(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(N).addTo(this._map),this._userLocationDotMarker.setLngLat(N).addTo(this._map),this._accuracy=y.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=y=>{if(this._map){if(y.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 N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&sa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",y)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=y=>{if(!this._map)return;let N=y?.[0]instanceof ResizeObserverEntry;y.geolocateSource||this._watchState!=="ACTIVE_LOCK"||N||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",y=>{y.preventDefault()}),this._geolocateButton=g.create("button","maplibregl-ctrl-geolocate",this._container),g.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=y=>{if(this._map){if(y===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}else{let N=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=g.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new fa({element:this._dotElement}),this._circleElement=g.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new fa({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},Ea,pe)}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(y=!1){if(ca!==void 0&&!y)return ca;if(window.navigator.permissions===void 0)return ca=!!window.navigator.geolocation,ca;try{ca=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ca=!!window.navigator.geolocation}return ca})}().then(y=>this._finishSetupUI(y)),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(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ma=0,sa=!1}_isOutOfMapMaxBounds(pe){let y=this._map.getMaxBounds(),N=pe.coords;return y&&(N.longitudey.getEast()||N.latitudey.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":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let pe=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&pe))return;let y=this._map.project(pe),N=this._map.unproject([y.x+100,y.y]),ie=pe.distanceTo(N)/100,fe=2*this._accuracy/ie;this._circleElement.style.width=`${fe.toFixed(2)}px`,this._circleElement.style.height=`${fe.toFixed(2)}px`}trigger(){if(!this._setup)return e.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 e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ma--,sa=!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 e.n("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 e.n("trackuserlocationstart")),this.fire(new e.n("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 pe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ma++,Ma>1?(pe={maximumAge:6e5,timeout:0},sa=!0):(pe=this.options.positionOptions,sa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,pe)}}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)}},l.GlobeControl=class{constructor(){this._toggleProjection=()=>{var pe;let y=(pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type;this._map.setProjection(y!=="mercator"&&y?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var pe;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=g.create("button","maplibregl-ctrl-globe",this._container),g.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},l.Hash=Jc,l.ImageSource=ke,l.KeyboardHandler=Ji,l.LngLatBounds=q,l.LogoControl=ef,l.Map=gr,l.MapLibreMap=gr,l.MapMouseEvent=Bl,l.MapTouchEvent=Wu,l.MapWheelEvent=wf,l.Marker=fa,l.NavigationControl=class{constructor(pe){this._updateZoomButtons=()=>{let y=this._map.getZoom(),N=y===this._map.getMaxZoom(),ie=y===this._map.getMinZoom();this._zoomInButton.disabled=N,this._zoomOutButton.disabled=ie,this._zoomInButton.setAttribute("aria-disabled",N.toString()),this._zoomOutButton.setAttribute("aria-disabled",ie.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(y,N)=>{let ie=this._map._getUIString(`NavigationControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)},this.options=e.e({},Hr,pe),this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",y=>y.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",y=>this._map.zoomIn({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",y=>this._map.zoomOut({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",y=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:y}):this._map.resetNorth({},{originalEvent:y})}),this._compassIcon=g.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(pe){return this._map=pe,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.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(pe,y){let N=g.create("button",pe,this._container);return N.type="button",N.addEventListener("click",y),N}},l.Popup=class extends e.E{constructor(pe){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),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("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=y=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=g.create("div","maplibregl-popup",this._map.getContainer()),this._tip=g.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let je of this.options.className.split(" "))this._container.classList.add(je);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let N;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),y&&"point"in y&&y.point&&(N=y.point),this._trackPointer&&!N)return;let ie=this._flatPos=this._pos=this._trackPointer&&N?N:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&N?N:this._map.transform.locationToScreenPoint(this._lngLat));let fe=this.options.anchor,be=di(this.options.offset);if(!fe){let je=this._container.offsetWidth,Ze=this._container.offsetHeight,ut=function(Dt){var Gt,Kt,st,It;return Dt?{top:(Gt=Dt.top)!==null&&Gt!==void 0?Gt:0,right:(Kt=Dt.right)!==null&&Kt!==void 0?Kt:0,bottom:(st=Dt.bottom)!==null&&st!==void 0?st:0,left:(It=Dt.left)!==null&&It!==void 0?It:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding),ft;ft=ie.y+be.bottom.ythis._map.transform.height-Ze-ut.bottom?["bottom"]:[],ie.xthis._map.transform.width-je/2-ut.right&&ft.push("right"),fe=ft.length===0?"bottom":ft.join("-")}let Re=ie.add(be[fe]);this.options.subpixelPositioning||(Re=Re.round()),this._container.style.transform=`${Xr[fe]} translate(${Re.x}px,${Re.y}px)`,oa(this._container,fe,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create($n),pe)}addTo(pe){return this._map&&this.remove(),this._map=pe,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._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),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 e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(pe){return this._lngLat=e.W.convert(pe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),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._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(pe){return this.setDOMContent(document.createTextNode(pe))}setHTML(pe){let y=document.createDocumentFragment(),N=document.createElement("body"),ie;for(N.innerHTML=pe;ie=N.firstChild,ie;)y.appendChild(ie);return this.setDOMContent(y)}getMaxWidth(){var pe;return(pe=this._container)===null||pe===void 0?void 0:pe.style.maxWidth}setMaxWidth(pe){return this.options.maxWidth=pe,this._update(),this}setDOMContent(pe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=g.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(pe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(pe){return this._container&&this._container.classList.add(pe),this}removeClassName(pe){return this._container&&this._container.classList.remove(pe),this}setOffset(pe){return this.options.offset=pe,this._update(),this}toggleClassName(pe){if(this._container)return this._container.classList.toggle(pe)}setSubpixelPositioning(pe){this.options.subpixelPositioning=pe}setPadding(pe){this.options.padding=pe,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=g.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 pe=this._container.querySelector(xi);pe&&pe.focus()}},l.RasterDEMTileSource=he,l.RasterTileSource=ae,l.ScaleControl=class{constructor(pe){this._onMove=()=>{An(this._map,this._container,this.options)},this.setUnit=y=>{this.options.unit=y,An(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},hn),pe)}getDefaultPosition(){return"bottom-left"}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-scale",pe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=vo,l.Style=Ku,l.TerrainControl=class{constructor(pe){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=pe}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=g.create("button","maplibregl-ctrl-terrain",this._container),g.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(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Si,l.TwoFingersTouchRotateHandler=Tn,l.TwoFingersTouchZoomHandler=Ba,l.TwoFingersTouchZoomRotateHandler=hi,l.VectorTileSource=ee,l.VideoSource=_e,l.addSourceType=(pe,y)=>e._(void 0,void 0,void 0,function*(){if(le(pe))throw new Error(`A source type called "${pe}" already exists.`);((N,ie)=>{ve[N]=ie})(pe,y)}),l.clearPrewarmedResources=function(){let pe=$;pe&&(pe.isPreloaded()&&pe.numActive()===1?(pe.release(P),$=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()"))},l.createTileMesh=Ss,l.getGlobalDispatcher=se,l.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Ye().getRTLTextPluginStatus()},l.getVersion=function(){return uo},l.getWorkerCount=function(){return j.workerCount},l.getWorkerUrl=function(){return e.c.WORKER_URL},l.importScriptInWorkers=function(pe){return se().broadcast("IS",pe)},l.isTimeFrozen=function(){return c.isFrozen()},l.now=m,l.prewarm=function(){re().acquire(P)},l.restoreNow=function(){c.restoreNow()},l.setMaxParallelImageRequests=function(pe){e.c.MAX_PARALLEL_IMAGE_REQUESTS=pe},l.setNow=function(pe){c.setNow(pe)},l.setRTLTextPlugin=function(pe,y){return Ye().setRTLTextPlugin(pe,y)},l.setWorkerCount=function(pe){j.workerCount=pe},l.setWorkerUrl=function(pe){e.c.WORKER_URL=pe}});var k=p;return k})}}),rV=ze({"src/plots/map/layers.js"(J,V){"use strict";var p=Nr(),b=Cs().sanitizeHTML,E=kM(),k=Av();function l(a,o){this.subplot=a,this.uid=a.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=k.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=t(o)},e.needsNewImage=function(a){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&a.sourcetype==="image"&&(this.source!==a.source||JSON.stringify(this.coordinates)!==JSON.stringify(a.coordinates))},e.needsNewSource=function(a){return this.sourceType!==a.sourcetype||JSON.stringify(this.source)!==JSON.stringify(a.source)||this.layerType!==a.type},e.needsNewLayer=function(a){return this.layerType!==a.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(a){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:a.source,coordinates:a.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(a){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=a.sourcetype,this.source=a.source,!!t(a)){var s=r(a);o.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(a){if(a==="traces")for(var o=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function n(a){var o={},s={};switch(a.type){case"circle":p.extendFlat(s,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":p.extendFlat(s,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":p.extendFlat(s,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,m=E(c.textposition,c.iconsize);p.extendFlat(o,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":m.anchor,"text-offset":m.offset,"symbol-placement":c.placement}),p.extendFlat(s,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":p.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:o,paint:s}}function r(a){var o=a.sourcetype,s=a.source,c={type:o},m;return o==="geojson"?m="data":o==="vector"?m=typeof s=="string"?"url":"tiles":o==="raster"?(m="tiles",c.tileSize=256):o==="image"&&(m="url",c.coordinates=a.coordinates),c[m]=s,a.sourceattribution&&(c.attribution=b(a.sourceattribution)),c}V.exports=function(o,s,c){var m=new l(o,s);return m.update(c),m}}}),aV=ze({"src/plots/map/map.js"(J,V){"use strict";var p=tV(),b=Nr(),E=hp(),k=mi(),l=Gi(),e=_h(),t=Zl(),n=Fd(),r=n.drawMode,a=n.selectMode,o=_c().prepSelect,s=_c().clearOutline,c=_c().clearSelectionsCache,m=_c().selectOnClick,h=Av(),v=rV();function g(T,f){this.id=f,this.gd=T;var u=T._fullLayout,A=T._context;this.container=u._glcontainer.node(),this.isStatic=A.staticPlot,this.uid=u._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(u),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var i=g.prototype;i.plot=function(T,f,u){var A=this,x;A.map?x=new Promise(function(z,I){A.updateMap(T,f,z,I)}):x=new Promise(function(z,I){A.createMap(T,f,z,I)}),u.push(x)},i.createMap=function(T,f,u,A){var x=this,z=f[x.id],I=x.styleObj=C(z.style),O=z.bounds,D=O?[[O.west,O.south],[O.east,O.north]]:null;let B={container:x.div,style:I.style,center:_(z.center),zoom:z.zoom,bearing:z.bearing,pitch:z.pitch,maxBounds:D,interactive:!x.isStatic,canvasContextAttributes:{preserveDrawingBuffer:x.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},F=z._fitBounds;F&&(B.bounds=[[F.west,F.south],[F.east,F.north]],B.fitBoundsOptions={padding:h.fitBoundsPadding});let P=x.map=new p.Map(B).addControl(new p.AttributionControl({compact:!0}));var j={};P.on("styleimagemissing",function($){var Q=$.id;if(!j[Q]&&/^[a-zA-Z0-9-]+$/.test(Q)){j[Q]=!0;var re=new Image(15,15);re.onload=function(){P.addImage(Q,re,{sdf:!0})},re.crossOrigin="Anonymous",re.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Q+".svg"}}),P.setTransformRequest(function($){return $=$.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:$}}),P._canvas.style.left="0px",P._canvas.style.top="0px",x.rejectOnError(A),x.isStatic||x.initFx(T,f);var U=[];U.push(new Promise(function($){P.once("load",$)})),U=U.concat(E.fetchTraceGeoData(T)),Promise.all(U).then(function(){F&&w(x,z),S(x,z),x.fillBelowLookup(T,f),x.updateData(T),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)},i.updateMap=function(T,f,u,A){var x=this,z=x.map,I=f[this.id];x.rejectOnError(A);var O=[],D=C(I.style);JSON.stringify(x.styleObj)!==JSON.stringify(D)&&(x.styleObj=D,z.setStyle(D.style),x.traceHash={},O.push(new Promise(function(B){z.once("styledata",B)}))),O=O.concat(E.fetchTraceGeoData(T)),Promise.all(O).then(function(){x.fillBelowLookup(T,f),x.updateData(T);let B=I._fitBounds;B&&(z.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:h.fitBoundsPadding,animate:!1}),w(x,I),S(x,I)),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)};function w(T,f){let{center:u,zoom:A}=T.getView();f._input.center=f.center=u,f._input.zoom=f.zoom=A,f._input._fitView={center:Li({},u),zoom:A}}function S(T,f){let u=T.getView();T.viewInitial={center:b.extendFlat({},u.center),bearing:f.bearing,pitch:f.pitch,zoom:u.zoom}}i.fillBelowLookup=function(T,f){var u=f[this.id],A=u.layers,x,z,I=this.belowLookup={},O=!1;for(x=0;x1)for(x=0;x<$.length;x++)j=$[x],j.indexOf("trace-")===0?(U=j.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):j.indexOf("layout-")===0&&(U=j.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var M={choroplethmap:0,densitymap:1,scattermap:2};i.updateData=function(T){var f=this.traceHash,u,A,x,z,I=T.slice().sort(function(P,j){return M[P[0].trace.type]-M[j[0].trace.type]});for(x=0;xf.project(A).x,_subplot:f},f.yaxis={_id:"y",c2p:A=>f.project(A).y,_subplot:f},f.updateFramework(T),f.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(f.mockAxis,T)},i.initFx=function(T,f){var u=this,A=u.gd,x=u.map;x.on("moveend",function(O){if(u.map){var D=A._fullLayout;if(O.originalEvent||u.wheeling){var B=D[u.id];k.call("_storeDirectGUIEdit",A.layout,D._preGUI,u.getViewEdits(B));var F=u.getView();B._input.center=B.center=F.center,B._input.zoom=B.zoom=F.zoom,B._input.bearing=B.bearing=F.bearing,B._input.pitch=B.pitch=F.pitch,A.emit("plotly_relayout",u.getViewEditsWithDerived(F))}O.originalEvent&&O.originalEvent.type==="mouseup"?u.dragging=!1:u.wheeling&&(u.wheeling=!1),D&&D._rehover&&D._rehover()}}),x.on("wheel",function(){u.wheeling=!0}),x.on("mousemove",function(O){var D=u.div.getBoundingClientRect(),B=[O.originalEvent.offsetX,O.originalEvent.offsetY];O.target.getBoundingClientRect=function(){return D},u.xaxis.p2c=function(){return x.unproject(B).lng},u.yaxis.p2c=function(){return x.unproject(B).lat},A._fullLayout._rehover=function(){A._fullLayout._hoversubplot===u.id&&A._fullLayout[u.id]&&t.hover(A,O,u.id)},t.hover(A,O,u.id),A._fullLayout._hoversubplot=u.id});function z(){t.loneUnhover(f._hoverlayer)}x.on("dragstart",function(){u.dragging=!0,z()}),x.on("zoomstart",z),x.on("mouseout",function(){A._fullLayout._hoversubplot=null});function I(){var O=u.getView();A.emit("plotly_relayouting",u.getViewEditsWithDerived(O))}x.on("drag",I),x.on("zoom",I),x.on("dblclick",function(){var O=A._fullLayout[u.id];k.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,u.getViewEdits(O));var D=u.viewInitial;x.setCenter(_(D.center)),x.setZoom(D.zoom),x.setBearing(D.bearing),x.setPitch(D.pitch);var B=u.getView();O._input.center=O.center=B.center,O._input.zoom=O.zoom=B.zoom,O._input.bearing=O.bearing=B.bearing,O._input.pitch=O.pitch=B.pitch,A.emit("plotly_doubleclick",null),A.emit("plotly_relayout",u.getViewEditsWithDerived(B))}),u.clearOutline=function(){c(u.dragOptions),s(u.dragOptions.gd)},u.onClickInPanFn=function(O){return function(D){var B=A._fullLayout.clickmode;B.indexOf("select")>-1&&m(D.originalEvent,A,[u.xaxis],[u.yaxis],u.id,O),B.indexOf("event")>-1&&t.click(A,D.originalEvent)}}},i.updateFx=function(T){var f=this,u=f.map,A=f.gd;if(f.isStatic)return;function x(D){var B=f.map.unproject(D);return[B.lng,B.lat]}var z=T.dragmode,I;I=function(D,B){if(B.isRect){var F=D.range={};F[f.id]=[x([B.xmin,B.ymin]),x([B.xmax,B.ymax])]}else{var P=D.lassoPoints={};P[f.id]=B.map(x)}};var O=f.dragOptions;f.dragOptions=b.extendDeep(O||{},{dragmode:T.dragmode,element:f.div,gd:A,plotinfo:{id:f.id,domain:T[f.id].domain,xaxis:f.xaxis,yaxis:f.yaxis,fillRangeItems:I},xaxes:[f.xaxis],yaxes:[f.yaxis],subplot:f.id}),u.off("click",f.onClickInPanHandler),a(z)||r(z)?(u.dragPan.disable(),u.on("zoomstart",f.clearOutline),f.dragOptions.prepFn=function(D,B,F){o(D,B,F,f.dragOptions,z)},e.init(f.dragOptions)):(u.dragPan.enable(),u.off("zoomstart",f.clearOutline),f.div.onmousedown=null,f.div.ontouchstart=null,f.div.removeEventListener("touchstart",f.div._ontouchstart),f.onClickInPanHandler=f.onClickInPanFn(f.dragOptions),u.on("click",f.onClickInPanHandler))},i.updateFramework=function(T){var f=T[this.id].domain,u=T._size,A=this.div.style;A.width=u.w*(f.x[1]-f.x[0])+"px",A.height=u.h*(f.y[1]-f.y[0])+"px",A.left=u.l+f.x[0]*u.w+"px",A.top=u.t+(1-f.y[1])*u.h+"px",this.xaxis._offset=u.l+f.x[0]*u.w,this.xaxis._length=u.w*(f.x[1]-f.x[0]),this.yaxis._offset=u.t+(1-f.y[1])*u.h,this.yaxis._length=u.h*(f.y[1]-f.y[0])},i.updateLayers=function(T){var f=T[this.id],u=f.layers,A=this.layerList,x;if(u.length!==A.length){for(x=0;xnV});function nV(J,V){let p=[];for(let t of J){if(t.subplot!==V||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:n,lon:r}=t;if(!r||!n)continue;let a=Math.min(r.length,n.length);for(let o=0;of/2){var u=M.split("|").join("
");_.text(u).attr("data-unformatted",u).call(t.convertToTspans,a),T=e.bBox(_.node())}_.attr("transform",p(-3,-T.height+8)),C.insert("rect",".static-attribution").attr({x:-T.width-6,y:-T.height-3,width:T.width+6,height:T.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;T.width+6>f&&(A=f/(T.width+6));var x=[c.l+c.w*v.x[1],c.t+c.h*(1-v.y[0])];C.attr("transform",p(x[0],x[1])+b(A))}},J.updateFx=function(a){for(var o=a._fullLayout,s=o._subplots[r],c=0;c=0;n--)e.removeLayer(t[n][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,n){var r=n[0].trace,a=new k(t,r.uid),o=a.sourceId,s=p(n),c=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,c),n[0].trace._glTrace=a,a}}}),fV=ze({"src/traces/choroplethmap/index.js"(J,V){"use strict";V.exports={attributes:PM(),supplyDefaults:uV(),colorbar:ag(),calc:IA(),plot:cV(),hoverPoints:DA(),eventData:FA(),selectPoints:zA(),styleOnSelect:function(p,b){if(b){var E=b[0].trace;E._glTrace.updateOnSelect(b)}},getBelow:function(p,b){for(var E=b.getMapLayers(),k=E.length-2;k>=0;k--){var l=E[k].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=k+1;e0?+v[m]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:M})}}var _=k.extractOpts(r),T=_.reversescale?k.flipScale(_.colorscale):_.colorscale,f=T[0][1],u=E.opacity(f)<1?f:E.addOpacity(f,0),A=["interpolate",["linear"],["heatmap-density"],0,u];for(m=1;m=0;t--)l.removeLayer(e[t][1])},k.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},V.exports=function(e,t){var n=t[0].trace,r=new E(e,n.uid),a=r.sourceId,o=p(t),s=r.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(a,{type:"geojson",data:o.geojson}),r._addLayers(o,s),r}}}),gV=ze({"src/traces/densitymap/hover.js"(J,V){"use strict";var p=Gi(),b=V2().hoverPoints,E=V2().getExtraText;V.exports=function(l,e,t){var n=b(l,e,t);if(n){var r=n[0],a=r.cd,o=a[0].trace,s=a[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=p.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=E(o,s,a[0].t.labels),[r]}}}}),yV=ze({"src/traces/densitymap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b.z=E.z,b}}}),_V=ze({"src/traces/densitymap/index.js"(J,V){"use strict";V.exports={attributes:IM(),supplyDefaults:dV(),colorbar:ag(),formatLabels:EM(),calc:pV(),plot:mV(),hoverPoints:gV(),eventData:yV(),getBelow:function(p,b){for(var E=b.getMapLayers(),k=0;kw[z%w.length];i("color",g.label.map((z,I)=>E.addOpacity(S(I),.8))),i("customdata");var M=a.link||{},C=e.newContainer(o,"link");function _(z,I){return p.coerce(M,C,b.link,z,I)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",a.hoverinfo),l(M,C,_,h),_("hovertemplate"),_("sort");var T=E.luminosity(c.paper_bgcolor)<.333,f=T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",u=_("color",f);function A(z){if(!E.isValid(z))return z;let I=E.opacity(z);return I<=.8?E.addOpacity(z,I+.2):T?E.brighten(z,10):E.adjustLightness(z,-10)}_("hovercolor",Array.isArray(u)?u.map(A):A(u)),_("customdata"),t(M,C,{name:"colorscales",handleItemDefaults:n}),k(o,c,m),m("orientation"),m("direction"),m("valueformat"),m("valuesuffix");let x=g.x.length&&g.y.length?"freeform":void 0;m("arrangement",x),p.coerceFont(m,"textfont",c.font,{autoShadowDflt:!0}),o._length=null};function n(r,a){function o(s,c){return p.coerce(r,a,b.link.colorscales,s,c)}o("label"),o("cmin"),o("cmax"),o("colorscale")}}}),FM=ze({"node_modules/strongly-connected-components/scc.js"(J,V){"use strict";V.exports=p;function p(b){for(var E=b.length,k=new Array(E),l=new Array(E),e=new Array(E),t=new Array(E),n=new Array(E),r=new Array(E),a=0;a0;){i=S[S.length-1];var M=b[i];if(t[i]=0&&r[i].push(n[_])}t[i]=C}else{if(l[i]===k[i]){for(var T=[],f=[],u=0,C=w.length-1;C>=0;--C){var A=w[C];if(e[A]=!1,T.push(A),f.push(r[A]),u+=r[A].length,n[A]=s.length,A===i){w.length=C;break}}s.push(T);for(var x=new Array(u),C=0;C_&&(_=o.source[w]),o.target[w]>_&&(_=o.target[w]);var T=_+1;r.node._count=T;var f,u=r.node.groups,A={};for(w=0;w0&&l(B,T)&&l(F,T)&&!(A.hasOwnProperty(B)&&A.hasOwnProperty(F)&&A[B]===A[F])){A.hasOwnProperty(F)&&(F=A[F]),A.hasOwnProperty(B)&&(B=A[B]),B=+B,F=+F,v[B]=v[F]=!0;var P="";o.label&&o.label[w]&&(P=o.label[w]);var j=null;P&&g.hasOwnProperty(P)&&(j=g[P]),s.push({pointNumber:w,label:P,color:c?o.color[w]:o.color,hovercolor:m?o.hovercolor[w]:o.hovercolor,customdata:h?o.customdata[w]:o.customdata,concentrationscale:j,source:B,target:F,value:+D}),O.source.push(B),O.target.push(F)}}var U=T+u.length,$=k(a.color),Q=k(a.customdata),re=[];for(w=0;wT-1,childrenNodes:[],pointNumber:w,label:ne,color:$?a.color[w]:a.color,customdata:Q?a.customdata[w]:a.customdata})}var se=!1;return n(U,O.source,O.target)&&(se=!0),{circular:se,links:s,nodes:re,groups:u,groupLookup:A}}function n(r,a,o){for(var s=b.init2dArray(r,0),c=0;c1})}V.exports=function(a,o){var s=t(o);return E({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),TV=ze({"node_modules/d3-quadtree/dist/d3-quadtree.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){var f=+this._x.call(null,T),u=+this._y.call(null,T);return E(this.cover(f,u),f,u,T)}function E(T,f,u,A){if(isNaN(f)||isNaN(u))return T;var x,z=T._root,I={data:A},O=T._x0,D=T._y0,B=T._x1,F=T._y1,P,j,U,$,Q,re,ne,se;if(!z)return T._root=I,T;for(;z.length;)if((Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j,x=z,!(z=z[ne=re<<1|Q]))return x[ne]=I,T;if(U=+T._x.call(null,z.data),$=+T._y.call(null,z.data),f===U&&u===$)return I.next=z,x?x[ne]=I:T._root=I,T;do x=x?x[ne]=new Array(4):T._root=new Array(4),(Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j;while((ne=re<<1|Q)===(se=($>=j)<<1|U>=P));return x[se]=z,x[ne]=I,T}function k(T){var f,u,A=T.length,x,z,I=new Array(A),O=new Array(A),D=1/0,B=1/0,F=-1/0,P=-1/0;for(u=0;uF&&(F=x),zP&&(P=z));if(D>F||B>P)return this;for(this.cover(D,B).cover(F,P),u=0;uT||T>=x||A>f||f>=z;)switch(B=(fF||(O=$.y0)>P||(D=$.x1)=ne)<<1|T>=re)&&($=j[j.length-1],j[j.length-1]=j[j.length-1-Q],j[j.length-1-Q]=$)}else{var se=T-+this._x.call(null,U.data),G=f-+this._y.call(null,U.data),X=se*se+G*G;if(X=(j=(I+D)/2))?I=j:D=j,(Q=P>=(U=(O+B)/2))?O=U:B=U,f=u,!(u=u[re=Q<<1|$]))return this;if(!u.length)break;(f[re+1&3]||f[re+2&3]||f[re+3&3])&&(A=f,ne=re)}for(;u.data!==T;)if(x=u,!(u=u.next))return this;return(z=u.next)&&delete u.next,x?(z?x.next=z:delete x.next,this):f?(z?f[re]=z:delete f[re],(u=f[0]||f[1]||f[2]||f[3])&&u===(f[3]||f[2]||f[1]||f[0])&&!u.length&&(A?A[ne]=u:this._root=u),this):(this._root=z,this)}function o(T){for(var f=0,u=T.length;f=v.length)return i!=null&&_.sort(i),w!=null?w(_):_;for(var A=-1,x=_.length,z=v[T++],I,O,D=k(),B,F=f();++Av.length)return _;var f,u=g[T-1];return w!=null&&T>=v.length?f=_.entries():(f=[],_.each(function(A,x){f.push({key:x,values:C(A,T)})})),u!=null?f.sort(function(A,x){return u(A.key,x.key)}):f}return S={object:function(_){return M(_,0,e,t)},map:function(_){return M(_,0,n,r)},entries:function(_){return C(M(_,0,n,r),0)},key:function(_){return v.push(_),S},sortKeys:function(_){return g[v.length-1]=_,S},sortValues:function(_){return i=_,S},rollup:function(_){return w=_,S}}}function e(){return{}}function t(v,g,i){v[g]=i}function n(){return k()}function r(v,g,i){v.set(g,i)}function a(){}var o=k.prototype;a.prototype=s.prototype={constructor:a,has:o.has,add:function(v){return v+="",this[b+v]=v,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function s(v,g){var i=new a;if(v instanceof a)v.each(function(M){i.add(M)});else if(v){var w=-1,S=v.length;if(g==null)for(;++w=0&&(o=a.slice(s+1),a=a.slice(0,s)),a&&!r.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:o}})}k.prototype=E.prototype={constructor:k,on:function(n,r){var a=this._,o=l(n+"",a),s,c=-1,m=o.length;if(arguments.length<2){for(;++c0)for(var a=new Array(s),o=0,s,c;o=0&&T._call.call(null,f),T=T._next;--b}function i(){r=(n=o.now())+a,b=E=0;try{g()}finally{b=0,S(),r=0}}function w(){var T=o.now(),f=T-n;f>l&&(a-=f,n=T)}function S(){for(var T,f=e,u,A=1/0;f;)f._call?(A>f._time&&(A=f._time),T=f,f=f._next):(u=f._next,f._next=null,f=T?T._next=u:e=u);t=T,M(A)}function M(T){if(!b){E&&(E=clearTimeout(E));var f=T-r;f>24?(T<1/0&&(E=setTimeout(i,T-o.now()-a)),k&&(k=clearInterval(k))):(k||(n=o.now(),k=setInterval(w,l)),b=1,s(i))}}function C(T,f,u){var A=new h;return f=f==null?0:+f,A.restart(function(x){A.stop(),T(x+f)},f,u),A}function _(T,f,u){var A=new h,x=f;return f==null?(A.restart(T,f,u),A):(f=+f,u=u==null?c():+u,A.restart(function z(I){I+=x,A.restart(z,x+=f,u),T(I)},f,u),A)}p.interval=_,p.now=c,p.timeout=C,p.timer=v,p.timerFlush=g,Object.defineProperty(p,"__esModule",{value:!0})})}}),SV=ze({"node_modules/d3-force/dist/d3-force.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,TV(),zM(),AV(),MV()):b(p.d3=p.d3||{},p.d3,p.d3,p.d3,p.d3)})(J,function(p,b,E,k,l){"use strict";function e(T,f){var u;T==null&&(T=0),f==null&&(f=0);function A(){var x,z=u.length,I,O=0,D=0;for(x=0;xP.index){var ee=j-Y.x-Y.vx,ae=U-Y.y-Y.vy,he=ee*ee+ae*ae;hej+Z||KU+Z||HD.r&&(D.r=D[B].r)}function O(){if(f){var D,B=f.length,F;for(u=new Array(B),D=0;D1?(Q==null?O.remove($):O.set($,U(Q)),f):O.get($)},find:function($,Q,re){var ne=0,se=T.length,G,X,K,H,Y;for(re==null?re=1/0:re*=re,ne=0;ne1?(B.on($,Q),f):B.on($)}}}function S(){var T,f,u,A=t(-30),x,z=1,I=1/0,O=.81;function D(j){var U,$=T.length,Q=b.quadtree(T,h,v).visitAfter(F);for(u=j,U=0;U<$;++U)f=T[U],Q.visit(P)}function B(){if(T){var j,U=T.length,$;for(x=new Array(U),j=0;j=I)return;(j.data!==f||j.next)&&(re===0&&(re=n(),G+=re*re),ne===0&&(ne=n(),G+=ne*ne),GRt?1:Yt>=Rt?0:NaN}function E(Yt){let Rt=Yt,nr=Yt;Yt.length===1&&(Rt=(Qr,Zr)=>Yt(Qr)-Zr,nr=k(Yt));function ur(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)<0?ha=La+1:Pa=La}return ha}function cr(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)>0?Pa=La:ha=La+1}return ha}function Rr(Qr,Zr,ha,Pa){ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);let La=ur(Qr,Zr,ha,Pa-1);return La>ha&&Rt(Qr[La-1],Zr)>-Rt(Qr[La],Zr)?La-1:La}return{left:ur,center:Rr,right:cr}}function k(Yt){return(Rt,nr)=>b(Yt(Rt),nr)}function l(Yt){return Yt===null?NaN:+Yt}function*e(Yt,Rt){if(Rt===void 0)for(let nr of Yt)nr!=null&&(nr=+nr)>=nr&&(yield nr);else{let nr=-1;for(let ur of Yt)(ur=Rt(ur,++nr,Yt))!=null&&(ur=+ur)>=ur&&(yield ur)}}let t=E(b),n=t.right,r=t.left,a=E(l).center;function o(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)ur!=null&&(ur=+ur)>=ur&&++nr;else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(cr=+cr)>=cr&&++nr}return nr}function s(Yt){return Yt.length|0}function c(Yt){return!(Yt>0)}function m(Yt){return typeof Yt!="object"||"length"in Yt?Yt:Array.from(Yt)}function h(Yt){return Rt=>Yt(...Rt)}function v(...Yt){let Rt=typeof Yt[Yt.length-1]=="function"&&h(Yt.pop());Yt=Yt.map(m);let nr=Yt.map(s),ur=Yt.length-1,cr=new Array(ur+1).fill(0),Rr=[];if(ur<0||nr.some(c))return Rr;for(;;){Rr.push(cr.map((Zr,ha)=>Yt[ha][Zr]));let Qr=ur;for(;++cr[Qr]===nr[Qr];){if(Qr===0)return Rt?Rr.map(Rt):Rr;cr[Qr--]=0}}}function g(Yt,Rt){var nr=0,ur=0;return Float64Array.from(Yt,Rt===void 0?cr=>nr+=+cr||0:cr=>nr+=+Rt(cr,ur++,Yt)||0)}function i(Yt,Rt){return RtYt?1:Rt>=Yt?0:NaN}function w(Yt,Rt){let nr=0,ur,cr=0,Rr=0;if(Rt===void 0)for(let Qr of Yt)Qr!=null&&(Qr=+Qr)>=Qr&&(ur=Qr-cr,cr+=ur/++nr,Rr+=ur*(Qr-cr));else{let Qr=-1;for(let Zr of Yt)(Zr=Rt(Zr,++Qr,Yt))!=null&&(Zr=+Zr)>=Zr&&(ur=Zr-cr,cr+=ur/++nr,Rr+=ur*(Zr-cr))}if(nr>1)return Rr/(nr-1)}function S(Yt,Rt){let nr=w(Yt,Rt);return nr&&Math.sqrt(nr)}function M(Yt,Rt){let nr,ur;if(Rt===void 0)for(let cr of Yt)cr!=null&&(nr===void 0?cr>=cr&&(nr=ur=cr):(nr>cr&&(nr=cr),ur=Rr&&(nr=ur=Rr):(nr>Rr&&(nr=Rr),ur0){for(Qr=Rt[--nr];nr>0&&(ur=Qr,cr=Rt[--nr],Qr=ur+cr,Rr=cr-(Qr-ur),!Rr););nr>0&&(Rr<0&&Rt[nr-1]<0||Rr>0&&Rt[nr-1]>0)&&(cr=Rr*2,ur=Qr+cr,cr==ur-Qr&&(Qr=ur))}return Qr}}function _(Yt,Rt){let nr=new C;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&nr.add(ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&nr.add(cr)}return+nr}function T(Yt,Rt){let nr=new C,ur=-1;return Float64Array.from(Yt,Rt===void 0?cr=>nr.add(+cr||0):cr=>nr.add(+Rt(cr,++ur,Yt)||0))}class f extends Map{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let[ur,cr]of Rt)this.set(ur,cr)}get(Rt){return super.get(A(this,Rt))}has(Rt){return super.has(A(this,Rt))}set(Rt,nr){return super.set(x(this,Rt),nr)}delete(Rt){return super.delete(z(this,Rt))}}class u extends Set{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let ur of Rt)this.add(ur)}has(Rt){return super.has(A(this,Rt))}add(Rt){return super.add(x(this,Rt))}delete(Rt){return super.delete(z(this,Rt))}}function A({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):nr}function x({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):(Yt.set(ur,nr),nr)}function z({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)&&(nr=Yt.get(nr),Yt.delete(ur)),nr}function I(Yt){return Yt!==null&&typeof Yt=="object"?Yt.valueOf():Yt}function O(Yt){return Yt}function D(Yt,...Rt){return Q(Yt,O,O,Rt)}function B(Yt,...Rt){return Q(Yt,Array.from,O,Rt)}function F(Yt,Rt,...nr){return Q(Yt,O,Rt,nr)}function P(Yt,Rt,...nr){return Q(Yt,Array.from,Rt,nr)}function j(Yt,...Rt){return Q(Yt,O,$,Rt)}function U(Yt,...Rt){return Q(Yt,Array.from,$,Rt)}function $(Yt){if(Yt.length!==1)throw new Error("duplicate key");return Yt[0]}function Q(Yt,Rt,nr,ur){return function cr(Rr,Qr){if(Qr>=ur.length)return nr(Rr);let Zr=new f,ha=ur[Qr++],Pa=-1;for(let La of Rr){let un=ha(La,++Pa,Rr),Xa=Zr.get(un);Xa?Xa.push(La):Zr.set(un,[La])}for(let[La,un]of Zr)Zr.set(La,cr(un,Qr));return Rt(Zr)}(Yt,0)}function re(Yt,Rt){return Array.from(Rt,nr=>Yt[nr])}function ne(Yt,...Rt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Yt=Array.from(Yt);let[nr=b]=Rt;if(nr.length===1||Rt.length>1){let ur=Uint32Array.from(Yt,(cr,Rr)=>Rr);return Rt.length>1?(Rt=Rt.map(cr=>Yt.map(cr)),ur.sort((cr,Rr)=>{for(let Qr of Rt){let Zr=b(Qr[cr],Qr[Rr]);if(Zr)return Zr}})):(nr=Yt.map(nr),ur.sort((cr,Rr)=>b(nr[cr],nr[Rr]))),re(Yt,ur)}return Yt.sort(nr)}function se(Yt,Rt,nr){return(Rt.length===1?ne(F(Yt,Rt,nr),([ur,cr],[Rr,Qr])=>b(cr,Qr)||b(ur,Rr)):ne(D(Yt,nr),([ur,cr],[Rr,Qr])=>Rt(cr,Qr)||b(ur,Rr))).map(([ur])=>ur)}var G=Array.prototype,X=G.slice;function K(Yt){return function(){return Yt}}var H=Math.sqrt(50),Y=Math.sqrt(10),q=Math.sqrt(2);function Z(Yt,Rt,nr){var ur,cr=-1,Rr,Qr,Zr;if(Rt=+Rt,Yt=+Yt,nr=+nr,Yt===Rt&&nr>0)return[Yt];if((ur=Rt0){let ha=Math.round(Yt/Zr),Pa=Math.round(Rt/Zr);for(ha*ZrRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++crRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++cr=0?(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)*Math.pow(10,cr):-Math.pow(10,-cr)/(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)}function ae(Yt,Rt,nr){var ur=Math.abs(Rt-Yt)/Math.max(0,nr),cr=Math.pow(10,Math.floor(Math.log(ur)/Math.LN10)),Rr=ur/cr;return Rr>=H?cr*=10:Rr>=Y?cr*=5:Rr>=q&&(cr*=2),Rt0?(Yt=Math.floor(Yt/cr)*cr,Rt=Math.ceil(Rt/cr)*cr):cr<0&&(Yt=Math.ceil(Yt*cr)/cr,Rt=Math.floor(Rt*cr)/cr),ur=cr}}function xe(Yt){return Math.ceil(Math.log(o(Yt))/Math.LN2)+1}function we(){var Yt=O,Rt=M,nr=xe;function ur(cr){Array.isArray(cr)||(cr=Array.from(cr));var Rr,Qr=cr.length,Zr,ha=new Array(Qr);for(Rr=0;Rr=un)if(Un>=un&&Rt===M){let Yn=ee(La,un,li);isFinite(Yn)&&(Yn>0?un=(Math.floor(un/Yn)+1)*Yn:Yn<0&&(un=(Math.ceil(un*-Yn)+1)/-Yn))}else Xa.pop()}for(var ja=Xa.length;Xa[0]<=La;)Xa.shift(),--ja;for(;Xa[ja-1]>un;)Xa.pop(),--ja;var Nn=new Array(ja+1),yn;for(Rr=0;Rr<=ja;++Rr)yn=Nn[Rr]=[],yn.x0=Rr>0?Xa[Rr-1]:La,yn.x1=Rr=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr=cr)&&(nr=cr)}return nr}function Se(Yt,Rt){let nr;if(Rt===void 0)for(let ur of Yt)ur!=null&&(nr>ur||nr===void 0&&ur>=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr>cr||nr===void 0&&cr>=cr)&&(nr=cr)}return nr}function Ie(Yt,Rt,nr=0,ur=Yt.length-1,cr=b){for(;ur>nr;){if(ur-nr>600){let ha=ur-nr+1,Pa=Rt-nr+1,La=Math.log(ha),un=.5*Math.exp(2*La/3),Xa=.5*Math.sqrt(La*un*(ha-un)/ha)*(Pa-ha/2<0?-1:1),ja=Math.max(nr,Math.floor(Rt-Pa*un/ha+Xa)),Nn=Math.min(ur,Math.floor(Rt+(ha-Pa)*un/ha+Xa));Ie(Yt,Rt,ja,Nn,cr)}let Rr=Yt[Rt],Qr=nr,Zr=ur;for(Ve(Yt,nr,Rt),cr(Yt[ur],Rr)>0&&Ve(Yt,nr,ur);Qr0;)--Zr}cr(Yt[nr],Rr)===0?Ve(Yt,nr,Zr):(++Zr,Ve(Yt,Zr,ur)),Zr<=Rt&&(nr=Zr+1),Rt<=Zr&&(ur=Zr-1)}return Yt}function Ve(Yt,Rt,nr){let ur=Yt[Rt];Yt[Rt]=Yt[nr],Yt[nr]=ur}function Ge(Yt,Rt,nr){if(Yt=Float64Array.from(e(Yt,nr)),!!(ur=Yt.length)){if((Rt=+Rt)<=0||ur<2)return Se(Yt);if(Rt>=1)return Me(Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=Me(Ie(Yt,Rr).subarray(0,Rr+1)),Zr=Se(Yt.subarray(Rr+1));return Qr+(Zr-Qr)*(cr-Rr)}}function ke(Yt,Rt,nr=l){if(ur=Yt.length){if((Rt=+Rt)<=0||ur<2)return+nr(Yt[0],0,Yt);if(Rt>=1)return+nr(Yt[ur-1],ur-1,Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=+nr(Yt[Rr],Rr,Yt),Zr=+nr(Yt[Rr+1],Rr+1,Yt);return Qr+(Zr-Qr)*(cr-Rr)}}function _e(Yt,Rt,nr){return Math.ceil((nr-Rt)/(2*(Ge(Yt,.75)-Ge(Yt,.25))*Math.pow(o(Yt),-1/3)))}function ce(Yt,Rt,nr){return Math.ceil((nr-Rt)/(3.5*S(Yt)*Math.pow(o(Yt),-1/3)))}function ve(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr=Rr)&&(nr=Rr,ur=cr);return ur}function le(Yt,Rt){let nr=0,ur=0;if(Rt===void 0)for(let cr of Yt)cr!=null&&(cr=+cr)>=cr&&(++nr,ur+=cr);else{let cr=-1;for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(Rr=+Rr)>=Rr&&(++nr,ur+=Rr)}if(nr)return ur/nr}function Ae(Yt,Rt){return Ge(Yt,.5,Rt)}function*Be(Yt){for(let Rt of Yt)yield*ad(Rt)}function Xe(Yt){return Array.from(Be(Yt))}function Ye(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);return ur}function yt(Yt,Rt=gt){let nr=[],ur,cr=!1;for(let Rr of Yt)cr&&nr.push(Rt(ur,Rr)),ur=Rr,cr=!0;return nr}function gt(Yt,Rt){return[Yt,Rt]}function Tt(Yt,Rt,nr){Yt=+Yt,Rt=+Rt,nr=(cr=arguments.length)<2?(Rt=Yt,Yt=0,1):cr<3?1:+nr;for(var ur=-1,cr=Math.max(0,Math.ceil((Rt-Yt)/nr))|0,Rr=new Array(cr);++ur0:b(Qr,Qr)===0)&&(nr=Rr,cr=Qr,ur=!0)}}else for(let cr of Yt)(ur?Rt(cr,nr)>0:Rt(cr,cr)===0)&&(nr=cr,ur=!0);return nr}function _r(Yt,Rt=b){if(Rt.length===1)return ve(Yt,Rt);let nr,ur=-1,cr=-1;for(let Rr of Yt)++cr,(ur<0?Rt(Rr,Rr)===0:Rt(Rr,nr)>0)&&(nr=Rr,ur=cr);return ur}function Xt(Yt,Rt){let nr=$t(Yt,Rt);return nr<0?void 0:nr}var or=Ot(Math.random);function Ot(Yt){return function(nr,ur=0,cr=nr.length){let Rr=cr-(ur=+ur);for(;Rr;){let Qr=Yt()*Rr--|0,Zr=nr[Rr+ur];nr[Rr+ur]=nr[Qr+ur],nr[Qr+ur]=Zr}return nr}}function vt(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&(nr+=ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&(nr+=cr)}return nr}function ht(Yt){if(!(Rr=Yt.length))return[];for(var Rt=-1,nr=Se(Yt,De),ur=new Array(nr);++RtRt(nr,ur,Yt))}function Mt(Yt,Rt,nr){if(typeof Rt!="function")throw new TypeError("reducer is not a function");let ur=Yt[Symbol.iterator](),cr,Rr,Qr=-1;if(arguments.length<3){if({done:cr,value:nr}=ur.next(),cr)return;++Qr}for(;{done:cr,value:Rr}=ur.next(),!cr;)nr=Rt(nr,Rr,++Qr,Yt);return nr}function pt(Yt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Yt).reverse()}function Pt(Yt,...Rt){Yt=new Set(Yt);for(let nr of Rt)for(let ur of nr)Yt.delete(ur);return Yt}function Ct(Yt,Rt){let nr=Rt[Symbol.iterator](),ur=new Set;for(let cr of Yt){if(ur.has(cr))return!1;let Rr,Qr;for(;({value:Rr,done:Qr}=nr.next())&&!Qr;){if(Object.is(cr,Rr))return!1;ur.add(Rr)}}return!0}function qt(Yt){return Yt instanceof Set?Yt:new Set(Yt)}function Vt(Yt,...Rt){Yt=new Set(Yt),Rt=Rt.map(qt);e:for(let nr of Yt)for(let ur of Rt)if(!ur.has(nr)){Yt.delete(nr);continue e}return Yt}function Ht(Yt,Rt){let nr=Yt[Symbol.iterator](),ur=new Set;for(let cr of Rt){if(ur.has(cr))continue;let Rr,Qr;for(;{value:Rr,done:Qr}=nr.next();){if(Qr)return!1;if(ur.add(Rr),Object.is(cr,Rr))break}}return!0}function Sr(Yt,Rt){return Ht(Rt,Yt)}function Kr(...Yt){let Rt=new Set;for(let nr of Yt)for(let ur of nr)Rt.add(ur);return Rt}p.Adder=C,p.InternMap=f,p.InternSet=u,p.ascending=b,p.bin=we,p.bisect=n,p.bisectCenter=a,p.bisectLeft=r,p.bisectRight=n,p.bisector=E,p.count=o,p.cross=v,p.cumsum=g,p.descending=i,p.deviation=S,p.difference=Pt,p.disjoint=Ct,p.every=We,p.extent=M,p.fcumsum=T,p.filter=Je,p.fsum=_,p.greatest=rr,p.greatestIndex=_r,p.group=D,p.groupSort=se,p.groups=B,p.histogram=we,p.index=j,p.indexes=U,p.intersection=Vt,p.least=At,p.leastIndex=$t,p.map=et,p.max=Me,p.maxIndex=ve,p.mean=le,p.median=Ae,p.merge=Xe,p.min=Se,p.minIndex=Ye,p.nice=he,p.pairs=yt,p.permute=re,p.quantile=Ge,p.quantileSorted=ke,p.quickselect=Ie,p.range=Tt,p.reduce=Mt,p.reverse=pt,p.rollup=F,p.rollups=P,p.scan=Xt,p.shuffle=or,p.shuffler=Ot,p.some=Ke,p.sort=ne,p.subset=Sr,p.sum=vt,p.superset=Ht,p.thresholdFreedmanDiaconis=_e,p.thresholdScott=ce,p.thresholdSturges=xe,p.tickIncrement=ee,p.tickStep=ae,p.ticks=Z,p.transpose=ht,p.union=Kr,p.variance=w,p.zip=Ne,Object.defineProperty(p,"__esModule",{value:!0})})}}),kV=ze({"node_modules/d3-path/dist/d3-path.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";var b=Math.PI,E=2*b,k=1e-6,l=E-k;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t(){return new e}e.prototype=t.prototype={constructor:e,moveTo:function(n,r){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(n,r){this._+="L"+(this._x1=+n)+","+(this._y1=+r)},quadraticCurveTo:function(n,r,a,o){this._+="Q"+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+o)},bezierCurveTo:function(n,r,a,o,s,c){this._+="C"+ +n+","+ +r+","+ +a+","+ +o+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(n,r,a,o,s){n=+n,r=+r,a=+a,o=+o,s=+s;var c=this._x1,m=this._y1,h=a-n,v=o-r,g=c-n,i=m-r,w=g*g+i*i;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=n)+","+(this._y1=r);else if(w>k)if(!(Math.abs(i*h-v*g)>k)||!s)this._+="L"+(this._x1=n)+","+(this._y1=r);else{var S=a-c,M=o-m,C=h*h+v*v,_=S*S+M*M,T=Math.sqrt(C),f=Math.sqrt(w),u=s*Math.tan((b-Math.acos((C+w-_)/(2*T*f)))/2),A=u/f,x=u/T;Math.abs(A-1)>k&&(this._+="L"+(n+A*g)+","+(r+A*i)),this._+="A"+s+","+s+",0,0,"+ +(i*S>g*M)+","+(this._x1=n+x*h)+","+(this._y1=r+x*v)}},arc:function(n,r,a,o,s,c){n=+n,r=+r,a=+a,c=!!c;var m=a*Math.cos(o),h=a*Math.sin(o),v=n+m,g=r+h,i=1^c,w=c?o-s:s-o;if(a<0)throw new Error("negative radius: "+a);this._x1===null?this._+="M"+v+","+g:(Math.abs(this._x1-v)>k||Math.abs(this._y1-g)>k)&&(this._+="L"+v+","+g),a&&(w<0&&(w=w%E+E),w>l?this._+="A"+a+","+a+",0,1,"+i+","+(n-m)+","+(r-h)+"A"+a+","+a+",0,1,"+i+","+(this._x1=v)+","+(this._y1=g):w>k&&(this._+="A"+a+","+a+",0,"+ +(w>=b)+","+i+","+(this._x1=n+a*Math.cos(s))+","+(this._y1=r+a*Math.sin(s))))},rect:function(n,r,a,o){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)+"h"+ +a+"v"+ +o+"h"+-a+"Z"},toString:function(){return this._}},p.path=t,Object.defineProperty(p,"__esModule",{value:!0})})}}),BM=ze({"node_modules/d3-shape/dist/d3-shape.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kV()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(ot){return function(){return ot}}var k=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,n=Math.min,r=Math.sin,a=Math.sqrt,o=1e-12,s=Math.PI,c=s/2,m=2*s;function h(ot){return ot>1?0:ot<-1?s:Math.acos(ot)}function v(ot){return ot>=1?c:ot<=-1?-c:Math.asin(ot)}function g(ot){return ot.innerRadius}function i(ot){return ot.outerRadius}function w(ot){return ot.startAngle}function S(ot){return ot.endAngle}function M(ot){return ot&&ot.padAngle}function C(ot,kt,jt,ar,Er,xr,zr,Lr){var aa=jt-ot,Sa=ar-kt,wa=zr-Er,pn=Lr-xr,tn=pn*aa-wa*Sa;if(!(tn*tnHi*Hi+Mi*Mi&&(gi=io,qi=oo),{cx:gi,cy:qi,x01:-wa,y01:-pn,x11:gi*(Er/jn-1),y11:qi*(Er/jn-1)}}function T(){var ot=g,kt=i,jt=E(0),ar=null,Er=w,xr=S,zr=M,Lr=null;function aa(){var Sa,wa,pn=+ot.apply(this,arguments),tn=+kt.apply(this,arguments),ai=Er.apply(this,arguments)-c,rn=xr.apply(this,arguments)-c,Ri=k(rn-ai),Gn=rn>ai;if(Lr||(Lr=Sa=b.path()),tno))Lr.moveTo(0,0);else if(Ri>m-o)Lr.moveTo(tn*e(ai),tn*r(ai)),Lr.arc(0,0,tn,ai,rn,!Gn),pn>o&&(Lr.moveTo(pn*e(rn),pn*r(rn)),Lr.arc(0,0,pn,rn,ai,Gn));else{var no=ai,Di=rn,fn=ai,Ai=rn,jn=Ri,Xn=Ri,eo=zr.apply(this,arguments)/2,gi=eo>o&&(ar?+ar.apply(this,arguments):a(pn*pn+tn*tn)),qi=n(k(tn-pn)/2,+jt.apply(this,arguments)),io=qi,oo=qi,Vn,qn;if(gi>o){var Hi=v(gi/pn*r(eo)),Mi=v(gi/tn*r(eo));(jn-=Hi*2)>o?(Hi*=Gn?1:-1,fn+=Hi,Ai-=Hi):(jn=0,fn=Ai=(ai+rn)/2),(Xn-=Mi*2)>o?(Mi*=Gn?1:-1,no+=Mi,Di-=Mi):(Xn=0,no=Di=(ai+rn)/2)}var Ro=tn*e(no),go=tn*r(no),Eo=pn*e(Ai),Ao=pn*r(Ai);if(qi>o){var ds=tn*e(Di),jo=tn*r(Di),Wo=pn*e(fn),to=pn*r(fn),wo;if(Rio?oo>o?(Vn=_(Wo,to,Ro,go,tn,oo,Gn),qn=_(ds,jo,Eo,Ao,tn,oo,Gn),Lr.moveTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),ooo)||!(jn>o)?Lr.lineTo(Eo,Ao):io>o?(Vn=_(Eo,Ao,ds,jo,pn,-io,Gn),qn=_(Ro,go,Wo,to,pn,-io,Gn),Lr.lineTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),io=tn;--ai)Lr.point(Di[ai],fn[ai]);Lr.lineEnd(),Lr.areaEnd()}Gn&&(Di[pn]=+ot(Ri,pn,wa),fn[pn]=+jt(Ri,pn,wa),Lr.point(kt?+kt(Ri,pn,wa):Di[pn],ar?+ar(Ri,pn,wa):fn[pn]))}if(no)return Lr=null,no+""||null}function Sa(){return z().defined(Er).curve(zr).context(xr)}return aa.x=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),kt=null,aa):ot},aa.x0=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),aa):ot},aa.x1=function(wa){return arguments.length?(kt=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):kt},aa.y=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),ar=null,aa):jt},aa.y0=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),aa):jt},aa.y1=function(wa){return arguments.length?(ar=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):ar},aa.lineX0=aa.lineY0=function(){return Sa().x(ot).y(jt)},aa.lineY1=function(){return Sa().x(ot).y(ar)},aa.lineX1=function(){return Sa().x(kt).y(jt)},aa.defined=function(wa){return arguments.length?(Er=typeof wa=="function"?wa:E(!!wa),aa):Er},aa.curve=function(wa){return arguments.length?(zr=wa,xr!=null&&(Lr=zr(xr)),aa):zr},aa.context=function(wa){return arguments.length?(wa==null?xr=Lr=null:Lr=zr(xr=wa),aa):xr},aa}function O(ot,kt){return ktot?1:kt>=ot?0:NaN}function D(ot){return ot}function B(){var ot=D,kt=O,jt=null,ar=E(0),Er=E(m),xr=E(0);function zr(Lr){var aa,Sa=Lr.length,wa,pn,tn=0,ai=new Array(Sa),rn=new Array(Sa),Ri=+ar.apply(this,arguments),Gn=Math.min(m,Math.max(-m,Er.apply(this,arguments)-Ri)),no,Di=Math.min(Math.abs(Gn)/Sa,xr.apply(this,arguments)),fn=Di*(Gn<0?-1:1),Ai;for(aa=0;aa0&&(tn+=Ai);for(kt!=null?ai.sort(function(jn,Xn){return kt(rn[jn],rn[Xn])}):jt!=null&&ai.sort(function(jn,Xn){return jt(Lr[jn],Lr[Xn])}),aa=0,pn=tn?(Gn-Sa*fn)/tn:0;aa0?Ai*pn:0)+fn,rn[wa]={data:Lr[wa],index:aa,value:Ai,startAngle:Ri,endAngle:no,padAngle:Di};return rn}return zr.value=function(Lr){return arguments.length?(ot=typeof Lr=="function"?Lr:E(+Lr),zr):ot},zr.sortValues=function(Lr){return arguments.length?(kt=Lr,jt=null,zr):kt},zr.sort=function(Lr){return arguments.length?(jt=Lr,kt=null,zr):jt},zr.startAngle=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.endAngle=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.padAngle=function(Lr){return arguments.length?(xr=typeof Lr=="function"?Lr:E(+Lr),zr):xr},zr}var F=j(u);function P(ot){this._curve=ot}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ot,kt){this._curve.point(kt*Math.sin(ot),kt*-Math.cos(ot))}};function j(ot){function kt(jt){return new P(ot(jt))}return kt._curve=ot,kt}function U(ot){var kt=ot.curve;return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot.curve=function(jt){return arguments.length?kt(j(jt)):kt()._curve},ot}function $(){return U(z().curve(F))}function Q(){var ot=I().curve(F),kt=ot.curve,jt=ot.lineX0,ar=ot.lineX1,Er=ot.lineY0,xr=ot.lineY1;return ot.angle=ot.x,delete ot.x,ot.startAngle=ot.x0,delete ot.x0,ot.endAngle=ot.x1,delete ot.x1,ot.radius=ot.y,delete ot.y,ot.innerRadius=ot.y0,delete ot.y0,ot.outerRadius=ot.y1,delete ot.y1,ot.lineStartAngle=function(){return U(jt())},delete ot.lineX0,ot.lineEndAngle=function(){return U(ar())},delete ot.lineX1,ot.lineInnerRadius=function(){return U(Er())},delete ot.lineY0,ot.lineOuterRadius=function(){return U(xr())},delete ot.lineY1,ot.curve=function(zr){return arguments.length?kt(j(zr)):kt()._curve},ot}function re(ot,kt){return[(kt=+kt)*Math.cos(ot-=Math.PI/2),kt*Math.sin(ot)]}var ne=Array.prototype.slice;function se(ot){return ot.source}function G(ot){return ot.target}function X(ot){var kt=se,jt=G,ar=A,Er=x,xr=null;function zr(){var Lr,aa=ne.call(arguments),Sa=kt.apply(this,aa),wa=jt.apply(this,aa);if(xr||(xr=Lr=b.path()),ot(xr,+ar.apply(this,(aa[0]=Sa,aa)),+Er.apply(this,aa),+ar.apply(this,(aa[0]=wa,aa)),+Er.apply(this,aa)),Lr)return xr=null,Lr+""||null}return zr.source=function(Lr){return arguments.length?(kt=Lr,zr):kt},zr.target=function(Lr){return arguments.length?(jt=Lr,zr):jt},zr.x=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.y=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.context=function(Lr){return arguments.length?(xr=Lr??null,zr):xr},zr}function K(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt=(kt+ar)/2,jt,kt,Er,ar,Er)}function H(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt,jt=(jt+Er)/2,ar,jt,ar,Er)}function Y(ot,kt,jt,ar,Er){var xr=re(kt,jt),zr=re(kt,jt=(jt+Er)/2),Lr=re(ar,jt),aa=re(ar,Er);ot.moveTo(xr[0],xr[1]),ot.bezierCurveTo(zr[0],zr[1],Lr[0],Lr[1],aa[0],aa[1])}function q(){return X(K)}function Z(){return X(H)}function ee(){var ot=X(Y);return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot}var ae={draw:function(ot,kt){var jt=Math.sqrt(kt/s);ot.moveTo(jt,0),ot.arc(0,0,jt,0,m)}},he={draw:function(ot,kt){var jt=Math.sqrt(kt/5)/2;ot.moveTo(-3*jt,-jt),ot.lineTo(-jt,-jt),ot.lineTo(-jt,-3*jt),ot.lineTo(jt,-3*jt),ot.lineTo(jt,-jt),ot.lineTo(3*jt,-jt),ot.lineTo(3*jt,jt),ot.lineTo(jt,jt),ot.lineTo(jt,3*jt),ot.lineTo(-jt,3*jt),ot.lineTo(-jt,jt),ot.lineTo(-3*jt,jt),ot.closePath()}},xe=Math.sqrt(1/3),we=xe*2,Me={draw:function(ot,kt){var jt=Math.sqrt(kt/we),ar=jt*xe;ot.moveTo(0,-jt),ot.lineTo(ar,0),ot.lineTo(0,jt),ot.lineTo(-ar,0),ot.closePath()}},Se=.8908130915292852,Ie=Math.sin(s/10)/Math.sin(7*s/10),Ve=Math.sin(m/10)*Ie,Ge=-Math.cos(m/10)*Ie,ke={draw:function(ot,kt){var jt=Math.sqrt(kt*Se),ar=Ve*jt,Er=Ge*jt;ot.moveTo(0,-jt),ot.lineTo(ar,Er);for(var xr=1;xr<5;++xr){var zr=m*xr/5,Lr=Math.cos(zr),aa=Math.sin(zr);ot.lineTo(aa*jt,-Lr*jt),ot.lineTo(Lr*ar-aa*Er,aa*ar+Lr*Er)}ot.closePath()}},_e={draw:function(ot,kt){var jt=Math.sqrt(kt),ar=-jt/2;ot.rect(ar,ar,jt,jt)}},ce=Math.sqrt(3),ve={draw:function(ot,kt){var jt=-Math.sqrt(kt/(ce*3));ot.moveTo(0,jt*2),ot.lineTo(-ce*jt,-jt),ot.lineTo(ce*jt,-jt),ot.closePath()}},le=-.5,Ae=Math.sqrt(3)/2,Be=1/Math.sqrt(12),Xe=(Be/2+1)*3,Ye={draw:function(ot,kt){var jt=Math.sqrt(kt/Xe),ar=jt/2,Er=jt*Be,xr=ar,zr=jt*Be+jt,Lr=-xr,aa=zr;ot.moveTo(ar,Er),ot.lineTo(xr,zr),ot.lineTo(Lr,aa),ot.lineTo(le*ar-Ae*Er,Ae*ar+le*Er),ot.lineTo(le*xr-Ae*zr,Ae*xr+le*zr),ot.lineTo(le*Lr-Ae*aa,Ae*Lr+le*aa),ot.lineTo(le*ar+Ae*Er,le*Er-Ae*ar),ot.lineTo(le*xr+Ae*zr,le*zr-Ae*xr),ot.lineTo(le*Lr+Ae*aa,le*aa-Ae*Lr),ot.closePath()}},yt=[ae,he,Me,_e,ke,ve,Ye];function gt(){var ot=E(ae),kt=E(64),jt=null;function ar(){var Er;if(jt||(jt=Er=b.path()),ot.apply(this,arguments).draw(jt,+kt.apply(this,arguments)),Er)return jt=null,Er+""||null}return ar.type=function(Er){return arguments.length?(ot=typeof Er=="function"?Er:E(Er),ar):ot},ar.size=function(Er){return arguments.length?(kt=typeof Er=="function"?Er:E(+Er),ar):kt},ar.context=function(Er){return arguments.length?(jt=Er??null,ar):jt},ar}function Tt(){}function At(ot,kt,jt){ot._context.bezierCurveTo((2*ot._x0+ot._x1)/3,(2*ot._y0+ot._y1)/3,(ot._x0+2*ot._x1)/3,(ot._y0+2*ot._y1)/3,(ot._x0+4*ot._x1+kt)/6,(ot._y0+4*ot._y1+jt)/6)}function $t(ot){this._context=ot}$t.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:At(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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function rr(ot){return new $t(ot)}function _r(ot){this._context=ot}_r.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x2=ot,this._y2=kt;break;case 1:this._point=2,this._x3=ot,this._y3=kt;break;case 2:this._point=3,this._x4=ot,this._y4=kt,this._context.moveTo((this._x0+4*this._x1+ot)/6,(this._y0+4*this._y1+kt)/6);break;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Xt(ot){return new _r(ot)}function or(ot){this._context=ot}or.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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var jt=(this._x0+4*this._x1+ot)/6,ar=(this._y0+4*this._y1+kt)/6;this._line?this._context.lineTo(jt,ar):this._context.moveTo(jt,ar);break;case 3:this._point=4;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Ot(ot){return new or(ot)}function vt(ot,kt){this._basis=new $t(ot),this._beta=kt}vt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length-1;if(jt>0)for(var ar=ot[0],Er=kt[0],xr=ot[jt]-ar,zr=kt[jt]-Er,Lr=-1,aa;++Lr<=jt;)aa=Lr/jt,this._basis.point(this._beta*ot[Lr]+(1-this._beta)*(ar+aa*xr),this._beta*kt[Lr]+(1-this._beta)*(Er+aa*zr));this._x=this._y=null,this._basis.lineEnd()},point:function(ot,kt){this._x.push(+ot),this._y.push(+kt)}};var ht=function ot(kt){function jt(ar){return kt===1?new $t(ar):new vt(ar,kt)}return jt.beta=function(ar){return ot(+ar)},jt}(.85);function De(ot,kt,jt){ot._context.bezierCurveTo(ot._x1+ot._k*(ot._x2-ot._x0),ot._y1+ot._k*(ot._y2-ot._y0),ot._x2+ot._k*(ot._x1-kt),ot._y2+ot._k*(ot._y1-jt),ot._x2,ot._y2)}function Ne(ot,kt){this._context=ot,this._k=(1-kt)/6}Ne.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:De(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2,this._x1=ot,this._y1=kt;break;case 2:this._point=3;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var We=function ot(kt){function jt(ar){return new Ne(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function Ke(ot,kt){this._context=ot,this._k=(1-kt)/6}Ke.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Je=function ot(kt){function jt(ar){return new Ke(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function et(ot,kt){this._context=ot,this._k=(1-kt)/6}et.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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Mt=function ot(kt){function jt(ar){return new et(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function pt(ot,kt,jt){var ar=ot._x1,Er=ot._y1,xr=ot._x2,zr=ot._y2;if(ot._l01_a>o){var Lr=2*ot._l01_2a+3*ot._l01_a*ot._l12_a+ot._l12_2a,aa=3*ot._l01_a*(ot._l01_a+ot._l12_a);ar=(ar*Lr-ot._x0*ot._l12_2a+ot._x2*ot._l01_2a)/aa,Er=(Er*Lr-ot._y0*ot._l12_2a+ot._y2*ot._l01_2a)/aa}if(ot._l23_a>o){var Sa=2*ot._l23_2a+3*ot._l23_a*ot._l12_a+ot._l12_2a,wa=3*ot._l23_a*(ot._l23_a+ot._l12_a);xr=(xr*Sa+ot._x1*ot._l23_2a-kt*ot._l12_2a)/wa,zr=(zr*Sa+ot._y1*ot._l23_2a-jt*ot._l12_2a)/wa}ot._context.bezierCurveTo(ar,Er,xr,zr,ot._x2,ot._y2)}function Pt(ot,kt){this._context=ot,this._alpha=kt}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3;default:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ct=function ot(kt){function jt(ar){return kt?new Pt(ar,kt):new Ne(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function qt(ot,kt){this._context=ot,this._alpha=kt}qt.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Vt=function ot(kt){function jt(ar){return kt?new qt(ar,kt):new Ke(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Ht(ot,kt){this._context=ot,this._alpha=kt}Ht.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(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,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:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Sr=function ot(kt){function jt(ar){return kt?new Ht(ar,kt):new et(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Kr(ot){this._context=ot}Kr.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ot,kt){ot=+ot,kt=+kt,this._point?this._context.lineTo(ot,kt):(this._point=1,this._context.moveTo(ot,kt))}};function Yt(ot){return new Kr(ot)}function Rt(ot){return ot<0?-1:1}function nr(ot,kt,jt){var ar=ot._x1-ot._x0,Er=kt-ot._x1,xr=(ot._y1-ot._y0)/(ar||Er<0&&-0),zr=(jt-ot._y1)/(Er||ar<0&&-0),Lr=(xr*Er+zr*ar)/(ar+Er);return(Rt(xr)+Rt(zr))*Math.min(Math.abs(xr),Math.abs(zr),.5*Math.abs(Lr))||0}function ur(ot,kt){var jt=ot._x1-ot._x0;return jt?(3*(ot._y1-ot._y0)/jt-kt)/2:kt}function cr(ot,kt,jt){var ar=ot._x0,Er=ot._y0,xr=ot._x1,zr=ot._y1,Lr=(xr-ar)/3;ot._context.bezierCurveTo(ar+Lr,Er+Lr*kt,xr-Lr,zr-Lr*jt,xr,zr)}function Rr(ot){this._context=ot}Rr.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:cr(this,this._t0,ur(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){var jt=NaN;if(ot=+ot,kt=+kt,!(ot===this._x1&&kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,cr(this,ur(this,jt=nr(this,ot,kt)),jt);break;default:cr(this,this._t0,jt=nr(this,ot,kt));break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt,this._t0=jt}}};function Qr(ot){this._context=new Zr(ot)}(Qr.prototype=Object.create(Rr.prototype)).point=function(ot,kt){Rr.prototype.point.call(this,kt,ot)};function Zr(ot){this._context=ot}Zr.prototype={moveTo:function(ot,kt){this._context.moveTo(kt,ot)},closePath:function(){this._context.closePath()},lineTo:function(ot,kt){this._context.lineTo(kt,ot)},bezierCurveTo:function(ot,kt,jt,ar,Er,xr){this._context.bezierCurveTo(kt,ot,ar,jt,xr,Er)}};function ha(ot){return new Rr(ot)}function Pa(ot){return new Qr(ot)}function La(ot){this._context=ot}La.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length;if(jt)if(this._line?this._context.lineTo(ot[0],kt[0]):this._context.moveTo(ot[0],kt[0]),jt===2)this._context.lineTo(ot[1],kt[1]);else for(var ar=un(ot),Er=un(kt),xr=0,zr=1;zr=0;--kt)Er[kt]=(zr[kt]-Er[kt+1])/xr[kt];for(xr[jt-1]=(ot[jt]+Er[jt-1])/2,kt=0;kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kt),this._context.lineTo(ot,kt);else{var jt=this._x*(1-this._t)+ot*this._t;this._context.lineTo(jt,this._y),this._context.lineTo(jt,kt)}break}}this._x=ot,this._y=kt}};function Nn(ot){return new ja(ot,.5)}function yn(ot){return new ja(ot,0)}function Un(ot){return new ja(ot,1)}function li(ot,kt){if((zr=ot.length)>1)for(var jt=1,ar,Er,xr=ot[kt[0]],zr,Lr=xr.length;jt=0;)jt[kt]=kt;return jt}function on(ot,kt){return ot[kt]}function en(){var ot=E([]),kt=Yn,jt=li,ar=on;function Er(xr){var zr=ot.apply(this,arguments),Lr,aa=xr.length,Sa=zr.length,wa=new Array(Sa),pn;for(Lr=0;Lr0){for(var jt,ar,Er=0,xr=ot[0].length,zr;Er0)for(var jt,ar=0,Er,xr,zr,Lr,aa,Sa=ot[kt[0]].length;ar0?(Er[0]=zr,Er[1]=zr+=xr):xr<0?(Er[1]=Lr,Er[0]=Lr+=xr):(Er[0]=0,Er[1]=xr)}function Ja(ot,kt){if((Er=ot.length)>0){for(var jt=0,ar=ot[kt[0]],Er,xr=ar.length;jt0)||!((xr=(Er=ot[kt[0]]).length)>0))){for(var jt=0,ar=1,Er,xr,zr;arxr&&(xr=Er,jt=kt);return jt}function fr(ot){var kt=ot.map(lr);return Yn(ot).sort(function(jt,ar){return kt[jt]-kt[ar]})}function lr(ot){for(var kt=0,jt=-1,ar=ot.length,Er;++jt[I(Ve,Ge,Me),Ve]));for(let[Ve,Ge]of Se.entries()){Ge.index=Ve;let{source:ke,target:_e}=Ge;typeof ke!="object"&&(ke=Ge.source=g(Ie,ke)),typeof _e!="object"&&(_e=Ge.target=g(Ie,_e)),ke.sourceLinks.push(Ge),_e.targetLinks.push(Ge)}if(B!=null)for(let{sourceLinks:Ve,targetLinks:Ge}of Me)Ve.sort(B),Ge.sort(B)}function re({nodes:Me}){for(let Se of Me)Se.value=Se.fixedValue===void 0?Math.max(b.sum(Se.sourceLinks,c),b.sum(Se.targetLinks,c)):Se.fixedValue}function ne({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.depth=Ge;for(let{target:_e}of ke.sourceLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function se({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.height=Ge;for(let{source:_e}of ke.targetLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function G({nodes:Me}){let Se=b.max(Me,Ge=>Ge.depth)+1,Ie=(f-_-A)/(Se-1),Ve=new Array(Se);for(let Ge of Me){let ke=Math.max(0,Math.min(Se-1,Math.floor(O.call(null,Ge,Se))));Ge.layer=ke,Ge.x0=_+ke*Ie,Ge.x1=Ge.x0+A,Ve[ke]?Ve[ke].push(Ge):Ve[ke]=[Ge]}if(D)for(let Ge of Ve)Ge.sort(D);return Ve}function X(Me){let Se=b.min(Me,Ie=>(u-T-(Ie.length-1)*z)/b.sum(Ie,c));for(let Ie of Me){let Ve=T;for(let Ge of Ie){Ge.y0=Ve,Ge.y1=Ve+Ge.value*Se,Ve=Ge.y1+z;for(let ke of Ge.sourceLinks)ke.width=ke.value*Se}Ve=(u-Ve+z)/(Ie.length+1);for(let Ge=0;GeIe.length)-1)),X(Se);for(let Ie=0;Ie0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function Y(Me,Se,Ie){for(let Ve=Me.length,Ge=Ve-2;Ge>=0;--Ge){let ke=Me[Ge];for(let _e of ke){let ce=0,ve=0;for(let{target:Ae,value:Be}of _e.sourceLinks){let Xe=Be*(Ae.layer-_e.layer);ce+=we(_e,Ae)*Xe,ve+=Xe}if(!(ve>0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function q(Me,Se){let Ie=Me.length>>1,Ve=Me[Ie];ee(Me,Ve.y0-z,Ie-1,Se),Z(Me,Ve.y1+z,Ie+1,Se),ee(Me,u,Me.length-1,Se),Z(Me,T,0,Se)}function Z(Me,Se,Ie,Ve){for(;Ie1e-6&&(Ge.y0+=ke,Ge.y1+=ke),Se=Ge.y1+z}}function ee(Me,Se,Ie,Ve){for(;Ie>=0;--Ie){let Ge=Me[Ie],ke=(Ge.y1-Se)*Ve;ke>1e-6&&(Ge.y0-=ke,Ge.y1-=ke),Se=Ge.y0-z}}function ae({sourceLinks:Me,targetLinks:Se}){if(B===void 0){for(let{source:{sourceLinks:Ie}}of Se)Ie.sort(o);for(let{target:{targetLinks:Ie}}of Me)Ie.sort(a)}}function he(Me){if(B===void 0)for(let{sourceLinks:Se,targetLinks:Ie}of Me)Se.sort(o),Ie.sort(a)}function xe(Me,Se){let Ie=Me.y0-(Me.sourceLinks.length-1)*z/2;for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie+=Ge+z}for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie-=Ge}return Ie}function we(Me,Se){let Ie=Se.y0-(Se.targetLinks.length-1)*z/2;for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie+=Ge+z}for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie-=Ge}return Ie}return $}function S(_){return[_.source.x1,_.y0]}function M(_){return[_.target.x0,_.y1]}function C(){return E.linkHorizontal().source(S).target(M)}p.sankey=w,p.sankeyCenter=n,p.sankeyJustify=t,p.sankeyLeft=l,p.sankeyLinkHorizontal=C,p.sankeyRight=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),LV=ze({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q=M})}function h(M){m(M);for(var C=E,_=p(C),T=_.components.filter(function(O){return O.length>1}),f=1/0,u,A=0;A"u"?"undefined":s(Ne))!=="object"&&(Ne=ht.source=_(vt,Ne)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=ht.target=_(vt,We)),Ne.sourceLinks.push(ht),We.targetLinks.push(ht)}),Ot}function At(Ot){Ot.nodes.forEach(function(vt){vt.partOfCycle=!1,vt.value=Math.max(b.sum(vt.sourceLinks,v),b.sum(vt.targetLinks,v)),vt.sourceLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)}),vt.targetLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)})})}function $t(Ot){var vt=0,ht=0,De=0,Ne=0,We=b.max(Ot.nodes,function(Ke){return Ke.column});return Ot.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?vt=vt+Ke.width:ht=ht+Ke.width,Ke.target.column==0&&(Ne=Ne+Ke.width),Ke.source.column==We&&(De=De+Ke.width))}),vt=vt>0?vt+f+u:vt,ht=ht>0?ht+f+u:ht,De=De>0?De+f+u:De,Ne=Ne>0?Ne+f+u:Ne,{top:vt,bottom:ht,left:Ne,right:De}}function rr(Ot,vt){var ht=b.max(Ot.nodes,function(Mt){return Mt.column}),De=Ve-Se,Ne=Ge-Ie,We=De+vt.right+vt.left,Ke=Ne+vt.top+vt.bottom,Je=De/We,et=Ne/Ke;return Se=Se*Je+vt.left,Ve=vt.right==0?Ve:Ve*Je,Ie=Ie*et+vt.top,Ge=Ge*et,Ot.nodes.forEach(function(Mt){Mt.x0=Se+Mt.column*((Ve-Se-ke)/ht),Mt.x1=Mt.x0+ke}),et}function _r(Ot){var vt,ht,De;for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.depth=De,Ne.sourceLinks.forEach(function(We){ht.indexOf(We.target)<0&&!We.circular&&ht.push(We.target)})});for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.height=De,Ne.targetLinks.forEach(function(We){ht.indexOf(We.source)<0&&!We.circular&&ht.push(We.source)})});Ot.nodes.forEach(function(Ne){Ne.column=Math.floor(ve.call(null,Ne,De))})}function Xt(Ot,vt,ht){var De=E.nest().key(function(Mt){return Mt.column}).sortKeys(b.ascending).entries(Ot.nodes).map(function(Mt){return Mt.values});Ke(ht),et();for(var Ne=1,We=vt;We>0;--We)Je(Ne*=.99,ht),et();function Ke(Mt){if(Ye){var pt=1/0;De.forEach(function(Vt){var Ht=Ge*Ye/(Vt.length+1);pt=Ht0))if(Vt==0&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else if(Vt==Pt-1&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else{var Kr=0,Yt=b.mean(Ht.sourceLinks,w),Rt=b.mean(Ht.targetLinks,i);Yt&&Rt?Kr=(Yt+Rt)/2:Kr=Yt||Rt;var nr=(Kr-g(Ht))*Mt;Ht.y0+=nr,Ht.y1+=nr}})})}function et(){De.forEach(function(Mt){var pt,Pt,Ct=Ie,qt=Mt.length,Vt;for(Mt.sort(h),Vt=0;Vt0&&(pt.y0+=Pt,pt.y1+=Pt),Ct=pt.y1+_e;if(Pt=Ct-_e-Ge,Pt>0)for(Ct=pt.y0-=Pt,pt.y1-=Pt,Vt=qt-2;Vt>=0;--Vt)pt=Mt[Vt],Pt=pt.y1+_e-Ct,Pt>0&&(pt.y0-=Pt,pt.y1-=Pt),Ct=pt.y0})}}function or(Ot){Ot.nodes.forEach(function(vt){vt.sourceLinks.sort(m),vt.targetLinks.sort(c)}),Ot.nodes.forEach(function(vt){var ht=vt.y0,De=ht,Ne=vt.y1,We=Ne;vt.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Ne-Ke.width/2,Ne=Ne-Ke.width):(Ke.y0=ht+Ke.width/2,ht+=Ke.width)}),vt.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=De+Ke.width/2,De+=Ke.width)})})}return gt}function z(Se,Ie,Ve){var Ge=0;if(Ve===null){for(var ke=[],_e=0;_eIe.source.column)}function B(Se,Ie){var Ve=0;Se.sourceLinks.forEach(function(ke){Ve=ke.circular&&!we(ke,Ie)?Ve+1:Ve});var Ge=0;return Se.targetLinks.forEach(function(ke){Ge=ke.circular&&!we(ke,Ie)?Ge+1:Ge}),Ve+Ge}function F(Se){var Ie=Se.source.sourceLinks,Ve=0;Ie.forEach(function(_e){Ve=_e.circular?Ve+1:Ve});var Ge=Se.target.targetLinks,ke=0;return Ge.forEach(function(_e){ke=_e.circular?ke+1:ke}),!(Ve>1||ke>1)}function P(Se,Ie,Ve){return Se.sort($),Se.forEach(function(Ge,ke){var _e=0;if(we(Ge,Ve)&&F(Ge))Ge.circularPathData.verticalBuffer=_e+Ge.width/2;else{var ce=0;for(ce;ce_e?ve:_e}Ge.circularPathData.verticalBuffer=_e+Ge.width/2}}),Se}function j(Se,Ie,Ve,Ge){var ke=5,_e=b.min(Se.links,function(le){return le.source.y0});Se.links.forEach(function(le){le.circular&&(le.circularPathData={})});var ce=Se.links.filter(function(le){return le.circularLinkType=="top"});P(ce,Ie,Ge);var ve=Se.links.filter(function(le){return le.circularLinkType=="bottom"});P(ve,Ie,Ge),Se.links.forEach(function(le){if(le.circular){if(le.circularPathData.arcRadius=le.width+u,le.circularPathData.leftNodeBuffer=ke,le.circularPathData.rightNodeBuffer=ke,le.circularPathData.sourceWidth=le.source.x1-le.source.x0,le.circularPathData.sourceX=le.source.x0+le.circularPathData.sourceWidth,le.circularPathData.targetX=le.target.x0,le.circularPathData.sourceY=le.y0,le.circularPathData.targetY=le.y1,we(le,Ge)&&F(le))le.circularPathData.leftSmallArcRadius=u+le.width/2,le.circularPathData.leftLargeArcRadius=u+le.width/2,le.circularPathData.rightSmallArcRadius=u+le.width/2,le.circularPathData.rightLargeArcRadius=u+le.width/2,le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=le.source.y1+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=le.source.y0-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius);else{var Ae=le.source.column,Be=le.circularLinkType,Xe=Se.links.filter(function(gt){return gt.source.column==Ae&>.circularLinkType==Be});le.circularLinkType=="bottom"?Xe.sort(re):Xe.sort(Q);var Ye=0;Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.leftSmallArcRadius=u+le.width/2+Ye,le.circularPathData.leftLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),Ae=le.target.column,Xe=Se.links.filter(function(gt){return gt.target.column==Ae&>.circularLinkType==Be}),le.circularLinkType=="bottom"?Xe.sort(se):Xe.sort(ne),Ye=0,Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.rightSmallArcRadius=u+le.width/2+Ye,le.circularPathData.rightLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=Math.max(Ve,le.source.y1,le.target.y1)+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=_e-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius)}le.circularPathData.leftInnerExtent=le.circularPathData.sourceX+le.circularPathData.leftNodeBuffer,le.circularPathData.rightInnerExtent=le.circularPathData.targetX-le.circularPathData.rightNodeBuffer,le.circularPathData.leftFullExtent=le.circularPathData.sourceX+le.circularPathData.leftLargeArcRadius+le.circularPathData.leftNodeBuffer,le.circularPathData.rightFullExtent=le.circularPathData.targetX-le.circularPathData.rightLargeArcRadius-le.circularPathData.rightNodeBuffer}if(le.circular)le.path=U(le);else{var yt=k.linkHorizontal().source(function(gt){var Tt=gt.source.x0+(gt.source.x1-gt.source.x0),At=gt.y0;return[Tt,At]}).target(function(gt){var Tt=gt.target.x0,At=gt.y1;return[Tt,At]});le.path=yt(le)}})}function U(Se){var Ie="";return Se.circularLinkType=="top"?Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 0 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY-Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 0 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 0 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY-Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 0 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY:Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 1 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY+Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 1 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 1 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY+Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 1 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY,Ie}function $(Se,Ie){return G(Se)==G(Ie)?Se.circularLinkType=="bottom"?re(Se,Ie):Q(Se,Ie):G(Ie)-G(Se)}function Q(Se,Ie){return Se.y0-Ie.y0}function re(Se,Ie){return Ie.y0-Se.y0}function ne(Se,Ie){return Se.y1-Ie.y1}function se(Se,Ie){return Ie.y1-Se.y1}function G(Se){return Se.target.column-Se.source.column}function X(Se){return Se.target.x0-Se.source.x1}function K(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1+Ge:Se.y1-Ge;return ke}function H(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1-Ge:Se.y1+Ge;return ke}function Y(Se,Ie,Ve,Ge){Se.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var _e=ke.source.column+1,ce=ke.target.column-1,ve=1,le=ce-_e+1;for(ve=1;_e<=ce;_e++,ve++)Se.nodes.forEach(function(Ae){if(Ae.column==_e){var Be=ve/(le+1),Xe=Math.pow(1-Be,3),Ye=3*Be*Math.pow(1-Be,2),yt=3*Math.pow(Be,2)*(1-Be),gt=Math.pow(Be,3),Tt=Xe*ke.y0+Ye*ke.y0+yt*ke.y1+gt*ke.y1,At=Tt-ke.width/2,$t=Tt+ke.width/2,rr;At>Ae.y0&&AtAe.y0&&$tAe.y1&&Z(_r,rr,Ie,Ve)})):AtAe.y1&&(rr=$t-Ae.y0+10,Ae=Z(Ae,rr,Ie,Ve),Se.nodes.forEach(function(_r){T(_r,Ge)==T(Ae,Ge)||_r.column!=Ae.column||_r.y0Ae.y1&&Z(_r,rr,Ie,Ve)}))}})}})}function q(Se,Ie){return Se.y0>Ie.y0&&Se.y0Ie.y0&&Se.y1Ie.y1}function Z(Se,Ie,Ve,Ge){return Se.y0+Ie>=Ve&&Se.y1+Ie<=Ge&&(Se.y0=Se.y0+Ie,Se.y1=Se.y1+Ie,Se.targetLinks.forEach(function(ke){ke.y1=ke.y1+Ie}),Se.sourceLinks.forEach(function(ke){ke.y0=ke.y0+Ie})),Se}function ee(Se,Ie,Ve,Ge){Se.nodes.forEach(function(ke){Ge&&ke.y+(ke.y1-ke.y0)>Ie&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-Ie));var _e=Se.links.filter(function(le){return T(le.source,Ve)==T(ke,Ve)}),ce=_e.length;ce>1&&_e.sort(function(le,Ae){if(!le.circular&&!Ae.circular){if(le.target.column==Ae.target.column)return le.y1-Ae.y1;if(he(le,Ae)){if(le.target.column>Ae.target.column){var Be=H(Ae,le);return le.y1-Be}if(Ae.target.column>le.target.column){var Xe=H(le,Ae);return Xe-Ae.y1}}else return le.y1-Ae.y1}if(le.circular&&!Ae.circular)return le.circularLinkType=="top"?-1:1;if(Ae.circular&&!le.circular)return Ae.circularLinkType=="top"?1:-1;if(le.circular&&Ae.circular)return le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="top"?le.target.column===Ae.target.column?le.target.y1-Ae.target.y1:Ae.target.column-le.target.column:le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="bottom"?le.target.column===Ae.target.column?Ae.target.y1-le.target.y1:le.target.column-Ae.target.column:le.circularLinkType=="top"?-1:1});var ve=ke.y0;_e.forEach(function(le){le.y0=ve+le.width/2,ve=ve+le.width}),_e.forEach(function(le,Ae){if(le.circularLinkType=="bottom"){var Be=Ae+1,Xe=0;for(Be;Be1&&ke.sort(function(ve,le){if(!ve.circular&&!le.circular){if(ve.source.column==le.source.column)return ve.y0-le.y0;if(he(ve,le)){if(le.source.column0?"up":"down"}function we(Se,Ie){return T(Se.source,Ie)==T(Se.target,Ie)}function Me(Se,Ie,Ve){var Ge=Se.nodes,ke=Se.links,_e=!1,ce=!1;if(ke.forEach(function(Ye){Ye.circularLinkType=="top"?_e=!0:Ye.circularLinkType=="bottom"&&(ce=!0)}),_e==!1||ce==!1){var ve=b.min(Ge,function(Ye){return Ye.y0}),le=b.max(Ge,function(Ye){return Ye.y1}),Ae=le-ve,Be=Ve-Ie,Xe=Be/Ae;Ge.forEach(function(Ye){var yt=(Ye.y1-Ye.y0)*Xe;Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=Ye.y0+yt}),ke.forEach(function(Ye){Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=(Ye.y1-ve)*Xe,Ye.width=Ye.width*Xe})}}p.sankeyCircular=x,p.sankeyCenter=a,p.sankeyLeft=t,p.sankeyRight=n,p.sankeyJustify=r,Object.defineProperty(p,"__esModule",{value:!0})})}}),OM=ze({"src/traces/sankey/constants.js"(J,V){"use strict";V.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),IV=ze({"src/traces/sankey/render.js"(J,V){"use strict";var p=SV(),b=(l0(),Po(_v)).interpolateNumber,E=ci(),k=CV(),l=RV(),e=OM(),t=Qn(),n=$i(),r=Nr(),a=r.strTranslate,o=r.strRotate,s=Vd(),c=s.keyFun,m=s.repeat,h=s.unwrap,v=Cs(),g=mi(),i=dc(),w=i.CAP_SHIFT,S=i.LINE_SPACING,M=3;function C(X,K,H){var Y=h(K),q=Y.trace,Z=q.domain,ee=q.orientation==="h",ae=q.direction==="reversed",he=q.node.pad,xe=q.node.thickness,we={justify:k.sankeyJustify,left:k.sankeyLeft,right:k.sankeyRight,center:k.sankeyCenter}[q.node.align],Me=X.width*(Z.x[1]-Z.x[0]),Se=X.height*(Z.y[1]-Z.y[0]),Ie=Y._nodes,Ve=Y._links,Ge=Y.circular,ke;Ge?ke=l.sankeyCircular().circularLinkGap(0):ke=k.sankey(),ke.iterations(e.sankeyIterations).size(ee?[Me,Se]:[Se,Me]).nodeWidth(xe).nodePadding(he).nodeId(function(Xt){return Xt.pointNumber}).nodeAlign(we).nodes(Ie).links(Ve);function _e(Xt){q[Xt].sort==="input"&&(Ge?r.warn(`Circular Sankey diagrams do not support the "input" ${Xt}.sort mode; falling back to the default sort.`):ke[`${Xt}Sort`](null))}_e("link"),_e("node");var ce=ke();ke.nodePadding()=ht||(vt=ht-Ot.y0,vt>1e-6&&(Ot.y0+=vt,Ot.y1+=vt)),ht=Ot.y1+he})}function At(Xt){var or=Xt.map(function(Ke,Je){return{x0:Ke.x0,index:Je}}).sort(function(Ke,Je){return Ke.x0-Je.x0}),Ot=[],vt=-1,ht,De=-1/0,Ne;for(ve=0;veDe+xe&&(vt+=1,ht=We.x0),De=We.x0,Ot[vt]||(Ot[vt]=[]),Ot[vt].push(We),Ne=ht-We.x0,We.x0+=Ne,We.x1+=Ne}return Ot}if(q.node.x.length&&q.node.y.length){for(ve=0;ve0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(H="M "+(q.targetX-K)+" "+(q.targetY-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.targetY-Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightSmallArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent-Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-Y-K)+" "+q.verticalRightInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-Y-K)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent+Y-K-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent-K-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.leftFullExtent+Y+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+Y)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+Y)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent,H+=" L "+(q.leftFullExtent+Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftSmallArcRadius+Y)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY+Y)+" L "+q.leftInnerExtent+" "+(q.sourceY+Y)+" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Y)+" "+q.verticalLeftInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.rightFullExtent+Y-K+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent-K-Y)+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:H+=" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftLargeArcRadius-Y)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightLargeArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent,H+=" L "+(q.rightFullExtent+Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+Y)+" L "+(q.targetX-K)+" "+(q.targetY+Y)+(K>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),H}function f(){var X=.5;function K(H){var Y=H.linkArrowLength;if(H.link.circular)return T(H.link,Y);var q=Math.abs((H.link.target.x0-H.link.source.x1)/2);Y>q&&(Y=q);var Z=H.link.source.x1,ee=H.link.target.x0-Y,ae=b(Z,ee),he=ae(X),xe=ae(1-X),we=H.link.y0-H.link.width/2,Me=H.link.y0+H.link.width/2,Se=H.link.y1-H.link.width/2,Ie=H.link.y1+H.link.width/2,Ve="M"+Z+","+we,Ge="C"+he+","+we+" "+xe+","+Se+" "+ee+","+Se,ke="C"+xe+","+Ie+" "+he+","+Me+" "+Z+","+Me,_e=Y>0?"L"+(ee+Y)+","+(Se+H.link.width/2):"";return _e+="L"+ee+","+Ie,Ve+Ge+_e+ke+"Z"}return K}function u(X,K){var H=e.nodePadAcross,Y=X.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var q=K.dx,Z=Math.max(.5,K.dy),ee="node_"+K.pointNumber;return K.group&&(ee=r.randstr()),K.trace=X.trace,K.curveNumber=X.trace.index,{index:K.pointNumber,key:ee,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:X.key,trace:X.trace,node:K,nodePad:X.nodePad,nodeLineColor:X.nodeLineColor,nodeLineWidth:X.nodeLineWidth,textFont:X.textFont,size:X.horizontal?X.height:X.width,visibleWidth:Math.ceil(q),visibleHeight:Z,zoneX:-H,zoneY:-Y,zoneWidth:q+2*H,zoneHeight:Z+2*Y,labelY:X.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:X.width,forceLayouts:X.forceLayouts,horizontal:X.horizontal,reversed:X.reversed,rgb:t.rgb(K.color),alpha:t.parse(K.color).alpha,valueFormat:X.valueFormat,valueSuffix:X.valueSuffix,sankey:X.sankey,graph:X.graph,arrangement:X.arrangement,uniqueNodeLabelPathId:[X.guid,X.key,ee].join("_"),interactionState:X.interactionState,figure:X}}function A(X){X.attr("transform",function(K){return a(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function x(X){X.call(A)}function z(X,K){X.call(x),K.attr("d",f())}function I(X){X.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function O(X){return X.link.width>1||X.linkLineWidth>0}function D(X){return X.horizontal?X.reversed?a(X.translateX+X.width,X.translateY)+"matrix(-1 0 0 1 0 0)":a(X.translateX,X.translateY)+"matrix(1 0 0 1 0 0)":X.reversed?a(X.translateX,X.translateY+X.height)+"matrix(0 -1 1 0 0 0)":a(X.translateX,X.translateY)+"matrix(0 1 1 0 0 0)"}function B(X,K,H){X.on(".basic",null).on("mouseover.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.hover(this,Y,K),Y.interactionState.hovered=[this,Y])}).on("mousemove.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.follow(this,Y),Y.interactionState.hovered=[this,Y])}).on("mouseout.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1)}).on("click.basic",function(Y){Y.interactionState.hovered&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1),!Y.interactionState.dragInProgress&&!Y.partOfGroup&&H.select(this,Y,K)})}function F(X,K,H,Y){var q=E.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(r.ensureSingle(Y._fullLayout._infolayer,"g","dragcover",function(ae){Y._fullLayout._dragCover=ae}),r.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,re(Z.node),Z.interactionState.hovered&&(H.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var ee=Z.traceId+"|"+Z.key;Z.forceLayouts[ee]?Z.forceLayouts[ee].alpha(1):P(X,ee,Z,Y),j(X,K,Z,ee,Y)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var ee=E.event.x,ae=E.event.y;Z.arrangement==="snap"?(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2,Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2),ae=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,ae)),Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2),re(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),z(X.filter(ne(Z)),K))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var ee=0;ee0)window.requestAnimationFrame(Z);else{var he=H.node.originalX;H.node.x0=he-H.visibleWidth/2,H.node.x1=he+H.visibleWidth/2,$(H,q)}})}function U(X,K,H,Y){return function(){for(var Z=0,ee=0;ee0&&Y.forceLayouts[K].alpha(0)}}function $(X,K){for(var H=[],Y=[],q=0;qO(ke)?t.rgb(ke.linkLineColor):ke.rgb).style("stroke-opacity",ke=>O(ke)?t.opacity(ke.linkLineColor):ke.alpha).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha).style("stroke-width",ke=>O(ke)?ke.linkLineWidth:1).attr("d",f()),Me.style("opacity",function(){return X._context.staticPlot||ee||ae?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Me.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Se=xe.selectAll("."+e.cn.sankeyNodeSet).data(m,c);Se.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Se.style("cursor",function(ke){switch(ke.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ie=Se.selectAll("."+e.cn.sankeyNode).data(function(ke){var _e=ke.graph.nodes;return Q(_e),_e.map(u.bind(null,ke))},c);Ie.enter().append("g").classed(e.cn.sankeyNode,!0).call(A).style("opacity",function(ke){return(X._context.staticPlot||ee)&&!ke.partOfGroup?1:0}),Ie.call(B,xe,q.nodeEvents).call(F,Me,q,X),Ie.transition().ease(e.ease).duration(e.duration).call(A).style("opacity",function(ke){return ke.partOfGroup?0:1}),Ie.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Ve=Ie.selectAll("."+e.cn.nodeRect).data(m);Ve.enter().append("rect").classed(e.cn.nodeRect,!0).call(I),Ve.style("stroke-width",function(ke){return ke.nodeLineWidth}).style("stroke",function(ke){return t.rgb(ke.nodeLineColor)}).style("stroke-opacity",function(ke){return t.opacity(ke.nodeLineColor)}).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha),Ve.transition().ease(e.ease).duration(e.duration).call(I);var Ge=Ie.selectAll("."+e.cn.nodeLabel).data(m);Ge.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),Ge.attr("data-notex",1).text(function(ke){return ke.node.label}).each(function(ke){var _e=E.select(this);n.font(_e,ke.textFont),v.convertToTspans(_e,X)}).attr("text-anchor",function(ke){return ke.horizontal&&ke.left!==ke.reversed?"end":"start"}).attr("transform",function(ke){var _e=E.select(this),ce=v.lineCount(_e),ve=ke.textFont.size*((ce-1)*S-w),le=ke.nodeLineWidth/2+M;if(!ke.horizontal){var Xe=ke.reversed?(ke.visibleWidth+ve)/2:(ke.visibleWidth-ve)/2,Ae=ke.reversed?o(90):"scale(-1,1)"+o(90);return a(Xe,le)+Ae}var Be=le,Xe=(ke.visibleHeight-ve)/2;return ke.left?Be=-Be:Be+=ke.visibleWidth,a(Be,Xe)+(ke.reversed?"scale(-1,1)":"")}),Ge.transition().ease(e.ease).duration(e.duration)}}}),NM=ze({"src/traces/sankey/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=b.numberFormat,k=IV(),l=Zl(),e=Qn(),t=OM().cn,n=b._;function r(S){return S!==""}function a(S,M){return S.filter(function(C){return C.key===M.traceId})}function o(S,M){p.select(S).select("path").style("fill-opacity",M),p.select(S).select("rect").style("fill-opacity",M)}function s(S){p.select(S).select("text.name").style("fill","black")}function c(S){return function(M){return S.node.sourceLinks.indexOf(M.link)!==-1||S.node.targetLinks.indexOf(M.link)!==-1}}function m(S){return function(M){return M.node.sourceLinks.indexOf(S.link)!==-1||M.node.targetLinks.indexOf(S.link)!==-1}}function h(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(g.bind(0,M,C,!1))}function v(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(i.bind(0,M,C,!1))}function g(S,M,C,_){_.style("fill",function(T){if(!T.link.concentrationscale)return T.hoverRgb}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.hoverAlpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",function(u){if(!u.link.concentrationscale)return u.hoverRgb}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.hoverAlpha})}),C&&a(M,S).selectAll("."+t.sankeyNode).filter(m(S)).call(h)}function i(S,M,C,_){_.style("fill",function(T){return T.rgb}).style("fill-opacity",function(T){return T.alpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",u=>u.rgb).style("fill-opacity",u=>u.alpha)}),C&&a(M,S).selectAll(t.sankeyNode).filter(m(S)).call(v)}function w(S,M){var C=S.hoverlabel||{},_=b.nestedProperty(C,M).get();return Array.isArray(_)?!1:_}V.exports=function(M,C){for(var _=M._fullLayout,T=_._paper,f=_._size,u=0;u"),color:w(G,"bgcolor")||e.addOpacity(q.color,1),borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:p.event.x"),color:w(G,"bgcolor")||se.rgb,borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:ee,eventData:[se.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M});o(xe,.85),s(xe)}}},re=function(ne,se,G){M._fullLayout.hovermode!==!1&&(p.select(ne).call(v,se,G),se.node.trace.node.hoverinfo!=="skip"&&(se.node.fullData=se.node.trace,M.emit("plotly_unhover",{event:p.event,points:[se.node]})),l.loneUnhover(_._hoverlayer.node()))};k(M,T,C,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:z,follow:P,unhover:j,select:x},nodeEvents:{hover:$,follow:Q,unhover:re,select:U}})}}}),DV=ze({"src/traces/sankey/base_plot.js"(J){"use strict";var V=Al().overrideAll,p=zf().getModuleCalcData,b=NM(),E=rv(),k=gd(),l=_h(),e=_c().prepSelect,t=Nr(),n=mi(),r="sankey";J.name=r,J.baseLayoutAttrOverrides=V({hoverlabel:E.hoverlabel},"plot","nested"),J.plot=function(o){var s=p(o.calcdata,r)[0];b(o,s),J.updateFx(o)},J.clean=function(o,s,c,m){var h=m._has&&m._has(r),v=s._has&&s._has(r);h&&!v&&(m._paperdiv.selectAll(".sankey").remove(),m._paperdiv.selectAll(".bgsankey").remove())},J.updateFx=function(o){for(var s=0;s0}V.exports=function(D,B,F,P){var j=D._fullLayout,U;S(F)&&P&&(U=P()),k.makeTraceGroups(j._indicatorlayer,B,"trace").each(function($){var Q=$[0],re=Q.trace,ne=p.select(this),se=re._hasGauge,G=re._isAngular,X=re._isBullet,K=re.domain,H={w:j._size.w*(K.x[1]-K.x[0]),h:j._size.h*(K.y[1]-K.y[0]),l:j._size.l+j._size.w*K.x[0],r:j._size.r+j._size.w*(1-K.x[1]),t:j._size.t+j._size.h*(1-K.y[1]),b:j._size.b+j._size.h*K.y[0]},Y=H.l+H.w/2,q=H.t+H.h/2,Z=Math.min(H.w/2,H.h),ee=a.innerRadius*Z,ae,he,xe,we=re.align||"center";if(he=q,!se)ae=H.l+i[we]*H.w,xe=function(le){return A(le,H.w,H.h)};else if(G&&(ae=Y,he=q+Z/2,xe=function(le){return x(le,.9*ee)}),X){var Me=a.bulletPadding,Se=1-a.bulletNumberDomainSize+Me;ae=H.l+(Se+(1-Se)*i[we])*H.w,xe=function(le){return A(le,(a.bulletNumberDomainSize-Me)*H.w,H.h)}}_(D,ne,$,{numbersX:ae,numbersY:he,numbersScaler:xe,transitionOpts:F,onComplete:U});var Ie,Ve;se&&(Ie={range:re.gauge.axis.range,color:re.gauge.bgcolor,line:{color:re.gauge.bordercolor,width:0},thickness:1},Ve={range:re.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:re.gauge.bordercolor,width:re.gauge.borderwidth},thickness:1});var Ge=ne.selectAll("g.angular").data(G?$:[]);Ge.exit().remove();var ke=ne.selectAll("g.angularaxis").data(G?$:[]);ke.exit().remove(),G&&C(D,ne,$,{radius:Z,innerRadius:ee,gauge:Ge,layer:ke,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var _e=ne.selectAll("g.bullet").data(X?$:[]);_e.exit().remove();var ce=ne.selectAll("g.bulletaxis").data(X?$:[]);ce.exit().remove(),X&&M(D,ne,$,{gauge:_e,layer:ce,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var ve=ne.selectAll("text.title").data($);ve.exit().remove(),ve.enter().append("text").classed("title",!0),ve.attr("text-anchor",function(){return X?g.right:g[re.title.align]}).text(re.title.text).call(r.font,re.title.font).call(o.convertToTspans,D),ve.attr("transform",function(){var le=H.l+H.w*i[re.title.align],Ae,Be=a.titlePadding,Xe=r.bBox(ve.node());if(se){if(G)if(re.gauge.axis.visible){var Ye=r.bBox(ke.node());Ae=Ye.top-Be-Xe.bottom}else Ae=H.t+H.h/2-Z/2-Xe.bottom-Be;X&&(Ae=he-(Xe.top+Xe.bottom)/2,le=H.l-a.bulletPadding*H.w)}else Ae=re._numbersTop-Be-Xe.bottom;return e(le,Ae)})})};function M(O,D,B,F){var P=B[0].trace,j=F.gauge,U=F.layer,$=F.gaugeBg,Q=F.gaugeOutline,re=F.size,ne=P.domain,se=F.transitionOpts,G=F.onComplete,X,K,H,Y,q;j.enter().append("g").classed("bullet",!0),j.attr("transform",e(re.l,re.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var Z=re.h,ee=P.gauge.bar.thickness*Z,ae=ne.x[0],he=ne.x[0]+(ne.x[1]-ne.x[0])*(P._hasNumber||P._hasDelta?1-a.bulletNumberDomainSize:1);X=u(O,P.gauge.axis),X._id="xbulletaxis",X.domain=[ae,he],X.setScale(),K=s.calcTicks(X),H=s.makeTransTickFn(X),Y=s.getTickSigns(X)[2],q=re.t+re.h,X.visible&&(s.drawTicks(O,X,{vals:X.ticks==="inside"?s.clipEnds(X,K):K,layer:U,path:s.makeTickPath(X,q,Y),transFn:H}),s.drawLabels(O,X,{vals:K,layer:U,transFn:H,labelFns:s.makeLabelFns(X,q)}));function xe(ke){ke.attr("width",function(_e){return Math.max(0,X.c2p(_e.range[1])-X.c2p(_e.range[0]))}).attr("x",function(_e){return X.c2p(_e.range[0])}).attr("y",function(_e){return .5*(1-_e.thickness)*Z}).attr("height",function(_e){return _e.thickness*Z})}var we=[$].concat(P.gauge.steps),Me=j.selectAll("g.bg-bullet").data(we);Me.enter().append("g").classed("bg-bullet",!0).append("rect"),Me.select("rect").call(xe).call(T),Me.exit().remove();var Se=j.selectAll("g.value-bullet").data([P.gauge.bar]);Se.enter().append("g").classed("value-bullet",!0).append("rect"),Se.select("rect").attr("height",ee).attr("y",(Z-ee)/2).call(T),S(se)?Se.select("rect").transition().duration(se.duration).ease(se.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()}).attr("width",Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y)))):Se.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y))):0),Se.exit().remove();var Ie=B.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),Ve=j.selectAll("g.threshold-bullet").data(Ie);Ve.enter().append("g").classed("threshold-bullet",!0).append("line"),Ve.select("line").attr("x1",X.c2p(P.gauge.threshold.value)).attr("x2",X.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*Z).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*Z).call(v.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),Ve.exit().remove();var Ge=j.selectAll("g.gauge-outline").data([Q]);Ge.enter().append("g").classed("gauge-outline",!0).append("rect"),Ge.select("rect").call(xe).call(T),Ge.exit().remove()}function C(O,D,B,F){var P=B[0].trace,j=F.size,U=F.radius,$=F.innerRadius,Q=F.gaugeBg,re=F.gaugeOutline,ne=[j.l+j.w/2,j.t+j.h/2+U/2],se=F.gauge,G=F.layer,X=F.transitionOpts,K=F.onComplete,H=Math.PI/2;function Y(yt){var gt=P.gauge.axis.range[0],Tt=P.gauge.axis.range[1],At=(yt-gt)/(Tt-gt)*Math.PI-H;return At<-H?-H:At>H?H:At}function q(yt){return p.svg.arc().innerRadius(($+U)/2-yt/2*(U-$)).outerRadius(($+U)/2+yt/2*(U-$)).startAngle(-H)}function Z(yt){yt.attr("d",function(gt){return q(gt.thickness).startAngle(Y(gt.range[0])).endAngle(Y(gt.range[1]))()})}var ee,ae,he,xe;se.enter().append("g").classed("angular",!0),se.attr("transform",e(ne[0],ne[1])),G.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),G.selectAll("g.xangularaxistick,path,text").remove(),ee=u(O,P.gauge.axis),ee.type="linear",ee.range=P.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var we=function(yt){return(ee.range[0]-yt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Me={},Se=s.makeLabelFns(ee,0),Ie=Se.labelStandoff;Me.xFn=function(yt){var gt=we(yt);return Math.cos(gt)*Ie},Me.yFn=function(yt){var gt=we(yt),Tt=Math.sin(gt)>0?.2:1;return-Math.sin(gt)*(Ie+yt.fontSize*Tt)+Math.abs(Math.cos(gt))*(yt.fontSize*n)},Me.anchorFn=function(yt){var gt=we(yt),Tt=Math.cos(gt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Me.heightFn=function(yt,gt,Tt){var At=we(yt);return-.5*(1+Math.sin(At))*Tt};var Ve=function(yt){return e(ne[0]+U*Math.cos(yt),ne[1]-U*Math.sin(yt))};he=function(yt){return Ve(we(yt))};var Ge=function(yt){var gt=we(yt);return Ve(gt)+"rotate("+-t(gt)+")"};if(ae=s.calcTicks(ee),xe=s.getTickSigns(ee)[2],ee.visible){xe=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;s.drawTicks(O,ee,{vals:ae,layer:G,path:"M"+xe*ke+",0h"+xe*ee.ticklen,transFn:Ge}),s.drawLabels(O,ee,{vals:ae,layer:G,transFn:he,labelFns:Me})}var _e=[Q].concat(P.gauge.steps),ce=se.selectAll("g.bg-arc").data(_e);ce.enter().append("g").classed("bg-arc",!0).append("path"),ce.select("path").call(Z).call(T),ce.exit().remove();var ve=q(P.gauge.bar.thickness),le=se.selectAll("g.value-arc").data([P.gauge.bar]);le.enter().append("g").classed("value-arc",!0).append("path");var Ae=le.select("path");S(X)?(Ae.transition().duration(X.duration).ease(X.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",f(ve,Y(B[0].lastY),Y(B[0].y))),P._lastValue=B[0].y):Ae.attr("d",typeof B[0].y=="number"?ve.endAngle(Y(B[0].y)):"M0,0Z"),Ae.call(T),le.exit().remove(),_e=[];var Be=P.gauge.threshold.value;(Be||Be===0)&&_e.push({range:[Be,Be],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var Xe=se.selectAll("g.threshold-arc").data(_e);Xe.enter().append("g").classed("threshold-arc",!0).append("path"),Xe.select("path").call(Z).call(T),Xe.exit().remove();var Ye=se.selectAll("g.gauge-outline").data([re]);Ye.enter().append("g").classed("gauge-outline",!0).append("path"),Ye.select("path").call(Z).call(T),Ye.exit().remove()}function _(O,D,B,F){var P=B[0].trace,j=F.numbersX,U=F.numbersY,$=P.align||"center",Q=g[$],re=F.transitionOpts,ne=F.onComplete,se=k.ensureSingle(D,"g","numbers"),G,X,K,H=[];P._hasNumber&&H.push("number"),P._hasDelta&&(H.push("delta"),P.delta.position==="left"&&H.reverse());var Y=se.selectAll("text").data(H);Y.enter().append("text"),Y.attr("text-anchor",function(){return Q}).attr("class",function(Ve){return Ve}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Y.exit().remove();function q(Ve,Ge,ke,_e){if(Ve.match("s")&&ke>=0!=_e>=0&&!Ge(ke).slice(-1).match(w)&&!Ge(_e).slice(-1).match(w)){var ce=Ve.slice().replace("s","f").replace(/\d+/,function(le){return parseInt(le)-1}),ve=u(O,{tickformat:ce});return function(le){return Math.abs(le)<1?s.tickText(ve,le).text:Ge(le)}}else return Ge}function Z(){var Ve=u(O,{tickformat:P.number.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(le){return s.tickText(Ve,le).text},ke=P.number.suffix,_e=P.number.prefix,ce=se.select("text.number");function ve(){var le=typeof B[0].y=="number"?_e+Ge(B[0].y)+ke:"-";ce.text(le).call(r.font,P.number.font).call(o.convertToTspans,O)}return S(re)?ce.transition().duration(re.duration).ease(re.easing).each("end",function(){ve(),ne&&ne()}).each("interrupt",function(){ve(),ne&&ne()}).attrTween("text",function(){var le=p.select(this),Ae=E(B[0].lastY,B[0].y);P._lastValue=B[0].y;var Be=q(P.number.valueformat,Ge,B[0].lastY,B[0].y);return function(Xe){le.text(_e+Be(Ae(Xe))+ke)}}):ve(),G=z(_e+Ge(B[0].y)+ke,P.number.font,Q,O),ce}function ee(){var Ve=u(O,{tickformat:P.delta.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(Xe){return s.tickText(Ve,Xe).text},ke=P.delta.suffix,_e=P.delta.prefix,ce=function(Xe){var Ye=P.delta.relative?Xe.relativeDelta:Xe.delta;return Ye},ve=function(Xe,Ye){return Xe===0||typeof Xe!="number"||isNaN(Xe)?"-":(Xe>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+_e+Ye(Xe)+ke},le=function(Xe){return Xe.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=ce(B[0]));var Ae=se.select("text.delta");Ae.call(r.font,P.delta.font).call(v.fill,le({delta:P._deltaLastValue}));function Be(){Ae.text(ve(ce(B[0]),Ge)).call(v.fill,le(B[0])).call(o.convertToTspans,O)}return S(re)?Ae.transition().duration(re.duration).ease(re.easing).tween("text",function(){var Xe=p.select(this),Ye=ce(B[0]),yt=P._deltaLastValue,gt=q(P.delta.valueformat,Ge,yt,Ye),Tt=E(yt,Ye);return P._deltaLastValue=Ye,function(At){Xe.text(ve(Tt(At),gt)),Xe.call(v.fill,le({delta:Tt(At)}))}}).each("end",function(){Be(),ne&&ne()}).each("interrupt",function(){Be(),ne&&ne()}):Be(),X=z(ve(ce(B[0]),Ge),P.delta.font,Q,O),Ae}var ae=P.mode+P.align,he;if(P._hasDelta&&(he=ee(),ae+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,ae+=P.delta.increasing.symbol+P.delta.decreasing.symbol,K=X),P._hasNumber&&(Z(),ae+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,K=G),P._hasDelta&&P._hasNumber){var xe=[(G.left+G.right)/2,(G.top+G.bottom)/2],we=[(X.left+X.right)/2,(X.top+X.bottom)/2],Me,Se,Ie=.75*P.delta.font.size;P.delta.position==="left"&&(Me=I(P,"deltaPos",0,-1*(G.width*i[P.align]+X.width*(1-i[P.align])+Ie),ae,Math.min),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:X.left+Me,right:G.right,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="right"&&(Me=I(P,"deltaPos",0,G.width*(1-i[P.align])+X.width*i[P.align]+Ie,ae,Math.max),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:G.left,right:X.right+Me,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="bottom"&&(Me=null,Se=X.height,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height,bottom:G.bottom+X.height}),P.delta.position==="top"&&(Me=null,Se=G.top,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height-X.height,bottom:G.bottom}),he.attr({dx:Me,dy:Se})}(P._hasNumber||P._hasDelta)&&se.attr("transform",function(){var Ve=F.numbersScaler(K);ae+=Ve[2];var Ge=I(P,"numbersScale",1,Ve[0],ae,Math.min),ke;P._scaleNumbers||(Ge=1),P._isAngular?ke=U-Ge*K.bottom:ke=U-Ge*(K.top+K.bottom)/2,P._numbersTop=Ge*K.top+ke;var _e=K[$];$==="center"&&(_e=(K.left+K.right)/2);var ce=j-Ge*_e;return ce=I(P,"numbersTranslate",0,ce,ae,Math.max),e(ce,ke)+l(Ge)})}function T(O){O.each(function(D){v.stroke(p.select(this),D.line.color)}).each(function(D){v.fill(p.select(this),D.color)}).style("stroke-width",function(D){return D.line.width})}function f(O,D,B){return function(){var F=b(D,B);return function(P){return O.endAngle(F(P))()}}}function u(O,D,B){var F=O._fullLayout,P=k.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},D),j={type:"linear",_id:"x"+D._id},U={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function $(Q,re){return k.coerce(P,j,h,Q,re)}return c(P,j,$,U,F),m(P,j,$,U),j}function A(O,D,B){var F=Math.min(D/O.width,B/O.height);return[F,O,D+"x"+B]}function x(O,D){var B=Math.sqrt(O.width/2*(O.width/2)+O.height*O.height),F=D/B;return[F,O,D]}function z(O,D,B,F){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),j=p.select(P);return j.text(O).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",O).call(o.convertToTspans,F).call(r.font,D),r.bBox(j.node())}function I(O,D,B,F,P,j){var U="_cache"+D;O[U]&&O[U].key===P||(O[U]={key:P,value:B});var $=k.aggNums(j,null,[O[U].value,F],2);return O[U].value=$,$}}}),qV=ze({"src/traces/indicator/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"indicator",basePlotModule:OV(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:jM(),supplyDefaults:NV().supplyDefaults,calc:jV().calc,plot:UV(),meta:{}}}}),VV=ze({"lib/indicator.js"(J,V){"use strict";V.exports=qV()}}),qM=ze({"src/traces/table/attributes.js"(J,V){"use strict";var p=fv(),b=Ki().extendFlat,E=Al().overrideAll,k=Qs(),l=Ml().attributes,e=Il().descriptionOnlyNumbers,t=V.exports=E({domain:l({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:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:b({},p.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:b({},k({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:b({},p.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:b({},k({arrayOk:!0}))}},"calc","from-root")}}),GV=ze({"src/traces/table/defaults.js"(J,V){"use strict";var p=Nr(),b=qM(),E=Ml().defaults;function k(l,e){for(var t=l.columnorder||[],n=l.header.values.length,r=t.slice(0,n),a=r.slice().sort(function(c,m){return c-m}),o=r.map(function(c){return a.indexOf(c)}),s=o.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"}}}}),WV=ze({"src/traces/table/data_preparation_helper.js"(J,V){"use strict";var p=VM(),b=Ki().extendFlat,E=ao(),k=Ff().isTypedArray,l=Ff().isArrayOrTypedArray;V.exports=function(h,v){var g=n(v.cells.values),i=function(Q){return Q.slice(v.header.values.length,Q.length)},w=n(v.header.values);w.length&&!w[0].length&&(w[0]=[""],w=n(w));var S=w.concat(i(g).map(function(){return r((w[0]||[""]).length)})),M=v.domain,C=Math.floor(h._fullLayout._size.w*(M.x[1]-M.x[0])),_=Math.floor(h._fullLayout._size.h*(M.y[1]-M.y[0])),T=v.header.values.length?S[0].map(function(){return v.header.height}):[p.emptyHeaderHeight],f=g.length?g[0].map(function(){return v.cells.height}):[],u=T.reduce(t,0),A=_-u,x=A+p.uplift,z=s(f,x),I=s(T,u),O=o(I,[]),D=o(z,O),B={},F=v.columnorder;l(F)&&(F=Array.from(F)),F=F.concat(i(g.map(function(Q,re){return re})));var P=S.map(function(Q,re){var ne=l(v.columnwidth)?v.columnwidth[Math.min(re,v.columnwidth.length-1)]:v.columnwidth;return E(ne)?Number(ne):1}),j=P.reduce(t,0);P=P.map(function(Q){return Q/j*C});var U=Math.max(e(v.header.line.width),e(v.cells.line.width)),$={key:v.uid+h._context.staticPlot,translateX:M.x[0]*h._fullLayout._size.w,translateY:h._fullLayout._size.h*(1-M.y[1]),size:h._fullLayout._size,width:C,maxLineWidth:U,height:_,columnOrder:F,groupHeight:_,rowBlocks:D,headerRowBlocks:O,scrollY:0,cells:b({},v.cells,{values:g}),headerCells:b({},v.header,{values:S}),gdColumns:S.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:S.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:S.map(function(Q,re){var ne=B[Q];B[Q]=(ne||0)+1;var se=Q+"__"+B[Q];return{key:se,label:Q,specIndex:re,xIndex:F[re],xScale:a,x:void 0,calcdata:void 0,columnWidth:P[re]}})};return $.columns.forEach(function(Q){Q.calcdata=$,Q.x=a(Q)}),$};function e(m){if(l(m)){for(var h=0,v=0;v=h||_===m.length-1)&&(v[i]=S,S.key=C++,S.firstRowIndex=M,S.lastRowIndex=_,S=c(),i+=w,M=_+1,w=0);return v}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),YV=ze({"src/traces/table/data_split_helpers.js"(J){"use strict";var V=Ki().extendFlat;J.splitToPanels=function(b){var E=[0,0],k=V({},b,{key:"header",type:"header",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!0,values:b.calcdata.headerCells.values[b.specIndex],rowBlocks:b.calcdata.headerRowBlocks,calcdata:V({},b.calcdata,{cells:b.calcdata.headerCells})}),l=V({},b,{key:"cells1",type:"cells",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks}),e=V({},b,{key:"cells2",type:"cells",page:1,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks});return[l,e,k]},J.splitToCells=function(b){var E=p(b);return(b.values||[]).slice(E[0],E[1]).map(function(k,l){var e=typeof k=="string"&&k.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:E[0]+l,column:b,calcdata:b.calcdata,page:b.page,rowBlocks:b.rowBlocks,value:k}})};function p(b){var E=b.rowBlocks[b.page],k=E?E.rows[0].rowIndex:0,l=E?k+E.rows.length:0;return[k,l]}}}),GM=ze({"src/traces/table/plot.js"(J,V){"use strict";var p=VM(),b=ci(),E=Nr(),k=E.numberFormat,l=Vd(),e=$i(),t=Cs(),n=Nr().raiseToTop,r=Nr().strTranslate,a=Nr().cancelTransition,o=WV(),s=YV(),c=Qn();V.exports=function(ae,he){var xe=!ae._context.staticPlot,we=ae._fullLayout._paper.selectAll("."+p.cn.table).data(he.map(function(Ye){var yt=l.unwrap(Ye),gt=yt.trace;return o(ae,gt)}),l.keyFun);we.exit().remove(),we.enter().append("g").classed(p.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"),we.attr("width",function(Ye){return Ye.width+Ye.size.l+Ye.size.r}).attr("height",function(Ye){return Ye.height+Ye.size.t+Ye.size.b}).attr("transform",function(Ye){return r(Ye.translateX,Ye.translateY)});var Me=we.selectAll("."+p.cn.tableControlView).data(l.repeat,l.keyFun),Se=Me.enter().append("g").classed(p.cn.tableControlView,!0).style("box-sizing","content-box");if(xe){var Ie="onwheel"in document?"wheel":"mousewheel";Se.on("mousemove",function(Ye){Me.filter(function(yt){return Ye===yt}).call(i,ae)}).on(Ie,function(Ye){if(!Ye.scrollbarState.wheeling){Ye.scrollbarState.wheeling=!0;var yt=Ye.scrollY+b.event.deltaY,gt=Q(ae,Me,null,yt)(Ye);gt||(b.event.stopPropagation(),b.event.preventDefault()),Ye.scrollbarState.wheeling=!1}}).call(i,ae,!0)}Me.attr("transform",function(Ye){return r(Ye.size.l,Ye.size.t)});var Ve=Me.selectAll("."+p.cn.scrollBackground).data(l.repeat,l.keyFun);Ve.enter().append("rect").classed(p.cn.scrollBackground,!0).attr("fill","none"),Ve.attr("width",function(Ye){return Ye.width}).attr("height",function(Ye){return Ye.height}),Me.each(function(Ye){e.setClipUrl(b.select(this),h(ae,Ye),ae)});var Ge=Me.selectAll("."+p.cn.yColumn).data(function(Ye){return Ye.columns},l.keyFun);Ge.enter().append("g").classed(p.cn.yColumn,!0),Ge.exit().remove(),Ge.attr("transform",function(Ye){return r(Ye.x,0)}),xe&&Ge.call(b.behavior.drag().origin(function(Ye){var yt=b.select(this);return B(yt,Ye,-p.uplift),n(this),Ye.calcdata.columnDragInProgress=!0,i(Me.filter(function(gt){return Ye.calcdata.key===gt.key}),ae),Ye}).on("drag",function(Ye){var yt=b.select(this),gt=function($t){return(Ye===$t?b.event.x:$t.x)+$t.columnWidth/2};Ye.x=Math.max(-p.overdrag,Math.min(Ye.calcdata.width+p.overdrag-Ye.columnWidth,b.event.x));var Tt=g(Ge).filter(function($t){return $t.calcdata.key===Ye.calcdata.key}),At=Tt.sort(function($t,rr){return gt($t)-gt(rr)});At.forEach(function($t,rr){$t.xIndex=rr,$t.x=Ye===$t?$t.x:$t.xScale($t)}),Ge.filter(function($t){return Ye!==$t}).transition().ease(p.transitionEase).duration(p.transitionDuration).attr("transform",function($t){return r($t.x,0)}),yt.call(a).attr("transform",r(Ye.x,-p.uplift))}).on("dragend",function(Ye){var yt=b.select(this),gt=Ye.calcdata;Ye.x=Ye.xScale(Ye),Ye.calcdata.columnDragInProgress=!1,B(yt,Ye,0),O(ae,gt,gt.columns.map(function(Tt){return Tt.xIndex}))})),Ge.each(function(Ye){e.setClipUrl(b.select(this),v(ae,Ye),ae)});var ke=Ge.selectAll("."+p.cn.columnBlock).data(s.splitToPanels,l.keyFun);ke.enter().append("g").classed(p.cn.columnBlock,!0).attr("id",function(Ye){return Ye.key}),ke.style("cursor",function(Ye){return Ye.dragHandle?"ew-resize":Ye.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var _e=ke.filter(P),ce=ke.filter(F);xe&&ce.call(b.behavior.drag().origin(function(Ye){return b.event.stopPropagation(),Ye}).on("drag",Q(ae,Me,-1)).on("dragend",function(){})),w(ae,Me,_e,ke),w(ae,Me,ce,ke);var ve=Me.selectAll("."+p.cn.scrollAreaClip).data(l.repeat,l.keyFun);ve.enter().append("clipPath").classed(p.cn.scrollAreaClip,!0).attr("id",function(Ye){return h(ae,Ye)});var le=ve.selectAll("."+p.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);le.enter().append("rect").classed(p.cn.scrollAreaClipRect,!0).attr("x",-p.overdrag).attr("y",-p.uplift).attr("fill","none"),le.attr("width",function(Ye){return Ye.width+2*p.overdrag}).attr("height",function(Ye){return Ye.height+p.uplift});var Ae=Ge.selectAll("."+p.cn.columnBoundary).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(p.cn.columnBoundary,!0);var Be=Ge.selectAll("."+p.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Be.enter().append("clipPath").classed(p.cn.columnBoundaryClippath,!0),Be.attr("id",function(Ye){return v(ae,Ye)});var Xe=Be.selectAll("."+p.cn.columnBoundaryRect).data(l.repeat,l.keyFun);Xe.enter().append("rect").classed(p.cn.columnBoundaryRect,!0).attr("fill","none"),Xe.attr("width",function(Ye){return Ye.columnWidth+2*m(Ye)}).attr("height",function(Ye){return Ye.calcdata.height+2*m(Ye)+p.uplift}).attr("x",function(Ye){return-m(Ye)}).attr("y",function(Ye){return-m(Ye)}),$(null,ce,Me)};function m(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function h(ee,ae){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+ae.key}function v(ee,ae){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+ae.calcdata.key+"_"+ae.specIndex}function g(ee){return[].concat.apply([],ee.map(function(ae){return ae})).map(function(ae){return ae.__data__})}function i(ee,ae,he){function xe(Ge){var ke=Ge.rowBlocks;return K(ke,ke.length-1)+(ke.length?H(ke[ke.length-1],1/0):1)}var we=ee.selectAll("."+p.cn.scrollbarKit).data(l.repeat,l.keyFun);we.enter().append("g").classed(p.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),we.each(function(Ge){var ke=Ge.scrollbarState;ke.totalHeight=xe(Ge),ke.scrollableAreaHeight=Ge.groupHeight-j(Ge),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,p.goldenRatio*p.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:Ge.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(Ge){var ke=Ge.width+p.scrollbarWidth/2+p.scrollbarOffset;return r(ke,j(Ge))});var Me=we.selectAll("."+p.cn.scrollbar).data(l.repeat,l.keyFun);Me.enter().append("g").classed(p.cn.scrollbar,!0);var Se=Me.selectAll("."+p.cn.scrollbarSlider).data(l.repeat,l.keyFun);Se.enter().append("g").classed(p.cn.scrollbarSlider,!0),Se.attr("transform",function(Ge){return r(0,Ge.scrollbarState.topY||0)});var Ie=Se.selectAll("."+p.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ie.enter().append("line").classed(p.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",p.scrollbarWidth).attr("stroke-linecap","round").attr("y1",p.scrollbarWidth/2),Ie.attr("y2",function(Ge){return Ge.scrollbarState.barLength-p.scrollbarWidth/2}).attr("stroke-opacity",function(Ge){return Ge.columnDragInProgress||!Ge.scrollbarState.barWiggleRoom||he?0:.4}),Ie.transition().delay(0).duration(0),Ie.transition().delay(p.scrollbarHideDelay).duration(p.scrollbarHideDuration).attr("stroke-opacity",0);var Ve=Me.selectAll("."+p.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);Ve.enter().append("line").classed(p.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",p.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Ge){var ke=b.event.y,_e=this.getBoundingClientRect(),ce=Ge.scrollbarState,ve=ke-_e.top,le=b.scale.linear().domain([0,ce.scrollableAreaHeight]).range([0,ce.totalHeight]).clamp(!0);ce.topY<=ve&&ve<=ce.bottomY||Q(ae,ee,null,le(ve-ce.barLength/2))(Ge)}).call(b.behavior.drag().origin(function(Ge){return b.event.stopPropagation(),Ge.scrollbarState.scrollbarScrollInProgress=!0,Ge}).on("drag",Q(ae,ee)).on("dragend",function(){})),Ve.attr("y2",function(Ge){return Ge.scrollbarState.scrollableAreaHeight}),ae._context.staticPlot&&(Ie.remove(),Ve.remove())}function w(ee,ae,he,xe){var we=S(he),Me=M(we);f(Me);var Se=C(Me);A(Se);var Ie=T(Me),Ve=_(Ie);u(Ve),x(Ve,ae,xe,ee),X(Me)}function S(ee){var ae=ee.selectAll("."+p.cn.columnCells).data(l.repeat,l.keyFun);return ae.enter().append("g").classed(p.cn.columnCells,!0),ae.exit().remove(),ae}function M(ee){var ae=ee.selectAll("."+p.cn.columnCell).data(s.splitToCells,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.columnCell,!0),ae.exit().remove(),ae}function C(ee){var ae=ee.selectAll("."+p.cn.cellRect).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("rect").classed(p.cn.cellRect,!0),ae}function _(ee){var ae=ee.selectAll("."+p.cn.cellText).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("text").classed(p.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){b.event.stopPropagation()}),ae}function T(ee){var ae=ee.selectAll("."+p.cn.cellTextHolder).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ae}function f(ee){ee.each(function(ae,he){var xe=ae.calcdata.cells.font,we=ae.column.specIndex,Me={size:D(xe.size,we,he),color:D(xe.color,we,he),family:D(xe.family,we,he),weight:D(xe.weight,we,he),style:D(xe.style,we,he),variant:D(xe.variant,we,he),textcase:D(xe.textcase,we,he),lineposition:D(xe.lineposition,we,he),shadow:D(xe.shadow,we,he)};ae.rowNumber=ae.key,ae.align=D(ae.calcdata.cells.align,we,he),ae.cellBorderWidth=D(ae.calcdata.cells.line.width,we,he),ae.font=Me})}function u(ee){ee.each(function(ae){e.font(b.select(this),ae.font)})}function A(ee){ee.attr("width",function(ae){return ae.column.columnWidth}).attr("stroke-width",function(ae){return ae.cellBorderWidth}).each(function(ae){var he=b.select(this);c.stroke(he,D(ae.calcdata.cells.line.color,ae.column.specIndex,ae.rowNumber)),c.fill(he,D(ae.calcdata.cells.fill.color,ae.column.specIndex,ae.rowNumber))})}function x(ee,ae,he,xe){ee.text(function(we){var Me=we.column.specIndex,Se=we.rowNumber,Ie=we.value,Ve=typeof Ie=="string",Ge=Ve&&Ie.match(/
/i),ke=!Ve||Ge;we.mayHaveMarkup=Ve&&Ie.match(/[<&>]/);var _e=z(Ie);we.latex=_e;var ce=_e?"":D(we.calcdata.cells.prefix,Me,Se)||"",ve=_e?"":D(we.calcdata.cells.suffix,Me,Se)||"",le=_e?null:D(we.calcdata.cells.format,Me,Se)||null,Ae=ce+(le?k(le)(we.value):we.value)+ve,Be;we.wrappingNeeded=!we.wrapped&&!ke&&!_e&&(Be=I(Ae)),we.cellHeightMayIncrease=Ge||_e||we.mayHaveMarkup||(Be===void 0?I(Ae):Be),we.needsConvertToTspans=we.mayHaveMarkup||we.wrappingNeeded||we.latex;var Xe;if(we.wrappingNeeded){var Ye=p.wrapSplitCharacter===" "?Ae.replace(/we&&xe.push(Me),we+=Ve}return xe}function $(ee,ae,he){var xe=g(ae)[0];if(xe!==void 0){var we=xe.rowBlocks,Me=xe.calcdata,Se=K(we,we.length),Ie=xe.calcdata.groupHeight-j(xe),Ve=Me.scrollY=Math.max(0,Math.min(Se-Ie,Me.scrollY)),Ge=U(we,Ve,Ie);Ge.length===1&&(Ge[0]===we.length-1?Ge.unshift(Ge[0]-1):Ge.push(Ge[0]+1)),Ge[0]%2&&Ge.reverse(),ae.each(function(ke,_e){ke.page=Ge[_e],ke.scrollY=Ve}),ae.attr("transform",function(ke){var _e=K(ke.rowBlocks,ke.page)-ke.scrollY;return r(0,_e)}),ee&&(re(ee,he,ae,Ge,xe.prevPages,xe,0),re(ee,he,ae,Ge,xe.prevPages,xe,1),i(he,ee))}}function Q(ee,ae,he,xe){return function(Me){var Se=Me.calcdata?Me.calcdata:Me,Ie=ae.filter(function(_e){return Se.key===_e.key}),Ve=he||Se.scrollbarState.dragMultiplier,Ge=Se.scrollY;Se.scrollY=xe===void 0?Se.scrollY+Ve*b.event.dy:xe;var ke=Ie.selectAll("."+p.cn.yColumn).selectAll("."+p.cn.columnBlock).filter(F);return $(ee,ke,Ie),Se.scrollY===Ge}}function re(ee,ae,he,xe,we,Me,Se){var Ie=xe[Se]!==we[Se];Ie&&(clearTimeout(Me.currentRepaint[Se]),Me.currentRepaint[Se]=setTimeout(function(){var Ve=he.filter(function(Ge,ke){return ke===Se&&xe[ke]!==we[ke]});w(ee,ae,Ve,he),we[Se]=xe[Se]}))}function ne(ee,ae,he,xe){return function(){var Me=b.select(ae.parentNode);Me.each(function(Se){var Ie=Se.fragments;Me.selectAll("tspan.line").each(function(Ae,Be){Ie[Be].width=this.getComputedTextLength()});var Ve=Ie[Ie.length-1].width,Ge=Ie.slice(0,-1),ke=[],_e,ce,ve=0,le=Se.column.columnWidth-2*p.cellPad;for(Se.value="";Ge.length;)_e=Ge.shift(),ce=_e.width+Ve,ve+ce>le&&(Se.value+=ke.join(p.wrapSpacer)+p.lineBreaker,ke=[],ve=0),ke.push(_e.text),ve+=ce;ve&&(Se.value+=ke.join(p.wrapSpacer)),Se.wrapped=!0}),Me.selectAll("tspan.line").remove(),x(Me.select("."+p.cn.cellText),he,ee,xe),b.select(ae.parentNode.parentNode).call(X)}}function se(ee,ae,he,xe,we){return function(){if(!we.settledY){var Se=b.select(ae.parentNode),Ie=q(we),Ve=we.key-Ie.firstRowIndex,Ge=Ie.rows[Ve].rowHeight,ke=we.cellHeightMayIncrease?ae.parentNode.getBoundingClientRect().height+2*p.cellPad:Ge,_e=Math.max(ke,Ge),ce=_e-Ie.rows[Ve].rowHeight;ce&&(Ie.rows[Ve].rowHeight=_e,ee.selectAll("."+p.cn.columnCell).call(X),$(null,ee.filter(F),0),i(he,xe,!0)),Se.attr("transform",function(){var ve=this,le=ve.parentNode,Ae=le.getBoundingClientRect(),Be=b.select(ve.parentNode).select("."+p.cn.cellRect).node().getBoundingClientRect(),Xe=ve.transform.baseVal.consolidate(),Ye=Be.top-Ae.top+(Xe?Xe.matrix.f:p.cellPad);return r(G(we,b.select(ve.parentNode).select("."+p.cn.cellTextHolder).node().getBoundingClientRect().width),Ye)}),we.settledY=!0}}}function G(ee,ae){switch(ee.align){case"left":return p.cellPad;case"right":return ee.column.columnWidth-(ae||0)-p.cellPad;case"center":return(ee.column.columnWidth-(ae||0))/2;default:return p.cellPad}}function X(ee){ee.attr("transform",function(ae){var he=ae.rowBlocks[0].auxiliaryBlocks.reduce(function(Se,Ie){return Se+H(Ie,1/0)},0),xe=q(ae),we=H(xe,ae.key),Me=we+he;return r(0,Me)}).selectAll("."+p.cn.cellRect).attr("height",function(ae){return Z(q(ae),ae.key).rowHeight})}function K(ee,ae){for(var he=0,xe=ae-1;xe>=0;xe--)he+=Y(ee[xe]);return he}function H(ee,ae){for(var he=0,xe=0;xek.length&&(E=E.slice(0,k.length)):E=[],e=0;e90&&(h-=180,a=-a),{angle:h,flip:a,p:b.c2p(l,E,k),offsetMultplier:o}}}}),aG=ze({"src/traces/carpet/plot.js"(J,V){"use strict";var p=ci(),b=$i(),E=HM(),k=WM(),l=rG(),e=Cs(),t=Nr(),n=t.strRotate,r=t.strTranslate,a=dc();V.exports=function(w,S,M,C){var _=w._context.staticPlot,T=S.xaxis,f=S.yaxis,u=w._fullLayout,A=u._clips;t.makeTraceGroups(C,M,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace,D=O.aaxis,B=O.baxis,F=t.ensureSingle(z,"g","minorlayer"),P=t.ensureSingle(z,"g","majorlayer"),j=t.ensureSingle(z,"g","boundarylayer"),U=t.ensureSingle(z,"g","labellayer");z.style("opacity",O.opacity),s(T,f,P,D,"a",D._gridlines,!0,_),s(T,f,P,B,"b",B._gridlines,!0,_),s(T,f,F,D,"a",D._minorgridlines,!0,_),s(T,f,F,B,"b",B._minorgridlines,!0,_),s(T,f,j,D,"a-boundary",D._boundarylines,_),s(T,f,j,B,"b-boundary",B._boundarylines,_);var $=c(w,T,f,O,I,U,D._labels,"a-label"),Q=c(w,T,f,O,I,U,B._labels,"b-label");m(w,U,O,I,T,f,$,Q),o(O,I,A,T,f)})};function o(i,w,S,M,C){var _,T,f,u,A=S.select("#"+i._clipPathId);A.size()||(A=S.append("clipPath").classed("carpetclip",!0));var x=t.ensureSingle(A,"path","carpetboundary"),z=w.clipsegments,I=[];for(u=0;u0?"start":"end","data-notex":1}).call(b.font,z.font).text(z.text).call(e.convertToTspans,i),P=b.bBox(this);F.attr("transform",r(O.p[0],O.p[1])+n(O.angle)+r(z.axis.labelpadding*B,P.height*.3)),A=Math.max(A,P.width+z.axis.labelpadding)}),u.exit().remove(),x.maxExtent=A,x}function m(i,w,S,M,C,_,T,f){var u,A,x,z,I=t.aggNums(Math.min,null,S.a),O=t.aggNums(Math.max,null,S.a),D=t.aggNums(Math.min,null,S.b),B=t.aggNums(Math.max,null,S.b);u=.5*(I+O),A=D,x=S.ab2xy(u,A,!0),z=S.dxyda_rough(u,A),T.angle===void 0&&t.extendFlat(T,l(S,C,_,x,S.dxydb_rough(u,A))),g(i,w,S,M,x,z,S.aaxis,C,_,T,"a-title"),u=I,A=.5*(D+B),x=S.ab2xy(u,A,!0),z=S.dxydb_rough(u,A),f.angle===void 0&&t.extendFlat(f,l(S,C,_,x,S.dxyda_rough(u,A))),g(i,w,S,M,x,z,S.baxis,C,_,f,"b-title")}var h=a.LINE_SPACING,v=(1-a.MID_SHIFT)/h+1;function g(i,w,S,M,C,_,T,f,u,A,x){var z=[];T.title.text&&z.push(T.title.text);var I=w.selectAll("text."+x).data(z),O=A.maxExtent;I.enter().append("text").classed(x,!0),I.each(function(){var D=l(S,f,u,C,_);["start","both"].indexOf(T.showticklabels)===-1&&(O=0);var B=T.title.font.size;O+=B+T.title.offset;var F=A.angle+(A.flip<0?180:0),P=(F-D.angle+450)%360,j=P>90&&P<270,U=p.select(this);U.text(T.title.text).call(e.convertToTspans,i),j&&(O=(-e.lineCount(U)+v)*h*B-O),U.attr("transform",r(D.p[0],D.p[1])+n(D.angle)+r(0,O)).attr("text-anchor","middle").call(b.font,T.title.font)}),I.exit().remove()}}}),nG=ze({"src/traces/carpet/cheater_basis.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k){var l,e,t,n,r,a,o=[],s=p(b)?b.length:b,c=p(E)?E.length:E,m=p(b)?b:null,h=p(E)?E:null;m&&(t=(m.length-1)/(m[m.length-1]-m[0])/(s-1)),h&&(n=(h.length-1)/(h[h.length-1]-h[0])/(c-1));var v,g=1/0,i=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=E.length,n=0;n0&&(H=k.dxydi([],$-1,re,0,ne),ee.push(se[0]+H[0]/3),ae.push(se[1]+H[1]/3),Y=k.dxydi([],$-1,re,1,ne),ee.push(K[0]-Y[0]/3),ae.push(K[1]-Y[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;else for($=k.a2i(U),G=Math.floor(Math.max(0,Math.min(D-2,$))),X=$-G,he.length=D,he.crossLength=B,he.xy=function(xe){return k.evalxy([],$,xe)},he.dxy=function(xe,we){return k.dxydj([],G,xe,X,we)},Q=0;Q0&&(q=k.dxydj([],G,Q-1,X,0),ee.push(se[0]+q[0]/3),ae.push(se[1]+q[1]/3),Z=k.dxydj([],G,Q-1,X,1),ee.push(K[0]-Z[0]/3),ae.push(K[1]-Z[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;return he.axisLetter=l,he.axis=C,he.crossAxis=A,he.value=U,he.constvar=e,he.index=m,he.x=ee,he.y=ae,he.smoothing=A.smoothing,he}function j(U){var $,Q,re,ne,se,G=[],X=[],K={};if(K.length=M.length,K.crossLength=u.length,l==="b")for(re=Math.max(0,Math.min(B-2,U)),se=Math.min(1,Math.max(0,U-re)),K.xy=function(H){return k.evalxy([],H,U)},K.dxy=function(H,Y){return k.dxydi([],H,re,Y,se)},$=0;$M.length-1)&&_.push(b(j(n),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s;mM.length-1)&&!(g<0||g>M.length-1))for(i=M[r],w=M[g],t=0;tM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&f.push(b(j(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(j(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(a=5e-15,o=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+a)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+a))].sort(function(U,$){return U-$}),s=o[0],c=o[1],m=s;m<=c;m++)h=C.tick0+C.dtick*m,_.push(b(P(h),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s-1;mM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&f.push(b(P(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(P(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),sG=ze({"src/traces/carpet/calc_labels.js"(J,V){"use strict";var p=Gi(),b=Ki().extendFlat;V.exports=function(k,l){var e,t,n,r,a,o=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=b[c][e],n[s-e]=E[c][e];for(r.push({x:t,y:n,bicubic:a}),e=c,t=[],n=[];e>=0;e--)t[c-e]=b[e][0],n[c-e]=E[e][0];return r.push({x:t,y:n,bicubic:o}),r}}}),uG=ze({"src/traces/carpet/smooth_fill_2d_array.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k,l){var e,t,n,r=[],a=[],o=E[0].length,s=E.length;function c(Q,re){var ne=0,se,G=0;return Q>0&&(se=E[re][Q-1])!==void 0&&(G++,ne+=se),Q0&&(se=E[re-1][Q])!==void 0&&(G++,ne+=se),re0&&t0&&eu);return p.log("Smoother converged to",A,"after",z,"iterations"),E}}}),cG=ze({"src/traces/carpet/constants.js"(J,V){"use strict";V.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),fG=ze({"src/traces/carpet/catmull_rom.js"(J,V){"use strict";var p=.5;V.exports=function(E,k,l,e){var t=E[0]-k[0],n=E[1]-k[1],r=l[0]-k[0],a=l[1]-k[1],o=Math.pow(t*t+n*n,p/2),s=Math.pow(r*r+a*a,p/2),c=(s*s*t-o*o*r)*e,m=(s*s*n-o*o*a)*e,h=s*(o+s)*3,v=o*(o+s)*3;return[[k[0]+(h&&c/h),k[1]+(h&&m/h)],[k[0]-(v&&c/v),k[1]-(v&&m/v)]]}}}),hG=ze({"src/traces/carpet/compute_control_points.js"(J,V){"use strict";var p=fG(),b=Nr().ensureArray;function E(k,l,e){var t=-.5*e[0]+1.5*l[0],n=-.5*e[1]+1.5*l[1];return[(2*t+k[0])/3,(2*n+k[1])/3]}V.exports=function(l,e,t,n,r,a){var o,s,c,m,h,v,g,i,w,S,M=t[0].length,C=t.length,_=r?3*M-2:M,T=a?3*C-2:C;for(l=b(l,T),e=b(e,T),c=0;ch&&_g&&Tv||Ti},n.setScale=function(){var _=n._x,T=n._y,f=E(n._xctrl,n._yctrl,_,T,c.smoothing,m.smoothing);n._xctrl=f[0],n._yctrl=f[1],n.evalxy=k([n._xctrl,n._yctrl],o,s,c.smoothing,m.smoothing),n.dxydi=l([n._xctrl,n._yctrl],c.smoothing,m.smoothing),n.dxydj=e([n._xctrl,n._yctrl],c.smoothing,m.smoothing)},n.i2a=function(_){var T=Math.max(0,Math.floor(_[0]),o-2),f=_[0]-T;return(1-f)*r[T]+f*r[T+1]},n.j2b=function(_){var T=Math.max(0,Math.floor(_[1]),o-2),f=_[1]-T;return(1-f)*a[T]+f*a[T+1]},n.ij2ab=function(_){return[n.i2a(_[0]),n.j2b(_[1])]},n.a2i=function(_){var T=Math.max(0,Math.min(b(_,r),o-2)),f=r[T],u=r[T+1];return Math.max(0,Math.min(o-1,T+(_-f)/(u-f)))},n.b2j=function(_){var T=Math.max(0,Math.min(b(_,a),s-2)),f=a[T],u=a[T+1];return Math.max(0,Math.min(s-1,T+(_-f)/(u-f)))},n.ab2ij=function(_){return[n.a2i(_[0]),n.b2j(_[1])]},n.i2c=function(_,T){return n.evalxy([],_,T)},n.ab2xy=function(_,T,f){if(!f&&(_r[o-1]|Ta[s-1]))return[!1,!1];var u=n.a2i(_),A=n.b2j(T),x=n.evalxy([],u,A);if(f){var z=0,I=0,O=[],D,B,F,P;_r[o-1]?(D=o-2,B=1,z=(_-r[o-1])/(r[o-1]-r[o-2])):(D=Math.max(0,Math.min(o-2,Math.floor(u))),B=u-D),Ta[s-1]?(F=s-2,P=1,I=(T-a[s-1])/(a[s-1]-a[s-2])):(F=Math.max(0,Math.min(s-2,Math.floor(A))),P=A-F),z&&(n.dxydi(O,D,F,B,P),x[0]+=O[0]*z,x[1]+=O[1]*z),I&&(n.dxydj(O,D,F,B,P),x[0]+=O[0]*I,x[1]+=O[1]*I)}return x},n.c2p=function(_,T,f){return[T.c2p(_[0]),f.c2p(_[1])]},n.p2x=function(_,T,f){return[T.p2c(_[0]),f.p2c(_[1])]},n.dadi=function(_){var T=Math.max(0,Math.min(r.length-2,_));return r[T+1]-r[T]},n.dbdj=function(_){var T=Math.max(0,Math.min(a.length-2,_));return a[T+1]-a[T]},n.dxyda=function(_,T,f,u){var A=n.dxydi(null,_,T,f,u),x=n.dadi(_,f);return[A[0]/x,A[1]/x]},n.dxydb=function(_,T,f,u){var A=n.dxydj(null,_,T,f,u),x=n.dbdj(T,u);return[A[0]/x,A[1]/x]},n.dxyda_rough=function(_,T,f){var u=w*(f||.1),A=n.ab2xy(_+u,T,!0),x=n.ab2xy(_-u,T,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dxydb_rough=function(_,T,f){var u=S*(f||.1),A=n.ab2xy(_,T+u,!0),x=n.ab2xy(_,T-u,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dpdx=function(_){return _._m},n.dpdy=function(_){return _._m}}}}),gG=ze({"src/traces/carpet/calc.js"(J,V){"use strict";var p=Gi(),b=Nr().isArray1D,E=nG(),k=iG(),l=oG(),e=sG(),t=lG(),n=lb(),r=uG(),a=sb(),o=mG();V.exports=function(c,m){var h=p.getFromId(c,m.xaxis),v=p.getFromId(c,m.yaxis),g=m.aaxis,i=m.baxis,w=m.x,S=m.y,M=[];w&&b(w)&&M.push("x"),S&&b(S)&&M.push("y"),M.length&&a(m,g,i,"a","b",M);var C=m._a=m._a||m.a,_=m._b=m._b||m.b;w=m._x||m.x,S=m._y||m.y;var T={};if(m._cheater){var f=g.cheatertype==="index"?C.length:C,u=i.cheatertype==="index"?_.length:_;w=E(f,u,m.cheaterslope)}m._x=w=n(w),m._y=S=n(S),r(w,C,_),r(S,C,_),o(m),m.setScale();var A=k(w),x=k(S),z=.5*(A[1]-A[0]),I=.5*(A[1]+A[0]),O=.5*(x[1]-x[0]),D=.5*(x[1]+x[0]),B=1.3;return A=[I-z*B,I+z*B],x=[D-O*B,D+O*B],m._extremes[h._id]=p.findExtremes(h,A,{padded:!0}),m._extremes[v._id]=p.findExtremes(v,x,{padded:!0}),l(m,"a","b"),l(m,"b","a"),e(m,g),e(m,i),T.clipsegments=t(m._xctrl,m._yctrl,g,i),T.x=w,T.y=S,T.a=C,T.b=_,[T]}}}),yG=ze({"src/traces/carpet/index.js"(J,V){"use strict";V.exports={attributes:H2(),supplyDefaults:tG(),plot:aG(),calc:gG(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Du(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),_G=ze({"lib/carpet.js"(J,V){"use strict";V.exports=yG()}}),YM=ze({"src/traces/scattercarpet/attributes.js"(J,V){"use strict";var p=Bd(),b=su(),E=ws(),{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=qs(),n=Ki().extendFlat,r=b.marker,a=b.line,o=r.line;V.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:n({},b.mode,{dflt:"markers"}),text:n({},b.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:n({},b.hovertext,{}),line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:n({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:b.connectgaps,fill:n({},b.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:p(),marker:n({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:n({width:o.width,dash:o.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:n({},E.hoverinfo,{flags:["a","b","text","name"]}),hoveron:b.hoveron,hovertemplate:k(),hovertemplatefallback:e(),zorder:b.zorder}}}),xG=ze({"src/traces/scattercarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=YM();V.exports=function(o,s,c,m){function h(C,_){return p.coerce(o,s,r,C,_)}h("carpet"),s.xaxis="x",s.yaxis="y";var v=h("a"),g=h("b"),i=Math.min(v.length,g.length);if(!i){s.visible=!1;return}s._length=i,h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext");var w=i0?T=C.labelprefix.replace(/ = $/,""):T=C._hovertitle,i.push(T+": "+_.toFixed(3)+C.labelsuffix)}if(!h.hovertemplate){var S=m.hi||h.hoverinfo,M=S.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&w(v.aaxis,m.a),M.indexOf("b")!==-1&&w(v.baxis,m.b),i.push("y: "+r.yLabel),M.indexOf("text")!==-1&&b(m,h,i),r.extraText=i.join("
")}return n}}}),MG=ze({"src/traces/scattercarpet/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=l[e];return b.a=t.a,b.b=t.b,b.y=t.y,b}}}),SG=ze({"src/traces/scattercarpet/index.js"(J,V){"use strict";V.exports={attributes:YM(),supplyDefaults:xG(),colorbar:Of(),formatLabels:bG(),calc:wG(),plot:TG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:AG(),selectPoints:Yv(),eventData:MG(),moduleType:"trace",name:"scattercarpet",basePlotModule:Du(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),EG=ze({"lib/scattercarpet.js"(J,V){"use strict";V.exports=SG()}}),XM=ze({"src/traces/contourcarpet/attributes.js"(J,V){"use strict";var p=rg(),b=M1(),E=qs(),k=Ki().extendFlat,l=b.contours;V.exports=k({carpet:{valType:"string",editType:"calc"},z:p.z,a:p.x,a0:p.x0,da:p.dx,b:p.y,b0:p.y0,db:p.dy,text:p.text,hovertext:p.hovertext,transpose:p.transpose,atype:p.xtype,btype:p.ytype,fillcolor:b.fillcolor,autocontour:b.autocontour,ncontours:b.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:b.line.color,width:b.line.width,dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},zorder:b.zorder},E("",{cLetter:"z",autoColorDflt:!1}))}}),ZM=ze({"src/traces/contourcarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=ob(),E=XM(),k=hT(),l=xb(),e=bb();V.exports=function(n,r,a,o){function s(v,g){return p.coerce(n,r,E,v,g)}function c(v){return p.coerce2(n,r,E,v)}if(s("carpet"),n.a&&n.b){var m=b(n,r,s,o,"a","b");if(!m){r.visible=!1;return}s("text");var h=s("contours.type")==="constraint";h?k(n,r,s,o,a,{hasHover:!1}):(l(n,r,s,c),e(n,r,s,o,{hasHover:!1}))}else r._defaultColor=a,r._length=null;s("zorder")}}}),kG=ze({"src/traces/contourcarpet/calc.js"(J,V){"use strict";var p=Qf(),b=Nr(),E=sb(),k=lb(),l=ub(),e=cb(),t=$5(),n=ZM(),r=W2(),a=aT();V.exports=function(c,m){var h=m._carpetTrace=r(c,m);if(!(!h||!h.visible||h.visible==="legendonly")){if(!m.a||!m.b){var v=c.data[h.index],g=c.data[m.index];g.a||(g.a=v.a),g.b||(g.b=v.b),n(g,m,m._defaultColor,c._fullLayout)}var i=o(c,m);return a(m,m._z),i}};function o(s,c){var m=c._carpetTrace,h=m.aaxis,v=m.baxis,g,i,w,S,M,C,_;h._minDtick=0,v._minDtick=0,b.isArray1D(c.z)&&E(c,h,v,"a","b",["z"]),g=c._a=c._a||c.a,S=c._b=c._b||c.b,g=g?h.makeCalcdata(c,"_a"):[],S=S?v.makeCalcdata(c,"_b"):[],i=c.a0||0,w=c.da||1,M=c.b0||0,C=c.db||1,_=c._z=k(c._z||c.z,c.transpose),c._emptypoints=e(_),l(_,c._emptypoints);var T=b.maxRowLength(_),f=c.xtype==="scaled"?"":g,u=t(c,f,i,w,T,h),A=c.ytype==="scaled"?"":S,x=t(c,A,M,C,_.length,v),z={a:u,b:x,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&p(s,c,{vals:_,containerStr:"",cLetter:"z"}),[z]}}}),CG=ze({"src/traces/carpet/axis_aligned_line.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k,l){var e,t,n,r,a,o,s,c,m,h,v,g,i,w=p(k)?"a":"b",S=w==="a"?b.aaxis:b.baxis,M=S.smoothing,C=w==="a"?b.a2i:b.b2j,_=w==="a"?k:l,T=w==="a"?l:k,f=w==="a"?E.a.length:E.b.length,u=w==="a"?E.b.length:E.a.length,A=Math.floor(w==="a"?b.b2j(T):b.a2i(T)),x=w==="a"?function(re){return b.evalxy([],re,A)}:function(re){return b.evalxy([],A,re)};M&&(n=Math.max(0,Math.min(u-2,A)),r=A-n,t=w==="a"?function(re,ne){return b.dxydi([],re,n,ne,r)}:function(re,ne){return b.dxydj([],n,re,r,ne)});var z=C(_[0]),I=C(_[1]),O=z0?Math.floor:Math.ceil,F=O>0?Math.ceil:Math.floor,P=O>0?Math.min:Math.max,j=O>0?Math.max:Math.min,U=B(z+D),$=F(I-D);s=x(z);var Q=[[s]];for(e=U;e*O<$*O;e+=O)a=[],v=j(z,e),g=P(I,e+O),i=g-v,o=Math.max(0,Math.min(f-2,Math.floor(.5*(v+g)))),c=x(g),M&&(m=t(o,v-o),h=t(o,g-o),a.push([s[0]+m[0]/3*i,s[1]+m[1]/3*i]),a.push([c[0]-h[0]/3*i,c[1]-h[1]/3*i])),a.push(c),Q.push(a),s=c;return Q}}}),LG=ze({"src/traces/contourcarpet/plot.js"(J,V){"use strict";var p=ci(),b=HM(),E=WM(),k=$i(),l=Nr(),e=iT(),t=oT(),n=wb(),r=E1(),a=lT(),o=sT(),s=uT(),c=W2(),m=CG();V.exports=function(f,u,A,x){var z=u.xaxis,I=u.yaxis;l.makeTraceGroups(x,A,"contour").each(function(O){var D=p.select(this),B=O[0],F=B.trace,P=F._carpetTrace=c(f,F),j=f.calcdata[P.index][0];if(!P.visible||P.visible==="legendonly")return;var U=B.a,$=B.b,Q=F.contours,re=o(Q,u,B),ne=Q.type==="constraint",se=Q._operation,G=ne?se==="="?"lines":"fill":Q.coloring;function X(Me){var Se=P.ab2xy(Me[0],Me[1],!0);return[z.c2p(Se[0]),I.c2p(Se[1])]}var K=[[U[0],$[$.length-1]],[U[U.length-1],$[$.length-1]],[U[U.length-1],$[0]],[U[0],$[0]]];e(re);var H=(U[U.length-1]-U[0])*1e-8,Y=($[$.length-1]-$[0])*1e-8;t(re,H,Y);var q=re;Q.type==="constraint"&&(q=a(re,se)),h(re,X);var Z,ee,ae,he,xe=[];for(he=j.clipsegments.length-1;he>=0;he--)Z=j.clipsegments[he],ee=b([],Z.x,z.c2p),ae=b([],Z.y,I.c2p),ee.reverse(),ae.reverse(),xe.push(E(ee,ae,Z.bicubic));var we="M"+xe.join("L")+"Z";M(D,j.clipsegments,z,I,ne,G),C(F,D,z,I,q,K,X,P,j,G,we),v(D,re,f,B,Q,u,P),k.setClipUrl(D,P._clipPathId,f)})};function h(T,f){var u,A,x,z,I,O,D,B,F;for(u=0;ure&&(A.max=re),A.len=A.max-A.min}function i(T,f,u){var A=T.getPointAtLength(f),x=T.getPointAtLength(u),z=x.x-A.x,I=x.y-A.y,O=Math.sqrt(z*z+I*I);return[z/O,I/O]}function w(T){var f=Math.sqrt(T[0]*T[0]+T[1]*T[1]);return[T[0]/f,T[1]/f]}function S(T,f){var u=Math.abs(T[0]*f[0]+T[1]*f[1]),A=Math.sqrt(1-u*u);return A/u}function M(T,f,u,A,x,z){var I,O,D,B,F=l.ensureSingle(T,"g","contourbg"),P=F.selectAll("path").data(z==="fill"&&!x?[0]:[]);P.enter().append("path"),P.exit().remove();var j=[];for(B=0;B=0&&(U=ee,Q=re):Math.abs(j[1]-U[1])=0&&(U=ee,Q=re):l.log("endpt to newendpt is not vert. or horz.",j,U,ee)}if(Q>=0)break;B+=q(j,U),j=U}if(Q===f.edgepaths.length){l.log("unclosed perimeter path");break}D=Q,P=F.indexOf(D)===-1,P&&(D=F[0],B+=q(j,U)+"Z",j=null)}for(D=0;D_):C=O>x,_=O;var D=h(x,z,I,O);D.pos=A,D.yc=(x+O)/2,D.i=u,D.dir=C?"increasing":"decreasing",D.x=D.pos,D.y=[I,z],T&&(D.orig_p=s[u]),S&&(D.tx=o.text[u]),M&&(D.htx=o.hovertext[u]),f.push(D)}else f.push({pos:A,empty:!0})}return o._extremes[m._id]=E.findExtremes(m,p.concat(i,g),{padded:!0}),f.length&&(f[0].t={labels:{open:b(a,"open:")+" ",high:b(a,"high:")+" ",low:b(a,"low:")+" ",close:b(a,"close:")+" "}}),f}function r(a,o,s){var c=s._minDiff;if(!c){var m=a._fullData,h=[];c=1/0;var v;for(v=0;v"+w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat)):(I=b.extendFlat({},M),I.y0=I.y1=z,I.yLabelVal=x,I.yLabel=w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat),I.name="",S.push(I),f[x]=I)}return S}function o(s,c,m,h){var v=s.cd,g=s.ya,i=v[0].trace,w=v[0].t,S=r(s,c,m,h);if(!S)return[];var M=S.index,C=v[M],_=S.index=C.i,T=C.dir;function f(D){return w.labels[D]+p.hoverLabelText(g,i[D][_],i.yhoverformat)}var u=C.hi||i.hoverinfo||"",A=u.split("+"),x=u==="all",z=x||A.indexOf("y")!==-1,I=x||A.indexOf("text")!==-1,O=z?[f("open"),f("high"),f("low"),f("close")+" "+t[T]]:[];return I&&l(C,i,O),S.extraText=O.join("
"),S.y0=S.y1=g.c2p(C.yc,!0),[S]}V.exports={hoverPoints:n,hoverSplit:a,hoverOnPoints:o}}}),QM=ze({"src/traces/ohlc/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r=k[0].t.bPos||0;if(E===!1)for(n=0;nc?function(i){return i<=0}:function(i){return i>=0};r.c2g=function(i){var w=r.c2l(i)-s;return(g(w)?w:0)+v},r.g2c=function(i){return r.l2c(i+s-v)},r.g2p=function(i){return i*h},r.c2p=function(i){return r.g2p(r.c2g(i))}}}function e(r,a){return a==="degrees"?E(r):r}function t(r,a){return a==="degrees"?k(r):r}function n(r,a){var o=r.type;if(o==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(m,h){return e(s(m),h)},r.c2d=function(m,h){return c(t(m,h))}}r.makeCalcdata=function(m,h){var v=m[h],g=m._length,i,w,S=function(f){return r.d2c(f,m.thetaunit)};if(v)for(i=new Array(g),w=0;w0?f:1/0},C=E(S,M),_=p.mod(C+1,S.length);return[S[C],S[_]]}function h(w){return Math.abs(w)>1e-10?w:0}function v(w,S,M){S=S||0,M=M||0;for(var C=w.length,_=new Array(C),T=0;T0?1:0}function b(t){var n=t[0],r=t[1];if(!isFinite(n)||!isFinite(r))return[1,0];var a=(n+1)*(n+1)+r*r;return[(n*n+r*r-1)/a,2*r/a]}function E(t,n){var r=n[0],a=n[1];return[r*t.radius+t.cx,-a*t.radius+t.cy]}function k(t,n){return n*t.radius}function l(t,n,r,a){var o=E(t,b([r,n])),s=o[0],c=o[1],m=E(t,b([a,n])),h=m[0],v=m[1];if(n===0)return["M"+s+","+c,"L"+h+","+v].join(" ");var g=k(t,1/Math.abs(n));return["M"+s+","+c,"A"+g+","+g+" 0 0,"+(n<0?1:0)+" "+h+","+v].join(" ")}function e(t,n,r,a){var o=k(t,1/(n+1)),s=E(t,b([n,r])),c=s[0],m=s[1],h=E(t,b([n,a])),v=h[0],g=h[1];if(p(r)!==p(a)){var i=E(t,b([n,0])),w=i[0],S=i[1];return["M"+c+","+m,"A"+o+","+o+" 0 0,"+(0Ie?(Ve=ee,Ge=ee*Ie,ce=(ae-Ge)/K.h/2,ke=[q[0],q[1]],_e=[Z[0]+ce,Z[1]-ce]):(Ve=ae/Ie,Ge=ae,ce=(ee-Ve)/K.w/2,ke=[q[0]+ce,q[1]-ce],_e=[Z[0],Z[1]]),G.xLength2=Ve,G.yLength2=Ge,G.xDomain2=ke,G.yDomain2=_e;var ve=G.xOffset2=K.l+K.w*ke[0],le=G.yOffset2=K.t+K.h*(1-_e[1]),Ae=G.radius=Ve/we,Be=G.innerRadius=G.getHole(se)*Ae,Xe=G.cx=ve-Ae*xe[0],Ye=G.cy=le+Ae*xe[3],yt=G.cxx=Xe-ve,gt=G.cyy=Ye-le,Tt=H.side,At;Tt==="counterclockwise"?(At=Tt,Tt="top"):Tt==="clockwise"&&(At=Tt,Tt="bottom"),G.radialAxis=G.mockAxis(ne,se,H,{_id:"x",side:Tt,_trueSide:At,domain:[Be/K.w,Ae/K.w]}),G.angularAxis=G.mockAxis(ne,se,Y,{side:"right",domain:[0,Math.PI],autorange:!1}),G.doAutoRange(ne,se),G.updateAngularAxis(ne,se),G.updateRadialAxis(ne,se),G.updateRadialAxisTitle(ne,se),G.xaxis=G.mockCartesianAxis(ne,se,{_id:"x",domain:ke}),G.yaxis=G.mockCartesianAxis(ne,se,{_id:"y",domain:_e});var $t=G.pathSubplot();G.clipPaths.forTraces.select("path").attr("d",$t).attr("transform",l(yt,gt)),X.frontplot.attr("transform",l(ve,le)).call(t.setClipUrl,G._hasClipOnAxisFalse?null:G.clipIds.forTraces,G.gd),X.bg.attr("d",$t).attr("transform",l(Xe,Ye)).call(e.fill,se.bgcolor)},j.mockAxis=function(ne,se,G,X){var K=E.extendFlat({},G,X);return o(K,se,ne),K},j.mockCartesianAxis=function(ne,se,G){var X=this,K=X.isSmith,H=G._id,Y=E.extendFlat({type:"linear"},G);a(Y,ne);var q={x:[0,2],y:[1,3]};return Y.setRange=function(){var Z=X.sectorBBox,ee=q[H],ae=X.radialAxis._rl,he=(ae[1]-ae[0])/(1-X.getHole(se));Y.range=[Z[ee[0]]*he,Z[ee[1]]*he]},Y.isPtWithinRange=H==="x"&&!K?function(Z){return X.isPtInside(Z)}:function(){return!0},Y.setRange(),Y.setScale(),Y},j.doAutoRange=function(ne,se){var G=this,X=G.gd,K=G.radialAxis,H=G.getRadial(se);s(X,K);var Y=K.range;if(H.range=Y.slice(),H._input.range=Y.slice(),K._rl=[K.r2l(Y[0],null,"gregorian"),K.r2l(Y[1],null,"gregorian")],K.minallowed!==void 0){var q=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],q):K._rl[0]=Math.max(K._rl[0],q)}if(K.maxallowed!==void 0){var Z=K.r2l(K.maxallowed);K._rl[0]90&&ae<=270&&(he.tickangle=180);var Me=we?function(Ae){var Be=I(G,A([Ae.x,0]));return l(Be[0]-q,Be[1]-Z)}:function(Ae){return l(he.l2p(Ae.x)+Y,0)},Se=we?function(Ae){return z(G,Ae.x,-1/0,1/0)}:function(Ae){return G.pathArc(he.r2p(Ae.x)+Y)},Ie=U(ee);if(G.radialTickLayout!==Ie&&(K["radial-axis"].selectAll(".xtick").remove(),G.radialTickLayout=Ie),xe){he.setScale();var Ve=0,Ge=we?(he.tickvals||[]).filter(function(Ae){return Ae>=0}).map(function(Ae){return r.tickText(he,Ae,!0,!1)}):r.calcTicks(he),ke=we?Ge:r.clipEnds(he,Ge),_e=r.getTickSigns(he)[2];we&&((he.ticks==="top"&&he.side==="bottom"||he.ticks==="bottom"&&he.side==="top")&&(_e=-_e),he.ticks==="top"&&he.side==="top"&&(Ve=-he.ticklen),he.ticks==="bottom"&&he.side==="bottom"&&(Ve=he.ticklen)),r.drawTicks(X,he,{vals:Ge,layer:K["radial-axis"],path:r.makeTickPath(he,0,_e),transFn:Me,crisp:!1}),r.drawGrid(X,he,{vals:ke,layer:K["radial-grid"],path:Se,transFn:E.noop,crisp:!1}),r.drawLabels(X,he,{vals:Ge,layer:K["radial-axis"],transFn:Me,labelFns:r.makeLabelFns(he,Ve)})}var ce=G.radialAxisAngle=G.vangles?F(Q(B(ee.angle),G.vangles)):ee.angle,ve=l(q,Z),le=ve+k(-ce);re(K["radial-axis"],xe&&(ee.showticklabels||ee.ticks),{transform:le}),re(K["radial-grid"],xe&&ee.showgrid,{transform:we?"":ve}),re(K["radial-line"].select("line"),xe&&ee.showline,{x1:we?-H:Y,y1:0,x2:H,y2:0,transform:le}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateRadialAxisTitle=function(ne,se,G){if(!this.isSmith){var X=this,K=X.gd,H=X.radius,Y=X.cx,q=X.cy,Z=X.getRadial(se),ee=X.id+"title",ae=0;if(Z.title){var he=t.bBox(X.layers["radial-axis"].node()).height,xe=Z.title.font.size,we=Z.side;ae=we==="top"?xe:we==="counterclockwise"?-(he+xe*.4):he+xe*.8}var Me=G!==void 0?G:X.radialAxisAngle,Se=B(Me),Ie=Math.cos(Se),Ve=Math.sin(Se),Ge=Y+H/2*Ie+ae*Ve,ke=q-H/2*Ve+ae*Ie;X.layers["radial-axis-title"]=v.draw(K,ee,{propContainer:Z,propName:X.id+".radialaxis.title.text",placeholder:O(K,"Click to enter radial axis title"),attributes:{x:Ge,y:ke,"text-anchor":"middle"},transform:{rotate:-Me}})}},j.updateAngularAxis=function(ne,se){var G=this,X=G.gd,K=G.layers,H=G.radius,Y=G.innerRadius,q=G.cx,Z=G.cy,ee=G.getAngular(se),ae=G.angularAxis,he=G.isSmith;he||(G.fillViewInitialKey("angularaxis.rotation",ee.rotation),ae.setGeometry(),ae.setScale());var xe=he?function(Be){var Xe=I(G,A([0,Be.x]));return Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2}:function(Be){return ae.t2g(Be.x)};ae.type==="linear"&&ae.thetaunit==="radians"&&(ae.tick0=F(ae.tick0),ae.dtick=F(ae.dtick));var we=function(Be){return l(q+H*Math.cos(Be),Z-H*Math.sin(Be))},Me=he?function(Be){var Xe=I(G,A([0,Be.x]));return l(Xe[0],Xe[1])}:function(Be){return we(xe(Be))},Se=he?function(Be){var Xe=I(G,A([0,Be.x])),Ye=Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2;return l(Xe[0],Xe[1])+k(-F(Ye))}:function(Be){var Xe=xe(Be);return we(Xe)+k(-F(Xe))},Ie=he?function(Be){return x(G,Be.x,0,1/0)}:function(Be){var Xe=xe(Be),Ye=Math.cos(Xe),yt=Math.sin(Xe);return"M"+[q+Y*Ye,Z-Y*yt]+"L"+[q+H*Ye,Z-H*yt]},Ve=r.makeLabelFns(ae,0),Ge=Ve.labelStandoff,ke={};ke.xFn=function(Be){var Xe=xe(Be);return Math.cos(Xe)*Ge},ke.yFn=function(Be){var Xe=xe(Be),Ye=Math.sin(Xe)>0?.2:1;return-Math.sin(Xe)*(Ge+Be.fontSize*Ye)+Math.abs(Math.cos(Xe))*(Be.fontSize*_)},ke.anchorFn=function(Be){var Xe=xe(Be),Ye=Math.cos(Xe);return Math.abs(Ye)<.1?"middle":Ye>0?"start":"end"},ke.heightFn=function(Be,Xe,Ye){var yt=xe(Be);return-.5*(1+Math.sin(yt))*Ye};var _e=U(ee);G.angularTickLayout!==_e&&(K["angular-axis"].selectAll("."+ae._id+"tick").remove(),G.angularTickLayout=_e);var ce=he?[1/0].concat(ae.tickvals||[]).map(function(Be){return r.tickText(ae,Be,!0,!1)}):r.calcTicks(ae);he&&(ce[0].text="\u221E",ce[0].fontSize*=1.75);var ve;if(se.gridshape==="linear"?(ve=ce.map(xe),E.angleDelta(ve[0],ve[1])<0&&(ve=ve.slice().reverse())):ve=null,G.vangles=ve,ae.type==="category"&&(ce=ce.filter(function(Be){return E.isAngleInsideSector(xe(Be),G.sectorInRad)})),ae.visible){var le=ae.ticks==="inside"?-1:1,Ae=(ae.linewidth||1)/2;r.drawTicks(X,ae,{vals:ce,layer:K["angular-axis"],path:"M"+le*Ae+",0h"+le*ae.ticklen,transFn:Se,crisp:!1}),r.drawGrid(X,ae,{vals:ce,layer:K["angular-grid"],path:Ie,transFn:E.noop,crisp:!1}),r.drawLabels(X,ae,{vals:ce,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Me,labelFns:ke})}re(K["angular-line"].select("path"),ee.showline,{d:G.pathSubplot(),transform:l(q,Z)}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateFx=function(ne,se){if(!this.gd._context.staticPlot){var G=!this.isSmith;G&&(this.updateAngularDrag(ne),this.updateRadialDrag(ne,se,0),this.updateRadialDrag(ne,se,1)),this.updateHoverAndMainDrag(ne)}},j.updateHoverAndMainDrag=function(ne){var se=this,G=se.isSmith,X=se.gd,K=se.layers,H=ne._zoomlayer,Y=T.MINZOOM,q=T.OFFEDGE,Z=se.radius,ee=se.innerRadius,ae=se.cx,he=se.cy,xe=se.cxx,we=se.cyy,Me=se.sectorInRad,Se=se.vangles,Ie=se.radialAxis,Ve=f.clampTiny,Ge=f.findXYatLength,ke=f.findEnclosingVertexAngles,_e=T.cornerHalfWidth,ce=T.cornerLen/2,ve,le,Ae=c.makeDragger(K,"path","maindrag",ne.dragmode===!1?"none":"crosshair");p.select(Ae).attr("d",se.pathSubplot()).attr("transform",l(ae,he)),Ae.onmousemove=function(qt){h.hover(X,qt,se.id),X._fullLayout._lasthover=Ae,X._fullLayout._hoversubplot=se.id},Ae.onmouseout=function(qt){X._dragging||m.unhover(X,qt)};var Be={element:Ae,gd:X,subplot:se.id,plotinfo:{id:se.id,xaxis:se.xaxis,yaxis:se.yaxis},xaxes:[se.xaxis],yaxes:[se.yaxis]},Xe,Ye,yt,gt,Tt,At,$t,rr,_r;function Xt(qt,Vt){return Math.sqrt(qt*qt+Vt*Vt)}function or(qt,Vt){return Xt(qt-xe,Vt-we)}function Ot(qt,Vt){return Math.atan2(we-Vt,qt-xe)}function vt(qt,Vt){return[qt*Math.cos(Vt),qt*Math.sin(-Vt)]}function ht(qt,Vt){if(qt===0)return se.pathSector(2*_e);var Ht=ce/qt,Sr=Vt-Ht,Kr=Vt+Ht,Yt=Math.max(0,Math.min(qt,Z)),Rt=Yt-_e,nr=Yt+_e;return"M"+vt(Rt,Sr)+"A"+[Rt,Rt]+" 0,0,0 "+vt(Rt,Kr)+"L"+vt(nr,Kr)+"A"+[nr,nr]+" 0,0,1 "+vt(nr,Sr)+"Z"}function De(qt,Vt,Ht){if(qt===0)return se.pathSector(2*_e);var Sr=vt(qt,Vt),Kr=vt(qt,Ht),Yt=Ve((Sr[0]+Kr[0])/2),Rt=Ve((Sr[1]+Kr[1])/2),nr,ur;if(Yt&&Rt){var cr=Rt/Yt,Rr=-1/cr,Qr=Ge(_e,cr,Yt,Rt);nr=Ge(ce,Rr,Qr[0][0],Qr[0][1]),ur=Ge(ce,Rr,Qr[1][0],Qr[1][1])}else{var Zr,ha;Rt?(Zr=ce,ha=_e):(Zr=_e,ha=ce),nr=[[Yt-Zr,Rt-ha],[Yt+Zr,Rt-ha]],ur=[[Yt-Zr,Rt+ha],[Yt+Zr,Rt+ha]]}return"M"+nr.join("L")+"L"+ur.reverse().join("L")+"Z"}function Ne(){yt=null,gt=null,Tt=se.pathSubplot(),At=!1;var qt=X._fullLayout[se.id];$t=e.luminosity(qt.bgcolor),rr=c.makeZoombox(H,$t,ae,he,Tt),rr.attr("fill-rule","evenodd"),_r=c.makeCorners(H,ae,he),w(X)}function We(qt,Vt){return Vt=Math.max(Math.min(Vt,Z),ee),qtY?(qt-1&&qt===1&&i(Vt,X,[se.xaxis],[se.yaxis],se.id,Be),Ht.indexOf("event")>-1&&h.click(X,Vt,se.id)}Be.prepFn=function(qt,Vt,Ht){var Sr=X._fullLayout.dragmode,Kr=Ae.getBoundingClientRect();X._fullLayout._calcInverseTransform(X);var Yt=X._fullLayout._invTransform;ve=X._fullLayout._invScaleX,le=X._fullLayout._invScaleY;var Rt=E.apply3DTransform(Yt)(Vt-Kr.left,Ht-Kr.top);if(Xe=Rt[0],Ye=Rt[1],Se){var nr=f.findPolygonOffset(Z,Me[0],Me[1],Se);Xe+=xe+nr[0],Ye+=we+nr[1]}switch(Sr){case"zoom":Be.clickFn=Ct,G||(Se?Be.moveFn=Mt:Be.moveFn=Je,Be.doneFn=pt,Ne(qt,Vt,Ht));break;case"select":case"lasso":g(qt,Vt,Ht,Be,Sr);break}},m.init(Be)},j.updateRadialDrag=function(ne,se,G){var X=this,K=X.gd,H=X.layers,Y=X.radius,q=X.innerRadius,Z=X.cx,ee=X.cy,ae=X.radialAxis,he=T.radialDragBoxSize,xe=he/2;if(!ae.visible)return;var we=B(X.radialAxisAngle),Me=ae._rl,Se=Me[0],Ie=Me[1],Ve=Me[G],Ge=.75*(Me[1]-Me[0])/(1-X.getHole(se))/Y,ke,_e,ce;G?(ke=Z+(Y+xe)*Math.cos(we),_e=ee-(Y+xe)*Math.sin(we),ce="radialdrag"):(ke=Z+(q-xe)*Math.cos(we),_e=ee-(q-xe)*Math.sin(we),ce="radialdrag-inner");var ve=c.makeRectDragger(H,ce,"crosshair",-xe,-xe,he,he),le={element:ve,gd:K};ne.dragmode===!1&&(le.dragmode=!1),re(p.select(ve),ae.visible&&q0!=(G?Xe>Se:Xe=90||K>90&&H>=450?we=1:q<=0&&ee<=0?we=0:we=Math.max(q,ee),K<=180&&H>=180||K>180&&H>=540?ae=-1:Y>=0&&Z>=0?ae=0:ae=Math.min(Y,Z),K<=270&&H>=270||K>270&&H>=630?he=-1:q>=0&&ee>=0?he=0:he=Math.min(q,ee),H>=360?xe=1:Y<=0&&Z<=0?xe=0:xe=Math.max(Y,Z),[ae,he,xe,we]}function Q(ne,se){var G=function(K){return E.angleDist(ne,K)},X=E.findIndexOfMin(se,G);return se[X]}function re(ne,se,G){return se?(ne.attr("display",null),ne.attr(G)):ne&&ne.attr("display","none"),ne}}}),n4=ze({"src/plots/polar/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,ticklabelstep:b.ticklabelstep,showticklabels:b.showticklabels,labelalias:b.labelalias,minorloglabels:b.minorloglabels,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickfont:b.tickfont,tickangle:b.tickangle,tickformat:b.tickformat,tickformatstops:b.tickformatstops,layer:b.layer},"plot","from-root"),n={visible:k({},b.visible,{dflt:!0}),type:k({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},autorange:k({},b.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:k({},b.minallowed,{editType:"plot"}),maxallowed:k({},b.maxallowed,{editType:"plot"}),range:k({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:b.categoryorder,categoryarray:b.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:b.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:k({},b.title.text,{editType:"plot",dflt:""}),font:k({},b.title.font,{editType:"plot"}),editType:"plot"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(n,e,t);var r={visible:k({},b.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:b.autotypenumbers,categoryorder:b.categoryorder,categoryarray:b.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:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(r,e,t),V.exports={domain:E({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:p.background},radialaxis:n,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),qG=ze({"src/plots/polar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=Uv(),t=Ym(),n=ov(),r=sv(),a=Hx(),o=g1(),s=Jw(),c=Xm(),m=n4(),h=t4(),v=X2(),g=v.axisNames;function i(S,M,C,_){var T=C("bgcolor");_.bgColor=b.combine(T,_.paper_bgcolor);var f=C("sector");C("hole");var u=l(_.fullData,v.name,_.id),A=_.layoutOut,x;function z(xe,we){return C(x+"."+xe,we)}for(var I=0;I")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),HG=ze({"src/traces/scatterpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:$2(),categories:["polar","symbols","showLegend","scatter-like"],attributes:uy(),supplyDefaults:K2().supplyDefaults,colorbar:Of(),formatLabels:J2(),calc:VG(),plot:GG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:Q2().hoverPoints,selectPoints:Yv(),meta:{}}}}),WG=ze({"lib/scatterpolar.js"(J,V){"use strict";V.exports=HG()}}),i4=ze({"src/traces/scatterpolargl/attributes.js"(J,V){"use strict";var p=uy(),{cliponaxis:b,hoveron:E}=p,k=Lo(p,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:n},fill:r,fillcolor:a,marker:o,textfont:s,textposition:c}=ty();V.exports=lo(Li({},k),{connectgaps:l,fill:r,fillcolor:a,line:{color:e,dash:t,editType:"calc",width:n},marker:o,textfont:s,textposition:c})}}),YG=ze({"src/traces/scatterpolargl/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=K2().handleRThetaDefaults,k=id(),l=_d(),e=xd(),t=Od(),n=zd().PTS_LINESONLY,r=i4();V.exports=function(o,s,c,m){function h(g,i){return p.coerce(o,s,r,g,i)}var v=E(o,s,m,h);if(!v){s.visible=!1;return}h("thetaunit"),h("mode",v=t&&(_.marker.cluster=w.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=A),_.line&&A.length>1&&e.extendFlat(_.line,l.linePositions(a,i,A)),_.text&&(e.extendFlat(_.text,{positions:A},l.textPosition(a,i,_.text,_.marker)),e.extendFlat(_.textSel,{positions:A},l.textPosition(a,i,_.text,_.markerSel)),e.extendFlat(_.textUnsel,{positions:A},l.textPosition(a,i,_.text,_.markerUnsel))),_.fill&&!h.fill2d&&(h.fill2d=!0),_.marker&&!h.scatter2d&&(h.scatter2d=!0),_.line&&!h.line2d&&(h.line2d=!0),_.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(_.line),h.fillOptions.push(_.fill),h.markerOptions.push(_.marker),h.markerSelectedOptions.push(_.markerSel),h.markerUnselectedOptions.push(_.markerUnsel),h.textOptions.push(_.text),h.textSelectedOptions.push(_.textSel),h.textUnselectedOptions.push(_.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),w.x=x,w.y=z,w.rawx=x,w.rawy=z,w.r=M,w.theta=C,w.positions=A,w._scene=h,w.index=h.count,h.count++}}),E(a,o,s)}},V.exports.reglPrecompiled=n}}),QG=ze({"src/traces/scatterpolargl/index.js"(J,V){"use strict";var p=KG();p.plot=JG(),V.exports=p}}),eH=ze({"lib/scatterpolargl.js"(J,V){"use strict";V.exports=QG()}}),o4=ze({"src/traces/barpolar/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,templatefallbackAttrs:b}=xs(),E=Ki().extendFlat,k=uy(),l=jd();V.exports={r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,base:E({},l.base,{}),offset:E({},l.offset,{}),width:E({},l.width,{}),text:E({},l.text,{}),hovertext:E({},l.hovertext,{}),marker:e(),hoverinfo:k.hoverinfo,hovertemplate:p(),hovertemplatefallback:b(),selected:l.selected,unselected:l.unselected};function e(){var t=E({},l.marker);return delete t.cornerradius,t}}}),s4=ze({"src/traces/barpolar/layout_attributes.js"(J,V){"use strict";V.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),tH=ze({"src/traces/barpolar/defaults.js"(J,V){"use strict";var p=Nr(),b=K2().handleRThetaDefaults,E=eb(),k=o4();V.exports=function(e,t,n,r){function a(s,c){return p.coerce(e,t,k,s,c)}var o=b(e,t,r,a);if(!o){t.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),E(e,t,a,n,r),p.coerceSelectionMarkerOpacity(t,a)}}}),rH=ze({"src/traces/barpolar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=s4();V.exports=function(E,k,l){var e={},t;function n(o,s){return p.coerce(E[t]||{},k[t],b,o,s)}for(var r=0;r0?(m=s,h=c):(m=c,h=s);var v=l.findEnclosingVertexAngles(m,t.vangles)[0],g=l.findEnclosingVertexAngles(h,t.vangles)[1],i=[v,(m+h)/2,g];return l.pathPolygonAnnulus(a,o,m,h,i,n,r)}:function(a,o,s,c){return E.pathAnnulus(a,o,s,c,n,r)}}}}),nH=ze({"src/traces/barpolar/hover.js"(J,V){"use strict";var p=Zl(),b=Nr(),E=eg().getTraceColor,k=b.fillText,l=Q2().makeHoverPointText,e=Z2().isPtInsidePolygon;V.exports=function(n,r,a){var o=n.cd,s=o[0].trace,c=n.subplot,m=c.radialAxis,h=c.angularAxis,v=c.vangles,g=v?e:b.isPtInsideSector,i=n.maxHoverDistance,w=h._period||2*Math.PI,S=Math.abs(m.g2p(Math.sqrt(r*r+a*a))),M=Math.atan2(a,r);m.range[0]>m.range[1]&&(M+=Math.PI);var C=function(u){return g(S,M,[u.rp0,u.rp1],[u.thetag0,u.thetag1],v)?i+Math.min(1,Math.abs(u.thetag1-u.thetag0)/w)-1+(u.rp1-S)/(u.rp1-u.rp0)-1:1/0};if(p.getClosest(o,C,n),n.index!==!1){var _=n.index,T=o[_];n.x0=n.x1=T.ct[0],n.y0=n.y1=T.ct[1];var f=b.extendFlat({},T,{r:T.s,theta:T.p});return k(T,s,n),l(f,s,c,n),n.hovertemplate=s.hovertemplate,n.color=E(s,T),n.xLabelVal=n.yLabelVal=void 0,T.s<0&&(n.idealAlign="left"),[n]}}}}),iH=ze({"src/traces/barpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"barpolar",basePlotModule:$2(),categories:["polar","bar","showLegend"],attributes:o4(),layoutAttributes:s4(),supplyDefaults:tH(),supplyLayoutDefaults:rH(),calc:l4().calc,crossTraceCalc:l4().crossTraceCalc,plot:aH(),colorbar:Of(),formatLabels:J2(),style:ld().style,styleOnSelect:ld().styleOnSelect,hoverPoints:nH(),selectPoints:tg(),meta:{}}}}),oH=ze({"lib/barpolar.js"(J,V){"use strict";V.exports=iH()}}),u4=ze({"src/plots/smith/constants.js"(J,V){"use strict";V.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),c4=ze({"src/plots/smith/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({ticklen:b.ticklen,tickwidth:k({},b.tickwidth,{dflt:2}),tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,tickfont:b.tickfont,tickformat:b.tickformat,hoverformat:b.hoverformat,layer:b.layer},"plot","from-root"),n=k({visible:k({},b.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:k({},b.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=k({visible:k({},b.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:b.ticks,editType:"calc"},e,t);V.exports={domain:E({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:p.background},realaxis:n,imaginaryaxis:r,editType:"calc"}}}),sH=ze({"src/plots/smith/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=sv(),t=ov(),n=g1(),r=Dd(),a=c4(),o=u4(),s=o.axisNames,c=h(function(v){return p.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(g){return-g}).concat([0]).concat(v)},String);function m(v,g,i,w){var S=i("bgcolor");w.bgColor=b.combine(S,w.paper_bgcolor);var M=l(w.fullData,o.name,w.id),C=w.layoutOut,_;function T(U,$){return i(_+"."+U,$)}for(var f=0;f")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),pH=ze({"src/traces/scattersmith/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scattersmith",basePlotModule:lH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:f4(),supplyDefaults:uH(),colorbar:Of(),formatLabels:cH(),calc:fH(),plot:hH(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:dH().hoverPoints,selectPoints:Yv(),meta:{}}}}),vH=ze({"lib/scattersmith.js"(J,V){"use strict";V.exports=pH()}}),h4=ze({"src/traces/quiver/attributes.js"(J,V){"use strict";var p=ws(),b=xs().hovertemplateAttrs,E=Il().axisHoverFormat,k=Ki().extendFlat,l=qs(),e=Uc().dash,t=fv(),n=su(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:n.x0,dx:n.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:n.y0,dy:n.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:E("x"),yhoverformat:E("y"),uhoverformat:E("u","noDate"),vhoverformat:E("v","noDate"),hoverinfo:k({},p.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:b({},{keys:["x","y","u","v","text","name"]}),text:n.text,textposition:n.textposition,textfont:n.textfont,marker:k({arrowsize:k({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};V.exports=r}}),mH=ze({"src/traces/quiver/defaults.js"(J,V){"use strict";var p=Nr(),b=h4(),E=Gv(),k=Bf().hasColorscale,l=qc();V.exports=function(t,n,r,a){function o(S,M){return p.coerce(t,n,b,S,M)}var s=E(t,n,a,o);if(!s){n.visible=!1;return}var c=o("u"),m=o("v");if(!p.isArrayOrTypedArray(c)||c.length===0){n.u=new Array(s);for(var h=0;hO&&(O=c[Q]),m[Q]B&&(B=m[Q]),GP&&(P=G),XU&&(U=X);var K=Math.sqrt(G*G+X*X);if(K>i&&(i=K),KS&&(S=H))}}else re.x=k,re.y=k}if(a._maxNorm=i,u==="scaled"||A==="paper"){let Me=O-I,Se=B-D;var Y;Me===0&&Se===0?Y=1:Y=(Me+Se+Math.sqrt((Me-Se)*(Me-Se)+4*$*Me*Se))/(2*($-1)),Y*=t,a._scaleFactor=Y/a._maxNorm}else a._scaleFactor=1;a._scaleFactor*=a.lengthfactor;let q=new Array(h),Z=new Array(h),ee=new Array(h),ae=new Array(h);for(var he,xe,Q=0;Qm.i&&isFinite(h[m.i]))v=h[m.i];else{var g=o.u&&o.u[m.i]||0,i=o.v&&o.v[m.i]||0;v=Math.sqrt(g*g+i*i)}return c(v)})}function t(a){var o=p.select(a).selectAll("g.trace.quiver");o.each(function(s){r(a,s,p.select(this))})}function n(a,o,s){r(a,o,s)}function r(a,o,s){var c=o[0].trace,m=c.marker||{},h=m.line||{},v=b.isArrayOrTypedArray(m.color)?void 0:m.color,g=c._hasColorscale;if(s)if(c.selectedpoints){var i=(c.selected||{}).marker||{},w=(c.unselected||{}).marker||{},S=i.line||{},M=w.line||{};s.selectAll("path.js-line").each(function(_){var T=p.select(this),f=!_.selected,u=f?w.color:i.color,A=f?M.width!==void 0?M.width:h.width:S.width!==void 0?S.width:h.width;u?(E.lineGroupStyle(T,A,u,h.dash),T.style("stroke-opacity",1)):(E.lineGroupStyle(T,A,v,h.dash),g&&e(T,c),T.style("stroke-opacity",f?l:1))}),E.selectedTextStyle(s.selectAll("text"),c)}else{var C=s.selectAll("path.js-line");C.call(E.lineGroupStyle,h.width,v,h.dash),g&&e(C,c),C.style("stroke-opacity",1),E.textPointStyle(s.selectAll("text"),c,a)}}V.exports={style:t,styleOnSelect:n,colorscaleStroke:e}}}),_H=ze({"src/traces/quiver/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=$i(),k=e3().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,n=.7;V.exports=function(o,s,c,m,h,v){var g,i,w=!h,S=!!h&&h.duration>0;if(g=m.selectAll("g.trace").data(c,function(C){return C[0].trace.uid}),g.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),g.order(),S){v&&(i=v());var M=p.transition().duration(h.duration).ease(h.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()});M.each(function(){m.selectAll("g.trace").each(function(C,_){r(o,_,s,C,c,this,h)})})}else g.each(function(C,_){r(o,_,s,C,c,this,h)});w&&g.exit().remove()};function r(a,o,s,c,m,h,v){var g=c[0].trace,i=s.xaxis,w=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=p.select(h);var S=p.select(h).selectAll("g.lines").data([c]);S.enter().append("g").classed("lines",!0),E.setClipUrl(S,s.layerClipId,a);var M=S.selectAll("path.js-line").data(c);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:_=0,arrowref:T}=g,f=T==="paper"?g._scaleFactor*Math.sqrt(Math.abs(i._m*w._m)):g._scaleFactor,u=g.marker.arrowsize;M.each(function(B){let F=p.select(this);if(B.x===void 0||B.y===void 0){F.attr("d",null);return}let P=(T==="paper"?B._u*Math.sign(i._m):p.round(i._m*B._u))*f,j=(T==="paper"?B._v*Math.sign(w._m):p.round(w._m*B._v))*f,U=(g._input.marker||{}).arrowsize!==void 0;var $,Q,re,ne;C==="tip"?($=i.c2p(B.x)-P,re=w.c2p(B.y)-j,Q=i.c2p(B.x),ne=w.c2p(B.y)):C==="center"?($=i.c2p(B.x)-P/2,re=w.c2p(B.y)-j/2,Q=i.c2p(B.x)+P/2,ne=w.c2p(B.y)+j/2):($=i.c2p(B.x),re=w.c2p(B.y),Q=i.c2p(B.x)+P,ne=w.c2p(B.y)+j),B._px0=$,B._py0=re,B._px1=Q,B._py1=ne;var se=g.marker.line.width;U||(se=Math.max(se,t));let G=Math.sqrt((Q-$)*(Q-$)+(ne-re)*(ne-re)),X=n*G,K=Math.min(e*u*se,X),H=Math.atan2(ne-re,Q-$),Y=Q-K*Math.cos(H-l),q=ne-K*Math.sin(H-l),Z=Q-K*Math.cos(H+l),ee=ne-K*Math.sin(H+l),ae="M"+$+","+re+"L"+Q+","+ne+"L"+Y+","+q+"L"+Q+","+ne+"L"+Z+","+ee;F.attr("d",ae)});var A=g.marker||{},x=A.line||{},z=b.isArrayOrTypedArray(A.color)?void 0:A.color;E.lineGroupStyle(M,x.width,z,x.dash),g._hasColorscale&&k(M,g);var I=p.select(h).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),E.setClipUrl(I,s.layerClipId,a);var O=I.selectAll("g.textpoint").data(c);if(O.enter().append("g").classed("textpoint",!0).append("text"),O.exit().remove(),O.each(function(B){var F=p.select(this),P=E.translatePoint(B,F.select("text"),i,w);P||F.remove()}),O.selectAll("text").call(E.textPointStyle,g,a).each(function(B){var F=i.c2p(B.x),P=w.c2p(B.y);p.select(this).selectAll("tspan.line").each(function(){p.select(this).attr({x:F,y:P})})}),v&&v.duration>0){var D=p.transition().duration(v.duration).ease(v.easing);M.transition(D).style("opacity",1)}}}}),xH=ze({"src/traces/quiver/hover.js"(J,V){"use strict";var p=Nr(),b=Zl(),E=Jm();function k(l,e,t,n,r,a){let o=r-t,s=a-n,c=o*o+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-n)*(e-n));var m=((l-t)*o+(e-n)*s)/c;m=Math.max(0,Math.min(1,m));let h=t+m*o,v=n+m*s;return Math.sqrt((l-h)*(l-h)+(e-v)*(e-v))}V.exports=function(e,t,n,r){var a=e.cd,o=a[0].trace,s=e.xa,c=e.ya,m=s.c2p(t),h=c.c2p(n),v=function(T){return T._px0===void 0?1/0:k(m,h,T._px0,T._py0,T._px1,T._py1)};if(b.getClosest(a,v,e),e.index!==!1){var g=a[e.index],i=s.c2p(g.x,!0),w=c.c2p(g.y,!0),S=Math.sqrt((m-i)*(m-i)+(h-w)*(h-w));e.index=g.i;var M=o.u?o.u[g.i]:0,C=o.v?o.v[g.i]:0,_="u: "+M+", v: "+C;return p.extendFlat(e,{color:E(o,g),x0:i-3,x1:i+3,xLabelVal:g.x,y0:w-3,y1:w+3,yLabelVal:g.y,uLabelVal:M,vLabelVal:C,extraText:_,spikeDistance:S,hovertemplate:o.hovertemplate}),p.fillText(g,o,e),[e]}}}}),bH=ze({"src/traces/quiver/format_labels.js"(J,V){"use strict";var p=Gi(),b=Nr();V.exports=function(k,l,e){var t={},n={_fullLayout:e},r=p.getFromTrace(n,l,"x"),a=p.getFromTrace(n,l,"y"),o=k.x,s=k.y;t.xLabel=p.tickText(r,r.c2l(o),!0).text,t.yLabel=p.tickText(a,a.c2l(s),!0).text;var c=l.u?l.u[k.i]:0,m=l.v?l.v[k.i]:0,h=l.uhoverformat,v=l.vhoverformat;return t.uLabel=h?b.numberFormat(h)(c):String(c),t.vLabel=v?b.numberFormat(v)(m):String(m),t}}}),wH=ze({"src/traces/quiver/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){return b.x=E.x,b.y=E.y,b.u=k.u?k.u[e]:void 0,b.v=k.v?k.v[e]:void 0,b}}}),TH=ze({"src/traces/quiver/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"quiver",basePlotModule:Du(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:h4(),supplyDefaults:mH(),calc:gH(),crossTraceCalc:yH(),plot:_H(),style:e3().style,styleOnSelect:e3().styleOnSelect,hoverPoints:xH(),formatLabels:bH(),eventData:wH(),selectPoints:Yv(),colorbar:Of(),animatable:!0,meta:{}}}}),AH=ze({"lib/quiver.js"(J,V){"use strict";V.exports=TH()}}),th=ze({"node_modules/world-calendars/dist/main.js"(J,V){var p=Vc();function b(){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={}}p(b.prototype,{instance:function(n,r){n=(n||"gregorian").toLowerCase(),r=r||"";var a=this._localCals[n+"-"+r];if(!a&&this.calendars[n]&&(a=new this.calendars[n](r),this._localCals[n+"-"+r]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,n);return a},newDate:function(n,r,a,o,s){return o=(n!=null&&n.year?n.calendar():typeof o=="string"?this.instance(o,s):o)||this.instance(),o.newDate(n,r,a)},substituteDigits:function(n){return function(r){return(r+"").replace(/[0-9]/g,function(a){return n[a]})}},substituteChineseDigits:function(n,r){return function(a){for(var o="",s=0;a>0;){var c=a%10;o=(c===0?"":n[c]+r[s])+o,s++,a=Math.floor(a/10)}return o.indexOf(n[1]+r[1])===0&&(o=o.substr(1)),o||n[0]}}});function E(n,r,a,o){if(this._calendar=n,this._year=r,this._month=a,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function k(n,r){return n=""+n,"000000".substring(0,r-n.length)+n}p(E.prototype,{newDate:function(n,r,a){return this._calendar.newDate(n??this,r,a)},year:function(n){return arguments.length===0?this._year:this.set(n,"y")},month:function(n){return arguments.length===0?this._month:this.set(n,"m")},day:function(n){return arguments.length===0?this._day:this.set(n,"d")},date:function(n,r,a){if(!this._calendar.isValid(n,r,a))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=n,this._month=r,this._day=a,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(n,r){return this._calendar.add(this,n,r)},set:function(n,r){return this._calendar.set(this,n,r)},compareTo:function(n){if(this._calendar.name!==n._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,n._calendar.local.name);var r=this._year!==n._year?this._year-n._year:this._month!==n._month?this.monthOfYear()-n.monthOfYear():this._day-n._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(n){return this._calendar.fromJD(n)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(n){return this._calendar.fromJSDate(n)},toString:function(){return(this.year()<0?"-":"")+k(Math.abs(this.year()),4)+"-"+k(this.month(),2)+"-"+k(this.day(),2)}});function l(){this.shortYearCutoff="+10"}p(l.prototype,{_validateLevel:0,newDate:function(n,r,a){return n==null?this.today():(n.year&&(this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),a=n.day(),r=n.month(),n=n.year()),new E(this,n,r,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+k(Math.abs(r.year()),4)},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(n,r){var a=this._validate(n,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(n,r){var a=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(n)+this.minMonth;return this._validate(n,a,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),a},daysInYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(n,r,a){return this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(n,r,a){return this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(n,this._add(n,r,a),r,a)},_add:function(n,r,a){if(this._validateLevel++,a==="d"||a==="w"){var o=n.toJD()+r*(a==="w"?this.daysInWeek():1),s=n.calendar().fromJD(o);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=n.year()+(a==="y"?r:0),m=n.monthOfYear()+(a==="m"?r:0),s=n.day(),h=function(i){for(;mw-1+i.minMonth;)c++,m-=w,w=i.monthsInYear(c)};a==="y"?(n.month()!==this.fromMonthOfYear(c,m)&&(m=this.newDate(c,n.month(),this.minDay).monthOfYear()),m=Math.min(m,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m)))):a==="m"&&(h(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m))));var v=[c,this.fromMonthOfYear(c,m),s];return this._validateLevel--,v}catch(g){throw this._validateLevel--,g}},_correctAdd:function(n,r,a,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(r[0]===0||n.year()>0!=r[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"]}[o],c=a<0?-1:1;r=this._add(n,a*s[0]+c*s[1],s[2])}return n.date(r[0],r[1],r[2])},set:function(n,r,a){this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var o=a==="y"?r:n.year(),s=a==="m"?r:n.month(),c=a==="d"?r:n.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(o,s))),n.date(o,s,c)},isValid:function(n,r,a){this._validateLevel++;var o=this.hasYearZero||n!==0;if(o){var s=this.newDate(n,r,this.minDay);o=r>=this.minMonth&&r-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),g=s-(v>2.5?4716:4715);return g<=0&&g--,this.newDate(g,v,h)},toJSDate:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(o.year(),o.month()-1,o.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(n){return this.newDate(n.getFullYear(),n.getMonth()+1,n.getDate())}});var t=V.exports=new b;t.cdate=E,t.baseCalendar=l,t.calendars.gregorian=e}}),MH=ze({"node_modules/world-calendars/dist/plus.js"(){var J=Vc(),V=th();J(V.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),V.local=V.regionalOptions[""],J(V.cdate.prototype,{formatDate:function(p,b){return typeof p!="string"&&(b=p,p=""),this._calendar.formatDate(p||"",this,b)}}),J(V.baseCalendar.prototype,{UNIX_EPOCH:V.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:V.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(p,b,E){if(typeof p!="string"&&(E=b,b=p,p=""),!b)return"";if(b.calendar()!==this)throw V.local.invalidFormat||V.regionalOptions[""].invalidFormat;p=p||this.local.dateFormat,E=E||{};for(var k=E.dayNamesShort||this.local.dayNamesShort,l=E.dayNames||this.local.dayNames,e=E.monthNumbers||this.local.monthNumbers,t=E.monthNamesShort||this.local.monthNamesShort,n=E.monthNames||this.local.monthNames,r=E.calculateWeek||this.local.calculateWeek,a=function(M,C){for(var _=1;S+_1},o=function(M,C,_,T){var f=""+C;if(a(M,T))for(;f.length<_;)f="0"+f;return f},s=function(M,C,_,T){return a(M)?T[C]:_[C]},c=this,m=function(M){return typeof e=="function"?e.call(c,M,a("m")):g(o("m",M.month(),2))},h=function(M,C){return C?typeof n=="function"?n.call(c,M):n[M.month()-c.minMonth]:typeof t=="function"?t.call(c,M):t[M.month()-c.minMonth]},v=this.local.digits,g=function(M){return E.localNumbers&&v?v(M):M},i="",w=!1,S=0;S1},w=function(z,I){var O=i(z,I),D=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],B=new RegExp("^-?\\d{1,"+D+"}"),F=b.substring(f).match(B);if(!F)throw(V.local.missingNumberAt||V.regionalOptions[""].missingNumberAt).replace(/\{0\}/,f);return f+=F[0].length,parseInt(F[0],10)},S=this,M=function(){if(typeof n=="function"){i("m");var z=n.call(S,b.substring(f));return f+=z.length,z}return w("m")},C=function(z,I,O,D){for(var B=i(z,D)?O:I,F=0;F-1){c=1,m=h;for(var x=this.daysInMonth(s,c);m>x;x=this.daysInMonth(s,c))c++,m-=x}return o>-1?this.fromJD(o):this.newDate(s,c,m)},determineDate:function(p,b,E,k,l){E&&typeof E!="object"&&(l=k,k=E,E=null),typeof k!="string"&&(l=k,k="");var e=this,t=function(n){try{return e.parseDate(k,n,l)}catch{}n=n.toLowerCase();for(var r=(n.match(/^c/)&&E?E.newDate():null)||e.today(),a=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=a.exec(n);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=a.exec(n);return r};return b=b?b.newDate():null,p=p==null?b:typeof p=="string"?t(p):typeof p=="number"?isNaN(p)||p===1/0||p===-1/0?b:e.today().add(p,"d"):e.newDate(p),p}})}}),SH=ze({"node_modules/world-calendars/dist/calendars/chinese.js"(){var J=th(),V=Vc(),p=J.instance();function b(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,s){if(typeof o=="string"){var c=o.match(k);return c?c[0]:""}var m=this._validateYear(o),h=o.month(),v=""+this.toChineseMonth(m,h);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(m,h)&&(v+="i"),v},monthNames:function(o){if(typeof o=="string"){var s=o.match(l);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),v=["\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"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},monthNamesShort:function(o){if(typeof o=="string"){var s=o.match(e);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),v=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},parseMonth:function(o,s){o=this._validateYear(o);var c=parseInt(s),m;if(isNaN(c))s[0]==="\u95F0"&&(m=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var h=s[s.length-1];m=h==="i"||h==="I"}var v=this.toMonthIndex(o,c,m);return v},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(o,s){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw s.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,s,c){var m=this.intercalaryMonth(o),h=c&&s!==m;if(h||s<1||s>12)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return m?!c&&s<=m?v=s-1:v=s:v=s-1,v},toChineseMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o),m=c?12:11;if(s<0||s>m)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var h;return c?s>13;return c},isIntercalaryMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o);return!!c&&c===s},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,s,c){var m=this._validateYear(o,J.local.invalidyear),h=n[m-n[0]],v=h>>9&4095,g=h>>5&15,i=h&31,w;w=p.newDate(v,g,i),w.add(4-(w.dayOfWeek()||7),"d");var S=this.toJD(o,s,c)-w.toJD();return 1+Math.floor(S/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,s){o.year&&(s=o.month(),o=o.year()),o=this._validateYear(o);var c=t[o-t[0]],m=c>>13,h=m?12:11;if(s>h)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=c&1<<12-s?30:29;return v},weekDay:function(o,s,c){return(this.dayOfWeek(o,s,c)||7)<6},toJD:function(o,s,c){var m=this._validate(o,v,c,J.local.invalidDate);o=this._validateYear(m.year()),s=m.month(),c=m.day();var h=this.isIntercalaryMonth(o,s),v=this.toChineseMonth(o,s),g=a(o,v,c,h);return p.toJD(g.year,g.month,g.day)},fromJD:function(o){var s=p.fromJD(o),c=r(s.year(),s.month(),s.day()),m=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,m,c.day)},fromString:function(o){var s=o.match(E),c=this._validateYear(+s[1]),m=+s[2],h=!!s[3],v=this.toMonthIndex(c,m,h),g=+s[4];return this.newDate(c,v,g)},add:function(o,s,c){var m=o.year(),h=o.month(),v=this.isIntercalaryMonth(m,h),g=this.toChineseMonth(m,h),i=Object.getPrototypeOf(b.prototype).add.call(this,o,s,c);if(c==="y"){var w=i.year(),S=i.month(),M=this.isIntercalaryMonth(w,g),C=v&&M?this.toMonthIndex(w,g,!0):this.toMonthIndex(w,g,!1);C!==S&&i.month(C)}return i}});var E=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,k=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;J.calendars.chinese=b;var t=[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],n=[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 r(o,s,c,m){var h,v;if(typeof o=="object")h=o,v=s||{};else{var g=typeof o=="number"&&o>=1888&&o<=2111;if(!g)throw new Error("Solar year outside range 1888-2111");var i=typeof s=="number"&&s>=1&&s<=12;if(!i)throw new Error("Solar month outside range 1 - 12");var w=typeof c=="number"&&c>=1&&c<=31;if(!w)throw new Error("Solar day outside range 1 - 31");h={year:o,month:s,day:c},v=m||{}}var S=n[h.year-n[0]],M=h.year<<9|h.month<<5|h.day;v.year=M>=S?h.year:h.year-1,S=n[v.year-n[0]];var C=S>>9&4095,_=S>>5&15,T=S&31,f,u=new Date(C,_-1,T),A=new Date(h.year,h.month-1,h.day);f=Math.round((A-u)/(24*3600*1e3));var x=t[v.year-t[0]],z;for(z=0;z<13;z++){var I=x&1<<12-z?30:29;if(f>13;return!O||z=1888&&o<=2111;if(!i)throw new Error("Lunar year outside range 1888-2111");var w=typeof s=="number"&&s>=1&&s<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var S=typeof c=="number"&&c>=1&&c<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var M;typeof m=="object"?(M=!1,v=m):(M=!!m,v=h||{}),g={year:o,month:s,day:c,isIntercalary:M}}var C;C=g.day-1;var _=t[g.year-t[0]],T=_>>13,f;T&&(g.month>T||g.isIntercalary)?f=g.month:f=g.month-1;for(var u=0;u>9&4095,I=x>>5&15,O=x&31,D=new Date(z,I-1,O+C);return v.year=D.getFullYear(),v.month=1+D.getMonth(),v.day=D.getDate(),v}}}),EH=ze({"node_modules/world-calendars/dist/calendars/coptic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.coptic=p}}),kH=ze({"node_modules/world-calendars/dist/calendars/discworld.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),!1},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),13},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),400},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return(e.day()+1)%8},weekDay:function(E,k,l){var e=this.dayOfWeek(E,k,l);return e>=2&&e<=6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{century:b[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return E=e.year()+(e.year()<0?1:0),k=e.month(),l=e.day(),l+(k>1?16:0)+(k>2?(k-2)*32:0)+(E-1)*400+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E+.5)-Math.floor(this.jdEpoch)-1;var k=Math.floor(E/400)+1;E-=(k-1)*400,E+=E>15?16:0;var l=Math.floor(E/32)+1,e=E-(l-1)*32+1;return this.newDate(k<=0?k-1:k,l,e)}});var b={20:"Fruitbat",21:"Anchovy"};J.calendars.discworld=p}}),CH=ze({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.ethiopian=p}}),LH=ze({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this._leapYear(k.year())},_leapYear:function(E){return E=E<0?E+1:E,b(E*7+1,19)<7},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),this._leapYear(E.year?E.year():E)?13:12},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return E=k.year(),this.toJD(E===-1?1:E+1,7,1)-this.toJD(E,7,1)},daysInMonth:function(E,k){return E.year&&(k=E.month(),E=E.year()),this._validate(E,k,this.minDay,J.local.invalidMonth),k===12&&this.leapYear(E)||k===8&&b(this.daysInYear(E),10)===5?30:k===9&&b(this.daysInYear(E),10)===3?29:this.daysPerMonth[k-1]},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=E<=0?E+1:E,n=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(k<7){for(var r=7;r<=this.monthsInYear(E);r++)n+=this.daysInMonth(E,r);for(var r=1;r=this.toJD(k===-1?1:k+1,7,1);)k++;for(var l=Ethis.toJD(k,l,this.daysInMonth(k,l));)l++;var e=E-this.toJD(k,l,1)+1;return this.newDate(k,l,e)}});function b(E,k){return E-k*Math.floor(E/k)}J.calendars.hebrew=p}}),PH=ze({"node_modules/world-calendars/dist/calendars/islamic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);return(E.year()*11+14)%30<11},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){return this.leapYear(b)?355:354},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===12&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==5},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b=b<=0?b+1:b,k+Math.ceil(29.5*(E-1))+(b-1)*354+Math.floor((3+11*b)/30)+this.jdEpoch-1},fromJD:function(b){b=Math.floor(b)+.5;var E=Math.floor((30*(b-this.jdEpoch)+10646)/10631);E=E<=0?E-1:E;var k=Math.min(12,Math.ceil((b-29-this.toJD(E,1,1))/29.5)+1),l=b-this.toJD(E,k,1)+1;return this.newDate(E,k,l)}}),J.calendars.islamic=p}}),RH=ze({"node_modules/world-calendars/dist/calendars/julian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()<0?E.year()+1:E.year();return k%4===0},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===2&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b<0&&b++,E<=2&&(b--,E+=12),Math.floor(365.25*(b+4716))+Math.floor(30.6001*(E+1))+k-1524.5},fromJD:function(b){var E=Math.floor(b+.5),k=E+1524,l=Math.floor((k-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((k-e)/30.6001),n=t-Math.floor(t<14?1:13),r=l-Math.floor(n>2?4716:4715),a=k-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,n,a)}}),J.calendars.julian=p}}),IH=ze({"node_modules/world-calendars/dist/calendars/mayan.js"(){var J=th(),V=Vc();function p(k){this.local=this.regionalOptions[k||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),!1},formatYear:function(k){var l=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear);k=l.year();var e=Math.floor(k/400);k=k%400,k+=k<0?400:0;var t=Math.floor(k/20);return e+"."+t+"."+k%20},forYear:function(k){if(k=k.split("."),k.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),18},weekOfYear:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),0},daysInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),360},daysInMonth:function(k,l){return this._validate(k,l,this.minDay,J.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()},weekDay:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),!0},extraInfo:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate),n=t.toJD(),r=this._toHaab(n),a=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(k){k-=this.jdEpoch;var l=b(k+8+17*20,365);return[Math.floor(l/20)+1,b(l,20)]},_toTzolkin:function(k){return k-=this.jdEpoch,[E(k+20,20),E(k+4,13)]},toJD:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(k){k=Math.floor(k)+.5-this.jdEpoch;var l=Math.floor(k/360);k=k%360,k+=k<0?360:0;var e=Math.floor(k/20),t=k%20;return this.newDate(l,e,t)}});function b(k,l){return k-l*Math.floor(k/l)}function E(k,l){return b(k-1,l)+1}J.calendars.mayan=p}}),DH=ze({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar;var b=J.instance("gregorian");V(p.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear);return b.leapYear(k.year()+(k.year()<1?1:0)+1469)},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidMonth),t=e.year();t<0&&t++;for(var n=e.day(),r=1;r=this.toJD(k+1,1,1);)k++;for(var l=E-Math.floor(this.toJD(k,1,1)+.5)+1,e=1;l>this.daysInMonth(k,e);)l-=this.daysInMonth(k,e),e++;return this.newDate(k,e,l)}}),J.calendars.nanakshahi=p}}),FH=ze({"node_modules/world-calendars/dist/calendars/nepali.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(b){return this.daysInYear(b)!==this.daysPerYear},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);if(b=E.year(),typeof this.NEPALI_CALENDAR_DATA[b]>"u")return this.daysPerYear;for(var k=0,l=this.minMonth;l<=12;l++)k+=this.NEPALI_CALENDAR_DATA[b][l];return k},daysInMonth:function(b,E){return b.year&&(E=b.month(),b=b.year()),this._validate(b,E,this.minDay,J.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[b]>"u"?this.daysPerMonth[E-1]:this.NEPALI_CALENDAR_DATA[b][E]},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);b=l.year(),E=l.month(),k=l.day();var e=J.instance(),t=0,n=E,r=b;this._createMissingCalendarData(b);var a=b-(n>9||n===9&&k>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(E!==9&&(t=k,n--);n!==9;)n<=0&&(n=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][n],n--;return E===9?(t+=k-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(a))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(a,1,1).add(t,"d").toJD()},fromJD:function(b){var E=J.instance(),k=E.fromJD(b),l=k.year(),e=k.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var n=9,r=this.NEPALI_CALENDAR_DATA[t][0],a=this.NEPALI_CALENDAR_DATA[t][n]-r+1;e>a;)n++,n>12&&(n=1,t++),a+=this.NEPALI_CALENDAR_DATA[t][n];var o=this.NEPALI_CALENDAR_DATA[t][n]-(a-e);return this.newDate(t,n,o)},_createMissingCalendarData:function(b){var E=this.daysPerMonth.slice(0);E.unshift(17);for(var k=b-1;k"u"&&(this.NEPALI_CALENDAR_DATA[k]=E)},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]}}),J.calendars.nepali=p}}),zH=ze({"node_modules/world-calendars/dist/calendars/persian.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}function b(E){var k=E-475;E<0&&k++;var l=.242197,e=l*k,t=l*(k+1),n=e-Math.floor(e),r=t-Math.floor(t);return n>r}p.prototype=new J.baseCalendar,V(p.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return b(k.year())},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=0;if(E>0)for(var n=1;n0?E-1:E)*365+t+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E)+.5;var k=475+(E-this.toJD(475,1,1))/365.242197,l=Math.floor(k);l<=0&&l--,E>this.toJD(l,12,b(l)?30:29)&&(l++,l===0&&l++);var e=E-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),n=E-this.toJD(l,t,1)+1;return this.newDate(l,t,n)}}),J.calendars.persian=p,J.calendars.jalali=p}}),BH=ze({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)},_g2tYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)}}),J.calendars.taiwan=b}}),OH=ze({"node_modules/world-calendars/dist/calendars/thai.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)},_g2tYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)}}),J.calendars.thai=b}}),NH=ze({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this.daysInYear(k.year())===355},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){for(var k=0,l=1;l<=12;l++)k+=this.daysInMonth(E,l);return k},daysInMonth:function(E,k){for(var l=this._validate(E,k,this.minDay,J.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,n=0;ne)return b[t]-b[t-1];t++}return 30},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,n=e.day()+b[t-1]-1;return n+24e5-.5},fromJD:function(E){for(var k=E-24e5+.5,l=0,e=0;ek);e++)l++;var t=l+15292,n=Math.floor((t-1)/12),r=n+1,a=t-12*n,o=k-b[l-1]+1;return this.newDate(r,a,o)},isValid:function(E,k,l){var e=J.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(E=E.year!=null?E.year:E,e=E>=1276&&E<=1500),e},_validate:function(E,k,l,e){var t=J.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),J.calendars.ummalqura=p;var b=[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]}}),jH=ze({"src/components/calendars/calendars.js"(J,V){"use strict";V.exports=th(),MH(),SH(),EH(),kH(),CH(),LH(),PH(),RH(),IH(),DH(),FH(),zH(),BH(),OH(),NH()}}),UH=ze({"src/components/calendars/index.js"(J,V){"use strict";var p=jH(),b=Nr(),E=No(),k=E.EPOCHJD,l=E.ONEDAY,e={valType:"enumerated",values:b.sortObjectKeys(p.calendars),editType:"calc",dflt:"gregorian"},t=function(_,T,f,u){var A={};return A[f]=e,b.coerce(_,T,A,f,u)},n=function(_,T,f,u){for(var A=0;A0){if(++ye>=n$)return arguments[0]}else ye=0;return oe.apply(void 0,arguments)}}var qy=s$;var l$=qy(Fy),Vy=l$;var u$=/\{\n\/\* \[wrapped with (.+)\] \*/,c$=/,? & /;function f$(oe){var ye=oe.match(u$);return ye?ye[1].split(c$):[]}var zE=f$;var h$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function d$(oe,ye){var Fe=ye.length;if(!Fe)return oe;var dt=Fe-1;return ye[dt]=(Fe>1?"& ":"")+ye[dt],ye=ye.join(Fe>2?", ":" "),oe.replace(h$,`{ +/* [wrapped with `+ye+`] */ +`)}var BE=d$;function p$(oe){return function(){return oe}}var G0=p$;var v$=function(){try{var oe=Fh(Object,"defineProperty");return oe({},"",{}),oe}catch{}}(),H0=v$;var m$=H0?function(oe,ye){return H0(oe,"toString",{configurable:!0,enumerable:!1,value:G0(ye),writable:!0})}:wl,OE=m$;var g$=qy(OE),W0=g$;function y$(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++Fe-1}var Rp=T$;var A$=1,M$=2,S$=8,E$=16,k$=32,C$=64,L$=128,P$=256,R$=512,I$=[["ary",L$],["bind",A$],["bindKey",M$],["curry",S$],["curryRight",E$],["flip",R$],["partial",k$],["partialRight",C$],["rearg",P$]];function D$(oe,ye){return af(I$,function(Fe){var dt="_."+Fe[0];ye&Fe[1]&&!Rp(oe,dt)&&oe.push(dt)}),oe.sort()}var jE=D$;function F$(oe,ye,Fe){var dt=ye+"";return W0(oe,BE(dt,jE(zE(dt),Fe)))}var Hy=F$;var z$=1,B$=2,O$=4,N$=8,UE=32,qE=64;function j$(oe,ye,Fe,dt,Zt,yr,Yr,ma,ya,wn){var xn=ye&N$,On=xn?Yr:void 0,Fi=xn?void 0:Yr,ho=xn?yr:void 0,Li=xn?void 0:yr;ye|=xn?UE:qE,ye&=~(xn?qE:UE),ye&O$||(ye&=~(z$|B$));var lo=[oe,ye,Zt,ho,On,Li,Fi,ma,ya,wn],Lo=Fe.apply(void 0,lo);return Ng(oe)&&Vy(Lo,lo),Lo.placeholder=dt,Hy(Lo,oe,ye)}var Wy=j$;function U$(oe){var ye=oe;return ye.placeholder}var Xh=U$;var q$=9007199254740991,V$=/^(?:0|[1-9]\d*)$/;function G$(oe,ye){var Fe=typeof oe;return ye=ye??q$,!!ye&&(Fe=="number"||Fe!="symbol"&&V$.test(oe))&&oe>-1&&oe%1==0&&oe1&&ze.reverse(),xn&&ya-1&&oe%1==0&&oe<=xK}var Ip=bK;function wK(oe){return oe!=null&&Ip(oe.length)&&!Ef(oe)}var Pl=wK;function TK(oe,ye,Fe){if(!as(Fe))return!1;var dt=typeof ye;return(dt=="number"?Pl(Fe)&&kf(ye,Fe.length):dt=="string"&&ye in Fe)?cc(Fe[ye],oe):!1}var Tl=TK;function AK(oe){return Ui(function(ye,Fe){var dt=-1,Zt=Fe.length,yr=Zt>1?Fe[Zt-1]:void 0,Yr=Zt>2?Fe[2]:void 0;for(yr=oe.length>3&&typeof yr=="function"?(Zt--,yr):void 0,Yr&&Tl(Fe[0],Fe[1],Yr)&&(yr=Zt<3?void 0:yr,Zt=1),ye=Object(ye);++dt-1}var w8=QJ;function eQ(oe,ye){var Fe=this.__data__,dt=Fp(Fe,oe);return dt<0?(++this.size,Fe.push([oe,ye])):Fe[dt][1]=ye,this}var T8=eQ;function Q0(oe){var ye=-1,Fe=oe==null?0:oe.length;for(this.clear();++ye0&&Fe(ma)?ye>1?I8(ma,ye-1,Fe,dt,Zt):vh(Zt,ma):dt||(Zt[Zt.length]=ma)}return Zt}var Zs=I8;function AQ(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,1):[]}var Qy=AQ;function MQ(oe){return W0(Xy(oe,void 0,Qy),oe+"")}var Rf=MQ;var SQ=Rf(rm),D8=SQ;var EQ=$y(Object.getPrototypeOf,Object),Np=EQ;var kQ="[object Object]",CQ=Function.prototype,LQ=Object.prototype,F8=CQ.toString,PQ=LQ.hasOwnProperty,RQ=F8.call(Object);function IQ(oe){if(!is(oe)||bl(oe)!=kQ)return!1;var ye=Np(oe);if(ye===null)return!0;var Fe=PQ.call(ye,"constructor")&&ye.constructor;return typeof Fe=="function"&&Fe instanceof Fe&&F8.call(Fe)==RQ}var Cd=IQ;var DQ="[object DOMException]",FQ="[object Error]";function zQ(oe){if(!is(oe))return!1;var ye=bl(oe);return ye==FQ||ye==DQ||typeof oe.message=="string"&&typeof oe.name=="string"&&!Cd(oe)}var am=zQ;var BQ=Ui(function(oe,ye){try{return gu(oe,void 0,ye)}catch(Fe){return am(Fe)?Fe:new Error(Fe)}}),e_=BQ;var OQ="Expected a function";function NQ(oe,ye){var Fe;if(typeof ye!="function")throw new TypeError(OQ);return oe=ji(oe),function(){return--oe>0&&(Fe=ye.apply(this,arguments)),oe<=1&&(ye=void 0),Fe}}var t_=NQ;var jQ=1,UQ=32,cw=Ui(function(oe,ye,Fe){var dt=jQ;if(Fe.length){var Zt=Mh(Fe,Xh(cw));dt|=UQ}return Cf(oe,dt,ye,Fe,Zt)});cw.placeholder={};var r_=cw;var qQ=Rf(function(oe,ye){return af(ye,function(Fe){Fe=Nc(Fe),Lf(oe,Fe,r_(oe[Fe],oe))}),oe}),z8=qQ;var VQ=1,GQ=2,HQ=32,fw=Ui(function(oe,ye,Fe){var dt=VQ|GQ;if(Fe.length){var Zt=Mh(Fe,Xh(fw));dt|=HQ}return Cf(ye,dt,oe,Fe,Zt)});fw.placeholder={};var B8=fw;function WQ(oe,ye,Fe){var dt=-1,Zt=oe.length;ye<0&&(ye=-ye>Zt?0:Zt+ye),Fe=Fe>Zt?Zt:Fe,Fe<0&&(Fe+=Zt),Zt=ye>Fe?0:Fe-ye>>>0,ye>>>=0;for(var yr=Array(Zt);++dt=dt?oe:Zu(oe,ye,Fe)}var mh=YQ;var XQ="\\ud800-\\udfff",ZQ="\\u0300-\\u036f",$Q="\\ufe20-\\ufe2f",KQ="\\u20d0-\\u20ff",JQ=ZQ+$Q+KQ,QQ="\\ufe0e\\ufe0f",eee="\\u200d",tee=RegExp("["+eee+XQ+JQ+QQ+"]");function ree(oe){return tee.test(oe)}var Kh=ree;function aee(oe){return oe.split("")}var O8=aee;var N8="\\ud800-\\udfff",nee="\\u0300-\\u036f",iee="\\ufe20-\\ufe2f",oee="\\u20d0-\\u20ff",see=nee+iee+oee,lee="\\ufe0e\\ufe0f",uee="["+N8+"]",hw="["+see+"]",dw="\\ud83c[\\udffb-\\udfff]",cee="(?:"+hw+"|"+dw+")",j8="[^"+N8+"]",U8="(?:\\ud83c[\\udde6-\\uddff]){2}",q8="[\\ud800-\\udbff][\\udc00-\\udfff]",fee="\\u200d",V8=cee+"?",G8="["+lee+"]?",hee="(?:"+fee+"(?:"+[j8,U8,q8].join("|")+")"+G8+V8+")*",dee=G8+V8+hee,pee="(?:"+[j8+hw+"?",hw,U8,q8,uee].join("|")+")",vee=RegExp(dw+"(?="+dw+")|"+pee+dee,"g");function mee(oe){return oe.match(vee)||[]}var H8=mee;function gee(oe){return Kh(oe)?H8(oe):O8(oe)}var nf=gee;function yee(oe){return function(ye){ye=To(ye);var Fe=Kh(ye)?nf(ye):void 0,dt=Fe?Fe[0]:ye.charAt(0),Zt=Fe?mh(Fe,1).join(""):ye.slice(1);return dt[oe]()+Zt}}var a_=yee;var _ee=a_("toUpperCase"),nm=_ee;function xee(oe){return nm(To(oe).toLowerCase())}var n_=xee;function bee(oe,ye,Fe,dt){var Zt=-1,yr=oe==null?0:oe.length;for(dt&&yr&&(Fe=oe[++Zt]);++Zt=ye?oe:ye)),oe}var Bh=xte;function bte(oe,ye,Fe){return Fe===void 0&&(Fe=ye,ye=void 0),Fe!==void 0&&(Fe=Bc(Fe),Fe=Fe===Fe?Fe:0),ye!==void 0&&(ye=Bc(ye),ye=ye===ye?ye:0),Bh(Bc(oe),ye,Fe)}var gk=bte;function wte(){this.__data__=new zp,this.size=0}var yk=wte;function Tte(oe){var ye=this.__data__,Fe=ye.delete(oe);return this.size=ye.size,Fe}var _k=Tte;function Ate(oe){return this.__data__.get(oe)}var xk=Ate;function Mte(oe){return this.__data__.has(oe)}var bk=Mte;var Ste=200;function Ete(oe,ye){var Fe=this.__data__;if(Fe instanceof zp){var dt=Fe.__data__;if(!Bp||dt.lengthma))return!1;var wn=yr.get(oe),xn=yr.get(ye);if(wn&&xn)return wn==ye&&xn==oe;var On=-1,Fi=!0,ho=Fe&Eae?new Up:void 0;for(yr.set(oe,ye),yr.set(ye,oe);++On=ye||Oh<0||On&&ad>=yr}function zi(){var Po=wm();if(Lo(Po))return ze(Po);ma=setTimeout(zi,lo(Po))}function ze(Po){return ma=void 0,Fi&&dt?ho(Po):(dt=Zt=void 0,Yr)}function bu(){ma!==void 0&&clearTimeout(ma),wn=0,dt=ya=Zt=ma=void 0}function uf(){return ma===void 0?Yr:ze(wm())}function Yl(){var Po=wm(),Oh=Lo(Po);if(dt=arguments,Zt=this,ya=Po,Oh){if(ma===void 0)return Li(ya);if(On)return clearTimeout(ma),ma=setTimeout(zi,ye),ho(ya)}return ma===void 0&&(ma=setTimeout(zi,ye)),Yr}return Yl.cancel=bu,Yl.flush=uf,Yl}var P_=jne;function Une(oe,ye){return oe==null||oe!==oe?ye:oe}var MC=Une;var SC=Object.prototype,qne=SC.hasOwnProperty,Vne=Ui(function(oe,ye){oe=Object(oe);var Fe=-1,dt=ye.length,Zt=dt>2?ye[2]:void 0;for(Zt&&Tl(ye[0],ye[1],Zt)&&(dt=1);++Fe=rie&&(yr=ep,Yr=!1,ye=new Up(ye));e:for(;++Zt=0&&oe.slice(Fe,Zt)==ye}var GC=bie;function wie(oe,ye){return ts(ye,function(Fe){return[Fe,oe[Fe]]})}var HC=wie;function Tie(oe){var ye=-1,Fe=Array(oe.size);return oe.forEach(function(dt){Fe[++ye]=[dt,dt]}),Fe}var WC=Tie;var Aie="[object Map]",Mie="[object Set]";function Sie(oe){return function(ye){var Fe=of(ye);return Fe==Aie?mm(ye):Fe==Mie?WC(ye):HC(ye,oe(ye))}}var B_=Sie;var Eie=B_(Ms),Xg=Eie;var kie=B_(Rl),Zg=kie;var Cie={"&":"&","<":"<",">":">",'"':""","'":"'"},Lie=om(Cie),YC=Lie;var XC=/[&<>"']/g,Pie=RegExp(XC.source);function Rie(oe){return oe=To(oe),oe&&Pie.test(oe)?oe.replace(XC,YC):oe}var O_=Rie;var ZC=/[\\^$.*+?()[\]{}|]/g,Iie=RegExp(ZC.source);function Die(oe){return oe=To(oe),oe&&Iie.test(oe)?oe.replace(ZC,"\\$&"):oe}var $C=Die;function Fie(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++FeZt?0:Zt+Fe),dt=dt===void 0||dt>Zt?Zt:ji(dt),dt<0&&(dt+=Zt),dt=Fe>dt?0:j_(dt);Fe-1?Zt[yr?ye[Yr]:Yr]:void 0}}var q_=Gie;var Hie=Math.max;function Wie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Hie(dt+Zt,0)),Pp(oe,Ti(ye,3),Zt)}var V_=Wie;var Yie=q_(V_),r7=Yie;function Xie(oe,ye,Fe){var dt;return Fe(oe,function(Zt,yr,Yr){if(ye(Zt,yr,Yr))return dt=yr,!1}),dt}var G_=Xie;function Zie(oe,ye){return G_(oe,Ti(ye,3),Df)}var a7=Zie;var $ie=Math.max,Kie=Math.min;function Jie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt-1;return Fe!==void 0&&(Zt=ji(Fe),Zt=Fe<0?$ie(dt+Zt,0):Kie(Zt,dt-1)),Pp(oe,Ti(ye,3),Zt,!0)}var H_=Jie;var Qie=q_(H_),n7=Qie;function eoe(oe,ye){return G_(oe,Ti(ye,3),Mm)}var i7=eoe;function toe(oe){return oe&&oe.length?oe[0]:void 0}var $g=toe;function roe(oe,ye){var Fe=-1,dt=Pl(oe)?Array(oe.length):[];return yh(oe,function(Zt,yr,Yr){dt[++Fe]=ye(Zt,yr,Yr)}),dt}var W_=roe;function aoe(oe,ye){var Fe=Ii(oe)?ts:W_;return Fe(oe,Ti(ye,3))}var Wp=aoe;function noe(oe,ye){return Zs(Wp(oe,ye),1)}var o7=noe;var ioe=1/0;function ooe(oe,ye){return Zs(Wp(oe,ye),ioe)}var s7=ooe;function soe(oe,ye,Fe){return Fe=Fe===void 0?1:ji(Fe),Zs(Wp(oe,ye),Fe)}var l7=soe;var loe=1/0;function uoe(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,loe):[]}var u7=uoe;function coe(oe,ye){var Fe=oe==null?0:oe.length;return Fe?(ye=ye===void 0?1:ji(ye),Zs(oe,ye)):[]}var c7=coe;var foe=512;function hoe(oe){return Cf(oe,foe)}var f7=hoe;var doe=lm("floor"),h7=doe;var poe="Expected a function",voe=8,moe=32,goe=128,yoe=256;function _oe(oe){return Rf(function(ye){var Fe=ye.length,dt=Fe,Zt=dh.prototype.thru;for(oe&&ye.reverse();dt--;){var yr=ye[dt];if(typeof yr!="function")throw new TypeError(poe);if(Zt&&!Yr&&V0(yr)=="wrapper")var Yr=new dh([],!0)}for(dt=Yr?dt:Fe;++dtye}var Sm=Ioe;function Doe(oe){return function(ye,Fe){return typeof ye=="string"&&typeof Fe=="string"||(ye=Bc(ye),Fe=Bc(Fe)),oe(ye,Fe)}}var Xp=Doe;var Foe=Xp(Sm),T7=Foe;var zoe=Xp(function(oe,ye){return oe>=ye}),A7=zoe;var Boe=Object.prototype,Ooe=Boe.hasOwnProperty;function Noe(oe,ye){return oe!=null&&Ooe.call(oe,ye)}var M7=Noe;function joe(oe,ye){return oe!=null&&M_(oe,ye,M7)}var S7=joe;var Uoe=Math.max,qoe=Math.min;function Voe(oe,ye,Fe){return oe>=qoe(ye,Fe)&&oe-1:!!Zt&&Yh(oe,ye,Fe)>-1}var C7=$oe;var Koe=Math.max;function Joe(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Koe(dt+Zt,0)),Yh(oe,ye,Zt)}var L7=Joe;function Qoe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,0,-1):[]}var P7=Qoe;var ese=Math.min;function tse(oe,ye,Fe){for(var dt=Fe?Am:Rp,Zt=oe[0].length,yr=oe.length,Yr=yr,ma=Array(yr),ya=1/0,wn=[];Yr--;){var xn=oe[Yr];Yr&&ye&&(xn=ts(xn,_u(ye))),ya=ese(xn.length,ya),ma[Yr]=!Fe&&(ye||Zt>=120&&xn.length>=120)?new Up(Yr&&xn):void 0}xn=oe[0];var On=-1,Fi=ma[0];e:for(;++On=-l9&&oe<=l9}var u9=$se;function Kse(oe){return oe===void 0}var c9=Kse;var Jse="[object WeakMap]";function Qse(oe){return is(oe)&&of(oe)==Jse}var f9=Qse;var ele="[object WeakSet]";function tle(oe){return is(oe)&&bl(oe)==ele}var h9=tle;var rle=1;function ale(oe){return Ti(typeof oe=="function"?oe:If(oe,rle))}var d9=ale;var nle=Array.prototype,ile=nle.join;function ole(oe,ye){return oe==null?"":ile.call(oe,ye)}var p9=ole;var sle=Jh(function(oe,ye,Fe){return oe+(Fe?"-":"")+ye.toLowerCase()}),v9=sle;var lle=Gp(function(oe,ye,Fe){Lf(oe,Fe,ye)}),m9=lle;function ule(oe,ye,Fe){for(var dt=Fe+1;dt--;)if(oe[dt]===ye)return dt;return dt}var g9=ule;var cle=Math.max,fle=Math.min;function hle(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt;return Fe!==void 0&&(Zt=ji(Fe),Zt=Zt<0?cle(dt+Zt,0):fle(Zt,dt-1)),ye===ye?g9(oe,ye,Zt):Pp(oe,Gy,Zt,!0)}var y9=hle;var dle=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+ye.toLowerCase()}),_9=dle;var ple=a_("toLowerCase"),x9=ple;function vle(oe,ye){return oe=this.__values__.length,ye=oe?void 0:this.__values__[this.__index__++];return{done:oe,value:ye}}var O9=Hle;function Wle(oe,ye){var Fe=oe.length;if(Fe)return ye+=ye<0?Fe:0,kf(ye,Fe)?oe[ye]:void 0}var tx=Wle;function Yle(oe,ye){return oe&&oe.length?tx(oe,ji(ye)):void 0}var N9=Yle;function Xle(oe){return oe=ji(oe),Ui(function(ye){return tx(ye,oe)})}var j9=Xle;function Zle(oe,ye){return ye=ph(ye,oe),oe=Z_(oe,ye),oe==null||delete oe[Nc(xu(ye))]}var Im=Zle;function $le(oe){return Cd(oe)?void 0:oe}var U9=$le;var Kle=1,Jle=2,Qle=4,eue=Rf(function(oe,ye){var Fe={};if(oe==null)return Fe;var dt=!1;ye=ts(ye,function(yr){return yr=ph(yr,oe),dt||(dt=yr.length>1),yr}),Oc(oe,hm(oe),Fe),dt&&(Fe=If(Fe,Kle|Jle|Qle,U9));for(var Zt=ye.length;Zt--;)Im(Fe,ye[Zt]);return Fe}),q9=eue;function tue(oe,ye,Fe,dt){if(!as(oe))return oe;ye=ph(ye,oe);for(var Zt=-1,yr=ye.length,Yr=yr-1,ma=oe;ma!=null&&++Ztye||yr&&Yr&&ya&&!ma&&!wn||dt&&Yr&&ya||!Fe&&ya||!Zt)return 1;if(!dt&&!yr&&!wn&&oe=ma)return ya;var wn=Fe[dt];return ya*(wn=="desc"?-1:1)}}return oe.index-ye.index}var W9=lue;function uue(oe,ye,Fe){ye.length?ye=ts(ye,function(yr){return Ii(yr)?function(Yr){return zh(Yr,yr.length===1?yr[0]:yr)}:yr}):ye=[wl];var dt=-1;ye=ts(ye,_u(Ti));var Zt=W_(oe,function(yr,Yr,ma){var ya=ts(ye,function(wn){return wn(yr)});return{criteria:ya,index:++dt,value:yr}});return H9(Zt,function(yr,Yr){return W9(yr,Yr,Fe)})}var ix=uue;function cue(oe,ye,Fe,dt){return oe==null?[]:(Ii(ye)||(ye=ye==null?[]:[ye]),Fe=dt?void 0:Fe,Ii(Fe)||(Fe=Fe==null?[]:[Fe]),ix(oe,ye,Fe))}var Y9=cue;function fue(oe){return Rf(function(ye){return ye=ts(ye,_u(Ti)),Ui(function(Fe){var dt=this;return oe(ye,function(Zt){return gu(Zt,dt,Fe)})})})}var Dm=fue;var hue=Dm(ts),X9=hue;var due=Ui,Z9=due;var pue=Math.min,vue=Z9(function(oe,ye){ye=ye.length==1&&Ii(ye[0])?ts(ye[0],_u(Ti)):ts(Zs(ye,1),_u(Ti));var Fe=ye.length;return Ui(function(dt){for(var Zt=-1,yr=pue(dt.length,Fe);++Ztyue)return Fe;do ye%2&&(Fe+=oe),ye=_ue(ye/2),ye&&(oe+=oe);while(ye);return Fe}var Kg=xue;var bue=xm("length"),Q9=bue;var tL="\\ud800-\\udfff",wue="\\u0300-\\u036f",Tue="\\ufe20-\\ufe2f",Aue="\\u20d0-\\u20ff",Mue=wue+Tue+Aue,Sue="\\ufe0e\\ufe0f",Eue="["+tL+"]",yw="["+Mue+"]",_w="\\ud83c[\\udffb-\\udfff]",kue="(?:"+yw+"|"+_w+")",rL="[^"+tL+"]",aL="(?:\\ud83c[\\udde6-\\uddff]){2}",nL="[\\ud800-\\udbff][\\udc00-\\udfff]",Cue="\\u200d",iL=kue+"?",oL="["+Sue+"]?",Lue="(?:"+Cue+"(?:"+[rL,aL,nL].join("|")+")"+oL+iL+")*",Pue=oL+iL+Lue,Rue="(?:"+[rL+yw+"?",yw,aL,nL,Eue].join("|")+")",eL=RegExp(_w+"(?="+_w+")|"+Rue+Pue,"g");function Iue(oe){for(var ye=eL.lastIndex=0;eL.test(oe);)++ye;return ye}var sL=Iue;function Due(oe){return Kh(oe)?sL(oe):Q9(oe)}var ed=Due;var Fue=Math.ceil;function zue(oe,ye){ye=ye===void 0?" ":uc(ye);var Fe=ye.length;if(Fe<2)return Fe?Kg(ye,oe):ye;var dt=Kg(ye,Fue(oe/ed(ye)));return Kh(ye)?mh(nf(dt),0,oe).join(""):dt.slice(0,oe)}var Fv=zue;var Bue=Math.ceil,Oue=Math.floor;function Nue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;if(!ye||dt>=ye)return oe;var Zt=(ye-dt)/2;return Fv(Oue(Zt),Fe)+oe+Fv(Bue(Zt),Fe)}var lL=Nue;function jue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;return ye&&dt-1;)ma!==oe&&_L.call(ma,ya,1),_L.call(oe,ya,1);return oe}var Fm=ece;function tce(oe,ye){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye):oe}var sx=tce;var rce=Ui(sx),xL=rce;function ace(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,Ti(Fe,2)):oe}var bL=ace;function nce(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,void 0,Fe):oe}var wL=nce;var ice=Array.prototype,oce=ice.splice;function sce(oe,ye){for(var Fe=oe?ye.length:0,dt=Fe-1;Fe--;){var Zt=ye[Fe];if(Fe==dt||Zt!==yr){var yr=Zt;kf(Zt)?oce.call(oe,Zt,1):Im(oe,Zt)}}return oe}var lx=sce;var lce=Rf(function(oe,ye){var Fe=oe==null?0:oe.length,dt=rm(oe,ye);return lx(oe,ts(ye,function(Zt){return kf(Zt,Fe)?+Zt:Zt}).sort(nx)),dt}),TL=lce;var uce=Math.floor,cce=Math.random;function fce(oe,ye){return oe+uce(cce()*(ye-oe+1))}var zm=fce;var hce=parseFloat,dce=Math.min,pce=Math.random;function vce(oe,ye,Fe){if(Fe&&typeof Fe!="boolean"&&Tl(oe,ye,Fe)&&(ye=Fe=void 0),Fe===void 0&&(typeof ye=="boolean"?(Fe=ye,ye=void 0):typeof oe=="boolean"&&(Fe=oe,oe=void 0)),oe===void 0&&ye===void 0?(oe=0,ye=1):(oe=Dh(oe),ye===void 0?(ye=oe,oe=0):ye=Dh(ye)),oe>ye){var dt=oe;oe=ye,ye=dt}if(Fe||oe%1||ye%1){var Zt=pce();return dce(oe+Zt*(ye-oe+hce("1e-"+((Zt+"").length-1))),ye)}return zm(oe,ye)}var AL=vce;var mce=Math.ceil,gce=Math.max;function yce(oe,ye,Fe,dt){for(var Zt=-1,yr=gce(mce((ye-oe)/(Fe||1)),0),Yr=Array(yr);yr--;)Yr[dt?yr:++Zt]=oe,oe+=Fe;return Yr}var ML=yce;function _ce(oe){return function(ye,Fe,dt){return dt&&typeof dt!="number"&&Tl(ye,Fe,dt)&&(Fe=dt=void 0),ye=Dh(ye),Fe===void 0?(Fe=ye,ye=0):Fe=Dh(Fe),dt=dt===void 0?ye1&&Tl(oe,ye[0],ye[1])?ye=[]:Fe>2&&Tl(ye[0],ye[1],ye[2])&&(ye=[ye[0]]),ix(oe,Zs(ye,1),[])}),eP=nfe;var ife=4294967295,ofe=ife-1,sfe=Math.floor,lfe=Math.min;function ufe(oe,ye,Fe,dt){var Zt=0,yr=oe==null?0:oe.length;if(yr===0)return 0;ye=Fe(ye);for(var Yr=ye!==ye,ma=ye===null,ya=Ru(ye),wn=ye===void 0;Zt>>1;function hfe(oe,ye,Fe){var dt=0,Zt=oe==null?dt:oe.length;if(typeof ye=="number"&&ye===ye&&Zt<=ffe){for(;dt>>1,Yr=oe[yr];Yr!==null&&!Ru(Yr)&&(Fe?Yr<=ye:Yr>>0,Fe?(oe=To(oe),oe&&(typeof ye=="string"||ye!=null&&!Lm(ye))&&(ye=uc(ye),!ye&&Kh(oe))?mh(nf(oe),0,Fe):oe.split(ye,Fe)):[]}var uP=Tfe;var Afe="Expected a function",Mfe=Math.max;function Sfe(oe,ye){if(typeof oe!="function")throw new TypeError(Afe);return ye=ye==null?0:Mfe(ji(ye),0),Ui(function(Fe){var dt=Fe[ye],Zt=mh(Fe,0,ye);return dt&&vh(Zt,dt),gu(oe,this,Zt)})}var cP=Sfe;var Efe=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+nm(ye)}),fP=Efe;function kfe(oe,ye,Fe){return oe=To(oe),Fe=Fe==null?0:Bh(ji(Fe),0,oe.length),ye=uc(ye),oe.slice(Fe,Fe+ye.length)==ye}var hP=kfe;function Cfe(){return{}}var dP=Cfe;function Lfe(){return""}var pP=Lfe;function Pfe(){return!0}var vP=Pfe;var Rfe=kp(function(oe,ye){return oe-ye},0),mP=Rfe;function Ife(oe){return oe&&oe.length?Rm(oe,wl):0}var gP=Ife;function Dfe(oe,ye){return oe&&oe.length?Rm(oe,Ti(ye,2)):0}var yP=Dfe;function Ffe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,1,ye):[]}var _P=Ffe;function zfe(oe,ye,Fe){return oe&&oe.length?(ye=Fe||ye===void 0?1:ji(ye),Zu(oe,0,ye<0?0:ye)):[]}var xP=zfe;function Bfe(oe,ye,Fe){var dt=oe==null?0:oe.length;return dt?(ye=Fe||ye===void 0?1:ji(ye),ye=dt-ye,Zu(oe,ye<0?0:ye,dt)):[]}var bP=Bfe;function Ofe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3),!1,!0):[]}var wP=Ofe;function Nfe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3)):[]}var TP=Nfe;function jfe(oe,ye){return ye(oe),oe}var AP=jfe;var MP=Object.prototype,Ufe=MP.hasOwnProperty;function qfe(oe,ye,Fe,dt){return oe===void 0||cc(oe,MP[Fe])&&!Ufe.call(dt,Fe)?ye:oe}var ww=qfe;var Vfe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Gfe(oe){return"\\"+Vfe[oe]}var SP=Gfe;var Hfe=/<%=([\s\S]+?)%>/g,dx=Hfe;var Wfe=/<%-([\s\S]+?)%>/g,EP=Wfe;var Yfe=/<%([\s\S]+?)%>/g,kP=Yfe;var Xfe={escape:EP,evaluate:kP,interpolate:dx,variable:"",imports:{_:{escape:O_}}},Qg=Xfe;var Zfe="Invalid `variable` option passed into `_.template`",$fe=/\b__p \+= '';/g,Kfe=/\b(__p \+=) '' \+/g,Jfe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qfe=/[()=,{}\[\]\/\s]/,ehe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,px=/($^)/,the=/['\n\r\u2028\u2029\\]/g,rhe=Object.prototype,CP=rhe.hasOwnProperty;function ahe(oe,ye,Fe){var dt=Qg.imports._.templateSettings||Qg;Fe&&Tl(oe,ye,Fe)&&(ye=void 0),oe=To(oe),ye=Dp({},ye,dt,ww);var Zt=Dp({},ye.imports,dt.imports,ww),yr=Ms(Zt),Yr=Em(Zt,yr),ma,ya,wn=0,xn=ye.interpolate||px,On="__p += '",Fi=RegExp((ye.escape||px).source+"|"+xn.source+"|"+(xn===dx?ehe:px).source+"|"+(ye.evaluate||px).source+"|$","g"),ho=CP.call(ye,"sourceURL")?"//# sourceURL="+(ye.sourceURL+"").replace(/\s/g," ")+` +`:"";oe.replace(Fi,function(Lo,zi,ze,bu,uf,Yl){return ze||(ze=bu),On+=oe.slice(wn,Yl).replace(the,SP),zi&&(ma=!0,On+=`' + +__e(`+zi+`) + +'`),uf&&(ya=!0,On+=`'; +`+uf+`; +__p += '`),ze&&(On+=`' + +((__t = (`+ze+`)) == null ? '' : __t) + +'`),wn=Yl+Lo.length,Lo}),On+=`'; +`;var Li=CP.call(ye,"variable")&&ye.variable;if(!Li)On=`with (obj) { +`+On+` +} +`;else if(Qfe.test(Li))throw new Error(Zfe);On=(ya?On.replace($fe,""):On).replace(Kfe,"$1").replace(Jfe,"$1;"),On="function("+(Li||"obj")+`) { +`+(Li?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(ma?", __e = _.escape":"")+(ya?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; -`)+Fa+`return __p -}`;var Ci=U4(function(){return Function(Lt,vn+"return "+Fa).apply(void 0,rr)});if(Ci.source=Fa,Tg(Ci))throw Ci;return Ci}var KK=WFe;var $Fe="Expected a function";function YFe(Q,ne,ge){var je=!0,mt=!0;if(typeof Q!="function")throw new TypeError($Fe);return po(ge)&&(je="leading"in ge?!!ge.leading:je,mt="trailing"in ge?!!ge.trailing:mt),y6(Q,ne,{leading:je,maxWait:ne,trailing:mt})}var JK=YFe;function XFe(Q,ne){return ne(Q)}var s0=XFe;var ZFe=9007199254740991,dD=4294967295,KFe=Math.min;function JFe(Q,ne){if(Q=Bi(Q),Q<1||Q>ZFe)return[];var ge=dD,je=KFe(Q,dD);ne=Mu(ne),Q-=dD;for(var mt=vg(je,ne);++ge-1;);return ge}var aA=sPe;function lPe(Q,ne){for(var ge=-1,je=Q.length;++ge-1;);return ge}var iA=lPe;function uPe(Q,ne,ge){if(Q=En(Q),Q&&(ge||ne===void 0))return x4(Q);if(!Q||!(ne=Gl(ne)))return Q;var je=Nu(Q),mt=Nu(ne),Lt=iA(je,mt),rr=aA(je,mt)+1;return mf(je,Lt,rr).join("")}var sJ=uPe;function cPe(Q,ne,ge){if(Q=En(Q),Q&&(ge||ne===void 0))return Q.slice(0,_4(Q)+1);if(!Q||!(ne=Gl(ne)))return Q;var je=Nu(Q),mt=aA(je,Nu(ne))+1;return mf(je,0,mt).join("")}var lJ=cPe;var fPe=/^\s+/;function hPe(Q,ne,ge){if(Q=En(Q),Q&&(ge||ne===void 0))return Q.replace(fPe,"");if(!Q||!(ne=Gl(ne)))return Q;var je=Nu(Q),mt=iA(je,Nu(ne));return mf(je,mt).join("")}var uJ=hPe;var dPe=30,pPe="...",vPe=/\w*$/;function mPe(Q,ne){var ge=dPe,je=pPe;if(po(ne)){var mt="separator"in ne?ne.separator:mt;ge="length"in ne?Bi(ne.length):ge,je="omission"in ne?Gl(ne.omission):je}Q=En(Q);var Lt=Q.length;if(_d(Q)){var rr=Nu(Q);Lt=rr.length}if(ge>=Lt)return Q;var Ar=ge-wd(je);if(Ar<1)return je;var Tr=rr?mf(rr,0,Ar).join(""):Q.slice(0,Ar);if(mt===void 0)return Tr+je;if(rr&&(Ar+=Tr.length-Ar),Kg(mt)){if(Q.slice(Ar).search(mt)){var Sa,ya=Tr;for(mt.global||(mt=RegExp(mt.source,En(vPe.exec(mt))+"g")),mt.lastIndex=0;Sa=mt.exec(ya);)var Fa=Sa.index;Tr=Tr.slice(0,Fa===void 0?Ar:Fa)}}else if(Q.indexOf(Gl(mt),Ar)!=Ar){var Ii=Tr.lastIndexOf(mt);Ii>-1&&(Tr=Tr.slice(0,Ii))}return Tr+je}var cJ=mPe;function gPe(Q){return I4(Q,1)}var fJ=gPe;var yPe={"&":"&","<":"<",">":">",""":'"',"'":"'"},_Pe=Sg(yPe),hJ=_Pe;var dJ=/&(?:amp|lt|gt|quot|#39);/g,xPe=RegExp(dJ.source);function bPe(Q){return Q=En(Q),Q&&xPe.test(Q)?Q.replace(dJ,hJ):Q}var pJ=bPe;var wPe=1/0,APe=iv&&1/ov(new iv([,-0]))[1]==wPe?function(Q){return new iv(Q)}:lg,vJ=APe;var TPe=200;function MPe(Q,ne,ge){var je=-1,mt=K0,Lt=Q.length,rr=!0,Ar=[],Tr=Ar;if(ge)rr=!1,mt=Hg;else if(Lt>=TPe){var Sa=ne?null:vJ(Q);if(Sa)return ov(Sa);rr=!1,mt=n0,Tr=new nv}else Tr=ne?[]:Ar;e:for(;++je1||this.__actions__.length||!(je instanceof So)||!hc(ge)?this.thru(mt):(je=je.slice(ge,+ge+(ne?1:0)),je.__actions__.push({func:s0,args:[mt],thisArg:void 0}),new df(je,this.__chain__).thru(function(Lt){return ne&&!Lt.length&&Lt.push(void 0),Lt}))}),DJ=HPe;function WPe(){return Y4(this)}var LJ=WPe;function $Pe(){var Q=this.__wrapped__;if(Q instanceof So){var ne=Q;return this.__actions__.length&&(ne=new So(this)),ne=ne.reverse(),ne.__actions__.push({func:s0,args:[Dx],thisArg:void 0}),new df(ne,this.__chain__)}return this.thru(Dx)}var FJ=$Pe;function YPe(Q,ne,ge){var je=Q.length;if(je<2)return je?zf(Q[0]):[];for(var mt=-1,Lt=Array(je);++mt1?Q[ne-1]:void 0;return ge=typeof ge=="function"?(Q.pop(),ge):void 0,nA(Q,ge)}),NJ=rIe;var sn={chunk:zW,compact:b$,concat:w$,difference:tY,differenceBy:rY,differenceWith:aY,drop:nY,dropRight:oY,dropRightWhile:sY,dropWhile:lY,fill:xY,findIndex:D6,findLastIndex:F6,first:kx,flatten:j4,flattenDeep:CY,flattenDepth:DY,fromPairs:NY,head:kx,indexOf:ZY,initial:KY,intersection:JY,intersectionBy:QY,intersectionWith:eX,join:IX,last:hl,lastIndexOf:OX,nth:nZ,pull:jZ,pullAll:Y6,pullAllBy:UZ,pullAllWith:qZ,pullAt:VZ,remove:QZ,reverse:Dx,slice:mK,sortedIndex:bK,sortedIndexBy:wK,sortedIndexOf:AK,sortedLastIndex:TK,sortedLastIndexBy:MK,sortedLastIndexOf:EK,sortedUniq:SK,sortedUniqBy:kK,tail:NK,take:jK,takeRight:UK,takeRightWhile:qK,takeWhile:VK,union:mJ,unionBy:gJ,unionWith:yJ,uniq:_J,uniqBy:xJ,uniqWith:bJ,unzip:ny,unzipWith:nA,without:kJ,xor:PJ,xorBy:IJ,xorWith:RJ,zip:zJ,zipObject:BJ,zipObjectDeep:OJ,zipWith:NJ};var bs={countBy:U$,each:Tx,eachRight:Mx,every:yY,filter:bY,find:wY,findLast:TY,flatMap:EY,flatMapDeep:SY,flatMapDepth:kY,forEach:Tx,forEachRight:Mx,groupBy:qY,includes:XY,invokeMap:oX,keyBy:zX,map:cv,orderBy:dZ,partition:PZ,reduce:XZ,reduceRight:KZ,reject:JZ,sample:oK,sampleSize:uK,shuffle:pK,size:vK,some:_K,sortBy:xK};var pD={now:Vg};var Tl={after:ZG,ary:I4,before:q4,bind:V4,bindKey:aW,curry:V$,curryRight:G$,debounce:y6,defer:Q$,delay:eY,flip:LY,memoize:O4,negate:o0,once:cZ,overArgs:mZ,partial:$6,partialRight:FZ,rearg:YZ,rest:rK,spread:DK,throttle:JK,unary:fJ,wrap:CJ};var In={castArray:IW,clone:m$,cloneDeep:g$,cloneDeepWith:y$,cloneWith:_$,conformsTo:O$,eq:Hl,gt:VY,gte:GY,isArguments:zh,isArray:Ei,isArrayBuffer:uX,isArrayLike:Is,isArrayLikeObject:Wo,isBoolean:cX,isBuffer:Rf,isDate:dX,isElement:pX,isEmpty:vX,isEqual:mX,isEqualWith:gX,isError:Tg,isFinite:yX,isFunction:fc,isInteger:B6,isLength:J0,isMap:a6,isMatch:_X,isMatchWith:xX,isNaN:bX,isNative:AX,isNil:TX,isNull:MX,isNumber:O6,isObject:po,isObjectLike:wo,isPlainObject:Pp,isRegExp:Kg,isSafeInteger:CX,isSet:i6,isString:dv,isSymbol:Al,isTypedArray:yd,isUndefined:DX,isWeakMap:LX,isWeakSet:FX,lt:UX,lte:qX,toArray:U6,toFinite:nh,toInteger:Bi,toLength:S6,toNumber:wu,toPlainObject:_6,toSafeInteger:iJ,toString:En};var Bc={add:$G,ceil:RW,divide:iY,floor:FY,max:$X,maxBy:YX,mean:XX,meanBy:ZX,min:eZ,minBy:tZ,multiply:rZ,round:iK,subtract:zK,sum:BK,sumBy:OK};var Fx={clamp:BW,inRange:YY,random:GZ};var Qn={assign:LH,assignIn:yx,assignInWith:_x,assignWith:xx,at:eW,create:q$,defaults:$$,defaultsDeep:J$,entries:Ex,entriesIn:Sx,extend:yx,extendWith:_x,findKey:AY,findLastKey:MY,forIn:RY,forInRight:zY,forOwn:BY,forOwnRight:OY,functions:jY,functionsIn:UY,get:wg,has:WY,hasIn:jg,invert:rX,invertBy:iX,invoke:nX,keys:jo,keysIn:Rs,mapKeys:VX,mapValues:GX,merge:KX,mergeWith:x6,omit:lZ,omitBy:uZ,pick:RZ,pickBy:G6,result:aK,set:cK,setWith:fK,toPairs:Ex,toPairsIn:Sx,transform:oJ,unset:AJ,update:TJ,updateWith:MJ,values:bd,valuesIn:SJ};var Ad={at:DJ,chain:Y4,commit:x$,lodash:Kt,next:iZ,plant:zZ,reverse:FJ,tap:GK,thru:s0,toIterator:eJ,toJSON:gv,value:gv,valueOf:gv,wrapperChain:LJ};var ts={camelCase:PW,capitalize:H4,deburr:W4,endsWith:cY,escape:M6,escapeRegExp:mY,kebabCase:RX,lowerCase:NX,lowerFirst:jX,pad:kZ,padEnd:CZ,padStart:DZ,parseInt:LZ,repeat:eK,replace:tK,snakeCase:gK,split:CK,startCase:LK,startsWith:FK,template:KK,templateSettings:Lx,toLower:tJ,toUpper:nJ,trim:sJ,trimEnd:lJ,trimStart:uJ,truncate:cJ,unescape:pJ,upperCase:EJ,upperFirst:Mg,words:$4};var us={attempt:U4,bindAll:rW,cond:R$,conforms:B$,constant:fg,defaultTo:H$,flow:PY,flowRight:IY,identity:Ss,iteratee:PX,matches:HX,matchesProperty:WX,method:JX,methodOf:QX,mixin:j6,noop:lg,nthArg:oZ,over:pZ,overEvery:gZ,overSome:yZ,property:p6,propertyOf:BZ,range:WZ,rangeRight:$Z,stubArray:Lg,stubFalse:mg,stubObject:PK,stubString:IK,stubTrue:RK,times:QK,toPath:rJ,uniqueId:wJ};function aIe(){var Q=new So(this.__wrapped__);return Q.__actions__=el(this.__actions__),Q.__dir__=this.__dir__,Q.__filtered__=this.__filtered__,Q.__iteratees__=el(this.__iteratees__),Q.__takeCount__=this.__takeCount__,Q.__views__=el(this.__views__),Q}var jJ=aIe;function iIe(){if(this.__filtered__){var Q=new So(this);Q.__dir__=-1,Q.__filtered__=!0}else Q=this.clone(),Q.__dir__*=-1;return Q}var UJ=iIe;var nIe=Math.max,oIe=Math.min;function sIe(Q,ne,ge){for(var je=-1,mt=ge.length;++je0||ne<0)?new So(ge):(Q<0?ge=ge.takeRight(-Q):Q&&(ge=ge.drop(Q)),ne!==void 0&&(ne=Bi(ne),ge=ne<0?ge.dropRight(-ne):ge.take(ne-Q)),ge)};So.prototype.takeRightWhile=function(Q){return this.reverse().takeWhile(Q).reverse()};So.prototype.toArray=function(){return this.take(WJ)};gc(So.prototype,function(Q,ne){var ge=/^(?:filter|find|map|reject)|While$/.test(ne),je=/^(?:head|last)$/.test(ne),mt=Kt[je?"take"+(ne=="last"?"Right":""):ne],Lt=je||/^find/.test(ne);mt&&(Kt.prototype[ne]=function(){var rr=this.__wrapped__,Ar=je?[1]:arguments,Tr=rr instanceof So,Sa=Ar[0],ya=Tr||Ei(rr),Fa=function(Si){var ye=mt.apply(Kt,vf([Si],Ar));return je&&Ii?ye[0]:ye};ya&&ge&&typeof Sa=="function"&&Sa.length!=1&&(Tr=ya=!1);var Ii=this.__chain__,vn=!!this.__actions__.length,ja=Lt&&!Ii,Ci=Tr&&!vn;if(!Lt&&ya){rr=Ci?rr:new So(this);var Rn=Q.apply(rr,Ar);return Rn.__actions__.push({func:s0,args:[Fa],thisArg:void 0}),new df(Rn,Ii)}return ja&&Ci?Q.apply(this,Ar):(Rn=this.thru(Fa),ja?je?Rn.value()[0]:Rn.value():Rn)})});ou(["pop","push","shift","sort","splice","unshift"],function(Q){var ne=mIe[Q],ge=/^(?:push|sort|unshift)$/.test(Q)?"tap":"thru",je=/^(?:pop|shift)$/.test(Q);Kt.prototype[Q]=function(){var mt=arguments;if(je&&!this.__chain__){var Lt=this.value();return ne.apply(Ei(Lt)?Lt:[],mt)}return this[ge](function(rr){return ne.apply(Ei(rr)?rr:[],mt)})}});gc(So.prototype,function(Q,ne){var ge=Kt[ne];if(ge){var je=ge.name+"";$J.call(X0,je)||(X0[je]=[]),X0[je].push({name:ne,func:ge})}});X0[pg(void 0,dIe).name]=[{name:"wrapper",func:void 0}];So.prototype.clone=jJ;So.prototype.reverse=UJ;So.prototype.value=VJ;Kt.prototype.at=Ad.at;Kt.prototype.chain=Ad.wrapperChain;Kt.prototype.commit=Ad.commit;Kt.prototype.next=Ad.next;Kt.prototype.plant=Ad.plant;Kt.prototype.reverse=Ad.reverse;Kt.prototype.toJSON=Kt.prototype.valueOf=Kt.prototype.value=Ad.value;Kt.prototype.first=Kt.prototype.head;GJ&&(Kt.prototype[GJ]=Ad.toIterator);var qs=Kt;var Md=dbe(LQ());window.PlotlyConfig={MathJaxConfig:"local"};var TD=class{constructor(ne,ge){this.model=ne,this.serializers=ge}get(ne){let ge=this.serializers[ne],je=this.model.get(ne);return ge?.deserialize?ge.deserialize(je):je}set(ne,ge){let je=this.serializers[ne];je?.serialize&&(ge=je.serialize(ge)),this.model.set(ne,ge)}on(ne,ge){this.model.on(ne,ge)}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(ne){if(ne==null){var ge=this.model.get("_widget_data").length;ne=qs.range(ge)}return Array.isArray(ne)||(ne=[ne]),ne}do_data(){}do_layout(){}do_addTraces(){var ne=this.model.get("_py2js_addTraces");if(ne!==null){var ge=this.model.get("_widget_data"),je=ne.trace_data;qs.forEach(je,function(mt){ge.push(mt)})}}do_deleteTraces(){var ne=this.model.get("_py2js_deleteTraces");if(ne!==null){var ge=ne.delete_inds,je=this.model.get("_widget_data");ge.slice().reverse().forEach(function(mt){je.splice(mt,1)})}}do_moveTraces(){var ne=this.model.get("_py2js_moveTraces");if(ne!==null){var ge=this.model.get("_widget_data"),je=ne.current_trace_inds,mt=ne.new_trace_inds;AIe(ge,je,mt)}}do_restyle(){var ne=this.model.get("_py2js_restyle");if(ne!==null){var ge=ne.restyle_data,je=this._normalize_trace_indexes(ne.restyle_traces);PQ(this.model.get("_widget_data"),ge,je)}}do_relayout(){var ne=this.model.get("_py2js_relayout");ne!==null&&dA(this.model.get("_widget_layout"),ne.relayout_data)}do_update(){var ne=this.model.get("_py2js_update");if(ne!==null){var ge=ne.style_data,je=ne.layout_data,mt=this._normalize_trace_indexes(ne.style_traces);PQ(this.model.get("_widget_data"),ge,mt),dA(this.model.get("_widget_layout"),je)}}do_animate(){var ne=this.model.get("_py2js_animate");if(ne!==null){for(var ge=ne.style_data,je=ne.layout_data,mt=this._normalize_trace_indexes(ne.style_traces),Lt=0;Ltthis.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 ge=this.model.get("_last_layout_edit_id"),je=this.model.get("_last_trace_edit_id");this.viewID=RQ();var mt=qs.cloneDeep(this.model.get("_widget_data")),Lt=qs.cloneDeep(this.model.get("_widget_layout"));Lt.height||(Lt.height=360);var rr=this.model.get("_config");rr.editSelection=!1,Md.default.newPlot(ne.el,mt,Lt,rr).then(function(){ne._sendTraceDeltas(je),ne._sendLayoutDelta(ge),ne.el.on("plotly_restyle",function(Tr){ne.handle_plotly_restyle(Tr)}),ne.el.on("plotly_relayout",function(Tr){ne.handle_plotly_relayout(Tr)}),ne.el.on("plotly_update",function(Tr){ne.handle_plotly_update(Tr)}),ne.el.on("plotly_click",function(Tr){ne.handle_plotly_click(Tr)}),ne.el.on("plotly_hover",function(Tr){ne.handle_plotly_hover(Tr)}),ne.el.on("plotly_unhover",function(Tr){ne.handle_plotly_unhover(Tr)}),ne.el.on("plotly_selected",function(Tr){ne.handle_plotly_selected(Tr)}),ne.el.on("plotly_deselect",function(Tr){ne.handle_plotly_deselect(Tr)}),ne.el.on("plotly_doubleclick",function(Tr){ne.handle_plotly_doubleclick(Tr)});var Ar=new CustomEvent("plotlywidget-after-render",{detail:{element:ne.el,viewID:ne.viewID}});document.dispatchEvent(Ar)})}_processLuminoMessage(ne,ge){ge.apply(this,arguments);var je=this;switch(ne.type){case"before-attach":var mt={showgrid:!1,showline:!1,tickvals:[]};Md.default.newPlot(je.el,[],{xaxis:mt,yaxis:mt}),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 ne=this,ge=ne.model.get("_widget_layout");(qs.isNil(ge)||qs.isNil(ge.width))&&Md.default.Plots.resize(ne.el).then(function(){var je=ne.model.get("_last_layout_edit_id");ne._sendLayoutDelta(je)})}remove(){Md.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return qs.mergeWith({},this.el._fullData,this.el.data,FQ)}getFullLayout(){return qs.mergeWith({},this.el._fullLayout,this.el.layout,FQ)}buildPointsObject(ne){var ge;if(ne.hasOwnProperty("points")){var je=ne.points,mt=je.length,Lt=!0;for(let ya=0;ya=0;mt--)je.splice(0,0,Q[ne[mt]]),Q.splice(ne[mt],1);var Lt=qs(ge).zip(je).sortBy(0).unzip().value();ge=Lt[0],je=Lt[1];for(var rr=0;rr0&&typeof Lt[0]=="object"){ge[je]=new Array(Lt.length);for(var rr=0;rr0&&(ge[je]=Ar)}else typeof Lt=="object"&&!Array.isArray(Lt)?ge[je]=Ox(Lt,{}):Lt!==void 0&&typeof Lt!="function"&&(ge[je]=Lt)}}return ge}function RQ(Q,ne,ge,je){if(ge||(ge=16),ne===void 0&&(ne=24),ne<=0)return"0";var mt=Math.log(Math.pow(2,ne))/Math.log(ge),Lt="",rr,Ar,Tr;for(rr=2;mt===1/0;rr*=2)mt=Math.log(Math.pow(2,ne/rr))/Math.log(ge)*rr;var Sa=mt-Math.floor(mt);for(rr=0;rr=Math.pow(2,ne)?je>10?(console.warn("randstr failed uniqueness"),Lt):RQ(Q,ne,ge,(je||0)+1):Lt}var j4t=()=>{let Q;return{initialize(ne){Q=new TD(ne.model,_Ie),Q.initialize()},render({el:ne}){let ge=new MD(Q,ne);return ge.perform_render(),()=>ge.remove()}}};export{TD as FigureModel,MD as FigureView,j4t as default}; +`)+On+`return __p +}`;var lo=e_(function(){return Function(yr,ho+"return "+On).apply(void 0,Yr)});if(lo.source=On,am(lo))throw lo;return lo}var LP=ahe;var nhe="Expected a function";function ihe(oe,ye,Fe){var dt=!0,Zt=!0;if(typeof oe!="function")throw new TypeError(nhe);return as(Fe)&&(dt="leading"in Fe?!!Fe.leading:dt,Zt="trailing"in Fe?!!Fe.trailing:Zt),P_(oe,ye,{leading:dt,maxWait:ye,trailing:Zt})}var PP=ihe;function ohe(oe,ye){return ye(oe)}var rp=ohe;var she=9007199254740991,Tw=4294967295,lhe=Math.min;function uhe(oe,ye){if(oe=ji(oe),oe<1||oe>she)return[];var Fe=Tw,dt=lhe(oe,Tw);ye=jc(ye),oe-=Tw;for(var Zt=X0(dt,ye);++Fe-1;);return Fe}var mx=yhe;function _he(oe,ye){for(var Fe=-1,dt=oe.length;++Fe-1;);return Fe}var gx=_he;function xhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return Iy(oe);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=nf(ye),yr=gx(dt,Zt),Yr=mx(dt,Zt)+1;return mh(dt,yr,Yr).join("")}var jP=xhe;function bhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.slice(0,Ry(oe)+1);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=mx(dt,nf(ye))+1;return mh(dt,0,Zt).join("")}var UP=bhe;var whe=/^\s+/;function The(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.replace(whe,"");if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=gx(dt,nf(ye));return mh(dt,Zt).join("")}var qP=The;var Ahe=30,Mhe="...",She=/\w*$/;function Ehe(oe,ye){var Fe=Ahe,dt=Mhe;if(as(ye)){var Zt="separator"in ye?ye.separator:Zt;Fe="length"in ye?ji(ye.length):Fe,dt="omission"in ye?uc(ye.omission):dt}oe=To(oe);var yr=oe.length;if(Kh(oe)){var Yr=nf(oe);yr=Yr.length}if(Fe>=yr)return oe;var ma=Fe-ed(dt);if(ma<1)return dt;var ya=Yr?mh(Yr,0,ma).join(""):oe.slice(0,ma);if(Zt===void 0)return ya+dt;if(Yr&&(ma+=ya.length-ma),Lm(Zt)){if(oe.slice(ma).search(Zt)){var wn,xn=ya;for(Zt.global||(Zt=RegExp(Zt.source,To(She.exec(Zt))+"g")),Zt.lastIndex=0;wn=Zt.exec(xn);)var On=wn.index;ya=ya.slice(0,On===void 0?ma:On)}}else if(oe.indexOf(uc(Zt),ma)!=ma){var Fi=ya.lastIndexOf(Zt);Fi>-1&&(ya=ya.slice(0,Fi))}return ya+dt}var VP=Ehe;function khe(oe){return Yy(oe,1)}var GP=khe;var Che={"&":"&","<":"<",">":">",""":'"',"'":"'"},Lhe=om(Che),HP=Lhe;var WP=/&(?:amp|lt|gt|quot|#39);/g,Phe=RegExp(WP.source);function Rhe(oe){return oe=To(oe),oe&&Phe.test(oe)?oe.replace(WP,HP):oe}var YP=Rhe;var Ihe=1/0,Dhe=jp&&1/qp(new jp([,-0]))[1]==Ihe?function(oe){return new jp(oe)}:U0,XP=Dhe;var Fhe=200;function zhe(oe,ye,Fe){var dt=-1,Zt=Rp,yr=oe.length,Yr=!0,ma=[],ya=ma;if(Fe)Yr=!1,Zt=Am;else if(yr>=Fhe){var wn=ye?null:XP(oe);if(wn)return qp(wn);Yr=!1,Zt=ep,ya=new Up}else ya=ye?[]:ma;e:for(;++dt1||this.__actions__.length||!(dt instanceof fs)||!kf(Fe)?this.thru(Zt):(dt=dt.slice(Fe,+Fe+(ye?1:0)),dt.__actions__.push({func:rp,args:[Zt],thisArg:void 0}),new dh(dt,this.__chain__).thru(function(yr){return ye&&!yr.length&&yr.push(void 0),yr}))}),uR=rde;function ade(){return s_(this)}var cR=ade;function nde(){var oe=this.__wrapped__;if(oe instanceof fs){var ye=oe;return this.__actions__.length&&(ye=new fs(this)),ye=ye.reverse(),ye.__actions__.push({func:rp,args:[Jg],thisArg:void 0}),new dh(ye,this.__chain__)}return this.thru(Jg)}var fR=nde;function ide(oe,ye,Fe){var dt=oe.length;if(dt<2)return dt?Eh(oe[0]):[];for(var Zt=-1,yr=Array(dt);++Zt1?oe[ye-1]:void 0;return Fe=typeof Fe=="function"?(oe.pop(),Fe):void 0,yx(oe,Fe)}),yR=dde;var co={chunk:mk,compact:tC,concat:rC,difference:FC,differenceBy:zC,differenceWith:BC,drop:NC,dropRight:jC,dropRightWhile:UC,dropWhile:qC,fill:e7,findIndex:V_,findLastIndex:H_,first:$g,flatten:Qy,flattenDeep:u7,flattenDepth:c7,fromPairs:_7,head:$g,indexOf:L7,initial:P7,intersection:R7,intersectionBy:I7,intersectionWith:D7,join:p9,last:xu,lastIndexOf:y9,nth:N9,pull:xL,pullAll:sx,pullAllBy:bL,pullAllWith:wL,pullAt:TL,remove:IL,reverse:Jg,slice:$L,sortedIndex:tP,sortedIndexBy:rP,sortedIndexOf:aP,sortedLastIndex:nP,sortedLastIndexBy:iP,sortedLastIndexOf:oP,sortedUniq:sP,sortedUniqBy:lP,tail:_P,take:xP,takeRight:bP,takeRightWhile:wP,takeWhile:TP,union:ZP,unionBy:$P,unionWith:KP,uniq:JP,uniqBy:QP,uniqWith:eR,unzip:Om,unzipWith:yx,without:sR,xor:hR,xorBy:dR,xorWith:pR,zip:vR,zipObject:mR,zipObjectDeep:gR,zipWith:yR};var ul={countBy:bC,each:Wg,eachRight:Yg,every:JC,filter:t7,find:r7,findLast:n7,flatMap:o7,flatMapDeep:s7,flatMapDepth:l7,forEach:Wg,forEachRight:Yg,groupBy:w7,includes:C7,invokeMap:j7,keyBy:m9,map:Wp,orderBy:Y9,partition:dL,reduce:CL,reduceRight:PL,reject:RL,sample:jL,sampleSize:VL,shuffle:XL,size:ZL,some:QL,sortBy:eP};var Aw={now:wm};var Iu={after:CE,ary:Yy,before:t_,bind:r_,bindKey:B8,curry:TC,curryRight:AC,debounce:P_,defer:IC,delay:DC,flip:f7,memoize:Ky,negate:tp,once:G9,overArgs:$9,partial:ox,partialRight:hL,rearg:kL,rest:zL,spread:cP,throttle:PP,unary:GP,wrap:lR};var ko={castArray:pk,clone:$k,cloneDeep:Kk,cloneDeepWith:Jk,cloneWith:Qk,conformsTo:yC,eq:cc,gt:T7,gte:A7,isArguments:jh,isArray:Ii,isArrayBuffer:V7,isArrayLike:Pl,isArrayLikeObject:Fs,isBoolean:G7,isBuffer:Sh,isDate:Y7,isElement:X7,isEmpty:Z7,isEqual:$7,isEqualWith:K7,isError:am,isFinite:J7,isFunction:Ef,isInteger:$_,isLength:Ip,isMap:m_,isMatch:Q7,isMatchWith:e9,isNaN:t9,isNative:a9,isNil:n9,isNull:i9,isNumber:K_,isObject:as,isObjectLike:is,isPlainObject:Cd,isRegExp:Lm,isSafeInteger:u9,isSet:g_,isString:Zp,isSymbol:Ru,isTypedArray:$h,isUndefined:c9,isWeakMap:f9,isWeakSet:h9,lt:b9,lte:w9,toArray:ex,toFinite:Dh,toInteger:ji,toLength:j_,toNumber:Bc,toPlainObject:R_,toSafeInteger:BP,toString:To};var Kf={add:SE,ceil:vk,divide:OC,floor:h7,max:E9,maxBy:k9,mean:C9,meanBy:L9,min:D9,minBy:F9,multiply:z9,round:OL,subtract:mP,sum:gP,sumBy:yP};var e1={clamp:gk,inRange:k7,random:AL};var Ho={assign:c8,assignIn:qg,assignInWith:Dp,assignWith:d8,at:D8,create:wC,defaults:EC,defaultsDeep:RC,entries:Xg,entriesIn:Zg,extend:qg,extendWith:Dp,findKey:a7,findLastKey:i7,forIn:v7,forInRight:m7,forOwn:g7,forOwnRight:y7,functions:x7,functionsIn:b7,get:tm,has:S7,hasIn:_m,invert:z7,invertBy:O7,invoke:N7,keys:Ms,keysIn:Rl,mapKeys:T9,mapValues:A9,merge:P9,mergeWith:I_,omit:q9,omitBy:V9,pick:vL,pickBy:ax,result:BL,set:GL,setWith:HL,toPairs:Xg,toPairsIn:Zg,transform:NP,unset:rR,update:aR,updateWith:nR,values:Qh,valuesIn:oR};var td={at:uR,chain:s_,commit:eC,lodash:Ur,next:O9,plant:mL,reverse:fR,tap:AP,thru:rp,toIterator:IP,toJSON:Qp,value:Qp,valueOf:Qp,wrapperChain:cR};var Us={camelCase:dk,capitalize:n_,deburr:i_,endsWith:GC,escape:O_,escapeRegExp:$C,kebabCase:v9,lowerCase:_9,lowerFirst:x9,pad:lL,padEnd:uL,padStart:cL,parseInt:fL,repeat:DL,replace:FL,snakeCase:KL,split:uP,startCase:fP,startsWith:hP,template:LP,templateSettings:Qg,toLower:DP,toUpper:OP,trim:jP,trimEnd:UP,trimStart:qP,truncate:VP,unescape:YP,upperCase:iR,upperFirst:nm,words:o_};var $s={attempt:e_,bindAll:z8,cond:vC,conforms:gC,constant:G0,defaultTo:MC,flow:d7,flowRight:p7,identity:wl,iteratee:d9,matches:M9,matchesProperty:S9,method:R9,methodOf:I9,mixin:Q_,noop:U0,nthArg:j9,over:X9,overEvery:K9,overSome:J9,property:E_,propertyOf:gL,range:SL,rangeRight:EL,stubArray:cm,stubFalse:Z0,stubObject:dP,stubString:pP,stubTrue:vP,times:RP,toPath:FP,uniqueId:tR};function pde(){var oe=new fs(this.__wrapped__);return oe.__actions__=iu(this.__actions__),oe.__dir__=this.__dir__,oe.__filtered__=this.__filtered__,oe.__iteratees__=iu(this.__iteratees__),oe.__takeCount__=this.__takeCount__,oe.__views__=iu(this.__views__),oe}var _R=pde;function vde(){if(this.__filtered__){var oe=new fs(this);oe.__dir__=-1,oe.__filtered__=!0}else oe=this.clone(),oe.__dir__*=-1;return oe}var xR=vde;var mde=Math.max,gde=Math.min;function yde(oe,ye,Fe){for(var dt=-1,Zt=Fe.length;++dt0||ye<0)?new fs(Fe):(oe<0?Fe=Fe.takeRight(-oe):oe&&(Fe=Fe.drop(oe)),ye!==void 0&&(ye=ji(ye),Fe=ye<0?Fe.dropRight(-ye):Fe.take(ye-oe)),Fe)};fs.prototype.takeRightWhile=function(oe){return this.reverse().takeWhile(oe).reverse()};fs.prototype.toArray=function(){return this.take(MR)};Df(fs.prototype,function(oe,ye){var Fe=/^(?:filter|find|map|reject)|While$/.test(ye),dt=/^(?:head|last)$/.test(ye),Zt=Ur[dt?"take"+(ye=="last"?"Right":""):ye],yr=dt||/^find/.test(ye);Zt&&(Ur.prototype[ye]=function(){var Yr=this.__wrapped__,ma=dt?[1]:arguments,ya=Yr instanceof fs,wn=ma[0],xn=ya||Ii(Yr),On=function(zi){var ze=Zt.apply(Ur,vh([zi],ma));return dt&&Fi?ze[0]:ze};xn&&Fe&&typeof wn=="function"&&wn.length!=1&&(ya=xn=!1);var Fi=this.__chain__,ho=!!this.__actions__.length,Li=yr&&!Fi,lo=ya&&!ho;if(!yr&&xn){Yr=lo?Yr:new fs(this);var Lo=oe.apply(Yr,ma);return Lo.__actions__.push({func:rp,args:[On],thisArg:void 0}),new dh(Lo,Fi)}return Li&&lo?oe.apply(this,ma):(Lo=this.thru(On),Li?dt?Lo.value()[0]:Lo.value():Lo)})});af(["pop","push","shift","sort","splice","unshift"],function(oe){var ye=Ede[oe],Fe=/^(?:push|sort|unshift)$/.test(oe)?"tap":"thru",dt=/^(?:pop|shift)$/.test(oe);Ur.prototype[oe]=function(){var Zt=arguments;if(dt&&!this.__chain__){var yr=this.value();return ye.apply(Ii(yr)?yr:[],Zt)}return this[Fe](function(Yr){return ye.apply(Ii(Yr)?Yr:[],Zt)})}});Df(fs.prototype,function(oe,ye){var Fe=Ur[ye];if(Fe){var dt=Fe.name+"";SR.call(Lp,dt)||(Lp[dt]=[]),Lp[dt].push({name:ye,func:Fe})}});Lp[Y0(void 0,Ade).name]=[{name:"wrapper",func:void 0}];fs.prototype.clone=_R;fs.prototype.reverse=xR;fs.prototype.value=wR;Ur.prototype.at=td.at;Ur.prototype.chain=td.wrapperChain;Ur.prototype.commit=td.commit;Ur.prototype.next=td.next;Ur.prototype.plant=td.plant;Ur.prototype.reverse=td.reverse;Ur.prototype.toJSON=Ur.prototype.valueOf=Ur.prototype.value=td.value;Ur.prototype.first=Ur.prototype.head;TR&&(Ur.prototype[TR]=td.toIterator);var Wl=Ur;var rd=SX(CR());window.PlotlyConfig={MathJaxConfig:"local"};var Sw=class{constructor(ye,Fe){this.model=ye,this.serializers=Fe}get(ye){let Fe=this.serializers[ye],dt=this.model.get(ye);return Fe?.deserialize?Fe.deserialize(dt):dt}set(ye,Fe){let dt=this.serializers[ye];dt?.serialize&&(Fe=dt.serialize(Fe)),this.model.set(ye,Fe)}on(ye,Fe){this.model.on(ye,Fe)}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(ye){if(ye==null){var Fe=this.model.get("_widget_data").length;ye=Wl.range(Fe)}return Array.isArray(ye)||(ye=[ye]),ye}do_data(){}do_layout(){}do_addTraces(){var ye=this.model.get("_py2js_addTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.trace_data;Wl.forEach(dt,function(Zt){Fe.push(Zt)})}}do_deleteTraces(){var ye=this.model.get("_py2js_deleteTraces");if(ye!==null){var Fe=ye.delete_inds,dt=this.model.get("_widget_data");Fe.slice().reverse().forEach(function(Zt){dt.splice(Zt,1)})}}do_moveTraces(){var ye=this.model.get("_py2js_moveTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.current_trace_inds,Zt=ye.new_trace_inds;Dde(Fe,dt,Zt)}}do_restyle(){var ye=this.model.get("_py2js_restyle");if(ye!==null){var Fe=ye.restyle_data,dt=this._normalize_trace_indexes(ye.restyle_traces);PR(this.model.get("_widget_data"),Fe,dt)}}do_relayout(){var ye=this.model.get("_py2js_relayout");ye!==null&&wx(this.model.get("_widget_layout"),ye.relayout_data)}do_update(){var ye=this.model.get("_py2js_update");if(ye!==null){var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces);PR(this.model.get("_widget_data"),Fe,Zt),wx(this.model.get("_widget_layout"),dt)}}do_animate(){var ye=this.model.get("_py2js_animate");if(ye!==null){for(var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.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 Fe=this.model.get("_last_layout_edit_id"),dt=this.model.get("_last_trace_edit_id");this.viewID=IR();var Zt=Wl.cloneDeep(this.model.get("_widget_data")),yr=Wl.cloneDeep(this.model.get("_widget_layout"));yr.height||(yr.height=360);var Yr=this.model.get("_config");Yr.editSelection=!1,rd.default.newPlot(ye.el,Zt,yr,Yr).then(function(){ye._sendTraceDeltas(dt),ye._sendLayoutDelta(Fe),ye.el.on("plotly_restyle",function(ya){ye.handle_plotly_restyle(ya)}),ye.el.on("plotly_relayout",function(ya){ye.handle_plotly_relayout(ya)}),ye.el.on("plotly_update",function(ya){ye.handle_plotly_update(ya)}),ye.el.on("plotly_click",function(ya){ye.handle_plotly_click(ya)}),ye.el.on("plotly_hover",function(ya){ye.handle_plotly_hover(ya)}),ye.el.on("plotly_unhover",function(ya){ye.handle_plotly_unhover(ya)}),ye.el.on("plotly_selected",function(ya){ye.handle_plotly_selected(ya)}),ye.el.on("plotly_deselect",function(ya){ye.handle_plotly_deselect(ya)}),ye.el.on("plotly_doubleclick",function(ya){ye.handle_plotly_doubleclick(ya)});var ma=new CustomEvent("plotlywidget-after-render",{detail:{element:ye.el,viewID:ye.viewID}});document.dispatchEvent(ma)})}_processLuminoMessage(ye,Fe){Fe.apply(this,arguments);var dt=this;switch(ye.type){case"before-attach":var Zt={showgrid:!1,showline:!1,tickvals:[]};rd.default.newPlot(dt.el,[],{xaxis:Zt,yaxis:Zt}),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 ye=this,Fe=ye.model.get("_widget_layout");(Wl.isNil(Fe)||Wl.isNil(Fe.width))&&rd.default.Plots.resize(ye.el).then(function(){var dt=ye.model.get("_last_layout_edit_id");ye._sendLayoutDelta(dt)})}remove(){rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Wl.mergeWith({},this.el._fullData,this.el.data,LR)}getFullLayout(){return Wl.mergeWith({},this.el._fullLayout,this.el.layout,LR)}buildPointsObject(ye){var Fe;if(ye.hasOwnProperty("points")){var dt=ye.points,Zt=dt.length,yr=!0;for(let xn=0;xn/^x\d*$/.test(wn)),yr=Object.keys(dt||{}).some(wn=>/^y\d*$/.test(wn));if(!Zt||!yr)return null;Fe={type:"box",selector_state:dt}}else if(ye.hasOwnProperty("lassoPoints")){var Yr=ye.lassoPoints,ma=Object.keys(Yr||{}).some(wn=>/^x\d*$/.test(wn)),ya=Object.keys(Yr||{}).some(wn=>/^y\d*$/.test(wn));if(!ma||!ya)return null;Fe={type:"lasso",selector_state:Yr}}else Fe=null;return Fe}handle_plotly_restyle(ye){if(ye!=null&&!(ye[0]&&ye[0].hasOwnProperty("_doNotReportToPy"))){var Fe=ye[0],dt=ye[1],Zt={style_data:Fe,style_traces:dt,source_view_id:this.viewID};this.model.set("_js2py_restyle",Zt),this.touch()}}touch(){this.model.save_changes()}handle_plotly_relayout(ye){if(ye!=null&&!ye.hasOwnProperty("_doNotReportToPy")){var Fe={relayout_data:ye,source_view_id:this.viewID};this.model.set("_js2py_relayout",Fe),this.touch()}}handle_plotly_update(ye){if(ye!=null&&!(ye.data&&ye.data[0].hasOwnProperty("_doNotReportToPy"))){var Fe={style_data:ye.data[0],style_traces:ye.data[1],layout_data:ye.layout,source_view_id:this.viewID};this.model.set("_js2py_update",Fe),this.touch()}}handle_plotly_click(ye){this._send_points_callback_message(ye,"plotly_click")}handle_plotly_hover(ye){this._send_points_callback_message(ye,"plotly_hover")}handle_plotly_unhover(ye){this._send_points_callback_message(ye,"plotly_unhover")}handle_plotly_selected(ye){this._send_points_callback_message(ye,"plotly_selected")}handle_plotly_deselect(ye){ye={points:[]},this._send_points_callback_message(ye,"plotly_deselect")}_send_points_callback_message(ye,Fe){if(ye!=null){var dt={event_type:Fe,points:this.buildPointsObject(ye),device_state:this.buildInputDeviceStateObject(ye),selector:this.buildSelectorObject(ye)};dt.points!==null&&dt.points!==void 0&&(this.model.set("_js2py_pointsCallback",dt),this.touch())}}handle_plotly_doubleclick(ye){}do_addTraces(){var ye=this.model.get("_py2js_addTraces");if(ye!==null){var Fe=this;rd.default.addTraces(this.el,ye.trace_data).then(function(){Fe._sendTraceDeltas(ye.trace_edit_id);var dt=ye.layout_edit_id;Fe._sendLayoutDelta(dt)})}}do_deleteTraces(){var ye=this.model.get("_py2js_deleteTraces");if(ye!==null){var Fe=ye.delete_inds,dt=this;rd.default.deleteTraces(this.el,Fe).then(function(){var Zt=ye.trace_edit_id;dt._sendTraceDeltas(Zt);var yr=ye.layout_edit_id;dt._sendLayoutDelta(yr)})}}do_moveTraces(){var ye=this.model.get("_py2js_moveTraces");if(ye!==null){var Fe=ye.current_trace_inds,dt=ye.new_trace_inds,Zt=Wl.isEqual(Fe,dt);Zt||rd.default.moveTraces(this.el,Fe,dt)}}do_restyle(){var ye=this.model.get("_py2js_restyle");if(ye!==null){var Fe=ye.restyle_data,dt=this.model._normalize_trace_indexes(ye.restyle_traces);Fe._doNotReportToPy=!0,rd.default.restyle(this.el,Fe,dt),this._sendTraceDeltas(ye.trace_edit_id);var Zt=ye.layout_edit_id;this._sendLayoutDelta(Zt)}}do_relayout(){var ye=this.model.get("_py2js_relayout");if(ye!==null){if(ye.source_view_id!==this.viewID){var Fe=ye.relayout_data;Fe._doNotReportToPy=!0,rd.default.relayout(this.el,ye.relayout_data)}var dt=ye.layout_edit_id;this._sendLayoutDelta(dt)}}do_update(){var ye=this.model.get("_py2js_update");if(ye!==null){var Fe=ye.style_data||{},dt=ye.layout_data||{},Zt=this.model._normalize_trace_indexes(ye.style_traces);Fe._doNotReportToPy=!0,rd.default.update(this.el,Fe,dt,Zt),this._sendTraceDeltas(ye.trace_edit_id);var yr=ye.layout_edit_id;this._sendLayoutDelta(yr)}}do_animate(){var ye=this.model.get("_py2js_animate");if(ye!==null){var Fe=ye.animation_opts,dt=ye.style_data,Zt=ye.layout_data,yr=this.model._normalize_trace_indexes(ye.style_traces),Yr={data:dt,layout:Zt,traces:yr};Yr._doNotReportToPy=!0;var ma=this;rd.default.animate(this.el,Yr,Fe).then(function(){ma._sendTraceDeltas(ye.trace_edit_id);var ya=ye.layout_edit_id;ma._sendLayoutDelta(ya)})}}_sendLayoutDelta(ye){var Fe=t1(this.getFullLayout(),this.model.get("_widget_layout")),dt={layout_delta:Fe,layout_edit_id:ye};this.model.set("_js2py_widget_layoutDelta",dt),this.touch()}_sendTraceDeltas(ye){for(var Fe=this.model.get("_widget_data"),dt=Wl.range(Fe.length),Zt=new Array(dt.length),yr=this.getFullData(),Yr=0;Yr=0;Zt--)dt.splice(0,0,oe[ye[Zt]]),oe.splice(ye[Zt],1);var yr=Wl(Fe).zip(dt).sortBy(0).unzip().value();Fe=yr[0],dt=yr[1];for(var Yr=0;Yr0&&typeof yr[0]=="object"){Fe[dt]=new Array(yr.length);for(var Yr=0;Yr0&&(Fe[dt]=ma)}else typeof yr=="object"&&!Array.isArray(yr)?Fe[dt]=t1(yr,{}):yr!==void 0&&typeof yr!="function"&&(Fe[dt]=yr)}}return Fe}function IR(oe,ye,Fe,dt){if(Fe||(Fe=16),ye===void 0&&(ye=24),ye<=0)return"0";var Zt=Math.log(Math.pow(2,ye))/Math.log(Fe),yr="",Yr,ma,ya;for(Yr=2;Zt===1/0;Yr*=2)Zt=Math.log(Math.pow(2,ye/Yr))/Math.log(Fe)*Yr;var wn=Zt-Math.floor(Zt);for(Yr=0;Yr=Math.pow(2,ye)?dt>10?(console.warn("randstr failed uniqueness"),yr):IR(oe,ye,Fe,(dt||0)+1):yr}var XWe=()=>{let oe;return{initialize(ye){oe=new Sw(ye.model,Lde),oe.initialize()},render({el:ye}){let Fe=new Ew(oe,ye);return Fe.perform_render(),()=>Fe.remove()}}};export{Sw as FigureModel,Ew as FigureView,XWe as default}; /*! Bundled license information: plotly.js/dist/plotly.js: @@ -3615,20 +3598,29 @@ plotly.js/dist/plotly.js: @license MIT *) - maplibre-gl/dist/maplibre-gl-shared.mjs: - maplibre-gl/dist/maplibre-gl.mjs: + 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/v6.9.0/LICENSE.txt - *) + * MapLibre GL JS + * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.24.0/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" --repo lodash/lodash#4.18.1 -o ./` + * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 From 14a069560f7ebc51be4b1ce9d1cc69d1b546f694 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 22 Oct 2026 15:05:35 -0600 Subject: [PATCH 3/7] Build the selector per trace --- js/src/widget.ts | 12 ------------ plotly/basewidget.py | 43 +++++++++++++++++++++++++++++++------------ 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/js/src/widget.ts b/js/src/widget.ts index cd21d6bf964..e907c365092 100644 --- a/js/src/widget.ts +++ b/js/src/widget.ts @@ -1149,12 +1149,6 @@ export class FigureView { if (data.hasOwnProperty("range")) { // Box selection - preserve all subplot-specific axis keys (x, x2, x3, ... and y, y2, y3, ...) var rangeData = data["range"]; - // Verify we have at least an x and y range (in any subplot) - var hasXRange = Object.keys(rangeData || {}).some((key: string) => /^x\d*$/.test(key)); - var hasYRange = Object.keys(rangeData || {}).some((key: string) => /^y\d*$/.test(key)); - if (!hasXRange || !hasYRange) { - return null; - } selectorObject = { type: "box", selector_state: rangeData, @@ -1162,12 +1156,6 @@ export class FigureView { } else if (data.hasOwnProperty("lassoPoints")) { // Lasso selection - preserve all subplot-specific axis keys var lassoData = data["lassoPoints"]; - // Verify we have at least an x and y coordinate array (in any subplot) - var hasXCoords = Object.keys(lassoData || {}).some((key: string) => /^x\d*$/.test(key)); - var hasYCoords = Object.keys(lassoData || {}).some((key: string) => /^y\d*$/.test(key)); - if (!hasXCoords || !hasYCoords) { - return null; - } selectorObject = { type: "lasso", selector_state: lassoData, diff --git a/plotly/basewidget.py b/plotly/basewidget.py index cbfae557e92..9d606e370a6 100644 --- a/plotly/basewidget.py +++ b/plotly/basewidget.py @@ -9,6 +9,33 @@ import anywidget +def _selector_for_trace(selector_data, trace): + """ + Return the selection as seen from one trace. + + Plotly.js keys the payload by axis id, so a selection in the second + subplot arrives as {"x2": [...], "y2": [...]}. A trace drawn on another + subplot gets None, because that trace was not selected. + """ + state = selector_data["selector_state"] + xaxis = getattr(trace, "xaxis", None) or "x" + yaxis = getattr(trace, "yaxis", None) or "y" + + # "xrange"/"yrange" and "xs"/"ys" come from an older frontend bundle. + selector_type = selector_data["type"] + if selector_type == "box": + return BoxSelector( + xrange=state.get("xrange", state.get(xaxis)), + yrange=state.get("yrange", state.get(yaxis)), + ) + elif selector_type == "lasso": + return LassoSelector( + xs=state.get("xs", state.get(xaxis)), + ys=state.get("ys", state.get(yaxis)), + ) + raise ValueError("Unsupported selector type: %s" % selector_type) + + class BaseFigureWidget(BaseFigure, anywidget.AnyWidget): """ Base class for FigureWidget. The FigureWidget class is code-generated as a @@ -651,18 +678,7 @@ def _handler_js2py_pointsCallback(self, change): # Build Selector Object # --------------------- - if callback_data.get("selector", None): - selector_data = callback_data["selector"] - selector_type = selector_data["type"] - selector_state = selector_data["selector_state"] - if selector_type == "box": - selector = BoxSelector(**selector_state) - elif selector_type == "lasso": - selector = LassoSelector(**selector_state) - else: - raise ValueError("Unsupported selector type: %s" % selector_type) - else: - selector = None + selector_data = callback_data.get("selector", None) # Build Input Device State Object # ------------------------------- @@ -710,6 +726,9 @@ def _handler_js2py_pointsCallback(self, change): elif event_type == "plotly_unhover": trace._dispatch_on_unhover(points, state) elif event_type == "plotly_selected": + selector = ( + _selector_for_trace(selector_data, trace) if selector_data else None + ) trace._dispatch_on_selection(points, selector) elif event_type == "plotly_deselect": trace._dispatch_on_deselect(points) From 84f01eaa4501945b6ee079734530697e444d3564 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 22 Oct 2026 15:07:09 -0600 Subject: [PATCH 4/7] Update widgetbundle --- plotly/package_data/widgetbundle.js | 1256 ++++++++++++++------------- 1 file changed, 632 insertions(+), 624 deletions(-) diff --git a/plotly/package_data/widgetbundle.js b/plotly/package_data/widgetbundle.js index 9d42379fded..f282a51e4cb 100644 --- a/plotly/package_data/widgetbundle.js +++ b/plotly/package_data/widgetbundle.js @@ -1,93 +1,93 @@ -var _X=Object.create;var yE=Object.defineProperty;var xX=Object.getOwnPropertyDescriptor;var bX=Object.getOwnPropertyNames;var wX=Object.getPrototypeOf,TX=Object.prototype.hasOwnProperty;var AX=(oe,ye)=>()=>(ye||oe((ye={exports:{}}).exports,ye),ye.exports);var MX=(oe,ye,Fe,dt)=>{if(ye&&typeof ye=="object"||typeof ye=="function")for(let Zt of bX(ye))!TX.call(oe,Zt)&&Zt!==Fe&&yE(oe,Zt,{get:()=>ye[Zt],enumerable:!(dt=xX(ye,Zt))||dt.enumerable});return oe};var SX=(oe,ye,Fe)=>(Fe=oe!=null?_X(wX(oe)):{},MX(ye||!oe||!oe.__esModule?yE(Fe,"default",{value:oe,enumerable:!0}):Fe,oe));var CR=AX((kR,bx)=>{(function(oe,ye){typeof bx=="object"&&bx.exports?bx.exports=ye():oe.moduleName=ye()})(typeof self<"u"?self:kR,()=>{"use strict";var oe=(()=>{var ye=Object.create,Fe=Object.defineProperty,dt=Object.defineProperties,Zt=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,Yr=Object.getOwnPropertyNames,ma=Object.getOwnPropertySymbols,ya=Object.getPrototypeOf,wn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,On=(J,V)=>(V=Symbol[J])?V:Symbol.for("Symbol."+J),Fi=J=>{throw TypeError(J)},ho=(J,V,p)=>V in J?Fe(J,V,{enumerable:!0,configurable:!0,writable:!0,value:p}):J[V]=p,Li=(J,V)=>{for(var p in V||(V={}))wn.call(V,p)&&ho(J,p,V[p]);if(ma)for(var p of ma(V))xn.call(V,p)&&ho(J,p,V[p]);return J},lo=(J,V)=>dt(J,yr(V)),Lo=(J,V)=>{var p={};for(var b in J)wn.call(J,b)&&V.indexOf(b)<0&&(p[b]=J[b]);if(J!=null&&ma)for(var b of ma(J))V.indexOf(b)<0&&xn.call(J,b)&&(p[b]=J[b]);return p},zi=(J,V,p)=>function(){if(p)throw p[0];try{return J&&(V=(0,J[Yr(J)[0]])(J=0)),V}catch(E){throw p=[E],E}},ze=(J,V)=>function(){try{return V||(0,J[Yr(J)[0]])((V={exports:{}}).exports,V),V.exports}catch(b){throw V=0,b}},bu=(J,V)=>{for(var p in V)Fe(J,p,{get:V[p],enumerable:!0})},uf=(J,V,p,b)=>{if(V&&typeof V=="object"||typeof V=="function")for(let E of Yr(V))!wn.call(J,E)&&E!==p&&Fe(J,E,{get:()=>V[E],enumerable:!(b=Zt(V,E))||b.enumerable});return J},Yl=(J,V,p)=>(p=J!=null?ye(ya(J)):{},uf(V||!J||!J.__esModule?Fe(p,"default",{value:J,enumerable:!0}):p,J)),Po=J=>uf(Fe({},"__esModule",{value:!0}),J),Oh=function(J,V){this[0]=J,this[1]=V},ad=J=>{var V=J[On("asyncIterator")],p=!1,b,E={};return V==null?(V=J[On("iterator")](),b=k=>E[k]=l=>V[k](l)):(V=V.call(J),b=k=>E[k]=l=>{if(p){if(p=!1,k==="throw")throw l;return l}return p=!0,{done:!1,value:new Oh(new Promise(e=>{var t=V[k](l);t instanceof Object||Fi("Object expected"),e(t)}),1)}}),E[On("iterator")]=()=>E,b("next"),"throw"in V?b("throw"):E.throw=k=>{throw k},"return"in V&&b("return"),E},ev=ze({"src/version.js"(J){"use strict";J.version="4.0.0"}}),DR=ze({"node_modules/native-promise-only/lib/npo.src.js"(J,V){(function(b,E,k){E[b]=E[b]||k(),typeof V<"u"&&V.exports&&(V.exports=E[b])})("Promise",typeof window<"u"?window:J,function(){"use strict";var b,E,k,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(w,S,M,C){return Object.defineProperty(w,S,{value:M,writable:!0,configurable:C!==!1})}}catch{b=function(S,M,C){return S[M]=C,S}}k=function(){var w,S,M;function C(_,T){this.fn=_,this.self=T,this.next=void 0}return{add:function(T,f){M=new C(T,f),S?S.next=M:w=M,S=M,M=void 0},drain:function(){var T=w;for(w=S=E=void 0;T;)T.fn.call(T.self),T=T.next}}}();function t(i,w){k.add(i,w),E||(E=e(k.drain))}function n(i){var w,S=typeof i;return i!=null&&(S=="object"||S=="function")&&(w=i.then),typeof w=="function"?w:!1}function r(){for(var i=0;i0&&t(r,S))}catch(M){s.call(new m(S),M)}}}function s(i){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=i,w.state=2,w.chain.length>0&&t(r,w))}function c(i,w,S,M){for(var C=0;CEe?1:de>=Ee?0:NaN}p.descending=function(de,Ee){return Eede?1:Ee>=de?0:NaN},p.min=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}return at},p.max=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}return at},p.extent=function(de,Ee){var qe=-1,tt=de.length,at,ct,Nt;if(arguments.length===1){for(;++qe=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt1)return Nt/(Jt-1)},p.deviation=function(){var de=p.variance.apply(this,arguments);return de&&Math.sqrt(de)};function h(de){return{left:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)<0?tt=ct+1:at=ct}return tt},right:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)>0?at=ct:tt=ct+1}return tt}}}var v=h(s);p.bisectLeft=v.left,p.bisect=p.bisectRight=v.right,p.bisector=function(de){return h(de.length===1?function(Ee,qe){return s(de(Ee),qe)}:de)},p.shuffle=function(de,Ee,qe){(tt=arguments.length)<3&&(qe=de.length,tt<2&&(Ee=0));for(var tt=qe-Ee,at,ct;tt;)ct=Math.random()*tt--|0,at=de[tt+Ee],de[tt+Ee]=de[ct+Ee],de[ct+Ee]=at;return de},p.permute=function(de,Ee){for(var qe=Ee.length,tt=new Array(qe);qe--;)tt[qe]=de[Ee[qe]];return tt},p.pairs=function(de){for(var Ee=0,qe=de.length-1,tt,at=de[0],ct=new Array(qe<0?0:qe);Ee=0;)for(Nt=de[Ee],qe=Nt.length;--qe>=0;)ct[--at]=Nt[qe];return ct};var i=Math.abs;p.range=function(de,Ee,qe){if(arguments.length<3&&(qe=1,arguments.length<2&&(Ee=de,de=0)),(Ee-de)/qe===1/0)throw new Error("infinite range");var tt=[],at=w(i(qe)),ct=-1,Nt;if(de*=at,Ee*=at,qe*=at,qe<0)for(;(Nt=de+qe*++ct)>Ee;)tt.push(Nt/at);else for(;(Nt=de+qe*++ct)=Ee.length)return at?at.call(de,Jt):tt?Jt.sort(tt):Jt;for(var gr=-1,Hr=Jt.length,Vr=Ee[mr++],ca,Aa,Xr,oa=new M,fa;++gr=Ee.length)return St;var mr=[],gr=qe[Jt++];return St.forEach(function(Hr,Vr){mr.push({key:Hr,values:Nt(Vr,Jt)})}),gr?mr.sort(function(Hr,Vr){return gr(Hr.key,Vr.key)}):mr}return de.map=function(St,Jt){return ct(Jt,St,0)},de.entries=function(St){return Nt(ct(p.map,St,0),0)},de.key=function(St){return Ee.push(St),de},de.sortKeys=function(St){return qe[Ee.length-1]=St,de},de.sortValues=function(St){return tt=St,de},de.rollup=function(St){return at=St,de},de},p.set=function(de){var Ee=new O;if(de)for(var qe=0,tt=de.length;qe=0&&(tt=de.slice(qe+1),de=de.slice(0,qe)),de)return arguments.length<2?this[de].on(tt):this[de].on(tt,Ee);if(arguments.length===2){if(Ee==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(tt,null);return this}};function $(de){var Ee=[],qe=new M;function tt(){for(var at=Ee,ct=-1,Nt=at.length,St;++ct=0&&(qe=de.slice(0,Ee))!=="xmlns"&&(de=de.slice(Ee+1)),he.hasOwnProperty(qe)?{space:he[qe],local:de}:de}},q.attr=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node();return de=p.ns.qualify(de),de.local?qe.getAttributeNS(de.space,de.local):qe.getAttribute(de)}for(Ee in de)this.each(xe(Ee,de[Ee]));return this}return this.each(xe(de,Ee))};function xe(de,Ee){de=p.ns.qualify(de);function qe(){this.removeAttribute(de)}function tt(){this.removeAttributeNS(de.space,de.local)}function at(){this.setAttribute(de,Ee)}function ct(){this.setAttributeNS(de.space,de.local,Ee)}function Nt(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttribute(de):this.setAttribute(de,Jt)}function St(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,Jt)}return Ee==null?de.local?tt:qe:typeof Ee=="function"?de.local?St:Nt:de.local?ct:at}function we(de){return de.trim().replace(/\s+/g," ")}q.classed=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node(),tt=(de=Se(de)).length,at=-1;if(Ee=qe.classList){for(;++at=0;)(ct=qe[tt])&&(at&&at!==ct.nextSibling&&at.parentNode.insertBefore(ct,at),at=ct);return this},q.sort=function(de){de=Ae.apply(this,arguments);for(var Ee=-1,qe=this.length;++Ee=Ee&&(Ee=at+1);!(Jt=Nt[Ee])&&++Ee0&&(de=de.slice(0,at));var Nt=Tt.get(de);Nt&&(de=Nt,ct=$t);function St(){var gr=this[tt];gr&&(this.removeEventListener(de,gr,gr.$),delete this[tt])}function Jt(){var gr=ct(Ee,E(arguments));St.call(this),this.addEventListener(de,this[tt]=gr,gr.$=qe),gr._=Ee}function mr(){var gr=new RegExp("^__on([^.]+)"+p.requote(de)+"$"),Hr;for(var Vr in this)if(Hr=Vr.match(gr)){var ca=this[Vr];this.removeEventListener(Hr[1],ca,ca.$),delete this[Vr]}}return at?Ee?Jt:St:Ee?j:mr}var Tt=p.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Tt.forEach(function(de){"on"+de in k&&Tt.remove(de)});function At(de,Ee){return function(qe){var tt=p.event;p.event=qe,Ee[0]=this.__data__;try{de.apply(this,Ee)}finally{p.event=tt}}}function $t(de,Ee){var qe=At(de,Ee);return function(tt){var at=this,ct=tt.relatedTarget;(!ct||ct!==at&&!(ct.compareDocumentPosition(at)&8))&&qe.call(at,tt)}}var rr,_r=0;function Xt(de){var Ee=".dragsuppress-"+ ++_r,qe="click"+Ee,tt=p.select(e(de)).on("touchmove"+Ee,Q).on("dragstart"+Ee,Q).on("selectstart"+Ee,Q);if(rr==null&&(rr="onselectstart"in de?!1:F(de.style,"userSelect")),rr){var at=l(de).style,ct=at[rr];at[rr]="none"}return function(Nt){if(tt.on(Ee,null),rr&&(at[rr]=ct),Nt){var St=function(){tt.on(qe,null)};tt.on(qe,function(){Q(),St()},!0),setTimeout(St,0)}}}p.mouse=function(de){return Ot(de,re())};var or=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(de,Ee){Ee.changedTouches&&(Ee=Ee.changedTouches[0]);var qe=de.ownerSVGElement||de;if(qe.createSVGPoint){var tt=qe.createSVGPoint();if(or<0){var at=e(de);if(at.scrollX||at.scrollY){qe=p.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ct=qe[0][0].getScreenCTM();or=!(ct.f||ct.e),qe.remove()}}return or?(tt.x=Ee.pageX,tt.y=Ee.pageY):(tt.x=Ee.clientX,tt.y=Ee.clientY),tt=tt.matrixTransform(de.getScreenCTM().inverse()),[tt.x,tt.y]}var Nt=de.getBoundingClientRect();return[Ee.clientX-Nt.left-de.clientLeft,Ee.clientY-Nt.top-de.clientTop]}p.touch=function(de,Ee,qe){if(arguments.length<3&&(qe=Ee,Ee=re().changedTouches),Ee){for(var tt=0,at=Ee.length,ct;tt0?1:de<0?-1:0}function Pt(de,Ee,qe){return(Ee[0]-de[0])*(qe[1]-de[1])-(Ee[1]-de[1])*(qe[0]-de[0])}function Ct(de){return de>1?0:de<-1?Ne:Math.acos(de)}function qt(de){return de>1?Je:de<-1?-Je:Math.asin(de)}function Vt(de){return((de=Math.exp(de))-1/de)/2}function Ht(de){return((de=Math.exp(de))+1/de)/2}function Sr(de){return((de=Math.exp(2*de))-1)/(de+1)}function Kr(de){return(de=Math.sin(de/2))*de}var Yt=Math.SQRT2,Rt=2,nr=4;p.interpolateZoom=function(de,Ee){var qe=de[0],tt=de[1],at=de[2],ct=Ee[0],Nt=Ee[1],St=Ee[2],Jt=ct-qe,mr=Nt-tt,gr=Jt*Jt+mr*mr,Hr,Vr;if(gr0&&(be=be.transition().duration(Nt)),be.call(Ma.event)}function xi(){oa&&oa.domain(Xr.range().map(function(be){return(be-de.x)/de.k}).map(Xr.invert)),Ea&&Ea.domain(fa.range().map(function(be){return(be-de.y)/de.k}).map(fa.invert))}function di(be){St++||be({type:"zoomstart"})}function uo(be){xi(),be({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function pe(be){--St||(be({type:"zoomend"}),qe=null)}function y(){var be=this,Re=Aa.of(be,arguments),je=0,Ze=p.select(e(be)).on(mr,Dt).on(gr,Gt),ut=sa(p.mouse(be)),ft=Xt(be);Qi.call(be),di(Re);function Dt(){je=1,zn(p.mouse(be),ut),uo(Re)}function Gt(){Ze.on(mr,null).on(gr,null),ft(je),pe(Re)}}function N(){var be=this,Re=Aa.of(be,arguments),je={},Ze=0,ut,ft=".zoom-"+p.event.changedTouches[0].identifier,Dt="touchmove"+ft,Gt="touchend"+ft,Kt=[],st=p.select(be),It=Xt(be);ir(),di(Re),st.on(Jt,null).on(Vr,ir);function Ut(){var hr=p.touches(be);return ut=de.k,hr.forEach(function(vr){vr.identifier in je&&(je[vr.identifier]=sa(vr))}),hr}function ir(){var hr=p.event.target;p.select(hr).on(Dt,dr).on(Gt,Ar),Kt.push(hr);for(var vr=p.event.changedTouches,Or=0,Cr=vr.length;Or1){var Ta=ta[0],Ra=ta[1],ua=Ta[0]-Ra[0],ia=Ta[1]-Ra[1];Ze=ua*ua+ia*ia}}function dr(){var hr=p.touches(be),vr,Or,Cr,ta;Qi.call(be);for(var ka=0,Ta=hr.length;ka1?1:Ee,qe=qe<0?0:qe>1?1:qe,at=qe<=.5?qe*(1+Ee):qe+Ee-qe*Ee,tt=2*qe-at;function ct(St){return St>360?St-=360:St<0&&(St+=360),St<60?tt+(at-tt)*St/60:St<180?at:St<240?tt+(at-tt)*(240-St)/60:tt}function Nt(St){return Math.round(ct(St)*255)}return new Oa(Nt(de+120),Nt(de),Nt(de-120))}p.hcl=La;function La(de,Ee,qe){return this instanceof La?(this.h=+de,this.c=+Ee,void(this.l=+qe)):arguments.length<2?de instanceof La?new La(de.h,de.c,de.l):de instanceof ja?en(de.l,de.a,de.b):en((de=Dr((de=p.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new La(de,Ee,qe)}var un=La.prototype=new Qr;un.brighter=function(de){return new La(this.h,this.c,Math.min(100,this.l+Nn*(arguments.length?de:1)))},un.darker=function(de){return new La(this.h,this.c,Math.max(0,this.l-Nn*(arguments.length?de:1)))},un.rgb=function(){return Xa(this.h,this.c,this.l).rgb()};function Xa(de,Ee,qe){return isNaN(de)&&(de=0),isNaN(Ee)&&(Ee=0),new ja(qe,Math.cos(de*=et)*Ee,Math.sin(de)*Ee)}p.lab=ja;function ja(de,Ee,qe){return this instanceof ja?(this.l=+de,this.a=+Ee,void(this.b=+qe)):arguments.length<2?de instanceof ja?new ja(de.l,de.a,de.b):de instanceof La?Xa(de.h,de.c,de.l):Dr((de=Oa(de)).r,de.g,de.b):new ja(de,Ee,qe)}var Nn=18,yn=.95047,Un=1,li=1.08883,Yn=ja.prototype=new Qr;Yn.brighter=function(de){return new ja(Math.min(100,this.l+Nn*(arguments.length?de:1)),this.a,this.b)},Yn.darker=function(de){return new ja(Math.max(0,this.l-Nn*(arguments.length?de:1)),this.a,this.b)},Yn.rgb=function(){return on(this.l,this.a,this.b)};function on(de,Ee,qe){var tt=(de+16)/116,at=tt+Ee/500,ct=tt-qe/200;return at=vi(at)*yn,tt=vi(tt)*Un,ct=vi(ct)*li,new Oa(Ja(3.2404542*at-1.5371385*tt-.4985314*ct),Ja(-.969266*at+1.8760108*tt+.041556*ct),Ja(.0556434*at-.2040259*tt+1.0572252*ct))}function en(de,Ee,qe){return de>0?new La(Math.atan2(qe,Ee)*Mt,Math.sqrt(Ee*Ee+qe*qe),de):new La(NaN,NaN,de)}function vi(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function Yi(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function Ja(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}p.rgb=Oa;function Oa(de,Ee,qe){return this instanceof Oa?(this.r=~~de,this.g=~~Ee,void(this.b=~~qe)):arguments.length<2?de instanceof Oa?new Oa(de.r,de.g,de.b):Tr(""+de,Oa,Pa):new Oa(de,Ee,qe)}function lt(de){return new Oa(de>>16,de>>8&255,de&255)}function rt(de){return lt(de)+""}var fr=Oa.prototype=new Qr;fr.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Ee=this.r,qe=this.g,tt=this.b,at=30;return!Ee&&!qe&&!tt?new Oa(at,at,at):(Ee&&Ee>4,tt=tt>>4|tt,at=Jt&240,at=at>>4|at,ct=Jt&15,ct=ct<<4|ct):de.length===7&&(tt=(Jt&16711680)>>16,at=(Jt&65280)>>8,ct=Jt&255)),Ee(tt,at,ct))}function Ir(de,Ee,qe){var tt=Math.min(de/=255,Ee/=255,qe/=255),at=Math.max(de,Ee,qe),ct=at-tt,Nt,St,Jt=(at+tt)/2;return ct?(St=Jt<.5?ct/(at+tt):ct/(2-at-tt),de==at?Nt=(Ee-qe)/ct+(Ee0&&Jt<1?0:Nt),new Zr(Nt,St,Jt)}function Dr(de,Ee,qe){de=ot(de),Ee=ot(Ee),qe=ot(qe);var tt=Yi((.4124564*de+.3575761*Ee+.1804375*qe)/yn),at=Yi((.2126729*de+.7151522*Ee+.072175*qe)/Un),ct=Yi((.0193339*de+.119192*Ee+.9503041*qe)/li);return ja(116*at-16,500*(tt-at),200*(at-ct))}function ot(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function kt(de){var Ee=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Ee*2.55):Ee}var jt=p.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});jt.forEach(function(de,Ee){jt.set(de,lt(Ee))});function ar(de){return typeof de=="function"?de:function(){return de}}p.functor=ar,p.xhr=Er(D);function Er(de){return function(Ee,qe,tt){return arguments.length===2&&typeof qe=="function"&&(tt=qe,qe=null),xr(Ee,qe,de,tt)}}function xr(de,Ee,qe,tt){var at={},ct=p.dispatch("beforesend","progress","load","error"),Nt={},St=new XMLHttpRequest,Jt=null;self.XDomainRequest&&!("withCredentials"in St)&&/^(http(s)?:)?\/\//.test(de)&&(St=new XDomainRequest),"onload"in St?St.onload=St.onerror=mr:St.onreadystatechange=function(){St.readyState>3&&mr()};function mr(){var gr=St.status,Hr;if(!gr&&Lr(St)||gr>=200&&gr<300||gr===304){try{Hr=qe.call(at,St)}catch(Vr){ct.error.call(at,Vr);return}ct.load.call(at,Hr)}else ct.error.call(at,St)}return St.onprogress=function(gr){var Hr=p.event;p.event=gr;try{ct.progress.call(at,St)}finally{p.event=Hr}},at.header=function(gr,Hr){return gr=(gr+"").toLowerCase(),arguments.length<2?Nt[gr]:(Hr==null?delete Nt[gr]:Nt[gr]=Hr+"",at)},at.mimeType=function(gr){return arguments.length?(Ee=gr==null?null:gr+"",at):Ee},at.responseType=function(gr){return arguments.length?(Jt=gr,at):Jt},at.response=function(gr){return qe=gr,at},["get","post"].forEach(function(gr){at[gr]=function(){return at.send.apply(at,[gr].concat(E(arguments)))}}),at.send=function(gr,Hr,Vr){if(arguments.length===2&&typeof Hr=="function"&&(Vr=Hr,Hr=null),St.open(gr,de,!0),Ee!=null&&!("accept"in Nt)&&(Nt.accept=Ee+",*/*"),St.setRequestHeader)for(var ca in Nt)St.setRequestHeader(ca,Nt[ca]);return Ee!=null&&St.overrideMimeType&&St.overrideMimeType(Ee),Jt!=null&&(St.responseType=Jt),Vr!=null&&at.on("error",Vr).on("load",function(Aa){Vr(null,Aa)}),ct.beforesend.call(at,St),St.send(Hr??null),at},at.abort=function(){return St.abort(),at},p.rebind(at,ct,"on"),tt==null?at:at.get(zr(tt))}function zr(de){return de.length===1?function(Ee,qe){de(Ee==null?qe:null)}:de}function Lr(de){var Ee=de.responseType;return Ee&&Ee!=="text"?de.response:de.responseText}p.dsv=function(de,Ee){var qe=new RegExp('["'+de+` -]`),tt=de.charCodeAt(0);function at(mr,gr,Hr){arguments.length<3&&(Hr=gr,gr=null);var Vr=xr(mr,Ee,gr==null?ct:Nt(gr),Hr);return Vr.row=function(ca){return arguments.length?Vr.response((gr=ca)==null?ct:Nt(ca)):gr},Vr}function ct(mr){return at.parse(mr.responseText)}function Nt(mr){return function(gr){return at.parse(gr.responseText,mr)}}at.parse=function(mr,gr){var Hr;return at.parseRows(mr,function(Vr,ca){if(Hr)return Hr(Vr,ca-1);var Aa=function(Xr){for(var oa={},fa=Vr.length,Ea=0;Ea=Aa)return Vr;if(Ea)return Ea=!1,Hr;var hn=Xr;if(mr.charCodeAt(hn)===34){for(var An=hn;An++24?(isFinite(Ee)&&(clearTimeout(pn),pn=setTimeout(rn,Ee)),wa=0):(wa=1,tn(rn))}p.timer.flush=function(){Ri(),Gn()};function Ri(){for(var de=Date.now(),Ee=aa;Ee;)de>=Ee.t&&Ee.c(de-Ee.t)&&(Ee.c=null),Ee=Ee.n;return de}function Gn(){for(var de,Ee=aa,qe=1/0;Ee;)Ee.c?(Ee.t=0;--St)Xr.push(at[mr[Hr[St]][2]]);for(St=+ca;St1&&Pt(de[qe[tt-2]],de[qe[tt-1]],de[at])<=0;)--tt;qe[tt++]=at}return qe.slice(0,tt)}function Ai(de,Ee){return de[0]-Ee[0]||de[1]-Ee[1]}p.geom.polygon=function(de){return G(de,jn),de};var jn=p.geom.polygon.prototype=[];jn.area=function(){for(var de=-1,Ee=this.length,qe,tt=this[Ee-1],at=0;++deht)St=St.L;else if(Nt=Ee-Wo(St,qe),Nt>ht){if(!St.R){tt=St;break}St=St.R}else{ct>-ht?(tt=St.P,at=St):Nt>-ht?(tt=St,at=St.N):tt=at=St;break}var Jt=go(de);if(oo.insert(tt,Jt),!(!tt&&!at)){if(tt===at){Xi(tt),at=go(tt.site),oo.insert(Jt,at),Jt.edge=at.edge=Vo(tt.site,Jt.site),Io(tt),Io(at);return}if(!at){Jt.edge=Vo(tt.site,Jt.site);return}Xi(tt),Xi(at);var mr=tt.site,gr=mr.x,Hr=mr.y,Vr=de.x-gr,ca=de.y-Hr,Aa=at.site,Xr=Aa.x-gr,oa=Aa.y-Hr,fa=2*(Vr*oa-ca*Xr),Ea=Vr*Vr+ca*ca,Ma=Xr*Xr+oa*oa,sa={x:(oa*Ea-ca*Ma)/fa+gr,y:(Vr*Ma-Xr*Ea)/fa+Hr};Ts(at.edge,mr,Aa,sa),Jt.edge=Vo(mr,de,null,sa),at.edge=Vo(de,Aa,null,sa),Io(tt),Io(at)}}function jo(de,Ee){var qe=de.site,tt=qe.x,at=qe.y,ct=at-Ee;if(!ct)return tt;var Nt=de.P;if(!Nt)return-1/0;qe=Nt.site;var St=qe.x,Jt=qe.y,mr=Jt-Ee;if(!mr)return St;var gr=St-tt,Hr=1/ct-1/mr,Vr=gr/mr;return Hr?(-Vr+Math.sqrt(Vr*Vr-2*Hr*(gr*gr/(-2*mr)-Jt+mr/2+at-ct/2)))/Hr+tt:(tt+St)/2}function Wo(de,Ee){var qe=de.N;if(qe)return jo(qe,Ee);var tt=de.site;return tt.y===Ee?tt.x:1/0}function to(de){this.site=de,this.edges=[]}to.prototype.prepare=function(){for(var de=this.edges,Ee=de.length,qe;Ee--;)qe=de[Ee].edge,(!qe.b||!qe.a)&&de.splice(Ee,1);return de.sort(pi),de.length};function wo(de){for(var Ee=de[0][0],qe=de[1][0],tt=de[0][1],at=de[1][1],ct,Nt,St,Jt,mr=io,gr=mr.length,Hr,Vr,ca,Aa,Xr,oa;gr--;)if(Hr=mr[gr],!(!Hr||!Hr.prepare()))for(ca=Hr.edges,Aa=ca.length,Vr=0;Vrht||i(Jt-Nt)>ht)&&(ca.splice(Vr,0,new Bo(Vs(Hr.site,oa,i(St-Ee)ht?{x:Ee,y:i(ct-Ee)ht?{x:i(Nt-at)ht?{x:qe,y:i(ct-qe)ht?{x:i(Nt-tt)=-De)){var Vr=Jt*Jt+mr*mr,ca=gr*gr+oa*oa,Aa=(oa*Vr-mr*ca)/Hr,Xr=(Jt*ca-gr*Vr)/Hr,oa=Xr+St,fa=Mi.pop()||new Vi;fa.arc=de,fa.site=at,fa.x=Aa+Nt,fa.y=oa+Math.sqrt(Aa*Aa+Xr*Xr),fa.cy=oa,de.circle=fa;for(var Ea=null,Ma=Hi._;Ma;)if(fa.y0)){if(Xr/=ca,ca<0){if(Xr0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}if(Xr=qe-St,!(!ca&&Xr<0)){if(Xr/=ca,ca<0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}else if(ca>0){if(Xr0)){if(Xr/=Aa,Aa<0){if(Xr0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}if(Xr=tt-Jt,!(!Aa&&Xr<0)){if(Xr/=Aa,Aa<0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}else if(Aa>0){if(Xr0&&(at.a={x:St+Hr*ca,y:Jt+Hr*Aa}),Vr<1&&(at.b={x:St+Vr*ca,y:Jt+Vr*Aa}),at}}}}}}function Uo(de){for(var Ee=qi,qe=Ko(de[0][0],de[0][1],de[1][0],de[1][1]),tt=Ee.length,at;tt--;)at=Ee[tt],(!Ls(at,de)||!qe(at)||i(at.a.x-at.b.x)=ct)return;if(gr>Vr){if(!tt)tt={x:Aa,y:Nt};else if(tt.y>=St)return;qe={x:Aa,y:St}}else{if(!tt)tt={x:Aa,y:St};else if(tt.y1)if(gr>Vr){if(!tt)tt={x:(Nt-fa)/oa,y:Nt};else if(tt.y>=St)return;qe={x:(St-fa)/oa,y:St}}else{if(!tt)tt={x:(St-fa)/oa,y:St};else if(tt.y=ct)return;qe={x:ct,y:oa*ct+fa}}else{if(!tt)tt={x:ct,y:oa*ct+fa};else if(tt.x=gr&&fa.x<=Vr&&fa.y>=Hr&&fa.y<=ca?[[gr,ca],[Vr,ca],[Vr,Hr],[gr,Hr]]:[];Ea.point=Jt[Xr]}),mr}function St(Jt){return Jt.map(function(mr,gr){return{x:Math.round(tt(mr,gr)/ht)*ht,y:Math.round(at(mr,gr)/ht)*ht,i:gr}})}return Nt.links=function(Jt){return hl(St(Jt)).edges.filter(function(mr){return mr.l&&mr.r}).map(function(mr){return{source:Jt[mr.l.i],target:Jt[mr.r.i]}})},Nt.triangles=function(Jt){var mr=[];return hl(St(Jt)).cells.forEach(function(gr,Hr){for(var Vr=gr.site,ca=gr.edges.sort(pi),Aa=-1,Xr=ca.length,oa,fa,Ea=ca[Xr-1].edge,Ma=Ea.l===Vr?Ea.r:Ea.l;++AaMa&&(Ma=gr.x),gr.y>sa&&(sa=gr.y),ca.push(gr.x),Aa.push(gr.y);else for(Xr=0;XrMa&&(Ma=hn),An>sa&&(sa=An),ca.push(hn),Aa.push(An)}var zn=Ma-fa,$n=sa-Ea;zn>$n?sa=Ea+zn:Ma=fa+$n;function xi(pe,y,N,ie,fe,be,Re,je){if(!(isNaN(N)||isNaN(ie)))if(pe.leaf){var Ze=pe.x,ut=pe.y;if(Ze!=null)if(i(Ze-N)+i(ut-ie)<.01)di(pe,y,N,ie,fe,be,Re,je);else{var ft=pe.point;pe.x=pe.y=pe.point=null,di(pe,ft,Ze,ut,fe,be,Re,je),di(pe,y,N,ie,fe,be,Re,je)}else pe.x=N,pe.y=ie,pe.point=y}else di(pe,y,N,ie,fe,be,Re,je)}function di(pe,y,N,ie,fe,be,Re,je){var Ze=(fe+Re)*.5,ut=(be+je)*.5,ft=N>=Ze,Dt=ie>=ut,Gt=Dt<<1|ft;pe.leaf=!1,pe=pe.nodes[Gt]||(pe.nodes[Gt]=Fl()),ft?fe=Ze:Re=Ze,Dt?be=ut:je=ut,xi(pe,y,N,ie,fe,be,Re,je)}var uo=Fl();if(uo.add=function(pe){xi(uo,pe,+Hr(pe,++Xr),+Vr(pe,Xr),fa,Ea,Ma,sa)},uo.visit=function(pe){pl(pe,uo,fa,Ea,Ma,sa)},uo.find=function(pe){return $u(uo,pe[0],pe[1],fa,Ea,Ma,sa)},Xr=-1,Ee==null){for(;++Xrct||Vr>Nt||ca=hn,$n=qe>=An,xi=$n<<1|zn,di=xi+4;xiqe&&(ct=Ee.slice(qe,ct),St[Nt]?St[Nt]+=ct:St[++Nt]=ct),(tt=tt[0])===(at=at[0])?St[Nt]?St[Nt]+=at:St[++Nt]=at:(St[++Nt]=null,Jt.push({i:Nt,x:vs(tt,at)})),qe=rl.lastIndex;return qe=0&&!(tt=p.interpolators[qe](de,Ee)););return tt}p.interpolators=[function(de,Ee){var qe=typeof Ee;return(qe==="string"?jt.has(Ee.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ee)?uu:os:Ee instanceof Qr?uu:Array.isArray(Ee)?zu:qe==="object"&&isNaN(Ee)?tl:vs)(de,Ee)}],p.interpolateArray=zu;function zu(de,Ee){var qe=[],tt=[],at=de.length,ct=Ee.length,Nt=Math.min(de.length,Ee.length),St;for(St=0;St=0?de.slice(0,Ee):de,tt=Ee>=0?de.slice(Ee+1):"in";return qe=bc.get(qe)||Ku,tt=Lh.get(tt)||D,rh(tt(qe.apply(null,b.call(arguments,1))))};function rh(de){return function(Ee){return Ee<=0?0:Ee>=1?1:de(Ee)}}function Ju(de){return function(Ee){return 1-de(1-Ee)}}function ss(de){return function(Ee){return .5*(Ee<.5?de(2*Ee):2-de(2-2*Ee))}}function ah(de){return de*de}function wc(de){return de*de*de}function pc(de){if(de<=0)return 0;if(de>=1)return 1;var Ee=de*de,qe=Ee*de;return 4*(de<.5?qe:3*(de-Ee)+qe-.75)}function Nf(de){return function(Ee){return Math.pow(Ee,de)}}function Bu(de){return 1-Math.cos(de*Je)}function Tc(de){return Math.pow(2,10*(de-1))}function Ou(de){return 1-Math.sqrt(1-de*de)}function Gc(de,Ee){var qe;return arguments.length<2&&(Ee=.45),arguments.length?qe=Ee/We*Math.asin(1/de):(de=1,qe=Ee/4),function(tt){return 1+de*Math.pow(2,-10*tt)*Math.sin((tt-qe)*We/Ee)}}function pf(de){return de||(de=1.70158),function(Ee){return Ee*Ee*((de+1)*Ee-de)}}function $l(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}p.interpolateHcl=jf;function jf(de,Ee){de=p.hcl(de),Ee=p.hcl(Ee);var qe=de.h,tt=de.c,at=de.l,ct=Ee.h-qe,Nt=Ee.c-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.c:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Xa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateHsl=Hc;function Hc(de,Ee){de=p.hsl(de),Ee=p.hsl(Ee);var qe=de.h,tt=de.s,at=de.l,ct=Ee.h-qe,Nt=Ee.s-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.s:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Pa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateLab=Wc;function Wc(de,Ee){de=p.lab(de),Ee=p.lab(Ee);var qe=de.l,tt=de.a,at=de.b,ct=Ee.l-qe,Nt=Ee.a-tt,St=Ee.b-at;return function(Jt){return on(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateRound=Qu;function Qu(de,Ee){return Ee-=de,function(qe){return Math.round(de+Ee*qe)}}p.transform=function(de){var Ee=k.createElementNS(p.ns.prefix.svg,"g");return(p.transform=function(qe){if(qe!=null){Ee.setAttribute("transform",qe);var tt=Ee.transform.baseVal.consolidate()}return new Yc(tt?tt.matrix:Xc)})(de)};function Yc(de){var Ee=[de.a,de.b],qe=[de.c,de.d],tt=Uf(Ee),at=Nu(Ee,qe),ct=Uf(al(qe,Ee,-at))||0;Ee[0]*qe[1]180?Ee+=360:Ee-de>180&&(de+=360),tt.push({i:qe.push(ju(qe)+"rotate(",null,")")-2,x:vs(de,Ee)})):Ee&&qe.push(ju(qe)+"rotate("+Ee+")")}function ec(de,Ee,qe,tt){de!==Ee?tt.push({i:qe.push(ju(qe)+"skewX(",null,")")-2,x:vs(de,Ee)}):Ee&&qe.push(ju(qe)+"skewX("+Ee+")")}function cu(de,Ee,qe,tt){if(de[0]!==Ee[0]||de[1]!==Ee[1]){var at=qe.push(ju(qe)+"scale(",null,",",null,")");tt.push({i:at-4,x:vs(de[0],Ee[0])},{i:at-2,x:vs(de[1],Ee[1])})}else(Ee[0]!==1||Ee[1]!==1)&&qe.push(ju(qe)+"scale("+Ee+")")}function tc(de,Ee){var qe=[],tt=[];return de=p.transform(de),Ee=p.transform(Ee),Ac(de.translate,Ee.translate,qe,tt),Zc(de.rotate,Ee.rotate,qe,tt),ec(de.skew,Ee.skew,qe,tt),cu(de.scale,Ee.scale,qe,tt),de=Ee=null,function(at){for(var ct=-1,Nt=tt.length,St;++ct0?ct=sa:(qe.c=null,qe.t=NaN,qe=null,Ee.end({type:"end",alpha:ct=0})):sa>0&&(Ee.start({type:"start",alpha:ct=sa}),qe=ai(de.tick)),de):ct},de.start=function(){var sa,hn=ca.length,An=Aa.length,zn=tt[0],$n=tt[1],xi,di;for(sa=0;sa=0;)ct.push(gr=mr[Jt]),gr.parent=St,gr.depth=St.depth+1;qe&&(St.value=0),St.children=mr}else qe&&(St.value=+qe.call(tt,St,St.depth)||0),delete St.children;return El(at,function(Hr){var Vr,ca;de&&(Vr=Hr.children)&&Vr.sort(de),qe&&(ca=Hr.parent)&&(ca.value+=Hr.value)}),Nt}return tt.sort=function(at){return arguments.length?(de=at,tt):de},tt.children=function(at){return arguments.length?(Ee=at,tt):Ee},tt.value=function(at){return arguments.length?(qe=at,tt):qe},tt.revalue=function(at){return qe&&(Sl(at,function(ct){ct.children&&(ct.value=0)}),El(at,function(ct){var Nt;ct.children||(ct.value=+qe.call(tt,ct,ct.depth)||0),(Nt=ct.parent)&&(Nt.value+=ct.value)})),at},tt};function fu(de,Ee){return p.rebind(de,Ee,"sort","children","value"),de.nodes=de,de.links=_l,de}function Sl(de,Ee){for(var qe=[de];(de=qe.pop())!=null;)if(Ee(de),(at=de.children)&&(tt=at.length))for(var tt,at;--tt>=0;)qe.push(at[tt])}function El(de,Ee){for(var qe=[de],tt=[];(de=qe.pop())!=null;)if(tt.push(de),(Nt=de.children)&&(ct=Nt.length))for(var at=-1,ct,Nt;++atat&&(at=St),tt.push(St)}for(Nt=0;Nttt&&(qe=Ee,tt=at);return qe}function _f(de){return de.reduce(Mu,0)}function Mu(de,Ee){return de+Ee[1]}p.layout.histogram=function(){var de=!0,Ee=Number,qe=Vu,tt=ic;function at(ct,Vr){for(var St=[],Jt=ct.map(Ee,this),mr=qe.call(this,Jt,Vr),gr=tt.call(this,mr,Jt,Vr),Hr,Vr=-1,ca=Jt.length,Aa=gr.length-1,Xr=de?1:1/ca,oa;++Vr0)for(Vr=-1;++Vr=mr[0]&&oa<=mr[1]&&(Hr=St[p.bisect(gr,oa,1,Aa)-1],Hr.y+=Xr,Hr.push(ct[Vr]));return St}return at.value=function(ct){return arguments.length?(Ee=ct,at):Ee},at.range=function(ct){return arguments.length?(qe=ar(ct),at):qe},at.bins=function(ct){return arguments.length?(tt=typeof ct=="number"?function(Nt){return Sc(Nt,ct)}:ar(ct),at):tt},at.frequency=function(ct){return arguments.length?(de=!!ct,at):de},at};function ic(de,Ee){return Sc(de,Math.ceil(Math.log(Ee.length)/Math.LN2+1))}function Sc(de,Ee){for(var qe=-1,tt=+de[0],at=(de[1]-tt)/Ee,ct=[];++qe<=Ee;)ct[qe]=at*qe+tt;return ct}function Vu(de){return[p.min(de),p.max(de)]}p.layout.pack=function(){var de=p.layout.hierarchy().sort(xo),Ee=0,qe=[1,1],tt;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr=qe[0],gr=qe[1],Hr=tt==null?Math.sqrt:typeof tt=="function"?tt:function(){return tt};if(Jt.x=Jt.y=0,El(Jt,function(ca){ca.r=+Hr(ca.value)}),El(Jt,xf),Ee){var Vr=Ee*(tt?1:Math.max(2*Jt.r/mr,2*Jt.r/gr))/2;El(Jt,function(ca){ca.r+=Vr}),El(Jt,xf),El(Jt,function(ca){ca.r-=Vr})}return Hf(Jt,mr/2,gr/2,tt?1:1/Math.max(2*Jt.r/mr,2*Jt.r/gr)),St}return at.size=function(ct){return arguments.length?(qe=ct,at):qe},at.radius=function(ct){return arguments.length?(tt=ct==null||typeof ct=="function"?ct:+ct,at):tt},at.padding=function(ct){return arguments.length?(Ee=+ct,at):Ee},fu(at,de)};function xo(de,Ee){return de.value-Ee.value}function Ec(de,Ee){var qe=de._pack_next;de._pack_next=Ee,Ee._pack_prev=de,Ee._pack_next=qe,qe._pack_prev=Ee}function xh(de,Ee){de._pack_next=Ee,Ee._pack_prev=de}function Vf(de,Ee){var qe=Ee.x-de.x,tt=Ee.y-de.y,at=de.r+Ee.r;return .999*at*at>qe*qe+tt*tt}function xf(de){if(!(Ee=de.children)||!(Vr=Ee.length))return;var Ee,qe=1/0,tt=-1/0,at=1/0,ct=-1/0,Nt,St,Jt,mr,gr,Hr,Vr;function ca(sa){qe=Math.min(sa.x-sa.r,qe),tt=Math.max(sa.x+sa.r,tt),at=Math.min(sa.y-sa.r,at),ct=Math.max(sa.y+sa.r,ct)}if(Ee.forEach(Gf),Nt=Ee[0],Nt.x=-Nt.r,Nt.y=0,ca(Nt),Vr>1&&(St=Ee[1],St.x=St.r,St.y=0,ca(St),Vr>2))for(Jt=Ee[2],il(Nt,St,Jt),ca(Jt),Ec(Nt,Jt),Nt._pack_prev=Jt,Ec(Jt,St),St=Nt._pack_next,mr=3;mroa.x&&(oa=hn),hn.depth>fa.depth&&(fa=hn)});var Ea=Ee(Xr,oa)/2-Xr.x,Ma=qe[0]/(oa.x+Ee(oa,Xr)/2+Ea),sa=qe[1]/(fa.depth||1);Sl(ca,function(hn){hn.x=(hn.x+Ea)*Ma,hn.y=hn.depth*sa})}return Vr}function ct(gr){for(var Hr={A:null,children:[gr]},Vr=[Hr],ca;(ca=Vr.pop())!=null;)for(var Aa=ca.children,Xr,oa=0,fa=Aa.length;oa0&&(Lc(Ft(Xr,gr,Vr),gr,hn),fa+=hn,Ea+=hn),Ma+=Xr.m,fa+=ca.m,sa+=oa.m,Ea+=Aa.m;Xr&&!Cc(Aa)&&(Aa.t=Xr,Aa.m+=Ma-Ea),ca&&!kc(oa)&&(oa.t=ca,oa.m+=fa-sa,Vr=gr)}return Vr}function mr(gr){gr.x*=qe[0],gr.y=gr.depth*qe[1]}return at.separation=function(gr){return arguments.length?(Ee=gr,at):Ee},at.size=function(gr){return arguments.length?(tt=(qe=gr)==null?mr:null,at):tt?null:qe},at.nodeSize=function(gr){return arguments.length?(tt=(qe=gr)==null?null:mr,at):tt?qe:null},fu(at,de)};function kl(de,Ee){return de.parent==Ee.parent?1:2}function kc(de){var Ee=de.children;return Ee.length?Ee[0]:de.t}function Cc(de){var Ee=de.children,qe;return(qe=Ee.length)?Ee[qe-1]:de.t}function Lc(de,Ee,qe){var tt=qe/(Ee.i-de.i);Ee.c-=tt,Ee.s+=qe,de.c+=tt,Ee.z+=qe,Ee.m+=qe}function vc(de){for(var Ee=0,qe=0,tt=de.children,at=tt.length,ct;--at>=0;)ct=tt[at],ct.z+=Ee,ct.m+=Ee,Ee+=ct.s+(qe+=ct.c)}function Ft(de,Ee,qe){return de.a.parent===Ee.parent?de.a:qe}p.layout.cluster=function(){var de=p.layout.hierarchy().sort(null).value(null),Ee=kl,qe=[1,1],tt=!1;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr,gr=0;El(Jt,function(Xr){var oa=Xr.children;oa&&oa.length?(Xr.x=Fr(oa),Xr.y=tr(oa)):(Xr.x=mr?gr+=Ee(Xr,mr):0,Xr.y=0,mr=Xr)});var Hr=wr(Jt),Vr=ea(Jt),ca=Hr.x-Ee(Hr,Vr)/2,Aa=Vr.x+Ee(Vr,Hr)/2;return El(Jt,tt?function(Xr){Xr.x=(Xr.x-Jt.x)*qe[0],Xr.y=(Jt.y-Xr.y)*qe[1]}:function(Xr){Xr.x=(Xr.x-ca)/(Aa-ca)*qe[0],Xr.y=(1-(Jt.y?Xr.y/Jt.y:1))*qe[1]}),St}return at.separation=function(ct){return arguments.length?(Ee=ct,at):Ee},at.size=function(ct){return arguments.length?(tt=(qe=ct)==null,at):tt?null:qe},at.nodeSize=function(ct){return arguments.length?(tt=(qe=ct)!=null,at):tt?qe:null},fu(at,de)};function tr(de){return 1+p.max(de,function(Ee){return Ee.y})}function Fr(de){return de.reduce(function(Ee,qe){return Ee+qe.x},0)/de.length}function wr(de){var Ee=de.children;return Ee&&Ee.length?wr(Ee[0]):de}function ea(de){var Ee=de.children,qe;return Ee&&(qe=Ee.length)?ea(Ee[qe-1]):de}p.layout.treemap=function(){var de=p.layout.hierarchy(),Ee=Math.round,qe=[1,1],tt=null,at=ba,ct=!1,Nt,St="squarify",Jt=.5*(1+Math.sqrt(5));function mr(Xr,oa){for(var fa=-1,Ea=Xr.length,Ma,sa;++fa0;)Ea.push(sa=Ma[$n-1]),Ea.area+=sa.area,St!=="squarify"||(An=Vr(Ea,zn))<=hn?(Ma.pop(),hn=An):(Ea.area-=Ea.pop().area,ca(Ea,zn,fa,!1),zn=Math.min(fa.dx,fa.dy),Ea.length=Ea.area=0,hn=1/0);Ea.length&&(ca(Ea,zn,fa,!0),Ea.length=Ea.area=0),oa.forEach(gr)}}function Hr(Xr){var oa=Xr.children;if(oa&&oa.length){var fa=at(Xr),Ea=oa.slice(),Ma,sa=[];for(mr(Ea,fa.dx*fa.dy/Xr.value),sa.area=0;Ma=Ea.pop();)sa.push(Ma),sa.area+=Ma.area,Ma.z!=null&&(ca(sa,Ma.z?fa.dx:fa.dy,fa,!Ea.length),sa.length=sa.area=0);oa.forEach(Hr)}}function Vr(Xr,oa){for(var fa=Xr.area,Ea,Ma=0,sa=1/0,hn=-1,An=Xr.length;++hnMa&&(Ma=Ea));return fa*=fa,oa*=oa,fa?Math.max(oa*Ma*Jt/fa,fa/(oa*sa*Jt)):1/0}function ca(Xr,oa,fa,Ea){var Ma=-1,sa=Xr.length,hn=fa.x,An=fa.y,zn=oa?Ee(Xr.area/oa):0,$n;if(oa==fa.dx){for((Ea||zn>fa.dy)&&(zn=fa.dy);++Mafa.dx)&&(zn=fa.dx);++Ma1);return de+Ee*tt*Math.sqrt(-2*Math.log(ct)/ct)}},logNormal:function(){var de=p.random.normal.apply(p,arguments);return function(){return Math.exp(de())}},bates:function(de){var Ee=p.random.irwinHall(de);return function(){return Ee()/de}},irwinHall:function(de){return function(){for(var Ee=0,qe=0;qe2?vn:mn,mr=tt?Tu:vf;return at=Jt(de,Ee,mr,qe),ct=Jt(Ee,de,mr,Fu),St}function St(Jt){return at(Jt)}return St.invert=function(Jt){return ct(Jt)},St.domain=function(Jt){return arguments.length?(de=Jt.map(Number),Nt()):de},St.range=function(Jt){return arguments.length?(Ee=Jt,Nt()):Ee},St.rangeRound=function(Jt){return St.range(Jt).interpolate(Qu)},St.clamp=function(Jt){return arguments.length?(tt=Jt,Nt()):tt},St.interpolate=function(Jt){return arguments.length?(qe=Jt,Nt()):qe},St.ticks=function(Jt){return ri(de,Jt)},St.tickFormat=function(Jt,mr){return d3_scale_linearTickFormat(de,Jt,mr)},St.nice=function(Jt){return _i(de,Jt),Nt()},St.copy=function(){return En(de,Ee,qe,tt)},Nt()}function yi(de,Ee){return p.rebind(de,Ee,"range","rangeRound","interpolate","clamp")}function _i(de,Ee){return Da(de,Ha(ki(de,Ee)[2])),Da(de,Ha(ki(de,Ee)[2])),de}function ki(de,Ee){Ee==null&&(Ee=10);var qe=Na(de),tt=qe[1]-qe[0],at=Math.pow(10,Math.floor(Math.log(tt/Ee)/Math.LN10)),ct=Ee/tt*at;return ct<=.15?at*=10:ct<=.35?at*=5:ct<=.75&&(at*=2),qe[0]=Math.ceil(qe[0]/at)*at,qe[1]=Math.floor(qe[1]/at)*at+at*.5,qe[2]=at,qe}function ri(de,Ee){return p.range.apply(p,ki(de,Ee))}var kn={s:1,g:1,p:1,r:1,e:1};function Ln(de){return-Math.floor(Math.log(de)/Math.LN10+.01)}function Ni(de,Ee){var qe=Ln(Ee[2]);return de in kn?Math.abs(qe-Ln(Math.max(i(Ee[0]),i(Ee[1]))))+ +(de!=="e"):qe-(de==="%")*2}p.scale.log=function(){return Zi(p.scale.linear().domain([0,1]),10,!0,[1,10])};function Zi(de,Ee,qe,tt){function at(St){return(qe?Math.log(St<0?0:St):-Math.log(St>0?0:-St))/Math.log(Ee)}function ct(St){return qe?Math.pow(Ee,St):-Math.pow(Ee,-St)}function Nt(St){return de(at(St))}return Nt.invert=function(St){return ct(de.invert(St))},Nt.domain=function(St){return arguments.length?(qe=St[0]>=0,de.domain((tt=St.map(Number)).map(at)),Nt):tt},Nt.base=function(St){return arguments.length?(Ee=+St,de.domain(tt.map(at)),Nt):Ee},Nt.nice=function(){var St=Da(tt.map(at),qe?Math:Co);return de.domain(St),tt=St.map(ct),Nt},Nt.ticks=function(){var St=Na(tt),Jt=[],mr=St[0],gr=St[1],Hr=Math.floor(at(mr)),Vr=Math.ceil(at(gr)),ca=Ee%1?2:Ee;if(isFinite(Vr-Hr)){if(qe){for(;Hr0;Aa--)Jt.push(ct(Hr)*Aa);for(Hr=0;Jt[Hr]gr;Vr--);Jt=Jt.slice(Hr,Vr)}return Jt},Nt.copy=function(){return Zi(de.copy(),Ee,qe,tt)},yi(Nt,de)}var Co={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};p.scale.pow=function(){return Do(p.scale.linear(),1,[0,1])};function Do(de,Ee,qe){var tt=Fo(Ee),at=Fo(1/Ee);function ct(Nt){return de(tt(Nt))}return ct.invert=function(Nt){return at(de.invert(Nt))},ct.domain=function(Nt){return arguments.length?(de.domain((qe=Nt.map(Number)).map(tt)),ct):qe},ct.ticks=function(Nt){return ri(qe,Nt)},ct.tickFormat=function(Nt,St){return d3_scale_linearTickFormat(qe,Nt,St)},ct.nice=function(Nt){return ct.domain(_i(qe,Nt))},ct.exponent=function(Nt){return arguments.length?(tt=Fo(Ee=Nt),at=Fo(1/Ee),de.domain(qe.map(tt)),ct):Ee},ct.copy=function(){return Do(de.copy(),Ee,qe)},yi(ct,de)}function Fo(de){return function(Ee){return Ee<0?-Math.pow(-Ee,de):Math.pow(Ee,de)}}p.scale.sqrt=function(){return p.scale.pow().exponent(.5)},p.scale.ordinal=function(){return Yo([],{t:"range",a:[[]]})};function Yo(de,Ee){var qe,tt,at;function ct(St){return tt[((qe.get(St)||(Ee.t==="range"?qe.set(St,de.push(St)):NaN))-1)%tt.length]}function Nt(St,Jt){return p.range(de.length).map(function(mr){return St+Jt*mr})}return ct.domain=function(St){if(!arguments.length)return de;de=[],qe=new M;for(var Jt=-1,mr=St.length,gr;++Jt0?qe[ct-1]:de[0],ctVr?0:1;if(gr=Ke)return Jt(gr,Aa)+(mr?Jt(mr,1-Aa):"")+"Z";var Xr,oa,fa,Ea,Ma=0,sa=0,hn,An,zn,$n,xi,di,uo,pe,y=[];if((Ea=(+Nt.apply(this,arguments)||0)/2)&&(fa=tt===zl?Math.sqrt(mr*mr+gr*gr):+tt.apply(this,arguments),Aa||(sa*=-1),gr&&(sa=qt(fa/gr*Math.sin(Ea))),mr&&(Ma=qt(fa/mr*Math.sin(Ea)))),gr){hn=gr*Math.cos(Hr+sa),An=gr*Math.sin(Hr+sa),zn=gr*Math.cos(Vr-sa),$n=gr*Math.sin(Vr-sa);var N=Math.abs(Vr-Hr-2*sa)<=Ne?0:1;if(sa&&mc(hn,An,zn,$n)===Aa^N){var ie=(Hr+Vr)/2;hn=gr*Math.cos(ie),An=gr*Math.sin(ie),zn=$n=null}}else hn=An=0;if(mr){xi=mr*Math.cos(Vr-Ma),di=mr*Math.sin(Vr-Ma),uo=mr*Math.cos(Hr+Ma),pe=mr*Math.sin(Hr+Ma);var fe=Math.abs(Hr-Vr+2*Ma)<=Ne?0:1;if(Ma&&mc(xi,di,uo,pe)===1-Aa^fe){var be=(Hr+Vr)/2;xi=mr*Math.cos(be),di=mr*Math.sin(be),uo=pe=null}}else xi=di=0;if(ca>ht&&(Xr=Math.min(Math.abs(gr-mr)/2,+qe.apply(this,arguments)))>.001){oa=mr0?0:1}function Jc(de,Ee,qe,tt,at){var ct=de[0]-Ee[0],Nt=de[1]-Ee[1],St=(at?tt:-tt)/Math.sqrt(ct*ct+Nt*Nt),Jt=St*Nt,mr=-St*ct,gr=de[0]+Jt,Hr=de[1]+mr,Vr=Ee[0]+Jt,ca=Ee[1]+mr,Aa=(gr+Vr)/2,Xr=(Hr+ca)/2,oa=Vr-gr,fa=ca-Hr,Ea=oa*oa+fa*fa,Ma=qe-tt,sa=gr*ca-Vr*Hr,hn=(fa<0?-1:1)*Math.sqrt(Math.max(0,Ma*Ma*Ea-sa*sa)),An=(sa*fa-oa*hn)/Ea,zn=(-sa*oa-fa*hn)/Ea,$n=(sa*fa+oa*hn)/Ea,xi=(-sa*oa+fa*hn)/Ea,di=An-Aa,uo=zn-Xr,pe=$n-Aa,y=xi-Xr;return di*di+uo*uo>pe*pe+y*y&&(An=$n,zn=xi),[[An-Jt,zn-mr],[An*qe/Ma,zn*qe/Ma]]}function oc(){return!0}function du(de){var Ee=no,qe=Di,tt=oc,at=Ql,ct=at.key,Nt=.7;function St(Jt){var mr=[],gr=[],Hr=-1,Vr=Jt.length,ca,Aa=ar(Ee),Xr=ar(qe);function oa(){mr.push("M",at(de(gr),Nt))}for(;++Hr1?de.join("L"):de+"Z"}function Eu(de){return de.join("L")+"Z"}function bf(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1&&at.push("H",tt[0]),at.join("")}function lh(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1){St=Ee[1],ct=de[Jt],Jt++,tt+="C"+(at[0]+Nt[0])+","+(at[1]+Nt[1])+","+(ct[0]-St[0])+","+(ct[1]-St[1])+","+ct[0]+","+ct[1];for(var mr=2;mr9&&(ct=qe*3/Math.sqrt(ct),Nt[St]=ct*tt,Nt[St+1]=ct*at));for(St=-1;++St<=Jt;)ct=(de[Math.min(Jt,St+1)][0]-de[Math.max(0,St-1)][0])/(6*(1+Nt[St]*Nt[St])),Ee.push([ct||0,Nt[St]*ct||0]);return Ee}function Pr(de){return de.length<3?Ql(de):de[0]+wf(de,Wt(de))}p.svg.line.radial=function(){var de=du(Br);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function Br(de){for(var Ee,qe=-1,tt=de.length,at,ct;++qeNe)+",1 "+Hr}function mr(gr,Hr,Vr,ca){return"Q 0,0 "+ca}return ct.radius=function(gr){return arguments.length?(qe=ar(gr),ct):qe},ct.source=function(gr){return arguments.length?(de=ar(gr),ct):de},ct.target=function(gr){return arguments.length?(Ee=ar(gr),ct):Ee},ct.startAngle=function(gr){return arguments.length?(tt=ar(gr),ct):tt},ct.endAngle=function(gr){return arguments.length?(at=ar(gr),ct):at},ct};function la(de){return de.radius}p.svg.diagonal=function(){var de=jr,Ee=Jr,qe=xa;function tt(at,ct){var Nt=de.call(this,at,ct),St=Ee.call(this,at,ct),Jt=(Nt.y+St.y)/2,mr=[Nt,{x:Nt.x,y:Jt},{x:St.x,y:Jt},St];return mr=mr.map(qe),"M"+mr[0]+"C"+mr[1]+" "+mr[2]+" "+mr[3]}return tt.source=function(at){return arguments.length?(de=ar(at),tt):de},tt.target=function(at){return arguments.length?(Ee=ar(at),tt):Ee},tt.projection=function(at){return arguments.length?(qe=at,tt):qe},tt};function xa(de){return[de.x,de.y]}p.svg.diagonal.radial=function(){var de=p.svg.diagonal(),Ee=xa,qe=de.projection;return de.projection=function(tt){return arguments.length?qe(Ba(Ee=tt)):Ee},de};function Ba(de){return function(){var Ee=de.apply(this,arguments),qe=Ee[0],tt=Ee[1]-Je;return[qe*Math.cos(tt),qe*Math.sin(tt)]}}p.svg.symbol=function(){var de=Tn,Ee=an;function qe(tt,at){return(Si.get(de.call(this,tt,at))||ii)(Ee.call(this,tt,at))}return qe.type=function(tt){return arguments.length?(de=ar(tt),qe):de},qe.size=function(tt){return arguments.length?(Ee=ar(tt),qe):Ee},qe};function an(){return 64}function Tn(){return"circle"}function ii(de){var Ee=Math.sqrt(de/Ne);return"M0,"+Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+-Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+Ee+"Z"}var Si=p.map({circle:ii,cross:function(de){var Ee=Math.sqrt(de/5)/2;return"M"+-3*Ee+","+-Ee+"H"+-Ee+"V"+-3*Ee+"H"+Ee+"V"+-Ee+"H"+3*Ee+"V"+Ee+"H"+Ee+"V"+3*Ee+"H"+-Ee+"V"+Ee+"H"+-3*Ee+"Z"},diamond:function(de){var Ee=Math.sqrt(de/(2*Ji)),qe=Ee*Ji;return"M0,"+-Ee+"L"+qe+",0 0,"+Ee+" "+-qe+",0Z"},square:function(de){var Ee=Math.sqrt(de)/2;return"M"+-Ee+","+-Ee+"L"+Ee+","+-Ee+" "+Ee+","+Ee+" "+-Ee+","+Ee+"Z"},"triangle-down":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+qe+"L"+Ee+","+-qe+" "+-Ee+","+-qe+"Z"},"triangle-up":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+-qe+"L"+Ee+","+qe+" "+-Ee+","+qe+"Z"}});p.svg.symbolTypes=Si.keys();var oi=Math.sqrt(3),Ji=Math.tan(30*et);q.transition=function(de){for(var Ee=ol||++ys,qe=hi(de),tt=[],at,ct,Nt=jl||{time:Date.now(),ease:pc,delay:0,duration:250},St=-1,Jt=this.length;++St0;)Hr[--Ea].call(de,fa);if(oa>=1)return Nt.event&&Nt.event.end.call(de,de.__data__,Ee),--ct.count?delete ct[tt]:delete de[qe],1}Nt||(St=at.time,Jt=ai(Vr,0,St),Nt=ct[tt]={tween:new M,time:St,timer:Jt,delay:at.delay,duration:at.duration,ease:at.ease,index:Ee},at=null,++ct.count)}p.svg.axis=function(){var de=p.scale.linear(),Ee=sl,qe=6,tt=6,at=3,ct=[10],Nt=null,St;function Jt(mr){mr.each(function(){var gr=p.select(this),Hr=this.__chart__||de,Vr=this.__chart__=de.copy(),ca=Nt??(Vr.ticks?Vr.ticks.apply(Vr,ct):Vr.domain()),Aa=St??(Vr.tickFormat?Vr.tickFormat.apply(Vr,ct):D),Xr=gr.selectAll(".tick").data(ca,Vr),oa=Xr.enter().insert("g",".domain").attr("class","tick").style("opacity",ht),fa=p.transition(Xr.exit()).style("opacity",ht).remove(),Ea=p.transition(Xr.order()).style("opacity",1),Ma=Math.max(qe,0)+at,sa,hn=Za(Vr),An=gr.selectAll(".domain").data([0]),zn=(An.enter().append("path").attr("class","domain"),p.transition(An));oa.append("line"),oa.append("text");var $n=oa.select("line"),xi=Ea.select("line"),di=Xr.select("text").text(Aa),uo=oa.select("text"),pe=Ea.select("text"),y=Ee==="top"||Ee==="left"?-1:1,N,ie,fe,be;if(Ee==="bottom"||Ee==="top"?(sa=tu,N="x",fe="y",ie="x2",be="y2",di.attr("dy",y<0?"0em":".71em").style("text-anchor","middle"),zn.attr("d","M"+hn[0]+","+y*tt+"V0H"+hn[1]+"V"+y*tt)):(sa=Ps,N="y",fe="x",ie="y2",be="x2",di.attr("dy",".32em").style("text-anchor",y<0?"end":"start"),zn.attr("d","M"+y*tt+","+hn[0]+"H0V"+hn[1]+"H"+y*tt)),$n.attr(be,y*qe),uo.attr(fe,y*Ma),xi.attr(ie,0).attr(be,y*qe),pe.attr(N,0).attr(fe,y*Ma),Vr.rangeBand){var Re=Vr,je=Re.rangeBand()/2;Hr=Vr=function(Ze){return Re(Ze)+je}}else Hr.rangeBand?Hr=Vr:fa.call(sa,Vr,Hr);oa.call(sa,Hr,Vr),Ea.call(sa,Vr,Vr)})}return Jt.scale=function(mr){return arguments.length?(de=mr,Jt):de},Jt.orient=function(mr){return arguments.length?(Ee=mr in sc?mr+"":sl,Jt):Ee},Jt.ticks=function(){return arguments.length?(ct=E(arguments),Jt):ct},Jt.tickValues=function(mr){return arguments.length?(Nt=mr,Jt):Nt},Jt.tickFormat=function(mr){return arguments.length?(St=mr,Jt):St},Jt.tickSize=function(mr){var gr=arguments.length;return gr?(qe=+mr,tt=+arguments[gr-1],Jt):qe},Jt.innerTickSize=function(mr){return arguments.length?(qe=+mr,Jt):qe},Jt.outerTickSize=function(mr){return arguments.length?(tt=+mr,Jt):tt},Jt.tickPadding=function(mr){return arguments.length?(at=+mr,Jt):at},Jt.tickSubdivide=function(){return arguments.length&&Jt},Jt};var sl="bottom",sc={top:1,right:1,bottom:1,left:1};function tu(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate("+(isFinite(at)?at:qe(tt))+",0)"})}function Ps(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate(0,"+(isFinite(at)?at:qe(tt))+")"})}p.svg.brush=function(){var de=ne(gr,"brushstart","brush","brushend"),Ee=null,qe=null,tt=[0,0],at=[0,0],ct,Nt,St=!0,Jt=!0,mr=pu[0];function gr(Xr){Xr.each(function(){var oa=p.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Aa).on("touchstart.brush",Aa),fa=oa.selectAll(".background").data([0]);fa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),oa.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ea=oa.selectAll(".resize").data(mr,D);Ea.exit().remove(),Ea.enter().append("g").attr("class",function(An){return"resize "+An}).style("cursor",function(An){return gc[An]}).append("rect").attr("x",function(An){return/[ew]$/.test(An)?-3:null}).attr("y",function(An){return/^[ns]/.test(An)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ea.style("display",gr.empty()?"none":null);var Ma=p.transition(oa),sa=p.transition(fa),hn;Ee&&(hn=Za(Ee),sa.attr("x",hn[0]).attr("width",hn[1]-hn[0]),Vr(Ma)),qe&&(hn=Za(qe),sa.attr("y",hn[0]).attr("height",hn[1]-hn[0]),ca(Ma)),Hr(Ma)})}gr.event=function(Xr){Xr.each(function(){var oa=de.of(this,arguments),fa={x:tt,y:at,i:ct,j:Nt},Ea=this.__chart__||fa;this.__chart__=fa,ol?p.select(this).transition().each("start.brush",function(){ct=Ea.i,Nt=Ea.j,tt=Ea.x,at=Ea.y,oa({type:"brushstart"})}).tween("brush:brush",function(){var Ma=zu(tt,fa.x),sa=zu(at,fa.y);return ct=Nt=null,function(hn){tt=fa.x=Ma(hn),at=fa.y=sa(hn),oa({type:"brush",mode:"resize"})}}).each("end.brush",function(){ct=fa.i,Nt=fa.j,oa({type:"brush",mode:"resize"}),oa({type:"brushend"})}):(oa({type:"brushstart"}),oa({type:"brush",mode:"resize"}),oa({type:"brushend"}))})};function Hr(Xr){Xr.selectAll(".resize").attr("transform",function(oa){return"translate("+tt[+/e$/.test(oa)]+","+at[+/^s/.test(oa)]+")"})}function Vr(Xr){Xr.select(".extent").attr("x",tt[0]),Xr.selectAll(".extent,.n>rect,.s>rect").attr("width",tt[1]-tt[0])}function ca(Xr){Xr.select(".extent").attr("y",at[0]),Xr.selectAll(".extent,.e>rect,.w>rect").attr("height",at[1]-at[0])}function Aa(){var Xr=this,oa=p.select(p.event.target),fa=de.of(Xr,arguments),Ea=p.select(Xr),Ma=oa.datum(),sa=!/^(n|s)$/.test(Ma)&&Ee,hn=!/^(e|w)$/.test(Ma)&&qe,An=oa.classed("extent"),zn=Xt(Xr),$n,xi=p.mouse(Xr),di,uo=p.select(e(Xr)).on("keydown.brush",N).on("keyup.brush",ie);if(p.event.changedTouches?uo.on("touchmove.brush",fe).on("touchend.brush",Re):uo.on("mousemove.brush",fe).on("mouseup.brush",Re),Ea.interrupt().selectAll("*").interrupt(),An)xi[0]=tt[0]-xi[0],xi[1]=at[0]-xi[1];else if(Ma){var pe=+/w$/.test(Ma),y=+/^n/.test(Ma);di=[tt[1-pe]-xi[0],at[1-y]-xi[1]],xi[0]=tt[pe],xi[1]=at[y]}else p.event.altKey&&($n=xi.slice());Ea.style("pointer-events","none").selectAll(".resize").style("display",null),p.select("body").style("cursor",oa.style("cursor")),fa({type:"brushstart"}),fe();function N(){p.event.keyCode==32&&(An||($n=null,xi[0]-=tt[1],xi[1]-=at[1],An=2),Q())}function ie(){p.event.keyCode==32&&An==2&&(xi[0]+=tt[1],xi[1]+=at[1],An=0,Q())}function fe(){var je=p.mouse(Xr),Ze=!1;di&&(je[0]+=di[0],je[1]+=di[1]),An||(p.event.altKey?($n||($n=[(tt[0]+tt[1])/2,(at[0]+at[1])/2]),xi[0]=tt[+(je[0]<$n[0])],xi[1]=at[+(je[1]<$n[1])]):$n=null),sa&&be(je,Ee,0)&&(Vr(Ea),Ze=!0),hn&&be(je,qe,1)&&(ca(Ea),Ze=!0),Ze&&(Hr(Ea),fa({type:"brush",mode:An?"move":"resize"}))}function be(je,Ze,ut){var ft=Za(Ze),Dt=ft[0],Gt=ft[1],Kt=xi[ut],st=ut?at:tt,It=st[1]-st[0],Ut,ir;if(An&&(Dt-=Kt,Gt-=It+Kt),Ut=(ut?Jt:St)?Math.max(Dt,Math.min(Gt,je[ut])):je[ut],An?ir=(Ut+=Kt)+It:($n&&(Kt=Math.max(Dt,Math.min(Gt,2*$n[ut]-Ut))),Kt0))return At;do At.push($t=new Date(+yt)),Ae(yt,Tt),le(yt);while($t=gt)for(;le(gt),!yt(gt);)gt.setTime(gt-1)},function(gt,Tt){if(gt>=gt)if(Tt<0)for(;++Tt<=0;)for(;Ae(gt,-1),!yt(gt););else for(;--Tt>=0;)for(;Ae(gt,1),!yt(gt););})},Be&&(Ye.count=function(yt,gt){return b.setTime(+yt),E.setTime(+gt),le(b),le(E),Math.floor(Be(b,E))},Ye.every=function(yt){return yt=Math.floor(yt),!isFinite(yt)||!(yt>0)?null:yt>1?Ye.filter(Xe?function(gt){return Xe(gt)%yt===0}:function(gt){return Ye.count(0,gt)%yt===0}):Ye}),Ye}var l=k(function(){},function(le,Ae){le.setTime(+le+Ae)},function(le,Ae){return Ae-le});l.every=function(le){return le=Math.floor(le),!isFinite(le)||!(le>0)?null:le>1?k(function(Ae){Ae.setTime(Math.floor(Ae/le)*le)},function(Ae,Be){Ae.setTime(+Ae+Be*le)},function(Ae,Be){return(Be-Ae)/le}):l};var e=l.range,t=1e3,n=6e4,r=36e5,a=864e5,o=6048e5,s=k(function(le){le.setTime(le-le.getMilliseconds())},function(le,Ae){le.setTime(+le+Ae*t)},function(le,Ae){return(Ae-le)/t},function(le){return le.getUTCSeconds()}),c=s.range,m=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getMinutes()}),h=m.range,v=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t-le.getMinutes()*n)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getHours()}),g=v.range,i=k(function(le){le.setHours(0,0,0,0)},function(le,Ae){le.setDate(le.getDate()+Ae)},function(le,Ae){return(Ae-le-(Ae.getTimezoneOffset()-le.getTimezoneOffset())*n)/a},function(le){return le.getDate()-1}),w=i.range;function S(le){return k(function(Ae){Ae.setDate(Ae.getDate()-(Ae.getDay()+7-le)%7),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setDate(Ae.getDate()+Be*7)},function(Ae,Be){return(Be-Ae-(Be.getTimezoneOffset()-Ae.getTimezoneOffset())*n)/o})}var M=S(0),C=S(1),_=S(2),T=S(3),f=S(4),u=S(5),A=S(6),x=M.range,z=C.range,I=_.range,O=T.range,D=f.range,B=u.range,F=A.range,P=k(function(le){le.setDate(1),le.setHours(0,0,0,0)},function(le,Ae){le.setMonth(le.getMonth()+Ae)},function(le,Ae){return Ae.getMonth()-le.getMonth()+(Ae.getFullYear()-le.getFullYear())*12},function(le){return le.getMonth()}),j=P.range,U=k(function(le){le.setMonth(0,1),le.setHours(0,0,0,0)},function(le,Ae){le.setFullYear(le.getFullYear()+Ae)},function(le,Ae){return Ae.getFullYear()-le.getFullYear()},function(le){return le.getFullYear()});U.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setFullYear(Math.floor(Ae.getFullYear()/le)*le),Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setFullYear(Ae.getFullYear()+Be*le)})};var $=U.range,Q=k(function(le){le.setUTCSeconds(0,0)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getUTCMinutes()}),re=Q.range,ne=k(function(le){le.setUTCMinutes(0,0,0)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getUTCHours()}),se=ne.range,G=k(function(le){le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCDate(le.getUTCDate()+Ae)},function(le,Ae){return(Ae-le)/a},function(le){return le.getUTCDate()-1}),X=G.range;function K(le){return k(function(Ae){Ae.setUTCDate(Ae.getUTCDate()-(Ae.getUTCDay()+7-le)%7),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCDate(Ae.getUTCDate()+Be*7)},function(Ae,Be){return(Be-Ae)/o})}var H=K(0),Y=K(1),q=K(2),Z=K(3),ee=K(4),ae=K(5),he=K(6),xe=H.range,we=Y.range,Me=q.range,Se=Z.range,Ie=ee.range,Ve=ae.range,Ge=he.range,ke=k(function(le){le.setUTCDate(1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCMonth(le.getUTCMonth()+Ae)},function(le,Ae){return Ae.getUTCMonth()-le.getUTCMonth()+(Ae.getUTCFullYear()-le.getUTCFullYear())*12},function(le){return le.getUTCMonth()}),_e=ke.range,ce=k(function(le){le.setUTCMonth(0,1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCFullYear(le.getUTCFullYear()+Ae)},function(le,Ae){return Ae.getUTCFullYear()-le.getUTCFullYear()},function(le){return le.getUTCFullYear()});ce.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setUTCFullYear(Math.floor(Ae.getUTCFullYear()/le)*le),Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCFullYear(Ae.getUTCFullYear()+Be*le)})};var ve=ce.range;p.timeDay=i,p.timeDays=w,p.timeFriday=u,p.timeFridays=B,p.timeHour=v,p.timeHours=g,p.timeInterval=k,p.timeMillisecond=l,p.timeMilliseconds=e,p.timeMinute=m,p.timeMinutes=h,p.timeMonday=C,p.timeMondays=z,p.timeMonth=P,p.timeMonths=j,p.timeSaturday=A,p.timeSaturdays=F,p.timeSecond=s,p.timeSeconds=c,p.timeSunday=M,p.timeSundays=x,p.timeThursday=f,p.timeThursdays=D,p.timeTuesday=_,p.timeTuesdays=I,p.timeWednesday=T,p.timeWednesdays=O,p.timeWeek=M,p.timeWeeks=x,p.timeYear=U,p.timeYears=$,p.utcDay=G,p.utcDays=X,p.utcFriday=ae,p.utcFridays=Ve,p.utcHour=ne,p.utcHours=se,p.utcMillisecond=l,p.utcMilliseconds=e,p.utcMinute=Q,p.utcMinutes=re,p.utcMonday=Y,p.utcMondays=we,p.utcMonth=ke,p.utcMonths=_e,p.utcSaturday=he,p.utcSaturdays=Ge,p.utcSecond=s,p.utcSeconds=c,p.utcSunday=H,p.utcSundays=xe,p.utcThursday=ee,p.utcThursdays=Ie,p.utcTuesday=q,p.utcTuesdays=Me,p.utcWednesday=Z,p.utcWednesdays=Se,p.utcWeek=H,p.utcWeeks=xe,p.utcYear=ce,p.utcYears=ve,Object.defineProperty(p,"__esModule",{value:!0})})}}),jm=ze({"node_modules/d3-time-format/dist/d3-time-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kw()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(Je){if(0<=Je.y&&Je.y<100){var et=new Date(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L);return et.setFullYear(Je.y),et}return new Date(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L)}function k(Je){if(0<=Je.y&&Je.y<100){var et=new Date(Date.UTC(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L));return et.setUTCFullYear(Je.y),et}return new Date(Date.UTC(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L))}function l(Je,et,Mt){return{y:Je,m:et,d:Mt,H:0,M:0,S:0,L:0}}function e(Je){var et=Je.dateTime,Mt=Je.date,pt=Je.time,Pt=Je.periods,Ct=Je.days,qt=Je.shortDays,Vt=Je.months,Ht=Je.shortMonths,Sr=c(Pt),Kr=m(Pt),Yt=c(Ct),Rt=m(Ct),nr=c(qt),ur=m(qt),cr=c(Vt),Rr=m(Vt),Qr=c(Ht),Zr=m(Ht),ha={a:Yi,A:Ja,b:Oa,B:lt,c:null,d:P,e:P,f:re,g:ae,G:xe,H:j,I:U,j:$,L:Q,m:ne,M:se,p:rt,q:fr,Q:Xt,s:or,S:G,u:X,U:K,V:Y,w:q,W:Z,x:null,X:null,y:ee,Y:he,Z:we,"%":_r},Pa={a:lr,A:Tr,b:Ir,B:Dr,c:null,d:Me,e:Me,f:ke,g:Tt,G:$t,H:Se,I:Ie,j:Ve,L:Ge,m:_e,M:ce,p:ot,q:kt,Q:Xt,s:or,S:ve,u:le,U:Ae,V:Xe,w:Ye,W:yt,x:null,X:null,y:gt,Y:At,Z:rr,"%":_r},La={a:yn,A:Un,b:li,B:Yn,c:on,d:f,e:f,f:O,g:M,G:S,H:A,I:A,j:u,L:I,m:T,M:x,p:Nn,q:_,Q:B,s:F,S:z,u:v,U:g,V:i,w:h,W:w,x:en,X:vi,y:M,Y:S,Z:C,"%":D};ha.x=un(Mt,ha),ha.X=un(pt,ha),ha.c=un(et,ha),Pa.x=un(Mt,Pa),Pa.X=un(pt,Pa),Pa.c=un(et,Pa);function un(jt,ar){return function(Er){var xr=[],zr=-1,Lr=0,aa=jt.length,Sa,wa,pn;for(Er instanceof Date||(Er=new Date(+Er));++zr53)return null;"w"in xr||(xr.w=1),"Z"in xr?(Lr=k(l(xr.y,0,1)),aa=Lr.getUTCDay(),Lr=aa>4||aa===0?b.utcMonday.ceil(Lr):b.utcMonday(Lr),Lr=b.utcDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getUTCFullYear(),xr.m=Lr.getUTCMonth(),xr.d=Lr.getUTCDate()+(xr.w+6)%7):(Lr=E(l(xr.y,0,1)),aa=Lr.getDay(),Lr=aa>4||aa===0?b.timeMonday.ceil(Lr):b.timeMonday(Lr),Lr=b.timeDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getFullYear(),xr.m=Lr.getMonth(),xr.d=Lr.getDate()+(xr.w+6)%7)}else("W"in xr||"U"in xr)&&("w"in xr||(xr.w="u"in xr?xr.u%7:"W"in xr?1:0),aa="Z"in xr?k(l(xr.y,0,1)).getUTCDay():E(l(xr.y,0,1)).getDay(),xr.m=0,xr.d="W"in xr?(xr.w+6)%7+xr.W*7-(aa+5)%7:xr.w+xr.U*7-(aa+6)%7);return"Z"in xr?(xr.H+=xr.Z/100|0,xr.M+=xr.Z%100,k(xr)):E(xr)}}function ja(jt,ar,Er,xr){for(var zr=0,Lr=ar.length,aa=Er.length,Sa,wa;zr=aa)return-1;if(Sa=ar.charCodeAt(zr++),Sa===37){if(Sa=ar.charAt(zr++),wa=La[Sa in t?ar.charAt(zr++):Sa],!wa||(xr=wa(jt,Er,xr))<0)return-1}else if(Sa!=Er.charCodeAt(xr++))return-1}return xr}function Nn(jt,ar,Er){var xr=Sr.exec(ar.slice(Er));return xr?(jt.p=Kr[xr[0].toLowerCase()],Er+xr[0].length):-1}function yn(jt,ar,Er){var xr=nr.exec(ar.slice(Er));return xr?(jt.w=ur[xr[0].toLowerCase()],Er+xr[0].length):-1}function Un(jt,ar,Er){var xr=Yt.exec(ar.slice(Er));return xr?(jt.w=Rt[xr[0].toLowerCase()],Er+xr[0].length):-1}function li(jt,ar,Er){var xr=Qr.exec(ar.slice(Er));return xr?(jt.m=Zr[xr[0].toLowerCase()],Er+xr[0].length):-1}function Yn(jt,ar,Er){var xr=cr.exec(ar.slice(Er));return xr?(jt.m=Rr[xr[0].toLowerCase()],Er+xr[0].length):-1}function on(jt,ar,Er){return ja(jt,et,ar,Er)}function en(jt,ar,Er){return ja(jt,Mt,ar,Er)}function vi(jt,ar,Er){return ja(jt,pt,ar,Er)}function Yi(jt){return qt[jt.getDay()]}function Ja(jt){return Ct[jt.getDay()]}function Oa(jt){return Ht[jt.getMonth()]}function lt(jt){return Vt[jt.getMonth()]}function rt(jt){return Pt[+(jt.getHours()>=12)]}function fr(jt){return 1+~~(jt.getMonth()/3)}function lr(jt){return qt[jt.getUTCDay()]}function Tr(jt){return Ct[jt.getUTCDay()]}function Ir(jt){return Ht[jt.getUTCMonth()]}function Dr(jt){return Vt[jt.getUTCMonth()]}function ot(jt){return Pt[+(jt.getUTCHours()>=12)]}function kt(jt){return 1+~~(jt.getUTCMonth()/3)}return{format:function(jt){var ar=un(jt+="",ha);return ar.toString=function(){return jt},ar},parse:function(jt){var ar=Xa(jt+="",!1);return ar.toString=function(){return jt},ar},utcFormat:function(jt){var ar=un(jt+="",Pa);return ar.toString=function(){return jt},ar},utcParse:function(jt){var ar=Xa(jt+="",!0);return ar.toString=function(){return jt},ar}}}var t={"-":"",_:" ",0:"0"},n=/^\s*\d+/,r=/^%/,a=/[\\^$*+?|[\]().{}]/g;function o(Je,et,Mt){var pt=Je<0?"-":"",Pt=(pt?-Je:Je)+"",Ct=Pt.length;return pt+(Ct68?1900:2e3),Mt+pt[0].length):-1}function C(Je,et,Mt){var pt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(Mt,Mt+6));return pt?(Je.Z=pt[1]?0:-(pt[2]+(pt[3]||"00")),Mt+pt[0].length):-1}function _(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+1));return pt?(Je.q=pt[0]*3-3,Mt+pt[0].length):-1}function T(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.m=pt[0]-1,Mt+pt[0].length):-1}function f(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.d=+pt[0],Mt+pt[0].length):-1}function u(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.m=0,Je.d=+pt[0],Mt+pt[0].length):-1}function A(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.H=+pt[0],Mt+pt[0].length):-1}function x(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.M=+pt[0],Mt+pt[0].length):-1}function z(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.S=+pt[0],Mt+pt[0].length):-1}function I(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.L=+pt[0],Mt+pt[0].length):-1}function O(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+6));return pt?(Je.L=Math.floor(pt[0]/1e3),Mt+pt[0].length):-1}function D(Je,et,Mt){var pt=r.exec(et.slice(Mt,Mt+1));return pt?Mt+pt[0].length:-1}function B(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.Q=+pt[0],Mt+pt[0].length):-1}function F(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.s=+pt[0],Mt+pt[0].length):-1}function P(Je,et){return o(Je.getDate(),et,2)}function j(Je,et){return o(Je.getHours(),et,2)}function U(Je,et){return o(Je.getHours()%12||12,et,2)}function $(Je,et){return o(1+b.timeDay.count(b.timeYear(Je),Je),et,3)}function Q(Je,et){return o(Je.getMilliseconds(),et,3)}function re(Je,et){return Q(Je,et)+"000"}function ne(Je,et){return o(Je.getMonth()+1,et,2)}function se(Je,et){return o(Je.getMinutes(),et,2)}function G(Je,et){return o(Je.getSeconds(),et,2)}function X(Je){var et=Je.getDay();return et===0?7:et}function K(Je,et){return o(b.timeSunday.count(b.timeYear(Je)-1,Je),et,2)}function H(Je){var et=Je.getDay();return et>=4||et===0?b.timeThursday(Je):b.timeThursday.ceil(Je)}function Y(Je,et){return Je=H(Je),o(b.timeThursday.count(b.timeYear(Je),Je)+(b.timeYear(Je).getDay()===4),et,2)}function q(Je){return Je.getDay()}function Z(Je,et){return o(b.timeMonday.count(b.timeYear(Je)-1,Je),et,2)}function ee(Je,et){return o(Je.getFullYear()%100,et,2)}function ae(Je,et){return Je=H(Je),o(Je.getFullYear()%100,et,2)}function he(Je,et){return o(Je.getFullYear()%1e4,et,4)}function xe(Je,et){var Mt=Je.getDay();return Je=Mt>=4||Mt===0?b.timeThursday(Je):b.timeThursday.ceil(Je),o(Je.getFullYear()%1e4,et,4)}function we(Je){var et=Je.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+o(et/60|0,"0",2)+o(et%60,"0",2)}function Me(Je,et){return o(Je.getUTCDate(),et,2)}function Se(Je,et){return o(Je.getUTCHours(),et,2)}function Ie(Je,et){return o(Je.getUTCHours()%12||12,et,2)}function Ve(Je,et){return o(1+b.utcDay.count(b.utcYear(Je),Je),et,3)}function Ge(Je,et){return o(Je.getUTCMilliseconds(),et,3)}function ke(Je,et){return Ge(Je,et)+"000"}function _e(Je,et){return o(Je.getUTCMonth()+1,et,2)}function ce(Je,et){return o(Je.getUTCMinutes(),et,2)}function ve(Je,et){return o(Je.getUTCSeconds(),et,2)}function le(Je){var et=Je.getUTCDay();return et===0?7:et}function Ae(Je,et){return o(b.utcSunday.count(b.utcYear(Je)-1,Je),et,2)}function Be(Je){var et=Je.getUTCDay();return et>=4||et===0?b.utcThursday(Je):b.utcThursday.ceil(Je)}function Xe(Je,et){return Je=Be(Je),o(b.utcThursday.count(b.utcYear(Je),Je)+(b.utcYear(Je).getUTCDay()===4),et,2)}function Ye(Je){return Je.getUTCDay()}function yt(Je,et){return o(b.utcMonday.count(b.utcYear(Je)-1,Je),et,2)}function gt(Je,et){return o(Je.getUTCFullYear()%100,et,2)}function Tt(Je,et){return Je=Be(Je),o(Je.getUTCFullYear()%100,et,2)}function At(Je,et){return o(Je.getUTCFullYear()%1e4,et,4)}function $t(Je,et){var Mt=Je.getUTCDay();return Je=Mt>=4||Mt===0?b.utcThursday(Je):b.utcThursday.ceil(Je),o(Je.getUTCFullYear()%1e4,et,4)}function rr(){return"+0000"}function _r(){return"%"}function Xt(Je){return+Je}function or(Je){return Math.floor(+Je/1e3)}var Ot;vt({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 vt(Je){return Ot=e(Je),p.timeFormat=Ot.format,p.timeParse=Ot.parse,p.utcFormat=Ot.utcFormat,p.utcParse=Ot.utcParse,Ot}var ht="%Y-%m-%dT%H:%M:%S.%LZ";function De(Je){return Je.toISOString()}var Ne=Date.prototype.toISOString?De:p.utcFormat(ht);function We(Je){var et=new Date(Je);return isNaN(et)?null:et}var Ke=+new Date("2000-01-01T00:00:00.000Z")?We:p.utcParse(ht);p.isoFormat=Ne,p.isoParse=Ke,p.timeFormatDefaultLocale=vt,p.timeFormatLocale=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),Cw=ze({"node_modules/d3-format/dist/d3-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function E(T,f){if((u=(T=f?T.toExponential(f-1):T.toExponential()).indexOf("e"))<0)return null;var u,A=T.slice(0,u);return[A.length>1?A[0]+A.slice(2):A,+T.slice(u+1)]}function k(T){return T=E(Math.abs(T)),T?T[1]:NaN}function l(T,f){return function(u,A){for(var x=u.length,z=[],I=0,O=T[0],D=0;x>0&&O>0&&(D+O+1>A&&(O=Math.max(1,A-D)),z.push(u.substring(x-=O,x+O)),!((D+=O+1)>A));)O=T[I=(I+1)%T.length];return z.reverse().join(f)}}function e(T){return function(f){return f.replace(/[0-9]/g,function(u){return T[+u]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(T){if(!(f=t.exec(T)))throw new Error("invalid format: "+T);var f;return new r({fill:f[1],align:f[2],sign:f[3],symbol:f[4],zero:f[5],width:f[6],comma:f[7],precision:f[8]&&f[8].slice(1),trim:f[9],type:f[10]})}n.prototype=r.prototype;function r(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}r.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 a(T){e:for(var f=T.length,u=1,A=-1,x;u0&&(A=0);break}return A>0?T.slice(0,A)+T.slice(x+1):T}var o;function s(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1],z=x-(o=Math.max(-8,Math.min(8,Math.floor(x/3)))*3)+1,I=A.length;return z===I?A:z>I?A+new Array(z-I+1).join("0"):z>0?A.slice(0,z)+"."+A.slice(z):"0."+new Array(1-z).join("0")+E(T,Math.max(0,f+z-1))[0]}function c(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1];return x<0?"0."+new Array(-x).join("0")+A:A.length>x+1?A.slice(0,x+1)+"."+A.slice(x+1):A+new Array(x-A.length+2).join("0")}var m={"%":function(T,f){return(T*100).toFixed(f)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:b,e:function(T,f){return T.toExponential(f)},f:function(T,f){return T.toFixed(f)},g:function(T,f){return T.toPrecision(f)},o:function(T){return Math.round(T).toString(8)},p:function(T,f){return c(T*100,f)},r:c,s,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function h(T){return T}var v=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function i(T){var f=T.grouping===void 0||T.thousands===void 0?h:l(v.call(T.grouping,Number),T.thousands+""),u=T.currency===void 0?"":T.currency[0]+"",A=T.currency===void 0?"":T.currency[1]+"",x=T.decimal===void 0?".":T.decimal+"",z=T.numerals===void 0?h:e(v.call(T.numerals,String)),I=T.percent===void 0?"%":T.percent+"",O=T.minus===void 0?"-":T.minus+"",D=T.nan===void 0?"NaN":T.nan+"";function B(P){P=n(P);var j=P.fill,U=P.align,$=P.sign,Q=P.symbol,re=P.zero,ne=P.width,se=P.comma,G=P.precision,X=P.trim,K=P.type;K==="n"?(se=!0,K="g"):m[K]||(G===void 0&&(G=12),X=!0,K="g"),(re||j==="0"&&U==="=")&&(re=!0,j="0",U="=");var H=Q==="$"?u:Q==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",Y=Q==="$"?A:/[%p]/.test(K)?I:"",q=m[K],Z=/[defgprs%]/.test(K);G=G===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G));function ee(ae){var he=H,xe=Y,we,Me,Se;if(K==="c")xe=q(ae)+xe,ae="";else{ae=+ae;var Ie=ae<0||1/ae<0;if(ae=isNaN(ae)?D:q(Math.abs(ae),G),X&&(ae=a(ae)),Ie&&+ae==0&&$!=="+"&&(Ie=!1),he=(Ie?$==="("?$:O:$==="-"||$==="("?"":$)+he,xe=(K==="s"?g[8+o/3]:"")+xe+(Ie&&$==="("?")":""),Z){for(we=-1,Me=ae.length;++weSe||Se>57){xe=(Se===46?x+ae.slice(we+1):ae.slice(we))+xe,ae=ae.slice(0,we);break}}}se&&!re&&(ae=f(ae,1/0));var Ve=he.length+ae.length+xe.length,Ge=Ve>1)+he+ae+xe+Ge.slice(Ve);break;default:ae=Ge+he+ae+xe;break}return z(ae)}return ee.toString=function(){return P+""},ee}function F(P,j){var U=B((P=n(P),P.type="f",P)),$=Math.max(-8,Math.min(8,Math.floor(k(j)/3)))*3,Q=Math.pow(10,-$),re=g[8+$/3];return function(ne){return U(Q*ne)+re}}return{format:B,formatPrefix:F}}var w;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(T){return w=i(T),p.format=w.format,p.formatPrefix=w.formatPrefix,w}function M(T){return Math.max(0,-k(Math.abs(T)))}function C(T,f){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k(f)/3)))*3-k(Math.abs(T)))}function _(T,f){return T=Math.abs(T),f=Math.abs(f)-T,Math.max(0,k(f)-k(T))+1}p.FormatSpecifier=r,p.formatDefaultLocale=S,p.formatLocale=i,p.formatSpecifier=n,p.precisionFixed=M,p.precisionPrefix=C,p.precisionRound=_,Object.defineProperty(p,"__esModule",{value:!0})})}}),FR=ze({"node_modules/is-string-blank/index.js"(J,V){"use strict";V.exports=function(p){for(var b=p.length,E,k=0;k13)&&E!==32&&E!==133&&E!==160&&E!==5760&&E!==6158&&(E<8192||E>8205)&&E!==8232&&E!==8233&&E!==8239&&E!==8287&&E!==8288&&E!==12288&&E!==65279)return!1;return!0}}}),ao=ze({"node_modules/fast-isnumeric/index.js"(J,V){"use strict";var p=FR();V.exports=function(b){var E=typeof b;if(E==="string"){var k=b;if(b=+b,b===0&&p(k))return!1}else if(E!=="number")return!1;return b-b<1}}}),No=ze({"src/constants/numerical.js"(J,V){"use strict";V.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}}}),Lw=ze({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p["base64-arraybuffer"]={}))})(J,function(p){"use strict";for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256),k=0;k>2],o+=b[(n[r]&3)<<4|n[r+1]>>4],o+=b[(n[r+1]&15)<<2|n[r+2]>>6],o+=b[n[r+2]&63];return a%3===2?o=o.substring(0,o.length-1)+"=":a%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e=function(t){var n=t.length*.75,r=t.length,a,o=0,s,c,m,h;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);var v=new ArrayBuffer(n),g=new Uint8Array(v);for(a=0;a>4,g[o++]=(c&15)<<4|m>>2,g[o++]=(m&3)<<6|h&63;return v};p.decode=e,p.encode=l,Object.defineProperty(p,"__esModule",{value:!0})})}}),tv=ze({"src/lib/is_plain_object.js"(J,V){"use strict";V.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),Ff=ze({"src/lib/array.js"(J){"use strict";var V=Lw().decode,p=tv(),b=Array.isArray,E=ArrayBuffer,k=DataView;function l(s){return E.isView(s)&&!(s instanceof k)}J.isTypedArray=l;function e(s){return b(s)||l(s)}J.isArrayOrTypedArray=e;function t(s){return!e(s[0])}J.isArray1D=t,J.ensureArray=function(s,c){return b(s)||(s=[]),s.length=c,s};var n={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};n.uint8c=n.u1c,n.uint8=n.u1,n.int8=n.i1,n.uint16=n.u2,n.int16=n.i2,n.uint32=n.u4,n.int32=n.i4,n.float32=n.f4,n.float64=n.f8;function r(s){return s.constructor===ArrayBuffer}J.isArrayBuffer=r,J.decodeTypedArraySpec=function(s){var c=[],m=a(s),h=m.dtype,v=n[h];if(!v)throw new Error('Error in dtype: "'+h+'"');var g=v.BYTES_PER_ELEMENT,i=m.bdata;r(i)||(i=V(i));var w=m.shape===void 0?[i.byteLength/g]:(""+m.shape).split(",");w.reverse();var S=w.length,M,C,_=+w[0],T=g*_,f=0;if(S===1)c=new v(i);else if(S===2)for(M=+w[1],C=0;C2)return v[M]=v[M]|l,w.set(S,null);if(i){for(c=M;c0)return Math.log(E)/Math.LN10;var l=Math.log(Math.min(k[0],k[1]))/Math.LN10;return p(l)||(l=Math.log(Math.max(k[0],k[1]))/Math.LN10-6),l}}}),OR=ze({"src/lib/relink_private.js"(J,V){"use strict";var p=Ff().isArrayOrTypedArray,b=tv();V.exports=function E(k,l){for(var e in l){var t=l[e],n=k[e];if(n!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in k)continue;k[e]=t}else if(p(t)&&p(n)&&b(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,n.length),a=0;aNR,modHalf:()=>jR});function NR(J,V){let p=J%V;return p<0?p+V:p}function jR(J,V){return Math.abs(J)>V/2?J-Math.round(J/V)*V:J}var Um=zi({"src/lib/mod.ts"(){"use strict"}}),Ki=ze({"src/lib/extend.js"(J){"use strict";var V=tv(),p=Array.isArray;function b(k,l){var e,t;for(e=0;e{for(var Qe in Ue)p(Le,Qe,{get:Ue[Qe],enumerable:!0})},e=(Le,Ue,Qe,_t)=>{if(Ue&&typeof Ue=="object"||typeof Ue=="function")for(let wt of E(Ue))!k.call(Le,wt)&&wt!==Qe&&p(Le,wt,{get:()=>Ue[wt],enumerable:!(_t=b(Ue,wt))||_t.enumerable});return Le},t=Le=>e(p({},"__esModule",{value:!0}),Le),n={};l(n,{a98:()=>So,average:()=>Tr,averageAngle:()=>rt,averageNumber:()=>fr,blend:()=>ll,blerp:()=>Ye,clampChroma:()=>dr,clampGamut:()=>ir,clampRgb:()=>Ut,colorsNamed:()=>s,convertA98ToXyz65:()=>Ot,convertCubehelixToRgb:()=>Nn,convertDlchToLab65:()=>oo,convertHsiToRgb:()=>ds,convertHslToRgb:()=>wo,convertHsvToRgb:()=>Ts,convertHwbToRgb:()=>yo,convertItpToXyz65:()=>ms,convertJabToJch:()=>Nu,convertJabToRgb:()=>Hc,convertJabToXyz65:()=>Gc,convertJchToJab:()=>al,convertLab65ToDlch:()=>qn,convertLab65ToRgb:()=>rn,convertLab65ToXyz65:()=>tn,convertLabToLch:()=>kt,convertLabToRgb:()=>vl,convertLabToXyz50:()=>tc,convertLchToLab:()=>ar,convertLchuvToLuv:()=>qu,convertLrgbToOklab:()=>tr,convertLrgbToRgb:()=>Pt,convertLuvToLchuv:()=>hu,convertLuvToXyz50:()=>Gf,convertOkhslToOklab:()=>_i,convertOkhsvToOklab:()=>Ln,convertOklabToLrgb:()=>ba,convertOklabToOkhsl:()=>yi,convertOklabToOkhsv:()=>kn,convertOklabToRgb:()=>Na,convertP3ToXyz65:()=>zo,convertProphotoToXyz50:()=>mc,convertRec2020ToXyz65:()=>Wu,convertRgbToCubehelix:()=>Xa,convertRgbToHsi:()=>jo,convertRgbToHsl:()=>pi,convertRgbToHsv:()=>Bo,convertRgbToHwb:()=>bs,convertRgbToJab:()=>$l,convertRgbToLab:()=>mf,convertRgbToLab65:()=>fn,convertRgbToLrgb:()=>Ke,convertRgbToOklab:()=>wr,convertRgbToXyb:()=>eu,convertRgbToXyz50:()=>rc,convertRgbToXyz65:()=>et,convertRgbToYiq:()=>Ba,convertXybToRgb:()=>mt,convertXyz50ToLab:()=>ac,convertXyz50ToLuv:()=>Vu,convertXyz50ToProphoto:()=>xl,convertXyz50ToRgb:()=>Tu,convertXyz50ToXyz65:()=>jr,convertXyz65ToA98:()=>De,convertXyz65ToItp:()=>zu,convertXyz65ToJab:()=>wc,convertXyz65ToLab65:()=>no,convertXyz65ToP3:()=>js,convertXyz65ToRec2020:()=>bf,convertXyz65ToRgb:()=>qt,convertXyz65ToXyz50:()=>Br,convertYiqToRgb:()=>Tn,converter:()=>P,cubehelix:()=>Ws,differenceCie76:()=>on,differenceCie94:()=>en,differenceCiede2000:()=>vi,differenceCmc:()=>Yi,differenceEuclidean:()=>Yn,differenceHueChroma:()=>li,differenceHueNaive:()=>Un,differenceHueSaturation:()=>yn,differenceHyab:()=>Ja,differenceItp:()=>lt,differenceKotsarenkoRamos:()=>Oa,displayable:()=>st,dlab:()=>Zo,dlch:()=>es,easingGamma:()=>je,easingInOutSine:()=>Mo,easingMidpoint:()=>Hr,easingSmootherstep:()=>Wi,easingSmoothstep:()=>so,easingSmoothstepInverse:()=>ti,filterBrightness:()=>ga,filterContrast:()=>da,filterDeficiencyDeuter:()=>Jn,filterDeficiencyProt:()=>In,filterDeficiencyTrit:()=>Ei,filterGrayscale:()=>Cn,filterHueRotate:()=>ui,filterInvert:()=>Dn,filterSaturate:()=>za,filterSepia:()=>Fa,fixupAlpha:()=>$t,fixupHueDecreasing:()=>cr,fixupHueIncreasing:()=>ur,fixupHueLonger:()=>nr,fixupHueShorter:()=>Rt,formatCss:()=>wi,formatHex:()=>sl,formatHex8:()=>sc,formatHsl:()=>Ps,formatRgb:()=>tu,getMode:()=>se,hsi:()=>$o,hsl:()=>_s,hsv:()=>Go,hwb:()=>Ys,inGamut:()=>It,interpolate:()=>oa,interpolateWith:()=>fa,interpolateWithPremultipliedAlpha:()=>Ea,interpolatorLinear:()=>At,interpolatorPiecewise:()=>Tt,interpolatorSplineBasis:()=>hn,interpolatorSplineBasisClosed:()=>An,interpolatorSplineMonotone:()=>ie,interpolatorSplineMonotone2:()=>fe,interpolatorSplineMonotoneClosed:()=>be,interpolatorSplineNatural:()=>$n,interpolatorSplineNaturalClosed:()=>xi,itp:()=>Ll,jab:()=>mo,jch:()=>ru,lab:()=>Rs,lab65:()=>Yu,lch:()=>Ul,lch65:()=>ql,lchuv:()=>fo,lerp:()=>Be,lrgb:()=>Xo,luv:()=>Os,mapAlphaDivide:()=>ct,mapAlphaMultiply:()=>at,mapTransferGamma:()=>St,mapTransferLinear:()=>Nt,mapper:()=>tt,modeA98:()=>Ht,modeCubehelix:()=>Dr,modeDlab:()=>go,modeDlch:()=>Ao,modeHsi:()=>to,modeHsl:()=>Vs,modeHsv:()=>Pi,modeHwb:()=>dl,modeItp:()=>bc,modeJab:()=>Qu,modeJch:()=>ju,modeLab:()=>Sl,modeLab65:()=>oh,modeLch:()=>nl,modeLch65:()=>Kc,modeLchuv:()=>kl,modeLrgb:()=>Cc,modeLuv:()=>vc,modeOkhsl:()=>ri,modeOkhsv:()=>Zi,modeOklab:()=>Yo,modeOklch:()=>ns,modeP3:()=>zl,modeProphoto:()=>oc,modeRec2020:()=>Qc,modeRgb:()=>_r,modeXyb:()=>Bt,modeXyz50:()=>Wt,modeXyz65:()=>la,modeYiq:()=>Si,nearest:()=>vr,okhsl:()=>ra,okhsv:()=>Ya,oklab:()=>Ka,oklch:()=>Bi,p3:()=>rs,parse:()=>_e,parseHex:()=>g,parseHsl:()=>Ss,parseHslLegacy:()=>Uo,parseHwb:()=>hl,parseLab:()=>ih,parseLch:()=>$c,parseNamed:()=>m,parseOklab:()=>Do,parseOklch:()=>Gs,parseRgb:()=>ve,parseRgbLegacy:()=>O,parseTransparent:()=>Ae,prophoto:()=>Is,random:()=>qe,rec2020:()=>Oi,removeParser:()=>X,rgb:()=>Wr,round:()=>Qi,samples:()=>ut,serializeHex:()=>jl,serializeHex8:()=>Hs,serializeHsl:()=>hi,serializeRgb:()=>Cu,toGamut:()=>Ar,trilerp:()=>yt,unlerp:()=>Xe,useMode:()=>ne,useParser:()=>G,wcagContrast:()=>Bs,wcagLuminance:()=>zs,xyb:()=>na,xyz50:()=>pa,xyz65:()=>Wa,yiq:()=>ln}),V.exports=t(n);var r=(Le,Ue)=>{if(typeof Le=="number"){if(Ue===3)return{mode:"rgb",r:(Le>>8&15|Le>>4&240)/255,g:(Le>>4&15|Le&240)/255,b:(Le&15|Le<<4&240)/255};if(Ue===4)return{mode:"rgb",r:(Le>>12&15|Le>>8&240)/255,g:(Le>>8&15|Le>>4&240)/255,b:(Le>>4&15|Le&240)/255,alpha:(Le&15|Le<<4&240)/255};if(Ue===6)return{mode:"rgb",r:(Le>>16&255)/255,g:(Le>>8&255)/255,b:(Le&255)/255};if(Ue===8)return{mode:"rgb",r:(Le>>24&255)/255,g:(Le>>16&255)/255,b:(Le>>8&255)/255,alpha:(Le&255)/255}}},a=r,o={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},s=o,c=Le=>a(s[Le.toLowerCase()],6),m=c,h=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,v=Le=>{let Ue;return(Ue=Le.match(h))?a(parseInt(Ue[1],16),Ue[1].length):void 0},g=v,i="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",w=`(?:${i}|none)`,S=`${i}%`,M=`(?:${i}%|none)`,C=`(?:${i}%|${i})`,_=`(?:${i}%|${i}|none)`,T=`(?:${i}(deg|grad|rad|turn)|${i})`,f=`(?:${i}(deg|grad|rad|turn)|${i}|none)`,u="\\s*,\\s*",A=new RegExp("^"+_+"$"),x=new RegExp(`^rgba?\\(\\s*${i}${u}${i}${u}${i}\\s*(?:,\\s*${C}\\s*)?\\)$`),z=new RegExp(`^rgba?\\(\\s*${S}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),I=Le=>{let Ue={mode:"rgb"},Qe;if(Qe=Le.match(x))Qe[1]!==void 0&&(Ue.r=Qe[1]/255),Qe[2]!==void 0&&(Ue.g=Qe[2]/255),Qe[3]!==void 0&&(Ue.b=Qe[3]/255);else if(Qe=Le.match(z))Qe[1]!==void 0&&(Ue.r=Qe[1]/100),Qe[2]!==void 0&&(Ue.g=Qe[2]/100),Qe[3]!==void 0&&(Ue.b=Qe[3]/100);else return;return Qe[4]!==void 0?Ue.alpha=Math.max(0,Math.min(1,Qe[4]/100)):Qe[5]!==void 0&&(Ue.alpha=Math.max(0,Math.min(1,+Qe[5]))),Ue},O=I,D=(Le,Ue)=>Le===void 0?void 0:typeof Le!="object"?_e(Le):Le.mode!==void 0?Le:Ue?lo(Li({},Le),{mode:Ue}):void 0,B=D,F=(Le="rgb")=>Ue=>(Ue=B(Ue,Le))!==void 0?Ue.mode===Le?Ue:j[Ue.mode][Le]?j[Ue.mode][Le](Ue):Le==="rgb"?j[Ue.mode].rgb(Ue):j.rgb[Le](j[Ue.mode].rgb(Ue)):void 0,P=F,j={},U={},$=[],Q={},re=Le=>Le,ne=Le=>(j[Le.mode]=Li(Li({},j[Le.mode]),Le.toMode),Object.keys(Le.fromMode||{}).forEach(Ue=>{j[Ue]||(j[Ue]={}),j[Ue][Le.mode]=Le.fromMode[Ue]}),Le.ranges||(Le.ranges={}),Le.difference||(Le.difference={}),Le.channels.forEach(Ue=>{if(Le.ranges[Ue]===void 0&&(Le.ranges[Ue]=[0,1]),!Le.interpolate[Ue])throw new Error(`Missing interpolator for: ${Ue}`);typeof Le.interpolate[Ue]=="function"&&(Le.interpolate[Ue]={use:Le.interpolate[Ue]}),Le.interpolate[Ue].fixup||(Le.interpolate[Ue].fixup=re)}),U[Le.mode]=Le,(Le.parse||[]).forEach(Ue=>{G(Ue,Le.mode)}),P(Le.mode)),se=Le=>U[Le],G=(Le,Ue)=>{if(typeof Le=="string"){if(!Ue)throw new Error("'mode' required when 'parser' is a string");Q[Le]=Ue}else typeof Le=="function"&&$.indexOf(Le)<0&&$.push(Le)},X=Le=>{if(typeof Le=="string")delete Q[Le];else if(typeof Le=="function"){let Ue=$.indexOf(Le);Ue>0&&$.splice(Ue,1)}},K=/[^\x00-\x7F]|[a-zA-Z_]/,H=/[^\x00-\x7F]|[-\w]/,Y={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},q=0;function Z(Le){let Ue=Le[q],Qe=Le[q+1];return Ue==="-"||Ue==="+"?/\d/.test(Qe)||Qe==="."&&/\d/.test(Le[q+2]):Ue==="."?/\d/.test(Qe):/\d/.test(Ue)}function ee(Le){if(q>=Le.length)return!1;let Ue=Le[q];if(K.test(Ue))return!0;if(Ue==="-"){if(Le.length-q<2)return!1;let Qe=Le[q+1];return!!(Qe==="-"||K.test(Qe))}return!1}var ae={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function he(Le){let Ue="";if((Le[q]==="-"||Le[q]==="+")&&(Ue+=Le[q++]),Ue+=xe(Le),Le[q]==="."&&/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le)),(Le[q]==="e"||Le[q]==="E")&&((Le[q+1]==="-"||Le[q+1]==="+")&&/\d/.test(Le[q+2])?Ue+=Le[q++]+Le[q++]+xe(Le):/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le))),ee(Le)){let Qe=we(Le);return Qe==="deg"||Qe==="rad"||Qe==="turn"||Qe==="grad"?{type:Y.Hue,value:Ue*ae[Qe]}:void 0}return Le[q]==="%"?(q++,{type:Y.Percentage,value:+Ue}):{type:Y.Number,value:+Ue}}function xe(Le){let Ue="";for(;/\d/.test(Le[q]);)Ue+=Le[q++];return Ue}function we(Le){let Ue="";for(;q4)){if(Qe.length===4){if(Qe[3].type!==Y.Alpha)return;Qe[3]=Qe[3].value}return Qe.length===3&&Qe.push({type:Y.None,value:void 0}),Qe.every(wt=>wt.type!==Y.Alpha)?Qe:void 0}}function Ge(Le,Ue){Le._i=0;let Qe=Le[Le._i++];if(!Qe||Qe.type!==Y.Function)return;let _t=Ve(Le,Ue);if(_t)return _t.unshift(Qe.value),_t}var ke=Le=>{if(typeof Le!="string")return;let Ue=Se(Le),Qe=Ue?Ge(Ue,!0):void 0,_t,wt=0,Lt=$.length;for(;wtLe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Ae=le,Be=(Le,Ue,Qe)=>Le+Qe*(Ue-Le),Xe=(Le,Ue,Qe)=>(Qe-Le)/(Ue-Le),Ye=(Le,Ue,Qe,_t,wt,Lt)=>Be(Be(Le,Ue,wt),Be(Qe,_t,wt),Lt),yt=(Le,Ue,Qe,_t,wt,Lt,pr,Gr,va,Qa,Ga)=>Be(Ye(Le,Ue,Qe,_t,va,Qa),Ye(wt,Lt,pr,Gr,va,Qa),Ga),gt=Le=>{let Ue=[];for(let Qe=0;QeUe=>{let Qe=gt(Ue);return _t=>{let wt=_t*Qe.length,Lt=_t>=1?Qe.length-1:Math.max(Math.floor(wt),0),pr=Qe[Lt];return pr===void 0?void 0:Le(pr[0],pr[1],wt-Lt)}},At=Tt(Be),$t=Le=>{let Ue=!1,Qe=Le.map(_t=>_t!==void 0?(Ue=!0,_t):1);return Ue?Qe:Le},rr={mode:"rgb",channels:["r","g","b","alpha"],parse:[ve,g,O,m,Ae,"srgb"],serialize:"srgb",interpolate:{r:At,g:At,b:At,alpha:{use:At,fixup:$t}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_r=rr,Xt=(Le=0)=>Math.pow(Math.abs(Le),563/256)*Math.sign(Le),or=Le=>{let Ue=Xt(Le.r),Qe=Xt(Le.g),_t=Xt(Le.b),wt={mode:"xyz65",x:.5766690429101305*Ue+.1855582379065463*Qe+.1882286462349947*_t,y:.297344975250536*Ue+.6273635662554661*Qe+.0752914584939979*_t,z:.0270313613864123*Ue+.0706888525358272*Qe+.9913375368376386*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Ot=or,vt=Le=>Math.pow(Math.abs(Le),256/563)*Math.sign(Le),ht=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"a98",r:vt(Le*2.0415879038107465-Ue*.5650069742788597-.3447313507783297*Qe),g:vt(Le*-.9692436362808798+Ue*1.8759675015077206+.0415550574071756*Qe),b:vt(Le*.0134442806320312-Ue*.1183623922310184+1.0151749943912058*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},De=ht,Ne=(Le=0)=>{let Ue=Math.abs(Le);return Ue<=.04045?Le/12.92:(Math.sign(Le)||1)*Math.pow((Ue+.055)/1.055,2.4)},We=({r:Le,g:Ue,b:Qe,alpha:_t})=>{let wt={mode:"lrgb",r:Ne(Le),g:Ne(Ue),b:Ne(Qe)};return _t!==void 0&&(wt.alpha=_t),wt},Ke=We,Je=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.4123907992659593*Ue+.357584339383878*Qe+.1804807884018343*_t,y:.2126390058715102*Ue+.715168678767756*Qe+.0721923153607337*_t,z:.0193308187155918*Ue+.119194779794626*Qe+.9505321522496607*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},et=Je,Mt=(Le=0)=>{let Ue=Math.abs(Le);return Ue>.0031308?(Math.sign(Le)||1)*(1.055*Math.pow(Ue,1/2.4)-.055):Le*12.92},pt=({r:Le,g:Ue,b:Qe,alpha:_t},wt="rgb")=>{let Lt={mode:wt,r:Mt(Le),g:Mt(Ue),b:Mt(Qe)};return _t!==void 0&&(Lt.alpha=_t),Lt},Pt=pt,Ct=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.2409699419045226-Ue*1.537383177570094-.4986107602930034*Qe,g:Le*-.9692436362808796+Ue*1.8759675015077204+.0415550574071756*Qe,b:Le*.0556300796969936-Ue*.2039769588889765+1.0569715142428784*Qe});return _t!==void 0&&(wt.alpha=_t),wt},qt=Ct,Vt=lo(Li({},_r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:Le=>De(et(Le)),xyz65:De},toMode:{rgb:Le=>qt(Ot(Le)),xyz65:Ot}}),Ht=Vt,Sr=Le=>(Le=Le%360)<0?Le+360:Le,Kr=Sr,Yt=(Le,Ue)=>Le.map((Qe,_t,wt)=>{if(Qe===void 0)return Qe;let Lt=Kr(Qe);return _t===0||Le[_t-1]===void 0?Lt:Ue(Lt-Kr(wt[_t-1]))}).reduce((Qe,_t)=>!Qe.length||_t===void 0||Qe[Qe.length-1]===void 0?(Qe.push(_t),Qe):(Qe.push(_t+Qe[Qe.length-1]),Qe),[]),Rt=Le=>Yt(Le,Ue=>Math.abs(Ue)<=180?Ue:Ue-360*Math.sign(Ue)),nr=Le=>Yt(Le,Ue=>Math.abs(Ue)>=180||Ue===0?Ue:Ue-360*Math.sign(Ue)),ur=Le=>Yt(Le,Ue=>Ue>=0?Ue:Ue+360),cr=Le=>Yt(Le,Ue=>Ue<=0?Ue:Ue-360),Rr=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Qr=Math.PI/180,Zr=180/Math.PI,ha=Rr[3]*Rr[4],Pa=Rr[1]*Rr[4],La=Rr[1]*Rr[2]-Rr[0]*Rr[3],un=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(La*Qe+Le*ha-Ue*Pa)/(La+ha-Pa),Lt=Qe-wt,pr=(Rr[4]*(Ue-wt)-Rr[2]*Lt)/Rr[3],Gr={mode:"cubehelix",l:wt,s:wt===0||wt===1?void 0:Math.sqrt(Lt*Lt+pr*pr)/(Rr[4]*wt*(1-wt))};return Gr.s&&(Gr.h=Math.atan2(pr,Lt)*Zr-120),_t!==void 0&&(Gr.alpha=_t),Gr},Xa=un,ja=({h:Le,s:Ue,l:Qe,alpha:_t})=>{let wt={mode:"rgb"};Le=(Le===void 0?0:Le+120)*Qr,Qe===void 0&&(Qe=0);let Lt=Ue===void 0?0:Ue*Qe*(1-Qe),pr=Math.cos(Le),Gr=Math.sin(Le);return wt.r=Qe+Lt*(Rr[0]*pr+Rr[1]*Gr),wt.g=Qe+Lt*(Rr[2]*pr+Rr[3]*Gr),wt.b=Qe+Lt*(Rr[4]*pr+Rr[5]*Gr),_t!==void 0&&(wt.alpha=_t),wt},Nn=ja,yn=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.s||!Ue.s)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.s*Ue.s)*wt},Un=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h);return Math.abs(_t-Qe)>180?Qe-(_t-360*Math.sign(_t-Qe)):_t-Qe},li=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.c||!Ue.c)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.c*Ue.c)*wt},Yn=(Le="rgb",Ue=[1,1,1,0])=>{let Qe=se(Le),_t=Qe.channels,wt=Qe.difference,Lt=P(Le);return(pr,Gr)=>{let va=Lt(pr),Qa=Lt(Gr);return Math.sqrt(_t.reduce((Ga,Ua,Mn)=>{let dn=wt[Ua]?wt[Ua](va,Qa):va[Ua]-Qa[Ua];return Ga+(Ue[Mn]||0)*Math.pow(isNaN(dn)?0:dn,2)},0))}},on=()=>Yn("lab65"),en=(Le=1,Ue=.045,Qe=.015)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),Mn=Gr.l,dn=Gr.a,_n=Gr.b,Sn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(va-Mn,2),Zn=Math.pow(Ua-Sn,2),Ci=Math.pow(Qa-dn,2)+Math.pow(Ga-_n,2)-Zn;return Math.sqrt(Bn/Math.pow(Le,2)+Zn/Math.pow(1+Ue*Ua,2)+Ci/Math.pow(1+Qe*Ua,2))}},vi=(Le=1,Ue=1,Qe=1)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),Mn=Gr.l,dn=Gr.a,_n=Gr.b,Sn=Math.sqrt(dn*dn+_n*_n),Bn=(Ua+Sn)/2,Zn=.5*(1-Math.sqrt(Math.pow(Bn,7)/(Math.pow(Bn,7)+Math.pow(25,7)))),Ci=Qa*(1+Zn),qo=dn*(1+Zn),As=Math.sqrt(Ci*Ci+Ga*Ga),ls=Math.sqrt(qo*qo+_n*_n),Vl=Math.abs(Ci)+Math.abs(Ga)===0?0:Math.atan2(Ga,Ci);Vl+=(Vl<0)*2*Math.PI;let au=Math.abs(qo)+Math.abs(_n)===0?0:Math.atan2(_n,qo);au+=(au<0)*2*Math.PI;let Lu=Mn-va,uh=ls-As,wh=As*ls===0?0:au-Vl;wh-=(wh>Math.PI)*2*Math.PI,wh+=(wh<-Math.PI)*2*Math.PI;let Gh=2*Math.sqrt(As*ls)*Math.sin(wh/2),Gd=(va+Mn)/2,Ad=(As+ls)/2,ch;As*ls===0?ch=Vl+au:(ch=(Vl+au)/2,ch-=(Math.abs(Vl-au)>Math.PI)*Math.PI,ch+=(ch<0)*2*Math.PI);let Mv=Math.pow(Gd-50,2),vp=1-.17*Math.cos(ch-Math.PI/6)+.24*Math.cos(2*ch)+.32*Math.cos(3*ch+Math.PI/30)-.2*Math.cos(4*ch-63*Math.PI/180),mp=1+.015*Mv/Math.sqrt(20+Mv),gp=1+.045*Ad,yp=1+.015*Ad*vp,xg=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*ch-275)/25,2)),p0=2*Math.sqrt(Math.pow(Ad,7)/(Math.pow(Ad,7)+Math.pow(25,7))),Md=-1*Math.sin(2*xg)*p0;return Math.sqrt(Math.pow(Lu/(Le*mp),2)+Math.pow(uh/(Ue*gp),2)+Math.pow(Gh/(Qe*yp),2)+Md*uh/(Ue*gp)*Gh/(Qe*yp))}},Yi=(Le=1,Ue=1)=>{let Qe=P("lab65");return(_t,wt)=>{let Lt=Qe(_t),pr=Lt.l,Gr=Lt.a,va=Lt.b,Qa=Math.sqrt(Gr*Gr+va*va),Ga=Math.atan2(va,Gr);Ga=Ga+2*Math.PI*(Ga<0);let Ua=Qe(wt),Mn=Ua.l,dn=Ua.a,_n=Ua.b,Sn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(pr-Mn,2),Zn=Math.pow(Qa-Sn,2),Ci=Math.pow(Gr-dn,2)+Math.pow(va-_n,2)-Zn,qo=Math.sqrt(Math.pow(Qa,4)/(Math.pow(Qa,4)+1900)),As=Ga>=164/180*Math.PI&&Ga<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(Ga+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(Ga+35/180*Math.PI)),ls=pr<16?.511:.040975*pr/(1+.01765*pr),Vl=.0638*Qa/(1+.0131*Qa)+.638,au=Vl*(qo*As+1-qo);return Math.sqrt(Bn/Math.pow(Le*ls,2)+Zn/Math.pow(Ue*Vl,2)+Ci/Math.pow(au,2))}},Ja=()=>{let Le=P("lab65");return(Ue,Qe)=>{let _t=Le(Ue),wt=Le(Qe),Lt=_t.l-wt.l,pr=_t.a-wt.a,Gr=_t.b-wt.b;return Math.abs(Lt)+Math.sqrt(pr*pr+Gr*Gr)}},Oa=()=>Yn("yiq",[.5053,.299,.1957]),lt=()=>Yn("itp",[518400,129600,518400]),rt=Le=>{let Ue=Le.reduce((_t,wt)=>{if(wt!==void 0){let Lt=wt*Math.PI/180;_t.sin+=Math.sin(Lt),_t.cos+=Math.cos(Lt)}return _t},{sin:0,cos:0}),Qe=Math.atan2(Ue.sin,Ue.cos)*180/Math.PI;return Qe<0?360+Qe:Qe},fr=Le=>{let Ue=Le.filter(Qe=>Qe!==void 0);return Ue.length?Ue.reduce((Qe,_t)=>Qe+_t,0)/Ue.length:void 0},lr=Le=>typeof Le=="function";function Tr(Le,Ue="rgb",Qe){let _t=se(Ue),wt=Le.map(P(Ue));return _t.channels.reduce((Lt,pr)=>{let Gr=wt.map(va=>va[pr]).filter(va=>va!==void 0);if(Gr.length){let va;lr(Qe)?va=Qe:Qe&&lr(Qe[pr])?va=Qe[pr]:_t.average&&lr(_t.average[pr])?va=_t.average[pr]:va=fr,Lt[pr]=va(Gr,pr)}return Lt},{mode:Ue})}var Ir={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Xa},toMode:{rgb:Nn},interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Dr=Ir,ot=({l:Le,a:Ue,b:Qe,alpha:_t},wt="lch")=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let Lt=Math.sqrt(Ue*Ue+Qe*Qe),pr={mode:wt,l:Le,c:Lt};return Lt&&(pr.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(pr.alpha=_t),pr},kt=ot,jt=({l:Le,c:Ue,h:Qe,alpha:_t},wt="lab")=>{Qe===void 0&&(Qe=0);let Lt={mode:wt,l:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(Lt.alpha=_t),Lt},ar=jt,Er=Math.pow(29,3)/Math.pow(3,3),xr=Math.pow(6,3)/Math.pow(29,3),zr={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Lr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},aa=Math.pow(29,3)/Math.pow(3,3),Sa=Math.pow(6,3)/Math.pow(29,3),wa=Le=>Math.pow(Le,3)>xr?Math.pow(Le,3):(116*Le-16)/Er,pn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz65",x:wa(Lt)*Lr.X,y:wa(wt)*Lr.Y,z:wa(pr)*Lr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tn=pn,ai=Le=>qt(tn(Le)),rn=ai,Ri=Le=>Le>xr?Math.cbrt(Le):(Er*Le+16)/116,Gn=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ri(Le/Lr.X),Lt=Ri(Ue/Lr.Y),pr=Ri(Qe/Lr.Z),Gr={mode:"lab65",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},no=Gn,Di=Le=>{let Ue=no(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},fn=Di,Ai=1,jn=1,Xn=26/180*Math.PI,eo=Math.cos(Xn),gi=Math.sin(Xn),qi=100/Math.log(139/100),io=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"lab65",l:(Math.exp(Le*Ai/qi)-1)/.0039},Lt=(Math.exp(.0435*Ue*jn*Ai)-1)/.075,pr=Lt*Math.cos(Qe/180*Math.PI-Xn),Gr=Lt*Math.sin(Qe/180*Math.PI-Xn);return wt.a=pr*eo-Gr/.83*gi,wt.b=pr*gi+Gr/.83*eo,_t!==void 0&&(wt.alpha=_t),wt},oo=io,Vn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue*eo+Qe*gi,Lt=.83*(Qe*eo-Ue*gi),pr=Math.sqrt(wt*wt+Lt*Lt),Gr={mode:"dlch",l:qi/Ai*Math.log(1+.0039*Le),c:Math.log(1+.075*pr)/(.0435*jn*Ai)};return Gr.c&&(Gr.h=Kr((Math.atan2(Lt,wt)+Xn)/Math.PI*180)),_t!==void 0&&(Gr.alpha=_t),Gr},qn=Vn,Hi=Le=>oo(kt(Le,"dlch")),Mi=Le=>ar(qn(Le),"dlab"),Ro={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Hi,rgb:Le=>rn(Hi(Le))},fromMode:{lab65:Mi,rgb:Le=>Mi(fn(Le))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},go=Ro,Eo={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:oo,dlab:Le=>ar(Le,"dlab"),rgb:Le=>rn(oo(Le))},fromMode:{lab65:qn,dlab:Le=>kt(Le,"dlch"),rgb:Le=>qn(fn(Le))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:At,c:At,h:{use:At,fixup:Rt},alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},Ao=Eo;function ds({h:Le,s:Ue,i:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 4:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 5:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function jo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsi",s:Le+Ue+Qe===0?0:1-3*Lt/(Le+Ue+Qe),i:(Le+Ue+Qe)/3};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue{switch(Ue){case"deg":return+Le;case"rad":return Le/Math.PI*180;case"grad":return Le/10*9;case"turn":return Le*360}},Io=Vi,Xi=new RegExp(`^hsla?\\(\\s*${T}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),Ko=Le=>{let Ue=Le.match(Xi);if(!Ue)return;let Qe={mode:"hsl"};return Ue[3]!==void 0?Qe.h=+Ue[3]:Ue[1]!==void 0&&Ue[2]!==void 0&&(Qe.h=Io(Ue[1],Ue[2])),Ue[4]!==void 0&&(Qe.s=Math.min(Math.max(0,Ue[4]/100),1)),Ue[5]!==void 0&&(Qe.l=Math.min(Math.max(0,Ue[5]/100),1)),Ue[6]!==void 0?Qe.alpha=Math.max(0,Math.min(1,Ue[6]/100)):Ue[7]!==void 0&&(Qe.alpha=Math.max(0,Math.min(1,+Ue[7]))),Qe},Uo=Ko;function Ls(Le,Ue){if(!Ue||Ue[0]!=="hsl"&&Ue[0]!=="hsla")return;let Qe={mode:"hsl"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.s=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.l=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Ss=Ls,Vo={mode:"hsl",toMode:{rgb:wo},fromMode:{rgb:pi},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Ss,Uo],serialize:Le=>`hsl(${Le.h!==void 0?Le.h:"none"} ${Le.s!==void 0?Le.s*100+"%":"none"} ${Le.l!==void 0?Le.l*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Vs=Vo;function Ts({h:Le,s:Ue,v:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe,g:Qe*(1-Ue*wt),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1-Ue*wt),g:Qe,b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe,b:Qe*(1-Ue*wt)};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue*wt),b:Qe};break;case 4:Lt={r:Qe*(1-Ue*wt),g:Qe*(1-Ue),b:Qe};break;case 5:Lt={r:Qe,g:Qe*(1-Ue),b:Qe*(1-Ue*wt)};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function Bo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsv",s:wt===0?0:1-Lt/wt,v:wt};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue1){let wt=Ue+Qe;Ue/=wt,Qe/=wt}return Ts({h:Le,s:Qe===1?1:1-Ue/(1-Qe),v:1-Qe,alpha:_t})}function bs(Le){let Ue=Bo(Le);if(Ue===void 0)return;let Qe=Ue.s!==void 0?Ue.s:0,_t=Ue.v!==void 0?Ue.v:0,wt={mode:"hwb",w:(1-Qe)*_t,b:1-_t};return Ue.h!==void 0&&(wt.h=Ue.h),Ue.alpha!==void 0&&(wt.alpha=Ue.alpha),wt}function Dl(Le,Ue){if(!Ue||Ue[0]!=="hwb")return;let Qe={mode:"hwb"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.w=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.b=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var hl=Dl,ps={mode:"hwb",toMode:{rgb:yo},fromMode:{rgb:bs},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[hl],serialize:Le=>`hwb(${Le.h!==void 0?Le.h:"none"} ${Le.w!==void 0?Le.w*100+"%":"none"} ${Le.b!==void 0?Le.b*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},w:At,b:At,alpha:{use:At,fixup:$t}},difference:{h:Un},average:{h:rt}},dl=ps,wu=203,lu=.1593017578125,xc=78.84375,Fl=.8359375,pl=18.8515625,$u=18.6875;function uu(Le){if(Le<0)return 0;let Ue=Math.pow(Le,1/xc);return 1e4*Math.pow(Math.max(0,Ue-Fl)/(pl-$u*Ue),1/lu)}function tl(Le){if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),xc)}var vs=Le=>Math.max(Le/wu,0),os=({i:Le,t:Ue,p:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=uu(Le+.008609037037932761*Ue+.11102962500302593*Qe),Lt=uu(Le-.00860903703793275*Ue-.11102962500302599*Qe),pr=uu(Le+.5600313357106791*Ue-.32062717498731885*Qe),Gr={mode:"xyz65",x:vs(2.070152218389422*wt-1.3263473389671556*Lt+.2066510476294051*pr),y:vs(.3647385209748074*wt+.680566024947227*Lt-.0453045459220346*pr),z:vs(-.049747207535812*wt-.0492609666966138*Lt+1.1880659249923042*pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ms=os,rl=(Le=0)=>Math.max(Le*wu,0),Fu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{let wt=rl(Le),Lt=rl(Ue),pr=rl(Qe),Gr=tl(.3592832590121217*wt+.6976051147779502*Lt-.0358915932320289*pr),va=tl(-.1920808463704995*wt+1.1004767970374323*Lt+.0753748658519118*pr),Qa=tl(.0070797844607477*wt+.0748396662186366*Lt+.8433265453898765*pr),Ga=.5*Gr+.5*va,Ua=1.61376953125*Gr-3.323486328125*va+1.709716796875*Qa,Mn=4.378173828125*Gr-4.24560546875*va-.132568359375*Qa,dn={mode:"itp",i:Ga,t:Ua,p:Mn};return _t!==void 0&&(dn.alpha=_t),dn},zu=Fu,Ku={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ms,rgb:Le=>qt(ms(Le))},fromMode:{xyz65:zu,rgb:Le=>zu(et(Le))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:At,t:At,p:At,alpha:{use:At,fixup:$t}}},bc=Ku,Lh=134.03437499999998,rh=16295499532821565e-27,Ju=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),Lh)},ss=(Le=0)=>Math.max(Le*203,0),ah=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le=ss(Le),Ue=ss(Ue),Qe=ss(Qe);let wt=1.15*Le-.15*Qe,Lt=.66*Ue+.34*Le,pr=Ju(.41478972*wt+.579999*Lt+.014648*Qe),Gr=Ju(-.20151*wt+1.120649*Lt+.0531008*Qe),va=Ju(-.0166008*wt+.2648*Lt+.6684799*Qe),Qa=(pr+Gr)/2,Ga={mode:"jab",j:.44*Qa/(1-.56*Qa)-rh,a:3.524*pr-4.066708*Gr+.542708*va,b:.199076*pr+1.096799*Gr-1.295875*va};return _t!==void 0&&(Ga.alpha=_t),Ga},wc=ah,pc=134.03437499999998,Nf=16295499532821565e-27,Bu=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le,1/pc);return 1e4*Math.pow((Fl-Ue)/($u*Ue-pl),1/lu)},Tc=Le=>Le/203,Ou=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+Nf)/(.44+.56*(Le+Nf)),Lt=Bu(wt+.13860504*Ue+.058047316*Qe),pr=Bu(wt-.13860504*Ue-.058047316*Qe),Gr=Bu(wt-.096019242*Ue-.8118919*Qe),va={mode:"xyz65",x:Tc(1.661373024652174*Lt-.914523081304348*pr+.23136208173913045*Gr),y:Tc(-.3250758611844533*Lt+1.571847026732543*pr-.21825383453227928*Gr),z:Tc(-.090982811*Lt-.31272829*pr+1.5227666*Gr)};return _t!==void 0&&(va.alpha=_t),va},Gc=Ou,pf=Le=>{let Ue=wc(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},$l=pf,jf=Le=>qt(Gc(Le)),Hc=jf,Wc={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:$l,xyz65:wc},toMode:{rgb:Hc,xyz65:Gc},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Qu=Wc,Yc=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"jch",j:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},Nu=Yc,Uf=({j:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"jab",j:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},al=Uf,Xc={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:al,rgb:Le=>Hc(al(Le))},fromMode:{rgb:Le=>Nu($l(Le)),jab:Nu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,j:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},ju=Xc,Ac=Math.pow(29,3)/Math.pow(3,3),Zc=Math.pow(6,3)/Math.pow(29,3),ec=Le=>Math.pow(Le,3)>Zc?Math.pow(Le,3):(116*Le-16)/Ac,cu=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz50",x:ec(Lt)*zr.X,y:ec(wt)*zr.Y,z:ec(pr)*zr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tc=cu,vf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.1341359569958707-Ue*1.6173863321612538-.4906619460083532*Qe,g:Le*-.978795502912089+Ue*1.916254567259524+.03344273116131949*Qe,b:Le*.07195537988411677-Ue*.2289768264158322+1.405386058324125*Qe});return _t!==void 0&&(wt.alpha=_t),wt},Tu=vf,nh=Le=>Tu(tc(Le)),vl=nh,ml=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz50",x:.436065742824811*Ue+.3851514688337912*Qe+.14307845442264197*_t,y:.22249319175623702*Ue+.7168870538238823*Qe+.06061979053616537*_t,z:.013923904500943465*Ue+.09708128566574634*Qe+.7140993584005155*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},rc=ml,yl=Le=>Le>Zc?Math.cbrt(Le):(Ac*Le+16)/116,qf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=yl(Le/zr.X),Lt=yl(Ue/zr.Y),pr=yl(Qe/zr.Z),Gr={mode:"lab",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ac=qf,Mc=Le=>{let Ue=ac(rc(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},mf=Mc;function Jo(Le,Ue){if(!Ue||Ue[0]!=="lab")return;let Qe={mode:"lab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.value),100)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*125/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*125/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var ih=Jo,fu={mode:"lab",toMode:{xyz50:tc,rgb:vl},fromMode:{xyz50:ac,rgb:mf},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[ih],serialize:Le=>`lab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Sl=fu,El=lo(Li({},Sl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:tn,rgb:rn},fromMode:{xyz65:no,rgb:fn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),oh=El;function Au(Le,Ue){if(!Ue||Ue[0]!=="lch")return;let Qe={mode:"lch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.value),100)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*150/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var $c=Au,_l={mode:"lch",toMode:{lab:ar,rgb:Le=>vl(ar(Le))},fromMode:{rgb:Le=>kt(mf(Le)),lab:kt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$c],serialize:Le=>`lch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},nl=_l,gf=lo(Li({},nl),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:Le=>ar(Le,"lab65"),rgb:Le=>rn(ar(Le,"lab65"))},fromMode:{rgb:Le=>kt(fn(Le),"lch65"),lab65:Le=>kt(Le,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Kc=gf,sh=({l:Le,u:Ue,v:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"lchuv",l:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},hu=sh,Uu=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"luv",l:Le,u:Ue?Ue*Math.cos(Qe/180*Math.PI):0,v:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},qu=Uu,nc=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),yf=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),_f=nc(zr.X,zr.Y,zr.Z),Mu=yf(zr.X,zr.Y,zr.Z),ic=Le=>Le<=Zc?Ac*Le:116*Math.cbrt(Le)-16,Sc=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=ic(Ue/zr.Y),Lt=nc(Le,Ue,Qe),pr=yf(Le,Ue,Qe);!isFinite(Lt)||!isFinite(pr)?wt=Lt=pr=0:(Lt=13*wt*(Lt-_f),pr=13*wt*(pr-Mu));let Gr={mode:"luv",l:wt,u:Lt,v:pr};return _t!==void 0&&(Gr.alpha=_t),Gr},Vu=Sc,xo=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),Ec=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),xh=xo(zr.X,zr.Y,zr.Z),Vf=Ec(zr.X,zr.Y,zr.Z),xf=({l:Le,u:Ue,v:Qe,alpha:_t})=>{if(Le===void 0&&(Le=0),Le===0)return{mode:"xyz50",x:0,y:0,z:0};Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue/(13*Le)+xh,Lt=Qe/(13*Le)+Vf,pr=zr.Y*(Le<=8?Le/Ac:Math.pow((Le+16)/116,3)),Gr=pr*(9*wt)/(4*Lt),va=pr*(12-3*wt-20*Lt)/(4*Lt),Qa={mode:"xyz50",x:Gr,y:pr,z:va};return _t!==void 0&&(Qa.alpha=_t),Qa},Gf=xf,bh=Le=>hu(Vu(rc(Le))),Hf=Le=>Tu(Gf(qu(Le))),il={mode:"lchuv",toMode:{luv:qu,rgb:Hf},fromMode:{rgb:bh,luv:hu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},kl=il,kc=lo(Li({},_r),{mode:"lrgb",toMode:{rgb:Pt},fromMode:{rgb:Ke},parse:["srgb-linear"],serialize:"srgb-linear"}),Cc=kc,Lc={mode:"luv",toMode:{xyz50:Gf,rgb:Le=>Tu(Gf(Le))},fromMode:{xyz50:Vu,rgb:Le=>Vu(rc(Le))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:At,u:At,v:At,alpha:{use:At,fixup:$t}}},vc=Lc,Ft=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.cbrt(.412221469470763*Le+.5363325372617348*Ue+.0514459932675022*Qe),Lt=Math.cbrt(.2119034958178252*Le+.6806995506452344*Ue+.1073969535369406*Qe),pr=Math.cbrt(.0883024591900564*Le+.2817188391361215*Ue+.6299787016738222*Qe),Gr={mode:"oklab",l:.210454268309314*wt+.7936177747023054*Lt-.0040720430116193*pr,a:1.9779985324311684*wt-2.42859224204858*Lt+.450593709617411*pr,b:.0259040424655478*wt+.7827717124575296*Lt-.8086757549230774*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},tr=Ft,Fr=Le=>{let Ue=tr(Ke(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},wr=Fr,ea=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.pow(Le+.3963377773761749*Ue+.2158037573099136*Qe,3),Lt=Math.pow(Le-.1055613458156586*Ue-.0638541728258133*Qe,3),pr=Math.pow(Le-.0894841775298119*Ue-1.2914855480194092*Qe,3),Gr={mode:"lrgb",r:4.076741636075957*wt-3.3077115392580616*Lt+.2309699031821044*pr,g:-1.2684379732850317*wt+2.6097573492876887*Lt-.3413193760026573*pr,b:-.0041960761386756*wt-.7034186179359362*Lt+1.7076146940746117*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},ba=ea,Ia=Le=>Pt(ba(Le)),Na=Ia;function Za(Le){let _t=1.170873786407767;return .5*(_t*Le-.206+Math.sqrt((_t*Le-.206)*(_t*Le-.206)+4*.03*_t*Le))}function mn(Le){return(Le*Le+.206*Le)/(1.170873786407767*(Le+.03))}function Da(Le,Ue){let Qe,_t,wt,Lt,pr,Gr,va,Qa;-1.88170328*Le-.80936493*Ue>1?(Qe=1.19086277,_t=1.76576728,wt=.59662641,Lt=.75515197,pr=.56771245,Gr=4.0767416621,va=-3.3077115913,Qa=.2309699292):1.81444104*Le-1.19445276*Ue>1?(Qe=.73956515,_t=-.45954404,wt=.08285427,Lt=.1254107,pr=.14503204,Gr=-1.2684380046,va=2.6097574011,Qa=-.3413193965):(Qe=1.35733652,_t=-.00915799,wt=-1.1513021,Lt=-.50559606,pr=.00692167,Gr=-.0041960863,va=-.7034186147,Qa=1.707614701);let Ga=Qe+_t*Le+wt*Ue+Lt*Le*Le+pr*Le*Ue,Ua=.3963377774*Le+.2158037573*Ue,Mn=-.1055613458*Le-.0638541728*Ue,dn=-.0894841775*Le-1.291485548*Ue;{let _n=1+Ga*Ua,Sn=1+Ga*Mn,Bn=1+Ga*dn,Zn=_n*_n*_n,Ci=Sn*Sn*Sn,qo=Bn*Bn*Bn,As=3*Ua*_n*_n,ls=3*Mn*Sn*Sn,Vl=3*dn*Bn*Bn,au=6*Ua*Ua*_n,Lu=6*Mn*Mn*Sn,uh=6*dn*dn*Bn,wh=Gr*Zn+va*Ci+Qa*qo,Gh=Gr*As+va*ls+Qa*Vl,Gd=Gr*au+va*Lu+Qa*uh;Ga=Ga-wh*Gh/(Gh*Gh-.5*wh*Gd)}return Ga}function Ha(Le,Ue){let Qe=Da(Le,Ue),_t=ba({l:1,a:Qe*Le,b:Qe*Ue}),wt=Math.cbrt(1/Math.max(_t.r,_t.g,_t.b)),Lt=wt*Qe;return[wt,Lt]}function $a(Le,Ue,Qe,_t,wt,Lt=null){Lt||(Lt=Ha(Le,Ue));let pr;if((Qe-wt)*Lt[1]-(Lt[0]-wt)*_t<=0)pr=Lt[1]*wt/(_t*Lt[0]+Lt[1]*(wt-Qe));else{pr=Lt[1]*(wt-1)/(_t*(Lt[0]-1)+Lt[1]*(wt-Qe));{let Gr=Qe-wt,va=_t,Qa=.3963377774*Le+.2158037573*Ue,Ga=-.1055613458*Le-.0638541728*Ue,Ua=-.0894841775*Le-1.291485548*Ue,Mn=Gr+va*Qa,dn=Gr+va*Ga,_n=Gr+va*Ua;{let Sn=wt*(1-pr)+pr*Qe,Bn=pr*_t,Zn=Sn+Bn*Qa,Ci=Sn+Bn*Ga,qo=Sn+Bn*Ua,As=Zn*Zn*Zn,ls=Ci*Ci*Ci,Vl=qo*qo*qo,au=3*Mn*Zn*Zn,Lu=3*dn*Ci*Ci,uh=3*_n*qo*qo,wh=6*Mn*Mn*Zn,Gh=6*dn*dn*Ci,Gd=6*_n*_n*qo,Ad=4.0767416621*As-3.3077115913*ls+.2309699292*Vl-1,ch=4.0767416621*au-3.3077115913*Lu+.2309699292*uh,Mv=4.0767416621*wh-3.3077115913*Gh+.2309699292*Gd,vp=ch/(ch*ch-.5*Ad*Mv),mp=-Ad*vp,gp=-1.2684380046*As+2.6097574011*ls-.3413193965*Vl-1,yp=-1.2684380046*au+2.6097574011*Lu-.3413193965*uh,xg=-1.2684380046*wh+2.6097574011*Gh-.3413193965*Gd,p0=yp/(yp*yp-.5*gp*xg),Md=-gp*p0,v0=-.0041960863*As-.7034186147*ls+1.707614701*Vl-1,m0=-.0041960863*au-.7034186147*Lu+1.707614701*uh,Hd=-.0041960863*wh-.7034186147*Gh+1.707614701*Gd,_p=m0/(m0*m0-.5*v0*Hd),bg=-v0*_p;mp=vp>=0?mp:1e6,Md=p0>=0?Md:1e6,bg=_p>=0?bg:1e6,pr+=Math.min(mp,Math.min(Md,bg))}}}return pr}function vn(Le,Ue,Qe=null){Qe||(Qe=Ha(Le,Ue));let _t=Qe[0],wt=Qe[1];return[wt/_t,wt/(1-_t)]}function En(Le,Ue,Qe){let _t=Ha(Ue,Qe),wt=$a(Ue,Qe,Le,1,Le,_t),Lt=vn(Ue,Qe,_t),pr=.11516993+1/(7.4477897+4.1590124*Qe+Ue*(-2.19557347+1.75198401*Qe+Ue*(-2.13704948-10.02301043*Qe+Ue*(-4.24894561+5.38770819*Qe+4.69891013*Ue)))),Gr=.11239642+1/(1.6132032-.68124379*Qe+Ue*(.40370612+.90148123*Qe+Ue*(-.27087943+.6122399*Qe+Ue*(.00299215-.45399568*Qe-.14661872*Ue)))),va=wt/Math.min(Le*Lt[0],(1-Le)*Lt[1]),Qa=Le*pr,Ga=(1-Le)*Gr,Ua=.9*va*Math.sqrt(Math.sqrt(1/(1/(Qa*Qa*Qa*Qa)+1/(Ga*Ga*Ga*Ga))));return Qa=Le*.4,Ga=(1-Le)*.8,[Math.sqrt(1/(1/(Qa*Qa)+1/(Ga*Ga))),Ua,wt]}function yi(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt={mode:"okhsl",l:Za(Ue)};Le.alpha!==void 0&&(wt.alpha=Le.alpha);let Lt=Math.sqrt(Qe*Qe+_t*_t);if(!Lt)return wt.s=0,wt;let[pr,Gr,va]=En(Ue,Qe/Lt,_t/Lt),Qa;if(Ltyi(wr(Le))},toMode:{oklab:_i,rgb:Le=>Na(_i(Le))}}),ri=ki;function kn(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt=Math.sqrt(Qe*Qe+_t*_t),Lt=wt?Qe/wt:1,pr=wt?_t/wt:1,[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=va/(wt+Ue*va),Mn=Ua*Ue,dn=Ua*wt,_n=mn(Mn),Sn=dn*_n/Mn,Bn=ba({l:_n,a:Lt*Sn,b:pr*Sn}),Zn=Math.cbrt(1/Math.max(Bn.r,Bn.g,Bn.b,0));Ue=Ue/Zn,wt=wt/Zn*Za(Ue)/Ue,Ue=Za(Ue);let Ci={mode:"okhsv",s:wt?(Qa+va)*dn/(va*Qa+va*Ga*dn):0,v:Ue?Ue/Mn:0};return Ci.s&&(Ci.h=Kr(Math.atan2(_t,Qe)*180/Math.PI)),Le.alpha!==void 0&&(Ci.alpha=Le.alpha),Ci}function Ln(Le){let Ue={mode:"oklab"};Le.alpha!==void 0&&(Ue.alpha=Le.alpha);let Qe=Le.h!==void 0?Le.h:0,_t=Le.s!==void 0?Le.s:0,wt=Le.v!==void 0?Le.v:0,Lt=Math.cos(Qe/180*Math.PI),pr=Math.sin(Qe/180*Math.PI),[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=1-_t*Qa/(Qa+va-va*Ga*_t),Mn=_t*va*Qa/(Qa+va-va*Ga*_t),dn=mn(Ua),_n=Mn*dn/Ua,Sn=ba({l:dn,a:Lt*_n,b:pr*_n}),Bn=Math.cbrt(1/Math.max(Sn.r,Sn.g,Sn.b,0)),Zn=mn(wt*Ua),Ci=Mn*Zn/Ua;return Ue.l=Zn*Bn,Ue.a=Ci*Lt*Bn,Ue.b=Ci*pr*Bn,Ue}var Ni=lo(Li({},Pi),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:kn,rgb:Le=>kn(wr(Le))},toMode:{oklab:Ln,rgb:Le=>Na(Ln(Le))}}),Zi=Ni;function Co(Le,Ue){if(!Ue||Ue[0]!=="oklab")return;let Qe={mode:"oklab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*.4/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*.4/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Do=Co,Fo=lo(Li({},Sl),{mode:"oklab",toMode:{lrgb:ba,rgb:Na},fromMode:{lrgb:tr,rgb:wr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Do],serialize:Le=>`oklab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`}),Yo=Fo;function bo(Le,Ue){if(!Ue||Ue[0]!=="oklch")return;let Qe={mode:"oklch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*.4/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Gs=bo,Es=lo(Li({},nl),{mode:"oklch",toMode:{oklab:Le=>ar(Le,"oklab"),rgb:Le=>Na(ar(Le,"oklab"))},fromMode:{rgb:Le=>kt(wr(Le),"oklch"),oklab:Le=>kt(Le,"oklch")},parse:[Gs],serialize:Le=>`oklch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),ns=Es,Kn=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.486570948648216*Ue+.265667693169093*Qe+.1982172852343625*_t,y:.2289745640697487*Ue+.6917385218365062*Qe+.079286914093745*_t,z:0*Ue+.0451133818589026*Qe+1.043944368900976*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},zo=Kn,gs=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*2.4934969119414263-Ue*.9313836179191242-.402710784450717*Qe,g:Le*-.8294889695615749+Ue*1.7626640603183465+.0236246858419436*Qe,b:Le*.0358458302437845-Ue*.0761723892680418+.9568845240076871*Qe},"p3");return _t!==void 0&&(wt.alpha=_t),wt},js=gs,Cl=lo(Li({},_r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:Le=>js(et(Le)),xyz65:js},toMode:{rgb:Le=>qt(zo(Le)),xyz65:zo}}),zl=Cl,Kl=Le=>{let Ue=Math.abs(Le);return Ue>=1/512?Math.sign(Le)*Math.pow(Ue,1/1.8):16*Le},Gu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"prophoto",r:Kl(Le*1.3457868816471585-Ue*.2555720873797946-.0511018649755453*Qe),g:Kl(Le*-.5446307051249019+Ue*1.5082477428451466+.0205274474364214*Qe),b:Kl(Le*0+Ue*0+1.2119675456389452*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},xl=Gu,Hu=(Le=0)=>{let Ue=Math.abs(Le);return Ue>=16/512?Math.sign(Le)*Math.pow(Ue,1.8):Le/16},Su=Le=>{let Ue=Hu(Le.r),Qe=Hu(Le.g),_t=Hu(Le.b),wt={mode:"xyz50",x:.7977666449006423*Ue+.1351812974005331*Qe+.0313477341283922*_t,y:.2880748288194013*Ue+.7118352342418731*Qe+899369387256e-16*_t,z:0*Ue+0*Qe+.8251046025104602*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},mc=Su,Jc=lo(Li({},_r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:xl,rgb:Le=>xl(rc(Le))},toMode:{xyz50:mc,rgb:Le=>Tu(mc(Le))}}),oc=Jc,du=1.09929682680944,Jl=.018053968510807,Ql=Le=>{let Ue=Math.abs(Le);return Ue>Jl?(Math.sign(Le)||1)*(du*Math.pow(Ue,.45)-(du-1)):4.5*Le},Eu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rec2020",r:Ql(Le*1.7166511879712683-Ue*.3556707837763925-.2533662813736599*Qe),g:Ql(Le*-.6666843518324893+Ue*1.6164812366349395+.0157685458139111*Qe),b:Ql(Le*.0176398574453108-Ue*.0427706132578085+.9421031212354739*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},bf=Eu,lh=1.09929682680944,Pc=.018053968510807,Ks=(Le=0)=>{let Ue=Math.abs(Le);return Ue{let Ue=Ks(Le.r),Qe=Ks(Le.g),_t=Ks(Le.b),wt={mode:"xyz65",x:.6369580483012911*Ue+.1446169035862083*Qe+.1688809751641721*_t,y:.262700212011267*Ue+.6779980715188708*Qe+.059301716469862*_t,z:0*Ue+.0280726930490874*Qe+1.0609850577107909*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Wu=Bl,wf=lo(Li({},_r),{mode:"rec2020",fromMode:{xyz65:bf,rgb:Le=>bf(et(Le))},toMode:{xyz65:Wu,rgb:Le=>qt(Wu(Le))},parse:["rec2020"],serialize:"rec2020"}),Qc=wf,ku=.0037930732552754493,Ol=Math.cbrt(ku),Nl=Le=>Math.cbrt(Le)-Ol,fi=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt=Nl(.3*Ue+.622*Qe+.078*_t+ku),pr=Nl(.23*Ue+.692*Qe+.078*_t+ku),Gr=Nl(.2434226892454782*Ue+.2047674442449682*Qe+.5518098665095535*_t+ku),va={mode:"xyb",x:(Lt-pr)/2,y:(Lt+pr)/2,b:Gr-(Lt+pr)/2};return wt!==void 0&&(va.alpha=wt),va},eu=fi,$e=Le=>Math.pow(Le+Ol,3),nt=({x:Le,y:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=$e(Le+Ue)-ku,Lt=$e(Ue-Le)-ku,pr=$e(Qe+Ue)-ku,Gr=Pt({r:11.031566904639861*wt-9.866943908131562*Lt-.16462299650829934*pr,g:-3.2541473810744237*wt+4.418770377582723*Lt-.16462299650829934*pr,b:-3.6588512867136815*wt+2.7129230459360922*Lt+1.9459282407775895*pr});return _t!==void 0&&(Gr.alpha=_t),Gr},mt=nt,xt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:mt},fromMode:{rgb:eu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:At,y:At,b:At,alpha:{use:At,fixup:$t}}},Bt=xt,zt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Tu,lab:ac},fromMode:{rgb:rc,lab:tc},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},Wt=zt,Pr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz50",x:1.0479298208405488*Ue+.0229467933410191*Qe-.0501922295431356*_t,y:.0296278156881593*Ue+.990434484573249*Qe-.0170738250293851*_t,z:-.0092430581525912*Ue+.0150551448965779*Qe+.7518742899580008*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},Br=Pr,kr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz65",x:.9554734527042182*Ue-.0230985368742614*Qe+.0632593086610217*_t,y:-.0283697069632081*Ue+1.0099954580058226*Qe+.021041398966943*_t,z:.0123140016883199*Ue-.0205076964334779*Qe+1.3303659366080753*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},jr=kr,Jr={mode:"xyz65",toMode:{rgb:qt,xyz50:Br},fromMode:{rgb:et,xyz50:jr},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},la=Jr,xa=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"yiq",y:.29889531*Le+.58662247*Ue+.11448223*Qe,i:.59597799*Le-.2741761*Ue-.32180189*Qe,q:.21147017*Le-.52261711*Ue+.31114694*Qe};return _t!==void 0&&(wt.alpha=_t),wt},Ba=xa,an=({y:Le,i:Ue,q:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rgb",r:Le+.95608445*Ue+.6208885*Qe,g:Le-.27137664*Ue-.6486059*Qe,b:Le-1.10561724*Ue+1.70250126*Qe};return _t!==void 0&&(wt.alpha=_t),wt},Tn=an,ii={mode:"yiq",toMode:{rgb:Tn},fromMode:{rgb:Ba},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:At,i:At,q:At,alpha:{use:At,fixup:$t}}},Si=ii,oi=(Le,Ue)=>Math.round(Le*(Ue=Math.pow(10,Ue)))/Ue,Ji=(Le=4)=>Ue=>typeof Ue=="number"?oi(Ue,Le):Ue,Qi=Ji,Oo=Qi(2),Qo=Le=>Math.max(0,Math.min(1,Le||0)),vo=Le=>Math.round(Qo(Le)*255),ys=P("rgb"),ol=P("hsl"),jl=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return"#"+(1<<24|Ue<<16|Qe<<8|_t).toString(16).slice(1)},Hs=Le=>{if(Le===void 0)return;let Ue=vo(Le.alpha!==void 0?Le.alpha:1);return jl(Le)+(256|Ue).toString(16).slice(1)},Cu=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return Le.alpha===void 0||Le.alpha===1?`rgb(${Ue}, ${Qe}, ${_t})`:`rgba(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},hi=Le=>{if(Le===void 0)return;let Ue=Oo(Le.h||0),Qe=Oo(Qo(Le.s)*100)+"%",_t=Oo(Qo(Le.l)*100)+"%";return Le.alpha===void 0||Le.alpha===1?`hsl(${Ue}, ${Qe}, ${_t})`:`hsla(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},wi=Le=>{let Ue=B(Le);if(!Ue)return;let Qe=se(Ue.mode);if(!Qe.serialize||typeof Qe.serialize=="string"){let _t=`color(${Qe.serialize||`--${Ue.mode}`} `;return Qe.channels.forEach((wt,Lt)=>{wt!=="alpha"&&(_t+=(Lt?" ":"")+(Ue[wt]!==void 0?Ue[wt]:"none"))}),Ue.alpha!==void 0&&Ue.alpha<1&&(_t+=` / ${Ue.alpha}`),_t+")"}if(typeof Qe.serialize=="function")return Qe.serialize(Ue)},sl=Le=>jl(ys(Le)),sc=Le=>Hs(ys(Le)),tu=Le=>Cu(ys(Le)),Ps=Le=>hi(ol(Le)),gc={normal:(Le,Ue)=>Ue,multiply:(Le,Ue)=>Le*Ue,screen:(Le,Ue)=>Le+Ue-Le*Ue,"hard-light":(Le,Ue)=>Ue<.5?Le*2*Ue:2*Ue*(1-Le)-1,overlay:(Le,Ue)=>Le<.5?Ue*2*Le:2*Le*(1-Ue)-1,darken:(Le,Ue)=>Math.min(Le,Ue),lighten:(Le,Ue)=>Math.max(Le,Ue),"color-dodge":(Le,Ue)=>Le===0?0:Ue===1?1:Math.min(1,Le/(1-Ue)),"color-burn":(Le,Ue)=>Le===1?1:Ue===0?0:1-Math.min(1,(1-Le)/Ue),"soft-light":(Le,Ue)=>Ue<.5?Le-(1-2*Ue)*Le*(1-Le):Le+(2*Ue-1)*((Le<.25?((16*Le-12)*Le+4)*Le:Math.sqrt(Le))-Le),difference:(Le,Ue)=>Math.abs(Le-Ue),exclusion:(Le,Ue)=>Le+Ue-2*Le*Ue},pu=(Le,Ue="normal",Qe="rgb")=>{let _t=typeof Ue=="function"?Ue:gc[Ue],wt=P(Qe),Lt=se(Qe).channels;return Le.map(Gr=>{let va=wt(Gr);return va.alpha===void 0&&(va.alpha=1),va}).reduce((Gr,va)=>{if(Gr===void 0)return va;let Qa=va.alpha+Gr.alpha*(1-va.alpha);return Lt.reduce((Ga,Ua)=>(Ua!=="alpha"&&(Qa===0?Ga[Ua]=0:(Ga[Ua]=va.alpha*(1-Gr.alpha)*va[Ua]+va.alpha*Gr.alpha*_t(Gr[Ua],va[Ua])+(1-va.alpha)*Gr.alpha*Gr[Ua],Ga[Ua]=Math.max(0,Math.min(1,Ga[Ua]/Qa)))),Ga),{mode:Qe,alpha:Qa})})},ll=pu,ef=([Le,Ue])=>Le+Math.random()*(Ue-Le),de=Le=>Object.keys(Le).reduce((Ue,Qe)=>{let _t=Le[Qe];return Ue[Qe]=Array.isArray(_t)?_t:[_t,_t],Ue},{}),Ee=(Le="rgb",Ue={})=>{let Qe=se(Le),_t=de(Ue);return Qe.channels.reduce((wt,Lt)=>((_t.alpha||Lt!=="alpha")&&(wt[Lt]=ef(_t[Lt]||Qe.ranges[Lt])),wt),{mode:Le})},qe=Ee,tt=(Le,Ue="rgb",Qe=!1)=>{let _t=Ue?se(Ue).channels:null,wt=Ue?P(Ue):B;return Lt=>{let pr=wt(Lt);if(!pr)return;let Gr=(_t||se(pr.mode).channels).reduce((Qa,Ga)=>{let Ua=Le(pr[Ga],Ga,pr,Ue);return Ua!==void 0&&!isNaN(Ua)&&(Qa[Ga]=Ua),Qa},{mode:pr.mode});if(!Qe)return Gr;let va=B(Lt);return va&&va.mode!==Gr.mode?P(va.mode)(Gr):Gr}},at=(Le,Ue,Qe)=>Ue!=="alpha"?(Le||0)*(Qe.alpha!==void 0?Qe.alpha:1):Le,ct=(Le,Ue,Qe)=>Ue!=="alpha"&&Qe.alpha!==0?(Le||0)/(Qe.alpha!==void 0?Qe.alpha:1):Le,Nt=(Le=1,Ue=0)=>(Qe,_t)=>_t!=="alpha"?Qe*Le+Ue:Qe,St=(Le=1,Ue=1,Qe=0)=>(_t,wt)=>wt!=="alpha"?Le*Math.pow(_t,Ue)+Qe:_t,Jt=Le=>{Le[0]===void 0&&(Le[0]=0),Le[Le.length-1]===void 0&&(Le[Le.length-1]=1);let Ue=1,Qe,_t,wt,Lt;for(;UeUe=>Le<=0?1:Le>=1?0:Math.pow(Ue,Math.log(.5)/Math.log(Le)),Hr=gr,Vr=Le=>typeof Le=="function",ca=Le=>Le&&typeof Le=="object",Aa=Le=>typeof Le=="number",Xr=(Le,Ue="rgb",Qe,_t)=>{let wt=se(Ue),Lt=P(Ue),pr=[],Gr=[],va={};Le.forEach(Mn=>{Array.isArray(Mn)?(pr.push(Lt(Mn[0])),Gr.push(Mn[1])):Aa(Mn)||Vr(Mn)?va[Gr.length]=Mn:(pr.push(Lt(Mn)),Gr.push(void 0))}),mr(Gr);let Qa=wt.channels.reduce((Mn,dn)=>{let _n;return ca(Qe)&&ca(Qe[dn])&&Qe[dn].fixup?_n=Qe[dn].fixup:ca(wt.interpolate[dn])&&wt.interpolate[dn].fixup?_n=wt.interpolate[dn].fixup:_n=Sn=>Sn,Mn[dn]=_n(pr.map(Sn=>Sn[dn])),Mn},{});if(_t){let Mn=pr.map((dn,_n)=>wt.channels.reduce((Sn,Bn)=>(Sn[Bn]=Qa[Bn][_n],Sn),{mode:Ue}));Qa=wt.channels.reduce((dn,_n)=>(dn[_n]=Mn.map(Sn=>{let Bn=_t(Sn[_n],_n,Sn,Ue);return isNaN(Bn)?void 0:Bn}),dn),{})}let Ga=wt.channels.reduce((Mn,dn)=>{let _n;return Vr(Qe)?_n=Qe:ca(Qe)&&Vr(Qe[dn])?_n=Qe[dn]:ca(Qe)&&ca(Qe[dn])&&Qe[dn].use?_n=Qe[dn].use:Vr(wt.interpolate[dn])?_n=wt.interpolate[dn]:ca(wt.interpolate[dn])&&(_n=wt.interpolate[dn].use),Mn[dn]=_n(Qa[dn]),Mn},{}),Ua=pr.length-1;return Mn=>{if(Mn=Math.min(Math.max(0,Mn),1),Mn<=Gr[0])return pr[0];if(Mn>Gr[Ua])return pr[Ua];let dn=0;for(;Gr[dn]{let ls=Ga[As](Ci);return ls!==void 0&&(qo[As]=ls),qo},{mode:Ue})}},oa=(Le,Ue="rgb",Qe)=>Xr(Le,Ue,Qe),fa=(Le,Ue)=>(Qe,_t="rgb",wt)=>{let Lt=Ue?tt(Ue,_t):void 0,pr=Xr(Qe,_t,wt,Le);return Lt?Gr=>Lt(pr(Gr)):pr},Ea=fa(at,ct),Ma=(Le,Ue)=>(Le+Ue)%Ue,sa=(Le,Ue,Qe,_t,wt)=>{let Lt=wt*wt,pr=Lt*wt;return((1-3*wt+3*Lt-pr)*Le+(4-6*Lt+3*pr)*Ue+(1+3*wt+3*Lt-3*pr)*Qe+pr*_t)/6},hn=Le=>Ue=>{let Qe=Le.length-1,_t=Ue>=1?Qe-1:Math.max(0,Math.floor(Ue*Qe));return sa(_t>0?Le[_t-1]:2*Le[_t]-Le[_t+1],Le[_t],Le[_t+1],_tUe=>{let Qe=Le.length-1,_t=Math.floor(Ue*Qe);return sa(Le[Ma(_t-1,Le.length)],Le[Ma(_t,Le.length)],Le[Ma(_t+1,Le.length)],Le[Ma(_t+2,Le.length)],(Ue-_t/Qe)*Qe)},zn=Le=>{let Ue,Qe=Le.length-1,_t=new Array(Qe),wt=new Array(Qe),Lt=new Array(Qe);for(_t[1]=1/4,wt[1]=(6*Le[1]-Le[0])/4,Ue=2;Ue0&&(Lt[Qe-1]=wt[Qe-1]),Ue=Qe-2;Ue>0;--Ue)Lt[Ue]=wt[Ue]-_t[Ue]*Lt[Ue+1];return Lt},$n=Le=>hn(zn(Le)),xi=Le=>An(zn(Le)),di=Math.sign,uo=Math.min,pe=Math.abs,y=Le=>{let Ue=Le.length-1,Qe=[],_t=[],wt=[];for(let Lt=0;Lt0?.5*(Le[Lt+1]-Le[Lt-1])*Ue:void 0),wt.push(Lt>0?(di(Qe[Lt-1])+di(Qe[Lt]))*uo(pe(Qe[Lt-1]),pe(Qe[Lt]),.5*pe(_t[Lt])):void 0);return[Qe,_t,wt]},N=(Le,Ue,Qe)=>{let _t=Le.length-1,wt=_t*_t;return Lt=>{let pr;Lt>=1?pr=_t-1:pr=Math.max(0,Math.floor(Lt*_t));let Gr=Lt-pr/_t,va=Gr*Gr,Qa=va*Gr;return(Ue[pr]+Ue[pr+1]-2*Qe[pr])*wt*Qa+(3*Qe[pr]-2*Ue[pr]-Ue[pr+1])*_t*va+Ue[pr]*Gr+Le[pr]}},ie=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,,_t]=y(Le);return _t[0]=Qe[0],_t[Ue]=Qe[Ue-1],N(Le,_t,Qe)},fe=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,_t,wt]=y(Le);return _t[0]=(Le[1]*2-Le[0]*1.5-Le[2]*.5)*Ue,_t[Ue]=(Le[Ue]*1.5-Le[Ue-1]*2+Le[Ue-2]*.5)*Ue,wt[0]=_t[0]*Qe[0]<=0?0:pe(_t[0])>2*pe(Qe[0])?2*Qe[0]:_t[0],wt[Ue]=_t[Ue]*Qe[Ue-1]<=0?0:pe(_t[Ue])>2*pe(Qe[Ue-1])?2*Qe[Ue-1]:_t[Ue],N(Le,wt,Qe)},be=Le=>{let Ue=Le.length-1,[Qe,_t,wt]=y(Le);_t[0]=.5*(Le[1]-Le[Ue])*Ue,_t[Ue]=.5*(Le[0]-Le[Ue-1])*Ue;let Lt=(Le[0]-Le[Ue])*Ue,pr=Lt;return wt[0]=(di(Lt)+di(Qe[0]))*uo(pe(Lt),pe(Qe[0]),.5*pe(_t[0])),wt[Ue]=(di(Qe[Ue-1])+di(pr))*uo(pe(Qe[Ue-1]),pe(pr),.5*pe(_t[Ue])),N(Le,wt,Qe)},Re=(Le=1)=>Le===1?Ue=>Ue:Ue=>Math.pow(Ue,Le),je=Re,Ze=(Le=2,Ue=1)=>{let Qe=je(Ue);if(Le<2)return Le<1?[]:[Qe(.5)];let _t=[];for(let wt=0;wt{let Ue={mode:Le.mode,r:Math.max(0,Math.min(Le.r!==void 0?Le.r:0,1)),g:Math.max(0,Math.min(Le.g!==void 0?Le.g:0,1)),b:Math.max(0,Math.min(Le.b!==void 0?Le.b:0,1))};return Le.alpha!==void 0&&(Ue.alpha=Le.alpha),Ue},Gt=Le=>Dt(ft(Le)),Kt=Le=>Le!==void 0&&(Le.r===void 0||Le.r>=0&&Le.r<=1)&&(Le.g===void 0||Le.g>=0&&Le.g<=1)&&(Le.b===void 0||Le.b>=0&&Le.b<=1);function st(Le){return Kt(ft(Le))}function It(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return _t=>!0;let Qe=P(typeof Ue=="string"?Ue:Le);return _t=>Kt(Qe(_t))}function Ut(Le){return Le=B(Le),Le===void 0||st(Le)?Le:P(Le.mode)(Gt(Le))}function ir(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return Lt=>B(Lt);let Qe=typeof Ue=="string"?Ue:Le,_t=P(Qe),wt=It(Qe);return Lt=>{let pr=B(Lt);if(!pr)return;let Gr=_t(pr);if(wt(Gr))return pr;let va=Dt(Gr);return pr.mode===va.mode?va:P(pr.mode)(va)}}function dr(Le,Ue="lch",Qe="rgb"){Le=B(Le);let _t=Qe==="rgb"?st:It(Qe),wt=Qe==="rgb"?Gt:ir(Qe);if(Le===void 0||_t(Le))return Le;let Lt=P(Le.mode);Le=P(Ue)(Le);let pr=lo(Li({},Le),{c:0});if(!_t(pr))return Lt(wt(pr));let Gr=0,va=Le.c!==void 0?Le.c:0,Qa=se(Ue).ranges.c,Ga=(Qa[1]-Qa[0])/Math.pow(2,13),Ua=pr.c;for(;va-Gr>Ga;)pr.c=Gr+(va-Gr)*.5,_t(pr)?(Ua=pr.c,Gr=pr.c):va=pr.c;return Lt(_t(pr)?pr:lo(Li({},pr),{c:Ua}))}function Ar(Le="rgb",Ue="oklch",Qe=Yn("oklch"),_t=.02){let wt=P(Le),Lt=se(Le);if(!Lt.gamut)return Ga=>wt(Ga);let pr=It(Le),Gr=ir(Le),va=P(Ue),{ranges:Qa}=se(Ue);if(!Qa.l||!Qa.c)throw new Error("LCH-like space expected");return Ga=>{if(Ga=B(Ga),Ga===void 0)return;let Ua=Li({},va(Ga));if(Ua.l===void 0&&(Ua.l=0),Ua.c===void 0&&(Ua.c=0),Ua.l>=Qa.l[1]){let Bn=lo(Li({},Lt.white),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(Ua.l<=Qa.l[0]){let Bn=lo(Li({},Lt.black),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(pr(Ua))return wt(Ua);let Mn=0,dn=Ua.c,_n=(Qa.c[1]-Qa.c[0])/4e3,Sn=Gr(Ua);for(;dn-Mn>_n;)Ua.c=(Mn+dn)*.5,Sn=Gr(Ua),pr(Ua)||Qe&&_t>0&&Qe(Ua,Sn)<=_t?Mn=Ua.c:dn=Ua.c;return wt(pr(Ua)?Ua:Sn)}}var hr=(Le,Ue=Yn(),Qe=_t=>_t)=>{let _t=Le.map((wt,Lt)=>({color:Qe(wt),i:Lt}));return(wt,Lt=1,pr=1/0)=>(isFinite(Lt)&&(Lt=Math.max(1,Math.min(Lt,_t.length-1))),_t.forEach(Gr=>{Gr.d=Ue(wt,Gr.color)}),_t.sort((Gr,va)=>Gr.d-va.d).slice(0,Lt).filter(Gr=>Gr.dLe[Gr.i]))},vr=hr,Or=Le=>Math.max(Le,0),Cr=Le=>Math.max(Math.min(Le,1),0),ta=(Le,Ue,Qe)=>Le===void 0||Ue===void 0?void 0:Le+Qe*(Ue-Le),ka=Le=>{let Ue=1-Cr(Le);return[.393+.607*Ue,.769-.769*Ue,.189-.189*Ue,0,.349-.349*Ue,.686+.314*Ue,.168-.168*Ue,0,.272-.272*Ue,.534-.534*Ue,.131+.869*Ue,0,0,0,0,1]},Ta=Le=>{let Ue=Or(Le);return[.213+.787*Ue,.715-.715*Ue,.072-.072*Ue,0,.213-.213*Ue,.715+.285*Ue,.072-.072*Ue,0,.213-.213*Ue,.715-.715*Ue,.072+.928*Ue,0,0,0,0,1]},Ra=Le=>{let Ue=1-Cr(Le);return[.2126+.7874*Ue,.7152-.7152*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152+.2848*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152-.7152*Ue,.0722+.9278*Ue,0,0,0,0,1]},ua=Le=>{let Ue=Math.PI*Le/180,Qe=Math.cos(Ue),_t=Math.sin(Ue);return[.213+Qe*.787-_t*.213,.715-Qe*.715-_t*.715,.072-Qe*.072+_t*.928,0,.213-Qe*.213+_t*.143,.715+Qe*.285+_t*.14,.072-Qe*.072-_t*.283,0,.213-Qe*.213-_t*.787,.715-Qe*.715+_t*.715,.072+Qe*.928+_t*.072,0,0,0,0,1]},ia=(Le,Ue,Qe=!1)=>{let _t=P(Ue),wt=se(Ue).channels;return Lt=>{let pr=_t(Lt);if(!pr)return;let Gr={mode:Ue},va,Qa=wt.length;for(let Ua=0;Ua{let Qe=Or(Le);return tt(Nt(Qe),Ue,!0)},da=(Le=1,Ue="rgb")=>{let Qe=Or(Le);return tt(Nt(Qe,(1-Qe)/2),Ue,!0)},Fa=(Le=1,Ue="rgb")=>ia(ka(Le),Ue,!0),za=(Le=1,Ue="rgb")=>ia(Ta(Le),Ue,!0),Cn=(Le=1,Ue="rgb")=>ia(Ra(Le),Ue,!0),Dn=(Le=1,Ue="rgb")=>{let Qe=Cr(Le);return tt((_t,wt)=>wt==="alpha"?_t:ta(Qe,1-Qe,_t),Ue,!0)},ui=(Le=0,Ue="rgb")=>ia(ua(Le),Ue,!0),cn=P("rgb"),sn=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],ei=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],Pn=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],Rn=(Le,Ue)=>{let Qe=Math.max(0,Math.min(1,Ue)),_t=Math.round(Qe/.1),wt=Math.round(Qe%.1),Lt=Le[_t];if(wt>0&&_tBe(Lt[va],pr[va],wt))}return pr=>{let Gr=B(pr);if(Gr===void 0)return;let{r:va,g:Qa,b:Ga}=cn(Gr),Ua={mode:"rgb",r:Lt[0]*va+Lt[1]*Qa+Lt[2]*Ga,g:Lt[3]*va+Lt[4]*Qa+Lt[5]*Ga,b:Lt[6]*va+Lt[7]*Qa+Lt[8]*Ga};return Gr.alpha!==void 0&&(Ua.alpha=Gr.alpha),P(Gr.mode)(Ua)}},In=(Le=1)=>Rn(sn,Le),Jn=(Le=1)=>Rn(ei,Le),Ei=(Le=1)=>Rn(Pn,Le),so=Le=>Le*Le*(3-2*Le),ti=Le=>.5-Math.sin(Math.asin(1-2*Le)/3),bi=Le=>Le*Le*Le*(Le*(Le*6-15)+10),Wi=bi,ro=Le=>(1-Math.cos(Le*Math.PI))/2,Mo=ro;function zs(Le){let Ue=P("lrgb")(Le);return .2126*Ue.r+.7152*Ue.g+.0722*Ue.b}function Bs(Le,Ue){let Qe=zs(Le),_t=zs(Ue);return(Math.max(Qe,_t)+.05)/(Math.min(Qe,_t)+.05)}var So=ne(Ht),Ws=ne(Dr),Zo=ne(go),es=ne(Ao),$o=ne(to),_s=ne(Vs),Go=ne(Pi),Ys=ne(dl),Ll=ne(bc),mo=ne(Qu),ru=ne(ju),Rs=ne(Sl),Yu=ne(oh),Ul=ne(nl),ql=ne(Kc),fo=ne(kl),Xo=ne(Cc),Os=ne(vc),ra=ne(ri),Ya=ne(Zi),Ka=ne(Yo),Bi=ne(ns),rs=ne(zl),Is=ne(oc),Oi=ne(Qc),Wr=ne(_r),na=ne(Bt),pa=ne(Wt),Wa=ne(la),ln=ne(Si)}}),av=ze({"src/plot_api/plot_config.js"(J,V){"use strict";var p={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},b={};function E(k,l){for(var e in k){var t=k[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),E(t,l[e]))}}E(p,b),V.exports={configAttributes:p,dfltConfig:b}}}),Pw=ze({"src/lib/notifier.js"(J,V){"use strict";var p=ci(),b=ao(),E=[];V.exports=function(k,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||E.indexOf(k)!==-1)return;E.push(k);var n=1e3;b(l)?n=l:l==="long"&&(n=3e3);var r=p.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(E);function o(s){s.duration(700).style("opacity",0).each("end",function(c){var m=E.indexOf(c);m!==-1&&E.splice(m,1),p.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=p.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(o)});for(var m=c.append("p"),h=s.split(//g),v=0;v1){var l=["LOG:"];for(k=0;k1){var e=[];for(k=0;k"),"long")}},E.warn=function(){var k;if(p.logging>0){var l=["WARN:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}},E.error=function(){var k;if(p.logging>0){var l=["ERROR:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}}}}),fc=ze({"src/components/color/attributes.js"(J){"use strict";J.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],J.defaultLine="#444",J.lightLine="#eee",J.background="#fff",J.borderLine="#BEC8D9",J.lightFraction=100*10/11}}),Qn=ze({"src/components/color/index.js"(J,V){"use strict";var{converter:p,formatHex:b,formatRgb:E,wcagContrast:k,wcagLuminance:l}=UR(),{isArrayOrTypedArray:e}=Ff(),{warn:t}=ap(),{background:n,defaultLine:r,defaults:a,lightLine:o}=fc(),s=p("rgb"),c=p("hsl"),m=q=>{if(typeof q!="string")return;let Z=q.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(Z))try{return s(Z)}catch{return}},h=q=>q>0?q>1?1:q:0,v={mode:"rgb",r:0,g:0,b:0,alpha:1},g=q=>Math.round(q*255e6)/255e6,i=q=>lo(Li({},q),{r:g(q.r),g:g(q.g),b:g(q.b)}),w=q=>E(i(q)),S=q=>b(i(q)),M=(q,Z)=>{var ee;let ae=m(q);return ae?((ee=ae.alpha)!=null||(ae.alpha=1),ae):(!Z&&q!=null&&t(`Invalid color specifier: "${q}". Defaulting to "#000"`),v)},C=q=>w(lo(Li({},M(q)),{alpha:1})),_=q=>q?M(q).alpha:0,T=q=>e(q)&&q.length>2&&Number.isFinite(q[0])&&Number.isFinite(q[1])&&Number.isFinite(q[2]),f=q=>{let[Z,ee,ae,he]=q,xe=Math.max(Z,ee,ae)>1?1/255:1,we=he??1;return{mode:"rgb",r:Z*xe,g:ee*xe,b:ae*xe,alpha:we>1?we/255:we}},u=(q,Z)=>{let ee=T(q)?f(q):M(q,!0),ae=[h(ee.r),h(ee.g),h(ee.b),h(ee.alpha)];return Z==="uint8"||Z==="uint8_clamped"?Uint8Array.from(ae,he=>Math.round(he*255)):Z==="float32"?Float32Array.from(ae):Z==="float64"?Float64Array.from(ae):ae},A=(q,Z)=>w(lo(Li({},M(q)),{alpha:h(Z)})),x=(q,Z)=>{let ee=M(q),ae=ee.alpha;if(ae===1)return w(ee);let he=M(Z||n),xe=he.alpha,we=(Me,Se)=>(xe===1?Se:1-xe+Se*xe)*(1-ae)+Me*ae;return w({mode:"rgb",r:we(ee.r,he.r),g:we(ee.g,he.g),b:we(ee.b,he.b)})},z=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=(we,Me)=>ee*we+(1-ee)*Me;return w({mode:"rgb",r:xe(ae.r,he.r),g:xe(ae.g,he.g),b:xe(ae.b,he.b)})},I=(q,Z)=>{let ee=M(q),ae=c(ee)||{mode:"hsl",h:0,s:0,l:0};return w(s(lo(Li({},ae),{l:h((ae.l*100+Z)/100),alpha:ee.alpha})))},O=(q,Z)=>k(M(q),M(Z)),D=q=>O(q,n)>O(q,r),B=w(M(n)),F=w(M(r)),P=(q,Z,ee)=>(M(q).alpha!==1&&(q=x(q,n)),D(q)?Z?I(q,Z):B:ee?I(q,-ee):F),j=(q,Z)=>{q.style({stroke:C(Z),"stroke-opacity":M(Z).alpha})},U=(q,Z)=>{q.style({fill:C(Z),"fill-opacity":M(Z).alpha})},$=(q,Z)=>!!(q&&Z&&C(q)===C(Z)),Q=q=>m(q)!==void 0,re=(q,Z)=>{Z=Z===0?0:Z||10;let ee=M(q),ae=Z/100;return w(lo(Li({},ee),{r:h(ee.r+ae),g:h(ee.g+ae),b:h(ee.b+ae)}))},ne=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=ee/100,we=he.alpha-ae.alpha,Me=2*xe-1,Se=((Me*we===-1?Me:(Me+we)/(1+Me*we))+1)/2,Ie=1-Se,Ve=(Ge,ke)=>Ie*Ge+Se*ke;return w({mode:"rgb",r:Ve(ae.r,he.r),g:Ve(ae.g,he.g),b:Ve(ae.b,he.b),alpha:ae.alpha*(1-xe)+he.alpha*xe})},se=(q,Z=["#000","#fff"])=>{let ee,ae=-1/0;for(let he of Z){let xe=O(q,he);xe>ae&&(ae=xe,ee=w(M(he)))}return ee},G=q=>w(M(q)),X=q=>S(M(q)).toUpperCase(),K=q=>{let Z=M(q);return[h(Z.r)*255,h(Z.g)*255,h(Z.b)*255,h(Z.alpha)]},H=([q,Z,ee,ae])=>w({mode:"rgb",r:q/255,g:Z/255,b:ee/255,alpha:ae}),Y=q=>{let Z=M(q);return l({mode:"rgb",r:h(Z.r),g:h(Z.g),b:h(Z.b)})};V.exports={addOpacity:A,adjustLightness:I,background:n,brighten:re,combine:x,contrast:P,defaultLine:r,defaults:a,equals:$,fill:U,hexString:X,interpolate:z,isChannelArray:T,isDark:D,isValid:Q,lightLine:o,luminosity:Y,mix:ne,mostReadable:se,normalize:u,opacity:_,parse:M,rgb:C,rgbaArray:K,rgbaArrayToString:H,rgbaString:G,stroke:j,wcagContrast:O}}}),Bv=ze({"src/components/colorscale/scales.js"(J,V){"use strict";var p=Qn(),b={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},E=b.RdBu;function k(t,n){if(n||(n=E),!t)return n;function r(){try{t=b[t]||JSON.parse(t)}catch{t=n}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:n}function l(t){var n=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rqR});function qR(J,V="",p,b){let E=V+(p?"":"$"),k=b===!1?"":"^";return J==="xy"?new RegExp(k+"x"+n1+"y"+n1+E):new RegExp(k+J+n1+E)}var n1,Vm=zi({"src/lib/regex.ts"(){"use strict";n1="([2-9]|[1-9][0-9]+)?"}}),VR=ze({"src/lib/coerce.js"(J){"use strict";var V=ao(),p=Ki().extendFlat,b=ws(),E=Bv(),k=Qn(),l=np().DESELECTDIM,e=r1(),t=(Vm(),Po(Ov)).counter,n=(Um(),Po(zv)).modHalf,r=Ff().isArrayOrTypedArray,a=Ff().isTypedArraySpec,o=Ff().decodeTypedArraySpec;J.valObjectMeta={data_array:{coerceFunction:function(c,m,h){m.set(r(c)?c:a(c)?o(c):h)}},enumerated:{coerceFunction:function(c,m,h,v){v.coerceNumber&&(c=+c),v.values.indexOf(c)===-1?m.set(h):m.set(c)},validateFunction:function(c,m){m.coerceNumber&&(c=+c);for(var h=m.values,v=0;vi===!0||i===!1;g(c)||v.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(g)?m.set(c):m.set(h)}},number:{coerceFunction:function(c,m,h,v){a(c)&&(c=o(c)),!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},integer:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}a(c)&&(c=o(c)),c%1||!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},string:{coerceFunction:function(c,m,h,v){if(typeof c!="string"){var g=typeof c=="number";v.strict===!0||!g?m.set(h):m.set(String(c))}else v.noBlank&&!c?m.set(h):m.set(c)}},color:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),k.isValid(c)?m.set(c):m.set(h)}},colorlist:{coerceFunction:function(c,m,h){!Array.isArray(c)||!c.length?m.set(h):c.every(v=>k.isValid(v))?m.set(c):m.set(h)}},colorscale:{coerceFunction:function(c,m,h){m.set(E.get(c,h))}},angle:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),c==="auto"?m.set("auto"):V(c)?m.set(n(+c,360)):m.set(h)}},subplotid:{coerceFunction:function(c,m,h,v){var g=v.regex||t(h);let i=w=>typeof w=="string"&&g.test(w);i(c)||v.arrayOk&&r(c)&&c.length>0&&c.every(i)?m.set(c):m.set(h)},validateFunction:function(c,m){var h=m.dflt;return c===h?!0:typeof c!="string"?!1:!!t(h).test(c)}},flaglist:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}if(typeof c!="string"){m.set(h);return}for(var g=c.split("+"),i=0;iLi({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.texttemplateAttrs=({editType:k="calc",arrayOk:l}={},e={})=>Li({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.shapeTexttemplateAttrs=({editType:k="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:k}),J.templatefallbackAttrs=({editType:k="none"}={})=>({valType:"any",dflt:"-",editType:k})}}),Sx=ze({"src/components/shapes/label_texttemplate.js"(J,V){"use strict";function p(M,C){return C?C.d2l(M):M}function b(M,C){return C?C.l2d(M):M}function E(M){return M.x0}function k(M){return M.x1}function l(M){return M.y0}function e(M){return M.y1}function t(M){return M.x0shift||0}function n(M){return M.x1shift||0}function r(M){return M.y0shift||0}function a(M){return M.y1shift||0}function o(M,C){return p(M.x1,C)+n(M)-p(M.x0,C)-t(M)}function s(M,C,_){return p(M.y1,_)+a(M)-p(M.y0,_)-r(M)}function c(M,C){return Math.abs(o(M,C))}function m(M,C,_){return Math.abs(s(M,C,_))}function h(M,C,_){return M.type!=="line"?void 0:Math.sqrt(Math.pow(o(M,C),2)+Math.pow(s(M,C,_),2))}function v(M,C){return b((p(M.x1,C)+n(M)+p(M.x0,C)+t(M))/2,C)}function g(M,C,_){return b((p(M.y1,_)+a(M)+p(M.y0,_)+r(M))/2,_)}function i(M,C,_){return M.type!=="line"?void 0:s(M,C,_)/o(M,C)}var w=["x0","x1","y0","y1","dy","height","ycenter"],S=["x0","x1","y0","y1","dx","width","xcenter"];V.exports={x0:E,x1:k,y0:l,y1:e,slope:i,dx:o,dy:s,width:c,height:m,length:h,xcenter:v,ycenter:g,simpleXVariables:w,simpleYVariables:S}}}),yI=ze({"src/components/shapes/draw_newshape/attributes.js"(J,V){"use strict";var p=Al().overrideAll,b=ws(),E=Qs(),k=Uc().dash,l=Ki().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Sx();V.exports=p({newshape:{visible:l({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},b.legend,{}),legendgroup:l({},b.legendgroup,{}),legendgrouptitle:{text:l({},b.legendgrouptitle.text,{}),font:E({})},legendrank:l({},b.legendrank,{}),legendwidth:l({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},k,{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:l({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(n)}),texttemplatefallback:t({editType:"arraydraw"}),font:E({}),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")}}),_I=ze({"src/components/selections/draw_newselection/attributes.js"(J,V){"use strict";var p=Uc().dash,b=Ki().extendFlat;V.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:b({},p,{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"}}}}),Ex=ze({"src/plots/pad_attributes.js"(J,V){"use strict";V.exports=function(p){var b=p.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),Gm=ze({"src/plots/layout_attributes.js"(J,V){"use strict";var p=Qs(),b=o1(),E=fc(),k=yI(),l=_I(),e=Ex(),t=Ki().extendFlat,n=p({editType:"calc"});n.family.dflt='"Open Sans", verdana, arial, sans-serif',n.size.dflt=12,n.color.dflt=E.defaultLine,V.exports={font:n,title:{text:{valType:"string",editType:"layoutstyle"},font:p({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:p({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:t(e({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:E.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:E.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:E.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:k.newshape,activeshape:k.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},b.transition,{editType:"none"})}}}),xI=ze({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var J=document.createElement("style");J.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",J.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}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.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-globe .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='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-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='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%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:rgba(0,0,0,.05)}.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;white-space:nowrap}.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}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.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:rgba(0,0,0,.05)}.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}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@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),(pointer:coarse){.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(J)}})()}}),mi=ze({"src/registry.js"(J){"use strict";var V=ap(),p=Ax(),b=Rw(),E=i1().addStyleRule,k=Ki(),l=ws(),e=Gm(),t=k.extendFlat,n=k.extendDeepAll;J.modules={},J.allCategories={},J.allTypes=[],J.subplotsRegistry={},J.componentsRegistry={},J.layoutArrayContainers=[],J.layoutArrayRegexes=[],J.traceLayoutAttributes={},J.localeRegistry={},J.apiMethodRegistry={},J.collectableSubplotTypes=null,J.register=function(i){if(J.collectableSubplotTypes=null,i)i&&!Array.isArray(i)&&(i=[i]);else throw new Error("No argument passed to Plotly.register.");for(var w=0;w=i&&D<=w?D:l}if(typeof D!="string"&&typeof D!="number")return l;D=String(D);var U=v(B),$=D.charAt(0);U&&($==="G"||$==="g")&&(D=D.slice(1),B="");var Q=U&&B.slice(0,7)==="chinese",re=D.match(Q?m:c);if(!re)return l;var ne=re[1],se=re[3]||"1",G=Number(re[5]||1),X=Number(re[7]||0),K=Number(re[9]||0),H=Number(re[11]||0);if(U){if(ne.length===2)return l;ne=Number(ne);var Y;try{var q=o.getComponentMethod("calendars","getCal")(B);if(Q){var Z=se.charAt(se.length-1)==="i";se=parseInt(se,10),Y=q.newDate(ne,q.toMonthIndex(ne,se,Z),G)}else Y=q.newDate(ne,Number(se),G)}catch{return l}return Y?(Y.toJD()-a)*e+X*t+K*n+H*r:l}ne.length===2?ne=(Number(ne)+2e3-h)%100+h:ne=Number(ne),se-=1;var ee=new Date(Date.UTC(2e3,se,G,X,K));return ee.setUTCFullYear(ne),ee.getUTCMonth()!==se||ee.getUTCDate()!==G?l:ee.getTime()+H*r},i=J.MIN_MS=J.dateTime2ms("-9999"),w=J.MAX_MS=J.dateTime2ms("9999-12-31 23:59:59.9999"),J.isDateTime=function(D,B){return J.dateTime2ms(D,B)!==l};function S(D,B){return String(D+Math.pow(10,B)).slice(1)}var M=90*e,C=3*t,_=5*n;J.ms2DateTime=function(D,B,F){if(typeof D!="number"||!(D>=i&&D<=w))return l;B||(B=0);var P=Math.floor(E(D+.05,1)*10),j=Math.round(D-P/10),U,$,Q,re,ne,se;if(v(F)){var G=Math.floor(j/e)+a,X=Math.floor(E(D,e));try{U=o.getComponentMethod("calendars","getCal")(F).fromJD(G).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(j))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;$=B=i+e&&D<=w-e))return l;var B=Math.floor(E(D+.05,1)*10),F=new Date(Math.round(D-B/10)),P=V("%Y-%m-%d")(F),j=F.getHours(),U=F.getMinutes(),$=F.getSeconds(),Q=F.getUTCMilliseconds()*10+B;return T(P,j,U,$,Q)};function T(D,B,F,P,j){if((B||F||P||j)&&(D+=" "+S(B,2)+":"+S(F,2),(P||j)&&(D+=":"+S(P,2),j))){for(var U=4;j%10===0;)U-=1,j/=10;D+="."+S(j,U)}return D}J.cleanDate=function(D,B,F){if(D===l)return B;if(J.isJSDate(D)||typeof D=="number"&&isFinite(D)){if(v(F))return b.error("JS Dates and milliseconds are incompatible with world calendars",D),B;if(D=J.ms2DateTimeLocal(+D),!D&&B!==void 0)return B}else if(!J.isDateTime(D,F))return b.error("unrecognized date",D),B;return D};var f=/%\d?f/g,u=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function x(D,B,F,P){D=D.replace(f,function(U){var $=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed($).slice(2).replace(/0+$/,"")||"0";return Q});var j=new Date(Math.floor(B+.05));if(D=D.replace(u,function(){return A[F("%q")(j)]}),v(P))try{D=o.getComponentMethod("calendars","worldCalFmt")(D,B,P)}catch{return"Invalid"}return F(D)(j)}var z=[59,59.9,59.99,59.999,59.9999];function I(D,B){var F=E(D+.05,e),P=S(Math.floor(F/t),2)+":"+S(E(Math.floor(F/n),60),2);if(B!=="M"){p(B)||(B=0);var j=Math.min(E(D/r,60),z[B]),U=(100+j).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+U}return P}J.formatDate=function(D,B,F,P,j,U){if(j=v(j)&&j,!B)if(F==="y")B=U.year;else if(F==="m")B=U.month;else if(F==="d")B=U.dayMonth+` -`+U.year;else return I(D,F)+` -`+x(U.dayMonthYear,D,P,j);return x(B,D,P,j)};var O=3*e;J.incrementMonth=function(D,B,F){F=v(F)&&F;var P=E(D,e);if(D=Math.round(D-P),F)try{var j=Math.round(D/e)+a,U=o.getComponentMethod("calendars","getCal")(F),$=U.fromJD(j);return B%12?U.add($,B,"m"):U.add($,B/12,"y"),($.toJD()-a)*e+P}catch{b.error("invalid ms "+D+" in calendar "+F)}var Q=new Date(D+O);return Q.setUTCMonth(Q.getUTCMonth()+B)+P-O},J.findExactDates=function(D,B){for(var F=0,P=0,j=0,U=0,$,Q,re=v(B)&&o.getComponentMethod("calendars","getCal")(B),ne=0;ne1?(a[c-1]-a[0])/(c-1):1,v,g;for(h>=0?g=o?l:e:g=o?n:t,r+=h*k*(o?-1:1)*(h>=0?1:-1);s90&&p.log("Long binary search..."),s-1};function l(r,a){return ra}function n(r,a){return r>=a}J.sorterAsc=function(r,a){return r-a},J.sorterDes=function(r,a){return a-r},J.distinctVals=function(r){var a=r.slice();a.sort(J.sorterAsc);var o;for(o=a.length-1;o>-1&&a[o]===E;o--);for(var s=a[o]-a[0]||1,c=s/(o||1)/1e4,m=[],h,v=0;v<=o;v++){var g=a[v],i=g-h;h===void 0?(m.push(g),h=g):i>c&&(s=Math.min(s,i),m.push(g),h=g)}return{vals:m,minDiff:s}},J.roundUp=function(r,a,o){for(var s=0,c=a.length-1,m,h=0,v=o?0:1,g=o?1:0,i=o?Math.ceil:Math.floor;s0&&(s=1),o&&s)return r.sort(a)}return s?r:r.reverse()},J.findIndexOfMin=function(r,a){a=a||b;for(var o=1/0,s,c=0;czw});function wI(J){return Object.keys(J).sort()}var zw,Nv=zi({"src/lib/sort_object_keys.ts"(){"use strict";zw=wI}}),TI=ze({"src/lib/stats.js"(J){"use strict";var V=ao(),p=Ff().isArrayOrTypedArray;J.aggNums=function(b,E,k,l){var e,t;if((!l||l>k.length)&&(l=k.length),V(E)||(E=!1),p(k[0])){for(t=new Array(l),e=0;eb.length-1)return b[b.length-1];var k=E%1;return k*b[Math.ceil(E)]+(1-k)*b[Math.floor(E)]}}}),AI=ze({"src/lib/angles.js"(J,V){"use strict";var p=(Um(),Po(zv)),b=p.mod,E=p.modHalf,k=Math.PI,l=2*k;function e(g){return g/180*k}function t(g){return g/k*180}function n(g){return Math.abs(g[1]-g[0])>l-1e-14}function r(g,i){return E(i-g,l)}function a(g,i){return Math.abs(r(g,i))}function o(g,i){if(n(i))return!0;var w,S;i[0]S&&(S+=l);var M=b(g,l),C=M+l;return M>=w&&M<=S||C>=w&&C<=S}function s(g,i,w,S){if(!o(i,S))return!1;var M,C;return w[0]=M&&g<=C}function c(g,i,w,S,M,C,_){M=M||0,C=C||0;var T=n([w,S]),f,u,A,x,z;T?(f=0,u=k,A=l):w1/3&&p.x<2/3},J.isRightAnchor=function(p){return p.xanchor==="right"||p.xanchor==="auto"&&p.x>=2/3},J.isTopAnchor=function(p){return p.yanchor==="top"||p.yanchor==="auto"&&p.y>=2/3},J.isMiddleAnchor=function(p){return p.yanchor==="middle"||p.yanchor==="auto"&&p.y>1/3&&p.y<2/3},J.isBottomAnchor=function(p){return p.yanchor==="bottom"||p.yanchor==="auto"&&p.y<=1/3}}}),SI=ze({"src/lib/geometry2d.js"(J){"use strict";var V=(Um(),Po(zv)).mod;J.segmentsIntersect=p;function p(e,t,n,r,a,o,s,c){var m=n-e,h=a-e,v=s-a,g=r-t,i=o-t,w=c-o,S=m*w-v*g;if(S===0)return null;var M=(h*w-v*i)/S,C=(h*g-m*i)/S;return C<0||C>1||M<0||M>1?null:{x:e+m*M,y:t+g*M}}J.segmentDistance=function(t,n,r,a,o,s,c,m){if(p(t,n,r,a,o,s,c,m))return 0;var h=r-t,v=a-n,g=c-o,i=m-s,w=h*h+v*v,S=g*g+i*i,M=Math.min(b(h,v,w,o-t,s-n),b(h,v,w,c-t,m-n),b(g,i,S,t-o,n-s),b(g,i,S,r-o,a-s));return Math.sqrt(M)};function b(e,t,n,r,a){var o=r*e+a*t;if(o<0)return r*r+a*a;if(o>n){var s=r-e,c=a-t;return s*s+c*c}else{var m=r*t-a*e;return m*m/n}}var E,k,l;J.getTextLocation=function(t,n,r,a){if((t!==k||a!==l)&&(E={},k=t,l=a),E[r])return E[r];var o=t.getPointAtLength(V(r-a/2,n)),s=t.getPointAtLength(V(r+a/2,n)),c=Math.atan((s.y-o.y)/(s.x-o.x)),m=t.getPointAtLength(V(r,n)),h=(m.x*4+o.x+s.x)/6,v=(m.y*4+o.y+s.y)/6,g={x:h,y:v,theta:c};return E[r]=g,g},J.clearLocationCache=function(){k=null},J.getVisibleSegment=function(t,n,r){var a=n.left,o=n.right,s=n.top,c=n.bottom,m=0,h=t.getTotalLength(),v=h,g,i;function w(M){var C=t.getPointAtLength(M);M===0?g=C:M===h&&(i=C);var _=C.xo?C.x-o:0,T=C.yc?C.y-c:0;return Math.sqrt(_*_+T*T)}for(var S=w(m);S;){if(m+=S+r,m>v)return;S=w(m)}for(S=w(v);S;){if(v-=S+r,m>v)return;S=w(v)}return{min:m,max:v,len:v-m,total:h,isClosed:m===0&&v===h&&Math.abs(g.x-i.x)<.1&&Math.abs(g.y-i.y)<.1}},J.findPointOnPath=function(t,n,r,a){a=a||{};for(var o=a.pathLength||t.getTotalLength(),s=a.tolerance||.001,c=a.iterationLimit||30,m=t.getPointAtLength(0)[r]>t.getPointAtLength(o)[r]?-1:1,h=0,v=0,g=o,i,w,S;h0?g=i:v=i,h++}return w}}}),Cx=ze({"src/lib/throttle.js"(J){"use strict";var V={};J.throttle=function(E,k,l){var e=V[E],t=Date.now();if(!e){for(var n in V)V[n].tse.ts+k){r();return}e.timer=setTimeout(function(){r(),e.timer=null},k)},J.done=function(b){var E=V[b];return!E||!E.timer?Promise.resolve():new Promise(function(k){var l=E.onDone;E.onDone=function(){l&&l(),k(),E.onDone=null}})},J.clear=function(b){if(b)p(V[b]),delete V[b];else for(var E in V)J.clear(E)};function p(b){b&&b.timer!==null&&(clearTimeout(b.timer),b.timer=null)}}}),EI=ze({"src/lib/clear_responsive.js"(J,V){"use strict";V.exports=function(b){b._responsiveChartHandler&&(window.removeEventListener("resize",b._responsiveChartHandler),delete b._responsiveChartHandler)}}}),kI=ze({"node_modules/is-mobile/index.js"(J,V){"use strict";V.exports=k,V.exports.isMobile=k,V.exports.default=k;var p=/(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|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,b=/CrOS/,E=/android|ipad|playbook|silk/i;function k(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=p.test(e)&&!b.test(e)||!!l.tablet&&E.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),CI=ze({"src/lib/preserve_drawing_buffer.js"(J,V){"use strict";var p=ao(),b=kI();V.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=E(),typeof e!="string")return!0;var t=b({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var n=e.split(" "),r=1;r-1;o--){var s=n[o];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(p(c)&&(c=+c),c>=13)return!0}}}return t};function E(){var k;return typeof navigator<"u"&&(k=navigator.userAgent),k&&k.headers&&typeof k.headers["user-agent"]=="string"&&(k=k.headers["user-agent"]),k}}}),LI=ze({"src/lib/make_trace_groups.js"(J,V){"use strict";var p=ci();V.exports=function(E,k,l){var e=E.selectAll("g."+l.replace(/\s/g,".")).data(k,function(n){return n[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=E.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(n){n[0][t]=p.select(this)}),e}}}),PI=ze({"src/lib/localize.js"(J,V){"use strict";var p=mi();V.exports=function(E,k){for(var l=E._context.locale,e=0;e<2;e++){for(var t=E._context.locales,n=0;n<2;n++){var r=(t[l]||{}).dictionary;if(r){var a=r[k];if(a)return a}t=p.localeRegistry}var o=l.split("-")[0];if(o===l)break;l=o}return k}}}),Bw=ze({"src/lib/filter_unique.js"(J,V){"use strict";V.exports=function(b){for(var E={},k=[],l=0,e=0;e1?(k*b+k*E)/k:b+E,e=String(l).length;if(e>16){var t=String(E).length,n=String(b).length;if(e>=n+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),Ow={};bu(Ow,{default:()=>qw});function DI(J){return typeof J=="string"&&(J=J.replace(Uw,"")),(0,Nw.default)(J)?Number(J):jw.BADNUM}var Nw,jw,Uw,qw,FI=zi({"src/lib/clean_number.ts"(){"use strict";Nw=Yl(ao()),jw=Yl(No()),Uw=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,qw=DI}}),zI=ze({"src/lib/slugify.js"(J,V){"use strict";var p=/<[^>]*>/g,b=/[\p{S}\p{P}]/gu,E=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,k=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),a=60;function o(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}V.exports=function(c,m=a){var h=o(c??"").replace(k,"").replace(p," ").replace(b,v=>v===e?v:"").toLowerCase().trim().replace(l,e).replace(E,"").replace(n,e);return h.length<=m?h:Array.from(h).slice(0,m).join("").replace(r,"")}}}),Nr=ze({"src/lib/index.js"(J,V){"use strict";var p=ci(),b=jm().utcFormat,E=Cw().format,k=ao(),l=No(),e=l.FP_SAFE,t=-e,n=l.BADNUM,r=V.exports={};r.adjustFormat=function(q){if(!q||/^\d[.]\df/.test(q)||/[.]\d%/.test(q))return q;if(q==="0.f")return"~f";if(/^\d%/.test(q))return"~%";if(/^\ds/.test(q))return"~s";var Z=(q.match(/^[+\-( ]?/)||[""])[0],ee=q.slice(Z.length);return!/^[~,.0$#]/.test(ee)&&/[&fps]/.test(ee)?Z+"~"+ee:q};var a={};r.warnBadFormat=function(Y){var q=String(Y);a[q]||(a[q]=1,r.warn('encountered bad format: "'+q+'"'))},r.noFormat=function(Y){return String(Y)},r.numberFormat=function(Y){var q;try{q=E(r.adjustFormat(Y))}catch{return r.warnBadFormat(Y),r.noFormat}return q},r.nestedProperty=r1(),r.keyedContainer=zR(),r.relativeAttr=BR(),r.isPlainObject=tv(),r.toLogRange=Tx(),r.relinkPrivateKeys=OR();var o=Ff();r.isArrayBuffer=o.isArrayBuffer,r.isTypedArray=o.isTypedArray,r.isArrayOrTypedArray=o.isArrayOrTypedArray,r.isArray1D=o.isArray1D,r.ensureArray=o.ensureArray,r.concat=o.concat,r.maxRowLength=o.maxRowLength,r.minRowLength=o.minRowLength;var s=(Um(),Po(zv));r.mod=s.mod,r.modHalf=s.modHalf;var c=VR();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var m=bI();r.dateTime2ms=m.dateTime2ms,r.isDateTime=m.isDateTime,r.ms2DateTime=m.ms2DateTime,r.ms2DateTimeLocal=m.ms2DateTimeLocal,r.cleanDate=m.cleanDate,r.isJSDate=m.isJSDate,r.formatDate=m.formatDate,r.incrementMonth=m.incrementMonth,r.dateTick0=m.dateTick0,r.dfltRange=m.dfltRange,r.findExactDates=m.findExactDates,r.MIN_MS=m.MIN_MS,r.MAX_MS=m.MAX_MS;var h=kx();r.findBin=h.findBin,r.sorterAsc=h.sorterAsc,r.sorterDes=h.sorterDes,r.distinctVals=h.distinctVals,r.roundUp=h.roundUp,r.sort=h.sort,r.findIndexOfMin=h.findIndexOfMin,r.sortObjectKeys=(Nv(),Po(nv)).default;var v=TI();r.aggNums=v.aggNums,r.len=v.len,r.mean=v.mean,r.geometricMean=v.geometricMean,r.median=v.median,r.midRange=v.midRange,r.variance=v.variance,r.stdev=v.stdev,r.interp=v.interp;var g=Mx();r.init2dArray=g.init2dArray,r.transposeRagged=g.transposeRagged,r.dot=g.dot,r.translationMatrix=g.translationMatrix,r.rotationMatrix=g.rotationMatrix,r.rotationXYMatrix=g.rotationXYMatrix,r.apply3DTransform=g.apply3DTransform,r.apply2DTransform=g.apply2DTransform,r.apply2DTransform2=g.apply2DTransform2,r.convertCssMatrix=g.convertCssMatrix,r.inverseTransformMatrix=g.inverseTransformMatrix;var i=AI();r.deg2rad=i.deg2rad,r.rad2deg=i.rad2deg,r.angleDelta=i.angleDelta,r.angleDist=i.angleDist,r.isFullCircle=i.isFullCircle,r.isAngleInsideSector=i.isAngleInsideSector,r.isPtInsideSector=i.isPtInsideSector,r.pathArc=i.pathArc,r.pathSector=i.pathSector,r.pathAnnulus=i.pathAnnulus;var w=MI();r.isLeftAnchor=w.isLeftAnchor,r.isCenterAnchor=w.isCenterAnchor,r.isRightAnchor=w.isRightAnchor,r.isTopAnchor=w.isTopAnchor,r.isMiddleAnchor=w.isMiddleAnchor,r.isBottomAnchor=w.isBottomAnchor;var S=SI();r.segmentsIntersect=S.segmentsIntersect,r.segmentDistance=S.segmentDistance,r.getTextLocation=S.getTextLocation,r.clearLocationCache=S.clearLocationCache,r.getVisibleSegment=S.getVisibleSegment,r.findPointOnPath=S.findPointOnPath;var M=Ki();r.extendFlat=M.extendFlat,r.extendDeep=M.extendDeep,r.extendDeepAll=M.extendDeepAll,r.extendDeepNoArrays=M.extendDeepNoArrays;var C=ap();r.log=C.log,r.warn=C.warn,r.error=C.error;var _=(Vm(),Po(Ov));r.counterRegex=_.counter;var T=Cx();r.throttle=T.throttle,r.throttleDone=T.done,r.clearThrottle=T.clear;var f=i1();r.getGraphDiv=f.getGraphDiv,r.isPlotDiv=f.isPlotDiv,r.removeElement=f.removeElement,r.addStyleRule=f.addStyleRule,r.addRelatedStyleRule=f.addRelatedStyleRule,r.deleteRelatedStyleRule=f.deleteRelatedStyleRule,r.setStyleOnHover=f.setStyleOnHover,r.getFullTransformMatrix=f.getFullTransformMatrix,r.getElementTransformMatrix=f.getElementTransformMatrix,r.getElementAndAncestors=f.getElementAndAncestors,r.equalDomRects=f.equalDomRects,r.clearResponsive=EI(),r.preserveDrawingBuffer=CI(),r.makeTraceGroups=LI(),r._=PI(),r.notifier=Pw(),r.filterUnique=Bw(),r.filterVisible=RI(),r.pushUnique=Rw(),r.increment=II(),r.cleanNumber=(FI(),Po(Ow)).default,r.slugify=zI(),r.ensureNumber=function(q){return k(q)?(q=Number(q),q>e||q=q?!1:k(Y)&&Y>=0&&Y%1===0},r.noop=Ax(),r.identity=s1(),r.repeat=function(Y,q){for(var Z=new Array(q),ee=0;eeZ?Math.max(Z,Math.min(q,Y)):Math.max(q,Math.min(Z,Y))},r.bBoxIntersect=function(Y,q,Z){return Z=Z||0,Y.left<=q.right+Z&&q.left<=Y.right+Z&&Y.top<=q.bottom+Z&&q.top<=Y.bottom+Z},r.simpleMap=function(Y,q,Z,ee,ae){for(var he=Y.length,xe=new Array(he),we=0;we=Math.pow(2,Z)?ae>10?(r.warn("randstr failed uniqueness"),xe):Y(q,Z,ee,(ae||0)+1):xe},r.OptionControl=function(Y,q){Y||(Y={}),q||(q="opt");var Z={};return Z.optionList=[],Z._newoption=function(ee){ee[q]=Y,Z[ee.name]=ee,Z.optionList.push(ee)},Z["_"+q]=Y,Z},r.smooth=function(Y,q){if(q=Math.round(q)||0,q<2)return Y;var Z=Y.length,ee=2*Z,ae=2*q-1,he=new Array(ae),xe=new Array(Z),we,Me,Se,Ie;for(we=0;we=ee&&(Se-=ee*Math.floor(Se/ee)),Se<0?Se=-1-Se:Se>=Z&&(Se=ee-1-Se),Ie+=Y[Se]*he[Me];xe[we]=Ie}return xe},r.syncOrAsync=function(Y,q,Z){var ee,ae;function he(){return r.syncOrAsync(Y,q,Z)}for(;Y.length;)if(ae=Y.splice(0,1)[0],ee=ae(q),ee&&ee.then)return ee.then(he);return Z&&Z(q)},r.stripTrailingSlash=function(Y){return Y.slice(-1)==="/"?Y.slice(0,-1):Y},r.noneOrAll=function(Y,q,Z){if(Y){var ee=!1,ae=!0,he,xe;for(he=0;he0?ae:0})},r.fillArray=function(Y,q,Z,ee){if(ee=ee||r.identity,r.isArrayOrTypedArray(Y))for(var ae=0;aez.test(window.navigator.userAgent);var I=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var Y=I.exec(window.navigator.userAgent);if(Y&&Y.length===2){var q=parseInt(Y[1]);if(!isNaN(q))return q}return null},r.isD3Selection=function(Y){return Y instanceof p.selection},r.ensureSingle=function(Y,q,Z,ee){var ae=Y.select(q+(Z?"."+Z:""));if(ae.size())return ae;var he=Y.append(q);return Z&&he.classed(Z,!0),ee&&he.call(ee),he},r.ensureSingleById=function(Y,q,Z,ee){var ae=Y.select(q+"#"+Z);if(ae.size())return ae;var he=Y.append(q).attr("id",Z);return ee&&he.call(ee),he},r.objectFromPath=function(Y,q){for(var Z=Y.split("."),ee,ae=ee={},he=0;he1?ae+xe[1]:"";if(he&&(xe.length>1||we.length>4||Z))for(;ee.test(we);)we=we.replace(ee,"$1"+he+"$2");return we+Me},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;r.templateString=function(Y,q){var Z={};return Y.replace(r.TEMPLATE_STRING_REGEX,function(ee,ae){var he;return F.test(ae)?he=q[ae]:(Z[ae]=Z[ae]||r.nestedProperty(q,ae).get,he=Z[ae](!0)),he!==void 0?he:""})};var P={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=Y=>ne(lo(Li({},Y),{opts:P}));var j={max:10,count:0,name:"texttemplate"};r.texttemplateString=Y=>ne(lo(Li({},Y),{opts:j}));var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(Y){var q=Y.match(U);return q?{key:q[1],op:q[2],number:Number(q[3])}:{key:Y,op:null,number:null}}var Q={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=Y=>ne(lo(Li({},Y),{opts:Q}));var re=/^[:|\|]/;function ne({data:Y=[],locale:q,fallback:Z,labels:ee={},opts:ae,template:he}){return he.replace(r.TEMPLATE_STRING_REGEX,(xe,we,Me)=>{let Se=["xother","yother"].includes(we),Ie=["_xother","_yother"].includes(we),Ve=["_xother_","_yother_"].includes(we),Ge=["xother_","yother_"].includes(we),ke=Se||Ie||Ge||Ve;(Ie||Ve)&&(we=we.substring(1)),(Ge||Ve)&&(we=we.substring(0,we.length-1));let _e=null,ce=null;if(ae.parseMultDiv){var ve=$(we);we=ve.key,_e=ve.op,ce=ve.number}let le;if(ke){if(ee[we]===void 0)return"";le=ee[we]}else for(let Ye of Y)if(Ye){if(Ye.hasOwnProperty(we)){le=Ye[we];break}if(F.test(we)||(le=r.nestedProperty(Ye,we).get(!0)),le!==void 0)break}if(le===void 0){let{count:Ye,max:yt,name:gt}=ae,Tt=Z===!1?xe:Z;return Ye=se&&xe<=G,Se=we>=se&&we<=G;if(Me&&(ee=10*ee+xe-se),Se&&(ae=10*ae+we-se),!Me||!Se){if(ee!==ae)return ee-ae;if(xe!==we)return xe-we}}return ae-ee};var X=2e9;r.seedPseudoRandom=function(){X=2e9},r.pseudoRandom=function(){var Y=X;return X=(69069*X+1)%4294967296,Math.abs(X-Y)<429496729?r.pseudoRandom():X/4294967296},r.fillText=function(Y,q,Z){var ee=Array.isArray(Z)?function(xe){Z.push(xe)}:function(xe){Z.text=xe},ae=r.extractOption(Y,q,"htx","hovertext");if(r.isValidTextValue(ae))return ee(ae);var he=r.extractOption(Y,q,"tx","text");if(r.isValidTextValue(he))return ee(he)},r.isValidTextValue=function(Y){return Y||Y===0},r.formatPercent=function(Y,q){q=q||0;for(var Z=(Math.round(100*Y*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ee=0;ee1&&(Se=1):Se=0,r.strTranslate(ae-Se*(Z+xe),he-Se*(ee+we))+r.strScale(Se)+(Me?"rotate("+Me+(q?"":" "+Z+" "+ee)+")":"")},r.setTransormAndDisplay=function(Y,q){Y.attr("transform",r.getTextTransform(q)),Y.style("display",q.scale?null:"none")},r.ensureUniformFontSize=function(Y,q){var Z=r.extendFlat({},q);return Z.size=Math.max(q.size,Y._fullLayout.uniformtext.minsize||0),Z},r.join2=function(Y,q,Z){var ee=Y.length;return ee>1?Y.slice(0,-1).join(q)+Z+Y[ee-1]:Y.join(q)},r.bigFont=function(Y){return Math.round(1.2*Y)};var K=r.getFirefoxVersion(),H=K!==null&&K<86;r.getPositionFromD3Event=function(){return H?[p.event.layerX,p.event.layerY]:[p.event.offsetX,p.event.offsetY]}}}),BI=ze({"build/plotcss.js"(){"use strict";var J=Nr(),V={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(b in V)p=b.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),J.addStyleRule(p,V[b]);var p,b}}),Vw=ze({"node_modules/is-browser/client.js"(J,V){V.exports=!0}}),Gw=ze({"node_modules/has-hover/index.js"(J,V){"use strict";var p=Vw(),b;typeof window.matchMedia=="function"?b=!window.matchMedia("(hover: none)").matches:b=p,V.exports=b}}),jv=ze({"node_modules/events/events.js"(J,V){"use strict";var p=typeof Reflect=="object"?Reflect:null,b=p&&typeof p.apply=="function"?p.apply:function(C,_,T){return Function.prototype.apply.call(C,_,T)},E;p&&typeof p.ownKeys=="function"?E=p.ownKeys:Object.getOwnPropertySymbols?E=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:E=function(C){return Object.getOwnPropertyNames(C)};function k(M){console&&console.warn&&console.warn(M)}var l=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}V.exports=e,V.exports.once=i,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function n(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(M){if(typeof M!="number"||M<0||l(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");t=M}}),e.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},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||l(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function r(M){return M._maxListeners===void 0?e.defaultMaxListeners:M._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(C){for(var _=[],T=1;T0&&(A=_[0]),A instanceof Error)throw A;var x=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw x.context=A,x}var z=u[C];if(z===void 0)return!1;if(typeof z=="function")b(z,this,_);else for(var I=z.length,O=h(z,I),T=0;T0&&A.length>f&&!A.warned){A.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=M,x.type=C,x.count=A.length,k(x)}return M}e.prototype.addListener=function(C,_){return a(this,C,_,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,_){return a(this,C,_,!0)};function o(){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(M,C,_){var T={fired:!1,wrapFn:void 0,target:M,type:C,listener:_},f=o.bind(T);return f.listener=_,T.wrapFn=f,f}e.prototype.once=function(C,_){return n(_),this.on(C,s(this,C,_)),this},e.prototype.prependOnceListener=function(C,_){return n(_),this.prependListener(C,s(this,C,_)),this},e.prototype.removeListener=function(C,_){var T,f,u,A,x;if(n(_),f=this._events,f===void 0)return this;if(T=f[C],T===void 0)return this;if(T===_||T.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete f[C],f.removeListener&&this.emit("removeListener",C,T.listener||_));else if(typeof T!="function"){for(u=-1,A=T.length-1;A>=0;A--)if(T[A]===_||T[A].listener===_){x=T[A].listener,u=A;break}if(u<0)return this;u===0?T.shift():v(T,u),T.length===1&&(f[C]=T[0]),f.removeListener!==void 0&&this.emit("removeListener",C,x||_)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var _,T,f;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[C]),this;if(arguments.length===0){var u=Object.keys(T),A;for(f=0;f=0;f--)this.removeListener(C,_[f]);return this};function c(M,C,_){var T=M._events;if(T===void 0)return[];var f=T[C];return f===void 0?[]:typeof f=="function"?_?[f.listener||f]:[f]:_?g(f):h(f,f.length)}e.prototype.listeners=function(C){return c(this,C,!0)},e.prototype.rawListeners=function(C){return c(this,C,!1)},e.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):m.call(M,C)},e.prototype.listenerCount=m;function m(M){var C=this._events;if(C!==void 0){var _=C[M];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function h(M,C){for(var _=new Array(C),T=0;T{},{passive:!0}),E},triggerHandler:function(E,k,l){var e,t=E._ev;if(!t)return;var n=t._events[k];if(!n)return;function r(o){if(o.listener){if(t.removeListener(k,o.listener),!o.fired)return o.fired=!0,o.listener.apply(t,[l])}else return o.apply(t,[l])}n=Array.isArray(n)?n:[n];var a;for(a=0;ab.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},k.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},k.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},k.undo=function(e){var t,n;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=P.length)return!1;if(I.dimensions===2){if(D++,O.length===D)return I;var j=O[D];if(!S(j))return!1;I=P[F][j]}else I=P[F]}else I=P}}return I}function S(I){return I===Math.round(I)&&I>=0}function M(I){var O,D;O=V.modules[I]._module,D=O.basePlotModule;var B={};B.type=null;var F=n({},b),P=n({},O.attributes);J.crawl(P,function($,Q,re,ne,se){o(F,se).set(void 0),$===void 0&&o(P,se).set(void 0)}),n(B,F),V.traceIs(I,"noOpacity")&&delete B.opacity,V.traceIs(I,"showLegend")||(delete B.showlegend,delete B.legendgroup),V.traceIs(I,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),O.selectPoints||delete B.selectedpoints,n(B,P),D.attributes&&n(B,D.attributes),B.type=I;var j={meta:O.meta||{},categories:O.categories||{},animatable:!!O.animatable,type:I,attributes:T(B)};if(O.layoutAttributes){var U={};n(U,O.layoutAttributes),j.layoutAttributes=T(U)}return O.animatable||J.crawl(j,function($){J.isValObject($)&&"anim"in $&&delete $.anim}),j}function C(){var I={},O,D;n(I,E);for(O in V.subplotsRegistry)if(D=V.subplotsRegistry[O],!!D.layoutAttributes)if(Array.isArray(D.attr))for(var B=0;B=r&&(n._input||{})._templateitemname;o&&(a=r);var s=t+"["+a+"]",c;function m(){c={},o&&(c[s]={},c[s][b]=o)}m();function h(w,S){c[w]=S}function v(w,S){o?V.nestedProperty(c[s],w).set(S):c[s+"."+w]=S}function g(){var w=c;return m(),w}function i(w,S){w&&v(w,S);var M=g();for(var C in M)V.nestedProperty(e,C).set(M[C])}return{modifyBase:h,modifyItem:v,getUpdateObj:g,applyUpdate:i}}}}),hc=ze({"src/plots/cartesian/constants.js"(J,V){"use strict";var p=(Vm(),Po(Ov)).counter;V.exports={idRegex:{x:p("x","( domain)?"),y:p("y","( domain)?")},attrRegex:p("[xy]axis"),xAxisMatch:p("xaxis"),yAxisMatch:p("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"}}}),Xl=ze({"src/plots/cartesian/axis_ids.js"(J){"use strict";var V=mi(),p=hc();J.id2name=function(k){if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))){var l=k.split(" ")[0].slice(1);return l==="1"&&(l=""),k.charAt(0)+"axis"+l}},J.name2id=function(k){if(k.match(p.AX_NAME_PATTERN)){var l=k.slice(5);return l==="1"&&(l=""),k.charAt(0)+l}},J.cleanId=function(k,l,e){var t=/( domain)$/.test(k);if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))&&!(l&&k.charAt(0)!==l)&&!(t&&!e)){var n=k.split(" ")[0].slice(1).replace(/^0+/,"");return n==="1"&&(n=""),k.charAt(0)+n+(t&&e?" domain":"")}},J.list=function(E,k,l){var e=E._fullLayout;if(!e)return[];var t=J.listIds(E,k),n=new Array(t.length),r;for(r=0;re?1:-1:+(E.slice(1)||1)-+(k.slice(1)||1)},J.ref2id=function(E){return/^[xyz]/.test(E)?E.split(" ")[0]:!1};function b(E,k){if(k&&k.length){for(var l=0;l0?".":"")+o;p.isPlainObject(s)?e(s,n,c,a+1):n(c,o,s)}})}}}),cl=ze({"src/plots/plots.js"(J,V){"use strict";var p=ci(),b=jm().timeFormatLocale,E=Cw().formatLocale,k=ao(),l=Lw(),e=ev().version,t=mi(),n=Wm(),r=hs(),a=Nr(),o=Qn(),s=No().BADNUM,c=Xl(),m=iv().clearOutline,h=Lx(),v=o1(),g=Hw(),i=zf().getModuleCalcData,w=a.relinkPrivateKeys,S=a._,M=V.exports={};a.extendFlat(M,t),M.attributes=ws(),M.attributes.type.values=M.allTypes,M.fontAttrs=Qs(),M.layoutAttributes=Gm();var C=NI();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(G){return G=a.getGraphDiv(G),new Promise(function(X){setTimeout(function(){G._fullLayout&&(t.getComponentMethod("annotations","draw")(G),t.getComponentMethod("legend","draw")(G),t.getComponentMethod("colorbar","draw")(G),X(M.previousPromises(G)))},300)})},M.resize=function(G){G=a.getGraphDiv(G);var X,K=new Promise(function(H,Y){(!G||a.isHidden(G))&&Y(new Error("Resize must be passed a displayed plot div element.")),G._redrawTimer&&clearTimeout(G._redrawTimer),G._resolveResize&&(X=G._resolveResize),G._resolveResize=H,G._redrawTimer=setTimeout(function(){if(!G.layout||G.layout.width&&G.layout.height||a.isHidden(G)){H(G);return}delete G.layout.width,delete G.layout.height;var q=G.changed;G.autoplay=!0,t.call("relayout",G,{autosize:!0}).then(function(){G.changed=q,G._resolveResize===H&&(delete G._resolveResize,H(G))})},100)});return X&&X(K),K},M.previousPromises=function(G){if((G._promises||[]).length)return Promise.all(G._promises).then(function(){G._promises=[]})},M.sendDataToCloud=function(G,X){G.emit("plotly_beforeexport");let K=new URL(X).origin;var H=M.graphJson(G,!1,"object");H.version=e;var Y=new URL(X);Y.searchParams.set("origin",window.location.origin);var q=window.open(Y.href,"_blank");if(!q){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),G.emit("plotly_exportfail");return}var Z=function(ee){ee.origin===K&&ee.data&&ee.data.type==="CHART_AUTH_SUCCESS"&&(q.postMessage({type:"chart",chart:H},K),window.removeEventListener("message",Z),G.emit("plotly_afterexport"))};return window.addEventListener("message",Z),!1};var _=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(G,X){var K=X&&X.skipUpdateCalc,H=G._fullLayout||{};if(H._skipDefaults){delete H._skipDefaults;return}var Y=G._fullLayout={},q=G.layout||{},Z=G._fullData||[],ee=G._fullData=[],ae=G.data||[],he=G.calcdata||[],xe=G._context||{},we;G._transitionData||M.createTransitionData(G),Y._dfltTitle={plot:S(G,"Click to enter Plot title"),subtitle:S(G,"Click to enter Plot subtitle"),x:S(G,"Click to enter X axis title"),y:S(G,"Click to enter Y axis title"),colorbar:S(G,"Click to enter Colorscale title"),annotation:S(G,"new text")},Y._traceWord=S(G,"trace");var Me=A(G,_);if(H._initialAutoSizeIsDone){var Se=H.width,Ie=H.height;M.supplyLayoutGlobalDefaults(q,Y,Me),q.width||(Y.width=Se),q.height||(Y.height=Ie),M.sanitizeMargins(Y)}else{M.supplyLayoutGlobalDefaults(q,Y,Me);var Ve=!q.width||!q.height,Ge=Y.autosize,ke=xe.autosizable,_e=Ve&&(Ge||ke);_e?M.plotAutoSize(G,q,Y):Ve&&M.sanitizeMargins(Y),!Ge&&Ve&&(q.width=Y.width,q.height=Y.height)}Y._d3locale=x(Me,Y.separators),Y._extraFormat=A(G,T),Y._initialAutoSizeIsDone=!0,Y._dataLength=ae.length,Y._modules=[],Y._visibleModules=[],Y._basePlotModules=[];var ce=Y._subplots=u(),ve=Y._splomAxes={x:{},y:{}},le=Y._splomSubplots={};Y._splomGridDflt={},Y._scatterStackOpts={},Y._firstScatter={},Y._alignmentOpts={},Y._colorAxes={},Y._requestRangeslider={},Y._traceUids=f(Z,ae),M.supplyDataDefaults(ae,ee,q,Y);var Ae=Object.keys(ve.x),Be=Object.keys(ve.y);if(Ae.length>1&&Be.length>1){for(t.getComponentMethod("grid","sizeDefaults")(q,Y),we=0;we15&&Be.length>15&&Y.shapes.length===0&&Y.images.length===0,M.linkSubplots(ee,Y,Z,H),M.cleanPlot(ee,Y,Z,H);var Tt=!!(H._has&&H._has("cartesian")),At=!!(Y._has&&Y._has("cartesian")),$t=Tt,rr=At;$t&&!rr?H._bgLayer.remove():rr&&!$t&&(Y._shouldCreateBgLayer=!0),H._zoomlayer&&!G._dragging&&m({_fullLayout:H}),z(ee,Y),w(Y,H),t.getComponentMethod("colorscale","crossTraceDefaults")(ee,Y),Y._preGUI||(Y._preGUI={}),Y._tracePreGUI||(Y._tracePreGUI={});var _r=Y._tracePreGUI,Xt={},or;for(or in _r)Xt[or]="old";for(we=0;we0){var xe=1-2*q;Z=Math.round(xe*Z),ee=Math.round(xe*ee)}}var we=M.layoutAttributes.width.min,Me=M.layoutAttributes.height.min;Z1,Ie=!K.height&&Math.abs(H.height-ee)>1;(Ie||Se)&&(Se&&(H.width=Z),Ie&&(H.height=ee)),X._initialAutoSize||(X._initialAutoSize={width:Z,height:ee}),M.sanitizeMargins(H)},M.supplyLayoutModuleDefaults=function(G,X,K,H){var Y=t.componentsRegistry,q=X._basePlotModules,Z,ee,ae,he=t.subplotsRegistry.cartesian;for(Z in Y)ae=Y[Z],ae.includeBasePlot&&ae.includeBasePlot(G,X);q.length||q.push(he),X._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(G,X),he.finalizeSubplots(G,X));for(var xe in X._subplots)X._subplots[xe].sort(a.subplotSort);for(ee=0;ee1&&(K.l/=Ge,K.r/=Ge)}if(Me){var ke=(K.t+K.b)/Me;ke>1&&(K.t/=ke,K.b/=ke)}var _e=K.xl!==void 0?K.xl:K.x,ce=K.xr!==void 0?K.xr:K.x,ve=K.yt!==void 0?K.yt:K.y,le=K.yb!==void 0?K.yb:K.y;Se[X]={l:{val:_e,size:K.l+Ve},r:{val:ce,size:K.r+Ve},b:{val:le,size:K.b+Ve},t:{val:ve,size:K.t+Ve}},Ie[X]=1}if(!H._replotting)return M.doAutoMargin(G)}};function P(G){if("_redrawFromAutoMarginCount"in G._fullLayout)return!1;var X=c.list(G,"",!0);for(var K in X)if(X[K].autoshift||X[K].shift)return!0;return!1}M.doAutoMargin=function(G){var X=G._fullLayout,K=X.width,H=X.height;X._size||(X._size={}),D(X);var Y=X._size,q=X.margin,Z={t:0,b:0,l:0,r:0},ee=a.extendFlat({},Y),ae=q.l,he=q.r,xe=q.t,we=q.b,Me=X._pushmargin,Se=X._pushmarginIds,Ie=X.minreducedwidth,Ve=X.minreducedheight;if(q.autoexpand!==!1){for(var Ge in Me)Se[Ge]||delete Me[Ge];var ke=G._fullLayout._reservedMargin;for(var _e in ke)for(var ce in ke[_e]){var ve=ke[_e][ce];Z[ce]=Math.max(Z[ce],ve)}Me.base={l:{val:0,size:ae},r:{val:1,size:he},t:{val:1,size:xe},b:{val:0,size:we}};for(var le in Z){var Ae=0;for(var Be in Me)Be!=="base"&&k(Me[Be][le].size)&&(Ae=Me[Be][le].size>Ae?Me[Be][le].size:Ae);var Xe=Math.max(0,q[le]-Ae);Z[le]=Math.max(0,Z[le]-Xe)}for(var Ye in Me){var yt=Me[Ye].l||{},gt=Me[Ye].b||{},Tt=yt.val,At=yt.size,$t=gt.val,rr=gt.size,_r=K-Z.r-Z.l,Xt=H-Z.t-Z.b;for(var or in Me){if(k(At)&&Me[or].r){var Ot=Me[or].r.val,vt=Me[or].r.size;if(Ot>Tt){var ht=(At*Ot+(vt-_r)*Tt)/(Ot-Tt),De=(vt*(1-Tt)+(At-_r)*(1-Ot))/(Ot-Tt);ht+De>ae+he&&(ae=ht,he=De)}}if(k(rr)&&Me[or].t){var Ne=Me[or].t.val,We=Me[or].t.size;if(Ne>$t){var Ke=(rr*Ne+(We-Xt)*$t)/(Ne-$t),Je=(We*(1-$t)+(rr-Xt)*(1-Ne))/(Ne-$t);Ke+Je>we+xe&&(we=Ke,xe=Je)}}}}}var et=a.constrain(K-q.l-q.r,B,Ie),Mt=a.constrain(H-q.t-q.b,F,Ve),pt=Math.max(0,K-et),Pt=Math.max(0,H-Mt);if(pt){var Ct=(ae+he)/pt;Ct>1&&(ae/=Ct,he/=Ct)}if(Pt){var qt=(we+xe)/Pt;qt>1&&(we/=qt,xe/=qt)}if(Y.l=Math.round(ae)+Z.l,Y.r=Math.round(he)+Z.r,Y.t=Math.round(xe)+Z.t,Y.b=Math.round(we)+Z.b,Y.p=Math.round(q.pad),Y.w=Math.round(K)-Y.l-Y.r,Y.h=Math.round(H)-Y.t-Y.b,!X._replotting&&(M.didMarginChange(ee,Y)||P(G))){"_redrawFromAutoMarginCount"in X?X._redrawFromAutoMarginCount++:X._redrawFromAutoMarginCount=1;var Vt=3*(1+Object.keys(Se).length);if(X._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(G,X=!1,K="json",H=!1,Y=!1){(H&&X&&!G._fullData||H&&!X&&!G._fullLayout)&&M.supplyDefaults(G);var q=H?G._fullData:G.data,Z=H?G._fullLayout:G.layout,ee=(G._transitionData||{})._frames;function ae(we,Me){if(typeof we=="function")return Me?"_function_":null;if(a.isPlainObject(we)){var Se={};return Object.keys(we).sort().forEach(function(ke){if(["_","["].indexOf(ke.charAt(0))===-1){if(typeof we[ke]=="function"){Me&&(Se[ke]="_function");return}Se[ke]=ae(we[ke],Me)}}),Se}var Ie=Array.isArray(we),Ve=a.isTypedArray(we);if((Ie||Ve)&&we.dtype&&we.shape){var Ge=we.bdata;return ae({dtype:we.dtype,shape:we.shape,bdata:a.isArrayBuffer(Ge)?l.encode(Ge):Ge},Me)}return Ie?we.map(function(ke){return ae(ke,Me)}):Ve?a.simpleMap(we,a.identity):a.isJSDate(we)?a.ms2DateTimeLocal(+we):we}var he={data:(q||[]).map(function(we){var Me=ae(we);return X&&delete Me.fit,Me})};if(!X&&(he.layout=ae(Z),H)){var xe=Z._size;he.layout.computed={margin:{b:xe.b,l:xe.l,r:xe.r,t:xe.t}}}return ee&&(he.frames=ae(ee)),Y&&(he.config=ae(G._context,!0)),K==="object"?he:JSON.stringify(he)},M.modifyFrames=function(G,X){var K,H,Y,q=G._transitionData._frames,Z=G._transitionData._frameHash;for(K=0;K0&&(G._transitioningWithDuration=!0),G._transitionData._interruptCallbacks.push(function(){H=!0}),K.redraw&&G._transitionData._interruptCallbacks.push(function(){return t.call("redraw",G)}),G._transitionData._interruptCallbacks.push(function(){G.emit("plotly_transitioninterrupted",[])});var Me=0,Se=0;function Ie(){return Me++,function(){Se++,!H&&Se===Me&&ee(we)}}K.runFn(Ie),setTimeout(Ie())})}function ee(we){if(G._transitionData)return q(G._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",G)}).then(function(){G._transitioning=!1,G._transitioningWithDuration=!1,G.emit("plotly_transitioned",[])}).then(we)}function ae(){if(G._transitionData)return G._transitioning=!1,Y(G._transitionData._interruptCallbacks)}var he=[M.previousPromises,ae,K.prepareFn,M.rehover,M.reselect,Z],xe=a.syncOrAsync(he,G);return(!xe||!xe.then)&&(xe=Promise.resolve()),xe.then(function(){return G})}M.doCalcdata=function(G,X){var K=c.list(G),H=G._fullData,Y=G._fullLayout,q,Z,ee,ae=new Array(H.length),he=(G.calcdata||[]).slice();for(G.calcdata=ae,Y._numBoxes=0,Y._numViolins=0,Y._violinScaleGroupStats={},G._hmpixcount=0,G._hmlumcount=0,Y._piecolormap={},Y._sunburstcolormap={},Y._treemapcolormap={},Y._iciclecolormap={},Y._funnelareacolormap={},ee=0;eeQ?Q.match(l):null;J.matchTex=e,J.convertToTspans=function(Q,re,ne){var se=Q.text(),G=!Q.attr("data-notex")&&re&&re._context.typesetMath&&e(se);G&&!m()&&(G=null);var X=V.select(Q.node().parentNode);if(X.empty())return;var K=Q.attr("class")?Q.attr("class").split(" ")[0]:"text";K+="-math",X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove(),Q.style("display",null).attr({"data-unformatted":se,"data-math":"N"});function H(){X.empty()||(K=Q.attr("class")+"-math",X.select("svg."+K).remove()),Q.text("").style("white-space","pre");var Y=P(Q.node(),se);Y&&Q.style("pointer-events","all"),J.positionText(Q),ne&&ne.call(Q)}return G?(re&&re._promises||[]).push(new Promise(function(Y){Q.style("display","none");var q=parseInt(Q.node().style.fontSize,10),Z={fontSize:q},ee=Q.attr("text-anchor");h(G[2],Z,function(ae,he,xe){X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove();var we=ae&&ae.select("svg");if(!we||!we.node()){H(),Y();return}Q.style("display","none");var Me=X.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":se,"data-math":"Y"});Me.node().appendChild(we.node()),he&&he.node()&&we.node().insertBefore(he.node().cloneNode(!0),we.node().firstChild);var Se=xe.width,Ie=xe.height;we.attr({class:K,height:Ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":Z.fontSize+"px"});var Ve=Q.node().style.fill||"black",Ge=we.select("g");Ge.attr({fill:Ve,stroke:Ve});var ke=Ge.node().getBoundingClientRect(),_e=ke.width,ce=ke.height;(_e>Se||ce>Ie)&&(we.style("overflow","hidden"),ke=we.node().getBoundingClientRect(),_e=ke.width,ce=ke.height);var ve=+Q.attr("x"),le=+Q.attr("y"),Ae=q||Q.node().getBoundingClientRect().height,Be=-Ae/4;K[0]==="y"?Me.attr({transform:"rotate("+[-90,ve,le]+")"+b(-_e/2,Be-ce/2)}):K[0]==="l"?le=Be-ce/2:K[0]==="a"&&K.indexOf("atitle")!==0?(ve=0,le=Be):(ve=ve-_e*(ee==="middle"?.5:ee==="end"?1:0),le=le+Be-ce/2),we.attr({x:ve,y:le}),ne&&ne.call(Q,Me),Y(Me)})})):H(),Q};var t=/(<|<|<)/g,n=/(>|>|>)/g;function r(Q){return Q.replace(t,"\\lt ").replace(n,"\\gt ")}var a=null,o=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,s=!1,c=!1;function m(){let Q=o();return Q===3||Q===4?!0:(Q===null?s||(s=!0,p.warn("MathJax is not loaded. Math equations will not be rendered.")):c||(c=!0,p.warn("Unsupported MathJax version:",MathJax.version)),!1)}function h(Q,re,ne){let se=o();var G;let X=function(){if(!a){let q=MathJax._.output.svg_ts.SVG,Z=p.extendFlat({},MathJax.config.svg,{fontCache:"local"});se===4&&(Z.linebreaks=p.extendFlat({},Z.linebreaks,{inline:!1})),a=MathJax._.mathjax.mathjax.document(document,p.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new q(Z)}))}let H="math-output-"+p.randstr({},64);G=V.select("body").append("div").attr({id:H}).style({visibility:"hidden",position:"absolute","font-size":re.fontSize+"px"});let Y=r(Q).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return a.convert(Y,{display:!1})}).then(function(q){G.node().appendChild(q)})},K=function(){let H=G.select(".MathJax"),Y=!H.empty()&&G.select("svg").node();if(!Y)p.log("There was an error in the tex syntax.",Q),ne();else{let q=Y.getBoundingClientRect(),Z=H.select("defs");ne(H,Z,q)}G.remove()};Promise.resolve().then(X).then(K).catch(H=>{p.log("MathJax typesetting failed.",Q,H),G&&G.remove(),ne()})}var v={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"},g={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},w="\u200B",S=["http:","https:","mailto:","",void 0,":"],M=J.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,T=//i;J.BR_TAG_ALL=//gi;var f=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,u=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,x=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function z(Q,re){if(!Q)return null;var ne=Q.match(re),se=ne&&(ne[3]||ne[4]);return se&&B(se)}var I=/(^|;)\s*color:/;J.plainText=function(Q,re){re=re||{};for(var ne=re.len!==void 0&&re.len!==-1?re.len:1/0,se=re.allowedTags!==void 0?re.allowedTags:["br"],G="...",X=G.length,K=Q.split(C),H=[],Y="",q=0,Z=0;ZX?H.push(ee.slice(0,Math.max(0,we-X))+G):H.push(ee.slice(0,we));break}Y=""}}return H.join("")};var O={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},D=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B(Q){return Q.replace(D,function(re,ne){var se;return ne.charAt(0)==="#"?se=F(ne.charAt(1)==="x"?parseInt(ne.slice(2),16):parseInt(ne.slice(1),10)):se=O[ne],se||re})}J.convertEntities=B;function F(Q){if(!(Q>1114111)){var re=String.fromCodePoint;if(re)return re(Q);var ne=String.fromCharCode;return Q<=65535?ne(Q):ne((Q>>10)+55232,Q%1024+56320)}}function P(Q,re){re=re.replace(M," ");var ne=!1,se=[],G,X=-1;function K(){X++;var _e=document.createElementNS(E.svg,"tspan");V.select(_e).attr({class:"line",dy:X*k+"em"}),Q.appendChild(_e),G=_e;var ce=se;if(se=[{node:_e}],ce.length>1)for(var ve=1;ve.",re);return}var ce=se.pop();_e!==ce.type&&p.log("Start tag <"+ce.type+"> doesnt match end tag <"+_e+">. Pretending it did match.",re),G=se[se.length-1].node}var Z=T.test(re);Z?K():(G=Q,se=[{node:Q}]);for(var ee=re.split(C),ae=0;ae=0;g--,i++){var w=m[g];v[i]=[1-w[0],w[1]]}return v}function s(m,h){h=h||{};for(var v=m.domain,g=m.range,i=g.length,w=new Array(i),S=0;Sv-m?m=v-(h-v):h-v=0?w=n.colorscale.sequential:w=n.colorscale.sequentialminus,s._sync("colorscale",w)}}}}),fl=ze({"src/components/colorscale/index.js"(J,V){"use strict";var p=Bv(),b=Bf();V.exports={moduleType:"component",name:"colorscale",attributes:qs(),layoutAttributes:Ww(),supplyLayoutDefaults:jI(),handleDefaults:qc(),crossTraceDefaults:UI(),calc:Qf(),scales:p.scales,defaultScale:p.defaultScale,getScale:p.get,isValidScale:p.isValid,hasColorscale:b.hasColorscale,extractOpts:b.extractOpts,extractScale:b.extractScale,flipScale:b.flipScale,makeColorScaleFunc:b.makeColorScaleFunc,makeColorScaleFuncFromTrace:b.makeColorScaleFuncFromTrace}}}),el=ze({"src/traces/scatter/subtypes.js"(J,V){"use strict";var p=Nr(),b=Ff().isTypedArraySpec;V.exports={hasLines:function(E){return E.visible&&E.mode&&E.mode.indexOf("lines")!==-1},hasMarkers:function(E){return E.visible&&(E.mode&&E.mode.indexOf("markers")!==-1||E.type==="splom")},hasText:function(E){return E.visible&&E.mode&&E.mode.indexOf("text")!==-1},isBubble:function(E){var k=E.marker;return p.isPlainObject(k)&&(p.isArrayOrTypedArray(k.size)||b(k.size))}}}}),l1=ze({"src/traces/scatter/make_bubble_size_func.js"(J,V){"use strict";var p=ao();V.exports=function(E,k){k||(k=2);var l=E.marker,e=l.sizeref||1,t=l.sizemin||0,n=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var a=n(r/k);return p(a)&&a>0?Math.max(a,t):0}}}}),kh=ze({"src/components/fx/helpers.js"(J){"use strict";var V=Nr();J.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},J.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var n=e.xaxes||[],r=e.yaxes||[],a=0;a=0&&n.index{let o=r.toLowerCase(),s=r,c=l(a);for(o==="m"&&c.length>2&&(t.push([s,...c.splice(0,2)]),o="l",s=s==="m"?"l":"L");;){if(c.length===p[o])return t.push([s,...c]),"";if(c.length0&&(ce=100,_e=_e.replace("-open","")),_e.indexOf("-dot")>0&&(ce+=200,_e=_e.replace("-dot","")),_e=g.symbolNames.indexOf(_e),_e>=0&&(_e+=ce)}return _e%100>=T||_e>=400?0:Math.floor(Math.max(_e,0))};function u(_e,ce,ve,le){var Ae=_e%100;return g.symbolFuncs[Ae](ce,ve,le)+(_e>=200?f:"")}var A=E("~f"),x={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}};g.gradient=function(_e,ce,ve,le,Ae,Be){var Xe=x[le];return z(_e,ce,ve,Xe.type,Ae,Be,Xe.start,Xe.stop,!1,Xe.reversed)};function z(_e,ce,ve,le,Ae,Be,Xe,Ye,yt,gt){var Tt=Ae.length,At;le==="linear"?At={node:"linearGradient",attrs:{x1:Xe.x,y1:Xe.y,x2:Ye.x,y2:Ye.y,gradientUnits:yt?"userSpaceOnUse":"objectBoundingBox"},reversed:gt}:le==="radial"&&(At={node:"radialGradient",reversed:gt});for(var $t=new Array(Tt),rr=0;rr=0&&_e.i===void 0&&(_e.i=Be.i),ce.style("opacity",le.selectedOpacityFn?le.selectedOpacityFn(_e):_e.mo===void 0?Xe.opacity:_e.mo),le.ms2mrc){var yt;_e.ms==="various"||Xe.size==="various"?yt=3:yt=le.ms2mrc(_e.ms),_e.mrc=yt,le.selectedSizeFn&&(yt=_e.mrc=le.selectedSizeFn(_e));var gt=g.symbolNumber(_e.mx||Xe.symbol)||0;_e.om=gt%200>=100;var Tt=ke(_e,ve),At=Z(_e,ve);ce.attr("d",u(gt,yt,Tt,At))}var $t=!1,rr,_r,Xt;if(_e.so)Xt=Ye.outlierwidth,_r=Ye.outliercolor,rr=Xe.outliercolor;else{var or=(Ye||{}).width;Xt=(_e.mlw+1||or+1||(_e.trace?(_e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in _e?_r=_e.mlcc=le.lineScale(_e.mlc):b.isArrayOrTypedArray(Ye.color)?_r=e.defaultLine:_r=Ye.color,b.isArrayOrTypedArray(Xe.color)&&(rr=e.defaultLine,$t=!0),"mc"in _e?rr=_e.mcc=le.markerScale(_e.mc):rr=Xe.color||Xe.colors||"rgba(0,0,0,0)",le.selectedColorFn&&(rr=le.selectedColorFn(_e))}let Ot=_e.mld||(Ye||{}).dash;if(Ot&&g.dashLine(ce,Ot,Xt),_e.om)ce.call(e.stroke,rr).style({"stroke-width":(Xt||1)+"px",fill:"none"});else{ce.style("stroke-width",(_e.isBlank?0:Xt)+"px");var vt=Xe.gradient,ht=_e.mgt;ht?$t=!0:ht=vt&&vt.type,b.isArrayOrTypedArray(ht)&&(ht=ht[0],x[ht]||(ht=0));var De=Xe.pattern,Ne=g.getPatternAttr,We=De&&(Ne(De.shape,_e.i,"")||Ne(De.path,_e.i,""));if(ht&&ht!=="none"){var Ke=_e.mgc;Ke?$t=!0:Ke=vt.color;var Je=ve.uid;$t&&(Je+="-"+_e.i),g.gradient(ce,Ae,Je,ht,[[0,Ke],[1,rr]],"fill")}else if(We){var et=!1,Mt=De.fgcolor;!Mt&&Be&&Be.color&&(Mt=Be.color,et=!0);var pt=Ne(Mt,_e.i,Be&&Be.color||null),Pt=Ne(De.bgcolor,_e.i,null),Ct=De.fgopacity,qt=Ne(De.size,_e.i,8),Vt=Ne(De.solidity,_e.i,.3);et=et||_e.mcc||b.isArrayOrTypedArray(De.shape)||b.isArrayOrTypedArray(De.path)||b.isArrayOrTypedArray(De.bgcolor)||b.isArrayOrTypedArray(De.fgcolor)||b.isArrayOrTypedArray(De.size)||b.isArrayOrTypedArray(De.solidity);var Ht=ve.uid;et&&(Ht+="-"+_e.i),g.pattern(ce,"point",Ae,Ht,We,qt,Vt,_e.mcc,De.fillmode,Pt,pt,Ct)}else b.isArrayOrTypedArray(rr)?e.fill(ce,rr[_e.i]):e.fill(ce,rr);Xt&&e.stroke(ce,_r)}},g.makePointStyleFns=function(_e){var ce={},ve=_e.marker;return ce.markerScale=g.tryColorscale(ve,""),ce.lineScale=g.tryColorscale(ve,"line"),l.traceIs(_e,"symbols")&&(ce.ms2mrc=m.isBubble(_e)?h(_e):function(){return(ve.size||6)/2}),_e.selectedpoints&&b.extendFlat(ce,g.makeSelectedPointStyleFns(_e)),ce},g.makeSelectedPointStyleFns=function(_e){var ce={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.marker||{},Be=ve.marker||{},Xe=le.marker||{},Ye=Ae.opacity,yt=Be.opacity,gt=Xe.opacity,Tt=yt!==void 0,At=gt!==void 0;(b.isArrayOrTypedArray(Ye)||Tt||At)&&(ce.selectedOpacityFn=function(De){var Ne=De.mo===void 0?Ae.opacity:De.mo;return De.selected?Tt?yt:Ne:At?gt:c*Ne});var $t=Ae.color,rr=Be.color,_r=Xe.color;(rr||_r)&&(ce.selectedColorFn=function(De){var Ne=De.mcc||$t;return De.selected?rr||Ne:_r||Ne});var Xt=Ae.size,or=Be.size,Ot=Xe.size,vt=or!==void 0,ht=Ot!==void 0;return l.traceIs(_e,"symbols")&&(vt||ht)&&(ce.selectedSizeFn=function(De){var Ne=De.mrc||Xt/2;return De.selected?vt?or/2:Ne:ht?Ot/2:Ne}),ce},g.makeSelectedTextStyleFns=function(_e){var ce={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.textfont||{},Be=ve.textfont||{},Xe=le.textfont||{},Ye=Ae.color,yt=Be.color,gt=Xe.color;return ce.selectedTextColorFn=function(Tt){var At=Tt.tc||Ye;return Tt.selected?yt||At:gt||(yt?At:e.addOpacity(At,c))},ce},g.selectedPointStyle=function(_e,ce){if(!(!_e.size()||!ce.selectedpoints)){var ve=g.makeSelectedPointStyleFns(ce),le=ce.marker||{},Ae=[];ve.selectedOpacityFn&&Ae.push(function(Be,Xe){Be.style("opacity",ve.selectedOpacityFn(Xe))}),ve.selectedColorFn&&Ae.push(function(Be,Xe){e.fill(Be,ve.selectedColorFn(Xe))}),ve.selectedSizeFn&&Ae.push(function(Be,Xe){var Ye=Xe.mx||le.symbol||0,yt=ve.selectedSizeFn(Xe);Be.attr("d",u(g.symbolNumber(Ye),yt,ke(Xe,ce),Z(Xe,ce))),Xe.mrc2=yt}),Ae.length&&_e.each(function(Be){for(var Xe=p.select(this),Ye=0;Ye0?ve:0}g.textPointStyle=function(_e,ce,ve){if(_e.size()){var le;if(ce.selectedpoints){var Ae=g.makeSelectedTextStyleFns(ce);le=Ae.selectedTextColorFn}var Be=ce.texttemplate,Xe=ve._fullLayout;_e.each(function(Ye){var yt=p.select(this),gt=Be?b.extractOption(Ye,ce,"txt","texttemplate"):b.extractOption(Ye,ce,"tx","text");if(!gt&>!==0){yt.remove();return}if(Be){var Tt=ce._module.formatLabels,At=Tt?Tt(Ye,ce,Xe):{},$t={};v($t,ce,Ye.i),gt=b.texttemplateString({data:[$t,Ye,ce._meta],fallback:ce.texttemplatefallback,labels:At,locale:Xe._d3locale,template:gt})}var rr=Ye.tp||ce.textposition,_r=D(Ye,ce),Xt=le?le(Ye):Ye.tc||ce.textfont.color;yt.call(g.font,{family:Ye.tf||ce.textfont.family,weight:Ye.tw||ce.textfont.weight,style:Ye.ty||ce.textfont.style,variant:Ye.tv||ce.textfont.variant,textcase:Ye.tC||ce.textfont.textcase,lineposition:Ye.tE||ce.textfont.lineposition,shadow:Ye.tS||ce.textfont.shadow,size:_r,color:Xt}).text(gt).call(r.convertToTspans,ve).call(O,rr,_r,Ye.mrc)})}},g.selectedTextStyle=function(_e,ce){if(!(!_e.size()||!ce.selectedpoints)){var ve=g.makeSelectedTextStyleFns(ce);_e.each(function(le){var Ae=p.select(this),Be=ve.selectedTextColorFn(le),Xe=le.tp||ce.textposition,Ye=D(le,ce);e.fill(Ae,Be);var yt=l.traceIs(ce,"bar-like");O(Ae,Xe,Ye,le.mrc2||le.mrc,yt)})}};var B=.5;g.smoothopen=function(_e,ce){if(_e.length<3)return"M"+_e.join("L");var ve="M"+_e[0],le=[],Ae;for(Ae=1;Ae<_e.length-1;Ae++)le.push(Q(_e[Ae-1],_e[Ae],_e[Ae+1],ce));for(ve+="Q"+le[0][0]+" "+_e[1],Ae=2;Ae<_e.length-1;Ae++)ve+="C"+le[Ae-2][1]+" "+le[Ae-1][0]+" "+_e[Ae];return ve+="Q"+le[_e.length-3][1]+" "+_e[_e.length-1],ve},g.smoothclosed=function(_e,ce){if(_e.length<3)return"M"+_e.join("L")+"Z";var ve="M"+_e[0],le=_e.length-1,Ae=[Q(_e[le],_e[0],_e[1],ce)],Be;for(Be=1;Be=yt||De>=Tt&&De<=yt)&&(Ne<=At&&Ne>=gt||Ne>=At&&Ne<=gt)&&(_e=[De,Ne])}return _e}g.applyBackoff=se,g.makeTester=function(){var _e=b.ensureSingleById(p.select("body"),"svg","js-plotly-tester",function(ve){ve.attr(a.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ce=b.ensureSingle(_e,"path","js-reference-point",function(ve){ve.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});g.tester=_e,g.testref=ce},g.savedBBoxes={};var G=0,X=1e4;g.bBox=function(_e,ce,ve){ve||(ve=K(_e));var le;if(ve){if(le=g.savedBBoxes[ve],le)return b.extendFlat({},le)}else if(_e.childNodes.length===1){var Ae=_e.childNodes[0];if(ve=K(Ae),ve){var Be=+Ae.getAttribute("x")||0,Xe=+Ae.getAttribute("y")||0,Ye=Ae.getAttribute("transform");if(!Ye){var yt=g.bBox(Ae,!1,ve);return Be&&(yt.left+=Be,yt.right+=Be),Xe&&(yt.top+=Xe,yt.bottom+=Xe),yt}if(ve+="~"+Be+"~"+Xe+"~"+Ye,le=g.savedBBoxes[ve],le)return b.extendFlat({},le)}}var gt,Tt;ce?gt=_e:(Tt=g.tester.node(),gt=_e.cloneNode(!0),Tt.appendChild(gt)),p.select(gt).attr("transform",null).call(r.positionText,0,0);var At=gt.getBoundingClientRect(),$t=g.testref.node().getBoundingClientRect();ce||Tt.removeChild(gt);var rr={height:At.height,width:At.width,left:At.left-$t.left,top:At.top-$t.top,right:At.right-$t.left,bottom:At.bottom-$t.top};return G>=X&&(g.savedBBoxes={},G=0),ve&&(g.savedBBoxes[ve]=rr),G++,b.extendFlat({},rr)};function K(_e){var ce=_e.getAttribute("data-unformatted");if(ce!==null)return ce+_e.getAttribute("data-math")+_e.getAttribute("text-anchor")+_e.getAttribute("style")}g.setClipUrl=function(_e,ce,ve){_e.attr("clip-path",H(ce,ve))};function H(_e,ce){if(!_e)return null;var ve=ce._context,le=ve._exportedPlot?"":ve._baseUrl||"";return le?"url('"+le+"#"+_e+"')":"url(#"+_e+")"}g.getTranslate=function(_e){var ce=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ce,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||0,y:+Ae[1]||0}},g.setTranslate=function(_e,ce,ve){var le=/(\btranslate\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ce=ce||0,ve=ve||0,Xe=Xe.replace(le,"").trim(),Xe+=n(ce,ve),Xe=Xe.trim(),_e[Be]("transform",Xe),Xe},g.getScale=function(_e){var ce=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ce,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||1,y:+Ae[1]||1}},g.setScale=function(_e,ce,ve){var le=/(\bscale\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ce=ce||1,ve=ve||1,Xe=Xe.replace(le,"").trim(),Xe+="scale("+ce+","+ve+")",Xe=Xe.trim(),_e[Be]("transform",Xe),Xe};var Y=/\s*sc.*/;g.setPointGroupScale=function(_e,ce,ve){if(ce=ce||1,ve=ve||1,!!_e){var le=ce===1&&ve===1?"":"scale("+ce+","+ve+")";_e.each(function(){var Ae=(this.getAttribute("transform")||"").replace(Y,"");Ae+=le,Ae=Ae.trim(),this.setAttribute("transform",Ae)})}};var q=/translate\([^)]*\)\s*$/;g.setTextPointsScale=function(_e,ce,ve){_e&&_e.each(function(){var le,Ae=p.select(this),Be=Ae.select("text");if(Be.node()){var Xe=parseFloat(Be.attr("x")||0),Ye=parseFloat(Be.attr("y")||0),yt=(Ae.attr("transform")||"").match(q);ce===1&&ve===1?le=[]:le=[n(Xe,Ye),"scale("+ce+","+ve+")",n(-Xe,-Ye)],yt&&le.push(yt),Ae.attr("transform",le.join(""))}})};function Z(_e,ce){var ve;return _e&&(ve=_e.mf),ve===void 0&&(ve=ce.marker&&ce.marker.standoff||0),!ce._geo&&!ce._xA?-ve:ve}g.getMarkerStandoff=Z;var ee=Math.atan2,ae=Math.cos,he=Math.sin;function xe(_e,ce){var ve=ce[0],le=ce[1];return[ve*ae(_e)-le*he(_e),ve*he(_e)+le*ae(_e)]}var we,Me,Se,Ie,Ve,Ge;function ke(_e,ce){var ve=_e.ma;ve===void 0&&(ve=ce.marker.angle,(!k(ve)||b.isArrayOrTypedArray(ve))&&(ve=0));var le,Ae,Be=ce.marker.angleref;if(Be==="previous"||Be==="north"){if(ce._geo){var Xe=ce._geo.project(_e.lonlat);le=Xe[0],Ae=Xe[1]}else{var Ye=ce._xA,yt=ce._yA;if(Ye&&yt)le=Ye.c2p(_e.x),Ae=yt.c2p(_e.y);else return 90}if(ce._geo){var gt=_e.lonlat[0],Tt=_e.lonlat[1],At=ce._geo.project([gt,Tt+1e-5]),$t=ce._geo.project([gt+1e-5,Tt]),rr=ee($t[1]-Ae,$t[0]-le),_r=ee(At[1]-Ae,At[0]-le),Xt;if(Be==="north")Xt=ve/180*Math.PI;else if(Be==="previous"){var or=gt/180*Math.PI,Ot=Tt/180*Math.PI,vt=we/180*Math.PI,ht=Me/180*Math.PI,De=vt-or,Ne=ae(ht)*he(De),We=he(ht)*ae(Ot)-ae(ht)*he(Ot)*ae(De);Xt=-ee(Ne,We)-Math.PI,we=gt,Me=Tt}var Ke=xe(rr,[ae(Xt),0]),Je=xe(_r,[he(Xt),0]);ve=ee(Ke[1]+Je[1],Ke[0]+Je[0])/Math.PI*180,Be==="previous"&&!(Ge===ce.uid&&_e.i===Ve+1)&&(ve=null)}if(Be==="previous"&&!ce._geo)if(Ge===ce.uid&&_e.i===Ve+1&&k(le)&&k(Ae)){var et=le-Se,Mt=Ae-Ie,pt=ce.line&&ce.line.shape||"",Pt=pt.slice(pt.length-1);Pt==="h"&&(Mt=0),Pt==="v"&&(et=0),ve+=ee(Mt,et)/Math.PI*180+90}else ve=null}return Se=le,Ie=Ae,Ve=_e.i,Ge=ce.uid,ve}g.getMarkerAngle=ke}}),qv=ze({"src/components/titles/index.js"(J,V){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=$i(),n=Qn(),r=Cs(),a=np(),o=dc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,m=1.6;function h(v,g,i){var w=v._fullLayout,S=i.propContainer,M=i.propName,C=i.placeholder,_=i.traceIndex,T=i.avoid||{},f=i.attributes,u=i.transform,A=i.containerGroup,x=1,z=S.title,I=(z&&z.text?z.text:"").trim(),O=!1,D=z&&z.font?z.font:{},B=D.family,F=D.size,P=D.color,j=D.weight,U=D.style,$=D.variant,Q=D.textcase,re=D.lineposition,ne=D.shadow,se=i.subtitlePropName,G=!!se,X=i.subtitlePlaceholder,K=(S.title||{}).subtitle||{text:"",font:{}},H=(K.text||"").trim(),Y=!1,q=1,Z=K.font,ee=Z.family,ae=Z.size,he=Z.color,xe=Z.weight,we=Z.style,Me=Z.variant,Se=Z.textcase,Ie=Z.lineposition,Ve=Z.shadow,Ge;M==="title.text"?Ge="titleText":M.indexOf("axis")!==-1?Ge="axisTitleText":M.indexOf("colorbar")!==-1&&(Ge="colorbarTitleText");var ke=v._context.edits[Ge];function _e(rr,_r){return rr===void 0||_r===void 0?!1:rr.replace(s," % ")===_r.replace(s," % ")}I===""?x=0:_e(I,C)&&(ke||(I=""),x=.2,O=!0),G&&(H===""?q=0:_e(H,X)&&(ke||(H=""),q=.2,Y=!0)),i._meta?I=l.templateString(I,i._meta):w._meta&&(I=l.templateString(I,w._meta));var ce=I||H||ke,ve;A||(A=l.ensureSingle(w._infolayer,"g","g-"+g),ve=w._hColorbarMoveTitle);var le=A.selectAll("text."+g).data(ce?[0]:[]);le.enter().append("text"),le.text(I).attr("class",g),le.exit().remove();var Ae=null,Be=g+"-subtitle",Xe=H||ke;if(G&&(Ae=A.selectAll("text."+Be).data(Xe?[0]:[]),Ae.enter().append("text"),Ae.text(H).attr("class",Be),Ae.exit().remove()),!ce)return A;function Ye(rr,_r){l.syncOrAsync([yt,gt],{title:rr,subtitle:_r})}function yt(rr){var _r=rr.title,Xt=rr.subtitle,or;!u&&ve&&(u={}),u?(or="",u.rotate&&(or+="rotate("+[u.rotate,f.x,f.y]+")"),(u.offset||ve)&&(or+=e(0,(u.offset||0)-(ve||0)))):or=null,_r.attr("transform",or);function Ot(Ke){if(Ke){var Je=p.select(Ke.node().parentNode).select("."+Be);if(!Je.empty()){var et=Ke.node().getBBox();if(et.height){var Mt=et.y+et.height+c*ae;Je.attr("y",Mt)}}}}if(_r.style("opacity",x*n.opacity(P)).call(t.font,{color:n.rgb(P),size:p.round(F,2),family:B,weight:j,style:U,variant:$,textcase:Q,shadow:ne,lineposition:re}).attr(f).call(r.convertToTspans,v,Ot),Xt&&!Xt.empty()){var vt=A.select("."+g+"-math-group"),ht=_r.node().getBBox(),De=vt.node()?vt.node().getBBox():void 0,Ne=De?De.y+De.height+c*ae:ht.y+ht.height+m*ae,We=l.extendFlat({},f,{y:Ne});Xt.attr("transform",or),Xt.style("opacity",q*n.opacity(he)).call(t.font,{color:n.rgb(he),size:p.round(ae,2),family:ee,weight:xe,style:we,variant:Me,textcase:Se,shadow:Ve,lineposition:Ie}).attr(We).call(r.convertToTspans,v)}return E.previousPromises(v)}function gt(rr){var _r=rr.title,Xt=p.select(_r.node().parentNode);if(T&&T.selection&&T.side&&I){Xt.attr("transform",null);var or=o[T.side],Ot=T.side==="left"||T.side==="top"?-1:1,vt=b(T.pad)?T.pad:2,ht=t.bBox(Xt.node()),De={t:0,b:0,l:0,r:0},Ne=v._fullLayout._reservedMargin;for(var We in Ne)for(var Ke in Ne[We]){var Je=Ne[We][Ke];De[Ke]=Math.max(De[Ke],Je)}var et={left:De.l,top:De.t,right:w.width-De.r,bottom:w.height-De.b},Mt=T.maxShift||Ot*(et[T.side]-ht[T.side]),pt=0;if(Mt<0)pt=Mt;else{var Pt=T.offsetLeft||0,Ct=T.offsetTop||0;ht.left-=Pt,ht.right-=Pt,ht.top-=Ct,ht.bottom-=Ct,T.selection.each(function(){var Vt=t.bBox(this);l.bBoxIntersect(ht,Vt,vt)&&(pt=Math.max(pt,Ot*(Vt[T.side]-ht[or])+vt))}),pt=Math.min(Mt,pt),S._titleScoot=Math.abs(pt)}if(pt>0||Mt<0){var qt={left:[-pt,0],right:[pt,0],top:[0,-pt],bottom:[0,pt]}[T.side];Xt.attr("transform",e(qt[0],qt[1]))}}}le.call(Ye,Ae);function Tt(rr,_r){rr.text(_r).on("mouseover.opacity",function(){p.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){p.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}if(ke&&(I?le.on(".opacity",null):(Tt(le,C),O=!0),le.call(r.makeEditable,{gd:v}).on("edit",function(rr){_!==void 0?k.call("_guiRestyle",v,M,rr,_):k.call("_guiRelayout",v,M,rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,f.x,f.y)}),G)){if(G&&!I){var At=le.node().getBBox(),$t=At.y+At.height+m*ae;Ae.attr("y",$t)}H?Ae.on(".opacity",null):(Tt(Ae,X),Y=!0),Ae.call(r.makeEditable,{gd:v}).on("edit",function(rr){k.call("_guiRelayout",v,"title.subtitle.text",rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,Ae.attr("x"),Ae.attr("y"))})}return le.classed("js-placeholder",O),Ae&&!Ae.empty()&&Ae.classed("js-placeholder",Y),A}V.exports={draw:h,SUBTITLE_PADDING_EM:m,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Dd=ze({"src/plots/cartesian/set_convert.js"(J,V){"use strict";var p=ci(),b=jm().utcFormat,E=Nr(),k=E.numberFormat,l=ao(),e=E.cleanNumber,t=E.ms2DateTime,n=E.dateTime2ms,r=E.ensureNumber,a=E.isArrayOrTypedArray,o=No(),s=o.FP_SAFE,c=o.BADNUM,m=o.LOG_CLIP,h=o.ONEWEEK,v=o.ONEDAY,g=o.ONEHOUR,i=o.ONEMIN,w=o.ONESEC,S=Xl(),M=hc(),C=M.HOUR_PATTERN,_=M.WEEKDAY_PATTERN;function T(u){return Math.pow(10,u)}function f(u){return u!=null}V.exports=function(A,x){x=x||{};var z=A._id||"x",I=z.charAt(0);function O(H,Y){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&Y&&A.range&&A.range.length===2){var q=A.range[0],Z=A.range[1];return .5*(q+Z-2*m*Math.abs(q-Z))}else return c}function D(H,Y,q,Z){if((Z||{}).msUTC&&l(H))return+H;var ee=n(H,q||A.calendar);if(ee===c)if(l(H)){H=+H;var ae=Math.floor(E.mod(H+.05,1)*10),he=Math.round(H-ae/10);ee=n(new Date(he))+ae/10}else return c;return ee}function B(H,Y,q){return t(H,Y,q||A.calendar)}function F(H){return A._categories[Math.round(H)]}function P(H){if(f(H)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[H]!==void 0)return A._categoriesMap[H];A._categories.push(typeof H=="number"?String(H):H);var Y=A._categories.length-1;return A._categoriesMap[H]=Y,Y}return c}function j(H,Y){for(var q=new Array(Y),Z=0;ZA.range[1]&&(q=!q);for(var Z=q?-1:1,ee=Z*H,ae=0,he=0;hewe)ae=he+1;else{ae=ee<(xe+we)/2?he:he+1;break}}var Me=A._B[ae]||0;return isFinite(Me)?re(H,A._m2,Me):0},G=function(H){var Y=A._rangebreaks.length;if(!Y)return ne(H,A._m,A._b);for(var q=0,Z=0;ZA._rangebreaks[Z].pmax&&(q=Z+1);return ne(H,A._m2,A._B[q])}}A.c2l=A.type==="log"?O:r,A.l2c=A.type==="log"?T:r,A.l2p=se,A.p2l=G,A.c2p=A.type==="log"?function(H,Y){return se(O(H,Y))}:se,A.p2c=A.type==="log"?function(H){return T(G(H))}:G,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=e,A.c2d=A.c2r=A.l2d=A.l2r=r,A.d2p=A.r2p=function(H){return A.l2p(e(H))},A.p2d=A.p2r=G,A.cleanPos=r):A.type==="log"?(A.d2r=A.d2l=function(H,Y){return O(e(H),Y)},A.r2d=A.r2c=function(H){return T(e(H))},A.d2c=A.r2l=e,A.c2d=A.l2r=r,A.c2r=O,A.l2d=T,A.d2p=function(H,Y){return A.l2p(A.d2r(H,Y))},A.p2d=function(H){return T(G(H))},A.r2p=function(H){return A.l2p(e(H))},A.p2r=G,A.cleanPos=r):A.type==="date"?(A.d2r=A.r2d=E.identity,A.d2c=A.r2c=A.d2l=A.r2l=D,A.c2d=A.c2r=A.l2d=A.l2r=B,A.d2p=A.r2p=function(H,Y,q){return A.l2p(D(H,0,q))},A.p2d=A.p2r=function(H,Y,q){return B(G(H),Y,q)},A.cleanPos=function(H){return E.cleanDate(H,c,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=P,A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var Y=Q(H);return Y!==void 0?Y:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=Q,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(G(H))},A.r2p=A.d2p,A.p2r=G,A.cleanPos=function(H){return typeof H=="string"&&H!==""?H:r(H)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var Y=$(H);return Y!==void 0?Y:A.fraction2r(.5)},A.r2c_just_indices=U,A.l2r=A.c2r=r,A.r2l=$,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(G(H))},A.r2p=A.d2p,A.p2r=G,A.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:r(H)},A.setupMultiCategory=function(H){var Y=A._traceIndices,q,Z,ee=A._matchGroup;if(ee&&A._categories.length===0){for(var ae in ee)if(ae!==z){var he=x[S.id2name(ae)];Y=Y.concat(he._traceIndices)}}var xe=[[0,{}],[0,{}]],we=[];for(q=0;qhe[1]&&(Z[ae?0:1]=q,ee[1]=he[1]),ee[0]>=ee[1])if(Y!==void 0){var xe=he[0]+1;q!==void 0&&(xe=Math.min(xe,he[1])),Z[ae?0:1]=A.l2r(xe)}else q!==void 0&&(Z[ae?1:0]=A.l2r(he[1]-1))}},A.cleanRange=function(H,Y){A._cleanRange(H,Y),A.limitRange(H)},A._cleanRange=function(H,Y){Y||(Y={}),H||(H="range");var q=E.nestedProperty(A,H).get(),Z,ee;if(A.type==="date"?ee=E.dfltRange(A.calendar):I==="y"?ee=M.DFLTRANGEY:A._name==="realaxis"?ee=[0,1]:ee=Y.dfltRange||M.DFLTRANGEX,ee=ee.slice(),(A.rangemode==="tozero"||A.rangemode==="nonnegative")&&(ee[0]=0),!q||q.length!==2){E.nestedProperty(A,H).set(ee);return}var ae=q[0]===null,he=q[1]===null;for(A.type==="date"&&!A.autorange&&(q[0]=E.cleanDate(q[0],c,A.calendar),q[1]=E.cleanDate(q[1],c,A.calendar)),Z=0;Z<2;Z++)if(A.type==="date"){if(!E.isDateTime(q[Z],A.calendar)){A[H]=ee;break}if(A.r2l(q[0])===A.r2l(q[1])){var xe=E.constrain(A.r2l(q[0]),E.MIN_MS+1e3,E.MAX_MS-1e3);q[0]=A.l2r(xe-1e3),q[1]=A.l2r(xe+1e3);break}}else{if(!l(q[Z]))if(!(ae||he)&&l(q[1-Z]))q[Z]=q[1-Z]*(Z?10:.1);else{A[H]=ee;break}if(q[Z]<-s?q[Z]=-s:q[Z]>s&&(q[Z]=s),q[0]===q[1]){var we=Math.max(1,Math.abs(q[0]*1e-6));q[0]-=we,q[1]+=we}}},A.setScale=function(H){var Y=x._size;if(A.overlaying){var q=S.getFromId({_fullLayout:x},A.overlaying);A.domain=q.domain}var Z=H&&A._r?"_r":"range",ee=A.calendar;A.cleanRange(Z);var ae=A.r2l(A[Z][0],ee),he=A.r2l(A[Z][1],ee),xe=I==="y";if(xe?(A._offset=Y.t+(1-A.domain[1])*Y.h,A._length=Y.h*(A.domain[1]-A.domain[0]),A._m=A._length/(ae-he),A._b=-A._m*he):(A._offset=Y.l+A.domain[0]*Y.w,A._length=Y.w*(A.domain[1]-A.domain[0]),A._m=A._length/(he-ae),A._b=-A._m*ae),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks){var we,Me;if(A._rangebreaks=A.locateBreaks(Math.min(ae,he),Math.max(ae,he)),A._rangebreaks.length){for(we=0;wehe&&(Se=!Se),Se&&A._rangebreaks.reverse();var Ie=Se?-1:1;for(A._m2=Ie*A._length/(Math.abs(he-ae)-A._lBreaks),A._B.push(-A._m2*(xe?he:ae)),we=0;weee&&(ee+=7,aeee&&(ee+=24,ae=Z&&ae=Z&&H=Ye.min&&(leYe.max&&(Ye.max=Ae),Be=!1)}Be&&he.push({min:le,max:Ae})}};for(q=0;qw*2}function o(m){return Math.max(1,(m-1)/1e3)}function s(m,h){for(var v=m.length,g=o(v),i=0,w=0,S={},M=0;Mi*2}function c(m){return k(m[0])&&k(m[1])}}}),md=ze({"src/plots/cartesian/autorange.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=No().FP_SAFE,l=mi(),e=$i(),t=Xl(),n=t.getFromId,r=t.isLinked;V.exports={applyAutorangeOptions:A,getAutoRange:a,makePadFn:s,doAutoRange:v,findExtremes:g,concatExtremes:h};function a(x,z){var I,O,D=[],B=x._fullLayout,F=s(B,z,0),P=s(B,z,1),j=h(x,z),U=j.min,$=j.max;if(U.length===0||$.length===0)return E.simpleMap(z.range,z.r2l);var Q=U[0].val,re=$[0].val;for(I=1;I0&&(we=Y-F(ee)-P(ae),we>q?Me/we>Z&&(he=ee,xe=ae,Z=Me/we):Me/Y>Z&&(he={val:ee.val,nopad:1},xe={val:ae.val,nopad:1},Z=Me/Y));function Se(_e,ce){return Math.max(_e,P(ce))}if(Q===re){var Ie=Q-1,Ve=Q+1;if(K)if(Q===0)D=[0,1];else{var Ge=(Q>0?$:U).reduce(Se,0),ke=Q/(1-Math.min(.5,Ge/Y));D=Q>0?[0,ke]:[ke,0]}else H?D=[Math.max(0,Ie),Math.max(1,Ve)]:D=[Ie,Ve]}else K?(he.val>=0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:0,nopad:1})):H&&(he.val-Z*F(he)<0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:1,nopad:1})),Z=(xe.val-he.val-o(z,ee.val,ae.val))/(Y-F(he)-P(xe)),D=[he.val-Z*F(he),xe.val+Z*P(xe)];return D=A(D,z),z.limitRange&&z.limitRange(),se&&D.reverse(),E.simpleMap(D,z.l2r||Number)}function o(x,z,I){var O=0;if(x.rangebreaks)for(var D=x.locateBreaks(z,I),B=0;B0?I.ppadplus:I.ppadminus)||I.ppad||0),ee=q((x._m>0?I.ppadminus:I.ppadplus)||I.ppad||0),ae=q(I.vpadplus||I.vpad),he=q(I.vpadminus||I.vpad);if(!U){if(H=1/0,Y=-1/0,j)for(Q=0;Q0&&(H=re),re>Y&&re-k&&(H=re),re>Y&&re=Me;Q--)we(Q);return{min:O,max:D,opts:I}}function i(x,z,I,O){S(x,z,I,O,C)}function w(x,z,I,O){S(x,z,I,O,_)}function S(x,z,I,O,D){for(var B=O.tozero,F=O.extrapad,P=!0,j=0;j=I&&(U.extrapad||!F)){P=!1;break}else D(z,U.val)&&U.pad<=I&&(F||!U.extrapad)&&(x.splice(j,1),j--)}if(P){var $=B&&z===0;x.push({val:z,pad:$?0:I,extrapad:$?!1:F})}}function M(x){return b(x)&&Math.abs(x)=z}function T(x,z){var I=z.autorangeoptions;return I&&I.minallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.minallowed:I&&I.clipmin!==void 0&&u(z,I.clipmin,I.clipmax)?Math.max(x,z.d2l(I.clipmin)):x}function f(x,z){var I=z.autorangeoptions;return I&&I.maxallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.maxallowed:I&&I.clipmax!==void 0&&u(z,I.clipmin,I.clipmax)?Math.min(x,z.d2l(I.clipmax)):x}function u(x,z,I){return z!==void 0&&I!==void 0?(z=x.d2l(z),I=x.d2l(I),z=j&&(B=j,I=j),F<=j&&(F=j,O=j)}}return I=T(I,z),O=f(O,z),[I,O]}}}),Gi=ze({"src/plots/cartesian/axes.js"(J,V){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=Cs(),n=qv(),r=Qn(),a=$i(),o=cf(),s=Xw(),c=hc(),m=No(),h=m.ONEMAXYEAR,v=m.ONEAVGYEAR,g=m.ONEMINYEAR,i=m.ONEMAXQUARTER,w=m.ONEAVGQUARTER,S=m.ONEMINQUARTER,M=m.ONEMAXMONTH,C=m.ONEAVGMONTH,_=m.ONEMINMONTH,T=m.ONEWEEK,f=m.ONEDAY,u=f/2,A=m.ONEHOUR,x=m.ONEMIN,z=m.ONESEC,I=m.ONEMILLI,O=m.ONEMICROSEC,D=m.MINUS_SIGN,B=m.BADNUM,F={K:"zeroline"},P={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},U={K:"tick",L:"path"},$={K:"tick",L:"text"},Q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},re=dc(),ne=re.MID_SHIFT,se=re.CAP_SHIFT,G=re.LINE_SPACING,X=re.OPPOSITE_SIDE,K=3,H=V.exports={};H.setConvert=Dd();var Y=Xm(),q=Xl(),Z=q.idSort,ee=q.isLinked;H.id2name=q.id2name,H.name2id=q.name2id,H.cleanId=q.cleanId,H.list=q.list,H.listIds=q.listIds,H.getFromId=q.getFromId,H.getFromTrace=q.getFromTrace;var ae=md();H.getAutoRange=ae.getAutoRange,H.findExtremes=ae.findExtremes;var he=1e-4;function xe(lt){var rt=(lt[1]-lt[0])*he;return[lt[0]-rt,lt[1]+rt]}function we(lt,rt,fr){if(![fr,lt,rt].every(b)||fr===0)return lt;let lr=Math.round((lt-rt)/fr),Tr=rt+lr*fr;return lt!==Tr&&Math.abs(lt-Tr)xr+" domain")),kt=kt.concat(Ir||[]),ar.length>Dr?(l.warn("Array attribute "+jt+" has more entries than expected, truncating to "+Dr),ar=ar.slice(0,Dr)):ar.length2e-6||((fr-lt._forceTick0)/lt._minDtick%1+1.000001)%1>2e-6)&&(lt._minDtick=0))},H.saveRangeInitial=function(lt,rt){for(var fr=H.list(lt,"",!0),lr=!1,Tr=0;TrEr*.3||jt(lr)||jt(Tr))){var xr=fr.dtick/2;lt+=lt+xrDr){var ot=Number(fr.slice(1));Ir.exactYears>Dr&&ot%12===0?lt=H.tickIncrement(lt,"M6","reverse")+f*1.5:Ir.exactMonths>Dr?lt=H.tickIncrement(lt,"M1","reverse")+f*15.5:lt-=u;var kt=H.tickIncrement(lt,fr);if(kt<=lr)return kt}return lt}H.prepMinorTicks=function(lt,rt,fr){var lr,Tr;if(!((lr=rt.minor)!=null&&lr.dtick)){delete lt.dtick;var Ir=rt.dtick&&b(rt._tmin),Dr;if(Ir){var ot=H.tickIncrement(rt._tmin,rt.dtick,!0);Dr=[rt._tmin,ot*.99+rt._tmin*.01]}else{var kt=l.simpleMap(rt.range,rt.r2l);Dr=[kt[0],.8*kt[0]+.2*kt[1]]}if(lt.range=l.simpleMap(Dr,rt.l2r),lt._isMinor=!0,H.prepTicks(lt,fr),Ir){var jt=b(rt.dtick),ar=b(lt.dtick),Er=jt?rt.dtick:+rt.dtick.substring(1),xr=ar?lt.dtick:+lt.dtick.substring(1);jt&&ar?ke(Er,xr)?Er===2*T&&xr===2*f&&(lt.dtick=T):Er===2*T&&xr===3*f?lt.dtick=T:Er===T&&!(rt._input.minor||{}).nticks?lt.dtick=f:_e(Er/xr,2.5)?lt.dtick=Er/2:lt.dtick=Er:String(rt.dtick).charAt(0)==="M"?ar?lt.dtick="M1":ke(Er,xr)?Er>=12&&xr===2&&(lt.dtick="M3"):lt.dtick=rt.dtick:String(lt.dtick).charAt(0)==="L"?String(rt.dtick).charAt(0)==="L"?ke(Er,xr)||(lt.dtick=_e(Er/xr,2.5)?rt.dtick/2:rt.dtick):lt.dtick="D1":lt.dtick==="D2"&&+rt.dtick>1&&(lt.dtick=1)}lt.range=rt.range}((Tr=rt.minor)==null?void 0:Tr._tick0Init)===void 0&&(lt.tick0=rt.tick0)};function ke(lt,rt){return Math.abs((lt/rt+.5)%1-.5)<.001}function _e(lt,rt){return Math.abs(lt/rt-1)<.001}H.prepTicks=function(lt,rt){var fr=l.simpleMap(lt.range,lt.r2l,void 0,void 0,rt);if(lt.tickmode==="auto"||!lt.dtick){var lr=lt.nticks,Tr;lr||(lt.type==="category"||lt.type==="multicategory"?(Tr=lt.tickfont?l.bigFont(lt.tickfont.size||12):15,lr=lt._length/Tr):(Tr=lt._id.charAt(0)==="y"?40:80,lr=l.constrain(lt._length/Tr,4,9)+1),lt._name==="radialaxis"&&(lr*=2)),lt.minor&<.minor.tickmode!=="array"||lt.tickmode==="array"&&(lr*=100),lt._roughDTick=Math.abs(fr[1]-fr[0])/lr,H.autoTicks(lt,lt._roughDTick),lt._minDtick>0&<.dtick0?(Ir=lr-1,Dr=lr):(Ir=lr,Dr=lr);var ot=lt[Ir].value,kt=lt[Dr].value,jt=Math.abs(kt-ot),ar=fr||jt,Er=0;ar>=g?jt>=g&&jt<=h?Er=jt:Er=v:fr===w&&ar>=S?jt>=S&&jt<=i?Er=jt:Er=w:ar>=_?jt>=_&&jt<=M?Er=jt:Er=C:fr===T&&ar>=T?Er=T:ar>=f?Er=f:fr===u&&ar>=u?Er=u:fr===A&&ar>=A&&(Er=A);var xr;Er>=jt&&(Er=jt,xr=!0);var zr=Tr+Er;if(rt.rangebreaks&&Er>0){for(var Lr=84,aa=0,Sa=0;SaT&&(Er=jt)}(Er>0||lr===0)&&(lt[lr].periodX=Tr+Er/2)}}H.calcTicks=function(rt,fr){for(var lr=rt.type,Tr=rt.calendar,Ir=rt.ticklabelstep,Dr=rt.ticklabelmode==="period",ot=rt.range[0]>rt.range[1],kt=!rt.ticklabelindex||l.isArrayOrTypedArray(rt.ticklabelindex)?rt.ticklabelindex:[rt.ticklabelindex],jt=l.simpleMap(rt.range,rt.r2l,void 0,void 0,fr),ar=jt[1]=(ai?0:1);rn--){var Ri=!rn;rn?(rt._dtickInit=rt.dtick,rt._tick0Init=rt.tick0):ai&&(rt.minor._dtickInit=rt.minor.dtick,rt.minor._tick0Init=rt.minor.tick0);var Gn=rn?rt:l.extendFlat({},rt,ai?rt.minor:{minor:{}});if(Ri?H.prepMinorTicks(Gn,rt,fr):H.prepTicks(Gn,fr),Gn.tickmode==="array"){rn?(Sa=[],Lr=Xe(rt,!Ri)):(wa=[],aa=Xe(rt,!Ri));continue}if(Gn.tickmode==="sync"){Sa=[],Lr=Be(rt);continue}var no=xe(jt),Di=no[0],fn=no[1],Ai=b(Gn.dtick),jn=lr==="log"&&!(Ai||Gn.dtick.charAt(0)==="L"),Xn=H.tickFirst(Gn,fr);if(rn){if(rt._tmin=Xn,Xn=fn:gi<=fn;gi=H.tickIncrement(gi,oo,ar,Tr)){if(rn&&qi++,Gn.rangebreaks&&!ar){if(gi=xr)break}if(Sa.length>zr||gi===eo)break;eo=gi;var qn={value:we(gi,Vn,oo)};rn?(gi===Xn&&(qn.first=!0),jn&&gi!==(gi|0)&&(qn.simpleLabel=!0),Ir>1&&qi%Ir&&(qn.skipLabel=!0),Sa.push(qn)):(qn.minor=!0,wa.push(qn))}}if(!wa||wa.length<3)kt=!1;else{var Hi=(wa[2].value-wa[1].value)*(ot?-1:1);Oa(Hi,rt.tickformat)||(kt=!1,wa=wa.slice(1))}if(!kt)pn=Sa;else{var Mi=Sa.concat(wa);Dr&&Sa.length&&(Mi=Mi.slice(1)),Mi=Mi.sort(function(Bo,_o){return Bo.value-_o.value}).filter(function(Bo,_o,Pi){return _o===0||Bo.value!==Pi[_o-1].value});var Ro=Mi.map(function(Bo,_o){return Bo.minor===void 0&&!Bo.skipLabel?_o:null}).filter(function(Bo){return Bo!==null});Ro.forEach(function(Bo){kt.map(function(_o){var Pi=Bo+_o;Pi>=0&&Pi-1;pi--){if(Sa[pi].drop){Sa.splice(pi,1);continue}Sa[pi].value=on(Sa[pi].value,rt);var Ko=rt.c2p(Sa[pi].value);(Vi?Xi>Ko-Io:Xixr||yoxr&&(Pi.periodX=xr),yoTr&&LrTr&&Sav)rt/=v,lr=Tr(10),lt.dtick="M"+12*_r(rt,lr,Ye);else if(Ir>C)rt/=C,lt.dtick="M"+_r(rt,1,yt);else if(Ir>f){if(lt.dtick=_r(rt,f,lt._hasDayOfWeekBreaks?[1,2,7,14]:Tt),!fr){var Dr=H.getTickFormat(lt),ot=lt.ticklabelmode==="period";ot&&(lt._rawTick0=lt.tick0),/%[uVW]/.test(Dr)?lt.tick0=l.dateTick0(lt.calendar,2):lt.tick0=l.dateTick0(lt.calendar,1),ot&&(lt._dowTick0=lt.tick0)}}else Ir>A?lt.dtick=_r(rt,A,yt):Ir>x?lt.dtick=_r(rt,x,gt):Ir>z?lt.dtick=_r(rt,z,gt):(lr=Tr(10),lt.dtick=_r(rt,lr,Ye))}else if(lt.type==="log"){lt.tick0=0;var kt=l.simpleMap(lt.range,lt.r2l);if(lt._isMinor&&(rt*=1.5),rt>.7)lt.dtick=Math.ceil(rt);else if(Math.abs(kt[1]-kt[0])<1){var jt=1.5*Math.abs((kt[1]-kt[0])/rt);rt=Math.abs(Math.pow(10,kt[1])-Math.pow(10,kt[0]))/jt,lr=Tr(10),lt.dtick="L"+_r(rt,lr,Ye)}else lt.dtick=rt>.3?"D2":"D1"}else lt.type==="category"||lt.type==="multicategory"?(lt.tick0=0,lt.dtick=Math.ceil(Math.max(rt,1))):Yn(lt)?(lt.tick0=0,lr=1,lt.dtick=_r(rt,lr,rr)):(lt.tick0=0,lr=Tr(10),lt.dtick=_r(rt,lr,Ye));if(lt.dtick===0&&(lt.dtick=1),!b(lt.dtick)&&typeof lt.dtick!="string"){var ar=lt.dtick;throw lt.dtick=1,"ax.dtick error: "+String(ar)}};function Xt(lt){var rt=lt.dtick;if(lt._tickexponent=0,!b(rt)&&typeof rt!="string"&&(rt=1),(lt.type==="category"||lt.type==="multicategory")&&(lt._tickround=null),lt.type==="date"){var fr=lt.r2l(lt.tick0),lr=lt.l2r(fr).replace(/(^-|i)/g,""),Tr=lr.length;if(String(rt).charAt(0)==="M")Tr>10||lr.slice(5)!=="01-01"?lt._tickround="d":lt._tickround=+rt.slice(1)%12===0?"y":"m";else if(rt>=f&&Tr<=10||rt>=f*15)lt._tickround="d";else if(rt>=x&&Tr<=16||rt>=A)lt._tickround="M";else if(rt>=z&&Tr<=19||rt>=x)lt._tickround="S";else{var Ir=lt.l2r(fr+rt).replace(/^-/,"").length;lt._tickround=Math.max(Tr,Ir)-20,lt._tickround<0&&(lt._tickround=4)}}else if(b(rt)||rt.charAt(0)==="L"){var Dr=lt.range.map(lt.r2d||Number);b(rt)||(rt=Number(rt.slice(1))),lt._tickround=2-Math.floor(Math.log(rt)/Math.LN10+.01);var ot=Math.max(Math.abs(Dr[0]),Math.abs(Dr[1])),kt=Math.floor(Math.log(ot)/Math.LN10+.01),jt=lt.minexponent===void 0?3:lt.minexponent;Math.abs(kt)>jt&&(Mt(lt.exponentformat)&<.exponentformat!=="SI extended"&&!pt(kt)||Mt(lt.exponentformat)&<.exponentformat==="SI extended"&&!Pt(kt)?lt._tickexponent=3*Math.round((kt-1)/3):lt._tickexponent=kt)}else lt._tickround=null}H.tickIncrement=function(lt,rt,fr,lr){var Tr=fr?-1:1;if(b(rt))return l.increment(lt,Tr*rt);var Ir=rt.charAt(0),Dr=Tr*Number(rt.slice(1));if(Ir==="M")return l.incrementMonth(lt,Dr,lr);if(Ir==="L")return Math.log(Math.pow(10,lt)+Dr)/Math.LN10;if(Ir==="D"){var ot=rt==="D2"?$t:At,kt=lt+Tr*.01,jt=l.roundUp(l.mod(kt,1),ot,fr);return Math.floor(kt)+Math.log(p.round(Math.pow(10,jt),1))/Math.LN10}throw"unrecognized dtick "+String(rt)},H.tickFirst=function(lt,rt){var fr=lt.r2l||Number,lr=l.simpleMap(lt.range,fr,void 0,void 0,rt),Tr=lr[1]=0&&ai<=lt._length?tn:null};if(kt&&l.isArrayOrTypedArray(lt.ticktext)){var Lr=l.simpleMap(lt.range,lt.r2l),aa=(Math.abs(Lr[1]-Lr[0])-(lt._lBreaks||0))/1e4;for(xr=0;xr"+ot;else{var jt=en(lt),ar=lt._trueSide||lt.side;(!jt&&ar==="top"||jt&&ar==="bottom")&&(Dr+="
")}rt.text=Dr}function vt(lt,rt,fr,lr,Tr){var Ir=lt.dtick,Dr=rt.x,ot=lt.tickformat,kt=typeof Ir=="string"&&Ir.charAt(0);if(Tr==="never"&&(Tr=""),lr&&kt!=="L"&&(Ir="L3",kt="L"),ot||kt==="L")rt.text=qt(Math.pow(10,Dr),lt,Tr,lr);else if(b(Ir)||kt==="D"&&(lt.minorloglabels==="complete"||l.mod(Dr+.01,1)<.1)){var jt;lt.minorloglabels==="complete"&&!(l.mod(Dr+.01,1)<.1)&&(jt=!0,rt.fontSize*=.75);var ar=Math.pow(10,Dr).toExponential(0),Er=ar.split("e"),xr=+Er[1],zr=Math.abs(xr),Lr=lt.exponentformat;Lr==="power"||Mt(Lr)&&Lr!=="SI extended"&&pt(xr)||Mt(Lr)&&Lr==="SI extended"&&Pt(xr)?(rt.text=Er[0],zr>0&&(rt.text+="x10"),rt.text==="1x10"&&(rt.text="10"),xr!==0&&xr!==1&&(rt.text+=""+(xr>0?"":D)+zr+""),rt.fontSize*=1.25):(Lr==="e"||Lr==="E")&&zr>2?rt.text=Er[0]+Lr+(xr>0?"+":D)+zr:(rt.text=qt(Math.pow(10,Dr),lt,"","fakehover"),Ir==="D1"&<._id.charAt(0)==="y"&&(rt.dy-=rt.fontSize/6))}else if(kt==="D")rt.text=lt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(Dr,1)))),rt.fontSize*=.75;else throw"unrecognized dtick "+String(Ir);if(lt.dtick==="D1"){var aa=String(rt.text).charAt(0);(aa==="0"||aa==="1")&&(lt._id.charAt(0)==="y"?rt.dx-=rt.fontSize/4:(rt.dy+=rt.fontSize/2,rt.dx+=(lt.range[1]>lt.range[0]?1:-1)*rt.fontSize*(Dr<0?.5:.25)))}}function ht(lt,rt){var fr=lt._categories[Math.round(rt.x)];fr===void 0&&(fr=""),rt.text=String(fr)}function De(lt,rt,fr){var lr=Math.round(rt.x),Tr=lt._categories[lr]||[],Ir=Tr[1]===void 0?"":String(Tr[1]),Dr=Tr[0]===void 0?"":String(Tr[0]);fr?rt.text=Dr+" - "+Ir:(rt.text=Ir,rt.text2=Dr)}function Ne(lt,rt,fr,lr,Tr){Tr==="never"?Tr="":lt.showexponent==="all"&&Math.abs(rt.x/lt.dtick)<1e-6&&(Tr="hide"),rt.text=qt(rt.x,lt,Tr,lr)}function We(lt,rt,fr,lr,Tr){if(lt.thetaunit==="radians"&&!fr){var Ir=rt.x/180;if(Ir===0)rt.text="0";else{var Dr=Ke(Ir);if(Dr[1]>=100)rt.text=qt(l.deg2rad(rt.x),lt,Tr,lr);else{var ot=rt.x<0;Dr[1]===1?Dr[0]===1?rt.text="\u03C0":rt.text=Dr[0]+"\u03C0":rt.text=["",Dr[0],"","\u2044","",Dr[1],"","\u03C0"].join(""),ot&&(rt.text=D+rt.text)}}}else rt.text=qt(rt.x,lt,Tr,lr)}function Ke(lt){function rt(ot,kt){return Math.abs(ot-kt)<=1e-6}function fr(ot,kt){return rt(kt,0)?ot:fr(kt,ot%kt)}function lr(ot){for(var kt=1;!rt(Math.round(ot*kt)/kt,ot);)kt*=10;return kt}var Tr=lr(lt),Ir=lt*Tr,Dr=Math.abs(fr(Ir,Tr));return[Math.round(Ir/Dr),Math.round(Tr/Dr)]}var Je=["f","p","n","\u03BC","m","","k","M","G","T"],et=["q","r","y","z","a",...Je,"P","E","Z","Y","R","Q"],Mt=lt=>["SI","SI extended","B"].includes(lt);function pt(lt){return lt>14||lt<-15}function Pt(lt){return lt>32||lt<-30}function Ct(lt,rt){return Mt(rt)?!!(rt==="SI extended"&&Pt(lt)||rt!=="SI extended"&&pt(lt)):!1}function qt(lt,rt,fr,lr){var Tr=lt<0,Ir=rt._tickround,Dr=fr||rt.exponentformat||"B",ot=rt._tickexponent,kt=H.getTickFormat(rt),jt=rt.separatethousands;if(lr){var ar={exponentformat:Dr,minexponent:rt.minexponent,dtick:rt.showexponent==="none"?rt.dtick:b(lt)&&Math.abs(lt)||1,range:rt.showexponent==="none"?rt.range.map(rt.r2d):[0,lt||1]};Xt(ar),Ir=(Number(ar._tickround)||0)+4,ot=ar._tickexponent,rt.hoverformat&&(kt=rt.hoverformat)}if(kt)return rt._numFormat(kt)(lt).replace(/-/g,D);Dr==="none"&&(ot=0),lt=Math.abs(lt);let Er=Math.pow(10,-Ir)/2;if(lt"+xr+"":Dr==="B"&&ot===9?lt+="B":Mt(Dr)&&(lt+=Dr==="SI extended"?et[ot/3+10]:Je[ot/3+5])}return Tr?D+lt:lt}H.getTickFormat=function(lt){var rt;function fr(kt){return typeof kt!="string"?kt:Number(kt.replace("M",""))*C}function lr(kt,jt){var ar=["L","D"];if(typeof kt==typeof jt){if(typeof kt=="number")return kt-jt;var Er=ar.indexOf(kt.charAt(0)),xr=ar.indexOf(jt.charAt(0));return Er===xr?Number(kt.replace(/(L|D)/g,""))-Number(jt.replace(/(L|D)/g,"")):Er-xr}else return typeof kt=="number"?1:-1}function Tr(kt,jt,ar){var Er=ar||function(Lr){return Lr},xr=jt[0],zr=jt[1];return(!xr&&typeof xr!="number"||Er(xr)<=Er(kt))&&(!zr&&typeof zr!="number"||Er(zr)>=Er(kt))}function Ir(kt,jt){var ar=jt[0]===null,Er=jt[1]===null,xr=lr(kt,jt[0])>=0,zr=lr(kt,jt[1])<=0;return(ar||xr)&&(Er||zr)}var Dr,ot;if(lt.tickformatstops&<.tickformatstops.length>0)switch(lt.type){case"date":case"linear":{for(rt=0;rt=0&&Tr.unshift(Tr.splice(ar,1).shift())}});var ot={false:{left:0,right:0}};return l.syncOrAsync(Tr.map(function(kt){return function(){if(kt){var jt=H.getFromId(lt,kt);fr||(fr={}),fr.axShifts=ot,fr.overlayingShiftedAx=Dr;var ar=H.drawOne(lt,jt,fr);return jt._shiftPusher&&Yi(jt,jt._fullDepth||0,ot,!0),jt._r=jt.range.slice(),jt._rl=l.simpleMap(jt._r,jt.r2l),ar}}}))},H.drawOne=function(lt,rt,fr){fr=fr||{};var lr=fr.axShifts||{},Tr=fr.overlayingShiftedAx||[],Ir,Dr,ot;rt.setScale();var kt=lt._fullLayout,jt=rt._id,ar=jt.charAt(0),Er=H.counterLetter(jt),xr=kt._plots[rt._mainSubplot],zr=rt.zerolinelayer==="above traces";if(!xr)return;if(rt._shiftPusher=rt.autoshift||Tr.indexOf(rt._id)!==-1||Tr.indexOf(rt.overlaying)!==-1,rt._shiftPusher&rt.anchor==="free"){var Lr=rt.linewidth/2||0;rt.ticks==="inside"&&(Lr+=rt.ticklen),Yi(rt,Lr,lr,!0),Yi(rt,rt.shift||0,lr,!1)}(fr.skipTitle!==!0||rt._shift===void 0)&&(rt._shift=Ja(rt,lr));var aa=xr[ar+"axislayer"],Sa=rt._mainLinePosition,wa=Sa+=rt._shift,pn=rt._mainMirrorPosition,tn=rt._vals=H.calcTicks(rt),ai=[rt.mirror,wa,pn].join("_");for(Ir=0;Ir0?_o.bottom-Ts:0,Bo))));var Dl=0,hl=0;if(rt._shiftPusher&&(Dl=Math.max(Bo,_o.height>0?Vo==="l"?Ts-_o.left:_o.right-Ts:0),rt.title.text!==kt._dfltTitle[ar]&&(hl=(rt._titleStandoff||0)+(rt._titleScoot||0),Vo==="l"&&(hl+=Rr(rt))),rt._fullDepth=Math.max(Dl,hl)),rt.automargin){Pi={x:0,y:0,r:0,l:0,t:0,b:0};var ps=[0,1],dl=typeof rt._shift=="number"?rt._shift:0;if(ar==="x"){if(Vo==="b"?Pi[Vo]=rt._depth:(Pi[Vo]=rt._depth=Math.max(_o.width>0?Ts-_o.top:0,Bo),ps.reverse()),_o.width>0){var wu=_o.right-(rt._offset+rt._length);wu>0&&(Pi.xr=1,Pi.r=wu);var lu=rt._offset-_o.left;lu>0&&(Pi.xl=0,Pi.l=lu)}}else if(Vo==="l"?(rt._depth=Math.max(_o.height>0?Ts-_o.left:0,Bo),Pi[Vo]=rt._depth-dl):(rt._depth=Math.max(_o.height>0?_o.right-Ts:0,Bo),Pi[Vo]=rt._depth+dl,ps.reverse()),_o.height>0){var xc=_o.bottom-(rt._offset+rt._length);xc>0&&(Pi.yb=0,Pi.b=xc);var Fl=rt._offset-_o.top;Fl>0&&(Pi.yt=1,Pi.t=Fl)}Pi[Er]=rt.anchor==="free"?rt.position:rt._anchorAxis.domain[ps[0]],rt.title.text!==kt._dfltTitle[ar]&&(Pi[Vo]+=Rr(rt)+(rt.title.standoff||0)),rt.mirror&&rt.anchor!=="free"&&(yo={x:0,y:0,r:0,l:0,t:0,b:0},yo[Vs]=rt.linewidth,rt.mirror&&rt.mirror!==!0&&(yo[Vs]+=Bo),rt.mirror===!0||rt.mirror==="ticks"?yo[Er]=rt._anchorAxis.domain[ps[1]]:(rt.mirror==="all"||rt.mirror==="allticks")&&(yo[Er]=[rt._counterDomainMin,rt._counterDomainMax][ps[1]]))}Ss&&(bs=k.getComponentMethod("rangeslider","autoMarginOpts")(lt,rt)),typeof rt.automargin=="string"&&(Vt(Pi,rt.automargin),Vt(yo,rt.automargin)),E.autoMargin(lt,un(rt),Pi),E.autoMargin(lt,Xa(rt),yo),E.autoMargin(lt,ja(rt),bs)}),l.syncOrAsync(Uo)}};function Vt(lt,rt){if(lt){var fr=Object.keys(Q).reduce(function(lr,Tr){return rt.indexOf(Tr)!==-1&&Q[Tr].forEach(function(Ir){lr[Ir]=1}),lr},{});Object.keys(lt).forEach(function(lr){fr[lr]||(lr.length===1?lt[lr]=0:delete lt[lr])})}}function Ht(lt,rt){var fr=[],lr,Tr=function(Ir,Dr){var ot=Ir.xbnd[Dr];ot!==null&&fr.push(l.extendFlat({},Ir,{x:ot}))};if(rt.length){for(lr=0;lrlt.range[1],ot=lt.ticklabelposition&<.ticklabelposition.indexOf("inside")!==-1,kt=!ot;if(fr){var jt=Dr?-1:1;fr=fr*jt}if(lr){var ar=lt.side,Er=ot&&(ar==="top"||ar==="left")||kt&&(ar==="bottom"||ar==="right")?1:-1;lr=lr*Er}return lt._id.charAt(0)==="x"?function(xr){return e(Tr+lt._offset+lt.l2p(Rt(xr))+fr,Ir+lr)}:function(xr){return e(Ir+lr,Tr+lt._offset+lt.l2p(Rt(xr))+fr)}};function Rt(lt){return lt.periodX!==void 0?lt.periodX:lt.x}function nr(lt){var rt=lt.ticklabelposition||"",fr=lt.tickson||"",lr=function(Lr){return rt.indexOf(Lr)!==-1},Tr=lr("top"),Ir=lr("left"),Dr=lr("right"),ot=lr("bottom"),kt=lr("inside"),jt=fr!=="boundaries"&&(ot||Ir||Tr||Dr);if(!jt&&!kt)return[0,0];var ar=lt.side,Er=jt?(lt.tickwidth||0)/2:0,xr=K,zr=lt.tickfont?lt.tickfont.size:12;return(ot||Tr)&&(Er+=zr*se,xr+=(lt.linewidth||0)/2),(Ir||Dr)&&(Er+=(lt.linewidth||0)/2,xr+=K),kt&&ar==="top"&&(xr-=zr*(1-se)),(Ir||Tr)&&(Er=-Er),(ar==="bottom"||ar==="right")&&(xr=-xr),[jt?Er:0,kt?xr:0]}H.makeTickPath=function(lt,rt,fr,lr){lr||(lr={});var Tr=lr.minor;if(Tr&&!lt.minor)return"";var Ir=lr.len!==void 0?lr.len:Tr?lt.minor.ticklen:lt.ticklen,Dr=lt._id.charAt(0),ot=(lt.linewidth||1)/2;return Dr==="x"?"M0,"+(rt+ot*fr)+"v"+Ir*fr:"M"+(rt+ot*fr)+",0h"+Ir*fr},H.makeLabelFns=function(lt,rt,fr){var lr=lt.ticklabelposition||"",Tr=lt.tickson||"",Ir=function(Xn){return lr.indexOf(Xn)!==-1},Dr=Ir("top"),ot=Ir("left"),kt=Ir("right"),jt=Ir("bottom"),ar=Tr!=="boundaries"&&(jt||ot||Dr||kt),Er=Ir("inside"),xr=lr==="inside"&<.ticks==="inside"||!Er&<.ticks==="outside"&&Tr!=="boundaries",zr=0,Lr=0,aa=xr?lt.ticklen:0;if(Er?aa*=-1:ar&&(aa=0),xr&&(zr+=aa,fr)){var Sa=l.deg2rad(fr);zr=aa*Math.cos(Sa)+1,Lr=aa*Math.sin(Sa)}lt.showticklabels&&(xr||lt.showline)&&(zr+=.2*lt.tickfont.size),zr+=(lt.linewidth||1)/2*(Er?-1:1);var wa={labelStandoff:zr,labelShift:Lr},pn,tn,ai,rn,Ri=0,Gn=lt.side,no=lt._id.charAt(0),Di=lt.tickangle,fn;if(no==="x")fn=!Er&&Gn==="bottom"||Er&&Gn==="top",rn=fn?1:-1,Er&&(rn*=-1),pn=Lr*rn,tn=rt+zr*rn,ai=fn?1:-.2,Math.abs(Di)===90&&(Er?ai+=ne:Di===-90&&Gn==="bottom"?ai=se:Di===90&&Gn==="top"?ai=ne:ai=.5,Ri=ne/2*(Di/90)),wa.xFn=function(Xn){return Xn.dx+pn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ai},wa.anchorFn=function(Xn,eo){if(ar){if(ot)return"end";if(kt)return"start"}return!b(eo)||eo===0||eo===180?"middle":eo*rn<0!==Er?"end":"start"},wa.heightFn=function(Xn,eo,gi){return eo<-60||eo>60?-.5*gi:lt.side==="top"!==Er?-gi:0};else if(no==="y"){if(fn=!Er&&Gn==="left"||Er&&Gn==="right",rn=fn?1:-1,Er&&(rn*=-1),pn=zr,tn=Lr*rn,ai=0,!Er&&Math.abs(Di)===90&&(Di===-90&&Gn==="left"||Di===90&&Gn==="right"?ai=se:ai=.5),Er){var Ai=b(Di)?+Di:0;if(Ai!==0){var jn=l.deg2rad(Ai);Ri=Math.abs(Math.sin(jn))*se*rn,ai=0}}wa.xFn=function(Xn){return Xn.dx+rt-(pn+Xn.fontSize*ai)*rn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ne},wa.anchorFn=function(Xn,eo){return b(eo)&&Math.abs(eo)===90?"middle":fn?"end":"start"},wa.heightFn=function(Xn,eo,gi){return lt.side==="right"&&(eo*=-1),eo<-30?-gi:eo<30?-.5*gi:0}}return wa};function ur(lt){return[lt.text,lt.x,lt.axInfo,lt.font,lt.fontSize,lt.fontColor].join("_")}H.drawTicks=function(lt,rt,fr){fr=fr||{};var lr=rt._id+"tick",Tr=[].concat(rt.minor&&rt.minor.ticks?fr.vals.filter(function(Dr){return Dr.minor&&!Dr.noTick}):[]).concat(rt.ticks?fr.vals.filter(function(Dr){return!Dr.minor&&!Dr.noTick}):[]),Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("ticks",1).classed("crisp",fr.crisp!==!1).each(function(Dr){return r.stroke(p.select(this),Dr.minor?rt.minor.tickcolor:rt.tickcolor)}).style("stroke-width",function(Dr){return a.crispRound(lt,Dr.minor?rt.minor.tickwidth:rt.tickwidth,1)+"px"}).attr("d",fr.path).style("display",null),vi(rt,[U]),Ir.attr("transform",fr.transFn)},H.drawGrid=function(lt,rt,fr){if(fr=fr||{},rt.tickmode!=="sync"){var lr=rt._id+"grid",Tr=rt.minor&&rt.minor.showgrid,Ir=Tr?fr.vals.filter(function(wa){return wa.minor}):[],Dr=rt.showgrid?fr.vals.filter(function(wa){return!wa.minor}):[],ot=fr.counterAxis;if(ot&&H.shouldShowZeroLine(lt,rt,ot))for(var kt=rt.tickmode==="array",jt=0;jt=0;Lr--){var aa=Lr?xr:zr;if(aa){var Sa=aa.selectAll("path."+lr).data(Lr?Dr:Ir,ur);Sa.exit().remove(),Sa.enter().append("path").classed(lr,1).classed("crisp",fr.crisp!==!1),Sa.attr("transform",fr.transFn).attr("d",fr.path).each(function(wa){return r.stroke(p.select(this),wa.minor?rt.minor.gridcolor:rt.gridcolor||"#ddd")}).style("stroke-dasharray",function(wa){return a.dashStyle(wa.minor?rt.minor.griddash:rt.griddash,wa.minor?rt.minor.gridwidth:rt.gridwidth)}).style("stroke-width",function(wa){return(wa.minor?Er:rt._gw)+"px"}).style("display",null),typeof fr.path=="function"&&Sa.attr("d",fr.path)}}vi(rt,[P,j])}},H.drawZeroLine=function(lt,rt,fr){fr=fr||fr;var lr=rt._id+"zl",Tr=H.shouldShowZeroLine(lt,rt,fr.counterAxis),Ir=fr.layer.selectAll("path."+lr).data(Tr?[{x:0,id:rt._id}]:[]);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("zl",1).classed("crisp",fr.crisp!==!1).each(function(){fr.layer.selectAll("path").sort(function(Dr,ot){return Z(Dr.id,ot.id)})}),Ir.attr("transform",fr.transFn).attr("d",fr.path).call(r.stroke,rt.zerolinecolor||r.defaultLine).style("stroke-width",a.crispRound(lt,rt.zerolinewidth,rt._gw||1)+"px").style("display",null),vi(rt,[F])},H.drawLabels=function(lt,rt,fr){fr=fr||{};var lr=lt._fullLayout,Tr=rt._id,Ir=rt.zerolinelayer==="above traces",Dr=fr.cls||Tr+"tick",ot=fr.vals.filter(function(Vn){return Vn.text}),kt=fr.labelFns,jt=fr.secondary?0:rt.tickangle,ar=(rt._prevTickAngles||{})[Dr],Er=fr.layer.selectAll("g."+Dr).data(rt.showticklabels?ot:[],ur),xr=[];Er.enter().append("g").classed(Dr,1).append("text").attr("text-anchor","middle").each(function(Vn){var qn=p.select(this),Hi=lt._promises.length;qn.call(t.positionText,kt.xFn(Vn),kt.yFn(Vn)).call(a.font,{family:Vn.font,size:Vn.fontSize,color:Vn.fontColor,weight:Vn.fontWeight,style:Vn.fontStyle,variant:Vn.fontVariant,textcase:Vn.fontTextcase,lineposition:Vn.fontLineposition,shadow:Vn.fontShadow}).text(Vn.text).call(t.convertToTspans,lt),lt._promises[Hi]?xr.push(lt._promises.pop().then(function(){zr(qn,jt)})):zr(qn,jt)}),vi(rt,[$]),Er.exit().remove(),fr.repositionOnUpdate&&Er.each(function(Vn){p.select(this).select("text").call(t.positionText,kt.xFn(Vn),kt.yFn(Vn))});function zr(Vn,qn){Vn.each(function(Hi){var Mi=p.select(this),Ro=Mi.select(".text-math-group"),go=kt.anchorFn(Hi,qn),Eo=fr.transFn.call(Mi.node(),Hi)+(b(qn)&&+qn!=0?" rotate("+qn+","+kt.xFn(Hi)+","+(kt.yFn(Hi)-Hi.fontSize/2)+")":""),Ao=t.lineCount(Mi),ds=G*Hi.fontSize,jo=kt.heightFn(Hi,b(qn)?+qn:0,(Ao-1)*ds);if(jo&&(Eo+=e(0,jo)),Ro.empty()){var Wo=Mi.select("text");Wo.attr({transform:Eo,"text-anchor":go}),Wo.style("display",null),rt._adjustTickLabelsOverflow&&rt._adjustTickLabelsOverflow()}else{var to=a.bBox(Ro.node()).width,wo=to*{end:-.5,start:.5}[go];Ro.attr("transform",Eo+e(wo,0))}})}rt._adjustTickLabelsOverflow=function(){var Vn=rt.ticklabeloverflow;if(!(!Vn||Vn==="allow")){var qn=Vn.indexOf("hide")!==-1,Hi=rt._id.charAt(0)==="x",Mi=0,Ro=Hi?lt._fullLayout.width:lt._fullLayout.height;if(Vn.indexOf("domain")!==-1){var go=l.simpleMap(rt.range,rt.r2l);Mi=rt.l2p(go[0])+rt._offset,Ro=rt.l2p(go[1])+rt._offset}var Eo=Math.min(Mi,Ro),Ao=Math.max(Mi,Ro),ds=rt.side,jo=1/0,Wo=-1/0;Er.each(function(Vi){var Io=p.select(this),Xi=Io.select(".text-math-group");if(Xi.empty()){var Ko=a.bBox(Io.node()),Uo=0;Hi?(Ko.right>Ao||Ko.leftAo||Ko.top+(rt.tickangle?0:Vi.fontSize/4)rt["_visibleLabelMin_"+go._id]?Io.style("display","none"):Ao.K==="tick"&&!Eo&&Io.node().style.display!=="none"&&Io.style("display",null)})})})})},zr(Er,ar+1?ar:jt);function Lr(){return xr.length&&Promise.all(xr)}var aa=null;function Sa(){if(zr(Er,jt),ot.length&&rt.autotickangles&&(rt.type!=="log"||String(rt.dtick).charAt(0)!=="D")){aa=rt.autotickangles[0];var Vn=0,qn=[],Hi,Mi=1;Er.each(function(Pi){Vn=Math.max(Vn,Pi.fontSize);var yo=rt.l2p(Pi.x),bs=La(this),Dl=a.bBox(bs.node());Mi=Math.max(Mi,t.lineCount(bs)),qn.push({top:0,bottom:10,height:10,left:yo-Dl.width/2,right:yo+Dl.width/2+2,width:Dl.width+2})});var Ro=(rt.tickson==="boundaries"||rt.showdividers)&&!fr.secondary,go=ot.length,Eo=Math.abs((ot[go-1].x-ot[0].x)*rt._m)/(go-1),Ao=Ro?Eo/2:Eo,ds=Ro?rt.ticklen:Vn*1.25*Mi,jo=Math.sqrt(Math.pow(Ao,2)+Math.pow(ds,2)),Wo=Ao/jo,to=rt.autotickangles.map(function(Pi){return Pi*Math.PI/180}),wo=to.find(function(Pi){return Math.abs(Math.cos(Pi))<=Wo});wo===void 0&&(wo=to.reduce(function(Pi,yo){return Math.abs(Math.cos(Pi))qi*gi&&(jn=gi,Di[no]=fn[no]=Xn[no])}var io=Math.abs(jn-Ai);io-rn>0?(io-=rn,rn*=1+rn/io):rn=0,rt._id.charAt(0)!=="y"&&(rn=-rn),Di[Gn]=tn.p2r(tn.r2p(fn[Gn])+Ri*rn),tn.autorange==="min"||tn.autorange==="max reversed"?(Di[0]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0):(tn.autorange==="max"||tn.autorange==="min reversed")&&(Di[1]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0),lr._insideTickLabelsUpdaterange[tn._name+".range"]=Di}var oo=l.syncOrAsync(wa);return oo&&oo.then&<._promises.push(oo),oo};function cr(lt,rt,fr){var lr=rt._id+"divider",Tr=fr.vals,Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().insert("path",":first-child").classed(lr,1).classed("crisp",1).call(r.stroke,rt.dividercolor).style("stroke-width",a.crispRound(lt,rt.dividerwidth,1)+"px"),Ir.attr("transform",fr.transFn).attr("d",fr.path)}H.getPxPosition=function(lt,rt){var fr=lt._fullLayout._size,lr=rt._id.charAt(0),Tr=rt.side,Ir;if(rt.anchor!=="free"?Ir=rt._anchorAxis:lr==="x"?Ir={_offset:fr.t+(1-(rt.position||0))*fr.h,_length:0}:lr==="y"&&(Ir={_offset:fr.l+(rt.position||0)*fr.w+rt._shift,_length:0}),Tr==="top"||Tr==="left")return Ir._offset;if(Tr==="bottom"||Tr==="right")return Ir._offset+Ir._length};function Rr(lt){var rt=lt.title.font.size,fr=(lt.title.text.match(t.BR_TAG_ALL)||[]).length;return lt.title.hasOwnProperty("standoff")?rt*(se+fr*G):fr?rt*(fr+1)*G:rt}function Qr(lt,rt){var fr=lt._fullLayout,lr=rt._id,Tr=lr.charAt(0),Ir=rt.title.font.size,Dr,ot=(rt.title.text.match(t.BR_TAG_ALL)||[]).length;if(rt.title.hasOwnProperty("standoff"))rt.side==="bottom"||rt.side==="right"?Dr=rt._depth+rt.title.standoff+Ir*se:(rt.side==="top"||rt.side==="left")&&(Dr=rt._depth+rt.title.standoff+Ir*(ne+ot*G));else{var kt=en(rt);if(rt.type==="multicategory")Dr=rt._depth;else{var jt=1.5*Ir;kt&&(jt=.5*Ir,rt.ticks==="outside"&&(jt+=rt.ticklen)),Dr=10+jt+(rt.linewidth?rt.linewidth-1:0)}kt||(Tr==="x"?Dr+=rt.side==="top"?Ir*(rt.showticklabels?1:0):Ir*(rt.showticklabels?1.5:.5):Dr+=rt.side==="right"?Ir*(rt.showticklabels?1:.5):Ir*(rt.showticklabels?.5:0))}var ar=H.getPxPosition(lt,rt),Er,xr,zr;Tr==="x"?(xr=rt._offset+rt._length/2,zr=rt.side==="top"?ar-Dr:ar+Dr):(zr=rt._offset+rt._length/2,xr=rt.side==="right"?ar+Dr:ar-Dr,Er={rotate:"-90",offset:0});var Lr;if(rt.type!=="multicategory"){var aa=rt._selections[rt._id+"tick"];if(Lr={selection:aa,side:rt.side},aa&&aa.node()&&aa.node().parentNode){var Sa=a.getTranslate(aa.node().parentNode);Lr.offsetLeft=Sa.x,Lr.offsetTop=Sa.y}rt.title.hasOwnProperty("standoff")&&(Lr.pad=0)}return rt._titleStandoff=Dr,n.draw(lt,lr+"title",{propContainer:rt,propName:rt._name+".title.text",placeholder:fr._dfltTitle[Tr],avoid:Lr,transform:Er,attributes:{x:xr,y:zr,"text-anchor":"middle"}})}H.shouldShowZeroLine=function(lt,rt,fr){var lr=l.simpleMap(rt.range,rt.r2l);return lr[0]*lr[1]<=0&&rt.zeroline&&(rt.type==="linear"||rt.type==="-")&&!(rt.rangebreaks&&rt.maskBreaks(0)===B)&&(Zr(rt,0)||!ha(lt,rt,fr,lr)||Pa(lt,rt))},H.clipEnds=function(lt,rt){return rt.filter(function(fr){return Zr(lt,fr.x)})};function Zr(lt,rt){var fr=lt.l2p(rt);return fr>1&&fr1)for(Tr=1;Tr=Tr.min&<=O:/%L/.test(rt)?lt>=I:/%[SX]/.test(rt)?lt>=z:/%M/.test(rt)?lt>=x:/%[HI]/.test(rt)?lt>=A:/%p/.test(rt)?lt>=u:/%[Aadejuwx]/.test(rt)?lt>=f:/%[UVW]/.test(rt)?lt>=T:/%[Bbm]/.test(rt)?lt>=_:/%[q]/.test(rt)?lt>=S:/%[Yy]/.test(rt)?lt>=g:!0}}}),Jw=ze({"src/plots/cartesian/autorange_options_defaults.js"(J,V){"use strict";V.exports=function(b,E,k){var l,e;if(k){var t=E==="reversed"||E==="min reversed"||E==="max reversed";l=k[t?1:0],e=k[t?0:1]}var n=b("autorangeoptions.minallowed",e===null?l:void 0),r=b("autorangeoptions.maxallowed",l===null?e:void 0);n===void 0&&b("autorangeoptions.clipmin"),r===void 0&&b("autorangeoptions.clipmax"),b("autorangeoptions.include")}}}),Qw=ze({"src/plots/cartesian/range_defaults.js"(J,V){"use strict";var p=Jw();V.exports=function(E,k,l,e){var t=k._template||{},n=k.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var a;!e.noInsiderange&&n!=="log"&&(a=l("insiderange"),a&&(a[0]===null||a[1]===null)&&(k.insiderange=!1,a=void 0),a&&(r=l("range",a)))}var o=k.getAutorangeDflt(r,e),s=l("autorange",o),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete k.range,k.autorange=!0,c=!0),c||(o=k.getAutorangeDflt(r,e),s=l("autorange",o)),s&&(p(l,s,r),(n==="linear"||n==="-")&&l("rangemode")),k.cleanRange()}}}),VI=ze({"node_modules/mouse-event-offset/index.js"(J,V){var p={left:0,top:0};V.exports=b;function b(k,l,e){l=l||k.currentTarget||k.srcElement,Array.isArray(e)||(e=[0,0]);var t=k.clientX||0,n=k.clientY||0,r=E(l);return e[0]=t-r.left,e[1]=n-r.top,e}function E(k){return k===window||k===document||k===document.body?p:k.getBoundingClientRect()}}}),Rx=ze({"node_modules/has-passive-events/index.js"(J,V){"use strict";var p=Vw();function b(){var E=!1;try{var k=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("test",null,k),window.removeEventListener("test",null,k)}catch{E=!1}return E}V.exports=p&&b()}}),GI=ze({"src/components/dragelement/align.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=(b-k)/(l-k),n=t+E/(l-k),r=(t+n)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?n:t<2/3-r?t:n>4/3-r?n:r}}}),HI=ze({"src/components/dragelement/cursor.js"(J,V){"use strict";var p=Nr(),b=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];V.exports=function(k,l,e,t){return e==="left"?k=0:e==="center"?k=1:e==="right"?k=2:k=p.constrain(Math.floor(k*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=p.constrain(Math.floor(l*3),0,2),b[l][k]}}}),WI=ze({"src/components/dragelement/unhover.js"(J,V){"use strict";var p=Hm(),b=Cx(),E=i1().getGraphDiv,k=a1(),l=V.exports={};l.wrapped=function(e,t,n){var r;e=E(e),e._fullLayout&&b.clear(e._fullLayout._uid+k.HOVERID);let a=e._hoverdata;l.raw(e,t,n)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(r=e._fullLayout)!=null&&r.hoveranywhere&&t?.target&&!a&&e.emit("plotly_unhover",{event:t,points:[]}))},l.raw=function(t,n){var r=t._fullLayout,a=t._hoverdata;return n||(n={}),n.target&&!t._dragged&&p.triggerHandler(t,"plotly_beforehover",n)===!1?!1:(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,n.target&&a&&t.emit("plotly_unhover",{event:n,points:a}),!0)}}}),_h=ze({"src/components/dragelement/index.js"(J,V){"use strict";var p=VI(),b=Gw(),E=Rx(),k=Nr().removeElement,l=hc(),e=V.exports={};e.align=GI(),e.getCursor=HI();var t=WI();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(o){var s=o.gd,c=1,m=s._context.doubleClickDelay,h=o.element,v,g,i,w,S,M,C,_;s._mouseDownTime||(s._mouseDownTime=0),h.style.pointerEvents="all",h.onmousedown=u,E?(h._ontouchstart&&h.removeEventListener("touchstart",h._ontouchstart),h._ontouchstart=u,h.addEventListener("touchstart",u,{passive:!1})):h.ontouchstart=u;function T(z,I,O){return Math.abs(z)"u"&&typeof z.clientY>"u"&&(z.clientX=v,z.clientY=g),i=new Date().getTime(),i-s._mouseDownTimem&&(c=Math.max(c-1,1)),s._dragged)o.doneFn&&o.doneFn();else{var I;M.target===C?I=M:(I={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(O=>{var D=M[O];!I[O]&&typeof D!="function"&&(I[O]=D)})),o.clickFn&&o.clickFn(c,I),_||C.dispatchEvent(new MouseEvent("click",z))}s._dragging=!1,s._dragged=!1}};function n(){var a=document.createElement("div");a.className="dragcover";var o=a.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(a),a}e.coverSlip=n;function r(a){return p(a.changedTouches?a.changedTouches[0]:a,document.body)}}}),gd=ze({"src/lib/setcursor.js"(J,V){"use strict";V.exports=function(b,E){(b.attr("class")||"").split(" ").forEach(function(k){k.indexOf("cursor-")===0&&b.classed(k,!1)}),E&&b.classed("cursor-"+E,!0)}}}),YI=ze({"src/lib/override_cursor.js"(J,V){"use strict";var p=gd(),b="data-savedcursor",E="!!";V.exports=function(l,e){var t=l.attr(b);if(e){if(!t){for(var n=(l.attr("class")||"").split(" "),r=0;rX.legend.length)for(var Y=X.legend.length;Y(r==="legend"?1:0));if(O===!1&&(o[r]=void 0),!(O===!1&&!m.uirevision)&&(v("uirevision",o.uirevision),O!==!1)){v("borderwidth");var D=v("orientation"),B=v("yref"),F=v("xref"),P=D==="h",j=B==="paper",U=F==="paper",$,Q,re,ne="left";P?($=0,p.getComponentMethod("rangeslider","isVisible")(a.xaxis)?j?(Q=1.1,re="bottom"):(Q=1,re="top"):j?(Q=-.1,re="top"):(Q=0,re="bottom")):(Q=1,re="auto",U?$=1.02:($=1,ne="right")),b.coerce(m,h,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"x"),b.coerce(m,h,{y:{valType:"number",editType:"legend",min:j?-2:0,max:j?3:1,dflt:Q}},"y"),v("traceorder",f),t.isGrouped(o[r])&&v("tracegroupgap"),v("entrywidth"),v("entrywidthmode"),v("indentation"),v("itemsizing"),v("itemwidth"),v("itemclick"),v("itemdoubleclick"),v("groupclick"),v("xanchor",ne),v("yanchor",re),v("maxheight"),v("valign"),b.noneOrAll(m,h,["x","y"]);var se=v("title.text");if(se){v("title.side",P?"left":"top");var G=b.extendFlat({},g,{size:b.bigFont(g.size)});b.coerceFont(v,"title.font",G);let X=c>1;v("titleclick",X?"toggle":!1),v("titledoubleclick",X?"toggleothers":!1)}}}V.exports=function(a,o,s){var c,m=s.slice(),h=o.shapes;if(h)for(c=0;cVe.showlegend||Ve.legendgroup);var g=h.concat(v),i=o.trace;i._isShape&&(i=a.shapes[i.index]);var w=i.legendgroup,S,M,C,_,T,f,u={},A=[],x=[],z=[];function I(Ve,Ge){var ke=A.indexOf(Ve),_e=u.visible;return _e||(_e=u.visible=[]),A.indexOf(Ve)===-1&&(A.push(Ve),ke=A.length-1),_e[ke]=Ge,ke}var O=(a.shapes||[]).map(function(Ve){return Ve._input}),D=!1;function B(Ve,Ge){O[Ve].visible=Ge,D=!0}function F(Ve,Ge){if(!(o.groupTitle&&!c)){var ke=Ve._isShape,_e=Ve.index;_e===void 0&&(_e=Ve._index);var ce=Ve.visible===!1?!1:Ge;ke?B(_e,ce):I(_e,ce)}}var P=i.legend;if(!i._isShape&&V.traceIs(i,"pie-like")){var j=o.label,U=m.indexOf(j);if(r==="toggle")U===-1?m.push(j):m.splice(U,1);else if(r==="toggleothers"){var $=U!==-1,Q=[];for(S=0;SC.showlegend||C.legendgroup),c=a.concat(s);function m(C){return(C.legend||"legend")===o}var h,v;if(n==="toggle")h=!c.some(function(_){return m(_)&&_.visible===!0}),v=!1;else{let C=c.some(function(_){return!m(_)&&_.visible===!0&&_.showlegend!==!1});h=!0,v=!C}let g={visible:[]},i=[],w=(r.shapes||[]).map(function(C){return C._input});for(var S=!1,M=0;MB&&(O=B)}z[g][0]._groupMinRank=O,z[g][0]._preGroupSort=g}var F=function(re,ne){return re[0]._groupMinRank-ne[0]._groupMinRank||re[0]._preGroupSort-ne[0]._preGroupSort},P=function(re,ne){var se=p(re.trace.legendrank)?re.trace.legendrank[re.i]:re.trace.legendrank,G=p(ne.trace.legendrank)?ne.trace.legendrank[ne.i]:ne.trace.legendrank;return se-G||re._preSort-ne._preSort};for(z.forEach(function(re,ne){re[0]._preGroupSort=ne}),z.sort(F),g=0;g0)Y=X.width;else return 0;return f?H:Math.min(Y,K)};M.each(function(G){var X=p.select(this),K=E.ensureSingle(X,"g","layers");K.style("opacity",G[0].trace.opacity);var H=_.indentation,Y=_.valign,q=G[0].lineHeight,Z=G[0].height;if(Y==="middle"&&H===0||!q||!Z)K.attr("transform",null);else{var ee={top:1,bottom:-1}[Y],ae=ee*(.5*(q-Z+3))||0,he=_.indentation;K.attr("transform",k(he,ae))}var xe=K.selectAll("g.legendfill").data([G]);xe.enter().append("g").classed("legendfill",!0);var we=K.selectAll("g.legendlines").data([G]);we.enter().append("g").classed("legendlines",!0);var Me=K.selectAll("g.legendsymbols").data([G]);Me.enter().append("g").classed("legendsymbols",!0),Me.selectAll("g.legendpoints").data([G]).enter().append("g").classed("legendpoints",!0)}).each(se).each(D).each(F).each(B).each(j).each(re).each(Q).each(I).each(O).each(U).each($);function I(G){var X=i(G),K=X.showFill,H=X.showLine,Y=X.showGradientLine,q=X.showGradientFill,Z=X.anyFill,ee=X.anyLine,ae=G[0],he=ae.trace,xe,we,Me=t(he),Se=Me.colorscale,Ie=Me.reversescale,Ve=function(Ae){if(Ae.size())if(K)l.fillGroupStyle(Ae,C,!0);else{var Be="legendfill-"+he.uid;l.gradient(Ae,C,Be,g(Ie),Se,"fill")}},Ge=function(Ae){if(Ae.size()){var Be="legendline-"+he.uid;l.lineGroupStyle(Ae),l.gradient(Ae,C,Be,g(Ie),Se,"stroke")}},ke=n.hasMarkers(he)||!Z?"M5,0":ee?"M5,-2":"M5,-3",_e=p.select(this),ce=_e.select(".legendfill").selectAll("path").data(K||q?[G]:[]);if(ce.enter().append("path").classed("js-fill",!0),ce.exit().remove(),ce.attr("d",ke+"h"+u+"v6h-"+u+"z").call(Ve),H||Y){var ve=z(void 0,he.line,h,c);we=E.minExtend(he,{line:{width:ve}}),xe=[E.minExtend(ae,{trace:we})]}var le=_e.select(".legendlines").selectAll("path").data(H||Y?[xe]:[]);le.enter().append("path").classed("js-line",!0),le.exit().remove(),le.attr("d",ke+(Y?"l"+u+",0.0001":"h"+u)).call(H?l.lineGroupStyle:Ge)}function O(G){var X=i(G),K=X.anyFill,H=X.anyLine,Y=X.showLine,q=X.showMarker,Z=G[0],ee=Z.trace,ae=!q&&!H&&!K&&n.hasText(ee),he,xe;function we(ve,le,Ae,Be){var Xe=E.nestedProperty(ee,ve).get(),Ye=E.isArrayOrTypedArray(Xe)&&le?le(Xe):Xe;if(f&&Ye&&Be!==void 0&&(Ye=Be),Ae){if(YeAe[1])return Ae[1]}return Ye}function Me(ve){return Z._distinct&&Z.index&&ve[Z.index]?ve[Z.index]:ve[0]}if(q||ae||Y){var Se={},Ie={};if(q){Se.mc=we("marker.color",Me);var Ve=ee.type==="scattermap";Se.mx=Ve?"circle":we("marker.symbol",Me),Se.mo=we("marker.opacity",E.mean,[.2,1]),Se.mlc=we("marker.line.color",Me),Se.mlw=we("marker.line.width",E.mean,[0,5],m),Se.mld=we("marker.line.dash",Me),Ie.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Ge=we("marker.size",E.mean,[2,16],s);Se.ms=Ge,Ie.marker.size=Ge}Y&&(Ie.line={width:we("line.width",Me,[0,10],c)}),ae&&(Se.tx="Aa",Se.tp=we("textposition",Me),Se.ts=10,Se.tc=we("textfont.color",Me),Se.tf=we("textfont.family",Me),Se.tw=we("textfont.weight",Me),Se.ty=we("textfont.style",Me),Se.tv=we("textfont.variant",Me),Se.tC=we("textfont.textcase",Me),Se.tE=we("textfont.lineposition",Me),Se.tS=we("textfont.shadow",Me)),he=[E.minExtend(Z,Se)],xe=E.minExtend(ee,Ie),xe.selectedpoints=null,xe.texttemplate=null}var ke=p.select(this).select("g.legendpoints"),_e=ke.selectAll("path.scatterpts").data(q?he:[]);_e.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),_e.exit().remove(),_e.call(l.pointStyle,xe,C),q&&(he[0].mrc=3);var ce=ke.selectAll("g.pointtext").data(ae?he:[]);ce.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),ce.exit().remove(),ce.selectAll("text").call(l.textPointStyle,xe,C)}function D(G){var X=G[0].trace,K=X.type==="waterfall";if(G[0]._distinct&&K){var H=G[0].trace[G[0].dir].marker;return G[0].mc=H.color,G[0].mlw=H.line.width,G[0].mlc=H.line.color,P(G,this,"waterfall")}var Y=[];X.visible&&K&&(Y=G[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var q=p.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Y);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),q.exit().remove(),q.each(function(Z){var ee=p.select(this),ae=X[Z[0]].marker,he=z(void 0,ae.line,v,m);ee.attr("d",Z[1]).style("stroke-width",he+"px").call(e.fill,ae.color),he&&ee.call(e.stroke,ae.line.color)})}function B(G){P(G,this)}function F(G){P(G,this,"funnel")}function P(G,X,K){var H=G[0].trace,Y=H.marker||{},q=Y.line||{},Z=Y.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ee=K?H.visible&&H.type===K:b.traceIs(H,"bar"),ae=p.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(ee?[G]:[]);ae.enter().append("path").classed("legend"+K,!0).attr("d",Z).attr("transform",x),ae.exit().remove(),ae.each(function(he){var xe=p.select(this),we=he[0],Me=z(we.mlw,Y.line,v,m);xe.style("stroke-width",Me+"px");var Se=we.mcc;if(!_._inHover&&"mc"in we){var Ie=t(Y),Ve=Ie.mid;Ve===void 0&&(Ve=(Ie.max+Ie.min)/2),Se=l.tryColorscale(Y,"")(Ve)}var Ge=Se||we.mc||Y.color,ke=Y.pattern,_e=l.getPatternAttr,ce=ke&&(_e(ke.shape,0,"")||_e(ke.path,0,""));if(ce){var ve=_e(ke.bgcolor,0,null),le=_e(ke.fgcolor,0,null),Ae=ke.fgopacity,Be=w(ke.size,8,10),Xe=w(ke.solidity,.5,1),Ye="legend-"+H.uid;xe.call(l.pattern,"legend",C,Ye,ce,Be,Xe,Se,ke.fillmode,ve,le,Ae)}else xe.call(e.fill,Ge);Me&&e.stroke(xe,we.mlc||q.color)})}function j(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&b.traceIs(X,"box-violin")?[G]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),K.exit().remove(),K.each(function(){var H=p.select(this);if((X.boxpoints==="all"||X.points==="all")&&e.opacity(X.fillcolor)===0&&e.opacity((X.line||{}).color)===0){var Y=E.minExtend(X,{marker:{size:f?s:E.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,Y,C)}else{var q=z(void 0,X.line,v,m);H.style("stroke-width",q+"px").call(e.fill,X.fillcolor),q&&e.stroke(H,X.line.color)}})}function U(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[G,G]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(H,Y){return Y?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Y){var q=p.select(this),Z=X[Y?"increasing":"decreasing"],ee=z(void 0,Z.line,v,m);q.style("stroke-width",ee+"px").call(e.fill,Z.fillcolor),ee&&e.stroke(q,Z.line.color)})}function $(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[G,G]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(H,Y){return Y?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Y){var q=p.select(this),Z=X[Y?"increasing":"decreasing"],ee=z(void 0,Z.line,v,m);q.style("fill","none").call(l.dashLine,Z.line.dash,ee),ee&&e.stroke(q,Z.line.color)})}function Q(G){ne(G,this,"pie")}function re(G){ne(G,this,"funnelarea")}function ne(G,X,K){var H=G[0],Y=H.trace,q=K?Y.visible&&Y.type===K:b.traceIs(Y,K),Z=p.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(q?[G]:[]);if(Z.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),Z.exit().remove(),Z.size()){var ee=Y.marker||{},ae=z(a(ee.line.width,H.pts),ee.line,v,m),he="pieLike",xe=E.minExtend(Y,{marker:{line:{width:ae}}},he),we=E.minExtend(H,{trace:xe},he);r(Z,we,xe,C)}}function se(G){var X=G[0].trace,K,H=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":H=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":H=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":H=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":H=[["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"]],K=!1;break;case"streamtube":H=[["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"]],K=!1;break;case"surface":H=[["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"]],K=!0;break;case"mesh3d":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var Y=p.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(H);Y.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),Y.exit().remove(),Y.each(function(q,Z){var ee=p.select(this),ae=t(X),he=ae.colorscale,xe=ae.reversescale,we=function(Ve){if(Ve.size()){var Ge="legendfill-"+X.uid;l.gradient(Ve,C,Ge,g(xe,K==="radial"),he,"fill")}},Me;if(he){if(!K){var Ie=he.length;Me=Z===0?he[xe?Ie-1:0][1]:Z===1?he[xe?0:Ie-1][1]:he[Math.floor((Ie-1)/2)][1]}}else{var Se=X.vertexcolor||X.facecolor||X.color;Me=E.isArrayOrTypedArray(Se)?Se[Z]||Se[0]:Se}ee.attr("d",q[0]),Me?ee.call(e.fill,Me):ee.call(we)})}};function g(S,M){var C=M?"radial":"horizontal";return C+(S?"":"reversed")}function i(S){var M=S[0].trace,C=M.contours,_=n.hasLines(M)||M.visible&&M.type==="quiver",T=n.hasMarkers(M),f=M.visible&&M.fill&&M.fill!=="none",u=!1,A=!1;if(C){var x=C.coloring;x==="lines"?u=!0:_=x==="none"||x==="heatmap"||C.showlines,C.type==="constraint"?f=C._operation!=="=":(x==="fill"||x==="heatmap")&&(A=!0)}return{showMarker:T,showLine:_,showFill:f,showGradientLine:u,showGradientFill:A,anyLine:_||u,anyFill:f||A}}function w(S,M,C){return S&&E.isArrayOrTypedArray(S)?M:S>C?C:S}}}),i5=ze({"src/components/legend/draw.js"(J,V){"use strict";var p=ci(),b=Nr(),E=cl(),k=mi(),l=Hm(),e=_h(),t=$i(),n=Qn(),r=Cs(),a=r5().handleItemClick,o=r5().handleTitleClick,s=a5(),c=dc(),m=c.LINE_SPACING,h=c.FROM_TL,v=c.FROM_BR,g=XI(),i=n5(),w=u1(),S=1,M=/^legend[0-9]*$/;V.exports=function($,Q){if(Q)_($,Q);else{var re=$._fullLayout,ne=re._legends,se=re._infolayer.selectAll('[class^="legend"]');se.each(function(){var H=p.select(this),Y=H.attr("class"),q=Y.split(" ")[0];q.match(M)&&ne.indexOf(q)===-1&&H.remove()});for(var G=0;G1)}var ae=re.hiddenlabels||[];if(!X&&(!re.showlegend||!K.length))return G.selectAll("."+ne).remove(),re._topdefs.select("#"+se).remove(),E.autoMargin(U,ne);var he=b.ensureSingle(G,"g",ne,function(_e){X||_e.attr("pointer-events","all")}),xe=b.ensureSingleById(re._topdefs,"clipPath",se,function(_e){_e.append("rect")}),we=b.ensureSingle(he,"rect","bg",function(_e){_e.attr("shape-rendering","crispEdges")});we.call(n.stroke,Q.bordercolor).call(n.fill,Q.bgcolor).style("stroke-width",Q.borderwidth+"px");var Me=b.ensureSingle(he,"g","scrollbox"),Se=Q.title;Q._titleWidth=0,Q._titleHeight=0;var Ie;Se.text?(Ie=b.ensureSingle(Me,"text",ne+"titletext"),Ie.attr("text-anchor","start").call(t.font,Se.font).text(Se.text),I(Ie,Me,U,Q,S),!X&&(Q.titleclick||Q.titledoubleclick)&&z(Me,U,Q,ne)):(Me.selectAll("."+ne+"titletext").remove(),Me.selectAll("."+ne+"titletoggle").remove());var Ve=b.ensureSingle(he,"rect","scrollbar",function(_e){_e.attr(s.scrollBarEnterAttrs).call(n.fill,s.scrollBarColor)}),Ge=Me.selectAll("g.groups").data(K);Ge.enter().append("g").attr("class","groups"),Ge.exit().remove();var ke=Ge.selectAll("g.traces").data(b.identity);ke.enter().append("g").attr("class","traces"),ke.exit().remove(),ke.style("opacity",function(_e){let ce=_e[0],ve=ce.trace;if(ce.groupTitle){let le=ve.legendgroup,Ae=(re.shapes||[]).filter(function(Xe){return Xe.showlegend});return U._fullData.concat(Ae).some(function(Xe){return Xe.legendgroup===le&&(Xe.legend||"legend")===ne&&Xe.visible===!0})?1:.5}return k.traceIs(ve,"pie-like")?ae.indexOf(_e[0].label)!==-1?.5:1:ve.visible==="legendonly"?.5:1}).each(function(){p.select(this).call(u,U,Q)}).call(i,U,Q).each(function(_e){X||_e[0].groupTitle&&Q.groupclick==="toggleitem"||p.select(this).call(x,U,ne)}),b.syncOrAsync([E.previousPromises,function(){return B(U,Ge,ke,Q,Me)},function(){var _e=re._size,ce=Q.borderwidth,ve=Q.xref==="paper",le=Q.yref==="paper";if(Se.text){let pt=(re.shapes||[]).filter(function(Ct){return Ct.showlegend}),Pt=U._fullData.concat(pt).some(function(Ct){let qt=Ct.legend||"legend";var Vt=Array.isArray(qt)?qt.includes(ne):qt===ne;return Vt&&Ct.visible===!0});Ie.style("opacity",Pt?1:.5)}if(!X){var Ae,Be;ve?Ae=_e.l+_e.w*Q.x-h[P(Q)]*Q._width:Ae=re.width*Q.x-h[P(Q)]*Q._width,le?Be=_e.t+_e.h*(1-Q.y)-h[j(Q)]*Q._effHeight:Be=re.height*(1-Q.y)-h[j(Q)]*Q._effHeight;var Xe=F(U,ne,Ae,Be);if(Xe)return;if(re.margin.autoexpand){var Ye=Ae,yt=Be;Ae=ve?b.constrain(Ae,0,re.width-Q._width):Ye,Be=le?b.constrain(Be,0,re.height-Q._effHeight):yt,Ae!==Ye&&b.log("Constrain "+ne+".x to make legend fit inside graph"),Be!==yt&&b.log("Constrain "+ne+".y to make legend fit inside graph")}t.setTranslate(he,Ae,Be)}if(Ve.on(".drag",null),he.on("wheel",null),X||Q._height<=Q._maxHeight||U._context.staticPlot){var gt=Q._effHeight;X&&(gt=Q._height),we.attr({width:Q._width-ce,height:gt-ce,x:ce/2,y:ce/2}),t.setTranslate(Me,0,0),xe.select("rect").attr({width:Q._width-2*ce,height:gt-2*ce,x:ce,y:ce}),t.setClipUrl(Me,se,U),t.setRect(Ve,0,0,0,0),delete Q._scrollY}else{var Tt=Math.max(s.scrollBarMinHeight,Q._effHeight*Q._effHeight/Q._height),At=Q._effHeight-Tt-2*s.scrollBarMargin,$t=Q._height-Q._effHeight,rr=At/$t,_r=Math.min(Q._scrollY||0,$t);we.attr({width:Q._width-2*ce+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-ce,x:ce/2,y:ce/2}),xe.select("rect").attr({width:Q._width-2*ce+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-2*ce,x:ce,y:ce+_r}),t.setClipUrl(Me,se,U),We(_r,Tt,rr),he.on("wheel",function(){_r=b.constrain(Q._scrollY+p.event.deltaY/$t*At,0,$t),We(_r,Tt,rr),_r!==0&&_r!==$t&&p.event.preventDefault()});var Xt,or,Ot,vt=function(pt,Pt,Ct){var qt=(Ct-Pt)/rr+pt;return b.constrain(qt,0,$t)},ht=function(pt,Pt,Ct){var qt=(Pt-Ct)/rr+pt;return b.constrain(qt,0,$t)},De=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"?Xt=pt.changedTouches[0].clientY:Xt=pt.clientY,Ot=_r}).on("drag",function(){var pt=p.event.sourceEvent;pt.buttons===2||pt.ctrlKey||(pt.type==="touchmove"?or=pt.changedTouches[0].clientY:or=pt.clientY,_r=vt(Ot,Xt,or),We(_r,Tt,rr))});Ve.call(De);var Ne=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"&&(Xt=pt.changedTouches[0].clientY,Ot=_r)}).on("drag",function(){var pt=p.event.sourceEvent;pt.type==="touchmove"&&(or=pt.changedTouches[0].clientY,_r=ht(Ot,Xt,or),We(_r,Tt,rr))});Me.call(Ne)}function We(pt,Pt,Ct){Q._scrollY=U._fullLayout[ne]._scrollY=pt,t.setTranslate(Me,0,-pt),t.setRect(Ve,Q._width,s.scrollBarMargin+pt*Ct,s.scrollBarWidth,Pt),xe.select("rect").attr("y",ce+pt)}if(U._context.edits.legendPosition){var Ke,Je,et,Mt;he.classed("cursor-move",!0),e.init({element:he.node(),gd:U,prepFn:function(pt){if(pt.target!==Ve.node()){var Pt=t.getTranslate(he);et=Pt.x,Mt=Pt.y}},moveFn:function(pt,Pt){if(et!==void 0&&Mt!==void 0){var Ct=et+pt,qt=Mt+Pt;t.setTranslate(he,Ct,qt),Ke=e.align(Ct,Q._width,_e.l,_e.l+_e.w,Q.xanchor),Je=e.align(qt+Q._height,-Q._height,_e.t+_e.h,_e.t,Q.yanchor)}},doneFn:function(){if(Ke!==void 0&&Je!==void 0){var pt={};pt[ne+".x"]=Ke,pt[ne+".y"]=Je,k.call("_guiRelayout",U,pt)}},clickFn:function(pt,Pt){var Ct=G.selectAll("g.traces").filter(function(){var qt=this.getBoundingClientRect();return Pt.clientX>=qt.left&&Pt.clientX<=qt.right&&Pt.clientY>=qt.top&&Pt.clientY<=qt.bottom});Ct.size()>0&&f(U,Q,Ct,pt,Pt)}})}}],U)}}function T(U,$,Q){var re=U[0],ne=re.width,se=$.entrywidthmode,G=re.trace.legendwidth||$.entrywidth;return se==="fraction"?$._maxWidth*G:Q+(G||ne)}function f(U,$,Q,re,ne){var se=U._fullLayout,G=Q.data()[0][0].trace,X=$.itemclick,K=$.itemdoubleclick,H={event:ne,node:Q.node(),curveNumber:G.index,expandedIndex:G.index,data:U.data,layout:U.layout,frames:U._transitionData._frames,config:U._context,fullData:U._fullData,fullLayout:se};G._group&&(H.group=G._group),k.traceIs(G,"pie-like")&&(H.label=Q.datum()[0].label);var Y=l.triggerHandler(U,"plotly_legendclick",H);if(re===1){if(Y===!1)return;$._clickTimeout=setTimeout(function(){U._fullLayout&&X&&a(Q,U,$,X)},U._context.doubleClickDelay)}else if(re===2){$._clickTimeout&&clearTimeout($._clickTimeout),U._legendMouseDownTime=0;var q=l.triggerHandler(U,"plotly_legenddoubleclick",H);q!==!1&&Y!==!1&&K&&a(Q,U,$,K)}}function u(U,$,Q){var re=w.getId(Q),ne=U.data()[0][0],se=ne.trace,G=k.traceIs(se,"pie-like"),X=!Q._inHover&&$._context.edits.legendText&&!G,K=Q._maxNameLength,H,Y;ne.groupTitle?(H=ne.groupTitle.text,Y=ne.groupTitle.font):(Y=Q.font,Q.entries?H=ne.text:(H=G?ne.label:se.name,se._meta&&(H=b.templateString(H,se._meta))));var q=b.ensureSingle(U,"text",re+"text");q.attr("text-anchor","start").call(t.font,Y).text(X?A(H,K):H);var Z=Q.indentation+Q.itemwidth+s.itemGap*2;r.positionText(q,Z,0),X?q.call(r.makeEditable,{gd:$,text:H}).call(I,U,$,Q).on("edit",function(ee){this.text(A(ee,K)).call(I,U,$,Q);var ae={};return ae.name=ee,ne.trace._isShape?k.call("_guiRelayout",$,"shapes["+se.index+"].name",ae.name):k.call("_guiRestyle",$,ae,se.index)}):I(q,U,$,Q)}function A(U,$){var Q=Math.max(4,$);if(U&&U.trim().length>=Q/2)return U;U=U||"";for(var re=Q-U.length;re>0;re--)U+=" ";return U}function x(U,$,Q){var re=$._context.doubleClickDelay,ne,se=1,G=b.ensureSingle(U,"rect",Q+"toggle",function(X){$._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(G.on("mousedown",function(){ne=new Date().getTime(),ne-$._legendMouseDownTimere&&(se=Math.max(se-1,1)),f($,X,U,se,p.event)}}))}function z(U,$,Q,re){if($._fullData.some(function(H){let Y=H.legend||"legend";return(Array.isArray(Y)?Y.includes(re):Y===re)&&k.traceIs(H,"pie-like")}))return;let se=$._context.doubleClickDelay;var G,X=1;let K=b.ensureSingle(U,"rect",re+"titletoggle",function(H){$._context.staticPlot||H.style("cursor","pointer").attr("pointer-events","all"),H.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(K.on("mousedown",function(){G=new Date().getTime(),G-$._legendMouseDownTimese&&(X=Math.max(X-1,1));let H={event:p.event,legendId:re,data:$.data,layout:$.layout,fullData:$._fullData,fullLayout:$._fullLayout};if(X===1&&Q.titleclick){if(l.triggerHandler($,"plotly_legendtitleclick",H)===!1)return;Q._titleClickTimeout=setTimeout(function(){$._fullLayout&&o($,Q,Q.titleclick)},se)}else X===2&&(Q._titleClickTimeout&&clearTimeout(Q._titleClickTimeout),$._legendMouseDownTime=0,l.triggerHandler($,"plotly_legendtitledoubleclick",H)!==!1&&Q.titledoubleclick&&o($,Q,Q.titledoubleclick))}))}function I(U,$,Q,re,ne){re._inHover&&U.attr("data-notex",!0),r.convertToTspans(U,Q,function(){O($,Q,re,ne)})}function O(U,$,Q,re){var ne=U.data()[0][0],se=ne&&ne.trace.showlegend;if(Array.isArray(se)&&(se=se[ne.i]!==!1),!Q._inHover&&ne&&!se){U.remove();return}var G=U.select("g[class*=math-group]"),X=G.node(),K=w.getId(Q);Q||(Q=$._fullLayout[K]);var H=Q.borderwidth,Y;re===S?Y=Q.title.font:ne.groupTitle?Y=ne.groupTitle.font:Y=Q.font;var q=Y.size*m,Z,ee;if(X){var ae=t.bBox(X);Z=ae.height,ee=ae.width,re===S?t.setTranslate(G,H,H+Z*.75):t.setTranslate(G,0,Z*.25)}else{var he="."+K+(re===S?"title":"")+"text",xe=U.select(he),we=r.lineCount(xe),Me=xe.node();if(Z=q*we,ee=Me?t.bBox(Me).width:0,re===S)Q.title.side==="left"&&(ee+=s.itemGap*2),r.positionText(xe,H+s.titlePad,H+q);else{var Se=s.itemGap*2+Q.indentation+Q.itemwidth;ne.groupTitle&&(Se=s.itemGap,ee-=Q.indentation+Q.itemwidth),r.positionText(xe,Se,-q*((we-1)/2-.3))}}re===S?(Q._titleWidth=ee,Q._titleHeight=Z):(ne.lineHeight=q,ne.height=Math.max(Z,16)+3,ne.width=ee)}function D(U){var $=0,Q=0,re=U.title.side;return re&&(re.indexOf("left")!==-1&&($=U._titleWidth),re.indexOf("top")!==-1&&(Q=U._titleHeight)),[$,Q]}function B(U,$,Q,re,ne){var se=U._fullLayout,G=w.getId(re);re||(re=se[G]);var X=se._size,K=w.isVertical(re),H=w.isGrouped(re),Y=re.entrywidthmode==="fraction",q=re.borderwidth,Z=2*q,ee=s.itemGap,ae=re.indentation+re.itemwidth+ee*2,he=2*(q+ee),xe=j(re),we=re.y<0||re.y===0&&xe==="top",Me=re.y>1||re.y===1&&xe==="bottom",Se=re.tracegroupgap,Ie={};let{orientation:Ve,yref:Ge}=re,{maxheight:ke}=re,_e=we||Me||Ve!=="v"||Ge!=="paper";ke||(ke=_e?.5:1);let ce=_e?se.height:X.h;re._maxHeight=Math.max(ke>1?ke:ke*ce,30);var ve=0;re._width=0,re._height=0;var le=D(re);if(K)Q.each(function(pt){var Pt=pt[0].height;t.setTranslate(this,q+le[0],q+le[1]+re._height+Pt/2+ee),re._height+=Pt,re._width=Math.max(re._width,pt[0].width)}),ve=ae+re._width,re._width+=ee+ae+Z,re._height+=he,H&&($.each(function(pt,Pt){t.setTranslate(this,0,Pt*re.tracegroupgap)}),re._height+=(re._lgroupsLength-1)*re.tracegroupgap);else{var Ae=P(re),Be=re.x<0||re.x===0&&Ae==="right",Xe=re.x>1||re.x===1&&Ae==="left",Ye=Me||we,yt=se.width/2;re._maxWidth=Math.max(Be?Ye&&Ae==="left"?X.l+X.w:yt:Xe?Ye&&Ae==="right"?X.r+X.w:yt:X.w,2*ae);var gt=0,Tt=0;Q.each(function(pt){var Pt=T(pt,re,ae);gt=Math.max(gt,Pt),Tt+=Pt}),ve=null;var At=0;if(H){var $t=0,rr=0,_r=0;$.each(function(){var pt=0,Pt=0;p.select(this).selectAll("g.traces").each(function(qt){var Vt=T(qt,re,ae),Ht=qt[0].height;t.setTranslate(this,le[0],le[1]+q+ee+Ht/2+Pt),Pt+=Ht,pt=Math.max(pt,Vt),Ie[qt[0].trace.legendgroup]=pt});var Ct=pt+ee;rr>0&&Ct+q+rr>re._maxWidth?(At=Math.max(At,rr),rr=0,_r+=$t+Se,$t=Pt):$t=Math.max($t,Pt),t.setTranslate(this,rr,_r),rr+=Ct}),re._width=Math.max(At,rr)+q,re._height=_r+$t+he}else{var Xt=Q.size(),or=Tt+Z+(Xt-1)*ee=re._maxWidth&&(At=Math.max(At,De),vt=0,ht+=Ot,re._height+=Ot,Ot=0),t.setTranslate(this,le[0]+q+vt,le[1]+q+ht+Pt/2+ee),De=vt+Ct+ee,vt+=qt,Ot=Math.max(Ot,Pt)}),or?(re._width=vt+Z,re._height=Ot+he):(re._width=Math.max(At,De)+Z,re._height+=Ot+he)}}re._width=Math.ceil(Math.max(re._width+le[0],re._titleWidth+2*(q+s.titlePad))),re._height=Math.ceil(Math.max(re._height+le[1],re._titleHeight+2*(q+s.itemGap))),re._effHeight=Math.min(re._height,re._maxHeight);var Ne=U._context.edits,We=Ne.legendText||Ne.legendPosition;Q.each(function(pt){var Pt=p.select(this).select("."+G+"toggle"),Ct=pt[0].height,qt=pt[0].trace.legendgroup,Vt=T(pt,re,ae);H&&qt!==""&&(Vt=Ie[qt]);var Ht=We?ae:ve||Vt;!K&&!Y&&(Ht+=ee/2),t.setRect(Pt,0,-Ct/2,Ht,Ct)});var Ke=ne.select("."+G+"titletext");Ke.node()&&C(Ke,re,q);var Je=ne.select("."+G+"titletoggle");if(Je.size()&&Ke.node()){var et=Ke.attr("x")||0,Mt=s.titlePad;t.setRect(Je,et-Mt,q,re._titleWidth+2*Mt,re._titleHeight+2*Mt)}}function F(U,$,Q,re){var ne=U._fullLayout,se=ne[$],G=P(se),X=j(se),K=se.xref==="paper",H=se.yref==="paper";U._fullLayout._reservedMargin[$]={};var Y=se.y<.5?"b":"t",q=se.x<.5?"l":"r",Z={r:ne.width-Q,l:Q+se._width,b:ne.height-re,t:re+se._effHeight};if(K&&H)return E.autoMargin(U,$,{x:se.x,y:se.y,l:se._width*h[G],r:se._width*v[G],b:se._effHeight*v[X],t:se._effHeight*h[X]});K?U._fullLayout._reservedMargin[$][Y]=Z[Y]:H||se.orientation==="v"?U._fullLayout._reservedMargin[$][q]=Z[q]:U._fullLayout._reservedMargin[$][Y]=Z[Y]}function P(U){return b.isRightAnchor(U)?"right":b.isCenterAnchor(U)?"center":"left"}function j(U){return b.isBottomAnchor(U)?"bottom":b.isMiddleAnchor(U)?"middle":"top"}}}),o5=ze({"src/components/fx/hover.js"(J){"use strict";var V=ci(),p=ao(),b=Nr(),E=b.pushUnique,k=b.strTranslate,l=b.strRotate,e=Hm(),t=Cs(),n=YI(),r=$i(),a=Qn(),o=_h(),s=Gi(),c=hc().zindexSeparator,m=mi(),h=kh(),v=a1(),g=t5(),i=i5(),w=v.YANGLE,S=Math.PI*w/180,M=1/Math.sin(S),C=Math.cos(S),_=Math.sin(S),T=v.HOVERARROWSIZE,f=v.HOVERTEXTPAD,u={box:!0,ohlc:!0,violin:!0,candlestick:!0},A={scatter:!0,scattergl:!0,splom:!0};function x(q,Z){return q.distance-Z.distance}J.hover=function(Z,ee,ae,he){Z=b.getGraphDiv(Z);var xe=ee.target;b.throttle(Z._fullLayout._uid+v.HOVERID,v.HOVERMINTIME,function(){z(Z,ee,ae,he,xe)})},J.loneHover=function(Z,ee){var ae=!0;Array.isArray(Z)||(ae=!1,Z=[Z]);var he=ee.gd,xe=K(he),we=H(he),Me=Z.map(function(le){var Ae=le._x0||le.x0||le.x||0,Be=le._x1||le.x1||le.x||0,Xe=le._y0||le.y0||le.y||0,Ye=le._y1||le.y1||le.y||0,yt=le.eventData;if(yt){var gt=Math.min(Ae,Be),Tt=Math.max(Ae,Be),At=Math.min(Xe,Ye),$t=Math.max(Xe,Ye),rr=le.trace;if(m.traceIs(rr,"gl3d")){var _r=he._fullLayout[rr.scene]._scene.container,Xt=_r.offsetLeft,or=_r.offsetTop;gt+=Xt,Tt+=Xt,At+=or,$t+=or}yt.bbox={x0:gt+we,x1:Tt+we,y0:At+xe,y1:$t+xe},yt.xPixel=(Ae+Be)/2,yt.yPixel=(Xe+Ye)/2,ee.inOut_bbox&&ee.inOut_bbox.push(yt.bbox)}else yt=!1;return{color:le.color||a.defaultLine,x0:le.x0||le.x||0,x1:le.x1||le.x||0,y0:le.y0||le.y||0,y1:le.y1||le.y||0,xLabel:le.xLabel,yLabel:le.yLabel,zLabel:le.zLabel,text:le.text,name:le.name,idealAlign:le.idealAlign,borderColor:le.borderColor,fontFamily:le.fontFamily,fontSize:le.fontSize,fontColor:le.fontColor,fontWeight:le.fontWeight,fontStyle:le.fontStyle,fontVariant:le.fontVariant,nameLength:le.nameLength,textAlign:le.textAlign,trace:le.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:le.hovertemplate||!1,hovertemplateLabels:le.hovertemplateLabels||!1,eventData:yt}}),Se=!1,Ie=D(Me,{gd:he,hovermode:"closest",rotateLabels:Se,bgColor:ee.bgColor||a.background,container:V.select(ee.container),outerContainer:ee.outerContainer||ee.container}),Ve=Ie.hoverLabels,Ge=5,ke=0,_e=0;Ve.sort(function(le,Ae){return le.y0-Ae.y0}).each(function(le,Ae){var Be=le.y0-le.by/2;Be-GeTt[0]._length||nr<0||nr>At[0]._length)return o.unhoverRaw(q,Z)}if(Z.pointerX=Rt+Tt[0]._offset,Z.pointerY=nr+At[0]._offset,"xval"in Z?ht=h.flat(xe,Z.xval):ht=h.p2c(Tt,Rt),"yval"in Z?De=h.flat(xe,Z.yval):De=h.p2c(At,nr),q._hoverPointerX=Z.pointerX,q._hoverPointerY=Z.pointerY,!p(ht[0])||!p(De[0]))return b.warn("Fx.hover failed",Z,q),o.unhoverRaw(q,Z)}Me.clickanywhere&&(q._hoverXVals=ht,q._hoverYVals=De,q._hoverXAxes=Tt,q._hoverYAxes=At);var Rr=1/0;function Qr(fn,Ai){for(We=0;WeVt&&(Ot.splice(0,Vt),Rr=Ot[0].distance),Ge&&or!==0&&Ot.length===0){qt.distance=or,qt.index=!1;var qi=Je._module.hoverPoints(qt,Pt,Ct,"closest",{hoverLayer:Me._hoverlayer});if(qi&&(qi=qi.filter(function(Mi){return Mi.spikeDistance<=or})),qi&&qi.length){var io,oo=qi.filter(function(Mi){return Mi.xa.showspikes&&Mi.xa.spikesnap!=="hovered data"});if(oo.length){var Vn=oo[0];p(Vn.x0)&&p(Vn.y0)&&(io=ha(Vn),(!Ht.vLinePoint||Ht.vLinePoint.spikeDistance>io.spikeDistance)&&(Ht.vLinePoint=io))}var qn=qi.filter(function(Mi){return Mi.ya.showspikes&&Mi.ya.spikesnap!=="hovered data"});if(qn.length){var Hi=qn[0];p(Hi.x0)&&p(Hi.y0)&&(io=ha(Hi),(!Ht.hLinePoint||Ht.hLinePoint.spikeDistance>io.spikeDistance)&&(Ht.hLinePoint=io))}}}}}Qr();function Zr(fn,Ai,jn){for(var Xn=null,eo=1/0,gi,qi=0;qifn.trace.index===vi.trace.index):Ot=[vi];var Yi=Ot.length,Ja=X("x",vi,Me),Oa=X("y",vi,Me);Qr(Ja,Oa);var lt=[],rt={},fr=0,lr=function(fn){var Ai=u[fn.trace.type]?I(fn):fn.trace.index;if(!rt[Ai])fr++,rt[Ai]=fr,lt.push(fn);else{var jn=rt[Ai]-1,Xn=lt[jn];jn>0&&Math.abs(fn.distance)Yi-1;Tr--)lr(Ot[Tr]);Ot=lt,Xa()}var Ir=q._hoverdata,Dr=[],ot=K(q),kt=H(q);for(let fn of Ot){var jt=h.makeEventData(fn,fn.trace,fn.cd);if(fn.hovertemplate!==!1){var ar=!1;fn.cd[fn.index]&&fn.cd[fn.index].ht&&(ar=fn.cd[fn.index].ht),fn.hovertemplate=ar||fn.trace.hovertemplate||!1}if(fn.xa&&fn.ya){var Er=fn.x0+fn.xa._offset,xr=fn.x1+fn.xa._offset,zr=fn.y0+fn.ya._offset,Lr=fn.y1+fn.ya._offset,aa=Math.min(Er,xr),Sa=Math.max(Er,xr),wa=Math.min(zr,Lr),pn=Math.max(zr,Lr);jt.bbox={x0:aa+kt,x1:Sa+kt,y0:wa+ot,y1:pn+ot},jt.xPixel=(Er+xr)/2,jt.yPixel=(zr+Lr)/2}fn.eventData=[jt],Dr.push(jt)}q._hoverdata=Dr;var tn=ke==="y"&&(vt.length>1||Ot.length>1)||ke==="closest"&&Sr&&Ot.length>1,ai=a.combine(Me.plot_bgcolor||a.background,Me.paper_bgcolor),rn=D(Ot,{gd:q,hovermode:ke,rotateLabels:tn,bgColor:ai,container:Me._hoverlayer,outerContainer:Me._paper.node(),commonLabelOpts:Me.hoverlabel,hoverdistance:Me.hoverdistance}),Ri=rn.hoverLabels;if(h.isUnifiedHover(ke)||(F(Ri,tn,Me,rn.commonLabelBoundingBox),U(Ri,tn,Me._invScaleX,Me._invScaleY)),he&&he.tagName){var Gn=m.getComponentMethod("annotations","hasClickToShow")(q,Dr);n(V.select(he),Gn?"pointer":"")}var no=re(q,Z,Ir);if(!he||ae||!no&&!Me.hoveranywhere)return;Ir&&no&&q.emit("plotly_unhover",{event:Z,points:Ir}),Di(q._hoverdata);function Di(fn){q.emit("plotly_hover",{event:Z,points:fn,xaxes:Tt,yaxes:At,xvals:h.c2dApply(Tt,ht),yvals:h.c2dApply(At,De),xPixel:Z.pointerX,yPixel:Z.pointerY})}}function I(q){return[q.trace.index,q.index,q.x0,q.y0,q.name,q.attr,q.xa?q.xa._id:"",q.ya?q.ya._id:""].join(",")}var O=/([\s\S]*)<\/extra>/;function D(q,Z){var ee=Z.gd,ae=ee._fullLayout,he=Z.hovermode,xe=Z.rotateLabels,we=Z.bgColor,Me=Z.container,Se=Z.outerContainer,Ie=Z.commonLabelOpts||{};if(q.length===0)return[[]];var Ve=Z.fontFamily||v.HOVERFONT,Ge=Z.fontSize||v.HOVERFONTSIZE,ke=Z.fontWeight||ae.font.weight,_e=Z.fontStyle||ae.font.style,ce=Z.fontVariant||ae.font.variant,ve=Z.fontTextcase||ae.font.textcase,le=Z.fontLineposition||ae.font.lineposition,Ae=Z.fontShadow||ae.font.shadow,Be=q[0],Xe=Be.xa,Ye=Be.ya,yt=he.charAt(0),gt=yt+"Label",Tt=Be[gt];if(Tt===void 0&&Xe.type==="multicategory")for(var At=0;Atae.width-Dr&&(ot=ae.width-Dr),en.attr("d","M"+(lr-ot)+",0L"+(lr-ot+T)+","+Ir+T+"H"+Dr+"v"+Ir+(f*2+fr.height)+"H"+-Dr+"V"+Ir+T+"H"+(lr-ot-T)+"Z"),lr=ot,We.minX=lr-Dr,We.maxX=lr+Dr,Xe.side==="top"?(We.minY=Tr-(f*2+fr.height),We.maxY=Tr-f):(We.minY=Tr+f,We.maxY=Tr+(f*2+fr.height))}else{var kt,jt,ar;Ye.side==="right"?(kt="start",jt=1,ar="",lr=Xe._offset+Xe._length):(kt="end",jt=-1,ar="-",lr=Xe._offset),Tr=Ye._offset+(Be.y0+Be.y1)/2,vi.attr("text-anchor",kt),en.attr("d","M0,0L"+ar+T+","+T+"V"+(f+fr.height/2)+"h"+ar+(f*2+fr.width)+"V-"+(f+fr.height/2)+"H"+ar+T+"V-"+T+"Z"),We.minY=Tr-(f+fr.height/2),We.maxY=Tr+(f+fr.height/2),Ye.side==="right"?(We.minX=lr+T,We.maxX=lr+T+(f*2+fr.width)):(We.minX=lr-T-(f*2+fr.width),We.maxX=lr-T);var Er=fr.height/2,xr=rr-fr.top-Er,zr="clip"+ae._uid+"commonlabel"+Ye._id,Lr;if(lren.hoverinfo!=="none");if(on.length===0)return[];var Ke=ae.hoverlabel,Je=Ke.font,et=on[0],Mt=((he==="x unified"?et.xa:et.ya).unifiedhovertitle||{}).text,pt=Mt?b.hovertemplateString({data:he==="x unified"?[{xa:et.xa,x:et.xVal}]:[{ya:et.ya,y:et.yVal}],fallback:et.trace.hovertemplatefallback,locale:ae._d3locale,template:Mt}):Tt,Pt={showlegend:!0,legend:{title:{text:pt,font:Je},font:Je,bgcolor:Ke.bgcolor,bordercolor:Ke.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ae.legend?ae.legend.traceorder:void 0,orientation:"v"}},Ct={font:Je};g(Pt,Ct,ee._fullData);var qt=Ct.legend;qt.entries=[];for(var Vt=0;Vt=0?Un=Xa:ja+cr<_r&&ja>=0?Un=ja:Nn+cr<_r?Un=Nn:Xa-Zr=0?li=La:un+Rr=0?li=un:yn+Rr=0,(on.idealAlign==="top"||!wa)&&pn?(ar-=xr/2,on.anchor="end"):wa?(ar+=xr/2,on.anchor="start"):on.anchor="middle",on.crossPos=ar;else{if(on.pos=ar,wa=jt+Er/2+Sa<=_r,pn=jt-Er/2-Sa>=0,(on.idealAlign==="left"||!wa)&&pn)jt-=Er/2,on.anchor="end";else if(wa)jt+=Er/2,on.anchor="start";else{on.anchor="middle";var tn=Sa/2,ai=jt+tn-_r,rn=jt-tn;ai>0&&(jt-=ai),rn<0&&(jt+=-rn)}on.crossPos=jt}Tr.attr("text-anchor",on.anchor),Dr&&Ir.attr("text-anchor",on.anchor),en.attr("transform",k(jt,ar)+(xe?l(w):""))}),{hoverLabels:Yn,commonLabelBoundingBox:We}}function B(q,Z,ee,ae,he,xe){var we,Me,Se="",Ie="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=b.templateString(q.name,q.trace._meta)),Se=se(q.name,q.nameLength));var Ve=ee.charAt(0),Ge=Ve==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(Ie+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(Ie+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmap"&&(Ie+=(Ie?"z: ":"")+q.zLabel)):Z&&q[Ve+"Label"]===he?Ie=q[Ge+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(Ie=q.yLabel):q.yLabel===void 0?Ie=q.xLabel:Ie="("+q.xLabel+", "+q.yLabel+")",(q.text||q.text===0)&&!Array.isArray(q.text)&&(Ie+=(Ie?"
":"")+q.text),q.extraText!==void 0&&(Ie+=(Ie?"
":"")+q.extraText),xe&&Ie===""&&!q.hovertemplate&&(Se===""&&xe.remove(),Ie=Se),(Me=(we=q.trace)==null?void 0:we.hoverlabel)!=null&&Me.split&&(q.hovertemplate="");let{hovertemplate:ke=!1}=q;if(ke){let _e=q.hovertemplateLabels||q;q[Ve+"Label"]!==he&&(_e[Ve+"other"]=_e[Ve+"Val"],_e[Ve+"otherLabel"]=_e[Ve+"Label"]),Ie=b.hovertemplateString({data:[q.eventData[0]||{},q.trace._meta],fallback:q.trace.hovertemplatefallback,labels:_e,locale:ae._d3locale,template:ke}),Ie=Ie.replace(O,(ce,ve)=>(Se=se(ve,q.nameLength),""))}return[Ie,Se]}function F(q,Z,ee,ae){var he=Z?"xa":"ya",xe=Z?"ya":"xa",we=0,Me=1,Se=q.size(),Ie=new Array(Se),Ve=0,Ge=ae.minX,ke=ae.maxX,_e=ae.minY,ce=ae.maxY,ve=function(ht){return ht*ee._invScaleX},le=function(ht){return ht*ee._invScaleY};q.each(function(ht){var De=ht[he],Ne=ht[xe],We=De._id.charAt(0)==="x",Ke=De.range;Ve===0&&Ke&&Ke[0]>Ke[1]!==We&&(Me=-1);var Je=0,et=We?ee.width:ee.height;if(ee.hovermode==="x"||ee.hovermode==="y"){var Mt=P(ht,Z),pt=ht.anchor,Pt=pt==="end"?-1:1,Ct,qt;if(pt==="middle")Ct=ht.crossPos+(We?le(Mt.y-ht.by/2):ve(ht.bx/2+ht.tx2width/2)),qt=Ct+(We?le(ht.by):ve(ht.bx));else if(We)Ct=ht.crossPos+le(T+Mt.y)-le(ht.by/2-T),qt=Ct+le(ht.by);else{var Vt=ve(Pt*T+Mt.x),Ht=Vt+ve(Pt*ht.bx);Ct=ht.crossPos+Math.min(Vt,Ht),qt=ht.crossPos+Math.max(Vt,Ht)}We?_e!==void 0&&ce!==void 0&&Math.min(qt,ce)-Math.max(Ct,_e)>1&&(Ne.side==="left"?(Je=Ne._mainLinePosition,et=ee.width):et=Ne._mainLinePosition):Ge!==void 0&&ke!==void 0&&Math.min(qt,ke)-Math.max(Ct,Ge)>1&&(Ne.side==="top"?(Je=Ne._mainLinePosition,et=ee.height):et=Ne._mainLinePosition)}Ie[Ve++]=[{datum:ht,traceIndex:ht.trace.index,dp:0,pos:ht.pos,posref:ht.posref,size:ht.by*(We?M:1)/2,pmin:Je,pmax:et}]}),Ie.sort(function(ht,De){return ht[0].posref-De[0].posref||Me*(De[0].traceIndex-ht[0].traceIndex)});var Ae,Be,Xe,Ye,yt,gt,Tt;function At(ht){var De=ht[0],Ne=ht[ht.length-1];if(Be=De.pmin-De.pos-De.dp+De.size,Xe=Ne.pos+Ne.dp+Ne.size-De.pmax,Be>.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp+=Be;Ae=!1}if(!(Xe<.01)){if(Be<-.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp-=Xe;Ae=!1}if(Ae){var We=0;for(Ye=0;YeDe.pmax&&We++;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos>De.pmax-1&&(gt.del=!0,We--);for(Ye=0;Ye=0;yt--)ht[yt].dp-=Xe;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos+gt.dp+gt.size>De.pmax&&(gt.del=!0,We--)}}}for(;!Ae&&we<=Se;){for(we++,Ae=!0,Ye=0;Ye.01){for(yt=rr.length-1;yt>=0;yt--)rr[yt].dp+=Be;for($t.push.apply($t,rr),Ie.splice(Ye+1,1),Tt=0,yt=$t.length-1;yt>=0;yt--)Tt+=$t[yt].dp;for(Xe=Tt/$t.length,yt=$t.length-1;yt>=0;yt--)$t[yt].dp-=Xe;Ae=!1}else Ye++}Ie.forEach(At)}for(Ye=Ie.length-1;Ye>=0;Ye--){var or=Ie[Ye];for(yt=or.length-1;yt>=0;yt--){var Ot=or[yt],vt=Ot.datum;vt.offset=Ot.dp,vt.del=Ot.del}}}function P(q,Z){var ee=0,ae=q.offset;return Z&&(ae*=-_,ee=q.offset*C),{x:ee,y:ae}}function j(q){var Z={start:1,end:-1,middle:0}[q.anchor],ee=Z*(T+f),ae=ee+Z*(q.txwidth+f),he=q.anchor==="middle";return he&&(ee-=q.tx2width/2,ae+=q.txwidth/2+f),{alignShift:Z,textShiftX:ee,text2ShiftX:ae}}function U(q,Z,ee,ae){var he=function(we){return we*ee},xe=function(we){return we*ae};q.each(function(we){var Me=V.select(this);if(we.del)return Me.remove();var Se=Me.select("text.nums"),Ie=we.anchor,Ve=Ie==="end"?-1:1,Ge=j(we),ke=P(we,Z),_e=ke.x,ce=ke.y,ve=Ie==="middle",le="hoverlabel"in we.trace?we.trace.hoverlabel.showarrow:!0,Ae;ve?Ae="M-"+he(we.bx/2+we.tx2width/2)+","+xe(ce-we.by/2)+"h"+he(we.bx)+"v"+xe(we.by)+"h-"+he(we.bx)+"Z":le?Ae="M0,0L"+he(Ve*T+_e)+","+xe(T+ce)+"v"+xe(we.by/2-T)+"h"+he(Ve*we.bx)+"v-"+xe(we.by)+"H"+he(Ve*T+_e)+"V"+xe(ce-T)+"Z":Ae="M"+he(Ve*T+_e)+","+xe(ce-we.by/2)+"h"+he(Ve*we.bx)+"v"+xe(we.by)+"h"+he(-Ve*we.bx)+"Z",Me.select("path").attr("d",Ae);var Be=_e+Ge.textShiftX,Xe=ce+we.ty0-we.by/2+f,Ye=we.textAlign||"auto";Ye!=="auto"&&(Ye==="left"&&Ie!=="start"?(Se.attr("text-anchor","start"),Be=ve?-we.bx/2-we.tx2width/2+f:-we.bx-f):Ye==="right"&&Ie!=="end"&&(Se.attr("text-anchor","end"),Be=ve?we.bx/2-we.tx2width/2-f:we.bx+f)),Se.call(t.positionText,he(Be),xe(Xe)),we.tx2width&&(Me.select("text.name").call(t.positionText,he(Ge.text2ShiftX+Ge.alignShift*f+_e),xe(ce+we.ty0-we.by/2+f)),Me.select("rect").call(r.setRect,he(Ge.text2ShiftX+(Ge.alignShift-1)*we.tx2width/2+_e),xe(ce-we.by/2-1),he(we.tx2width),xe(we.by+2)))})}function $(q,Z){var ee=q.index,ae=q.trace||{},he=q.cd[0],xe=q.cd[ee]||{};function we(ke){return ke||p(ke)&&ke===0}var Me=Array.isArray(ee)?function(ke,_e){var ce=b.castOption(he,ee,ke);return we(ce)?ce:b.extractOption({},ae,"",_e)}:function(ke,_e){return b.extractOption(xe,ae,ke,_e)};function Se(ke,_e,ce){var ve=Me(_e,ce);we(ve)&&(q[ke]=ve)}if(Se("hoverinfo","hi","hoverinfo"),Se("bgcolor","hbg","hoverlabel.bgcolor"),Se("borderColor","hbc","hoverlabel.bordercolor"),Se("fontFamily","htf","hoverlabel.font.family"),Se("fontSize","hts","hoverlabel.font.size"),Se("fontColor","htc","hoverlabel.font.color"),Se("fontWeight","htw","hoverlabel.font.weight"),Se("fontStyle","hty","hoverlabel.font.style"),Se("fontVariant","htv","hoverlabel.font.variant"),Se("nameLength","hnl","hoverlabel.namelength"),Se("textAlign","hta","hoverlabel.align"),q.posref=Z==="y"||Z==="closest"&&ae.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=b.constrain(q.x0,0,q.xa._length),q.x1=b.constrain(q.x1,0,q.xa._length),q.y0=b.constrain(q.y0,0,q.ya._length),q.y1=b.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:s.hoverLabelText(q.xa,q.xLabelVal,ae.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:s.hoverLabelText(q.ya,q.yLabelVal,ae.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!isNaN(q.xerr)&&!(q.xa.type==="log"&&q.xerr<=0)){var Ie=s.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+Ie+" / -"+s.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+Ie,Z==="x"&&(q.distance+=1)}if(!isNaN(q.yerr)&&!(q.ya.type==="log"&&q.yerr<=0)){var Ve=s.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+Ve+" / -"+s.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+Ve,Z==="y"&&(q.distance+=1)}var Ge=q.hoverinfo||q.trace.hoverinfo;return Ge&&Ge!=="all"&&(Ge=Array.isArray(Ge)?Ge:Ge.split("+"),Ge.indexOf("x")===-1&&(q.xLabel=void 0),Ge.indexOf("y")===-1&&(q.yLabel=void 0),Ge.indexOf("z")===-1&&(q.zLabel=void 0),Ge.indexOf("text")===-1&&(q.text=void 0),Ge.indexOf("name")===-1&&(q.name=void 0)),q}function Q(q,Z,ee){var ae=ee.container,he=ee.fullLayout,xe=he._size,we=ee.event,Me=!!Z.hLinePoint,Se=!!Z.vLinePoint,Ie,Ve;if(ae.selectAll(".spikeline").remove(),!!(Se||Me)){var Ge=a.combine(he.plot_bgcolor,he.paper_bgcolor);if(Me){var ke=Z.hLinePoint,_e,ce;Ie=ke&&ke.xa,Ve=ke&&ke.ya;var ve=Ve.spikesnap;ve==="cursor"?(_e=we.pointerX,ce=we.pointerY):(_e=Ie._offset+ke.x,ce=Ve._offset+ke.y);var le=a.wcagContrast(ke.color,Ge)<1.5?a.contrast(Ge):ke.color,Ae=Ve.spikemode,Be=Ve.spikethickness,Xe=Ve.spikecolor||le,Ye=s.getPxPosition(q,Ve),yt,gt;if(Ae.indexOf("toaxis")!==-1||Ae.indexOf("across")!==-1){if(Ae.indexOf("toaxis")!==-1&&(yt=Ye,gt=_e),Ae.indexOf("across")!==-1){var Tt=Ve._counterDomainMin,At=Ve._counterDomainMax;Ve.anchor==="free"&&(Tt=Math.min(Tt,Ve.position),At=Math.max(At,Ve.position)),yt=xe.l+Tt*xe.w,gt=xe.l+At*xe.w}ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ce,y2:ce,"stroke-width":Be,stroke:Xe,"stroke-dasharray":r.dashStyle(Ve.spikedash,Be)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ce,y2:ce,"stroke-width":Be+2,stroke:Ge}).classed("spikeline",!0).classed("crisp",!0)}Ae.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:Ye+(Ve.side!=="right"?Be:-Be),cy:ce,r:Be,fill:Xe}).classed("spikeline",!0)}if(Se){var $t=Z.vLinePoint,rr,_r;Ie=$t&&$t.xa,Ve=$t&&$t.ya;var Xt=Ie.spikesnap;Xt==="cursor"?(rr=we.pointerX,_r=we.pointerY):(rr=Ie._offset+$t.x,_r=Ve._offset+$t.y);var or=a.wcagContrast($t.color,Ge)<1.5?a.contrast(Ge):$t.color,Ot=Ie.spikemode,vt=Ie.spikethickness,ht=Ie.spikecolor||or,De=s.getPxPosition(q,Ie),Ne,We;if(Ot.indexOf("toaxis")!==-1||Ot.indexOf("across")!==-1){if(Ot.indexOf("toaxis")!==-1&&(Ne=De,We=_r),Ot.indexOf("across")!==-1){var Ke=Ie._counterDomainMin,Je=Ie._counterDomainMax;Ie.anchor==="free"&&(Ke=Math.min(Ke,Ie.position),Je=Math.max(Je,Ie.position)),Ne=xe.t+(1-Je)*xe.h,We=xe.t+(1-Ke)*xe.h}ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt,stroke:ht,"stroke-dasharray":r.dashStyle(Ie.spikedash,vt)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt+2,stroke:Ge}).classed("spikeline",!0).classed("crisp",!0)}Ot.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:rr,cy:De-(Ie.side!=="top"?vt:-vt),r:vt,fill:ht}).classed("spikeline",!0)}}}function re(q,Z,ee){if(!ee||ee.length!==q._hoverdata.length)return!0;for(var ae=ee.length-1;ae>=0;ae--){var he=ee[ae],xe=q._hoverdata[ae];if(he.curveNumber!==xe.curveNumber||String(he.pointNumber)!==String(xe.pointNumber)||String(he.pointNumbers)!==String(xe.pointNumbers)||he.binNumber!==xe.binNumber)return!0}return!1}function ne(q,Z){return!Z||Z.vLinePoint!==q._spikepoints.vLinePoint||Z.hLinePoint!==q._spikepoints.hLinePoint}function se(q,Z){return t.plainText(q||"",{len:Z,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function G(q,Z){for(var ee=Z.charAt(0),ae=[],he=[],xe=[],we=0;weq.offsetTop+q.clientTop,H=q=>q.offsetLeft+q.clientLeft;function Y(q,Z){var ee=q._fullLayout,ae=Z.getBoundingClientRect(),he=ae.left,xe=ae.top,we=he+ae.width,Me=xe+ae.height,Se=b.apply3DTransform(ee._invTransform)(he,xe),Ie=b.apply3DTransform(ee._invTransform)(we,Me),Ve=Se[0],Ge=Se[1],ke=Ie[0],_e=Ie[1];return{x:Ve,y:Ge,width:ke-Ve,height:_e-Ge,top:Math.min(Ge,_e),left:Math.min(Ve,ke),right:Math.max(Ve,ke),bottom:Math.max(Ge,_e)}}}}),c1=ze({"src/components/fx/hoverlabel_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover;V.exports=function(l,e,t,n){n=n||{};var r=e.legend;function a(o){n.font[o]||(n.font[o]=r?e.legend.font[o]:e.font[o])}e&&E(e.hovermode)&&(n.font||(n.font={}),a("size"),a("family"),a("color"),a("weight"),a("style"),a("variant"),r?(n.bgcolor||(n.bgcolor=b.combine(e.legend.bgcolor,e.paper_bgcolor)),n.bordercolor||(n.bordercolor=e.legend.bordercolor)):n.bgcolor||(n.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",n.bgcolor),t("hoverlabel.bordercolor",n.bordercolor),t("hoverlabel.namelength",n.namelength),t("hoverlabel.showarrow",n.showarrow),p.coerceFont(t,"hoverlabel.font",n.font),t("hoverlabel.align",n.align)}}}),$I=ze({"src/components/fx/layout_global_defaults.js"(J,V){"use strict";var p=Nr(),b=c1(),E=rv();V.exports=function(l,e){function t(n,r){return p.coerce(l,e,E,n,r)}b(l,e,t)}}}),KI=ze({"src/components/fx/defaults.js"(J,V){"use strict";var p=Nr(),b=qm(),E=c1();V.exports=function(l,e,t,n){function r(o,s){return p.coerce(l,e,b,o,s)}var a=p.extendFlat({},n.hoverlabel);e.hovertemplate&&(a.namelength=-1),E(l,e,r,a)}}}),s5=ze({"src/components/fx/hovermode_defaults.js"(J,V){"use strict";var p=Nr(),b=rv();V.exports=function(k,l){function e(t,n){return l[t]!==void 0?l[t]:p.coerce(k,l,b,t,n)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),JI=ze({"src/components/fx/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=rv(),E=s5(),k=c1();V.exports=function(e,t){function n(m,h){return p.coerce(e,t,b,m,h)}var r=E(e,t);r&&(n("hoverdistance"),n("spikedistance"),r.indexOf("unified")!==-1&&n("hoversort"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((o||s)&&c===1||o&&s&&c===2)&&(t.dragmode="pan"),k(e,t,n),p.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),QI=ze({"src/components/fx/calc.js"(J,V){"use strict";var p=Nr(),b=mi();V.exports=function(l){var e=l.calcdata,t=l._fullLayout;function n(c){return function(m){return p.coerceHoverinfo({hoverinfo:m},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),Dx=ze({"src/components/shapes/draw_newshape/constants.js"(J,V){"use strict";var p=32;V.exports={CIRCLE_SIDES:p,i000:0,i090:p/4,i180:p/2,i270:p/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Fx=ze({"src/components/selections/helpers.js"(J,V){"use strict";var p=Nr().strTranslate;function b(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function E(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function k(e){var t=e._id.charAt(0)==="y"?1:0;return function(n){return b(e,n[t])}}function l(e){return p(e.xaxis._offset,e.yaxis._offset)}V.exports={p2r:b,r2p:E,axValue:k,getTransform:l}}}),uv=ze({"src/components/shapes/draw_newshape/helpers.js"(J){"use strict";var V=Kw(),p=Dx(),b=p.CIRCLE_SIDES,E=p.SQRT2,k=Fx(),l=k.p2r,e=k.r2p,t=[0,3,4,5,6,1,2],n=[0,3,4,1,2];J.writePaths=function(o){var s=o.length;if(!s)return"M0,0Z";for(var c="",m=0;m0&&w{let s=o.charAt(0),c=r[s].drawn!==void 0;return a+(c?1:0)},0)},J.getDataToPixel=function(l,e,t,n,r){var a=l._fullLayout._size,o;if(e)if(r==="domain")o=function(c){return e._length*(n?1-c:c)+e._offset};else{var s=J.shapePositionToRange(e);o=function(c){var m=k(e,t);return e._offset+e.r2p(s(c,!0))+m},e.type==="date"&&(o=J.decodeDate(o))}else n?o=function(c){return a.t+a.h*(1-c)}:o=function(c){return a.l+a.w*c};return o},J.getPixelToData=function(l,e,t,n){var r=l._fullLayout._size,a;if(e)if(n==="domain")a=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var o=J.rangeToShapePosition(e);a=function(s){return o(e.p2r(s-e._offset))}}else t?a=function(s){return 1-(s-r.t)/r.h}:a=function(s){return(s-r.l)/r.w};return a},J.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,n=Math.round(l);return t?n+.5:n},J.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&t.xref!=="paper"&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(n.yaxis=l._fullLayout[t.yref+"axis"])),n.xsizemode=t.xsizemode,n.ysizemode=t.ysizemode,n.xanchor=t.xanchor,n.yanchor=t.yanchor,{options:t,plotinfo:n}},J.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(n.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:n}},J.getPathString=function(l,e){let t=e.type,n=b.getRefType(e.xref),r=b.getRefType(e.yref),a=l._fullLayout._size;var o,s,c,m,h,v,g,i,w,S,M,C;function _(O,D,B,F){var P;if(O)if(D==="domain")F?P=function(j){return O._offset+O._length*(1-j)}:P=function(j){return O._offset+O._length*j};else{let j=J.shapePositionToRange(O);P=function(U){return O._offset+O.r2p(j(U,!0))},B==="path"&&O.type==="date"&&(P=J.decodeDate(P))}else F?P=function(j){return a.t+a.h*(1-j)}:P=function(j){return a.l+a.w*j};return P}if(n==="array"?(g=[],o=e.xref.map(function(O){return b.getFromId(l,O)}),g=e.xref.map(function(O,D){return _(o[D],b.getRefType(O),t,!1)})):(o=b.getFromId(l,e.xref),g=_(o,n,t,!1)),r==="array"?(i=[],s=e.yref.map(function(O){return b.getFromId(l,O)}),i=e.yref.map(function(O,D){return _(s[D],b.getRefType(O),t,!0)})):(s=b.getFromId(l,e.yref),i=_(s,r,t,!0)),t==="path")return E(e,g,i);if(n==="array")c=k(o[0],e.x0shift),m=k(o[1],e.x1shift),w=g[0](e.x0)+c,S=g[1](e.x1)+m;else if(c=k(o,e.x0shift),m=k(o,e.x1shift),e.xsizemode==="pixel"){let O=g(e.xanchor);w=O+e.x0+c,S=O+e.x1+m}else w=g(e.x0)+c,S=g(e.x1)+m;if(r==="array")h=k(s[0],e.y0shift),v=k(s[1],e.y1shift),M=i[0](e.y0)+h,C=i[1](e.y1)+v;else if(h=k(s,e.y0shift),v=k(s,e.y1shift),e.ysizemode==="pixel"){let O=i(e.yanchor);M=O-e.y0+h,C=O-e.y1+v}else M=i(e.y0)+h,C=i(e.y1)+v;if(t==="line")return"M"+w+","+M+"L"+S+","+C;if(t==="rect")return"M"+w+","+M+"H"+S+"V"+C+"H"+w+"Z";var T=(w+S)/2,f=(M+C)/2,u=Math.abs(T-w),A=Math.abs(f-M),x="A"+u+","+A,z=T+u+","+f,I=T+","+(f-A);return"M"+z+x+" 0 1,1 "+I+x+" 0 0,1 "+z+"Z"};function E(l,e,t){let n=l.path,r=l.xsizemode,a=l.ysizemode,o=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),m=Array.isArray(l.yref);var h=0,v=0;return n.replace(V.segmentRE,function(g){var i=0,w=g.charAt(0),S=V.paramIsX[w],M=V.paramIsY[w],C=V.numParams[w];let _=S.drawn!==void 0,T=M.drawn!==void 0,f=c?e[h]:e,u=m?t[v]:t;var A=g.slice(1).replace(V.paramRE,function(x){return S[i]?r==="pixel"?x=f(o)+Number(x):x=f(x):M[i]&&(a==="pixel"?x=u(s)-Number(x):x=u(x)),i++,i>C&&(x="X"),x});return i>C&&(A=A.replace(/[\s,]*X.*/,""),p.log("Ignoring extra params in segment "+g)),_&&h++,T&&v++,w+A})}J.getPixelShift=k;function k(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),u5=ze({"src/components/shapes/display_labels.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=Cs(),k=$i(),l=uv().readPaths,e=cv(),t=e.getPathString,n=Sx(),r=dc().FROM_TL;V.exports=function(c,m,h,v){if(v.selectAll(".shape-label").remove(),!!(h.label.text||h.label.texttemplate)){var g;if(h.label.texttemplate){var i={};if(h.type!=="path"){var w=b.getFromId(c,h.xref),S=b.getFromId(c,h.yref);let Z=Array.isArray(h.xref),ee=Array.isArray(h.yref);for(var M in n){var C=typeof n[M]=="function",_=!Z||n.simpleXVariables.includes(M),T=!ee||n.simpleYVariables.includes(M);if(C&&_&&T){var f=n[M](h,w,S);f!==void 0&&(i[M]=f)}}}g=p.texttemplateStringForShapes({data:[i],fallback:h.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:h.label.texttemplate})}else g=h.label.text;var u={"data-index":m},A=h.label.font,x={"data-notex":1},z=v.append("g").attr(u).classed("shape-label",!0),I=z.append("text").attr(x).classed("shape-label-text",!0).text(g),O,D,B,F;if(h.path){var P=t(c,h),j=l(P,c);O=1/0,B=1/0,D=-1/0,F=-1/0;for(var U=0;Ue.getDataToPixel(c,ve,ce,!1,le)(_e),ke=(_e,ce,ve,le)=>e.getDataToPixel(c,ve,ce,!0,le)(_e);if(h.xsizemode==="pixel"){let _e=Ge(h.xanchor,void 0,ae,Me),ce=e.getPixelShift(ae,h.x0shift),ve=e.getPixelShift(ae,h.x1shift);O=_e+h.x0+ce,D=_e+h.x1+ve}else O=Ge(h.x0,h.x0shift,ae,Me),D=Ge(h.x1,h.x1shift,he,Se);if(h.ysizemode==="pixel"){let _e=ke(h.yanchor,void 0,xe,Ie),ce=e.getPixelShift(xe,h.y0shift),ve=e.getPixelShift(xe,h.y1shift);B=_e-h.y0+ce,F=_e-h.y1+ve}else B=ke(h.y0,h.y0shift,xe,Ie),F=ke(h.y1,h.y1shift,we,Ve)}var G=h.label.textangle;G==="auto"&&(h.type==="line"?G=a(O,B,D,F):G=0),I.call(function(Z){return Z.call(k.font,A).attr({}),E.convertToTspans(Z,c),Z});var X=k.bBox(I.node()),K=o(O,B,D,F,h,G,X),H=K.textx,Y=K.texty,q=K.xanchor;I.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[q],y:Y,x:H,transform:"rotate("+G+","+H+","+Y+")"}).call(E.positionText,H,Y)}};function a(s,c,m,h){var v,g;return g=Math.abs(m-s),m>=s?v=c-h:v=h-c,-180/Math.PI*Math.atan2(v,g)}function o(s,c,m,h,v,g,i){var w=v.label.textposition,S=v.label.textangle,M=v.label.padding,C=v.type,_=Math.PI/180*g,T=Math.sin(_),f=Math.cos(_),u=v.label.xanchor,A=v.label.yanchor,x,z,I,O;if(C==="line"){w==="start"?(x=s,z=c):w==="end"?(x=m,z=h):(x=(s+m)/2,z=(c+h)/2),u==="auto"&&(w==="start"?S==="auto"?m>s?u="left":ms?u="right":ms?u="right":ms?u="left":m1&&!(ke.length===2&&ke[1][0]==="Z")&&(G===0&&(ke[0][0]="M"),x[se]=ke,B(),F())}}function he(ke,_e){if(ke===2){se=+_e.srcElement.getAttribute("data-i"),G=+_e.srcElement.getAttribute("data-j");var ce=x[se];!g(ce)&&!i(ce)&&ae()}}function xe(ke){re=[];for(var _e=0;_e{if(!I._dragging&&I._fullLayout.hoveranywhere){let j=F(P);j&&c.hover(I,j,D.id)}}),B.addEventListener("click",P=>{if(!I._dragged&&I._fullLayout.clickanywhere){let j=F(P);j&&c.click(I,j,D.id)}})}function _(I,O,D){let B=D.xref,F=D.yref;if(Array.isArray(B)||Array.isArray(F)){let P="clip"+O._fullLayout._uid+"shape"+D._index,j=T(O,B,F);E.ensureSingleById(O._fullLayout._clips,"clipPath",P,function(U){U.append("rect")}).select("rect").attr(j),a.setClipUrl(I,P,O)}else{let P=(B+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");a.setClipUrl(I,P?"clip"+O._fullLayout._uid+P:null,O)}}function T(I,O,D){let B=I._fullLayout._size;function F(U,$){let Q=(Array.isArray(U)?U:[U]).map(se=>k.getFromId(I,se)).filter(Boolean);if(!Q.length)return $?[B.t,B.t+B.h]:[B.l,B.l+B.w];let re=Q.map(function(se){return se._offset}),ne=Q.map(function(se){return se._offset+se._length});return[Math.min(...re),Math.max(...ne)]}let P=F(O,!1),j=F(D,!0);return{x:P[0],y:j[0],width:P[1]-P[0],height:j[1]-j[0]}}function f(I,O,D,B,F,P){var j=10,U=10,$=D.xsizemode==="pixel",Q=D.ysizemode==="pixel",re=D.type==="line",ne=D.type==="path",se=P.modifyItem,G,X,K,H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve=p.select(O.node().parentNode),Ge=k.getFromId(I,D.xref),ke=k.getRefType(D.xref),_e=k.getFromId(I,D.yref),ce=k.getRefType(D.yref),ve=D.x0shift,le=D.x1shift,Ae=D.y0shift,Be=D.y1shift,Xe=function(Je,et){var Mt=v.getDataToPixel(I,Ge,et,!1,ke);return Mt(Je)},Ye=function(Je,et){var Mt=v.getDataToPixel(I,_e,et,!0,ce);return Mt(Je)},yt=v.getPixelToData(I,Ge,!1,ke),gt=v.getPixelToData(I,_e,!0,ce),Tt=rr(),At={element:Tt.node(),gd:I,prepFn:or,doneFn:Ot,clickFn:vt},$t;s.init(At),Tt.node().onmousemove=Xt;function rr(){return re?_r():O}function _r(){var Je=10,et=Math.max(D.line.width,Je),Mt=F.append("g").attr("data-index",B).attr("drag-helper",!0);Mt.append("path").attr("d",O.attr("d")).style({cursor:"move","stroke-width":et,"stroke-opacity":"0"});var pt={"fill-opacity":"0"},Pt=Math.max(et/2,Je);return Mt.append("circle").attr({"data-line-point":"start-point",cx:$?Xe(D.xanchor)+D.x0:Xe(D.x0,ve),cy:Q?Ye(D.yanchor)-D.y0:Ye(D.y0,Ae),r:Pt}).style(pt).classed("cursor-grab",!0),Mt.append("circle").attr({"data-line-point":"end-point",cx:$?Xe(D.xanchor)+D.x1:Xe(D.x1,le),cy:Q?Ye(D.yanchor)-D.y1:Ye(D.y1,Be),r:Pt}).style(pt).classed("cursor-grab",!0),Mt}function Xt(Je){if(w(I)){$t=null;return}if(re)Je.target.tagName==="path"?$t="move":$t=Je.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var et=At.element.getBoundingClientRect(),Mt=et.right-et.left,pt=et.bottom-et.top,Pt=Je.clientX-et.left,Ct=Je.clientY-et.top,qt=!ne&&Mt>j&&pt>U&&!Je.shiftKey?s.getCursor(Pt/Mt,1-Ct/pt):"move";m(O,qt),$t=qt.split("-")[0]}}function or(Je){w(I)||($&&(Y=Xe(D.xanchor)),Q&&(q=Ye(D.yanchor)),D.type==="path"?Ie=D.path:(G=$?D.x0:Xe(D.x0),X=Q?D.y0:Ye(D.y0),K=$?D.x1:Xe(D.x1),H=Q?D.y1:Ye(D.y1)),GH?(Z=X,xe="y0",ee=H,we="y1"):(Z=H,xe="y1",ee=X,we="y0"),Xt(Je),Ne(F,D),Ke(O,D,I),At.moveFn=$t==="move"?ht:De,At.altKey=Je.altKey)}function Ot(){w(I)||(m(O),We(F),_(O,I,D),b.call("_guiRelayout",I,P.getUpdateObj()))}function vt(){w(I)||We(F)}function ht(Je,et){if(D.type==="path"){var Mt=function(Ct){return Ct},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(Y+Je)):(pt=function(qt){return yt(Xe(qt)+Je)},Ge&&Ge.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(qt){return gt(Ye(qt)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else $?se("xanchor",D.xanchor=yt(Y+Je)):(se("x0",D.x0=yt(G+Je)),se("x1",D.x1=yt(K+Je))),Q?se("yanchor",D.yanchor=gt(q+et)):(se("y0",D.y0=gt(X+et)),se("y1",D.y1=gt(H+et)));O.attr("d",g(I,D)),Ne(F,D),t(I,B,D,Ve)}function De(Je,et){if(ne){var Mt=function(Zr){return Zr},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(Y+Je)):(pt=function(ha){return yt(Xe(ha)+Je)},Ge&&Ge.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(ha){return gt(Ye(ha)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else if(re){if($t==="resize-over-start-point"){var Ct=G+Je,qt=Q?X-et:X+et;se("x0",D.x0=$?Ct:yt(Ct)),se("y0",D.y0=Q?qt:gt(qt))}else if($t==="resize-over-end-point"){var Vt=K+Je,Ht=Q?H-et:H+et;se("x1",D.x1=$?Vt:yt(Vt)),se("y1",D.y1=Q?Ht:gt(Ht))}}else{var Sr=function(Zr){return $t.indexOf(Zr)!==-1},Kr=Sr("n"),Yt=Sr("s"),Rt=Sr("w"),nr=Sr("e"),ur=Kr?Z+et:Z,cr=Yt?ee+et:ee,Rr=Rt?ae+Je:ae,Qr=nr?he+Je:he;Q&&(Kr&&(ur=Z-et),Yt&&(cr=ee-et)),(!Q&&cr-ur>U||Q&&ur-cr>U)&&(se(xe,D[xe]=Q?ur:gt(ur)),se(we,D[we]=Q?cr:gt(cr))),Qr-Rr>j&&(se(Me,D[Me]=$?Rr:yt(Rr)),se(Se,D[Se]=$?Qr:yt(Qr)))}O.attr("d",g(I,D)),Ne(F,D),t(I,B,D,Ve)}function Ne(Je,et){($||Q)&&Mt();function Mt(){var pt=et.type!=="path",Pt=Je.selectAll(".visual-cue").data([0]),Ct=1;Pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var qt=Xe($?et.xanchor:E.midRange(pt?[et.x0,et.x1]:v.extractPathCoords(et.path,h.paramIsX))),Vt=Ye(Q?et.yanchor:E.midRange(pt?[et.y0,et.y1]:v.extractPathCoords(et.path,h.paramIsY)));if(qt=v.roundPositionForSharpStrokeRendering(qt,Ct),Vt=v.roundPositionForSharpStrokeRendering(Vt,Ct),$&&Q){var Ht="M"+(qt-1-Ct)+","+(Vt-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pt.attr("d",Ht)}else if($){var Sr="M"+(qt-1-Ct)+","+(Vt-9-Ct)+"v18 h2 v-18 Z";Pt.attr("d",Sr)}else{var Kr="M"+(qt-9-Ct)+","+(Vt-1-Ct)+"h18 v2 h-18 Z";Pt.attr("d",Kr)}}}function We(Je){Je.selectAll(".visual-cue").remove()}function Ke(Je,et,Mt){var pt=et.xref,Pt=et.yref,Ct=k.getFromId(Mt,pt),qt=k.getFromId(Mt,Pt),Vt="";pt!=="paper"&&!Ct.autorange&&(Vt+=pt),Pt!=="paper"&&!qt.autorange&&(Vt+=Pt),a.setClipUrl(Je,Vt?"clip"+Mt._fullLayout._uid+Vt:null,Mt)}}function u(I,O,D){return I.replace(h.segmentRE,function(B){var F=0,P=B.charAt(0),j=h.paramIsX[P],U=h.paramIsY[P],$=h.numParams[P],Q=B.slice(1).replace(h.paramRE,function(re){return F>=$||(j[F]?re=O(re):U[F]&&(re=D(re)),F++),re});return P+Q})}function A(I,O){if(S(I)){var D=O.node(),B=+D.getAttribute("data-index");if(B>=0){if(B===I._fullLayout._activeShapeIndex){x(I);return}I._fullLayout._activeShapeIndex=B,I._fullLayout._deactivateShape=x,i(I)}}}function x(I){if(S(I)){var O=I._fullLayout._activeShapeIndex;O>=0&&(n(I),delete I._fullLayout._activeShapeIndex,i(I))}}function z(I){if(S(I)){n(I);var O=I._fullLayout._activeShapeIndex,D=(I.layout||{}).shapes||[];if(O{let o=E(e),s=t.append("div").classed("plotly-cloud-dialog-box",!0);if(s.append("div").classed("plotly-cloud-dialog-title",!0).text(o.DIALOG_TITLE),n===b.plotlyServerURL){let m=s.append("div").classed("plotly-cloud-dialog-message",!0),h=new URL(n).origin,v=o.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),g=v[0],i=v[2],w=v[4];m.append("span").text(g),m.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",h).attr("target","_blank").text(i),m.append("span").text(w),m.append("div").classed("plotly-cloud-dialog-message--account",!0).text(o.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let m=new URL(n),h=m.hostname,v=m.origin,g=o.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),i=g[0],w=g[4],S=s.append("div").classed("plotly-cloud-dialog-message",!0);S.append("span").text(i),S.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",v).attr("target","_blank").text(h),S.append("span").text(w)}let c=s.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(o.DIALOG_CANCEL).on("click",a),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(o.DIALOG_CONFIRM).on("click",r)},l=(e,t,n)=>{let r=p.select(e._fullLayout._paperdiv.node());r.selectAll(".plotly-cloud-dialog").remove();let a=r.append("div").classed("plotly-cloud-dialog",!0),o=()=>{a.remove(),document.removeEventListener("keydown",s)},s=c=>{(c.key==="Escape"||c.keyCode===27)&&o()};document.addEventListener("keydown",s),a.on("click",()=>{p.event.target===a.node()&&o()}),k(e,a,t,()=>{o(),n()},o)};V.exports=l}}),c5=ze({"src/components/modebar/buttons.js"(J,V){"use strict";var p=mi(),b=cl(),E=Xl(),k=Ix(),l=Ox().eraseActiveShape,e=rD(),t=Nr(),n=t._,r=V.exports={};r.toImage={name:"toImage",title:function(_){var T=_._context.toImageButtonOptions||{},f=T.format||"png";return f==="png"?n(_,"Download plot as a PNG"):n(_,"Download plot")},icon:k.camera,click:function(_){var T=_._context.toImageButtonOptions,f={format:T.format||"png"};t.notifier(n(_,"Preparing image - this may take a few seconds"),"long",_),["filename","width","height","scale"].forEach(function(u){u in T&&(f[u]=T[u])}),p.call("downloadImage",_,f).then(function(u){t.notifier(n(_,"Image download succeeded")+" - "+u,"long",_)}).catch(function(){t.notifier(n(_,"Sorry, there was a problem downloading your image!"),"long",_)})}},r.sendChartToCloud={name:"sendChartToCloud",title:function(_){return n(_,"Share chart...")},icon:k.cloudupload,click:function(_){var T=(window.PLOTLYENV||{}).BASE_URL||_._context.plotlyServerURL;if(!T){console.error("No destination URL provided (plotlyServerURL is empty)");return}var f;try{f=new URL(T)}catch{console.error("Invalid plotlyServerURL: "+T);return}let u=["http:","https:"];if(!u.includes(f.protocol)){console.error(`Invalid protocol '${f.protocol}' in plotlyServerURL '${T}'. Must be one of: ${u.join(", ")}`);return}e(_,T,function(){b.sendDataToCloud(_,T)})}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(_){return n(_,"Zoom")},attr:"dragmode",val:"zoom",icon:k.zoombox,click:a},r.pan2d={name:"pan2d",_cat:"pan",title:function(_){return n(_,"Pan")},attr:"dragmode",val:"pan",icon:k.pan,click:a},r.select2d={name:"select2d",_cat:"select",title:function(_){return n(_,"Box Select")},attr:"dragmode",val:"select",icon:k.selectbox,click:a},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(_){return n(_,"Lasso Select")},attr:"dragmode",val:"lasso",icon:k.lasso,click:a},r.drawclosedpath={name:"drawclosedpath",title:function(_){return n(_,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:k.drawclosedpath,click:a},r.drawopenpath={name:"drawopenpath",title:function(_){return n(_,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:k.drawopenpath,click:a},r.drawline={name:"drawline",title:function(_){return n(_,"Draw line")},attr:"dragmode",val:"drawline",icon:k.drawline,click:a},r.drawrect={name:"drawrect",title:function(_){return n(_,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:k.drawrect,click:a},r.drawcircle={name:"drawcircle",title:function(_){return n(_,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:k.drawcircle,click:a},r.eraseshape={name:"eraseshape",title:function(_){return n(_,"Erase active shape")},icon:k.eraseshape,click:l},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(_){return n(_,"Zoom in")},attr:"zoom",val:"in",icon:k.zoom_plus,click:a},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(_){return n(_,"Zoom out")},attr:"zoom",val:"out",icon:k.zoom_minus,click:a},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(_){return n(_,"Autoscale")},attr:"zoom",val:"auto",icon:k.autoscale,click:a},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(_){return n(_,"Reset axes")},attr:"zoom",val:"reset",icon:k.home,click:a},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(_){return n(_,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:k.tooltip_basic,gravity:"ne",click:a},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(_){return n(_,"Compare data on hover")},attr:"hovermode",val:function(_){return _._fullLayout._isHoriz?"y":"x"},icon:k.tooltip_compare,gravity:"ne",click:a};function a(_,T){var f=T.currentTarget,u=f.getAttribute("data-attr"),A=f.getAttribute("data-val")||!0,x=_._fullLayout,z={},I=E.list(_,null,!0),O=x._cartesianSpikesEnabled,D,B;if(u==="zoom"){var F=A==="in"?.5:2,P=(1+F)/2,j=(1-F)/2,U,$;for(B=0;B-K),[$,Q]=F.invert(B.midPt),{minscale:re}=D.projection,ne=(f=D.projection.maxscale)!=null?f:1/0,se=Math.min(re,ne),G=Math.max(re,ne),X=x==="in"?h*P:1/h*P;X>G?X=G:Xd5});var jx,h5,d5,p5=zi({"src/components/modebar/attributes.ts"(){"use strict";jx=Yl(f5()),h5={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${jx.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${jx.default.foreButtons.join("*, *")}*.`].join(" ")}},d5=h5}}),aD=ze({"src/components/modebar/defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=(p5(),Po(Nx)).default;V.exports=function(e,t){var n=e.modebar||{},r=E.newContainer(t,"modebar");function a(s,c){return p.coerce(n,r,k,s,c)}a("orientation"),a("bgcolor",b.addOpacity(t.paper_bgcolor,.5));var o=b.contrast(b.rgb(t.modebar.bgcolor));a("color",b.addOpacity(o,.3)),a("activecolor",b.addOpacity(o,.7)),a("uirevision",t.uirevision),a("add"),a("remove")}}}),nD=ze({"src/components/modebar/modebar.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=Ix(),l=ev().version,e=new DOMParser;function t(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var n=t.prototype;n.update=function(o,s){this.graphInfo=o;var c=this.graphInfo._context,m=this.graphInfo._fullLayout,h="modebar-"+m._uid;this.element.setAttribute("id",h),this.element.setAttribute("role","toolbar"),this._uid=h,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),m.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var v=m.modebar,g="#"+h+" .modebar-group";document.querySelectorAll(g).forEach(function(C){C.style.backgroundColor=v.bgcolor});var i=!this.hasButtons(s),w=this.hasLogo!==c.displaylogo,S=this.locale!==c.locale;if(this.locale=c.locale,(i||w||S)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var M=this.getLogo();c.watermark&&(M.className=M.className+" watermark"),m.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),E.setStyleOnHover("#"+h+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},n.updateButtons=function(o){var s=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var m=s.createGroup();c.forEach(function(h){var v=h.name;if(!v)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");s.buttonsNames.push(v);var g=s.createButton(h);s.buttonElements.push(g),m.appendChild(g)}),s.element.appendChild(m)})},n.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=s.bgcolor,o},n.createButton=function(o){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var m=o.title;m===void 0?m=o.name:typeof m=="function"&&(m=m(this.graphInfo)),(m||m===0)&&(c.setAttribute("data-title",m),c.setAttribute("aria-label",m)),o.attr!==void 0&&c.setAttribute("data-attr",o.attr);var h=o.val;h!==void 0&&(typeof h=="function"&&(h=h(this.graphInfo)),c.setAttribute("data-val",h));var v=o.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(i){o.click(s.graphInfo,i),s.updateActiveButton(i.currentTarget)}),c.setAttribute("data-toggle",o.toggle||!1),o.toggle&&p.select(c).classed("active",!0);var g=o.icon;return typeof g=="function"?c.appendChild(g()):c.appendChild(this.createIcon(g||k.question)),c.setAttribute("data-gravity",o.gravity||"n"),c},n.createIcon=function(o){var s=b(o.height)?Number(o.height):o.ascent-o.descent,c="http://www.w3.org/2000/svg",m;if(o.path){m=document.createElementNS(c,"svg"),m.setAttribute("viewBox",[0,0,o.width,s].join(" ")),m.setAttribute("class","icon");var h=document.createElementNS(c,"path");h.setAttribute("d",o.path),o.transform?h.setAttribute("transform",o.transform):o.ascent!==void 0&&h.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),m.appendChild(h)}if(o.svg){var v=e.parseFromString(o.svg,"application/xml");m=v.childNodes[0]}return m.setAttribute("height","1em"),m.setAttribute("width","1em"),m},n.updateActiveButton=function(o){var s=this.graphInfo._fullLayout,c=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(m){var h=m.getAttribute("data-val")||!0,v=m.getAttribute("data-attr"),g=m.getAttribute("data-toggle")==="true",i=p.select(m),w=function(C,_){var T=s.modebar,f=C.querySelector(".icon path");f&&(_||C.matches(":hover")?f.style.fill=T.activecolor:f.style.fill=T.color)};if(g){if(v===c){var S=!i.classed("active");i.classed("active",S),w(m,S)}}else{var M=v===null?v:E.nestedProperty(s,v).get();i.classed("active",M===h),w(m,M===h)}})},n.hasButtons=function(o){var s=this.buttons;if(!s||o.length!==s.length)return!1;for(var c=0;c1?(re=["toggleHover"],ne=["resetViews"]):u?(Q=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],ne=["resetGeo"]):f?(re=["hoverClosest3d"],ne=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(Q=["zoomInMap","zoomOutMap"],re=["toggleHover"],ne=["resetViewMap"]):A?re=["hoverClosestPie"]:B?(re=["hoverClosestCartesian","hoverCompareCartesian"],ne=["resetViewSankey"]):re=["toggleHover"],T&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(g)||P)&&(re=[]),T&&!F&&(Q=["zoomIn2d","zoomOut2d","autoScale2d"],ne[0]!=="resetViews"&&(ne=["resetScale2d"])),f?se=["zoom3d","pan3d","orbitRotation","tableRotation"]:T&&!F||z?se=["zoom2d","pan2d"]:I||u?se=["pan2d"]:O&&(se=["zoom2d"]),o(g)&&se.push("select2d","lasso2d");var G=[],X=function(q){G.indexOf(q)===-1&&re.indexOf(q)!==-1&&G.push(q)};if(Array.isArray(C)){for(var K=[],H=0;HS?g.slice(S):i.slice(w))+M}function c(h,v){for(var g=v._size,i=g.h/g.w,w={},S=Object.keys(h),M=0;Me*z&&!B)){for(S=0;SG&&aene&&(ne=ae);var xe=(ne-re)/(2*se);u/=xe,re=_.l2r(re),ne=_.l2r(ne),_.range=_._input.range=U<$?[re,ne]:[ne,re]}m(_,u)}}}},J.getAxisGroup=function(v,g){for(var i=v._axisMatchGroups,w=0;w=F[1]||$[1]<=F[0])&&Q[0]P[0])return!0}return!1}function M(F){var P=F._fullLayout,j=P._size,U=j.p,$=a.list(F,"",!0),Q,re,ne,se,G,X;if(P._paperdiv.style({width:F._context.responsive&&P.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":P.width+"px",height:F._context.responsive&&P.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(t.setSize,P.width,P.height),F._context.setBackground(F,P.paper_bgcolor),J.drawMainTitle(F),r.manage(F),!P._has("cartesian"))return b.previousPromises(F);function K(De,Ne,We){var Ke=De._lw/2;if(De._id.charAt(0)==="x"){if(Ne){if(We==="top")return Ne._offset-U-Ke}else return j.t+j.h*(1-(De.position||0))+Ke%1;return Ne._offset+Ne._length+U+Ke}if(Ne){if(We==="right")return Ne._offset+Ne._length+U+Ke}else return j.l+j.w*(De.position||0)+Ke%1;return Ne._offset-U-Ke}for(Q=0;Q<$.length;Q++){se=$[Q];var H=se._anchorAxis;se._linepositions={},se._lw=t.crispRound(F,se.linewidth,1),se._mainLinePosition=K(se,H,se.side),se._mainMirrorPosition=se.mirror&&H?K(se,H,o.OPPOSITE_SIDE[se.side]):null}var Y=[],q=[],Z=[],ee=e.opacity(P.paper_bgcolor)===1&&e.opacity(P.plot_bgcolor)===1&&P.paper_bgcolor===P.plot_bgcolor;for(re in P._plots)if(ne=P._plots[re],ne.mainplot)ne.bg&&ne.bg.remove(),ne.bg=void 0;else{var ae=ne.xaxis.domain,he=ne.yaxis.domain,xe=ne.plotgroup;if(S(ae,he,Z)&&re.indexOf(w)===-1){var we=xe.node(),Me=ne.bg=E.ensureSingle(xe,"rect","bg");we.insertBefore(Me.node(),we.childNodes[0]),q.push(re)}else xe.select("rect.bg").remove(),Z.push([ae,he]),ee||(Y.push(re),q.push(re))}var Se=P._bgLayer.selectAll(".bg").data(Y);for(Se.enter().append("rect").classed("bg",!0),Se.exit().remove(),Se.each(function(De){P._plots[De].bg=V.select(this)}),Q=0;Q0){x(F,Q,G,se),ne.attr({x:re,y:Q,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Q);var X=(P.text.match(k.BR_TAG_ALL)||[]).length;if(X){var K=o.LINE_SPACING*X+o.MID_SHIFT;P.y===0&&(K=-K),ne.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",ee)})}var H=V.select(F).selectAll(".gtitle-subtitle");if(H.node()){var Y=ne.node().getBBox(),q=Y.y+Y.height,Z=q+n.SUBTITLE_PADDING_EM*P.subtitle.font.size;H.attr({x:re,y:Z,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Z)}}}};function f(F,P,j,U,$){var Q=P.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,re=E.isTopAnchor(P)?U:U-$,ne=j==="b"?Q-re:re;return E.isTopAnchor(P)&&j==="t"||E.isBottomAnchor(P)&&j==="b"?!1:ne<$}function u(F,P,j,U,$){var Q=0;return j==="middle"&&(Q+=$/2),F==="t"?(j==="top"&&(Q+=$),Q+=U-P*U):(j==="bottom"&&(Q+=$),Q+=P*U),Q}function A(F,P,j){var U=P.y,$=P.yanchor,Q=U>.5?"t":"b",re=F._fullLayout.margin[Q],ne=0;return P.yref==="paper"?ne=j+P.pad.t+P.pad.b:P.yref==="container"&&(ne=u(Q,U,$,F._fullLayout.height,j)+P.pad.t+P.pad.b),ne>re?ne:0}function x(F,P,j,U){var $="title.automargin",Q=F._fullLayout.title,re=Q.y>.5?"t":"b",ne={x:Q.x,y:Q.y,t:0,b:0},se={};Q.yref==="paper"&&f(F,Q,re,P,U)?ne[re]=j:Q.yref==="container"&&(se[re]=j,F._fullLayout._reservedMargin[$]=se),b.allowAutoMargin(F,$),b.autoMargin(F,$,ne)}function z(F,P){var j=F.title,U=F._size,$=0;switch(P===v?$=j.pad.l:P===i&&($=-j.pad.r),j.xref){case"paper":return U.l+U.w*j.x+$;case"container":default:return F.width*j.x+$}}function I(F,P){var j=F.title,U=F._size,$=0;if(P==="0em"||!P?$=-j.pad.b:P===o.CAP_SHIFT+"em"&&($=j.pad.t),j.y==="auto")return U.t/2;switch(j.yref){case"paper":return U.t+U.h-U.h*j.y+$;case"container":default:return F.height-F.height*j.y+$}}function O(F){return F==="top"?o.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function D(F){var P=F.title,j=g;return E.isRightAnchor(P)?j=i:E.isLeftAnchor(P)&&(j=v),j}function B(F){var P=F.title,j="0em";return E.isTopAnchor(P)?j=o.CAP_SHIFT+"em":E.isMiddleAnchor(P)&&(j=o.MID_SHIFT+"em"),j}J.doTraceStyle=function(F){var P=F.calcdata,j=[],U;for(U=0;U=0;D--){var B=C.append("path").attr(T).style("opacity",D?.1:f).call(k.stroke,A).call(k.fill,u).call(l.dashLine,D?"solid":z,D?4+x:x);if(s(B,v,w),I){var F=e(v.layout,"selections",w);B.style({cursor:"move"});var P={element:B.node(),plotinfo:S,gd:v,editHelpers:F,isActiveSelection:!0},j=p(_,v);b(j,B,P)}else B.style("pointer-events",D?"all":"none");O[D]=B}var U=O[0],$=O[1];$.node().addEventListener("click",function(){return c(v,U)})}}function s(v,g,i){var w=i.xref+i.yref;l.setClipUrl(v,"clip"+g._fullLayout._uid+w,g)}function c(v,g){if(a(v)){var i=g.node(),w=+i.getAttribute("data-index");if(w>=0){if(w===v._fullLayout._activeSelectionIndex){h(v);return}v._fullLayout._activeSelectionIndex=w,v._fullLayout._deactivateSelection=h,r(v)}}}function m(v){if(a(v)){var g=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=g,v._fullLayout._deactivateSelection=h,r(v)}}function h(v){if(a(v)){var g=v._fullLayout._activeSelectionIndex;g>=0&&(E(v),delete v._fullLayout._activeSelectionIndex,r(v))}}}}),oD=ze({"node_modules/polybooljs/lib/build-log.js"(J,V){function p(){var b,E=0,k=!1;function l(e,t){return b.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),b}return b={list:[],segmentId:function(){return E++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,n){return l("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,n){return l("status",{seg:e,above:t,below:n})},vert:function(e){return e===k?b:(k=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},b}V.exports=p}}),sD=ze({"node_modules/polybooljs/lib/epsilon.js"(J,V){function p(b){typeof b!="number"&&(b=1e-10);var E={epsilon:function(k){return typeof k=="number"&&(b=k),b},pointAboveOrOnLine:function(k,l,e){var t=l[0],n=l[1],r=e[0],a=e[1],o=k[0],s=k[1];return(r-t)*(s-n)-(a-n)*(o-t)>=-b},pointBetween:function(k,l,e){var t=k[1]-l[1],n=e[0]-l[0],r=k[0]-l[0],a=e[1]-l[1],o=r*n+t*a;if(o-b)},pointsSameX:function(k,l){return Math.abs(k[0]-l[0])b!=r-t>b&&(n-s)*(t-c)/(r-c)+s-e>b&&(a=!a),n=s,r=c}return a}};return E}V.exports=p}}),lD=ze({"node_modules/polybooljs/lib/linked-list.js"(J,V){var p={create:function(){var b={root:{root:!0,next:null},exists:function(E){return!(E===null||E===b.root)},isEmpty:function(){return b.root.next===null},getHead:function(){return b.root.next},insertBefore:function(E,k){for(var l=b.root,e=b.root.next;e!==null;){if(k(e)){E.prev=e.prev,E.next=e,e.prev.next=E,e.prev=E;return}l=e,e=e.next}l.next=E,E.prev=l,E.next=null},findTransition:function(E){for(var k=b.root,l=b.root.next;l!==null&&!E(l);)k=l,l=l.next;return{before:k===b.root?null:k,after:l,insert:function(e){return e.prev=k,e.next=l,k.next=e,l!==null&&(l.prev=e),e}}}};return b},node:function(b){return b.prev=null,b.next=null,b.remove=function(){b.prev.next=b.next,b.next&&(b.next.prev=b.prev),b.prev=null,b.next=null},b}};V.exports=p}}),uD=ze({"node_modules/polybooljs/lib/intersecter.js"(J,V){var p=lD();function b(E,k,l){function e(g,i){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:null,below:null},otherFill:null}}function t(g,i,w){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:w.myFill.above,below:w.myFill.below},otherFill:null}}var n=p.create();function r(g,i,w,S,M,C){var _=k.pointsCompare(i,M);return _!==0?_:k.pointsSame(w,C)?0:g!==S?g?1:-1:k.pointAboveOrOnLine(w,S?M:C,S?C:M)?1:-1}function a(g,i){n.insertBefore(g,function(w){var S=r(g.isStart,g.pt,i,w.isStart,w.pt,w.other.pt);return S<0})}function o(g,i){var w=p.node({isStart:!0,pt:g.start,seg:g,primary:i,other:null,status:null});return a(w,g.end),w}function s(g,i,w){var S=p.node({isStart:!1,pt:i.end,seg:i,primary:w,other:g,status:null});g.other=S,a(S,g.pt)}function c(g,i){var w=o(g,i);return s(w,g,i),w}function m(g,i){l&&l.segmentChop(g.seg,i),g.other.remove(),g.seg.end=i,g.other.pt=i,a(g.other,g.pt)}function h(g,i){var w=t(i,g.seg.end,g.seg);return m(g,i),c(w,g.primary)}function v(g,i){var w=p.create();function S(F,P){var j=F.seg.start,U=F.seg.end,$=P.seg.start,Q=P.seg.end;return k.pointsCollinear(j,$,Q)?k.pointsCollinear(U,$,Q)||k.pointAboveOrOnLine(U,$,Q)?1:-1:k.pointAboveOrOnLine(j,$,Q)?1:-1}function M(F){return w.findTransition(function(P){var j=S(F,P.ev);return j>0})}function C(F,P){var j=F.seg,U=P.seg,$=j.start,Q=j.end,re=U.start,ne=U.end;l&&l.checkIntersection(j,U);var se=k.linesIntersect($,Q,re,ne);if(se===!1){if(!k.pointsCollinear($,Q,re)||k.pointsSame($,ne)||k.pointsSame(Q,re))return!1;var G=k.pointsSame($,re),X=k.pointsSame(Q,ne);if(G&&X)return P;var K=!G&&k.pointBetween($,re,ne),H=!X&&k.pointBetween(Q,re,ne);if(G)return H?h(P,Q):h(F,ne),P;K&&(X||(H?h(P,Q):h(F,ne)),h(P,$))}else se.alongA===0&&(se.alongB===-1?h(F,re):se.alongB===0?h(F,se.pt):se.alongB===1&&h(F,ne)),se.alongB===0&&(se.alongA===-1?h(P,$):se.alongA===0?h(P,se.pt):se.alongA===1&&h(P,Q));return!1}for(var _=[];!n.isEmpty();){var T=n.getHead();if(l&&l.vert(T.pt[0]),T.isStart){let F=function(){if(A){var P=C(T,A);if(P)return P}return x?C(T,x):!1};var f=F;l&&l.segmentNew(T.seg,T.primary);var u=M(T),A=u.before?u.before.ev:null,x=u.after?u.after.ev:null;l&&l.tempStatus(T.seg,A?A.seg:!1,x?x.seg:!1);var z=F();if(z){if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,I&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=T.seg.myFill;l&&l.segmentUpdate(z.seg),T.other.remove(),T.remove()}if(n.getHead()!==T){l&&l.rewind(T.seg);continue}if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,x?T.seg.myFill.below=x.seg.myFill.above:T.seg.myFill.below=g,I?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var O;x?T.primary===x.primary?O=x.seg.otherFill.above:O=x.seg.myFill.above:O=T.primary?i:g,T.seg.otherFill={above:O,below:O}}l&&l.status(T.seg,A?A.seg:!1,x?x.seg:!1),T.other.status=u.insert(p.node({ev:T}))}else{var D=T.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(w.exists(D.prev)&&w.exists(D.next)&&C(D.prev.ev,D.next.ev),l&&l.statusRemove(D.ev.seg),D.remove(),!T.primary){var B=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=B}_.push(T.seg)}n.getHead().remove()}return l&&l.done(),_}return E?{addRegion:function(g){for(var i,w=g[g.length-1],S=0;St!=h>t&&e<(m-s)*(t-c)/(h-c)+s;v&&(n=!n)}return n}}}),p1=ze({"src/lib/polygon.js"(J,V){"use strict";var p=Mx().dot,b=No().BADNUM,E=V.exports={};E.tester=function(l){var e=l.slice(),t=e[0][0],n=t,r=e[0][1],a=r,o;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),o=1;on||M===b||Ma||w&&c(i))}function h(i,w){var S=i[0],M=i[1];if(S===b||Sn||M===b||Ma)return!1;var C=e.length,_=e[0][0],T=e[0][1],f=0,u,A,x,z,I;for(u=1;uMath.max(A,_)||M>Math.max(x,T)))if(Mo||Math.abs(p(h,c))>n)return!0;return!1},E.filter=function(l,e){var t=[l[0]],n=0,r=0;function a(s){l.push(s);var c=t.length,m=n;t.splice(r+1);for(var h=m+1;h1){var o=l.pop();a(o)}return{addPt:a,raw:l,filtered:t}}}}),vD=ze({"src/components/selections/constants.js"(J,V){"use strict";V.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),mD=ze({"src/components/selections/select.js"(J,V){"use strict";var p=dD(),b=pD(),E=mi(),k=$i().dashStyle,l=Qn(),e=Zl(),t=kh().makeEventData,n=Fd(),r=n.freeMode,a=n.rectMode,o=n.drawMode,s=n.openMode,c=n.selectMode,m=cv(),h=h1(),v=Bx(),g=iv().clearOutline,i=uv(),w=i.handleEllipse,S=i.readPaths,M=zx().newShapes,C=l5(),_=g5().activateLastSelection,T=Nr(),f=T.sorterAsc,u=p1(),A=Cx(),x=Xl().getFromId,z=f1(),I=d1().redrawReglTraces,O=vD(),D=O.MINSELECT,B=u.filter,F=u.tester,P=Fx(),j=P.p2r,U=P.axValue,$=P.getTransform;function Q(vt){return vt.subplot!==void 0}function re(vt,ht,De,Ne,We){var Ke=!Q(Ne),Je=r(We),et=a(We),Mt=s(We),pt=o(We),Pt=c(We),Ct=We==="drawline",qt=We==="drawcircle",Vt=Ct||qt,Ht=Ne.gd,Sr=Ht._fullLayout,Kr=Pt&&Sr.newselection.mode==="immediate"&&Ke,Yt=Sr._zoomlayer,Rt=Ne.element.getBoundingClientRect(),nr=Ne.plotinfo,ur=$(nr),cr=ht-Rt.left,Rr=De-Rt.top;Sr._calcInverseTransform(Ht);var Qr=T.apply3DTransform(Sr._invTransform)(cr,Rr);cr=Qr[0],Rr=Qr[1];var Zr=Sr._invScaleX,ha=Sr._invScaleY,Pa=cr,La=Rr,un="M"+cr+","+Rr,Xa=Ne.xaxes[0],ja=Ne.yaxes[0],Nn=Xa._length,yn=ja._length,Un=vt.altKey&&!(o(We)&&Mt),li,Yn,on,en,vi,Yi,Ja;H(vt,Ht,Ne),Je&&(li=B([[cr,Rr]],O.BENDPX));var Oa=Yt.selectAll("path.select-outline-"+nr.id).data([1]),lt=pt?Sr.newshape:Sr.newselection;pt&&(Ne.hasText=lt.label.text||lt.label.texttemplate);var rt=pt&&!Mt?lt.fillcolor:"rgba(0,0,0,0)",fr=lt.line.color||(Ke?l.contrast(Ht._fullLayout.plot_bgcolor):"#7f7f7f");Oa.enter().append("path").attr("class","select-outline select-outline-"+nr.id).style({opacity:pt?lt.opacity/2:1,"stroke-dasharray":k(lt.line.dash,lt.line.width),"stroke-width":lt.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,fr).call(l.fill,rt).attr("fill-rule","evenodd").classed("cursor-move",!!pt).attr("transform",ur).attr("d",un+"Z");var lr=Yt.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",ur).attr("d","M0,0Z");if(pt&&Ne.hasText){var Tr=Yt.select(".label-temp");Tr.empty()&&(Tr=Yt.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ir=Sr._uid+O.SELECTID,Dr=[],ot=ae(Ht,Ne.xaxes,Ne.yaxes,Ne.subplot);Kr&&!vt.shiftKey&&(Ne._clearSubplotSelections=function(){if(Ke){var jt=Xa._id,ar=ja._id;Xe(Ht,jt,ar,ot);for(var Er=(Ht.layout||{}).selections||[],xr=[],zr=!1,Lr=0;Lr=0){Ht._fullLayout._deactivateShape(Ht);return}if(!pt){var Er=Sr.clickmode;A.done(Ir).then(function(){if(A.clear(Ir),jt===2){for(Oa.remove(),vi=0;vi-1&&ne(ar,Ht,Ne.xaxes,Ne.yaxes,Ne.subplot,Ne,Oa),Er==="event"&&or(Ht,void 0);e.click(Ht,ar,nr.id)}).catch(T.error)}},Ne.doneFn=function(){lr.remove(),A.done(Ir).then(function(){A.clear(Ir),!Kr&&en&&Ne.selectionDefs&&(en.subtract=Un,Ne.selectionDefs.push(en),Ne.mergedPolygons.length=0,[].push.apply(Ne.mergedPolygons,on)),(Kr||pt)&&Z(Ne,Kr),Ne.doneFnCompleted&&Ne.doneFnCompleted(Dr),Pt&&or(Ht,Ja)}).catch(T.error)}}function ne(vt,ht,De,Ne,We,Ke,Je){var et=ht._hoverdata,Mt=ht._fullLayout,pt=Mt.clickmode,Pt=pt.indexOf("event")>-1,Ct=[],qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;if(xe(et)){H(vt,ht,Ke),qt=ae(ht,De,Ne,We);var Rr=we(et,qt),Qr=Rr.pointNumbers.length>0;if(Qr?Se(qt,Rr):Ie(qt)&&(Rt=Me(Rr))){for(Je&&Je.remove(),cr=0;cr=0}function q(vt){return vt._fullLayout._activeSelectionIndex>=0}function Z(vt,ht){var De=vt.dragmode,Ne=vt.plotinfo,We=vt.gd;Y(We)&&We._fullLayout._deactivateShape(We),q(We)&&We._fullLayout._deactivateSelection(We);var Ke=We._fullLayout,Je=Ke._zoomlayer,et=o(De),Mt=c(De);if(et||Mt){var pt=Je.selectAll(".select-outline-"+Ne.id);if(pt&&We._fullLayout._outlining){var Pt;et&&(Pt=M(pt,vt)),Pt&&E.call("_guiRelayout",We,{shapes:Pt});var Ct;Mt&&!Q(vt)&&(Ct=C(pt,vt)),Ct&&(We._fullLayout._noEmitSelectedAtStart=!0,E.call("_guiRelayout",We,{selections:Ct}).then(function(){ht&&_(We)})),We._fullLayout._outlining=!1}}Ne.selection={},Ne.selection.selectionDefs=vt.selectionDefs=[],Ne.selection.mergedPolygons=vt.mergedPolygons=[]}function ee(vt){return vt._id}function ae(vt,ht,De,Ne){if(!vt.calcdata)return[];var We=[],Ke=ht.map(ee),Je=De.map(ee),et,Mt,pt;for(pt=0;pt0,Ke=We?Ne[0]:De;return ht.selectedpoints?ht.selectedpoints.indexOf(Ke)>-1:!1}function Se(vt,ht){var De=[],Ne,We,Ke,Je;for(Je=0;Je0&&De.push(Ne);if(De.length===1&&(Ke=De[0]===ht.searchInfo,Ke&&(We=ht.searchInfo.cd[0].trace,We.selectedpoints.length===ht.pointNumbers.length))){for(Je=0;Je1||(ht+=Ne.selectedpoints.length,ht>1)))return!1;return ht===1}function Ve(vt,ht,De){var Ne,We;for(Ne=0;Ne-1&&ht;if(!Je&&ht){var jt=yt(vt,!0);if(jt.length){var ar=jt[0].xref,Er=jt[0].yref;if(ar&&Er){var xr=At(jt),zr=rr([x(vt,ar,"x"),x(vt,Er,"y")]);zr(Dr,xr)}}vt._fullLayout._noEmitSelectedAtStart?vt._fullLayout._noEmitSelectedAtStart=!1:kt&&or(vt,Dr),qt._reselect=!1}if(!Je&&qt._deselect){var Lr=qt._deselect;et=Lr.xref,Mt=Lr.yref,Be(et,Mt,Pt)||Xe(vt,et,Mt,Ne),kt&&(Dr.points.length?or(vt,Dr):Ot(vt)),qt._deselect=!1}return{eventData:Dr,selectionTesters:De}}function Ae(vt){var ht=vt.calcdata;if(ht)for(var De=0;De=0){lt._fullLayout._deactivateShape(lt);return}var rt=lt._fullLayout.clickmode;if(G(lt),Ja===2&&!_e&&li(),ke)rt.indexOf("select")>-1&&T(Oa,lt,Be,Xe,he.id,pt),rt.indexOf("event")>-1&&a.click(lt,Oa,he.id);else if(Ja===1&&_e){var fr=Ie?ve:ce,lr=Ie==="s"||Ve==="w"?0:1,Tr=fr._name+".range["+lr+"]",Ir=F(fr,lr),Dr="left",ot="middle";if(fr.fixedrange)return;Ie?(ot=Ie==="n"?"top":"bottom",fr.side==="right"&&(Dr="right")):Ve==="e"&&(Dr="right"),lt._context.showAxisRangeEntryBoxes&&p.select(Mt).call(t.makeEditable,{gd:lt,immediate:!0,background:lt._fullLayout.paper_bgcolor,text:String(Ir),fill:fr.tickfont?fr.tickfont.color:"#444",horizontalAlign:Dr,verticalAlign:ot}).on("edit",function(kt){var jt=fr.d2r(kt);jt!==void 0&&l.call("_guiRelayout",lt,Tr,jt)})}}c.init(pt);var qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;function Rr(Ja,Oa,lt){var rt=Mt.getBoundingClientRect();qt=Oa-rt.left,Vt=lt-rt.top,ae._fullLayout._calcInverseTransform(ae);var fr=b.apply3DTransform(ae._fullLayout._invTransform)(qt,Vt);qt=fr[0],Vt=fr[1],Ht={l:qt,r:qt,w:0,t:Vt,b:Vt,h:0},Sr=ae._hmpixcount?ae._hmlumcount/ae._hmpixcount:n.luminosity(ae._fullLayout.plot_bgcolor),Kr="M0,0H"+gt+"V"+Tt+"H0V0",Yt=!1,Rt="xy",cr=!1,nr=Q(Ge,Sr,Ye,yt,Kr),ur=re(Ge,Ye,yt)}function Qr(Ja,Oa){if(ae._transitioningWithDuration)return!1;var lt=Math.max(0,Math.min(gt,We*Ja+qt)),rt=Math.max(0,Math.min(Tt,Ke*Oa+Vt)),fr=Math.abs(lt-qt),lr=Math.abs(rt-Vt);Ht.l=Math.min(qt,lt),Ht.r=Math.max(qt,lt),Ht.t=Math.min(Vt,rt),Ht.b=Math.max(Vt,rt);function Tr(){Rt="",Ht.r=Ht.l,Ht.t=Ht.b,ur.attr("d","M0,0Z")}if(At.isSubplotConstrained)fr>x||lr>x?(Rt="xy",fr/gt>lr/Tt?(lr=fr*Tt/gt,Vt>rt?Ht.t=Vt-lr:Ht.b=Vt+lr):(fr=lr*gt/Tt,qt>lt?Ht.l=qt-fr:Ht.r=qt+fr),ur.attr("d",Y(Ht))):Tr();else if($t.isSubplotConstrained)if(fr>x||lr>x){Rt="xy";var Ir=Math.min(Ht.l/gt,(Tt-Ht.b)/Tt),Dr=Math.max(Ht.r/gt,(Tt-Ht.t)/Tt);Ht.l=Ir*gt,Ht.r=Dr*gt,Ht.b=(1-Ir)*Tt,Ht.t=(1-Dr)*Tt,ur.attr("d",Y(Ht))}else Tr();else!_r||lr0){var kt;if($t.isSubplotConstrained||!rr&&_r.length===1){for(kt=0;kt1&&(Tr.maxallowed!==void 0&&or===(Tr.range[0]1&&(Ir.maxallowed!==void 0&&Ot===(Ir.range[0]=0?Math.min(ae,.9):1/(1/Math.max(ae,-.3)+3.222))}function $(ae,he,xe){return ae?ae==="nsew"?xe?"":he==="pan"?"move":"crosshair":ae.toLowerCase()+"-resize":"pointer"}function Q(ae,he,xe,we,Me){return ae.append("path").attr("class","zoombox").style({fill:he>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(xe,we)).attr("d",Me+"Z")}function re(ae,he,xe){return ae.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(he,xe)).attr("d","M0,0Z")}function ne(ae,he,xe,we,Me,Se){ae.attr("d",we+"M"+xe.l+","+xe.t+"v"+xe.h+"h"+xe.w+"v-"+xe.h+"h-"+xe.w+"Z"),se(ae,he,Me,Se)}function se(ae,he,xe,we){xe||(ae.transition().style("fill",we>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),he.transition().style("opacity",1).duration(200))}function G(ae){p.select(ae).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function X(ae){z&&ae.data&&ae._context.showTips&&(b.notifier(b._(ae,"Double-click to zoom back out"),"long",ae),z=!1)}function K(ae,he){return"M"+(ae.l-.5)+","+(he-x-.5)+"h-3v"+(2*x+1)+"h3ZM"+(ae.r+.5)+","+(he-x-.5)+"h3v"+(2*x+1)+"h-3Z"}function H(ae,he){return"M"+(he-x-.5)+","+(ae.t-.5)+"v-3h"+(2*x+1)+"v3ZM"+(he-x-.5)+","+(ae.b+.5)+"v3h"+(2*x+1)+"v-3Z"}function Y(ae){var he=Math.floor(Math.min(ae.b-ae.t,ae.r-ae.l,x)/2);return"M"+(ae.l-3.5)+","+(ae.t-.5+he)+"h3v"+-he+"h"+he+"v-3h-"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.t-.5+he)+"h-3v"+-he+"h"+-he+"v-3h"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.b+.5-he)+"h-3v"+he+"h"+-he+"v3h"+(he+3)+"ZM"+(ae.l-3.5)+","+(ae.b+.5-he)+"h3v"+he+"h"+he+"v3h-"+(he+3)+"Z"}function q(ae,he,xe,we,Me){for(var Se=!1,Ie={},Ve={},Ge,ke,_e,ce,ve=(Me||{}).xaHash,le=(Me||{}).yaHash,Ae=0;Ae1&&b.warn("Full array edits are incompatible with other edits",c);var S=a[""][""];if(e(S))r.set(null);else if(Array.isArray(S))r.set(S);else return b.warn("Unrecognized full array edit value",c,S),!0;return g?!1:(m(i,w),h(n),!0)}var M=Object.keys(a).map(Number).sort(E),C=r.get(),_=C||[],T=s(w,c).get(),f=[],u=-1,A=_.length,x,z,I,O,D,B,F,P;for(x=0;x_.length-(F?0:1)){b.warn("index out of range",c,I);continue}if(B!==void 0)D.length>1&&b.warn("Insertion & removal are incompatible with edits to the same index.",c,I),e(B)?f.push(I):F?(B==="add"&&(B={}),_.splice(I,0,B),T&&T.splice(I,0,{})):b.warn("Unrecognized full object edit value",c,I,B),u===-1&&(u=I);else for(z=0;z=0;x--)_.splice(f[x],1),T&&T.splice(f[x],1);if(_.length?C||r.set(_):r.set(null),g)return!1;if(m(i,w),v!==p){var j;if(u===-1)j=M;else{for(A=Math.max(_.length,A),j=[],x=0;x=u));x++)j.push(I);for(x=u;x0&&b.log("Clearing previous rejected promises from queue."),g._promises=[]},J.cleanLayout=function(g){var i,w;g||(g={}),g.xaxis1&&(g.xaxis||(g.xaxis=g.xaxis1),delete g.xaxis1),g.yaxis1&&(g.yaxis||(g.yaxis=g.yaxis1),delete g.yaxis1),g.scene1&&(g.scene||(g.scene=g.scene1),delete g.scene1);var S=(E.subplotsRegistry.cartesian||{}).attrRegex,M=(E.subplotsRegistry.polar||{}).attrRegex,C=(E.subplotsRegistry.ternary||{}).attrRegex,_=(E.subplotsRegistry.gl3d||{}).attrRegex,T=Object.keys(g);for(i=0;i3?(B.x=1.02,B.xanchor="left"):B.x<-2&&(B.x=-.02,B.xanchor="right"),B.y>3?(B.y=1.02,B.yanchor="bottom"):B.y<-2&&(B.y=-.02,B.yanchor="top")),g.dragmode==="rotate"&&(g.dragmode="orbit"),g.template&&g.template.layout&&J.cleanLayout(g.template.layout),g};function r(g,i,w=!1){var S=g[i],M=i.charAt(0);w&&Array.isArray(S)||S&&S!=="paper"&&(g[i]=l(S,M,!0))}J.cleanData=function(g){for(var i=0;i0)return g.slice(0,i)}J.hasParent=function(g,i){for(var w=h(i);w;){if(w in g)return!0;w=h(w)}return!1},J.clearAxisTypes=function(g,i,w){for(var S=0;S{let w=(...S)=>S.every(M=>b.isPlainObject(M))||S.every(M=>Array.isArray(M));if([g,i].every(S=>Array.isArray(S))){if(g.length!==i.length)return!1;for(let S=0;Sb.isPlainObject(S))){if(Object.keys(g).length!==Object.keys(i).length)return!1;for(let S in g){if(S.startsWith("_"))continue;let M=g[S],C=i[S];if(M!==C&&!(w(M,C)?v(M,C):!1))return!1}return!0}return!1};J.collectionsAreEqual=v}}),Ux=ze({"src/plot_api/plot_api.js"(J){"use strict";var V=ci(),p=ao(),b=Gw(),E=Nr(),k=E.nestedProperty,l=Hm(),e=OI(),t=mi(),n=Wm(),r=cl(),a=Gi(),o=Qw(),s=cf(),c=$i(),m=Qn(),h=b5().initInteractions,v=nd(),g=_c().clearOutline,i=av().dfltConfig,w=xD(),S=bD(),M=d1(),C=Al(),_=hc().AX_NAME_PATTERN,T=0,f=5;function u(De,Ne,We,Ke){var Je;if(De=E.getGraphDiv(De),l.init(De),E.isPlainObject(Ne)){var et=Ne;Ne=et.data,We=et.layout,Ke=et.config,Je=et.frames}var Mt=l.triggerHandler(De,"plotly_beforeplot",[Ne,We,Ke]);if(Mt===!1)return Promise.reject();!Ne&&!We&&!E.isPlotDiv(De)&&E.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",De);function pt(){if(Je)return J.addFrames(De,Je)}O(De,Ke),We||(We={}),V.select(De).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(De._promises)||(De._promises=[]);var Pt=(De.data||[]).length===0&&Array.isArray(Ne);Array.isArray(Ne)&&(S.cleanData(Ne),Pt?De.data=Ne:De.data.push.apply(De.data,Ne),De.empty=!1),(!De.layout||Pt)&&(De.layout=S.cleanLayout(We)),r.supplyDefaults(De);var Ct=De._fullLayout,qt=Ct._has("cartesian");Ct._replotting=!0,(Pt||Ct._shouldCreateBgLayer)&&(ht(De),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),c.initGradients(De),c.initPatterns(De),Pt&&a.saveShowSpikeInitial(De);var Vt=!De.calcdata||De.calcdata.length!==(De._fullData||[]).length;Vt&&r.doCalcdata(De);for(var Ht=0;Ht=De.data.length||Je<-De.data.length)throw new Error(We+" must be valid indices for gd.data.");if(Ne.indexOf(Je,Ke+1)>-1||Je>=0&&Ne.indexOf(-De.data.length+Je)>-1||Je<0&&Ne.indexOf(De.data.length+Je)>-1)throw new Error("each index in "+We+" must be unique.")}}function j(De,Ne,We){if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"currentIndices"),typeof We<"u"&&!Array.isArray(We)&&(We=[We]),typeof We<"u"&&P(De,We,"newIndices"),typeof We<"u"&&Ne.length!==We.length)throw new Error("current and new indices must be of equal length.")}function U(De,Ne,We){var Ke,Je;if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("traces must be defined.");for(Array.isArray(Ne)||(Ne=[Ne]),Ke=0;Ke"u")throw new Error("indices must be an integer or array of integers");P(De,We,"indices");for(var et in Ne){if(!Array.isArray(Ne[et])||Ne[et].length!==We.length)throw new Error("attribute "+et+" must be an array of length equal to indices array length");if(Je&&(!(et in Ke)||!Array.isArray(Ke[et])||Ke[et].length!==Ne[et].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 Q(De,Ne,We,Ke){var Je=E.isPlainObject(Ke),et=[],Mt,pt,Pt,Ct,qt;Array.isArray(We)||(We=[We]),We=F(We,De.data.length-1);for(var Vt in Ne)for(var Ht=0;Ht=0&&qt=0&&qt"u")return Ct=J.redraw(De),e.add(De,Je,Mt,et,pt),Ct;Array.isArray(We)||(We=[We]);try{j(De,Ke,We)}catch(qt){throw De.data.splice(De.data.length-Ne.length,Ne.length),qt}return e.startSequence(De),e.add(De,Je,Mt,et,pt),Ct=J.moveTraces(De,Ke,We),e.stopSequence(De),Ct}function K(De,Ne){De=E.getGraphDiv(De);var We=[],Ke=J.addTraces,Je=K,et=[De,We,Ne],Mt=[De,Ne],pt,Pt;if(typeof Ne>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"indices"),Ne=F(Ne,De.data.length-1),Ne.sort(E.sorterDes),pt=0;pt"u")for(We=[],Ct=0;Ct0&&typeof Pa.parts[Xa]!="string";)Xa--;var ja=Pa.parts[Xa],Nn=Pa.parts[Xa-1]+"."+ja,yn=Pa.parts.slice(0,Xa).join("."),Un=k(De.layout,yn).get(),li=k(Ke,yn).get(),Yn=Pa.get();if(La!==void 0){nr[ha]=La,ur[ha]=ja==="reverse"?La:q(Yn);var on=n.getLayoutValObject(Ke,Pa.parts);if(on&&on.impliedEdits&&La!==null)for(var en in on.impliedEdits)cr(E.relativeAttr(ha,en),on.impliedEdits[en]);if(["width","height"].indexOf(ha)!==-1)if(La){cr("autosize",null);var vi=ha==="height"?"width":"height";cr(vi,Ke[vi])}else Ke[ha]=De._initialAutoSize[ha];else if(ha==="autosize")cr("width",La?null:Ke.width),cr("height",La?null:Ke.height);else if(Nn.match(Se))Zr(Nn),k(Ke,yn+"._inputRange").set(null);else if(Nn.match(Ie)){Zr(Nn),k(Ke,yn+"._inputRange").set(null);var Yi=k(Ke,yn).get();Yi._inputDomain&&(Yi._input.domain=Yi._inputDomain.slice())}else Nn.match(Ve)&&k(Ke,yn+"._inputDomain").set(null);if(ja==="type"){Qr=Un;var Ja=li.type==="linear"&&La==="log",Oa=li.type==="log"&&La==="linear";if(Ja||Oa){if(!Qr||!Qr.range)cr(yn+".autorange",!0);else if(li.autorange)Ja&&(Qr.range=Qr.range[1]>Qr.range[0]?[1,2]:[2,1]);else{var lt=Qr.range[0],rt=Qr.range[1];Ja?(lt<=0&&rt<=0&&cr(yn+".autorange",!0),lt<=0?lt=rt/1e6:rt<=0&&(rt=lt/1e6),cr(yn+".range[0]",Math.log(lt)/Math.LN10),cr(yn+".range[1]",Math.log(rt)/Math.LN10)):(cr(yn+".range[0]",Math.pow(10,lt)),cr(yn+".range[1]",Math.pow(10,rt)))}Array.isArray(Ke._subplots.polar)&&Ke._subplots.polar.length&&Ke[Pa.parts[0]]&&Pa.parts[1]==="radialaxis"&&delete Ke[Pa.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(De,li,La,cr),t.getComponentMethod("images","convertCoords")(De,li,La,cr)}else cr(yn+".autorange",!0),cr(yn+".range",null);k(Ke,yn+"._inputRange").set(null)}else if(ja.match(_)){var fr=k(Ke,ha).get(),lr=(La||{}).type;(!lr||lr==="-")&&(lr="linear"),t.getComponentMethod("annotations","convertCoords")(De,fr,lr,cr),t.getComponentMethod("images","convertCoords")(De,fr,lr,cr)}var Tr=w.containerArrayMatch(ha);if(Tr){qt=Tr.array,Vt=Tr.index;var Ir=Tr.property,Dr=on||{editType:"calc"};Vt!==""&&Ir===""&&(w.isAddVal(La)?ur[ha]=null:w.isRemoveVal(La)?ur[ha]=(k(We,qt).get()||[])[Vt]:E.warn("unrecognized full object value",Ne)),C.update(Rt,Dr),Ct[qt]||(Ct[qt]={});var ot=Ct[qt][Vt];ot||(ot=Ct[qt][Vt]={}),ot[Ir]=La,delete Ne[ha]}else ja==="reverse"?(Un.range?Un.range.reverse():(cr(yn+".autorange",!0),Un.range=[1,0]),li.autorange?Rt.calc=!0:Rt.plot=!0):(ha==="dragmode"&&(La===!1&&Yn!==!1||La!==!1&&Yn===!1)||Ke._has("scatter-like")&&Ke._has("regl")&&ha==="dragmode"&&(La==="lasso"||La==="select")&&!(Yn==="lasso"||Yn==="select")?Rt.plot=!0:on?C.update(Rt,on):Rt.calc=!0,Pa.set(La))}}for(qt in Ct){var kt=w.applyContainerArrayChanges(De,et(We,qt),Ct[qt],Rt,et);kt||(Rt.plot=!0)}for(var jt in Rr){Qr=a.getFromId(De,jt);var ar=Qr&&Qr._constraintGroup;if(ar){Rt.calc=!0;for(var Er in ar)Rr[Er]||(a.getFromId(De,Er)._constraintShrinkable=!0)}}(ke(De)||Ne.height||Ne.width)&&(Rt.plot=!0);var xr=Ke.shapes;for(Vt=0;Vt1;)if(Ke.pop(),We=k(Ne,Ke.join(".")+".uirevision").get(),We!==void 0)return We;return Ne.uirevision}function Xe(De,Ne){for(var We=0;We[yn,De._ev.listeners(yn)]);et=J.newPlot(De,Ne,We,Ke).then(()=>{for(let[yn,Un]of Nn)Un.forEach(li=>De.on(yn,li));return J.react(De,Ne,We,Ke)})}else{De.data=Ne||[],S.cleanData(De.data),De.layout=We||{},S.cleanLayout(De.layout),gt(De.data,De.layout,pt,Pt),r.supplyDefaults(De,{skipUpdateCalc:!0});var Vt=De._fullData,Ht=De._fullLayout,Sr=Ht.datarevision===void 0,Kr=Ht.transition,Yt=$t(De,Pt,Ht,Sr,Kr),Rt=Yt.newDataRevision,nr=At(De,pt,Vt,Sr,Kr,Rt);if(ke(De)&&(Yt.layoutReplot=!0),nr.calc||Yt.calc){De.calcdata=void 0;for(var ur=Object.getOwnPropertyNames(Ht),cr=0;cr(qt||De.emit("plotly_react",{config:Ke,data:Ne,layout:We}),De))}function At(De,Ne,We,Ke,Je,et){var Mt=Ne.length===We.length;if(!Je&&!Mt)return{fullReplot:!0,calc:!0};var pt=C.traceFlags();pt.arrays={},pt.nChanges=0,pt.nChangesAnim=0;var Pt,Ct;function qt(Sr){var Kr=n.getTraceValObject(Ct,Sr);return!Ct._module.animatable&&Kr.anim&&(Kr.anim=!1),Kr}var Vt={getValObject:qt,flags:pt,immutable:Ke,transition:Je,newDataRevision:et,gd:De},Ht={};for(Pt=0;Pt=Je.length?Je[0]:Je[Ct]:Je}function pt(Ct){return Array.isArray(et)?Ct>=et.length?et[0]:et[Ct]:et}function Pt(Ct,qt){var Vt=0;return function(){if(Ct&&++Vt===qt)return Ct()}}return new Promise(function(Ct,qt){function Vt(){if(Ke._frameQueue.length!==0){for(;Ke._frameQueue.length;){var ja=Ke._frameQueue.pop();ja.onInterrupt&&ja.onInterrupt()}De.emit("plotly_animationinterrupted",[])}}function Ht(ja){if(ja.length!==0){for(var Nn=0;NnKe._timeToNext&&Kr()};ja()}var Rt=0;function nr(ja){return Array.isArray(Je)?Rt>=Je.length?ja.transitionOpts=Je[Rt]:ja.transitionOpts=Je[0]:ja.transitionOpts=Je,Rt++,ja}var ur,cr,Rr=[],Qr=Ne==null,Zr=Array.isArray(Ne),ha=!Qr&&!Zr&&E.isPlainObject(Ne);if(ha)Rr.push({type:"object",data:nr(E.extendFlat({},Ne))});else if(Qr||["string","number"].indexOf(typeof Ne)!==-1)for(ur=0;ur0&&unun)&&Xa.push(cr);Rr=Xa}}Rr.length>0?Ht(Rr):(De.emit("plotly_animated"),Ct())})}function Xt(De,Ne,We){if(De=E.getGraphDiv(De),Ne==null)return Promise.resolve();if(!E.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ke,Je,et,Mt,pt=De._transitionData._frames,Pt=De._transitionData._frameHash;if(!Array.isArray(Ne))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ne);var Ct=pt.length+Ne.length*2,qt=[],Vt={};for(Ke=Ne.length-1;Ke>=0;Ke--)if(E.isPlainObject(Ne[Ke])){var Ht=Ne[Ke].name,Sr=(Pt[Ht]||Vt[Ht]||{}).name,Kr=Ne[Ke].name,Yt=Pt[Sr]||Vt[Sr];Sr&&Kr&&typeof Kr=="number"&&Yt&&TPa.index?-1:ha.index=0;Ke--){if(Je=qt[Ke].frame,typeof Je.name=="number"&&E.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Je.name)for(;Pt[Je.name="frame "+De._transitionData._counter++];);if(Pt[Je.name]){for(et=0;et=0;We--)Ke=Ne[We],et.push({type:"delete",index:Ke}),Mt.unshift({type:"insert",index:Ke,value:Je[Ke]});var pt=r.modifyFrames,Pt=r.modifyFrames,Ct=[De,Mt],qt=[De,et];return e&&e.add(De,pt,Ct,Pt,qt),r.modifyFrames(De,et)}function Ot(De){De=E.getGraphDiv(De);var Ne=De._fullLayout||{},We=De._fullData||[];return r.cleanPlot([],{},We,Ne),r.purge(De),l.purge(De),Ne._container&&Ne._container.remove(),delete De._context,De}function vt(De){var Ne=De._fullLayout,We=De.getBoundingClientRect();if(!E.equalDomRects(We,Ne._lastBBox)){var Ke=Ne._invTransform=E.inverseTransformMatrix(E.getFullTransformMatrix(De));Ne._invScaleX=Math.sqrt(Ke[0][0]*Ke[0][0]+Ke[0][1]*Ke[0][1]+Ke[0][2]*Ke[0][2]),Ne._invScaleY=Math.sqrt(Ke[1][0]*Ke[1][0]+Ke[1][1]*Ke[1][1]+Ke[1][2]*Ke[1][2]),Ne._lastBBox=We}}function ht(De){var Ne=V.select(De),We=De._fullLayout;if(We._calcInverseTransform=vt,We._calcInverseTransform(De),We._container=Ne.selectAll(".plot-container").data([0]),We._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),We._paperdiv=We._container.selectAll(".svg-container").data([0]),We._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),We._glcontainer=We._paperdiv.selectAll(".gl-container").data([{}]),We._glcontainer.enter().append("div").classed("gl-container",!0),We._paperdiv.selectAll(".main-svg").remove(),We._paperdiv.select(".modebar-container").remove(),We._paper=We._paperdiv.insert("svg",":first-child").classed("main-svg",!0),We._toppaper=We._paperdiv.append("svg").classed("main-svg",!0),We._modebardiv=We._paperdiv.append("div"),delete We._modeBar,We._hoverpaper=We._paperdiv.append("svg").classed("main-svg",!0),!We._uid){var Ke={};V.selectAll("defs").each(function(){this.id&&(Ke[this.id.split("-")[1]]=1)}),We._uid=E.randstr(Ke)}We._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),We._defs=We._paper.append("defs").attr("id","defs-"+We._uid),We._clips=We._defs.append("g").classed("clips",!0),We._topdefs=We._toppaper.append("defs").attr("id","topdefs-"+We._uid),We._topclips=We._topdefs.append("g").classed("clips",!0),We._bgLayer=We._paper.append("g").classed("bglayer",!0),We._draggers=We._paper.append("g").classed("draglayer",!0);var Je=We._paper.append("g").classed("layer-below",!0);We._imageLowerLayer=Je.append("g").classed("imagelayer",!0),We._shapeLowerLayer=Je.append("g").classed("shapelayer",!0),We._cartesianlayer=We._paper.append("g").classed("cartesianlayer",!0),We._polarlayer=We._paper.append("g").classed("polarlayer",!0),We._smithlayer=We._paper.append("g").classed("smithlayer",!0),We._ternarylayer=We._paper.append("g").classed("ternarylayer",!0),We._geolayer=We._paper.append("g").classed("geolayer",!0),We._funnelarealayer=We._paper.append("g").classed("funnelarealayer",!0),We._pielayer=We._paper.append("g").classed("pielayer",!0),We._iciclelayer=We._paper.append("g").classed("iciclelayer",!0),We._treemaplayer=We._paper.append("g").classed("treemaplayer",!0),We._sunburstlayer=We._paper.append("g").classed("sunburstlayer",!0),We._indicatorlayer=We._toppaper.append("g").classed("indicatorlayer",!0),We._glimages=We._paper.append("g").classed("glimages",!0);var et=We._toppaper.append("g").classed("layer-above",!0);We._imageUpperLayer=et.append("g").classed("imagelayer",!0),We._shapeUpperLayer=et.append("g").classed("shapelayer",!0),We._selectionLayer=We._toppaper.append("g").classed("selectionlayer",!0),We._infolayer=We._toppaper.append("g").classed("infolayer",!0),We._menulayer=We._toppaper.append("g").classed("menulayer",!0),We._zoomlayer=We._toppaper.append("g").classed("zoomlayer",!0),We._hoverlayer=We._hoverpaper.append("g").classed("hoverlayer",!0),We._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),De.emit("plotly_framework")}J.animate=_r,J.addFrames=Xt,J.deleteFrames=or,J.addTraces=X,J.deleteTraces=K,J.extendTraces=se,J.moveTraces=H,J.prependTraces=G,J.newPlot=B,J._doPlot=u,J.purge=Ot,J.react=Tt,J.redraw=D,J.relayout=xe,J.restyle=Y,J.setPlotConfig=x,J.update=_e,J._guiRelayout=ce(xe),J._guiRestyle=ce(Y),J._guiUpdate=ce(_e),J._storeDirectGUIEdit=ae}}),ip=ze({"src/snapshot/helpers.js"(J){"use strict";var V=mi();J.getDelay=function(E){return E._has&&(E._has("gl3d")||E._has("map"))?500:0},J.getRedrawFunc=function(E){return function(){V.getComponentMethod("colorbar","draw")(E)}},J.encodeSVG=function(E){return"data:image/svg+xml,"+encodeURIComponent(E)},J.encodeJSON=function(E){return"data:application/json,"+encodeURIComponent(E)};var p=window.URL||window.webkitURL;J.createObjectURL=function(E){return p.createObjectURL(E)},J.revokeObjectURL=function(E){return p.revokeObjectURL(E)},J.createBlob=function(E,k){if(k==="svg")return new window.Blob([E],{type:"image/svg+xml;charset=utf-8"});if(k==="full-json")return new window.Blob([E],{type:"application/json;charset=utf-8"});var l=b(window.atob(E));return new window.Blob([l],{type:"image/"+k})},J.octetStream=function(E){document.location.href="data:application/octet-stream"+E},J.getPlotTitle=function(E){var k,l,e,t,n=E._fullLayout;if(n){var r=(k=n.title)==null?void 0:k.text;return r===((l=n._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=E.layout)==null?void 0:e.title)==null?void 0:t.text},J.getPlotSubtitle=function(E){var k,l,e,t,n,r,a=E._fullLayout;if(a){var o=(l=(k=a.title)==null?void 0:k.subtitle)==null?void 0:l.text;return o===((e=a._dfltTitle)==null?void 0:e.subtitle)?void 0:o}return(r=(n=(t=E.layout)==null?void 0:t.title)==null?void 0:n.subtitle)==null?void 0:r.text};function b(E){for(var k=E.length,l=new ArrayBuffer(k),e=new Uint8Array(l),t=0;t{let i=g.toLowerCase();return r.includes(i)?g:a.includes(i)?"<":o.includes(i)?">":g.includes("<")||g.includes(">")?"":h.html(g).text()});return h.remove(),v}function c(m){return m.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}V.exports=function(h,v,g){var i=h._fullLayout,w=i._paper,S=i._toppaper,M=i.width,C=i.height,_;w.insert("rect",":first-child").call(E.setRect,0,0,M,C).call(k.fill,i.paper_bgcolor);var T=i._basePlotModules||[];for(_=0;_1&&C.push(s("object","layout"))),b.supplyDefaults(_);for(var u=_._fullData,A=T.length,x=0;xz.length&&M.push(s("unused",C,A.concat(z.length)));var P=z.length,j=Array.isArray(F);j&&(P=Math.min(P,F.length));var U,$,Q,re,ne;if(I.dimensions===2)for($=0;$z[$].length&&M.push(s("unused",C,A.concat($,z[$].length)));var se=z[$].length;for(U=0;U<(j?Math.min(se,F[$].length):se);U++)Q=j?F[$][U]:F,re=x[$][U],ne=z[$][U],p.validate(re,Q)?ne!==re&&ne!==+re&&M.push(s("dynamic",C,A.concat($,U),re,ne)):M.push(s("value",C,A.concat($,U),re))}else M.push(s("array",C,A.concat($),x[$]));else for($=0;$D?M.push({code:"unused",traceType:x,templateCount:O,dataCount:D}):D>O&&M.push({code:"reused",traceType:x,templateCount:O,dataCount:D})}}function B(F,P){for(var j in F)if(j.charAt(0)!=="_"){var U=F[j],$=s(F,j,P);p(U)?(Array.isArray(F)&&U._template===!1&&U.templateitemname&&M.push({code:"missing",path:$,templateitemname:U.templateitemname}),B(U,$)):Array.isArray(U)&&c(U)&&B(U,$)}}if(B({data:_,layout:C},""),M.length)return M.map(m)};function c(h){for(var v=0;v=0;m--){var h=l[m];if(h.type==="scatter"&&h.xaxis===s.xaxis&&h.yaxis===s.yaxis){h.opacity=void 0;break}}}}}}}),kD=ze({"src/traces/scatter/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Lx();V.exports=function(E,k){function l(t,n){return p.coerce(E,k,b,t,n)}var e=k.barmode==="group";k.scattermode==="group"&&l("scattergap",e?k.bargap:.2)}}}),bd=ze({"src/plots/cartesian/align_period.js"(J,V){"use strict";var p=ao(),b=Nr(),E=b.dateTime2ms,k=b.incrementMonth,l=No(),e=l.ONEAVGMONTH;V.exports=function(n,r,a,o){if(r.type!=="date")return{vals:o};var s=n[a+"periodalignment"];if(!s)return{vals:o};var c=n[a+"period"],m;if(p(c)){if(c=+c,c<=0)return{vals:o}}else if(typeof c=="string"&&c.charAt(0)==="M"){var h=+c.substring(1);if(h>0&&Math.round(h)===h)m=h;else return{vals:o}}for(var v=r.calendar,g=s==="start",i=s==="end",w=n[a+"period0"],S=E(w,v)||0,M=[],C=[],_=[],T=o.length,f=0;fu;)z=k(z,-m,v);for(;z<=u;)z=k(z,m,v);x=k(z,-m,v)}else{for(A=Math.round((u-S)/c),z=S+A*c;z>u;)z-=c;for(;z<=u;)z+=c;x=z-c}M[f]=g?x:i?z:(x+z)/2,C[f]=x,_[f]=z}return{vals:M,starts:C,ends:_}}}}),od=ze({"src/traces/scatter/colorscale_calc.js"(J,V){"use strict";var p=Bf().hasColorscale,b=Qf(),E=el();V.exports=function(l,e){E.hasLines(e)&&p(e,"line")&&b(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),E.hasMarkers(e)&&(p(e,"marker")&&b(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),p(e,"marker.line")&&b(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Nd=ze({"src/traces/scatter/arrays_to_calcdata.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){for(var l=0;lB&&x[P].gap;)P--;for(U=x[P].s,F=x.length-1;F>P;F--)x[F].s=U;for(;Bre+$||!p(Q))}for(var se=0;seP(U))):P(D.text);let j=D.outsidetextfont.size*r*F+n;return{ppadplus:B.some(U=>U.s<0)?j:0,ppadminus:B.some(U=>U.s>=0)?j:0}}return{ppadplus:void 0,ppadminus:void 0}}function z(D,B,F,P){for(var j=O(P),U=0;UO[v]&&v0?l:e)/(v._m*w*(v._m>0?l:e)))),Ct*=1e3}if(qt===E){if(i&&(qt=v.c2p(Pt.y,!0)),qt===E)return!1;qt*=1e3}return[Ct,qt]}function ee(pt,Pt,Ct,qt){var Vt=Ct-pt,Ht=qt-Pt,Sr=.5-pt,Kr=.5-Pt,Yt=Vt*Vt+Ht*Ht,Rt=Vt*Sr+Ht*Kr;if(Rt>0&&Rt1||Math.abs(Sr.y-Ct[0][1])>1)&&(Sr=[Sr.x,Sr.y],qt&&we(Sr,pt)Ie||pt[1]Ge)return[r(pt[0],Se,Ie),r(pt[1],Ve,Ge)]}function yt(pt,Pt){if(pt[0]===Pt[0]&&(pt[0]===Se||pt[0]===Ie)||pt[1]===Pt[1]&&(pt[1]===Ve||pt[1]===Ge))return!0}function gt(pt,Pt){var Ct=[],qt=Ye(pt),Vt=Ye(Pt);return qt&&Vt&&yt(qt,Vt)||(qt&&Ct.push(qt),Vt&&Ct.push(Vt)),Ct}function Tt(pt,Pt,Ct){return function(qt,Vt){var Ht=Ye(qt),Sr=Ye(Vt),Kr=[];if(Ht&&Sr&&yt(Ht,Sr))return Kr;Ht&&Kr.push(Ht),Sr&&Kr.push(Sr);var Yt=2*t.constrain((qt[pt]+Vt[pt])/2,Pt,Ct)-((Ht||qt)[pt]+(Sr||Vt)[pt]);if(Yt){var Rt;Ht&&Sr?Rt=Yt>0==Ht[pt]>Sr[pt]?Ht:Sr:Rt=Ht||Sr,Rt[pt]+=Yt}return Kr}}var At;f==="linear"||f==="spline"?At=Xe:f==="hv"||f==="vh"?At=gt:f==="hvh"?At=Tt(0,Se,Ie):f==="vhv"&&(At=Tt(1,Ve,Ge));function $t(pt,Pt){var Ct=Pt[0]-pt[0],qt=(Pt[1]-pt[1])/Ct,Vt=(pt[1]*Pt[0]-Pt[1]*pt[0])/Ct;return Vt>0?[qt>0?Se:Ie,Ge]:[qt>0?Ie:Se,Ve]}function rr(pt){var Pt=pt[0],Ct=pt[1],qt=Pt===O[D-1][0],Vt=Ct===O[D-1][1];if(!(qt&&Vt))if(D>1){var Ht=Pt===O[D-2][0],Sr=Ct===O[D-2][1];qt&&(Pt===Se||Pt===Ie)&&Ht?Sr?D--:O[D-1]=pt:Vt&&(Ct===Ve||Ct===Ge)&&Sr?Ht?D--:O[D-1]=pt:O[D++]=pt}else O[D++]=pt}function _r(pt){O[D-1][0]!==pt[0]&&O[D-1][1]!==pt[1]&&rr([ve,le]),rr(pt),Ae=null,ve=le=0}var Xt=t.isArrayOrTypedArray(C);function or(pt){if(pt&&M&&(pt.i=B,pt.d=s,pt.trace=m,pt.marker=Xt?C[pt.i]:C,pt.backoff=M),ae=pt[0]/w,he=pt[1]/S,_e=pt[0]Ie?Ie:0,ce=pt[1]Ge?Ge:0,_e||ce){if(!D)O[D++]=[_e||pt[0],ce||pt[1]];else if(Ae){var Pt=At(Ae,pt);Pt.length>1&&(_r(Pt[0]),O[D++]=Pt[1])}else Be=At(O[D-1],pt)[0],O[D++]=Be;var Ct=O[D-1];_e&&ce&&(Ct[0]!==_e||Ct[1]!==ce)?(Ae&&(ve!==_e&&le!==ce?rr(ve&&le?$t(Ae,pt):[ve||_e,le||ce]):ve&&le&&rr([ve,le])),rr([_e,ce])):ve-_e&&le-ce&&rr([_e||ve,ce||le]),Ae=pt,ve=_e,le=ce}else Ae&&_r(At(Ae,pt)[0]),O[D++]=pt}for(B=0;Bxe($,Ot))break;P=$,K=ne[0]*re[0]+ne[1]*re[1],K>G?(G=K,j=$,Q=!1):K=s.length||!$)break;or($),F=$}}Ae&&rr([ve||Ae[0],le||Ae[1]]),x.push(O.slice(0,D))}var vt=f.slice(f.length-1);if(M&&vt!=="h"&&vt!=="v"){for(var ht=!1,De=-1,Ne=[],We=0;We=0?a=h:(a=h=m,m++),a0,f=r(h,v,g);if(M=i.selectAll("g.trace").data(f,function(A){return A[0].trace.uid}),M.enter().append("g").attr("class",function(A){return"trace scatter trace"+A[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(h,M,v),T){S&&(C=S());var u=p.transition().duration(w.duration).ease(w.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});u.each(function(){i.selectAll("g.trace").each(function(A,x){s(h,x,v,A,f,this,w)})})}else M.each(function(A,x){s(h,x,v,A,f,this,w)});_&&M.exit().remove(),i.selectAll("path:not([d])").remove()};function o(m,h,v){h.each(function(g){var i=k(p.select(this),"g","fills");e.setClipUrl(i,v.layerClipId,m);var w=g[0].trace;w._ownFill=null,w._nextFill=null;var S=[];w._ownfill&&S.push("_ownFill"),w._nexttrace&&S.push("_nextFill");var M=i.selectAll("g").data(S,l);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){w[C]=k(p.select(this),"path","js-fill")})})}function s(m,h,v,g,i,w,S){var M=m._context.staticPlot,C;c(m,h,v,g,i);var _=!!S&&S.duration>0;function T(rr){return _?rr.transition():rr}var f=v.xaxis,u=v.yaxis,A=g[0].trace,x=A.line,z=p.select(w),I=k(z,"g","errorbars"),O=k(z,"g","lines"),D=k(z,"g","points"),B=k(z,"g","text");if(b.getComponentMethod("errorbars","plot")(m,I,v,S),A.visible!==!0)return;T(z).style("opacity",A.opacity);var F,P,j=A.fill.charAt(A.fill.length-1);j!=="x"&&j!=="y"&&(j="");var U,$;j==="y"?(U=1,$=u.c2p(0,!0)):j==="x"&&(U=0,$=f.c2p(0,!0)),g[0][v.isRangePlot?"nodeRangePlot3":"node3"]=z;var Q="",re=[],ne=A._prevtrace,se=null,G=null;ne&&(Q=ne._prevRevpath||"",P=ne._nextFill,re=ne._ownPolygons,se=ne._fillsegments,G=ne._fillElement);var X,K,H="",Y="",q,Z,ee,ae,he,xe,we=[];A._polygons=[];var Me=[],Se=[],Ie=E.noop;if(F=A._ownFill,t.hasLines(A)||A.fill!=="none"){P&&P.datum(g),["hv","vh","hvh","vhv"].indexOf(x.shape)!==-1?(q=e.steps(x.shape),Z=e.steps(x.shape.split("").reverse().join(""))):x.shape==="spline"?q=Z=function(rr){var _r=rr[rr.length-1];return rr.length>1&&rr[0][0]===_r[0]&&rr[0][1]===_r[1]?e.smoothclosed(rr.slice(1),x.smoothing):e.smoothopen(rr,x.smoothing)}:q=Z=function(rr){return"M"+rr.join("L")},ee=function(rr){return Z(rr.reverse())},Se=n(g,{xaxis:f,yaxis:u,trace:A,connectGaps:A.connectgaps,baseTolerance:Math.max(x.width||1,3)/4,shape:x.shape,backoff:x.backoff,simplify:x.simplify,fill:A.fill}),Me=new Array(Se.length);var Ve=0;for(C=0;C=M[0]&&z.x<=M[1]&&z.y>=C[0]&&z.y<=C[1]}),u=Math.ceil(f.length/T),A=0;i.forEach(function(z,I){var O=z[0].trace;t.hasMarkers(O)&&O.marker.maxdisplayed>0&&I=Math.min(ne,se)&&v<=Math.max(ne,se)?0:1/0}var G=Math.max(3,re.mrc||0),X=1-1/G,K=Math.abs(m.c2p(re.x)-v);return K=Math.min(ne,se)&&g<=Math.max(ne,se)?0:1/0}var G=Math.max(3,re.mrc||0),X=1-1/G,K=Math.abs(h.c2p(re.y)-g);return KY!=Me>=Y&&(he=ee[Z-1][0],xe=ee[Z][0],Me-we&&(ae=he+(xe-he)*(Y-we)/(Me-we),G=Math.min(G,ae),X=Math.max(X,ae)));return G=Math.max(G,0),X=Math.min(X,m._length),{x0:G,x1:X,y0:Y,y1:Y}}if(w.indexOf("fills")!==-1&&c._fillElement){var U=P(c._fillElement)&&!P(c._fillExclusionElement);if(U){var $=j(c._polygons);$===null&&($={x0:i[0],x1:i[0],y0:i[1],y1:i[1]});var Q=l.defaultLine;return l.opacity(c.fillcolor)?Q=c.fillcolor:l.opacity((c.line||{}).color)&&(Q=c.line.color),p.extendFlat(n,{distance:n.maxHoverDistance,x0:$.x0,x1:$.x1,y0:$.y0,y1:$.y1,color:Q,hovertemplate:!1}),delete n.index,c.text&&!p.isArrayOrTypedArray(c.text)?n.text=String(c.text):n.text=c.name,[n]}}}}}),Yv=ze({"src/traces/scatter/select.js"(J,V){"use strict";var p=el();V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=[],r=l[0].trace,a,o,s,c,m=r.mode&&!p.hasMarkers(r)&&!p.hasText(r);if(m)return[];if(k===!1)for(a=0;a0&&(o["_"+r+"axes"]||{})[n])return o;if((o[r+"axis"]||r)===n){if(e(o,r))return o;if((o[r]||[]).length||o[r+"0"])return o}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,n){var r=l(t),a=p(t,"box-violin");return a&&n===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),Hx=ze({"src/plots/cartesian/category_order_defaults.js"(J,V){"use strict";var p=Ff().isTypedArraySpec;function b(E,k){var l=k.dataAttr||E._id.charAt(0),e={},t,n,r;if(k.axData)t=k.axData;else for(t=[],n=0;n0||p(n),a;r&&(a="array");var o=e("categoryorder",a),s;o==="array"&&(s=e("categoryarray")),!r&&o==="array"&&(o=l.categoryorder="trace"),o==="trace"?l._initialCategories=[]:o==="array"?l._initialCategories=s.slice():(s=b(l,t).sort(),o==="category ascending"?l._initialCategories=s:o==="category descending"&&(l._initialCategories=s.reverse()))}}}}),g1=ze({"src/plots/cartesian/line_grid_defaults.js"(J,V){"use strict";var p=Qn(),b=fc(),E=Nr();V.exports=function(l,e,t,n){n=n||{};var r=n.dfltColor;function a(x,z){return E.coerce2(l,e,n.attributes,x,z)}var o=a("linecolor",r),s=a("linewidth"),c=t("showline",n.showLine||!!o||!!s);c||(delete e.linecolor,delete e.linewidth);var m=p.mix(r,n.bgColor,n.blend||b.lightFraction),h=a("gridcolor",m),v=a("gridwidth"),g=a("griddash"),i=t("showgrid",n.showGrid||!!h||!!v||!!g);if(i||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),n.hasMinor){var w=p.mix(e.gridcolor,n.bgColor,67),S=a("minor.gridcolor",w),M=a("minor.gridwidth",e.gridwidth||1),C=a("minor.griddash",e.griddash||"solid"),_=t("minor.showgrid",!!S||!!M||!!C);_||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!n.noZeroLine){var T=a("zerolinelayer"),f=a("zerolinecolor",r),u=a("zerolinewidth"),A=t("zeroline",n.showGrid||!!f||!!u);A||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),y1=ze({"src/plots/cartesian/axis_defaults.js"(J,V){"use strict";var p=ao(),b=mi(),E=Nr(),k=hs(),l=Jf(),e=cf(),t=Uv(),n=Ym(),r=ov(),a=sv(),o=Hx(),s=g1(),c=Qw(),m=Dd(),h=hc().WEEKDAY_PATTERN,v=hc().HOUR_PATTERN;V.exports=function(M,C,_,T,f){var u=T.letter,A=T.font||{},x=T.splomStash||{},z=_("visible",!T.visibleDflt),I=C._template||{},O=C.type||I.type||"-",D;if(O==="date"){var B=b.getComponentMethod("calendars","handleDefaults");B(M,C,"calendar",T.calendar),T.noTicklabelmode||(D=_("ticklabelmode"))}!T.noTicklabelindex&&(O==="date"||O==="linear")&&_("ticklabelindex");var F="";(!T.noTicklabelposition||O==="multicategory")&&(F=E.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:D==="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")),T.noTicklabeloverflow||_("ticklabeloverflow",F.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),m(C,f),c(M,C,_,T),o(M,C,_,T),T.noHover||(O!=="category"&&_("hoverformat"),T.noUnifiedhovertitle||_("unifiedhovertitle.text"));var P=_("color"),j=P!==e.color.dflt?P:A.color,U=x.label||f._dfltTitle[u];if(a(M,C,_,O,T),!z)return C;_("title.text",U),E.coerceFont(_,"title.font",A,{overrideDflt:{size:E.bigFont(A.size),color:j}}),t(M,C,_,O);var $=T.hasMinor;if($&&(k.newContainer(C,"minor"),t(M,C,_,O,{isMinor:!0})),r(M,C,_,O,T),n(M,C,_,T),$){var Q=T.isMinor;T.isMinor=!0,n(M,C,_,T),T.isMinor=Q}s(M,C,_,{dfltColor:P,bgColor:T.bgColor,showGrid:T.showGrid,hasMinor:$,attributes:e}),$&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&_("mirror");var re=O==="multicategory";if(!T.noTickson&&(O==="category"||re)&&(C.ticks||C.showgrid)&&(re?(_("tickson","boundaries"),delete C.ticklabelposition):_("tickson")),re){var ne=_("showdividers");ne&&(_("dividercolor"),_("dividerwidth"))}if(O==="date")if(l(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:g}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var se=0;se=2){var u="",A,x;if(f.length===2){for(A=0;A<2;A++)if(x=w(f[A]),x){u=h;break}}var z=_("pattern",u);if(z===h)for(A=0;A<2;A++)x=w(f[A]),x&&(M.bounds[A]=f[A]=x-1);if(z)for(A=0;A<2;A++)switch(x=f[A],z){case h:if(!p(x)){M.enabled=!1;return}if(x=+x,x!==Math.floor(x)||x<0||x>=7){M.enabled=!1;return}M.bounds[A]=f[A]=x;break;case v:if(!p(x)){M.enabled=!1;return}if(x=+x,x<0||x>24){M.enabled=!1;return}M.bounds[A]=f[A]=x;break}if(C.autorange===!1){var I=C.range;if(I[0]I[1]){M.enabled=!1;return}}else if(f[0]>I[0]&&f[1]_[1]-1/4096&&(l.domain=m),b.noneOrAll(k.domain,l.domain,m),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),RD=ze({"src/plots/cartesian/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover,k=s5(),l=hs(),e=Gm(),t=cf(),n=E5(),r=y1(),a=Vv(),o=Wx(),s=Xl(),c=s.id2name,m=s.name2id,h=hc().AX_ID_PATTERN,v=mi(),g=v.traceIs,i=v.getComponentMethod;function w(S,M,C){Array.isArray(S[M])?S[M].push(C):S[M]=[C]}V.exports=function(M,C,_){var T=C.autotypenumbers,f={},u={},A={},x={},z={},I={},O={},D={},B={},F={},P,j;for(P=0;P<_.length;P++){var U=_[P];if(g(U,"cartesian")){var $;if(U.xaxis)$=c(U.xaxis),w(f,$,U);else if(U.xaxes)for(j=0;j rect").call(k.setTranslate,0,0).call(k.setScale,1,1),C.plot.call(k.setTranslate,_._offset,T._offset).call(k.setScale,1,1);var f=C.plot.selectAll(".scatterlayer .trace");f.selectAll(".point").call(k.setPointGroupScale,1,1),f.selectAll(".textpoint").call(k.setTextPointsScale,1,1),f.call(k.hideOutsideRangePoints,C)}function c(C,_){var T=C.plotinfo,f=T.xaxis,u=T.yaxis,A=f._length,x=u._length,z=!!C.xr1,I=!!C.yr1,O=[];if(z){var D=E.simpleMap(C.xr0,f.r2l),B=E.simpleMap(C.xr1,f.r2l),F=D[1]-D[0],P=B[1]-B[0];O[0]=(D[0]*(1-_)+_*B[0]-D[0])/(D[1]-D[0])*A,O[2]=A*(1-_+_*P/F),f.range[0]=f.l2r(D[0]*(1-_)+_*B[0]),f.range[1]=f.l2r(D[1]*(1-_)+_*B[1])}else O[0]=0,O[2]=A;if(I){var j=E.simpleMap(C.yr0,u.r2l),U=E.simpleMap(C.yr1,u.r2l),$=j[1]-j[0],Q=U[1]-U[0];O[1]=(j[1]*(1-_)+_*U[1]-j[1])/(j[0]-j[1])*x,O[3]=x*(1-_+_*Q/$),u.range[0]=f.l2r(j[0]*(1-_)+_*U[0]),u.range[1]=u.l2r(j[1]*(1-_)+_*U[1])}else O[1]=0,O[3]=x;l.drawOne(t,f,{skipTitle:!0}),l.drawOne(t,u,{skipTitle:!0}),l.redrawComponents(t,[f._id,u._id]);var re=z?A/O[2]:1,ne=I?x/O[3]:1,se=z?O[0]:0,G=I?O[1]:0,X=z?O[0]/O[2]*A:0,K=I?O[1]/O[3]*x:0,H=f._offset-X,Y=u._offset-K;T.clipRect.call(k.setTranslate,se,G).call(k.setScale,1/re,1/ne),T.plot.call(k.setTranslate,H,Y).call(k.setScale,re,ne),k.setPointGroupScale(T.zoomScalePts,1/re,1/ne),k.setTextPointsScale(T.zoomScaleTxt,1/re,1/ne)}var m;a&&(m=a());function h(){for(var C={},_=0;_r.duration?(h(),w=window.cancelAnimationFrame(M)):w=window.requestAnimationFrame(M)}return g=Date.now(),w=window.requestAnimationFrame(M),Promise.resolve()}}}),Du=ze({"src/plots/cartesian/index.js"(J){"use strict";var V=ci(),p=mi(),b=Nr(),E=cl(),k=$i(),l=zf().getModuleCalcData,e=Xl(),t=hc(),n=nd(),r=b.ensureSingle;function a(g,i,w){return b.ensureSingle(g,i,w,function(S){S.datum(w)})}var o=t.zindexSeparator;J.name="cartesian",J.attr=["xaxis","yaxis"],J.idRoot=["x","y"],J.idRegex=t.idRegex,J.attrRegex=t.attrRegex,J.attributes=PD(),J.layoutAttributes=cf(),J.supplyLayoutDefaults=RD(),J.transitionAxes=ID(),J.finalizeSubplots=function(g,i){var w=i._subplots,S=w.xaxis,M=w.yaxis,C=w.cartesian,_=C,T={},f={},u,A,x;for(u=0;u<_.length;u++){var z=_[u].split("y");T[z[0]]=1,f["y"+z[1]]=1}for(u=0;u0){var I=z.id;if(I.indexOf(o)!==-1)continue;I+=o+(u+1),z=b.extendFlat({},z,{id:I,plot:M._cartesianlayer.selectAll(".subplot").select("."+I)})}for(var O=[],D,B=0;B<_.length;B++){var F=_[B],P=F[0].trace;A===(P.zorder||0)&&P.xaxis+P.yaxis===x&&((i.indexOf(P.index)!==-1||P.carpet)&&(D&&D[0].trace.xaxis+D[0].trace.yaxis===x&&["tonextx","tonexty","tonext"].indexOf(P.fill)!==-1&&O.indexOf(D)===-1&&O.push(D),O.push(F)),D=F)}s(g,z,O,w,S)}}};function s(g,i,w,S,M){for(var C=t.traceLayerClasses,_=g._fullLayout,T=_._zindices,f=_._modules,u,A,x,z=[],I=[],O=0;O1&&($+=o+U),j.push(T+$),_=0;_1,x=i.mainplotinfo;if(!i.mainplot||A)if(u)i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.xaxislayer=r(S,"g","xaxislayer-above"),i.yaxislayer=r(S,"g","yaxislayer-above");else{if(!_){var z=r(S,"g","layer-subplot");i.shapelayer=r(z,"g","shapelayer"),i.imagelayer=r(z,"g","imagelayer"),x&&A?(i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer):(i.minorGridlayer=r(S,"g","minor-gridlayer"),i.gridlayer=r(S,"g","gridlayer"),i.zerolinelayer=r(S,"g","zerolinelayer"));var I=r(S,"g","layer-between");i.shapelayerBetween=r(I,"g","shapelayer"),i.imagelayerBetween=r(I,"g","imagelayer"),r(S,"path","xlines-below"),r(S,"path","ylines-below"),i.overlinesBelow=r(S,"g","overlines-below"),r(S,"g","xaxislayer-below"),r(S,"g","yaxislayer-below"),i.overaxesBelow=r(S,"g","overaxes-below")}i.overplot=r(S,"g","overplot"),i.plot=r(i.overplot,"g",M),x&&A?i.zerolinelayerAbove=x.zerolinelayerAbove:i.zerolinelayerAbove=r(S,"g","zerolinelayer-above"),_||(i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.overlinesAbove=r(S,"g","overlines-above"),r(S,"g","xaxislayer-above"),r(S,"g","yaxislayer-above"),i.overaxesAbove=r(S,"g","overaxes-above"),i.xlines=S.select(".xlines-"+T),i.ylines=S.select(".ylines-"+f),i.xaxislayer=S.select(".xaxislayer-"+T),i.yaxislayer=S.select(".yaxislayer-"+f))}else{var O=x.plotgroup,D=M+"-x",B=M+"-y";i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer,i.zerolinelayerAbove=x.zerolinelayerAbove,r(x.overlinesBelow,"path",D),r(x.overlinesBelow,"path",B),r(x.overaxesBelow,"g",D),r(x.overaxesBelow,"g",B),i.plot=r(x.overplot,"g",M),r(x.overlinesAbove,"path",D),r(x.overlinesAbove,"path",B),r(x.overaxesAbove,"g",D),r(x.overaxesAbove,"g",B),i.xlines=O.select(".overlines-"+T).select("."+D),i.ylines=O.select(".overlines-"+f).select("."+B),i.xaxislayer=O.select(".overaxes-"+T).select("."+D),i.yaxislayer=O.select(".overaxes-"+f).select("."+B)}_||(u||(a(i.minorGridlayer,"g",i.xaxis._id),a(i.minorGridlayer,"g",i.yaxis._id),i.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),a(i.gridlayer,"g",i.xaxis._id),a(i.gridlayer,"g",i.yaxis._id),i.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),i.xlines.style("fill","none").classed("crisp",!0),i.ylines.style("fill","none").classed("crisp",!0))}function h(g,i){if(g){var w={};g.each(function(f){var u=f[0],A=V.select(this);A.remove(),v(u,i),w[u]=!0});for(var S in i._plots)for(var M=i._plots[S],C=M.overlays||[],_=0;_=0,i=a.indexOf("end")>=0,w=c.backoff*h+o.standoff,S=m.backoff*v+o.startstandoff,M,C,_,T;if(s.nodeName==="line"){M={x:+r.attr("x1"),y:+r.attr("y1")},C={x:+r.attr("x2"),y:+r.attr("y2")};var f=M.x-C.x,u=M.y-C.y;if(_=Math.atan2(u,f),T=_+Math.PI,w&&S&&w+S>Math.sqrt(f*f+u*u)){$();return}if(w){if(w*w>f*f+u*u){$();return}var A=w*Math.cos(_),x=w*Math.sin(_);C.x+=A,C.y+=x,r.attr({x2:C.x,y2:C.y})}if(S){if(S*S>f*f+u*u){$();return}var z=S*Math.cos(_),I=S*Math.sin(_);M.x-=z,M.y-=I,r.attr({x1:M.x,y1:M.y})}}else if(s.nodeName==="path"){var O=s.getTotalLength(),D="";if(O2/3?cr="right":cr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[cr]}for(var Be=!1,Xe=["x","y"],Ye=0;Ye1)&&(Tt===gt?(et=At.r2fraction(S["a"+yt]),(et<0||et>1)&&(Be=!0)):Be=!0),ht=At._offset+At.r2p(S[yt]),We=.5}else{var Mt=Je==="domain";yt==="x"?(Ne=S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.l+u.w*Ne):(Ne=1-S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.t+u.h*Ne),We=S.showarrow?.5:Ne}if(S.showarrow){vt.head=ht;var pt=S["a"+yt];if(Ke=rr*Ae(.5,S.xanchor)-_r*Ae(.5,S.yanchor),Tt===gt){var Pt=e.getRefType(Tt);Pt==="domain"?(yt==="y"&&(pt=1-pt),vt.tail=At._offset+At._length*pt):Pt==="paper"?yt==="y"?(pt=1-pt,vt.tail=u.t+u.h*pt):vt.tail=u.l+u.w*pt:vt.tail=At._offset+At.r2p(pt),De=Ke}else vt.tail=ht+pt,De=Ke+pt;vt.text=vt.tail+Ke;var Ct=f[yt==="x"?"width":"height"];if(gt==="paper"&&(vt.head=k.constrain(vt.head,1,Ct-1)),Tt==="pixel"){var qt=-Math.max(vt.tail-3,vt.text),Vt=Math.min(vt.tail+3,vt.text)-Ct;qt>0?(vt.tail+=qt,vt.text+=qt):Vt>0&&(vt.tail-=Vt,vt.text-=Vt)}vt.tail+=Ot,vt.head+=Ot}else Ke=Xt*Ae(We,or),De=Ke,vt.text=ht+Ke;vt.text+=Ot,Ke+=Ot,De+=Ot,S["_"+yt+"padplus"]=Xt/2+De,S["_"+yt+"padminus"]=Xt/2-De,S["_"+yt+"size"]=Xt,S["_"+yt+"shift"]=Ke}if(Be){se.remove();return}var Ht=0,Sr=0;if(S.align!=="left"&&(Ht=(_e-Ge)*(S.align==="center"?.5:1)),S.valign!=="top"&&(Sr=(ce-ke)*(S.valign==="middle"?.5:1)),Ie)Se.select("svg").attr({x:K+Ht-1,y:K+Sr}).call(n.setClipUrl,Y?F:null,w);else{var Kr=K+Sr-Ve.top,Yt=K+Ht-Ve.left;ae.call(a.positionText,Yt,Kr).call(n.setClipUrl,Y?F:null,w)}q.select("rect").call(n.setRect,K,K,_e,ce),H.call(n.setRect,G/2,G/2,ve-G,le-G),se.call(n.setTranslate,Math.round(P.x.text-ve/2),Math.round(P.y.text-le/2)),$.attr({transform:"rotate("+j+","+P.x.text+","+P.y.text+")"});var Rt=function(ur,cr){U.selectAll(".annotation-arrow-g").remove();var Rr=P.x.head,Qr=P.y.head,Zr=P.x.tail+ur,ha=P.y.tail+cr,Pa=P.x.text+ur,La=P.y.text+cr,un=k.rotationXYMatrix(j,Pa,La),Xa=k.apply2DTransform(un),ja=k.apply2DTransform2(un),Nn=+H.attr("width"),yn=+H.attr("height"),Un=Pa-.5*Nn,li=Un+Nn,Yn=La-.5*yn,on=Yn+yn,en=[[Un,Yn,Un,on],[Un,on,li,on],[li,on,li,Yn],[li,Yn,Un,Yn]].map(ja);if(!en.reduce(function(ot,kt){return ot^!!k.segmentsIntersect(Rr,Qr,Rr+1e6,Qr+1e6,kt[0],kt[1],kt[2],kt[3])},!1)){en.forEach(function(ot){var kt=k.segmentsIntersect(Zr,ha,Rr,Qr,ot[0],ot[1],ot[2],ot[3]);kt&&(Zr=kt.x,ha=kt.y)});var vi=S.arrowwidth,Yi=S.arrowcolor,Ja=S.arrowside,Oa=U.append("g").style({opacity:t.opacity(Yi)}).classed("annotation-arrow-g",!0),lt=Oa.append("path").attr("d","M"+Zr+","+ha+"L"+Rr+","+Qr).style("stroke-width",vi+"px").call(t.stroke,t.rgb(Yi));if(m(lt,Ja,S),A.annotationPosition&<.node().parentNode&&!C){var rt=Rr,fr=Qr;if(S.standoff){var lr=Math.sqrt(Math.pow(Rr-Zr,2)+Math.pow(Qr-ha,2));rt+=S.standoff*(Zr-Rr)/lr,fr+=S.standoff*(ha-Qr)/lr}var Tr=Oa.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Zr-rt)+","+(ha-fr),transform:l(rt,fr)}).style("stroke-width",vi+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),Ir,Dr;s.init({element:Tr.node(),gd:w,prepFn:function(){var ot=n.getTranslate(se);Ir=ot.x,Dr=ot.y,_&&_.autorange&&O(_._name+".autorange",!0),T&&T.autorange&&O(T._name+".autorange",!0)},moveFn:function(ot,kt){var jt=Xa(Ir,Dr),ar=jt[0]+ot,Er=jt[1]+kt;se.call(n.setTranslate,ar,Er),D("x",g(_,ot,"x",u,S)),D("y",g(T,kt,"y",u,S)),S.axref===S.xref&&D("ax",g(_,ot,"ax",u,S)),S.ayref===S.yref&&D("ay",g(T,kt,"ay",u,S)),Oa.attr("transform",l(ot,kt)),$.attr({transform:"rotate("+j+","+ar+","+Er+")"})},doneFn:function(){b.call("_guiRelayout",w,B());var ot=document.querySelector(".js-notes-box-panel");ot&&ot.redraw(ot.selectedObj)}})}}};if(S.showarrow&&Rt(0,0),Q){var nr;s.init({element:se.node(),gd:w,prepFn:function(){nr=$.attr("transform")},moveFn:function(ur,cr){var Rr="pointer";if(S.showarrow)S.axref===S.xref?D("ax",g(_,ur,"ax",u,S)):D("ax",S.ax+ur),S.ayref===S.yref?D("ay",g(T,cr,"ay",u.w,S)):D("ay",S.ay+cr),Rt(ur,cr);else{if(C)return;var Qr,Zr;if(_)Qr=g(_,ur,"x",u,S);else{var ha=S._xsize/u.w,Pa=S.x+(S._xshift-S.xshift)/u.w-ha/2;Qr=s.align(Pa+ur/u.w,ha,0,1,S.xanchor)}if(T)Zr=g(T,cr,"y",u,S);else{var La=S._ysize/u.h,un=S.y-(S._yshift+S.yshift)/u.h-La/2;Zr=s.align(un-cr/u.h,La,0,1,S.yanchor)}D("x",Qr),D("y",Zr),(!_||!T)&&(Rr=s.getCursor(_?.5:Qr,T?.5:Zr,S.xanchor,S.yanchor))}$.attr({transform:l(ur,cr)+nr}),o(se,Rr)},clickFn:function(ur,cr){S.captureevents&&w.emit("plotly_clickannotation",ne(cr))},doneFn:function(){o(se),b.call("_guiRelayout",w,B());var ur=document.querySelector(".js-notes-box-panel");ur&&ur.redraw(ur.selectedObj)}})}}A.annotationText?ae.call(a.makeEditable,{delegate:se,gd:w}).call(he).on("edit",function(we){S.text=we,this.call(he),D("text",we),_&&_.autorange&&O(_._name+".autorange",!0),T&&T.autorange&&O(T._name+".autorange",!0),b.call("_guiRelayout",w,B())}):ae.call(he)}}}),zD=ze({"src/components/annotations/click.js"(J,V){"use strict";var p=Nr(),b=mi(),E=hs().arrayEditor;V.exports={hasClickToShow:k,onClick:l};function k(n,r){var a=e(n,r);return a.on.length>0||a.explicitOff.length>0}function l(n,r){var a=e(n,r),o=a.on,s=a.off.concat(a.explicitOff),c={},m=n._fullLayout.annotations,h,v;if(o.length||s.length){for(h=0;h1){o=!0;break}}o?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(a._pdata=b(l.glplot.cameraParams,[e.xaxis.r2l(a.x)*t[0],e.yaxis.r2l(a.y)*t[1],e.zaxis.r2l(a.z)*t[2]]),p(l.graphDiv,a,r,l.id,a._xa,a._ya))}}}}),GD=ze({"src/components/annotations3d/index.js"(J,V){"use strict";var p=mi(),b=Nr();V.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Xx()}}},layoutAttributes:Xx(),handleDefaults:UD(),includeBasePlot:E,convert:qD(),draw:VD()};function E(k,l){var e=p.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,n=Object.keys(k),r=0;r{var x=A+"anchor",z=A==="x"?w:S,I={_fullLayout:a},O,D,B,F;let P=A+"ref",j=n[P];if(Array.isArray(j)&&j.length>0){let U=l.countDefiningCoords(v,m,A);F=b.coerceRefArray(n,r,I,A,void 0,"paper",U),r["_"+A+"refArray"]=!0}else F=b.coerceRef(n,r,I,A,void 0,"paper");if(Array.isArray(F))F.forEach(function(U){b.getRefType(U)==="range"&&(O=b.getFromId(I,U),O&&O._shapeIndices.indexOf(r._index)===-1&&O._shapeIndices.push(r._index))}),g&&[0,1].forEach(function(U){let $=F[U];b.getRefType($)==="range"?(O=b.getFromId(I,$),D=l.shapePositionToRange(O),B=l.rangeToShapePosition(O),(O.type==="category"||O.type==="multicategory")&&o(A+U+"shift")):D=B=p.identity;let re=A+U,ne=n[re];if(n[re]=D(n[re],!0),z==="pixel"?o(re,C[U]):b.coercePosition(r,I,o,$,re,M[U]),r[re]=B(r[re]),n[re]=ne,U===0&&z==="pixel"){let se=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,$,x,.25),r[x]=B(r[x]),n[x]=se}});else{if(b.getRefType(F)==="range"?(O=b.getFromId(I,F),O._shapeIndices.push(r._index),B=l.rangeToShapePosition(O),D=l.shapePositionToRange(O),g&&(O.type==="category"||O.type==="multicategory")&&(o(A+"0shift"),o(A+"1shift"))):D=B=p.identity,g){let $=A+"0",Q=A+"1",re=n[$],ne=n[Q];n[$]=D(n[$],!0),n[Q]=D(n[Q],!0),z==="pixel"?(o($,C[0]),o(Q,C[1])):(b.coercePosition(r,I,o,F,$,M[0]),b.coercePosition(r,I,o,F,Q,M[1])),r[$]=B(r[$]),r[Q]=B(r[Q]),n[$]=re,n[Q]=ne}if(z==="pixel"){let $=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,F,x,.25),r[x]=B(r[x]),n[x]=$}}}),g&&p.noneOrAll(n,r,["x0","x1","y0","y1"]);var _=v==="line",T,f;if(g&&(T=o("label.texttemplate"),o("label.texttemplatefallback")),T||(f=o("label.text")),f||T){o("label.textangle");var u=o("label.textposition",_?"middle":"middle center");o("label.xanchor"),o("label.yanchor",e(_,u)),o("label.padding"),p.coerceFont(o,"label.font",a.font)}}}}),WD=ze({"src/components/shapes/draw_newshape/defaults.js"(J,V){"use strict";var p=Qn(),b=Nr();function E(k,l){return k?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}V.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),b.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var n=t("newshape.line.width");if(n){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",p.contrast(r)),t("newshape.line.dash")}var a=l.dragmode==="drawline",o=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),o||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",a?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",E(a,c)),t("newshape.label.padding"),b.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),YD=ze({"src/components/shapes/calc_autorange.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=h1(),k=cv();V.exports=function(o){var s=o._fullLayout,c=p.filterVisible(s.shapes);if(!(!c.length||!o._fullData.length))for(var m=0;m{v=b.getFromId(o,M),h._extremes[v._id]=b.findExtremes(v,C,e(h))})}else h.xref!=="paper"&&i!=="domain"&&(v=b.getFromId(o,h.xref),g=r(v,h,E.paramIsX),g&&(h._extremes[v._id]=b.findExtremes(v,g,e(h))));if(w==="array"){let S=l(o,h,"y");Object.entries(S).forEach(([M,C])=>{v=b.getFromId(o,M),h._extremes[v._id]=b.findExtremes(v,C,t(h))})}else h.yref!=="paper"&&w!=="domain"&&(v=b.getFromId(o,h.yref),g=r(v,h,E.paramIsY),g&&(h._extremes[v._id]=b.findExtremes(v,g,t(h))))}};function l(a,o,s){let c=o[s+"ref"],m=s==="x"?E.paramIsX:E.paramIsY;function h(M,C){M==="paper"||b.getRefType(M)==="domain"||(v[M]||(v[M]=[]),v[M].push(C))}let v={};if(o.type==="path"&&o.path){let M=o.path.match(E.segmentRE)||[];for(var g=0,i=0;iT&&(h(c[g],f[T]),g++)}}else h(c[0],o[s+"0"]),h(c[1],o[s+"1"]);let w={};for(let M in v){let C=b.getFromId(a,M);if(C){var S=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(S=k.decodeDate(S)),w[C._id]=v[M].map(S)}}return w}function e(a){return n(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function t(a){return n(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function n(a,o,s,c,m,h){var v=a/2,g=h;if(o==="pixel"){var i=m?k.extractPathCoords(m,h?E.paramIsY:E.paramIsX):[s,c],w=p.aggNums(Math.max,null,i),S=p.aggNums(Math.min,null,i),M=S<0?Math.abs(S)+v:v,C=w>0?w+v:v;return{ppad:v,ppadplus:g?M:C,ppadminus:g?C:M}}else return{ppad:v}}function r(a,o,s){var c=a._id.charAt(0)==="x"?"x":"y",m=a.type==="category"||a.type==="multicategory",h,v,g=0,i=0,w=m?a.r2c:a.d2c,S=o[c+"sizemode"]==="scaled";if(S?(h=o[c+"0"],v=o[c+"1"],m&&(g=o[c+"0shift"],i=o[c+"1shift"])):(h=o[c+"anchor"],v=o[c+"anchor"]),h!==void 0)return[w(h)+g,w(v)+i];if(o.path){var M=1/0,C=-1/0,_=o.path.match(E.segmentRE),T,f,u,A,x;for(a.type==="date"&&(w=k.decodeDate(w)),T=0;T<_.length;T++)f=_[T],u=s[f.charAt(0)].drawn,u!==void 0&&(A=_[T].slice(1).match(E.paramRE),!(!A||A.lengthC&&(C=x)));if(C>=M)return[M,C]}}}}),XD=ze({"src/components/shapes/index.js"(J,V){"use strict";var p=Ox();V.exports={moduleType:"component",name:"shapes",layoutAttributes:L5(),supplyLayoutDefaults:HD(),supplyDrawNewShapeDefaults:WD(),includeBasePlot:m1()("shapes"),calcAutorange:YD(),draw:p.draw,drawOne:p.drawOne}}}),P5=ze({"src/components/images/attributes.js"(J,V){"use strict";var p=hc(),b=hs().templatedArray,E=v1();V.exports=b("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",p.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",p.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),ZD=ze({"src/components/images/defaults.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=Jf(),k=P5(),l="images";V.exports=function(n,r){var a={name:l,handleItemDefaults:e};E(n,r,a)};function e(t,n,r){function a(w,S){return p.coerce(t,n,k,w,S)}var o=a("source"),s=a("visible",!!o);if(!s)return n;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var c={_fullLayout:r},m=["x","y"],h=0;h<2;h++){var v=m[h],g=b.coerceRef(t,n,c,v,"paper",void 0);if(g!=="paper"){var i=b.getFromId(c,g);i._imgIndices.push(n._index)}b.coercePosition(n,c,a,g,v,0)}return n}}}),$D=ze({"src/components/images/draw.js"(J,V){"use strict";var p=ci(),b=$i(),E=Gi(),k=Xl(),l=nd();V.exports=function(t){var n=t._fullLayout,r=[],a={},o=[],s,c;for(c=0;c0);m&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),p.noneOrAll(r,a,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),p.coerceFont(s,"font",o.font),s("bgcolor",o.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function n(r,a){function o(c,m){return p.coerce(r,a,e,c,m)}var s=o("visible",r.method==="skip"||Array.isArray(r.args));s&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),eF=ze({"src/components/updatemenus/scrollbox.js"(J,V){"use strict";V.exports=l;var p=ci(),b=Qn(),E=$i(),k=Nr();function l(e,t,n){this.gd=e,this.container=t,this.id=n,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})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,n,r){var a=this.gd._fullLayout,o=a.width,s=a.height;this.position=t;var c=this.position.l,m=this.position.w,h=this.position.t,v=this.position.h,g=this.position.direction,i=g==="down",w=g==="left",S=g==="right",M=g==="up",C=m,_=v,T,f,u,A;!i&&!w&&!S&&!M&&(this.position.direction="down",i=!0);var x=i||M;x?(T=c,f=T+C,i?(u=h,A=Math.min(u+_,s),_=A-u):(A=h+_,u=Math.max(A-_,0),_=A-u)):(u=h,A=u+_,w?(f=c+C,T=Math.max(f-C,0),C=f-T):(T=c,f=Math.min(T+C,o),C=f-T)),this._box={l:T,t:u,w:C,h:_};var z=m>C,I=l.barLength+2*l.barPad,O=l.barWidth+2*l.barPad,D=c,B=h+v;B+O>s&&(B=s-O);var F=this.container.selectAll("rect.scrollbar-horizontal").data(z?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(b.fill,l.barColor),z?(this.hbar=F.attr({rx:l.barRadius,ry:l.barRadius,x:D,y:B,width:I,height:O}),this._hbarXMin=D+I/2,this._hbarTranslateMax=C-I):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=v>_,j=l.barWidth+2*l.barPad,U=l.barLength+2*l.barPad,$=c+m,Q=h;$+j>o&&($=o-j);var re=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);re.exit().on(".drag",null).remove(),re.enter().append("rect").classed("scrollbar-vertical",!0).call(b.fill,l.barColor),P?(this.vbar=re.attr({rx:l.barRadius,ry:l.barRadius,x:$,y:Q,width:j,height:U}),this._vbarYMin=Q+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ne=this.id,se=T-.5,G=P?f+j+.5:f+.5,X=u-.5,K=z?A+O+.5:A+.5,H=a._topdefs.selectAll("#"+ne).data(z||P?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",ne).append("rect"),z||P?(this._clipRect=H.select("rect").attr({x:Math.floor(se),y:Math.floor(X),width:Math.ceil(G)-Math.floor(se),height:Math.ceil(K)-Math.floor(X)}),this.container.call(E.setClipUrl,ne,this.gd),this.bg.attr({x:c,y:h,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),z||P){var Y=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var q=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault(),p.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));z&&this.hbar.on(".drag",null).call(q),P&&this.vbar.on(".drag",null).call(q)}this.setTranslate(n,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.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)},l.prototype._onBoxDrag=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t-=p.event.dx),this.vbar&&(n-=p.event.dy),this.setTranslate(t,n)},l.prototype._onBoxWheel=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t+=p.event.deltaY),this.vbar&&(n+=p.event.deltaY),this.setTranslate(t,n)},l.prototype._onBarDrag=function(){var t=this.translateX,n=this.translateY;if(this.hbar){var r=t+this._hbarXMin,a=r+this._hbarTranslateMax,o=k.constrain(p.event.x,r,a),s=(o-r)/(a-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var m=n+this._vbarYMin,h=m+this._vbarTranslateMax,v=k.constrain(p.event.y,m,h),g=(v-m)/(h-m),i=this.position.h-this._box.h;n=g*i}this.setTranslate(t,n)},l.prototype.setTranslate=function(t,n){var r=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=k.constrain(t||0,0,r),n=k.constrain(n||0,0,a),this.translateX=t,this.translateY=n,this.container.call(E.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-n),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+n-.5)}),this.hbar){var o=t/r;this.hbar.call(E.setTranslate,t+o*this._hbarTranslateMax,n)}if(this.vbar){var s=n/a;this.vbar.call(E.setTranslate,t,n+s*this._vbarTranslateMax)}}}}),tF=ze({"src/components/updatemenus/draw.js"(J,V){"use strict";var p=ci(),b=cl(),E=Qn(),k=$i(),l=Nr(),e=Cs(),t=hs().arrayEditor,n=dc().LINE_SPACING,r=Zx(),a=eF();V.exports=function(I){var O=I._fullLayout,D=l.filterVisible(O[r.name]);function B(ne){b.autoMargin(I,u(ne))}var F=O._menulayer.selectAll("g."+r.containerClassName).data(D.length>0?[0]:[]);if(F.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),F.exit().each(function(){p.select(this).selectAll("g."+r.headerGroupClassName).each(B)}).remove(),D.length!==0){var P=F.selectAll("g."+r.headerGroupClassName).data(D,o);P.enter().append("g").classed(r.headerGroupClassName,!0);for(var j=l.ensureSingle(F,"g",r.dropdownButtonGroupClassName,function(ne){ne.style("pointer-events","all")}),U=0;U0?[0]:[]);$.enter().append("g").classed(r.containerClassName,!0).style("cursor",P?null:"ew-resize");function Q(G){G._commandObserver&&(G._commandObserver.remove(),delete G._commandObserver),b.autoMargin(F,m(G))}if($.exit().each(function(){p.select(this).selectAll("g."+r.groupClassName).each(Q)}).remove(),U.length!==0){var re=$.selectAll("g."+r.groupClassName).data(U,v);re.enter().append("g").classed(r.groupClassName,!0),re.exit().each(Q).remove();for(var ne=0;ne0&&(re=re.transition().duration(F.transition.duration).ease(F.transition.easing)),re.attr("transform",e(Q-r.gripWidth*.5,F._dims.currentValueTotalHeight))}}function z(B,F){var P=B._dims;return P.inputAreaStart+r.stepInset+(P.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,F))}function I(B,F){var P=B._dims;return Math.min(1,Math.max(0,(F-r.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*r.stepInset-2*P.inputAreaStart)))}function O(B,F,P){var j=P._dims,U=l.ensureSingle(B,"rect",r.railTouchRectClass,function($){$.call(f,F,B,P).style("pointer-events","all")});U.attr({width:j.inputAreaLength,height:Math.max(j.inputAreaWidth,r.tickOffset+P.ticklen+j.labelHeight)}).call(E.fill,P.bgcolor).attr("opacity",0),k.setTranslate(U,0,j.currentValueTotalHeight)}function D(B,F){var P=F._dims,j=P.inputAreaLength-r.railInset*2,U=l.ensureSingle(B,"rect",r.railRectClass);U.attr({width:j,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(E.stroke,F.bordercolor).call(E.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),k.setTranslate(U,r.railInset,(P.inputAreaWidth-r.railWidth)*.5+P.currentValueTotalHeight)}}}),iF=ze({"src/components/sliders/index.js"(J,V){"use strict";var p=_1();V.exports={moduleType:"component",name:p.name,layoutAttributes:I5(),supplyLayoutDefaults:aF(),draw:nF()}}}),$x=ze({"src/components/rangeslider/attributes.js"(J,V){"use strict";var p=fc();V.exports={bgcolor:{valType:"color",dflt:p.background,editType:"plot"},bordercolor:{valType:"color",dflt:p.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"}}}),D5=ze({"src/components/rangeslider/oppaxis_attributes.js"(J,V){"use strict";V.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}}),Kx=ze({"src/components/rangeslider/constants.js"(J,V){"use strict";V.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),oF=ze({"src/components/rangeslider/helpers.js"(J){"use strict";var V=Xl(),p=Cs(),b=Kx(),E=dc().LINE_SPACING,k=b.name;function l(e){var t=e&&e[k];return t&&t.visible}J.isVisible=l,J.makeData=function(e){for(var t=V.list({_fullLayout:e},"x",!0),n=e.margin,r=[],a=0;a=Ge.max)Ie=he[Ve+1];else if(Se=Ge.pmax)Ie=he[Ve+1];else if(Se0?f.touches[0].clientX:0}function h(f,u,A,x){if(u._context.staticPlot)return;var z=f.select("rect."+c.slideBoxClassName).node(),I=f.select("rect."+c.grabAreaMinClassName).node(),O=f.select("rect."+c.grabAreaMaxClassName).node();function D(){var B=p.event,F=B.target,P=m(B),j=P-f.node().getBoundingClientRect().left,U=x.d2p(A._rl[0]),$=x.d2p(A._rl[1]),Q=o.coverSlip();this.addEventListener("touchmove",re),this.addEventListener("touchend",ne),Q.addEventListener("mousemove",re),Q.addEventListener("mouseup",ne);function re(se){var G=m(se),X=+G-P,K,H,Y;switch(F){case z:if(Y="ew-resize",U+X>A._length||$+X<0)return;K=U+X,H=$+X;break;case I:if(Y="col-resize",U+X>A._length)return;K=U+X,H=$;break;case O:if(Y="col-resize",$+X<0)return;K=U,H=$+X;break;default:Y="ew-resize",K=j,H=j+X;break}if(H0);if(w){var S=n(o,s,c);g("x",S[0]),g("y",S[1]),p.noneOrAll(a,o,["x","y"]),g("xanchor"),g("yanchor"),p.coerceFont(g,"font",s.font);var M=g("bgcolor");g("activecolor",b.contrast(M,e.lightAmount,e.darkAmount)),g("bordercolor"),g("borderwidth")}};function t(r,a,o,s){var c=s.calendar;function m(g,i){return p.coerce(r,a,l.buttons,g,i)}var h=m("visible");if(h){var v=m("step");v!=="all"&&(c&&c!=="gregorian"&&(v==="month"||v==="year")?a.stepmode="backward":m("stepmode"),m("count")),m("label")}}function n(r,a,o){for(var s=o.filter(function(v){return a[v].anchor===r._id}),c=0,m=0;m1)){delete c.grid;return}if(!g&&!i&&!w){var A=T("pattern")==="independent";A&&(g=!0)}_._hasSubplotGrid=g;var x=T("roworder"),z=x==="top to bottom",I=g?.2:.1,O=g?.3:.1,D,B;S&&c._splomGridDflt&&(D=c._splomGridDflt.xside,B=c._splomGridDflt.yside),_._domains={x:r("x",T,I,D,u),y:r("y",T,O,B,f,z)}}function r(s,c,m,h,v,g){var i=c(s+"gap",m),w=c("domain."+s);c(s+"side",h);for(var S=new Array(v),M=w[0],C=(w[1]-M)/(v-i),_=C*(1-i),T=0;T0,h=t._context.staticPlot;n.each(function(v){var g=v[0].trace,i=g.error_x||{},w=g.error_y||{},S;g.ids&&(S=function(T){return T.id});var M=k.hasMarkers(g)&&g.marker.maxdisplayed>0;!w.visible&&!i.visible&&(v=[]);var C=p.select(this).selectAll("g.errorbar").data(v,S);if(C.exit().remove(),!!v.length){i.visible||C.selectAll("path.xerror").remove(),w.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var _=C.enter().append("g").classed("errorbar",!0);m&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),E.setClipUrl(C,r.layerClipId,t),C.each(function(T){var f=p.select(this),u=l(T,s,c);if(!(M&&!T.vis)){var A,x=f.select("path.yerror");if(w.visible&&b(u.x)&&b(u.yh)&&b(u.ys)){var z=w.width;A="M"+(u.x-z)+","+u.yh+"h"+2*z+"m-"+z+",0V"+u.ys,u.noYS||(A+="m-"+z+",0h"+2*z),o=!x.size(),o?x=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0):m&&(x=x.transition().duration(a.duration).ease(a.easing)),x.attr("d",A)}else x.remove();var I=f.select("path.xerror");if(i.visible&&b(u.y)&&b(u.xh)&&b(u.xs)){var O=(i.copy_ystyle?w:i).width;A="M"+u.xh+","+(u.y-O)+"v"+2*O+"m0,-"+O+"H"+u.xs,u.noXS||(A+="m0,-"+O+"v"+2*O),o=!I.size(),o?I=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0):m&&(I=I.transition().duration(a.duration).ease(a.easing)),I.attr("d",A)}else I.remove()}})}})};function l(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};return e.yh!==void 0&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),b(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),b(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),yF=ze({"src/components/errorbars/style.js"(J,V){"use strict";var p=ci(),b=Qn();V.exports=function(k){k.each(function(l){var e=l[0].trace,t=e.error_y||{},n=e.error_x||{},r=p.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(b.stroke,t.color),n.copy_ystyle&&(n=t),r.selectAll("path.xerror").style("stroke-width",n.thickness+"px").call(b.stroke,n.color)})}}}),_F=ze({"src/components/errorbars/index.js"(J,V){"use strict";var p=Nr(),b=Al().overrideAll,E=B5(),k={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E)};delete k.error_x.copy_zstyle,delete k.error_y.copy_zstyle,delete k.error_y.copy_ystyle;var l={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E),error_z:p.extendFlat({},E)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,V.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:k,bar:k,histogram:k,scatter3d:b(l,"calc","nested"),scattergl:b(k,"calc","nested")}},supplyDefaults:vF(),calc:mF(),makeComputeError:O5(),plot:gF(),style:yF(),hoverInfo:e};function e(t,n,r){(n.error_y||{}).visible&&(r.yerr=t.yh-t.y,n.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(n.error_x||{}).visible&&(r.xerr=t.xh-t.x,n.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),xF=ze({"src/components/colorbar/constants.js"(J,V){"use strict";V.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),bF=ze({"src/components/colorbar/draw.js"(J,V){"use strict";var p=ci(),b=cl(),E=mi(),k=Gi(),l=_h(),e=Nr(),t=e.strTranslate,n=Ki().extendFlat,r=gd(),a=$i(),o=Qn(),s=qv(),c=Cs(),m=Bf().flipScale,h=y1(),v=Wx(),g=cf(),i=dc(),w=i.LINE_SPACING,S=i.FROM_TL,M=i.FROM_BR,C=xF().cn;function _(O){var D=O._fullLayout,B=D._infolayer.selectAll("g."+C.colorbar).data(T(O),function(F){return F._id});B.enter().append("g").attr("class",function(F){return F._id}).classed(C.colorbar,!0),B.each(function(F){var P=p.select(this);e.ensureSingle(P,"rect",C.cbbg),e.ensureSingle(P,"g",C.cbfills),e.ensureSingle(P,"g",C.cblines),e.ensureSingle(P,"g",C.cbaxis,function(U){U.classed(C.crisp,!0)}),e.ensureSingle(P,"g",C.cbtitleunshift,function(U){U.append("g").classed(C.cbtitle,!0)}),e.ensureSingle(P,"rect",C.cboutline);var j=A(P,F,O);j&&j.then&&(O._promises||[]).push(j),O._context.edits.colorbarPosition&&x(P,F,O)}),B.exit().each(function(F){b.autoMargin(O,F._id)}).remove(),B.order()}function T(O){var D=O._fullLayout,B=O.calcdata,F=[],P,j,U,$;function Q(ee){return n(ee,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof $.calc=="function"?$.calc(O,U,P):(P._fillgradient=j.reversescale?m(j.colorscale):j.colorscale,P._zrange=[j[$.min],j[$.max]])}for(var ne=0;ne[Math.min(O[0]+D,O[1]),O[1]],u=(O,D)=>[O[0],Math.max(O[1]-D,O[0])];function A(O,D,B){var F=D.orientation==="v",P=D.len,j=D.lenmode,U=D.thickness,$=D.thicknessmode,Q=D.outlinewidth,re=D.borderwidth,ne=D.bgcolor,se=D.xanchor,G=D.yanchor,X=D.xpad,K=D.ypad,H=D.x,Y=F?D.y:1-D.y,q=D.yref==="paper",Z=D.xref==="paper",ee=B._fullLayout,ae=ee._size,he=D._fillcolor,xe=D._line,we=D.title,Me=we.side,Se=D._zrange||p.extent((typeof he=="function"?he:xe.color).domain()),Ie=typeof xe.color=="function"?xe.color:function(){return xe.color},Ve=typeof he=="function"?he:function(){return he},Ge=D._levels,ke=z(B,D,Se),_e=ke.fill,ce=ke.line,ve=Math.round(U*($==="fraction"?F?ae.w:ae.h:1)),le=ve/(F?ae.w:ae.h),Ae=Math.round(P*(j==="fraction"?F?ae.h:ae.w:1)),Be=Ae/(F?ae.h:ae.w),Xe=Z?ae.w:B._fullLayout.width,Ye=q?ae.h:B._fullLayout.height,yt=Math.round(F?H*Xe+X:Y*Ye+K),gt={center:.5,right:1}[se]||0,Tt={top:1,middle:.5}[G]||0,At=F?H-gt*le:Y-Tt*le,$t=F?Y-Tt*Be:H-gt*Be,rr=Math.round(F?Ye*(1-$t):Xe*$t);D._lenFrac=Be,D._thickFrac=le,D._uFrac=At,D._vFrac=$t;var _r=D._axis=I(B,D,Se);_r.position=le+(F?H+X/ae.w:Y+K/ae.h);var Xt=["top","bottom"].indexOf(Me)!==-1;if(F&&Xt&&(_r.title.side=Me,_r.titlex=H+X/ae.w,_r.titley=$t+(we.side==="top"?Be-K/ae.h:K/ae.h)),!F&&!Xt&&(_r.title.side=Me,_r.titley=Y+K/ae.h,_r.titlex=$t+X/ae.w),xe.color&&D.tickmode==="auto"){_r.tickmode="linear",_r.tick0=Ge.start;var or=Ge.size,Ot=e.constrain(Ae/50,4,15)+1,vt=(Se[1]-Se[0])/((D.nticks||Ot)*or);if(vt>1){var ht=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));or*=ht*e.roundUp(vt/ht,[2,5,10]),(Math.abs(Ge.start)/Ge.size+1e-6)%1<2e-6&&(_r.tick0=0)}_r.dtick=or}var De=F?K/ae.h:X/ae.w;_r.domain=u(f([$t,$t+Be],De),De),_r.setScale(),O.attr("transform",t(Math.round(ae.l),Math.round(ae.t)));var Ne=O.select("."+C.cbtitleunshift).attr("transform",t(-Math.round(ae.l),-Math.round(ae.t))),We=_r.ticklabelposition,Ke=_r.title.font.size,Je=O.select("."+C.cbaxis),et,Mt=0,pt=0;function Pt(Sr,Kr){var Yt={propContainer:_r,propName:D._propPrefix+"title.text",traceIndex:D._traceIndex,_meta:D._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:O.select("."+C.cbtitle)},Rt=Sr.charAt(0)==="h"?Sr.slice(1):"h"+Sr;O.selectAll("."+Rt+",."+Rt+"-math-group").remove(),s.draw(B,Sr,n(Yt,Kr||{}))}function Ct(){if(F&&Xt||!F&&!Xt){var Sr,Kr;Me==="top"&&(Sr=X+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t-Be)+3+Ke*.75),Me==="bottom"&&(Sr=X+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t)-3-Ke*.25),Me==="right"&&(Kr=K+ae.t+Ye*Y+3+Ke*.75,Sr=X+ae.l+Xe*$t),Pt(_r._id+"title",{attributes:{x:Sr,y:Kr,"text-anchor":F?"start":"middle"}})}}function qt(){if(F&&!Xt||!F&&Xt){var Sr=_r.position||0,Kr=_r._offset+_r._length/2,Yt,Rt;if(Me==="right")Rt=Kr,Yt=ae.l+Xe*Sr+10+Ke*(_r.showticklabels?1:.5);else if(Yt=Kr,Me==="bottom"&&(Rt=ae.t+Ye*Sr+10+(We.indexOf("inside")===-1?_r.tickfont.size:0)+(_r.ticks!=="inside"&&D.ticklen||0)),Me==="top"){var nr=we.text.split("
").length;Rt=ae.t+Ye*Sr+10-ve-w*Ke*nr}Pt((F?"h":"v")+_r._id+"title",{avoid:{selection:p.select(B).selectAll("g."+_r._id+"tick"),side:Me,offsetTop:F?0:ae.t,offsetLeft:F?ae.l:0,maxShift:F?ee.width:ee.height},attributes:{x:Yt,y:Rt,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}}function Vt(){if(!F&&!Xt||F&&Xt){var Sr=O.select("."+C.cbtitle),Kr=Sr.select("text"),Yt=[-Q/2,Q/2],Rt=Sr.select(".h"+_r._id+"title-math-group").node(),nr=15.6;Kr.node()&&(nr=parseInt(Kr.node().style.fontSize,10)*w);var ur;if(Rt?(ur=a.bBox(Rt),pt=ur.width,Mt=ur.height,Mt>nr&&(Yt[1]-=(Mt-nr)/2)):Kr.node()&&!Kr.classed(C.jsPlaceholder)&&(ur=a.bBox(Kr.node()),pt=ur.width,Mt=ur.height),F){if(Mt){if(Mt+=5,Me==="top")_r.domain=u(_r.domain,Mt/ae.h),Yt[1]*=-1;else{_r.domain=f(_r.domain,Mt/ae.h);var cr=c.lineCount(Kr);Yt[1]+=(1-cr)*nr}Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale()}}else pt&&(Me==="right"&&(_r.domain=f(_r.domain,(pt+Ke/2)/ae.w)),Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale())}O.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",F?t(0,Math.round(ae.h*(1-_r.domain[1]))):t(Math.round(ae.w*_r.domain[0]),0)),Je.attr("transform",F?t(0,Math.round(-ae.t)):t(Math.round(-ae.l),0));var Rr=O.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(_e);Rr.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Rr.exit().remove();var Qr=Se.map(_r.c2p).map(Math.round).sort(function(un,Xa){return un-Xa});Rr.each(function(un,Xa){var ja=[Xa===0?Se[0]:(_e[Xa]+_e[Xa-1])/2,Xa===_e.length-1?Se[1]:(_e[Xa]+_e[Xa+1])/2].map(_r.c2p).map(Math.round);F&&(ja[1]=e.constrain(ja[1]+(ja[1]>ja[0])?1:-1,Qr[0],Qr[1]));var Nn=p.select(this).attr(F?"x":"y",yt).attr(F?"y":"x",p.min(ja)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(p.max(ja)-p.min(ja),2));if(D._fillgradient)a.gradient(Nn,B,D._id,F?"vertical":"horizontalreversed",D._fillgradient,"fill");else{var yn=Ve(un).replace("e-","");Nn.attr("fill",o.hexString(yn))}});var Zr=O.select("."+C.cblines).selectAll("path."+C.cbline).data(xe.color&&xe.width?ce:[]);Zr.enter().append("path").classed(C.cbline,!0),Zr.exit().remove(),Zr.each(function(un){var Xa=yt,ja=Math.round(_r.c2p(un))+xe.width/2%1;p.select(this).attr("d","M"+(F?Xa+","+ja:ja+","+Xa)+(F?"h":"v")+ve).call(a.lineGroupStyle,xe.width,Ie(un),xe.dash)}),Je.selectAll("g."+_r._id+"tick,path").remove();var ha=yt+ve+(Q||0)/2-(D.ticks==="outside"?1:0),Pa=k.calcTicks(_r),La=k.getTickSigns(_r)[2];return k.drawTicks(B,_r,{vals:_r.ticks==="inside"?k.clipEnds(_r,Pa):Pa,layer:Je,path:k.makeTickPath(_r,ha,La),transFn:k.makeTransTickFn(_r)}),k.drawLabels(B,_r,{vals:Pa,layer:Je,transFn:k.makeTransTickLabelFn(_r),labelFns:k.makeLabelFns(_r,ha)})}function Ht(){var Sr,Kr=ve+Q/2;We.indexOf("inside")===-1&&(Sr=a.bBox(Je.node()),Kr+=F?Sr.width:Sr.height),et=Ne.select("text");var Yt=0,Rt=F&&Me==="top",nr=!F&&Me==="right",ur=0;if(et.node()&&!et.classed(C.jsPlaceholder)){var cr,Rr=Ne.select(".h"+_r._id+"title-math-group").node();Rr&&(F&&Xt||!F&&!Xt)?(Sr=a.bBox(Rr),Yt=Sr.width,cr=Sr.height):(Sr=a.bBox(Ne.node()),Yt=Sr.right-ae.l-(F?yt:rr),cr=Sr.bottom-ae.t-(F?rr:yt),!F&&Me==="top"&&(Kr+=Sr.height,ur=Sr.height)),nr&&(et.attr("transform",t(Yt/2+Ke/2,0)),Yt*=2),Kr=Math.max(Kr,F?Yt:cr)}var Qr=(F?X:K)*2+Kr+re+Q/2,Zr=0;!F&&we.text&&G==="bottom"&&Y<=0&&(Zr=Qr/2,Qr+=Zr,ur+=Zr),ee._hColorbarMoveTitle=Zr,ee._hColorbarMoveCBTitle=ur;var ha=re+Q,Pa=(F?yt:rr)-ha/2-(F?X:0),La=(F?rr:yt)-(F?Ae:K+ur-Zr);O.select("."+C.cbbg).attr("x",Pa).attr("y",La).attr(F?"width":"height",Math.max(Qr-Zr,2)).attr(F?"height":"width",Math.max(Ae+ha,2)).call(o.fill,ne).call(o.stroke,D.bordercolor).style("stroke-width",re);var un=nr?Math.max(Yt-10,0):0;O.selectAll("."+C.cboutline).attr("x",(F?yt:rr+X)+un).attr("y",(F?rr+K-Ae:yt)+(Rt?Mt:0)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(Ae-(F?2*K+Mt:2*X+un),2)).call(o.stroke,D.outlinecolor).style({fill:"none","stroke-width":Q});var Xa=F?gt*Qr:0,ja=F?0:(1-Tt)*Qr-ur;if(Xa=Z?ae.l-Xa:-Xa,ja=q?ae.t-ja:-ja,O.attr("transform",t(Xa,ja)),!F&&(re||o.opacity(ne)&&!o.equals(ee.paper_bgcolor,ne))){var Nn=Je.selectAll("text"),yn=Nn[0].length,Un=O.select("."+C.cbbg).node(),li=a.bBox(Un),Yn=a.getTranslate(O),on=2;Nn.each(function(Tr,Ir){var Dr=0,ot=yn-1;if(Ir===Dr||Ir===ot){var kt=a.bBox(this),jt=a.getTranslate(this),ar;if(Ir===ot){var Er=kt.right+jt.x,xr=li.right+Yn.x+rr-re-on+H;ar=xr-Er,ar>0&&(ar=0)}else if(Ir===Dr){var zr=kt.left+jt.x,Lr=li.left+Yn.x+rr+re+on;ar=Lr-zr,ar<0&&(ar=0)}ar&&(yn<3?this.setAttribute("transform","translate("+ar+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var en={},vi=S[se],Yi=M[se],Ja=S[G],Oa=M[G],lt=Qr-ve;F?(j==="pixels"?(en.y=Y,en.t=Ae*Ja,en.b=Ae*Oa):(en.t=en.b=0,en.yt=Y+P*Ja,en.yb=Y-P*Oa),$==="pixels"?(en.x=H,en.l=Qr*vi,en.r=Qr*Yi):(en.l=lt*vi,en.r=lt*Yi,en.xl=H-U*vi,en.xr=H+U*Yi)):(j==="pixels"?(en.x=H,en.l=Ae*vi,en.r=Ae*Yi):(en.l=en.r=0,en.xl=H+P*vi,en.xr=H-P*Yi),$==="pixels"?(en.y=1-Y,en.t=Qr*Ja,en.b=Qr*Oa):(en.t=lt*Ja,en.b=lt*Oa,en.yt=Y-U*Ja,en.yb=Y+U*Oa));var rt=D.y<.5?"b":"t",fr=D.x<.5?"l":"r";B._fullLayout._reservedMargin[D._id]={};var lr={r:ee.width-Pa-Xa,l:Pa+en.r,b:ee.height-La-ja,t:La+en.b};Z&&q?b.autoMargin(B,D._id,en):Z?B._fullLayout._reservedMargin[D._id][rt]=lr[rt]:q||F?B._fullLayout._reservedMargin[D._id][fr]=lr[fr]:B._fullLayout._reservedMargin[D._id][rt]=lr[rt]}return e.syncOrAsync([b.previousPromises,Ct,Vt,qt,b.previousPromises,Ht],B)}function x(O,D,B){var F=D.orientation==="v",P=B._fullLayout,j=P._size,U,$,Q;l.init({element:O.node(),gd:B,prepFn:function(){U=O.attr("transform"),r(O)},moveFn:function(re,ne){O.attr("transform",U+t(re,ne)),$=l.align((F?D._uFrac:D._vFrac)+re/j.w,F?D._thickFrac:D._lenFrac,0,1,D.xanchor),Q=l.align((F?D._vFrac:1-D._uFrac)-ne/j.h,F?D._lenFrac:D._thickFrac,0,1,D.yanchor);var se=l.getCursor($,Q,D.xanchor,D.yanchor);r(O,se)},doneFn:function(){if(r(O),$!==void 0&&Q!==void 0){var re={};re[D._propPrefix+"x"]=$,re[D._propPrefix+"y"]=Q,D._traceIndex!==void 0?E.call("_guiRestyle",B,re,D._traceIndex):E.call("_guiRelayout",B,re)}}})}function z(O,D,B){var F=D._levels,P=[],j=[],U,$,Q=F.end+F.size/100,re=F.size,ne=1.001*B[0]-.001*B[1],se=1.001*B[1]-.001*B[0];for($=0;$<1e5&&(U=F.start+$*re,!(re>0?U>=Q:U<=Q));$++)U>ne&&U0?U>=Q:U<=Q));$++)U>B[0]&&U-1}V.exports=function(n,r){var a,o=n.data,s=n.layout,c=k([],o),m=k({},s,l(r.tileClass)),h=n._context||{};if(r.width&&(m.width=r.width),r.height&&(m.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){m.annotations=[];var v=Object.keys(m);for(a=0;a=0)return h}else if(typeof h=="string"&&(h=h.trim(),h.slice(-1)==="%"&&p(h.slice(0,-1))&&(h=+h.slice(0,-1),h>=0)))return h+"%"}function m(h,v,g,i,w,S){S=S||{};var M=S.moduleHasSelected!==!1,C=S.moduleHasUnselected!==!1,_=S.moduleHasConstrain!==!1,T=S.moduleHasCliponaxis!==!1,f=S.moduleHasTextangle!==!1,u=S.moduleHasInsideanchor!==!1,A=!!S.hasPathbar,x=Array.isArray(w)||w==="auto",z=x||w==="inside",I=x||w==="outside";if(z||I){var O=a(i,"textfont",g.font),D=b.extendFlat({},O),B=h.textfont&&h.textfont.color,F=!B;if(F&&delete D.color,a(i,"insidetextfont",D),A){var P=b.extendFlat({},O);F&&delete P.color,a(i,"pathbar.textfont",P)}I&&a(i,"outsidetextfont",O),M&&i("selected.textfont.color"),C&&i("unselected.textfont.color"),_&&i("constraintext"),T&&i("cliponaxis"),f&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}z&&u&&i("insidetextanchor")}V.exports={supplyDefaults:o,crossTraceDefaults:s,handleText:m,validateCornerradius:c}}}),j5=ze({"src/traces/bar/layout_defaults.js"(J,V){"use strict";var p=mi(),b=Gi(),E=Nr(),k=Qx(),l=qh().validateCornerradius;V.exports=function(e,t,n){function r(M,C){return E.coerce(e,t,k,M,C)}for(var a=!1,o=!1,s=!1,c={},m=r("barmode"),h=m==="group",v=0;v0&&!c[i]&&(s=!0),c[i]=!0),g.visible&&g.type==="histogram"){var w=b.getFromId({_fullLayout:t},g[g.orientation==="v"?"xaxis":"yaxis"]);w.type!=="category"&&(o=!0)}}if(!a){delete t.barmode;return}m!=="overlay"&&r("barnorm"),r("bargap",o&&!s?0:.2),r("bargroupgap");var S=r("barcornerradius");t.barcornerradius=l(S)}}}),x1=ze({"src/traces/bar/arrays_to_calcdata.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){for(var l=0;lt;if(!n)return k}return l!==void 0?l:E.dflt},J.coerceColor=function(E,k,l){return V.isValid(k)?k:l!==void 0?l:E.dflt},J.coerceEnumerated=function(E,k,l){return E.coerceNumber&&(k=+k),E.values.indexOf(k)!==-1?k:l!==void 0?l:E.dflt},J.getValue=function(E,k){var l;return b(E)?k1||A.bargap===0&&A.bargroupgap===0&&!x[0].trace.marker.line.width)&&p.select(this).attr("shape-rendering","crispEdges")}),f.selectAll("g.points").each(function(x){var z=p.select(this),I=x[0].trace;c(z,I,T)}),l.getComponentMethod("errorbars","style")(f)}function c(T,f,u){E.pointStyle(T.selectAll("path"),f,u),m(T,f,u)}function m(T,f,u){T.selectAll("text").each(function(A){var x=p.select(this),z=k.ensureUniformFontSize(u,i(x,A,f,u));E.font(x,z)})}function h(T,f,u){var A=f[0].trace;A.selectedpoints?v(u,A,T):(c(u,A,T),l.getComponentMethod("errorbars","style")(u))}function v(T,f,u){E.selectedPointStyle(T.selectAll("path"),f),g(T.selectAll("text"),f,u)}function g(T,f,u){T.each(function(A){var x=p.select(this),z;if(A.selected){z=k.ensureUniformFontSize(u,i(x,A,f,u));var I=f.selected.textfont&&f.selected.textfont.color;I&&(z.color=I),E.font(x,z)}else E.selectedTextStyle(x,f)})}function i(T,f,u,A){var x=A._fullLayout.font,z=u.textfont;if(T.classed("bartext-inside")){var I=_(f,u);z=S(u,f.i,x,I)}else T.classed("bartext-outside")&&(z=M(u,f.i,x));return z}function w(T,f,u){return C(n,T.textfont,f,u)}function S(T,f,u,A){var x=w(T,f,u),z=T._input.textfont===void 0||T._input.textfont.color===void 0||Array.isArray(T.textfont.color)&&T.textfont.color[f]===void 0;return z&&(x={color:b.contrast(A),family:x.family,size:x.size,weight:x.weight,style:x.style,variant:x.variant,textcase:x.textcase,lineposition:x.lineposition,shadow:x.shadow}),C(r,T.insidetextfont,f,x)}function M(T,f,u){var A=w(T,f,u);return C(a,T.outsidetextfont,f,A)}function C(T,f,u,A){f=f||{};var x=o.getValue(f.family,u),z=o.getValue(f.size,u),I=o.getValue(f.color,u),O=o.getValue(f.weight,u),D=o.getValue(f.style,u),B=o.getValue(f.variant,u),F=o.getValue(f.textcase,u),P=o.getValue(f.lineposition,u),j=o.getValue(f.shadow,u);return{family:o.coerceString(T.family,x,A.family),size:o.coerceNumber(T.size,z,A.size),color:o.coerceColor(T.color,I,A.color),weight:o.coerceString(T.weight,O,A.weight),style:o.coerceString(T.style,D,A.style),variant:o.coerceString(T.variant,B,A.variant),textcase:o.coerceString(T.variant,F,A.textcase),lineposition:o.coerceString(T.variant,P,A.lineposition),shadow:o.coerceString(T.variant,j,A.shadow)}}function _(T,f){return f.type==="waterfall"?f[T.dir].marker.color:T.mcc||T.mc||f.marker.color}V.exports={style:s,styleTextPoints:m,styleOnSelect:h,getInsideTextFont:S,getOutsideTextFont:M,getBarColor:_,resizeText:e}}}),Xv=ze({"src/traces/bar/plot.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=Cs(),l=Qn(),e=$i(),t=mi(),n=Gi().tickText,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=ld(),c=tb(),m=hv(),h=jd(),v=h.text,g=h.textposition,i=kh().appendArrayPointValue,w=m.TEXTPAD;function S(re){return re.id}function M(re){if(re.ids)return S}function C(re){return(re>0)-(re<0)}function _(re,ne){return re0}function A(re,ne,se,G,X,K){var H=ne.xaxis,Y=ne.yaxis,q=re._fullLayout,Z=re._context.staticPlot;X||(X={mode:q.barmode,norm:q.barmode,gap:q.bargap,groupgap:q.bargroupgap},o("bar",q));var ee=E.makeTraceGroups(G,se,"trace bars").each(function(ae){var he=p.select(this),xe=ae[0].trace,we=ae[0].t,Me=xe.type==="waterfall",Se=xe.type==="funnel",Ie=xe.type==="histogram",Ve=xe.type==="bar",Ge=Ve||Se,ke=0;Me&&xe.connector.visible&&xe.connector.mode==="between"&&(ke=xe.connector.line.width/2);var _e=xe.orientation==="h",ce=u(X),ve=E.ensureSingle(he,"g","points"),le=M(xe),Ae=ve.selectAll("g.point").data(E.identity,le);Ae.enter().append("g").classed("point",!0),Ae.exit().remove(),Ae.each(function(Xe,Ye){var yt=p.select(this),gt=T(Xe,H,Y,_e),Tt=gt[0][0],At=gt[0][1],$t=gt[1][0],rr=gt[1][1],_r=(_e?At-Tt:rr-$t)===0;_r&&Ge&&c.getLineWidth(xe,Xe)&&(_r=!1),_r||(_r=!b(Tt)||!b(At)||!b($t)||!b(rr)),Xe.isBlank=_r,_r&&(_e?At=Tt:rr=$t),ke&&!_r&&(_e?(Tt-=_(Tt,At)*ke,At+=_(Tt,At)*ke):($t-=_($t,rr)*ke,rr+=_($t,rr)*ke));var Xt,or;if(xe.type==="waterfall"){if(!_r){var Ot=xe[Xe.dir].marker;Xt=Ot.line.width,or=Ot.color}}else Xt=c.getLineWidth(xe,Xe),or=Xe.mc||xe.marker.color;function vt(Zr){var ha=p.round(Xt/2%1,2);return X.gap===0&&X.groupgap===0?p.round(Math.round(Zr)-ha,2):Zr}function ht(Zr,ha,Pa){return Pa&&Zr===ha?Zr:Math.abs(Zr-ha)>=2?vt(Zr):Zr>ha?Math.ceil(Zr):Math.floor(Zr)}var De=l.opacity(or),Ne=De<1||Xt>.01?vt:ht;re._context.staticPlot||(Tt=Ne(Tt,At,_e),At=Ne(At,Tt,_e),$t=Ne($t,rr,!_e),rr=Ne(rr,$t,!_e));var We=_e?H.c2p:Y.c2p,Ke;Xe.s0>0?Ke=Xe._sMax:Xe.s0<0?Ke=Xe._sMin:Ke=Xe.s1>0?Xe._sMax:Xe._sMin;function Je(Zr,ha){if(!Zr)return 0;var Pa=Math.abs(_e?rr-$t:At-Tt),La=Math.abs(_e?At-Tt:rr-$t),un=Ne(Math.abs(We(Ke,!0)-We(0,!0))),Xa=Xe.hasB?Math.min(Pa/2,La/2):Math.min(Pa/2,un),ja;if(ha==="%"){var Nn=Math.min(50,Zr);ja=Pa*(Nn/100)}else ja=Zr;return Ne(Math.max(Math.min(ja,Xa),0))}var et=Ve||Ie?Je(we.cornerradiusvalue,we.cornerradiusform):0,Mt,pt,Pt="M"+Tt+","+$t+"V"+rr+"H"+At+"V"+$t+"Z",Ct=0;if(et&&Xe.s){var qt=C(Xe.s0)===0||C(Xe.s)===C(Xe.s0)?Xe.s1:Xe.s0;if(Ct=Ne(Xe.hasB?0:Math.abs(We(Ke,!0)-We(qt,!0))),Ct0?Math.sqrt(Ct*(2*et-Ct)):0,Rt=Vt>0?Math.max:Math.min;Mt="M"+Tt+","+$t+"V"+(rr-Kr*Ht)+"H"+Rt(At-(et-Ct)*Vt,Tt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht-Yt)+"V"+($t+et*Ht+Yt)+"A "+et+","+et+" 0 0 "+Sr+" "+Rt(At-(et-Ct)*Vt,Tt)+","+($t+Kr*Ht)+"Z"}else if(Xe.hasB)Mt="M"+(Tt+et*Vt)+","+$t+"A "+et+","+et+" 0 0 "+Sr+" "+Tt+","+($t+et*Ht)+"V"+(rr-et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt)+","+rr+"H"+(At-et*Vt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht)+"V"+($t+et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-et*Vt)+","+$t+"Z";else{pt=Math.abs(rr-$t)+Ct;var nr=pt0?Math.sqrt(Ct*(2*et-Ct)):0,cr=Ht>0?Math.max:Math.min;Mt="M"+(Tt+nr*Vt)+","+$t+"V"+cr(rr-(et-Ct)*Ht,$t)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt-ur)+","+rr+"H"+(At-et*Vt+ur)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-nr*Vt)+","+cr(rr-(et-Ct)*Ht,$t)+"V"+$t+"Z"}}else Mt=Pt}else Mt=Pt;var Rr=f(E.ensureSingle(yt,"path"),q,X,K);if(Rr.style("vector-effect",Z?"none":"non-scaling-stroke").attr("d",isNaN((At-Tt)*(rr-$t))||_r&&re._context.staticPlot?"M0,0Z":Mt).call(e.setClipUrl,ne.layerClipId,re),!q.uniformtext.mode&&ce){var Qr=e.makePointStyleFns(xe);e.singlePointStyle(Xe,Rr,xe,Qr,re)}x(re,ne,yt,ae,Ye,Tt,At,$t,rr,et,Ct,X,K),ne.layerClipId&&e.hideOutsideRangePoint(Xe,yt.select("text"),H,Y,xe.xcalendar,xe.ycalendar)});var Be=xe.cliponaxis===!1;e.setClipUrl(he,Be?null:ne.layerClipId,re)});t.getComponentMethod("errorbars","plot")(re,ee,ne,X)}function x(re,ne,se,G,X,K,H,Y,q,Z,ee,ae,he){var xe=ne.xaxis,we=ne.yaxis,Me=re._fullLayout,Se;function Ie(Pt,Ct,qt){var Vt=E.ensureSingle(Pt,"text").text(Ct).attr({class:"bartext bartext-"+Se,"text-anchor":"middle","data-notex":1}).call(e.font,qt).call(k.convertToTspans,re);return Vt}var Ve=G[0].trace,Ge=Ve.orientation==="h",ke=U(G,Ge,xe,we),_e=P(Me,G,X,xe,we);Se=j(Ve,X);var ce=ae.mode==="stack"||ae.mode==="relative",ve=G[X],le=!ce||ve._outmost,Ae=ve.hasB,Be=Z&&Z-ee>w;if(!_e||Se==="none"||(ve.isBlank||K===H||Y===q)&&(Se==="auto"||Se==="inside")){se.select("text").remove();return}var Xe=Me.font,Ye=s.getBarColor(G[X],Ve),yt=s.getInsideTextFont(Ve,X,Xe,Ye),gt=s.getOutsideTextFont(Ve,X,Xe),Tt=Ve.insidetextanchor||"end",At=se.datum();Ge?xe.type==="log"&&At.s0<=0&&(xe.range[0]0&&ht>0,We;Be?Ae?We=z(_r-2*Z,Xt,vt,ht,Ge)||z(_r,Xt-2*Z,vt,ht,Ge):Ge?We=z(_r-(Z-ee),Xt,vt,ht,Ge)||z(_r,Xt-2*(Z-ee),vt,ht,Ge):We=z(_r,Xt-(Z-ee),vt,ht,Ge)||z(_r-2*(Z-ee),Xt,vt,ht,Ge):We=z(_r,Xt,vt,ht,Ge),Ne&&We?Se="inside":(Se="outside",or.remove(),or=null)}else Se="inside";if(!or){De=E.ensureUniformFontSize(re,Se==="outside"?gt:yt),or=Ie(se,_e,De);var Ke=or.attr("transform");if(or.attr("transform",""),Ot=e.bBox(or.node()),vt=Ot.width,ht=Ot.height,or.attr("transform",Ke),vt<=0||ht<=0){or.remove();return}}var Je=Ve.textangle,et,Mt;Se==="outside"?(Mt=Ve.constraintext==="both"||Ve.constraintext==="outside",et=F(K,H,Y,q,Ot,{isHorizontal:Ge,constrained:Mt,angle:Je,zeroBarDir:ke})):(Mt=Ve.constraintext==="both"||Ve.constraintext==="inside",et=D(K,H,Y,q,Ot,{isHorizontal:Ge,constrained:Mt,angle:Je,anchor:Tt,hasB:Ae,r:Z,overhead:ee})),et.fontSize=De.size,a(Ve.type==="histogram"?"bar":Ve.type,et,Me),ve.transform=et;var pt=f(or,Me,ae,he);E.setTransormAndDisplay(pt,et)}function z(re,ne,se,G,X){if(re<0||ne<0)return!1;var K=se<=re&&G<=ne,H=se<=ne&&G<=re,Y=X?re>=se*(ne/G):ne>=G*(re/se);return K||H||Y}function I(re){return re==="auto"?0:re}function O(re,ne){var se=Math.PI/180*ne,G=Math.abs(Math.sin(se)),X=Math.abs(Math.cos(se));return{x:re.width*X+re.height*G,y:re.width*G+re.height*X}}function D(re,ne,se,G,X,K){var H=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,Z=K.anchor,ee=Z==="end",ae=Z==="start",he=K.leftToRight||0,xe=(he+1)/2,we=1-xe,Me=K.hasB,Se=K.r,Ie=K.overhead,Ve=X.width,Ge=X.height,ke=Math.abs(ne-re),_e=Math.abs(G-se),ce=ke>2*w&&_e>2*w?w:0;ke-=2*ce,_e-=2*ce;var ve=I(q);q==="auto"&&!(Ve<=ke&&Ge<=_e)&&(Ve>ke||Ge>_e)&&(!(Ve>_e||Ge>ke)||Vew){var Xe=B(re,ne,se,G,le,Se,Ie,H,Me);Ae=Xe.scale,Be=Xe.pad}else Ae=1,Y&&(Ae=Math.min(1,ke/le.x,_e/le.y)),Be=0;var Ye=X.left*we+X.right*xe,yt=(X.top+X.bottom)/2,gt=(re+w)*we+(ne-w)*xe,Tt=(se+G)/2,At=0,$t=0;if(ae||ee){var rr=(H?le.x:le.y)/2;Se&&(ee||Me)&&(ce+=Be);var _r=H?_(re,ne):_(se,G);H?ae?(gt=re+_r*ce,At=-_r*rr):(gt=ne-_r*ce,At=_r*rr):ae?(Tt=se+_r*ce,$t=-_r*rr):(Tt=G-_r*ce,$t=_r*rr)}return{textX:Ye,textY:yt,targetX:gt,targetY:Tt,anchorX:At,anchorY:$t,scale:Ae,rotate:ve}}function B(re,ne,se,G,X,K,H,Y,q){var Z=Math.max(0,Math.abs(ne-re)-2*w),ee=Math.max(0,Math.abs(G-se)-2*w),ae=K-w,he=H?ae-Math.sqrt(ae*ae-(ae-H)*(ae-H)):ae,xe=q?ae*2:Y?ae-H:2*he,we=q?ae*2:Y?2*he:ae-H,Me,Se,Ie,Ve,Ge;return X.y/X.x>=ee/(Z-xe)?Ve=ee/X.y:X.y/X.x<=(ee-we)/Z?Ve=Z/X.x:!q&&Y?(Me=X.x*X.x+X.y*X.y/4,Se=-2*X.x*(Z-ae)-X.y*(ee/2-ae),Ie=(Z-ae)*(Z-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):q?(Me=(X.x*X.x+X.y*X.y)/4,Se=-X.x*(Z/2-ae)-X.y*(ee/2-ae),Ie=(Z/2-ae)*(Z/2-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):(Me=X.x*X.x/4+X.y*X.y,Se=-X.x*(Z/2-ae)-2*X.y*(ee-ae),Ie=(Z/2-ae)*(Z/2-ae)+(ee-ae)*(ee-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)),Ve=Math.min(1,Ve),Y?Ge=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(ee-X.y*Ve)/2)*(ae-(ee-X.y*Ve)/2)))-H):Ge=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(Z-X.x*Ve)/2)*(ae-(Z-X.x*Ve)/2)))-H),{scale:Ve,pad:Ge}}function F(re,ne,se,G,X,K){var H=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,Z=X.width,ee=X.height,ae=Math.abs(ne-re),he=Math.abs(G-se),xe;H?xe=he>2*w?w:0:xe=ae>2*w?w:0;var we=1;Y&&(we=H?Math.min(1,he/ee):Math.min(1,ae/Z));var Me=I(q),Se=O(X,Me),Ie=(H?Se.x:Se.y)/2,Ve=(X.left+X.right)/2,Ge=(X.top+X.bottom)/2,ke=(re+ne)/2,_e=(se+G)/2,ce=0,ve=0,le;return(H?re===ne:se===G)&&K.zeroBarDir?le=K.zeroBarDir:le=H?_(ne,re):_(se,G),H?(ke=ne-le*xe,ce=le*Ie):(_e=G+le*xe,ve=-le*Ie),{textX:Ve,textY:Ge,targetX:ke,targetY:_e,anchorX:ce,anchorY:ve,scale:we,rotate:Me}}function P(re,ne,se,G,X){var K=ne[0].trace,H=K.texttemplate,Y;return H?Y=$(re,ne,se,G,X):K.textinfo?Y=Q(ne,se,G,X):Y=c.getValue(K.text,se),c.coerceString(v,Y)}function j(re,ne){var se=c.getValue(re.textposition,ne);return c.coerceEnumerated(g,se)}function U(re,ne,se,G){for(var X=!1,K=!1,H=0;H0?X=!0:Y<0&&(K=!0),X&&K)return 0}var q=ne?se:G,Z=-_(q.range[0],q.range[1]);return K?X?0:-Z:Z}function $(re,ne,se,G,X){var K=ne[0].trace,H=E.castOption(K,se,"texttemplate");if(!H)return"";var Y=K.type==="histogram",q=K.type==="waterfall",Z=K.type==="funnel",ee=K.orientation==="h",ae,he,xe,we;ee?(ae="y",he=X,xe="x",we=G):(ae="x",he=G,xe="y",we=X);function Me(ce){return n(he,he.c2l(ce),!0).text}function Se(ce){return n(we,we.c2l(ce),!0).text}var Ie=ne[se],Ve={};Ve.label=Ie.p,Ve.labelLabel=Ve[ae+"Label"]=Me(Ie.p);var Ge=E.castOption(K,Ie.i,"text");(Ge===0||Ge)&&(Ve.text=Ge),Ve.value=Ie.s,Ve.valueLabel=Ve[xe+"Label"]=Se(Ie.s);var ke={};i(ke,K,Ie.i),(Y||ke.x===void 0)&&(ke.x=ee?Ve.value:Ve.label),(Y||ke.y===void 0)&&(ke.y=ee?Ve.label:Ve.value),(Y||ke.xLabel===void 0)&&(ke.xLabel=ee?Ve.valueLabel:Ve.labelLabel),(Y||ke.yLabel===void 0)&&(ke.yLabel=ee?Ve.labelLabel:Ve.valueLabel),q&&(Ve.delta=+Ie.rawS||Ie.s,Ve.deltaLabel=Se(Ve.delta),Ve.final=Ie.v,Ve.finalLabel=Se(Ve.final),Ve.initial=Ve.final-Ve.delta,Ve.initialLabel=Se(Ve.initial)),Z&&(Ve.value=Ie.s,Ve.valueLabel=Se(Ve.value),Ve.percentInitial=Ie.begR,Ve.percentInitialLabel=E.formatPercent(Ie.begR),Ve.percentPrevious=Ie.difR,Ve.percentPreviousLabel=E.formatPercent(Ie.difR),Ve.percentTotal=Ie.sumR,Ve.percenTotalLabel=E.formatPercent(Ie.sumR));var _e=E.castOption(K,Ie.i,"customdata");return _e&&(Ve.customdata=_e),E.texttemplateString({data:[ke,Ve,K._meta],fallback:K.texttemplatefallback,labels:Ve,locale:re._d3locale,template:H})}function Q(re,ne,se,G){var X=re[0].trace,K=X.orientation==="h",H=X.type==="waterfall",Y=X.type==="funnel";function q(_e){var ce=K?G:se;return n(ce,_e,!0).text}function Z(_e){var ce=K?se:G;return n(ce,+_e,!0).text}var ee=X.textinfo,ae=re[ne],he=ee.split("+"),xe=[],we,Me=function(_e){return he.indexOf(_e)!==-1};if(Me("label")&&xe.push(q(re[ne].p)),Me("text")&&(we=E.castOption(X,ae.i,"text"),(we===0||we)&&xe.push(we)),H){var Se=+ae.rawS||ae.s,Ie=ae.v,Ve=Ie-Se;Me("initial")&&xe.push(Z(Ve)),Me("delta")&&xe.push(Z(Se)),Me("final")&&xe.push(Z(Ie))}if(Y){Me("value")&&xe.push(Z(ae.s));var Ge=0;Me("percent initial")&&Ge++,Me("percent previous")&&Ge++,Me("percent total")&&Ge++;var ke=Ge>1;Me("percent initial")&&(we=E.formatPercent(ae.begR),ke&&(we+=" of initial"),xe.push(we)),Me("percent previous")&&(we=E.formatPercent(ae.difR),ke&&(we+=" of previous"),xe.push(we)),Me("percent total")&&(we=E.formatPercent(ae.sumR),ke&&(we+=" of total"),xe.push(we))}return xe.join("
")}V.exports={plot:A,toMoveInsideBar:D}}}),eg=ze({"src/traces/bar/hover.js"(J,V){"use strict";var p=Zl(),b=mi(),E=Qn(),k=Nr().fillText,l=tb().getLineWidth,e=Gi().hoverLabelText,t=No().BADNUM;function n(o,s,c,m,h){var v=r(o,s,c,m,h);if(v){var g=v.cd,i=g[0].trace,w=g[v.index];return v.color=a(i,w),b.getComponentMethod("errorbars","hoverInfo")(w,i,v),[v]}}function r(o,s,c,m,h){var v=o.cd,g=v[0].trace,i=v[0].t,w=m==="closest",S=g.type==="waterfall",M=o.maxHoverDistance,C=o.maxSpikeDistance,_,T,f,u,A,x,z;g.orientation==="h"?(_=c,T=s,f="y",u="x",A=se,x=Q):(_=s,T=c,f="x",u="y",x=se,A=Q);var I=g[f+"period"],O=w||I;function D(xe){return F(xe,-1)}function B(xe){return F(xe,1)}function F(xe,we){var Me=xe.w;return xe[f]+we*Me/2}function P(xe){return xe[f+"End"]-xe[f+"Start"]}var j=w?D:I?function(xe){return xe.p-P(xe)/2}:function(xe){return Math.min(D(xe),xe.p-i.bardelta/2)},U=w?B:I?function(xe){return xe.p+P(xe)/2}:function(xe){return Math.max(B(xe),xe.p+i.bardelta/2)};function $(xe,we,Me){return h.finiteRange&&(Me=0),p.inbox(xe-_,we-_,Me+Math.min(1,Math.abs(we-xe)/z)-1)}function Q(xe){return $(j(xe),U(xe),M)}function re(xe){return $(D(xe),B(xe),C)}function ne(xe){var we=xe[u];if(S){var Me=Math.abs(xe.rawS)||0;T>0?we+=Me:T<0&&(we-=Me)}return we}function se(xe){var we=T,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,M+(Se-we)/(Se-Me)-1)}function G(xe){var we=T,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,C+(Se-we)/(Se-Me)-1)}var X=o[f+"a"],K=o[u+"a"];z=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function H(xe){return(A(xe)+x(xe))/2}var Y=p.getDistanceFunction(m,A,x,H);if(p.getClosest(v,Y,o),o.index!==!1&&v[o.index].p!==t){O||(j=function(xe){return Math.min(D(xe),xe.p-i.bargroupwidth/2)},U=function(xe){return Math.max(B(xe),xe.p+i.bargroupwidth/2)});var q=o.index,Z=v[q],ee=g.base?Z.b+Z.s:Z.s;o[u+"0"]=o[u+"1"]=K.c2p(Z[u],!0),o[u+"LabelVal"]=ee;var ae=i.extents[i.extents.round(Z.p)];o[f+"0"]=X.c2p(w?j(Z):ae[0],!0),o[f+"1"]=X.c2p(w?U(Z):ae[1],!0);var he=Z.orig_p!==void 0;return o[f+"LabelVal"]=he?Z.orig_p:Z.p,o.labelLabel=e(X,o[f+"LabelVal"],g[f+"hoverformat"]),o.valueLabel=e(K,o[u+"LabelVal"],g[u+"hoverformat"]),o.baseLabel=e(K,Z.b,g[u+"hoverformat"]),o.spikeDistance=(G(Z)+re(Z))/2,o[f+"Spike"]=X.c2p(Z.p,!0),k(Z,g,o),o.hovertemplate=g.hovertemplate,o}}function a(o,s){var c=s.mcc||o.marker.color,m=s.mlcc||o.marker.line.color,h=l(o,s);if(E.opacity(c))return c;if(E.opacity(m)&&h)return m}V.exports={hoverPoints:n,hoverOnBars:r,getTraceColor:a}}}),PF=ze({"src/traces/bar/event_data.js"(J,V){"use strict";V.exports=function(b,E,k){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),k.orientation==="h"?(b.label=b.y,b.value=b.x):(b.label=b.x,b.value=b.y),b}}}),tg=ze({"src/traces/bar/select.js"(J,V){"use strict";V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=l[0].trace,r=n.type==="funnel",a=n.orientation==="h",o=[],s;if(k===!1)for(s=0;s0?(I="v",f>0?O=Math.min(A,u):O=Math.min(u)):f>0?(I="h",O=Math.min(A)):O=0;if(!O){c.visible=!1;return}c._length=O;var j=m("orientation",I);c._hasPreCompStats?j==="v"&&f===0?(m("x0",0),m("dx",1)):j==="h"&&T===0&&(m("y0",0),m("dy",1)):j==="v"&&f===0?m("x0"):j==="h"&&T===0&&m("y0");var U=b.getComponentMethod("calendars","handleTraceDefaults");U(s,c,["x","y"],h)}function a(s,c,m,h){var v=h.prefix,g=p.coerce2(s,c,t,"marker.outliercolor"),i=m("marker.line.outliercolor"),w="outliers";c._hasPreCompStats?w="all":(g||i)&&(w="suspectedoutliers");var S=m(v+"points",w);S?(m("jitter",S==="all"?.3:0),m("pointpos",S==="all"?-1.5:0),m("marker.symbol"),m("marker.opacity"),m("marker.size"),m("marker.angle"),m("marker.color",c.line.color),m("marker.line.color"),m("marker.line.width"),S==="suspectedoutliers"&&(m("marker.line.outliercolor",c.marker.color),m("marker.line.outlierwidth")),m("selected.marker.color"),m("unselected.marker.color"),m("selected.marker.size"),m("unselected.marker.size"),m("text"),m("hovertext")):delete c.marker;var M=m("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(m("hovertemplate"),m("hovertemplatefallback")),p.coerceSelectionMarkerOpacity(c,m)}function o(s,c){var m,h;function v(S){return p.coerce(h._input,h,t,S)}for(var g=0;gne.uf};if(C._hasPreCompStats){var q=C[O],Z=function(rr){return I.d2c((C[rr]||[])[x])},ee=1/0,ae=-1/0;for(x=0;x=ne.q1&&ne.q3>=ne.med){var xe=Z("lowerfence");ne.lf=xe!==l&&xe<=ne.q1?xe:h(ne,G,X);var we=Z("upperfence");ne.uf=we!==l&&we>=ne.q3?we:v(ne,G,X);var Me=Z("mean");ne.mean=Me!==l?Me:X?k.mean(G,X):(ne.q1+ne.q3)/2;var Se=Z("sd");ne.sd=Me!==l&&Se>=0?Se:X?k.stdev(G,X,ne.mean):ne.q3-ne.q1,ne.lo=g(ne),ne.uo=i(ne);var Ie=Z("notchspan");Ie=Ie!==l&&Ie>0?Ie:w(ne,X),ne.ln=ne.med-Ie,ne.un=ne.med+Ie;var Ve=ne.lf,Ge=ne.uf;C.boxpoints&&G.length&&(Ve=Math.min(Ve,G[0]),Ge=Math.max(Ge,G[X-1])),C.notched&&(Ve=Math.min(Ve,ne.ln),Ge=Math.max(Ge,ne.un)),ne.min=Ve,ne.max=Ge}else{k.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ne.q1,"median = "+ne.med,"q3 = "+ne.q3].join(` -`));var ke;ne.med!==l?ke=ne.med:ne.q1!==l?ne.q3!==l?ke=(ne.q1+ne.q3)/2:ke=ne.q1:ne.q3!==l?ke=ne.q3:ke=0,ne.med=ke,ne.q1=ne.q3=ke,ne.lf=ne.uf=ke,ne.mean=ne.sd=ke,ne.ln=ne.un=ke,ne.min=ne.max=ke}ee=Math.min(ee,ne.min),ae=Math.max(ae,ne.max),ne.pts2=se.filter(Y),u.push(ne)}}C._extremes[I._id]=b.findExtremes(I,[ee,ae],{padded:!0})}else{var _e=I.makeCalcdata(C,O),ce=n(Q,re),ve=Q.length,le=r(ve);for(x=0;x=0&&Ae0){if(ne={},ne.pos=ne[B]=Q[x],se=ne.pts=le[x].sort(c),G=ne[O]=se.map(m),X=G.length,ne.min=G[0],ne.max=G[X-1],ne.mean=k.mean(G,X),ne.sd=k.stdev(G,X,ne.mean)*C.sdmultiple,ne.med=k.interp(G,.5),X%2&&(yt||gt)){var Tt,At;yt?(Tt=G.slice(0,X/2),At=G.slice(X/2+1)):gt&&(Tt=G.slice(0,X/2+1),At=G.slice(X/2)),ne.q1=k.interp(Tt,.5),ne.q3=k.interp(At,.5)}else ne.q1=k.interp(G,.25),ne.q3=k.interp(G,.75);ne.lf=h(ne,G,X),ne.uf=v(ne,G,X),ne.lo=g(ne),ne.uo=i(ne);var $t=w(ne,X);ne.ln=ne.med-$t,ne.un=ne.med+$t,Be=Math.min(Be,ne.ln),Xe=Math.max(Xe,ne.un),ne.pts2=se.filter(Y),u.push(ne)}C.notched&&k.isTypedArray(_e)&&(_e=Array.from(_e)),C._extremes[I._id]=b.findExtremes(I,C.notched?_e.concat([Be,Xe]):_e,{padded:!0})}return s(u,C),u.length>0?(u[0].t={num:_[A],dPos:re,posLetter:B,valLetter:O,labels:{med:e(M,"median:"),min:e(M,"min:"),q1:e(M,"q1:"),q3:e(M,"q3:"),max:e(M,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?e(M,"mean \xB1 \u03C3:").replace("\u03C3",C.sdmultiple===1?"\u03C3":C.sdmultiple+"\u03C3"):e(M,"mean:"),lf:e(M,"lower fence:"),uf:e(M,"upper fence:")}},_[A]++,u):[{t:{empty:!0}}]};function t(S,M,C,_){var T=M in S,f=M+"0"in S,u="d"+M in S;if(T||f&&u){var A=C.makeCalcdata(S,M),x=E(S,C,M,A).vals;return[x,A]}var z;f?z=S[M+"0"]:"name"in S&&(C.type==="category"||p(S.name)&&["linear","log"].indexOf(C.type)!==-1||k.isDateTime(S.name)&&C.type==="date")?z=S.name:z=_;for(var I=C.type==="multicategory"?C.r2c_just_indices(z):C.d2c(z,0,S[M+"calendar"]),O=S._length,D=new Array(O),B=0;B1,f=1-s[t+"gap"],u=1-s[t+"groupgap"];for(h=0;h0;if(I==="positive"?(ne=O*(z?1:.5),X=G,se=X=B):I==="negative"?(ne=X=B,se=O*(z?1:.5),K=G):(ne=se=O,X=K=G),ae){var he=A.pointpos,xe=A.jitter,we=A.marker.size/2,Me=0;he+xe>=0&&(Me=G*(he+xe),Me>ne?(ee=!0,q=we,H=Me):Me>X&&(q=we,H=ne)),Me<=ne&&(H=ne);var Se=0;he-xe<=0&&(Se=-G*(he-xe),Se>se?(ee=!0,Z=we,Y=Se):Se>K&&(Z=we,Y=se)),Se<=se&&(Y=se)}else H=ne,Y=se;var Ie=new Array(g.length);for(v=0;vC.lo&&(j.so=!0)}return T});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(E.translatePoints,m,h)}function r(a,o,s,c){var m=o.val,h=o.pos,v=!!h.rangebreaks,g=c.bPos,i=c.bPosPxOffset||0,w=s.boxmean||(s.meanline||{}).visible,S,M;Array.isArray(c.bdPos)?(S=c.bdPos[0],M=c.bdPos[1]):(S=c.bdPos,M=c.bdPos);var C=a.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?b.identity:[]);C.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),C.exit().remove(),C.each(function(_){var T=h.c2l(_.pos+g,!0),f=h.l2p(T-S)+i,u=h.l2p(T+M)+i,A=v?(f+u)/2:h.l2p(T)+i,x=m.c2p(_.mean,!0),z=m.c2p(_.mean-_.sd,!0),I=m.c2p(_.mean+_.sd,!0);s.orientation==="h"?p.select(this).attr("d","M"+x+","+f+"V"+u+(w==="sd"?"m0,0L"+z+","+A+"L"+x+","+f+"L"+I+","+A+"Z":"")):p.select(this).attr("d","M"+f+","+x+"H"+u+(w==="sd"?"m0,0L"+A+","+z+"L"+f+","+x+"L"+A+","+I+"Z":""))})}V.exports={plot:e,plotBoxAndWhiskers:t,plotPoints:n,plotBoxMean:r}}}),ib=ze({"src/traces/box/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=$i();function k(e,t,n){var r=n||p.select(e).selectAll("g.trace.boxes");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var o=p.select(this),s=a[0].trace,c=s.line.width;function m(g,i,w,S){g.style("stroke-width",i+"px").call(b.stroke,w).call(b.fill,S)}var h=o.selectAll("path.box");if(s.type==="candlestick")h.each(function(g){if(!g.empty){var i=p.select(this),w=s[g.dir];m(i,w.line.width,w.line.color,w.fillcolor),i.style("opacity",s.selectedpoints&&!g.selected?.3:1)}});else{m(h,c,s.line.color,s.fillcolor),o.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(b.stroke,s.line.color);var v=o.selectAll("path.point");E.pointStyle(v,s,e)}})}function l(e,t,n){var r=t[0].trace,a=n.selectAll("path.point");r.selectedpoints?E.selectedPointStyle(a,r):E.pointStyle(a,r,e)}V.exports={style:k,styleOnSelect:l}}}),q5=ze({"src/traces/box/hover.js"(J,V){"use strict";var p=Gi(),b=Nr(),E=Zl(),k=Qn(),l=b.fillText;function e(r,a,o,s){var c=r.cd,m=c[0].trace,h=m.hoveron,v=[],g;return h.indexOf("boxes")!==-1&&(v=v.concat(t(r,a,o,s))),h.indexOf("points")!==-1&&(g=n(r,a,o)),s==="closest"?g?[g]:v:(g&&v.push(g),v)}function t(r,a,o,s){var c=r.cd,m=r.xa,h=r.ya,v=c[0].trace,g=c[0].t,i=v.type==="violin",w,S,M,C,_,T,f,u,A,x,z,I=g.bdPos,O,D,B=g.wHover,F=function(Se){return M.c2l(Se.pos)+g.bPos-M.c2l(T)};i&&v.side!=="both"?(v.side==="positive"&&(A=function(Se){var Ie=F(Se);return E.inbox(Ie,Ie+B,x)},O=I,D=0),v.side==="negative"&&(A=function(Se){var Ie=F(Se);return E.inbox(Ie-B,Ie,x)},O=0,D=I)):(A=function(Se){var Ie=F(Se);return E.inbox(Ie-B,Ie+B,x)},O=D=I);var P;i?P=function(Se){return E.inbox(Se.span[0]-_,Se.span[1]-_,x)}:P=function(Se){return E.inbox(Se.min-_,Se.max-_,x)},v.orientation==="h"?(_=a,T=o,f=P,u=A,w="y",M=h,S="x",C=m):(_=o,T=a,f=A,u=P,w="x",M=m,S="y",C=h);var j=Math.min(1,I/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));x=r.maxHoverDistance-j,z=r.maxSpikeDistance-j;function U(Se){return(f(Se)+u(Se))/2}var $=E.getDistanceFunction(s,f,u,U);if(E.getClosest(c,$,r),r.index===!1)return[];var Q=c[r.index],re=v.line.color,ne=(v.marker||{}).color;k.opacity(re)&&v.line.width?r.color=re:k.opacity(ne)&&v.boxpoints?r.color=ne:r.color=v.fillcolor,r[w+"0"]=M.c2p(Q.pos+g.bPos-D,!0),r[w+"1"]=M.c2p(Q.pos+g.bPos+O,!0),r[w+"LabelVal"]=Q.orig_p!==void 0?Q.orig_p:Q.pos;var se=w+"Spike";r.spikeDistance=U(Q)*z/x,r[se]=M.c2p(Q.pos,!0);var G=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,X=v.boxpoints||v.points,K=X&&G?["max","uf","q3","med","mean","q1","lf","min"]:X&&!G?["max","uf","q3","med","q1","lf","min"]:!X&&G?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],H=C.range[1]0&&(n=!0);for(var s=0;se){var t=e-k[b];return k[b]=e,t}}else return k[b]=e,e;return 0},max:function(b,E,k,l){var e=l[E];if(p(e))if(e=Number(e),p(k[b])){if(k[b]f&&fk){var x=u===b?1:6,z=u===b?"M12":"M1";return function(I,O){var D=g.c2d(I,b,i),B=D.indexOf("-",x);B>0&&(D=D.slice(0,B));var F=g.d2c(D,0,i);if(Ft?c>k?c>b*1.1?b:c>E*1.1?E:k:c>l?l:c>e?e:t:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function o(c,m,h,v,g,i){if(v&&c>k){var w=s(m,g,i),S=s(h,g,i),M=c===b?0:1;return w[M]!==S[M]}return Math.floor(h/c)-Math.floor(m/c)>.1}function s(c,m,h){var v=m.c2d(c,b,h).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}}),Z5=ze({"src/traces/histogram/calc.js"(J,V){"use strict";var p=ao(),b=Nr(),E=mi(),k=Gi(),{hasColorscale:l}=Bf(),e=Qf(),t=x1(),n=H5(),r=W5(),a=Y5(),o=X5();function s(g,i){var w=[],S=[],M=i.orientation==="h",C=k.getFromId(g,M?i.yaxis:i.xaxis),_=M?"y":"x",T={x:"y",y:"x"}[_],f=i[_+"calendar"],u=i.cumulative,A,x=c(g,i,C,_),z=x[0],I=x[1],O=typeof z.size=="string",D=[],B=O?D:z,F=[],P=[],j=[],U=0,$=i.histnorm,Q=i.histfunc,re=$.indexOf("density")!==-1,ne,se,G;u.enabled&&re&&($=$.replace(/ ?density$/,""),re=!1);var X=Q==="max"||Q==="min",K=X?null:0,H=n.count,Y=r[$],q=!1,Z=function(Ae){return C.r2c(Ae,0,f)},ee;for(b.isArrayOrTypedArray(i[T])&&Q!=="count"&&(ee=i[T],q=Q==="avg",H=n[Q]),A=Z(z.start),se=Z(z.end)+(A-k.tickIncrement(A,z.size,!1,f))/1e6;A=0&&G=ce;A--)if(S[A]){ve=A;break}for(A=ce;A<=ve;A++)if(p(w[A])&&p(S[A])){var le={p:w[A],s:S[A],b:0};u.enabled||(le.pts=j[A],we?le.ph0=le.ph1=j[A].length?I[j[A][0]]:w[A]:(i._computePh=!0,le.ph0=Ge(D[A]),le.ph1=Ge(D[A+1],!0))),_e.push(le)}return _e.length===1&&(_e[0].width1=k.tickIncrement(_e[0].p,z.size,!1,f)-_e[0].p),l(i,"marker")&&e(g,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),l(i,"marker.line")&&e(g,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(_e,i),b.isArrayOrTypedArray(i.selectedpoints)&&b.tagSelected(_e,i,Ie),_e}function c(g,i,w,S,M){var C,_=S+"bins",T=g._fullLayout,f=i["_"+S+"bingroup"],u=T._histogramBinOpts[f],A=T.barmode==="overlay",x,z,I,O,D,B,F,P=function(Ge){return w.r2c(Ge,0,O)},j=function(Ge){return w.c2r(Ge,0,O)},U=w.type==="date"?function(Ge){return Ge||Ge===0?b.cleanDate(Ge,null,O):null}:function(Ge){return p(Ge)?Number(Ge):null};function $(Ge,ke,_e){ke[Ge+"Found"]?(ke[Ge]=U(ke[Ge]),ke[Ge]===null&&(ke[Ge]=_e[Ge])):(B[Ge]=ke[Ge]=_e[Ge],b.nestedProperty(z[0],_+"."+Ge).set(_e[Ge]))}if(i["_"+S+"autoBinFinished"])delete i["_"+S+"autoBinFinished"];else{z=u.traces;var Q=[],re=!0,ne=!1,se=!1;for(x=0;xw.r2l(ae)&&(xe=k.tickIncrement(xe,u.size,!0,O)),Y.start=w.l2r(xe),ee||b.nestedProperty(i,_+".start").set(Y.start)}var we=u.end,Me=w.r2l(H.end),Se=Me!==void 0;if((u.endFound||Se)&&Me!==w.r2l(we)){var Ie=Se?Me:b.aggNums(Math.max,null,D);Y.end=w.l2r(Ie),Se||b.nestedProperty(i,_+".start").set(Y.end)}var Ve="autobin"+S;return i._input[Ve]===!1&&(i._input[_]=b.extendFlat({},i[_]||{}),delete i._input[Ve],delete i[Ve]),[Y,D]}function m(g,i,w,S,M){var C=g._fullLayout,_=h(g,i),T=!1,f=1/0,u=[i],A,x,z;for(A=0;A<_.length;A++)if(x=_[A],x===i)T=!0;else if(!T)z=C._histogramBinOpts[x["_"+S+"bingroup"]],f=Math.min(f,z.size||x[M].size);else{var I=c(g,x,w,S,!0),O=I[0],D=I[2];x["_"+S+"autoBinFinished"]=1,x["_"+S+"pos0"]=I[1],D?u.push(x):f=Math.min(f,O.size)}var B=new Array(u.length);for(A=0;A=0;S--)T(S);else if(i==="increasing"){for(S=1;S=0;S--)g[S]+=g[S+1];w==="exclude"&&(g.push(0),g.shift())}}V.exports={calc:s,calcAllAutoBins:c}}}),OF=ze({"src/traces/histogram2d/calc.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=H5(),k=W5(),l=Y5(),e=X5(),t=Z5().calcAllAutoBins;V.exports=function(s,c){var m=b.getFromId(s,c.xaxis),h=b.getFromId(s,c.yaxis),v=c.xcalendar,g=c.ycalendar,i=function(vt){return m.r2c(vt,0,v)},w=function(vt){return h.r2c(vt,0,g)},S=function(vt){return m.c2r(vt,0,v)},M=function(vt){return h.c2r(vt,0,g)},C,_,T,f,u=t(s,c,m,"x"),A=u[0],x=u[1],z=t(s,c,h,"y"),I=z[0],O=z[1],D=c._length;x.length>D&&x.splice(D,x.length-D),O.length>D&&O.splice(D,O.length-D);var B=[],F=[],P=[],j=typeof A.size=="string",U=typeof I.size=="string",$=[],Q=[],re=j?$:A,ne=U?Q:I,se=0,G=[],X=[],K=c.histnorm,H=c.histfunc,Y=K.indexOf("density")!==-1,q=H==="max"||H==="min",Z=q?null:0,ee=E.count,ae=k[K],he=!1,xe=[],we=[],Me="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Me&&H!=="count"&&(he=H==="avg",ee=E[H]);var Se=A.size,Ie=i(A.start),Ve=i(A.end)+(Ie-b.tickIncrement(Ie,Se,!1,v))/1e6;for(C=Ie;C=0&&T=0&&fb;a++)r=l(t,n,k(r));return r>b&&p.log("interp2d didn't converge quickly",r),t};function l(e,t,n){var r=0,a,o,s,c,m,h,v,g,i,w,S,M,C;for(c=0;cM&&(r=Math.max(r,Math.abs(e[o][s]-S)/(C-M))))}return r}}}),cb=ze({"src/traces/heatmap/find_empties.js"(J,V){"use strict";var p=Nr().maxRowLength;V.exports=function(E){var k=[],l={},e=[],t=E[0],n=[],r=[0,0,0],a=p(E),o,s,c,m,h,v,g,i;for(s=0;s=0;h--)m=e[h],s=m[0],c=m[1],v=((l[[s-1,c]]||r)[2]+(l[[s+1,c]]||r)[2]+(l[[s,c-1]]||r)[2]+(l[[s,c+1]]||r)[2])/20,v&&(g[m]=[s,c,v],e.splice(h,1),i=!0);if(!i)throw"findEmpties iterated with no new neighbors";for(m in g)l[m]=g[m],k.push(g[m])}return k.sort(function(w,S){return S[2]-w[2]})}}}),$5=ze({"src/traces/heatmap/make_bound_array.js"(J,V){"use strict";var p=mi(),b=Nr().isArrayOrTypedArray;V.exports=function(k,l,e,t,n,r){var a=[],o=p.traceIs(k,"contour"),s=p.traceIs(k,"histogram"),c,m,h,v=b(l)&&l.length>1;if(v&&!s&&r.type!=="category"){var g=l.length;if(g<=n){if(o)a=Array.from(l).slice(0,n);else if(n===1)r.type==="log"?a=[.5*l[0],2*l[0]]:a=[l[0]-.5,l[0]+.5];else if(r.type==="log"){for(a=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],h=1;h1){var K=(X[X.length-1]-X[0])/(X.length-1),H=Math.abs(K/100);for(D=0;DH)return!1}return!0}g._islinear=!1,i.type==="log"||w.type==="log"?C==="fast"&&P("log axis found"):j(_)?j(A)?g._islinear=!0:C==="fast"&&P("y scale is not linear"):C==="fast"&&P("x scale is not linear");var U=b.maxRowLength(O),$=g.xtype==="scaled"?"":_,Q=o(g,$,T,f,U,i),re=g.ytype==="scaled"?"":A,ne=o(g,re,x,z,O.length,w);g._extremes[i._id]=E.findExtremes(i,Q),g._extremes[w._id]=E.findExtremes(w,ne);var se={x:Q,y:ne,z:O,text:g._text||g.text,hovertext:g._hovertext||g.hovertext};if(g.xperiodalignment&&u&&(se.orig_x=u),g.yperiodalignment&&I&&(se.orig_y=I),$&&$.length===Q.length-1&&(se.xCenter=$),re&&re.length===ne.length-1&&(se.yCenter=re),M&&(se.xRanges=B.xRanges,se.yRanges=B.yRanges,se.pts=B.pts),S||e(v,g,{vals:O,cLetter:"z"}),S&&g.contours&&g.contours.coloring==="heatmap"){var G={type:g.type==="contour"?"heatmap":"histogram2d",xcalendar:g.xcalendar,ycalendar:g.ycalendar};se.xfill=o(G,$,T,f,U,i),se.yfill=o(G,re,x,z,O.length,w)}return[se]};function c(h){for(var v=[],g=h.length,i=0;i0;)H=u.c2p(P[ee]),ee--;for(H0;)Z=A.c2p(j[ee]),ee--;Z=u._length||H<=0||q>=A._length||Z<=0;if(Ie){var Ve=z.selectAll("image").data([]);Ve.exit().remove(),i(z);return}var Ge,ke;xe==="fast"?(Ge=se,ke=ne):(Ge=Me,ke=Se);var _e=document.createElement("canvas");_e.width=Ge,_e.height=ke;var ce=_e.getContext("2d",{willReadFrequently:!0}),ve=a(O,{noNumericCheck:!0,returnArray:!0}),le,Ae;xe==="fast"?(le=G?function(zr){return se-1-zr}:l.identity,Ae=X?function(zr){return ne-1-zr}:l.identity):(le=function(zr){return l.constrain(Math.round(u.c2p(P[zr])-K),0,Me)},Ae=function(zr){return l.constrain(Math.round(A.c2p(j[zr])-q),0,Se)});var Be=Ae(0),Xe=[Be,Be],Ye=G?0:1,yt=X?0:1,gt=0,Tt=0,At=0,$t=0,rr,_r,Xt,or,Ot;function vt(zr,Lr=0){if(zr===void 0)return[0,0,0,0];var aa=ve(zr);return aa[0]=Math.round(aa[0]),aa[1]=Math.round(aa[1]),aa[2]=Math.round(aa[2]),gt+=Lr,Tt+=aa[0]*Lr,At+=aa[1]*Lr,$t+=aa[2]*Lr,aa}function ht(zr,Lr,aa,Sa){var wa=zr[aa.bin0];if(wa===void 0)return vt(void 0,1);var pn=zr[aa.bin1],tn=Lr[aa.bin0],ai=Lr[aa.bin1],rn=pn-wa||0,Ri=tn-wa||0,Gn;return pn===void 0?ai===void 0?Gn=0:tn===void 0?Gn=2*(ai-wa):Gn=(2*ai-tn-wa)*2/3:ai===void 0?tn===void 0?Gn=0:Gn=(2*wa-pn-tn)*2/3:tn===void 0?Gn=(2*ai-pn-wa)*2/3:Gn=ai+wa-pn-tn,vt(wa+aa.frac*rn+Sa.frac*(Ri+aa.frac*Gn))}if(xe!=="default"){var De=0,Ne;try{Ne=new Uint8Array(Ge*ke*4)}catch{Ne=new Array(Ge*ke*4)}if(xe==="smooth"){var We=U||P,Ke=$||j,Je=new Array(We.length),et=new Array(Ke.length),Mt=new Array(Me),pt=U?S:w,Pt=$?S:w,Ct,qt,Vt;for(ee=0;eeNn||Nn>A._length))for(ae=La;aeUn||Un>u._length)){var li=t({x:yn,y:ja},O,C._fullLayout);li.x=yn,li.y=ja;var Yn=I.z[ee][ae];Yn===void 0?(li.z="",li.zLabel=""):(li.z=Yn,li.zLabel=k.tickText(Rr,Yn,"hover").text);var on=I.text&&I.text[ee]&&I.text[ee][ae];(on===void 0||on===!1)&&(on=""),li.text=on;var en=l.texttemplateString({data:[li,O._meta],fallback:O.texttemplatefallback,labels:li,locale:C._fullLayout._d3locale,template:ur});if(en){var vi=en.split("
"),Yi=vi.length,Ja=0;for(he=0;he=w[0].length||z<0||z>w.length)return}else{if(p.inbox(n-g[0],n-g[g.length-1],0)>0||p.inbox(r-i[0],r-i[i.length-1],0)>0)return;if(s){var I;for(T=[2*g[0]-g[1]],I=1;I=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),M1=ze({"src/traces/contour/attributes.js"(J,V){"use strict";var p=rg(),b=su(),E=Il(),k=E.axisHoverFormat,l=E.descriptionOnlyNumbers,e=qs(),t=Uc().dash,n=Qs(),r=Ki().extendFlat,a=_b(),o=a.COMPARISON_OPS2,s=a.INTERVAL_OPS,c=b.line;V.exports=r({z:p.z,x:p.x,x0:p.x0,dx:p.dx,y:p.y,y0:p.y0,dy:p.dy,xperiod:p.xperiod,yperiod:p.yperiod,xperiod0:b.xperiod0,yperiod0:b.yperiod0,xperiodalignment:p.xperiodalignment,yperiodalignment:p.yperiodalignment,text:p.text,hovertext:p.hovertext,transpose:p.transpose,xtype:p.xtype,ytype:p.ytype,xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:p.hovertemplate,hovertemplatefallback:p.hovertemplatefallback,texttemplate:r({},p.texttemplate,{}),texttemplatefallback:p.texttemplatefallback,textfont:r({},p.textfont,{}),hoverongaps:p.hoverongaps,connectgaps:r({},p.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:n({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(o).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},c.smoothing,{}),editType:"plot"},zorder:b.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),tT=ze({"src/traces/histogram2dcontour/attributes.js"(J,V){"use strict";var p=yb(),b=M1(),E=qs(),k=Il().axisHoverFormat,l=Ki().extendFlat;V.exports=l({x:p.x,y:p.y,z:p.z,marker:p.marker,histnorm:p.histnorm,histfunc:p.histfunc,nbinsx:p.nbinsx,xbins:p.xbins,nbinsy:p.nbinsy,ybins:p.ybins,autobinx:p.autobinx,autobiny:p.autobiny,bingroup:p.bingroup,xbingroup:p.xbingroup,ybingroup:p.ybingroup,autocontour:b.autocontour,ncontours:b.ncontours,contours:b.contours,line:{color:b.line.color,width:l({},b.line.width,{dflt:.5}),dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:p.hovertemplate,hovertemplatefallback:p.hovertemplatefallback,texttemplate:b.texttemplate,texttemplatefallback:b.texttemplatefallback,textfont:b.textfont},E("",{cLetter:"z",editTypeOverride:"calc"}))}}),xb=ze({"src/traces/contour/contours_defaults.js"(J,V){"use strict";V.exports=function(b,E,k,l){var e=l("contours.start"),t=l("contours.end"),n=e===!1||t===!1,r=k("contours.size"),a;n?a=E.autocontour=!0:a=k("autocontour",!1),(a||!r)&&k("ncontours")}}}),rT=ze({"src/traces/contour/label_defaults.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k,l,e){e||(e={});var t=E("contours.showlabels");if(t){var n=k.font;p.coerceFont(E,"contours.labelfont",n,{overrideDflt:{color:l}}),E("contours.labelformat")}e.hasHover!==!1&&E("zhoverformat")}}}),bb=ze({"src/traces/contour/style_defaults.js"(J,V){"use strict";var p=qc(),b=rT();V.exports=function(k,l,e,t,n){var r=e("contours.coloring"),a,o="";r==="fill"&&(a=e("contours.showlines")),a!==!1&&(r!=="lines"&&(o=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(k.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,p(k,l,t,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),b(e,t,o,n)}}}),$F=ze({"src/traces/histogram2dcontour/defaults.js"(J,V){"use strict";var p=Nr(),b=eT(),E=xb(),k=bb(),l=A1(),e=tT();V.exports=function(n,r,a,o){function s(m,h){return p.coerce(n,r,e,m,h)}function c(m){return p.coerce2(n,r,e,m)}b(n,r,s,o),r.visible!==!1&&(E(n,r,s,c),k(n,r,s,o),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&l(s,o))}}}),aT=ze({"src/traces/contour/set_contours.js"(J,V){"use strict";var p=Gi(),b=Nr();V.exports=function(l,e){var t=l.contours;if(l.autocontour){var n=l.zmin,r=l.zmax;(l.zauto||n===void 0)&&(n=b.aggNums(Math.min,null,e)),(l.zauto||r===void 0)&&(r=b.aggNums(Math.max,null,e));var a=E(n,r,l.ncontours);t.size=a.dtick,t.start=p.tickFirst(a),a.range.reverse(),t.end=p.tickFirst(a),t.start===n&&(t.start+=t.size),t.end===r&&(t.end-=t.size),t.start>t.end&&(t.start=t.end=(t.start+t.end)/2),l._input.contours||(l._input.contours={}),b.extendFlat(l._input.contours,{start:t.start,end:t.end,size:t.size}),l._input.autocontour=!0}else if(t.type!=="constraint"){var o=t.start,s=t.end,c=l._input.contours;if(o>s&&(t.start=c.start=s,s=t.end=c.end=o,o=t.start),!(t.size>0)){var m;o===s?m=1:m=E(o,s,l.ncontours).dtick,c.size=t.size=m}}};function E(k,l,e){var t={type:"linear",range:[k,l]};return p.autoTicks(t,(l-k)/(e||15)),t}}}),S1=ze({"src/traces/contour/end_plus.js"(J,V){"use strict";V.exports=function(b){return b.end+b.size/1e6}}}),nT=ze({"src/traces/contour/calc.js"(J,V){"use strict";var p=fl(),b=fb(),E=aT(),k=S1();V.exports=function(e,t){var n=b(e,t),r=n[0].z;E(t,r);var a=t.contours,o=p.extractOpts(t),s;if(a.coloring==="heatmap"&&o.auto&&t.autocontour===!1){var c=a.start,m=k(a),h=a.size||1,v=Math.floor((m-c)/h)+1;isFinite(h)||(h=1,v=1);var g=c-h/2,i=g+v*h;s=[g,i]}else s=r;return p.calc(e,t,{vals:s,cLetter:"z"}),n}}}),E1=ze({"src/traces/contour/constants.js"(J,V){"use strict";V.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}}),iT=ze({"src/traces/contour/make_crossings.js"(J,V){"use strict";var p=E1();V.exports=function(k){var l=k[0].z,e=l.length,t=l[0].length,n=e===2||t===2,r,a,o,s,c,m,h,v,g;for(a=0;aE?0:1)+(k[0][1]>E?0:2)+(k[1][1]>E?0:4)+(k[1][0]>E?0:8);if(l===5||l===10){var e=(k[0][0]+k[0][1]+k[1][0]+k[1][1])/4;return E>e?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),oT=ze({"src/traces/contour/find_all_paths.js"(J,V){"use strict";var p=Nr(),b=E1();V.exports=function(r,a,o){var s,c,m,h,v;for(a=a||.01,o=o||.01,m=0;m20?(m=b.CHOOSESADDLE[m][(h[0]||h[1])<0?0:1],n.crossings[c]=b.SADDLEREMAINDER[m]):delete n.crossings[c],h=b.NEWDELTA[m],!h){p.log("Found bad marching index:",m,r,n.level);break}v.push(t(n,r,h)),r[0]+=h[0],r[1]+=h[1],c=r.join(","),E(v[v.length-1],v[v.length-2],o,s)&&v.pop();var C=h[0]&&(r[0]<0||r[0]>i-2)||h[1]&&(r[1]<0||r[1]>g-2),_=r[0]===w[0]&&r[1]===w[1]&&h[0]===S[0]&&h[1]===S[1];if(_||a&&C)break;m=n.crossings[c]}M===1e4&&p.log("Infinite loop in contour?");var T=E(v[0],v[v.length-1],o,s),f=0,u=.2*n.smoothing,A=[],x=0,z,I,O,D,B,F,P,j,U,$,Q;for(M=1;M=x;M--)if(z=A[M],z=x&&z+A[I]j&&U--,n.edgepaths[U]=Q.concat(v,$));break}G||(n.edgepaths[j]=v.concat($))}for(j=0;j20&&r?n===208||n===1114?o=a[0]===0?1:-1:s=a[1]===0?1:-1:b.BOTTOMSTART.indexOf(n)!==-1?s=1:b.LEFTSTART.indexOf(n)!==-1?o=1:b.TOPSTART.indexOf(n)!==-1?s=-1:o=-1,[o,s]}function t(n,r,a){var o=r[0]+Math.max(a[0],0),s=r[1]+Math.max(a[1],0),c=n.z[s][o],m=n.xaxis,h=n.yaxis;if(a[1]){var v=(n.level-c)/(n.z[s][o+1]-c),g=(v!==1?(1-v)*m.c2l(n.x[o]):0)+(v!==0?v*m.c2l(n.x[o+1]):0);return[m.c2p(m.l2c(g),!0),h.c2p(n.y[s],!0),o+v,s]}else{var i=(n.level-c)/(n.z[s+1][o]-c),w=(i!==1?(1-i)*h.c2l(n.y[s]):0)+(i!==0?i*h.c2l(n.y[s+1]):0);return[m.c2p(n.x[o],!0),h.c2p(h.l2c(w),!0),o,s+i]}}}}),KF=ze({"src/traces/contour/constraint_mapping.js"(J,V){"use strict";var p=_b(),b=ao();V.exports={"[]":k("[]"),"][":k("]["),">":l(">"),"<":l("<"),"=":l("=")};function E(e,t){var n=Array.isArray(t),r;function a(o){return b(o)?+o:null}return p.COMPARISON_OPS2.indexOf(e)!==-1?r=a(n?t[0]:t):p.INTERVAL_OPS.indexOf(e)!==-1?r=n?[a(t[0]),a(t[1])]:[a(t),a(t)]:p.SET_OPS.indexOf(e)!==-1&&(r=n?t.map(a):[a(t)]),r}function k(e){return function(t){t=E(e,t);var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:n,end:r,size:r-n}}}function l(e){return function(t){return t=E(e,t),{start:t,end:1/0,size:1/0}}}}}),sT=ze({"src/traces/contour/empty_pathinfo.js"(J,V){"use strict";var p=Nr(),b=KF(),E=S1();V.exports=function(l,e,t){for(var n=l.type==="constraint"?b[l._operation](l.value):l,r=n.size,a=[],o=E(n),s=t.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:t.a,y:t.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:t.x,y:t.y},m=n.start;m1e3){p.warn("Too many contours, clipping at 1000",l);break}return a}}}),lT=ze({"src/traces/contour/convert_to_constraints.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l,e,t,n=function(o){return o.reverse()},r=function(o){return o};switch(k){case"=":case"<":return E;case">":for(E.length!==1&&p.warn("Contour data invalid for the specified inequality operation."),e=E[0],l=0;lt.level||t.starts.length&&e===t.level)}break;case"constraint":if(E.prefixBoundary=!1,E.edgepaths.length)return;var n=E.x.length,r=E.y.length,a=-1/0,o=1/0;for(l=0;l":s>a&&(E.prefixBoundary=!0);break;case"<":(sa||E.starts.length&&m===o)&&(E.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),m=Math.max(s[0],s[1]),ca&&(E.prefixBoundary=!0);break}break}}}}),wb=ze({"src/traces/contour/plot.js"(J){"use strict";var V=ci(),p=Nr(),b=$i(),E=fl(),k=Cs(),l=Gi(),e=Dd(),t=db(),n=iT(),r=oT(),a=sT(),o=lT(),s=uT(),c=E1(),m=c.LABELOPTIMIZER;J.plot=function(_,T,f,u){var A=T.xaxis,x=T.yaxis;p.makeTraceGroups(u,f,"contour").each(function(z){var I=V.select(this),O=z[0],D=O.trace,B=O.x,F=O.y,P=D.contours,j=a(P,T,O),U=p.ensureSingle(I,"g","heatmapcoloring"),$=[];P.coloring==="heatmap"&&($=[z]),t(_,T,$,U),n(j),r(j);var Q=A.c2p(B[0],!0),re=A.c2p(B[B.length-1],!0),ne=x.c2p(F[0],!0),se=x.c2p(F[F.length-1],!0),G=[[Q,se],[re,se],[re,ne],[Q,ne]],X=j;P.type==="constraint"&&(X=o(j,P._operation)),h(I,G,P),v(I,X,G,P),i(I,j,_,O,P),S(I,T,_,O,G)})};function h(C,_,T){var f=p.ensureSingle(C,"g","contourbg"),u=f.selectAll("path").data(T.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+_.join("L")+"Z").style("stroke","none")}function v(C,_,T,f){var u=f.coloring==="fill"||f.type==="constraint"&&f._operation!=="=",A="M"+T.join("L")+"Z";u&&s(_,f);var x=p.ensureSingle(C,"g","contourfill"),z=x.selectAll("path").data(u?_:[]);z.enter().append("path"),z.exit().remove(),z.each(function(I){var O=(I.prefixBoundary?A:"")+g(I,T);O?V.select(this).attr("d",O).style("stroke","none"):V.select(this).remove()})}function g(C,_){var T="",f=0,u=C.edgepaths.map(function(Q,re){return re}),A=!0,x,z,I,O,D,B;function F(Q){return Math.abs(Q[1]-_[0][1])<.01}function P(Q){return Math.abs(Q[1]-_[2][1])<.01}function j(Q){return Math.abs(Q[0]-_[0][0])<.01}function U(Q){return Math.abs(Q[0]-_[2][0])<.01}for(;u.length;){for(B=b.smoothopen(C.edgepaths[f],C.smoothing),T+=A?B:B.replace(/^M/,"L"),u.splice(u.indexOf(f),1),x=C.edgepaths[f][C.edgepaths[f].length-1],O=-1,I=0;I<4;I++){if(!x){p.log("Missing end?",f,C);break}for(F(x)&&!U(x)?z=_[1]:j(x)?z=_[0]:P(x)?z=_[3]:U(x)&&(z=_[2]),D=0;D=0&&(z=$,O=D):Math.abs(x[1]-z[1])<.01?Math.abs(x[1]-$[1])<.01&&($[0]-x[0])*(z[0]-$[0])>=0&&(z=$,O=D):p.log("endpt to newendpt is not vert. or horz.",x,z,$)}if(x=z,O>=0)break;T+="L"+z}if(O===C.edgepaths.length){p.log("unclosed perimeter path");break}f=O,A=u.indexOf(f)===-1,A&&(f=u[0],T+="Z")}for(f=0;fm.MAXCOST*2)break;F&&(z/=2),x=O-z/2,I=x+z*1.5}if(B<=m.MAXCOST)return D};function w(C,_,T,f){var u=_.width/2,A=_.height/2,x=C.x,z=C.y,I=C.theta,O=Math.cos(I)*u,D=Math.sin(I)*u,B=(x>f.center?f.right-x:x-f.left)/(O+Math.abs(Math.sin(I)*A)),F=(z>f.middle?f.bottom-z:z-f.top)/(Math.abs(D)+Math.cos(I)*A);if(B<1||F<1)return 1/0;var P=m.EDGECOST*(1/(B-1)+1/(F-1));P+=m.ANGLECOST*I*I;for(var j=x-O,U=z-D,$=x+O,Q=z+D,re=0;re=S)&&(t<=w&&(t=w),n>=S&&(n=S),a=Math.floor((n-t)/r)+1,o=0),i=0;iw&&(h.unshift(w),v.unshift(v[0])),h[h.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:p(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(o("contours.value",0),p(s.value)||(t(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),ez=ze({"src/traces/contour/defaults.js"(J,V){"use strict";var p=Nr(),b=ob(),E=yd(),k=hT(),l=xb(),e=bb(),t=A1(),n=M1();V.exports=function(a,o,s,c){function m(i,w){return p.coerce(a,o,n,i,w)}function h(i){return p.coerce2(a,o,n,i)}var v=b(a,o,m,c);if(!v){o.visible=!1;return}E(a,o,c,m),m("xhoverformat"),m("yhoverformat"),m("text"),m("hovertext"),m("hoverongaps"),m("hovertemplate"),m("hovertemplatefallback");var g=m("contours.type")==="constraint";m("connectgaps",p.isArray1D(o.z)),g?k(a,o,m,c,s):(l(a,o,m,h),e(a,o,m,c)),o.contours&&o.contours.coloring==="heatmap"&&t(m,c),m("zorder")}}}),tz=ze({"src/traces/contour/index.js"(J,V){"use strict";V.exports={attributes:M1(),supplyDefaults:ez(),calc:nT(),plot:wb().plot,style:Tb(),colorbar:Ab(),hoverPoints:fT(),moduleType:"trace",name:"contour",basePlotModule:Du(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),rz=ze({"lib/contour.js"(J,V){"use strict";V.exports=tz()}}),dT=ze({"src/traces/scatterternary/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=su(),e=ws(),t=qs(),n=Uc().dash,r=Ki().extendFlat,a=l.marker,o=l.line,s=a.line;V.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:r({},l.mode,{dflt:"markers"}),text:r({},l.text,{}),texttemplate:b({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:r({},l.hovertext,{}),line:{color:o.color,width:o.width,dash:n,backoff:o.backoff,shape:r({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:r({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:k(),marker:r({symbol:a.symbol,opacity:a.opacity,angle:a.angle,angleref:a.angleref,standoff:a.standoff,maxdisplayed:a.maxdisplayed,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:r({width:s.width,dash:s.dash,editType:"calc"},t("marker.line")),gradient:a.gradient,editType:"calc"},t("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:r({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:p(),hovertemplatefallback:E()}}}),az=ze({"src/traces/scatterternary/defaults.js"(J,V){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=dT();V.exports=function(o,s,c,m){function h(C,_){return p.coerce(o,s,r,C,_)}var v=h("a"),g=h("b"),i=h("c"),w;if(v?(w=v.length,g?(w=Math.min(w,g.length),i&&(w=Math.min(w,i.length))):i?w=Math.min(w,i.length):w=0):g&&i&&(w=Math.min(g.length,i.length)),!w){s.visible=!1;return}s._length=w,h("sum"),h("text"),h("hovertext"),s.hoveron!=="fills"&&(h("hovertemplate"),h("hovertemplatefallback"));var S=w"),n.hovertemplate=m.hovertemplate,t}}}),lz=ze({"src/traces/scatterternary/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){if(E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),l[e]){var t=l[e];b.a=t.a,b.b=t.b,b.c=t.c}else b.a=E.a,b.b=E.b,b.c=E.c;return b}}}),uz=ze({"src/plots/ternary/ternary.js"(J,V){"use strict";var p=ci(),b=mi(),E=Nr(),k=E.strTranslate,l=E._,e=Qn(),t=$i(),n=Dd(),r=Ki().extendFlat,a=cl(),o=Gi(),s=_h(),c=Zl(),m=Fd(),h=m.freeMode,v=m.rectMode,g=qv(),i=_c().prepSelect,w=_c().selectOnClick,S=_c().clearOutline,M=_c().clearSelectionsCache,C=hc();function _(F,P){this.id=F.id,this.graphDiv=F.graphDiv,this.init(P),this.makeFramework(P),this.updateFx(P),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}V.exports=_;var T=_.prototype;T.init=function(F){this.container=F._ternarylayer,this.defs=F._defs,this.layoutId=F._uid,this.traceHash={},this.layers={}},T.plot=function(F,P){var j=this,U=P[j.id],$=P._size;j._hasClipOnAxisFalse=!1;for(var Q=0;Qf*G?(ae=G,ee=ae*f):(ee=se,ae=ee/f),he=re*ee/se,xe=ne*ae/G,q=P.l+P.w*$-ee/2,Z=P.t+P.h*(1-Q)-ae/2,j.x0=q,j.y0=Z,j.w=ee,j.h=ae,j.sum=X,j.xaxis={type:"linear",range:[K+2*Y-X,X-K-2*H],domain:[$-he/2,$+he/2],_id:"x"},n(j.xaxis,j.graphDiv._fullLayout),j.xaxis.setScale(),j.xaxis.isPtWithinRange=function(le){return le.a>=j.aaxis.range[0]&&le.a<=j.aaxis.range[1]&&le.b>=j.baxis.range[1]&&le.b<=j.baxis.range[0]&&le.c>=j.caxis.range[1]&&le.c<=j.caxis.range[0]},j.yaxis={type:"linear",range:[K,X-H-Y],domain:[Q-xe/2,Q+xe/2],_id:"y"},n(j.yaxis,j.graphDiv._fullLayout),j.yaxis.setScale(),j.yaxis.isPtWithinRange=function(){return!0};var we=j.yaxis.domain[0],Me=j.aaxis=r({},F.aaxis,{range:[K,X-H-Y],side:"left",tickangle:(+F.aaxis.tickangle||0)-30,domain:[we,we+xe*f],anchor:"free",position:0,_id:"y",_length:ee});n(Me,j.graphDiv._fullLayout),Me.setScale();var Se=j.baxis=r({},F.baxis,{range:[X-K-Y,H],side:"bottom",domain:j.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ee});n(Se,j.graphDiv._fullLayout),Se.setScale();var Ie=j.caxis=r({},F.caxis,{range:[X-K-H,Y],side:"right",tickangle:(+F.caxis.tickangle||0)+30,domain:[we,we+xe*f],anchor:"free",position:0,_id:"y",_length:ee});n(Ie,j.graphDiv._fullLayout),Ie.setScale();var Ve="M"+q+","+(Z+ae)+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDef.select("path").attr("d",Ve),j.layers.plotbg.select("path").attr("d",Ve);var Ge="M0,"+ae+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDefRelative.select("path").attr("d",Ge);var ke=k(q,Z);j.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ke),j.clipDefRelative.select("path").attr("transform",null);var _e=k(q-Se._offset,Z+ae);j.layers.baxis.attr("transform",_e),j.layers.bgrid.attr("transform",_e);var ce=k(q+ee/2,Z)+"rotate(30)"+k(0,-Me._offset);j.layers.aaxis.attr("transform",ce),j.layers.agrid.attr("transform",ce);var ve=k(q+ee/2,Z)+"rotate(-30)"+k(0,-Ie._offset);j.layers.caxis.attr("transform",ve),j.layers.cgrid.attr("transform",ve),j.drawAxes(!0),j.layers.aline.select("path").attr("d",Me.showline?"M"+q+","+(Z+ae)+"l"+ee/2+",-"+ae:"M0,0").call(e.stroke,Me.linecolor||"#000").style("stroke-width",(Me.linewidth||0)+"px"),j.layers.bline.select("path").attr("d",Se.showline?"M"+q+","+(Z+ae)+"h"+ee:"M0,0").call(e.stroke,Se.linecolor||"#000").style("stroke-width",(Se.linewidth||0)+"px"),j.layers.cline.select("path").attr("d",Ie.showline?"M"+(q+ee/2)+","+Z+"l"+ee/2+","+ae:"M0,0").call(e.stroke,Ie.linecolor||"#000").style("stroke-width",(Ie.linewidth||0)+"px"),j.graphDiv._context.staticPlot||j.initInteractions(),t.setClipUrl(j.layers.frontplot,j._hasClipOnAxisFalse?null:j.clipId,j.graphDiv)},T.drawAxes=function(F){var P=this,j=P.graphDiv,U=P.id.slice(7)+"title",$=P.layers,Q=P.aaxis,re=P.baxis,ne=P.caxis;if(P.drawAx(Q),P.drawAx(re),P.drawAx(ne),F){var se=Math.max(Q.showticklabels?Q.tickfont.size/2:0,(ne.showticklabels?ne.tickfont.size*.75:0)+(ne.ticks==="outside"?ne.ticklen*.87:0)),G=(re.showticklabels?re.tickfont.size:0)+(re.ticks==="outside"?re.ticklen:0)+3;$["a-title"]=g.draw(j,"a"+U,{propContainer:Q,propName:P.id+".aaxis.title.text",placeholder:l(j,"Click to enter Component A title"),attributes:{x:P.x0+P.w/2,y:P.y0-Q.title.font.size/3-se,"text-anchor":"middle"}}),$["b-title"]=g.draw(j,"b"+U,{propContainer:re,propName:P.id+".baxis.title.text",placeholder:l(j,"Click to enter Component B title"),attributes:{x:P.x0-G,y:P.y0+P.h+re.title.font.size*.83+G,"text-anchor":"middle"}}),$["c-title"]=g.draw(j,"c"+U,{propContainer:ne,propName:P.id+".caxis.title.text",placeholder:l(j,"Click to enter Component C title"),attributes:{x:P.x0+P.w+G,y:P.y0+P.h+ne.title.font.size*.83+G,"text-anchor":"middle"}})}},T.drawAx=function(F){var P=this,j=P.graphDiv,U=F._name,$=U.charAt(0),Q=F._id,re=P.layers[U],ne=30,se=$+"tickLayout",G=u(F);P[se]!==G&&(re.selectAll("."+Q+"tick").remove(),P[se]=G),F.setScale();var X=o.calcTicks(F),K=o.clipEnds(F,X),H=o.makeTransTickFn(F),Y=o.getTickSigns(F)[2],q=E.deg2rad(ne),Z=Y*(F.linewidth||1)/2,ee=Y*F.ticklen,ae=P.w,he=P.h,xe=$==="b"?"M0,"+Z+"l"+Math.sin(q)*ee+","+Math.cos(q)*ee:"M"+Z+",0l"+Math.cos(q)*ee+","+-Math.sin(q)*ee,we={a:"M0,0l"+he+",-"+ae/2,b:"M0,0l-"+ae/2+",-"+he,c:"M0,0l-"+he+","+ae/2}[$];o.drawTicks(j,F,{vals:F.ticks==="inside"?K:X,layer:re,path:xe,transFn:H,crisp:!1}),o.drawGrid(j,F,{vals:K,layer:P.layers[$+"grid"],path:we,transFn:H,crisp:!1}),o.drawLabels(j,F,{vals:X,layer:re,transFn:H,labelFns:o.makeLabelFns(F,0,ne)})};function u(F){return F.ticks+String(F.ticklen)+String(F.showticklabels)}var A=C.MINZOOM/2+.87,x="m-0.87,.5h"+A+"v3h-"+(A+5.2)+"l"+(A/2+2.6)+",-"+(A*.87+4.5)+"l2.6,1.5l-"+A/2+","+A*.87+"Z",z="m0.87,.5h-"+A+"v3h"+(A+5.2)+"l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-2.6,1.5l"+A/2+","+A*.87+"Z",I="m0,1l"+A/2+","+A*.87+"l2.6,-1.5l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-"+(A/2+2.6)+","+(A*.87+4.5)+"l2.6,1.5l"+A/2+",-"+A*.87+"Z",O="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",D=!0;T.clearOutline=function(){M(this.dragOptions),S(this.dragOptions.gd)},T.initInteractions=function(){var F=this,P=F.layers.plotbg.select("path").node(),j=F.graphDiv,U=j._fullLayout._zoomlayer,$,Q;this.dragOptions={element:P,gd:j,plotinfo:{id:F.id,domain:j._fullLayout[F.id].domain,xaxis:F.xaxis,yaxis:F.yaxis},subplot:F.id,prepFn:function(_e,ce,ve){F.dragOptions.xaxes=[F.xaxis],F.dragOptions.yaxes=[F.yaxis],$=j._fullLayout._invScaleX,Q=j._fullLayout._invScaleY;var le=F.dragOptions.dragmode=j._fullLayout.dragmode;h(le)?F.dragOptions.minDrag=1:F.dragOptions.minDrag=void 0,le==="zoom"?(F.dragOptions.moveFn=Se,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=Ie,he(_e,ce,ve)):le==="pan"?(F.dragOptions.moveFn=Ge,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=ke,Ve(),F.clearOutline(j)):(v(le)||h(le))&&i(_e,ce,ve,F.dragOptions,le)}};var re,ne,se,G,X,K,H,Y,q,Z;function ee(_e){var ce={};return ce[F.id+".aaxis.min"]=_e.a,ce[F.id+".baxis.min"]=_e.b,ce[F.id+".caxis.min"]=_e.c,ce}function ae(_e,ce){var ve=j._fullLayout.clickmode;B(j),_e===2&&(j.emit("plotly_doubleclick",null),b.call("_guiRelayout",j,ee({a:0,b:0,c:0}))),ve.indexOf("select")>-1&&_e===1&&w(ce,j,[F.xaxis],[F.yaxis],F.id,F.dragOptions),ve.indexOf("event")>-1&&c.click(j,ce,F.id)}function he(_e,ce,ve){var le=P.getBoundingClientRect();re=ce-le.left,ne=ve-le.top,j._fullLayout._calcInverseTransform(j);var Ae=j._fullLayout._invTransform,Be=E.apply3DTransform(Ae)(re,ne);re=Be[0],ne=Be[1],se={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=se,G=F.aaxis.range[1]-se.a,K=e.luminosity(F.graphDiv._fullLayout[F.id].bgcolor),H="M0,"+F.h+"L"+F.w/2+", 0L"+F.w+","+F.h+"Z",Y=!1,q=U.append("path").attr("class","zoombox").attr("transform",k(F.x0,F.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",H),Z=U.append("path").attr("class","zoombox-corners").attr("transform",k(F.x0,F.y0)).style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),F.clearOutline(j)}function xe(_e,ce){return 1-ce/F.h}function we(_e,ce){return 1-(_e+(F.h-ce)/Math.sqrt(3))/F.w}function Me(_e,ce){return(_e-(F.h-ce)/Math.sqrt(3))/F.w}function Se(_e,ce){var ve=re+_e*$,le=ne+ce*Q,Ae=Math.max(0,Math.min(1,xe(re,ne),xe(ve,le))),Be=Math.max(0,Math.min(1,we(re,ne),we(ve,le))),Xe=Math.max(0,Math.min(1,Me(re,ne),Me(ve,le))),Ye=(Ae/2+Xe)*F.w,yt=(1-Ae/2-Be)*F.w,gt=(Ye+yt)/2,Tt=yt-Ye,At=(1-Ae)*F.h,$t=At-Tt/f;Tt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Z.transition().style("opacity",1).duration(200),Y=!0),j.emit("plotly_relayouting",ee(X))}function Ie(){B(j),X!==se&&(b.call("_guiRelayout",j,ee(X)),D&&j.data&&j._context.showTips&&(E.notifier(l(j,"Double-click to zoom back out"),"long",j),D=!1))}function Ve(){se={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=se}function Ge(_e,ce){var ve=_e/F.xaxis._m,le=ce/F.yaxis._m;X={a:se.a-le,b:se.b+(ve+le)/2,c:se.c-(ve-le)/2};var Ae=[X.a,X.b,X.c].sort(E.sorterAsc),Be={a:Ae.indexOf(X.a),b:Ae.indexOf(X.b),c:Ae.indexOf(X.c)};Ae[0]<0&&(Ae[1]+Ae[0]/2<0?(Ae[2]+=Ae[0]+Ae[1],Ae[0]=Ae[1]=0):(Ae[2]+=Ae[0]/2,Ae[1]+=Ae[0]/2,Ae[0]=0),X={a:Ae[Be.a],b:Ae[Be.b],c:Ae[Be.c]},ce=(se.a-X.a)*F.yaxis._m,_e=(se.c-X.c-se.b+X.b)*F.xaxis._m);var Xe=k(F.x0+_e,F.y0+ce);F.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Xe);var Ye=k(-_e,-ce);F.clipDefRelative.select("path").attr("transform",Ye),F.aaxis.range=[X.a,F.sum-X.b-X.c],F.baxis.range=[F.sum-X.a-X.c,X.b],F.caxis.range=[F.sum-X.a-X.b,X.c],F.drawAxes(!1),F._hasClipOnAxisFalse&&F.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,F),j.emit("plotly_relayouting",ee(X))}function ke(){b.call("_guiRelayout",j,ee(X))}P.onmousemove=function(_e){c.hover(j,_e,F.id),j._fullLayout._lasthover=P,j._fullLayout._hoversubplot=F.id},P.onmouseout=function(_e){j._dragging||s.unhover(j,_e)},s.init(this.dragOptions)};function B(F){p.select(F).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),pT=ze({"src/plots/ternary/layout_attributes.js"(J,V){"use strict";var p=fc(),b=Ml().attributes,E=cf(),k=Al().overrideAll,l=Ki().extendFlat,e={title:{text:E.title.text,font:E.title.font},color:E.color,tickmode:E.minor.tickmode,nticks:l({},E.nticks,{dflt:6,min:1}),tick0:E.tick0,dtick:E.dtick,tickvals:E.tickvals,ticktext:E.ticktext,ticks:E.ticks,ticklen:E.ticklen,tickwidth:E.tickwidth,tickcolor:E.tickcolor,ticklabelstep:E.ticklabelstep,showticklabels:E.showticklabels,labelalias:E.labelalias,showtickprefix:E.showtickprefix,tickprefix:E.tickprefix,showticksuffix:E.showticksuffix,ticksuffix:E.ticksuffix,showexponent:E.showexponent,exponentformat:E.exponentformat,minexponent:E.minexponent,separatethousands:E.separatethousands,tickfont:E.tickfont,tickangle:E.tickangle,tickformat:E.tickformat,tickformatstops:E.tickformatstops,hoverformat:E.hoverformat,showline:l({},E.showline,{dflt:!0}),linecolor:E.linecolor,linewidth:E.linewidth,showgrid:l({},E.showgrid,{dflt:!0}),gridcolor:E.gridcolor,gridwidth:E.gridwidth,griddash:E.griddash,layer:E.layer,min:{valType:"number",dflt:0,min:0}},t=V.exports=k({domain:b({name:"ternary"}),bgcolor:{valType:"color",dflt:p.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}}}),Zv=ze({"src/plots/subplot_defaults.js"(J,V){"use strict";var p=Nr(),b=hs(),E=Ml().defaults;V.exports=function(l,e,t,n){var r=n.type,a=n.attributes,o=n.handleDefaults,s=n.partition||"x",c=e._subplots[r],m=c.length,h=m&&c[0].replace(/\d+$/,""),v,g;function i(C,_){return p.coerce(v,g,a,C,_)}for(var w=0;w=w&&(T.min=0,f.min=0,u.min=0,m.aaxis&&delete m.aaxis.min,m.baxis&&delete m.baxis.min,m.caxis&&delete m.caxis.min)}function c(m,h,v,g){var i=a[h._name];function w(A,x){return E.coerce(m,h,i,A,x)}w("uirevision",g.uirevision),h.type="linear";var S=w("color"),M=S!==i.color.dflt?S:v.font.color,C=h._name,_=C.charAt(0).toUpperCase(),T="Component "+_,f=w("title.text",T);h._hovertitle=f===T?f:_,E.coerceFont(w,"title.font",v.font,{overrideDflt:{size:E.bigFont(v.font.size),color:M}}),w("min"),n(m,h,w,"linear"),e(m,h,w,"linear"),l(m,h,w,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),t(m,h,w,{outerTicks:!0});var u=w("showticklabels");u&&(E.coerceFont(w,"tickfont",v.font,{overrideDflt:{color:M}}),w("tickangle"),w("tickformat")),r(m,h,w,{dfltColor:S,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),w("hoverformat"),w("layer")}}}),fz=ze({"src/plots/ternary/index.js"(J){"use strict";var V=uz(),p=zf().getSubplotCalcData,b=Nr().counterRegex,E="ternary";J.name=E;var k=J.attr="subplot";J.idRoot=E,J.idRegex=J.attrRegex=b(E);var l=J.attributes={};l[k]={valType:"subplotid",dflt:"ternary",editType:"calc"},J.layoutAttributes=pT(),J.supplyLayoutDefaults=cz(),J.plot=function(t){for(var n=t._fullLayout,r=t.calcdata,a=n._subplots[E],o=0;o0){var C=t.xa,_=t.ya,T,f,u,A,x;m.orientation==="h"?(x=n,T="y",u=_,f="x",A=C):(x=r,T="x",u=C,f="y",A=_);var z=c[t.index];if(x>=z.span[0]&&x<=z.span[1]){var I=b.extendFlat({},t),O=A.c2p(x,!0),D=l.getKdeValue(z,m,x),B=l.getPositionOnKdePath(z,m,O),F=u._offset,P=u._length;I[T+"0"]=B[0],I[T+"1"]=B[1],I[f+"0"]=I[f+"1"]=O,I[f+"Label"]=f+": "+E.hoverLabelText(A,x,m[f+"hoverformat"])+", "+c[0].t.labels.kde+" "+D.toFixed(3);for(var j=0,U=0;U path").each(function(v){if(!v.isBlank){var g=h.marker;p.select(this).call(E.fill,v.mc||g.color).call(E.stroke,v.mlc||g.line.color).call(b.dashLine,g.line.dash,v.mlw||g.line.width).style("opacity",h.selectedpoints&&!v.selected?k:1)}}),t(m,h,r),m.selectAll(".regions").each(function(){p.select(this).selectAll("path").style("stroke-width",0).call(E.fill,h.connector.fillcolor)}),m.selectAll(".lines").each(function(){var v=h.connector.line;b.lineGroupStyle(p.select(this).selectAll("path"),v.width,v.color,v.dash)})})}V.exports={style:n}}}),Lz=ze({"src/traces/funnel/hover.js"(J,V){"use strict";var p=Qn().opacity,b=eg().hoverOnBars,E=Nr().formatPercent;V.exports=function(e,t,n,r,a){var o=b(e,t,n,r,a);if(o){var s=o.cd,c=s[0].trace,m=c.orientation==="h",h=o.index,v=s[h],g=m?"x":"y";o[g+"LabelVal"]=v.s,o.percentInitial=v.begR,o.percentInitialLabel=E(v.begR,1),o.percentPrevious=v.difR,o.percentPreviousLabel=E(v.difR,1),o.percentTotal=v.sumR,o.percentTotalLabel=E(v.sumR,1);var i=v.hi||c.hoverinfo,w=[];if(i&&i!=="none"&&i!=="skip"){var S=i==="all",M=i.split("+"),C=function(_){return S||M.indexOf(_)!==-1};C("percent initial")&&w.push(o.percentInitialLabel+" of initial"),C("percent previous")&&w.push(o.percentPreviousLabel+" of previous"),C("percent total")&&w.push(o.percentTotalLabel+" of total")}return o.extraText=w.join("
"),o.color=k(c,v),[o]}};function k(l,e){var t=l.marker,n=e.mc||t.color,r=e.mlc||t.line.color,a=e.mlw||t.line.width;if(p(n))return n;if(p(r)&&a)return r}}}),Pz=ze({"src/traces/funnel/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,"percentInitial"in E&&(b.percentInitial=E.percentInitial),"percentPrevious"in E&&(b.percentPrevious=E.percentPrevious),"percentTotal"in E&&(b.percentTotal=E.percentTotal),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b}}}),Rz=ze({"src/traces/funnel/index.js"(J,V){"use strict";V.exports={attributes:gT(),layoutAttributes:yT(),supplyDefaults:_T().supplyDefaults,crossTraceDefaults:_T().crossTraceDefaults,supplyLayoutDefaults:Az(),calc:Sz(),crossTraceCalc:Ez(),plot:kz(),style:Cz().style,hoverPoints:Lz(),eventData:Pz(),selectPoints:tg(),moduleType:"trace",name:"funnel",basePlotModule:Du(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Iz=ze({"lib/funnel.js"(J,V){"use strict";V.exports=Rz()}}),Dz=ze({"src/traces/waterfall/constants.js"(J,V){"use strict";V.exports={eventDataKeys:["initial","delta","final"]}}}),xT=ze({"src/traces/waterfall/attributes.js"(J,V){"use strict";var p=jd(),b=su().line,E=ws(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Dz(),r=Ki().extendFlat,a=Qn();function o(s){return{marker:{color:r({},p.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},p.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},p.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}V.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:p.x,x0:p.x0,dx:p.dx,y:p.y,y0:p.y0,dy:p.dy,xperiod:p.xperiod,yperiod:p.yperiod,xperiod0:p.xperiod0,yperiod0:p.yperiod0,xperiodalignment:p.xperiodalignment,yperiodalignment:p.yperiodalignment,xhoverformat:k("x"),yhoverformat:k("y"),hovertext:p.hovertext,hovertemplate:l({},{keys:n.eventDataKeys}),hovertemplatefallback:t(),hoverinfo:r({},E.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:e({editType:"plot"},{keys:n.eventDataKeys.concat(["label"])}),texttemplatefallback:t({editType:"plot"}),text:p.text,textposition:p.textposition,insidetextanchor:p.insidetextanchor,textangle:p.textangle,textfont:p.textfont,insidetextfont:p.insidetextfont,outsidetextfont:p.outsidetextfont,constraintext:p.constraintext,cliponaxis:p.cliponaxis,orientation:p.orientation,offset:p.offset,width:p.width,increasing:o("increasing"),decreasing:o("decreasing"),totals:o("intermediate sums and total"),connector:{line:{color:r({},b.color,{dflt:a.defaultLine}),width:r({},b.width,{editType:"plot"}),dash:b.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:p.offsetgroup,alignmentgroup:p.alignmentgroup,zorder:p.zorder}}}),bT=ze({"src/traces/waterfall/layout_attributes.js"(J,V){"use strict";V.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}}),ng=ze({"src/constants/delta.js"(J,V){"use strict";V.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),wT=ze({"src/traces/waterfall/defaults.js"(J,V){"use strict";var p=Nr(),b=Hv(),E=qh().handleText,k=Gv(),l=yd(),e=xT(),t=Qn(),n=ng(),r=n.INCREASING.COLOR,a=n.DECREASING.COLOR,o="#4499FF";function s(h,v,g){h(v+".marker.color",g),h(v+".marker.line.color",t.defaultLine),h(v+".marker.line.width")}function c(h,v,g,i){function w(T,f){return p.coerce(h,v,e,T,f)}var S=k(h,v,i,w);if(!S){v.visible=!1;return}l(h,v,i,w),w("xhoverformat"),w("yhoverformat"),w("measure"),w("orientation",v.x&&!v.y?"h":"v"),w("base"),w("offset"),w("width"),w("text"),w("hovertext"),w("hovertemplate"),w("hovertemplatefallback");var M=w("textposition");E(h,v,i,w,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(w("texttemplate"),w("texttemplatefallback"),v.texttemplate||w("textinfo")),s(w,"increasing",r),s(w,"decreasing",a),s(w,"totals",o);var C=w("connector.visible");if(C){w("connector.mode");var _=w("connector.line.width");_&&(w("connector.line.color"),w("connector.line.dash"))}w("zorder")}function m(h,v){var g,i;function w(M){return p.coerce(i._input,i,e,M)}if(v.waterfallmode==="group")for(var S=0;S0&&(w?x+="M"+u[0]+","+A[1]+"V"+A[0]:x+="M"+u[1]+","+A[0]+"H"+u[0]),S!=="between"&&(_.isSum||T path").each(function(v){if(!v.isBlank){var g=h[v.dir].marker;p.select(this).call(E.fill,g.color).call(E.stroke,g.line.color).call(b.dashLine,g.line.dash,g.line.width).style("opacity",h.selectedpoints&&!v.selected?k:1)}}),t(m,h,r),m.selectAll(".lines").each(function(){var v=h.connector.line;b.lineGroupStyle(p.select(this).selectAll("path"),v.width,v.color,v.dash)})})}V.exports={style:n}}}),jz=ze({"src/traces/waterfall/hover.js"(J,V){"use strict";var p=Gi().hoverLabelText,b=Qn().opacity,E=eg().hoverOnBars,k=ng(),l={increasing:k.INCREASING.SYMBOL,decreasing:k.DECREASING.SYMBOL};V.exports=function(n,r,a,o,s){var c=E(n,r,a,o,s);if(!c)return;var m=c.cd,h=m[0].trace,v=h.orientation==="h",g=v?"x":"y",i=v?n.xa:n.ya;function w(z){return p(i,z,h[g+"hoverformat"])}var S=c.index,M=m[S],C=M.isSum?M.b+M.s:M.rawS;c.initial=M.b+M.s-C,c.delta=C,c.final=c.initial+c.delta;var _=w(Math.abs(c.delta));c.deltaLabel=C<0?"("+_+")":_,c.finalLabel=w(c.final),c.initialLabel=w(c.initial);var T=M.hi||h.hoverinfo,f=[];if(T&&T!=="none"&&T!=="skip"){var u=T==="all",A=T.split("+"),x=function(z){return u||A.indexOf(z)!==-1};M.isSum||(x("final")&&(v?!x("x"):!x("y"))&&f.push(c.finalLabel),x("delta")&&(C<0?f.push(c.deltaLabel+" "+l.decreasing):f.push(c.deltaLabel+" "+l.increasing)),x("initial")&&f.push("Initial: "+c.initialLabel))}return f.length&&(c.extraText=f.join("
")),c.color=e(h,M),[c]};function e(t,n){var r=t[n.dir].marker,a=r.color,o=r.line.color,s=r.line.width;if(b(a))return a;if(b(o)&&s)return o}}}),Uz=ze({"src/traces/waterfall/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,"initial"in E&&(b.initial=E.initial),"delta"in E&&(b.delta=E.delta),"final"in E&&(b.final=E.final),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b}}}),qz=ze({"src/traces/waterfall/index.js"(J,V){"use strict";V.exports={attributes:xT(),layoutAttributes:bT(),supplyDefaults:wT().supplyDefaults,crossTraceDefaults:wT().crossTraceDefaults,supplyLayoutDefaults:Fz(),calc:zz(),crossTraceCalc:Bz(),plot:Oz(),style:Nz().style,hoverPoints:jz(),eventData:Uz(),selectPoints:tg(),moduleType:"trace",name:"waterfall",basePlotModule:Du(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Vz=ze({"lib/waterfall.js"(J,V){"use strict";V.exports=qz()}}),ig=ze({"src/traces/image/constants.js"(J,V){"use strict";V.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(p){return p.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(p){return p.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(p){return p.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(p){var b=p.slice(0,3);return b[1]=b[1]+"%",b[2]=b[2]+"%",b},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(p){var b=p.slice(0,4);return b[1]=b[1]+"%",b[2]=b[2]+"%",b},suffix:["\xB0","%","%",""]}}}}}),Sb={};bu(Sb,{default:()=>kT});var TT,AT,Eb,MT,ST,kb,Cb,Lb,ET,kT,CT=zi({"src/traces/image/attributes.ts"(){"use strict";TT=Yl(Ki()),AT=Yl(ws()),Eb=Yl(xs()),MT=Yl(su()),ST=Yl(ig()),kb=["rgb","rgba","rgba256","hsl","hsla"],Cb=[],Lb=[];for(let J of kb){let V=ST.colormodel[J];Cb.push(`For the \`${J}\` colormodel, it is [${(V.zminDflt||V.min).join(", ")}].`),Lb.push(`For the \`${J}\` colormodel, it is [${(V.zmaxDflt||V.max).join(", ")}].`)}ET={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:kb,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",Cb.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",Lb.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,TT.extendFlat)({},AT.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,Eb.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,Eb.templatefallbackAttrs)(),zorder:MT.zorder},kT=ET}}),Gz=ze({"src/traces/image/defaults.js"(J,V){"use strict";var p=Nr(),b=(CT(),Po(Sb)).default,E=ig(),k=ip().IMAGE_URL_PREFIX;V.exports=function(e,t){function n(o,s){return p.coerce(e,t,b,o,s)}n("source"),t.source&&!t.source.match(k)&&delete t.source,t._hasSource=!!t.source;var r=n("z");if(t._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;t._hasZ?(n("colormodel","rgb"),a=E.colormodel[t.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):t._hasSource&&(t.colormodel="rgba256",a=E.colormodel[t.colormodel],t.zmin=a.zminDflt,t.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),t._length=null,n("zorder")}}}),op=ze({"node_modules/inherits/inherits_browser.js"(J,V){typeof Object.create=="function"?V.exports=function(b,E){E&&(b.super_=E,b.prototype=Object.create(E.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}))}:V.exports=function(b,E){if(E){b.super_=E;var k=function(){};k.prototype=E.prototype,b.prototype=new k,b.prototype.constructor=b}}}}),LT=ze({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(J,V){V.exports=jv().EventEmitter}}),Hz=ze({"node_modules/base64-js/index.js"(J){"use strict";J.byteLength=t,J.toByteArray=r,J.fromByteArray=s;var V=[],p=[],b=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(k=0,l=E.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var h=c.indexOf("=");h===-1&&(h=m);var v=h===m?0:4-h%4;return[h,v]}function t(c){var m=e(c),h=m[0],v=m[1];return(h+v)*3/4-v}function n(c,m,h){return(m+h)*3/4-h}function r(c){var m,h=e(c),v=h[0],g=h[1],i=new b(n(c,v,g)),w=0,S=g>0?v-4:v,M;for(M=0;M>16&255,i[w++]=m>>8&255,i[w++]=m&255;return g===2&&(m=p[c.charCodeAt(M)]<<2|p[c.charCodeAt(M+1)]>>4,i[w++]=m&255),g===1&&(m=p[c.charCodeAt(M)]<<10|p[c.charCodeAt(M+1)]<<4|p[c.charCodeAt(M+2)]>>2,i[w++]=m>>8&255,i[w++]=m&255),i}function a(c){return V[c>>18&63]+V[c>>12&63]+V[c>>6&63]+V[c&63]}function o(c,m,h){for(var v,g=[],i=m;iS?S:w+i));return v===1?(m=c[h-1],g.push(V[m>>2]+V[m<<4&63]+"==")):v===2&&(m=(c[h-2]<<8)+c[h-1],g.push(V[m>>10]+V[m>>4&63]+V[m<<2&63]+"=")),g.join("")}}}),Wz=ze({"node_modules/ieee754/index.js"(J){J.read=function(V,p,b,E,k){var l,e,t=k*8-E-1,n=(1<>1,a=-7,o=b?k-1:0,s=b?-1:1,c=V[p+o];for(o+=s,l=c&(1<<-a)-1,c>>=-a,a+=t;a>0;l=l*256+V[p+o],o+=s,a-=8);for(e=l&(1<<-a)-1,l>>=-a,a+=E;a>0;e=e*256+V[p+o],o+=s,a-=8);if(l===0)l=1-r;else{if(l===n)return e?NaN:(c?-1:1)*(1/0);e=e+Math.pow(2,E),l=l-r}return(c?-1:1)*e*Math.pow(2,l-E)},J.write=function(V,p,b,E,k,l){var e,t,n,r=l*8-k-1,a=(1<>1,s=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=E?0:l-1,m=E?1:-1,h=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(t=isNaN(p)?1:0,e=a):(e=Math.floor(Math.log(p)/Math.LN2),p*(n=Math.pow(2,-e))<1&&(e--,n*=2),e+o>=1?p+=s/n:p+=s*Math.pow(2,1-o),p*n>=2&&(e++,n/=2),e+o>=a?(t=0,e=a):e+o>=1?(t=(p*n-1)*Math.pow(2,k),e=e+o):(t=p*Math.pow(2,o-1)*Math.pow(2,k),e=0));k>=8;V[b+c]=t&255,c+=m,t/=256,k-=8);for(e=e<0;V[b+c]=e&255,c+=m,e/=256,r-=8);V[b+c-m]|=h*128}}}),$v=ze({"node_modules/buffer/index.js"(J){"use strict";var V=Hz(),p=Wz(),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;J.Buffer=e,J.SlowBuffer=g,J.INSPECT_MAX_BYTES=50;var E=2147483647;J.kMaxLength=E,e.TYPED_ARRAY_SUPPORT=k(),!e.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 k(){try{let ce=new Uint8Array(1),ve={foo:function(){return 42}};return Object.setPrototypeOf(ve,Uint8Array.prototype),Object.setPrototypeOf(ce,ve),ce.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function l(ce){if(ce>E)throw new RangeError('The value "'+ce+'" is invalid for option "size"');let ve=new Uint8Array(ce);return Object.setPrototypeOf(ve,e.prototype),ve}function e(ce,ve,le){if(typeof ce=="number"){if(typeof ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return a(ce)}return t(ce,ve,le)}e.poolSize=8192;function t(ce,ve,le){if(typeof ce=="string")return o(ce,ve);if(ArrayBuffer.isView(ce))return c(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 "+typeof ce);if(Ie(ce,ArrayBuffer)||ce&&Ie(ce.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ce,SharedArrayBuffer)||ce&&Ie(ce.buffer,SharedArrayBuffer)))return m(ce,ve,le);if(typeof ce=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Ae=ce.valueOf&&ce.valueOf();if(Ae!=null&&Ae!==ce)return e.from(Ae,ve,le);let Be=h(ce);if(Be)return Be;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ce[Symbol.toPrimitive]=="function")return e.from(ce[Symbol.toPrimitive]("string"),ve,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ce)}e.from=function(ce,ve,le){return t(ce,ve,le)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function n(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 r(ce,ve,le){return n(ce),ce<=0?l(ce):ve!==void 0?typeof le=="string"?l(ce).fill(ve,le):l(ce).fill(ve):l(ce)}e.alloc=function(ce,ve,le){return r(ce,ve,le)};function a(ce){return n(ce),l(ce<0?0:v(ce)|0)}e.allocUnsafe=function(ce){return a(ce)},e.allocUnsafeSlow=function(ce){return a(ce)};function o(ce,ve){if((typeof ve!="string"||ve==="")&&(ve="utf8"),!e.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);let le=i(ce,ve)|0,Ae=l(le),Be=Ae.write(ce,ve);return Be!==le&&(Ae=Ae.slice(0,Be)),Ae}function s(ce){let ve=ce.length<0?0:v(ce.length)|0,le=l(ve);for(let Ae=0;Ae=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return ce|0}function g(ce){return+ce!=ce&&(ce=0),e.alloc(+ce)}e.isBuffer=function(ve){return ve!=null&&ve._isBuffer===!0&&ve!==e.prototype},e.compare=function(ve,le){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),Ie(le,Uint8Array)&&(le=e.from(le,le.offset,le.byteLength)),!e.isBuffer(ve)||!e.isBuffer(le))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ve===le)return 0;let Ae=ve.length,Be=le.length;for(let Xe=0,Ye=Math.min(Ae,Be);XeBe.length?(e.isBuffer(Ye)||(Ye=e.from(Ye)),Ye.copy(Be,Xe)):Uint8Array.prototype.set.call(Be,Ye,Xe);else if(e.isBuffer(Ye))Ye.copy(Be,Xe);else throw new TypeError('"list" argument must be an Array of Buffers');Xe+=Ye.length}return Be};function i(ce,ve){if(e.isBuffer(ce))return ce.length;if(ArrayBuffer.isView(ce)||Ie(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 '+typeof ce);let le=ce.length,Ae=arguments.length>2&&arguments[2]===!0;if(!Ae&&le===0)return 0;let Be=!1;for(;;)switch(ve){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return he(ce).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return Me(ce).length;default:if(Be)return Ae?-1:he(ce).length;ve=(""+ve).toLowerCase(),Be=!0}}e.byteLength=i;function w(ce,ve,le){let Ae=!1;if((ve===void 0||ve<0)&&(ve=0),ve>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ve>>>=0,le<=ve))return"";for(ce||(ce="utf8");;)switch(ce){case"hex":return F(this,ve,le);case"utf8":case"utf-8":return z(this,ve,le);case"ascii":return D(this,ve,le);case"latin1":case"binary":return B(this,ve,le);case"base64":return x(this,ve,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ve,le);default:if(Ae)throw new TypeError("Unknown encoding: "+ce);ce=(ce+"").toLowerCase(),Ae=!0}}e.prototype._isBuffer=!0;function S(ce,ve,le){let Ae=ce[ve];ce[ve]=ce[le],ce[le]=Ae}e.prototype.swap16=function(){let ve=this.length;if(ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let le=0;lele&&(ve+=" ... "),""},b&&(e.prototype[b]=e.prototype.inspect),e.prototype.compare=function(ve,le,Ae,Be,Xe){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),!e.isBuffer(ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ve);if(le===void 0&&(le=0),Ae===void 0&&(Ae=ve?ve.length:0),Be===void 0&&(Be=0),Xe===void 0&&(Xe=this.length),le<0||Ae>ve.length||Be<0||Xe>this.length)throw new RangeError("out of range index");if(Be>=Xe&&le>=Ae)return 0;if(Be>=Xe)return-1;if(le>=Ae)return 1;if(le>>>=0,Ae>>>=0,Be>>>=0,Xe>>>=0,this===ve)return 0;let Ye=Xe-Be,yt=Ae-le,gt=Math.min(Ye,yt),Tt=this.slice(Be,Xe),At=ve.slice(le,Ae);for(let $t=0;$t2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,Ve(le)&&(le=Be?0:ce.length-1),le<0&&(le=ce.length+le),le>=ce.length){if(Be)return-1;le=ce.length-1}else if(le<0)if(Be)le=0;else return-1;if(typeof ve=="string"&&(ve=e.from(ve,Ae)),e.isBuffer(ve))return ve.length===0?-1:C(ce,ve,le,Ae,Be);if(typeof ve=="number")return ve=ve&255,typeof Uint8Array.prototype.indexOf=="function"?Be?Uint8Array.prototype.indexOf.call(ce,ve,le):Uint8Array.prototype.lastIndexOf.call(ce,ve,le):C(ce,[ve],le,Ae,Be);throw new TypeError("val must be string, number or Buffer")}function C(ce,ve,le,Ae,Be){let Xe=1,Ye=ce.length,yt=ve.length;if(Ae!==void 0&&(Ae=String(Ae).toLowerCase(),Ae==="ucs2"||Ae==="ucs-2"||Ae==="utf16le"||Ae==="utf-16le")){if(ce.length<2||ve.length<2)return-1;Xe=2,Ye/=2,yt/=2,le/=2}function gt(At,$t){return Xe===1?At[$t]:At.readUInt16BE($t*Xe)}let Tt;if(Be){let At=-1;for(Tt=le;TtYe&&(le=Ye-yt),Tt=le;Tt>=0;Tt--){let At=!0;for(let $t=0;$tBe&&(Ae=Be)):Ae=Be;let Xe=ve.length;Ae>Xe/2&&(Ae=Xe/2);let Ye;for(Ye=0;Ye>>0,isFinite(Ae)?(Ae=Ae>>>0,Be===void 0&&(Be="utf8")):(Be=Ae,Ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Xe=this.length-le;if((Ae===void 0||Ae>Xe)&&(Ae=Xe),ve.length>0&&(Ae<0||le<0)||le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Be||(Be="utf8");let Ye=!1;for(;;)switch(Be){case"hex":return _(this,ve,le,Ae);case"utf8":case"utf-8":return T(this,ve,le,Ae);case"ascii":case"latin1":case"binary":return f(this,ve,le,Ae);case"base64":return u(this,ve,le,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,ve,le,Ae);default:if(Ye)throw new TypeError("Unknown encoding: "+Be);Be=(""+Be).toLowerCase(),Ye=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(ce,ve,le){return ve===0&&le===ce.length?V.fromByteArray(ce):V.fromByteArray(ce.slice(ve,le))}function z(ce,ve,le){le=Math.min(ce.length,le);let Ae=[],Be=ve;for(;Be239?4:Xe>223?3:Xe>191?2:1;if(Be+yt<=le){let gt,Tt,At,$t;switch(yt){case 1:Xe<128&&(Ye=Xe);break;case 2:gt=ce[Be+1],(gt&192)===128&&($t=(Xe&31)<<6|gt&63,$t>127&&(Ye=$t));break;case 3:gt=ce[Be+1],Tt=ce[Be+2],(gt&192)===128&&(Tt&192)===128&&($t=(Xe&15)<<12|(gt&63)<<6|Tt&63,$t>2047&&($t<55296||$t>57343)&&(Ye=$t));break;case 4:gt=ce[Be+1],Tt=ce[Be+2],At=ce[Be+3],(gt&192)===128&&(Tt&192)===128&&(At&192)===128&&($t=(Xe&15)<<18|(gt&63)<<12|(Tt&63)<<6|At&63,$t>65535&&$t<1114112&&(Ye=$t))}}Ye===null?(Ye=65533,yt=1):Ye>65535&&(Ye-=65536,Ae.push(Ye>>>10&1023|55296),Ye=56320|Ye&1023),Ae.push(Ye),Be+=yt}return O(Ae)}var I=4096;function O(ce){let ve=ce.length;if(ve<=I)return String.fromCharCode.apply(String,ce);let le="",Ae=0;for(;AeAe)&&(le=Ae);let Be="";for(let Xe=ve;XeAe&&(ve=Ae),le<0?(le+=Ae,le<0&&(le=0)):le>Ae&&(le=Ae),lele)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(ve,le,Ae){ve=ve>>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve],Xe=1,Ye=0;for(;++Ye>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve+--le],Xe=1;for(;le>0&&(Xe*=256);)Be+=this[ve+--le]*Xe;return Be},e.prototype.readUint8=e.prototype.readUInt8=function(ve,le){return ve=ve>>>0,le||j(ve,1,this.length),this[ve]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(ve,le){return ve=ve>>>0,le||j(ve,2,this.length),this[ve]|this[ve+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(ve,le){return ve=ve>>>0,le||j(ve,2,this.length),this[ve]<<8|this[ve+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),(this[ve]|this[ve+1]<<8|this[ve+2]<<16)+this[ve+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]*16777216+(this[ve+1]<<16|this[ve+2]<<8|this[ve+3])},e.prototype.readBigUInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=le+this[++ve]*2**8+this[++ve]*2**16+this[++ve]*2**24,Xe=this[++ve]+this[++ve]*2**8+this[++ve]*2**16+Ae*2**24;return BigInt(Be)+(BigInt(Xe)<>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=le*2**24+this[++ve]*2**16+this[++ve]*2**8+this[++ve],Xe=this[++ve]*2**24+this[++ve]*2**16+this[++ve]*2**8+Ae;return(BigInt(Be)<>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve],Xe=1,Ye=0;for(;++Ye=Xe&&(Be-=Math.pow(2,8*le)),Be},e.prototype.readIntBE=function(ve,le,Ae){ve=ve>>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=le,Xe=1,Ye=this[ve+--Be];for(;Be>0&&(Xe*=256);)Ye+=this[ve+--Be]*Xe;return Xe*=128,Ye>=Xe&&(Ye-=Math.pow(2,8*le)),Ye},e.prototype.readInt8=function(ve,le){return ve=ve>>>0,le||j(ve,1,this.length),this[ve]&128?(255-this[ve]+1)*-1:this[ve]},e.prototype.readInt16LE=function(ve,le){ve=ve>>>0,le||j(ve,2,this.length);let Ae=this[ve]|this[ve+1]<<8;return Ae&32768?Ae|4294901760:Ae},e.prototype.readInt16BE=function(ve,le){ve=ve>>>0,le||j(ve,2,this.length);let Ae=this[ve+1]|this[ve]<<8;return Ae&32768?Ae|4294901760:Ae},e.prototype.readInt32LE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]|this[ve+1]<<8|this[ve+2]<<16|this[ve+3]<<24},e.prototype.readInt32BE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]<<24|this[ve+1]<<16|this[ve+2]<<8|this[ve+3]},e.prototype.readBigInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=this[ve+4]+this[ve+5]*2**8+this[ve+6]*2**16+(Ae<<24);return(BigInt(Be)<>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=(le<<24)+this[++ve]*2**16+this[++ve]*2**8+this[++ve];return(BigInt(Be)<>>0,le||j(ve,4,this.length),p.read(this,ve,!0,23,4)},e.prototype.readFloatBE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),p.read(this,ve,!1,23,4)},e.prototype.readDoubleLE=function(ve,le){return ve=ve>>>0,le||j(ve,8,this.length),p.read(this,ve,!0,52,8)},e.prototype.readDoubleBE=function(ve,le){return ve=ve>>>0,le||j(ve,8,this.length),p.read(this,ve,!1,52,8)};function U(ce,ve,le,Ae,Be,Xe){if(!e.isBuffer(ce))throw new TypeError('"buffer" argument must be a Buffer instance');if(ve>Be||vece.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,Ae=Ae>>>0,!Be){let yt=Math.pow(2,8*Ae)-1;U(this,ve,le,Ae,yt,0)}let Xe=1,Ye=0;for(this[le]=ve&255;++Ye>>0,Ae=Ae>>>0,!Be){let yt=Math.pow(2,8*Ae)-1;U(this,ve,le,Ae,yt,0)}let Xe=Ae-1,Ye=1;for(this[le+Xe]=ve&255;--Xe>=0&&(Ye*=256);)this[le+Xe]=ve/Ye&255;return le+Ae},e.prototype.writeUint8=e.prototype.writeUInt8=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,1,255,0),this[le]=ve&255,le+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,65535,0),this[le]=ve&255,this[le+1]=ve>>>8,le+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,65535,0),this[le]=ve>>>8,this[le+1]=ve&255,le+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,4294967295,0),this[le+3]=ve>>>24,this[le+2]=ve>>>16,this[le+1]=ve>>>8,this[le]=ve&255,le+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,4294967295,0),this[le]=ve>>>24,this[le+1]=ve>>>16,this[le+2]=ve>>>8,this[le+3]=ve&255,le+4};function $(ce,ve,le,Ae,Be){Y(ve,Ae,Be,ce,le,7);let Xe=Number(ve&BigInt(4294967295));ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe;let Ye=Number(ve>>BigInt(32)&BigInt(4294967295));return ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,le}function Q(ce,ve,le,Ae,Be){Y(ve,Ae,Be,ce,le,7);let Xe=Number(ve&BigInt(4294967295));ce[le+7]=Xe,Xe=Xe>>8,ce[le+6]=Xe,Xe=Xe>>8,ce[le+5]=Xe,Xe=Xe>>8,ce[le+4]=Xe;let Ye=Number(ve>>BigInt(32)&BigInt(4294967295));return ce[le+3]=Ye,Ye=Ye>>8,ce[le+2]=Ye,Ye=Ye>>8,ce[le+1]=Ye,Ye=Ye>>8,ce[le]=Ye,le+8}e.prototype.writeBigUInt64LE=ke(function(ve,le=0){return $(this,ve,le,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=ke(function(ve,le=0){return Q(this,ve,le,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,!Be){let gt=Math.pow(2,8*Ae-1);U(this,ve,le,Ae,gt-1,-gt)}let Xe=0,Ye=1,yt=0;for(this[le]=ve&255;++Xe>0)-yt&255;return le+Ae},e.prototype.writeIntBE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,!Be){let gt=Math.pow(2,8*Ae-1);U(this,ve,le,Ae,gt-1,-gt)}let Xe=Ae-1,Ye=1,yt=0;for(this[le+Xe]=ve&255;--Xe>=0&&(Ye*=256);)ve<0&&yt===0&&this[le+Xe+1]!==0&&(yt=1),this[le+Xe]=(ve/Ye>>0)-yt&255;return le+Ae},e.prototype.writeInt8=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,1,127,-128),ve<0&&(ve=255+ve+1),this[le]=ve&255,le+1},e.prototype.writeInt16LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,32767,-32768),this[le]=ve&255,this[le+1]=ve>>>8,le+2},e.prototype.writeInt16BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,32767,-32768),this[le]=ve>>>8,this[le+1]=ve&255,le+2},e.prototype.writeInt32LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,2147483647,-2147483648),this[le]=ve&255,this[le+1]=ve>>>8,this[le+2]=ve>>>16,this[le+3]=ve>>>24,le+4},e.prototype.writeInt32BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,2147483647,-2147483648),ve<0&&(ve=4294967295+ve+1),this[le]=ve>>>24,this[le+1]=ve>>>16,this[le+2]=ve>>>8,this[le+3]=ve&255,le+4},e.prototype.writeBigInt64LE=ke(function(ve,le=0){return $(this,ve,le,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=ke(function(ve,le=0){return Q(this,ve,le,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function re(ce,ve,le,Ae,Be,Xe){if(le+Ae>ce.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function ne(ce,ve,le,Ae,Be){return ve=+ve,le=le>>>0,Be||re(ce,ve,le,4,34028234663852886e22,-34028234663852886e22),p.write(ce,ve,le,Ae,23,4),le+4}e.prototype.writeFloatLE=function(ve,le,Ae){return ne(this,ve,le,!0,Ae)},e.prototype.writeFloatBE=function(ve,le,Ae){return ne(this,ve,le,!1,Ae)};function se(ce,ve,le,Ae,Be){return ve=+ve,le=le>>>0,Be||re(ce,ve,le,8,17976931348623157e292,-17976931348623157e292),p.write(ce,ve,le,Ae,52,8),le+8}e.prototype.writeDoubleLE=function(ve,le,Ae){return se(this,ve,le,!0,Ae)},e.prototype.writeDoubleBE=function(ve,le,Ae){return se(this,ve,le,!1,Ae)},e.prototype.copy=function(ve,le,Ae,Be){if(!e.isBuffer(ve))throw new TypeError("argument should be a Buffer");if(Ae||(Ae=0),!Be&&Be!==0&&(Be=this.length),le>=ve.length&&(le=ve.length),le||(le=0),Be>0&&Be=this.length)throw new RangeError("Index out of range");if(Be<0)throw new RangeError("sourceEnd out of bounds");Be>this.length&&(Be=this.length),ve.length-le>>0,Ae=Ae===void 0?this.length:Ae>>>0,ve||(ve=0);let Xe;if(typeof ve=="number")for(Xe=le;Xe2**32?Be=K(String(le)):typeof le=="bigint"&&(Be=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Be=K(Be)),Be+="n"),Ae+=` It must be ${ve}. Received ${Be}`,Ae},RangeError);function K(ce){let ve="",le=ce.length,Ae=ce[0]==="-"?1:0;for(;le>=Ae+4;le-=3)ve=`_${ce.slice(le-3,le)}${ve}`;return`${ce.slice(0,le)}${ve}`}function H(ce,ve,le){q(ve,"offset"),(ce[ve]===void 0||ce[ve+le]===void 0)&&Z(ve,ce.length-(le+1))}function Y(ce,ve,le,Ae,Be,Xe){if(ce>le||ce3?ve===0||ve===BigInt(0)?yt=`>= 0${Ye} and < 2${Ye} ** ${(Xe+1)*8}${Ye}`:yt=`>= -(2${Ye} ** ${(Xe+1)*8-1}${Ye}) and < 2 ** ${(Xe+1)*8-1}${Ye}`:yt=`>= ${ve}${Ye} and <= ${le}${Ye}`,new G.ERR_OUT_OF_RANGE("value",yt,ce)}H(Ae,Be,Xe)}function q(ce,ve){if(typeof ce!="number")throw new G.ERR_INVALID_ARG_TYPE(ve,"number",ce)}function Z(ce,ve,le){throw Math.floor(ce)!==ce?(q(ce,le),new G.ERR_OUT_OF_RANGE(le||"offset","an integer",ce)):ve<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(le||"offset",`>= ${le?1:0} and <= ${ve}`,ce)}var ee=/[^+/0-9A-Za-z-_]/g;function ae(ce){if(ce=ce.split("=")[0],ce=ce.trim().replace(ee,""),ce.length<2)return"";for(;ce.length%4!==0;)ce=ce+"=";return ce}function he(ce,ve){ve=ve||1/0;let le,Ae=ce.length,Be=null,Xe=[];for(let Ye=0;Ye55295&&le<57344){if(!Be){if(le>56319){(ve-=3)>-1&&Xe.push(239,191,189);continue}else if(Ye+1===Ae){(ve-=3)>-1&&Xe.push(239,191,189);continue}Be=le;continue}if(le<56320){(ve-=3)>-1&&Xe.push(239,191,189),Be=le;continue}le=(Be-55296<<10|le-56320)+65536}else Be&&(ve-=3)>-1&&Xe.push(239,191,189);if(Be=null,le<128){if((ve-=1)<0)break;Xe.push(le)}else if(le<2048){if((ve-=2)<0)break;Xe.push(le>>6|192,le&63|128)}else if(le<65536){if((ve-=3)<0)break;Xe.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ve-=4)<0)break;Xe.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Xe}function xe(ce){let ve=[];for(let le=0;le>8,Be=le%256,Xe.push(Be),Xe.push(Ae);return Xe}function Me(ce){return V.toByteArray(ae(ce))}function Se(ce,ve,le,Ae){let Be;for(Be=0;Be=ve.length||Be>=ce.length);++Be)ve[Be+le]=ce[Be];return Be}function Ie(ce,ve){return ce instanceof ve||ce!=null&&ce.constructor!=null&&ce.constructor.name!=null&&ce.constructor.name===ve.name}function Ve(ce){return ce!==ce}var Ge=function(){let ce="0123456789abcdef",ve=new Array(256);for(let le=0;le<16;++le){let Ae=le*16;for(let Be=0;Be<16;++Be)ve[Ae+Be]=ce[le]+ce[Be]}return ve}();function ke(ce){return typeof BigInt>"u"?_e:ce}function _e(){throw new Error("BigInt not supported")}}}),Pb=ze({"node_modules/has-symbols/shams.js"(J,V){"use strict";V.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var b={},E=Symbol("test"),k=Object(E);if(typeof E=="string"||Object.prototype.toString.call(E)!=="[object Symbol]"||Object.prototype.toString.call(k)!=="[object Symbol]")return!1;var l=42;b[E]=l;for(var e in b)return!1;if(typeof Object.keys=="function"&&Object.keys(b).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(b).length!==0)return!1;var t=Object.getOwnPropertySymbols(b);if(t.length!==1||t[0]!==E||!Object.prototype.propertyIsEnumerable.call(b,E))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(b,E);if(n.value!==l||n.enumerable!==!0)return!1}return!0}}}),k1=ze({"node_modules/has-tostringtag/shams.js"(J,V){"use strict";var p=Pb();V.exports=function(){return p()&&!!Symbol.toStringTag}}}),Rb=ze({"node_modules/es-object-atoms/index.js"(J,V){"use strict";V.exports=Object}}),Yz=ze({"node_modules/es-errors/index.js"(J,V){"use strict";V.exports=Error}}),Xz=ze({"node_modules/es-errors/eval.js"(J,V){"use strict";V.exports=EvalError}}),Zz=ze({"node_modules/es-errors/range.js"(J,V){"use strict";V.exports=RangeError}}),$z=ze({"node_modules/es-errors/ref.js"(J,V){"use strict";V.exports=ReferenceError}}),PT=ze({"node_modules/es-errors/syntax.js"(J,V){"use strict";V.exports=SyntaxError}}),og=ze({"node_modules/es-errors/type.js"(J,V){"use strict";V.exports=TypeError}}),Kz=ze({"node_modules/es-errors/uri.js"(J,V){"use strict";V.exports=URIError}}),Jz=ze({"node_modules/math-intrinsics/abs.js"(J,V){"use strict";V.exports=Math.abs}}),Qz=ze({"node_modules/math-intrinsics/floor.js"(J,V){"use strict";V.exports=Math.floor}}),eB=ze({"node_modules/math-intrinsics/max.js"(J,V){"use strict";V.exports=Math.max}}),tB=ze({"node_modules/math-intrinsics/min.js"(J,V){"use strict";V.exports=Math.min}}),rB=ze({"node_modules/math-intrinsics/pow.js"(J,V){"use strict";V.exports=Math.pow}}),aB=ze({"node_modules/math-intrinsics/round.js"(J,V){"use strict";V.exports=Math.round}}),nB=ze({"node_modules/math-intrinsics/isNaN.js"(J,V){"use strict";V.exports=Number.isNaN||function(b){return b!==b}}}),iB=ze({"node_modules/math-intrinsics/sign.js"(J,V){"use strict";var p=nB();V.exports=function(E){return p(E)||E===0?E:E<0?-1:1}}}),oB=ze({"node_modules/gopd/gOPD.js"(J,V){"use strict";V.exports=Object.getOwnPropertyDescriptor}}),Kv=ze({"node_modules/gopd/index.js"(J,V){"use strict";var p=oB();if(p)try{p([],"length")}catch{p=null}V.exports=p}}),C1=ze({"node_modules/es-define-property/index.js"(J,V){"use strict";var p=Object.defineProperty||!1;if(p)try{p({},"a",{value:1})}catch{p=!1}V.exports=p}}),sB=ze({"node_modules/has-symbols/index.js"(J,V){"use strict";var p=typeof Symbol<"u"&&Symbol,b=Pb();V.exports=function(){return typeof p!="function"||typeof Symbol!="function"||typeof p("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:b()}}}),RT=ze({"node_modules/get-proto/Reflect.getPrototypeOf.js"(J,V){"use strict";V.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),IT=ze({"node_modules/get-proto/Object.getPrototypeOf.js"(J,V){"use strict";var p=Rb();V.exports=p.getPrototypeOf||null}}),lB=ze({"node_modules/function-bind/implementation.js"(J,V){"use strict";var p="Function.prototype.bind called on incompatible ",b=Object.prototype.toString,E=Math.max,k="[object Function]",l=function(r,a){for(var o=[],s=0;s"u"||!T?p:T(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?p:ArrayBuffer,"%ArrayIteratorPrototype%":_&&T?T([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":z,"%AsyncGenerator%":z,"%AsyncGeneratorFunction%":z,"%AsyncIteratorPrototype%":z,"%Atomics%":typeof Atomics>"u"?p:Atomics,"%BigInt%":typeof BigInt>"u"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E,"%eval%":eval,"%EvalError%":k,"%Float16Array%":typeof Float16Array>"u"?p:Float16Array,"%Float32Array%":typeof Float32Array>"u"?p:Float32Array,"%Float64Array%":typeof Float64Array>"u"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?p:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":z,"%Int8Array%":typeof Int8Array>"u"?p:Int8Array,"%Int16Array%":typeof Int16Array>"u"?p:Int16Array,"%Int32Array%":typeof Int32Array>"u"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&T?T(T([][Symbol.iterator]())):p,"%JSON%":typeof JSON=="object"?JSON:p,"%Map%":typeof Map>"u"?p:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_||!T?p:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":b,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?p:Promise,"%Proxy%":typeof Proxy>"u"?p:Proxy,"%RangeError%":l,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?p:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_||!T?p:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&T?T(""[Symbol.iterator]()):p,"%Symbol%":_?Symbol:p,"%SyntaxError%":t,"%ThrowTypeError%":C,"%TypedArray%":I,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?p:Uint32Array,"%URIError%":r,"%WeakMap%":typeof WeakMap>"u"?p:WeakMap,"%WeakRef%":typeof WeakRef>"u"?p:WeakRef,"%WeakSet%":typeof WeakSet>"u"?p:WeakSet,"%Function.prototype.call%":x,"%Function.prototype.apply%":A,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":f,"%Math.abs%":a,"%Math.floor%":o,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":m,"%Math.round%":h,"%Math.sign%":v,"%Reflect.getPrototypeOf%":u};if(T)try{null.error}catch(H){D=T(T(H)),O["%Error.prototype%"]=D}var D,B=function H(Y){var q;if(Y==="%AsyncFunction%")q=i("async function () {}");else if(Y==="%GeneratorFunction%")q=i("function* () {}");else if(Y==="%AsyncGeneratorFunction%")q=i("async function* () {}");else if(Y==="%AsyncGenerator%"){var Z=H("%AsyncGeneratorFunction%");Z&&(q=Z.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ee=H("%AsyncGenerator%");ee&&T&&(q=T(ee.prototype))}return O[Y]=q,q},F={__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=sg(),j=FT(),U=P.call(x,Array.prototype.concat),$=P.call(A,Array.prototype.splice),Q=P.call(x,String.prototype.replace),re=P.call(x,String.prototype.slice),ne=P.call(x,RegExp.prototype.exec),se=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,X=function(Y){var q=re(Y,0,1),Z=re(Y,-1);if(q==="%"&&Z!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if(Z==="%"&&q!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var ee=[];return Q(Y,se,function(ae,he,xe,we){ee[ee.length]=xe?Q(we,G,"$1"):he||ae}),ee},K=function(Y,q){var Z=Y,ee;if(j(F,Z)&&(ee=F[Z],Z="%"+ee[0]+"%"),j(O,Z)){var ae=O[Z];if(ae===z&&(ae=B(Z)),typeof ae>"u"&&!q)throw new n("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ee,name:Z,value:ae}}throw new t("intrinsic "+Y+" does not exist!")};V.exports=function(Y,q){if(typeof Y!="string"||Y.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new n('"allowMissing" argument must be a boolean');if(ne(/^%?[^%]*%?$/,Y)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Z=X(Y),ee=Z.length>0?Z[0]:"",ae=K("%"+ee+"%",q),he=ae.name,xe=ae.value,we=!1,Me=ae.alias;Me&&(ee=Me[0],$(Z,U([0,1],Me)));for(var Se=1,Ie=!0;Se=Z.length){var _e=w(xe,Ve);Ie=!!_e,Ie&&"get"in _e&&!("originalValue"in _e.get)?xe=_e.get:xe=xe[Ve]}else Ie=j(xe,Ve),xe=xe[Ve];Ie&&!we&&(O[he]=xe)}}return xe}}}),Jv=ze({"node_modules/call-bound/index.js"(J,V){"use strict";var p=Bb(),b=Fb(),E=b([p("%String.prototype.indexOf%")]);V.exports=function(l,e){var t=p(l,!!e);return typeof t=="function"&&E(l,".prototype.")>-1?b([t]):t}}}),fB=ze({"node_modules/is-arguments/index.js"(J,V){"use strict";var p=k1()(),b=Jv(),E=b("Object.prototype.toString"),k=function(n){return p&&n&&typeof n=="object"&&Symbol.toStringTag in n?!1:E(n)==="[object Arguments]"},l=function(n){return k(n)?!0:n!==null&&typeof n=="object"&&"length"in n&&typeof n.length=="number"&&n.length>=0&&E(n)!=="[object Array]"&&"callee"in n&&E(n.callee)==="[object Function]"},e=function(){return k(arguments)}();k.isLegacyArguments=l,V.exports=e?k:l}}),hB=ze({"node_modules/is-regex/index.js"(J,V){"use strict";var p=Jv(),b=k1()(),E=FT(),k=Kv(),l;b?(e=p("RegExp.prototype.exec"),t={},n=function(){throw t},r={toString:n,valueOf:n},typeof Symbol.toPrimitive=="symbol"&&(r[Symbol.toPrimitive]=n),l=function(c){if(!c||typeof c!="object")return!1;var m=k(c,"lastIndex"),h=m&&E(m,"value");if(!h)return!1;try{e(c,r)}catch(v){return v===t}}):(a=p("Object.prototype.toString"),o="[object RegExp]",l=function(c){return!c||typeof c!="object"&&typeof c!="function"?!1:a(c)===o});var e,t,n,r,a,o;V.exports=l}}),dB=ze({"node_modules/safe-regex-test/index.js"(J,V){"use strict";var p=Jv(),b=hB(),E=p("RegExp.prototype.exec"),k=og();V.exports=function(e){if(!b(e))throw new k("`regex` must be a RegExp");return function(n){return E(e,n)!==null}}}}),pB=ze({"node_modules/generator-function/index.js"(J,V){"use strict";var p=function*(){}.constructor;V.exports=()=>p}}),vB=ze({"node_modules/is-generator-function/index.js"(J,V){"use strict";var p=Jv(),b=dB(),E=b(/^\s*(?:function)?\*/),k=k1()(),l=zb(),e=p("Object.prototype.toString"),t=p("Function.prototype.toString"),n=pB();V.exports=function(a){if(typeof a!="function")return!1;if(E(t(a)))return!0;if(!k){var o=e(a);return o==="[object GeneratorFunction]"}if(!l)return!1;var s=n();return s&&l(a)===s.prototype}}}),mB=ze({"node_modules/is-callable/index.js"(J,V){"use strict";var p=Function.prototype.toString,b=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,E,k;if(typeof b=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw k}}),k={},b(function(){throw 42},null,E)}catch(w){w!==k&&(b=null)}else b=null;var l=/^\s*class\b/,e=function(S){try{var M=p.call(S);return l.test(M)}catch{return!1}},t=function(S){try{return e(S)?!1:(p.call(S),!0)}catch{return!1}},n=Object.prototype.toString,r="[object Object]",a="[object Function]",o="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",m="[object HTMLCollection]",h=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),g=function(){return!1};typeof document=="object"&&(i=document.all,n.call(i)===n.call(document.all)&&(g=function(S){if((v||!S)&&(typeof S>"u"||typeof S=="object"))try{var M=n.call(S);return(M===s||M===c||M===m||M===r)&&S("")==null}catch{}return!1}));var i;V.exports=b?function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;try{b(S,null,E)}catch(M){if(M!==k)return!1}return!e(S)&&t(S)}:function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;if(h)return t(S);if(e(S))return!1;var M=n.call(S);return M!==a&&M!==o&&!/^\[object HTML/.test(M)?!1:t(S)}}}),gB=ze({"node_modules/for-each/index.js"(J,V){"use strict";var p=mB(),b=Object.prototype.toString,E=Object.prototype.hasOwnProperty,k=function(r,a,o){for(var s=0,c=r.length;s=3&&(s=o),t(r)?k(r,a,s):typeof r=="string"?l(r,a,s):e(r,a,s)}}}),yB=ze({"node_modules/possible-typed-array-names/index.js"(J,V){"use strict";V.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),_B=ze({"node_modules/available-typed-arrays/index.js"(J,V){"use strict";var p=yB(),b=typeof globalThis>"u"?window:globalThis;V.exports=function(){for(var k=[],l=0;l3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new E("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new E("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new E("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new E("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!k&&k(e,t);if(p)p(e,t,{configurable:o===null&&c?c.configurable:!o,enumerable:r===null&&c?c.enumerable:!r,value:n,writable:a===null&&c?c.writable:!a});else if(s||!r&&!a&&!o)e[t]=n;else throw new b("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),BT=ze({"node_modules/has-property-descriptors/index.js"(J,V){"use strict";var p=C1(),b=function(){return!!p};b.hasArrayLengthDefineBug=function(){if(!p)return null;try{return p([],"length",{value:1}).length!==1}catch{return!0}},V.exports=b}}),xB=ze({"node_modules/set-function-length/index.js"(J,V){"use strict";var p=Bb(),b=zT(),E=BT()(),k=Kv(),l=og(),e=p("%Math.floor%");V.exports=function(n,r){if(typeof n!="function")throw new l("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||e(r)!==r)throw new l("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in n&&k){var c=k(n,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(s=!1)}return(o||s||!a)&&(E?b(n,"length",r,!0,!0):b(n,"length",r)),n}}}),bB=ze({"node_modules/call-bind-apply-helpers/applyBind.js"(J,V){"use strict";var p=sg(),b=Db(),E=DT();V.exports=function(){return E(p,b,arguments)}}}),L1=ze({"node_modules/call-bind/index.js"(J,V){"use strict";var p=xB(),b=C1(),E=Fb(),k=bB();V.exports=function(e){var t=E(arguments),n=1+e.length-(arguments.length-1);return p(t,n>0?n:0,!0)},b?b(V.exports,"apply",{value:k}):V.exports.apply=k}}),OT=ze({"node_modules/which-typed-array/index.js"(J,V){"use strict";var p=gB(),b=_B(),E=L1(),k=Jv(),l=Kv(),e=zb(),t=k("Object.prototype.toString"),n=k1()(),r=typeof globalThis>"u"?window:globalThis,a=b(),o=k("String.prototype.slice"),s=k("Array.prototype.indexOf",!0)||function(i,w){for(var S=0;S-1}V.exports=function(i){if(!i||typeof i!="object")return!1;if(!n){var w=o(t(i),8,-1);return v(w)?w:w!=="Object"?!1:h(i)}return l?m(i):null}}}),wB=ze({"node_modules/is-typed-array/index.js"(J,V){"use strict";var p=OT();V.exports=function(E){return!!p(E)}}}),NT=ze({"node_modules/util/support/types.js"(J){"use strict";var V=fB(),p=vB(),b=OT(),E=wB();function k(we){return we.call.bind(we)}var l=typeof BigInt<"u",e=typeof Symbol<"u",t=k(Object.prototype.toString),n=k(Number.prototype.valueOf),r=k(String.prototype.valueOf),a=k(Boolean.prototype.valueOf);l&&(o=k(BigInt.prototype.valueOf));var o;e&&(s=k(Symbol.prototype.valueOf));var s;function c(we,Me){if(typeof we!="object")return!1;try{return Me(we),!0}catch{return!1}}J.isArgumentsObject=V,J.isGeneratorFunction=p,J.isTypedArray=E;function m(we){return typeof Promise<"u"&&we instanceof Promise||we!==null&&typeof we=="object"&&typeof we.then=="function"&&typeof we.catch=="function"}J.isPromise=m;function h(we){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(we):E(we)||$(we)}J.isArrayBufferView=h;function v(we){return b(we)==="Uint8Array"}J.isUint8Array=v;function g(we){return b(we)==="Uint8ClampedArray"}J.isUint8ClampedArray=g;function i(we){return b(we)==="Uint16Array"}J.isUint16Array=i;function w(we){return b(we)==="Uint32Array"}J.isUint32Array=w;function S(we){return b(we)==="Int8Array"}J.isInt8Array=S;function M(we){return b(we)==="Int16Array"}J.isInt16Array=M;function C(we){return b(we)==="Int32Array"}J.isInt32Array=C;function _(we){return b(we)==="Float32Array"}J.isFloat32Array=_;function T(we){return b(we)==="Float64Array"}J.isFloat64Array=T;function f(we){return b(we)==="BigInt64Array"}J.isBigInt64Array=f;function u(we){return b(we)==="BigUint64Array"}J.isBigUint64Array=u;function A(we){return t(we)==="[object Map]"}A.working=typeof Map<"u"&&A(new Map);function x(we){return typeof Map>"u"?!1:A.working?A(we):we instanceof Map}J.isMap=x;function z(we){return t(we)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function I(we){return typeof Set>"u"?!1:z.working?z(we):we instanceof Set}J.isSet=I;function O(we){return t(we)==="[object WeakMap]"}O.working=typeof WeakMap<"u"&&O(new WeakMap);function D(we){return typeof WeakMap>"u"?!1:O.working?O(we):we instanceof WeakMap}J.isWeakMap=D;function B(we){return t(we)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function F(we){return B(we)}J.isWeakSet=F;function P(we){return t(we)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function j(we){return typeof ArrayBuffer>"u"?!1:P.working?P(we):we instanceof ArrayBuffer}J.isArrayBuffer=j;function U(we){return t(we)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function $(we){return typeof DataView>"u"?!1:U.working?U(we):we instanceof DataView}J.isDataView=$;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function re(we){return t(we)==="[object SharedArrayBuffer]"}function ne(we){return typeof Q>"u"?!1:(typeof re.working>"u"&&(re.working=re(new Q)),re.working?re(we):we instanceof Q)}J.isSharedArrayBuffer=ne;function se(we){return t(we)==="[object AsyncFunction]"}J.isAsyncFunction=se;function G(we){return t(we)==="[object Map Iterator]"}J.isMapIterator=G;function X(we){return t(we)==="[object Set Iterator]"}J.isSetIterator=X;function K(we){return t(we)==="[object Generator]"}J.isGeneratorObject=K;function H(we){return t(we)==="[object WebAssembly.Module]"}J.isWebAssemblyCompiledModule=H;function Y(we){return c(we,n)}J.isNumberObject=Y;function q(we){return c(we,r)}J.isStringObject=q;function Z(we){return c(we,a)}J.isBooleanObject=Z;function ee(we){return l&&c(we,o)}J.isBigIntObject=ee;function ae(we){return e&&c(we,s)}J.isSymbolObject=ae;function he(we){return Y(we)||q(we)||Z(we)||ee(we)||ae(we)}J.isBoxedPrimitive=he;function xe(we){return typeof Uint8Array<"u"&&(j(we)||ne(we))}J.isAnyArrayBuffer=xe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(we){Object.defineProperty(J,we,{enumerable:!1,value:function(){throw new Error(we+" is not supported in userland")}})})}}),jT=ze({"node_modules/util/support/isBufferBrowser.js"(J,V){V.exports=function(b){return b&&typeof b=="object"&&typeof b.copy=="function"&&typeof b.fill=="function"&&typeof b.readUInt8=="function"}}}),UT=ze({"(disabled):node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function($){for(var Q=Object.keys($),re={},ne=0;ne=ne)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),G=re[Q];Q"u")return function(){return J.deprecate(U,$).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error($);process.traceDeprecation?console.trace($):console.error($),Q=!0}return U.apply(this,arguments)}return re};var b={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!b[U])if(E.test(U)){var $=process.pid;b[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,$,Q)}}else b[U]=function(){};return b[U]};function l(U,$){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v($)?Q.showHidden=$:$&&J._extend(Q,$),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,$){var Q=l.styles[$];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,$){return U}function n(U){var $={};return U.forEach(function(Q,re){$[Q]=!0}),$}function r(U,$,Q){if(U.customInspect&&$&&A($.inspect)&&$.inspect!==J.inspect&&!($.constructor&&$.constructor.prototype===$)){var re=$.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,$);if(ne)return ne;var se=Object.keys($),G=n(se);if(U.showHidden&&(se=Object.getOwnPropertyNames($)),u($)&&(se.indexOf("message")>=0||se.indexOf("description")>=0))return o($);if(se.length===0){if(A($)){var X=$.name?": "+$.name:"";return U.stylize("[Function"+X+"]","special")}if(_($))return U.stylize(RegExp.prototype.toString.call($),"regexp");if(f($))return U.stylize(Date.prototype.toString.call($),"date");if(u($))return o($)}var K="",H=!1,Y=["{","}"];if(h($)&&(H=!0,Y=["[","]"]),A($)){var q=$.name?": "+$.name:"";K=" [Function"+q+"]"}if(_($)&&(K=" "+RegExp.prototype.toString.call($)),f($)&&(K=" "+Date.prototype.toUTCString.call($)),u($)&&(K=" "+o($)),se.length===0&&(!H||$.length==0))return Y[0]+K+Y[1];if(Q<0)return _($)?U.stylize(RegExp.prototype.toString.call($),"regexp"):U.stylize("[Object]","special");U.seen.push($);var Z;return H?Z=s(U,$,Q,G,se):Z=se.map(function(ee){return c(U,$,Q,G,ee,H)}),U.seen.pop(),m(Z,K,Y)}function a(U,$){if(C($))return U.stylize("undefined","undefined");if(S($)){var Q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w($))return U.stylize(""+$,"number");if(v($))return U.stylize(""+$,"boolean");if(g($))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,$,Q,re,ne){for(var se=[],G=0,X=$.length;G-1&&(se?X=X.split(` -`).map(function(H){return" "+H}).join(` -`).slice(2):X=` -`+X.split(` -`).map(function(H){return" "+H}).join(` -`))):X=U.stylize("[Circular]","special")),C(G)){if(se&&ne.match(/^\d+$/))return X;G=JSON.stringify(""+ne),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=U.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=U.stylize(G,"string"))}return G+": "+X}function m(U,$,Q){var re=0,ne=U.reduce(function(se,G){return re++,G.indexOf(` -`)>=0&&re++,se+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+($===""?"":$+` - `)+" "+U.join(`, - `)+" "+Q[1]:Q[0]+$+" "+U.join(", ")+" "+Q[1]}J.types=NT();function h(U){return Array.isArray(U)}J.isArray=h;function v(U){return typeof U=="boolean"}J.isBoolean=v;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function x(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=x,J.isBuffer=jT();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var U=new Date,$=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),O[U.getMonth()],$].join(" ")}J.log=function(){console.log("%s - %s",D(),J.format.apply(J,arguments))},J.inherits=op(),J._extend=function(U,$){if(!$||!T($))return U;for(var Q=Object.keys($),re=Q.length;re--;)U[Q[re]]=$[Q[re]];return U};function B(U,$){return Object.prototype.hasOwnProperty.call(U,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var Q=$[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,se=new Promise(function(K,H){re=K,ne=H}),G=[],X=0;X0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(g){var i={data:g,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var i=this.head,w=""+i.data;i=i.next;)w+=g+i.data;return w}},{key:"concat",value:function(g){if(this.length===0)return a.alloc(0);for(var i=a.allocUnsafe(g>>>0),w=this.head,S=0;w;)m(w.data,i,S),S+=w.data.length,w=w.next;return i}},{key:"consume",value:function(g,i){var w;return gM.length?M.length:g;if(C===M.length?S+=M:S+=M.slice(0,g),g-=C,g===0){C===M.length?(++w,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=M.slice(C));break}++w}return this.length-=w,S}},{key:"_getBuffer",value:function(g){var i=a.allocUnsafe(g),w=this.head,S=1;for(w.data.copy(i),g-=w.data.length;w=w.next;){var M=w.data,C=g>M.length?M.length:g;if(M.copy(i,i.length-g,0,C),g-=C,g===0){C===M.length?(++S,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=M.slice(C));break}++S}return this.length-=S,i}},{key:c,value:function(g,i){return s(this,b(b({},i),{},{depth:0,customInspect:!1}))}}]),h}()}}),qT=ze({"node_modules/readable-stream/lib/internal/streams/destroy.js"(J,V){"use strict";function p(t,n){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,t)):process.nextTick(l,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!n&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(E,r):(r._writableState.errorEmitted=!0,process.nextTick(b,r,s)):process.nextTick(b,r,s):n?(process.nextTick(E,r),n(s)):process.nextTick(E,r)}),this)}function b(t,n){l(t,n),E(t)}function E(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function k(){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 l(t,n){t.emit("error",n)}function e(t,n){var r=t._readableState,a=t._writableState;r&&r.autoDestroy||a&&a.autoDestroy?t.destroy(n):t.emit("error",n)}V.exports={destroy:p,undestroy:k,errorOrDestroy:e}}}),Qv=ze({"node_modules/readable-stream/errors-browser.js"(J,V){"use strict";function p(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r}var b={};function E(n,r,a){a||(a=Error);function o(c,m,h){return typeof r=="string"?r:r(c,m,h)}var s=function(c){p(m,c);function m(h,v,g){return c.call(this,o(h,v,g))||this}return m}(a);s.prototype.name=a.name,s.prototype.code=n,b[n]=s}function k(n,r){if(Array.isArray(n)){var a=n.length;return n=n.map(function(o){return String(o)}),a>2?"one of ".concat(r," ").concat(n.slice(0,a-1).join(", "),", or ")+n[a-1]:a===2?"one of ".concat(r," ").concat(n[0]," or ").concat(n[1]):"of ".concat(r," ").concat(n[0])}else return"of ".concat(r," ").concat(String(n))}function l(n,r,a){return n.substr(!a||a<0?0:+a,r.length)===r}function e(n,r,a){return(a===void 0||a>n.length)&&(a=n.length),n.substring(a-r.length,a)===r}function t(n,r,a){return typeof a!="number"&&(a=0),a+r.length>n.length?!1:n.indexOf(r,a)!==-1}E("ERR_INVALID_OPT_VALUE",function(n,r){return'The value "'+r+'" is invalid for option "'+n+'"'},TypeError),E("ERR_INVALID_ARG_TYPE",function(n,r,a){var o;typeof r=="string"&&l(r,"not ")?(o="must not be",r=r.replace(/^not /,"")):o="must be";var s;if(e(n," argument"))s="The ".concat(n," ").concat(o," ").concat(k(r,"type"));else{var c=t(n,".")?"property":"argument";s='The "'.concat(n,'" ').concat(c," ").concat(o," ").concat(k(r,"type"))}return s+=". Received type ".concat(typeof a),s},TypeError),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),E("ERR_METHOD_NOT_IMPLEMENTED",function(n){return"The "+n+" method is not implemented"}),E("ERR_STREAM_PREMATURE_CLOSE","Premature close"),E("ERR_STREAM_DESTROYED",function(n){return"Cannot call "+n+" after a stream was destroyed"}),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),E("ERR_STREAM_WRITE_AFTER_END","write after end"),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_UNKNOWN_ENCODING",function(n){return"Unknown encoding: "+n},TypeError),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),V.exports.codes=b}}),VT=ze({"node_modules/readable-stream/lib/internal/streams/state.js"(J,V){"use strict";var p=Qv().codes.ERR_INVALID_OPT_VALUE;function b(k,l,e){return k.highWaterMark!=null?k.highWaterMark:l?k[e]:null}function E(k,l,e,t){var n=b(l,t,e);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var r=t?e:"highWaterMark";throw new p(r,n)}return Math.floor(n)}return k.objectMode?16:16*1024}V.exports={getHighWaterMark:E}}}),AB=ze({"node_modules/util-deprecate/browser.js"(J,V){V.exports=p;function p(E,k){if(b("noDeprecation"))return E;var l=!1;function e(){if(!l){if(b("throwDeprecation"))throw new Error(k);b("traceDeprecation")?console.trace(k):console.warn(k),l=!0}return E.apply(this,arguments)}return e}function b(E){try{if(!window.localStorage)return!1}catch{return!1}var k=window.localStorage[E];return k==null?!1:String(k).toLowerCase()==="true"}}}),GT=ze({"node_modules/readable-stream/lib/_stream_writable.js"(J,V){"use strict";V.exports=f;function p(G){var X=this;this.next=null,this.entry=null,this.finish=function(){se(X,G)}}var b;f.WritableState=_;var E={deprecate:AB()},k=LT(),l=$v().Buffer,e=(typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function t(G){return l.from(G)}function n(G){return l.isBuffer(G)||G instanceof e}var r=qT(),a=VT(),o=a.getHighWaterMark,s=Qv().codes,c=s.ERR_INVALID_ARG_TYPE,m=s.ERR_METHOD_NOT_IMPLEMENTED,h=s.ERR_MULTIPLE_CALLBACK,v=s.ERR_STREAM_CANNOT_PIPE,g=s.ERR_STREAM_DESTROYED,i=s.ERR_STREAM_NULL_VALUES,w=s.ERR_STREAM_WRITE_AFTER_END,S=s.ERR_UNKNOWN_ENCODING,M=r.errorOrDestroy;op()(f,k);function C(){}function _(G,X,K){b=b||e0(),G=G||{},typeof K!="boolean"&&(K=X instanceof b),this.objectMode=!!G.objectMode,K&&(this.objectMode=this.objectMode||!!G.writableObjectMode),this.highWaterMark=o(this,G,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var H=G.decodeStrings===!1;this.decodeStrings=!H,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){B(X,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new p(this)}_.prototype.getBuffer=function(){for(var X=this.bufferedRequest,K=[];X;)K.push(X),X=X.next;return K},function(){try{Object.defineProperty(_.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(f,Symbol.hasInstance,{value:function(X){return T.call(this,X)?!0:this!==f?!1:X&&X._writableState instanceof _}})):T=function(X){return X instanceof this};function f(G){b=b||e0();var X=this instanceof b;if(!X&&!T.call(f,this))return new f(G);this._writableState=new _(G,this,X),this.writable=!0,G&&(typeof G.write=="function"&&(this._write=G.write),typeof G.writev=="function"&&(this._writev=G.writev),typeof G.destroy=="function"&&(this._destroy=G.destroy),typeof G.final=="function"&&(this._final=G.final)),k.call(this)}f.prototype.pipe=function(){M(this,new v)};function u(G,X){var K=new w;M(G,K),process.nextTick(X,K)}function A(G,X,K,H){var Y;return K===null?Y=new i:typeof K!="string"&&!X.objectMode&&(Y=new c("chunk",["string","Buffer"],K)),Y?(M(G,Y),process.nextTick(H,Y),!1):!0}f.prototype.write=function(G,X,K){var H=this._writableState,Y=!1,q=!H.objectMode&&n(G);return q&&!l.isBuffer(G)&&(G=t(G)),typeof X=="function"&&(K=X,X=null),q?X="buffer":X||(X=H.defaultEncoding),typeof K!="function"&&(K=C),H.ending?u(this,K):(q||A(this,H,G,K))&&(H.pendingcb++,Y=z(this,H,q,G,X,K)),Y},f.prototype.cork=function(){this._writableState.corked++},f.prototype.uncork=function(){var G=this._writableState;G.corked&&(G.corked--,!G.writing&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&j(this,G))},f.prototype.setDefaultEncoding=function(X){if(typeof X=="string"&&(X=X.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((X+"").toLowerCase())>-1))throw new S(X);return this._writableState.defaultEncoding=X,this},Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(G,X,K){return!G.objectMode&&G.decodeStrings!==!1&&typeof X=="string"&&(X=l.from(X,K)),X}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(G,X,K,H,Y,q){if(!K){var Z=x(X,H,Y);H!==Z&&(K=!0,Y="buffer",H=Z)}var ee=X.objectMode?1:H.length;X.length+=ee;var ae=X.length>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function e(g,i,w){var S=i.length-1;if(S=0?(M>0&&(g.lastNeed=M-1),M):--S=0?(M>0&&(g.lastNeed=M-2),M):--S=0?(M>0&&(M===2?M=0:g.lastNeed=M-3),M):0))}function t(g,i,w){if((i[0]&192)!==128)return g.lastNeed=0,"\uFFFD";if(g.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return g.lastNeed=1,"\uFFFD";if(g.lastNeed>2&&i.length>2&&(i[2]&192)!==128)return g.lastNeed=2,"\uFFFD"}}function n(g){var i=this.lastTotal-this.lastNeed,w=t(this,g,i);if(w!==void 0)return w;if(this.lastNeed<=g.length)return g.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,i,0,g.length),this.lastNeed-=g.length}function r(g,i){var w=e(this,g,i);if(!this.lastNeed)return g.toString("utf8",i);this.lastTotal=w;var S=g.length-(w-this.lastNeed);return g.copy(this.lastChar,0,S),g.toString("utf8",i,S)}function a(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+"\uFFFD":i}function o(g,i){if((g.length-i)%2===0){var w=g.toString("utf16le",i);if(w){var S=w.charCodeAt(w.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",i,g.length-1)}function s(g){var i=g&&g.length?this.write(g):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,w)}return i}function c(g,i){var w=(g.length-i)%3;return w===0?g.toString("base64",i):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",i,g.length-w))}function m(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function h(g){return g.toString(this.encoding)}function v(g){return g&&g.length?this.write(g):""}}}),Ob=ze({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(J,V){"use strict";var p=Qv().codes.ERR_STREAM_PREMATURE_CLOSE;function b(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a0)if(typeof ee!="string"&&!we.objectMode&&Object.getPrototypeOf(ee)!==l.prototype&&(ee=t(ee)),he)we.endEmitted?_(Z,new w):z(Z,we,ee,!0);else if(we.ended)_(Z,new g);else{if(we.destroyed)return!1;we.reading=!1,we.decoder&&!ae?(ee=we.decoder.write(ee),we.objectMode||ee.length!==0?z(Z,we,ee,!1):U(Z,we)):z(Z,we,ee,!1)}else he||(we.reading=!1,U(Z,we))}return!we.ended&&(we.length=O?Z=O:(Z--,Z|=Z>>>1,Z|=Z>>>2,Z|=Z>>>4,Z|=Z>>>8,Z|=Z>>>16,Z++),Z}function B(Z,ee){return Z<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:Z!==Z?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(Z>ee.highWaterMark&&(ee.highWaterMark=D(Z)),Z<=ee.length?Z:ee.ended?ee.length:(ee.needReadable=!0,0))}A.prototype.read=function(Z){a("read",Z),Z=parseInt(Z,10);var ee=this._readableState,ae=Z;if(Z!==0&&(ee.emittedReadable=!1),Z===0&&ee.needReadable&&((ee.highWaterMark!==0?ee.length>=ee.highWaterMark:ee.length>0)||ee.ended))return a("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?H(this):P(this),null;if(Z=B(Z,ee),Z===0&&ee.ended)return ee.length===0&&H(this),null;var he=ee.needReadable;a("need readable",he),(ee.length===0||ee.length-Z0?xe=K(Z,ee):xe=null,xe===null?(ee.needReadable=ee.length<=ee.highWaterMark,Z=0):(ee.length-=Z,ee.awaitDrain=0),ee.length===0&&(ee.ended||(ee.needReadable=!0),ae!==Z&&ee.ended&&H(this)),xe!==null&&this.emit("data",xe),xe};function F(Z,ee){if(a("onEofChunk"),!ee.ended){if(ee.decoder){var ae=ee.decoder.end();ae&&ae.length&&(ee.buffer.push(ae),ee.length+=ee.objectMode?1:ae.length)}ee.ended=!0,ee.sync?P(Z):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,j(Z)))}}function P(Z){var ee=Z._readableState;a("emitReadable",ee.needReadable,ee.emittedReadable),ee.needReadable=!1,ee.emittedReadable||(a("emitReadable",ee.flowing),ee.emittedReadable=!0,process.nextTick(j,Z))}function j(Z){var ee=Z._readableState;a("emitReadable_",ee.destroyed,ee.length,ee.ended),!ee.destroyed&&(ee.length||ee.ended)&&(Z.emit("readable"),ee.emittedReadable=!1),ee.needReadable=!ee.flowing&&!ee.ended&&ee.length<=ee.highWaterMark,X(Z)}function U(Z,ee){ee.readingMore||(ee.readingMore=!0,process.nextTick($,Z,ee))}function $(Z,ee){for(;!ee.reading&&!ee.ended&&(ee.length1&&q(he.pipes,Z)!==-1)&&!Ve&&(a("false write response, pause",he.awaitDrain),he.awaitDrain++),ae.pause())}function _e(Ae){a("onerror",Ae),le(),Z.removeListener("error",_e),E(Z,"error")===0&&_(Z,Ae)}f(Z,"error",_e);function ce(){Z.removeListener("finish",ve),le()}Z.once("close",ce);function ve(){a("onfinish"),Z.removeListener("close",ce),le()}Z.once("finish",ve);function le(){a("unpipe"),ae.unpipe(Z)}return Z.emit("pipe",ae),he.flowing||(a("pipe resume"),ae.resume()),Z};function Q(Z){return function(){var ae=Z._readableState;a("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&E(Z,"data")&&(ae.flowing=!0,X(Z))}}A.prototype.unpipe=function(Z){var ee=this._readableState,ae={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return Z&&Z!==ee.pipes?this:(Z||(Z=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,Z&&Z.emit("unpipe",this,ae),this);if(!Z){var he=ee.pipes,xe=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var we=0;we0,he.flowing!==!1&&this.resume()):Z==="readable"&&!he.endEmitted&&!he.readableListening&&(he.readableListening=he.needReadable=!0,he.flowing=!1,he.emittedReadable=!1,a("on readable",he.length,he.reading),he.length?P(this):he.reading||process.nextTick(ne,this)),ae},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(Z,ee){var ae=k.prototype.removeListener.call(this,Z,ee);return Z==="readable"&&process.nextTick(re,this),ae},A.prototype.removeAllListeners=function(Z){var ee=k.prototype.removeAllListeners.apply(this,arguments);return(Z==="readable"||Z===void 0)&&process.nextTick(re,this),ee};function re(Z){var ee=Z._readableState;ee.readableListening=Z.listenerCount("readable")>0,ee.resumeScheduled&&!ee.paused?ee.flowing=!0:Z.listenerCount("data")>0&&Z.resume()}function ne(Z){a("readable nexttick read 0"),Z.read(0)}A.prototype.resume=function(){var Z=this._readableState;return Z.flowing||(a("resume"),Z.flowing=!Z.readableListening,se(this,Z)),Z.paused=!1,this};function se(Z,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,process.nextTick(G,Z,ee))}function G(Z,ee){a("resume",ee.reading),ee.reading||Z.read(0),ee.resumeScheduled=!1,Z.emit("resume"),X(Z),ee.flowing&&!ee.reading&&Z.read(0)}A.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function X(Z){var ee=Z._readableState;for(a("flow",ee.flowing);ee.flowing&&Z.read()!==null;);}A.prototype.wrap=function(Z){var ee=this,ae=this._readableState,he=!1;Z.on("end",function(){if(a("wrapped end"),ae.decoder&&!ae.ended){var Me=ae.decoder.end();Me&&Me.length&&ee.push(Me)}ee.push(null)}),Z.on("data",function(Me){if(a("wrapped data"),ae.decoder&&(Me=ae.decoder.write(Me)),!(ae.objectMode&&Me==null)&&!(!ae.objectMode&&(!Me||!Me.length))){var Se=ee.push(Me);Se||(he=!0,Z.pause())}});for(var xe in Z)this[xe]===void 0&&typeof Z[xe]=="function"&&(this[xe]=function(Se){return function(){return Z[Se].apply(Z,arguments)}}(xe));for(var we=0;we=ee.length?(ee.decoder?ae=ee.buffer.join(""):ee.buffer.length===1?ae=ee.buffer.first():ae=ee.buffer.concat(ee.length),ee.buffer.clear()):ae=ee.buffer.consume(Z,ee.decoder),ae}function H(Z){var ee=Z._readableState;a("endReadable",ee.endEmitted),ee.endEmitted||(ee.ended=!0,process.nextTick(Y,ee,Z))}function Y(Z,ee){if(a("endReadableNT",Z.endEmitted,Z.length),!Z.endEmitted&&Z.length===0&&(Z.endEmitted=!0,ee.readable=!1,ee.emit("end"),Z.autoDestroy)){var ae=ee._writableState;(!ae||ae.autoDestroy&&ae.finished)&&ee.destroy()}}typeof Symbol=="function"&&(A.from=function(Z,ee){return C===void 0&&(C=EB()),C(A,Z,ee)});function q(Z,ee){for(var ae=0,he=Z.length;ae0;return n(w,M,C,function(_){g||(g=_),_&&i.forEach(r),!M&&(i.forEach(r),v(g))})});return m.reduce(a)}V.exports=s}}),LB=ze({"node_modules/stream-browserify/index.js"(J,V){V.exports=E;var p=jv().EventEmitter,b=op();b(E,p),E.Readable=WT(),E.Writable=GT(),E.Duplex=e0(),E.Transform=YT(),E.PassThrough=kB(),E.finished=Ob(),E.pipeline=CB(),E.Stream=E;function E(){p.call(this)}E.prototype.pipe=function(k,l){var e=this;function t(m){k.writable&&k.write(m)===!1&&e.pause&&e.pause()}e.on("data",t);function n(){e.readable&&e.resume&&e.resume()}k.on("drain",n),!k._isStdio&&(!l||l.end!==!1)&&(e.on("end",a),e.on("close",o));var r=!1;function a(){r||(r=!0,k.end())}function o(){r||(r=!0,typeof k.destroy=="function"&&k.destroy())}function s(m){if(c(),p.listenerCount(this,"error")===0)throw m}e.on("error",s),k.on("error",s);function c(){e.removeListener("data",t),k.removeListener("drain",n),e.removeListener("end",a),e.removeListener("close",o),e.removeListener("error",s),k.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),k.removeListener("close",c)}return e.on("end",c),e.on("close",c),k.on("close",c),k.emit("pipe",e),k}}}),lg=ze({"node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function($){for(var Q=Object.keys($),re={},ne=0;ne=ne)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),G=re[Q];Q"u")return function(){return J.deprecate(U,$).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error($);process.traceDeprecation?console.trace($):console.error($),Q=!0}return U.apply(this,arguments)}return re};var b={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!b[U])if(E.test(U)){var $=process.pid;b[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,$,Q)}}else b[U]=function(){};return b[U]};function l(U,$){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v($)?Q.showHidden=$:$&&J._extend(Q,$),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,$){var Q=l.styles[$];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,$){return U}function n(U){var $={};return U.forEach(function(Q,re){$[Q]=!0}),$}function r(U,$,Q){if(U.customInspect&&$&&A($.inspect)&&$.inspect!==J.inspect&&!($.constructor&&$.constructor.prototype===$)){var re=$.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,$);if(ne)return ne;var se=Object.keys($),G=n(se);if(U.showHidden&&(se=Object.getOwnPropertyNames($)),u($)&&(se.indexOf("message")>=0||se.indexOf("description")>=0))return o($);if(se.length===0){if(A($)){var X=$.name?": "+$.name:"";return U.stylize("[Function"+X+"]","special")}if(_($))return U.stylize(RegExp.prototype.toString.call($),"regexp");if(f($))return U.stylize(Date.prototype.toString.call($),"date");if(u($))return o($)}var K="",H=!1,Y=["{","}"];if(h($)&&(H=!0,Y=["[","]"]),A($)){var q=$.name?": "+$.name:"";K=" [Function"+q+"]"}if(_($)&&(K=" "+RegExp.prototype.toString.call($)),f($)&&(K=" "+Date.prototype.toUTCString.call($)),u($)&&(K=" "+o($)),se.length===0&&(!H||$.length==0))return Y[0]+K+Y[1];if(Q<0)return _($)?U.stylize(RegExp.prototype.toString.call($),"regexp"):U.stylize("[Object]","special");U.seen.push($);var Z;return H?Z=s(U,$,Q,G,se):Z=se.map(function(ee){return c(U,$,Q,G,ee,H)}),U.seen.pop(),m(Z,K,Y)}function a(U,$){if(C($))return U.stylize("undefined","undefined");if(S($)){var Q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w($))return U.stylize(""+$,"number");if(v($))return U.stylize(""+$,"boolean");if(g($))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,$,Q,re,ne){for(var se=[],G=0,X=$.length;G-1&&(se?X=X.split(` -`).map(function(H){return" "+H}).join(` -`).slice(2):X=` -`+X.split(` -`).map(function(H){return" "+H}).join(` -`))):X=U.stylize("[Circular]","special")),C(G)){if(se&&ne.match(/^\d+$/))return X;G=JSON.stringify(""+ne),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=U.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=U.stylize(G,"string"))}return G+": "+X}function m(U,$,Q){var re=0,ne=U.reduce(function(se,G){return re++,G.indexOf(` -`)>=0&&re++,se+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+($===""?"":$+` - `)+" "+U.join(`, - `)+" "+Q[1]:Q[0]+$+" "+U.join(", ")+" "+Q[1]}J.types=NT();function h(U){return Array.isArray(U)}J.isArray=h;function v(U){return typeof U=="boolean"}J.isBoolean=v;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function x(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=x,J.isBuffer=jT();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var U=new Date,$=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),O[U.getMonth()],$].join(" ")}J.log=function(){console.log("%s - %s",D(),J.format.apply(J,arguments))},J.inherits=op(),J._extend=function(U,$){if(!$||!T($))return U;for(var Q=Object.keys($),re=Q.length;re--;)U[Q[re]]=$[Q[re]];return U};function B(U,$){return Object.prototype.hasOwnProperty.call(U,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var Q=$[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,se=new Promise(function(K,H){re=K,ne=H}),G=[],X=0;X"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(C){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},c(C)}var m={},h,v;function g(C,_,T){T||(T=Error);function f(A,x,z){return typeof _=="string"?_:_(A,x,z)}var u=function(A){t(z,A);var x=r(z);function z(I,O,D){var B;return e(this,z),B=x.call(this,f(I,O,D)),B.code=C,B}return E(z)}(T);m[C]=u}function i(C,_){if(Array.isArray(C)){var T=C.length;return C=C.map(function(f){return String(f)}),T>2?"one of ".concat(_," ").concat(C.slice(0,T-1).join(", "),", or ")+C[T-1]:T===2?"one of ".concat(_," ").concat(C[0]," or ").concat(C[1]):"of ".concat(_," ").concat(C[0])}else return"of ".concat(_," ").concat(String(C))}function w(C,_,T){return C.substr(!T||T<0?0:+T,_.length)===_}function S(C,_,T){return(T===void 0||T>C.length)&&(T=C.length),C.substring(T-_.length,T)===_}function M(C,_,T){return typeof T!="number"&&(T=0),T+_.length>C.length?!1:C.indexOf(_,T)!==-1}g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",function(C,_,T){h===void 0&&(h=jb()),h(typeof C=="string","'name' must be a string");var f;typeof _=="string"&&w(_,"not ")?(f="must not be",_=_.replace(/^not /,"")):f="must be";var u;if(S(C," argument"))u="The ".concat(C," ").concat(f," ").concat(i(_,"type"));else{var A=M(C,".")?"property":"argument";u='The "'.concat(C,'" ').concat(A," ").concat(f," ").concat(i(_,"type"))}return u+=". Received type ".concat(p(T)),u},TypeError),g("ERR_INVALID_ARG_VALUE",function(C,_){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";v===void 0&&(v=lg());var f=v.inspect(_);return f.length>128&&(f="".concat(f.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(T,". Received ").concat(f)},TypeError,RangeError),g("ERR_INVALID_RETURN_VALUE",function(C,_,T){var f;return T&&T.constructor&&T.constructor.name?f="instance of ".concat(T.constructor.name):f="type ".concat(p(T)),"Expected ".concat(C,' to be returned from the "').concat(_,'"')+" function but got ".concat(f,".")},TypeError),g("ERR_MISSING_ARGS",function(){for(var C=arguments.length,_=new Array(C),T=0;T0,"At least one arg needs to be specified");var f="The ",u=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),u){case 1:f+="".concat(_[0]," argument");break;case 2:f+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:f+=_.slice(0,u-1).join(", "),f+=", and ".concat(_[u-1]," arguments");break}return"".concat(f," must be specified")},TypeError),V.exports.codes=m}}),PB=ze({"node_modules/assert/build/internal/assert/assertion_error.js"(J,V){"use strict";function p(j,U){var $=Object.keys(j);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(j);U&&(Q=Q.filter(function(re){return Object.getOwnPropertyDescriptor(j,re).enumerable})),$.push.apply($,Q)}return $}function b(j){for(var U=1;U"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 v(j){return Function.toString.call(j).indexOf("[native code]")!==-1}function g(j,U){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,re){return Q.__proto__=re,Q},g(j,U)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($){return $.__proto__||Object.getPrototypeOf($)},i(j)}function w(j){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},w(j)}var S=lg(),M=S.inspect,C=XT(),_=C.codes.ERR_INVALID_ARG_TYPE;function T(j,U,$){return($===void 0||$>j.length)&&($=j.length),j.substring($-U.length,$)===U}function f(j,U){if(U=Math.floor(U),j.length==0||U==0)return"";var $=j.length*U;for(U=Math.floor(Math.log(U)/Math.log(2));U;)j+=j,U--;return j+=j.substring(0,$-j.length),j}var u="",A="",x="",z="",I={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:"},O=10;function D(j){var U=Object.keys(j),$=Object.create(Object.getPrototypeOf(j));return U.forEach(function(Q){$[Q]=j[Q]}),Object.defineProperty($,"message",{value:j.message}),$}function B(j){return M(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(j,U,$){var Q="",re="",ne=0,se="",G=!1,X=B(j),K=X.split(` -`),H=B(U).split(` -`),Y=0,q="";if($==="strictEqual"&&w(j)==="object"&&w(U)==="object"&&j!==null&&U!==null&&($="strictEqualObject"),K.length===1&&H.length===1&&K[0]!==H[0]){var Z=K[0].length+H[0].length;if(Z<=O){if((w(j)!=="object"||j===null)&&(w(U)!=="object"||U===null)&&(j!==0||U!==0))return"".concat(I[$],` - -`)+"".concat(K[0]," !== ").concat(H[0],` -`)}else if($!=="strictEqualObject"){var ee=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Z2&&(q=` - `.concat(f(" ",Y),"^"),Y=0)}}}for(var ae=K[K.length-1],he=H[H.length-1];ae===he&&(Y++<2?se=` - `.concat(ae).concat(se):Q=ae,K.pop(),H.pop(),!(K.length===0||H.length===0));)ae=K[K.length-1],he=H[H.length-1];var xe=Math.max(K.length,H.length);if(xe===0){var we=X.split(` -`);if(we.length>30)for(we[26]="".concat(u,"...").concat(z);we.length>27;)we.pop();return"".concat(I.notIdentical,` - -`).concat(we.join(` +var obe=Object.create;var NG=Object.defineProperty;var sbe=Object.getOwnPropertyDescriptor;var lbe=Object.getOwnPropertyNames;var ube=Object.getPrototypeOf,cbe=Object.prototype.hasOwnProperty;var fbe=(Q,ne)=>()=>{try{return ne||Q((ne={exports:{}}).exports,ne),ne.exports}catch(ge){throw ne=0,ge}};var hbe=(Q,ne,ge,je)=>{if(ne&&typeof ne=="object"||typeof ne=="function")for(let pt of lbe(ne))!cbe.call(Q,pt)&&pt!==ge&&NG(Q,pt,{get:()=>ne[pt],enumerable:!(je=sbe(ne,pt))||je.enumerable});return Q};var dbe=(Q,ne,ge)=>(ge=Q!=null?obe(ube(Q)):{},hbe(ne||!Q||!Q.__esModule?NG(ge,"default",{value:Q,enumerable:!0}):ge,Q));var LQ=fbe((DQ,hA)=>{(function(Q,ne){typeof hA=="object"&&hA.exports?hA.exports=ne():Q.moduleName=ne()})(typeof self<"u"?self:DQ,()=>{"use strict";var Q=(()=>{var ne=Object.create,ge=Object.defineProperty,je=Object.defineProperties,pt=Object.getOwnPropertyDescriptor,Lt=Object.getOwnPropertyDescriptors,rr=Object.getOwnPropertyNames,Ar=Object.getOwnPropertySymbols,Tr=Object.getPrototypeOf,Sa=Object.prototype.hasOwnProperty,ya=Object.prototype.propertyIsEnumerable,Fa=(e,r)=>(r=Symbol[e])?r:Symbol.for("Symbol."+e),Ii=e=>{throw TypeError(e)},vn=(e,r,t)=>r in e?ge(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ja=(e,r)=>{for(var t in r||(r={}))Sa.call(r,t)&&vn(e,t,r[t]);if(Ar)for(var t of Ar(r))ya.call(r,t)&&vn(e,t,r[t]);return e},Ci=(e,r)=>je(e,Lt(r)),Rn=(e,r)=>{var t={};for(var a in e)Sa.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&Ar)for(var a of Ar(e))r.indexOf(a)<0&&ya.call(e,a)&&(t[a]=e[a]);return t},Si=(e,r,t)=>function(){if(t)throw t[0];try{return e&&(r=(0,e[rr(e)[0]])(e=0)),r}catch(i){throw t=[i],i}},ye=(e,r)=>function(){try{return r||(0,e[rr(e)[0]])((r={exports:{}}).exports,r),r.exports}catch(a){throw r=0,a}},rl=(e,r)=>{for(var t in r)ge(e,t,{get:r[t],enumerable:!0})},Vu=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of rr(r))!Sa.call(e,i)&&i!==t&&ge(e,i,{get:()=>r[i],enumerable:!(a=pt(r,i))||a.enumerable});return e},Vs=(e,r,t)=>(t=e!=null?ne(Tr(e)):{},Vu(r||!e||!e.__esModule?ge(t,"default",{value:e,enumerable:!0}):t,e)),On=e=>Vu(ge({},"__esModule",{value:!0}),e),yi=(e,r,t)=>new Promise((a,i)=>{var o=n=>{try{l(t.next(n))}catch(u){i(u)}},s=n=>{try{l(t.throw(n))}catch(u){i(u)}},l=n=>n.done?a(n.value):Promise.resolve(n.value).then(o,s);l((t=t.apply(e,r)).next())}),Ed=function(e,r){this[0]=e,this[1]=r},Nx=e=>{var r=e[Fa("asyncIterator")],t=!1,a,i={};return r==null?(r=e[Fa("iterator")](),a=o=>i[o]=s=>r[o](s)):(r=r.call(e),a=o=>i[o]=s=>{if(t){if(t=!1,o==="throw")throw s;return s}return t=!0,{done:!1,value:new Ed(new Promise(l=>{var n=r[o](s);n instanceof Object||Ii("Object expected"),l(n)}),1)}}),i[Fa("iterator")]=()=>i,a("next"),"throw"in r?a("throw"):i.throw=o=>{throw o},"return"in r&&a("return"),i},jx=ye({"src/version.js"(e){"use strict";e.version="4.1.1"}}),zQ=ye({"node_modules/native-promise-only/lib/npo.src.js"(e,r){(function(a,i,o){i[a]=i[a]||o(),typeof r<"u"&&r.exports&&(r.exports=i[a])})("Promise",typeof window<"u"?window:e,function(){"use strict";var a,i,o,s=Object.prototype.toString,l=typeof setImmediate<"u"?function(x){return setImmediate(x)}:setTimeout;try{Object.defineProperty({},"x",{}),a=function(x,E,M,C){return Object.defineProperty(x,E,{value:M,writable:!0,configurable:C!==!1})}}catch{a=function(E,M,C){return E[M]=C,E}}o=(function(){var x,E,M;function C(w,k){this.fn=w,this.self=k,this.next=void 0}return{add:function(k,T){M=new C(k,T),E?E.next=M:x=M,E=M,M=void 0},drain:function(){var k=x;for(x=E=i=void 0;k;)k.fn.call(k.self),k=k.next}}})();function n(v,x){o.add(v,x),i||(i=l(o.drain))}function u(v){var x,E=typeof v;return v!=null&&(E=="object"||E=="function")&&(x=v.then),typeof x=="function"?x:!1}function c(){for(var v=0;v0&&n(c,E))}catch(M){d.call(new g(E),M)}}}function d(v){var x=this;x.triggered||(x.triggered=!0,x.def&&(x=x.def),x.msg=v,x.state=2,x.chain.length>0&&n(c,x))}function p(v,x,E,M){for(var C=0;Cde?1:ae>=de?0:NaN}t.descending=function(ae,de){return deae?1:de>=ae?0:NaN},t.min=function(ae,de){var Te=-1,Pe=ae.length,ze,Ne;if(arguments.length===1){for(;++Te=Ne){ze=Ne;break}for(;++TeNe&&(ze=Ne)}else{for(;++Te=Ne){ze=Ne;break}for(;++TeNe&&(ze=Ne)}return ze},t.max=function(ae,de){var Te=-1,Pe=ae.length,ze,Ne;if(arguments.length===1){for(;++Te=Ne){ze=Ne;break}for(;++Teze&&(ze=Ne)}else{for(;++Te=Ne){ze=Ne;break}for(;++Teze&&(ze=Ne)}return ze},t.extent=function(ae,de){var Te=-1,Pe=ae.length,ze,Ne,lt;if(arguments.length===1){for(;++Te=Ne){ze=lt=Ne;break}for(;++TeNe&&(ze=Ne),lt=Ne){ze=lt=Ne;break}for(;++TeNe&&(ze=Ne),lt1)return lt/(yt-1)},t.deviation=function(){var ae=t.variance.apply(this,arguments);return ae&&Math.sqrt(ae)};function m(ae){return{left:function(de,Te,Pe,ze){for(arguments.length<3&&(Pe=0),arguments.length<4&&(ze=de.length);Pe>>1;ae(de[Ne],Te)<0?Pe=Ne+1:ze=Ne}return Pe},right:function(de,Te,Pe,ze){for(arguments.length<3&&(Pe=0),arguments.length<4&&(ze=de.length);Pe>>1;ae(de[Ne],Te)>0?ze=Ne:Pe=Ne+1}return Pe}}}var y=m(d);t.bisectLeft=y.left,t.bisect=t.bisectRight=y.right,t.bisector=function(ae){return m(ae.length===1?function(de,Te){return d(ae(de),Te)}:ae)},t.shuffle=function(ae,de,Te){(Pe=arguments.length)<3&&(Te=ae.length,Pe<2&&(de=0));for(var Pe=Te-de,ze,Ne;Pe;)Ne=Math.random()*Pe--|0,ze=ae[Pe+de],ae[Pe+de]=ae[Ne+de],ae[Ne+de]=ze;return ae},t.permute=function(ae,de){for(var Te=de.length,Pe=new Array(Te);Te--;)Pe[Te]=ae[de[Te]];return Pe},t.pairs=function(ae){for(var de=0,Te=ae.length-1,Pe,ze=ae[0],Ne=new Array(Te<0?0:Te);de=0;)for(lt=ae[de],Te=lt.length;--Te>=0;)Ne[--ze]=lt[Te];return Ne};var v=Math.abs;t.range=function(ae,de,Te){if(arguments.length<3&&(Te=1,arguments.length<2&&(de=ae,ae=0)),(de-ae)/Te===1/0)throw new Error("infinite range");var Pe=[],ze=x(v(Te)),Ne=-1,lt;if(ae*=ze,de*=ze,Te*=ze,Te<0)for(;(lt=ae+Te*++Ne)>de;)Pe.push(lt/ze);else for(;(lt=ae+Te*++Ne)=de.length)return ze?ze.call(ae,yt):Pe?yt.sort(Pe):yt;for(var Rt=-1,er=yt.length,Qt=de[Ft++],wr,Cr,ir,pr=new M,xr;++Rt=de.length)return Qe;var Ft=[],Rt=Te[yt++];return Qe.forEach(function(er,Qt){Ft.push({key:er,values:lt(Qt,yt)})}),Rt?Ft.sort(function(er,Qt){return Rt(er.key,Qt.key)}):Ft}return ae.map=function(Qe,yt){return Ne(yt,Qe,0)},ae.entries=function(Qe){return lt(Ne(t.map,Qe,0),0)},ae.key=function(Qe){return de.push(Qe),ae},ae.sortKeys=function(Qe){return Te[de.length-1]=Qe,ae},ae.sortValues=function(Qe){return Pe=Qe,ae},ae.rollup=function(Qe){return ze=Qe,ae},ae},t.set=function(ae){var de=new R;if(ae)for(var Te=0,Pe=ae.length;Te=0&&(Pe=ae.slice(Te+1),ae=ae.slice(0,Te)),ae)return arguments.length<2?this[ae].on(Pe):this[ae].on(Pe,de);if(arguments.length===2){if(de==null)for(ae in this)this.hasOwnProperty(ae)&&this[ae].on(Pe,null);return this}};function G(ae){var de=[],Te=new M;function Pe(){for(var ze=de,Ne=-1,lt=ze.length,Qe;++Ne=0&&(Te=ae.slice(0,de))!=="xmlns"&&(ae=ae.slice(de+1)),re.hasOwnProperty(Te)?{space:re[Te],local:ae}:ae}},j.attr=function(ae,de){if(arguments.length<2){if(typeof ae=="string"){var Te=this.node();return ae=t.ns.qualify(ae),ae.local?Te.getAttributeNS(ae.space,ae.local):Te.getAttribute(ae)}for(de in ae)this.each(se(de,ae[de]));return this}return this.each(se(ae,de))};function se(ae,de){ae=t.ns.qualify(ae);function Te(){this.removeAttribute(ae)}function Pe(){this.removeAttributeNS(ae.space,ae.local)}function ze(){this.setAttribute(ae,de)}function Ne(){this.setAttributeNS(ae.space,ae.local,de)}function lt(){var yt=de.apply(this,arguments);yt==null?this.removeAttribute(ae):this.setAttribute(ae,yt)}function Qe(){var yt=de.apply(this,arguments);yt==null?this.removeAttributeNS(ae.space,ae.local):this.setAttributeNS(ae.space,ae.local,yt)}return de==null?ae.local?Pe:Te:typeof de=="function"?ae.local?Qe:lt:ae.local?Ne:ze}function le(ae){return ae.trim().replace(/\s+/g," ")}j.classed=function(ae,de){if(arguments.length<2){if(typeof ae=="string"){var Te=this.node(),Pe=(ae=fe(ae)).length,ze=-1;if(de=Te.classList){for(;++ze=0;)(Ne=Te[Pe])&&(ze&&ze!==Ne.nextSibling&&ze.parentNode.insertBefore(Ne,ze),ze=Ne);return this},j.sort=function(ae){ae=ce.apply(this,arguments);for(var de=-1,Te=this.length;++de=de&&(de=ze+1);!(yt=lt[de])&&++de0&&(ae=ae.slice(0,ze));var lt=Ze.get(ae);lt&&(ae=lt,Ne=dt);function Qe(){var Rt=this[Pe];Rt&&(this.removeEventListener(ae,Rt,Rt.$),delete this[Pe])}function yt(){var Rt=Ne(de,i(arguments));Qe.call(this),this.addEventListener(ae,this[Pe]=Rt,Rt.$=Te),Rt._=de}function Ft(){var Rt=new RegExp("^__on([^.]+)"+t.requote(ae)+"$"),er;for(var Qt in this)if(er=Qt.match(Rt)){var wr=this[Qt];this.removeEventListener(er[1],wr,wr.$),delete this[Qt]}}return ze?de?yt:Qe:de?B:Ft}var Ze=t.map({mouseenter:"mouseover",mouseleave:"mouseout"});o&&Ze.forEach(function(ae){"on"+ae in o&&Ze.remove(ae)});function Ke(ae,de){return function(Te){var Pe=t.event;t.event=Te,de[0]=this.__data__;try{ae.apply(this,de)}finally{t.event=Pe}}}function dt(ae,de){var Te=Ke(ae,de);return function(Pe){var ze=this,Ne=Pe.relatedTarget;(!Ne||Ne!==ze&&!(Ne.compareDocumentPosition(ze)&8))&&Te.call(ze,Pe)}}var _t,Pt=0;function vt(ae){var de=".dragsuppress-"+ ++Pt,Te="click"+de,Pe=t.select(l(ae)).on("touchmove"+de,$).on("dragstart"+de,$).on("selectstart"+de,$);if(_t==null&&(_t="onselectstart"in ae?!1:I(ae.style,"userSelect")),_t){var ze=s(ae).style,Ne=ze[_t];ze[_t]="none"}return function(lt){if(Pe.on(de,null),_t&&(ze[_t]=Ne),lt){var Qe=function(){Pe.on(Te,null)};Pe.on(Te,function(){$(),Qe()},!0),setTimeout(Qe,0)}}}t.mouse=function(ae){return st(ae,X())};var Tt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function st(ae,de){de.changedTouches&&(de=de.changedTouches[0]);var Te=ae.ownerSVGElement||ae;if(Te.createSVGPoint){var Pe=Te.createSVGPoint();if(Tt<0){var ze=l(ae);if(ze.scrollX||ze.scrollY){Te=t.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ne=Te[0][0].getScreenCTM();Tt=!(Ne.f||Ne.e),Te.remove()}}return Tt?(Pe.x=de.pageX,Pe.y=de.pageY):(Pe.x=de.clientX,Pe.y=de.clientY),Pe=Pe.matrixTransform(ae.getScreenCTM().inverse()),[Pe.x,Pe.y]}var lt=ae.getBoundingClientRect();return[de.clientX-lt.left-ae.clientLeft,de.clientY-lt.top-ae.clientTop]}t.touch=function(ae,de,Te){if(arguments.length<3&&(Te=de,de=X().changedTouches),de){for(var Pe=0,ze=de.length,Ne;Pe0?1:ae<0?-1:0}function at(ae,de,Te){return(de[0]-ae[0])*(Te[1]-ae[1])-(de[1]-ae[1])*(Te[0]-ae[0])}function tt(ae){return ae>1?0:ae<-1?be:Math.acos(ae)}function ct(ae){return ae>1?Ce:ae<-1?-Ce:Math.asin(ae)}function At(ae){return((ae=Math.exp(ae))-1/ae)/2}function ft(ae){return((ae=Math.exp(ae))+1/ae)/2}function qt(ae){return((ae=Math.exp(2*ae))-1)/(ae+1)}function ar(ae){return(ae=Math.sin(ae/2))*ae}var mt=Math.SQRT2,gt=2,St=4;t.interpolateZoom=function(ae,de){var Te=ae[0],Pe=ae[1],ze=ae[2],Ne=de[0],lt=de[1],Qe=de[2],yt=Ne-Te,Ft=lt-Pe,Rt=yt*yt+Ft*Ft,er,Qt;if(Rt0&&(Xa=Xa.transition().duration(lt)),Xa.call(Lr.event)}function bi(){pr&&pr.domain(ir.range().map(function(Xa){return(Xa-ae.x)/ae.k}).map(ir.invert)),Dr&&Dr.domain(xr.range().map(function(Xa){return(Xa-ae.y)/ae.k}).map(xr.invert))}function di(Xa){Qe++||Xa({type:"zoomstart"})}function Tn(Xa){bi(),Xa({type:"zoom",scale:ae.k,translate:[ae.x,ae.y]})}function ci(Xa){--Qe||(Xa({type:"zoomend"}),Te=null)}function cn(){var Xa=this,Mn=Cr.of(Xa,arguments),Dn=0,Mo=t.select(l(Xa)).on(Ft,Ll).on(Rt,Ul),_s=mr(t.mouse(Xa)),Js=vt(Xa);yn.call(Xa),di(Mn);function Ll(){Dn=1,Ua(t.mouse(Xa),_s),Tn(Mn)}function Ul(){Mo.on(Ft,null).on(Rt,null),Js(Dn),ci(Mn)}}function xo(){var Xa=this,Mn=Cr.of(Xa,arguments),Dn={},Mo=0,_s,Js=".zoom-"+t.event.changedTouches[0].identifier,Ll="touchmove"+Js,Ul="touchend"+Js,_u=[],xt=t.select(Xa),nr=vt(Xa);Or(),di(Mn),xt.on(yt,null).on(Qt,Or);function fr(){var Wr=t.touches(Xa);return _s=ae.k,Wr.forEach(function(wa){wa.identifier in Dn&&(Dn[wa.identifier]=mr(wa))}),Wr}function Or(){var Wr=t.event.target;t.select(Wr).on(Ll,Xr).on(Ul,aa),_u.push(Wr);for(var wa=t.event.changedTouches,za=0,Ba=wa.length;za1){var ki=Na[0],ii=Na[1],ma=ki[0]-ii[0],Ir=ki[1]-ii[1];Mo=ma*ma+Ir*Ir}}function Xr(){var Wr=t.touches(Xa),wa,za,Ba,Na;yn.call(Xa);for(var Ji=0,ki=Wr.length;Ji1?1:de,Te=Te<0?0:Te>1?1:Te,ze=Te<=.5?Te*(1+de):Te+de-Te*de,Pe=2*Te-ze;function Ne(Qe){return Qe>360?Qe-=360:Qe<0&&(Qe+=360),Qe<60?Pe+(ze-Pe)*Qe/60:Qe<180?ze:Qe<240?Pe+(ze-Pe)*(240-Qe)/60:Pe}function lt(Qe){return Math.round(Ne(Qe)*255)}return new Nr(lt(ae+120),lt(ae),lt(ae-120))}t.hcl=Fr;function Fr(ae,de,Te){return this instanceof Fr?(this.h=+ae,this.c=+de,void(this.l=+Te)):arguments.length<2?ae instanceof Fr?new Fr(ae.h,ae.c,ae.l):ae instanceof jr?na(ae.l,ae.a,ae.b):na((ae=Ht((ae=t.rgb(ae)).r,ae.g,ae.b)).l,ae.a,ae.b):new Fr(ae,de,Te)}var la=Fr.prototype=new lr;la.brighter=function(ae){return new Fr(this.h,this.c,Math.min(100,this.l+Oa*(arguments.length?ae:1)))},la.darker=function(ae){return new Fr(this.h,this.c,Math.max(0,this.l-Oa*(arguments.length?ae:1)))},la.rgb=function(){return Hr(this.h,this.c,this.l).rgb()};function Hr(ae,de,Te){return isNaN(ae)&&(ae=0),isNaN(de)&&(de=0),new jr(Te,Math.cos(ae*=Fe)*de,Math.sin(ae)*de)}t.lab=jr;function jr(ae,de,Te){return this instanceof jr?(this.l=+ae,this.a=+de,void(this.b=+Te)):arguments.length<2?ae instanceof jr?new jr(ae.l,ae.a,ae.b):ae instanceof Fr?Hr(ae.h,ae.c,ae.l):Ht((ae=Nr(ae)).r,ae.g,ae.b):new jr(ae,de,Te)}var Oa=18,Da=.95047,_i=1,ti=1.08883,Ka=jr.prototype=new lr;Ka.brighter=function(ae){return new jr(Math.min(100,this.l+Oa*(arguments.length?ae:1)),this.a,this.b)},Ka.darker=function(ae){return new jr(Math.max(0,this.l-Oa*(arguments.length?ae:1)),this.a,this.b)},Ka.rgb=function(){return ia(this.l,this.a,this.b)};function ia(ae,de,Te){var Pe=(ae+16)/116,ze=Pe+de/500,Ne=Pe-Te/200;return ze=xi(ze)*Da,Pe=xi(Pe)*_i,Ne=xi(Ne)*ti,new Nr(Qr(3.2404542*ze-1.5371385*Pe-.4985314*Ne),Qr(-.969266*ze+1.8760108*Pe+.041556*Ne),Qr(.0556434*ze-.2040259*Pe+1.0572252*Ne))}function na(ae,de,Te){return ae>0?new Fr(Math.atan2(Te,de)*Je,Math.sqrt(de*de+Te*Te),ae):new Fr(NaN,NaN,ae)}function xi(ae){return ae>.206893034?ae*ae*ae:(ae-4/29)/7.787037}function Yi(ae){return ae>.008856?Math.pow(ae,1/3):7.787037*ae+4/29}function Qr(ae){return Math.round(255*(ae<=.00304?12.92*ae:1.055*Math.pow(ae,1/2.4)-.055))}t.rgb=Nr;function Nr(ae,de,Te){return this instanceof Nr?(this.r=~~ae,this.g=~~de,void(this.b=~~Te)):arguments.length<2?ae instanceof Nr?new Nr(ae.r,ae.g,ae.b):zt(""+ae,Nr,vr):new Nr(ae,de,Te)}function Oe(ae){return new Nr(ae>>16,ae>>8&255,ae&255)}function Ie(ae){return Oe(ae)+""}var Et=Nr.prototype=new lr;Et.brighter=function(ae){ae=Math.pow(.7,arguments.length?ae:1);var de=this.r,Te=this.g,Pe=this.b,ze=30;return!de&&!Te&&!Pe?new Nr(ze,ze,ze):(de&&de>4,Pe=Pe>>4|Pe,ze=yt&240,ze=ze>>4|ze,Ne=yt&15,Ne=Ne<<4|Ne):ae.length===7&&(Pe=(yt&16711680)>>16,ze=(yt&65280)>>8,Ne=yt&255)),de(Pe,ze,Ne))}function Gt(ae,de,Te){var Pe=Math.min(ae/=255,de/=255,Te/=255),ze=Math.max(ae,de,Te),Ne=ze-Pe,lt,Qe,yt=(ze+Pe)/2;return Ne?(Qe=yt<.5?Ne/(ze+Pe):Ne/(2-ze-Pe),ae==ze?lt=(de-Te)/Ne+(de0&&yt<1?0:lt),new dr(lt,Qe,yt)}function Ht(ae,de,Te){ae=Be(ae),de=Be(de),Te=Be(Te);var Pe=Yi((.4124564*ae+.3575761*de+.1804375*Te)/Da),ze=Yi((.2126729*ae+.7151522*de+.072175*Te)/_i),Ne=Yi((.0193339*ae+.119192*de+.9503041*Te)/ti);return jr(116*ze-16,500*(Pe-ze),200*(ze-Ne))}function Be(ae){return(ae/=255)<=.04045?ae/12.92:Math.pow((ae+.055)/1.055,2.4)}function et(ae){var de=parseFloat(ae);return ae.charAt(ae.length-1)==="%"?Math.round(de*2.55):de}var ut=t.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});ut.forEach(function(ae,de){ut.set(ae,Oe(de))});function bt(ae){return typeof ae=="function"?ae:function(){return ae}}t.functor=bt,t.xhr=Ot(P);function Ot(ae){return function(de,Te,Pe){return arguments.length===2&&typeof Te=="function"&&(Pe=Te,Te=null),It(de,Te,ae,Pe)}}function It(ae,de,Te,Pe){var ze={},Ne=t.dispatch("beforesend","progress","load","error"),lt={},Qe=new XMLHttpRequest,yt=null;self.XDomainRequest&&!("withCredentials"in Qe)&&/^(http(s)?:)?\/\//.test(ae)&&(Qe=new XDomainRequest),"onload"in Qe?Qe.onload=Qe.onerror=Ft:Qe.onreadystatechange=function(){Qe.readyState>3&&Ft()};function Ft(){var Rt=Qe.status,er;if(!Rt&&jt(Qe)||Rt>=200&&Rt<300||Rt===304){try{er=Te.call(ze,Qe)}catch(Qt){Ne.error.call(ze,Qt);return}Ne.load.call(ze,er)}else Ne.error.call(ze,Qe)}return Qe.onprogress=function(Rt){var er=t.event;t.event=Rt;try{Ne.progress.call(ze,Qe)}finally{t.event=er}},ze.header=function(Rt,er){return Rt=(Rt+"").toLowerCase(),arguments.length<2?lt[Rt]:(er==null?delete lt[Rt]:lt[Rt]=er+"",ze)},ze.mimeType=function(Rt){return arguments.length?(de=Rt==null?null:Rt+"",ze):de},ze.responseType=function(Rt){return arguments.length?(yt=Rt,ze):yt},ze.response=function(Rt){return Te=Rt,ze},["get","post"].forEach(function(Rt){ze[Rt]=function(){return ze.send.apply(ze,[Rt].concat(i(arguments)))}}),ze.send=function(Rt,er,Qt){if(arguments.length===2&&typeof er=="function"&&(Qt=er,er=null),Qe.open(Rt,ae,!0),de!=null&&!("accept"in lt)&&(lt.accept=de+",*/*"),Qe.setRequestHeader)for(var wr in lt)Qe.setRequestHeader(wr,lt[wr]);return de!=null&&Qe.overrideMimeType&&Qe.overrideMimeType(de),yt!=null&&(Qe.responseType=yt),Qt!=null&&ze.on("error",Qt).on("load",function(Cr){Qt(null,Cr)}),Ne.beforesend.call(ze,Qe),Qe.send(er??null),ze},ze.abort=function(){return Qe.abort(),ze},t.rebind(ze,Ne,"on"),Pe==null?ze:ze.get(Wt(Pe))}function Wt(ae){return ae.length===1?function(de,Te){ae(de==null?Te:null)}:ae}function jt(ae){var de=ae.responseType;return de&&de!=="text"?ae.response:ae.responseText}t.dsv=function(ae,de){var Te=new RegExp('["'+ae+` +]`),Pe=ae.charCodeAt(0);function ze(Ft,Rt,er){arguments.length<3&&(er=Rt,Rt=null);var Qt=It(Ft,de,Rt==null?Ne:lt(Rt),er);return Qt.row=function(wr){return arguments.length?Qt.response((Rt=wr)==null?Ne:lt(wr)):Rt},Qt}function Ne(Ft){return ze.parse(Ft.responseText)}function lt(Ft){return function(Rt){return ze.parse(Rt.responseText,Ft)}}ze.parse=function(Ft,Rt){var er;return ze.parseRows(Ft,function(Qt,wr){if(er)return er(Qt,wr-1);var Cr=function(ir){for(var pr={},xr=Qt.length,Dr=0;Dr=Cr)return Qt;if(Dr)return Dr=!1,er;var ha=ir;if(Ft.charCodeAt(ha)===34){for(var ka=ha;ka++24?(isFinite(de)&&(clearTimeout(ua),ua=setTimeout(Ca,de)),Mr=0):(Mr=1,ra(Ca))}t.timer.flush=function(){Li(),Va()};function Li(){for(var ae=Date.now(),de=sr;de;)ae>=de.t&&de.c(ae-de.t)&&(de.c=null),de=de.n;return ae}function Va(){for(var ae,de=sr,Te=1/0;de;)de.c?(de.t=0;--Qe)ir.push(ze[Ft[er[Qe]][2]]);for(Qe=+wr;Qe1&&at(ae[Te[Pe-2]],ae[Te[Pe-1]],ae[ze])<=0;)--Pe;Te[Pe++]=ze}return Te.slice(0,Pe)}function _n(ae,de){return ae[0]-de[0]||ae[1]-de[1]}t.geom.polygon=function(ae){return N(ae,Zi),ae};var Zi=t.geom.polygon.prototype=[];Zi.area=function(){for(var ae=-1,de=this.length,Te,Pe=this[de-1],ze=0;++aeYe)Qe=Qe.L;else if(lt=de-qn(Qe,Te),lt>Ye){if(!Qe.R){Pe=Qe;break}Qe=Qe.R}else{Ne>-Ye?(Pe=Qe.P,ze=Qe):lt>-Ye?(Pe=Qe,ze=Qe.N):Pe=ze=Qe;break}var yt=ro(ae);if(bn.insert(Pe,yt),!(!Pe&&!ze)){if(Pe===ze){Yn(Pe),ze=ro(Pe.site),bn.insert(yt,ze),yt.edge=ze.edge=yo(Pe.site,yt.site),uo(Pe),uo(ze);return}if(!ze){yt.edge=yo(Pe.site,yt.site);return}Yn(Pe),Yn(ze);var Ft=Pe.site,Rt=Ft.x,er=Ft.y,Qt=ae.x-Rt,wr=ae.y-er,Cr=ze.site,ir=Cr.x-Rt,pr=Cr.y-er,xr=2*(Qt*pr-wr*ir),Dr=Qt*Qt+wr*wr,Lr=ir*ir+pr*pr,mr={x:(pr*Dr-wr*Lr)/xr+Rt,y:(Qt*Lr-ir*Dr)/xr+er};ss(ze.edge,Ft,Cr,mr),yt.edge=yo(Ft,ae,null,mr),ze.edge=yo(ae,Cr,null,mr),uo(Pe),uo(ze)}}function Jn(ae,de){var Te=ae.site,Pe=Te.x,ze=Te.y,Ne=ze-de;if(!Ne)return Pe;var lt=ae.P;if(!lt)return-1/0;Te=lt.site;var Qe=Te.x,yt=Te.y,Ft=yt-de;if(!Ft)return Qe;var Rt=Qe-Pe,er=1/Ne-1/Ft,Qt=Rt/Ft;return er?(-Qt+Math.sqrt(Qt*Qt-2*er*(Rt*Rt/(-2*Ft)-yt+Ft/2+ze-Ne/2)))/er+Pe:(Pe+Qe)/2}function qn(ae,de){var Te=ae.N;if(Te)return Jn(Te,de);var Pe=ae.site;return Pe.y===de?Pe.x:1/0}function Fo(ae){this.site=ae,this.edges=[]}Fo.prototype.prepare=function(){for(var ae=this.edges,de=ae.length,Te;de--;)Te=ae[de].edge,(!Te.b||!Te.a)&&ae.splice(de,1);return ae.sort(wn),ae.length};function zn(ae){for(var de=ae[0][0],Te=ae[1][0],Pe=ae[0][1],ze=ae[1][1],Ne,lt,Qe,yt,Ft=jn,Rt=Ft.length,er,Qt,wr,Cr,ir,pr;Rt--;)if(er=Ft[Rt],!(!er||!er.prepare()))for(wr=er.edges,Cr=wr.length,Qt=0;QtYe||v(yt-lt)>Ye)&&(wr.splice(Qt,0,new oo(sl(er.site,pr,v(Qe-de)Ye?{x:de,y:v(Ne-de)Ye?{x:v(lt-ze)Ye?{x:Te,y:v(Ne-Te)Ye?{x:v(lt-Pe)=-me)){var Qt=yt*yt+Ft*Ft,wr=Rt*Rt+pr*pr,Cr=(pr*Qt-Ft*wr)/er,ir=(yt*wr-Rt*Qt)/er,pr=ir+Qe,xr=Vi.pop()||new os;xr.arc=ae,xr.site=ze,xr.x=Cr+lt,xr.y=pr+Math.sqrt(Cr*Cr+ir*ir),xr.cy=pr,ae.circle=xr;for(var Dr=null,Lr=Hi._;Lr;)if(xr.y0)){if(ir/=wr,wr<0){if(ir0){if(ir>Qt)return;ir>er&&(er=ir)}if(ir=Te-Qe,!(!wr&&ir<0)){if(ir/=wr,wr<0){if(ir>Qt)return;ir>er&&(er=ir)}else if(wr>0){if(ir0)){if(ir/=Cr,Cr<0){if(ir0){if(ir>Qt)return;ir>er&&(er=ir)}if(ir=Pe-yt,!(!Cr&&ir<0)){if(ir/=Cr,Cr<0){if(ir>Qt)return;ir>er&&(er=ir)}else if(Cr>0){if(ir0&&(ze.a={x:Qe+er*wr,y:yt+er*Cr}),Qt<1&&(ze.b={x:Qe+Qt*wr,y:yt+Qt*Cr}),ze}}}}}}function Cn(ae){for(var de=un,Te=go(ae[0][0],ae[0][1],ae[1][0],ae[1][1]),Pe=de.length,ze;Pe--;)ze=de[Pe],(!Xo(ze,ae)||!Te(ze)||v(ze.a.x-ze.b.x)=Ne)return;if(Rt>Qt){if(!Pe)Pe={x:Cr,y:lt};else if(Pe.y>=Qe)return;Te={x:Cr,y:Qe}}else{if(!Pe)Pe={x:Cr,y:Qe};else if(Pe.y1)if(Rt>Qt){if(!Pe)Pe={x:(lt-xr)/pr,y:lt};else if(Pe.y>=Qe)return;Te={x:(Qe-xr)/pr,y:Qe}}else{if(!Pe)Pe={x:(Qe-xr)/pr,y:Qe};else if(Pe.y=Ne)return;Te={x:Ne,y:pr*Ne+xr}}else{if(!Pe)Pe={x:Ne,y:pr*Ne+xr};else if(Pe.x=Rt&&xr.x<=Qt&&xr.y>=er&&xr.y<=wr?[[Rt,wr],[Qt,wr],[Qt,er],[Rt,er]]:[];Dr.point=yt[ir]}),Ft}function Qe(yt){return yt.map(function(Ft,Rt){return{x:Math.round(Pe(Ft,Rt)/Ye)*Ye,y:Math.round(ze(Ft,Rt)/Ye)*Ye,i:Rt}})}return lt.links=function(yt){return Jl(Qe(yt)).edges.filter(function(Ft){return Ft.l&&Ft.r}).map(function(Ft){return{source:yt[Ft.l.i],target:yt[Ft.r.i]}})},lt.triangles=function(yt){var Ft=[];return Jl(Qe(yt)).cells.forEach(function(Rt,er){for(var Qt=Rt.site,wr=Rt.edges.sort(wn),Cr=-1,ir=wr.length,pr,xr,Dr=wr[ir-1].edge,Lr=Dr.l===Qt?Dr.r:Dr.l;++CrLr&&(Lr=Rt.x),Rt.y>mr&&(mr=Rt.y),wr.push(Rt.x),Cr.push(Rt.y);else for(ir=0;irLr&&(Lr=ha),ka>mr&&(mr=ka),wr.push(ha),Cr.push(ka)}var Ua=Lr-xr,ei=mr-Dr;Ua>ei?mr=Dr+Ua:Lr=xr+ei;function bi(ci,cn,xo,js,Bo,Xa,Mn,Dn){if(!(isNaN(xo)||isNaN(js)))if(ci.leaf){var Mo=ci.x,_s=ci.y;if(Mo!=null)if(v(Mo-xo)+v(_s-js)<.01)di(ci,cn,xo,js,Bo,Xa,Mn,Dn);else{var Js=ci.point;ci.x=ci.y=ci.point=null,di(ci,Js,Mo,_s,Bo,Xa,Mn,Dn),di(ci,cn,xo,js,Bo,Xa,Mn,Dn)}else ci.x=xo,ci.y=js,ci.point=cn}else di(ci,cn,xo,js,Bo,Xa,Mn,Dn)}function di(ci,cn,xo,js,Bo,Xa,Mn,Dn){var Mo=(Bo+Mn)*.5,_s=(Xa+Dn)*.5,Js=xo>=Mo,Ll=js>=_s,Ul=Ll<<1|Js;ci.leaf=!1,ci=ci.nodes[Ul]||(ci.nodes[Ul]=Ju()),Js?Bo=Mo:Mn=Mo,Ll?Xa=_s:Dn=_s,bi(ci,cn,xo,js,Bo,Xa,Mn,Dn)}var Tn=Ju();if(Tn.add=function(ci){bi(Tn,ci,+er(ci,++ir),+Qt(ci,ir),xr,Dr,Lr,mr)},Tn.visit=function(ci){Ol(ci,Tn,xr,Dr,Lr,mr)},Tn.find=function(ci){return Yc(Tn,ci[0],ci[1],xr,Dr,Lr,mr)},ir=-1,de==null){for(;++irNe||Qt>lt||wr=ha,ei=Te>=ka,bi=ei<<1|Ua,di=bi+4;biTe&&(Ne=de.slice(Te,Ne),Qe[lt]?Qe[lt]+=Ne:Qe[++lt]=Ne),(Pe=Pe[0])===(ze=ze[0])?Qe[lt]?Qe[lt]+=ze:Qe[++lt]=ze:(Qe[++lt]=null,yt.push({i:lt,x:cs(Pe,ze)})),Te=Xc.lastIndex;return Te=0&&!(Pe=t.interpolators[Te](ae,de)););return Pe}t.interpolators=[function(ae,de){var Te=typeof de;return(Te==="string"?ut.has(de.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(de)?Qu:Qo:de instanceof lr?Qu:Array.isArray(de)?kc:Te==="object"&&isNaN(de)?Sl:cs)(ae,de)}],t.interpolateArray=kc;function kc(ae,de){var Te=[],Pe=[],ze=ae.length,Ne=de.length,lt=Math.min(ae.length,de.length),Qe;for(Qe=0;Qe=0?ae.slice(0,de):ae,Pe=de>=0?ae.slice(de+1):"in";return Te=td.get(Te)||ed,Pe=bp.get(Pe)||P,t0(Pe(Te.apply(null,a.call(arguments,1))))};function t0(ae){return function(de){return de<=0?0:de>=1?1:ae(de)}}function ec(ae){return function(de){return 1-ae(1-de)}}function ys(ae){return function(de){return .5*(de<.5?ae(2*de):2-ae(2-2*de))}}function rd(ae){return ae*ae}function Hf(ae){return ae*ae*ae}function Kc(ae){if(ae<=0)return 0;if(ae>=1)return 1;var de=ae*ae,Te=de*ae;return 4*(ae<.5?Te:3*(ae-de)+Te-.75)}function ad(ae){return function(de){return Math.pow(de,ae)}}function Jc(ae){return 1-Math.cos(ae*Ce)}function Tf(ae){return Math.pow(2,10*(ae-1))}function tc(ae){return 1-Math.sqrt(1-ae*ae)}function Wf(ae,de){var Te;return arguments.length<2&&(de=.45),arguments.length?Te=de/Ee*Math.asin(1/ae):(ae=1,Te=de/4),function(Pe){return 1+ae*Math.pow(2,-10*Pe)*Math.sin((Pe-Te)*Ee/de)}}function xh(ae){return ae||(ae=1.70158),function(de){return de*de*((ae+1)*de-ae)}}function Qc(ae){return ae<1/2.75?7.5625*ae*ae:ae<2/2.75?7.5625*(ae-=1.5/2.75)*ae+.75:ae<2.5/2.75?7.5625*(ae-=2.25/2.75)*ae+.9375:7.5625*(ae-=2.625/2.75)*ae+.984375}t.interpolateHcl=Wd;function Wd(ae,de){ae=t.hcl(ae),de=t.hcl(de);var Te=ae.h,Pe=ae.c,ze=ae.l,Ne=de.h-Te,lt=de.c-Pe,Qe=de.l-ze;return isNaN(lt)&&(lt=0,Pe=isNaN(Pe)?de.c:Pe),isNaN(Ne)?(Ne=0,Te=isNaN(Te)?de.h:Te):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(yt){return Hr(Te+Ne*yt,Pe+lt*yt,ze+Qe*yt)+""}}t.interpolateHsl=bh;function bh(ae,de){ae=t.hsl(ae),de=t.hsl(de);var Te=ae.h,Pe=ae.s,ze=ae.l,Ne=de.h-Te,lt=de.s-Pe,Qe=de.l-ze;return isNaN(lt)&&(lt=0,Pe=isNaN(Pe)?de.s:Pe),isNaN(Ne)?(Ne=0,Te=isNaN(Te)?de.h:Te):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(yt){return vr(Te+Ne*yt,Pe+lt*yt,ze+Qe*yt)+""}}t.interpolateLab=wp;function wp(ae,de){ae=t.lab(ae),de=t.lab(de);var Te=ae.l,Pe=ae.a,ze=ae.b,Ne=de.l-Te,lt=de.a-Pe,Qe=de.b-ze;return function(yt){return ia(Te+Ne*yt,Pe+lt*yt,ze+Qe*yt)+""}}t.interpolateRound=rc;function rc(ae,de){return de-=ae,function(Te){return Math.round(ae+de*Te)}}t.transform=function(ae){var de=o.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(Te){if(Te!=null){de.setAttribute("transform",Te);var Pe=de.transform.baseVal.consolidate()}return new id(Pe?Pe.matrix:$f)})(ae)};function id(ae){var de=[ae.a,ae.b],Te=[ae.c,ae.d],Pe=wh(de),ze=Iu(de,Te),Ne=wh(Nl(Te,de,-ze))||0;de[0]*Te[1]180?de+=360:de-ae>180&&(ae+=360),Pe.push({i:Te.push(ac(Te)+"rotate(",null,")")-2,x:cs(ae,de)})):de&&Te.push(ac(Te)+"rotate("+de+")")}function Ah(ae,de,Te,Pe){ae!==de?Pe.push({i:Te.push(ac(Te)+"skewX(",null,")")-2,x:cs(ae,de)}):de&&Te.push(ac(Te)+"skewX("+de+")")}function nd(ae,de,Te,Pe){if(ae[0]!==de[0]||ae[1]!==de[1]){var ze=Te.push(ac(Te)+"scale(",null,",",null,")");Pe.push({i:ze-4,x:cs(ae[0],de[0])},{i:ze-2,x:cs(ae[1],de[1])})}else(de[0]!==1||de[1]!==1)&&Te.push(ac(Te)+"scale("+de+")")}function ef(ae,de){var Te=[],Pe=[];return ae=t.transform(ae),de=t.transform(de),Yf(ae.translate,de.translate,Te,Pe),Xf(ae.rotate,de.rotate,Te,Pe),Ah(ae.skew,de.skew,Te,Pe),nd(ae.scale,de.scale,Te,Pe),ae=de=null,function(ze){for(var Ne=-1,lt=Pe.length,Qe;++Ne0?Ne=mr:(Te.c=null,Te.t=NaN,Te=null,de.end({type:"end",alpha:Ne=0})):mr>0&&(de.start({type:"start",alpha:Ne=mr}),Te=ni(ae.tick)),ae):Ne},ae.start=function(){var mr,ha=wr.length,ka=Cr.length,Ua=Pe[0],ei=Pe[1],bi,di;for(mr=0;mr=0;)Ne.push(Rt=Ft[yt]),Rt.parent=Qe,Rt.depth=Qe.depth+1;Te&&(Qe.value=0),Qe.children=Ft}else Te&&(Qe.value=+Te.call(Pe,Qe,Qe.depth)||0),delete Qe.children;return eu(ze,function(er){var Qt,wr;ae&&(Qt=er.children)&&Qt.sort(ae),Te&&(wr=er.parent)&&(wr.value+=er.value)}),lt}return Pe.sort=function(ze){return arguments.length?(ae=ze,Pe):ae},Pe.children=function(ze){return arguments.length?(de=ze,Pe):de},Pe.value=function(ze){return arguments.length?(Te=ze,Pe):Te},Pe.revalue=function(ze){return Te&&(Ql(ze,function(Ne){Ne.children&&(Ne.value=0)}),eu(ze,function(Ne){var lt;Ne.children||(Ne.value=+Te.call(Pe,Ne,Ne.depth)||0),(lt=Ne.parent)&&(lt.value+=Ne.value)})),ze},Pe};function nc(ae,de){return t.rebind(ae,de,"sort","children","value"),ae.nodes=ae,ae.links=gu,ae}function Ql(ae,de){for(var Te=[ae];(ae=Te.pop())!=null;)if(de(ae),(ze=ae.children)&&(Pe=ze.length))for(var Pe,ze;--Pe>=0;)Te.push(ze[Pe])}function eu(ae,de){for(var Te=[ae],Pe=[];(ae=Te.pop())!=null;)if(Pe.push(ae),(lt=ae.children)&&(Ne=lt.length))for(var ze=-1,Ne,lt;++zeze&&(ze=Qe),Pe.push(Qe)}for(lt=0;ltPe&&(Te=de,Pe=ze);return Te}function Sh(ae){return ae.reduce(Sf,0)}function Sf(ae,de){return ae+de[1]}t.layout.histogram=function(){var ae=!0,de=Number,Te=Dc,Pe=kh;function ze(Ne,Qt){for(var Qe=[],yt=Ne.map(de,this),Ft=Te.call(this,yt,Qt),Rt=Pe.call(this,Ft,yt,Qt),er,Qt=-1,wr=yt.length,Cr=Rt.length-1,ir=ae?1:1/wr,pr;++Qt0)for(Qt=-1;++Qt=Ft[0]&&pr<=Ft[1]&&(er=Qe[t.bisect(Rt,pr,1,Cr)-1],er.y+=ir,er.push(Ne[Qt]));return Qe}return ze.value=function(Ne){return arguments.length?(de=Ne,ze):de},ze.range=function(Ne){return arguments.length?(Te=bt(Ne),ze):Te},ze.bins=function(Ne){return arguments.length?(Pe=typeof Ne=="number"?function(lt){return kf(lt,Ne)}:bt(Ne),ze):Pe},ze.frequency=function(Ne){return arguments.length?(ae=!!Ne,ze):ae},ze};function kh(ae,de){return kf(ae,Math.ceil(Math.log(de.length)/Math.LN2+1))}function kf(ae,de){for(var Te=-1,Pe=+ae[0],ze=(ae[1]-Pe)/de,Ne=[];++Te<=de;)Ne[Te]=ze*Te+Pe;return Ne}function Dc(ae){return[t.min(ae),t.max(ae)]}t.layout.pack=function(){var ae=t.layout.hierarchy().sort(Qf),de=0,Te=[1,1],Pe;function ze(Ne,lt){var Qe=ae.call(this,Ne,lt),yt=Qe[0],Ft=Te[0],Rt=Te[1],er=Pe==null?Math.sqrt:typeof Pe=="function"?Pe:function(){return Pe};if(yt.x=yt.y=0,eu(yt,function(wr){wr.r=+er(wr.value)}),eu(yt,Sp),de){var Qt=de*(Pe?1:Math.max(2*yt.r/Ft,2*yt.r/Rt))/2;eu(yt,function(wr){wr.r+=Qt}),eu(yt,Sp),eu(yt,function(wr){wr.r-=Qt})}return ld(yt,Ft/2,Rt/2,Pe?1:1/Math.max(2*yt.r/Ft,2*yt.r/Rt)),Qe}return ze.size=function(Ne){return arguments.length?(Te=Ne,ze):Te},ze.radius=function(Ne){return arguments.length?(Pe=Ne==null||typeof Ne=="function"?Ne:+Ne,ze):Pe},ze.padding=function(Ne){return arguments.length?(de=+Ne,ze):de},nc(ze,ae)};function Qf(ae,de){return ae.value-de.value}function Ch(ae,de){var Te=ae._pack_next;ae._pack_next=de,de._pack_prev=ae,de._pack_next=Te,Te._pack_prev=de}function Zd(ae,de){ae._pack_next=de,de._pack_prev=ae}function sd(ae,de){var Te=de.x-ae.x,Pe=de.y-ae.y,ze=ae.r+de.r;return .999*ze*ze>Te*Te+Pe*Pe}function Sp(ae){if(!(de=ae.children)||!(Qt=de.length))return;var de,Te=1/0,Pe=-1/0,ze=1/0,Ne=-1/0,lt,Qe,yt,Ft,Rt,er,Qt;function wr(mr){Te=Math.min(mr.x-mr.r,Te),Pe=Math.max(mr.x+mr.r,Pe),ze=Math.min(mr.y-mr.r,ze),Ne=Math.max(mr.y+mr.r,Ne)}if(de.forEach(Dh),lt=de[0],lt.x=-lt.r,lt.y=0,wr(lt),Qt>1&&(Qe=de[1],Qe.x=Qe.r,Qe.y=0,wr(Qe),Qt>2))for(yt=de[2],Ks(lt,Qe,yt),wr(yt),Ch(lt,yt),lt._pack_prev=yt,Ch(yt,Qe),Qe=lt._pack_next,Ft=3;Ftpr.x&&(pr=ha),ha.depth>xr.depth&&(xr=ha)});var Dr=de(ir,pr)/2-ir.x,Lr=Te[0]/(pr.x+de(pr,ir)/2+Dr),mr=Te[1]/(xr.depth||1);Ql(wr,function(ha){ha.x=(ha.x+Dr)*Lr,ha.y=ha.depth*mr})}return Qt}function Ne(Rt){for(var er={A:null,children:[Rt]},Qt=[er],wr;(wr=Qt.pop())!=null;)for(var Cr=wr.children,ir,pr=0,xr=Cr.length;pr0&&(Fh(it(ir,Rt,Qt),Rt,ha),xr+=ha,Dr+=ha),Lr+=ir.m,xr+=wr.m,mr+=pr.m,Dr+=Cr.m;ir&&!ud(Cr)&&(Cr.t=ir,Cr.m+=Lr-Dr),wr&&!Lh(pr)&&(pr.t=wr,pr.m+=xr-mr,Qt=Rt)}return Qt}function Ft(Rt){Rt.x*=Te[0],Rt.y=Rt.depth*Te[1]}return ze.separation=function(Rt){return arguments.length?(de=Rt,ze):de},ze.size=function(Rt){return arguments.length?(Pe=(Te=Rt)==null?Ft:null,ze):Pe?null:Te},ze.nodeSize=function(Rt){return arguments.length?(Pe=(Te=Rt)==null?null:Ft,ze):Pe?Te:null},nc(ze,ae)};function yu(ae,de){return ae.parent==de.parent?1:2}function Lh(ae){var de=ae.children;return de.length?de[0]:ae.t}function ud(ae){var de=ae.children,Te;return(Te=de.length)?de[Te-1]:ae.t}function Fh(ae,de,Te){var Pe=Te/(de.i-ae.i);de.c-=Pe,de.s+=Te,ae.c+=Pe,de.z+=Te,de.m+=Te}function eh(ae){for(var de=0,Te=0,Pe=ae.children,ze=Pe.length,Ne;--ze>=0;)Ne=Pe[ze],Ne.z+=de,Ne.m+=de,de+=Ne.s+(Te+=Ne.c)}function it(ae,de,Te){return ae.a.parent===de.parent?ae.a:Te}t.layout.cluster=function(){var ae=t.layout.hierarchy().sort(null).value(null),de=yu,Te=[1,1],Pe=!1;function ze(Ne,lt){var Qe=ae.call(this,Ne,lt),yt=Qe[0],Ft,Rt=0;eu(yt,function(ir){var pr=ir.children;pr&&pr.length?(ir.x=$t(pr),ir.y=wt(pr)):(ir.x=Ft?Rt+=de(ir,Ft):0,ir.y=0,Ft=ir)});var er=Bt(yt),Qt=cr(yt),wr=er.x-de(er,Qt)/2,Cr=Qt.x+de(Qt,er)/2;return eu(yt,Pe?function(ir){ir.x=(ir.x-yt.x)*Te[0],ir.y=(yt.y-ir.y)*Te[1]}:function(ir){ir.x=(ir.x-wr)/(Cr-wr)*Te[0],ir.y=(1-(yt.y?ir.y/yt.y:1))*Te[1]}),Qe}return ze.separation=function(Ne){return arguments.length?(de=Ne,ze):de},ze.size=function(Ne){return arguments.length?(Pe=(Te=Ne)==null,ze):Pe?null:Te},ze.nodeSize=function(Ne){return arguments.length?(Pe=(Te=Ne)!=null,ze):Pe?Te:null},nc(ze,ae)};function wt(ae){return 1+t.max(ae,function(de){return de.y})}function $t(ae){return ae.reduce(function(de,Te){return de+Te.x},0)/ae.length}function Bt(ae){var de=ae.children;return de&&de.length?Bt(de[0]):ae}function cr(ae){var de=ae.children,Te;return de&&(Te=de.length)?cr(de[Te-1]):ae}t.layout.treemap=function(){var ae=t.layout.hierarchy(),de=Math.round,Te=[1,1],Pe=null,ze=Sr,Ne=!1,lt,Qe="squarify",yt=.5*(1+Math.sqrt(5));function Ft(ir,pr){for(var xr=-1,Dr=ir.length,Lr,mr;++xr0;)Dr.push(mr=Lr[ei-1]),Dr.area+=mr.area,Qe!=="squarify"||(ka=Qt(Dr,Ua))<=ha?(Lr.pop(),ha=ka):(Dr.area-=Dr.pop().area,wr(Dr,Ua,xr,!1),Ua=Math.min(xr.dx,xr.dy),Dr.length=Dr.area=0,ha=1/0);Dr.length&&(wr(Dr,Ua,xr,!0),Dr.length=Dr.area=0),pr.forEach(Rt)}}function er(ir){var pr=ir.children;if(pr&&pr.length){var xr=ze(ir),Dr=pr.slice(),Lr,mr=[];for(Ft(Dr,xr.dx*xr.dy/ir.value),mr.area=0;Lr=Dr.pop();)mr.push(Lr),mr.area+=Lr.area,Lr.z!=null&&(wr(mr,Lr.z?xr.dx:xr.dy,xr,!Dr.length),mr.length=mr.area=0);pr.forEach(er)}}function Qt(ir,pr){for(var xr=ir.area,Dr,Lr=0,mr=1/0,ha=-1,ka=ir.length;++haLr&&(Lr=Dr));return xr*=xr,pr*=pr,xr?Math.max(pr*Lr*yt/xr,xr/(pr*mr*yt)):1/0}function wr(ir,pr,xr,Dr){var Lr=-1,mr=ir.length,ha=xr.x,ka=xr.y,Ua=pr?de(ir.area/pr):0,ei;if(pr==xr.dx){for((Dr||Ua>xr.dy)&&(Ua=xr.dy);++Lrxr.dx)&&(Ua=xr.dx);++Lr1);return ae+de*Pe*Math.sqrt(-2*Math.log(Ne)/Ne)}},logNormal:function(){var ae=t.random.normal.apply(t,arguments);return function(){return Math.exp(ae())}},bates:function(ae){var de=t.random.irwinHall(ae);return function(){return de()/ae}},irwinHall:function(ae){return function(){for(var de=0,Te=0;Te2?da:va,Ft=Pe?Cc:od;return ze=yt(ae,de,Ft,Te),Ne=yt(de,ae,Ft,Zc),Qe}function Qe(yt){return ze(yt)}return Qe.invert=function(yt){return Ne(yt)},Qe.domain=function(yt){return arguments.length?(ae=yt.map(Number),lt()):ae},Qe.range=function(yt){return arguments.length?(de=yt,lt()):de},Qe.rangeRound=function(yt){return Qe.range(yt).interpolate(rc)},Qe.clamp=function(yt){return arguments.length?(Pe=yt,lt()):Pe},Qe.interpolate=function(yt){return arguments.length?(Te=yt,lt()):Te},Qe.ticks=function(yt){return ji(ae,yt)},Qe.tickFormat=function(yt,Ft){return d3_scale_linearTickFormat(ae,yt,Ft)},Qe.nice=function(yt){return pi(ae,yt),lt()},Qe.copy=function(){return La(ae,de,Te,Pe)},lt()}function gi(ae,de){return t.rebind(ae,de,"range","rangeRound","interpolate","clamp")}function pi(ae,de){return Rr(ae,Gr(Pi(ae,de)[2])),Rr(ae,Gr(Pi(ae,de)[2])),ae}function Pi(ae,de){de==null&&(de=10);var Te=qr(ae),Pe=Te[1]-Te[0],ze=Math.pow(10,Math.floor(Math.log(Pe/de)/Math.LN10)),Ne=de/Pe*ze;return Ne<=.15?ze*=10:Ne<=.35?ze*=5:Ne<=.75&&(ze*=2),Te[0]=Math.ceil(Te[0]/ze)*ze,Te[1]=Math.floor(Te[1]/ze)*ze+ze*.5,Te[2]=ze,Te}function ji(ae,de){return t.range.apply(t,Pi(ae,de))}var Ra={s:1,g:1,p:1,r:1,e:1};function Ga(ae){return-Math.floor(Math.log(ae)/Math.LN10+.01)}function Ki(ae,de){var Te=Ga(de[2]);return ae in Ra?Math.abs(Te-Ga(Math.max(v(de[0]),v(de[1]))))+ +(ae!=="e"):Te-(ae==="%")*2}t.scale.log=function(){return pn(t.scale.linear().domain([0,1]),10,!0,[1,10])};function pn(ae,de,Te,Pe){function ze(Qe){return(Te?Math.log(Qe<0?0:Qe):-Math.log(Qe>0?0:-Qe))/Math.log(de)}function Ne(Qe){return Te?Math.pow(de,Qe):-Math.pow(de,-Qe)}function lt(Qe){return ae(ze(Qe))}return lt.invert=function(Qe){return Ne(ae.invert(Qe))},lt.domain=function(Qe){return arguments.length?(Te=Qe[0]>=0,ae.domain((Pe=Qe.map(Number)).map(ze)),lt):Pe},lt.base=function(Qe){return arguments.length?(de=+Qe,ae.domain(Pe.map(ze)),lt):de},lt.nice=function(){var Qe=Rr(Pe.map(ze),Te?Math:ao);return ae.domain(Qe),Pe=Qe.map(Ne),lt},lt.ticks=function(){var Qe=qr(Pe),yt=[],Ft=Qe[0],Rt=Qe[1],er=Math.floor(ze(Ft)),Qt=Math.ceil(ze(Rt)),wr=de%1?2:de;if(isFinite(Qt-er)){if(Te){for(;er0;Cr--)yt.push(Ne(er)*Cr);for(er=0;yt[er]Rt;Qt--);yt=yt.slice(er,Qt)}return yt},lt.copy=function(){return pn(ae.copy(),de,Te,Pe)},gi(lt,ae)}var ao={floor:function(ae){return-Math.ceil(-ae)},ceil:function(ae){return-Math.floor(-ae)}};t.scale.pow=function(){return Co(t.scale.linear(),1,[0,1])};function Co(ae,de,Te){var Pe=ho(de),ze=ho(1/de);function Ne(lt){return ae(Pe(lt))}return Ne.invert=function(lt){return ze(ae.invert(lt))},Ne.domain=function(lt){return arguments.length?(ae.domain((Te=lt.map(Number)).map(Pe)),Ne):Te},Ne.ticks=function(lt){return ji(Te,lt)},Ne.tickFormat=function(lt,Qe){return d3_scale_linearTickFormat(Te,lt,Qe)},Ne.nice=function(lt){return Ne.domain(pi(Te,lt))},Ne.exponent=function(lt){return arguments.length?(Pe=ho(de=lt),ze=ho(1/de),ae.domain(Te.map(Pe)),Ne):de},Ne.copy=function(){return Co(ae.copy(),de,Te)},gi(Ne,ae)}function ho(ae){return function(de){return de<0?-Math.pow(-de,ae):Math.pow(de,ae)}}t.scale.sqrt=function(){return t.scale.pow().exponent(.5)},t.scale.ordinal=function(){return No([],{t:"range",a:[[]]})};function No(ae,de){var Te,Pe,ze;function Ne(Qe){return Pe[((Te.get(Qe)||(de.t==="range"?Te.set(Qe,ae.push(Qe)):NaN))-1)%Pe.length]}function lt(Qe,yt){return t.range(ae.length).map(function(Ft){return Qe+yt*Ft})}return Ne.domain=function(Qe){if(!arguments.length)return ae;ae=[],Te=new M;for(var yt=-1,Ft=Qe.length,Rt;++yt0?Te[Ne-1]:ae[0],NeQt?0:1;if(Rt=De)return yt(Rt,Cr)+(Ft?yt(Ft,1-Cr):"")+"Z";var ir,pr,xr,Dr,Lr=0,mr=0,ha,ka,Ua,ei,bi,di,Tn,ci,cn=[];if((Dr=(+lt.apply(this,arguments)||0)/2)&&(xr=Pe===zu?Math.sqrt(Ft*Ft+Rt*Rt):+Pe.apply(this,arguments),Cr||(mr*=-1),Rt&&(mr=ct(xr/Rt*Math.sin(Dr))),Ft&&(Lr=ct(xr/Ft*Math.sin(Dr)))),Rt){ha=Rt*Math.cos(er+mr),ka=Rt*Math.sin(er+mr),Ua=Rt*Math.cos(Qt-mr),ei=Rt*Math.sin(Qt-mr);var xo=Math.abs(Qt-er-2*mr)<=be?0:1;if(mr&&Cf(ha,ka,Ua,ei)===Cr^xo){var js=(er+Qt)/2;ha=Rt*Math.cos(js),ka=Rt*Math.sin(js),Ua=ei=null}}else ha=ka=0;if(Ft){bi=Ft*Math.cos(Qt-Lr),di=Ft*Math.sin(Qt-Lr),Tn=Ft*Math.cos(er+Lr),ci=Ft*Math.sin(er+Lr);var Bo=Math.abs(er-Qt+2*Lr)<=be?0:1;if(Lr&&Cf(bi,di,Tn,ci)===1-Cr^Bo){var Xa=(er+Qt)/2;bi=Ft*Math.cos(Xa),di=Ft*Math.sin(Xa),Tn=ci=null}}else bi=di=0;if(wr>Ye&&(ir=Math.min(Math.abs(Rt-Ft)/2,+Te.apply(this,arguments)))>.001){pr=Ft0?0:1}function Jd(ae,de,Te,Pe,ze){var Ne=ae[0]-de[0],lt=ae[1]-de[1],Qe=(ze?Pe:-Pe)/Math.sqrt(Ne*Ne+lt*lt),yt=Qe*lt,Ft=-Qe*Ne,Rt=ae[0]+yt,er=ae[1]+Ft,Qt=de[0]+yt,wr=de[1]+Ft,Cr=(Rt+Qt)/2,ir=(er+wr)/2,pr=Qt-Rt,xr=wr-er,Dr=pr*pr+xr*xr,Lr=Te-Pe,mr=Rt*wr-Qt*er,ha=(xr<0?-1:1)*Math.sqrt(Math.max(0,Lr*Lr*Dr-mr*mr)),ka=(mr*xr-pr*ha)/Dr,Ua=(-mr*pr-xr*ha)/Dr,ei=(mr*xr+pr*ha)/Dr,bi=(-mr*pr+xr*ha)/Dr,di=ka-Cr,Tn=Ua-ir,ci=ei-Cr,cn=bi-ir;return di*di+Tn*Tn>ci*ci+cn*cn&&(ka=ei,Ua=bi),[[ka-yt,Ua-Ft],[ka*Te/Lr,Ua*Te/Lr]]}function Ph(){return!0}function kp(ae){var de=dn,Te=rn,Pe=Ph,ze=ru,Ne=ze.key,lt=.7;function Qe(yt){var Ft=[],Rt=[],er=-1,Qt=yt.length,wr,Cr=bt(de),ir=bt(Te);function pr(){Ft.push("M",ze(ae(Rt),lt))}for(;++er1?ae.join("L"):ae+"Z"}function Cp(ae){return ae.join("L")+"Z"}function th(ae){for(var de=0,Te=ae.length,Pe=ae[0],ze=[Pe[0],",",Pe[1]];++de1&&ze.push("H",Pe[0]),ze.join("")}function fd(ae){for(var de=0,Te=ae.length,Pe=ae[0],ze=[Pe[0],",",Pe[1]];++de1){Qe=de[1],Ne=ae[yt],yt++,Pe+="C"+(ze[0]+lt[0])+","+(ze[1]+lt[1])+","+(Ne[0]-Qe[0])+","+(Ne[1]-Qe[1])+","+Ne[0]+","+Ne[1];for(var Ft=2;Ft9&&(Ne=Te*3/Math.sqrt(Ne),lt[Qe]=Ne*Pe,lt[Qe+1]=Ne*ze));for(Qe=-1;++Qe<=yt;)Ne=(ae[Math.min(yt,Qe+1)][0]-ae[Math.max(0,Qe-1)][0])/(6*(1+lt[Qe]*lt[Qe])),de.push([Ne||0,lt[Qe]*Ne||0]);return de}function Ut(ae){return ae.length<3?ru(ae):ae[0]+Ih(ae,ht(ae))}t.svg.line.radial=function(){var ae=kp(Xt);return ae.radius=ae.x,delete ae.x,ae.angle=ae.y,delete ae.y,ae};function Xt(ae){for(var de,Te=-1,Pe=ae.length,ze,Ne;++Tebe)+",1 "+er}function Ft(Rt,er,Qt,wr){return"Q 0,0 "+wr}return Ne.radius=function(Rt){return arguments.length?(Te=bt(Rt),Ne):Te},Ne.source=function(Rt){return arguments.length?(ae=bt(Rt),Ne):ae},Ne.target=function(Rt){return arguments.length?(de=bt(Rt),Ne):de},Ne.startAngle=function(Rt){return arguments.length?(Pe=bt(Rt),Ne):Pe},Ne.endAngle=function(Rt){return arguments.length?(ze=bt(Rt),Ne):ze},Ne};function gr(ae){return ae.radius}t.svg.diagonal=function(){var ae=Zt,de=or,Te=Er;function Pe(ze,Ne){var lt=ae.call(this,ze,Ne),Qe=de.call(this,ze,Ne),yt=(lt.y+Qe.y)/2,Ft=[lt,{x:lt.x,y:yt},{x:Qe.x,y:yt},Qe];return Ft=Ft.map(Te),"M"+Ft[0]+"C"+Ft[1]+" "+Ft[2]+" "+Ft[3]}return Pe.source=function(ze){return arguments.length?(ae=bt(ze),Pe):ae},Pe.target=function(ze){return arguments.length?(de=bt(ze),Pe):de},Pe.projection=function(ze){return arguments.length?(Te=ze,Pe):Te},Pe};function Er(ae){return[ae.x,ae.y]}t.svg.diagonal.radial=function(){var ae=t.svg.diagonal(),de=Er,Te=ae.projection;return ae.projection=function(Pe){return arguments.length?Te(Br(de=Pe)):de},ae};function Br(ae){return function(){var de=ae.apply(this,arguments),Te=de[0],Pe=de[1]-Ce;return[Te*Math.cos(Pe),Te*Math.sin(Pe)]}}t.svg.symbol=function(){var ae=Ma,de=oa;function Te(Pe,ze){return(Wi.get(ae.call(this,Pe,ze))||si)(de.call(this,Pe,ze))}return Te.type=function(Pe){return arguments.length?(ae=bt(Pe),Te):ae},Te.size=function(Pe){return arguments.length?(de=bt(Pe),Te):de},Te};function oa(){return 64}function Ma(){return"circle"}function si(ae){var de=Math.sqrt(ae/be);return"M0,"+de+"A"+de+","+de+" 0 1,1 0,"+-de+"A"+de+","+de+" 0 1,1 0,"+de+"Z"}var Wi=t.map({circle:si,cross:function(ae){var de=Math.sqrt(ae/5)/2;return"M"+-3*de+","+-de+"H"+-de+"V"+-3*de+"H"+de+"V"+-de+"H"+3*de+"V"+de+"H"+de+"V"+3*de+"H"+-de+"V"+de+"H"+-3*de+"Z"},diamond:function(ae){var de=Math.sqrt(ae/(2*on)),Te=de*on;return"M0,"+-de+"L"+Te+",0 0,"+de+" "+-Te+",0Z"},square:function(ae){var de=Math.sqrt(ae)/2;return"M"+-de+","+-de+"L"+de+","+-de+" "+de+","+de+" "+-de+","+de+"Z"},"triangle-down":function(ae){var de=Math.sqrt(ae/Qi),Te=de*Qi/2;return"M0,"+Te+"L"+de+","+-Te+" "+-de+","+-Te+"Z"},"triangle-up":function(ae){var de=Math.sqrt(ae/Qi),Te=de*Qi/2;return"M0,"+-Te+"L"+de+","+Te+" "+-de+","+Te+"Z"}});t.svg.symbolTypes=Wi.keys();var Qi=Math.sqrt(3),on=Math.tan(30*Fe);j.transition=function(ae){for(var de=ll||++es,Te=_l(ae),Pe=[],ze,Ne,lt=Dl||{time:Date.now(),ease:Kc,delay:0,duration:250},Qe=-1,yt=this.length;++Qe0;)er[--Dr].call(ae,xr);if(pr>=1)return lt.event&<.event.end.call(ae,ae.__data__,de),--Ne.count?delete Ne[Pe]:delete ae[Te],1}lt||(Qe=ze.time,yt=ni(Qt,0,Qe),lt=Ne[Pe]={tween:new M,time:Qe,timer:yt,delay:ze.delay,duration:ze.duration,ease:ze.ease,index:de},ze=null,++Ne.count)}t.svg.axis=function(){var ae=t.scale.linear(),de=Ou,Te=6,Pe=6,ze=3,Ne=[10],lt=null,Qe;function yt(Ft){Ft.each(function(){var Rt=t.select(this),er=this.__chart__||ae,Qt=this.__chart__=ae.copy(),wr=lt??(Qt.ticks?Qt.ticks.apply(Qt,Ne):Qt.domain()),Cr=Qe??(Qt.tickFormat?Qt.tickFormat.apply(Qt,Ne):P),ir=Rt.selectAll(".tick").data(wr,Qt),pr=ir.enter().insert("g",".domain").attr("class","tick").style("opacity",Ye),xr=t.transition(ir.exit()).style("opacity",Ye).remove(),Dr=t.transition(ir.order()).style("opacity",1),Lr=Math.max(Te,0)+ze,mr,ha=$r(Qt),ka=Rt.selectAll(".domain").data([0]),Ua=(ka.enter().append("path").attr("class","domain"),t.transition(ka));pr.append("line"),pr.append("text");var ei=pr.select("line"),bi=Dr.select("line"),di=ir.select("text").text(Cr),Tn=pr.select("text"),ci=Dr.select("text"),cn=de==="top"||de==="left"?-1:1,xo,js,Bo,Xa;if(de==="bottom"||de==="top"?(mr=Pc,xo="x",Bo="y",js="x2",Xa="y2",di.attr("dy",cn<0?"0em":".71em").style("text-anchor","middle"),Ua.attr("d","M"+ha[0]+","+cn*Pe+"V0H"+ha[1]+"V"+cn*Pe)):(mr=Ic,xo="y",Bo="x",js="y2",Xa="x2",di.attr("dy",".32em").style("text-anchor",cn<0?"end":"start"),Ua.attr("d","M"+cn*Pe+","+ha[0]+"H0V"+ha[1]+"H"+cn*Pe)),ei.attr(Xa,cn*Te),Tn.attr(Bo,cn*Lr),bi.attr(js,0).attr(Xa,cn*Te),ci.attr(xo,0).attr(Bo,cn*Lr),Qt.rangeBand){var Mn=Qt,Dn=Mn.rangeBand()/2;er=Qt=function(Mo){return Mn(Mo)+Dn}}else er.rangeBand?er=Qt:xr.call(mr,Qt,er);pr.call(mr,er,Qt),Dr.call(mr,Qt,Qt)})}return yt.scale=function(Ft){return arguments.length?(ae=Ft,yt):ae},yt.orient=function(Ft){return arguments.length?(de=Ft in Fc?Ft+"":Ou,yt):de},yt.ticks=function(){return arguments.length?(Ne=i(arguments),yt):Ne},yt.tickValues=function(Ft){return arguments.length?(lt=Ft,yt):lt},yt.tickFormat=function(Ft){return arguments.length?(Qe=Ft,yt):Qe},yt.tickSize=function(Ft){var Rt=arguments.length;return Rt?(Te=+Ft,Pe=+arguments[Rt-1],yt):Te},yt.innerTickSize=function(Ft){return arguments.length?(Te=+Ft,yt):Te},yt.outerTickSize=function(Ft){return arguments.length?(Pe=+Ft,yt):Pe},yt.tickPadding=function(Ft){return arguments.length?(ze=+Ft,yt):ze},yt.tickSubdivide=function(){return arguments.length&&yt},yt};var Ou="bottom",Fc={top:1,right:1,bottom:1,left:1};function Pc(ae,de,Te){ae.attr("transform",function(Pe){var ze=de(Pe);return"translate("+(isFinite(ze)?ze:Te(Pe))+",0)"})}function Ic(ae,de,Te){ae.attr("transform",function(Pe){var ze=de(Pe);return"translate(0,"+(isFinite(ze)?ze:Te(Pe))+")"})}t.svg.brush=function(){var ae=Z(Rt,"brushstart","brush","brushend"),de=null,Te=null,Pe=[0,0],ze=[0,0],Ne,lt,Qe=!0,yt=!0,Ft=uc[0];function Rt(ir){ir.each(function(){var pr=t.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Cr).on("touchstart.brush",Cr),xr=pr.selectAll(".background").data([0]);xr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),pr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Dr=pr.selectAll(".resize").data(Ft,P);Dr.exit().remove(),Dr.enter().append("g").attr("class",function(ka){return"resize "+ka}).style("cursor",function(ka){return lf[ka]}).append("rect").attr("x",function(ka){return/[ew]$/.test(ka)?-3:null}).attr("y",function(ka){return/^[ns]/.test(ka)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Dr.style("display",Rt.empty()?"none":null);var Lr=t.transition(pr),mr=t.transition(xr),ha;de&&(ha=$r(de),mr.attr("x",ha[0]).attr("width",ha[1]-ha[0]),Qt(Lr)),Te&&(ha=$r(Te),mr.attr("y",ha[0]).attr("height",ha[1]-ha[0]),wr(Lr)),er(Lr)})}Rt.event=function(ir){ir.each(function(){var pr=ae.of(this,arguments),xr={x:Pe,y:ze,i:Ne,j:lt},Dr=this.__chart__||xr;this.__chart__=xr,ll?t.select(this).transition().each("start.brush",function(){Ne=Dr.i,lt=Dr.j,Pe=Dr.x,ze=Dr.y,pr({type:"brushstart"})}).tween("brush:brush",function(){var Lr=kc(Pe,xr.x),mr=kc(ze,xr.y);return Ne=lt=null,function(ha){Pe=xr.x=Lr(ha),ze=xr.y=mr(ha),pr({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ne=xr.i,lt=xr.j,pr({type:"brush",mode:"resize"}),pr({type:"brushend"})}):(pr({type:"brushstart"}),pr({type:"brush",mode:"resize"}),pr({type:"brushend"}))})};function er(ir){ir.selectAll(".resize").attr("transform",function(pr){return"translate("+Pe[+/e$/.test(pr)]+","+ze[+/^s/.test(pr)]+")"})}function Qt(ir){ir.select(".extent").attr("x",Pe[0]),ir.selectAll(".extent,.n>rect,.s>rect").attr("width",Pe[1]-Pe[0])}function wr(ir){ir.select(".extent").attr("y",ze[0]),ir.selectAll(".extent,.e>rect,.w>rect").attr("height",ze[1]-ze[0])}function Cr(){var ir=this,pr=t.select(t.event.target),xr=ae.of(ir,arguments),Dr=t.select(ir),Lr=pr.datum(),mr=!/^(n|s)$/.test(Lr)&&de,ha=!/^(e|w)$/.test(Lr)&&Te,ka=pr.classed("extent"),Ua=vt(ir),ei,bi=t.mouse(ir),di,Tn=t.select(l(ir)).on("keydown.brush",xo).on("keyup.brush",js);if(t.event.changedTouches?Tn.on("touchmove.brush",Bo).on("touchend.brush",Mn):Tn.on("mousemove.brush",Bo).on("mouseup.brush",Mn),Dr.interrupt().selectAll("*").interrupt(),ka)bi[0]=Pe[0]-bi[0],bi[1]=ze[0]-bi[1];else if(Lr){var ci=+/w$/.test(Lr),cn=+/^n/.test(Lr);di=[Pe[1-ci]-bi[0],ze[1-cn]-bi[1]],bi[0]=Pe[ci],bi[1]=ze[cn]}else t.event.altKey&&(ei=bi.slice());Dr.style("pointer-events","none").selectAll(".resize").style("display",null),t.select("body").style("cursor",pr.style("cursor")),xr({type:"brushstart"}),Bo();function xo(){t.event.keyCode==32&&(ka||(ei=null,bi[0]-=Pe[1],bi[1]-=ze[1],ka=2),$())}function js(){t.event.keyCode==32&&ka==2&&(bi[0]+=Pe[1],bi[1]+=ze[1],ka=0,$())}function Bo(){var Dn=t.mouse(ir),Mo=!1;di&&(Dn[0]+=di[0],Dn[1]+=di[1]),ka||(t.event.altKey?(ei||(ei=[(Pe[0]+Pe[1])/2,(ze[0]+ze[1])/2]),bi[0]=Pe[+(Dn[0]0))return Ke;do Ke.push(dt=new Date(+Ue)),ce(Ue,Ze),ee(Ue);while(dt=Ge)for(;ee(Ge),!Ue(Ge);)Ge.setTime(Ge-1)},function(Ge,Ze){if(Ge>=Ge)if(Ze<0)for(;++Ze<=0;)for(;ce(Ge,-1),!Ue(Ge););else for(;--Ze>=0;)for(;ce(Ge,1),!Ue(Ge););})},_e&&(Me.count=function(Ue,Ge){return a.setTime(+Ue),i.setTime(+Ge),ee(a),ee(i),Math.floor(_e(a,i))},Me.every=function(Ue){return Ue=Math.floor(Ue),!isFinite(Ue)||!(Ue>0)?null:Ue>1?Me.filter(Se?function(Ge){return Se(Ge)%Ue===0}:function(Ge){return Me.count(0,Ge)%Ue===0}):Me}),Me}var s=o(function(){},function(ee,ce){ee.setTime(+ee+ce)},function(ee,ce){return ce-ee});s.every=function(ee){return ee=Math.floor(ee),!isFinite(ee)||!(ee>0)?null:ee>1?o(function(ce){ce.setTime(Math.floor(ce/ee)*ee)},function(ce,_e){ce.setTime(+ce+_e*ee)},function(ce,_e){return(_e-ce)/ee}):s};var l=s.range,n=1e3,u=6e4,c=36e5,f=864e5,h=6048e5,d=o(function(ee){ee.setTime(ee-ee.getMilliseconds())},function(ee,ce){ee.setTime(+ee+ce*n)},function(ee,ce){return(ce-ee)/n},function(ee){return ee.getUTCSeconds()}),p=d.range,g=o(function(ee){ee.setTime(ee-ee.getMilliseconds()-ee.getSeconds()*n)},function(ee,ce){ee.setTime(+ee+ce*u)},function(ee,ce){return(ce-ee)/u},function(ee){return ee.getMinutes()}),m=g.range,y=o(function(ee){ee.setTime(ee-ee.getMilliseconds()-ee.getSeconds()*n-ee.getMinutes()*u)},function(ee,ce){ee.setTime(+ee+ce*c)},function(ee,ce){return(ce-ee)/c},function(ee){return ee.getHours()}),_=y.range,v=o(function(ee){ee.setHours(0,0,0,0)},function(ee,ce){ee.setDate(ee.getDate()+ce)},function(ee,ce){return(ce-ee-(ce.getTimezoneOffset()-ee.getTimezoneOffset())*u)/f},function(ee){return ee.getDate()-1}),x=v.range;function E(ee){return o(function(ce){ce.setDate(ce.getDate()-(ce.getDay()+7-ee)%7),ce.setHours(0,0,0,0)},function(ce,_e){ce.setDate(ce.getDate()+_e*7)},function(ce,_e){return(_e-ce-(_e.getTimezoneOffset()-ce.getTimezoneOffset())*u)/h})}var M=E(0),C=E(1),w=E(2),k=E(3),T=E(4),b=E(5),S=E(6),A=M.range,F=C.range,D=w.range,R=k.range,P=T.range,z=b.range,I=S.range,L=o(function(ee){ee.setDate(1),ee.setHours(0,0,0,0)},function(ee,ce){ee.setMonth(ee.getMonth()+ce)},function(ee,ce){return ce.getMonth()-ee.getMonth()+(ce.getFullYear()-ee.getFullYear())*12},function(ee){return ee.getMonth()}),B=L.range,O=o(function(ee){ee.setMonth(0,1),ee.setHours(0,0,0,0)},function(ee,ce){ee.setFullYear(ee.getFullYear()+ce)},function(ee,ce){return ce.getFullYear()-ee.getFullYear()},function(ee){return ee.getFullYear()});O.every=function(ee){return!isFinite(ee=Math.floor(ee))||!(ee>0)?null:o(function(ce){ce.setFullYear(Math.floor(ce.getFullYear()/ee)*ee),ce.setMonth(0,1),ce.setHours(0,0,0,0)},function(ce,_e){ce.setFullYear(ce.getFullYear()+_e*ee)})};var G=O.range,$=o(function(ee){ee.setUTCSeconds(0,0)},function(ee,ce){ee.setTime(+ee+ce*u)},function(ee,ce){return(ce-ee)/u},function(ee){return ee.getUTCMinutes()}),X=$.range,Z=o(function(ee){ee.setUTCMinutes(0,0,0)},function(ee,ce){ee.setTime(+ee+ce*c)},function(ee,ce){return(ce-ee)/c},function(ee){return ee.getUTCHours()}),J=Z.range,N=o(function(ee){ee.setUTCHours(0,0,0,0)},function(ee,ce){ee.setUTCDate(ee.getUTCDate()+ce)},function(ee,ce){return(ce-ee)/f},function(ee){return ee.getUTCDate()-1}),H=N.range;function W(ee){return o(function(ce){ce.setUTCDate(ce.getUTCDate()-(ce.getUTCDay()+7-ee)%7),ce.setUTCHours(0,0,0,0)},function(ce,_e){ce.setUTCDate(ce.getUTCDate()+_e*7)},function(ce,_e){return(_e-ce)/h})}var U=W(0),V=W(1),j=W(2),q=W(3),Y=W(4),K=W(5),re=W(6),se=U.range,le=V.range,ue=j.range,fe=q.range,pe=Y.range,we=K.range,xe=re.range,he=o(function(ee){ee.setUTCDate(1),ee.setUTCHours(0,0,0,0)},function(ee,ce){ee.setUTCMonth(ee.getUTCMonth()+ce)},function(ee,ce){return ce.getUTCMonth()-ee.getUTCMonth()+(ce.getUTCFullYear()-ee.getUTCFullYear())*12},function(ee){return ee.getUTCMonth()}),oe=he.range,te=o(function(ee){ee.setUTCMonth(0,1),ee.setUTCHours(0,0,0,0)},function(ee,ce){ee.setUTCFullYear(ee.getUTCFullYear()+ce)},function(ee,ce){return ce.getUTCFullYear()-ee.getUTCFullYear()},function(ee){return ee.getUTCFullYear()});te.every=function(ee){return!isFinite(ee=Math.floor(ee))||!(ee>0)?null:o(function(ce){ce.setUTCFullYear(Math.floor(ce.getUTCFullYear()/ee)*ee),ce.setUTCMonth(0,1),ce.setUTCHours(0,0,0,0)},function(ce,_e){ce.setUTCFullYear(ce.getUTCFullYear()+_e*ee)})};var ie=te.range;t.timeDay=v,t.timeDays=x,t.timeFriday=b,t.timeFridays=z,t.timeHour=y,t.timeHours=_,t.timeInterval=o,t.timeMillisecond=s,t.timeMilliseconds=l,t.timeMinute=g,t.timeMinutes=m,t.timeMonday=C,t.timeMondays=F,t.timeMonth=L,t.timeMonths=B,t.timeSaturday=S,t.timeSaturdays=I,t.timeSecond=d,t.timeSeconds=p,t.timeSunday=M,t.timeSundays=A,t.timeThursday=T,t.timeThursdays=P,t.timeTuesday=w,t.timeTuesdays=D,t.timeWednesday=k,t.timeWednesdays=R,t.timeWeek=M,t.timeWeeks=A,t.timeYear=O,t.timeYears=G,t.utcDay=N,t.utcDays=H,t.utcFriday=K,t.utcFridays=we,t.utcHour=Z,t.utcHours=J,t.utcMillisecond=s,t.utcMilliseconds=l,t.utcMinute=$,t.utcMinutes=X,t.utcMonday=V,t.utcMondays=le,t.utcMonth=he,t.utcMonths=oe,t.utcSaturday=re,t.utcSaturdays=xe,t.utcSecond=d,t.utcSeconds=p,t.utcSunday=U,t.utcSundays=se,t.utcThursday=Y,t.utcThursdays=pe,t.utcTuesday=j,t.utcTuesdays=ue,t.utcWednesday=q,t.utcWednesdays=fe,t.utcWeek=U,t.utcWeeks=se,t.utcYear=te,t.utcYears=ie,Object.defineProperty(t,"__esModule",{value:!0})})}}),uy=ye({"node_modules/d3-time-format/dist/d3-time-format.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e,ED()):(t=t||self,a(t.d3=t.d3||{},t.d3))})(e,function(t,a){"use strict";function i(Ce){if(0<=Ce.y&&Ce.y<100){var Fe=new Date(-1,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L);return Fe.setFullYear(Ce.y),Fe}return new Date(Ce.y,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L)}function o(Ce){if(0<=Ce.y&&Ce.y<100){var Fe=new Date(Date.UTC(-1,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L));return Fe.setUTCFullYear(Ce.y),Fe}return new Date(Date.UTC(Ce.y,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L))}function s(Ce,Fe,Je){return{y:Ce,m:Fe,d:Je,H:0,M:0,S:0,L:0}}function l(Ce){var Fe=Ce.dateTime,Je=Ce.date,qe=Ce.time,at=Ce.periods,tt=Ce.days,ct=Ce.shortDays,At=Ce.months,ft=Ce.shortMonths,qt=p(at),ar=g(at),mt=p(tt),gt=g(tt),St=p(ct),Dt=g(ct),kt=p(At),Vt=g(At),lr=p(ft),dr=g(ft),yr={a:Yi,A:Qr,b:Nr,B:Oe,c:null,d:L,e:L,f:X,g:K,G:se,H:B,I:O,j:G,L:$,m:Z,M:J,p:Ie,q:Et,Q:vt,s:Tt,S:N,u:H,U:W,V,w:j,W:q,x:null,X:null,y:Y,Y:re,Z:le,"%":Pt},vr={a:Mt,A:zt,b:Gt,B:Ht,c:null,d:ue,e:ue,f:he,g:Ze,G:dt,H:fe,I:pe,j:we,L:xe,m:oe,M:te,p:Be,q:et,Q:vt,s:Tt,S:ie,u:ee,U:ce,V:Se,w:Me,W:Ue,x:null,X:null,y:Ge,Y:Ke,Z:_t,"%":Pt},Fr={a:Da,A:_i,b:ti,B:Ka,c:ia,d:T,e:T,f:R,g:M,G:E,H:S,I:S,j:b,L:D,m:k,M:A,p:Oa,q:w,Q:z,s:I,S:F,u:y,U:_,V:v,w:m,W:x,x:na,X:xi,y:M,Y:E,Z:C,"%":P};yr.x=la(Je,yr),yr.X=la(qe,yr),yr.c=la(Fe,yr),vr.x=la(Je,vr),vr.X=la(qe,vr),vr.c=la(Fe,vr);function la(ut,bt){return function(Ot){var It=[],Wt=-1,jt=0,sr=ut.length,kr,Mr,ua;for(Ot instanceof Date||(Ot=new Date(+Ot));++Wt53)return null;"w"in It||(It.w=1),"Z"in It?(jt=o(s(It.y,0,1)),sr=jt.getUTCDay(),jt=sr>4||sr===0?a.utcMonday.ceil(jt):a.utcMonday(jt),jt=a.utcDay.offset(jt,(It.V-1)*7),It.y=jt.getUTCFullYear(),It.m=jt.getUTCMonth(),It.d=jt.getUTCDate()+(It.w+6)%7):(jt=i(s(It.y,0,1)),sr=jt.getDay(),jt=sr>4||sr===0?a.timeMonday.ceil(jt):a.timeMonday(jt),jt=a.timeDay.offset(jt,(It.V-1)*7),It.y=jt.getFullYear(),It.m=jt.getMonth(),It.d=jt.getDate()+(It.w+6)%7)}else("W"in It||"U"in It)&&("w"in It||(It.w="u"in It?It.u%7:"W"in It?1:0),sr="Z"in It?o(s(It.y,0,1)).getUTCDay():i(s(It.y,0,1)).getDay(),It.m=0,It.d="W"in It?(It.w+6)%7+It.W*7-(sr+5)%7:It.w+It.U*7-(sr+6)%7);return"Z"in It?(It.H+=It.Z/100|0,It.M+=It.Z%100,o(It)):i(It)}}function jr(ut,bt,Ot,It){for(var Wt=0,jt=bt.length,sr=Ot.length,kr,Mr;Wt=sr)return-1;if(kr=bt.charCodeAt(Wt++),kr===37){if(kr=bt.charAt(Wt++),Mr=Fr[kr in n?bt.charAt(Wt++):kr],!Mr||(It=Mr(ut,Ot,It))<0)return-1}else if(kr!=Ot.charCodeAt(It++))return-1}return It}function Oa(ut,bt,Ot){var It=qt.exec(bt.slice(Ot));return It?(ut.p=ar[It[0].toLowerCase()],Ot+It[0].length):-1}function Da(ut,bt,Ot){var It=St.exec(bt.slice(Ot));return It?(ut.w=Dt[It[0].toLowerCase()],Ot+It[0].length):-1}function _i(ut,bt,Ot){var It=mt.exec(bt.slice(Ot));return It?(ut.w=gt[It[0].toLowerCase()],Ot+It[0].length):-1}function ti(ut,bt,Ot){var It=lr.exec(bt.slice(Ot));return It?(ut.m=dr[It[0].toLowerCase()],Ot+It[0].length):-1}function Ka(ut,bt,Ot){var It=kt.exec(bt.slice(Ot));return It?(ut.m=Vt[It[0].toLowerCase()],Ot+It[0].length):-1}function ia(ut,bt,Ot){return jr(ut,Fe,bt,Ot)}function na(ut,bt,Ot){return jr(ut,Je,bt,Ot)}function xi(ut,bt,Ot){return jr(ut,qe,bt,Ot)}function Yi(ut){return ct[ut.getDay()]}function Qr(ut){return tt[ut.getDay()]}function Nr(ut){return ft[ut.getMonth()]}function Oe(ut){return At[ut.getMonth()]}function Ie(ut){return at[+(ut.getHours()>=12)]}function Et(ut){return 1+~~(ut.getMonth()/3)}function Mt(ut){return ct[ut.getUTCDay()]}function zt(ut){return tt[ut.getUTCDay()]}function Gt(ut){return ft[ut.getUTCMonth()]}function Ht(ut){return At[ut.getUTCMonth()]}function Be(ut){return at[+(ut.getUTCHours()>=12)]}function et(ut){return 1+~~(ut.getUTCMonth()/3)}return{format:function(ut){var bt=la(ut+="",yr);return bt.toString=function(){return ut},bt},parse:function(ut){var bt=Hr(ut+="",!1);return bt.toString=function(){return ut},bt},utcFormat:function(ut){var bt=la(ut+="",vr);return bt.toString=function(){return ut},bt},utcParse:function(ut){var bt=Hr(ut+="",!0);return bt.toString=function(){return ut},bt}}}var n={"-":"",_:" ",0:"0"},u=/^\s*\d+/,c=/^%/,f=/[\\^$*+?|[\]().{}]/g;function h(Ce,Fe,Je){var qe=Ce<0?"-":"",at=(qe?-Ce:Ce)+"",tt=at.length;return qe+(tt68?1900:2e3),Je+qe[0].length):-1}function C(Ce,Fe,Je){var qe=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Fe.slice(Je,Je+6));return qe?(Ce.Z=qe[1]?0:-(qe[2]+(qe[3]||"00")),Je+qe[0].length):-1}function w(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+1));return qe?(Ce.q=qe[0]*3-3,Je+qe[0].length):-1}function k(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+2));return qe?(Ce.m=qe[0]-1,Je+qe[0].length):-1}function T(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+2));return qe?(Ce.d=+qe[0],Je+qe[0].length):-1}function b(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+3));return qe?(Ce.m=0,Ce.d=+qe[0],Je+qe[0].length):-1}function S(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+2));return qe?(Ce.H=+qe[0],Je+qe[0].length):-1}function A(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+2));return qe?(Ce.M=+qe[0],Je+qe[0].length):-1}function F(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+2));return qe?(Ce.S=+qe[0],Je+qe[0].length):-1}function D(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+3));return qe?(Ce.L=+qe[0],Je+qe[0].length):-1}function R(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je,Je+6));return qe?(Ce.L=Math.floor(qe[0]/1e3),Je+qe[0].length):-1}function P(Ce,Fe,Je){var qe=c.exec(Fe.slice(Je,Je+1));return qe?Je+qe[0].length:-1}function z(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je));return qe?(Ce.Q=+qe[0],Je+qe[0].length):-1}function I(Ce,Fe,Je){var qe=u.exec(Fe.slice(Je));return qe?(Ce.s=+qe[0],Je+qe[0].length):-1}function L(Ce,Fe){return h(Ce.getDate(),Fe,2)}function B(Ce,Fe){return h(Ce.getHours(),Fe,2)}function O(Ce,Fe){return h(Ce.getHours()%12||12,Fe,2)}function G(Ce,Fe){return h(1+a.timeDay.count(a.timeYear(Ce),Ce),Fe,3)}function $(Ce,Fe){return h(Ce.getMilliseconds(),Fe,3)}function X(Ce,Fe){return $(Ce,Fe)+"000"}function Z(Ce,Fe){return h(Ce.getMonth()+1,Fe,2)}function J(Ce,Fe){return h(Ce.getMinutes(),Fe,2)}function N(Ce,Fe){return h(Ce.getSeconds(),Fe,2)}function H(Ce){var Fe=Ce.getDay();return Fe===0?7:Fe}function W(Ce,Fe){return h(a.timeSunday.count(a.timeYear(Ce)-1,Ce),Fe,2)}function U(Ce){var Fe=Ce.getDay();return Fe>=4||Fe===0?a.timeThursday(Ce):a.timeThursday.ceil(Ce)}function V(Ce,Fe){return Ce=U(Ce),h(a.timeThursday.count(a.timeYear(Ce),Ce)+(a.timeYear(Ce).getDay()===4),Fe,2)}function j(Ce){return Ce.getDay()}function q(Ce,Fe){return h(a.timeMonday.count(a.timeYear(Ce)-1,Ce),Fe,2)}function Y(Ce,Fe){return h(Ce.getFullYear()%100,Fe,2)}function K(Ce,Fe){return Ce=U(Ce),h(Ce.getFullYear()%100,Fe,2)}function re(Ce,Fe){return h(Ce.getFullYear()%1e4,Fe,4)}function se(Ce,Fe){var Je=Ce.getDay();return Ce=Je>=4||Je===0?a.timeThursday(Ce):a.timeThursday.ceil(Ce),h(Ce.getFullYear()%1e4,Fe,4)}function le(Ce){var Fe=Ce.getTimezoneOffset();return(Fe>0?"-":(Fe*=-1,"+"))+h(Fe/60|0,"0",2)+h(Fe%60,"0",2)}function ue(Ce,Fe){return h(Ce.getUTCDate(),Fe,2)}function fe(Ce,Fe){return h(Ce.getUTCHours(),Fe,2)}function pe(Ce,Fe){return h(Ce.getUTCHours()%12||12,Fe,2)}function we(Ce,Fe){return h(1+a.utcDay.count(a.utcYear(Ce),Ce),Fe,3)}function xe(Ce,Fe){return h(Ce.getUTCMilliseconds(),Fe,3)}function he(Ce,Fe){return xe(Ce,Fe)+"000"}function oe(Ce,Fe){return h(Ce.getUTCMonth()+1,Fe,2)}function te(Ce,Fe){return h(Ce.getUTCMinutes(),Fe,2)}function ie(Ce,Fe){return h(Ce.getUTCSeconds(),Fe,2)}function ee(Ce){var Fe=Ce.getUTCDay();return Fe===0?7:Fe}function ce(Ce,Fe){return h(a.utcSunday.count(a.utcYear(Ce)-1,Ce),Fe,2)}function _e(Ce){var Fe=Ce.getUTCDay();return Fe>=4||Fe===0?a.utcThursday(Ce):a.utcThursday.ceil(Ce)}function Se(Ce,Fe){return Ce=_e(Ce),h(a.utcThursday.count(a.utcYear(Ce),Ce)+(a.utcYear(Ce).getUTCDay()===4),Fe,2)}function Me(Ce){return Ce.getUTCDay()}function Ue(Ce,Fe){return h(a.utcMonday.count(a.utcYear(Ce)-1,Ce),Fe,2)}function Ge(Ce,Fe){return h(Ce.getUTCFullYear()%100,Fe,2)}function Ze(Ce,Fe){return Ce=_e(Ce),h(Ce.getUTCFullYear()%100,Fe,2)}function Ke(Ce,Fe){return h(Ce.getUTCFullYear()%1e4,Fe,4)}function dt(Ce,Fe){var Je=Ce.getUTCDay();return Ce=Je>=4||Je===0?a.utcThursday(Ce):a.utcThursday.ceil(Ce),h(Ce.getUTCFullYear()%1e4,Fe,4)}function _t(){return"+0000"}function Pt(){return"%"}function vt(Ce){return+Ce}function Tt(Ce){return Math.floor(+Ce/1e3)}var st;Ve({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 Ve(Ce){return st=l(Ce),t.timeFormat=st.format,t.timeParse=st.parse,t.utcFormat=st.utcFormat,t.utcParse=st.utcParse,st}var Ye="%Y-%m-%dT%H:%M:%S.%LZ";function me(Ce){return Ce.toISOString()}var be=Date.prototype.toISOString?me:t.utcFormat(Ye);function Ee(Ce){var Fe=new Date(Ce);return isNaN(Fe)?null:Fe}var De=+new Date("2000-01-01T00:00:00.000Z")?Ee:t.utcParse(Ye);t.isoFormat=be,t.isoParse=De,t.timeFormatDefaultLocale=Ve,t.timeFormatLocale=l,Object.defineProperty(t,"__esModule",{value:!0})})}}),SD=ye({"node_modules/d3-format/dist/d3-format.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e):(t=typeof globalThis<"u"?globalThis:t||self,a(t.d3=t.d3||{}))})(e,(function(t){"use strict";function a(k){return Math.abs(k=Math.round(k))>=1e21?k.toLocaleString("en").replace(/,/g,""):k.toString(10)}function i(k,T){if((b=(k=T?k.toExponential(T-1):k.toExponential()).indexOf("e"))<0)return null;var b,S=k.slice(0,b);return[S.length>1?S[0]+S.slice(2):S,+k.slice(b+1)]}function o(k){return k=i(Math.abs(k)),k?k[1]:NaN}function s(k,T){return function(b,S){for(var A=b.length,F=[],D=0,R=k[0],P=0;A>0&&R>0&&(P+R+1>S&&(R=Math.max(1,S-P)),F.push(b.substring(A-=R,A+R)),!((P+=R+1)>S));)R=k[D=(D+1)%k.length];return F.reverse().join(T)}}function l(k){return function(T){return T.replace(/[0-9]/g,function(b){return k[+b]})}}var n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function u(k){if(!(T=n.exec(k)))throw new Error("invalid format: "+k);var T;return new c({fill:T[1],align:T[2],sign:T[3],symbol:T[4],zero:T[5],width:T[6],comma:T[7],precision:T[8]&&T[8].slice(1),trim:T[9],type:T[10]})}u.prototype=c.prototype;function c(k){this.fill=k.fill===void 0?" ":k.fill+"",this.align=k.align===void 0?">":k.align+"",this.sign=k.sign===void 0?"-":k.sign+"",this.symbol=k.symbol===void 0?"":k.symbol+"",this.zero=!!k.zero,this.width=k.width===void 0?void 0:+k.width,this.comma=!!k.comma,this.precision=k.precision===void 0?void 0:+k.precision,this.trim=!!k.trim,this.type=k.type===void 0?"":k.type+""}c.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 f(k){e:for(var T=k.length,b=1,S=-1,A;b0&&(S=0);break}return S>0?k.slice(0,S)+k.slice(A+1):k}var h;function d(k,T){var b=i(k,T);if(!b)return k+"";var S=b[0],A=b[1],F=A-(h=Math.max(-8,Math.min(8,Math.floor(A/3)))*3)+1,D=S.length;return F===D?S:F>D?S+new Array(F-D+1).join("0"):F>0?S.slice(0,F)+"."+S.slice(F):"0."+new Array(1-F).join("0")+i(k,Math.max(0,T+F-1))[0]}function p(k,T){var b=i(k,T);if(!b)return k+"";var S=b[0],A=b[1];return A<0?"0."+new Array(-A).join("0")+S:S.length>A+1?S.slice(0,A+1)+"."+S.slice(A+1):S+new Array(A-S.length+2).join("0")}var g={"%":function(k,T){return(k*100).toFixed(T)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+""},d:a,e:function(k,T){return k.toExponential(T)},f:function(k,T){return k.toFixed(T)},g:function(k,T){return k.toPrecision(T)},o:function(k){return Math.round(k).toString(8)},p:function(k,T){return p(k*100,T)},r:p,s:d,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function m(k){return k}var y=Array.prototype.map,_=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function v(k){var T=k.grouping===void 0||k.thousands===void 0?m:s(y.call(k.grouping,Number),k.thousands+""),b=k.currency===void 0?"":k.currency[0]+"",S=k.currency===void 0?"":k.currency[1]+"",A=k.decimal===void 0?".":k.decimal+"",F=k.numerals===void 0?m:l(y.call(k.numerals,String)),D=k.percent===void 0?"%":k.percent+"",R=k.minus===void 0?"-":k.minus+"",P=k.nan===void 0?"NaN":k.nan+"";function z(L){L=u(L);var B=L.fill,O=L.align,G=L.sign,$=L.symbol,X=L.zero,Z=L.width,J=L.comma,N=L.precision,H=L.trim,W=L.type;W==="n"?(J=!0,W="g"):g[W]||(N===void 0&&(N=12),H=!0,W="g"),(X||B==="0"&&O==="=")&&(X=!0,B="0",O="=");var U=$==="$"?b:$==="#"&&/[boxX]/.test(W)?"0"+W.toLowerCase():"",V=$==="$"?S:/[%p]/.test(W)?D:"",j=g[W],q=/[defgprs%]/.test(W);N=N===void 0?6:/[gprs]/.test(W)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function Y(K){var re=U,se=V,le,ue,fe;if(W==="c")se=j(K)+se,K="";else{K=+K;var pe=K<0||1/K<0;if(K=isNaN(K)?P:j(Math.abs(K),N),H&&(K=f(K)),pe&&+K==0&&G!=="+"&&(pe=!1),re=(pe?G==="("?G:R:G==="-"||G==="("?"":G)+re,se=(W==="s"?_[8+h/3]:"")+se+(pe&&G==="("?")":""),q){for(le=-1,ue=K.length;++lefe||fe>57){se=(fe===46?A+K.slice(le+1):K.slice(le))+se,K=K.slice(0,le);break}}}J&&!X&&(K=T(K,1/0));var we=re.length+K.length+se.length,xe=we>1)+re+K+se+xe.slice(we);break;default:K=xe+re+K+se;break}return F(K)}return Y.toString=function(){return L+""},Y}function I(L,B){var O=z((L=u(L),L.type="f",L)),G=Math.max(-8,Math.min(8,Math.floor(o(B)/3)))*3,$=Math.pow(10,-G),X=_[8+G/3];return function(Z){return O($*Z)+X}}return{format:z,formatPrefix:I}}var x;E({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function E(k){return x=v(k),t.format=x.format,t.formatPrefix=x.formatPrefix,x}function M(k){return Math.max(0,-o(Math.abs(k)))}function C(k,T){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(o(T)/3)))*3-o(Math.abs(k)))}function w(k,T){return k=Math.abs(k),T=Math.abs(T)-k,Math.max(0,o(T)-o(k))+1}t.FormatSpecifier=c,t.formatDefaultLocale=E,t.formatLocale=v,t.formatSpecifier=u,t.precisionFixed=M,t.precisionPrefix=C,t.precisionRound=w,Object.defineProperty(t,"__esModule",{value:!0})}))}}),BQ=ye({"node_modules/is-string-blank/index.js"(e,r){"use strict";r.exports=function(t){for(var a=t.length,i,o=0;o13)&&i!==32&&i!==133&&i!==160&&i!==5760&&i!==6158&&(i<8192||i>8205)&&i!==8232&&i!==8233&&i!==8239&&i!==8287&&i!==8288&&i!==12288&&i!==65279)return!1;return!0}}}),en=ye({"node_modules/fast-isnumeric/index.js"(e,r){"use strict";var t=BQ();r.exports=function(a){var i=typeof a;if(i==="string"){var o=a;if(a=+a,a===0&&t(o))return!1}else if(i!=="number")return!1;return a-a<1}}}),Vn=ye({"src/constants/numerical.js"(e,r){"use strict";r.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"}}}),kD=ye({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e):(t=typeof globalThis<"u"?globalThis:t||self,a(t["base64-arraybuffer"]={}))})(e,(function(t){"use strict";for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=typeof Uint8Array>"u"?[]:new Uint8Array(256),o=0;o>2],h+=a[(u[c]&3)<<4|u[c+1]>>4],h+=a[(u[c+1]&15)<<2|u[c+2]>>6],h+=a[u[c+2]&63];return f%3===2?h=h.substring(0,h.length-1)+"=":f%3===1&&(h=h.substring(0,h.length-2)+"=="),h},l=function(n){var u=n.length*.75,c=n.length,f,h=0,d,p,g,m;n[n.length-1]==="="&&(u--,n[n.length-2]==="="&&u--);var y=new ArrayBuffer(u),_=new Uint8Array(y);for(f=0;f>4,_[h++]=(p&15)<<4|g>>2,_[h++]=(g&3)<<6|m&63;return y};t.decode=l,t.encode=s,Object.defineProperty(t,"__esModule",{value:!0})}))}}),yv=ye({"src/lib/is_plain_object.js"(e,r){"use strict";r.exports=function(a){return window&&window.process&&window.process.versions?Object.prototype.toString.call(a)==="[object Object]":Object.prototype.toString.call(a)==="[object Object]"&&Object.getPrototypeOf(a).hasOwnProperty("hasOwnProperty")}}}),yc=ye({"src/lib/array.js"(e){"use strict";var r=kD().decode,t=yv(),a=Array.isArray,i=ArrayBuffer,o=DataView;function s(d){return i.isView(d)&&!(d instanceof o)}e.isTypedArray=s;function l(d){return a(d)||s(d)}e.isArrayOrTypedArray=l;function n(d){return!l(d[0])}e.isArray1D=n,e.ensureArray=function(d,p){return a(d)||(d=[]),d.length=p,d};var u={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};u.uint8c=u.u1c,u.uint8=u.u1,u.int8=u.i1,u.uint16=u.u2,u.int16=u.i2,u.uint32=u.u4,u.int32=u.i4,u.float32=u.f4,u.float64=u.f8;function c(d){return d.constructor===ArrayBuffer}e.isArrayBuffer=c,e.decodeTypedArraySpec=function(d){var p=[],g=f(d),m=g.dtype,y=u[m];if(!y)throw new Error('Error in dtype: "'+m+'"');var _=y.BYTES_PER_ELEMENT,v=g.bdata;c(v)||(v=r(v));var x=g.shape===void 0?[v.byteLength/_]:(""+g.shape).split(",");x.reverse();var E=x.length,M,C,w=+x[0],k=_*w,T=0;if(E===1)p=new y(v);else if(E===2)for(M=+x[1],C=0;C2)return y[M]=y[M]|s,x.set(E,null);if(v){for(p=M;p0)return Math.log(i)/Math.LN10;var s=Math.log(Math.min(o[0],o[1]))/Math.LN10;return t(s)||(s=Math.log(Math.max(o[0],o[1]))/Math.LN10-6),s}}}),jQ=ye({"src/lib/relink_private.js"(e,r){"use strict";var t=yc().isArrayOrTypedArray,a=yv();r.exports=function i(o,s){for(var l in s){var n=s[l],u=o[l];if(u!==n)if(l.charAt(0)==="_"||typeof n=="function"){if(l in o)continue;o[l]=n}else if(t(n)&&t(u)&&a(n[0])){if(l==="customdata"||l==="ids")continue;for(var c=Math.min(n.length,u.length),f=0;fUQ,modHalf:()=>qQ});function UQ(e,r){let t=e%r;return t<0?t+r:t}function qQ(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}var cy=Si({"src/lib/mod.ts"(){"use strict"}}),Xi=ye({"src/lib/extend.js"(e){"use strict";var r=yv(),t=Array.isArray;function a(o,s){var l,n;for(l=0;l{for(var Le in Ae)t(ve,Le,{get:Ae[Le],enumerable:!0})},l=(ve,Ae,Le,We)=>{if(Ae&&typeof Ae=="object"||typeof Ae=="function")for(let Xe of i(Ae))!o.call(ve,Xe)&&Xe!==Le&&t(ve,Xe,{get:()=>Ae[Xe],enumerable:!(We=a(Ae,Xe))||We.enumerable});return ve},n=ve=>l(t({},"__esModule",{value:!0}),ve),u={};s(u,{a98:()=>bo,average:()=>zt,averageAngle:()=>Ie,averageNumber:()=>Et,blend:()=>Pf,blerp:()=>Me,clampChroma:()=>Xr,clampGamut:()=>Or,clampRgb:()=>fr,colorsNamed:()=>d,convertA98ToXyz65:()=>st,convertCubehelixToRgb:()=>Oa,convertDlchToLab65:()=>bn,convertHsiToRgb:()=>To,convertHslToRgb:()=>zn,convertHsvToRgb:()=>ss,convertHwbToRgb:()=>Po,convertItpToXyz65:()=>ml,convertJabToJch:()=>Iu,convertJabToRgb:()=>bh,convertJabToXyz65:()=>Wf,convertJchToJab:()=>Nl,convertLab65ToDlch:()=>ui,convertLab65ToRgb:()=>Ca,convertLab65ToXyz65:()=>ra,convertLabToLch:()=>et,convertLabToRgb:()=>kl,convertLabToXyz50:()=>ef,convertLchToLab:()=>bt,convertLchuvToLuv:()=>nf,convertLrgbToOklab:()=>wt,convertLrgbToRgb:()=>at,convertLuvToLchuv:()=>Ef,convertLuvToXyz50:()=>Dh,convertOkhslToOklab:()=>pi,convertOkhsvToOklab:()=>Ga,convertOklabToLrgb:()=>Sr,convertOklabToOkhsl:()=>gi,convertOklabToOkhsv:()=>Ra,convertOklabToRgb:()=>qr,convertP3ToXyz65:()=>io,convertProphotoToXyz50:()=>Cf,convertRec2020ToXyz65:()=>Df,convertRgbToCubehelix:()=>Hr,convertRgbToHsi:()=>Jn,convertRgbToHsl:()=>wn,convertRgbToHsv:()=>oo,convertRgbToHwb:()=>Bl,convertRgbToJab:()=>Qc,convertRgbToLab:()=>Mh,convertRgbToLab65:()=>pa,convertRgbToLrgb:()=>De,convertRgbToOklab:()=>Bt,convertRgbToXyb:()=>au,convertRgbToXyz50:()=>tf,convertRgbToXyz65:()=>Fe,convertRgbToYiq:()=>Br,convertXybToRgb:()=>He,convertXyz50ToLab:()=>ic,convertXyz50ToLuv:()=>Dc,convertXyz50ToProphoto:()=>Cl,convertXyz50ToRgb:()=>Cc,convertXyz50ToXyz65:()=>Zt,convertXyz65ToA98:()=>me,convertXyz65ToItp:()=>kc,convertXyz65ToJab:()=>Hf,convertXyz65ToLab65:()=>dn,convertXyz65ToP3:()=>Ns,convertXyz65ToRec2020:()=>th,convertXyz65ToRgb:()=>ct,convertXyz65ToXyz50:()=>Xt,convertYiqToRgb:()=>Ma,converter:()=>L,cubehelix:()=>uf,differenceCie76:()=>ia,differenceCie94:()=>na,differenceCiede2000:()=>xi,differenceCmc:()=>Yi,differenceEuclidean:()=>Ka,differenceHueChroma:()=>ti,differenceHueNaive:()=>_i,differenceHueSaturation:()=>Da,differenceHyab:()=>Qr,differenceItp:()=>Oe,differenceKotsarenkoRamos:()=>Nr,displayable:()=>xt,dlab:()=>hs,dlch:()=>cc,easingGamma:()=>Dn,easingInOutSine:()=>so,easingMidpoint:()=>er,easingSmootherstep:()=>Sn,easingSmoothstep:()=>Ln,easingSmoothstepInverse:()=>fi,filterBrightness:()=>fa,filterContrast:()=>Pa,filterDeficiencyDeuter:()=>Ai,filterDeficiencyProt:()=>Ja,filterDeficiencyTrit:()=>nn,filterGrayscale:()=>hi,filterHueRotate:()=>an,filterInvert:()=>oi,filterSaturate:()=>Ta,filterSepia:()=>Ha,fixupAlpha:()=>dt,fixupHueDecreasing:()=>kt,fixupHueIncreasing:()=>Dt,fixupHueLonger:()=>St,fixupHueShorter:()=>gt,formatCss:()=>xl,formatHex:()=>Ou,formatHex8:()=>Fc,formatHsl:()=>Ic,formatRgb:()=>Pc,getMode:()=>J,hsi:()=>Rc,hsl:()=>cf,hsv:()=>ql,hwb:()=>Vl,inGamut:()=>nr,interpolate:()=>pr,interpolateWith:()=>xr,interpolateWithPremultipliedAlpha:()=>Dr,interpolatorLinear:()=>Ke,interpolatorPiecewise:()=>Ze,interpolatorSplineBasis:()=>ha,interpolatorSplineBasisClosed:()=>ka,interpolatorSplineMonotone:()=>js,interpolatorSplineMonotone2:()=>Bo,interpolatorSplineMonotoneClosed:()=>Xa,interpolatorSplineNatural:()=>ei,interpolatorSplineNaturalClosed:()=>bi,itp:()=>nu,jab:()=>Xn,jch:()=>xu,lab:()=>xs,lab65:()=>zc,lch:()=>ff,lch65:()=>hf,lchuv:()=>Nn,lerp:()=>_e,lrgb:()=>Do,luv:()=>Ps,mapAlphaDivide:()=>Ne,mapAlphaMultiply:()=>ze,mapTransferGamma:()=>Qe,mapTransferLinear:()=>lt,mapper:()=>Pe,modeA98:()=>ft,modeCubehelix:()=>Ht,modeDlab:()=>ro,modeDlch:()=>Kn,modeHsi:()=>Fo,modeHsl:()=>sl,modeHsv:()=>An,modeHwb:()=>Pu,modeItp:()=>td,modeJab:()=>rc,modeJch:()=>ac,modeLab:()=>Ql,modeLab65:()=>Mp,modeLch:()=>Mf,modeLch65:()=>Kf,modeLchuv:()=>yu,modeLrgb:()=>ud,modeLuv:()=>eh,modeOkhsl:()=>ji,modeOkhsv:()=>pn,modeOklab:()=>No,modeOklch:()=>zo,modeP3:()=>zu,modeProphoto:()=>Ph,modeRec2020:()=>Lf,modeRgb:()=>Pt,modeXyb:()=>ot,modeXyz50:()=>ht,modeXyz65:()=>gr,modeYiq:()=>Wi,nearest:()=>wa,okhsl:()=>ur,okhsv:()=>Kr,oklab:()=>Jr,oklch:()=>Gi,p3:()=>Eo,parse:()=>oe,parseHex:()=>_,parseHsl:()=>gs,parseHslLegacy:()=>Cn,parseHwb:()=>Jl,parseLab:()=>$d,parseLch:()=>Yd,parseNamed:()=>g,parseOklab:()=>Co,parseOklch:()=>Os,parseRgb:()=>ie,parseRgbLegacy:()=>R,parseTransparent:()=>ce,prophoto:()=>ds,random:()=>Te,rec2020:()=>Ui,removeParser:()=>H,rgb:()=>tr,round:()=>yn,samples:()=>_s,serializeHex:()=>Dl,serializeHex8:()=>lc,serializeHsl:()=>_l,serializeRgb:()=>sf,toGamut:()=>aa,trilerp:()=>Ue,unlerp:()=>Se,useMode:()=>Z,useParser:()=>N,wcagContrast:()=>iu,wcagLuminance:()=>Us,xyb:()=>hr,xyz50:()=>_r,xyz65:()=>Zr,yiq:()=>sa}),r.exports=n(u);var c=(ve,Ae)=>{if(typeof ve=="number"){if(Ae===3)return{mode:"rgb",r:(ve>>8&15|ve>>4&240)/255,g:(ve>>4&15|ve&240)/255,b:(ve&15|ve<<4&240)/255};if(Ae===4)return{mode:"rgb",r:(ve>>12&15|ve>>8&240)/255,g:(ve>>8&15|ve>>4&240)/255,b:(ve>>4&15|ve&240)/255,alpha:(ve&15|ve<<4&240)/255};if(Ae===6)return{mode:"rgb",r:(ve>>16&255)/255,g:(ve>>8&255)/255,b:(ve&255)/255};if(Ae===8)return{mode:"rgb",r:(ve>>24&255)/255,g:(ve>>16&255)/255,b:(ve>>8&255)/255,alpha:(ve&255)/255}}},f=c,h={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},d=h,p=ve=>f(d[ve.toLowerCase()],6),g=p,m=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,y=ve=>{let Ae;return(Ae=ve.match(m))?f(parseInt(Ae[1],16),Ae[1].length):void 0},_=y,v="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",x=`(?:${v}|none)`,E=`${v}%`,M=`(?:${v}%|none)`,C=`(?:${v}%|${v})`,w=`(?:${v}%|${v}|none)`,k=`(?:${v}(deg|grad|rad|turn)|${v})`,T=`(?:${v}(deg|grad|rad|turn)|${v}|none)`,b="\\s*,\\s*",S=new RegExp("^"+w+"$"),A=new RegExp(`^rgba?\\(\\s*${v}${b}${v}${b}${v}\\s*(?:,\\s*${C}\\s*)?\\)$`),F=new RegExp(`^rgba?\\(\\s*${E}${b}${E}${b}${E}\\s*(?:,\\s*${C}\\s*)?\\)$`),D=ve=>{let Ae={mode:"rgb"},Le;if(Le=ve.match(A))Le[1]!==void 0&&(Ae.r=Le[1]/255),Le[2]!==void 0&&(Ae.g=Le[2]/255),Le[3]!==void 0&&(Ae.b=Le[3]/255);else if(Le=ve.match(F))Le[1]!==void 0&&(Ae.r=Le[1]/100),Le[2]!==void 0&&(Ae.g=Le[2]/100),Le[3]!==void 0&&(Ae.b=Le[3]/100);else return;return Le[4]!==void 0?Ae.alpha=Math.max(0,Math.min(1,Le[4]/100)):Le[5]!==void 0&&(Ae.alpha=Math.max(0,Math.min(1,+Le[5]))),Ae},R=D,P=(ve,Ae)=>ve===void 0?void 0:typeof ve!="object"?oe(ve):ve.mode!==void 0?ve:Ae?Ci(ja({},ve),{mode:Ae}):void 0,z=P,I=(ve="rgb")=>Ae=>(Ae=z(Ae,ve))!==void 0?Ae.mode===ve?Ae:B[Ae.mode][ve]?B[Ae.mode][ve](Ae):ve==="rgb"?B[Ae.mode].rgb(Ae):B.rgb[ve](B[Ae.mode].rgb(Ae)):void 0,L=I,B={},O={},G=[],$={},X=ve=>ve,Z=ve=>(B[ve.mode]=ja(ja({},B[ve.mode]),ve.toMode),Object.keys(ve.fromMode||{}).forEach(Ae=>{B[Ae]||(B[Ae]={}),B[Ae][ve.mode]=ve.fromMode[Ae]}),ve.ranges||(ve.ranges={}),ve.difference||(ve.difference={}),ve.channels.forEach(Ae=>{if(ve.ranges[Ae]===void 0&&(ve.ranges[Ae]=[0,1]),!ve.interpolate[Ae])throw new Error(`Missing interpolator for: ${Ae}`);typeof ve.interpolate[Ae]=="function"&&(ve.interpolate[Ae]={use:ve.interpolate[Ae]}),ve.interpolate[Ae].fixup||(ve.interpolate[Ae].fixup=X)}),O[ve.mode]=ve,(ve.parse||[]).forEach(Ae=>{N(Ae,ve.mode)}),L(ve.mode)),J=ve=>O[ve],N=(ve,Ae)=>{if(typeof ve=="string"){if(!Ae)throw new Error("'mode' required when 'parser' is a string");$[ve]=Ae}else typeof ve=="function"&&G.indexOf(ve)<0&&G.push(ve)},H=ve=>{if(typeof ve=="string")delete $[ve];else if(typeof ve=="function"){let Ae=G.indexOf(ve);Ae>0&&G.splice(Ae,1)}},W=/[^\x00-\x7F]|[a-zA-Z_]/,U=/[^\x00-\x7F]|[-\w]/,V={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},j=0;function q(ve){let Ae=ve[j],Le=ve[j+1];return Ae==="-"||Ae==="+"?/\d/.test(Le)||Le==="."&&/\d/.test(ve[j+2]):Ae==="."?/\d/.test(Le):/\d/.test(Ae)}function Y(ve){if(j>=ve.length)return!1;let Ae=ve[j];if(W.test(Ae))return!0;if(Ae==="-"){if(ve.length-j<2)return!1;let Le=ve[j+1];return!!(Le==="-"||W.test(Le))}return!1}var K={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function re(ve){let Ae="";if((ve[j]==="-"||ve[j]==="+")&&(Ae+=ve[j++]),Ae+=se(ve),ve[j]==="."&&/\d/.test(ve[j+1])&&(Ae+=ve[j++]+se(ve)),(ve[j]==="e"||ve[j]==="E")&&((ve[j+1]==="-"||ve[j+1]==="+")&&/\d/.test(ve[j+2])?Ae+=ve[j++]+ve[j++]+se(ve):/\d/.test(ve[j+1])&&(Ae+=ve[j++]+se(ve))),Y(ve)){let Le=le(ve);return Le==="deg"||Le==="rad"||Le==="turn"||Le==="grad"?{type:V.Hue,value:Ae*K[Le]}:void 0}return ve[j]==="%"?(j++,{type:V.Percentage,value:+Ae}):{type:V.Number,value:+Ae}}function se(ve){let Ae="";for(;/\d/.test(ve[j]);)Ae+=ve[j++];return Ae}function le(ve){let Ae="";for(;j4)){if(Le.length===4){if(Le[3].type!==V.Alpha)return;Le[3]=Le[3].value}return Le.length===3&&Le.push({type:V.None,value:void 0}),Le.every(Xe=>Xe.type!==V.Alpha)?Le:void 0}}function xe(ve,Ae){ve._i=0;let Le=ve[ve._i++];if(!Le||Le.type!==V.Function)return;let We=we(ve,Ae);if(We)return We.unshift(Le.value),We}var he=ve=>{if(typeof ve!="string")return;let Ae=fe(ve),Le=Ae?xe(Ae,!0):void 0,We,Xe=0,rt=G.length;for(;Xeve==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,ce=ee,_e=(ve,Ae,Le)=>ve+Le*(Ae-ve),Se=(ve,Ae,Le)=>(Le-ve)/(Ae-ve),Me=(ve,Ae,Le,We,Xe,rt)=>_e(_e(ve,Ae,Xe),_e(Le,We,Xe),rt),Ue=(ve,Ae,Le,We,Xe,rt,Ct,Jt,br,ea,Vr)=>_e(Me(ve,Ae,Le,We,br,ea),Me(Xe,rt,Ct,Jt,br,ea),Vr),Ge=ve=>{let Ae=[];for(let Le=0;LeAe=>{let Le=Ge(Ae);return We=>{let Xe=We*Le.length,rt=We>=1?Le.length-1:Math.max(Math.floor(Xe),0),Ct=Le[rt];return Ct===void 0?void 0:ve(Ct[0],Ct[1],Xe-rt)}},Ke=Ze(_e),dt=ve=>{let Ae=!1,Le=ve.map(We=>We!==void 0?(Ae=!0,We):1);return Ae?Le:ve},_t={mode:"rgb",channels:["r","g","b","alpha"],parse:[ie,_,R,g,ce,"srgb"],serialize:"srgb",interpolate:{r:Ke,g:Ke,b:Ke,alpha:{use:Ke,fixup:dt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Pt=_t,vt=(ve=0)=>Math.pow(Math.abs(ve),563/256)*Math.sign(ve),Tt=ve=>{let Ae=vt(ve.r),Le=vt(ve.g),We=vt(ve.b),Xe={mode:"xyz65",x:.5766690429101305*Ae+.1855582379065463*Le+.1882286462349947*We,y:.297344975250536*Ae+.6273635662554661*Le+.0752914584939979*We,z:.0270313613864123*Ae+.0706888525358272*Le+.9913375368376386*We};return ve.alpha!==void 0&&(Xe.alpha=ve.alpha),Xe},st=Tt,Ve=ve=>Math.pow(Math.abs(ve),256/563)*Math.sign(ve),Ye=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"a98",r:Ve(ve*2.0415879038107465-Ae*.5650069742788597-.3447313507783297*Le),g:Ve(ve*-.9692436362808798+Ae*1.8759675015077206+.0415550574071756*Le),b:Ve(ve*.0134442806320312-Ae*.1183623922310184+1.0151749943912058*Le)};return We!==void 0&&(Xe.alpha=We),Xe},me=Ye,be=(ve=0)=>{let Ae=Math.abs(ve);return Ae<=.04045?ve/12.92:(Math.sign(ve)||1)*Math.pow((Ae+.055)/1.055,2.4)},Ee=({r:ve,g:Ae,b:Le,alpha:We})=>{let Xe={mode:"lrgb",r:be(ve),g:be(Ae),b:be(Le)};return We!==void 0&&(Xe.alpha=We),Xe},De=Ee,Ce=ve=>{let{r:Ae,g:Le,b:We,alpha:Xe}=De(ve),rt={mode:"xyz65",x:.4123907992659593*Ae+.357584339383878*Le+.1804807884018343*We,y:.2126390058715102*Ae+.715168678767756*Le+.0721923153607337*We,z:.0193308187155918*Ae+.119194779794626*Le+.9505321522496607*We};return Xe!==void 0&&(rt.alpha=Xe),rt},Fe=Ce,Je=(ve=0)=>{let Ae=Math.abs(ve);return Ae>.0031308?(Math.sign(ve)||1)*(1.055*Math.pow(Ae,1/2.4)-.055):ve*12.92},qe=({r:ve,g:Ae,b:Le,alpha:We},Xe="rgb")=>{let rt={mode:Xe,r:Je(ve),g:Je(Ae),b:Je(Le)};return We!==void 0&&(rt.alpha=We),rt},at=qe,tt=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=at({r:ve*3.2409699419045226-Ae*1.537383177570094-.4986107602930034*Le,g:ve*-.9692436362808796+Ae*1.8759675015077204+.0415550574071756*Le,b:ve*.0556300796969936-Ae*.2039769588889765+1.0569715142428784*Le});return We!==void 0&&(Xe.alpha=We),Xe},ct=tt,At=Ci(ja({},Pt),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:ve=>me(Fe(ve)),xyz65:me},toMode:{rgb:ve=>ct(st(ve)),xyz65:st}}),ft=At,qt=ve=>(ve=ve%360)<0?ve+360:ve,ar=qt,mt=(ve,Ae)=>ve.map((Le,We,Xe)=>{if(Le===void 0)return Le;let rt=ar(Le);return We===0||ve[We-1]===void 0?rt:Ae(rt-ar(Xe[We-1]))}).reduce((Le,We)=>!Le.length||We===void 0||Le[Le.length-1]===void 0?(Le.push(We),Le):(Le.push(We+Le[Le.length-1]),Le),[]),gt=ve=>mt(ve,Ae=>Math.abs(Ae)<=180?Ae:Ae-360*Math.sign(Ae)),St=ve=>mt(ve,Ae=>Math.abs(Ae)>=180||Ae===0?Ae:Ae-360*Math.sign(Ae)),Dt=ve=>mt(ve,Ae=>Ae>=0?Ae:Ae+360),kt=ve=>mt(ve,Ae=>Ae<=0?Ae:Ae-360),Vt=[-.14861,1.78277,-.29227,-.90649,1.97294,0],lr=Math.PI/180,dr=180/Math.PI,yr=Vt[3]*Vt[4],vr=Vt[1]*Vt[4],Fr=Vt[1]*Vt[2]-Vt[0]*Vt[3],la=({r:ve,g:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=(Fr*Le+ve*yr-Ae*vr)/(Fr+yr-vr),rt=Le-Xe,Ct=(Vt[4]*(Ae-Xe)-Vt[2]*rt)/Vt[3],Jt={mode:"cubehelix",l:Xe,s:Xe===0||Xe===1?void 0:Math.sqrt(rt*rt+Ct*Ct)/(Vt[4]*Xe*(1-Xe))};return Jt.s&&(Jt.h=Math.atan2(Ct,rt)*dr-120),We!==void 0&&(Jt.alpha=We),Jt},Hr=la,jr=({h:ve,s:Ae,l:Le,alpha:We})=>{let Xe={mode:"rgb"};ve=(ve===void 0?0:ve+120)*lr,Le===void 0&&(Le=0);let rt=Ae===void 0?0:Ae*Le*(1-Le),Ct=Math.cos(ve),Jt=Math.sin(ve);return Xe.r=Le+rt*(Vt[0]*Ct+Vt[1]*Jt),Xe.g=Le+rt*(Vt[2]*Ct+Vt[3]*Jt),Xe.b=Le+rt*(Vt[4]*Ct+Vt[5]*Jt),We!==void 0&&(Xe.alpha=We),Xe},Oa=jr,Da=(ve,Ae)=>{if(ve.h===void 0||Ae.h===void 0||!ve.s||!Ae.s)return 0;let Le=ar(ve.h),We=ar(Ae.h),Xe=Math.sin((We-Le+360)/2*Math.PI/180);return 2*Math.sqrt(ve.s*Ae.s)*Xe},_i=(ve,Ae)=>{if(ve.h===void 0||Ae.h===void 0)return 0;let Le=ar(ve.h),We=ar(Ae.h);return Math.abs(We-Le)>180?Le-(We-360*Math.sign(We-Le)):We-Le},ti=(ve,Ae)=>{if(ve.h===void 0||Ae.h===void 0||!ve.c||!Ae.c)return 0;let Le=ar(ve.h),We=ar(Ae.h),Xe=Math.sin((We-Le+360)/2*Math.PI/180);return 2*Math.sqrt(ve.c*Ae.c)*Xe},Ka=(ve="rgb",Ae=[1,1,1,0])=>{let Le=J(ve),We=Le.channels,Xe=Le.difference,rt=L(ve);return(Ct,Jt)=>{let br=rt(Ct),ea=rt(Jt);return Math.sqrt(We.reduce((Vr,Ur,ba)=>{let ca=Xe[Ur]?Xe[Ur](br,ea):br[Ur]-ea[Ur];return Vr+(Ae[ba]||0)*Math.pow(isNaN(ca)?0:ca,2)},0))}},ia=()=>Ka("lab65"),na=(ve=1,Ae=.045,Le=.015)=>{let We=L("lab65");return(Xe,rt)=>{let Ct=We(Xe),Jt=We(rt),br=Ct.l,ea=Ct.a,Vr=Ct.b,Ur=Math.sqrt(ea*ea+Vr*Vr),ba=Jt.l,ca=Jt.a,_a=Jt.b,Ea=Math.sqrt(ca*ca+_a*_a),Ia=Math.pow(br-ba,2),Za=Math.pow(Ur-Ea,2),Mi=Math.pow(ea-ca,2)+Math.pow(Vr-_a,2)-Za;return Math.sqrt(Ia/Math.pow(ve,2)+Za/Math.pow(1+Ae*Ur,2)+Mi/Math.pow(1+Le*Ur,2))}},xi=(ve=1,Ae=1,Le=1)=>{let We=L("lab65");return(Xe,rt)=>{let Ct=We(Xe),Jt=We(rt),br=Ct.l,ea=Ct.a,Vr=Ct.b,Ur=Math.sqrt(ea*ea+Vr*Vr),ba=Jt.l,ca=Jt.a,_a=Jt.b,Ea=Math.sqrt(ca*ca+_a*_a),Ia=(Ur+Ea)/2,Za=.5*(1-Math.sqrt(Math.pow(Ia,7)/(Math.pow(Ia,7)+Math.pow(25,7)))),Mi=ea*(1+Za),lo=ca*(1+Za),ps=Math.sqrt(Mi*Mi+Vr*Vr),Qs=Math.sqrt(lo*lo+_a*_a),bl=Math.abs(Mi)+Math.abs(Vr)===0?0:Math.atan2(Vr,Mi);bl+=(bl<0)*2*Math.PI;let Fl=Math.abs(lo)+Math.abs(_a)===0?0:Math.atan2(_a,lo);Fl+=(Fl<0)*2*Math.PI;let bu=ba-br,ah=Qs-ps,dd=ps*Qs===0?0:Fl-bl;dd-=(dd>Math.PI)*2*Math.PI,dd+=(dd<-Math.PI)*2*Math.PI;let Dp=2*Math.sqrt(ps*Qs)*Math.sin(dd/2),gm=(br+ba)/2,ym=(ps+Qs)/2,ih;ps*Qs===0?ih=bl+Fl:(ih=(bl+Fl)/2,ih-=(Math.abs(bl-Fl)>Math.PI)*Math.PI,ih+=(ih<0)*2*Math.PI);let v4=Math.pow(gm-50,2),m4=1-.17*Math.cos(ih-Math.PI/6)+.24*Math.cos(2*ih)+.32*Math.cos(3*ih+Math.PI/30)-.2*Math.cos(4*ih-63*Math.PI/180),fx=1+.015*v4/Math.sqrt(20+v4),hx=1+.045*ym,ng=1+.015*ym*m4,q7=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*ih-275)/25,2)),g4=2*Math.sqrt(Math.pow(ym,7)/(Math.pow(ym,7)+Math.pow(25,7))),dx=-1*Math.sin(2*q7)*g4;return Math.sqrt(Math.pow(bu/(ve*fx),2)+Math.pow(ah/(Ae*hx),2)+Math.pow(Dp/(Le*ng),2)+dx*ah/(Ae*hx)*Dp/(Le*ng))}},Yi=(ve=1,Ae=1)=>{let Le=L("lab65");return(We,Xe)=>{let rt=Le(We),Ct=rt.l,Jt=rt.a,br=rt.b,ea=Math.sqrt(Jt*Jt+br*br),Vr=Math.atan2(br,Jt);Vr=Vr+2*Math.PI*(Vr<0);let Ur=Le(Xe),ba=Ur.l,ca=Ur.a,_a=Ur.b,Ea=Math.sqrt(ca*ca+_a*_a),Ia=Math.pow(Ct-ba,2),Za=Math.pow(ea-Ea,2),Mi=Math.pow(Jt-ca,2)+Math.pow(br-_a,2)-Za,lo=Math.sqrt(Math.pow(ea,4)/(Math.pow(ea,4)+1900)),ps=Vr>=164/180*Math.PI&&Vr<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(Vr+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(Vr+35/180*Math.PI)),Qs=Ct<16?.511:.040975*Ct/(1+.01765*Ct),bl=.0638*ea/(1+.0131*ea)+.638,Fl=bl*(lo*ps+1-lo);return Math.sqrt(Ia/Math.pow(ve*Qs,2)+Za/Math.pow(Ae*bl,2)+Mi/Math.pow(Fl,2))}},Qr=()=>{let ve=L("lab65");return(Ae,Le)=>{let We=ve(Ae),Xe=ve(Le),rt=We.l-Xe.l,Ct=We.a-Xe.a,Jt=We.b-Xe.b;return Math.abs(rt)+Math.sqrt(Ct*Ct+Jt*Jt)}},Nr=()=>Ka("yiq",[.5053,.299,.1957]),Oe=()=>Ka("itp",[518400,129600,518400]),Ie=ve=>{let Ae=ve.reduce((We,Xe)=>{if(Xe!==void 0){let rt=Xe*Math.PI/180;We.sin+=Math.sin(rt),We.cos+=Math.cos(rt)}return We},{sin:0,cos:0}),Le=Math.atan2(Ae.sin,Ae.cos)*180/Math.PI;return Le<0?360+Le:Le},Et=ve=>{let Ae=ve.filter(Le=>Le!==void 0);return Ae.length?Ae.reduce((Le,We)=>Le+We,0)/Ae.length:void 0},Mt=ve=>typeof ve=="function";function zt(ve,Ae="rgb",Le){let We=J(Ae),Xe=ve.map(L(Ae));return We.channels.reduce((rt,Ct)=>{let Jt=Xe.map(br=>br[Ct]).filter(br=>br!==void 0);if(Jt.length){let br;Mt(Le)?br=Le:Le&&Mt(Le[Ct])?br=Le[Ct]:We.average&&Mt(We.average[Ct])?br=We.average[Ct]:br=Et,rt[Ct]=br(Jt,Ct)}return rt},{mode:Ae})}var Gt={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Hr},toMode:{rgb:Oa},interpolate:{h:{use:Ke,fixup:gt},s:Ke,l:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:Da},average:{h:Ie}},Ht=Gt,Be=({l:ve,a:Ae,b:Le,alpha:We},Xe="lch")=>{Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let rt=Math.sqrt(Ae*Ae+Le*Le),Ct={mode:Xe,l:ve,c:rt};return rt&&(Ct.h=ar(Math.atan2(Le,Ae)*180/Math.PI)),We!==void 0&&(Ct.alpha=We),Ct},et=Be,ut=({l:ve,c:Ae,h:Le,alpha:We},Xe="lab")=>{Le===void 0&&(Le=0);let rt={mode:Xe,l:ve,a:Ae?Ae*Math.cos(Le/180*Math.PI):0,b:Ae?Ae*Math.sin(Le/180*Math.PI):0};return We!==void 0&&(rt.alpha=We),rt},bt=ut,Ot=Math.pow(29,3)/Math.pow(3,3),It=Math.pow(6,3)/Math.pow(29,3),Wt={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},jt={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},sr=Math.pow(29,3)/Math.pow(3,3),kr=Math.pow(6,3)/Math.pow(29,3),Mr=ve=>Math.pow(ve,3)>It?Math.pow(ve,3):(116*ve-16)/Ot,ua=({l:ve,a:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=(ve+16)/116,rt=Ae/500+Xe,Ct=Xe-Le/200,Jt={mode:"xyz65",x:Mr(rt)*jt.X,y:Mr(Xe)*jt.Y,z:Mr(Ct)*jt.Z};return We!==void 0&&(Jt.alpha=We),Jt},ra=ua,ni=ve=>ct(ra(ve)),Ca=ni,Li=ve=>ve>It?Math.cbrt(ve):(Ot*ve+16)/116,Va=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Li(ve/jt.X),rt=Li(Ae/jt.Y),Ct=Li(Le/jt.Z),Jt={mode:"lab65",l:116*rt-16,a:500*(Xe-rt),b:200*(rt-Ct)};return We!==void 0&&(Jt.alpha=We),Jt},dn=Va,rn=ve=>{let Ae=dn(Fe(ve));return ve.r===ve.b&&ve.b===ve.g&&(Ae.a=Ae.b=0),Ae},pa=rn,_n=1,Zi=1,Fi=26/180*Math.PI,xn=Math.cos(Fi),Ni=Math.sin(Fi),un=100/Math.log(139/100),jn=({l:ve,c:Ae,h:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"lab65",l:(Math.exp(ve*_n/un)-1)/.0039},rt=(Math.exp(.0435*Ae*Zi*_n)-1)/.075,Ct=rt*Math.cos(Le/180*Math.PI-Fi),Jt=rt*Math.sin(Le/180*Math.PI-Fi);return Xe.a=Ct*xn-Jt/.83*Ni,Xe.b=Ct*Ni+Jt/.83*xn,We!==void 0&&(Xe.alpha=We),Xe},bn=jn,Wa=({l:ve,a:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Ae*xn+Le*Ni,rt=.83*(Le*xn-Ae*Ni),Ct=Math.sqrt(Xe*Xe+rt*rt),Jt={mode:"dlch",l:un/_n*Math.log(1+.0039*ve),c:Math.log(1+.075*Ct)/(.0435*Zi*_n)};return Jt.c&&(Jt.h=ar((Math.atan2(rt,Xe)+Fi)/Math.PI*180)),We!==void 0&&(Jt.alpha=We),Jt},ui=Wa,Hi=ve=>bn(et(ve,"dlch")),Vi=ve=>bt(ui(ve),"dlab"),$n={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Hi,rgb:ve=>Ca(Hi(ve))},fromMode:{lab65:Vi,rgb:ve=>Vi(pa(ve))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ke,a:Ke,b:Ke,alpha:{use:Ke,fixup:dt}}},ro=$n,Un={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:bn,dlab:ve=>bt(ve,"dlab"),rgb:ve=>Ca(bn(ve))},fromMode:{lab65:ui,dlab:ve=>et(ve,"dlch"),rgb:ve=>ui(pa(ve))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ke,c:Ke,h:{use:Ke,fixup:gt},alpha:{use:Ke,fixup:dt}},difference:{h:ti},average:{h:Ie}},Kn=Un;function To({h:ve,s:Ae,i:Le,alpha:We}){ve=ar(ve!==void 0?ve:0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.abs(ve/60%2-1),rt;switch(Math.floor(ve/60)){case 0:rt={r:Le*(1+Ae*(3/(2-Xe)-1)),g:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1)),b:Le*(1-Ae)};break;case 1:rt={r:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1)),g:Le*(1+Ae*(3/(2-Xe)-1)),b:Le*(1-Ae)};break;case 2:rt={r:Le*(1-Ae),g:Le*(1+Ae*(3/(2-Xe)-1)),b:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1))};break;case 3:rt={r:Le*(1-Ae),g:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1)),b:Le*(1+Ae*(3/(2-Xe)-1))};break;case 4:rt={r:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1)),g:Le*(1-Ae),b:Le*(1+Ae*(3/(2-Xe)-1))};break;case 5:rt={r:Le*(1+Ae*(3/(2-Xe)-1)),g:Le*(1-Ae),b:Le*(1+Ae*(3*(1-Xe)/(2-Xe)-1))};break;default:rt={r:Le*(1-Ae),g:Le*(1-Ae),b:Le*(1-Ae)}}return rt.mode="rgb",We!==void 0&&(rt.alpha=We),rt}function Jn({r:ve,g:Ae,b:Le,alpha:We}){ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.max(ve,Ae,Le),rt=Math.min(ve,Ae,Le),Ct={mode:"hsi",s:ve+Ae+Le===0?0:1-3*rt/(ve+Ae+Le),i:(ve+Ae+Le)/3};return Xe-rt!==0&&(Ct.h=(Xe===ve?(Ae-Le)/(Xe-rt)+(Ae{switch(Ae){case"deg":return+ve;case"rad":return ve/Math.PI*180;case"grad":return ve/10*9;case"turn":return ve*360}},uo=os,Yn=new RegExp(`^hsla?\\(\\s*${k}${b}${E}${b}${E}\\s*(?:,\\s*${C}\\s*)?\\)$`),go=ve=>{let Ae=ve.match(Yn);if(!Ae)return;let Le={mode:"hsl"};return Ae[3]!==void 0?Le.h=+Ae[3]:Ae[1]!==void 0&&Ae[2]!==void 0&&(Le.h=uo(Ae[1],Ae[2])),Ae[4]!==void 0&&(Le.s=Math.min(Math.max(0,Ae[4]/100),1)),Ae[5]!==void 0&&(Le.l=Math.min(Math.max(0,Ae[5]/100),1)),Ae[6]!==void 0?Le.alpha=Math.max(0,Math.min(1,Ae[6]/100)):Ae[7]!==void 0&&(Le.alpha=Math.max(0,Math.min(1,+Ae[7]))),Le},Cn=go;function Xo(ve,Ae){if(!Ae||Ae[0]!=="hsl"&&Ae[0]!=="hsla")return;let Le={mode:"hsl"},[,We,Xe,rt,Ct]=Ae;if(We.type!==V.None){if(We.type===V.Percentage)return;Le.h=We.value}if(Xe.type!==V.None){if(Xe.type===V.Hue)return;Le.s=Xe.value/100}if(rt.type!==V.None){if(rt.type===V.Hue)return;Le.l=rt.value/100}return Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var gs=Xo,yo={mode:"hsl",toMode:{rgb:zn},fromMode:{rgb:wn},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[gs,Cn],serialize:ve=>`hsl(${ve.h!==void 0?ve.h:"none"} ${ve.s!==void 0?ve.s*100+"%":"none"} ${ve.l!==void 0?ve.l*100+"%":"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`,interpolate:{h:{use:Ke,fixup:gt},s:Ke,l:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:Da},average:{h:Ie}},sl=yo;function ss({h:ve,s:Ae,v:Le,alpha:We}){ve=ar(ve!==void 0?ve:0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.abs(ve/60%2-1),rt;switch(Math.floor(ve/60)){case 0:rt={r:Le,g:Le*(1-Ae*Xe),b:Le*(1-Ae)};break;case 1:rt={r:Le*(1-Ae*Xe),g:Le,b:Le*(1-Ae)};break;case 2:rt={r:Le*(1-Ae),g:Le,b:Le*(1-Ae*Xe)};break;case 3:rt={r:Le*(1-Ae),g:Le*(1-Ae*Xe),b:Le};break;case 4:rt={r:Le*(1-Ae*Xe),g:Le*(1-Ae),b:Le};break;case 5:rt={r:Le,g:Le*(1-Ae),b:Le*(1-Ae*Xe)};break;default:rt={r:Le*(1-Ae),g:Le*(1-Ae),b:Le*(1-Ae)}}return rt.mode="rgb",We!==void 0&&(rt.alpha=We),rt}function oo({r:ve,g:Ae,b:Le,alpha:We}){ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.max(ve,Ae,Le),rt=Math.min(ve,Ae,Le),Ct={mode:"hsv",s:Xe===0?0:1-rt/Xe,v:Xe};return Xe-rt!==0&&(Ct.h=(Xe===ve?(Ae-Le)/(Xe-rt)+(Ae1){let Xe=Ae+Le;Ae/=Xe,Le/=Xe}return ss({h:ve,s:Le===1?1:1-Ae/(1-Le),v:1-Le,alpha:We})}function Bl(ve){let Ae=oo(ve);if(Ae===void 0)return;let Le=Ae.s!==void 0?Ae.s:0,We=Ae.v!==void 0?Ae.v:0,Xe={mode:"hwb",w:(1-Le)*We,b:1-We};return Ae.h!==void 0&&(Xe.h=Ae.h),Ae.alpha!==void 0&&(Xe.alpha=Ae.alpha),Xe}function Lu(ve,Ae){if(!Ae||Ae[0]!=="hwb")return;let Le={mode:"hwb"},[,We,Xe,rt,Ct]=Ae;if(We.type!==V.None){if(We.type===V.Percentage)return;Le.h=We.value}if(Xe.type!==V.None){if(Xe.type===V.Hue)return;Le.w=Xe.value/100}if(rt.type!==V.None){if(rt.type===V.Hue)return;Le.b=rt.value/100}return Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var Jl=Lu,Fu={mode:"hwb",toMode:{rgb:Po},fromMode:{rgb:Bl},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Jl],serialize:ve=>`hwb(${ve.h!==void 0?ve.h:"none"} ${ve.w!==void 0?ve.w*100+"%":"none"} ${ve.b!==void 0?ve.b*100+"%":"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`,interpolate:{h:{use:Ke,fixup:gt},w:Ke,b:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:_i},average:{h:Ie}},Pu=Fu,Ku=203,mu=.1593017578125,$c=78.84375,Ju=.8359375,Ol=18.8515625,Yc=18.6875;function Qu(ve){if(ve<0)return 0;let Ae=Math.pow(ve,1/$c);return 1e4*Math.pow(Math.max(0,Ae-Ju)/(Ol-Yc*Ae),1/mu)}function Sl(ve){if(ve<0)return 0;let Ae=Math.pow(ve/1e4,mu);return Math.pow((Ju+Ol*Ae)/(1+Yc*Ae),$c)}var cs=ve=>Math.max(ve/Ku,0),Qo=({i:ve,t:Ae,p:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Qu(ve+.008609037037932761*Ae+.11102962500302593*Le),rt=Qu(ve-.00860903703793275*Ae-.11102962500302599*Le),Ct=Qu(ve+.5600313357106791*Ae-.32062717498731885*Le),Jt={mode:"xyz65",x:cs(2.070152218389422*Xe-1.3263473389671556*rt+.2066510476294051*Ct),y:cs(.3647385209748074*Xe+.680566024947227*rt-.0453045459220346*Ct),z:cs(-.049747207535812*Xe-.0492609666966138*rt+1.1880659249923042*Ct)};return We!==void 0&&(Jt.alpha=We),Jt},ml=Qo,Xc=(ve=0)=>Math.max(ve*Ku,0),Zc=({x:ve,y:Ae,z:Le,alpha:We})=>{let Xe=Xc(ve),rt=Xc(Ae),Ct=Xc(Le),Jt=Sl(.3592832590121217*Xe+.6976051147779502*rt-.0358915932320289*Ct),br=Sl(-.1920808463704995*Xe+1.1004767970374323*rt+.0753748658519118*Ct),ea=Sl(.0070797844607477*Xe+.0748396662186366*rt+.8433265453898765*Ct),Vr=.5*Jt+.5*br,Ur=1.61376953125*Jt-3.323486328125*br+1.709716796875*ea,ba=4.378173828125*Jt-4.24560546875*br-.132568359375*ea,ca={mode:"itp",i:Vr,t:Ur,p:ba};return We!==void 0&&(ca.alpha=We),ca},kc=Zc,ed={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ml,rgb:ve=>ct(ml(ve))},fromMode:{xyz65:kc,rgb:ve=>kc(Fe(ve))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ke,t:Ke,p:Ke,alpha:{use:Ke,fixup:dt}}},td=ed,bp=134.03437499999998,t0=16295499532821565e-27,ec=ve=>{if(ve<0)return 0;let Ae=Math.pow(ve/1e4,mu);return Math.pow((Ju+Ol*Ae)/(1+Yc*Ae),bp)},ys=(ve=0)=>Math.max(ve*203,0),rd=({x:ve,y:Ae,z:Le,alpha:We})=>{ve=ys(ve),Ae=ys(Ae),Le=ys(Le);let Xe=1.15*ve-.15*Le,rt=.66*Ae+.34*ve,Ct=ec(.41478972*Xe+.579999*rt+.014648*Le),Jt=ec(-.20151*Xe+1.120649*rt+.0531008*Le),br=ec(-.0166008*Xe+.2648*rt+.6684799*Le),ea=(Ct+Jt)/2,Vr={mode:"jab",j:.44*ea/(1-.56*ea)-t0,a:3.524*Ct-4.066708*Jt+.542708*br,b:.199076*Ct+1.096799*Jt-1.295875*br};return We!==void 0&&(Vr.alpha=We),Vr},Hf=rd,Kc=134.03437499999998,ad=16295499532821565e-27,Jc=ve=>{if(ve<0)return 0;let Ae=Math.pow(ve,1/Kc);return 1e4*Math.pow((Ju-Ae)/(Yc*Ae-Ol),1/mu)},Tf=ve=>ve/203,tc=({j:ve,a:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=(ve+ad)/(.44+.56*(ve+ad)),rt=Jc(Xe+.13860504*Ae+.058047316*Le),Ct=Jc(Xe-.13860504*Ae-.058047316*Le),Jt=Jc(Xe-.096019242*Ae-.8118919*Le),br={mode:"xyz65",x:Tf(1.661373024652174*rt-.914523081304348*Ct+.23136208173913045*Jt),y:Tf(-.3250758611844533*rt+1.571847026732543*Ct-.21825383453227928*Jt),z:Tf(-.090982811*rt-.31272829*Ct+1.5227666*Jt)};return We!==void 0&&(br.alpha=We),br},Wf=tc,xh=ve=>{let Ae=Hf(Fe(ve));return ve.r===ve.b&&ve.b===ve.g&&(Ae.a=Ae.b=0),Ae},Qc=xh,Wd=ve=>ct(Wf(ve)),bh=Wd,wp={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Qc,xyz65:Hf},toMode:{rgb:bh,xyz65:Wf},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ke,a:Ke,b:Ke,alpha:{use:Ke,fixup:dt}}},rc=wp,id=({j:ve,a:Ae,b:Le,alpha:We})=>{Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.sqrt(Ae*Ae+Le*Le),rt={mode:"jch",j:ve,c:Xe};return Xe&&(rt.h=ar(Math.atan2(Le,Ae)*180/Math.PI)),We!==void 0&&(rt.alpha=We),rt},Iu=id,wh=({j:ve,c:Ae,h:Le,alpha:We})=>{Le===void 0&&(Le=0);let Xe={mode:"jab",j:ve,a:Ae?Ae*Math.cos(Le/180*Math.PI):0,b:Ae?Ae*Math.sin(Le/180*Math.PI):0};return We!==void 0&&(Xe.alpha=We),Xe},Nl=wh,$f={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Nl,rgb:ve=>bh(Nl(ve))},fromMode:{rgb:ve=>Iu(Qc(ve)),jab:Iu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ke,fixup:gt},c:Ke,j:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:ti},average:{h:Ie}},ac=$f,Yf=Math.pow(29,3)/Math.pow(3,3),Xf=Math.pow(6,3)/Math.pow(29,3),Ah=ve=>Math.pow(ve,3)>Xf?Math.pow(ve,3):(116*ve-16)/Yf,nd=({l:ve,a:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=(ve+16)/116,rt=Ae/500+Xe,Ct=Xe-Le/200,Jt={mode:"xyz50",x:Ah(rt)*Wt.X,y:Ah(Xe)*Wt.Y,z:Ah(Ct)*Wt.Z};return We!==void 0&&(Jt.alpha=We),Jt},ef=nd,od=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=at({r:ve*3.1341359569958707-Ae*1.6173863321612538-.4906619460083532*Le,g:ve*-.978795502912089+Ae*1.916254567259524+.03344273116131949*Le,b:ve*.07195537988411677-Ae*.2289768264158322+1.405386058324125*Le});return We!==void 0&&(Xe.alpha=We),Xe},Cc=od,Ap=ve=>Cc(ef(ve)),kl=Ap,Ru=ve=>{let{r:Ae,g:Le,b:We,alpha:Xe}=De(ve),rt={mode:"xyz50",x:.436065742824811*Ae+.3851514688337912*Le+.14307845442264197*We,y:.22249319175623702*Ae+.7168870538238823*Le+.06061979053616537*We,z:.013923904500943465*Ae+.09708128566574634*Le+.7140993584005155*We};return Xe!==void 0&&(rt.alpha=Xe),rt},tf=Ru,yl=ve=>ve>Xf?Math.cbrt(ve):(Yf*ve+16)/116,Th=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=yl(ve/Wt.X),rt=yl(Ae/Wt.Y),Ct=yl(Le/Wt.Z),Jt={mode:"lab",l:116*rt-16,a:500*(Xe-rt),b:200*(rt-Ct)};return We!==void 0&&(Jt.alpha=We),Jt},ic=Th,rf=ve=>{let Ae=ic(tf(ve));return ve.r===ve.b&&ve.b===ve.g&&(Ae.a=Ae.b=0),Ae},Mh=rf;function Tp(ve,Ae){if(!Ae||Ae[0]!=="lab")return;let Le={mode:"lab"},[,We,Xe,rt,Ct]=Ae;if(!(We.type===V.Hue||Xe.type===V.Hue||rt.type===V.Hue))return We.type!==V.None&&(Le.l=Math.min(Math.max(0,We.value),100)),Xe.type!==V.None&&(Le.a=Xe.type===V.Number?Xe.value:Xe.value*125/100),rt.type!==V.None&&(Le.b=rt.type===V.Number?rt.value:rt.value*125/100),Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var $d=Tp,nc={mode:"lab",toMode:{xyz50:ef,rgb:kl},fromMode:{xyz50:ic,rgb:Mh},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[$d],serialize:ve=>`lab(${ve.l!==void 0?ve.l:"none"} ${ve.a!==void 0?ve.a:"none"} ${ve.b!==void 0?ve.b:"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`,interpolate:{l:Ke,a:Ke,b:Ke,alpha:{use:Ke,fixup:dt}}},Ql=nc,eu=Ci(ja({},Ql),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ra,rgb:Ca},fromMode:{xyz65:dn,rgb:pa},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),Mp=eu;function Zf(ve,Ae){if(!Ae||Ae[0]!=="lch")return;let Le={mode:"lch"},[,We,Xe,rt,Ct]=Ae;if(We.type!==V.None){if(We.type===V.Hue)return;Le.l=Math.min(Math.max(0,We.value),100)}if(Xe.type!==V.None&&(Le.c=Math.max(0,Xe.type===V.Number?Xe.value:Xe.value*150/100)),rt.type!==V.None){if(rt.type===V.Percentage)return;Le.h=rt.value}return Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var Yd=Zf,gu={mode:"lch",toMode:{lab:bt,rgb:ve=>kl(bt(ve))},fromMode:{rgb:ve=>et(Mh(ve)),lab:et},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Yd],serialize:ve=>`lch(${ve.l!==void 0?ve.l:"none"} ${ve.c!==void 0?ve.c:"none"} ${ve.h!==void 0?ve.h:"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`,interpolate:{h:{use:Ke,fixup:gt},c:Ke,l:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:ti},average:{h:Ie}},Mf=gu,Eh=Ci(ja({},Mf),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:ve=>bt(ve,"lab65"),rgb:ve=>Ca(bt(ve,"lab65"))},fromMode:{rgb:ve=>et(pa(ve),"lch65"),lab65:ve=>et(ve,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Kf=Eh,Ep=({l:ve,u:Ae,v:Le,alpha:We})=>{Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.sqrt(Ae*Ae+Le*Le),rt={mode:"lchuv",l:ve,c:Xe};return Xe&&(rt.h=ar(Math.atan2(Le,Ae)*180/Math.PI)),We!==void 0&&(rt.alpha=We),rt},Ef=Ep,af=({l:ve,c:Ae,h:Le,alpha:We})=>{Le===void 0&&(Le=0);let Xe={mode:"luv",l:ve,u:Ae?Ae*Math.cos(Le/180*Math.PI):0,v:Ae?Ae*Math.sin(Le/180*Math.PI):0};return We!==void 0&&(Xe.alpha=We),Xe},nf=af,Jf=(ve,Ae,Le)=>4*ve/(ve+15*Ae+3*Le),Xd=(ve,Ae,Le)=>9*Ae/(ve+15*Ae+3*Le),Sh=Jf(Wt.X,Wt.Y,Wt.Z),Sf=Xd(Wt.X,Wt.Y,Wt.Z),kh=ve=>ve<=Xf?Yf*ve:116*Math.cbrt(ve)-16,kf=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=kh(Ae/Wt.Y),rt=Jf(ve,Ae,Le),Ct=Xd(ve,Ae,Le);!isFinite(rt)||!isFinite(Ct)?Xe=rt=Ct=0:(rt=13*Xe*(rt-Sh),Ct=13*Xe*(Ct-Sf));let Jt={mode:"luv",l:Xe,u:rt,v:Ct};return We!==void 0&&(Jt.alpha=We),Jt},Dc=kf,Qf=(ve,Ae,Le)=>4*ve/(ve+15*Ae+3*Le),Ch=(ve,Ae,Le)=>9*Ae/(ve+15*Ae+3*Le),Zd=Qf(Wt.X,Wt.Y,Wt.Z),sd=Ch(Wt.X,Wt.Y,Wt.Z),Sp=({l:ve,u:Ae,v:Le,alpha:We})=>{if(ve===void 0&&(ve=0),ve===0)return{mode:"xyz50",x:0,y:0,z:0};Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Ae/(13*ve)+Zd,rt=Le/(13*ve)+sd,Ct=Wt.Y*(ve<=8?ve/Yf:Math.pow((ve+16)/116,3)),Jt=Ct*(9*Xe)/(4*rt),br=Ct*(12-3*Xe-20*rt)/(4*rt),ea={mode:"xyz50",x:Jt,y:Ct,z:br};return We!==void 0&&(ea.alpha=We),ea},Dh=Sp,Kd=ve=>Ef(Dc(tf(ve))),ld=ve=>Cc(Dh(nf(ve))),Ks={mode:"lchuv",toMode:{luv:nf,rgb:ld},fromMode:{rgb:Kd,luv:Ef},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Ke,fixup:gt},c:Ke,l:Ke,alpha:{use:Ke,fixup:dt}},difference:{h:ti},average:{h:Ie}},yu=Ks,Lh=Ci(ja({},Pt),{mode:"lrgb",toMode:{rgb:at},fromMode:{rgb:De},parse:["srgb-linear"],serialize:"srgb-linear"}),ud=Lh,Fh={mode:"luv",toMode:{xyz50:Dh,rgb:ve=>Cc(Dh(ve))},fromMode:{xyz50:Dc,rgb:ve=>Dc(tf(ve))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:Ke,u:Ke,v:Ke,alpha:{use:Ke,fixup:dt}}},eh=Fh,it=({r:ve,g:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.cbrt(.412221469470763*ve+.5363325372617348*Ae+.0514459932675022*Le),rt=Math.cbrt(.2119034958178252*ve+.6806995506452344*Ae+.1073969535369406*Le),Ct=Math.cbrt(.0883024591900564*ve+.2817188391361215*Ae+.6299787016738222*Le),Jt={mode:"oklab",l:.210454268309314*Xe+.7936177747023054*rt-.0040720430116193*Ct,a:1.9779985324311684*Xe-2.42859224204858*rt+.450593709617411*Ct,b:.0259040424655478*Xe+.7827717124575296*rt-.8086757549230774*Ct};return We!==void 0&&(Jt.alpha=We),Jt},wt=it,$t=ve=>{let Ae=wt(De(ve));return ve.r===ve.b&&ve.b===ve.g&&(Ae.a=Ae.b=0),Ae},Bt=$t,cr=({l:ve,a:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=Math.pow(ve+.3963377773761749*Ae+.2158037573099136*Le,3),rt=Math.pow(ve-.1055613458156586*Ae-.0638541728258133*Le,3),Ct=Math.pow(ve-.0894841775298119*Ae-1.2914855480194092*Le,3),Jt={mode:"lrgb",r:4.076741636075957*Xe-3.3077115392580616*rt+.2309699031821044*Ct,g:-1.2684379732850317*Xe+2.6097573492876887*rt-.3413193760026573*Ct,b:-.0041960761386756*Xe-.7034186179359362*rt+1.7076146940746117*Ct};return We!==void 0&&(Jt.alpha=We),Jt},Sr=cr,Pr=ve=>at(Sr(ve)),qr=Pr;function $r(ve){let We=1.170873786407767;return .5*(We*ve-.206+Math.sqrt((We*ve-.206)*(We*ve-.206)+4*.03*We*ve))}function va(ve){return(ve*ve+.206*ve)/(1.170873786407767*(ve+.03))}function Rr(ve,Ae){let Le,We,Xe,rt,Ct,Jt,br,ea;-1.88170328*ve-.80936493*Ae>1?(Le=1.19086277,We=1.76576728,Xe=.59662641,rt=.75515197,Ct=.56771245,Jt=4.0767416621,br=-3.3077115913,ea=.2309699292):1.81444104*ve-1.19445276*Ae>1?(Le=.73956515,We=-.45954404,Xe=.08285427,rt=.1254107,Ct=.14503204,Jt=-1.2684380046,br=2.6097574011,ea=-.3413193965):(Le=1.35733652,We=-.00915799,Xe=-1.1513021,rt=-.50559606,Ct=.00692167,Jt=-.0041960863,br=-.7034186147,ea=1.707614701);let Vr=Le+We*ve+Xe*Ae+rt*ve*ve+Ct*ve*Ae,Ur=.3963377774*ve+.2158037573*Ae,ba=-.1055613458*ve-.0638541728*Ae,ca=-.0894841775*ve-1.291485548*Ae;{let _a=1+Vr*Ur,Ea=1+Vr*ba,Ia=1+Vr*ca,Za=_a*_a*_a,Mi=Ea*Ea*Ea,lo=Ia*Ia*Ia,ps=3*Ur*_a*_a,Qs=3*ba*Ea*Ea,bl=3*ca*Ia*Ia,Fl=6*Ur*Ur*_a,bu=6*ba*ba*Ea,ah=6*ca*ca*Ia,dd=Jt*Za+br*Mi+ea*lo,Dp=Jt*ps+br*Qs+ea*bl,gm=Jt*Fl+br*bu+ea*ah;Vr=Vr-dd*Dp/(Dp*Dp-.5*dd*gm)}return Vr}function Gr(ve,Ae){let Le=Rr(ve,Ae),We=Sr({l:1,a:Le*ve,b:Le*Ae}),Xe=Math.cbrt(1/Math.max(We.r,We.g,We.b)),rt=Xe*Le;return[Xe,rt]}function Yr(ve,Ae,Le,We,Xe,rt=null){rt||(rt=Gr(ve,Ae));let Ct;if((Le-Xe)*rt[1]-(rt[0]-Xe)*We<=0)Ct=rt[1]*Xe/(We*rt[0]+rt[1]*(Xe-Le));else{Ct=rt[1]*(Xe-1)/(We*(rt[0]-1)+rt[1]*(Xe-Le));{let Jt=Le-Xe,br=We,ea=.3963377774*ve+.2158037573*Ae,Vr=-.1055613458*ve-.0638541728*Ae,Ur=-.0894841775*ve-1.291485548*Ae,ba=Jt+br*ea,ca=Jt+br*Vr,_a=Jt+br*Ur;{let Ea=Xe*(1-Ct)+Ct*Le,Ia=Ct*We,Za=Ea+Ia*ea,Mi=Ea+Ia*Vr,lo=Ea+Ia*Ur,ps=Za*Za*Za,Qs=Mi*Mi*Mi,bl=lo*lo*lo,Fl=3*ba*Za*Za,bu=3*ca*Mi*Mi,ah=3*_a*lo*lo,dd=6*ba*ba*Za,Dp=6*ca*ca*Mi,gm=6*_a*_a*lo,ym=4.0767416621*ps-3.3077115913*Qs+.2309699292*bl-1,ih=4.0767416621*Fl-3.3077115913*bu+.2309699292*ah,v4=4.0767416621*dd-3.3077115913*Dp+.2309699292*gm,m4=ih/(ih*ih-.5*ym*v4),fx=-ym*m4,hx=-1.2684380046*ps+2.6097574011*Qs-.3413193965*bl-1,ng=-1.2684380046*Fl+2.6097574011*bu-.3413193965*ah,q7=-1.2684380046*dd+2.6097574011*Dp-.3413193965*gm,g4=ng/(ng*ng-.5*hx*q7),dx=-hx*g4,BG=-.0041960863*ps-.7034186147*Qs+1.707614701*bl-1,V7=-.0041960863*Fl-.7034186147*bu+1.707614701*ah,nbe=-.0041960863*dd-.7034186147*Dp+1.707614701*gm,OG=V7/(V7*V7-.5*BG*nbe),G7=-BG*OG;fx=m4>=0?fx:1e6,dx=g4>=0?dx:1e6,G7=OG>=0?G7:1e6,Ct+=Math.min(fx,Math.min(dx,G7))}}}return Ct}function da(ve,Ae,Le=null){Le||(Le=Gr(ve,Ae));let We=Le[0],Xe=Le[1];return[Xe/We,Xe/(1-We)]}function La(ve,Ae,Le){let We=Gr(Ae,Le),Xe=Yr(Ae,Le,ve,1,ve,We),rt=da(Ae,Le,We),Ct=.11516993+1/(7.4477897+4.1590124*Le+Ae*(-2.19557347+1.75198401*Le+Ae*(-2.13704948-10.02301043*Le+Ae*(-4.24894561+5.38770819*Le+4.69891013*Ae)))),Jt=.11239642+1/(1.6132032-.68124379*Le+Ae*(.40370612+.90148123*Le+Ae*(-.27087943+.6122399*Le+Ae*(.00299215-.45399568*Le-.14661872*Ae)))),br=Xe/Math.min(ve*rt[0],(1-ve)*rt[1]),ea=ve*Ct,Vr=(1-ve)*Jt,Ur=.9*br*Math.sqrt(Math.sqrt(1/(1/(ea*ea*ea*ea)+1/(Vr*Vr*Vr*Vr))));return ea=ve*.4,Vr=(1-ve)*.8,[Math.sqrt(1/(1/(ea*ea)+1/(Vr*Vr))),Ur,Xe]}function gi(ve){let Ae=ve.l!==void 0?ve.l:0,Le=ve.a!==void 0?ve.a:0,We=ve.b!==void 0?ve.b:0,Xe={mode:"okhsl",l:$r(Ae)};ve.alpha!==void 0&&(Xe.alpha=ve.alpha);let rt=Math.sqrt(Le*Le+We*We);if(!rt)return Xe.s=0,Xe;let[Ct,Jt,br]=La(Ae,Le/rt,We/rt),ea;if(rtgi(Bt(ve))},toMode:{oklab:pi,rgb:ve=>qr(pi(ve))}}),ji=Pi;function Ra(ve){let Ae=ve.l!==void 0?ve.l:0,Le=ve.a!==void 0?ve.a:0,We=ve.b!==void 0?ve.b:0,Xe=Math.sqrt(Le*Le+We*We),rt=Xe?Le/Xe:1,Ct=Xe?We/Xe:1,[Jt,br]=da(rt,Ct),ea=.5,Vr=1-ea/Jt,Ur=br/(Xe+Ae*br),ba=Ur*Ae,ca=Ur*Xe,_a=va(ba),Ea=ca*_a/ba,Ia=Sr({l:_a,a:rt*Ea,b:Ct*Ea}),Za=Math.cbrt(1/Math.max(Ia.r,Ia.g,Ia.b,0));Ae=Ae/Za,Xe=Xe/Za*$r(Ae)/Ae,Ae=$r(Ae);let Mi={mode:"okhsv",s:Xe?(ea+br)*ca/(br*ea+br*Vr*ca):0,v:Ae?Ae/ba:0};return Mi.s&&(Mi.h=ar(Math.atan2(We,Le)*180/Math.PI)),ve.alpha!==void 0&&(Mi.alpha=ve.alpha),Mi}function Ga(ve){let Ae={mode:"oklab"};ve.alpha!==void 0&&(Ae.alpha=ve.alpha);let Le=ve.h!==void 0?ve.h:0,We=ve.s!==void 0?ve.s:0,Xe=ve.v!==void 0?ve.v:0,rt=Math.cos(Le/180*Math.PI),Ct=Math.sin(Le/180*Math.PI),[Jt,br]=da(rt,Ct),ea=.5,Vr=1-ea/Jt,Ur=1-We*ea/(ea+br-br*Vr*We),ba=We*br*ea/(ea+br-br*Vr*We),ca=va(Ur),_a=ba*ca/Ur,Ea=Sr({l:ca,a:rt*_a,b:Ct*_a}),Ia=Math.cbrt(1/Math.max(Ea.r,Ea.g,Ea.b,0)),Za=va(Xe*Ur),Mi=ba*Za/Ur;return Ae.l=Za*Ia,Ae.a=Mi*rt*Ia,Ae.b=Mi*Ct*Ia,Ae}var Ki=Ci(ja({},An),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Ra,rgb:ve=>Ra(Bt(ve))},toMode:{oklab:Ga,rgb:ve=>qr(Ga(ve))}}),pn=Ki;function ao(ve,Ae){if(!Ae||Ae[0]!=="oklab")return;let Le={mode:"oklab"},[,We,Xe,rt,Ct]=Ae;if(!(We.type===V.Hue||Xe.type===V.Hue||rt.type===V.Hue))return We.type!==V.None&&(Le.l=Math.min(Math.max(0,We.type===V.Number?We.value:We.value/100),1)),Xe.type!==V.None&&(Le.a=Xe.type===V.Number?Xe.value:Xe.value*.4/100),rt.type!==V.None&&(Le.b=rt.type===V.Number?rt.value:rt.value*.4/100),Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var Co=ao,ho=Ci(ja({},Ql),{mode:"oklab",toMode:{lrgb:Sr,rgb:qr},fromMode:{lrgb:wt,rgb:Bt},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Co],serialize:ve=>`oklab(${ve.l!==void 0?ve.l:"none"} ${ve.a!==void 0?ve.a:"none"} ${ve.b!==void 0?ve.b:"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`}),No=ho;function Wn(ve,Ae){if(!Ae||Ae[0]!=="oklch")return;let Le={mode:"oklch"},[,We,Xe,rt,Ct]=Ae;if(We.type!==V.None){if(We.type===V.Hue)return;Le.l=Math.min(Math.max(0,We.type===V.Number?We.value:We.value/100),1)}if(Xe.type!==V.None&&(Le.c=Math.max(0,Xe.type===V.Number?Xe.value:Xe.value*.4/100)),rt.type!==V.None){if(rt.type===V.Percentage)return;Le.h=rt.value}return Ct.type!==V.None&&(Le.alpha=Math.min(1,Math.max(0,Ct.type===V.Number?Ct.value:Ct.value/100))),Le}var Os=Wn,fs=Ci(ja({},Mf),{mode:"oklch",toMode:{oklab:ve=>bt(ve,"oklab"),rgb:ve=>qr(bt(ve,"oklab"))},fromMode:{rgb:ve=>et(Bt(ve),"oklch"),oklab:ve=>et(ve,"oklch")},parse:[Os],serialize:ve=>`oklch(${ve.l!==void 0?ve.l:"none"} ${ve.c!==void 0?ve.c:"none"} ${ve.h!==void 0?ve.h:"none"}${ve.alpha<1?` / ${ve.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),zo=fs,Qa=ve=>{let{r:Ae,g:Le,b:We,alpha:Xe}=De(ve),rt={mode:"xyz65",x:.486570948648216*Ae+.265667693169093*Le+.1982172852343625*We,y:.2289745640697487*Ae+.6917385218365062*Le+.079286914093745*We,z:0*Ae+.0451133818589026*Le+1.043944368900976*We};return Xe!==void 0&&(rt.alpha=Xe),rt},io=Qa,Ms=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=at({r:ve*2.4934969119414263-Ae*.9313836179191242-.402710784450717*Le,g:ve*-.8294889695615749+Ae*1.7626640603183465+.0236246858419436*Le,b:ve*.0358458302437845-Ae*.0761723892680418+.9568845240076871*Le},"p3");return We!==void 0&&(Xe.alpha=We),Xe},Ns=Ms,jl=Ci(ja({},Pt),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:ve=>Ns(Fe(ve)),xyz65:Ns},toMode:{rgb:ve=>ct(io(ve)),xyz65:io}}),zu=jl,tu=ve=>{let Ae=Math.abs(ve);return Ae>=1/512?Math.sign(ve)*Math.pow(Ae,1/1.8):16*ve},Lc=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"prophoto",r:tu(ve*1.3457868816471585-Ae*.2555720873797946-.0511018649755453*Le),g:tu(ve*-.5446307051249019+Ae*1.5082477428451466+.0205274474364214*Le),b:tu(ve*0+Ae*0+1.2119675456389452*Le)};return We!==void 0&&(Xe.alpha=We),Xe},Cl=Lc,oc=(ve=0)=>{let Ae=Math.abs(ve);return Ae>=16/512?Math.sign(ve)*Math.pow(Ae,1.8):ve/16},of=ve=>{let Ae=oc(ve.r),Le=oc(ve.g),We=oc(ve.b),Xe={mode:"xyz50",x:.7977666449006423*Ae+.1351812974005331*Le+.0313477341283922*We,y:.2880748288194013*Ae+.7118352342418731*Le+899369387256e-16*We,z:0*Ae+0*Le+.8251046025104602*We};return ve.alpha!==void 0&&(Xe.alpha=ve.alpha),Xe},Cf=of,Jd=Ci(ja({},Pt),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Cl,rgb:ve=>Cl(tf(ve))},toMode:{xyz50:Cf,rgb:ve=>Cc(Cf(ve))}}),Ph=Jd,kp=1.09929682680944,cd=.018053968510807,ru=ve=>{let Ae=Math.abs(ve);return Ae>cd?(Math.sign(ve)||1)*(kp*Math.pow(Ae,.45)-(kp-1)):4.5*ve},Cp=({x:ve,y:Ae,z:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"rec2020",r:ru(ve*1.7166511879712683-Ae*.3556707837763925-.2533662813736599*Le),g:ru(ve*-.6666843518324893+Ae*1.6164812366349395+.0157685458139111*Le),b:ru(ve*.0176398574453108-Ae*.0427706132578085+.9421031212354739*Le)};return We!==void 0&&(Xe.alpha=We),Xe},th=Cp,fd=1.09929682680944,hd=.018053968510807,sc=(ve=0)=>{let Ae=Math.abs(ve);return Ae{let Ae=sc(ve.r),Le=sc(ve.g),We=sc(ve.b),Xe={mode:"xyz65",x:.6369580483012911*Ae+.1446169035862083*Le+.1688809751641721*We,y:.262700212011267*Ae+.6779980715188708*Le+.059301716469862*We,z:0*Ae+.0280726930490874*Le+1.0609850577107909*We};return ve.alpha!==void 0&&(Xe.alpha=ve.alpha),Xe},Df=Qd,Ih=Ci(ja({},Pt),{mode:"rec2020",fromMode:{xyz65:th,rgb:ve=>th(Fe(ve))},toMode:{xyz65:Df,rgb:ve=>ct(Df(ve))},parse:["rec2020"],serialize:"rec2020"}),Lf=Ih,Bu=.0037930732552754493,Ff=Math.cbrt(Bu),rh=ve=>Math.cbrt(ve)-Ff,ep=ve=>{let{r:Ae,g:Le,b:We,alpha:Xe}=De(ve),rt=rh(.3*Ae+.622*Le+.078*We+Bu),Ct=rh(.23*Ae+.692*Le+.078*We+Bu),Jt=rh(.2434226892454782*Ae+.2047674442449682*Le+.5518098665095535*We+Bu),br={mode:"xyb",x:(rt-Ct)/2,y:(rt+Ct)/2,b:Jt-(rt+Ct)/2};return Xe!==void 0&&(br.alpha=Xe),br},au=ep,ke=ve=>Math.pow(ve+Ff,3),Re=({x:ve,y:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe=ke(ve+Ae)-Bu,rt=ke(Ae-ve)-Bu,Ct=ke(Le+Ae)-Bu,Jt=at({r:11.031566904639861*Xe-9.866943908131562*rt-.16462299650829934*Ct,g:-3.2541473810744237*Xe+4.418770377582723*rt-.16462299650829934*Ct,b:-3.6588512867136815*Xe+2.7129230459360922*rt+1.9459282407775895*Ct});return We!==void 0&&(Jt.alpha=We),Jt},He=Re,$e={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:He},fromMode:{rgb:au},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ke,y:Ke,b:Ke,alpha:{use:Ke,fixup:dt}}},ot=$e,nt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Cc,lab:ic},fromMode:{rgb:tf,lab:ef},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ke,y:Ke,z:Ke,alpha:{use:Ke,fixup:dt}}},ht=nt,Ut=ve=>{let{x:Ae,y:Le,z:We,alpha:Xe}=ve;Ae===void 0&&(Ae=0),Le===void 0&&(Le=0),We===void 0&&(We=0);let rt={mode:"xyz50",x:1.0479298208405488*Ae+.0229467933410191*Le-.0501922295431356*We,y:.0296278156881593*Ae+.990434484573249*Le-.0170738250293851*We,z:-.0092430581525912*Ae+.0150551448965779*Le+.7518742899580008*We};return Xe!==void 0&&(rt.alpha=Xe),rt},Xt=Ut,Nt=ve=>{let{x:Ae,y:Le,z:We,alpha:Xe}=ve;Ae===void 0&&(Ae=0),Le===void 0&&(Le=0),We===void 0&&(We=0);let rt={mode:"xyz65",x:.9554734527042182*Ae-.0230985368742614*Le+.0632593086610217*We,y:-.0283697069632081*Ae+1.0099954580058226*Le+.021041398966943*We,z:.0123140016883199*Ae-.0205076964334779*Le+1.3303659366080753*We};return Xe!==void 0&&(rt.alpha=Xe),rt},Zt=Nt,or={mode:"xyz65",toMode:{rgb:ct,xyz50:Xt},fromMode:{rgb:Fe,xyz50:Zt},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:Ke,y:Ke,z:Ke,alpha:{use:Ke,fixup:dt}}},gr=or,Er=({r:ve,g:Ae,b:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"yiq",y:.29889531*ve+.58662247*Ae+.11448223*Le,i:.59597799*ve-.2741761*Ae-.32180189*Le,q:.21147017*ve-.52261711*Ae+.31114694*Le};return We!==void 0&&(Xe.alpha=We),Xe},Br=Er,oa=({y:ve,i:Ae,q:Le,alpha:We})=>{ve===void 0&&(ve=0),Ae===void 0&&(Ae=0),Le===void 0&&(Le=0);let Xe={mode:"rgb",r:ve+.95608445*Ae+.6208885*Le,g:ve-.27137664*Ae-.6486059*Le,b:ve-1.10561724*Ae+1.70250126*Le};return We!==void 0&&(Xe.alpha=We),Xe},Ma=oa,si={mode:"yiq",toMode:{rgb:Ma},fromMode:{rgb:Br},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ke,i:Ke,q:Ke,alpha:{use:Ke,fixup:dt}}},Wi=si,Qi=(ve,Ae)=>Math.round(ve*(Ae=Math.pow(10,Ae)))/Ae,on=(ve=4)=>Ae=>typeof Ae=="number"?Qi(Ae,ve):Ae,yn=on,_o=yn(2),Io=ve=>Math.max(0,Math.min(1,ve||0)),Pn=ve=>Math.round(Io(ve)*255),es=L("rgb"),ll=L("hsl"),Dl=ve=>{if(ve===void 0)return;let Ae=Pn(ve.r),Le=Pn(ve.g),We=Pn(ve.b);return"#"+(1<<24|Ae<<16|Le<<8|We).toString(16).slice(1)},lc=ve=>{if(ve===void 0)return;let Ae=Pn(ve.alpha!==void 0?ve.alpha:1);return Dl(ve)+(256|Ae).toString(16).slice(1)},sf=ve=>{if(ve===void 0)return;let Ae=Pn(ve.r),Le=Pn(ve.g),We=Pn(ve.b);return ve.alpha===void 0||ve.alpha===1?`rgb(${Ae}, ${Le}, ${We})`:`rgba(${Ae}, ${Le}, ${We}, ${_o(Io(ve.alpha))})`},_l=ve=>{if(ve===void 0)return;let Ae=_o(ve.h||0),Le=_o(Io(ve.s)*100)+"%",We=_o(Io(ve.l)*100)+"%";return ve.alpha===void 0||ve.alpha===1?`hsl(${Ae}, ${Le}, ${We})`:`hsla(${Ae}, ${Le}, ${We}, ${_o(Io(ve.alpha))})`},xl=ve=>{let Ae=z(ve);if(!Ae)return;let Le=J(Ae.mode);if(!Le.serialize||typeof Le.serialize=="string"){let We=`color(${Le.serialize||`--${Ae.mode}`} `;return Le.channels.forEach((Xe,rt)=>{Xe!=="alpha"&&(We+=(rt?" ":"")+(Ae[Xe]!==void 0?Ae[Xe]:"none"))}),Ae.alpha!==void 0&&Ae.alpha<1&&(We+=` / ${Ae.alpha}`),We+")"}if(typeof Le.serialize=="function")return Le.serialize(Ae)},Ou=ve=>Dl(es(ve)),Fc=ve=>lc(es(ve)),Pc=ve=>sf(es(ve)),Ic=ve=>_l(ll(ve)),lf={normal:(ve,Ae)=>Ae,multiply:(ve,Ae)=>ve*Ae,screen:(ve,Ae)=>ve+Ae-ve*Ae,"hard-light":(ve,Ae)=>Ae<.5?ve*2*Ae:2*Ae*(1-ve)-1,overlay:(ve,Ae)=>ve<.5?Ae*2*ve:2*ve*(1-Ae)-1,darken:(ve,Ae)=>Math.min(ve,Ae),lighten:(ve,Ae)=>Math.max(ve,Ae),"color-dodge":(ve,Ae)=>ve===0?0:Ae===1?1:Math.min(1,ve/(1-Ae)),"color-burn":(ve,Ae)=>ve===1?1:Ae===0?0:1-Math.min(1,(1-ve)/Ae),"soft-light":(ve,Ae)=>Ae<.5?ve-(1-2*Ae)*ve*(1-ve):ve+(2*Ae-1)*((ve<.25?((16*ve-12)*ve+4)*ve:Math.sqrt(ve))-ve),difference:(ve,Ae)=>Math.abs(ve-Ae),exclusion:(ve,Ae)=>ve+Ae-2*ve*Ae},uc=(ve,Ae="normal",Le="rgb")=>{let We=typeof Ae=="function"?Ae:lf[Ae],Xe=L(Le),rt=J(Le).channels;return ve.map(Jt=>{let br=Xe(Jt);return br.alpha===void 0&&(br.alpha=1),br}).reduce((Jt,br)=>{if(Jt===void 0)return br;let ea=br.alpha+Jt.alpha*(1-br.alpha);return rt.reduce((Vr,Ur)=>(Ur!=="alpha"&&(ea===0?Vr[Ur]=0:(Vr[Ur]=br.alpha*(1-Jt.alpha)*br[Ur]+br.alpha*Jt.alpha*We(Jt[Ur],br[Ur])+(1-br.alpha)*Jt.alpha*Jt[Ur],Vr[Ur]=Math.max(0,Math.min(1,Vr[Ur]/ea)))),Vr),{mode:Le,alpha:ea})})},Pf=uc,Rh=([ve,Ae])=>ve+Math.random()*(Ae-ve),ae=ve=>Object.keys(ve).reduce((Ae,Le)=>{let We=ve[Le];return Ae[Le]=Array.isArray(We)?We:[We,We],Ae},{}),de=(ve="rgb",Ae={})=>{let Le=J(ve),We=ae(Ae);return Le.channels.reduce((Xe,rt)=>((We.alpha||rt!=="alpha")&&(Xe[rt]=Rh(We[rt]||Le.ranges[rt])),Xe),{mode:ve})},Te=de,Pe=(ve,Ae="rgb",Le=!1)=>{let We=Ae?J(Ae).channels:null,Xe=Ae?L(Ae):z;return rt=>{let Ct=Xe(rt);if(!Ct)return;let Jt=(We||J(Ct.mode).channels).reduce((ea,Vr)=>{let Ur=ve(Ct[Vr],Vr,Ct,Ae);return Ur!==void 0&&!isNaN(Ur)&&(ea[Vr]=Ur),ea},{mode:Ct.mode});if(!Le)return Jt;let br=z(rt);return br&&br.mode!==Jt.mode?L(br.mode)(Jt):Jt}},ze=(ve,Ae,Le)=>Ae!=="alpha"?(ve||0)*(Le.alpha!==void 0?Le.alpha:1):ve,Ne=(ve,Ae,Le)=>Ae!=="alpha"&&Le.alpha!==0?(ve||0)/(Le.alpha!==void 0?Le.alpha:1):ve,lt=(ve=1,Ae=0)=>(Le,We)=>We!=="alpha"?Le*ve+Ae:Le,Qe=(ve=1,Ae=1,Le=0)=>(We,Xe)=>Xe!=="alpha"?ve*Math.pow(We,Ae)+Le:We,yt=ve=>{ve[0]===void 0&&(ve[0]=0),ve[ve.length-1]===void 0&&(ve[ve.length-1]=1);let Ae=1,Le,We,Xe,rt;for(;AeAe=>ve<=0?1:ve>=1?0:Math.pow(Ae,Math.log(.5)/Math.log(ve)),er=Rt,Qt=ve=>typeof ve=="function",wr=ve=>ve&&typeof ve=="object",Cr=ve=>typeof ve=="number",ir=(ve,Ae="rgb",Le,We)=>{let Xe=J(Ae),rt=L(Ae),Ct=[],Jt=[],br={};ve.forEach(ba=>{Array.isArray(ba)?(Ct.push(rt(ba[0])),Jt.push(ba[1])):Cr(ba)||Qt(ba)?br[Jt.length]=ba:(Ct.push(rt(ba)),Jt.push(void 0))}),Ft(Jt);let ea=Xe.channels.reduce((ba,ca)=>{let _a;return wr(Le)&&wr(Le[ca])&&Le[ca].fixup?_a=Le[ca].fixup:wr(Xe.interpolate[ca])&&Xe.interpolate[ca].fixup?_a=Xe.interpolate[ca].fixup:_a=Ea=>Ea,ba[ca]=_a(Ct.map(Ea=>Ea[ca])),ba},{});if(We){let ba=Ct.map((ca,_a)=>Xe.channels.reduce((Ea,Ia)=>(Ea[Ia]=ea[Ia][_a],Ea),{mode:Ae}));ea=Xe.channels.reduce((ca,_a)=>(ca[_a]=ba.map(Ea=>{let Ia=We(Ea[_a],_a,Ea,Ae);return isNaN(Ia)?void 0:Ia}),ca),{})}let Vr=Xe.channels.reduce((ba,ca)=>{let _a;return Qt(Le)?_a=Le:wr(Le)&&Qt(Le[ca])?_a=Le[ca]:wr(Le)&&wr(Le[ca])&&Le[ca].use?_a=Le[ca].use:Qt(Xe.interpolate[ca])?_a=Xe.interpolate[ca]:wr(Xe.interpolate[ca])&&(_a=Xe.interpolate[ca].use),ba[ca]=_a(ea[ca]),ba},{}),Ur=Ct.length-1;return ba=>{if(ba=Math.min(Math.max(0,ba),1),ba<=Jt[0])return Ct[0];if(ba>Jt[Ur])return Ct[Ur];let ca=0;for(;Jt[ca]{let Qs=Vr[ps](Mi);return Qs!==void 0&&(lo[ps]=Qs),lo},{mode:Ae})}},pr=(ve,Ae="rgb",Le)=>ir(ve,Ae,Le),xr=(ve,Ae)=>(Le,We="rgb",Xe)=>{let rt=Ae?Pe(Ae,We):void 0,Ct=ir(Le,We,Xe,ve);return rt?Jt=>rt(Ct(Jt)):Ct},Dr=xr(ze,Ne),Lr=(ve,Ae)=>(ve+Ae)%Ae,mr=(ve,Ae,Le,We,Xe)=>{let rt=Xe*Xe,Ct=rt*Xe;return((1-3*Xe+3*rt-Ct)*ve+(4-6*rt+3*Ct)*Ae+(1+3*Xe+3*rt-3*Ct)*Le+Ct*We)/6},ha=ve=>Ae=>{let Le=ve.length-1,We=Ae>=1?Le-1:Math.max(0,Math.floor(Ae*Le));return mr(We>0?ve[We-1]:2*ve[We]-ve[We+1],ve[We],ve[We+1],WeAe=>{let Le=ve.length-1,We=Math.floor(Ae*Le);return mr(ve[Lr(We-1,ve.length)],ve[Lr(We,ve.length)],ve[Lr(We+1,ve.length)],ve[Lr(We+2,ve.length)],(Ae-We/Le)*Le)},Ua=ve=>{let Ae,Le=ve.length-1,We=new Array(Le),Xe=new Array(Le),rt=new Array(Le);for(We[1]=1/4,Xe[1]=(6*ve[1]-ve[0])/4,Ae=2;Ae0&&(rt[Le-1]=Xe[Le-1]),Ae=Le-2;Ae>0;--Ae)rt[Ae]=Xe[Ae]-We[Ae]*rt[Ae+1];return rt},ei=ve=>ha(Ua(ve)),bi=ve=>ka(Ua(ve)),di=Math.sign,Tn=Math.min,ci=Math.abs,cn=ve=>{let Ae=ve.length-1,Le=[],We=[],Xe=[];for(let rt=0;rt0?.5*(ve[rt+1]-ve[rt-1])*Ae:void 0),Xe.push(rt>0?(di(Le[rt-1])+di(Le[rt]))*Tn(ci(Le[rt-1]),ci(Le[rt]),.5*ci(We[rt])):void 0);return[Le,We,Xe]},xo=(ve,Ae,Le)=>{let We=ve.length-1,Xe=We*We;return rt=>{let Ct;rt>=1?Ct=We-1:Ct=Math.max(0,Math.floor(rt*We));let Jt=rt-Ct/We,br=Jt*Jt,ea=br*Jt;return(Ae[Ct]+Ae[Ct+1]-2*Le[Ct])*Xe*ea+(3*Le[Ct]-2*Ae[Ct]-Ae[Ct+1])*We*br+Ae[Ct]*Jt+ve[Ct]}},js=ve=>{if(ve.length<3)return Ke(ve);let Ae=ve.length-1,[Le,,We]=cn(ve);return We[0]=Le[0],We[Ae]=Le[Ae-1],xo(ve,We,Le)},Bo=ve=>{if(ve.length<3)return Ke(ve);let Ae=ve.length-1,[Le,We,Xe]=cn(ve);return We[0]=(ve[1]*2-ve[0]*1.5-ve[2]*.5)*Ae,We[Ae]=(ve[Ae]*1.5-ve[Ae-1]*2+ve[Ae-2]*.5)*Ae,Xe[0]=We[0]*Le[0]<=0?0:ci(We[0])>2*ci(Le[0])?2*Le[0]:We[0],Xe[Ae]=We[Ae]*Le[Ae-1]<=0?0:ci(We[Ae])>2*ci(Le[Ae-1])?2*Le[Ae-1]:We[Ae],xo(ve,Xe,Le)},Xa=ve=>{let Ae=ve.length-1,[Le,We,Xe]=cn(ve);We[0]=.5*(ve[1]-ve[Ae])*Ae,We[Ae]=.5*(ve[0]-ve[Ae-1])*Ae;let rt=(ve[0]-ve[Ae])*Ae,Ct=rt;return Xe[0]=(di(rt)+di(Le[0]))*Tn(ci(rt),ci(Le[0]),.5*ci(We[0])),Xe[Ae]=(di(Le[Ae-1])+di(Ct))*Tn(ci(Le[Ae-1]),ci(Ct),.5*ci(We[Ae])),xo(ve,Xe,Le)},Mn=(ve=1)=>ve===1?Ae=>Ae:Ae=>Math.pow(Ae,ve),Dn=Mn,Mo=(ve=2,Ae=1)=>{let Le=Dn(Ae);if(ve<2)return ve<1?[]:[Le(.5)];let We=[];for(let Xe=0;Xe{let Ae={mode:ve.mode,r:Math.max(0,Math.min(ve.r!==void 0?ve.r:0,1)),g:Math.max(0,Math.min(ve.g!==void 0?ve.g:0,1)),b:Math.max(0,Math.min(ve.b!==void 0?ve.b:0,1))};return ve.alpha!==void 0&&(Ae.alpha=ve.alpha),Ae},Ul=ve=>Ll(Js(ve)),_u=ve=>ve!==void 0&&(ve.r===void 0||ve.r>=0&&ve.r<=1)&&(ve.g===void 0||ve.g>=0&&ve.g<=1)&&(ve.b===void 0||ve.b>=0&&ve.b<=1);function xt(ve){return _u(Js(ve))}function nr(ve="rgb"){let{gamut:Ae}=J(ve);if(!Ae)return We=>!0;let Le=L(typeof Ae=="string"?Ae:ve);return We=>_u(Le(We))}function fr(ve){return ve=z(ve),ve===void 0||xt(ve)?ve:L(ve.mode)(Ul(ve))}function Or(ve="rgb"){let{gamut:Ae}=J(ve);if(!Ae)return rt=>z(rt);let Le=typeof Ae=="string"?Ae:ve,We=L(Le),Xe=nr(Le);return rt=>{let Ct=z(rt);if(!Ct)return;let Jt=We(Ct);if(Xe(Jt))return Ct;let br=Ll(Jt);return Ct.mode===br.mode?br:L(Ct.mode)(br)}}function Xr(ve,Ae="lch",Le="rgb"){ve=z(ve);let We=Le==="rgb"?xt:nr(Le),Xe=Le==="rgb"?Ul:Or(Le);if(ve===void 0||We(ve))return ve;let rt=L(ve.mode);ve=L(Ae)(ve);let Ct=Ci(ja({},ve),{c:0});if(!We(Ct))return rt(Xe(Ct));let Jt=0,br=ve.c!==void 0?ve.c:0,ea=J(Ae).ranges.c,Vr=(ea[1]-ea[0])/Math.pow(2,13),Ur=Ct.c;for(;br-Jt>Vr;)Ct.c=Jt+(br-Jt)*.5,We(Ct)?(Ur=Ct.c,Jt=Ct.c):br=Ct.c;return rt(We(Ct)?Ct:Ci(ja({},Ct),{c:Ur}))}function aa(ve="rgb",Ae="oklch",Le=Ka("oklch"),We=.02){let Xe=L(ve),rt=J(ve);if(!rt.gamut)return Vr=>Xe(Vr);let Ct=nr(ve),Jt=Or(ve),br=L(Ae),{ranges:ea}=J(Ae);if(!ea.l||!ea.c)throw new Error("LCH-like space expected");return Vr=>{if(Vr=z(Vr),Vr===void 0)return;let Ur=ja({},br(Vr));if(Ur.l===void 0&&(Ur.l=0),Ur.c===void 0&&(Ur.c=0),Ur.l>=ea.l[1]){let Ia=Ci(ja({},rt.white),{mode:ve});return Vr.alpha!==void 0&&(Ia.alpha=Vr.alpha),Ia}if(Ur.l<=ea.l[0]){let Ia=Ci(ja({},rt.black),{mode:ve});return Vr.alpha!==void 0&&(Ia.alpha=Vr.alpha),Ia}if(Ct(Ur))return Xe(Ur);let ba=0,ca=Ur.c,_a=(ea.c[1]-ea.c[0])/4e3,Ea=Jt(Ur);for(;ca-ba>_a;)Ur.c=(ba+ca)*.5,Ea=Jt(Ur),Ct(Ur)||Le&&We>0&&Le(Ur,Ea)<=We?ba=Ur.c:ca=Ur.c;return Xe(Ct(Ur)?Ur:Ea)}}var Wr=(ve,Ae=Ka(),Le=We=>We)=>{let We=ve.map((Xe,rt)=>({color:Le(Xe),i:rt}));return(Xe,rt=1,Ct=1/0)=>(isFinite(rt)&&(rt=Math.max(1,Math.min(rt,We.length-1))),We.forEach(Jt=>{Jt.d=Ae(Xe,Jt.color)}),We.sort((Jt,br)=>Jt.d-br.d).slice(0,rt).filter(Jt=>Jt.dve[Jt.i]))},wa=Wr,za=ve=>Math.max(ve,0),Ba=ve=>Math.max(Math.min(ve,1),0),Na=(ve,Ae,Le)=>ve===void 0||Ae===void 0?void 0:ve+Le*(Ae-ve),Ji=ve=>{let Ae=1-Ba(ve);return[.393+.607*Ae,.769-.769*Ae,.189-.189*Ae,0,.349-.349*Ae,.686+.314*Ae,.168-.168*Ae,0,.272-.272*Ae,.534-.534*Ae,.131+.869*Ae,0,0,0,0,1]},ki=ve=>{let Ae=za(ve);return[.213+.787*Ae,.715-.715*Ae,.072-.072*Ae,0,.213-.213*Ae,.715+.285*Ae,.072-.072*Ae,0,.213-.213*Ae,.715-.715*Ae,.072+.928*Ae,0,0,0,0,1]},ii=ve=>{let Ae=1-Ba(ve);return[.2126+.7874*Ae,.7152-.7152*Ae,.0722-.0722*Ae,0,.2126-.2126*Ae,.7152+.2848*Ae,.0722-.0722*Ae,0,.2126-.2126*Ae,.7152-.7152*Ae,.0722+.9278*Ae,0,0,0,0,1]},ma=ve=>{let Ae=Math.PI*ve/180,Le=Math.cos(Ae),We=Math.sin(Ae);return[.213+Le*.787-We*.213,.715-Le*.715-We*.715,.072-Le*.072+We*.928,0,.213-Le*.213+We*.143,.715+Le*.285+We*.14,.072-Le*.072-We*.283,0,.213-Le*.213-We*.787,.715-Le*.715+We*.715,.072+Le*.928+We*.072,0,0,0,0,1]},Ir=(ve,Ae,Le=!1)=>{let We=L(Ae),Xe=J(Ae).channels;return rt=>{let Ct=We(rt);if(!Ct)return;let Jt={mode:Ae},br,ea=Xe.length;for(let Ur=0;Ur{let Le=za(ve);return Pe(lt(Le),Ae,!0)},Pa=(ve=1,Ae="rgb")=>{let Le=za(ve);return Pe(lt(Le,(1-Le)/2),Ae,!0)},Ha=(ve=1,Ae="rgb")=>Ir(Ji(ve),Ae,!0),Ta=(ve=1,Ae="rgb")=>Ir(ki(ve),Ae,!0),hi=(ve=1,Ae="rgb")=>Ir(ii(ve),Ae,!0),oi=(ve=1,Ae="rgb")=>{let Le=Ba(ve);return Pe((We,Xe)=>Xe==="alpha"?We:Na(Le,1-Le,We),Ae,!0)},an=(ve=0,Ae="rgb")=>Ir(ma(ve),Ae,!0),Aa=L("rgb"),ga=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],wi=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],ri=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],$a=(ve,Ae)=>{let Le=Math.max(0,Math.min(1,Ae)),We=Math.round(Le/.1),Xe=Math.round(Le%.1),rt=ve[We];if(Xe>0&&We_e(rt[br],Ct[br],Xe))}return Ct=>{let Jt=z(Ct);if(Jt===void 0)return;let{r:br,g:ea,b:Vr}=Aa(Jt),Ur={mode:"rgb",r:rt[0]*br+rt[1]*ea+rt[2]*Vr,g:rt[3]*br+rt[4]*ea+rt[5]*Vr,b:rt[6]*br+rt[7]*ea+rt[8]*Vr};return Jt.alpha!==void 0&&(Ur.alpha=Jt.alpha),L(Jt.mode)(Ur)}},Ja=(ve=1)=>$a(ga,ve),Ai=(ve=1)=>$a(wi,ve),nn=(ve=1)=>$a(ri,ve),Ln=ve=>ve*ve*(3-2*ve),fi=ve=>.5-Math.sin(Math.asin(1-2*ve)/3),zi=ve=>ve*ve*ve*(ve*(ve*6-15)+10),Sn=zi,kn=ve=>(1-Math.cos(ve*Math.PI))/2,so=kn;function Us(ve){let Ae=L("lrgb")(ve);return .2126*Ae.r+.7152*Ae.g+.0722*Ae.b}function iu(ve,Ae){let Le=Us(ve),We=Us(Ae);return(Math.max(Le,We)+.05)/(Math.min(Le,We)+.05)}var bo=Z(ft),uf=Z(Ht),hs=Z(ro),cc=Z(Kn),Rc=Z(Fo),cf=Z(sl),ql=Z(An),Vl=Z(Pu),nu=Z(td),Xn=Z(rc),xu=Z(ac),xs=Z(Ql),zc=Z(Mp),ff=Z(Mf),hf=Z(Kf),Nn=Z(yu),Do=Z(ud),Ps=Z(eh),ur=Z(ji),Kr=Z(pn),Jr=Z(No),Gi=Z(zo),Eo=Z(zu),ds=Z(Ph),Ui=Z(Lf),tr=Z(Pt),hr=Z(ot),_r=Z(ht),Zr=Z(gr),sa=Z(Wi)}}),xv=ye({"src/plot_api/plot_config.js"(e,r){"use strict";var t={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:500,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},a={};function i(o,s){for(var l in o){var n=o[l];n.valType?s[l]=n.dflt:(s[l]||(s[l]={}),i(n,s[l]))}}i(t,a),r.exports={configAttributes:t,dfltConfig:a}}}),CD=ye({"src/lib/notifier.js"(e,r){"use strict";var t=ai(),a=en(),i=[];r.exports=function(o,s,l){var n;if(((n=l?._context)==null?void 0:n.displayNotifier)===!1||i.indexOf(o)!==-1)return;i.push(o);var u=1e3;a(s)?u=s:s==="long"&&(u=3e3);var c=t.select("body").selectAll(".plotly-notifier").data([0]);c.enter().append("div").classed("plotly-notifier",!0);var f=c.selectAll(".notifier-note").data(i);function h(d){d.duration(700).style("opacity",0).each("end",function(p){var g=i.indexOf(p);g!==-1&&i.splice(g,1),t.select(this).remove()})}f.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(d){var p=t.select(this);p.append("button").classed("notifier-close",!0).html("×").on("click",function(){p.transition().call(h)});for(var g=p.append("p"),m=d.split(//g),y=0;y1){var s=["LOG:"];for(o=0;o1){var l=[];for(o=0;o"),"long")}},i.warn=function(){var o;if(t.logging>0){var s=["WARN:"];for(o=0;o0){var l=[];for(o=0;o"),"stick")}},i.error=function(){var o;if(t.logging>0){var s=["ERROR:"];for(o=0;o0){var l=[];for(o=0;o"),"stick")}}}}),Wl=ye({"src/components/color/attributes.js"(e){"use strict";e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11}}),Ya=ye({"src/components/color/index.js"(e,r){"use strict";var{converter:t,formatHex:a,formatRgb:i,wcagContrast:o,wcagLuminance:s}=VQ(),{isArrayOrTypedArray:l}=yc(),{warn:n}=c0(),{background:u,defaultLine:c,defaults:f,lightLine:h}=Wl(),d=t("rgb"),p=t("hsl"),g=q=>{if(typeof q!="string")return;let Y=q.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(Y))try{return d(Y)}catch{return}},m=q=>q>0?q>1?1:q:0,y={mode:"rgb",r:0,g:0,b:0,alpha:1},_=q=>Math.round(q*255e6)/255e6,v=q=>Ci(ja({},q),{r:_(q.r),g:_(q.g),b:_(q.b)}),x=q=>i(v(q)),E=q=>a(v(q)),M=q=>{var Y,K,re,se;return typeof q=="string"?`"${q}"`:l(q)?`${(K=(Y=q.constructor)==null?void 0:Y.name)!=null?K:"Array"}(${q.length})`:typeof q=="object"?(se=(re=q.constructor)==null?void 0:re.name)!=null?se:"Object":`${typeof q} ${q}`},C=(q,Y)=>{var K;let re=g(q);return re?((K=re.alpha)!=null||(re.alpha=1),re):(!Y&&q!=null&&n(`Invalid color specifier: ${M(q)}. Defaulting to "#000"`),y)},w=q=>x(Ci(ja({},C(q)),{alpha:1})),k=q=>q?C(q).alpha:0,T=q=>l(q)&&q.length>2&&Number.isFinite(q[0])&&Number.isFinite(q[1])&&Number.isFinite(q[2]),b=q=>{let[Y,K,re,se]=q,le=Math.max(Y,K,re)>1?1/255:1,ue=se??1;return{mode:"rgb",r:Y*le,g:K*le,b:re*le,alpha:ue>1?ue/255:ue}},S=(q,Y)=>{let K=T(q)?b(q):C(q,!0),re=[m(K.r),m(K.g),m(K.b),m(K.alpha)];return Y==="uint8"||Y==="uint8_clamped"?Uint8Array.from(re,se=>Math.round(se*255)):Y==="float32"?Float32Array.from(re):Y==="float64"?Float64Array.from(re):re},A=(q,Y)=>x(Ci(ja({},C(q)),{alpha:m(Y)})),F=(q,Y)=>{let K=C(q),re=K.alpha;if(re===1)return x(K);let se=C(Y||u),le=se.alpha,ue=(fe,pe)=>(le===1?pe:1-le+pe*le)*(1-re)+fe*re;return x({mode:"rgb",r:ue(K.r,se.r),g:ue(K.g,se.g),b:ue(K.b,se.b)})},D=(q,Y,K)=>{let re=C(q),se=C(Y),le=(ue,fe)=>K*ue+(1-K)*fe;return x({mode:"rgb",r:le(re.r,se.r),g:le(re.g,se.g),b:le(re.b,se.b)})},R=(q,Y)=>{let K=C(q),re=p(K)||{mode:"hsl",h:0,s:0,l:0};return x(d(Ci(ja({},re),{l:m((re.l*100+Y)/100),alpha:K.alpha})))},P=(q,Y)=>o(C(q),C(Y)),z=q=>P(q,u)>P(q,c),I=x(C(u)),L=x(C(c)),B=(q,Y,K)=>(C(q).alpha!==1&&(q=F(q,u)),z(q)?Y?R(q,Y):I:K?R(q,-K):L),O=(q,Y)=>{q.style({stroke:w(Y),"stroke-opacity":C(Y).alpha})},G=(q,Y)=>{q.style({fill:w(Y),"fill-opacity":C(Y).alpha})},$=(q,Y)=>!!(q&&Y&&w(q)===w(Y)),X=q=>g(q)!==void 0,Z=(q,Y)=>{Y=Y===0?0:Y||10;let K=C(q),re=Y/100;return x(Ci(ja({},K),{r:m(K.r+re),g:m(K.g+re),b:m(K.b+re)}))},J=(q,Y,K)=>{let re=C(q),se=C(Y),le=K/100,ue=se.alpha-re.alpha,fe=2*le-1,pe=((fe*ue===-1?fe:(fe+ue)/(1+fe*ue))+1)/2,we=1-pe,xe=(he,oe)=>we*he+pe*oe;return x({mode:"rgb",r:xe(re.r,se.r),g:xe(re.g,se.g),b:xe(re.b,se.b),alpha:re.alpha*(1-le)+se.alpha*le})},N=(q,Y=["#000","#fff"])=>{let K,re=-1/0;for(let se of Y){let le=P(q,se);le>re&&(re=le,K=x(C(se)))}return K},H=q=>x(C(q)),W=q=>E(C(q)).toUpperCase(),U=q=>{let Y=C(q);return[m(Y.r)*255,m(Y.g)*255,m(Y.b)*255,m(Y.alpha)]},V=([q,Y,K,re])=>x({mode:"rgb",r:q/255,g:Y/255,b:K/255,alpha:re}),j=q=>{let Y=C(q);return s({mode:"rgb",r:m(Y.r),g:m(Y.g),b:m(Y.b)})};r.exports={addOpacity:A,adjustLightness:R,background:u,brighten:Z,combine:F,contrast:B,defaultLine:c,defaults:f,equals:$,fill:G,hexString:W,interpolate:D,isChannelArray:T,isDark:z,isValid:X,lightLine:h,luminosity:j,mix:J,mostReadable:N,normalize:S,opacity:k,parse:C,rgb:w,rgbaArray:U,rgbaArrayToString:V,rgbaString:H,stroke:O,wcagContrast:P}}}),Tm=ye({"src/components/colorscale/scales.js"(e,r){"use strict";var t=Ya(),a={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},i=a.RdBu;function o(n,u){if(u||(u=i),!n)return u;function c(){try{n=a[n]||JSON.parse(n)}catch{n=u}}return typeof n=="string"&&(c(),typeof n=="string"&&c()),s(n)?n:u}function s(n){var u=0;if(!Array.isArray(n)||n.length<2||!n[0]||!n[n.length-1]||+n[0][0]!=0||+n[n.length-1][0]!=1)return!1;for(var c=0;cGQ});function GQ(e,r="",t,a){let i=r+(t?"":"$"),o=a===!1?"":"^";return e==="xy"?new RegExp(o+"x"+Vx+"y"+Vx+i):new RegExp(o+e+Vx+i)}var Vx,hy=Si({"src/lib/regex.ts"(){"use strict";Vx="([2-9]|[1-9][0-9]+)?"}}),HQ=ye({"src/lib/coerce.js"(e){"use strict";var r=en(),t=Xi().extendFlat,a=Oo(),i=Tm(),o=Ya(),s=f0().DESELECTDIM,l=Ux(),n=(hy(),On(Mm)).counter,u=(cy(),On(Am)).modHalf,c=yc().isArrayOrTypedArray,f=yc().isTypedArraySpec,h=yc().decodeTypedArraySpec;e.valObjectMeta={data_array:{coerceFunction:function(p,g,m){g.set(c(p)?p:f(p)?h(p):m)}},enumerated:{coerceFunction:function(p,g,m,y){y.coerceNumber&&(p=+p),y.values.indexOf(p)===-1?g.set(m):g.set(p)},validateFunction:function(p,g){g.coerceNumber&&(p=+p);for(var m=g.values,y=0;yv===!0||v===!1;_(p)||y.arrayOk&&Array.isArray(p)&&p.length>0&&p.every(_)?g.set(p):g.set(m)}},number:{coerceFunction:function(p,g,m,y){f(p)&&(p=h(p)),!r(p)||y.min!==void 0&&py.max?g.set(m):g.set(+p)}},integer:{coerceFunction:function(p,g,m,y){if((y.extras||[]).indexOf(p)!==-1){g.set(p);return}f(p)&&(p=h(p)),p%1||!r(p)||y.min!==void 0&&py.max?g.set(m):g.set(+p)}},string:{coerceFunction:function(p,g,m,y){if(typeof p!="string"){var _=typeof p=="number";y.strict===!0||!_?g.set(m):g.set(String(p))}else y.noBlank&&!p?g.set(m):g.set(p)}},color:{coerceFunction:function(p,g,m){f(p)&&(p=h(p)),o.isValid(p)?g.set(p):g.set(m)}},colorlist:{coerceFunction:function(p,g,m){!Array.isArray(p)||!p.length?g.set(m):p.every(y=>o.isValid(y))?g.set(p):g.set(m)}},colorscale:{coerceFunction:function(p,g,m){g.set(i.get(p,m))}},angle:{coerceFunction:function(p,g,m){f(p)&&(p=h(p)),p==="auto"?g.set("auto"):r(p)?g.set(u(+p,360)):g.set(m)}},subplotid:{coerceFunction:function(p,g,m,y){var _=y.regex||n(m);let v=x=>typeof x=="string"&&_.test(x);v(p)||y.arrayOk&&c(p)&&p.length>0&&p.every(v)?g.set(p):g.set(m)},validateFunction:function(p,g){var m=g.dflt;return p===m?!0:typeof p!="string"?!1:!!n(m).test(p)}},flaglist:{coerceFunction:function(p,g,m,y){if((y.extras||[]).indexOf(p)!==-1){g.set(p);return}if(typeof p!="string"){g.set(m);return}for(var _=p.split("+"),v=0;v<_.length;){var x=_[v];y.flags.indexOf(x)===-1||_.indexOf(x)ja({valType:"string",dflt:"",editType:o},s!==!1?{arrayOk:!0}:{}),e.texttemplateAttrs=({editType:o="calc",arrayOk:s}={},l={})=>ja({valType:"string",dflt:"",editType:o},s!==!1?{arrayOk:!0}:{}),e.shapeTexttemplateAttrs=({editType:o="arraydraw",newshape:s}={},l={})=>({valType:"string",dflt:"",editType:o}),e.templatefallbackAttrs=({editType:o="none"}={})=>({valType:"any",dflt:"-",editType:o})}}),gA=ye({"src/components/shapes/label_texttemplate.js"(e,r){"use strict";function t(M,C){return C?C.d2l(M):M}function a(M,C){return C?C.l2d(M):M}function i(M){return M.x0}function o(M){return M.x1}function s(M){return M.y0}function l(M){return M.y1}function n(M){return M.x0shift||0}function u(M){return M.x1shift||0}function c(M){return M.y0shift||0}function f(M){return M.y1shift||0}function h(M,C){return t(M.x1,C)+u(M)-t(M.x0,C)-n(M)}function d(M,C,w){return t(M.y1,w)+f(M)-t(M.y0,w)-c(M)}function p(M,C){return Math.abs(h(M,C))}function g(M,C,w){return Math.abs(d(M,C,w))}function m(M,C,w){return M.type!=="line"?void 0:Math.sqrt(Math.pow(h(M,C),2)+Math.pow(d(M,C,w),2))}function y(M,C){return a((t(M.x1,C)+u(M)+t(M.x0,C)+n(M))/2,C)}function _(M,C,w){return a((t(M.y1,w)+f(M)+t(M.y0,w)+c(M))/2,w)}function v(M,C,w){return M.type!=="line"?void 0:d(M,C,w)/h(M,C)}var x=["x0","x1","y0","y1","dy","height","ycenter"],E=["x0","x1","y0","y1","dx","width","xcenter"];r.exports={x0:i,x1:o,y0:s,y1:l,slope:v,dx:h,dy:d,width:p,height:g,length:m,xcenter:y,ycenter:_,simpleXVariables:x,simpleYVariables:E}}}),xee=ye({"src/components/shapes/draw_newshape/attributes.js"(e,r){"use strict";var t=Cs().overrideAll,a=Oo(),i=vs(),o=Eu().dash,s=Xi().extendFlat,{shapeTexttemplateAttrs:l,templatefallbackAttrs:n}=Ro(),u=gA();r.exports=t({newshape:{visible:s({},a.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:s({},a.legend,{}),legendgroup:s({},a.legendgroup,{}),legendgrouptitle:{text:s({},a.legendgrouptitle.text,{}),font:i({})},legendrank:s({},a.legendrank,{}),legendwidth:s({},a.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:s({},o,{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:s({},a.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:l({newshape:!0},{keys:Object.keys(u)}),texttemplatefallback:n({editType:"arraydraw"}),font:i({}),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")}}),bee=ye({"src/components/selections/draw_newselection/attributes.js"(e,r){"use strict";var t=Eu().dash,a=Xi().extendFlat;r.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:a({},t,{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"}}}}),yA=ye({"src/plots/pad_attributes.js"(e,r){"use strict";r.exports=function(t){var a=t.editType;return{t:{valType:"number",dflt:0,editType:a},r:{valType:"number",dflt:0,editType:a},b:{valType:"number",dflt:0,editType:a},l:{valType:"number",dflt:0,editType:a},editType:a}}}}),dy=ye({"src/plots/layout_attributes.js"(e,r){"use strict";var t=vs(),a=Hx(),i=Wl(),o=xee(),s=bee(),l=yA(),n=Xi().extendFlat,u=t({editType:"calc"});u.family.dflt='"Open Sans", verdana, arial, sans-serif',u.size.dflt=12,u.color.dflt=i.defaultLine,r.exports={font:u,title:{text:{valType:"string",editType:"layoutstyle"},font:t({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:t({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:n(l({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:i.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:i.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:i.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:o.newshape,activeshape:o.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:n({},a.transition,{editType:"none"})}}}),wee=ye({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("9f215cf04c5486422605d13261cb87401f4e7763b6296af81e98efbc0130da53")){var e=document.createElement("style");e.id="9f215cf04c5486422605d13261cb87401f4e7763b6296af81e98efbc0130da53",e.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{position:absolute;left:0;top:0}.maplibregl-map:fullscreen{width:100%;height: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{position:absolute;pointer-events:none;z-index:2}.maplibregl-ctrl-top-left{top:0;left:0}.maplibregl-ctrl-top-right{top:0;right:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{right:0;bottom:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{margin:10px 0 0 10px;float:left}.maplibregl-ctrl-top-right .maplibregl-ctrl{margin:10px 10px 0 0;float:right}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin:0 0 10px 10px;float:left}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{margin:0 10px 10px 0;float:right}.maplibregl-ctrl-group{border-radius:4px;background:#fff}.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{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@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}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23aaa%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23999%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23666%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;color:#000;border-radius:12px;box-sizing:content-box}.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{padding:2px 8px 2px 28px;border-radius:12px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.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:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;right:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;left: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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%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);font-size:10px;white-space:nowrap;border-color:#333;border-style:none solid solid;border-width:medium 2px 2px;padding:0 5px;color:#333;box-sizing:border-box}.maplibregl-popup{position:absolute;top:0;left:0;display:flex;will-change:transform;pointer-events:none}.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{width:0;height:0;border:10px solid transparent;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.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-right:none;border-left-color:#fff}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto}.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{position:absolute;top:0;left:0;will-change:transform;transition:opacity .2s}.maplibregl-marker-draggable{cursor:grab}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.maplibregl-user-location-dot:before{content:"";position:absolute;animation:maplibregl-user-location-dot-pulse 2s infinite}.maplibregl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box;box-shadow:0 0 3px rgba(0,0,0,.35)}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;width:1px;height:1px;border-radius:100%}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}.maplibregl-cooperative-gesture-screen{background:rgba(0,0,0,.4);position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:#fff;padding:1rem;font-size:1.4em;line-height:1.2;opacity:0;pointer-events:none;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),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{position:fixed!important;width:100%!important;height:100%!important;top:0!important;left:0!important;z-index:99999}',document.head.appendChild(e)}})()}}),li=ye({"src/registry.js"(e){"use strict";var r=c0(),t=vA(),a=DD(),i=Gx().addStyleRule,o=Xi(),s=Oo(),l=dy(),n=o.extendFlat,u=o.extendDeepAll;e.modules={},e.allCategories={},e.allTypes=[],e.subplotsRegistry={},e.componentsRegistry={},e.layoutArrayContainers=[],e.layoutArrayRegexes=[],e.traceLayoutAttributes={},e.localeRegistry={},e.apiMethodRegistry={},e.collectableSubplotTypes=null,e.register=function(v){if(e.collectableSubplotTypes=null,v)v&&!Array.isArray(v)&&(v=[v]);else throw new Error("No argument passed to Plotly.register.");for(var x=0;x=v&&P<=x?P:s}if(typeof P!="string"&&typeof P!="number")return s;P=String(P);var O=y(z),G=P.charAt(0);O&&(G==="G"||G==="g")&&(P=P.slice(1),z="");var $=O&&z.slice(0,7)==="chinese",X=P.match($?g:p);if(!X)return s;var Z=X[1],J=X[3]||"1",N=Number(X[5]||1),H=Number(X[7]||0),W=Number(X[9]||0),U=Number(X[11]||0);if(O){if(Z.length===2)return s;Z=Number(Z);var V;try{var j=h.getComponentMethod("calendars","getCal")(z);if($){var q=J.charAt(J.length-1)==="i";J=parseInt(J,10),V=j.newDate(Z,j.toMonthIndex(Z,J,q),N)}else V=j.newDate(Z,Number(J),N)}catch{return s}return V?(V.toJD()-f)*l+H*n+W*u+U*c:s}Z.length===2?Z=(Number(Z)+2e3-m)%100+m:Z=Number(Z),J-=1;var Y=new Date(Date.UTC(2e3,J,N,H,W));return Y.setUTCFullYear(Z),Y.getUTCMonth()!==J||Y.getUTCDate()!==N?s:Y.getTime()+U*c},v=e.MIN_MS=e.dateTime2ms("-9999"),x=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(P,z){return e.dateTime2ms(P,z)!==s};function E(P,z){return String(P+Math.pow(10,z)).slice(1)}var M=90*l,C=3*n,w=5*u;e.ms2DateTime=function(P,z,I){if(typeof P!="number"||!(P>=v&&P<=x))return s;z||(z=0);var L=Math.floor(i(P+.05,1)*10),B=Math.round(P-L/10),O,G,$,X,Z,J;if(y(I)){var N=Math.floor(B/l)+f,H=Math.floor(i(P,l));try{O=h.getComponentMethod("calendars","getCal")(I).fromJD(N).formatDate("yyyy-mm-dd")}catch{O=d("G%Y-%m-%d")(new Date(B))}if(O.charAt(0)==="-")for(;O.length<11;)O="-0"+O.slice(1);else for(;O.length<10;)O="0"+O;G=z=v+l&&P<=x-l))return s;var z=Math.floor(i(P+.05,1)*10),I=new Date(Math.round(P-z/10)),L=r("%Y-%m-%d")(I),B=I.getHours(),O=I.getMinutes(),G=I.getSeconds(),$=I.getUTCMilliseconds()*10+z;return k(L,B,O,G,$)};function k(P,z,I,L,B){if((z||I||L||B)&&(P+=" "+E(z,2)+":"+E(I,2),(L||B)&&(P+=":"+E(L,2),B))){for(var O=4;B%10===0;)O-=1,B/=10;P+="."+E(B,O)}return P}e.cleanDate=function(P,z,I){if(P===s)return z;if(e.isJSDate(P)||typeof P=="number"&&isFinite(P)){if(y(I))return a.error("JS Dates and milliseconds are incompatible with world calendars",P),z;if(P=e.ms2DateTimeLocal(+P),!P&&z!==void 0)return z}else if(!e.isDateTime(P,I))return a.error("unrecognized date",P),z;return P};var T=/%\d?f/g,b=/%h/g,S={1:"1",2:"1",3:"2",4:"2"};function A(P,z,I,L){P=P.replace(T,function(O){var G=Math.min(+O.charAt(1)||6,6),$=(z/1e3%1+2).toFixed(G).slice(2).replace(/0+$/,"")||"0";return $});var B=new Date(Math.floor(z+.05));if(P=P.replace(b,function(){return S[I("%q")(B)]}),y(L))try{P=h.getComponentMethod("calendars","worldCalFmt")(P,z,L)}catch{return"Invalid"}return I(P)(B)}var F=[59,59.9,59.99,59.999,59.9999];function D(P,z){var I=i(P+.05,l),L=E(Math.floor(I/n),2)+":"+E(i(Math.floor(I/u),60),2);if(z!=="M"){t(z)||(z=0);var B=Math.min(i(P/c,60),F[z]),O=(100+B).toFixed(z).slice(1);z>0&&(O=O.replace(/0+$/,"").replace(/[\.]$/,"")),L+=":"+O}return L}e.formatDate=function(P,z,I,L,B,O){if(B=y(B)&&B,!z)if(I==="y")z=O.year;else if(I==="m")z=O.month;else if(I==="d")z=O.dayMonth+` +`+O.year;else return D(P,I)+` +`+A(O.dayMonthYear,P,L,B);return A(z,P,L,B)};var R=3*l;e.incrementMonth=function(P,z,I){I=y(I)&&I;var L=i(P,l);if(P=Math.round(P-L),I)try{var B=Math.round(P/l)+f,O=h.getComponentMethod("calendars","getCal")(I),G=O.fromJD(B);return z%12?O.add(G,z,"m"):O.add(G,z/12,"y"),(G.toJD()-f)*l+L}catch{a.error("invalid ms "+P+" in calendar "+I)}var $=new Date(P+R);return $.setUTCMonth($.getUTCMonth()+z)+L-R},e.findExactDates=function(P,z){for(var I=0,L=0,B=0,O=0,G,$,X=y(z)&&h.getComponentMethod("calendars","getCal")(z),Z=0;Z1?(f[p-1]-f[0])/(p-1):1,y,_;for(m>=0?_=h?s:l:_=h?u:n,c+=m*o*(h?-1:1)*(m>=0?1:-1);d90&&t.log("Long binary search..."),d-1};function s(c,f){return cf}function u(c,f){return c>=f}e.sorterAsc=function(c,f){return c-f},e.sorterDes=function(c,f){return f-c},e.distinctVals=function(c){var f=c.slice();f.sort(e.sorterAsc);var h;for(h=f.length-1;h>-1&&f[h]===i;h--);for(var d=f[h]-f[0]||1,p=d/(h||1)/1e4,g=[],m,y=0;y<=h;y++){var _=f[y],v=_-m;m===void 0?(g.push(_),m=_):v>p&&(d=Math.min(d,v),g.push(_),m=_)}return{vals:g,minDiff:d}},e.roundUp=function(c,f,h){for(var d=0,p=f.length-1,g,m=0,y=h?0:1,_=h?1:0,v=h?Math.ceil:Math.floor;d0&&(d=1),h&&d)return c.sort(f)}return d?c:c.reverse()},e.findIndexOfMin=function(c,f){f=f||a;for(var h=1/0,d,p=0;pID});function Tee(e){return Object.keys(e).sort()}var ID,Em=Si({"src/lib/sort_object_keys.ts"(){"use strict";ID=Tee}}),Mee=ye({"src/lib/stats.js"(e){"use strict";var r=en(),t=yc().isArrayOrTypedArray;e.aggNums=function(a,i,o,s){var l,n;if((!s||s>o.length)&&(s=o.length),r(i)||(i=!1),t(o[0])){for(n=new Array(s),l=0;la.length-1)return a[a.length-1];var o=i%1;return o*a[Math.ceil(i)]+(1-o)*a[Math.floor(i)]}}}),Eee=ye({"src/lib/angles.js"(e,r){"use strict";var t=(cy(),On(Am)),a=t.mod,i=t.modHalf,o=Math.PI,s=2*o;function l(_){return _/180*o}function n(_){return _/o*180}function u(_){return Math.abs(_[1]-_[0])>s-1e-14}function c(_,v){return i(v-_,s)}function f(_,v){return Math.abs(c(_,v))}function h(_,v){if(u(v))return!0;var x,E;v[0]E&&(E+=s);var M=a(_,s),C=M+s;return M>=x&&M<=E||C>=x&&C<=E}function d(_,v,x,E){if(!h(v,E))return!1;var M,C;return x[0]=M&&_<=C}function p(_,v,x,E,M,C,w){M=M||0,C=C||0;var k=u([x,E]),T,b,S,A,F;k?(T=0,b=o,S=s):x1/3&&t.x<2/3},e.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3},e.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3},e.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}}}),kee=ye({"src/lib/geometry2d.js"(e){"use strict";var r=(cy(),On(Am)).mod;e.segmentsIntersect=t;function t(l,n,u,c,f,h,d,p){var g=u-l,m=f-l,y=d-f,_=c-n,v=h-n,x=p-h,E=g*x-y*_;if(E===0)return null;var M=(m*x-y*v)/E,C=(m*_-g*v)/E;return C<0||C>1||M<0||M>1?null:{x:l+g*M,y:n+_*M}}e.segmentDistance=function(n,u,c,f,h,d,p,g){if(t(n,u,c,f,h,d,p,g))return 0;var m=c-n,y=f-u,_=p-h,v=g-d,x=m*m+y*y,E=_*_+v*v,M=Math.min(a(m,y,x,h-n,d-u),a(m,y,x,p-n,g-u),a(_,v,E,n-h,u-d),a(_,v,E,c-h,f-d));return Math.sqrt(M)};function a(l,n,u,c,f){var h=c*l+f*n;if(h<0)return c*c+f*f;if(h>u){var d=c-l,p=f-n;return d*d+p*p}else{var g=c*n-f*l;return g*g/u}}var i,o,s;e.getTextLocation=function(n,u,c,f){if((n!==o||f!==s)&&(i={},o=n,s=f),i[c])return i[c];var h=n.getPointAtLength(r(c-f/2,u)),d=n.getPointAtLength(r(c+f/2,u)),p=Math.atan((d.y-h.y)/(d.x-h.x)),g=n.getPointAtLength(r(c,u)),m=(g.x*4+h.x+d.x)/6,y=(g.y*4+h.y+d.y)/6,_={x:m,y,theta:p};return i[c]=_,_},e.clearLocationCache=function(){o=null},e.getVisibleSegment=function(n,u,c){var f=u.left,h=u.right,d=u.top,p=u.bottom,g=0,m=n.getTotalLength(),y=m,_,v;function x(M){var C=n.getPointAtLength(M);M===0?_=C:M===m&&(v=C);var w=C.xh?C.x-h:0,k=C.yp?C.y-p:0;return Math.sqrt(w*w+k*k)}for(var E=x(g);E;){if(g+=E+c,g>y)return;E=x(g)}for(E=x(y);E;){if(y-=E+c,g>y)return;E=x(y)}return{min:g,max:y,len:y-g,total:m,isClosed:g===0&&y===m&&Math.abs(_.x-v.x)<.1&&Math.abs(_.y-v.y)<.1}},e.findPointOnPath=function(n,u,c,f){f=f||{};for(var h=f.pathLength||n.getTotalLength(),d=f.tolerance||.001,p=f.iterationLimit||30,g=n.getPointAtLength(0)[c]>n.getPointAtLength(h)[c]?-1:1,m=0,y=0,_=h,v,x,E;m0?_=v:y=v,m++}return x}}}),xA=ye({"src/lib/throttle.js"(e){"use strict";var r={};e.throttle=function(i,o,s){var l=r[i],n=Date.now();if(!l){for(var u in r)r[u].tsl.ts+o){c();return}l.timer=setTimeout(function(){c(),l.timer=null},o)},e.done=function(a){var i=r[a];return!i||!i.timer?Promise.resolve():new Promise(function(o){var s=i.onDone;i.onDone=function(){s&&s(),o(),i.onDone=null}})},e.clear=function(a){if(a)t(r[a]),delete r[a];else for(var i in r)e.clear(i)};function t(a){a&&a.timer!==null&&(clearTimeout(a.timer),a.timer=null)}}}),Cee=ye({"src/lib/clear_responsive.js"(e,r){"use strict";r.exports=function(a){a._responsiveChartHandler&&(window.removeEventListener("resize",a._responsiveChartHandler),delete a._responsiveChartHandler)}}}),Dee=ye({"node_modules/is-mobile/index.js"(e,r){"use strict";r.exports=o,r.exports.isMobile=o,r.exports.default=o;var t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,a=/CrOS/,i=/android|ipad|playbook|silk/i;function o(s){s||(s={});let l=s.ua;if(!l&&typeof navigator<"u"&&(l=navigator.userAgent),l&&l.headers&&typeof l.headers["user-agent"]=="string"&&(l=l.headers["user-agent"]),typeof l!="string")return!1;let n=t.test(l)&&!a.test(l)||!!s.tablet&&i.test(l);return!n&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&l.indexOf("Macintosh")!==-1&&l.indexOf("Safari")!==-1&&(n=!0),n}}}),Lee=ye({"src/lib/preserve_drawing_buffer.js"(e,r){"use strict";var t=en(),a=Dee();r.exports=function(s){var l;if(s&&s.hasOwnProperty("userAgent")?l=s.userAgent:l=i(),typeof l!="string")return!0;var n=a({ua:{headers:{"user-agent":l}},tablet:!0,featureDetect:!1});if(!n)for(var u=l.split(" "),c=1;c-1;h--){var d=u[h];if(d.slice(0,8)==="Version/"){var p=d.slice(8).split(".")[0];if(t(p)&&(p=+p),p>=13)return!0}}}return n};function i(){var o;return typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),o}}}),Fee=ye({"src/lib/make_trace_groups.js"(e,r){"use strict";var t=ai();r.exports=function(i,o,s){var l=i.selectAll("g."+s.replace(/\s/g,".")).data(o,function(u){return u[0].trace.uid});l.exit().remove(),l.enter().append("g").attr("class",s),l.order();var n=i.classed("rangeplot")?"nodeRangePlot3":"node3";return l.each(function(u){u[0][n]=t.select(this)}),l}}}),Pee=ye({"src/lib/localize.js"(e,r){"use strict";var t=li();r.exports=function(i,o){for(var s=i._context.locale,l=0;l<2;l++){for(var n=i._context.locales,u=0;u<2;u++){var c=(n[s]||{}).dictionary;if(c){var f=c[o];if(f)return f}n=t.localeRegistry}var h=s.split("-")[0];if(h===s)break;s=h}return o}}}),RD=ye({"src/lib/filter_unique.js"(e,r){"use strict";r.exports=function(a){for(var i={},o=[],s=0,l=0;l1?(o*a+o*i)/o:a+i,l=String(s).length;if(l>16){var n=String(i).length,u=String(a).length;if(l>=u+n){var c=parseFloat(s).toPrecision(12);c.indexOf("e+")===-1&&(s=+c)}}return s}}}),zD={};rl(zD,{default:()=>jD});function zee(e){return typeof e=="string"&&(e=e.replace(ND,"")),(0,BD.default)(e)?Number(e):OD.BADNUM}var BD,OD,ND,jD,Bee=Si({"src/lib/clean_number.ts"(){"use strict";BD=Vs(en()),OD=Vs(Vn()),ND=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,jD=zee}}),Oee=ye({"src/lib/slugify.js"(e,r){"use strict";var t=/<[^>]*>/g,a=/[\p{S}\p{P}]/gu,i=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,o=/�/g,s=/\s+/g,l="-",n=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),u=new RegExp(n+"{3,}","g"),c=new RegExp(n+"$","g"),f=60;function h(d){return typeof d.toWellFormed=="function"?d.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(d))}r.exports=function(p,g=f){var m=h(p??"").replace(o,"").replace(t," ").replace(a,y=>y===l?y:"").toLowerCase().trim().replace(s,l).replace(i,"").replace(u,l);return m.length<=g?m:Array.from(m).slice(0,g).join("").replace(c,"")}}}),Yt=ye({"src/lib/index.js"(e,r){"use strict";var t=ai(),a=uy().utcFormat,i=SD().format,o=en(),s=Vn(),l=s.FP_SAFE,n=-l,u=s.BADNUM,c=r.exports={};c.adjustFormat=function(j){if(!j||/^\d[.]\df/.test(j)||/[.]\d%/.test(j))return j;if(j==="0.f")return"~f";if(/^\d%/.test(j))return"~%";if(/^\ds/.test(j))return"~s";var q=(j.match(/^[+\-( ]?/)||[""])[0],Y=j.slice(q.length);return!/^[~,.0$#]/.test(Y)&&/[&fps]/.test(Y)?q+"~"+Y:j};var f={};c.warnBadFormat=function(V){var j=String(V);f[j]||(f[j]=1,c.warn('encountered bad format: "'+j+'"'))},c.noFormat=function(V){return String(V)},c.numberFormat=function(V){var j;try{j=i(c.adjustFormat(V))}catch{return c.warnBadFormat(V),c.noFormat}return j},c.nestedProperty=Ux(),c.keyedContainer=OQ(),c.relativeAttr=NQ(),c.isPlainObject=yv(),c.toLogRange=pA(),c.relinkPrivateKeys=jQ();var h=yc();c.isArrayBuffer=h.isArrayBuffer,c.isTypedArray=h.isTypedArray,c.isArrayOrTypedArray=h.isArrayOrTypedArray,c.isArray1D=h.isArray1D,c.ensureArray=h.ensureArray,c.concat=h.concat,c.maxRowLength=h.maxRowLength,c.minRowLength=h.minRowLength;var d=(cy(),On(Am));c.mod=d.mod,c.modHalf=d.modHalf;var p=HQ();c.valObjectMeta=p.valObjectMeta,c.coerce=p.coerce,c.coerce2=p.coerce2,c.coerceFont=p.coerceFont,c.coercePattern=p.coercePattern,c.coerceHoverinfo=p.coerceHoverinfo,c.coerceSelectionMarkerOpacity=p.coerceSelectionMarkerOpacity,c.validate=p.validate;var g=Aee();c.dateTime2ms=g.dateTime2ms,c.isDateTime=g.isDateTime,c.ms2DateTime=g.ms2DateTime,c.ms2DateTimeLocal=g.ms2DateTimeLocal,c.cleanDate=g.cleanDate,c.isJSDate=g.isJSDate,c.formatDate=g.formatDate,c.incrementMonth=g.incrementMonth,c.dateTick0=g.dateTick0,c.dfltRange=g.dfltRange,c.findExactDates=g.findExactDates,c.MIN_MS=g.MIN_MS,c.MAX_MS=g.MAX_MS;var m=_A();c.findBin=m.findBin,c.sorterAsc=m.sorterAsc,c.sorterDes=m.sorterDes,c.distinctVals=m.distinctVals,c.roundUp=m.roundUp,c.sort=m.sort,c.findIndexOfMin=m.findIndexOfMin,c.sortObjectKeys=(Em(),On(bv)).default;var y=Mee();c.aggNums=y.aggNums,c.len=y.len,c.mean=y.mean,c.geometricMean=y.geometricMean,c.median=y.median,c.midRange=y.midRange,c.variance=y.variance,c.stdev=y.stdev,c.interp=y.interp;var _=mA();c.init2dArray=_.init2dArray,c.transposeRagged=_.transposeRagged,c.dot=_.dot,c.translationMatrix=_.translationMatrix,c.rotationMatrix=_.rotationMatrix,c.rotationXYMatrix=_.rotationXYMatrix,c.apply3DTransform=_.apply3DTransform,c.apply2DTransform=_.apply2DTransform,c.apply2DTransform2=_.apply2DTransform2,c.convertCssMatrix=_.convertCssMatrix,c.inverseTransformMatrix=_.inverseTransformMatrix;var v=Eee();c.deg2rad=v.deg2rad,c.rad2deg=v.rad2deg,c.angleDelta=v.angleDelta,c.angleDist=v.angleDist,c.isFullCircle=v.isFullCircle,c.isAngleInsideSector=v.isAngleInsideSector,c.isPtInsideSector=v.isPtInsideSector,c.pathArc=v.pathArc,c.pathSector=v.pathSector,c.pathAnnulus=v.pathAnnulus;var x=See();c.isLeftAnchor=x.isLeftAnchor,c.isCenterAnchor=x.isCenterAnchor,c.isRightAnchor=x.isRightAnchor,c.isTopAnchor=x.isTopAnchor,c.isMiddleAnchor=x.isMiddleAnchor,c.isBottomAnchor=x.isBottomAnchor;var E=kee();c.segmentsIntersect=E.segmentsIntersect,c.segmentDistance=E.segmentDistance,c.getTextLocation=E.getTextLocation,c.clearLocationCache=E.clearLocationCache,c.getVisibleSegment=E.getVisibleSegment,c.findPointOnPath=E.findPointOnPath;var M=Xi();c.extendFlat=M.extendFlat,c.extendDeep=M.extendDeep,c.extendDeepAll=M.extendDeepAll,c.extendDeepNoArrays=M.extendDeepNoArrays;var C=c0();c.log=C.log,c.warn=C.warn,c.error=C.error;var w=(hy(),On(Mm));c.counterRegex=w.counter;var k=xA();c.throttle=k.throttle,c.throttleDone=k.done,c.clearThrottle=k.clear;var T=Gx();c.getGraphDiv=T.getGraphDiv,c.isPlotDiv=T.isPlotDiv,c.removeElement=T.removeElement,c.addStyleRule=T.addStyleRule,c.addRelatedStyleRule=T.addRelatedStyleRule,c.deleteRelatedStyleRule=T.deleteRelatedStyleRule,c.setStyleOnHover=T.setStyleOnHover,c.getFullTransformMatrix=T.getFullTransformMatrix,c.getElementTransformMatrix=T.getElementTransformMatrix,c.getElementAndAncestors=T.getElementAndAncestors,c.equalDomRects=T.equalDomRects,c.clearResponsive=Cee(),c.preserveDrawingBuffer=Lee(),c.makeTraceGroups=Fee(),c._=Pee(),c.notifier=CD(),c.filterUnique=RD(),c.filterVisible=Iee(),c.pushUnique=DD(),c.increment=Ree(),c.cleanNumber=(Bee(),On(zD)).default,c.slugify=Oee(),c.ensureNumber=function(j){return o(j)?(j=Number(j),j>l||j=j?!1:o(V)&&V>=0&&V%1===0},c.noop=vA(),c.identity=Wx(),c.repeat=function(V,j){for(var q=new Array(j),Y=0;Yq?Math.max(q,Math.min(j,V)):Math.max(j,Math.min(q,V))},c.bBoxIntersect=function(V,j,q){return q=q||0,V.left<=j.right+q&&j.left<=V.right+q&&V.top<=j.bottom+q&&j.top<=V.bottom+q},c.simpleMap=function(V,j,q,Y,K){for(var re=V.length,se=new Array(re),le=0;le=Math.pow(2,q)?K>10?(c.warn("randstr failed uniqueness"),se):V(j,q,Y,(K||0)+1):se},c.OptionControl=function(V,j){V||(V={}),j||(j="opt");var q={};return q.optionList=[],q._newoption=function(Y){Y[j]=V,q[Y.name]=Y,q.optionList.push(Y)},q["_"+j]=V,q},c.smooth=function(V,j){if(j=Math.round(j)||0,j<2)return V;var q=V.length,Y=2*q,K=2*j-1,re=new Array(K),se=new Array(q),le,ue,fe,pe;for(le=0;le=Y&&(fe-=Y*Math.floor(fe/Y)),fe<0?fe=-1-fe:fe>=q&&(fe=Y-1-fe),pe+=V[fe]*re[ue];se[le]=pe}return se},c.syncOrAsync=function(V,j,q){var Y,K;function re(){return c.syncOrAsync(V,j,q)}for(;V.length;)if(K=V.splice(0,1)[0],Y=K(j),Y&&Y.then)return Y.then(re);return q&&q(j)},c.stripTrailingSlash=function(V){return V.slice(-1)==="/"?V.slice(0,-1):V},c.noneOrAll=function(V,j,q){if(V){var Y=!1,K=!0,re,se;for(re=0;re0?K:0})},c.fillArray=function(V,j,q,Y){if(Y=Y||c.identity,c.isArrayOrTypedArray(V))for(var K=0;KF.test(window.navigator.userAgent);var D=/Firefox\/(\d+)\.\d+/;c.getFirefoxVersion=function(){var V=D.exec(window.navigator.userAgent);if(V&&V.length===2){var j=parseInt(V[1]);if(!isNaN(j))return j}return null},c.isD3Selection=function(V){return V instanceof t.selection},c.ensureSingle=function(V,j,q,Y){var K=V.select(j+(q?"."+q:""));if(K.size())return K;var re=V.append(j);return q&&re.classed(q,!0),Y&&re.call(Y),re},c.ensureSingleById=function(V,j,q,Y){var K=V.select(j+"#"+q);if(K.size())return K;var re=V.append(j).attr("id",q);return Y&&re.call(Y),re},c.objectFromPath=function(V,j){for(var q=V.split("."),Y,K=Y={},re=0;re1?K+se[1]:"";if(re&&(se.length>1||le.length>4||q))for(;Y.test(le);)le=le.replace(Y,"$1"+re+"$2");return le+ue},c.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var I=/^\w*$/;c.templateString=function(V,j){var q={};return V.replace(c.TEMPLATE_STRING_REGEX,function(Y,K){var re;return I.test(K)?re=j[K]:(q[K]=q[K]||c.nestedProperty(j,K).get,re=q[K](!0)),re!==void 0?re:""})};var L={max:10,count:0,name:"hovertemplate"};c.hovertemplateString=V=>Z(Ci(ja({},V),{opts:L}));var B={max:10,count:0,name:"texttemplate"};c.texttemplateString=V=>Z(Ci(ja({},V),{opts:B}));var O=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function G(V){var j=V.match(O);return j?{key:j[1],op:j[2],number:Number(j[3])}:{key:V,op:null,number:null}}var $={max:10,count:0,name:"texttemplate",parseMultDiv:!0};c.texttemplateStringForShapes=V=>Z(Ci(ja({},V),{opts:$}));var X=/^[:|\|]/;function Z({data:V=[],locale:j,fallback:q,labels:Y={},opts:K,template:re}){return re.replace(c.TEMPLATE_STRING_REGEX,(se,le,ue)=>{let fe=["xother","yother"].includes(le),pe=["_xother","_yother"].includes(le),we=["_xother_","_yother_"].includes(le),xe=["xother_","yother_"].includes(le),he=fe||pe||xe||we;(pe||we)&&(le=le.substring(1)),(xe||we)&&(le=le.substring(0,le.length-1));let oe=null,te=null;if(K.parseMultDiv){var ie=G(le);le=ie.key,oe=ie.op,te=ie.number}let ee;if(he){if(Y[le]===void 0)return"";ee=Y[le]}else for(let Me of V)if(Me){if(Me.hasOwnProperty(le)){ee=Me[le];break}if(I.test(le)||(ee=c.nestedProperty(Me,le).get(!0)),ee!==void 0)break}if(ee===void 0){let{count:Me,max:Ue,name:Ge}=K,Ze=q===!1?se:q;return Me=J&&se<=N,fe=le>=J&&le<=N;if(ue&&(Y=10*Y+se-J),fe&&(K=10*K+le-J),!ue||!fe){if(Y!==K)return Y-K;if(se!==le)return se-le}}return K-Y};var H=2e9;c.seedPseudoRandom=function(){H=2e9},c.pseudoRandom=function(){var V=H;return H=(69069*H+1)%4294967296,Math.abs(H-V)<429496729?c.pseudoRandom():H/4294967296},c.fillText=function(V,j,q){var Y=Array.isArray(q)?function(se){q.push(se)}:function(se){q.text=se},K=c.extractOption(V,j,"htx","hovertext");if(c.isValidTextValue(K))return Y(K);var re=c.extractOption(V,j,"tx","text");if(c.isValidTextValue(re))return Y(re)},c.isValidTextValue=function(V){return V||V===0},c.formatPercent=function(V,j){j=j||0;for(var q=(Math.round(100*V*Math.pow(10,j))*Math.pow(.1,j)).toFixed(j)+"%",Y=0;Y1&&(fe=1):fe=0,c.strTranslate(K-fe*(q+se),re-fe*(Y+le))+c.strScale(fe)+(ue?"rotate("+ue+(j?"":" "+q+" "+Y)+")":"")},c.setTransormAndDisplay=function(V,j){V.attr("transform",c.getTextTransform(j)),V.style("display",j.scale?null:"none")},c.ensureUniformFontSize=function(V,j){var q=c.extendFlat({},j);return q.size=Math.max(j.size,V._fullLayout.uniformtext.minsize||0),q},c.join2=function(V,j,q){var Y=V.length;return Y>1?V.slice(0,-1).join(j)+q+V[Y-1]:V.join(j)},c.bigFont=function(V){return Math.round(1.2*V)};var W=c.getFirefoxVersion(),U=W!==null&&W<86;c.getPositionFromD3Event=function(){return U?[t.event.layerX,t.event.layerY]:[t.event.offsetX,t.event.offsetY]}}}),Nee=ye({"build/plotcss.js"(){"use strict";var e=Yt(),r={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(a in r)t=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),e.addStyleRule(t,r[a]);var t,a}}),UD=ye({"node_modules/is-browser/client.js"(e,r){r.exports=!0}}),qD=ye({"node_modules/has-hover/index.js"(e,r){"use strict";var t=UD(),a;typeof window.matchMedia=="function"?a=!window.matchMedia("(hover: none)").matches:a=t,r.exports=a}}),Sm=ye({"node_modules/events/events.js"(e,r){"use strict";var t=typeof Reflect=="object"?Reflect:null,a=t&&typeof t.apply=="function"?t.apply:function(C,w,k){return Function.prototype.apply.call(C,w,k)},i;t&&typeof t.ownKeys=="function"?i=t.ownKeys:Object.getOwnPropertySymbols?i=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:i=function(C){return Object.getOwnPropertyNames(C)};function o(M){console&&console.warn&&console.warn(M)}var s=Number.isNaN||function(C){return C!==C};function l(){l.init.call(this)}r.exports=l,r.exports.once=v,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var n=10;function u(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(M){if(typeof M!="number"||M<0||s(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");n=M}}),l.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},l.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||s(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function c(M){return M._maxListeners===void 0?l.defaultMaxListeners:M._maxListeners}l.prototype.getMaxListeners=function(){return c(this)},l.prototype.emit=function(C){for(var w=[],k=1;k0&&(S=w[0]),S instanceof Error)throw S;var A=new Error("Unhandled error."+(S?" ("+S.message+")":""));throw A.context=S,A}var F=b[C];if(F===void 0)return!1;if(typeof F=="function")a(F,this,w);else for(var D=F.length,R=m(F,D),k=0;k0&&S.length>T&&!S.warned){S.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+S.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=M,A.type=C,A.count=S.length,o(A)}return M}l.prototype.addListener=function(C,w){return f(this,C,w,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(C,w){return f(this,C,w,!0)};function h(){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 d(M,C,w){var k={fired:!1,wrapFn:void 0,target:M,type:C,listener:w},T=h.bind(k);return T.listener=w,k.wrapFn=T,T}l.prototype.once=function(C,w){return u(w),this.on(C,d(this,C,w)),this},l.prototype.prependOnceListener=function(C,w){return u(w),this.prependListener(C,d(this,C,w)),this},l.prototype.removeListener=function(C,w){var k,T,b,S,A;if(u(w),T=this._events,T===void 0)return this;if(k=T[C],k===void 0)return this;if(k===w||k.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete T[C],T.removeListener&&this.emit("removeListener",C,k.listener||w));else if(typeof k!="function"){for(b=-1,S=k.length-1;S>=0;S--)if(k[S]===w||k[S].listener===w){A=k[S].listener,b=S;break}if(b<0)return this;b===0?k.shift():y(k,b),k.length===1&&(T[C]=k[0]),T.removeListener!==void 0&&this.emit("removeListener",C,A||w)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(C){var w,k,T;if(k=this._events,k===void 0)return this;if(k.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):k[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete k[C]),this;if(arguments.length===0){var b=Object.keys(k),S;for(T=0;T=0;T--)this.removeListener(C,w[T]);return this};function p(M,C,w){var k=M._events;if(k===void 0)return[];var T=k[C];return T===void 0?[]:typeof T=="function"?w?[T.listener||T]:[T]:w?_(T):m(T,T.length)}l.prototype.listeners=function(C){return p(this,C,!0)},l.prototype.rawListeners=function(C){return p(this,C,!1)},l.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):g.call(M,C)},l.prototype.listenerCount=g;function g(M){var C=this._events;if(C!==void 0){var w=C[M];if(typeof w=="function")return 1;if(w!==void 0)return w.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function m(M,C){for(var w=new Array(C),k=0;k{},{passive:!0}),i},triggerHandler:function(i,o,s){var l,n=i._ev;if(!n)return;var u=n._events[o];if(!u)return;function c(h){if(h.listener){if(n.removeListener(o,h.listener),!h.fired)return h.fired=!0,h.listener.apply(n,[s])}else return h.apply(n,[s])}u=Array.isArray(u)?u:[u];var f;for(f=0;fa.queueLength&&(s.undoQueue.queue.shift(),s.undoQueue.index--)},o.startSequence=function(s){s.undoQueue=s.undoQueue||{index:0,queue:[],sequence:!1},s.undoQueue.sequence=!0,s.undoQueue.beginSequence=!0},o.stopSequence=function(s){s.undoQueue=s.undoQueue||{index:0,queue:[],sequence:!1},s.undoQueue.sequence=!1,s.undoQueue.beginSequence=!1},o.undo=function(l){var n,u;if(!(l.undoQueue===void 0||isNaN(l.undoQueue.index)||l.undoQueue.index<=0)){for(l.undoQueue.index--,n=l.undoQueue.queue[l.undoQueue.index],l.undoQueue.inSequence=!0,u=0;u=l.undoQueue.queue.length)){for(n=l.undoQueue.queue[l.undoQueue.index],l.undoQueue.inSequence=!0,u=0;u=L.length)return!1;if(D.dimensions===2){if(P++,R.length===P)return D;var B=R[P];if(!E(B))return!1;D=L[I][B]}else D=L[I]}else D=L}}return D}function E(D){return D===Math.round(D)&&D>=0}function M(D){var R,P;R=r.modules[D]._module,P=R.basePlotModule;var z={};z.type=null;var I=u({},a),L=u({},R.attributes);e.crawl(L,function(G,$,X,Z,J){h(I,J).set(void 0),G===void 0&&h(L,J).set(void 0)}),u(z,I),r.traceIs(D,"noOpacity")&&delete z.opacity,r.traceIs(D,"showLegend")||(delete z.showlegend,delete z.legendgroup),r.traceIs(D,"noHover")&&(delete z.hoverinfo,delete z.hoverlabel),R.selectPoints||delete z.selectedpoints,u(z,L),P.attributes&&u(z,P.attributes),z.type=D;var B={meta:R.meta||{},categories:R.categories||{},animatable:!!R.animatable,type:D,attributes:k(z)};if(R.layoutAttributes){var O={};u(O,R.layoutAttributes),B.layoutAttributes=k(O)}return R.animatable||e.crawl(B,function(G){e.isValObject(G)&&"anim"in G&&delete G.anim}),B}function C(){var D={},R,P;u(D,i);for(R in r.subplotsRegistry)if(P=r.subplotsRegistry[R],!!P.layoutAttributes)if(Array.isArray(P.attr))for(var z=0;z=c&&(u._input||{})._templateitemname;h&&(f=c);var d=n+"["+f+"]",p;function g(){p={},h&&(p[d]={},p[d][a]=h)}g();function m(x,E){p[x]=E}function y(x,E){h?r.nestedProperty(p[d],x).set(E):p[d+"."+x]=E}function _(){var x=p;return g(),x}function v(x,E){x&&y(x,E);var M=_();for(var C in M)r.nestedProperty(l,C).set(M[C])}return{modifyBase:m,modifyItem:y,getUpdateObj:_,applyUpdate:v}}}}),$l=ye({"src/plots/cartesian/constants.js"(e,r){"use strict";var t=(hy(),On(Mm)).counter;r.exports={idRegex:{x:t("x","( domain)?"),y:t("y","( domain)?")},attrRegex:t("[xy]axis"),xAxisMatch:t("xaxis"),yAxisMatch:t("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"}}}),Gs=ye({"src/plots/cartesian/axis_ids.js"(e){"use strict";var r=li(),t=$l();e.id2name=function(o){if(!(typeof o!="string"||!o.match(t.AX_ID_PATTERN))){var s=o.split(" ")[0].slice(1);return s==="1"&&(s=""),o.charAt(0)+"axis"+s}},e.name2id=function(o){if(o.match(t.AX_NAME_PATTERN)){var s=o.slice(5);return s==="1"&&(s=""),o.charAt(0)+s}},e.cleanId=function(o,s,l){var n=/( domain)$/.test(o);if(!(typeof o!="string"||!o.match(t.AX_ID_PATTERN))&&!(s&&o.charAt(0)!==s)&&!(n&&!l)){var u=o.split(" ")[0].slice(1).replace(/^0+/,"");return u==="1"&&(u=""),o.charAt(0)+u+(n&&l?" domain":"")}},e.list=function(i,o,s){var l=i._fullLayout;if(!l)return[];var n=e.listIds(i,o),u=new Array(n.length),c;for(c=0;cl?1:-1:+(i.slice(1)||1)-+(o.slice(1)||1)},e.ref2id=function(i){return/^[xyz]/.test(i)?i.split(" ")[0]:!1};function a(i,o){if(o&&o.length){for(var s=0;s0?".":"")+h;t.isPlainObject(d)?l(d,u,p,f+1):u(p,h,d)}})}}}),ws=ye({"src/plots/plots.js"(e,r){"use strict";var t=ai(),a=uy().timeFormatLocale,i=SD().formatLocale,o=en(),s=kD(),l=jx().version,n=li(),u=vy(),c=ko(),f=Yt(),h=Ya(),d=Vn().BADNUM,p=Gs(),g=wv().clearOutline,m=bA(),y=Hx(),_=VD(),v=_c().getModuleCalcData,x=f.relinkPrivateKeys,E=f._,M=r.exports={};f.extendFlat(M,n),M.attributes=Oo(),M.attributes.type.values=M.allTypes,M.fontAttrs=vs(),M.layoutAttributes=dy();var C=Uee();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(N){return N=f.getGraphDiv(N),new Promise(function(H){setTimeout(function(){N._fullLayout&&(n.getComponentMethod("annotations","draw")(N),n.getComponentMethod("legend","draw")(N),n.getComponentMethod("colorbar","draw")(N),H(M.previousPromises(N)))},300)})},M.resize=function(N){N=f.getGraphDiv(N);var H,W=new Promise(function(U,V){(!N||f.isHidden(N))&&V(new Error("Resize must be passed a displayed plot div element.")),N._redrawTimer&&clearTimeout(N._redrawTimer),N._resolveResize&&(H=N._resolveResize),N._resolveResize=U,N._redrawTimer=setTimeout(function(){if(!N.layout||N.layout.width&&N.layout.height||f.isHidden(N)){U(N);return}delete N.layout.width,delete N.layout.height;var j=N.changed;N.autoplay=!0,n.call("relayout",N,{autosize:!0}).then(function(){N.changed=j,N._resolveResize===U&&(delete N._resolveResize,U(N))})},100)});return H&&H(W),W},M.previousPromises=function(N){if((N._promises||[]).length)return Promise.all(N._promises).then(function(){N._promises=[]})},M.sendDataToCloud=function(N,H){N.emit("plotly_beforeexport");let W=new URL(H).origin;var U=M.graphJson(N,!1,"object");U.version=l;var V=new URL(H);V.searchParams.set("origin",window.location.origin);var j=window.open(V.href,"_blank");if(!j){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),N.emit("plotly_exportfail");return}var q=function(Y){Y.origin===W&&Y.data&&Y.data.type==="CHART_AUTH_SUCCESS"&&(j.postMessage({type:"chart",chart:U},W),window.removeEventListener("message",q),N.emit("plotly_afterexport"))};return window.addEventListener("message",q),!1};var w=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],k=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(N,H){var W=H&&H.skipUpdateCalc,U=N._fullLayout||{};if(U._skipDefaults){delete U._skipDefaults;return}var V=N._fullLayout={},j=N.layout||{},q=N._fullData||[],Y=N._fullData=[],K=N.data||[],re=N.calcdata||[],se=N._context||{},le;N._transitionData||M.createTransitionData(N),V._dfltTitle={plot:E(N,"Click to enter Plot title"),subtitle:E(N,"Click to enter Plot subtitle"),x:E(N,"Click to enter X axis title"),y:E(N,"Click to enter Y axis title"),colorbar:E(N,"Click to enter Colorscale title"),annotation:E(N,"new text")},V._traceWord=E(N,"trace");var ue=S(N,w);if(U._initialAutoSizeIsDone){var fe=U.width,pe=U.height;M.supplyLayoutGlobalDefaults(j,V,ue),j.width||(V.width=fe),j.height||(V.height=pe),M.sanitizeMargins(V)}else{M.supplyLayoutGlobalDefaults(j,V,ue);var we=!j.width||!j.height,xe=V.autosize,he=se.autosizable,oe=we&&(xe||he);oe?M.plotAutoSize(N,j,V):we&&M.sanitizeMargins(V),!xe&&we&&(j.width=V.width,j.height=V.height)}V._d3locale=A(ue,V.separators),V._extraFormat=S(N,k),V._initialAutoSizeIsDone=!0,V._dataLength=K.length,V._modules=[],V._visibleModules=[],V._basePlotModules=[];var te=V._subplots=b(),ie=V._splomAxes={x:{},y:{}},ee=V._splomSubplots={};V._splomGridDflt={},V._scatterStackOpts={},V._firstScatter={},V._alignmentOpts={},V._colorAxes={},V._requestRangeslider={},V._traceUids=T(q,K),M.supplyDataDefaults(K,Y,j,V);var ce=Object.keys(ie.x),_e=Object.keys(ie.y);if(ce.length>1&&_e.length>1){for(n.getComponentMethod("grid","sizeDefaults")(j,V),le=0;le15&&_e.length>15&&V.shapes.length===0&&V.images.length===0,M.linkSubplots(Y,V,q,U),M.cleanPlot(Y,V,q,U);var Ze=!!(U._has&&U._has("cartesian")),Ke=!!(V._has&&V._has("cartesian")),dt=Ze,_t=Ke;dt&&!_t?U._bgLayer.remove():_t&&!dt&&(V._shouldCreateBgLayer=!0),U._zoomlayer&&!N._dragging&&g({_fullLayout:U}),F(Y,V),x(V,U),n.getComponentMethod("colorscale","crossTraceDefaults")(Y,V),V._preGUI||(V._preGUI={}),V._tracePreGUI||(V._tracePreGUI={});var Pt=V._tracePreGUI,vt={},Tt;for(Tt in Pt)vt[Tt]="old";for(le=0;le0){var se=1-2*j;q=Math.round(se*q),Y=Math.round(se*Y)}}var le=M.layoutAttributes.width.min,ue=M.layoutAttributes.height.min;q1,pe=!W.height&&Math.abs(U.height-Y)>1;(pe||fe)&&(fe&&(U.width=q),pe&&(U.height=Y)),H._initialAutoSize||(H._initialAutoSize={width:q,height:Y}),M.sanitizeMargins(U)},M.supplyLayoutModuleDefaults=function(N,H,W,U){var V=n.componentsRegistry,j=H._basePlotModules,q,Y,K,re=n.subplotsRegistry.cartesian;for(q in V)K=V[q],K.includeBasePlot&&K.includeBasePlot(N,H);j.length||j.push(re),H._has("cartesian")&&(n.getComponentMethod("grid","contentDefaults")(N,H),re.finalizeSubplots(N,H));for(var se in H._subplots)H._subplots[se].sort(f.subplotSort);for(Y=0;Y1&&(W.l/=xe,W.r/=xe)}if(ue){var he=(W.t+W.b)/ue;he>1&&(W.t/=he,W.b/=he)}var oe=W.xl!==void 0?W.xl:W.x,te=W.xr!==void 0?W.xr:W.x,ie=W.yt!==void 0?W.yt:W.y,ee=W.yb!==void 0?W.yb:W.y;fe[H]={l:{val:oe,size:W.l+we},r:{val:te,size:W.r+we},b:{val:ee,size:W.b+we},t:{val:ie,size:W.t+we}},pe[H]=1}if(!U._replotting)return M.doAutoMargin(N)}};function L(N){if("_redrawFromAutoMarginCount"in N._fullLayout)return!1;var H=p.list(N,"",!0);for(var W in H)if(H[W].autoshift||H[W].shift)return!0;return!1}M.doAutoMargin=function(N){var H=N._fullLayout,W=H.width,U=H.height;H._size||(H._size={}),P(H);var V=H._size,j=H.margin,q={t:0,b:0,l:0,r:0},Y=f.extendFlat({},V),K=j.l,re=j.r,se=j.t,le=j.b,ue=H._pushmargin,fe=H._pushmarginIds,pe=H.minreducedwidth,we=H.minreducedheight;if(j.autoexpand!==!1){for(var xe in ue)fe[xe]||delete ue[xe];var he=N._fullLayout._reservedMargin;for(var oe in he)for(var te in he[oe]){var ie=he[oe][te];q[te]=Math.max(q[te],ie)}ue.base={l:{val:0,size:K},r:{val:1,size:re},t:{val:1,size:se},b:{val:0,size:le}};for(var ee in q){var ce=0;for(var _e in ue)_e!=="base"&&o(ue[_e][ee].size)&&(ce=ue[_e][ee].size>ce?ue[_e][ee].size:ce);var Se=Math.max(0,j[ee]-ce);q[ee]=Math.max(0,q[ee]-Se)}for(var Me in ue){var Ue=ue[Me].l||{},Ge=ue[Me].b||{},Ze=Ue.val,Ke=Ue.size,dt=Ge.val,_t=Ge.size,Pt=W-q.r-q.l,vt=U-q.t-q.b;for(var Tt in ue){if(o(Ke)&&ue[Tt].r){var st=ue[Tt].r.val,Ve=ue[Tt].r.size;if(st>Ze){var Ye=(Ke*st+(Ve-Pt)*Ze)/(st-Ze),me=(Ve*(1-Ze)+(Ke-Pt)*(1-st))/(st-Ze);Ye+me>K+re&&(K=Ye,re=me)}}if(o(_t)&&ue[Tt].t){var be=ue[Tt].t.val,Ee=ue[Tt].t.size;if(be>dt){var De=(_t*be+(Ee-vt)*dt)/(be-dt),Ce=(Ee*(1-dt)+(_t-vt)*(1-be))/(be-dt);De+Ce>le+se&&(le=De,se=Ce)}}}}}var Fe=f.constrain(W-j.l-j.r,z,pe),Je=f.constrain(U-j.t-j.b,I,we),qe=Math.max(0,W-Fe),at=Math.max(0,U-Je);if(qe){var tt=(K+re)/qe;tt>1&&(K/=tt,re/=tt)}if(at){var ct=(le+se)/at;ct>1&&(le/=ct,se/=ct)}if(V.l=Math.round(K)+q.l,V.r=Math.round(re)+q.r,V.t=Math.round(se)+q.t,V.b=Math.round(le)+q.b,V.p=Math.round(j.pad),V.w=Math.round(W)-V.l-V.r,V.h=Math.round(U)-V.t-V.b,!H._replotting&&(M.didMarginChange(Y,V)||L(N))){"_redrawFromAutoMarginCount"in H?H._redrawFromAutoMarginCount++:H._redrawFromAutoMarginCount=1;var At=3*(1+Object.keys(fe).length);if(H._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(N,H=!1,W="json",U=!1,V=!1){(U&&H&&!N._fullData||U&&!H&&!N._fullLayout)&&M.supplyDefaults(N);var j=U?N._fullData:N.data,q=U?N._fullLayout:N.layout,Y=(N._transitionData||{})._frames;function K(le,ue){if(typeof le=="function")return ue?"_function_":null;if(f.isPlainObject(le)){var fe={};return Object.keys(le).sort().forEach(function(he){if(["_","["].indexOf(he.charAt(0))===-1){if(typeof le[he]=="function"){ue&&(fe[he]="_function");return}fe[he]=K(le[he],ue)}}),fe}var pe=Array.isArray(le),we=f.isTypedArray(le);if((pe||we)&&le.dtype&&le.shape){var xe=le.bdata;return K({dtype:le.dtype,shape:le.shape,bdata:f.isArrayBuffer(xe)?s.encode(xe):xe},ue)}return pe?le.map(function(he){return K(he,ue)}):we?f.simpleMap(le,f.identity):f.isJSDate(le)?f.ms2DateTimeLocal(+le):le}var re={data:(j||[]).map(function(le){var ue=K(le);return H&&delete ue.fit,ue})};if(!H&&(re.layout=K(q),U)){var se=q._size;re.layout.computed={margin:{b:se.b,l:se.l,r:se.r,t:se.t}}}return Y&&(re.frames=K(Y)),V&&(re.config=K(N._context,!0)),W==="object"?re:JSON.stringify(re)},M.modifyFrames=function(N,H){var W,U,V,j=N._transitionData._frames,q=N._transitionData._frameHash;for(W=0;W0&&(N._transitioningWithDuration=!0),N._transitionData._interruptCallbacks.push(function(){U=!0}),W.redraw&&N._transitionData._interruptCallbacks.push(function(){return n.call("redraw",N)}),N._transitionData._interruptCallbacks.push(function(){N.emit("plotly_transitioninterrupted",[])});var ue=0,fe=0;function pe(){return ue++,function(){fe++,!U&&fe===ue&&Y(le)}}W.runFn(pe),setTimeout(pe())})}function Y(le){if(N._transitionData)return j(N._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(W.redraw)return n.call("redraw",N)}).then(function(){N._transitioning=!1,N._transitioningWithDuration=!1,N.emit("plotly_transitioned",[])}).then(le)}function K(){if(N._transitionData)return N._transitioning=!1,V(N._transitionData._interruptCallbacks)}var re=[M.previousPromises,K,W.prepareFn,M.rehover,M.reselect,q],se=f.syncOrAsync(re,N);return(!se||!se.then)&&(se=Promise.resolve()),se.then(function(){return N})}M.doCalcdata=function(N,H){var W=p.list(N),U=N._fullData,V=N._fullLayout,j,q,Y,K=new Array(U.length),re=(N.calcdata||[]).slice();for(N.calcdata=K,V._numBoxes=0,V._numViolins=0,V._violinScaleGroupStats={},N._hmpixcount=0,N._hmlumcount=0,V._piecolormap={},V._sunburstcolormap={},V._treemapcolormap={},V._iciclecolormap={},V._funnelareacolormap={},Y=0;Y$?$.match(s):null;e.matchTex=l,e.convertToTspans=function($,X,Z){var J=$.text(),N=!$.attr("data-notex")&&X&&X._context.typesetMath&&l(J);N&&!g()&&(N=null);var H=r.select($.node().parentNode);if(H.empty())return;var W=$.attr("class")?$.attr("class").split(" ")[0]:"text";W+="-math",H.selectAll("svg."+W).remove(),H.selectAll("g."+W+"-group").remove(),$.style("display",null).attr({"data-unformatted":J,"data-math":"N"});function U(){H.empty()||(W=$.attr("class")+"-math",H.select("svg."+W).remove()),$.text("").style("white-space","pre");var V=L($.node(),J);V&&$.style("pointer-events","all"),e.positionText($),Z&&Z.call($)}return N?(X&&X._promises||[]).push(new Promise(function(V){$.style("display","none");var j=parseInt($.node().style.fontSize,10),q={fontSize:j},Y=$.attr("text-anchor");m(N[2],q,function(K,re,se){H.selectAll("svg."+W).remove(),H.selectAll("g."+W+"-group").remove();var le=K&&K.select("svg");if(!le||!le.node()){U(),V();return}$.style("display","none");var ue=H.append("g").classed(W+"-group",!0).attr({"pointer-events":"none","data-unformatted":J,"data-math":"Y"});ue.node().appendChild(le.node()),re&&re.node()&&le.node().insertBefore(re.node().cloneNode(!0),le.node().firstChild);var fe=se.width,pe=se.height;le.attr({class:W,height:pe,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":q.fontSize+"px"});var we=$.node().style.fill||"black",xe=le.select("g");xe.attr({fill:we,stroke:we});var he=xe.node().getBoundingClientRect(),oe=he.width,te=he.height;(oe>fe||te>pe)&&(le.style("overflow","hidden"),he=le.node().getBoundingClientRect(),oe=he.width,te=he.height);var ie=+$.attr("x"),ee=+$.attr("y"),ce=j||$.node().getBoundingClientRect().height,_e=-ce/4;W[0]==="y"?ue.attr({transform:"rotate("+[-90,ie,ee]+")"+a(-oe/2,_e-te/2)}):W[0]==="l"?ee=_e-te/2:W[0]==="a"&&W.indexOf("atitle")!==0?(ie=0,ee=_e):(ie=ie-oe*(Y==="middle"?.5:Y==="end"?1:0),ee=ee+_e-te/2),le.attr({x:ie,y:ee}),Z&&Z.call($,ue),V(ue)})})):U(),$};var n=/(<|<|<)/g,u=/(>|>|>)/g;function c($){return $.replace(n,"\\lt ").replace(u,"\\gt ")}var f=null,h=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,d=!1,p=!1;function g(){let $=h();return $===3||$===4?!0:($===null?d||(d=!0,t.warn("MathJax is not loaded. Math equations will not be rendered.")):p||(p=!0,t.warn("Unsupported MathJax version:",MathJax.version)),!1)}function m($,X,Z){let J=h();var N;let H=function(){if(!f){let j=MathJax._.output.svg_ts.SVG,q=t.extendFlat({},MathJax.config.svg,{fontCache:"local"});J===4&&(q.linebreaks=t.extendFlat({},q.linebreaks,{inline:!1})),f=MathJax._.mathjax.mathjax.document(document,t.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new j(q)}))}let U="math-output-"+t.randstr({},64);N=r.select("body").append("div").attr({id:U}).style({visibility:"hidden",position:"absolute","font-size":X.fontSize+"px"});let V=c($).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return f.convert(V,{display:!1})}).then(function(j){N.node().appendChild(j)})},W=function(){let U=N.select(".MathJax"),V=!U.empty()&&N.select("svg").node();if(!V)t.log("There was an error in the tex syntax.",$),Z();else{let j=V.getBoundingClientRect(),q=U.select("defs");Z(U,q,j)}N.remove()};Promise.resolve().then(H).then(W).catch(U=>{t.log("MathJax typesetting failed.",$,U),N&&N.remove(),Z()})}var y={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"},_={sub:"0.3em",sup:"-0.6em"},v={sub:"-0.21em",sup:"0.42em"},x="\u200B",E=["http:","https:","mailto:","",void 0,":"],M=e.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,w=/<(\/?)([^ >]*)(\s+(.*))?>/i,k=//i;e.BR_TAG_ALL=//gi;var T=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,b=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,S=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function F($,X){if(!$)return null;var Z=$.match(X),J=Z&&(Z[3]||Z[4]);return J&&z(J)}var D=/(^|;)\s*color:/;e.plainText=function($,X){X=X||{};for(var Z=X.len!==void 0&&X.len!==-1?X.len:1/0,J=X.allowedTags!==void 0?X.allowedTags:["br"],N="...",H=N.length,W=$.split(C),U=[],V="",j=0,q=0;qH?U.push(Y.slice(0,Math.max(0,le-H))+N):U.push(Y.slice(0,le));break}V=""}}return U.join("")};var R={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},P=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function z($){return $.replace(P,function(X,Z){var J;return Z.charAt(0)==="#"?J=I(Z.charAt(1)==="x"?parseInt(Z.slice(2),16):parseInt(Z.slice(1),10)):J=R[Z],J||X})}e.convertEntities=z;function I($){if(!($>1114111)){var X=String.fromCodePoint;if(X)return X($);var Z=String.fromCharCode;return $<=65535?Z($):Z(($>>10)+55232,$%1024+56320)}}function L($,X){X=X.replace(M," ");var Z=!1,J=[],N,H=-1;function W(){H++;var oe=document.createElementNS(i.svg,"tspan");r.select(oe).attr({class:"line",dy:H*o+"em"}),$.appendChild(oe),N=oe;var te=J;if(J=[{node:oe}],te.length>1)for(var ie=1;ie.",X);return}var te=J.pop();oe!==te.type&&t.log("Start tag <"+te.type+"> doesnt match end tag <"+oe+">. Pretending it did match.",X),N=J[J.length-1].node}var q=k.test(X);q?W():(N=$,J=[{node:$}]);for(var Y=X.split(C),K=0;K=0;_--,v++){var x=g[_];y[v]=[1-x[0],x[1]]}return y}function d(g,m){m=m||{};for(var y=g.domain,_=g.range,v=_.length,x=new Array(v),E=0;Ey-g?g=y-(m-y):m-y=0?x=u.colorscale.sequential:x=u.colorscale.sequentialminus,d._sync("colorscale",x)}}}}),As=ye({"src/components/colorscale/index.js"(e,r){"use strict";var t=Tm(),a=xc();r.exports={moduleType:"component",name:"colorscale",attributes:rs(),layoutAttributes:GD(),supplyLayoutDefaults:qee(),handleDefaults:Su(),crossTraceDefaults:Vee(),calc:Nc(),scales:t.scales,defaultScale:t.defaultScale,getScale:t.get,isValidScale:t.isValid,hasColorscale:a.hasColorscale,extractOpts:a.extractOpts,extractScale:a.extractScale,flipScale:a.flipScale,makeColorScaleFunc:a.makeColorScaleFunc,makeColorScaleFuncFromTrace:a.makeColorScaleFuncFromTrace}}}),ms=ye({"src/traces/scatter/subtypes.js"(e,r){"use strict";var t=Yt(),a=yc().isTypedArraySpec;r.exports={hasLines:function(i){return i.visible&&i.mode&&i.mode.indexOf("lines")!==-1},hasMarkers:function(i){return i.visible&&(i.mode&&i.mode.indexOf("markers")!==-1||i.type==="splom")},hasText:function(i){return i.visible&&i.mode&&i.mode.indexOf("text")!==-1},isBubble:function(i){var o=i.marker;return t.isPlainObject(o)&&(t.isArrayOrTypedArray(o.size)||a(o.size))}}}}),$x=ye({"src/traces/scatter/make_bubble_size_func.js"(e,r){"use strict";var t=en();r.exports=function(i,o){o||(o=2);var s=i.marker,l=s.sizeref||1,n=s.sizemin||0,u=s.sizemode==="area"?function(c){return Math.sqrt(c/l)}:function(c){return c/l};return function(c){var f=u(c/o);return t(f)&&f>0?Math.max(f,n):0}}}}),Bf=ye({"src/components/fx/helpers.js"(e){"use strict";var r=Yt();e.getSubplot=function(l){return l.subplot||l.xaxis+l.yaxis||l.geo},e.isTraceInSubplots=function(l,n){if(l.type==="splom"){for(var u=l.xaxes||[],c=l.yaxes||[],f=0;f=0&&u.index{let h=c.toLowerCase(),d=c,p=s(f);for(h==="m"&&p.length>2&&(n.push([d,...p.splice(0,2)]),h="l",d=d==="m"?"l":"L");;){if(p.length===t[h])return n.push([d,...p]),"";if(p.length0&&(te=100,oe=oe.replace("-open","")),oe.indexOf("-dot")>0&&(te+=200,oe=oe.replace("-dot","")),oe=_.symbolNames.indexOf(oe),oe>=0&&(oe+=te)}return oe%100>=k||oe>=400?0:Math.floor(Math.max(oe,0))};function b(oe,te,ie,ee){var ce=oe%100;return _.symbolFuncs[ce](te,ie,ee)+(oe>=200?T:"")}var S=i("~f"),A={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}};_.gradient=function(oe,te,ie,ee,ce,_e){var Se=A[ee];return F(oe,te,ie,Se.type,ce,_e,Se.start,Se.stop,!1,Se.reversed)};function F(oe,te,ie,ee,ce,_e,Se,Me,Ue,Ge){var Ze=ce.length,Ke;ee==="linear"?Ke={node:"linearGradient",attrs:{x1:Se.x,y1:Se.y,x2:Me.x,y2:Me.y,gradientUnits:Ue?"userSpaceOnUse":"objectBoundingBox"},reversed:Ge}:ee==="radial"&&(Ke={node:"radialGradient",reversed:Ge});for(var dt=new Array(Ze),_t=0;_t=0&&oe.i===void 0&&(oe.i=_e.i),te.style("opacity",ee.selectedOpacityFn?ee.selectedOpacityFn(oe):oe.mo===void 0?Se.opacity:oe.mo),ee.ms2mrc){var Ue;oe.ms==="various"||Se.size==="various"?Ue=3:Ue=ee.ms2mrc(oe.ms),oe.mrc=Ue,ee.selectedSizeFn&&(Ue=oe.mrc=ee.selectedSizeFn(oe));var Ge=_.symbolNumber(oe.mx||Se.symbol)||0;oe.om=Ge%200>=100;var Ze=he(oe,ie),Ke=q(oe,ie);te.attr("d",b(Ge,Ue,Ze,Ke))}var dt=!1,_t,Pt,vt;if(oe.so)vt=Me.outlierwidth,Pt=Me.outliercolor,_t=Se.outliercolor;else{var Tt=(Me||{}).width;vt=(oe.mlw+1||Tt+1||(oe.trace?(oe.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in oe?Pt=oe.mlcc=ee.lineScale(oe.mlc):a.isArrayOrTypedArray(Me.color)?Pt=l.defaultLine:Pt=Me.color,a.isArrayOrTypedArray(Se.color)&&(_t=l.defaultLine,dt=!0),"mc"in oe?_t=oe.mcc=ee.markerScale(oe.mc):_t=Se.color||Se.colors||"rgba(0,0,0,0)",ee.selectedColorFn&&(_t=ee.selectedColorFn(oe))}let st=oe.mld||(Me||{}).dash;if(st&&_.dashLine(te,st,vt),oe.om)te.call(l.stroke,_t).style({"stroke-width":(vt||1)+"px",fill:"none"});else{te.style("stroke-width",(oe.isBlank?0:vt)+"px");var Ve=Se.gradient,Ye=oe.mgt;Ye?dt=!0:Ye=Ve&&Ve.type,a.isArrayOrTypedArray(Ye)&&(Ye=Ye[0],A[Ye]||(Ye=0));var me=Se.pattern,be=_.getPatternAttr,Ee=me&&(be(me.shape,oe.i,"")||be(me.path,oe.i,""));if(Ye&&Ye!=="none"){var De=oe.mgc;De?dt=!0:De=Ve.color;var Ce=ie.uid;dt&&(Ce+="-"+oe.i),_.gradient(te,ce,Ce,Ye,[[0,De],[1,_t]],"fill")}else if(Ee){var Fe=!1,Je=me.fgcolor;!Je&&_e&&_e.color&&(Je=_e.color,Fe=!0);var qe=be(Je,oe.i,_e&&_e.color||null),at=be(me.bgcolor,oe.i,null),tt=me.fgopacity,ct=be(me.size,oe.i,8),At=be(me.solidity,oe.i,.3);Fe=Fe||oe.mcc||a.isArrayOrTypedArray(me.shape)||a.isArrayOrTypedArray(me.path)||a.isArrayOrTypedArray(me.bgcolor)||a.isArrayOrTypedArray(me.fgcolor)||a.isArrayOrTypedArray(me.size)||a.isArrayOrTypedArray(me.solidity);var ft=ie.uid;Fe&&(ft+="-"+oe.i),_.pattern(te,"point",ce,ft,Ee,ct,At,oe.mcc,me.fillmode,at,qe,tt)}else a.isArrayOrTypedArray(_t)?l.fill(te,_t[oe.i]):l.fill(te,_t);vt&&l.stroke(te,Pt)}},_.makePointStyleFns=function(oe){var te={},ie=oe.marker;return te.markerScale=_.tryColorscale(ie,""),te.lineScale=_.tryColorscale(ie,"line"),s.traceIs(oe,"symbols")&&(te.ms2mrc=g.isBubble(oe)?m(oe):function(){return(ie.size||6)/2}),oe.selectedpoints&&a.extendFlat(te,_.makeSelectedPointStyleFns(oe)),te},_.makeSelectedPointStyleFns=function(oe){var te={},ie=oe.selected||{},ee=oe.unselected||{},ce=oe.marker||{},_e=ie.marker||{},Se=ee.marker||{},Me=ce.opacity,Ue=_e.opacity,Ge=Se.opacity,Ze=Ue!==void 0,Ke=Ge!==void 0;(a.isArrayOrTypedArray(Me)||Ze||Ke)&&(te.selectedOpacityFn=function(me){var be=me.mo===void 0?ce.opacity:me.mo;return me.selected?Ze?Ue:be:Ke?Ge:p*be});var dt=ce.color,_t=_e.color,Pt=Se.color;(_t||Pt)&&(te.selectedColorFn=function(me){var be=me.mcc||dt;return me.selected?_t||be:Pt||be});var vt=ce.size,Tt=_e.size,st=Se.size,Ve=Tt!==void 0,Ye=st!==void 0;return s.traceIs(oe,"symbols")&&(Ve||Ye)&&(te.selectedSizeFn=function(me){var be=me.mrc||vt/2;return me.selected?Ve?Tt/2:be:Ye?st/2:be}),te},_.makeSelectedTextStyleFns=function(oe){var te={},ie=oe.selected||{},ee=oe.unselected||{},ce=oe.textfont||{},_e=ie.textfont||{},Se=ee.textfont||{},Me=ce.color,Ue=_e.color,Ge=Se.color;return te.selectedTextColorFn=function(Ze){var Ke=Ze.tc||Me;return Ze.selected?Ue||Ke:Ge||(Ue?Ke:l.addOpacity(Ke,p))},te},_.selectedPointStyle=function(oe,te){if(!(!oe.size()||!te.selectedpoints)){var ie=_.makeSelectedPointStyleFns(te),ee=te.marker||{},ce=[];ie.selectedOpacityFn&&ce.push(function(_e,Se){_e.style("opacity",ie.selectedOpacityFn(Se))}),ie.selectedColorFn&&ce.push(function(_e,Se){l.fill(_e,ie.selectedColorFn(Se))}),ie.selectedSizeFn&&ce.push(function(_e,Se){var Me=Se.mx||ee.symbol||0,Ue=ie.selectedSizeFn(Se);_e.attr("d",b(_.symbolNumber(Me),Ue,he(Se,te),q(Se,te))),Se.mrc2=Ue}),ce.length&&oe.each(function(_e){for(var Se=t.select(this),Me=0;Me0?ie:0}_.textPointStyle=function(oe,te,ie){if(oe.size()){var ee;if(te.selectedpoints){var ce=_.makeSelectedTextStyleFns(te);ee=ce.selectedTextColorFn}var _e=te.texttemplate,Se=ie._fullLayout;oe.each(function(Me){var Ue=t.select(this),Ge=_e?a.extractOption(Me,te,"txt","texttemplate"):a.extractOption(Me,te,"tx","text");if(!Ge&&Ge!==0){Ue.remove();return}if(_e){var Ze=te._module.formatLabels,Ke=Ze?Ze(Me,te,Se):{},dt={};y(dt,te,Me.i),Ge=a.texttemplateString({data:[dt,Me,te._meta],fallback:te.texttemplatefallback,labels:Ke,locale:Se._d3locale,template:Ge})}var _t=Me.tp||te.textposition,Pt=P(Me,te),vt=ee?ee(Me):Me.tc||te.textfont.color;Ue.call(_.font,{family:Me.tf||te.textfont.family,weight:Me.tw||te.textfont.weight,style:Me.ty||te.textfont.style,variant:Me.tv||te.textfont.variant,textcase:Me.tC||te.textfont.textcase,lineposition:Me.tE||te.textfont.lineposition,shadow:Me.tS||te.textfont.shadow,size:Pt,color:vt}).text(Ge).call(c.convertToTspans,ie).call(R,_t,Pt,Me.mrc)})}},_.selectedTextStyle=function(oe,te){if(!(!oe.size()||!te.selectedpoints)){var ie=_.makeSelectedTextStyleFns(te);oe.each(function(ee){var ce=t.select(this),_e=ie.selectedTextColorFn(ee),Se=ee.tp||te.textposition,Me=P(ee,te);l.fill(ce,_e);var Ue=s.traceIs(te,"bar-like");R(ce,Se,Me,ee.mrc2||ee.mrc,Ue)})}};var z=.5;_.smoothopen=function(oe,te){if(oe.length<3)return"M"+oe.join("L");var ie="M"+oe[0],ee=[],ce;for(ce=1;ce=Ue||me>=Ze&&me<=Ue)&&(be<=Ke&&be>=Ge||be>=Ke&&be<=Ge)&&(oe=[me,be])}return oe}_.applyBackoff=J,_.makeTester=function(){var oe=a.ensureSingleById(t.select("body"),"svg","js-plotly-tester",function(ie){ie.attr(f.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),te=a.ensureSingle(oe,"path","js-reference-point",function(ie){ie.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});_.tester=oe,_.testref=te},_.savedBBoxes={};var N=0,H=1e4;_.bBox=function(oe,te,ie){ie||(ie=W(oe));var ee;if(ie){if(ee=_.savedBBoxes[ie],ee)return a.extendFlat({},ee)}else if(oe.childNodes.length===1){var ce=oe.childNodes[0];if(ie=W(ce),ie){var _e=+ce.getAttribute("x")||0,Se=+ce.getAttribute("y")||0,Me=ce.getAttribute("transform");if(!Me){var Ue=_.bBox(ce,!1,ie);return _e&&(Ue.left+=_e,Ue.right+=_e),Se&&(Ue.top+=Se,Ue.bottom+=Se),Ue}if(ie+="~"+_e+"~"+Se+"~"+Me,ee=_.savedBBoxes[ie],ee)return a.extendFlat({},ee)}}var Ge,Ze;te?Ge=oe:(Ze=_.tester.node(),Ge=oe.cloneNode(!0),Ze.appendChild(Ge)),t.select(Ge).attr("transform",null).call(c.positionText,0,0);var Ke=Ge.getBoundingClientRect(),dt=_.testref.node().getBoundingClientRect();te||Ze.removeChild(Ge);var _t={height:Ke.height,width:Ke.width,left:Ke.left-dt.left,top:Ke.top-dt.top,right:Ke.right-dt.left,bottom:Ke.bottom-dt.top};return N>=H&&(_.savedBBoxes={},N=0),ie&&(_.savedBBoxes[ie]=_t),N++,a.extendFlat({},_t)};function W(oe){var te=oe.getAttribute("data-unformatted");if(te!==null)return te+oe.getAttribute("data-math")+oe.getAttribute("text-anchor")+oe.getAttribute("style")}_.setClipUrl=function(oe,te,ie){oe.attr("clip-path",U(te,ie))};function U(oe,te){if(!oe)return null;var ie=te._context,ee=ie._exportedPlot?"":ie._baseUrl||"";return ee?"url('"+ee+"#"+oe+"')":"url(#"+oe+")"}_.getTranslate=function(oe){var te=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ie=oe.attr?"attr":"getAttribute",ee=oe[ie]("transform")||"",ce=ee.replace(te,function(_e,Se,Me){return[Se,Me].join(" ")}).split(" ");return{x:+ce[0]||0,y:+ce[1]||0}},_.setTranslate=function(oe,te,ie){var ee=/(\btranslate\(.*?\);?)/,ce=oe.attr?"attr":"getAttribute",_e=oe.attr?"attr":"setAttribute",Se=oe[ce]("transform")||"";return te=te||0,ie=ie||0,Se=Se.replace(ee,"").trim(),Se+=u(te,ie),Se=Se.trim(),oe[_e]("transform",Se),Se},_.getScale=function(oe){var te=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ie=oe.attr?"attr":"getAttribute",ee=oe[ie]("transform")||"",ce=ee.replace(te,function(_e,Se,Me){return[Se,Me].join(" ")}).split(" ");return{x:+ce[0]||1,y:+ce[1]||1}},_.setScale=function(oe,te,ie){var ee=/(\bscale\(.*?\);?)/,ce=oe.attr?"attr":"getAttribute",_e=oe.attr?"attr":"setAttribute",Se=oe[ce]("transform")||"";return te=te||1,ie=ie||1,Se=Se.replace(ee,"").trim(),Se+="scale("+te+","+ie+")",Se=Se.trim(),oe[_e]("transform",Se),Se};var V=/\s*sc.*/;_.setPointGroupScale=function(oe,te,ie){if(te=te||1,ie=ie||1,!!oe){var ee=te===1&&ie===1?"":"scale("+te+","+ie+")";oe.each(function(){var ce=(this.getAttribute("transform")||"").replace(V,"");ce+=ee,ce=ce.trim(),this.setAttribute("transform",ce)})}};var j=/translate\([^)]*\)\s*$/;_.setTextPointsScale=function(oe,te,ie){oe&&oe.each(function(){var ee,ce=t.select(this),_e=ce.select("text");if(_e.node()){var Se=parseFloat(_e.attr("x")||0),Me=parseFloat(_e.attr("y")||0),Ue=(ce.attr("transform")||"").match(j);te===1&&ie===1?ee=[]:ee=[u(Se,Me),"scale("+te+","+ie+")",u(-Se,-Me)],Ue&&ee.push(Ue),ce.attr("transform",ee.join(""))}})};function q(oe,te){var ie;return oe&&(ie=oe.mf),ie===void 0&&(ie=te.marker&&te.marker.standoff||0),!te._geo&&!te._xA?-ie:ie}_.getMarkerStandoff=q;var Y=Math.atan2,K=Math.cos,re=Math.sin;function se(oe,te){var ie=te[0],ee=te[1];return[ie*K(oe)-ee*re(oe),ie*re(oe)+ee*K(oe)]}var le,ue,fe,pe,we,xe;function he(oe,te){var ie=oe.ma;ie===void 0&&(ie=te.marker.angle,(!o(ie)||a.isArrayOrTypedArray(ie))&&(ie=0));var ee,ce,_e=te.marker.angleref;if(_e==="previous"||_e==="north"){if(te._geo){var Se=te._geo.project(oe.lonlat);ee=Se[0],ce=Se[1]}else{var Me=te._xA,Ue=te._yA;if(Me&&Ue)ee=Me.c2p(oe.x),ce=Ue.c2p(oe.y);else return 90}if(te._geo){var Ge=oe.lonlat[0],Ze=oe.lonlat[1],Ke=te._geo.project([Ge,Ze+1e-5]),dt=te._geo.project([Ge+1e-5,Ze]),_t=Y(dt[1]-ce,dt[0]-ee),Pt=Y(Ke[1]-ce,Ke[0]-ee),vt;if(_e==="north")vt=ie/180*Math.PI;else if(_e==="previous"){var Tt=Ge/180*Math.PI,st=Ze/180*Math.PI,Ve=le/180*Math.PI,Ye=ue/180*Math.PI,me=Ve-Tt,be=K(Ye)*re(me),Ee=re(Ye)*K(st)-K(Ye)*re(st)*K(me);vt=-Y(be,Ee)-Math.PI,le=Ge,ue=Ze}var De=se(_t,[K(vt),0]),Ce=se(Pt,[re(vt),0]);ie=Y(De[1]+Ce[1],De[0]+Ce[0])/Math.PI*180,_e==="previous"&&!(xe===te.uid&&oe.i===we+1)&&(ie=null)}if(_e==="previous"&&!te._geo)if(xe===te.uid&&oe.i===we+1&&o(ee)&&o(ce)){var Fe=ee-fe,Je=ce-pe,qe=te.line&&te.line.shape||"",at=qe.slice(qe.length-1);at==="h"&&(Je=0),at==="v"&&(Fe=0),ie+=Y(Je,Fe)/Math.PI*180+90}else ie=null}return fe=ee,pe=ce,we=oe.i,xe=te.uid,ie}_.getMarkerAngle=he}}),Cm=ye({"src/components/titles/index.js"(e,r){"use strict";var t=ai(),a=en(),i=ws(),o=li(),s=Yt(),l=s.strTranslate,n=$i(),u=Ya(),c=Go(),f=f0(),h=Yl().OPPOSITE_SIDE,d=/ [XY][0-9]* /,p=1.6,g=1.6;function m(y,_,v){var x=y._fullLayout,E=v.propContainer,M=v.propName,C=v.placeholder,w=v.traceIndex,k=v.avoid||{},T=v.attributes,b=v.transform,S=v.containerGroup,A=1,F=E.title,D=(F&&F.text?F.text:"").trim(),R=!1,P=F&&F.font?F.font:{},z=P.family,I=P.size,L=P.color,B=P.weight,O=P.style,G=P.variant,$=P.textcase,X=P.lineposition,Z=P.shadow,J=v.subtitlePropName,N=!!J,H=v.subtitlePlaceholder,W=(E.title||{}).subtitle||{text:"",font:{}},U=(W.text||"").trim(),V=!1,j=1,q=W.font,Y=q.family,K=q.size,re=q.color,se=q.weight,le=q.style,ue=q.variant,fe=q.textcase,pe=q.lineposition,we=q.shadow,xe;M==="title.text"?xe="titleText":M.indexOf("axis")!==-1?xe="axisTitleText":M.indexOf("colorbar")!==-1&&(xe="colorbarTitleText");var he=y._context.edits[xe];function oe(_t,Pt){return _t===void 0||Pt===void 0?!1:_t.replace(d," % ")===Pt.replace(d," % ")}D===""?A=0:oe(D,C)&&(he||(D=""),A=.2,R=!0),N&&(U===""?j=0:oe(U,H)&&(he||(U=""),j=.2,V=!0)),v._meta?D=s.templateString(D,v._meta):x._meta&&(D=s.templateString(D,x._meta));var te=D||U||he,ie;S||(S=s.ensureSingle(x._infolayer,"g","g-"+_),ie=x._hColorbarMoveTitle);var ee=S.selectAll("text."+_).data(te?[0]:[]);ee.enter().append("text"),ee.text(D).attr("class",_),ee.exit().remove();var ce=null,_e=_+"-subtitle",Se=U||he;if(N&&(ce=S.selectAll("text."+_e).data(Se?[0]:[]),ce.enter().append("text"),ce.text(U).attr("class",_e),ce.exit().remove()),!te)return S;function Me(_t,Pt){s.syncOrAsync([Ue,Ge],{title:_t,subtitle:Pt})}function Ue(_t){var Pt=_t.title,vt=_t.subtitle,Tt;!b&&ie&&(b={}),b?(Tt="",b.rotate&&(Tt+="rotate("+[b.rotate,T.x,T.y]+")"),(b.offset||ie)&&(Tt+=l(0,(b.offset||0)-(ie||0)))):Tt=null,Pt.attr("transform",Tt);function st(De){if(De){var Ce=t.select(De.node().parentNode).select("."+_e);if(!Ce.empty()){var Fe=De.node().getBBox();if(Fe.height){var Je=Fe.y+Fe.height+p*K;Ce.attr("y",Je)}}}}if(Pt.style("opacity",A*u.opacity(L)).call(n.font,{color:u.rgb(L),size:t.round(I,2),family:z,weight:B,style:O,variant:G,textcase:$,shadow:Z,lineposition:X}).attr(T).call(c.convertToTspans,y,st),vt&&!vt.empty()){var Ve=S.select("."+_+"-math-group"),Ye=Pt.node().getBBox(),me=Ve.node()?Ve.node().getBBox():void 0,be=me?me.y+me.height+p*K:Ye.y+Ye.height+g*K,Ee=s.extendFlat({},T,{y:be});vt.attr("transform",Tt),vt.style("opacity",j*u.opacity(re)).call(n.font,{color:u.rgb(re),size:t.round(K,2),family:Y,weight:se,style:le,variant:ue,textcase:fe,shadow:we,lineposition:pe}).attr(Ee).call(c.convertToTspans,y)}return i.previousPromises(y)}function Ge(_t){var Pt=_t.title,vt=t.select(Pt.node().parentNode);if(k&&k.selection&&k.side&&D){vt.attr("transform",null);var Tt=h[k.side],st=k.side==="left"||k.side==="top"?-1:1,Ve=a(k.pad)?k.pad:2,Ye=n.bBox(vt.node()),me={t:0,b:0,l:0,r:0},be=y._fullLayout._reservedMargin;for(var Ee in be)for(var De in be[Ee]){var Ce=be[Ee][De];me[De]=Math.max(me[De],Ce)}var Fe={left:me.l,top:me.t,right:x.width-me.r,bottom:x.height-me.b},Je=k.maxShift||st*(Fe[k.side]-Ye[k.side]),qe=0;if(Je<0)qe=Je;else{var at=k.offsetLeft||0,tt=k.offsetTop||0;Ye.left-=at,Ye.right-=at,Ye.top-=tt,Ye.bottom-=tt,k.selection.each(function(){var At=n.bBox(this);s.bBoxIntersect(Ye,At,Ve)&&(qe=Math.max(qe,st*(At[k.side]-Ye[Tt])+Ve))}),qe=Math.min(Je,qe),E._titleScoot=Math.abs(qe)}if(qe>0||Je<0){var ct={left:[-qe,0],right:[qe,0],top:[0,-qe],bottom:[0,qe]}[k.side];vt.attr("transform",l(ct[0],ct[1]))}}}ee.call(Me,ce);function Ze(_t,Pt){_t.text(Pt).on("mouseover.opacity",function(){t.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){t.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)})}if(he&&(D?ee.on(".opacity",null):(Ze(ee,C),R=!0),ee.call(c.makeEditable,{gd:y}).on("edit",function(_t){w!==void 0?o.call("_guiRestyle",y,M,_t,w):o.call("_guiRelayout",y,M,_t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Me)}).on("input",function(_t){this.text(_t||" ").call(c.positionText,T.x,T.y)}),N)){if(N&&!D){var Ke=ee.node().getBBox(),dt=Ke.y+Ke.height+g*K;ce.attr("y",dt)}U?ce.on(".opacity",null):(Ze(ce,H),V=!0),ce.call(c.makeEditable,{gd:y}).on("edit",function(_t){o.call("_guiRelayout",y,"title.subtitle.text",_t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Me)}).on("input",function(_t){this.text(_t||" ").call(c.positionText,ce.attr("x"),ce.attr("y"))})}return ee.classed("js-placeholder",R),ce&&!ce.empty()&&ce.classed("js-placeholder",V),S}r.exports={draw:m,SUBTITLE_PADDING_EM:g,SUBTITLE_PADDING_MATHJAX_EM:p}}}),Op=ye({"src/plots/cartesian/set_convert.js"(e,r){"use strict";var t=ai(),a=uy().utcFormat,i=Yt(),o=i.numberFormat,s=en(),l=i.cleanNumber,n=i.ms2DateTime,u=i.dateTime2ms,c=i.ensureNumber,f=i.isArrayOrTypedArray,h=Vn(),d=h.FP_SAFE,p=h.BADNUM,g=h.LOG_CLIP,m=h.ONEWEEK,y=h.ONEDAY,_=h.ONEHOUR,v=h.ONEMIN,x=h.ONESEC,E=Gs(),M=$l(),C=M.HOUR_PATTERN,w=M.WEEKDAY_PATTERN;function k(b){return Math.pow(10,b)}function T(b){return b!=null}r.exports=function(S,A){A=A||{};var F=S._id||"x",D=F.charAt(0);function R(U,V){if(U>0)return Math.log(U)/Math.LN10;if(U<=0&&V&&S.range&&S.range.length===2){var j=S.range[0],q=S.range[1];return .5*(j+q-2*g*Math.abs(j-q))}else return p}function P(U,V,j,q){if((q||{}).msUTC&&s(U))return+U;var Y=u(U,j||S.calendar);if(Y===p)if(s(U)){U=+U;var K=Math.floor(i.mod(U+.05,1)*10),re=Math.round(U-K/10);Y=u(new Date(re))+K/10}else return p;return Y}function z(U,V,j){return n(U,V,j||S.calendar)}function I(U){return S._categories[Math.round(U)]}function L(U){if(T(U)){if(S._categoriesMap===void 0&&(S._categoriesMap={}),S._categoriesMap[U]!==void 0)return S._categoriesMap[U];S._categories.push(typeof U=="number"?String(U):U);var V=S._categories.length-1;return S._categoriesMap[U]=V,V}return p}function B(U,V){for(var j=new Array(V),q=0;qS.range[1]&&(j=!j);for(var q=j?-1:1,Y=q*U,K=0,re=0;rele)K=re+1;else{K=Y<(se+le)/2?re:re+1;break}}var ue=S._B[K]||0;return isFinite(ue)?X(U,S._m2,ue):0},N=function(U){var V=S._rangebreaks.length;if(!V)return Z(U,S._m,S._b);for(var j=0,q=0;qS._rangebreaks[q].pmax&&(j=q+1);return Z(U,S._m2,S._B[j])}}S.c2l=S.type==="log"?R:c,S.l2c=S.type==="log"?k:c,S.l2p=J,S.p2l=N,S.c2p=S.type==="log"?function(U,V){return J(R(U,V))}:J,S.p2c=S.type==="log"?function(U){return k(N(U))}:N,["linear","-"].indexOf(S.type)!==-1?(S.d2r=S.r2d=S.d2c=S.r2c=S.d2l=S.r2l=l,S.c2d=S.c2r=S.l2d=S.l2r=c,S.d2p=S.r2p=function(U){return S.l2p(l(U))},S.p2d=S.p2r=N,S.cleanPos=c):S.type==="log"?(S.d2r=S.d2l=function(U,V){return R(l(U),V)},S.r2d=S.r2c=function(U){return k(l(U))},S.d2c=S.r2l=l,S.c2d=S.l2r=c,S.c2r=R,S.l2d=k,S.d2p=function(U,V){return S.l2p(S.d2r(U,V))},S.p2d=function(U){return k(N(U))},S.r2p=function(U){return S.l2p(l(U))},S.p2r=N,S.cleanPos=c):S.type==="date"?(S.d2r=S.r2d=i.identity,S.d2c=S.r2c=S.d2l=S.r2l=P,S.c2d=S.c2r=S.l2d=S.l2r=z,S.d2p=S.r2p=function(U,V,j){return S.l2p(P(U,0,j))},S.p2d=S.p2r=function(U,V,j){return z(N(U),V,j)},S.cleanPos=function(U){return i.cleanDate(U,p,S.calendar)}):S.type==="category"?(S.d2c=S.d2l=L,S.r2d=S.c2d=S.l2d=I,S.d2r=S.d2l_noadd=G,S.r2c=function(U){var V=$(U);return V!==void 0?V:S.fraction2r(.5)},S.l2r=S.c2r=c,S.r2l=$,S.d2p=function(U){return S.l2p(S.r2c(U))},S.p2d=function(U){return I(N(U))},S.r2p=S.d2p,S.p2r=N,S.cleanPos=function(U){return typeof U=="string"&&U!==""?U:c(U)}):S.type==="multicategory"&&(S.r2d=S.c2d=S.l2d=I,S.d2r=S.d2l_noadd=G,S.r2c=function(U){var V=G(U);return V!==void 0?V:S.fraction2r(.5)},S.r2c_just_indices=O,S.l2r=S.c2r=c,S.r2l=G,S.d2p=function(U){return S.l2p(S.r2c(U))},S.p2d=function(U){return I(N(U))},S.r2p=S.d2p,S.p2r=N,S.cleanPos=function(U){return Array.isArray(U)||typeof U=="string"&&U!==""?U:c(U)},S.setupMultiCategory=function(U){var V=S._traceIndices,j,q,Y=S._matchGroup;if(Y&&S._categories.length===0){for(var K in Y)if(K!==F){var re=A[E.id2name(K)];V=V.concat(re._traceIndices)}}var se=[[0,{}],[0,{}]],le=[];for(j=0;jre[1]&&(q[K?0:1]=j,Y[1]=re[1]),Y[0]>=Y[1])if(V!==void 0){var se=re[0]+1;j!==void 0&&(se=Math.min(se,re[1])),q[K?0:1]=S.l2r(se)}else j!==void 0&&(q[K?1:0]=S.l2r(re[1]-1))}},S.cleanRange=function(U,V){S._cleanRange(U,V),S.limitRange(U)},S._cleanRange=function(U,V){V||(V={}),U||(U="range");var j=i.nestedProperty(S,U).get(),q,Y;if(S.type==="date"?Y=i.dfltRange(S.calendar):D==="y"?Y=M.DFLTRANGEY:S._name==="realaxis"?Y=[0,1]:Y=V.dfltRange||M.DFLTRANGEX,Y=Y.slice(),(S.rangemode==="tozero"||S.rangemode==="nonnegative")&&(Y[0]=0),!j||j.length!==2){i.nestedProperty(S,U).set(Y);return}var K=j[0]===null,re=j[1]===null;for(S.type==="date"&&!S.autorange&&(j[0]=i.cleanDate(j[0],p,S.calendar),j[1]=i.cleanDate(j[1],p,S.calendar)),q=0;q<2;q++)if(S.type==="date"){if(!i.isDateTime(j[q],S.calendar)){S[U]=Y;break}if(S.r2l(j[0])===S.r2l(j[1])){var se=i.constrain(S.r2l(j[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);j[0]=S.l2r(se-1e3),j[1]=S.l2r(se+1e3);break}}else{if(!s(j[q]))if(!(K||re)&&s(j[1-q]))j[q]=j[1-q]*(q?10:.1);else{S[U]=Y;break}if(j[q]<-d?j[q]=-d:j[q]>d&&(j[q]=d),j[0]===j[1]){var le=Math.max(1,Math.abs(j[0]*1e-6));j[0]-=le,j[1]+=le}}},S.setScale=function(U){var V=A._size;if(S.overlaying){var j=E.getFromId({_fullLayout:A},S.overlaying);S.domain=j.domain}var q=U&&S._r?"_r":"range",Y=S.calendar;S.cleanRange(q);var K=S.r2l(S[q][0],Y),re=S.r2l(S[q][1],Y),se=D==="y";if(se?(S._offset=V.t+(1-S.domain[1])*V.h,S._length=V.h*(S.domain[1]-S.domain[0]),S._m=S._length/(K-re),S._b=-S._m*re):(S._offset=V.l+S.domain[0]*V.w,S._length=V.w*(S.domain[1]-S.domain[0]),S._m=S._length/(re-K),S._b=-S._m*K),S._rangebreaks=[],S._lBreaks=0,S._m2=0,S._B=[],S.rangebreaks){var le,ue;if(S._rangebreaks=S.locateBreaks(Math.min(K,re),Math.max(K,re)),S._rangebreaks.length){for(le=0;lere&&(fe=!fe),fe&&S._rangebreaks.reverse();var pe=fe?-1:1;for(S._m2=pe*S._length/(Math.abs(re-K)-S._lBreaks),S._B.push(-S._m2*(se?re:K)),le=0;leY&&(Y+=7,KY&&(Y+=24,K=q&&K=q&&U=Me.min&&(eeMe.max&&(Me.max=ce),_e=!1)}_e&&re.push({min:ee,max:ce})}};for(j=0;jx*2}function h(g){return Math.max(1,(g-1)/1e3)}function d(g,m){for(var y=g.length,_=h(y),v=0,x=0,E={},M=0;Mv*2}function p(g){return o(g[0])&&o(g[1])}}}),tp=ye({"src/plots/cartesian/autorange.js"(e,r){"use strict";var t=ai(),a=en(),i=Yt(),o=Vn().FP_SAFE,s=li(),l=$i(),n=Gs(),u=n.getFromId,c=n.isLinked;r.exports={applyAutorangeOptions:S,getAutoRange:f,makePadFn:d,doAutoRange:y,findExtremes:_,concatExtremes:m};function f(A,F){var D,R,P=[],z=A._fullLayout,I=d(z,F,0),L=d(z,F,1),B=m(A,F),O=B.min,G=B.max;if(O.length===0||G.length===0)return i.simpleMap(F.range,F.r2l);var $=O[0].val,X=G[0].val;for(D=1;D0&&(le=V-I(Y)-L(K),le>j?ue/le>q&&(re=Y,se=K,q=ue/le):ue/V>q&&(re={val:Y.val,nopad:1},se={val:K.val,nopad:1},q=ue/V));function fe(oe,te){return Math.max(oe,L(te))}if($===X){var pe=$-1,we=$+1;if(W)if($===0)P=[0,1];else{var xe=($>0?G:O).reduce(fe,0),he=$/(1-Math.min(.5,xe/V));P=$>0?[0,he]:[he,0]}else U?P=[Math.max(0,pe),Math.max(1,we)]:P=[pe,we]}else W?(re.val>=0&&(re={val:0,nopad:1}),se.val<=0&&(se={val:0,nopad:1})):U&&(re.val-q*I(re)<0&&(re={val:0,nopad:1}),se.val<=0&&(se={val:1,nopad:1})),q=(se.val-re.val-h(F,Y.val,K.val))/(V-I(re)-L(se)),P=[re.val-q*I(re),se.val+q*L(se)];return P=S(P,F),F.limitRange&&F.limitRange(),J&&P.reverse(),i.simpleMap(P,F.l2r||Number)}function h(A,F,D){var R=0;if(A.rangebreaks)for(var P=A.locateBreaks(F,D),z=0;z0?D.ppadplus:D.ppadminus)||D.ppad||0),Y=j((A._m>0?D.ppadminus:D.ppadplus)||D.ppad||0),K=j(D.vpadplus||D.vpad),re=j(D.vpadminus||D.vpad);if(!O){if(U=1/0,V=-1/0,B)for($=0;$0&&(U=X),X>V&&X-o&&(U=X),X>V&&X=ue;$--)le($);return{min:R,max:P,opts:D}}function v(A,F,D,R){E(A,F,D,R,C)}function x(A,F,D,R){E(A,F,D,R,w)}function E(A,F,D,R,P){for(var z=R.tozero,I=R.extrapad,L=!0,B=0;B=D&&(O.extrapad||!I)){L=!1;break}else P(F,O.val)&&O.pad<=D&&(I||!O.extrapad)&&(A.splice(B,1),B--)}if(L){var G=z&&F===0;A.push({val:F,pad:G?0:D,extrapad:G?!1:I})}}function M(A){return a(A)&&Math.abs(A)=F}function k(A,F){var D=F.autorangeoptions;return D&&D.minallowed!==void 0&&b(F,D.minallowed,D.maxallowed)?D.minallowed:D&&D.clipmin!==void 0&&b(F,D.clipmin,D.clipmax)?Math.max(A,F.d2l(D.clipmin)):A}function T(A,F){var D=F.autorangeoptions;return D&&D.maxallowed!==void 0&&b(F,D.minallowed,D.maxallowed)?D.maxallowed:D&&D.clipmax!==void 0&&b(F,D.clipmin,D.clipmax)?Math.min(A,F.d2l(D.clipmax)):A}function b(A,F,D){return F!==void 0&&D!==void 0?(F=A.d2l(F),D=A.d2l(D),F=B&&(z=B,D=B),I<=B&&(I=B,R=B)}}return D=k(D,F),R=T(R,F),[D,R]}}}),qi=ye({"src/plots/cartesian/axes.js"(e,r){"use strict";var t=ai(),a=en(),i=ws(),o=li(),s=Yt(),l=s.strTranslate,n=Go(),u=Cm(),c=Ya(),f=$i(),h=Gu(),d=WD(),p=$l(),g=Vn(),m=g.ONEMAXYEAR,y=g.ONEAVGYEAR,_=g.ONEMINYEAR,v=g.ONEMAXQUARTER,x=g.ONEAVGQUARTER,E=g.ONEMINQUARTER,M=g.ONEMAXMONTH,C=g.ONEAVGMONTH,w=g.ONEMINMONTH,k=g.ONEWEEK,T=g.ONEDAY,b=T/2,S=g.ONEHOUR,A=g.ONEMIN,F=g.ONESEC,D=g.ONEMILLI,R=g.ONEMICROSEC,P=g.MINUS_SIGN,z=g.BADNUM,I={K:"zeroline"},L={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},O={K:"tick",L:"path"},G={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"]},X=Yl(),Z=X.MID_SHIFT,J=X.CAP_SHIFT,N=X.LINE_SPACING,H=X.OPPOSITE_SIDE,W=3,U=r.exports={};U.setConvert=Op();var V=gy(),j=Gs(),q=j.idSort,Y=j.isLinked;U.id2name=j.id2name,U.name2id=j.name2id,U.cleanId=j.cleanId,U.list=j.list,U.listIds=j.listIds,U.getFromId=j.getFromId,U.getFromTrace=j.getFromTrace;var K=tp();U.getAutoRange=K.getAutoRange,U.findExtremes=K.findExtremes;var re=1e-4;function se(Oe){var Ie=(Oe[1]-Oe[0])*re;return[Oe[0]-Ie,Oe[1]+Ie]}function le(Oe,Ie,Et){if(![Et,Oe,Ie].every(a)||Et===0)return Oe;let Mt=Math.round((Oe-Ie)/Et),zt=Ie+Mt*Et;return Oe!==zt&&Math.abs(Oe-zt)It+" domain")),et=et.concat(Gt||[]),bt.length>Ht?(s.warn("Array attribute "+ut+" has more entries than expected, truncating to "+Ht),bt=bt.slice(0,Ht)):bt.length2e-6||((Et-Oe._forceTick0)/Oe._minDtick%1+1.000001)%1>2e-6)&&(Oe._minDtick=0))},U.saveRangeInitial=function(Oe,Ie){for(var Et=U.list(Oe,"",!0),Mt=!1,zt=0;ztOt*.3||ut(Mt)||ut(zt))){var It=Et.dtick/2;Oe+=Oe+ItHt){var Be=Number(Et.slice(1));Gt.exactYears>Ht&&Be%12===0?Oe=U.tickIncrement(Oe,"M6","reverse")+T*1.5:Gt.exactMonths>Ht?Oe=U.tickIncrement(Oe,"M1","reverse")+T*15.5:Oe-=b;var et=U.tickIncrement(Oe,Et);if(et<=Mt)return et}return Oe}U.prepMinorTicks=function(Oe,Ie,Et){var Mt,zt;if(!((Mt=Ie.minor)!=null&&Mt.dtick)){delete Oe.dtick;var Gt=Ie.dtick&&a(Ie._tmin),Ht;if(Gt){var Be=U.tickIncrement(Ie._tmin,Ie.dtick,!0);Ht=[Ie._tmin,Be*.99+Ie._tmin*.01]}else{var et=s.simpleMap(Ie.range,Ie.r2l);Ht=[et[0],.8*et[0]+.2*et[1]]}if(Oe.range=s.simpleMap(Ht,Ie.l2r),Oe._isMinor=!0,U.prepTicks(Oe,Et),Gt){var ut=a(Ie.dtick),bt=a(Oe.dtick),Ot=ut?Ie.dtick:+Ie.dtick.substring(1),It=bt?Oe.dtick:+Oe.dtick.substring(1);ut&&bt?he(Ot,It)?Ot===2*k&&It===2*T&&(Oe.dtick=k):Ot===2*k&&It===3*T?Oe.dtick=k:Ot===k&&!(Ie._input.minor||{}).nticks?Oe.dtick=T:oe(Ot/It,2.5)?Oe.dtick=Ot/2:Oe.dtick=Ot:String(Ie.dtick).charAt(0)==="M"?bt?Oe.dtick="M1":he(Ot,It)?Ot>=12&&It===2&&(Oe.dtick="M3"):Oe.dtick=Ie.dtick:String(Oe.dtick).charAt(0)==="L"?String(Ie.dtick).charAt(0)==="L"?he(Ot,It)||(Oe.dtick=oe(Ot/It,2.5)?Ie.dtick/2:Ie.dtick):Oe.dtick="D1":Oe.dtick==="D2"&&+Ie.dtick>1&&(Oe.dtick=1)}Oe.range=Ie.range}((zt=Ie.minor)==null?void 0:zt._tick0Init)===void 0&&(Oe.tick0=Ie.tick0)};function he(Oe,Ie){return Math.abs((Oe/Ie+.5)%1-.5)<.001}function oe(Oe,Ie){return Math.abs(Oe/Ie-1)<.001}U.prepTicks=function(Oe,Ie){var Et=s.simpleMap(Oe.range,Oe.r2l,void 0,void 0,Ie);if(Oe.tickmode==="auto"||!Oe.dtick){var Mt=Oe.nticks,zt;Mt||(Oe.type==="category"||Oe.type==="multicategory"?(zt=Oe.tickfont?s.bigFont(Oe.tickfont.size||12):15,Mt=Oe._length/zt):(zt=Oe._id.charAt(0)==="y"?40:80,Mt=s.constrain(Oe._length/zt,4,9)+1),Oe._name==="radialaxis"&&(Mt*=2)),Oe.minor&&Oe.minor.tickmode!=="array"||Oe.tickmode==="array"&&(Mt*=100),Oe._roughDTick=Math.abs(Et[1]-Et[0])/Mt,U.autoTicks(Oe,Oe._roughDTick),Oe._minDtick>0&&Oe.dtick0?(Gt=Mt-1,Ht=Mt):(Gt=Mt,Ht=Mt);var Be=Oe[Gt].value,et=Oe[Ht].value,ut=Math.abs(et-Be),bt=Et||ut,Ot=0;bt>=_?ut>=_&&ut<=m?Ot=ut:Ot=y:Et===x&&bt>=E?ut>=E&&ut<=v?Ot=ut:Ot=x:bt>=w?ut>=w&&ut<=M?Ot=ut:Ot=C:Et===k&&bt>=k?Ot=k:bt>=T?Ot=T:Et===b&&bt>=b?Ot=b:Et===S&&bt>=S&&(Ot=S);var It;Ot>=ut&&(Ot=ut,It=!0);var Wt=zt+Ot;if(Ie.rangebreaks&&Ot>0){for(var jt=84,sr=0,kr=0;krk&&(Ot=ut)}(Ot>0||Mt===0)&&(Oe[Mt].periodX=zt+Ot/2)}}U.calcTicks=function(Ie,Et){for(var Mt=Ie.type,zt=Ie.calendar,Gt=Ie.ticklabelstep,Ht=Ie.ticklabelmode==="period",Be=Ie.range[0]>Ie.range[1],et=!Ie.ticklabelindex||s.isArrayOrTypedArray(Ie.ticklabelindex)?Ie.ticklabelindex:[Ie.ticklabelindex],ut=s.simpleMap(Ie.range,Ie.r2l,void 0,void 0,Et),bt=ut[1]=(ni?0:1);Ca--){var Li=!Ca;Ca?(Ie._dtickInit=Ie.dtick,Ie._tick0Init=Ie.tick0):ni&&(Ie.minor._dtickInit=Ie.minor.dtick,Ie.minor._tick0Init=Ie.minor.tick0);var Va=Ca?Ie:s.extendFlat({},Ie,ni?Ie.minor:{minor:{}});if(Li?U.prepMinorTicks(Va,Ie,Et):U.prepTicks(Va,Et),Va.tickmode==="array"){Ca?(kr=[],jt=Se(Ie,!Li)):(Mr=[],sr=Se(Ie,!Li));continue}if(Va.tickmode==="sync"){kr=[],jt=_e(Ie);continue}var dn=se(ut),rn=dn[0],pa=dn[1],_n=a(Va.dtick),Zi=Mt==="log"&&!(_n||Va.dtick.charAt(0)==="L"),Fi=U.tickFirst(Va,Et);if(Ca){if(Ie._tmin=Fi,Fi=pa:Ni<=pa;Ni=U.tickIncrement(Ni,bn,bt,zt)){if(Ca&&un++,Va.rangebreaks&&!bt){if(Ni=It)break}if(kr.length>Wt||Ni===xn)break;xn=Ni;var ui={value:le(Ni,Wa,bn)};Ca?(Ni===Fi&&(ui.first=!0),Zi&&Ni!==(Ni|0)&&(ui.simpleLabel=!0),Gt>1&&un%Gt&&(ui.skipLabel=!0),kr.push(ui)):(ui.minor=!0,Mr.push(ui))}}if(!Mr||Mr.length<3)et=!1;else{var Hi=(Mr[2].value-Mr[1].value)*(Be?-1:1);Nr(Hi,Ie.tickformat)||(et=!1,Mr=Mr.slice(1))}if(!et)ua=kr;else{var Vi=kr.concat(Mr);Ht&&kr.length&&(Vi=Vi.slice(1)),Vi=Vi.sort(function(oo,Bn){return oo.value-Bn.value}).filter(function(oo,Bn,An){return Bn===0||oo.value!==An[Bn-1].value});var $n=Vi.map(function(oo,Bn){return oo.minor===void 0&&!oo.skipLabel?Bn:null}).filter(function(oo){return oo!==null});$n.forEach(function(oo){et.map(function(Bn){var An=oo+Bn;An>=0&&An-1;wn--){if(kr[wn].drop){kr.splice(wn,1);continue}kr[wn].value=ia(kr[wn].value,Ie);var go=Ie.c2p(kr[wn].value);(os?Yn>go-uo:YnIt||PoIt&&(An.periodX=It),Pozt&&jtzt&&kry)Ie/=y,Mt=zt(10),Oe.dtick="M"+12*Pt(Ie,Mt,Me);else if(Gt>C)Ie/=C,Oe.dtick="M"+Pt(Ie,1,Ue);else if(Gt>T){if(Oe.dtick=Pt(Ie,T,Oe._hasDayOfWeekBreaks?[1,2,7,14]:Ze),!Et){var Ht=U.getTickFormat(Oe),Be=Oe.ticklabelmode==="period";Be&&(Oe._rawTick0=Oe.tick0),/%[uVW]/.test(Ht)?Oe.tick0=s.dateTick0(Oe.calendar,2):Oe.tick0=s.dateTick0(Oe.calendar,1),Be&&(Oe._dowTick0=Oe.tick0)}}else Gt>S?Oe.dtick=Pt(Ie,S,Ue):Gt>A?Oe.dtick=Pt(Ie,A,Ge):Gt>F?Oe.dtick=Pt(Ie,F,Ge):(Mt=zt(10),Oe.dtick=Pt(Ie,Mt,Me))}else if(Oe.type==="log"){Oe.tick0=0;var et=s.simpleMap(Oe.range,Oe.r2l);if(Oe._isMinor&&(Ie*=1.5),Ie>.7)Oe.dtick=Math.ceil(Ie);else if(Math.abs(et[1]-et[0])<1){var ut=1.5*Math.abs((et[1]-et[0])/Ie);Ie=Math.abs(Math.pow(10,et[1])-Math.pow(10,et[0]))/ut,Mt=zt(10),Oe.dtick="L"+Pt(Ie,Mt,Me)}else Oe.dtick=Ie>.3?"D2":"D1"}else Oe.type==="category"||Oe.type==="multicategory"?(Oe.tick0=0,Oe.dtick=Math.ceil(Math.max(Ie,1))):Ka(Oe)?(Oe.tick0=0,Mt=1,Oe.dtick=Pt(Ie,Mt,_t)):(Oe.tick0=0,Mt=zt(10),Oe.dtick=Pt(Ie,Mt,Me));if(Oe.dtick===0&&(Oe.dtick=1),!a(Oe.dtick)&&typeof Oe.dtick!="string"){var bt=Oe.dtick;throw Oe.dtick=1,"ax.dtick error: "+String(bt)}};function vt(Oe){var Ie=Oe.dtick;if(Oe._tickexponent=0,!a(Ie)&&typeof Ie!="string"&&(Ie=1),(Oe.type==="category"||Oe.type==="multicategory")&&(Oe._tickround=null),Oe.type==="date"){var Et=Oe.r2l(Oe.tick0),Mt=Oe.l2r(Et).replace(/(^-|i)/g,""),zt=Mt.length;if(String(Ie).charAt(0)==="M")zt>10||Mt.slice(5)!=="01-01"?Oe._tickround="d":Oe._tickround=+Ie.slice(1)%12===0?"y":"m";else if(Ie>=T&&zt<=10||Ie>=T*15)Oe._tickround="d";else if(Ie>=A&&zt<=16||Ie>=S)Oe._tickround="M";else if(Ie>=F&&zt<=19||Ie>=A)Oe._tickround="S";else{var Gt=Oe.l2r(Et+Ie).replace(/^-/,"").length;Oe._tickround=Math.max(zt,Gt)-20,Oe._tickround<0&&(Oe._tickround=4)}}else if(a(Ie)||Ie.charAt(0)==="L"){var Ht=Oe.range.map(Oe.r2d||Number);a(Ie)||(Ie=Number(Ie.slice(1))),Oe._tickround=2-Math.floor(Math.log(Ie)/Math.LN10+.01);var Be=Math.max(Math.abs(Ht[0]),Math.abs(Ht[1])),et=Math.floor(Math.log(Be)/Math.LN10+.01),ut=Oe.minexponent===void 0?3:Oe.minexponent;Math.abs(et)>ut&&(Je(Oe.exponentformat)&&Oe.exponentformat!=="SI extended"&&!qe(et)||Je(Oe.exponentformat)&&Oe.exponentformat==="SI extended"&&!at(et)?Oe._tickexponent=3*Math.round((et-1)/3):Oe._tickexponent=et)}else Oe._tickround=null}U.tickIncrement=function(Oe,Ie,Et,Mt){var zt=Et?-1:1;if(a(Ie))return s.increment(Oe,zt*Ie);var Gt=Ie.charAt(0),Ht=zt*Number(Ie.slice(1));if(Gt==="M")return s.incrementMonth(Oe,Ht,Mt);if(Gt==="L")return Math.log(Math.pow(10,Oe)+Ht)/Math.LN10;if(Gt==="D"){var Be=Ie==="D2"?dt:Ke,et=Oe+zt*.01,ut=s.roundUp(s.mod(et,1),Be,Et);return Math.floor(et)+Math.log(t.round(Math.pow(10,ut),1))/Math.LN10}throw"unrecognized dtick "+String(Ie)},U.tickFirst=function(Oe,Ie){var Et=Oe.r2l||Number,Mt=s.simpleMap(Oe.range,Et,void 0,void 0,Ie),zt=Mt[1]=0&&ni<=Oe._length?ra:null};if(et&&s.isArrayOrTypedArray(Oe.ticktext)){var jt=s.simpleMap(Oe.range,Oe.r2l),sr=(Math.abs(jt[1]-jt[0])-(Oe._lBreaks||0))/1e4;for(It=0;It"+Be;else{var ut=na(Oe),bt=Oe._trueSide||Oe.side;(!ut&&bt==="top"||ut&&bt==="bottom")&&(Ht+="
")}Ie.text=Ht}function Ve(Oe,Ie,Et,Mt,zt){var Gt=Oe.dtick,Ht=Ie.x,Be=Oe.tickformat,et=typeof Gt=="string"&&Gt.charAt(0);if(zt==="never"&&(zt=""),Mt&&et!=="L"&&(Gt="L3",et="L"),Be||et==="L")Ie.text=ct(Math.pow(10,Ht),Oe,zt,Mt);else if(a(Gt)||et==="D"&&(Oe.minorloglabels==="complete"||s.mod(Ht+.01,1)<.1)){var ut;Oe.minorloglabels==="complete"&&!(s.mod(Ht+.01,1)<.1)&&(ut=!0,Ie.fontSize*=.75);var bt=Math.pow(10,Ht).toExponential(0),Ot=bt.split("e"),It=+Ot[1],Wt=Math.abs(It),jt=Oe.exponentformat;jt==="power"||Je(jt)&&jt!=="SI extended"&&qe(It)||Je(jt)&&jt==="SI extended"&&at(It)?(Ie.text=Ot[0],Wt>0&&(Ie.text+="x10"),Ie.text==="1x10"&&(Ie.text="10"),It!==0&&It!==1&&(Ie.text+=""+(It>0?"":P)+Wt+""),Ie.fontSize*=1.25):(jt==="e"||jt==="E")&&Wt>2?Ie.text=Ot[0]+jt+(It>0?"+":P)+Wt:(Ie.text=ct(Math.pow(10,Ht),Oe,"","fakehover"),Gt==="D1"&&Oe._id.charAt(0)==="y"&&(Ie.dy-=Ie.fontSize/6))}else if(et==="D")Ie.text=Oe.minorloglabels==="none"?"":String(Math.round(Math.pow(10,s.mod(Ht,1)))),Ie.fontSize*=.75;else throw"unrecognized dtick "+String(Gt);if(Oe.dtick==="D1"){var sr=String(Ie.text).charAt(0);(sr==="0"||sr==="1")&&(Oe._id.charAt(0)==="y"?Ie.dx-=Ie.fontSize/4:(Ie.dy+=Ie.fontSize/2,Ie.dx+=(Oe.range[1]>Oe.range[0]?1:-1)*Ie.fontSize*(Ht<0?.5:.25)))}}function Ye(Oe,Ie){var Et=Oe._categories[Math.round(Ie.x)];Et===void 0&&(Et=""),Ie.text=String(Et)}function me(Oe,Ie,Et){var Mt=Math.round(Ie.x),zt=Oe._categories[Mt]||[],Gt=zt[1]===void 0?"":String(zt[1]),Ht=zt[0]===void 0?"":String(zt[0]);Et?Ie.text=Ht+" - "+Gt:(Ie.text=Gt,Ie.text2=Ht)}function be(Oe,Ie,Et,Mt,zt){zt==="never"?zt="":Oe.showexponent==="all"&&Math.abs(Ie.x/Oe.dtick)<1e-6&&(zt="hide"),Ie.text=ct(Ie.x,Oe,zt,Mt)}function Ee(Oe,Ie,Et,Mt,zt){if(Oe.thetaunit==="radians"&&!Et){var Gt=Ie.x/180;if(Gt===0)Ie.text="0";else{var Ht=De(Gt);if(Ht[1]>=100)Ie.text=ct(s.deg2rad(Ie.x),Oe,zt,Mt);else{var Be=Ie.x<0;Ht[1]===1?Ht[0]===1?Ie.text="\u03C0":Ie.text=Ht[0]+"\u03C0":Ie.text=["",Ht[0],"","\u2044","",Ht[1],"","\u03C0"].join(""),Be&&(Ie.text=P+Ie.text)}}}else Ie.text=ct(Ie.x,Oe,zt,Mt)}function De(Oe){function Ie(Be,et){return Math.abs(Be-et)<=1e-6}function Et(Be,et){return Ie(et,0)?Be:Et(et,Be%et)}function Mt(Be){for(var et=1;!Ie(Math.round(Be*et)/et,Be);)et*=10;return et}var zt=Mt(Oe),Gt=Oe*zt,Ht=Math.abs(Et(Gt,zt));return[Math.round(Gt/Ht),Math.round(zt/Ht)]}var Ce=["f","p","n","\u03BC","m","","k","M","G","T"],Fe=["q","r","y","z","a",...Ce,"P","E","Z","Y","R","Q"],Je=Oe=>["SI","SI extended","B"].includes(Oe);function qe(Oe){return Oe>14||Oe<-15}function at(Oe){return Oe>32||Oe<-30}function tt(Oe,Ie){return Je(Ie)?!!(Ie==="SI extended"&&at(Oe)||Ie!=="SI extended"&&qe(Oe)):!1}function ct(Oe,Ie,Et,Mt){var zt=Oe<0,Gt=Ie._tickround,Ht=Et||Ie.exponentformat||"B",Be=Ie._tickexponent,et=U.getTickFormat(Ie),ut=Ie.separatethousands;if(Mt){var bt={exponentformat:Ht,minexponent:Ie.minexponent,dtick:Ie.showexponent==="none"?Ie.dtick:a(Oe)&&Math.abs(Oe)||1,range:Ie.showexponent==="none"?Ie.range.map(Ie.r2d):[0,Oe||1]};vt(bt),Gt=(Number(bt._tickround)||0)+4,Be=bt._tickexponent,Ie.hoverformat&&(et=Ie.hoverformat)}if(et)return Ie._numFormat(et)(Oe).replace(/-/g,P);Ht==="none"&&(Be=0),Oe=Math.abs(Oe);let Ot=Math.pow(10,-Gt)/2;if(Oe"+It+"":Ht==="B"&&Be===9?Oe+="B":Je(Ht)&&(Oe+=Ht==="SI extended"?Fe[Be/3+10]:Ce[Be/3+5])}return zt?P+Oe:Oe}U.getTickFormat=function(Oe){var Ie;function Et(et){return typeof et!="string"?et:Number(et.replace("M",""))*C}function Mt(et,ut){var bt=["L","D"];if(typeof et==typeof ut){if(typeof et=="number")return et-ut;var Ot=bt.indexOf(et.charAt(0)),It=bt.indexOf(ut.charAt(0));return Ot===It?Number(et.replace(/(L|D)/g,""))-Number(ut.replace(/(L|D)/g,"")):Ot-It}else return typeof et=="number"?1:-1}function zt(et,ut,bt){var Ot=bt||function(jt){return jt},It=ut[0],Wt=ut[1];return(!It&&typeof It!="number"||Ot(It)<=Ot(et))&&(!Wt&&typeof Wt!="number"||Ot(Wt)>=Ot(et))}function Gt(et,ut){var bt=ut[0]===null,Ot=ut[1]===null,It=Mt(et,ut[0])>=0,Wt=Mt(et,ut[1])<=0;return(bt||It)&&(Ot||Wt)}var Ht,Be;if(Oe.tickformatstops&&Oe.tickformatstops.length>0)switch(Oe.type){case"date":case"linear":{for(Ie=0;Ie=0&&zt.unshift(zt.splice(bt,1).shift())}});var Be={false:{left:0,right:0}};return s.syncOrAsync(zt.map(function(et){return function(){if(et){var ut=U.getFromId(Oe,et);Et||(Et={}),Et.axShifts=Be,Et.overlayingShiftedAx=Ht;var bt=U.drawOne(Oe,ut,Et);return ut._shiftPusher&&Yi(ut,ut._fullDepth||0,Be,!0),ut._r=ut.range.slice(),ut._rl=s.simpleMap(ut._r,ut.r2l),bt}}}))},U.drawOne=function(Oe,Ie,Et){Et=Et||{};var Mt=Et.axShifts||{},zt=Et.overlayingShiftedAx||[],Gt,Ht,Be;Ie.setScale();var et=Oe._fullLayout,ut=Ie._id,bt=ut.charAt(0),Ot=U.counterLetter(ut),It=et._plots[Ie._mainSubplot],Wt=Ie.zerolinelayer==="above traces";if(!It)return;if(Ie._shiftPusher=Ie.autoshift||zt.indexOf(Ie._id)!==-1||zt.indexOf(Ie.overlaying)!==-1,Ie._shiftPusher&Ie.anchor==="free"){var jt=Ie.linewidth/2||0;Ie.ticks==="inside"&&(jt+=Ie.ticklen),Yi(Ie,jt,Mt,!0),Yi(Ie,Ie.shift||0,Mt,!1)}(Et.skipTitle!==!0||Ie._shift===void 0)&&(Ie._shift=Qr(Ie,Mt));var sr=It[bt+"axislayer"],kr=Ie._mainLinePosition,Mr=kr+=Ie._shift,ua=Ie._mainMirrorPosition,ra=Ie._vals=U.calcTicks(Ie),ni=[Ie.mirror,Mr,ua].join("_");for(Gt=0;Gt0?Bn.bottom-ss:0,oo))));var Lu=0,Jl=0;if(Ie._shiftPusher&&(Lu=Math.max(oo,Bn.height>0?yo==="l"?ss-Bn.left:Bn.right-ss:0),Ie.title.text!==et._dfltTitle[bt]&&(Jl=(Ie._titleStandoff||0)+(Ie._titleScoot||0),yo==="l"&&(Jl+=Vt(Ie))),Ie._fullDepth=Math.max(Lu,Jl)),Ie.automargin){An={x:0,y:0,r:0,l:0,t:0,b:0};var Fu=[0,1],Pu=typeof Ie._shift=="number"?Ie._shift:0;if(bt==="x"){if(yo==="b"?An[yo]=Ie._depth:(An[yo]=Ie._depth=Math.max(Bn.width>0?ss-Bn.top:0,oo),Fu.reverse()),Bn.width>0){var Ku=Bn.right-(Ie._offset+Ie._length);Ku>0&&(An.xr=1,An.r=Ku);var mu=Ie._offset-Bn.left;mu>0&&(An.xl=0,An.l=mu)}}else if(yo==="l"?(Ie._depth=Math.max(Bn.height>0?ss-Bn.left:0,oo),An[yo]=Ie._depth-Pu):(Ie._depth=Math.max(Bn.height>0?Bn.right-ss:0,oo),An[yo]=Ie._depth+Pu,Fu.reverse()),Bn.height>0){var $c=Bn.bottom-(Ie._offset+Ie._length);$c>0&&(An.yb=0,An.b=$c);var Ju=Ie._offset-Bn.top;Ju>0&&(An.yt=1,An.t=Ju)}An[Ot]=Ie.anchor==="free"?Ie.position:Ie._anchorAxis.domain[Fu[0]],Ie.title.text!==et._dfltTitle[bt]&&(An[yo]+=Vt(Ie)+(Ie.title.standoff||0)),Ie.mirror&&Ie.anchor!=="free"&&(Po={x:0,y:0,r:0,l:0,t:0,b:0},Po[sl]=Ie.linewidth,Ie.mirror&&Ie.mirror!==!0&&(Po[sl]+=oo),Ie.mirror===!0||Ie.mirror==="ticks"?Po[Ot]=Ie._anchorAxis.domain[Fu[1]]:(Ie.mirror==="all"||Ie.mirror==="allticks")&&(Po[Ot]=[Ie._counterDomainMin,Ie._counterDomainMax][Fu[1]]))}gs&&(Bl=o.getComponentMethod("rangeslider","autoMarginOpts")(Oe,Ie)),typeof Ie.automargin=="string"&&(At(An,Ie.automargin),At(Po,Ie.automargin)),i.autoMargin(Oe,la(Ie),An),i.autoMargin(Oe,Hr(Ie),Po),i.autoMargin(Oe,jr(Ie),Bl)}),s.syncOrAsync(Cn)}};function At(Oe,Ie){if(Oe){var Et=Object.keys($).reduce(function(Mt,zt){return Ie.indexOf(zt)!==-1&&$[zt].forEach(function(Gt){Mt[Gt]=1}),Mt},{});Object.keys(Oe).forEach(function(Mt){Et[Mt]||(Mt.length===1?Oe[Mt]=0:delete Oe[Mt])})}}function ft(Oe,Ie){var Et=[],Mt,zt=function(Gt,Ht){var Be=Gt.xbnd[Ht];Be!==null&&Et.push(s.extendFlat({},Gt,{x:Be}))};if(Ie.length){for(Mt=0;MtOe.range[1],Be=Oe.ticklabelposition&&Oe.ticklabelposition.indexOf("inside")!==-1,et=!Be;if(Et){var ut=Ht?-1:1;Et=Et*ut}if(Mt){var bt=Oe.side,Ot=Be&&(bt==="top"||bt==="left")||et&&(bt==="bottom"||bt==="right")?1:-1;Mt=Mt*Ot}return Oe._id.charAt(0)==="x"?function(It){return l(zt+Oe._offset+Oe.l2p(gt(It))+Et,Gt+Mt)}:function(It){return l(Gt+Mt,zt+Oe._offset+Oe.l2p(gt(It))+Et)}};function gt(Oe){return Oe.periodX!==void 0?Oe.periodX:Oe.x}function St(Oe){var Ie=Oe.ticklabelposition||"",Et=Oe.tickson||"",Mt=function(jt){return Ie.indexOf(jt)!==-1},zt=Mt("top"),Gt=Mt("left"),Ht=Mt("right"),Be=Mt("bottom"),et=Mt("inside"),ut=Et!=="boundaries"&&(Be||Gt||zt||Ht);if(!ut&&!et)return[0,0];var bt=Oe.side,Ot=ut?(Oe.tickwidth||0)/2:0,It=W,Wt=Oe.tickfont?Oe.tickfont.size:12;return(Be||zt)&&(Ot+=Wt*J,It+=(Oe.linewidth||0)/2),(Gt||Ht)&&(Ot+=(Oe.linewidth||0)/2,It+=W),et&&bt==="top"&&(It-=Wt*(1-J)),(Gt||zt)&&(Ot=-Ot),(bt==="bottom"||bt==="right")&&(It=-It),[ut?Ot:0,et?It:0]}U.makeTickPath=function(Oe,Ie,Et,Mt){Mt||(Mt={});var zt=Mt.minor;if(zt&&!Oe.minor)return"";var Gt=Mt.len!==void 0?Mt.len:zt?Oe.minor.ticklen:Oe.ticklen,Ht=Oe._id.charAt(0),Be=(Oe.linewidth||1)/2;return Ht==="x"?"M0,"+(Ie+Be*Et)+"v"+Gt*Et:"M"+(Ie+Be*Et)+",0h"+Gt*Et},U.makeLabelFns=function(Oe,Ie,Et){var Mt=Oe.ticklabelposition||"",zt=Oe.tickson||"",Gt=function(Fi){return Mt.indexOf(Fi)!==-1},Ht=Gt("top"),Be=Gt("left"),et=Gt("right"),ut=Gt("bottom"),bt=zt!=="boundaries"&&(ut||Be||Ht||et),Ot=Gt("inside"),It=Mt==="inside"&&Oe.ticks==="inside"||!Ot&&Oe.ticks==="outside"&&zt!=="boundaries",Wt=0,jt=0,sr=It?Oe.ticklen:0;if(Ot?sr*=-1:bt&&(sr=0),It&&(Wt+=sr,Et)){var kr=s.deg2rad(Et);Wt=sr*Math.cos(kr)+1,jt=sr*Math.sin(kr)}Oe.showticklabels&&(It||Oe.showline)&&(Wt+=.2*Oe.tickfont.size),Wt+=(Oe.linewidth||1)/2*(Ot?-1:1);var Mr={labelStandoff:Wt,labelShift:jt},ua,ra,ni,Ca,Li=0,Va=Oe.side,dn=Oe._id.charAt(0),rn=Oe.tickangle,pa;if(dn==="x")pa=!Ot&&Va==="bottom"||Ot&&Va==="top",Ca=pa?1:-1,Ot&&(Ca*=-1),ua=jt*Ca,ra=Ie+Wt*Ca,ni=pa?1:-.2,Math.abs(rn)===90&&(Ot?ni+=Z:rn===-90&&Va==="bottom"?ni=J:rn===90&&Va==="top"?ni=Z:ni=.5,Li=Z/2*(rn/90)),Mr.xFn=function(Fi){return Fi.dx+ua+Li*Fi.fontSize},Mr.yFn=function(Fi){return Fi.dy+ra+Fi.fontSize*ni},Mr.anchorFn=function(Fi,xn){if(bt){if(Be)return"end";if(et)return"start"}return!a(xn)||xn===0||xn===180?"middle":xn*Ca<0!==Ot?"end":"start"},Mr.heightFn=function(Fi,xn,Ni){return xn<-60||xn>60?-.5*Ni:Oe.side==="top"!==Ot?-Ni:0};else if(dn==="y"){if(pa=!Ot&&Va==="left"||Ot&&Va==="right",Ca=pa?1:-1,Ot&&(Ca*=-1),ua=Wt,ra=jt*Ca,ni=0,!Ot&&Math.abs(rn)===90&&(rn===-90&&Va==="left"||rn===90&&Va==="right"?ni=J:ni=.5),Ot){var _n=a(rn)?+rn:0;if(_n!==0){var Zi=s.deg2rad(_n);Li=Math.abs(Math.sin(Zi))*J*Ca,ni=0}}Mr.xFn=function(Fi){return Fi.dx+Ie-(ua+Fi.fontSize*ni)*Ca+Li*Fi.fontSize},Mr.yFn=function(Fi){return Fi.dy+ra+Fi.fontSize*Z},Mr.anchorFn=function(Fi,xn){return a(xn)&&Math.abs(xn)===90?"middle":pa?"end":"start"},Mr.heightFn=function(Fi,xn,Ni){return Oe.side==="right"&&(xn*=-1),xn<-30?-Ni:xn<30?-.5*Ni:0}}return Mr};function Dt(Oe){return[Oe.text,Oe.x,Oe.axInfo,Oe.font,Oe.fontSize,Oe.fontColor].join("_")}U.drawTicks=function(Oe,Ie,Et){Et=Et||{};var Mt=Ie._id+"tick",zt=[].concat(Ie.minor&&Ie.minor.ticks?Et.vals.filter(function(Ht){return Ht.minor&&!Ht.noTick}):[]).concat(Ie.ticks?Et.vals.filter(function(Ht){return!Ht.minor&&!Ht.noTick}):[]),Gt=Et.layer.selectAll("path."+Mt).data(zt,Dt);Gt.exit().remove(),Gt.enter().append("path").classed(Mt,1).classed("ticks",1).classed("crisp",Et.crisp!==!1).each(function(Ht){return c.stroke(t.select(this),Ht.minor?Ie.minor.tickcolor:Ie.tickcolor)}).style("stroke-width",function(Ht){return f.crispRound(Oe,Ht.minor?Ie.minor.tickwidth:Ie.tickwidth,1)+"px"}).attr("d",Et.path).style("display",null),xi(Ie,[O]),Gt.attr("transform",Et.transFn)},U.drawGrid=function(Oe,Ie,Et){if(Et=Et||{},Ie.tickmode!=="sync"){var Mt=Ie._id+"grid",zt=Ie.minor&&Ie.minor.showgrid,Gt=zt?Et.vals.filter(function(Mr){return Mr.minor}):[],Ht=Ie.showgrid?Et.vals.filter(function(Mr){return!Mr.minor}):[],Be=Et.counterAxis;if(Be&&U.shouldShowZeroLine(Oe,Ie,Be))for(var et=Ie.tickmode==="array",ut=0;ut=0;jt--){var sr=jt?It:Wt;if(sr){var kr=sr.selectAll("path."+Mt).data(jt?Ht:Gt,Dt);kr.exit().remove(),kr.enter().append("path").classed(Mt,1).classed("crisp",Et.crisp!==!1),kr.attr("transform",Et.transFn).attr("d",Et.path).each(function(Mr){return c.stroke(t.select(this),Mr.minor?Ie.minor.gridcolor:Ie.gridcolor||"#ddd")}).style("stroke-dasharray",function(Mr){return f.dashStyle(Mr.minor?Ie.minor.griddash:Ie.griddash,Mr.minor?Ie.minor.gridwidth:Ie.gridwidth)}).style("stroke-width",function(Mr){return(Mr.minor?Ot:Ie._gw)+"px"}).style("display",null),typeof Et.path=="function"&&kr.attr("d",Et.path)}}xi(Ie,[L,B])}},U.drawZeroLine=function(Oe,Ie,Et){Et=Et||Et;var Mt=Ie._id+"zl",zt=U.shouldShowZeroLine(Oe,Ie,Et.counterAxis),Gt=Et.layer.selectAll("path."+Mt).data(zt?[{x:0,id:Ie._id}]:[]);Gt.exit().remove(),Gt.enter().append("path").classed(Mt,1).classed("zl",1).classed("crisp",Et.crisp!==!1).each(function(){Et.layer.selectAll("path").sort(function(Ht,Be){return q(Ht.id,Be.id)})}),Gt.attr("transform",Et.transFn).attr("d",Et.path).call(c.stroke,Ie.zerolinecolor||c.defaultLine).style("stroke-width",f.crispRound(Oe,Ie.zerolinewidth,Ie._gw||1)+"px").style("display",null),xi(Ie,[I])},U.drawLabels=function(Oe,Ie,Et){Et=Et||{};var Mt=Oe._fullLayout,zt=Ie._id,Gt=Ie.zerolinelayer==="above traces",Ht=Et.cls||zt+"tick",Be=Et.vals.filter(function(Wa){return Wa.text}),et=Et.labelFns,ut=Et.secondary?0:Ie.tickangle,bt=(Ie._prevTickAngles||{})[Ht],Ot=Et.layer.selectAll("g."+Ht).data(Ie.showticklabels?Be:[],Dt),It=[];Ot.enter().append("g").classed(Ht,1).append("text").attr("text-anchor","middle").each(function(Wa){var ui=t.select(this),Hi=Oe._promises.length;ui.call(n.positionText,et.xFn(Wa),et.yFn(Wa)).call(f.font,{family:Wa.font,size:Wa.fontSize,color:Wa.fontColor,weight:Wa.fontWeight,style:Wa.fontStyle,variant:Wa.fontVariant,textcase:Wa.fontTextcase,lineposition:Wa.fontLineposition,shadow:Wa.fontShadow}).text(Wa.text).call(n.convertToTspans,Oe),Oe._promises[Hi]?It.push(Oe._promises.pop().then(function(){Wt(ui,ut)})):Wt(ui,ut)}),xi(Ie,[G]),Ot.exit().remove(),Et.repositionOnUpdate&&Ot.each(function(Wa){t.select(this).select("text").call(n.positionText,et.xFn(Wa),et.yFn(Wa))});function Wt(Wa,ui){Wa.each(function(Hi){var Vi=t.select(this),$n=Vi.select(".text-math-group"),ro=et.anchorFn(Hi,ui),Un=Et.transFn.call(Vi.node(),Hi)+(a(ui)&&+ui!=0?" rotate("+ui+","+et.xFn(Hi)+","+(et.yFn(Hi)-Hi.fontSize/2)+")":""),Kn=n.lineCount(Vi),To=N*Hi.fontSize,Jn=et.heightFn(Hi,a(ui)?+ui:0,(Kn-1)*To);if(Jn&&(Un+=l(0,Jn)),$n.empty()){var qn=Vi.select("text");qn.attr({transform:Un,"text-anchor":ro}),qn.style("display",null),Ie._adjustTickLabelsOverflow&&Ie._adjustTickLabelsOverflow()}else{var Fo=f.bBox($n.node()).width,zn=Fo*{end:-.5,start:.5}[ro];$n.attr("transform",Un+l(zn,0))}})}Ie._adjustTickLabelsOverflow=function(){var Wa=Ie.ticklabeloverflow;if(!(!Wa||Wa==="allow")){var ui=Wa.indexOf("hide")!==-1,Hi=Ie._id.charAt(0)==="x",Vi=0,$n=Hi?Oe._fullLayout.width:Oe._fullLayout.height;if(Wa.indexOf("domain")!==-1){var ro=s.simpleMap(Ie.range,Ie.r2l);Vi=Ie.l2p(ro[0])+Ie._offset,$n=Ie.l2p(ro[1])+Ie._offset}var Un=Math.min(Vi,$n),Kn=Math.max(Vi,$n),To=Ie.side,Jn=1/0,qn=-1/0;Ot.each(function(os){var uo=t.select(this),Yn=uo.select(".text-math-group");if(Yn.empty()){var go=f.bBox(uo.node()),Cn=0;Hi?(go.right>Kn||go.leftKn||go.top+(Ie.tickangle?0:os.fontSize/4)Ie["_visibleLabelMin_"+ro._id]?uo.style("display","none"):Kn.K==="tick"&&!Un&&uo.node().style.display!=="none"&&uo.style("display",null)})})})})},Wt(Ot,bt+1?bt:ut);function jt(){return It.length&&Promise.all(It)}var sr=null;function kr(){if(Wt(Ot,ut),Be.length&&Ie.autotickangles&&(Ie.type!=="log"||String(Ie.dtick).charAt(0)!=="D")){sr=Ie.autotickangles[0];var Wa=0,ui=[],Hi,Vi=1;Ot.each(function(An){Wa=Math.max(Wa,An.fontSize);var Po=Ie.l2p(An.x),Bl=Fr(this),Lu=f.bBox(Bl.node());Vi=Math.max(Vi,n.lineCount(Bl)),ui.push({top:0,bottom:10,height:10,left:Po-Lu.width/2,right:Po+Lu.width/2+2,width:Lu.width+2})});var $n=(Ie.tickson==="boundaries"||Ie.showdividers)&&!Et.secondary,ro=Be.length,Un=Math.abs((Be[ro-1].x-Be[0].x)*Ie._m)/(ro-1),Kn=$n?Un/2:Un,To=$n?Ie.ticklen:Wa*1.25*Vi,Jn=Math.sqrt(Math.pow(Kn,2)+Math.pow(To,2)),qn=Kn/Jn,Fo=Ie.autotickangles.map(function(An){return An*Math.PI/180}),zn=Fo.find(function(An){return Math.abs(Math.cos(An))<=qn});zn===void 0&&(zn=Fo.reduce(function(An,Po){return Math.abs(Math.cos(An))un*Ni&&(Zi=Ni,rn[dn]=pa[dn]=Fi[dn])}var jn=Math.abs(Zi-_n);jn-Ca>0?(jn-=Ca,Ca*=1+Ca/jn):Ca=0,Ie._id.charAt(0)!=="y"&&(Ca=-Ca),rn[Va]=ra.p2r(ra.r2p(pa[Va])+Li*Ca),ra.autorange==="min"||ra.autorange==="max reversed"?(rn[0]=null,ra._rangeInitial0=void 0,ra._rangeInitial1=void 0):(ra.autorange==="max"||ra.autorange==="min reversed")&&(rn[1]=null,ra._rangeInitial0=void 0,ra._rangeInitial1=void 0),Mt._insideTickLabelsUpdaterange[ra._name+".range"]=rn}var bn=s.syncOrAsync(Mr);return bn&&bn.then&&Oe._promises.push(bn),bn};function kt(Oe,Ie,Et){var Mt=Ie._id+"divider",zt=Et.vals,Gt=Et.layer.selectAll("path."+Mt).data(zt,Dt);Gt.exit().remove(),Gt.enter().insert("path",":first-child").classed(Mt,1).classed("crisp",1).call(c.stroke,Ie.dividercolor).style("stroke-width",f.crispRound(Oe,Ie.dividerwidth,1)+"px"),Gt.attr("transform",Et.transFn).attr("d",Et.path)}U.getPxPosition=function(Oe,Ie){var Et=Oe._fullLayout._size,Mt=Ie._id.charAt(0),zt=Ie.side,Gt;if(Ie.anchor!=="free"?Gt=Ie._anchorAxis:Mt==="x"?Gt={_offset:Et.t+(1-(Ie.position||0))*Et.h,_length:0}:Mt==="y"&&(Gt={_offset:Et.l+(Ie.position||0)*Et.w+Ie._shift,_length:0}),zt==="top"||zt==="left")return Gt._offset;if(zt==="bottom"||zt==="right")return Gt._offset+Gt._length};function Vt(Oe){var Ie=Oe.title.font.size,Et=(Oe.title.text.match(n.BR_TAG_ALL)||[]).length;return Oe.title.hasOwnProperty("standoff")?Ie*(J+Et*N):Et?Ie*(Et+1)*N:Ie}function lr(Oe,Ie){var Et=Oe._fullLayout,Mt=Ie._id,zt=Mt.charAt(0),Gt=Ie.title.font.size,Ht,Be=(Ie.title.text.match(n.BR_TAG_ALL)||[]).length;if(Ie.title.hasOwnProperty("standoff"))Ie.side==="bottom"||Ie.side==="right"?Ht=Ie._depth+Ie.title.standoff+Gt*J:(Ie.side==="top"||Ie.side==="left")&&(Ht=Ie._depth+Ie.title.standoff+Gt*(Z+Be*N));else{var et=na(Ie);if(Ie.type==="multicategory")Ht=Ie._depth;else{var ut=1.5*Gt;et&&(ut=.5*Gt,Ie.ticks==="outside"&&(ut+=Ie.ticklen)),Ht=10+ut+(Ie.linewidth?Ie.linewidth-1:0)}et||(zt==="x"?Ht+=Ie.side==="top"?Gt*(Ie.showticklabels?1:0):Gt*(Ie.showticklabels?1.5:.5):Ht+=Ie.side==="right"?Gt*(Ie.showticklabels?1:.5):Gt*(Ie.showticklabels?.5:0))}var bt=U.getPxPosition(Oe,Ie),Ot,It,Wt;zt==="x"?(It=Ie._offset+Ie._length/2,Wt=Ie.side==="top"?bt-Ht:bt+Ht):(Wt=Ie._offset+Ie._length/2,It=Ie.side==="right"?bt+Ht:bt-Ht,Ot={rotate:"-90",offset:0});var jt;if(Ie.type!=="multicategory"){var sr=Ie._selections[Ie._id+"tick"];if(jt={selection:sr,side:Ie.side},sr&&sr.node()&&sr.node().parentNode){var kr=f.getTranslate(sr.node().parentNode);jt.offsetLeft=kr.x,jt.offsetTop=kr.y}Ie.title.hasOwnProperty("standoff")&&(jt.pad=0)}return Ie._titleStandoff=Ht,u.draw(Oe,Mt+"title",{propContainer:Ie,propName:Ie._name+".title.text",placeholder:Et._dfltTitle[zt],avoid:jt,transform:Ot,attributes:{x:It,y:Wt,"text-anchor":"middle"}})}U.shouldShowZeroLine=function(Oe,Ie,Et){var Mt=s.simpleMap(Ie.range,Ie.r2l);return Mt[0]*Mt[1]<=0&&Ie.zeroline&&(Ie.type==="linear"||Ie.type==="-")&&!(Ie.rangebreaks&&Ie.maskBreaks(0)===z)&&(dr(Ie,0)||!yr(Oe,Ie,Et,Mt)||vr(Oe,Ie))},U.clipEnds=function(Oe,Ie){return Ie.filter(function(Et){return dr(Oe,Et.x)})};function dr(Oe,Ie){var Et=Oe.l2p(Ie);return Et>1&&Et1)for(zt=1;zt=zt.min&&Oe=R:/%L/.test(Ie)?Oe>=D:/%[SX]/.test(Ie)?Oe>=F:/%M/.test(Ie)?Oe>=A:/%[HI]/.test(Ie)?Oe>=S:/%p/.test(Ie)?Oe>=b:/%[Aadejuwx]/.test(Ie)?Oe>=T:/%[UVW]/.test(Ie)?Oe>=k:/%[Bbm]/.test(Ie)?Oe>=w:/%[q]/.test(Ie)?Oe>=E:/%[Yy]/.test(Ie)?Oe>=_:!0}}}),ZD=ye({"src/plots/cartesian/autorange_options_defaults.js"(e,r){"use strict";r.exports=function(a,i,o){var s,l;if(o){var n=i==="reversed"||i==="min reversed"||i==="max reversed";s=o[n?1:0],l=o[n?0:1]}var u=a("autorangeoptions.minallowed",l===null?s:void 0),c=a("autorangeoptions.maxallowed",s===null?l:void 0);u===void 0&&a("autorangeoptions.clipmin"),c===void 0&&a("autorangeoptions.clipmax"),a("autorangeoptions.include")}}}),KD=ye({"src/plots/cartesian/range_defaults.js"(e,r){"use strict";var t=ZD();r.exports=function(i,o,s,l){var n=o._template||{},u=o.type||n.type||"-";s("minallowed"),s("maxallowed");var c=s("range");if(!c){var f;!l.noInsiderange&&u!=="log"&&(f=s("insiderange"),f&&(f[0]===null||f[1]===null)&&(o.insiderange=!1,f=void 0),f&&(c=s("range",f)))}var h=o.getAutorangeDflt(c,l),d=s("autorange",h),p;c&&(c[0]===null&&c[1]===null||(c[0]===null||c[1]===null)&&(d==="reversed"||d===!0)||c[0]!==null&&(d==="min"||d==="max reversed")||c[1]!==null&&(d==="max"||d==="min reversed"))&&(c=void 0,delete o.range,o.autorange=!0,p=!0),p||(h=o.getAutorangeDflt(c,l),d=s("autorange",h)),d&&(t(s,d,c),(u==="linear"||u==="-")&&s("rangemode")),o.cleanRange()}}}),Hee=ye({"node_modules/mouse-event-offset/index.js"(e,r){var t={left:0,top:0};r.exports=a;function a(o,s,l){s=s||o.currentTarget||o.srcElement,Array.isArray(l)||(l=[0,0]);var n=o.clientX||0,u=o.clientY||0,c=i(s);return l[0]=n-c.left,l[1]=u-c.top,l}function i(o){return o===window||o===document||o===document.body?t:o.getBoundingClientRect()}}}),AA=ye({"node_modules/has-passive-events/index.js"(e,r){"use strict";var t=UD();function a(){var i=!1;try{var o=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("test",null,o),window.removeEventListener("test",null,o)}catch{i=!1}return i}r.exports=t&&a()}}),Wee=ye({"src/components/dragelement/align.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){var n=(a-o)/(s-o),u=n+i/(s-o),c=(n+u)/2;return l==="left"||l==="bottom"?n:l==="center"||l==="middle"?c:l==="right"||l==="top"?u:n<2/3-c?n:u>4/3-c?u:c}}}),$ee=ye({"src/components/dragelement/cursor.js"(e,r){"use strict";var t=Yt(),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];r.exports=function(o,s,l,n){return l==="left"?o=0:l==="center"?o=1:l==="right"?o=2:o=t.constrain(Math.floor(o*3),0,2),n==="bottom"?s=0:n==="middle"?s=1:n==="top"?s=2:s=t.constrain(Math.floor(s*3),0,2),a[s][o]}}}),Yee=ye({"src/components/dragelement/unhover.js"(e,r){"use strict";var t=py(),a=xA(),i=Gx().getGraphDiv,o=qx(),s=r.exports={};s.wrapped=function(l,n,u){var c;l=i(l),l._fullLayout&&a.clear(l._fullLayout._uid+o.HOVERID);let f=l._hoverdata;s.raw(l,n,u)&&l._hoverAnywhereActive&&(l._hoverAnywhereActive=!1,(c=l._fullLayout)!=null&&c.hoveranywhere&&n?.target&&!f&&l.emit("plotly_unhover",{event:n,points:[]}))},s.raw=function(n,u){var c=n._fullLayout,f=n._hoverdata;return u||(u={}),u.target&&!n._dragged&&t.triggerHandler(n,"plotly_beforehover",u)===!1?!1:(c._hoverlayer.selectAll("g").remove(),c._hoverlayer.selectAll("line").remove(),c._hoverlayer.selectAll("circle").remove(),n._hoverdata=void 0,u.target&&f&&n.emit("plotly_unhover",{event:u,points:f}),!0)}}}),_f=ye({"src/components/dragelement/index.js"(e,r){"use strict";var t=Hee(),a=qD(),i=AA(),o=Yt().removeElement,s=$l(),l=r.exports={};l.align=Wee(),l.getCursor=$ee();var n=Yee();l.unhover=n.wrapped,l.unhoverRaw=n.raw,l.init=function(h){var d=h.gd,p=1,g=d._context.doubleClickDelay,m=h.element,y,_,v,x,E,M,C,w;d._mouseDownTime||(d._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=b,i?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=b,m.addEventListener("touchstart",b,{passive:!1})):m.ontouchstart=b;function k(F,D,R){return Math.abs(F)"u"&&typeof F.clientY>"u"&&(F.clientX=y,F.clientY=_),v=new Date().getTime(),v-d._mouseDownTimeg&&(p=Math.max(p-1,1)),d._dragged)h.doneFn&&h.doneFn();else{var D;M.target===C?D=M:(D={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(R=>{var P=M[R];!D[R]&&typeof P!="function"&&(D[R]=P)})),h.clickFn&&h.clickFn(p,D),w||C.dispatchEvent(new MouseEvent("click",F))}d._dragging=!1,d._dragged=!1}};function u(){var f=document.createElement("div");f.className="dragcover";var h=f.style;return h.position="fixed",h.left=0,h.right=0,h.top=0,h.bottom=0,h.zIndex=999999999,h.background="none",document.body.appendChild(f),f}l.coverSlip=u;function c(f){return t(f.changedTouches?f.changedTouches[0]:f,document.body)}}}),rp=ye({"src/lib/setcursor.js"(e,r){"use strict";r.exports=function(a,i){(a.attr("class")||"").split(" ").forEach(function(o){o.indexOf("cursor-")===0&&a.classed(o,!1)}),i&&a.classed("cursor-"+i,!0)}}}),Xee=ye({"src/lib/override_cursor.js"(e,r){"use strict";var t=rp(),a="data-savedcursor",i="!!";r.exports=function(s,l){var n=s.attr(a);if(l){if(!n){for(var u=(s.attr("class")||"").split(" "),c=0;cW.legend.length)for(var j=W.legend.length;j(c==="legend"?1:0));if(R===!1&&(h[c]=void 0),R===!1&&!g.uirevision||(y("uirevision",h.uirevision),R===!1))return;y("borderwidth");var P=y("orientation"),z=y("yref"),I=y("xref"),L=P==="h",B=z==="paper",O=I==="paper",G,$,X,Z="left";L?(G=0,t.getComponentMethod("rangeslider","isVisible")(f.xaxis)?B?($=1.1,X="bottom"):($=1,X="top"):B?($=-.1,X="top"):($=0,X="bottom")):($=1,X="auto",O?G=1.02:(G=1,Z="right")),a.coerce(g,m,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:G}},"x"),a.coerce(g,m,{y:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:$}},"y"),y("traceorder",T),n.isGrouped(h[c])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick");let J=y("groupclick");y("groupdoubleclick",J),y("xanchor",Z),y("yanchor",X),y("maxheight"),y("valign"),a.noneOrAll(g,m,["x","y"]);var N=y("title.text");if(N){y("title.side",L?"left":"top");var H=a.extendFlat({},_,{size:a.bigFont(_.size)});a.coerceFont(y,"title.font",H);let W=p>1;y("titleclick",W?"toggle":!1),y("titledoubleclick",W?"toggleothers":!1)}}r.exports=function(f,h,d){var p,g=d.slice(),m=h.shapes;if(m)for(p=0;pxe.showlegend||xe.legendgroup);var v=y.concat(_),x=d.trace;x._isShape&&(x=h.shapes[x.index]);var E=x.legendgroup,M,C,w,k,T,b,S={},A=[],F=[],D=[];function R(xe,he){var oe=A.indexOf(xe),te=S.visible;return te||(te=S.visible=[]),A.indexOf(xe)===-1&&(A.push(xe),oe=A.length-1),te[oe]=he,oe}var P=(h.shapes||[]).map(function(xe){return xe._input}),z=!1;function I(xe,he){P[xe].visible=he,z=!0}function L(xe,he){if(!(d.groupTitle&&!g)){var oe=xe._isShape,te=xe.index;te===void 0&&(te=xe._index);var ie=xe.visible===!1?!1:he;oe?I(te,ie):R(te,ie)}}var B=x.legend;if(!x._isShape&&r.traceIs(x,"pie-like")){var O=d.label,G=m.indexOf(O);if(c==="toggle")G===-1?m.push(O):m.splice(G,1);else if(c==="toggleothers"){var $=G!==-1,X=[];for(M=0;MC.showlegend||C.legendgroup),p=f.concat(d);function g(C){return(C.legend||"legend")===h}var m,y;if(u==="toggle")m=!p.some(function(w){return g(w)&&w.visible===!0}),y=!1;else{let C=p.some(function(w){return!g(w)&&w.visible===!0&&w.showlegend!==!1});m=!0,y=!C}let _={visible:[]},v=[],x=(c.shapes||[]).map(function(C){return C._input});for(var E=!1,M=0;Mz&&(R=z)}F[_][0]._groupMinRank=R,F[_][0]._preGroupSort=_}var I=function(X,Z){return X[0]._groupMinRank-Z[0]._groupMinRank||X[0]._preGroupSort-Z[0]._preGroupSort},L=function(X,Z){var J=t(X.trace.legendrank)?X.trace.legendrank[X.i]:X.trace.legendrank,N=t(Z.trace.legendrank)?Z.trace.legendrank[Z.i]:Z.trace.legendrank;return J-N||X._preSort-Z._preSort};for(F.forEach(function(X,Z){X[0]._preGroupSort=Z}),F.sort(I),_=0;_0)V=H.width;else return 0;return T?U:Math.min(V,W)};M.each(function(N){var H=t.select(this),W=i.ensureSingle(H,"g","layers");W.style("opacity",N[0].trace.opacity);var U=w.indentation,V=w.valign,j=N[0].lineHeight,q=N[0].height;if(V==="middle"&&U===0||!j||!q)W.attr("transform",null);else{var Y={top:1,bottom:-1}[V],K=Y*(.5*(j-q+3))||0,re=w.indentation;W.attr("transform",o(re,K))}var se=W.selectAll("g.legendfill").data([N]);se.enter().append("g").classed("legendfill",!0);var le=W.selectAll("g.legendlines").data([N]);le.enter().append("g").classed("legendlines",!0);var ue=W.selectAll("g.legendsymbols").data([N]);ue.enter().append("g").classed("legendsymbols",!0),ue.selectAll("g.legendpoints").data([N]).enter().append("g").classed("legendpoints",!0)}).each(J).each(P).each(I).each(z).each(B).each(X).each($).each(D).each(R).each(O).each(G);function D(N){var H=v(N),W=H.showFill,U=H.showLine,V=H.showGradientLine,j=H.showGradientFill,q=H.anyFill,Y=H.anyLine,K=N[0],re=K.trace,se,le,ue=n(re),fe=ue.colorscale,pe=ue.reversescale,we=function(ce){if(ce.size())if(W)s.fillGroupStyle(ce,C,!0);else{var _e="legendfill-"+re.uid;s.gradient(ce,C,_e,_(pe),fe,"fill")}},xe=function(ce){if(ce.size()){var _e="legendline-"+re.uid;s.lineGroupStyle(ce),s.gradient(ce,C,_e,_(pe),fe,"stroke")}},he=u.hasMarkers(re)||!q?"M5,0":Y?"M5,-2":"M5,-3",oe=t.select(this),te=oe.select(".legendfill").selectAll("path").data(W||j?[N]:[]);if(te.enter().append("path").classed("js-fill",!0),te.exit().remove(),te.attr("d",he+"h"+b+"v6h-"+b+"z").call(we),U||V){var ie=F(void 0,re.line,m,p);le=i.minExtend(re,{line:{width:ie}}),se=[i.minExtend(K,{trace:le})]}var ee=oe.select(".legendlines").selectAll("path").data(U||V?[se]:[]);ee.enter().append("path").classed("js-line",!0),ee.exit().remove(),ee.attr("d",he+(V?"l"+b+",0.0001":"h"+b)).call(U?s.lineGroupStyle:xe)}function R(N){var H=v(N),W=H.anyFill,U=H.anyLine,V=H.showLine,j=H.showMarker,q=N[0],Y=q.trace,K=!j&&!U&&!W&&u.hasText(Y),re,se;function le(ie,ee,ce,_e){var Se=i.nestedProperty(Y,ie).get(),Me=i.isArrayOrTypedArray(Se)&&ee?ee(Se):Se;if(T&&Me&&_e!==void 0&&(Me=_e),ce){if(Mece[1])return ce[1]}return Me}function ue(ie){return q._distinct&&q.index&&ie[q.index]?ie[q.index]:ie[0]}if(j||K||V){var fe={},pe={};if(j){fe.mc=le("marker.color",ue);var we=Y.type==="scattermap";fe.mx=we?"circle":le("marker.symbol",ue),fe.mo=le("marker.opacity",i.mean,[.2,1]),fe.mlc=le("marker.line.color",ue),fe.mlw=le("marker.line.width",i.mean,[0,5],g),fe.mld=le("marker.line.dash",ue),pe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var xe=le("marker.size",i.mean,[2,16],d);fe.ms=xe,pe.marker.size=xe}V&&(pe.line={width:le("line.width",ue,[0,10],p)}),K&&(fe.tx="Aa",fe.tp=le("textposition",ue),fe.ts=10,fe.tc=le("textfont.color",ue),fe.tf=le("textfont.family",ue),fe.tw=le("textfont.weight",ue),fe.ty=le("textfont.style",ue),fe.tv=le("textfont.variant",ue),fe.tC=le("textfont.textcase",ue),fe.tE=le("textfont.lineposition",ue),fe.tS=le("textfont.shadow",ue)),re=[i.minExtend(q,fe)],se=i.minExtend(Y,pe),se.selectedpoints=null,se.texttemplate=null}var he=t.select(this).select("g.legendpoints"),oe=he.selectAll("path.scatterpts").data(j?re:[]);oe.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",A),oe.exit().remove(),oe.call(s.pointStyle,se,C),j&&(re[0].mrc=3);var te=he.selectAll("g.pointtext").data(K?re:[]);te.enter().append("g").classed("pointtext",!0).append("text").attr("transform",A),te.exit().remove(),te.selectAll("text").call(s.textPointStyle,se,C)}function P(N){var H=N[0].trace,W=H.type==="waterfall";if(N[0]._distinct&&W){var U=N[0].trace[N[0].dir].marker;return N[0].mc=U.color,N[0].mlw=U.line.width,N[0].mlc=U.line.color,L(N,this,"waterfall")}var V=[];H.visible&&W&&(V=N[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 j=t.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(V);j.enter().append("path").classed("legendwaterfall",!0).attr("transform",A).style("stroke-miterlimit",1),j.exit().remove(),j.each(function(q){var Y=t.select(this),K=H[q[0]].marker,re=F(void 0,K.line,y,g);Y.attr("d",q[1]).style("stroke-width",re+"px").call(l.fill,K.color),re&&Y.call(l.stroke,K.line.color)})}function z(N){L(N,this)}function I(N){L(N,this,"funnel")}function L(N,H,W){var U=N[0].trace,V=U.marker||{},j=V.line||{},q=V.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",Y=W?U.visible&&U.type===W:a.traceIs(U,"bar"),K=t.select(H).select("g.legendpoints").selectAll("path.legend"+W).data(Y?[N]:[]);K.enter().append("path").classed("legend"+W,!0).attr("d",q).attr("transform",A),K.exit().remove(),K.each(function(re){var se=t.select(this),le=re[0],ue=F(le.mlw,V.line,y,g);se.style("stroke-width",ue+"px");var fe=le.mcc;if(!w._inHover&&"mc"in le){var pe=n(V),we=pe.mid;we===void 0&&(we=(pe.max+pe.min)/2),fe=s.tryColorscale(V,"")(we)}var xe=fe||le.mc||V.color,he=V.pattern,oe=s.getPatternAttr,te=he&&(oe(he.shape,0,"")||oe(he.path,0,""));if(te){var ie=oe(he.bgcolor,0,null),ee=oe(he.fgcolor,0,null),ce=he.fgopacity,_e=x(he.size,8,10),Se=x(he.solidity,.5,1),Me="legend-"+U.uid;se.call(s.pattern,"legend",C,Me,te,_e,Se,fe,he.fillmode,ie,ee,ce)}else se.call(l.fill,xe);ue&&l.stroke(se,le.mlc||j.color)})}function B(N){var H=N[0].trace,W=t.select(this).select("g.legendpoints").selectAll("path.legendbox").data(H.visible&&a.traceIs(H,"box-violin")?[N]:[]);W.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",A),W.exit().remove(),W.each(function(){var U=t.select(this);if((H.boxpoints==="all"||H.points==="all")&&l.opacity(H.fillcolor)===0&&l.opacity((H.line||{}).color)===0){var V=i.minExtend(H,{marker:{size:T?d:i.constrain(H.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});W.call(s.pointStyle,V,C)}else{var j=F(void 0,H.line,y,g);U.style("stroke-width",j+"px").call(l.fill,H.fillcolor),j&&l.stroke(U,H.line.color)}})}function O(N){var H=N[0].trace,W=t.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(H.visible&&H.type==="candlestick"?[N,N]:[]);W.enter().append("path").classed("legendcandle",!0).attr("d",function(U,V){return V?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",A).style("stroke-miterlimit",1),W.exit().remove(),W.each(function(U,V){var j=t.select(this),q=H[V?"increasing":"decreasing"],Y=F(void 0,q.line,y,g);j.style("stroke-width",Y+"px").call(l.fill,q.fillcolor),Y&&l.stroke(j,q.line.color)})}function G(N){var H=N[0].trace,W=t.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(H.visible&&H.type==="ohlc"?[N,N]:[]);W.enter().append("path").classed("legendohlc",!0).attr("d",function(U,V){return V?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",A).style("stroke-miterlimit",1),W.exit().remove(),W.each(function(U,V){var j=t.select(this),q=H[V?"increasing":"decreasing"],Y=F(void 0,q.line,y,g);j.style("fill","none").call(s.dashLine,q.line.dash,Y),Y&&l.stroke(j,q.line.color)})}function $(N){Z(N,this,"pie")}function X(N){Z(N,this,"funnelarea")}function Z(N,H,W){var U=N[0],V=U.trace,j=W?V.visible&&V.type===W:a.traceIs(V,W),q=t.select(H).select("g.legendpoints").selectAll("path.legend"+W).data(j?[N]:[]);if(q.enter().append("path").classed("legend"+W,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",A),q.exit().remove(),q.size()){var Y=V.marker||{},K=F(f(Y.line.width,U.pts),Y.line,y,g),re="pieLike",se=i.minExtend(V,{marker:{line:{width:K}}},re),le=i.minExtend(U,{trace:se},re);c(q,le,se,C)}}function J(N){var H=N[0].trace,W,U=[];if(H.visible)switch(H.type){case"histogram2d":case"heatmap":U=[["M-15,-2V4H15V-2Z"]],W=!0;break;case"choropleth":case"choroplethmap":U=[["M-6,-6V6H6V-6Z"]],W=!0;break;case"densitymap":U=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],W="radial";break;case"cone":U=[["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"]],W=!1;break;case"streamtube":U=[["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"]],W=!1;break;case"surface":U=[["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"]],W=!0;break;case"mesh3d":U=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],W=!1;break;case"volume":U=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],W=!0;break;case"isosurface":U=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],W=!1;break}var V=t.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(U);V.enter().append("path").classed("legend3dandfriends",!0).attr("transform",A).style("stroke-miterlimit",1),V.exit().remove(),V.each(function(j,q){var Y=t.select(this),K=n(H),re=K.colorscale,se=K.reversescale,le=function(we){if(we.size()){var xe="legendfill-"+H.uid;s.gradient(we,C,xe,_(se,W==="radial"),re,"fill")}},ue;if(re){if(!W){var pe=re.length;ue=q===0?re[se?pe-1:0][1]:q===1?re[se?0:pe-1][1]:re[Math.floor((pe-1)/2)][1]}}else{var fe=H.vertexcolor||H.facecolor||H.color;ue=i.isArrayOrTypedArray(fe)?fe[q]||fe[0]:fe}Y.attr("d",j[0]),ue?Y.call(l.fill,ue):Y.call(le)})}};function _(E,M){var C=M?"radial":"horizontal";return C+(E?"":"reversed")}function v(E){var M=E[0].trace,C=M.contours,w=u.hasLines(M)||M.visible&&M.type==="quiver",k=u.hasMarkers(M),T=M.visible&&M.fill&&M.fill!=="none",b=!1,S=!1;if(C){var A=C.coloring;A==="lines"?b=!0:w=A==="none"||A==="heatmap"||C.showlines,C.type==="constraint"?T=C._operation!=="=":(A==="fill"||A==="heatmap")&&(S=!0)}return{showMarker:k,showLine:w,showFill:T,showGradientLine:b,showGradientFill:S,anyLine:w||b,anyFill:T||S}}function x(E,M,C){return E&&i.isArrayOrTypedArray(E)?M:E>C?C:E}}}),a9=ye({"src/components/legend/draw.js"(e,r){"use strict";var t=ai(),a=Yt(),i=ws(),o=li(),s=py(),l=_f(),n=$i(),u=Ya(),c=Go(),f=e9().handleItemClick,h=e9().handleTitleClick,d=t9(),p=Yl(),g=p.LINE_SPACING,m=p.FROM_TL,y=p.FROM_BR,_=Zee(),v=r9(),x=Yx(),E=1,M=/^legend[0-9]*$/;r.exports=function(G,$){if($)w(G,$);else{var X=G._fullLayout,Z=X._legends,J=X._infolayer.selectAll('[class^="legend"]');J.each(function(){var U=t.select(this),V=U.attr("class"),j=V.split(" ")[0];j.match(M)&&Z.indexOf(j)===-1&&U.remove()});for(var N=0;N1)}var K=X.hiddenlabels||[];if(!H&&(!X.showlegend||!W.length))return N.selectAll("."+Z).remove(),X._topdefs.select("#"+J).remove(),i.autoMargin(O,Z);var re=a.ensureSingle(N,"g",Z,function(oe){H||oe.attr("pointer-events","all")}),se=a.ensureSingleById(X._topdefs,"clipPath",J,function(oe){oe.append("rect")}),le=a.ensureSingle(re,"rect","bg",function(oe){oe.attr("shape-rendering","crispEdges")});le.call(u.stroke,$.bordercolor).call(u.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px");var ue=a.ensureSingle(re,"g","scrollbox"),fe=$.title;$._titleWidth=0,$._titleHeight=0;var pe;fe.text?(pe=a.ensureSingle(ue,"text",Z+"titletext"),pe.attr("text-anchor","start").call(n.font,fe.font).text(fe.text),D(pe,ue,O,$,E),!H&&($.titleclick||$.titledoubleclick)&&F(ue,O,$,Z)):(ue.selectAll("."+Z+"titletext").remove(),ue.selectAll("."+Z+"titletoggle").remove());var we=a.ensureSingle(re,"rect","scrollbar",function(oe){oe.attr(d.scrollBarEnterAttrs).call(u.fill,d.scrollBarColor)}),xe=ue.selectAll("g.groups").data(W);xe.enter().append("g").attr("class","groups"),xe.exit().remove();var he=xe.selectAll("g.traces").data(a.identity);he.enter().append("g").attr("class","traces"),he.exit().remove(),he.style("opacity",function(oe){let te=oe[0],ie=te.trace;if(te.groupTitle){let ee=ie.legendgroup,ce=(X.shapes||[]).filter(function(Se){return Se.showlegend});return O._fullData.concat(ce).some(function(Se){return Se.legendgroup===ee&&(Se.legend||"legend")===Z&&Se.visible===!0})?1:.5}return o.traceIs(ie,"pie-like")?K.indexOf(oe[0].label)!==-1?.5:1:ie.visible==="legendonly"?.5:1}).each(function(){t.select(this).call(b,O,$)}).call(v,O,$).each(function(oe){H||oe[0].groupTitle&&$.groupclick==="toggleitem"||t.select(this).call(A,O,Z)}),a.syncOrAsync([i.previousPromises,function(){return z(O,xe,he,$,ue)},function(){var oe=X._size,te=$.borderwidth,ie=$.xref==="paper",ee=$.yref==="paper";if(fe.text){let qe=(X.shapes||[]).filter(function(tt){return tt.showlegend}),at=O._fullData.concat(qe).some(function(tt){let ct=tt.legend||"legend";var At=Array.isArray(ct)?ct.includes(Z):ct===Z;return At&&tt.visible===!0});pe.style("opacity",at?1:.5)}if(!H){var ce,_e;ie?ce=oe.l+oe.w*$.x-m[L($)]*$._width:ce=X.width*$.x-m[L($)]*$._width,ee?_e=oe.t+oe.h*(1-$.y)-m[B($)]*$._effHeight:_e=X.height*(1-$.y)-m[B($)]*$._effHeight;var Se=I(O,Z,ce,_e);if(Se)return;if(X.margin.autoexpand){var Me=ce,Ue=_e;ce=ie?a.constrain(ce,0,X.width-$._width):Me,_e=ee?a.constrain(_e,0,X.height-$._effHeight):Ue,ce!==Me&&a.log("Constrain "+Z+".x to make legend fit inside graph"),_e!==Ue&&a.log("Constrain "+Z+".y to make legend fit inside graph")}n.setTranslate(re,ce,_e)}if(we.on(".drag",null),re.on("wheel",null),H||$._height<=$._maxHeight||O._context.staticPlot){var Ge=$._effHeight;H&&(Ge=$._height),le.attr({width:$._width-te,height:Ge-te,x:te/2,y:te/2}),n.setTranslate(ue,0,0),se.select("rect").attr({width:$._width-2*te,height:Ge-2*te,x:te,y:te}),n.setClipUrl(ue,J,O),n.setRect(we,0,0,0,0),delete $._scrollY}else{var Ze=Math.max(d.scrollBarMinHeight,$._effHeight*$._effHeight/$._height),Ke=$._effHeight-Ze-2*d.scrollBarMargin,dt=$._height-$._effHeight,_t=Ke/dt,Pt=Math.min($._scrollY||0,dt);le.attr({width:$._width-2*te+d.scrollBarWidth+d.scrollBarMargin,height:$._effHeight-te,x:te/2,y:te/2}),se.select("rect").attr({width:$._width-2*te+d.scrollBarWidth+d.scrollBarMargin,height:$._effHeight-2*te,x:te,y:te+Pt}),n.setClipUrl(ue,J,O),Ee(Pt,Ze,_t),re.on("wheel",function(){Pt=a.constrain($._scrollY+t.event.deltaY/dt*Ke,0,dt),Ee(Pt,Ze,_t),Pt!==0&&Pt!==dt&&t.event.preventDefault()});var vt,Tt,st,Ve=function(qe,at,tt){var ct=(tt-at)/_t+qe;return a.constrain(ct,0,dt)},Ye=function(qe,at,tt){var ct=(at-tt)/_t+qe;return a.constrain(ct,0,dt)},me=t.behavior.drag().on("dragstart",function(){var qe=t.event.sourceEvent;qe.type==="touchstart"?vt=qe.changedTouches[0].clientY:vt=qe.clientY,st=Pt}).on("drag",function(){var qe=t.event.sourceEvent;qe.buttons===2||qe.ctrlKey||(qe.type==="touchmove"?Tt=qe.changedTouches[0].clientY:Tt=qe.clientY,Pt=Ve(st,vt,Tt),Ee(Pt,Ze,_t))});we.call(me);var be=t.behavior.drag().on("dragstart",function(){var qe=t.event.sourceEvent;qe.type==="touchstart"&&(vt=qe.changedTouches[0].clientY,st=Pt)}).on("drag",function(){var qe=t.event.sourceEvent;qe.type==="touchmove"&&(Tt=qe.changedTouches[0].clientY,Pt=Ye(st,vt,Tt),Ee(Pt,Ze,_t))});ue.call(be)}function Ee(qe,at,tt){$._scrollY=O._fullLayout[Z]._scrollY=qe,n.setTranslate(ue,0,-qe),n.setRect(we,$._width,d.scrollBarMargin+qe*tt,d.scrollBarWidth,at),se.select("rect").attr("y",te+qe)}if(O._context.edits.legendPosition){var De,Ce,Fe,Je;re.classed("cursor-move",!0),l.init({element:re.node(),gd:O,prepFn:function(qe){if(qe.target!==we.node()){var at=n.getTranslate(re);Fe=at.x,Je=at.y}},moveFn:function(qe,at){if(Fe!==void 0&&Je!==void 0){var tt=Fe+qe,ct=Je+at;n.setTranslate(re,tt,ct),De=l.align(tt,$._width,oe.l,oe.l+oe.w,$.xanchor),Ce=l.align(ct+$._height,-$._height,oe.t+oe.h,oe.t,$.yanchor)}},doneFn:function(){if(De!==void 0&&Ce!==void 0){var qe={};qe[Z+".x"]=De,qe[Z+".y"]=Ce,o.call("_guiRelayout",O,qe)}},clickFn:function(qe,at){var tt=N.selectAll("g.traces").filter(function(){var ct=this.getBoundingClientRect();return at.clientX>=ct.left&&at.clientX<=ct.right&&at.clientY>=ct.top&&at.clientY<=ct.bottom});tt.size()>0&&T(O,$,tt,qe,at)}})}}],O)}}function k(O,G,$){var X=O[0],Z=X.width,J=G.entrywidthmode,N=X.trace.legendwidth||G.entrywidth;return J==="fraction"?G._maxWidth*N:$+(N||Z)}function T(O,G,$,X,Z){var J=O._fullLayout,N=$.data()[0][0].trace,H=G.itemclick,W=G.itemdoubleclick,U={event:Z,node:$.node(),curveNumber:N.index,expandedIndex:N.index,data:O.data,layout:O.layout,frames:O._transitionData._frames,config:O._context,fullData:O._fullData,fullLayout:J};N._group&&(U.group=N._group),o.traceIs(N,"pie-like")&&(U.label=$.datum()[0].label);var V=s.triggerHandler(O,"plotly_legendclick",U);if(X===1){if(V===!1)return;G._clickTimeout=setTimeout(function(){O._fullLayout&&H&&f($,O,G,H,X)},O._context.doubleClickDelay)}else if(X===2){G._clickTimeout&&clearTimeout(G._clickTimeout),O._legendMouseDownTime=0;var j=s.triggerHandler(O,"plotly_legenddoubleclick",U);j!==!1&&V!==!1&&W&&f($,O,G,W,X)}}function b(O,G,$){var X=x.getId($),Z=O.data()[0][0],J=Z.trace,N=o.traceIs(J,"pie-like"),H=!$._inHover&&G._context.edits.legendText&&!N,W=$._maxNameLength,U,V;Z.groupTitle?(U=Z.groupTitle.text,V=Z.groupTitle.font):(V=$.font,$.entries?U=Z.text:(U=N?Z.label:J.name,J._meta&&(U=a.templateString(U,J._meta))));var j=a.ensureSingle(O,"text",X+"text");j.attr("text-anchor","start").call(n.font,V).text(H?S(U,W):U);var q=$.indentation+$.itemwidth+d.itemGap*2;c.positionText(j,q,0),H?j.call(c.makeEditable,{gd:G,text:U}).call(D,O,G,$).on("edit",function(Y){this.text(S(Y,W)).call(D,O,G,$);var K={};return K.name=Y,Z.trace._isShape?o.call("_guiRelayout",G,"shapes["+J.index+"].name",K.name):o.call("_guiRestyle",G,K,J.index)}):D(j,O,G,$)}function S(O,G){var $=Math.max(4,G);if(O&&O.trim().length>=$/2)return O;O=O||"";for(var X=$-O.length;X>0;X--)O+=" ";return O}function A(O,G,$){var X=G._context.doubleClickDelay,Z,J=1,N=a.ensureSingle(O,"rect",$+"toggle",function(H){G._context.staticPlot||H.style("cursor","pointer").attr("pointer-events","all"),H.call(u.fill,"rgba(0,0,0,0)")});G._context.staticPlot||(N.on("mousedown",function(){Z=new Date().getTime(),Z-G._legendMouseDownTimeX&&(J=Math.max(J-1,1)),T(G,H,O,J,t.event)}}))}function F(O,G,$,X){if(G._fullData.some(function(U){let V=U.legend||"legend";return(Array.isArray(V)?V.includes(X):V===X)&&o.traceIs(U,"pie-like")}))return;let J=G._context.doubleClickDelay;var N,H=1;let W=a.ensureSingle(O,"rect",X+"titletoggle",function(U){G._context.staticPlot||U.style("cursor","pointer").attr("pointer-events","all"),U.call(u.fill,"rgba(0,0,0,0)")});G._context.staticPlot||(W.on("mousedown",function(){N=new Date().getTime(),N-G._legendMouseDownTimeJ&&(H=Math.max(H-1,1));let U={event:t.event,legendId:X,data:G.data,layout:G.layout,fullData:G._fullData,fullLayout:G._fullLayout};if(H===1&&$.titleclick){if(s.triggerHandler(G,"plotly_legendtitleclick",U)===!1)return;$._titleClickTimeout=setTimeout(function(){G._fullLayout&&h(G,$,$.titleclick)},J)}else H===2&&($._titleClickTimeout&&clearTimeout($._titleClickTimeout),G._legendMouseDownTime=0,s.triggerHandler(G,"plotly_legendtitledoubleclick",U)!==!1&&$.titledoubleclick&&h(G,$,$.titledoubleclick))}))}function D(O,G,$,X,Z){X._inHover&&O.attr("data-notex",!0),c.convertToTspans(O,$,function(){R(G,$,X,Z)})}function R(O,G,$,X){var Z=O.data()[0][0],J=Z&&Z.trace.showlegend;if(Array.isArray(J)&&(J=J[Z.i]!==!1),!$._inHover&&Z&&!J){O.remove();return}var N=O.select("g[class*=math-group]"),H=N.node(),W=x.getId($);$||($=G._fullLayout[W]);var U=$.borderwidth,V;X===E?V=$.title.font:Z.groupTitle?V=Z.groupTitle.font:V=$.font;var j=V.size*g,q,Y;if(H){var K=n.bBox(H);q=K.height,Y=K.width,X===E?n.setTranslate(N,U,U+q*.75):n.setTranslate(N,0,q*.25)}else{var re="."+W+(X===E?"title":"")+"text",se=O.select(re),le=c.lineCount(se),ue=se.node();if(q=j*le,Y=ue?n.bBox(ue).width:0,X===E)$.title.side==="left"&&(Y+=d.itemGap*2),c.positionText(se,U+d.titlePad,U+j);else{var fe=d.itemGap*2+$.indentation+$.itemwidth;Z.groupTitle&&(fe=d.itemGap,Y-=$.indentation+$.itemwidth),c.positionText(se,fe,-j*((le-1)/2-.3))}}X===E?($._titleWidth=Y,$._titleHeight=q):(Z.lineHeight=j,Z.height=Math.max(q,16)+3,Z.width=Y)}function P(O){var G=0,$=0,X=O.title.side;return X&&(X.indexOf("left")!==-1&&(G=O._titleWidth),X.indexOf("top")!==-1&&($=O._titleHeight)),[G,$]}function z(O,G,$,X,Z){var J=O._fullLayout,N=x.getId(X);X||(X=J[N]);var H=J._size,W=x.isVertical(X),U=x.isGrouped(X),V=X.entrywidthmode==="fraction",j=X.borderwidth,q=2*j,Y=d.itemGap,K=X.indentation+X.itemwidth+Y*2,re=2*(j+Y),se=B(X),le=X.y<0||X.y===0&&se==="top",ue=X.y>1||X.y===1&&se==="bottom",fe=X.tracegroupgap,pe={};let{orientation:we,yref:xe}=X,{maxheight:he}=X,oe=le||ue||we!=="v"||xe!=="paper";he||(he=oe?.5:1);let te=oe?J.height:H.h;X._maxHeight=Math.max(he>1?he:he*te,30);var ie=0;X._width=0,X._height=0;var ee=P(X);if(W)$.each(function(qe){var at=qe[0].height;n.setTranslate(this,j+ee[0],j+ee[1]+X._height+at/2+Y),X._height+=at,X._width=Math.max(X._width,qe[0].width)}),ie=K+X._width,X._width+=Y+K+q,X._height+=re,U&&(G.each(function(qe,at){n.setTranslate(this,0,at*X.tracegroupgap)}),X._height+=(X._lgroupsLength-1)*X.tracegroupgap);else{var ce=L(X),_e=X.x<0||X.x===0&&ce==="right",Se=X.x>1||X.x===1&&ce==="left",Me=ue||le,Ue=J.width/2;X._maxWidth=Math.max(_e?Me&&ce==="left"?H.l+H.w:Ue:Se?Me&&ce==="right"?H.r+H.w:Ue:H.w,2*K);var Ge=0,Ze=0;$.each(function(qe){var at=k(qe,X,K);Ge=Math.max(Ge,at),Ze+=at}),ie=null;var Ke=0;if(U){var dt=0,_t=0,Pt=0;G.each(function(){var qe=0,at=0;t.select(this).selectAll("g.traces").each(function(ct){var At=k(ct,X,K),ft=ct[0].height;n.setTranslate(this,ee[0],ee[1]+j+Y+ft/2+at),at+=ft,qe=Math.max(qe,At),pe[ct[0].trace.legendgroup]=qe});var tt=qe+Y;_t>0&&tt+j+_t>X._maxWidth?(Ke=Math.max(Ke,_t),_t=0,Pt+=dt+fe,dt=at):dt=Math.max(dt,at),n.setTranslate(this,_t,Pt),_t+=tt}),X._width=Math.max(Ke,_t)+j,X._height=Pt+dt+re}else{var vt=$.size(),Tt=Ze+q+(vt-1)*Y=X._maxWidth&&(Ke=Math.max(Ke,me),Ve=0,Ye+=st,X._height+=st,st=0),n.setTranslate(this,ee[0]+j+Ve,ee[1]+j+Ye+at/2+Y),me=Ve+tt+Y,Ve+=ct,st=Math.max(st,at)}),Tt?(X._width=Ve+q,X._height=st+re):(X._width=Math.max(Ke,me)+q,X._height+=st+re)}}X._width=Math.ceil(Math.max(X._width+ee[0],X._titleWidth+2*(j+d.titlePad))),X._height=Math.ceil(Math.max(X._height+ee[1],X._titleHeight+2*(j+d.itemGap))),X._effHeight=Math.min(X._height,X._maxHeight);var be=O._context.edits,Ee=be.legendText||be.legendPosition;$.each(function(qe){var at=t.select(this).select("."+N+"toggle"),tt=qe[0].height,ct=qe[0].trace.legendgroup,At=k(qe,X,K);U&&ct!==""&&(At=pe[ct]);var ft=Ee?K:ie||At;!W&&!V&&(ft+=Y/2),n.setRect(at,0,-tt/2,ft,tt)});var De=Z.select("."+N+"titletext");De.node()&&C(De,X,j);var Ce=Z.select("."+N+"titletoggle");if(Ce.size()&&De.node()){var Fe=De.attr("x")||0,Je=d.titlePad;n.setRect(Ce,Fe-Je,j,X._titleWidth+2*Je,X._titleHeight+2*Je)}}function I(O,G,$,X){var Z=O._fullLayout,J=Z[G],N=L(J),H=B(J),W=J.xref==="paper",U=J.yref==="paper";O._fullLayout._reservedMargin[G]={};var V=J.y<.5?"b":"t",j=J.x<.5?"l":"r",q={r:Z.width-$,l:$+J._width,b:Z.height-X,t:X+J._effHeight};if(W&&U)return i.autoMargin(O,G,{x:J.x,y:J.y,l:J._width*m[N],r:J._width*y[N],b:J._effHeight*y[H],t:J._effHeight*m[H]});W?O._fullLayout._reservedMargin[G][V]=q[V]:U||J.orientation==="v"?O._fullLayout._reservedMargin[G][j]=q[j]:O._fullLayout._reservedMargin[G][V]=q[V]}function L(O){return a.isRightAnchor(O)?"right":a.isCenterAnchor(O)?"center":"left"}function B(O){return a.isBottomAnchor(O)?"bottom":a.isMiddleAnchor(O)?"middle":"top"}}}),i9=ye({"src/components/fx/hover.js"(e){"use strict";var r=ai(),t=en(),a=Yt(),i=a.pushUnique,o=a.strTranslate,s=a.strRotate,l=py(),n=Go(),u=Xee(),c=$i(),f=Ya(),h=_f(),d=qi(),p=$l().zindexSeparator,g=li(),m=Bf(),y=qx(),_=QD(),v=a9(),x=y.YANGLE,E=Math.PI*x/180,M=1/Math.sin(E),C=Math.cos(E),w=Math.sin(E),k=y.HOVERARROWSIZE,T=y.HOVERTEXTPAD,b={box:!0,ohlc:!0,violin:!0,candlestick:!0},S={scatter:!0,scattergl:!0,splom:!0};function A(j,q){return j.distance-q.distance}e.hover=function(q,Y,K,re){q=a.getGraphDiv(q);var se=Y.target;a.throttle(q._fullLayout._uid+y.HOVERID,y.HOVERMINTIME,function(){F(q,Y,K,re,se)})},e.loneHover=function(q,Y){var K=!0;Array.isArray(q)||(K=!1,q=[q]);var re=Y.gd,se=W(re),le=U(re),ue=q.map(function(ee){var ce=ee._x0||ee.x0||ee.x||0,_e=ee._x1||ee.x1||ee.x||0,Se=ee._y0||ee.y0||ee.y||0,Me=ee._y1||ee.y1||ee.y||0,Ue=ee.eventData;if(Ue){var Ge=Math.min(ce,_e),Ze=Math.max(ce,_e),Ke=Math.min(Se,Me),dt=Math.max(Se,Me),_t=ee.trace;if(g.traceIs(_t,"gl3d")){var Pt=re._fullLayout[_t.scene]._scene.container,vt=Pt.offsetLeft,Tt=Pt.offsetTop;Ge+=vt,Ze+=vt,Ke+=Tt,dt+=Tt}Ue.bbox={x0:Ge+le,x1:Ze+le,y0:Ke+se,y1:dt+se},Ue.xPixel=(ce+_e)/2,Ue.yPixel=(Se+Me)/2,Y.inOut_bbox&&Y.inOut_bbox.push(Ue.bbox)}else Ue=!1;return{color:ee.color||f.defaultLine,x0:ee.x0||ee.x||0,x1:ee.x1||ee.x||0,y0:ee.y0||ee.y||0,y1:ee.y1||ee.y||0,xLabel:ee.xLabel,yLabel:ee.yLabel,zLabel:ee.zLabel,text:ee.text,name:ee.name,idealAlign:ee.idealAlign,borderColor:ee.borderColor,fontFamily:ee.fontFamily,fontSize:ee.fontSize,fontColor:ee.fontColor,fontWeight:ee.fontWeight,fontStyle:ee.fontStyle,fontVariant:ee.fontVariant,nameLength:ee.nameLength,textAlign:ee.textAlign,trace:ee.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:ee.hovertemplate||!1,hovertemplateLabels:ee.hovertemplateLabels||!1,eventData:Ue}}),fe=!1,pe=P(ue,{gd:re,hovermode:"closest",rotateLabels:fe,bgColor:Y.bgColor||f.background,container:r.select(Y.container),outerContainer:Y.outerContainer||Y.container}),we=pe.hoverLabels,xe=5,he=0,oe=0;we.sort(function(ee,ce){return ee.y0-ce.y0}).each(function(ee,ce){var _e=ee.y0-ee.by/2;_e-xeZe[0]._length||St<0||St>Ke[0]._length)return h.unhoverRaw(j,q)}if(q.pointerX=gt+Ze[0]._offset,q.pointerY=St+Ke[0]._offset,"xval"in q?Ye=m.flat(se,q.xval):Ye=m.p2c(Ze,gt),"yval"in q?me=m.flat(se,q.yval):me=m.p2c(Ke,St),j._hoverPointerX=q.pointerX,j._hoverPointerY=q.pointerY,!t(Ye[0])||!t(me[0]))return a.warn("Fx.hover failed",q,j),h.unhoverRaw(j,q)}ue.clickanywhere&&(j._hoverXVals=Ye,j._hoverYVals=me,j._hoverXAxes=Ze,j._hoverYAxes=Ke);var Vt=1/0;function lr(pa,_n){for(Ee=0;EeAt&&(st.splice(0,At),Vt=st[0].distance),xe&&Tt!==0&&st.length===0){ct.distance=Tt,ct.index=!1;var un=Ce._module.hoverPoints(ct,at,tt,"closest",{hoverLayer:ue._hoverlayer});if(un&&(un=un.filter(function(Vi){return Vi.spikeDistance<=Tt})),un&&un.length){var jn,bn=un.filter(function(Vi){return Vi.xa.showspikes&&Vi.xa.spikesnap!=="hovered data"});if(bn.length){var Wa=bn[0];t(Wa.x0)&&t(Wa.y0)&&(jn=yr(Wa),(!ft.vLinePoint||ft.vLinePoint.spikeDistance>jn.spikeDistance)&&(ft.vLinePoint=jn))}var ui=un.filter(function(Vi){return Vi.ya.showspikes&&Vi.ya.spikesnap!=="hovered data"});if(ui.length){var Hi=ui[0];t(Hi.x0)&&t(Hi.y0)&&(jn=yr(Hi),(!ft.hLinePoint||ft.hLinePoint.spikeDistance>jn.spikeDistance)&&(ft.hLinePoint=jn))}}}}}lr();function dr(pa,_n,Zi){for(var Fi=null,xn=1/0,Ni,un=0;unpa.trace.index===xi.trace.index):st=[xi];var Yi=st.length,Qr=H("x",xi,ue),Nr=H("y",xi,ue);lr(Qr,Nr);var Oe=[],Ie={},Et=0,Mt=function(pa){var _n=b[pa.trace.type]?D(pa):pa.trace.index;if(!Ie[_n])Et++,Ie[_n]=Et,Oe.push(pa);else{var Zi=Ie[_n]-1,Fi=Oe[Zi];Zi>0&&Math.abs(pa.distance)Yi-1;zt--)Mt(st[zt]);st=Oe,Hr()}var Gt=j._hoverdata,Ht=[],Be=W(j),et=U(j);for(let pa of st){var ut=m.makeEventData(pa,pa.trace,pa.cd);if(pa.hovertemplate!==!1){var bt=!1;pa.cd[pa.index]&&pa.cd[pa.index].ht&&(bt=pa.cd[pa.index].ht),pa.hovertemplate=bt||pa.trace.hovertemplate||!1}if(pa.xa&&pa.ya){var Ot=pa.x0+pa.xa._offset,It=pa.x1+pa.xa._offset,Wt=pa.y0+pa.ya._offset,jt=pa.y1+pa.ya._offset,sr=Math.min(Ot,It),kr=Math.max(Ot,It),Mr=Math.min(Wt,jt),ua=Math.max(Wt,jt);ut.bbox={x0:sr+et,x1:kr+et,y0:Mr+Be,y1:ua+Be},ut.xPixel=(Ot+It)/2,ut.yPixel=(Wt+jt)/2}pa.eventData=[ut],Ht.push(ut)}j._hoverdata=Ht;var ra=he==="y"&&(Ve.length>1||st.length>1)||he==="closest"&&qt&&st.length>1,ni=f.combine(ue.plot_bgcolor||f.background,ue.paper_bgcolor),Ca=P(st,{gd:j,hovermode:he,rotateLabels:ra,bgColor:ni,container:ue._hoverlayer,outerContainer:ue._paper.node(),commonLabelOpts:ue.hoverlabel,hoverdistance:ue.hoverdistance}),Li=Ca.hoverLabels;if(m.isUnifiedHover(he)||(I(Li,ra,ue,Ca.commonLabelBoundingBox),O(Li,ra,ue._invScaleX,ue._invScaleY)),re&&re.tagName){var Va=g.getComponentMethod("annotations","hasClickToShow")(j,Ht);u(r.select(re),Va?"pointer":"")}var dn=X(j,q,Gt);if(!re||K||!dn&&!ue.hoveranywhere)return;Gt&&dn&&j.emit("plotly_unhover",{event:q,points:Gt}),rn(j._hoverdata);function rn(pa){j.emit("plotly_hover",{event:q,points:pa,xaxes:Ze,yaxes:Ke,xvals:m.c2dApply(Ze,Ye),yvals:m.c2dApply(Ke,me),xPixel:q.pointerX,yPixel:q.pointerY})}}function D(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 R=/([\s\S]*)<\/extra>/;function P(j,q){var Y=q.gd,K=Y._fullLayout,re=q.hovermode,se=q.rotateLabels,le=q.bgColor,ue=q.container,fe=q.outerContainer,pe=q.commonLabelOpts||{};if(j.length===0)return[[]];var we=q.fontFamily||y.HOVERFONT,xe=q.fontSize||y.HOVERFONTSIZE,he=q.fontWeight||K.font.weight,oe=q.fontStyle||K.font.style,te=q.fontVariant||K.font.variant,ie=q.fontTextcase||K.font.textcase,ee=q.fontLineposition||K.font.lineposition,ce=q.fontShadow||K.font.shadow,_e=j[0],Se=_e.xa,Me=_e.ya,Ue=re.charAt(0),Ge=Ue+"Label",Ze=_e[Ge];if(Ze===void 0&&Se.type==="multicategory")for(var Ke=0;KeK.width-Ht&&(Be=K.width-Ht),na.attr("d","M"+(Mt-Be)+",0L"+(Mt-Be+k)+","+Gt+k+"H"+Ht+"v"+Gt+(T*2+Et.height)+"H"+-Ht+"V"+Gt+k+"H"+(Mt-Be-k)+"Z"),Mt=Be,Ee.minX=Mt-Ht,Ee.maxX=Mt+Ht,Se.side==="top"?(Ee.minY=zt-(T*2+Et.height),Ee.maxY=zt-T):(Ee.minY=zt+T,Ee.maxY=zt+(T*2+Et.height))}else{var et,ut,bt;Me.side==="right"?(et="start",ut=1,bt="",Mt=Se._offset+Se._length):(et="end",ut=-1,bt="-",Mt=Se._offset),zt=Me._offset+(_e.y0+_e.y1)/2,xi.attr("text-anchor",et),na.attr("d","M0,0L"+bt+k+","+k+"V"+(T+Et.height/2)+"h"+bt+(T*2+Et.width)+"V-"+(T+Et.height/2)+"H"+bt+k+"V-"+k+"Z"),Ee.minY=zt-(T+Et.height/2),Ee.maxY=zt+(T+Et.height/2),Me.side==="right"?(Ee.minX=Mt+k,Ee.maxX=Mt+k+(T*2+Et.width)):(Ee.minX=Mt-k-(T*2+Et.width),Ee.maxX=Mt-k);var Ot=Et.height/2,It=_t-Et.top-Ot,Wt="clip"+K._uid+"commonlabel"+Me._id,jt;if(Mtna.hoverinfo!=="none");if(ia.length===0)return[];var De=K.hoverlabel,Ce=De.font,Fe=ia[0],Je=((re==="x unified"?Fe.xa:Fe.ya).unifiedhovertitle||{}).text,qe=Je?a.hovertemplateString({data:re==="x unified"?[{xa:Fe.xa,x:Fe.xVal}]:[{ya:Fe.ya,y:Fe.yVal}],fallback:Fe.trace.hovertemplatefallback,locale:K._d3locale,template:Je}):Ze,at={showlegend:!0,legend:{title:{text:qe,font:Ce},font:Ce,bgcolor:De.bgcolor,bordercolor:De.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:K.legend?K.legend.traceorder:void 0,orientation:"v"}},tt={font:Ce};_(at,tt,Y._fullData);var ct=tt.legend;ct.entries=[];for(var At=0;At=0?_i=Hr:jr+kt=0?_i=jr:Oa+kt=0?ti=Fr:la+Vt=0?ti=la:Da+Vt=0,(ia.idealAlign==="top"||!Mr)&&ua?(bt-=It/2,ia.anchor="end"):Mr?(bt+=It/2,ia.anchor="start"):ia.anchor="middle",ia.crossPos=bt;else{if(ia.pos=bt,Mr=ut+Ot/2+kr<=Pt,ua=ut-Ot/2-kr>=0,(ia.idealAlign==="left"||!Mr)&&ua)ut-=Ot/2,ia.anchor="end";else if(Mr)ut+=Ot/2,ia.anchor="start";else{ia.anchor="middle";var ra=kr/2,ni=ut+ra-Pt,Ca=ut-ra;ni>0&&(ut-=ni),Ca<0&&(ut+=-Ca)}ia.crossPos=ut}zt.attr("text-anchor",ia.anchor),Ht&&Gt.attr("text-anchor",ia.anchor),na.attr("transform",o(ut,bt)+(se?s(x):""))}),{hoverLabels:Ka,commonLabelBoundingBox:Ee}}function z(j,q,Y,K,re,se){var le,ue,fe="",pe="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=a.templateString(j.name,j.trace._meta)),fe=J(j.name,j.nameLength));var we=Y.charAt(0),xe=we==="x"?"y":"x";j.zLabel!==void 0?(j.xLabel!==void 0&&(pe+="x: "+j.xLabel+"
"),j.yLabel!==void 0&&(pe+="y: "+j.yLabel+"
"),j.trace.type!=="choropleth"&&j.trace.type!=="choroplethmap"&&(pe+=(pe?"z: ":"")+j.zLabel)):q&&j[we+"Label"]===re?pe=j[xe+"Label"]||"":j.xLabel===void 0?j.yLabel!==void 0&&j.trace.type!=="scattercarpet"&&(pe=j.yLabel):j.yLabel===void 0?pe=j.xLabel:pe="("+j.xLabel+", "+j.yLabel+")",(j.text||j.text===0)&&!Array.isArray(j.text)&&(pe+=(pe?"
":"")+j.text),j.extraText!==void 0&&(pe+=(pe?"
":"")+j.extraText),se&&pe===""&&!j.hovertemplate&&(fe===""&&se.remove(),pe=fe),(ue=(le=j.trace)==null?void 0:le.hoverlabel)!=null&&ue.split&&(j.hovertemplate="");let{hovertemplate:he=!1}=j;if(he){let oe=j.hovertemplateLabels||j;j[we+"Label"]!==re&&(oe[we+"other"]=oe[we+"Val"],oe[we+"otherLabel"]=oe[we+"Label"]),pe=a.hovertemplateString({data:[j.eventData[0]||{},j.trace._meta],fallback:j.trace.hovertemplatefallback,labels:oe,locale:K._d3locale,template:he}),pe=pe.replace(R,(te,ie)=>(fe=J(ie,j.nameLength),""))}return[pe,fe]}function I(j,q,Y,K){var re=q?"xa":"ya",se=q?"ya":"xa",le=0,ue=1,fe=j.size(),pe=new Array(fe),we=0,xe=K.minX,he=K.maxX,oe=K.minY,te=K.maxY,ie=function(Ye){return Ye*Y._invScaleX},ee=function(Ye){return Ye*Y._invScaleY};j.each(function(Ye){var me=Ye[re],be=Ye[se],Ee=me._id.charAt(0)==="x",De=me.range;we===0&&De&&De[0]>De[1]!==Ee&&(ue=-1);var Ce=0,Fe=Ee?Y.width:Y.height;if(Y.hovermode==="x"||Y.hovermode==="y"){var Je=L(Ye,q),qe=Ye.anchor,at=qe==="end"?-1:1,tt,ct;if(qe==="middle")tt=Ye.crossPos+(Ee?ee(Je.y-Ye.by/2):ie(Ye.bx/2+Ye.tx2width/2)),ct=tt+(Ee?ee(Ye.by):ie(Ye.bx));else if(Ee)tt=Ye.crossPos+ee(k+Je.y)-ee(Ye.by/2-k),ct=tt+ee(Ye.by);else{var At=ie(at*k+Je.x),ft=At+ie(at*Ye.bx);tt=Ye.crossPos+Math.min(At,ft),ct=Ye.crossPos+Math.max(At,ft)}Ee?oe!==void 0&&te!==void 0&&Math.min(ct,te)-Math.max(tt,oe)>1&&(be.side==="left"?(Ce=be._mainLinePosition,Fe=Y.width):Fe=be._mainLinePosition):xe!==void 0&&he!==void 0&&Math.min(ct,he)-Math.max(tt,xe)>1&&(be.side==="top"?(Ce=be._mainLinePosition,Fe=Y.height):Fe=be._mainLinePosition)}pe[we++]=[{datum:Ye,traceIndex:Ye.trace.index,dp:0,pos:Ye.pos,posref:Ye.posref,size:Ye.by*(Ee?M:1)/2,pmin:Ce,pmax:Fe}]}),pe.sort(function(Ye,me){return Ye[0].posref-me[0].posref||ue*(me[0].traceIndex-Ye[0].traceIndex)});var ce,_e,Se,Me,Ue,Ge,Ze;function Ke(Ye){var me=Ye[0],be=Ye[Ye.length-1];if(_e=me.pmin-me.pos-me.dp+me.size,Se=be.pos+be.dp+be.size-me.pmax,_e>.01){for(Ue=Ye.length-1;Ue>=0;Ue--)Ye[Ue].dp+=_e;ce=!1}if(!(Se<.01)){if(_e<-.01){for(Ue=Ye.length-1;Ue>=0;Ue--)Ye[Ue].dp-=Se;ce=!1}if(ce){var Ee=0;for(Me=0;Meme.pmax&&Ee++;for(Me=Ye.length-1;Me>=0&&!(Ee<=0);Me--)Ge=Ye[Me],Ge.pos>me.pmax-1&&(Ge.del=!0,Ee--);for(Me=0;Me=0;Ue--)Ye[Ue].dp-=Se;for(Me=Ye.length-1;Me>=0&&!(Ee<=0);Me--)Ge=Ye[Me],Ge.pos+Ge.dp+Ge.size>me.pmax&&(Ge.del=!0,Ee--)}}}for(;!ce&&le<=fe;){for(le++,ce=!0,Me=0;Me.01){for(Ue=_t.length-1;Ue>=0;Ue--)_t[Ue].dp+=_e;for(dt.push.apply(dt,_t),pe.splice(Me+1,1),Ze=0,Ue=dt.length-1;Ue>=0;Ue--)Ze+=dt[Ue].dp;for(Se=Ze/dt.length,Ue=dt.length-1;Ue>=0;Ue--)dt[Ue].dp-=Se;ce=!1}else Me++}pe.forEach(Ke)}for(Me=pe.length-1;Me>=0;Me--){var Tt=pe[Me];for(Ue=Tt.length-1;Ue>=0;Ue--){var st=Tt[Ue],Ve=st.datum;Ve.offset=st.dp,Ve.del=st.del}}}function L(j,q){var Y=0,K=j.offset;return q&&(K*=-w,Y=j.offset*C),{x:Y,y:K}}function B(j){var q={start:1,end:-1,middle:0}[j.anchor],Y=q*(k+T),K=Y+q*(j.txwidth+T),re=j.anchor==="middle";return re&&(Y-=j.tx2width/2,K+=j.txwidth/2+T),{alignShift:q,textShiftX:Y,text2ShiftX:K}}function O(j,q,Y,K){var re=function(le){return le*Y},se=function(le){return le*K};j.each(function(le){var ue=r.select(this);if(le.del)return ue.remove();var fe=ue.select("text.nums"),pe=le.anchor,we=pe==="end"?-1:1,xe=B(le),he=L(le,q),oe=he.x,te=he.y,ie=pe==="middle",ee="hoverlabel"in le.trace?le.trace.hoverlabel.showarrow:!0,ce;ie?ce="M-"+re(le.bx/2+le.tx2width/2)+","+se(te-le.by/2)+"h"+re(le.bx)+"v"+se(le.by)+"h-"+re(le.bx)+"Z":ee?ce="M0,0L"+re(we*k+oe)+","+se(k+te)+"v"+se(le.by/2-k)+"h"+re(we*le.bx)+"v-"+se(le.by)+"H"+re(we*k+oe)+"V"+se(te-k)+"Z":ce="M"+re(we*k+oe)+","+se(te-le.by/2)+"h"+re(we*le.bx)+"v"+se(le.by)+"h"+re(-we*le.bx)+"Z",ue.select("path").attr("d",ce);var _e=oe+xe.textShiftX,Se=te+le.ty0-le.by/2+T,Me=le.textAlign||"auto";Me!=="auto"&&(Me==="left"&&pe!=="start"?(fe.attr("text-anchor","start"),_e=ie?-le.bx/2-le.tx2width/2+T:-le.bx-T):Me==="right"&&pe!=="end"&&(fe.attr("text-anchor","end"),_e=ie?le.bx/2-le.tx2width/2-T:le.bx+T)),fe.call(n.positionText,re(_e),se(Se)),le.tx2width&&(ue.select("text.name").call(n.positionText,re(xe.text2ShiftX+xe.alignShift*T+oe),se(te+le.ty0-le.by/2+T)),ue.select("rect").call(c.setRect,re(xe.text2ShiftX+(xe.alignShift-1)*le.tx2width/2+oe),se(te-le.by/2-1),re(le.tx2width),se(le.by+2)))})}function G(j,q){var Y=j.index,K=j.trace||{},re=j.cd[0],se=j.cd[Y]||{};function le(he){return he||t(he)&&he===0}var ue=Array.isArray(Y)?function(he,oe){var te=a.castOption(re,Y,he);return le(te)?te:a.extractOption({},K,"",oe)}:function(he,oe){return a.extractOption(se,K,he,oe)};function fe(he,oe,te){var ie=ue(oe,te);le(ie)&&(j[he]=ie)}if(fe("hoverinfo","hi","hoverinfo"),fe("bgcolor","hbg","hoverlabel.bgcolor"),fe("borderColor","hbc","hoverlabel.bordercolor"),fe("fontFamily","htf","hoverlabel.font.family"),fe("fontSize","hts","hoverlabel.font.size"),fe("fontColor","htc","hoverlabel.font.color"),fe("fontWeight","htw","hoverlabel.font.weight"),fe("fontStyle","hty","hoverlabel.font.style"),fe("fontVariant","htv","hoverlabel.font.variant"),fe("nameLength","hnl","hoverlabel.namelength"),fe("textAlign","hta","hoverlabel.align"),j.posref=q==="y"||q==="closest"&&K.orientation==="h"?j.xa._offset+(j.x0+j.x1)/2:j.ya._offset+(j.y0+j.y1)/2,j.x0=a.constrain(j.x0,0,j.xa._length),j.x1=a.constrain(j.x1,0,j.xa._length),j.y0=a.constrain(j.y0,0,j.ya._length),j.y1=a.constrain(j.y1,0,j.ya._length),j.xLabelVal!==void 0&&(j.xLabel="xLabel"in j?j.xLabel:d.hoverLabelText(j.xa,j.xLabelVal,K.xhoverformat),j.xVal=j.xa.c2d(j.xLabelVal)),j.yLabelVal!==void 0&&(j.yLabel="yLabel"in j?j.yLabel:d.hoverLabelText(j.ya,j.yLabelVal,K.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 pe=d.tickText(j.xa,j.xa.c2l(j.xerr),"hover").text;j.xerrneg!==void 0?j.xLabel+=" +"+pe+" / -"+d.tickText(j.xa,j.xa.c2l(j.xerrneg),"hover").text:j.xLabel+=" \xB1 "+pe,q==="x"&&(j.distance+=1)}if(!isNaN(j.yerr)&&!(j.ya.type==="log"&&j.yerr<=0)){var we=d.tickText(j.ya,j.ya.c2l(j.yerr),"hover").text;j.yerrneg!==void 0?j.yLabel+=" +"+we+" / -"+d.tickText(j.ya,j.ya.c2l(j.yerrneg),"hover").text:j.yLabel+=" \xB1 "+we,q==="y"&&(j.distance+=1)}var xe=j.hoverinfo||j.trace.hoverinfo;return xe&&xe!=="all"&&(xe=Array.isArray(xe)?xe:xe.split("+"),xe.indexOf("x")===-1&&(j.xLabel=void 0),xe.indexOf("y")===-1&&(j.yLabel=void 0),xe.indexOf("z")===-1&&(j.zLabel=void 0),xe.indexOf("text")===-1&&(j.text=void 0),xe.indexOf("name")===-1&&(j.name=void 0)),j}function $(j,q,Y){var K=Y.container,re=Y.fullLayout,se=re._size,le=Y.event,ue=!!q.hLinePoint,fe=!!q.vLinePoint,pe,we;if(K.selectAll(".spikeline").remove(),!!(fe||ue)){var xe=f.combine(re.plot_bgcolor,re.paper_bgcolor);if(ue){var he=q.hLinePoint,oe,te;pe=he&&he.xa,we=he&&he.ya;var ie=we.spikesnap;ie==="cursor"?(oe=le.pointerX,te=le.pointerY):(oe=pe._offset+he.x,te=we._offset+he.y);var ee=f.wcagContrast(he.color,xe)<1.5?f.contrast(xe):he.color,ce=we.spikemode,_e=we.spikethickness,Se=we.spikecolor||ee,Me=d.getPxPosition(j,we),Ue,Ge;if(ce.indexOf("toaxis")!==-1||ce.indexOf("across")!==-1){if(ce.indexOf("toaxis")!==-1&&(Ue=Me,Ge=oe),ce.indexOf("across")!==-1){var Ze=we._counterDomainMin,Ke=we._counterDomainMax;we.anchor==="free"&&(Ze=Math.min(Ze,we.position),Ke=Math.max(Ke,we.position)),Ue=se.l+Ze*se.w,Ge=se.l+Ke*se.w}K.insert("line",":first-child").attr({x1:Ue,x2:Ge,y1:te,y2:te,"stroke-width":_e,stroke:Se,"stroke-dasharray":c.dashStyle(we.spikedash,_e)}).classed("spikeline",!0).classed("crisp",!0),K.insert("line",":first-child").attr({x1:Ue,x2:Ge,y1:te,y2:te,"stroke-width":_e+2,stroke:xe}).classed("spikeline",!0).classed("crisp",!0)}ce.indexOf("marker")!==-1&&K.insert("circle",":first-child").attr({cx:Me+(we.side!=="right"?_e:-_e),cy:te,r:_e,fill:Se}).classed("spikeline",!0)}if(fe){var dt=q.vLinePoint,_t,Pt;pe=dt&&dt.xa,we=dt&&dt.ya;var vt=pe.spikesnap;vt==="cursor"?(_t=le.pointerX,Pt=le.pointerY):(_t=pe._offset+dt.x,Pt=we._offset+dt.y);var Tt=f.wcagContrast(dt.color,xe)<1.5?f.contrast(xe):dt.color,st=pe.spikemode,Ve=pe.spikethickness,Ye=pe.spikecolor||Tt,me=d.getPxPosition(j,pe),be,Ee;if(st.indexOf("toaxis")!==-1||st.indexOf("across")!==-1){if(st.indexOf("toaxis")!==-1&&(be=me,Ee=Pt),st.indexOf("across")!==-1){var De=pe._counterDomainMin,Ce=pe._counterDomainMax;pe.anchor==="free"&&(De=Math.min(De,pe.position),Ce=Math.max(Ce,pe.position)),be=se.t+(1-Ce)*se.h,Ee=se.t+(1-De)*se.h}K.insert("line",":first-child").attr({x1:_t,x2:_t,y1:be,y2:Ee,"stroke-width":Ve,stroke:Ye,"stroke-dasharray":c.dashStyle(pe.spikedash,Ve)}).classed("spikeline",!0).classed("crisp",!0),K.insert("line",":first-child").attr({x1:_t,x2:_t,y1:be,y2:Ee,"stroke-width":Ve+2,stroke:xe}).classed("spikeline",!0).classed("crisp",!0)}st.indexOf("marker")!==-1&&K.insert("circle",":first-child").attr({cx:_t,cy:me-(pe.side!=="top"?Ve:-Ve),r:Ve,fill:Ye}).classed("spikeline",!0)}}}function X(j,q,Y){if(!Y||Y.length!==j._hoverdata.length)return!0;for(var K=Y.length-1;K>=0;K--){var re=Y[K],se=j._hoverdata[K];if(re.curveNumber!==se.curveNumber||String(re.pointNumber)!==String(se.pointNumber)||String(re.pointNumbers)!==String(se.pointNumbers)||re.binNumber!==se.binNumber)return!0}return!1}function Z(j,q){return!q||q.vLinePoint!==j._spikepoints.vLinePoint||q.hLinePoint!==j._spikepoints.hLinePoint}function J(j,q){return n.plainText(j||"",{len:q,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function N(j,q){for(var Y=q.charAt(0),K=[],re=[],se=[],le=0;lej.offsetTop+j.clientTop,U=j=>j.offsetLeft+j.clientLeft;function V(j,q){var Y=j._fullLayout,K=q.getBoundingClientRect(),re=K.left,se=K.top,le=re+K.width,ue=se+K.height,fe=a.apply3DTransform(Y._invTransform)(re,se),pe=a.apply3DTransform(Y._invTransform)(le,ue),we=fe[0],xe=fe[1],he=pe[0],oe=pe[1];return{x:we,y:xe,width:he-we,height:oe-xe,top:Math.min(xe,oe),left:Math.min(we,he),right:Math.max(we,he),bottom:Math.max(xe,oe)}}}}),Xx=ye({"src/components/fx/hoverlabel_defaults.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=Bf().isUnifiedHover;r.exports=function(s,l,n,u){u=u||{};var c=l.legend;function f(h){u.font[h]||(u.font[h]=c?l.legend.font[h]:l.font[h])}l&&i(l.hovermode)&&(u.font||(u.font={}),f("size"),f("family"),f("color"),f("weight"),f("style"),f("variant"),c?(u.bgcolor||(u.bgcolor=a.combine(l.legend.bgcolor,l.paper_bgcolor)),u.bordercolor||(u.bordercolor=l.legend.bordercolor)):u.bgcolor||(u.bgcolor=l.paper_bgcolor)),n("hoverlabel.bgcolor",u.bgcolor),n("hoverlabel.bordercolor",u.bordercolor),n("hoverlabel.namelength",u.namelength),n("hoverlabel.showarrow",u.showarrow),t.coerceFont(n,"hoverlabel.font",u.font),n("hoverlabel.align",u.align)}}}),Jee=ye({"src/components/fx/layout_global_defaults.js"(e,r){"use strict";var t=Yt(),a=Xx(),i=_v();r.exports=function(s,l){function n(u,c){return t.coerce(s,l,i,u,c)}a(s,l,n)}}}),Qee=ye({"src/components/fx/defaults.js"(e,r){"use strict";var t=Yt(),a=fy(),i=Xx();r.exports=function(s,l,n,u){function c(h,d){return t.coerce(s,l,a,h,d)}var f=t.extendFlat({},u.hoverlabel);l.hovertemplate&&(f.namelength=-1),i(s,l,c,f)}}}),n9=ye({"src/components/fx/hovermode_defaults.js"(e,r){"use strict";var t=Yt(),a=_v();r.exports=function(o,s){function l(n,u){return s[n]!==void 0?s[n]:t.coerce(o,s,a,n,u)}return l("clickmode"),l("hoversubplots"),l("hoveranywhere"),l("clickanywhere"),l("hovermode")}}}),ete=ye({"src/components/fx/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=_v(),i=n9(),o=Xx();r.exports=function(l,n){function u(g,m){return t.coerce(l,n,a,g,m)}var c=i(l,n);c&&(u("hoverdistance"),u("spikedistance"),c.indexOf("unified")!==-1&&u("hoversort"));var f=u("dragmode");f==="select"&&u("selectdirection");var h=n._has("map"),d=n._has("geo"),p=n._basePlotModules.length;n.dragmode==="zoom"&&((h||d)&&p===1||h&&d&&p===2)&&(n.dragmode="pan"),o(l,n,u),t.coerceFont(u,"hoverlabel.grouptitlefont",n.hoverlabel.font)}}}),tte=ye({"src/components/fx/calc.js"(e,r){"use strict";var t=Yt(),a=li();r.exports=function(s){var l=s.calcdata,n=s._fullLayout;function u(p){return function(g){return t.coerceHoverinfo({hoverinfo:g},{_module:p._module},n)}}for(var c=0;c"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),MA=ye({"src/components/shapes/draw_newshape/constants.js"(e,r){"use strict";var t=32;r.exports={CIRCLE_SIDES:t,i000:0,i090:t/4,i180:t/2,i270:t/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),EA=ye({"src/components/selections/helpers.js"(e,r){"use strict";var t=Yt().strTranslate;function a(l,n){switch(l.type){case"log":return l.p2d(n);case"date":return l.p2r(n,0,l.calendar);default:return l.p2r(n)}}function i(l,n){switch(l.type){case"log":return l.d2p(n);case"date":return l.r2p(n,0,l.calendar);default:return l.r2p(n)}}function o(l){var n=l._id.charAt(0)==="y"?1:0;return function(u){return a(l,u[n])}}function s(l){return t(l.xaxis._offset,l.yaxis._offset)}r.exports={p2r:a,r2p:i,axValue:o,getTransform:s}}}),Ev=ye({"src/components/shapes/draw_newshape/helpers.js"(e){"use strict";var r=XD(),t=MA(),a=t.CIRCLE_SIDES,i=t.SQRT2,o=EA(),s=o.p2r,l=o.r2p,n=[0,3,4,5,6,1,2],u=[0,3,4,1,2];e.writePaths=function(h){var d=h.length;if(!d)return"M0,0Z";for(var p="",g=0;g0&&x{let d=h.charAt(0),p=c[d].drawn!==void 0;return f+(p?1:0)},0)},e.getDataToPixel=function(s,l,n,u,c){var f=s._fullLayout._size,h;if(l)if(c==="domain")h=function(p){return l._length*(u?1-p:p)+l._offset};else{var d=e.shapePositionToRange(l);h=function(p){var g=o(l,n);return l._offset+l.r2p(d(p,!0))+g},l.type==="date"&&(h=e.decodeDate(h))}else u?h=function(p){return f.t+f.h*(1-p)}:h=function(p){return f.l+f.w*p};return h},e.getPixelToData=function(s,l,n,u){var c=s._fullLayout._size,f;if(l)if(u==="domain")f=function(d){var p=(d-l._offset)/l._length;return n?1-p:p};else{var h=e.rangeToShapePosition(l);f=function(d){return h(l.p2r(d-l._offset))}}else n?f=function(d){return 1-(d-c.t)/c.h}:f=function(d){return(d-c.l)/c.w};return f},e.roundPositionForSharpStrokeRendering=function(s,l){var n=Math.round(l%2)===1,u=Math.round(s);return n?u+.5:u},e.makeShapesOptionsAndPlotinfo=function(s,l){var n=s._fullLayout.shapes[l]||{},u=s._fullLayout._plots[n.xref+n.yref],c=!!u;return c?u._hadPlotinfo=!0:(u={},n.xref&&n.xref!=="paper"&&(u.xaxis=s._fullLayout[n.xref+"axis"]),n.yref&&n.yref!=="paper"&&(u.yaxis=s._fullLayout[n.yref+"axis"])),u.xsizemode=n.xsizemode,u.ysizemode=n.ysizemode,u.xanchor=n.xanchor,u.yanchor=n.yanchor,{options:n,plotinfo:u}},e.makeSelectionsOptionsAndPlotinfo=function(s,l){var n=s._fullLayout.selections[l]||{},u=s._fullLayout._plots[n.xref+n.yref],c=!!u;return c?u._hadPlotinfo=!0:(u={},n.xref&&(u.xaxis=s._fullLayout[n.xref+"axis"]),n.yref&&(u.yaxis=s._fullLayout[n.yref+"axis"])),{options:n,plotinfo:u}},e.getPathString=function(s,l){let n=l.type,u=a.getRefType(l.xref),c=a.getRefType(l.yref),f=s._fullLayout._size;var h,d,p,g,m,y,_,v,x,E,M,C;function w(R,P,z,I){var L;if(R)if(P==="domain")I?L=function(B){return R._offset+R._length*(1-B)}:L=function(B){return R._offset+R._length*B};else{let B=e.shapePositionToRange(R);L=function(O){return R._offset+R.r2p(B(O,!0))},z==="path"&&R.type==="date"&&(L=e.decodeDate(L))}else I?L=function(B){return f.t+f.h*(1-B)}:L=function(B){return f.l+f.w*B};return L}if(u==="array"?(_=[],h=l.xref.map(function(R){return a.getFromId(s,R)}),_=l.xref.map(function(R,P){return w(h[P],a.getRefType(R),n,!1)})):(h=a.getFromId(s,l.xref),_=w(h,u,n,!1)),c==="array"?(v=[],d=l.yref.map(function(R){return a.getFromId(s,R)}),v=l.yref.map(function(R,P){return w(d[P],a.getRefType(R),n,!0)})):(d=a.getFromId(s,l.yref),v=w(d,c,n,!0)),n==="path")return i(l,_,v);if(u==="array")p=o(h[0],l.x0shift),g=o(h[1],l.x1shift),x=_[0](l.x0)+p,E=_[1](l.x1)+g;else if(p=o(h,l.x0shift),g=o(h,l.x1shift),l.xsizemode==="pixel"){let R=_(l.xanchor);x=R+l.x0+p,E=R+l.x1+g}else x=_(l.x0)+p,E=_(l.x1)+g;if(c==="array")m=o(d[0],l.y0shift),y=o(d[1],l.y1shift),M=v[0](l.y0)+m,C=v[1](l.y1)+y;else if(m=o(d,l.y0shift),y=o(d,l.y1shift),l.ysizemode==="pixel"){let R=v(l.yanchor);M=R-l.y0+m,C=R-l.y1+y}else M=v(l.y0)+m,C=v(l.y1)+y;if(n==="line")return"M"+x+","+M+"L"+E+","+C;if(n==="rect")return"M"+x+","+M+"H"+E+"V"+C+"H"+x+"Z";var k=(x+E)/2,T=(M+C)/2,b=Math.abs(k-x),S=Math.abs(T-M),A="A"+b+","+S,F=k+b+","+T,D=k+","+(T-S);return"M"+F+A+" 0 1,1 "+D+A+" 0 0,1 "+F+"Z"};function i(s,l,n){let u=s.path,c=s.xsizemode,f=s.ysizemode,h=s.xanchor,d=s.yanchor,p=Array.isArray(s.xref),g=Array.isArray(s.yref);var m=0,y=0;return u.replace(r.segmentRE,function(_){var v=0,x=_.charAt(0),E=r.paramIsX[x],M=r.paramIsY[x],C=r.numParams[x];let w=E.drawn!==void 0,k=M.drawn!==void 0,T=p?l[m]:l,b=g?n[y]:n;var S=_.slice(1).replace(r.paramRE,function(A){return E[v]?c==="pixel"?A=T(h)+Number(A):A=T(A):M[v]&&(f==="pixel"?A=b(d)-Number(A):A=b(A)),v++,v>C&&(A="X"),A});return v>C&&(S=S.replace(/[\s,]*X.*/,""),t.log("Ignoring extra params in segment "+_)),w&&m++,k&&y++,x+S})}e.getPixelShift=o;function o(s,l){l=l||0;var n=0;return l&&s&&(s.type==="category"||s.type==="multicategory")&&(n=(s.r2p(1)-s.r2p(0))*l),n}}}),s9=ye({"src/components/shapes/display_labels.js"(e,r){"use strict";var t=Yt(),a=qi(),i=Go(),o=$i(),s=Ev().readPaths,l=Sv(),n=l.getPathString,u=gA(),c=Yl().FROM_TL;r.exports=function(p,g,m,y){if(y.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var _;if(m.label.texttemplate){var v={};if(m.type!=="path"){var x=a.getFromId(p,m.xref),E=a.getFromId(p,m.yref);let q=Array.isArray(m.xref),Y=Array.isArray(m.yref);for(var M in u){var C=typeof u[M]=="function",w=!q||u.simpleXVariables.includes(M),k=!Y||u.simpleYVariables.includes(M);if(C&&w&&k){var T=u[M](m,x,E);T!==void 0&&(v[M]=T)}}}_=t.texttemplateStringForShapes({data:[v],fallback:m.label.texttemplatefallback,locale:p._fullLayout._d3locale,template:m.label.texttemplate})}else _=m.label.text;var b={"data-index":g},S=m.label.font,A={"data-notex":1},F=y.append("g").attr(b).classed("shape-label",!0),D=F.append("text").attr(A).classed("shape-label-text",!0).text(_),R,P,z,I;if(m.path){var L=n(p,m),B=s(L,p);R=1/0,z=1/0,P=-1/0,I=-1/0;for(var O=0;Ol.getDataToPixel(p,ie,te,!1,ee)(oe),he=(oe,te,ie,ee)=>l.getDataToPixel(p,ie,te,!0,ee)(oe);if(m.xsizemode==="pixel"){let oe=xe(m.xanchor,void 0,K,ue),te=l.getPixelShift(K,m.x0shift),ie=l.getPixelShift(K,m.x1shift);R=oe+m.x0+te,P=oe+m.x1+ie}else R=xe(m.x0,m.x0shift,K,ue),P=xe(m.x1,m.x1shift,re,fe);if(m.ysizemode==="pixel"){let oe=he(m.yanchor,void 0,se,pe),te=l.getPixelShift(se,m.y0shift),ie=l.getPixelShift(se,m.y1shift);z=oe-m.y0+te,I=oe-m.y1+ie}else z=he(m.y0,m.y0shift,se,pe),I=he(m.y1,m.y1shift,le,we)}var N=m.label.textangle;N==="auto"&&(m.type==="line"?N=f(R,z,P,I):N=0),D.call(function(q){return q.call(o.font,S).attr({}),i.convertToTspans(q,p),q});var H=o.bBox(D.node()),W=h(R,z,P,I,m,N,H),U=W.textx,V=W.texty,j=W.xanchor;D.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[j],y:V,x:U,transform:"rotate("+N+","+U+","+V+")"}).call(i.positionText,U,V)}};function f(d,p,g,m){var y,_;return _=Math.abs(g-d),g>=d?y=p-m:y=m-p,-180/Math.PI*Math.atan2(y,_)}function h(d,p,g,m,y,_,v){var x=y.label.textposition,E=y.label.textangle,M=y.label.padding,C=y.type,w=Math.PI/180*_,k=Math.sin(w),T=Math.cos(w),b=y.label.xanchor,S=y.label.yanchor,A,F,D,R;if(C==="line"){x==="start"?(A=d,F=p):x==="end"?(A=g,F=m):(A=(d+g)/2,F=(p+m)/2),b==="auto"&&(x==="start"?E==="auto"?g>d?b="left":gd?b="right":gd?b="right":gd?b="left":g1&&!(he.length===2&&he[1][0]==="Z")&&(N===0&&(he[0][0]="M"),A[J]=he,z(),I())}}function re(he,oe){if(he===2){J=+oe.srcElement.getAttribute("data-i"),N=+oe.srcElement.getAttribute("data-j");var te=A[J];!_(te)&&!v(te)&&K()}}function se(he){X=[];for(var oe=0;oe{if(!D._dragging&&D._fullLayout.hoveranywhere){let B=I(L);B&&p.hover(D,B,P.id)}}),z.addEventListener("click",L=>{if(!D._dragged&&D._fullLayout.clickanywhere){let B=I(L);B&&p.click(D,B,P.id)}})}function w(D,R,P){let z=P.xref,I=P.yref;if(Array.isArray(z)||Array.isArray(I)){let L="clip"+R._fullLayout._uid+"shape"+P._index,B=k(R,z,I);i.ensureSingleById(R._fullLayout._clips,"clipPath",L,function(O){O.append("rect")}).select("rect").attr(B),f.setClipUrl(D,L,R)}else{let L=(z+I).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");f.setClipUrl(D,L?"clip"+R._fullLayout._uid+L:null,R)}}function k(D,R,P){let z=D._fullLayout._size;function I(O,G){let $=(Array.isArray(O)?O:[O]).map(J=>o.getFromId(D,J)).filter(Boolean);if(!$.length)return G?[z.t,z.t+z.h]:[z.l,z.l+z.w];let X=$.map(function(J){return J._offset}),Z=$.map(function(J){return J._offset+J._length});return[Math.min(...X),Math.max(...Z)]}let L=I(R,!1),B=I(P,!0);return{x:L[0],y:B[0],width:L[1]-L[0],height:B[1]-B[0]}}function T(D,R,P,z,I,L){var B=10,O=10,G=P.xsizemode==="pixel",$=P.ysizemode==="pixel",X=P.type==="line",Z=P.type==="path",J=L.modifyItem,N,H,W,U,V,j,q,Y,K,re,se,le,ue,fe,pe,we=t.select(R.node().parentNode),xe=o.getFromId(D,P.xref),he=o.getRefType(P.xref),oe=o.getFromId(D,P.yref),te=o.getRefType(P.yref),ie=P.x0shift,ee=P.x1shift,ce=P.y0shift,_e=P.y1shift,Se=function(Ce,Fe){var Je=y.getDataToPixel(D,xe,Fe,!1,he);return Je(Ce)},Me=function(Ce,Fe){var Je=y.getDataToPixel(D,oe,Fe,!0,te);return Je(Ce)},Ue=y.getPixelToData(D,xe,!1,he),Ge=y.getPixelToData(D,oe,!0,te),Ze=_t(),Ke={element:Ze.node(),gd:D,prepFn:Tt,doneFn:st,clickFn:Ve},dt;d.init(Ke),Ze.node().onmousemove=vt;function _t(){return X?Pt():R}function Pt(){var Ce=10,Fe=Math.max(P.line.width,Ce),Je=I.append("g").attr("data-index",z).attr("drag-helper",!0);Je.append("path").attr("d",R.attr("d")).style({cursor:"move","stroke-width":Fe,"stroke-opacity":"0"});var qe={"fill-opacity":"0"},at=Math.max(Fe/2,Ce);return Je.append("circle").attr({"data-line-point":"start-point",cx:G?Se(P.xanchor)+P.x0:Se(P.x0,ie),cy:$?Me(P.yanchor)-P.y0:Me(P.y0,ce),r:at}).style(qe).classed("cursor-grab",!0),Je.append("circle").attr({"data-line-point":"end-point",cx:G?Se(P.xanchor)+P.x1:Se(P.x1,ee),cy:$?Me(P.yanchor)-P.y1:Me(P.y1,_e),r:at}).style(qe).classed("cursor-grab",!0),Je}function vt(Ce){if(x(D)){dt=null;return}if(X)Ce.target.tagName==="path"?dt="move":dt=Ce.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Fe=Ke.element.getBoundingClientRect(),Je=Fe.right-Fe.left,qe=Fe.bottom-Fe.top,at=Ce.clientX-Fe.left,tt=Ce.clientY-Fe.top,ct=!Z&&Je>B&&qe>O&&!Ce.shiftKey?d.getCursor(at/Je,1-tt/qe):"move";g(R,ct),dt=ct.split("-")[0]}}function Tt(Ce){x(D)||(G&&(V=Se(P.xanchor)),$&&(j=Me(P.yanchor)),P.type==="path"?pe=P.path:(N=G?P.x0:Se(P.x0),H=$?P.y0:Me(P.y0),W=G?P.x1:Se(P.x1),U=$?P.y1:Me(P.y1)),NU?(q=H,se="y0",Y=U,le="y1"):(q=U,se="y1",Y=H,le="y0"),vt(Ce),be(I,P),De(R,P,D),Ke.moveFn=dt==="move"?Ye:me,Ke.altKey=Ce.altKey)}function st(){x(D)||(g(R),Ee(I),w(R,D,P),a.call("_guiRelayout",D,L.getUpdateObj()))}function Ve(){x(D)||Ee(I)}function Ye(Ce,Fe){if(P.type==="path"){var Je=function(tt){return tt},qe=Je,at=Je;G?J("xanchor",P.xanchor=Ue(V+Ce)):(qe=function(ct){return Ue(Se(ct)+Ce)},xe&&xe.type==="date"&&(qe=y.encodeDate(qe))),$?J("yanchor",P.yanchor=Ge(j+Fe)):(at=function(ct){return Ge(Me(ct)+Fe)},oe&&oe.type==="date"&&(at=y.encodeDate(at))),J("path",P.path=b(pe,qe,at))}else G?J("xanchor",P.xanchor=Ue(V+Ce)):(J("x0",P.x0=Ue(N+Ce)),J("x1",P.x1=Ue(W+Ce))),$?J("yanchor",P.yanchor=Ge(j+Fe)):(J("y0",P.y0=Ge(H+Fe)),J("y1",P.y1=Ge(U+Fe)));R.attr("d",_(D,P)),be(I,P),n(D,z,P,we)}function me(Ce,Fe){if(Z){var Je=function(dr){return dr},qe=Je,at=Je;G?J("xanchor",P.xanchor=Ue(V+Ce)):(qe=function(yr){return Ue(Se(yr)+Ce)},xe&&xe.type==="date"&&(qe=y.encodeDate(qe))),$?J("yanchor",P.yanchor=Ge(j+Fe)):(at=function(yr){return Ge(Me(yr)+Fe)},oe&&oe.type==="date"&&(at=y.encodeDate(at))),J("path",P.path=b(pe,qe,at))}else if(X){if(dt==="resize-over-start-point"){var tt=N+Ce,ct=$?H-Fe:H+Fe;J("x0",P.x0=G?tt:Ue(tt)),J("y0",P.y0=$?ct:Ge(ct))}else if(dt==="resize-over-end-point"){var At=W+Ce,ft=$?U-Fe:U+Fe;J("x1",P.x1=G?At:Ue(At)),J("y1",P.y1=$?ft:Ge(ft))}}else{var qt=function(dr){return dt.indexOf(dr)!==-1},ar=qt("n"),mt=qt("s"),gt=qt("w"),St=qt("e"),Dt=ar?q+Fe:q,kt=mt?Y+Fe:Y,Vt=gt?K+Ce:K,lr=St?re+Ce:re;$&&(ar&&(Dt=q-Fe),mt&&(kt=Y-Fe)),(!$&&kt-Dt>O||$&&Dt-kt>O)&&(J(se,P[se]=$?Dt:Ge(Dt)),J(le,P[le]=$?kt:Ge(kt))),lr-Vt>B&&(J(ue,P[ue]=G?Vt:Ue(Vt)),J(fe,P[fe]=G?lr:Ue(lr)))}R.attr("d",_(D,P)),be(I,P),n(D,z,P,we)}function be(Ce,Fe){(G||$)&&Je();function Je(){var qe=Fe.type!=="path",at=Ce.selectAll(".visual-cue").data([0]),tt=1;at.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":tt}).classed("visual-cue",!0);var ct=Se(G?Fe.xanchor:i.midRange(qe?[Fe.x0,Fe.x1]:y.extractPathCoords(Fe.path,m.paramIsX))),At=Me($?Fe.yanchor:i.midRange(qe?[Fe.y0,Fe.y1]:y.extractPathCoords(Fe.path,m.paramIsY)));if(ct=y.roundPositionForSharpStrokeRendering(ct,tt),At=y.roundPositionForSharpStrokeRendering(At,tt),G&&$){var ft="M"+(ct-1-tt)+","+(At-1-tt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";at.attr("d",ft)}else if(G){var qt="M"+(ct-1-tt)+","+(At-9-tt)+"v18 h2 v-18 Z";at.attr("d",qt)}else{var ar="M"+(ct-9-tt)+","+(At-1-tt)+"h18 v2 h-18 Z";at.attr("d",ar)}}}function Ee(Ce){Ce.selectAll(".visual-cue").remove()}function De(Ce,Fe,Je){var qe=Fe.xref,at=Fe.yref,tt=o.getFromId(Je,qe),ct=o.getFromId(Je,at),At="";qe!=="paper"&&!tt.autorange&&(At+=qe),at!=="paper"&&!ct.autorange&&(At+=at),f.setClipUrl(Ce,At?"clip"+Je._fullLayout._uid+At:null,Je)}}function b(D,R,P){return D.replace(m.segmentRE,function(z){var I=0,L=z.charAt(0),B=m.paramIsX[L],O=m.paramIsY[L],G=m.numParams[L],$=z.slice(1).replace(m.paramRE,function(X){return I>=G||(B[I]?X=R(X):O[I]&&(X=P(X)),I++),X});return L+$})}function S(D,R){if(E(D)){var P=R.node(),z=+P.getAttribute("data-index");if(z>=0){if(z===D._fullLayout._activeShapeIndex){A(D);return}D._fullLayout._activeShapeIndex=z,D._fullLayout._deactivateShape=A,v(D)}}}function A(D){if(E(D)){var R=D._fullLayout._activeShapeIndex;R>=0&&(u(D),delete D._fullLayout._activeShapeIndex,v(D))}}function F(D){if(E(D)){u(D);var R=D._fullLayout._activeShapeIndex,P=(D.layout||{}).shapes||[];if(R{let h=i(l),d=n.append("div").classed("plotly-cloud-dialog-box",!0);if(d.append("div").classed("plotly-cloud-dialog-title",!0).text(h.DIALOG_TITLE),u===a.plotlyServerURL){let g=d.append("div").classed("plotly-cloud-dialog-message",!0),m=new URL(u).origin,y=h.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),_=y[0],v=y[2],x=y[4];g.append("span").text(_),g.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",m).attr("target","_blank").text(v),g.append("span").text(x),g.append("div").classed("plotly-cloud-dialog-message--account",!0).text(h.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let g=new URL(u),m=g.hostname,y=g.origin,_=h.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),v=_[0],x=_[4],E=d.append("div").classed("plotly-cloud-dialog-message",!0);E.append("span").text(v),E.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",y).attr("target","_blank").text(m),E.append("span").text(x)}let p=d.append("div").classed("plotly-cloud-dialog-buttons",!0);p.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(h.DIALOG_CANCEL).on("click",f),p.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(h.DIALOG_CONFIRM).on("click",c)},s=(l,n,u)=>{let c=t.select(l._fullLayout._paperdiv.node());c.selectAll(".plotly-cloud-dialog").remove();let f=c.append("div").classed("plotly-cloud-dialog",!0),h=()=>{f.remove(),document.removeEventListener("keydown",d)},d=p=>{(p.key==="Escape"||p.keyCode===27)&&h()};document.addEventListener("keydown",d),f.on("click",()=>{t.event.target===f.node()&&h()}),o(l,f,n,()=>{h(),u()},h)};r.exports=s}}),l9=ye({"src/components/modebar/buttons.js"(e,r){"use strict";var t=li(),a=ws(),i=Gs(),o=TA(),s=CA().eraseActiveShape,l=ite(),n=Yt(),u=n._,c=r.exports={};c.toImage={name:"toImage",title:function(w){var k=w._context.toImageButtonOptions||{},T=k.format||"png";return T==="png"?u(w,"Download plot as a PNG"):u(w,"Download plot")},icon:o.camera,click:function(w){var k=w._context.toImageButtonOptions,T={format:k.format||"png"};n.notifier(u(w,"Preparing image - this may take a few seconds"),"long",w),["filename","width","height","scale"].forEach(function(b){b in k&&(T[b]=k[b])}),t.call("downloadImage",w,T).then(function(b){n.notifier(u(w,"Image download succeeded")+" - "+b,"long",w)}).catch(function(){n.notifier(u(w,"Sorry, there was a problem downloading your image!"),"long",w)})}},c.downloadJson={name:"downloadJson",title:function(w){return u(w,"Download plot as JSON")},icon:o.curlybraces,click:function(w){t.call("downloadImage",w,{format:"full-json"}).then(function(k){n.notifier(u(w,"JSON download succeeded")+" - "+k,"long",w)}).catch(function(){n.notifier(u(w,"Sorry, there was a problem downloading your JSON file!"),"long",w)})}},c.sendChartToCloud={name:"sendChartToCloud",title:function(w){return u(w,"Share chart...")},icon:o.cloudupload,click:function(w){var k=(window.PLOTLYENV||{}).BASE_URL||w._context.plotlyServerURL;if(!k){console.error("No destination URL provided (plotlyServerURL is empty)");return}var T;try{T=new URL(k)}catch{console.error("Invalid plotlyServerURL: "+k);return}let b=["http:","https:"];if(!b.includes(T.protocol)){console.error(`Invalid protocol '${T.protocol}' in plotlyServerURL '${k}'. Must be one of: ${b.join(", ")}`);return}l(w,k,function(){a.sendDataToCloud(w,k)})}},c.zoom2d={name:"zoom2d",_cat:"zoom",title:function(w){return u(w,"Zoom")},attr:"dragmode",val:"zoom",icon:o.zoombox,click:f},c.pan2d={name:"pan2d",_cat:"pan",title:function(w){return u(w,"Pan")},attr:"dragmode",val:"pan",icon:o.pan,click:f},c.select2d={name:"select2d",_cat:"select",title:function(w){return u(w,"Box Select")},attr:"dragmode",val:"select",icon:o.selectbox,click:f},c.lasso2d={name:"lasso2d",_cat:"lasso",title:function(w){return u(w,"Lasso Select")},attr:"dragmode",val:"lasso",icon:o.lasso,click:f},c.drawclosedpath={name:"drawclosedpath",title:function(w){return u(w,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:o.drawclosedpath,click:f},c.drawopenpath={name:"drawopenpath",title:function(w){return u(w,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:o.drawopenpath,click:f},c.drawline={name:"drawline",title:function(w){return u(w,"Draw line")},attr:"dragmode",val:"drawline",icon:o.drawline,click:f},c.drawrect={name:"drawrect",title:function(w){return u(w,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:o.drawrect,click:f},c.drawcircle={name:"drawcircle",title:function(w){return u(w,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:o.drawcircle,click:f},c.eraseshape={name:"eraseshape",title:function(w){return u(w,"Erase active shape")},icon:o.eraseshape,click:s},c.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(w){return u(w,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:f},c.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(w){return u(w,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:f},c.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(w){return u(w,"Autoscale")},attr:"zoom",val:"auto",icon:o.autoscale,click:f},c.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(w){return u(w,"Reset axes")},attr:"zoom",val:"reset",icon:o.home,click:f},c.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(w){return u(w,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:f},c.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(w){return u(w,"Compare data on hover")},attr:"hovermode",val:function(w){return w._fullLayout._isHoriz?"y":"x"},icon:o.tooltip_compare,gravity:"ne",click:f};function f(w,k){var T=k.currentTarget,b=T.getAttribute("data-attr"),S=T.getAttribute("data-val")||!0,A=w._fullLayout,F={},D=i.list(w,null,!0),R=A._cartesianSpikesEnabled,P,z;if(b==="zoom"){var I=S==="in"?.5:2,L=(1+I)/2,B=(1-I)/2,O,G;for(z=0;z-W),[G,$]=I.invert(z.midPt),{minscale:X}=P.projection,Z=(T=P.projection.maxscale)!=null?T:1/0,J=Math.min(X,Z),N=Math.max(X,Z),H=A==="in"?m*L:1/m*L;H>N?H=N:Hf9});var LA,c9,f9,h9=Si({"src/components/modebar/attributes.ts"(){"use strict";LA=Vs(u9()),c9={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${LA.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${LA.default.foreButtons.join("*, *")}*.`].join(" ")}},f9=c9}}),nte=ye({"src/components/modebar/defaults.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=ko(),o=(h9(),On(DA)).default;r.exports=function(l,n){var u=l.modebar||{},c=i.newContainer(n,"modebar");function f(d,p){return t.coerce(u,c,o,d,p)}f("orientation"),f("bgcolor",a.addOpacity(n.paper_bgcolor,.5));var h=a.contrast(a.rgb(n.modebar.bgcolor));f("color",a.addOpacity(h,.3)),f("activecolor",a.addOpacity(h,.7)),f("uirevision",n.uirevision),f("add"),f("remove")}}}),ote=ye({"src/components/modebar/modebar.js"(e,r){"use strict";var t=ai(),a=en(),i=Yt(),o=TA(),s=jx().version,l=new DOMParser;function n(h){this.container=h.container,this.element=document.createElement("div"),this.update(h.graphInfo,h.buttons),this.container.appendChild(this.element)}var u=n.prototype;u.update=function(h,d){this.graphInfo=h;var p=this.graphInfo._context,g=this.graphInfo._fullLayout,m="modebar-"+g._uid;this.element.setAttribute("id",m),this.element.setAttribute("role","toolbar"),this._uid=m,this.element.className="modebar modebar--custom",p.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),g.modebar.orientation==="v"&&(this.element.className+=" vertical",d=d.reverse());var y=g.modebar,_="#"+m+" .modebar-group";document.querySelectorAll(_).forEach(function(C){C.style.backgroundColor=y.bgcolor});var v=!this.hasButtons(d),x=this.hasLogo!==p.displaylogo,E=this.locale!==p.locale;if(this.locale=p.locale,(v||x||E)&&(this.removeAllButtons(),this.updateButtons(d),p.watermark||p.displaylogo)){var M=this.getLogo();p.watermark&&(M.className=M.className+" watermark"),g.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),i.setStyleOnHover("#"+m+" .modebar-btn",".active",".icon path","fill: "+y.activecolor,"fill: "+y.color,this.element)},u.updateButtons=function(h){var d=this;this.buttons=h,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(p){var g=d.createGroup();p.forEach(function(m){var y=m.name;if(!y)throw new Error("must provide button 'name' in button config");if(d.buttonsNames.indexOf(y)!==-1)throw new Error("button name '"+y+"' is taken");d.buttonsNames.push(y);var _=d.createButton(m);d.buttonElements.push(_),g.appendChild(_)}),d.element.appendChild(g)})},u.createGroup=function(){var h=document.createElement("div");h.className="modebar-group";var d=this.graphInfo._fullLayout.modebar;return h.style.backgroundColor=d.bgcolor,h},u.createButton=function(h){var d=this,p=document.createElement("button");p.setAttribute("type","button"),p.setAttribute("rel","tooltip"),p.className="modebar-btn";var g=h.title;g===void 0?g=h.name:typeof g=="function"&&(g=g(this.graphInfo)),(g||g===0)&&(p.setAttribute("data-title",g),p.setAttribute("aria-label",g)),h.attr!==void 0&&p.setAttribute("data-attr",h.attr);var m=h.val;m!==void 0&&(typeof m=="function"&&(m=m(this.graphInfo)),p.setAttribute("data-val",m));var y=h.click;if(typeof y!="function")throw new Error("must provide button 'click' function in button config");p.addEventListener("click",function(v){h.click(d.graphInfo,v),d.updateActiveButton(v.currentTarget)}),p.setAttribute("data-toggle",h.toggle||!1),h.toggle&&t.select(p).classed("active",!0);var _=h.icon;return typeof _=="function"?p.appendChild(_()):p.appendChild(this.createIcon(_||o.question)),p.setAttribute("data-gravity",h.gravity||"n"),p},u.createIcon=function(h){var d=a(h.height)?Number(h.height):h.ascent-h.descent,p="http://www.w3.org/2000/svg",g;if(h.path){g=document.createElementNS(p,"svg"),g.setAttribute("viewBox",[0,0,h.width,d].join(" ")),g.setAttribute("class","icon");var m=document.createElementNS(p,"path");m.setAttribute("d",h.path),h.transform?m.setAttribute("transform",h.transform):h.ascent!==void 0&&m.setAttribute("transform","matrix(1 0 0 -1 0 "+h.ascent+")"),g.appendChild(m)}if(h.svg){var y=l.parseFromString(h.svg,"application/xml");g=y.childNodes[0]}return g.setAttribute("height","1em"),g.setAttribute("width","1em"),g},u.updateActiveButton=function(h){var d=this.graphInfo._fullLayout,p=h!==void 0?h.getAttribute("data-attr"):null;this.buttonElements.forEach(function(g){var m=g.getAttribute("data-val")||!0,y=g.getAttribute("data-attr"),_=g.getAttribute("data-toggle")==="true",v=t.select(g),x=function(C,w){var k=d.modebar,T=C.querySelector(".icon path");T&&(w||C.matches(":hover")?T.style.fill=k.activecolor:T.style.fill=k.color)};if(_){if(y===p){var E=!v.classed("active");v.classed("active",E),x(g,E)}}else{var M=y===null?y:i.nestedProperty(d,y).get();v.classed("active",M===m),x(g,M===m)}})},u.hasButtons=function(h){var d=this.buttons;if(!d||h.length!==d.length)return!1;for(var p=0;p1?(X=["toggleHover"],Z=["resetViews"]):b?($=["zoomInGeo","zoomOutGeo"],X=["hoverClosestGeo"],Z=["resetGeo"]):T?(X=["hoverClosest3d"],Z=["resetCameraDefault3d","resetCameraLastSave3d"]):D?($=["zoomInMap","zoomOutMap"],X=["toggleHover"],Z=["resetViewMap"]):S?X=["hoverClosestPie"]:z?(X=["hoverClosestCartesian","hoverCompareCartesian"],Z=["resetViewSankey"]):X=["toggleHover"],k&&X.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(d(_)||L)&&(X=[]),k&&!I&&($=["zoomIn2d","zoomOut2d","autoScale2d"],Z[0]!=="resetViews"&&(Z=["resetScale2d"])),T?J=["zoom3d","pan3d","orbitRotation","tableRotation"]:k&&!I||F?J=["zoom2d","pan2d"]:D||b?J=["pan2d"]:R&&(J=["zoom2d"]),h(_)&&J.push("select2d","lasso2d");var N=[],H=function(q){N.indexOf(q)===-1&&X.indexOf(q)!==-1&&N.push(q)};if(Array.isArray(C)){for(var W=[],U=0;UE?_.slice(E):v.slice(x))+M}function p(m,y){for(var _=y._size,v=_.h/_.w,x={},E=Object.keys(m),M=0;Ml*F&&!z)){for(E=0;EN&&KZ&&(Z=K);var se=(Z-X)/(2*J);b/=se,X=w.l2r(X),Z=w.l2r(Z),w.range=w._input.range=O=I[1]||G[1]<=I[0])&&$[0]L[0])return!0}return!1}function M(I){var L=I._fullLayout,B=L._size,O=B.p,G=f.list(I,"",!0),$,X,Z,J,N,H;if(L._paperdiv.style({width:I._context.responsive&&L.autosize&&!I._context._hasZeroWidth&&!I.layout.width?"100%":L.width+"px",height:I._context.responsive&&L.autosize&&!I._context._hasZeroHeight&&!I.layout.height?"100%":L.height+"px"}).selectAll(".main-svg").call(n.setSize,L.width,L.height),I._context.setBackground(I,L.paper_bgcolor),e.drawMainTitle(I),c.manage(I),!L._has("cartesian"))return a.previousPromises(I);function W(me,be,Ee){var De=me._lw/2;if(me._id.charAt(0)==="x"){if(be){if(Ee==="top")return be._offset-O-De}else return B.t+B.h*(1-(me.position||0))+De%1;return be._offset+be._length+O+De}if(be){if(Ee==="right")return be._offset+be._length+O+De}else return B.l+B.w*(me.position||0)+De%1;return be._offset-O-De}for($=0;$0){A(I,$,N,J),Z.attr({x:X,y:$,"text-anchor":O,dy:R(L.yanchor)}).call(o.positionText,X,$);var H=(L.text.match(o.BR_TAG_ALL)||[]).length;if(H){var W=h.LINE_SPACING*H+h.MID_SHIFT;L.y===0&&(W=-W),Z.selectAll(".line").each(function(){var Y=+this.getAttribute("dy").slice(0,-2)-W+"em";this.setAttribute("dy",Y)})}var U=r.select(I).selectAll(".gtitle-subtitle");if(U.node()){var V=Z.node().getBBox(),j=V.y+V.height,q=j+u.SUBTITLE_PADDING_EM*L.subtitle.font.size;U.attr({x:X,y:q,"text-anchor":O,dy:R(L.yanchor)}).call(o.positionText,X,q)}}}};function T(I,L,B,O,G){var $=L.yref==="paper"?I._fullLayout._size.h:I._fullLayout.height,X=i.isTopAnchor(L)?O:O-G,Z=B==="b"?$-X:X;return i.isTopAnchor(L)&&B==="t"||i.isBottomAnchor(L)&&B==="b"?!1:Z.5?"t":"b",X=I._fullLayout.margin[$],Z=0;return L.yref==="paper"?Z=B+L.pad.t+L.pad.b:L.yref==="container"&&(Z=b($,O,G,I._fullLayout.height,B)+L.pad.t+L.pad.b),Z>X?Z:0}function A(I,L,B,O){var G="title.automargin",$=I._fullLayout.title,X=$.y>.5?"t":"b",Z={x:$.x,y:$.y,t:0,b:0},J={};$.yref==="paper"&&T(I,$,X,L,O)?Z[X]=B:$.yref==="container"&&(J[X]=B,I._fullLayout._reservedMargin[G]=J),a.allowAutoMargin(I,G),a.autoMargin(I,G,Z)}function F(I,L){var B=I.title,O=I._size,G=0;return L===y?G=B.pad.l:L===v&&(G=-B.pad.r),B.xref==="paper"?O.l+O.w*B.x+G:I.width*B.x+G}function D(I,L){var B=I.title,O=I._size,G=0;return L==="0em"||!L?G=-B.pad.b:L===h.CAP_SHIFT+"em"&&(G=B.pad.t),B.y==="auto"?O.t/2:B.yref==="paper"?O.t+O.h-O.h*B.y+G:I.height-I.height*B.y+G}function R(I){return I==="top"?h.CAP_SHIFT+.3+"em":I==="bottom"?"-0.3em":h.MID_SHIFT+"em"}function P(I){var L=I.title,B=_;return i.isRightAnchor(L)?B=v:i.isLeftAnchor(L)&&(B=y),B}function z(I){var L=I.title,B="0em";return i.isTopAnchor(L)?B=h.CAP_SHIFT+"em":i.isMiddleAnchor(L)&&(B=h.MID_SHIFT+"em"),B}e.doTraceStyle=function(I){var L=I.calcdata,B=[],O;for(O=0;O=0;P--){var z=C.append("path").attr(k).style("opacity",P?.1:T).call(o.stroke,S).call(o.fill,b).call(s.dashLine,P?"solid":F,P?4+A:A);if(d(z,y,x),D){var I=l(y.layout,"selections",x);z.style({cursor:"move"});var L={element:z.node(),plotinfo:E,gd:y,editHelpers:I,isActiveSelection:!0},B=t(w,y);a(B,z,L)}else z.style("pointer-events",P?"all":"none");R[P]=z}var O=R[0],G=R[1];G.node().addEventListener("click",function(){return p(y,O)})}}function d(y,_,v){var x=v.xref+v.yref;s.setClipUrl(y,"clip"+_._fullLayout._uid+x,_)}function p(y,_){if(f(y)){var v=_.node(),x=+v.getAttribute("data-index");if(x>=0){if(x===y._fullLayout._activeSelectionIndex){m(y);return}y._fullLayout._activeSelectionIndex=x,y._fullLayout._deactivateSelection=m,c(y)}}}function g(y){if(f(y)){var _=y._fullLayout.selections.length-1;y._fullLayout._activeSelectionIndex=_,y._fullLayout._deactivateSelection=m,c(y)}}function m(y){if(f(y)){var _=y._fullLayout._activeSelectionIndex;_>=0&&(i(y),delete y._fullLayout._activeSelectionIndex,c(y))}}}}),lte=ye({"node_modules/polybooljs/lib/build-log.js"(e,r){function t(){var a,i=0,o=!1;function s(l,n){return a.list.push({type:l,data:n?JSON.parse(JSON.stringify(n)):void 0}),a}return a={list:[],segmentId:function(){return i++},checkIntersection:function(l,n){return s("check",{seg1:l,seg2:n})},segmentChop:function(l,n){return s("div_seg",{seg:l,pt:n}),s("chop",{seg:l,pt:n})},statusRemove:function(l){return s("pop_seg",{seg:l})},segmentUpdate:function(l){return s("seg_update",{seg:l})},segmentNew:function(l,n){return s("new_seg",{seg:l,primary:n})},segmentRemove:function(l){return s("rem_seg",{seg:l})},tempStatus:function(l,n,u){return s("temp_status",{seg:l,above:n,below:u})},rewind:function(l){return s("rewind",{seg:l})},status:function(l,n,u){return s("status",{seg:l,above:n,below:u})},vert:function(l){return l===o?a:(o=l,s("vert",{x:l}))},log:function(l){return typeof l!="string"&&(l=JSON.stringify(l,!1," ")),s("log",{txt:l})},reset:function(){return s("reset")},selected:function(l){return s("selected",{segs:l})},chainStart:function(l){return s("chain_start",{seg:l})},chainRemoveHead:function(l,n){return s("chain_rem_head",{index:l,pt:n})},chainRemoveTail:function(l,n){return s("chain_rem_tail",{index:l,pt:n})},chainNew:function(l,n){return s("chain_new",{pt1:l,pt2:n})},chainMatch:function(l){return s("chain_match",{index:l})},chainClose:function(l){return s("chain_close",{index:l})},chainAddHead:function(l,n){return s("chain_add_head",{index:l,pt:n})},chainAddTail:function(l,n){return s("chain_add_tail",{index:l,pt:n})},chainConnect:function(l,n){return s("chain_con",{index1:l,index2:n})},chainReverse:function(l){return s("chain_rev",{index:l})},chainJoin:function(l,n){return s("chain_join",{index1:l,index2:n})},done:function(){return s("done")}},a}r.exports=t}}),ute=ye({"node_modules/polybooljs/lib/epsilon.js"(e,r){function t(a){typeof a!="number"&&(a=1e-10);var i={epsilon:function(o){return typeof o=="number"&&(a=o),a},pointAboveOrOnLine:function(o,s,l){var n=s[0],u=s[1],c=l[0],f=l[1],h=o[0],d=o[1];return(c-n)*(d-u)-(f-u)*(h-n)>=-a},pointBetween:function(o,s,l){var n=o[1]-s[1],u=l[0]-s[0],c=o[0]-s[0],f=l[1]-s[1],h=c*u+n*f;if(h-a)},pointsSameX:function(o,s){return Math.abs(o[0]-s[0])a!=c-n>a&&(u-d)*(n-p)/(c-p)+d-l>a&&(f=!f),u=d,c=p}return f}};return i}r.exports=t}}),cte=ye({"node_modules/polybooljs/lib/linked-list.js"(e,r){var t={create:function(){var a={root:{root:!0,next:null},exists:function(i){return!(i===null||i===a.root)},isEmpty:function(){return a.root.next===null},getHead:function(){return a.root.next},insertBefore:function(i,o){for(var s=a.root,l=a.root.next;l!==null;){if(o(l)){i.prev=l.prev,i.next=l,l.prev.next=i,l.prev=i;return}s=l,l=l.next}s.next=i,i.prev=s,i.next=null},findTransition:function(i){for(var o=a.root,s=a.root.next;s!==null&&!i(s);)o=s,s=s.next;return{before:o===a.root?null:o,after:s,insert:function(l){return l.prev=o,l.next=s,o.next=l,s!==null&&(s.prev=l),l}}}};return a},node:function(a){return a.prev=null,a.next=null,a.remove=function(){a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.prev=null,a.next=null},a}};r.exports=t}}),fte=ye({"node_modules/polybooljs/lib/intersecter.js"(e,r){var t=cte();function a(i,o,s){function l(_,v){return{id:s?s.segmentId():-1,start:_,end:v,myFill:{above:null,below:null},otherFill:null}}function n(_,v,x){return{id:s?s.segmentId():-1,start:_,end:v,myFill:{above:x.myFill.above,below:x.myFill.below},otherFill:null}}var u=t.create();function c(_,v,x,E,M,C){var w=o.pointsCompare(v,M);return w!==0?w:o.pointsSame(x,C)?0:_!==E?_?1:-1:o.pointAboveOrOnLine(x,E?M:C,E?C:M)?1:-1}function f(_,v){u.insertBefore(_,function(x){var E=c(_.isStart,_.pt,v,x.isStart,x.pt,x.other.pt);return E<0})}function h(_,v){var x=t.node({isStart:!0,pt:_.start,seg:_,primary:v,other:null,status:null});return f(x,_.end),x}function d(_,v,x){var E=t.node({isStart:!1,pt:v.end,seg:v,primary:x,other:_,status:null});_.other=E,f(E,_.pt)}function p(_,v){var x=h(_,v);return d(x,_,v),x}function g(_,v){s&&s.segmentChop(_.seg,v),_.other.remove(),_.seg.end=v,_.other.pt=v,f(_.other,_.pt)}function m(_,v){var x=n(v,_.seg.end,_.seg);return g(_,v),p(x,_.primary)}function y(_,v){var x=t.create();function E(I,L){var B=I.seg.start,O=I.seg.end,G=L.seg.start,$=L.seg.end;return o.pointsCollinear(B,G,$)?o.pointsCollinear(O,G,$)||o.pointAboveOrOnLine(O,G,$)?1:-1:o.pointAboveOrOnLine(B,G,$)?1:-1}function M(I){return x.findTransition(function(L){var B=E(I,L.ev);return B>0})}function C(I,L){var B=I.seg,O=L.seg,G=B.start,$=B.end,X=O.start,Z=O.end;s&&s.checkIntersection(B,O);var J=o.linesIntersect(G,$,X,Z);if(J===!1){if(!o.pointsCollinear(G,$,X)||o.pointsSame(G,Z)||o.pointsSame($,X))return!1;var N=o.pointsSame(G,X),H=o.pointsSame($,Z);if(N&&H)return L;var W=!N&&o.pointBetween(G,X,Z),U=!H&&o.pointBetween($,X,Z);if(N)return U?m(L,$):m(I,Z),L;W&&(H||(U?m(L,$):m(I,Z)),m(L,G))}else J.alongA===0&&(J.alongB===-1?m(I,X):J.alongB===0?m(I,J.pt):J.alongB===1&&m(I,Z)),J.alongB===0&&(J.alongA===-1?m(L,G):J.alongA===0?m(L,J.pt):J.alongA===1&&m(L,$));return!1}for(var w=[];!u.isEmpty();){var k=u.getHead();if(s&&s.vert(k.pt[0]),k.isStart){let I=function(){if(S){var L=C(k,S);if(L)return L}return A?C(k,A):!1};var T=I;s&&s.segmentNew(k.seg,k.primary);var b=M(k),S=b.before?b.before.ev:null,A=b.after?b.after.ev:null;s&&s.tempStatus(k.seg,S?S.seg:!1,A?A.seg:!1);var F=I();if(F){if(i){var D;k.seg.myFill.below===null?D=!0:D=k.seg.myFill.above!==k.seg.myFill.below,D&&(F.seg.myFill.above=!F.seg.myFill.above)}else F.seg.otherFill=k.seg.myFill;s&&s.segmentUpdate(F.seg),k.other.remove(),k.remove()}if(u.getHead()!==k){s&&s.rewind(k.seg);continue}if(i){var D;k.seg.myFill.below===null?D=!0:D=k.seg.myFill.above!==k.seg.myFill.below,A?k.seg.myFill.below=A.seg.myFill.above:k.seg.myFill.below=_,D?k.seg.myFill.above=!k.seg.myFill.below:k.seg.myFill.above=k.seg.myFill.below}else if(k.seg.otherFill===null){var R;A?k.primary===A.primary?R=A.seg.otherFill.above:R=A.seg.myFill.above:R=k.primary?v:_,k.seg.otherFill={above:R,below:R}}s&&s.status(k.seg,S?S.seg:!1,A?A.seg:!1),k.other.status=b.insert(t.node({ev:k}))}else{var P=k.status;if(P===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(x.exists(P.prev)&&x.exists(P.next)&&C(P.prev.ev,P.next.ev),s&&s.statusRemove(P.ev.seg),P.remove(),!k.primary){var z=k.seg.myFill;k.seg.myFill=k.seg.otherFill,k.seg.otherFill=z}w.push(k.seg)}u.getHead().remove()}return s&&s.done(),w}return i?{addRegion:function(_){for(var v,x=_[_.length-1],E=0;E<_.length;E++){v=x,x=_[E];var M=o.pointsCompare(v,x);M!==0&&p(l(M<0?v:x,M<0?x:v),!0)}},calculate:function(_){return y(_,!1)}}:{calculate:function(_,v,x,E){return _.forEach(function(M){p(n(M.start,M.end,M),!0)}),x.forEach(function(M){p(n(M.start,M.end,M),!1)}),y(v,E)}}}r.exports=a}}),hte=ye({"node_modules/polybooljs/lib/segment-chainer.js"(e,r){function t(a,i,o){var s=[],l=[];return a.forEach(function(n){var u=n.start,c=n.end;if(i.pointsSame(u,c)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}o&&o.chainStart(n);var f={index:0,matches_head:!1,matches_pt1:!1},h={index:0,matches_head:!1,matches_pt1:!1},d=f;function p(P,z,I){return d.index=P,d.matches_head=z,d.matches_pt1=I,d===f?(d=h,!1):(d=null,!0)}for(var g=0;gn!=m>n&&l<(g-d)*(n-p)/(m-p)+d;y&&(u=!u)}return u}}}),Qx=ye({"src/lib/polygon.js"(e,r){"use strict";var t=mA().dot,a=Vn().BADNUM,i=r.exports={};i.tester=function(s){var l=s.slice(),n=l[0][0],u=n,c=l[0][1],f=c,h;for((l[l.length-1][0]!==l[0][0]||l[l.length-1][1]!==l[0][1])&&l.push(l[0]),h=1;hu||M===a||Mf||x&&p(v))}function m(v,x){var E=v[0],M=v[1];if(E===a||Eu||M===a||Mf)return!1;var C=l.length,w=l[0][0],k=l[0][1],T=0,b,S,A,F,D;for(b=1;bMath.max(S,w)||M>Math.max(A,k)))if(Mh||Math.abs(t(m,p))>u)return!0;return!1},i.filter=function(s,l){var n=[s[0]],u=0,c=0;function f(d){s.push(d);var p=n.length,g=u;n.splice(c+1);for(var m=g+1;m1){var h=s.pop();f(h)}return{addPt:f,raw:s,filtered:n}}}}),gte=ye({"src/components/selections/constants.js"(e,r){"use strict";r.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),yte=ye({"src/components/selections/select.js"(e,r){"use strict";var t=vte(),a=mte(),i=li(),o=$i().dashStyle,s=Ya(),l=Hs(),n=Bf().makeEventData,u=Np(),c=u.freeMode,f=u.rectMode,h=u.drawMode,d=u.openMode,p=u.selectMode,g=Sv(),m=Kx(),y=kA(),_=wv().clearOutline,v=Ev(),x=v.handleEllipse,E=v.readPaths,M=SA().newShapes,C=o9(),w=v9().activateLastSelection,k=Yt(),T=k.sorterAsc,b=Qx(),S=xA(),A=Gs().getFromId,F=Zx(),D=Jx().redrawReglTraces,R=gte(),P=R.MINSELECT,z=b.filter,I=b.tester,L=EA(),B=L.p2r,O=L.axValue,G=L.getTransform;function $(Ve){return Ve.subplot!==void 0}function X(Ve,Ye,me,be,Ee){var De=!$(be),Ce=c(Ee),Fe=f(Ee),Je=d(Ee),qe=h(Ee),at=p(Ee),tt=Ee==="drawline",ct=Ee==="drawcircle",At=tt||ct,ft=be.gd,qt=ft._fullLayout,ar=at&&qt.newselection.mode==="immediate"&&De,mt=qt._zoomlayer,gt=be.element.getBoundingClientRect(),St=be.plotinfo,Dt=G(St),kt=Ye-gt.left,Vt=me-gt.top;qt._calcInverseTransform(ft);var lr=k.apply3DTransform(qt._invTransform)(kt,Vt);kt=lr[0],Vt=lr[1];var dr=qt._invScaleX,yr=qt._invScaleY,vr=kt,Fr=Vt,la="M"+kt+","+Vt,Hr=be.xaxes[0],jr=be.yaxes[0],Oa=Hr._length,Da=jr._length,_i=Ve.altKey&&!(h(Ee)&&Je),ti,Ka,ia,na,xi,Yi,Qr;U(Ve,ft,be),Ce&&(ti=z([[kt,Vt]],R.BENDPX));var Nr=mt.selectAll("path.select-outline-"+St.id).data([1]),Oe=qe?qt.newshape:qt.newselection;qe&&(be.hasText=Oe.label.text||Oe.label.texttemplate);var Ie=qe&&!Je?Oe.fillcolor:"rgba(0,0,0,0)",Et=Oe.line.color||(De?s.contrast(ft._fullLayout.plot_bgcolor):"#7f7f7f");Nr.enter().append("path").attr("class","select-outline select-outline-"+St.id).style({opacity:qe?Oe.opacity/2:1,"stroke-dasharray":o(Oe.line.dash,Oe.line.width),"stroke-width":Oe.line.width+"px","shape-rendering":"crispEdges"}).call(s.stroke,Et).call(s.fill,Ie).attr("fill-rule","evenodd").classed("cursor-move",!!qe).attr("transform",Dt).attr("d",la+"Z");var Mt=mt.append("path").attr("class","zoombox-corners").style({fill:s.background,stroke:s.defaultLine,"stroke-width":1}).attr("transform",Dt).attr("d","M0,0Z");if(qe&&be.hasText){var zt=mt.select(".label-temp");zt.empty()&&(zt=mt.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Gt=qt._uid+R.SELECTID,Ht=[],Be=K(ft,be.xaxes,be.yaxes,be.subplot);ar&&!Ve.shiftKey&&(be._clearSubplotSelections=function(){if(De){var ut=Hr._id,bt=jr._id;Se(ft,ut,bt,Be);for(var Ot=(ft.layout||{}).selections||[],It=[],Wt=!1,jt=0;jt=0){ft._fullLayout._deactivateShape(ft);return}if(!qe){var Ot=qt.clickmode;S.done(Gt).then(function(){if(S.clear(Gt),ut===2){for(Nr.remove(),xi=0;xi-1&&Z(bt,ft,be.xaxes,be.yaxes,be.subplot,be,Nr),Ot==="event"&&Tt(ft,void 0);l.click(ft,bt,St.id)}).catch(k.error)}},be.doneFn=function(){Mt.remove(),S.done(Gt).then(function(){S.clear(Gt),!ar&&na&&be.selectionDefs&&(na.subtract=_i,be.selectionDefs.push(na),be.mergedPolygons.length=0,[].push.apply(be.mergedPolygons,ia)),(ar||qe)&&q(be,ar),be.doneFnCompleted&&be.doneFnCompleted(Ht),at&&Tt(ft,Qr)}).catch(k.error)}}function Z(Ve,Ye,me,be,Ee,De,Ce){var Fe=Ye._hoverdata,Je=Ye._fullLayout,qe=Je.clickmode,at=qe.indexOf("event")>-1,tt=[],ct,At,ft,qt,ar,mt,gt,St,Dt,kt;if(se(Fe)){U(Ve,Ye,De),ct=K(Ye,me,be,Ee);var Vt=le(Fe,ct),lr=Vt.pointNumbers.length>0;if(lr?fe(ct,Vt):pe(ct)&&(gt=ue(Vt))){for(Ce&&Ce.remove(),kt=0;kt=0}function j(Ve){return Ve._fullLayout._activeSelectionIndex>=0}function q(Ve,Ye){var me=Ve.dragmode,be=Ve.plotinfo,Ee=Ve.gd;V(Ee)&&Ee._fullLayout._deactivateShape(Ee),j(Ee)&&Ee._fullLayout._deactivateSelection(Ee);var De=Ee._fullLayout,Ce=De._zoomlayer,Fe=h(me),Je=p(me);if(Fe||Je){var qe=Ce.selectAll(".select-outline-"+be.id);if(qe&&Ee._fullLayout._outlining){var at;Fe&&(at=M(qe,Ve)),at&&i.call("_guiRelayout",Ee,{shapes:at});var tt;Je&&!$(Ve)&&(tt=C(qe,Ve)),tt&&(Ee._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",Ee,{selections:tt}).then(function(){Ye&&w(Ee)})),Ee._fullLayout._outlining=!1}}be.selection={},be.selection.selectionDefs=Ve.selectionDefs=[],be.selection.mergedPolygons=Ve.mergedPolygons=[]}function Y(Ve){return Ve._id}function K(Ve,Ye,me,be){if(!Ve.calcdata)return[];var Ee=[],De=Ye.map(Y),Ce=me.map(Y),Fe,Je,qe;for(qe=0;qe0,De=Ee?be[0]:me;return Ye.selectedpoints?Ye.selectedpoints.indexOf(De)>-1:!1}function fe(Ve,Ye){var me=[],be,Ee,De,Ce;for(Ce=0;Ce0&&me.push(be);if(me.length===1&&(De=me[0]===Ye.searchInfo,De&&(Ee=Ye.searchInfo.cd[0].trace,Ee.selectedpoints.length===Ye.pointNumbers.length))){for(Ce=0;Ce1||(Ye+=be.selectedpoints.length,Ye>1)))return!1;return Ye===1}function we(Ve,Ye,me){var be,Ee;for(be=0;be-1&&Ye;if(!Ce&&Ye){var ut=Ue(Ve,!0);if(ut.length){var bt=ut[0].xref,Ot=ut[0].yref;if(bt&&Ot){var It=Ke(ut),Wt=_t([A(Ve,bt,"x"),A(Ve,Ot,"y")]);Wt(Ht,It)}}Ve._fullLayout._noEmitSelectedAtStart?Ve._fullLayout._noEmitSelectedAtStart=!1:et&&Tt(Ve,Ht),ct._reselect=!1}if(!Ce&&ct._deselect){var jt=ct._deselect;Fe=jt.xref,Je=jt.yref,_e(Fe,Je,at)||Se(Ve,Fe,Je,be),et&&(Ht.points.length?Tt(Ve,Ht):st(Ve)),ct._deselect=!1}return{eventData:Ht,selectionTesters:me}}function ce(Ve){var Ye=Ve.calcdata;if(Ye)for(var me=0;me=0){Oe._fullLayout._deactivateShape(Oe);return}var Ie=Oe._fullLayout.clickmode;if(N(Oe),Qr===2&&!oe&&ti(),he)Ie.indexOf("select")>-1&&k(Nr,Oe,_e,Se,re.id,qe),Ie.indexOf("event")>-1&&f.click(Oe,Nr,re.id);else if(Qr===1&&oe){var Et=pe?ie:te,Mt=pe==="s"||we==="w"?0:1,zt=Et._name+".range["+Mt+"]",Gt=I(Et,Mt),Ht="left",Be="middle";if(Et.fixedrange)return;pe?(Be=pe==="n"?"top":"bottom",Et.side==="right"&&(Ht="right")):we==="e"&&(Ht="right"),Oe._context.showAxisRangeEntryBoxes&&t.select(Je).call(n.makeEditable,{gd:Oe,immediate:!0,background:Oe._fullLayout.paper_bgcolor,text:String(Gt),fill:Et.tickfont?Et.tickfont.color:"#444",horizontalAlign:Ht,verticalAlign:Be}).on("edit",function(et){var ut=Et.d2r(et);ut!==void 0&&s.call("_guiRelayout",Oe,zt,ut)})}}p.init(qe);var ct,At,ft,qt,ar,mt,gt,St,Dt,kt;function Vt(Qr,Nr,Oe){var Ie=Je.getBoundingClientRect();ct=Nr-Ie.left,At=Oe-Ie.top,K._fullLayout._calcInverseTransform(K);var Et=a.apply3DTransform(K._fullLayout._invTransform)(ct,At);ct=Et[0],At=Et[1],ft={l:ct,r:ct,w:0,t:At,b:At,h:0},qt=K._hmpixcount?K._hmlumcount/K._hmpixcount:u.luminosity(K._fullLayout.plot_bgcolor),ar="M0,0H"+Ge+"V"+Ze+"H0V0",mt=!1,gt="xy",kt=!1,St=$(xe,qt,Me,Ue,ar),Dt=X(xe,Me,Ue)}function lr(Qr,Nr){if(K._transitioningWithDuration)return!1;var Oe=Math.max(0,Math.min(Ge,Ee*Qr+ct)),Ie=Math.max(0,Math.min(Ze,De*Nr+At)),Et=Math.abs(Oe-ct),Mt=Math.abs(Ie-At);ft.l=Math.min(ct,Oe),ft.r=Math.max(ct,Oe),ft.t=Math.min(At,Ie),ft.b=Math.max(At,Ie);function zt(){gt="",ft.r=ft.l,ft.t=ft.b,Dt.attr("d","M0,0Z")}if(Ke.isSubplotConstrained)Et>A||Mt>A?(gt="xy",Et/Ge>Mt/Ze?(Mt=Et*Ze/Ge,At>Ie?ft.t=At-Mt:ft.b=At+Mt):(Et=Mt*Ge/Ze,ct>Oe?ft.l=ct-Et:ft.r=ct+Et),Dt.attr("d",V(ft))):zt();else if(dt.isSubplotConstrained)if(Et>A||Mt>A){gt="xy";var Gt=Math.min(ft.l/Ge,(Ze-ft.b)/Ze),Ht=Math.max(ft.r/Ge,(Ze-ft.t)/Ze);ft.l=Gt*Ge,ft.r=Ht*Ge,ft.b=(1-Gt)*Ze,ft.t=(1-Ht)*Ze,Dt.attr("d",V(ft))}else zt();else!Pt||Mt0){var et;if(dt.isSubplotConstrained||!_t&&Pt.length===1){for(et=0;et<_e.length;et++)_e[et].range=_e[et]._r.slice(),T(_e[et],1-Nr/Ze);Qr=Nr*Ge/Ze,Ht=Qr/2}if(dt.isSubplotConstrained||!Pt&&_t.length===1){for(et=0;et1&&(zt.maxallowed!==void 0&&Tt===(zt.range[0]1&&(Gt.maxallowed!==void 0&&st===(Gt.range[0]=0?Math.min(K,.9):1/(1/Math.max(K,-.3)+3.222))}function G(K,re,se){return K?K==="nsew"?se?"":re==="pan"?"move":"crosshair":K.toLowerCase()+"-resize":"pointer"}function $(K,re,se,le,ue){return K.append("path").attr("class","zoombox").style({fill:re>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",l(se,le)).attr("d",ue+"Z")}function X(K,re,se){return K.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform",l(re,se)).attr("d","M0,0Z")}function Z(K,re,se,le,ue,fe){K.attr("d",le+"M"+se.l+","+se.t+"v"+se.h+"h"+se.w+"v-"+se.h+"h-"+se.w+"Z"),J(K,re,ue,fe)}function J(K,re,se,le){se||(K.transition().style("fill",le>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),re.transition().style("opacity",1).duration(200))}function N(K){t.select(K).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(K){F&&K.data&&K._context.showTips&&(a.notifier(a._(K,"Double-click to zoom back out"),"long",K),F=!1)}function W(K,re){return"M"+(K.l-.5)+","+(re-A-.5)+"h-3v"+(2*A+1)+"h3ZM"+(K.r+.5)+","+(re-A-.5)+"h3v"+(2*A+1)+"h-3Z"}function U(K,re){return"M"+(re-A-.5)+","+(K.t-.5)+"v-3h"+(2*A+1)+"v3ZM"+(re-A-.5)+","+(K.b+.5)+"v3h"+(2*A+1)+"v-3Z"}function V(K){var re=Math.floor(Math.min(K.b-K.t,K.r-K.l,A)/2);return"M"+(K.l-3.5)+","+(K.t-.5+re)+"h3v"+-re+"h"+re+"v-3h-"+(re+3)+"ZM"+(K.r+3.5)+","+(K.t-.5+re)+"h-3v"+-re+"h"+-re+"v-3h"+(re+3)+"ZM"+(K.r+3.5)+","+(K.b+.5-re)+"h-3v"+re+"h"+-re+"v3h"+(re+3)+"ZM"+(K.l-3.5)+","+(K.b+.5-re)+"h3v"+re+"h"+re+"v3h-"+(re+3)+"Z"}function j(K,re,se,le,ue){for(var fe=!1,pe={},we={},xe,he,oe,te,ie=(ue||{}).xaHash,ee=(ue||{}).yaHash,ce=0;ce1&&a.warn("Full array edits are incompatible with other edits",p);var E=f[""][""];if(l(E))c.set(null);else if(Array.isArray(E))c.set(E);else return a.warn("Unrecognized full array edit value",p,E),!0;return _?!1:(g(v,x),m(u),!0)}var M=Object.keys(f).map(Number).sort(i),C=c.get(),w=C||[],k=d(x,p).get(),T=[],b=-1,S=w.length,A,F,D,R,P,z,I,L;for(A=0;Aw.length-(I?0:1)){a.warn("index out of range",p,D);continue}if(z!==void 0)P.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",p,D),l(z)?T.push(D):I?(z==="add"&&(z={}),w.splice(D,0,z),k&&k.splice(D,0,{})):a.warn("Unrecognized full object edit value",p,D,z),b===-1&&(b=D);else for(F=0;F=0;A--)w.splice(T[A],1),k&&k.splice(T[A],1);if(w.length?C||c.set(w):c.set(null),_)return!1;if(g(v,x),y!==t){var B;if(b===-1)B=M;else{for(S=Math.max(w.length,S),B=[],A=0;A=b));A++)B.push(D);for(A=b;A0&&a.log("Clearing previous rejected promises from queue."),_._promises=[]},e.cleanLayout=function(_){var v,x;_||(_={}),_.xaxis1&&(_.xaxis||(_.xaxis=_.xaxis1),delete _.xaxis1),_.yaxis1&&(_.yaxis||(_.yaxis=_.yaxis1),delete _.yaxis1),_.scene1&&(_.scene||(_.scene=_.scene1),delete _.scene1);var E=(i.subplotsRegistry.cartesian||{}).attrRegex,M=(i.subplotsRegistry.polar||{}).attrRegex,C=(i.subplotsRegistry.ternary||{}).attrRegex,w=(i.subplotsRegistry.gl3d||{}).attrRegex,k=Object.keys(_);for(v=0;v3?(z.x=1.02,z.xanchor="left"):z.x<-2&&(z.x=-.02,z.xanchor="right"),z.y>3?(z.y=1.02,z.yanchor="bottom"):z.y<-2&&(z.y=-.02,z.yanchor="top")),_.dragmode==="rotate"&&(_.dragmode="orbit"),_.template&&_.template.layout&&e.cleanLayout(_.template.layout),_};function c(_,v,x=!1){var E=_[v],M=v.charAt(0);x&&Array.isArray(E)||E&&E!=="paper"&&(_[v]=s(E,M,!0))}e.cleanData=function(_){for(var v=0;v<_.length;v++){var x=_[v],E;if(x.type==="histogramy"&&"xbins"in x&&!("ybins"in x)&&(x.ybins=x.xbins,delete x.xbins),x.type==="histogramy"&&e.swapXYData(x),(x.type==="histogramx"||x.type==="histogramy")&&(x.type="histogram"),"scl"in x&&!("colorscale"in x)&&(x.colorscale=x.scl,delete x.scl),"reversescl"in x&&!("reversescale"in x)&&(x.reversescale=x.reversescl,delete x.reversescl),x.xaxis&&(x.xaxis=s(x.xaxis,"x")),x.yaxis&&(x.yaxis=s(x.yaxis,"y")),n(x,"gl3d")&&x.scene&&(x.scene=i.subplotsRegistry.gl3d.cleanId(x.scene)),!n(x,"pie-like")&&!n(x,"bar-like"))if(Array.isArray(x.textposition))for(E=0;E0)return _.slice(0,v)}e.hasParent=function(_,v){for(var x=m(v);x;){if(x in _)return!0;x=m(x)}return!1},e.clearAxisTypes=function(_,v,x){for(var E=0;E{let x=(...E)=>E.every(M=>a.isPlainObject(M))||E.every(M=>Array.isArray(M));if([_,v].every(E=>Array.isArray(E))){if(_.length!==v.length)return!1;for(let E=0;E<_.length;E++){let M=_[E],C=v[E];if(M!==C&&!(x(M,C)?y(M,C):!1))return!1}return!0}else if([_,v].every(E=>a.isPlainObject(E))){if(Object.keys(_).length!==Object.keys(v).length)return!1;for(let E in _){if(E.startsWith("_"))continue;let M=_[E],C=v[E];if(M!==C&&!(x(M,C)?y(M,C):!1))return!1}return!0}return!1};e.collectionsAreEqual=y}}),FA=ye({"src/plot_api/plot_api.js"(e){"use strict";var r=ai(),t=en(),a=qD(),i=Yt(),o=i.nestedProperty,s=py(),l=jee(),n=li(),u=vy(),c=ws(),f=qi(),h=KD(),d=Gu(),p=$i(),g=Ya(),m=_9().initInteractions,y=Sd(),_=lu().clearOutline,v=xv().dfltConfig,x=wte(),E=Ate(),M=Jx(),C=Cs(),w=$l().AX_NAME_PATTERN,k=0,T=5;function b(me,be,Ee,De){var Ce;if(me=i.getGraphDiv(me),s.init(me),i.isPlainObject(be)){var Fe=be;be=Fe.data,Ee=Fe.layout,De=Fe.config,Ce=Fe.frames}var Je=s.triggerHandler(me,"plotly_beforeplot",[be,Ee,De]);if(Je===!1)return Promise.reject();!be&&!Ee&&!i.isPlotDiv(me)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",me);function qe(){if(Ce)return e.addFrames(me,Ce)}R(me,De),Ee||(Ee={}),r.select(me).classed("js-plotly-plot",!0),p.makeTester(),Array.isArray(me._promises)||(me._promises=[]);var at=(me.data||[]).length===0&&Array.isArray(be);Array.isArray(be)&&(E.cleanData(be),at?me.data=be:me.data.push.apply(me.data,be),me.empty=!1),(!me.layout||at)&&(me.layout=E.cleanLayout(Ee)),c.supplyDefaults(me);var tt=me._fullLayout,ct=tt._has("cartesian");tt._replotting=!0,(at||tt._shouldCreateBgLayer)&&(Ye(me),tt._shouldCreateBgLayer&&delete tt._shouldCreateBgLayer),p.initGradients(me),p.initPatterns(me),at&&f.saveShowSpikeInitial(me);var At=!me.calcdata||me.calcdata.length!==(me._fullData||[]).length;At&&c.doCalcdata(me);for(var ft=0;ft=me.data.length||Ce<-me.data.length)throw new Error(Ee+" must be valid indices for gd.data.");if(be.indexOf(Ce,De+1)>-1||Ce>=0&&be.indexOf(-me.data.length+Ce)>-1||Ce<0&&be.indexOf(me.data.length+Ce)>-1)throw new Error("each index in "+Ee+" must be unique.")}}function B(me,be,Ee){if(!Array.isArray(me.data))throw new Error("gd.data must be an array.");if(typeof be>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(be)||(be=[be]),L(me,be,"currentIndices"),typeof Ee<"u"&&!Array.isArray(Ee)&&(Ee=[Ee]),typeof Ee<"u"&&L(me,Ee,"newIndices"),typeof Ee<"u"&&be.length!==Ee.length)throw new Error("current and new indices must be of equal length.")}function O(me,be,Ee){var De,Ce;if(!Array.isArray(me.data))throw new Error("gd.data must be an array.");if(typeof be>"u")throw new Error("traces must be defined.");for(Array.isArray(be)||(be=[be]),De=0;De"u")throw new Error("indices must be an integer or array of integers");L(me,Ee,"indices");for(var Fe in be){if(!Array.isArray(be[Fe])||be[Fe].length!==Ee.length)throw new Error("attribute "+Fe+" must be an array of length equal to indices array length");if(Ce&&(!(Fe in De)||!Array.isArray(De[Fe])||De[Fe].length!==be[Fe].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 $(me,be,Ee,De){var Ce=i.isPlainObject(De),Fe=[],Je,qe,at,tt,ct;Array.isArray(Ee)||(Ee=[Ee]),Ee=I(Ee,me.data.length-1);for(var At in be)for(var ft=0;ft=0&&ct=0&&ct"u")return tt=e.redraw(me),l.add(me,Ce,Je,Fe,qe),tt;Array.isArray(Ee)||(Ee=[Ee]);try{B(me,De,Ee)}catch(ct){throw me.data.splice(me.data.length-be.length,be.length),ct}return l.startSequence(me),l.add(me,Ce,Je,Fe,qe),tt=e.moveTraces(me,De,Ee),l.stopSequence(me),tt}function W(me,be){me=i.getGraphDiv(me);var Ee=[],De=e.addTraces,Ce=W,Fe=[me,Ee,be],Je=[me,be],qe,at;if(typeof be>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(be)||(be=[be]),L(me,be,"indices"),be=I(be,me.data.length-1),be.sort(i.sorterDes),qe=0;qe"u")for(Ee=[],tt=0;tt0&&typeof vr.parts[Hr]!="string";)Hr--;var jr=vr.parts[Hr],Oa=vr.parts[Hr-1]+"."+jr,Da=vr.parts.slice(0,Hr).join("."),_i=o(me.layout,Da).get(),ti=o(De,Da).get(),Ka=vr.get();if(Fr!==void 0){St[yr]=Fr,Dt[yr]=jr==="reverse"?Fr:j(Ka);var ia=u.getLayoutValObject(De,vr.parts);if(ia&&ia.impliedEdits&&Fr!==null)for(var na in ia.impliedEdits)kt(i.relativeAttr(yr,na),ia.impliedEdits[na]);if(["width","height"].indexOf(yr)!==-1)if(Fr){kt("autosize",null);var xi=yr==="height"?"width":"height";kt(xi,De[xi])}else De[yr]=me._initialAutoSize[yr];else if(yr==="autosize")kt("width",Fr?null:De.width),kt("height",Fr?null:De.height);else if(Oa.match(fe))dr(Oa),o(De,Da+"._inputRange").set(null);else if(Oa.match(pe)){dr(Oa),o(De,Da+"._inputRange").set(null);var Yi=o(De,Da).get();Yi._inputDomain&&(Yi._input.domain=Yi._inputDomain.slice())}else Oa.match(we)&&o(De,Da+"._inputDomain").set(null);if(jr==="type"){lr=_i;var Qr=ti.type==="linear"&&Fr==="log",Nr=ti.type==="log"&&Fr==="linear";if(Qr||Nr){if(!lr||!lr.range)kt(Da+".autorange",!0);else if(ti.autorange)Qr&&(lr.range=lr.range[1]>lr.range[0]?[1,2]:[2,1]);else{var Oe=lr.range[0],Ie=lr.range[1];Qr?(Oe<=0&&Ie<=0&&kt(Da+".autorange",!0),Oe<=0?Oe=Ie/1e6:Ie<=0&&(Ie=Oe/1e6),kt(Da+".range[0]",Math.log(Oe)/Math.LN10),kt(Da+".range[1]",Math.log(Ie)/Math.LN10)):(kt(Da+".range[0]",Math.pow(10,Oe)),kt(Da+".range[1]",Math.pow(10,Ie)))}Array.isArray(De._subplots.polar)&&De._subplots.polar.length&&De[vr.parts[0]]&&vr.parts[1]==="radialaxis"&&delete De[vr.parts[0]]._subplot.viewInitial["radialaxis.range"],n.getComponentMethod("annotations","convertCoords")(me,ti,Fr,kt),n.getComponentMethod("images","convertCoords")(me,ti,Fr,kt)}else kt(Da+".autorange",!0),kt(Da+".range",null);o(De,Da+"._inputRange").set(null)}else if(jr.match(w)){var Et=o(De,yr).get(),Mt=(Fr||{}).type;(!Mt||Mt==="-")&&(Mt="linear"),n.getComponentMethod("annotations","convertCoords")(me,Et,Mt,kt),n.getComponentMethod("images","convertCoords")(me,Et,Mt,kt)}var zt=x.containerArrayMatch(yr);if(zt){ct=zt.array,At=zt.index;var Gt=zt.property,Ht=ia||{editType:"calc"};At!==""&&Gt===""&&(x.isAddVal(Fr)?Dt[yr]=null:x.isRemoveVal(Fr)?Dt[yr]=(o(Ee,ct).get()||[])[At]:i.warn("unrecognized full object value",be)),C.update(gt,Ht),tt[ct]||(tt[ct]={});var Be=tt[ct][At];Be||(Be=tt[ct][At]={}),Be[Gt]=Fr,delete be[yr]}else jr==="reverse"?(_i.range?_i.range.reverse():(kt(Da+".autorange",!0),_i.range=[1,0]),ti.autorange?gt.calc=!0:gt.plot=!0):(yr==="dragmode"&&(Fr===!1&&Ka!==!1||Fr!==!1&&Ka===!1)||De._has("scatter-like")&&De._has("regl")&&yr==="dragmode"&&(Fr==="lasso"||Fr==="select")&&!(Ka==="lasso"||Ka==="select")?gt.plot=!0:ia?C.update(gt,ia):gt.calc=!0,vr.set(Fr))}}for(ct in tt){var et=x.applyContainerArrayChanges(me,Fe(Ee,ct),tt[ct],gt,Fe);et||(gt.plot=!0)}for(var ut in Vt){lr=f.getFromId(me,ut);var bt=lr&&lr._constraintGroup;if(bt){gt.calc=!0;for(var Ot in bt)Vt[Ot]||(f.getFromId(me,Ot)._constraintShrinkable=!0)}}(he(me)||be.height||be.width)&&(gt.plot=!0);var It=De.shapes;for(At=0;At1;)if(De.pop(),Ee=o(be,De.join(".")+".uirevision").get(),Ee!==void 0)return Ee;return be.uirevision}function Se(me,be){for(var Ee=0;Ee[Da,me._ev.listeners(Da)]);Fe=e.newPlot(me,be,Ee,De).then(()=>{for(let[Da,_i]of Oa)_i.forEach(ti=>me.on(Da,ti));return e.react(me,be,Ee,De)})}else{me.data=be||[],E.cleanData(me.data),me.layout=Ee||{},E.cleanLayout(me.layout),Ge(me.data,me.layout,qe,at),c.supplyDefaults(me,{skipUpdateCalc:!0});var At=me._fullData,ft=me._fullLayout,qt=ft.datarevision===void 0,ar=ft.transition,mt=dt(me,at,ft,qt,ar),gt=mt.newDataRevision,St=Ke(me,qe,At,qt,ar,gt);if(he(me)&&(mt.layoutReplot=!0),St.calc||mt.calc){me.calcdata=void 0;for(var Dt=Object.getOwnPropertyNames(ft),kt=0;kt(ct||me.emit("plotly_react",{config:De,data:be,layout:Ee}),me))}function Ke(me,be,Ee,De,Ce,Fe){var Je=be.length===Ee.length;if(!Ce&&!Je)return{fullReplot:!0,calc:!0};var qe=C.traceFlags();qe.arrays={},qe.nChanges=0,qe.nChangesAnim=0;var at,tt;function ct(qt){var ar=u.getTraceValObject(tt,qt);return!tt._module.animatable&&ar.anim&&(ar.anim=!1),ar}var At={getValObject:ct,flags:qe,immutable:De,transition:Ce,newDataRevision:Fe,gd:me},ft={};for(at=0;at=Ce.length?Ce[0]:Ce[tt]:Ce}function qe(tt){return Array.isArray(Fe)?tt>=Fe.length?Fe[0]:Fe[tt]:Fe}function at(tt,ct){var At=0;return function(){if(tt&&++At===ct)return tt()}}return new Promise(function(tt,ct){function At(){if(De._frameQueue.length!==0){for(;De._frameQueue.length;){var jr=De._frameQueue.pop();jr.onInterrupt&&jr.onInterrupt()}me.emit("plotly_animationinterrupted",[])}}function ft(jr){if(jr.length!==0){for(var Oa=0;OaDe._timeToNext&&ar()};jr()}var gt=0;function St(jr){return Array.isArray(Ce)?gt>=Ce.length?jr.transitionOpts=Ce[gt]:jr.transitionOpts=Ce[0]:jr.transitionOpts=Ce,gt++,jr}var Dt,kt,Vt=[],lr=be==null,dr=Array.isArray(be),yr=!lr&&!dr&&i.isPlainObject(be);if(yr)Vt.push({type:"object",data:St(i.extendFlat({},be))});else if(lr||["string","number"].indexOf(typeof be)!==-1)for(Dt=0;Dt0&&lala)&&Hr.push(kt);Vt=Hr}}Vt.length>0?ft(Vt):(me.emit("plotly_animated"),tt())})}function vt(me,be,Ee){if(me=i.getGraphDiv(me),be==null)return Promise.resolve();if(!i.isPlotDiv(me))throw new Error("This element is not a Plotly plot: "+me+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var De,Ce,Fe,Je,qe=me._transitionData._frames,at=me._transitionData._frameHash;if(!Array.isArray(be))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+be);var tt=qe.length+be.length*2,ct=[],At={};for(De=be.length-1;De>=0;De--)if(i.isPlainObject(be[De])){var ft=be[De].name,qt=(at[ft]||At[ft]||{}).name,ar=be[De].name,mt=at[qt]||At[qt];qt&&ar&&typeof ar=="number"&&mt&&kvr.index?-1:yr.index=0;De--){if(Ce=ct[De].frame,typeof Ce.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ce.name)for(;at[Ce.name="frame "+me._transitionData._counter++];);if(at[Ce.name]){for(Fe=0;Fe=0;Ee--)De=be[Ee],Fe.push({type:"delete",index:De}),Je.unshift({type:"insert",index:De,value:Ce[De]});var qe=c.modifyFrames,at=c.modifyFrames,tt=[me,Je],ct=[me,Fe];return l&&l.add(me,qe,tt,at,ct),c.modifyFrames(me,Fe)}function st(me){me=i.getGraphDiv(me);var be=me._fullLayout||{},Ee=me._fullData||[];return c.cleanPlot([],{},Ee,be),c.purge(me),s.purge(me),be._container&&be._container.remove(),delete me._context,me}function Ve(me){var be=me._fullLayout,Ee=me.getBoundingClientRect();if(!i.equalDomRects(Ee,be._lastBBox)){var De=be._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(me));be._invScaleX=Math.sqrt(De[0][0]*De[0][0]+De[0][1]*De[0][1]+De[0][2]*De[0][2]),be._invScaleY=Math.sqrt(De[1][0]*De[1][0]+De[1][1]*De[1][1]+De[1][2]*De[1][2]),be._lastBBox=Ee}}function Ye(me){var be=r.select(me),Ee=me._fullLayout;if(Ee._calcInverseTransform=Ve,Ee._calcInverseTransform(me),Ee._container=be.selectAll(".plot-container").data([0]),Ee._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ee._paperdiv=Ee._container.selectAll(".svg-container").data([0]),Ee._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ee._glcontainer=Ee._paperdiv.selectAll(".gl-container").data([{}]),Ee._glcontainer.enter().append("div").classed("gl-container",!0),Ee._paperdiv.selectAll(".main-svg").remove(),Ee._paperdiv.select(".modebar-container").remove(),Ee._paper=Ee._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ee._toppaper=Ee._paperdiv.append("svg").classed("main-svg",!0),Ee._modebardiv=Ee._paperdiv.append("div"),delete Ee._modeBar,Ee._hoverpaper=Ee._paperdiv.append("svg").classed("main-svg",!0),!Ee._uid){var De={};r.selectAll("defs").each(function(){this.id&&(De[this.id.split("-")[1]]=1)}),Ee._uid=i.randstr(De)}Ee._paperdiv.selectAll(".main-svg").attr(y.svgAttrs),Ee._defs=Ee._paper.append("defs").attr("id","defs-"+Ee._uid),Ee._clips=Ee._defs.append("g").classed("clips",!0),Ee._topdefs=Ee._toppaper.append("defs").attr("id","topdefs-"+Ee._uid),Ee._topclips=Ee._topdefs.append("g").classed("clips",!0),Ee._bgLayer=Ee._paper.append("g").classed("bglayer",!0),Ee._draggers=Ee._paper.append("g").classed("draglayer",!0);var Ce=Ee._paper.append("g").classed("layer-below",!0);Ee._imageLowerLayer=Ce.append("g").classed("imagelayer",!0),Ee._shapeLowerLayer=Ce.append("g").classed("shapelayer",!0),Ee._cartesianlayer=Ee._paper.append("g").classed("cartesianlayer",!0),Ee._polarlayer=Ee._paper.append("g").classed("polarlayer",!0),Ee._smithlayer=Ee._paper.append("g").classed("smithlayer",!0),Ee._ternarylayer=Ee._paper.append("g").classed("ternarylayer",!0),Ee._geolayer=Ee._paper.append("g").classed("geolayer",!0),Ee._funnelarealayer=Ee._paper.append("g").classed("funnelarealayer",!0),Ee._pielayer=Ee._paper.append("g").classed("pielayer",!0),Ee._iciclelayer=Ee._paper.append("g").classed("iciclelayer",!0),Ee._treemaplayer=Ee._paper.append("g").classed("treemaplayer",!0),Ee._sunburstlayer=Ee._paper.append("g").classed("sunburstlayer",!0),Ee._indicatorlayer=Ee._toppaper.append("g").classed("indicatorlayer",!0),Ee._glimages=Ee._paper.append("g").classed("glimages",!0);var Fe=Ee._toppaper.append("g").classed("layer-above",!0);Ee._imageUpperLayer=Fe.append("g").classed("imagelayer",!0),Ee._shapeUpperLayer=Fe.append("g").classed("shapelayer",!0),Ee._selectionLayer=Ee._toppaper.append("g").classed("selectionlayer",!0),Ee._infolayer=Ee._toppaper.append("g").classed("infolayer",!0),Ee._menulayer=Ee._toppaper.append("g").classed("menulayer",!0),Ee._zoomlayer=Ee._toppaper.append("g").classed("zoomlayer",!0),Ee._hoverlayer=Ee._hoverpaper.append("g").classed("hoverlayer",!0),Ee._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),me.emit("plotly_framework")}e.animate=Pt,e.addFrames=vt,e.deleteFrames=Tt,e.addTraces=H,e.deleteTraces=W,e.extendTraces=J,e.moveTraces=U,e.prependTraces=N,e.newPlot=z,e._doPlot=b,e.purge=st,e.react=Ze,e.redraw=P,e.relayout=se,e.restyle=V,e.setPlotConfig=A,e.update=oe,e._guiRelayout=te(se),e._guiRestyle=te(V),e._guiUpdate=te(oe),e._storeDirectGUIEdit=K}}),h0=ye({"src/snapshot/helpers.js"(e){"use strict";var r=li();e.getDelay=function(i){return i._has&&(i._has("gl3d")||i._has("map"))?500:0},e.getRedrawFunc=function(i){return function(){r.getComponentMethod("colorbar","draw")(i)}},e.encodeSVG=function(i){return"data:image/svg+xml,"+encodeURIComponent(i)},e.encodeJSON=function(i){return"data:application/json,"+encodeURIComponent(i)};var t=window.URL||window.webkitURL;e.createObjectURL=function(i){return t.createObjectURL(i)},e.revokeObjectURL=function(i){return t.revokeObjectURL(i)},e.createBlob=function(i,o){if(o==="svg")return new window.Blob([i],{type:"image/svg+xml;charset=utf-8"});if(o==="full-json")return new window.Blob([i],{type:"application/json;charset=utf-8"});var s=a(window.atob(i));return new window.Blob([s],{type:"image/"+o})},e.octetStream=function(i){document.location.href="data:application/octet-stream"+i},e.getPlotTitle=function(i){var o,s,l,n,u=i._fullLayout;if(u){var c=(o=u.title)==null?void 0:o.text;return c===((s=u._dfltTitle)==null?void 0:s.plot)?void 0:c}return(n=(l=i.layout)==null?void 0:l.title)==null?void 0:n.text},e.getPlotSubtitle=function(i){var o,s,l,n,u,c,f=i._fullLayout;if(f){var h=(s=(o=f.title)==null?void 0:o.subtitle)==null?void 0:s.text;return h===((l=f._dfltTitle)==null?void 0:l.subtitle)?void 0:h}return(c=(u=(n=i.layout)==null?void 0:n.title)==null?void 0:u.subtitle)==null?void 0:c.text};function a(i){for(var o=i.length,s=new ArrayBuffer(o),l=new Uint8Array(s),n=0;n{let v=_.toLowerCase();return c.includes(v)?_:f.includes(v)?"<":h.includes(v)?">":_.includes("<")||_.includes(">")?"":m.html(_).text()});return m.remove(),y}function p(g){return g.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}r.exports=function(m,y,_){var v=m._fullLayout,x=v._paper,E=v._toppaper,M=v.width,C=v.height,w;x.insert("rect",":first-child").call(i.setRect,0,0,M,C).call(o.fill,v.paper_bgcolor);var k=v._basePlotModules||[];for(w=0;w1&&C.push(d("object","layout"))),a.supplyDefaults(w);for(var b=w._fullData,S=k.length,A=0;AF.length&&M.push(d("unused",C,S.concat(F.length)));var L=F.length,B=Array.isArray(I);B&&(L=Math.min(L,I.length));var O,G,$,X,Z;if(D.dimensions===2)for(G=0;GF[G].length&&M.push(d("unused",C,S.concat(G,F[G].length)));var J=F[G].length;for(O=0;O<(B?Math.min(J,I[G].length):J);O++)$=B?I[G][O]:I,X=A[G][O],Z=F[G][O],t.validate(X,$)?Z!==X&&Z!==+X&&M.push(d("dynamic",C,S.concat(G,O),X,Z)):M.push(d("value",C,S.concat(G,O),X))}else M.push(d("array",C,S.concat(G),A[G]));else for(G=0;GP?M.push({code:"unused",traceType:A,templateCount:R,dataCount:P}):P>R&&M.push({code:"reused",traceType:A,templateCount:R,dataCount:P})}}function z(I,L){for(var B in I)if(B.charAt(0)!=="_"){var O=I[B],G=d(I,B,L);t(O)?(Array.isArray(I)&&O._template===!1&&O.templateitemname&&M.push({code:"missing",path:G,templateitemname:O.templateitemname}),z(O,G)):Array.isArray(O)&&p(O)&&z(O,G)}}if(z({data:w,layout:C},""),M.length)return M.map(g)};function p(m){for(var y=0;y=0;g--){var m=s[g];if(m.type==="scatter"&&m.xaxis===d.xaxis&&m.yaxis===d.yaxis){m.opacity=void 0;break}}}}}}}),Dte=ye({"src/traces/scatter/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=bA();r.exports=function(i,o){function s(n,u){return t.coerce(i,o,a,n,u)}var l=o.barmode==="group";o.scattermode==="group"&&s("scattergap",l?o.bargap:.2)}}}),op=ye({"src/plots/cartesian/align_period.js"(e,r){"use strict";var t=en(),a=Yt(),i=a.dateTime2ms,o=a.incrementMonth,s=Vn(),l=s.ONEAVGMONTH;r.exports=function(u,c,f,h){if(c.type!=="date")return{vals:h};var d=u[f+"periodalignment"];if(!d)return{vals:h};var p=u[f+"period"],g;if(t(p)){if(p=+p,p<=0)return{vals:h}}else if(typeof p=="string"&&p.charAt(0)==="M"){var m=+p.substring(1);if(m>0&&Math.round(m)===m)g=m;else return{vals:h}}for(var y=c.calendar,_=d==="start",v=d==="end",x=u[f+"period0"],E=i(x,y)||0,M=[],C=[],w=[],k=h.length,T=0;Tb;)F=o(F,-g,y);for(;F<=b;)F=o(F,g,y);A=o(F,-g,y)}else{for(S=Math.round((b-E)/p),F=E+S*p;F>b;)F-=p;for(;F<=b;)F+=p;A=F-p}M[T]=_?A:v?F:(A+F)/2,C[T]=A,w[T]=F}return{vals:M,starts:C,ends:w}}}}),Cd=ye({"src/traces/scatter/colorscale_calc.js"(e,r){"use strict";var t=xc().hasColorscale,a=Nc(),i=ms();r.exports=function(s,l){i.hasLines(l)&&t(l,"line")&&a(s,l,{vals:l.line.color,containerStr:"line",cLetter:"c"}),i.hasMarkers(l)&&(t(l,"marker")&&a(s,l,{vals:l.marker.color,containerStr:"marker",cLetter:"c"}),t(l,"marker.line")&&a(s,l,{vals:l.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Vp=ye({"src/traces/scatter/arrays_to_calcdata.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o){for(var s=0;sz&&A[L].gap;)L--;for(O=A[L].s,I=A.length-1;I>L;I--)A[I].s=O;for(;zX+G||!t($))}for(var J=0;JL(O))):L(P.text);let B=P.outsidetextfont.size*c*I+u;return{ppadplus:z.some(O=>O.s<0)?B:0,ppadminus:z.some(O=>O.s>=0)?B:0}}return{ppadplus:void 0,ppadminus:void 0}}function F(P,z,I,L){for(var B=R(L),O=0;OR[y]&&y0?s:l)/(y._m*x*(y._m>0?s:l)))),tt*=1e3}if(ct===i){if(v&&(ct=y.c2p(at.y,!0)),ct===i)return!1;ct*=1e3}return[tt,ct]}function Y(qe,at,tt,ct){var At=tt-qe,ft=ct-at,qt=.5-qe,ar=.5-at,mt=At*At+ft*ft,gt=At*qt+ft*ar;if(gt>0&>1||Math.abs(qt.y-tt[0][1])>1)&&(qt=[qt.x,qt.y],ct&&le(qt,qe)pe||qe[1]xe)return[c(qe[0],fe,pe),c(qe[1],we,xe)]}function Ue(qe,at){if(qe[0]===at[0]&&(qe[0]===fe||qe[0]===pe)||qe[1]===at[1]&&(qe[1]===we||qe[1]===xe))return!0}function Ge(qe,at){var tt=[],ct=Me(qe),At=Me(at);return ct&&At&&Ue(ct,At)||(ct&&tt.push(ct),At&&tt.push(At)),tt}function Ze(qe,at,tt){return function(ct,At){var ft=Me(ct),qt=Me(At),ar=[];if(ft&&qt&&Ue(ft,qt))return ar;ft&&ar.push(ft),qt&&ar.push(qt);var mt=2*n.constrain((ct[qe]+At[qe])/2,at,tt)-((ft||ct)[qe]+(qt||At)[qe]);if(mt){var gt;ft&&qt?gt=mt>0==ft[qe]>qt[qe]?ft:qt:gt=ft||qt,gt[qe]+=mt}return ar}}var Ke;T==="linear"||T==="spline"?Ke=Se:T==="hv"||T==="vh"?Ke=Ge:T==="hvh"?Ke=Ze(0,fe,pe):T==="vhv"&&(Ke=Ze(1,we,xe));function dt(qe,at){var tt=at[0]-qe[0],ct=(at[1]-qe[1])/tt,At=(qe[1]*at[0]-at[1]*qe[0])/tt;return At>0?[ct>0?fe:pe,xe]:[ct>0?pe:fe,we]}function _t(qe){var at=qe[0],tt=qe[1],ct=at===R[P-1][0],At=tt===R[P-1][1];if(!(ct&&At))if(P>1){var ft=at===R[P-2][0],qt=tt===R[P-2][1];ct&&(at===fe||at===pe)&&ft?qt?P--:R[P-1]=qe:At&&(tt===we||tt===xe)&&qt?ft?P--:R[P-1]=qe:R[P++]=qe}else R[P++]=qe}function Pt(qe){R[P-1][0]!==qe[0]&&R[P-1][1]!==qe[1]&&_t([ie,ee]),_t(qe),ce=null,ie=ee=0}var vt=n.isArrayOrTypedArray(C);function Tt(qe){if(qe&&M&&(qe.i=z,qe.d=d,qe.trace=g,qe.marker=vt?C[qe.i]:C,qe.backoff=M),K=qe[0]/x,re=qe[1]/E,oe=qe[0]pe?pe:0,te=qe[1]xe?xe:0,oe||te){if(!P)R[P++]=[oe||qe[0],te||qe[1]];else if(ce){var at=Ke(ce,qe);at.length>1&&(Pt(at[0]),R[P++]=at[1])}else _e=Ke(R[P-1],qe)[0],R[P++]=_e;var tt=R[P-1];oe&&te&&(tt[0]!==oe||tt[1]!==te)?(ce&&(ie!==oe&&ee!==te?_t(ie&&ee?dt(ce,qe):[ie||oe,ee||te]):ie&&ee&&_t([ie,ee])),_t([oe,te])):ie-oe&&ee-te&&_t([oe||ie,te||ee]),ce=qe,ie=oe,ee=te}else ce&&Pt(Ke(ce,qe)[0]),R[P++]=qe}for(z=0;zse(G,st))break;L=G,W=Z[0]*X[0]+Z[1]*X[1],W>N?(N=W,B=G,$=!1):W=d.length||!G)break;Tt(G),I=G}}ce&&_t([ie||ce[0],ee||ce[1]]),A.push(R.slice(0,P))}var Ve=T.slice(T.length-1);if(M&&Ve!=="h"&&Ve!=="v"){for(var Ye=!1,me=-1,be=[],Ee=0;Ee=0?f=m:(f=m=g,g++),f0,T=c(m,y,_);if(M=v.selectAll("g.trace").data(T,function(S){return S[0].trace.uid}),M.enter().append("g").attr("class",function(S){return"trace scatter trace"+S[0].trace.uid}).style("stroke-miterlimit",2),M.order(),h(m,M,y),k){E&&(C=E());var b=t.transition().duration(x.duration).ease(x.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});b.each(function(){v.selectAll("g.trace").each(function(S,A){d(m,A,y,S,T,this,x)})})}else M.each(function(S,A){d(m,A,y,S,T,this,x)});w&&M.exit().remove(),v.selectAll("path:not([d])").remove()};function h(g,m,y){m.each(function(_){var v=o(t.select(this),"g","fills");l.setClipUrl(v,y.layerClipId,g);var x=_[0].trace;x._ownFill=null,x._nextFill=null;var E=[];x._ownfill&&E.push("_ownFill"),x._nexttrace&&E.push("_nextFill");var M=v.selectAll("g").data(E,s);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){x[C]=o(t.select(this),"path","js-fill")})})}function d(g,m,y,_,v,x,E){var M=g._context.staticPlot,C;p(g,m,y,_,v);var w=!!E&&E.duration>0;function k(_t){return w?_t.transition():_t}var T=y.xaxis,b=y.yaxis,S=_[0].trace,A=S.line,F=t.select(x),D=o(F,"g","errorbars"),R=o(F,"g","lines"),P=o(F,"g","points"),z=o(F,"g","text");if(a.getComponentMethod("errorbars","plot")(g,D,y,E),S.visible!==!0)return;k(F).style("opacity",S.opacity);var I,L,B=S.fill.charAt(S.fill.length-1);B!=="x"&&B!=="y"&&(B="");var O,G;B==="y"?(O=1,G=b.c2p(0,!0)):B==="x"&&(O=0,G=T.c2p(0,!0)),_[0][y.isRangePlot?"nodeRangePlot3":"node3"]=F;var $="",X=[],Z=S._prevtrace,J=null,N=null;Z&&($=Z._prevRevpath||"",L=Z._nextFill,X=Z._ownPolygons,J=Z._fillsegments,N=Z._fillElement);var H,W,U="",V="",j,q,Y,K,re,se,le=[];S._polygons=[];var ue=[],fe=[],pe=i.noop;if(I=S._ownFill,n.hasLines(S)||S.fill!=="none"){L&&L.datum(_),["hv","vh","hvh","vhv"].indexOf(A.shape)!==-1?(j=l.steps(A.shape),q=l.steps(A.shape.split("").reverse().join(""))):A.shape==="spline"?j=q=function(_t){var Pt=_t[_t.length-1];return _t.length>1&&_t[0][0]===Pt[0]&&_t[0][1]===Pt[1]?l.smoothclosed(_t.slice(1),A.smoothing):l.smoothopen(_t,A.smoothing)}:j=q=function(_t){return"M"+_t.join("L")},Y=function(_t){return q(_t.reverse())},fe=u(_,{xaxis:T,yaxis:b,trace:S,connectGaps:S.connectgaps,baseTolerance:Math.max(A.width||1,3)/4,shape:A.shape,backoff:A.backoff,simplify:A.simplify,fill:S.fill}),ue=new Array(fe.length);var we=0;for(C=0;C=M[0]&&F.x<=M[1]&&F.y>=C[0]&&F.y<=C[1]}),b=Math.ceil(T.length/k),S=0;v.forEach(function(F,D){var R=F[0].trace;n.hasMarkers(R)&&R.marker.maxdisplayed>0&&D=Math.min(Z,J)&&y<=Math.max(Z,J)?0:1/0}var N=Math.max(3,X.mrc||0),H=1-1/N,W=Math.abs(g.c2p(X.x)-y);return W=Math.min(Z,J)&&_<=Math.max(Z,J)?0:1/0}var N=Math.max(3,X.mrc||0),H=1-1/N,W=Math.abs(m.c2p(X.y)-_);return WV!=ue>=V&&(re=Y[q-1][0],se=Y[q][0],ue-le&&(K=re+(se-re)*(V-le)/(ue-le),N=Math.min(N,K),H=Math.max(H,K)));return N=Math.max(N,0),H=Math.min(H,g._length),{x0:N,x1:H,y0:V,y1:V}}if(x.indexOf("fills")!==-1&&p._fillElement){var O=L(p._fillElement)&&!L(p._fillExclusionElement);if(O){var G=B(p._polygons);G===null&&(G={x0:v[0],x1:v[0],y0:v[1],y1:v[1]});var $=s.defaultLine;return s.opacity(p.fillcolor)?$=p.fillcolor:s.opacity((p.line||{}).color)&&($=p.line.color),t.extendFlat(u,{distance:u.maxHoverDistance,x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1,color:$,hovertemplate:!1}),delete u.index,p.text&&!t.isArrayOrTypedArray(p.text)?u.text=String(p.text):u.text=p.name,[u]}}}}}),Im=ye({"src/traces/scatter/select.js"(e,r){"use strict";var t=ms();r.exports=function(i,o){var s=i.cd,l=i.xaxis,n=i.yaxis,u=[],c=s[0].trace,f,h,d,p,g=c.mode&&!t.hasMarkers(c)&&!t.hasText(c);if(g)return[];if(o===!1)for(f=0;f0&&(h["_"+c+"axes"]||{})[u])return h;if((h[c+"axis"]||c)===u){if(l(h,c))return h;if((h[c]||[]).length||h[c+"0"])return h}}}function s(n){return{v:"x",h:"y"}[n.orientation||"v"]}function l(n,u){var c=s(n),f=t(n,"box-violin");return f&&u===c&&n[c]===void 0&&n[c+"0"]===void 0}}}),zA=ye({"src/plots/cartesian/category_order_defaults.js"(e,r){"use strict";var t=yc().isTypedArraySpec;function a(i,o){var s=o.dataAttr||i._id.charAt(0),l={},n,u,c;if(o.axData)n=o.axData;else for(n=[],u=0;u0||t(u),f;c&&(f="array");var h=l("categoryorder",f),d;h==="array"&&(d=l("categoryarray")),!c&&h==="array"&&(h=s.categoryorder="trace"),h==="trace"?s._initialCategories=[]:h==="array"?s._initialCategories=d.slice():(d=a(s,n).sort(),h==="category ascending"?s._initialCategories=d:h==="category descending"&&(s._initialCategories=d.reverse()))}}}}),rb=ye({"src/plots/cartesian/line_grid_defaults.js"(e,r){"use strict";var t=Ya(),a=Wl(),i=Yt();r.exports=function(s,l,n,u){u=u||{};var c=u.dfltColor;function f(A,F){return i.coerce2(s,l,u.attributes,A,F)}var h=f("linecolor",c),d=f("linewidth"),p=n("showline",u.showLine||!!h||!!d);p||(delete l.linecolor,delete l.linewidth);var g=t.mix(c,u.bgColor,u.blend||a.lightFraction),m=f("gridcolor",g),y=f("gridwidth"),_=f("griddash"),v=n("showgrid",u.showGrid||!!m||!!y||!!_);if(v||(delete l.gridcolor,delete l.gridwidth,delete l.griddash),u.hasMinor){var x=t.mix(l.gridcolor,u.bgColor,67),E=f("minor.gridcolor",x),M=f("minor.gridwidth",l.gridwidth||1),C=f("minor.griddash",l.griddash||"solid"),w=n("minor.showgrid",!!E||!!M||!!C);w||(delete l.minor.gridcolor,delete l.minor.gridwidth,delete l.minor.griddash)}if(!u.noZeroLine){var k=f("zerolinelayer"),T=f("zerolinecolor",c),b=f("zerolinewidth"),S=n("zeroline",u.showGrid||!!T||!!b);S||(delete l.zerolinelayer,delete l.zerolinecolor,delete l.zerolinewidth)}}}}),ab=ye({"src/plots/cartesian/axis_defaults.js"(e,r){"use strict";var t=en(),a=li(),i=Yt(),o=ko(),s=Oc(),l=Gu(),n=km(),u=my(),c=Av(),f=Tv(),h=zA(),d=rb(),p=KD(),g=Op(),m=$l().WEEKDAY_PATTERN,y=$l().HOUR_PATTERN;r.exports=function(M,C,w,k,T){var b=k.letter,S=k.font||{},A=k.splomStash||{},F=w("visible",!k.visibleDflt),D=C._template||{},R=C.type||D.type||"-",P;if(R==="date"){var z=a.getComponentMethod("calendars","handleDefaults");z(M,C,"calendar",k.calendar),k.noTicklabelmode||(P=w("ticklabelmode"))}!k.noTicklabelindex&&(R==="date"||R==="linear")&&w("ticklabelindex");var I="";(!k.noTicklabelposition||R==="multicategory")&&(I=i.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:P==="period"?["outside","inside"]:b==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),k.noTicklabeloverflow||w("ticklabeloverflow",I.indexOf("inside")!==-1?"hide past domain":R==="category"||R==="multicategory"?"allow":"hide past div"),g(C,T),p(M,C,w,k),h(M,C,w,k),k.noHover||(R!=="category"&&w("hoverformat"),k.noUnifiedhovertitle||w("unifiedhovertitle.text"));var L=w("color"),B=L!==l.color.dflt?L:S.color,O=A.label||T._dfltTitle[b];if(f(M,C,w,R,k),!F)return C;w("title.text",O),i.coerceFont(w,"title.font",S,{overrideDflt:{size:i.bigFont(S.size),color:B}}),n(M,C,w,R);var G=k.hasMinor;if(G&&(o.newContainer(C,"minor"),n(M,C,w,R,{isMinor:!0})),c(M,C,w,R,k),u(M,C,w,k),G){var $=k.isMinor;k.isMinor=!0,u(M,C,w,k),k.isMinor=$}d(M,C,w,{dfltColor:L,bgColor:k.bgColor,showGrid:k.showGrid,hasMinor:G,attributes:l}),G&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&w("mirror");var X=R==="multicategory";if(!k.noTickson&&(R==="category"||X)&&(C.ticks||C.showgrid)&&(X?(w("tickson","boundaries"),delete C.ticklabelposition):w("tickson")),X){var Z=w("showdividers");Z&&(w("dividercolor"),w("dividerwidth"))}if(R==="date")if(s(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:_}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var J=0;J=2){var b="",S,A;if(T.length===2){for(S=0;S<2;S++)if(A=x(T[S]),A){b=m;break}}var F=w("pattern",b);if(F===m)for(S=0;S<2;S++)A=x(T[S]),A&&(M.bounds[S]=T[S]=A-1);if(F)for(S=0;S<2;S++)switch(A=T[S],F){case m:if(!t(A)){M.enabled=!1;return}if(A=+A,A!==Math.floor(A)||A<0||A>=7){M.enabled=!1;return}M.bounds[S]=T[S]=A;break;case y:if(!t(A)){M.enabled=!1;return}if(A=+A,A<0||A>24){M.enabled=!1;return}M.bounds[S]=T[S]=A;break}if(C.autorange===!1){var D=C.range;if(D[0]D[1]){M.enabled=!1;return}}else if(T[0]>D[0]&&T[1]w[1]-1/4096&&(s.domain=g),a.noneOrAll(o.domain,s.domain,g),s.tickmode==="sync"&&(s.tickmode="auto")}return l("layer"),s}}}),Ite=ye({"src/plots/cartesian/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=Bf().isUnifiedHover,o=n9(),s=ko(),l=dy(),n=Gu(),u=M9(),c=ab(),f=Dm(),h=BA(),d=Gs(),p=d.id2name,g=d.name2id,m=$l().AX_ID_PATTERN,y=li(),_=y.traceIs,v=y.getComponentMethod;function x(E,M,C){Array.isArray(E[M])?E[M].push(C):E[M]=[C]}r.exports=function(M,C,w){var k=C.autotypenumbers,T={},b={},S={},A={},F={},D={},R={},P={},z={},I={},L,B;for(L=0;L rect").call(o.setTranslate,0,0).call(o.setScale,1,1),C.plot.call(o.setTranslate,w._offset,k._offset).call(o.setScale,1,1);var T=C.plot.selectAll(".scatterlayer .trace");T.selectAll(".point").call(o.setPointGroupScale,1,1),T.selectAll(".textpoint").call(o.setTextPointsScale,1,1),T.call(o.hideOutsideRangePoints,C)}function p(C,w){var k=C.plotinfo,T=k.xaxis,b=k.yaxis,S=T._length,A=b._length,F=!!C.xr1,D=!!C.yr1,R=[];if(F){var P=i.simpleMap(C.xr0,T.r2l),z=i.simpleMap(C.xr1,T.r2l),I=P[1]-P[0],L=z[1]-z[0];R[0]=(P[0]*(1-w)+w*z[0]-P[0])/(P[1]-P[0])*S,R[2]=S*(1-w+w*L/I),T.range[0]=T.l2r(P[0]*(1-w)+w*z[0]),T.range[1]=T.l2r(P[1]*(1-w)+w*z[1])}else R[0]=0,R[2]=S;if(D){var B=i.simpleMap(C.yr0,b.r2l),O=i.simpleMap(C.yr1,b.r2l),G=B[1]-B[0],$=O[1]-O[0];R[1]=(B[1]*(1-w)+w*O[1]-B[1])/(B[0]-B[1])*A,R[3]=A*(1-w+w*$/G),b.range[0]=T.l2r(B[0]*(1-w)+w*O[0]),b.range[1]=b.l2r(B[1]*(1-w)+w*O[1])}else R[1]=0,R[3]=A;s.drawOne(n,T,{skipTitle:!0}),s.drawOne(n,b,{skipTitle:!0}),s.redrawComponents(n,[T._id,b._id]);var X=F?S/R[2]:1,Z=D?A/R[3]:1,J=F?R[0]:0,N=D?R[1]:0,H=F?R[0]/R[2]*S:0,W=D?R[1]/R[3]*A:0,U=T._offset-H,V=b._offset-W;k.clipRect.call(o.setTranslate,J,N).call(o.setScale,1/X,1/Z),k.plot.call(o.setTranslate,U,V).call(o.setScale,X,Z),o.setPointGroupScale(k.zoomScalePts,1/X,1/Z),o.setTextPointsScale(k.zoomScaleTxt,1/X,1/Z)}var g;f&&(g=f());function m(){for(var C={},w=0;wc.duration?(m(),x=window.cancelAnimationFrame(M)):x=window.requestAnimationFrame(M)}return _=Date.now(),x=window.requestAnimationFrame(M),Promise.resolve()}}}),Ml=ye({"src/plots/cartesian/index.js"(e){"use strict";var r=ai(),t=li(),a=Yt(),i=ws(),o=$i(),s=_c().getModuleCalcData,l=Gs(),n=$l(),u=Sd(),c=a.ensureSingle;function f(_,v,x){return a.ensureSingle(_,v,x,function(E){E.datum(x)})}var h=n.zindexSeparator;e.name="cartesian",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=n.idRegex,e.attrRegex=n.attrRegex,e.attributes=Pte(),e.layoutAttributes=Gu(),e.supplyLayoutDefaults=Ite(),e.transitionAxes=Rte(),e.finalizeSubplots=function(_,v){var x=v._subplots,E=x.xaxis,M=x.yaxis,C=x.cartesian,w=C,k={},T={},b,S,A;for(b=0;b0){var D=F.id;if(D.indexOf(h)!==-1)continue;D+=h+(b+1),F=a.extendFlat({},F,{id:D,plot:M._cartesianlayer.selectAll(".subplot").select("."+D)})}for(var R=[],P,z=0;z1&&(G+=h+O),B.push(k+G),w=0;w1,A=v.mainplotinfo;if(!v.mainplot||S)if(b)v.xlines=c(E,"path","xlines-above"),v.ylines=c(E,"path","ylines-above"),v.xaxislayer=c(E,"g","xaxislayer-above"),v.yaxislayer=c(E,"g","yaxislayer-above");else{if(!w){var F=c(E,"g","layer-subplot");v.shapelayer=c(F,"g","shapelayer"),v.imagelayer=c(F,"g","imagelayer"),A&&S?(v.minorGridlayer=A.minorGridlayer,v.gridlayer=A.gridlayer,v.zerolinelayer=A.zerolinelayer):(v.minorGridlayer=c(E,"g","minor-gridlayer"),v.gridlayer=c(E,"g","gridlayer"),v.zerolinelayer=c(E,"g","zerolinelayer"));var D=c(E,"g","layer-between");v.shapelayerBetween=c(D,"g","shapelayer"),v.imagelayerBetween=c(D,"g","imagelayer"),c(E,"path","xlines-below"),c(E,"path","ylines-below"),v.overlinesBelow=c(E,"g","overlines-below"),c(E,"g","xaxislayer-below"),c(E,"g","yaxislayer-below"),v.overaxesBelow=c(E,"g","overaxes-below")}v.overplot=c(E,"g","overplot"),v.plot=c(v.overplot,"g",M),A&&S?v.zerolinelayerAbove=A.zerolinelayerAbove:v.zerolinelayerAbove=c(E,"g","zerolinelayer-above"),w||(v.xlines=c(E,"path","xlines-above"),v.ylines=c(E,"path","ylines-above"),v.overlinesAbove=c(E,"g","overlines-above"),c(E,"g","xaxislayer-above"),c(E,"g","yaxislayer-above"),v.overaxesAbove=c(E,"g","overaxes-above"),v.xlines=E.select(".xlines-"+k),v.ylines=E.select(".ylines-"+T),v.xaxislayer=E.select(".xaxislayer-"+k),v.yaxislayer=E.select(".yaxislayer-"+T))}else{var R=A.plotgroup,P=M+"-x",z=M+"-y";v.minorGridlayer=A.minorGridlayer,v.gridlayer=A.gridlayer,v.zerolinelayer=A.zerolinelayer,v.zerolinelayerAbove=A.zerolinelayerAbove,c(A.overlinesBelow,"path",P),c(A.overlinesBelow,"path",z),c(A.overaxesBelow,"g",P),c(A.overaxesBelow,"g",z),v.plot=c(A.overplot,"g",M),c(A.overlinesAbove,"path",P),c(A.overlinesAbove,"path",z),c(A.overaxesAbove,"g",P),c(A.overaxesAbove,"g",z),v.xlines=R.select(".overlines-"+k).select("."+P),v.ylines=R.select(".overlines-"+T).select("."+z),v.xaxislayer=R.select(".overaxes-"+k).select("."+P),v.yaxislayer=R.select(".overaxes-"+T).select("."+z)}w||(b||(f(v.minorGridlayer,"g",v.xaxis._id),f(v.minorGridlayer,"g",v.yaxis._id),v.minorGridlayer.selectAll("g").map(function(I){return I[0]}).sort(l.idSort),f(v.gridlayer,"g",v.xaxis._id),f(v.gridlayer,"g",v.yaxis._id),v.gridlayer.selectAll("g").map(function(I){return I[0]}).sort(l.idSort)),v.xlines.style("fill","none").classed("crisp",!0),v.ylines.style("fill","none").classed("crisp",!0))}function m(_,v){if(_){var x={};_.each(function(T){var b=T[0],S=r.select(this);S.remove(),y(b,v),x[b]=!0});for(var E in v._plots)for(var M=v._plots[E],C=M.overlays||[],w=0;w=0,v=f.indexOf("end")>=0,x=p.backoff*m+h.standoff,E=g.backoff*y+h.startstandoff,M,C,w,k;if(d.nodeName==="line"){M={x:+c.attr("x1"),y:+c.attr("y1")},C={x:+c.attr("x2"),y:+c.attr("y2")};var T=M.x-C.x,b=M.y-C.y;if(w=Math.atan2(b,T),k=w+Math.PI,x&&E&&x+E>Math.sqrt(T*T+b*b)){G();return}if(x){if(x*x>T*T+b*b){G();return}var S=x*Math.cos(w),A=x*Math.sin(w);C.x+=S,C.y+=A,c.attr({x2:C.x,y2:C.y})}if(E){if(E*E>T*T+b*b){G();return}var F=E*Math.cos(w),D=E*Math.sin(w);M.x-=F,M.y-=D,c.attr({x1:M.x,y1:M.y})}}else if(d.nodeName==="path"){var R=d.getTotalLength(),P="";if(R2/3?kt="right":kt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[kt]}for(var _e=!1,Se=["x","y"],Me=0;Me1)&&(Ze===Ge?(Fe=Ke.r2fraction(E["a"+Ue]),(Fe<0||Fe>1)&&(_e=!0)):_e=!0),Ye=Ke._offset+Ke.r2p(E[Ue]),Ee=.5}else{var Je=Ce==="domain";Ue==="x"?(be=E[Ue],Ye=Je?Ke._offset+Ke._length*be:Ye=b.l+b.w*be):(be=1-E[Ue],Ye=Je?Ke._offset+Ke._length*be:Ye=b.t+b.h*be),Ee=E.showarrow?.5:be}if(E.showarrow){Ve.head=Ye;var qe=E["a"+Ue];if(De=_t*ce(.5,E.xanchor)-Pt*ce(.5,E.yanchor),Ze===Ge){var at=l.getRefType(Ze);at==="domain"?(Ue==="y"&&(qe=1-qe),Ve.tail=Ke._offset+Ke._length*qe):at==="paper"?Ue==="y"?(qe=1-qe,Ve.tail=b.t+b.h*qe):Ve.tail=b.l+b.w*qe:Ve.tail=Ke._offset+Ke.r2p(qe),me=De}else Ve.tail=Ye+qe,me=De+qe;Ve.text=Ve.tail+De;var tt=T[Ue==="x"?"width":"height"];if(Ge==="paper"&&(Ve.head=o.constrain(Ve.head,1,tt-1)),Ze==="pixel"){var ct=-Math.max(Ve.tail-3,Ve.text),At=Math.min(Ve.tail+3,Ve.text)-tt;ct>0?(Ve.tail+=ct,Ve.text+=ct):At>0&&(Ve.tail-=At,Ve.text-=At)}Ve.tail+=st,Ve.head+=st}else De=vt*ce(Ee,Tt),me=De,Ve.text=Ye+De;Ve.text+=st,De+=st,me+=st,E["_"+Ue+"padplus"]=vt/2+me,E["_"+Ue+"padminus"]=vt/2-me,E["_"+Ue+"size"]=vt,E["_"+Ue+"shift"]=De}if(_e){J.remove();return}var ft=0,qt=0;if(E.align!=="left"&&(ft=(oe-xe)*(E.align==="center"?.5:1)),E.valign!=="top"&&(qt=(te-he)*(E.valign==="middle"?.5:1)),pe)fe.select("svg").attr({x:W+ft-1,y:W+qt}).call(u.setClipUrl,V?I:null,x);else{var ar=W+qt-we.top,mt=W+ft-we.left;K.call(f.positionText,mt,ar).call(u.setClipUrl,V?I:null,x)}j.select("rect").call(u.setRect,W,W,oe,te),U.call(u.setRect,N/2,N/2,ie-N,ee-N),J.call(u.setTranslate,Math.round(L.x.text-ie/2),Math.round(L.y.text-ee/2)),G.attr({transform:"rotate("+B+","+L.x.text+","+L.y.text+")"});var gt=function(Dt,kt){O.selectAll(".annotation-arrow-g").remove();var Vt=L.x.head,lr=L.y.head,dr=L.x.tail+Dt,yr=L.y.tail+kt,vr=L.x.text+Dt,Fr=L.y.text+kt,la=o.rotationXYMatrix(B,vr,Fr),Hr=o.apply2DTransform(la),jr=o.apply2DTransform2(la),Oa=+U.attr("width"),Da=+U.attr("height"),_i=vr-.5*Oa,ti=_i+Oa,Ka=Fr-.5*Da,ia=Ka+Da,na=[[_i,Ka,_i,ia],[_i,ia,ti,ia],[ti,ia,ti,Ka],[ti,Ka,_i,Ka]].map(jr);if(!na.reduce(function(Be,et){return Be^!!o.segmentsIntersect(Vt,lr,Vt+1e6,lr+1e6,et[0],et[1],et[2],et[3])},!1)){na.forEach(function(Be){var et=o.segmentsIntersect(dr,yr,Vt,lr,Be[0],Be[1],Be[2],Be[3]);et&&(dr=et.x,yr=et.y)});var xi=E.arrowwidth,Yi=E.arrowcolor,Qr=E.arrowside,Nr=O.append("g").style({opacity:n.opacity(Yi)}).classed("annotation-arrow-g",!0),Oe=Nr.append("path").attr("d","M"+dr+","+yr+"L"+Vt+","+lr).style("stroke-width",xi+"px").call(n.stroke,n.rgb(Yi));if(g(Oe,Qr,E),S.annotationPosition&&Oe.node().parentNode&&!C){var Ie=Vt,Et=lr;if(E.standoff){var Mt=Math.sqrt(Math.pow(Vt-dr,2)+Math.pow(lr-yr,2));Ie+=E.standoff*(dr-Vt)/Mt,Et+=E.standoff*(yr-lr)/Mt}var zt=Nr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(dr-Ie)+","+(yr-Et),transform:s(Ie,Et)}).style("stroke-width",xi+6+"px").call(n.stroke,"rgba(0,0,0,0)").call(n.fill,"rgba(0,0,0,0)"),Gt,Ht;d.init({element:zt.node(),gd:x,prepFn:function(){var Be=u.getTranslate(J);Gt=Be.x,Ht=Be.y,w&&w.autorange&&R(w._name+".autorange",!0),k&&k.autorange&&R(k._name+".autorange",!0)},moveFn:function(Be,et){var ut=Hr(Gt,Ht),bt=ut[0]+Be,Ot=ut[1]+et;J.call(u.setTranslate,bt,Ot),P("x",_(w,Be,"x",b,E)),P("y",_(k,et,"y",b,E)),E.axref===E.xref&&P("ax",_(w,Be,"ax",b,E)),E.ayref===E.yref&&P("ay",_(k,et,"ay",b,E)),Nr.attr("transform",s(Be,et)),G.attr({transform:"rotate("+B+","+bt+","+Ot+")"})},doneFn:function(){a.call("_guiRelayout",x,z());var Be=document.querySelector(".js-notes-box-panel");Be&&Be.redraw(Be.selectedObj)}})}}};if(E.showarrow&>(0,0),$){var St;d.init({element:J.node(),gd:x,prepFn:function(){St=G.attr("transform")},moveFn:function(Dt,kt){var Vt="pointer";if(E.showarrow)E.axref===E.xref?P("ax",_(w,Dt,"ax",b,E)):P("ax",E.ax+Dt),E.ayref===E.yref?P("ay",_(k,kt,"ay",b.w,E)):P("ay",E.ay+kt),gt(Dt,kt);else{if(C)return;var lr,dr;if(w)lr=_(w,Dt,"x",b,E);else{var yr=E._xsize/b.w,vr=E.x+(E._xshift-E.xshift)/b.w-yr/2;lr=d.align(vr+Dt/b.w,yr,0,1,E.xanchor)}if(k)dr=_(k,kt,"y",b,E);else{var Fr=E._ysize/b.h,la=E.y-(E._yshift+E.yshift)/b.h-Fr/2;dr=d.align(la-kt/b.h,Fr,0,1,E.yanchor)}P("x",lr),P("y",dr),(!w||!k)&&(Vt=d.getCursor(w?.5:lr,k?.5:dr,E.xanchor,E.yanchor))}G.attr({transform:s(Dt,kt)+St}),h(J,Vt)},clickFn:function(Dt,kt){E.captureevents&&x.emit("plotly_clickannotation",Z(kt))},doneFn:function(){h(J),a.call("_guiRelayout",x,z());var Dt=document.querySelector(".js-notes-box-panel");Dt&&Dt.redraw(Dt.selectedObj)}})}}S.annotationText?K.call(f.makeEditable,{delegate:J,gd:x}).call(re).on("edit",function(le){E.text=le,this.call(re),P("text",le),w&&w.autorange&&R(w._name+".autorange",!0),k&&k.autorange&&R(k._name+".autorange",!0),a.call("_guiRelayout",x,z())}):K.call(re)}}}),Ote=ye({"src/components/annotations/click.js"(e,r){"use strict";var t=Yt(),a=li(),i=ko().arrayEditor;r.exports={hasClickToShow:o,onClick:s};function o(u,c){var f=l(u,c);return f.on.length>0||f.explicitOff.length>0}function s(u,c){var f=l(u,c),h=f.on,d=f.off.concat(f.explicitOff),p={},g=u._fullLayout.annotations,m,y;if(h.length||d.length){for(m=0;m1){h=!0;break}}h?s.fullLayout._infolayer.select(".annotation-"+s.id+'[data-index="'+c+'"]').remove():(f._pdata=a(s.glplot.cameraParams,[l.xaxis.r2l(f.x)*n[0],l.yaxis.r2l(f.y)*n[1],l.zaxis.r2l(f.z)*n[2]]),t(s.graphDiv,f,c,s.id,f._xa,f._ya))}}}}),Wte=ye({"src/components/annotations3d/index.js"(e,r){"use strict";var t=li(),a=Yt();r.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:NA()}}},layoutAttributes:NA(),handleDefaults:Vte(),includeBasePlot:i,convert:Gte(),draw:Hte()};function i(o,s){var l=t.subplotsRegistry.gl3d;if(l)for(var n=l.attrRegex,u=Object.keys(o),c=0;c{var A=S+"anchor",F=S==="x"?x:E,D={_fullLayout:f},R,P,z,I;let L=S+"ref",B=u[L];if(Array.isArray(B)&&B.length>0){let O=s.countDefiningCoords(y,g,S);I=a.coerceRefArray(u,c,D,S,void 0,"paper",O),c["_"+S+"refArray"]=!0}else I=a.coerceRef(u,c,D,S,void 0,"paper");if(Array.isArray(I))I.forEach(function(O){a.getRefType(O)==="range"&&(R=a.getFromId(D,O),R&&R._shapeIndices.indexOf(c._index)===-1&&R._shapeIndices.push(c._index))}),_&&[0,1].forEach(function(O){let G=I[O];a.getRefType(G)==="range"?(R=a.getFromId(D,G),P=s.shapePositionToRange(R),z=s.rangeToShapePosition(R),(R.type==="category"||R.type==="multicategory")&&h(S+O+"shift")):P=z=t.identity;let X=S+O,Z=u[X];if(u[X]=P(u[X],!0),F==="pixel"?h(X,C[O]):a.coercePosition(c,D,h,G,X,M[O]),c[X]=z(c[X]),u[X]=Z,O===0&&F==="pixel"){let J=u[A];u[A]=P(u[A],!0),a.coercePosition(c,D,h,G,A,.25),c[A]=z(c[A]),u[A]=J}});else{if(a.getRefType(I)==="range"?(R=a.getFromId(D,I),R._shapeIndices.push(c._index),z=s.rangeToShapePosition(R),P=s.shapePositionToRange(R),_&&(R.type==="category"||R.type==="multicategory")&&(h(S+"0shift"),h(S+"1shift"))):P=z=t.identity,_){let G=S+"0",$=S+"1",X=u[G],Z=u[$];u[G]=P(u[G],!0),u[$]=P(u[$],!0),F==="pixel"?(h(G,C[0]),h($,C[1])):(a.coercePosition(c,D,h,I,G,M[0]),a.coercePosition(c,D,h,I,$,M[1])),c[G]=z(c[G]),c[$]=z(c[$]),u[G]=X,u[$]=Z}if(F==="pixel"){let G=u[A];u[A]=P(u[A],!0),a.coercePosition(c,D,h,I,A,.25),c[A]=z(c[A]),u[A]=G}}}),_&&t.noneOrAll(u,c,["x0","x1","y0","y1"]);var w=y==="line",k,T;if(_&&(k=h("label.texttemplate"),h("label.texttemplatefallback")),k||(T=h("label.text")),T||k){h("label.textangle");var b=h("label.textposition",w?"middle":"middle center");h("label.xanchor"),h("label.yanchor",l(w,b)),h("label.padding"),t.coerceFont(h,"label.font",f.font)}}}}),Yte=ye({"src/components/shapes/draw_newshape/defaults.js"(e,r){"use strict";var t=Ya(),a=Yt();function i(o,s){return o?"bottom":s.indexOf("top")!==-1?"top":s.indexOf("bottom")!==-1?"bottom":"middle"}r.exports=function(s,l,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),a.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var u=n("newshape.line.width");if(u){var c=(s||{}).plot_bgcolor||"#FFF";n("newshape.line.color",t.contrast(c)),n("newshape.line.dash")}var f=s.dragmode==="drawline",h=n("newshape.label.text"),d=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),h||d){n("newshape.label.textangle");var p=n("newshape.label.textposition",f?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",i(f,p)),n("newshape.label.padding"),a.coerceFont(n,"newshape.label.font",l.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}}}),Xte=ye({"src/components/shapes/calc_autorange.js"(e,r){"use strict";var t=Yt(),a=qi(),i=Kx(),o=Sv();r.exports=function(h){var d=h._fullLayout,p=t.filterVisible(d.shapes);if(!(!p.length||!h._fullData.length))for(var g=0;g{y=a.getFromId(h,M),m._extremes[y._id]=a.findExtremes(y,C,l(m))})}else m.xref!=="paper"&&v!=="domain"&&(y=a.getFromId(h,m.xref),_=c(y,m,i.paramIsX),_&&(m._extremes[y._id]=a.findExtremes(y,_,l(m))));if(x==="array"){let E=s(h,m,"y");Object.entries(E).forEach(([M,C])=>{y=a.getFromId(h,M),m._extremes[y._id]=a.findExtremes(y,C,n(m))})}else m.yref!=="paper"&&x!=="domain"&&(y=a.getFromId(h,m.yref),_=c(y,m,i.paramIsY),_&&(m._extremes[y._id]=a.findExtremes(y,_,n(m))))}};function s(f,h,d){let p=h[d+"ref"],g=d==="x"?i.paramIsX:i.paramIsY;function m(M,C){M==="paper"||a.getRefType(M)==="domain"||(y[M]||(y[M]=[]),y[M].push(C))}let y={};if(h.type==="path"&&h.path){let M=h.path.match(i.segmentRE)||[];for(var _=0,v=0;vk&&(m(p[_],T[k]),_++)}}else m(p[0],h[d+"0"]),m(p[1],h[d+"1"]);let x={};for(let M in y){let C=a.getFromId(f,M);if(C){var E=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(E=o.decodeDate(E)),x[C._id]=y[M].map(E)}}return x}function l(f){return u(f.line.width,f.xsizemode,f.x0,f.x1,f.path,!1)}function n(f){return u(f.line.width,f.ysizemode,f.y0,f.y1,f.path,!0)}function u(f,h,d,p,g,m){var y=f/2,_=m;if(h==="pixel"){var v=g?o.extractPathCoords(g,m?i.paramIsY:i.paramIsX):[d,p],x=t.aggNums(Math.max,null,v),E=t.aggNums(Math.min,null,v),M=E<0?Math.abs(E)+y:y,C=x>0?x+y:y;return{ppad:y,ppadplus:_?M:C,ppadminus:_?C:M}}else return{ppad:y}}function c(f,h,d){var p=f._id.charAt(0)==="x"?"x":"y",g=f.type==="category"||f.type==="multicategory",m,y,_=0,v=0,x=g?f.r2c:f.d2c,E=h[p+"sizemode"]==="scaled";if(E?(m=h[p+"0"],y=h[p+"1"],g&&(_=h[p+"0shift"],v=h[p+"1shift"])):(m=h[p+"anchor"],y=h[p+"anchor"]),m!==void 0)return[x(m)+_,x(y)+v];if(h.path){var M=1/0,C=-1/0,w=h.path.match(i.segmentRE),k,T,b,S,A;for(f.type==="date"&&(x=o.decodeDate(x)),k=0;kC&&(C=A)));if(C>=M)return[M,C]}}}}),Zte=ye({"src/components/shapes/index.js"(e,r){"use strict";var t=CA();r.exports={moduleType:"component",name:"shapes",layoutAttributes:k9(),supplyLayoutDefaults:$te(),supplyDrawNewShapeDefaults:Yte(),includeBasePlot:tb()("shapes"),calcAutorange:Xte(),draw:t.draw,drawOne:t.drawOne}}}),C9=ye({"src/components/images/attributes.js"(e,r){"use strict";var t=$l(),a=ko().templatedArray,i=eb();r.exports=a("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",t.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",t.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),Kte=ye({"src/components/images/defaults.js"(e,r){"use strict";var t=Yt(),a=qi(),i=Oc(),o=C9(),s="images";r.exports=function(u,c){var f={name:s,handleItemDefaults:l};i(u,c,f)};function l(n,u,c){function f(x,E){return t.coerce(n,u,o,x,E)}var h=f("source"),d=f("visible",!!h);if(!d)return u;f("layer"),f("xanchor"),f("yanchor"),f("sizex"),f("sizey"),f("sizing"),f("opacity");for(var p={_fullLayout:c},g=["x","y"],m=0;m<2;m++){var y=g[m],_=a.coerceRef(n,u,p,y,"paper",void 0);if(_!=="paper"){var v=a.getFromId(p,_);v._imgIndices.push(u._index)}a.coercePosition(u,p,f,_,y,0)}return u}}}),Jte=ye({"src/components/images/draw.js"(e,r){"use strict";var t=ai(),a=$i(),i=qi(),o=Gs(),s=Sd();r.exports=function(n){var u=n._fullLayout,c=[],f={},h=[],d,p;for(p=0;p0);g&&(d("active"),d("direction"),d("type"),d("showactive"),d("x"),d("y"),t.noneOrAll(c,f,["x","y"]),d("xanchor"),d("yanchor"),d("pad.t"),d("pad.r"),d("pad.b"),d("pad.l"),t.coerceFont(d,"font",h.font),d("bgcolor",h.paper_bgcolor),d("bordercolor"),d("borderwidth"))}function u(c,f){function h(p,g){return t.coerce(c,f,l,p,g)}var d=h("visible",c.method==="skip"||Array.isArray(c.args));d&&(h("method"),h("args"),h("args2"),h("label"),h("execute"))}}}),rre=ye({"src/components/updatemenus/scrollbox.js"(e,r){"use strict";r.exports=s;var t=ai(),a=Ya(),i=$i(),o=Yt();function s(l,n,u){this.gd=l,this.container=n,this.id=u,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})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(n,u,c){var f=this.gd._fullLayout,h=f.width,d=f.height;this.position=n;var p=this.position.l,g=this.position.w,m=this.position.t,y=this.position.h,_=this.position.direction,v=_==="down",x=_==="left",E=_==="right",M=_==="up",C=g,w=y,k,T,b,S;!v&&!x&&!E&&!M&&(this.position.direction="down",v=!0);var A=v||M;A?(k=p,T=k+C,v?(b=m,S=Math.min(b+w,d),w=S-b):(S=m+w,b=Math.max(S-w,0),w=S-b)):(b=m,S=b+w,x?(T=p+C,k=Math.max(T-C,0),C=T-k):(k=p,T=Math.min(k+C,h),C=T-k)),this._box={l:k,t:b,w:C,h:w};var F=g>C,D=s.barLength+2*s.barPad,R=s.barWidth+2*s.barPad,P=p,z=m+y;z+R>d&&(z=d-R);var I=this.container.selectAll("rect.scrollbar-horizontal").data(F?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,s.barColor),F?(this.hbar=I.attr({rx:s.barRadius,ry:s.barRadius,x:P,y:z,width:D,height:R}),this._hbarXMin=P+D/2,this._hbarTranslateMax=C-D):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=y>w,B=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,G=p+g,$=m;G+B>h&&(G=h-B);var X=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);X.exit().on(".drag",null).remove(),X.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,s.barColor),L?(this.vbar=X.attr({rx:s.barRadius,ry:s.barRadius,x:G,y:$,width:B,height:O}),this._vbarYMin=$+O/2,this._vbarTranslateMax=w-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var Z=this.id,J=k-.5,N=L?T+B+.5:T+.5,H=b-.5,W=F?S+R+.5:S+.5,U=f._topdefs.selectAll("#"+Z).data(F||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",Z).append("rect"),F||L?(this._clipRect=U.select("rect").attr({x:Math.floor(J),y:Math.floor(H),width:Math.ceil(N)-Math.floor(J),height:Math.ceil(W)-Math.floor(H)}),this.container.call(i.setClipUrl,Z,this.gd),this.bg.attr({x:p,y:m,width:g,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),F||L){var V=t.behavior.drag().on("dragstart",function(){t.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var j=t.behavior.drag().on("dragstart",function(){t.event.sourceEvent.preventDefault(),t.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));F&&this.hbar.on(".drag",null).call(j),L&&this.vbar.on(".drag",null).call(j)}this.setTranslate(u,c)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.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)},s.prototype._onBoxDrag=function(){var n=this.translateX,u=this.translateY;this.hbar&&(n-=t.event.dx),this.vbar&&(u-=t.event.dy),this.setTranslate(n,u)},s.prototype._onBoxWheel=function(){var n=this.translateX,u=this.translateY;this.hbar&&(n+=t.event.deltaY),this.vbar&&(u+=t.event.deltaY),this.setTranslate(n,u)},s.prototype._onBarDrag=function(){var n=this.translateX,u=this.translateY;if(this.hbar){var c=n+this._hbarXMin,f=c+this._hbarTranslateMax,h=o.constrain(t.event.x,c,f),d=(h-c)/(f-c),p=this.position.w-this._box.w;n=d*p}if(this.vbar){var g=u+this._vbarYMin,m=g+this._vbarTranslateMax,y=o.constrain(t.event.y,g,m),_=(y-g)/(m-g),v=this.position.h-this._box.h;u=_*v}this.setTranslate(n,u)},s.prototype.setTranslate=function(n,u){var c=this.position.w-this._box.w,f=this.position.h-this._box.h;if(n=o.constrain(n||0,0,c),u=o.constrain(u||0,0,f),this.translateX=n,this.translateY=u,this.container.call(i.setTranslate,this._box.l-this.position.l-n,this._box.t-this.position.t-u),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+n-.5),y:Math.floor(this.position.t+u-.5)}),this.hbar){var h=n/c;this.hbar.call(i.setTranslate,n+h*this._hbarTranslateMax,u)}if(this.vbar){var d=u/f;this.vbar.call(i.setTranslate,n,u+d*this._vbarTranslateMax)}}}}),are=ye({"src/components/updatemenus/draw.js"(e,r){"use strict";var t=ai(),a=ws(),i=Ya(),o=$i(),s=Yt(),l=Go(),n=ko().arrayEditor,u=Yl().LINE_SPACING,c=jA(),f=rre();r.exports=function(D){var R=D._fullLayout,P=s.filterVisible(R[c.name]);function z(Z){a.autoMargin(D,b(Z))}var I=R._menulayer.selectAll("g."+c.containerClassName).data(P.length>0?[0]:[]);if(I.enter().append("g").classed(c.containerClassName,!0).style("cursor","pointer"),I.exit().each(function(){t.select(this).selectAll("g."+c.headerGroupClassName).each(z)}).remove(),P.length!==0){var L=I.selectAll("g."+c.headerGroupClassName).data(P,h);L.enter().append("g").classed(c.headerGroupClassName,!0);for(var B=s.ensureSingle(I,"g",c.dropdownButtonGroupClassName,function(Z){Z.style("pointer-events","all")}),O=0;O0?[0]:[]);G.enter().append("g").classed(c.containerClassName,!0).style("cursor",L?null:"ew-resize");function $(N){N._commandObserver&&(N._commandObserver.remove(),delete N._commandObserver),a.autoMargin(I,g(N))}if(G.exit().each(function(){t.select(this).selectAll("g."+c.groupClassName).each($)}).remove(),O.length!==0){var X=G.selectAll("g."+c.groupClassName).data(O,y);X.enter().append("g").classed(c.groupClassName,!0),X.exit().each($).remove();for(var Z=0;Z0&&(X=X.transition().duration(I.transition.duration).ease(I.transition.easing)),X.attr("transform",l($-c.gripWidth*.5,I._dims.currentValueTotalHeight))}}function F(z,I){var L=z._dims;return L.inputAreaStart+c.stepInset+(L.inputAreaLength-2*c.stepInset)*Math.min(1,Math.max(0,I))}function D(z,I){var L=z._dims;return Math.min(1,Math.max(0,(I-c.stepInset-L.inputAreaStart)/(L.inputAreaLength-2*c.stepInset-2*L.inputAreaStart)))}function R(z,I,L){var B=L._dims,O=s.ensureSingle(z,"rect",c.railTouchRectClass,function(G){G.call(T,I,z,L).style("pointer-events","all")});O.attr({width:B.inputAreaLength,height:Math.max(B.inputAreaWidth,c.tickOffset+L.ticklen+B.labelHeight)}).call(i.fill,L.bgcolor).attr("opacity",0),o.setTranslate(O,0,B.currentValueTotalHeight)}function P(z,I){var L=I._dims,B=L.inputAreaLength-c.railInset*2,O=s.ensureSingle(z,"rect",c.railRectClass);O.attr({width:B,height:c.railWidth,rx:c.railRadius,ry:c.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,I.bordercolor).call(i.fill,I.bgcolor).style("stroke-width",I.borderwidth+"px"),o.setTranslate(O,c.railInset,(L.inputAreaWidth-c.railWidth)*.5+L.currentValueTotalHeight)}}}),sre=ye({"src/components/sliders/index.js"(e,r){"use strict";var t=ib();r.exports={moduleType:"component",name:t.name,layoutAttributes:L9(),supplyLayoutDefaults:nre(),draw:ore()}}}),UA=ye({"src/components/rangeslider/attributes.js"(e,r){"use strict";var t=Wl();r.exports={bgcolor:{valType:"color",dflt:t.background,editType:"plot"},bordercolor:{valType:"color",dflt:t.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"}}}),F9=ye({"src/components/rangeslider/oppaxis_attributes.js"(e,r){"use strict";r.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"}}}),qA=ye({"src/components/rangeslider/constants.js"(e,r){"use strict";r.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}}}),lre=ye({"src/components/rangeslider/helpers.js"(e){"use strict";var r=Gs(),t=Go(),a=qA(),i=Yl().LINE_SPACING,o=a.name;function s(l){var n=l&&l[o];return n&&n.visible}e.isVisible=s,e.makeData=function(l){for(var n=r.list({_fullLayout:l},"x",!0),u=l.margin,c=[],f=0;f=xe.max)pe=re[we+1];else if(fe=xe.pmax)pe=re[we+1];else if(fe0?T.touches[0].clientX:0}function m(T,b,S,A){if(b._context.staticPlot)return;var F=T.select("rect."+p.slideBoxClassName).node(),D=T.select("rect."+p.grabAreaMinClassName).node(),R=T.select("rect."+p.grabAreaMaxClassName).node();function P(){var z=t.event,I=z.target,L=g(z),B=L-T.node().getBoundingClientRect().left,O=A.d2p(S._rl[0]),G=A.d2p(S._rl[1]),$=h.coverSlip();this.addEventListener("touchmove",X),this.addEventListener("touchend",Z),$.addEventListener("mousemove",X),$.addEventListener("mouseup",Z);function X(J){var N=g(J),H=+N-L,W,U,V;switch(I){case F:if(V="ew-resize",O+H>S._length||G+H<0)return;W=O+H,U=G+H;break;case D:if(V="col-resize",O+H>S._length)return;W=O+H,U=G;break;case R:if(V="col-resize",G+H<0)return;W=O,U=G+H;break;default:V="ew-resize",W=B,U=B+H;break}if(U0);if(x){var E=u(h,d,p);_("x",E[0]),_("y",E[1]),t.noneOrAll(f,h,["x","y"]),_("xanchor"),_("yanchor"),t.coerceFont(_,"font",d.font);var M=_("bgcolor");_("activecolor",a.contrast(M,l.lightAmount,l.darkAmount)),_("bordercolor"),_("borderwidth")}};function n(c,f,h,d){var p=d.calendar;function g(_,v){return t.coerce(c,f,s.buttons,_,v)}var m=g("visible");if(m){var y=g("step");y!=="all"&&(p&&p!=="gregorian"&&(y==="month"||y==="year")?f.stepmode="backward":g("stepmode"),g("count")),g("label")}}function u(c,f,h){for(var d=h.filter(function(y){return f[y].anchor===c._id}),p=0,g=0;g1)){delete p.grid;return}if(!_&&!v&&!x){var S=k("pattern")==="independent";S&&(_=!0)}w._hasSubplotGrid=_;var A=k("roworder"),F=A==="top to bottom",D=_?.2:.1,R=_?.3:.1,P,z;E&&p._splomGridDflt&&(P=p._splomGridDflt.xside,z=p._splomGridDflt.yside),w._domains={x:c("x",k,D,P,b),y:c("y",k,R,z,T,F)}}function c(d,p,g,m,y,_){var v=p(d+"gap",g),x=p("domain."+d);p(d+"side",m);for(var E=new Array(y),M=x[0],C=(x[1]-M)/(y-v),w=C*(1-v),k=0;k0,m=n._context.staticPlot;u.each(function(y){var _=y[0].trace,v=_.error_x||{},x=_.error_y||{},E;_.ids&&(E=function(k){return k.id});var M=o.hasMarkers(_)&&_.marker.maxdisplayed>0;!x.visible&&!v.visible&&(y=[]);var C=t.select(this).selectAll("g.errorbar").data(y,E);if(C.exit().remove(),!!y.length){v.visible||C.selectAll("path.xerror").remove(),x.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var w=C.enter().append("g").classed("errorbar",!0);g&&w.style("opacity",0).transition().duration(f.duration).style("opacity",1),i.setClipUrl(C,c.layerClipId,n),C.each(function(k){var T=t.select(this),b=s(k,d,p);if(!(M&&!k.vis)){var S,A=T.select("path.yerror");if(x.visible&&a(b.x)&&a(b.yh)&&a(b.ys)){var F=x.width;S="M"+(b.x-F)+","+b.yh+"h"+2*F+"m-"+F+",0V"+b.ys,b.noYS||(S+="m-"+F+",0h"+2*F),h=!A.size(),h?A=T.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):g&&(A=A.transition().duration(f.duration).ease(f.easing)),A.attr("d",S)}else A.remove();var D=T.select("path.xerror");if(v.visible&&a(b.y)&&a(b.xh)&&a(b.xs)){var R=(v.copy_ystyle?x:v).width;S="M"+b.xh+","+(b.y-R)+"v"+2*R+"m0,-"+R+"H"+b.xs,b.noXS||(S+="m0,-"+R+"v"+2*R),h=!D.size(),h?D=T.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):g&&(D=D.transition().duration(f.duration).ease(f.easing)),D.attr("d",S)}else D.remove()}})}})};function s(l,n,u){var c={x:n.c2p(l.x),y:u.c2p(l.y)};return l.yh!==void 0&&(c.yh=u.c2p(l.yh),c.ys=u.c2p(l.ys),a(c.ys)||(c.noYS=!0,c.ys=u.c2p(l.ys,!0))),l.xh!==void 0&&(c.xh=n.c2p(l.xh),c.xs=n.c2p(l.xs),a(c.xs)||(c.noXS=!0,c.xs=n.c2p(l.xs,!0))),c}}}),xre=ye({"src/components/errorbars/style.js"(e,r){"use strict";var t=ai(),a=Ya();r.exports=function(o){o.each(function(s){var l=s[0].trace,n=l.error_y||{},u=l.error_x||{},c=t.select(this);c.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(a.stroke,n.color),u.copy_ystyle&&(u=n),c.selectAll("path.xerror").style("stroke-width",u.thickness+"px").call(a.stroke,u.color)})}}}),bre=ye({"src/components/errorbars/index.js"(e,r){"use strict";var t=Yt(),a=Cs().overrideAll,i=R9(),o={error_x:t.extendFlat({},i),error_y:t.extendFlat({},i)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:t.extendFlat({},i),error_y:t.extendFlat({},i),error_z:t.extendFlat({},i)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,r.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:a(s,"calc","nested"),scattergl:a(o,"calc","nested")}},supplyDefaults:gre(),calc:yre(),makeComputeError:z9(),plot:_re(),style:xre(),hoverInfo:l};function l(n,u,c){(u.error_y||{}).visible&&(c.yerr=n.yh-n.y,u.error_y.symmetric||(c.yerrneg=n.y-n.ys)),(u.error_x||{}).visible&&(c.xerr=n.xh-n.x,u.error_x.symmetric||(c.xerrneg=n.x-n.xs))}}}),wre=ye({"src/components/colorbar/constants.js"(e,r){"use strict";r.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"}}}}),Are=ye({"src/components/colorbar/draw.js"(e,r){"use strict";var t=ai(),a=ws(),i=li(),o=qi(),s=_f(),l=Yt(),n=l.strTranslate,u=Xi().extendFlat,c=rp(),f=$i(),h=Ya(),d=Cm(),p=Go(),g=xc().flipScale,m=ab(),y=BA(),_=Gu(),v=Yl(),x=v.LINE_SPACING,E=v.FROM_TL,M=v.FROM_BR,C=wre().cn;function w(R){var P=R._fullLayout,z=P._infolayer.selectAll("g."+C.colorbar).data(k(R),function(I){return I._id});z.enter().append("g").attr("class",function(I){return I._id}).classed(C.colorbar,!0),z.each(function(I){var L=t.select(this);l.ensureSingle(L,"rect",C.cbbg),l.ensureSingle(L,"g",C.cbfills),l.ensureSingle(L,"g",C.cblines),l.ensureSingle(L,"g",C.cbaxis,function(O){O.classed(C.crisp,!0)}),l.ensureSingle(L,"g",C.cbtitleunshift,function(O){O.append("g").classed(C.cbtitle,!0)}),l.ensureSingle(L,"rect",C.cboutline);var B=S(L,I,R);B&&B.then&&(R._promises||[]).push(B),R._context.edits.colorbarPosition&&A(L,I,R)}),z.exit().each(function(I){a.autoMargin(R,I._id)}).remove(),z.order()}function k(R){var P=R._fullLayout,z=R.calcdata,I=[],L,B,O,G;function $(Y){return u(Y,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function X(){typeof G.calc=="function"?G.calc(R,O,L):(L._fillgradient=B.reversescale?g(B.colorscale):B.colorscale,L._zrange=[B[G.min],B[G.max]])}for(var Z=0;Z[Math.min(R[0]+P,R[1]),R[1]],b=(R,P)=>[R[0],Math.max(R[1]-P,R[0])];function S(R,P,z){var I=P.orientation==="v",L=P.len,B=P.lenmode,O=P.thickness,G=P.thicknessmode,$=P.outlinewidth,X=P.borderwidth,Z=P.bgcolor,J=P.xanchor,N=P.yanchor,H=P.xpad,W=P.ypad,U=P.x,V=I?P.y:1-P.y,j=P.yref==="paper",q=P.xref==="paper",Y=z._fullLayout,K=Y._size,re=P._fillcolor,se=P._line,le=P.title,ue=le.side,fe=P._zrange||t.extent((typeof re=="function"?re:se.color).domain()),pe=typeof se.color=="function"?se.color:function(){return se.color},we=typeof re=="function"?re:function(){return re},xe=P._levels,he=F(z,P,fe),oe=he.fill,te=he.line,ie=Math.round(O*(G==="fraction"?I?K.w:K.h:1)),ee=ie/(I?K.w:K.h),ce=Math.round(L*(B==="fraction"?I?K.h:K.w:1)),_e=ce/(I?K.h:K.w),Se=q?K.w:z._fullLayout.width,Me=j?K.h:z._fullLayout.height,Ue=Math.round(I?U*Se+H:V*Me+W),Ge={center:.5,right:1}[J]||0,Ze={top:1,middle:.5}[N]||0,Ke=I?U-Ge*ee:V-Ze*ee,dt=I?V-Ze*_e:U-Ge*_e,_t=Math.round(I?Me*(1-dt):Se*dt);P._lenFrac=_e,P._thickFrac=ee,P._uFrac=Ke,P._vFrac=dt;var Pt=P._axis=D(z,P,fe);Pt.position=ee+(I?U+H/K.w:V+W/K.h);var vt=["top","bottom"].indexOf(ue)!==-1;if(I&&vt&&(Pt.title.side=ue,Pt.titlex=U+H/K.w,Pt.titley=dt+(le.side==="top"?_e-W/K.h:W/K.h)),!I&&!vt&&(Pt.title.side=ue,Pt.titley=V+W/K.h,Pt.titlex=dt+H/K.w),se.color&&P.tickmode==="auto"){Pt.tickmode="linear",Pt.tick0=xe.start;var Tt=xe.size,st=l.constrain(ce/50,4,15)+1,Ve=(fe[1]-fe[0])/((P.nticks||st)*Tt);if(Ve>1){var Ye=Math.pow(10,Math.floor(Math.log(Ve)/Math.LN10));Tt*=Ye*l.roundUp(Ve/Ye,[2,5,10]),(Math.abs(xe.start)/xe.size+1e-6)%1<2e-6&&(Pt.tick0=0)}Pt.dtick=Tt}var me=I?W/K.h:H/K.w;Pt.domain=b(T([dt,dt+_e],me),me),Pt.setScale(),R.attr("transform",n(Math.round(K.l),Math.round(K.t)));var be=R.select("."+C.cbtitleunshift).attr("transform",n(-Math.round(K.l),-Math.round(K.t))),Ee=Pt.ticklabelposition,De=Pt.title.font.size,Ce=R.select("."+C.cbaxis),Fe,Je=0,qe=0;function at(qt,ar){var mt={propContainer:Pt,propName:P._propPrefix+"title.text",traceIndex:P._traceIndex,_meta:P._meta,placeholder:Y._dfltTitle.colorbar,containerGroup:R.select("."+C.cbtitle)},gt=qt.charAt(0)==="h"?qt.slice(1):"h"+qt;R.selectAll("."+gt+",."+gt+"-math-group").remove(),d.draw(z,qt,u(mt,ar||{}))}function tt(){if(I&&vt||!I&&!vt){var qt,ar;ue==="top"&&(qt=H+K.l+Se*U,ar=W+K.t+Me*(1-dt-_e)+3+De*.75),ue==="bottom"&&(qt=H+K.l+Se*U,ar=W+K.t+Me*(1-dt)-3-De*.25),ue==="right"&&(ar=W+K.t+Me*V+3+De*.75,qt=H+K.l+Se*dt),at(Pt._id+"title",{attributes:{x:qt,y:ar,"text-anchor":I?"start":"middle"}})}}function ct(){if(I&&!vt||!I&&vt){var qt=Pt.position||0,ar=Pt._offset+Pt._length/2,mt,gt;if(ue==="right")gt=ar,mt=K.l+Se*qt+10+De*(Pt.showticklabels?1:.5);else if(mt=ar,ue==="bottom"&&(gt=K.t+Me*qt+10+(Ee.indexOf("inside")===-1?Pt.tickfont.size:0)+(Pt.ticks!=="inside"&&P.ticklen||0)),ue==="top"){var St=le.text.split("
").length;gt=K.t+Me*qt+10-ie-x*De*St}at((I?"h":"v")+Pt._id+"title",{avoid:{selection:t.select(z).selectAll("g."+Pt._id+"tick"),side:ue,offsetTop:I?0:K.t,offsetLeft:I?K.l:0,maxShift:I?Y.width:Y.height},attributes:{x:mt,y:gt,"text-anchor":"middle"},transform:{rotate:I?-90:0,offset:0}})}}function At(){if(!I&&!vt||I&&vt){var qt=R.select("."+C.cbtitle),ar=qt.select("text"),mt=[-$/2,$/2],gt=qt.select(".h"+Pt._id+"title-math-group").node(),St=15.6;ar.node()&&(St=parseInt(ar.node().style.fontSize,10)*x);var Dt;if(gt?(Dt=f.bBox(gt),qe=Dt.width,Je=Dt.height,Je>St&&(mt[1]-=(Je-St)/2)):ar.node()&&!ar.classed(C.jsPlaceholder)&&(Dt=f.bBox(ar.node()),qe=Dt.width,Je=Dt.height),I){if(Je){if(Je+=5,ue==="top")Pt.domain=b(Pt.domain,Je/K.h),mt[1]*=-1;else{Pt.domain=T(Pt.domain,Je/K.h);var kt=p.lineCount(ar);mt[1]+=(1-kt)*St}qt.attr("transform",n(mt[0],mt[1])),Pt.setScale()}}else qe&&(ue==="right"&&(Pt.domain=T(Pt.domain,(qe+De/2)/K.w)),qt.attr("transform",n(mt[0],mt[1])),Pt.setScale())}R.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",I?n(0,Math.round(K.h*(1-Pt.domain[1]))):n(Math.round(K.w*Pt.domain[0]),0)),Ce.attr("transform",I?n(0,Math.round(-K.t)):n(Math.round(-K.l),0));var Vt=R.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(oe);Vt.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Vt.exit().remove();var lr=fe.map(Pt.c2p).map(Math.round).sort(function(la,Hr){return la-Hr});Vt.each(function(la,Hr){var jr=[Hr===0?fe[0]:(oe[Hr]+oe[Hr-1])/2,Hr===oe.length-1?fe[1]:(oe[Hr]+oe[Hr+1])/2].map(Pt.c2p).map(Math.round);I&&(jr[1]=l.constrain(jr[1]+(jr[1]>jr[0])?1:-1,lr[0],lr[1]));var Oa=t.select(this).attr(I?"x":"y",Ue).attr(I?"y":"x",t.min(jr)).attr(I?"width":"height",Math.max(ie,2)).attr(I?"height":"width",Math.max(t.max(jr)-t.min(jr),2));if(P._fillgradient)f.gradient(Oa,z,P._id,I?"vertical":"horizontalreversed",P._fillgradient,"fill");else{var Da=we(la).replace("e-","");Oa.attr("fill",h.hexString(Da))}});var dr=R.select("."+C.cblines).selectAll("path."+C.cbline).data(se.color&&se.width?te:[]);dr.enter().append("path").classed(C.cbline,!0),dr.exit().remove(),dr.each(function(la){var Hr=Ue,jr=Math.round(Pt.c2p(la))+se.width/2%1;t.select(this).attr("d","M"+(I?Hr+","+jr:jr+","+Hr)+(I?"h":"v")+ie).call(f.lineGroupStyle,se.width,pe(la),se.dash)}),Ce.selectAll("g."+Pt._id+"tick,path").remove();var yr=Ue+ie+($||0)/2-(P.ticks==="outside"?1:0),vr=o.calcTicks(Pt),Fr=o.getTickSigns(Pt)[2];return o.drawTicks(z,Pt,{vals:Pt.ticks==="inside"?o.clipEnds(Pt,vr):vr,layer:Ce,path:o.makeTickPath(Pt,yr,Fr),transFn:o.makeTransTickFn(Pt)}),o.drawLabels(z,Pt,{vals:vr,layer:Ce,transFn:o.makeTransTickLabelFn(Pt),labelFns:o.makeLabelFns(Pt,yr)})}function ft(){var qt,ar=ie+$/2;Ee.indexOf("inside")===-1&&(qt=f.bBox(Ce.node()),ar+=I?qt.width:qt.height),Fe=be.select("text");var mt=0,gt=I&&ue==="top",St=!I&&ue==="right",Dt=0;if(Fe.node()&&!Fe.classed(C.jsPlaceholder)){var kt,Vt=be.select(".h"+Pt._id+"title-math-group").node();Vt&&(I&&vt||!I&&!vt)?(qt=f.bBox(Vt),mt=qt.width,kt=qt.height):(qt=f.bBox(be.node()),mt=qt.right-K.l-(I?Ue:_t),kt=qt.bottom-K.t-(I?_t:Ue),!I&&ue==="top"&&(ar+=qt.height,Dt=qt.height)),St&&(Fe.attr("transform",n(mt/2+De/2,0)),mt*=2),ar=Math.max(ar,I?mt:kt)}var lr=(I?H:W)*2+ar+X+$/2,dr=0;!I&&le.text&&N==="bottom"&&V<=0&&(dr=lr/2,lr+=dr,Dt+=dr),Y._hColorbarMoveTitle=dr,Y._hColorbarMoveCBTitle=Dt;var yr=X+$,vr=(I?Ue:_t)-yr/2-(I?H:0),Fr=(I?_t:Ue)-(I?ce:W+Dt-dr);R.select("."+C.cbbg).attr("x",vr).attr("y",Fr).attr(I?"width":"height",Math.max(lr-dr,2)).attr(I?"height":"width",Math.max(ce+yr,2)).call(h.fill,Z).call(h.stroke,P.bordercolor).style("stroke-width",X);var la=St?Math.max(mt-10,0):0;R.selectAll("."+C.cboutline).attr("x",(I?Ue:_t+H)+la).attr("y",(I?_t+W-ce:Ue)+(gt?Je:0)).attr(I?"width":"height",Math.max(ie,2)).attr(I?"height":"width",Math.max(ce-(I?2*W+Je:2*H+la),2)).call(h.stroke,P.outlinecolor).style({fill:"none","stroke-width":$});var Hr=I?Ge*lr:0,jr=I?0:(1-Ze)*lr-Dt;if(Hr=q?K.l-Hr:-Hr,jr=j?K.t-jr:-jr,R.attr("transform",n(Hr,jr)),!I&&(X||h.opacity(Z)&&!h.equals(Y.paper_bgcolor,Z))){var Oa=Ce.selectAll("text"),Da=Oa[0].length,_i=R.select("."+C.cbbg).node(),ti=f.bBox(_i),Ka=f.getTranslate(R),ia=2;Oa.each(function(zt,Gt){var Ht=0,Be=Da-1;if(Gt===Ht||Gt===Be){var et=f.bBox(this),ut=f.getTranslate(this),bt;if(Gt===Be){var Ot=et.right+ut.x,It=ti.right+Ka.x+_t-X-ia+U;bt=It-Ot,bt>0&&(bt=0)}else if(Gt===Ht){var Wt=et.left+ut.x,jt=ti.left+Ka.x+_t+X+ia;bt=jt-Wt,bt<0&&(bt=0)}bt&&(Da<3?this.setAttribute("transform","translate("+bt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var na={},xi=E[J],Yi=M[J],Qr=E[N],Nr=M[N],Oe=lr-ie;I?(B==="pixels"?(na.y=V,na.t=ce*Qr,na.b=ce*Nr):(na.t=na.b=0,na.yt=V+L*Qr,na.yb=V-L*Nr),G==="pixels"?(na.x=U,na.l=lr*xi,na.r=lr*Yi):(na.l=Oe*xi,na.r=Oe*Yi,na.xl=U-O*xi,na.xr=U+O*Yi)):(B==="pixels"?(na.x=U,na.l=ce*xi,na.r=ce*Yi):(na.l=na.r=0,na.xl=U+L*xi,na.xr=U-L*Yi),G==="pixels"?(na.y=1-V,na.t=lr*Qr,na.b=lr*Nr):(na.t=Oe*Qr,na.b=Oe*Nr,na.yt=V-O*Qr,na.yb=V+O*Nr));var Ie=P.y<.5?"b":"t",Et=P.x<.5?"l":"r";z._fullLayout._reservedMargin[P._id]={};var Mt={r:Y.width-vr-Hr,l:vr+na.r,b:Y.height-Fr-jr,t:Fr+na.b};q&&j?a.autoMargin(z,P._id,na):q?z._fullLayout._reservedMargin[P._id][Ie]=Mt[Ie]:j||I?z._fullLayout._reservedMargin[P._id][Et]=Mt[Et]:z._fullLayout._reservedMargin[P._id][Ie]=Mt[Ie]}return l.syncOrAsync([a.previousPromises,tt,At,ct,a.previousPromises,ft],z)}function A(R,P,z){var I=P.orientation==="v",L=z._fullLayout,B=L._size,O,G,$;s.init({element:R.node(),gd:z,prepFn:function(){O=R.attr("transform"),c(R)},moveFn:function(X,Z){R.attr("transform",O+n(X,Z)),G=s.align((I?P._uFrac:P._vFrac)+X/B.w,I?P._thickFrac:P._lenFrac,0,1,P.xanchor),$=s.align((I?P._vFrac:1-P._uFrac)-Z/B.h,I?P._lenFrac:P._thickFrac,0,1,P.yanchor);var J=s.getCursor(G,$,P.xanchor,P.yanchor);c(R,J)},doneFn:function(){if(c(R),G!==void 0&&$!==void 0){var X={};X[P._propPrefix+"x"]=G,X[P._propPrefix+"y"]=$,P._traceIndex!==void 0?i.call("_guiRestyle",z,X,P._traceIndex):i.call("_guiRelayout",z,X)}}})}function F(R,P,z){var I=P._levels,L=[],B=[],O,G,$=I.end+I.size/100,X=I.size,Z=1.001*z[0]-.001*z[1],J=1.001*z[1]-.001*z[0];for(G=0;G<1e5&&(O=I.start+G*X,!(X>0?O>=$:O<=$));G++)O>Z&&O0?O>=$:O<=$));G++)O>z[0]&&O-1}r.exports=function(u,c){var f,h=u.data,d=u.layout,p=o([],h),g=o({},d,s(c.tileClass)),m=u._context||{};if(c.width&&(g.width=c.width),c.height&&(g.height=c.height),c.tileClass==="thumbnail"||c.tileClass==="themes__thumb"){g.annotations=[];var y=Object.keys(g);for(f=0;f=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&t(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function g(m,y,_,v,x,E){E=E||{};var M=E.moduleHasSelected!==!1,C=E.moduleHasUnselected!==!1,w=E.moduleHasConstrain!==!1,k=E.moduleHasCliponaxis!==!1,T=E.moduleHasTextangle!==!1,b=E.moduleHasInsideanchor!==!1,S=!!E.hasPathbar,A=Array.isArray(x)||x==="auto",F=A||x==="inside",D=A||x==="outside";if(F||D){var R=f(v,"textfont",_.font),P=a.extendFlat({},R),z=m.textfont&&m.textfont.color,I=!z;if(I&&delete P.color,f(v,"insidetextfont",P),S){var L=a.extendFlat({},R);I&&delete L.color,f(v,"pathbar.textfont",L)}D&&f(v,"outsidetextfont",R),M&&v("selected.textfont.color"),C&&v("unselected.textfont.color"),w&&v("constraintext"),k&&v("cliponaxis"),T&&v("textangle"),v("texttemplate"),v("texttemplatefallback")}F&&b&&v("insidetextanchor")}r.exports={supplyDefaults:h,crossTraceDefaults:d,handleText:g,validateCornerradius:p}}}),O9=ye({"src/traces/bar/layout_defaults.js"(e,r){"use strict";var t=li(),a=qi(),i=Yt(),o=GA(),s=Oh().validateCornerradius;r.exports=function(l,n,u){function c(M,C){return i.coerce(l,n,o,M,C)}for(var f=!1,h=!1,d=!1,p={},g=c("barmode"),m=g==="group",y=0;y0&&!p[v]&&(d=!0),p[v]=!0),_.visible&&_.type==="histogram"){var x=a.getFromId({_fullLayout:n},_[_.orientation==="v"?"xaxis":"yaxis"]);x.type!=="category"&&(h=!0)}}if(!f){delete n.barmode;return}g!=="overlay"&&c("barnorm"),c("bargap",h&&!d?0:.2),c("bargroupgap");var E=c("barcornerradius");n.barcornerradius=s(E)}}}),nb=ye({"src/traces/bar/arrays_to_calcdata.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o){for(var s=0;sn;if(!u)return o}return s!==void 0?s:i.dflt},e.coerceColor=function(i,o,s){return r.isValid(o)?o:s!==void 0?s:i.dflt},e.coerceEnumerated=function(i,o,s){return i.coerceNumber&&(o=+o),i.values.indexOf(o)!==-1?o:s!==void 0?s:i.dflt},e.getValue=function(i,o){var s;return a(i)?o1||S.bargap===0&&S.bargroupgap===0&&!A[0].trace.marker.line.width)&&t.select(this).attr("shape-rendering","crispEdges")}),T.selectAll("g.points").each(function(A){var F=t.select(this),D=A[0].trace;p(F,D,k)}),s.getComponentMethod("errorbars","style")(T)}function p(k,T,b){i.pointStyle(k.selectAll("path"),T,b),g(k,T,b)}function g(k,T,b){k.selectAll("text").each(function(S){var A=t.select(this),F=o.ensureUniformFontSize(b,v(A,S,T,b));i.font(A,F)})}function m(k,T,b){var S=T[0].trace;S.selectedpoints?y(b,S,k):(p(b,S,k),s.getComponentMethod("errorbars","style")(b))}function y(k,T,b){i.selectedPointStyle(k.selectAll("path"),T),_(k.selectAll("text"),T,b)}function _(k,T,b){k.each(function(S){var A=t.select(this),F;if(S.selected){F=o.ensureUniformFontSize(b,v(A,S,T,b));var D=T.selected.textfont&&T.selected.textfont.color;D&&(F.color=D),i.font(A,F)}else i.selectedTextStyle(A,T)})}function v(k,T,b,S){var A=S._fullLayout.font,F=b.textfont;if(k.classed("bartext-inside")){var D=w(T,b);F=E(b,T.i,A,D)}else k.classed("bartext-outside")&&(F=M(b,T.i,A));return F}function x(k,T,b){return C(u,k.textfont,T,b)}function E(k,T,b,S){var A=x(k,T,b),F=k._input.textfont===void 0||k._input.textfont.color===void 0||Array.isArray(k.textfont.color)&&k.textfont.color[T]===void 0;return F&&(A={color:a.contrast(S),family:A.family,size:A.size,weight:A.weight,style:A.style,variant:A.variant,textcase:A.textcase,lineposition:A.lineposition,shadow:A.shadow}),C(c,k.insidetextfont,T,A)}function M(k,T,b){var S=x(k,T,b);return C(f,k.outsidetextfont,T,S)}function C(k,T,b,S){T=T||{};var A=h.getValue(T.family,b),F=h.getValue(T.size,b),D=h.getValue(T.color,b),R=h.getValue(T.weight,b),P=h.getValue(T.style,b),z=h.getValue(T.variant,b),I=h.getValue(T.textcase,b),L=h.getValue(T.lineposition,b),B=h.getValue(T.shadow,b);return{family:h.coerceString(k.family,A,S.family),size:h.coerceNumber(k.size,F,S.size),color:h.coerceColor(k.color,D,S.color),weight:h.coerceString(k.weight,R,S.weight),style:h.coerceString(k.style,P,S.style),variant:h.coerceString(k.variant,z,S.variant),textcase:h.coerceString(k.variant,I,S.textcase),lineposition:h.coerceString(k.variant,L,S.lineposition),shadow:h.coerceString(k.variant,B,S.shadow)}}function w(k,T){return T.type==="waterfall"?T[k.dir].marker.color:k.mcc||k.mc||T.marker.color}r.exports={style:d,styleTextPoints:g,styleOnSelect:m,getInsideTextFont:E,getOutsideTextFont:M,getBarColor:w,resizeText:l}}}),Rm=ye({"src/traces/bar/plot.js"(e,r){"use strict";var t=ai(),a=en(),i=Yt(),o=Go(),s=Ya(),l=$i(),n=li(),u=qi().tickText,c=jc(),f=c.recordMinTextSize,h=c.clearMinTextSize,d=Ld(),p=WA(),g=Cv(),m=Gp(),y=m.text,_=m.textposition,v=Bf().appendArrayPointValue,x=g.TEXTPAD;function E(X){return X.id}function M(X){if(X.ids)return E}function C(X){return(X>0)-(X<0)}function w(X,Z){return X0}function S(X,Z,J,N,H,W){var U=Z.xaxis,V=Z.yaxis,j=X._fullLayout,q=X._context.staticPlot;H||(H={mode:j.barmode,norm:j.barmode,gap:j.bargap,groupgap:j.bargroupgap},h("bar",j));var Y=i.makeTraceGroups(N,J,"trace bars").each(function(K){var re=t.select(this),se=K[0].trace,le=K[0].t,ue=se.type==="waterfall",fe=se.type==="funnel",pe=se.type==="histogram",we=se.type==="bar",xe=we||fe,he=0;ue&&se.connector.visible&&se.connector.mode==="between"&&(he=se.connector.line.width/2);var oe=se.orientation==="h",te=b(H),ie=i.ensureSingle(re,"g","points"),ee=M(se),ce=ie.selectAll("g.point").data(i.identity,ee);ce.enter().append("g").classed("point",!0),ce.exit().remove(),ce.each(function(Se,Me){var Ue=t.select(this),Ge=k(Se,U,V,oe),Ze=Ge[0][0],Ke=Ge[0][1],dt=Ge[1][0],_t=Ge[1][1],Pt=(oe?Ke-Ze:_t-dt)===0;Pt&&xe&&p.getLineWidth(se,Se)&&(Pt=!1),Pt||(Pt=!a(Ze)||!a(Ke)||!a(dt)||!a(_t)),Se.isBlank=Pt,Pt&&(oe?Ke=Ze:_t=dt),he&&!Pt&&(oe?(Ze-=w(Ze,Ke)*he,Ke+=w(Ze,Ke)*he):(dt-=w(dt,_t)*he,_t+=w(dt,_t)*he));var vt,Tt;if(se.type==="waterfall"){if(!Pt){var st=se[Se.dir].marker;vt=st.line.width,Tt=st.color}}else vt=p.getLineWidth(se,Se),Tt=Se.mc||se.marker.color;function Ve(dr){var yr=t.round(vt/2%1,2);return H.gap===0&&H.groupgap===0?t.round(Math.round(dr)-yr,2):dr}function Ye(dr,yr,vr){return vr&&dr===yr?dr:Math.abs(dr-yr)>=2?Ve(dr):dr>yr?Math.ceil(dr):Math.floor(dr)}var me=s.opacity(Tt),be=me<1||vt>.01?Ve:Ye;X._context.staticPlot||(Ze=be(Ze,Ke,oe),Ke=be(Ke,Ze,oe),dt=be(dt,_t,!oe),_t=be(_t,dt,!oe));var Ee=oe?U.c2p:V.c2p,De;Se.s0>0?De=Se._sMax:Se.s0<0?De=Se._sMin:De=Se.s1>0?Se._sMax:Se._sMin;function Ce(dr,yr){if(!dr)return 0;var vr=Math.abs(oe?_t-dt:Ke-Ze),Fr=Math.abs(oe?Ke-Ze:_t-dt),la=be(Math.abs(Ee(De,!0)-Ee(0,!0))),Hr=Se.hasB?Math.min(vr/2,Fr/2):Math.min(vr/2,la),jr;if(yr==="%"){var Oa=Math.min(50,dr);jr=vr*(Oa/100)}else jr=dr;return be(Math.max(Math.min(jr,Hr),0))}var Fe=we||pe?Ce(le.cornerradiusvalue,le.cornerradiusform):0,Je,qe,at="M"+Ze+","+dt+"V"+_t+"H"+Ke+"V"+dt+"Z",tt=0;if(Fe&&Se.s){var ct=C(Se.s0)===0||C(Se.s)===C(Se.s0)?Se.s1:Se.s0;if(tt=be(Se.hasB?0:Math.abs(Ee(De,!0)-Ee(ct,!0))),tt0?Math.sqrt(tt*(2*Fe-tt)):0,gt=At>0?Math.max:Math.min;Je="M"+Ze+","+dt+"V"+(_t-ar*ft)+"H"+gt(Ke-(Fe-tt)*At,Ze)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+Ke+","+(_t-Fe*ft-mt)+"V"+(dt+Fe*ft+mt)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+gt(Ke-(Fe-tt)*At,Ze)+","+(dt+ar*ft)+"Z"}else if(Se.hasB)Je="M"+(Ze+Fe*At)+","+dt+"A "+Fe+","+Fe+" 0 0 "+qt+" "+Ze+","+(dt+Fe*ft)+"V"+(_t-Fe*ft)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+(Ze+Fe*At)+","+_t+"H"+(Ke-Fe*At)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+Ke+","+(_t-Fe*ft)+"V"+(dt+Fe*ft)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+(Ke-Fe*At)+","+dt+"Z";else{qe=Math.abs(_t-dt)+tt;var St=qe0?Math.sqrt(tt*(2*Fe-tt)):0,kt=ft>0?Math.max:Math.min;Je="M"+(Ze+St*At)+","+dt+"V"+kt(_t-(Fe-tt)*ft,dt)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+(Ze+Fe*At-Dt)+","+_t+"H"+(Ke-Fe*At+Dt)+"A "+Fe+","+Fe+" 0 0 "+qt+" "+(Ke-St*At)+","+kt(_t-(Fe-tt)*ft,dt)+"V"+dt+"Z"}}else Je=at}else Je=at;var Vt=T(i.ensureSingle(Ue,"path"),j,H,W);if(Vt.style("vector-effect",q?"none":"non-scaling-stroke").attr("d",isNaN((Ke-Ze)*(_t-dt))||Pt&&X._context.staticPlot?"M0,0Z":Je).call(l.setClipUrl,Z.layerClipId,X),!j.uniformtext.mode&&te){var lr=l.makePointStyleFns(se);l.singlePointStyle(Se,Vt,se,lr,X)}A(X,Z,Ue,K,Me,Ze,Ke,dt,_t,Fe,tt,H,W),Z.layerClipId&&l.hideOutsideRangePoint(Se,Ue.select("text"),U,V,se.xcalendar,se.ycalendar)});var _e=se.cliponaxis===!1;l.setClipUrl(re,_e?null:Z.layerClipId,X)});n.getComponentMethod("errorbars","plot")(X,Y,Z,H)}function A(X,Z,J,N,H,W,U,V,j,q,Y,K,re){var se=Z.xaxis,le=Z.yaxis,ue=X._fullLayout,fe;function pe(at,tt,ct){var At=i.ensureSingle(at,"text").text(tt).attr({class:"bartext bartext-"+fe,"text-anchor":"middle","data-notex":1}).call(l.font,ct).call(o.convertToTspans,X);return At}var we=N[0].trace,xe=we.orientation==="h",he=O(N,xe,se,le),oe=L(ue,N,H,se,le);fe=B(we,H);var te=K.mode==="stack"||K.mode==="relative",ie=N[H],ee=!te||ie._outmost,ce=ie.hasB,_e=q&&q-Y>x;if(!oe||fe==="none"||(ie.isBlank||W===U||V===j)&&(fe==="auto"||fe==="inside")){J.select("text").remove();return}var Se=ue.font,Me=d.getBarColor(N[H],we),Ue=d.getInsideTextFont(we,H,Se,Me),Ge=d.getOutsideTextFont(we,H,Se),Ze=we.insidetextanchor||"end",Ke=J.datum();xe?se.type==="log"&&Ke.s0<=0&&(se.range[0]0&&Ye>0,Ee;_e?ce?Ee=F(Pt-2*q,vt,Ve,Ye,xe)||F(Pt,vt-2*q,Ve,Ye,xe):xe?Ee=F(Pt-(q-Y),vt,Ve,Ye,xe)||F(Pt,vt-2*(q-Y),Ve,Ye,xe):Ee=F(Pt,vt-(q-Y),Ve,Ye,xe)||F(Pt-2*(q-Y),vt,Ve,Ye,xe):Ee=F(Pt,vt,Ve,Ye,xe),be&&Ee?fe="inside":(fe="outside",Tt.remove(),Tt=null)}else fe="inside";if(!Tt){me=i.ensureUniformFontSize(X,fe==="outside"?Ge:Ue),Tt=pe(J,oe,me);var De=Tt.attr("transform");if(Tt.attr("transform",""),st=l.bBox(Tt.node()),Ve=st.width,Ye=st.height,Tt.attr("transform",De),Ve<=0||Ye<=0){Tt.remove();return}}var Ce=we.textangle,Fe,Je;fe==="outside"?(Je=we.constraintext==="both"||we.constraintext==="outside",Fe=I(W,U,V,j,st,{isHorizontal:xe,constrained:Je,angle:Ce,zeroBarDir:he})):(Je=we.constraintext==="both"||we.constraintext==="inside",Fe=P(W,U,V,j,st,{isHorizontal:xe,constrained:Je,angle:Ce,anchor:Ze,hasB:ce,r:q,overhead:Y})),Fe.fontSize=me.size,f(we.type==="histogram"?"bar":we.type,Fe,ue),ie.transform=Fe;var qe=T(Tt,ue,K,re);i.setTransormAndDisplay(qe,Fe)}function F(X,Z,J,N,H){if(X<0||Z<0)return!1;var W=J<=X&&N<=Z,U=J<=Z&&N<=X,V=H?X>=J*(Z/N):Z>=N*(X/J);return W||U||V}function D(X){return X==="auto"?0:X}function R(X,Z){var J=Math.PI/180*Z,N=Math.abs(Math.sin(J)),H=Math.abs(Math.cos(J));return{x:X.width*H+X.height*N,y:X.width*N+X.height*H}}function P(X,Z,J,N,H,W){var U=!!W.isHorizontal,V=!!W.constrained,j=W.angle||0,q=W.anchor,Y=q==="end",K=q==="start",re=W.leftToRight||0,se=(re+1)/2,le=1-se,ue=W.hasB,fe=W.r,pe=W.overhead,we=H.width,xe=H.height,he=Math.abs(Z-X),oe=Math.abs(N-J),te=he>2*x&&oe>2*x?x:0;he-=2*te,oe-=2*te;var ie=D(j);j==="auto"&&!(we<=he&&xe<=oe)&&(we>he||xe>oe)&&(!(we>oe||xe>he)||wex){var Se=z(X,Z,J,N,ee,fe,pe,U,ue);ce=Se.scale,_e=Se.pad}else ce=1,V&&(ce=Math.min(1,he/ee.x,oe/ee.y)),_e=0;var Me=H.left*le+H.right*se,Ue=(H.top+H.bottom)/2,Ge=(X+x)*le+(Z-x)*se,Ze=(J+N)/2,Ke=0,dt=0;if(K||Y){var _t=(U?ee.x:ee.y)/2;fe&&(Y||ue)&&(te+=_e);var Pt=U?w(X,Z):w(J,N);U?K?(Ge=X+Pt*te,Ke=-Pt*_t):(Ge=Z-Pt*te,Ke=Pt*_t):K?(Ze=J+Pt*te,dt=-Pt*_t):(Ze=N-Pt*te,dt=Pt*_t)}return{textX:Me,textY:Ue,targetX:Ge,targetY:Ze,anchorX:Ke,anchorY:dt,scale:ce,rotate:ie}}function z(X,Z,J,N,H,W,U,V,j){var q=Math.max(0,Math.abs(Z-X)-2*x),Y=Math.max(0,Math.abs(N-J)-2*x),K=W-x,re=U?K-Math.sqrt(K*K-(K-U)*(K-U)):K,se=j?K*2:V?K-U:2*re,le=j?K*2:V?2*re:K-U,ue,fe,pe,we,xe;return H.y/H.x>=Y/(q-se)?we=Y/H.y:H.y/H.x<=(Y-le)/q?we=q/H.x:!j&&V?(ue=H.x*H.x+H.y*H.y/4,fe=-2*H.x*(q-K)-H.y*(Y/2-K),pe=(q-K)*(q-K)+(Y/2-K)*(Y/2-K)-K*K,we=(-fe+Math.sqrt(fe*fe-4*ue*pe))/(2*ue)):j?(ue=(H.x*H.x+H.y*H.y)/4,fe=-H.x*(q/2-K)-H.y*(Y/2-K),pe=(q/2-K)*(q/2-K)+(Y/2-K)*(Y/2-K)-K*K,we=(-fe+Math.sqrt(fe*fe-4*ue*pe))/(2*ue)):(ue=H.x*H.x/4+H.y*H.y,fe=-H.x*(q/2-K)-2*H.y*(Y-K),pe=(q/2-K)*(q/2-K)+(Y-K)*(Y-K)-K*K,we=(-fe+Math.sqrt(fe*fe-4*ue*pe))/(2*ue)),we=Math.min(1,we),V?xe=Math.max(0,K-Math.sqrt(Math.max(0,K*K-(K-(Y-H.y*we)/2)*(K-(Y-H.y*we)/2)))-U):xe=Math.max(0,K-Math.sqrt(Math.max(0,K*K-(K-(q-H.x*we)/2)*(K-(q-H.x*we)/2)))-U),{scale:we,pad:xe}}function I(X,Z,J,N,H,W){var U=!!W.isHorizontal,V=!!W.constrained,j=W.angle||0,q=H.width,Y=H.height,K=Math.abs(Z-X),re=Math.abs(N-J),se;U?se=re>2*x?x:0:se=K>2*x?x:0;var le=1;V&&(le=U?Math.min(1,re/Y):Math.min(1,K/q));var ue=D(j),fe=R(H,ue),pe=(U?fe.x:fe.y)/2,we=(H.left+H.right)/2,xe=(H.top+H.bottom)/2,he=(X+Z)/2,oe=(J+N)/2,te=0,ie=0,ee;return(U?X===Z:J===N)&&W.zeroBarDir?ee=W.zeroBarDir:ee=U?w(Z,X):w(J,N),U?(he=Z-ee*se,te=ee*pe):(oe=N+ee*se,ie=-ee*pe),{textX:we,textY:xe,targetX:he,targetY:oe,anchorX:te,anchorY:ie,scale:le,rotate:ue}}function L(X,Z,J,N,H){var W=Z[0].trace,U=W.texttemplate,V;return U?V=G(X,Z,J,N,H):W.textinfo?V=$(Z,J,N,H):V=p.getValue(W.text,J),p.coerceString(y,V)}function B(X,Z){var J=p.getValue(X.textposition,Z);return p.coerceEnumerated(_,J)}function O(X,Z,J,N){for(var H=!1,W=!1,U=0;U0?H=!0:V<0&&(W=!0),H&&W)return 0}var j=Z?J:N,q=-w(j.range[0],j.range[1]);return W?H?0:-q:q}function G(X,Z,J,N,H){var W=Z[0].trace,U=i.castOption(W,J,"texttemplate");if(!U)return"";var V=W.type==="histogram",j=W.type==="waterfall",q=W.type==="funnel",Y=W.orientation==="h",K,re,se,le;Y?(K="y",re=H,se="x",le=N):(K="x",re=N,se="y",le=H);function ue(te){return u(re,re.c2l(te),!0).text}function fe(te){return u(le,le.c2l(te),!0).text}var pe=Z[J],we={};we.label=pe.p,we.labelLabel=we[K+"Label"]=ue(pe.p);var xe=i.castOption(W,pe.i,"text");(xe===0||xe)&&(we.text=xe),we.value=pe.s,we.valueLabel=we[se+"Label"]=fe(pe.s);var he={};v(he,W,pe.i),(V||he.x===void 0)&&(he.x=Y?we.value:we.label),(V||he.y===void 0)&&(he.y=Y?we.label:we.value),(V||he.xLabel===void 0)&&(he.xLabel=Y?we.valueLabel:we.labelLabel),(V||he.yLabel===void 0)&&(he.yLabel=Y?we.labelLabel:we.valueLabel),j&&(we.delta=+pe.rawS||pe.s,we.deltaLabel=fe(we.delta),we.final=pe.v,we.finalLabel=fe(we.final),we.initial=we.final-we.delta,we.initialLabel=fe(we.initial)),q&&(we.value=pe.s,we.valueLabel=fe(we.value),we.percentInitial=pe.begR,we.percentInitialLabel=i.formatPercent(pe.begR),we.percentPrevious=pe.difR,we.percentPreviousLabel=i.formatPercent(pe.difR),we.percentTotal=pe.sumR,we.percenTotalLabel=i.formatPercent(pe.sumR));var oe=i.castOption(W,pe.i,"customdata");return oe&&(we.customdata=oe),i.texttemplateString({data:[he,we,W._meta],fallback:W.texttemplatefallback,labels:we,locale:X._d3locale,template:U})}function $(X,Z,J,N){var H=X[0].trace,W=H.orientation==="h",U=H.type==="waterfall",V=H.type==="funnel";function j(oe){var te=W?N:J;return u(te,oe,!0).text}function q(oe){var te=W?J:N;return u(te,+oe,!0).text}var Y=H.textinfo,K=X[Z],re=Y.split("+"),se=[],le,ue=function(oe){return re.indexOf(oe)!==-1};if(ue("label")&&se.push(j(X[Z].p)),ue("text")&&(le=i.castOption(H,K.i,"text"),(le===0||le)&&se.push(le)),U){var fe=+K.rawS||K.s,pe=K.v,we=pe-fe;ue("initial")&&se.push(q(we)),ue("delta")&&se.push(q(fe)),ue("final")&&se.push(q(pe))}if(V){ue("value")&&se.push(q(K.s));var xe=0;ue("percent initial")&&xe++,ue("percent previous")&&xe++,ue("percent total")&&xe++;var he=xe>1;ue("percent initial")&&(le=i.formatPercent(K.begR),he&&(le+=" of initial"),se.push(le)),ue("percent previous")&&(le=i.formatPercent(K.difR),he&&(le+=" of previous"),se.push(le)),ue("percent total")&&(le=i.formatPercent(K.sumR),he&&(le+=" of total"),se.push(le))}return se.join("
")}r.exports={plot:S,toMoveInsideBar:P}}}),Ay=ye({"src/traces/bar/hover.js"(e,r){"use strict";var t=Hs(),a=li(),i=Ya(),o=Yt().fillText,s=WA().getLineWidth,l=qi().hoverLabelText,n=Vn().BADNUM;function u(h,d,p,g,m){var y=c(h,d,p,g,m);if(y){var _=y.cd,v=_[0].trace,x=_[y.index];return y.color=f(v,x),a.getComponentMethod("errorbars","hoverInfo")(x,v,y),[y]}}function c(h,d,p,g,m){var y=h.cd,_=y[0].trace,v=y[0].t,x=g==="closest",E=_.type==="waterfall",M=h.maxHoverDistance,C=h.maxSpikeDistance,w,k,T,b,S,A,F;_.orientation==="h"?(w=p,k=d,T="y",b="x",S=J,A=$):(w=d,k=p,T="x",b="y",A=J,S=$);var D=_[T+"period"],R=x||D;function P(se){return I(se,-1)}function z(se){return I(se,1)}function I(se,le){var ue=se.w;return se[T]+le*ue/2}function L(se){return se[T+"End"]-se[T+"Start"]}var B=x?P:D?function(se){return se.p-L(se)/2}:function(se){return Math.min(P(se),se.p-v.bardelta/2)},O=x?z:D?function(se){return se.p+L(se)/2}:function(se){return Math.max(z(se),se.p+v.bardelta/2)};function G(se,le,ue){return m.finiteRange&&(ue=0),t.inbox(se-w,le-w,ue+Math.min(1,Math.abs(le-se)/F)-1)}function $(se){return G(B(se),O(se),M)}function X(se){return G(P(se),z(se),C)}function Z(se){var le=se[b];if(E){var ue=Math.abs(se.rawS)||0;k>0?le+=ue:k<0&&(le-=ue)}return le}function J(se){var le=k,ue=se.b,fe=Z(se);return t.inbox(ue-le,fe-le,M+(fe-le)/(fe-ue)-1)}function N(se){var le=k,ue=se.b,fe=Z(se);return t.inbox(ue-le,fe-le,C+(fe-le)/(fe-ue)-1)}var H=h[T+"a"],W=h[b+"a"];F=Math.abs(H.r2c(H.range[1])-H.r2c(H.range[0]));function U(se){return(S(se)+A(se))/2}var V=t.getDistanceFunction(g,S,A,U);if(t.getClosest(y,V,h),h.index!==!1&&y[h.index].p!==n){R||(B=function(se){return Math.min(P(se),se.p-v.bargroupwidth/2)},O=function(se){return Math.max(z(se),se.p+v.bargroupwidth/2)});var j=h.index,q=y[j],Y=_.base?q.b+q.s:q.s;h[b+"0"]=h[b+"1"]=W.c2p(q[b],!0),h[b+"LabelVal"]=Y;var K=v.extents[v.extents.round(q.p)];h[T+"0"]=H.c2p(x?B(q):K[0],!0),h[T+"1"]=H.c2p(x?O(q):K[1],!0);var re=q.orig_p!==void 0;return h[T+"LabelVal"]=re?q.orig_p:q.p,h.labelLabel=l(H,h[T+"LabelVal"],_[T+"hoverformat"]),h.valueLabel=l(W,h[b+"LabelVal"],_[b+"hoverformat"]),h.baseLabel=l(W,q.b,_[b+"hoverformat"]),h.spikeDistance=(N(q)+X(q))/2,h[T+"Spike"]=H.c2p(q.p,!0),o(q,_,h),h.hovertemplate=_.hovertemplate,h}}function f(h,d){var p=d.mcc||h.marker.color,g=d.mlcc||h.marker.line.color,m=s(h,d);if(i.opacity(p))return p;if(i.opacity(g)&&m)return g}r.exports={hoverPoints:u,hoverOnBars:c,getTraceColor:f}}}),Pre=ye({"src/traces/bar/event_data.js"(e,r){"use strict";r.exports=function(a,i,o){return a.x="xVal"in i?i.xVal:i.x,a.y="yVal"in i?i.yVal:i.y,i.xa&&(a.xaxis=i.xa),i.ya&&(a.yaxis=i.ya),o.orientation==="h"?(a.label=a.y,a.value=a.x):(a.label=a.x,a.value=a.y),a}}}),Ty=ye({"src/traces/bar/select.js"(e,r){"use strict";r.exports=function(i,o){var s=i.cd,l=i.xaxis,n=i.yaxis,u=s[0].trace,c=u.type==="funnel",f=u.orientation==="h",h=[],d;if(o===!1)for(d=0;d0?(D="v",T>0?R=Math.min(S,b):R=Math.min(b)):T>0?(D="h",R=Math.min(S)):R=0;if(!R){p.visible=!1;return}p._length=R;var B=g("orientation",D);p._hasPreCompStats?B==="v"&&T===0?(g("x0",0),g("dx",1)):B==="h"&&k===0&&(g("y0",0),g("dy",1)):B==="v"&&T===0?g("x0"):B==="h"&&k===0&&g("y0");var O=a.getComponentMethod("calendars","handleTraceDefaults");O(d,p,["x","y"],m)}function f(d,p,g,m){var y=m.prefix,_=t.coerce2(d,p,n,"marker.outliercolor"),v=g("marker.line.outliercolor"),x="outliers";p._hasPreCompStats?x="all":(_||v)&&(x="suspectedoutliers");var E=g(y+"points",x);E?(g("jitter",E==="all"?.3:0),g("pointpos",E==="all"?-1.5:0),g("marker.symbol"),g("marker.opacity"),g("marker.size"),g("marker.angle"),g("marker.color",p.line.color),g("marker.line.color"),g("marker.line.width"),E==="suspectedoutliers"&&(g("marker.line.outliercolor",p.marker.color),g("marker.line.outlierwidth")),g("selected.marker.color"),g("unselected.marker.color"),g("selected.marker.size"),g("unselected.marker.size"),g("text"),g("hovertext")):delete p.marker;var M=g("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(g("hovertemplate"),g("hovertemplatefallback")),t.coerceSelectionMarkerOpacity(p,g)}function h(d,p){var g,m;function y(E){return t.coerce(m._input,m,n,E)}for(var _=0;_Z.uf};if(C._hasPreCompStats){var j=C[R],q=function(_t){return D.d2c((C[_t]||[])[A])},Y=1/0,K=-1/0;for(A=0;A=Z.q1&&Z.q3>=Z.med){var se=q("lowerfence");Z.lf=se!==s&&se<=Z.q1?se:m(Z,N,H);var le=q("upperfence");Z.uf=le!==s&&le>=Z.q3?le:y(Z,N,H);var ue=q("mean");Z.mean=ue!==s?ue:H?o.mean(N,H):(Z.q1+Z.q3)/2;var fe=q("sd");Z.sd=ue!==s&&fe>=0?fe:H?o.stdev(N,H,Z.mean):Z.q3-Z.q1,Z.lo=_(Z),Z.uo=v(Z);var pe=q("notchspan");pe=pe!==s&&pe>0?pe:x(Z,H),Z.ln=Z.med-pe,Z.un=Z.med+pe;var we=Z.lf,xe=Z.uf;C.boxpoints&&N.length&&(we=Math.min(we,N[0]),xe=Math.max(xe,N[H-1])),C.notched&&(we=Math.min(we,Z.ln),xe=Math.max(xe,Z.un)),Z.min=we,Z.max=xe}else{o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+Z.q1,"median = "+Z.med,"q3 = "+Z.q3].join(` +`));var he;Z.med!==s?he=Z.med:Z.q1!==s?Z.q3!==s?he=(Z.q1+Z.q3)/2:he=Z.q1:Z.q3!==s?he=Z.q3:he=0,Z.med=he,Z.q1=Z.q3=he,Z.lf=Z.uf=he,Z.mean=Z.sd=he,Z.ln=Z.un=he,Z.min=Z.max=he}Y=Math.min(Y,Z.min),K=Math.max(K,Z.max),Z.pts2=J.filter(V),b.push(Z)}}C._extremes[D._id]=a.findExtremes(D,[Y,K],{padded:!0})}else{var oe=D.makeCalcdata(C,R),te=u($,X),ie=$.length,ee=c(ie);for(A=0;A=0&&ce0){if(Z={},Z.pos=Z[z]=$[A],J=Z.pts=ee[A].sort(p),N=Z[R]=J.map(g),H=N.length,Z.min=N[0],Z.max=N[H-1],Z.mean=o.mean(N,H),Z.sd=o.stdev(N,H,Z.mean)*C.sdmultiple,Z.med=o.interp(N,.5),H%2&&(Ue||Ge)){var Ze,Ke;Ue?(Ze=N.slice(0,H/2),Ke=N.slice(H/2+1)):Ge&&(Ze=N.slice(0,H/2+1),Ke=N.slice(H/2)),Z.q1=o.interp(Ze,.5),Z.q3=o.interp(Ke,.5)}else Z.q1=o.interp(N,.25),Z.q3=o.interp(N,.75);Z.lf=m(Z,N,H),Z.uf=y(Z,N,H),Z.lo=_(Z),Z.uo=v(Z);var dt=x(Z,H);Z.ln=Z.med-dt,Z.un=Z.med+dt,_e=Math.min(_e,Z.ln),Se=Math.max(Se,Z.un),Z.pts2=J.filter(V),b.push(Z)}C.notched&&o.isTypedArray(oe)&&(oe=Array.from(oe)),C._extremes[D._id]=a.findExtremes(D,C.notched?oe.concat([_e,Se]):oe,{padded:!0})}return d(b,C),b.length>0?(b[0].t={num:w[S],dPos:X,posLetter:z,valLetter:R,labels:{med:l(M,"median:"),min:l(M,"min:"),q1:l(M,"q1:"),q3:l(M,"q3:"),max:l(M,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?l(M,"mean \xB1 \u03C3:").replace("\u03C3",C.sdmultiple===1?"\u03C3":C.sdmultiple+"\u03C3"):l(M,"mean:"),lf:l(M,"lower fence:"),uf:l(M,"upper fence:")}},w[S]++,b):[{t:{empty:!0}}]};function n(E,M,C,w){var k=M in E,T=M+"0"in E,b="d"+M in E;if(k||T&&b){var S=C.makeCalcdata(E,M),A=i(E,C,M,S).vals;return[A,S]}var F;T?F=E[M+"0"]:"name"in E&&(C.type==="category"||t(E.name)&&["linear","log"].indexOf(C.type)!==-1||o.isDateTime(E.name)&&C.type==="date")?F=E.name:F=w;for(var D=C.type==="multicategory"?C.r2c_just_indices(F):C.d2c(F,0,E[M+"calendar"]),R=E._length,P=new Array(R),z=0;z1,T=1-d[n+"gap"],b=1-d[n+"groupgap"];for(m=0;m0;if(D==="positive"?(Z=R*(F?1:.5),H=N,J=H=z):D==="negative"?(Z=H=z,J=R*(F?1:.5),W=N):(Z=J=R,H=W=N),K){var re=S.pointpos,se=S.jitter,le=S.marker.size/2,ue=0;re+se>=0&&(ue=N*(re+se),ue>Z?(Y=!0,j=le,U=ue):ue>H&&(j=le,U=Z)),ue<=Z&&(U=Z);var fe=0;re-se<=0&&(fe=-N*(re-se),fe>J?(Y=!0,q=le,V=fe):fe>W&&(q=le,V=J)),fe<=J&&(V=J)}else U=Z,V=J;var pe=new Array(_.length);for(y=0;y<_.length;y++)pe[y]=_[y].pos;S._extremes[p]=t.findExtremes(f,pe,{padded:Y,vpadminus:V,vpadplus:U,vpadLinearized:!0,ppadminus:{x:q,y:j}[g],ppadplus:{x:j,y:q}[g]})}}}r.exports={crossTraceCalc:s,setPositionOffset:l}}}),XA=ye({"src/traces/box/plot.js"(e,r){"use strict";var t=ai(),a=Yt(),i=$i(),o=5,s=.01;function l(f,h,d,p){var g=f._context.staticPlot,m=h.xaxis,y=h.yaxis;a.makeTraceGroups(p,d,"trace boxes").each(function(_){var v=t.select(this),x=_[0],E=x.t,M=x.trace;if(E.wdPos=E.bdPos*M.whiskerwidth,M.visible!==!0||E.empty){v.remove();return}var C,w;M.orientation==="h"?(C=y,w=m):(C=m,w=y),n(v,{pos:C,val:w},M,E,g),u(v,{x:m,y},M,E),c(v,{pos:C,val:w},M,E)})}function n(f,h,d,p,g){var m=d.orientation==="h",y=h.val,_=h.pos,v=!!_.rangebreaks,x=p.bPos,E=p.wdPos||0,M=p.bPosPxOffset||0,C=d.whiskerwidth||0,w=d.showwhiskers!==!1,k=d.notched||!1,T=k?1-2*d.notchwidth:1,b,S;Array.isArray(p.bdPos)?(b=p.bdPos[0],S=p.bdPos[1]):(b=p.bdPos,S=p.bdPos);var A=f.selectAll("path.box").data(d.type!=="violin"||d.box.visible?a.identity:[]);A.enter().append("path").style("vector-effect",g?"none":"non-scaling-stroke").attr("class","box"),A.exit().remove(),A.each(function(F){if(F.empty)return t.select(this).attr("d","M0,0Z");var D=_.c2l(F.pos+x,!0),R=_.l2p(D-b)+M,P=_.l2p(D+S)+M,z=v?(R+P)/2:_.l2p(D)+M,I=d.whiskerwidth,L=v?R*I+(1-I)*z:_.l2p(D-E)+M,B=v?P*I+(1-I)*z:_.l2p(D+E)+M,O=_.l2p(D-b*T)+M,G=_.l2p(D+S*T)+M,$=d.sizemode==="sd",X=y.c2p($?F.mean-F.sd:F.q1,!0),Z=$?y.c2p(F.mean+F.sd,!0):y.c2p(F.q3,!0),J=a.constrain($?y.c2p(F.mean,!0):y.c2p(F.med,!0),Math.min(X,Z)+1,Math.max(X,Z)-1),N=F.lf===void 0||d.boxpoints===!1||$,H=y.c2p(N?F.min:F.lf,!0),W=y.c2p(N?F.max:F.uf,!0),U=y.c2p(F.ln,!0),V=y.c2p(F.un,!0);m?t.select(this).attr("d","M"+J+","+O+"V"+G+"M"+X+","+R+"V"+P+(k?"H"+U+"L"+J+","+G+"L"+V+","+P:"")+"H"+Z+"V"+R+(k?"H"+V+"L"+J+","+O+"L"+U+","+R:"")+"Z"+(w?"M"+X+","+z+"H"+H+"M"+Z+","+z+"H"+W+(C===0?"":"M"+H+","+L+"V"+B+"M"+W+","+L+"V"+B):"")):t.select(this).attr("d","M"+O+","+J+"H"+G+"M"+R+","+X+"H"+P+(k?"V"+U+"L"+G+","+J+"L"+P+","+V:"")+"V"+Z+"H"+R+(k?"V"+V+"L"+O+","+J+"L"+R+","+U:"")+"Z"+(w?"M"+z+","+X+"V"+H+"M"+z+","+Z+"V"+W+(C===0?"":"M"+L+","+H+"H"+B+"M"+L+","+W+"H"+B):""))})}function u(f,h,d,p){var g=h.x,m=h.y,y=p.bdPos,_=p.bPos,v=d.boxpoints||d.points;a.seedPseudoRandom();var x=function(C){return C.forEach(function(w){w.t=p,w.trace=d}),C},E=f.selectAll("g.points").data(v?x:[]);E.enter().append("g").attr("class","points"),E.exit().remove();var M=E.selectAll("path").data(function(C){var w,k=C.pts2,T=Math.max((C.max-C.min)/10,C.q3-C.q1),b=T*1e-9,S=T*s,A=[],F=0,D;if(d.jitter){if(T===0)for(F=1,A=new Array(k.length),w=0;wC.lo&&(B.so=!0)}return k});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(i.translatePoints,g,m)}function c(f,h,d,p){var g=h.val,m=h.pos,y=!!m.rangebreaks,_=p.bPos,v=p.bPosPxOffset||0,x=d.boxmean||(d.meanline||{}).visible,E,M;Array.isArray(p.bdPos)?(E=p.bdPos[0],M=p.bdPos[1]):(E=p.bdPos,M=p.bdPos);var C=f.selectAll("path.mean").data(d.type==="box"&&d.boxmean||d.type==="violin"&&d.box.visible&&d.meanline.visible?a.identity:[]);C.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),C.exit().remove(),C.each(function(w){var k=m.c2l(w.pos+_,!0),T=m.l2p(k-E)+v,b=m.l2p(k+M)+v,S=y?(T+b)/2:m.l2p(k)+v,A=g.c2p(w.mean,!0),F=g.c2p(w.mean-w.sd,!0),D=g.c2p(w.mean+w.sd,!0);d.orientation==="h"?t.select(this).attr("d","M"+A+","+T+"V"+b+(x==="sd"?"m0,0L"+F+","+S+"L"+A+","+T+"L"+D+","+S+"Z":"")):t.select(this).attr("d","M"+T+","+A+"H"+b+(x==="sd"?"m0,0L"+S+","+F+"L"+T+","+A+"L"+S+","+D+"Z":""))})}r.exports={plot:l,plotBoxAndWhiskers:n,plotPoints:u,plotBoxMean:c}}}),ZA=ye({"src/traces/box/style.js"(e,r){"use strict";var t=ai(),a=Ya(),i=$i();function o(l,n,u){var c=u||t.select(l).selectAll("g.trace.boxes");c.style("opacity",function(f){return f[0].trace.opacity}),c.each(function(f){var h=t.select(this),d=f[0].trace,p=d.line.width;function g(_,v,x,E){_.style("stroke-width",v+"px").call(a.stroke,x).call(a.fill,E)}var m=h.selectAll("path.box");if(d.type==="candlestick")m.each(function(_){if(!_.empty){var v=t.select(this),x=d[_.dir];g(v,x.line.width,x.line.color,x.fillcolor),v.style("opacity",d.selectedpoints&&!_.selected?.3:1)}});else{g(m,p,d.line.color,d.fillcolor),h.selectAll("path.mean").style({"stroke-width":p,"stroke-dasharray":2*p+"px,"+p+"px"}).call(a.stroke,d.line.color);var y=h.selectAll("path.point");i.pointStyle(y,d,l)}})}function s(l,n,u){var c=n[0].trace,f=u.selectAll("path.point");c.selectedpoints?i.selectedPointStyle(f,c):i.pointStyle(f,c,l)}r.exports={style:o,styleOnSelect:s}}}),j9=ye({"src/traces/box/hover.js"(e,r){"use strict";var t=qi(),a=Yt(),i=Hs(),o=Ya(),s=a.fillText;function l(c,f,h,d){var p=c.cd,g=p[0].trace,m=g.hoveron,y=[],_;return m.indexOf("boxes")!==-1&&(y=y.concat(n(c,f,h,d))),m.indexOf("points")!==-1&&(_=u(c,f,h)),d==="closest"?_?[_]:y:(_&&y.push(_),y)}function n(c,f,h,d){var p=c.cd,g=c.xa,m=c.ya,y=p[0].trace,_=p[0].t,v=y.type==="violin",x,E,M,C,w,k,T,b,S,A,F,D=_.bdPos,R,P,z=_.wHover,I=function(fe){return M.c2l(fe.pos)+_.bPos-M.c2l(k)};v&&y.side!=="both"?(y.side==="positive"&&(S=function(fe){var pe=I(fe);return i.inbox(pe,pe+z,A)},R=D,P=0),y.side==="negative"&&(S=function(fe){var pe=I(fe);return i.inbox(pe-z,pe,A)},R=0,P=D)):(S=function(fe){var pe=I(fe);return i.inbox(pe-z,pe+z,A)},R=P=D);var L;v?L=function(fe){return i.inbox(fe.span[0]-w,fe.span[1]-w,A)}:L=function(fe){return i.inbox(fe.min-w,fe.max-w,A)},y.orientation==="h"?(w=f,k=h,T=L,b=S,x="y",M=m,E="x",C=g):(w=h,k=f,T=S,b=L,x="x",M=g,E="y",C=m);var B=Math.min(1,D/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));A=c.maxHoverDistance-B,F=c.maxSpikeDistance-B;function O(fe){return(T(fe)+b(fe))/2}var G=i.getDistanceFunction(d,T,b,O);if(i.getClosest(p,G,c),c.index===!1)return[];var $=p[c.index],X=y.line.color,Z=(y.marker||{}).color;o.opacity(X)&&y.line.width?c.color=X:o.opacity(Z)&&y.boxpoints?c.color=Z:c.color=y.fillcolor,c[x+"0"]=M.c2p($.pos+_.bPos-P,!0),c[x+"1"]=M.c2p($.pos+_.bPos+R,!0),c[x+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var J=x+"Spike";c.spikeDistance=O($)*F/A,c[J]=M.c2p($.pos,!0);var N=y.boxmean||y.sizemode==="sd"||(y.meanline||{}).visible,H=y.boxpoints||y.points,W=H&&N?["max","uf","q3","med","mean","q1","lf","min"]:H&&!N?["max","uf","q3","med","q1","lf","min"]:!H&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],U=C.range[1]0&&(u=!0);for(var d=0;dl){var n=l-o[a];return o[a]=l,n}}else return o[a]=l,l;return 0},max:function(a,i,o,s){var l=s[i];if(t(l))if(l=Number(l),t(o[a])){if(o[a]T&&To){var A=b===a?1:6,F=b===a?"M12":"M1";return function(D,R){var P=_.c2d(D,a,v),z=P.indexOf("-",A);z>0&&(P=P.slice(0,z));var I=_.d2c(P,0,v);if(In?p>o?p>a*1.1?a:p>i*1.1?i:o:p>s?s:p>l?l:n:Math.pow(10,Math.floor(Math.log(p)/Math.LN10))}function h(p,g,m,y,_,v){if(y&&p>o){var x=d(g,_,v),E=d(m,_,v),M=p===a?0:1;return x[M]!==E[M]}return Math.floor(m/p)-Math.floor(g/p)>.1}function d(p,g,m){var y=g.c2d(p,a,m).split("-");return y[0]===""&&(y.unshift(),y[0]="-"+y[0]),y}}}),$9=ye({"src/traces/histogram/calc.js"(e,r){"use strict";var t=en(),a=Yt(),i=li(),o=qi(),{hasColorscale:s}=xc(),l=Nc(),n=nb(),u=V9(),c=G9(),f=H9(),h=W9();function d(_,v){var x=[],E=[],M=v.orientation==="h",C=o.getFromId(_,M?v.yaxis:v.xaxis),w=M?"y":"x",k={x:"y",y:"x"}[w],T=v[w+"calendar"],b=v.cumulative,S,A=p(_,v,C,w),F=A[0],D=A[1],R=typeof F.size=="string",P=[],z=R?P:F,I=[],L=[],B=[],O=0,G=v.histnorm,$=v.histfunc,X=G.indexOf("density")!==-1,Z,J,N;b.enabled&&X&&(G=G.replace(/ ?density$/,""),X=!1);var H=$==="max"||$==="min",W=H?null:0,U=u.count,V=c[G],j=!1,q=function(ce){return C.r2c(ce,0,T)},Y;for(a.isArrayOrTypedArray(v[k])&&$!=="count"&&(Y=v[k],j=$==="avg",U=u[$]),S=q(F.start),J=q(F.end)+(S-o.tickIncrement(S,F.size,!1,T))/1e6;S=0&&N=te;S--)if(E[S]){ie=S;break}for(S=te;S<=ie;S++)if(t(x[S])&&t(E[S])){var ee={p:x[S],s:E[S],b:0};b.enabled||(ee.pts=B[S],le?ee.ph0=ee.ph1=B[S].length?D[B[S][0]]:x[S]:(v._computePh=!0,ee.ph0=xe(P[S]),ee.ph1=xe(P[S+1],!0))),oe.push(ee)}return oe.length===1&&(oe[0].width1=o.tickIncrement(oe[0].p,F.size,!1,T)-oe[0].p),s(v,"marker")&&l(_,v,{vals:v.marker.color,containerStr:"marker",cLetter:"c"}),s(v,"marker.line")&&l(_,v,{vals:v.marker.line.color,containerStr:"marker.line",cLetter:"c"}),n(oe,v),a.isArrayOrTypedArray(v.selectedpoints)&&a.tagSelected(oe,v,pe),oe}function p(_,v,x,E,M){var C,w=E+"bins",k=_._fullLayout,T=v["_"+E+"bingroup"],b=k._histogramBinOpts[T],S=k.barmode==="overlay",A,F,D,R,P,z,I,L=function(xe){return x.r2c(xe,0,R)},B=function(xe){return x.c2r(xe,0,R)},O=x.type==="date"?function(xe){return xe||xe===0?a.cleanDate(xe,null,R):null}:function(xe){return t(xe)?Number(xe):null};function G(xe,he,oe){he[xe+"Found"]?(he[xe]=O(he[xe]),he[xe]===null&&(he[xe]=oe[xe])):(z[xe]=he[xe]=oe[xe],a.nestedProperty(F[0],w+"."+xe).set(oe[xe]))}if(v["_"+E+"autoBinFinished"])delete v["_"+E+"autoBinFinished"];else{F=b.traces;var $=[],X=!0,Z=!1,J=!1;for(A=0;Ax.r2l(K)&&(se=o.tickIncrement(se,b.size,!0,R)),V.start=x.l2r(se),Y||a.nestedProperty(v,w+".start").set(V.start)}var le=b.end,ue=x.r2l(U.end),fe=ue!==void 0;if((b.endFound||fe)&&ue!==x.r2l(le)){var pe=fe?ue:a.aggNums(Math.max,null,P);V.end=x.l2r(pe),fe||a.nestedProperty(v,w+".start").set(V.end)}var we="autobin"+E;return v._input[we]===!1&&(v._input[w]=a.extendFlat({},v[w]||{}),delete v._input[we],delete v[we]),[V,P]}function g(_,v,x,E,M){var C=_._fullLayout,w=m(_,v),k=!1,T=1/0,b=[v],S,A,F;for(S=0;S=0;E--)k(E);else if(v==="increasing"){for(E=1;E<_.length;E++)_[E]+=_[E-1];x==="exclude"&&(_.unshift(0),_.pop())}else{for(E=_.length-2;E>=0;E--)_[E]+=_[E+1];x==="exclude"&&(_.push(0),_.shift())}}r.exports={calc:d,calcAllAutoBins:p}}}),jre=ye({"src/traces/histogram2d/calc.js"(e,r){"use strict";var t=Yt(),a=qi(),i=V9(),o=G9(),s=H9(),l=W9(),n=$9().calcAllAutoBins;r.exports=function(d,p){var g=a.getFromId(d,p.xaxis),m=a.getFromId(d,p.yaxis),y=p.xcalendar,_=p.ycalendar,v=function(Ve){return g.r2c(Ve,0,y)},x=function(Ve){return m.r2c(Ve,0,_)},E=function(Ve){return g.c2r(Ve,0,y)},M=function(Ve){return m.c2r(Ve,0,_)},C,w,k,T,b=n(d,p,g,"x"),S=b[0],A=b[1],F=n(d,p,m,"y"),D=F[0],R=F[1],P=p._length;A.length>P&&A.splice(P,A.length-P),R.length>P&&R.splice(P,R.length-P);var z=[],I=[],L=[],B=typeof S.size=="string",O=typeof D.size=="string",G=[],$=[],X=B?G:S,Z=O?$:D,J=0,N=[],H=[],W=p.histnorm,U=p.histfunc,V=W.indexOf("density")!==-1,j=U==="max"||U==="min",q=j?null:0,Y=i.count,K=o[W],re=!1,se=[],le=[],ue="z"in p?p.z:"marker"in p&&Array.isArray(p.marker.color)?p.marker.color:"";ue&&U!=="count"&&(re=U==="avg",Y=i[U]);var fe=S.size,pe=v(S.start),we=v(S.end)+(pe-a.tickIncrement(pe,fe,!1,y))/1e6;for(C=pe;C=0&&k=0&&T<_e&&(J+=Y(k,C,z[T],ue,N[T]),H[T][k].push(C),Ue&&(Ze[k]===void 0?Ze[k]=Tt:Ze[k]!==Tt&&(Ue=!1)),Ge&&(Ke[T]===void 0?Ke[T]=st:Ke[T]!==st&&(Ge=!1)),dt=Math.min(dt,Tt-G[k]),_t=Math.min(_t,G[k+1]-Tt),Pt=Math.min(Pt,st-$[T]),vt=Math.min(vt,$[T+1]-st))}if(re)for(T=0;T<_e;T++)J+=s(z[T],N[T]);if(K)for(T=0;T<_e;T++)K(z[T],J,se,le[T]);return{x:A,xRanges:f(G,Ue&&Ze,dt,_t,g,y),x0:oe,dx:he,y:R,yRanges:f($,Ge&&Ke,Pt,vt,m,_),y0:Me,dy:Se,z,pts:H}};function u(h,d,p,g){var m=new Array(h),y;if(g)for(y=0;ya;f++)c=s(n,u,o(c));return c>a&&t.log("interp2d didn't converge quickly",c),n};function s(l,n,u){var c=0,f,h,d,p,g,m,y,_,v,x,E,M,C;for(p=0;pM&&(c=Math.max(c,Math.abs(l[h][d]-E)/(C-M))))}return c}}}),tT=ye({"src/traces/heatmap/find_empties.js"(e,r){"use strict";var t=Yt().maxRowLength;r.exports=function(i){var o=[],s={},l=[],n=i[0],u=[],c=[0,0,0],f=t(i),h,d,p,g,m,y,_,v;for(d=0;d=0;m--)g=l[m],d=g[0],p=g[1],y=((s[[d-1,p]]||c)[2]+(s[[d+1,p]]||c)[2]+(s[[d,p-1]]||c)[2]+(s[[d,p+1]]||c)[2])/20,y&&(_[g]=[d,p,y],l.splice(m,1),v=!0);if(!v)throw"findEmpties iterated with no new neighbors";for(g in _)s[g]=_[g],o.push(_[g])}return o.sort(function(x,E){return E[2]-x[2]})}}}),Y9=ye({"src/traces/heatmap/make_bound_array.js"(e,r){"use strict";var t=li(),a=Yt().isArrayOrTypedArray;r.exports=function(o,s,l,n,u,c){var f=[],h=t.traceIs(o,"contour"),d=t.traceIs(o,"histogram"),p,g,m,y=a(s)&&s.length>1;if(y&&!d&&c.type!=="category"){var _=s.length;if(_<=u){if(h)f=Array.from(s).slice(0,u);else if(u===1)c.type==="log"?f=[.5*s[0],2*s[0]]:f=[s[0]-.5,s[0]+.5];else if(c.type==="log"){for(f=[Math.pow(s[0],1.5)/Math.pow(s[1],.5)],m=1;m<_;m++)f.push(Math.sqrt(s[m-1]*s[m]));f.push(Math.pow(s[_-1],1.5)/Math.pow(s[_-2],.5))}else{for(f=[1.5*s[0]-.5*s[1]],m=1;m<_;m++)f.push((s[m-1]+s[m])*.5);f.push(1.5*s[_-1]-.5*s[_-2])}if(_1){var W=(H[H.length-1]-H[0])/(H.length-1),U=Math.abs(W/100);for(P=0;PU)return!1}return!0}_._islinear=!1,v.type==="log"||x.type==="log"?C==="fast"&&L("log axis found"):B(w)?B(S)?_._islinear=!0:C==="fast"&&L("y scale is not linear"):C==="fast"&&L("x scale is not linear");var O=a.maxRowLength(R),G=_.xtype==="scaled"?"":w,$=h(_,G,k,T,O,v),X=_.ytype==="scaled"?"":S,Z=h(_,X,A,F,R.length,x);_._extremes[v._id]=i.findExtremes(v,$),_._extremes[x._id]=i.findExtremes(x,Z);var J={x:$,y:Z,z:R,text:_._text||_.text,hovertext:_._hovertext||_.hovertext};if(_.xperiodalignment&&b&&(J.orig_x=b),_.yperiodalignment&&D&&(J.orig_y=D),G&&G.length===$.length-1&&(J.xCenter=G),X&&X.length===Z.length-1&&(J.yCenter=X),M&&(J.xRanges=z.xRanges,J.yRanges=z.yRanges,J.pts=z.pts),E||l(y,_,{vals:R,cLetter:"z"}),E&&_.contours&&_.contours.coloring==="heatmap"){var N={type:_.type==="contour"?"heatmap":"histogram2d",xcalendar:_.xcalendar,ycalendar:_.ycalendar};J.xfill=h(N,G,k,T,O,v),J.yfill=h(N,X,A,F,R.length,x)}return[J]};function p(m){for(var y=[],_=m.length,v=0;v<_;v++){var x=m[v];x!==d&&y.push(x)}return y}function g(m,y,_){for(var v=[],x=-1,E=0;E<_.length;E++)if(y[E]!==d){x++,v[x]=[];for(var M=0;M<_[E].length;M++)m[M]!==d&&v[x].push(_[E][M])}return v}}}),aT=ye({"src/constants/pixelated_image.js"(e){"use strict";e.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],e.STYLE=e.CSS_DECLARATIONS.map(function(r){return r.join(": ")+"; "}).join("")}}),X9=ye({"src/lib/supports_pixelated_image.js"(e,r){"use strict";var t=aT(),a=$i(),i=Yt(),o=null;function s(){if(o!==null)return o;o=!1;var l=i.isSafari()||i.isMacWKWebView()||i.isIOS();if(window.navigator.userAgent&&!l){var n=Array.from(t.CSS_DECLARATIONS).reverse(),u=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof u=="function")o=n.some(function(d){return u.apply(null,d)});else{var c=a.tester.append("image").attr("style",t.STYLE),f=window.getComputedStyle(c.node()),h=f.imageRendering;o=n.some(function(d){var p=d[1];return h===p||h===p.toLowerCase()}),c.remove()}}return o}r.exports=s}}),iT=ye({"src/traces/heatmap/plot.js"(e,r){"use strict";var t=ai(),a=li(),i=$i(),o=qi(),s=Yt(),l=Go(),n=RA(),u=Ya(),c=As().extractOpts,f=As().makeColorScaleFuncFromTrace,h=Sd(),d=Yl(),p=d.LINE_SPACING,g=X9(),m=aT().STYLE,y="heatmap-label";function _(C){return C.selectAll("g."+y)}function v(C){_(C).remove()}r.exports=function(C,w,k,T){var b=w.xaxis,S=w.yaxis;s.makeTraceGroups(T,k,"hm").each(function(A){var F=t.select(this),D=A[0],R=D.trace,P=R.xgap||0,z=R.ygap||0,I=D.z,L=D.x,B=D.y,O=D.xCenter,G=D.yCenter,$=a.traceIs(R,"contour"),X=$?"best":R.zsmooth,Z=I.length,J=s.maxRowLength(I),N=!1,H=!1,W,U,V,j,q,Y,K,re;for(Y=0;W===void 0&&Y0;)U=b.c2p(L[Y]),Y--;for(U0;)q=S.c2p(B[Y]),Y--;q=b._length||U<=0||j>=S._length||q<=0;if(pe){var we=F.selectAll("image").data([]);we.exit().remove(),v(F);return}var xe,he;se==="fast"?(xe=J,he=Z):(xe=ue,he=fe);var oe=document.createElement("canvas");oe.width=xe,oe.height=he;var te=oe.getContext("2d",{willReadFrequently:!0}),ie=f(R,{noNumericCheck:!0,returnArray:!0}),ee,ce;se==="fast"?(ee=N?function(Wt){return J-1-Wt}:s.identity,ce=H?function(Wt){return Z-1-Wt}:s.identity):(ee=function(Wt){return s.constrain(Math.round(b.c2p(L[Wt])-W),0,ue)},ce=function(Wt){return s.constrain(Math.round(S.c2p(B[Wt])-j),0,fe)});var _e=ce(0),Se=[_e,_e],Me=N?0:1,Ue=H?0:1,Ge=0,Ze=0,Ke=0,dt=0,_t,Pt,vt,Tt,st;function Ve(Wt,jt=0){if(Wt===void 0)return[0,0,0,0];var sr=ie(Wt);return sr[0]=Math.round(sr[0]),sr[1]=Math.round(sr[1]),sr[2]=Math.round(sr[2]),Ge+=jt,Ze+=sr[0]*jt,Ke+=sr[1]*jt,dt+=sr[2]*jt,sr}function Ye(Wt,jt,sr,kr){var Mr=Wt[sr.bin0];if(Mr===void 0)return Ve(void 0,1);var ua=Wt[sr.bin1],ra=jt[sr.bin0],ni=jt[sr.bin1],Ca=ua-Mr||0,Li=ra-Mr||0,Va;return ua===void 0?ni===void 0?Va=0:ra===void 0?Va=2*(ni-Mr):Va=(2*ni-ra-Mr)*2/3:ni===void 0?ra===void 0?Va=0:Va=(2*Mr-ua-ra)*2/3:ra===void 0?Va=(2*ni-ua-Mr)*2/3:Va=ni+Mr-ua-ra,Ve(Mr+sr.frac*Ca+kr.frac*(Li+sr.frac*Va))}if(se!=="default"){var me=0,be;try{be=new Uint8Array(xe*he*4)}catch{be=new Array(xe*he*4)}if(se==="smooth"){var Ee=O||L,De=G||B,Ce=new Array(Ee.length),Fe=new Array(De.length),Je=new Array(ue),qe=O?E:x,at=G?E:x,tt,ct,At;for(Y=0;YOa||Oa>S._length))for(K=Fr;K_i||_i>b._length)){var ti=n({x:Da,y:jr},R,C._fullLayout);ti.x=Da,ti.y=jr;var Ka=D.z[Y][K];Ka===void 0?(ti.z="",ti.zLabel=""):(ti.z=Ka,ti.zLabel=o.tickText(Vt,Ka,"hover").text);var ia=D.text&&D.text[Y]&&D.text[Y][K];(ia===void 0||ia===!1)&&(ia=""),ti.text=ia;var na=s.texttemplateString({data:[ti,R._meta],fallback:R.texttemplatefallback,labels:ti,locale:C._fullLayout._d3locale,template:Dt});if(na){var xi=na.split("
"),Yi=xi.length,Qr=0;for(re=0;re=x[0].length||F<0||F>x.length)return}else{if(t.inbox(u-_[0],u-_[_.length-1],0)>0||t.inbox(c-v[0],c-v[v.length-1],0)>0)return;if(d){var D;for(k=[2*_[0]-_[1]],D=1;D<_.length;D++)k.push((_[D]+_[D-1])/2);for(k.push([2*_[_.length-1]-_[_.length-2]]),T=[2*v[0]-v[1]],D=1;D=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),cb=ye({"src/traces/contour/attributes.js"(e,r){"use strict";var t=My(),a=al(),i=zs(),o=i.axisHoverFormat,s=i.descriptionOnlyNumbers,l=rs(),n=Eu().dash,u=vs(),c=Xi().extendFlat,f=cT(),h=f.COMPARISON_OPS2,d=f.INTERVAL_OPS,p=a.line;r.exports=c({z:t.z,x:t.x,x0:t.x0,dx:t.dx,y:t.y,y0:t.y0,dy:t.dy,xperiod:t.xperiod,yperiod:t.yperiod,xperiod0:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:t.xperiodalignment,yperiodalignment:t.yperiodalignment,text:t.text,hovertext:t.hovertext,transpose:t.transpose,xtype:t.xtype,ytype:t.ytype,xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:t.hovertemplate,hovertemplatefallback:t.hovertemplatefallback,texttemplate:c({},t.texttemplate,{}),texttemplatefallback:t.texttemplatefallback,textfont:c({},t.textfont,{}),hoverongaps:t.hoverongaps,connectgaps:c({},t.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:u({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:s("contour label")},operation:{valType:"enumerated",values:[].concat(h).concat(d),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:c({},p.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:n,smoothing:c({},p.smoothing,{}),editType:"plot"},zorder:a.zorder},l("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),Q9=ye({"src/traces/histogram2dcontour/attributes.js"(e,r){"use strict";var t=uT(),a=cb(),i=rs(),o=zs().axisHoverFormat,s=Xi().extendFlat;r.exports=s({x:t.x,y:t.y,z:t.z,marker:t.marker,histnorm:t.histnorm,histfunc:t.histfunc,nbinsx:t.nbinsx,xbins:t.xbins,nbinsy:t.nbinsy,ybins:t.ybins,autobinx:t.autobinx,autobiny:t.autobiny,bingroup:t.bingroup,xbingroup:t.xbingroup,ybingroup:t.ybingroup,autocontour:a.autocontour,ncontours:a.ncontours,contours:a.contours,line:{color:a.line.color,width:s({},a.line.width,{dflt:.5}),dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:t.hovertemplate,hovertemplatefallback:t.hovertemplatefallback,texttemplate:a.texttemplate,texttemplatefallback:a.texttemplatefallback,textfont:a.textfont},i("",{cLetter:"z",editTypeOverride:"calc"}))}}),fT=ye({"src/traces/contour/contours_defaults.js"(e,r){"use strict";r.exports=function(a,i,o,s){var l=s("contours.start"),n=s("contours.end"),u=l===!1||n===!1,c=o("contours.size"),f;u?f=i.autocontour=!0:f=o("autocontour",!1),(f||!c)&&o("ncontours")}}}),eL=ye({"src/traces/contour/label_defaults.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o,s,l){l||(l={});var n=i("contours.showlabels");if(n){var u=o.font;t.coerceFont(i,"contours.labelfont",u,{overrideDflt:{color:s}}),i("contours.labelformat")}l.hasHover!==!1&&i("zhoverformat")}}}),hT=ye({"src/traces/contour/style_defaults.js"(e,r){"use strict";var t=Su(),a=eL();r.exports=function(o,s,l,n,u){var c=l("contours.coloring"),f,h="";c==="fill"&&(f=l("contours.showlines")),f!==!1&&(c!=="lines"&&(h=l("line.color","#000")),l("line.width",.5),l("line.dash")),c!=="none"&&(o.showlegend!==!0&&(s.showlegend=!1),s._dfltShowLegend=!1,t(o,s,n,l,{prefix:"",cLetter:"z"})),l("line.smoothing"),a(l,n,h,u)}}}),Jre=ye({"src/traces/histogram2dcontour/defaults.js"(e,r){"use strict";var t=Yt(),a=J9(),i=fT(),o=hT(),s=ub(),l=Q9();r.exports=function(u,c,f,h){function d(g,m){return t.coerce(u,c,l,g,m)}function p(g){return t.coerce2(u,c,l,g)}a(u,c,d,h),c.visible!==!1&&(i(u,c,d,p),o(u,c,d,h),d("xhoverformat"),d("yhoverformat"),d("hovertemplate"),d("hovertemplatefallback"),c.contours&&c.contours.coloring==="heatmap"&&s(d,h))}}}),tL=ye({"src/traces/contour/set_contours.js"(e,r){"use strict";var t=qi(),a=Yt();r.exports=function(s,l){var n=s.contours;if(s.autocontour){var u=s.zmin,c=s.zmax;(s.zauto||u===void 0)&&(u=a.aggNums(Math.min,null,l)),(s.zauto||c===void 0)&&(c=a.aggNums(Math.max,null,l));var f=i(u,c,s.ncontours);n.size=f.dtick,n.start=t.tickFirst(f),f.range.reverse(),n.end=t.tickFirst(f),n.start===u&&(n.start+=n.size),n.end===c&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),s._input.contours||(s._input.contours={}),a.extendFlat(s._input.contours,{start:n.start,end:n.end,size:n.size}),s._input.autocontour=!0}else if(n.type!=="constraint"){var h=n.start,d=n.end,p=s._input.contours;if(h>d&&(n.start=p.start=d,d=n.end=p.end=h,h=n.start),!(n.size>0)){var g;h===d?g=1:g=i(h,d,s.ncontours).dtick,p.size=n.size=g}}};function i(o,s,l){var n={type:"linear",range:[o,s]};return t.autoTicks(n,(s-o)/(l||15)),n}}}),fb=ye({"src/traces/contour/end_plus.js"(e,r){"use strict";r.exports=function(a){return a.end+a.size/1e6}}}),rL=ye({"src/traces/contour/calc.js"(e,r){"use strict";var t=As(),a=rT(),i=tL(),o=fb();r.exports=function(l,n){var u=a(l,n),c=u[0].z;i(n,c);var f=n.contours,h=t.extractOpts(n),d;if(f.coloring==="heatmap"&&h.auto&&n.autocontour===!1){var p=f.start,g=o(f),m=f.size||1,y=Math.floor((g-p)/m)+1;isFinite(m)||(m=1,y=1);var _=p-m/2,v=_+y*m;d=[_,v]}else d=c;return t.calc(l,n,{vals:d,cLetter:"z"}),u}}}),hb=ye({"src/traces/contour/constants.js"(e,r){"use strict";r.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}}}}),aL=ye({"src/traces/contour/make_crossings.js"(e,r){"use strict";var t=hb();r.exports=function(o){var s=o[0].z,l=s.length,n=s[0].length,u=l===2||n===2,c,f,h,d,p,g,m,y,_;for(f=0;fi?0:1)+(o[0][1]>i?0:2)+(o[1][1]>i?0:4)+(o[1][0]>i?0:8);if(s===5||s===10){var l=(o[0][0]+o[0][1]+o[1][0]+o[1][1])/4;return i>l?s===5?713:1114:s===5?104:208}return s===15?0:s}}}),iL=ye({"src/traces/contour/find_all_paths.js"(e,r){"use strict";var t=Yt(),a=hb();r.exports=function(c,f,h){var d,p,g,m,y;for(f=f||.01,h=h||.01,g=0;g20?(g=a.CHOOSESADDLE[g][(m[0]||m[1])<0?0:1],u.crossings[p]=a.SADDLEREMAINDER[g]):delete u.crossings[p],m=a.NEWDELTA[g],!m){t.log("Found bad marching index:",g,c,u.level);break}y.push(n(u,c,m)),c[0]+=m[0],c[1]+=m[1],p=c.join(","),i(y[y.length-1],y[y.length-2],h,d)&&y.pop();var C=m[0]&&(c[0]<0||c[0]>v-2)||m[1]&&(c[1]<0||c[1]>_-2),w=c[0]===x[0]&&c[1]===x[1]&&m[0]===E[0]&&m[1]===E[1];if(w||f&&C)break;g=u.crossings[p]}M===1e4&&t.log("Infinite loop in contour?");var k=i(y[0],y[y.length-1],h,d),T=0,b=.2*u.smoothing,S=[],A=0,F,D,R,P,z,I,L,B,O,G,$;for(M=1;M=A;M--)if(F=S[M],F=A&&F+S[D]B&&O--,u.edgepaths[O]=$.concat(y,G));break}N||(u.edgepaths[B]=y.concat(G))}for(B=0;B20&&c?u===208||u===1114?h=f[0]===0?1:-1:d=f[1]===0?1:-1:a.BOTTOMSTART.indexOf(u)!==-1?d=1:a.LEFTSTART.indexOf(u)!==-1?h=1:a.TOPSTART.indexOf(u)!==-1?d=-1:h=-1,[h,d]}function n(u,c,f){var h=c[0]+Math.max(f[0],0),d=c[1]+Math.max(f[1],0),p=u.z[d][h],g=u.xaxis,m=u.yaxis;if(f[1]){var y=(u.level-p)/(u.z[d][h+1]-p),_=(y!==1?(1-y)*g.c2l(u.x[h]):0)+(y!==0?y*g.c2l(u.x[h+1]):0);return[g.c2p(g.l2c(_),!0),m.c2p(u.y[d],!0),h+y,d]}else{var v=(u.level-p)/(u.z[d+1][h]-p),x=(v!==1?(1-v)*m.c2l(u.y[d]):0)+(v!==0?v*m.c2l(u.y[d+1]):0);return[g.c2p(u.x[h],!0),m.c2p(m.l2c(x),!0),h,d+v]}}}}),Qre=ye({"src/traces/contour/constraint_mapping.js"(e,r){"use strict";var t=cT(),a=en();r.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")};function i(l,n){var u=Array.isArray(n),c;function f(h){return a(h)?+h:null}return t.COMPARISON_OPS2.indexOf(l)!==-1?c=f(u?n[0]:n):t.INTERVAL_OPS.indexOf(l)!==-1?c=u?[f(n[0]),f(n[1])]:[f(n),f(n)]:t.SET_OPS.indexOf(l)!==-1&&(c=u?n.map(f):[f(n)]),c}function o(l){return function(n){n=i(l,n);var u=Math.min(n[0],n[1]),c=Math.max(n[0],n[1]);return{start:u,end:c,size:c-u}}}function s(l){return function(n){return n=i(l,n),{start:n,end:1/0,size:1/0}}}}}),nL=ye({"src/traces/contour/empty_pathinfo.js"(e,r){"use strict";var t=Yt(),a=Qre(),i=fb();r.exports=function(s,l,n){for(var u=s.type==="constraint"?a[s._operation](s.value):s,c=u.size,f=[],h=i(u),d=n.trace._carpetTrace,p=d?{xaxis:d.aaxis,yaxis:d.baxis,x:n.a,y:n.b}:{xaxis:l.xaxis,yaxis:l.yaxis,x:n.x,y:n.y},g=u.start;g1e3){t.warn("Too many contours, clipping at 1000",s);break}return f}}}),oL=ye({"src/traces/contour/convert_to_constraints.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o){var s,l,n,u=function(h){return h.reverse()},c=function(h){return h};switch(o){case"=":case"<":return i;case">":for(i.length!==1&&t.warn("Contour data invalid for the specified inequality operation."),l=i[0],s=0;sn.level||n.starts.length&&l===n.level)}break;case"constraint":if(i.prefixBoundary=!1,i.edgepaths.length)return;var u=i.x.length,c=i.y.length,f=-1/0,h=1/0;for(s=0;s":d>f&&(i.prefixBoundary=!0);break;case"<":(df||i.starts.length&&g===h)&&(i.prefixBoundary=!0);break;case"][":p=Math.min(d[0],d[1]),g=Math.max(d[0],d[1]),pf&&(i.prefixBoundary=!0);break}break}}}}),dT=ye({"src/traces/contour/plot.js"(e){"use strict";var r=ai(),t=Yt(),a=$i(),i=As(),o=Go(),s=qi(),l=Op(),n=iT(),u=aL(),c=iL(),f=nL(),h=oL(),d=sL(),p=hb(),g=p.LABELOPTIMIZER;e.plot=function(w,k,T,b){var S=k.xaxis,A=k.yaxis;t.makeTraceGroups(b,T,"contour").each(function(F){var D=r.select(this),R=F[0],P=R.trace,z=R.x,I=R.y,L=P.contours,B=f(L,k,R),O=t.ensureSingle(D,"g","heatmapcoloring"),G=[];L.coloring==="heatmap"&&(G=[F]),n(w,k,G,O),u(B),c(B);var $=S.c2p(z[0],!0),X=S.c2p(z[z.length-1],!0),Z=A.c2p(I[0],!0),J=A.c2p(I[I.length-1],!0),N=[[$,J],[X,J],[X,Z],[$,Z]],H=B;L.type==="constraint"&&(H=h(B,L._operation)),m(D,N,L),y(D,H,N,L),v(D,B,w,R,L),E(D,k,w,R,N)})};function m(C,w,k){var T=t.ensureSingle(C,"g","contourbg"),b=T.selectAll("path").data(k.coloring==="fill"?[0]:[]);b.enter().append("path"),b.exit().remove(),b.attr("d","M"+w.join("L")+"Z").style("stroke","none")}function y(C,w,k,T){var b=T.coloring==="fill"||T.type==="constraint"&&T._operation!=="=",S="M"+k.join("L")+"Z";b&&d(w,T);var A=t.ensureSingle(C,"g","contourfill"),F=A.selectAll("path").data(b?w:[]);F.enter().append("path"),F.exit().remove(),F.each(function(D){var R=(D.prefixBoundary?S:"")+_(D,k);R?r.select(this).attr("d",R).style("stroke","none"):r.select(this).remove()})}function _(C,w){var k="",T=0,b=C.edgepaths.map(function($,X){return X}),S=!0,A,F,D,R,P,z;function I($){return Math.abs($[1]-w[0][1])<.01}function L($){return Math.abs($[1]-w[2][1])<.01}function B($){return Math.abs($[0]-w[0][0])<.01}function O($){return Math.abs($[0]-w[2][0])<.01}for(;b.length;){for(z=a.smoothopen(C.edgepaths[T],C.smoothing),k+=S?z:z.replace(/^M/,"L"),b.splice(b.indexOf(T),1),A=C.edgepaths[T][C.edgepaths[T].length-1],R=-1,D=0;D<4;D++){if(!A){t.log("Missing end?",T,C);break}for(I(A)&&!O(A)?F=w[1]:B(A)?F=w[0]:L(A)?F=w[3]:O(A)&&(F=w[2]),P=0;P=0&&(F=G,R=P):Math.abs(A[1]-F[1])<.01?Math.abs(A[1]-G[1])<.01&&(G[0]-A[0])*(F[0]-G[0])>=0&&(F=G,R=P):t.log("endpt to newendpt is not vert. or horz.",A,F,G)}if(A=F,R>=0)break;k+="L"+F}if(R===C.edgepaths.length){t.log("unclosed perimeter path");break}T=R,S=b.indexOf(T)===-1,S&&(T=b[0],k+="Z")}for(T=0;Tg.MAXCOST*2)break;I&&(F/=2),A=R-F/2,D=A+F*1.5}if(z<=g.MAXCOST)return P};function x(C,w,k,T){var b=w.width/2,S=w.height/2,A=C.x,F=C.y,D=C.theta,R=Math.cos(D)*b,P=Math.sin(D)*b,z=(A>T.center?T.right-A:A-T.left)/(R+Math.abs(Math.sin(D)*S)),I=(F>T.middle?T.bottom-F:F-T.top)/(Math.abs(P)+Math.cos(D)*S);if(z<1||I<1)return 1/0;var L=g.EDGECOST*(1/(z-1)+1/(I-1));L+=g.ANGLECOST*D*D;for(var B=A-R,O=F-P,G=A+R,$=F+P,X=0;X=E)&&(n<=x&&(n=x),u>=E&&(u=E),f=Math.floor((u-n)/c)+1,h=0),v=0;vx&&(m.unshift(x),y.unshift(y[0])),m[m.length-1]2?d.value=d.value.slice(2):d.length===0?d.value=[0,1]:d.length<2?(p=parseFloat(d.value[0]),d.value=[p,p+1]):d.value=[parseFloat(d.value[0]),parseFloat(d.value[1])]:t(d.value)&&(p=parseFloat(d.value),d.value=[p,p+1])):(h("contours.value",0),t(d.value)||(n(d.value)?d.value=parseFloat(d.value[0]):d.value=0))}}}),rae=ye({"src/traces/contour/defaults.js"(e,r){"use strict";var t=Yt(),a=KA(),i=ap(),o=cL(),s=fT(),l=hT(),n=ub(),u=cb();r.exports=function(f,h,d,p){function g(v,x){return t.coerce(f,h,u,v,x)}function m(v){return t.coerce2(f,h,u,v)}var y=a(f,h,g,p);if(!y){h.visible=!1;return}i(f,h,p,g),g("xhoverformat"),g("yhoverformat"),g("text"),g("hovertext"),g("hoverongaps"),g("hovertemplate"),g("hovertemplatefallback");var _=g("contours.type")==="constraint";g("connectgaps",t.isArray1D(h.z)),_?o(f,h,g,p,d):(s(f,h,g,m),l(f,h,g,p)),h.contours&&h.contours.coloring==="heatmap"&&n(g,p),g("zorder")}}}),aae=ye({"src/traces/contour/index.js"(e,r){"use strict";r.exports={attributes:cb(),supplyDefaults:rae(),calc:rL(),plot:dT().plot,style:pT(),colorbar:vT(),hoverPoints:uL(),moduleType:"trace",name:"contour",basePlotModule:Ml(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),iae=ye({"lib/contour.js"(e,r){"use strict";r.exports=aae()}}),fL=ye({"src/traces/scatterternary/attributes.js"(e,r){"use strict";var{hovertemplateAttrs:t,texttemplateAttrs:a,templatefallbackAttrs:i}=Ro(),o=Up(),s=al(),l=Oo(),n=rs(),u=Eu().dash,c=Xi().extendFlat,f=s.marker,h=s.line,d=f.line;r.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:c({},s.mode,{dflt:"markers"}),text:c({},s.text,{}),texttemplate:a({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:c({},s.hovertext,{}),line:{color:h.color,width:h.width,dash:u,backoff:h.backoff,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:s.connectgaps,cliponaxis:s.cliponaxis,fill:c({},s.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o(),marker:c({symbol:f.symbol,opacity:f.opacity,angle:f.angle,angleref:f.angleref,standoff:f.standoff,maxdisplayed:f.maxdisplayed,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,line:c({width:d.width,dash:d.dash,editType:"calc"},n("marker.line")),gradient:f.gradient,editType:"calc"},n("marker")),textfont:s.textfont,textposition:s.textposition,selected:s.selected,unselected:s.unselected,hoverinfo:c({},l.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:s.hoveron,hovertemplate:t(),hovertemplatefallback:i()}}}),nae=ye({"src/traces/scatterternary/defaults.js"(e,r){"use strict";var t=Yt(),a=jp(),i=ms(),o=kd(),s=ip(),l=_y(),n=np(),u=qp(),c=fL();r.exports=function(h,d,p,g){function m(C,w){return t.coerce(h,d,c,C,w)}var y=m("a"),_=m("b"),v=m("c"),x;if(y?(x=y.length,_?(x=Math.min(x,_.length),v&&(x=Math.min(x,v.length))):v?x=Math.min(x,v.length):x=0):_&&v&&(x=Math.min(_.length,v.length)),!x){d.visible=!1;return}d._length=x,m("sum"),m("text"),m("hovertext"),d.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback"));var E=x"),u.hovertemplate=g.hovertemplate,n}}}),cae=ye({"src/traces/scatterternary/event_data.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){if(i.xa&&(a.xaxis=i.xa),i.ya&&(a.yaxis=i.ya),s[l]){var n=s[l];a.a=n.a,a.b=n.b,a.c=n.c}else a.a=i.a,a.b=i.b,a.c=i.c;return a}}}),fae=ye({"src/plots/ternary/ternary.js"(e,r){"use strict";var t=ai(),a=li(),i=Yt(),o=i.strTranslate,s=i._,l=Ya(),n=$i(),u=Op(),c=Xi().extendFlat,f=ws(),h=qi(),d=_f(),p=Hs(),g=Np(),m=g.freeMode,y=g.rectMode,_=Cm(),v=lu().prepSelect,x=lu().selectOnClick,E=lu().clearOutline,M=lu().clearSelectionsCache,C=$l();function w(I,L){this.id=I.id,this.graphDiv=I.graphDiv,this.init(L),this.makeFramework(L),this.updateFx(L),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}r.exports=w;var k=w.prototype;k.init=function(I){this.container=I._ternarylayer,this.defs=I._defs,this.layoutId=I._uid,this.traceHash={},this.layers={}},k.plot=function(I,L){var B=this,O=L[B.id],G=L._size;B._hasClipOnAxisFalse=!1;for(var $=0;$T*N?(K=N,Y=K*T):(Y=J,K=Y/T),re=X*Y/J,se=Z*K/N,j=L.l+L.w*G-Y/2,q=L.t+L.h*(1-$)-K/2,B.x0=j,B.y0=q,B.w=Y,B.h=K,B.sum=H,B.xaxis={type:"linear",range:[W+2*V-H,H-W-2*U],domain:[G-re/2,G+re/2],_id:"x"},u(B.xaxis,B.graphDiv._fullLayout),B.xaxis.setScale(),B.xaxis.isPtWithinRange=function(ee){return ee.a>=B.aaxis.range[0]&&ee.a<=B.aaxis.range[1]&&ee.b>=B.baxis.range[1]&&ee.b<=B.baxis.range[0]&&ee.c>=B.caxis.range[1]&&ee.c<=B.caxis.range[0]},B.yaxis={type:"linear",range:[W,H-U-V],domain:[$-se/2,$+se/2],_id:"y"},u(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var le=B.yaxis.domain[0],ue=B.aaxis=c({},I.aaxis,{range:[W,H-U-V],side:"left",tickangle:(+I.aaxis.tickangle||0)-30,domain:[le,le+se*T],anchor:"free",position:0,_id:"y",_length:Y});u(ue,B.graphDiv._fullLayout),ue.setScale();var fe=B.baxis=c({},I.baxis,{range:[H-W-V,U],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:Y});u(fe,B.graphDiv._fullLayout),fe.setScale();var pe=B.caxis=c({},I.caxis,{range:[H-W-U,V],side:"right",tickangle:(+I.caxis.tickangle||0)+30,domain:[le,le+se*T],anchor:"free",position:0,_id:"y",_length:Y});u(pe,B.graphDiv._fullLayout),pe.setScale();var we="M"+j+","+(q+K)+"h"+Y+"l-"+Y/2+",-"+K+"Z";B.clipDef.select("path").attr("d",we),B.layers.plotbg.select("path").attr("d",we);var xe="M0,"+K+"h"+Y+"l-"+Y/2+",-"+K+"Z";B.clipDefRelative.select("path").attr("d",xe);var he=o(j,q);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",he),B.clipDefRelative.select("path").attr("transform",null);var oe=o(j-fe._offset,q+K);B.layers.baxis.attr("transform",oe),B.layers.bgrid.attr("transform",oe);var te=o(j+Y/2,q)+"rotate(30)"+o(0,-ue._offset);B.layers.aaxis.attr("transform",te),B.layers.agrid.attr("transform",te);var ie=o(j+Y/2,q)+"rotate(-30)"+o(0,-pe._offset);B.layers.caxis.attr("transform",ie),B.layers.cgrid.attr("transform",ie),B.drawAxes(!0),B.layers.aline.select("path").attr("d",ue.showline?"M"+j+","+(q+K)+"l"+Y/2+",-"+K:"M0,0").call(l.stroke,ue.linecolor||"#000").style("stroke-width",(ue.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",fe.showline?"M"+j+","+(q+K)+"h"+Y:"M0,0").call(l.stroke,fe.linecolor||"#000").style("stroke-width",(fe.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",pe.showline?"M"+(j+Y/2)+","+q+"l"+Y/2+","+K:"M0,0").call(l.stroke,pe.linecolor||"#000").style("stroke-width",(pe.linewidth||0)+"px"),B.graphDiv._context.staticPlot||B.initInteractions(),n.setClipUrl(B.layers.frontplot,B._hasClipOnAxisFalse?null:B.clipId,B.graphDiv)},k.drawAxes=function(I){var L=this,B=L.graphDiv,O=L.id.slice(7)+"title",G=L.layers,$=L.aaxis,X=L.baxis,Z=L.caxis;if(L.drawAx($),L.drawAx(X),L.drawAx(Z),I){var J=Math.max($.showticklabels?$.tickfont.size/2:0,(Z.showticklabels?Z.tickfont.size*.75:0)+(Z.ticks==="outside"?Z.ticklen*.87:0)),N=(X.showticklabels?X.tickfont.size:0)+(X.ticks==="outside"?X.ticklen:0)+3;G["a-title"]=_.draw(B,"a"+O,{propContainer:$,propName:L.id+".aaxis.title.text",placeholder:s(B,"Click to enter Component A title"),attributes:{x:L.x0+L.w/2,y:L.y0-$.title.font.size/3-J,"text-anchor":"middle"}}),G["b-title"]=_.draw(B,"b"+O,{propContainer:X,propName:L.id+".baxis.title.text",placeholder:s(B,"Click to enter Component B title"),attributes:{x:L.x0-N,y:L.y0+L.h+X.title.font.size*.83+N,"text-anchor":"middle"}}),G["c-title"]=_.draw(B,"c"+O,{propContainer:Z,propName:L.id+".caxis.title.text",placeholder:s(B,"Click to enter Component C title"),attributes:{x:L.x0+L.w+N,y:L.y0+L.h+Z.title.font.size*.83+N,"text-anchor":"middle"}})}},k.drawAx=function(I){var L=this,B=L.graphDiv,O=I._name,G=O.charAt(0),$=I._id,X=L.layers[O],Z=30,J=G+"tickLayout",N=b(I);L[J]!==N&&(X.selectAll("."+$+"tick").remove(),L[J]=N),I.setScale();var H=h.calcTicks(I),W=h.clipEnds(I,H),U=h.makeTransTickFn(I),V=h.getTickSigns(I)[2],j=i.deg2rad(Z),q=V*(I.linewidth||1)/2,Y=V*I.ticklen,K=L.w,re=L.h,se=G==="b"?"M0,"+q+"l"+Math.sin(j)*Y+","+Math.cos(j)*Y:"M"+q+",0l"+Math.cos(j)*Y+","+-Math.sin(j)*Y,le={a:"M0,0l"+re+",-"+K/2,b:"M0,0l-"+K/2+",-"+re,c:"M0,0l-"+re+","+K/2}[G];h.drawTicks(B,I,{vals:I.ticks==="inside"?W:H,layer:X,path:se,transFn:U,crisp:!1}),h.drawGrid(B,I,{vals:W,layer:L.layers[G+"grid"],path:le,transFn:U,crisp:!1}),h.drawLabels(B,I,{vals:H,layer:X,transFn:U,labelFns:h.makeLabelFns(I,0,Z)})};function b(I){return I.ticks+String(I.ticklen)+String(I.showticklabels)}var S=C.MINZOOM/2+.87,A="m-0.87,.5h"+S+"v3h-"+(S+5.2)+"l"+(S/2+2.6)+",-"+(S*.87+4.5)+"l2.6,1.5l-"+S/2+","+S*.87+"Z",F="m0.87,.5h-"+S+"v3h"+(S+5.2)+"l-"+(S/2+2.6)+",-"+(S*.87+4.5)+"l-2.6,1.5l"+S/2+","+S*.87+"Z",D="m0,1l"+S/2+","+S*.87+"l2.6,-1.5l-"+(S/2+2.6)+",-"+(S*.87+4.5)+"l-"+(S/2+2.6)+","+(S*.87+4.5)+"l2.6,1.5l"+S/2+",-"+S*.87+"Z",R="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",P=!0;k.clearOutline=function(){M(this.dragOptions),E(this.dragOptions.gd)},k.initInteractions=function(){var I=this,L=I.layers.plotbg.select("path").node(),B=I.graphDiv,O=B._fullLayout._zoomlayer,G,$;this.dragOptions={element:L,gd:B,plotinfo:{id:I.id,domain:B._fullLayout[I.id].domain,xaxis:I.xaxis,yaxis:I.yaxis},subplot:I.id,prepFn:function(oe,te,ie){I.dragOptions.xaxes=[I.xaxis],I.dragOptions.yaxes=[I.yaxis],G=B._fullLayout._invScaleX,$=B._fullLayout._invScaleY;var ee=I.dragOptions.dragmode=B._fullLayout.dragmode;m(ee)?I.dragOptions.minDrag=1:I.dragOptions.minDrag=void 0,ee==="zoom"?(I.dragOptions.moveFn=fe,I.dragOptions.clickFn=K,I.dragOptions.doneFn=pe,re(oe,te,ie)):ee==="pan"?(I.dragOptions.moveFn=xe,I.dragOptions.clickFn=K,I.dragOptions.doneFn=he,we(),I.clearOutline(B)):(y(ee)||m(ee))&&v(oe,te,ie,I.dragOptions,ee)}};var X,Z,J,N,H,W,U,V,j,q;function Y(oe){var te={};return te[I.id+".aaxis.min"]=oe.a,te[I.id+".baxis.min"]=oe.b,te[I.id+".caxis.min"]=oe.c,te}function K(oe,te){var ie=B._fullLayout.clickmode;z(B),oe===2&&(B.emit("plotly_doubleclick",null),a.call("_guiRelayout",B,Y({a:0,b:0,c:0}))),ie.indexOf("select")>-1&&oe===1&&x(te,B,[I.xaxis],[I.yaxis],I.id,I.dragOptions),ie.indexOf("event")>-1&&p.click(B,te,I.id)}function re(oe,te,ie){var ee=L.getBoundingClientRect();X=te-ee.left,Z=ie-ee.top,B._fullLayout._calcInverseTransform(B);var ce=B._fullLayout._invTransform,_e=i.apply3DTransform(ce)(X,Z);X=_e[0],Z=_e[1],J={a:I.aaxis.range[0],b:I.baxis.range[1],c:I.caxis.range[1]},H=J,N=I.aaxis.range[1]-J.a,W=l.luminosity(I.graphDiv._fullLayout[I.id].bgcolor),U="M0,"+I.h+"L"+I.w/2+", 0L"+I.w+","+I.h+"Z",V=!1,j=O.append("path").attr("class","zoombox").attr("transform",o(I.x0,I.y0)).style({fill:W>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",U),q=O.append("path").attr("class","zoombox-corners").attr("transform",o(I.x0,I.y0)).style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),I.clearOutline(B)}function se(oe,te){return 1-te/I.h}function le(oe,te){return 1-(oe+(I.h-te)/Math.sqrt(3))/I.w}function ue(oe,te){return(oe-(I.h-te)/Math.sqrt(3))/I.w}function fe(oe,te){var ie=X+oe*G,ee=Z+te*$,ce=Math.max(0,Math.min(1,se(X,Z),se(ie,ee))),_e=Math.max(0,Math.min(1,le(X,Z),le(ie,ee))),Se=Math.max(0,Math.min(1,ue(X,Z),ue(ie,ee))),Me=(ce/2+Se)*I.w,Ue=(1-ce/2-_e)*I.w,Ge=(Me+Ue)/2,Ze=Ue-Me,Ke=(1-ce)*I.h,dt=Ke-Ze/T;Ze.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),q.transition().style("opacity",1).duration(200),V=!0),B.emit("plotly_relayouting",Y(H))}function pe(){z(B),H!==J&&(a.call("_guiRelayout",B,Y(H)),P&&B.data&&B._context.showTips&&(i.notifier(s(B,"Double-click to zoom back out"),"long",B),P=!1))}function we(){J={a:I.aaxis.range[0],b:I.baxis.range[1],c:I.caxis.range[1]},H=J}function xe(oe,te){var ie=oe/I.xaxis._m,ee=te/I.yaxis._m;H={a:J.a-ee,b:J.b+(ie+ee)/2,c:J.c-(ie-ee)/2};var ce=[H.a,H.b,H.c].sort(i.sorterAsc),_e={a:ce.indexOf(H.a),b:ce.indexOf(H.b),c:ce.indexOf(H.c)};ce[0]<0&&(ce[1]+ce[0]/2<0?(ce[2]+=ce[0]+ce[1],ce[0]=ce[1]=0):(ce[2]+=ce[0]/2,ce[1]+=ce[0]/2,ce[0]=0),H={a:ce[_e.a],b:ce[_e.b],c:ce[_e.c]},te=(J.a-H.a)*I.yaxis._m,oe=(J.c-H.c-J.b+H.b)*I.xaxis._m);var Se=o(I.x0+oe,I.y0+te);I.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Se);var Me=o(-oe,-te);I.clipDefRelative.select("path").attr("transform",Me),I.aaxis.range=[H.a,I.sum-H.b-H.c],I.baxis.range=[I.sum-H.a-H.c,H.b],I.caxis.range=[I.sum-H.a-H.b,H.c],I.drawAxes(!1),I._hasClipOnAxisFalse&&I.plotContainer.select(".scatterlayer").selectAll(".trace").call(n.hideOutsideRangePoints,I),B.emit("plotly_relayouting",Y(H))}function he(){a.call("_guiRelayout",B,Y(H))}L.onmousemove=function(oe){p.hover(B,oe,I.id),B._fullLayout._lasthover=L,B._fullLayout._hoversubplot=I.id},L.onmouseout=function(oe){B._dragging||d.unhover(B,oe)},d.init(this.dragOptions)};function z(I){t.select(I).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),hL=ye({"src/plots/ternary/layout_attributes.js"(e,r){"use strict";var t=Wl(),a=Ds().attributes,i=Gu(),o=Cs().overrideAll,s=Xi().extendFlat,l={title:{text:i.title.text,font:i.title.font},color:i.color,tickmode:i.minor.tickmode,nticks:s({},i.nticks,{dflt:6,min:1}),tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:s({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:s({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash,layer:i.layer,min:{valType:"number",dflt:0,min:0}},n=r.exports=o({domain:a({name:"ternary"}),bgcolor:{valType:"color",dflt:t.background},sum:{valType:"number",dflt:1,min:0},aaxis:l,baxis:l,caxis:l},"plot","from-root");n.uirevision={valType:"any",editType:"none"},n.aaxis.uirevision=n.baxis.uirevision=n.caxis.uirevision={valType:"any",editType:"none"}}}),zm=ye({"src/plots/subplot_defaults.js"(e,r){"use strict";var t=Yt(),a=ko(),i=Ds().defaults;r.exports=function(s,l,n,u){var c=u.type,f=u.attributes,h=u.handleDefaults,d=u.partition||"x",p=l._subplots[c],g=p.length,m=g&&p[0].replace(/\d+$/,""),y,_;function v(C,w){return t.coerce(y,_,f,C,w)}for(var x=0;x=x&&(k.min=0,T.min=0,b.min=0,g.aaxis&&delete g.aaxis.min,g.baxis&&delete g.baxis.min,g.caxis&&delete g.caxis.min)}function p(g,m,y,_){var v=f[m._name];function x(S,A){return i.coerce(g,m,v,S,A)}x("uirevision",_.uirevision),m.type="linear";var E=x("color"),M=E!==v.color.dflt?E:y.font.color,C=m._name,w=C.charAt(0).toUpperCase(),k="Component "+w,T=x("title.text",k);m._hovertitle=T===k?T:w,i.coerceFont(x,"title.font",y.font,{overrideDflt:{size:i.bigFont(y.font.size),color:M}}),x("min"),u(g,m,x,"linear"),l(g,m,x,"linear"),s(g,m,x,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),n(g,m,x,{outerTicks:!0});var b=x("showticklabels");b&&(i.coerceFont(x,"tickfont",y.font,{overrideDflt:{color:M}}),x("tickangle"),x("tickformat")),c(g,m,x,{dfltColor:E,bgColor:y.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:v}),x("hoverformat"),x("layer")}}}),dae=ye({"src/plots/ternary/index.js"(e){"use strict";var r=fae(),t=_c().getSubplotCalcData,a=Yt().counterRegex,i="ternary";e.name=i;var o=e.attr="subplot";e.idRoot=i,e.idRegex=e.attrRegex=a(i);var s=e.attributes={};s[o]={valType:"subplotid",dflt:"ternary",editType:"calc"},e.layoutAttributes=hL(),e.supplyLayoutDefaults=hae(),e.plot=function(n){for(var u=n._fullLayout,c=n.calcdata,f=u._subplots[i],h=0;h0){var C=n.xa,w=n.ya,k,T,b,S,A;g.orientation==="h"?(A=u,k="y",b=w,T="x",S=C):(A=c,k="x",b=C,T="y",S=w);var F=p[n.index];if(A>=F.span[0]&&A<=F.span[1]){var D=a.extendFlat({},n),R=S.c2p(A,!0),P=s.getKdeValue(F,g,A),z=s.getPositionOnKdePath(F,g,R),I=b._offset,L=b._length;D[k+"0"]=z[0],D[k+"1"]=z[1],D[T+"0"]=D[T+"1"]=R,D[T+"Label"]=T+": "+i.hoverLabelText(S,A,g[T+"hoverformat"])+", "+p[0].t.labels.kde+" "+P.toFixed(3);for(var B=0,O=0;O path").each(function(y){if(!y.isBlank){var _=m.marker;t.select(this).call(i.fill,y.mc||_.color).call(i.stroke,y.mlc||_.line.color).call(a.dashLine,_.line.dash,y.mlw||_.line.width).style("opacity",m.selectedpoints&&!y.selected?o:1)}}),n(g,m,c),g.selectAll(".regions").each(function(){t.select(this).selectAll("path").style("stroke-width",0).call(i.fill,m.connector.fillcolor)}),g.selectAll(".lines").each(function(){var y=m.connector.line;a.lineGroupStyle(t.select(this).selectAll("path"),y.width,y.color,y.dash)})})}r.exports={style:u}}}),Fae=ye({"src/traces/funnel/hover.js"(e,r){"use strict";var t=Ya().opacity,a=Ay().hoverOnBars,i=Yt().formatPercent;r.exports=function(l,n,u,c,f){var h=a(l,n,u,c,f);if(h){var d=h.cd,p=d[0].trace,g=p.orientation==="h",m=h.index,y=d[m],_=g?"x":"y";h[_+"LabelVal"]=y.s,h.percentInitial=y.begR,h.percentInitialLabel=i(y.begR,1),h.percentPrevious=y.difR,h.percentPreviousLabel=i(y.difR,1),h.percentTotal=y.sumR,h.percentTotalLabel=i(y.sumR,1);var v=y.hi||p.hoverinfo,x=[];if(v&&v!=="none"&&v!=="skip"){var E=v==="all",M=v.split("+"),C=function(w){return E||M.indexOf(w)!==-1};C("percent initial")&&x.push(h.percentInitialLabel+" of initial"),C("percent previous")&&x.push(h.percentPreviousLabel+" of previous"),C("percent total")&&x.push(h.percentTotalLabel+" of total")}return h.extraText=x.join("
"),h.color=o(p,y),[h]}};function o(s,l){var n=s.marker,u=l.mc||n.color,c=l.mlc||n.line.color,f=l.mlw||n.line.width;if(t(u))return u;if(t(c)&&f)return c}}}),Pae=ye({"src/traces/funnel/event_data.js"(e,r){"use strict";r.exports=function(a,i){return a.x="xVal"in i?i.xVal:i.x,a.y="yVal"in i?i.yVal:i.y,"percentInitial"in i&&(a.percentInitial=i.percentInitial),"percentPrevious"in i&&(a.percentPrevious=i.percentPrevious),"percentTotal"in i&&(a.percentTotal=i.percentTotal),i.xa&&(a.xaxis=i.xa),i.ya&&(a.yaxis=i.ya),a}}}),Iae=ye({"src/traces/funnel/index.js"(e,r){"use strict";r.exports={attributes:vL(),layoutAttributes:mL(),supplyDefaults:gL().supplyDefaults,crossTraceDefaults:gL().crossTraceDefaults,supplyLayoutDefaults:Eae(),calc:kae(),crossTraceCalc:Cae(),plot:Dae(),style:Lae().style,hoverPoints:Fae(),eventData:Pae(),selectPoints:Ty(),moduleType:"trace",name:"funnel",basePlotModule:Ml(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Rae=ye({"lib/funnel.js"(e,r){"use strict";r.exports=Iae()}}),zae=ye({"src/traces/waterfall/constants.js"(e,r){"use strict";r.exports={eventDataKeys:["initial","delta","final"]}}}),yL=ye({"src/traces/waterfall/attributes.js"(e,r){"use strict";var t=Gp(),a=al().line,i=Oo(),o=zs().axisHoverFormat,{hovertemplateAttrs:s,texttemplateAttrs:l,templatefallbackAttrs:n}=Ro(),u=zae(),c=Xi().extendFlat,f=Ya();function h(d){return{marker:{color:c({},t.marker.color,{arrayOk:!1,editType:"style"}),line:{color:c({},t.marker.line.color,{arrayOk:!1,editType:"style"}),width:c({},t.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}r.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:t.x,x0:t.x0,dx:t.dx,y:t.y,y0:t.y0,dy:t.dy,xperiod:t.xperiod,yperiod:t.yperiod,xperiod0:t.xperiod0,yperiod0:t.yperiod0,xperiodalignment:t.xperiodalignment,yperiodalignment:t.yperiodalignment,xhoverformat:o("x"),yhoverformat:o("y"),hovertext:t.hovertext,hovertemplate:s({},{keys:u.eventDataKeys}),hovertemplatefallback:n(),hoverinfo:c({},i.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:l({editType:"plot"},{keys:u.eventDataKeys.concat(["label"])}),texttemplatefallback:n({editType:"plot"}),text:t.text,textposition:t.textposition,insidetextanchor:t.insidetextanchor,textangle:t.textangle,textfont:t.textfont,insidetextfont:t.insidetextfont,outsidetextfont:t.outsidetextfont,constraintext:t.constraintext,cliponaxis:t.cliponaxis,orientation:t.orientation,offset:t.offset,width:t.width,increasing:h("increasing"),decreasing:h("decreasing"),totals:h("intermediate sums and total"),connector:{line:{color:c({},a.color,{dflt:f.defaultLine}),width:c({},a.width,{editType:"plot"}),dash:a.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:t.offsetgroup,alignmentgroup:t.alignmentgroup,zorder:t.zorder}}}),_L=ye({"src/traces/waterfall/layout_attributes.js"(e,r){"use strict";r.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"}}}}),Sy=ye({"src/constants/delta.js"(e,r){"use strict";r.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),xL=ye({"src/traces/waterfall/defaults.js"(e,r){"use strict";var t=Yt(),a=Fm(),i=Oh().handleText,o=Lm(),s=ap(),l=yL(),n=Ya(),u=Sy(),c=u.INCREASING.COLOR,f=u.DECREASING.COLOR,h="#4499FF";function d(m,y,_){m(y+".marker.color",_),m(y+".marker.line.color",n.defaultLine),m(y+".marker.line.width")}function p(m,y,_,v){function x(k,T){return t.coerce(m,y,l,k,T)}var E=o(m,y,v,x);if(!E){y.visible=!1;return}s(m,y,v,x),x("xhoverformat"),x("yhoverformat"),x("measure"),x("orientation",y.x&&!y.y?"h":"v"),x("base"),x("offset"),x("width"),x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback");var M=x("textposition");i(m,y,v,x,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),y.textposition!=="none"&&(x("texttemplate"),x("texttemplatefallback"),y.texttemplate||x("textinfo")),d(x,"increasing",c),d(x,"decreasing",f),d(x,"totals",h);var C=x("connector.visible");if(C){x("connector.mode");var w=x("connector.line.width");w&&(x("connector.line.color"),x("connector.line.dash"))}x("zorder")}function g(m,y){var _,v;function x(M){return t.coerce(v._input,v,l,M)}if(y.waterfallmode==="group")for(var E=0;E0&&(x?A+="M"+b[0]+","+S[1]+"V"+S[0]:A+="M"+b[1]+","+S[0]+"H"+b[0]),E!=="between"&&(w.isSum||k path").each(function(y){if(!y.isBlank){var _=m[y.dir].marker;t.select(this).call(i.fill,_.color).call(i.stroke,_.line.color).call(a.dashLine,_.line.dash,_.line.width).style("opacity",m.selectedpoints&&!y.selected?o:1)}}),n(g,m,c),g.selectAll(".lines").each(function(){var y=m.connector.line;a.lineGroupStyle(t.select(this).selectAll("path"),y.width,y.color,y.dash)})})}r.exports={style:u}}}),qae=ye({"src/traces/waterfall/hover.js"(e,r){"use strict";var t=qi().hoverLabelText,a=Ya().opacity,i=Ay().hoverOnBars,o=Sy(),s={increasing:o.INCREASING.SYMBOL,decreasing:o.DECREASING.SYMBOL};r.exports=function(u,c,f,h,d){var p=i(u,c,f,h,d);if(!p)return;var g=p.cd,m=g[0].trace,y=m.orientation==="h",_=y?"x":"y",v=y?u.xa:u.ya;function x(F){return t(v,F,m[_+"hoverformat"])}var E=p.index,M=g[E],C=M.isSum?M.b+M.s:M.rawS;p.initial=M.b+M.s-C,p.delta=C,p.final=p.initial+p.delta;var w=x(Math.abs(p.delta));p.deltaLabel=C<0?"("+w+")":w,p.finalLabel=x(p.final),p.initialLabel=x(p.initial);var k=M.hi||m.hoverinfo,T=[];if(k&&k!=="none"&&k!=="skip"){var b=k==="all",S=k.split("+"),A=function(F){return b||S.indexOf(F)!==-1};M.isSum||(A("final")&&(y?!A("x"):!A("y"))&&T.push(p.finalLabel),A("delta")&&(C<0?T.push(p.deltaLabel+" "+s.decreasing):T.push(p.deltaLabel+" "+s.increasing)),A("initial")&&T.push("Initial: "+p.initialLabel))}return T.length&&(p.extraText=T.join("
")),p.color=l(m,M),[p]};function l(n,u){var c=n[u.dir].marker,f=c.color,h=c.line.color,d=c.line.width;if(a(f))return f;if(a(h)&&d)return h}}}),Vae=ye({"src/traces/waterfall/event_data.js"(e,r){"use strict";r.exports=function(a,i){return a.x="xVal"in i?i.xVal:i.x,a.y="yVal"in i?i.yVal:i.y,"initial"in i&&(a.initial=i.initial),"delta"in i&&(a.delta=i.delta),"final"in i&&(a.final=i.final),i.xa&&(a.xaxis=i.xa),i.ya&&(a.yaxis=i.ya),a}}}),Gae=ye({"src/traces/waterfall/index.js"(e,r){"use strict";r.exports={attributes:yL(),layoutAttributes:_L(),supplyDefaults:xL().supplyDefaults,crossTraceDefaults:xL().crossTraceDefaults,supplyLayoutDefaults:Bae(),calc:Oae(),crossTraceCalc:Nae(),plot:jae(),style:Uae().style,hoverPoints:qae(),eventData:Vae(),selectPoints:Ty(),moduleType:"trace",name:"waterfall",basePlotModule:Ml(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Hae=ye({"lib/waterfall.js"(e,r){"use strict";r.exports=Gae()}}),ky=ye({"src/traces/image/constants.js"(e,r){"use strict";r.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(t){return t.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(t){return t.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(t){return t.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(t){var a=t.slice(0,3);return a[1]=a[1]+"%",a[2]=a[2]+"%",a},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(t){var a=t.slice(0,4);return a[1]=a[1]+"%",a[2]=a[2]+"%",a},suffix:["\xB0","%","%",""]}}}}}),gT={};rl(gT,{default:()=>EL});var bL,wL,yT,AL,TL,_T,xT,bT,ML,EL,SL=Si({"src/traces/image/attributes.ts"(){"use strict";bL=Vs(Xi()),wL=Vs(Oo()),yT=Vs(Ro()),AL=Vs(al()),TL=Vs(ky()),_T=["rgb","rgba","rgba256","hsl","hsla"],xT=[],bT=[];for(let e of _T){let r=TL.colormodel[e];xT.push(`For the \`${e}\` colormodel, it is [${(r.zminDflt||r.min).join(", ")}].`),bT.push(`For the \`${e}\` colormodel, it is [${(r.zmaxDflt||r.max).join(", ")}].`)}ML={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:_T,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",xT.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",bT.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,bL.extendFlat)({},wL.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,yT.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,yT.templatefallbackAttrs)(),zorder:AL.zorder},EL=ML}}),Wae=ye({"src/traces/image/defaults.js"(e,r){"use strict";var t=Yt(),a=(SL(),On(gT)).default,i=ky(),o=h0().IMAGE_URL_PREFIX;r.exports=function(l,n){function u(h,d){return t.coerce(l,n,a,h,d)}u("source"),n.source&&!n.source.match(o)&&delete n.source,n._hasSource=!!n.source;var c=u("z");if(n._hasZ=!(c===void 0||!c.length||!c[0]||!c[0].length),!n._hasZ&&!n._hasSource){n.visible=!1;return}u("x0"),u("y0"),u("dx"),u("dy");var f;n._hasZ?(u("colormodel","rgb"),f=i.colormodel[n.colormodel],u("zmin",f.zminDflt||f.min),u("zmax",f.zmaxDflt||f.max)):n._hasSource&&(n.colormodel="rgba256",f=i.colormodel[n.colormodel],n.zmin=f.zminDflt,n.zmax=f.zmaxDflt),u("zsmooth"),u("text"),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),n._length=null,u("zorder")}}}),d0=ye({"node_modules/inherits/inherits_browser.js"(e,r){typeof Object.create=="function"?r.exports=function(a,i){i&&(a.super_=i,a.prototype=Object.create(i.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))}:r.exports=function(a,i){if(i){a.super_=i;var o=function(){};o.prototype=i.prototype,a.prototype=new o,a.prototype.constructor=a}}}}),kL=ye({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(e,r){r.exports=Sm().EventEmitter}}),$ae=ye({"node_modules/base64-js/index.js"(e){"use strict";e.byteLength=n,e.toByteArray=c,e.fromByteArray=d;var r=[],t=[],a=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var m=p.indexOf("=");m===-1&&(m=g);var y=m===g?0:4-m%4;return[m,y]}function n(p){var g=l(p),m=g[0],y=g[1];return(m+y)*3/4-y}function u(p,g,m){return(g+m)*3/4-m}function c(p){var g,m=l(p),y=m[0],_=m[1],v=new a(u(p,y,_)),x=0,E=_>0?y-4:y,M;for(M=0;M>16&255,v[x++]=g>>8&255,v[x++]=g&255;return _===2&&(g=t[p.charCodeAt(M)]<<2|t[p.charCodeAt(M+1)]>>4,v[x++]=g&255),_===1&&(g=t[p.charCodeAt(M)]<<10|t[p.charCodeAt(M+1)]<<4|t[p.charCodeAt(M+2)]>>2,v[x++]=g>>8&255,v[x++]=g&255),v}function f(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[p&63]}function h(p,g,m){for(var y,_=[],v=g;vE?E:x+v));return y===1?(g=p[m-1],_.push(r[g>>2]+r[g<<4&63]+"==")):y===2&&(g=(p[m-2]<<8)+p[m-1],_.push(r[g>>10]+r[g>>4&63]+r[g<<2&63]+"=")),_.join("")}}}),Yae=ye({"node_modules/ieee754/index.js"(e){e.read=function(r,t,a,i,o){var s,l,n=o*8-i-1,u=(1<>1,f=-7,h=a?o-1:0,d=a?-1:1,p=r[t+h];for(h+=d,s=p&(1<<-f)-1,p>>=-f,f+=n;f>0;s=s*256+r[t+h],h+=d,f-=8);for(l=s&(1<<-f)-1,s>>=-f,f+=i;f>0;l=l*256+r[t+h],h+=d,f-=8);if(s===0)s=1-c;else{if(s===u)return l?NaN:(p?-1:1)*(1/0);l=l+Math.pow(2,i),s=s-c}return(p?-1:1)*l*Math.pow(2,s-i)},e.write=function(r,t,a,i,o,s){var l,n,u,c=s*8-o-1,f=(1<>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,g=i?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(n=isNaN(t)?1:0,l=f):(l=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-l))<1&&(l--,u*=2),l+h>=1?t+=d/u:t+=d*Math.pow(2,1-h),t*u>=2&&(l++,u/=2),l+h>=f?(n=0,l=f):l+h>=1?(n=(t*u-1)*Math.pow(2,o),l=l+h):(n=t*Math.pow(2,h-1)*Math.pow(2,o),l=0));o>=8;r[a+p]=n&255,p+=g,n/=256,o-=8);for(l=l<0;r[a+p]=l&255,p+=g,l/=256,c-=8);r[a+p-g]|=m*128}}}),Bm=ye({"node_modules/buffer/index.js"(e){"use strict";var r=$ae(),t=Yae(),a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,l.TYPED_ARRAY_SUPPORT=o(),!l.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 o(){try{let te=new Uint8Array(1),ie={foo:function(){return 42}};return Object.setPrototypeOf(ie,Uint8Array.prototype),Object.setPrototypeOf(te,ie),te.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function s(te){if(te>i)throw new RangeError('The value "'+te+'" is invalid for option "size"');let ie=new Uint8Array(te);return Object.setPrototypeOf(ie,l.prototype),ie}function l(te,ie,ee){if(typeof te=="number"){if(typeof ie=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(te)}return n(te,ie,ee)}l.poolSize=8192;function n(te,ie,ee){if(typeof te=="string")return h(te,ie);if(ArrayBuffer.isView(te))return p(te);if(te==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof te);if(pe(te,ArrayBuffer)||te&&pe(te.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(te,SharedArrayBuffer)||te&&pe(te.buffer,SharedArrayBuffer)))return g(te,ie,ee);if(typeof te=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let ce=te.valueOf&&te.valueOf();if(ce!=null&&ce!==te)return l.from(ce,ie,ee);let _e=m(te);if(_e)return _e;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof te[Symbol.toPrimitive]=="function")return l.from(te[Symbol.toPrimitive]("string"),ie,ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof te)}l.from=function(te,ie,ee){return n(te,ie,ee)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function u(te){if(typeof te!="number")throw new TypeError('"size" argument must be of type number');if(te<0)throw new RangeError('The value "'+te+'" is invalid for option "size"')}function c(te,ie,ee){return u(te),te<=0?s(te):ie!==void 0?typeof ee=="string"?s(te).fill(ie,ee):s(te).fill(ie):s(te)}l.alloc=function(te,ie,ee){return c(te,ie,ee)};function f(te){return u(te),s(te<0?0:y(te)|0)}l.allocUnsafe=function(te){return f(te)},l.allocUnsafeSlow=function(te){return f(te)};function h(te,ie){if((typeof ie!="string"||ie==="")&&(ie="utf8"),!l.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie);let ee=v(te,ie)|0,ce=s(ee),_e=ce.write(te,ie);return _e!==ee&&(ce=ce.slice(0,_e)),ce}function d(te){let ie=te.length<0?0:y(te.length)|0,ee=s(ie);for(let ce=0;ce=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return te|0}function _(te){return+te!=te&&(te=0),l.alloc(+te)}l.isBuffer=function(ie){return ie!=null&&ie._isBuffer===!0&&ie!==l.prototype},l.compare=function(ie,ee){if(pe(ie,Uint8Array)&&(ie=l.from(ie,ie.offset,ie.byteLength)),pe(ee,Uint8Array)&&(ee=l.from(ee,ee.offset,ee.byteLength)),!l.isBuffer(ie)||!l.isBuffer(ee))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ie===ee)return 0;let ce=ie.length,_e=ee.length;for(let Se=0,Me=Math.min(ce,_e);Se_e.length?(l.isBuffer(Me)||(Me=l.from(Me)),Me.copy(_e,Se)):Uint8Array.prototype.set.call(_e,Me,Se);else if(l.isBuffer(Me))Me.copy(_e,Se);else throw new TypeError('"list" argument must be an Array of Buffers');Se+=Me.length}return _e};function v(te,ie){if(l.isBuffer(te))return te.length;if(ArrayBuffer.isView(te)||pe(te,ArrayBuffer))return te.byteLength;if(typeof te!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof te);let ee=te.length,ce=arguments.length>2&&arguments[2]===!0;if(!ce&&ee===0)return 0;let _e=!1;for(;;)switch(ie){case"ascii":case"latin1":case"binary":return ee;case"utf8":case"utf-8":return re(te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee*2;case"hex":return ee>>>1;case"base64":return ue(te).length;default:if(_e)return ce?-1:re(te).length;ie=(""+ie).toLowerCase(),_e=!0}}l.byteLength=v;function x(te,ie,ee){let ce=!1;if((ie===void 0||ie<0)&&(ie=0),ie>this.length||((ee===void 0||ee>this.length)&&(ee=this.length),ee<=0)||(ee>>>=0,ie>>>=0,ee<=ie))return"";for(te||(te="utf8");;)switch(te){case"hex":return I(this,ie,ee);case"utf8":case"utf-8":return F(this,ie,ee);case"ascii":return P(this,ie,ee);case"latin1":case"binary":return z(this,ie,ee);case"base64":return A(this,ie,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,ie,ee);default:if(ce)throw new TypeError("Unknown encoding: "+te);te=(te+"").toLowerCase(),ce=!0}}l.prototype._isBuffer=!0;function E(te,ie,ee){let ce=te[ie];te[ie]=te[ee],te[ee]=ce}l.prototype.swap16=function(){let ie=this.length;if(ie%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ee=0;eeee&&(ie+=" ... "),""},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(ie,ee,ce,_e,Se){if(pe(ie,Uint8Array)&&(ie=l.from(ie,ie.offset,ie.byteLength)),!l.isBuffer(ie))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ie);if(ee===void 0&&(ee=0),ce===void 0&&(ce=ie?ie.length:0),_e===void 0&&(_e=0),Se===void 0&&(Se=this.length),ee<0||ce>ie.length||_e<0||Se>this.length)throw new RangeError("out of range index");if(_e>=Se&&ee>=ce)return 0;if(_e>=Se)return-1;if(ee>=ce)return 1;if(ee>>>=0,ce>>>=0,_e>>>=0,Se>>>=0,this===ie)return 0;let Me=Se-_e,Ue=ce-ee,Ge=Math.min(Me,Ue),Ze=this.slice(_e,Se),Ke=ie.slice(ee,ce);for(let dt=0;dt2147483647?ee=2147483647:ee<-2147483648&&(ee=-2147483648),ee=+ee,we(ee)&&(ee=_e?0:te.length-1),ee<0&&(ee=te.length+ee),ee>=te.length){if(_e)return-1;ee=te.length-1}else if(ee<0)if(_e)ee=0;else return-1;if(typeof ie=="string"&&(ie=l.from(ie,ce)),l.isBuffer(ie))return ie.length===0?-1:C(te,ie,ee,ce,_e);if(typeof ie=="number")return ie=ie&255,typeof Uint8Array.prototype.indexOf=="function"?_e?Uint8Array.prototype.indexOf.call(te,ie,ee):Uint8Array.prototype.lastIndexOf.call(te,ie,ee):C(te,[ie],ee,ce,_e);throw new TypeError("val must be string, number or Buffer")}function C(te,ie,ee,ce,_e){let Se=1,Me=te.length,Ue=ie.length;if(ce!==void 0&&(ce=String(ce).toLowerCase(),ce==="ucs2"||ce==="ucs-2"||ce==="utf16le"||ce==="utf-16le")){if(te.length<2||ie.length<2)return-1;Se=2,Me/=2,Ue/=2,ee/=2}function Ge(Ke,dt){return Se===1?Ke[dt]:Ke.readUInt16BE(dt*Se)}let Ze;if(_e){let Ke=-1;for(Ze=ee;ZeMe&&(ee=Me-Ue),Ze=ee;Ze>=0;Ze--){let Ke=!0;for(let dt=0;dt_e&&(ce=_e)):ce=_e;let Se=ie.length;ce>Se/2&&(ce=Se/2);let Me;for(Me=0;Me>>0,isFinite(ce)?(ce=ce>>>0,_e===void 0&&(_e="utf8")):(_e=ce,ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Se=this.length-ee;if((ce===void 0||ce>Se)&&(ce=Se),ie.length>0&&(ce<0||ee<0)||ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");_e||(_e="utf8");let Me=!1;for(;;)switch(_e){case"hex":return w(this,ie,ee,ce);case"utf8":case"utf-8":return k(this,ie,ee,ce);case"ascii":case"latin1":case"binary":return T(this,ie,ee,ce);case"base64":return b(this,ie,ee,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,ie,ee,ce);default:if(Me)throw new TypeError("Unknown encoding: "+_e);_e=(""+_e).toLowerCase(),Me=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(te,ie,ee){return ie===0&&ee===te.length?r.fromByteArray(te):r.fromByteArray(te.slice(ie,ee))}function F(te,ie,ee){ee=Math.min(te.length,ee);let ce=[],_e=ie;for(;_e239?4:Se>223?3:Se>191?2:1;if(_e+Ue<=ee){let Ge,Ze,Ke,dt;switch(Ue){case 1:Se<128&&(Me=Se);break;case 2:Ge=te[_e+1],(Ge&192)===128&&(dt=(Se&31)<<6|Ge&63,dt>127&&(Me=dt));break;case 3:Ge=te[_e+1],Ze=te[_e+2],(Ge&192)===128&&(Ze&192)===128&&(dt=(Se&15)<<12|(Ge&63)<<6|Ze&63,dt>2047&&(dt<55296||dt>57343)&&(Me=dt));break;case 4:Ge=te[_e+1],Ze=te[_e+2],Ke=te[_e+3],(Ge&192)===128&&(Ze&192)===128&&(Ke&192)===128&&(dt=(Se&15)<<18|(Ge&63)<<12|(Ze&63)<<6|Ke&63,dt>65535&&dt<1114112&&(Me=dt))}}Me===null?(Me=65533,Ue=1):Me>65535&&(Me-=65536,ce.push(Me>>>10&1023|55296),Me=56320|Me&1023),ce.push(Me),_e+=Ue}return R(ce)}var D=4096;function R(te){let ie=te.length;if(ie<=D)return String.fromCharCode.apply(String,te);let ee="",ce=0;for(;cece)&&(ee=ce);let _e="";for(let Se=ie;Sece&&(ie=ce),ee<0?(ee+=ce,ee<0&&(ee=0)):ee>ce&&(ee=ce),eeee)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(ie,ee,ce){ie=ie>>>0,ee=ee>>>0,ce||B(ie,ee,this.length);let _e=this[ie],Se=1,Me=0;for(;++Me>>0,ee=ee>>>0,ce||B(ie,ee,this.length);let _e=this[ie+--ee],Se=1;for(;ee>0&&(Se*=256);)_e+=this[ie+--ee]*Se;return _e},l.prototype.readUint8=l.prototype.readUInt8=function(ie,ee){return ie=ie>>>0,ee||B(ie,1,this.length),this[ie]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(ie,ee){return ie=ie>>>0,ee||B(ie,2,this.length),this[ie]|this[ie+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(ie,ee){return ie=ie>>>0,ee||B(ie,2,this.length),this[ie]<<8|this[ie+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(ie,ee){return ie=ie>>>0,ee||B(ie,4,this.length),(this[ie]|this[ie+1]<<8|this[ie+2]<<16)+this[ie+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(ie,ee){return ie=ie>>>0,ee||B(ie,4,this.length),this[ie]*16777216+(this[ie+1]<<16|this[ie+2]<<8|this[ie+3])},l.prototype.readBigUInt64LE=he(function(ie){ie=ie>>>0,j(ie,"offset");let ee=this[ie],ce=this[ie+7];(ee===void 0||ce===void 0)&&q(ie,this.length-8);let _e=ee+this[++ie]*2**8+this[++ie]*2**16+this[++ie]*2**24,Se=this[++ie]+this[++ie]*2**8+this[++ie]*2**16+ce*2**24;return BigInt(_e)+(BigInt(Se)<>>0,j(ie,"offset");let ee=this[ie],ce=this[ie+7];(ee===void 0||ce===void 0)&&q(ie,this.length-8);let _e=ee*2**24+this[++ie]*2**16+this[++ie]*2**8+this[++ie],Se=this[++ie]*2**24+this[++ie]*2**16+this[++ie]*2**8+ce;return(BigInt(_e)<>>0,ee=ee>>>0,ce||B(ie,ee,this.length);let _e=this[ie],Se=1,Me=0;for(;++Me=Se&&(_e-=Math.pow(2,8*ee)),_e},l.prototype.readIntBE=function(ie,ee,ce){ie=ie>>>0,ee=ee>>>0,ce||B(ie,ee,this.length);let _e=ee,Se=1,Me=this[ie+--_e];for(;_e>0&&(Se*=256);)Me+=this[ie+--_e]*Se;return Se*=128,Me>=Se&&(Me-=Math.pow(2,8*ee)),Me},l.prototype.readInt8=function(ie,ee){return ie=ie>>>0,ee||B(ie,1,this.length),this[ie]&128?(255-this[ie]+1)*-1:this[ie]},l.prototype.readInt16LE=function(ie,ee){ie=ie>>>0,ee||B(ie,2,this.length);let ce=this[ie]|this[ie+1]<<8;return ce&32768?ce|4294901760:ce},l.prototype.readInt16BE=function(ie,ee){ie=ie>>>0,ee||B(ie,2,this.length);let ce=this[ie+1]|this[ie]<<8;return ce&32768?ce|4294901760:ce},l.prototype.readInt32LE=function(ie,ee){return ie=ie>>>0,ee||B(ie,4,this.length),this[ie]|this[ie+1]<<8|this[ie+2]<<16|this[ie+3]<<24},l.prototype.readInt32BE=function(ie,ee){return ie=ie>>>0,ee||B(ie,4,this.length),this[ie]<<24|this[ie+1]<<16|this[ie+2]<<8|this[ie+3]},l.prototype.readBigInt64LE=he(function(ie){ie=ie>>>0,j(ie,"offset");let ee=this[ie],ce=this[ie+7];(ee===void 0||ce===void 0)&&q(ie,this.length-8);let _e=this[ie+4]+this[ie+5]*2**8+this[ie+6]*2**16+(ce<<24);return(BigInt(_e)<>>0,j(ie,"offset");let ee=this[ie],ce=this[ie+7];(ee===void 0||ce===void 0)&&q(ie,this.length-8);let _e=(ee<<24)+this[++ie]*2**16+this[++ie]*2**8+this[++ie];return(BigInt(_e)<>>0,ee||B(ie,4,this.length),t.read(this,ie,!0,23,4)},l.prototype.readFloatBE=function(ie,ee){return ie=ie>>>0,ee||B(ie,4,this.length),t.read(this,ie,!1,23,4)},l.prototype.readDoubleLE=function(ie,ee){return ie=ie>>>0,ee||B(ie,8,this.length),t.read(this,ie,!0,52,8)},l.prototype.readDoubleBE=function(ie,ee){return ie=ie>>>0,ee||B(ie,8,this.length),t.read(this,ie,!1,52,8)};function O(te,ie,ee,ce,_e,Se){if(!l.isBuffer(te))throw new TypeError('"buffer" argument must be a Buffer instance');if(ie>_e||iete.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(ie,ee,ce,_e){if(ie=+ie,ee=ee>>>0,ce=ce>>>0,!_e){let Ue=Math.pow(2,8*ce)-1;O(this,ie,ee,ce,Ue,0)}let Se=1,Me=0;for(this[ee]=ie&255;++Me>>0,ce=ce>>>0,!_e){let Ue=Math.pow(2,8*ce)-1;O(this,ie,ee,ce,Ue,0)}let Se=ce-1,Me=1;for(this[ee+Se]=ie&255;--Se>=0&&(Me*=256);)this[ee+Se]=ie/Me&255;return ee+ce},l.prototype.writeUint8=l.prototype.writeUInt8=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,1,255,0),this[ee]=ie&255,ee+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,2,65535,0),this[ee]=ie&255,this[ee+1]=ie>>>8,ee+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,2,65535,0),this[ee]=ie>>>8,this[ee+1]=ie&255,ee+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,4,4294967295,0),this[ee+3]=ie>>>24,this[ee+2]=ie>>>16,this[ee+1]=ie>>>8,this[ee]=ie&255,ee+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,4,4294967295,0),this[ee]=ie>>>24,this[ee+1]=ie>>>16,this[ee+2]=ie>>>8,this[ee+3]=ie&255,ee+4};function G(te,ie,ee,ce,_e){V(ie,ce,_e,te,ee,7);let Se=Number(ie&BigInt(4294967295));te[ee++]=Se,Se=Se>>8,te[ee++]=Se,Se=Se>>8,te[ee++]=Se,Se=Se>>8,te[ee++]=Se;let Me=Number(ie>>BigInt(32)&BigInt(4294967295));return te[ee++]=Me,Me=Me>>8,te[ee++]=Me,Me=Me>>8,te[ee++]=Me,Me=Me>>8,te[ee++]=Me,ee}function $(te,ie,ee,ce,_e){V(ie,ce,_e,te,ee,7);let Se=Number(ie&BigInt(4294967295));te[ee+7]=Se,Se=Se>>8,te[ee+6]=Se,Se=Se>>8,te[ee+5]=Se,Se=Se>>8,te[ee+4]=Se;let Me=Number(ie>>BigInt(32)&BigInt(4294967295));return te[ee+3]=Me,Me=Me>>8,te[ee+2]=Me,Me=Me>>8,te[ee+1]=Me,Me=Me>>8,te[ee]=Me,ee+8}l.prototype.writeBigUInt64LE=he(function(ie,ee=0){return G(this,ie,ee,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=he(function(ie,ee=0){return $(this,ie,ee,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(ie,ee,ce,_e){if(ie=+ie,ee=ee>>>0,!_e){let Ge=Math.pow(2,8*ce-1);O(this,ie,ee,ce,Ge-1,-Ge)}let Se=0,Me=1,Ue=0;for(this[ee]=ie&255;++Se>0)-Ue&255;return ee+ce},l.prototype.writeIntBE=function(ie,ee,ce,_e){if(ie=+ie,ee=ee>>>0,!_e){let Ge=Math.pow(2,8*ce-1);O(this,ie,ee,ce,Ge-1,-Ge)}let Se=ce-1,Me=1,Ue=0;for(this[ee+Se]=ie&255;--Se>=0&&(Me*=256);)ie<0&&Ue===0&&this[ee+Se+1]!==0&&(Ue=1),this[ee+Se]=(ie/Me>>0)-Ue&255;return ee+ce},l.prototype.writeInt8=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,1,127,-128),ie<0&&(ie=255+ie+1),this[ee]=ie&255,ee+1},l.prototype.writeInt16LE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,2,32767,-32768),this[ee]=ie&255,this[ee+1]=ie>>>8,ee+2},l.prototype.writeInt16BE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,2,32767,-32768),this[ee]=ie>>>8,this[ee+1]=ie&255,ee+2},l.prototype.writeInt32LE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,4,2147483647,-2147483648),this[ee]=ie&255,this[ee+1]=ie>>>8,this[ee+2]=ie>>>16,this[ee+3]=ie>>>24,ee+4},l.prototype.writeInt32BE=function(ie,ee,ce){return ie=+ie,ee=ee>>>0,ce||O(this,ie,ee,4,2147483647,-2147483648),ie<0&&(ie=4294967295+ie+1),this[ee]=ie>>>24,this[ee+1]=ie>>>16,this[ee+2]=ie>>>8,this[ee+3]=ie&255,ee+4},l.prototype.writeBigInt64LE=he(function(ie,ee=0){return G(this,ie,ee,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=he(function(ie,ee=0){return $(this,ie,ee,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function X(te,ie,ee,ce,_e,Se){if(ee+ce>te.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("Index out of range")}function Z(te,ie,ee,ce,_e){return ie=+ie,ee=ee>>>0,_e||X(te,ie,ee,4,34028234663852886e22,-34028234663852886e22),t.write(te,ie,ee,ce,23,4),ee+4}l.prototype.writeFloatLE=function(ie,ee,ce){return Z(this,ie,ee,!0,ce)},l.prototype.writeFloatBE=function(ie,ee,ce){return Z(this,ie,ee,!1,ce)};function J(te,ie,ee,ce,_e){return ie=+ie,ee=ee>>>0,_e||X(te,ie,ee,8,17976931348623157e292,-17976931348623157e292),t.write(te,ie,ee,ce,52,8),ee+8}l.prototype.writeDoubleLE=function(ie,ee,ce){return J(this,ie,ee,!0,ce)},l.prototype.writeDoubleBE=function(ie,ee,ce){return J(this,ie,ee,!1,ce)},l.prototype.copy=function(ie,ee,ce,_e){if(!l.isBuffer(ie))throw new TypeError("argument should be a Buffer");if(ce||(ce=0),!_e&&_e!==0&&(_e=this.length),ee>=ie.length&&(ee=ie.length),ee||(ee=0),_e>0&&_e=this.length)throw new RangeError("Index out of range");if(_e<0)throw new RangeError("sourceEnd out of bounds");_e>this.length&&(_e=this.length),ie.length-ee<_e-ce&&(_e=ie.length-ee+ce);let Se=_e-ce;return this===ie&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ee,ce,_e):Uint8Array.prototype.set.call(ie,this.subarray(ce,_e),ee),Se},l.prototype.fill=function(ie,ee,ce,_e){if(typeof ie=="string"){if(typeof ee=="string"?(_e=ee,ee=0,ce=this.length):typeof ce=="string"&&(_e=ce,ce=this.length),_e!==void 0&&typeof _e!="string")throw new TypeError("encoding must be a string");if(typeof _e=="string"&&!l.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);if(ie.length===1){let Me=ie.charCodeAt(0);(_e==="utf8"&&Me<128||_e==="latin1")&&(ie=Me)}}else typeof ie=="number"?ie=ie&255:typeof ie=="boolean"&&(ie=Number(ie));if(ee<0||this.length>>0,ce=ce===void 0?this.length:ce>>>0,ie||(ie=0);let Se;if(typeof ie=="number")for(Se=ee;Se2**32?_e=W(String(ee)):typeof ee=="bigint"&&(_e=String(ee),(ee>BigInt(2)**BigInt(32)||ee<-(BigInt(2)**BigInt(32)))&&(_e=W(_e)),_e+="n"),ce+=` It must be ${ie}. Received ${_e}`,ce},RangeError);function W(te){let ie="",ee=te.length,ce=te[0]==="-"?1:0;for(;ee>=ce+4;ee-=3)ie=`_${te.slice(ee-3,ee)}${ie}`;return`${te.slice(0,ee)}${ie}`}function U(te,ie,ee){j(ie,"offset"),(te[ie]===void 0||te[ie+ee]===void 0)&&q(ie,te.length-(ee+1))}function V(te,ie,ee,ce,_e,Se){if(te>ee||te3?ie===0||ie===BigInt(0)?Ue=`>= 0${Me} and < 2${Me} ** ${(Se+1)*8}${Me}`:Ue=`>= -(2${Me} ** ${(Se+1)*8-1}${Me}) and < 2 ** ${(Se+1)*8-1}${Me}`:Ue=`>= ${ie}${Me} and <= ${ee}${Me}`,new N.ERR_OUT_OF_RANGE("value",Ue,te)}U(ce,_e,Se)}function j(te,ie){if(typeof te!="number")throw new N.ERR_INVALID_ARG_TYPE(ie,"number",te)}function q(te,ie,ee){throw Math.floor(te)!==te?(j(te,ee),new N.ERR_OUT_OF_RANGE(ee||"offset","an integer",te)):ie<0?new N.ERR_BUFFER_OUT_OF_BOUNDS:new N.ERR_OUT_OF_RANGE(ee||"offset",`>= ${ee?1:0} and <= ${ie}`,te)}var Y=/[^+/0-9A-Za-z-_]/g;function K(te){if(te=te.split("=")[0],te=te.trim().replace(Y,""),te.length<2)return"";for(;te.length%4!==0;)te=te+"=";return te}function re(te,ie){ie=ie||1/0;let ee,ce=te.length,_e=null,Se=[];for(let Me=0;Me55295&&ee<57344){if(!_e){if(ee>56319){(ie-=3)>-1&&Se.push(239,191,189);continue}else if(Me+1===ce){(ie-=3)>-1&&Se.push(239,191,189);continue}_e=ee;continue}if(ee<56320){(ie-=3)>-1&&Se.push(239,191,189),_e=ee;continue}ee=(_e-55296<<10|ee-56320)+65536}else _e&&(ie-=3)>-1&&Se.push(239,191,189);if(_e=null,ee<128){if((ie-=1)<0)break;Se.push(ee)}else if(ee<2048){if((ie-=2)<0)break;Se.push(ee>>6|192,ee&63|128)}else if(ee<65536){if((ie-=3)<0)break;Se.push(ee>>12|224,ee>>6&63|128,ee&63|128)}else if(ee<1114112){if((ie-=4)<0)break;Se.push(ee>>18|240,ee>>12&63|128,ee>>6&63|128,ee&63|128)}else throw new Error("Invalid code point")}return Se}function se(te){let ie=[];for(let ee=0;ee>8,_e=ee%256,Se.push(_e),Se.push(ce);return Se}function ue(te){return r.toByteArray(K(te))}function fe(te,ie,ee,ce){let _e;for(_e=0;_e=ie.length||_e>=te.length);++_e)ie[_e+ee]=te[_e];return _e}function pe(te,ie){return te instanceof ie||te!=null&&te.constructor!=null&&te.constructor.name!=null&&te.constructor.name===ie.name}function we(te){return te!==te}var xe=(function(){let te="0123456789abcdef",ie=new Array(256);for(let ee=0;ee<16;++ee){let ce=ee*16;for(let _e=0;_e<16;++_e)ie[ce+_e]=te[ee]+te[_e]}return ie})();function he(te){return typeof BigInt>"u"?oe:te}function oe(){throw new Error("BigInt not supported")}}}),wT=ye({"node_modules/has-symbols/shams.js"(e,r){"use strict";r.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var a={},i=Symbol("test"),o=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var s=42;a[i]=s;for(var l in a)return!1;if(typeof Object.keys=="function"&&Object.keys(a).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(a).length!==0)return!1;var n=Object.getOwnPropertySymbols(a);if(n.length!==1||n[0]!==i||!Object.prototype.propertyIsEnumerable.call(a,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(a,i);if(u.value!==s||u.enumerable!==!0)return!1}return!0}}}),db=ye({"node_modules/has-tostringtag/shams.js"(e,r){"use strict";var t=wT();r.exports=function(){return t()&&!!Symbol.toStringTag}}}),AT=ye({"node_modules/es-object-atoms/index.js"(e,r){"use strict";r.exports=Object}}),Xae=ye({"node_modules/es-errors/index.js"(e,r){"use strict";r.exports=Error}}),Zae=ye({"node_modules/es-errors/eval.js"(e,r){"use strict";r.exports=EvalError}}),Kae=ye({"node_modules/es-errors/range.js"(e,r){"use strict";r.exports=RangeError}}),Jae=ye({"node_modules/es-errors/ref.js"(e,r){"use strict";r.exports=ReferenceError}}),CL=ye({"node_modules/es-errors/syntax.js"(e,r){"use strict";r.exports=SyntaxError}}),Cy=ye({"node_modules/es-errors/type.js"(e,r){"use strict";r.exports=TypeError}}),Qae=ye({"node_modules/es-errors/uri.js"(e,r){"use strict";r.exports=URIError}}),eie=ye({"node_modules/math-intrinsics/abs.js"(e,r){"use strict";r.exports=Math.abs}}),tie=ye({"node_modules/math-intrinsics/floor.js"(e,r){"use strict";r.exports=Math.floor}}),rie=ye({"node_modules/math-intrinsics/max.js"(e,r){"use strict";r.exports=Math.max}}),aie=ye({"node_modules/math-intrinsics/min.js"(e,r){"use strict";r.exports=Math.min}}),iie=ye({"node_modules/math-intrinsics/pow.js"(e,r){"use strict";r.exports=Math.pow}}),nie=ye({"node_modules/math-intrinsics/round.js"(e,r){"use strict";r.exports=Math.round}}),oie=ye({"node_modules/math-intrinsics/isNaN.js"(e,r){"use strict";r.exports=Number.isNaN||function(a){return a!==a}}}),sie=ye({"node_modules/math-intrinsics/sign.js"(e,r){"use strict";var t=oie();r.exports=function(i){return t(i)||i===0?i:i<0?-1:1}}}),lie=ye({"node_modules/gopd/gOPD.js"(e,r){"use strict";r.exports=Object.getOwnPropertyDescriptor}}),Om=ye({"node_modules/gopd/index.js"(e,r){"use strict";var t=lie();if(t)try{t([],"length")}catch{t=null}r.exports=t}}),pb=ye({"node_modules/es-define-property/index.js"(e,r){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}r.exports=t}}),uie=ye({"node_modules/has-symbols/index.js"(e,r){"use strict";var t=typeof Symbol<"u"&&Symbol,a=wT();r.exports=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:a()}}}),DL=ye({"node_modules/get-proto/Reflect.getPrototypeOf.js"(e,r){"use strict";r.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),LL=ye({"node_modules/get-proto/Object.getPrototypeOf.js"(e,r){"use strict";var t=AT();r.exports=t.getPrototypeOf||null}}),cie=ye({"node_modules/function-bind/implementation.js"(e,r){"use strict";var t="Function.prototype.bind called on incompatible ",a=Object.prototype.toString,i=Math.max,o="[object Function]",s=function(c,f){for(var h=[],d=0;d"u"||!k?t:k(Uint8Array),R={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":w&&k?k([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float16Array%":typeof Float16Array>"u"?t:Float16Array,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":F,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&k?k(k([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!w||!k?t:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":a,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":s,"%ReferenceError%":l,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!w||!k?t:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&k?k(""[Symbol.iterator]()):t,"%Symbol%":w?Symbol:t,"%SyntaxError%":n,"%ThrowTypeError%":C,"%TypedArray%":D,"%TypeError%":u,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet,"%Function.prototype.call%":A,"%Function.prototype.apply%":S,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":T,"%Math.abs%":f,"%Math.floor%":h,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":y,"%Reflect.getPrototypeOf%":b};if(k)try{null.error}catch(U){P=k(k(U)),R["%Error.prototype%"]=P}var P,z=function U(V){var j;if(V==="%AsyncFunction%")j=v("async function () {}");else if(V==="%GeneratorFunction%")j=v("function* () {}");else if(V==="%AsyncGeneratorFunction%")j=v("async function* () {}");else if(V==="%AsyncGenerator%"){var q=U("%AsyncGeneratorFunction%");q&&(j=q.prototype)}else if(V==="%AsyncIteratorPrototype%"){var Y=U("%AsyncGenerator%");Y&&k&&(j=k(Y.prototype))}return R[V]=j,j},I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},L=Dy(),B=PL(),O=L.call(A,Array.prototype.concat),G=L.call(S,Array.prototype.splice),$=L.call(A,String.prototype.replace),X=L.call(A,String.prototype.slice),Z=L.call(A,RegExp.prototype.exec),J=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,H=function(V){var j=X(V,0,1),q=X(V,-1);if(j==="%"&&q!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(q==="%"&&j!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var Y=[];return $(V,J,function(K,re,se,le){Y[Y.length]=se?$(le,N,"$1"):re||K}),Y},W=function(V,j){var q=V,Y;if(B(I,q)&&(Y=I[q],q="%"+Y[0]+"%"),B(R,q)){var K=R[q];if(K===F&&(K=z(q)),typeof K>"u"&&!j)throw new u("intrinsic "+V+" exists, but is not available. Please file an issue!");return{alias:Y,name:q,value:K}}throw new n("intrinsic "+V+" does not exist!")};r.exports=function(V,j){if(typeof V!="string"||V.length===0)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof j!="boolean")throw new u('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,V)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var q=H(V),Y=q.length>0?q[0]:"",K=W("%"+Y+"%",j),re=K.name,se=K.value,le=!1,ue=K.alias;ue&&(Y=ue[0],G(q,O([0,1],ue)));for(var fe=1,pe=!0;fe=q.length){var oe=x(se,we);pe=!!oe,pe&&"get"in oe&&!("originalValue"in oe.get)?se=oe.get:se=se[we]}else pe=B(se,we),se=se[we];pe&&!le&&(R[re]=se)}}return se}}}),Nm=ye({"node_modules/call-bound/index.js"(e,r){"use strict";var t=kT(),a=ET(),i=a([t("%String.prototype.indexOf%")]);r.exports=function(s,l){var n=t(s,!!l);return typeof n=="function"&&i(s,".prototype.")>-1?a([n]):n}}}),die=ye({"node_modules/is-arguments/index.js"(e,r){"use strict";var t=db()(),a=Nm(),i=a("Object.prototype.toString"),o=function(u){return t&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:i(u)==="[object Arguments]"},s=function(u){return o(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&i(u)!=="[object Array]"&&"callee"in u&&i(u.callee)==="[object Function]"},l=(function(){return o(arguments)})();o.isLegacyArguments=s,r.exports=l?o:s}}),pie=ye({"node_modules/is-regex/index.js"(e,r){"use strict";var t=Nm(),a=db()(),i=PL(),o=Om(),s;a?(l=t("RegExp.prototype.exec"),n={},u=function(){throw n},c={toString:u,valueOf:u},typeof Symbol.toPrimitive=="symbol"&&(c[Symbol.toPrimitive]=u),s=function(p){if(!p||typeof p!="object")return!1;var g=o(p,"lastIndex"),m=g&&i(g,"value");if(!m)return!1;try{l(p,c)}catch(y){return y===n}}):(f=t("Object.prototype.toString"),h="[object RegExp]",s=function(p){return!p||typeof p!="object"&&typeof p!="function"?!1:f(p)===h});var l,n,u,c,f,h;r.exports=s}}),vie=ye({"node_modules/safe-regex-test/index.js"(e,r){"use strict";var t=Nm(),a=pie(),i=t("RegExp.prototype.exec"),o=Cy();r.exports=function(l){if(!a(l))throw new o("`regex` must be a RegExp");return function(u){return i(l,u)!==null}}}}),mie=ye({"node_modules/generator-function/index.js"(e,r){"use strict";var t=function*(){}.constructor;r.exports=()=>t}}),gie=ye({"node_modules/is-generator-function/index.js"(e,r){"use strict";var t=Nm(),a=vie(),i=a(/^\s*(?:function)?\*/),o=db()(),s=ST(),l=t("Object.prototype.toString"),n=t("Function.prototype.toString"),u=mie();r.exports=function(f){if(typeof f!="function")return!1;if(i(n(f)))return!0;if(!o){var h=l(f);return h==="[object GeneratorFunction]"}if(!s)return!1;var d=u();return d&&s(f)===d.prototype}}}),yie=ye({"node_modules/is-callable/index.js"(e,r){"use strict";var t=Function.prototype.toString,a=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,i,o;if(typeof a=="function"&&typeof Object.defineProperty=="function")try{i=Object.defineProperty({},"length",{get:function(){throw o}}),o={},a(function(){throw 42},null,i)}catch(x){x!==o&&(a=null)}else a=null;var s=/^\s*class\b/,l=function(E){try{var M=t.call(E);return s.test(M)}catch{return!1}},n=function(E){try{return l(E)?!1:(t.call(E),!0)}catch{return!1}},u=Object.prototype.toString,c="[object Object]",f="[object Function]",h="[object GeneratorFunction]",d="[object HTMLAllCollection]",p="[object HTML document.all class]",g="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,y=!(0 in[,]),_=function(){return!1};typeof document=="object"&&(v=document.all,u.call(v)===u.call(document.all)&&(_=function(E){if((y||!E)&&(typeof E>"u"||typeof E=="object"))try{var M=u.call(E);return(M===d||M===p||M===g||M===c)&&E("")==null}catch{}return!1}));var v;r.exports=a?function(E){if(_(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;try{a(E,null,i)}catch(M){if(M!==o)return!1}return!l(E)&&n(E)}:function(E){if(_(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;if(m)return n(E);if(l(E))return!1;var M=u.call(E);return M!==f&&M!==h&&!/^\[object HTML/.test(M)?!1:n(E)}}}),_ie=ye({"node_modules/for-each/index.js"(e,r){"use strict";var t=yie(),a=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=function(c,f,h){for(var d=0,p=c.length;d=3&&(d=h),n(c)?o(c,f,d):typeof c=="string"?s(c,f,d):l(c,f,d)}}}),xie=ye({"node_modules/possible-typed-array-names/index.js"(e,r){"use strict";r.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),bie=ye({"node_modules/available-typed-arrays/index.js"(e,r){"use strict";var t=xie(),a=typeof globalThis>"u"?window:globalThis;r.exports=function(){for(var o=[],s=0;s3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new i("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,p=!!o&&o(l,n);if(t)t(l,n,{configurable:h===null&&p?p.configurable:!h,enumerable:c===null&&p?p.enumerable:!c,value:u,writable:f===null&&p?p.writable:!f});else if(d||!c&&!f&&!h)l[n]=u;else throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),RL=ye({"node_modules/has-property-descriptors/index.js"(e,r){"use strict";var t=pb(),a=function(){return!!t};a.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},r.exports=a}}),wie=ye({"node_modules/set-function-length/index.js"(e,r){"use strict";var t=kT(),a=IL(),i=RL()(),o=Om(),s=Cy(),l=t("%Math.floor%");r.exports=function(u,c){if(typeof u!="function")throw new s("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||l(c)!==c)throw new s("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],h=!0,d=!0;if("length"in u&&o){var p=o(u,"length");p&&!p.configurable&&(h=!1),p&&!p.writable&&(d=!1)}return(h||d||!f)&&(i?a(u,"length",c,!0,!0):a(u,"length",c)),u}}}),Aie=ye({"node_modules/call-bind-apply-helpers/applyBind.js"(e,r){"use strict";var t=Dy(),a=MT(),i=FL();r.exports=function(){return i(t,a,arguments)}}}),vb=ye({"node_modules/call-bind/index.js"(e,r){"use strict";var t=wie(),a=pb(),i=ET(),o=Aie();r.exports=function(l){var n=i(arguments),u=1+l.length-(arguments.length-1);return t(n,u>0?u:0,!0)},a?a(r.exports,"apply",{value:o}):r.exports.apply=o}}),zL=ye({"node_modules/which-typed-array/index.js"(e,r){"use strict";var t=_ie(),a=bie(),i=vb(),o=Nm(),s=Om(),l=ST(),n=o("Object.prototype.toString"),u=db()(),c=typeof globalThis>"u"?window:globalThis,f=a(),h=o("String.prototype.slice"),d=o("Array.prototype.indexOf",!0)||function(v,x){for(var E=0;E-1}r.exports=function(v){if(!v||typeof v!="object")return!1;if(!u){var x=h(n(v),8,-1);return y(x)?x:x!=="Object"?!1:m(v)}return s?g(v):null}}}),Tie=ye({"node_modules/is-typed-array/index.js"(e,r){"use strict";var t=zL();r.exports=function(i){return!!t(i)}}}),BL=ye({"node_modules/util/support/types.js"(e){"use strict";var r=die(),t=gie(),a=zL(),i=Tie();function o(le){return le.call.bind(le)}var s=typeof BigInt<"u",l=typeof Symbol<"u",n=o(Object.prototype.toString),u=o(Number.prototype.valueOf),c=o(String.prototype.valueOf),f=o(Boolean.prototype.valueOf);s&&(h=o(BigInt.prototype.valueOf));var h;l&&(d=o(Symbol.prototype.valueOf));var d;function p(le,ue){if(typeof le!="object")return!1;try{return ue(le),!0}catch{return!1}}e.isArgumentsObject=r,e.isGeneratorFunction=t,e.isTypedArray=i;function g(le){return typeof Promise<"u"&&le instanceof Promise||le!==null&&typeof le=="object"&&typeof le.then=="function"&&typeof le.catch=="function"}e.isPromise=g;function m(le){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(le):i(le)||G(le)}e.isArrayBufferView=m;function y(le){return a(le)==="Uint8Array"}e.isUint8Array=y;function _(le){return a(le)==="Uint8ClampedArray"}e.isUint8ClampedArray=_;function v(le){return a(le)==="Uint16Array"}e.isUint16Array=v;function x(le){return a(le)==="Uint32Array"}e.isUint32Array=x;function E(le){return a(le)==="Int8Array"}e.isInt8Array=E;function M(le){return a(le)==="Int16Array"}e.isInt16Array=M;function C(le){return a(le)==="Int32Array"}e.isInt32Array=C;function w(le){return a(le)==="Float32Array"}e.isFloat32Array=w;function k(le){return a(le)==="Float64Array"}e.isFloat64Array=k;function T(le){return a(le)==="BigInt64Array"}e.isBigInt64Array=T;function b(le){return a(le)==="BigUint64Array"}e.isBigUint64Array=b;function S(le){return n(le)==="[object Map]"}S.working=typeof Map<"u"&&S(new Map);function A(le){return typeof Map>"u"?!1:S.working?S(le):le instanceof Map}e.isMap=A;function F(le){return n(le)==="[object Set]"}F.working=typeof Set<"u"&&F(new Set);function D(le){return typeof Set>"u"?!1:F.working?F(le):le instanceof Set}e.isSet=D;function R(le){return n(le)==="[object WeakMap]"}R.working=typeof WeakMap<"u"&&R(new WeakMap);function P(le){return typeof WeakMap>"u"?!1:R.working?R(le):le instanceof WeakMap}e.isWeakMap=P;function z(le){return n(le)==="[object WeakSet]"}z.working=typeof WeakSet<"u"&&z(new WeakSet);function I(le){return z(le)}e.isWeakSet=I;function L(le){return n(le)==="[object ArrayBuffer]"}L.working=typeof ArrayBuffer<"u"&&L(new ArrayBuffer);function B(le){return typeof ArrayBuffer>"u"?!1:L.working?L(le):le instanceof ArrayBuffer}e.isArrayBuffer=B;function O(le){return n(le)==="[object DataView]"}O.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&O(new DataView(new ArrayBuffer(1),0,1));function G(le){return typeof DataView>"u"?!1:O.working?O(le):le instanceof DataView}e.isDataView=G;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function X(le){return n(le)==="[object SharedArrayBuffer]"}function Z(le){return typeof $>"u"?!1:(typeof X.working>"u"&&(X.working=X(new $)),X.working?X(le):le instanceof $)}e.isSharedArrayBuffer=Z;function J(le){return n(le)==="[object AsyncFunction]"}e.isAsyncFunction=J;function N(le){return n(le)==="[object Map Iterator]"}e.isMapIterator=N;function H(le){return n(le)==="[object Set Iterator]"}e.isSetIterator=H;function W(le){return n(le)==="[object Generator]"}e.isGeneratorObject=W;function U(le){return n(le)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=U;function V(le){return p(le,u)}e.isNumberObject=V;function j(le){return p(le,c)}e.isStringObject=j;function q(le){return p(le,f)}e.isBooleanObject=q;function Y(le){return s&&p(le,h)}e.isBigIntObject=Y;function K(le){return l&&p(le,d)}e.isSymbolObject=K;function re(le){return V(le)||j(le)||q(le)||Y(le)||K(le)}e.isBoxedPrimitive=re;function se(le){return typeof Uint8Array<"u"&&(B(le)||Z(le))}e.isAnyArrayBuffer=se,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(le){Object.defineProperty(e,le,{enumerable:!1,value:function(){throw new Error(le+" is not supported in userland")}})})}}),OL=ye({"node_modules/util/support/isBufferBrowser.js"(e,r){r.exports=function(a){return a&&typeof a=="object"&&typeof a.copy=="function"&&typeof a.fill=="function"&&typeof a.readUInt8=="function"}}}),NL=ye({"(disabled):node_modules/util/util.js"(e){var r=Object.getOwnPropertyDescriptors||function(G){for(var $=Object.keys(G),X={},Z=0;Z<$.length;Z++)X[$[Z]]=Object.getOwnPropertyDescriptor(G,$[Z]);return X},t=/%[sdj%]/g;e.format=function(O){if(!E(O)){for(var G=[],$=0;$=Z)return H;switch(H){case"%s":return String(X[$++]);case"%d":return Number(X[$++]);case"%j":try{return JSON.stringify(X[$++])}catch{return"[Circular]"}default:return H}}),N=X[$];$"u")return function(){return e.deprecate(O,G).apply(this,arguments)};var $=!1;function X(){if(!$){if(process.throwDeprecation)throw new Error(G);process.traceDeprecation?console.trace(G):console.error(G),$=!0}return O.apply(this,arguments)}return X};var a={},i=/^$/;o="false",o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i");var o;e.debuglog=function(O){if(O=O.toUpperCase(),!a[O])if(i.test(O)){var G=process.pid;a[O]=function(){var $=e.format.apply(e,arguments);console.error("%s %d: %s",O,G,$)}}else a[O]=function(){};return a[O]};function s(O,G){var $={seen:[],stylize:n};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),y(G)?$.showHidden=G:G&&e._extend($,G),C($.showHidden)&&($.showHidden=!1),C($.depth)&&($.depth=2),C($.colors)&&($.colors=!1),C($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=l),c($,O,$.depth)}e.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(O,G){var $=s.styles[G];return $?"\x1B["+s.colors[$][0]+"m"+O+"\x1B["+s.colors[$][1]+"m":O}function n(O,G){return O}function u(O){var G={};return O.forEach(function($,X){G[$]=!0}),G}function c(O,G,$){if(O.customInspect&&G&&S(G.inspect)&&G.inspect!==e.inspect&&!(G.constructor&&G.constructor.prototype===G)){var X=G.inspect($,O);return E(X)||(X=c(O,X,$)),X}var Z=f(O,G);if(Z)return Z;var J=Object.keys(G),N=u(J);if(O.showHidden&&(J=Object.getOwnPropertyNames(G)),b(G)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return h(G);if(J.length===0){if(S(G)){var H=G.name?": "+G.name:"";return O.stylize("[Function"+H+"]","special")}if(w(G))return O.stylize(RegExp.prototype.toString.call(G),"regexp");if(T(G))return O.stylize(Date.prototype.toString.call(G),"date");if(b(G))return h(G)}var W="",U=!1,V=["{","}"];if(m(G)&&(U=!0,V=["[","]"]),S(G)){var j=G.name?": "+G.name:"";W=" [Function"+j+"]"}if(w(G)&&(W=" "+RegExp.prototype.toString.call(G)),T(G)&&(W=" "+Date.prototype.toUTCString.call(G)),b(G)&&(W=" "+h(G)),J.length===0&&(!U||G.length==0))return V[0]+W+V[1];if($<0)return w(G)?O.stylize(RegExp.prototype.toString.call(G),"regexp"):O.stylize("[Object]","special");O.seen.push(G);var q;return U?q=d(O,G,$,N,J):q=J.map(function(Y){return p(O,G,$,N,Y,U)}),O.seen.pop(),g(q,W,V)}function f(O,G){if(C(G))return O.stylize("undefined","undefined");if(E(G)){var $="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize($,"string")}if(x(G))return O.stylize(""+G,"number");if(y(G))return O.stylize(""+G,"boolean");if(_(G))return O.stylize("null","null")}function h(O){return"["+Error.prototype.toString.call(O)+"]"}function d(O,G,$,X,Z){for(var J=[],N=0,H=G.length;N-1&&(J?H=H.split(` +`).map(function(U){return" "+U}).join(` +`).slice(2):H=` +`+H.split(` +`).map(function(U){return" "+U}).join(` +`))):H=O.stylize("[Circular]","special")),C(N)){if(J&&Z.match(/^\d+$/))return H;N=JSON.stringify(""+Z),N.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(N=N.slice(1,-1),N=O.stylize(N,"name")):(N=N.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),N=O.stylize(N,"string"))}return N+": "+H}function g(O,G,$){var X=0,Z=O.reduce(function(J,N){return X++,N.indexOf(` +`)>=0&&X++,J+N.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Z>60?$[0]+(G===""?"":G+` + `)+" "+O.join(`, + `)+" "+$[1]:$[0]+G+" "+O.join(", ")+" "+$[1]}e.types=BL();function m(O){return Array.isArray(O)}e.isArray=m;function y(O){return typeof O=="boolean"}e.isBoolean=y;function _(O){return O===null}e.isNull=_;function v(O){return O==null}e.isNullOrUndefined=v;function x(O){return typeof O=="number"}e.isNumber=x;function E(O){return typeof O=="string"}e.isString=E;function M(O){return typeof O=="symbol"}e.isSymbol=M;function C(O){return O===void 0}e.isUndefined=C;function w(O){return k(O)&&F(O)==="[object RegExp]"}e.isRegExp=w,e.types.isRegExp=w;function k(O){return typeof O=="object"&&O!==null}e.isObject=k;function T(O){return k(O)&&F(O)==="[object Date]"}e.isDate=T,e.types.isDate=T;function b(O){return k(O)&&(F(O)==="[object Error]"||O instanceof Error)}e.isError=b,e.types.isNativeError=b;function S(O){return typeof O=="function"}e.isFunction=S;function A(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O>"u"}e.isPrimitive=A,e.isBuffer=OL();function F(O){return Object.prototype.toString.call(O)}function D(O){return O<10?"0"+O.toString(10):O.toString(10)}var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var O=new Date,G=[D(O.getHours()),D(O.getMinutes()),D(O.getSeconds())].join(":");return[O.getDate(),R[O.getMonth()],G].join(" ")}e.log=function(){console.log("%s - %s",P(),e.format.apply(e,arguments))},e.inherits=d0(),e._extend=function(O,G){if(!G||!k(G))return O;for(var $=Object.keys(G),X=$.length;X--;)O[$[X]]=G[$[X]];return O};function z(O,G){return Object.prototype.hasOwnProperty.call(O,G)}var I=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');if(I&&G[I]){var $=G[I];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,I,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var X,Z,J=new Promise(function(W,U){X=W,Z=U}),N=[],H=0;H0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(_){var v={data:_,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(_){if(this.length===0)return"";for(var v=this.head,x=""+v.data;v=v.next;)x+=_+v.data;return x}},{key:"concat",value:function(_){if(this.length===0)return f.alloc(0);for(var v=f.allocUnsafe(_>>>0),x=this.head,E=0;x;)g(x.data,v,E),E+=x.data.length,x=x.next;return v}},{key:"consume",value:function(_,v){var x;return _M.length?M.length:_;if(C===M.length?E+=M:E+=M.slice(0,_),_-=C,_===0){C===M.length?(++x,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=M.slice(C));break}++x}return this.length-=x,E}},{key:"_getBuffer",value:function(_){var v=f.allocUnsafe(_),x=this.head,E=1;for(x.data.copy(v),_-=x.data.length;x=x.next;){var M=x.data,C=_>M.length?M.length:_;if(M.copy(v,v.length-_,0,C),_-=C,_===0){C===M.length?(++E,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=M.slice(C));break}++E}return this.length-=E,v}},{key:p,value:function(_,v){return d(this,a(a({},v),{},{depth:0,customInspect:!1}))}}]),m})()}}),jL=ye({"node_modules/readable-stream/lib/internal/streams/destroy.js"(e,r){"use strict";function t(n,u){var c=this,f=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return f||h?(u?u(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(s,this,n)):process.nextTick(s,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,function(d){!u&&d?c._writableState?c._writableState.errorEmitted?process.nextTick(i,c):(c._writableState.errorEmitted=!0,process.nextTick(a,c,d)):process.nextTick(a,c,d):u?(process.nextTick(i,c),u(d)):process.nextTick(i,c)}),this)}function a(n,u){s(n,u),i(n)}function i(n){n._writableState&&!n._writableState.emitClose||n._readableState&&!n._readableState.emitClose||n.emit("close")}function o(){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 s(n,u){n.emit("error",u)}function l(n,u){var c=n._readableState,f=n._writableState;c&&c.autoDestroy||f&&f.autoDestroy?n.destroy(u):n.emit("error",u)}r.exports={destroy:t,undestroy:o,errorOrDestroy:l}}}),jm=ye({"node_modules/readable-stream/errors-browser.js"(e,r){"use strict";function t(u,c){u.prototype=Object.create(c.prototype),u.prototype.constructor=u,u.__proto__=c}var a={};function i(u,c,f){f||(f=Error);function h(p,g,m){return typeof c=="string"?c:c(p,g,m)}var d=(function(p){t(g,p);function g(m,y,_){return p.call(this,h(m,y,_))||this}return g})(f);d.prototype.name=f.name,d.prototype.code=u,a[u]=d}function o(u,c){if(Array.isArray(u)){var f=u.length;return u=u.map(function(h){return String(h)}),f>2?"one of ".concat(c," ").concat(u.slice(0,f-1).join(", "),", or ")+u[f-1]:f===2?"one of ".concat(c," ").concat(u[0]," or ").concat(u[1]):"of ".concat(c," ").concat(u[0])}else return"of ".concat(c," ").concat(String(u))}function s(u,c,f){return u.substr(!f||f<0?0:+f,c.length)===c}function l(u,c,f){return(f===void 0||f>u.length)&&(f=u.length),u.substring(f-c.length,f)===c}function n(u,c,f){return typeof f!="number"&&(f=0),f+c.length>u.length?!1:u.indexOf(c,f)!==-1}i("ERR_INVALID_OPT_VALUE",function(u,c){return'The value "'+c+'" is invalid for option "'+u+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(u,c,f){var h;typeof c=="string"&&s(c,"not ")?(h="must not be",c=c.replace(/^not /,"")):h="must be";var d;if(l(u," argument"))d="The ".concat(u," ").concat(h," ").concat(o(c,"type"));else{var p=n(u,".")?"property":"argument";d='The "'.concat(u,'" ').concat(p," ").concat(h," ").concat(o(c,"type"))}return d+=". Received type ".concat(typeof f),d},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(u){return"The "+u+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(u){return"Cannot call "+u+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(u){return"Unknown encoding: "+u},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),r.exports.codes=a}}),UL=ye({"node_modules/readable-stream/lib/internal/streams/state.js"(e,r){"use strict";var t=jm().codes.ERR_INVALID_OPT_VALUE;function a(o,s,l){return o.highWaterMark!=null?o.highWaterMark:s?o[l]:null}function i(o,s,l,n){var u=a(s,n,l);if(u!=null){if(!(isFinite(u)&&Math.floor(u)===u)||u<0){var c=n?l:"highWaterMark";throw new t(c,u)}return Math.floor(u)}return o.objectMode?16:16*1024}r.exports={getHighWaterMark:i}}}),Eie=ye({"node_modules/util-deprecate/browser.js"(e,r){r.exports=t;function t(i,o){if(a("noDeprecation"))return i;var s=!1;function l(){if(!s){if(a("throwDeprecation"))throw new Error(o);a("traceDeprecation")?console.trace(o):console.warn(o),s=!0}return i.apply(this,arguments)}return l}function a(i){try{if(!window.localStorage)return!1}catch{return!1}var o=window.localStorage[i];return o==null?!1:String(o).toLowerCase()==="true"}}}),qL=ye({"node_modules/readable-stream/lib/_stream_writable.js"(e,r){"use strict";r.exports=T;function t(N){var H=this;this.next=null,this.entry=null,this.finish=function(){J(H,N)}}var a;T.WritableState=w;var i={deprecate:Eie()},o=kL(),s=Bm().Buffer,l=(typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function n(N){return s.from(N)}function u(N){return s.isBuffer(N)||N instanceof l}var c=jL(),f=UL(),h=f.getHighWaterMark,d=jm().codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,_=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,x=d.ERR_STREAM_WRITE_AFTER_END,E=d.ERR_UNKNOWN_ENCODING,M=c.errorOrDestroy;d0()(T,o);function C(){}function w(N,H,W){a=a||Um(),N=N||{},typeof W!="boolean"&&(W=H instanceof a),this.objectMode=!!N.objectMode,W&&(this.objectMode=this.objectMode||!!N.writableObjectMode),this.highWaterMark=h(this,N,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U=N.decodeStrings===!1;this.decodeStrings=!U,this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(V){z(H,V)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}w.prototype.getBuffer=function(){for(var H=this.bufferedRequest,W=[];H;)W.push(H),H=H.next;return W},(function(){try{Object.defineProperty(w.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var k;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(k=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(H){return k.call(this,H)?!0:this!==T?!1:H&&H._writableState instanceof w}})):k=function(H){return H instanceof this};function T(N){a=a||Um();var H=this instanceof a;if(!H&&!k.call(T,this))return new T(N);this._writableState=new w(N,this,H),this.writable=!0,N&&(typeof N.write=="function"&&(this._write=N.write),typeof N.writev=="function"&&(this._writev=N.writev),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.final=="function"&&(this._final=N.final)),o.call(this)}T.prototype.pipe=function(){M(this,new y)};function b(N,H){var W=new x;M(N,W),process.nextTick(H,W)}function S(N,H,W,U){var V;return W===null?V=new v:typeof W!="string"&&!H.objectMode&&(V=new p("chunk",["string","Buffer"],W)),V?(M(N,V),process.nextTick(U,V),!1):!0}T.prototype.write=function(N,H,W){var U=this._writableState,V=!1,j=!U.objectMode&&u(N);return j&&!s.isBuffer(N)&&(N=n(N)),typeof H=="function"&&(W=H,H=null),j?H="buffer":H||(H=U.defaultEncoding),typeof W!="function"&&(W=C),U.ending?b(this,W):(j||S(this,U,N,W))&&(U.pendingcb++,V=F(this,U,j,N,H,W)),V},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var N=this._writableState;N.corked&&(N.corked--,!N.writing&&!N.corked&&!N.bufferProcessing&&N.bufferedRequest&&B(this,N))},T.prototype.setDefaultEncoding=function(H){if(typeof H=="string"&&(H=H.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((H+"").toLowerCase())>-1))throw new E(H);return this._writableState.defaultEncoding=H,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function A(N,H,W){return!N.objectMode&&N.decodeStrings!==!1&&typeof H=="string"&&(H=s.from(H,W)),H}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(N,H,W,U,V,j){if(!W){var q=A(H,U,V);U!==q&&(W=!0,V="buffer",U=q)}var Y=H.objectMode?1:U.length;H.length+=Y;var K=H.length>5===6?2:_>>4===14?3:_>>3===30?4:_>>6===2?-1:-2}function l(_,v,x){var E=v.length-1;if(E=0?(M>0&&(_.lastNeed=M-1),M):--E=0?(M>0&&(_.lastNeed=M-2),M):--E=0?(M>0&&(M===2?M=0:_.lastNeed=M-3),M):0))}function n(_,v,x){if((v[0]&192)!==128)return _.lastNeed=0,"\uFFFD";if(_.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return _.lastNeed=1,"\uFFFD";if(_.lastNeed>2&&v.length>2&&(v[2]&192)!==128)return _.lastNeed=2,"\uFFFD"}}function u(_){var v=this.lastTotal-this.lastNeed,x=n(this,_,v);if(x!==void 0)return x;if(this.lastNeed<=_.length)return _.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,v,0,_.length),this.lastNeed-=_.length}function c(_,v){var x=l(this,_,v);if(!this.lastNeed)return _.toString("utf8",v);this.lastTotal=x;var E=_.length-(x-this.lastNeed);return _.copy(this.lastChar,0,E),_.toString("utf8",v,E)}function f(_){var v=_&&_.length?this.write(_):"";return this.lastNeed?v+"\uFFFD":v}function h(_,v){if((_.length-v)%2===0){var x=_.toString("utf16le",v);if(x){var E=x.charCodeAt(x.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=_[_.length-1],_.toString("utf16le",v,_.length-1)}function d(_){var v=_&&_.length?this.write(_):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,x)}return v}function p(_,v){var x=(_.length-v)%3;return x===0?_.toString("base64",v):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=_[_.length-1]:(this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1]),_.toString("base64",v,_.length-x))}function g(_){var v=_&&_.length?this.write(_):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function m(_){return _.toString(this.encoding)}function y(_){return _&&_.length?this.write(_):""}}}),CT=ye({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(e,r){"use strict";var t=jm().codes.ERR_STREAM_PREMATURE_CLOSE;function a(l){var n=!1;return function(){if(!n){n=!0;for(var u=arguments.length,c=new Array(u),f=0;f0)if(typeof Y!="string"&&!le.objectMode&&Object.getPrototypeOf(Y)!==s.prototype&&(Y=n(Y)),re)le.endEmitted?w(q,new x):F(q,le,Y,!0);else if(le.ended)w(q,new _);else{if(le.destroyed)return!1;le.reading=!1,le.decoder&&!K?(Y=le.decoder.write(Y),le.objectMode||Y.length!==0?F(q,le,Y,!1):O(q,le)):F(q,le,Y,!1)}else re||(le.reading=!1,O(q,le))}return!le.ended&&(le.length=R?q=R:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function z(q,Y){return q<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:q!==q?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(q>Y.highWaterMark&&(Y.highWaterMark=P(q)),q<=Y.length?q:Y.ended?Y.length:(Y.needReadable=!0,0))}S.prototype.read=function(q){f("read",q),q=parseInt(q,10);var Y=this._readableState,K=q;if(q!==0&&(Y.emittedReadable=!1),q===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return f("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?U(this):L(this),null;if(q=z(q,Y),q===0&&Y.ended)return Y.length===0&&U(this),null;var re=Y.needReadable;f("need readable",re),(Y.length===0||Y.length-q0?se=W(q,Y):se=null,se===null?(Y.needReadable=Y.length<=Y.highWaterMark,q=0):(Y.length-=q,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),K!==q&&Y.ended&&U(this)),se!==null&&this.emit("data",se),se};function I(q,Y){if(f("onEofChunk"),!Y.ended){if(Y.decoder){var K=Y.decoder.end();K&&K.length&&(Y.buffer.push(K),Y.length+=Y.objectMode?1:K.length)}Y.ended=!0,Y.sync?L(q):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,B(q)))}}function L(q){var Y=q._readableState;f("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(f("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(B,q))}function B(q){var Y=q._readableState;f("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(q.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,H(q)}function O(q,Y){Y.readingMore||(Y.readingMore=!0,process.nextTick(G,q,Y))}function G(q,Y){for(;!Y.reading&&!Y.ended&&(Y.length1&&j(re.pipes,q)!==-1)&&!we&&(f("false write response, pause",re.awaitDrain),re.awaitDrain++),K.pause())}function oe(ce){f("onerror",ce),ee(),q.removeListener("error",oe),i(q,"error")===0&&w(q,ce)}T(q,"error",oe);function te(){q.removeListener("finish",ie),ee()}q.once("close",te);function ie(){f("onfinish"),q.removeListener("close",te),ee()}q.once("finish",ie);function ee(){f("unpipe"),K.unpipe(q)}return q.emit("pipe",K),re.flowing||(f("pipe resume"),K.resume()),q};function $(q){return function(){var K=q._readableState;f("pipeOnDrain",K.awaitDrain),K.awaitDrain&&K.awaitDrain--,K.awaitDrain===0&&i(q,"data")&&(K.flowing=!0,H(q))}}S.prototype.unpipe=function(q){var Y=this._readableState,K={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return q&&q!==Y.pipes?this:(q||(q=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,q&&q.emit("unpipe",this,K),this);if(!q){var re=Y.pipes,se=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var le=0;le0,re.flowing!==!1&&this.resume()):q==="readable"&&!re.endEmitted&&!re.readableListening&&(re.readableListening=re.needReadable=!0,re.flowing=!1,re.emittedReadable=!1,f("on readable",re.length,re.reading),re.length?L(this):re.reading||process.nextTick(Z,this)),K},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(q,Y){var K=o.prototype.removeListener.call(this,q,Y);return q==="readable"&&process.nextTick(X,this),K},S.prototype.removeAllListeners=function(q){var Y=o.prototype.removeAllListeners.apply(this,arguments);return(q==="readable"||q===void 0)&&process.nextTick(X,this),Y};function X(q){var Y=q._readableState;Y.readableListening=q.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:q.listenerCount("data")>0&&q.resume()}function Z(q){f("readable nexttick read 0"),q.read(0)}S.prototype.resume=function(){var q=this._readableState;return q.flowing||(f("resume"),q.flowing=!q.readableListening,J(this,q)),q.paused=!1,this};function J(q,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,process.nextTick(N,q,Y))}function N(q,Y){f("resume",Y.reading),Y.reading||q.read(0),Y.resumeScheduled=!1,q.emit("resume"),H(q),Y.flowing&&!Y.reading&&q.read(0)}S.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function H(q){var Y=q._readableState;for(f("flow",Y.flowing);Y.flowing&&q.read()!==null;);}S.prototype.wrap=function(q){var Y=this,K=this._readableState,re=!1;q.on("end",function(){if(f("wrapped end"),K.decoder&&!K.ended){var ue=K.decoder.end();ue&&ue.length&&Y.push(ue)}Y.push(null)}),q.on("data",function(ue){if(f("wrapped data"),K.decoder&&(ue=K.decoder.write(ue)),!(K.objectMode&&ue==null)&&!(!K.objectMode&&(!ue||!ue.length))){var fe=Y.push(ue);fe||(re=!0,q.pause())}});for(var se in q)this[se]===void 0&&typeof q[se]=="function"&&(this[se]=(function(fe){return function(){return q[fe].apply(q,arguments)}})(se));for(var le=0;le=Y.length?(Y.decoder?K=Y.buffer.join(""):Y.buffer.length===1?K=Y.buffer.first():K=Y.buffer.concat(Y.length),Y.buffer.clear()):K=Y.buffer.consume(q,Y.decoder),K}function U(q){var Y=q._readableState;f("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,process.nextTick(V,Y,q))}function V(q,Y){if(f("endReadableNT",q.endEmitted,q.length),!q.endEmitted&&q.length===0&&(q.endEmitted=!0,Y.readable=!1,Y.emit("end"),q.autoDestroy)){var K=Y._writableState;(!K||K.autoDestroy&&K.finished)&&Y.destroy()}}typeof Symbol=="function"&&(S.from=function(q,Y){return C===void 0&&(C=Cie()),C(S,q,Y)});function j(q,Y){for(var K=0,re=q.length;K0;return u(x,M,C,function(w){_||(_=w),w&&v.forEach(c),!M&&(v.forEach(c),y(_))})});return g.reduce(f)}r.exports=d}}),Fie=ye({"node_modules/stream-browserify/index.js"(e,r){r.exports=i;var t=Sm().EventEmitter,a=d0();a(i,t),i.Readable=GL(),i.Writable=qL(),i.Duplex=Um(),i.Transform=HL(),i.PassThrough=Die(),i.finished=CT(),i.pipeline=Lie(),i.Stream=i;function i(){t.call(this)}i.prototype.pipe=function(o,s){var l=this;function n(g){o.writable&&o.write(g)===!1&&l.pause&&l.pause()}l.on("data",n);function u(){l.readable&&l.resume&&l.resume()}o.on("drain",u),!o._isStdio&&(!s||s.end!==!1)&&(l.on("end",f),l.on("close",h));var c=!1;function f(){c||(c=!0,o.end())}function h(){c||(c=!0,typeof o.destroy=="function"&&o.destroy())}function d(g){if(p(),t.listenerCount(this,"error")===0)throw g}l.on("error",d),o.on("error",d);function p(){l.removeListener("data",n),o.removeListener("drain",u),l.removeListener("end",f),l.removeListener("close",h),l.removeListener("error",d),o.removeListener("error",d),l.removeListener("end",p),l.removeListener("close",p),o.removeListener("close",p)}return l.on("end",p),l.on("close",p),o.on("close",p),o.emit("pipe",l),o}}}),Ly=ye({"node_modules/util/util.js"(e){var r=Object.getOwnPropertyDescriptors||function(G){for(var $=Object.keys(G),X={},Z=0;Z<$.length;Z++)X[$[Z]]=Object.getOwnPropertyDescriptor(G,$[Z]);return X},t=/%[sdj%]/g;e.format=function(O){if(!E(O)){for(var G=[],$=0;$=Z)return H;switch(H){case"%s":return String(X[$++]);case"%d":return Number(X[$++]);case"%j":try{return JSON.stringify(X[$++])}catch{return"[Circular]"}default:return H}}),N=X[$];$"u")return function(){return e.deprecate(O,G).apply(this,arguments)};var $=!1;function X(){if(!$){if(process.throwDeprecation)throw new Error(G);process.traceDeprecation?console.trace(G):console.error(G),$=!0}return O.apply(this,arguments)}return X};var a={},i=/^$/;o="false",o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i");var o;e.debuglog=function(O){if(O=O.toUpperCase(),!a[O])if(i.test(O)){var G=process.pid;a[O]=function(){var $=e.format.apply(e,arguments);console.error("%s %d: %s",O,G,$)}}else a[O]=function(){};return a[O]};function s(O,G){var $={seen:[],stylize:n};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),y(G)?$.showHidden=G:G&&e._extend($,G),C($.showHidden)&&($.showHidden=!1),C($.depth)&&($.depth=2),C($.colors)&&($.colors=!1),C($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=l),c($,O,$.depth)}e.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(O,G){var $=s.styles[G];return $?"\x1B["+s.colors[$][0]+"m"+O+"\x1B["+s.colors[$][1]+"m":O}function n(O,G){return O}function u(O){var G={};return O.forEach(function($,X){G[$]=!0}),G}function c(O,G,$){if(O.customInspect&&G&&S(G.inspect)&&G.inspect!==e.inspect&&!(G.constructor&&G.constructor.prototype===G)){var X=G.inspect($,O);return E(X)||(X=c(O,X,$)),X}var Z=f(O,G);if(Z)return Z;var J=Object.keys(G),N=u(J);if(O.showHidden&&(J=Object.getOwnPropertyNames(G)),b(G)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return h(G);if(J.length===0){if(S(G)){var H=G.name?": "+G.name:"";return O.stylize("[Function"+H+"]","special")}if(w(G))return O.stylize(RegExp.prototype.toString.call(G),"regexp");if(T(G))return O.stylize(Date.prototype.toString.call(G),"date");if(b(G))return h(G)}var W="",U=!1,V=["{","}"];if(m(G)&&(U=!0,V=["[","]"]),S(G)){var j=G.name?": "+G.name:"";W=" [Function"+j+"]"}if(w(G)&&(W=" "+RegExp.prototype.toString.call(G)),T(G)&&(W=" "+Date.prototype.toUTCString.call(G)),b(G)&&(W=" "+h(G)),J.length===0&&(!U||G.length==0))return V[0]+W+V[1];if($<0)return w(G)?O.stylize(RegExp.prototype.toString.call(G),"regexp"):O.stylize("[Object]","special");O.seen.push(G);var q;return U?q=d(O,G,$,N,J):q=J.map(function(Y){return p(O,G,$,N,Y,U)}),O.seen.pop(),g(q,W,V)}function f(O,G){if(C(G))return O.stylize("undefined","undefined");if(E(G)){var $="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize($,"string")}if(x(G))return O.stylize(""+G,"number");if(y(G))return O.stylize(""+G,"boolean");if(_(G))return O.stylize("null","null")}function h(O){return"["+Error.prototype.toString.call(O)+"]"}function d(O,G,$,X,Z){for(var J=[],N=0,H=G.length;N-1&&(J?H=H.split(` +`).map(function(U){return" "+U}).join(` +`).slice(2):H=` +`+H.split(` +`).map(function(U){return" "+U}).join(` +`))):H=O.stylize("[Circular]","special")),C(N)){if(J&&Z.match(/^\d+$/))return H;N=JSON.stringify(""+Z),N.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(N=N.slice(1,-1),N=O.stylize(N,"name")):(N=N.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),N=O.stylize(N,"string"))}return N+": "+H}function g(O,G,$){var X=0,Z=O.reduce(function(J,N){return X++,N.indexOf(` +`)>=0&&X++,J+N.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Z>60?$[0]+(G===""?"":G+` + `)+" "+O.join(`, + `)+" "+$[1]:$[0]+G+" "+O.join(", ")+" "+$[1]}e.types=BL();function m(O){return Array.isArray(O)}e.isArray=m;function y(O){return typeof O=="boolean"}e.isBoolean=y;function _(O){return O===null}e.isNull=_;function v(O){return O==null}e.isNullOrUndefined=v;function x(O){return typeof O=="number"}e.isNumber=x;function E(O){return typeof O=="string"}e.isString=E;function M(O){return typeof O=="symbol"}e.isSymbol=M;function C(O){return O===void 0}e.isUndefined=C;function w(O){return k(O)&&F(O)==="[object RegExp]"}e.isRegExp=w,e.types.isRegExp=w;function k(O){return typeof O=="object"&&O!==null}e.isObject=k;function T(O){return k(O)&&F(O)==="[object Date]"}e.isDate=T,e.types.isDate=T;function b(O){return k(O)&&(F(O)==="[object Error]"||O instanceof Error)}e.isError=b,e.types.isNativeError=b;function S(O){return typeof O=="function"}e.isFunction=S;function A(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O>"u"}e.isPrimitive=A,e.isBuffer=OL();function F(O){return Object.prototype.toString.call(O)}function D(O){return O<10?"0"+O.toString(10):O.toString(10)}var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var O=new Date,G=[D(O.getHours()),D(O.getMinutes()),D(O.getSeconds())].join(":");return[O.getDate(),R[O.getMonth()],G].join(" ")}e.log=function(){console.log("%s - %s",P(),e.format.apply(e,arguments))},e.inherits=d0(),e._extend=function(O,G){if(!G||!k(G))return O;for(var $=Object.keys(G),X=$.length;X--;)O[$[X]]=G[$[X]];return O};function z(O,G){return Object.prototype.hasOwnProperty.call(O,G)}var I=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');if(I&&G[I]){var $=G[I];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,I,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var X,Z,J=new Promise(function(W,U){X=W,Z=U}),N=[],H=0;H"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(C){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(k){return k.__proto__||Object.getPrototypeOf(k)},p(C)}var g={},m,y;function _(C,w,k){k||(k=Error);function T(S,A,F){return typeof w=="string"?w:w(S,A,F)}var b=(function(S){n(F,S);var A=c(F);function F(D,R,P){var z;return l(this,F),z=A.call(this,T(D,R,P)),z.code=C,z}return i(F)})(k);g[C]=b}function v(C,w){if(Array.isArray(C)){var k=C.length;return C=C.map(function(T){return String(T)}),k>2?"one of ".concat(w," ").concat(C.slice(0,k-1).join(", "),", or ")+C[k-1]:k===2?"one of ".concat(w," ").concat(C[0]," or ").concat(C[1]):"of ".concat(w," ").concat(C[0])}else return"of ".concat(w," ").concat(String(C))}function x(C,w,k){return C.substr(!k||k<0?0:+k,w.length)===w}function E(C,w,k){return(k===void 0||k>C.length)&&(k=C.length),C.substring(k-w.length,k)===w}function M(C,w,k){return typeof k!="number"&&(k=0),k+w.length>C.length?!1:C.indexOf(w,k)!==-1}_("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),_("ERR_INVALID_ARG_TYPE",function(C,w,k){m===void 0&&(m=LT()),m(typeof C=="string","'name' must be a string");var T;typeof w=="string"&&x(w,"not ")?(T="must not be",w=w.replace(/^not /,"")):T="must be";var b;if(E(C," argument"))b="The ".concat(C," ").concat(T," ").concat(v(w,"type"));else{var S=M(C,".")?"property":"argument";b='The "'.concat(C,'" ').concat(S," ").concat(T," ").concat(v(w,"type"))}return b+=". Received type ".concat(t(k)),b},TypeError),_("ERR_INVALID_ARG_VALUE",function(C,w){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";y===void 0&&(y=Ly());var T=y.inspect(w);return T.length>128&&(T="".concat(T.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(k,". Received ").concat(T)},TypeError,RangeError),_("ERR_INVALID_RETURN_VALUE",function(C,w,k){var T;return k&&k.constructor&&k.constructor.name?T="instance of ".concat(k.constructor.name):T="type ".concat(t(k)),"Expected ".concat(C,' to be returned from the "').concat(w,'"')+" function but got ".concat(T,".")},TypeError),_("ERR_MISSING_ARGS",function(){for(var C=arguments.length,w=new Array(C),k=0;k0,"At least one arg needs to be specified");var T="The ",b=w.length;switch(w=w.map(function(S){return'"'.concat(S,'"')}),b){case 1:T+="".concat(w[0]," argument");break;case 2:T+="".concat(w[0]," and ").concat(w[1]," arguments");break;default:T+=w.slice(0,b-1).join(", "),T+=", and ".concat(w[b-1]," arguments");break}return"".concat(T," must be specified")},TypeError),r.exports.codes=g}}),Pie=ye({"node_modules/assert/build/internal/assert/assertion_error.js"(e,r){"use strict";function t(B,O){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);O&&($=$.filter(function(X){return Object.getOwnPropertyDescriptor(B,X).enumerable})),G.push.apply(G,$)}return G}function a(B){for(var O=1;O"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 y(B){return Function.toString.call(B).indexOf("[native code]")!==-1}function _(B,O){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function($,X){return $.__proto__=X,$},_(B,O)}function v(B){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},v(B)}function x(B){"@babel/helpers - typeof";return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},x(B)}var E=Ly(),M=E.inspect,C=WL(),w=C.codes.ERR_INVALID_ARG_TYPE;function k(B,O,G){return(G===void 0||G>B.length)&&(G=B.length),B.substring(G-O.length,G)===O}function T(B,O){if(O=Math.floor(O),B.length==0||O==0)return"";var G=B.length*O;for(O=Math.floor(Math.log(O)/Math.log(2));O;)B+=B,O--;return B+=B.substring(0,G-B.length),B}var b="",S="",A="",F="",D={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:"},R=10;function P(B){var O=Object.keys(B),G=Object.create(Object.getPrototypeOf(B));return O.forEach(function($){G[$]=B[$]}),Object.defineProperty(G,"message",{value:B.message}),G}function z(B){return M(B,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function I(B,O,G){var $="",X="",Z=0,J="",N=!1,H=z(B),W=H.split(` +`),U=z(O).split(` +`),V=0,j="";if(G==="strictEqual"&&x(B)==="object"&&x(O)==="object"&&B!==null&&O!==null&&(G="strictEqualObject"),W.length===1&&U.length===1&&W[0]!==U[0]){var q=W[0].length+U[0].length;if(q<=R){if((x(B)!=="object"||B===null)&&(x(O)!=="object"||O===null)&&(B!==0||O!==0))return"".concat(D[G],` + +`)+"".concat(W[0]," !== ").concat(U[0],` +`)}else if(G!=="strictEqualObject"){var Y=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(q2&&(j=` + `.concat(T(" ",V),"^"),V=0)}}}for(var K=W[W.length-1],re=U[U.length-1];K===re&&(V++<2?J=` + `.concat(K).concat(J):$=K,W.pop(),U.pop(),!(W.length===0||U.length===0));)K=W[W.length-1],re=U[U.length-1];var se=Math.max(W.length,U.length);if(se===0){var le=H.split(` +`);if(le.length>30)for(le[26]="".concat(b,"...").concat(F);le.length>27;)le.pop();return"".concat(D.notIdentical,` + +`).concat(le.join(` `),` -`)}Y>3&&(se=` -`.concat(u,"...").concat(z).concat(se),G=!0),Q!==""&&(se=` - `.concat(Q).concat(se),Q="");var Me=0,Se=I[$]+` -`.concat(A,"+ actual").concat(z," ").concat(x,"- expected").concat(z),Ie=" ".concat(u,"...").concat(z," Lines skipped");for(Y=0;Y1&&Y>2&&(Ve>4?(re+=` -`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` - `.concat(H[Y-2]),Me++),re+=` - `.concat(H[Y-1]),Me++),ne=Y,Q+=` -`.concat(x,"-").concat(z," ").concat(H[Y]),Me++;else if(H.length1&&Y>2&&(Ve>4?(re+=` -`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` - `.concat(K[Y-2]),Me++),re+=` - `.concat(K[Y-1]),Me++),ne=Y,re+=` -`.concat(A,"+").concat(z," ").concat(K[Y]),Me++;else{var Ge=H[Y],ke=K[Y],_e=ke!==Ge&&(!T(ke,",")||ke.slice(0,-1)!==Ge);_e&&T(Ge,",")&&Ge.slice(0,-1)===ke&&(_e=!1,ke+=","),_e?(Ve>1&&Y>2&&(Ve>4?(re+=` -`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` - `.concat(K[Y-2]),Me++),re+=` - `.concat(K[Y-1]),Me++),ne=Y,re+=` -`.concat(A,"+").concat(z," ").concat(ke),Q+=` -`.concat(x,"-").concat(z," ").concat(Ge),Me+=2):(re+=Q,Q="",(Ve===1||Y===0)&&(re+=` - `.concat(ke),Me++))}if(Me>20&&Y30)for(Z[26]="".concat(u,"...").concat(z);Z.length>27;)Z.pop();Z.length===1?ne=$.call(this,"".concat(q," ").concat(Z[0])):ne=$.call(this,"".concat(q,` - -`).concat(Z.join(` +`)}V>3&&(J=` +`.concat(b,"...").concat(F).concat(J),N=!0),$!==""&&(J=` + `.concat($).concat(J),$="");var ue=0,fe=D[G]+` +`.concat(S,"+ actual").concat(F," ").concat(A,"- expected").concat(F),pe=" ".concat(b,"...").concat(F," Lines skipped");for(V=0;V1&&V>2&&(we>4?(X+=` +`.concat(b,"...").concat(F),N=!0):we>3&&(X+=` + `.concat(U[V-2]),ue++),X+=` + `.concat(U[V-1]),ue++),Z=V,$+=` +`.concat(A,"-").concat(F," ").concat(U[V]),ue++;else if(U.length1&&V>2&&(we>4?(X+=` +`.concat(b,"...").concat(F),N=!0):we>3&&(X+=` + `.concat(W[V-2]),ue++),X+=` + `.concat(W[V-1]),ue++),Z=V,X+=` +`.concat(S,"+").concat(F," ").concat(W[V]),ue++;else{var xe=U[V],he=W[V],oe=he!==xe&&(!k(he,",")||he.slice(0,-1)!==xe);oe&&k(xe,",")&&xe.slice(0,-1)===he&&(oe=!1,he+=","),oe?(we>1&&V>2&&(we>4?(X+=` +`.concat(b,"...").concat(F),N=!0):we>3&&(X+=` + `.concat(W[V-2]),ue++),X+=` + `.concat(W[V-1]),ue++),Z=V,X+=` +`.concat(S,"+").concat(F," ").concat(he),$+=` +`.concat(A,"-").concat(F," ").concat(xe),ue+=2):(X+=$,$="",(we===1||V===0)&&(X+=` + `.concat(he),ue++))}if(ue>20&&V30)for(q[26]="".concat(b,"...").concat(F);q.length>27;)q.pop();q.length===1?Z=G.call(this,"".concat(j," ").concat(q[0])):Z=G.call(this,"".concat(j,` + +`).concat(q.join(` `),` -`))}else{var ee=B(K),ae="",he=I[G];G==="notDeepEqual"||G==="notEqual"?(ee="".concat(I[G],` +`))}else{var Y=z(W),K="",re=D[N];N==="notDeepEqual"||N==="notEqual"?(Y="".concat(D[N],` -`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(ae="".concat(B(H)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),ae.length>512&&(ae="".concat(ae.slice(0,509),"...")),G==="deepEqual"||G==="equal"?ee="".concat(he,` +`).concat(Y),Y.length>1024&&(Y="".concat(Y.slice(0,1021),"..."))):(K="".concat(z(U)),Y.length>512&&(Y="".concat(Y.slice(0,509),"...")),K.length>512&&(K="".concat(K.slice(0,509),"...")),N==="deepEqual"||N==="equal"?Y="".concat(re,` -`).concat(ee,` +`).concat(Y,` should equal -`):ae=" ".concat(G," ").concat(ae)),ne=$.call(this,"".concat(ee).concat(ae))}return Error.stackTraceLimit=Y,ne.generatedMessage=!se,Object.defineProperty(s(ne),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),ne.code="ERR_ASSERTION",ne.actual=K,ne.expected=H,ne.operator=G,Error.captureStackTrace&&Error.captureStackTrace(s(ne),X),ne.stack,ne.name="AssertionError",o(ne)}return e(Q,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:U,value:function(ne,se){return M(this,b(b({},se),{},{customInspect:!1,depth:0}))}}]),Q}(c(Error),M.custom);V.exports=P}}),ZT=ze({"node_modules/object-keys/isArguments.js"(J,V){"use strict";var p=Object.prototype.toString;V.exports=function(E){var k=p.call(E),l=k==="[object Arguments]";return l||(l=k!=="[object Array]"&&E!==null&&typeof E=="object"&&typeof E.length=="number"&&E.length>=0&&p.call(E.callee)==="[object Function]"),l}}}),RB=ze({"node_modules/object-keys/implementation.js"(J,V){"use strict";var p;Object.keys||(b=Object.prototype.hasOwnProperty,E=Object.prototype.toString,k=ZT(),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var m=c.constructor;return m&&m.prototype===c},a={$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},o=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!a["$"+c]&&b.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!o)return r(c);try{return r(c)}catch{return!1}},p=function(m){var h=m!==null&&typeof m=="object",v=E.call(m)==="[object Function]",g=k(m),i=h&&E.call(m)==="[object String]",w=[];if(!h&&!v&&!g)throw new TypeError("Object.keys called on a non-object");var S=t&&v;if(i&&m.length>0&&!b.call(m,0))for(var M=0;M0)for(var C=0;C-1?b(t):t}}}),P1=ze({"node_modules/define-properties/index.js"(J,V){"use strict";var p=$T(),b=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",E=Object.prototype.toString,k=Array.prototype.concat,l=zT(),e=function(a){return typeof a=="function"&&E.call(a)==="[object Function]"},t=BT()(),n=function(a,o,s,c){if(o in a){if(c===!0){if(a[o]===s)return}else if(!e(c)||!c())return}t?l(a,o,s,!0):l(a,o,s)},r=function(a,o){var s=arguments.length>2?arguments[2]:{},c=p(o);b&&(c=k.call(c,Object.getOwnPropertySymbols(o)));for(var m=0;mce.length)&&(ve=ce.length);for(var le=0,Ae=new Array(ve);le10)return!0;for(var ve=0;ve57)return!0}return ce.length===10&&ce>=Math.pow(2,32)}function P(ce){return Object.keys(ce).filter(F).concat(s(ce).filter(Object.prototype.propertyIsEnumerable.bind(ce)))}function j(ce,ve){if(ce===ve)return 0;for(var le=ce.length,Ae=ve.length,Be=0,Xe=Math.min(le,Ae);Be1?H-1:0),q=1;q1?H-1:0),q=1;q1?H-1:0),q=1;q1?H-1:0),q=1;q=0&&t.call(i.callee)==="[object Function]"),s}}}),Iie=ye({"node_modules/object-keys/implementation.js"(e,r){"use strict";var t;Object.keys||(a=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=$L(),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),n=s.call(function(){},"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(p){var g=p.constructor;return g&&g.prototype===p},f={$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},h=(function(){if(typeof window>"u")return!1;for(var p in window)try{if(!f["$"+p]&&a.call(window,p)&&window[p]!==null&&typeof window[p]=="object")try{c(window[p])}catch{return!0}}catch{return!0}return!1})(),d=function(p){if(typeof window>"u"||!h)return c(p);try{return c(p)}catch{return!1}},t=function(g){var m=g!==null&&typeof g=="object",y=i.call(g)==="[object Function]",_=o(g),v=m&&i.call(g)==="[object String]",x=[];if(!m&&!y&&!_)throw new TypeError("Object.keys called on a non-object");var E=n&&y;if(v&&g.length>0&&!a.call(g,0))for(var M=0;M0)for(var C=0;C-1?a(n):n}}}),mb=ye({"node_modules/define-properties/index.js"(e,r){"use strict";var t=YL(),a=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",i=Object.prototype.toString,o=Array.prototype.concat,s=IL(),l=function(f){return typeof f=="function"&&i.call(f)==="[object Function]"},n=RL()(),u=function(f,h,d,p){if(h in f){if(p===!0){if(f[h]===d)return}else if(!l(p)||!p())return}n?s(f,h,d,!0):s(f,h,d)},c=function(f,h){var d=arguments.length>2?arguments[2]:{},p=t(h);a&&(p=o.call(p,Object.getOwnPropertySymbols(h)));for(var g=0;gte.length)&&(ie=te.length);for(var ee=0,ce=new Array(ie);ee10)return!0;for(var ie=0;ie57)return!0}return te.length===10&&te>=Math.pow(2,32)}function L(te){return Object.keys(te).filter(I).concat(d(te).filter(Object.prototype.propertyIsEnumerable.bind(te)))}function B(te,ie){if(te===ie)return 0;for(var ee=te.length,ce=ie.length,_e=0,Se=Math.min(ee,ce);_e1?U-1:0),j=1;j1?U-1:0),j=1;j1?U-1:0),j=1;j1?U-1:0),j=1;j0)return e(a);if(s==="number"&&isNaN(a)===!1)return o.long?n(a):t(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function e(a){if(a=String(a),!(a.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(o){var s=parseFloat(o[1]),c=(o[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*l;case"days":case"day":case"d":return s*k;case"hours":case"hour":case"hrs":case"hr":case"h":return s*E;case"minutes":case"minute":case"mins":case"min":case"m":return s*b;case"seconds":case"second":case"secs":case"sec":case"s":return s*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function t(a){return a>=k?Math.round(a/k)+"d":a>=E?Math.round(a/E)+"h":a>=b?Math.round(a/b)+"m":a>=p?Math.round(a/p)+"s":a+"ms"}function n(a){return r(a,k,"day")||r(a,E,"hour")||r(a,b,"minute")||r(a,p,"second")||a+" ms"}function r(a,o,s){if(!(a=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}J.formatters.j=function(t){try{return JSON.stringify(t)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}};function b(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+J.humanize(this.diff),!!n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var a=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(a++,s==="%c"&&(o=a))}),t.splice(o,0,r)}}function E(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function k(t){try{t==null?J.storage.removeItem("debug"):J.storage.debug=t}catch{}}function l(){var t;try{t=J.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}J.enable(l());function e(){try{return window.localStorage}catch{}}}}),GB=ze({"node_modules/stream-parser/index.js"(J,V){var p=jb(),b=VB()("stream-parser");V.exports=t;var E=-1,k=0,l=1,e=2;function t(i){var w=i&&typeof i._transform=="function",S=i&&typeof i._write=="function";if(!w&&!S)throw new Error("must pass a Writable or Transform stream in");b("extending Parser into stream"),i._bytes=r,i._skipBytes=a,w&&(i._passthrough=o),w?i._transform=c:i._write=s}function n(i){b("initializing parser stream"),i._parserBytesLeft=0,i._parserBuffers=[],i._parserBuffered=0,i._parserState=E,i._parserCallback=null,typeof i.push=="function"&&(i._parserOutput=i.push.bind(i)),i._parserInit=!0}function r(i,w){p(!this._parserCallback,'there is already a "callback" set!'),p(isFinite(i)&&i>0,'can only buffer a finite number of bytes > 0, got "'+i+'"'),this._parserInit||n(this),b("buffering %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=k}function a(i,w){p(!this._parserCallback,'there is already a "callback" set!'),p(i>0,'can only skip > 0 bytes, got "'+i+'"'),this._parserInit||n(this),b("skipping %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=l}function o(i,w){p(!this._parserCallback,'There is already a "callback" set!'),p(i>0,'can only pass through > 0 bytes, got "'+i+'"'),this._parserInit||n(this),b("passing through %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=e}function s(i,w,S){this._parserInit||n(this),b("write(%o bytes)",i.length),typeof w=="function"&&(S=w),v(this,i,null,S)}function c(i,w,S){this._parserInit||n(this),b("transform(%o bytes)",i.length),typeof w!="function"&&(w=this._parserOutput),v(this,i,w,S)}function m(i,w,S,M){return i._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):w.length<=i._parserBytesLeft?function(){return h(i,w,S,M)}:function(){var C=w.slice(0,i._parserBytesLeft);return h(i,C,S,function(_){if(_)return M(_);if(w.length>C.length)return function(){return m(i,w.slice(C.length),S,M)}})}}function h(i,w,S,M){if(i._parserBytesLeft-=w.length,b("%o bytes left for stream piece",i._parserBytesLeft),i._parserState===k?(i._parserBuffers.push(w),i._parserBuffered+=w.length):i._parserState===e&&S(w),i._parserBytesLeft===0){var C=i._parserCallback;if(C&&i._parserState===k&&i._parserBuffers.length>1&&(w=Buffer.concat(i._parserBuffers,i._parserBuffered)),i._parserState!==k&&(w=null),i._parserCallback=null,i._parserBuffered=0,i._parserState=E,i._parserBuffers.splice(0),C){var _=[];w&&_.push(w),S&&_.push(S);var T=C.length>_.length;T&&_.push(g(M));var f=C.apply(i,_);if(!T||M===f)return M}}else return M}var v=g(m);function g(i){return function(){for(var w=i.apply(this,arguments);typeof w=="function";)w=w();return w}}}}),Ns=ze({"node_modules/probe-image-size/lib/common.js"(J){"use strict";var V=LB().Transform,p=GB();function b(){V.call(this,{readableObjectMode:!0})}b.prototype=Object.create(V.prototype),b.prototype.constructor=b,p(b.prototype),J.ParserStream=b,J.sliceEq=function(k,l,e){for(var t=l,n=0;n>16},J.readInt16BE=function(k,l){return J.readUInt16BE(k,l)<<16>>16},J.readUInt32LE=function(k,l){return(k[l]|k[l+1]<<8|k[l+2]<<16)+k[l+3]*16777216},J.readUInt32BE=function(k,l){return k[l]*16777216+(k[l+1]<<16|k[l+2]<<8|k[l+3])},J.readInt32LE=function(k,l){return J.readUInt32LE(k,l)|0},J.readInt32BE=function(k,l){return J.readUInt32BE(k,l)|0};function E(k,l,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=k,l&&(this.code=l),e&&(this.statusCode=e)}E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,J.ProbeError=E}}),HB=ze({"node_modules/probe-image-size/lib/miaf_utils.js"(J,V){"use strict";var p=Ns().readUInt16BE,b=Ns().readUInt32BE;function E(o,s){if(o.length<4+s)return null;var c=b(o,s);return o.length>4&15,m=o[4]&15,h=o[5]>>4&15,v=p(o,6),g=8,i=0;iv.width||h.width===v.width&&h.height>v.height?h:v}),c=o.reduce(function(h,v){return h.height>v.height||h.height===v.height&&h.width>v.width?h:v}),m;return s.width>c.height||s.width===c.height&&s.height>c.width?m=s:m=c,m}V.exports.readSizeFromMeta=function(o){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(o,s),!!s.sizes.length){var c=a(s.sizes),m=1;s.transforms.forEach(function(v){var g={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},i={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?m=i[m]:(m=i[m],m=g[m],m=g[m])),v.type==="irot")for(var w=0;w0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,k)}},E.prototype.read_uint16=function(k){var l=this.input;if(k+2>l.length)throw p("unexpected EOF","EBADDATA");return this.big_endian?l[k]*256+l[k+1]:l[k]+l[k+1]*256},E.prototype.read_uint32=function(k){var l=this.input;if(k+4>l.length)throw p("unexpected EOF","EBADDATA");return this.big_endian?l[k]*16777216+l[k+1]*65536+l[k+2]*256+l[k+3]:l[k]+l[k+1]*256+l[k+2]*65536+l[k+3]*16777216},E.prototype.is_subifd_link=function(k,l){return k===0&&l===34665||k===0&&l===34853||k===34665&&l===40965},E.prototype.exif_format_length=function(k){switch(k){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}},E.prototype.exif_format_read=function(k,l){var e;switch(k){case 1:case 2:return e=this.input[l],e;case 6:return e=this.input[l],e|(e&128)*33554430;case 3:return e=this.read_uint16(l),e;case 8:return e=this.read_uint16(l),e|(e&32768)*131070;case 4:return e=this.read_uint32(l),e;case 9:return e=this.read_uint32(l),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},E.prototype.scan_ifd=function(k,l,e){var t=this.read_uint16(l);l+=2;for(var n=0;nthis.input.length)throw p("unexpected EOF","EBADDATA");for(var v=[],g=m,i=0;i0&&(this.ifds_to_read.push({id:r,offset:v[0]}),h=!0);var S={is_big_endian:this.big_endian,ifd:k,tag:r,format:a,count:o,entry_offset:l+this.start,data_length:c,data_offset:m+this.start,value:v,is_subifd_link:h};if(e(S)===!1){this.aborted=!0;return}l+=12}k===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},V.exports.ExifParser=E,V.exports.get_orientation=function(k){var l=0;try{return new E(k,0,k.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return l=e.value[0],!1}),l}catch{return-1}}}}),WB=ze({"node_modules/probe-image-size/lib/parse_sync/avif.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=HB(),l=Ub(),e=p("ftyp");V.exports=function(t){if(b(t,4,e)){var n=k.unbox(t,0);if(n){var r=k.getMimeType(n.data);if(r){for(var a,o=n.end;;){var s=k.unbox(t,o);if(!s)break;if(o=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){a=s.data;break}}if(a){var c=k.readSizeFromMeta(a);if(c){var m={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(m.variants=c.variants),c.orientation&&(m.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=t.length){var h=E(t,c.exif_location.offset),v=t.slice(c.exif_location.offset+h+4,c.exif_location.offset+c.exif_location.length),g=l.get_orientation(v);g>0&&(m.orientation=g)}return m}}}}}}}}),YB=ze({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readInt16LE,k=Ns().readInt32LE,l=Ns().readUInt32LE,e=p("BM");V.exports=function(t){if(!(t.length<26)&&b(t,0,e)){var n,r,a=l(t,14);if(a===12)r=E(t,18),n=E(t,20);else if(a>12)r=k(t,18),n=k(t,22);else return;return{width:r,height:Math.abs(n),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),XB=ze({"node_modules/probe-image-size/lib/parse_sync/gif.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt16LE,k=p("GIF87a"),l=p("GIF89a");V.exports=function(e){if(!(e.length<10)&&!(!b(e,0,k)&&!b(e,0,l)))return{width:E(e,6),height:E(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),ZB=ze({"node_modules/probe-image-size/lib/parse_sync/ico.js"(J,V){"use strict";var p=Ns().readUInt16LE,b=0,E=1,k=16;V.exports=function(l){var e=p(l,0),t=p(l,2),n=p(l,4);if(!(e!==b||t!==E||!n)&&!(l.length<6+n*k)){for(var r=[],a={width:0,height:0},o=0;oa.width||c>a.height)&&(a=m)}return{width:a.width,height:a.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),$B=ze({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(J,V){"use strict";var p=Ns().readUInt16BE,b=Ns().str2arr,E=Ns().sliceEq,k=Ub(),l=b("Exif\0\0");V.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var n=e[t++],r;n===255;)n=e[t++];if(n>=208&&n<=217||n===1)r=0;else if(n>=192&&n<=254){if(e.length-t<2)return;r=p(e,t)-2,t+=2}else return;if(n===217||n===218)return;var a;if(n===225&&r>=10&&E(e,t,l)&&(a=k.get_orientation(e.slice(t+6,t+r))),r>=5&&n>=192&&n<=207&&n!==196&&n!==200&&n!==204){if(e.length-t0&&(o.orientation=a),o}t+=r}}}}),KB=ze({"node_modules/probe-image-size/lib/parse_sync/png.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=p(`\x89PNG\r +`).concat(y(H),` +`));var K=new g({actual:H,expected:W,message:U,operator:j,stackStartFn:V});throw K.generatedMessage=Y,K}}S.match=function H(W,U,V){J(W,U,V,H,"match")},S.doesNotMatch=function H(W,U,V){J(W,U,V,H,"doesNotMatch")};function N(){for(var H=arguments.length,W=new Array(H),U=0;U0)return l(f);if(d==="number"&&isNaN(f)===!1)return h.long?u(f):n(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))};function l(f){if(f=String(f),!(f.length>100)){var h=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(f);if(h){var d=parseFloat(h[1]),p=(h[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return d*s;case"days":case"day":case"d":return d*o;case"hours":case"hour":case"hrs":case"hr":case"h":return d*i;case"minutes":case"minute":case"mins":case"min":case"m":return d*a;case"seconds":case"second":case"secs":case"sec":case"s":return d*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function n(f){return f>=o?Math.round(f/o)+"d":f>=i?Math.round(f/i)+"h":f>=a?Math.round(f/a)+"m":f>=t?Math.round(f/t)+"s":f+"ms"}function u(f){return c(f,o,"day")||c(f,i,"hour")||c(f,a,"minute")||c(f,t,"second")||f+" ms"}function c(f,h,d){if(!(f=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}e.formatters.j=function(n){try{return JSON.stringify(n)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}};function a(n){var u=this.useColors;if(n[0]=(u?"%c":"")+this.namespace+(u?" %c":" ")+n[0]+(u?"%c ":" ")+"+"+e.humanize(this.diff),!!u){var c="color: "+this.color;n.splice(1,0,c,"color: inherit");var f=0,h=0;n[0].replace(/%[a-zA-Z%]/g,function(d){d!=="%%"&&(f++,d==="%c"&&(h=f))}),n.splice(h,0,c)}}function i(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(n){try{n==null?e.storage.removeItem("debug"):e.storage.debug=n}catch{}}function s(){var n;try{n=e.storage.debug}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}e.enable(s());function l(){try{return window.localStorage}catch{}}}}),Wie=ye({"node_modules/stream-parser/index.js"(e,r){var t=LT(),a=Hie()("stream-parser");r.exports=n;var i=-1,o=0,s=1,l=2;function n(v){var x=v&&typeof v._transform=="function",E=v&&typeof v._write=="function";if(!x&&!E)throw new Error("must pass a Writable or Transform stream in");a("extending Parser into stream"),v._bytes=c,v._skipBytes=f,x&&(v._passthrough=h),x?v._transform=p:v._write=d}function u(v){a("initializing parser stream"),v._parserBytesLeft=0,v._parserBuffers=[],v._parserBuffered=0,v._parserState=i,v._parserCallback=null,typeof v.push=="function"&&(v._parserOutput=v.push.bind(v)),v._parserInit=!0}function c(v,x){t(!this._parserCallback,'there is already a "callback" set!'),t(isFinite(v)&&v>0,'can only buffer a finite number of bytes > 0, got "'+v+'"'),this._parserInit||u(this),a("buffering %o bytes",v),this._parserBytesLeft=v,this._parserCallback=x,this._parserState=o}function f(v,x){t(!this._parserCallback,'there is already a "callback" set!'),t(v>0,'can only skip > 0 bytes, got "'+v+'"'),this._parserInit||u(this),a("skipping %o bytes",v),this._parserBytesLeft=v,this._parserCallback=x,this._parserState=s}function h(v,x){t(!this._parserCallback,'There is already a "callback" set!'),t(v>0,'can only pass through > 0 bytes, got "'+v+'"'),this._parserInit||u(this),a("passing through %o bytes",v),this._parserBytesLeft=v,this._parserCallback=x,this._parserState=l}function d(v,x,E){this._parserInit||u(this),a("write(%o bytes)",v.length),typeof x=="function"&&(E=x),y(this,v,null,E)}function p(v,x,E){this._parserInit||u(this),a("transform(%o bytes)",v.length),typeof x!="function"&&(x=this._parserOutput),y(this,v,x,E)}function g(v,x,E,M){return v._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):x.length<=v._parserBytesLeft?function(){return m(v,x,E,M)}:function(){var C=x.slice(0,v._parserBytesLeft);return m(v,C,E,function(w){if(w)return M(w);if(x.length>C.length)return function(){return g(v,x.slice(C.length),E,M)}})}}function m(v,x,E,M){if(v._parserBytesLeft-=x.length,a("%o bytes left for stream piece",v._parserBytesLeft),v._parserState===o?(v._parserBuffers.push(x),v._parserBuffered+=x.length):v._parserState===l&&E(x),v._parserBytesLeft===0){var C=v._parserCallback;if(C&&v._parserState===o&&v._parserBuffers.length>1&&(x=Buffer.concat(v._parserBuffers,v._parserBuffered)),v._parserState!==o&&(x=null),v._parserCallback=null,v._parserBuffered=0,v._parserState=i,v._parserBuffers.splice(0),C){var w=[];x&&w.push(x),E&&w.push(E);var k=C.length>w.length;k&&w.push(_(M));var T=C.apply(v,w);if(!k||M===T)return M}}else return M}var y=_(g);function _(v){return function(){for(var x=v.apply(this,arguments);typeof x=="function";)x=x();return x}}}}),Zo=ye({"node_modules/probe-image-size/lib/common.js"(e){"use strict";var r=Fie().Transform,t=Wie();function a(){r.call(this,{readableObjectMode:!0})}a.prototype=Object.create(r.prototype),a.prototype.constructor=a,t(a.prototype),e.ParserStream=a,e.sliceEq=function(o,s,l){for(var n=s,u=0;u>16},e.readInt16BE=function(o,s){return e.readUInt16BE(o,s)<<16>>16},e.readUInt32LE=function(o,s){return(o[s]|o[s+1]<<8|o[s+2]<<16)+o[s+3]*16777216},e.readUInt32BE=function(o,s){return o[s]*16777216+(o[s+1]<<16|o[s+2]<<8|o[s+3])},e.readInt32LE=function(o,s){return e.readUInt32LE(o,s)|0},e.readInt32BE=function(o,s){return e.readUInt32BE(o,s)|0};function i(o,s,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=o,s&&(this.code=s),l&&(this.statusCode=l)}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,e.ProbeError=i}}),$ie=ye({"node_modules/probe-image-size/lib/miaf_utils.js"(e,r){"use strict";var t=Zo().readUInt16BE,a=Zo().readUInt32BE;function i(h,d){if(h.length<4+d)return null;var p=a(h,d);return h.length>4&15,g=h[4]&15,m=h[5]>>4&15,y=t(h,6),_=8,v=0;vy.width||m.width===y.width&&m.height>y.height?m:y}),p=h.reduce(function(m,y){return m.height>y.height||m.height===y.height&&m.width>y.width?m:y}),g;return d.width>p.height||d.width===p.height&&d.height>p.width?g=d:g=p,g}r.exports.readSizeFromMeta=function(h){var d={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(c(h,d),!!d.sizes.length){var p=f(d.sizes),g=1;d.transforms.forEach(function(y){var _={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},v={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(y.type==="imir"&&(y.value===0?g=v[g]:(g=v[g],g=_[g],g=_[g])),y.type==="irot")for(var x=0;x0&&!this.aborted;){var l=this.ifds_to_read.shift();l.offset&&this.scan_ifd(l.id,l.offset,o)}},i.prototype.read_uint16=function(o){var s=this.input;if(o+2>s.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?s[o]*256+s[o+1]:s[o]+s[o+1]*256},i.prototype.read_uint32=function(o){var s=this.input;if(o+4>s.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?s[o]*16777216+s[o+1]*65536+s[o+2]*256+s[o+3]:s[o]+s[o+1]*256+s[o+2]*65536+s[o+3]*16777216},i.prototype.is_subifd_link=function(o,s){return o===0&&s===34665||o===0&&s===34853||o===34665&&s===40965},i.prototype.exif_format_length=function(o){switch(o){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}},i.prototype.exif_format_read=function(o,s){var l;switch(o){case 1:case 2:return l=this.input[s],l;case 6:return l=this.input[s],l|(l&128)*33554430;case 3:return l=this.read_uint16(s),l;case 8:return l=this.read_uint16(s),l|(l&32768)*131070;case 4:return l=this.read_uint32(s),l;case 9:return l=this.read_uint32(s),l|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},i.prototype.scan_ifd=function(o,s,l){var n=this.read_uint16(s);s+=2;for(var u=0;uthis.input.length)throw t("unexpected EOF","EBADDATA");for(var y=[],_=g,v=0;v0&&(this.ifds_to_read.push({id:c,offset:y[0]}),m=!0);var E={is_big_endian:this.big_endian,ifd:o,tag:c,format:f,count:h,entry_offset:s+this.start,data_length:p,data_offset:g+this.start,value:y,is_subifd_link:m};if(l(E)===!1){this.aborted=!0;return}s+=12}o===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(s)})},r.exports.ExifParser=i,r.exports.get_orientation=function(o){var s=0;try{return new i(o,0,o.length).each(function(l){if(l.ifd===0&&l.tag===274&&Array.isArray(l.value))return s=l.value[0],!1}),s}catch{return-1}}}}),Yie=ye({"node_modules/probe-image-size/lib/parse_sync/avif.js"(e,r){"use strict";var t=Zo().str2arr,a=Zo().sliceEq,i=Zo().readUInt32BE,o=$ie(),s=FT(),l=t("ftyp");r.exports=function(n){if(a(n,4,l)){var u=o.unbox(n,0);if(u){var c=o.getMimeType(u.data);if(c){for(var f,h=u.end;;){var d=o.unbox(n,h);if(!d)break;if(h=d.end,d.boxtype==="mdat")return;if(d.boxtype==="meta"){f=d.data;break}}if(f){var p=o.readSizeFromMeta(f);if(p){var g={width:p.width,height:p.height,type:c.type,mime:c.mime,wUnits:"px",hUnits:"px"};if(p.variants.length>1&&(g.variants=p.variants),p.orientation&&(g.orientation=p.orientation),p.exif_location&&p.exif_location.offset+p.exif_location.length<=n.length){var m=i(n,p.exif_location.offset),y=n.slice(p.exif_location.offset+m+4,p.exif_location.offset+p.exif_location.length),_=s.get_orientation(y);_>0&&(g.orientation=_)}return g}}}}}}}}),Xie=ye({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(e,r){"use strict";var t=Zo().str2arr,a=Zo().sliceEq,i=Zo().readInt16LE,o=Zo().readInt32LE,s=Zo().readUInt32LE,l=t("BM");r.exports=function(n){if(!(n.length<26)&&a(n,0,l)){var u,c,f=s(n,14);if(f===12)c=i(n,18),u=i(n,20);else if(f>12)c=o(n,18),u=o(n,22);else return;return{width:c,height:Math.abs(u),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),Zie=ye({"node_modules/probe-image-size/lib/parse_sync/gif.js"(e,r){"use strict";var t=Zo().str2arr,a=Zo().sliceEq,i=Zo().readUInt16LE,o=t("GIF87a"),s=t("GIF89a");r.exports=function(l){if(!(l.length<10)&&!(!a(l,0,o)&&!a(l,0,s)))return{width:i(l,6),height:i(l,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),Kie=ye({"node_modules/probe-image-size/lib/parse_sync/ico.js"(e,r){"use strict";var t=Zo().readUInt16LE,a=0,i=1,o=16;r.exports=function(s){var l=t(s,0),n=t(s,2),u=t(s,4);if(!(l!==a||n!==i||!u)&&!(s.length<6+u*o)){for(var c=[],f={width:0,height:0},h=0;hf.width||p>f.height)&&(f=g)}return{width:f.width,height:f.height,variants:c,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),Jie=ye({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(e,r){"use strict";var t=Zo().readUInt16BE,a=Zo().str2arr,i=Zo().sliceEq,o=FT(),s=a("Exif\0\0");r.exports=function(l){if(!(l.length<2)&&!(l[0]!==255||l[1]!==216||l[2]!==255))for(var n=2;;){for(;;){if(l.length-n<2)return;if(l[n++]===255)break}for(var u=l[n++],c;u===255;)u=l[n++];if(u>=208&&u<=217||u===1)c=0;else if(u>=192&&u<=254){if(l.length-n<2)return;c=t(l,n)-2,n+=2}else return;if(u===217||u===218)return;var f;if(u===225&&c>=10&&i(l,n,s)&&(f=o.get_orientation(l.slice(n+6,n+c))),c>=5&&u>=192&&u<=207&&u!==196&&u!==200&&u!==204){if(l.length-n0&&(h.orientation=f),h}n+=c}}}}),Qie=ye({"node_modules/probe-image-size/lib/parse_sync/png.js"(e,r){"use strict";var t=Zo().str2arr,a=Zo().sliceEq,i=Zo().readUInt32BE,o=t(`\x89PNG\r  -`),l=p("IHDR");V.exports=function(e){if(!(e.length<24)&&b(e,0,k)&&b(e,12,l))return{width:E(e,16),height:E(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),JB=ze({"node_modules/probe-image-size/lib/parse_sync/psd.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=p("8BPS\0");V.exports=function(l){if(!(l.length<22)&&b(l,0,k))return{width:E(l,18),height:E(l,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),QB=ze({"node_modules/probe-image-size/lib/parse_sync/svg.js"(J,V){"use strict";function p(s){return s===32||s===9||s===13||s===10}function b(s){return typeof s=="number"&&isFinite(s)&&s>0}function E(s){var c=0,m=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,n=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,r=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function a(s){var c=s.match(e),m=s.match(t),h=s.match(n);return{width:c&&(c[1]||c[2]),height:m&&(m[1]||m[2]),viewbox:h&&(h[1]||h[2])}}function o(s){return r.test(s)?s.match(r)[0]:"px"}V.exports=function(s){if(E(s)){for(var c="",m=0;m>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function a(o,s){return{width:(o[s+6]<<16|o[s+5]<<8|o[s+4])+1,height:(o[s+9]<<16|o[s+8]<<8|o[s+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}V.exports=function(o){if(!(o.length<16)&&!(!b(o,0,e)||!b(o,8,t))){var s=12,c=null,m=0,h=k(o,4)+8;if(!(h>o.length)){for(;s+8=10?c=c||n(o,s+8):v==="VP8L"&&g>=5?c=c||r(o,s+8):v==="VP8X"&&g>=10?c=c||a(o,s+8):v==="EXIF"&&(m=l.get_orientation(o.slice(s+8,s+8+g)),s=1/0),s+=8+g}if(c)return m>0&&(c.orientation=m),c}}}}}),rO=ze({"node_modules/probe-image-size/lib/parsers_sync.js"(J,V){"use strict";V.exports={avif:WB(),bmp:YB(),gif:XB(),ico:ZB(),jpeg:$B(),png:KB(),psd:JB(),svg:QB(),tiff:eO(),webp:tO()}}}),aO=ze({"node_modules/probe-image-size/sync.js"(J,V){"use strict";var p=rO();function b(E){for(var k=Object.keys(p),l=0;l0&&e.height>0?e:null}return null}V.exports=function(k){return b(k)},V.exports.parsers=p}}),nO=ze({"src/traces/image/helpers.js"(J){"use strict";var V=aO(),p=ip().IMAGE_URL_PREFIX,b=$v().Buffer;J.getImageSize=function(E){var k=E.replace(p,""),l=new b(k,"base64");return V(l)}}}),iO=ze({"src/traces/image/calc.js"(J,V){"use strict";var p=Nr(),b=ig(),E=ao(),k=Gi(),l=Nr().maxRowLength,e=nO().getImageSize;V.exports=function(o,s){var c,m;if(s._hasZ)c=s.z.length,m=l(s.z);else if(s._hasSource){var h=e(s.source);c=h.height,m=h.width}var v=k.getFromId(o,s.xaxis||"x"),g=k.getFromId(o,s.yaxis||"y"),i=v.d2c(s.x0)-s.dx/2,w=g.d2c(s.y0)-s.dy/2,S,M=[i,i+m*s.dx],C=[w,w+c*s.dy];if(v&&v.type==="log")for(S=0;S0;)z=c.c2p(C+B*u),B--;for(B=0;O===void 0&&B0;)D=m.c2p(_+B*A),B--;if(zG[0];if(X||K){var H=x+P/2,Y=O+j/2;ne+="transform:"+E(H+"px",Y+"px")+"scale("+(X?-1:1)+","+(K?-1:1)+")"+E(-H+"px",-Y+"px")+";"}}re.attr("style",ne);var q=new Promise(function(Z){if(w._hasZ)Z();else if(w._hasSource)if(w._canvas&&w._canvas.el.width===T&&w._canvas.el.height===f&&w._canvas.source===w.source)Z();else{var ee=document.createElement("canvas");ee.width=T,ee.height=f;var ae=ee.getContext("2d",{willReadFrequently:!0});w._image=w._image||new Image;var he=w._image;he.onload=function(){ae.drawImage(he,0,0),w._canvas={el:ee,source:w.source},Z()},he.setAttribute("src",w.source)}}).then(function(){var Z,ee;if(w._hasZ)ee=Q(function(xe,we){var Me=M[we][xe];return b.isTypedArray(Me)&&(Me=Array.from(Me)),Me}),Z=ee.toDataURL("image/png");else if(w._hasSource)if(S)Z=w.source;else{var ae=w._canvas.el.getContext("2d",{willReadFrequently:!0}),he=ae.getImageData(0,0,T,f).data;ee=Q(function(xe,we){var Me=4*(we*T+xe);return[he[Me],he[Me+1],he[Me+2],he[Me+3]]}),Z=ee.toDataURL("image/png")}re.attr({"xlink:href":Z,height:j,width:P,x,y:O})});r._promises.push(q)})}}}),sO=ze({"src/traces/image/style.js"(J,V){"use strict";var p=ci();V.exports=function(E){p.select(E).selectAll(".im image").style("opacity",function(k){return k[0].trace.opacity})}}}),lO=ze({"src/traces/image/hover.js"(J,V){"use strict";var p=Zl(),b=Nr(),E=b.isArrayOrTypedArray,k=ig();V.exports=function(e,t,n){var r=e.cd[0],a=r.trace,o=e.xa,s=e.ya;if(!(p.inbox(t-r.x0,t-(r.x0+r.w*a.dx),0)>0||p.inbox(n-r.y0,n-(r.y0+r.h*a.dy),0)>0)){var c=Math.floor((t-r.x0)/a.dx),m=Math.floor(Math.abs(n-r.y0)/a.dy),h;if(a._hasZ?h=r.z[m][c]:a._hasSource&&(h=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,m,1,1).data),!!h){var v=r.hi||a.hoverinfo,g;if(v){var i=v.split("+");i.indexOf("all")!==-1&&(i=["color"]),i.indexOf("color")!==-1&&(g=!0)}var w=k.colormodel[a.colormodel],S=w.colormodel||a.colormodel,M=S.length,C=a._scaler(h),_=w.suffix,T=[];(a.hovertemplate||g)&&(T.push("["+[C[0]+_[0],C[1]+_[1],C[2]+_[2]].join(", ")),M===4&&T.push(", "+C[3]+_[3]),T.push("]"),T=T.join(""),e.extraText=S.toUpperCase()+": "+T);var f;E(a.hovertext)&&E(a.hovertext[m])?f=a.hovertext[m][c]:E(a.text)&&E(a.text[m])&&(f=a.text[m][c]);var u=s.c2p(r.y0+(m+.5)*a.dy),A=r.x0+(c+.5)*a.dx,x=r.y0+(m+.5)*a.dy,z="["+h.slice(0,a.colormodel.length).join(", ")+"]";return[b.extendFlat(e,{index:[m,c],x0:o.c2p(r.x0+c*a.dx),x1:o.c2p(r.x0+(c+1)*a.dx),y0:u,y1:u,color:C,xVal:A,xLabelVal:A,yVal:x,yLabelVal:x,zLabelVal:z,text:f,hovertemplateLabels:{zLabel:z,colorLabel:T,"color[0]Label":C[0]+_[0],"color[1]Label":C[1]+_[1],"color[2]Label":C[2]+_[2],"color[3]Label":C[3]+_[3]}})]}}}}}),uO=ze({"src/traces/image/event_data.js"(J,V){"use strict";V.exports=function(b,E){return"xVal"in E&&(b.x=E.xVal),"yVal"in E&&(b.y=E.yVal),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b.color=E.color,b.colormodel=E.trace.colormodel,b.z||(b.z=E.color),b}}}),cO=ze({"src/traces/image/index.js"(J,V){"use strict";V.exports={attributes:(CT(),Po(Sb)).default,supplyDefaults:Gz(),calc:iO(),plot:oO(),style:sO(),hoverPoints:lO(),eventData:uO(),moduleType:"trace",name:"image",basePlotModule:Du(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),fO=ze({"lib/image.js"(J,V){"use strict";V.exports=cO()}}),t0=ze({"src/traces/pie/attributes.js"(J,V){"use strict";var p=ws(),b=Ml().attributes,E=Qs(),k=fc(),{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Ki().extendFlat,r=Uc().pattern,a=E({editType:"plot",arrayOk:!0,colorEditType:"plot"});V.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:k.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,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:n({},p.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:t(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:t({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:n({},a,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:n({},a,{}),outsidetextfont:n({},a,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:n({},p.showlegend,{arrayOk:!0}),legend:n({},p.legend,{arrayOk:!0}),legendrank:n({},p.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:n({},a,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:b({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"}}}}),r0=ze({"src/traces/pie/defaults.js"(J,V){"use strict";var p=ao(),b=Nr(),E=t0(),k=Ml().defaults,l=qh().handleText,e=Nr().coercePattern;function t(a,o){var s=b.isArrayOrTypedArray(a),c=b.isArrayOrTypedArray(o),m=Math.min(s?a.length:1/0,c?o.length:1/0);if(isFinite(m)||(m=0),m&&c){for(var h,v=0;v0){h=!0;break}}h||(m=0)}return{hasLabels:s,hasValues:c,len:m}}function n(a,o,s,c,m){var h=c("marker.line.width");h&&c("marker.line.color",m?void 0:s.paper_bgcolor);var v=c("marker.colors");e(c,"marker.pattern",v),a.marker&&!o.marker.pattern.fgcolor&&(o.marker.pattern.fgcolor=a.marker.colors),o.marker.pattern.bgcolor||(o.marker.pattern.bgcolor=s.paper_bgcolor)}function r(a,o,s,c){function m(x,z){return b.coerce(a,o,E,x,z)}var h=m("labels"),v=m("values"),g=t(h,v),i=g.len;if(o._hasLabels=g.hasLabels,o._hasValues=g.hasValues,!o._hasLabels&&o._hasValues&&(m("label0"),m("dlabel")),!i){o.visible=!1;return}o._length=i,n(a,o,c,m,!0),m("scalegroup");var w=m("text"),S=m("texttemplate");m("texttemplatefallback");var M;if(S||(M=m("textinfo",b.isArrayOrTypedArray(w)?"text+percent":"percent")),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),S||M&&M!=="none"){var C=m("textposition");l(a,o,c,m,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(C)||C==="auto",T=_||C==="outside";T&&m("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&m("insidetextorientation")}else M==="none"&&m("textposition","none");k(o,c,m);var f=m("hole"),u=m("title.text");if(u){var A=m("title.position",f?"middle center":"top center");!f&&A==="middle center"&&(o.title.position="top center"),b.coerceFont(m,"title.font",c.font)}m("sort"),m("direction"),m("rotation"),m("pull")}V.exports={handleLabelsAndValues:t,handleMarkerDefaults:n,supplyDefaults:r}}}),qb=ze({"src/traces/pie/layout_attributes.js"(J,V){"use strict";V.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),hO=ze({"src/traces/pie/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=qb();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("hiddenlabels"),e("piecolorway",l.colorway),e("extendpiecolors")}}}),ug=ze({"src/traces/pie/calc.js"(J,V){"use strict";var p=ao(),b=Qn(),E={};function k(n,r){var a=[],o=n._fullLayout,s=o.hiddenlabels||[],c=r.labels,m=r.marker.colors||[],h=r.values,v=r._length,g=r._hasValues&&v,i,w;if(r.dlabel)for(c=new Array(v),i=0;i=0});var x=r.type==="funnelarea"?_:r.sort;return x&&a.sort(function(z,I){return I.v-z.v}),a[0]&&(a[0].vTotal=C),a}function l(n){return function(a,o){if(!a||!b.isValid(a))return!1;let s=b.rgbaString(a);return n[o]||(n[o]=s),s}}function e(n,r){var a=(r||{}).type;a||(a="pie");var o=n._fullLayout,s=n.calcdata,c=o[a+"colorway"],m=o["_"+a+"colormap"];o["extend"+a+"colors"]&&(c=t(c,E));for(var h=0,v=0;v0&&(Be+=gt*le.pxmid[0],Xe+=gt*le.pxmid[1])}le.cxFinal=Be,le.cyFinal=Xe;function Tt(Ot,vt,ht,De){var Ne=De*(vt[0]-Ot[0]),We=De*(vt[1]-Ot[1]);return"a"+De*he.r+","+De*he.r+" 0 "+le.largeArc+(ht?" 1 ":" 0 ")+Ne+","+We}var At=xe.hole;if(le.v===he.vTotal){var $t="M"+(Be+le.px0[0])+","+(Xe+le.px0[1])+Tt(le.px0,le.pxmid,!0,1)+Tt(le.pxmid,le.px0,!0,1)+"Z";At?yt.attr("d","M"+(Be+At*le.px0[0])+","+(Xe+At*le.px0[1])+Tt(le.px0,le.pxmid,!1,At)+Tt(le.pxmid,le.px0,!1,At)+"Z"+$t):yt.attr("d",$t)}else{var rr=Tt(le.px0,le.px1,!0,1);if(At){var _r=1-At;yt.attr("d","M"+(Be+At*le.px1[0])+","+(Xe+At*le.px1[1])+Tt(le.px1,le.px0,!1,At)+"l"+_r*le.px0[0]+","+_r*le.px0[1]+rr+"Z")}else yt.attr("d","M"+Be+","+Xe+"l"+le.px0[0]+","+le.px0[1]+rr+"Z")}se(X,le,he);var Xt=m.castOption(xe.textposition,le.pts),or=Ye.selectAll("g.slicetext").data(le.text&&Xt!=="none"?[0]:[]);or.enter().append("g").classed("slicetext",!0),or.exit().remove(),or.each(function(){var Ot=e.ensureSingle(p.select(this),"text","",function(et){et.attr("data-notex",1)}),vt=e.ensureUniformFontSize(X,Xt==="outside"?S(xe,le,Y.font):M(xe,le,Y.font));Ot.text(le.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,vt).call(r.convertToTspans,X);var ht=l.bBox(Ot.node()),De;if(Xt==="outside")De=O(ht,le);else if(De=_(ht,le,he),Xt==="auto"&&De.scale<1){var Ne=e.ensureUniformFontSize(X,xe.outsidetextfont);Ot.call(l.font,Ne),ht=l.bBox(Ot.node()),De=O(ht,le)}var We=De.textPosAngle,Ke=We===void 0?le.pxmid:ne(he.r,We);if(De.targetX=Be+Ke[0]*De.rCenter+(De.x||0),De.targetY=Xe+Ke[1]*De.rCenter+(De.y||0),G(De,ht),De.outside){var Je=De.targetY;le.yLabelMin=Je-ht.height/2,le.yLabelMid=Je,le.yLabelMax=Je+ht.height/2,le.labelExtraX=0,le.labelExtraY=0,Se=!0}De.fontSize=vt.size,o(xe.type,De,Y),ee[Ae].transform=De,e.setTransormAndDisplay(Ot,De)})});var Ie=p.select(this).selectAll("g.titletext").data(xe.title.text?[0]:[]);if(Ie.enter().append("g").classed("titletext",!0),Ie.exit().remove(),Ie.each(function(){var le=e.ensureSingle(p.select(this),"text","",function(Xe){Xe.attr("data-notex",1)}),Ae=xe.title.text;xe._meta&&(Ae=e.templateString(Ae,xe._meta)),le.text(Ae).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,xe.title.font).call(r.convertToTspans,X);var Be;xe.title.position==="middle center"?Be=D(he):Be=B(he,q),le.attr("transform",n(Be.x,Be.y)+t(Math.min(1,Be.scale))+n(Be.tx,Be.ty))}),Se&&U(Me,xe),i(we,xe),Se&&xe.automargin){var Ve=l.bBox(ae.node()),Ge=xe.domain,ke=q.w*(Ge.x[1]-Ge.x[0]),_e=q.h*(Ge.y[1]-Ge.y[0]),ce=(.5*ke-he.r)/q.w,ve=(.5*_e-he.r)/q.h;b.autoMargin(X,"pie."+xe.uid+".automargin",{xl:Ge.x[0]-ce,xr:Ge.x[1]+ce,yb:Ge.y[0]-ve,yt:Ge.y[1]+ve,l:Math.max(he.cx-he.r-Ve.left,0),r:Math.max(Ve.right-(he.cx+he.r),0),b:Math.max(Ve.bottom-(he.cy+he.r),0),t:Math.max(he.cy-he.r-Ve.top,0),pad:5})}})});setTimeout(function(){Z.selectAll("tspan").each(function(){var ee=p.select(this);ee.attr("dy")&&ee.attr("dy",ee.attr("dy"))})},0)}function i(X,K){X.each(function(H){var Y=p.select(this);if(!H.labelExtraX&&!H.labelExtraY){Y.select("path.textline").remove();return}var q=Y.select("g.slicetext text");H.transform.targetX+=H.labelExtraX,H.transform.targetY+=H.labelExtraY,e.setTransormAndDisplay(q,H.transform);var Z=H.cxFinal+H.pxmid[0],ee=H.cyFinal+H.pxmid[1],ae="M"+Z+","+ee,he=(H.yLabelMax-H.yLabelMin)*(H.pxmid[0]<0?-1:1)/4;if(H.labelExtraX){var xe=H.labelExtraX*H.pxmid[1]/H.pxmid[0],we=H.yLabelMid+H.labelExtraY-(H.cyFinal+H.pxmid[1]);Math.abs(xe)>Math.abs(we)?ae+="l"+we*H.pxmid[0]/H.pxmid[1]+","+we+"H"+(Z+H.labelExtraX+he):ae+="l"+H.labelExtraX+","+xe+"v"+(we-xe)+"h"+he}else ae+="V"+(H.yLabelMid+H.labelExtraY)+"h"+he;e.ensureSingle(Y,"path","textline").call(k.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:ae,fill:"none"})})}function w(X,K,H){var Y=H[0],q=Y.cx,Z=Y.cy,ee=Y.trace,ae=ee.type==="funnelarea";"_hasHoverLabel"in ee||(ee._hasHoverLabel=!1),"_hasHoverEvent"in ee||(ee._hasHoverEvent=!1),X.on("mouseover",function(he){var xe=K._fullLayout,we=K._fullData[ee.index];if(!(K._dragging||xe.hovermode===!1)){var Me=we.hoverinfo;if(Array.isArray(Me)&&(Me=E.castHoverinfo({hoverinfo:[m.castOption(Me,he.pts)],_module:ee._module},xe,0)),Me==="all"&&(Me="label+text+value+percent+name"),we.hovertemplate||Me!=="none"&&Me!=="skip"&&Me){var Se=he.rInscribed||0,Ie=q+he.pxmid[0]*(1-Se),Ve=Z+he.pxmid[1]*(1-Se),Ge=xe.separators,ke=[];if(Me&&Me.indexOf("label")!==-1&&ke.push(he.label),he.text=m.castOption(we.hovertext||we.text,he.pts),Me&&Me.indexOf("text")!==-1){var _e=he.text;e.isValidTextValue(_e)&&ke.push(_e)}he.value=he.v,he.valueLabel=m.formatPieValue(he.v,Ge),Me&&Me.indexOf("value")!==-1&&ke.push(he.valueLabel),he.percent=he.v/Y.vTotal,he.percentLabel=m.formatPiePercent(he.percent,Ge),Me&&Me.indexOf("percent")!==-1&&ke.push(he.percentLabel);var ce=we.hoverlabel,ve=ce.font,le=[];E.loneHover({trace:ee,x0:Ie-Se*Y.r,x1:Ie+Se*Y.r,y:Ve,_x0:ae?q+he.TL[0]:Ie-Se*Y.r,_x1:ae?q+he.TR[0]:Ie+Se*Y.r,_y0:ae?Z+he.TL[1]:Ve-Se*Y.r,_y1:ae?Z+he.BL[1]:Ve+Se*Y.r,text:ke.join("
"),name:we.hovertemplate||Me.indexOf("name")!==-1?we.name:void 0,idealAlign:he.pxmid[0]<0?"left":"right",color:m.castOption(ce.bgcolor,he.pts)||he.color,borderColor:m.castOption(ce.bordercolor,he.pts),fontFamily:m.castOption(ve.family,he.pts),fontSize:m.castOption(ve.size,he.pts),fontColor:m.castOption(ve.color,he.pts),nameLength:m.castOption(ce.namelength,he.pts),textAlign:m.castOption(ce.align,he.pts),hovertemplate:m.castOption(we.hovertemplate,he.pts),hovertemplateLabels:he,eventData:[h(he,we)]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:K,inOut_bbox:le}),he.bbox=le[0],ee._hasHoverLabel=!0}ee._hasHoverEvent=!0,K.emit("plotly_hover",{points:[h(he,we)],event:p.event})}}),X.on("mouseout",function(he){var xe=K._fullLayout,we=K._fullData[ee.index],Me=p.select(this).datum();ee._hasHoverEvent&&(he.originalEvent=p.event,K.emit("plotly_unhover",{points:[h(Me,we)],event:p.event}),ee._hasHoverEvent=!1),ee._hasHoverLabel&&(E.loneUnhover(xe._hoverlayer.node()),ee._hasHoverLabel=!1)}),X.on("click",function(he){var xe=K._fullLayout,we=K._fullData[ee.index];K._dragging||xe.hovermode===!1||(K._hoverdata=[h(he,we)],E.click(K,p.event))})}function S(X,K,H){var Y=m.castOption(X.outsidetextfont.color,K.pts)||m.castOption(X.textfont.color,K.pts)||H.color,q=m.castOption(X.outsidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||H.family,Z=m.castOption(X.outsidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||H.size,ee=m.castOption(X.outsidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||H.weight,ae=m.castOption(X.outsidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||H.style,he=m.castOption(X.outsidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||H.variant,xe=m.castOption(X.outsidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||H.textcase,we=m.castOption(X.outsidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||H.lineposition,Me=m.castOption(X.outsidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||H.shadow;return{color:Y,family:q,size:Z,weight:ee,style:ae,variant:he,textcase:xe,lineposition:we,shadow:Me}}function M(X,K,H){var Y=m.castOption(X.insidetextfont.color,K.pts);!Y&&X._input.textfont&&(Y=m.castOption(X._input.textfont.color,K.pts));var q=m.castOption(X.insidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||H.family,Z=m.castOption(X.insidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||H.size,ee=m.castOption(X.insidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||H.weight,ae=m.castOption(X.insidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||H.style,he=m.castOption(X.insidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||H.variant,xe=m.castOption(X.insidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||H.textcase,we=m.castOption(X.insidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||H.lineposition,Me=m.castOption(X.insidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||H.shadow;return{color:Y||k.contrast(K.color),family:q,size:Z,weight:ee,style:ae,variant:he,textcase:xe,lineposition:we,shadow:Me}}function C(X,K){for(var H,Y,q=0;q=-4;ce-=2)_e(Math.PI*ce,"tan");for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+1),"tan")}if(Me||Ie){for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+1.5),"rad");for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+.5),"rad")}}if(ae||Ve||Me){var ve=Math.sqrt(X.width*X.width+X.height*X.height);if(ke={scale:q*Y*2/ve,rCenter:1-q,rotate:0},ke.textPosAngle=(K.startangle+K.stopangle)/2,ke.scale>=1)return ke;Ge.push(ke)}(Ve||Ie)&&(ke=f(X,Y,ee,he,xe),ke.textPosAngle=(K.startangle+K.stopangle)/2,Ge.push(ke)),(Ve||Se)&&(ke=u(X,Y,ee,he,xe),ke.textPosAngle=(K.startangle+K.stopangle)/2,Ge.push(ke));for(var le=0,Ae=0,Be=0;Be=1)break}return Ge[le]}function T(X,K){var H=X.startangle,Y=X.stopangle;return H>K&&K>Y||H0?1:-1)/2,y:Z/(1+H*H/(Y*Y)),outside:!0}}function D(X){var K=Math.sqrt(X.titleBox.width*X.titleBox.width+X.titleBox.height*X.titleBox.height);return{x:X.cx,y:X.cy,scale:X.trace.hole*X.r*2/K,tx:0,ty:-X.titleBox.height/2+X.trace.title.font.size}}function B(X,K){var H=1,Y=1,q,Z=X.trace,ee={x:X.cx,y:X.cy},ae={tx:0,ty:0};ae.ty+=Z.title.font.size,q=j(Z),Z.title.position.indexOf("top")!==-1?(ee.y-=(1+q)*X.r,ae.ty-=X.titleBox.height):Z.title.position.indexOf("bottom")!==-1&&(ee.y+=(1+q)*X.r);var he=F(X.r,X.trace.aspectratio),xe=K.w*(Z.domain.x[1]-Z.domain.x[0])/2;return Z.title.position.indexOf("left")!==-1?(xe=xe+he,ee.x-=(1+q)*he,ae.tx+=X.titleBox.width/2):Z.title.position.indexOf("center")!==-1?xe*=2:Z.title.position.indexOf("right")!==-1&&(xe=xe+he,ee.x+=(1+q)*he,ae.tx-=X.titleBox.width/2),H=xe/X.titleBox.width,Y=P(X,K)/X.titleBox.height,{x:ee.x,y:ee.y,scale:Math.min(H,Y),tx:ae.tx,ty:ae.ty}}function F(X,K){return X/(K===void 0?1:K)}function P(X,K){var H=X.trace,Y=K.h*(H.domain.y[1]-H.domain.y[0]);return Math.min(X.titleBox.height,Y/2)}function j(X){var K=X.pull;if(!K)return 0;var H;if(e.isArrayOrTypedArray(K))for(K=0,H=0;HK&&(K=X.pull[H]);return K}function U(X,K){var H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve;function Ge(ve,le){return ve.pxmid[1]-le.pxmid[1]}function ke(ve,le){return le.pxmid[1]-ve.pxmid[1]}function _e(ve,le){le||(le={});var Ae=le.labelExtraY+(Y?le.yLabelMax:le.yLabelMin),Be=Y?ve.yLabelMin:ve.yLabelMax,Xe=Y?ve.yLabelMax:ve.yLabelMin,Ye=ve.cyFinal+ee(ve.px0[1],ve.px1[1]),yt=Ae-Be,gt,Tt,At,$t,rr,_r;if(yt*he>0&&(ve.labelExtraY=yt),!!e.isArrayOrTypedArray(K.pull))for(Tt=0;Tt=(m.castOption(K.pull,At.pts)||0))&&((ve.pxmid[1]-At.pxmid[1])*he>0?($t=At.cyFinal+ee(At.px0[1],At.px1[1]),yt=$t-Be-ve.labelExtraY,yt*he>0&&(ve.labelExtraY+=yt)):(Xe+ve.labelExtraY-Ye)*he>0&&(gt=3*ae*Math.abs(Tt-Me.indexOf(ve)),rr=At.cxFinal+Z(At.px0[0],At.px1[0]),_r=rr+gt-(ve.cxFinal+ve.pxmid[0])-ve.labelExtraX,_r*ae>0&&(ve.labelExtraX+=_r)))}for(Y=0;Y<2;Y++)for(q=Y?Ge:ke,ee=Y?Math.max:Math.min,he=Y?1:-1,H=0;H<2;H++){for(Z=H?Math.max:Math.min,ae=H?1:-1,xe=X[Y][H],xe.sort(q),we=X[1-Y][H],Me=we.concat(xe),Ie=[],Se=0;Se1?(xe=H.r,we=xe/q.aspectratio):(we=H.r,xe=we*q.aspectratio),xe*=(1+q.baseratio)/2,he=xe*we}ee=Math.min(ee,he/H.vTotal)}for(Y=0;YK.vTotal/2?1:0,xe.halfangle=Math.PI*Math.min(xe.v/K.vTotal,.5),xe.ring=1-Y.hole,xe.rInscribed=I(xe,K))}function ne(X,K){return[X*Math.sin(K),-X*Math.cos(K)]}function se(X,K,H){var Y=X._fullLayout,q=H.trace,Z=q.texttemplate,ee=q.textinfo;if(!Z&&ee&&ee!=="none"){var ae=ee.split("+"),he=function(le){return ae.indexOf(le)!==-1},xe=he("label"),we=he("text"),Me=he("value"),Se=he("percent"),Ie=Y.separators,Ve;if(Ve=xe?[K.label]:[],we){var Ge=m.getFirstFilled(q.text,K.pts);v(Ge)&&Ve.push(Ge)}Me&&Ve.push(m.formatPieValue(K.v,Ie)),Se&&Ve.push(m.formatPiePercent(K.v/H.vTotal,Ie)),K.text=Ve.join("
")}function ke(le){return{label:le.label,value:le.v,valueLabel:m.formatPieValue(le.v,Y.separators),percent:le.v/H.vTotal,percentLabel:m.formatPiePercent(le.v/H.vTotal,Y.separators),color:le.color,text:le.text,customdata:e.castOption(q,le.i,"customdata")}}if(Z){var _e=e.castOption(q,K.i,"texttemplate");if(!_e)K.text="";else{var ce=ke(K),ve=m.getFirstFilled(q.text,K.pts);(v(ve)||ve==="")&&(ce.text=ve),K.text=e.texttemplateString({data:[ce,q._meta],fallback:q.texttemplatefallback,labels:ce,locale:X._fullLayout._d3locale,template:_e})}}}function G(X,K){var H=X.rotate*Math.PI/180,Y=Math.cos(H),q=Math.sin(H),Z=(K.left+K.right)/2,ee=(K.top+K.bottom)/2;X.textX=Z*Y-ee*q,X.textY=Z*q+ee*Y,X.noCenter=!0}V.exports={plot:g,formatSliceLabel:se,transformInsideText:_,determineInsideTextFont:M,positionTitleOutside:B,prerenderTitles:C,layoutAreas:$,attachFxHandlers:w,computeTransform:G}}}),pO=ze({"src/traces/pie/style.js"(J,V){"use strict";var p=ci(),b=Zm(),E=eh().resizeText;V.exports=function(l){var e=l._fullLayout._pielayer.selectAll(".trace");E(l,e,"pie"),e.each(function(t){var n=t[0],r=n.trace,a=p.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){p.select(this).call(b,o,r,l)})})}}}),vO=ze({"src/traces/pie/base_plot.js"(J){"use strict";var V=cl();J.name="pie",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),mO=ze({"src/traces/pie/index.js"(J,V){"use strict";V.exports={attributes:t0(),supplyDefaults:r0().supplyDefaults,supplyLayoutDefaults:hO(),layoutAttributes:qb(),calc:ug().calc,crossTraceCalc:ug().crossTraceCalc,plot:Vb().plot,style:pO(),styleOne:Zm(),moduleType:"trace",name:"pie",basePlotModule:vO(),categories:["pie-like","pie","showLegend"],meta:{}}}}),gO=ze({"lib/pie.js"(J,V){"use strict";V.exports=mO()}}),yO=ze({"src/traces/sunburst/base_plot.js"(J){"use strict";var V=cl();J.name="sunburst",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),e6=ze({"src/traces/sunburst/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),R1=ze({"src/traces/sunburst/attributes.js"(J,V){"use strict";var p=ws(),{hovertemplateAttrs:b,texttemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=qs(),e=Ml().attributes,t=t0(),n=e6(),r=Ki().extendFlat,a=Uc().pattern;V.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},t.marker.line.color,{dflt:null}),width:r({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:a,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:E({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:k({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r({},p.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:b({},{keys:n.eventDataKeys}),hovertemplatefallback:k(),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:r({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),t6=ze({"src/traces/sunburst/layout_attributes.js"(J,V){"use strict";V.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),_O=ze({"src/traces/sunburst/defaults.js"(J,V){"use strict";var p=Nr(),b=R1(),E=Ml().defaults,k=qh().handleText,l=r0().handleMarkerDefaults,e=fl(),t=e.hasColorscale,n=e.handleDefaults;V.exports=function(a,o,s,c){function m(M,C){return p.coerce(a,o,b,M,C)}var h=m("labels"),v=m("parents");if(!h||!h.length||!v||!v.length){o.visible=!1;return}var g=m("values");g&&g.length?m("branchvalues"):m("count"),m("level"),m("maxdepth"),l(a,o,c,m);var i=o._hasColorscale=t(a,"marker","colors")||(a.marker||{}).coloraxis;i&&n(a,o,c,m,{prefix:"marker.",cLetter:"c"}),m("leaf.opacity",i?1:.7);var w=m("text");m("texttemplate"),m("texttemplatefallback"),o.texttemplate||m("textinfo",p.isArrayOrTypedArray(w)?"text+label":"label"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var S="auto";k(a,o,c,m,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),m("insidetextorientation"),m("sort"),m("rotation"),m("root.color"),E(o,c,m),o._length=null}}}),xO=ze({"src/traces/sunburst/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=t6();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("sunburstcolorway",l.colorway),e("extendsunburstcolors")}}}),I1=ze({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(De,Ne){return De.parent===Ne.parent?1:2}function E(De){return De.reduce(k,0)/De.length}function k(De,Ne){return De+Ne.x}function l(De){return 1+De.reduce(e,0)}function e(De,Ne){return Math.max(De,Ne.y)}function t(De){for(var Ne;Ne=De.children;)De=Ne[0];return De}function n(De){for(var Ne;Ne=De.children;)De=Ne[Ne.length-1];return De}function r(){var De=b,Ne=1,We=1,Ke=!1;function Je(et){var Mt,pt=0;et.eachAfter(function(Ht){var Sr=Ht.children;Sr?(Ht.x=E(Sr),Ht.y=l(Sr)):(Ht.x=Mt?pt+=De(Ht,Mt):0,Ht.y=0,Mt=Ht)});var Pt=t(et),Ct=n(et),qt=Pt.x-De(Pt,Ct)/2,Vt=Ct.x+De(Ct,Pt)/2;return et.eachAfter(Ke?function(Ht){Ht.x=(Ht.x-et.x)*Ne,Ht.y=(et.y-Ht.y)*We}:function(Ht){Ht.x=(Ht.x-qt)/(Vt-qt)*Ne,Ht.y=(1-(et.y?Ht.y/et.y:1))*We})}return Je.separation=function(et){return arguments.length?(De=et,Je):De},Je.size=function(et){return arguments.length?(Ke=!1,Ne=+et[0],We=+et[1],Je):Ke?null:[Ne,We]},Je.nodeSize=function(et){return arguments.length?(Ke=!0,Ne=+et[0],We=+et[1],Je):Ke?[Ne,We]:null},Je}function a(De){var Ne=0,We=De.children,Ke=We&&We.length;if(!Ke)Ne=1;else for(;--Ke>=0;)Ne+=We[Ke].value;De.value=Ne}function o(){return this.eachAfter(a)}function s(De){var Ne=this,We,Ke=[Ne],Je,et,Mt;do for(We=Ke.reverse(),Ke=[];Ne=We.pop();)if(De(Ne),Je=Ne.children,Je)for(et=0,Mt=Je.length;et=0;--Je)We.push(Ke[Je]);return this}function m(De){for(var Ne=this,We=[Ne],Ke=[],Je,et,Mt;Ne=We.pop();)if(Ke.push(Ne),Je=Ne.children,Je)for(et=0,Mt=Je.length;et=0;)We+=Ke[Je].value;Ne.value=We})}function v(De){return this.eachBefore(function(Ne){Ne.children&&Ne.children.sort(De)})}function g(De){for(var Ne=this,We=i(Ne,De),Ke=[Ne];Ne!==We;)Ne=Ne.parent,Ke.push(Ne);for(var Je=Ke.length;De!==We;)Ke.splice(Je,0,De),De=De.parent;return Ke}function i(De,Ne){if(De===Ne)return De;var We=De.ancestors(),Ke=Ne.ancestors(),Je=null;for(De=We.pop(),Ne=Ke.pop();De===Ne;)Je=De,De=We.pop(),Ne=Ke.pop();return Je}function w(){for(var De=this,Ne=[De];De=De.parent;)Ne.push(De);return Ne}function S(){var De=[];return this.each(function(Ne){De.push(Ne)}),De}function M(){var De=[];return this.eachBefore(function(Ne){Ne.children||De.push(Ne)}),De}function C(){var De=this,Ne=[];return De.each(function(We){We!==De&&Ne.push({source:We.parent,target:We})}),Ne}function _(De,Ne){var We=new x(De),Ke=+De.value&&(We.value=De.value),Je,et=[We],Mt,pt,Pt,Ct;for(Ne==null&&(Ne=f);Je=et.pop();)if(Ke&&(Je.value=+Je.data.value),(pt=Ne(Je.data))&&(Ct=pt.length))for(Je.children=new Array(Ct),Pt=Ct-1;Pt>=0;--Pt)et.push(Mt=Je.children[Pt]=new x(pt[Pt])),Mt.parent=Je,Mt.depth=Je.depth+1;return We.eachBefore(A)}function T(){return _(this).eachBefore(u)}function f(De){return De.children}function u(De){De.data=De.data.data}function A(De){var Ne=0;do De.height=Ne;while((De=De.parent)&&De.height<++Ne)}function x(De){this.data=De,this.depth=this.height=0,this.parent=null}x.prototype=_.prototype={constructor:x,count:o,each:s,eachAfter:m,eachBefore:c,sum:h,sort:v,path:g,ancestors:w,descendants:S,leaves:M,links:C,copy:T};var z=Array.prototype.slice;function I(De){for(var Ne=De.length,We,Ke;Ne;)Ke=Math.random()*Ne--|0,We=De[Ne],De[Ne]=De[Ke],De[Ke]=We;return De}function O(De){for(var Ne=0,We=(De=I(z.call(De))).length,Ke=[],Je,et;Ne0&&We*We>Ke*Ke+Je*Je}function P(De,Ne){for(var We=0;WePt?(Je=(Ct+Pt-et)/(2*Ct),pt=Math.sqrt(Math.max(0,Pt/Ct-Je*Je)),We.x=De.x-Je*Ke-pt*Mt,We.y=De.y-Je*Mt+pt*Ke):(Je=(Ct+et-Pt)/(2*Ct),pt=Math.sqrt(Math.max(0,et/Ct-Je*Je)),We.x=Ne.x+Je*Ke-pt*Mt,We.y=Ne.y+Je*Mt+pt*Ke)):(We.x=Ne.x+We.r,We.y=Ne.y)}function ne(De,Ne){var We=De.r+Ne.r-1e-6,Ke=Ne.x-De.x,Je=Ne.y-De.y;return We>0&&We*We>Ke*Ke+Je*Je}function se(De){var Ne=De._,We=De.next._,Ke=Ne.r+We.r,Je=(Ne.x*We.r+We.x*Ne.r)/Ke,et=(Ne.y*We.r+We.y*Ne.r)/Ke;return Je*Je+et*et}function G(De){this._=De,this.next=null,this.previous=null}function X(De){if(!(Je=De.length))return 0;var Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt;if(Ne=De[0],Ne.x=0,Ne.y=0,!(Je>1))return Ne.r;if(We=De[1],Ne.x=-We.r,We.x=Ne.r,We.y=0,!(Je>2))return Ne.r+We.r;re(We,Ne,Ke=De[2]),Ne=new G(Ne),We=new G(We),Ke=new G(Ke),Ne.next=Ke.previous=We,We.next=Ne.previous=Ke,Ke.next=We.previous=Ne;e:for(pt=3;pt0)throw new Error("cycle");return pt}return We.id=function(Ke){return arguments.length?(De=Y(Ke),We):De},We.parentId=function(Ke){return arguments.length?(Ne=Y(Ke),We):Ne},We}function le(De,Ne){return De.parent===Ne.parent?1:2}function Ae(De){var Ne=De.children;return Ne?Ne[0]:De.t}function Be(De){var Ne=De.children;return Ne?Ne[Ne.length-1]:De.t}function Xe(De,Ne,We){var Ke=We/(Ne.i-De.i);Ne.c-=Ke,Ne.s+=We,De.c+=Ke,Ne.z+=We,Ne.m+=We}function Ye(De){for(var Ne=0,We=0,Ke=De.children,Je=Ke.length,et;--Je>=0;)et=Ke[Je],et.z+=Ne,et.m+=Ne,Ne+=et.s+(We+=et.c)}function yt(De,Ne,We){return De.a.parent===Ne.parent?De.a:We}function gt(De,Ne){this._=De,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=Ne}gt.prototype=Object.create(x.prototype);function Tt(De){for(var Ne=new gt(De,0),We,Ke=[Ne],Je,et,Mt,pt;We=Ke.pop();)if(et=We._.children)for(We.children=new Array(pt=et.length),Mt=pt-1;Mt>=0;--Mt)Ke.push(Je=We.children[Mt]=new gt(et[Mt],Mt)),Je.parent=We;return(Ne.parent=new gt(null,0)).children=[Ne],Ne}function At(){var De=le,Ne=1,We=1,Ke=null;function Je(Ct){var qt=Tt(Ct);if(qt.eachAfter(et),qt.parent.m=-qt.z,qt.eachBefore(Mt),Ke)Ct.eachBefore(Pt);else{var Vt=Ct,Ht=Ct,Sr=Ct;Ct.eachBefore(function(ur){ur.xHt.x&&(Ht=ur),ur.depth>Sr.depth&&(Sr=ur)});var Kr=Vt===Ht?1:De(Vt,Ht)/2,Yt=Kr-Vt.x,Rt=Ne/(Ht.x+Kr+Yt),nr=We/(Sr.depth||1);Ct.eachBefore(function(ur){ur.x=(ur.x+Yt)*Rt,ur.y=ur.depth*nr})}return Ct}function et(Ct){var qt=Ct.children,Vt=Ct.parent.children,Ht=Ct.i?Vt[Ct.i-1]:null;if(qt){Ye(Ct);var Sr=(qt[0].z+qt[qt.length-1].z)/2;Ht?(Ct.z=Ht.z+De(Ct._,Ht._),Ct.m=Ct.z-Sr):Ct.z=Sr}else Ht&&(Ct.z=Ht.z+De(Ct._,Ht._));Ct.parent.A=pt(Ct,Ht,Ct.parent.A||Vt[0])}function Mt(Ct){Ct._.x=Ct.z+Ct.parent.m,Ct.m+=Ct.parent.m}function pt(Ct,qt,Vt){if(qt){for(var Ht=Ct,Sr=Ct,Kr=qt,Yt=Ht.parent.children[0],Rt=Ht.m,nr=Sr.m,ur=Kr.m,cr=Yt.m,Rr;Kr=Be(Kr),Ht=Ae(Ht),Kr&&Ht;)Yt=Ae(Yt),Sr=Be(Sr),Sr.a=Ct,Rr=Kr.z+ur-Ht.z-Rt+De(Kr._,Ht._),Rr>0&&(Xe(yt(Kr,Ct,Vt),Ct,Rr),Rt+=Rr,nr+=Rr),ur+=Kr.m,Rt+=Ht.m,cr+=Yt.m,nr+=Sr.m;Kr&&!Be(Sr)&&(Sr.t=Kr,Sr.m+=ur-nr),Ht&&!Ae(Yt)&&(Yt.t=Ht,Yt.m+=Rt-cr,Vt=Ct)}return Vt}function Pt(Ct){Ct.x*=Ne,Ct.y=Ct.depth*We}return Je.separation=function(Ct){return arguments.length?(De=Ct,Je):De},Je.size=function(Ct){return arguments.length?(Ke=!1,Ne=+Ct[0],We=+Ct[1],Je):Ke?null:[Ne,We]},Je.nodeSize=function(Ct){return arguments.length?(Ke=!0,Ne=+Ct[0],We=+Ct[1],Je):Ke?[Ne,We]:null},Je}function $t(De,Ne,We,Ke,Je){for(var et=De.children,Mt,pt=-1,Pt=et.length,Ct=De.value&&(Je-We)/De.value;++ptur&&(ur=Ct),Zr=Rt*Rt*Qr,cr=Math.max(ur/Zr,Zr/nr),cr>Rr){Rt-=Ct;break}Rr=cr}Mt.push(Pt={value:Rt,dice:Sr1?Ke:1)},We}(rr);function or(){var De=Xt,Ne=!1,We=1,Ke=1,Je=[0],et=q,Mt=q,pt=q,Pt=q,Ct=q;function qt(Ht){return Ht.x0=Ht.y0=0,Ht.x1=We,Ht.y1=Ke,Ht.eachBefore(Vt),Je=[0],Ne&&Ht.eachBefore(Me),Ht}function Vt(Ht){var Sr=Je[Ht.depth],Kr=Ht.x0+Sr,Yt=Ht.y0+Sr,Rt=Ht.x1-Sr,nr=Ht.y1-Sr;Rt=Ht-1){var ur=et[Vt];ur.x0=Kr,ur.y0=Yt,ur.x1=Rt,ur.y1=nr;return}for(var cr=Ct[Vt],Rr=Sr/2+cr,Qr=Vt+1,Zr=Ht-1;Qr>>1;Ct[ha]nr-Yt){var un=(Kr*La+Rt*Pa)/Sr;qt(Vt,Qr,Pa,Kr,Yt,un,nr),qt(Qr,Ht,La,un,Yt,Rt,nr)}else{var Xa=(Yt*La+nr*Pa)/Sr;qt(Vt,Qr,Pa,Kr,Yt,Rt,Xa),qt(Qr,Ht,La,Kr,Xa,Rt,nr)}}}function vt(De,Ne,We,Ke,Je){(De.depth&1?$t:Se)(De,Ne,We,Ke,Je)}var ht=function De(Ne){function We(Ke,Je,et,Mt,pt){if((Pt=Ke._squarify)&&Pt.ratio===Ne)for(var Pt,Ct,qt,Vt,Ht=-1,Sr,Kr=Pt.length,Yt=Ke.value;++Ht1?Ke:1)},We}(rr);p.cluster=r,p.hierarchy=_,p.pack=ae,p.packEnclose=O,p.packSiblings=K,p.partition=Ie,p.stratify=ve,p.tree=At,p.treemap=or,p.treemapBinary=Ot,p.treemapDice=Se,p.treemapResquarify=ht,p.treemapSlice=$t,p.treemapSliceDice=vt,p.treemapSquarify=Xt,Object.defineProperty(p,"__esModule",{value:!0})})}}),D1=ze({"src/traces/sunburst/calc.js"(J){"use strict";var V=I1(),p=ao(),b=Nr(),E=fl().makeColorScaleFuncFromTrace,k=ug().makePullColorFn,l=ug().generateExtendedColors,e=fl().calc,t=No().ALMOST_EQUAL,n={},r={},a={};J.calc=function(s,c){var m=s._fullLayout,h=c.ids,v=b.isArrayOrTypedArray(h),g=c.labels,i=c.parents,w=c.values,S=b.isArrayOrTypedArray(w),M=[],C={},_={},T=function(K,H){C[K]?C[K].push(H):C[K]=[H],_[H]=1},f=function(K){return K||typeof K=="number"},u=function(K){return!S||p(w[K])&&w[K]>=0},A,x,z;v?(A=Math.min(h.length,i.length),x=function(K){return f(h[K])&&u(K)},z=function(K){return String(h[K])}):(A=Math.min(g.length,i.length),x=function(K){return f(g[K])&&u(K)},z=function(K){return String(g[K])}),S&&(A=Math.min(A,w.length));for(var I=0;I1){for(var j=b.randstr(),U=0;U>8&15|V>>4&240,V>>4&15|V&240,(V&15)<<4|V&15,1):p===8?F1(V>>24&255,V>>16&255,V>>8&255,(V&255)/255):p===4?F1(V>>12&15|V>>8&240,V>>8&15|V>>4&240,V>>4&15|V&240,((V&15)<<4|V&15)/255):null):(V=f6.exec(J))?new ff(V[1],V[2],V[3],1):(V=h6.exec(J))?new ff(V[1]*255/100,V[2]*255/100,V[3]*255/100,1):(V=d6.exec(J))?F1(V[1],V[2],V[3],V[4]):(V=p6.exec(J))?F1(V[1]*255/100,V[2]*255/100,V[3]*255/100,V[4]):(V=v6.exec(J))?s6(V[1],V[2]/100,V[3]/100,1):(V=m6.exec(J))?s6(V[1],V[2]/100,V[3]/100,V[4]):Xb.hasOwnProperty(J)?n6(Xb[J]):J==="transparent"?new ff(NaN,NaN,NaN,0):null}function n6(J){return new ff(J>>16&255,J>>8&255,J&255,1)}function F1(J,V,p,b){return b<=0&&(J=V=p=NaN),new ff(J,V,p,b)}function Hb(J){return J instanceof sp||(J=fg(J)),J?(J=J.rgb(),new ff(J.r,J.g,J.b,J.opacity)):new ff}function z1(J,V,p,b){return arguments.length===1?Hb(J):new ff(J,V,p,b??1)}function ff(J,V,p,b){this.r=+J,this.g=+V,this.b=+p,this.opacity=+b}function i6(){return`#${pv(this.r)}${pv(this.g)}${pv(this.b)}`}function TO(){return`#${pv(this.r)}${pv(this.g)}${pv(this.b)}${pv((isNaN(this.opacity)?1:this.opacity)*255)}`}function o6(){let J=B1(this.opacity);return`${J===1?"rgb(":"rgba("}${dv(this.r)}, ${dv(this.g)}, ${dv(this.b)}${J===1?")":`, ${J})`}`}function B1(J){return isNaN(J)?1:Math.max(0,Math.min(1,J))}function dv(J){return Math.max(0,Math.min(255,Math.round(J)||0))}function pv(J){return J=dv(J),(J<16?"0":"")+J.toString(16)}function s6(J,V,p,b){return b<=0?J=V=p=NaN:p<=0||p>=1?J=V=NaN:V<=0&&(J=NaN),new ud(J,V,p,b)}function l6(J){if(J instanceof ud)return new ud(J.h,J.s,J.l,J.opacity);if(J instanceof sp||(J=fg(J)),!J)return new ud;if(J instanceof ud)return J;J=J.rgb();var V=J.r/255,p=J.g/255,b=J.b/255,E=Math.min(V,p,b),k=Math.max(V,p,b),l=NaN,e=k-E,t=(k+E)/2;return e?(V===k?l=(p-b)/e+(p0&&t<1?0:l,new ud(l,e,t,J.opacity)}function Wb(J,V,p,b){return arguments.length===1?l6(J):new ud(J,V,p,b??1)}function ud(J,V,p,b){this.h=+J,this.s=+V,this.l=+p,this.opacity=+b}function u6(J){return J=(J||0)%360,J<0?J+360:J}function O1(J){return Math.max(0,Math.min(1,J||0))}function Yb(J,V,p){return(J<60?V+(p-V)*J/60:J<180?p:J<240?V+(p-V)*(240-J)/60:V)*255}var lp,vv,mv,n0,cd,c6,f6,h6,d6,p6,v6,m6,Xb,Zb=zi({"node_modules/d3-color/src/color.js"(){Gb(),lp=.7,vv=1/lp,mv="\\s*([+-]?\\d+)\\s*",n0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c6=/^#([0-9a-f]{3,8})$/,f6=new RegExp(`^rgb\\(${mv},${mv},${mv}\\)$`),h6=new RegExp(`^rgb\\(${cd},${cd},${cd}\\)$`),d6=new RegExp(`^rgba\\(${mv},${mv},${mv},${n0}\\)$`),p6=new RegExp(`^rgba\\(${cd},${cd},${cd},${n0}\\)$`),v6=new RegExp(`^hsl\\(${n0},${cd},${cd}\\)$`),m6=new RegExp(`^hsla\\(${n0},${cd},${cd},${n0}\\)$`),Xb={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},a0(sp,fg,{copy(J){return Object.assign(new this.constructor,this,J)},displayable(){return this.rgb().displayable()},hex:r6,formatHex:r6,formatHex8:bO,formatHsl:wO,formatRgb:a6,toString:a6}),a0(ff,z1,cg(sp,{brighter(J){return J=J==null?vv:Math.pow(vv,J),new ff(this.r*J,this.g*J,this.b*J,this.opacity)},darker(J){return J=J==null?lp:Math.pow(lp,J),new ff(this.r*J,this.g*J,this.b*J,this.opacity)},rgb(){return this},clamp(){return new ff(dv(this.r),dv(this.g),dv(this.b),B1(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:i6,formatHex:i6,formatHex8:TO,formatRgb:o6,toString:o6})),a0(ud,Wb,cg(sp,{brighter(J){return J=J==null?vv:Math.pow(vv,J),new ud(this.h,this.s,this.l*J,this.opacity)},darker(J){return J=J==null?lp:Math.pow(lp,J),new ud(this.h,this.s,this.l*J,this.opacity)},rgb(){var J=this.h%360+(this.h<0)*360,V=isNaN(J)||isNaN(this.s)?0:this.s,p=this.l,b=p+(p<.5?p:1-p)*V,E=2*p-b;return new ff(Yb(J>=240?J-240:J+120,E,b),Yb(J,E,b),Yb(J<120?J+240:J-120,E,b),this.opacity)},clamp(){return new ud(u6(this.h),O1(this.s),O1(this.l),B1(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 J=B1(this.opacity);return`${J===1?"hsl(":"hsla("}${u6(this.h)}, ${O1(this.s)*100}%, ${O1(this.l)*100}%${J===1?")":`, ${J})`}`}}))}}),$b,Kb,g6=zi({"node_modules/d3-color/src/math.js"(){$b=Math.PI/180,Kb=180/Math.PI}});function y6(J){if(J instanceof wd)return new wd(J.l,J.a,J.b,J.opacity);if(J instanceof Ud)return _6(J);J instanceof ff||(J=Hb(J));var V=r2(J.r),p=r2(J.g),b=r2(J.b),E=Qb((.2225045*V+.7168786*p+.0606169*b)/i2),k,l;return V===p&&p===b?k=l=E:(k=Qb((.4360747*V+.3850649*p+.1430804*b)/n2),l=Qb((.0139322*V+.0971045*p+.7141733*b)/o2)),new wd(116*E-16,500*(k-E),200*(E-l),J.opacity)}function Jb(J,V,p,b){return arguments.length===1?y6(J):new wd(J,V,p,b??1)}function wd(J,V,p,b){this.l=+J,this.a=+V,this.b=+p,this.opacity=+b}function Qb(J){return J>x6?Math.pow(J,.3333333333333333):J/l2+s2}function e2(J){return J>gv?J*J*J:l2*(J-s2)}function t2(J){return 255*(J<=.0031308?12.92*J:1.055*Math.pow(J,.4166666666666667)-.055)}function r2(J){return(J/=255)<=.04045?J/12.92:Math.pow((J+.055)/1.055,2.4)}function AO(J){if(J instanceof Ud)return new Ud(J.h,J.c,J.l,J.opacity);if(J instanceof wd||(J=y6(J)),J.a===0&&J.b===0)return new Ud(NaN,0=1?(p=1,V-1):Math.floor(p*V),E=J[b],k=J[b+1],l=b>0?J[b-1]:2*E-k,e=b()=>J}});function S6(J,V){return function(p){return J+p*V}}function kO(J,V,p){return J=Math.pow(J,p),V=Math.pow(V,p)-J,p=1/p,function(b){return Math.pow(J+b*V,p)}}function U1(J,V){var p=V-J;return p?S6(J,p>180||p<-180?p-360*Math.round(p/360):p):pg(isNaN(J)?V:J)}function CO(J){return(J=+J)==1?hf:function(V,p){return p-V?kO(V,p,J):pg(isNaN(V)?p:V)}}function hf(J,V){var p=V-J;return p?S6(J,p):pg(isNaN(J)?V:J)}var s0=zi({"node_modules/d3-interpolate/src/color.js"(){M6()}});function E6(J){return function(V){var p=V.length,b=new Array(p),E=new Array(p),k=new Array(p),l,e;for(l=0;lp&&(k=V.slice(p,k),e[l]?e[l]+=k:e[++l]=k),(b=b[0])===(E=E[0])?e[l]?e[l]+=E:e[++l]=E:(e[++l]=null,t.push({i:l,x:Td(b,E)})),p=H1.lastIndex;return p180?r+=360:r-n>180&&(n+=360),o.push({i:a.push(E(a)+"rotate(",null,b)-2,x:Td(n,r)})):r&&a.push(E(a)+"rotate("+r+b)}function e(n,r,a,o){n!==r?o.push({i:a.push(E(a)+"skewX(",null,b)-2,x:Td(n,r)}):r&&a.push(E(a)+"skewX("+r+b)}function t(n,r,a,o,s,c){if(n!==a||r!==o){var m=s.push(E(s)+"scale(",null,",",null,")");c.push({i:m-4,x:Td(n,a)},{i:m-2,x:Td(r,o)})}else(a!==1||o!==1)&&s.push(E(s)+"scale("+a+","+o+")")}return function(n,r){var a=[],o=[];return n=J(n),r=J(r),k(n.translateX,n.translateY,r.translateX,r.translateY,a,o),l(n.rotate,r.rotate,a,o),e(n.skewX,r.skewX,a,o),t(n.scaleX,n.scaleY,r.scaleX,r.scaleY,a,o),n=r=null,function(s){for(var c=-1,m=o.length,h;++cW1,interpolateArray:()=>LO,interpolateBasis:()=>w6,interpolateBasisClosed:()=>T6,interpolateCubehelix:()=>eA,interpolateCubehelixLong:()=>tA,interpolateDate:()=>D6,interpolateDiscrete:()=>IO,interpolateHcl:()=>K6,interpolateHclLong:()=>J6,interpolateHsl:()=>X6,interpolateHslLong:()=>Z6,interpolateHue:()=>FO,interpolateLab:()=>XO,interpolateNumber:()=>Td,interpolateNumberArray:()=>v2,interpolateObject:()=>z6,interpolateRgb:()=>q1,interpolateRgbBasis:()=>k6,interpolateRgbBasisClosed:()=>C6,interpolateRound:()=>BO,interpolateString:()=>O6,interpolateTransformCss:()=>q6,interpolateTransformSvg:()=>V6,interpolateZoom:()=>W6,piecewise:()=>JO,quantize:()=>eN});var l0=zi({"node_modules/d3-interpolate/src/index.js"(){Y1(),I6(),p2(),A6(),F6(),DO(),zO(),V1(),m2(),B6(),OO(),N6(),VO(),WO(),L6(),YO(),ZO(),$O(),KO(),QO(),tN()}}),y2=ze({"src/traces/sunburst/fill_one.js"(J,V){"use strict";var p=$i(),b=Qn();V.exports=function(k,l,e,t,n){var r=l.data.data,a=r.i,o=n||r.color;if(a>=0){l.i=r.i;var s=e.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=o,l.color=o):(s.color=o,l.color=o),p.pointStyle(k,e,t,l)}else b.fill(k,o)}}}),rA=ze({"src/traces/sunburst/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=Nr(),k=eh().resizeText,l=y2();function e(n){var r=n._fullLayout._sunburstlayer.selectAll(".trace");k(n,r,"sunburst"),r.each(function(a){var o=p.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){p.select(this).call(t,m,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(a,m,"marker.line.color")||b.defaultLine,v=E.castOption(a,m,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",v).call(b.stroke,h).style("opacity",c?a.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),up=ze({"src/traces/sunburst/helpers.js"(J){"use strict";var V=Nr(),p=Qn(),b=gd(),E=lv();J.findEntryWithLevel=function(t,n){var r;return n&&t.eachAfter(function(a){if(J.getPtId(a)===n)return r=a.copy()}),r||t},J.findEntryWithChild=function(t,n){var r;return t.eachAfter(function(a){for(var o=a.children||[],s=0;s0)},J.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},J.isHeader=function(t,n){return!(J.isLeaf(t)||t.depth===n._maxDepth-1)};function e(t){return t.data.data.pid}J.getParent=function(t,n){return J.findEntryWithLevel(t,e(n))},J.listPath=function(t,n){var r=t.parent;if(!r)return[];var a=n?[r.data[n]]:[r];return J.listPath(r,n).concat(a)},J.getPath=function(t){return J.listPath(t,"label").join("/")+"/"},J.formatValue=E.formatPieValue,J.formatPercent=function(t,n){var r=V.formatPercent(t,0);return r==="0%"&&(r=E.formatPiePercent(t,n)),r}}}),$1=ze({"src/traces/sunburst/fx.js"(J,V){"use strict";var p=ci(),b=mi(),E=kh().appendArrayPointValue,k=Zl(),l=Nr(),e=Hm(),t=up(),n=lv(),r=n.formatPieValue;V.exports=function(s,c,m,h,v){var g=h[0],i=g.trace,w=g.hierarchy,S=i.type==="sunburst",M=i.type==="treemap"||i.type==="icicle";"_hasHoverLabel"in i||(i._hasHoverLabel=!1),"_hasHoverEvent"in i||(i._hasHoverEvent=!1);var C=function(f){var u=m._fullLayout;if(!(m._dragging||u.hovermode===!1)){var A=m._fullData[i.index],x=f.data.data,z=x.i,I=t.isHierarchyRoot(f),O=t.getParent(w,f),D=t.getValue(f),B=function(ee){return l.castOption(A,z,ee)},F=B("hovertemplate"),P=k.castHoverinfo(A,u,z),j=u.separators,U;if(F||P&&P!=="none"&&P!=="skip"){var $,Q;S&&($=g.cx+f.pxmid[0]*(1-f.rInscribed),Q=g.cy+f.pxmid[1]*(1-f.rInscribed)),M&&($=f._hoverX,Q=f._hoverY);var re={},ne=[],se=[],G=function(ee){return ne.indexOf(ee)!==-1};P&&(ne=P==="all"?A._module.attributes.hoverinfo.flags:P.split("+")),re.label=x.label,G("label")&&re.label&&se.push(re.label),x.hasOwnProperty("v")&&(re.value=x.v,re.valueLabel=r(re.value,j),G("value")&&se.push(re.valueLabel)),re.currentPath=f.currentPath=t.getPath(f.data),G("current path")&&!I&&se.push(re.currentPath);var X,K=[],H=function(){K.indexOf(X)===-1&&(se.push(X),K.push(X))};re.percentParent=f.percentParent=D/t.getValue(O),re.parent=f.parentString=t.getPtLabel(O),G("percent parent")&&(X=t.formatPercent(re.percentParent,j)+" of "+re.parent,H()),re.percentEntry=f.percentEntry=D/t.getValue(c),re.entry=f.entry=t.getPtLabel(c),G("percent entry")&&!I&&!f.onPathbar&&(X=t.formatPercent(re.percentEntry,j)+" of "+re.entry,H()),re.percentRoot=f.percentRoot=D/t.getValue(w),re.root=f.root=t.getPtLabel(w),G("percent root")&&!I&&(X=t.formatPercent(re.percentRoot,j)+" of "+re.root,H()),re.text=B("hovertext")||B("text"),G("text")&&(X=re.text,l.isValidTextValue(X)&&se.push(X)),U=[a(f,A,v.eventDataKeys)];var Y={trace:A,y:Q,_x0:f._x0,_x1:f._x1,_y0:f._y0,_y1:f._y1,text:se.join("
"),name:F||G("name")?A.name:void 0,color:B("hoverlabel.bgcolor")||x.color,borderColor:B("hoverlabel.bordercolor"),fontFamily:B("hoverlabel.font.family"),fontSize:B("hoverlabel.font.size"),fontColor:B("hoverlabel.font.color"),fontWeight:B("hoverlabel.font.weight"),fontStyle:B("hoverlabel.font.style"),fontVariant:B("hoverlabel.font.variant"),nameLength:B("hoverlabel.namelength"),textAlign:B("hoverlabel.align"),hovertemplate:F,hovertemplateLabels:re,eventData:U};S&&(Y.x0=$-f.rInscribed*f.rpx1,Y.x1=$+f.rInscribed*f.rpx1,Y.idealAlign=f.pxmid[0]<0?"left":"right"),M&&(Y.x=$,Y.idealAlign=$<0?"left":"right");var q=[];k.loneHover(Y,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:m,inOut_bbox:q}),U[0].bbox=q[0],i._hasHoverLabel=!0}if(M){var Z=s.select("path.surface");v.styleOne(Z,f,A,m,{hovered:!0})}i._hasHoverEvent=!0,m.emit("plotly_hover",{points:U||[a(f,A,v.eventDataKeys)],event:p.event})}},_=function(f){var u=m._fullLayout,A=m._fullData[i.index],x=p.select(this).datum();if(i._hasHoverEvent&&(f.originalEvent=p.event,m.emit("plotly_unhover",{points:[a(x,A,v.eventDataKeys)],event:p.event}),i._hasHoverEvent=!1),i._hasHoverLabel&&(k.loneUnhover(u._hoverlayer.node()),i._hasHoverLabel=!1),M){var z=s.select("path.surface");v.styleOne(z,x,A,m,{hovered:!1})}},T=function(f){var u=m._fullLayout,A=m._fullData[i.index],x=S&&(t.isHierarchyRoot(f)||t.isLeaf(f)),z=t.getPtId(f),I=t.isEntry(f)?t.findEntryWithChild(w,z):t.findEntryWithLevel(w,z),O=t.getPtId(I),D={points:[a(f,A,v.eventDataKeys)],event:p.event};x||(D.nextLevel=O);var B=e.triggerHandler(m,"plotly_"+i.type+"click",D);if(B!==!1&&u.hovermode&&(m._hoverdata=[a(f,A,v.eventDataKeys)],k.click(m,p.event)),!x&&B!==!1&&!m._dragging&&!m._transitioning){b.call("_storeDirectGUIEdit",A,u._tracePreGUI[A.uid],{level:A.level});var F={data:[{level:O}],traces:[i.index]},P={frame:{redraw:!1,duration:v.transitionTime},transition:{duration:v.transitionTime,easing:v.transitionEasing},mode:"immediate",fromcurrent:!0};k.loneUnhover(u._hoverlayer.node()),b.call("animate",m,F,P)}};s.on("mouseover",C),s.on("mouseout",_),s.on("click",T)};function a(o,s,c){for(var m=o.data.data,h={curveNumber:s.index,pointNumber:m.i,data:s._input,fullData:s},v=0;vXe.x1?2*Math.PI:0)+ee;Ye=le.rpx1Ie?2*Math.PI:0)+ee;Be={x0:Ye,x1:Ye}}else Be={rpx0:ne,rpx1:ne},k.extendFlat(Be,ve(le));else Be={rpx0:0,rpx1:0};else Be={x0:ee,x1:ee};return b(Be,Xe)}function ce(le){var Ae=K[g.getPtId(le)],Be,Xe=le.transform;if(Ae)Be=Ae;else if(Be={rpx1:le.rpx1,transform:{textPosAngle:Xe.textPosAngle,scale:0,rotate:Xe.rotate,rCenter:Xe.rCenter,x:Xe.x,y:Xe.y}},X)if(le.parent)if(Ie){var Ye=le.x1>Ie?2*Math.PI:0;Be.x0=Be.x1=Ye}else k.extendFlat(Be,ve(le));else Be.x0=Be.x1=ee;else Be.x0=Be.x1=ee;var yt=b(Be.transform.textPosAngle,le.transform.textPosAngle),gt=b(Be.rpx1,le.rpx1),Tt=b(Be.x0,le.x0),At=b(Be.x1,le.x1),$t=b(Be.transform.scale,Xe.scale),rr=b(Be.transform.rotate,Xe.rotate),_r=Xe.rCenter===0?3:Be.transform.rCenter===0?1/3:1,Xt=b(Be.transform.rCenter,Xe.rCenter),or=function(Ot){return Xt(Math.pow(Ot,_r))};return function(Ot){var vt=gt(Ot),ht=Tt(Ot),De=At(Ot),Ne=or(Ot),We=xe(vt,(ht+De)/2),Ke=yt(Ot),Je={pxmid:We,rpx1:vt,transform:{textPosAngle:Ke,rCenter:Ne,x:Xe.x,y:Xe.y}};return t(B.type,Xe,x),{transform:{targetX:Me(Je),targetY:Se(Je),scale:$t(Ot),rotate:rr(Ot),rCenter:Ne}}}}function ve(le){var Ae=le.parent,Be=K[g.getPtId(Ae)],Xe={};if(Be){var Ye=Ae.children,yt=Ye.indexOf(le),gt=Ye.length,Tt=b(Be.x0,Be.x1);Xe.x0=Tt(yt/gt),Xe.x1=Tt(yt/gt)}else Xe.x0=Xe.x1=0;return Xe}}function w(_){return p.partition().size([2*Math.PI,_.height+1])(_)}J.formatSliceLabel=function(_,T,f,u,A){var x=f.texttemplate,z=f.textinfo;if(!x&&(!z||z==="none"))return"";var I=A.separators,O=u[0],D=_.data.data,B=O.hierarchy,F=g.isHierarchyRoot(_),P=g.getParent(B,_),j=g.getValue(_);if(!x){var U=z.split("+"),$=function(q){return U.indexOf(q)!==-1},Q=[],re;if($("label")&&D.label&&Q.push(D.label),D.hasOwnProperty("v")&&$("value")&&Q.push(g.formatValue(D.v,I)),!F){$("current path")&&Q.push(g.getPath(_.data));var ne=0;$("percent parent")&&ne++,$("percent entry")&&ne++,$("percent root")&&ne++;var se=ne>1;if(ne){var G,X=function(q){re=g.formatPercent(G,I),se&&(re+=" of "+q),Q.push(re)};$("percent parent")&&!F&&(G=j/g.getValue(P),X("parent")),$("percent entry")&&(G=j/g.getValue(T),X("entry")),$("percent root")&&(G=j/g.getValue(B),X("root"))}}return $("text")&&(re=k.castOption(f,D.i,"text"),k.isValidTextValue(re)&&Q.push(re)),Q.join("
")}var K=k.castOption(f,D.i,"texttemplate");if(!K)return"";var H={};D.label&&(H.label=D.label),D.hasOwnProperty("v")&&(H.value=D.v,H.valueLabel=g.formatValue(D.v,I)),H.currentPath=g.getPath(_.data),F||(H.percentParent=j/g.getValue(P),H.percentParentLabel=g.formatPercent(H.percentParent,I),H.parent=g.getPtLabel(P)),H.percentEntry=j/g.getValue(T),H.percentEntryLabel=g.formatPercent(H.percentEntry,I),H.entry=g.getPtLabel(T),H.percentRoot=j/g.getValue(B),H.percentRootLabel=g.formatPercent(H.percentRoot,I),H.root=g.getPtLabel(B),D.hasOwnProperty("color")&&(H.color=D.color);var Y=k.castOption(f,D.i,"text");return(k.isValidTextValue(Y)||Y==="")&&(H.text=Y),H.customdata=k.castOption(f,D.i,"customdata"),k.texttemplateString({data:[H,f._meta],fallback:f.texttemplatefallback,labels:H,locale:A._d3locale,template:K})};function S(_){return _.rpx0===0&&k.isFullCircle([_.x0,_.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(_.halfangle)),_.ring/2))}function M(_){return C(_.rpx1,_.transform.textPosAngle)}function C(_,T){return[_*Math.sin(T),-_*Math.cos(T)]}}}),rN=ze({"src/traces/sunburst/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"sunburst",basePlotModule:yO(),categories:[],animatable:!0,attributes:R1(),layoutAttributes:t6(),supplyDefaults:_O(),supplyLayoutDefaults:xO(),calc:D1().calc,crossTraceCalc:D1().crossTraceCalc,plot:_2().plot,style:rA().style,colorbar:Of(),meta:{}}}}),aN=ze({"lib/sunburst.js"(J,V){"use strict";V.exports=rN()}}),nN=ze({"src/traces/treemap/base_plot.js"(J){"use strict";var V=cl();J.name="treemap",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),u0=ze({"src/traces/treemap/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),x2=ze({"src/traces/treemap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=qs(),l=Ml().attributes,e=t0(),t=R1(),n=u0(),r=Ki().extendFlat,a=Uc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.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:r({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:t.marker.colors,pattern:a,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},k("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:r({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:b({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:p({},{keys:n.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r({},e.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:e.sort,root:t.root,domain:l({name:"treemap",trace:!0,editType:"calc"})}}}),aA=ze({"src/traces/treemap/layout_attributes.js"(J,V){"use strict";V.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),iN=ze({"src/traces/treemap/defaults.js"(J,V){"use strict";var p=Nr(),b=x2(),E=Qn(),k=Ml().defaults,l=qh().handleText,e=hv().TEXTPAD,t=r0().handleMarkerDefaults,n=fl(),r=n.hasColorscale,a=n.handleDefaults;V.exports=function(s,c,m,h){function v(A,x){return p.coerce(s,c,b,A,x)}var g=v("labels"),i=v("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=v("values");w&&w.length?v("branchvalues"):v("count"),v("level"),v("maxdepth");var S=v("tiling.packing");S==="squarify"&&v("tiling.squarifyratio"),v("tiling.flip"),v("tiling.pad");var M=v("text");v("texttemplate"),v("texttemplatefallback"),c.texttemplate||v("textinfo",p.isArrayOrTypedArray(M)?"text+label":"label"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var C=v("pathbar.visible"),_="auto";l(s,c,h,v,_,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition");var T=c.textposition.indexOf("bottom")!==-1;t(s,c,h,v);var f=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;f?a(s,c,h,v,{prefix:"marker.",cLetter:"c"}):v("marker.depthfade",!(c.marker.colors||[]).length);var u=c.textfont.size*2;v("marker.pad.t",T?u/4:u),v("marker.pad.l",u/4),v("marker.pad.r",u/4),v("marker.pad.b",T?u:u/4),v("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},C&&(v("pathbar.thickness",c.pathbar.textfont.size+2*e),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),k(c,h,v),c._length=null}}}),oN=ze({"src/traces/treemap/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=aA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("treemapcolorway",l.colorway),e("extendtreemapcolors")}}}),nA=ze({"src/traces/treemap/calc.js"(J){"use strict";var V=D1();J.calc=function(p,b){return V.calc(p,b)},J.crossTraceCalc=function(p){return V._runCrossTraceCalc("treemap",p)}}}),iA=ze({"src/traces/treemap/flip_tree.js"(J,V){"use strict";V.exports=function p(b,E,k){var l;k.swapXY&&(l=b.x0,b.x0=b.y0,b.y0=l,l=b.x1,b.x1=b.y1,b.y1=l),k.flipX&&(l=b.x0,b.x0=E[0]-b.x1,b.x1=E[0]-l),k.flipY&&(l=b.y0,b.y0=E[1]-b.y1,b.y1=E[1]-l);var e=b.children;if(e)for(var t=0;t0)for(var u=0;u").join(" ")||"";var se=b.ensureSingle(re,"g","slicetext"),G=b.ensureSingle(se,"text","",function(K){K.attr("data-notex",1)}),X=b.ensureUniformFontSize(s,n.determineTextFont(B,Q,O.font,{onPathbar:!0}));G.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(E.font,X).call(k.convertToTspans,s),Q.textBB=E.bBox(G.node()),Q.transform=_(Q,{fontSize:X.size,onPathbar:!0}),Q.transform.fontSize=X.size,f?G.transition().attrTween("transform",function(K){var H=x(K,a,z,[i,w]);return function(Y){return T(H(Y))}}):G.attr("transform",T(Q))})}}}),lN=ze({"src/traces/treemap/plot_one.js"(J,V){"use strict";var p=ci(),b=(l0(),Po(_v)).interpolate,E=up(),k=Nr(),l=hv().TEXTPAD,e=Xv(),t=e.toMoveInsideBar,n=eh(),r=n.recordMinTextSize,a=u0(),o=sN();function s(c){return E.isHierarchyRoot(c)?"":E.getPtId(c)}V.exports=function(m,h,v,g,i){var w=m._fullLayout,S=h[0],M=S.trace,C=M.type,_=C==="icicle",T=S.hierarchy,f=E.findEntryWithLevel(T,M.level),u=p.select(v),A=u.selectAll("g.pathbar"),x=u.selectAll("g.slice");if(!f){A.remove(),x.remove();return}var z=E.isHierarchyRoot(f),I=!w.uniformtext.mode&&E.hasTransition(g),O=E.getMaxDepth(M),D=function(Xt){return Xt.data.depth-f.data.depth-1?j+Q:-($+Q):0,ne={x0:U,x1:U,y0:re,y1:re+$},se=function(Xt,or,Ot){var vt=M.tiling.pad,ht=function(Ke){return Ke-vt<=or.x0},De=function(Ke){return Ke+vt>=or.x1},Ne=function(Ke){return Ke-vt<=or.y0},We=function(Ke){return Ke+vt>=or.y1};return Xt.x0===or.x0&&Xt.x1===or.x1&&Xt.y0===or.y0&&Xt.y1===or.y1?{x0:Xt.x0,x1:Xt.x1,y0:Xt.y0,y1:Xt.y1}:{x0:ht(Xt.x0-vt)?0:De(Xt.x0-vt)?Ot[0]:Xt.x0,x1:ht(Xt.x1+vt)?0:De(Xt.x1+vt)?Ot[0]:Xt.x1,y0:Ne(Xt.y0-vt)?0:We(Xt.y0-vt)?Ot[1]:Xt.y0,y1:Ne(Xt.y1+vt)?0:We(Xt.y1+vt)?Ot[1]:Xt.y1}},G=null,X={},K={},H=null,Y=function(Xt,or){return or?X[s(Xt)]:K[s(Xt)]},q=function(Xt,or,Ot,vt){if(or)return X[s(T)]||ne;var ht=K[M.level]||Ot;return D(Xt)?se(Xt,ht,vt):{}};S.hasMultipleRoots&&z&&O++,M._maxDepth=O,M._backgroundColor=w.paper_bgcolor,M._entryDepth=f.data.depth,M._atRootLevel=z;var Z=-P/2+B.l+B.w*(F.x[1]+F.x[0])/2,ee=-j/2+B.t+B.h*(1-(F.y[1]+F.y[0])/2),ae=function(Xt){return Z+Xt},he=function(Xt){return ee+Xt},xe=he(0),we=ae(0),Me=function(Xt){return we+Xt},Se=function(Xt){return xe+Xt};function Ie(Xt,or){return Xt+","+or}var Ve=Me(0),Ge=function(Xt){Xt.x=Math.max(Ve,Xt.x)},ke=M.pathbar.edgeshape,_e=function(Xt){var or=Me(Math.max(Math.min(Xt.x0,Xt.x0),0)),Ot=Me(Math.min(Math.max(Xt.x1,Xt.x1),U)),vt=Se(Xt.y0),ht=Se(Xt.y1),De=$/2,Ne={},We={};Ne.x=or,We.x=Ot,Ne.y=We.y=(vt+ht)/2;var Ke={x:or,y:vt},Je={x:Ot,y:vt},et={x:Ot,y:ht},Mt={x:or,y:ht};return ke===">"?(Ke.x-=De,Je.x-=De,et.x-=De,Mt.x-=De):ke==="/"?(et.x-=De,Mt.x-=De,Ne.x-=De/2,We.x-=De/2):ke==="\\"?(Ke.x-=De,Je.x-=De,Ne.x-=De/2,We.x-=De/2):ke==="<"&&(Ne.x-=De,We.x-=De),Ge(Ke),Ge(Mt),Ge(Ne),Ge(Je),Ge(et),Ge(We),"M"+Ie(Ke.x,Ke.y)+"L"+Ie(Je.x,Je.y)+"L"+Ie(We.x,We.y)+"L"+Ie(et.x,et.y)+"L"+Ie(Mt.x,Mt.y)+"L"+Ie(Ne.x,Ne.y)+"Z"},ce=M[_?"tiling":"marker"].pad,ve=function(Xt){return M.textposition.indexOf(Xt)!==-1},le=ve("top"),Ae=ve("left"),Be=ve("right"),Xe=ve("bottom"),Ye=function(Xt){var or=ae(Xt.x0),Ot=ae(Xt.x1),vt=he(Xt.y0),ht=he(Xt.y1),De=Ot-or,Ne=ht-vt;if(!De||!Ne)return"";var We=M.marker.cornerradius||0,Ke=Math.min(We,De/2,Ne/2);Ke&&Xt.data&&Xt.data.data&&Xt.data.data.label&&(le&&(Ke=Math.min(Ke,ce.t)),Ae&&(Ke=Math.min(Ke,ce.l)),Be&&(Ke=Math.min(Ke,ce.r)),Xe&&(Ke=Math.min(Ke,ce.b)));var Je=function(et,Mt){return Ke?"a"+Ie(Ke,Ke)+" 0 0 1 "+Ie(et,Mt):""};return"M"+Ie(or,vt+Ke)+Je(Ke,-Ke)+"L"+Ie(Ot-Ke,vt)+Je(Ke,Ke)+"L"+Ie(Ot,ht-Ke)+Je(-Ke,Ke)+"L"+Ie(or+Ke,ht)+Je(-Ke,-Ke)+"Z"},yt=function(Xt,or){var Ot=Xt.x0,vt=Xt.x1,ht=Xt.y0,De=Xt.y1,Ne=Xt.textBB,We=le||or.isHeader&&!Xe,Ke=We?"start":Xe?"end":"middle",Je=ve("right"),et=ve("left")||or.onPathbar,Mt=et?-1:Je?1:0;if(or.isHeader){if(Ot+=(_?ce:ce.l)-l,vt-=(_?ce:ce.r)-l,Ot>=vt){var pt=(Ot+vt)/2;Ot=pt,vt=pt}var Pt;Xe?(Pt=De-(_?ce:ce.b),ht-1,flipY:F.tiling.flip.indexOf("y")>-1,pad:{inner:F.tiling.pad,top:F.marker.pad.t,left:F.marker.pad.l,right:F.marker.pad.r,bottom:F.marker.pad.b}}),re=Q.descendants(),ne=1/0,se=-1/0;re.forEach(function(Y){var q=Y.depth;q>=F._maxDepth?(Y.x0=Y.x1=(Y.x0+Y.x1)/2,Y.y0=Y.y1=(Y.y0+Y.y1)/2):(ne=Math.min(ne,q),se=Math.max(se,q))}),v=v.data(re,n.getPtId),F._maxVisibleLayers=isFinite(se)?se-ne+1:0,v.enter().append("g").classed("slice",!0),u(v,o,I,[i,w],C),v.order();var G=null;if(f&&z){var X=n.getPtId(z);v.each(function(Y){G===null&&n.getPtId(Y)===X&&(G={x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1})})}var K=function(){return G||{x0:0,x1:i,y0:0,y1:w}},H=v;return f&&(H=H.transition().each("end",function(){var Y=p.select(this);n.setSliceCursor(Y,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),H.each(function(Y){var q=n.isHeader(Y,F);Y._x0=S(Y.x0),Y._x1=S(Y.x1),Y._y0=M(Y.y0),Y._y1=M(Y.y1),Y._hoverX=S(Y.x1-F.marker.pad.r),Y._hoverY=M(U?Y.y1-F.marker.pad.b/2:Y.y0+F.marker.pad.t/2);var Z=p.select(this),ee=b.ensureSingle(Z,"path","surface",function(Se){Se.style("pointer-events",O?"none":"all")});f?ee.transition().attrTween("d",function(Se){var Ie=A(Se,o,K(),[i,w]);return function(Ve){return C(Ie(Ve))}}):ee.attr("d",C),Z.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),ee.call(e,Y,F,c,{hovered:!1}),Y.x0===Y.x1||Y.y0===Y.y1?Y._text="":q?Y._text=$?"":n.getPtLabel(Y)||"":Y._text=a(Y,h,F,m,D)||"";var ae=b.ensureSingle(Z,"g","slicetext"),he=b.ensureSingle(ae,"text","",function(Se){Se.attr("data-notex",1)}),xe=b.ensureUniformFontSize(c,n.determineTextFont(F,Y,D.font)),we=Y._text||" ",Me=q&&we.indexOf("
")===-1;he.text(we).classed("slicetext",!0).attr("text-anchor",j?"end":P||Me?"start":"middle").call(E.font,xe).call(k.convertToTspans,c),Y.textBB=E.bBox(he.node()),Y.transform=_(Y,{fontSize:xe.size,isHeader:q}),Y.transform.fontSize=xe.size,f?he.transition().attrTween("transform",function(Se){var Ie=x(Se,o,K(),[i,w]);return function(Ve){return T(Ie(Ve))}}):he.attr("transform",T(Y))}),G}}}),cN=ze({"src/traces/treemap/plot.js"(J,V){"use strict";var p=sA(),b=uN();V.exports=function(k,l,e,t){return p(k,l,e,t,{type:"treemap",drawDescendants:b})}}}),fN=ze({"src/traces/treemap/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"treemap",basePlotModule:nN(),categories:[],animatable:!0,attributes:x2(),layoutAttributes:aA(),supplyDefaults:iN(),supplyLayoutDefaults:oN(),calc:nA().calc,crossTraceCalc:nA().crossTraceCalc,plot:cN(),style:b2().style,colorbar:Of(),meta:{}}}}),hN=ze({"lib/treemap.js"(J,V){"use strict";V.exports=fN()}}),dN=ze({"src/traces/icicle/base_plot.js"(J){"use strict";var V=cl();J.name="icicle",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),lA=ze({"src/traces/icicle/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=qs(),l=Ml().attributes,e=t0(),t=R1(),n=x2(),r=u0(),a=Ki().extendFlat,o=Uc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:n.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:a({colors:t.marker.colors,line:t.marker.line,pattern:o,editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:n.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:b({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:p({},{keys:r.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n.outsidetextfont,textposition:n.textposition,sort:e.sort,root:t.root,domain:l({name:"icicle",trace:!0,editType:"calc"})}}}),uA=ze({"src/traces/icicle/layout_attributes.js"(J,V){"use strict";V.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),pN=ze({"src/traces/icicle/defaults.js"(J,V){"use strict";var p=Nr(),b=lA(),E=Qn(),k=Ml().defaults,l=qh().handleText,e=hv().TEXTPAD,t=r0().handleMarkerDefaults,n=fl(),r=n.hasColorscale,a=n.handleDefaults;V.exports=function(s,c,m,h){function v(T,f){return p.coerce(s,c,b,T,f)}var g=v("labels"),i=v("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=v("values");w&&w.length?v("branchvalues"):v("count"),v("level"),v("maxdepth"),v("tiling.orientation"),v("tiling.flip"),v("tiling.pad");var S=v("text");v("texttemplate"),v("texttemplatefallback"),c.texttemplate||v("textinfo",p.isArrayOrTypedArray(S)?"text+label":"label"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var M=v("pathbar.visible"),C="auto";l(s,c,h,v,C,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition"),t(s,c,h,v);var _=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;_&&a(s,c,h,v,{prefix:"marker.",cLetter:"c"}),v("leaf.opacity",_?1:.7),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},M&&(v("pathbar.thickness",c.pathbar.textfont.size+2*e),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),k(c,h,v),c._length=null}}}),vN=ze({"src/traces/icicle/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=uA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("iciclecolorway",l.colorway),e("extendiciclecolors")}}}),cA=ze({"src/traces/icicle/calc.js"(J){"use strict";var V=D1();J.calc=function(p,b){return V.calc(p,b)},J.crossTraceCalc=function(p){return V._runCrossTraceCalc("icicle",p)}}}),mN=ze({"src/traces/icicle/partition.js"(J,V){"use strict";var p=I1(),b=iA();V.exports=function(k,l,e){var t=e.flipX,n=e.flipY,r=e.orientation==="h",a=e.maxDepth,o=l[0],s=l[1];a&&(o=(k.height+1)*l[0]/Math.min(k.height+1,a),s=(k.height+1)*l[1]/Math.min(k.height+1,a));var c=p.partition().padding(e.pad.inner).size(r?[l[1],o]:[l[0],s])(k);return(r||t||n)&&b(c,l,{swapXY:r,flipX:t,flipY:n}),c}}}),fA=ze({"src/traces/icicle/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=Nr(),k=eh().resizeText,l=y2();function e(n){var r=n._fullLayout._iciclelayer.selectAll(".trace");k(n,r,"icicle"),r.each(function(a){var o=p.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){p.select(this).call(t,m,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(a,m,"marker.line.color")||b.defaultLine,v=E.castOption(a,m,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",v).call(b.stroke,h).style("opacity",c?a.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),gN=ze({"src/traces/icicle/draw_descendants.js"(J,V){"use strict";var p=ci(),b=Nr(),E=$i(),k=Cs(),l=mN(),e=fA().styleOne,t=u0(),n=up(),r=$1(),a=_2().formatSliceLabel,o=!1;V.exports=function(c,m,h,v,g){var i=g.width,w=g.height,S=g.viewX,M=g.viewY,C=g.pathSlice,_=g.toMoveInsideSlice,T=g.strTransform,f=g.hasTransition,u=g.handleSlicesExit,A=g.makeUpdateSliceInterpolator,x=g.makeUpdateTextInterpolator,z=g.prevEntry,I={},O=c._context.staticPlot,D=c._fullLayout,B=m[0],F=B.trace,P=F.textposition.indexOf("left")!==-1,j=F.textposition.indexOf("right")!==-1,U=F.textposition.indexOf("bottom")!==-1,$=l(h,[i,w],{flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1,orientation:F.tiling.orientation,pad:{inner:F.tiling.pad},maxDepth:F._maxDepth}),Q=$.descendants(),re=1/0,ne=-1/0;Q.forEach(function(H){var Y=H.depth;Y>=F._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(re=Math.min(re,Y),ne=Math.max(ne,Y))}),v=v.data(Q,n.getPtId),F._maxVisibleLayers=isFinite(ne)?ne-re+1:0,v.enter().append("g").classed("slice",!0),u(v,o,I,[i,w],C),v.order();var se=null;if(f&&z){var G=n.getPtId(z);v.each(function(H){se===null&&n.getPtId(H)===G&&(se={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var X=function(){return se||{x0:0,x1:i,y0:0,y1:w}},K=v;return f&&(K=K.transition().each("end",function(){var H=p.select(this);n.setSliceCursor(H,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(H){H._x0=S(H.x0),H._x1=S(H.x1),H._y0=M(H.y0),H._y1=M(H.y1),H._hoverX=S(H.x1-F.tiling.pad),H._hoverY=M(U?H.y1-F.tiling.pad/2:H.y0+F.tiling.pad/2);var Y=p.select(this),q=b.ensureSingle(Y,"path","surface",function(he){he.style("pointer-events",O?"none":"all")});f?q.transition().attrTween("d",function(he){var xe=A(he,o,X(),[i,w],{orientation:F.tiling.orientation,flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1});return function(we){return C(xe(we))}}):q.attr("d",C),Y.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),q.call(e,H,F,c,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":H._text=a(H,h,F,m,D)||"";var Z=b.ensureSingle(Y,"g","slicetext"),ee=b.ensureSingle(Z,"text","",function(he){he.attr("data-notex",1)}),ae=b.ensureUniformFontSize(c,n.determineTextFont(F,H,D.font));ee.text(H._text||" ").classed("slicetext",!0).attr("text-anchor",j?"end":P?"start":"middle").call(E.font,ae).call(k.convertToTspans,c),H.textBB=E.bBox(ee.node()),H.transform=_(H,{fontSize:ae.size}),H.transform.fontSize=ae.size,f?ee.transition().attrTween("transform",function(he){var xe=x(he,o,X(),[i,w]);return function(we){return T(xe(we))}}):ee.attr("transform",T(H))}),se}}}),yN=ze({"src/traces/icicle/plot.js"(J,V){"use strict";var p=sA(),b=gN();V.exports=function(k,l,e,t){return p(k,l,e,t,{type:"icicle",drawDescendants:b})}}}),_N=ze({"src/traces/icicle/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"icicle",basePlotModule:dN(),categories:[],animatable:!0,attributes:lA(),layoutAttributes:uA(),supplyDefaults:pN(),supplyLayoutDefaults:vN(),calc:cA().calc,crossTraceCalc:cA().crossTraceCalc,plot:yN(),style:fA().style,colorbar:Of(),meta:{}}}}),xN=ze({"lib/icicle.js"(J,V){"use strict";V.exports=_N()}}),bN=ze({"src/traces/funnelarea/base_plot.js"(J){"use strict";var V=cl();J.name="funnelarea",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),hA=ze({"src/traces/funnelarea/attributes.js"(J,V){"use strict";var p=t0(),b=ws(),E=Ml().attributes,{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=Ki().extendFlat;V.exports={labels:p.labels,label0:p.label0,dlabel:p.dlabel,values:p.values,marker:{colors:p.marker.colors,line:{color:t({},p.marker.line.color,{dflt:null}),width:t({},p.marker.line.width,{dflt:1}),editType:"calc"},pattern:p.marker.pattern,editType:"calc"},text:p.text,hovertext:p.hovertext,scalegroup:t({},p.scalegroup,{}),textinfo:t({},p.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:t({},b.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:k({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:t({},p.textposition,{values:["inside","none"],dflt:"inside"}),textfont:p.textfont,insidetextfont:p.insidetextfont,title:{text:p.title.text,font:p.title.font,position:t({},p.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:E({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"}}}}),dA=ze({"src/traces/funnelarea/layout_attributes.js"(J,V){"use strict";var p=qb().hiddenlabels;V.exports={hiddenlabels:p,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),wN=ze({"src/traces/funnelarea/defaults.js"(J,V){"use strict";var p=Nr(),b=hA(),E=Ml().defaults,k=qh().handleText,l=r0().handleLabelsAndValues,e=r0().handleMarkerDefaults;V.exports=function(n,r,a,o){function s(C,_){return p.coerce(n,r,b,C,_)}var c=s("labels"),m=s("values"),h=l(c,m),v=h.len;if(r._hasLabels=h.hasLabels,r._hasValues=h.hasValues,!r._hasLabels&&r._hasValues&&(s("label0"),s("dlabel")),!v){r.visible=!1;return}r._length=v,e(n,r,o,s),s("scalegroup");var g=s("text"),i=s("texttemplate");s("texttemplatefallback");var w;if(i||(w=s("textinfo",Array.isArray(g)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),i||w&&w!=="none"){var S=s("textposition");k(n,r,o,s,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else w==="none"&&s("textposition","none");E(r,o,s);var M=s("title.text");M&&(s("title.position"),p.coerceFont(s,"title.font",o.font)),s("aspectratio"),s("baseratio")}}}),TN=ze({"src/traces/funnelarea/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=dA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("hiddenlabels"),e("funnelareacolorway",l.colorway),e("extendfunnelareacolors")}}}),pA=ze({"src/traces/funnelarea/calc.js"(J,V){"use strict";var p=ug();function b(k,l){return p.calc(k,l)}function E(k){p.crossTraceCalc(k,{type:"funnelarea"})}V.exports={calc:b,crossTraceCalc:E}}}),AN=ze({"src/traces/funnelarea/plot.js"(J,V){"use strict";var p=ci(),b=$i(),E=Nr(),k=E.strScale,l=E.strTranslate,e=Cs(),t=Xv(),n=t.toMoveInsideBar,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=lv(),c=Vb(),m=c.attachFxHandlers,h=c.determineInsideTextFont,v=c.layoutAreas,g=c.prerenderTitles,i=c.positionTitleOutside,w=c.formatSliceLabel;V.exports=function(T,f){var u=T._context.staticPlot,A=T._fullLayout;o("funnelarea",A),g(f,T),v(f,A._size),E.makeTraceGroups(A._funnelarealayer,f,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace;C(x),z.each(function(){var D=p.select(this).selectAll("g.slice").data(x);D.enter().append("g").classed("slice",!0),D.exit().remove(),D.each(function(F,P){if(F.hidden){p.select(this).selectAll("path,g").remove();return}F.pointNumber=F.i,F.curveNumber=O.index;var j=I.cx,U=I.cy,$=p.select(this),Q=$.selectAll("path.surface").data([F]);Q.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),$.call(m,T,x);var re="M"+(j+F.TR[0])+","+(U+F.TR[1])+S(F.TR,F.BR)+S(F.BR,F.BL)+S(F.BL,F.TL)+"Z";Q.attr("d",re),w(T,F,I);var ne=s.castOption(O.textposition,F.pts),se=$.selectAll("g.slicetext").data(F.text&&ne!=="none"?[0]:[]);se.enter().append("g").classed("slicetext",!0),se.exit().remove(),se.each(function(){var G=E.ensureSingle(p.select(this),"text","",function(ae){ae.attr("data-notex",1)}),X=E.ensureUniformFontSize(T,h(O,F,A.font));G.text(F.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(b.font,X).call(e.convertToTspans,T);var K=b.bBox(G.node()),H,Y,q,Z=Math.min(F.BL[1],F.BR[1])+U,ee=Math.max(F.TL[1],F.TR[1])+U;Y=Math.max(F.TL[0],F.BL[0])+j,q=Math.min(F.TR[0],F.BR[0])+j,H=n(Y,q,Z,ee,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),H.fontSize=X.size,a(O.type,H,A),x[P].transform=H,E.setTransormAndDisplay(G,H)})});var B=p.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);B.enter().append("g").classed("titletext",!0),B.exit().remove(),B.each(function(){var F=E.ensureSingle(p.select(this),"text","",function(U){U.attr("data-notex",1)}),P=O.title.text;O._meta&&(P=E.templateString(P,O._meta)),F.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(b.font,O.title.font).call(e.convertToTspans,T);var j=i(I,A._size);F.attr("transform",l(j.x,j.y)+k(Math.min(1,j.scale))+l(j.tx,j.ty))})})})};function S(_,T){var f=T[0]-_[0],u=T[1]-_[1];return"l"+f+","+u}function M(_,T){return[.5*(_[0]+T[0]),.5*(_[1]+T[1])]}function C(_){if(!_.length)return;var T=_[0],f=T.trace,u=f.aspectratio,A=f.baseratio;A>.999&&(A=.999);var x=Math.pow(A,2),z=T.vTotal,I=z*x/(1-x),O=z,D=I/z;function B(){var he=Math.sqrt(D);return{x:he,y:-he}}function F(){var he=B();return[he.x,he.y]}var P,j=[];j.push(F());var U,$;for(U=_.length-1;U>-1;U--)if($=_[U],!$.hidden){var Q=$.v/O;D+=Q,j.push(F())}var re=1/0,ne=-1/0;for(U=0;U-1;U--)if($=_[U],!$.hidden){Z+=1;var ee=j[Z][0],ae=j[Z][1];$.TL=[-ee,ae],$.TR=[ee,ae],$.BL=Y,$.BR=q,$.pxmid=M($.TR,$.BR),Y=$.TL,q=$.TR}}}}),MN=ze({"src/traces/funnelarea/style.js"(J,V){"use strict";var p=ci(),b=Zm(),E=eh().resizeText;V.exports=function(l){var e=l._fullLayout._funnelarealayer.selectAll(".trace");E(l,e,"funnelarea"),e.each(function(t){var n=t[0],r=n.trace,a=p.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){p.select(this).call(b,o,r,l)})})}}}),SN=ze({"src/traces/funnelarea/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"funnelarea",basePlotModule:bN(),categories:["pie-like","funnelarea","showLegend"],attributes:hA(),layoutAttributes:dA(),supplyDefaults:wN(),supplyLayoutDefaults:TN(),calc:pA().calc,crossTraceCalc:pA().crossTraceCalc,plot:AN(),style:MN(),styleOne:Zm(),meta:{}}}}),EN=ze({"lib/funnelarea.js"(J,V){"use strict";V.exports=SN()}}),df=ze({"stackgl_modules/index.js"(J,V){"use strict";(function(){var p={1964:function(l,e,t){l.exports={alpha_shape:t(3502),convex_hull:t(7352),delaunay_triangulate:t(7642),gl_cone3d:t(6405),gl_error3d:t(9165),gl_line3d:t(5714),gl_mesh3d:t(7201),gl_plot3d:t(4100),gl_scatter3d:t(8418),gl_streamtube3d:t(7815),gl_surface3d:t(9499),ndarray:t(9618),ndarray_linear_interpolate:t(4317)}},4793:function(l,e,t){"use strict";var n,r=t(7507),a=t(3778),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=h,n=u,e.IS=50;var s=2147483647;n=s,h.TYPED_ARRAY_SUPPORT=c(),!h.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 c(){try{var ke=new Uint8Array(1),_e={foo:function(){return 42}};return Object.setPrototypeOf(_e,Uint8Array.prototype),Object.setPrototypeOf(ke,_e),ke.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function m(ke){if(ke>s)throw new RangeError('The value "'+ke+'" is invalid for option "size"');var _e=new Uint8Array(ke);return Object.setPrototypeOf(_e,h.prototype),_e}function h(ke,_e,ce){if(typeof ke=="number"){if(typeof _e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(ke)}return v(ke,_e,ce)}h.poolSize=8192;function v(ke,_e,ce){if(typeof ke=="string")return S(ke,_e);if(ArrayBuffer.isView(ke))return C(ke);if(ke==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke);if(Ie(ke,ArrayBuffer)||ke&&Ie(ke.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ke,SharedArrayBuffer)||ke&&Ie(ke.buffer,SharedArrayBuffer)))return _(ke,_e,ce);if(typeof ke=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ve=ke.valueOf&&ke.valueOf();if(ve!=null&&ve!==ke)return h.from(ve,_e,ce);var le=T(ke);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ke[Symbol.toPrimitive]=="function")return h.from(ke[Symbol.toPrimitive]("string"),_e,ce);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}h.from=function(ke,_e,ce){return v(ke,_e,ce)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function g(ke){if(typeof ke!="number")throw new TypeError('"size" argument must be of type number');if(ke<0)throw new RangeError('The value "'+ke+'" is invalid for option "size"')}function i(ke,_e,ce){return g(ke),ke<=0?m(ke):_e!==void 0?typeof ce=="string"?m(ke).fill(_e,ce):m(ke).fill(_e):m(ke)}h.alloc=function(ke,_e,ce){return i(ke,_e,ce)};function w(ke){return g(ke),m(ke<0?0:f(ke)|0)}h.allocUnsafe=function(ke){return w(ke)},h.allocUnsafeSlow=function(ke){return w(ke)};function S(ke,_e){if((typeof _e!="string"||_e==="")&&(_e="utf8"),!h.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);var ce=A(ke,_e)|0,ve=m(ce),le=ve.write(ke,_e);return le!==ce&&(ve=ve.slice(0,le)),ve}function M(ke){for(var _e=ke.length<0?0:f(ke.length)|0,ce=m(_e),ve=0;ve<_e;ve+=1)ce[ve]=ke[ve]&255;return ce}function C(ke){if(Ie(ke,Uint8Array)){var _e=new Uint8Array(ke);return _(_e.buffer,_e.byteOffset,_e.byteLength)}return M(ke)}function _(ke,_e,ce){if(_e<0||ke.byteLength<_e)throw new RangeError('"offset" is outside of buffer bounds');if(ke.byteLength<_e+(ce||0))throw new RangeError('"length" is outside of buffer bounds');var ve;return _e===void 0&&ce===void 0?ve=new Uint8Array(ke):ce===void 0?ve=new Uint8Array(ke,_e):ve=new Uint8Array(ke,_e,ce),Object.setPrototypeOf(ve,h.prototype),ve}function T(ke){if(h.isBuffer(ke)){var _e=f(ke.length)|0,ce=m(_e);return ce.length===0||ke.copy(ce,0,0,_e),ce}if(ke.length!==void 0)return typeof ke.length!="number"||Ve(ke.length)?m(0):M(ke);if(ke.type==="Buffer"&&Array.isArray(ke.data))return M(ke.data)}function f(ke){if(ke>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return ke|0}function u(ke){return+ke!=ke&&(ke=0),h.alloc(+ke)}h.isBuffer=function(_e){return _e!=null&&_e._isBuffer===!0&&_e!==h.prototype},h.compare=function(_e,ce){if(Ie(_e,Uint8Array)&&(_e=h.from(_e,_e.offset,_e.byteLength)),Ie(ce,Uint8Array)&&(ce=h.from(ce,ce.offset,ce.byteLength)),!h.isBuffer(_e)||!h.isBuffer(ce))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_e===ce)return 0;for(var ve=_e.length,le=ce.length,Ae=0,Be=Math.min(ve,le);Aele.length?h.from(Be).copy(le,Ae):Uint8Array.prototype.set.call(le,Be,Ae);else if(h.isBuffer(Be))Be.copy(le,Ae);else throw new TypeError('"list" argument must be an Array of Buffers');Ae+=Be.length}return le};function A(ke,_e){if(h.isBuffer(ke))return ke.length;if(ArrayBuffer.isView(ke)||Ie(ke,ArrayBuffer))return ke.byteLength;if(typeof ke!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ke);var ce=ke.length,ve=arguments.length>2&&arguments[2]===!0;if(!ve&&ce===0)return 0;for(var le=!1;;)switch(_e){case"ascii":case"latin1":case"binary":return ce;case"utf8":case"utf-8":return he(ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce*2;case"hex":return ce>>>1;case"base64":return Me(ke).length;default:if(le)return ve?-1:he(ke).length;_e=(""+_e).toLowerCase(),le=!0}}h.byteLength=A;function x(ke,_e,ce){var ve=!1;if((_e===void 0||_e<0)&&(_e=0),_e>this.length||((ce===void 0||ce>this.length)&&(ce=this.length),ce<=0)||(ce>>>=0,_e>>>=0,ce<=_e))return"";for(ke||(ke="utf8");;)switch(ke){case"hex":return G(this,_e,ce);case"utf8":case"utf-8":return $(this,_e,ce);case"ascii":return ne(this,_e,ce);case"latin1":case"binary":return se(this,_e,ce);case"base64":return U(this,_e,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,_e,ce);default:if(ve)throw new TypeError("Unknown encoding: "+ke);ke=(ke+"").toLowerCase(),ve=!0}}h.prototype._isBuffer=!0;function z(ke,_e,ce){var ve=ke[_e];ke[_e]=ke[ce],ke[ce]=ve}h.prototype.swap16=function(){var _e=this.length;if(_e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ce=0;ce<_e;ce+=2)z(this,ce,ce+1);return this},h.prototype.swap32=function(){var _e=this.length;if(_e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ce=0;ce<_e;ce+=4)z(this,ce,ce+3),z(this,ce+1,ce+2);return this},h.prototype.swap64=function(){var _e=this.length;if(_e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ce=0;ce<_e;ce+=8)z(this,ce,ce+7),z(this,ce+1,ce+6),z(this,ce+2,ce+5),z(this,ce+3,ce+4);return this},h.prototype.toString=function(){var _e=this.length;return _e===0?"":arguments.length===0?$(this,0,_e):x.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(_e){if(!h.isBuffer(_e))throw new TypeError("Argument must be a Buffer");return this===_e?!0:h.compare(this,_e)===0},h.prototype.inspect=function(){var _e="",ce=e.IS;return _e=this.toString("hex",0,ce).replace(/(.{2})/g,"$1 ").trim(),this.length>ce&&(_e+=" ... "),""},o&&(h.prototype[o]=h.prototype.inspect),h.prototype.compare=function(_e,ce,ve,le,Ae){if(Ie(_e,Uint8Array)&&(_e=h.from(_e,_e.offset,_e.byteLength)),!h.isBuffer(_e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _e);if(ce===void 0&&(ce=0),ve===void 0&&(ve=_e?_e.length:0),le===void 0&&(le=0),Ae===void 0&&(Ae=this.length),ce<0||ve>_e.length||le<0||Ae>this.length)throw new RangeError("out of range index");if(le>=Ae&&ce>=ve)return 0;if(le>=Ae)return-1;if(ce>=ve)return 1;if(ce>>>=0,ve>>>=0,le>>>=0,Ae>>>=0,this===_e)return 0;for(var Be=Ae-le,Xe=ve-ce,Ye=Math.min(Be,Xe),yt=this.slice(le,Ae),gt=_e.slice(ce,ve),Tt=0;Tt2147483647?ce=2147483647:ce<-2147483648&&(ce=-2147483648),ce=+ce,Ve(ce)&&(ce=le?0:ke.length-1),ce<0&&(ce=ke.length+ce),ce>=ke.length){if(le)return-1;ce=ke.length-1}else if(ce<0)if(le)ce=0;else return-1;if(typeof _e=="string"&&(_e=h.from(_e,ve)),h.isBuffer(_e))return _e.length===0?-1:O(ke,_e,ce,ve,le);if(typeof _e=="number")return _e=_e&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(ke,_e,ce):Uint8Array.prototype.lastIndexOf.call(ke,_e,ce):O(ke,[_e],ce,ve,le);throw new TypeError("val must be string, number or Buffer")}function O(ke,_e,ce,ve,le){var Ae=1,Be=ke.length,Xe=_e.length;if(ve!==void 0&&(ve=String(ve).toLowerCase(),ve==="ucs2"||ve==="ucs-2"||ve==="utf16le"||ve==="utf-16le")){if(ke.length<2||_e.length<2)return-1;Ae=2,Be/=2,Xe/=2,ce/=2}function Ye($t,rr){return Ae===1?$t[rr]:$t.readUInt16BE(rr*Ae)}var yt;if(le){var gt=-1;for(yt=ce;ytBe&&(ce=Be-Xe),yt=ce;yt>=0;yt--){for(var Tt=!0,At=0;Atle&&(ve=le)):ve=le;var Ae=_e.length;ve>Ae/2&&(ve=Ae/2);for(var Be=0;Be>>0,isFinite(ve)?(ve=ve>>>0,le===void 0&&(le="utf8")):(le=ve,ve=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ae=this.length-ce;if((ve===void 0||ve>Ae)&&(ve=Ae),_e.length>0&&(ve<0||ce<0)||ce>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var Be=!1;;)switch(le){case"hex":return D(this,_e,ce,ve);case"utf8":case"utf-8":return B(this,_e,ce,ve);case"ascii":case"latin1":case"binary":return F(this,_e,ce,ve);case"base64":return P(this,_e,ce,ve);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,_e,ce,ve);default:if(Be)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),Be=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(ke,_e,ce){return _e===0&&ce===ke.length?r.fromByteArray(ke):r.fromByteArray(ke.slice(_e,ce))}function $(ke,_e,ce){ce=Math.min(ke.length,ce);for(var ve=[],le=_e;le239?4:Ae>223?3:Ae>191?2:1;if(le+Xe<=ce){var Ye,yt,gt,Tt;switch(Xe){case 1:Ae<128&&(Be=Ae);break;case 2:Ye=ke[le+1],(Ye&192)===128&&(Tt=(Ae&31)<<6|Ye&63,Tt>127&&(Be=Tt));break;case 3:Ye=ke[le+1],yt=ke[le+2],(Ye&192)===128&&(yt&192)===128&&(Tt=(Ae&15)<<12|(Ye&63)<<6|yt&63,Tt>2047&&(Tt<55296||Tt>57343)&&(Be=Tt));break;case 4:Ye=ke[le+1],yt=ke[le+2],gt=ke[le+3],(Ye&192)===128&&(yt&192)===128&&(gt&192)===128&&(Tt=(Ae&15)<<18|(Ye&63)<<12|(yt&63)<<6|gt&63,Tt>65535&&Tt<1114112&&(Be=Tt))}}Be===null?(Be=65533,Xe=1):Be>65535&&(Be-=65536,ve.push(Be>>>10&1023|55296),Be=56320|Be&1023),ve.push(Be),le+=Xe}return re(ve)}var Q=4096;function re(ke){var _e=ke.length;if(_e<=Q)return String.fromCharCode.apply(String,ke);for(var ce="",ve=0;ve<_e;)ce+=String.fromCharCode.apply(String,ke.slice(ve,ve+=Q));return ce}function ne(ke,_e,ce){var ve="";ce=Math.min(ke.length,ce);for(var le=_e;leve)&&(ce=ve);for(var le="",Ae=_e;Aeve&&(_e=ve),ce<0?(ce+=ve,ce<0&&(ce=0)):ce>ve&&(ce=ve),ce<_e&&(ce=_e);var le=this.subarray(_e,ce);return Object.setPrototypeOf(le,h.prototype),le};function K(ke,_e,ce){if(ke%1!==0||ke<0)throw new RangeError("offset is not uint");if(ke+_e>ce)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e],Ae=1,Be=0;++Be>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e+--ce],Ae=1;ce>0&&(Ae*=256);)le+=this[_e+--ce]*Ae;return le},h.prototype.readUint8=h.prototype.readUInt8=function(_e,ce){return _e=_e>>>0,ce||K(_e,1,this.length),this[_e]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,2,this.length),this[_e]|this[_e+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,2,this.length),this[_e]<<8|this[_e+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),(this[_e]|this[_e+1]<<8|this[_e+2]<<16)+this[_e+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]*16777216+(this[_e+1]<<16|this[_e+2]<<8|this[_e+3])},h.prototype.readIntLE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e],Ae=1,Be=0;++Be=Ae&&(le-=Math.pow(2,8*ce)),le},h.prototype.readIntBE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=ce,Ae=1,Be=this[_e+--le];le>0&&(Ae*=256);)Be+=this[_e+--le]*Ae;return Ae*=128,Be>=Ae&&(Be-=Math.pow(2,8*ce)),Be},h.prototype.readInt8=function(_e,ce){return _e=_e>>>0,ce||K(_e,1,this.length),this[_e]&128?(255-this[_e]+1)*-1:this[_e]},h.prototype.readInt16LE=function(_e,ce){_e=_e>>>0,ce||K(_e,2,this.length);var ve=this[_e]|this[_e+1]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt16BE=function(_e,ce){_e=_e>>>0,ce||K(_e,2,this.length);var ve=this[_e+1]|this[_e]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt32LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]|this[_e+1]<<8|this[_e+2]<<16|this[_e+3]<<24},h.prototype.readInt32BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]<<24|this[_e+1]<<16|this[_e+2]<<8|this[_e+3]},h.prototype.readFloatLE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),a.read(this,_e,!0,23,4)},h.prototype.readFloatBE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),a.read(this,_e,!1,23,4)},h.prototype.readDoubleLE=function(_e,ce){return _e=_e>>>0,ce||K(_e,8,this.length),a.read(this,_e,!0,52,8)},h.prototype.readDoubleBE=function(_e,ce){return _e=_e>>>0,ce||K(_e,8,this.length),a.read(this,_e,!1,52,8)};function H(ke,_e,ce,ve,le,Ae){if(!h.isBuffer(ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(_e>le||_eke.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,ve=ve>>>0,!le){var Ae=Math.pow(2,8*ve)-1;H(this,_e,ce,ve,Ae,0)}var Be=1,Xe=0;for(this[ce]=_e&255;++Xe>>0,ve=ve>>>0,!le){var Ae=Math.pow(2,8*ve)-1;H(this,_e,ce,ve,Ae,0)}var Be=ve-1,Xe=1;for(this[ce+Be]=_e&255;--Be>=0&&(Xe*=256);)this[ce+Be]=_e/Xe&255;return ce+ve},h.prototype.writeUint8=h.prototype.writeUInt8=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,1,255,0),this[ce]=_e&255,ce+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,65535,0),this[ce]=_e&255,this[ce+1]=_e>>>8,ce+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,65535,0),this[ce]=_e>>>8,this[ce+1]=_e&255,ce+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,4294967295,0),this[ce+3]=_e>>>24,this[ce+2]=_e>>>16,this[ce+1]=_e>>>8,this[ce]=_e&255,ce+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,4294967295,0),this[ce]=_e>>>24,this[ce+1]=_e>>>16,this[ce+2]=_e>>>8,this[ce+3]=_e&255,ce+4},h.prototype.writeIntLE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,!le){var Ae=Math.pow(2,8*ve-1);H(this,_e,ce,ve,Ae-1,-Ae)}var Be=0,Xe=1,Ye=0;for(this[ce]=_e&255;++Be>0)-Ye&255;return ce+ve},h.prototype.writeIntBE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,!le){var Ae=Math.pow(2,8*ve-1);H(this,_e,ce,ve,Ae-1,-Ae)}var Be=ve-1,Xe=1,Ye=0;for(this[ce+Be]=_e&255;--Be>=0&&(Xe*=256);)_e<0&&Ye===0&&this[ce+Be+1]!==0&&(Ye=1),this[ce+Be]=(_e/Xe>>0)-Ye&255;return ce+ve},h.prototype.writeInt8=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,1,127,-128),_e<0&&(_e=255+_e+1),this[ce]=_e&255,ce+1},h.prototype.writeInt16LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,32767,-32768),this[ce]=_e&255,this[ce+1]=_e>>>8,ce+2},h.prototype.writeInt16BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,32767,-32768),this[ce]=_e>>>8,this[ce+1]=_e&255,ce+2},h.prototype.writeInt32LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,2147483647,-2147483648),this[ce]=_e&255,this[ce+1]=_e>>>8,this[ce+2]=_e>>>16,this[ce+3]=_e>>>24,ce+4},h.prototype.writeInt32BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,2147483647,-2147483648),_e<0&&(_e=4294967295+_e+1),this[ce]=_e>>>24,this[ce+1]=_e>>>16,this[ce+2]=_e>>>8,this[ce+3]=_e&255,ce+4};function Y(ke,_e,ce,ve,le,Ae){if(ce+ve>ke.length)throw new RangeError("Index out of range");if(ce<0)throw new RangeError("Index out of range")}function q(ke,_e,ce,ve,le){return _e=+_e,ce=ce>>>0,le||Y(ke,_e,ce,4,34028234663852886e22,-34028234663852886e22),a.write(ke,_e,ce,ve,23,4),ce+4}h.prototype.writeFloatLE=function(_e,ce,ve){return q(this,_e,ce,!0,ve)},h.prototype.writeFloatBE=function(_e,ce,ve){return q(this,_e,ce,!1,ve)};function Z(ke,_e,ce,ve,le){return _e=+_e,ce=ce>>>0,le||Y(ke,_e,ce,8,17976931348623157e292,-17976931348623157e292),a.write(ke,_e,ce,ve,52,8),ce+8}h.prototype.writeDoubleLE=function(_e,ce,ve){return Z(this,_e,ce,!0,ve)},h.prototype.writeDoubleBE=function(_e,ce,ve){return Z(this,_e,ce,!1,ve)},h.prototype.copy=function(_e,ce,ve,le){if(!h.isBuffer(_e))throw new TypeError("argument should be a Buffer");if(ve||(ve=0),!le&&le!==0&&(le=this.length),ce>=_e.length&&(ce=_e.length),ce||(ce=0),le>0&&le=this.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),_e.length-ce>>0,ve=ve===void 0?this.length:ve>>>0,_e||(_e=0);var Be;if(typeof _e=="number")for(Be=ce;Be55295&&ce<57344){if(!le){if(ce>56319){(_e-=3)>-1&&Ae.push(239,191,189);continue}else if(Be+1===ve){(_e-=3)>-1&&Ae.push(239,191,189);continue}le=ce;continue}if(ce<56320){(_e-=3)>-1&&Ae.push(239,191,189),le=ce;continue}ce=(le-55296<<10|ce-56320)+65536}else le&&(_e-=3)>-1&&Ae.push(239,191,189);if(le=null,ce<128){if((_e-=1)<0)break;Ae.push(ce)}else if(ce<2048){if((_e-=2)<0)break;Ae.push(ce>>6|192,ce&63|128)}else if(ce<65536){if((_e-=3)<0)break;Ae.push(ce>>12|224,ce>>6&63|128,ce&63|128)}else if(ce<1114112){if((_e-=4)<0)break;Ae.push(ce>>18|240,ce>>12&63|128,ce>>6&63|128,ce&63|128)}else throw new Error("Invalid code point")}return Ae}function xe(ke){for(var _e=[],ce=0;ce>8,le=ce%256,Ae.push(le),Ae.push(ve);return Ae}function Me(ke){return r.toByteArray(ae(ke))}function Se(ke,_e,ce,ve){for(var le=0;le=_e.length||le>=ke.length);++le)_e[le+ce]=ke[le];return le}function Ie(ke,_e){return ke instanceof _e||ke!=null&&ke.constructor!=null&&ke.constructor.name!=null&&ke.constructor.name===_e.name}function Ve(ke){return ke!==ke}var Ge=function(){for(var ke="0123456789abcdef",_e=new Array(256),ce=0;ce<16;++ce)for(var ve=ce*16,le=0;le<16;++le)_e[ve+le]=ke[ce]+ke[le];return _e}()},9216:function(l){"use strict";l.exports=r,l.exports.isMobile=r,l.exports.default=r;let e=/(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,t=/CrOS/,n=/android|ipad|playbook|silk/i;function r(a){a||(a={});let o=a.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;let s=e.test(o)&&!t.test(o)||!!a.tablet&&n.test(o);return!s&&a.tablet&&a.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(l,e,t){"use strict";l.exports=c;var n=t(7261),r=t(9977),a=t(1811);function o(m,h){this._controllerNames=Object.keys(m),this._controllerList=this._controllerNames.map(function(v){return m[v]}),this._mode=h,this._active=m[h],this._active||(this._mode="turntable",this._active=m.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(m){for(var h=this._controllerList,v=0;v"u"?t(1538):WeakMap,r=t(2762),a=t(8116),o=new n;function s(c){var m=o.get(c),h=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!h||!c.isBuffer(h)){var v=r(c,new Float32Array([-1,-1,-1,4,4,-1]));m=a(c,[{buffer:v,type:c.FLOAT,size:2}]),m._triangleBuffer=v,o.set(c,m)}m.bind(),c.drawArrays(c.TRIANGLES,0,3),m.unbind()}l.exports=s},1085:function(l,e,t){var n=t(1371);l.exports=r;function r(a,o,s){o=typeof o=="number"?o:1,s=s||": ";var c=a.split(/\r?\n/),m=String(c.length+o-1).length;return c.map(function(h,v){var g=v+o,i=String(g).length,w=n(g,m-i);return w+s+h}).join(` -`)}},3952:function(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){for(var c=new Array(s+1),m=0;m0)throw new Error("Invalid string. Length must be a multiple of 4");var C=S.indexOf("=");C===-1&&(C=M);var _=C===M?0:4-C%4;return[C,_]}function m(S){var M=c(S),C=M[0],_=M[1];return(C+_)*3/4-_}function h(S,M,C){return(M+C)*3/4-C}function v(S){var M,C=c(S),_=C[0],T=C[1],f=new r(h(S,_,T)),u=0,A=T>0?_-4:_,x;for(x=0;x>16&255,f[u++]=M>>8&255,f[u++]=M&255;return T===2&&(M=n[S.charCodeAt(x)]<<2|n[S.charCodeAt(x+1)]>>4,f[u++]=M&255),T===1&&(M=n[S.charCodeAt(x)]<<10|n[S.charCodeAt(x+1)]<<4|n[S.charCodeAt(x+2)]>>2,f[u++]=M>>8&255,f[u++]=M&255),f}function g(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function i(S,M,C){for(var _,T=[],f=M;fA?A:u+f));return _===1?(M=S[C-1],T.push(t[M>>2]+t[M<<4&63]+"==")):_===2&&(M=(S[C-2]<<8)+S[C-1],T.push(t[M>>10]+t[M>>4&63]+t[M<<2&63]+"=")),T.join("")}},3865:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).add(o[0].mul(a[1])),a[1].mul(o[1]))}},1318:function(l){"use strict";l.exports=e;function e(t,n){return t[0].mul(n[1]).cmp(n[0].mul(t[1]))}},8697:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]),a[1].mul(o[0]))}},7842:function(l,e,t){"use strict";var n=t(6330),r=t(1533),a=t(2651),o=t(6768),s=t(869),c=t(8697);l.exports=m;function m(h,v){if(n(h))return v?c(h,m(v)):[h[0].clone(),h[1].clone()];var g=0,i,w;if(r(h))i=h.clone();else if(typeof h=="string")i=o(h);else{if(h===0)return[a(0),a(1)];if(h===Math.floor(h))i=a(h);else{for(;h!==Math.floor(h);)h=h*Math.pow(2,256),g-=256;i=a(h)}}if(n(v))i.mul(v[1]),w=v[0].clone();else if(r(v))w=v.clone();else if(typeof v=="string")w=o(v);else if(!v)w=a(1);else if(v===Math.floor(v))w=a(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),g+=256;w=a(v)}return g>0?i=i.ushln(g):g<0&&(w=w.ushln(-g)),s(i,w)}},6330:function(l,e,t){"use strict";var n=t(1533);l.exports=r;function r(a){return Array.isArray(a)&&a.length===2&&n(a[0])&&n(a[1])}},5716:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a.cmp(new n(0))}},1369:function(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){var o=a.length,s=a.words,c=0;if(o===1)c=s[0];else if(o===2)c=s[0]+s[1]*67108864;else for(var m=0;m20?52:c+32}},1533:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a&&typeof a=="object"&&!!a.words}},2651:function(l,e,t){"use strict";var n=t(6859),r=t(2361);l.exports=a;function a(o){var s=r.exponent(o);return s<52?new n(o):new n(o*Math.pow(2,52-s)).ushln(s-52)}},869:function(l,e,t){"use strict";var n=t(2651),r=t(5716);l.exports=a;function a(o,s){var c=r(o),m=r(s);if(c===0)return[n(0),n(1)];if(m===0)return[n(0),n(0)];m<0&&(o=o.neg(),s=s.neg());var h=o.gcd(s);return h.cmpn(1)?[o.div(h),s.div(h)]:[o,s]}},6768:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return new n(a)}},6504:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[0]),a[1].mul(o[1]))}},7721:function(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){return n(a[0])*n(a[1])}},5572:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).sub(a[1].mul(o[0])),a[1].mul(o[1]))}},946:function(l,e,t){"use strict";var n=t(1369),r=t(4025);l.exports=a;function a(o){var s=o[0],c=o[1];if(s.cmpn(0)===0)return 0;var m=s.abs().divmod(c.abs()),h=m.div,v=n(h),g=m.mod,i=s.negative!==c.negative?-1:1;if(g.cmpn(0)===0)return i*v;if(v){var w=r(v)+4,S=n(g.ushln(w).divRound(c));return i*(v+S*Math.pow(2,-w))}else{var M=c.bitLength()-g.bitLength()+53,S=n(g.ushln(M).divRound(c));return M<1023?i*S*Math.pow(2,-M):(S*=Math.pow(2,-1023),i*S*Math.pow(2,1023-M))}}},2478:function(l){"use strict";function e(s,c,m,h,v){for(var g=v+1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>=0?(g=i,v=i-1):h=i+1}return g}function t(s,c,m,h,v){for(var g=v+1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>0?(g=i,v=i-1):h=i+1}return g}function n(s,c,m,h,v){for(var g=h-1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<0?(g=i,h=i+1):v=i-1}return g}function r(s,c,m,h,v){for(var g=h-1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<=0?(g=i,h=i+1):v=i-1}return g}function a(s,c,m,h,v){for(;h<=v;){var g=h+v>>>1,i=s[g],w=m!==void 0?m(i,c):i-c;if(w===0)return g;w<=0?h=g+1:v=g-1}return-1}function o(s,c,m,h,v,g){return typeof m=="function"?g(s,c,m,h===void 0?0:h|0,v===void 0?s.length-1:v|0):g(s,c,void 0,m===void 0?0:m|0,h===void 0?s.length-1:h|0)}l.exports={ge:function(s,c,m,h,v){return o(s,c,m,h,v,e)},gt:function(s,c,m,h,v){return o(s,c,m,h,v,t)},lt:function(s,c,m,h,v){return o(s,c,m,h,v,n)},le:function(s,c,m,h,v){return o(s,c,m,h,v,r)},eq:function(s,c,m,h,v){return o(s,c,m,h,v,a)}}},8828:function(l,e){"use strict";"use restrict";var t=32;e.INT_BITS=t,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},6859:function(l,e,t){l=t.nmd(l),function(n,r){"use strict";function a(F,P){if(!F)throw new Error(P||"Assertion failed")}function o(F,P){F.super_=P;var j=function(){};j.prototype=P.prototype,F.prototype=new j,F.prototype.constructor=F}function s(F,P,j){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((P==="le"||P==="be")&&(j=P,P=10),this._init(F||0,P||10,j||"be"))}typeof n=="object"?n.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=t(7790).Buffer}catch{}s.isBN=function(P){return P instanceof s?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===s.wordSize&&Array.isArray(P.words)},s.max=function(P,j){return P.cmp(j)>0?P:j},s.min=function(P,j){return P.cmp(j)<0?P:j},s.prototype._init=function(P,j,U){if(typeof P=="number")return this._initNumber(P,j,U);if(typeof P=="object")return this._initArray(P,j,U);j==="hex"&&(j=16),a(j===(j|0)&&j>=2&&j<=36),P=P.toString().replace(/\s+/g,"");var $=0;P[0]==="-"&&($++,this.negative=1),$=0;$-=3)re=P[$]|P[$-1]<<8|P[$-2]<<16,this.words[Q]|=re<>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);else if(U==="le")for($=0,Q=0;$>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);return this.strip()};function m(F,P){var j=F.charCodeAt(P);return j>=65&&j<=70?j-55:j>=97&&j<=102?j-87:j-48&15}function h(F,P,j){var U=m(F,j);return j-1>=P&&(U|=m(F,j-1)<<4),U}s.prototype._parseHex=function(P,j,U){this.length=Math.ceil((P.length-j)/6),this.words=new Array(this.length);for(var $=0;$=j;$-=2)ne=h(P,j,$)<=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8;else{var se=P.length-j;for($=se%2===0?j+1:j;$=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8}this.strip()};function v(F,P,j,U){for(var $=0,Q=Math.min(F.length,j),re=P;re=49?$+=ne-49+10:ne>=17?$+=ne-17+10:$+=ne}return $}s.prototype._parseBase=function(P,j,U){this.words=[0],this.length=1;for(var $=0,Q=1;Q<=67108863;Q*=j)$++;$--,Q=Q/j|0;for(var re=P.length-U,ne=re%$,se=Math.min(re,re-ne)+U,G=0,X=U;X1&&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 g=["","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"],i=[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],w=[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,j){P=P||10,j=j|0||1;var U;if(P===16||P==="hex"){U="";for(var $=0,Q=0,re=0;re>>24-$&16777215,$+=2,$>=26&&($-=26,re--),Q!==0||re!==this.length-1?U=g[6-se.length]+se+U:U=se+U}for(Q!==0&&(U=Q.toString(16)+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(P===(P|0)&&P>=2&&P<=36){var G=i[P],X=w[P];U="";var K=this.clone();for(K.negative=0;!K.isZero();){var H=K.modn(X).toString(P);K=K.idivn(X),K.isZero()?U=H+U:U=g[G-H.length]+H+U}for(this.isZero()&&(U="0"+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}a(!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&&a(!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,j){return a(typeof c<"u"),this.toArrayLike(c,P,j)},s.prototype.toArray=function(P,j){return this.toArrayLike(Array,P,j)},s.prototype.toArrayLike=function(P,j,U){var $=this.byteLength(),Q=U||Math.max(1,$);a($<=Q,"byte array longer than desired length"),a(Q>0,"Requested array length <= 0"),this.strip();var re=j==="le",ne=new P(Q),se,G,X=this.clone();if(re){for(G=0;!X.isZero();G++)se=X.andln(255),X.iushrn(8),ne[G]=se;for(;G=4096&&(U+=13,j>>>=13),j>=64&&(U+=7,j>>>=7),j>=8&&(U+=4,j>>>=4),j>=2&&(U+=2,j>>>=2),U+j},s.prototype._zeroBits=function(P){if(P===0)return 26;var j=P,U=0;return j&8191||(U+=13,j>>>=13),j&127||(U+=7,j>>>=7),j&15||(U+=4,j>>>=4),j&3||(U+=2,j>>>=2),j&1||U++,U},s.prototype.bitLength=function(){var P=this.words[this.length-1],j=this._countBits(P);return(this.length-1)*26+j};function S(F){for(var P=new Array(F.bitLength()),j=0;j>>$}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,j=0;jP.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 j;this.length>P.length?j=P:j=this;for(var U=0;UP.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 j,U;this.length>P.length?(j=this,U=P):(j=P,U=this);for(var $=0;$P.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){a(typeof P=="number"&&P>=0);var j=Math.ceil(P/26)|0,U=P%26;this._expand(j),U>0&&j--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-U),this.strip()},s.prototype.notn=function(P){return this.clone().inotn(P)},s.prototype.setn=function(P,j){a(typeof P=="number"&&P>=0);var U=P/26|0,$=P%26;return this._expand(U+1),j?this.words[U]=this.words[U]|1<<$:this.words[U]=this.words[U]&~(1<<$),this.strip()},s.prototype.iadd=function(P){var j;if(this.negative!==0&&P.negative===0)return this.negative=0,j=this.isub(P),this.negative^=1,this._normSign();if(this.negative===0&&P.negative!==0)return P.negative=0,j=this.isub(P),P.negative=1,j._normSign();var U,$;this.length>P.length?(U=this,$=P):(U=P,$=this);for(var Q=0,re=0;re<$.length;re++)j=(U.words[re]|0)+($.words[re]|0)+Q,this.words[re]=j&67108863,Q=j>>>26;for(;Q!==0&&re>>26;if(this.length=U.length,Q!==0)this.words[this.length]=Q,this.length++;else if(U!==this)for(;reP.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var j=this.iadd(P);return P.negative=1,j._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var U=this.cmp(P);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Q;U>0?($=this,Q=P):($=P,Q=this);for(var re=0,ne=0;ne>26,this.words[ne]=j&67108863;for(;re!==0&&ne<$.length;ne++)j=($.words[ne]|0)+re,re=j>>26,this.words[ne]=j&67108863;if(re===0&&ne<$.length&&$!==this)for(;ne<$.length;ne++)this.words[ne]=$.words[ne];return this.length=Math.max(this.length,ne),$!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(P){return this.clone().isub(P)};function M(F,P,j){j.negative=P.negative^F.negative;var U=F.length+P.length|0;j.length=U,U=U-1|0;var $=F.words[0]|0,Q=P.words[0]|0,re=$*Q,ne=re&67108863,se=re/67108864|0;j.words[0]=ne;for(var G=1;G>>26,K=se&67108863,H=Math.min(G,P.length-1),Y=Math.max(0,G-F.length+1);Y<=H;Y++){var q=G-Y|0;$=F.words[q]|0,Q=P.words[Y]|0,re=$*Q+K,X+=re/67108864|0,K=re&67108863}j.words[G]=K|0,se=X|0}return se!==0?j.words[G]=se|0:j.length--,j.strip()}var C=function(P,j,U){var $=P.words,Q=j.words,re=U.words,ne=0,se,G,X,K=$[0]|0,H=K&8191,Y=K>>>13,q=$[1]|0,Z=q&8191,ee=q>>>13,ae=$[2]|0,he=ae&8191,xe=ae>>>13,we=$[3]|0,Me=we&8191,Se=we>>>13,Ie=$[4]|0,Ve=Ie&8191,Ge=Ie>>>13,ke=$[5]|0,_e=ke&8191,ce=ke>>>13,ve=$[6]|0,le=ve&8191,Ae=ve>>>13,Be=$[7]|0,Xe=Be&8191,Ye=Be>>>13,yt=$[8]|0,gt=yt&8191,Tt=yt>>>13,At=$[9]|0,$t=At&8191,rr=At>>>13,_r=Q[0]|0,Xt=_r&8191,or=_r>>>13,Ot=Q[1]|0,vt=Ot&8191,ht=Ot>>>13,De=Q[2]|0,Ne=De&8191,We=De>>>13,Ke=Q[3]|0,Je=Ke&8191,et=Ke>>>13,Mt=Q[4]|0,pt=Mt&8191,Pt=Mt>>>13,Ct=Q[5]|0,qt=Ct&8191,Vt=Ct>>>13,Ht=Q[6]|0,Sr=Ht&8191,Kr=Ht>>>13,Yt=Q[7]|0,Rt=Yt&8191,nr=Yt>>>13,ur=Q[8]|0,cr=ur&8191,Rr=ur>>>13,Qr=Q[9]|0,Zr=Qr&8191,ha=Qr>>>13;U.negative=P.negative^j.negative,U.length=19,se=Math.imul(H,Xt),G=Math.imul(H,or),G=G+Math.imul(Y,Xt)|0,X=Math.imul(Y,or);var Pa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,se=Math.imul(Z,Xt),G=Math.imul(Z,or),G=G+Math.imul(ee,Xt)|0,X=Math.imul(ee,or),se=se+Math.imul(H,vt)|0,G=G+Math.imul(H,ht)|0,G=G+Math.imul(Y,vt)|0,X=X+Math.imul(Y,ht)|0;var La=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(La>>>26)|0,La&=67108863,se=Math.imul(he,Xt),G=Math.imul(he,or),G=G+Math.imul(xe,Xt)|0,X=Math.imul(xe,or),se=se+Math.imul(Z,vt)|0,G=G+Math.imul(Z,ht)|0,G=G+Math.imul(ee,vt)|0,X=X+Math.imul(ee,ht)|0,se=se+Math.imul(H,Ne)|0,G=G+Math.imul(H,We)|0,G=G+Math.imul(Y,Ne)|0,X=X+Math.imul(Y,We)|0;var un=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(un>>>26)|0,un&=67108863,se=Math.imul(Me,Xt),G=Math.imul(Me,or),G=G+Math.imul(Se,Xt)|0,X=Math.imul(Se,or),se=se+Math.imul(he,vt)|0,G=G+Math.imul(he,ht)|0,G=G+Math.imul(xe,vt)|0,X=X+Math.imul(xe,ht)|0,se=se+Math.imul(Z,Ne)|0,G=G+Math.imul(Z,We)|0,G=G+Math.imul(ee,Ne)|0,X=X+Math.imul(ee,We)|0,se=se+Math.imul(H,Je)|0,G=G+Math.imul(H,et)|0,G=G+Math.imul(Y,Je)|0,X=X+Math.imul(Y,et)|0;var Xa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Xa>>>26)|0,Xa&=67108863,se=Math.imul(Ve,Xt),G=Math.imul(Ve,or),G=G+Math.imul(Ge,Xt)|0,X=Math.imul(Ge,or),se=se+Math.imul(Me,vt)|0,G=G+Math.imul(Me,ht)|0,G=G+Math.imul(Se,vt)|0,X=X+Math.imul(Se,ht)|0,se=se+Math.imul(he,Ne)|0,G=G+Math.imul(he,We)|0,G=G+Math.imul(xe,Ne)|0,X=X+Math.imul(xe,We)|0,se=se+Math.imul(Z,Je)|0,G=G+Math.imul(Z,et)|0,G=G+Math.imul(ee,Je)|0,X=X+Math.imul(ee,et)|0,se=se+Math.imul(H,pt)|0,G=G+Math.imul(H,Pt)|0,G=G+Math.imul(Y,pt)|0,X=X+Math.imul(Y,Pt)|0;var ja=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(ja>>>26)|0,ja&=67108863,se=Math.imul(_e,Xt),G=Math.imul(_e,or),G=G+Math.imul(ce,Xt)|0,X=Math.imul(ce,or),se=se+Math.imul(Ve,vt)|0,G=G+Math.imul(Ve,ht)|0,G=G+Math.imul(Ge,vt)|0,X=X+Math.imul(Ge,ht)|0,se=se+Math.imul(Me,Ne)|0,G=G+Math.imul(Me,We)|0,G=G+Math.imul(Se,Ne)|0,X=X+Math.imul(Se,We)|0,se=se+Math.imul(he,Je)|0,G=G+Math.imul(he,et)|0,G=G+Math.imul(xe,Je)|0,X=X+Math.imul(xe,et)|0,se=se+Math.imul(Z,pt)|0,G=G+Math.imul(Z,Pt)|0,G=G+Math.imul(ee,pt)|0,X=X+Math.imul(ee,Pt)|0,se=se+Math.imul(H,qt)|0,G=G+Math.imul(H,Vt)|0,G=G+Math.imul(Y,qt)|0,X=X+Math.imul(Y,Vt)|0;var Nn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,se=Math.imul(le,Xt),G=Math.imul(le,or),G=G+Math.imul(Ae,Xt)|0,X=Math.imul(Ae,or),se=se+Math.imul(_e,vt)|0,G=G+Math.imul(_e,ht)|0,G=G+Math.imul(ce,vt)|0,X=X+Math.imul(ce,ht)|0,se=se+Math.imul(Ve,Ne)|0,G=G+Math.imul(Ve,We)|0,G=G+Math.imul(Ge,Ne)|0,X=X+Math.imul(Ge,We)|0,se=se+Math.imul(Me,Je)|0,G=G+Math.imul(Me,et)|0,G=G+Math.imul(Se,Je)|0,X=X+Math.imul(Se,et)|0,se=se+Math.imul(he,pt)|0,G=G+Math.imul(he,Pt)|0,G=G+Math.imul(xe,pt)|0,X=X+Math.imul(xe,Pt)|0,se=se+Math.imul(Z,qt)|0,G=G+Math.imul(Z,Vt)|0,G=G+Math.imul(ee,qt)|0,X=X+Math.imul(ee,Vt)|0,se=se+Math.imul(H,Sr)|0,G=G+Math.imul(H,Kr)|0,G=G+Math.imul(Y,Sr)|0,X=X+Math.imul(Y,Kr)|0;var yn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(yn>>>26)|0,yn&=67108863,se=Math.imul(Xe,Xt),G=Math.imul(Xe,or),G=G+Math.imul(Ye,Xt)|0,X=Math.imul(Ye,or),se=se+Math.imul(le,vt)|0,G=G+Math.imul(le,ht)|0,G=G+Math.imul(Ae,vt)|0,X=X+Math.imul(Ae,ht)|0,se=se+Math.imul(_e,Ne)|0,G=G+Math.imul(_e,We)|0,G=G+Math.imul(ce,Ne)|0,X=X+Math.imul(ce,We)|0,se=se+Math.imul(Ve,Je)|0,G=G+Math.imul(Ve,et)|0,G=G+Math.imul(Ge,Je)|0,X=X+Math.imul(Ge,et)|0,se=se+Math.imul(Me,pt)|0,G=G+Math.imul(Me,Pt)|0,G=G+Math.imul(Se,pt)|0,X=X+Math.imul(Se,Pt)|0,se=se+Math.imul(he,qt)|0,G=G+Math.imul(he,Vt)|0,G=G+Math.imul(xe,qt)|0,X=X+Math.imul(xe,Vt)|0,se=se+Math.imul(Z,Sr)|0,G=G+Math.imul(Z,Kr)|0,G=G+Math.imul(ee,Sr)|0,X=X+Math.imul(ee,Kr)|0,se=se+Math.imul(H,Rt)|0,G=G+Math.imul(H,nr)|0,G=G+Math.imul(Y,Rt)|0,X=X+Math.imul(Y,nr)|0;var Un=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Un>>>26)|0,Un&=67108863,se=Math.imul(gt,Xt),G=Math.imul(gt,or),G=G+Math.imul(Tt,Xt)|0,X=Math.imul(Tt,or),se=se+Math.imul(Xe,vt)|0,G=G+Math.imul(Xe,ht)|0,G=G+Math.imul(Ye,vt)|0,X=X+Math.imul(Ye,ht)|0,se=se+Math.imul(le,Ne)|0,G=G+Math.imul(le,We)|0,G=G+Math.imul(Ae,Ne)|0,X=X+Math.imul(Ae,We)|0,se=se+Math.imul(_e,Je)|0,G=G+Math.imul(_e,et)|0,G=G+Math.imul(ce,Je)|0,X=X+Math.imul(ce,et)|0,se=se+Math.imul(Ve,pt)|0,G=G+Math.imul(Ve,Pt)|0,G=G+Math.imul(Ge,pt)|0,X=X+Math.imul(Ge,Pt)|0,se=se+Math.imul(Me,qt)|0,G=G+Math.imul(Me,Vt)|0,G=G+Math.imul(Se,qt)|0,X=X+Math.imul(Se,Vt)|0,se=se+Math.imul(he,Sr)|0,G=G+Math.imul(he,Kr)|0,G=G+Math.imul(xe,Sr)|0,X=X+Math.imul(xe,Kr)|0,se=se+Math.imul(Z,Rt)|0,G=G+Math.imul(Z,nr)|0,G=G+Math.imul(ee,Rt)|0,X=X+Math.imul(ee,nr)|0,se=se+Math.imul(H,cr)|0,G=G+Math.imul(H,Rr)|0,G=G+Math.imul(Y,cr)|0,X=X+Math.imul(Y,Rr)|0;var li=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(li>>>26)|0,li&=67108863,se=Math.imul($t,Xt),G=Math.imul($t,or),G=G+Math.imul(rr,Xt)|0,X=Math.imul(rr,or),se=se+Math.imul(gt,vt)|0,G=G+Math.imul(gt,ht)|0,G=G+Math.imul(Tt,vt)|0,X=X+Math.imul(Tt,ht)|0,se=se+Math.imul(Xe,Ne)|0,G=G+Math.imul(Xe,We)|0,G=G+Math.imul(Ye,Ne)|0,X=X+Math.imul(Ye,We)|0,se=se+Math.imul(le,Je)|0,G=G+Math.imul(le,et)|0,G=G+Math.imul(Ae,Je)|0,X=X+Math.imul(Ae,et)|0,se=se+Math.imul(_e,pt)|0,G=G+Math.imul(_e,Pt)|0,G=G+Math.imul(ce,pt)|0,X=X+Math.imul(ce,Pt)|0,se=se+Math.imul(Ve,qt)|0,G=G+Math.imul(Ve,Vt)|0,G=G+Math.imul(Ge,qt)|0,X=X+Math.imul(Ge,Vt)|0,se=se+Math.imul(Me,Sr)|0,G=G+Math.imul(Me,Kr)|0,G=G+Math.imul(Se,Sr)|0,X=X+Math.imul(Se,Kr)|0,se=se+Math.imul(he,Rt)|0,G=G+Math.imul(he,nr)|0,G=G+Math.imul(xe,Rt)|0,X=X+Math.imul(xe,nr)|0,se=se+Math.imul(Z,cr)|0,G=G+Math.imul(Z,Rr)|0,G=G+Math.imul(ee,cr)|0,X=X+Math.imul(ee,Rr)|0,se=se+Math.imul(H,Zr)|0,G=G+Math.imul(H,ha)|0,G=G+Math.imul(Y,Zr)|0,X=X+Math.imul(Y,ha)|0;var Yn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,se=Math.imul($t,vt),G=Math.imul($t,ht),G=G+Math.imul(rr,vt)|0,X=Math.imul(rr,ht),se=se+Math.imul(gt,Ne)|0,G=G+Math.imul(gt,We)|0,G=G+Math.imul(Tt,Ne)|0,X=X+Math.imul(Tt,We)|0,se=se+Math.imul(Xe,Je)|0,G=G+Math.imul(Xe,et)|0,G=G+Math.imul(Ye,Je)|0,X=X+Math.imul(Ye,et)|0,se=se+Math.imul(le,pt)|0,G=G+Math.imul(le,Pt)|0,G=G+Math.imul(Ae,pt)|0,X=X+Math.imul(Ae,Pt)|0,se=se+Math.imul(_e,qt)|0,G=G+Math.imul(_e,Vt)|0,G=G+Math.imul(ce,qt)|0,X=X+Math.imul(ce,Vt)|0,se=se+Math.imul(Ve,Sr)|0,G=G+Math.imul(Ve,Kr)|0,G=G+Math.imul(Ge,Sr)|0,X=X+Math.imul(Ge,Kr)|0,se=se+Math.imul(Me,Rt)|0,G=G+Math.imul(Me,nr)|0,G=G+Math.imul(Se,Rt)|0,X=X+Math.imul(Se,nr)|0,se=se+Math.imul(he,cr)|0,G=G+Math.imul(he,Rr)|0,G=G+Math.imul(xe,cr)|0,X=X+Math.imul(xe,Rr)|0,se=se+Math.imul(Z,Zr)|0,G=G+Math.imul(Z,ha)|0,G=G+Math.imul(ee,Zr)|0,X=X+Math.imul(ee,ha)|0;var on=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(on>>>26)|0,on&=67108863,se=Math.imul($t,Ne),G=Math.imul($t,We),G=G+Math.imul(rr,Ne)|0,X=Math.imul(rr,We),se=se+Math.imul(gt,Je)|0,G=G+Math.imul(gt,et)|0,G=G+Math.imul(Tt,Je)|0,X=X+Math.imul(Tt,et)|0,se=se+Math.imul(Xe,pt)|0,G=G+Math.imul(Xe,Pt)|0,G=G+Math.imul(Ye,pt)|0,X=X+Math.imul(Ye,Pt)|0,se=se+Math.imul(le,qt)|0,G=G+Math.imul(le,Vt)|0,G=G+Math.imul(Ae,qt)|0,X=X+Math.imul(Ae,Vt)|0,se=se+Math.imul(_e,Sr)|0,G=G+Math.imul(_e,Kr)|0,G=G+Math.imul(ce,Sr)|0,X=X+Math.imul(ce,Kr)|0,se=se+Math.imul(Ve,Rt)|0,G=G+Math.imul(Ve,nr)|0,G=G+Math.imul(Ge,Rt)|0,X=X+Math.imul(Ge,nr)|0,se=se+Math.imul(Me,cr)|0,G=G+Math.imul(Me,Rr)|0,G=G+Math.imul(Se,cr)|0,X=X+Math.imul(Se,Rr)|0,se=se+Math.imul(he,Zr)|0,G=G+Math.imul(he,ha)|0,G=G+Math.imul(xe,Zr)|0,X=X+Math.imul(xe,ha)|0;var en=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(en>>>26)|0,en&=67108863,se=Math.imul($t,Je),G=Math.imul($t,et),G=G+Math.imul(rr,Je)|0,X=Math.imul(rr,et),se=se+Math.imul(gt,pt)|0,G=G+Math.imul(gt,Pt)|0,G=G+Math.imul(Tt,pt)|0,X=X+Math.imul(Tt,Pt)|0,se=se+Math.imul(Xe,qt)|0,G=G+Math.imul(Xe,Vt)|0,G=G+Math.imul(Ye,qt)|0,X=X+Math.imul(Ye,Vt)|0,se=se+Math.imul(le,Sr)|0,G=G+Math.imul(le,Kr)|0,G=G+Math.imul(Ae,Sr)|0,X=X+Math.imul(Ae,Kr)|0,se=se+Math.imul(_e,Rt)|0,G=G+Math.imul(_e,nr)|0,G=G+Math.imul(ce,Rt)|0,X=X+Math.imul(ce,nr)|0,se=se+Math.imul(Ve,cr)|0,G=G+Math.imul(Ve,Rr)|0,G=G+Math.imul(Ge,cr)|0,X=X+Math.imul(Ge,Rr)|0,se=se+Math.imul(Me,Zr)|0,G=G+Math.imul(Me,ha)|0,G=G+Math.imul(Se,Zr)|0,X=X+Math.imul(Se,ha)|0;var vi=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(vi>>>26)|0,vi&=67108863,se=Math.imul($t,pt),G=Math.imul($t,Pt),G=G+Math.imul(rr,pt)|0,X=Math.imul(rr,Pt),se=se+Math.imul(gt,qt)|0,G=G+Math.imul(gt,Vt)|0,G=G+Math.imul(Tt,qt)|0,X=X+Math.imul(Tt,Vt)|0,se=se+Math.imul(Xe,Sr)|0,G=G+Math.imul(Xe,Kr)|0,G=G+Math.imul(Ye,Sr)|0,X=X+Math.imul(Ye,Kr)|0,se=se+Math.imul(le,Rt)|0,G=G+Math.imul(le,nr)|0,G=G+Math.imul(Ae,Rt)|0,X=X+Math.imul(Ae,nr)|0,se=se+Math.imul(_e,cr)|0,G=G+Math.imul(_e,Rr)|0,G=G+Math.imul(ce,cr)|0,X=X+Math.imul(ce,Rr)|0,se=se+Math.imul(Ve,Zr)|0,G=G+Math.imul(Ve,ha)|0,G=G+Math.imul(Ge,Zr)|0,X=X+Math.imul(Ge,ha)|0;var Yi=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,se=Math.imul($t,qt),G=Math.imul($t,Vt),G=G+Math.imul(rr,qt)|0,X=Math.imul(rr,Vt),se=se+Math.imul(gt,Sr)|0,G=G+Math.imul(gt,Kr)|0,G=G+Math.imul(Tt,Sr)|0,X=X+Math.imul(Tt,Kr)|0,se=se+Math.imul(Xe,Rt)|0,G=G+Math.imul(Xe,nr)|0,G=G+Math.imul(Ye,Rt)|0,X=X+Math.imul(Ye,nr)|0,se=se+Math.imul(le,cr)|0,G=G+Math.imul(le,Rr)|0,G=G+Math.imul(Ae,cr)|0,X=X+Math.imul(Ae,Rr)|0,se=se+Math.imul(_e,Zr)|0,G=G+Math.imul(_e,ha)|0,G=G+Math.imul(ce,Zr)|0,X=X+Math.imul(ce,ha)|0;var Ja=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Ja>>>26)|0,Ja&=67108863,se=Math.imul($t,Sr),G=Math.imul($t,Kr),G=G+Math.imul(rr,Sr)|0,X=Math.imul(rr,Kr),se=se+Math.imul(gt,Rt)|0,G=G+Math.imul(gt,nr)|0,G=G+Math.imul(Tt,Rt)|0,X=X+Math.imul(Tt,nr)|0,se=se+Math.imul(Xe,cr)|0,G=G+Math.imul(Xe,Rr)|0,G=G+Math.imul(Ye,cr)|0,X=X+Math.imul(Ye,Rr)|0,se=se+Math.imul(le,Zr)|0,G=G+Math.imul(le,ha)|0,G=G+Math.imul(Ae,Zr)|0,X=X+Math.imul(Ae,ha)|0;var Oa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Oa>>>26)|0,Oa&=67108863,se=Math.imul($t,Rt),G=Math.imul($t,nr),G=G+Math.imul(rr,Rt)|0,X=Math.imul(rr,nr),se=se+Math.imul(gt,cr)|0,G=G+Math.imul(gt,Rr)|0,G=G+Math.imul(Tt,cr)|0,X=X+Math.imul(Tt,Rr)|0,se=se+Math.imul(Xe,Zr)|0,G=G+Math.imul(Xe,ha)|0,G=G+Math.imul(Ye,Zr)|0,X=X+Math.imul(Ye,ha)|0;var lt=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(lt>>>26)|0,lt&=67108863,se=Math.imul($t,cr),G=Math.imul($t,Rr),G=G+Math.imul(rr,cr)|0,X=Math.imul(rr,Rr),se=se+Math.imul(gt,Zr)|0,G=G+Math.imul(gt,ha)|0,G=G+Math.imul(Tt,Zr)|0,X=X+Math.imul(Tt,ha)|0;var rt=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(rt>>>26)|0,rt&=67108863,se=Math.imul($t,Zr),G=Math.imul($t,ha),G=G+Math.imul(rr,Zr)|0,X=Math.imul(rr,ha);var fr=(ne+se|0)+((G&8191)<<13)|0;return ne=(X+(G>>>13)|0)+(fr>>>26)|0,fr&=67108863,re[0]=Pa,re[1]=La,re[2]=un,re[3]=Xa,re[4]=ja,re[5]=Nn,re[6]=yn,re[7]=Un,re[8]=li,re[9]=Yn,re[10]=on,re[11]=en,re[12]=vi,re[13]=Yi,re[14]=Ja,re[15]=Oa,re[16]=lt,re[17]=rt,re[18]=fr,ne!==0&&(re[19]=ne,U.length++),U};Math.imul||(C=M);function _(F,P,j){j.negative=P.negative^F.negative,j.length=F.length+P.length;for(var U=0,$=0,Q=0;Q>>26)|0,$+=re>>>26,re&=67108863}j.words[Q]=ne,U=re,re=$}return U!==0?j.words[Q]=U:j.length--,j.strip()}function T(F,P,j){var U=new f;return U.mulp(F,P,j)}s.prototype.mulTo=function(P,j){var U,$=this.length+P.length;return this.length===10&&P.length===10?U=C(this,P,j):$<63?U=M(this,P,j):$<1024?U=_(this,P,j):U=T(this,P,j),U};function f(F,P){this.x=F,this.y=P}f.prototype.makeRBT=function(P){for(var j=new Array(P),U=s.prototype._countBits(P)-1,$=0;$>=1;return $},f.prototype.permute=function(P,j,U,$,Q,re){for(var ne=0;ne>>1)Q++;return 1<>>13,U[2*re+1]=Q&8191,Q=Q>>>13;for(re=2*j;re<$;++re)U[re]=0;a(Q===0),a((Q&-8192)===0)},f.prototype.stub=function(P){for(var j=new Array(P),U=0;U>=26,j+=$/67108864|0,j+=Q>>>26,this.words[U]=Q&67108863}return j!==0&&(this.words[U]=j,this.length++),this.length=P===0?1:this.length,this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var j=S(P);if(j.length===0)return new s(1);for(var U=this,$=0;$=0);var j=P%26,U=(P-j)/26,$=67108863>>>26-j<<26-j,Q;if(j!==0){var re=0;for(Q=0;Q>>26-j}re&&(this.words[Q]=re,this.length++)}if(U!==0){for(Q=this.length-1;Q>=0;Q--)this.words[Q+U]=this.words[Q];for(Q=0;Q=0);var $;j?$=(j-j%26)/26:$=0;var Q=P%26,re=Math.min((P-Q)/26,this.length),ne=67108863^67108863>>>Q<re)for(this.length-=re,G=0;G=0&&(X!==0||G>=$);G--){var K=this.words[G]|0;this.words[G]=X<<26-Q|K>>>Q,X=K&ne}return se&&X!==0&&(se.words[se.length++]=X),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,j,U){return a(this.negative===0),this.iushrn(P,j,U)},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){a(typeof P=="number"&&P>=0);var j=P%26,U=(P-j)/26,$=1<=0);var j=P%26,U=(P-j)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(j!==0&&U++,this.length=Math.min(U,this.length),j!==0){var $=67108863^67108863>>>j<=67108864;j++)this.words[j]-=67108864,j===this.length-1?this.words[j+1]=1:this.words[j+1]++;return this.length=Math.max(this.length,j+1),this},s.prototype.isubn=function(P){if(a(typeof P=="number"),a(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 j=0;j>26)-(se/67108864|0),this.words[Q+U]=re&67108863}for(;Q>26,this.words[Q+U]=re&67108863;if(ne===0)return this.strip();for(a(ne===-1),ne=0,Q=0;Q>26,this.words[Q]=re&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,j){var U=this.length-P.length,$=this.clone(),Q=P,re=Q.words[Q.length-1]|0,ne=this._countBits(re);U=26-ne,U!==0&&(Q=Q.ushln(U),$.iushln(U),re=Q.words[Q.length-1]|0);var se=$.length-Q.length,G;if(j!=="mod"){G=new s(null),G.length=se+1,G.words=new Array(G.length);for(var X=0;X=0;H--){var Y=($.words[Q.length+H]|0)*67108864+($.words[Q.length+H-1]|0);for(Y=Math.min(Y/re|0,67108863),$._ishlnsubmul(Q,Y,H);$.negative!==0;)Y--,$.negative=0,$._ishlnsubmul(Q,1,H),$.isZero()||($.negative^=1);G&&(G.words[H]=Y)}return G&&G.strip(),$.strip(),j!=="div"&&U!==0&&$.iushrn(U),{div:G||null,mod:$}},s.prototype.divmod=function(P,j,U){if(a(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var $,Q,re;return this.negative!==0&&P.negative===0?(re=this.neg().divmod(P,j),j!=="mod"&&($=re.div.neg()),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.iadd(P)),{div:$,mod:Q}):this.negative===0&&P.negative!==0?(re=this.divmod(P.neg(),j),j!=="mod"&&($=re.div.neg()),{div:$,mod:re.mod}):this.negative&P.negative?(re=this.neg().divmod(P.neg(),j),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.isub(P)),{div:re.div,mod:Q}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?j==="div"?{div:this.divn(P.words[0]),mod:null}:j==="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,j)},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 j=this.divmod(P);if(j.mod.isZero())return j.div;var U=j.div.negative!==0?j.mod.isub(P):j.mod,$=P.ushrn(1),Q=P.andln(1),re=U.cmp($);return re<0||Q===1&&re===0?j.div:j.div.negative!==0?j.div.isubn(1):j.div.iaddn(1)},s.prototype.modn=function(P){a(P<=67108863);for(var j=(1<<26)%P,U=0,$=this.length-1;$>=0;$--)U=(j*U+(this.words[$]|0))%P;return U},s.prototype.idivn=function(P){a(P<=67108863);for(var j=0,U=this.length-1;U>=0;U--){var $=(this.words[U]|0)+j*67108864;this.words[U]=$/P|0,j=$%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var $=new s(1),Q=new s(0),re=new s(0),ne=new s(1),se=0;j.isEven()&&U.isEven();)j.iushrn(1),U.iushrn(1),++se;for(var G=U.clone(),X=j.clone();!j.isZero();){for(var K=0,H=1;!(j.words[0]&H)&&K<26;++K,H<<=1);if(K>0)for(j.iushrn(K);K-- >0;)($.isOdd()||Q.isOdd())&&($.iadd(G),Q.isub(X)),$.iushrn(1),Q.iushrn(1);for(var Y=0,q=1;!(U.words[0]&q)&&Y<26;++Y,q<<=1);if(Y>0)for(U.iushrn(Y);Y-- >0;)(re.isOdd()||ne.isOdd())&&(re.iadd(G),ne.isub(X)),re.iushrn(1),ne.iushrn(1);j.cmp(U)>=0?(j.isub(U),$.isub(re),Q.isub(ne)):(U.isub(j),re.isub($),ne.isub(Q))}return{a:re,b:ne,gcd:U.iushln(se)}},s.prototype._invmp=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var $=new s(1),Q=new s(0),re=U.clone();j.cmpn(1)>0&&U.cmpn(1)>0;){for(var ne=0,se=1;!(j.words[0]&se)&&ne<26;++ne,se<<=1);if(ne>0)for(j.iushrn(ne);ne-- >0;)$.isOdd()&&$.iadd(re),$.iushrn(1);for(var G=0,X=1;!(U.words[0]&X)&&G<26;++G,X<<=1);if(G>0)for(U.iushrn(G);G-- >0;)Q.isOdd()&&Q.iadd(re),Q.iushrn(1);j.cmp(U)>=0?(j.isub(U),$.isub(Q)):(U.isub(j),Q.isub($))}var K;return j.cmpn(1)===0?K=$:K=Q,K.cmpn(0)<0&&K.iadd(P),K},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var j=this.clone(),U=P.clone();j.negative=0,U.negative=0;for(var $=0;j.isEven()&&U.isEven();$++)j.iushrn(1),U.iushrn(1);do{for(;j.isEven();)j.iushrn(1);for(;U.isEven();)U.iushrn(1);var Q=j.cmp(U);if(Q<0){var re=j;j=U,U=re}else if(Q===0||U.cmpn(1)===0)break;j.isub(U)}while(!0);return U.iushln($)},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){a(typeof P=="number");var j=P%26,U=(P-j)/26,$=1<>>26,ne&=67108863,this.words[re]=ne}return Q!==0&&(this.words[re]=Q,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var j=P<0;if(this.negative!==0&&!j)return-1;if(this.negative===0&&j)return 1;this.strip();var U;if(this.length>1)U=1;else{j&&(P=-P),a(P<=67108863,"Number is too big");var $=this.words[0]|0;U=$===P?0:$P.length)return 1;if(this.length=0;U--){var $=this.words[U]|0,Q=P.words[U]|0;if($!==Q){$Q&&(j=1);break}}return j},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 D(P)},s.prototype.toRed=function(P){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return a(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 a(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return a(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 A(F,P){this.name=F,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()}A.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},A.prototype.ireduce=function(P){var j=P,U;do this.split(j,this.tmp),j=this.imulK(j),j=j.iadd(this.tmp),U=j.bitLength();while(U>this.n);var $=U0?j.isub(this.p):j.strip!==void 0?j.strip():j._strip(),j},A.prototype.split=function(P,j){P.iushrn(this.n,0,j)},A.prototype.imulK=function(P){return P.imul(this.k)};function x(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(x,A),x.prototype.split=function(P,j){for(var U=4194303,$=Math.min(P.length,9),Q=0;Q<$;Q++)j.words[Q]=P.words[Q];if(j.length=$,P.length<=9){P.words[0]=0,P.length=1;return}var re=P.words[9];for(j.words[j.length++]=re&U,Q=10;Q>>22,re=ne}re>>>=22,P.words[Q-10]=re,re===0&&P.length>10?P.length-=10:P.length-=9},x.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var j=0,U=0;U>>=26,P.words[U]=Q,j=$}return j!==0&&(P.words[P.length++]=j),P},s._prime=function(P){if(u[P])return u[P];var j;if(P==="k256")j=new x;else if(P==="p224")j=new z;else if(P==="p192")j=new I;else if(P==="p25519")j=new O;else throw new Error("Unknown prime "+P);return u[P]=j,j};function D(F){if(typeof F=="string"){var P=s._prime(F);this.m=P.p,this.prime=P}else a(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}D.prototype._verify1=function(P){a(P.negative===0,"red works only with positives"),a(P.red,"red works only with red numbers")},D.prototype._verify2=function(P,j){a((P.negative|j.negative)===0,"red works only with positives"),a(P.red&&P.red===j.red,"red works only with red numbers")},D.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},D.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},D.prototype.add=function(P,j){this._verify2(P,j);var U=P.add(j);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},D.prototype.iadd=function(P,j){this._verify2(P,j);var U=P.iadd(j);return U.cmp(this.m)>=0&&U.isub(this.m),U},D.prototype.sub=function(P,j){this._verify2(P,j);var U=P.sub(j);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},D.prototype.isub=function(P,j){this._verify2(P,j);var U=P.isub(j);return U.cmpn(0)<0&&U.iadd(this.m),U},D.prototype.shl=function(P,j){return this._verify1(P),this.imod(P.ushln(j))},D.prototype.imul=function(P,j){return this._verify2(P,j),this.imod(P.imul(j))},D.prototype.mul=function(P,j){return this._verify2(P,j),this.imod(P.mul(j))},D.prototype.isqr=function(P){return this.imul(P,P.clone())},D.prototype.sqr=function(P){return this.mul(P,P)},D.prototype.sqrt=function(P){if(P.isZero())return P.clone();var j=this.m.andln(3);if(a(j%2===1),j===3){var U=this.m.add(new s(1)).iushrn(2);return this.pow(P,U)}for(var $=this.m.subn(1),Q=0;!$.isZero()&&$.andln(1)===0;)Q++,$.iushrn(1);a(!$.isZero());var re=new s(1).toRed(this),ne=re.redNeg(),se=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new s(2*G*G).toRed(this);this.pow(G,se).cmp(ne)!==0;)G.redIAdd(ne);for(var X=this.pow(G,$),K=this.pow(P,$.addn(1).iushrn(1)),H=this.pow(P,$),Y=Q;H.cmp(re)!==0;){for(var q=H,Z=0;q.cmp(re)!==0;Z++)q=q.redSqr();a(Z=0;Q--){for(var X=j.words[Q],K=G-1;K>=0;K--){var H=X>>K&1;if(re!==$[0]&&(re=this.sqr(re)),H===0&&ne===0){se=0;continue}ne<<=1,ne|=H,se++,!(se!==U&&(Q!==0||K!==0))&&(re=this.mul(re,$[ne]),se=0,ne=0)}G=26}return re},D.prototype.convertTo=function(P){var j=P.umod(this.m);return j===P?j.clone():j},D.prototype.convertFrom=function(P){var j=P.clone();return j.red=null,j},s.mont=function(P){return new B(P)};function B(F){D.call(this,F),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)}o(B,D),B.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},B.prototype.convertFrom=function(P){var j=this.imod(P.mul(this.rinv));return j.red=null,j},B.prototype.imul=function(P,j){if(P.isZero()||j.isZero())return P.words[0]=0,P.length=1,P;var U=P.imul(j),$=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub($).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.mul=function(P,j){if(P.isZero()||j.isZero())return new s(0)._forceRed(this);var U=P.mul(j),$=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub($).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.invm=function(P){var j=this.imod(P._invmp(this.m).mul(this.r2));return j._forceRed(this)}}(l,this)},6204:function(l){"use strict";l.exports=e;function e(t){var n,r,a,o=t.length,s=0;for(n=0;n>>1;if(!(f<=0)){var u,A=n.mallocDouble(2*f*_),x=n.mallocInt32(_);if(_=s(w,f,A,x),_>0){if(f===1&&C)r.init(_),u=r.sweepComplete(f,M,0,_,A,x,0,_,A,x);else{var z=n.mallocDouble(2*f*T),I=n.mallocInt32(T);T=s(S,f,z,I),T>0&&(r.init(_+T),f===1?u=r.sweepBipartite(f,M,0,_,A,x,0,T,z,I):u=a(f,M,C,_,A,x,T,z,I),n.free(z),n.free(I))}n.free(A),n.free(x)}return u}}}var m;function h(w,S){m.push([w,S])}function v(w){return m=[],c(w,w,h,!0),m}function g(w,S){return m=[],c(w,S,h,!1),m}function i(w,S,M){switch(arguments.length){case 1:return v(w);case 2:return typeof S=="function"?c(w,w,S,!0):g(w,S);case 3:return c(w,S,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(l,e){"use strict";function t(){function a(c,m,h,v,g,i,w,S,M,C,_){for(var T=2*c,f=v,u=T*v;fM-S?a(c,m,h,v,g,i,w,S,M,C,_):o(c,m,h,v,g,i,w,S,M,C,_)}return s}function n(){function a(h,v,g,i,w,S,M,C,_,T,f){for(var u=2*h,A=i,x=u*i;AT-_?i?a(h,v,g,w,S,M,C,_,T,f,u):o(h,v,g,w,S,M,C,_,T,f,u):i?s(h,v,g,w,S,M,C,_,T,f,u):c(h,v,g,w,S,M,C,_,T,f,u)}return m}function r(a){return a?t():n()}e.partial=r(!1),e.full=r(!0)},7150:function(l,e,t){"use strict";l.exports=F;var n=t(1888),r=t(8828),a=t(2455),o=a.partial,s=a.full,c=t(855),m=t(3545),h=t(8105),v=128,g=1<<22,i=1<<22,w=h("!(lo>=p0)&&!(p1>=hi)"),S=h("lo===p0"),M=h("lo0;){X-=1;var Y=X*f,q=x[Y],Z=x[Y+1],ee=x[Y+2],ae=x[Y+3],he=x[Y+4],xe=x[Y+5],we=X*u,Me=z[we],Se=z[we+1],Ie=xe&1,Ve=!!(xe&16),Ge=Q,ke=re,_e=se,ce=G;if(Ie&&(Ge=se,ke=G,_e=Q,ce=re),!(xe&2&&(ee=M(P,q,Z,ee,Ge,ke,Se),Z>=ee))&&!(xe&4&&(Z=C(P,q,Z,ee,Ge,ke,Me),Z>=ee))){var ve=ee-Z,le=he-ae;if(Ve){if(P*ve*(ve+le)h&&g[T+m]>C;--_,T-=w){for(var f=T,u=T+w,A=0;A>>1,C=2*c,_=M,T=g[C*M+m];w=z?(_=x,T=z):A>=O?(_=u,T=A):(_=I,T=O):z>=O?(_=x,T=z):O>=A?(_=u,T=A):(_=I,T=O);for(var F=C*(S-1),P=C*_,D=0;D=p0)&&!(p1>=hi)":m};function t(h){return e[h]}function n(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u];if(z===M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function r(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u];if(zI;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function a(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+A];if(z<=M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function o(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+A];if(z<=M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function s(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u],I=w[_+A];if(z<=M&&M<=I)if(f===x)f+=1,T+=C;else{for(var O=0;C>O;++O){var D=w[_+O];w[_+O]=w[T],w[T++]=D}var B=S[x];S[x]=S[f],S[f++]=B}}return f}function c(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u],I=w[_+A];if(zO;++O){var D=w[_+O];w[_+O]=w[T],w[T++]=D}var B=S[x];S[x]=S[f],S[f++]=B}}return f}function m(h,v,g,i,w,S,M,C){for(var _=2*h,T=_*g,f=T,u=g,A=v,x=h+v,z=g;i>z;++z,T+=_){var I=w[T+A],O=w[T+x];if(!(I>=M)&&!(C>=O))if(u===z)u+=1,f+=_;else{for(var D=0;_>D;++D){var B=w[T+D];w[T+D]=w[f],w[f++]=B}var F=S[z];S[z]=S[u],S[u++]=F}}return u}},4192:function(l){"use strict";l.exports=t;var e=32;function t(v,g){g<=4*e?n(0,g-1,v):h(0,g-1,v)}function n(v,g,i){for(var w=2*(v+1),S=v+1;S<=g;++S){for(var M=i[w++],C=i[w++],_=S,T=w-2;_-- >v;){var f=i[T-2],u=i[T-1];if(fi[g+1]:!0}function m(v,g,i,w){v*=2;var S=w[v];return S>1,_=C-w,T=C+w,f=S,u=_,A=C,x=T,z=M,I=v+1,O=g-1,D=0;c(f,u,i)&&(D=f,f=u,u=D),c(x,z,i)&&(D=x,x=z,z=D),c(f,A,i)&&(D=f,f=A,A=D),c(u,A,i)&&(D=u,u=A,A=D),c(f,x,i)&&(D=f,f=x,x=D),c(A,x,i)&&(D=A,A=x,x=D),c(u,z,i)&&(D=u,u=z,z=D),c(u,A,i)&&(D=u,u=A,A=D),c(x,z,i)&&(D=x,x=z,z=D);for(var B=i[2*u],F=i[2*u+1],P=i[2*x],j=i[2*x+1],U=2*f,$=2*A,Q=2*z,re=2*S,ne=2*C,se=2*M,G=0;G<2;++G){var X=i[U+G],K=i[$+G],H=i[Q+G];i[re+G]=X,i[ne+G]=K,i[se+G]=H}a(_,v,i),a(T,g,i);for(var Y=I;Y<=O;++Y)if(m(Y,B,F,i))Y!==I&&r(Y,I,i),++I;else if(!m(Y,P,j,i))for(;;)if(m(O,P,j,i)){m(O,B,F,i)?(o(Y,I,O,i),++I,--O):(r(Y,O,i),--O);break}else{if(--O>>1;a(w,K);for(var H=0,Y=0,ne=0;ne=o)q=q-o|0,M(h,v,Y--,q);else if(q>=0)M(c,m,H--,q);else if(q<=-o){q=-q-o|0;for(var Z=0;Z>>1;a(w,K);for(var H=0,Y=0,q=0,ne=0;ne>1===w[2*ne+3]>>1&&(ee=2,ne+=1),Z<0){for(var ae=-(Z>>1)-1,he=0;he>1)-1;ee===0?M(c,m,H--,ae):ee===1?M(h,v,Y--,ae):ee===2&&M(g,i,q--,ae)}}}function f(A,x,z,I,O,D,B,F,P,j,U,$){var Q=0,re=2*A,ne=x,se=x+A,G=1,X=1;I?X=o:G=o;for(var K=O;K>>1;a(w,Z);for(var ee=0,K=0;K=o?(he=!I,H-=o):(he=!!I,H-=1),he)C(c,m,ee++,H);else{var xe=$[H],we=re*H,Me=U[we+x+1],Se=U[we+x+1+A];e:for(var Ie=0;Ie>>1;a(w,H);for(var Y=0,se=0;se=o)c[Y++]=G-o;else{G-=1;var Z=U[G],ee=Q*G,ae=j[ee+x+1],he=j[ee+x+1+A];e:for(var xe=0;xe=0;--xe)if(c[xe]===G){for(var Ie=xe+1;Ie0;){for(var S=m.pop(),g=m.pop(),M=-1,C=-1,i=v[g],T=1;T=0||(c.flip(g,S),a(s,c,m,M,g,C),a(s,c,m,g,C,M),a(s,c,m,C,S,M),a(s,c,m,S,M,C))}}},5023:function(l,e,t){"use strict";var n=t(2478);l.exports=m;function r(h,v,g,i,w,S,M){this.cells=h,this.neighbor=v,this.flags=i,this.constraint=g,this.active=w,this.next=S,this.boundary=M}var a=r.prototype;function o(h,v){return h[0]-v[0]||h[1]-v[1]||h[2]-v[2]}a.locate=function(){var h=[0,0,0];return function(v,g,i){var w=v,S=g,M=i;return g0||M.length>0;){for(;S.length>0;){var u=S.pop();if(C[u]!==-w){C[u]=w;for(var A=_[u],x=0;x<3;++x){var z=f[3*u+x];z>=0&&C[z]===0&&(T[3*u+x]?M.push(z):(S.push(z),C[z]=w))}}}var I=M;M=S,S=I,M.length=0,w=-w}var O=c(_,C,v);return g?O.concat(i.boundary):O}},8902:function(l,e,t){"use strict";var n=t(2478),r=t(3250)[3],a=0,o=1,s=2;l.exports=M;function c(C,_,T,f,u){this.a=C,this.b=_,this.idx=T,this.lowerIds=f,this.upperIds=u}function m(C,_,T,f){this.a=C,this.b=_,this.type=T,this.idx=f}function h(C,_){var T=C.a[0]-_.a[0]||C.a[1]-_.a[1]||C.type-_.type;return T||C.type!==a&&(T=r(C.a,C.b,_.b),T)?T:C.idx-_.idx}function v(C,_){return r(C.a,C.b,_)}function g(C,_,T,f,u){for(var A=n.lt(_,f,v),x=n.gt(_,f,v),z=A;z1&&r(T[O[B-2]],T[O[B-1]],f)>0;)C.push([O[B-1],O[B-2],u]),B-=1;O.length=B,O.push(u);for(var D=I.upperIds,B=D.length;B>1&&r(T[D[B-2]],T[D[B-1]],f)<0;)C.push([D[B-2],D[B-1],u]),B-=1;D.length=B,D.push(u)}}function i(C,_){var T;return C.a[0]<_.a[0]?T=r(C.a,C.b,_.a):T=r(_.b,_.a,C.a),T||(_.b[0]I[0]&&u.push(new m(I,z,s,A),new m(z,I,o,A))}u.sort(h);for(var O=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),D=[new c([O,1],[O,0],-1,[],[],[],[])],B=[],A=0,F=u.length;A=0}}(),a.removeTriangle=function(c,m,h){var v=this.stars;o(v[c],m,h),o(v[m],h,c),o(v[h],c,m)},a.addTriangle=function(c,m,h){var v=this.stars;v[c].push(m,h),v[m].push(h,c),v[h].push(c,m)},a.opposite=function(c,m){for(var h=this.stars[m],v=1,g=h.length;v=0;--P){var X=B[P];j=X[0];var K=O[j],H=K[0],Y=K[1],q=I[H],Z=I[Y];if((q[0]-Z[0]||q[1]-Z[1])<0){var ee=H;H=Y,Y=ee}K[0]=H;var ae=K[1]=X[1],he;for(F&&(he=K[2]);P>0&&B[P-1][0]===j;){var X=B[--P],xe=X[1];F?O.push([ae,xe,he]):O.push([ae,xe]),ae=xe}F?O.push([ae,Y,he]):O.push([ae,Y])}return U}function _(I,O,D){for(var B=O.length,F=new n(B),P=[],j=0;jO[2]?1:0)}function u(I,O,D){if(I.length!==0){if(O)for(var B=0;B0||j.length>0}function z(I,O,D){var B;if(D){B=O;for(var F=new Array(O.length),P=0;PC+1)throw new Error(S+" map requires nshades to be at least size "+w.length);Array.isArray(m.alpha)?m.alpha.length!==2?_=[1,1]:_=m.alpha.slice():typeof m.alpha=="number"?_=[m.alpha,m.alpha]:_=[1,1],h=w.map(function(z){return Math.round(z.index*C)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var f=w.map(function(z,I){var O=w[I].index,D=w[I].rgb.slice();return D.length===4&&D[3]>=0&&D[3]<=1||(D[3]=_[0]+(_[1]-_[0])*O),D}),u=[];for(T=0;T=0}function m(h,v,g,i){var w=n(v,g,i);if(w===0){var S=r(n(h,v,g)),M=r(n(h,v,i));if(S===M){if(S===0){var C=c(h,v,g),_=c(h,v,i);return C===_?0:C?1:-1}return 0}else{if(M===0)return S>0||c(h,v,i)?-1:1;if(S===0)return M>0||c(h,v,g)?1:-1}return r(M-S)}var T=n(h,v,g);if(T>0)return w>0&&n(h,v,i)>0?1:-1;if(T<0)return w>0||n(h,v,i)>0?1:-1;var f=n(h,v,i);return f>0||c(h,v,g)?1:-1}},8572:function(l){"use strict";l.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(l){l.exports=n;var e=Math.min;function t(r,a){return r-a}function n(r,a){var o=r.length,s=r.length-a.length;if(s)return s;switch(o){case 0:return 0;case 1:return r[0]-a[0];case 2:return r[0]+r[1]-a[0]-a[1]||e(r[0],r[1])-e(a[0],a[1]);case 3:var c=r[0]+r[1],m=a[0]+a[1];if(s=c+r[2]-(m+a[2]),s)return s;var h=e(r[0],r[1]),v=e(a[0],a[1]);return e(h,r[2])-e(v,a[2])||e(h+r[2],c)-e(v+a[2],m);case 4:var g=r[0],i=r[1],w=r[2],S=r[3],M=a[0],C=a[1],_=a[2],T=a[3];return g+i+w+S-(M+C+_+T)||e(g,i,w,S)-e(M,C,_,T,M)||e(g+i,g+w,g+S,i+w,i+S,w+S)-e(M+C,M+_,M+T,C+_,C+T,_+T)||e(g+i+w,g+i+S,g+w+S,i+w+S)-e(M+C+_,M+C+T,M+_+T,C+_+T);default:for(var f=r.slice().sort(t),u=a.slice().sort(t),A=0;At[r][0]&&(r=a);return nr?[[r],[n]]:[[n]]}},4750:function(l,e,t){"use strict";l.exports=r;var n=t(3090);function r(a){var o=n(a),s=o.length;if(s<=2)return[];for(var c=new Array(s),m=o[s-1],h=0;h=m[M]&&(S+=1);i[w]=S}}return c}function s(c,m){try{return n(c,!0)}catch{var h=r(c);if(h.length<=m)return[];var v=a(c,h),g=n(v,!0);return o(g,h)}}},4769:function(l){"use strict";function e(n,r,a,o,s,c){var m=6*s*s-6*s,h=3*s*s-4*s+1,v=-6*s*s+6*s,g=3*s*s-2*s;if(n.length){c||(c=new Array(n.length));for(var i=n.length-1;i>=0;--i)c[i]=m*n[i]+h*r[i]+v*a[i]+g*o[i];return c}return m*n+h*r+v*a[i]+g*o}function t(n,r,a,o,s,c){var m=s-1,h=s*s,v=m*m,g=(1+2*s)*v,i=s*v,w=h*(3-2*s),S=h*m;if(n.length){c||(c=new Array(n.length));for(var M=n.length-1;M>=0;--M)c[M]=g*n[M]+i*r[M]+w*a[M]+S*o[M];return c}return g*n+i*r+w*a+S*o}l.exports=t,l.exports.derivative=e},7642:function(l,e,t){"use strict";var n=t(8954),r=t(1682);l.exports=c;function a(m,h){this.point=m,this.index=h}function o(m,h){for(var v=m.point,g=h.point,i=v.length,w=0;w=2)return!1;D[F]=P}return!0}):O=O.filter(function(D){for(var B=0;B<=g;++B){var F=A[D[B]];if(F<0)return!1;D[B]=F}return!0}),g&1)for(var S=0;S>>31},l.exports.exponent=function(w){var S=l.exports.hi(w);return(S<<1>>>21)-1023},l.exports.fraction=function(w){var S=l.exports.lo(w),M=l.exports.hi(w),C=M&(1<<20)-1;return M&2146435072&&(C+=1048576),[S,C]},l.exports.denormalized=function(w){var S=l.exports.hi(w);return!(S&2146435072)}},1338:function(l){"use strict";function e(r,a,o){var s=r[o]|0;if(s<=0)return[];var c=new Array(s),m;if(o===r.length-1)for(m=0;m"u"&&(a=0),typeof r){case"number":if(r>0)return t(r|0,a);break;case"object":if(typeof r.length=="number")return e(r,a,0);break}return[]}l.exports=n},3134:function(l,e,t){"use strict";l.exports=r;var n=t(1682);function r(a,o){var s=a.length;if(typeof o!="number"){o=0;for(var c=0;c=g-1)for(var T=S.length-1,u=h-v[g-1],f=0;f=g-1)for(var _=S.length-1,T=h-v[g-1],f=0;f=0;--g)if(h[--v])return!1;return!0},s.jump=function(h){var v=this.lastT(),g=this.dimension;if(!(h0;--f)i.push(a(C[f-1],_[f-1],arguments[f])),w.push(0)}},s.push=function(h){var v=this.lastT(),g=this.dimension;if(!(h1e-6?1/M:0;this._time.push(h);for(var u=g;u>0;--u){var A=a(_[u-1],T[u-1],arguments[u]);i.push(A),w.push((A-i[S++])*f)}}},s.set=function(h){var v=this.dimension;if(!(h0;--C)g.push(a(S[C-1],M[C-1],arguments[C])),i.push(0)}},s.move=function(h){var v=this.lastT(),g=this.dimension;if(!(h<=v||arguments.length!==g+1)){var i=this._state,w=this._velocity,S=i.length-this.dimension,M=this.bounds,C=M[0],_=M[1],T=h-v,f=T>1e-6?1/T:0;this._time.push(h);for(var u=g;u>0;--u){var A=arguments[u];i.push(a(C[u-1],_[u-1],i[S++]+A)),w.push(A*f)}}},s.idle=function(h){var v=this.lastT();if(!(h=0;--f)i.push(a(C[f],_[f],i[S]+T*w[S])),w.push(0),S+=1}};function c(h){for(var v=new Array(h),g=0;g=0;--I){var u=A[I];x[I]<=0?A[I]=new n(u._color,u.key,u.value,A[I+1],u.right,u._count+1):A[I]=new n(u._color,u.key,u.value,u.left,A[I+1],u._count+1)}for(var I=A.length-1;I>1;--I){var O=A[I-1],u=A[I];if(O._color===t||u._color===t)break;var D=A[I-2];if(D.left===O)if(O.left===u){var B=D.right;if(B&&B._color===e)O._color=t,D.right=a(t,B),D._color=e,I-=1;else{if(D._color=e,D.left=O.right,O._color=t,O.right=D,A[I-2]=O,A[I-1]=u,o(D),o(O),I>=3){var F=A[I-3];F.left===D?F.left=O:F.right=O}break}}else{var B=D.right;if(B&&B._color===e)O._color=t,D.right=a(t,B),D._color=e,I-=1;else{if(O.right=u.left,D._color=e,D.left=u.right,u._color=t,u.left=O,u.right=D,A[I-2]=u,A[I-1]=O,o(D),o(O),o(u),I>=3){var F=A[I-3];F.left===D?F.left=u:F.right=u}break}}else if(O.right===u){var B=D.left;if(B&&B._color===e)O._color=t,D.left=a(t,B),D._color=e,I-=1;else{if(D._color=e,D.right=O.left,O._color=t,O.left=D,A[I-2]=O,A[I-1]=u,o(D),o(O),I>=3){var F=A[I-3];F.right===D?F.right=O:F.left=O}break}}else{var B=D.left;if(B&&B._color===e)O._color=t,D.left=a(t,B),D._color=e,I-=1;else{if(O.left=u.right,D._color=e,D.right=u.left,u._color=t,u.right=O,u.left=D,A[I-2]=u,A[I-1]=O,o(D),o(O),o(u),I>=3){var F=A[I-3];F.right===D?F.right=u:F.left=u}break}}}return A[0]._color=t,new s(f,A[0])};function m(_,T){if(T.left){var f=m(_,T.left);if(f)return f}var f=_(T.key,T.value);if(f)return f;if(T.right)return m(_,T.right)}function h(_,T,f,u){var A=T(_,u.key);if(A<=0){if(u.left){var x=h(_,T,f,u.left);if(x)return x}var x=f(u.key,u.value);if(x)return x}if(u.right)return h(_,T,f,u.right)}function v(_,T,f,u,A){var x=f(_,A.key),z=f(T,A.key),I;if(x<=0&&(A.left&&(I=v(_,T,f,u,A.left),I)||z>0&&(I=u(A.key,A.value),I)))return I;if(z>0&&A.right)return v(_,T,f,u,A.right)}c.forEach=function(T,f,u){if(this.root)switch(arguments.length){case 1:return m(T,this.root);case 2:return h(f,this._compare,T,this.root);case 3:return this._compare(f,u)>=0?void 0:v(f,u,this._compare,T,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.left;return new g(this,_)}}),Object.defineProperty(c,"end",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.right;return new g(this,_)}}),c.at=function(_){if(_<0)return new g(this,[]);for(var T=this.root,f=[];;){if(f.push(T),T.left){if(_=T.right._count)break;T=T.right}else break}return new g(this,[])},c.ge=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x<=0&&(A=u.length),x<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.gt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x<0&&(A=u.length),x<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.lt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x>0&&(A=u.length),x<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.le=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x>=0&&(A=u.length),x<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.find=function(_){for(var T=this._compare,f=this.root,u=[];f;){var A=T(_,f.key);if(u.push(f),A===0)return new g(this,u);A<=0?f=f.left:f=f.right}return new g(this,[])},c.remove=function(_){var T=this.find(_);return T?T.remove():this},c.get=function(_){for(var T=this._compare,f=this.root;f;){var u=T(_,f.key);if(u===0)return f.value;u<=0?f=f.left:f=f.right}};function g(_,T){this.tree=_,this._stack=T}var i=g.prototype;Object.defineProperty(i,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(i,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),i.clone=function(){return new g(this.tree,this._stack.slice())};function w(_,T){_.key=T.key,_.value=T.value,_.left=T.left,_.right=T.right,_._color=T._color,_._count=T._count}function S(_){for(var T,f,u,A,x=_.length-1;x>=0;--x){if(T=_[x],x===0){T._color=t;return}if(f=_[x-1],f.left===T){if(u=f.right,u.right&&u.right._color===e){if(u=f.right=r(u),A=u.right=r(u.right),f.right=u.left,u.left=f,u.right=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),x>1){var z=_[x-2];z.left===f?z.left=u:z.right=u}_[x-1]=u;return}else if(u.left&&u.left._color===e){if(u=f.right=r(u),A=u.left=r(u.left),f.right=A.left,u.left=A.right,A.left=f,A.right=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),x>1){var z=_[x-2];z.left===f?z.left=A:z.right=A}_[x-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.right=a(e,u);return}else{f.right=a(e,u);continue}else{if(u=r(u),f.right=u.left,u.left=f,u._color=f._color,f._color=e,o(f),o(u),x>1){var z=_[x-2];z.left===f?z.left=u:z.right=u}_[x-1]=u,_[x]=f,x+1<_.length?_[x+1]=T:_.push(T),x=x+2}}else{if(u=f.left,u.left&&u.left._color===e){if(u=f.left=r(u),A=u.left=r(u.left),f.left=u.right,u.right=f,u.left=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),x>1){var z=_[x-2];z.right===f?z.right=u:z.left=u}_[x-1]=u;return}else if(u.right&&u.right._color===e){if(u=f.left=r(u),A=u.right=r(u.right),f.left=A.right,u.right=A.left,A.right=f,A.left=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),x>1){var z=_[x-2];z.right===f?z.right=A:z.left=A}_[x-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.left=a(e,u);return}else{f.left=a(e,u);continue}else{if(u=r(u),f.left=u.right,u.right=f,u._color=f._color,f._color=e,o(f),o(u),x>1){var z=_[x-2];z.right===f?z.right=u:z.left=u}_[x-1]=u,_[x]=f,x+1<_.length?_[x+1]=T:_.push(T),x=x+2}}}}i.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var T=new Array(_.length),f=_[_.length-1];T[T.length-1]=new n(f._color,f.key,f.value,f.left,f.right,f._count);for(var u=_.length-2;u>=0;--u){var f=_[u];f.left===_[u+1]?T[u]=new n(f._color,f.key,f.value,T[u+1],f.right,f._count):T[u]=new n(f._color,f.key,f.value,f.left,T[u+1],f._count)}if(f=T[T.length-1],f.left&&f.right){var A=T.length;for(f=f.left;f.right;)T.push(f),f=f.right;var x=T[A-1];T.push(new n(f._color,x.key,x.value,f.left,f.right,f._count)),T[A-1].key=f.key,T[A-1].value=f.value;for(var u=T.length-2;u>=A;--u)f=T[u],T[u]=new n(f._color,f.key,f.value,f.left,T[u+1],f._count);T[A-1].left=T[A]}if(f=T[T.length-1],f._color===e){var z=T[T.length-2];z.left===f?z.left=null:z.right===f&&(z.right=null),T.pop();for(var u=0;u0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(i,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(i,"index",{get:function(){var _=0,T=this._stack;if(T.length===0){var f=this.tree.root;return f?f._count:0}else T[T.length-1].left&&(_=T[T.length-1].left._count);for(var u=T.length-2;u>=0;--u)T[u+1]===T[u].right&&(++_,T[u].left&&(_+=T[u].left._count));return _},enumerable:!0}),i.next=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.right)for(T=T.right;T;)_.push(T),T=T.left;else for(_.pop();_.length>0&&_[_.length-1].right===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].left===_[T])return!0;return!1}}),i.update=function(_){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var f=new Array(T.length),u=T[T.length-1];f[f.length-1]=new n(u._color,u.key,_,u.left,u.right,u._count);for(var A=T.length-2;A>=0;--A)u=T[A],u.left===T[A+1]?f[A]=new n(u._color,u.key,u.value,f[A+1],u.right,u._count):f[A]=new n(u._color,u.key,u.value,u.left,f[A+1],u._count);return new s(this.tree._compare,f[0])},i.prev=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.left)for(T=T.left;T;)_.push(T),T=T.right;else for(_.pop();_.length>0&&_[_.length-1].left===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].right===_[T])return!0;return!1}});function M(_,T){return _T?1:0}function C(_){return new s(_||M,null)}},3837:function(l,e,t){"use strict";l.exports=I;var n=t(4935),r=t(501),a=t(5304),o=t(6429),s=t(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),m=ArrayBuffer,h=DataView;function v(O){return m.isView(O)&&!(O instanceof h)}function g(O){return Array.isArray(O)||v(O)}function i(O,D){return O[0]=D[0],O[1]=D[1],O[2]=D[2],O}function w(O){this.gl=O,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=a(O)}var S=w.prototype;S.update=function(O){O=O||{};function D(H,Y,q){if(q in O){var Z=O[q],ee=this[q],ae;(H?g(Z)&&g(Z[0]):g(Z))?this[q]=ae=[Y(Z[0]),Y(Z[1]),Y(Z[2])]:this[q]=ae=[Y(Z),Y(Z),Y(Z)];for(var he=0;he<3;++he)if(ae[he]!==ee[he])return!0}return!1}var B=D.bind(this,!1,Number),F=D.bind(this,!1,Boolean),P=D.bind(this,!1,String),j=D.bind(this,!0,function(H){if(g(H)){if(H.length===3)return[+H[0],+H[1],+H[2],1];if(H.length===4)return[+H[0],+H[1],+H[2],+H[3]]}return[0,0,0,1]}),U,$=!1,Q=!1;if("bounds"in O)for(var re=O.bounds,ne=0;ne<2;++ne)for(var se=0;se<3;++se)re[ne][se]!==this.bounds[ne][se]&&(Q=!0),this.bounds[ne][se]=re[ne][se];if("ticks"in O){U=O.ticks,$=!0,this.autoTicks=!1;for(var ne=0;ne<3;++ne)this.tickSpacing[ne]=0}else B("tickSpacing")&&(this.autoTicks=!0,Q=!0);if(this._firstInit&&("ticks"in O||"tickSpacing"in O||(this.autoTicks=!0),Q=!0,$=!0,this._firstInit=!1),Q&&this.autoTicks&&(U=s.create(this.bounds,this.tickSpacing),$=!0),$){for(var ne=0;ne<3;++ne)U[ne].sort(function(Y,q){return Y.x-q.x});s.equal(U,this.ticks)?$=!1:this.ticks=U}F("tickEnable"),P("tickFont")&&($=!0),P("tickFontStyle")&&($=!0),P("tickFontWeight")&&($=!0),P("tickFontVariant")&&($=!0),B("tickSize"),B("tickAngle"),B("tickPad"),j("tickColor");var G=P("labels");P("labelFont")&&(G=!0),P("labelFontStyle")&&(G=!0),P("labelFontWeight")&&(G=!0),P("labelFontVariant")&&(G=!0),F("labelEnable"),B("labelSize"),B("labelPad"),j("labelColor"),F("lineEnable"),F("lineMirror"),B("lineWidth"),j("lineColor"),F("lineTickEnable"),F("lineTickMirror"),B("lineTickLength"),B("lineTickWidth"),j("lineTickColor"),F("gridEnable"),B("gridWidth"),j("gridColor"),F("zeroEnable"),j("zeroLineColor"),B("zeroLineWidth"),F("backgroundEnable"),j("backgroundColor");var X=[{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]}],K=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(G||$)&&this._text.update(this.bounds,this.labels,X,this.ticks,K):this._text=n(this.gl,this.bounds,this.labels,X,this.ticks,K),this._lines&&$&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var C=[new M,new M,new M];function _(O,D,B,F,P){for(var j=O.primalOffset,U=O.primalMinor,$=O.mirrorOffset,Q=O.mirrorMinor,re=F[D],ne=0;ne<3;++ne)if(D!==ne){var se=j,G=$,X=U,K=Q;re&1<0?(X[ne]=-1,K[ne]=0):(X[ne]=0,K[ne]=1)}}var T=[0,0,0],f={model:c,view:c,projection:c,_ortho:!1};S.isOpaque=function(){return!0},S.isTransparent=function(){return!1},S.drawTransparent=function(O){};var u=0,A=[0,0,0],x=[0,0,0],z=[0,0,0];S.draw=function(O){O=O||f;for(var q=this.gl,D=O.model||c,B=O.view||c,F=O.projection||c,P=this.bounds,j=O._ortho||!1,U=o(D,B,F,P,j),$=U.cubeEdges,Q=U.axis,re=B[12],ne=B[13],se=B[14],G=B[15],X=j?2:1,K=X*this.pixelRatio*(F[3]*re+F[7]*ne+F[11]*se+F[15]*G)/q.drawingBufferHeight,H=0;H<3;++H)this.lastCubeProps.cubeEdges[H]=$[H],this.lastCubeProps.axis[H]=Q[H];for(var Y=C,H=0;H<3;++H)_(C[H],H,this.bounds,$,Q);for(var q=this.gl,Z=T,H=0;H<3;++H)this.backgroundEnable[H]?Z[H]=Q[H]:Z[H]=0;this._background.draw(D,B,F,P,Z,this.backgroundColor),this._lines.bind(D,B,F,this);for(var H=0;H<3;++H){var ee=[0,0,0];Q[H]>0?ee[H]=P[1][H]:ee[H]=P[0][H];for(var ae=0;ae<2;++ae){var he=(H+1+ae)%3,xe=(H+1+(ae^1))%3;this.gridEnable[he]&&this._lines.drawGrid(he,xe,this.bounds,ee,this.gridColor[he],this.gridWidth[he]*this.pixelRatio)}for(var ae=0;ae<2;++ae){var he=(H+1+ae)%3,xe=(H+1+(ae^1))%3;this.zeroEnable[xe]&&Math.min(P[0][xe],P[1][xe])<=0&&Math.max(P[0][xe],P[1][xe])>=0&&this._lines.drawZero(he,xe,this.bounds,ee,this.zeroLineColor[xe],this.zeroLineWidth[xe]*this.pixelRatio)}}for(var H=0;H<3;++H){this.lineEnable[H]&&this._lines.drawAxisLine(H,this.bounds,Y[H].primalOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio),this.lineMirror[H]&&this._lines.drawAxisLine(H,this.bounds,Y[H].mirrorOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio);for(var we=i(A,Y[H].primalMinor),Me=i(x,Y[H].mirrorMinor),Se=this.lineTickLength,ae=0;ae<3;++ae){var Ie=K/D[5*ae];we[ae]*=Se[ae]*Ie,Me[ae]*=Se[ae]*Ie}this.lineTickEnable[H]&&this._lines.drawAxisTicks(H,Y[H].primalOffset,we,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio),this.lineTickMirror[H]&&this._lines.drawAxisTicks(H,Y[H].mirrorOffset,Me,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio)}this._lines.unbind(),this._text.bind(D,B,F,this.pixelRatio);var Ve,Ge=.5,ke,_e;function ce(Ye){_e=[0,0,0],_e[Ye]=1}function ve(Ye,yt,gt){var Tt=(Ye+1)%3,At=(Ye+2)%3,$t=yt[Tt],rr=yt[At],_r=gt[Tt],Xt=gt[At];if($t>0&&Xt>0){ce(Tt);return}else if($t>0&&Xt<0){ce(Tt);return}else if($t<0&&Xt>0){ce(Tt);return}else if($t<0&&Xt<0){ce(Tt);return}else if(rr>0&&_r>0){ce(At);return}else if(rr>0&&_r<0){ce(At);return}else if(rr<0&&_r>0){ce(At);return}else if(rr<0&&_r<0){ce(At);return}}for(var H=0;H<3;++H){for(var le=Y[H].primalMinor,Ae=Y[H].mirrorMinor,Be=i(z,Y[H].primalOffset),ae=0;ae<3;++ae)this.lineTickEnable[H]&&(Be[ae]+=K*le[ae]*Math.max(this.lineTickLength[ae],0)/D[5*ae]);var Xe=[0,0,0];if(Xe[H]=1,this.tickEnable[H]){this.tickAngle[H]===-3600?(this.tickAngle[H]=0,this.tickAlign[H]="auto"):this.tickAlign[H]=-1,ke=1,Ve=[this.tickAlign[H],Ge,ke],Ve[0]==="auto"?Ve[0]=u:Ve[0]=parseInt(""+Ve[0]),_e=[0,0,0],ve(H,le,Ae);for(var ae=0;ae<3;++ae)Be[ae]+=K*le[ae]*this.tickPad[ae]/D[5*ae];this._text.drawTicks(H,this.tickSize[H],this.tickAngle[H],Be,this.tickColor[H],Xe,_e,Ve)}if(this.labelEnable[H]){ke=0,_e=[0,0,0],this.labels[H].length>4&&(ce(H),ke=1),Ve=[this.labelAlign[H],Ge,ke],Ve[0]==="auto"?Ve[0]=u:Ve[0]=parseInt(""+Ve[0]);for(var ae=0;ae<3;++ae)Be[ae]+=K*le[ae]*this.labelPad[ae]/D[5*ae];Be[H]+=.5*(P[0][H]+P[1][H]),this._text.drawLabel(H,this.labelSize[H],this.labelAngle[H],Be,this.labelColor[H],[0,0,0],_e,Ve)}}this._text.unbind()},S.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function I(O,D){var B=new w(O);return B.update(D),B}},5304:function(l,e,t){"use strict";l.exports=c;var n=t(2762),r=t(8116),a=t(1879).bg;function o(m,h,v,g){this.gl=m,this.buffer=h,this.vao=v,this.shader=g}var s=o.prototype;s.draw=function(m,h,v,g,i,w){for(var S=!1,M=0;M<3;++M)S=S||i[M];if(S){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:h,projection:v,bounds:g,enable:i,colors:w},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(m){for(var h=[],v=[],g=0,i=0;i<3;++i)for(var w=(i+1)%3,S=(i+2)%3,M=[0,0,0],C=[0,0,0],_=-1;_<=1;_+=2){v.push(g,g+2,g+1,g+1,g+2,g+3),M[i]=_,C[i]=_;for(var T=-1;T<=1;T+=2){M[w]=T;for(var f=-1;f<=1;f+=2)M[S]=f,h.push(M[0],M[1],M[2],C[0],C[1],C[2]),g+=1}var u=w;w=S,S=u}var A=n(m,new Float32Array(h)),x=n(m,new Uint16Array(v),m.ELEMENT_ARRAY_BUFFER),z=r(m,[{buffer:A,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:A,type:m.FLOAT,size:3,offset:12,stride:24}],x),I=a(m);return I.attributes.position.location=0,I.attributes.normal.location=1,new o(m,A,z,I)}},6429:function(l,e,t){"use strict";l.exports=_;var n=t(8828),r=t(6760),a=t(5202),o=t(3250),s=new Array(16),c=new Array(8),m=new Array(8),h=new Array(3),v=[0,0,0];(function(){for(var T=0;T<8;++T)c[T]=[1,1,1,1],m[T]=[1,1,1]})();function g(T,f,u){for(var A=0;A<4;++A){T[A]=u[12+A];for(var x=0;x<3;++x)T[A]+=f[x]*u[4*x+A]}}var i=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function w(T){for(var f=0;fQ&&(B|=1<Q){B|=1<m[I][1])&&(Y=I);for(var q=-1,I=0;I<3;++I){var Z=Y^1<m[ee][0]&&(ee=Z)}}var ae=S;ae[0]=ae[1]=ae[2]=0,ae[n.log2(q^Y)]=Y&q,ae[n.log2(Y^ee)]=Yⅇvar he=ee^7;he===B||he===H?(he=q^7,ae[n.log2(ee^he)]=he&ee):ae[n.log2(q^he)]=he&q;for(var xe=M,we=B,j=0;j<3;++j)we&1<0}function i(d){var p=0,g=d.length;for(d[0]===239&&d[1]===187&&d[2]===191&&(p=3);p]*>/,s=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,l=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,n=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,u=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function f(d){var p=d.match(l),g=d.match(n),m=d.match(u);return{width:p&&(p[1]||p[2]),height:g&&(g[1]||g[2]),viewbox:m&&(m[1]||m[2])}}function h(d){return c.test(d)?d.match(c)[0]:"px"}r.exports=function(d){if(i(d)){for(var p="",g=0;g>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function f(h,d){return{width:(h[d+6]<<16|h[d+5]<<8|h[d+4])+1,height:(h[d+9]<<16|h[d+8]<<8|h[d+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}r.exports=function(h){if(!(h.length<16)&&!(!a(h,0,l)||!a(h,8,n))){var d=12,p=null,g=0,m=o(h,4)+8;if(!(m>h.length)){for(;d+8=10?p=p||u(h,d+8):y==="VP8L"&&_>=5?p=p||c(h,d+8):y==="VP8X"&&_>=10?p=p||f(h,d+8):y==="EXIF"&&(g=s.get_orientation(h.slice(d+8,d+8+_)),d=1/0),d+=8+_}if(p)return g>0&&(p.orientation=g),p}}}}}),ine=ye({"node_modules/probe-image-size/lib/parsers_sync.js"(e,r){"use strict";r.exports={avif:Yie(),bmp:Xie(),gif:Zie(),ico:Kie(),jpeg:Jie(),png:Qie(),psd:ene(),svg:tne(),tiff:rne(),webp:ane()}}}),nne=ye({"node_modules/probe-image-size/sync.js"(e,r){"use strict";var t=ine();function a(i){for(var o=Object.keys(t),s=0;s0&&l.height>0?l:null}return null}r.exports=function(o){return a(o)},r.exports.parsers=t}}),one=ye({"src/traces/image/helpers.js"(e){"use strict";var r=nne(),t=h0().IMAGE_URL_PREFIX,a=Bm().Buffer;e.getImageSize=function(i){var o=i.replace(t,""),s=new a(o,"base64");return r(s)}}}),sne=ye({"src/traces/image/calc.js"(e,r){"use strict";var t=Yt(),a=ky(),i=en(),o=qi(),s=Yt().maxRowLength,l=one().getImageSize;r.exports=function(h,d){var p,g;if(d._hasZ)p=d.z.length,g=s(d.z);else if(d._hasSource){var m=l(d.source);p=m.height,g=m.width}var y=o.getFromId(h,d.xaxis||"x"),_=o.getFromId(h,d.yaxis||"y"),v=y.d2c(d.x0)-d.dx/2,x=_.d2c(d.y0)-d.dy/2,E,M=[v,v+g*d.dx],C=[x,x+p*d.dy];if(y&&y.type==="log")for(E=0;E0;)F=p.c2p(C+z*b),z--;for(z=0;R===void 0&&z0;)P=g.c2p(w+z*S),z--;if(FN[0];if(H||W){var U=A+L/2,V=R+B/2;Z+="transform:"+i(U+"px",V+"px")+"scale("+(H?-1:1)+","+(W?-1:1)+")"+i(-U+"px",-V+"px")+";"}}X.attr("style",Z);var j=new Promise(function(q){if(x._hasZ)q();else if(x._hasSource)if(x._canvas&&x._canvas.el.width===k&&x._canvas.el.height===T&&x._canvas.source===x.source)q();else{var Y=document.createElement("canvas");Y.width=k,Y.height=T;var K=Y.getContext("2d",{willReadFrequently:!0});x._image=x._image||new Image;var re=x._image;re.onload=function(){K.drawImage(re,0,0),x._canvas={el:Y,source:x.source},q()},re.setAttribute("src",x.source)}}).then(function(){var q,Y;if(x._hasZ)Y=$(function(se,le){var ue=M[le][se];return a.isTypedArray(ue)&&(ue=Array.from(ue)),ue}),q=Y.toDataURL("image/png");else if(x._hasSource)if(E)q=x.source;else{var K=x._canvas.el.getContext("2d",{willReadFrequently:!0}),re=K.getImageData(0,0,k,T).data;Y=$(function(se,le){var ue=4*(le*k+se);return[re[ue],re[ue+1],re[ue+2],re[ue+3]]}),q=Y.toDataURL("image/png")}X.attr({"xlink:href":q,height:B,width:L,x:A,y:R})});c._promises.push(j)})}}}),une=ye({"src/traces/image/style.js"(e,r){"use strict";var t=ai();r.exports=function(i){t.select(i).selectAll(".im image").style("opacity",function(o){return o[0].trace.opacity})}}}),cne=ye({"src/traces/image/hover.js"(e,r){"use strict";var t=Hs(),a=Yt(),i=a.isArrayOrTypedArray,o=ky();r.exports=function(l,n,u){var c=l.cd[0],f=c.trace,h=l.xa,d=l.ya;if(!(t.inbox(n-c.x0,n-(c.x0+c.w*f.dx),0)>0||t.inbox(u-c.y0,u-(c.y0+c.h*f.dy),0)>0)){var p=Math.floor((n-c.x0)/f.dx),g=Math.floor(Math.abs(u-c.y0)/f.dy),m;if(f._hasZ?m=c.z[g][p]:f._hasSource&&(m=f._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(p,g,1,1).data),!!m){var y=c.hi||f.hoverinfo,_;if(y){var v=y.split("+");v.indexOf("all")!==-1&&(v=["color"]),v.indexOf("color")!==-1&&(_=!0)}var x=o.colormodel[f.colormodel],E=x.colormodel||f.colormodel,M=E.length,C=f._scaler(m),w=x.suffix,k=[];(f.hovertemplate||_)&&(k.push("["+[C[0]+w[0],C[1]+w[1],C[2]+w[2]].join(", ")),M===4&&k.push(", "+C[3]+w[3]),k.push("]"),k=k.join(""),l.extraText=E.toUpperCase()+": "+k);var T;i(f.hovertext)&&i(f.hovertext[g])?T=f.hovertext[g][p]:i(f.text)&&i(f.text[g])&&(T=f.text[g][p]);var b=d.c2p(c.y0+(g+.5)*f.dy),S=c.x0+(p+.5)*f.dx,A=c.y0+(g+.5)*f.dy,F="["+m.slice(0,f.colormodel.length).join(", ")+"]";return[a.extendFlat(l,{index:[g,p],x0:h.c2p(c.x0+p*f.dx),x1:h.c2p(c.x0+(p+1)*f.dx),y0:b,y1:b,color:C,xVal:S,xLabelVal:S,yVal:A,yLabelVal:A,zLabelVal:F,text:T,hovertemplateLabels:{zLabel:F,colorLabel:k,"color[0]Label":C[0]+w[0],"color[1]Label":C[1]+w[1],"color[2]Label":C[2]+w[2],"color[3]Label":C[3]+w[3]}})]}}}}}),fne=ye({"src/traces/image/event_data.js"(e,r){"use strict";r.exports=function(a,i){return"xVal"in i&&(a.x=i.xVal),"yVal"in i&&(a.y=i.yVal),i.xa&&(a.xaxis=i.xa),i.ya&&(a.yaxis=i.ya),a.color=i.color,a.colormodel=i.trace.colormodel,a.z||(a.z=i.color),a}}}),hne=ye({"src/traces/image/index.js"(e,r){"use strict";r.exports={attributes:(SL(),On(gT)).default,supplyDefaults:Wae(),calc:sne(),plot:lne(),style:une(),hoverPoints:cne(),eventData:fne(),moduleType:"trace",name:"image",basePlotModule:Ml(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),dne=ye({"lib/image.js"(e,r){"use strict";r.exports=hne()}}),qm=ye({"src/traces/pie/attributes.js"(e,r){"use strict";var t=Oo(),a=Ds().attributes,i=vs(),o=Wl(),{hovertemplateAttrs:s,texttemplateAttrs:l,templatefallbackAttrs:n}=Ro(),u=Xi().extendFlat,c=Eu().pattern,f=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});r.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:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:c,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:u({},t.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:n(),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:n({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:u({},f,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:u({},f,{}),outsidetextfont:u({},f,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:u({},t.showlegend,{arrayOk:!0}),legend:u({},t.legend,{arrayOk:!0}),legendrank:u({},t.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:u({},f,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:a({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"}}}}),Vm=ye({"src/traces/pie/defaults.js"(e,r){"use strict";var t=en(),a=Yt(),i=qm(),o=Ds().defaults,s=Oh().handleText,l=Yt().coercePattern;function n(f,h){var d=a.isArrayOrTypedArray(f),p=a.isArrayOrTypedArray(h),g=Math.min(d?f.length:1/0,p?h.length:1/0);if(isFinite(g)||(g=0),g&&p){for(var m,y=0;y0){m=!0;break}}m||(g=0)}return{hasLabels:d,hasValues:p,len:g}}function u(f,h,d,p,g){var m=p("marker.line.width");m&&p("marker.line.color",g?void 0:d.paper_bgcolor);var y=p("marker.colors");l(p,"marker.pattern",y),f.marker&&!h.marker.pattern.fgcolor&&(h.marker.pattern.fgcolor=f.marker.colors),h.marker.pattern.bgcolor||(h.marker.pattern.bgcolor=d.paper_bgcolor)}function c(f,h,d,p){function g(A,F){return a.coerce(f,h,i,A,F)}var m=g("labels"),y=g("values"),_=n(m,y),v=_.len;if(h._hasLabels=_.hasLabels,h._hasValues=_.hasValues,!h._hasLabels&&h._hasValues&&(g("label0"),g("dlabel")),!v){h.visible=!1;return}h._length=v,u(f,h,p,g,!0),g("scalegroup");var x=g("text"),E=g("texttemplate");g("texttemplatefallback");var M;if(E||(M=g("textinfo",a.isArrayOrTypedArray(x)?"text+percent":"percent")),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),E||M&&M!=="none"){var C=g("textposition");s(f,h,p,g,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var w=Array.isArray(C)||C==="auto",k=w||C==="outside";k&&g("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&g("insidetextorientation")}else M==="none"&&g("textposition","none");o(h,p,g);var T=g("hole"),b=g("title.text");if(b){var S=g("title.position",T?"middle center":"top center");!T&&S==="middle center"&&(h.title.position="top center"),a.coerceFont(g,"title.font",p.font)}g("sort"),g("direction"),g("rotation"),g("pull")}r.exports={handleLabelsAndValues:n,handleMarkerDefaults:u,supplyDefaults:c}}}),PT=ye({"src/traces/pie/layout_attributes.js"(e,r){"use strict";r.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),pne=ye({"src/traces/pie/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=PT();r.exports=function(o,s){function l(n,u){return t.coerce(o,s,a,n,u)}l("hiddenlabels"),l("piecolorway",s.colorway),l("extendpiecolors")}}}),Fy=ye({"src/traces/pie/calc.js"(e,r){"use strict";var t=en(),a=Ya(),i={};function o(u,c){var f=[],h=u._fullLayout,d=h.hiddenlabels||[],p=c.labels,g=c.marker.colors||[],m=c.values,y=c._length,_=c._hasValues&&y,v,x;if(c.dlabel)for(p=new Array(y),v=0;v=0});var A=c.type==="funnelarea"?w:c.sort;return A&&f.sort(function(F,D){return D.v-F.v}),f[0]&&(f[0].vTotal=C),f}function s(u){return function(f,h){if(!f||!a.isValid(f))return!1;let d=a.rgbaString(f);return u[h]||(u[h]=d),d}}function l(u,c){var f=(c||{}).type;f||(f="pie");var h=u._fullLayout,d=u.calcdata,p=h[f+"colorway"],g=h["_"+f+"colormap"];h["extend"+f+"colors"]&&(p=n(p,i));for(var m=0,y=0;y0&&(_e+=Ge*ee.pxmid[0],Se+=Ge*ee.pxmid[1])}ee.cxFinal=_e,ee.cyFinal=Se;function Ze(st,Ve,Ye,me){var be=me*(Ve[0]-st[0]),Ee=me*(Ve[1]-st[1]);return"a"+me*re.r+","+me*re.r+" 0 "+ee.largeArc+(Ye?" 1 ":" 0 ")+be+","+Ee}var Ke=se.hole;if(ee.v===re.vTotal){var dt="M"+(_e+ee.px0[0])+","+(Se+ee.px0[1])+Ze(ee.px0,ee.pxmid,!0,1)+Ze(ee.pxmid,ee.px0,!0,1)+"Z";Ke?Ue.attr("d","M"+(_e+Ke*ee.px0[0])+","+(Se+Ke*ee.px0[1])+Ze(ee.px0,ee.pxmid,!1,Ke)+Ze(ee.pxmid,ee.px0,!1,Ke)+"Z"+dt):Ue.attr("d",dt)}else{var _t=Ze(ee.px0,ee.px1,!0,1);if(Ke){var Pt=1-Ke;Ue.attr("d","M"+(_e+Ke*ee.px1[0])+","+(Se+Ke*ee.px1[1])+Ze(ee.px1,ee.px0,!1,Ke)+"l"+Pt*ee.px0[0]+","+Pt*ee.px0[1]+_t+"Z")}else Ue.attr("d","M"+_e+","+Se+"l"+ee.px0[0]+","+ee.px0[1]+_t+"Z")}J(H,ee,re);var vt=g.castOption(se.textposition,ee.pts),Tt=Me.selectAll("g.slicetext").data(ee.text&&vt!=="none"?[0]:[]);Tt.enter().append("g").classed("slicetext",!0),Tt.exit().remove(),Tt.each(function(){var st=l.ensureSingle(t.select(this),"text","",function(Fe){Fe.attr("data-notex",1)}),Ve=l.ensureUniformFontSize(H,vt==="outside"?E(se,ee,V.font):M(se,ee,V.font));st.text(ee.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,Ve).call(c.convertToTspans,H);var Ye=s.bBox(st.node()),me;if(vt==="outside")me=R(Ye,ee);else if(me=w(Ye,ee,re),vt==="auto"&&me.scale<1){var be=l.ensureUniformFontSize(H,se.outsidetextfont);st.call(s.font,be),Ye=s.bBox(st.node()),me=R(Ye,ee)}var Ee=me.textPosAngle,De=Ee===void 0?ee.pxmid:Z(re.r,Ee);if(me.targetX=_e+De[0]*me.rCenter+(me.x||0),me.targetY=Se+De[1]*me.rCenter+(me.y||0),N(me,Ye),me.outside){var Ce=me.targetY;ee.yLabelMin=Ce-Ye.height/2,ee.yLabelMid=Ce,ee.yLabelMax=Ce+Ye.height/2,ee.labelExtraX=0,ee.labelExtraY=0,fe=!0}me.fontSize=Ve.size,h(se.type,me,V),Y[ce].transform=me,l.setTransormAndDisplay(st,me)})});var pe=t.select(this).selectAll("g.titletext").data(se.title.text?[0]:[]);if(pe.enter().append("g").classed("titletext",!0),pe.exit().remove(),pe.each(function(){var ee=l.ensureSingle(t.select(this),"text","",function(Se){Se.attr("data-notex",1)}),ce=se.title.text;se._meta&&(ce=l.templateString(ce,se._meta)),ee.text(ce).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,se.title.font).call(c.convertToTspans,H);var _e;se.title.position==="middle center"?_e=P(re):_e=z(re,j),ee.attr("transform",u(_e.x,_e.y)+n(Math.min(1,_e.scale))+u(_e.tx,_e.ty))}),fe&&O(ue,se),v(le,se),fe&&se.automargin){var we=s.bBox(K.node()),xe=se.domain,he=j.w*(xe.x[1]-xe.x[0]),oe=j.h*(xe.y[1]-xe.y[0]),te=(.5*he-re.r)/j.w,ie=(.5*oe-re.r)/j.h;a.autoMargin(H,"pie."+se.uid+".automargin",{xl:xe.x[0]-te,xr:xe.x[1]+te,yb:xe.y[0]-ie,yt:xe.y[1]+ie,l:Math.max(re.cx-re.r-we.left,0),r:Math.max(we.right-(re.cx+re.r),0),b:Math.max(we.bottom-(re.cy+re.r),0),t:Math.max(re.cy-re.r-we.top,0),pad:5})}})});setTimeout(function(){q.selectAll("tspan").each(function(){var Y=t.select(this);Y.attr("dy")&&Y.attr("dy",Y.attr("dy"))})},0)}function v(H,W){H.each(function(U){var V=t.select(this);if(!U.labelExtraX&&!U.labelExtraY){V.select("path.textline").remove();return}var j=V.select("g.slicetext text");U.transform.targetX+=U.labelExtraX,U.transform.targetY+=U.labelExtraY,l.setTransormAndDisplay(j,U.transform);var q=U.cxFinal+U.pxmid[0],Y=U.cyFinal+U.pxmid[1],K="M"+q+","+Y,re=(U.yLabelMax-U.yLabelMin)*(U.pxmid[0]<0?-1:1)/4;if(U.labelExtraX){var se=U.labelExtraX*U.pxmid[1]/U.pxmid[0],le=U.yLabelMid+U.labelExtraY-(U.cyFinal+U.pxmid[1]);Math.abs(se)>Math.abs(le)?K+="l"+le*U.pxmid[0]/U.pxmid[1]+","+le+"H"+(q+U.labelExtraX+re):K+="l"+U.labelExtraX+","+se+"v"+(le-se)+"h"+re}else K+="V"+(U.yLabelMid+U.labelExtraY)+"h"+re;l.ensureSingle(V,"path","textline").call(o.stroke,W.outsidetextfont.color).attr({"stroke-width":Math.min(2,W.outsidetextfont.size/8),d:K,fill:"none"})})}function x(H,W,U){var V=U[0],j=V.cx,q=V.cy,Y=V.trace,K=Y.type==="funnelarea";"_hasHoverLabel"in Y||(Y._hasHoverLabel=!1),"_hasHoverEvent"in Y||(Y._hasHoverEvent=!1),H.on("mouseover",function(re){var se=W._fullLayout,le=W._fullData[Y.index];if(!(W._dragging||se.hovermode===!1)){var ue=le.hoverinfo;if(Array.isArray(ue)&&(ue=i.castHoverinfo({hoverinfo:[g.castOption(ue,re.pts)],_module:Y._module},se,0)),ue==="all"&&(ue="label+text+value+percent+name"),le.hovertemplate||ue!=="none"&&ue!=="skip"&&ue){var fe=re.rInscribed||0,pe=j+re.pxmid[0]*(1-fe),we=q+re.pxmid[1]*(1-fe),xe=se.separators,he=[];if(ue&&ue.indexOf("label")!==-1&&he.push(re.label),re.text=g.castOption(le.hovertext||le.text,re.pts),ue&&ue.indexOf("text")!==-1){var oe=re.text;l.isValidTextValue(oe)&&he.push(oe)}re.value=re.v,re.valueLabel=g.formatPieValue(re.v,xe),ue&&ue.indexOf("value")!==-1&&he.push(re.valueLabel),re.percent=re.v/V.vTotal,re.percentLabel=g.formatPiePercent(re.percent,xe),ue&&ue.indexOf("percent")!==-1&&he.push(re.percentLabel);var te=le.hoverlabel,ie=te.font,ee=[];i.loneHover({trace:Y,x0:pe-fe*V.r,x1:pe+fe*V.r,y:we,_x0:K?j+re.TL[0]:pe-fe*V.r,_x1:K?j+re.TR[0]:pe+fe*V.r,_y0:K?q+re.TL[1]:we-fe*V.r,_y1:K?q+re.BL[1]:we+fe*V.r,text:he.join("
"),name:le.hovertemplate||ue.indexOf("name")!==-1?le.name:void 0,idealAlign:re.pxmid[0]<0?"left":"right",color:g.castOption(te.bgcolor,re.pts)||re.color,borderColor:g.castOption(te.bordercolor,re.pts),fontFamily:g.castOption(ie.family,re.pts),fontSize:g.castOption(ie.size,re.pts),fontColor:g.castOption(ie.color,re.pts),nameLength:g.castOption(te.namelength,re.pts),textAlign:g.castOption(te.align,re.pts),hovertemplate:g.castOption(le.hovertemplate,re.pts),hovertemplateLabels:re,eventData:[m(re,le)]},{container:se._hoverlayer.node(),outerContainer:se._paper.node(),gd:W,inOut_bbox:ee}),re.bbox=ee[0],Y._hasHoverLabel=!0}Y._hasHoverEvent=!0,W.emit("plotly_hover",{points:[m(re,le)],event:t.event})}}),H.on("mouseout",function(re){var se=W._fullLayout,le=W._fullData[Y.index],ue=t.select(this).datum();Y._hasHoverEvent&&(re.originalEvent=t.event,W.emit("plotly_unhover",{points:[m(ue,le)],event:t.event}),Y._hasHoverEvent=!1),Y._hasHoverLabel&&(i.loneUnhover(se._hoverlayer.node()),Y._hasHoverLabel=!1)}),H.on("click",function(re){var se=W._fullLayout,le=W._fullData[Y.index];W._dragging||se.hovermode===!1||(W._hoverdata=[m(re,le)],i.click(W,t.event))})}function E(H,W,U){var V=g.castOption(H.outsidetextfont.color,W.pts)||g.castOption(H.textfont.color,W.pts)||U.color,j=g.castOption(H.outsidetextfont.family,W.pts)||g.castOption(H.textfont.family,W.pts)||U.family,q=g.castOption(H.outsidetextfont.size,W.pts)||g.castOption(H.textfont.size,W.pts)||U.size,Y=g.castOption(H.outsidetextfont.weight,W.pts)||g.castOption(H.textfont.weight,W.pts)||U.weight,K=g.castOption(H.outsidetextfont.style,W.pts)||g.castOption(H.textfont.style,W.pts)||U.style,re=g.castOption(H.outsidetextfont.variant,W.pts)||g.castOption(H.textfont.variant,W.pts)||U.variant,se=g.castOption(H.outsidetextfont.textcase,W.pts)||g.castOption(H.textfont.textcase,W.pts)||U.textcase,le=g.castOption(H.outsidetextfont.lineposition,W.pts)||g.castOption(H.textfont.lineposition,W.pts)||U.lineposition,ue=g.castOption(H.outsidetextfont.shadow,W.pts)||g.castOption(H.textfont.shadow,W.pts)||U.shadow;return{color:V,family:j,size:q,weight:Y,style:K,variant:re,textcase:se,lineposition:le,shadow:ue}}function M(H,W,U){var V=g.castOption(H.insidetextfont.color,W.pts);!V&&H._input.textfont&&(V=g.castOption(H._input.textfont.color,W.pts));var j=g.castOption(H.insidetextfont.family,W.pts)||g.castOption(H.textfont.family,W.pts)||U.family,q=g.castOption(H.insidetextfont.size,W.pts)||g.castOption(H.textfont.size,W.pts)||U.size,Y=g.castOption(H.insidetextfont.weight,W.pts)||g.castOption(H.textfont.weight,W.pts)||U.weight,K=g.castOption(H.insidetextfont.style,W.pts)||g.castOption(H.textfont.style,W.pts)||U.style,re=g.castOption(H.insidetextfont.variant,W.pts)||g.castOption(H.textfont.variant,W.pts)||U.variant,se=g.castOption(H.insidetextfont.textcase,W.pts)||g.castOption(H.textfont.textcase,W.pts)||U.textcase,le=g.castOption(H.insidetextfont.lineposition,W.pts)||g.castOption(H.textfont.lineposition,W.pts)||U.lineposition,ue=g.castOption(H.insidetextfont.shadow,W.pts)||g.castOption(H.textfont.shadow,W.pts)||U.shadow;return{color:V||o.contrast(W.color),family:j,size:q,weight:Y,style:K,variant:re,textcase:se,lineposition:le,shadow:ue}}function C(H,W){for(var U,V,j=0;j=-4;te-=2)oe(Math.PI*te,"tan");for(te=4;te>=-4;te-=2)oe(Math.PI*(te+1),"tan")}if(ue||pe){for(te=4;te>=-4;te-=2)oe(Math.PI*(te+1.5),"rad");for(te=4;te>=-4;te-=2)oe(Math.PI*(te+.5),"rad")}}if(K||we||ue){var ie=Math.sqrt(H.width*H.width+H.height*H.height);if(he={scale:j*V*2/ie,rCenter:1-j,rotate:0},he.textPosAngle=(W.startangle+W.stopangle)/2,he.scale>=1)return he;xe.push(he)}(we||pe)&&(he=T(H,V,Y,re,se),he.textPosAngle=(W.startangle+W.stopangle)/2,xe.push(he)),(we||fe)&&(he=b(H,V,Y,re,se),he.textPosAngle=(W.startangle+W.stopangle)/2,xe.push(he));for(var ee=0,ce=0,_e=0;_e=1)break}return xe[ee]}function k(H,W){var U=H.startangle,V=H.stopangle;return U>W&&W>V||U0?1:-1)/2,y:q/(1+U*U/(V*V)),outside:!0}}function P(H){var W=Math.sqrt(H.titleBox.width*H.titleBox.width+H.titleBox.height*H.titleBox.height);return{x:H.cx,y:H.cy,scale:H.trace.hole*H.r*2/W,tx:0,ty:-H.titleBox.height/2+H.trace.title.font.size}}function z(H,W){var U=1,V=1,j,q=H.trace,Y={x:H.cx,y:H.cy},K={tx:0,ty:0};K.ty+=q.title.font.size,j=B(q),q.title.position.indexOf("top")!==-1?(Y.y-=(1+j)*H.r,K.ty-=H.titleBox.height):q.title.position.indexOf("bottom")!==-1&&(Y.y+=(1+j)*H.r);var re=I(H.r,H.trace.aspectratio),se=W.w*(q.domain.x[1]-q.domain.x[0])/2;return q.title.position.indexOf("left")!==-1?(se=se+re,Y.x-=(1+j)*re,K.tx+=H.titleBox.width/2):q.title.position.indexOf("center")!==-1?se*=2:q.title.position.indexOf("right")!==-1&&(se=se+re,Y.x+=(1+j)*re,K.tx-=H.titleBox.width/2),U=se/H.titleBox.width,V=L(H,W)/H.titleBox.height,{x:Y.x,y:Y.y,scale:Math.min(U,V),tx:K.tx,ty:K.ty}}function I(H,W){return H/(W===void 0?1:W)}function L(H,W){var U=H.trace,V=W.h*(U.domain.y[1]-U.domain.y[0]);return Math.min(H.titleBox.height,V/2)}function B(H){var W=H.pull;if(!W)return 0;var U;if(l.isArrayOrTypedArray(W))for(W=0,U=0;UW&&(W=H.pull[U]);return W}function O(H,W){var U,V,j,q,Y,K,re,se,le,ue,fe,pe,we;function xe(ie,ee){return ie.pxmid[1]-ee.pxmid[1]}function he(ie,ee){return ee.pxmid[1]-ie.pxmid[1]}function oe(ie,ee){ee||(ee={});var ce=ee.labelExtraY+(V?ee.yLabelMax:ee.yLabelMin),_e=V?ie.yLabelMin:ie.yLabelMax,Se=V?ie.yLabelMax:ie.yLabelMin,Me=ie.cyFinal+Y(ie.px0[1],ie.px1[1]),Ue=ce-_e,Ge,Ze,Ke,dt,_t,Pt;if(Ue*re>0&&(ie.labelExtraY=Ue),!!l.isArrayOrTypedArray(W.pull))for(Ze=0;Ze=(g.castOption(W.pull,Ke.pts)||0))&&((ie.pxmid[1]-Ke.pxmid[1])*re>0?(dt=Ke.cyFinal+Y(Ke.px0[1],Ke.px1[1]),Ue=dt-_e-ie.labelExtraY,Ue*re>0&&(ie.labelExtraY+=Ue)):(Se+ie.labelExtraY-Me)*re>0&&(Ge=3*K*Math.abs(Ze-ue.indexOf(ie)),_t=Ke.cxFinal+q(Ke.px0[0],Ke.px1[0]),Pt=_t+Ge-(ie.cxFinal+ie.pxmid[0])-ie.labelExtraX,Pt*K>0&&(ie.labelExtraX+=Pt)))}for(V=0;V<2;V++)for(j=V?xe:he,Y=V?Math.max:Math.min,re=V?1:-1,U=0;U<2;U++){for(q=U?Math.max:Math.min,K=U?1:-1,se=H[V][U],se.sort(j),le=H[1-V][U],ue=le.concat(se),pe=[],fe=0;fe1?(se=U.r,le=se/j.aspectratio):(le=U.r,se=le*j.aspectratio),se*=(1+j.baseratio)/2,re=se*le}Y=Math.min(Y,re/U.vTotal)}for(V=0;VW.vTotal/2?1:0,se.halfangle=Math.PI*Math.min(se.v/W.vTotal,.5),se.ring=1-V.hole,se.rInscribed=D(se,W))}function Z(H,W){return[H*Math.sin(W),-H*Math.cos(W)]}function J(H,W,U){var V=H._fullLayout,j=U.trace,q=j.texttemplate,Y=j.textinfo;if(!q&&Y&&Y!=="none"){var K=Y.split("+"),re=function(ee){return K.indexOf(ee)!==-1},se=re("label"),le=re("text"),ue=re("value"),fe=re("percent"),pe=V.separators,we;if(we=se?[W.label]:[],le){var xe=g.getFirstFilled(j.text,W.pts);y(xe)&&we.push(xe)}ue&&we.push(g.formatPieValue(W.v,pe)),fe&&we.push(g.formatPiePercent(W.v/U.vTotal,pe)),W.text=we.join("
")}function he(ee){return{label:ee.label,value:ee.v,valueLabel:g.formatPieValue(ee.v,V.separators),percent:ee.v/U.vTotal,percentLabel:g.formatPiePercent(ee.v/U.vTotal,V.separators),color:ee.color,text:ee.text,customdata:l.castOption(j,ee.i,"customdata")}}if(q){var oe=l.castOption(j,W.i,"texttemplate");if(!oe)W.text="";else{var te=he(W),ie=g.getFirstFilled(j.text,W.pts);(y(ie)||ie==="")&&(te.text=ie),W.text=l.texttemplateString({data:[te,j._meta],fallback:j.texttemplatefallback,labels:te,locale:H._fullLayout._d3locale,template:oe})}}}function N(H,W){var U=H.rotate*Math.PI/180,V=Math.cos(U),j=Math.sin(U),q=(W.left+W.right)/2,Y=(W.top+W.bottom)/2;H.textX=q*V-Y*j,H.textY=q*j+Y*V,H.noCenter=!0}r.exports={plot:_,formatSliceLabel:J,transformInsideText:w,determineInsideTextFont:M,positionTitleOutside:z,prerenderTitles:C,layoutAreas:G,attachFxHandlers:x,computeTransform:N}}}),mne=ye({"src/traces/pie/style.js"(e,r){"use strict";var t=ai(),a=yy(),i=jc().resizeText;r.exports=function(s){var l=s._fullLayout._pielayer.selectAll(".trace");i(s,l,"pie"),l.each(function(n){var u=n[0],c=u.trace,f=t.select(this);f.style({opacity:c.opacity}),f.selectAll("path.surface").each(function(h){t.select(this).call(a,h,c,s)})})}}}),gne=ye({"src/traces/pie/base_plot.js"(e){"use strict";var r=ws();e.name="pie",e.plot=function(t,a,i,o){r.plotBasePlot(e.name,t,a,i,o)},e.clean=function(t,a,i,o){r.cleanBasePlot(e.name,t,a,i,o)}}}),yne=ye({"src/traces/pie/index.js"(e,r){"use strict";r.exports={attributes:qm(),supplyDefaults:Vm().supplyDefaults,supplyLayoutDefaults:pne(),layoutAttributes:PT(),calc:Fy().calc,crossTraceCalc:Fy().crossTraceCalc,plot:IT().plot,style:mne(),styleOne:yy(),moduleType:"trace",name:"pie",basePlotModule:gne(),categories:["pie-like","pie","showLegend"],meta:{}}}}),_ne=ye({"lib/pie.js"(e,r){"use strict";r.exports=yne()}}),xne=ye({"src/traces/sunburst/base_plot.js"(e){"use strict";var r=ws();e.name="sunburst",e.plot=function(t,a,i,o){r.plotBasePlot(e.name,t,a,i,o)},e.clean=function(t,a,i,o){r.cleanBasePlot(e.name,t,a,i,o)}}}),JL=ye({"src/traces/sunburst/constants.js"(e,r){"use strict";r.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),gb=ye({"src/traces/sunburst/attributes.js"(e,r){"use strict";var t=Oo(),{hovertemplateAttrs:a,texttemplateAttrs:i,templatefallbackAttrs:o}=Ro(),s=rs(),l=Ds().attributes,n=qm(),u=JL(),c=Xi().extendFlat,f=Eu().pattern;r.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:c({colors:{valType:"data_array",editType:"calc"},line:{color:c({},n.marker.line.color,{dflt:null}),width:c({},n.marker.line.width,{dflt:1}),editType:"calc"},pattern:f,editType:"calc"},s("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:n.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:i({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),texttemplatefallback:o({editType:"plot"}),hovertext:n.hovertext,hoverinfo:c({},t.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:a({},{keys:u.eventDataKeys}),hovertemplatefallback:o(),textfont:n.textfont,insidetextorientation:n.insidetextorientation,insidetextfont:n.insidetextfont,outsidetextfont:c({},n.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:n.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:l({name:"sunburst",trace:!0,editType:"calc"})}}}),QL=ye({"src/traces/sunburst/layout_attributes.js"(e,r){"use strict";r.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),bne=ye({"src/traces/sunburst/defaults.js"(e,r){"use strict";var t=Yt(),a=gb(),i=Ds().defaults,o=Oh().handleText,s=Vm().handleMarkerDefaults,l=As(),n=l.hasColorscale,u=l.handleDefaults;r.exports=function(f,h,d,p){function g(M,C){return t.coerce(f,h,a,M,C)}var m=g("labels"),y=g("parents");if(!m||!m.length||!y||!y.length){h.visible=!1;return}var _=g("values");_&&_.length?g("branchvalues"):g("count"),g("level"),g("maxdepth"),s(f,h,p,g);var v=h._hasColorscale=n(f,"marker","colors")||(f.marker||{}).coloraxis;v&&u(f,h,p,g,{prefix:"marker.",cLetter:"c"}),g("leaf.opacity",v?1:.7);var x=g("text");g("texttemplate"),g("texttemplatefallback"),h.texttemplate||g("textinfo",t.isArrayOrTypedArray(x)?"text+label":"label"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback");var E="auto";o(f,h,p,g,E,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),g("insidetextorientation"),g("sort"),g("rotation"),g("root.color"),i(h,p,g),h._length=null}}}),wne=ye({"src/traces/sunburst/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=QL();r.exports=function(o,s){function l(n,u){return t.coerce(o,s,a,n,u)}l("sunburstcolorway",s.colorway),l("extendsunburstcolors")}}}),yb=ye({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e):(t=t||self,a(t.d3=t.d3||{}))})(e,function(t){"use strict";function a(me,be){return me.parent===be.parent?1:2}function i(me){return me.reduce(o,0)/me.length}function o(me,be){return me+be.x}function s(me){return 1+me.reduce(l,0)}function l(me,be){return Math.max(me,be.y)}function n(me){for(var be;be=me.children;)me=be[0];return me}function u(me){for(var be;be=me.children;)me=be[be.length-1];return me}function c(){var me=a,be=1,Ee=1,De=!1;function Ce(Fe){var Je,qe=0;Fe.eachAfter(function(ft){var qt=ft.children;qt?(ft.x=i(qt),ft.y=s(qt)):(ft.x=Je?qe+=me(ft,Je):0,ft.y=0,Je=ft)});var at=n(Fe),tt=u(Fe),ct=at.x-me(at,tt)/2,At=tt.x+me(tt,at)/2;return Fe.eachAfter(De?function(ft){ft.x=(ft.x-Fe.x)*be,ft.y=(Fe.y-ft.y)*Ee}:function(ft){ft.x=(ft.x-ct)/(At-ct)*be,ft.y=(1-(Fe.y?ft.y/Fe.y:1))*Ee})}return Ce.separation=function(Fe){return arguments.length?(me=Fe,Ce):me},Ce.size=function(Fe){return arguments.length?(De=!1,be=+Fe[0],Ee=+Fe[1],Ce):De?null:[be,Ee]},Ce.nodeSize=function(Fe){return arguments.length?(De=!0,be=+Fe[0],Ee=+Fe[1],Ce):De?[be,Ee]:null},Ce}function f(me){var be=0,Ee=me.children,De=Ee&&Ee.length;if(!De)be=1;else for(;--De>=0;)be+=Ee[De].value;me.value=be}function h(){return this.eachAfter(f)}function d(me){var be=this,Ee,De=[be],Ce,Fe,Je;do for(Ee=De.reverse(),De=[];be=Ee.pop();)if(me(be),Ce=be.children,Ce)for(Fe=0,Je=Ce.length;Fe=0;--Ce)Ee.push(De[Ce]);return this}function g(me){for(var be=this,Ee=[be],De=[],Ce,Fe,Je;be=Ee.pop();)if(De.push(be),Ce=be.children,Ce)for(Fe=0,Je=Ce.length;Fe=0;)Ee+=De[Ce].value;be.value=Ee})}function y(me){return this.eachBefore(function(be){be.children&&be.children.sort(me)})}function _(me){for(var be=this,Ee=v(be,me),De=[be];be!==Ee;)be=be.parent,De.push(be);for(var Ce=De.length;me!==Ee;)De.splice(Ce,0,me),me=me.parent;return De}function v(me,be){if(me===be)return me;var Ee=me.ancestors(),De=be.ancestors(),Ce=null;for(me=Ee.pop(),be=De.pop();me===be;)Ce=me,me=Ee.pop(),be=De.pop();return Ce}function x(){for(var me=this,be=[me];me=me.parent;)be.push(me);return be}function E(){var me=[];return this.each(function(be){me.push(be)}),me}function M(){var me=[];return this.eachBefore(function(be){be.children||me.push(be)}),me}function C(){var me=this,be=[];return me.each(function(Ee){Ee!==me&&be.push({source:Ee.parent,target:Ee})}),be}function w(me,be){var Ee=new A(me),De=+me.value&&(Ee.value=me.value),Ce,Fe=[Ee],Je,qe,at,tt;for(be==null&&(be=T);Ce=Fe.pop();)if(De&&(Ce.value=+Ce.data.value),(qe=be(Ce.data))&&(tt=qe.length))for(Ce.children=new Array(tt),at=tt-1;at>=0;--at)Fe.push(Je=Ce.children[at]=new A(qe[at])),Je.parent=Ce,Je.depth=Ce.depth+1;return Ee.eachBefore(S)}function k(){return w(this).eachBefore(b)}function T(me){return me.children}function b(me){me.data=me.data.data}function S(me){var be=0;do me.height=be;while((me=me.parent)&&me.height<++be)}function A(me){this.data=me,this.depth=this.height=0,this.parent=null}A.prototype=w.prototype={constructor:A,count:h,each:d,eachAfter:g,eachBefore:p,sum:m,sort:y,path:_,ancestors:x,descendants:E,leaves:M,links:C,copy:k};var F=Array.prototype.slice;function D(me){for(var be=me.length,Ee,De;be;)De=Math.random()*be--|0,Ee=me[be],me[be]=me[De],me[De]=Ee;return me}function R(me){for(var be=0,Ee=(me=D(F.call(me))).length,De=[],Ce,Fe;be0&&Ee*Ee>De*De+Ce*Ce}function L(me,be){for(var Ee=0;Eeat?(Ce=(tt+at-Fe)/(2*tt),qe=Math.sqrt(Math.max(0,at/tt-Ce*Ce)),Ee.x=me.x-Ce*De-qe*Je,Ee.y=me.y-Ce*Je+qe*De):(Ce=(tt+Fe-at)/(2*tt),qe=Math.sqrt(Math.max(0,Fe/tt-Ce*Ce)),Ee.x=be.x+Ce*De-qe*Je,Ee.y=be.y+Ce*Je+qe*De)):(Ee.x=be.x+Ee.r,Ee.y=be.y)}function Z(me,be){var Ee=me.r+be.r-1e-6,De=be.x-me.x,Ce=be.y-me.y;return Ee>0&&Ee*Ee>De*De+Ce*Ce}function J(me){var be=me._,Ee=me.next._,De=be.r+Ee.r,Ce=(be.x*Ee.r+Ee.x*be.r)/De,Fe=(be.y*Ee.r+Ee.y*be.r)/De;return Ce*Ce+Fe*Fe}function N(me){this._=me,this.next=null,this.previous=null}function H(me){if(!(Ce=me.length))return 0;var be,Ee,De,Ce,Fe,Je,qe,at,tt,ct,At;if(be=me[0],be.x=0,be.y=0,!(Ce>1))return be.r;if(Ee=me[1],be.x=-Ee.r,Ee.x=be.r,Ee.y=0,!(Ce>2))return be.r+Ee.r;X(Ee,be,De=me[2]),be=new N(be),Ee=new N(Ee),De=new N(De),be.next=De.previous=Ee,Ee.next=be.previous=De,De.next=Ee.previous=be;e:for(qe=3;qe0)throw new Error("cycle");return qe}return Ee.id=function(De){return arguments.length?(me=V(De),Ee):me},Ee.parentId=function(De){return arguments.length?(be=V(De),Ee):be},Ee}function ee(me,be){return me.parent===be.parent?1:2}function ce(me){var be=me.children;return be?be[0]:me.t}function _e(me){var be=me.children;return be?be[be.length-1]:me.t}function Se(me,be,Ee){var De=Ee/(be.i-me.i);be.c-=De,be.s+=Ee,me.c+=De,be.z+=Ee,be.m+=Ee}function Me(me){for(var be=0,Ee=0,De=me.children,Ce=De.length,Fe;--Ce>=0;)Fe=De[Ce],Fe.z+=be,Fe.m+=be,be+=Fe.s+(Ee+=Fe.c)}function Ue(me,be,Ee){return me.a.parent===be.parent?me.a:Ee}function Ge(me,be){this._=me,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=be}Ge.prototype=Object.create(A.prototype);function Ze(me){for(var be=new Ge(me,0),Ee,De=[be],Ce,Fe,Je,qe;Ee=De.pop();)if(Fe=Ee._.children)for(Ee.children=new Array(qe=Fe.length),Je=qe-1;Je>=0;--Je)De.push(Ce=Ee.children[Je]=new Ge(Fe[Je],Je)),Ce.parent=Ee;return(be.parent=new Ge(null,0)).children=[be],be}function Ke(){var me=ee,be=1,Ee=1,De=null;function Ce(tt){var ct=Ze(tt);if(ct.eachAfter(Fe),ct.parent.m=-ct.z,ct.eachBefore(Je),De)tt.eachBefore(at);else{var At=tt,ft=tt,qt=tt;tt.eachBefore(function(Dt){Dt.xft.x&&(ft=Dt),Dt.depth>qt.depth&&(qt=Dt)});var ar=At===ft?1:me(At,ft)/2,mt=ar-At.x,gt=be/(ft.x+ar+mt),St=Ee/(qt.depth||1);tt.eachBefore(function(Dt){Dt.x=(Dt.x+mt)*gt,Dt.y=Dt.depth*St})}return tt}function Fe(tt){var ct=tt.children,At=tt.parent.children,ft=tt.i?At[tt.i-1]:null;if(ct){Me(tt);var qt=(ct[0].z+ct[ct.length-1].z)/2;ft?(tt.z=ft.z+me(tt._,ft._),tt.m=tt.z-qt):tt.z=qt}else ft&&(tt.z=ft.z+me(tt._,ft._));tt.parent.A=qe(tt,ft,tt.parent.A||At[0])}function Je(tt){tt._.x=tt.z+tt.parent.m,tt.m+=tt.parent.m}function qe(tt,ct,At){if(ct){for(var ft=tt,qt=tt,ar=ct,mt=ft.parent.children[0],gt=ft.m,St=qt.m,Dt=ar.m,kt=mt.m,Vt;ar=_e(ar),ft=ce(ft),ar&&ft;)mt=ce(mt),qt=_e(qt),qt.a=tt,Vt=ar.z+Dt-ft.z-gt+me(ar._,ft._),Vt>0&&(Se(Ue(ar,tt,At),tt,Vt),gt+=Vt,St+=Vt),Dt+=ar.m,gt+=ft.m,kt+=mt.m,St+=qt.m;ar&&!_e(qt)&&(qt.t=ar,qt.m+=Dt-St),ft&&!ce(mt)&&(mt.t=ft,mt.m+=gt-kt,At=tt)}return At}function at(tt){tt.x*=be,tt.y=tt.depth*Ee}return Ce.separation=function(tt){return arguments.length?(me=tt,Ce):me},Ce.size=function(tt){return arguments.length?(De=!1,be=+tt[0],Ee=+tt[1],Ce):De?null:[be,Ee]},Ce.nodeSize=function(tt){return arguments.length?(De=!0,be=+tt[0],Ee=+tt[1],Ce):De?[be,Ee]:null},Ce}function dt(me,be,Ee,De,Ce){for(var Fe=me.children,Je,qe=-1,at=Fe.length,tt=me.value&&(Ce-Ee)/me.value;++qeDt&&(Dt=tt),dr=gt*gt*lr,kt=Math.max(Dt/dr,dr/St),kt>Vt){gt-=tt;break}Vt=kt}Je.push(at={value:gt,dice:qt1?De:1)},Ee})(_t);function Tt(){var me=vt,be=!1,Ee=1,De=1,Ce=[0],Fe=j,Je=j,qe=j,at=j,tt=j;function ct(ft){return ft.x0=ft.y0=0,ft.x1=Ee,ft.y1=De,ft.eachBefore(At),Ce=[0],be&&ft.eachBefore(ue),ft}function At(ft){var qt=Ce[ft.depth],ar=ft.x0+qt,mt=ft.y0+qt,gt=ft.x1-qt,St=ft.y1-qt;gt=ft-1){var Dt=Fe[At];Dt.x0=ar,Dt.y0=mt,Dt.x1=gt,Dt.y1=St;return}for(var kt=tt[At],Vt=qt/2+kt,lr=At+1,dr=ft-1;lr>>1;tt[yr]St-mt){var la=(ar*Fr+gt*vr)/qt;ct(At,lr,vr,ar,mt,la,St),ct(lr,ft,Fr,la,mt,gt,St)}else{var Hr=(mt*Fr+St*vr)/qt;ct(At,lr,vr,ar,mt,gt,Hr),ct(lr,ft,Fr,ar,Hr,gt,St)}}}function Ve(me,be,Ee,De,Ce){(me.depth&1?dt:fe)(me,be,Ee,De,Ce)}var Ye=(function me(be){function Ee(De,Ce,Fe,Je,qe){if((at=De._squarify)&&at.ratio===be)for(var at,tt,ct,At,ft=-1,qt,ar=at.length,mt=De.value;++ft1?De:1)},Ee})(_t);t.cluster=c,t.hierarchy=w,t.pack=K,t.packEnclose=R,t.packSiblings=W,t.partition=pe,t.stratify=ie,t.tree=Ke,t.treemap=Tt,t.treemapBinary=st,t.treemapDice=fe,t.treemapResquarify=Ye,t.treemapSlice=dt,t.treemapSliceDice=Ve,t.treemapSquarify=vt,Object.defineProperty(t,"__esModule",{value:!0})})}}),_b=ye({"src/traces/sunburst/calc.js"(e){"use strict";var r=yb(),t=en(),a=Yt(),i=As().makeColorScaleFuncFromTrace,o=Fy().makePullColorFn,s=Fy().generateExtendedColors,l=As().calc,n=Vn().ALMOST_EQUAL,u={},c={},f={};e.calc=function(d,p){var g=d._fullLayout,m=p.ids,y=a.isArrayOrTypedArray(m),_=p.labels,v=p.parents,x=p.values,E=a.isArrayOrTypedArray(x),M=[],C={},w={},k=function(W,U){C[W]?C[W].push(U):C[W]=[U],w[U]=1},T=function(W){return W||typeof W=="number"},b=function(W){return!E||t(x[W])&&x[W]>=0},S,A,F;y?(S=Math.min(m.length,v.length),A=function(W){return T(m[W])&&b(W)},F=function(W){return String(m[W])}):(S=Math.min(_.length,v.length),A=function(W){return T(_[W])&&b(W)},F=function(W){return String(_[W])}),E&&(S=Math.min(S,x.length));for(var D=0;D1){for(var B=a.randstr(),O=0;O>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):t===8?xb(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):t===4?xb(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=uF.exec(e))?new Hu(r[1],r[2],r[3],1):(r=cF.exec(e))?new Hu(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=fF.exec(e))?xb(r[1],r[2],r[3],r[4]):(r=hF.exec(e))?xb(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=dF.exec(e))?nF(r[1],r[2]/100,r[3]/100,1):(r=pF.exec(e))?nF(r[1],r[2]/100,r[3]/100,r[4]):NT.hasOwnProperty(e)?rF(NT[e]):e==="transparent"?new Hu(NaN,NaN,NaN,0):null}function rF(e){return new Hu(e>>16&255,e>>8&255,e&255,1)}function xb(e,r,t,a){return a<=0&&(e=r=t=NaN),new Hu(e,r,t,a)}function zT(e){return e instanceof p0||(e=Iy(e)),e?(e=e.rgb(),new Hu(e.r,e.g,e.b,e.opacity)):new Hu}function bb(e,r,t,a){return arguments.length===1?zT(e):new Hu(e,r,t,a??1)}function Hu(e,r,t,a){this.r=+e,this.g=+r,this.b=+t,this.opacity=+a}function aF(){return`#${Lv(this.r)}${Lv(this.g)}${Lv(this.b)}`}function Mne(){return`#${Lv(this.r)}${Lv(this.g)}${Lv(this.b)}${Lv((isNaN(this.opacity)?1:this.opacity)*255)}`}function iF(){let e=wb(this.opacity);return`${e===1?"rgb(":"rgba("}${Dv(this.r)}, ${Dv(this.g)}, ${Dv(this.b)}${e===1?")":`, ${e})`}`}function wb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dv(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lv(e){return e=Dv(e),(e<16?"0":"")+e.toString(16)}function nF(e,r,t,a){return a<=0?e=r=t=NaN:t<=0||t>=1?e=r=NaN:r<=0&&(e=NaN),new Fd(e,r,t,a)}function oF(e){if(e instanceof Fd)return new Fd(e.h,e.s,e.l,e.opacity);if(e instanceof p0||(e=Iy(e)),!e)return new Fd;if(e instanceof Fd)return e;e=e.rgb();var r=e.r/255,t=e.g/255,a=e.b/255,i=Math.min(r,t,a),o=Math.max(r,t,a),s=NaN,l=o-i,n=(o+i)/2;return l?(r===o?s=(t-a)/l+(t0&&n<1?0:s,new Fd(s,l,n,e.opacity)}function BT(e,r,t,a){return arguments.length===1?oF(e):new Fd(e,r,t,a??1)}function Fd(e,r,t,a){this.h=+e,this.s=+r,this.l=+t,this.opacity=+a}function sF(e){return e=(e||0)%360,e<0?e+360:e}function Ab(e){return Math.max(0,Math.min(1,e||0))}function OT(e,r,t){return(e<60?r+(t-r)*e/60:e<180?t:e<240?r+(t-r)*(240-e)/60:r)*255}var v0,Fv,Pv,Hm,Pd,lF,uF,cF,fF,hF,dF,pF,NT,jT=Si({"node_modules/d3-color/src/color.js"(){RT(),v0=.7,Fv=1/v0,Pv="\\s*([+-]?\\d+)\\s*",Hm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lF=/^#([0-9a-f]{3,8})$/,uF=new RegExp(`^rgb\\(${Pv},${Pv},${Pv}\\)$`),cF=new RegExp(`^rgb\\(${Pd},${Pd},${Pd}\\)$`),fF=new RegExp(`^rgba\\(${Pv},${Pv},${Pv},${Hm}\\)$`),hF=new RegExp(`^rgba\\(${Pd},${Pd},${Pd},${Hm}\\)$`),dF=new RegExp(`^hsl\\(${Hm},${Pd},${Pd}\\)$`),pF=new RegExp(`^hsla\\(${Hm},${Pd},${Pd},${Hm}\\)$`),NT={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},Gm(p0,Iy,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:eF,formatHex:eF,formatHex8:Ane,formatHsl:Tne,formatRgb:tF,toString:tF}),Gm(Hu,bb,Py(p0,{brighter(e){return e=e==null?Fv:Math.pow(Fv,e),new Hu(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?v0:Math.pow(v0,e),new Hu(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Hu(Dv(this.r),Dv(this.g),Dv(this.b),wb(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:aF,formatHex:aF,formatHex8:Mne,formatRgb:iF,toString:iF})),Gm(Fd,BT,Py(p0,{brighter(e){return e=e==null?Fv:Math.pow(Fv,e),new Fd(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?v0:Math.pow(v0,e),new Fd(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,a=t+(t<.5?t:1-t)*r,i=2*t-a;return new Hu(OT(e>=240?e-240:e+120,i,a),OT(e,i,a),OT(e<120?e+240:e-120,i,a),this.opacity)},clamp(){return new Fd(sF(this.h),Ab(this.s),Ab(this.l),wb(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 e=wb(this.opacity);return`${e===1?"hsl(":"hsla("}${sF(this.h)}, ${Ab(this.s)*100}%, ${Ab(this.l)*100}%${e===1?")":`, ${e})`}`}}))}}),UT,qT,vF=Si({"node_modules/d3-color/src/math.js"(){UT=Math.PI/180,qT=180/Math.PI}});function mF(e){if(e instanceof sp)return new sp(e.l,e.a,e.b,e.opacity);if(e instanceof Hp)return gF(e);e instanceof Hu||(e=zT(e));var r=$T(e.r),t=$T(e.g),a=$T(e.b),i=GT((.2225045*r+.7168786*t+.0606169*a)/ZT),o,s;return r===t&&t===a?o=s=i:(o=GT((.4360747*r+.3850649*t+.1430804*a)/XT),s=GT((.0139322*r+.0971045*t+.7141733*a)/KT)),new sp(116*i-16,500*(o-i),200*(i-s),e.opacity)}function VT(e,r,t,a){return arguments.length===1?mF(e):new sp(e,r,t,a??1)}function sp(e,r,t,a){this.l=+e,this.a=+r,this.b=+t,this.opacity=+a}function GT(e){return e>yF?Math.pow(e,.3333333333333333):e/QT+JT}function HT(e){return e>Iv?e*e*e:QT*(e-JT)}function WT(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055)}function $T(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ene(e){if(e instanceof Hp)return new Hp(e.h,e.c,e.l,e.opacity);if(e instanceof sp||(e=mF(e)),e.a===0&&e.b===0)return new Hp(NaN,0=1?(t=1,r-1):Math.floor(t*r),i=e[a],o=e[a+1],s=a>0?e[a-1]:2*i-o,l=a()=>e}});function TF(e,r){return function(t){return e+t*r}}function Dne(e,r,t){return e=Math.pow(e,t),r=Math.pow(r,t)-e,t=1/t,function(a){return Math.pow(e+a*r,t)}}function Eb(e,r){var t=r-e;return t?TF(e,t>180||t<-180?t-360*Math.round(t/360):t):By(isNaN(e)?r:e)}function Lne(e){return(e=+e)==1?Wu:function(r,t){return t-r?Dne(r,t,e):By(isNaN(r)?t:r)}}function Wu(e,r){var t=r-e;return t?TF(e,t):By(isNaN(e)?r:e)}var Ym=Si({"node_modules/d3-interpolate/src/color.js"(){AF()}});function MF(e){return function(r){var t=r.length,a=new Array(t),i=new Array(t),o=new Array(t),s,l;for(s=0;st&&(o=r.slice(t,o),l[s]?l[s]+=o:l[++s]=o),(a=a[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,n.push({i:s,x:lp(a,i)})),t=Db.lastIndex;return t180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,a)-2,x:lp(u,c)})):c&&f.push(i(f)+"rotate("+c+a)}function l(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,a)-2,x:lp(u,c)}):c&&f.push(i(f)+"skewX("+c+a)}function n(u,c,f,h,d,p){if(u!==f||c!==h){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:lp(u,f)},{i:g-2,x:lp(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,f,h),s(u.rotate,c.rotate,f,h),l(u.skewX,c.skewX,f,h),n(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var p=-1,g=h.length,m;++pLb,interpolateArray:()=>Fne,interpolateBasis:()=>xF,interpolateBasisClosed:()=>bF,interpolateCubehelix:()=>JF,interpolateCubehelixLong:()=>QF,interpolateDate:()=>FF,interpolateDiscrete:()=>Rne,interpolateHcl:()=>XF,interpolateHclLong:()=>ZF,interpolateHsl:()=>WF,interpolateHslLong:()=>$F,interpolateHue:()=>Bne,interpolateLab:()=>Zne,interpolateNumber:()=>lp,interpolateNumberArray:()=>oM,interpolateObject:()=>IF,interpolateRgb:()=>Sb,interpolateRgbBasis:()=>EF,interpolateRgbBasisClosed:()=>SF,interpolateRound:()=>Nne,interpolateString:()=>zF,interpolateTransformCss:()=>jF,interpolateTransformSvg:()=>UF,interpolateZoom:()=>GF,piecewise:()=>eoe,quantize:()=>roe});var Xm=Si({"node_modules/d3-interpolate/src/index.js"(){Fb(),LF(),nM(),wF(),PF(),zne(),One(),kb(),sM(),RF(),jne(),BF(),Hne(),Yne(),kF(),Xne(),Kne(),Jne(),Qne(),toe(),aoe()}}),uM=ye({"src/traces/sunburst/fill_one.js"(e,r){"use strict";var t=$i(),a=Ya();r.exports=function(o,s,l,n,u){var c=s.data.data,f=c.i,h=u||c.color;if(f>=0){s.i=c.i;var d=l.marker;d.pattern?(!d.colors||!d.pattern.shape)&&(d.color=h,s.color=h):(d.color=h,s.color=h),t.pointStyle(o,l,n,s)}else a.fill(o,h)}}}),eP=ye({"src/traces/sunburst/style.js"(e,r){"use strict";var t=ai(),a=Ya(),i=Yt(),o=jc().resizeText,s=uM();function l(u){var c=u._fullLayout._sunburstlayer.selectAll(".trace");o(u,c,"sunburst"),c.each(function(f){var h=t.select(this),d=f[0],p=d.trace;h.style("opacity",p.opacity),h.selectAll("path.surface").each(function(g){t.select(this).call(n,g,p,u)})})}function n(u,c,f,h){var d=c.data.data,p=!c.children,g=d.i,m=i.castOption(f,g,"marker.line.color")||a.defaultLine,y=i.castOption(f,g,"marker.line.width")||0;u.call(s,c,f,h).style("stroke-width",y).call(a.stroke,m).style("opacity",p?f.leaf.opacity:null)}r.exports={style:l,styleOne:n}}}),m0=ye({"src/traces/sunburst/helpers.js"(e){"use strict";var r=Yt(),t=Ya(),a=rp(),i=Mv();e.findEntryWithLevel=function(n,u){var c;return u&&n.eachAfter(function(f){if(e.getPtId(f)===u)return c=f.copy()}),c||n},e.findEntryWithChild=function(n,u){var c;return n.eachAfter(function(f){for(var h=f.children||[],d=0;d0)},e.getMaxDepth=function(n){return n.maxdepth>=0?n.maxdepth:1/0},e.isHeader=function(n,u){return!(e.isLeaf(n)||n.depth===u._maxDepth-1)};function l(n){return n.data.data.pid}e.getParent=function(n,u){return e.findEntryWithLevel(n,l(u))},e.listPath=function(n,u){var c=n.parent;if(!c)return[];var f=u?[c.data[u]]:[c];return e.listPath(c,u).concat(f)},e.getPath=function(n){return e.listPath(n,"label").join("/")+"/"},e.formatValue=i.formatPieValue,e.formatPercent=function(n,u){var c=r.formatPercent(n,0);return c==="0%"&&(c=i.formatPiePercent(n,u)),c}}}),Rb=ye({"src/traces/sunburst/fx.js"(e,r){"use strict";var t=ai(),a=li(),i=Bf().appendArrayPointValue,o=Hs(),s=Yt(),l=py(),n=m0(),u=Mv(),c=u.formatPieValue;r.exports=function(d,p,g,m,y){var _=m[0],v=_.trace,x=_.hierarchy,E=v.type==="sunburst",M=v.type==="treemap"||v.type==="icicle";"_hasHoverLabel"in v||(v._hasHoverLabel=!1),"_hasHoverEvent"in v||(v._hasHoverEvent=!1);var C=function(T){var b=g._fullLayout;if(!(g._dragging||b.hovermode===!1)){var S=g._fullData[v.index],A=T.data.data,F=A.i,D=n.isHierarchyRoot(T),R=n.getParent(x,T),P=n.getValue(T),z=function(Y){return s.castOption(S,F,Y)},I=z("hovertemplate"),L=o.castHoverinfo(S,b,F),B=b.separators,O;if(I||L&&L!=="none"&&L!=="skip"){var G,$;E&&(G=_.cx+T.pxmid[0]*(1-T.rInscribed),$=_.cy+T.pxmid[1]*(1-T.rInscribed)),M&&(G=T._hoverX,$=T._hoverY);var X={},Z=[],J=[],N=function(Y){return Z.indexOf(Y)!==-1};L&&(Z=L==="all"?S._module.attributes.hoverinfo.flags:L.split("+")),X.label=A.label,N("label")&&X.label&&J.push(X.label),A.hasOwnProperty("v")&&(X.value=A.v,X.valueLabel=c(X.value,B),N("value")&&J.push(X.valueLabel)),X.currentPath=T.currentPath=n.getPath(T.data),N("current path")&&!D&&J.push(X.currentPath);var H,W=[],U=function(){W.indexOf(H)===-1&&(J.push(H),W.push(H))};X.percentParent=T.percentParent=P/n.getValue(R),X.parent=T.parentString=n.getPtLabel(R),N("percent parent")&&(H=n.formatPercent(X.percentParent,B)+" of "+X.parent,U()),X.percentEntry=T.percentEntry=P/n.getValue(p),X.entry=T.entry=n.getPtLabel(p),N("percent entry")&&!D&&!T.onPathbar&&(H=n.formatPercent(X.percentEntry,B)+" of "+X.entry,U()),X.percentRoot=T.percentRoot=P/n.getValue(x),X.root=T.root=n.getPtLabel(x),N("percent root")&&!D&&(H=n.formatPercent(X.percentRoot,B)+" of "+X.root,U()),X.text=z("hovertext")||z("text"),N("text")&&(H=X.text,s.isValidTextValue(H)&&J.push(H)),O=[f(T,S,y.eventDataKeys)];var V={trace:S,y:$,_x0:T._x0,_x1:T._x1,_y0:T._y0,_y1:T._y1,text:J.join("
"),name:I||N("name")?S.name:void 0,color:z("hoverlabel.bgcolor")||A.color,borderColor:z("hoverlabel.bordercolor"),fontFamily:z("hoverlabel.font.family"),fontSize:z("hoverlabel.font.size"),fontColor:z("hoverlabel.font.color"),fontWeight:z("hoverlabel.font.weight"),fontStyle:z("hoverlabel.font.style"),fontVariant:z("hoverlabel.font.variant"),nameLength:z("hoverlabel.namelength"),textAlign:z("hoverlabel.align"),hovertemplate:I,hovertemplateLabels:X,eventData:O};E&&(V.x0=G-T.rInscribed*T.rpx1,V.x1=G+T.rInscribed*T.rpx1,V.idealAlign=T.pxmid[0]<0?"left":"right"),M&&(V.x=G,V.idealAlign=G<0?"left":"right");var j=[];o.loneHover(V,{container:b._hoverlayer.node(),outerContainer:b._paper.node(),gd:g,inOut_bbox:j}),O[0].bbox=j[0],v._hasHoverLabel=!0}if(M){var q=d.select("path.surface");y.styleOne(q,T,S,g,{hovered:!0})}v._hasHoverEvent=!0,g.emit("plotly_hover",{points:O||[f(T,S,y.eventDataKeys)],event:t.event})}},w=function(T){var b=g._fullLayout,S=g._fullData[v.index],A=t.select(this).datum();if(v._hasHoverEvent&&(T.originalEvent=t.event,g.emit("plotly_unhover",{points:[f(A,S,y.eventDataKeys)],event:t.event}),v._hasHoverEvent=!1),v._hasHoverLabel&&(o.loneUnhover(b._hoverlayer.node()),v._hasHoverLabel=!1),M){var F=d.select("path.surface");y.styleOne(F,A,S,g,{hovered:!1})}},k=function(T){var b=g._fullLayout,S=g._fullData[v.index],A=E&&(n.isHierarchyRoot(T)||n.isLeaf(T)),F=n.getPtId(T),D=n.isEntry(T)?n.findEntryWithChild(x,F):n.findEntryWithLevel(x,F),R=n.getPtId(D),P={points:[f(T,S,y.eventDataKeys)],event:t.event};A||(P.nextLevel=R);var z=l.triggerHandler(g,"plotly_"+v.type+"click",P);if(z!==!1&&b.hovermode&&(g._hoverdata=[f(T,S,y.eventDataKeys)],o.click(g,t.event)),!A&&z!==!1&&!g._dragging&&!g._transitioning){a.call("_storeDirectGUIEdit",S,b._tracePreGUI[S.uid],{level:S.level});var I={data:[{level:R}],traces:[v.index]},L={frame:{redraw:!1,duration:y.transitionTime},transition:{duration:y.transitionTime,easing:y.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(b._hoverlayer.node()),a.call("animate",g,I,L)}};d.on("mouseover",C),d.on("mouseout",w),d.on("click",k)};function f(h,d,p){for(var g=h.data.data,m={curveNumber:d.index,pointNumber:g.i,data:d._input,fullData:d},y=0;ySe.x1?2*Math.PI:0)+Y;Me=ee.rpx1pe?2*Math.PI:0)+Y;_e={x0:Me,x1:Me}}else _e={rpx0:Z,rpx1:Z},o.extendFlat(_e,ie(ee));else _e={rpx0:0,rpx1:0};else _e={x0:Y,x1:Y};return a(_e,Se)}function te(ee){var ce=W[_.getPtId(ee)],_e,Se=ee.transform;if(ce)_e=ce;else if(_e={rpx1:ee.rpx1,transform:{textPosAngle:Se.textPosAngle,scale:0,rotate:Se.rotate,rCenter:Se.rCenter,x:Se.x,y:Se.y}},H)if(ee.parent)if(pe){var Me=ee.x1>pe?2*Math.PI:0;_e.x0=_e.x1=Me}else o.extendFlat(_e,ie(ee));else _e.x0=_e.x1=Y;else _e.x0=_e.x1=Y;var Ue=a(_e.transform.textPosAngle,ee.transform.textPosAngle),Ge=a(_e.rpx1,ee.rpx1),Ze=a(_e.x0,ee.x0),Ke=a(_e.x1,ee.x1),dt=a(_e.transform.scale,Se.scale),_t=a(_e.transform.rotate,Se.rotate),Pt=Se.rCenter===0?3:_e.transform.rCenter===0?1/3:1,vt=a(_e.transform.rCenter,Se.rCenter),Tt=function(st){return vt(Math.pow(st,Pt))};return function(st){var Ve=Ge(st),Ye=Ze(st),me=Ke(st),be=Tt(st),Ee=se(Ve,(Ye+me)/2),De=Ue(st),Ce={pxmid:Ee,rpx1:Ve,transform:{textPosAngle:De,rCenter:be,x:Se.x,y:Se.y}};return n(z.type,Se,A),{transform:{targetX:ue(Ce),targetY:fe(Ce),scale:dt(st),rotate:_t(st),rCenter:be}}}}function ie(ee){var ce=ee.parent,_e=W[_.getPtId(ce)],Se={};if(_e){var Me=ce.children,Ue=Me.indexOf(ee),Ge=Me.length,Ze=a(_e.x0,_e.x1);Se.x0=Ze(Ue/Ge),Se.x1=Ze(Ue/Ge)}else Se.x0=Se.x1=0;return Se}}function x(w){return t.partition().size([2*Math.PI,w.height+1])(w)}e.formatSliceLabel=function(w,k,T,b,S){var A=T.texttemplate,F=T.textinfo;if(!A&&(!F||F==="none"))return"";var D=S.separators,R=b[0],P=w.data.data,z=R.hierarchy,I=_.isHierarchyRoot(w),L=_.getParent(z,w),B=_.getValue(w);if(!A){var O=F.split("+"),G=function(j){return O.indexOf(j)!==-1},$=[],X;if(G("label")&&P.label&&$.push(P.label),P.hasOwnProperty("v")&&G("value")&&$.push(_.formatValue(P.v,D)),!I){G("current path")&&$.push(_.getPath(w.data));var Z=0;G("percent parent")&&Z++,G("percent entry")&&Z++,G("percent root")&&Z++;var J=Z>1;if(Z){var N,H=function(j){X=_.formatPercent(N,D),J&&(X+=" of "+j),$.push(X)};G("percent parent")&&!I&&(N=B/_.getValue(L),H("parent")),G("percent entry")&&(N=B/_.getValue(k),H("entry")),G("percent root")&&(N=B/_.getValue(z),H("root"))}}return G("text")&&(X=o.castOption(T,P.i,"text"),o.isValidTextValue(X)&&$.push(X)),$.join("
")}var W=o.castOption(T,P.i,"texttemplate");if(!W)return"";var U={};P.label&&(U.label=P.label),P.hasOwnProperty("v")&&(U.value=P.v,U.valueLabel=_.formatValue(P.v,D)),U.currentPath=_.getPath(w.data),I||(U.percentParent=B/_.getValue(L),U.percentParentLabel=_.formatPercent(U.percentParent,D),U.parent=_.getPtLabel(L)),U.percentEntry=B/_.getValue(k),U.percentEntryLabel=_.formatPercent(U.percentEntry,D),U.entry=_.getPtLabel(k),U.percentRoot=B/_.getValue(z),U.percentRootLabel=_.formatPercent(U.percentRoot,D),U.root=_.getPtLabel(z),P.hasOwnProperty("color")&&(U.color=P.color);var V=o.castOption(T,P.i,"text");return(o.isValidTextValue(V)||V==="")&&(U.text=V),U.customdata=o.castOption(T,P.i,"customdata"),o.texttemplateString({data:[U,T._meta],fallback:T.texttemplatefallback,labels:U,locale:S._d3locale,template:W})};function E(w){return w.rpx0===0&&o.isFullCircle([w.x0,w.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(w.halfangle)),w.ring/2))}function M(w){return C(w.rpx1,w.transform.textPosAngle)}function C(w,k){return[w*Math.sin(k),-w*Math.cos(k)]}}}),ioe=ye({"src/traces/sunburst/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"sunburst",basePlotModule:xne(),categories:[],animatable:!0,attributes:gb(),layoutAttributes:QL(),supplyDefaults:bne(),supplyLayoutDefaults:wne(),calc:_b().calc,crossTraceCalc:_b().crossTraceCalc,plot:cM().plot,style:eP().style,colorbar:bc(),meta:{}}}}),noe=ye({"lib/sunburst.js"(e,r){"use strict";r.exports=ioe()}}),ooe=ye({"src/traces/treemap/base_plot.js"(e){"use strict";var r=ws();e.name="treemap",e.plot=function(t,a,i,o){r.plotBasePlot(e.name,t,a,i,o)},e.clean=function(t,a,i,o){r.cleanBasePlot(e.name,t,a,i,o)}}}),Zm=ye({"src/traces/treemap/constants.js"(e,r){"use strict";r.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),fM=ye({"src/traces/treemap/attributes.js"(e,r){"use strict";var{hovertemplateAttrs:t,texttemplateAttrs:a,templatefallbackAttrs:i}=Ro(),o=rs(),s=Ds().attributes,l=qm(),n=gb(),u=Zm(),c=Xi().extendFlat,f=Eu().pattern;r.exports={labels:n.labels,parents:n.parents,values:n.values,branchvalues:n.branchvalues,count:n.count,level:n.level,maxdepth:n.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:c({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:n.marker.colors,pattern:f,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:n.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},o("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:c({},l.textfont,{}),editType:"calc"},text:l.text,textinfo:n.textinfo,texttemplate:a({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),texttemplatefallback:i({editType:"plot"}),hovertext:l.hovertext,hoverinfo:n.hoverinfo,hovertemplate:t({},{keys:u.eventDataKeys}),hovertemplatefallback:i(),textfont:l.textfont,insidetextfont:l.insidetextfont,outsidetextfont:c({},l.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:l.sort,root:n.root,domain:s({name:"treemap",trace:!0,editType:"calc"})}}}),tP=ye({"src/traces/treemap/layout_attributes.js"(e,r){"use strict";r.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),soe=ye({"src/traces/treemap/defaults.js"(e,r){"use strict";var t=Yt(),a=fM(),i=Ya(),o=Ds().defaults,s=Oh().handleText,l=Cv().TEXTPAD,n=Vm().handleMarkerDefaults,u=As(),c=u.hasColorscale,f=u.handleDefaults;r.exports=function(d,p,g,m){function y(S,A){return t.coerce(d,p,a,S,A)}var _=y("labels"),v=y("parents");if(!_||!_.length||!v||!v.length){p.visible=!1;return}var x=y("values");x&&x.length?y("branchvalues"):y("count"),y("level"),y("maxdepth");var E=y("tiling.packing");E==="squarify"&&y("tiling.squarifyratio"),y("tiling.flip"),y("tiling.pad");var M=y("text");y("texttemplate"),y("texttemplatefallback"),p.texttemplate||y("textinfo",t.isArrayOrTypedArray(M)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var C=y("pathbar.visible"),w="auto";s(d,p,m,y,w,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition");var k=p.textposition.indexOf("bottom")!==-1;n(d,p,m,y);var T=p._hasColorscale=c(d,"marker","colors")||(d.marker||{}).coloraxis;T?f(d,p,m,y,{prefix:"marker.",cLetter:"c"}):y("marker.depthfade",!(p.marker.colors||[]).length);var b=p.textfont.size*2;y("marker.pad.t",k?b/4:b),y("marker.pad.l",b/4),y("marker.pad.r",b/4),y("marker.pad.b",k?b:b/4),y("marker.cornerradius"),p._hovered={marker:{line:{width:2,color:i.contrast(m.paper_bgcolor)}}},C&&(y("pathbar.thickness",p.pathbar.textfont.size+2*l),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),o(p,m,y),p._length=null}}}),loe=ye({"src/traces/treemap/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=tP();r.exports=function(o,s){function l(n,u){return t.coerce(o,s,a,n,u)}l("treemapcolorway",s.colorway),l("extendtreemapcolors")}}}),rP=ye({"src/traces/treemap/calc.js"(e){"use strict";var r=_b();e.calc=function(t,a){return r.calc(t,a)},e.crossTraceCalc=function(t){return r._runCrossTraceCalc("treemap",t)}}}),aP=ye({"src/traces/treemap/flip_tree.js"(e,r){"use strict";r.exports=function t(a,i,o){var s;o.swapXY&&(s=a.x0,a.x0=a.y0,a.y0=s,s=a.x1,a.x1=a.y1,a.y1=s),o.flipX&&(s=a.x0,a.x0=i[0]-a.x1,a.x1=i[0]-s),o.flipY&&(s=a.y0,a.y0=i[1]-a.y1,a.y1=i[1]-s);var l=a.children;if(l)for(var n=0;n0)for(var b=0;b").join(" ")||"";var J=a.ensureSingle(X,"g","slicetext"),N=a.ensureSingle(J,"text","",function(W){W.attr("data-notex",1)}),H=a.ensureUniformFontSize(d,u.determineTextFont(z,$,R.font,{onPathbar:!0}));N.text($._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,H).call(o.convertToTspans,d),$.textBB=i.bBox(N.node()),$.transform=w($,{fontSize:H.size,onPathbar:!0}),$.transform.fontSize=H.size,T?N.transition().attrTween("transform",function(W){var U=A(W,f,F,[v,x]);return function(V){return k(U(V))}}):N.attr("transform",k($))})}}}),coe=ye({"src/traces/treemap/plot_one.js"(e,r){"use strict";var t=ai(),a=(Xm(),On(zv)).interpolate,i=m0(),o=Yt(),s=Cv().TEXTPAD,l=Rm(),n=l.toMoveInsideBar,u=jc(),c=u.recordMinTextSize,f=Zm(),h=uoe();function d(p){return i.isHierarchyRoot(p)?"":i.getPtId(p)}r.exports=function(g,m,y,_,v){var x=g._fullLayout,E=m[0],M=E.trace,C=M.type,w=C==="icicle",k=E.hierarchy,T=i.findEntryWithLevel(k,M.level),b=t.select(y),S=b.selectAll("g.pathbar"),A=b.selectAll("g.slice");if(!T){S.remove(),A.remove();return}var F=i.isHierarchyRoot(T),D=!x.uniformtext.mode&&i.hasTransition(_),R=i.getMaxDepth(M),P=function(vt){return vt.data.depth-T.data.depth-1?B+$:-(G+$):0,Z={x0:O,x1:O,y0:X,y1:X+G},J=function(vt,Tt,st){var Ve=M.tiling.pad,Ye=function(De){return De-Ve<=Tt.x0},me=function(De){return De+Ve>=Tt.x1},be=function(De){return De-Ve<=Tt.y0},Ee=function(De){return De+Ve>=Tt.y1};return vt.x0===Tt.x0&&vt.x1===Tt.x1&&vt.y0===Tt.y0&&vt.y1===Tt.y1?{x0:vt.x0,x1:vt.x1,y0:vt.y0,y1:vt.y1}:{x0:Ye(vt.x0-Ve)?0:me(vt.x0-Ve)?st[0]:vt.x0,x1:Ye(vt.x1+Ve)?0:me(vt.x1+Ve)?st[0]:vt.x1,y0:be(vt.y0-Ve)?0:Ee(vt.y0-Ve)?st[1]:vt.y0,y1:be(vt.y1+Ve)?0:Ee(vt.y1+Ve)?st[1]:vt.y1}},N=null,H={},W={},U=null,V=function(vt,Tt){return Tt?H[d(vt)]:W[d(vt)]},j=function(vt,Tt,st,Ve){if(Tt)return H[d(k)]||Z;var Ye=W[M.level]||st;return P(vt)?J(vt,Ye,Ve):{}};E.hasMultipleRoots&&F&&R++,M._maxDepth=R,M._backgroundColor=x.paper_bgcolor,M._entryDepth=T.data.depth,M._atRootLevel=F;var q=-L/2+z.l+z.w*(I.x[1]+I.x[0])/2,Y=-B/2+z.t+z.h*(1-(I.y[1]+I.y[0])/2),K=function(vt){return q+vt},re=function(vt){return Y+vt},se=re(0),le=K(0),ue=function(vt){return le+vt},fe=function(vt){return se+vt};function pe(vt,Tt){return vt+","+Tt}var we=ue(0),xe=function(vt){vt.x=Math.max(we,vt.x)},he=M.pathbar.edgeshape,oe=function(vt){var Tt=ue(Math.max(Math.min(vt.x0,vt.x0),0)),st=ue(Math.min(Math.max(vt.x1,vt.x1),O)),Ve=fe(vt.y0),Ye=fe(vt.y1),me=G/2,be={},Ee={};be.x=Tt,Ee.x=st,be.y=Ee.y=(Ve+Ye)/2;var De={x:Tt,y:Ve},Ce={x:st,y:Ve},Fe={x:st,y:Ye},Je={x:Tt,y:Ye};return he===">"?(De.x-=me,Ce.x-=me,Fe.x-=me,Je.x-=me):he==="/"?(Fe.x-=me,Je.x-=me,be.x-=me/2,Ee.x-=me/2):he==="\\"?(De.x-=me,Ce.x-=me,be.x-=me/2,Ee.x-=me/2):he==="<"&&(be.x-=me,Ee.x-=me),xe(De),xe(Je),xe(be),xe(Ce),xe(Fe),xe(Ee),"M"+pe(De.x,De.y)+"L"+pe(Ce.x,Ce.y)+"L"+pe(Ee.x,Ee.y)+"L"+pe(Fe.x,Fe.y)+"L"+pe(Je.x,Je.y)+"L"+pe(be.x,be.y)+"Z"},te=M[w?"tiling":"marker"].pad,ie=function(vt){return M.textposition.indexOf(vt)!==-1},ee=ie("top"),ce=ie("left"),_e=ie("right"),Se=ie("bottom"),Me=function(vt){var Tt=K(vt.x0),st=K(vt.x1),Ve=re(vt.y0),Ye=re(vt.y1),me=st-Tt,be=Ye-Ve;if(!me||!be)return"";var Ee=M.marker.cornerradius||0,De=Math.min(Ee,me/2,be/2);De&&vt.data&&vt.data.data&&vt.data.data.label&&(ee&&(De=Math.min(De,te.t)),ce&&(De=Math.min(De,te.l)),_e&&(De=Math.min(De,te.r)),Se&&(De=Math.min(De,te.b)));var Ce=function(Fe,Je){return De?"a"+pe(De,De)+" 0 0 1 "+pe(Fe,Je):""};return"M"+pe(Tt,Ve+De)+Ce(De,-De)+"L"+pe(st-De,Ve)+Ce(De,De)+"L"+pe(st,Ye-De)+Ce(-De,De)+"L"+pe(Tt+De,Ye)+Ce(-De,-De)+"Z"},Ue=function(vt,Tt){var st=vt.x0,Ve=vt.x1,Ye=vt.y0,me=vt.y1,be=vt.textBB,Ee=ee||Tt.isHeader&&!Se,De=Ee?"start":Se?"end":"middle",Ce=ie("right"),Fe=ie("left")||Tt.onPathbar,Je=Fe?-1:Ce?1:0;if(Tt.isHeader){if(st+=(w?te:te.l)-s,Ve-=(w?te:te.r)-s,st>=Ve){var qe=(st+Ve)/2;st=qe,Ve=qe}var at;Se?(at=me-(w?te:te.b),Ye-1,flipY:I.tiling.flip.indexOf("y")>-1,pad:{inner:I.tiling.pad,top:I.marker.pad.t,left:I.marker.pad.l,right:I.marker.pad.r,bottom:I.marker.pad.b}}),X=$.descendants(),Z=1/0,J=-1/0;X.forEach(function(V){var j=V.depth;j>=I._maxDepth?(V.x0=V.x1=(V.x0+V.x1)/2,V.y0=V.y1=(V.y0+V.y1)/2):(Z=Math.min(Z,j),J=Math.max(J,j))}),y=y.data(X,u.getPtId),I._maxVisibleLayers=isFinite(J)?J-Z+1:0,y.enter().append("g").classed("slice",!0),b(y,h,D,[v,x],C),y.order();var N=null;if(T&&F){var H=u.getPtId(F);y.each(function(V){N===null&&u.getPtId(V)===H&&(N={x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1})})}var W=function(){return N||{x0:0,x1:v,y0:0,y1:x}},U=y;return T&&(U=U.transition().each("end",function(){var V=t.select(this);u.setSliceCursor(V,p,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),U.each(function(V){var j=u.isHeader(V,I);V._x0=E(V.x0),V._x1=E(V.x1),V._y0=M(V.y0),V._y1=M(V.y1),V._hoverX=E(V.x1-I.marker.pad.r),V._hoverY=M(O?V.y1-I.marker.pad.b/2:V.y0+I.marker.pad.t/2);var q=t.select(this),Y=a.ensureSingle(q,"path","surface",function(fe){fe.style("pointer-events",R?"none":"all")});T?Y.transition().attrTween("d",function(fe){var pe=S(fe,h,W(),[v,x]);return function(we){return C(pe(we))}}):Y.attr("d",C),q.call(c,m,p,g,{styleOne:l,eventDataKeys:n.eventDataKeys,transitionTime:n.CLICK_TRANSITION_TIME,transitionEasing:n.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,p,{isTransitioning:p._transitioning}),Y.call(l,V,I,p,{hovered:!1}),V.x0===V.x1||V.y0===V.y1?V._text="":j?V._text=G?"":u.getPtLabel(V)||"":V._text=f(V,m,I,g,P)||"";var K=a.ensureSingle(q,"g","slicetext"),re=a.ensureSingle(K,"text","",function(fe){fe.attr("data-notex",1)}),se=a.ensureUniformFontSize(p,u.determineTextFont(I,V,P.font)),le=V._text||" ",ue=j&&le.indexOf("
")===-1;re.text(le).classed("slicetext",!0).attr("text-anchor",B?"end":L||ue?"start":"middle").call(i.font,se).call(o.convertToTspans,p),V.textBB=i.bBox(re.node()),V.transform=w(V,{fontSize:se.size,isHeader:j}),V.transform.fontSize=se.size,T?re.transition().attrTween("transform",function(fe){var pe=A(fe,h,W(),[v,x]);return function(we){return k(pe(we))}}):re.attr("transform",k(V))}),N}}}),hoe=ye({"src/traces/treemap/plot.js"(e,r){"use strict";var t=nP(),a=foe();r.exports=function(o,s,l,n){return t(o,s,l,n,{type:"treemap",drawDescendants:a})}}}),doe=ye({"src/traces/treemap/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"treemap",basePlotModule:ooe(),categories:[],animatable:!0,attributes:fM(),layoutAttributes:tP(),supplyDefaults:soe(),supplyLayoutDefaults:loe(),calc:rP().calc,crossTraceCalc:rP().crossTraceCalc,plot:hoe(),style:hM().style,colorbar:bc(),meta:{}}}}),poe=ye({"lib/treemap.js"(e,r){"use strict";r.exports=doe()}}),voe=ye({"src/traces/icicle/base_plot.js"(e){"use strict";var r=ws();e.name="icicle",e.plot=function(t,a,i,o){r.plotBasePlot(e.name,t,a,i,o)},e.clean=function(t,a,i,o){r.cleanBasePlot(e.name,t,a,i,o)}}}),oP=ye({"src/traces/icicle/attributes.js"(e,r){"use strict";var{hovertemplateAttrs:t,texttemplateAttrs:a,templatefallbackAttrs:i}=Ro(),o=rs(),s=Ds().attributes,l=qm(),n=gb(),u=fM(),c=Zm(),f=Xi().extendFlat,h=Eu().pattern;r.exports={labels:n.labels,parents:n.parents,values:n.values,branchvalues:n.branchvalues,count:n.count,level:n.level,maxdepth:n.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:u.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:f({colors:n.marker.colors,line:n.marker.line,pattern:h,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:n.leaf,pathbar:u.pathbar,text:l.text,textinfo:n.textinfo,texttemplate:a({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:i({editType:"plot"}),hovertext:l.hovertext,hoverinfo:n.hoverinfo,hovertemplate:t({},{keys:c.eventDataKeys}),hovertemplatefallback:i(),textfont:l.textfont,insidetextfont:l.insidetextfont,outsidetextfont:u.outsidetextfont,textposition:u.textposition,sort:l.sort,root:n.root,domain:s({name:"icicle",trace:!0,editType:"calc"})}}}),sP=ye({"src/traces/icicle/layout_attributes.js"(e,r){"use strict";r.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),moe=ye({"src/traces/icicle/defaults.js"(e,r){"use strict";var t=Yt(),a=oP(),i=Ya(),o=Ds().defaults,s=Oh().handleText,l=Cv().TEXTPAD,n=Vm().handleMarkerDefaults,u=As(),c=u.hasColorscale,f=u.handleDefaults;r.exports=function(d,p,g,m){function y(k,T){return t.coerce(d,p,a,k,T)}var _=y("labels"),v=y("parents");if(!_||!_.length||!v||!v.length){p.visible=!1;return}var x=y("values");x&&x.length?y("branchvalues"):y("count"),y("level"),y("maxdepth"),y("tiling.orientation"),y("tiling.flip"),y("tiling.pad");var E=y("text");y("texttemplate"),y("texttemplatefallback"),p.texttemplate||y("textinfo",t.isArrayOrTypedArray(E)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var M=y("pathbar.visible"),C="auto";s(d,p,m,y,C,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition"),n(d,p,m,y);var w=p._hasColorscale=c(d,"marker","colors")||(d.marker||{}).coloraxis;w&&f(d,p,m,y,{prefix:"marker.",cLetter:"c"}),y("leaf.opacity",w?1:.7),p._hovered={marker:{line:{width:2,color:i.contrast(m.paper_bgcolor)}}},M&&(y("pathbar.thickness",p.pathbar.textfont.size+2*l),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),o(p,m,y),p._length=null}}}),goe=ye({"src/traces/icicle/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=sP();r.exports=function(o,s){function l(n,u){return t.coerce(o,s,a,n,u)}l("iciclecolorway",s.colorway),l("extendiciclecolors")}}}),lP=ye({"src/traces/icicle/calc.js"(e){"use strict";var r=_b();e.calc=function(t,a){return r.calc(t,a)},e.crossTraceCalc=function(t){return r._runCrossTraceCalc("icicle",t)}}}),yoe=ye({"src/traces/icicle/partition.js"(e,r){"use strict";var t=yb(),a=aP();r.exports=function(o,s,l){var n=l.flipX,u=l.flipY,c=l.orientation==="h",f=l.maxDepth,h=s[0],d=s[1];f&&(h=(o.height+1)*s[0]/Math.min(o.height+1,f),d=(o.height+1)*s[1]/Math.min(o.height+1,f));var p=t.partition().padding(l.pad.inner).size(c?[s[1],h]:[s[0],d])(o);return(c||n||u)&&a(p,s,{swapXY:c,flipX:n,flipY:u}),p}}}),uP=ye({"src/traces/icicle/style.js"(e,r){"use strict";var t=ai(),a=Ya(),i=Yt(),o=jc().resizeText,s=uM();function l(u){var c=u._fullLayout._iciclelayer.selectAll(".trace");o(u,c,"icicle"),c.each(function(f){var h=t.select(this),d=f[0],p=d.trace;h.style("opacity",p.opacity),h.selectAll("path.surface").each(function(g){t.select(this).call(n,g,p,u)})})}function n(u,c,f,h){var d=c.data.data,p=!c.children,g=d.i,m=i.castOption(f,g,"marker.line.color")||a.defaultLine,y=i.castOption(f,g,"marker.line.width")||0;u.call(s,c,f,h).style("stroke-width",y).call(a.stroke,m).style("opacity",p?f.leaf.opacity:null)}r.exports={style:l,styleOne:n}}}),_oe=ye({"src/traces/icicle/draw_descendants.js"(e,r){"use strict";var t=ai(),a=Yt(),i=$i(),o=Go(),s=yoe(),l=uP().styleOne,n=Zm(),u=m0(),c=Rb(),f=cM().formatSliceLabel,h=!1;r.exports=function(p,g,m,y,_){var v=_.width,x=_.height,E=_.viewX,M=_.viewY,C=_.pathSlice,w=_.toMoveInsideSlice,k=_.strTransform,T=_.hasTransition,b=_.handleSlicesExit,S=_.makeUpdateSliceInterpolator,A=_.makeUpdateTextInterpolator,F=_.prevEntry,D={},R=p._context.staticPlot,P=p._fullLayout,z=g[0],I=z.trace,L=I.textposition.indexOf("left")!==-1,B=I.textposition.indexOf("right")!==-1,O=I.textposition.indexOf("bottom")!==-1,G=s(m,[v,x],{flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,orientation:I.tiling.orientation,pad:{inner:I.tiling.pad},maxDepth:I._maxDepth}),$=G.descendants(),X=1/0,Z=-1/0;$.forEach(function(U){var V=U.depth;V>=I._maxDepth?(U.x0=U.x1=(U.x0+U.x1)/2,U.y0=U.y1=(U.y0+U.y1)/2):(X=Math.min(X,V),Z=Math.max(Z,V))}),y=y.data($,u.getPtId),I._maxVisibleLayers=isFinite(Z)?Z-X+1:0,y.enter().append("g").classed("slice",!0),b(y,h,D,[v,x],C),y.order();var J=null;if(T&&F){var N=u.getPtId(F);y.each(function(U){J===null&&u.getPtId(U)===N&&(J={x0:U.x0,x1:U.x1,y0:U.y0,y1:U.y1})})}var H=function(){return J||{x0:0,x1:v,y0:0,y1:x}},W=y;return T&&(W=W.transition().each("end",function(){var U=t.select(this);u.setSliceCursor(U,p,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),W.each(function(U){U._x0=E(U.x0),U._x1=E(U.x1),U._y0=M(U.y0),U._y1=M(U.y1),U._hoverX=E(U.x1-I.tiling.pad),U._hoverY=M(O?U.y1-I.tiling.pad/2:U.y0+I.tiling.pad/2);var V=t.select(this),j=a.ensureSingle(V,"path","surface",function(re){re.style("pointer-events",R?"none":"all")});T?j.transition().attrTween("d",function(re){var se=S(re,h,H(),[v,x],{orientation:I.tiling.orientation,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1});return function(le){return C(se(le))}}):j.attr("d",C),V.call(c,m,p,g,{styleOne:l,eventDataKeys:n.eventDataKeys,transitionTime:n.CLICK_TRANSITION_TIME,transitionEasing:n.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,p,{isTransitioning:p._transitioning}),j.call(l,U,I,p,{hovered:!1}),U.x0===U.x1||U.y0===U.y1?U._text="":U._text=f(U,m,I,g,P)||"";var q=a.ensureSingle(V,"g","slicetext"),Y=a.ensureSingle(q,"text","",function(re){re.attr("data-notex",1)}),K=a.ensureUniformFontSize(p,u.determineTextFont(I,U,P.font));Y.text(U._text||" ").classed("slicetext",!0).attr("text-anchor",B?"end":L?"start":"middle").call(i.font,K).call(o.convertToTspans,p),U.textBB=i.bBox(Y.node()),U.transform=w(U,{fontSize:K.size}),U.transform.fontSize=K.size,T?Y.transition().attrTween("transform",function(re){var se=A(re,h,H(),[v,x]);return function(le){return k(se(le))}}):Y.attr("transform",k(U))}),J}}}),xoe=ye({"src/traces/icicle/plot.js"(e,r){"use strict";var t=nP(),a=_oe();r.exports=function(o,s,l,n){return t(o,s,l,n,{type:"icicle",drawDescendants:a})}}}),boe=ye({"src/traces/icicle/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"icicle",basePlotModule:voe(),categories:[],animatable:!0,attributes:oP(),layoutAttributes:sP(),supplyDefaults:moe(),supplyLayoutDefaults:goe(),calc:lP().calc,crossTraceCalc:lP().crossTraceCalc,plot:xoe(),style:uP().style,colorbar:bc(),meta:{}}}}),woe=ye({"lib/icicle.js"(e,r){"use strict";r.exports=boe()}}),Aoe=ye({"src/traces/funnelarea/base_plot.js"(e){"use strict";var r=ws();e.name="funnelarea",e.plot=function(t,a,i,o){r.plotBasePlot(e.name,t,a,i,o)},e.clean=function(t,a,i,o){r.cleanBasePlot(e.name,t,a,i,o)}}}),cP=ye({"src/traces/funnelarea/attributes.js"(e,r){"use strict";var t=qm(),a=Oo(),i=Ds().attributes,{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=Ro(),n=Xi().extendFlat;r.exports={labels:t.labels,label0:t.label0,dlabel:t.dlabel,values:t.values,marker:{colors:t.marker.colors,line:{color:n({},t.marker.line.color,{dflt:null}),width:n({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:t.marker.pattern,editType:"calc"},text:t.text,hovertext:t.hovertext,scalegroup:n({},t.scalegroup,{}),textinfo:n({},t.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:l({editType:"plot"}),hoverinfo:n({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:l(),textposition:n({},t.textposition,{values:["inside","none"],dflt:"inside"}),textfont:t.textfont,insidetextfont:t.insidetextfont,title:{text:t.title.text,font:t.title.font,position:n({},t.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({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"}}}}),fP=ye({"src/traces/funnelarea/layout_attributes.js"(e,r){"use strict";var t=PT().hiddenlabels;r.exports={hiddenlabels:t,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Toe=ye({"src/traces/funnelarea/defaults.js"(e,r){"use strict";var t=Yt(),a=cP(),i=Ds().defaults,o=Oh().handleText,s=Vm().handleLabelsAndValues,l=Vm().handleMarkerDefaults;r.exports=function(u,c,f,h){function d(C,w){return t.coerce(u,c,a,C,w)}var p=d("labels"),g=d("values"),m=s(p,g),y=m.len;if(c._hasLabels=m.hasLabels,c._hasValues=m.hasValues,!c._hasLabels&&c._hasValues&&(d("label0"),d("dlabel")),!y){c.visible=!1;return}c._length=y,l(u,c,h,d),d("scalegroup");var _=d("text"),v=d("texttemplate");d("texttemplatefallback");var x;if(v||(x=d("textinfo",Array.isArray(_)?"text+percent":"percent")),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback"),v||x&&x!=="none"){var E=d("textposition");o(u,c,h,d,E,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else x==="none"&&d("textposition","none");i(c,h,d);var M=d("title.text");M&&(d("title.position"),t.coerceFont(d,"title.font",h.font)),d("aspectratio"),d("baseratio")}}}),Moe=ye({"src/traces/funnelarea/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=fP();r.exports=function(o,s){function l(n,u){return t.coerce(o,s,a,n,u)}l("hiddenlabels"),l("funnelareacolorway",s.colorway),l("extendfunnelareacolors")}}}),hP=ye({"src/traces/funnelarea/calc.js"(e,r){"use strict";var t=Fy();function a(o,s){return t.calc(o,s)}function i(o){t.crossTraceCalc(o,{type:"funnelarea"})}r.exports={calc:a,crossTraceCalc:i}}}),Eoe=ye({"src/traces/funnelarea/plot.js"(e,r){"use strict";var t=ai(),a=$i(),i=Yt(),o=i.strScale,s=i.strTranslate,l=Go(),n=Rm(),u=n.toMoveInsideBar,c=jc(),f=c.recordMinTextSize,h=c.clearMinTextSize,d=Mv(),p=IT(),g=p.attachFxHandlers,m=p.determineInsideTextFont,y=p.layoutAreas,_=p.prerenderTitles,v=p.positionTitleOutside,x=p.formatSliceLabel;r.exports=function(k,T){var b=k._context.staticPlot,S=k._fullLayout;h("funnelarea",S),_(T,k),y(T,S._size),i.makeTraceGroups(S._funnelarealayer,T,"trace").each(function(A){var F=t.select(this),D=A[0],R=D.trace;C(A),F.each(function(){var P=t.select(this).selectAll("g.slice").data(A);P.enter().append("g").classed("slice",!0),P.exit().remove(),P.each(function(I,L){if(I.hidden){t.select(this).selectAll("path,g").remove();return}I.pointNumber=I.i,I.curveNumber=R.index;var B=D.cx,O=D.cy,G=t.select(this),$=G.selectAll("path.surface").data([I]);$.enter().append("path").classed("surface",!0).style({"pointer-events":b?"none":"all"}),G.call(g,k,A);var X="M"+(B+I.TR[0])+","+(O+I.TR[1])+E(I.TR,I.BR)+E(I.BR,I.BL)+E(I.BL,I.TL)+"Z";$.attr("d",X),x(k,I,D);var Z=d.castOption(R.textposition,I.pts),J=G.selectAll("g.slicetext").data(I.text&&Z!=="none"?[0]:[]);J.enter().append("g").classed("slicetext",!0),J.exit().remove(),J.each(function(){var N=i.ensureSingle(t.select(this),"text","",function(K){K.attr("data-notex",1)}),H=i.ensureUniformFontSize(k,m(R,I,S.font));N.text(I.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,H).call(l.convertToTspans,k);var W=a.bBox(N.node()),U,V,j,q=Math.min(I.BL[1],I.BR[1])+O,Y=Math.max(I.TL[1],I.TR[1])+O;V=Math.max(I.TL[0],I.BL[0])+B,j=Math.min(I.TR[0],I.BR[0])+B,U=u(V,j,q,Y,W,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),U.fontSize=H.size,f(R.type,U,S),A[L].transform=U,i.setTransormAndDisplay(N,U)})});var z=t.select(this).selectAll("g.titletext").data(R.title.text?[0]:[]);z.enter().append("g").classed("titletext",!0),z.exit().remove(),z.each(function(){var I=i.ensureSingle(t.select(this),"text","",function(O){O.attr("data-notex",1)}),L=R.title.text;R._meta&&(L=i.templateString(L,R._meta)),I.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,R.title.font).call(l.convertToTspans,k);var B=v(D,S._size);I.attr("transform",s(B.x,B.y)+o(Math.min(1,B.scale))+s(B.tx,B.ty))})})})};function E(w,k){var T=k[0]-w[0],b=k[1]-w[1];return"l"+T+","+b}function M(w,k){return[.5*(w[0]+k[0]),.5*(w[1]+k[1])]}function C(w){if(!w.length)return;var k=w[0],T=k.trace,b=T.aspectratio,S=T.baseratio;S>.999&&(S=.999);var A=Math.pow(S,2),F=k.vTotal,D=F*A/(1-A),R=F,P=D/F;function z(){var re=Math.sqrt(P);return{x:re,y:-re}}function I(){var re=z();return[re.x,re.y]}var L,B=[];B.push(I());var O,G;for(O=w.length-1;O>-1;O--)if(G=w[O],!G.hidden){var $=G.v/R;P+=$,B.push(I())}var X=1/0,Z=-1/0;for(O=0;O-1;O--)if(G=w[O],!G.hidden){q+=1;var Y=B[q][0],K=B[q][1];G.TL=[-Y,K],G.TR=[Y,K],G.BL=V,G.BR=j,G.pxmid=M(G.TR,G.BR),V=G.TL,j=G.TR}}}}),Soe=ye({"src/traces/funnelarea/style.js"(e,r){"use strict";var t=ai(),a=yy(),i=jc().resizeText;r.exports=function(s){var l=s._fullLayout._funnelarealayer.selectAll(".trace");i(s,l,"funnelarea"),l.each(function(n){var u=n[0],c=u.trace,f=t.select(this);f.style({opacity:c.opacity}),f.selectAll("path.surface").each(function(h){t.select(this).call(a,h,c,s)})})}}}),koe=ye({"src/traces/funnelarea/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Aoe(),categories:["pie-like","funnelarea","showLegend"],attributes:cP(),layoutAttributes:fP(),supplyDefaults:Toe(),supplyLayoutDefaults:Moe(),calc:hP().calc,crossTraceCalc:hP().crossTraceCalc,plot:Eoe(),style:Soe(),styleOne:yy(),meta:{}}}}),Coe=ye({"lib/funnelarea.js"(e,r){"use strict";r.exports=koe()}}),$u=ye({"stackgl_modules/index.js"(e,r){"use strict";(()=>{var t={3065(s,l,n){s.exports={alpha_shape:n(3502),convex_hull:n(7352),delaunay_triangulate:n(7642),gl_cone3d:n(6405),gl_error3d:n(9165),gl_line3d:n(5714),gl_mesh3d:n(7201),gl_plot3d:n(4100),gl_scatter3d:n(8418),gl_streamtube3d:n(7815),gl_surface3d:n(9499),ndarray:n(9618),ndarray_linear_interpolate:n(4317)}},6296(s,l,n){"use strict";s.exports=p;var u=n(7261),c=n(9977),f=n(1811);function h(g,m){this._controllerNames=Object.keys(g),this._controllerList=this._controllerNames.map(function(y){return g[y]}),this._mode=m,this._active=g[m],this._active||(this._mode="turntable",this._active=g.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var d=h.prototype;d.flush=function(g){for(var m=this._controllerList,y=0;y"u"?n(1538):WeakMap,c=n(2762),f=n(8116),h=new u;function d(p){var g=h.get(p),m=g&&(g._triangleBuffer.handle||g._triangleBuffer.buffer);if(!m||!p.isBuffer(m)){var y=c(p,new Float32Array([-1,-1,-1,4,4,-1]));g=f(p,[{buffer:y,type:p.FLOAT,size:2}]),g._triangleBuffer=y,h.set(p,g)}g.bind(),p.drawArrays(p.TRIANGLES,0,3),g.unbind()}s.exports=d},1085(s,l,n){var u=n(1371);s.exports=c;function c(f,h,d){h=typeof h=="number"?h:1,d=d||": ";var p=f.split(/\r?\n/),g=String(p.length+h-1).length;return p.map(function(m,y){var _=y+h,v=String(_).length,x=u(_,g-v);return x+d+m}).join(` +`)}},3952(s,l,n){"use strict";s.exports=f;var u=n(3250);function c(h,d){for(var p=new Array(d+1),g=0;g0)throw new Error("Invalid string. Length must be a multiple of 4");var C=E.indexOf("=");C===-1&&(C=M);var w=C===M?0:4-C%4;return[C,w]}function g(E){var M=p(E),C=M[0],w=M[1];return(C+w)*3/4-w}function m(E,M,C){return(M+C)*3/4-C}function y(E){var M,C=p(E),w=C[0],k=C[1],T=new c(m(E,w,k)),b=0,S=k>0?w-4:w,A;for(A=0;A>16&255,T[b++]=M>>8&255,T[b++]=M&255;return k===2&&(M=u[E.charCodeAt(A)]<<2|u[E.charCodeAt(A+1)]>>4,T[b++]=M&255),k===1&&(M=u[E.charCodeAt(A)]<<10|u[E.charCodeAt(A+1)]<<4|u[E.charCodeAt(A+2)]>>2,T[b++]=M>>8&255,T[b++]=M&255),T}function _(E){return n[E>>18&63]+n[E>>12&63]+n[E>>6&63]+n[E&63]}function v(E,M,C){for(var w,k=[],T=M;TS?S:b+T));return w===1?(M=E[C-1],k.push(n[M>>2]+n[M<<4&63]+"==")):w===2&&(M=(E[C-2]<<8)+E[C-1],k.push(n[M>>10]+n[M>>4&63]+n[M<<2&63]+"=")),k.join("")}},3865(s,l,n){"use strict";var u=n(869);s.exports=c;function c(f,h){return u(f[0].mul(h[1]).add(h[0].mul(f[1])),f[1].mul(h[1]))}},1318(s){"use strict";s.exports=l;function l(n,u){return n[0].mul(u[1]).cmp(u[0].mul(n[1]))}},8697(s,l,n){"use strict";var u=n(869);s.exports=c;function c(f,h){return u(f[0].mul(h[1]),f[1].mul(h[0]))}},7842(s,l,n){"use strict";var u=n(6330),c=n(1533),f=n(2651),h=n(6768),d=n(869),p=n(8697);s.exports=g;function g(m,y){if(u(m))return y?p(m,g(y)):[m[0].clone(),m[1].clone()];var _=0,v,x;if(c(m))v=m.clone();else if(typeof m=="string")v=h(m);else{if(m===0)return[f(0),f(1)];if(m===Math.floor(m))v=f(m);else{for(;m!==Math.floor(m);)m=m*Math.pow(2,256),_-=256;v=f(m)}}if(u(y))v.mul(y[1]),x=y[0].clone();else if(c(y))x=y.clone();else if(typeof y=="string")x=h(y);else if(!y)x=f(1);else if(y===Math.floor(y))x=f(y);else{for(;y!==Math.floor(y);)y=y*Math.pow(2,256),_+=256;x=f(y)}return _>0?v=v.ushln(_):_<0&&(x=x.ushln(-_)),d(v,x)}},6330(s,l,n){"use strict";var u=n(1533);s.exports=c;function c(f){return Array.isArray(f)&&f.length===2&&u(f[0])&&u(f[1])}},5716(s,l,n){"use strict";var u=n(6859);s.exports=c;function c(f){return f.cmp(new u(0))}},1369(s,l,n){"use strict";var u=n(5716);s.exports=c;function c(f){var h=f.length,d=f.words,p=0;if(h===1)p=d[0];else if(h===2)p=d[0]+d[1]*67108864;else for(var g=0;g20?52:p+32}},1533(s,l,n){"use strict";var u=n(6859);s.exports=c;function c(f){return f&&typeof f=="object"&&!!f.words}},2651(s,l,n){"use strict";var u=n(6859),c=n(2361);s.exports=f;function f(h){var d=c.exponent(h);return d<52?new u(h):new u(h*Math.pow(2,52-d)).ushln(d-52)}},869(s,l,n){"use strict";var u=n(2651),c=n(5716);s.exports=f;function f(h,d){var p=c(h),g=c(d);if(p===0)return[u(0),u(1)];if(g===0)return[u(0),u(0)];g<0&&(h=h.neg(),d=d.neg());var m=h.gcd(d);return m.cmpn(1)?[h.div(m),d.div(m)]:[h,d]}},6768(s,l,n){"use strict";var u=n(6859);s.exports=c;function c(f){return new u(f)}},6504(s,l,n){"use strict";var u=n(869);s.exports=c;function c(f,h){return u(f[0].mul(h[0]),f[1].mul(h[1]))}},7721(s,l,n){"use strict";var u=n(5716);s.exports=c;function c(f){return u(f[0])*u(f[1])}},5572(s,l,n){"use strict";var u=n(869);s.exports=c;function c(f,h){return u(f[0].mul(h[1]).sub(f[1].mul(h[0])),f[1].mul(h[1]))}},946(s,l,n){"use strict";var u=n(1369),c=n(4025);s.exports=f;function f(h){var d=h[0],p=h[1];if(d.cmpn(0)===0)return 0;var g=d.abs().divmod(p.abs()),m=g.div,y=u(m),_=g.mod,v=d.negative!==p.negative?-1:1;if(_.cmpn(0)===0)return v*y;if(y){var x=c(y)+4,E=u(_.ushln(x).divRound(p));return v*(y+E*Math.pow(2,-x))}else{var M=p.bitLength()-_.bitLength()+53,E=u(_.ushln(M).divRound(p));return M<1023?v*E*Math.pow(2,-M):(E*=Math.pow(2,-1023),v*E*Math.pow(2,1023-M))}}},2478(s){"use strict";function l(d,p,g,m,y){for(var _=y+1;m<=y;){var v=m+y>>>1,x=d[v],E=g!==void 0?g(x,p):x-p;E>=0?(_=v,y=v-1):m=v+1}return _}function n(d,p,g,m,y){for(var _=y+1;m<=y;){var v=m+y>>>1,x=d[v],E=g!==void 0?g(x,p):x-p;E>0?(_=v,y=v-1):m=v+1}return _}function u(d,p,g,m,y){for(var _=m-1;m<=y;){var v=m+y>>>1,x=d[v],E=g!==void 0?g(x,p):x-p;E<0?(_=v,m=v+1):y=v-1}return _}function c(d,p,g,m,y){for(var _=m-1;m<=y;){var v=m+y>>>1,x=d[v],E=g!==void 0?g(x,p):x-p;E<=0?(_=v,m=v+1):y=v-1}return _}function f(d,p,g,m,y){for(;m<=y;){var _=m+y>>>1,v=d[_],x=g!==void 0?g(v,p):v-p;if(x===0)return _;x<=0?m=_+1:y=_-1}return-1}function h(d,p,g,m,y,_){return typeof g=="function"?_(d,p,g,m===void 0?0:m|0,y===void 0?d.length-1:y|0):_(d,p,void 0,g===void 0?0:g|0,m===void 0?d.length-1:m|0)}s.exports={ge:function(d,p,g,m,y){return h(d,p,g,m,y,l)},gt:function(d,p,g,m,y){return h(d,p,g,m,y,n)},lt:function(d,p,g,m,y){return h(d,p,g,m,y,u)},le:function(d,p,g,m,y){return h(d,p,g,m,y,c)},eq:function(d,p,g,m,y){return h(d,p,g,m,y,f)}}},8828(s,l){"use strict";"use restrict";var n=32;l.INT_BITS=n,l.INT_MAX=2147483647,l.INT_MIN=-1<0)-(f<0)},l.abs=function(f){var h=f>>n-1;return(f^h)-h},l.min=function(f,h){return h^(f^h)&-(f65535)<<4,f>>>=h,d=(f>255)<<3,f>>>=d,h|=d,d=(f>15)<<2,f>>>=d,h|=d,d=(f>3)<<1,f>>>=d,h|=d,h|f>>1},l.log10=function(f){return f>=1e9?9:f>=1e8?8:f>=1e7?7:f>=1e6?6:f>=1e5?5:f>=1e4?4:f>=1e3?3:f>=100?2:f>=10?1:0},l.popCount=function(f){return f=f-(f>>>1&1431655765),f=(f&858993459)+(f>>>2&858993459),(f+(f>>>4)&252645135)*16843009>>>24};function u(f){var h=32;return f&=-f,f&&h--,f&65535&&(h-=16),f&16711935&&(h-=8),f&252645135&&(h-=4),f&858993459&&(h-=2),f&1431655765&&(h-=1),h}l.countTrailingZeros=u,l.nextPow2=function(f){return f+=f===0,--f,f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f+1},l.prevPow2=function(f){return f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f-(f>>>1)},l.parity=function(f){return f^=f>>>16,f^=f>>>8,f^=f>>>4,f&=15,27030>>>f&1};var c=new Array(256);(function(f){for(var h=0;h<256;++h){var d=h,p=h,g=7;for(d>>>=1;d;d>>>=1)p<<=1,p|=d&1,--g;f[h]=p<>>8&255]<<16|c[f>>>16&255]<<8|c[f>>>24&255]},l.interleave2=function(f,h){return f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,h&=65535,h=(h|h<<8)&16711935,h=(h|h<<4)&252645135,h=(h|h<<2)&858993459,h=(h|h<<1)&1431655765,f|h<<1},l.deinterleave2=function(f,h){return f=f>>>h&1431655765,f=(f|f>>>1)&858993459,f=(f|f>>>2)&252645135,f=(f|f>>>4)&16711935,f=(f|f>>>16)&65535,f<<16>>16},l.interleave3=function(f,h,d){return f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,h&=1023,h=(h|h<<16)&4278190335,h=(h|h<<8)&251719695,h=(h|h<<4)&3272356035,h=(h|h<<2)&1227133513,f|=h<<1,d&=1023,d=(d|d<<16)&4278190335,d=(d|d<<8)&251719695,d=(d|d<<4)&3272356035,d=(d|d<<2)&1227133513,f|d<<2},l.deinterleave3=function(f,h){return f=f>>>h&1227133513,f=(f|f>>>2)&3272356035,f=(f|f>>>4)&251719695,f=(f|f>>>8)&4278190335,f=(f|f>>>16)&1023,f<<22>>22},l.nextCombination=function(f){var h=f|f-1;return h+1|(~h&-~h)-1>>>u(f)+1}},6859(s,l,n){s=n.nmd(s),(function(u,c){"use strict";function f(I,L){if(!I)throw new Error(L||"Assertion failed")}function h(I,L){I.super_=L;var B=function(){};B.prototype=L.prototype,I.prototype=new B,I.prototype.constructor=I}function d(I,L,B){if(d.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((L==="le"||L==="be")&&(B=L,L=10),this._init(I||0,L||10,B||"be"))}typeof u=="object"?u.exports=d:c.BN=d,d.BN=d,d.wordSize=26;var p;try{typeof window<"u"&&typeof window.Buffer<"u"?p=window.Buffer:p=n(7790).Buffer}catch{}d.isBN=function(L){return L instanceof d?!0:L!==null&&typeof L=="object"&&L.constructor.wordSize===d.wordSize&&Array.isArray(L.words)},d.max=function(L,B){return L.cmp(B)>0?L:B},d.min=function(L,B){return L.cmp(B)<0?L:B},d.prototype._init=function(L,B,O){if(typeof L=="number")return this._initNumber(L,B,O);if(typeof L=="object")return this._initArray(L,B,O);B==="hex"&&(B=16),f(B===(B|0)&&B>=2&&B<=36),L=L.toString().replace(/\s+/g,"");var G=0;L[0]==="-"&&(G++,this.negative=1),G=0;G-=3)X=L[G]|L[G-1]<<8|L[G-2]<<16,this.words[$]|=X<>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,$++);else if(O==="le")for(G=0,$=0;G>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,$++);return this.strip()};function g(I,L){var B=I.charCodeAt(L);return B>=65&&B<=70?B-55:B>=97&&B<=102?B-87:B-48&15}function m(I,L,B){var O=g(I,B);return B-1>=L&&(O|=g(I,B-1)<<4),O}d.prototype._parseHex=function(L,B,O){this.length=Math.ceil((L.length-B)/6),this.words=new Array(this.length);for(var G=0;G=B;G-=2)Z=m(L,B,G)<<$,this.words[X]|=Z&67108863,$>=18?($-=18,X+=1,this.words[X]|=Z>>>26):$+=8;else{var J=L.length-B;for(G=J%2===0?B+1:B;G=18?($-=18,X+=1,this.words[X]|=Z>>>26):$+=8}this.strip()};function y(I,L,B,O){for(var G=0,$=Math.min(I.length,B),X=L;X<$;X++){var Z=I.charCodeAt(X)-48;G*=O,Z>=49?G+=Z-49+10:Z>=17?G+=Z-17+10:G+=Z}return G}d.prototype._parseBase=function(L,B,O){this.words=[0],this.length=1;for(var G=0,$=1;$<=67108863;$*=B)G++;G--,$=$/B|0;for(var X=L.length-O,Z=X%G,J=Math.min(X,X-Z)+O,N=0,H=O;H1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},d.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var _=["","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"],v=[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],x=[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];d.prototype.toString=function(L,B){L=L||10,B=B|0||1;var O;if(L===16||L==="hex"){O="";for(var G=0,$=0,X=0;X>>24-G&16777215,G+=2,G>=26&&(G-=26,X--),$!==0||X!==this.length-1?O=_[6-J.length]+J+O:O=J+O}for($!==0&&(O=$.toString(16)+O);O.length%B!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}if(L===(L|0)&&L>=2&&L<=36){var N=v[L],H=x[L];O="";var W=this.clone();for(W.negative=0;!W.isZero();){var U=W.modn(H).toString(L);W=W.idivn(H),W.isZero()?O=U+O:O=_[N-U.length]+U+O}for(this.isZero()&&(O="0"+O);O.length%B!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}f(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=this.words[1]*67108864:this.length===3&&this.words[2]===1?L+=4503599627370496+this.words[1]*67108864:this.length>2&&f(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(L,B){return f(typeof p<"u"),this.toArrayLike(p,L,B)},d.prototype.toArray=function(L,B){return this.toArrayLike(Array,L,B)},d.prototype.toArrayLike=function(L,B,O){var G=this.byteLength(),$=O||Math.max(1,G);f(G<=$,"byte array longer than desired length"),f($>0,"Requested array length <= 0"),this.strip();var X=B==="le",Z=new L($),J,N,H=this.clone();if(X){for(N=0;!H.isZero();N++)J=H.andln(255),H.iushrn(8),Z[N]=J;for(;N<$;N++)Z[N]=0}else{for(N=0;N<$-G;N++)Z[N]=0;for(N=0;!H.isZero();N++)J=H.andln(255),H.iushrn(8),Z[$-N-1]=J}return Z},Math.clz32?d.prototype._countBits=function(L){return 32-Math.clz32(L)}:d.prototype._countBits=function(L){var B=L,O=0;return B>=4096&&(O+=13,B>>>=13),B>=64&&(O+=7,B>>>=7),B>=8&&(O+=4,B>>>=4),B>=2&&(O+=2,B>>>=2),O+B},d.prototype._zeroBits=function(L){if(L===0)return 26;var B=L,O=0;return(B&8191)===0&&(O+=13,B>>>=13),(B&127)===0&&(O+=7,B>>>=7),(B&15)===0&&(O+=4,B>>>=4),(B&3)===0&&(O+=2,B>>>=2),(B&1)===0&&O++,O},d.prototype.bitLength=function(){var L=this.words[this.length-1],B=this._countBits(L);return(this.length-1)*26+B};function E(I){for(var L=new Array(I.bitLength()),B=0;B>>G}return L}d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,B=0;BL.length?this.clone().ior(L):L.clone().ior(this)},d.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},d.prototype.iuand=function(L){var B;this.length>L.length?B=L:B=this;for(var O=0;OL.length?this.clone().iand(L):L.clone().iand(this)},d.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},d.prototype.iuxor=function(L){var B,O;this.length>L.length?(B=this,O=L):(B=L,O=this);for(var G=0;GL.length?this.clone().ixor(L):L.clone().ixor(this)},d.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},d.prototype.inotn=function(L){f(typeof L=="number"&&L>=0);var B=Math.ceil(L/26)|0,O=L%26;this._expand(B),O>0&&B--;for(var G=0;G0&&(this.words[G]=~this.words[G]&67108863>>26-O,G++);G=0);var O=L/26|0,G=L%26;return this._expand(O+1),B?this.words[O]=this.words[O]|1<L.length?(O=this,G=L):(O=L,G=this);for(var $=0,X=0;X>>26;for(;$!==0&&X>>26;if(this.length=O.length,$!==0)this.words[this.length]=$,this.length++;else if(O!==this)for(;XL.length?this.clone().iadd(L):L.clone().iadd(this)},d.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var B=this.iadd(L);return L.negative=1,B._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var O=this.cmp(L);if(O===0)return this.negative=0,this.length=1,this.words[0]=0,this;var G,$;O>0?(G=this,$=L):(G=L,$=this);for(var X=0,Z=0;Z<$.length;Z++)B=(G.words[Z]|0)-($.words[Z]|0)+X,X=B>>26,this.words[Z]=B&67108863;for(;X!==0&&Z>26,this.words[Z]=B&67108863;if(X===0&&Z>>26,W=J&67108863,U=Math.min(N,L.length-1),V=Math.max(0,N-I.length+1);V<=U;V++){var j=N-V|0;G=I.words[j]|0,$=L.words[V]|0,X=G*$+W,H+=X/67108864|0,W=X&67108863}B.words[N]=W|0,J=H|0}return J!==0?B.words[N]=J|0:B.length--,B.strip()}var C=function(L,B,O){var G=L.words,$=B.words,X=O.words,Z=0,J,N,H,W=G[0]|0,U=W&8191,V=W>>>13,j=G[1]|0,q=j&8191,Y=j>>>13,K=G[2]|0,re=K&8191,se=K>>>13,le=G[3]|0,ue=le&8191,fe=le>>>13,pe=G[4]|0,we=pe&8191,xe=pe>>>13,he=G[5]|0,oe=he&8191,te=he>>>13,ie=G[6]|0,ee=ie&8191,ce=ie>>>13,_e=G[7]|0,Se=_e&8191,Me=_e>>>13,Ue=G[8]|0,Ge=Ue&8191,Ze=Ue>>>13,Ke=G[9]|0,dt=Ke&8191,_t=Ke>>>13,Pt=$[0]|0,vt=Pt&8191,Tt=Pt>>>13,st=$[1]|0,Ve=st&8191,Ye=st>>>13,me=$[2]|0,be=me&8191,Ee=me>>>13,De=$[3]|0,Ce=De&8191,Fe=De>>>13,Je=$[4]|0,qe=Je&8191,at=Je>>>13,tt=$[5]|0,ct=tt&8191,At=tt>>>13,ft=$[6]|0,qt=ft&8191,ar=ft>>>13,mt=$[7]|0,gt=mt&8191,St=mt>>>13,Dt=$[8]|0,kt=Dt&8191,Vt=Dt>>>13,lr=$[9]|0,dr=lr&8191,yr=lr>>>13;O.negative=L.negative^B.negative,O.length=19,J=Math.imul(U,vt),N=Math.imul(U,Tt),N=N+Math.imul(V,vt)|0,H=Math.imul(V,Tt);var vr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(vr>>>26)|0,vr&=67108863,J=Math.imul(q,vt),N=Math.imul(q,Tt),N=N+Math.imul(Y,vt)|0,H=Math.imul(Y,Tt),J=J+Math.imul(U,Ve)|0,N=N+Math.imul(U,Ye)|0,N=N+Math.imul(V,Ve)|0,H=H+Math.imul(V,Ye)|0;var Fr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,J=Math.imul(re,vt),N=Math.imul(re,Tt),N=N+Math.imul(se,vt)|0,H=Math.imul(se,Tt),J=J+Math.imul(q,Ve)|0,N=N+Math.imul(q,Ye)|0,N=N+Math.imul(Y,Ve)|0,H=H+Math.imul(Y,Ye)|0,J=J+Math.imul(U,be)|0,N=N+Math.imul(U,Ee)|0,N=N+Math.imul(V,be)|0,H=H+Math.imul(V,Ee)|0;var la=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(la>>>26)|0,la&=67108863,J=Math.imul(ue,vt),N=Math.imul(ue,Tt),N=N+Math.imul(fe,vt)|0,H=Math.imul(fe,Tt),J=J+Math.imul(re,Ve)|0,N=N+Math.imul(re,Ye)|0,N=N+Math.imul(se,Ve)|0,H=H+Math.imul(se,Ye)|0,J=J+Math.imul(q,be)|0,N=N+Math.imul(q,Ee)|0,N=N+Math.imul(Y,be)|0,H=H+Math.imul(Y,Ee)|0,J=J+Math.imul(U,Ce)|0,N=N+Math.imul(U,Fe)|0,N=N+Math.imul(V,Ce)|0,H=H+Math.imul(V,Fe)|0;var Hr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,J=Math.imul(we,vt),N=Math.imul(we,Tt),N=N+Math.imul(xe,vt)|0,H=Math.imul(xe,Tt),J=J+Math.imul(ue,Ve)|0,N=N+Math.imul(ue,Ye)|0,N=N+Math.imul(fe,Ve)|0,H=H+Math.imul(fe,Ye)|0,J=J+Math.imul(re,be)|0,N=N+Math.imul(re,Ee)|0,N=N+Math.imul(se,be)|0,H=H+Math.imul(se,Ee)|0,J=J+Math.imul(q,Ce)|0,N=N+Math.imul(q,Fe)|0,N=N+Math.imul(Y,Ce)|0,H=H+Math.imul(Y,Fe)|0,J=J+Math.imul(U,qe)|0,N=N+Math.imul(U,at)|0,N=N+Math.imul(V,qe)|0,H=H+Math.imul(V,at)|0;var jr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(jr>>>26)|0,jr&=67108863,J=Math.imul(oe,vt),N=Math.imul(oe,Tt),N=N+Math.imul(te,vt)|0,H=Math.imul(te,Tt),J=J+Math.imul(we,Ve)|0,N=N+Math.imul(we,Ye)|0,N=N+Math.imul(xe,Ve)|0,H=H+Math.imul(xe,Ye)|0,J=J+Math.imul(ue,be)|0,N=N+Math.imul(ue,Ee)|0,N=N+Math.imul(fe,be)|0,H=H+Math.imul(fe,Ee)|0,J=J+Math.imul(re,Ce)|0,N=N+Math.imul(re,Fe)|0,N=N+Math.imul(se,Ce)|0,H=H+Math.imul(se,Fe)|0,J=J+Math.imul(q,qe)|0,N=N+Math.imul(q,at)|0,N=N+Math.imul(Y,qe)|0,H=H+Math.imul(Y,at)|0,J=J+Math.imul(U,ct)|0,N=N+Math.imul(U,At)|0,N=N+Math.imul(V,ct)|0,H=H+Math.imul(V,At)|0;var Oa=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Oa>>>26)|0,Oa&=67108863,J=Math.imul(ee,vt),N=Math.imul(ee,Tt),N=N+Math.imul(ce,vt)|0,H=Math.imul(ce,Tt),J=J+Math.imul(oe,Ve)|0,N=N+Math.imul(oe,Ye)|0,N=N+Math.imul(te,Ve)|0,H=H+Math.imul(te,Ye)|0,J=J+Math.imul(we,be)|0,N=N+Math.imul(we,Ee)|0,N=N+Math.imul(xe,be)|0,H=H+Math.imul(xe,Ee)|0,J=J+Math.imul(ue,Ce)|0,N=N+Math.imul(ue,Fe)|0,N=N+Math.imul(fe,Ce)|0,H=H+Math.imul(fe,Fe)|0,J=J+Math.imul(re,qe)|0,N=N+Math.imul(re,at)|0,N=N+Math.imul(se,qe)|0,H=H+Math.imul(se,at)|0,J=J+Math.imul(q,ct)|0,N=N+Math.imul(q,At)|0,N=N+Math.imul(Y,ct)|0,H=H+Math.imul(Y,At)|0,J=J+Math.imul(U,qt)|0,N=N+Math.imul(U,ar)|0,N=N+Math.imul(V,qt)|0,H=H+Math.imul(V,ar)|0;var Da=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Da>>>26)|0,Da&=67108863,J=Math.imul(Se,vt),N=Math.imul(Se,Tt),N=N+Math.imul(Me,vt)|0,H=Math.imul(Me,Tt),J=J+Math.imul(ee,Ve)|0,N=N+Math.imul(ee,Ye)|0,N=N+Math.imul(ce,Ve)|0,H=H+Math.imul(ce,Ye)|0,J=J+Math.imul(oe,be)|0,N=N+Math.imul(oe,Ee)|0,N=N+Math.imul(te,be)|0,H=H+Math.imul(te,Ee)|0,J=J+Math.imul(we,Ce)|0,N=N+Math.imul(we,Fe)|0,N=N+Math.imul(xe,Ce)|0,H=H+Math.imul(xe,Fe)|0,J=J+Math.imul(ue,qe)|0,N=N+Math.imul(ue,at)|0,N=N+Math.imul(fe,qe)|0,H=H+Math.imul(fe,at)|0,J=J+Math.imul(re,ct)|0,N=N+Math.imul(re,At)|0,N=N+Math.imul(se,ct)|0,H=H+Math.imul(se,At)|0,J=J+Math.imul(q,qt)|0,N=N+Math.imul(q,ar)|0,N=N+Math.imul(Y,qt)|0,H=H+Math.imul(Y,ar)|0,J=J+Math.imul(U,gt)|0,N=N+Math.imul(U,St)|0,N=N+Math.imul(V,gt)|0,H=H+Math.imul(V,St)|0;var _i=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(_i>>>26)|0,_i&=67108863,J=Math.imul(Ge,vt),N=Math.imul(Ge,Tt),N=N+Math.imul(Ze,vt)|0,H=Math.imul(Ze,Tt),J=J+Math.imul(Se,Ve)|0,N=N+Math.imul(Se,Ye)|0,N=N+Math.imul(Me,Ve)|0,H=H+Math.imul(Me,Ye)|0,J=J+Math.imul(ee,be)|0,N=N+Math.imul(ee,Ee)|0,N=N+Math.imul(ce,be)|0,H=H+Math.imul(ce,Ee)|0,J=J+Math.imul(oe,Ce)|0,N=N+Math.imul(oe,Fe)|0,N=N+Math.imul(te,Ce)|0,H=H+Math.imul(te,Fe)|0,J=J+Math.imul(we,qe)|0,N=N+Math.imul(we,at)|0,N=N+Math.imul(xe,qe)|0,H=H+Math.imul(xe,at)|0,J=J+Math.imul(ue,ct)|0,N=N+Math.imul(ue,At)|0,N=N+Math.imul(fe,ct)|0,H=H+Math.imul(fe,At)|0,J=J+Math.imul(re,qt)|0,N=N+Math.imul(re,ar)|0,N=N+Math.imul(se,qt)|0,H=H+Math.imul(se,ar)|0,J=J+Math.imul(q,gt)|0,N=N+Math.imul(q,St)|0,N=N+Math.imul(Y,gt)|0,H=H+Math.imul(Y,St)|0,J=J+Math.imul(U,kt)|0,N=N+Math.imul(U,Vt)|0,N=N+Math.imul(V,kt)|0,H=H+Math.imul(V,Vt)|0;var ti=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(ti>>>26)|0,ti&=67108863,J=Math.imul(dt,vt),N=Math.imul(dt,Tt),N=N+Math.imul(_t,vt)|0,H=Math.imul(_t,Tt),J=J+Math.imul(Ge,Ve)|0,N=N+Math.imul(Ge,Ye)|0,N=N+Math.imul(Ze,Ve)|0,H=H+Math.imul(Ze,Ye)|0,J=J+Math.imul(Se,be)|0,N=N+Math.imul(Se,Ee)|0,N=N+Math.imul(Me,be)|0,H=H+Math.imul(Me,Ee)|0,J=J+Math.imul(ee,Ce)|0,N=N+Math.imul(ee,Fe)|0,N=N+Math.imul(ce,Ce)|0,H=H+Math.imul(ce,Fe)|0,J=J+Math.imul(oe,qe)|0,N=N+Math.imul(oe,at)|0,N=N+Math.imul(te,qe)|0,H=H+Math.imul(te,at)|0,J=J+Math.imul(we,ct)|0,N=N+Math.imul(we,At)|0,N=N+Math.imul(xe,ct)|0,H=H+Math.imul(xe,At)|0,J=J+Math.imul(ue,qt)|0,N=N+Math.imul(ue,ar)|0,N=N+Math.imul(fe,qt)|0,H=H+Math.imul(fe,ar)|0,J=J+Math.imul(re,gt)|0,N=N+Math.imul(re,St)|0,N=N+Math.imul(se,gt)|0,H=H+Math.imul(se,St)|0,J=J+Math.imul(q,kt)|0,N=N+Math.imul(q,Vt)|0,N=N+Math.imul(Y,kt)|0,H=H+Math.imul(Y,Vt)|0,J=J+Math.imul(U,dr)|0,N=N+Math.imul(U,yr)|0,N=N+Math.imul(V,dr)|0,H=H+Math.imul(V,yr)|0;var Ka=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Ka>>>26)|0,Ka&=67108863,J=Math.imul(dt,Ve),N=Math.imul(dt,Ye),N=N+Math.imul(_t,Ve)|0,H=Math.imul(_t,Ye),J=J+Math.imul(Ge,be)|0,N=N+Math.imul(Ge,Ee)|0,N=N+Math.imul(Ze,be)|0,H=H+Math.imul(Ze,Ee)|0,J=J+Math.imul(Se,Ce)|0,N=N+Math.imul(Se,Fe)|0,N=N+Math.imul(Me,Ce)|0,H=H+Math.imul(Me,Fe)|0,J=J+Math.imul(ee,qe)|0,N=N+Math.imul(ee,at)|0,N=N+Math.imul(ce,qe)|0,H=H+Math.imul(ce,at)|0,J=J+Math.imul(oe,ct)|0,N=N+Math.imul(oe,At)|0,N=N+Math.imul(te,ct)|0,H=H+Math.imul(te,At)|0,J=J+Math.imul(we,qt)|0,N=N+Math.imul(we,ar)|0,N=N+Math.imul(xe,qt)|0,H=H+Math.imul(xe,ar)|0,J=J+Math.imul(ue,gt)|0,N=N+Math.imul(ue,St)|0,N=N+Math.imul(fe,gt)|0,H=H+Math.imul(fe,St)|0,J=J+Math.imul(re,kt)|0,N=N+Math.imul(re,Vt)|0,N=N+Math.imul(se,kt)|0,H=H+Math.imul(se,Vt)|0,J=J+Math.imul(q,dr)|0,N=N+Math.imul(q,yr)|0,N=N+Math.imul(Y,dr)|0,H=H+Math.imul(Y,yr)|0;var ia=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(ia>>>26)|0,ia&=67108863,J=Math.imul(dt,be),N=Math.imul(dt,Ee),N=N+Math.imul(_t,be)|0,H=Math.imul(_t,Ee),J=J+Math.imul(Ge,Ce)|0,N=N+Math.imul(Ge,Fe)|0,N=N+Math.imul(Ze,Ce)|0,H=H+Math.imul(Ze,Fe)|0,J=J+Math.imul(Se,qe)|0,N=N+Math.imul(Se,at)|0,N=N+Math.imul(Me,qe)|0,H=H+Math.imul(Me,at)|0,J=J+Math.imul(ee,ct)|0,N=N+Math.imul(ee,At)|0,N=N+Math.imul(ce,ct)|0,H=H+Math.imul(ce,At)|0,J=J+Math.imul(oe,qt)|0,N=N+Math.imul(oe,ar)|0,N=N+Math.imul(te,qt)|0,H=H+Math.imul(te,ar)|0,J=J+Math.imul(we,gt)|0,N=N+Math.imul(we,St)|0,N=N+Math.imul(xe,gt)|0,H=H+Math.imul(xe,St)|0,J=J+Math.imul(ue,kt)|0,N=N+Math.imul(ue,Vt)|0,N=N+Math.imul(fe,kt)|0,H=H+Math.imul(fe,Vt)|0,J=J+Math.imul(re,dr)|0,N=N+Math.imul(re,yr)|0,N=N+Math.imul(se,dr)|0,H=H+Math.imul(se,yr)|0;var na=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(na>>>26)|0,na&=67108863,J=Math.imul(dt,Ce),N=Math.imul(dt,Fe),N=N+Math.imul(_t,Ce)|0,H=Math.imul(_t,Fe),J=J+Math.imul(Ge,qe)|0,N=N+Math.imul(Ge,at)|0,N=N+Math.imul(Ze,qe)|0,H=H+Math.imul(Ze,at)|0,J=J+Math.imul(Se,ct)|0,N=N+Math.imul(Se,At)|0,N=N+Math.imul(Me,ct)|0,H=H+Math.imul(Me,At)|0,J=J+Math.imul(ee,qt)|0,N=N+Math.imul(ee,ar)|0,N=N+Math.imul(ce,qt)|0,H=H+Math.imul(ce,ar)|0,J=J+Math.imul(oe,gt)|0,N=N+Math.imul(oe,St)|0,N=N+Math.imul(te,gt)|0,H=H+Math.imul(te,St)|0,J=J+Math.imul(we,kt)|0,N=N+Math.imul(we,Vt)|0,N=N+Math.imul(xe,kt)|0,H=H+Math.imul(xe,Vt)|0,J=J+Math.imul(ue,dr)|0,N=N+Math.imul(ue,yr)|0,N=N+Math.imul(fe,dr)|0,H=H+Math.imul(fe,yr)|0;var xi=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(xi>>>26)|0,xi&=67108863,J=Math.imul(dt,qe),N=Math.imul(dt,at),N=N+Math.imul(_t,qe)|0,H=Math.imul(_t,at),J=J+Math.imul(Ge,ct)|0,N=N+Math.imul(Ge,At)|0,N=N+Math.imul(Ze,ct)|0,H=H+Math.imul(Ze,At)|0,J=J+Math.imul(Se,qt)|0,N=N+Math.imul(Se,ar)|0,N=N+Math.imul(Me,qt)|0,H=H+Math.imul(Me,ar)|0,J=J+Math.imul(ee,gt)|0,N=N+Math.imul(ee,St)|0,N=N+Math.imul(ce,gt)|0,H=H+Math.imul(ce,St)|0,J=J+Math.imul(oe,kt)|0,N=N+Math.imul(oe,Vt)|0,N=N+Math.imul(te,kt)|0,H=H+Math.imul(te,Vt)|0,J=J+Math.imul(we,dr)|0,N=N+Math.imul(we,yr)|0,N=N+Math.imul(xe,dr)|0,H=H+Math.imul(xe,yr)|0;var Yi=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,J=Math.imul(dt,ct),N=Math.imul(dt,At),N=N+Math.imul(_t,ct)|0,H=Math.imul(_t,At),J=J+Math.imul(Ge,qt)|0,N=N+Math.imul(Ge,ar)|0,N=N+Math.imul(Ze,qt)|0,H=H+Math.imul(Ze,ar)|0,J=J+Math.imul(Se,gt)|0,N=N+Math.imul(Se,St)|0,N=N+Math.imul(Me,gt)|0,H=H+Math.imul(Me,St)|0,J=J+Math.imul(ee,kt)|0,N=N+Math.imul(ee,Vt)|0,N=N+Math.imul(ce,kt)|0,H=H+Math.imul(ce,Vt)|0,J=J+Math.imul(oe,dr)|0,N=N+Math.imul(oe,yr)|0,N=N+Math.imul(te,dr)|0,H=H+Math.imul(te,yr)|0;var Qr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,J=Math.imul(dt,qt),N=Math.imul(dt,ar),N=N+Math.imul(_t,qt)|0,H=Math.imul(_t,ar),J=J+Math.imul(Ge,gt)|0,N=N+Math.imul(Ge,St)|0,N=N+Math.imul(Ze,gt)|0,H=H+Math.imul(Ze,St)|0,J=J+Math.imul(Se,kt)|0,N=N+Math.imul(Se,Vt)|0,N=N+Math.imul(Me,kt)|0,H=H+Math.imul(Me,Vt)|0,J=J+Math.imul(ee,dr)|0,N=N+Math.imul(ee,yr)|0,N=N+Math.imul(ce,dr)|0,H=H+Math.imul(ce,yr)|0;var Nr=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,J=Math.imul(dt,gt),N=Math.imul(dt,St),N=N+Math.imul(_t,gt)|0,H=Math.imul(_t,St),J=J+Math.imul(Ge,kt)|0,N=N+Math.imul(Ge,Vt)|0,N=N+Math.imul(Ze,kt)|0,H=H+Math.imul(Ze,Vt)|0,J=J+Math.imul(Se,dr)|0,N=N+Math.imul(Se,yr)|0,N=N+Math.imul(Me,dr)|0,H=H+Math.imul(Me,yr)|0;var Oe=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,J=Math.imul(dt,kt),N=Math.imul(dt,Vt),N=N+Math.imul(_t,kt)|0,H=Math.imul(_t,Vt),J=J+Math.imul(Ge,dr)|0,N=N+Math.imul(Ge,yr)|0,N=N+Math.imul(Ze,dr)|0,H=H+Math.imul(Ze,yr)|0;var Ie=(Z+J|0)+((N&8191)<<13)|0;Z=(H+(N>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,J=Math.imul(dt,dr),N=Math.imul(dt,yr),N=N+Math.imul(_t,dr)|0,H=Math.imul(_t,yr);var Et=(Z+J|0)+((N&8191)<<13)|0;return Z=(H+(N>>>13)|0)+(Et>>>26)|0,Et&=67108863,X[0]=vr,X[1]=Fr,X[2]=la,X[3]=Hr,X[4]=jr,X[5]=Oa,X[6]=Da,X[7]=_i,X[8]=ti,X[9]=Ka,X[10]=ia,X[11]=na,X[12]=xi,X[13]=Yi,X[14]=Qr,X[15]=Nr,X[16]=Oe,X[17]=Ie,X[18]=Et,Z!==0&&(X[19]=Z,O.length++),O};Math.imul||(C=M);function w(I,L,B){B.negative=L.negative^I.negative,B.length=I.length+L.length;for(var O=0,G=0,$=0;$>>26)|0,G+=X>>>26,X&=67108863}B.words[$]=Z,O=X,X=G}return O!==0?B.words[$]=O:B.length--,B.strip()}function k(I,L,B){var O=new T;return O.mulp(I,L,B)}d.prototype.mulTo=function(L,B){var O,G=this.length+L.length;return this.length===10&&L.length===10?O=C(this,L,B):G<63?O=M(this,L,B):G<1024?O=w(this,L,B):O=k(this,L,B),O};function T(I,L){this.x=I,this.y=L}T.prototype.makeRBT=function(L){for(var B=new Array(L),O=d.prototype._countBits(L)-1,G=0;G>=1;return G},T.prototype.permute=function(L,B,O,G,$,X){for(var Z=0;Z>>1)$++;return 1<<$+1+G},T.prototype.conjugate=function(L,B,O){if(!(O<=1))for(var G=0;G>>13,O[2*X+1]=$&8191,$=$>>>13;for(X=2*B;X>=26,B+=G/67108864|0,B+=$>>>26,this.words[O]=$&67108863}return B!==0&&(this.words[O]=B,this.length++),L===0&&(this.length=1,this._normSign()),this},d.prototype.muln=function(L){return this.clone().imuln(L)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(L){var B=E(L);if(B.length===0)return new d(1);for(var O=this,G=0;G=0);var B=L%26,O=(L-B)/26,G=67108863>>>26-B<<26-B,$;if(B!==0){var X=0;for($=0;$>>26-B}X&&(this.words[$]=X,this.length++)}if(O!==0){for($=this.length-1;$>=0;$--)this.words[$+O]=this.words[$];for($=0;$=0);var G;B?G=(B-B%26)/26:G=0;var $=L%26,X=Math.min((L-$)/26,this.length),Z=67108863^67108863>>>$<<$,J=O;if(G-=X,G=Math.max(0,G),J){for(var N=0;NX)for(this.length-=X,N=0;N=0&&(H!==0||N>=G);N--){var W=this.words[N]|0;this.words[N]=H<<26-$|W>>>$,H=W&Z}return J&&H!==0&&(J.words[J.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(L,B,O){return f(this.negative===0),this.iushrn(L,B,O)},d.prototype.shln=function(L){return this.clone().ishln(L)},d.prototype.ushln=function(L){return this.clone().iushln(L)},d.prototype.shrn=function(L){return this.clone().ishrn(L)},d.prototype.ushrn=function(L){return this.clone().iushrn(L)},d.prototype.testn=function(L){f(typeof L=="number"&&L>=0);var B=L%26,O=(L-B)/26,G=1<=0);var B=L%26,O=(L-B)/26;if(f(this.negative===0,"imaskn works only with positive numbers"),this.length<=O)return this;if(B!==0&&O++,this.length=Math.min(O,this.length),B!==0){var G=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},d.prototype.isubn=function(L){if(f(typeof L=="number"),f(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(J/67108864|0),this.words[$+O]=X&67108863}for(;$>26,this.words[$+O]=X&67108863;if(Z===0)return this.strip();for(f(Z===-1),Z=0,$=0;$>26,this.words[$]=X&67108863;return this.negative=1,this.strip()},d.prototype._wordDiv=function(L,B){var O=this.length-L.length,G=this.clone(),$=L,X=$.words[$.length-1]|0,Z=this._countBits(X);O=26-Z,O!==0&&($=$.ushln(O),G.iushln(O),X=$.words[$.length-1]|0);var J=G.length-$.length,N;if(B!=="mod"){N=new d(null),N.length=J+1,N.words=new Array(N.length);for(var H=0;H=0;U--){var V=(G.words[$.length+U]|0)*67108864+(G.words[$.length+U-1]|0);for(V=Math.min(V/X|0,67108863),G._ishlnsubmul($,V,U);G.negative!==0;)V--,G.negative=0,G._ishlnsubmul($,1,U),G.isZero()||(G.negative^=1);N&&(N.words[U]=V)}return N&&N.strip(),G.strip(),B!=="div"&&O!==0&&G.iushrn(O),{div:N||null,mod:G}},d.prototype.divmod=function(L,B,O){if(f(!L.isZero()),this.isZero())return{div:new d(0),mod:new d(0)};var G,$,X;return this.negative!==0&&L.negative===0?(X=this.neg().divmod(L,B),B!=="mod"&&(G=X.div.neg()),B!=="div"&&($=X.mod.neg(),O&&$.negative!==0&&$.iadd(L)),{div:G,mod:$}):this.negative===0&&L.negative!==0?(X=this.divmod(L.neg(),B),B!=="mod"&&(G=X.div.neg()),{div:G,mod:X.mod}):(this.negative&L.negative)!==0?(X=this.neg().divmod(L.neg(),B),B!=="div"&&($=X.mod.neg(),O&&$.negative!==0&&$.isub(L)),{div:X.div,mod:$}):L.length>this.length||this.cmp(L)<0?{div:new d(0),mod:this}:L.length===1?B==="div"?{div:this.divn(L.words[0]),mod:null}:B==="mod"?{div:null,mod:new d(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new d(this.modn(L.words[0]))}:this._wordDiv(L,B)},d.prototype.div=function(L){return this.divmod(L,"div",!1).div},d.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},d.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},d.prototype.divRound=function(L){var B=this.divmod(L);if(B.mod.isZero())return B.div;var O=B.mod.abs(),G=L.abs().iushrn(1),$=L.words[0]&1,X=O.cmp(G);if(X<0||$===1&&X===0)return B.div;var Z=new d(1);return Z.negative=this.negative^L.negative,B.div.iadd(Z)},d.prototype.modn=function(L){f(L<=67108863);for(var B=(1<<26)%L,O=0,G=this.length-1;G>=0;G--)O=(B*O+(this.words[G]|0))%L;return O},d.prototype.idivn=function(L){f(L<=67108863);for(var B=0,O=this.length-1;O>=0;O--){var G=(this.words[O]|0)+B*67108864;this.words[O]=G/L|0,B=G%L}return this.strip()},d.prototype.divn=function(L){return this.clone().idivn(L)},d.prototype.egcd=function(L){f(L.negative===0),f(!L.isZero());var B=this,O=L.clone();B.negative!==0?B=B.umod(L):B=B.clone();for(var G=new d(1),$=new d(0),X=new d(0),Z=new d(1),J=0;B.isEven()&&O.isEven();)B.iushrn(1),O.iushrn(1),++J;for(var N=O.clone(),H=B.clone();!B.isZero();){for(var W=0,U=1;(B.words[0]&U)===0&&W<26;++W,U<<=1);if(W>0)for(B.iushrn(W);W-- >0;)(G.isOdd()||$.isOdd())&&(G.iadd(N),$.isub(H)),G.iushrn(1),$.iushrn(1);for(var V=0,j=1;(O.words[0]&j)===0&&V<26;++V,j<<=1);if(V>0)for(O.iushrn(V);V-- >0;)(X.isOdd()||Z.isOdd())&&(X.iadd(N),Z.isub(H)),X.iushrn(1),Z.iushrn(1);B.cmp(O)>=0?(B.isub(O),G.isub(X),$.isub(Z)):(O.isub(B),X.isub(G),Z.isub($))}return{a:X,b:Z,gcd:O.iushln(J)}},d.prototype._invmp=function(L){f(L.negative===0),f(!L.isZero());var B=this,O=L.clone();B.negative!==0?B=B.umod(L):B=B.clone();for(var G=new d(1),$=new d(0),X=O.clone();B.cmpn(1)>0&&O.cmpn(1)>0;){for(var Z=0,J=1;(B.words[0]&J)===0&&Z<26;++Z,J<<=1);if(Z>0)for(B.iushrn(Z);Z-- >0;)G.isOdd()&&G.iadd(X),G.iushrn(1);for(var N=0,H=1;(O.words[0]&H)===0&&N<26;++N,H<<=1);if(N>0)for(O.iushrn(N);N-- >0;)$.isOdd()&&$.iadd(X),$.iushrn(1);B.cmp(O)>=0?(B.isub(O),G.isub($)):(O.isub(B),$.isub(G))}var W;return B.cmpn(1)===0?W=G:W=$,W.cmpn(0)<0&&W.iadd(L),W},d.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var B=this.clone(),O=L.clone();B.negative=0,O.negative=0;for(var G=0;B.isEven()&&O.isEven();G++)B.iushrn(1),O.iushrn(1);do{for(;B.isEven();)B.iushrn(1);for(;O.isEven();)O.iushrn(1);var $=B.cmp(O);if($<0){var X=B;B=O,O=X}else if($===0||O.cmpn(1)===0)break;B.isub(O)}while(!0);return O.iushln(G)},d.prototype.invm=function(L){return this.egcd(L).a.umod(L)},d.prototype.isEven=function(){return(this.words[0]&1)===0},d.prototype.isOdd=function(){return(this.words[0]&1)===1},d.prototype.andln=function(L){return this.words[0]&L},d.prototype.bincn=function(L){f(typeof L=="number");var B=L%26,O=(L-B)/26,G=1<>>26,Z&=67108863,this.words[X]=Z}return $!==0&&(this.words[X]=$,this.length++),this},d.prototype.isZero=function(){return this.length===1&&this.words[0]===0},d.prototype.cmpn=function(L){var B=L<0;if(this.negative!==0&&!B)return-1;if(this.negative===0&&B)return 1;this.strip();var O;if(this.length>1)O=1;else{B&&(L=-L),f(L<=67108863,"Number is too big");var G=this.words[0]|0;O=G===L?0:GL.length)return 1;if(this.length=0;O--){var G=this.words[O]|0,$=L.words[O]|0;if(G!==$){G<$?B=-1:G>$&&(B=1);break}}return B},d.prototype.gtn=function(L){return this.cmpn(L)===1},d.prototype.gt=function(L){return this.cmp(L)===1},d.prototype.gten=function(L){return this.cmpn(L)>=0},d.prototype.gte=function(L){return this.cmp(L)>=0},d.prototype.ltn=function(L){return this.cmpn(L)===-1},d.prototype.lt=function(L){return this.cmp(L)===-1},d.prototype.lten=function(L){return this.cmpn(L)<=0},d.prototype.lte=function(L){return this.cmp(L)<=0},d.prototype.eqn=function(L){return this.cmpn(L)===0},d.prototype.eq=function(L){return this.cmp(L)===0},d.red=function(L){return new P(L)},d.prototype.toRed=function(L){return f(!this.red,"Already a number in reduction context"),f(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},d.prototype.fromRed=function(){return f(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(L){return this.red=L,this},d.prototype.forceRed=function(L){return f(!this.red,"Already a number in reduction context"),this._forceRed(L)},d.prototype.redAdd=function(L){return f(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},d.prototype.redIAdd=function(L){return f(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},d.prototype.redSub=function(L){return f(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},d.prototype.redISub=function(L){return f(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},d.prototype.redShl=function(L){return f(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},d.prototype.redMul=function(L){return f(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},d.prototype.redIMul=function(L){return f(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},d.prototype.redSqr=function(){return f(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return f(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return f(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return f(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return f(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(L){return f(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var b={k256:null,p224:null,p192:null,p25519:null};function S(I,L){this.name=I,this.p=new d(L,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}S.prototype._tmp=function(){var L=new d(null);return L.words=new Array(Math.ceil(this.n/13)),L},S.prototype.ireduce=function(L){var B=L,O;do this.split(B,this.tmp),B=this.imulK(B),B=B.iadd(this.tmp),O=B.bitLength();while(O>this.n);var G=O0?B.isub(this.p):B.strip!==void 0?B.strip():B._strip(),B},S.prototype.split=function(L,B){L.iushrn(this.n,0,B)},S.prototype.imulK=function(L){return L.imul(this.k)};function A(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}h(A,S),A.prototype.split=function(L,B){for(var O=4194303,G=Math.min(L.length,9),$=0;$>>22,X=Z}X>>>=22,L.words[$-10]=X,X===0&&L.length>10?L.length-=10:L.length-=9},A.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var B=0,O=0;O>>=26,L.words[O]=$,B=G}return B!==0&&(L.words[L.length++]=B),L},d._prime=function(L){if(b[L])return b[L];var B;if(L==="k256")B=new A;else if(L==="p224")B=new F;else if(L==="p192")B=new D;else if(L==="p25519")B=new R;else throw new Error("Unknown prime "+L);return b[L]=B,B};function P(I){if(typeof I=="string"){var L=d._prime(I);this.m=L.p,this.prime=L}else f(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}P.prototype._verify1=function(L){f(L.negative===0,"red works only with positives"),f(L.red,"red works only with red numbers")},P.prototype._verify2=function(L,B){f((L.negative|B.negative)===0,"red works only with positives"),f(L.red&&L.red===B.red,"red works only with red numbers")},P.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},P.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},P.prototype.add=function(L,B){this._verify2(L,B);var O=L.add(B);return O.cmp(this.m)>=0&&O.isub(this.m),O._forceRed(this)},P.prototype.iadd=function(L,B){this._verify2(L,B);var O=L.iadd(B);return O.cmp(this.m)>=0&&O.isub(this.m),O},P.prototype.sub=function(L,B){this._verify2(L,B);var O=L.sub(B);return O.cmpn(0)<0&&O.iadd(this.m),O._forceRed(this)},P.prototype.isub=function(L,B){this._verify2(L,B);var O=L.isub(B);return O.cmpn(0)<0&&O.iadd(this.m),O},P.prototype.shl=function(L,B){return this._verify1(L),this.imod(L.ushln(B))},P.prototype.imul=function(L,B){return this._verify2(L,B),this.imod(L.imul(B))},P.prototype.mul=function(L,B){return this._verify2(L,B),this.imod(L.mul(B))},P.prototype.isqr=function(L){return this.imul(L,L.clone())},P.prototype.sqr=function(L){return this.mul(L,L)},P.prototype.sqrt=function(L){if(L.isZero())return L.clone();var B=this.m.andln(3);if(f(B%2===1),B===3){var O=this.m.add(new d(1)).iushrn(2);return this.pow(L,O)}for(var G=this.m.subn(1),$=0;!G.isZero()&&G.andln(1)===0;)$++,G.iushrn(1);f(!G.isZero());var X=new d(1).toRed(this),Z=X.redNeg(),J=this.m.subn(1).iushrn(1),N=this.m.bitLength();for(N=new d(2*N*N).toRed(this);this.pow(N,J).cmp(Z)!==0;)N.redIAdd(Z);for(var H=this.pow(N,G),W=this.pow(L,G.addn(1).iushrn(1)),U=this.pow(L,G),V=$;U.cmp(X)!==0;){for(var j=U,q=0;j.cmp(X)!==0;q++)j=j.redSqr();f(q=0;$--){for(var H=B.words[$],W=N-1;W>=0;W--){var U=H>>W&1;if(X!==G[0]&&(X=this.sqr(X)),U===0&&Z===0){J=0;continue}Z<<=1,Z|=U,J++,!(J!==O&&($!==0||W!==0))&&(X=this.mul(X,G[Z]),J=0,Z=0)}N=26}return X},P.prototype.convertTo=function(L){var B=L.umod(this.m);return B===L?B.clone():B},P.prototype.convertFrom=function(L){var B=L.clone();return B.red=null,B},d.mont=function(L){return new z(L)};function z(I){P.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new d(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)}h(z,P),z.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},z.prototype.convertFrom=function(L){var B=this.imod(L.mul(this.rinv));return B.red=null,B},z.prototype.imul=function(L,B){if(L.isZero()||B.isZero())return L.words[0]=0,L.length=1,L;var O=L.imul(B),G=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=O.isub(G).iushrn(this.shift),X=$;return $.cmp(this.m)>=0?X=$.isub(this.m):$.cmpn(0)<0&&(X=$.iadd(this.m)),X._forceRed(this)},z.prototype.mul=function(L,B){if(L.isZero()||B.isZero())return new d(0)._forceRed(this);var O=L.mul(B),G=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=O.isub(G).iushrn(this.shift),X=$;return $.cmp(this.m)>=0?X=$.isub(this.m):$.cmpn(0)<0&&(X=$.iadd(this.m)),X._forceRed(this)},z.prototype.invm=function(L){var B=this.imod(L._invmp(this.m).mul(this.r2));return B._forceRed(this)}})(s,this)},6204(s){"use strict";s.exports=l;function l(n){var u,c,f,h=n.length,d=0;for(u=0;u>>1;if(!(T<=0)){var b,S=u.mallocDouble(2*T*w),A=u.mallocInt32(w);if(w=d(x,T,S,A),w>0){if(T===1&&C)c.init(w),b=c.sweepComplete(T,M,0,w,S,A,0,w,S,A);else{var F=u.mallocDouble(2*T*k),D=u.mallocInt32(k);k=d(E,T,F,D),k>0&&(c.init(w+k),T===1?b=c.sweepBipartite(T,M,0,w,S,A,0,k,F,D):b=f(T,M,C,w,S,A,k,F,D),u.free(F),u.free(D))}u.free(S),u.free(A)}return b}}}var g;function m(x,E){g.push([x,E])}function y(x){return g=[],p(x,x,m,!0),g}function _(x,E){return g=[],p(x,E,m,!1),g}function v(x,E,M){switch(arguments.length){case 1:return y(x);case 2:return typeof E=="function"?p(x,x,E,!0):_(x,E);case 3:return p(x,E,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455(s,l){"use strict";function n(){function f(p,g,m,y,_,v,x,E,M,C,w){for(var k=2*p,T=y,b=k*y;T<_;++T,b+=k){var S=v[g+b],A=v[g+b+p],F=x[T];e:for(var D=E,R=k*E;DM-E?f(p,g,m,y,_,v,x,E,M,C,w):h(p,g,m,y,_,v,x,E,M,C,w)}return d}function u(){function f(m,y,_,v,x,E,M,C,w,k,T){for(var b=2*m,S=v,A=b*v;Sk-w?v?f(m,y,_,x,E,M,C,w,k,T,b):h(m,y,_,x,E,M,C,w,k,T,b):v?d(m,y,_,x,E,M,C,w,k,T,b):p(m,y,_,x,E,M,C,w,k,T,b)}return g}function c(f){return f?n():u()}l.partial=c(!1),l.full=c(!0)},7150(s,l,n){"use strict";s.exports=I;var u=n(1888),c=n(8828),f=n(2455),h=f.partial,d=f.full,p=n(855),g=n(3545),m=n(8105),y=128,_=1<<22,v=1<<22,x=m("!(lo>=p0)&&!(p1>=hi)"),E=m("lo===p0"),M=m("lo0;){H-=1;var V=H*T,j=A[V],q=A[V+1],Y=A[V+2],K=A[V+3],re=A[V+4],se=A[V+5],le=H*b,ue=F[le],fe=F[le+1],pe=se&1,we=!!(se&16),xe=$,he=X,oe=J,te=N;if(pe&&(xe=J,he=N,oe=$,te=X),!(se&2&&(Y=M(L,j,q,Y,xe,he,fe),q>=Y))&&!(se&4&&(q=C(L,j,q,Y,xe,he,ue),q>=Y))){var ie=Y-q,ee=re-K;if(we){if(L*ie*(ie+ee)m&&_[k+g]>C;--w,k-=x){for(var T=k,b=k+x,S=0;S>>1,C=2*p,w=M,k=_[C*M+g];x=F?(w=A,k=F):S>=R?(w=b,k=S):(w=D,k=R):F>=R?(w=A,k=F):R>=S?(w=b,k=S):(w=D,k=R);for(var I=C*(E-1),L=C*w,P=0;P=p0)&&!(p1>=hi)":g};function n(m){return l[m]}function u(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+b];if(F===M)if(T===A)T+=1,k+=C;else{for(var D=0;C>D;++D){var R=x[w+D];x[w+D]=x[k],x[k++]=R}var P=E[A];E[A]=E[T],E[T++]=P}}return T}function c(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+b];if(FD;++D){var R=x[w+D];x[w+D]=x[k],x[k++]=R}var P=E[A];E[A]=E[T],E[T++]=P}}return T}function f(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+S];if(F<=M)if(T===A)T+=1,k+=C;else{for(var D=0;C>D;++D){var R=x[w+D];x[w+D]=x[k],x[k++]=R}var P=E[A];E[A]=E[T],E[T++]=P}}return T}function h(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+S];if(F<=M)if(T===A)T+=1,k+=C;else{for(var D=0;C>D;++D){var R=x[w+D];x[w+D]=x[k],x[k++]=R}var P=E[A];E[A]=E[T],E[T++]=P}}return T}function d(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+b],D=x[w+S];if(F<=M&&M<=D)if(T===A)T+=1,k+=C;else{for(var R=0;C>R;++R){var P=x[w+R];x[w+R]=x[k],x[k++]=P}var z=E[A];E[A]=E[T],E[T++]=z}}return T}function p(m,y,_,v,x,E,M){for(var C=2*m,w=C*_,k=w,T=_,b=y,S=m+y,A=_;v>A;++A,w+=C){var F=x[w+b],D=x[w+S];if(FR;++R){var P=x[w+R];x[w+R]=x[k],x[k++]=P}var z=E[A];E[A]=E[T],E[T++]=z}}return T}function g(m,y,_,v,x,E,M,C){for(var w=2*m,k=w*_,T=k,b=_,S=y,A=m+y,F=_;v>F;++F,k+=w){var D=x[k+S],R=x[k+A];if(!(D>=M)&&!(C>=R))if(b===F)b+=1,T+=w;else{for(var P=0;w>P;++P){var z=x[k+P];x[k+P]=x[T],x[T++]=z}var I=E[F];E[F]=E[b],E[b++]=I}}return b}},4192(s){"use strict";s.exports=n;var l=32;function n(y,_){_<=4*l?u(0,_-1,y):m(0,_-1,y)}function u(y,_,v){for(var x=2*(y+1),E=y+1;E<=_;++E){for(var M=v[x++],C=v[x++],w=E,k=x-2;w-- >y;){var T=v[k-2],b=v[k-1];if(Tv[_+1]:!0}function g(y,_,v,x){y*=2;var E=x[y];return E<_?!0:E===_?x[y+1]>1,w=C-x,k=C+x,T=E,b=w,S=C,A=k,F=M,D=y+1,R=_-1,P=0;p(T,b,v)&&(P=T,T=b,b=P),p(A,F,v)&&(P=A,A=F,F=P),p(T,S,v)&&(P=T,T=S,S=P),p(b,S,v)&&(P=b,b=S,S=P),p(T,A,v)&&(P=T,T=A,A=P),p(S,A,v)&&(P=S,S=A,A=P),p(b,F,v)&&(P=b,b=F,F=P),p(b,S,v)&&(P=b,b=S,S=P),p(A,F,v)&&(P=A,A=F,F=P);for(var z=v[2*b],I=v[2*b+1],L=v[2*A],B=v[2*A+1],O=2*T,G=2*S,$=2*F,X=2*E,Z=2*C,J=2*M,N=0;N<2;++N){var H=v[O+N],W=v[G+N],U=v[$+N];v[X+N]=H,v[Z+N]=W,v[J+N]=U}f(w,y,v),f(k,_,v);for(var V=D;V<=R;++V)if(g(V,z,I,v))V!==D&&c(V,D,v),++D;else if(!g(V,L,B,v))for(;;)if(g(R,L,B,v)){g(R,z,I,v)?(h(V,D,R,v),++D,--R):(c(V,R,v),--R);break}else{if(--R>>1;f(x,W);for(var U=0,V=0,Z=0;Z=h)j=j-h|0,M(m,y,V--,j);else if(j>=0)M(p,g,U--,j);else if(j<=-h){j=-j-h|0;for(var q=0;q>>1;f(x,W);for(var U=0,V=0,j=0,Z=0;Z>1===x[2*Z+3]>>1&&(Y=2,Z+=1),q<0){for(var K=-(q>>1)-1,re=0;re>1)-1;Y===0?M(p,g,U--,K):Y===1?M(m,y,V--,K):Y===2&&M(_,v,j--,K)}}}function T(S,A,F,D,R,P,z,I,L,B,O,G){var $=0,X=2*S,Z=A,J=A+S,N=1,H=1;D?H=h:N=h;for(var W=R;W>>1;f(x,q);for(var Y=0,W=0;W=h?(re=!D,U-=h):(re=!!D,U-=1),re)C(p,g,Y++,U);else{var se=G[U],le=X*U,ue=O[le+A+1],fe=O[le+A+1+S];e:for(var pe=0;pe>>1;f(x,U);for(var V=0,J=0;J=h)p[V++]=N-h;else{N-=1;var q=O[N],Y=$*N,K=B[Y+A+1],re=B[Y+A+1+S];e:for(var se=0;se=0;--se)if(p[se]===N){for(var pe=se+1;ped)throw new RangeError('The value "'+he+'" is invalid for option "size"');var oe=new Uint8Array(he);return Object.setPrototypeOf(oe,m.prototype),oe}function m(he,oe,te){if(typeof he=="number"){if(typeof oe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return x(he)}return y(he,oe,te)}m.poolSize=8192;function y(he,oe,te){if(typeof he=="string")return E(he,oe);if(ArrayBuffer.isView(he))return C(he);if(he==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he);if(pe(he,ArrayBuffer)||he&&pe(he.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(he,SharedArrayBuffer)||he&&pe(he.buffer,SharedArrayBuffer)))return w(he,oe,te);if(typeof he=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ie=he.valueOf&&he.valueOf();if(ie!=null&&ie!==he)return m.from(ie,oe,te);var ee=k(he);if(ee)return ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof he[Symbol.toPrimitive]=="function")return m.from(he[Symbol.toPrimitive]("string"),oe,te);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he)}m.from=function(he,oe,te){return y(he,oe,te)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function _(he){if(typeof he!="number")throw new TypeError('"size" argument must be of type number');if(he<0)throw new RangeError('The value "'+he+'" is invalid for option "size"')}function v(he,oe,te){return _(he),he<=0?g(he):oe!==void 0?typeof te=="string"?g(he).fill(oe,te):g(he).fill(oe):g(he)}m.alloc=function(he,oe,te){return v(he,oe,te)};function x(he){return _(he),g(he<0?0:T(he)|0)}m.allocUnsafe=function(he){return x(he)},m.allocUnsafeSlow=function(he){return x(he)};function E(he,oe){if((typeof oe!="string"||oe==="")&&(oe="utf8"),!m.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);var te=S(he,oe)|0,ie=g(te),ee=ie.write(he,oe);return ee!==te&&(ie=ie.slice(0,ee)),ie}function M(he){for(var oe=he.length<0?0:T(he.length)|0,te=g(oe),ie=0;ie=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return he|0}function b(he){return+he!=he&&(he=0),m.alloc(+he)}m.isBuffer=function(oe){return oe!=null&&oe._isBuffer===!0&&oe!==m.prototype},m.compare=function(oe,te){if(pe(oe,Uint8Array)&&(oe=m.from(oe,oe.offset,oe.byteLength)),pe(te,Uint8Array)&&(te=m.from(te,te.offset,te.byteLength)),!m.isBuffer(oe)||!m.isBuffer(te))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(oe===te)return 0;for(var ie=oe.length,ee=te.length,ce=0,_e=Math.min(ie,ee);ce<_e;++ce)if(oe[ce]!==te[ce]){ie=oe[ce],ee=te[ce];break}return ieee.length?m.from(_e).copy(ee,ce):Uint8Array.prototype.set.call(ee,_e,ce);else if(m.isBuffer(_e))_e.copy(ee,ce);else throw new TypeError('"list" argument must be an Array of Buffers');ce+=_e.length}return ee};function S(he,oe){if(m.isBuffer(he))return he.length;if(ArrayBuffer.isView(he)||pe(he,ArrayBuffer))return he.byteLength;if(typeof he!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof he);var te=he.length,ie=arguments.length>2&&arguments[2]===!0;if(!ie&&te===0)return 0;for(var ee=!1;;)switch(oe){case"ascii":case"latin1":case"binary":return te;case"utf8":case"utf-8":return re(he).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te*2;case"hex":return te>>>1;case"base64":return ue(he).length;default:if(ee)return ie?-1:re(he).length;oe=(""+oe).toLowerCase(),ee=!0}}m.byteLength=S;function A(he,oe,te){var ie=!1;if((oe===void 0||oe<0)&&(oe=0),oe>this.length||((te===void 0||te>this.length)&&(te=this.length),te<=0)||(te>>>=0,oe>>>=0,te<=oe))return"";for(he||(he="utf8");;)switch(he){case"hex":return N(this,oe,te);case"utf8":case"utf-8":return G(this,oe,te);case"ascii":return Z(this,oe,te);case"latin1":case"binary":return J(this,oe,te);case"base64":return O(this,oe,te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,oe,te);default:if(ie)throw new TypeError("Unknown encoding: "+he);he=(he+"").toLowerCase(),ie=!0}}m.prototype._isBuffer=!0;function F(he,oe,te){var ie=he[oe];he[oe]=he[te],he[te]=ie}m.prototype.swap16=function(){var oe=this.length;if(oe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var te=0;tete&&(oe+=" ... "),""},h&&(m.prototype[h]=m.prototype.inspect),m.prototype.compare=function(oe,te,ie,ee,ce){if(pe(oe,Uint8Array)&&(oe=m.from(oe,oe.offset,oe.byteLength)),!m.isBuffer(oe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof oe);if(te===void 0&&(te=0),ie===void 0&&(ie=oe?oe.length:0),ee===void 0&&(ee=0),ce===void 0&&(ce=this.length),te<0||ie>oe.length||ee<0||ce>this.length)throw new RangeError("out of range index");if(ee>=ce&&te>=ie)return 0;if(ee>=ce)return-1;if(te>=ie)return 1;if(te>>>=0,ie>>>=0,ee>>>=0,ce>>>=0,this===oe)return 0;for(var _e=ce-ee,Se=ie-te,Me=Math.min(_e,Se),Ue=this.slice(ee,ce),Ge=oe.slice(te,ie),Ze=0;Ze2147483647?te=2147483647:te<-2147483648&&(te=-2147483648),te=+te,we(te)&&(te=ee?0:he.length-1),te<0&&(te=he.length+te),te>=he.length){if(ee)return-1;te=he.length-1}else if(te<0)if(ee)te=0;else return-1;if(typeof oe=="string"&&(oe=m.from(oe,ie)),m.isBuffer(oe))return oe.length===0?-1:R(he,oe,te,ie,ee);if(typeof oe=="number")return oe=oe&255,typeof Uint8Array.prototype.indexOf=="function"?ee?Uint8Array.prototype.indexOf.call(he,oe,te):Uint8Array.prototype.lastIndexOf.call(he,oe,te):R(he,[oe],te,ie,ee);throw new TypeError("val must be string, number or Buffer")}function R(he,oe,te,ie,ee){var ce=1,_e=he.length,Se=oe.length;if(ie!==void 0&&(ie=String(ie).toLowerCase(),ie==="ucs2"||ie==="ucs-2"||ie==="utf16le"||ie==="utf-16le")){if(he.length<2||oe.length<2)return-1;ce=2,_e/=2,Se/=2,te/=2}function Me(dt,_t){return ce===1?dt[_t]:dt.readUInt16BE(_t*ce)}var Ue;if(ee){var Ge=-1;for(Ue=te;Ue<_e;Ue++)if(Me(he,Ue)===Me(oe,Ge===-1?0:Ue-Ge)){if(Ge===-1&&(Ge=Ue),Ue-Ge+1===Se)return Ge*ce}else Ge!==-1&&(Ue-=Ue-Ge),Ge=-1}else for(te+Se>_e&&(te=_e-Se),Ue=te;Ue>=0;Ue--){for(var Ze=!0,Ke=0;Keee&&(ie=ee)):ie=ee;var ce=oe.length;ie>ce/2&&(ie=ce/2);for(var _e=0;_e>>0,isFinite(ie)?(ie=ie>>>0,ee===void 0&&(ee="utf8")):(ee=ie,ie=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ce=this.length-te;if((ie===void 0||ie>ce)&&(ie=ce),oe.length>0&&(ie<0||te<0)||te>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");for(var _e=!1;;)switch(ee){case"hex":return P(this,oe,te,ie);case"utf8":case"utf-8":return z(this,oe,te,ie);case"ascii":case"latin1":case"binary":return I(this,oe,te,ie);case"base64":return L(this,oe,te,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,oe,te,ie);default:if(_e)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),_e=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(he,oe,te){return oe===0&&te===he.length?c.fromByteArray(he):c.fromByteArray(he.slice(oe,te))}function G(he,oe,te){te=Math.min(he.length,te);for(var ie=[],ee=oe;ee239?4:ce>223?3:ce>191?2:1;if(ee+Se<=te){var Me,Ue,Ge,Ze;switch(Se){case 1:ce<128&&(_e=ce);break;case 2:Me=he[ee+1],(Me&192)===128&&(Ze=(ce&31)<<6|Me&63,Ze>127&&(_e=Ze));break;case 3:Me=he[ee+1],Ue=he[ee+2],(Me&192)===128&&(Ue&192)===128&&(Ze=(ce&15)<<12|(Me&63)<<6|Ue&63,Ze>2047&&(Ze<55296||Ze>57343)&&(_e=Ze));break;case 4:Me=he[ee+1],Ue=he[ee+2],Ge=he[ee+3],(Me&192)===128&&(Ue&192)===128&&(Ge&192)===128&&(Ze=(ce&15)<<18|(Me&63)<<12|(Ue&63)<<6|Ge&63,Ze>65535&&Ze<1114112&&(_e=Ze))}}_e===null?(_e=65533,Se=1):_e>65535&&(_e-=65536,ie.push(_e>>>10&1023|55296),_e=56320|_e&1023),ie.push(_e),ee+=Se}return X(ie)}var $=4096;function X(he){var oe=he.length;if(oe<=$)return String.fromCharCode.apply(String,he);for(var te="",ie=0;ieie)&&(te=ie);for(var ee="",ce=oe;ceie&&(oe=ie),te<0?(te+=ie,te<0&&(te=0)):te>ie&&(te=ie),tete)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(oe,te,ie){oe=oe>>>0,te=te>>>0,ie||W(oe,te,this.length);for(var ee=this[oe],ce=1,_e=0;++_e>>0,te=te>>>0,ie||W(oe,te,this.length);for(var ee=this[oe+--te],ce=1;te>0&&(ce*=256);)ee+=this[oe+--te]*ce;return ee},m.prototype.readUint8=m.prototype.readUInt8=function(oe,te){return oe=oe>>>0,te||W(oe,1,this.length),this[oe]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(oe,te){return oe=oe>>>0,te||W(oe,2,this.length),this[oe]|this[oe+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(oe,te){return oe=oe>>>0,te||W(oe,2,this.length),this[oe]<<8|this[oe+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),(this[oe]|this[oe+1]<<8|this[oe+2]<<16)+this[oe+3]*16777216},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),this[oe]*16777216+(this[oe+1]<<16|this[oe+2]<<8|this[oe+3])},m.prototype.readIntLE=function(oe,te,ie){oe=oe>>>0,te=te>>>0,ie||W(oe,te,this.length);for(var ee=this[oe],ce=1,_e=0;++_e=ce&&(ee-=Math.pow(2,8*te)),ee},m.prototype.readIntBE=function(oe,te,ie){oe=oe>>>0,te=te>>>0,ie||W(oe,te,this.length);for(var ee=te,ce=1,_e=this[oe+--ee];ee>0&&(ce*=256);)_e+=this[oe+--ee]*ce;return ce*=128,_e>=ce&&(_e-=Math.pow(2,8*te)),_e},m.prototype.readInt8=function(oe,te){return oe=oe>>>0,te||W(oe,1,this.length),this[oe]&128?(255-this[oe]+1)*-1:this[oe]},m.prototype.readInt16LE=function(oe,te){oe=oe>>>0,te||W(oe,2,this.length);var ie=this[oe]|this[oe+1]<<8;return ie&32768?ie|4294901760:ie},m.prototype.readInt16BE=function(oe,te){oe=oe>>>0,te||W(oe,2,this.length);var ie=this[oe+1]|this[oe]<<8;return ie&32768?ie|4294901760:ie},m.prototype.readInt32LE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),this[oe]|this[oe+1]<<8|this[oe+2]<<16|this[oe+3]<<24},m.prototype.readInt32BE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),this[oe]<<24|this[oe+1]<<16|this[oe+2]<<8|this[oe+3]},m.prototype.readFloatLE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),f.read(this,oe,!0,23,4)},m.prototype.readFloatBE=function(oe,te){return oe=oe>>>0,te||W(oe,4,this.length),f.read(this,oe,!1,23,4)},m.prototype.readDoubleLE=function(oe,te){return oe=oe>>>0,te||W(oe,8,this.length),f.read(this,oe,!0,52,8)},m.prototype.readDoubleBE=function(oe,te){return oe=oe>>>0,te||W(oe,8,this.length),f.read(this,oe,!1,52,8)};function U(he,oe,te,ie,ee,ce){if(!m.isBuffer(he))throw new TypeError('"buffer" argument must be a Buffer instance');if(oe>ee||oehe.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(oe,te,ie,ee){if(oe=+oe,te=te>>>0,ie=ie>>>0,!ee){var ce=Math.pow(2,8*ie)-1;U(this,oe,te,ie,ce,0)}var _e=1,Se=0;for(this[te]=oe&255;++Se>>0,ie=ie>>>0,!ee){var ce=Math.pow(2,8*ie)-1;U(this,oe,te,ie,ce,0)}var _e=ie-1,Se=1;for(this[te+_e]=oe&255;--_e>=0&&(Se*=256);)this[te+_e]=oe/Se&255;return te+ie},m.prototype.writeUint8=m.prototype.writeUInt8=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,1,255,0),this[te]=oe&255,te+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,2,65535,0),this[te]=oe&255,this[te+1]=oe>>>8,te+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,2,65535,0),this[te]=oe>>>8,this[te+1]=oe&255,te+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,4,4294967295,0),this[te+3]=oe>>>24,this[te+2]=oe>>>16,this[te+1]=oe>>>8,this[te]=oe&255,te+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,4,4294967295,0),this[te]=oe>>>24,this[te+1]=oe>>>16,this[te+2]=oe>>>8,this[te+3]=oe&255,te+4},m.prototype.writeIntLE=function(oe,te,ie,ee){if(oe=+oe,te=te>>>0,!ee){var ce=Math.pow(2,8*ie-1);U(this,oe,te,ie,ce-1,-ce)}var _e=0,Se=1,Me=0;for(this[te]=oe&255;++_e>0)-Me&255;return te+ie},m.prototype.writeIntBE=function(oe,te,ie,ee){if(oe=+oe,te=te>>>0,!ee){var ce=Math.pow(2,8*ie-1);U(this,oe,te,ie,ce-1,-ce)}var _e=ie-1,Se=1,Me=0;for(this[te+_e]=oe&255;--_e>=0&&(Se*=256);)oe<0&&Me===0&&this[te+_e+1]!==0&&(Me=1),this[te+_e]=(oe/Se>>0)-Me&255;return te+ie},m.prototype.writeInt8=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,1,127,-128),oe<0&&(oe=255+oe+1),this[te]=oe&255,te+1},m.prototype.writeInt16LE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,2,32767,-32768),this[te]=oe&255,this[te+1]=oe>>>8,te+2},m.prototype.writeInt16BE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,2,32767,-32768),this[te]=oe>>>8,this[te+1]=oe&255,te+2},m.prototype.writeInt32LE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,4,2147483647,-2147483648),this[te]=oe&255,this[te+1]=oe>>>8,this[te+2]=oe>>>16,this[te+3]=oe>>>24,te+4},m.prototype.writeInt32BE=function(oe,te,ie){return oe=+oe,te=te>>>0,ie||U(this,oe,te,4,2147483647,-2147483648),oe<0&&(oe=4294967295+oe+1),this[te]=oe>>>24,this[te+1]=oe>>>16,this[te+2]=oe>>>8,this[te+3]=oe&255,te+4};function V(he,oe,te,ie,ee,ce){if(te+ie>he.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("Index out of range")}function j(he,oe,te,ie,ee){return oe=+oe,te=te>>>0,ee||V(he,oe,te,4,34028234663852886e22,-34028234663852886e22),f.write(he,oe,te,ie,23,4),te+4}m.prototype.writeFloatLE=function(oe,te,ie){return j(this,oe,te,!0,ie)},m.prototype.writeFloatBE=function(oe,te,ie){return j(this,oe,te,!1,ie)};function q(he,oe,te,ie,ee){return oe=+oe,te=te>>>0,ee||V(he,oe,te,8,17976931348623157e292,-17976931348623157e292),f.write(he,oe,te,ie,52,8),te+8}m.prototype.writeDoubleLE=function(oe,te,ie){return q(this,oe,te,!0,ie)},m.prototype.writeDoubleBE=function(oe,te,ie){return q(this,oe,te,!1,ie)},m.prototype.copy=function(oe,te,ie,ee){if(!m.isBuffer(oe))throw new TypeError("argument should be a Buffer");if(ie||(ie=0),!ee&&ee!==0&&(ee=this.length),te>=oe.length&&(te=oe.length),te||(te=0),ee>0&&ee=this.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),oe.length-te>>0,ie=ie===void 0?this.length:ie>>>0,oe||(oe=0);var _e;if(typeof oe=="number")for(_e=te;_e55295&&te<57344){if(!ee){if(te>56319){(oe-=3)>-1&&ce.push(239,191,189);continue}else if(_e+1===ie){(oe-=3)>-1&&ce.push(239,191,189);continue}ee=te;continue}if(te<56320){(oe-=3)>-1&&ce.push(239,191,189),ee=te;continue}te=(ee-55296<<10|te-56320)+65536}else ee&&(oe-=3)>-1&&ce.push(239,191,189);if(ee=null,te<128){if((oe-=1)<0)break;ce.push(te)}else if(te<2048){if((oe-=2)<0)break;ce.push(te>>6|192,te&63|128)}else if(te<65536){if((oe-=3)<0)break;ce.push(te>>12|224,te>>6&63|128,te&63|128)}else if(te<1114112){if((oe-=4)<0)break;ce.push(te>>18|240,te>>12&63|128,te>>6&63|128,te&63|128)}else throw new Error("Invalid code point")}return ce}function se(he){for(var oe=[],te=0;te>8,ee=te%256,ce.push(ee),ce.push(ie);return ce}function ue(he){return c.toByteArray(K(he))}function fe(he,oe,te,ie){for(var ee=0;ee=oe.length||ee>=he.length);++ee)oe[ee+te]=he[ee];return ee}function pe(he,oe){return he instanceof oe||he!=null&&he.constructor!=null&&he.constructor.name!=null&&he.constructor.name===oe.name}function we(he){return he!==he}var xe=(function(){for(var he="0123456789abcdef",oe=new Array(256),te=0;te<16;++te)for(var ie=te*16,ee=0;ee<16;++ee)oe[ie+ee]=he[te]+he[ee];return oe})()},2538(s,l,n){"use strict";var u=n(8902),c=n(5542),f=n(2272),h=n(5023);s.exports=y;function d(_){return[Math.min(_[0],_[1]),Math.max(_[0],_[1])]}function p(_,v){return _[0]-v[0]||_[1]-v[1]}function g(_){return _.map(d).sort(p)}function m(_,v,x){return v in _?_[v]:x}function y(_,v,x){Array.isArray(v)?(x=x||{},v=v||[]):(x=v||{},v=[]);var E=!!m(x,"delaunay",!0),M=!!m(x,"interior",!0),C=!!m(x,"exterior",!0),w=!!m(x,"infinity",!1);if(!M&&!C||_.length===0)return[];var k=u(_,v);if(E||M!==C||w){for(var T=c(_.length,g(v)),b=0;b0;){for(var E=g.pop(),_=g.pop(),M=-1,C=-1,v=y[_],k=1;k=0||(p.flip(_,E),f(d,p,g,M,_,C),f(d,p,g,_,C,M),f(d,p,g,C,E,M),f(d,p,g,E,M,C))}}},5023(s,l,n){"use strict";var u=n(2478);s.exports=g;function c(m,y,_,v,x,E,M){this.cells=m,this.neighbor=y,this.flags=v,this.constraint=_,this.active=x,this.next=E,this.boundary=M}var f=c.prototype;function h(m,y){return m[0]-y[0]||m[1]-y[1]||m[2]-y[2]}f.locate=(function(){var m=[0,0,0];return function(y,_,v){var x=y,E=_,M=v;return _0||M.length>0;){for(;E.length>0;){var b=E.pop();if(C[b]!==-x){C[b]=x;for(var S=w[b],A=0;A<3;++A){var F=T[3*b+A];F>=0&&C[F]===0&&(k[3*b+A]?M.push(F):(E.push(F),C[F]=x))}}}var D=M;M=E,E=D,M.length=0,x=-x}var R=p(w,C,y);return _?R.concat(v.boundary):R}},8902(s,l,n){"use strict";var u=n(2478),c=n(3250)[3],f=0,h=1,d=2;s.exports=M;function p(C,w,k,T,b){this.a=C,this.b=w,this.idx=k,this.lowerIds=T,this.upperIds=b}function g(C,w,k,T){this.a=C,this.b=w,this.type=k,this.idx=T}function m(C,w){var k=C.a[0]-w.a[0]||C.a[1]-w.a[1]||C.type-w.type;return k||C.type!==f&&(k=c(C.a,C.b,w.b),k)?k:C.idx-w.idx}function y(C,w){return c(C.a,C.b,w)}function _(C,w,k,T,b){for(var S=u.lt(w,T,y),A=u.gt(w,T,y),F=S;F1&&c(k[R[z-2]],k[R[z-1]],T)>0;)C.push([R[z-1],R[z-2],b]),z-=1;R.length=z,R.push(b);for(var P=D.upperIds,z=P.length;z>1&&c(k[P[z-2]],k[P[z-1]],T)<0;)C.push([P[z-2],P[z-1],b]),z-=1;P.length=z,P.push(b)}}function v(C,w){var k;return C.a[0]D[0]&&b.push(new g(D,F,d,S),new g(F,D,h,S))}b.sort(m);for(var R=b[0].a[0]-(1+Math.abs(b[0].a[0]))*Math.pow(2,-52),P=[new p([R,1],[R,0],-1,[],[],[],[])],z=[],S=0,I=b.length;S=0}})(),f.removeTriangle=function(p,g,m){var y=this.stars;h(y[p],g,m),h(y[g],m,p),h(y[m],p,g)},f.addTriangle=function(p,g,m){var y=this.stars;y[p].push(g,m),y[g].push(m,p),y[m].push(p,g)},f.opposite=function(p,g){for(var m=this.stars[g],y=1,_=m.length;y<_;y+=2)if(m[y]===p)return m[y-1];return-1},f.flip=function(p,g){var m=this.opposite(p,g),y=this.opposite(g,p);this.removeTriangle(p,g,m),this.removeTriangle(g,p,y),this.addTriangle(p,y,m),this.addTriangle(g,m,y)},f.edges=function(){for(var p=this.stars,g=[],m=0,y=p.length;m=0;--L){var H=z[L];B=H[0];var W=R[B],U=W[0],V=W[1],j=D[U],q=D[V];if((j[0]-q[0]||j[1]-q[1])<0){var Y=U;U=V,V=Y}W[0]=U;var K=W[1]=H[1],re;for(I&&(re=W[2]);L>0&&z[L-1][0]===B;){var H=z[--L],se=H[1];I?R.push([K,se,re]):R.push([K,se]),K=se}I?R.push([K,V,re]):R.push([K,V])}return O}function w(D,R,P){for(var z=R.length,I=new u(z),L=[],B=0;BR[2]?1:0)}function b(D,R,P){if(D.length!==0){if(R)for(var z=0;z0||B.length>0}function F(D,R,P){var z;if(P){z=R;for(var I=new Array(R.length),L=0;LC+1)throw new Error(E+" map requires nshades to be at least size "+x.length);Array.isArray(g.alpha)?g.alpha.length!==2?w=[1,1]:w=g.alpha.slice():typeof g.alpha=="number"?w=[g.alpha,g.alpha]:w=[1,1],m=x.map(function(F){return Math.round(F.index*C)}),w[0]=Math.min(Math.max(w[0],0),1),w[1]=Math.min(Math.max(w[1],0),1);var T=x.map(function(F,D){var R=x[D].index,P=x[D].rgb.slice();return P.length===4&&P[3]>=0&&P[3]<=1||(P[3]=w[0]+(w[1]-w[0])*R),P}),b=[];for(k=0;k=0}function g(m,y,_,v){var x=u(y,_,v);if(x===0){var E=c(u(m,y,_)),M=c(u(m,y,v));if(E===M){if(E===0){var C=p(m,y,_),w=p(m,y,v);return C===w?0:C?1:-1}return 0}else{if(M===0)return E>0||p(m,y,v)?-1:1;if(E===0)return M>0||p(m,y,_)?1:-1}return c(M-E)}var k=u(m,y,_);if(k>0)return x>0&&u(m,y,v)>0?1:-1;if(k<0)return x>0||u(m,y,v)>0?1:-1;var T=u(m,y,v);return T>0||p(m,y,_)?1:-1}},8572(s){"use strict";s.exports=function(n){return n<0?-1:n>0?1:0}},8507(s){s.exports=u;var l=Math.min;function n(c,f){return c-f}function u(c,f){var h=c.length,d=c.length-f.length;if(d)return d;switch(h){case 0:return 0;case 1:return c[0]-f[0];case 2:return c[0]+c[1]-f[0]-f[1]||l(c[0],c[1])-l(f[0],f[1]);case 3:var p=c[0]+c[1],g=f[0]+f[1];if(d=p+c[2]-(g+f[2]),d)return d;var m=l(c[0],c[1]),y=l(f[0],f[1]);return l(m,c[2])-l(y,f[2])||l(m+c[2],p)-l(y+f[2],g);case 4:var _=c[0],v=c[1],x=c[2],E=c[3],M=f[0],C=f[1],w=f[2],k=f[3];return _+v+x+E-(M+C+w+k)||l(_,v,x,E)-l(M,C,w,k,M)||l(_+v,_+x,_+E,v+x,v+E,x+E)-l(M+C,M+w,M+k,C+w,C+k,w+k)||l(_+v+x,_+v+E,_+x+E,v+x+E)-l(M+C+w,M+C+k,M+w+k,C+w+k);default:for(var T=c.slice().sort(n),b=f.slice().sort(n),S=0;Sn[c][0]&&(c=f);return uc?[[c],[u]]:[[u]]}},4750(s,l,n){"use strict";s.exports=c;var u=n(3090);function c(f){var h=u(f),d=h.length;if(d<=2)return[];for(var p=new Array(d),g=h[d-1],m=0;m=g[M]&&(E+=1);v[x]=E}}return p}function d(p,g){try{return u(p,!0)}catch{var m=c(p);if(m.length<=g)return[];var y=f(p,m),_=u(y,!0);return h(_,m)}}},4769(s){"use strict";function l(u,c,f,h,d,p){var g=6*d*d-6*d,m=3*d*d-4*d+1,y=-6*d*d+6*d,_=3*d*d-2*d;if(u.length){p||(p=new Array(u.length));for(var v=u.length-1;v>=0;--v)p[v]=g*u[v]+m*c[v]+y*f[v]+_*h[v];return p}return g*u+m*c+y*f[v]+_*h}function n(u,c,f,h,d,p){var g=d-1,m=d*d,y=g*g,_=(1+2*d)*y,v=d*y,x=m*(3-2*d),E=m*g;if(u.length){p||(p=new Array(u.length));for(var M=u.length-1;M>=0;--M)p[M]=_*u[M]+v*c[M]+x*f[M]+E*h[M];return p}return _*u+v*c+x*f+E*h}s.exports=n,s.exports.derivative=l},7642(s,l,n){"use strict";var u=n(8954),c=n(1682);s.exports=p;function f(g,m){this.point=g,this.index=m}function h(g,m){for(var y=g.point,_=m.point,v=y.length,x=0;x=2)return!1;P[I]=L}return!0}):R=R.filter(function(P){for(var z=0;z<=_;++z){var I=S[P[z]];if(I<0)return!1;P[z]=I}return!0}),_&1)for(var E=0;E>>31},s.exports.exponent=function(x){var E=s.exports.hi(x);return(E<<1>>>21)-1023},s.exports.fraction=function(x){var E=s.exports.lo(x),M=s.exports.hi(x),C=M&(1<<20)-1;return M&2146435072&&(C+=1048576),[E,C]},s.exports.denormalized=function(x){var E=s.exports.hi(x);return!(E&2146435072)}},1338(s){"use strict";function l(c,f,h){var d=c[h]|0;if(d<=0)return[];var p=new Array(d),g;if(h===c.length-1)for(g=0;g"u"&&(f=0),typeof c){case"number":if(c>0)return n(c|0,f);break;case"object":if(typeof c.length=="number")return l(c,f,0);break}return[]}s.exports=u},3134(s,l,n){"use strict";s.exports=c;var u=n(1682);function c(f,h){var d=f.length;if(typeof h!="number"){h=0;for(var p=0;p=_-1)for(var k=E.length-1,b=m-y[_-1],T=0;T=_-1)for(var w=E.length-1,k=m-y[_-1],T=0;T=0;--_)if(m[--y])return!1;return!0},d.jump=function(m){var y=this.lastT(),_=this.dimension;if(!(m0;--T)v.push(f(C[T-1],w[T-1],arguments[T])),x.push(0)}},d.push=function(m){var y=this.lastT(),_=this.dimension;if(!(m1e-6?1/M:0;this._time.push(m);for(var b=_;b>0;--b){var S=f(w[b-1],k[b-1],arguments[b]);v.push(S),x.push((S-v[E++])*T)}}},d.set=function(m){var y=this.dimension;if(!(m0;--C)_.push(f(E[C-1],M[C-1],arguments[C])),v.push(0)}},d.move=function(m){var y=this.lastT(),_=this.dimension;if(!(m<=y||arguments.length!==_+1)){var v=this._state,x=this._velocity,E=v.length-this.dimension,M=this.bounds,C=M[0],w=M[1],k=m-y,T=k>1e-6?1/k:0;this._time.push(m);for(var b=_;b>0;--b){var S=arguments[b];v.push(f(C[b-1],w[b-1],v[E++]+S)),x.push(S*T)}}},d.idle=function(m){var y=this.lastT();if(!(m=0;--T)v.push(f(C[T],w[T],v[E]+k*x[E])),x.push(0),E+=1}};function p(m){for(var y=new Array(m),_=0;_=0;--D){var b=S[D];A[D]<=0?S[D]=new u(b._color,b.key,b.value,S[D+1],b.right,b._count+1):S[D]=new u(b._color,b.key,b.value,b.left,S[D+1],b._count+1)}for(var D=S.length-1;D>1;--D){var R=S[D-1],b=S[D];if(R._color===n||b._color===n)break;var P=S[D-2];if(P.left===R)if(R.left===b){var z=P.right;if(z&&z._color===l)R._color=n,P.right=f(n,z),P._color=l,D-=1;else{if(P._color=l,P.left=R.right,R._color=n,R.right=P,S[D-2]=R,S[D-1]=b,h(P),h(R),D>=3){var I=S[D-3];I.left===P?I.left=R:I.right=R}break}}else{var z=P.right;if(z&&z._color===l)R._color=n,P.right=f(n,z),P._color=l,D-=1;else{if(R.right=b.left,P._color=l,P.left=b.right,b._color=n,b.left=R,b.right=P,S[D-2]=b,S[D-1]=R,h(P),h(R),h(b),D>=3){var I=S[D-3];I.left===P?I.left=b:I.right=b}break}}else if(R.right===b){var z=P.left;if(z&&z._color===l)R._color=n,P.left=f(n,z),P._color=l,D-=1;else{if(P._color=l,P.right=R.left,R._color=n,R.left=P,S[D-2]=R,S[D-1]=b,h(P),h(R),D>=3){var I=S[D-3];I.right===P?I.right=R:I.left=R}break}}else{var z=P.left;if(z&&z._color===l)R._color=n,P.left=f(n,z),P._color=l,D-=1;else{if(R.left=b.right,P._color=l,P.right=b.left,b._color=n,b.right=R,b.left=P,S[D-2]=b,S[D-1]=R,h(P),h(R),h(b),D>=3){var I=S[D-3];I.right===P?I.right=b:I.left=b}break}}}return S[0]._color=n,new d(T,S[0])};function g(w,k){if(k.left){var T=g(w,k.left);if(T)return T}var T=w(k.key,k.value);if(T)return T;if(k.right)return g(w,k.right)}function m(w,k,T,b){var S=k(w,b.key);if(S<=0){if(b.left){var A=m(w,k,T,b.left);if(A)return A}var A=T(b.key,b.value);if(A)return A}if(b.right)return m(w,k,T,b.right)}function y(w,k,T,b,S){var A=T(w,S.key),F=T(k,S.key),D;if(A<=0&&(S.left&&(D=y(w,k,T,b,S.left),D)||F>0&&(D=b(S.key,S.value),D)))return D;if(F>0&&S.right)return y(w,k,T,b,S.right)}p.forEach=function(k,T,b){if(this.root)switch(arguments.length){case 1:return g(k,this.root);case 2:return m(T,this._compare,k,this.root);case 3:return this._compare(T,b)>=0?void 0:y(T,b,this._compare,k,this.root)}},Object.defineProperty(p,"begin",{get:function(){for(var w=[],k=this.root;k;)w.push(k),k=k.left;return new _(this,w)}}),Object.defineProperty(p,"end",{get:function(){for(var w=[],k=this.root;k;)w.push(k),k=k.right;return new _(this,w)}}),p.at=function(w){if(w<0)return new _(this,[]);for(var k=this.root,T=[];;){if(T.push(k),k.left){if(w=k.right._count)break;k=k.right}else break}return new _(this,[])},p.ge=function(w){for(var k=this._compare,T=this.root,b=[],S=0;T;){var A=k(w,T.key);b.push(T),A<=0&&(S=b.length),A<=0?T=T.left:T=T.right}return b.length=S,new _(this,b)},p.gt=function(w){for(var k=this._compare,T=this.root,b=[],S=0;T;){var A=k(w,T.key);b.push(T),A<0&&(S=b.length),A<0?T=T.left:T=T.right}return b.length=S,new _(this,b)},p.lt=function(w){for(var k=this._compare,T=this.root,b=[],S=0;T;){var A=k(w,T.key);b.push(T),A>0&&(S=b.length),A<=0?T=T.left:T=T.right}return b.length=S,new _(this,b)},p.le=function(w){for(var k=this._compare,T=this.root,b=[],S=0;T;){var A=k(w,T.key);b.push(T),A>=0&&(S=b.length),A<0?T=T.left:T=T.right}return b.length=S,new _(this,b)},p.find=function(w){for(var k=this._compare,T=this.root,b=[];T;){var S=k(w,T.key);if(b.push(T),S===0)return new _(this,b);S<=0?T=T.left:T=T.right}return new _(this,[])},p.remove=function(w){var k=this.find(w);return k?k.remove():this},p.get=function(w){for(var k=this._compare,T=this.root;T;){var b=k(w,T.key);if(b===0)return T.value;b<=0?T=T.left:T=T.right}};function _(w,k){this.tree=w,this._stack=k}var v=_.prototype;Object.defineProperty(v,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(v,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),v.clone=function(){return new _(this.tree,this._stack.slice())};function x(w,k){w.key=k.key,w.value=k.value,w.left=k.left,w.right=k.right,w._color=k._color,w._count=k._count}function E(w){for(var k,T,b,S,A=w.length-1;A>=0;--A){if(k=w[A],A===0){k._color=n;return}if(T=w[A-1],T.left===k){if(b=T.right,b.right&&b.right._color===l){if(b=T.right=c(b),S=b.right=c(b.right),T.right=b.left,b.left=T,b.right=S,b._color=T._color,k._color=n,T._color=n,S._color=n,h(T),h(b),A>1){var F=w[A-2];F.left===T?F.left=b:F.right=b}w[A-1]=b;return}else if(b.left&&b.left._color===l){if(b=T.right=c(b),S=b.left=c(b.left),T.right=S.left,b.left=S.right,S.left=T,S.right=b,S._color=T._color,T._color=n,b._color=n,k._color=n,h(T),h(b),h(S),A>1){var F=w[A-2];F.left===T?F.left=S:F.right=S}w[A-1]=S;return}if(b._color===n)if(T._color===l){T._color=n,T.right=f(l,b);return}else{T.right=f(l,b);continue}else{if(b=c(b),T.right=b.left,b.left=T,b._color=T._color,T._color=l,h(T),h(b),A>1){var F=w[A-2];F.left===T?F.left=b:F.right=b}w[A-1]=b,w[A]=T,A+11){var F=w[A-2];F.right===T?F.right=b:F.left=b}w[A-1]=b;return}else if(b.right&&b.right._color===l){if(b=T.left=c(b),S=b.right=c(b.right),T.left=S.right,b.right=S.left,S.right=T,S.left=b,S._color=T._color,T._color=n,b._color=n,k._color=n,h(T),h(b),h(S),A>1){var F=w[A-2];F.right===T?F.right=S:F.left=S}w[A-1]=S;return}if(b._color===n)if(T._color===l){T._color=n,T.left=f(l,b);return}else{T.left=f(l,b);continue}else{if(b=c(b),T.left=b.right,b.right=T,b._color=T._color,T._color=l,h(T),h(b),A>1){var F=w[A-2];F.right===T?F.right=b:F.left=b}w[A-1]=b,w[A]=T,A+1=0;--b){var T=w[b];T.left===w[b+1]?k[b]=new u(T._color,T.key,T.value,k[b+1],T.right,T._count):k[b]=new u(T._color,T.key,T.value,T.left,k[b+1],T._count)}if(T=k[k.length-1],T.left&&T.right){var S=k.length;for(T=T.left;T.right;)k.push(T),T=T.right;var A=k[S-1];k.push(new u(T._color,A.key,A.value,T.left,T.right,T._count)),k[S-1].key=T.key,k[S-1].value=T.value;for(var b=k.length-2;b>=S;--b)T=k[b],k[b]=new u(T._color,T.key,T.value,T.left,k[b+1],T._count);k[S-1].left=k[S]}if(T=k[k.length-1],T._color===l){var F=k[k.length-2];F.left===T?F.left=null:F.right===T&&(F.right=null),k.pop();for(var b=0;b0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(v,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(v,"index",{get:function(){var w=0,k=this._stack;if(k.length===0){var T=this.tree.root;return T?T._count:0}else k[k.length-1].left&&(w=k[k.length-1].left._count);for(var b=k.length-2;b>=0;--b)k[b+1]===k[b].right&&(++w,k[b].left&&(w+=k[b].left._count));return w},enumerable:!0}),v.next=function(){var w=this._stack;if(w.length!==0){var k=w[w.length-1];if(k.right)for(k=k.right;k;)w.push(k),k=k.left;else for(w.pop();w.length>0&&w[w.length-1].right===k;)k=w[w.length-1],w.pop()}},Object.defineProperty(v,"hasNext",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].right)return!0;for(var k=w.length-1;k>0;--k)if(w[k-1].left===w[k])return!0;return!1}}),v.update=function(w){var k=this._stack;if(k.length===0)throw new Error("Can't update empty node!");var T=new Array(k.length),b=k[k.length-1];T[T.length-1]=new u(b._color,b.key,w,b.left,b.right,b._count);for(var S=k.length-2;S>=0;--S)b=k[S],b.left===k[S+1]?T[S]=new u(b._color,b.key,b.value,T[S+1],b.right,b._count):T[S]=new u(b._color,b.key,b.value,b.left,T[S+1],b._count);return new d(this.tree._compare,T[0])},v.prev=function(){var w=this._stack;if(w.length!==0){var k=w[w.length-1];if(k.left)for(k=k.left;k;)w.push(k),k=k.right;else for(w.pop();w.length>0&&w[w.length-1].left===k;)k=w[w.length-1],w.pop()}},Object.defineProperty(v,"hasPrev",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].left)return!0;for(var k=w.length-1;k>0;--k)if(w[k-1].right===w[k])return!0;return!1}});function M(w,k){return wk?1:0}function C(w){return new d(w||M,null)}},3837(s,l,n){"use strict";s.exports=D;var u=n(4935),c=n(501),f=n(5304),h=n(6429),d=n(6444),p=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),g=ArrayBuffer,m=DataView;function y(R){return g.isView(R)&&!(R instanceof m)}function _(R){return Array.isArray(R)||y(R)}function v(R,P){return R[0]=P[0],R[1]=P[1],R[2]=P[2],R}function x(R){this.gl=R,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=f(R)}var E=x.prototype;E.update=function(R){R=R||{};function P(U,V,j){if(j in R){var q=R[j],Y=this[j],K;(U?_(q)&&_(q[0]):_(q))?this[j]=K=[V(q[0]),V(q[1]),V(q[2])]:this[j]=K=[V(q),V(q),V(q)];for(var re=0;re<3;++re)if(K[re]!==Y[re])return!0}return!1}var z=P.bind(this,!1,Number),I=P.bind(this,!1,Boolean),L=P.bind(this,!1,String),B=P.bind(this,!0,function(U){if(_(U)){if(U.length===3)return[+U[0],+U[1],+U[2],1];if(U.length===4)return[+U[0],+U[1],+U[2],+U[3]]}return[0,0,0,1]}),O,G=!1,$=!1;if("bounds"in R)for(var X=R.bounds,Z=0;Z<2;++Z)for(var J=0;J<3;++J)X[Z][J]!==this.bounds[Z][J]&&($=!0),this.bounds[Z][J]=X[Z][J];if("ticks"in R){O=R.ticks,G=!0,this.autoTicks=!1;for(var Z=0;Z<3;++Z)this.tickSpacing[Z]=0}else z("tickSpacing")&&(this.autoTicks=!0,$=!0);if(this._firstInit&&("ticks"in R||"tickSpacing"in R||(this.autoTicks=!0),$=!0,G=!0,this._firstInit=!1),$&&this.autoTicks&&(O=d.create(this.bounds,this.tickSpacing),G=!0),G){for(var Z=0;Z<3;++Z)O[Z].sort(function(V,j){return V.x-j.x});d.equal(O,this.ticks)?G=!1:this.ticks=O}I("tickEnable"),L("tickFont")&&(G=!0),L("tickFontStyle")&&(G=!0),L("tickFontWeight")&&(G=!0),L("tickFontVariant")&&(G=!0),z("tickSize"),z("tickAngle"),z("tickPad"),B("tickColor");var N=L("labels");L("labelFont")&&(N=!0),L("labelFontStyle")&&(N=!0),L("labelFontWeight")&&(N=!0),L("labelFontVariant")&&(N=!0),I("labelEnable"),z("labelSize"),z("labelPad"),B("labelColor"),I("lineEnable"),I("lineMirror"),z("lineWidth"),B("lineColor"),I("lineTickEnable"),I("lineTickMirror"),z("lineTickLength"),z("lineTickWidth"),B("lineTickColor"),I("gridEnable"),z("gridWidth"),B("gridColor"),I("zeroEnable"),B("zeroLineColor"),z("zeroLineWidth"),I("backgroundEnable"),B("backgroundColor");var H=[{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]}],W=[{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&&(N||G)&&this._text.update(this.bounds,this.labels,H,this.ticks,W):this._text=u(this.gl,this.bounds,this.labels,H,this.ticks,W),this._lines&&G&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=c(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var C=[new M,new M,new M];function w(R,P,z,I,L){for(var B=R.primalOffset,O=R.primalMinor,G=R.mirrorOffset,$=R.mirrorMinor,X=I[P],Z=0;Z<3;++Z)if(P!==Z){var J=B,N=G,H=O,W=$;X&1<0?(H[Z]=-1,W[Z]=0):(H[Z]=0,W[Z]=1)}}var k=[0,0,0],T={model:p,view:p,projection:p,_ortho:!1};E.isOpaque=function(){return!0},E.isTransparent=function(){return!1},E.drawTransparent=function(R){};var b=0,S=[0,0,0],A=[0,0,0],F=[0,0,0];E.draw=function(R){R=R||T;for(var j=this.gl,P=R.model||p,z=R.view||p,I=R.projection||p,L=this.bounds,B=R._ortho||!1,O=h(P,z,I,L,B),G=O.cubeEdges,$=O.axis,X=z[12],Z=z[13],J=z[14],N=z[15],H=B?2:1,W=H*this.pixelRatio*(I[3]*X+I[7]*Z+I[11]*J+I[15]*N)/j.drawingBufferHeight,U=0;U<3;++U)this.lastCubeProps.cubeEdges[U]=G[U],this.lastCubeProps.axis[U]=$[U];for(var V=C,U=0;U<3;++U)w(C[U],U,this.bounds,G,$);for(var j=this.gl,q=k,U=0;U<3;++U)this.backgroundEnable[U]?q[U]=$[U]:q[U]=0;this._background.draw(P,z,I,L,q,this.backgroundColor),this._lines.bind(P,z,I,this);for(var U=0;U<3;++U){var Y=[0,0,0];$[U]>0?Y[U]=L[1][U]:Y[U]=L[0][U];for(var K=0;K<2;++K){var re=(U+1+K)%3,se=(U+1+(K^1))%3;this.gridEnable[re]&&this._lines.drawGrid(re,se,this.bounds,Y,this.gridColor[re],this.gridWidth[re]*this.pixelRatio)}for(var K=0;K<2;++K){var re=(U+1+K)%3,se=(U+1+(K^1))%3;this.zeroEnable[se]&&Math.min(L[0][se],L[1][se])<=0&&Math.max(L[0][se],L[1][se])>=0&&this._lines.drawZero(re,se,this.bounds,Y,this.zeroLineColor[se],this.zeroLineWidth[se]*this.pixelRatio)}}for(var U=0;U<3;++U){this.lineEnable[U]&&this._lines.drawAxisLine(U,this.bounds,V[U].primalOffset,this.lineColor[U],this.lineWidth[U]*this.pixelRatio),this.lineMirror[U]&&this._lines.drawAxisLine(U,this.bounds,V[U].mirrorOffset,this.lineColor[U],this.lineWidth[U]*this.pixelRatio);for(var le=v(S,V[U].primalMinor),ue=v(A,V[U].mirrorMinor),fe=this.lineTickLength,K=0;K<3;++K){var pe=W/P[5*K];le[K]*=fe[K]*pe,ue[K]*=fe[K]*pe}this.lineTickEnable[U]&&this._lines.drawAxisTicks(U,V[U].primalOffset,le,this.lineTickColor[U],this.lineTickWidth[U]*this.pixelRatio),this.lineTickMirror[U]&&this._lines.drawAxisTicks(U,V[U].mirrorOffset,ue,this.lineTickColor[U],this.lineTickWidth[U]*this.pixelRatio)}this._lines.unbind(),this._text.bind(P,z,I,this.pixelRatio);var we,xe=.5,he,oe;function te(Me){oe=[0,0,0],oe[Me]=1}function ie(Me,Ue,Ge){var Ze=(Me+1)%3,Ke=(Me+2)%3,dt=Ue[Ze],_t=Ue[Ke],Pt=Ge[Ze],vt=Ge[Ke];if(dt>0&&vt>0){te(Ze);return}else if(dt>0&&vt<0){te(Ze);return}else if(dt<0&&vt>0){te(Ze);return}else if(dt<0&&vt<0){te(Ze);return}else if(_t>0&&Pt>0){te(Ke);return}else if(_t>0&&Pt<0){te(Ke);return}else if(_t<0&&Pt>0){te(Ke);return}else if(_t<0&&Pt<0){te(Ke);return}}for(var U=0;U<3;++U){for(var ee=V[U].primalMinor,ce=V[U].mirrorMinor,_e=v(F,V[U].primalOffset),K=0;K<3;++K)this.lineTickEnable[U]&&(_e[K]+=W*ee[K]*Math.max(this.lineTickLength[K],0)/P[5*K]);var Se=[0,0,0];if(Se[U]=1,this.tickEnable[U]){this.tickAngle[U]===-3600?(this.tickAngle[U]=0,this.tickAlign[U]="auto"):this.tickAlign[U]=-1,he=1,we=[this.tickAlign[U],xe,he],we[0]==="auto"?we[0]=b:we[0]=parseInt(""+we[0]),oe=[0,0,0],ie(U,ee,ce);for(var K=0;K<3;++K)_e[K]+=W*ee[K]*this.tickPad[K]/P[5*K];this._text.drawTicks(U,this.tickSize[U],this.tickAngle[U],_e,this.tickColor[U],Se,oe,we)}if(this.labelEnable[U]){he=0,oe=[0,0,0],this.labels[U].length>4&&(te(U),he=1),we=[this.labelAlign[U],xe,he],we[0]==="auto"?we[0]=b:we[0]=parseInt(""+we[0]);for(var K=0;K<3;++K)_e[K]+=W*ee[K]*this.labelPad[K]/P[5*K];_e[U]+=.5*(L[0][U]+L[1][U]),this._text.drawLabel(U,this.labelSize[U],this.labelAngle[U],_e,this.labelColor[U],[0,0,0],oe,we)}}this._text.unbind()},E.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function D(R,P){var z=new x(R);return z.update(P),z}},5304(s,l,n){"use strict";s.exports=p;var u=n(2762),c=n(8116),f=n(1879).bg;function h(g,m,y,_){this.gl=g,this.buffer=m,this.vao=y,this.shader=_}var d=h.prototype;d.draw=function(g,m,y,_,v,x){for(var E=!1,M=0;M<3;++M)E=E||v[M];if(E){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:g,view:m,projection:y,bounds:_,enable:v,colors:x},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},d.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function p(g){for(var m=[],y=[],_=0,v=0;v<3;++v)for(var x=(v+1)%3,E=(v+2)%3,M=[0,0,0],C=[0,0,0],w=-1;w<=1;w+=2){y.push(_,_+2,_+1,_+1,_+2,_+3),M[v]=w,C[v]=w;for(var k=-1;k<=1;k+=2){M[x]=k;for(var T=-1;T<=1;T+=2)M[E]=T,m.push(M[0],M[1],M[2],C[0],C[1],C[2]),_+=1}var b=x;x=E,E=b}var S=u(g,new Float32Array(m)),A=u(g,new Uint16Array(y),g.ELEMENT_ARRAY_BUFFER),F=c(g,[{buffer:S,type:g.FLOAT,size:3,offset:0,stride:24},{buffer:S,type:g.FLOAT,size:3,offset:12,stride:24}],A),D=f(g);return D.attributes.position.location=0,D.attributes.normal.location=1,new h(g,S,F,D)}},6429(s,l,n){"use strict";s.exports=w;var u=n(8828),c=n(6760),f=n(5202),h=n(3250),d=new Array(16),p=new Array(8),g=new Array(8),m=new Array(3),y=[0,0,0];(function(){for(var k=0;k<8;++k)p[k]=[1,1,1,1],g[k]=[1,1,1]})();function _(k,T,b){for(var S=0;S<4;++S){k[S]=b[12+S];for(var A=0;A<3;++A)k[S]+=T[A]*b[4*A+S]}}var v=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function x(k){for(var T=0;T$&&(z|=1<$){z|=1<g[D][1])&&(V=D);for(var j=-1,D=0;D<3;++D){var q=V^1<g[Y][0]&&(Y=q)}}var K=E;K[0]=K[1]=K[2]=0,K[u.log2(j^V)]=V&j,K[u.log2(V^Y)]=V&Y;var re=Y^7;re===z||re===U?(re=j^7,K[u.log2(Y^re)]=re&Y):K[u.log2(j^re)]=re&j;for(var se=M,le=z,B=0;B<3;++B)le&1<=0;--ae){var he=H[ee[ae]];f.push(K*he[0],-K*he[1],j)}}for(var A=[0,0,0],x=[0,0,0],z=[0,0,0],I=[0,0,0],O=1.25,D={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},B=0;B<3;++B){z[B]=f.length/m|0,u(.5*(S[0][B]+S[1][B]),M[B],C[B],12,O,D),I[B]=(f.length/m|0)-z[B],A[B]=f.length/m|0;for(var F=0;F<_[B].length;++F)if(_[B][F].text){var P={family:_[B][F].font||T[B].family,style:T[B].fontStyle||T[B].style,weight:T[B].fontWeight||T[B].weight,variant:T[B].fontVariant||T[B].variant};u(_[B][F].x,_[B][F].text,P,_[B][F].fontSize||12,O,D)}x[B]=(f.length/m|0)-A[B]}this.buffer.update(f),this.tickOffset=A,this.tickCount=x,this.labelOffset=z,this.labelCount=I},v.drawTicks=function(S,M,C,_,T,f,u,A){this.tickCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.tickCount[S],this.tickOffset[S]))},v.drawLabel=function(S,M,C,_,T,f,u,A){this.labelCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.labelCount[S],this.labelOffset[S]))},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function i(S,M){try{return a(S,M)}catch(C){return console.warn('error vectorizing text:"'+S+'" error:',C),{cells:[],positions:[]}}}function w(S,M,C,_,T,f){var u=n(S),A=r(S,[{buffer:u,size:3}]),x=o(S);x.attributes.position.location=0;var z=new h(S,x,u,A);return z.update(M,C,_,T,f),z}},6444:function(l,e){"use strict";e.create=n,e.equal=r;function t(a,o){var s=a+"",c=s.indexOf("."),m=0;c>=0&&(m=s.length-c-1);var h=Math.pow(10,m),v=Math.round(a*o*h),g=v+"";if(g.indexOf("e")>=0)return g;var i=v/h,w=v%h;v<0?(i=-Math.ceil(i)|0,w=-w|0):(i=Math.floor(i)|0,w=w|0);var S=""+i;if(v<0&&(S="-"+S),m){for(var M=""+w;M.length=a[0][c];--v)m.push({x:v*o[c],text:t(o[c],v)});s.push(m)}return s}function r(a,o){for(var s=0;s<3;++s){if(a[s].length!==o[s].length)return!1;for(var c=0;cS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return i.bufferSubData(w,_,C),S}function h(i,w){for(var S=n.malloc(i.length,w),M=i.length,C=0;C=0;--M){if(w[M]!==S)return!1;S*=i[M]}return!0}c.update=function(i,w){if(typeof w!="number"&&(w=-1),this.bind(),typeof i=="object"&&typeof i.shape<"u"){var S=i.dtype;if(o.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&S!=="uint16"?S="uint32":S="uint16"}if(S===i.dtype&&v(i.shape,i.stride))i.offset===0&&i.data.length===i.shape[0]?this.length=m(this.gl,this.type,this.length,this.usage,i.data,w):this.length=m(this.gl,this.type,this.length,this.usage,i.data.subarray(i.offset,i.shape[0]),w);else{var C=n.malloc(i.size,S),_=a(C,i.shape);r.assign(_,i),w<0?this.length=m(this.gl,this.type,this.length,this.usage,C,w):this.length=m(this.gl,this.type,this.length,this.usage,C.subarray(0,i.size),w),n.free(C)}}else if(Array.isArray(i)){var T;this.type===this.gl.ELEMENT_ARRAY_BUFFER?T=h(i,"uint16"):T=h(i,"float32"),w<0?this.length=m(this.gl,this.type,this.length,this.usage,T,w):this.length=m(this.gl,this.type,this.length,this.usage,T.subarray(0,i.length),w),n.free(T)}else if(typeof i=="object"&&typeof i.length=="number")this.length=m(this.gl,this.type,this.length,this.usage,i,w);else if(typeof i=="number"||i===void 0){if(w>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");i=i|0,i<=0&&(i=1),this.gl.bufferData(this.type,i|0,this.usage),this.length=i}else throw new Error("gl-buffer: Invalid data type")};function g(i,w,S,M){if(S=S||i.ARRAY_BUFFER,M=M||i.DYNAMIC_DRAW,S!==i.ARRAY_BUFFER&&S!==i.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(M!==i.DYNAMIC_DRAW&&M!==i.STATIC_DRAW&&M!==i.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 C=i.createBuffer(),_=new s(i,S,C,0,M);return _.update(w),_}l.exports=g},6405:function(l,e,t){"use strict";var n=t(2931);l.exports=function(a,o){var s=a.positions,c=a.vectors,m={positions:[],vertexIntensity:[],vertexIntensityBounds:a.vertexIntensityBounds,vectors:[],cells:[],coneOffset:a.coneOffset,colormap:a.colormap};if(a.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),m;for(var h=0,v=1/0,g=-1/0,i=1/0,w=-1/0,S=1/0,M=-1/0,C=null,_=null,T=[],f=1/0,u=!1,A=a.coneSizemode==="raw",x=0;xh&&(h=n.length(I)),x&&!A){var O=2*n.distance(C,z)/(n.length(_)+n.length(I));O?(f=Math.min(f,O),u=!1):u=!0}u||(C=z,_=I),T.push(I)}var D=[v,i,S],B=[g,w,M];o&&(o[0]=D,o[1]=B),h===0&&(h=1);var F=1/h;isFinite(f)||(f=1),m.vectorScale=f;var P=a.coneSize||(A?1:.5);a.absoluteConeSize&&(P=a.absoluteConeSize*F),m.coneScale=P;for(var x=0,j=0;x=1},i.isTransparent=function(){return this.opacity<1},i.pickSlots=1,i.setPickBase=function(T){this.pickId=T};function w(T){for(var f=h({colormap:T,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),A=0;A<256;++A){for(var x=f[A],z=0;z<3;++z)u[4*A+z]=x[z];u[4*A+3]=x[3]*255}return m(u,[256,256,4],[4,0,1])}function S(T){for(var f=T.length,u=new Array(f),A=0;A0){var j=this.triShader;j.bind(),j.uniforms=O,this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},i.drawPick=function(T){T=T||{};for(var f=this.gl,u=T.model||v,A=T.view||v,x=T.projection||v,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)z[0][I]=Math.max(z[0][I],this.clipBounds[0][I]),z[1][I]=Math.min(z[1][I],this.clipBounds[1][I]);this._model=[].slice.call(u),this._view=[].slice.call(A),this._projection=[].slice.call(x),this._resolution=[f.drawingBufferWidth,f.drawingBufferHeight];var O={model:u,view:A,projection:x,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},D=this.pickShader;D.bind(),D.uniforms=O,this.triangleCount>0&&(this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},i.pick=function(T){if(!T||T.id!==this.pickId)return null;var f=T.value[0]+256*T.value[1]+65536*T.value[2],u=this.cells[f],A=this.positions[u[1]].slice(0,3),x={position:A,dataCoordinate:A,index:Math.floor(u[1]/48)};return this.traceType==="cone"?x.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(x.intensity=this.intensity[u[1]],x.velocity=this.vectors[u[1]].slice(0,3),x.divergence=this.vectors[u[1]][3],x.index=f),x},i.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 M(T,f){var u=n(T,f.meshShader.vertex,f.meshShader.fragment,null,f.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 C(T,f){var u=n(T,f.pickShader.vertex,f.pickShader.fragment,null,f.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function _(T,f,u){var A=u.shaders;arguments.length===1&&(f=T,T=f.gl);var x=M(T,A),z=C(T,A),I=o(T,m(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=T.LINEAR_MIPMAP_LINEAR,I.magFilter=T.LINEAR;var O=r(T),D=r(T),B=r(T),F=r(T),P=r(T),j=a(T,[{buffer:O,type:T.FLOAT,size:4},{buffer:P,type:T.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:B,type:T.FLOAT,size:4},{buffer:F,type:T.FLOAT,size:2},{buffer:D,type:T.FLOAT,size:4}]),U=new g(T,I,x,z,O,D,P,B,F,j,u.traceType||"cone");return U.update(f),U}l.exports=_},614:function(l,e,t){var n=t(3236),r=n([`precision highp float; +}`]);l.bg=function(y){return c(y,g,m,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935(s,l,n){"use strict";s.exports=x;var u=n(2762),c=n(8116),f=n(4359),h=n(1879).Q,d=window||process.global||{},p=d.__TEXT_CACHE||{};d.__TEXT_CACHE={};var g=3;function m(E,M,C,w){this.gl=E,this.shader=M,this.buffer=C,this.vao=w,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var y=m.prototype,_=[0,0];y.bind=function(E,M,C,w){this.vao.bind(),this.shader.bind();var k=this.shader.uniforms;k.model=E,k.view=M,k.projection=C,k.pixelScale=w,_[0]=this.gl.drawingBufferWidth,_[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=_},y.unbind=function(){this.vao.unbind()},y.update=function(E,M,C,w,k){var T=[];function b(B,O,G,$,X,Z){var J=[G.style,G.weight,G.variant,G.family].join("_"),N=p[J];N||(N=p[J]={});var H=N[O];H||(H=N[O]=v(O,{triangles:!0,font:G.family,fontStyle:G.style,fontWeight:G.weight,fontVariant:G.variant,textAlign:"center",textBaseline:"middle",lineSpacing:X,styletags:Z}));for(var W=($||12)/12,U=H.positions,V=H.cells,j=0,q=V.length;j=0;--K){var re=U[Y[K]];T.push(W*re[0],-W*re[1],B)}}for(var S=[0,0,0],A=[0,0,0],F=[0,0,0],D=[0,0,0],R=1.25,P={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},z=0;z<3;++z){F[z]=T.length/g|0,b(.5*(E[0][z]+E[1][z]),M[z],C[z],12,R,P),D[z]=(T.length/g|0)-F[z],S[z]=T.length/g|0;for(var I=0;I=0&&(g=d.length-p-1);var m=Math.pow(10,g),y=Math.round(f*h*m),_=y+"";if(_.indexOf("e")>=0)return _;var v=y/m,x=y%m;y<0?(v=-Math.ceil(v)|0,x=-x|0):(v=Math.floor(v)|0,x=x|0);var E=""+v;if(y<0&&(E="-"+E),g){for(var M=""+x;M.length=f[0][p];--y)g.push({x:y*h[p],text:n(h[p],y)});d.push(g)}return d}function c(f,h){for(var d=0;d<3;++d){if(f[d].length!==h[d].length)return!1;for(var p=0;pE)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return v.bufferSubData(x,w,C),E}function m(v,x){for(var E=u.malloc(v.length,x),M=v.length,C=0;C=0;--M){if(x[M]!==E)return!1;E*=v[M]}return!0}p.update=function(v,x){if(typeof x!="number"&&(x=-1),this.bind(),typeof v=="object"&&typeof v.shape<"u"){var E=v.dtype;if(h.indexOf(E)<0&&(E="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&E!=="uint16"?E="uint32":E="uint16"}if(E===v.dtype&&y(v.shape,v.stride))v.offset===0&&v.data.length===v.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,v.data,x):this.length=g(this.gl,this.type,this.length,this.usage,v.data.subarray(v.offset,v.shape[0]),x);else{var C=u.malloc(v.size,E),w=f(C,v.shape);c.assign(w,v),x<0?this.length=g(this.gl,this.type,this.length,this.usage,C,x):this.length=g(this.gl,this.type,this.length,this.usage,C.subarray(0,v.size),x),u.free(C)}}else if(Array.isArray(v)){var k;this.type===this.gl.ELEMENT_ARRAY_BUFFER?k=m(v,"uint16"):k=m(v,"float32"),x<0?this.length=g(this.gl,this.type,this.length,this.usage,k,x):this.length=g(this.gl,this.type,this.length,this.usage,k.subarray(0,v.length),x),u.free(k)}else if(typeof v=="object"&&typeof v.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,v,x);else if(typeof v=="number"||v===void 0){if(x>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");v=v|0,v<=0&&(v=1),this.gl.bufferData(this.type,v|0,this.usage),this.length=v}else throw new Error("gl-buffer: Invalid data type")};function _(v,x,E,M){if(E=E||v.ARRAY_BUFFER,M=M||v.DYNAMIC_DRAW,E!==v.ARRAY_BUFFER&&E!==v.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(M!==v.DYNAMIC_DRAW&&M!==v.STATIC_DRAW&&M!==v.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 C=v.createBuffer(),w=new d(v,E,C,0,M);return w.update(x),w}s.exports=_},6405(s,l,n){"use strict";var u=n(2931);s.exports=function(f,h){var d=f.positions,p=f.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:f.vertexIntensityBounds,vectors:[],cells:[],coneOffset:f.coneOffset,colormap:f.colormap};if(f.positions.length===0)return h&&(h[0]=[0,0,0],h[1]=[0,0,0]),g;for(var m=0,y=1/0,_=-1/0,v=1/0,x=-1/0,E=1/0,M=-1/0,C=null,w=null,k=[],T=1/0,b=!1,S=f.coneSizemode==="raw",A=0;Am&&(m=u.length(D)),A&&!S){var R=2*u.distance(C,F)/(u.length(w)+u.length(D));R?(T=Math.min(T,R),b=!1):b=!0}b||(C=F,w=D),k.push(D)}var P=[y,v,E],z=[_,x,M];h&&(h[0]=P,h[1]=z),m===0&&(m=1);var I=1/m;isFinite(T)||(T=1),g.vectorScale=T;var L=f.coneSize||(S?1:.5);f.absoluteConeSize&&(L=f.absoluteConeSize*I),g.coneScale=L;for(var A=0,B=0;A=1},v.isTransparent=function(){return this.opacity<1},v.pickSlots=1,v.setPickBase=function(k){this.pickId=k};function x(k){for(var T=m({colormap:k,nshades:256,format:"rgba"}),b=new Uint8Array(256*4),S=0;S<256;++S){for(var A=T[S],F=0;F<3;++F)b[4*S+F]=A[F];b[4*S+3]=A[3]*255}return g(b,[256,256,4],[4,0,1])}function E(k){for(var T=k.length,b=new Array(T),S=0;S0){var B=this.triShader;B.bind(),B.uniforms=R,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},v.drawPick=function(k){k=k||{};for(var T=this.gl,b=k.model||y,S=k.view||y,A=k.projection||y,F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)F[0][D]=Math.max(F[0][D],this.clipBounds[0][D]),F[1][D]=Math.min(F[1][D],this.clipBounds[1][D]);this._model=[].slice.call(b),this._view=[].slice.call(S),this._projection=[].slice.call(A),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var R={model:b,view:S,projection:A,clipBounds:F,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},P=this.pickShader;P.bind(),P.uniforms=R,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},v.pick=function(k){if(!k||k.id!==this.pickId)return null;var T=k.value[0]+256*k.value[1]+65536*k.value[2],b=this.cells[T],S=this.positions[b[1]].slice(0,3),A={position:S,dataCoordinate:S,index:Math.floor(b[1]/48)};return this.traceType==="cone"?A.index=Math.floor(b[1]/48):this.traceType==="streamtube"&&(A.intensity=this.intensity[b[1]],A.velocity=this.vectors[b[1]].slice(0,3),A.divergence=this.vectors[b[1]][3],A.index=T),A},v.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 M(k,T){var b=u(k,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return b.attributes.position.location=0,b.attributes.color.location=2,b.attributes.uv.location=3,b.attributes.vector.location=4,b}function C(k,T){var b=u(k,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return b.attributes.position.location=0,b.attributes.id.location=1,b.attributes.vector.location=4,b}function w(k,T,b){var S=b.shaders;arguments.length===1&&(T=k,k=T.gl);var A=M(k,S),F=C(k,S),D=h(k,g(new Uint8Array([255,255,255,255]),[1,1,4]));D.generateMipmap(),D.minFilter=k.LINEAR_MIPMAP_LINEAR,D.magFilter=k.LINEAR;var R=c(k),P=c(k),z=c(k),I=c(k),L=c(k),B=f(k,[{buffer:R,type:k.FLOAT,size:4},{buffer:L,type:k.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:z,type:k.FLOAT,size:4},{buffer:I,type:k.FLOAT,size:2},{buffer:P,type:k.FLOAT,size:4}]),O=new _(k,D,A,F,R,P,L,z,I,B,b.traceType||"cone");return O.update(T),O}s.exports=w},614(s,l,n){var u=n(3236),c=u([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -419,7 +419,7 @@ void main() { f_position = position.xyz; f_uv = uv; } -`]),a=n([`#extension GL_OES_standard_derivatives : enable +`]),f=u([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 @@ -510,7 +510,7 @@ void main() { gl_FragColor = litColor * opacity; } -`]),o=n([`precision highp float; +`]),h=u([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -609,7 +609,7 @@ void main() { f_id = id; f_position = position.xyz; } -`]),s=n([`precision highp float; +`]),d=u([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -642,7 +642,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(l){l.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(l,e,t){var n=t(737);l.exports=function(a){return n[a]}},9165:function(l,e,t){"use strict";l.exports=g;var n=t(2762),r=t(8116),a=t(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(i,w,S,M){this.gl=i,this.shader=M,this.buffer=w,this.vao=S,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 c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(i){var w=this.gl,S=this.shader.uniforms;this.shader.bind();var M=S.view=i.view||o,C=S.projection=i.projection||o;S.model=i.model||o,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var _=M[12],T=M[13],f=M[14],u=M[15],A=i._ortho||!1,x=A?2:1,z=x*this.pixelRatio*(C[3]*_+C[7]*T+C[11]*f+C[15]*u)/w.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)w.lineWidth(this.lineWidth[I]*this.pixelRatio),S.capSize=this.capSize[I]*z,this.lineCount[I]&&w.drawArrays(w.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function m(i,w){for(var S=0;S<3;++S)i[0][S]=Math.min(i[0][S],w[S]),i[1][S]=Math.max(i[1][S],w[S])}var h=function(){for(var i=new Array(3),w=0;w<3;++w){for(var S=[],M=1;M<=2;++M)for(var C=-1;C<=1;C+=2){var _=(M+w)%3,T=[0,0,0];T[_]=C,S.push(T)}i[w]=S}return i}();function v(i,w,S,M){for(var C=h[M],_=0;_0){var O=A.slice();O[f]+=z[1][f],C.push(A[0],A[1],A[2],I[0],I[1],I[2],I[3],0,0,0,O[0],O[1],O[2],I[0],I[1],I[2],I[3],0,0,0),m(this.bounds,O),T+=2+v(C,O,I,f)}}}this.lineCount[f]=T-this.lineOffset[f]}this.buffer.update(C)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function g(i){var w=i.gl,S=n(w),M=r(w,[{buffer:S,type:w.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:w.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:w.FLOAT,size:3,offset:28,stride:40}]),C=a(w);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var _=new s(w,S,M,C);return _.update(i),_}},3436:function(l,e,t){"use strict";var n=t(3236),r=t(9405),a=n([`precision highp float; +}`]);l.meshShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},l.pickShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737(s){s.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171(s,l,n){var u=n(737);s.exports=function(f){return u[f]}},9165(s,l,n){"use strict";s.exports=_;var u=n(2762),c=n(8116),f=n(3436),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(v,x,E,M){this.gl=v,this.shader=M,this.buffer=x,this.vao=E,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 p=d.prototype;p.isOpaque=function(){return!this.hasAlpha},p.isTransparent=function(){return this.hasAlpha},p.drawTransparent=p.draw=function(v){var x=this.gl,E=this.shader.uniforms;this.shader.bind();var M=E.view=v.view||h,C=E.projection=v.projection||h;E.model=v.model||h,E.clipBounds=this.clipBounds,E.opacity=this.opacity;var w=M[12],k=M[13],T=M[14],b=M[15],S=v._ortho||!1,A=S?2:1,F=A*this.pixelRatio*(C[3]*w+C[7]*k+C[11]*T+C[15]*b)/x.drawingBufferHeight;this.vao.bind();for(var D=0;D<3;++D)x.lineWidth(this.lineWidth[D]*this.pixelRatio),E.capSize=this.capSize[D]*F,this.lineCount[D]&&x.drawArrays(x.LINES,this.lineOffset[D],this.lineCount[D]);this.vao.unbind()};function g(v,x){for(var E=0;E<3;++E)v[0][E]=Math.min(v[0][E],x[E]),v[1][E]=Math.max(v[1][E],x[E])}var m=(function(){for(var v=new Array(3),x=0;x<3;++x){for(var E=[],M=1;M<=2;++M)for(var C=-1;C<=1;C+=2){var w=(M+x)%3,k=[0,0,0];k[w]=C,E.push(k)}v[x]=E}return v})();function y(v,x,E,M){for(var C=m[M],w=0;w0){var R=S.slice();R[T]+=F[1][T],C.push(S[0],S[1],S[2],D[0],D[1],D[2],D[3],0,0,0,R[0],R[1],R[2],D[0],D[1],D[2],D[3],0,0,0),g(this.bounds,R),k+=2+y(C,R,D,T)}}}this.lineCount[T]=k-this.lineOffset[T]}this.buffer.update(C)}},p.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function _(v){var x=v.gl,E=u(x),M=c(x,[{buffer:E,type:x.FLOAT,size:3,offset:0,stride:40},{buffer:E,type:x.FLOAT,size:4,offset:12,stride:40},{buffer:E,type:x.FLOAT,size:3,offset:28,stride:40}]),C=f(x);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var w=new d(x,E,M,C);return w.update(v),w}},3436(s,l,n){"use strict";var u=n(3236),c=n(9405),f=u([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -658,7 +658,7 @@ void main() { gl_Position = projection * (view * worldPosition); fragColor = color; fragPosition = position; -}`]),o=n([`precision highp float; +}`]),h=u([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -693,13 +693,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);l.exports=function(s){return r(s,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(l,e,t){"use strict";var n=t(7766);l.exports=T;var r=null,a,o,s,c;function m(f){var u=f.getParameter(f.FRAMEBUFFER_BINDING),A=f.getParameter(f.RENDERBUFFER_BINDING),x=f.getParameter(f.TEXTURE_BINDING_2D);return[u,A,x]}function h(f,u){f.bindFramebuffer(f.FRAMEBUFFER,u[0]),f.bindRenderbuffer(f.RENDERBUFFER,u[1]),f.bindTexture(f.TEXTURE_2D,u[2])}function v(f,u){var A=f.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL);r=new Array(A+1);for(var x=0;x<=A;++x){for(var z=new Array(A),I=0;I1&&D.drawBuffersWEBGL(r[O]);var U=A.getExtension("WEBGL_depth_texture");U?B?f.depth=i(A,z,I,U.UNSIGNED_INT_24_8_WEBGL,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F&&(f.depth=i(A,z,I,A.UNSIGNED_SHORT,A.DEPTH_COMPONENT,A.DEPTH_ATTACHMENT)):F&&B?f._depth_rb=w(A,z,I,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F?f._depth_rb=w(A,z,I,A.DEPTH_COMPONENT16,A.DEPTH_ATTACHMENT):B&&(f._depth_rb=w(A,z,I,A.STENCIL_INDEX,A.STENCIL_ATTACHMENT));var $=A.checkFramebufferStatus(A.FRAMEBUFFER);if($!==A.FRAMEBUFFER_COMPLETE){f._destroyed=!0,A.bindFramebuffer(A.FRAMEBUFFER,null),A.deleteFramebuffer(f.handle),f.handle=null,f.depth&&(f.depth.dispose(),f.depth=null),f._depth_rb&&(A.deleteRenderbuffer(f._depth_rb),f._depth_rb=null);for(var j=0;jz||A<0||A>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");f._shape[0]=u,f._shape[1]=A;for(var I=m(x),O=0;OI||A<0||A>I)throw new Error("gl-fbo: Parameters are too large for FBO");x=x||{};var O=1;if("color"in x){if(O=Math.max(x.color|0,0),O<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(O>1)if(z){if(O>f.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+O+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var D=f.UNSIGNED_BYTE,B=f.getExtension("OES_texture_float");if(x.float&&O>0){if(!B)throw new Error("gl-fbo: Context does not support floating point textures");D=f.FLOAT}else x.preferFloat&&O>0&&B&&(D=f.FLOAT);var F=!0;"depth"in x&&(F=!!x.depth);var P=!1;return"stencil"in x&&(P=!!x.stencil),new M(f,u,A,D,O,F,P,z)}},2992:function(l,e,t){var n=t(3387).sprintf,r=t(5171),a=t(1848),o=t(1085);l.exports=s;function s(c,m,h){"use strict";var v=a(m)||"of unknown name (see npm glsl-shader-name)",g="unknown type";h!==void 0&&(g=h===r.FRAGMENT_SHADER?"fragment":"vertex");for(var i=n(`Error compiling %s shader %s: -`,g,v),w=n("%s%s",i,c),S=c.split(` -`),M={},C=0;C1&&P.drawBuffersWEBGL(c[R]);var O=S.getExtension("WEBGL_depth_texture");O?z?T.depth=v(S,F,D,O.UNSIGNED_INT_24_8_WEBGL,S.DEPTH_STENCIL,S.DEPTH_STENCIL_ATTACHMENT):I&&(T.depth=v(S,F,D,S.UNSIGNED_SHORT,S.DEPTH_COMPONENT,S.DEPTH_ATTACHMENT)):I&&z?T._depth_rb=x(S,F,D,S.DEPTH_STENCIL,S.DEPTH_STENCIL_ATTACHMENT):I?T._depth_rb=x(S,F,D,S.DEPTH_COMPONENT16,S.DEPTH_ATTACHMENT):z&&(T._depth_rb=x(S,F,D,S.STENCIL_INDEX,S.STENCIL_ATTACHMENT));var G=S.checkFramebufferStatus(S.FRAMEBUFFER);if(G!==S.FRAMEBUFFER_COMPLETE){T._destroyed=!0,S.bindFramebuffer(S.FRAMEBUFFER,null),S.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(S.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var B=0;BF||S<0||S>F)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=b,T._shape[1]=S;for(var D=g(A),R=0;RD||S<0||S>D)throw new Error("gl-fbo: Parameters are too large for FBO");A=A||{};var R=1;if("color"in A){if(R=Math.max(A.color|0,0),R<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(R>1)if(F){if(R>T.getParameter(F.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+R+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var P=T.UNSIGNED_BYTE,z=T.getExtension("OES_texture_float");if(A.float&&R>0){if(!z)throw new Error("gl-fbo: Context does not support floating point textures");P=T.FLOAT}else A.preferFloat&&R>0&&z&&(P=T.FLOAT);var I=!0;"depth"in A&&(I=!!A.depth);var L=!1;return"stencil"in A&&(L=!!A.stencil),new M(T,b,S,P,R,I,L,F)}},2992(s,l,n){var u=n(3387).sprintf,c=n(5171),f=n(1848),h=n(1085);s.exports=d;function d(p,g,m){"use strict";var y=f(g)||"of unknown name (see npm glsl-shader-name)",_="unknown type";m!==void 0&&(_=m===c.FRAGMENT_SHADER?"fragment":"vertex");for(var v=u(`Error compiling %s shader %s: +`,_,y),x=u("%s%s",v,p),E=p.split(` +`),M={},C=0;C0){for(var se=0;se<24;++se)I.push(I[I.length-12]);F+=2,Q=!0}continue e}P[0][x]=Math.min(P[0][x],re[x],ne[x]),P[1][x]=Math.max(P[1][x],re[x],ne[x])}var G,X;Array.isArray(U[0])?(G=U.length>A-1?U[A-1]:U.length>0?U[U.length-1]:[0,0,0,1],X=U.length>A?U[A]:U.length>0?U[U.length-1]:[0,0,0,1]):G=X=U,G.length===3&&(G=[G[0],G[1],G[2],1]),X.length===3&&(X=[X[0],X[1],X[2],1]),!this.hasAlpha&&G[3]<1&&(this.hasAlpha=!0);var K;Array.isArray($)?K=$.length>A-1?$[A-1]:$.length>0?$[$.length-1]:[0,0,0,1]:K=$;var H=B;if(B+=S(re,ne),Q){for(x=0;x<2;++x)I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],H,K,G[0],G[1],G[2],G[3]);F+=2,Q=!1}I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],H,K,G[0],G[1],G[2],G[3],re[0],re[1],re[2],ne[0],ne[1],ne[2],H,-K,G[0],G[1],G[2],G[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,-K,X[0],X[1],X[2],X[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,K,X[0],X[1],X[2],X[3]),F+=4}}if(this.buffer.update(I),O.push(B),D.push(j[j.length-1].slice()),this.bounds=P,this.vertexCount=F,this.points=D,this.arcLength=O,"dashes"in u){var Y=u.dashes,q=Y.slice();for(q.unshift(0),A=1;A1.0001)return null;x+=A[C]}return Math.abs(x-1)>.001?null:[_,c(h,A),A]}},840:function(l,e,t){var n=t(3236),r=n([`precision highp float; +}`]),p=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];l.createShader=function(g){return c(g,f,h,null,p)},l.createPickShader=function(g){return c(g,f,d,null,p)}},5714(s,l,n){"use strict";s.exports=T;var u=n(2762),c=n(8116),f=n(7766),h=new Uint8Array(4),d=new Float32Array(h.buffer);function p(b,S,A,F){return h[0]=F,h[1]=A,h[2]=S,h[3]=b,d[0]}var g=n(2478),m=n(9618),y=n(7319),_=y.createShader,v=y.createPickShader,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function E(b,S){for(var A=0,F=0;F<3;++F){var D=b[F]-S[F];A+=D*D}return Math.sqrt(A)}function M(b){for(var S=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],A=0;A<3;++A)S[0][A]=Math.max(b[0][A],S[0][A]),S[1][A]=Math.min(b[1][A],S[1][A]);return S}function C(b,S,A,F){this.arcLength=b,this.position=S,this.index=A,this.dataCoordinate=F}function w(b,S,A,F,D,R){this.gl=b,this.shader=S,this.pickShader=A,this.buffer=F,this.vao=D,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=R,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var k=w.prototype;k.isTransparent=function(){return this.hasAlpha},k.isOpaque=function(){return!this.hasAlpha},k.pickSlots=1,k.setPickBase=function(b){this.pickId=b},k.drawTransparent=k.draw=function(b){if(this.vertexCount){var S=this.gl,A=this.shader,F=this.vao;A.bind(),A.uniforms={model:b.model||x,view:b.view||x,projection:b.projection||x,clipBounds:M(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[S.drawingBufferWidth,S.drawingBufferHeight],pixelRatio:this.pixelRatio},F.bind(),F.draw(S.TRIANGLE_STRIP,this.vertexCount),F.unbind()}},k.drawPick=function(b){if(this.vertexCount){var S=this.gl,A=this.pickShader,F=this.vao;A.bind(),A.uniforms={model:b.model||x,view:b.view||x,projection:b.projection||x,pickId:this.pickId,clipBounds:M(this.clipBounds),screenShape:[S.drawingBufferWidth,S.drawingBufferHeight],pixelRatio:this.pixelRatio},F.bind(),F.draw(S.TRIANGLE_STRIP,this.vertexCount),F.unbind()}},k.update=function(b){var S,A;this.dirty=!0;var F=!!b.connectGaps;"dashScale"in b&&(this.dashScale=b.dashScale),this.hasAlpha=!1,"opacity"in b&&(this.opacity=+b.opacity,this.opacity<1&&(this.hasAlpha=!0));var D=[],R=[],P=[],z=0,I=0,L=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],B=b.position||b.positions;if(B){var O=b.color||b.colors||[0,0,0,1],G=b.lineWidth||1,$=!1;e:for(S=1;S0){for(var J=0;J<24;++J)D.push(D[D.length-12]);I+=2,$=!0}continue e}L[0][A]=Math.min(L[0][A],X[A],Z[A]),L[1][A]=Math.max(L[1][A],X[A],Z[A])}var N,H;Array.isArray(O[0])?(N=O.length>S-1?O[S-1]:O.length>0?O[O.length-1]:[0,0,0,1],H=O.length>S?O[S]:O.length>0?O[O.length-1]:[0,0,0,1]):N=H=O,N.length===3&&(N=[N[0],N[1],N[2],1]),H.length===3&&(H=[H[0],H[1],H[2],1]),!this.hasAlpha&&N[3]<1&&(this.hasAlpha=!0);var W;Array.isArray(G)?W=G.length>S-1?G[S-1]:G.length>0?G[G.length-1]:[0,0,0,1]:W=G;var U=z;if(z+=E(X,Z),$){for(A=0;A<2;++A)D.push(X[0],X[1],X[2],Z[0],Z[1],Z[2],U,W,N[0],N[1],N[2],N[3]);I+=2,$=!1}D.push(X[0],X[1],X[2],Z[0],Z[1],Z[2],U,W,N[0],N[1],N[2],N[3],X[0],X[1],X[2],Z[0],Z[1],Z[2],U,-W,N[0],N[1],N[2],N[3],Z[0],Z[1],Z[2],X[0],X[1],X[2],z,-W,H[0],H[1],H[2],H[3],Z[0],Z[1],Z[2],X[0],X[1],X[2],z,W,H[0],H[1],H[2],H[3]),I+=4}}if(this.buffer.update(D),R.push(z),P.push(B[B.length-1].slice()),this.bounds=L,this.vertexCount=I,this.points=P,this.arcLength=R,"dashes"in b){var V=b.dashes,j=V.slice();for(j.unshift(0),S=1;S1.0001)return null;A+=S[C]}return Math.abs(A-1)>.001?null:[w,p(m,S),S]}},840(s,l,n){var u=n(3236),c=u([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -900,7 +900,7 @@ void main() { f_data = position; f_uv = uv; } -`]),a=n([`#extension GL_OES_standard_derivatives : enable +`]),f=u([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 @@ -1005,7 +1005,7 @@ void main() { gl_FragColor = litColor * f_color.a; } -`]),o=n([`precision highp float; +`]),h=u([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1023,7 +1023,7 @@ void main() { f_color = color; f_data = position; f_uv = uv; -}`]),s=n([`precision highp float; +}`]),d=u([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1058,7 +1058,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),c=n([`precision highp float; +}`]),p=u([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1102,7 +1102,7 @@ void main() { gl_PointSize = pointSize; f_color = color; f_uv = uv; -}`]),m=n([`precision highp float; +}`]),g=u([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; @@ -1117,7 +1117,7 @@ void main() { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),h=n([`precision highp float; +}`]),m=u([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1132,7 +1132,7 @@ void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; -}`]),v=n([`precision highp float; +}`]),y=u([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1165,7 +1165,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]),g=n([`precision highp float; +}`]),_=u([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1208,7 +1208,7 @@ void main() { } f_id = id; f_position = position; -}`]),i=n([`precision highp float; +}`]),v=u([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1217,7 +1217,7 @@ uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); -}`]),w=n([`precision highp float; +}`]),x=u([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; @@ -1225,14 +1225,14 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:c,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:h,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:g,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:i,fragment:w,attributes:[{name:"position",type:"vec3"}]}},7201:function(l,e,t){"use strict";var n=1e-6,r=1e-6,a=t(9405),o=t(2762),s=t(8116),c=t(7766),m=t(8406),h=t(6760),v=t(7608),g=t(9618),i=t(6729),w=t(7765),S=t(1888),M=t(840),C=t(7626),_=M.meshShader,T=M.wireShader,f=M.pointShader,u=M.pickShader,A=M.pointPickShader,x=M.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(se,G,X,K,H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve,Ge,ke,_e,ce,ve,le,Ae,Be,Xe,Ye){this.gl=se,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=G,this.dirty=!0,this.triShader=X,this.lineShader=K,this.pointShader=H,this.pickShader=Y,this.pointPickShader=q,this.contourShader=Z,this.trianglePositions=ee,this.triangleColors=he,this.triangleNormals=we,this.triangleUVs=xe,this.triangleIds=ae,this.triangleVAO=Me,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Se,this.edgeColors=Ve,this.edgeUVs=Ge,this.edgeIds=Ie,this.edgeVAO=ke,this.edgeCount=0,this.pointPositions=_e,this.pointColors=ve,this.pointUVs=le,this.pointSizes=Ae,this.pointIds=ce,this.pointVAO=Be,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Xe,this.contourVAO=Ye,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=z,this._view=z,this._projection=z,this._resolution=[1,1]}var O=I.prototype;O.isOpaque=function(){return!this.hasAlpha},O.isTransparent=function(){return this.hasAlpha},O.pickSlots=1,O.setPickBase=function(se){this.pickId=se};function D(se,G){if(!G||!G.length)return 1;for(var X=0;Xse&&X>0){var K=(G[X][0]-se)/(G[X][0]-G[X-1][0]);return G[X][1]*(1-K)+K*G[X-1][1]}}return 1}function B(se,G){for(var X=i({colormap:se,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),H=0;H<256;++H){for(var Y=X[H],q=0;q<3;++q)K[4*H+q]=Y[q];G?K[4*H+3]=255*D(H/255,G):K[4*H+3]=255*Y[3]}return g(K,[256,256,4],[4,0,1])}function F(se){for(var G=se.length,X=new Array(G),K=0;K0){var we=this.triShader;we.bind(),we.uniforms=Z,this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var we=this.lineShader;we.bind(),we.uniforms=Z,this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var we=this.pointShader;we.bind(),we.uniforms=Z,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var we=this.contourShader;we.bind(),we.uniforms=Z,this.contourVAO.bind(),G.drawArrays(G.LINES,0,this.contourCount),this.contourVAO.unbind()}},O.drawPick=function(se){se=se||{};for(var G=this.gl,X=se.model||z,K=se.view||z,H=se.projection||z,Y=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)Y[0][q]=Math.max(Y[0][q],this.clipBounds[0][q]),Y[1][q]=Math.min(Y[1][q],this.clipBounds[1][q]);this._model=[].slice.call(X),this._view=[].slice.call(K),this._projection=[].slice.call(H),this._resolution=[G.drawingBufferWidth,G.drawingBufferHeight];var Z={model:X,view:K,projection:H,clipBounds:Y,pickId:this.pickId/255},ee=this.pickShader;if(ee.bind(),ee.uniforms=Z,this.triangleCount>0&&(this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ee=this.pointPickShader;ee.bind(),ee.uniforms=Z,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}},O.pick=function(se){if(!se||se.id!==this.pickId)return null;for(var G=se.value[0]+256*se.value[1]+65536*se.value[2],X=this.cells[G],K=this.positions,H=new Array(X.length),Y=0;YMath.abs(u))i.rotate(z,0,0,-f*A*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var I=-_.zoomSpeed*x*u/window.innerHeight*(z-i.lastT())/20;i.pan(z,0,0,S*(Math.exp(I)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(l,e,t){var n=t(3236),r=t(9405),a=n([`precision mediump float; +`]);l.meshShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},l.wireShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},l.pointShader={vertex:p,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},l.pickShader={vertex:m,fragment:y,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},l.pointPickShader={vertex:_,fragment:y,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},l.contourShader={vertex:v,fragment:x,attributes:[{name:"position",type:"vec3"}]}},7201(s,l,n){"use strict";var u=1e-6,c=1e-6,f=n(9405),h=n(2762),d=n(8116),p=n(7766),g=n(8406),m=n(6760),y=n(7608),_=n(9618),v=n(6729),x=n(7765),E=n(1888),M=n(840),C=n(7626),w=M.meshShader,k=M.wireShader,T=M.pointShader,b=M.pickShader,S=M.pointPickShader,A=M.contourShader,F=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function D(J,N,H,W,U,V,j,q,Y,K,re,se,le,ue,fe,pe,we,xe,he,oe,te,ie,ee,ce,_e,Se,Me){this.gl=J,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=N,this.dirty=!0,this.triShader=H,this.lineShader=W,this.pointShader=U,this.pickShader=V,this.pointPickShader=j,this.contourShader=q,this.trianglePositions=Y,this.triangleColors=re,this.triangleNormals=le,this.triangleUVs=se,this.triangleIds=K,this.triangleVAO=ue,this.triangleCount=0,this.lineWidth=1,this.edgePositions=fe,this.edgeColors=we,this.edgeUVs=xe,this.edgeIds=pe,this.edgeVAO=he,this.edgeCount=0,this.pointPositions=oe,this.pointColors=ie,this.pointUVs=ee,this.pointSizes=ce,this.pointIds=te,this.pointVAO=_e,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Se,this.contourVAO=Me,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=F,this._view=F,this._projection=F,this._resolution=[1,1]}var R=D.prototype;R.isOpaque=function(){return!this.hasAlpha},R.isTransparent=function(){return this.hasAlpha},R.pickSlots=1,R.setPickBase=function(J){this.pickId=J};function P(J,N){if(!N||!N.length)return 1;for(var H=0;HJ&&H>0){var W=(N[H][0]-J)/(N[H][0]-N[H-1][0]);return N[H][1]*(1-W)+W*N[H-1][1]}}return 1}function z(J,N){for(var H=v({colormap:J,nshades:256,format:"rgba"}),W=new Uint8Array(256*4),U=0;U<256;++U){for(var V=H[U],j=0;j<3;++j)W[4*U+j]=V[j];N?W[4*U+3]=255*P(U/255,N):W[4*U+3]=255*V[3]}return _(W,[256,256,4],[4,0,1])}function I(J){for(var N=J.length,H=new Array(N),W=0;W0){var le=this.triShader;le.bind(),le.uniforms=q,this.triangleVAO.bind(),N.drawArrays(N.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var le=this.lineShader;le.bind(),le.uniforms=q,this.edgeVAO.bind(),N.lineWidth(this.lineWidth*this.pixelRatio),N.drawArrays(N.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var le=this.pointShader;le.bind(),le.uniforms=q,this.pointVAO.bind(),N.drawArrays(N.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var le=this.contourShader;le.bind(),le.uniforms=q,this.contourVAO.bind(),N.drawArrays(N.LINES,0,this.contourCount),this.contourVAO.unbind()}},R.drawPick=function(J){J=J||{};for(var N=this.gl,H=J.model||F,W=J.view||F,U=J.projection||F,V=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],j=0;j<3;++j)V[0][j]=Math.max(V[0][j],this.clipBounds[0][j]),V[1][j]=Math.min(V[1][j],this.clipBounds[1][j]);this._model=[].slice.call(H),this._view=[].slice.call(W),this._projection=[].slice.call(U),this._resolution=[N.drawingBufferWidth,N.drawingBufferHeight];var q={model:H,view:W,projection:U,clipBounds:V,pickId:this.pickId/255},Y=this.pickShader;if(Y.bind(),Y.uniforms=q,this.triangleCount>0&&(this.triangleVAO.bind(),N.drawArrays(N.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),N.lineWidth(this.lineWidth*this.pixelRatio),N.drawArrays(N.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Y=this.pointPickShader;Y.bind(),Y.uniforms=q,this.pointVAO.bind(),N.drawArrays(N.POINTS,0,this.pointCount),this.pointVAO.unbind()}},R.pick=function(J){if(!J||J.id!==this.pickId)return null;for(var N=J.value[0]+256*J.value[1]+65536*J.value[2],H=this.cells[N],W=this.positions,U=new Array(H.length),V=0;VMath.abs(b))v.rotate(F,0,0,-T*S*Math.PI*w.rotateSpeed/window.innerWidth);else if(!w._ortho){var D=-w.zoomSpeed*A*b/window.innerHeight*(F-v.lastT())/20;v.pan(F,0,0,E*(Math.exp(D)-1))}}},!0)},w.enableMouseListeners(),w}},799(s,l,n){var u=n(3236),c=n(9405),f=u([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); -}`]),o=n([`precision mediump float; +}`]),h=u([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; @@ -1241,7 +1241,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);l.exports=function(s){return r(s,a,o,null,[{name:"position",type:"vec2"}])}},4100:function(l,e,t){"use strict";var n=t(4437),r=t(3837),a=t(5445),o=t(4449),s=t(3589),c=t(2260),m=t(7169),h=t(351),v=t(4772),g=t(4040),i=t(799),w=t(9216)({tablet:!0,featureDetect:!0});l.exports={createScene:T,createCamera:n};function S(){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 M(u,A){var x=null;try{x=u.getContext("webgl",A),x||(x=u.getContext("experimental-webgl",A))}catch{return null}return x}function C(u){var A=Math.round(Math.log(Math.abs(u))/Math.log(10));if(A<0){var x=Math.round(Math.pow(10,-A));return Math.ceil(u*x)/x}else if(A>0){var x=Math.round(Math.pow(10,A));return Math.ceil(u/x)*x}return Math.ceil(u)}function _(u){return typeof u=="boolean"?u:!0}function T(u){u=u||{},u.camera=u.camera||{};var A=u.canvas;if(!A)if(A=document.createElement("canvas"),u.container){var x=u.container;x.appendChild(A)}else document.body.appendChild(A);var z=u.gl;if(z||(u.glOptions&&(w=!!u.glOptions.preserveDrawingBuffer),z=M(A,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!z)throw new Error("webgl not supported");var I=u.bounds||[[-10,-10,-10],[10,10,10]],O=new S,D=c(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!w}),B=i(z),F=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:F},j=u.axes||{},U=r(z,j);U.enable=!j.disable;var $=u.spikes||{},Q=o(z,$),re=[],ne=[],se=[],G=[],X=!0,q=!0,K=new Array(16),H=new Array(16),Y={view:null,projection:K,model:H,_ortho:!1},q=!0,Z=[z.drawingBufferWidth,z.drawingBufferHeight],ee=u.cameraObject||n(A,P),ae={gl:z,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:A,selection:O,camera:ee,axes:U,axesPixels:null,spikes:Q,bounds:I,objects:re,shape:Z,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:_(u.autoResize),autoBounds:_(u.autoBounds),autoScale:!!u.autoScale,autoCenter:_(u.autoCenter),clipToBounds:_(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:Y,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(_e){this.aspect[0]=_e.x,this.aspect[1]=_e.y,this.aspect[2]=_e.z,q=!0},setBounds:function(_e,ce){this.bounds[0][_e]=ce.min,this.bounds[1][_e]=ce.max},setClearColor:function(_e){this.clearColor=_e},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)}},he=[z.drawingBufferWidth/ae.pixelRatio|0,z.drawingBufferHeight/ae.pixelRatio|0];function xe(){if(!ae._stopped&&ae.autoResize){var _e=A.parentNode,ce=1,ve=1;_e&&_e!==document.body?(ce=_e.clientWidth,ve=_e.clientHeight):(ce=window.innerWidth,ve=window.innerHeight);var le=Math.ceil(ce*ae.pixelRatio)|0,Ae=Math.ceil(ve*ae.pixelRatio)|0;if(le!==A.width||Ae!==A.height){A.width=le,A.height=Ae;var Be=A.style;Be.position=Be.position||"absolute",Be.left="0px",Be.top="0px",Be.width=ce+"px",Be.height=ve+"px",X=!0}}}ae.autoResize&&xe(),window.addEventListener("resize",xe);function we(){for(var _e=re.length,ce=G.length,ve=0;ve0&&se[ce-1]===0;)se.pop(),G.pop().dispose()}ae.update=function(_e){ae._stopped||(_e=_e||{},X=!0,q=!0)},ae.add=function(_e){ae._stopped||(_e.axes=U,re.push(_e),ne.push(-1),X=!0,q=!0,we())},ae.remove=function(_e){if(!ae._stopped){var ce=re.indexOf(_e);ce<0||(re.splice(ce,1),ne.pop(),X=!0,q=!0,we())}},ae.dispose=function(){if(!ae._stopped&&(ae._stopped=!0,window.removeEventListener("resize",xe),A.removeEventListener("webglcontextlost",Me),ae.mouseListener.enabled=!1,!ae.contextLost)){U.dispose(),Q.dispose();for(var _e=0;_eO.distance)continue;for(var gt=0;gt1e-6?(w=Math.acos(S),M=Math.sin(w),C=Math.sin((1-a)*w)/M,_=Math.sin(a*w)/M):(C=1-a,_=a),t[0]=C*o+_*h,t[1]=C*s+_*v,t[2]=C*c+_*g,t[3]=C*m+_*i,t}},5964:function(l){"use strict";l.exports=function(e){return!e&&e!==0?"":e.toString()}},9366:function(l,e,t){"use strict";var n=t(4359);l.exports=a;var r={};function a(o,s,c){var m=[s.style,s.weight,s.variant,s.family].join("_"),h=r[m];if(h||(h=r[m]={}),o in h)return h[o];var v={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};v.triangles=!0;var g=n(o,v);v.triangles=!1;var i=n(o,v),w,S;if(c&&c!==1){for(w=0;w0){var A=Math.round(Math.pow(10,S));return Math.ceil(b/A)*A}return Math.ceil(b)}function w(b){return typeof b=="boolean"?b:!0}function k(b){b=b||{},b.camera=b.camera||{};var S=b.canvas;if(!S)if(S=document.createElement("canvas"),b.container){var A=b.container;A.appendChild(S)}else document.body.appendChild(S);var F=b.gl;if(F||(b.glOptions&&(x=!!b.glOptions.preserveDrawingBuffer),F=M(S,b.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:x})),!F)throw new Error("webgl not supported");var D=b.bounds||[[-10,-10,-10],[10,10,10]],R=new E,P=p(F,F.drawingBufferWidth,F.drawingBufferHeight,{preferFloat:!x}),z=v(F),I=b.cameraObject&&b.cameraObject._ortho===!0||b.camera.projection&&b.camera.projection.type==="orthographic"||!1,L={eye:b.camera.eye||[2,0,0],center:b.camera.center||[0,0,0],up:b.camera.up||[0,1,0],zoomMin:b.camera.zoomMax||.1,zoomMax:b.camera.zoomMin||100,mode:b.camera.mode||"turntable",_ortho:I},B=b.axes||{},O=c(F,B);O.enable=!B.disable;var G=b.spikes||{},$=h(F,G),X=[],Z=[],J=[],N=[],H=!0,j=!0,W=new Array(16),U=new Array(16),V={view:null,projection:W,model:U,_ortho:!1},j=!0,q=[F.drawingBufferWidth,F.drawingBufferHeight],Y=b.cameraObject||u(S,L),K={gl:F,contextLost:!1,pixelRatio:b.pixelRatio||1,canvas:S,selection:R,camera:Y,axes:O,axesPixels:null,spikes:$,bounds:D,objects:X,shape:q,aspect:b.aspectRatio||[1,1,1],pickRadius:b.pickRadius||10,zNear:b.zNear||.01,zFar:b.zFar||1e3,fovy:b.fovy||Math.PI/4,clearColor:b.clearColor||[0,0,0,0],autoResize:w(b.autoResize),autoBounds:w(b.autoBounds),autoScale:!!b.autoScale,autoCenter:w(b.autoCenter),clipToBounds:w(b.clipToBounds),snapToData:!!b.snapToData,onselect:b.onselect||null,onrender:b.onrender||null,onclick:b.onclick||null,cameraParams:V,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(oe){this.aspect[0]=oe.x,this.aspect[1]=oe.y,this.aspect[2]=oe.z,j=!0},setBounds:function(oe,te){this.bounds[0][oe]=te.min,this.bounds[1][oe]=te.max},setClearColor:function(oe){this.clearColor=oe},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)}},re=[F.drawingBufferWidth/K.pixelRatio|0,F.drawingBufferHeight/K.pixelRatio|0];function se(){if(!K._stopped&&K.autoResize){var oe=S.parentNode,te=1,ie=1;oe&&oe!==document.body?(te=oe.clientWidth,ie=oe.clientHeight):(te=window.innerWidth,ie=window.innerHeight);var ee=Math.ceil(te*K.pixelRatio)|0,ce=Math.ceil(ie*K.pixelRatio)|0;if(ee!==S.width||ce!==S.height){S.width=ee,S.height=ce;var _e=S.style;_e.position=_e.position||"absolute",_e.left="0px",_e.top="0px",_e.width=te+"px",_e.height=ie+"px",H=!0}}}K.autoResize&&se(),window.addEventListener("resize",se);function le(){for(var oe=X.length,te=N.length,ie=0;ie0&&J[te-1]===0;)J.pop(),N.pop().dispose()}K.update=function(oe){K._stopped||(oe=oe||{},H=!0,j=!0)},K.add=function(oe){K._stopped||(oe.axes=O,X.push(oe),Z.push(-1),H=!0,j=!0,le())},K.remove=function(oe){if(!K._stopped){var te=X.indexOf(oe);te<0||(X.splice(te,1),Z.pop(),H=!0,j=!0,le())}},K.dispose=function(){if(!K._stopped&&(K._stopped=!0,window.removeEventListener("resize",se),S.removeEventListener("webglcontextlost",ue),K.mouseListener.enabled=!1,!K.contextLost)){O.dispose(),$.dispose();for(var oe=0;oeR.distance)continue;for(var Ge=0;Ge1e-6?(x=Math.acos(E),M=Math.sin(x),C=Math.sin((1-f)*x)/M,w=Math.sin(f*x)/M):(C=1-f,w=f),n[0]=C*h+w*m,n[1]=C*d+w*y,n[2]=C*p+w*_,n[3]=C*g+w*v,n}},5964(s){"use strict";s.exports=function(l){return!l&&l!==0?"":l.toString()}},9366(s,l,n){"use strict";var u=n(4359);s.exports=f;var c={};function f(h,d,p){var g=[d.style,d.weight,d.variant,d.family].join("_"),m=c[g];if(m||(m=c[g]={}),h in m)return m[h];var y={textAlign:"center",textBaseline:"middle",lineHeight:1,font:d.family,fontStyle:d.style,fontWeight:d.weight,fontVariant:d.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};y.triangles=!0;var _=u(h,y);y.triangles=!1;var v=u(h,y),x,E;if(p&&p!==1){for(x=0;x<_.positions.length;++x)for(E=0;E<_.positions[x].length;++E)_.positions[x][E]/=p;for(x=0;x1?1:H}function f(H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie){this.gl=H,this.pixelRatio=1,this.shader=Y,this.orthoShader=q,this.projectShader=Z,this.pointBuffer=ee,this.colorBuffer=ae,this.glyphBuffer=he,this.idBuffer=xe,this.vao=we,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=Me,this.pickOrthoShader=Se,this.pickProjectShader=Ie,this.points=[],this._selectResult=new _(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=f.prototype;u.pickSlots=1,u.setPickBase=function(H){this.pickId=H},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&!this.projectHasAlpha)return!0;return!1};var A=[0,0],x=[0,0,0],z=[0,0,0],I=[0,0,0,1],O=[0,0,0,1],D=v.slice(),B=[0,0,0],F=[[0,0,0],[0,0,0]];function P(H){return H[0]=H[1]=H[2]=0,H}function j(H,Y){return H[0]=Y[0],H[1]=Y[1],H[2]=Y[2],H[3]=1,H}function U(H,Y,q,Z){return H[0]=Y[0],H[1]=Y[1],H[2]=Y[2],H[q]=Z,H}function $(H){for(var Y=F,q=0;q<2;++q)for(var Z=0;Z<3;++Z)Y[q][Z]=Math.max(Math.min(H[q][Z],1e8),-1e8);return Y}function Q(H,Y,q,Z){var ee=Y.axesProject,ae=Y.gl,he=H.uniforms,xe=q.model||v,we=q.view||v,Me=q.projection||v,Se=Y.axesBounds,Ie=$(Y.clipBounds),Ve;Y.axes&&Y.axes.lastCubeProps?Ve=Y.axes.lastCubeProps.axis:Ve=[1,1,1],A[0]=2/ae.drawingBufferWidth,A[1]=2/ae.drawingBufferHeight,H.bind(),he.view=we,he.projection=Me,he.screenSize=A,he.highlightId=Y.highlightId,he.highlightScale=Y.highlightScale,he.clipBounds=Ie,he.pickGroup=Y.pickId/255,he.pixelRatio=Z;for(var Ge=0;Ge<3;++Ge)if(ee[Ge]){he.scale=Y.projectScale[Ge],he.opacity=Y.projectOpacity[Ge];for(var ke=D,_e=0;_e<16;++_e)ke[_e]=0;for(var _e=0;_e<4;++_e)ke[5*_e]=1;ke[5*Ge]=0,Ve[Ge]<0?ke[12+Ge]=Se[0][Ge]:ke[12+Ge]=Se[1][Ge],s(ke,xe,ke),he.model=ke;var ce=(Ge+1)%3,ve=(Ge+2)%3,le=P(x),Ae=P(z);le[ce]=1,Ae[ve]=1;var Be=C(Me,we,xe,j(I,le)),Xe=C(Me,we,xe,j(O,Ae));if(Math.abs(Be[1])>Math.abs(Xe[1])){var Ye=Be;Be=Xe,Xe=Ye,Ye=le,le=Ae,Ae=Ye;var yt=ce;ce=ve,ve=yt}Be[0]<0&&(le[ce]=-1),Xe[1]>0&&(Ae[ve]=-1);for(var gt=0,Tt=0,_e=0;_e<4;++_e)gt+=Math.pow(xe[4*ce+_e],2),Tt+=Math.pow(xe[4*ve+_e],2);le[ce]/=Math.sqrt(gt),Ae[ve]/=Math.sqrt(Tt),he.axes[0]=le,he.axes[1]=Ae,he.fragClipBounds[0]=U(B,Ie[0],Ge,-1e8),he.fragClipBounds[1]=U(B,Ie[1],Ge,1e8),Y.vao.bind(),Y.vao.draw(ae.TRIANGLES,Y.vertexCount),Y.lineWidth>0&&(ae.lineWidth(Y.lineWidth*Z),Y.vao.draw(ae.LINES,Y.lineVertexCount,Y.vertexCount)),Y.vao.unbind()}}var re=[-1e8,-1e8,-1e8],ne=[1e8,1e8,1e8],se=[re,ne];function G(H,Y,q,Z,ee,ae,he){var xe=q.gl;if((ae===q.projectHasAlpha||he)&&Q(Y,q,Z,ee),ae===q.hasAlpha||he){H.bind();var we=H.uniforms;we.model=Z.model||v,we.view=Z.view||v,we.projection=Z.projection||v,A[0]=2/xe.drawingBufferWidth,A[1]=2/xe.drawingBufferHeight,we.screenSize=A,we.highlightId=q.highlightId,we.highlightScale=q.highlightScale,we.fragClipBounds=se,we.clipBounds=q.axes.bounds,we.opacity=q.opacity,we.pickGroup=q.pickId/255,we.pixelRatio=ee,q.vao.bind(),q.vao.draw(xe.TRIANGLES,q.vertexCount),q.lineWidth>0&&(xe.lineWidth(q.lineWidth*ee),q.vao.draw(xe.LINES,q.lineVertexCount,q.vertexCount)),q.vao.unbind()}}u.draw=function(H){var Y=this.useOrtho?this.orthoShader:this.shader;G(Y,this.projectShader,this,H,this.pixelRatio,!1,!1)},u.drawTransparent=function(H){var Y=this.useOrtho?this.orthoShader:this.shader;G(Y,this.projectShader,this,H,this.pixelRatio,!0,!1)},u.drawPick=function(H){var Y=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;G(Y,this.pickProjectShader,this,H,1,!0,!0)},u.pick=function(H){if(!H||H.id!==this.pickId)return null;var Y=H.value[2]+(H.value[1]<<8)+(H.value[0]<<16);if(Y>=this.pointCount||Y<0)return null;var q=this.points[Y],Z=this._selectResult;Z.index=Y;for(var ee=0;ee<3;++ee)Z.position[ee]=Z.dataCoordinate[ee]=q[ee];return Z},u.highlight=function(H){if(!H)this.highlightId=[1,1,1,1];else{var Y=H.index,q=Y&255,Z=Y>>8&255,ee=Y>>16&255;this.highlightId=[q/255,Z/255,ee/255,0]}};function X(H,Y,q,Z){var ee;S(H)?Y0){var or=0,Ot=ve,vt=[0,0,0,1],ht=[0,0,0,1],De=S(Ve)&&S(Ve[0]),Ne=S(_e)&&S(_e[0]);e:for(var Z=0;Z0?1-Tt[0][0]:Pt<0?1+Tt[1][0]:1,Ct*=Ct>0?1-Tt[0][1]:Ct<0?1+Tt[1][1]:1;for(var qt=[Pt,Ct],Yt=yt.cells||[],Rt=yt.positions||[],Xe=0;Xethis.buffer.length){r.free(this.buffer);for(var S=this.buffer=r.mallocUint8(o(w*i*4)),M=0;MS)for(i=S;iw)for(i=w;i=0){for(var F=B.type.charAt(B.type.length-1)|0,P=new Array(F),j=0;j=0;)U+=1;O[D]=U}var $=new Array(S.length);function Q(){_.program=o.program(T,_._vref,_._fref,I,O);for(var re=0;re=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+T);s(h,v,f[0],i,u,w,_)}else if(T.indexOf("mat")>=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+T);c(h,v,f,i,u,w,_)}else throw new n("","Unknown data type for attribute "+_+": "+T);break}}return w}},3327:function(l,e,t){"use strict";var n=t(216),r=t(8866);l.exports=s;function a(c){return function(){return c}}function o(c,m){for(var h=new Array(c),v=0;v4)throw new r("","Invalid data type");switch(U.charAt(0)){case"b":case"i":c["uniform"+$+"iv"](v[O],D);break;case"v":c["uniform"+$+"fv"](v[O],D);break;default:throw new r("","Unrecognized data type for vector "+name+": "+U)}}else if(U.indexOf("mat")===0&&U.length===4){if($=U.charCodeAt(U.length-1)-48,$<2||$>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+U);c["uniformMatrix"+$+"fv"](v[O],!1,D);break}else throw new r("","Unknown uniform data type for "+name+": "+U)}}}}}function w(T,f){if(typeof f!="object")return[[T,f]];var u=[];for(var A in f){var x=f[A],z=T;parseInt(A)+""===A?z+="["+A+"]":z+="."+A,typeof x=="object"?u.push.apply(u,w(z,x)):u.push([z,x])}return u}function S(T){switch(T){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var f=T.indexOf("vec");if(0<=f&&f<=1&&T.length===4+f){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid data type");return T.charAt(0)==="b"?o(u,!1):o(u,0)}else if(T.indexOf("mat")===0&&T.length===4){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+T);return o(u*u,0)}else throw new r("","Unknown uniform data type for "+name+": "+T)}}function M(T,f,u){if(typeof u=="object"){var A=C(u);Object.defineProperty(T,f,{get:a(A),set:i(u),enumerable:!0,configurable:!1})}else v[u]?Object.defineProperty(T,f,{get:g(u),set:i(u),enumerable:!0,configurable:!1}):T[f]=S(h[u].type)}function C(T){var f;if(Array.isArray(T)){f=new Array(T.length);for(var u=0;u1){h[0]in c||(c[h[0]]=[]),c=c[h[0]];for(var v=1;v1)for(var w=0;w"u"?t(606):WeakMap,o=new a,s=0;function c(M,C,_,T,f,u,A){this.id=M,this.src=C,this.type=_,this.shader=T,this.count=u,this.programs=[],this.cache=A}c.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,C=M.gl,_=this.programs,T=0,f=_.length;T1?1:U}function T(U,V,j,q,Y,K,re,se,le,ue,fe,pe){this.gl=U,this.pixelRatio=1,this.shader=V,this.orthoShader=j,this.projectShader=q,this.pointBuffer=Y,this.colorBuffer=K,this.glyphBuffer=re,this.idBuffer=se,this.vao=le,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=ue,this.pickOrthoShader=fe,this.pickProjectShader=pe,this.points=[],this._selectResult=new w(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 b=T.prototype;b.pickSlots=1,b.setPickBase=function(U){this.pickId=U},b.isTransparent=function(){if(this.hasAlpha)return!0;for(var U=0;U<3;++U)if(this.axesProject[U]&&this.projectHasAlpha)return!0;return!1},b.isOpaque=function(){if(!this.hasAlpha)return!0;for(var U=0;U<3;++U)if(this.axesProject[U]&&!this.projectHasAlpha)return!0;return!1};var S=[0,0],A=[0,0,0],F=[0,0,0],D=[0,0,0,1],R=[0,0,0,1],P=y.slice(),z=[0,0,0],I=[[0,0,0],[0,0,0]];function L(U){return U[0]=U[1]=U[2]=0,U}function B(U,V){return U[0]=V[0],U[1]=V[1],U[2]=V[2],U[3]=1,U}function O(U,V,j,q){return U[0]=V[0],U[1]=V[1],U[2]=V[2],U[j]=q,U}function G(U){for(var V=I,j=0;j<2;++j)for(var q=0;q<3;++q)V[j][q]=Math.max(Math.min(U[j][q],1e8),-1e8);return V}function $(U,V,j,q){var Y=V.axesProject,K=V.gl,re=U.uniforms,se=j.model||y,le=j.view||y,ue=j.projection||y,fe=V.axesBounds,pe=G(V.clipBounds),we;V.axes&&V.axes.lastCubeProps?we=V.axes.lastCubeProps.axis:we=[1,1,1],S[0]=2/K.drawingBufferWidth,S[1]=2/K.drawingBufferHeight,U.bind(),re.view=le,re.projection=ue,re.screenSize=S,re.highlightId=V.highlightId,re.highlightScale=V.highlightScale,re.clipBounds=pe,re.pickGroup=V.pickId/255,re.pixelRatio=q;for(var xe=0;xe<3;++xe)if(Y[xe]){re.scale=V.projectScale[xe],re.opacity=V.projectOpacity[xe];for(var he=P,oe=0;oe<16;++oe)he[oe]=0;for(var oe=0;oe<4;++oe)he[5*oe]=1;he[5*xe]=0,we[xe]<0?he[12+xe]=fe[0][xe]:he[12+xe]=fe[1][xe],d(he,se,he),re.model=he;var te=(xe+1)%3,ie=(xe+2)%3,ee=L(A),ce=L(F);ee[te]=1,ce[ie]=1;var _e=C(ue,le,se,B(D,ee)),Se=C(ue,le,se,B(R,ce));if(Math.abs(_e[1])>Math.abs(Se[1])){var Me=_e;_e=Se,Se=Me,Me=ee,ee=ce,ce=Me;var Ue=te;te=ie,ie=Ue}_e[0]<0&&(ee[te]=-1),Se[1]>0&&(ce[ie]=-1);for(var Ge=0,Ze=0,oe=0;oe<4;++oe)Ge+=Math.pow(se[4*te+oe],2),Ze+=Math.pow(se[4*ie+oe],2);ee[te]/=Math.sqrt(Ge),ce[ie]/=Math.sqrt(Ze),re.axes[0]=ee,re.axes[1]=ce,re.fragClipBounds[0]=O(z,pe[0],xe,-1e8),re.fragClipBounds[1]=O(z,pe[1],xe,1e8),V.vao.bind(),V.vao.draw(K.TRIANGLES,V.vertexCount),V.lineWidth>0&&(K.lineWidth(V.lineWidth*q),V.vao.draw(K.LINES,V.lineVertexCount,V.vertexCount)),V.vao.unbind()}}var X=[-1e8,-1e8,-1e8],Z=[1e8,1e8,1e8],J=[X,Z];function N(U,V,j,q,Y,K,re){var se=j.gl;if((K===j.projectHasAlpha||re)&&$(V,j,q,Y),K===j.hasAlpha||re){U.bind();var le=U.uniforms;le.model=q.model||y,le.view=q.view||y,le.projection=q.projection||y,S[0]=2/se.drawingBufferWidth,S[1]=2/se.drawingBufferHeight,le.screenSize=S,le.highlightId=j.highlightId,le.highlightScale=j.highlightScale,le.fragClipBounds=J,le.clipBounds=j.axes.bounds,le.opacity=j.opacity,le.pickGroup=j.pickId/255,le.pixelRatio=Y,j.vao.bind(),j.vao.draw(se.TRIANGLES,j.vertexCount),j.lineWidth>0&&(se.lineWidth(j.lineWidth*Y),j.vao.draw(se.LINES,j.lineVertexCount,j.vertexCount)),j.vao.unbind()}}b.draw=function(U){var V=this.useOrtho?this.orthoShader:this.shader;N(V,this.projectShader,this,U,this.pixelRatio,!1,!1)},b.drawTransparent=function(U){var V=this.useOrtho?this.orthoShader:this.shader;N(V,this.projectShader,this,U,this.pixelRatio,!0,!1)},b.drawPick=function(U){var V=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;N(V,this.pickProjectShader,this,U,1,!0,!0)},b.pick=function(U){if(!U||U.id!==this.pickId)return null;var V=U.value[2]+(U.value[1]<<8)+(U.value[0]<<16);if(V>=this.pointCount||V<0)return null;var j=this.points[V],q=this._selectResult;q.index=V;for(var Y=0;Y<3;++Y)q.position[Y]=q.dataCoordinate[Y]=j[Y];return q},b.highlight=function(U){if(!U)this.highlightId=[1,1,1,1];else{var V=U.index,j=V&255,q=V>>8&255,Y=V>>16&255;this.highlightId=[j/255,q/255,Y/255,0]}};function H(U,V,j,q){var Y;E(U)?V0){var Tt=0,st=ie,Ve=[0,0,0,1],Ye=[0,0,0,1],me=E(we)&&E(we[0]),be=E(oe)&&E(oe[0]);e:for(var q=0;q0?1-Ze[0][0]:at<0?1+Ze[1][0]:1,tt*=tt>0?1-Ze[0][1]:tt<0?1+Ze[1][1]:1;for(var ct=[at,tt],mt=Ue.cells||[],gt=Ue.positions||[],Se=0;Sethis.buffer.length){c.free(this.buffer);for(var E=this.buffer=c.mallocUint8(h(x*v*4)),M=0;ME)for(v=E;vx)for(v=x;v=0){for(var I=z.type.charAt(z.type.length-1)|0,L=new Array(I),B=0;B=0;)O+=1;R[P]=O}var G=new Array(E.length);function $(){w.program=h.program(k,w._vref,w._fref,D,R);for(var X=0;X=0){var b=k.charCodeAt(k.length-1)-48;if(b<2||b>4)throw new u("","Invalid data type for attribute "+w+": "+k);d(m,y,T[0],v,b,x,w)}else if(k.indexOf("mat")>=0){var b=k.charCodeAt(k.length-1)-48;if(b<2||b>4)throw new u("","Invalid data type for attribute "+w+": "+k);p(m,y,T,v,b,x,w)}else throw new u("","Unknown data type for attribute "+w+": "+k);break}}return x}},3327(s,l,n){"use strict";var u=n(216),c=n(8866);s.exports=d;function f(p){return function(){return p}}function h(p,g){for(var m=new Array(p),y=0;y4)throw new c("","Invalid data type");switch(O.charAt(0)){case"b":case"i":p["uniform"+G+"iv"](y[R],P);break;case"v":p["uniform"+G+"fv"](y[R],P);break;default:throw new c("","Unrecognized data type for vector "+name+": "+O)}}else if(O.indexOf("mat")===0&&O.length===4){if(G=O.charCodeAt(O.length-1)-48,G<2||G>4)throw new c("","Invalid uniform dimension type for matrix "+name+": "+O);p["uniformMatrix"+G+"fv"](y[R],!1,P);break}else throw new c("","Unknown uniform data type for "+name+": "+O)}}}}}function x(k,T){if(typeof T!="object")return[[k,T]];var b=[];for(var S in T){var A=T[S],F=k;parseInt(S)+""===S?F+="["+S+"]":F+="."+S,typeof A=="object"?b.push.apply(b,x(F,A)):b.push([F,A])}return b}function E(k){switch(k){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=k.indexOf("vec");if(0<=T&&T<=1&&k.length===4+T){var b=k.charCodeAt(k.length-1)-48;if(b<2||b>4)throw new c("","Invalid data type");return k.charAt(0)==="b"?h(b,!1):h(b,0)}else if(k.indexOf("mat")===0&&k.length===4){var b=k.charCodeAt(k.length-1)-48;if(b<2||b>4)throw new c("","Invalid uniform dimension type for matrix "+name+": "+k);return h(b*b,0)}else throw new c("","Unknown uniform data type for "+name+": "+k)}}function M(k,T,b){if(typeof b=="object"){var S=C(b);Object.defineProperty(k,T,{get:f(S),set:v(b),enumerable:!0,configurable:!1})}else y[b]?Object.defineProperty(k,T,{get:_(b),set:v(b),enumerable:!0,configurable:!1}):k[T]=E(m[b].type)}function C(k){var T;if(Array.isArray(k)){T=new Array(k.length);for(var b=0;b1){m[0]in p||(p[m[0]]=[]),p=p[m[0]];for(var y=1;y1)for(var x=0;x<_.size;++x)m.push({name:_.name.replace("[0]","["+x+"]"),type:v});else m.push({name:_.name,type:v})}}return m}function h(d,p){for(var g=d.getProgramParameter(p,d.ACTIVE_ATTRIBUTES),m=[],y=0;y"u"?n(606):WeakMap,h=new f,d=0;function p(M,C,w,k,T,b,S){this.id=M,this.src=C,this.type=w,this.shader=k,this.count=b,this.programs=[],this.cache=S}p.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,C=M.gl,w=this.programs,k=0,T=w.length;k0)for(var G=0;G<$;G++){var X=(G+1)%$;x.push(O[G],D[G],D[X],D[X],O[X],O[G]),I.push(U,j,j,j,U,U),B.push(F,P,P,P,F,F);var K=x.length;z.push([K-6,K-5,K-4],[K-3,K-2,K-1])}var H=O;O=D,D=H;var Y=U;U=j,j=Y;var q=F;F=P,P=q}return{positions:x,cells:z,vectors:I,vertexIntensity:B}},s=function(M,C,_,T){for(var f=0,u=0;uC)return T-1}return T},m=function(M,C,_){return M_?_:M},h=function(M,C,_){var T=C.vectors,f=C.meshgrid,u=M[0],A=M[1],x=M[2],z=f[0].length,I=f[1].length,O=f[2].length,D=c(f[0],u),B=c(f[1],A),F=c(f[2],x),P=D+1,j=B+1,U=F+1;if(D=m(D,0,z-1),P=m(P,0,z-1),B=m(B,0,I-1),j=m(j,0,I-1),F=m(F,0,O-1),U=m(U,0,O-1),D<0||B<0||F<0||P>z-1||j>I-1||U>O-1)return n.create();var $=f[0][D],Q=f[0][P],re=f[1][B],ne=f[1][j],se=f[2][F],G=f[2][U],X=(u-$)/(Q-$),K=(A-re)/(ne-re),H=(x-se)/(G-se);isFinite(X)||(X=.5),isFinite(K)||(K=.5),isFinite(H)||(H=.5);var Y,q,Z,ee,ae,he;switch(_.reversedX&&(D=z-1-D,P=z-1-P),_.reversedY&&(B=I-1-B,j=I-1-j),_.reversedZ&&(F=O-1-F,U=O-1-U),_.filled){case 5:ae=F,he=U,Z=B*O,ee=j*O,Y=D*O*I,q=P*O*I;break;case 4:ae=F,he=U,Y=D*O,q=P*O,Z=B*O*z,ee=j*O*z;break;case 3:Z=B,ee=j,ae=F*I,he=U*I,Y=D*I*O,q=P*I*O;break;case 2:Z=B,ee=j,Y=D*I,q=P*I,ae=F*I*z,he=U*I*z;break;case 1:Y=D,q=P,ae=F*z,he=U*z,Z=B*z*O,ee=j*z*O;break;default:Y=D,q=P,Z=B*z,ee=j*z,ae=F*z*I,he=U*z*I;break}var xe=T[Y+Z+ae],we=T[Y+Z+he],Me=T[Y+ee+ae],Se=T[Y+ee+he],Ie=T[q+Z+ae],Ve=T[q+Z+he],Ge=T[q+ee+ae],ke=T[q+ee+he],_e=n.create(),ce=n.create(),ve=n.create(),le=n.create();n.lerp(_e,xe,Ie,X),n.lerp(ce,we,Ve,X),n.lerp(ve,Me,Ge,X),n.lerp(le,Se,ke,X);var Ae=n.create(),Be=n.create();n.lerp(Ae,_e,ve,K),n.lerp(Be,ce,le,K);var Xe=n.create();return n.lerp(Xe,Ae,Be,H),Xe},v=function(M,C){var _=C[0],T=C[1],f=C[2];return M[0]=_<0?-_:_,M[1]=T<0?-T:T,M[2]=f<0?-f:f,M},g=function(M){var C=1/0;M.sort(function(u,A){return u-A});for(var _=M.length,T=1;T<_;T++){var f=Math.abs(M[T]-M[T-1]);fP||kej||_eU)},Q=n.distance(C[0],C[1]),re=10*Q/T,ne=re*re,se=1,G=0,X=_.length;X>1&&(se=i(_));for(var K=0;KG&&(G=xe),ae.push(xe),O.push({points:Y,velocities:q,divergences:ae});for(var we=0;wene&&n.scale(Me,Me,re/Math.sqrt(Se)),n.add(Me,Me,H),Z=z(Me),n.squaredDistance(ee,Me)-ne>-1e-4*ne){Y.push(Me),ee=Me,q.push(Z);var he=I(Me,Z),xe=n.length(he);isFinite(xe)&&xe>G&&(G=xe),ae.push(xe)}H=Me}}var Ie=s(O,M.colormap,G,se);return u?Ie.tubeScale=u:(G===0&&(G=1),Ie.tubeScale=f*.5*se/G),Ie};var w=t(6740),S=t(6405).createMesh;l.exports.createTubeMesh=function(M,C){return S(M,C,{shaders:w,traceType:"streamtube"})}},990:function(l,e,t){var n=t(9405),r=t(3236),a=r([`precision highp float; +}`]);l.meshShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},l.pickShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815(s,l,n){"use strict";var u=n(2931),c=n(9970),f=["xyz","xzy","yxz","yzx","zxy","zyx"],h=function(M,C,w,k){for(var T=M.points,b=M.velocities,S=M.divergences,A=[],F=[],D=[],R=[],P=[],z=[],I=0,L=0,B=c.create(),O=c.create(),G=8,$=0;$0)for(var N=0;NC)return k-1}return k},g=function(M,C,w){return Mw?w:M},m=function(M,C,w){var k=C.vectors,T=C.meshgrid,b=M[0],S=M[1],A=M[2],F=T[0].length,D=T[1].length,R=T[2].length,P=p(T[0],b),z=p(T[1],S),I=p(T[2],A),L=P+1,B=z+1,O=I+1;if(P=g(P,0,F-1),L=g(L,0,F-1),z=g(z,0,D-1),B=g(B,0,D-1),I=g(I,0,R-1),O=g(O,0,R-1),P<0||z<0||I<0||L>F-1||B>D-1||O>R-1)return u.create();var G=T[0][P],$=T[0][L],X=T[1][z],Z=T[1][B],J=T[2][I],N=T[2][O],H=(b-G)/($-G),W=(S-X)/(Z-X),U=(A-J)/(N-J);isFinite(H)||(H=.5),isFinite(W)||(W=.5),isFinite(U)||(U=.5);var V,j,q,Y,K,re;switch(w.reversedX&&(P=F-1-P,L=F-1-L),w.reversedY&&(z=D-1-z,B=D-1-B),w.reversedZ&&(I=R-1-I,O=R-1-O),w.filled){case 5:K=I,re=O,q=z*R,Y=B*R,V=P*R*D,j=L*R*D;break;case 4:K=I,re=O,V=P*R,j=L*R,q=z*R*F,Y=B*R*F;break;case 3:q=z,Y=B,K=I*D,re=O*D,V=P*D*R,j=L*D*R;break;case 2:q=z,Y=B,V=P*D,j=L*D,K=I*D*F,re=O*D*F;break;case 1:V=P,j=L,K=I*F,re=O*F,q=z*F*R,Y=B*F*R;break;default:V=P,j=L,q=z*F,Y=B*F,K=I*F*D,re=O*F*D;break}var se=k[V+q+K],le=k[V+q+re],ue=k[V+Y+K],fe=k[V+Y+re],pe=k[j+q+K],we=k[j+q+re],xe=k[j+Y+K],he=k[j+Y+re],oe=u.create(),te=u.create(),ie=u.create(),ee=u.create();u.lerp(oe,se,pe,H),u.lerp(te,le,we,H),u.lerp(ie,ue,xe,H),u.lerp(ee,fe,he,H);var ce=u.create(),_e=u.create();u.lerp(ce,oe,ie,W),u.lerp(_e,te,ee,W);var Se=u.create();return u.lerp(Se,ce,_e,U),Se},y=function(M,C){var w=C[0],k=C[1],T=C[2];return M[0]=w<0?-w:w,M[1]=k<0?-k:k,M[2]=T<0?-T:T,M},_=function(M){var C=1/0;M.sort(function(b,S){return b-S});for(var w=M.length,k=1;kL||heB||oeO)},$=u.distance(C[0],C[1]),X=10*$/k,Z=X*X,J=1,N=0,H=w.length;H>1&&(J=v(w));for(var W=0;WN&&(N=se),K.push(se),R.push({points:V,velocities:j,divergences:K});for(var le=0;leZ&&u.scale(ue,ue,X/Math.sqrt(fe)),u.add(ue,ue,U),q=F(ue),u.squaredDistance(Y,ue)-Z>-1e-4*Z){V.push(ue),Y=ue,j.push(q);var re=D(ue,q),se=u.length(re);isFinite(se)&&se>N&&(N=se),K.push(se)}U=ue}}var pe=d(R,M.colormap,N,J);return b?pe.tubeScale=b:(N===0&&(N=1),pe.tubeScale=T*.5*J/N),pe};var x=n(6740),E=n(6405).createMesh;s.exports.createTubeMesh=function(M,C){return E(M,C,{shaders:x,traceType:"streamtube"})}},990(s,l,n){var u=n(9405),c=n(3236),f=c([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1822,7 +1822,7 @@ void main() { eyeDirection = eyePosition - cameraCoordinate.xyz; surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); } -`]),o=r([`precision highp float; +`]),h=c([`precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { @@ -1902,7 +1902,7 @@ void main() { gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; } -`]),s=r([`precision highp float; +`]),d=c([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1941,7 +1941,7 @@ void main() { eyeDirection = vec3(0,1,0); lightDirection = vec3(0,0,1); } -`]),c=r([`precision highp float; +`]),p=c([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1988,13 +1988,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);e.createShader=function(m){var h=n(m,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createPickShader=function(m){var h=n(m,a,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createContourShader=function(m){var h=n(m,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h},e.createPickContourShader=function(m){var h=n(m,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h}},9499:function(l,e,t){"use strict";l.exports=Y;var n=t(8828),r=t(2762),a=t(8116),o=t(7766),s=t(1888),c=t(6729),m=t(5298),h=t(9994),v=t(9618),g=t(3711),i=t(6760),w=t(7608),S=t(2478),M=t(6199),C=t(990),_=C.createShader,T=C.createContourShader,f=C.createPickShader,u=C.createPickContourShader,A=4*10,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var q=0;q<3;++q){var Z=I[q],ee=(q+1)%3,ae=(q+2)%3;Z[ee+0]=1,Z[ae+3]=1,Z[q+6]=1}})();function O(q,Z,ee,ae,he){this.position=q,this.index=Z,this.uv=ee,this.level=ae,this.dataCoordinate=he}var D=256;function B(q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve,Ge,ke,_e,ce){this.gl=q,this.shape=Z,this.bounds=ee,this.objectOffset=ce,this.intensityBounds=[],this._shader=ae,this._pickShader=he,this._coordinateBuffer=xe,this._vao=we,this._colorMap=Me,this._contourShader=Se,this._contourPickShader=Ie,this._contourBuffer=Ve,this._contourVAO=Ge,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new O([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ke,this._dynamicVAO=_e,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=B.prototype;F.genColormap=function(q,Z){var ee=!1,ae=h([c({colormap:q,nshades:D,format:"rgba"}).map(function(he,xe){var we=Z?P(xe/255,Z):he[3];return we<1&&(ee=!0),[he[0],he[1],he[2],255*we]})]);return m.divseq(ae,255),this.hasAlphaScale=ee,ae},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(q){this.pickId=q};function P(q,Z){if(!Z||!Z.length)return 1;for(var ee=0;eeq&&ee>0){var ae=(Z[ee][0]-q)/(Z[ee][0]-Z[ee-1][0]);return Z[ee][1]*(1-ae)+ae*Z[ee-1][1]}}return 1}var j=[0,0,0],U={showSurface:!1,showContour:!1,projections:[x.slice(),x.slice(),x.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function $(q,Z){var ee,ae,he,xe=Z.axes&&Z.axes.lastCubeProps.axis||j,we=Z.showSurface,Me=Z.showContour;for(ee=0;ee<3;++ee)for(we=we||Z.surfaceProject[ee],ae=0;ae<3;++ae)Me=Me||Z.contourProject[ee][ae];for(ee=0;ee<3;++ee){var Se=U.projections[ee];for(ae=0;ae<16;++ae)Se[ae]=0;for(ae=0;ae<4;++ae)Se[5*ae]=1;Se[5*ee]=0,Se[12+ee]=Z.axesBounds[+(xe[ee]>0)][ee],i(Se,q.model,Se);var Ie=U.clipBounds[ee];for(he=0;he<2;++he)for(ae=0;ae<3;++ae)Ie[he][ae]=q.clipBounds[he][ae];Ie[0][ee]=-1e8,Ie[1][ee]=1e8}return U.showSurface=we,U.showContour=Me,U}var Q={model:x,view:x,projection:x,inverseModel:x.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},re=x.slice(),ne=[1,0,0,0,1,0,0,0,1];function se(q,Z){q=q||{};var ee=this.gl;ee.disable(ee.CULL_FACE),this._colorMap.bind(0);var ae=Q;ae.model=q.model||x,ae.view=q.view||x,ae.projection=q.projection||x,ae.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ae.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ae.objectOffset=this.objectOffset,ae.contourColor=this.contourColor[0],ae.inverseModel=w(ae.inverseModel,ae.model);for(var he=0;he<2;++he)for(var xe=ae.clipBounds[he],we=0;we<3;++we)xe[we]=Math.min(Math.max(this.clipBounds[he][we],-1e8),1e8);ae.kambient=this.ambientLight,ae.kdiffuse=this.diffuseLight,ae.kspecular=this.specularLight,ae.roughness=this.roughness,ae.fresnel=this.fresnel,ae.opacity=this.opacity,ae.height=0,ae.permutation=ne,ae.vertexColor=this.vertexColor;var Me=re;for(i(Me,ae.view,ae.model),i(Me,ae.projection,Me),w(Me,Me),he=0;he<3;++he)ae.eyePosition[he]=Me[12+he]/Me[15];var Se=Me[15];for(he=0;he<3;++he)Se+=this.lightPosition[he]*Me[4*he+3];for(he=0;he<3;++he){var Ie=Me[12+he];for(we=0;we<3;++we)Ie+=Me[4*we+he]*this.lightPosition[we];ae.lightPosition[he]=Ie/Se}var Ve=$(ae,this);if(Ve.showSurface){for(this._shader.bind(),this._shader.uniforms=ae,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ee.TRIANGLES,this._vertexCount),he=0;he<3;++he)!this.surfaceProject[he]||!this.vertexCount||(this._shader.uniforms.model=Ve.projections[he],this._shader.uniforms.clipBounds=Ve.clipBounds[he],this._vao.draw(ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ve.showContour){var Ge=this._contourShader;ae.kambient=1,ae.kdiffuse=0,ae.kspecular=0,ae.opacity=1,Ge.bind(),Ge.uniforms=ae;var ke=this._contourVAO;for(ke.bind(),he=0;he<3;++he)for(Ge.uniforms.permutation=I[he],ee.lineWidth(this.contourWidth[he]*this.pixelRatio),we=0;we>4)/16)/255,he=Math.floor(ae),xe=ae-he,we=Z[1]*(q.value[1]+(q.value[2]&15)/16)/255,Me=Math.floor(we),Se=we-Me;he+=1,Me+=1;var Ie=ee.position;Ie[0]=Ie[1]=Ie[2]=0;for(var Ve=0;Ve<2;++Ve)for(var Ge=Ve?xe:1-xe,ke=0;ke<2;++ke)for(var _e=ke?Se:1-Se,ce=he+Ve,ve=Me+ke,le=Ge*_e,Ae=0;Ae<3;++Ae)Ie[Ae]+=this._field[Ae].get(ce,ve)*le;for(var Be=this._pickResult.level,Xe=0;Xe<3;++Xe)if(Be[Xe]=S.le(this.contourLevels[Xe],Ie[Xe]),Be[Xe]<0)this.contourLevels[Xe].length>0&&(Be[Xe]=0);else if(Be[Xe]Math.abs(yt-Ie[Xe])&&(Be[Xe]+=1)}for(ee.index[0]=xe<.5?he:he+1,ee.index[1]=Se<.5?Me:Me+1,ee.uv[0]=ae/Z[0],ee.uv[1]=we/Z[1],Ae=0;Ae<3;++Ae)ee.dataCoordinate[Ae]=this._field[Ae].get(ee.index[0],ee.index[1]);return ee},F.padField=function(q,Z){var ee=Z.shape.slice(),ae=q.shape.slice();m.assign(q.lo(1,1).hi(ee[0],ee[1]),Z),m.assign(q.lo(1).hi(ee[0],1),Z.hi(ee[0],1)),m.assign(q.lo(1,ae[1]-1).hi(ee[0],1),Z.lo(0,ee[1]-1).hi(ee[0],1)),m.assign(q.lo(0,1).hi(1,ee[1]),Z.hi(1)),m.assign(q.lo(ae[0]-1,1).hi(1,ee[1]),Z.lo(ee[0]-1)),q.set(0,0,Z.get(0,0)),q.set(0,ae[1]-1,Z.get(0,ee[1]-1)),q.set(ae[0]-1,0,Z.get(ee[0]-1,0)),q.set(ae[0]-1,ae[1]-1,Z.get(ee[0]-1,ee[1]-1))};function X(q,Z){return Array.isArray(q)?[Z(q[0]),Z(q[1]),Z(q[2])]:[Z(q),Z(q),Z(q)]}function K(q){return Array.isArray(q)?q.length===3?[q[0],q[1],q[2],1]:[q[0],q[1],q[2],q[3]]:[0,0,0,1]}function H(q){if(Array.isArray(q)){if(Array.isArray(q))return[K(q[0]),K(q[1]),K(q[2])];var Z=K(q);return[Z.slice(),Z.slice(),Z.slice()]}}F.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=X(q.contourWidth,Number)),"showContour"in q&&(this.showContour=X(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=X(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=H(q.contourColor)),"contourProject"in q&&(this.contourProject=X(q.contourProject,function(on){return X(on,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=H(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=X(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=X(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var Z=q.field||q.coords&&q.coords[2]||null,ee=!1;if(Z||(this._field[2].shape[0]||this._field[2].shape[2]?Z=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Z=this._field[2].hi(0,0)),"field"in q||"coords"in q){var ae=(Z.shape[0]+2)*(Z.shape[1]+2);ae>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(ae))),this._field[2]=v(this._field[2].data,[Z.shape[0]+2,Z.shape[1]+2]),this.padField(this._field[2],Z),this.shape=Z.shape.slice();for(var he=this.shape,xe=0;xe<2;++xe)this._field[2].size>this._field[xe].data.length&&(s.freeFloat(this._field[xe].data),this._field[xe].data=s.mallocFloat(this._field[2].size)),this._field[xe]=v(this._field[xe].data,[he[0]+2,he[1]+2]);if(q.coords){var we=q.coords;if(!Array.isArray(we)||we.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(xe=0;xe<2;++xe){var Me=we[xe];for(ke=0;ke<2;++ke)if(Me.shape[ke]!==he[ke])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[xe],Me)}}else if(q.ticks){var Se=q.ticks;if(!Array.isArray(Se)||Se.length!==2)throw new Error("gl-surface: invalid ticks");for(xe=0;xe<2;++xe){var Ie=Se[xe];if((Array.isArray(Ie)||Ie.length)&&(Ie=v(Ie)),Ie.shape[0]!==he[xe])throw new Error("gl-surface: invalid tick length");var Ve=v(Ie.data,he);Ve.stride[xe]=Ie.stride[0],Ve.stride[xe^1]=0,this.padField(this._field[xe],Ve)}}else{for(xe=0;xe<2;++xe){var Ge=[0,0];Ge[xe]=1,this._field[xe]=v(this._field[xe].data,[he[0]+2,he[1]+2],Ge,0)}this._field[0].set(0,0,0);for(var ke=0;ke0){for(var li=0;li<5;++li)Vt.pop();De-=1}continue e}}}Yt.push(De)}this._contourOffsets[Ht]=Kr,this._contourCounts[Ht]=Yt}var Yn=s.mallocFloat(Vt.length);for(xe=0;xeO||z<0||z>O)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[x,z],A.bind(),I.texImage2D(I.TEXTURE_2D,0,A.format,x,z,0,A.format,A.type,null),A._mipLevels=[0],A}function i(A,x,z,I,O,D){this.gl=A,this.handle=x,this.format=O,this.type=D,this._shape=[z,I],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var B=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return B._wrapS},set:function(j){return B.wrapS=j}},{get:function(){return B._wrapT},set:function(j){return B.wrapT=j}}]),this._wrapVector=F;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return B._shape[0]},set:function(j){return B.width=j}},{get:function(){return B._shape[1]},set:function(j){return B.height=j}}]),this._shapeVector=P}var w=i.prototype;Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(A)>=0&&(x.getExtension("OES_texture_float_linear")||(A=x.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(A)>=0&&(x.getExtension("OES_texture_float_linear")||(A=x.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var x=this._anisoSamples;if(this._anisoSamples=Math.max(A,1)|0,x!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var x=0;x<2;++x)if(c.indexOf(A[x])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(!Array.isArray(A))A=[A|0,A|0];else if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return g(this,A[0]|0,A[1]|0),[A[0]|0,A[1]|0]}},width:{get:function(){return this._shape[0]},set:function(A){return A=A|0,g(this,A,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A=A|0,g(this,this._shape[0],A),A}}}),w.bind=function(A){var x=this.gl;return A!==void 0&&x.activeTexture(x.TEXTURE0+(A|0)),x.bindTexture(x.TEXTURE_2D,this.handle),A!==void 0?A|0:x.getParameter(x.ACTIVE_TEXTURE)-x.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),x=0;A>0;++x,A>>>=1)this._mipLevels.indexOf(x)<0&&this._mipLevels.push(x)},w.setPixels=function(A,x,z,I){var O=this.gl;this.bind(),Array.isArray(x)?(I=z,z=x[1]|0,x=x[0]|0):(x=x||0,z=z||0),I=I||0;var D=h(A)?A:A.raw;if(D){var B=this._mipLevels.indexOf(I)<0;B?(O.texImage2D(O.TEXTURE_2D,0,this.format,this.format,this.type,D),this._mipLevels.push(I)):O.texSubImage2D(O.TEXTURE_2D,I,x,z,this.format,this.type,D)}else if(A.shape&&A.stride&&A.data){if(A.shape.length<2||x+A.shape[1]>this._shape[1]>>>I||z+A.shape[0]>this._shape[0]>>>I||x<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(O,x,z,I,this.format,this.type,this._mipLevels,A)}else throw new Error("gl-texture2d: Unsupported data type")};function S(A,x){return A.length===3?x[2]===1&&x[1]===A[0]*A[2]&&x[0]===A[2]:x[0]===1&&x[1]===A[0]}function M(A,x,z,I,O,D,B,F){var P=F.dtype,j=F.shape.slice();if(j.length<2||j.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var U=0,$=0,Q=S(j,F.stride.slice());P==="float32"?U=A.FLOAT:P==="float64"?(U=A.FLOAT,Q=!1,P="float32"):P==="uint8"?U=A.UNSIGNED_BYTE:(U=A.UNSIGNED_BYTE,Q=!1,P="uint8");var re=1;if(j.length===2)$=A.LUMINANCE,j=[j[0],j[1],1],F=n(F.data,j,[F.stride[0],F.stride[1],1],F.offset);else if(j.length===3){if(j[2]===1)$=A.ALPHA;else if(j[2]===2)$=A.LUMINANCE_ALPHA;else if(j[2]===3)$=A.RGB;else if(j[2]===4)$=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");re=j[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if(($===A.LUMINANCE||$===A.ALPHA)&&(O===A.LUMINANCE||O===A.ALPHA)&&($=O),$!==O)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ne=F.size,se=B.indexOf(I)<0;if(se&&B.push(I),U===D&&Q)F.offset===0&&F.data.length===ne?se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,F.data):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,F.data):se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,F.data.subarray(F.offset,F.offset+ne)):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,F.data.subarray(F.offset,F.offset+ne));else{var G;D===A.FLOAT?G=a.mallocFloat32(ne):G=a.mallocUint8(ne);var X=n(G,j,[j[2],j[2]*j[0],1]);U===A.FLOAT&&D===A.UNSIGNED_BYTE?v(X,F):r.assign(X,F),se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,G.subarray(0,ne)):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,G.subarray(0,ne)),D===A.FLOAT?a.freeFloat32(G):a.freeUint8(G)}}function C(A){var x=A.createTexture();return A.bindTexture(A.TEXTURE_2D,x),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),x}function _(A,x,z,I,O){var D=A.getParameter(A.MAX_TEXTURE_SIZE);if(x<0||x>D||z<0||z>D)throw new Error("gl-texture2d: Invalid texture shape");if(O===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,I,x,z,0,I,O,null),new i(A,B,x,z,I,O)}function T(A,x,z,I,O,D){var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,O,O,D,x),new i(A,B,z,I,O,D)}function f(A,x){var z=x.dtype,I=x.shape.slice(),O=A.getParameter(A.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>O||I[1]<0||I[1]>O)throw new Error("gl-texture2d: Invalid texture size");var D=S(I,x.stride.slice()),B=0;z==="float32"?B=A.FLOAT:z==="float64"?(B=A.FLOAT,D=!1,z="float32"):z==="uint8"?B=A.UNSIGNED_BYTE:(B=A.UNSIGNED_BYTE,D=!1,z="uint8");var F=0;if(I.length===2)F=A.LUMINANCE,I=[I[0],I[1],1],x=n(x.data,I,[x.stride[0],x.stride[1],1],x.offset);else if(I.length===3)if(I[2]===1)F=A.ALPHA;else if(I[2]===2)F=A.LUMINANCE_ALPHA;else if(I[2]===3)F=A.RGB;else if(I[2]===4)F=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");B===A.FLOAT&&!A.getExtension("OES_texture_float")&&(B=A.UNSIGNED_BYTE,D=!1);var P,j,U=x.size;if(D)x.offset===0&&x.data.length===U?P=x.data:P=x.data.subarray(x.offset,x.offset+U);else{var $=[I[2],I[2]*I[0],1];j=a.malloc(U,z);var Q=n(j,I,$,0);(z==="float32"||z==="float64")&&B===A.UNSIGNED_BYTE?v(Q,x):r.assign(Q,x),P=j.subarray(0,U)}var re=C(A);return A.texImage2D(A.TEXTURE_2D,0,F,I[0],I[1],0,F,B,P),D||a.free(j),new i(A,re,I[0],I[1],F,B)}function u(A){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||m(A),typeof arguments[1]=="number")return _(A,arguments[1],arguments[2],arguments[3]||A.RGBA,arguments[4]||A.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(A,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var x=arguments[1],z=h(x)?x:x.raw;if(z)return T(A,z,x.width|0,x.height|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(x.shape&&x.data&&x.stride)return f(A,x)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(l){"use strict";function e(t,n,r){n?n.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var a=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(r){if(r.length>a)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o1?0:Math.acos(v)}},9226:function(l){l.exports=e;function e(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}},3126:function(l){l.exports=e;function e(t){var n=new Float32Array(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}},3990:function(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}},1091:function(l){l.exports=e;function e(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2];return t[0]=o*h-s*m,t[1]=s*c-a*h,t[2]=a*m-o*c,t}},5455:function(l,e,t){l.exports=t(7056)},7056:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+a*a+o*o)}},4008:function(l,e,t){l.exports=t(6690)},6690:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}},244:function(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}},2613:function(l){l.exports=1e-6},9922:function(l,e,t){l.exports=r;var n=t(2613);function r(a,o){var s=a[0],c=a[1],m=a[2],h=o[0],v=o[1],g=o[2];return Math.abs(s-h)<=n*Math.max(1,Math.abs(s),Math.abs(h))&&Math.abs(c-v)<=n*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(m-g)<=n*Math.max(1,Math.abs(m),Math.abs(g))}},9265:function(l){l.exports=e;function e(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}},2681:function(l){l.exports=e;function e(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}},5137:function(l,e,t){l.exports=r;var n=t(1091)();function r(a,o,s,c,m,h){var v,g;for(o||(o=3),s||(s=0),c?g=Math.min(c*o+s,a.length):g=a.length,v=s;v0&&(s=1/Math.sqrt(s),t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s),t}},7636:function(l){l.exports=e;function e(t,n){n=n||1;var r=Math.random()*2*Math.PI,a=Math.random()*2-1,o=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=a*n,t}},6894:function(l){l.exports=e;function e(t,n,r,a){var o=r[1],s=r[2],c=n[1]-o,m=n[2]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=n[0],t[1]=o+c*v-m*h,t[2]=s+c*h+m*v,t}},109:function(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[2],c=n[0]-o,m=n[2]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=o+m*h+c*v,t[1]=n[1],t[2]=s+m*v-c*h,t}},8692:function(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[1],c=n[0]-o,m=n[1]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=o+c*v-m*h,t[1]=s+c*h+m*v,t[2]=n[2],t}},2447:function(l){l.exports=e;function e(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}},6621:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}},8489:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t}},1463:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t}},6141:function(l,e,t){l.exports=t(2953)},5486:function(l,e,t){l.exports=t(3066)},2953:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return r*r+a*a+o*o}},3066:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}},2229:function(l,e,t){l.exports=t(6843)},6843:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}},492:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2];return t[0]=a*r[0]+o*r[3]+s*r[6],t[1]=a*r[1]+o*r[4]+s*r[7],t[2]=a*r[2]+o*r[5]+s*r[8],t}},5673:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[3]*a+r[7]*o+r[11]*s+r[15];return c=c||1,t[0]=(r[0]*a+r[4]*o+r[8]*s+r[12])/c,t[1]=(r[1]*a+r[5]*o+r[9]*s+r[13])/c,t[2]=(r[2]*a+r[6]*o+r[10]*s+r[14])/c,t}},264:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2],v=r[3],g=v*a+m*s-h*o,i=v*o+h*a-c*s,w=v*s+c*o-m*a,S=-c*a-m*o-h*s;return t[0]=g*v+S*-c+i*-h-w*-m,t[1]=i*v+S*-m+w*-c-g*-h,t[2]=w*v+S*-h+g*-m-i*-c,t}},4361:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t}},2335:function(l){l.exports=e;function e(t){var n=new Float32Array(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n}},2933:function(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}},7536:function(l){l.exports=e;function e(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return Math.sqrt(r*r+a*a+o*o+s*s)}},1373:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t[3]=n[3]/r[3],t}},3750:function(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}},3390:function(l){l.exports=e;function e(t,n,r,a){var o=new Float32Array(4);return o[0]=t,o[1]=n,o[2]=r,o[3]=a,o}},9970:function(l,e,t){l.exports={create:t(7536),clone:t(2335),fromValues:t(3390),copy:t(2933),set:t(4578),add:t(4361),subtract:t(6860),multiply:t(3576),divide:t(1373),min:t(2334),max:t(160),scale:t(9288),scaleAndAdd:t(4844),distance:t(4691),squaredDistance:t(7960),length:t(6808),squaredLength:t(483),negate:t(1498),inverse:t(4494),normalize:t(5177),dot:t(3750),lerp:t(2573),random:t(9131),transformMat4:t(5352),transformQuat:t(4041)}},4494:function(l){l.exports=e;function e(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t}},6808:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return Math.sqrt(n*n+r*r+a*a+o*o)}},2573:function(l){l.exports=e;function e(t,n,r,a){var o=n[0],s=n[1],c=n[2],m=n[3];return t[0]=o+a*(r[0]-o),t[1]=s+a*(r[1]-s),t[2]=c+a*(r[2]-c),t[3]=m+a*(r[3]-m),t}},160:function(l){l.exports=e;function e(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t[3]=Math.max(n[3],r[3]),t}},2334:function(l){l.exports=e;function e(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t[3]=Math.min(n[3],r[3]),t}},3576:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t[3]=n[3]*r[3],t}},1498:function(l){l.exports=e;function e(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t}},5177:function(l){l.exports=e;function e(t,n){var r=n[0],a=n[1],o=n[2],s=n[3],c=r*r+a*a+o*o+s*s;return c>0&&(c=1/Math.sqrt(c),t[0]=r*c,t[1]=a*c,t[2]=o*c,t[3]=s*c),t}},9131:function(l,e,t){var n=t(5177),r=t(9288);l.exports=a;function a(o,s){return s=s||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),n(o,o),r(o,o,s),o}},9288:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t}},4844:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t}},4578:function(l){l.exports=e;function e(t,n,r,a,o){return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t}},7960:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return r*r+a*a+o*o+s*s}},483:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return n*n+r*r+a*a+o*o}},6860:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t}},5352:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=n[3];return t[0]=r[0]*a+r[4]*o+r[8]*s+r[12]*c,t[1]=r[1]*a+r[5]*o+r[9]*s+r[13]*c,t[2]=r[2]*a+r[6]*o+r[10]*s+r[14]*c,t[3]=r[3]*a+r[7]*o+r[11]*s+r[15]*c,t}},4041:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2],v=r[3],g=v*a+m*s-h*o,i=v*o+h*a-c*s,w=v*s+c*o-m*a,S=-c*a-m*o-h*s;return t[0]=g*v+S*-c+i*-h-w*-m,t[1]=i*v+S*-m+w*-c-g*-h,t[2]=w*v+S*-h+g*-m-i*-c,t[3]=n[3],t}},1848:function(l,e,t){var n=t(4905),r=t(6468);l.exports=a;function a(o){for(var s=Array.isArray(o)?o:n(o),c=0;c0)continue;Xe=le.slice(0,1).join("")}return ee(Xe),ne+=Xe.length,P=P.slice(Xe.length),P.length}while(!0)}function ke(){return/[^a-fA-F0-9]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function _e(){return B==="."||/[eE]/.test(B)?(P.push(B),D=S,F=B,I+1):B==="x"&&P.length===1&&P[0]==="0"?(D=u,P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ce(){return B==="f"&&(P.push(B),F=B,I+=1),/[eE]/.test(B)||(B==="-"||B==="+")&&/[eE]/.test(F)?(P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ve(){if(/[^\d\w_]/.test(B)){var le=P.join("");return Z[le]?D=_:q[le]?D=C:D=M,ee(P.join("")),D=c,I}return P.push(B),F=B,I+1}}},3508:function(l,e,t){var n=t(6852);n=n.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(l){l.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(l,e,t){var n=t(620);l.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(l,e,t){var n=t(5874);l.exports=r;function r(a,o){var s=n(o),c=[];return c=c.concat(s(a)),c=c.concat(s(null)),c}},3236:function(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r>1,g=-7,i=r?o-1:0,w=r?-1:1,S=t[n+i];for(i+=w,s=S&(1<<-g)-1,S>>=-g,g+=m;g>0;s=s*256+t[n+i],i+=w,g-=8);for(c=s&(1<<-g)-1,s>>=-g,g+=a;g>0;c=c*256+t[n+i],i+=w,g-=8);if(s===0)s=1-v;else{if(s===h)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,a),s=s-v}return(S?-1:1)*c*Math.pow(2,s-a)},e.write=function(t,n,r,a,o,s){var c,m,h,v=s*8-o-1,g=(1<>1,w=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=a?0:s-1,M=a?1:-1,C=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(m=isNaN(n)?1:0,c=g):(c=Math.floor(Math.log(n)/Math.LN2),n*(h=Math.pow(2,-c))<1&&(c--,h*=2),c+i>=1?n+=w/h:n+=w*Math.pow(2,1-i),n*h>=2&&(c++,h/=2),c+i>=g?(m=0,c=g):c+i>=1?(m=(n*h-1)*Math.pow(2,o),c=c+i):(m=n*Math.pow(2,i-1)*Math.pow(2,o),c=0));o>=8;t[r+S]=m&255,S+=M,m/=256,o-=8);for(c=c<0;t[r+S]=c&255,S+=M,c/=256,v-=8);t[r+S-M]|=C*128}},8954:function(l,e,t){"use strict";l.exports=i;var n=t(3250),r=t(6803).Fw;function a(w,S,M){this.vertices=w,this.adjacent=S,this.boundary=M,this.lastVisited=-1}a.prototype.flip=function(){var w=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=w;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function o(w,S,M){this.vertices=w,this.cell=S,this.index=M}function s(w,S){return r(w.vertices,S.vertices)}function c(w){return function(){var S=this.tuple;return w.apply(this,S)}}function m(w){var S=n[w+1];return S||(S=n),c(S)}var h=[];function v(w,S,M){this.dimension=w,this.vertices=S,this.simplices=M,this.interior=M.filter(function(T){return!T.boundary}),this.tuple=new Array(w+1);for(var C=0;C<=w;++C)this.tuple[C]=this.vertices[C];var _=h[w];_||(_=h[w]=m(w)),this.orient=_}var g=v.prototype;g.handleBoundaryDegeneracy=function(w,S){var M=this.dimension,C=this.vertices.length-1,_=this.tuple,T=this.vertices,f=[w];for(w.lastVisited=-C;f.length>0;){w=f.pop();for(var u=w.adjacent,A=0;A<=M;++A){var x=u[A];if(!(!x.boundary||x.lastVisited<=-C)){for(var z=x.vertices,I=0;I<=M;++I){var O=z[I];O<0?_[I]=S:_[I]=T[O]}var D=this.orient();if(D>0)return x;x.lastVisited=-C,D===0&&f.push(x)}}}return null},g.walk=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=S?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[f];e:for(;!u.boundary;){for(var A=u.vertices,x=u.adjacent,z=0;z<=C;++z)T[z]=_[A[z]];u.lastVisited=M;for(var z=0;z<=C;++z){var I=x[z];if(!(I.lastVisited>=M)){var O=T[z];T[z]=w;var D=this.orient();if(T[z]=O,D<0){u=I;continue e}else I.boundary?I.lastVisited=-M:I.lastVisited=M}}return}return u},g.addPeaks=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=this.interior,u=this.simplices,A=[S];S.lastVisited=M,S.vertices[S.vertices.indexOf(-1)]=M,S.boundary=!1,f.push(S);for(var x=[];A.length>0;){var S=A.pop(),z=S.vertices,I=S.adjacent,O=z.indexOf(M);if(!(O<0)){for(var D=0;D<=C;++D)if(D!==O){var B=I[D];if(!(!B.boundary||B.lastVisited>=M)){var F=B.vertices;if(B.lastVisited!==-M){for(var P=0,j=0;j<=C;++j)F[j]<0?(P=j,T[j]=w):T[j]=_[F[j]];var U=this.orient();if(U>0){F[P]=M,B.boundary=!1,f.push(B),A.push(B),B.lastVisited=M;continue}else B.lastVisited=-M}var $=B.adjacent,Q=z.slice(),re=I.slice(),ne=new a(Q,re,!0);u.push(ne);var se=$.indexOf(S);if(!(se<0)){$[se]=ne,re[O]=B,Q[D]=-1,re[D]=S,I[D]=ne,ne.flip();for(var j=0;j<=C;++j){var G=Q[j];if(!(G<0||G===M)){for(var X=new Array(C-1),K=0,H=0;H<=C;++H){var Y=Q[H];Y<0||H===j||(X[K++]=Y)}x.push(new o(X,ne,j))}}}}}}}x.sort(s);for(var D=0;D+1=0?f[A++]=u[z]:x=z&1;if(x===(w&1)){var I=f[0];f[0]=f[1],f[1]=I}S.push(f)}}return S};function i(w,S){var M=w.length;if(M===0)throw new Error("Must have at least d+1 points");var C=w[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var _=w.slice(0,C+1),T=n.apply(void 0,_);if(T===0)throw new Error("Input not in general position");for(var f=new Array(C+1),u=0;u<=C;++u)f[u]=u;T<0&&(f[0]=1,f[1]=0);for(var A=new a(f,new Array(C+1),!1),x=A.adjacent,z=new Array(C+2),u=0;u<=C;++u){for(var I=f.slice(),O=0;O<=C;++O)O===u&&(I[O]=-1);var D=I[0];I[0]=I[1],I[1]=D;var B=new a(I,new Array(C+1),!0);x[u]=B,z[u]=B}z[C+1]=A;for(var u=0;u<=C;++u)for(var I=x[u].vertices,F=x[u].adjacent,O=0;O<=C;++O){var P=I[O];if(P<0){F[O]=A;continue}for(var j=0;j<=C;++j)x[j].vertices.indexOf(P)<0&&(F[O]=x[j])}for(var U=new v(C,_,z),$=!!S,u=C+1;u3*(z+1)?v(this,x):this.left.insert(x):this.left=T([x]);else if(x[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?v(this,x):this.right.insert(x):this.right=T([x]);else{var I=n.ge(this.leftPoints,x,C),O=n.ge(this.rightPoints,x,_);this.leftPoints.splice(I,0,x),this.rightPoints.splice(O,0,x)}},c.remove=function(x){var z=this.count-this.leftPoints;if(x[1]3*(z-1))return g(this,x);var O=this.left.remove(x);return O===o?(this.left=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else if(x[0]>this.mid){if(!this.right)return r;var D=this.left?this.left.count:0;if(4*D>3*(z-1))return g(this,x);var O=this.right.remove(x);return O===o?(this.right=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else{if(this.count===1)return this.leftPoints[0]===x?o:r;if(this.leftPoints.length===1&&this.leftPoints[0]===x){if(this.left&&this.right){for(var B=this,F=this.left;F.right;)B=F,F=F.right;if(B===this)F.right=this.right;else{var P=this.left,O=this.right;B.count-=F.count,B.right=F.left,F.left=P,F.right=O}m(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return a}for(var P=n.ge(this.leftPoints,x,C);P=0&&x[O][1]>=z;--O){var D=I(x[O]);if(D)return D}}function S(x,z){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(x,z);if(I)return I}return w(this.rightPoints,x,z)}else return S(this.leftPoints,z)},c.queryInterval=function(x,z,I){if(xthis.mid&&this.right){var O=this.right.queryInterval(x,z,I);if(O)return O}return zthis.mid?w(this.rightPoints,x,I):S(this.leftPoints,I)};function M(x,z){return x-z}function C(x,z){var I=x[0]-z[0];return I||x[1]-z[1]}function _(x,z){var I=x[1]-z[1];return I||x[0]-z[0]}function T(x){if(x.length===0)return null;for(var z=[],I=0;I>1],D=[],B=[],F=[],I=0;I13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}},395:function(l){function e(t,n,r){return t*(1-r)+n*r}l.exports=e},2652:function(l,e,t){var n=t(4335),r=t(6864),a=t(1903),o=t(9921),s=t(7608),c=t(5665),m={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},h=r(),v=r(),g=[0,0,0,0],i=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];l.exports=function(T,f,u,A,x,z){if(f||(f=[0,0,0]),u||(u=[0,0,0]),A||(A=[0,0,0]),x||(x=[0,0,0,1]),z||(z=[0,0,0,1]),!n(h,T)||(a(v,h),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(o(v)<1e-8)))return!1;var I=h[3],O=h[7],D=h[11],B=h[12],F=h[13],P=h[14],j=h[15];if(I!==0||O!==0||D!==0){g[0]=I,g[1]=O,g[2]=D,g[3]=j;var U=s(v,v);if(!U)return!1;c(v,v),S(x,g,v)}else x[0]=x[1]=x[2]=0,x[3]=1;if(f[0]=B,f[1]=F,f[2]=P,M(i,h),u[0]=m.length(i[0]),m.normalize(i[0],i[0]),A[0]=m.dot(i[0],i[1]),C(i[1],i[1],i[0],1,-A[0]),u[1]=m.length(i[1]),m.normalize(i[1],i[1]),A[0]/=u[1],A[1]=m.dot(i[0],i[2]),C(i[2],i[2],i[0],1,-A[1]),A[2]=m.dot(i[1],i[2]),C(i[2],i[2],i[1],1,-A[2]),u[2]=m.length(i[2]),m.normalize(i[2],i[2]),A[1]/=u[2],A[2]/=u[2],m.cross(w,i[1],i[2]),m.dot(i[0],w)<0)for(var $=0;$<3;$++)u[$]*=-1,i[$][0]*=-1,i[$][1]*=-1,i[$][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+i[0][0]-i[1][1]-i[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-i[0][0]+i[1][1]-i[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-i[0][0]-i[1][1]+i[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+i[0][0]+i[1][1]+i[2][2],0)),i[2][1]>i[1][2]&&(z[0]=-z[0]),i[0][2]>i[2][0]&&(z[1]=-z[1]),i[1][0]>i[0][1]&&(z[2]=-z[2]),!0};function S(_,T,f){var u=T[0],A=T[1],x=T[2],z=T[3];return _[0]=f[0]*u+f[4]*A+f[8]*x+f[12]*z,_[1]=f[1]*u+f[5]*A+f[9]*x+f[13]*z,_[2]=f[2]*u+f[6]*A+f[10]*x+f[14]*z,_[3]=f[3]*u+f[7]*A+f[11]*x+f[15]*z,_}function M(_,T){_[0][0]=T[0],_[0][1]=T[1],_[0][2]=T[2],_[1][0]=T[4],_[1][1]=T[5],_[1][2]=T[6],_[2][0]=T[8],_[2][1]=T[9],_[2][2]=T[10]}function C(_,T,f,u,A){_[0]=T[0]*u+f[0]*A,_[1]=T[1]*u+f[1]*A,_[2]=T[2]*u+f[2]*A}},4335:function(l){l.exports=function(t,n){var r=n[15];if(r===0)return!1;for(var a=1/r,o=0;o<16;o++)t[o]=n[o]*a;return!0}},7442:function(l,e,t){var n=t(6658),r=t(7182),a=t(2652),o=t(9921),s=t(8648),c=g(),m=g(),h=g();l.exports=v;function v(S,M,C,_){if(o(M)===0||o(C)===0)return!1;var T=a(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion),f=a(C,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!T||!f?!1:(n(h.translate,c.translate,m.translate,_),n(h.skew,c.skew,m.skew,_),n(h.scale,c.scale,m.scale,_),n(h.perspective,c.perspective,m.perspective,_),s(h.quaternion,c.quaternion,m.quaternion,_),r(S,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function g(){return{translate:i(),scale:i(1),skew:i(),perspective:w(),quaternion:w()}}function i(S){return[S||0,S||0,S||0]}function w(){return[0,0,0,1]}},7182:function(l,e,t){var n={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=n.create(),a=n.create();l.exports=function(s,c,m,h,v,g){return n.identity(s),n.fromRotationTranslation(s,g,c),s[3]=v[0],s[7]=v[1],s[11]=v[2],s[15]=v[3],n.identity(a),h[2]!==0&&(a[9]=h[2],n.multiply(s,s,a)),h[1]!==0&&(a[9]=0,a[8]=h[1],n.multiply(s,s,a)),h[0]!==0&&(a[8]=0,a[4]=h[0],n.multiply(s,s,a)),n.scale(s,s,m),s}},1811:function(l,e,t){"use strict";var n=t(2478),r=t(7442),a=t(7608),o=t(5567),s=t(2408),c=t(7089),m=t(6582),h=t(7656),v=t(2504),g=t(3536),i=[0,0,0];l.exports=C;function w(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var S=w.prototype;S.recalcMatrix=function(_){var T=this._time,f=n.le(T,_),u=this.computedMatrix;if(!(f<0)){var A=this._components;if(f===T.length-1)for(var x=16*f,z=0;z<16;++z)u[z]=A[x++];else{for(var I=T[f+1]-T[f],x=16*f,O=this.prevMatrix,D=!0,z=0;z<16;++z)O[z]=A[x++];for(var B=this.nextMatrix,z=0;z<16;++z)B[z]=A[x++],D=D&&O[z]===B[z];if(I<1e-6||D)for(var z=0;z<16;++z)u[z]=O[z];else r(u,O,B,(_-T[f])/I)}var F=this.computedUp;F[0]=u[1],F[1]=u[5],F[2]=u[9],g(F,F);var P=this.computedInverse;a(P,u);var j=this.computedEye,U=P[15];j[0]=P[12]/U,j[1]=P[13]/U,j[2]=P[14]/U;for(var $=this.computedCenter,Q=Math.exp(this.computedRadius[0]),z=0;z<3;++z)$[z]=j[z]-u[2+4*z]*Q}},S.idle=function(_){if(!(_1&&n(a[m[i-2]],a[m[i-1]],g)<=0;)i-=1,m.pop();for(m.push(v),i=h.length;i>1&&n(a[h[i-2]],a[h[i-1]],g)>=0;)i-=1,h.pop();h.push(v)}for(var w=new Array(h.length+m.length-2),S=0,s=0,M=m.length;s0;--C)w[S++]=h[C];return w}},351:function(l,e,t){"use strict";l.exports=r;var n=t(4687);function r(a,o){o||(o=a,a=window);var s=0,c=0,m=0,h={shift:!1,alt:!1,control:!1,meta:!1},v=!1;function g(x){var z=!1;return"altKey"in x&&(z=z||x.altKey!==h.alt,h.alt=!!x.altKey),"shiftKey"in x&&(z=z||x.shiftKey!==h.shift,h.shift=!!x.shiftKey),"ctrlKey"in x&&(z=z||x.ctrlKey!==h.control,h.control=!!x.ctrlKey),"metaKey"in x&&(z=z||x.metaKey!==h.meta,h.meta=!!x.metaKey),z}function i(x,z){var I=n.x(z),O=n.y(z);"buttons"in z&&(x=z.buttons|0),(x!==s||I!==c||O!==m||g(z))&&(s=x|0,c=I||0,m=O||0,o&&o(s,c,m,h))}function w(x){i(0,x)}function S(){(s||c||m||h.shift||h.alt||h.meta||h.control)&&(c=m=0,s=0,h.shift=h.alt=h.control=h.meta=!1,o&&o(0,0,0,h))}function M(x){g(x)&&o&&o(s,c,m,h)}function C(x){n.buttons(x)===0?i(0,x):i(s,x)}function _(x){i(s|n.buttons(x),x)}function T(x){i(s&~n.buttons(x),x)}function f(){v||(v=!0,a.addEventListener("mousemove",C),a.addEventListener("mousedown",_),a.addEventListener("mouseup",T),a.addEventListener("mouseleave",w),a.addEventListener("mouseenter",w),a.addEventListener("mouseout",w),a.addEventListener("mouseover",w),a.addEventListener("blur",S),a.addEventListener("keyup",M),a.addEventListener("keydown",M),a.addEventListener("keypress",M),a!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function u(){v&&(v=!1,a.removeEventListener("mousemove",C),a.removeEventListener("mousedown",_),a.removeEventListener("mouseup",T),a.removeEventListener("mouseleave",w),a.removeEventListener("mouseenter",w),a.removeEventListener("mouseout",w),a.removeEventListener("mouseover",w),a.removeEventListener("blur",S),a.removeEventListener("keyup",M),a.removeEventListener("keydown",M),a.removeEventListener("keypress",M),a!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}f();var A={element:a};return Object.defineProperties(A,{enabled:{get:function(){return v},set:function(x){x?f():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),A}},24:function(l){var e={left:0,top:0};l.exports=t;function t(r,a,o){a=a||r.currentTarget||r.srcElement,Array.isArray(o)||(o=[0,0]);var s=r.clientX||0,c=r.clientY||0,m=n(a);return o[0]=s-m.left,o[1]=c-m.top,o}function n(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687:function(l,e){"use strict";function t(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var s=o.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(re=1,G[K++]=h(f[z],S,M,C),z+=U,_>0)for(Q=1,I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==Z&&m(X[K+Y],Se,j,D,Me,Z,S,M,C)),K+=1,z+=U;for(z+=$,K=0,Ie=Y,Y=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,re=2;re0)for(Q=1,I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,F,j,he,Me,S,M,C)),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,F,j,he,Me,S,M,C),Me!==Z&&m(X[K+Y],Se,j,D,Me,Z,S,M,C)),K+=1,z+=U;re&1&&(K=0),Ie=Y,Y=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,z+=$}}g(X),g(G)}},"false,1,0":function(c,m,h,v,g){return function(w,S,M,C){var _=w.shape[0]|0,T=w.shape[1]|0,f=w.data,u=w.offset|0,A=w.stride[0]|0,x=w.stride[1]|0,z=u,I,O=-A|0,D=0,B=-x|0,F=0,P=-A-x|0,j=0,U=x|0,$=A-x*T|0,Q=0,re=0,ne=0,se=2*T|0,G=v(se),X=v(se),K=0,H=0,Y=-1,q=-1,Z=0,ee=-T|0,ae=T|0,he=0,xe=-T-1|0,we=T-1|0,Me=0,Se=0,Ie=0;for(re=0;re0){if(Q=1,G[K++]=h(f[z],S,M,C),z+=U,T>0)for(re=1,I=f[z],H=G[K]=h(I,S,M,C),he=G[K+ee],Z=G[K+Y],Me=G[K+xe],(H!==he||H!==Z||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,he,Z,Me,S,M,C),Se=X[K]=ne++),K+=1,z+=U,re=2;re0)for(re=1,I=f[z],H=G[K]=h(I,S,M,C),he=G[K+ee],Z=G[K+Y],Me=G[K+xe],(H!==he||H!==Z||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,he,Z,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,j,D,Me,he,S,M,C)),K+=1,z+=U,re=2;re 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var g=s.getters||[],i=new Array(h),w=0;w=0?i[w]=!0:i[w]=!1;return a(s.vertex,s.cell,s.phase,v,m,i)}},6199:function(l,e,t){"use strict";var n=t(1338),r={zero:function(C,_,T,f){var u=C[0],A=T[0];f|=0;var x=0,z=A;for(x=0;x2&&x[1]>2&&f(A.pick(-1,-1).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,0).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,1).lo(1,1).hi(x[0]-2,x[1]-2)),x[1]>2&&(T(A.pick(0,-1).lo(1).hi(x[1]-2),u.pick(0,-1,1).lo(1).hi(x[1]-2)),_(u.pick(0,-1,0).lo(1).hi(x[1]-2))),x[1]>2&&(T(A.pick(x[0]-1,-1).lo(1).hi(x[1]-2),u.pick(x[0]-1,-1,1).lo(1).hi(x[1]-2)),_(u.pick(x[0]-1,-1,0).lo(1).hi(x[1]-2))),x[0]>2&&(T(A.pick(-1,0).lo(1).hi(x[0]-2),u.pick(-1,0,0).lo(1).hi(x[0]-2)),_(u.pick(-1,0,1).lo(1).hi(x[0]-2))),x[0]>2&&(T(A.pick(-1,x[1]-1).lo(1).hi(x[0]-2),u.pick(-1,x[1]-1,0).lo(1).hi(x[0]-2)),_(u.pick(-1,x[1]-1,1).lo(1).hi(x[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(x[0]-1,0,0,0),u.set(x[0]-1,0,1,0),u.set(0,x[1]-1,0,0),u.set(0,x[1]-1,1,0),u.set(x[0]-1,x[1]-1,0,0),u.set(x[0]-1,x[1]-1,1,0),u}}function M(C){var _=C.join(),x=h[_];if(x)return x;for(var T=C.length,f=[g,i],u=1;u<=T;++u)f.push(w(u));var A=S,x=A.apply(void 0,f);return h[_]=x,x}l.exports=function(_,T,f){if(Array.isArray(f)||(typeof f=="string"?f=n(T.dimension,f):f=n(T.dimension,"clamp")),T.size===0)return _;if(T.dimension===0)return _.set(0),_;var u=M(f);return u(_,T)}},4317:function(l){"use strict";function e(o,s){var c=Math.floor(s),m=s-c,h=0<=c&&c0;){F<64?(_=F,F=0):(_=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(T=P,P=0):(T=64,P-=64),i=D+F*u+P*A,M=B+F*z+P*I;var j=0,U=0,$=0,Q=x,re=u-f*x,ne=A-_*u,se=O,G=z-f*O,X=I-_*z;for($=0;$0;){I<64?(_=I,I=0):(_=64,I-=64);for(var O=h[0]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),i=x+I*f+O*T,M=z+I*A+O*u;var D=0,B=0,F=f,P=T-_*f,j=A,U=u-_*A;for(B=0;B0;){B<64?(T=B,B=0):(T=64,B-=64);for(var F=h[0]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(_=P,P=0):(_=64,P-=64),i=O+B*A+F*f+P*u,M=D+B*I+F*x+P*z;var j=0,U=0,$=0,Q=A,re=f-T*A,ne=u-C*f,se=I,G=x-T*I,X=z-C*x;for($=0;$<_;++$){for(U=0;Uw;){j=0,U=D-_;t:for(F=0;FQ)break t;U+=x,j+=z}for(j=D,U=D-_,F=0;F>1,P=F-O,j=F+O,U=D,$=P,Q=F,re=j,ne=B,se=S+1,G=M-1,X=!0,K,H,Y,q,Z,ee,ae,he,xe,we=0,Me=0,Se=0,Ie,Ve,Ge,ke,_e,ce,ve,le,Ae,Be,Xe,Ye,yt,gt,Tt,At,$t=A,rr=g($t),_r=g($t);Ve=T*U,Ge=T*$,At=_;e:for(Ie=0;Ie0){H=U,U=$,$=H;break e}if(Se<0)break e;At+=z}Ve=T*re,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}Ve=T*U,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=U,U=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*U,Ge=T*re,At=_;e:for(Ie=0;Ie0){H=U,U=re,re=H;break e}if(Se<0)break e;At+=z}Ve=T*Q,Ge=T*re,At=_;e:for(Ie=0;Ie0){H=Q,Q=re,re=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=$,$=ne,ne=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*re,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}for(Ve=T*U,Ge=T*$,ke=T*Q,_e=T*re,ce=T*ne,ve=T*D,le=T*F,Ae=T*B,Tt=0,At=_,Ie=0;Ie0)G--;else if(Se<0){for(Ve=T*ee,Ge=T*se,ke=T*G,At=_,Ie=0;Ie0)for(;;){ae=_+G*T,Tt=0;e:for(Ie=0;Ie0){if(--GB){e:for(;;){for(ae=_+se*T,Tt=0,At=_,Ie=0;Ie1&&w?M(i,w[0],w[1]):M(i)}var m={"uint32,1,0":function(v,g){return function(i){var w=i.data,S=i.offset|0,M=i.shape,C=i.stride,_=C[0]|0,T=M[0]|0,f=C[1]|0,u=M[1]|0,A=f,x=f,z=1;T<=32?v(0,T-1,w,S,_,f,T,u,A,x,z):g(0,T-1,w,S,_,f,T,u,A,x,z)}}};function h(v,g){var i=[g,v].join(","),w=m[i],S=o(v,g),M=c(v,g,S);return w(S,M)}l.exports=h},446:function(l,e,t){"use strict";var n=t(7640),r={};function a(o){var s=o.order,c=o.dtype,m=[s,c],h=m.join(":"),v=r[h];return v||(r[h]=v=n(s,c)),v(o),o}l.exports=a},9618:function(l,e,t){var n=t(7163),r=typeof Float64Array<"u";function a(g,i){return g[0]-i[0]}function o(){var g=this.stride,i=new Array(g.length),w;for(w=0;w=0&&(f=_|0,T+=A*f,u-=f),new S(this.data,u,A,T)},M.step=function(_){var T=this.shape[0],f=this.stride[0],u=this.offset,A=0,x=Math.ceil;return typeof _=="number"&&(A=_|0,A<0?(u+=f*(T-1),T=x(-T/A)):T=x(T/A),f*=A),new S(this.data,T,f,u)},M.transpose=function(_){_=_===void 0?0:_|0;var T=this.shape,f=this.stride;return new S(this.data,T[_],f[_],this.offset)},M.pick=function(_){var T=[],f=[],u=this.offset;typeof _=="number"&&_>=0?u=u+this.stride[0]*_|0:(T.push(this.shape[0]),f.push(this.stride[0]));var A=i[T.length+1];return A(this.data,T,f,u)},function(_,T,f,u){return new S(_,T[0],f[0],u)}},2:function(g,i,w){function S(C,_,T,f,u,A){this.data=C,this.shape=[_,T],this.stride=[f,u],this.offset=A|0}var M=S.prototype;return M.dtype=g,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(_,T,f){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T,f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]=f},M.get=function(_,T){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]},M.index=function(_,T){return this.offset+this.stride[0]*_+this.stride[1]*T},M.hi=function(_,T){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(_,T){var f=this.offset,u=0,A=this.shape[0],x=this.shape[1],z=this.stride[0],I=this.stride[1];return typeof _=="number"&&_>=0&&(u=_|0,f+=z*u,A-=u),typeof T=="number"&&T>=0&&(u=T|0,f+=I*u,x-=u),new S(this.data,A,x,z,I,f)},M.step=function(_,T){var f=this.shape[0],u=this.shape[1],A=this.stride[0],x=this.stride[1],z=this.offset,I=0,O=Math.ceil;return typeof _=="number"&&(I=_|0,I<0?(z+=A*(f-1),f=O(-f/I)):f=O(f/I),A*=I),typeof T=="number"&&(I=T|0,I<0?(z+=x*(u-1),u=O(-u/I)):u=O(u/I),x*=I),new S(this.data,f,u,A,x,z)},M.transpose=function(_,T){_=_===void 0?0:_|0,T=T===void 0?1:T|0;var f=this.shape,u=this.stride;return new S(this.data,f[_],f[T],u[_],u[T],this.offset)},M.pick=function(_,T){var f=[],u=[],A=this.offset;typeof _=="number"&&_>=0?A=A+this.stride[0]*_|0:(f.push(this.shape[0]),u.push(this.stride[0])),typeof T=="number"&&T>=0?A=A+this.stride[1]*T|0:(f.push(this.shape[1]),u.push(this.stride[1]));var x=i[f.length+1];return x(this.data,f,u,A)},function(_,T,f,u){return new S(_,T[0],T[1],f[0],f[1],u)}},3:function(g,i,w){function S(C,_,T,f,u,A,x,z){this.data=C,this.shape=[_,T,f],this.stride=[u,A,x],this.offset=z|0}var M=S.prototype;return M.dtype=g,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var _=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),f=Math.abs(this.stride[2]);return _>T?T>f?[2,1,0]:_>f?[1,2,0]:[1,0,2]:_>f?[2,0,1]:f>T?[0,1,2]:[0,2,1]}}),M.set=function(_,T,f,u){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f,u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]=u},M.get=function(_,T,f){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]},M.index=function(_,T,f){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f},M.hi=function(_,T,f){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(_,T,f){var u=this.offset,A=0,x=this.shape[0],z=this.shape[1],I=this.shape[2],O=this.stride[0],D=this.stride[1],B=this.stride[2];return typeof _=="number"&&_>=0&&(A=_|0,u+=O*A,x-=A),typeof T=="number"&&T>=0&&(A=T|0,u+=D*A,z-=A),typeof f=="number"&&f>=0&&(A=f|0,u+=B*A,I-=A),new S(this.data,x,z,I,O,D,B,u)},M.step=function(_,T,f){var u=this.shape[0],A=this.shape[1],x=this.shape[2],z=this.stride[0],I=this.stride[1],O=this.stride[2],D=this.offset,B=0,F=Math.ceil;return typeof _=="number"&&(B=_|0,B<0?(D+=z*(u-1),u=F(-u/B)):u=F(u/B),z*=B),typeof T=="number"&&(B=T|0,B<0?(D+=I*(A-1),A=F(-A/B)):A=F(A/B),I*=B),typeof f=="number"&&(B=f|0,B<0?(D+=O*(x-1),x=F(-x/B)):x=F(x/B),O*=B),new S(this.data,u,A,x,z,I,O,D)},M.transpose=function(_,T,f){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0;var u=this.shape,A=this.stride;return new S(this.data,u[_],u[T],u[f],A[_],A[T],A[f],this.offset)},M.pick=function(_,T,f){var u=[],A=[],x=this.offset;typeof _=="number"&&_>=0?x=x+this.stride[0]*_|0:(u.push(this.shape[0]),A.push(this.stride[0])),typeof T=="number"&&T>=0?x=x+this.stride[1]*T|0:(u.push(this.shape[1]),A.push(this.stride[1])),typeof f=="number"&&f>=0?x=x+this.stride[2]*f|0:(u.push(this.shape[2]),A.push(this.stride[2]));var z=i[u.length+1];return z(this.data,u,A,x)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],f[0],f[1],f[2],u)}},4:function(g,i,w){function S(C,_,T,f,u,A,x,z,I,O){this.data=C,this.shape=[_,T,f,u],this.stride=[A,x,z,I],this.offset=O|0}var M=S.prototype;return M.dtype=g,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:w}),M.set=function(_,T,f,u,A){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u,A):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]=A},M.get=function(_,T,f,u){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]},M.index=function(_,T,f,u){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u},M.hi=function(_,T,f,u){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|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)},M.lo=function(_,T,f,u){var A=this.offset,x=0,z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.stride[0],F=this.stride[1],P=this.stride[2],j=this.stride[3];return typeof _=="number"&&_>=0&&(x=_|0,A+=B*x,z-=x),typeof T=="number"&&T>=0&&(x=T|0,A+=F*x,I-=x),typeof f=="number"&&f>=0&&(x=f|0,A+=P*x,O-=x),typeof u=="number"&&u>=0&&(x=u|0,A+=j*x,D-=x),new S(this.data,z,I,O,D,B,F,P,j,A)},M.step=function(_,T,f,u){var A=this.shape[0],x=this.shape[1],z=this.shape[2],I=this.shape[3],O=this.stride[0],D=this.stride[1],B=this.stride[2],F=this.stride[3],P=this.offset,j=0,U=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(P+=O*(A-1),A=U(-A/j)):A=U(A/j),O*=j),typeof T=="number"&&(j=T|0,j<0?(P+=D*(x-1),x=U(-x/j)):x=U(x/j),D*=j),typeof f=="number"&&(j=f|0,j<0?(P+=B*(z-1),z=U(-z/j)):z=U(z/j),B*=j),typeof u=="number"&&(j=u|0,j<0?(P+=F*(I-1),I=U(-I/j)):I=U(I/j),F*=j),new S(this.data,A,x,z,I,O,D,B,F,P)},M.transpose=function(_,T,f,u){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0,u=u===void 0?3:u|0;var A=this.shape,x=this.stride;return new S(this.data,A[_],A[T],A[f],A[u],x[_],x[T],x[f],x[u],this.offset)},M.pick=function(_,T,f,u){var A=[],x=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(A.push(this.shape[0]),x.push(this.stride[0])),typeof T=="number"&&T>=0?z=z+this.stride[1]*T|0:(A.push(this.shape[1]),x.push(this.stride[1])),typeof f=="number"&&f>=0?z=z+this.stride[2]*f|0:(A.push(this.shape[2]),x.push(this.stride[2])),typeof u=="number"&&u>=0?z=z+this.stride[3]*u|0:(A.push(this.shape[3]),x.push(this.stride[3]));var I=i[A.length+1];return I(this.data,A,x,z)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],T[3],f[0],f[1],f[2],f[3],u)}},5:function(i,w,S){function M(_,T,f,u,A,x,z,I,O,D,B,F){this.data=_,this.shape=[T,f,u,A,x],this.stride=[z,I,O,D,B],this.offset=F|0}var C=M.prototype;return C.dtype=i,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:S}),C.set=function(T,f,u,A,x,z){return i==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x,z):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]=z},C.get=function(T,f,u,A,x){return i==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]},C.index=function(T,f,u,A,x){return this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x},C.hi=function(T,f,u,A,x){return new M(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof f!="number"||f<0?this.shape[1]:f|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof A!="number"||A<0?this.shape[3]:A|0,typeof x!="number"||x<0?this.shape[4]:x|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(T,f,u,A,x){var z=this.offset,I=0,O=this.shape[0],D=this.shape[1],B=this.shape[2],F=this.shape[3],P=this.shape[4],j=this.stride[0],U=this.stride[1],$=this.stride[2],Q=this.stride[3],re=this.stride[4];return typeof T=="number"&&T>=0&&(I=T|0,z+=j*I,O-=I),typeof f=="number"&&f>=0&&(I=f|0,z+=U*I,D-=I),typeof u=="number"&&u>=0&&(I=u|0,z+=$*I,B-=I),typeof A=="number"&&A>=0&&(I=A|0,z+=Q*I,F-=I),typeof x=="number"&&x>=0&&(I=x|0,z+=re*I,P-=I),new M(this.data,O,D,B,F,P,j,U,$,Q,re,z)},C.step=function(T,f,u,A,x){var z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.shape[4],F=this.stride[0],P=this.stride[1],j=this.stride[2],U=this.stride[3],$=this.stride[4],Q=this.offset,re=0,ne=Math.ceil;return typeof T=="number"&&(re=T|0,re<0?(Q+=F*(z-1),z=ne(-z/re)):z=ne(z/re),F*=re),typeof f=="number"&&(re=f|0,re<0?(Q+=P*(I-1),I=ne(-I/re)):I=ne(I/re),P*=re),typeof u=="number"&&(re=u|0,re<0?(Q+=j*(O-1),O=ne(-O/re)):O=ne(O/re),j*=re),typeof A=="number"&&(re=A|0,re<0?(Q+=U*(D-1),D=ne(-D/re)):D=ne(D/re),U*=re),typeof x=="number"&&(re=x|0,re<0?(Q+=$*(B-1),B=ne(-B/re)):B=ne(B/re),$*=re),new M(this.data,z,I,O,D,B,F,P,j,U,$,Q)},C.transpose=function(T,f,u,A,x){T=T===void 0?0:T|0,f=f===void 0?1:f|0,u=u===void 0?2:u|0,A=A===void 0?3:A|0,x=x===void 0?4:x|0;var z=this.shape,I=this.stride;return new M(this.data,z[T],z[f],z[u],z[A],z[x],I[T],I[f],I[u],I[A],I[x],this.offset)},C.pick=function(T,f,u,A,x){var z=[],I=[],O=this.offset;typeof T=="number"&&T>=0?O=O+this.stride[0]*T|0:(z.push(this.shape[0]),I.push(this.stride[0])),typeof f=="number"&&f>=0?O=O+this.stride[1]*f|0:(z.push(this.shape[1]),I.push(this.stride[1])),typeof u=="number"&&u>=0?O=O+this.stride[2]*u|0:(z.push(this.shape[2]),I.push(this.stride[2])),typeof A=="number"&&A>=0?O=O+this.stride[3]*A|0:(z.push(this.shape[3]),I.push(this.stride[3])),typeof x=="number"&&x>=0?O=O+this.stride[4]*x|0:(z.push(this.shape[4]),I.push(this.stride[4]));var D=w[z.length+1];return D(this.data,z,I,O)},function(T,f,u,A){return new M(T,f[0],f[1],f[2],f[3],f[4],u[0],u[1],u[2],u[3],u[4],A)}}};function c(g,i){var w=i===-1?"T":String(i),S=s[w];return i===-1?S(g):i===0?S(g,h[g][0]):S(g,h[g],o)}function m(g){if(n(g))return"buffer";if(r)switch(Object.prototype.toString.call(g)){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(g)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(g,i,w,S){if(g===void 0){var u=h.array[0];return u([])}else typeof g=="number"&&(g=[g]);i===void 0&&(i=[g.length]);var M=i.length;if(w===void 0){w=new Array(M);for(var C=M-1,_=1;C>=0;--C)w[C]=_,_*=i[C]}if(S===void 0){S=0;for(var C=0;C>>0;l.exports=o;function o(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var m=n.hi(s),h=n.lo(s);return c>s==s>0?h===a?(m+=1,h=0):h+=1:h===0?(h=a,m-=1):h-=1,n.pack(h,m)}},8406:function(l,e){var t=1e-6,n=1e-6;e.vertexNormals=function(r,a,o){for(var s=a.length,c=new Array(s),m=o===void 0?t:o,h=0;hm)for(var z=c[i],I=1/Math.sqrt(f*A),x=0;x<3;++x){var O=(x+1)%3,D=(x+2)%3;z[x]+=I*(u[O]*T[D]-u[D]*T[O])}}for(var h=0;hm)for(var I=1/Math.sqrt(B),x=0;x<3;++x)z[x]*=I;else for(var x=0;x<3;++x)z[x]=0}return c},e.faceNormals=function(r,a,o){for(var s=r.length,c=new Array(s),m=o===void 0?n:o,h=0;hm?C=1/Math.sqrt(C):C=0;for(var i=0;i<3;++i)M[i]*=C;c[h]=M}return c}},4081:function(l){"use strict";l.exports=e;function e(t,n,r,a,o,s,c,m,h,v){var g=n+s+v;if(i>0){var i=Math.sqrt(g+1);t[0]=.5*(c-h)/i,t[1]=.5*(m-a)/i,t[2]=.5*(r-s)/i,t[3]=.5*i}else{var w=Math.max(n,s,v),i=Math.sqrt(2*w-g+1);n>=w?(t[0]=.5*i,t[1]=.5*(o+r)/i,t[2]=.5*(m+a)/i,t[3]=.5*(c-h)/i):s>=w?(t[0]=.5*(r+o)/i,t[1]=.5*i,t[2]=.5*(h+c)/i,t[3]=.5*(m-a)/i):(t[0]=.5*(a+m)/i,t[1]=.5*(c+h)/i,t[2]=.5*i,t[3]=.5*(r-o)/i)}return t}},9977:function(l,e,t){"use strict";l.exports=i;var n=t(9215),r=t(6582),a=t(7399),o=t(7608),s=t(4081);function c(w,S,M){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2))}function m(w,S,M,C){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2)+Math.pow(C,2))}function h(w,S){var M=S[0],C=S[1],_=S[2],T=S[3],f=m(M,C,_,T);f>1e-6?(w[0]=M/f,w[1]=C/f,w[2]=_/f,w[3]=T/f):(w[0]=w[1]=w[2]=0,w[3]=1)}function v(w,S,M){this.radius=n([M]),this.center=n(S),this.rotation=n(w),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 g=v.prototype;g.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},g.recalcMatrix=function(w){this.radius.curve(w),this.center.curve(w),this.rotation.curve(w);var S=this.computedRotation;h(S,S);var M=this.computedMatrix;a(M,S);var C=this.computedCenter,_=this.computedEye,T=this.computedUp,f=Math.exp(this.computedRadius[0]);_[0]=C[0]+f*M[2],_[1]=C[1]+f*M[6],_[2]=C[2]+f*M[10],T[0]=M[1],T[1]=M[5],T[2]=M[9];for(var u=0;u<3;++u){for(var A=0,x=0;x<3;++x)A+=M[u+4*x]*_[x];M[12+u]=-A}},g.getMatrix=function(w,S){this.recalcMatrix(w);var M=this.computedMatrix;if(S){for(var C=0;C<16;++C)S[C]=M[C];return S}return M},g.idle=function(w){this.center.idle(w),this.radius.idle(w),this.rotation.idle(w)},g.flush=function(w){this.center.flush(w),this.radius.flush(w),this.rotation.flush(w)},g.pan=function(w,S,M,C){S=S||0,M=M||0,C=C||0,this.recalcMatrix(w);var _=this.computedMatrix,T=_[1],f=_[5],u=_[9],A=c(T,f,u);T/=A,f/=A,u/=A;var x=_[0],z=_[4],I=_[8],O=x*T+z*f+I*u;x-=T*O,z-=f*O,I-=u*O;var D=c(x,z,I);x/=D,z/=D,I/=D;var B=_[2],F=_[6],P=_[10],j=B*T+F*f+P*u,U=B*x+F*z+P*I;B-=j*T+U*x,F-=j*f+U*z,P-=j*u+U*I;var $=c(B,F,P);B/=$,F/=$,P/=$;var Q=x*S+T*M,re=z*S+f*M,ne=I*S+u*M;this.center.move(w,Q,re,ne);var se=Math.exp(this.computedRadius[0]);se=Math.max(1e-4,se+C),this.radius.set(w,Math.log(se))},g.rotate=function(w,S,M,C){this.recalcMatrix(w),S=S||0,M=M||0;var _=this.computedMatrix,T=_[0],f=_[4],u=_[8],A=_[1],x=_[5],z=_[9],I=_[2],O=_[6],D=_[10],B=S*T+M*A,F=S*f+M*x,P=S*u+M*z,j=-(O*P-D*F),U=-(D*B-I*P),$=-(I*F-O*B),Q=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(U,2)-Math.pow($,2))),re=m(j,U,$,Q);re>1e-6?(j/=re,U/=re,$/=re,Q/=re):(j=U=$=0,Q=1);var ne=this.computedRotation,se=ne[0],G=ne[1],X=ne[2],K=ne[3],H=se*Q+K*j+G*$-X*U,Y=G*Q+K*U+X*j-se*$,q=X*Q+K*$+se*U-G*j,Z=K*Q-se*j-G*U-X*$;if(C){j=I,U=O,$=D;var ee=Math.sin(C)/c(j,U,$);j*=ee,U*=ee,$*=ee,Q=Math.cos(S),H=H*Q+Z*j+Y*$-q*U,Y=Y*Q+Z*U+q*j-H*$,q=q*Q+Z*$+H*U-Y*j,Z=Z*Q-H*j-Y*U-q*$}var ae=m(H,Y,q,Z);ae>1e-6?(H/=ae,Y/=ae,q/=ae,Z/=ae):(H=Y=q=0,Z=1),this.rotation.set(w,H,Y,q,Z)},g.lookAt=function(w,S,M,C){this.recalcMatrix(w),M=M||this.computedCenter,S=S||this.computedEye,C=C||this.computedUp;var _=this.computedMatrix;r(_,S,M,C);var T=this.computedRotation;s(T,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),h(T,T),this.rotation.set(w,T[0],T[1],T[2],T[3]);for(var f=0,u=0;u<3;++u)f+=Math.pow(M[u]-S[u],2);this.radius.set(w,.5*Math.log(Math.max(f,1e-6))),this.center.set(w,M[0],M[1],M[2])},g.translate=function(w,S,M,C){this.center.move(w,S||0,M||0,C||0)},g.setMatrix=function(w,S){var M=this.computedRotation;s(M,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),h(M,M),this.rotation.set(w,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;o(C,S);var _=C[15];if(Math.abs(_)>1e-6){var T=C[12]/_,f=C[13]/_,u=C[14]/_;this.recalcMatrix(w);var A=Math.exp(this.computedRadius[0]);this.center.set(w,T-C[2]*A,f-C[6]*A,u-C[10]*A),this.radius.idle(w)}else this.center.idle(w),this.radius.idle(w)},g.setDistance=function(w,S){S>0&&this.radius.set(w,Math.log(S))},g.setDistanceLimits=function(w,S){w>0?w=Math.log(w):w=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=S},g.getDistanceLimits=function(w){var S=this.radius.bounds;return w?(w[0]=Math.exp(S[0][0]),w[1]=Math.exp(S[1][0]),w):[Math.exp(S[0][0]),Math.exp(S[1][0])]},g.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]}},g.fromJSON=function(w){var S=this.lastT(),M=w.center;M&&this.center.set(S,M[0],M[1],M[2]);var C=w.rotation;C&&this.rotation.set(S,C[0],C[1],C[2],C[3]);var _=w.distance;_&&_>0&&this.radius.set(S,Math.log(_)),this.setDistanceLimits(w.zoomMin,w.zoomMax)};function i(w){w=w||{};var S=w.center||[0,0,0],M=w.rotation||[0,0,0,1],C=w.radius||1;S=[].slice.call(S,0,3),M=[].slice.call(M,0,4),h(M,M);var _=new v(M,S,Math.log(C));return _.setDistanceLimits(w.zoomMin,w.zoomMax),("eye"in w||"up"in w)&&_.lookAt(0,w.eye,w.center,w.up),_}},1371:function(l,e,t){"use strict";var n=t(3233);l.exports=function(a,o,s){return s=typeof s<"u"?s+"":" ",n(s,o)+a}},3202:function(l){l.exports=function(t,n){n||(n=[0,""]),t=String(t);var r=parseFloat(t,10);return n[0]=r,n[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}},3088:function(l,e,t){"use strict";l.exports=r;var n=t(3140);function r(a,o){for(var s=o.length|0,c=a.length,m=[new Array(s),new Array(s)],h=0;h0){z=m[D][A][0],O=D;break}I=z[O^1];for(var B=0;B<2;++B)for(var F=m[B][A],P=0;P0&&(z=j,I=U,O=B)}return x||z&&i(z,O),I}function S(u,A){var x=m[A][u][0],z=[u];i(x,A);for(var I=x[A^1],O=A;;){for(;I!==u;)z.push(I),I=w(z[z.length-2],I,!1);if(m[0][u].length+m[1][u].length===0)break;var D=z[z.length-1],B=u,F=z[1],P=w(D,B,!0);if(n(o[D],o[B],o[F],o[P])<0)break;z.push(u),I=w(D,B)}return z}function M(u,A){return A[1]===A[A.length-1]}for(var h=0;h0;){var T=m[0][h].length,f=S(h,C);M(_,f)?_.push.apply(_,f):(_.length>0&&g.push(_),_=f)}_.length>0&&g.push(_)}return g}},5609:function(l,e,t){"use strict";l.exports=r;var n=t(3134);function r(a,o){for(var s=n(a,o.length),c=new Array(o.length),m=new Array(o.length),h=[],v=0;v0;){var i=h.pop();c[i]=!1;for(var w=s[i],v=0;v0}T=T.filter(f);for(var u=T.length,A=new Array(u),x=new Array(u),_=0;_0;){var ae=q.pop(),he=re[ae];c(he,function(Ie,Ve){return Ie-Ve});var xe=he.length,we=Z[ae],Me;if(we===0){var F=T[ae];Me=[F]}for(var _=0;_=0)&&(Z[Se]=we^1,q.push(Se),we===0)){var F=T[Se];Y(F)||(F.reverse(),Me.push(F))}}we===0&&ee.push(Me)}return ee}},5085:function(l,e,t){l.exports=w;var n=t(3250)[3],r=t(4209),a=t(3352),o=t(2478);function s(){return!0}function c(S){return function(M,C){var _=S[M];return _?!!_.queryPoint(C,s):!1}}function m(S){for(var M={},C=0;C0&&M[_]===C[0])T=S[_-1];else return 1;for(var f=1;T;){var u=T.key,A=n(C,u[0],u[1]);if(u[0][0]0)f=-1,T=T.right;else return 0;else if(A>0)T=T.left;else if(A<0)f=1,T=T.right;else return 0}return f}}function v(S){return 1}function g(S){return function(C){return S(C[0],C[1])?0:1}}function i(S,M){return function(_){return S(_[0],_[1])?0:M(_)}}function w(S){for(var M=S.length,C=[],_=[],T=0,f=0;f=v?(u=1,x=v+2*w+M):(u=-w/v,x=w*u+M)):(u=0,S>=0?(A=0,x=M):-S>=i?(A=1,x=i+2*S+M):(A=-S/i,x=S*A+M));else if(A<0)A=0,w>=0?(u=0,x=M):-w>=v?(u=1,x=v+2*w+M):(u=-w/v,x=w*u+M);else{var z=1/f;u*=z,A*=z,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M}else{var I,O,D,B;u<0?(I=g+w,O=i+S,O>I?(D=O-I,B=v-2*g+i,D>=B?(u=1,A=0,x=v+2*w+M):(u=D/B,A=1-u,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(u=0,O<=0?(A=1,x=i+2*S+M):S>=0?(A=0,x=M):(A=-S/i,x=S*A+M))):A<0?(I=g+S,O=v+w,O>I?(D=O-I,B=v-2*g+i,D>=B?(A=1,u=0,x=i+2*S+M):(A=D/B,u=1-A,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(A=0,O<=0?(u=1,x=v+2*w+M):w>=0?(u=0,x=M):(u=-w/v,x=w*u+M))):(D=i+S-g-w,D<=0?(u=0,A=1,x=i+2*S+M):(B=v-2*g+i,D>=B?(u=1,A=0,x=v+2*w+M):(u=D/B,A=1-u,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)))}for(var F=1-u-A,h=0;h0){var i=s[m-1];if(n(v,i)===0&&a(i)!==g){m-=1;continue}}s[m++]=v}}return s.length=m,s}},3233:function(l){"use strict";var e="",t;l.exports=n;function n(r,a){if(typeof r!="string")throw new TypeError("expected a string");if(a===1)return r;if(a===2)return r+r;var o=r.length*a;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=o)return e.substr(0,o);for(;o>e.length&&a>1;)a&1&&(e+=r),a>>=1,r+=r;return e+=r,e=e.substr(0,o),e}},3025:function(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(l){"use strict";l.exports=e;function e(t){for(var n=t.length,r=t[t.length-1],a=n,o=n-2;o>=0;--o){var s=r,c=t[o];r=s+c;var m=r-s,h=c-m;h&&(t[--a]=r,r=h)}for(var v=0,o=a;o0){if(O<=0)return D;B=I+O}else if(I<0){if(O>=0)return D;B=-(I+O)}else return D;var F=m*B;return D>=F||D<=-F?D:S(A,x,z)},function(A,x,z,I){var O=A[0]-I[0],D=x[0]-I[0],B=z[0]-I[0],F=A[1]-I[1],P=x[1]-I[1],j=z[1]-I[1],U=A[2]-I[2],$=x[2]-I[2],Q=z[2]-I[2],re=D*j,ne=B*P,se=B*F,G=O*j,X=O*P,K=D*F,H=U*(re-ne)+$*(se-G)+Q*(X-K),Y=(Math.abs(re)+Math.abs(ne))*Math.abs(U)+(Math.abs(se)+Math.abs(G))*Math.abs($)+(Math.abs(X)+Math.abs(K))*Math.abs(Q),q=h*Y;return H>q||-H>q?H:M(A,x,z,I)}];function _(u){var A=C[u.length];return A||(A=C[u.length]=w(u.length)),A.apply(void 0,u)}function T(u,A,x,z,I,O,D){return function(F,P,j,U,$){switch(arguments.length){case 0:case 1:return 0;case 2:return z(F,P);case 3:return I(F,P,j);case 4:return O(F,P,j,U);case 5:return D(F,P,j,U,$)}for(var Q=new Array(arguments.length),re=0;re0&&v>0||h<0&&v<0)return!1;var g=n(c,o,s),i=n(m,o,s);return g>0&&i>0||g<0&&i<0?!1:h===0&&v===0&&g===0&&i===0?r(o,s,c,m):!0}},8545:function(l){"use strict";l.exports=t;function e(n,r){var a=n+r,o=a-n,s=a-o,c=r-o,m=n-s,h=m+c;return h?[h,a]:[a]}function t(n,r){var a=n.length|0,o=r.length|0;if(a===1&&o===1)return e(n[0],-r[0]);var s=a+o,c=new Array(s),m=0,h=0,v=0,g=Math.abs,i=n[h],w=g(i),S=-r[v],M=g(S),C,_;w=o?(C=i,h+=1,h=o?(C=i,h+=1,h"u"&&(C=s(w));var _=w.length;if(_===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var T=c(S,+M),f=m(w,C),u=h(f,S,T,+M),A=v(f,S.length|0),x=o(C)(w,f.data,A,T),z=g(f),I=[].slice.call(u.data,0,u.shape[0]);return r.free(T),r.free(f.data),r.free(u.data),r.free(A),{cells:x,vertexIds:z,vertexWeights:I}}},1570:function(l){"use strict";l.exports=t;var e=[function(){function r(o,s,c,m){for(var h=Math.min(c,m)|0,v=Math.max(c,m)|0,g=o[2*h],i=o[2*h+1];g>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,B=m(A[D],x);B<=0?(B===0&&(O=D),z=D+1):B>0&&(I=D-1)}return O}n=i;function w(A,x){for(var z=new Array(A.length),I=0,O=z.length;I=A.length||m(A[re],D)!==0););}return z}n=w;function S(A,x){if(!x)return w(g(C(A,0)),A,0);for(var z=new Array(x),I=0;I>>j&1&&P.push(O[j]);x.push(P)}return v(x)}n=M;function C(A,x){if(x<0)return[];for(var z=[],I=(1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},2014:function(l,e,t){"use strict";"use restrict";var n=t(3105),r=t(4623);function a(u){for(var A=0,x=Math.max,z=0,I=u.length;z>1,D=c(u[O],A);D<=0?(D===0&&(I=O),x=O+1):D>0&&(z=O-1)}return I}e.findCell=g;function i(u,A){for(var x=new Array(u.length),z=0,I=x.length;z=u.length||c(u[Q],O)!==0););}return x}e.incidence=i;function w(u,A){if(!A)return i(v(M(u,0)),u,0);for(var x=new Array(A),z=0;z>>P&1&&F.push(I[P]);A.push(F)}return h(A)}e.explode=S;function M(u,A){if(A<0)return[];for(var x=[],z=(1<>1:(G>>1)-1}function z(G){for(var X=A(G);;){var K=X,H=2*G+1,Y=2*(G+1),q=G;if(H0;){var K=x(G);if(K>=0){var H=A(K);if(X0){var G=F[0];return u(0,U-1),U-=1,z(0),G}return-1}function D(G,X){var K=F[G];return w[K]===X?G:(w[K]=-1/0,I(G),O(),w[K]=X,U+=1,I(U-1))}function B(G){if(!S[G]){S[G]=!0;var X=g[G],K=i[G];g[K]>=0&&(g[K]=X),i[X]>=0&&(i[X]=K),P[X]>=0&&D(P[X],f(X)),P[K]>=0&&D(P[K],f(K))}}for(var F=[],P=new Array(h),M=0;M>1;M>=0;--M)z(M);for(;;){var $=O();if($<0||w[$]>m)break;B($)}for(var Q=[],M=0;M=0&&K>=0&&X!==K){var H=P[X],Y=P[K];H!==Y&&se.push([H,Y])}}),r.unique(r.normalize(se)),{positions:Q,edges:se}}},1303:function(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){var c,m;if(s[0][0]s[1][0])c=s[1],m=s[0];else{var h=Math.min(o[0][1],o[1][1]),v=Math.max(o[0][1],o[1][1]),g=Math.min(s[0][1],s[1][1]),i=Math.max(s[0][1],s[1][1]);return vi?h-i:v-i}var w,S;o[0][1]s[1][0])c=s[1],m=s[0];else return r(s,o);var h,v;if(o[0][0]o[1][0])h=o[1],v=o[0];else return-r(o,s);var g=n(c,m,v),i=n(c,m,h);if(g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;if(g=n(v,h,m),i=n(v,h,c),g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;return m[0]-v[0]}},4209:function(l,e,t){"use strict";l.exports=i;var n=t(2478),r=t(3840),a=t(3250),o=t(1303);function s(w,S,M){this.slabs=w,this.coordinates=S,this.horizontal=M}var c=s.prototype;function m(w,S){return w.y-S}function h(w,S){for(var M=null;w;){var C=w.key,_,T;C[0][0]0)if(S[0]!==C[1][0])M=w,w=w.right;else{var u=h(w.right,S);if(u)return u;w=w.left}else{if(S[0]!==C[1][0])return w;var u=h(w.right,S);if(u)return u;w=w.left}}return M}c.castUp=function(w){var S=n.le(this.coordinates,w[0]);if(S<0)return-1;var M=this.slabs[S],C=h(this.slabs[S],w),_=-1;if(C&&(_=C.value),this.coordinates[S]===w[0]){var T=null;if(C&&(T=C.key),S>0){var f=h(this.slabs[S-1],w);f&&(T?o(f.key,T)>0&&(T=f.key,_=f.value):(_=f.value,T=f.key))}var u=this.horizontal[S];if(u.length>0){var A=n.ge(u,w[1],m);if(A=u.length)return _;x=u[A]}}if(x.start)if(T){var z=a(T[0],T[1],[w[0],x.y]);T[0][0]>T[1][0]&&(z=-z),z>0&&(_=x.index)}else _=x.index;else x.y!==w[1]&&(_=x.index)}}}return _};function v(w,S,M,C){this.y=w,this.index=S,this.start=M,this.closed=C}function g(w,S,M,C){this.x=w,this.segment=S,this.create=M,this.index=C}function i(w){for(var S=w.length,M=2*S,C=new Array(M),_=0;_1&&(S=1);for(var M=1-S,C=h.length,_=new Array(C),T=0;T0||w>0&&_<0){var T=o(S,_,M,w);g.push(T),i.push(T.slice())}_<0?i.push(M.slice()):_>0?g.push(M.slice()):(g.push(M.slice()),i.push(M.slice())),w=_}return{positive:g,negative:i}}function c(h,v){for(var g=[],i=a(h[h.length-1],v),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C>=0&&g.push(S.slice()),i=C}return g}function m(h,v){for(var g=[],i=a(h[h.length-1],v),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C<=0&&g.push(S.slice()),i=C}return g}},3387:function(l,e,t){var n;(function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(h){return s(m(h),arguments)}function o(h,v){return a.apply(null,[h].concat(v||[]))}function s(h,v){var g=1,i=h.length,w,S="",M,C,_,T,f,u,A,x;for(M=0;M=0),_.type){case"b":w=parseInt(w,10).toString(2);break;case"c":w=String.fromCharCode(parseInt(w,10));break;case"d":case"i":w=parseInt(w,10);break;case"j":w=JSON.stringify(w,null,_.width?parseInt(_.width):0);break;case"e":w=_.precision?parseFloat(w).toExponential(_.precision):parseFloat(w).toExponential();break;case"f":w=_.precision?parseFloat(w).toFixed(_.precision):parseFloat(w);break;case"g":w=_.precision?String(Number(w.toPrecision(_.precision))):parseFloat(w);break;case"o":w=(parseInt(w,10)>>>0).toString(8);break;case"s":w=String(w),w=_.precision?w.substring(0,_.precision):w;break;case"t":w=String(!!w),w=_.precision?w.substring(0,_.precision):w;break;case"T":w=Object.prototype.toString.call(w).slice(8,-1).toLowerCase(),w=_.precision?w.substring(0,_.precision):w;break;case"u":w=parseInt(w,10)>>>0;break;case"v":w=w.valueOf(),w=_.precision?w.substring(0,_.precision):w;break;case"x":w=(parseInt(w,10)>>>0).toString(16);break;case"X":w=(parseInt(w,10)>>>0).toString(16).toUpperCase();break}r.json.test(_.type)?S+=w:(r.number.test(_.type)&&(!A||_.sign)?(x=A?"+":"-",w=w.toString().replace(r.sign,"")):x="",f=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",u=_.width-(x+w).length,T=_.width&&u>0?f.repeat(u):"",S+=_.align?x+w+T:f==="0"?x+T+w:T+x+w)}return S}var c=Object.create(null);function m(h){if(c[h])return c[h];for(var v=h,g,i=[],w=0;v;){if((g=r.text.exec(v))!==null)i.push(g[0]);else if((g=r.modulo.exec(v))!==null)i.push("%");else if((g=r.placeholder.exec(v))!==null){if(g[2]){w|=1;var S=[],M=g[2],C=[];if((C=r.key.exec(M))!==null)for(S.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=r.key_access.exec(M))!==null)S.push(C[1]);else if((C=r.index_access.exec(M))!==null)S.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=S}else w|=2;if(w===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(g[0].length)}return c[h]=i}e.sprintf=a,e.vsprintf=o,typeof window<"u"&&(window.sprintf=a,window.vsprintf=o,n=function(){return{sprintf:a,vsprintf:o}}.call(e,t,e,l),n!==void 0&&(l.exports=n))})()},3711:function(l,e,t){"use strict";l.exports=m;var n=t(2640),r=t(781),a={"2d":function(h,v,g){var i=h({order:v,scalarArguments:3,getters:g==="generic"?[0]:void 0,phase:function(S,M,C,_){return S>_|0},vertex:function(S,M,C,_,T,f,u,A,x,z,I,O,D){var B=(u<<0)+(A<<1)+(x<<2)+(z<<3)|0;if(!(B===0||B===15))switch(B){case 0:I.push([S-.5,M-.5]);break;case 1:I.push([S-.25-.25*(_+C-2*D)/(C-_),M-.25-.25*(T+C-2*D)/(C-T)]);break;case 2:I.push([S-.75-.25*(-_-C+2*D)/(_-C),M-.25-.25*(f+_-2*D)/(_-f)]);break;case 3:I.push([S-.5,M-.5-.5*(T+C+f+_-4*D)/(C-T+_-f)]);break;case 4:I.push([S-.25-.25*(f+T-2*D)/(T-f),M-.75-.25*(-T-C+2*D)/(T-C)]);break;case 5:I.push([S-.5-.5*(_+C+f+T-4*D)/(C-_+T-f),M-.5]);break;case 6:I.push([S-.5-.25*(-_-C+f+T)/(_-C+T-f),M-.5-.25*(-T-C+f+_)/(T-C+_-f)]);break;case 7:I.push([S-.75-.25*(f+T-2*D)/(T-f),M-.75-.25*(f+_-2*D)/(_-f)]);break;case 8:I.push([S-.75-.25*(-f-T+2*D)/(f-T),M-.75-.25*(-f-_+2*D)/(f-_)]);break;case 9:I.push([S-.5-.25*(_+C+-f-T)/(C-_+f-T),M-.5-.25*(T+C+-f-_)/(C-T+f-_)]);break;case 10:I.push([S-.5-.5*(-_-C+-f-T+4*D)/(_-C+f-T),M-.5]);break;case 11:I.push([S-.25-.25*(-f-T+2*D)/(f-T),M-.75-.25*(T+C-2*D)/(C-T)]);break;case 12:I.push([S-.5,M-.5-.5*(-T-C+-f-_+4*D)/(T-C+f-_)]);break;case 13:I.push([S-.75-.25*(_+C-2*D)/(C-_),M-.25-.25*(-f-_+2*D)/(f-_)]);break;case 14:I.push([S-.25-.25*(-_-C+2*D)/(_-C),M-.25-.25*(-T-C+2*D)/(T-C)]);break;case 15:I.push([S-.5,M-.5]);break}},cell:function(S,M,C,_,T,f,u,A,x){T?A.push([S,M]):A.push([M,S])}});return function(w,S){var M=[],C=[];return i(w,M,C,S),{positions:M,cells:C}}}};function o(h,v){var g=h.length+"d",i=a[g];if(i)return i(n,h,v)}function s(h,v){for(var g=r(h,v),i=g.length,w=new Array(i),S=new Array(i),M=0;MMath.max(_,T)?f[2]=1:_>Math.max(C,T)?f[0]=1:f[1]=1;for(var u=0,A=0,x=0;x<3;++x)u+=M[x]*M[x],A+=f[x]*M[x];for(var x=0;x<3;++x)f[x]-=A/u*M[x];return s(f,f),f}function g(M,C,_,T,f,u,A,x){this.center=n(_),this.up=n(T),this.right=n(f),this.radius=n([u]),this.angle=n([A,x]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),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 z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var i=g.prototype;i.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},i.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},i.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,_=this.computedRight,T=0,f=0,u=0;u<3;++u)f+=C[u]*_[u],T+=C[u]*C[u];for(var A=Math.sqrt(T),x=0,u=0;u<3;++u)_[u]-=C[u]*f/T,x+=_[u]*_[u],C[u]/=A;for(var z=Math.sqrt(x),u=0;u<3;++u)_[u]/=z;var I=this.computedToward;o(I,C,_),s(I,I);for(var O=Math.exp(this.computedRadius[0]),D=this.computedAngle[0],B=this.computedAngle[1],F=Math.cos(D),P=Math.sin(D),j=Math.cos(B),U=Math.sin(B),$=this.computedCenter,Q=F*j,re=P*j,ne=U,se=-F*U,G=-P*U,X=j,K=this.computedEye,H=this.computedMatrix,u=0;u<3;++u){var Y=Q*_[u]+re*I[u]+ne*C[u];H[4*u+1]=se*_[u]+G*I[u]+X*C[u],H[4*u+2]=Y,H[4*u+3]=0}var q=H[1],Z=H[5],ee=H[9],ae=H[2],he=H[6],xe=H[10],we=Z*xe-ee*he,Me=ee*ae-q*xe,Se=q*he-Z*ae,Ie=m(we,Me,Se);we/=Ie,Me/=Ie,Se/=Ie,H[0]=we,H[4]=Me,H[8]=Se;for(var u=0;u<3;++u)K[u]=$[u]+H[2+4*u]*O;for(var u=0;u<3;++u){for(var x=0,Ve=0;Ve<3;++Ve)x+=H[u+4*Ve]*K[Ve];H[12+u]=-x}H[15]=1},i.getMatrix=function(M,C){this.recalcMatrix(M);var _=this.computedMatrix;if(C){for(var T=0;T<16;++T)C[T]=_[T];return C}return _};var w=[0,0,0];i.rotate=function(M,C,_,T){if(this.angle.move(M,C,_),T){this.recalcMatrix(M);var f=this.computedMatrix;w[0]=f[2],w[1]=f[6],w[2]=f[10];for(var u=this.computedUp,A=this.computedRight,x=this.computedToward,z=0;z<3;++z)f[4*z]=u[z],f[4*z+1]=A[z],f[4*z+2]=x[z];a(f,f,T,w);for(var z=0;z<3;++z)u[z]=f[4*z],A[z]=f[4*z+1];this.up.set(M,u[0],u[1],u[2]),this.right.set(M,A[0],A[1],A[2])}},i.pan=function(M,C,_,T){C=C||0,_=_||0,T=T||0,this.recalcMatrix(M);var f=this.computedMatrix,u=Math.exp(this.computedRadius[0]),A=f[1],x=f[5],z=f[9],I=m(A,x,z);A/=I,x/=I,z/=I;var O=f[0],D=f[4],B=f[8],F=O*A+D*x+B*z;O-=A*F,D-=x*F,B-=z*F;var P=m(O,D,B);O/=P,D/=P,B/=P;var j=O*C+A*_,U=D*C+x*_,$=B*C+z*_;this.center.move(M,j,U,$);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+T),this.radius.set(M,Math.log(Q))},i.translate=function(M,C,_,T){this.center.move(M,C||0,_||0,T||0)},i.setMatrix=function(M,C,_,T){var f=1;typeof _=="number"&&(f=_|0),(f<0||f>3)&&(f=1);var u=(f+2)%3,A=(f+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var x=C[f],z=C[f+4],I=C[f+8];if(T){var D=Math.abs(x),B=Math.abs(z),F=Math.abs(I),P=Math.max(D,B,F);D===P?(x=x<0?-1:1,z=I=0):F===P?(I=I<0?-1:1,x=z=0):(z=z<0?-1:1,x=I=0)}else{var O=m(x,z,I);x/=O,z/=O,I/=O}var j=C[u],U=C[u+4],$=C[u+8],Q=j*x+U*z+$*I;j-=x*Q,U-=z*Q,$-=I*Q;var re=m(j,U,$);j/=re,U/=re,$/=re;var ne=z*$-I*U,se=I*j-x*$,G=x*U-z*j,X=m(ne,se,G);ne/=X,se/=X,G/=X,this.center.jump(M,ve,le,Ae),this.radius.idle(M),this.up.jump(M,x,z,I),this.right.jump(M,j,U,$);var K,H;if(f===2){var Y=C[1],q=C[5],Z=C[9],ee=Y*j+q*U+Z*$,ae=Y*ne+q*se+Z*G;Me<0?K=-Math.PI/2:K=Math.PI/2,H=Math.atan2(ae,ee)}else{var he=C[2],xe=C[6],we=C[10],Me=he*x+xe*z+we*I,Se=he*j+xe*U+we*$,Ie=he*ne+xe*se+we*G;K=Math.asin(h(Me)),H=Math.atan2(Ie,Se)}this.angle.jump(M,H,K),this.recalcMatrix(M);var Ve=C[2],Ge=C[6],ke=C[10],_e=this.computedMatrix;r(_e,C);var ce=_e[15],ve=_e[12]/ce,le=_e[13]/ce,Ae=_e[14]/ce,Be=Math.exp(this.computedRadius[0]);this.center.jump(M,ve-Ve*Be,le-Ge*Be,Ae-ke*Be)},i.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},i.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},i.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},i.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},i.lookAt=function(M,C,_,T){this.recalcMatrix(M),C=C||this.computedEye,_=_||this.computedCenter,T=T||this.computedUp;var f=T[0],u=T[1],A=T[2],x=m(f,u,A);if(!(x<1e-6)){f/=x,u/=x,A/=x;var z=C[0]-_[0],I=C[1]-_[1],O=C[2]-_[2],D=m(z,I,O);if(!(D<1e-6)){z/=D,I/=D,O/=D;var B=this.computedRight,F=B[0],P=B[1],j=B[2],U=f*F+u*P+A*j;F-=U*f,P-=U*u,j-=U*A;var $=m(F,P,j);if(!($<.01&&(F=u*O-A*I,P=A*z-f*O,j=f*I-u*z,$=m(F,P,j),$<1e-6))){F/=$,P/=$,j/=$,this.up.set(M,f,u,A),this.right.set(M,F,P,j),this.center.set(M,_[0],_[1],_[2]),this.radius.set(M,Math.log(D));var Q=u*j-A*P,re=A*F-f*j,ne=f*P-u*F,se=m(Q,re,ne);Q/=se,re/=se,ne/=se;var G=f*z+u*I+A*O,X=F*z+P*I+j*O,K=Q*z+re*I+ne*O,H=Math.asin(h(G)),Y=Math.atan2(K,X),q=this.angle._state,Z=q[q.length-1],ee=q[q.length-2];Z=Z%(2*Math.PI);var ae=Math.abs(Z+2*Math.PI-Y),he=Math.abs(Z-Y),xe=Math.abs(Z-2*Math.PI-Y);ae0?j.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=w;function S(B){return new Uint8Array(w(B),0,B)}e.mallocUint8=S;function M(B){return new Uint16Array(w(2*B),0,B)}e.mallocUint16=M;function C(B){return new Uint32Array(w(4*B),0,B)}e.mallocUint32=C;function _(B){return new Int8Array(w(B),0,B)}e.mallocInt8=_;function T(B){return new Int16Array(w(2*B),0,B)}e.mallocInt16=T;function f(B){return new Int32Array(w(4*B),0,B)}e.mallocInt32=f;function u(B){return new Float32Array(w(4*B),0,B)}e.mallocFloat32=e.mallocFloat=u;function A(B){return new Float64Array(w(8*B),0,B)}e.mallocFloat64=e.mallocDouble=A;function x(B){return o?new Uint8ClampedArray(w(B),0,B):S(B)}e.mallocUint8Clamped=x;function z(B){return s?new BigUint64Array(w(8*B),0,B):null}e.mallocBigUint64=z;function I(B){return c?new BigInt64Array(w(8*B),0,B):null}e.mallocBigInt64=I;function O(B){return new DataView(w(B),0,B)}e.mallocDataView=O;function D(B){B=n.nextPow2(B);var F=n.log2(B),P=v[F];return P.length>0?P.pop():new a(B)}e.mallocBuffer=D,e.clearCache=function(){for(var F=0;F<32;++F)m.UINT8[F].length=0,m.UINT16[F].length=0,m.UINT32[F].length=0,m.INT8[F].length=0,m.INT16[F].length=0,m.INT32[F].length=0,m.FLOAT[F].length=0,m.DOUBLE[F].length=0,m.BIGUINT64[F].length=0,m.BIGINT64[F].length=0,m.UINT8C[F].length=0,h[F].length=0,v[F].length=0}},1755:function(l){"use strict";"use restrict";l.exports=e;function e(n){this.roots=new Array(n),this.ranks=new Array(n);for(var r=0;r",j="",U=P.length,$=j.length,Q=D[0]===w||D[0]===C,re=0,ne=-$;re>-1&&(re=B.indexOf(P,re),!(re===-1||(ne=B.indexOf(j,re+U),ne===-1)||ne<=re));){for(var se=re;se=ne)F[se]=null,B=B.substr(0,se)+" "+B.substr(se+1);else if(F[se]!==null){var G=F[se].indexOf(D[0]);G===-1?F[se]+=D:Q&&(F[se]=F[se].substr(0,G+1)+(1+parseInt(F[se][G+1]))+F[se].substr(G+2))}var X=re+U,K=B.substr(X,ne-X),H=K.indexOf(P);H!==-1?re=H:re=ne+$}return F}function f(O,D,B){for(var F=D.textAlign||"start",P=D.textBaseline||"alphabetic",j=[1<<30,1<<30],U=[0,0],$=O.length,Q=0;Q<$;++Q)for(var re=O[Q],ne=0;ne<2;++ne)j[ne]=Math.min(j[ne],re[ne])|0,U[ne]=Math.max(U[ne],re[ne])|0;var se=0;switch(F){case"center":se=-.5*(j[0]+U[0]);break;case"right":case"end":se=-U[0];break;case"left":case"start":se=-j[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+F+"'")}var G=0;switch(P){case"hanging":case"top":G=-j[1];break;case"middle":G=-.5*(j[1]+U[1]);break;case"alphabetic":case"ideographic":G=-3*B;break;case"bottom":G=-U[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+P+"'")}var X=1/B;return"lineHeight"in D?X*=+D.lineHeight:"width"in D?X=D.width/(U[0]-j[0]):"height"in D&&(X=D.height/(U[1]-j[1])),O.map(function(K){return[X*(K[0]+se),X*(K[1]+G)]})}function u(O,D,B,F,P,j){B=B.replace(/\n/g,""),j.breaklines===!0?B=B.replace(/\/g,` -`):B=B.replace(/\/g," ");var U="",$=[];for(Z=0;Z-1?parseInt(le[1+Xe]):0,gt=Ye>-1?parseInt(Ae[1+Ye]):0;yt!==gt&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,gt-yt),Be=Be.replace("?px ",Se())),ae+=.25*G*(gt-yt)}if(j.superscripts===!0){var Tt=le.indexOf(w),At=Ae.indexOf(w),$t=Tt>-1?parseInt(le[1+Tt]):0,rr=At>-1?parseInt(Ae[1+At]):0;$t!==rr&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,rr-$t),Be=Be.replace("?px ",Se())),ae-=.25*G*(rr-$t)}if(j.bolds===!0){var _r=le.indexOf(h)>-1,Xt=Ae.indexOf(h)>-1;!_r&&Xt&&(or?Be=Be.replace("italic ","italic bold "):Be="bold "+Be),_r&&!Xt&&(Be=Be.replace("bold ",""))}if(j.italics===!0){var or=le.indexOf(g)>-1,Ot=Ae.indexOf(g)>-1;!or&&Ot&&(Be="italic "+Be),or&&!Ot&&(Be=Be.replace("italic ",""))}D.font=Be}for(q=0;q0&&(P=F.size),F.lineSpacing&&F.lineSpacing>0&&(j=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(U.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(U.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(U.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(U.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(U.superscripts=!!F.styletags.superscripts)),B.font=[F.fontStyle,F.fontVariant,F.fontWeight,P+"px",F.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var $=u(D,B,O,P,j,U);return z($,F,P)}},1538:function(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(x){x.permitHostObjects___&&x.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var n=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new r,o=Object.freeze({});if(a.set(o,1),a.get(o)!==1)n=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,m=Object.defineProperty,h=Object.isExtensible,v="weakmap:",g=v+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var i=new ArrayBuffer(25),w=new Uint8Array(i);crypto.getRandomValues(w),g=v+"rand:"+Array.prototype.map.call(w,function(x){return(x%36).toString(36)}).join("")+"___"}function S(x){return!(x.substr(0,v.length)==v&&x.substr(x.length-3)==="___")}if(m(Object,"getOwnPropertyNames",{value:function(z){return c(z).filter(S)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;m(Object,"getPropertyNames",{value:function(z){return M(z).filter(S)}})}function C(x){if(x!==Object(x))throw new TypeError("Not an object: "+x);var z=x[g];if(z&&z.key===x)return z;if(h(x)){z={key:x};try{return m(x,g,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch{return}}}(function(){var x=Object.freeze;m(Object,"freeze",{value:function(D){return C(D),x(D)}});var z=Object.seal;m(Object,"seal",{value:function(D){return C(D),z(D)}});var I=Object.preventExtensions;m(Object,"preventExtensions",{value:function(D){return C(D),I(D)}})})();function _(x){return x.prototype=null,Object.freeze(x)}var T=!1;function f(){!T&&typeof console<"u"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,A=function(){this instanceof A||f();var x=[],z=[],I=u++;function O(P,j){var U,$=C(P);return $?I in $?$[I]:j:(U=x.indexOf(P),U>=0?z[U]:j)}function D(P){var j=C(P);return j?I in j:x.indexOf(P)>=0}function B(P,j){var U,$=C(P);return $?$[I]=j:(U=x.indexOf(P),U>=0?z[U]=j:(U=x.length,z[U]=j,x[U]=P)),this}function F(P){var j=C(P),U,$;return j?I in j&&delete j[I]:(U=x.indexOf(P),U<0?!1:($=x.length-1,x[U]=void 0,z[U]=z[$],x[U]=x[$],x.length=$,z.length=$,!0))}return Object.create(A.prototype,{get___:{value:_(O)},has___:{value:_(D)},set___:{value:_(B)},delete___:{value:_(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(z,I){return this.get___(z,I)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,I){return this.set___(z,I)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof r=="function"?function(){n&&typeof Proxy<"u"&&(Proxy=void 0);function x(){this instanceof A||f();var z=new r,I=void 0,O=!1;function D(j,U){return I?z.has(j)?z.get(j):I.get___(j,U):z.get(j,U)}function B(j){return z.has(j)||(I?I.has___(j):!1)}var F;n?F=function(j,U){return z.set(j,U),z.has(j)||(I||(I=new A),I.set(j,U)),this}:F=function(j,U){if(O)try{z.set(j,U)}catch{I||(I=new A),I.set___(j,U)}else z.set(j,U);return this};function P(j){var U=!!z.delete(j);return I&&I.delete___(j)||U}return Object.create(A.prototype,{get___:{value:_(D)},has___:{value:_(B)},set___:{value:_(F)},delete___:{value:_(P)},permitHostObjects___:{value:_(function(j){if(j===t)O=!0;else throw new Error("bogus call to permitHostObjects___")})}})}x.prototype=A.prototype,l.exports=x,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=A)})()},236:function(l,e,t){var n=t(8284);l.exports=r;function r(){var a={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var s=o.valueOf(a);return s&&s.identity===a?s:n(o,a)}}},8284:function(l){l.exports=e;function e(t,n){var r={identity:n},a=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(o){return o!==n?a.apply(this,arguments):r},writable:!0}),r}},606:function(l,e,t){var n=t(236);l.exports=r;function r(){var a=n();return{get:function(o,s){var c=a(o);return c.hasOwnProperty("value")?c.value:s},set:function(o,s){return a(o).value=s,this},has:function(o){return"value"in a(o)},delete:function(o){return delete a(o).value}}}},3349:function(l){"use strict";function e(){return function(s,c,m,h,v,g){var i=s[0],w=m[0],S=[0],M=w;h|=0;var C=0,_=w;for(C=0;C=0!=f>=0&&v.push(S[0]+.5+.5*(T+f)/(T-f))}h+=_,++S[0]}}}function t(){return e()}var n=t;function r(s){var c={};return function(h,v,g){var i=h.dtype,w=h.order,S=[i,w.join()].join(),M=c[S];return M||(c[S]=M=s([i,w])),M(h.shape.slice(0),h.data,h.stride,h.offset|0,v,g)}}function a(s){return r(n.bind(void 0,s))}function o(s){return a({funcName:s.funcName})}l.exports=o({funcName:"zeroCrossings"})},781:function(l,e,t){"use strict";l.exports=r;var n=t(3349);function r(a,o){var s=[];return o=+o||0,n(a.hi(a.shape[0]-1),s,o),s}},7790:function(){}},b={};function E(l){var e=b[l];if(e!==void 0)return e.exports;var t=b[l]={id:l,loaded:!1,exports:{}};return p[l].call(t.exports,t,t.exports,E),t.loaded=!0,t.exports}(function(){E.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){E.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var k=E(1964);V.exports=k})()}}),cp=ze({"src/lib/str2rgbarray.js"(J,V){"use strict";var{normalize:p}=Qn();function b(E){return E?p(E):[0,0,0,1]}V.exports=b}}),fp=ze({"src/lib/gl_format_color.js"(J,V){"use strict";var p=ao(),b=fl(),E=Qn(),k=fc().defaultLine,l=Ff().isArrayOrTypedArray,e=E.normalize(k),t=1;function n(c,m){return[c[0],c[1],c[2],c[3]*m]}function r(c){return p(c)||!E.isChannelArray(c)&&!E.isValid(c)?e:E.normalize(c)}function a(c){return p(c)?c:t}function o(c,m,h){var v=c.color;v&&v._inputArray&&(v=v._inputArray);var g=l(v),i=l(m),w=b.extractOpts(c),S=[],M,C,_,T,f;if(w.colorscale!==void 0?M=b.makeColorScaleFuncFromTrace(c):M=r,g?C=(A,x)=>A[x]===void 0?e:w.colorscale===void 0?M(A[x]):E.normalize(M(A[x])):C=r,i?_=function(A,x){return A[x]===void 0?t:a(A[x])}:_=a,g||i)for(var u=0;u0){var v=n.c2l(m);n._lowerLogErrorBound||(n._lowerLogErrorBound=v),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,v)}}else a[o]=[-s[0]*t,s[1]*t]}return a}function E(l){for(var e=0;e-1?-1:z.indexOf("right")>-1?1:0}function S(z){return z==null?0:z.indexOf("top")>-1?-1:z.indexOf("bottom")>-1?1:0}function M(z){var I=0,O=0,D=[I,O];if(Array.isArray(z))for(var B=0;B=0){var $=g(j.position,j.delaunayColor,j.delaunayAxis);$.opacity=z.opacity,this.delaunayMesh?this.delaunayMesh.update($):($.gl=I,this.delaunayMesh=k($),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)},v.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 x(z,I){var O=new h(z,I.uid);return O.update(I),O}V.exports=x}}),mA=ze({"src/traces/scatter3d/attributes.js"(J,V){"use strict";var p=su(),b=Qs(),E=qs(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=ws(),r=vA(),a=w2(),o=Ki().extendFlat,s=Al().overrideAll,c=(Nv(),Po(nv)).default,m=p.line,h=p.marker,v=h.line,g=o({width:m.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},E("line"));function i(S){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 w=V.exports=s({x:p.x,y:p.y,z:{valType:"data_array"},text:o({},p.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:o({},p.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z"),mode:o({},p.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:i("x"),y:i("y"),z:i("z")},connectgaps:p.connectgaps,line:g,marker:o({symbol:{valType:"enumerated",values:c(a),dflt:"circle",arrayOk:!0},size:o({},h.size,{dflt:8}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:o({},h.opacity,{arrayOk:!1}),colorbar:h.colorbar,line:o({width:o({},v.width,{arrayOk:!1})},E("marker.line"))},E("marker")),textposition:o({},p.textposition,{dflt:"top center"}),textfont:b({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:n.opacity,hoverinfo:o({},n.hoverinfo)},"calc","nested");w.x.editType=w.y.editType=w.z.editType="calc+clearAxisTypes"}}),LN=ze({"src/traces/scatter3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=el(),k=id(),l=_d(),e=xd(),t=mA();V.exports=function(a,o,s,c){function m(C,_){return b.coerce(a,o,t,C,_)}var h=n(a,o,m,c);if(!h){o.visible=!1;return}m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),m("zhoverformat"),m("mode"),E.hasMarkers(o)&&k(a,o,s,c,m,{noAngle:!0,noLineDash:!0,noSelect:!0}),E.hasLines(o)&&(m("connectgaps"),l(a,o,s,c,m)),E.hasText(o)&&(m("texttemplate"),m("texttemplatefallback"),e(a,o,c,m,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var v=(o.line||{}).color,g=(o.marker||{}).color;m("surfaceaxis")>=0&&m("surfacecolor",v||g);for(var i=["x","y","z"],w=0;w<3;++w){var S="projection."+i[w];m(S+".show")&&(m(S+".opacity"),m(S+".scale"))}var M=p.getComponentMethod("errorbars","supplyDefaults");M(a,o,v||g||s,{axis:"z"}),M(a,o,v||g||s,{axis:"y",inherit:"z"}),M(a,o,v||g||s,{axis:"x",inherit:"z"})};function n(r,a,o,s){var c=0,m=o("x"),h=o("y"),v=o("z"),g=p.getComponentMethod("calendars","handleTraceDefaults");return g(r,a,["x","y","z"],s),m&&h&&v&&(c=Math.min(m.length,h.length,v.length),a._length=a._xlength=a._ylength=a._zlength=c),c}}}),PN=ze({"src/traces/scatter3d/calc.js"(J,V){"use strict";var p=Nd(),b=od();V.exports=function(k,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return p(e,l),b(k,l),e}}}),RN=ze({"node_modules/get-canvas-context/index.js"(J,V){V.exports=p;function p(b,E){if(typeof b!="string")throw new TypeError("must specify type string");if(E=E||{},typeof document>"u"&&!E.canvas)return null;var k=E.canvas||document.createElement("canvas");typeof E.width=="number"&&(k.width=E.width),typeof E.height=="number"&&(k.height=E.height);var l=E,e;try{var t=[b];b.indexOf("webgl")===0&&t.push("experimental-"+b);for(var n=0;n/g," "));o[s]=v,c.tickmode=m}}n.ticks=o;for(var s=0;s<3;++s){k[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var g=0;g<2;++g)n.bounds[g][s]=t.glplot.bounds[g][s]}t.contourLevels=l(o)}}}),BN=ze({"src/plots/gl3d/scene.js"(J,V){"use strict";var p=df().gl_plot3d,b=p.createCamera,E=p.createScene,k=IN(),l=Rx(),e=mi(),t=Nr(),n=t.preserveDrawingBuffer(),r=Gi(),a=Zl(),o=cp(),s=gA(),c=C5(),m=DN(),h=FN(),v=zN(),g=md().applyAutorangeOptions,i,w,S=!1;function M(O,D){var B=document.createElement("div"),F=O.container;this.graphDiv=O.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",B.appendChild(P),this.svgContainer=P,B.id=O.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",F.appendChild(B),this.fullLayout=D,this.id=O.id||"scene",this.fullSceneLayout=D[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(D,D[this.id]),this.spikeOptions=h(D[this.id]),this.container=B,this.staticMode=!!O.staticPlot,this.pixelRatio=this.pixelRatio||O.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var O=this,D={canvas:O.canvas,gl:O.gl,glOptions:{preserveDrawingBuffer:n,premultipliedAlpha:!0,antialias:!0},container:O.container,axes:O.axesOptions,spikes:O.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:O.camera,pixelRatio:O.pixelRatio};if(O.staticMode){if(!w&&(i=document.createElement("canvas"),w=k({canvas:i,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!w))throw new Error("error creating static canvas/context for image server");D.gl=w,D.canvas=i}return D};var _=!0;C.tryCreatePlot=function(){var O=this,D=O.prepareOptions(),B=!0;try{O.glplot=E(D)}catch{if(O.staticMode||!_||n)B=!1;else{t.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{n=D.glOptions.preserveDrawingBuffer=!0,O.glplot=E(D)}catch{n=D.glOptions.preserveDrawingBuffer=!1,B=!1}}}return _=!1,B},C.initializeGLCamera=function(){var O=this,D=O.fullSceneLayout.camera,B=D.projection.type==="orthographic";O.camera=b(O.container,{center:[D.center.x,D.center.y,D.center.z],eye:[D.eye.x,D.eye.y,D.eye.z],up:[D.up.x,D.up.y,D.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var O=this;O.initializeGLCamera();var D=O.tryCreatePlot();if(!D)return s(O);O.traces={},O.make4thDimension();var B=O.graphDiv,F=B.layout,P=function(){var U={};return O.isCameraChanged(F)&&(U[O.id+".camera"]=O.getCamera()),O.isAspectChanged(F)&&(U[O.id+".aspectratio"]=O.glplot.getAspectratio(),F[O.id].aspectmode!=="manual"&&(O.fullSceneLayout.aspectmode=F[O.id].aspectmode=U[O.id+".aspectmode"]="manual")),U},j=function(U){if(U.fullSceneLayout.dragmode!==!1){var $=P();U.saveLayout(F),U.graphDiv.emit("plotly_relayout",$)}};return O.glplot.canvas&&(O.glplot.canvas.addEventListener("mouseup",function(){j(O)}),O.glplot.canvas.addEventListener("touchstart",function(){S=!0}),O.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(O.camera._ortho){var $=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=O.glplot.getAspectratio();O.glplot.setAspectratio({x:$*Q.x,y:$*Q.y,z:$*Q.z})}j(O)}},l?{passive:!1}:!1),O.glplot.canvas.addEventListener("mousemove",function(){if(O.fullSceneLayout.dragmode!==!1&&O.camera.mouseListener.buttons!==0){var U=P();O.graphDiv.emit("plotly_relayouting",U)}}),O.staticMode||O.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:O.id})},!1)),O.glplot.oncontextloss=function(){O.recoverContext()},O.glplot.onrender=function(){O.render()},!0},C.render=function(){var O=this,D=O.graphDiv,B,F=O.svgContainer,P=O.container.getBoundingClientRect();D._fullLayout._calcInverseTransform(D);var j=D._fullLayout._invScaleX,U=D._fullLayout._invScaleY,$=P.width*j,Q=P.height*U;F.setAttributeNS(null,"viewBox","0 0 "+$+" "+Q),F.setAttributeNS(null,"width",$),F.setAttributeNS(null,"height",Q),v(O),O.glplot.axes.update(O.axesOptions);for(var re=Object.keys(O.traces),ne=null,se=O.glplot.selection,G=0;G")):B.type==="isosurface"||B.type==="volume"?(q.valueLabel=r.hoverLabelText(O._mockAxis,O._mockAxis.d2l(se.traceCoordinate[3]),B.valuehoverformat),xe.push("value: "+q.valueLabel),se.textLabel&&xe.push(se.textLabel),he=xe.join("
")):he=se.textLabel;var we={x:se.traceCoordinate[0],y:se.traceCoordinate[1],z:se.traceCoordinate[2],data:H._input,fullData:H,curveNumber:H.index,pointNumber:Y};a.appendArrayPointValue(we,H,Y),B._module.eventData&&(we=H._module.eventData(we,se,H,{},Y));var Me={points:[we]};if(O.fullSceneLayout.hovermode){var Se=[];a.loneHover({trace:H,x:(.5+.5*K[0]/K[3])*$,y:(.5-.5*K[1]/K[3])*Q,xLabel:q.xLabel,yLabel:q.yLabel,zLabel:q.zLabel,text:he,name:ne.name,color:a.castHoverOption(H,Y,"bgcolor")||ne.color,borderColor:a.castHoverOption(H,Y,"bordercolor"),fontFamily:a.castHoverOption(H,Y,"font.family"),fontSize:a.castHoverOption(H,Y,"font.size"),fontColor:a.castHoverOption(H,Y,"font.color"),nameLength:a.castHoverOption(H,Y,"namelength"),textAlign:a.castHoverOption(H,Y,"align"),hovertemplate:t.castOption(H,Y,"hovertemplate"),hovertemplateLabels:t.extendFlat({},we,q),eventData:[we]},{container:F,gd:D,inOut_bbox:Se}),we.bbox=Se[0]}se.distance<5&&(se.buttons||S)?D.emit("plotly_click",Me):D.emit("plotly_hover",Me),this.oldEventData=Me}else a.loneUnhover(F),this.oldEventData&&D.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;O.drawAnnotations(O)},C.recoverContext=function(){var O=this;O.glplot.dispose();var D=function(){if(O.glplot.gl.isContextLost()){requestAnimationFrame(D);return}if(!O.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}O.plot.apply(O,O.plotArgs)};requestAnimationFrame(D)};var T=["xaxis","yaxis","zaxis"];function f(O,D,B){for(var F=O.fullSceneLayout,P=0;P<3;P++){var j=T[P],U=j.charAt(0),$=F[j],Q=D[U],re=D[U+"calendar"],ne=D["_"+U+"length"];if(!t.isArrayOrTypedArray(Q))B[0][P]=Math.min(B[0][P],0),B[1][P]=Math.max(B[1][P],ne-1);else for(var se,G=0;G<(ne||Q.length);G++)if(t.isArrayOrTypedArray(Q[G]))for(var X=0;XH[1][U])H[0][U]=-1,H[1][U]=1;else{var Ve=H[1][U]-H[0][U];H[0][U]-=Ve/32,H[1][U]+=Ve/32}if(Z=[H[0][U],H[1][U]],Z=g(Z,Q),H[0][U]=Z[0],H[1][U]=Z[1],Q.isReversed()){var Ge=H[0][U];H[0][U]=H[1][U],H[1][U]=Ge}}else Z=Q.range,H[0][U]=Q.r2l(Z[0]),H[1][U]=Q.r2l(Z[1]);H[0][U]===H[1][U]&&(H[0][U]-=1,H[1][U]+=1),Y[U]=H[1][U]-H[0][U],Q.range=[H[0][U],H[1][U]],Q.limitRange(),F.glplot.setBounds(U,{min:Q.range[0]*X[U],max:Q.range[1]*X[U]})}var ke,_e=ne.aspectmode;if(_e==="cube")ke=[1,1,1];else if(_e==="manual"){var ce=ne.aspectratio;ke=[ce.x,ce.y,ce.z]}else if(_e==="auto"||_e==="data"){var ve=[1,1,1];for(U=0;U<3;++U){Q=ne[T[U]],re=Q.type;var le=q[re];ve[U]=Math.pow(le.acc,1/le.count)/X[U]}_e==="data"||Math.max.apply(null,ve)/Math.min.apply(null,ve)<=4?ke=ve:ke=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ne.aspectratio.x=se.aspectratio.x=ke[0],ne.aspectratio.y=se.aspectratio.y=ke[1],ne.aspectratio.z=se.aspectratio.z=ke[2],F.glplot.setAspectratio(ne.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:ne.aspectratio.x,y:ne.aspectratio.y,z:ne.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=ne.aspectmode);var Ae=ne.domain||null,Be=D._size||null;if(Ae&&Be){var Xe=F.container.style;Xe.position="absolute",Xe.left=Be.l+Ae.x[0]*Be.w+"px",Xe.top=Be.t+(1-Ae.y[1])*Be.h+"px",Xe.width=Be.w*(Ae.x[1]-Ae.x[0])+"px",Xe.height=Be.h*(Ae.y[1]-Ae.y[0])+"px"}F.glplot.redraw()}},C.destroy=function(){var O=this;O.glplot&&(O.camera.mouseListener.enabled=!1,O.container.removeEventListener("wheel",O.camera.wheelListener),O.camera=null,O.glplot.dispose(),O.container.parentNode.removeChild(O.container),O.glplot=null)};function A(O){return[[O.eye.x,O.eye.y,O.eye.z],[O.center.x,O.center.y,O.center.z],[O.up.x,O.up.y,O.up.z]]}function x(O){return{up:{x:O.up[0],y:O.up[1],z:O.up[2]},center:{x:O.center[0],y:O.center[1],z:O.center[2]},eye:{x:O.eye[0],y:O.eye[1],z:O.eye[2]},projection:{type:O._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var O=this;return O.camera.view.recalcMatrix(O.camera.view.lastT()),x(O.camera)},C.setViewport=function(O){var D=this,B=O.camera;D.camera.lookAt.apply(this,A(B)),D.glplot.setAspectratio(O.aspectratio);var F=B.projection.type==="orthographic",P=D.camera._ortho;F!==P&&(D.glplot.redraw(),D.glplot.clearRGBA(),D.glplot.dispose(),D.initializeGLPlot())},C.isCameraChanged=function(O){var D=this,B=D.getCamera(),F=t.nestedProperty(O,D.id+".camera"),P=F.get();function j(re,ne,se,G){var X=["up","center","eye"],K=["x","y","z"];return ne[X[se]]&&re[X[se]][K[G]]===ne[X[se]][K[G]]}var U=!1;if(P===void 0)U=!0;else{for(var $=0;$<3;$++)for(var Q=0;Q<3;Q++)if(!j(B,P,$,Q)){U=!0;break}(!P.projection||B.projection&&B.projection.type!==P.projection.type)&&(U=!0)}return U},C.isAspectChanged=function(O){var D=this,B=D.glplot.getAspectratio(),F=t.nestedProperty(O,D.id+".aspectratio"),P=F.get();return P===void 0||P.x!==B.x||P.y!==B.y||P.z!==B.z},C.saveLayout=function(O){var D=this,B=D.fullLayout,F,P,j,U,$,Q,re=D.isCameraChanged(O),ne=D.isAspectChanged(O),se=re||ne;if(se){var G={};if(re&&(F=D.getCamera(),P=t.nestedProperty(O,D.id+".camera"),j=P.get(),G[D.id+".camera"]=j),ne&&(U=D.glplot.getAspectratio(),$=t.nestedProperty(O,D.id+".aspectratio"),Q=$.get(),G[D.id+".aspectratio"]=Q),e.call("_storeDirectGUIEdit",O,B._preGUI,G),re){P.set(F);var X=t.nestedProperty(B,D.id+".camera");X.set(F)}if(ne){$.set(U);var K=t.nestedProperty(B,D.id+".aspectratio");K.set(U),D.glplot.redraw()}}return se},C.updateFx=function(O,D){var B=this,F=B.camera;if(F)if(O==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(O==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var P=B.graphDiv,j=P._fullLayout,U=B.fullSceneLayout.camera,$=U.up.x,Q=U.up.y,re=U.up.z;if(re/Math.sqrt($*$+Q*Q+re*re)<.999){var ne=B.id+".camera.up",se={x:0,y:0,z:1},G={};G[ne]=se;var X=P.layout;e.call("_storeDirectGUIEdit",X,j._preGUI,G),U.up=se,t.nestedProperty(X,ne).set(se)}}else F.keyBindingMode=O;B.fullSceneLayout.hovermode=D};function z(O,D,B){for(var F=0,P=B-1;F0)for(var $=255/U,Q=0;Q<3;++Q)O[j+Q]=Math.min($*O[j+Q],255)}}C.toImage=function(O){var D=this;O||(O="png"),D.staticMode&&D.container.appendChild(i),D.glplot.redraw();var B=D.glplot.gl,F=B.drawingBufferWidth,P=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var j=new Uint8Array(F*P*4);B.readPixels(0,0,F,P,B.RGBA,B.UNSIGNED_BYTE,j),z(j,F,P),I(j,F,P);var U=document.createElement("canvas");U.width=F,U.height=P;var $=U.getContext("2d",{willReadFrequently:!0}),Q=$.createImageData(F,P);Q.data.set(j),$.putImageData(Q,0,0);var re;switch(O){case"jpeg":re=U.toDataURL("image/jpeg");break;case"webp":re=U.toDataURL("image/webp");break;default:re=U.toDataURL("image/png")}return D.staticMode&&D.container.removeChild(i),re},C.setConvert=function(){for(var O=this,D=0;D<3;D++){var B=O.fullSceneLayout[T[D]];r.setConvert(B,O.fullLayout),B.setScale=t.noop}},C.make4thDimension=function(){var O=this,D=O.graphDiv,B=D._fullLayout;O._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(O._mockAxis,B)},V.exports=M}}),ON=ze({"src/plots/gl3d/layout/attributes.js"(J,V){"use strict";V.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),yA=ze({"src/plots/gl3d/layout/axis_attributes.js"(J,V){"use strict";var p=Qn(),b=cf(),E=Ki().extendFlat,k=Al().overrideAll;V.exports=k({visible:b.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:p.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:b.color,categoryorder:b.categoryorder,categoryarray:b.categoryarray,title:{text:b.title.text,font:b.title.font},type:E({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorange:b.autorange,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},rangemode:b.rangemode,minallowed:b.minallowed,maxallowed:b.maxallowed,range:E({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,mirror:b.mirror,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,tickfont:b.tickfont,tickangle:b.tickangle,tickprefix:b.tickprefix,showtickprefix:b.showtickprefix,ticksuffix:b.ticksuffix,showticksuffix:b.showticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickformat:b.tickformat,tickformatstops:b.tickformatstops,hoverformat:b.hoverformat,showline:b.showline,linecolor:b.linecolor,linewidth:b.linewidth,showgrid:b.showgrid,gridcolor:E({},b.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:b.gridwidth,zeroline:b.zeroline,zerolinecolor:b.zerolinecolor,zerolinewidth:b.zerolinewidth},"plot","from-root")}}),_A=ze({"src/plots/gl3d/layout/layout_attributes.js"(J,V){"use strict";var p=yA(),b=Ml().attributes,E=Ki().extendFlat,k=Nr().counterRegex;function l(e,t,n){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}V.exports={_arrayAttrRegexps:[k("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:E(l(0,0,1),{}),center:E(l(0,0,0),{}),eye:E(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:b({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:p,yaxis:p,zaxis:p,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"}}}),NN=ze({"src/plots/gl3d/layout/axis_defaults.js"(J,V){"use strict";var p=Qn(),b=Nr(),E=hs(),k=yA(),l=E5(),e=y1(),t=["xaxis","yaxis","zaxis"],n=100*136/187;V.exports=function(a,o,s){var c,m;function h(i,w){return b.coerce(c,m,k,i,w)}for(var v=0;v1;function h(v){if(!m){var g=p.validate(o[v],e[v]);if(g)return o[v]}}k(o,s,c,{type:n,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:h,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(a,o,s,c){for(var m=s("bgcolor"),h=b.combine(m,c.paper_bgcolor),v=["up","center","eye"],g=0;g.999)&&(C="turntable")}else C="turntable";s("dragmode",C),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),xv=ze({"src/plots/gl3d/index.js"(J){"use strict";var V=Al().overrideAll,p=rv(),b=BN(),E=zf().getSubplotData,k=Nr(),l=nd(),e="gl3d",t="scene";J.name=e,J.attr=t,J.idRoot=t,J.idRegex=J.attrRegex=k.counterRegex("scene"),J.attributes=ON(),J.layoutAttributes=_A(),J.baseLayoutAttrOverrides=V({hoverlabel:p.hoverlabel},"plot","nested"),J.supplyLayoutDefaults=jN(),J.plot=function(r){for(var a=r._fullLayout,o=r._fullData,s=a._subplots[e],c=0;c0){z=c[I];break}return z}function g(A,x){if(!(A<1||x<1)){for(var z=h(A),I=h(x),O=1,D=0;DM;)I--,I/=v(I),I++,I1?O:1};function C(A,x,z){var I=z[8]+z[2]*x[0]+z[5]*x[1];return A[0]=(z[6]+z[0]*x[0]+z[3]*x[1])/I,A[1]=(z[7]+z[1]*x[0]+z[4]*x[1])/I,A}function _(A,x,z){return T(A,x,C,z),A}function T(A,x,z,I){for(var O=[0,0],D=A.shape[0],B=A.shape[1],F=0;F0&&this.contourStart[I]!==null&&this.contourEnd[I]!==null&&this.contourEnd[I]>this.contourStart[I]))for(x[I]=!0,O=this.contourStart[I];OQ&&(this.minValues[j]=Q),this.maxValues[j]c&&(n.isomin=null,n.isomax=null);var m=o("x"),h=o("y"),v=o("z"),g=o("value");if(!m||!m.length||!h||!h.length||!v||!v.length||!g||!g.length){n.visible=!1;return}var i=b.getComponentMethod("calendars","handleTraceDefaults");i(t,n,["x","y","z"],a),o("valuehoverformat"),["x","y","z"].forEach(function(C){o(C+"hoverformat");var _="caps."+C,T=o(_+".show");T&&o(_+".fill");var f="slices."+C,u=o(f+".show");u&&(o(f+".fill"),o(f+".locations"))});var w=o("spaceframe.show");w&&o("spaceframe.fill");var S=o("surface.show");S&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("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(C){o(C)}),k(t,n,a,o,{prefix:"",cLetter:"c"}),n._length=null}V.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),A2=ze({"src/traces/streamtube/calc.js"(J,V){"use strict";var p=Nr(),b=Qf();function E(t,n){n._len=Math.min(n.u.length,n.v.length,n.w.length,n.x.length,n.y.length,n.z.length),n._u=e(n.u,n._len),n._v=e(n.v,n._len),n._w=e(n.w,n._len),n._x=e(n.x,n._len),n._y=e(n.y,n._len),n._z=e(n.z,n._len);var r=k(n);n._gridFill=r.fill,n._Xs=r.Xs,n._Ys=r.Ys,n._Zs=r.Zs,n._len=r.len;var a=0,o,s,c;n.starts&&(o=e(n.starts.x||[]),s=e(n.starts.y||[]),c=e(n.starts.z||[]),a=Math.min(o.length,s.length,c.length)),n._startsX=o||[],n._startsY=s||[],n._startsZ=c||[];var m=0,h=1/0,v;for(v=0;v1&&(u=n[o-1],x=r[o-1],I=a[o-1]),s=0;su?"-":"+")+"x"),M=M.replace("y",(A>x?"-":"+")+"y"),M=M.replace("z",(z>I?"-":"+")+"z");var F=function(){o=0,O=[],D=[],B=[]};(!o||o0;h--){var v=Math.min(m[h],m[h-1]),g=Math.max(m[h],m[h-1]);if(g>v&&v-1}function ee(Ot,vt){return Ot===null?vt:Ot}function ae(Ot,vt,ht){re();var De=[vt],Ne=[ht];if(H>=1)De=[vt],Ne=[ht];else if(H>0){var We=q(vt,ht);De=We.xyzv,Ne=We.abc}for(var Ke=0;Ke-1?ht[et]:Q(Mt,pt,Pt);qt>-1?Je[et]=qt:Je[et]=se(Mt,pt,Pt,ee(Ot,Ct))}G(Je[0],Je[1],Je[2])}}function he(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(2,3,0)}function xe(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(3,0,1),De(2,3,0),De(1,2,3)}function we(Ot,vt,ht,De){var Ne=Ot[3];NeDe&&(Ne=De);for(var We=(Ot[3]-Ne)/(Ot[3]-vt[3]+1e-9),Ke=[],Je=0;Je<4;Je++)Ke[Je]=(1-We)*Ot[Je]+We*vt[Je];return Ke}function Me(Ot,vt,ht){return Ot>=vt&&Ot<=ht}function Se(Ot){var vt=.001*(F-B);return Ot>=B-vt&&Ot<=F+vt}function Ie(Ot){for(var vt=[],ht=0;ht<4;ht++){var De=Ot[ht];vt.push([c._x[De],c._y[De],c._z[De],c._value[De]])}return vt}var Ve=3;function Ge(Ot,vt,ht,De,Ne,We){We||(We=1),ht=[-1,-1,-1];var Ke=!1,Je=[Me(vt[0][3],De,Ne),Me(vt[1][3],De,Ne),Me(vt[2][3],De,Ne)];if(!Je[0]&&!Je[1]&&!Je[2])return!1;var et=function(pt,Pt,Ct){return Se(Pt[0][3])&&Se(Pt[1][3])&&Se(Pt[2][3])?(ae(pt,Pt,Ct),!0):WeJe?[O,We]:[We,D];Tt(vt,et[0],et[1])}}var Mt=[[Math.min(B,D),Math.max(B,D)],[Math.min(O,F),Math.max(O,F)]];["x","y","z"].forEach(function(pt){for(var Pt=[],Ct=0;Ct0&&(Yt.push(ur.id),pt==="x"?Rt.push([ur.distRatio,0,0]):pt==="y"?Rt.push([0,ur.distRatio,0]):Rt.push([0,0,ur.distRatio]))}else pt==="x"?Kr=_r(1,u-1):pt==="y"?Kr=_r(1,A-1):Kr=_r(1,x-1);Yt.length>0&&(pt==="x"?Pt[qt]=At(Ot,Yt,Vt,Ht,Rt,Pt[qt]):pt==="y"?Pt[qt]=$t(Ot,Yt,Vt,Ht,Rt,Pt[qt]):Pt[qt]=rr(Ot,Yt,Vt,Ht,Rt,Pt[qt]),qt++),Kr.length>0&&(pt==="x"?Pt[qt]=Be(Ot,Kr,Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,Kr,Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,Kr,Vt,Ht,Pt[qt]),qt++)}var cr=c.caps[pt];cr.show&&cr.fill&&(Y(cr.fill),pt==="x"?Pt[qt]=Be(Ot,[0,u-1],Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,[0,A-1],Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,[0,x-1],Vt,Ht,Pt[qt]),qt++)}}),S===0&&ne(),c._meshX=P,c._meshY=j,c._meshZ=U,c._meshIntensity=$,c._Xs=_,c._Ys=T,c._Zs=f}return or(),c}function s(c,m){var h=c.glplot.gl,v=p({gl:h}),g=new n(c,v,m.uid);return v._trace=g,g.update(m),c.glplot.add(v),g}V.exports={findNearestOnAxis:t,generateIsoMeshes:o,createIsosurfaceTrace:s}}}),YN=ze({"src/traces/isosurface/index.js"(J,V){"use strict";V.exports={attributes:T2(),supplyDefaults:bA().supplyDefaults,calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:M2().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),XN=ze({"lib/isosurface.js"(J,V){"use strict";V.exports=YN()}}),TA=ze({"src/traces/volume/attributes.js"(J,V){"use strict";var p=qs(),b=T2(),E=K1(),k=ws(),l=Ki().extendFlat,e=Al().overrideAll,t=V.exports=e(l({x:b.x,y:b.y,z:b.z,value:b.value,isomin:b.isomin,isomax:b.isomax,surface:b.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:b.slices,caps:b.caps,text:b.text,hovertext:b.hovertext,xhoverformat:b.xhoverformat,yhoverformat:b.yhoverformat,zhoverformat:b.zhoverformat,valuehoverformat:b.valuehoverformat,hovertemplate:b.hovertemplate,hovertemplatefallback:b.hovertemplatefallback},p("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:b.colorbar,opacity:b.opacity,opacityscale:E.opacityscale,lightposition:b.lightposition,lighting:b.lighting,flatshading:b.flatshading,contour:b.contour,hoverinfo:l({},k.hoverinfo),showlegend:l({},k.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),ZN=ze({"src/traces/volume/defaults.js"(J,V){"use strict";var p=Nr(),b=TA(),E=bA().supplyIsoDefaults,k=xA().opacityscaleDefaults;V.exports=function(e,t,n,r){function a(o,s){return p.coerce(e,t,b,o,s)}E(e,t,n,r,a),k(e,t,r,a)}}}),$N=ze({"src/traces/volume/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=fp().parseColorScale,E=Nr().isArrayOrTypedArray,k=cp(),l=fl().extractOpts,e=mg(),t=M2().findNearestOnAxis,n=M2().generateIsoMeshes;function r(s,c,m){this.scene=s,this.uid=m,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var a=r.prototype;a.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,m=this.data._meshX[c],h=this.data._meshY[c],v=this.data._meshZ[c],g=this.data._Ys.length,i=this.data._Zs.length,w=t(m,this.data._Xs).id,S=t(h,this.data._Ys).id,M=t(v,this.data._Zs).id,C=s.index=M+i*S+i*g*w;s.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var _=this.data.hovertext||this.data.text;return E(_)&&_[C]!==void 0?s.textLabel=_[C]:_&&(s.textLabel=_),!0}},a.update=function(s){var c=this.scene,m=c.fullSceneLayout;this.data=n(s);function h(S,M,C,_){return M.map(function(T){return S.d2l(T,0,_)*C})}var v=e(h(m.xaxis,s._meshX,c.dataScale[0],s.xcalendar),h(m.yaxis,s._meshY,c.dataScale[1],s.ycalendar),h(m.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),g=e(s._meshI,s._meshJ,s._meshK),i={positions:v,cells:g,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:k(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},w=l(s);i.vertexIntensity=s._meshIntensity,i.vertexIntensityBounds=[w.min,w.max],i.colormap=b(s),this.mesh.update(i)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(s,c){var m=s.glplot.gl,h=p({gl:m}),v=new r(s,h,c.uid);return h._trace=v,v.update(c),s.glplot.add(h),v}V.exports=o}}),KN=ze({"src/traces/volume/index.js"(J,V){"use strict";V.exports={attributes:TA(),supplyDefaults:ZN(),calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:$N(),moduleType:"trace",name:"volume",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),JN=ze({"lib/volume.js"(J,V){"use strict";V.exports=KN()}}),QN=ze({"src/traces/mesh3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=qc(),k=vg();V.exports=function(e,t,n,r){function a(h,v){return b.coerce(e,t,k,h,v)}function o(h){var v=h.map(function(g){var i=a(g);return i&&b.isArrayOrTypedArray(i)?i:null});return v.every(function(g){return g&&g.length===v[0].length})&&v}var s=o(["x","y","z"]);if(!s){t.visible=!1;return}if(o(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=p.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["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(h){a(h)});var m=a("contour.show");m&&(a("contour.color"),a("contour.width")),"intensity"in e?(a("intensity"),a("intensitymode"),E(e,t,r,a,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?a("facecolor"):"vertexcolor"in e?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),ej=ze({"src/traces/mesh3d/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){k.intensity&&p(E,k,{vals:k.intensity,containerStr:"",cLetter:"c"})}}}),tj=ze({"src/traces/mesh3d/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=df().delaunay_triangulate,E=df().alpha_shape,k=df().convex_hull,l=fp().parseColorScale,e=Nr().isArrayOrTypedArray,t=cp(),n=fl().extractOpts,r=mg();function a(i,w,S){this.scene=i,this.uid=S,this.mesh=w,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=a.prototype;o.handlePick=function(i){if(i.object===this.mesh){var w=i.index=i.data.index;i.data._cellCenter?i.traceCoordinate=i.data.dataCoordinate:i.traceCoordinate=[this.data.x[w],this.data.y[w],this.data.z[w]];var S=this.data.hovertext||this.data.text;return e(S)&&S[w]!==void 0?i.textLabel=S[w]:S&&(i.textLabel=S),!0}};function s(i){for(var w=[],S=i.length,M=0;M=w-.5)return!1;return!0}o.update=function(i){var w=this.scene,S=w.fullSceneLayout;this.data=i;var M=i.x.length,C=r(c(S.xaxis,i.x,w.dataScale[0],i.xcalendar),c(S.yaxis,i.y,w.dataScale[1],i.ycalendar),c(S.zaxis,i.z,w.dataScale[2],i.zcalendar)),_;if(i.i&&i.j&&i.k){if(i.i.length!==i.j.length||i.j.length!==i.k.length||!v(i.i,M)||!v(i.j,M)||!v(i.k,M))return;_=r(m(i.i),m(i.j),m(i.k))}else i.alphahull===0?_=k(C):i.alphahull>0?_=E(i.alphahull,C):_=h(i.delaunayaxis,C);var T={positions:C,cells:_,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,contourEnable:i.contour.show,contourColor:t(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading};if(i.intensity){var f=n(i);this.color="#fff";var u=i.intensitymode;T[u+"Intensity"]=i.intensity,T[u+"IntensityBounds"]=[f.min,f.max],T.colormap=l(i)}else i.vertexcolor?(this.color=i.vertexcolor[0],T.vertexColors=s(i.vertexcolor)):i.facecolor?(this.color=i.facecolor[0],T.cellColors=s(i.facecolor)):(this.color=i.color,T.meshColor=t(i.color));this.mesh.update(T)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(i,w){var S=i.glplot.gl,M=p({gl:S}),C=new a(i,M,w.uid);return M._trace=C,C.update(w),i.glplot.add(M),C}V.exports=g}}),rj=ze({"src/traces/mesh3d/index.js"(J,V){"use strict";V.exports={attributes:vg(),supplyDefaults:QN(),calc:ej(),colorbar:{min:"cmin",max:"cmax"},plot:tj(),moduleType:"trace",name:"mesh3d",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),aj=ze({"lib/mesh3d.js"(J,V){"use strict";V.exports=rj()}}),AA=ze({"src/traces/cone/attributes.js"(J,V){"use strict";var p=qs(),b=Il().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=vg(),e=ws(),t=Ki().extendFlat,n={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:E({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:k({editType:"calc"}),uhoverformat:b("u",1),vhoverformat:b("v",1),whoverformat:b("w",1),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(n,p("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(a){n[a]=l[a]}),n.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=n}}),nj=ze({"src/traces/cone/defaults.js"(J,V){"use strict";var p=Nr(),b=qc(),E=AA();V.exports=function(l,e,t,n){function r(g,i){return p.coerce(l,e,E,g,i)}var a=r("u"),o=r("v"),s=r("w"),c=r("x"),m=r("y"),h=r("z");if(!a||!a.length||!o||!o.length||!s||!s.length||!c||!c.length||!m||!m.length||!h||!h.length){e.visible=!1;return}var v=r("sizemode");r("sizeref",v==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),b(l,e,n,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),ij=ze({"src/traces/cone/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){for(var l=k.u,e=k.v,t=k.w,n=Math.min(k.x.length,k.y.length,k.z.length,l.length,e.length,t.length),r=-1/0,a=1/0,o=0;o2?v=m.slice(1,h-1):h===2?v=[(m[0]+m[1])/2]:v=m,v}function o(m){var h=m.length;return h===1?[.5,.5]:[m[1]-m[0],m[h-1]-m[h-2]]}function s(m,h){var v=m.fullSceneLayout,g=m.dataScale,i=h._len,w={};function S(se,G){var X=v[G],K=g[t[G]];return E.simpleMap(se,function(H){return X.d2l(H)*K})}if(w.vectors=e(S(h._u,"xaxis"),S(h._v,"yaxis"),S(h._w,"zaxis"),i),!i)return{positions:[],cells:[]};var M=S(h._Xs,"xaxis"),C=S(h._Ys,"yaxis"),_=S(h._Zs,"zaxis");w.meshgrid=[M,C,_],w.gridFill=h._gridFill;var T=h._slen;if(T)w.startingPositions=e(S(h._startsX,"xaxis"),S(h._startsY,"yaxis"),S(h._startsZ,"zaxis"));else{for(var f=C[0],u=a(M),A=a(_),x=new Array(u.length*A.length),z=0,I=0;If&&(f=z[0]),z[1]u&&(u=z[1])}function x(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(x);break;case"Point":A(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(A);break}}S.arcs.forEach(function(z){for(var I=-1,O=z.length,D;++If&&(f=D[0]),D[1]u&&(u=D[1])});for(C in S.objects)x(S.objects[C]);return[_,T,f,u]}function l(S,M){for(var C,_=S.length,T=_-M;T<--_;)C=S[T],S[T++]=S[_],S[_]=C}function e(S,M){return typeof M=="string"&&(M=S.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return t(S,C)})}:t(S,M)}function t(S,M){var C=M.id,_=M.bbox,T=M.properties==null?{}:M.properties,f=n(S,M);return C==null&&_==null?{type:"Feature",properties:T,geometry:f}:_==null?{type:"Feature",id:C,properties:T,geometry:f}:{type:"Feature",id:C,bbox:_,properties:T,geometry:f}}function n(S,M){var C=E(S.transform),_=S.arcs;function T(I,O){O.length&&O.pop();for(var D=_[I<0?~I:I],B=0,F=D.length;B1)_=s(S,M,C);else for(T=0,_=new Array(f=S.arcs.length);T1)for(var O=1,D=A(z[0]),B,F;OD&&(F=z[0],z[0]=z[O],z[O]=F,D=B);return z}).filter(function(x){return x.length>0})}}function v(S,M){for(var C=0,_=S.length;C<_;){var T=C+_>>>1;S[T]=2))throw new Error("n must be \u22652");x=S.bbox||k(S);var C=x[0],_=x[1],T=x[2],f=x[3],u;M={scale:[T-C?(T-C)/(u-1):1,f-_?(f-_)/(u-1):1],translate:[C,_]}}else x=S.bbox;var A=i(M),x,z,I=S.objects,O={};function D(P){return A(P)}function B(P){var j;switch(P.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:P.geometries.map(B)};break;case"Point":j={type:"Point",coordinates:D(P.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:P.coordinates.map(D)};break;default:return P}return P.id!=null&&(j.id=P.id),P.bbox!=null&&(j.bbox=P.bbox),P.properties!=null&&(j.properties=P.properties),j}function F(P){var j=0,U=1,$=P.length,Q,re=new Array($);for(re[0]=A(P[0],0);++j<$;)((Q=A(P[j],j))[0]||Q[1])&&(re[U++]=Q);return U===1&&(re[U++]=[0,0]),re.length=U,re}for(z in I)O[z]=B(I[z]);return{type:"Topology",bbox:x,transform:M,objects:O,arcs:S.arcs.map(F)}}p.bbox=k,p.feature=e,p.merge=m,p.mergeArcs=h,p.mesh=a,p.meshArcs=o,p.neighbors=g,p.quantize=w,p.transform=E,p.untransform=i,Object.defineProperty(p,"__esModule",{value:!0})})}}),S2=ze({"src/lib/topojson_utils.js"(J,V){"use strict";var p=V.exports={},b=J1().locationmodeToLayer,E=EA().feature;p.getTopojsonName=function(k){return[k.scope.replace(/ /g,"-"),"_",k.resolution.toString(),"m"].join("")},p.getTopojsonPath=function(k,l){return k+=k.endsWith("/")?"":"/",`${k}${l}.json`},p.getTopojsonFeatures=function(k,l){var e=b[k.locationmode],t=l.objects[e];return E(l,t).features}}}),Q1=ze({"src/lib/geojson_utils.js"(J){"use strict";var V=No().BADNUM;J.calcTraceToLineCoords=function(p){for(var b=p[0].trace,E=b.connectgaps,k=[],l=[],e=0;e0&&(k.push(l),l=[])}return l.length>0&&k.push(l),k},J.makeLine=function(p){return p.length===1?{type:"LineString",coordinates:p[0]}:{type:"MultiLineString",coordinates:p}},J.makePolygon=function(p){if(p.length===1)return{type:"Polygon",coordinates:p};for(var b=new Array(p.length),E=0;E{for(var S in w)p(i,S,{get:w[S],enumerable:!0})},e=(i,w,S,M)=>{if(w&&typeof w=="object"||typeof w=="function")for(let C of E(w))!k.call(i,C)&&C!==S&&p(i,C,{get:()=>w[C],enumerable:!(M=b(w,C))||M.enumerable});return i},t=i=>e(p({},"__esModule",{value:!0}),i),n={};l(n,{COUNTRIES:()=>r,byAlpha2:()=>v,byAlpha3:()=>h,byM49:()=>g,createLookup:()=>o,lookup:()=>c,lookupAlpha3:()=>m,sanitize:()=>a}),V.exports=t(n);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function a(i){return i.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function o(i){let w=new Map,S=new Map,M=new Map;for(let f of i)w.set(f.iso3,f),f.iso2&&S.set(f.iso2,f),f.m49&&M.set(f.m49,f);let C=new Map;for(let f of i)for(let u of[f.name,...f.aliases]){let A=a(u),x=C.get(A);if(x!==void 0&&x!==f.iso3)throw new Error(`Duplicate name/alias "${A}": ${x} vs ${f.iso3}`);C.set(A,f.iso3)}function _(f){if(f==null)return;let u=String(f).trim();if(!u)return;if(/^\d+$/.test(u)){let x=M.get(String(parseInt(u,10)).padStart(3,"0"));if(x)return x}if(/^[A-Za-z]{2}$/.test(u)){let x=S.get(u.toUpperCase());if(x)return x}if(/^[A-Za-z]{3}$/.test(u)){let x=w.get(u.toUpperCase());if(x)return x}let A=C.get(a(u));return A===void 0?void 0:w.get(A)}function T(f){var u;return(u=_(f))==null?void 0:u.iso3}return{lookup:_,lookupAlpha3:T,byAlpha3:w,byAlpha2:S,byM49:M}}var s=o(r),c=s.lookup,m=s.lookupAlpha3,h=s.byAlpha3,v=s.byAlpha2,g=s.byM49}}),E2=ze({"node_modules/@turf/helpers/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=63710088e-1,p={centimeters:V*100,centimetres:V*100,degrees:360/(2*Math.PI),feet:V*3.28084,inches:V*39.37,kilometers:V/1e3,kilometres:V/1e3,meters:V,metres:V,miles:V/1609.344,millimeters:V*1e3,millimetres:V*1e3,nauticalmiles:V/1852,radians:1,yards:V*1.0936},b={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function E(I,O,D={}){let B={type:"Feature"};return(D.id===0||D.id)&&(B.id=D.id),D.bbox&&(B.bbox=D.bbox),B.properties=O||{},B.geometry=I,B}function k(I,O,D={}){switch(I){case"Point":return l(O).geometry;case"LineString":return r(O).geometry;case"Polygon":return t(O).geometry;case"MultiPoint":return c(O).geometry;case"MultiLineString":return s(O).geometry;case"MultiPolygon":return m(O).geometry;default:throw new Error(I+" is invalid")}}function l(I,O,D={}){if(!I)throw new Error("coordinates is required");if(!Array.isArray(I))throw new Error("coordinates must be an Array");if(I.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(I[0])||!u(I[1]))throw new Error("coordinates must contain numbers");return E({type:"Point",coordinates:I},O,D)}function e(I,O,D={}){return o(I.map(B=>l(B,O)),D)}function t(I,O,D={}){for(let F of I){if(F.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(F[F.length-1].length!==F[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pt(B,O)),D)}function r(I,O,D={}){if(I.length<2)throw new Error("coordinates must be an array of two or more positions");return E({type:"LineString",coordinates:I},O,D)}function a(I,O,D={}){return o(I.map(B=>r(B,O)),D)}function o(I,O={}){let D={type:"FeatureCollection"};return O.id&&(D.id=O.id),O.bbox&&(D.bbox=O.bbox),D.features=I,D}function s(I,O,D={}){return E({type:"MultiLineString",coordinates:I},O,D)}function c(I,O,D={}){return E({type:"MultiPoint",coordinates:I},O,D)}function m(I,O,D={}){return E({type:"MultiPolygon",coordinates:I},O,D)}function h(I,O,D={}){return E({type:"GeometryCollection",geometries:I},O,D)}function v(I,O=0){if(O&&!(O>=0))throw new Error("precision must be a positive number");let D=Math.pow(10,O||0);return Math.round(I*D)/D}function g(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I*D}function i(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I/D}function w(I,O){return C(i(I,O))}function S(I){let O=I%360;return O<0&&(O+=360),O}function M(I){return I=I%360,I>180?I-360:I<-180?I+360:I}function C(I){return I%(2*Math.PI)*180/Math.PI}function _(I){return I%360*Math.PI/180}function T(I,O="kilometers",D="kilometers"){if(!(I>=0))throw new Error("length must be a positive number");return g(i(I,O),D)}function f(I,O="meters",D="kilometers"){if(!(I>=0))throw new Error("area must be a positive number");let B=b[O];if(!B)throw new Error("invalid original units");let F=b[D];if(!F)throw new Error("invalid final units");return I/B*F}function u(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)}function A(I){return I!==null&&typeof I=="object"&&!Array.isArray(I)}function x(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(O=>{if(!u(O))throw new Error("bbox must only contain numbers")})}function z(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}J.areaFactors=b,J.azimuthToBearing=M,J.bearingToAzimuth=S,J.convertArea=f,J.convertLength=T,J.degreesToRadians=_,J.earthRadius=V,J.factors=p,J.feature=E,J.featureCollection=o,J.geometry=k,J.geometryCollection=h,J.isNumber=u,J.isObject=A,J.lengthToDegrees=w,J.lengthToRadians=i,J.lineString=r,J.lineStrings=a,J.multiLineString=s,J.multiPoint=c,J.multiPolygon=m,J.point=l,J.points=e,J.polygon=t,J.polygons=n,J.radiansToDegrees=C,J.radiansToLength=g,J.round=v,J.validateBBox=x,J.validateId=z}}),k2=ze({"node_modules/@turf/meta/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2();function p(i,w,S){if(i!==null)for(var M,C,_,T,f,u,A,x=0,z=0,I,O=i.type,D=O==="FeatureCollection",B=O==="Feature",F=D?i.features.length:1,P=0;Pu||D>A||B>x){f=z,u=M,A=D,x=B,_=0;return}var F=V.lineString.call(void 0,[f,z],S.properties);if(w(F,M,C,B,_)===!1)return!1;_++,f=z})===!1)return!1}}})}function c(i,w,S){var M=S,C=!1;return s(i,function(_,T,f,u,A){C===!1&&S===void 0?M=_:M=w(M,_,T,f,u,A),C=!0}),M}function m(i,w){if(!i)throw new Error("geojson is required");a(i,function(S,M,C){if(S.geometry!==null){var _=S.geometry.type,T=S.geometry.coordinates;switch(_){case"LineString":if(w(S,M,C,0,0)===!1)return!1;break;case"Polygon":for(var f=0;fa+E(o),0)}function E(r){let a=0,o;switch(r.type){case"Polygon":return k(r.coordinates);case"MultiPolygon":for(o=0;o0){a+=Math.abs(t(r[0]));for(let o=1;o=a?(s+2)%a:s+2],v=c[0]*e,g=m[1]*e,i=h[0]*e;o+=(i-v)*Math.sin(g),s++}return o*l}var n=b;J.area=b,J.default=n}}),gj=ze({"node_modules/@turf/centroid/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2(),p=k2();function b(k,l={}){let e=0,t=0,n=0;return p.coordEach.call(void 0,k,function(r){e+=r[0],t+=r[1],n++},!0),V.point.call(void 0,[e/n,t/n],l.properties)}var E=b;J.centroid=b,J.default=E}}),yj=ze({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:Ft<0?-1:0},f=Math.sqrt,u=Math.tan;function A(Ft){return Ft>1?0:Ft<-1?r:Math.acos(Ft)}function x(Ft){return Ft>1?a:Ft<-1?-a:Math.asin(Ft)}function z(Ft){return(Ft=_(Ft/2))*Ft}function I(){}function O(Ft,tr){Ft&&B.hasOwnProperty(Ft.type)&&B[Ft.type](Ft,tr)}var D={Feature:function(Ft,tr){O(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr=0?1:-1,ea=wr*Fr,ba=i(tr),Ia=_(tr),Na=G*Ia,Za=se*ba+Na*i(ea),mn=Na*wr*_(ea);U.add(g(mn,Za)),ne=Ft,se=ba,G=Ia}function Z(Ft){return $.reset(),j(Ft,X),$*2}function ee(Ft){return[g(Ft[1],Ft[0]),x(Ft[2])]}function ae(Ft){var tr=Ft[0],Fr=Ft[1],wr=i(Fr);return[wr*i(tr),wr*_(tr),_(Fr)]}function he(Ft,tr){return Ft[0]*tr[0]+Ft[1]*tr[1]+Ft[2]*tr[2]}function xe(Ft,tr){return[Ft[1]*tr[2]-Ft[2]*tr[1],Ft[2]*tr[0]-Ft[0]*tr[2],Ft[0]*tr[1]-Ft[1]*tr[0]]}function we(Ft,tr){Ft[0]+=tr[0],Ft[1]+=tr[1],Ft[2]+=tr[2]}function Me(Ft,tr){return[Ft[0]*tr,Ft[1]*tr,Ft[2]*tr]}function Se(Ft){var tr=f(Ft[0]*Ft[0]+Ft[1]*Ft[1]+Ft[2]*Ft[2]);Ft[0]/=tr,Ft[1]/=tr,Ft[2]/=tr}var Ie,Ve,Ge,ke,_e,ce,ve,le,Ae=E(),Be,Xe,Ye={point:yt,lineStart:Tt,lineEnd:At,polygonStart:function(){Ye.point=$t,Ye.lineStart=rr,Ye.lineEnd=_r,Ae.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Ye.point=yt,Ye.lineStart=Tt,Ye.lineEnd=At,U<0?(Ie=-(Ge=180),Ve=-(ke=90)):Ae>t?ke=90:Ae<-t&&(Ve=-90),Xe[0]=Ie,Xe[1]=Ge},sphere:function(){Ie=-(Ge=180),Ve=-(ke=90)}};function yt(Ft,tr){Be.push(Xe=[Ie=Ft,Ge=Ft]),trke&&(ke=tr)}function gt(Ft,tr){var Fr=ae([Ft*m,tr*m]);if(le){var wr=xe(le,Fr),ea=[wr[1],-wr[0],0],ba=xe(ea,wr);Se(ba),ba=ee(ba);var Ia=Ft-_e,Na=Ia>0?1:-1,Za=ba[0]*c*Na,mn,Da=h(Ia)>180;Da^(Na*_eke&&(ke=mn)):(Za=(Za+360)%360-180,Da^(Na*_eke&&(ke=tr))),Da?Ft<_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft):Ge>=Ie?(FtGe&&(Ge=Ft)):Ft>_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft)}else Be.push(Xe=[Ie=Ft,Ge=Ft]);trke&&(ke=tr),le=Fr,_e=Ft}function Tt(){Ye.point=gt}function At(){Xe[0]=Ie,Xe[1]=Ge,Ye.point=yt,le=null}function $t(Ft,tr){if(le){var Fr=Ft-_e;Ae.add(h(Fr)>180?Fr+(Fr>0?360:-360):Fr)}else ce=Ft,ve=tr;X.point(Ft,tr),gt(Ft,tr)}function rr(){X.lineStart()}function _r(){$t(ce,ve),X.lineEnd(),h(Ae)>t&&(Ie=-(Ge=180)),Xe[0]=Ie,Xe[1]=Ge,le=null}function Xt(Ft,tr){return(tr-=Ft)<0?tr+360:tr}function or(Ft,tr){return Ft[0]-tr[0]}function Ot(Ft,tr){return Ft[0]<=Ft[1]?Ft[0]<=tr&&tr<=Ft[1]:trXt(wr[0],wr[1])&&(wr[1]=ea[1]),Xt(ea[0],wr[1])>Xt(wr[0],wr[1])&&(wr[0]=ea[0])):ba.push(wr=ea);for(Ia=-1/0,Fr=ba.length-1,tr=0,wr=ba[Fr];tr<=Fr;wr=ea,++tr)ea=ba[tr],(Na=Xt(wr[1],ea[0]))>Ia&&(Ia=Na,Ie=ea[0],Ge=wr[1])}return Be=Xe=null,Ie===1/0||Ve===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ie,Ve],[Ge,ke]]}var ht,De,Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt,Ht,Sr,Kr,Yt={sphere:I,point:Rt,lineStart:ur,lineEnd:Qr,polygonStart:function(){Yt.lineStart=Zr,Yt.lineEnd=ha},polygonEnd:function(){Yt.lineStart=ur,Yt.lineEnd=Qr}};function Rt(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);nr(Fr*i(Ft),Fr*_(Ft),_(tr))}function nr(Ft,tr,Fr){++ht,Ne+=(Ft-Ne)/ht,We+=(tr-We)/ht,Ke+=(Fr-Ke)/ht}function ur(){Yt.point=cr}function cr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),Yt.point=Rr,nr(Ht,Sr,Kr)}function Rr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=g(f((Ia=Sr*ba-Kr*ea)*Ia+(Ia=Kr*wr-Ht*ba)*Ia+(Ia=Ht*ea-Sr*wr)*Ia),Ht*wr+Sr*ea+Kr*ba);De+=Ia,Je+=Ia*(Ht+(Ht=wr)),et+=Ia*(Sr+(Sr=ea)),Mt+=Ia*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function Qr(){Yt.point=Rt}function Zr(){Yt.point=Pa}function ha(){La(qt,Vt),Yt.point=Rt}function Pa(Ft,tr){qt=Ft,Vt=tr,Ft*=m,tr*=m,Yt.point=La;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),nr(Ht,Sr,Kr)}function La(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=Sr*ba-Kr*ea,Na=Kr*wr-Ht*ba,Za=Ht*ea-Sr*wr,mn=f(Ia*Ia+Na*Na+Za*Za),Da=x(mn),Ha=mn&&-Da/mn;pt+=Ha*Ia,Pt+=Ha*Na,Ct+=Ha*Za,De+=Da,Je+=Da*(Ht+(Ht=wr)),et+=Da*(Sr+(Sr=ea)),Mt+=Da*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function un(Ft){ht=De=Ne=We=Ke=Je=et=Mt=pt=Pt=Ct=0,j(Ft,Yt);var tr=pt,Fr=Pt,wr=Ct,ea=tr*tr+Fr*Fr+wr*wr;return ear?Ft+Math.round(-Ft/s)*s:Ft,tr]}Nn.invert=Nn;function yn(Ft,tr,Fr){return(Ft%=s)?tr||Fr?ja(li(Ft),Yn(tr,Fr)):li(Ft):tr||Fr?Yn(tr,Fr):Nn}function Un(Ft){return function(tr,Fr){return tr+=Ft,[tr>r?tr-s:tr<-r?tr+s:tr,Fr]}}function li(Ft){var tr=Un(Ft);return tr.invert=Un(-Ft),tr}function Yn(Ft,tr){var Fr=i(Ft),wr=_(Ft),ea=i(tr),ba=_(tr);function Ia(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*Fr+Da*wr;return[g(Ha*ea-vn*ba,Da*Fr-$a*wr),x(vn*ea+Ha*ba)]}return Ia.invert=function(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*ea-Ha*ba;return[g(Ha*ea+$a*ba,Da*Fr+vn*wr),x(vn*Fr-Da*wr)]},Ia}function on(Ft){Ft=yn(Ft[0]*m,Ft[1]*m,Ft.length>2?Ft[2]*m:0);function tr(Fr){return Fr=Ft(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr}return tr.invert=function(Fr){return Fr=Ft.invert(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr},tr}function en(Ft,tr,Fr,wr,ea,ba){if(Fr){var Ia=i(tr),Na=_(tr),Za=wr*Fr;ea==null?(ea=tr+wr*s,ba=tr-Za/2):(ea=vi(Ia,ea),ba=vi(Ia,ba),(wr>0?eaba)&&(ea+=wr*s));for(var mn,Da=ea;wr>0?Da>ba:Da1&&Ft.push(Ft.pop().concat(Ft.shift()))},result:function(){var Fr=Ft;return Ft=[],tr=null,Fr}}}function Oa(Ft,tr){return h(Ft[0]-tr[0])=0;--Na)ea.point((Ha=Da[Na])[0],Ha[1]);else wr($a.x,$a.p.x,-1,ea);$a=$a.p}$a=$a.o,Da=$a.z,vn=!vn}while(!$a.v);ea.lineEnd()}}}function fr(Ft){if(tr=Ft.length){for(var tr,Fr=0,wr=Ft[0],ea;++Fr=0?1:-1,Fo=Do*Co,Yo=Fo>r,bo=yi*Ni;if(lr.add(g(bo*Do*_(Fo),_i*Zi+bo*i(Fo))),Ia+=Yo?Co+Do*s:Co,Yo^vn>=Fr^kn>=Fr){var Gs=xe(ae($a),ae(ri));Se(Gs);var Es=xe(ba,Gs);Se(Es);var ns=(Yo^Co>=0?-1:1)*x(Es[2]);(wr>ns||wr===ns&&(Gs[0]||Gs[1]))&&(Na+=Yo^Co>=0?1:-1)}}return(Ia<-t||Ia0){for(Za||(ea.polygonStart(),Za=!0),ea.lineStart(),Zi=0;Zi1&&Ln&2&&Ni.push(Ni.pop().concat(Ni.shift())),Da.push(Ni.filter(ot))}}return $a}}function ot(Ft){return Ft.length>1}function kt(Ft,tr){return((Ft=Ft.x)[0]<0?Ft[1]-a-t:a-Ft[1])-((tr=tr.x)[0]<0?tr[1]-a-t:a-tr[1])}var jt=Dr(function(){return!0},ar,xr,[-r,-a]);function ar(Ft){var tr=NaN,Fr=NaN,wr=NaN,ea;return{lineStart:function(){Ft.lineStart(),ea=1},point:function(ba,Ia){var Na=ba>0?r:-r,Za=h(ba-tr);h(Za-r)0?a:-a),Ft.point(wr,Fr),Ft.lineEnd(),Ft.lineStart(),Ft.point(Na,Fr),Ft.point(ba,Fr),ea=0):wr!==Na&&Za>=r&&(h(tr-wr)t?v((_(tr)*(ba=i(wr))*_(Fr)-_(wr)*(ea=i(tr))*_(Ft))/(ea*ba*Ia)):(tr+wr)/2}function xr(Ft,tr,Fr,wr){var ea;if(Ft==null)ea=Fr*a,wr.point(-r,ea),wr.point(0,ea),wr.point(r,ea),wr.point(r,0),wr.point(r,-ea),wr.point(0,-ea),wr.point(-r,-ea),wr.point(-r,0),wr.point(-r,ea);else if(h(Ft[0]-tr[0])>t){var ba=Ft[0]0,ea=h(tr)>t;function ba(Da,Ha,$a,vn){en(vn,Ft,Fr,$a,Da,Ha)}function Ia(Da,Ha){return i(Da)*i(Ha)>tr}function Na(Da){var Ha,$a,vn,En,yi;return{lineStart:function(){En=vn=!1,yi=1},point:function(_i,ki){var ri=[_i,ki],kn,Ln=Ia(_i,ki),Ni=wr?Ln?0:mn(_i,ki):Ln?mn(_i+(_i<0?r:-r),ki):0;if(!Ha&&(En=vn=Ln)&&Da.lineStart(),Ln!==vn&&(kn=Za(Ha,ri),(!kn||Oa(Ha,kn)||Oa(ri,kn))&&(ri[2]=1)),Ln!==vn)yi=0,Ln?(Da.lineStart(),kn=Za(ri,Ha),Da.point(kn[0],kn[1])):(kn=Za(Ha,ri),Da.point(kn[0],kn[1],2),Da.lineEnd()),Ha=kn;else if(ea&&Ha&&wr^Ln){var Zi;!(Ni&$a)&&(Zi=Za(ri,Ha,!0))&&(yi=0,wr?(Da.lineStart(),Da.point(Zi[0][0],Zi[0][1]),Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd()):(Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd(),Da.lineStart(),Da.point(Zi[0][0],Zi[0][1],3)))}Ln&&(!Ha||!Oa(Ha,ri))&&Da.point(ri[0],ri[1]),Ha=ri,vn=Ln,$a=Ni},lineEnd:function(){vn&&Da.lineEnd(),Ha=null},clean:function(){return yi|(En&&vn)<<1}}}function Za(Da,Ha,$a){var vn=ae(Da),En=ae(Ha),yi=[1,0,0],_i=xe(vn,En),ki=he(_i,_i),ri=_i[0],kn=ki-ri*ri;if(!kn)return!$a&&Da;var Ln=tr*ki/kn,Ni=-tr*ri/kn,Zi=xe(yi,_i),Co=Me(yi,Ln),Do=Me(_i,Ni);we(Co,Do);var Fo=Zi,Yo=he(Co,Fo),bo=he(Fo,Fo),Gs=Yo*Yo-bo*(he(Co,Co)-1);if(!(Gs<0)){var Es=f(Gs),ns=Me(Fo,(-Yo-Es)/bo);if(we(ns,Co),ns=ee(ns),!$a)return ns;var Kn=Da[0],zo=Ha[0],gs=Da[1],js=Ha[1],Cl;zo0^ns[1]<(h(ns[0]-Kn)r^(Kn<=ns[0]&&ns[0]<=zo)){var xl=Me(Fo,(-Yo+Es)/bo);return we(xl,Co),[ns,ee(xl)]}}}function mn(Da,Ha){var $a=wr?Ft:r-Ft,vn=0;return Da<-$a?vn|=1:Da>$a&&(vn|=2),Ha<-$a?vn|=4:Ha>$a&&(vn|=8),vn}return Dr(Ia,Na,ba,wr?[0,-Ft]:[-r,Ft-r])}function Lr(Ft,tr,Fr,wr,ea,ba){var Ia=Ft[0],Na=Ft[1],Za=tr[0],mn=tr[1],Da=0,Ha=1,$a=Za-Ia,vn=mn-Na,En;if(En=Fr-Ia,!(!$a&&En>0)){if(En/=$a,$a<0){if(En0){if(En>Ha)return;En>Da&&(Da=En)}if(En=ea-Ia,!(!$a&&En<0)){if(En/=$a,$a<0){if(En>Ha)return;En>Da&&(Da=En)}else if($a>0){if(En0)){if(En/=vn,vn<0){if(En0){if(En>Ha)return;En>Da&&(Da=En)}if(En=ba-Na,!(!vn&&En<0)){if(En/=vn,vn<0){if(En>Ha)return;En>Da&&(Da=En)}else if(vn>0){if(En0&&(Ft[0]=Ia+Da*$a,Ft[1]=Na+Da*vn),Ha<1&&(tr[0]=Ia+Ha*$a,tr[1]=Na+Ha*vn),!0}}}}}var aa=1e9,Sa=-aa;function wa(Ft,tr,Fr,wr){function ea(mn,Da){return Ft<=mn&&mn<=Fr&&tr<=Da&&Da<=wr}function ba(mn,Da,Ha,$a){var vn=0,En=0;if(mn==null||(vn=Ia(mn,Ha))!==(En=Ia(Da,Ha))||Za(mn,Da)<0^Ha>0)do $a.point(vn===0||vn===3?Ft:Fr,vn>1?wr:tr);while((vn=(vn+Ha+4)%4)!==En);else $a.point(Da[0],Da[1])}function Ia(mn,Da){return h(mn[0]-Ft)0?0:3:h(mn[0]-Fr)0?2:1:h(mn[1]-tr)0?1:0:Da>0?3:2}function Na(mn,Da){return Za(mn.x,Da.x)}function Za(mn,Da){var Ha=Ia(mn,1),$a=Ia(Da,1);return Ha!==$a?Ha-$a:Ha===0?Da[1]-mn[1]:Ha===1?mn[0]-Da[0]:Ha===2?mn[1]-Da[1]:Da[0]-mn[0]}return function(mn){var Da=mn,Ha=Ja(),$a,vn,En,yi,_i,ki,ri,kn,Ln,Ni,Zi,Co={point:Do,lineStart:Gs,lineEnd:Es,polygonStart:Yo,polygonEnd:bo};function Do(Kn,zo){ea(Kn,zo)&&Da.point(Kn,zo)}function Fo(){for(var Kn=0,zo=0,gs=vn.length;zowr&&(Hu-Gu)*(wr-xl)>(Su-xl)*(Ft-Gu)&&++Kn:Su<=wr&&(Hu-Gu)*(wr-xl)<(Su-xl)*(Ft-Gu)&&--Kn;return Kn}function Yo(){Da=Ha,$a=[],vn=[],Zi=!0}function bo(){var Kn=Fo(),zo=Zi&&Kn,gs=($a=b.merge($a)).length;(zo||gs)&&(mn.polygonStart(),zo&&(mn.lineStart(),ba(null,null,1,mn),mn.lineEnd()),gs&&rt($a,Na,Kn,ba,mn),mn.polygonEnd()),Da=mn,$a=vn=En=null}function Gs(){Co.point=ns,vn&&vn.push(En=[]),Ni=!0,Ln=!1,ri=kn=NaN}function Es(){$a&&(ns(yi,_i),ki&&Ln&&Ha.rejoin(),$a.push(Ha.result())),Co.point=Do,Ln&&Da.lineEnd()}function ns(Kn,zo){var gs=ea(Kn,zo);if(vn&&En.push([Kn,zo]),Ni)yi=Kn,_i=zo,ki=gs,Ni=!1,gs&&(Da.lineStart(),Da.point(Kn,zo));else if(gs&&Ln)Da.point(Kn,zo);else{var js=[ri=Math.max(Sa,Math.min(aa,ri)),kn=Math.max(Sa,Math.min(aa,kn))],Cl=[Kn=Math.max(Sa,Math.min(aa,Kn)),zo=Math.max(Sa,Math.min(aa,zo))];Lr(js,Cl,Ft,tr,Fr,wr)?(Ln||(Da.lineStart(),Da.point(js[0],js[1])),Da.point(Cl[0],Cl[1]),gs||Da.lineEnd(),Zi=!1):gs&&(Da.lineStart(),Da.point(Kn,zo),Zi=!1)}ri=Kn,kn=zo,Ln=gs}return Co}}function pn(){var Ft=0,tr=0,Fr=960,wr=500,ea,ba,Ia;return Ia={stream:function(Na){return ea&&ba===Na?ea:ea=wa(Ft,tr,Fr,wr)(ba=Na)},extent:function(Na){return arguments.length?(Ft=+Na[0][0],tr=+Na[0][1],Fr=+Na[1][0],wr=+Na[1][1],ea=ba=null,Ia):[[Ft,tr],[Fr,wr]]}}}var tn=E(),ai,rn,Ri,Gn={sphere:I,point:I,lineStart:no,lineEnd:I,polygonStart:I,polygonEnd:I};function no(){Gn.point=fn,Gn.lineEnd=Di}function Di(){Gn.point=Gn.lineEnd=I}function fn(Ft,tr){Ft*=m,tr*=m,ai=Ft,rn=_(tr),Ri=i(tr),Gn.point=Ai}function Ai(Ft,tr){Ft*=m,tr*=m;var Fr=_(tr),wr=i(tr),ea=h(Ft-ai),ba=i(ea),Ia=_(ea),Na=wr*Ia,Za=Ri*Fr-rn*wr*ba,mn=rn*Fr+Ri*wr*ba;tn.add(g(f(Na*Na+Za*Za),mn)),ai=Ft,rn=Fr,Ri=wr}function jn(Ft){return tn.reset(),j(Ft,Gn),+tn}var Xn=[null,null],eo={type:"LineString",coordinates:Xn};function gi(Ft,tr){return Xn[0]=Ft,Xn[1]=tr,jn(eo)}var qi={Feature:function(Ft,tr){return oo(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr0&&(ea=gi(Ft[ba],Ft[ba-1]),ea>0&&Fr<=ea&&wr<=ea&&(Fr+wr-ea)*(1-Math.pow((Fr-wr)/ea,2))t}).map($a)).concat(b.range(w(ba/mn)*mn,ea,mn).filter(function(kn){return h(kn%Ha)>t}).map(vn))}return ki.lines=function(){return ri().map(function(kn){return{type:"LineString",coordinates:kn}})},ki.outline=function(){return{type:"Polygon",coordinates:[En(wr).concat(yi(Ia).slice(1),En(Fr).reverse().slice(1),yi(Na).reverse().slice(1))]}},ki.extent=function(kn){return arguments.length?ki.extentMajor(kn).extentMinor(kn):ki.extentMinor()},ki.extentMajor=function(kn){return arguments.length?(wr=+kn[0][0],Fr=+kn[1][0],Na=+kn[0][1],Ia=+kn[1][1],wr>Fr&&(kn=wr,wr=Fr,Fr=kn),Na>Ia&&(kn=Na,Na=Ia,Ia=kn),ki.precision(_i)):[[wr,Na],[Fr,Ia]]},ki.extentMinor=function(kn){return arguments.length?(tr=+kn[0][0],Ft=+kn[1][0],ba=+kn[0][1],ea=+kn[1][1],tr>Ft&&(kn=tr,tr=Ft,Ft=kn),ba>ea&&(kn=ba,ba=ea,ea=kn),ki.precision(_i)):[[tr,ba],[Ft,ea]]},ki.step=function(kn){return arguments.length?ki.stepMajor(kn).stepMinor(kn):ki.stepMinor()},ki.stepMajor=function(kn){return arguments.length?(Da=+kn[0],Ha=+kn[1],ki):[Da,Ha]},ki.stepMinor=function(kn){return arguments.length?(Za=+kn[0],mn=+kn[1],ki):[Za,mn]},ki.precision=function(kn){return arguments.length?(_i=+kn,$a=Eo(ba,ea,90),vn=Ao(tr,Ft,_i),En=Eo(Na,Ia,90),yi=Ao(wr,Fr,_i),ki):_i},ki.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function jo(){return ds()()}function Wo(Ft,tr){var Fr=Ft[0]*m,wr=Ft[1]*m,ea=tr[0]*m,ba=tr[1]*m,Ia=i(wr),Na=_(wr),Za=i(ba),mn=_(ba),Da=Ia*i(Fr),Ha=Ia*_(Fr),$a=Za*i(ea),vn=Za*_(ea),En=2*x(f(z(ba-wr)+Ia*Za*z(ea-Fr))),yi=_(En),_i=En?function(ki){var ri=_(ki*=En)/yi,kn=_(En-ki)/yi,Ln=kn*Da+ri*$a,Ni=kn*Ha+ri*vn,Zi=kn*Na+ri*mn;return[g(Ni,Ln)*c,g(Zi,f(Ln*Ln+Ni*Ni))*c]}:function(){return[Fr*c,wr*c]};return _i.distance=En,_i}function to(Ft){return Ft}var wo=E(),pi=E(),Vi,Io,Xi,Ko,Uo={point:I,lineStart:I,lineEnd:I,polygonStart:function(){Uo.lineStart=Ls,Uo.lineEnd=Vs},polygonEnd:function(){Uo.lineStart=Uo.lineEnd=Uo.point=I,wo.add(h(pi)),pi.reset()},result:function(){var Ft=wo/2;return wo.reset(),Ft}};function Ls(){Uo.point=Ss}function Ss(Ft,tr){Uo.point=Vo,Vi=Xi=Ft,Io=Ko=tr}function Vo(Ft,tr){pi.add(Ko*Ft-Xi*tr),Xi=Ft,Ko=tr}function Vs(){Vo(Vi,Io)}var Ts=1/0,Bo=Ts,_o=-Ts,Pi=_o,yo={point:bs,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var Ft=[[Ts,Bo],[_o,Pi]];return _o=Pi=-(Bo=Ts=1/0),Ft}};function bs(Ft,tr){Ft_o&&(_o=Ft),trPi&&(Pi=tr)}var Dl=0,hl=0,ps=0,dl=0,wu=0,lu=0,xc=0,Fl=0,pl=0,$u,uu,tl,vs,os={point:ms,lineStart:rl,lineEnd:Ku,polygonStart:function(){os.lineStart=bc,os.lineEnd=Lh},polygonEnd:function(){os.point=ms,os.lineStart=rl,os.lineEnd=Ku},result:function(){var Ft=pl?[xc/pl,Fl/pl]:lu?[dl/lu,wu/lu]:ps?[Dl/ps,hl/ps]:[NaN,NaN];return Dl=hl=ps=dl=wu=lu=xc=Fl=pl=0,Ft}};function ms(Ft,tr){Dl+=Ft,hl+=tr,++ps}function rl(){os.point=Fu}function Fu(Ft,tr){os.point=zu,ms(tl=Ft,vs=tr)}function zu(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ms(tl=Ft,vs=tr)}function Ku(){os.point=ms}function bc(){os.point=rh}function Lh(){Ju($u,uu)}function rh(Ft,tr){os.point=Ju,ms($u=tl=Ft,uu=vs=tr)}function Ju(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ea=vs*Ft-tl*tr,xc+=ea*(tl+Ft),Fl+=ea*(vs+tr),pl+=ea*3,ms(tl=Ft,vs=tr)}function ss(Ft){this._context=Ft}ss.prototype={_radius:4.5,pointRadius:function(Ft){return this._radius=Ft,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(Ft,tr){switch(this._point){case 0:{this._context.moveTo(Ft,tr),this._point=1;break}case 1:{this._context.lineTo(Ft,tr);break}default:{this._context.moveTo(Ft+this._radius,tr),this._context.arc(Ft,tr,this._radius,0,s);break}}},result:I};var ah=E(),wc,pc,Nf,Bu,Tc,Ou={point:I,lineStart:function(){Ou.point=Gc},lineEnd:function(){wc&&pf(pc,Nf),Ou.point=I},polygonStart:function(){wc=!0},polygonEnd:function(){wc=null},result:function(){var Ft=+ah;return ah.reset(),Ft}};function Gc(Ft,tr){Ou.point=pf,pc=Bu=Ft,Nf=Tc=tr}function pf(Ft,tr){Bu-=Ft,Tc-=tr,ah.add(f(Bu*Bu+Tc*Tc)),Bu=Ft,Tc=tr}function $l(){this._string=[]}$l.prototype={_radius:4.5,_circle:jf(4.5),pointRadius:function(Ft){return(Ft=+Ft)!==this._radius&&(this._radius=Ft,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(Ft,tr){switch(this._point){case 0:{this._string.push("M",Ft,",",tr),this._point=1;break}case 1:{this._string.push("L",Ft,",",tr);break}default:{this._circle==null&&(this._circle=jf(this._radius)),this._string.push("M",Ft,",",tr,this._circle);break}}},result:function(){if(this._string.length){var Ft=this._string.join("");return this._string=[],Ft}else return null}};function jf(Ft){return"m0,"+Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+-2*Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+2*Ft+"z"}function Hc(Ft,tr){var Fr=4.5,wr,ea;function ba(Ia){return Ia&&(typeof Fr=="function"&&ea.pointRadius(+Fr.apply(this,arguments)),j(Ia,wr(ea))),ea.result()}return ba.area=function(Ia){return j(Ia,wr(Uo)),Uo.result()},ba.measure=function(Ia){return j(Ia,wr(Ou)),Ou.result()},ba.bounds=function(Ia){return j(Ia,wr(yo)),yo.result()},ba.centroid=function(Ia){return j(Ia,wr(os)),os.result()},ba.projection=function(Ia){return arguments.length?(wr=Ia==null?(Ft=null,to):(Ft=Ia).stream,ba):Ft},ba.context=function(Ia){return arguments.length?(ea=Ia==null?(tr=null,new $l):new ss(tr=Ia),typeof Fr!="function"&&ea.pointRadius(Fr),ba):tr},ba.pointRadius=function(Ia){return arguments.length?(Fr=typeof Ia=="function"?Ia:(ea.pointRadius(+Ia),+Ia),ba):Fr},ba.projection(Ft).context(tr)}function Wc(Ft){return{stream:Qu(Ft)}}function Qu(Ft){return function(tr){var Fr=new Yc;for(var wr in Ft)Fr[wr]=Ft[wr];return Fr.stream=tr,Fr}}function Yc(){}Yc.prototype={constructor:Yc,point:function(Ft,tr){this.stream.point(Ft,tr)},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 Nu(Ft,tr,Fr){var wr=Ft.clipExtent&&Ft.clipExtent();return Ft.scale(150).translate([0,0]),wr!=null&&Ft.clipExtent(null),j(Fr,Ft.stream(yo)),tr(yo.result()),wr!=null&&Ft.clipExtent(wr),Ft}function Uf(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=tr[1][0]-tr[0][0],ba=tr[1][1]-tr[0][1],Ia=Math.min(ea/(wr[1][0]-wr[0][0]),ba/(wr[1][1]-wr[0][1])),Na=+tr[0][0]+(ea-Ia*(wr[1][0]+wr[0][0]))/2,Za=+tr[0][1]+(ba-Ia*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*Ia).translate([Na,Za])},Fr)}function al(Ft,tr,Fr){return Uf(Ft,[[0,0],tr],Fr)}function Xc(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][0]-wr[0][0]),Ia=(ea-ba*(wr[1][0]+wr[0][0]))/2,Na=-ba*wr[0][1];Ft.scale(150*ba).translate([Ia,Na])},Fr)}function ju(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][1]-wr[0][1]),Ia=-ba*wr[0][0],Na=(ea-ba*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*ba).translate([Ia,Na])},Fr)}var Ac=16,Zc=i(30*m);function ec(Ft,tr){return+tr?tc(Ft,tr):cu(Ft)}function cu(Ft){return Qu({point:function(tr,Fr){tr=Ft(tr,Fr),this.stream.point(tr[0],tr[1])}})}function tc(Ft,tr){function Fr(wr,ea,ba,Ia,Na,Za,mn,Da,Ha,$a,vn,En,yi,_i){var ki=mn-wr,ri=Da-ea,kn=ki*ki+ri*ri;if(kn>4*tr&&yi--){var Ln=Ia+$a,Ni=Na+vn,Zi=Za+En,Co=f(Ln*Ln+Ni*Ni+Zi*Zi),Do=x(Zi/=Co),Fo=h(h(Zi)-1)tr||h((ki*Es+ri*ns)/kn-.5)>.3||Ia*$a+Na*vn+Za*En2?Kn[2]%360*m:0,Es()):[Na*c,Za*c,mn*c]},bo.angle=function(Kn){return arguments.length?(Ha=Kn%360*m,Es()):Ha*c},bo.reflectX=function(Kn){return arguments.length?($a=Kn?-1:1,Es()):$a<0},bo.reflectY=function(Kn){return arguments.length?(vn=Kn?-1:1,Es()):vn<0},bo.precision=function(Kn){return arguments.length?(Zi=ec(Co,Ni=Kn*Kn),ns()):f(Ni)},bo.fitExtent=function(Kn,zo){return Uf(bo,Kn,zo)},bo.fitSize=function(Kn,zo){return al(bo,Kn,zo)},bo.fitWidth=function(Kn,zo){return Xc(bo,Kn,zo)},bo.fitHeight=function(Kn,zo){return ju(bo,Kn,zo)};function Es(){var Kn=vl(Fr,0,0,$a,vn,Ha).apply(null,tr(ba,Ia)),zo=(Ha?vl:nh)(Fr,wr-Kn[0],ea-Kn[1],$a,vn,Ha);return Da=yn(Na,Za,mn),Co=ja(tr,zo),Do=ja(Da,Co),Zi=ec(Co,Ni),ns()}function ns(){return Fo=Yo=null,bo}return function(){return tr=Ft.apply(this,arguments),bo.invert=tr.invert&&Gs,Es()}}function yl(Ft){var tr=0,Fr=r/3,wr=rc(Ft),ea=wr(tr,Fr);return ea.parallels=function(ba){return arguments.length?wr(tr=ba[0]*m,Fr=ba[1]*m):[tr*c,Fr*c]},ea}function qf(Ft){var tr=i(Ft);function Fr(wr,ea){return[wr*tr,_(ea)/tr]}return Fr.invert=function(wr,ea){return[wr/tr,x(ea*tr)]},Fr}function ac(Ft,tr){var Fr=_(Ft),wr=(Fr+_(tr))/2;if(h(wr)=.12&&_i<.234&&yi>=-.425&&yi<-.214?ea:_i>=.166&&_i<.234&&yi>=-.214&&yi<-.115?Ia:Fr).invert($a)},Da.stream=function($a){return Ft&&tr===$a?Ft:Ft=Jo([Fr.stream(tr=$a),ea.stream($a),Ia.stream($a)])},Da.precision=function($a){return arguments.length?(Fr.precision($a),ea.precision($a),Ia.precision($a),Ha()):Fr.precision()},Da.scale=function($a){return arguments.length?(Fr.scale($a),ea.scale($a*.35),Ia.scale($a),Da.translate(Fr.translate())):Fr.scale()},Da.translate=function($a){if(!arguments.length)return Fr.translate();var vn=Fr.scale(),En=+$a[0],yi=+$a[1];return wr=Fr.translate($a).clipExtent([[En-.455*vn,yi-.238*vn],[En+.455*vn,yi+.238*vn]]).stream(mn),ba=ea.translate([En-.307*vn,yi+.201*vn]).clipExtent([[En-.425*vn+t,yi+.12*vn+t],[En-.214*vn-t,yi+.234*vn-t]]).stream(mn),Na=Ia.translate([En-.205*vn,yi+.212*vn]).clipExtent([[En-.214*vn+t,yi+.166*vn+t],[En-.115*vn-t,yi+.234*vn-t]]).stream(mn),Ha()},Da.fitExtent=function($a,vn){return Uf(Da,$a,vn)},Da.fitSize=function($a,vn){return al(Da,$a,vn)},Da.fitWidth=function($a,vn){return Xc(Da,$a,vn)},Da.fitHeight=function($a,vn){return ju(Da,$a,vn)};function Ha(){return Ft=tr=null,Da}return Da.scale(1070)}function fu(Ft){return function(tr,Fr){var wr=i(tr),ea=i(Fr),ba=Ft(wr*ea);return[ba*ea*_(tr),ba*_(Fr)]}}function Sl(Ft){return function(tr,Fr){var wr=f(tr*tr+Fr*Fr),ea=Ft(wr),ba=_(ea),Ia=i(ea);return[g(tr*ba,wr*Ia),x(wr&&Fr*ba/wr)]}}var El=fu(function(Ft){return f(2/(1+Ft))});El.invert=Sl(function(Ft){return 2*x(Ft/2)});function oh(){return ml(El).scale(124.75).clipAngle(180-.001)}var Au=fu(function(Ft){return(Ft=A(Ft))&&Ft/_(Ft)});Au.invert=Sl(function(Ft){return Ft});function $c(){return ml(Au).scale(79.4188).clipAngle(180-.001)}function _l(Ft,tr){return[Ft,M(u((a+tr)/2))]}_l.invert=function(Ft,tr){return[Ft,2*v(S(tr))-a]};function nl(){return gf(_l).scale(961/s)}function gf(Ft){var tr=ml(Ft),Fr=tr.center,wr=tr.scale,ea=tr.translate,ba=tr.clipExtent,Ia=null,Na,Za,mn;tr.scale=function(Ha){return arguments.length?(wr(Ha),Da()):wr()},tr.translate=function(Ha){return arguments.length?(ea(Ha),Da()):ea()},tr.center=function(Ha){return arguments.length?(Fr(Ha),Da()):Fr()},tr.clipExtent=function(Ha){return arguments.length?(Ha==null?Ia=Na=Za=mn=null:(Ia=+Ha[0][0],Na=+Ha[0][1],Za=+Ha[1][0],mn=+Ha[1][1]),Da()):Ia==null?null:[[Ia,Na],[Za,mn]]};function Da(){var Ha=r*wr(),$a=tr(on(tr.rotate()).invert([0,0]));return ba(Ia==null?[[$a[0]-Ha,$a[1]-Ha],[$a[0]+Ha,$a[1]+Ha]]:Ft===_l?[[Math.max($a[0]-Ha,Ia),Na],[Math.min($a[0]+Ha,Za),mn]]:[[Ia,Math.max($a[1]-Ha,Na)],[Za,Math.min($a[1]+Ha,mn)]])}return Da()}function Kc(Ft){return u((a+Ft)/2)}function sh(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):M(Fr/i(tr))/M(Kc(tr)/Kc(Ft)),ea=Fr*C(Kc(Ft),wr)/wr;if(!wr)return _l;function ba(Ia,Na){ea>0?Na<-a+t&&(Na=-a+t):Na>a-t&&(Na=a-t);var Za=ea/C(Kc(Na),wr);return[Za*_(wr*Ia),ea-Za*i(wr*Ia)]}return ba.invert=function(Ia,Na){var Za=ea-Na,mn=T(wr)*f(Ia*Ia+Za*Za),Da=g(Ia,h(Za))*T(Za);return Za*wr<0&&(Da-=r*T(Ia)*T(Za)),[Da/wr,2*v(C(ea/mn,1/wr))-a]},ba}function hu(){return yl(sh).scale(109.5).parallels([30,30])}function Uu(Ft,tr){return[Ft,tr]}Uu.invert=Uu;function qu(){return ml(Uu).scale(152.63)}function nc(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):(Fr-i(tr))/(tr-Ft),ea=Fr/wr+Ft;if(h(wr)t&&--wr>0);return[Ft/(.8707+(ba=Fr*Fr)*(-.131979+ba*(-.013791+ba*ba*ba*(.003971-.001529*ba)))),Fr]};function Hf(){return ml(bh).scale(175.295)}function il(Ft,tr){return[i(tr)*_(Ft),_(tr)]}il.invert=Sl(x);function kl(){return ml(il).scale(249.5).clipAngle(90+t)}function kc(Ft,tr){var Fr=i(tr),wr=1+i(Ft)*Fr;return[Fr*_(Ft)/wr,_(tr)/wr]}kc.invert=Sl(function(Ft){return 2*v(Ft)});function Cc(){return ml(kc).scale(250).clipAngle(142)}function Lc(Ft,tr){return[M(u((a+tr)/2)),-Ft]}Lc.invert=function(Ft,tr){return[-tr,2*v(S(Ft))-a]};function vc(){var Ft=gf(Lc),tr=Ft.center,Fr=Ft.rotate;return Ft.center=function(wr){return arguments.length?tr([-wr[1],wr[0]]):(wr=tr(),[wr[1],-wr[0]])},Ft.rotate=function(wr){return arguments.length?Fr([wr[0],wr[1],wr.length>2?wr[2]+90:90]):(wr=Fr(),[wr[0],wr[1],wr[2]-90])},Fr([0,0,90]).scale(159.155)}p.geoAlbers=mf,p.geoAlbersUsa=ih,p.geoArea=Z,p.geoAzimuthalEqualArea=oh,p.geoAzimuthalEqualAreaRaw=El,p.geoAzimuthalEquidistant=$c,p.geoAzimuthalEquidistantRaw=Au,p.geoBounds=vt,p.geoCentroid=un,p.geoCircle=Yi,p.geoClipAntimeridian=jt,p.geoClipCircle=zr,p.geoClipExtent=pn,p.geoClipRectangle=wa,p.geoConicConformal=hu,p.geoConicConformalRaw=sh,p.geoConicEqualArea=Mc,p.geoConicEqualAreaRaw=ac,p.geoConicEquidistant=yf,p.geoConicEquidistantRaw=nc,p.geoContains=go,p.geoDistance=gi,p.geoEqualEarth=xh,p.geoEqualEarthRaw=Ec,p.geoEquirectangular=qu,p.geoEquirectangularRaw=Uu,p.geoGnomonic=xf,p.geoGnomonicRaw=Vf,p.geoGraticule=ds,p.geoGraticule10=jo,p.geoIdentity=Gf,p.geoInterpolate=Wo,p.geoLength=jn,p.geoMercator=nl,p.geoMercatorRaw=_l,p.geoNaturalEarth1=Hf,p.geoNaturalEarth1Raw=bh,p.geoOrthographic=kl,p.geoOrthographicRaw=il,p.geoPath=Hc,p.geoProjection=ml,p.geoProjectionMutator=rc,p.geoRotation=on,p.geoStereographic=Cc,p.geoStereographicRaw=kc,p.geoStream=j,p.geoTransform=Wc,p.geoTransverseMercator=vc,p.geoTransverseMercatorRaw=Lc,Object.defineProperty(p,"__esModule",{value:!0})})}}),_j=ze({"src/lib/usa_location_names.js"(J,V){"use strict";var p={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},b=new Set(Object.values(p));V.exports={usaLocationAbbreviations:b,usaLocationList:p}}}),kA={};bu(kA,{COUNTRIES_X:()=>CA});var CA,xj=zi({"src/lib/custom_country_codes.ts"(){"use strict";CA=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),hp=ze({"src/lib/geo_location_utils.js"(J,V){"use strict";var p=ci(),{COUNTRIES:b,createLookup:E}=vj(),{area:k}=mj(),{centroid:l}=gj(),{coordAll:e}=k2(),{geoBounds:t}=C2(),n=s1(),r=ap(),a=tv(),o=r1(),s=p1(),{usaLocationAbbreviations:c,usaLocationList:m}=_j(),{COUNTRIES_X:h}=(xj(),Po(kA)),{lookupAlpha3:v}=E([...b,...h]),g={"ISO-3":n,"USA-states":w,"country names":i};function i(P){let j=v(P);return j||(r.log("Unrecognized country name: "+P+"."),!1)}function w(P){P=P.trim();let j=c.has(P.toUpperCase())?P.toUpperCase():m[P.toLowerCase()];return j||(r.log("Unrecognized US location: "+P+"."),!1)}function S(P,j,U){var $;if(!j||typeof j!="string")return!1;let Q=g[P](j);if(Q){let re;if(P==="USA-states"){re=[];for(let ne of U)(($=ne?.properties)==null?void 0:$.gu)==="USA"&&re.push(ne)}else re=U;for(let ne of re)if(ne.id===Q)return ne;r.log(`Location with id ${Q} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(P){for(let j=0;j0&&P[j+1][0]<0)return j;return null}function _(P){var j=P.geometry,U=j.coordinates,$=P.id,Q=[],re,ne,se,G;switch($==="RUS"||$==="FJI"?re=function(X){var K;if(C(X)===null)K=X;else for(K=new Array(X.length),G=0;GK?H[Y++]=[X[G][0]+M,X[G][1]]:G===K?(H[Y++]=X[G],H[Y++]=[X[G][0],-90]):H[Y++]=X[G];var q=s.tester(H);q.pts.pop(),Q.push(q)}:re=function(X){Q.push(s.tester(X))},j.type){case"MultiPolygon":for(ne=0;neQ&&(Q=se,U=ne)}else U=j;return!U||!U.coordinates.some(G=>G.length>0)?[NaN,NaN]:l(U).geometry.coordinates}function A(P){var j=window.PlotlyGeoAssets||{},U=[];function $(G){return new Promise(function(X,K){p.json(G,function(H,Y){if(H){delete j[G];var q=H.status===404?'GeoJSON at URL "'+G+'" does not exist.':"Unexpected error while fetching from "+G;return K(new Error(q))}return j[G]=Y,X(Y)})})}function Q(G){return new Promise(function(X,K){var H=0,Y=setInterval(function(){if(j[G]&&j[G]!=="pending")return clearInterval(Y),X(j[G]);if(H>100)return clearInterval(Y),K("Unexpected error while fetching from "+G);H++},50)})}for(var re=0;reI(z(P));function z(P){try{return e(P)}catch{return[]}}function I(P){if(P.length===0)return null;if(P.length===1){let[re,ne]=P[0];return[re,ne,re,ne]}let[[j,U],[$,Q]]=t({type:"MultiPoint",coordinates:P});return[j,U,F([j,$])[1],Q]}var O=(P,j)=>j.fitbounds==="geojson"&&P.locationmode==="geojson-id",D=(P,j)=>O(P,j)?z(T(P)):[],B=(P,j)=>I(D(P,j));function F([P,j]){return[P,P>j?j+M:j]}V.exports={locationToFeature:S,feature2polygons:_,getTraceGeojson:T,extractTraceFeature:f,fetchTraceGeoData:A,boundsOfCoords:I,computeBbox:x,coordsOf:z,doesCrossAntiMeridian:C,fitGeojsonBbox:B,fitGeojsonCoords:D,unwrapLonRange:F,ANTIMERIDIAN_LON_SHIFT:M}}}),LA=ze({"src/traces/scattergeo/style.js"(J,V){"use strict";var p=ci(),b=$i(),E=Qn(),k=Ch(),l=k.stylePoints,e=k.styleText;V.exports=function(r,a){a&&t(r,a)};function t(n,r){var a=r[0].trace,o=r[0].node3;o.style("opacity",r[0].trace.opacity),l(o,a,n),e(o,a,n),o.selectAll("path.js-line").style("fill","none").each(function(s){var c=p.select(this),m=s.trace,h=m.line||{};c.call(E.stroke,h.color).call(b.dashLine,h.dash||"",h.width||0),m.fill!=="none"&&c.call(E.fill,m.fillcolor)})}}}),L2=ze({"src/traces/scattergeo/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=S2().getTopojsonFeatures,k=Q1(),l=hp(),e=md().findExtremes,t=No().BADNUM,n=sd().calcMarkerSize,r=el(),a=LA();function o(m,h,v){var g=h.layers.frontplot.select(".scatterlayer"),i=b.makeTraceGroups(g,v,"trace scattergeo");function w(S,M){S.lonlat[0]===t&&p.select(M).remove()}i.selectAll("*").remove(),i.each(function(S){var M=p.select(this),C=S[0].trace;if(r.hasLines(C)||C.fill!=="none"){var _=k.calcTraceToLineCoords(S),T=C.fill!=="none"?k.makePolygon(_):k.makeLine(_);M.selectAll("path.js-line").data([{geojson:T,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(C)&&M.selectAll("path.point").data(b.identity).enter().append("path").classed("point",!0).each(function(f){w(f,this)}),r.hasText(C)&&M.selectAll("g").data(b.identity).enter().append("g").append("text").each(function(f){w(f,this)}),a(m,S)})}function s(m,h){var v=m[0].trace,g=h[v.geo],i=g._subplot,w=v._length,S,M;if(b.isArrayOrTypedArray(v.locations)){var C=v.locationmode,_=C==="geojson-id"?l.extractTraceFeature(m):E(v,i.topojson);for(S=0;S")}}}),wj=ze({"src/traces/scattergeo/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.lon=E.lon,b.lat=E.lat,b.location=E.loc?E.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b}}}),Tj=ze({"src/traces/scattergeo/select.js"(J,V){"use strict";var p=el(),b=No().BADNUM;V.exports=function(k,l){var e=k.cd,t=k.xaxis,n=k.yaxis,r=[],a=e[0].trace,o,s,c,m,h,v=!p.hasMarkers(a)&&!p.hasText(a);if(v)return[];if(l===!1)for(h=0;hH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:$e<0?-1:0},v=Math.sin,g=Math.tan,i=1e-6,w=1e-12,S=Math.PI,M=S/2,C=S/4,_=Math.SQRT1_2,T=D(2),f=D(S),u=S*2,A=180/S,x=S/180;function z($e){return $e?$e/Math.sin($e):1}function I($e){return $e>1?M:$e<-1?-M:Math.asin($e)}function O($e){return $e>1?0:$e<-1?S:Math.acos($e)}function D($e){return $e>0?Math.sqrt($e):0}function B($e){return $e=n(2*$e),($e-1)/($e+1)}function F($e){return(n($e)-n(-$e))/2}function P($e){return(n($e)+n(-$e))/2}function j($e){return a($e+D($e*$e+1))}function U($e){return a($e+D($e*$e-1))}function $($e){var nt=g($e/2),mt=2*a(t($e/2))/(nt*nt);function xt(Bt,zt){var Wt=t(Bt),Pr=t(zt),Br=v(zt),kr=Pr*Wt,jr=-((1-kr?a((1+kr)/2)/(1-kr):-.5)+mt/(1+kr));return[jr*Pr*v(Bt),jr*Br]}return xt.invert=function(Bt,zt){var Wt=D(Bt*Bt+zt*zt),Pr=-$e/2,Br=50,kr;if(!Wt)return[0,0];do{var jr=Pr/2,Jr=t(jr),la=v(jr),xa=la/Jr,Ba=-a(k(Jr));Pr-=kr=(2/xa*Ba-mt*xa-Wt)/(-Ba/(la*la)+1-mt/(2*Jr*Jr))*(Jr<0?.7:1)}while(k(kr)>i&&--Br>0);var an=v(Pr);return[e(Bt*an,Wt*t(Pr)),I(zt*an/Wt)]},xt}function Q(){var $e=M,nt=b.geoProjectionMutator($),mt=nt($e);return mt.radius=function(xt){return arguments.length?nt($e=xt*x):$e*A},mt.scale(179.976).clipAngle(147)}function re($e,nt){var mt=t(nt),xt=z(O(mt*t($e/=2)));return[2*mt*v($e)*xt,v(nt)*xt]}re.invert=function($e,nt){if(!($e*$e+4*nt*nt>S*S+i)){var mt=$e,xt=nt,Bt=25;do{var zt=v(mt),Wt=v(mt/2),Pr=t(mt/2),Br=v(xt),kr=t(xt),jr=v(2*xt),Jr=Br*Br,la=kr*kr,xa=Wt*Wt,Ba=1-la*Pr*Pr,an=Ba?O(kr*Pr)*D(Tn=1/Ba):Tn=0,Tn,ii=2*an*kr*Wt-$e,Si=an*Br-nt,oi=Tn*(la*xa+an*kr*Pr*Jr),Ji=Tn*(.5*zt*jr-an*2*Br*Wt),Qi=Tn*.25*(jr*Wt-an*Br*la*zt),Oo=Tn*(Jr*Pr+an*xa*kr),Qo=Ji*Qi-Oo*oi;if(!Qo)break;var vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]}};function ne(){return b.geoProjection(re).scale(152.63)}function se($e){var nt=v($e),mt=t($e),xt=$e>=0?1:-1,Bt=g(xt*$e),zt=(1+nt-mt)/2;function Wt(Pr,Br){var kr=t(Br),jr=t(Pr/=2);return[(1+kr)*v(Pr),(xt*Br>-e(jr,Bt)-.001?0:-xt*10)+zt+v(Br)*mt-(1+kr)*nt*jr]}return Wt.invert=function(Pr,Br){var kr=0,jr=0,Jr=50;do{var la=t(kr),xa=v(kr),Ba=t(jr),an=v(jr),Tn=1+Ba,ii=Tn*xa-Pr,Si=zt+an*mt-Tn*nt*la-Br,oi=Tn*la/2,Ji=-xa*an,Qi=nt*Tn*xa/2,Oo=mt*Ba+nt*la*an,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo/2,ys=(ii*Qi-Si*oi)/Qo;k(ys)>2&&(ys/=2),kr-=vo,jr-=ys}while((k(vo)>i||k(ys)>i)&&--Jr>0);return xt*jr>-e(t(kr),Bt)-.001?[kr*2,jr]:null},Wt}function G(){var $e=20*x,nt=$e>=0?1:-1,mt=g(nt*$e),xt=b.geoProjectionMutator(se),Bt=xt($e),zt=Bt.stream;return Bt.parallel=function(Wt){return arguments.length?(mt=g((nt=($e=Wt*x)>=0?1:-1)*$e),xt($e)):$e*A},Bt.stream=function(Wt){var Pr=Bt.rotate(),Br=zt(Wt),kr=(Bt.rotate([0,0]),zt(Wt)),jr=Bt.precision();return Bt.rotate(Pr),Br.sphere=function(){kr.polygonStart(),kr.lineStart();for(var Jr=nt*-180;nt*Jr<180;Jr+=nt*90)kr.point(Jr,nt*90);if($e)for(;nt*(Jr-=3*nt*jr)>=-180;)kr.point(Jr,nt*-e(t(Jr*x/2),mt)*A);kr.lineEnd(),kr.polygonEnd()},Br},Bt.scale(218.695).center([0,28.0974])}function X($e,nt){var mt=g(nt/2),xt=D(1-mt*mt),Bt=1+xt*t($e/=2),zt=v($e)*xt/Bt,Wt=mt/Bt,Pr=zt*zt,Br=Wt*Wt;return[4/3*zt*(3+Pr-3*Br),4/3*Wt*(3+3*Pr-Br)]}X.invert=function($e,nt){if($e*=3/8,nt*=3/8,!$e&&k(nt)>1)return null;var mt=$e*$e,xt=nt*nt,Bt=1+mt+xt,zt=D((Bt-D(Bt*Bt-4*nt*nt))/2),Wt=I(zt)/3,Pr=zt?U(k(nt/zt))/3:j(k($e))/3,Br=t(Wt),kr=P(Pr),jr=kr*kr-Br*Br;return[h($e)*2*e(F(Pr)*Br,.25-jr),h(nt)*2*e(kr*v(Wt),.25+jr)]};function K(){return b.geoProjection(X).scale(66.1603)}var H=D(8),Y=a(1+T);function q($e,nt){var mt=k(nt);return mtw&&--xt>0);return[$e/(t(mt)*(H-1/v(mt))),h(nt)*mt]};function Z(){return b.geoProjection(q).scale(112.314)}function ee($e){var nt=2*S/$e;function mt(xt,Bt){var zt=b.geoAzimuthalEquidistantRaw(xt,Bt);if(k(xt)>M){var Wt=e(zt[1],zt[0]),Pr=D(zt[0]*zt[0]+zt[1]*zt[1]),Br=nt*m((Wt-M)/nt)+M,kr=e(v(Wt-=Br),2-t(Wt));Wt=Br+I(S/Pr*v(kr))-kr,zt[0]=Pr*t(Wt),zt[1]=Pr*v(Wt)}return zt}return mt.invert=function(xt,Bt){var zt=D(xt*xt+Bt*Bt);if(zt>M){var Wt=e(Bt,xt),Pr=nt*m((Wt-M)/nt)+M,Br=Wt>Pr?-1:1,kr=zt*t(Pr-Wt),jr=1/g(Br*O((kr-S)/D(S*(S-2*kr)+zt*zt)));Wt=Pr+2*l((jr+Br*D(jr*jr-3))/3),xt=zt*t(Wt),Bt=zt*v(Wt)}return b.geoAzimuthalEquidistantRaw.invert(xt,Bt)},mt}function ae(){var $e=5,nt=b.geoProjectionMutator(ee),mt=nt($e),xt=mt.stream,Bt=.01,zt=-t(Bt*x),Wt=v(Bt*x);return mt.lobes=function(Pr){return arguments.length?nt($e=+Pr):$e},mt.stream=function(Pr){var Br=mt.rotate(),kr=xt(Pr),jr=(mt.rotate([0,0]),xt(Pr));return mt.rotate(Br),kr.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Jr=0,la=360/$e,xa=2*S/$e,Ba=90-180/$e,an=M;Jr<$e;++Jr,Ba-=la,an-=xa)jr.point(e(Wt*t(an),zt)*A,I(Wt*v(an))*A),Ba<-90?(jr.point(-90,-180-Ba-Bt),jr.point(-90,-180-Ba+Bt)):(jr.point(90,Ba+Bt),jr.point(90,Ba-Bt));jr.lineEnd(),jr.polygonEnd()},kr},mt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function he($e,nt){if(arguments.length<2&&(nt=$e),nt===1)return b.geoAzimuthalEqualAreaRaw;if(nt===1/0)return xe;function mt(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw(xt/nt,Bt);return zt[0]*=$e,zt}return mt.invert=function(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw.invert(xt/$e,Bt);return zt[0]*=nt,zt},mt}function xe($e,nt){return[$e*t(nt)/t(nt/=2),2*v(nt)]}xe.invert=function($e,nt){var mt=2*I(nt/2);return[$e*t(mt/2)/t(mt),mt]};function we(){var $e=2,nt=b.geoProjectionMutator(he),mt=nt($e);return mt.coefficient=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(169.529)}function Me($e,nt,mt){var xt=100,Bt,zt,Wt;mt=mt===void 0?0:+mt,nt=+nt;do zt=$e(mt),Wt=$e(mt+i),zt===Wt&&(Wt=zt+i),mt-=Bt=-1*i*(zt-nt)/(zt-Wt);while(xt-- >0&&k(Bt)>i);return xt<0?NaN:mt}function Se($e,nt,mt){return nt===void 0&&(nt=40),mt===void 0&&(mt=w),function(xt,Bt,zt,Wt){var Pr,Br,kr;zt=zt===void 0?0:+zt,Wt=Wt===void 0?0:+Wt;for(var jr=0;jrPr){zt-=Br/=2,Wt-=kr/=2;continue}Pr=Ba;var an=(zt>0?-1:1)*mt,Tn=(Wt>0?-1:1)*mt,ii=$e(zt+an,Wt),Si=$e(zt,Wt+Tn),oi=(ii[0]-Jr[0])/an,Ji=(ii[1]-Jr[1])/an,Qi=(Si[0]-Jr[0])/Tn,Oo=(Si[1]-Jr[1])/Tn,Qo=Oo*oi-Ji*Qi,vo=(k(Qo)<.5?.5:1)/Qo;if(Br=(xa*Qi-la*Oo)*vo,kr=(la*Ji-xa*oi)*vo,zt+=Br,Wt+=kr,k(Br)0&&(Pr[1]*=1+Br/1.5*Pr[0]*Pr[0]),Pr}return xt.invert=Se(xt),xt}function Ve(){return b.geoProjection(Ie()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ge($e,nt){var mt=$e*v(nt),xt=30,Bt;do nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));while(k(Bt)>i&&--xt>0);return nt/2}function ke($e,nt,mt){function xt(Bt,zt){return[$e*Bt*t(zt=Ge(mt,zt)),nt*v(zt)]}return xt.invert=function(Bt,zt){return zt=I(zt/nt),[Bt/($e*t(zt)),I((2*zt+v(2*zt))/mt)]},xt}var _e=ke(T/M,T,S);function ce(){return b.geoProjection(_e).scale(169.529)}var ve=2.00276,le=1.11072;function Ae($e,nt){var mt=Ge(S,nt);return[ve*$e/(1/t(nt)+le/t(mt)),(nt+T*v(mt))/ve]}Ae.invert=function($e,nt){var mt=ve*nt,xt=nt<0?-C:C,Bt=25,zt,Wt;do Wt=mt-T*v(xt),xt-=zt=(v(2*xt)+2*xt-S*v(Wt))/(2*t(2*xt)+2+S*t(Wt)*T*t(xt));while(k(zt)>i&&--Bt>0);return Wt=mt-T*v(xt),[$e*(1/t(Wt)+le/t(xt))/ve,Wt]};function Be(){return b.geoProjection(Ae).scale(160.857)}function Xe($e){var nt=0,mt=b.geoProjectionMutator($e),xt=mt(nt);return xt.parallel=function(Bt){return arguments.length?mt(nt=Bt*x):nt*A},xt}function Ye($e,nt){return[$e*t(nt),nt]}Ye.invert=function($e,nt){return[$e/t(nt),nt]};function yt(){return b.geoProjection(Ye).scale(152.63)}function gt($e){if(!$e)return Ye;var nt=1/g($e);function mt(xt,Bt){var zt=nt+$e-Bt,Wt=zt&&xt*t(Bt)/zt;return[zt*v(Wt),nt-zt*t(Wt)]}return mt.invert=function(xt,Bt){var zt=D(xt*xt+(Bt=nt-Bt)*Bt),Wt=nt+$e-zt;return[zt/t(Wt)*e(xt,Bt),Wt]},mt}function Tt(){return Xe(gt).scale(123.082).center([0,26.1441]).parallel(45)}function At($e){function nt(mt,xt){var Bt=M-xt,zt=Bt&&mt*$e*v(Bt)/Bt;return[Bt*v(zt)/$e,M-Bt*t(zt)]}return nt.invert=function(mt,xt){var Bt=mt*$e,zt=M-xt,Wt=D(Bt*Bt+zt*zt),Pr=e(Bt,zt);return[(Wt?Wt/v(Wt):1)*Pr/$e,M-Wt]},nt}function $t(){var $e=.5,nt=b.geoProjectionMutator(At),mt=nt($e);return mt.fraction=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(158.837)}var rr=ke(1,4/S,S);function _r(){return b.geoProjection(rr).scale(152.63)}function Xt($e,nt,mt,xt,Bt,zt){var Wt=t(zt),Pr;if(k($e)>1||k(zt)>1)Pr=O(mt*Bt+nt*xt*Wt);else{var Br=v($e/2),kr=v(zt/2);Pr=2*I(D(Br*Br+nt*xt*kr*kr))}return k(Pr)>i?[Pr,e(xt*v(zt),nt*Bt-mt*xt*Wt)]:[0,0]}function or($e,nt,mt){return O(($e*$e+nt*nt-mt*mt)/(2*$e*nt))}function Ot($e){return $e-2*S*r(($e+S)/(2*S))}function vt($e,nt,mt){for(var xt=[[$e[0],$e[1],v($e[1]),t($e[1])],[nt[0],nt[1],v(nt[1]),t(nt[1])],[mt[0],mt[1],v(mt[1]),t(mt[1])]],Bt=xt[2],zt,Wt=0;Wt<3;++Wt,Bt=zt)zt=xt[Wt],Bt.v=Xt(zt[1]-Bt[1],Bt[3],Bt[2],zt[3],zt[2],zt[0]-Bt[0]),Bt.point=[0,0];var Pr=or(xt[0].v[0],xt[2].v[0],xt[1].v[0]),Br=or(xt[0].v[0],xt[1].v[0],xt[2].v[0]),kr=S-Pr;xt[2].point[1]=0,xt[0].point[0]=-(xt[1].point[0]=xt[0].v[0]/2);var jr=[xt[2].point[0]=xt[0].point[0]+xt[2].v[0]*t(Pr),2*(xt[0].point[1]=xt[1].point[1]=xt[2].v[0]*v(Pr))];function Jr(la,xa){var Ba=v(xa),an=t(xa),Tn=new Array(3),ii;for(ii=0;ii<3;++ii){var Si=xt[ii];if(Tn[ii]=Xt(xa-Si[1],Si[3],Si[2],an,Ba,la-Si[0]),!Tn[ii][0])return Si.point;Tn[ii][1]=Ot(Tn[ii][1]-Si.v[1])}var oi=jr.slice();for(ii=0;ii<3;++ii){var Ji=ii==2?0:ii+1,Qi=or(xt[ii].v[0],Tn[ii][0],Tn[Ji][0]);Tn[ii][1]<0&&(Qi=-Qi),ii?ii==1?(Qi=Br-Qi,oi[0]-=Tn[ii][0]*t(Qi),oi[1]-=Tn[ii][0]*v(Qi)):(Qi=kr-Qi,oi[0]+=Tn[ii][0]*t(Qi),oi[1]+=Tn[ii][0]*v(Qi)):(oi[0]+=Tn[ii][0]*t(Qi),oi[1]-=Tn[ii][0]*v(Qi))}return oi[0]/=3,oi[1]/=3,oi}return Jr}function ht($e){return $e[0]*=x,$e[1]*=x,$e}function De(){return Ne([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ne($e,nt,mt){var xt=b.geoCentroid({type:"MultiPoint",coordinates:[$e,nt,mt]}),Bt=[-xt[0],-xt[1]],zt=b.geoRotation(Bt),Wt=vt(ht(zt($e)),ht(zt(nt)),ht(zt(mt)));Wt.invert=Se(Wt);var Pr=b.geoProjection(Wt).rotate(Bt),Br=Pr.center;return delete Pr.rotate,Pr.center=function(kr){return arguments.length?Br(zt(kr)):zt.invert(Br())},Pr.clipAngle(90)}function We($e,nt){var mt=D(1-v(nt));return[2/f*$e*mt,f*(1-mt)]}We.invert=function($e,nt){var mt=(mt=nt/f-1)*mt;return[mt>0?$e*D(S/mt)/2:0,I(1-mt)]};function Ke(){return b.geoProjection(We).scale(95.6464).center([0,30])}function Je($e){var nt=g($e);function mt(xt,Bt){return[xt,(xt?xt/v(xt):1)*(v(Bt)*t(xt)-nt*t(Bt))]}return mt.invert=nt?function(xt,Bt){xt&&(Bt*=v(xt)/xt);var zt=t(xt);return[xt,2*e(D(zt*zt+nt*nt-Bt*Bt)-zt,nt-Bt)]}:function(xt,Bt){return[xt,I(xt?Bt*g(xt)/xt:Bt)]},mt}function et(){return Xe(Je).scale(249.828).clipAngle(90)}var Mt=D(3);function pt($e,nt){return[Mt*$e*(2*t(2*nt/3)-1)/f,Mt*f*v(nt/3)]}pt.invert=function($e,nt){var mt=3*I(nt/(Mt*f));return[f*$e/(Mt*(2*t(2*mt/3)-1)),mt]};function Pt(){return b.geoProjection(pt).scale(156.19)}function Ct($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,v(Bt)/nt]}return mt.invert=function(xt,Bt){return[xt/nt,I(Bt*nt)]},mt}function qt(){return Xe(Ct).parallel(38.58).scale(195.044)}function Vt($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,(1+nt)*g(Bt/2)]}return mt.invert=function(xt,Bt){return[xt/nt,l(Bt/(1+nt))*2]},mt}function Ht(){return Xe(Vt).scale(124.75)}function Sr($e,nt){var mt=D(8/(3*S));return[mt*$e*(1-k(nt)/S),mt*nt]}Sr.invert=function($e,nt){var mt=D(8/(3*S)),xt=nt/mt;return[$e/(mt*(1-k(xt)/S)),xt]};function Kr(){return b.geoProjection(Sr).scale(165.664)}function Yt($e,nt){var mt=D(4-3*v(k(nt)));return[2/D(6*S)*$e*mt,h(nt)*D(2*S/3)*(2-mt)]}Yt.invert=function($e,nt){var mt=2-k(nt)/D(2*S/3);return[$e*D(6*S)/(2*mt),h(nt)*I((4-mt*mt)/3)]};function Rt(){return b.geoProjection(Yt).scale(165.664)}function nr($e,nt){var mt=D(S*(4+S));return[2/mt*$e*(1+D(1-4*nt*nt/(S*S))),4/mt*nt]}nr.invert=function($e,nt){var mt=D(S*(4+S))/2;return[$e*mt/(1+D(1-nt*nt*(4+S)/(4*S))),nt*mt/2]};function ur(){return b.geoProjection(nr).scale(180.739)}function cr($e,nt){var mt=(2+M)*v(nt);nt/=2;for(var xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++){var zt=t(nt);nt-=Bt=(nt+v(nt)*(zt+2)-mt)/(2*zt*(1+zt))}return[2/D(S*(4+S))*$e*(1+t(nt)),2*D(S/(4+S))*v(nt)]}cr.invert=function($e,nt){var mt=nt*D((4+S)/S)/2,xt=I(mt),Bt=t(xt);return[$e/(2/D(S*(4+S))*(1+Bt)),I((xt+mt*(Bt+2))/(2+M))]};function Rr(){return b.geoProjection(cr).scale(180.739)}function Qr($e,nt){return[$e*(1+t(nt))/D(2+S),2*nt/D(2+S)]}Qr.invert=function($e,nt){var mt=D(2+S),xt=nt*mt/2;return[mt*$e/(1+t(xt)),xt]};function Zr(){return b.geoProjection(Qr).scale(173.044)}function ha($e,nt){for(var mt=(1+M)*v(nt),xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++)nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));return mt=D(2+S),[$e*(1+t(nt))/mt,2*nt/mt]}ha.invert=function($e,nt){var mt=1+M,xt=D(mt/2);return[$e*2*xt/(1+t(nt*=xt)),I((nt+v(nt))/mt)]};function Pa(){return b.geoProjection(ha).scale(173.044)}var La=3+2*T;function un($e,nt){var mt=v($e/=2),xt=t($e),Bt=D(t(nt)),zt=t(nt/=2),Wt=v(nt)/(zt+T*xt*Bt),Pr=D(2/(1+Wt*Wt)),Br=D((T*zt+(xt+mt)*Bt)/(T*zt+(xt-mt)*Bt));return[La*(Pr*(Br-1/Br)-2*a(Br)),La*(Pr*Wt*(Br+1/Br)-2*l(Wt))]}un.invert=function($e,nt){if(!(zt=X.invert($e/1.2,nt*1.065)))return null;var mt=zt[0],xt=zt[1],Bt=20,zt;$e/=La,nt/=La;do{var Wt=mt/2,Pr=xt/2,Br=v(Wt),kr=t(Wt),jr=v(Pr),Jr=t(Pr),la=t(xt),xa=D(la),Ba=jr/(Jr+T*kr*xa),an=Ba*Ba,Tn=D(2/(1+an)),ii=T*Jr+(kr+Br)*xa,Si=T*Jr+(kr-Br)*xa,oi=ii/Si,Ji=D(oi),Qi=Ji-1/Ji,Oo=Ji+1/Ji,Qo=Tn*Qi-2*a(Ji)-$e,vo=Tn*Ba*Oo-2*l(Ba)-nt,ys=jr&&_*xa*Br*an/jr,ol=(T*kr*Jr+xa)/(2*(Jr+T*kr*xa)*(Jr+T*kr*xa)*xa),jl=-.5*Ba*Tn*Tn*Tn,Hs=jl*ys,Cu=jl*ol,hi=(hi=2*Jr+T*xa*(kr-Br))*hi*Ji,wi=(T*kr*Jr*xa+la)/hi,sl=-(T*Br*jr)/(xa*hi),sc=Qi*Hs-2*wi/Ji+Tn*(wi+wi/oi),tu=Qi*Cu-2*sl/Ji+Tn*(sl+sl/oi),Ps=Ba*Oo*Hs-2*ys/(1+an)+Tn*Oo*ys+Tn*Ba*(wi-wi/oi),gc=Ba*Oo*Cu-2*ol/(1+an)+Tn*Oo*ol+Tn*Ba*(sl-sl/oi),pu=tu*Ps-gc*sc;if(!pu)break;var ll=(vo*tu-Qo*gc)/pu,ef=(Qo*Ps-vo*sc)/pu;mt-=ll,xt=o(-M,s(M,xt-ef))}while((k(ll)>i||k(ef)>i)&&--Bt>0);return k(k(xt)-M)xt){var Jr=D(jr),la=e(kr,Br),xa=mt*m(la/mt),Ba=la-xa,an=$e*t(Ba),Tn=($e*v(Ba)-Ba*v(an))/(M-an),ii=Oa(Ba,Tn),Si=(S-$e)/lt(ii,an,S);Br=Jr;var oi=50,Ji;do Br-=Ji=($e+lt(ii,an,Br)*Si-Jr)/(ii(Br)*Si);while(k(Ji)>i&&--oi>0);kr=Ba*v(Br),Brxt){var Br=D(Pr),kr=e(Wt,zt),jr=mt*m(kr/mt),Jr=kr-jr;zt=Br*t(Jr),Wt=Br*v(Jr);for(var la=zt-M,xa=v(zt),Ba=Wt/xa,an=zti||k(Ba)>i)&&--an>0);return[Jr,la]},Br}var lr=fr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Tr(){return b.geoProjection(lr).scale(149.995)}var Ir=fr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Dr(){return b.geoProjection(Ir).scale(153.93)}var ot=fr(5/6*S,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return b.geoProjection(ot).scale(130.945)}function jt($e,nt){var mt=$e*$e,xt=nt*nt;return[$e*(1-.162388*xt)*(.87-952426e-9*mt*mt),nt*(1+xt/12)]}jt.invert=function($e,nt){var mt=$e,xt=nt,Bt=50,zt;do{var Wt=xt*xt;xt-=zt=(xt*(1+Wt/12)-nt)/(1+Wt/4)}while(k(zt)>i&&--Bt>0);Bt=50,$e/=1-.162388*Wt;do{var Pr=(Pr=mt*mt)*Pr;mt-=zt=(mt*(.87-952426e-9*Pr)-$e)/(.87-.00476213*Pr)}while(k(zt)>i&&--Bt>0);return[mt,xt]};function ar(){return b.geoProjection(jt).scale(131.747)}var Er=fr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function xr(){return b.geoProjection(Er).scale(131.087)}function zr($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e(xt+zt*S,Bt);return Wt[0]-=zt*nt,Wt}return $e.invert&&(mt.invert=function(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e.invert(xt+zt*nt,Bt),Pr=Wt[0]-zt*S;return Pr<-S?Pr+=2*S:Pr>S&&(Pr-=2*S),Wt[0]=Pr,Wt}),mt}function Lr($e,nt){var mt=h($e),xt=h(nt),Bt=t(nt),zt=t($e)*Bt,Wt=v($e)*Bt,Pr=v(xt*nt);$e=k(e(Wt,Pr)),nt=I(zt),k($e-M)>i&&($e%=M);var Br=aa($e>S/4?M-$e:$e,nt);return $e>S/4&&(Pr=Br[0],Br[0]=-Br[1],Br[1]=-Pr),Br[0]*=mt,Br[1]*=-xt,Br}Lr.invert=function($e,nt){k($e)>1&&($e=h($e)*2-$e),k(nt)>1&&(nt=h(nt)*2-nt);var mt=h($e),xt=h(nt),Bt=-mt*$e,zt=-xt*nt,Wt=zt/Bt<1,Pr=Sa(Wt?zt:Bt,Wt?Bt:zt),Br=Pr[0],kr=Pr[1],jr=t(kr);return Wt&&(Br=-M-Br),[mt*(e(v(Br)*jr,-v(kr))+S),xt*I(t(Br)*jr)]};function aa($e,nt){if(nt===M)return[0,0];var mt=v(nt),xt=mt*mt,Bt=xt*xt,zt=1+Bt,Wt=1+3*Bt,Pr=1-Bt,Br=I(1/D(zt)),kr=Pr+xt*zt*Br,jr=(1-mt)/kr,Jr=D(jr),la=jr*zt,xa=D(la),Ba=Jr*Pr,an,Tn;if($e===0)return[0,-(Ba+xt*xa)];var ii=t(nt),Si=1/ii,oi=2*mt*ii,Ji=(-3*xt+Br*Wt)*oi,Qi=(-kr*ii-(1-mt)*Ji)/(kr*kr),Oo=.5*Qi/Jr,Qo=Pr*Oo-2*xt*Jr*oi,vo=xt*zt*Qi+jr*Wt*oi,ys=-Si*oi,ol=-Si*vo,jl=-2*Si*Qo,Hs=4*$e/S,Cu;if($e>.222*S||nt.175*S){if(an=(Ba+xt*D(la*(1+Bt)-Ba*Ba))/(1+Bt),$e>S/4)return[an,an];var hi=an,wi=.5*an;an=.5*(wi+hi),Tn=50;do{var sl=D(la-an*an),sc=an*(jl+ys*sl)+ol*I(an/xa)-Hs;if(!sc)break;sc<0?wi=an:hi=an,an=.5*(wi+hi)}while(k(hi-wi)>i&&--Tn>0)}else{an=i,Tn=25;do{var tu=an*an,Ps=D(la-tu),gc=jl+ys*Ps,pu=an*gc+ol*I(an/xa)-Hs,ll=gc+(ol-ys*tu)/Ps;an-=Cu=Ps?pu/ll:0}while(k(Cu)>i&&--Tn>0)}return[an,-Ba-xt*D(la-an*an)]}function Sa($e,nt){for(var mt=0,xt=1,Bt=.5,zt=50;;){var Wt=Bt*Bt,Pr=D(Bt),Br=I(1/D(1+Wt)),kr=1-Wt+Bt*(1+Wt)*Br,jr=(1-Pr)/kr,Jr=D(jr),la=jr*(1+Wt),xa=Jr*(1-Wt),Ba=la-$e*$e,an=D(Ba),Tn=nt+xa+Bt*an;if(k(xt-mt)0?mt=Bt:xt=Bt,Bt=.5*(mt+xt)}if(!zt)return null;var ii=I(Pr),Si=t(ii),oi=1/Si,Ji=2*Pr*Si,Qi=(-3*Bt+Br*(1+3*Wt))*Ji,Oo=(-kr*Si-(1-Pr)*Qi)/(kr*kr),Qo=.5*Oo/Jr,vo=(1-Wt)*Qo-2*Bt*Jr*Ji,ys=-2*oi*vo,ol=-oi*Ji,jl=-oi*(Bt*(1+Wt)*Oo+jr*(1+3*Wt)*Ji);return[S/4*($e*(ys+ol*an)+jl*I($e/D(la))),ii]}function wa(){return b.geoProjection(zr(Lr)).scale(239.75)}function pn($e,nt,mt){var xt,Bt,zt;return $e?(xt=tn($e,mt),nt?(Bt=tn(nt,1-mt),zt=Bt[1]*Bt[1]+mt*xt[0]*xt[0]*Bt[0]*Bt[0],[[xt[0]*Bt[2]/zt,xt[1]*xt[2]*Bt[0]*Bt[1]/zt],[xt[1]*Bt[1]/zt,-xt[0]*xt[2]*Bt[0]*Bt[2]/zt],[xt[2]*Bt[1]*Bt[2]/zt,-mt*xt[0]*xt[1]*Bt[0]/zt]]):[[xt[0],0],[xt[1],0],[xt[2],0]]):(Bt=tn(nt,1-mt),[[0,Bt[0]/Bt[1]],[1/Bt[1],0],[Bt[2]/Bt[1],0]])}function tn($e,nt){var mt,xt,Bt,zt,Wt;if(nt=1-i)return mt=(1-nt)/4,xt=P($e),zt=B($e),Bt=1/xt,Wt=xt*F($e),[zt+mt*(Wt-$e)/(xt*xt),Bt-mt*zt*Bt*(Wt-$e),Bt+mt*zt*Bt*(Wt+$e),2*l(n($e))-M+mt*(Wt-$e)/xt];var Pr=[1,0,0,0,0,0,0,0,0],Br=[D(nt),0,0,0,0,0,0,0,0],kr=0;for(xt=D(1-nt),Wt=1;k(Br[kr]/Pr[kr])>i&&kr<8;)mt=Pr[kr++],Br[kr]=(mt-xt)/2,Pr[kr]=(mt+xt)/2,xt=D(mt*xt),Wt*=2;Bt=Wt*Pr[kr]*$e;do zt=Br[kr]*v(xt=Bt)/Pr[kr],Bt=(I(zt)+Bt)/2;while(--kr);return[v(Bt),zt=t(Bt),zt/t(Bt-xt),Bt]}function ai($e,nt,mt){var xt=k($e),Bt=k(nt),zt=F(Bt);if(xt){var Wt=1/v(xt),Pr=1/(g(xt)*g(xt)),Br=-(Pr+mt*(zt*zt*Wt*Wt)-1+mt),kr=(mt-1)*Pr,jr=(-Br+D(Br*Br-4*kr))/2;return[rn(l(1/D(jr)),mt)*h($e),rn(l(D((jr/Pr-1)/mt)),1-mt)*h(nt)]}return[0,rn(l(zt),1-mt)*h(nt)]}function rn($e,nt){if(!nt)return $e;if(nt===1)return a(g($e/2+C));for(var mt=1,xt=D(1-nt),Bt=D(nt),zt=0;k(Bt)>i;zt++){if($e%S){var Wt=l(xt*g($e)/mt);Wt<0&&(Wt+=S),$e+=Wt+~~($e/S)*S}else $e+=$e;Bt=(mt+xt)/2,xt=D(mt*xt),Bt=((mt=Bt)-xt)/2}return $e/(c(2,zt)*mt)}function Ri($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=a(g(S/4+k(nt)/2)),Pr=n(zt*Wt)/D(mt),Br=Gn(Pr*t(zt*$e),Pr*v(zt*$e)),kr=ai(Br[0],Br[1],xt*xt);return[-kr[1],(nt>=0?1:-1)*(.5*Bt-kr[0])]}function Gn($e,nt){var mt=$e*$e,xt=nt+1,Bt=1-mt-nt*nt;return[.5*(($e>=0?M:-M)-e(Bt,2*$e)),-.25*a(Bt*Bt+4*mt)+.5*a(xt*xt+mt)]}function no($e,nt){var mt=nt[0]*nt[0]+nt[1]*nt[1];return[($e[0]*nt[0]+$e[1]*nt[1])/mt,($e[1]*nt[0]-$e[0]*nt[1])/mt]}Ri.invert=function($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=pn(.5*Bt-nt,-$e,xt*xt),Pr=no(Wt[0],Wt[1]),Br=e(Pr[1],Pr[0])/zt;return[Br,2*l(n(.5/zt*a(mt*Pr[0]*Pr[0]+mt*Pr[1]*Pr[1])))-M]};function Di(){return b.geoProjection(zr(Ri)).scale(151.496)}function fn($e){var nt=v($e),mt=t($e),xt=Ai($e);xt.invert=Ai(-$e);function Bt(zt,Wt){var Pr=xt(zt,Wt);zt=Pr[0],Wt=Pr[1];var Br=v(Wt),kr=t(Wt),jr=t(zt),Jr=O(nt*Br+mt*kr*jr),la=v(Jr),xa=k(la)>i?Jr/la:1;return[xa*mt*v(zt),(k(zt)>M?xa:-xa)*(nt*kr-mt*Br*jr)]}return Bt.invert=function(zt,Wt){var Pr=D(zt*zt+Wt*Wt),Br=-v(Pr),kr=t(Pr),jr=Pr*kr,Jr=-Wt*Br,la=Pr*nt,xa=D(jr*jr+Jr*Jr-la*la),Ba=e(jr*la+Jr*xa,Jr*la-jr*xa),an=(Pr>M?-1:1)*e(zt*Br,Pr*t(Ba)*kr+Wt*v(Ba)*Br);return xt.invert(an,Ba)},Bt}function Ai($e){var nt=v($e),mt=t($e);return function(xt,Bt){var zt=t(Bt),Wt=t(xt)*zt,Pr=v(xt)*zt,Br=v(Bt);return[e(Pr,Wt*mt-Br*nt),I(Br*mt+Wt*nt)]}}function jn(){var $e=0,nt=b.geoProjectionMutator(fn),mt=nt($e),xt=mt.rotate,Bt=mt.stream,zt=b.geoCircle();return mt.parallel=function(Wt){if(!arguments.length)return $e*A;var Pr=mt.rotate();return nt($e=Wt*x).rotate(Pr)},mt.rotate=function(Wt){return arguments.length?(xt.call(mt,[Wt[0],Wt[1]-$e*A]),zt.center([-Wt[0],-Wt[1]]),mt):(Wt=xt.call(mt),Wt[1]+=$e*A,Wt)},mt.stream=function(Wt){return Wt=Bt(Wt),Wt.sphere=function(){Wt.polygonStart();var Pr=.01,Br=zt.radius(90-Pr)().coordinates[0],kr=Br.length-1,jr=-1,Jr;for(Wt.lineStart();++jr=0;)Wt.point((Jr=Br[jr])[0],Jr[1]);Wt.lineEnd(),Wt.polygonEnd()},Wt},mt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Xn=3,eo=I(1-1/Xn)*A,gi=Ct(0);function qi($e){var nt=eo*x,mt=We(S,nt)[0]-We(-S,nt)[0],xt=gi(0,nt)[1],Bt=We(0,nt)[1],zt=f-Bt,Wt=u/$e,Pr=4/u,Br=xt+zt*zt*4/u;function kr(jr,Jr){var la,xa=k(Jr);if(xa>nt){var Ba=s($e-1,o(0,r((jr+S)/Wt)));jr+=S*($e-1)/$e-Ba*Wt,la=We(jr,xa),la[0]=la[0]*u/mt-u*($e-1)/(2*$e)+Ba*u/$e,la[1]=xt+(la[1]-Bt)*4*zt/u,Jr<0&&(la[1]=-la[1])}else la=gi(jr,Jr);return la[0]*=Pr,la[1]/=Br,la}return kr.invert=function(jr,Jr){jr/=Pr,Jr*=Br;var la=k(Jr);if(la>xt){var xa=s($e-1,o(0,r((jr+S)/Wt)));jr=(jr+S*($e-1)/$e-xa*Wt)*mt/u;var Ba=We.invert(jr,.25*(la-xt)*u/zt+Bt);return Ba[0]-=S*($e-1)/$e-xa*Wt,Jr<0&&(Ba[1]=-Ba[1]),Ba}return gi.invert(jr,Jr)},kr}function io($e,nt){return[$e,nt&1?90-i:eo]}function oo($e,nt){return[$e,nt&1?-90+i:-eo]}function Vn($e){return[$e[0]*(1-i),$e[1]]}function qn($e){var nt=[].concat(E.range(-180,180+$e/2,$e).map(io),E.range(180,-180-$e/2,-$e).map(oo));return{type:"Polygon",coordinates:[$e===180?nt.map(Vn):nt]}}function Hi(){var $e=4,nt=b.geoProjectionMutator(qi),mt=nt($e),xt=mt.stream;return mt.lobes=function(Bt){return arguments.length?nt($e=+Bt):$e},mt.stream=function(Bt){var zt=mt.rotate(),Wt=xt(Bt),Pr=(mt.rotate([0,0]),xt(Bt));return mt.rotate(zt),Wt.sphere=function(){b.geoStream(qn(180/$e),Pr)},Wt},mt.scale(239.75)}function Mi($e){var nt=1+$e,mt=v(1/nt),xt=I(mt),Bt=2*D(S/(zt=S+4*xt*nt)),zt,Wt=.5*Bt*(nt+D($e*(2+$e))),Pr=$e*$e,Br=nt*nt;function kr(jr,Jr){var la=1-v(Jr),xa,Ba;if(la&&la<2){var an=M-Jr,Tn=25,ii;do{var Si=v(an),oi=t(an),Ji=xt+e(Si,nt-oi),Qi=1+Br-2*nt*oi;an-=ii=(an-Pr*xt-nt*Si+Qi*Ji-.5*la*zt)/(2*nt*Si*Ji)}while(k(ii)>w&&--Tn>0);xa=Bt*D(Qi),Ba=jr*Ji/S}else xa=Bt*($e+la),Ba=jr*xt/S;return[xa*v(Ba),Wt-xa*t(Ba)]}return kr.invert=function(jr,Jr){var la=jr*jr+(Jr-=Wt)*Jr,xa=(1+Br-la/(Bt*Bt))/(2*nt),Ba=O(xa),an=v(Ba),Tn=xt+e(an,nt-xa);return[I(jr/D(la))*S/Tn,I(1-2*(Ba-Pr*xt-nt*an+(1+Br-2*nt*xa)*Tn)/zt)]},kr}function Ro(){var $e=1,nt=b.geoProjectionMutator(Mi),mt=nt($e);return mt.ratio=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(167.774).center([0,18.67])}var go=.7109889596207567,Eo=.0528035274542;function Ao($e,nt){return nt>-go?($e=_e($e,nt),$e[1]+=Eo,$e):Ye($e,nt)}Ao.invert=function($e,nt){return nt>-go?_e.invert($e,nt-Eo):Ye.invert($e,nt)};function ds(){return b.geoProjection(Ao).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function jo($e,nt){return k(nt)>go?($e=_e($e,nt),$e[1]-=nt>0?Eo:-Eo,$e):Ye($e,nt)}jo.invert=function($e,nt){return k(nt)>go?_e.invert($e,nt+(nt>0?Eo:-Eo)):Ye.invert($e,nt)};function Wo(){return b.geoProjection(jo).scale(152.63)}function to($e,nt,mt,xt){var Bt=D(4*S/(2*mt+(1+$e-nt/2)*v(2*mt)+($e+nt)/2*v(4*mt)+nt/2*v(6*mt))),zt=D(xt*v(mt)*D((1+$e*t(2*mt)+nt*t(4*mt))/(1+$e+nt))),Wt=mt*Br(1);function Pr(Jr){return D(1+$e*t(2*Jr)+nt*t(4*Jr))}function Br(Jr){var la=Jr*mt;return(2*la+(1+$e-nt/2)*v(2*la)+($e+nt)/2*v(4*la)+nt/2*v(6*la))/mt}function kr(Jr){return Pr(Jr)*v(Jr)}var jr=function(Jr,la){var xa=mt*Me(Br,Wt*v(la)/mt,la/S);isNaN(xa)&&(xa=mt*h(la));var Ba=Bt*Pr(xa);return[Ba*zt*Jr/S*t(xa),Ba/zt*v(xa)]};return jr.invert=function(Jr,la){var xa=Me(kr,la*zt/Bt);return[Jr*S/(t(xa)*Bt*zt*Pr(xa)),I(mt*Br(xa/mt)/Wt)]},mt===0&&(Bt=D(xt/S),jr=function(Jr,la){return[Jr*Bt,v(la)/Bt]},jr.invert=function(Jr,la){return[Jr/Bt,I(la*Bt)]}),jr}function wo(){var $e=1,nt=0,mt=45*x,xt=2,Bt=b.geoProjectionMutator(to),zt=Bt($e,nt,mt,xt);return zt.a=function(Wt){return arguments.length?Bt($e=+Wt,nt,mt,xt):$e},zt.b=function(Wt){return arguments.length?Bt($e,nt=+Wt,mt,xt):nt},zt.psiMax=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt*x,xt):mt*A},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(180.739)}function pi($e,nt,mt,xt,Bt,zt,Wt,Pr,Br,kr,jr){if(jr.nanEncountered)return NaN;var Jr,la,xa,Ba,an,Tn,ii,Si,oi,Ji;if(Jr=mt-nt,la=$e(nt+Jr*.25),xa=$e(mt-Jr*.25),isNaN(la)){jr.nanEncountered=!0;return}if(isNaN(xa)){jr.nanEncountered=!0;return}return Ba=Jr*(xt+4*la+Bt)/12,an=Jr*(Bt+4*xa+zt)/12,Tn=Ba+an,Ji=(Tn-Wt)/15,kr>Br?(jr.maxDepthCount++,Tn+Ji):Math.abs(Ji)>1;do Br[Tn]>xa?an=Tn:Ba=Tn,Tn=Ba+an>>1;while(Tn>Ba);var ii=Br[Tn+1]-Br[Tn];return ii&&(ii=(xa-Br[Tn+1])/ii),(Tn+1+ii)/Wt}var Jr=2*jr(1)/S*zt/mt,la=function(xa,Ba){var an=jr(k(v(Ba))),Tn=xt(an)*xa;return an/=Jr,[Tn,Ba>=0?an:-an]};return la.invert=function(xa,Ba){var an;return Ba*=Jr,k(Ba)<1&&(an=h(Ba)*I(Bt(k(Ba))*zt)),[xa/xt(k(Ba)),an]},la}function Xi(){var $e=0,nt=2.5,mt=1.183136,xt=b.geoProjectionMutator(Io),Bt=xt($e,nt,mt);return Bt.alpha=function(zt){return arguments.length?xt($e=+zt,nt,mt):$e},Bt.k=function(zt){return arguments.length?xt($e,nt=+zt,mt):nt},Bt.gamma=function(zt){return arguments.length?xt($e,nt,mt=+zt):mt},Bt.scale(152.63)}function Ko($e,nt){return k($e[0]-nt[0])=0;--Br)mt=$e[1][Br],xt=mt[0][0],Bt=mt[0][1],zt=mt[1][1],Wt=mt[2][0],Pr=mt[2][1],nt.push(Uo([[Wt-i,Pr-i],[Wt-i,zt+i],[xt+i,zt+i],[xt+i,Bt-i]],30));return{type:"Polygon",coordinates:[E.merge(nt)]}}function Ss($e,nt,mt){var xt,Bt;function zt(Br,kr){for(var jr=kr<0?-1:1,Jr=nt[+(kr<0)],la=0,xa=Jr.length-1;laJr[la][2][0];++la);var Ba=$e(Br-Jr[la][1][0],kr);return Ba[0]+=$e(Jr[la][1][0],jr*kr>jr*Jr[la][0][1]?Jr[la][0][1]:kr)[0],Ba}mt?zt.invert=mt(zt):$e.invert&&(zt.invert=function(Br,kr){for(var jr=Bt[+(kr<0)],Jr=nt[+(kr<0)],la=0,xa=jr.length;laBa&&(an=xa,xa=Ba,Ba=an),[[Jr,xa],[la,Ba]]})}),Wt):nt.map(function(kr){return kr.map(function(jr){return[[jr[0][0]*A,jr[0][1]*A],[jr[1][0]*A,jr[1][1]*A],[jr[2][0]*A,jr[2][1]*A]]})})},nt!=null&&Wt.lobes(nt),Wt}var Vo=[[[[-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 Vs(){return Ss(Ae,Vo).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 Bo(){return Ss(jo,Ts).scale(152.63)}var _o=[[[[-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 Pi(){return Ss(_e,_o).scale(169.529)}var yo=[[[[-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 bs(){return Ss(_e,yo).scale(169.529).rotate([20,0])}var Dl=[[[[-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 hl(){return Ss(Ao,Dl,Se).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ps=[[[[-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 dl(){return Ss(Ye,ps).scale(152.63).rotate([-20,0])}function wu($e,nt){return[3/u*$e*D(S*S/3-nt*nt),nt]}wu.invert=function($e,nt){return[u/3*$e/D(S*S/3-nt*nt),nt]};function lu(){return b.geoProjection(wu).scale(158.837)}function xc($e){function nt(mt,xt){if(k(k(xt)-M)2)return null;mt/=2,xt/=2;var zt=mt*mt,Wt=xt*xt,Pr=2*xt/(1+zt+Wt);return Pr=c((1+Pr)/(1-Pr),1/$e),[e(2*mt,1-zt-Wt)/$e,I((Pr-1)/(Pr+1))]},nt}function Fl(){var $e=.5,nt=b.geoProjectionMutator(xc),mt=nt($e);return mt.spacing=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(124.75)}var pl=S/T;function $u($e,nt){return[$e*(1+D(t(nt)))/2,nt/(t(nt/2)*t($e/6))]}$u.invert=function($e,nt){var mt=k($e),xt=k(nt),Bt=i,zt=M;xti||k(Tn)>i)&&--Bt>0);return Bt&&[mt,xt]};function vs(){return b.geoProjection(tl).scale(139.98)}function os($e,nt){return[v($e)/t(nt),g(nt)*t($e)]}os.invert=function($e,nt){var mt=$e*$e,xt=nt*nt,Bt=xt+1,zt=mt+Bt,Wt=$e?_*D((zt-D(zt*zt-4*mt))/mt):1/D(Bt);return[I($e*Wt),h(nt)*O(Wt)]};function ms(){return b.geoProjection(os).scale(144.049).clipAngle(90-.001)}function rl($e){var nt=t($e),mt=g(C+$e/2);function xt(Bt,zt){var Wt=zt-$e,Pr=k(Wt)=0;)jr=$e[kr],Jr=jr[0]+Pr*(xa=Jr)-Br*la,la=jr[1]+Pr*la+Br*xa;return Jr=Pr*(xa=Jr)-Br*la,la=Pr*la+Br*xa,[Jr,la]}return mt.invert=function(xt,Bt){var zt=20,Wt=xt,Pr=Bt;do{for(var Br=nt,kr=$e[Br],jr=kr[0],Jr=kr[1],la=0,xa=0,Ba;--Br>=0;)kr=$e[Br],la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=kr[0]+Wt*(Ba=jr)-Pr*Jr,Jr=kr[1]+Wt*Jr+Pr*Ba;la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=Wt*(Ba=jr)-Pr*Jr-xt,Jr=Wt*Jr+Pr*Ba-Bt;var an=la*la+xa*xa,Tn,ii;Wt-=Tn=(jr*la+Jr*xa)/an,Pr-=ii=(Jr*la-jr*xa)/an}while(k(Tn)+k(ii)>i*i&&--zt>0);if(zt){var Si=D(Wt*Wt+Pr*Pr),oi=2*l(Si*.5),Ji=v(oi);return[e(Wt*Ji,Si*t(oi)),Si?I(Pr*Ji/Si):0]}},mt}var Lh=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],rh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ju=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ss=[[.9245,0],[0,0],[.01943,0]],ah=[[.721316,0],[0,0],[-.00881625,-.00617325]];function wc(){return Ou(Lh,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function pc(){return Ou(rh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Nf(){return Ou(Ju,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Bu(){return Ou(ss,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Tc(){return Ou(ah,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ou($e,nt){var mt=b.geoProjection(bc($e)).rotate(nt).clipAngle(90),xt=b.geoRotation(nt),Bt=mt.center;return delete mt.rotate,mt.center=function(zt){return arguments.length?Bt(xt(zt)):xt.invert(Bt())},mt}var Gc=D(6),pf=D(7);function $l($e,nt){var mt=I(7*v(nt)/(3*Gc));return[Gc*$e*(2*t(2*mt/3)-1)/pf,9*v(mt/3)/pf]}$l.invert=function($e,nt){var mt=3*I(nt*pf/9);return[$e*pf/(Gc*(2*t(2*mt/3)-1)),I(v(mt)*3*Gc/7)]};function jf(){return b.geoProjection($l).scale(164.859)}function Hc($e,nt){for(var mt=(1+_)*v(nt),xt=nt,Bt=0,zt;Bt<25&&(xt-=zt=(v(xt/2)+v(xt)-mt)/(.5*t(xt/2)+t(xt)),!(k(zt)w&&--xt>0);return zt=mt*mt,Wt=zt*zt,Pr=zt*Wt,[$e/(.84719-.13063*zt+Pr*Pr*(-.04515+.05494*zt-.02326*Wt+.00331*Pr)),mt]};function Uf(){return b.geoProjection(Nu).scale(175.295)}function al($e,nt){return[$e*(1+t(nt))/2,2*(nt-g(nt/2))]}al.invert=function($e,nt){for(var mt=nt/2,xt=0,Bt=1/0;xt<10&&k(Bt)>i;++xt){var zt=t(nt/2);nt-=Bt=(nt-g(nt/2)-mt)/(1-.5/(zt*zt))}return[2*$e/(1+t(nt)),nt]};function Xc(){return b.geoProjection(al).scale(152.63)}var ju=[[[[-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 Ac(){return Ss(he(1/0),ju).rotate([20,0]).scale(152.63)}function Zc($e,nt){var mt=v(nt),xt=t(nt),Bt=h($e);if($e===0||k(nt)===M)return[0,nt];if(nt===0)return[$e,0];if(k($e)===M)return[$e*xt,M*mt];var zt=S/(2*$e)-2*$e/S,Wt=2*nt/S,Pr=(1-Wt*Wt)/(mt-Wt),Br=zt*zt,kr=Pr*Pr,jr=1+Br/kr,Jr=1+kr/Br,la=(zt*mt/Pr-zt/2)/jr,xa=(kr*mt/Br+Pr/2)/Jr,Ba=la*la+xt*xt/jr,an=xa*xa-(kr*mt*mt/Br+Pr*mt-1)/Jr;return[M*(la+D(Ba)*Bt),M*(xa+D(an<0?0:an)*h(-nt*zt)*Bt)]}Zc.invert=function($e,nt){$e/=M,nt/=M;var mt=$e*$e,xt=nt*nt,Bt=mt+xt,zt=S*S;return[$e?(Bt-1+D((1-Bt)*(1-Bt)+4*mt))/(2*$e)*M:0,Me(function(Wt){return Bt*(S*v(Wt)-2*Wt)*S+4*Wt*Wt*(nt-v(Wt))+2*S*Wt-zt*nt},0)]};function ec(){return b.geoProjection(Zc).scale(127.267)}var cu=1.0148,tc=.23185,vf=-.14499,Tu=.02406,nh=cu,vl=5*tc,ml=7*vf,rc=9*Tu,yl=1.790857183;function qf($e,nt){var mt=nt*nt;return[$e,nt*(cu+mt*mt*(tc+mt*(vf+Tu*mt)))]}qf.invert=function($e,nt){nt>yl?nt=yl:nt<-yl&&(nt=-yl);var mt=nt,xt;do{var Bt=mt*mt;mt-=xt=(mt*(cu+Bt*Bt*(tc+Bt*(vf+Tu*Bt)))-nt)/(nh+Bt*Bt*(vl+Bt*(ml+rc*Bt)))}while(k(xt)>i);return[$e,mt]};function ac(){return b.geoProjection(qf).scale(139.319)}function Mc($e,nt){if(k(nt)i&&--Bt>0);return Wt=g(xt),[(k(nt)=0;)if(xt=nt[Pr],mt[0]===xt[0]&&mt[1]===xt[1]){if(zt)return[zt,mt];zt=mt}}}function gf($e){for(var nt=$e.length,mt=[],xt=$e[nt-1],Bt=0;Bt0?[-xt[0],0]:[180-xt[0],180])};var nt=hu.map(function(mt){return{face:mt,project:$e(mt)}});return[-1,0,0,1,0,1,4,5].forEach(function(mt,xt){var Bt=nt[mt];Bt&&(Bt.children||(Bt.children=[])).push(nt[xt])}),Au(nt[0],function(mt,xt){return nt[mt<-S/2?xt<0?6:4:mt<0?xt<0?2:0:mtxt^xa>xt&&mt<(la-kr)*(xt-jr)/(xa-jr)+kr&&(Bt=!Bt)}return Bt}function Vf($e,nt){var mt=nt.stream,xt;if(!mt)throw new Error("invalid projection");switch($e&&$e.type){case"Feature":xt=Gf;break;case"FeatureCollection":xt=xf;break;default:xt=Hf;break}return xt($e,mt)}function xf($e,nt){return{type:"FeatureCollection",features:$e.features.map(function(mt){return Gf(mt,nt)})}}function Gf($e,nt){return{type:"Feature",id:$e.id,properties:$e.properties,geometry:Hf($e.geometry,nt)}}function bh($e,nt){return{type:"GeometryCollection",geometries:$e.geometries.map(function(mt){return Hf(mt,nt)})}}function Hf($e,nt){if(!$e)return null;if($e.type==="GeometryCollection")return bh($e,nt);var mt;switch($e.type){case"Point":mt=kc;break;case"MultiPoint":mt=kc;break;case"LineString":mt=Cc;break;case"MultiLineString":mt=Cc;break;case"Polygon":mt=Lc;break;case"MultiPolygon":mt=Lc;break;case"Sphere":mt=Lc;break;default:return null}return b.geoStream($e,nt(mt)),mt.result()}var il=[],kl=[],kc={point:function($e,nt){il.push([$e,nt])},result:function(){var $e=il.length?il.length<2?{type:"Point",coordinates:il[0]}:{type:"MultiPoint",coordinates:il}:null;return il=[],$e}},Cc={lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){il.length&&(kl.push(il),il=[])},result:function(){var $e=kl.length?kl.length<2?{type:"LineString",coordinates:kl[0]}:{type:"MultiLineString",coordinates:kl}:null;return kl=[],$e}},Lc={polygonStart:xo,lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){var $e=il.length;if($e){do il.push(il[0].slice());while(++$e<4);kl.push(il),il=[]}},polygonEnd:xo,result:function(){if(!kl.length)return null;var $e=[],nt=[];return kl.forEach(function(mt){Ec(mt)?$e.push([mt]):nt.push(mt)}),nt.forEach(function(mt){var xt=mt[0];$e.some(function(Bt){if(xh(Bt[0],xt))return Bt.push(mt),!0})||$e.push([mt])}),kl=[],$e.length?$e.length>1?{type:"MultiPolygon",coordinates:$e}:{type:"Polygon",coordinates:$e[0]}:null}};function vc($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=k(xt)0?xt-S:xt+S,Bt),Pr=(Wt[0]-Wt[1])*_,Br=(Wt[0]+Wt[1])*_;if(zt)return[Pr,Br];var kr=nt*_,jr=Pr>0^Br>0?-1:1;return[jr*Pr-h(Br)*kr,jr*Br-h(Pr)*kr]}return $e.invert&&(mt.invert=function(xt,Bt){var zt=(xt+Bt)*_,Wt=(Bt-xt)*_,Pr=k(zt)<.5*nt&&k(Wt)<.5*nt;if(!Pr){var Br=nt*_,kr=zt>0^Wt>0?-1:1,jr=-kr*xt+(Wt>0?1:-1)*Br,Jr=-kr*Bt+(zt>0?1:-1)*Br;zt=(-jr-Jr)*_,Wt=(jr-Jr)*_}var la=$e.invert(zt,Wt);return Pr||(la[0]+=zt>0?S:-S),la}),b.geoProjection(mt).rotate([-90,-90,45]).clipAngle(180-.001)}function Ft(){return vc(Lr).scale(176.423)}function tr(){return vc(Ri).scale(111.48)}function Fr($e,nt){if(!(0<=(nt=+nt)&&nt<=20))throw new Error("invalid digits");function mt(kr){var jr=kr.length,Jr=2,la=new Array(jr);for(la[0]=+kr[0].toFixed(nt),la[1]=+kr[1].toFixed(nt);Jr2||xa[0]!=jr[0]||xa[1]!=jr[1])&&(Jr.push(xa),jr=xa)}return Jr.length===1&&kr.length>1&&Jr.push(mt(kr[kr.length-1])),Jr}function zt(kr){return kr.map(Bt)}function Wt(kr){if(kr==null)return kr;var jr;switch(kr.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:kr.geometries.map(Wt)};break;case"Point":jr={type:"Point",coordinates:mt(kr.coordinates)};break;case"MultiPoint":jr={type:kr.type,coordinates:xt(kr.coordinates)};break;case"LineString":jr={type:kr.type,coordinates:Bt(kr.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:kr.type,coordinates:zt(kr.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:kr.coordinates.map(zt)};break;default:return kr}return kr.bbox!=null&&(jr.bbox=kr.bbox),jr}function Pr(kr){var jr={type:"Feature",properties:kr.properties,geometry:Wt(kr.geometry)};return kr.id!=null&&(jr.id=kr.id),kr.bbox!=null&&(jr.bbox=kr.bbox),jr}if($e!=null)switch($e.type){case"Feature":return Pr($e);case"FeatureCollection":{var Br={type:"FeatureCollection",features:$e.features.map(Pr)};return $e.bbox!=null&&(Br.bbox=$e.bbox),Br}default:return Wt($e)}return $e}function wr($e){var nt=v($e);function mt(xt,Bt){var zt=nt?g(xt*nt/2)/nt:xt/2;if(!Bt)return[2*zt,-$e];var Wt=2*l(zt*v(Bt)),Pr=1/g(Bt);return[v(Wt)*Pr,Bt+(1-t(Wt))*Pr-$e]}return mt.invert=function(xt,Bt){if(k(Bt+=$e)i&&--Pr>0);var la=xt*(kr=g(Wt)),xa=g(k(Bt)0?M:-M)*(Br+Bt*(jr-Wt)/2+Bt*Bt*(jr-2*Br+Wt)/2)]}Ia.invert=function($e,nt){var mt=nt/M,xt=mt*90,Bt=s(18,k(xt/5)),zt=o(0,r(Bt));do{var Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],kr=Br-Wt,jr=Br-2*Pr+Wt,Jr=2*(k(mt)-Pr)/kr,la=jr/kr,xa=Jr*(1-la*Jr*(1-2*la*Jr));if(xa>=0||zt===1){xt=(nt>=0?5:-5)*(xa+Bt);var Ba=50,an;do Bt=s(18,k(xt)/5),zt=r(Bt),xa=Bt-zt,Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],xt-=(an=(nt>=0?M:-M)*(Pr+xa*(Br-Wt)/2+xa*xa*(Br-2*Pr+Wt)/2)-nt)*A;while(k(an)>w&&--Ba>0);break}}while(--zt>=0);var Tn=ba[zt][0],ii=ba[zt+1][0],Si=ba[s(19,zt+2)][0];return[$e/(ii+xa*(Si-Tn)/2+xa*xa*(Si-2*ii+Tn)/2),xt*x]};function Na(){return b.geoProjection(Ia).scale(152.63)}function Za($e){function nt(mt,xt){var Bt=t(xt),zt=($e-1)/($e-Bt*t(mt));return[zt*Bt*v(mt),zt*v(xt)]}return nt.invert=function(mt,xt){var Bt=mt*mt+xt*xt,zt=D(Bt),Wt=($e-D(1-Bt*($e+1)/($e-1)))/(($e-1)/zt+zt/($e-1));return[e(mt*Wt,zt*D(1-Wt*Wt)),zt?I(xt*Wt/zt):0]},nt}function mn($e,nt){var mt=Za($e);if(!nt)return mt;var xt=t(nt),Bt=v(nt);function zt(Wt,Pr){var Br=mt(Wt,Pr),kr=Br[1],jr=kr*Bt/($e-1)+xt;return[Br[0]*xt/jr,kr/jr]}return zt.invert=function(Wt,Pr){var Br=($e-1)/($e-1-Pr*Bt);return mt.invert(Br*Wt,Br*Pr*xt)},zt}function Da(){var $e=2,nt=0,mt=b.geoProjectionMutator(mn),xt=mt($e,nt);return xt.distance=function(Bt){return arguments.length?mt($e=+Bt,nt):$e},xt.tilt=function(Bt){return arguments.length?mt($e,nt=Bt*x):nt*A},xt.scale(432.147).clipAngle(O(1/$e)*A-1e-6)}var Ha=1e-4,$a=1e4,vn=-180,En=vn+Ha,yi=180,_i=yi-Ha,ki=-90,ri=ki+Ha,kn=90,Ln=kn-Ha;function Ni($e){return $e.length>0}function Zi($e){return Math.floor($e*$a)/$a}function Co($e){return $e===ki||$e===kn?[0,$e]:[vn,Zi($e)]}function Do($e){var nt=$e[0],mt=$e[1],xt=!1;return nt<=En?(nt=vn,xt=!0):nt>=_i&&(nt=yi,xt=!0),mt<=ri?(mt=ki,xt=!0):mt>=Ln&&(mt=kn,xt=!0),xt?[nt,mt]:$e}function Fo($e){return $e.map(Do)}function Yo($e,nt,mt){for(var xt=0,Bt=$e.length;xt=_i||jr<=ri||jr>=Ln){zt[Wt]=Do(Br);for(var Jr=Wt+1;JrEn&&xa<_i&&Ba>ri&&Ba=Pr)break;mt.push({index:-1,polygon:nt,ring:zt=zt.slice(Jr-1)}),zt[0]=Co(zt[0][1]),Wt=-1,Pr=zt.length}}}}function bo($e){var nt,mt=$e.length,xt={},Bt={},zt,Wt,Pr,Br,kr;for(nt=0;nt0?S-Pr:Pr)*A],kr=b.geoProjection($e(Wt)).rotate(Br),jr=b.geoRotation(Br),Jr=kr.center;return delete kr.rotate,kr.center=function(la){return arguments.length?Jr(jr(la)):jr.invert(Jr())},kr.clipAngle(90)}function js($e){var nt=t($e);function mt(xt,Bt){var zt=b.geoGnomonicRaw(xt,Bt);return zt[0]*=nt,zt}return mt.invert=function(xt,Bt){return b.geoGnomonicRaw.invert(xt/nt,Bt)},mt}function Cl(){return zl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function zl($e,nt){return gs(js,$e,nt)}function Kl($e){if(!($e*=2))return b.geoAzimuthalEquidistantRaw;var nt=-$e/2,mt=-nt,xt=$e*$e,Bt=g(mt),zt=.5/v(mt);function Wt(Pr,Br){var kr=O(t(Br)*t(Pr-nt)),jr=O(t(Br)*t(Pr-mt)),Jr=Br<0?-1:1;return kr*=kr,jr*=jr,[(kr-jr)/(2*$e),Jr*D(4*xt*jr-(xt-kr+jr)*(xt-kr+jr))/(2*$e)]}return Wt.invert=function(Pr,Br){var kr=Br*Br,jr=t(D(kr+(la=Pr+nt)*la)),Jr=t(D(kr+(la=Pr+mt)*la)),la,xa;return[e(xa=jr-Jr,la=(jr+Jr)*Bt),(Br<0?-1:1)*O(D(la*la+xa*xa)*zt)]},Wt}function Gu(){return xl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function xl($e,nt){return gs(Kl,$e,nt)}function Hu($e,nt){if(k(nt)i&&--Pr>0);return[h($e)*(D(Bt*Bt+4)+Bt)*S/4,M*Wt]};function Ql(){return b.geoProjection(Jl).scale(127.16)}function Eu($e,nt,mt,xt,Bt){function zt(Wt,Pr){var Br=mt*v(xt*Pr),kr=D(1-Br*Br),jr=D(2/(1+kr*t(Wt*=Bt)));return[$e*kr*jr*v(Wt),nt*Br*jr]}return zt.invert=function(Wt,Pr){var Br=Wt/$e,kr=Pr/nt,jr=D(Br*Br+kr*kr),Jr=2*I(jr/2);return[e(Wt*g(Jr),$e*jr)/Bt,jr&&I(Pr*v(Jr)/(nt*mt*jr))/xt]},zt}function bf($e,nt,mt,xt){var Bt=S/3;$e=o($e,i),nt=o(nt,i),$e=s($e,M),nt=s(nt,S-i),mt=o(mt,0),mt=s(mt,100-i),xt=o(xt,i);var zt=mt/100+1,Wt=xt/100,Pr=O(zt*t(Bt))/Bt,Br=v($e)/v(Pr*M),kr=nt/S,jr=D(Wt*v($e/2)/v(nt/2)),Jr=jr/D(kr*Br*Pr),la=1/(jr*D(kr*Br*Pr));return Eu(Jr,la,Br,Pr,kr)}function lh(){var $e=65*x,nt=60*x,mt=20,xt=200,Bt=b.geoProjectionMutator(bf),zt=Bt($e,nt,mt,xt);return zt.poleline=function(Wt){return arguments.length?Bt($e=+Wt*x,nt,mt,xt):$e*A},zt.parallels=function(Wt){return arguments.length?Bt($e,nt=+Wt*x,mt,xt):nt*A},zt.inflation=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt,xt):mt},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(163.775)}function Pc(){return lh().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Ks=4*S+3*D(3),Bl=2*D(2*S*D(3)/Ks),Wu=ke(Bl*D(3)/S,Bl,Ks/6);function wf(){return b.geoProjection(Wu).scale(176.84)}function Qc($e,nt){return[$e*D(1-3*nt*nt/(S*S)),nt]}Qc.invert=function($e,nt){return[$e/D(1-3*nt*nt/(S*S)),nt]};function ku(){return b.geoProjection(Qc).scale(152.63)}function Ol($e,nt){var mt=t(nt),xt=t($e)*mt,Bt=1-xt,zt=t($e=e(v($e)*mt,-v(nt))),Wt=v($e);return mt=D(1-xt*xt),[Wt*mt-zt*Bt,-zt*mt-Wt*Bt]}Ol.invert=function($e,nt){var mt=($e*$e+nt*nt)/-2,xt=D(-mt*(2+mt)),Bt=nt*mt+$e*xt,zt=$e*mt-nt*xt,Wt=D(zt*zt+Bt*Bt);return[e(xt*Bt,Wt*(1+mt)),Wt?-I(xt*zt/Wt):0]};function Nl(){return b.geoProjection(Ol).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function fi($e,nt){var mt=re($e,nt);return[(mt[0]+$e/M)/2,(mt[1]+nt)/2]}fi.invert=function($e,nt){var mt=$e,xt=nt,Bt=25;do{var zt=t(xt),Wt=v(xt),Pr=v(2*xt),Br=Wt*Wt,kr=zt*zt,jr=v(mt),Jr=t(mt/2),la=v(mt/2),xa=la*la,Ba=1-kr*Jr*Jr,an=Ba?O(zt*Jr)*D(Tn=1/Ba):Tn=0,Tn,ii=.5*(2*an*zt*la+mt/M)-$e,Si=.5*(an*Wt+xt)-nt,oi=.5*Tn*(kr*xa+an*zt*Jr*Br)+.5/M,Ji=Tn*(jr*Pr/4-an*Wt*la),Qi=.125*Tn*(Pr*la-an*Wt*kr*jr),Oo=.5*Tn*(Br*Jr+an*xa*zt)+.5,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]};function eu(){return b.geoProjection(fi).scale(158.837)}p.geoNaturalEarth=b.geoNaturalEarth1,p.geoNaturalEarthRaw=b.geoNaturalEarth1Raw,p.geoAiry=Q,p.geoAiryRaw=$,p.geoAitoff=ne,p.geoAitoffRaw=re,p.geoArmadillo=G,p.geoArmadilloRaw=se,p.geoAugust=K,p.geoAugustRaw=X,p.geoBaker=Z,p.geoBakerRaw=q,p.geoBerghaus=ae,p.geoBerghausRaw=ee,p.geoBertin1953=Ve,p.geoBertin1953Raw=Ie,p.geoBoggs=Be,p.geoBoggsRaw=Ae,p.geoBonne=Tt,p.geoBonneRaw=gt,p.geoBottomley=$t,p.geoBottomleyRaw=At,p.geoBromley=_r,p.geoBromleyRaw=rr,p.geoChamberlin=Ne,p.geoChamberlinRaw=vt,p.geoChamberlinAfrica=De,p.geoCollignon=Ke,p.geoCollignonRaw=We,p.geoCraig=et,p.geoCraigRaw=Je,p.geoCraster=Pt,p.geoCrasterRaw=pt,p.geoCylindricalEqualArea=qt,p.geoCylindricalEqualAreaRaw=Ct,p.geoCylindricalStereographic=Ht,p.geoCylindricalStereographicRaw=Vt,p.geoEckert1=Kr,p.geoEckert1Raw=Sr,p.geoEckert2=Rt,p.geoEckert2Raw=Yt,p.geoEckert3=ur,p.geoEckert3Raw=nr,p.geoEckert4=Rr,p.geoEckert4Raw=cr,p.geoEckert5=Zr,p.geoEckert5Raw=Qr,p.geoEckert6=Pa,p.geoEckert6Raw=ha,p.geoEisenlohr=Xa,p.geoEisenlohrRaw=un,p.geoFahey=yn,p.geoFaheyRaw=Nn,p.geoFoucaut=li,p.geoFoucautRaw=Un,p.geoFoucautSinusoidal=on,p.geoFoucautSinusoidalRaw=Yn,p.geoGilbert=Yi,p.geoGingery=rt,p.geoGingeryRaw=Ja,p.geoGinzburg4=Tr,p.geoGinzburg4Raw=lr,p.geoGinzburg5=Dr,p.geoGinzburg5Raw=Ir,p.geoGinzburg6=kt,p.geoGinzburg6Raw=ot,p.geoGinzburg8=ar,p.geoGinzburg8Raw=jt,p.geoGinzburg9=xr,p.geoGinzburg9Raw=Er,p.geoGringorten=wa,p.geoGringortenRaw=Lr,p.geoGuyou=Di,p.geoGuyouRaw=Ri,p.geoHammer=we,p.geoHammerRaw=he,p.geoHammerRetroazimuthal=jn,p.geoHammerRetroazimuthalRaw=fn,p.geoHealpix=Hi,p.geoHealpixRaw=qi,p.geoHill=Ro,p.geoHillRaw=Mi,p.geoHomolosine=Wo,p.geoHomolosineRaw=jo,p.geoHufnagel=wo,p.geoHufnagelRaw=to,p.geoHyperelliptical=Xi,p.geoHyperellipticalRaw=Io,p.geoInterrupt=Ss,p.geoInterruptedBoggs=Vs,p.geoInterruptedHomolosine=Bo,p.geoInterruptedMollweide=Pi,p.geoInterruptedMollweideHemispheres=bs,p.geoInterruptedSinuMollweide=hl,p.geoInterruptedSinusoidal=dl,p.geoKavrayskiy7=lu,p.geoKavrayskiy7Raw=wu,p.geoLagrange=Fl,p.geoLagrangeRaw=xc,p.geoLarrivee=uu,p.geoLarriveeRaw=$u,p.geoLaskowski=vs,p.geoLaskowskiRaw=tl,p.geoLittrow=ms,p.geoLittrowRaw=os,p.geoLoximuthal=Fu,p.geoLoximuthalRaw=rl,p.geoMiller=Ku,p.geoMillerRaw=zu,p.geoModifiedStereographic=Ou,p.geoModifiedStereographicRaw=bc,p.geoModifiedStereographicAlaska=wc,p.geoModifiedStereographicGs48=pc,p.geoModifiedStereographicGs50=Nf,p.geoModifiedStereographicMiller=Bu,p.geoModifiedStereographicLee=Tc,p.geoMollweide=ce,p.geoMollweideRaw=_e,p.geoMtFlatPolarParabolic=jf,p.geoMtFlatPolarParabolicRaw=$l,p.geoMtFlatPolarQuartic=Wc,p.geoMtFlatPolarQuarticRaw=Hc,p.geoMtFlatPolarSinusoidal=Yc,p.geoMtFlatPolarSinusoidalRaw=Qu,p.geoNaturalEarth2=Uf,p.geoNaturalEarth2Raw=Nu,p.geoNellHammer=Xc,p.geoNellHammerRaw=al,p.geoInterruptedQuarticAuthalic=Ac,p.geoNicolosi=ec,p.geoNicolosiRaw=Zc,p.geoPatterson=ac,p.geoPattersonRaw=qf,p.geoPolyconic=mf,p.geoPolyconicRaw=Mc,p.geoPolyhedral=Au,p.geoPolyhedralButterfly=Uu,p.geoPolyhedralCollignon=yf,p.geoPolyhedralWaterman=_f,p.geoProject=Vf,p.geoGringortenQuincuncial=Ft,p.geoPeirceQuincuncial=tr,p.geoPierceQuincuncial=tr,p.geoQuantize=Fr,p.geoQuincuncial=vc,p.geoRectangularPolyconic=ea,p.geoRectangularPolyconicRaw=wr,p.geoRobinson=Na,p.geoRobinsonRaw=Ia,p.geoSatellite=Da,p.geoSatelliteRaw=mn,p.geoSinuMollweide=ds,p.geoSinuMollweideRaw=Ao,p.geoSinusoidal=yt,p.geoSinusoidalRaw=Ye,p.geoStitch=ns,p.geoTimes=zo,p.geoTimesRaw=Kn,p.geoTwoPointAzimuthal=zl,p.geoTwoPointAzimuthalRaw=js,p.geoTwoPointAzimuthalUsa=Cl,p.geoTwoPointEquidistant=xl,p.geoTwoPointEquidistantRaw=Kl,p.geoTwoPointEquidistantUsa=Gu,p.geoVanDerGrinten=Su,p.geoVanDerGrintenRaw=Hu,p.geoVanDerGrinten2=Jc,p.geoVanDerGrinten2Raw=mc,p.geoVanDerGrinten3=du,p.geoVanDerGrinten3Raw=oc,p.geoVanDerGrinten4=Ql,p.geoVanDerGrinten4Raw=Jl,p.geoWagner=lh,p.geoWagner7=Pc,p.geoWagnerRaw=bf,p.geoWagner4=wf,p.geoWagner4Raw=Wu,p.geoWagner6=ku,p.geoWagner6Raw=Qc,p.geoWiechel=Nl,p.geoWiechelRaw=Ol,p.geoWinkel3=eu,p.geoWinkel3Raw=fi,Object.defineProperty(p,"__esModule",{value:!0})})}}),Sj=ze({"src/plots/geo/zoom.js"(J,V){"use strict";var p=ci(),b=Nr(),E=mi(),k=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function n(A,x){var z=A.projection,I;return x._isScoped?I=o:x._isClipped?I=c:I=s,I(A,z)}V.exports=n;function r(A,x){return p.behavior.zoom().translate(x.translate()).scaleExtent(x.scaleExtent()).scale(x.scale())}function a(A,x,z){var I=A.id,O=A.graphDiv,D=O.layout,B=D[I],F=O._fullLayout,P=F[I],j={},U={};function $(Q,re){j[I+"."+Q]=b.nestedProperty(B,Q).get(),E.call("_storeDirectGUIEdit",D,F._preGUI,j);var ne=b.nestedProperty(P,Q);ne.get()!==re&&(ne.set(re),b.nestedProperty(B,Q).set(re),U[I+"."+Q]=re)}z($),$("projection.scale",x.scale()/A.fitScale),$("fitbounds",!1),O.emit("plotly_relayout",U)}function o(A,x){var z=r(A,x);function I(){p.select(this).style(e)}function O(){x.scale(p.event.scale).translate(p.event.translate),A.render(!0);var F=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function D(F){var P=x.invert(A.midPt);F("center.lon",P[0]),F("center.lat",P[1])}function B(){p.select(this).style(t),a(A,x,D)}return z.on("zoomstart",I).on("zoom",O).on("zoomend",B),z}function s(A,x){var z=r(A,x),I=2,O,D,B,F,P,j,U,$,Q;function re(H){return x.invert(H)}function ne(H){var Y=re(H);if(!Y)return!0;var q=x(Y);return Math.abs(q[0]-H[0])>I||Math.abs(q[1]-H[1])>I}function se(){p.select(this).style(e);let{x:H,y:Y,width:q,height:Z}=this.getBBox();O=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],D=x.rotate(),B=x.translate(),F=D,P=re(O)}function G(){let{x:H,y:Y,width:q,height:Z}=this.getBBox();if(j=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],ne(O)){z.scale(x.scale()),z.translate(x.translate());return}x.scale(p.event.scale),x.translate([B[0],p.event.translate[1]]),P?re(j)&&($=re(j),U=[F[0]+($[0]-P[0]),D[1],D[2]],x.rotate(U),F=U):(O=j,P=re(O)),Q=!0,A.render(!0);var ee=x.rotate(),ae=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":ae[0],"geo.center.lat":ae[1],"geo.projection.rotation.lon":-ee[0]})}function X(){p.select(this).style(t),Q&&a(A,x,K)}function K(H){var Y=x.rotate(),q=x.invert(A.midPt);H("projection.rotation.lon",-Y[0]),H("center.lon",q[0]),H("center.lat",q[1])}return z.on("zoomstart",se).on("zoom",G).on("zoomend",X),z}function c(A,x){var z={r:x.rotate(),k:x.scale()},I=r(A,x),O=u(I,"zoomstart","zoom","zoomend"),D=0,B=I.on,F;I.on("zoomstart",function(){p.select(this).style(e);let{x:Q,y:re,width:ne,height:se}=this.getBBox(),G=p.event.sourceEvent?p.mouse(this):[Q+ne/2,re+se/2],X=x.rotate(),K=X,H=x.translate(),Y=h(X);F=m(x,G),B.call(I,"zoom",function(){let{x:q,y:Z,width:ee,height:ae}=this.getBBox(),he=p.event.sourceEvent?p.mouse(this):[q+ee/2,Z+ae/2];if(x.scale(z.k=p.event.scale),!F)G=he,F=m(x,G);else if(m(x,he)){x.rotate(X).translate(H);var xe=m(x,he),we=g(F,xe),Me=C(v(Y,we)),Se=z.r=i(Me,F,K);(!isFinite(Se[0])||!isFinite(Se[1])||!isFinite(Se[2]))&&(Se=K),x.rotate(Se),K=Se}j(O.of(this,arguments))}),P(O.of(this,arguments))}).on("zoomend",function(){p.select(this).style(t),B.call(I,"zoom",null),U(O.of(this,arguments)),a(A,x,$)}).on("zoom.redraw",function(){A.render(!0);var Q=x.rotate();A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function P(Q){D++||Q({type:"zoomstart"})}function j(Q){Q({type:"zoom"})}function U(Q){--D||Q({type:"zoomend"})}function $(Q){var re=x.rotate();Q("projection.rotation.lon",-re[0]),Q("projection.rotation.lat",-re[1])}return p.rebind(I,O,"on")}function m(A,x){var z=A.invert(x);return z&&isFinite(z[0])&&isFinite(z[1])&&_(z)}function h(A){var x=.5*A[0]*k,z=.5*A[1]*k,I=.5*A[2]*k,O=Math.sin(x),D=Math.cos(x),B=Math.sin(z),F=Math.cos(z),P=Math.sin(I),j=Math.cos(I);return[D*F*j+O*B*P,O*F*j-D*B*P,D*B*j+O*F*P,D*F*P-O*B*j]}function v(A,x){var z=A[0],I=A[1],O=A[2],D=A[3],B=x[0],F=x[1],P=x[2],j=x[3];return[z*B-I*F-O*P-D*j,z*F+I*B+O*j-D*P,z*P-I*j+O*B+D*F,z*j+I*P-O*F+D*B]}function g(A,x){if(!(!A||!x)){var z=f(A,x),I=Math.sqrt(T(z,z)),O=.5*Math.acos(Math.max(-1,Math.min(1,T(A,x)))),D=Math.sin(O)/I;return I&&[Math.cos(O),z[2]*D,-z[1]*D,z[0]*D]}}function i(A,x,z){var I=M(x,2,A[0]);I=M(I,1,A[1]),I=M(I,0,A[2]-z[2]);var O=x[0],D=x[1],B=x[2],F=I[0],P=I[1],j=I[2],U=Math.atan2(D,O)*l,$=Math.sqrt(O*O+D*D),Q,re;Math.abs(P)>$?(re=(P>0?90:-90)-U,Q=0):(re=Math.asin(P/$)*l-U,Q=Math.sqrt($*$-P*P));var ne=180-re-2*U,se=(Math.atan2(j,F)-Math.atan2(B,Q))*l,G=(Math.atan2(j,F)-Math.atan2(B,-Q))*l,X=w(z[0],z[1],re,se),K=w(z[0],z[1],ne,G);return X<=K?[re,se,z[2]]:[ne,G,z[2]]}function w(A,x,z,I){var O=S(z-A),D=S(I-x);return Math.sqrt(O*O+D*D)}function S(A){return(A%360+540)%360-180}function M(A,x,z){var I=z*k,O=A.slice(),D=x===0?1:0,B=x===2?1:2,F=Math.cos(I),P=Math.sin(I);return O[D]=A[D]*F-A[B]*P,O[B]=A[B]*F+A[D]*P,O}function C(A){return[Math.atan2(2*(A[0]*A[1]+A[2]*A[3]),1-2*(A[1]*A[1]+A[2]*A[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(A[0]*A[2]-A[3]*A[1]))))*l,Math.atan2(2*(A[0]*A[3]+A[1]*A[2]),1-2*(A[2]*A[2]+A[3]*A[3]))*l]}function _(A){var x=A[0]*k,z=A[1]*k,I=Math.cos(z);return[I*Math.cos(x),I*Math.sin(x),Math.sin(z)]}function T(A,x){for(var z=0,I=0,O=A.length;I0&&$._module.calcGeoJSON(U,B)}if(!F){var Q=this.updateProjection(D,B);if(Q)return;(!this.viewInitial||this.scope!==P.scope)&&this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(B,P),this.updateDims(B,P),this.updateFx(B,P),s.generalUpdatePerTraceModule(this.graphDiv,this,D,P);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var ne=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ne.selectAll("path"),this._render()},x.updateProjection=function(D,B){var F=this.graphDiv,P=B[this.id],j=B._size,U=P.domain,$=P.projection,Q=P.lonaxis,re=P.lataxis,ne=Q._ax,se=re._ax,G=this.projection=z(P),X=[[j.l+j.w*U.x[0],j.t+j.h*(1-U.y[1])],[j.l+j.w*U.x[1],j.t+j.h*(1-U.y[0])]],K=P.center||{},H=$.rotation||{},Y=Q.range||[],q=re.range||[];if(P.fitbounds){ne._length=X[1][0]-X[0][0],se._length=X[1][1]-X[0][1],ne.range=h(F,ne),se.range=h(F,se);let ve=[];for(let $t of D){let rr=$t[0].trace;rr.visible===!0&&rr._module.fitCoords&&ve.push(rr._module.fitCoords($t,P))}let le=m(F,ne),Ae=le.min.reduce(($t,{val:rr})=>Math.min($t,rr),1/0),Xe=le.max.reduce(($t,{val:rr})=>Math.max($t,rr),-1/0)-Ae,Ye=_.boundsOfCoords(ve.flat()),[yt,,gt]=Ye||[],Tt=gt-yt;if(!!Ye&&(Xe>360||Xe<360&&TtMath.max(ht,$t(De)),0),Xt=le.max.reduce((ht,De)=>Math.max(ht,rr(De)),0),or=ne._length-_r-Xt,Ot=or>ne._length/10?Tt*ne._length/or:Tt,vt=(yt+gt)/2;ne.range=[vt-Ot/2,vt+Ot/2]}var Z=(ne.range[0]+ne.range[1])/2,ee=(se.range[0]+se.range[1])/2;if(P._isScoped)K={lon:Z,lat:ee};else if(P._isClipped){K={lon:Z,lat:ee},H={lon:Z,lat:ee,roll:H.roll};var ae=$.type,he=C.lonaxisSpan[ae]/2||180,xe=C.lataxisSpan[ae]/2||90;Y=[Z-he,Z+he],q=[ee-xe,ee+xe]}else K={lon:Z,lat:ee},H={lon:Z,lat:H.lat,roll:H.roll}}G.center([K.lon-H.lon,K.lat-H.lat]).rotate([-H.lon,-H.lat,H.roll]).parallels($.parallels);var we=O(Y,q);G.fitExtent(X,we);var Me=this.bounds=G.getBounds(we),Se=this.fitScale=G.scale(),Ie=G.translate();if(G.scaleExtent=()=>{var ve;let{minscale:le}=$,Ae=(ve=$.maxscale)!=null?ve:1/0;return[Se*Math.min(le,Ae),Se*Math.max(le,Ae)]},P.fitbounds){var Ve=G.getBounds(O(ne.range,se.range)),Ge=Math.min((Me[1][0]-Me[0][0])/(Ve[1][0]-Ve[0][0]),(Me[1][1]-Me[0][1])/(Ve[1][1]-Ve[0][1]));isFinite(Ge)?G.scale(Ge*Se):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else G.scale($.scale*Se);var ke=this.midPt=[(Me[0][0]+Me[1][0])/2,(Me[0][1]+Me[1][1])/2];if(G.translate([Ie[0]+(ke[0]-Ie[0]),Ie[1]+(ke[1]-Ie[1])]).clipExtent(Me),P._isAlbersUsa){var _e=G([K.lon,K.lat]);if(_e){var ce=G.translate();G.translate([ce[0]-(_e[0]-ce[0]),ce[1]-(_e[1]-ce[1])])}}},x.updateBaseLayers=function(D,B){var F=this,P=F.topojson,j=F.layers,U=F.basePaths;function $(X){return X==="lonaxis"||X==="lataxis"}function Q(X){return!!C.lineLayers[X]}function re(X){return!!C.fillLayers[X]}var ne=this.hasChoropleth?C.layersForChoropleth:C.layers,se=ne.filter(function(X){return Q(X)||re(X)?B["show"+X]:$(X)?B[X].showgrid:!0}),G=F.framework.selectAll(".layer").data(se,String);G.exit().each(function(X){delete j[X],delete U[X],p.select(this).remove()}),G.enter().append("g").attr("class",function(X){return"layer "+X}).each(function(X){var K=j[X]=p.select(this);X==="bg"?F.bgRect=K.append("rect").style("pointer-events","all"):$(X)?U[X]=K.append("path").style("fill","none"):X==="backplot"?K.append("g").classed("choroplethlayer",!0):X==="frontplot"?K.append("g").classed("scatterlayer",!0):Q(X)?U[X]=K.append("path").style("fill","none").style("stroke-miterlimit",2):re(X)&&(U[X]=K.append("path").style("stroke","none"))}),G.order(),G.each(function(X){var K=U[X],H=C.layerNameToAdjective[X];X==="frame"?K.datum(C.sphereSVG):Q(X)||re(X)?K.datum(u(P,P.objects[X])):$(X)&&K.datum(I(X,B,D)).call(r.stroke,B[X].gridcolor).call(a.dashLine,B[X].griddash,B[X].gridwidth),Q(X)?K.call(r.stroke,B[H+"color"]).call(a.dashLine,"",B[H+"width"]):re(X)&&K.call(r.fill,B[H+"color"])})},x.updateDims=function(D,B){var F=this.bounds,P=(B.framewidth||0)/2,j=F[0][0]-P,U=F[0][1]-P,$=F[1][0]-j+P,Q=F[1][1]-U+P;a.setRect(this.clipRect,j,U,$,Q),this.bgRect.call(a.setRect,j,U,$,Q).call(r.fill,B.bgcolor),this.xaxis._offset=j,this.xaxis._length=$,this.yaxis._offset=U,this.yaxis._length=Q},x.updateFx=function(D,B){var F=this,P=F.graphDiv,j=F.bgRect,U=D.dragmode,$=D.clickmode;if(F.isStatic)return;function Q(){var G=F.viewInitial,X={};for(var K in G)X[F.id+"."+K]=G[K];e.call("_guiRelayout",P,X),P.emit("plotly_doubleclick",null)}function re(G){return F.projection.invert([G[0]+F.xaxis._offset,G[1]+F.yaxis._offset])}var ne=function(G,X){if(X.isRect){var K=G.range={};K[F.id]=[re([X.xmin,X.ymin]),re([X.xmax,X.ymax])]}else{var H=G.lassoPoints={};H[F.id]=X.map(re)}},se={element:F.bgRect.node(),gd:P,plotinfo:{id:F.id,xaxis:F.xaxis,yaxis:F.yaxis,fillRangeItems:ne},xaxes:[F.xaxis],yaxes:[F.yaxis],subplot:F.id,clickFn:function(G){G===2&&w(P)}};if(U==="pan"){j.node().onmousedown=null;let G=M(F,B);if(j.call(G),!p.event){let X=F.projection.scale(),[K,H]=F.projection.scaleExtent();(XH)&&G.event(j)}j.on("dblclick.zoom",Q),P._context._scrollZoom.geo||j.on("wheel.zoom",null)}else(U==="select"||U==="lasso")&&(j.on(".zoom",null),se.prepFn=function(G,X,K){i(G,X,K,se,U)},g.init(se));j.on("mousemove",function(){var G=F.projection.invert(t.getPositionFromD3Event());if(!G)return g.unhover(P,p.event);F.xaxis.p2c=function(){return G[0]},F.yaxis.p2c=function(){return G[1]},o.hover(P,p.event,F.id)}),j.on("mouseout",function(){P._dragging||g.unhover(P,p.event)}),j.on("click",function(){U!=="select"&&U!=="lasso"&&($.indexOf("select")>-1&&S(p.event,P,[F.xaxis],[F.yaxis],F.id,se),$.indexOf("event")>-1&&o.click(P,p.event))})},x.makeFramework=function(){var D=this,B=D.graphDiv,F=B._fullLayout,P="clip"+F._uid+D.id;D.clipDef=F._clips.append("clipPath").attr("id",P),D.clipRect=D.clipDef.append("rect"),D.framework=p.select(D.container).append("g").attr("class","geo "+D.id).call(a.setClipUrl,P,B),D.project=function(j){var U=D.projection(j);return U?[U[0]-D.xaxis._offset,U[1]-D.yaxis._offset]:[null,null]},D.xaxis={_id:"x",c2p:function(j){return D.project(j)[0]}},D.yaxis={_id:"y",c2p:function(j){return D.project(j)[1]}},D.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(D.mockAxis,F)},x.saveViewInitial=function(D){var B=D.center||{},F=D.projection,P=F.rotation||{};this.viewInitial={fitbounds:D.fitbounds,"projection.scale":F.scale};var j;D._isScoped?j={"center.lon":B.lon,"center.lat":B.lat}:D._isClipped?j={"projection.rotation.lon":P.lon,"projection.rotation.lat":P.lat,"center.lon":B.lon,"center.lat":B.lat}:j={"center.lon":B.lon,"center.lat":B.lat,"projection.rotation.lon":P.lon},t.extendFlat(this.viewInitial,j)},x.render=function(D){this._hasMarkerAngles&&D?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},x._render=function(){var D=this.projection,B=D.getPath(),F;function P(U){var $=D(U.lonlat);return $?n($[0],$[1]):null}function j(U){return D.isLonLatOverEdges(U.lonlat)?"none":null}for(F in this.basePaths)this.basePaths[F].attr("d",B);for(F in this.dataPaths)this.dataPaths[F].attr("d",function(U){return B(U.geojson)});for(F in this.dataPoints)this.dataPoints[F].attr("display",j).attr("transform",P)};function z(D){var B=D.projection,F=B.type,P=C.projNames[F];P="geo"+t.titleCase(P);for(var j=b[P]||l[P],U=j(),$=D._isSatellite?Math.acos(1/B.distance)*180/Math.PI:D._isClipped?C.lonaxisSpan[F]/2:null,Q=["center","rotate","parallels","clipExtent"],re=function(G){return G?U:[]},ne=0;neH}else return!1},U.getPath=function(){return E().projection(U)},U.getBounds=function(G){return U.getPath().bounds(G)},U.precision(C.precision),D._isSatellite&&U.tilt(B.tilt).distance(B.distance),$&&U.clipAngle($-C.clipPad),U}function I(D,B,F){var P=1e-6,j=2.5,U=B[D],$=C.scopeDefaults[B.scope],Q,re,ne;D==="lonaxis"?(Q=$.lonaxisRange,re=$.lataxisRange,ne=function(ee,ae){return[ee,ae]}):D==="lataxis"&&(Q=$.lataxisRange,re=$.lonaxisRange,ne=function(ee,ae){return[ae,ee]});var se={type:"linear",range:[Q[0],Q[1]-P],tick0:U.tick0,dtick:U.dtick};c.setConvert(se,F);var G=c.calcTicks(se);!B.isScoped&&D==="lonaxis"&&G.pop();for(var X=G.length,K=new Array(X),H=0;Hhe[xe]!=null)||l.fitboundsIncompatible.has(i)?a.fitbounds=!1:ee.forEach(({dst:he,key:xe})=>he&&(he[xe]=null))}}}}),RA=ze({"src/plots/geo/index.js"(J,V){"use strict";var p=zf().getSubplotCalcData,b=Nr().counterRegex,E=Ej(),k="geo",l=b(k),e={};e[k]={valType:"subplotid",dflt:k,editType:"calc"};function t(a){for(var o=a._fullLayout,s=a.calcdata,c=o._subplots[k],m=0;m")}}}}),FA=ze({"src/traces/choropleth/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.location=E.location,b.z=E.z;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b.ct=t.ct,b}}}),zA=ze({"src/traces/choropleth/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r,a,o,s;if(E===!1)for(n=0;n=Math.min(U,$)&&g<=Math.max(U,$)?0:1/0}if(I=Math.min(Q,re)&&i<=Math.max(Q,re)?0:1/0}B=Math.sqrt(I*I+O*O),u=S[z]}}}else for(z=S.length-1;z>-1;z--)f=S[z],A=h[f],x=v[f],I=c.c2p(A)-g,O=m.c2p(x)-i,D=Math.sqrt(I*I+O*O),D100},J.isDotSymbol=function(p){return typeof p=="string"?V.DOT_RE.test(p):p>200}}}),Dj=ze({"src/traces/scattergl/defaults.js"(J,V){"use strict";var p=Nr(),b=mi(),E=D2(),k=ty(),l=zd(),e=el(),t=Gv(),n=yd(),r=id(),a=_d(),o=Od(),s=xd();V.exports=function(m,h,v,g){function i(u,A){return p.coerce(m,h,k,u,A)}var w=m.marker?E.isOpenSymbol(m.marker.symbol):!1,S=e.isBubble(m),M=t(m,h,g,i);if(!M){h.visible=!1;return}n(m,h,g,i),i("xhoverformat"),i("yhoverformat");var C=M>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>=0?(s=c,o=c-1):a=c+1}return s}function b(t,n,r,a,o){for(var s=o+1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>0?(s=c,o=c-1):a=c+1}return s}function E(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<0?(s=c,a=c+1):o=c-1}return s}function k(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<=0?(s=c,a=c+1):o=c-1}return s}function l(t,n,r,a,o){for(;a<=o;){var s=a+o>>>1,c=t[s],m=r!==void 0?r(c,n):c-n;if(m===0)return s;m<=0?a=s+1:o=s-1}return-1}function e(t,n,r,a,o,s){return typeof r=="function"?s(t,n,r,a===void 0?0:a|0,o===void 0?t.length-1:o|0):s(t,n,void 0,r===void 0?0:r|0,a===void 0?t.length-1:a|0)}V.exports={ge:function(t,n,r,a,o){return e(t,n,r,a,o,p)},gt:function(t,n,r,a,o){return e(t,n,r,a,o,b)},lt:function(t,n,r,a,o){return e(t,n,r,a,o,E)},le:function(t,n,r,a,o){return e(t,n,r,a,o,k)},eq:function(t,n,r,a,o){return e(t,n,r,a,o,l)}}}}),BA=ze({"node_modules/clamp/index.js"(J,V){V.exports=p;function p(b,E,k){return Ek?k:b:bE?E:b}}}),qd=ze({"node_modules/pick-by-alias/index.js"(J,V){"use strict";V.exports=function(k,l,e){var t={},n,r;if(typeof l=="string"&&(l=b(l)),Array.isArray(l)){var a={};for(r=0;r1&&(E=arguments),typeof E=="string"?E=E.split(/\s/).map(parseFloat):typeof E=="number"&&(E=[E]),E.length&&typeof E[0]=="number"?E.length===1?k={width:E[0],height:E[0],x:0,y:0}:E.length===2?k={width:E[0],height:E[1],x:0,y:0}:k={x:E[0],y:E[1],width:E[2]-E[0]||0,height:E[3]-E[1]||0}:E&&(E=p(E,{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"}),k={x:E.left||0,y:E.top||0},E.width==null?E.right?k.width=E.right-k.x:k.width=0:k.width=E.width,E.height==null?E.bottom?k.height=E.bottom-k.y:k.height=0:k.height=E.height),k}}}),c0=ze({"node_modules/array-bounds/index.js"(J,V){"use strict";V.exports=p;function p(b,E){if(!b||b.length==null)throw Error("Argument should be an array");E==null?E=1:E=Math.floor(E);for(var k=Array(E*2),l=0;le&&(e=b[n]),b[n]>>1,S;h.dtype||(h.dtype="array"),typeof h.dtype=="string"?S=new(r(h.dtype))(w):h.dtype&&(S=h.dtype,Array.isArray(S)&&(S.length=w));for(let I=0;Iv||P>o){for(let Y=0;Yae||$>he||Q=ne||Z===ee)return;let xe=M[q];ee===void 0&&(ee=xe.length);for(let ce=Z;ce=B&&le<=P&&Ae>=F&&Ae<=j&&se.push(ve)}let we=C[q],Me=we[Z*4+0],Se=we[Z*4+1],Ie=we[Z*4+2],Ve=we[Z*4+3],Ge=X(we,Z+1),ke=Y*.5,_e=q+1;G(K,H,ke,_e,Me,Se||Ie||Ve||Ge),G(K,H+ke,ke,_e,Se,Ie||Ve||Ge),G(K+ke,H,ke,_e,Ie,Ve||Ge),G(K+ke,H+ke,ke,_e,Ve,Ge)}function X(K,H){let Y=null,q=0;for(;Y===null;)if(Y=K[H*4+q],q++,q>K.length)return null;return Y}return se}function x(I,O,D,B,F){let P=[];for(let j=0;j2&&(t.push([r].concat(a.splice(0,2))),o="l",r=r=="m"?"l":"L");;){if(a.length==p[o])return a.unshift(r),t.push(a);if(a.length1&&(m=1),m<-1&&(m=-1),c*Math.acos(m)},e=function(r,a,o,s,c,m,h,v,g,i,w,S){var M=Math.pow(c,2),C=Math.pow(m,2),_=Math.pow(w,2),T=Math.pow(S,2),f=M*C-M*T-C*_;f<0&&(f=0),f/=M*T+C*_,f=Math.sqrt(f)*(h===v?-1:1);var u=f*c/m*S,A=f*-m/c*w,x=i*u-g*A+(r+o)/2,z=g*u+i*A+(a+s)/2,I=(w-u)/c,O=(S-A)/m,D=(-w-u)/c,B=(-S-A)/m,F=l(1,0,I,O),P=l(I,O,D,B);return v===0&&P>0&&(P-=b),v===1&&P<0&&(P+=b),[x,z,F,P]},t=function(r){var a=r.px,o=r.py,s=r.cx,c=r.cy,m=r.rx,h=r.ry,v=r.xAxisRotation,g=v===void 0?0:v,i=r.largeArcFlag,w=i===void 0?0:i,S=r.sweepFlag,M=S===void 0?0:S,C=[];if(m===0||h===0)return[];var _=Math.sin(g*b/360),T=Math.cos(g*b/360),f=T*(a-s)/2+_*(o-c)/2,u=-_*(a-s)/2+T*(o-c)/2;if(f===0&&u===0)return[];m=Math.abs(m),h=Math.abs(h);var A=Math.pow(f,2)/Math.pow(m,2)+Math.pow(u,2)/Math.pow(h,2);A>1&&(m*=Math.sqrt(A),h*=Math.sqrt(A));var x=e(a,o,s,c,m,h,w,M,_,T,f,u),z=p(x,4),I=z[0],O=z[1],D=z[2],B=z[3],F=Math.abs(B)/(b/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);B/=P;for(var j=0;j4?(n=i[i.length-4],r=i[i.length-3]):(n=m,r=h),t.push(i)}return t}function E(l,e,t,n){return["C",l,e,t,n,t,n]}function k(l,e,t,n,r,a){return["C",l/3+2/3*t,e/3+2/3*n,r/3+2/3*t,a/3+2/3*n,r,a]}}}),OA=ze({"node_modules/is-svg-path/index.js"(J,V){"use strict";V.exports=function(b){return typeof b!="string"?!1:(b=b.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(b)&&/[\dz]$/i.test(b)&&b.length>4))}}}),Hj=ze({"node_modules/svg-path-bounds/index.js"(J,V){"use strict";var p=Uj(),b=qj(),E=Gj(),k=OA();V.exports=l;function l(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!k(e))throw Error("String is not an SVG path.");e=p(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=b(e),e=E(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],n=0,r=e.length;nt[2]&&(t[2]=a[o+0]),a[o+1]>t[3]&&(t[3]=a[o+1]);return t}}}),Wj=ze({"node_modules/bitmap-sdf/index.js"(J,V){"use strict";V.exports=b;var p=1e20;function b(l,e){e||(e={});var t=e.cutoff==null?.25:e.cutoff,n=e.radius==null?8:e.radius,r=e.channel||0,a,o,s,c,m,h,v,g,i,w,S;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");a=e.width,o=e.height,c=l,e.stride?h=e.stride:h=Math.floor(l.length/a/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(g=l,v=g.getContext("2d"),a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(g=l.canvas,v=l,a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.ImageData&&l instanceof window.ImageData&&(i=l,a=l.width,o=l.height,c=i.data,h=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(m=c,c=Array(a*o),w=0,S=Math.floor(m.length/h);wYj});function Yj(J,V={}){if(!(0,UA.default)(J))throw Error("Invalid SVG path");let p,b;V.shape||Array.isArray(V)?[p,b]=V.shape||V:(p=ry.width=V.width||V.w||200,b=ry.height=V.height||V.h||200);let E=Math.min(p,b),k=V.stroke||0,l=V.viewbox||V.viewBox||(0,jA.default)(J),e=[p/(l[2]-l[0]),b/(l[3]-l[1])],t=Math.min(e[0]||0,e[1]||0)/2;Vh.fillStyle="black",Vh.fillRect(0,0,p,b),Vh.fillStyle="white",k&&(typeof k!="number"&&(k=1),Vh.strokeStyle=k>0?"white":"black",Vh.lineWidth=Math.abs(k)),Vh.translate(p*.5,b*.5),Vh.scale(t,t);let n=new Path2D(J);return Vh.fill(n),k&&Vh.stroke(n),Vh.setTransform(1,0,0,1,0,0),(0,qA.default)(Vh,{cutoff:V.cutoff!=null?V.cutoff:.5,radius:V.radius!=null?V.radius:E*.5})}var jA,UA,qA,ry,Vh,Xj=zi({"node_modules/svg-path-sdf/svg-path-sdf.js"(){jA=Yl(Hj()),UA=Yl(OA()),qA=Yl(Wj()),ry=document.createElement("canvas"),Vh=ry.getContext("2d",{willReadFrequently:!0})}}),h0=ze({"src/traces/scattergl/convert.js"(J,V){"use strict";var p=ao(),b=(Xj(),Po(NA)).default,{normalize:E}=Qn(),k=mi(),l=Nr(),e=l.isArrayOrTypedArray,t=$i(),n=Xl(),r=fp().formatColor,a=el(),o=l1(),s=D2(),c=bv(),m=np().DESELECTDIM,h={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=kh().appendArrayPointValue;function g(B,F){var P,j={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},U=B._context.plotGlPixelRatio;if(F.visible!==!0)return j;if(a.hasText(F)&&(j.text=i(B,F),j.textSel=C(B,F,F.selected),j.textUnsel=C(B,F,F.unselected)),a.hasMarkers(F)&&(j.marker=S(B,F),j.markerSel=M(B,F,F.selected),j.markerUnsel=M(B,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var $=F.marker.opacity;for(j.markerUnsel.opacity=new Array($.length),P=0;P<$.length;P++)j.markerUnsel.opacity[P]=m*$[P]}if(a.hasLines(F)){j.line={overlay:!0,thickness:F.line.width*U,color:F.line.color,opacity:F.opacity};var Q=(c.DASHES[F.line.dash]||[1]).slice();for(P=0;P500?"bold":"normal":B}function S(B,F){var P=F._length,j=F.marker,U={},$,Q=e(j.symbol),re=e(j.angle),ne=e(j.color),se=e(j.line.color),G=e(j.opacity),X=e(j.size),K=e(j.line.width),H;if(Q||(H=s.isOpenSymbol(j.symbol)),Q||ne||se||G||re){U.symbols=new Array(P),U.angles=new Array(P),U.colors=new Array(P),U.borderColors=new Array(P);var Y=j.symbol,q=j.angle,Z=r(j,j.opacity,P),ee=r(j.line,j.opacity,P);if(!e(ee[0])){var ae=ee;for(ee=Array(P),$=0;$c.TOO_MANY_POINTS||a.hasMarkers(F)?"rect":"round";if(se&&F.connectgaps){var X=$[0],K=$[1];for(Q=0;Q<$.length;Q+=2)isNaN($[Q])||isNaN($[Q+1])?($[Q]=X,$[Q+1]=K):(X=$[Q],K=$[Q+1])}return{join:G,positions:$}}function O(B,F,P,j,U){var $=k.getComponentMethod("errorbars","makeComputeError"),Q=n.getFromId(B,F.xaxis,"x"),re=n.getFromId(B,F.yaxis,"y"),ne=P.length/2,se={};function G(X,K){var H=K._id.charAt(0),Y=F["error_"+H];if(Y&&Y.visible&&(K.type==="linear"||K.type==="log")){for(var q=$(Y),Z={x:0,y:1}[H],ee={x:[0,1,2,3],y:[2,3,0,1]}[H],ae=new Float64Array(4*ne),he=1/0,xe=-1/0,we=0,Me=0;we1?ne[Q]:ne[0]:ne,H=e(se)?se.length>1?se[Q]:se[0]:se,Y=h[K],q=h[H],Z=G?G/.8+1:0,ee=-q*Z-q*.5;$.offset[Q]=[Y*Z/X,ee/X]}}return $}V.exports={style:g,markerStyle:S,markerSelection:M,linePositions:I,errorBarPositions:O,textPosition:D}}}),VA=ze({"src/traces/scattergl/scene_update.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=k._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return k._scene||(l=k._scene={},l.init=function(){p.extendFlat(l,t,e)},l.init(),l.update=function(r){var a=p.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(a),l.scatter2d&&l.scatter2d.update(a),l.line2d&&l.line2d.update(a),l.error2d&&l.error2d.update(a.concat(a)),l.select2d&&l.select2d.update(a),l.glText)for(var o=0;o=m,u=T*2,A={},x,z=M.makeCalcdata(w,"x"),I=C.makeCalcdata(w,"y"),O=l(w,M,"x",z),D=l(w,C,"y",I),B=O.vals,F=D.vals;w._x=B,w._y=F,w.xperiodalignment&&(w._origX=z,w._xStarts=O.starts,w._xEnds=O.ends),w.yperiodalignment&&(w._origY=I,w._yStarts=D.starts,w._yEnds=D.ends);var P=new Array(u),j=new Array(T);for(x=0;x1&&b.extendFlat(_.line,o.linePositions(g,w,S)),_.errorX||_.errorY){var T=o.errorBarPositions(g,w,S,M,C);_.errorX&&b.extendFlat(_.errorX,T.x),_.errorY&&b.extendFlat(_.errorY,T.y)}return _.text&&(b.extendFlat(_.text,{positions:S},o.textPosition(g,w,_.text,_.marker)),b.extendFlat(_.textSel,{positions:S},o.textPosition(g,w,_.text,_.markerSel)),b.extendFlat(_.textUnsel,{positions:S},o.textPosition(g,w,_.text,_.markerUnsel))),_}}}),GA=ze({"src/traces/scattergl/edit_style.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=np().DESELECTDIM;function k(l){var e=l[0],t=e.trace,n=e.t,r=n._scene,a=n.index,o=r.selectBatch[a],s=r.unselectBatch[a],c=r.textOptions[a],m=r.textSelectedOptions[a]||{},h=r.textUnselectedOptions[a]||{},v=p.extendFlat({},c),g,i;if(o.length||s.length){var w=m.color,S=h.color,M=c.color,C=p.isArrayOrTypedArray(M);for(v.color=new Array(t._length),g=0;g10&&/[0-9](?:\s|\/)/.test(k)&&(e=k.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),n=k.match(/([a-z])/ig).join("").toLowerCase());else isNaN(k)?Array.isArray(k)||k.length?(e=[k[0],k[1],k[2]],n="rgb",t=k.length===4?k[3]:1):k instanceof Object&&(k.r!=null||k.red!=null||k.R!=null?(n="rgb",e=[k.r||k.red||k.R||0,k.g||k.green||k.G||0,k.b||k.blue||k.B||0]):(n="hsl",e=[k.h||k.hue||k.H||0,k.s||k.saturation||k.S||0,k.l||k.lightness||k.L||k.b||k.brightness]),t=k.a||k.alpha||k.opacity||1,k.opacity!=null&&(t/=100)):(n="rgb",e=[k>>>16,(k&65280)>>>8,k&255]);return{space:n,values:e,alpha:t}}}}),Qj=ze({"node_modules/color-rgba/index.js"(J,V){"use strict";var p=Jj();V.exports=function(k){Array.isArray(k)&&k.raw&&(k=String.raw.apply(null,arguments));var l,e,t,n=p(k);if(!n.space)return[];var r=[0,0,0],a=n.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(n.values[0],r[0]),a[0]),l[1]=Math.min(Math.max(n.values[1],r[1]),a[1]),l[2]=Math.min(Math.max(n.values[2],r[2]),a[2]),n.space[0]==="h"&&(l=b(l)),l.push(Math.min(Math.max(n.alpha,0),1)),l};function b(E){var k=E[0]/360,l=E[1]/100,e=E[2]/100,t,n,r,a,o,s=0;if(l===0)return o=e*255,[o,o,o];for(n=e<.5?e*(1+l):e+l-e*l,t=2*e-n,a=[0,0,0];s<3;)r=k+1/3*-(s-1),r<0?r++:r>1&&r--,o=6*r<1?t+(n-t)*6*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[s++]=o*255;return a}}}),ay=ze({"node_modules/color-normalize/index.js"(J,V){"use strict";var p=Qj(),b=F2();V.exports=function(l,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var t=b(e),n=new t(4),r=e!=="uint8"&&e!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=p(l),l[0]/=255,l[1]/=255,l[2]/=255),E(l)?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:255,r&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(r?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:1):(n[0]=Math.min(Math.max(Math.floor(l[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(l[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(l[2]*255),0),255),n[3]=l[3]==null?255:Math.min(Math.max(Math.floor(l[3]*255),0),255)),n)};function E(k){return!!(k instanceof Uint8Array||k instanceof Uint8ClampedArray||Array.isArray(k)&&(k[0]>1||k[0]===0)&&(k[1]>1||k[1]===0)&&(k[2]>1||k[2]===0)&&(!k[3]||k[3]>1))}}}),eU=ze({"node_modules/color-id/index.js"(J,V){"use strict";var p=BA();V.exports=b,V.exports.to=b,V.exports.from=E;function b(k,l){l==null&&(l=!0);var e=k[0],t=k[1],n=k[2],r=k[3];r==null&&(r=l?1:255),l&&(e*=255,t*=255,n*=255,r*=255),e=p(e,0,255)&255,t=p(t,0,255)&255,n=p(n,0,255)&255,r=p(r,0,255)&255;var a=e*16777216+(t<<16)+(n<<8)+r;return a}function E(k,l){k=+k;var e=k>>>24,t=(k&16711680)>>>16,n=(k&65280)>>>8,r=k&255;return l===!1?[e,t,n,r]:[e/255,t/255,n/255,r/255]}}}),tU=ze({"node_modules/glslify/browser.js"(J,V){V.exports=function(p){typeof p=="string"&&(p=[p]);for(var b=[].slice.call(arguments,1),E=[],k=0;k[this.tooManyColors?0:_,g.height],pixelRatio:m.context("pixelRatio"),scale:m.prop("scale"),scaleFract:m.prop("scaleFract"),translate:m.prop("translate"),translateFract:m.prop("translateFract"),markerTexture:m.prop("markerTexture"),paletteTexture:g},attributes:{x:(x,z)=>z.xAttr||{buffer:z.positionBuffer,stride:8,offset:0},y:(x,z)=>z.yAttr||{buffer:z.positionBuffer,stride:8,offset:4},xFract:(x,z)=>z.xAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:0},yFract:(x,z)=>z.yAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:4},size:(x,z)=>z.size.length?{buffer:z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(z.size*255/this.maxSize)]},borderSize:(x,z)=>z.borderSize.length?{buffer:z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(z.borderSize*255/this.maxSize)]},colorId:(x,z)=>z.color.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?i.slice(z.color*4,z.color*4+4):[z.color]},borderColorId:(x,z)=>z.borderColor.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?i.slice(z.borderColor*4,z.borderColor*4+4):[z.borderColor]},isActive:(x,z)=>z.activation===!0?{constant:[1]}:z.activation?z.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:m.prop("viewport")},viewport:m.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:m.prop("elements"),count:m.prop("count"),offset:m.prop("offset"),primitive:"points"},u=Object.assign({},f);u.frag=l([`precision highp float; +`]);l.createShader=function(g){var m=u(g,f,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},l.createPickShader=function(g){var m=u(g,f,p,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},l.createContourShader=function(g){var m=u(g,d,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m},l.createPickContourShader=function(g){var m=u(g,d,p,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m}},9499(s,l,n){"use strict";s.exports=V;var u=n(8828),c=n(2762),f=n(8116),h=n(7766),d=n(1888),p=n(6729),g=n(5298),m=n(9994),y=n(9618),_=n(3711),v=n(6760),x=n(7608),E=n(2478),M=n(6199),C=n(990),w=C.createShader,k=C.createContourShader,T=C.createPickShader,b=C.createPickContourShader,S=40,A=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],F=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],D=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var j=0;j<3;++j){var q=D[j],Y=(j+1)%3,K=(j+2)%3;q[Y+0]=1,q[K+3]=1,q[j+6]=1}})();function R(j,q,Y,K,re){this.position=j,this.index=q,this.uv=Y,this.level=K,this.dataCoordinate=re}var P=256;function z(j,q,Y,K,re,se,le,ue,fe,pe,we,xe,he,oe,te){this.gl=j,this.shape=q,this.bounds=Y,this.objectOffset=te,this.intensityBounds=[],this._shader=K,this._pickShader=re,this._coordinateBuffer=se,this._vao=le,this._colorMap=ue,this._contourShader=fe,this._contourPickShader=pe,this._contourBuffer=we,this._contourVAO=xe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new R([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=he,this._dynamicVAO=oe,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[y(d.mallocFloat(1024),[0,0]),y(d.mallocFloat(1024),[0,0]),y(d.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var I=z.prototype;I.genColormap=function(j,q){var Y=!1,K=m([p({colormap:j,nshades:P,format:"rgba"}).map(function(re,se){var le=q?L(se/255,q):re[3];return le<1&&(Y=!0),[re[0],re[1],re[2],255*le]})]);return g.divseq(K,255),this.hasAlphaScale=Y,K},I.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},I.isOpaque=function(){return!this.isTransparent()},I.pickSlots=1,I.setPickBase=function(j){this.pickId=j};function L(j,q){if(!q||!q.length)return 1;for(var Y=0;Yj&&Y>0){var K=(q[Y][0]-j)/(q[Y][0]-q[Y-1][0]);return q[Y][1]*(1-K)+K*q[Y-1][1]}}return 1}var B=[0,0,0],O={showSurface:!1,showContour:!1,projections:[A.slice(),A.slice(),A.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function G(j,q){var Y,K,re,se=q.axes&&q.axes.lastCubeProps.axis||B,le=q.showSurface,ue=q.showContour;for(Y=0;Y<3;++Y)for(le=le||q.surfaceProject[Y],K=0;K<3;++K)ue=ue||q.contourProject[Y][K];for(Y=0;Y<3;++Y){var fe=O.projections[Y];for(K=0;K<16;++K)fe[K]=0;for(K=0;K<4;++K)fe[5*K]=1;fe[5*Y]=0,fe[12+Y]=q.axesBounds[+(se[Y]>0)][Y],v(fe,j.model,fe);var pe=O.clipBounds[Y];for(re=0;re<2;++re)for(K=0;K<3;++K)pe[re][K]=j.clipBounds[re][K];pe[0][Y]=-1e8,pe[1][Y]=1e8}return O.showSurface=le,O.showContour=ue,O}var $={model:A,view:A,projection:A,inverseModel:A.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},X=A.slice(),Z=[1,0,0,0,1,0,0,0,1];function J(j,q){j=j||{};var Y=this.gl;Y.disable(Y.CULL_FACE),this._colorMap.bind(0);var K=$;K.model=j.model||A,K.view=j.view||A,K.projection=j.projection||A,K.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],K.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],K.objectOffset=this.objectOffset,K.contourColor=this.contourColor[0],K.inverseModel=x(K.inverseModel,K.model);for(var re=0;re<2;++re)for(var se=K.clipBounds[re],le=0;le<3;++le)se[le]=Math.min(Math.max(this.clipBounds[re][le],-1e8),1e8);K.kambient=this.ambientLight,K.kdiffuse=this.diffuseLight,K.kspecular=this.specularLight,K.roughness=this.roughness,K.fresnel=this.fresnel,K.opacity=this.opacity,K.height=0,K.permutation=Z,K.vertexColor=this.vertexColor;var ue=X;for(v(ue,K.view,K.model),v(ue,K.projection,ue),x(ue,ue),re=0;re<3;++re)K.eyePosition[re]=ue[12+re]/ue[15];var fe=ue[15];for(re=0;re<3;++re)fe+=this.lightPosition[re]*ue[4*re+3];for(re=0;re<3;++re){var pe=ue[12+re];for(le=0;le<3;++le)pe+=ue[4*le+re]*this.lightPosition[le];K.lightPosition[re]=pe/fe}var we=G(K,this);if(we.showSurface){for(this._shader.bind(),this._shader.uniforms=K,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Y.TRIANGLES,this._vertexCount),re=0;re<3;++re)!this.surfaceProject[re]||!this.vertexCount||(this._shader.uniforms.model=we.projections[re],this._shader.uniforms.clipBounds=we.clipBounds[re],this._vao.draw(Y.TRIANGLES,this._vertexCount));this._vao.unbind()}if(we.showContour){var xe=this._contourShader;K.kambient=1,K.kdiffuse=0,K.kspecular=0,K.opacity=1,xe.bind(),xe.uniforms=K;var he=this._contourVAO;for(he.bind(),re=0;re<3;++re)for(xe.uniforms.permutation=D[re],Y.lineWidth(this.contourWidth[re]*this.pixelRatio),le=0;le>4)/16)/255,re=Math.floor(K),se=K-re,le=q[1]*(j.value[1]+(j.value[2]&15)/16)/255,ue=Math.floor(le),fe=le-ue;re+=1,ue+=1;var pe=Y.position;pe[0]=pe[1]=pe[2]=0;for(var we=0;we<2;++we)for(var xe=we?se:1-se,he=0;he<2;++he)for(var oe=he?fe:1-fe,te=re+we,ie=ue+he,ee=xe*oe,ce=0;ce<3;++ce)pe[ce]+=this._field[ce].get(te,ie)*ee;for(var _e=this._pickResult.level,Se=0;Se<3;++Se)if(_e[Se]=E.le(this.contourLevels[Se],pe[Se]),_e[Se]<0)this.contourLevels[Se].length>0&&(_e[Se]=0);else if(_e[Se]Math.abs(Ue-pe[Se])&&(_e[Se]+=1)}for(Y.index[0]=se<.5?re:re+1,Y.index[1]=fe<.5?ue:ue+1,Y.uv[0]=K/q[0],Y.uv[1]=le/q[1],ce=0;ce<3;++ce)Y.dataCoordinate[ce]=this._field[ce].get(Y.index[0],Y.index[1]);return Y},I.padField=function(j,q){var Y=q.shape.slice(),K=j.shape.slice();g.assign(j.lo(1,1).hi(Y[0],Y[1]),q),g.assign(j.lo(1).hi(Y[0],1),q.hi(Y[0],1)),g.assign(j.lo(1,K[1]-1).hi(Y[0],1),q.lo(0,Y[1]-1).hi(Y[0],1)),g.assign(j.lo(0,1).hi(1,Y[1]),q.hi(1)),g.assign(j.lo(K[0]-1,1).hi(1,Y[1]),q.lo(Y[0]-1)),j.set(0,0,q.get(0,0)),j.set(0,K[1]-1,q.get(0,Y[1]-1)),j.set(K[0]-1,0,q.get(Y[0]-1,0)),j.set(K[0]-1,K[1]-1,q.get(Y[0]-1,Y[1]-1))};function H(j,q){return Array.isArray(j)?[q(j[0]),q(j[1]),q(j[2])]:[q(j),q(j),q(j)]}function W(j){return Array.isArray(j)?j.length===3?[j[0],j[1],j[2],1]:[j[0],j[1],j[2],j[3]]:[0,0,0,1]}function U(j){if(Array.isArray(j)){if(Array.isArray(j))return[W(j[0]),W(j[1]),W(j[2])];var q=W(j);return[q.slice(),q.slice(),q.slice()]}}I.update=function(j){j=j||{},this.objectOffset=j.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in j&&(this.contourWidth=H(j.contourWidth,Number)),"showContour"in j&&(this.showContour=H(j.showContour,Boolean)),"showSurface"in j&&(this.showSurface=!!j.showSurface),"contourTint"in j&&(this.contourTint=H(j.contourTint,Boolean)),"contourColor"in j&&(this.contourColor=U(j.contourColor)),"contourProject"in j&&(this.contourProject=H(j.contourProject,function(ia){return H(ia,Boolean)})),"surfaceProject"in j&&(this.surfaceProject=j.surfaceProject),"dynamicColor"in j&&(this.dynamicColor=U(j.dynamicColor)),"dynamicTint"in j&&(this.dynamicTint=H(j.dynamicTint,Number)),"dynamicWidth"in j&&(this.dynamicWidth=H(j.dynamicWidth,Number)),"opacity"in j&&(this.opacity=j.opacity),"opacityscale"in j&&(this.opacityscale=j.opacityscale),"colorBounds"in j&&(this.colorBounds=j.colorBounds),"vertexColor"in j&&(this.vertexColor=j.vertexColor?1:0),"colormap"in j&&this._colorMap.setPixels(this.genColormap(j.colormap,this.opacityscale));var q=j.field||j.coords&&j.coords[2]||null,Y=!1;if(q||(this._field[2].shape[0]||this._field[2].shape[2]?q=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):q=this._field[2].hi(0,0)),"field"in j||"coords"in j){var K=(q.shape[0]+2)*(q.shape[1]+2);K>this._field[2].data.length&&(d.freeFloat(this._field[2].data),this._field[2].data=d.mallocFloat(u.nextPow2(K))),this._field[2]=y(this._field[2].data,[q.shape[0]+2,q.shape[1]+2]),this.padField(this._field[2],q),this.shape=q.shape.slice();for(var re=this.shape,se=0;se<2;++se)this._field[2].size>this._field[se].data.length&&(d.freeFloat(this._field[se].data),this._field[se].data=d.mallocFloat(this._field[2].size)),this._field[se]=y(this._field[se].data,[re[0]+2,re[1]+2]);if(j.coords){var le=j.coords;if(!Array.isArray(le)||le.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(se=0;se<2;++se){var ue=le[se];for(he=0;he<2;++he)if(ue.shape[he]!==re[he])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[se],ue)}}else if(j.ticks){var fe=j.ticks;if(!Array.isArray(fe)||fe.length!==2)throw new Error("gl-surface: invalid ticks");for(se=0;se<2;++se){var pe=fe[se];if((Array.isArray(pe)||pe.length)&&(pe=y(pe)),pe.shape[0]!==re[se])throw new Error("gl-surface: invalid tick length");var we=y(pe.data,re);we.stride[se]=pe.stride[0],we.stride[se^1]=0,this.padField(this._field[se],we)}}else{for(se=0;se<2;++se){var xe=[0,0];xe[se]=1,this._field[se]=y(this._field[se].data,[re[0]+2,re[1]+2],xe,0)}this._field[0].set(0,0,0);for(var he=0;he0){for(var ti=0;ti<5;++ti)At.pop();me-=1}continue e}}}mt.push(me)}this._contourOffsets[ft]=ar,this._contourCounts[ft]=mt}var Ka=d.mallocFloat(At.length);for(se=0;seR||F<0||F>R)throw new Error("gl-texture2d: Invalid texture size");return S._shape=[A,F],S.bind(),D.texImage2D(D.TEXTURE_2D,0,S.format,A,F,0,S.format,S.type,null),S._mipLevels=[0],S}function v(S,A,F,D,R,P){this.gl=S,this.handle=A,this.format=R,this.type=P,this._shape=[F,D],this._mipLevels=[0],this._magFilter=S.NEAREST,this._minFilter=S.NEAREST,this._wrapS=S.CLAMP_TO_EDGE,this._wrapT=S.CLAMP_TO_EDGE,this._anisoSamples=1;var z=this,I=[this._wrapS,this._wrapT];Object.defineProperties(I,[{get:function(){return z._wrapS},set:function(B){return z.wrapS=B}},{get:function(){return z._wrapT},set:function(B){return z.wrapT=B}}]),this._wrapVector=I;var L=[this._shape[0],this._shape[1]];Object.defineProperties(L,[{get:function(){return z._shape[0]},set:function(B){return z.width=B}},{get:function(){return z._shape[1]},set:function(B){return z.height=B}}]),this._shapeVector=L}var x=v.prototype;Object.defineProperties(x,{minFilter:{get:function(){return this._minFilter},set:function(S){this.bind();var A=this.gl;if(this.type===A.FLOAT&&h.indexOf(S)>=0&&(A.getExtension("OES_texture_float_linear")||(S=A.NEAREST)),d.indexOf(S)<0)throw new Error("gl-texture2d: Unknown filter mode "+S);return A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,S),this._minFilter=S}},magFilter:{get:function(){return this._magFilter},set:function(S){this.bind();var A=this.gl;if(this.type===A.FLOAT&&h.indexOf(S)>=0&&(A.getExtension("OES_texture_float_linear")||(S=A.NEAREST)),d.indexOf(S)<0)throw new Error("gl-texture2d: Unknown filter mode "+S);return A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,S),this._magFilter=S}},mipSamples:{get:function(){return this._anisoSamples},set:function(S){var A=this._anisoSamples;if(this._anisoSamples=Math.max(S,1)|0,A!==this._anisoSamples){var F=this.gl.getExtension("EXT_texture_filter_anisotropic");F&&this.gl.texParameterf(this.gl.TEXTURE_2D,F.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(S){if(this.bind(),p.indexOf(S)<0)throw new Error("gl-texture2d: Unknown wrap mode "+S);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,S),this._wrapS=S}},wrapT:{get:function(){return this._wrapT},set:function(S){if(this.bind(),p.indexOf(S)<0)throw new Error("gl-texture2d: Unknown wrap mode "+S);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,S),this._wrapT=S}},wrap:{get:function(){return this._wrapVector},set:function(S){if(Array.isArray(S)||(S=[S,S]),S.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var A=0;A<2;++A)if(p.indexOf(S[A])<0)throw new Error("gl-texture2d: Unknown wrap mode "+S);this._wrapS=S[0],this._wrapT=S[1];var F=this.gl;return this.bind(),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,this._wrapS),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_T,this._wrapT),S}},shape:{get:function(){return this._shapeVector},set:function(S){if(!Array.isArray(S))S=[S|0,S|0];else if(S.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return _(this,S[0]|0,S[1]|0),[S[0]|0,S[1]|0]}},width:{get:function(){return this._shape[0]},set:function(S){return S=S|0,_(this,S,this._shape[1]),S}},height:{get:function(){return this._shape[1]},set:function(S){return S=S|0,_(this,this._shape[0],S),S}}}),x.bind=function(S){var A=this.gl;return S!==void 0&&A.activeTexture(A.TEXTURE0+(S|0)),A.bindTexture(A.TEXTURE_2D,this.handle),S!==void 0?S|0:A.getParameter(A.ACTIVE_TEXTURE)-A.TEXTURE0},x.dispose=function(){this.gl.deleteTexture(this.handle)},x.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var S=Math.min(this._shape[0],this._shape[1]),A=0;S>0;++A,S>>>=1)this._mipLevels.indexOf(A)<0&&this._mipLevels.push(A)},x.setPixels=function(S,A,F,D){var R=this.gl;this.bind(),Array.isArray(A)?(D=F,F=A[1]|0,A=A[0]|0):(A=A||0,F=F||0),D=D||0;var P=m(S)?S:S.raw;if(P){var z=this._mipLevels.indexOf(D)<0;z?(R.texImage2D(R.TEXTURE_2D,0,this.format,this.format,this.type,P),this._mipLevels.push(D)):R.texSubImage2D(R.TEXTURE_2D,D,A,F,this.format,this.type,P)}else if(S.shape&&S.stride&&S.data){if(S.shape.length<2||A+S.shape[1]>this._shape[1]>>>D||F+S.shape[0]>this._shape[0]>>>D||A<0||F<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(R,A,F,D,this.format,this.type,this._mipLevels,S)}else throw new Error("gl-texture2d: Unsupported data type")};function E(S,A){return S.length===3?A[2]===1&&A[1]===S[0]*S[2]&&A[0]===S[2]:A[0]===1&&A[1]===S[0]}function M(S,A,F,D,R,P,z,I){var L=I.dtype,B=I.shape.slice();if(B.length<2||B.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var O=0,G=0,$=E(B,I.stride.slice());L==="float32"?O=S.FLOAT:L==="float64"?(O=S.FLOAT,$=!1,L="float32"):L==="uint8"?O=S.UNSIGNED_BYTE:(O=S.UNSIGNED_BYTE,$=!1,L="uint8");var X=1;if(B.length===2)G=S.LUMINANCE,B=[B[0],B[1],1],I=u(I.data,B,[I.stride[0],I.stride[1],1],I.offset);else if(B.length===3){if(B[2]===1)G=S.ALPHA;else if(B[2]===2)G=S.LUMINANCE_ALPHA;else if(B[2]===3)G=S.RGB;else if(B[2]===4)G=S.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");X=B[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((G===S.LUMINANCE||G===S.ALPHA)&&(R===S.LUMINANCE||R===S.ALPHA)&&(G=R),G!==R)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Z=I.size,J=z.indexOf(D)<0;if(J&&z.push(D),O===P&&$)I.offset===0&&I.data.length===Z?J?S.texImage2D(S.TEXTURE_2D,D,R,B[0],B[1],0,R,P,I.data):S.texSubImage2D(S.TEXTURE_2D,D,A,F,B[0],B[1],R,P,I.data):J?S.texImage2D(S.TEXTURE_2D,D,R,B[0],B[1],0,R,P,I.data.subarray(I.offset,I.offset+Z)):S.texSubImage2D(S.TEXTURE_2D,D,A,F,B[0],B[1],R,P,I.data.subarray(I.offset,I.offset+Z));else{var N;P===S.FLOAT?N=f.mallocFloat32(Z):N=f.mallocUint8(Z);var H=u(N,B,[B[2],B[2]*B[0],1]);O===S.FLOAT&&P===S.UNSIGNED_BYTE?y(H,I):c.assign(H,I),J?S.texImage2D(S.TEXTURE_2D,D,R,B[0],B[1],0,R,P,N.subarray(0,Z)):S.texSubImage2D(S.TEXTURE_2D,D,A,F,B[0],B[1],R,P,N.subarray(0,Z)),P===S.FLOAT?f.freeFloat32(N):f.freeUint8(N)}}function C(S){var A=S.createTexture();return S.bindTexture(S.TEXTURE_2D,A),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,S.NEAREST),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,S.NEAREST),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),A}function w(S,A,F,D,R){var P=S.getParameter(S.MAX_TEXTURE_SIZE);if(A<0||A>P||F<0||F>P)throw new Error("gl-texture2d: Invalid texture shape");if(R===S.FLOAT&&!S.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var z=C(S);return S.texImage2D(S.TEXTURE_2D,0,D,A,F,0,D,R,null),new v(S,z,A,F,D,R)}function k(S,A,F,D,R,P){var z=C(S);return S.texImage2D(S.TEXTURE_2D,0,R,R,P,A),new v(S,z,F,D,R,P)}function T(S,A){var F=A.dtype,D=A.shape.slice(),R=S.getParameter(S.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>R||D[1]<0||D[1]>R)throw new Error("gl-texture2d: Invalid texture size");var P=E(D,A.stride.slice()),z=0;F==="float32"?z=S.FLOAT:F==="float64"?(z=S.FLOAT,P=!1,F="float32"):F==="uint8"?z=S.UNSIGNED_BYTE:(z=S.UNSIGNED_BYTE,P=!1,F="uint8");var I=0;if(D.length===2)I=S.LUMINANCE,D=[D[0],D[1],1],A=u(A.data,D,[A.stride[0],A.stride[1],1],A.offset);else if(D.length===3)if(D[2]===1)I=S.ALPHA;else if(D[2]===2)I=S.LUMINANCE_ALPHA;else if(D[2]===3)I=S.RGB;else if(D[2]===4)I=S.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");z===S.FLOAT&&!S.getExtension("OES_texture_float")&&(z=S.UNSIGNED_BYTE,P=!1);var L,B,O=A.size;if(P)A.offset===0&&A.data.length===O?L=A.data:L=A.data.subarray(A.offset,A.offset+O);else{var G=[D[2],D[2]*D[0],1];B=f.malloc(O,F);var $=u(B,D,G,0);(F==="float32"||F==="float64")&&z===S.UNSIGNED_BYTE?y($,A):c.assign($,A),L=B.subarray(0,O)}var X=C(S);return S.texImage2D(S.TEXTURE_2D,0,I,D[0],D[1],0,I,z,L),P||f.free(B),new v(S,X,D[0],D[1],I,z)}function b(S){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(h||g(S),typeof arguments[1]=="number")return w(S,arguments[1],arguments[2],arguments[3]||S.RGBA,arguments[4]||S.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return w(S,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||S.RGBA,arguments[3]||S.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var A=arguments[1],F=m(A)?A:A.raw;if(F)return k(S,F,A.width|0,A.height|0,arguments[2]||S.RGBA,arguments[3]||S.UNSIGNED_BYTE);if(A.shape&&A.data&&A.stride)return T(S,A)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433(s){"use strict";function l(n,u,c){u?u.bind():n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,null);var f=n.getParameter(n.MAX_VERTEX_ATTRIBS)|0;if(c){if(c.length>f)throw new Error("gl-vao: Too many vertex attributes");for(var h=0;h1?0:Math.acos(y)}},9226(s){s.exports=l;function l(n,u){return n[0]=Math.ceil(u[0]),n[1]=Math.ceil(u[1]),n[2]=Math.ceil(u[2]),n}},3126(s){s.exports=l;function l(n){var u=new Float32Array(3);return u[0]=n[0],u[1]=n[1],u[2]=n[2],u}},3990(s){s.exports=l;function l(n,u){return n[0]=u[0],n[1]=u[1],n[2]=u[2],n}},1091(s){s.exports=l;function l(){var n=new Float32Array(3);return n[0]=0,n[1]=0,n[2]=0,n}},5911(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2],p=c[0],g=c[1],m=c[2];return n[0]=h*m-d*g,n[1]=d*p-f*m,n[2]=f*g-h*p,n}},5455(s,l,n){s.exports=n(7056)},7056(s){s.exports=l;function l(n,u){var c=u[0]-n[0],f=u[1]-n[1],h=u[2]-n[2];return Math.sqrt(c*c+f*f+h*h)}},4008(s,l,n){s.exports=n(6690)},6690(s){s.exports=l;function l(n,u,c){return n[0]=u[0]/c[0],n[1]=u[1]/c[1],n[2]=u[2]/c[2],n}},244(s){s.exports=l;function l(n,u){return n[0]*u[0]+n[1]*u[1]+n[2]*u[2]}},2613(s){s.exports=1e-6},9922(s,l,n){s.exports=c;var u=n(2613);function c(f,h){var d=f[0],p=f[1],g=f[2],m=h[0],y=h[1],_=h[2];return Math.abs(d-m)<=u*Math.max(1,Math.abs(d),Math.abs(m))&&Math.abs(p-y)<=u*Math.max(1,Math.abs(p),Math.abs(y))&&Math.abs(g-_)<=u*Math.max(1,Math.abs(g),Math.abs(_))}},9265(s){s.exports=l;function l(n,u){return n[0]===u[0]&&n[1]===u[1]&&n[2]===u[2]}},2681(s){s.exports=l;function l(n,u){return n[0]=Math.floor(u[0]),n[1]=Math.floor(u[1]),n[2]=Math.floor(u[2]),n}},5137(s,l,n){s.exports=c;var u=n(1091)();function c(f,h,d,p,g,m){var y,_;for(h||(h=3),d||(d=0),p?_=Math.min(p*h+d,f.length):_=f.length,y=d;y<_;y+=h)u[0]=f[y],u[1]=f[y+1],u[2]=f[y+2],g(u,u,m),f[y]=u[0],f[y+1]=u[1],f[y+2]=u[2];return f}},2825(s){s.exports=l;function l(n,u,c){var f=new Float32Array(3);return f[0]=n,f[1]=u,f[2]=c,f}},2931(s,l,n){s.exports={EPSILON:n(2613),create:n(1091),clone:n(3126),angle:n(8192),fromValues:n(2825),copy:n(3990),set:n(1463),equals:n(9922),exactEquals:n(9265),add:n(5632),subtract:n(6843),sub:n(2229),multiply:n(5847),mul:n(4505),divide:n(6690),div:n(4008),min:n(8107),max:n(7417),floor:n(2681),ceil:n(9226),round:n(2447),scale:n(6621),scaleAndAdd:n(8489),distance:n(7056),dist:n(5455),squaredDistance:n(2953),sqrDist:n(6141),length:n(1387),len:n(868),squaredLength:n(3066),sqrLen:n(5486),negate:n(5093),inverse:n(811),normalize:n(3536),dot:n(244),cross:n(5911),lerp:n(6658),random:n(7636),transformMat4:n(5673),transformMat3:n(492),transformQuat:n(264),rotateX:n(6894),rotateY:n(109),rotateZ:n(8692),forEach:n(5137)}},811(s){s.exports=l;function l(n,u){return n[0]=1/u[0],n[1]=1/u[1],n[2]=1/u[2],n}},868(s,l,n){s.exports=n(1387)},1387(s){s.exports=l;function l(n){var u=n[0],c=n[1],f=n[2];return Math.sqrt(u*u+c*c+f*f)}},6658(s){s.exports=l;function l(n,u,c,f){var h=u[0],d=u[1],p=u[2];return n[0]=h+f*(c[0]-h),n[1]=d+f*(c[1]-d),n[2]=p+f*(c[2]-p),n}},7417(s){s.exports=l;function l(n,u,c){return n[0]=Math.max(u[0],c[0]),n[1]=Math.max(u[1],c[1]),n[2]=Math.max(u[2],c[2]),n}},8107(s){s.exports=l;function l(n,u,c){return n[0]=Math.min(u[0],c[0]),n[1]=Math.min(u[1],c[1]),n[2]=Math.min(u[2],c[2]),n}},4505(s,l,n){s.exports=n(5847)},5847(s){s.exports=l;function l(n,u,c){return n[0]=u[0]*c[0],n[1]=u[1]*c[1],n[2]=u[2]*c[2],n}},5093(s){s.exports=l;function l(n,u){return n[0]=-u[0],n[1]=-u[1],n[2]=-u[2],n}},3536(s){s.exports=l;function l(n,u){var c=u[0],f=u[1],h=u[2],d=c*c+f*f+h*h;return d>0&&(d=1/Math.sqrt(d),n[0]=u[0]*d,n[1]=u[1]*d,n[2]=u[2]*d),n}},7636(s){s.exports=l;function l(n,u){u=u||1;var c=Math.random()*2*Math.PI,f=Math.random()*2-1,h=Math.sqrt(1-f*f)*u;return n[0]=Math.cos(c)*h,n[1]=Math.sin(c)*h,n[2]=f*u,n}},6894(s){s.exports=l;function l(n,u,c,f){var h=c[1],d=c[2],p=u[1]-h,g=u[2]-d,m=Math.sin(f),y=Math.cos(f);return n[0]=u[0],n[1]=h+p*y-g*m,n[2]=d+p*m+g*y,n}},109(s){s.exports=l;function l(n,u,c,f){var h=c[0],d=c[2],p=u[0]-h,g=u[2]-d,m=Math.sin(f),y=Math.cos(f);return n[0]=h+g*m+p*y,n[1]=u[1],n[2]=d+g*y-p*m,n}},8692(s){s.exports=l;function l(n,u,c,f){var h=c[0],d=c[1],p=u[0]-h,g=u[1]-d,m=Math.sin(f),y=Math.cos(f);return n[0]=h+p*y-g*m,n[1]=d+p*m+g*y,n[2]=u[2],n}},2447(s){s.exports=l;function l(n,u){return n[0]=Math.round(u[0]),n[1]=Math.round(u[1]),n[2]=Math.round(u[2]),n}},6621(s){s.exports=l;function l(n,u,c){return n[0]=u[0]*c,n[1]=u[1]*c,n[2]=u[2]*c,n}},8489(s){s.exports=l;function l(n,u,c,f){return n[0]=u[0]+c[0]*f,n[1]=u[1]+c[1]*f,n[2]=u[2]+c[2]*f,n}},1463(s){s.exports=l;function l(n,u,c,f){return n[0]=u,n[1]=c,n[2]=f,n}},6141(s,l,n){s.exports=n(2953)},5486(s,l,n){s.exports=n(3066)},2953(s){s.exports=l;function l(n,u){var c=u[0]-n[0],f=u[1]-n[1],h=u[2]-n[2];return c*c+f*f+h*h}},3066(s){s.exports=l;function l(n){var u=n[0],c=n[1],f=n[2];return u*u+c*c+f*f}},2229(s,l,n){s.exports=n(6843)},6843(s){s.exports=l;function l(n,u,c){return n[0]=u[0]-c[0],n[1]=u[1]-c[1],n[2]=u[2]-c[2],n}},492(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2];return n[0]=f*c[0]+h*c[3]+d*c[6],n[1]=f*c[1]+h*c[4]+d*c[7],n[2]=f*c[2]+h*c[5]+d*c[8],n}},5673(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2],p=c[3]*f+c[7]*h+c[11]*d+c[15];return p=p||1,n[0]=(c[0]*f+c[4]*h+c[8]*d+c[12])/p,n[1]=(c[1]*f+c[5]*h+c[9]*d+c[13])/p,n[2]=(c[2]*f+c[6]*h+c[10]*d+c[14])/p,n}},264(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2],p=c[0],g=c[1],m=c[2],y=c[3],_=g*d-m*h,v=m*f-p*d,x=p*h-g*f;return _*=2,v*=2,x*=2,n[0]=f+y*_+g*x-m*v,n[1]=h+y*v+m*_-p*x,n[2]=d+y*x+p*v-g*_,n}},4361(s){s.exports=l;function l(n,u,c){return n[0]=u[0]+c[0],n[1]=u[1]+c[1],n[2]=u[2]+c[2],n[3]=u[3]+c[3],n}},2335(s){s.exports=l;function l(n){var u=new Float32Array(4);return u[0]=n[0],u[1]=n[1],u[2]=n[2],u[3]=n[3],u}},2933(s){s.exports=l;function l(n,u){return n[0]=u[0],n[1]=u[1],n[2]=u[2],n[3]=u[3],n}},7536(s){s.exports=l;function l(){var n=new Float32Array(4);return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n}},4691(s){s.exports=l;function l(n,u){var c=u[0]-n[0],f=u[1]-n[1],h=u[2]-n[2],d=u[3]-n[3];return Math.sqrt(c*c+f*f+h*h+d*d)}},1373(s){s.exports=l;function l(n,u,c){return n[0]=u[0]/c[0],n[1]=u[1]/c[1],n[2]=u[2]/c[2],n[3]=u[3]/c[3],n}},3750(s){s.exports=l;function l(n,u){return n[0]*u[0]+n[1]*u[1]+n[2]*u[2]+n[3]*u[3]}},3390(s){s.exports=l;function l(n,u,c,f){var h=new Float32Array(4);return h[0]=n,h[1]=u,h[2]=c,h[3]=f,h}},9970(s,l,n){s.exports={create:n(7536),clone:n(2335),fromValues:n(3390),copy:n(2933),set:n(4578),add:n(4361),subtract:n(6860),multiply:n(3576),divide:n(1373),min:n(2334),max:n(160),scale:n(9288),scaleAndAdd:n(4844),distance:n(4691),squaredDistance:n(7960),length:n(6808),squaredLength:n(483),negate:n(1498),inverse:n(4494),normalize:n(5177),dot:n(3750),lerp:n(2573),random:n(9131),transformMat4:n(5352),transformQuat:n(4041)}},4494(s){s.exports=l;function l(n,u){return n[0]=1/u[0],n[1]=1/u[1],n[2]=1/u[2],n[3]=1/u[3],n}},6808(s){s.exports=l;function l(n){var u=n[0],c=n[1],f=n[2],h=n[3];return Math.sqrt(u*u+c*c+f*f+h*h)}},2573(s){s.exports=l;function l(n,u,c,f){var h=u[0],d=u[1],p=u[2],g=u[3];return n[0]=h+f*(c[0]-h),n[1]=d+f*(c[1]-d),n[2]=p+f*(c[2]-p),n[3]=g+f*(c[3]-g),n}},160(s){s.exports=l;function l(n,u,c){return n[0]=Math.max(u[0],c[0]),n[1]=Math.max(u[1],c[1]),n[2]=Math.max(u[2],c[2]),n[3]=Math.max(u[3],c[3]),n}},2334(s){s.exports=l;function l(n,u,c){return n[0]=Math.min(u[0],c[0]),n[1]=Math.min(u[1],c[1]),n[2]=Math.min(u[2],c[2]),n[3]=Math.min(u[3],c[3]),n}},3576(s){s.exports=l;function l(n,u,c){return n[0]=u[0]*c[0],n[1]=u[1]*c[1],n[2]=u[2]*c[2],n[3]=u[3]*c[3],n}},1498(s){s.exports=l;function l(n,u){return n[0]=-u[0],n[1]=-u[1],n[2]=-u[2],n[3]=-u[3],n}},5177(s){s.exports=l;function l(n,u){var c=u[0],f=u[1],h=u[2],d=u[3],p=c*c+f*f+h*h+d*d;return p>0&&(p=1/Math.sqrt(p),n[0]=c*p,n[1]=f*p,n[2]=h*p,n[3]=d*p),n}},9131(s,l,n){var u=n(5177),c=n(9288);s.exports=f;function f(h,d){return d=d||1,h[0]=Math.random(),h[1]=Math.random(),h[2]=Math.random(),h[3]=Math.random(),u(h,h),c(h,h,d),h}},9288(s){s.exports=l;function l(n,u,c){return n[0]=u[0]*c,n[1]=u[1]*c,n[2]=u[2]*c,n[3]=u[3]*c,n}},4844(s){s.exports=l;function l(n,u,c,f){return n[0]=u[0]+c[0]*f,n[1]=u[1]+c[1]*f,n[2]=u[2]+c[2]*f,n[3]=u[3]+c[3]*f,n}},4578(s){s.exports=l;function l(n,u,c,f,h){return n[0]=u,n[1]=c,n[2]=f,n[3]=h,n}},7960(s){s.exports=l;function l(n,u){var c=u[0]-n[0],f=u[1]-n[1],h=u[2]-n[2],d=u[3]-n[3];return c*c+f*f+h*h+d*d}},483(s){s.exports=l;function l(n){var u=n[0],c=n[1],f=n[2],h=n[3];return u*u+c*c+f*f+h*h}},6860(s){s.exports=l;function l(n,u,c){return n[0]=u[0]-c[0],n[1]=u[1]-c[1],n[2]=u[2]-c[2],n[3]=u[3]-c[3],n}},5352(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2],p=u[3];return n[0]=c[0]*f+c[4]*h+c[8]*d+c[12]*p,n[1]=c[1]*f+c[5]*h+c[9]*d+c[13]*p,n[2]=c[2]*f+c[6]*h+c[10]*d+c[14]*p,n[3]=c[3]*f+c[7]*h+c[11]*d+c[15]*p,n}},4041(s){s.exports=l;function l(n,u,c){var f=u[0],h=u[1],d=u[2],p=c[0],g=c[1],m=c[2],y=c[3],_=y*f+g*d-m*h,v=y*h+m*f-p*d,x=y*d+p*h-g*f,E=-p*f-g*h-m*d;return n[0]=_*y+E*-p+v*-m-x*-g,n[1]=v*y+E*-g+x*-p-_*-m,n[2]=x*y+E*-m+_*-g-v*-p,n[3]=u[3],n}},1848(s,l,n){var u=n(4905),c=n(6468);s.exports=f;function f(h){for(var d=Array.isArray(h)?h:u(h),p=0;p0)continue;Se=ee.slice(0,1).join("")}return Y(Se),Z+=Se.length,L=L.slice(Se.length),L.length}while(!0)}function he(){return/[^a-fA-F0-9]/.test(z)?(Y(L.join("")),P=p,D):(L.push(z),I=z,D+1)}function oe(){return z==="."||/[eE]/.test(z)?(L.push(z),P=E,I=z,D+1):z==="x"&&L.length===1&&L[0]==="0"?(P=b,L.push(z),I=z,D+1):/[^\d]/.test(z)?(Y(L.join("")),P=p,D):(L.push(z),I=z,D+1)}function te(){return z==="f"&&(L.push(z),I=z,D+=1),/[eE]/.test(z)||(z==="-"||z==="+")&&/[eE]/.test(I)?(L.push(z),I=z,D+1):/[^\d]/.test(z)?(Y(L.join("")),P=p,D):(L.push(z),I=z,D+1)}function ie(){if(/[^\d\w_]/.test(z)){var ee=L.join("");return q[ee]?P=w:j[ee]?P=C:P=M,Y(L.join("")),P=p,D}return L.push(z),I=z,D+1}}},3508(s,l,n){var u=n(6852);u=u.slice().filter(function(c){return!/^(gl\_|texture)/.test(c)}),s.exports=u.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852(s){s.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932(s,l,n){var u=n(620);s.exports=u.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620(s){s.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827(s){s.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905(s,l,n){var u=n(5874);s.exports=c;function c(f,h){var d=u(h),p=[];return p=p.concat(d(f)),p=p.concat(d(null)),p}},3236(s){s.exports=function(l){typeof l=="string"&&(l=[l]);for(var n=[].slice.call(arguments,1),u=[],c=0;c>1,_=-7,v=c?h-1:0,x=c?-1:1,E=n[u+v];for(v+=x,d=E&(1<<-_)-1,E>>=-_,_+=g;_>0;d=d*256+n[u+v],v+=x,_-=8);for(p=d&(1<<-_)-1,d>>=-_,_+=f;_>0;p=p*256+n[u+v],v+=x,_-=8);if(d===0)d=1-y;else{if(d===m)return p?NaN:(E?-1:1)*(1/0);p=p+Math.pow(2,f),d=d-y}return(E?-1:1)*p*Math.pow(2,d-f)},l.write=function(n,u,c,f,h,d){var p,g,m,y=d*8-h-1,_=(1<>1,x=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=f?0:d-1,M=f?1:-1,C=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(g=isNaN(u)?1:0,p=_):(p=Math.floor(Math.log(u)/Math.LN2),u*(m=Math.pow(2,-p))<1&&(p--,m*=2),p+v>=1?u+=x/m:u+=x*Math.pow(2,1-v),u*m>=2&&(p++,m/=2),p+v>=_?(g=0,p=_):p+v>=1?(g=(u*m-1)*Math.pow(2,h),p=p+v):(g=u*Math.pow(2,v-1)*Math.pow(2,h),p=0));h>=8;n[c+E]=g&255,E+=M,g/=256,h-=8);for(p=p<0;n[c+E]=p&255,E+=M,p/=256,y-=8);n[c+E-M]|=C*128}},8954(s,l,n){"use strict";s.exports=v;var u=n(3250),c=n(6803).Fw;function f(x,E,M){this.vertices=x,this.adjacent=E,this.boundary=M,this.lastVisited=-1}f.prototype.flip=function(){var x=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=x;var E=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=E};function h(x,E,M){this.vertices=x,this.cell=E,this.index=M}function d(x,E){return c(x.vertices,E.vertices)}function p(x){return function(){var E=this.tuple;return x.apply(this,E)}}function g(x){var E=u[x+1];return E||(E=u),p(E)}var m=[];function y(x,E,M){this.dimension=x,this.vertices=E,this.simplices=M,this.interior=M.filter(function(k){return!k.boundary}),this.tuple=new Array(x+1);for(var C=0;C<=x;++C)this.tuple[C]=this.vertices[C];var w=m[x];w||(w=m[x]=g(x)),this.orient=w}var _=y.prototype;_.handleBoundaryDegeneracy=function(x,E){var M=this.dimension,C=this.vertices.length-1,w=this.tuple,k=this.vertices,T=[x];for(x.lastVisited=-C;T.length>0;){x=T.pop();for(var b=x.adjacent,S=0;S<=M;++S){var A=b[S];if(!(!A.boundary||A.lastVisited<=-C)){for(var F=A.vertices,D=0;D<=M;++D){var R=F[D];R<0?w[D]=E:w[D]=k[R]}var P=this.orient();if(P>0)return A;A.lastVisited=-C,P===0&&T.push(A)}}}return null},_.walk=function(x,E){var M=this.vertices.length-1,C=this.dimension,w=this.vertices,k=this.tuple,T=E?this.interior.length*Math.random()|0:this.interior.length-1,b=this.interior[T];e:for(;!b.boundary;){for(var S=b.vertices,A=b.adjacent,F=0;F<=C;++F)k[F]=w[S[F]];b.lastVisited=M;for(var F=0;F<=C;++F){var D=A[F];if(!(D.lastVisited>=M)){var R=k[F];k[F]=x;var P=this.orient();if(k[F]=R,P<0){b=D;continue e}else D.boundary?D.lastVisited=-M:D.lastVisited=M}}return}return b},_.addPeaks=function(x,E){var M=this.vertices.length-1,C=this.dimension,w=this.vertices,k=this.tuple,T=this.interior,b=this.simplices,S=[E];E.lastVisited=M,E.vertices[E.vertices.indexOf(-1)]=M,E.boundary=!1,T.push(E);for(var A=[];S.length>0;){var E=S.pop(),F=E.vertices,D=E.adjacent,R=F.indexOf(M);if(!(R<0)){for(var P=0;P<=C;++P)if(P!==R){var z=D[P];if(!(!z.boundary||z.lastVisited>=M)){var I=z.vertices;if(z.lastVisited!==-M){for(var L=0,B=0;B<=C;++B)I[B]<0?(L=B,k[B]=x):k[B]=w[I[B]];var O=this.orient();if(O>0){I[L]=M,z.boundary=!1,T.push(z),S.push(z),z.lastVisited=M;continue}else z.lastVisited=-M}var G=z.adjacent,$=F.slice(),X=D.slice(),Z=new f($,X,!0);b.push(Z);var J=G.indexOf(E);if(!(J<0)){G[J]=Z,X[R]=z,$[P]=-1,X[P]=E,D[P]=Z,Z.flip();for(var B=0;B<=C;++B){var N=$[B];if(!(N<0||N===M)){for(var H=new Array(C-1),W=0,U=0;U<=C;++U){var V=$[U];V<0||U===B||(H[W++]=V)}A.push(new h(H,Z,B))}}}}}}}A.sort(d);for(var P=0;P+1=0?T[S++]=b[F]:A=F&1;if(A===(x&1)){var D=T[0];T[0]=T[1],T[1]=D}E.push(T)}}return E};function v(x,E){var M=x.length;if(M===0)throw new Error("Must have at least d+1 points");var C=x[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var w=x.slice(0,C+1),k=u.apply(void 0,w);if(k===0)throw new Error("Input not in general position");for(var T=new Array(C+1),b=0;b<=C;++b)T[b]=b;k<0&&(T[0]=1,T[1]=0);for(var S=new f(T,new Array(C+1),!1),A=S.adjacent,F=new Array(C+2),b=0;b<=C;++b){for(var D=T.slice(),R=0;R<=C;++R)R===b&&(D[R]=-1);var P=D[0];D[0]=D[1],D[1]=P;var z=new f(D,new Array(C+1),!0);A[b]=z,F[b]=z}F[C+1]=S;for(var b=0;b<=C;++b)for(var D=A[b].vertices,I=A[b].adjacent,R=0;R<=C;++R){var L=D[R];if(L<0){I[R]=S;continue}for(var B=0;B<=C;++B)A[B].vertices.indexOf(L)<0&&(I[R]=A[B])}for(var O=new y(C,w,F),G=!!E,b=C+1;b3*(F+1)?y(this,A):this.left.insert(A):this.left=k([A]);else if(A[0]>this.mid)this.right?4*(this.right.count+1)>3*(F+1)?y(this,A):this.right.insert(A):this.right=k([A]);else{var D=u.ge(this.leftPoints,A,C),R=u.ge(this.rightPoints,A,w);this.leftPoints.splice(D,0,A),this.rightPoints.splice(R,0,A)}},p.remove=function(A){var F=this.count-this.leftPoints;if(A[1]3*(F-1))return _(this,A);var R=this.left.remove(A);return R===h?(this.left=null,this.count-=1,f):(R===f&&(this.count-=1),R)}else if(A[0]>this.mid){if(!this.right)return c;var P=this.left?this.left.count:0;if(4*P>3*(F-1))return _(this,A);var R=this.right.remove(A);return R===h?(this.right=null,this.count-=1,f):(R===f&&(this.count-=1),R)}else{if(this.count===1)return this.leftPoints[0]===A?h:c;if(this.leftPoints.length===1&&this.leftPoints[0]===A){if(this.left&&this.right){for(var z=this,I=this.left;I.right;)z=I,I=I.right;if(z===this)I.right=this.right;else{var L=this.left,R=this.right;z.count-=I.count,z.right=I.left,I.left=L,I.right=R}g(this,I),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?g(this,this.left):g(this,this.right);return f}for(var L=u.ge(this.leftPoints,A,C);L=0&&A[R][1]>=F;--R){var P=D(A[R]);if(P)return P}}function E(A,F){for(var D=0;Dthis.mid){if(this.right){var D=this.right.queryPoint(A,F);if(D)return D}return x(this.rightPoints,A,F)}else return E(this.leftPoints,F)},p.queryInterval=function(A,F,D){if(Athis.mid&&this.right){var R=this.right.queryInterval(A,F,D);if(R)return R}return Fthis.mid?x(this.rightPoints,A,D):E(this.leftPoints,D)};function M(A,F){return A-F}function C(A,F){var D=A[0]-F[0];return D||A[1]-F[1]}function w(A,F){var D=A[1]-F[1];return D||A[0]-F[0]}function k(A){if(A.length===0)return null;for(var F=[],D=0;D>1],P=[],z=[],I=[],D=0;D1&&h.indexOf("Macintosh")!==-1&&h.indexOf("Safari")!==-1&&(d=!0),d}},5219(s){"use strict";s.exports=function(l){for(var n=l.length,u,c=0;c13)&&u!==32&&u!==133&&u!==160&&u!==5760&&u!==6158&&(u<8192||u>8205)&&u!==8232&&u!==8233&&u!==8239&&u!==8287&&u!==8288&&u!==12288&&u!==65279)return!1;return!0}},395(s){function l(n,u,c){return n*(1-c)+u*c}s.exports=l},2652(s,l,n){var u=n(4335),c=n(6864),f=n(1903),h=n(9921),d=n(7608),p=n(5665),g={length:n(1387),normalize:n(3536),dot:n(244),cross:n(5911)},m=c(),y=c(),_=[0,0,0,0],v=[[0,0,0],[0,0,0],[0,0,0]],x=[0,0,0];s.exports=function(k,T,b,S,A,F){if(T||(T=[0,0,0]),b||(b=[0,0,0]),S||(S=[0,0,0]),A||(A=[0,0,0,1]),F||(F=[0,0,0,1]),!u(m,k)||(f(y,m),y[3]=0,y[7]=0,y[11]=0,y[15]=1,Math.abs(h(y)<1e-8)))return!1;var D=m[3],R=m[7],P=m[11],z=m[12],I=m[13],L=m[14],B=m[15];if(D!==0||R!==0||P!==0){_[0]=D,_[1]=R,_[2]=P,_[3]=B;var O=d(y,y);if(!O)return!1;p(y,y),E(A,_,y)}else A[0]=A[1]=A[2]=0,A[3]=1;if(T[0]=z,T[1]=I,T[2]=L,M(v,m),b[0]=g.length(v[0]),g.normalize(v[0],v[0]),S[0]=g.dot(v[0],v[1]),C(v[1],v[1],v[0],1,-S[0]),b[1]=g.length(v[1]),g.normalize(v[1],v[1]),S[0]/=b[1],S[1]=g.dot(v[0],v[2]),C(v[2],v[2],v[0],1,-S[1]),S[2]=g.dot(v[1],v[2]),C(v[2],v[2],v[1],1,-S[2]),b[2]=g.length(v[2]),g.normalize(v[2],v[2]),S[1]/=b[2],S[2]/=b[2],g.cross(x,v[1],v[2]),g.dot(v[0],x)<0)for(var G=0;G<3;G++)b[G]*=-1,v[G][0]*=-1,v[G][1]*=-1,v[G][2]*=-1;return F[0]=.5*Math.sqrt(Math.max(1+v[0][0]-v[1][1]-v[2][2],0)),F[1]=.5*Math.sqrt(Math.max(1-v[0][0]+v[1][1]-v[2][2],0)),F[2]=.5*Math.sqrt(Math.max(1-v[0][0]-v[1][1]+v[2][2],0)),F[3]=.5*Math.sqrt(Math.max(1+v[0][0]+v[1][1]+v[2][2],0)),v[2][1]>v[1][2]&&(F[0]=-F[0]),v[0][2]>v[2][0]&&(F[1]=-F[1]),v[1][0]>v[0][1]&&(F[2]=-F[2]),!0};function E(w,k,T){var b=k[0],S=k[1],A=k[2],F=k[3];return w[0]=T[0]*b+T[4]*S+T[8]*A+T[12]*F,w[1]=T[1]*b+T[5]*S+T[9]*A+T[13]*F,w[2]=T[2]*b+T[6]*S+T[10]*A+T[14]*F,w[3]=T[3]*b+T[7]*S+T[11]*A+T[15]*F,w}function M(w,k){w[0][0]=k[0],w[0][1]=k[1],w[0][2]=k[2],w[1][0]=k[4],w[1][1]=k[5],w[1][2]=k[6],w[2][0]=k[8],w[2][1]=k[9],w[2][2]=k[10]}function C(w,k,T,b,S){w[0]=k[0]*b+T[0]*S,w[1]=k[1]*b+T[1]*S,w[2]=k[2]*b+T[2]*S}},4335(s){s.exports=function(n,u){var c=u[15];if(c===0)return!1;for(var f=1/c,h=0;h<16;h++)n[h]=u[h]*f;return!0}},7442(s,l,n){var u=n(6658),c=n(7182),f=n(2652),h=n(9921),d=n(8648),p=_(),g=_(),m=_();s.exports=y;function y(E,M,C,w){if(h(M)===0||h(C)===0)return!1;var k=f(M,p.translate,p.scale,p.skew,p.perspective,p.quaternion),T=f(C,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!k||!T?!1:(u(m.translate,p.translate,g.translate,w),u(m.skew,p.skew,g.skew,w),u(m.scale,p.scale,g.scale,w),u(m.perspective,p.perspective,g.perspective,w),d(m.quaternion,p.quaternion,g.quaternion,w),c(E,m.translate,m.scale,m.skew,m.perspective,m.quaternion),!0)}function _(){return{translate:v(),scale:v(1),skew:v(),perspective:x(),quaternion:x()}}function v(E){return[E||0,E||0,E||0]}function x(){return[0,0,0,1]}},7182(s,l,n){var u={identity:n(7894),translate:n(7656),multiply:n(6760),create:n(6864),scale:n(2504),fromRotationTranslation:n(6743)},c=u.create(),f=u.create();s.exports=function(d,p,g,m,y,_){return u.identity(d),u.fromRotationTranslation(d,_,p),d[3]=y[0],d[7]=y[1],d[11]=y[2],d[15]=y[3],u.identity(f),m[2]!==0&&(f[9]=m[2],u.multiply(d,d,f)),m[1]!==0&&(f[9]=0,f[8]=m[1],u.multiply(d,d,f)),m[0]!==0&&(f[8]=0,f[4]=m[0],u.multiply(d,d,f)),u.scale(d,d,g),d}},1811(s,l,n){"use strict";var u=n(2478),c=n(7442),f=n(7608),h=n(5567),d=n(2408),p=n(7089),g=n(6582),m=n(7656),y=n(2504),_=n(3536),v=[0,0,0];s.exports=C;function x(w){this._components=w.slice(),this._time=[0],this.prevMatrix=w.slice(),this.nextMatrix=w.slice(),this.computedMatrix=w.slice(),this.computedInverse=w.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var E=x.prototype;E.recalcMatrix=function(w){var k=this._time,T=u.le(k,w),b=this.computedMatrix;if(!(T<0)){var S=this._components;if(T===k.length-1)for(var A=16*T,F=0;F<16;++F)b[F]=S[A++];else{for(var D=k[T+1]-k[T],A=16*T,R=this.prevMatrix,P=!0,F=0;F<16;++F)R[F]=S[A++];for(var z=this.nextMatrix,F=0;F<16;++F)z[F]=S[A++],P=P&&R[F]===z[F];if(D<1e-6||P)for(var F=0;F<16;++F)b[F]=R[F];else c(b,R,z,(w-k[T])/D)}var I=this.computedUp;I[0]=b[1],I[1]=b[5],I[2]=b[9],_(I,I);var L=this.computedInverse;f(L,b);var B=this.computedEye,O=L[15];B[0]=L[12]/O,B[1]=L[13]/O,B[2]=L[14]/O;for(var G=this.computedCenter,$=Math.exp(this.computedRadius[0]),F=0;F<3;++F)G[F]=B[F]-b[2+4*F]*$}},E.idle=function(w){if(!(w1&&u(f[g[v-2]],f[g[v-1]],_)<=0;)v-=1,g.pop();for(g.push(y),v=m.length;v>1&&u(f[m[v-2]],f[m[v-1]],_)>=0;)v-=1,m.pop();m.push(y)}for(var x=new Array(m.length+g.length-2),E=0,d=0,M=g.length;d0;--C)x[E++]=m[C];return x}},351(s,l,n){"use strict";s.exports=c;var u=n(4687);function c(f,h){h||(h=f,f=window);var d=0,p=0,g=0,m={shift:!1,alt:!1,control:!1,meta:!1},y=!1;function _(A){var F=!1;return"altKey"in A&&(F=F||A.altKey!==m.alt,m.alt=!!A.altKey),"shiftKey"in A&&(F=F||A.shiftKey!==m.shift,m.shift=!!A.shiftKey),"ctrlKey"in A&&(F=F||A.ctrlKey!==m.control,m.control=!!A.ctrlKey),"metaKey"in A&&(F=F||A.metaKey!==m.meta,m.meta=!!A.metaKey),F}function v(A,F){var D=u.x(F),R=u.y(F);"buttons"in F&&(A=F.buttons|0),(A!==d||D!==p||R!==g||_(F))&&(d=A|0,p=D||0,g=R||0,h&&h(d,p,g,m))}function x(A){v(0,A)}function E(){(d||p||g||m.shift||m.alt||m.meta||m.control)&&(p=g=0,d=0,m.shift=m.alt=m.control=m.meta=!1,h&&h(0,0,0,m))}function M(A){_(A)&&h&&h(d,p,g,m)}function C(A){u.buttons(A)===0?v(0,A):v(d,A)}function w(A){v(d|u.buttons(A),A)}function k(A){v(d&~u.buttons(A),A)}function T(){y||(y=!0,f.addEventListener("mousemove",C),f.addEventListener("mousedown",w),f.addEventListener("mouseup",k),f.addEventListener("mouseleave",x),f.addEventListener("mouseenter",x),f.addEventListener("mouseout",x),f.addEventListener("mouseover",x),f.addEventListener("blur",E),f.addEventListener("keyup",M),f.addEventListener("keydown",M),f.addEventListener("keypress",M),f!==window&&(window.addEventListener("blur",E),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function b(){y&&(y=!1,f.removeEventListener("mousemove",C),f.removeEventListener("mousedown",w),f.removeEventListener("mouseup",k),f.removeEventListener("mouseleave",x),f.removeEventListener("mouseenter",x),f.removeEventListener("mouseout",x),f.removeEventListener("mouseover",x),f.removeEventListener("blur",E),f.removeEventListener("keyup",M),f.removeEventListener("keydown",M),f.removeEventListener("keypress",M),f!==window&&(window.removeEventListener("blur",E),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}T();var S={element:f};return Object.defineProperties(S,{enabled:{get:function(){return y},set:function(A){A?T():b()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return p},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return m},enumerable:!0}}),S}},24(s){var l={left:0,top:0};s.exports=n;function n(c,f,h){f=f||c.currentTarget||c.srcElement,Array.isArray(h)||(h=[0,0]);var d=c.clientX||0,p=c.clientY||0,g=u(f);return h[0]=d-g.left,h[1]=p-g.top,h}function u(c){return c===window||c===document||c===document.body?l:c.getBoundingClientRect()}},4687(s,l){"use strict";function n(h){if(typeof h=="object"){if("buttons"in h)return h.buttons;if("which"in h){var d=h.which;if(d===2)return 4;if(d===3)return 2;if(d>0)return 1<=0)return 1<0){if(X=1,N[W++]=m(T[F],E,M,C),F+=O,w>0)for($=1,D=T[F],U=N[W]=m(D,E,M,C),q=N[W+V],re=N[W+Y],ue=N[W+se],(U!==q||U!==re||U!==ue)&&(P=T[F+R],I=T[F+z],B=T[F+L],p($,X,D,P,I,B,U,q,re,ue,E,M,C),fe=H[W]=Z++),W+=1,F+=O,$=2;$0)for($=1,D=T[F],U=N[W]=m(D,E,M,C),q=N[W+V],re=N[W+Y],ue=N[W+se],(U!==q||U!==re||U!==ue)&&(P=T[F+R],I=T[F+z],B=T[F+L],p($,X,D,P,I,B,U,q,re,ue,E,M,C),fe=H[W]=Z++,ue!==re&&g(H[W+Y],fe,I,B,re,ue,E,M,C)),W+=1,F+=O,$=2;$0){if($=1,N[W++]=m(T[F],E,M,C),F+=O,k>0)for(X=1,D=T[F],U=N[W]=m(D,E,M,C),re=N[W+Y],q=N[W+V],ue=N[W+se],(U!==re||U!==q||U!==ue)&&(P=T[F+R],I=T[F+z],B=T[F+L],p($,X,D,P,I,B,U,re,q,ue,E,M,C),fe=H[W]=Z++),W+=1,F+=O,X=2;X0)for(X=1,D=T[F],U=N[W]=m(D,E,M,C),re=N[W+Y],q=N[W+V],ue=N[W+se],(U!==re||U!==q||U!==ue)&&(P=T[F+R],I=T[F+z],B=T[F+L],p($,X,D,P,I,B,U,re,q,ue,E,M,C),fe=H[W]=Z++,ue!==re&&g(H[W+Y],fe,B,P,ue,re,E,M,C)),W+=1,F+=O,X=2;X 0"),typeof d.vertex!="function"&&p("Must specify vertex creation function"),typeof d.cell!="function"&&p("Must specify cell creation function"),typeof d.phase!="function"&&p("Must specify phase function");for(var _=d.getters||[],v=new Array(m),x=0;x=0?v[x]=!0:v[x]=!1;return f(d.vertex,d.cell,d.phase,y,g,v)}},6199(s,l,n){"use strict";var u=n(1338),c={zero:function(C,w,k,T){var b=C[0],S=k[0];T|=0;var A=0,F=S;for(A=0;A2&&A[1]>2&&T(S.pick(-1,-1).lo(1,1).hi(A[0]-2,A[1]-2),b.pick(-1,-1,0).lo(1,1).hi(A[0]-2,A[1]-2),b.pick(-1,-1,1).lo(1,1).hi(A[0]-2,A[1]-2)),A[1]>2&&(k(S.pick(0,-1).lo(1).hi(A[1]-2),b.pick(0,-1,1).lo(1).hi(A[1]-2)),w(b.pick(0,-1,0).lo(1).hi(A[1]-2))),A[1]>2&&(k(S.pick(A[0]-1,-1).lo(1).hi(A[1]-2),b.pick(A[0]-1,-1,1).lo(1).hi(A[1]-2)),w(b.pick(A[0]-1,-1,0).lo(1).hi(A[1]-2))),A[0]>2&&(k(S.pick(-1,0).lo(1).hi(A[0]-2),b.pick(-1,0,0).lo(1).hi(A[0]-2)),w(b.pick(-1,0,1).lo(1).hi(A[0]-2))),A[0]>2&&(k(S.pick(-1,A[1]-1).lo(1).hi(A[0]-2),b.pick(-1,A[1]-1,0).lo(1).hi(A[0]-2)),w(b.pick(-1,A[1]-1,1).lo(1).hi(A[0]-2))),b.set(0,0,0,0),b.set(0,0,1,0),b.set(A[0]-1,0,0,0),b.set(A[0]-1,0,1,0),b.set(0,A[1]-1,0,0),b.set(0,A[1]-1,1,0),b.set(A[0]-1,A[1]-1,0,0),b.set(A[0]-1,A[1]-1,1,0),b}}function M(C){var w=C.join(),A=m[w];if(A)return A;for(var k=C.length,T=[_,v],b=1;b<=k;++b)T.push(x(b));var S=E,A=S.apply(void 0,T);return m[w]=A,A}s.exports=function(w,k,T){if(Array.isArray(T)||(typeof T=="string"?T=u(k.dimension,T):T=u(k.dimension,"clamp")),k.size===0)return w;if(k.dimension===0)return w.set(0),w;var b=M(T);return b(w,k)}},4317(s){"use strict";function l(h,d){var p=Math.floor(d),g=d-p,m=0<=p&&p0;){I<64?(w=I,I=0):(w=64,I-=64);for(var L=m[1]|0;L>0;){L<64?(k=L,L=0):(k=64,L-=64),v=P+I*b+L*S,M=z+I*F+L*D;var B=0,O=0,G=0,$=A,X=b-T*A,Z=S-w*b,J=R,N=F-T*R,H=D-w*F;for(G=0;G0;){D<64?(w=D,D=0):(w=64,D-=64);for(var R=m[0]|0;R>0;){R<64?(C=R,R=0):(C=64,R-=64),v=A+D*T+R*k,M=F+D*S+R*b;var P=0,z=0,I=T,L=k-w*T,B=S,O=b-w*S;for(z=0;z0;){z<64?(k=z,z=0):(k=64,z-=64);for(var I=m[0]|0;I>0;){I<64?(C=I,I=0):(C=64,I-=64);for(var L=m[1]|0;L>0;){L<64?(w=L,L=0):(w=64,L-=64),v=R+z*S+I*T+L*b,M=P+z*D+I*A+L*F;var B=0,O=0,G=0,$=S,X=T-k*S,Z=b-C*T,J=D,N=A-k*D,H=F-C*A;for(G=0;Gx;){B=0,O=P-w;t:for(I=0;I$)break t;O+=A,B+=F}for(B=P,O=P-w,I=0;I>1,L=I-R,B=I+R,O=P,G=L,$=I,X=B,Z=z,J=E+1,N=M-1,H=!0,W,U,V,j,q,Y,K,re,se,le=0,ue=0,fe=0,pe,we,xe,he,oe,te,ie,ee,ce,_e,Se,Me,Ue,Ge,Ze,Ke,dt=S,_t=_(dt),Pt=_(dt);we=k*O,xe=k*G,Ke=w;e:for(pe=0;pe0){U=O,O=G,G=U;break e}if(fe<0)break e;Ke+=F}we=k*X,xe=k*Z,Ke=w;e:for(pe=0;pe0){U=X,X=Z,Z=U;break e}if(fe<0)break e;Ke+=F}we=k*O,xe=k*$,Ke=w;e:for(pe=0;pe0){U=O,O=$,$=U;break e}if(fe<0)break e;Ke+=F}we=k*G,xe=k*$,Ke=w;e:for(pe=0;pe0){U=G,G=$,$=U;break e}if(fe<0)break e;Ke+=F}we=k*O,xe=k*X,Ke=w;e:for(pe=0;pe0){U=O,O=X,X=U;break e}if(fe<0)break e;Ke+=F}we=k*$,xe=k*X,Ke=w;e:for(pe=0;pe0){U=$,$=X,X=U;break e}if(fe<0)break e;Ke+=F}we=k*G,xe=k*Z,Ke=w;e:for(pe=0;pe0){U=G,G=Z,Z=U;break e}if(fe<0)break e;Ke+=F}we=k*G,xe=k*$,Ke=w;e:for(pe=0;pe0){U=G,G=$,$=U;break e}if(fe<0)break e;Ke+=F}we=k*X,xe=k*Z,Ke=w;e:for(pe=0;pe0){U=X,X=Z,Z=U;break e}if(fe<0)break e;Ke+=F}for(we=k*O,xe=k*G,he=k*$,oe=k*X,te=k*Z,ie=k*P,ee=k*I,ce=k*z,Ze=0,Ke=w,pe=0;pe0)N--;else if(fe<0){for(we=k*Y,xe=k*J,he=k*N,Ke=w,pe=0;pe0)for(;;){K=w+N*k,Ze=0;e:for(pe=0;pe0){if(--Nz){e:for(;;){for(K=w+J*k,Ze=0,Ke=w,pe=0;pe1&&x?M(v,x[0],x[1]):M(v)}var g={"uint32,1,0":function(y,_){return function(v){var x=v.data,E=v.offset|0,M=v.shape,C=v.stride,w=C[0]|0,k=M[0]|0,T=C[1]|0,b=M[1]|0,S=T,A=T,F=1;k<=32?y(0,k-1,x,E,w,T,k,b,S,A,F):_(0,k-1,x,E,w,T,k,b,S,A,F)}}};function m(y,_){var v=[_,y].join(","),x=g[v],E=h(y,_),M=p(y,_,E);return x(E,M)}s.exports=m},446(s,l,n){"use strict";var u=n(7640),c={};function f(h){var d=h.order,p=h.dtype,g=[d,p],m=g.join(":"),y=c[m];return y||(c[m]=y=u(d,p)),y(h),h}s.exports=f},9618(s,l,n){var u=n(7163),c=typeof Float64Array<"u";function f(_,v){return _[0]-v[0]}function h(){var _=this.stride,v=new Array(_.length),x;for(x=0;x=0&&(T=w|0,k+=S*T,b-=T),new E(this.data,b,S,k)},M.step=function(w){var k=this.shape[0],T=this.stride[0],b=this.offset,S=0,A=Math.ceil;return typeof w=="number"&&(S=w|0,S<0?(b+=T*(k-1),k=A(-k/S)):k=A(k/S),T*=S),new E(this.data,k,T,b)},M.transpose=function(w){w=w===void 0?0:w|0;var k=this.shape,T=this.stride;return new E(this.data,k[w],T[w],this.offset)},M.pick=function(w){var k=[],T=[],b=this.offset;typeof w=="number"&&w>=0?b=b+this.stride[0]*w|0:(k.push(this.shape[0]),T.push(this.stride[0]));var S=v[k.length+1];return S(this.data,k,T,b)},function(w,k,T,b){return new E(w,k[0],T[0],b)}},2:function(_,v,x){function E(C,w,k,T,b,S){this.data=C,this.shape=[w,k],this.stride=[T,b],this.offset=S|0}var M=E.prototype;return M.dtype=_,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(w,k,T){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*k,T):this.data[this.offset+this.stride[0]*w+this.stride[1]*k]=T},M.get=function(w,k){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*k):this.data[this.offset+this.stride[0]*w+this.stride[1]*k]},M.index=function(w,k){return this.offset+this.stride[0]*w+this.stride[1]*k},M.hi=function(w,k){return new E(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof k!="number"||k<0?this.shape[1]:k|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(w,k){var T=this.offset,b=0,S=this.shape[0],A=this.shape[1],F=this.stride[0],D=this.stride[1];return typeof w=="number"&&w>=0&&(b=w|0,T+=F*b,S-=b),typeof k=="number"&&k>=0&&(b=k|0,T+=D*b,A-=b),new E(this.data,S,A,F,D,T)},M.step=function(w,k){var T=this.shape[0],b=this.shape[1],S=this.stride[0],A=this.stride[1],F=this.offset,D=0,R=Math.ceil;return typeof w=="number"&&(D=w|0,D<0?(F+=S*(T-1),T=R(-T/D)):T=R(T/D),S*=D),typeof k=="number"&&(D=k|0,D<0?(F+=A*(b-1),b=R(-b/D)):b=R(b/D),A*=D),new E(this.data,T,b,S,A,F)},M.transpose=function(w,k){w=w===void 0?0:w|0,k=k===void 0?1:k|0;var T=this.shape,b=this.stride;return new E(this.data,T[w],T[k],b[w],b[k],this.offset)},M.pick=function(w,k){var T=[],b=[],S=this.offset;typeof w=="number"&&w>=0?S=S+this.stride[0]*w|0:(T.push(this.shape[0]),b.push(this.stride[0])),typeof k=="number"&&k>=0?S=S+this.stride[1]*k|0:(T.push(this.shape[1]),b.push(this.stride[1]));var A=v[T.length+1];return A(this.data,T,b,S)},function(w,k,T,b){return new E(w,k[0],k[1],T[0],T[1],b)}},3:function(_,v,x){function E(C,w,k,T,b,S,A,F){this.data=C,this.shape=[w,k,T],this.stride=[b,S,A],this.offset=F|0}var M=E.prototype;return M.dtype=_,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var w=Math.abs(this.stride[0]),k=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return w>k?k>T?[2,1,0]:w>T?[1,2,0]:[1,0,2]:w>T?[2,0,1]:T>k?[0,1,2]:[0,2,1]}}),M.set=function(w,k,T,b){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T,b):this.data[this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T]=b},M.get=function(w,k,T){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T):this.data[this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T]},M.index=function(w,k,T){return this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T},M.hi=function(w,k,T){return new E(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof k!="number"||k<0?this.shape[1]:k|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(w,k,T){var b=this.offset,S=0,A=this.shape[0],F=this.shape[1],D=this.shape[2],R=this.stride[0],P=this.stride[1],z=this.stride[2];return typeof w=="number"&&w>=0&&(S=w|0,b+=R*S,A-=S),typeof k=="number"&&k>=0&&(S=k|0,b+=P*S,F-=S),typeof T=="number"&&T>=0&&(S=T|0,b+=z*S,D-=S),new E(this.data,A,F,D,R,P,z,b)},M.step=function(w,k,T){var b=this.shape[0],S=this.shape[1],A=this.shape[2],F=this.stride[0],D=this.stride[1],R=this.stride[2],P=this.offset,z=0,I=Math.ceil;return typeof w=="number"&&(z=w|0,z<0?(P+=F*(b-1),b=I(-b/z)):b=I(b/z),F*=z),typeof k=="number"&&(z=k|0,z<0?(P+=D*(S-1),S=I(-S/z)):S=I(S/z),D*=z),typeof T=="number"&&(z=T|0,z<0?(P+=R*(A-1),A=I(-A/z)):A=I(A/z),R*=z),new E(this.data,b,S,A,F,D,R,P)},M.transpose=function(w,k,T){w=w===void 0?0:w|0,k=k===void 0?1:k|0,T=T===void 0?2:T|0;var b=this.shape,S=this.stride;return new E(this.data,b[w],b[k],b[T],S[w],S[k],S[T],this.offset)},M.pick=function(w,k,T){var b=[],S=[],A=this.offset;typeof w=="number"&&w>=0?A=A+this.stride[0]*w|0:(b.push(this.shape[0]),S.push(this.stride[0])),typeof k=="number"&&k>=0?A=A+this.stride[1]*k|0:(b.push(this.shape[1]),S.push(this.stride[1])),typeof T=="number"&&T>=0?A=A+this.stride[2]*T|0:(b.push(this.shape[2]),S.push(this.stride[2]));var F=v[b.length+1];return F(this.data,b,S,A)},function(w,k,T,b){return new E(w,k[0],k[1],k[2],T[0],T[1],T[2],b)}},4:function(_,v,x){function E(C,w,k,T,b,S,A,F,D,R){this.data=C,this.shape=[w,k,T,b],this.stride=[S,A,F,D],this.offset=R|0}var M=E.prototype;return M.dtype=_,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:x}),M.set=function(w,k,T,b,S){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T+this.stride[3]*b,S):this.data[this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T+this.stride[3]*b]=S},M.get=function(w,k,T,b){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T+this.stride[3]*b):this.data[this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T+this.stride[3]*b]},M.index=function(w,k,T,b){return this.offset+this.stride[0]*w+this.stride[1]*k+this.stride[2]*T+this.stride[3]*b},M.hi=function(w,k,T,b){return new E(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof k!="number"||k<0?this.shape[1]:k|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof b!="number"||b<0?this.shape[3]:b|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},M.lo=function(w,k,T,b){var S=this.offset,A=0,F=this.shape[0],D=this.shape[1],R=this.shape[2],P=this.shape[3],z=this.stride[0],I=this.stride[1],L=this.stride[2],B=this.stride[3];return typeof w=="number"&&w>=0&&(A=w|0,S+=z*A,F-=A),typeof k=="number"&&k>=0&&(A=k|0,S+=I*A,D-=A),typeof T=="number"&&T>=0&&(A=T|0,S+=L*A,R-=A),typeof b=="number"&&b>=0&&(A=b|0,S+=B*A,P-=A),new E(this.data,F,D,R,P,z,I,L,B,S)},M.step=function(w,k,T,b){var S=this.shape[0],A=this.shape[1],F=this.shape[2],D=this.shape[3],R=this.stride[0],P=this.stride[1],z=this.stride[2],I=this.stride[3],L=this.offset,B=0,O=Math.ceil;return typeof w=="number"&&(B=w|0,B<0?(L+=R*(S-1),S=O(-S/B)):S=O(S/B),R*=B),typeof k=="number"&&(B=k|0,B<0?(L+=P*(A-1),A=O(-A/B)):A=O(A/B),P*=B),typeof T=="number"&&(B=T|0,B<0?(L+=z*(F-1),F=O(-F/B)):F=O(F/B),z*=B),typeof b=="number"&&(B=b|0,B<0?(L+=I*(D-1),D=O(-D/B)):D=O(D/B),I*=B),new E(this.data,S,A,F,D,R,P,z,I,L)},M.transpose=function(w,k,T,b){w=w===void 0?0:w|0,k=k===void 0?1:k|0,T=T===void 0?2:T|0,b=b===void 0?3:b|0;var S=this.shape,A=this.stride;return new E(this.data,S[w],S[k],S[T],S[b],A[w],A[k],A[T],A[b],this.offset)},M.pick=function(w,k,T,b){var S=[],A=[],F=this.offset;typeof w=="number"&&w>=0?F=F+this.stride[0]*w|0:(S.push(this.shape[0]),A.push(this.stride[0])),typeof k=="number"&&k>=0?F=F+this.stride[1]*k|0:(S.push(this.shape[1]),A.push(this.stride[1])),typeof T=="number"&&T>=0?F=F+this.stride[2]*T|0:(S.push(this.shape[2]),A.push(this.stride[2])),typeof b=="number"&&b>=0?F=F+this.stride[3]*b|0:(S.push(this.shape[3]),A.push(this.stride[3]));var D=v[S.length+1];return D(this.data,S,A,F)},function(w,k,T,b){return new E(w,k[0],k[1],k[2],k[3],T[0],T[1],T[2],T[3],b)}},5:function(v,x,E){function M(w,k,T,b,S,A,F,D,R,P,z,I){this.data=w,this.shape=[k,T,b,S,A],this.stride=[F,D,R,P,z],this.offset=I|0}var C=M.prototype;return C.dtype=v,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:E}),C.set=function(k,T,b,S,A,F){return v==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*T+this.stride[2]*b+this.stride[3]*S+this.stride[4]*A,F):this.data[this.offset+this.stride[0]*k+this.stride[1]*T+this.stride[2]*b+this.stride[3]*S+this.stride[4]*A]=F},C.get=function(k,T,b,S,A){return v==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*T+this.stride[2]*b+this.stride[3]*S+this.stride[4]*A):this.data[this.offset+this.stride[0]*k+this.stride[1]*T+this.stride[2]*b+this.stride[3]*S+this.stride[4]*A]},C.index=function(k,T,b,S,A){return this.offset+this.stride[0]*k+this.stride[1]*T+this.stride[2]*b+this.stride[3]*S+this.stride[4]*A},C.hi=function(k,T,b,S,A){return new M(this.data,typeof k!="number"||k<0?this.shape[0]:k|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof b!="number"||b<0?this.shape[2]:b|0,typeof S!="number"||S<0?this.shape[3]:S|0,typeof A!="number"||A<0?this.shape[4]:A|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(k,T,b,S,A){var F=this.offset,D=0,R=this.shape[0],P=this.shape[1],z=this.shape[2],I=this.shape[3],L=this.shape[4],B=this.stride[0],O=this.stride[1],G=this.stride[2],$=this.stride[3],X=this.stride[4];return typeof k=="number"&&k>=0&&(D=k|0,F+=B*D,R-=D),typeof T=="number"&&T>=0&&(D=T|0,F+=O*D,P-=D),typeof b=="number"&&b>=0&&(D=b|0,F+=G*D,z-=D),typeof S=="number"&&S>=0&&(D=S|0,F+=$*D,I-=D),typeof A=="number"&&A>=0&&(D=A|0,F+=X*D,L-=D),new M(this.data,R,P,z,I,L,B,O,G,$,X,F)},C.step=function(k,T,b,S,A){var F=this.shape[0],D=this.shape[1],R=this.shape[2],P=this.shape[3],z=this.shape[4],I=this.stride[0],L=this.stride[1],B=this.stride[2],O=this.stride[3],G=this.stride[4],$=this.offset,X=0,Z=Math.ceil;return typeof k=="number"&&(X=k|0,X<0?($+=I*(F-1),F=Z(-F/X)):F=Z(F/X),I*=X),typeof T=="number"&&(X=T|0,X<0?($+=L*(D-1),D=Z(-D/X)):D=Z(D/X),L*=X),typeof b=="number"&&(X=b|0,X<0?($+=B*(R-1),R=Z(-R/X)):R=Z(R/X),B*=X),typeof S=="number"&&(X=S|0,X<0?($+=O*(P-1),P=Z(-P/X)):P=Z(P/X),O*=X),typeof A=="number"&&(X=A|0,X<0?($+=G*(z-1),z=Z(-z/X)):z=Z(z/X),G*=X),new M(this.data,F,D,R,P,z,I,L,B,O,G,$)},C.transpose=function(k,T,b,S,A){k=k===void 0?0:k|0,T=T===void 0?1:T|0,b=b===void 0?2:b|0,S=S===void 0?3:S|0,A=A===void 0?4:A|0;var F=this.shape,D=this.stride;return new M(this.data,F[k],F[T],F[b],F[S],F[A],D[k],D[T],D[b],D[S],D[A],this.offset)},C.pick=function(k,T,b,S,A){var F=[],D=[],R=this.offset;typeof k=="number"&&k>=0?R=R+this.stride[0]*k|0:(F.push(this.shape[0]),D.push(this.stride[0])),typeof T=="number"&&T>=0?R=R+this.stride[1]*T|0:(F.push(this.shape[1]),D.push(this.stride[1])),typeof b=="number"&&b>=0?R=R+this.stride[2]*b|0:(F.push(this.shape[2]),D.push(this.stride[2])),typeof S=="number"&&S>=0?R=R+this.stride[3]*S|0:(F.push(this.shape[3]),D.push(this.stride[3])),typeof A=="number"&&A>=0?R=R+this.stride[4]*A|0:(F.push(this.shape[4]),D.push(this.stride[4]));var P=x[F.length+1];return P(this.data,F,D,R)},function(k,T,b,S){return new M(k,T[0],T[1],T[2],T[3],T[4],b[0],b[1],b[2],b[3],b[4],S)}}};function p(_,v){var x=v===-1?"T":String(v),E=d[x];return v===-1?E(_):v===0?E(_,m[_][0]):E(_,m[_],h)}function g(_){if(u(_))return"buffer";if(c)switch(Object.prototype.toString.call(_)){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(_)?"array":"generic"}var m={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function y(_,v,x,E){if(_===void 0){var b=m.array[0];return b([])}else typeof _=="number"&&(_=[_]);v===void 0&&(v=[_.length]);var M=v.length;if(x===void 0){x=new Array(M);for(var C=M-1,w=1;C>=0;--C)x[C]=w,w*=v[C]}if(E===void 0){E=0;for(var C=0;C>>0;s.exports=h;function h(d,p){if(isNaN(d)||isNaN(p))return NaN;if(d===p)return d;if(d===0)return p<0?-c:c;var g=u.hi(d),m=u.lo(d);return p>d==d>0?m===f?(g+=1,m=0):m+=1:m===0?(m=f,g-=1):m-=1,u.pack(m,g)}},8406(s,l){var n=1e-6,u=1e-6;l.vertexNormals=function(c,f,h){for(var d=f.length,p=new Array(d),g=h===void 0?n:h,m=0;mg)for(var F=p[v],D=1/Math.sqrt(T*S),A=0;A<3;++A){var R=(A+1)%3,P=(A+2)%3;F[A]+=D*(b[R]*k[P]-b[P]*k[R])}}for(var m=0;mg)for(var D=1/Math.sqrt(z),A=0;A<3;++A)F[A]*=D;else for(var A=0;A<3;++A)F[A]=0}return p},l.faceNormals=function(c,f,h){for(var d=c.length,p=new Array(d),g=h===void 0?u:h,m=0;mg?C=1/Math.sqrt(C):C=0;for(var v=0;v<3;++v)M[v]*=C;p[m]=M}return p}},4081(s){"use strict";s.exports=l;function l(n,u,c,f,h,d,p,g,m,y){var _=u+d+y;if(v>0){var v=Math.sqrt(_+1);n[0]=.5*(p-m)/v,n[1]=.5*(g-f)/v,n[2]=.5*(c-d)/v,n[3]=.5*v}else{var x=Math.max(u,d,y),v=Math.sqrt(2*x-_+1);u>=x?(n[0]=.5*v,n[1]=.5*(h+c)/v,n[2]=.5*(g+f)/v,n[3]=.5*(p-m)/v):d>=x?(n[0]=.5*(c+h)/v,n[1]=.5*v,n[2]=.5*(m+p)/v,n[3]=.5*(g-f)/v):(n[0]=.5*(f+g)/v,n[1]=.5*(p+m)/v,n[2]=.5*v,n[3]=.5*(c-h)/v)}return n}},9977(s,l,n){"use strict";s.exports=v;var u=n(9215),c=n(6582),f=n(7399),h=n(7608),d=n(4081);function p(x,E,M){return Math.sqrt(Math.pow(x,2)+Math.pow(E,2)+Math.pow(M,2))}function g(x,E,M,C){return Math.sqrt(Math.pow(x,2)+Math.pow(E,2)+Math.pow(M,2)+Math.pow(C,2))}function m(x,E){var M=E[0],C=E[1],w=E[2],k=E[3],T=g(M,C,w,k);T>1e-6?(x[0]=M/T,x[1]=C/T,x[2]=w/T,x[3]=k/T):(x[0]=x[1]=x[2]=0,x[3]=1)}function y(x,E,M){this.radius=u([M]),this.center=u(E),this.rotation=u(x),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var _=y.prototype;_.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},_.recalcMatrix=function(x){this.radius.curve(x),this.center.curve(x),this.rotation.curve(x);var E=this.computedRotation;m(E,E);var M=this.computedMatrix;f(M,E);var C=this.computedCenter,w=this.computedEye,k=this.computedUp,T=Math.exp(this.computedRadius[0]);w[0]=C[0]+T*M[2],w[1]=C[1]+T*M[6],w[2]=C[2]+T*M[10],k[0]=M[1],k[1]=M[5],k[2]=M[9];for(var b=0;b<3;++b){for(var S=0,A=0;A<3;++A)S+=M[b+4*A]*w[A];M[12+b]=-S}},_.getMatrix=function(x,E){this.recalcMatrix(x);var M=this.computedMatrix;if(E){for(var C=0;C<16;++C)E[C]=M[C];return E}return M},_.idle=function(x){this.center.idle(x),this.radius.idle(x),this.rotation.idle(x)},_.flush=function(x){this.center.flush(x),this.radius.flush(x),this.rotation.flush(x)},_.pan=function(x,E,M,C){E=E||0,M=M||0,C=C||0,this.recalcMatrix(x);var w=this.computedMatrix,k=w[1],T=w[5],b=w[9],S=p(k,T,b);k/=S,T/=S,b/=S;var A=w[0],F=w[4],D=w[8],R=A*k+F*T+D*b;A-=k*R,F-=T*R,D-=b*R;var P=p(A,F,D);A/=P,F/=P,D/=P;var z=w[2],I=w[6],L=w[10],B=z*k+I*T+L*b,O=z*A+I*F+L*D;z-=B*k+O*A,I-=B*T+O*F,L-=B*b+O*D;var G=p(z,I,L);z/=G,I/=G,L/=G;var $=A*E+k*M,X=F*E+T*M,Z=D*E+b*M;this.center.move(x,$,X,Z);var J=Math.exp(this.computedRadius[0]);J=Math.max(1e-4,J+C),this.radius.set(x,Math.log(J))},_.rotate=function(x,E,M,C){this.recalcMatrix(x),E=E||0,M=M||0;var w=this.computedMatrix,k=w[0],T=w[4],b=w[8],S=w[1],A=w[5],F=w[9],D=w[2],R=w[6],P=w[10],z=E*k+M*S,I=E*T+M*A,L=E*b+M*F,B=-(R*L-P*I),O=-(P*z-D*L),G=-(D*I-R*z),$=Math.sqrt(Math.max(0,1-Math.pow(B,2)-Math.pow(O,2)-Math.pow(G,2))),X=g(B,O,G,$);X>1e-6?(B/=X,O/=X,G/=X,$/=X):(B=O=G=0,$=1);var Z=this.computedRotation,J=Z[0],N=Z[1],H=Z[2],W=Z[3],U=J*$+W*B+N*G-H*O,V=N*$+W*O+H*B-J*G,j=H*$+W*G+J*O-N*B,q=W*$-J*B-N*O-H*G;if(C){B=D,O=R,G=P;var Y=Math.sin(C)/p(B,O,G);B*=Y,O*=Y,G*=Y,$=Math.cos(E),U=U*$+q*B+V*G-j*O,V=V*$+q*O+j*B-U*G,j=j*$+q*G+U*O-V*B,q=q*$-U*B-V*O-j*G}var K=g(U,V,j,q);K>1e-6?(U/=K,V/=K,j/=K,q/=K):(U=V=j=0,q=1),this.rotation.set(x,U,V,j,q)},_.lookAt=function(x,E,M,C){this.recalcMatrix(x),M=M||this.computedCenter,E=E||this.computedEye,C=C||this.computedUp;var w=this.computedMatrix;c(w,E,M,C);var k=this.computedRotation;d(k,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),m(k,k),this.rotation.set(x,k[0],k[1],k[2],k[3]);for(var T=0,b=0;b<3;++b)T+=Math.pow(M[b]-E[b],2);this.radius.set(x,.5*Math.log(Math.max(T,1e-6))),this.center.set(x,M[0],M[1],M[2])},_.translate=function(x,E,M,C){this.center.move(x,E||0,M||0,C||0)},_.setMatrix=function(x,E){var M=this.computedRotation;d(M,E[0],E[1],E[2],E[4],E[5],E[6],E[8],E[9],E[10]),m(M,M),this.rotation.set(x,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;h(C,E);var w=C[15];if(Math.abs(w)>1e-6){var k=C[12]/w,T=C[13]/w,b=C[14]/w;this.recalcMatrix(x);var S=Math.exp(this.computedRadius[0]);this.center.set(x,k-C[2]*S,T-C[6]*S,b-C[10]*S),this.radius.idle(x)}else this.center.idle(x),this.radius.idle(x)},_.setDistance=function(x,E){E>0&&this.radius.set(x,Math.log(E))},_.setDistanceLimits=function(x,E){x>0?x=Math.log(x):x=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,x),this.radius.bounds[0][0]=x,this.radius.bounds[1][0]=E},_.getDistanceLimits=function(x){var E=this.radius.bounds;return x?(x[0]=Math.exp(E[0][0]),x[1]=Math.exp(E[1][0]),x):[Math.exp(E[0][0]),Math.exp(E[1][0])]},_.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]}},_.fromJSON=function(x){var E=this.lastT(),M=x.center;M&&this.center.set(E,M[0],M[1],M[2]);var C=x.rotation;C&&this.rotation.set(E,C[0],C[1],C[2],C[3]);var w=x.distance;w&&w>0&&this.radius.set(E,Math.log(w)),this.setDistanceLimits(x.zoomMin,x.zoomMax)};function v(x){x=x||{};var E=x.center||[0,0,0],M=x.rotation||[0,0,0,1],C=x.radius||1;E=[].slice.call(E,0,3),M=[].slice.call(M,0,4),m(M,M);var w=new y(M,E,Math.log(C));return w.setDistanceLimits(x.zoomMin,x.zoomMax),("eye"in x||"up"in x)&&w.lookAt(0,x.eye,x.center,x.up),w}},1371(s,l,n){"use strict";var u=n(3233);s.exports=function(f,h,d){return d=typeof d<"u"?d+"":" ",u(d,h)+f}},3202(s){s.exports=function(n,u){u||(u=[0,""]),n=String(n);var c=parseFloat(n,10);return u[0]=c,u[1]=n.match(/[\d.\-\+]*\s*(.*)/)[1]||"",u}},3088(s,l,n){"use strict";s.exports=c;var u=n(3140);function c(f,h){for(var d=h.length|0,p=f.length,g=[new Array(d),new Array(d)],m=0;m0){F=g[P][S][0],R=P;break}D=F[R^1];for(var z=0;z<2;++z)for(var I=g[z][S],L=0;L0&&(F=B,D=O,R=z)}return A||F&&v(F,R),D}function E(b,S){var A=g[S][b][0],F=[b];v(A,S);for(var D=A[S^1],R=S;;){for(;D!==b;)F.push(D),D=x(F[F.length-2],D,!1);if(g[0][b].length+g[1][b].length===0)break;var P=F[F.length-1],z=b,I=F[1],L=x(P,z,!0);if(u(h[P],h[z],h[I],h[L])<0)break;F.push(b),D=x(P,z)}return F}function M(b,S){return S[1]===S[S.length-1]}for(var m=0;m0;){var k=g[0][m].length,T=E(m,C);M(w,T)?w.push.apply(w,T):(w.length>0&&_.push(w),w=T)}w.length>0&&_.push(w)}return _}},5609(s,l,n){"use strict";s.exports=c;var u=n(3134);function c(f,h){for(var d=u(f,h.length),p=new Array(h.length),g=new Array(h.length),m=[],y=0;y0;){var v=m.pop();p[v]=!1;for(var x=d[v],y=0;y0}k=k.filter(T);for(var b=k.length,S=new Array(b),A=new Array(b),w=0;w0;){var K=j.pop(),re=X[K];p(re,function(pe,we){return pe-we});var se=re.length,le=q[K],ue;if(le===0){var I=k[K];ue=[I]}for(var w=0;w=0)&&(q[fe]=le^1,j.push(fe),le===0)){var I=k[fe];V(I)||(I.reverse(),ue.push(I))}}le===0&&Y.push(ue)}return Y}},5085(s,l,n){s.exports=x;var u=n(3250)[3],c=n(4209),f=n(3352),h=n(2478);function d(){return!0}function p(E){return function(M,C){var w=E[M];return w?!!w.queryPoint(C,d):!1}}function g(E){for(var M={},C=0;C0&&M[w]===C[0])k=E[w-1];else return 1;for(var T=1;k;){var b=k.key,S=u(C,b[0],b[1]);if(b[0][0]0)T=-1,k=k.right;else return 0;else if(S>0)k=k.left;else if(S<0)T=1,k=k.right;else return 0}return T}}function y(E){return 1}function _(E){return function(C){return E(C[0],C[1])?0:1}}function v(E,M){return function(w){return E(w[0],w[1])?0:M(w)}}function x(E){for(var M=E.length,C=[],w=[],k=0,T=0;T=y?(b=1,A=y+2*x+M):(b=-x/y,A=x*b+M)):(b=0,E>=0?(S=0,A=M):-E>=v?(S=1,A=v+2*E+M):(S=-E/v,A=E*S+M));else if(S<0)S=0,x>=0?(b=0,A=M):-x>=y?(b=1,A=y+2*x+M):(b=-x/y,A=x*b+M);else{var F=1/T;b*=F,S*=F,A=b*(y*b+_*S+2*x)+S*(_*b+v*S+2*E)+M}else{var D,R,P,z;b<0?(D=_+x,R=v+E,R>D?(P=R-D,z=y-2*_+v,P>=z?(b=1,S=0,A=y+2*x+M):(b=P/z,S=1-b,A=b*(y*b+_*S+2*x)+S*(_*b+v*S+2*E)+M)):(b=0,R<=0?(S=1,A=v+2*E+M):E>=0?(S=0,A=M):(S=-E/v,A=E*S+M))):S<0?(D=_+E,R=y+x,R>D?(P=R-D,z=y-2*_+v,P>=z?(S=1,b=0,A=v+2*E+M):(S=P/z,b=1-S,A=b*(y*b+_*S+2*x)+S*(_*b+v*S+2*E)+M)):(S=0,R<=0?(b=1,A=y+2*x+M):x>=0?(b=0,A=M):(b=-x/y,A=x*b+M))):(P=v+E-_-x,P<=0?(b=0,S=1,A=v+2*E+M):(z=y-2*_+v,P>=z?(b=1,S=0,A=y+2*x+M):(b=P/z,S=1-b,A=b*(y*b+_*S+2*x)+S*(_*b+v*S+2*E)+M)))}for(var I=1-b-S,m=0;m0){var v=d[g-1];if(u(y,v)===0&&f(v)!==_){g-=1;continue}}d[g++]=y}}return d.length=g,d}},3233(s){"use strict";var l="",n;s.exports=u;function u(c,f){if(typeof c!="string")throw new TypeError("expected a string");if(f===1)return c;if(f===2)return c+c;var h=c.length*f;if(n!==c||typeof n>"u")n=c,l="";else if(l.length>=h)return l.substr(0,h);for(;h>l.length&&f>1;)f&1&&(l+=c),f>>=1,c+=c;return l+=c,l=l.substr(0,h),l}},3025(s,l,n){s.exports=n.g.performance&&n.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004(s){"use strict";s.exports=l;function l(n){for(var u=n.length,c=n[n.length-1],f=u,h=u-2;h>=0;--h){var d=c,p=n[h];c=d+p;var g=c-d,m=p-g;m&&(n[--f]=c,c=m)}for(var y=0,h=f;h0){if(R<=0)return P;z=D+R}else if(D<0){if(R>=0)return P;z=-(D+R)}else return P;var I=g*z;return P>=I||P<=-I?P:E(S,A,F)},function(S,A,F,D){var R=S[0]-D[0],P=A[0]-D[0],z=F[0]-D[0],I=S[1]-D[1],L=A[1]-D[1],B=F[1]-D[1],O=S[2]-D[2],G=A[2]-D[2],$=F[2]-D[2],X=P*B,Z=z*L,J=z*I,N=R*B,H=R*L,W=P*I,U=O*(X-Z)+G*(J-N)+$*(H-W),V=(Math.abs(X)+Math.abs(Z))*Math.abs(O)+(Math.abs(J)+Math.abs(N))*Math.abs(G)+(Math.abs(H)+Math.abs(W))*Math.abs($),j=m*V;return U>j||-U>j?U:M(S,A,F,D)}];function w(b){var S=C[b.length];return S||(S=C[b.length]=x(b.length)),S.apply(void 0,b)}function k(b,S,A,F,D,R,P){return function(I,L,B,O,G){switch(arguments.length){case 0:case 1:return 0;case 2:return F(I,L);case 3:return D(I,L,B);case 4:return R(I,L,B,O);case 5:return P(I,L,B,O,G)}for(var $=new Array(arguments.length),X=0;X0&&y>0||m<0&&y<0)return!1;var _=u(p,h,d),v=u(g,h,d);return _>0&&v>0||_<0&&v<0?!1:m===0&&y===0&&_===0&&v===0?c(h,d,p,g):!0}},8545(s){"use strict";s.exports=n;function l(u,c){var f=u+c,h=f-u,d=f-h,p=c-h,g=u-d,m=g+p;return m?[m,f]:[f]}function n(u,c){var f=u.length|0,h=c.length|0;if(f===1&&h===1)return l(u[0],-c[0]);var d=f+h,p=new Array(d),g=0,m=0,y=0,_=Math.abs,v=u[m],x=_(v),E=-c[y],M=_(E),C,w;x=h?(C=v,m+=1,m=h?(C=v,m+=1,m"u"&&(C=d(x));var w=x.length;if(w===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var k=p(E,+M),T=g(x,C),b=m(T,E,k,+M),S=y(T,E.length|0),A=h(C)(x,T.data,S,k),F=_(T),D=[].slice.call(b.data,0,b.shape[0]);return c.free(k),c.free(T.data),c.free(b.data),c.free(S),{cells:A,vertexIds:F,vertexWeights:D}}},1570(s){"use strict";s.exports=n;var l=[function(){function c(h,d,p,g){for(var m=Math.min(p,g)|0,y=Math.max(p,g)|0,_=h[2*m],v=h[2*m+1];_>1,E=d[2*x+1];if(E===y)return x;y>1,E=d[2*x+1];if(E===y)return x;y>1,E=d[2*x+1];if(E===y)return x;y>1,E=d[2*x+1];if(E===y)return x;y>1,z=g(S[P],A);z<=0?(z===0&&(R=P),F=P+1):z>0&&(D=P-1)}return R}u=v;function x(S,A){for(var F=new Array(S.length),D=0,R=F.length;D=S.length||g(S[X],P)!==0););}return F}u=x;function E(S,A){if(!A)return x(_(C(S,0)),S,0);for(var F=new Array(A),D=0;D>>B&1&&L.push(R[B]);A.push(L)}return y(A)}u=M;function C(S,A){if(A<0)return[];for(var F=[],D=(1<0)-(f<0)},l.abs=function(f){var h=f>>n-1;return(f^h)-h},l.min=function(f,h){return h^(f^h)&-(f65535)<<4,f>>>=h,d=(f>255)<<3,f>>>=d,h|=d,d=(f>15)<<2,f>>>=d,h|=d,d=(f>3)<<1,f>>>=d,h|=d,h|f>>1},l.log10=function(f){return f>=1e9?9:f>=1e8?8:f>=1e7?7:f>=1e6?6:f>=1e5?5:f>=1e4?4:f>=1e3?3:f>=100?2:f>=10?1:0},l.popCount=function(f){return f=f-(f>>>1&1431655765),f=(f&858993459)+(f>>>2&858993459),(f+(f>>>4)&252645135)*16843009>>>24};function u(f){var h=32;return f&=-f,f&&h--,f&65535&&(h-=16),f&16711935&&(h-=8),f&252645135&&(h-=4),f&858993459&&(h-=2),f&1431655765&&(h-=1),h}l.countTrailingZeros=u,l.nextPow2=function(f){return f+=f===0,--f,f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f+1},l.prevPow2=function(f){return f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f-(f>>>1)},l.parity=function(f){return f^=f>>>16,f^=f>>>8,f^=f>>>4,f&=15,27030>>>f&1};var c=new Array(256);(function(f){for(var h=0;h<256;++h){var d=h,p=h,g=7;for(d>>>=1;d;d>>>=1)p<<=1,p|=d&1,--g;f[h]=p<>>8&255]<<16|c[f>>>16&255]<<8|c[f>>>24&255]},l.interleave2=function(f,h){return f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,h&=65535,h=(h|h<<8)&16711935,h=(h|h<<4)&252645135,h=(h|h<<2)&858993459,h=(h|h<<1)&1431655765,f|h<<1},l.deinterleave2=function(f,h){return f=f>>>h&1431655765,f=(f|f>>>1)&858993459,f=(f|f>>>2)&252645135,f=(f|f>>>4)&16711935,f=(f|f>>>16)&65535,f<<16>>16},l.interleave3=function(f,h,d){return f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,h&=1023,h=(h|h<<16)&4278190335,h=(h|h<<8)&251719695,h=(h|h<<4)&3272356035,h=(h|h<<2)&1227133513,f|=h<<1,d&=1023,d=(d|d<<16)&4278190335,d=(d|d<<8)&251719695,d=(d|d<<4)&3272356035,d=(d|d<<2)&1227133513,f|d<<2},l.deinterleave3=function(f,h){return f=f>>>h&1227133513,f=(f|f>>>2)&3272356035,f=(f|f>>>4)&251719695,f=(f|f>>>8)&4278190335,f=(f|f>>>16)&1023,f<<22>>22},l.nextCombination=function(f){var h=f|f-1;return h+1|(~h&-~h)-1>>>u(f)+1}},2014(s,l,n){"use strict";"use restrict";var u=n(3105),c=n(4623);function f(b){for(var S=0,A=Math.max,F=0,D=b.length;F>1,P=p(b[R],S);P<=0?(P===0&&(D=R),A=R+1):P>0&&(F=R-1)}return D}l.findCell=_;function v(b,S){for(var A=new Array(b.length),F=0,D=A.length;F=b.length||p(b[$],R)!==0););}return A}l.incidence=v;function x(b,S){if(!S)return v(y(M(b,0)),b,0);for(var A=new Array(S),F=0;F>>L&1&&I.push(D[L]);S.push(I)}return m(S)}l.explode=E;function M(b,S){if(S<0)return[];for(var A=[],F=(1<>1:(N>>1)-1}function F(N){for(var H=S(N);;){var W=H,U=2*N+1,V=2*(N+1),j=N;if(U0;){var W=A(N);if(W>=0){var U=S(W);if(H0){var N=I[0];return b(0,O-1),O-=1,F(0),N}return-1}function P(N,H){var W=I[N];return x[W]===H?N:(x[W]=-1/0,D(N),R(),x[W]=H,O+=1,D(O-1))}function z(N){if(!E[N]){E[N]=!0;var H=_[N],W=v[N];_[W]>=0&&(_[W]=H),v[H]>=0&&(v[H]=W),L[H]>=0&&P(L[H],T(H)),L[W]>=0&&P(L[W],T(W))}}for(var I=[],L=new Array(m),M=0;M>1;M>=0;--M)F(M);for(;;){var G=R();if(G<0||x[G]>g)break;z(G)}for(var $=[],M=0;M=0&&W>=0&&H!==W){var U=L[H],V=L[W];U!==V&&J.push([U,V])}}),c.unique(c.normalize(J)),{positions:$,edges:J}}},1303(s,l,n){"use strict";s.exports=f;var u=n(3250);function c(h,d){var p,g;if(d[0][0]d[1][0])p=d[1],g=d[0];else{var m=Math.min(h[0][1],h[1][1]),y=Math.max(h[0][1],h[1][1]),_=Math.min(d[0][1],d[1][1]),v=Math.max(d[0][1],d[1][1]);return y<_?y-_:m>v?m-v:y-v}var x,E;h[0][1]d[1][0])p=d[1],g=d[0];else return c(d,h);var m,y;if(h[0][0]h[1][0])m=h[1],y=h[0];else return-c(h,d);var _=u(p,g,y),v=u(p,g,m);if(_<0){if(v<=0)return _}else if(_>0){if(v>=0)return _}else if(v)return v;if(_=u(y,m,g),v=u(y,m,p),_<0){if(v<=0)return _}else if(_>0){if(v>=0)return _}else if(v)return v;return g[0]-y[0]}},4209(s,l,n){"use strict";s.exports=v;var u=n(2478),c=n(3840),f=n(3250),h=n(1303);function d(x,E,M){this.slabs=x,this.coordinates=E,this.horizontal=M}var p=d.prototype;function g(x,E){return x.y-E}function m(x,E){for(var M=null;x;){var C=x.key,w,k;C[0][0]0)if(E[0]!==C[1][0])M=x,x=x.right;else{var b=m(x.right,E);if(b)return b;x=x.left}else{if(E[0]!==C[1][0])return x;var b=m(x.right,E);if(b)return b;x=x.left}}return M}p.castUp=function(x){var E=u.le(this.coordinates,x[0]);if(E<0)return-1;var M=this.slabs[E],C=m(this.slabs[E],x),w=-1;if(C&&(w=C.value),this.coordinates[E]===x[0]){var k=null;if(C&&(k=C.key),E>0){var T=m(this.slabs[E-1],x);T&&(k?h(T.key,k)>0&&(k=T.key,w=T.value):(w=T.value,k=T.key))}var b=this.horizontal[E];if(b.length>0){var S=u.ge(b,x[1],g);if(S=b.length)return w;A=b[S]}}if(A.start)if(k){var F=f(k[0],k[1],[x[0],A.y]);k[0][0]>k[1][0]&&(F=-F),F>0&&(w=A.index)}else w=A.index;else A.y!==x[1]&&(w=A.index)}}}return w};function y(x,E,M,C){this.y=x,this.index=E,this.start=M,this.closed=C}function _(x,E,M,C){this.x=x,this.segment=E,this.create=M,this.index=C}function v(x){for(var E=x.length,M=2*E,C=new Array(M),w=0;w1&&(E=1);for(var M=1-E,C=m.length,w=new Array(C),k=0;k0||x>0&&w<0){var k=h(E,w,M,x);_.push(k),v.push(k.slice())}w<0?v.push(M.slice()):w>0?_.push(M.slice()):(_.push(M.slice()),v.push(M.slice())),x=w}return{positive:_,negative:v}}function p(m,y){for(var _=[],v=f(m[m.length-1],y),x=m[m.length-1],E=m[0],M=0;M0||v>0&&C<0)&&_.push(h(x,C,E,v)),C>=0&&_.push(E.slice()),v=C}return _}function g(m,y){for(var _=[],v=f(m[m.length-1],y),x=m[m.length-1],E=m[0],M=0;M0||v>0&&C<0)&&_.push(h(x,C,E,v)),C<=0&&_.push(E.slice()),v=C}return _}},3387(s,l,n){var u;(function(){"use strict";var c={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function f(m){return d(g(m),arguments)}function h(m,y){return f.apply(null,[m].concat(y||[]))}function d(m,y){var _=1,v=m.length,x,E="",M,C,w,k,T,b,S,A;for(M=0;M=0),w.type){case"b":x=parseInt(x,10).toString(2);break;case"c":x=String.fromCharCode(parseInt(x,10));break;case"d":case"i":x=parseInt(x,10);break;case"j":x=JSON.stringify(x,null,w.width?parseInt(w.width):0);break;case"e":x=w.precision?parseFloat(x).toExponential(w.precision):parseFloat(x).toExponential();break;case"f":x=w.precision?parseFloat(x).toFixed(w.precision):parseFloat(x);break;case"g":x=w.precision?String(Number(x.toPrecision(w.precision))):parseFloat(x);break;case"o":x=(parseInt(x,10)>>>0).toString(8);break;case"s":x=String(x),x=w.precision?x.substring(0,w.precision):x;break;case"t":x=String(!!x),x=w.precision?x.substring(0,w.precision):x;break;case"T":x=Object.prototype.toString.call(x).slice(8,-1).toLowerCase(),x=w.precision?x.substring(0,w.precision):x;break;case"u":x=parseInt(x,10)>>>0;break;case"v":x=x.valueOf(),x=w.precision?x.substring(0,w.precision):x;break;case"x":x=(parseInt(x,10)>>>0).toString(16);break;case"X":x=(parseInt(x,10)>>>0).toString(16).toUpperCase();break}c.json.test(w.type)?E+=x:(c.number.test(w.type)&&(!S||w.sign)?(A=S?"+":"-",x=x.toString().replace(c.sign,"")):A="",T=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",b=w.width-(A+x).length,k=w.width&&b>0?T.repeat(b):"",E+=w.align?A+x+k:T==="0"?A+k+x:k+A+x)}return E}var p=Object.create(null);function g(m){if(p[m])return p[m];for(var y=m,_,v=[],x=0;y;){if((_=c.text.exec(y))!==null)v.push(_[0]);else if((_=c.modulo.exec(y))!==null)v.push("%");else if((_=c.placeholder.exec(y))!==null){if(_[2]){x|=1;var E=[],M=_[2],C=[];if((C=c.key.exec(M))!==null)for(E.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=c.key_access.exec(M))!==null)E.push(C[1]);else if((C=c.index_access.exec(M))!==null)E.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");_[2]=E}else x|=2;if(x===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");v.push({placeholder:_[0],param_no:_[1],keys:_[2],sign:_[3],pad_char:_[4],align:_[5],width:_[6],precision:_[7],type:_[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");y=y.substring(_[0].length)}return p[m]=v}l.sprintf=f,l.vsprintf=h,typeof window<"u"&&(window.sprintf=f,window.vsprintf=h,u=(function(){return{sprintf:f,vsprintf:h}}).call(l,n,l,s),u!==void 0&&(s.exports=u))})()},3711(s,l,n){"use strict";s.exports=g;var u=n(2640),c=n(781),f={"2d":function(m,y,_){var v=m({order:y,scalarArguments:3,getters:_==="generic"?[0]:void 0,phase:function(E,M,C,w){return E>w|0},vertex:function(E,M,C,w,k,T,b,S,A,F,D,R,P){var z=(b<<0)+(S<<1)+(A<<2)+(F<<3)|0;if(!(z===0||z===15))switch(z){case 0:D.push([E-.5,M-.5]);break;case 1:D.push([E-.25-.25*(w+C-2*P)/(C-w),M-.25-.25*(k+C-2*P)/(C-k)]);break;case 2:D.push([E-.75-.25*(-w-C+2*P)/(w-C),M-.25-.25*(T+w-2*P)/(w-T)]);break;case 3:D.push([E-.5,M-.5-.5*(k+C+T+w-4*P)/(C-k+w-T)]);break;case 4:D.push([E-.25-.25*(T+k-2*P)/(k-T),M-.75-.25*(-k-C+2*P)/(k-C)]);break;case 5:D.push([E-.5-.5*(w+C+T+k-4*P)/(C-w+k-T),M-.5]);break;case 6:D.push([E-.5-.25*(-w-C+T+k)/(w-C+k-T),M-.5-.25*(-k-C+T+w)/(k-C+w-T)]);break;case 7:D.push([E-.75-.25*(T+k-2*P)/(k-T),M-.75-.25*(T+w-2*P)/(w-T)]);break;case 8:D.push([E-.75-.25*(-T-k+2*P)/(T-k),M-.75-.25*(-T-w+2*P)/(T-w)]);break;case 9:D.push([E-.5-.25*(w+C+-T-k)/(C-w+T-k),M-.5-.25*(k+C+-T-w)/(C-k+T-w)]);break;case 10:D.push([E-.5-.5*(-w-C+-T-k+4*P)/(w-C+T-k),M-.5]);break;case 11:D.push([E-.25-.25*(-T-k+2*P)/(T-k),M-.75-.25*(k+C-2*P)/(C-k)]);break;case 12:D.push([E-.5,M-.5-.5*(-k-C+-T-w+4*P)/(k-C+T-w)]);break;case 13:D.push([E-.75-.25*(w+C-2*P)/(C-w),M-.25-.25*(-T-w+2*P)/(T-w)]);break;case 14:D.push([E-.25-.25*(-w-C+2*P)/(w-C),M-.25-.25*(-k-C+2*P)/(k-C)]);break;case 15:D.push([E-.5,M-.5]);break}},cell:function(E,M,C,w,k,T,b,S,A){k?S.push([E,M]):S.push([M,E])}});return function(x,E){var M=[],C=[];return v(x,M,C,E),{positions:M,cells:C}}}};function h(m,y){var _=m.length+"d",v=f[_];if(v)return v(u,m,y)}function d(m,y){for(var _=c(m,y),v=_.length,x=new Array(v),E=new Array(v),M=0;MMath.max(w,k)?T[2]=1:w>Math.max(C,k)?T[0]=1:T[1]=1;for(var b=0,S=0,A=0;A<3;++A)b+=M[A]*M[A],S+=T[A]*M[A];for(var A=0;A<3;++A)T[A]-=S/b*M[A];return d(T,T),T}function _(M,C,w,k,T,b,S,A){this.center=u(w),this.up=u(k),this.right=u(T),this.radius=u([b]),this.angle=u([S,A]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),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 F=0;F<16;++F)this.computedMatrix[F]=.5;this.recalcMatrix(0)}var v=_.prototype;v.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},v.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},v.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,w=this.computedRight,k=0,T=0,b=0;b<3;++b)T+=C[b]*w[b],k+=C[b]*C[b];for(var S=Math.sqrt(k),A=0,b=0;b<3;++b)w[b]-=C[b]*T/k,A+=w[b]*w[b],C[b]/=S;for(var F=Math.sqrt(A),b=0;b<3;++b)w[b]/=F;var D=this.computedToward;h(D,C,w),d(D,D);for(var R=Math.exp(this.computedRadius[0]),P=this.computedAngle[0],z=this.computedAngle[1],I=Math.cos(P),L=Math.sin(P),B=Math.cos(z),O=Math.sin(z),G=this.computedCenter,$=I*B,X=L*B,Z=O,J=-I*O,N=-L*O,H=B,W=this.computedEye,U=this.computedMatrix,b=0;b<3;++b){var V=$*w[b]+X*D[b]+Z*C[b];U[4*b+1]=J*w[b]+N*D[b]+H*C[b],U[4*b+2]=V,U[4*b+3]=0}var j=U[1],q=U[5],Y=U[9],K=U[2],re=U[6],se=U[10],le=q*se-Y*re,ue=Y*K-j*se,fe=j*re-q*K,pe=g(le,ue,fe);le/=pe,ue/=pe,fe/=pe,U[0]=le,U[4]=ue,U[8]=fe;for(var b=0;b<3;++b)W[b]=G[b]+U[2+4*b]*R;for(var b=0;b<3;++b){for(var A=0,we=0;we<3;++we)A+=U[b+4*we]*W[we];U[12+b]=-A}U[15]=1},v.getMatrix=function(M,C){this.recalcMatrix(M);var w=this.computedMatrix;if(C){for(var k=0;k<16;++k)C[k]=w[k];return C}return w};var x=[0,0,0];v.rotate=function(M,C,w,k){if(this.angle.move(M,C,w),k){this.recalcMatrix(M);var T=this.computedMatrix;x[0]=T[2],x[1]=T[6],x[2]=T[10];for(var b=this.computedUp,S=this.computedRight,A=this.computedToward,F=0;F<3;++F)T[4*F]=b[F],T[4*F+1]=S[F],T[4*F+2]=A[F];f(T,T,k,x);for(var F=0;F<3;++F)b[F]=T[4*F],S[F]=T[4*F+1];this.up.set(M,b[0],b[1],b[2]),this.right.set(M,S[0],S[1],S[2])}},v.pan=function(M,C,w,k){C=C||0,w=w||0,k=k||0,this.recalcMatrix(M);var T=this.computedMatrix,b=Math.exp(this.computedRadius[0]),S=T[1],A=T[5],F=T[9],D=g(S,A,F);S/=D,A/=D,F/=D;var R=T[0],P=T[4],z=T[8],I=R*S+P*A+z*F;R-=S*I,P-=A*I,z-=F*I;var L=g(R,P,z);R/=L,P/=L,z/=L;var B=R*C+S*w,O=P*C+A*w,G=z*C+F*w;this.center.move(M,B,O,G);var $=Math.exp(this.computedRadius[0]);$=Math.max(1e-4,$+k),this.radius.set(M,Math.log($))},v.translate=function(M,C,w,k){this.center.move(M,C||0,w||0,k||0)},v.setMatrix=function(M,C,w,k){var T=1;typeof w=="number"&&(T=w|0),(T<0||T>3)&&(T=1);var b=(T+2)%3,S=(T+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var A=C[T],F=C[T+4],D=C[T+8];if(k){var P=Math.abs(A),z=Math.abs(F),I=Math.abs(D),L=Math.max(P,z,I);P===L?(A=A<0?-1:1,F=D=0):I===L?(D=D<0?-1:1,A=F=0):(F=F<0?-1:1,A=D=0)}else{var R=g(A,F,D);A/=R,F/=R,D/=R}var B=C[b],O=C[b+4],G=C[b+8],$=B*A+O*F+G*D;B-=A*$,O-=F*$,G-=D*$;var X=g(B,O,G);B/=X,O/=X,G/=X;var Z=F*G-D*O,J=D*B-A*G,N=A*O-F*B,H=g(Z,J,N);Z/=H,J/=H,N/=H,this.center.jump(M,ie,ee,ce),this.radius.idle(M),this.up.jump(M,A,F,D),this.right.jump(M,B,O,G);var W,U;if(T===2){var V=C[1],j=C[5],q=C[9],Y=V*B+j*O+q*G,K=V*Z+j*J+q*N;ue<0?W=-Math.PI/2:W=Math.PI/2,U=Math.atan2(K,Y)}else{var re=C[2],se=C[6],le=C[10],ue=re*A+se*F+le*D,fe=re*B+se*O+le*G,pe=re*Z+se*J+le*N;W=Math.asin(m(ue)),U=Math.atan2(pe,fe)}this.angle.jump(M,U,W),this.recalcMatrix(M);var we=C[2],xe=C[6],he=C[10],oe=this.computedMatrix;c(oe,C);var te=oe[15],ie=oe[12]/te,ee=oe[13]/te,ce=oe[14]/te,_e=Math.exp(this.computedRadius[0]);this.center.jump(M,ie-we*_e,ee-xe*_e,ce-he*_e)},v.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},v.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},v.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},v.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},v.lookAt=function(M,C,w,k){this.recalcMatrix(M),C=C||this.computedEye,w=w||this.computedCenter,k=k||this.computedUp;var T=k[0],b=k[1],S=k[2],A=g(T,b,S);if(!(A<1e-6)){T/=A,b/=A,S/=A;var F=C[0]-w[0],D=C[1]-w[1],R=C[2]-w[2],P=g(F,D,R);if(!(P<1e-6)){F/=P,D/=P,R/=P;var z=this.computedRight,I=z[0],L=z[1],B=z[2],O=T*I+b*L+S*B;I-=O*T,L-=O*b,B-=O*S;var G=g(I,L,B);if(!(G<.01&&(I=b*R-S*D,L=S*F-T*R,B=T*D-b*F,G=g(I,L,B),G<1e-6))){I/=G,L/=G,B/=G,this.up.set(M,T,b,S),this.right.set(M,I,L,B),this.center.set(M,w[0],w[1],w[2]),this.radius.set(M,Math.log(P));var $=b*B-S*L,X=S*I-T*B,Z=T*L-b*I,J=g($,X,Z);$/=J,X/=J,Z/=J;var N=T*F+b*D+S*R,H=I*F+L*D+B*R,W=$*F+X*D+Z*R,U=Math.asin(m(N)),V=Math.atan2(W,H),j=this.angle._state,q=j[j.length-1],Y=j[j.length-2];q=q%(2*Math.PI);var K=Math.abs(q+2*Math.PI-V),re=Math.abs(q-V),se=Math.abs(q-2*Math.PI-V);K0?B.pop():new ArrayBuffer(I)}l.mallocArrayBuffer=x;function E(z){return new Uint8Array(x(z),0,z)}l.mallocUint8=E;function M(z){return new Uint16Array(x(2*z),0,z)}l.mallocUint16=M;function C(z){return new Uint32Array(x(4*z),0,z)}l.mallocUint32=C;function w(z){return new Int8Array(x(z),0,z)}l.mallocInt8=w;function k(z){return new Int16Array(x(2*z),0,z)}l.mallocInt16=k;function T(z){return new Int32Array(x(4*z),0,z)}l.mallocInt32=T;function b(z){return new Float32Array(x(4*z),0,z)}l.mallocFloat32=l.mallocFloat=b;function S(z){return new Float64Array(x(8*z),0,z)}l.mallocFloat64=l.mallocDouble=S;function A(z){return h?new Uint8ClampedArray(x(z),0,z):E(z)}l.mallocUint8Clamped=A;function F(z){return d?new BigUint64Array(x(8*z),0,z):null}l.mallocBigUint64=F;function D(z){return p?new BigInt64Array(x(8*z),0,z):null}l.mallocBigInt64=D;function R(z){return new DataView(x(z),0,z)}l.mallocDataView=R;function P(z){z=u.nextPow2(z);var I=u.log2(z),L=y[I];return L.length>0?L.pop():new f(z)}l.mallocBuffer=P,l.clearCache=function(){for(var I=0;I<32;++I)g.UINT8[I].length=0,g.UINT16[I].length=0,g.UINT32[I].length=0,g.INT8[I].length=0,g.INT16[I].length=0,g.INT32[I].length=0,g.FLOAT[I].length=0,g.DOUBLE[I].length=0,g.BIGUINT64[I].length=0,g.BIGINT64[I].length=0,g.UINT8C[I].length=0,m[I].length=0,y[I].length=0}},1755(s){"use strict";"use restrict";s.exports=l;function l(u){this.roots=new Array(u),this.ranks=new Array(u);for(var c=0;c",B="",O=L.length,G=B.length,$=P[0]===x||P[0]===C,X=0,Z=-G;X>-1&&(X=z.indexOf(L,X),!(X===-1||(Z=z.indexOf(B,X+O),Z===-1)||Z<=X));){for(var J=X;J=Z)I[J]=null,z=z.substr(0,J)+" "+z.substr(J+1);else if(I[J]!==null){var N=I[J].indexOf(P[0]);N===-1?I[J]+=P:$&&(I[J]=I[J].substr(0,N+1)+(1+parseInt(I[J][N+1]))+I[J].substr(N+2))}var H=X+O,W=z.substr(H,Z-H),U=W.indexOf(L);U!==-1?X=U:X=Z+G}return I}function T(R,P,z){for(var I=P.textAlign||"start",L=P.textBaseline||"alphabetic",B=[1<<30,1<<30],O=[0,0],G=R.length,$=0;$/g,` +`):z=z.replace(/\/g," ");var O="",G=[];for(q=0;q-1?parseInt(ee[1+Se]):0,Ge=Me>-1?parseInt(ce[1+Me]):0;Ue!==Ge&&(_e=_e.replace(fe(),"?px "),re*=Math.pow(.75,Ge-Ue),_e=_e.replace("?px ",fe())),K+=.25*N*(Ge-Ue)}if(B.superscripts===!0){var Ze=ee.indexOf(x),Ke=ce.indexOf(x),dt=Ze>-1?parseInt(ee[1+Ze]):0,_t=Ke>-1?parseInt(ce[1+Ke]):0;dt!==_t&&(_e=_e.replace(fe(),"?px "),re*=Math.pow(.75,_t-dt),_e=_e.replace("?px ",fe())),K-=.25*N*(_t-dt)}if(B.bolds===!0){var Pt=ee.indexOf(m)>-1,vt=ce.indexOf(m)>-1;!Pt&&vt&&(Tt?_e=_e.replace("italic ","italic bold "):_e="bold "+_e),Pt&&!vt&&(_e=_e.replace("bold ",""))}if(B.italics===!0){var Tt=ee.indexOf(_)>-1,st=ce.indexOf(_)>-1;!Tt&&st&&(_e="italic "+_e),Tt&&!st&&(_e=_e.replace("italic ",""))}P.font=_e}for(j=0;j0&&(L=I.size),I.lineSpacing&&I.lineSpacing>0&&(B=I.lineSpacing),I.styletags&&I.styletags.breaklines&&(O.breaklines=!!I.styletags.breaklines),I.styletags&&I.styletags.bolds&&(O.bolds=!!I.styletags.bolds),I.styletags&&I.styletags.italics&&(O.italics=!!I.styletags.italics),I.styletags&&I.styletags.subscripts&&(O.subscripts=!!I.styletags.subscripts),I.styletags&&I.styletags.superscripts&&(O.superscripts=!!I.styletags.superscripts)),z.font=[I.fontStyle,I.fontVariant,I.fontWeight,L+"px",I.font].filter(function($){return $}).join(" "),z.textAlign="start",z.textBaseline="alphabetic",z.direction="ltr";var G=b(P,z,R,L,B,O);return F(G,I,L)}},1538(s){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function n(A){A.permitHostObjects___&&A.permitHostObjects___(n)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=n);var u=!1;if(typeof WeakMap=="function"){var c=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var f=new c,h=Object.freeze({});if(f.set(h,1),f.get(h)!==1)u=!0;else{s.exports=WeakMap;return}}}var d=Object.prototype.hasOwnProperty,p=Object.getOwnPropertyNames,g=Object.defineProperty,m=Object.isExtensible,y="weakmap:",_=y+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var v=new ArrayBuffer(25),x=new Uint8Array(v);crypto.getRandomValues(x),_=y+"rand:"+Array.prototype.map.call(x,function(A){return(A%36).toString(36)}).join("")+"___"}function E(A){return!(A.substr(0,y.length)==y&&A.substr(A.length-3)==="___")}if(g(Object,"getOwnPropertyNames",{value:function(F){return p(F).filter(E)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;g(Object,"getPropertyNames",{value:function(F){return M(F).filter(E)}})}function C(A){if(A!==Object(A))throw new TypeError("Not an object: "+A);var F=A[_];if(F&&F.key===A)return F;if(m(A)){F={key:A};try{return g(A,_,{value:F,writable:!1,enumerable:!1,configurable:!1}),F}catch{return}}}(function(){var A=Object.freeze;g(Object,"freeze",{value:function(P){return C(P),A(P)}});var F=Object.seal;g(Object,"seal",{value:function(P){return C(P),F(P)}});var D=Object.preventExtensions;g(Object,"preventExtensions",{value:function(P){return C(P),D(P)}})})();function w(A){return A.prototype=null,Object.freeze(A)}var k=!1;function T(){!k&&typeof console<"u"&&(k=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var b=0,S=function(){this instanceof S||T();var A=[],F=[],D=b++;function R(L,B){var O,G=C(L);return G?D in G?G[D]:B:(O=A.indexOf(L),O>=0?F[O]:B)}function P(L){var B=C(L);return B?D in B:A.indexOf(L)>=0}function z(L,B){var O,G=C(L);return G?G[D]=B:(O=A.indexOf(L),O>=0?F[O]=B:(O=A.length,F[O]=B,A[O]=L)),this}function I(L){var B=C(L),O,G;return B?D in B&&delete B[D]:(O=A.indexOf(L),O<0?!1:(G=A.length-1,A[O]=void 0,F[O]=F[G],A[O]=A[G],A.length=G,F.length=G,!0))}return Object.create(S.prototype,{get___:{value:w(R)},has___:{value:w(P)},set___:{value:w(z)},delete___:{value:w(I)}})};S.prototype=Object.create(Object.prototype,{get:{value:function(F,D){return this.get___(F,D)},writable:!0,configurable:!0},has:{value:function(F){return this.has___(F)},writable:!0,configurable:!0},set:{value:function(F,D){return this.set___(F,D)},writable:!0,configurable:!0},delete:{value:function(F){return this.delete___(F)},writable:!0,configurable:!0}}),typeof c=="function"?(function(){u&&typeof Proxy<"u"&&(Proxy=void 0);function A(){this instanceof S||T();var F=new c,D=void 0,R=!1;function P(B,O){return D?F.has(B)?F.get(B):D.get___(B,O):F.get(B,O)}function z(B){return F.has(B)||(D?D.has___(B):!1)}var I;u?I=function(B,O){return F.set(B,O),F.has(B)||(D||(D=new S),D.set(B,O)),this}:I=function(B,O){if(R)try{F.set(B,O)}catch{D||(D=new S),D.set___(B,O)}else F.set(B,O);return this};function L(B){var O=!!F.delete(B);return D&&D.delete___(B)||O}return Object.create(S.prototype,{get___:{value:w(P)},has___:{value:w(z)},set___:{value:w(I)},delete___:{value:w(L)},permitHostObjects___:{value:w(function(B){if(B===n)R=!0;else throw new Error("bogus call to permitHostObjects___")})}})}A.prototype=S.prototype,s.exports=A,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy<"u"&&(Proxy=void 0),s.exports=S)})()},236(s,l,n){var u=n(8284);s.exports=c;function c(){var f={};return function(h){if((typeof h!="object"||h===null)&&typeof h!="function")throw new Error("Weakmap-shim: Key must be object");var d=h.valueOf(f);return d&&d.identity===f?d:u(h,f)}}},8284(s){s.exports=l;function l(n,u){var c={identity:u},f=n.valueOf;return Object.defineProperty(n,"valueOf",{value:function(h){return h!==u?f.apply(this,arguments):c},writable:!0}),c}},606(s,l,n){var u=n(236);s.exports=c;function c(){var f=u();return{get:function(h,d){var p=f(h);return p.hasOwnProperty("value")?p.value:d},set:function(h,d){return f(h).value=d,this},has:function(h){return"value"in f(h)},delete:function(h){return delete f(h).value}}}},3349(s){"use strict";function l(){return function(d,p,g,m,y,_){var v=d[0],x=g[0],E=[0],M=x;m|=0;var C=0,w=x;for(C=0;C=0!=T>=0&&y.push(E[0]+.5+.5*(k+T)/(k-T))}m+=w,++E[0]}}}function n(){return l()}var u=n;function c(d){var p={};return function(m,y,_){var v=m.dtype,x=m.order,E=[v,x.join()].join(),M=p[E];return M||(p[E]=M=d([v,x])),M(m.shape.slice(0),m.data,m.stride,m.offset|0,y,_)}}function f(d){return c(u.bind(void 0,d))}function h(d){return f({funcName:d.funcName})}s.exports=h({funcName:"zeroCrossings"})},781(s,l,n){"use strict";s.exports=c;var u=n(3349);function c(f,h){var d=[];return h=+h||0,u(f.hi(f.shape[0]-1),d,h),d}},7790(){}};let a={};function i(s){let l=a[s];if(l!==void 0)return l.exports;let n=a[s]={id:s,loaded:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),i.nmd=s=>(s.paths=[],s.children||(s.children=[]),s);let o=i(3065);r.exports=o})()}}),g0=ye({"src/lib/str2rgbarray.js"(e,r){"use strict";var{normalize:t}=Ya();function a(i){return i?t(i):[0,0,0,1]}r.exports=a}}),y0=ye({"src/lib/gl_format_color.js"(e,r){"use strict";var t=en(),a=As(),i=Ya(),o=Wl().defaultLine,s=yc().isArrayOrTypedArray,l=i.normalize(o),n=1;function u(p,g){return[p[0],p[1],p[2],p[3]*g]}function c(p){return t(p)||!i.isChannelArray(p)&&!i.isValid(p)?l:i.normalize(p)}function f(p){return t(p)?p:n}function h(p,g,m){var y=p.color;y&&y._inputArray&&(y=y._inputArray);var _=s(y),v=s(g),x=a.extractOpts(p),E=[],M,C,w,k,T;if(x.colorscale!==void 0?M=a.makeColorScaleFuncFromTrace(p):M=c,_?C=(S,A)=>S[A]===void 0?l:x.colorscale===void 0?M(S[A]):i.normalize(M(S[A])):C=c,v?w=function(S,A){return S[A]===void 0?n:f(S[A])}:w=f,_||v)for(var b=0;b0){var y=u.c2l(g);u._lowerLogErrorBound||(u._lowerLogErrorBound=y),u._lowerErrorBound=Math.min(u._lowerLogErrorBound,y)}}else f[h]=[-d[0]*n,d[1]*n]}return f}function i(s){for(var l=0;l-1?-1:F.indexOf("right")>-1?1:0}function E(F){return F==null?0:F.indexOf("top")>-1?-1:F.indexOf("bottom")>-1?1:0}function M(F){var D=0,R=0,P=[D,R];if(Array.isArray(F))for(var z=0;z=0){var G=_(B.position,B.delaunayColor,B.delaunayAxis);G.opacity=F.opacity,this.delaunayMesh?this.delaunayMesh.update(G):(G.gl=D,this.delaunayMesh=o(G),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)},y.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 A(F,D){var R=new m(F,D.uid);return R.update(D),R}r.exports=A}}),pP=ye({"src/traces/scatter3d/attributes.js"(e,r){"use strict";var t=al(),a=vs(),i=rs(),o=zs().axisHoverFormat,{hovertemplateAttrs:s,texttemplateAttrs:l,templatefallbackAttrs:n}=Ro(),u=Oo(),c=dP(),f=dM(),h=Xi().extendFlat,d=Cs().overrideAll,p=(Em(),On(bv)).default,g=t.line,m=t.marker,y=m.line,_=h({width:g.width,dash:{valType:"enumerated",values:p(c),dflt:"solid"}},i("line"));function v(E){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var x=r.exports=d({x:t.x,y:t.y,z:{valType:"data_array"},text:h({},t.text,{}),texttemplate:l(),texttemplatefallback:n({editType:"calc"}),hovertext:h({},t.hovertext,{}),hovertemplate:s(),hovertemplatefallback:n(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),mode:h({},t.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:v("x"),y:v("y"),z:v("z")},connectgaps:t.connectgaps,line:_,marker:h({symbol:{valType:"enumerated",values:p(f),dflt:"circle",arrayOk:!0},size:h({},m.size,{dflt:8}),sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:h({},m.opacity,{arrayOk:!1}),colorbar:m.colorbar,line:h({width:h({},y.width,{arrayOk:!1})},i("marker.line"))},i("marker")),textposition:h({},t.textposition,{dflt:"top center"}),textfont:a({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:u.opacity,hoverinfo:h({},u.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"}}),Foe=ye({"src/traces/scatter3d/defaults.js"(e,r){"use strict";var t=li(),a=Yt(),i=ms(),o=kd(),s=ip(),l=np(),n=pP();r.exports=function(f,h,d,p){function g(C,w){return a.coerce(f,h,n,C,w)}var m=u(f,h,g,p);if(!m){h.visible=!1;return}g("text"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),g("xhoverformat"),g("yhoverformat"),g("zhoverformat"),g("mode"),i.hasMarkers(h)&&o(f,h,d,p,g,{noAngle:!0,noLineDash:!0,noSelect:!0}),i.hasLines(h)&&(g("connectgaps"),s(f,h,d,p,g)),i.hasText(h)&&(g("texttemplate"),g("texttemplatefallback"),l(f,h,p,g,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var y=(h.line||{}).color,_=(h.marker||{}).color;g("surfaceaxis")>=0&&g("surfacecolor",y||_);for(var v=["x","y","z"],x=0;x<3;++x){var E="projection."+v[x];g(E+".show")&&(g(E+".opacity"),g(E+".scale"))}var M=t.getComponentMethod("errorbars","supplyDefaults");M(f,h,y||_||d,{axis:"z"}),M(f,h,y||_||d,{axis:"y",inherit:"z"}),M(f,h,y||_||d,{axis:"x",inherit:"z"})};function u(c,f,h,d){var p=0,g=h("x"),m=h("y"),y=h("z"),_=t.getComponentMethod("calendars","handleTraceDefaults");return _(c,f,["x","y","z"],d),g&&m&&y&&(p=Math.min(g.length,m.length,y.length),f._length=f._xlength=f._ylength=f._zlength=p),p}}}),Poe=ye({"src/traces/scatter3d/calc.js"(e,r){"use strict";var t=Vp(),a=Cd();r.exports=function(o,s){var l=[{x:!1,y:!1,trace:s,t:{}}];return t(l,s),a(o,s),l}}}),Ioe=ye({"node_modules/get-canvas-context/index.js"(e,r){r.exports=t;function t(a,i){if(typeof a!="string")throw new TypeError("must specify type string");if(i=i||{},typeof document>"u"&&!i.canvas)return null;var o=i.canvas||document.createElement("canvas");typeof i.width=="number"&&(o.width=i.width),typeof i.height=="number"&&(o.height=i.height);var s=i,l;try{var n=[a];a.indexOf("webgl")===0&&n.push("experimental-"+a);for(var u=0;u/g," "));h[d]=y,p.tickmode=g}}u.ticks=h;for(var d=0;d<3;++d){o[d]=.5*(n.glplot.bounds[0][d]+n.glplot.bounds[1][d]);for(var _=0;_<2;++_)u.bounds[_][d]=n.glplot.bounds[_][d]}n.contourLevels=s(h)}}}),Noe=ye({"src/plots/gl3d/scene.js"(e,r){"use strict";var t=$u().gl_plot3d,a=t.createCamera,i=t.createScene,o=Roe(),s=AA(),l=li(),n=Yt(),u=n.preserveDrawingBuffer(),c=qi(),f=Hs(),h=g0(),d=vP(),p=S9(),g=zoe(),m=Boe(),y=Ooe(),_=tp().applyAutorangeOptions,v,x,E=!1;function M(R,P){var z=document.createElement("div"),I=R.container;this.graphDiv=R.graphDiv;var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.style.position="absolute",L.style.top=L.style.left="0px",L.style.width=L.style.height="100%",L.style["z-index"]=20,L.style["pointer-events"]="none",z.appendChild(L),this.svgContainer=L,z.id=R.id,z.style.position="absolute",z.style.top=z.style.left="0px",z.style.width=z.style.height="100%",I.appendChild(z),this.fullLayout=P,this.id=R.id||"scene",this.fullSceneLayout=P[this.id],this.plotArgs=[[],{},{}],this.axesOptions=g(P,P[this.id]),this.spikeOptions=m(P[this.id]),this.container=z,this.staticMode=!!R.staticPlot,this.pixelRatio=this.pixelRatio||R.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=l.getComponentMethod("annotations3d","convert"),this.drawAnnotations=l.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var R=this,P={canvas:R.canvas,gl:R.gl,glOptions:{preserveDrawingBuffer:u,premultipliedAlpha:!0,antialias:!0},container:R.container,axes:R.axesOptions,spikes:R.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:R.camera,pixelRatio:R.pixelRatio};if(R.staticMode){if(!x&&(v=document.createElement("canvas"),x=o({canvas:v,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!x))throw new Error("error creating static canvas/context for image server");P.gl=x,P.canvas=v}return P};var w=!0;C.tryCreatePlot=function(){var R=this,P=R.prepareOptions(),z=!0;try{R.glplot=i(P)}catch{if(R.staticMode||!w||u)z=!1;else{n.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{u=P.glOptions.preserveDrawingBuffer=!0,R.glplot=i(P)}catch{u=P.glOptions.preserveDrawingBuffer=!1,z=!1}}}return w=!1,z},C.initializeGLCamera=function(){var R=this,P=R.fullSceneLayout.camera,z=P.projection.type==="orthographic";R.camera=a(R.container,{center:[P.center.x,P.center.y,P.center.z],eye:[P.eye.x,P.eye.y,P.eye.z],up:[P.up.x,P.up.y,P.up.z],_ortho:z,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var R=this;R.initializeGLCamera();var P=R.tryCreatePlot();if(!P)return d(R);R.traces={},R.make4thDimension();var z=R.graphDiv,I=z.layout,L=function(){var O={};return R.isCameraChanged(I)&&(O[R.id+".camera"]=R.getCamera()),R.isAspectChanged(I)&&(O[R.id+".aspectratio"]=R.glplot.getAspectratio(),I[R.id].aspectmode!=="manual"&&(R.fullSceneLayout.aspectmode=I[R.id].aspectmode=O[R.id+".aspectmode"]="manual")),O},B=function(O){if(O.fullSceneLayout.dragmode!==!1){var G=L();O.saveLayout(I),O.graphDiv.emit("plotly_relayout",G)}};return R.glplot.canvas&&(R.glplot.canvas.addEventListener("mouseup",function(){B(R)}),R.glplot.canvas.addEventListener("touchstart",function(){E=!0}),R.glplot.canvas.addEventListener("wheel",function(O){if(z._context._scrollZoom.gl3d){if(R.camera._ortho){var G=O.deltaX>O.deltaY?1.1:.9090909090909091,$=R.glplot.getAspectratio();R.glplot.setAspectratio({x:G*$.x,y:G*$.y,z:G*$.z})}B(R)}},s?{passive:!1}:!1),R.glplot.canvas.addEventListener("mousemove",function(){if(R.fullSceneLayout.dragmode!==!1&&R.camera.mouseListener.buttons!==0){var O=L();R.graphDiv.emit("plotly_relayouting",O)}}),R.staticMode||R.glplot.canvas.addEventListener("webglcontextlost",function(O){z&&z.emit&&z.emit("plotly_webglcontextlost",{event:O,layer:R.id})},!1)),R.glplot.oncontextloss=function(){R.recoverContext()},R.glplot.onrender=function(){R.render()},!0},C.render=function(){var R=this,P=R.graphDiv,z,I=R.svgContainer,L=R.container.getBoundingClientRect();P._fullLayout._calcInverseTransform(P);var B=P._fullLayout._invScaleX,O=P._fullLayout._invScaleY,G=L.width*B,$=L.height*O;I.setAttributeNS(null,"viewBox","0 0 "+G+" "+$),I.setAttributeNS(null,"width",G),I.setAttributeNS(null,"height",$),y(R),R.glplot.axes.update(R.axesOptions);for(var X=Object.keys(R.traces),Z=null,J=R.glplot.selection,N=0;N")):z.type==="isosurface"||z.type==="volume"?(j.valueLabel=c.hoverLabelText(R._mockAxis,R._mockAxis.d2l(J.traceCoordinate[3]),z.valuehoverformat),se.push("value: "+j.valueLabel),J.textLabel&&se.push(J.textLabel),re=se.join("
")):re=J.textLabel;var le={x:J.traceCoordinate[0],y:J.traceCoordinate[1],z:J.traceCoordinate[2],data:U._input,fullData:U,curveNumber:U.index,pointNumber:V};f.appendArrayPointValue(le,U,V),z._module.eventData&&(le=U._module.eventData(le,J,U,{},V));var ue={points:[le]};if(R.fullSceneLayout.hovermode){var fe=[];f.loneHover({trace:U,x:(.5+.5*W[0]/W[3])*G,y:(.5-.5*W[1]/W[3])*$,xLabel:j.xLabel,yLabel:j.yLabel,zLabel:j.zLabel,text:re,name:Z.name,color:f.castHoverOption(U,V,"bgcolor")||Z.color,borderColor:f.castHoverOption(U,V,"bordercolor"),fontFamily:f.castHoverOption(U,V,"font.family"),fontSize:f.castHoverOption(U,V,"font.size"),fontColor:f.castHoverOption(U,V,"font.color"),nameLength:f.castHoverOption(U,V,"namelength"),textAlign:f.castHoverOption(U,V,"align"),hovertemplate:n.castOption(U,V,"hovertemplate"),hovertemplateLabels:n.extendFlat({},le,j),eventData:[le]},{container:I,gd:P,inOut_bbox:fe}),le.bbox=fe[0]}J.distance<5&&(J.buttons||E)?P.emit("plotly_click",ue):P.emit("plotly_hover",ue),this.oldEventData=ue}else f.loneUnhover(I),this.oldEventData&&P.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;R.drawAnnotations(R)},C.recoverContext=function(){var R=this;R.glplot.dispose();var P=function(){if(R.glplot.gl.isContextLost()){requestAnimationFrame(P);return}if(!R.initializeGLPlot()){n.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}R.plot.apply(R,R.plotArgs)};requestAnimationFrame(P)};var k=["xaxis","yaxis","zaxis"];function T(R,P,z){for(var I=R.fullSceneLayout,L=0;L<3;L++){var B=k[L],O=B.charAt(0),G=I[B],$=P[O],X=P[O+"calendar"],Z=P["_"+O+"length"];if(!n.isArrayOrTypedArray($))z[0][L]=Math.min(z[0][L],0),z[1][L]=Math.max(z[1][L],Z-1);else for(var J,N=0;N<(Z||$.length);N++)if(n.isArrayOrTypedArray($[N]))for(var H=0;H<$[N].length;++H)J=G.d2l($[N][H],0,X),!isNaN(J)&&isFinite(J)&&(z[0][L]=Math.min(z[0][L],J),z[1][L]=Math.max(z[1][L],J));else J=G.d2l($[N],0,X),!isNaN(J)&&isFinite(J)&&(z[0][L]=Math.min(z[0][L],J),z[1][L]=Math.max(z[1][L],J))}}function b(R,P){for(var z=R.fullSceneLayout,I=z.annotations||[],L=0;L<3;L++)for(var B=k[L],O=B.charAt(0),G=z[B],$=0;$U[1][O])U[0][O]=-1,U[1][O]=1;else{var we=U[1][O]-U[0][O];U[0][O]-=we/32,U[1][O]+=we/32}if(q=[U[0][O],U[1][O]],q=_(q,$),U[0][O]=q[0],U[1][O]=q[1],$.isReversed()){var xe=U[0][O];U[0][O]=U[1][O],U[1][O]=xe}}else q=$.range,U[0][O]=$.r2l(q[0]),U[1][O]=$.r2l(q[1]);U[0][O]===U[1][O]&&(U[0][O]-=1,U[1][O]+=1),V[O]=U[1][O]-U[0][O],$.range=[U[0][O],U[1][O]],$.limitRange(),I.glplot.setBounds(O,{min:$.range[0]*H[O],max:$.range[1]*H[O]})}var he,oe=Z.aspectmode;if(oe==="cube")he=[1,1,1];else if(oe==="manual"){var te=Z.aspectratio;he=[te.x,te.y,te.z]}else if(oe==="auto"||oe==="data"){var ie=[1,1,1];for(O=0;O<3;++O){$=Z[k[O]],X=$.type;var ee=j[X];ie[O]=Math.pow(ee.acc,1/ee.count)/H[O]}oe==="data"||Math.max.apply(null,ie)/Math.min.apply(null,ie)<=4?he=ie:he=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");Z.aspectratio.x=J.aspectratio.x=he[0],Z.aspectratio.y=J.aspectratio.y=he[1],Z.aspectratio.z=J.aspectratio.z=he[2],I.glplot.setAspectratio(Z.aspectratio),I.viewInitial.aspectratio||(I.viewInitial.aspectratio={x:Z.aspectratio.x,y:Z.aspectratio.y,z:Z.aspectratio.z}),I.viewInitial.aspectmode||(I.viewInitial.aspectmode=Z.aspectmode);var ce=Z.domain||null,_e=P._size||null;if(ce&&_e){var Se=I.container.style;Se.position="absolute",Se.left=_e.l+ce.x[0]*_e.w+"px",Se.top=_e.t+(1-ce.y[1])*_e.h+"px",Se.width=_e.w*(ce.x[1]-ce.x[0])+"px",Se.height=_e.h*(ce.y[1]-ce.y[0])+"px"}I.glplot.redraw()}},C.destroy=function(){var R=this;R.glplot&&(R.camera.mouseListener.enabled=!1,R.container.removeEventListener("wheel",R.camera.wheelListener),R.camera=null,R.glplot.dispose(),R.container.parentNode.removeChild(R.container),R.glplot=null)};function S(R){return[[R.eye.x,R.eye.y,R.eye.z],[R.center.x,R.center.y,R.center.z],[R.up.x,R.up.y,R.up.z]]}function A(R){return{up:{x:R.up[0],y:R.up[1],z:R.up[2]},center:{x:R.center[0],y:R.center[1],z:R.center[2]},eye:{x:R.eye[0],y:R.eye[1],z:R.eye[2]},projection:{type:R._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var R=this;return R.camera.view.recalcMatrix(R.camera.view.lastT()),A(R.camera)},C.setViewport=function(R){var P=this,z=R.camera;P.camera.lookAt.apply(this,S(z)),P.glplot.setAspectratio(R.aspectratio);var I=z.projection.type==="orthographic",L=P.camera._ortho;I!==L&&(P.glplot.redraw(),P.glplot.clearRGBA(),P.glplot.dispose(),P.initializeGLPlot())},C.isCameraChanged=function(R){var P=this,z=P.getCamera(),I=n.nestedProperty(R,P.id+".camera"),L=I.get();function B(X,Z,J,N){var H=["up","center","eye"],W=["x","y","z"];return Z[H[J]]&&X[H[J]][W[N]]===Z[H[J]][W[N]]}var O=!1;if(L===void 0)O=!0;else{for(var G=0;G<3;G++)for(var $=0;$<3;$++)if(!B(z,L,G,$)){O=!0;break}(!L.projection||z.projection&&z.projection.type!==L.projection.type)&&(O=!0)}return O},C.isAspectChanged=function(R){var P=this,z=P.glplot.getAspectratio(),I=n.nestedProperty(R,P.id+".aspectratio"),L=I.get();return L===void 0||L.x!==z.x||L.y!==z.y||L.z!==z.z},C.saveLayout=function(R){var P=this,z=P.fullLayout,I,L,B,O,G,$,X=P.isCameraChanged(R),Z=P.isAspectChanged(R),J=X||Z;if(J){var N={};if(X&&(I=P.getCamera(),L=n.nestedProperty(R,P.id+".camera"),B=L.get(),N[P.id+".camera"]=B),Z&&(O=P.glplot.getAspectratio(),G=n.nestedProperty(R,P.id+".aspectratio"),$=G.get(),N[P.id+".aspectratio"]=$),l.call("_storeDirectGUIEdit",R,z._preGUI,N),X){L.set(I);var H=n.nestedProperty(z,P.id+".camera");H.set(I)}if(Z){G.set(O);var W=n.nestedProperty(z,P.id+".aspectratio");W.set(O),P.glplot.redraw()}}return J},C.updateFx=function(R,P){var z=this,I=z.camera;if(I)if(R==="orbit")I.mode="orbit",I.keyBindingMode="rotate";else if(R==="turntable"){I.up=[0,0,1],I.mode="turntable",I.keyBindingMode="rotate";var L=z.graphDiv,B=L._fullLayout,O=z.fullSceneLayout.camera,G=O.up.x,$=O.up.y,X=O.up.z;if(X/Math.sqrt(G*G+$*$+X*X)<.999){var Z=z.id+".camera.up",J={x:0,y:0,z:1},N={};N[Z]=J;var H=L.layout;l.call("_storeDirectGUIEdit",H,B._preGUI,N),O.up=J,n.nestedProperty(H,Z).set(J)}}else I.keyBindingMode=R;z.fullSceneLayout.hovermode=P};function F(R,P,z){for(var I=0,L=z-1;I0)for(var G=255/O,$=0;$<3;++$)R[B+$]=Math.min(G*R[B+$],255)}}C.toImage=function(R){var P=this;R||(R="png"),P.staticMode&&P.container.appendChild(v),P.glplot.redraw();var z=P.glplot.gl,I=z.drawingBufferWidth,L=z.drawingBufferHeight;z.bindFramebuffer(z.FRAMEBUFFER,null);var B=new Uint8Array(I*L*4);z.readPixels(0,0,I,L,z.RGBA,z.UNSIGNED_BYTE,B),F(B,I,L),D(B,I,L);var O=document.createElement("canvas");O.width=I,O.height=L;var G=O.getContext("2d",{willReadFrequently:!0}),$=G.createImageData(I,L);$.data.set(B),G.putImageData($,0,0);var X;switch(R){case"jpeg":X=O.toDataURL("image/jpeg");break;case"webp":X=O.toDataURL("image/webp");break;default:X=O.toDataURL("image/png")}return P.staticMode&&P.container.removeChild(v),X},C.setConvert=function(){for(var R=this,P=0;P<3;P++){var z=R.fullSceneLayout[k[P]];c.setConvert(z,R.fullLayout),z.setScale=n.noop}},C.make4thDimension=function(){var R=this,P=R.graphDiv,z=P._fullLayout;R._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(R._mockAxis,z)},r.exports=M}}),joe=ye({"src/plots/gl3d/layout/attributes.js"(e,r){"use strict";r.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),mP=ye({"src/plots/gl3d/layout/axis_attributes.js"(e,r){"use strict";var t=Ya(),a=Gu(),i=Xi().extendFlat,o=Cs().overrideAll;r.exports=o({visible:a.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:t.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:a.color,categoryorder:a.categoryorder,categoryarray:a.categoryarray,title:{text:a.title.text,font:a.title.font},type:i({},a.type,{values:["-","linear","log","date","category"]}),autotypenumbers:a.autotypenumbers,autorange:a.autorange,autorangeoptions:{minallowed:a.autorangeoptions.minallowed,maxallowed:a.autorangeoptions.maxallowed,clipmin:a.autorangeoptions.clipmin,clipmax:a.autorangeoptions.clipmax,include:a.autorangeoptions.include,editType:"plot"},rangemode:a.rangemode,minallowed:a.minallowed,maxallowed:a.maxallowed,range:i({},a.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:a.minor.tickmode,nticks:a.nticks,tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,mirror:a.mirror,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,showticklabels:a.showticklabels,labelalias:a.labelalias,tickfont:a.tickfont,tickangle:a.tickangle,tickprefix:a.tickprefix,showtickprefix:a.showtickprefix,ticksuffix:a.ticksuffix,showticksuffix:a.showticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,minexponent:a.minexponent,separatethousands:a.separatethousands,tickformat:a.tickformat,tickformatstops:a.tickformatstops,hoverformat:a.hoverformat,showline:a.showline,linecolor:a.linecolor,linewidth:a.linewidth,showgrid:a.showgrid,gridcolor:i({},a.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:a.gridwidth,zeroline:a.zeroline,zerolinecolor:a.zerolinecolor,zerolinewidth:a.zerolinewidth},"plot","from-root")}}),gP=ye({"src/plots/gl3d/layout/layout_attributes.js"(e,r){"use strict";var t=mP(),a=Ds().attributes,i=Xi().extendFlat,o=Yt().counterRegex;function s(l,n,u){return{x:{valType:"number",dflt:l,editType:"camera"},y:{valType:"number",dflt:n,editType:"camera"},z:{valType:"number",dflt:u,editType:"camera"},editType:"camera"}}r.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(s(0,0,1),{}),center:i(s(0,0,0),{}),eye:i(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:a({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:t,yaxis:t,zaxis:t,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"}}}),Uoe=ye({"src/plots/gl3d/layout/axis_defaults.js"(e,r){"use strict";var t=Ya(),a=Yt(),i=ko(),o=mP(),s=M9(),l=ab(),n=["xaxis","yaxis","zaxis"],u=13600/187;r.exports=function(f,h,d){var p,g;function m(v,x){return a.coerce(p,g,o,v,x)}for(var y=0;y1;function m(y){if(!g){var _=t.validate(h[y],l[y]);if(_)return h[y]}}o(h,d,p,{type:u,attributes:l,handleDefaults:c,fullLayout:d,font:d.font,fullData:p,getDfltFromLayout:m,autotypenumbersDflt:d.autotypenumbers,paper_bgcolor:d.paper_bgcolor,calendar:d.calendar})};function c(f,h,d,p){for(var g=d("bgcolor"),m=a.combine(g,p.paper_bgcolor),y=["up","center","eye"],_=0;_.999)&&(C="turntable")}else C="turntable";d("dragmode",C),d("hovermode",p.getDfltFromLayout("hovermode"))}}}),Bv=ye({"src/plots/gl3d/index.js"(e){"use strict";var r=Cs().overrideAll,t=_v(),a=Noe(),i=_c().getSubplotData,o=Yt(),s=Sd(),l="gl3d",n="scene";e.name=l,e.attr=n,e.idRoot=n,e.idRegex=e.attrRegex=o.counterRegex("scene"),e.attributes=joe(),e.layoutAttributes=gP(),e.baseLayoutAttrOverrides=r({hoverlabel:t.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=qoe(),e.plot=function(c){for(var f=c._fullLayout,h=c._fullData,d=f._subplots[l],p=0;p0){F=p[D];break}return F}function _(S,A){if(!(S<1||A<1)){for(var F=m(S),D=m(A),R=1,P=0;PM;)D--,D/=y(D),D++,D1?R:1};function C(S,A,F){var D=F[8]+F[2]*A[0]+F[5]*A[1];return S[0]=(F[6]+F[0]*A[0]+F[3]*A[1])/D,S[1]=(F[7]+F[1]*A[0]+F[4]*A[1])/D,S}function w(S,A,F){return k(S,A,C,F),S}function k(S,A,F,D){for(var R=[0,0],P=S.shape[0],z=S.shape[1],I=0;I0&&this.contourStart[D]!==null&&this.contourEnd[D]!==null&&this.contourEnd[D]>this.contourStart[D]))for(A[D]=!0,R=this.contourStart[D];R$&&(this.minValues[B]=$),this.maxValues[B]<$&&(this.maxValues[B]=$));for(B=0;B<3;B++)this.objectOffset[B]=.5*(this.minValues[B]+this.maxValues[B]);for(B=0;B<3;B++)for(O=0;Op&&(u.isomin=null,u.isomax=null);var g=h("x"),m=h("y"),y=h("z"),_=h("value");if(!g||!g.length||!m||!m.length||!y||!y.length||!_||!_.length){u.visible=!1;return}var v=a.getComponentMethod("calendars","handleTraceDefaults");v(n,u,["x","y","z"],f),h("valuehoverformat"),["x","y","z"].forEach(function(C){h(C+"hoverformat");var w="caps."+C,k=h(w+".show");k&&h(w+".fill");var T="slices."+C,b=h(T+".show");b&&(h(T+".fill"),h(T+".locations"))});var x=h("spaceframe.show");x&&h("spaceframe.fill");var E=h("surface.show");E&&(h("surface.count"),h("surface.fill"),h("surface.pattern"));var M=h("contour.show");M&&(h("contour.color"),h("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(C){h(C)}),o(n,u,f,h,{prefix:"",cLetter:"c"}),u._length=null}r.exports={supplyDefaults:s,supplyIsoDefaults:l}}}),vM=ye({"src/traces/streamtube/calc.js"(e,r){"use strict";var t=Yt(),a=Nc();function i(n,u){u._len=Math.min(u.u.length,u.v.length,u.w.length,u.x.length,u.y.length,u.z.length),u._u=l(u.u,u._len),u._v=l(u.v,u._len),u._w=l(u.w,u._len),u._x=l(u.x,u._len),u._y=l(u.y,u._len),u._z=l(u.z,u._len);var c=o(u);u._gridFill=c.fill,u._Xs=c.Xs,u._Ys=c.Ys,u._Zs=c.Zs,u._len=c.len;var f=0,h,d,p;u.starts&&(h=l(u.starts.x||[]),d=l(u.starts.y||[]),p=l(u.starts.z||[]),f=Math.min(h.length,d.length,p.length)),u._startsX=h||[],u._startsY=d||[],u._startsZ=p||[];var g=0,m=1/0,y;for(y=0;y1&&(b=u[h-1],A=c[h-1],D=f[h-1]),d=0;db?"-":"+")+"x"),M=M.replace("y",(S>A?"-":"+")+"y"),M=M.replace("z",(F>D?"-":"+")+"z");var I=function(){h=0,R=[],P=[],z=[]};(!h||h0;m--){var y=Math.min(g[m],g[m-1]),_=Math.max(g[m],g[m-1]);if(_>y&&y-1}function Y(st,Ve){return st===null?Ve:st}function K(st,Ve,Ye){X();var me=[Ve],be=[Ye];if(U>=1)me=[Ve],be=[Ye];else if(U>0){var Ee=j(Ve,Ye);me=Ee.xyzv,be=Ee.abc}for(var De=0;De-1?Ye[Fe]:$(Je,qe,at);ct>-1?Ce[Fe]=ct:Ce[Fe]=J(Je,qe,at,Y(st,tt))}N(Ce[0],Ce[1],Ce[2])}}function re(st,Ve,Ye){var me=function(be,Ee,De){K(st,[Ve[be],Ve[Ee],Ve[De]],[Ye[be],Ye[Ee],Ye[De]])};me(0,1,2),me(2,3,0)}function se(st,Ve,Ye){var me=function(be,Ee,De){K(st,[Ve[be],Ve[Ee],Ve[De]],[Ye[be],Ye[Ee],Ye[De]])};me(0,1,2),me(3,0,1),me(2,3,0),me(1,2,3)}function le(st,Ve,Ye,me){var be=st[3];beme&&(be=me);for(var Ee=(st[3]-be)/(st[3]-Ve[3]+1e-9),De=[],Ce=0;Ce<4;Ce++)De[Ce]=(1-Ee)*st[Ce]+Ee*Ve[Ce];return De}function ue(st,Ve,Ye){return st>=Ve&&st<=Ye}function fe(st){var Ve=.001*(I-z);return st>=z-Ve&&st<=I+Ve}function pe(st){for(var Ve=[],Ye=0;Ye<4;Ye++){var me=st[Ye];Ve.push([p._x[me],p._y[me],p._z[me],p._value[me]])}return Ve}var we=3;function xe(st,Ve,Ye,me,be,Ee){Ee||(Ee=1),Ye=[-1,-1,-1];var De=!1,Ce=[ue(Ve[0][3],me,be),ue(Ve[1][3],me,be),ue(Ve[2][3],me,be)];if(!Ce[0]&&!Ce[1]&&!Ce[2])return!1;var Fe=function(qe,at,tt){return fe(at[0][3])&&fe(at[1][3])&&fe(at[2][3])?(K(qe,at,tt),!0):EeCe?[R,Ee]:[Ee,P];Ze(Ve,Fe[0],Fe[1])}}var Je=[[Math.min(z,P),Math.max(z,P)],[Math.min(R,I),Math.max(R,I)]];["x","y","z"].forEach(function(qe){for(var at=[],tt=0;tt0&&(mt.push(Dt.id),qe==="x"?gt.push([Dt.distRatio,0,0]):qe==="y"?gt.push([0,Dt.distRatio,0]):gt.push([0,0,Dt.distRatio]))}else qe==="x"?ar=Pt(1,b-1):qe==="y"?ar=Pt(1,S-1):ar=Pt(1,A-1);mt.length>0&&(qe==="x"?at[ct]=Ke(st,mt,At,ft,gt,at[ct]):qe==="y"?at[ct]=dt(st,mt,At,ft,gt,at[ct]):at[ct]=_t(st,mt,At,ft,gt,at[ct]),ct++),ar.length>0&&(qe==="x"?at[ct]=_e(st,ar,At,ft,at[ct]):qe==="y"?at[ct]=Se(st,ar,At,ft,at[ct]):at[ct]=Me(st,ar,At,ft,at[ct]),ct++)}var kt=p.caps[qe];kt.show&&kt.fill&&(V(kt.fill),qe==="x"?at[ct]=_e(st,[0,b-1],At,ft,at[ct]):qe==="y"?at[ct]=Se(st,[0,S-1],At,ft,at[ct]):at[ct]=Me(st,[0,A-1],At,ft,at[ct]),ct++)}}),E===0&&Z(),p._meshX=L,p._meshY=B,p._meshZ=O,p._meshIntensity=G,p._Xs=w,p._Ys=k,p._Zs=T}return Tt(),p}function d(p,g){var m=p.glplot.gl,y=t({gl:m}),_=new u(p,y,g.uid);return y._trace=_,_.update(g),p.glplot.add(y),_}r.exports={findNearestOnAxis:n,generateIsoMeshes:h,createIsosurfaceTrace:d}}}),Xoe=ye({"src/traces/isosurface/index.js"(e,r){"use strict";r.exports={attributes:pM(),supplyDefaults:_P().supplyDefaults,calc:xP(),colorbar:{min:"cmin",max:"cmax"},plot:mM().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:Bv(),categories:["gl3d","showLegend"],meta:{}}}}),Zoe=ye({"lib/isosurface.js"(e,r){"use strict";r.exports=Xoe()}}),bP=ye({"src/traces/volume/attributes.js"(e,r){"use strict";var t=rs(),a=pM(),i=zb(),o=Oo(),s=Xi().extendFlat,l=Cs().overrideAll,n=r.exports=l(s({x:a.x,y:a.y,z:a.z,value:a.value,isomin:a.isomin,isomax:a.isomax,surface:a.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:a.slices,caps:a.caps,text:a.text,hovertext:a.hovertext,xhoverformat:a.xhoverformat,yhoverformat:a.yhoverformat,zhoverformat:a.zhoverformat,valuehoverformat:a.valuehoverformat,hovertemplate:a.hovertemplate,hovertemplatefallback:a.hovertemplatefallback},t("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:a.colorbar,opacity:a.opacity,opacityscale:i.opacityscale,lightposition:a.lightposition,lighting:a.lighting,flatshading:a.flatshading,contour:a.contour,hoverinfo:s({},o.hoverinfo),showlegend:s({},o.showlegend,{dflt:!1})}),"calc","nested");n.x.editType=n.y.editType=n.z.editType=n.value.editType="calc+clearAxisTypes"}}),Koe=ye({"src/traces/volume/defaults.js"(e,r){"use strict";var t=Yt(),a=bP(),i=_P().supplyIsoDefaults,o=yP().opacityscaleDefaults;r.exports=function(l,n,u,c){function f(h,d){return t.coerce(l,n,a,h,d)}i(l,n,u,c,f),o(l,n,c,f)}}}),Joe=ye({"src/traces/volume/convert.js"(e,r){"use strict";var t=$u().gl_mesh3d,a=y0().parseColorScale,i=Yt().isArrayOrTypedArray,o=g0(),s=As().extractOpts,l=Ny(),n=mM().findNearestOnAxis,u=mM().generateIsoMeshes;function c(d,p,g){this.scene=d,this.uid=g,this.mesh=p,this.name="",this.data=null,this.showContour=!1}var f=c.prototype;f.handlePick=function(d){if(d.object===this.mesh){var p=d.data.index,g=this.data._meshX[p],m=this.data._meshY[p],y=this.data._meshZ[p],_=this.data._Ys.length,v=this.data._Zs.length,x=n(g,this.data._Xs).id,E=n(m,this.data._Ys).id,M=n(y,this.data._Zs).id,C=d.index=M+v*E+v*_*x;d.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var w=this.data.hovertext||this.data.text;return i(w)&&w[C]!==void 0?d.textLabel=w[C]:w&&(d.textLabel=w),!0}},f.update=function(d){var p=this.scene,g=p.fullSceneLayout;this.data=u(d);function m(E,M,C,w){return M.map(function(k){return E.d2l(k,0,w)*C})}var y=l(m(g.xaxis,d._meshX,p.dataScale[0],d.xcalendar),m(g.yaxis,d._meshY,p.dataScale[1],d.ycalendar),m(g.zaxis,d._meshZ,p.dataScale[2],d.zcalendar)),_=l(d._meshI,d._meshJ,d._meshK),v={positions:y,cells:_,lightPosition:[d.lightposition.x,d.lightposition.y,d.lightposition.z],ambient:d.lighting.ambient,diffuse:d.lighting.diffuse,specular:d.lighting.specular,roughness:d.lighting.roughness,fresnel:d.lighting.fresnel,vertexNormalsEpsilon:d.lighting.vertexnormalsepsilon,faceNormalsEpsilon:d.lighting.facenormalsepsilon,opacity:d.opacity,opacityscale:d.opacityscale,contourEnable:d.contour.show,contourColor:o(d.contour.color).slice(0,3),contourWidth:d.contour.width,useFacetNormals:d.flatshading},x=s(d);v.vertexIntensity=d._meshIntensity,v.vertexIntensityBounds=[x.min,x.max],v.colormap=a(d),this.mesh.update(v)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function h(d,p){var g=d.glplot.gl,m=t({gl:g}),y=new c(d,m,p.uid);return m._trace=y,y.update(p),d.glplot.add(m),y}r.exports=h}}),Qoe=ye({"src/traces/volume/index.js"(e,r){"use strict";r.exports={attributes:bP(),supplyDefaults:Koe(),calc:xP(),colorbar:{min:"cmin",max:"cmax"},plot:Joe(),moduleType:"trace",name:"volume",basePlotModule:Bv(),categories:["gl3d","showLegend"],meta:{}}}}),ese=ye({"lib/volume.js"(e,r){"use strict";r.exports=Qoe()}}),tse=ye({"src/traces/mesh3d/defaults.js"(e,r){"use strict";var t=li(),a=Yt(),i=Su(),o=Oy();r.exports=function(l,n,u,c){function f(m,y){return a.coerce(l,n,o,m,y)}function h(m){var y=m.map(function(_){var v=f(_);return v&&a.isArrayOrTypedArray(v)?v:null});return y.every(function(_){return _&&_.length===y[0].length})&&y}var d=h(["x","y","z"]);if(!d){n.visible=!1;return}if(h(["i","j","k"]),n.i&&(!n.j||!n.k)||n.j&&(!n.k||!n.i)||n.k&&(!n.i||!n.j)){n.visible=!1;return}var p=t.getComponentMethod("calendars","handleTraceDefaults");p(l,n,["x","y","z"],c),["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){f(m)});var g=f("contour.show");g&&(f("contour.color"),f("contour.width")),"intensity"in l?(f("intensity"),f("intensitymode"),i(l,n,c,f,{prefix:"",cLetter:"c"})):(n.showscale=!1,"facecolor"in l?f("facecolor"):"vertexcolor"in l?f("vertexcolor"):f("color",u)),f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),n._length=null}}}),rse=ye({"src/traces/mesh3d/calc.js"(e,r){"use strict";var t=Nc();r.exports=function(i,o){o.intensity&&t(i,o,{vals:o.intensity,containerStr:"",cLetter:"c"})}}}),ase=ye({"src/traces/mesh3d/convert.js"(e,r){"use strict";var t=$u().gl_mesh3d,a=$u().delaunay_triangulate,i=$u().alpha_shape,o=$u().convex_hull,s=y0().parseColorScale,l=Yt().isArrayOrTypedArray,n=g0(),u=As().extractOpts,c=Ny();function f(v,x,E){this.scene=v,this.uid=E,this.mesh=x,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var h=f.prototype;h.handlePick=function(v){if(v.object===this.mesh){var x=v.index=v.data.index;v.data._cellCenter?v.traceCoordinate=v.data.dataCoordinate:v.traceCoordinate=[this.data.x[x],this.data.y[x],this.data.z[x]];var E=this.data.hovertext||this.data.text;return l(E)&&E[x]!==void 0?v.textLabel=E[x]:E&&(v.textLabel=E),!0}};function d(v){for(var x=[],E=v.length,M=0;M=x-.5)return!1;return!0}h.update=function(v){var x=this.scene,E=x.fullSceneLayout;this.data=v;var M=v.x.length,C=c(p(E.xaxis,v.x,x.dataScale[0],v.xcalendar),p(E.yaxis,v.y,x.dataScale[1],v.ycalendar),p(E.zaxis,v.z,x.dataScale[2],v.zcalendar)),w;if(v.i&&v.j&&v.k){if(v.i.length!==v.j.length||v.j.length!==v.k.length||!y(v.i,M)||!y(v.j,M)||!y(v.k,M))return;w=c(g(v.i),g(v.j),g(v.k))}else v.alphahull===0?w=o(C):v.alphahull>0?w=i(v.alphahull,C):w=m(v.delaunayaxis,C);var k={positions:C,cells:w,lightPosition:[v.lightposition.x,v.lightposition.y,v.lightposition.z],ambient:v.lighting.ambient,diffuse:v.lighting.diffuse,specular:v.lighting.specular,roughness:v.lighting.roughness,fresnel:v.lighting.fresnel,vertexNormalsEpsilon:v.lighting.vertexnormalsepsilon,faceNormalsEpsilon:v.lighting.facenormalsepsilon,opacity:v.opacity,contourEnable:v.contour.show,contourColor:n(v.contour.color).slice(0,3),contourWidth:v.contour.width,useFacetNormals:v.flatshading};if(v.intensity){var T=u(v);this.color="#fff";var b=v.intensitymode;k[b+"Intensity"]=v.intensity,k[b+"IntensityBounds"]=[T.min,T.max],k.colormap=s(v)}else v.vertexcolor?(this.color=v.vertexcolor[0],k.vertexColors=d(v.vertexcolor)):v.facecolor?(this.color=v.facecolor[0],k.cellColors=d(v.facecolor)):(this.color=v.color,k.meshColor=n(v.color));this.mesh.update(k)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function _(v,x){var E=v.glplot.gl,M=t({gl:E}),C=new f(v,M,x.uid);return M._trace=C,C.update(x),v.glplot.add(M),C}r.exports=_}}),ise=ye({"src/traces/mesh3d/index.js"(e,r){"use strict";r.exports={attributes:Oy(),supplyDefaults:tse(),calc:rse(),colorbar:{min:"cmin",max:"cmax"},plot:ase(),moduleType:"trace",name:"mesh3d",basePlotModule:Bv(),categories:["gl3d","showLegend"],meta:{}}}}),nse=ye({"lib/mesh3d.js"(e,r){"use strict";r.exports=ise()}}),wP=ye({"src/traces/cone/attributes.js"(e,r){"use strict";var t=rs(),a=zs().axisHoverFormat,{hovertemplateAttrs:i,templatefallbackAttrs:o}=Ro(),s=Oy(),l=Oo(),n=Xi().extendFlat,u={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:i({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:o({editType:"calc"}),uhoverformat:a("u",1),vhoverformat:a("v",1),whoverformat:a("w",1),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),showlegend:n({},l.showlegend,{dflt:!1})};n(u,t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var c=["opacity","lightposition","lighting"];c.forEach(function(f){u[f]=s[f]}),u.hoverinfo=n({},l.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),r.exports=u}}),ose=ye({"src/traces/cone/defaults.js"(e,r){"use strict";var t=Yt(),a=Su(),i=wP();r.exports=function(s,l,n,u){function c(_,v){return t.coerce(s,l,i,_,v)}var f=c("u"),h=c("v"),d=c("w"),p=c("x"),g=c("y"),m=c("z");if(!f||!f.length||!h||!h.length||!d||!d.length||!p||!p.length||!g||!g.length||!m||!m.length){l.visible=!1;return}var y=c("sizemode");c("sizeref",y==="raw"?1:.5),c("anchor"),c("lighting.ambient"),c("lighting.diffuse"),c("lighting.specular"),c("lighting.roughness"),c("lighting.fresnel"),c("lightposition.x"),c("lightposition.y"),c("lightposition.z"),a(s,l,u,c,{prefix:"",cLetter:"c"}),c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback"),c("uhoverformat"),c("vhoverformat"),c("whoverformat"),c("xhoverformat"),c("yhoverformat"),c("zhoverformat"),l._length=null}}}),sse=ye({"src/traces/cone/calc.js"(e,r){"use strict";var t=Nc();r.exports=function(i,o){for(var s=o.u,l=o.v,n=o.w,u=Math.min(o.x.length,o.y.length,o.z.length,s.length,l.length,n.length),c=-1/0,f=1/0,h=0;h2?y=g.slice(1,m-1):m===2?y=[(g[0]+g[1])/2]:y=g,y}function h(g){var m=g.length;return m===1?[.5,.5]:[g[1]-g[0],g[m-1]-g[m-2]]}function d(g,m){var y=g.fullSceneLayout,_=g.dataScale,v=m._len,x={};function E(J,N){var H=y[N],W=_[n[N]];return i.simpleMap(J,function(U){return H.d2l(U)*W})}if(x.vectors=l(E(m._u,"xaxis"),E(m._v,"yaxis"),E(m._w,"zaxis"),v),!v)return{positions:[],cells:[]};var M=E(m._Xs,"xaxis"),C=E(m._Ys,"yaxis"),w=E(m._Zs,"zaxis");x.meshgrid=[M,C,w],x.gridFill=m._gridFill;var k=m._slen;if(k)x.startingPositions=l(E(m._startsX,"xaxis"),E(m._startsY,"yaxis"),E(m._startsZ,"zaxis"));else{for(var T=C[0],b=f(M),S=f(w),A=new Array(b.length*S.length),F=0,D=0;DT&&(T=F[0]),F[1]b&&(b=F[1])}function A(F){switch(F.type){case"GeometryCollection":F.geometries.forEach(A);break;case"Point":S(F.coordinates);break;case"MultiPoint":F.coordinates.forEach(S);break}}E.arcs.forEach(function(F){for(var D=-1,R=F.length,P;++DT&&(T=P[0]),P[1]b&&(b=P[1])});for(C in E.objects)A(E.objects[C]);return[w,k,T,b]}function s(E,M){for(var C,w=E.length,k=w-M;k<--w;)C=E[k],E[k++]=E[w],E[w]=C}function l(E,M){return typeof M=="string"&&(M=E.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return n(E,C)})}:n(E,M)}function n(E,M){var C=M.id,w=M.bbox,k=M.properties==null?{}:M.properties,T=u(E,M);return C==null&&w==null?{type:"Feature",properties:k,geometry:T}:w==null?{type:"Feature",id:C,properties:k,geometry:T}:{type:"Feature",id:C,bbox:w,properties:k,geometry:T}}function u(E,M){var C=i(E.transform),w=E.arcs;function k(D,R){R.length&&R.pop();for(var P=w[D<0?~D:D],z=0,I=P.length;z1)w=d(E,M,C);else for(k=0,w=new Array(T=E.arcs.length);k1)for(var R=1,P=S(F[0]),z,I;RP&&(I=F[0],F[0]=F[R],F[R]=I,P=z);return F}).filter(function(A){return A.length>0})}}function y(E,M){for(var C=0,w=E.length;C>>1;E[k]=2))throw new Error("n must be \u22652");A=E.bbox||o(E);var C=A[0],w=A[1],k=A[2],T=A[3],b;M={scale:[k-C?(k-C)/(b-1):1,T-w?(T-w)/(b-1):1],translate:[C,w]}}else A=E.bbox;var S=v(M),A,F,D=E.objects,R={};function P(L){return S(L)}function z(L){var B;switch(L.type){case"GeometryCollection":B={type:"GeometryCollection",geometries:L.geometries.map(z)};break;case"Point":B={type:"Point",coordinates:P(L.coordinates)};break;case"MultiPoint":B={type:"MultiPoint",coordinates:L.coordinates.map(P)};break;default:return L}return L.id!=null&&(B.id=L.id),L.bbox!=null&&(B.bbox=L.bbox),L.properties!=null&&(B.properties=L.properties),B}function I(L){var B=0,O=1,G=L.length,$,X=new Array(G);for(X[0]=S(L[0],0);++B0&&(o.push(s),s=[])}return s.length>0&&o.push(s),o},e.makeLine=function(t){return t.length===1?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},e.makePolygon=function(t){if(t.length===1)return{type:"Polygon",coordinates:t};for(var a=new Array(t.length),i=0;i{for(var E in x)t(v,E,{get:x[E],enumerable:!0})},l=(v,x,E,M)=>{if(x&&typeof x=="object"||typeof x=="function")for(let C of i(x))!o.call(v,C)&&C!==E&&t(v,C,{get:()=>x[C],enumerable:!(M=a(x,C))||M.enumerable});return v},n=v=>l(t({},"__esModule",{value:!0}),v),u={};s(u,{COUNTRIES:()=>c,byAlpha2:()=>y,byAlpha3:()=>m,byM49:()=>_,createLookup:()=>h,lookup:()=>p,lookupAlpha3:()=>g,sanitize:()=>f}),r.exports=n(u);var c=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","east pakistan","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","drc","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","macedonia former yugoslav republic of","macedonia fyr","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Naoero",aliases:["\u{1F1F3}\u{1F1F7}","nauru","pleasant island","republic of naoero","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function f(v){return v.normalize("NFD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").toLowerCase().replace(/[\u064B-\u065F]/g,"").replace(/['\u2018\u2019\u02BB\u02BC\u02BD\u02C8\u2032`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-\u2013\u2014]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function h(v){let x=new Map,E=new Map,M=new Map;for(let T of v)x.set(T.iso3,T),T.iso2&&E.set(T.iso2,T),T.m49&&M.set(T.m49,T);let C=new Map;for(let T of v)for(let b of[T.name,...T.aliases]){let S=f(b),A=C.get(S);if(A!==void 0&&A!==T.iso3)throw new Error(`Duplicate name/alias "${S}": ${A} vs ${T.iso3}`);C.set(S,T.iso3)}function w(T){if(T==null)return;let b=String(T).trim();if(!b)return;if(/^\d+$/.test(b)){let A=M.get(String(parseInt(b,10)).padStart(3,"0"));if(A)return A}if(/^[A-Za-z]{2}$/.test(b)){let A=E.get(b.toUpperCase());if(A)return A}if(/^[A-Za-z]{3}$/.test(b)){let A=x.get(b.toUpperCase());if(A)return A}let S=C.get(f(b));return S===void 0?void 0:x.get(S)}function k(T){var b;return(b=w(T))==null?void 0:b.iso3}return{lookup:w,lookupAlpha3:k,byAlpha3:x,byAlpha2:E,byM49:M}}var d=h(c),p=d.lookup,g=d.lookupAlpha3,m=d.byAlpha3,y=d.byAlpha2,_=d.byM49}}),yM=ye({"node_modules/@turf/helpers/dist/cjs/index.cjs"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=63710088e-1,t={centimeters:r*100,centimetres:r*100,degrees:360/(2*Math.PI),feet:r*3.28084,inches:r*39.37,kilometers:r/1e3,kilometres:r/1e3,meters:r,metres:r,miles:r/1609.344,millimeters:r*1e3,millimetres:r*1e3,nauticalmiles:r/1852,radians:1,yards:r*1.0936},a={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function i(D,R,P={}){let z={type:"Feature"};return(P.id===0||P.id)&&(z.id=P.id),P.bbox&&(z.bbox=P.bbox),z.properties=R||{},z.geometry=D,z}function o(D,R,P={}){switch(D){case"Point":return s(R).geometry;case"LineString":return c(R).geometry;case"Polygon":return n(R).geometry;case"MultiPoint":return p(R).geometry;case"MultiLineString":return d(R).geometry;case"MultiPolygon":return g(R).geometry;default:throw new Error(D+" is invalid")}}function s(D,R,P={}){if(!D)throw new Error("coordinates is required");if(!Array.isArray(D))throw new Error("coordinates must be an Array");if(D.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!b(D[0])||!b(D[1]))throw new Error("coordinates must contain numbers");return i({type:"Point",coordinates:D},R,P)}function l(D,R,P={}){return h(D.map(z=>s(z,R)),P)}function n(D,R,P={}){for(let I of D){if(I.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(I[I.length-1].length!==I[0].length)throw new Error("First and last Position are not equivalent.");for(let L=0;Ln(z,R)),P)}function c(D,R,P={}){if(D.length<2)throw new Error("coordinates must be an array of two or more positions");return i({type:"LineString",coordinates:D},R,P)}function f(D,R,P={}){return h(D.map(z=>c(z,R)),P)}function h(D,R={}){let P={type:"FeatureCollection"};return R.id&&(P.id=R.id),R.bbox&&(P.bbox=R.bbox),P.features=D,P}function d(D,R,P={}){return i({type:"MultiLineString",coordinates:D},R,P)}function p(D,R,P={}){return i({type:"MultiPoint",coordinates:D},R,P)}function g(D,R,P={}){return i({type:"MultiPolygon",coordinates:D},R,P)}function m(D,R,P={}){return i({type:"GeometryCollection",geometries:D},R,P)}function y(D,R=0){if(R&&!(R>=0))throw new Error("precision must be a positive number");let P=Math.pow(10,R||0);return Math.round(D*P)/P}function _(D,R="kilometers"){let P=t[R];if(!P)throw new Error(R+" units is invalid");return D*P}function v(D,R="kilometers"){let P=t[R];if(!P)throw new Error(R+" units is invalid");return D/P}function x(D,R){return C(v(D,R))}function E(D){let R=D%360;return R<0&&(R+=360),R}function M(D){return D=D%360,D>180?D-360:D<-180?D+360:D}function C(D){return D%(2*Math.PI)*180/Math.PI}function w(D){return D%360*Math.PI/180}function k(D,R="kilometers",P="kilometers"){if(!(D>=0))throw new Error("length must be a positive number");return _(v(D,R),P)}function T(D,R="meters",P="kilometers"){if(!(D>=0))throw new Error("area must be a positive number");let z=a[R];if(!z)throw new Error("invalid original units");let I=a[P];if(!I)throw new Error("invalid final units");return D/z*I}function b(D){return!isNaN(D)&&D!==null&&!Array.isArray(D)}function S(D){return D!==null&&typeof D=="object"&&!Array.isArray(D)}function A(D){if(!D)throw new Error("bbox is required");if(!Array.isArray(D))throw new Error("bbox must be an Array");if(D.length!==4&&D.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");D.forEach(R=>{if(!b(R))throw new Error("bbox must only contain numbers")})}function F(D){if(!D)throw new Error("id is required");if(["string","number"].indexOf(typeof D)===-1)throw new Error("id must be a number or a string")}e.areaFactors=a,e.azimuthToBearing=M,e.bearingToAzimuth=E,e.convertArea=T,e.convertLength=k,e.degreesToRadians=w,e.earthRadius=r,e.factors=t,e.feature=i,e.featureCollection=h,e.geometry=o,e.geometryCollection=m,e.isNumber=b,e.isObject=S,e.lengthToDegrees=x,e.lengthToRadians=v,e.lineString=c,e.lineStrings=f,e.multiLineString=d,e.multiPoint=p,e.multiPolygon=g,e.point=s,e.points=l,e.polygon=n,e.polygons=u,e.radiansToDegrees=C,e.radiansToLength=_,e.round=y,e.validateBBox=A,e.validateId=F}}),_M=ye({"node_modules/@turf/meta/dist/cjs/index.cjs"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=yM();function t(v,x,E){if(v!==null)for(var M,C,w,k,T,b,S,A=0,F=0,D,R=v.type,P=R==="FeatureCollection",z=R==="Feature",I=P?v.features.length:1,L=0;Lb||P>S||z>A){T=F,b=M,S=P,A=z,w=0;return}var I=r.lineString.call(void 0,[T,F],E.properties);if(x(I,M,C,z,w)===!1)return!1;w++,T=F})===!1)return!1}}})}function p(v,x,E){var M=E,C=!1;return d(v,function(w,k,T,b,S){C===!1&&E===void 0?M=w:M=x(M,w,k,T,b,S),C=!0}),M}function g(v,x){if(!v)throw new Error("geojson is required");f(v,function(E,M,C){if(E.geometry!==null){var w=E.geometry.type,k=E.geometry.coordinates;switch(w){case"LineString":if(x(E,M,C,0,0)===!1)return!1;break;case"Polygon":for(var T=0;Tf+i(h),0)}function i(c){let f=0,h;switch(c.type){case"Polygon":return o(c.coordinates);case"MultiPolygon":for(h=0;h0){f+=Math.abs(n(c[0]));for(let h=1;h=f?(d+2)%f:d+2],y=p[0]*l,_=g[1]*l,v=m[0]*l;h+=(v-y)*Math.sin(_),d++}return h*s}var u=a;e.area=a,e.default=u}}),_se=ye({"node_modules/@turf/centroid/dist/cjs/index.cjs"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=yM(),t=_M();function a(o,s={}){let l=0,n=0,u=0;return t.coordEach.call(void 0,o,function(c){l+=c[0],n+=c[1],u++},!0),r.point.call(void 0,[l/u,n/u],s.properties)}var i=a;e.centroid=a,e.default=i}}),xse=ye({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(e,r){(function(t,a){a(typeof e=="object"&&typeof r<"u"?e:t.d3=t.d3||{})})(e,(function(t){"use strict";function a(W,U){return WU?1:W>=U?0:NaN}function i(W){return W.length===1&&(W=o(W)),{left:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)<0?j=Y+1:q=Y}return j},right:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)>0?q=Y:j=Y+1}return j}}}function o(W){return function(U,V){return a(W(U),V)}}var s=i(a),l=s.right,n=s.left;function u(W,U){U==null&&(U=c);for(var V=0,j=W.length-1,q=W[0],Y=new Array(j<0?0:j);VW?1:U>=W?0:NaN}function d(W){return W===null?NaN:+W}function p(W,U){var V=W.length,j=0,q=-1,Y=0,K,re,se=0;if(U==null)for(;++q1)return se/(j-1)}function g(W,U){var V=p(W,U);return V&&Math.sqrt(V)}function m(W,U){var V=W.length,j=-1,q,Y,K;if(U==null){for(;++j=q)for(Y=K=q;++jq&&(Y=q),K=q)for(Y=K=q;++jq&&(Y=q),K0)return[W];if((j=U0)for(W=Math.ceil(W/re),U=Math.floor(U/re),K=new Array(Y=Math.ceil(U-W+1));++q=0?(Y>=C?10:Y>=w?5:Y>=k?2:1)*Math.pow(10,q):-Math.pow(10,-q)/(Y>=C?10:Y>=w?5:Y>=k?2:1)}function S(W,U,V){var j=Math.abs(U-W)/Math.max(0,V),q=Math.pow(10,Math.floor(Math.log(j)/Math.LN10)),Y=j/q;return Y>=C?q*=10:Y>=w?q*=5:Y>=k&&(q*=2),Ufe;)pe.pop(),--we;var xe=new Array(we+1),he;for(Y=0;Y<=we;++Y)he=xe[Y]=[],he.x0=Y>0?pe[Y-1]:ue,he.x1=Y=1)return+V(W[j-1],j-1,W);var j,q=(j-1)*U,Y=Math.floor(q),K=+V(W[Y],Y,W),re=+V(W[Y+1],Y+1,W);return K+(re-K)*(q-Y)}}function R(W,U,V){return W=v.call(W,d).sort(a),Math.ceil((V-U)/(2*(D(W,.75)-D(W,.25))*Math.pow(W.length,-1/3)))}function P(W,U,V){return Math.ceil((V-U)/(3.5*g(W)*Math.pow(W.length,-1/3)))}function z(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jY&&(Y=q)}else for(;++j=q)for(Y=q;++jY&&(Y=q);return Y}function I(W,U){var V=W.length,j=V,q=-1,Y,K=0;if(U==null)for(;++q=0;)for(K=W[U],V=K.length;--V>=0;)Y[--q]=K[V];return Y}function O(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jq&&(Y=q)}else for(;++j=q)for(Y=q;++jq&&(Y=q);return Y}function G(W,U){for(var V=U.length,j=new Array(V);V--;)j[V]=W[U[V]];return j}function $(W,U){if(V=W.length){var V,j=0,q=0,Y,K=W[q];for(U==null&&(U=a);++j0?1:it<0?-1:0},T=Math.sqrt,b=Math.tan;function S(it){return it>1?0:it<-1?c:Math.acos(it)}function A(it){return it>1?f:it<-1?-f:Math.asin(it)}function F(it){return(it=w(it/2))*it}function D(){}function R(it,wt){it&&z.hasOwnProperty(it.type)&&z[it.type](it,wt)}var P={Feature:function(it,wt){R(it.geometry,wt)},FeatureCollection:function(it,wt){for(var $t=it.features,Bt=-1,cr=$t.length;++Bt=0?1:-1,cr=Bt*$t,Sr=v(wt),Pr=w(wt),qr=N*Pr,$r=J*Sr+qr*v(cr),va=qr*Bt*w(cr);O.add(_(va,$r)),Z=it,J=Sr,N=Pr}function q(it){return G.reset(),B(it,H),G*2}function Y(it){return[_(it[1],it[0]),A(it[2])]}function K(it){var wt=it[0],$t=it[1],Bt=v($t);return[Bt*v(wt),Bt*w(wt),w($t)]}function re(it,wt){return it[0]*wt[0]+it[1]*wt[1]+it[2]*wt[2]}function se(it,wt){return[it[1]*wt[2]-it[2]*wt[1],it[2]*wt[0]-it[0]*wt[2],it[0]*wt[1]-it[1]*wt[0]]}function le(it,wt){it[0]+=wt[0],it[1]+=wt[1],it[2]+=wt[2]}function ue(it,wt){return[it[0]*wt,it[1]*wt,it[2]*wt]}function fe(it){var wt=T(it[0]*it[0]+it[1]*it[1]+it[2]*it[2]);it[0]/=wt,it[1]/=wt,it[2]/=wt}var pe,we,xe,he,oe,te,ie,ee,ce=i(),_e,Se,Me={point:Ue,lineStart:Ze,lineEnd:Ke,polygonStart:function(){Me.point=dt,Me.lineStart=_t,Me.lineEnd=Pt,ce.reset(),H.polygonStart()},polygonEnd:function(){H.polygonEnd(),Me.point=Ue,Me.lineStart=Ze,Me.lineEnd=Ke,O<0?(pe=-(xe=180),we=-(he=90)):ce>n?he=90:ce<-n&&(we=-90),Se[0]=pe,Se[1]=xe},sphere:function(){pe=-(xe=180),we=-(he=90)}};function Ue(it,wt){_e.push(Se=[pe=it,xe=it]),wthe&&(he=wt)}function Ge(it,wt){var $t=K([it*g,wt*g]);if(ee){var Bt=se(ee,$t),cr=[Bt[1],-Bt[0],0],Sr=se(cr,Bt);fe(Sr),Sr=Y(Sr);var Pr=it-oe,qr=Pr>0?1:-1,$r=Sr[0]*p*qr,va,Rr=m(Pr)>180;Rr^(qr*oe<$r&&$rhe&&(he=va)):($r=($r+360)%360-180,Rr^(qr*oe<$r&&$rhe&&(he=wt))),Rr?itvt(pe,xe)&&(xe=it):vt(it,xe)>vt(pe,xe)&&(pe=it):xe>=pe?(itxe&&(xe=it)):it>oe?vt(pe,it)>vt(pe,xe)&&(xe=it):vt(it,xe)>vt(pe,xe)&&(pe=it)}else _e.push(Se=[pe=it,xe=it]);wthe&&(he=wt),ee=$t,oe=it}function Ze(){Me.point=Ge}function Ke(){Se[0]=pe,Se[1]=xe,Me.point=Ue,ee=null}function dt(it,wt){if(ee){var $t=it-oe;ce.add(m($t)>180?$t+($t>0?360:-360):$t)}else te=it,ie=wt;H.point(it,wt),Ge(it,wt)}function _t(){H.lineStart()}function Pt(){dt(te,ie),H.lineEnd(),m(ce)>n&&(pe=-(xe=180)),Se[0]=pe,Se[1]=xe,ee=null}function vt(it,wt){return(wt-=it)<0?wt+360:wt}function Tt(it,wt){return it[0]-wt[0]}function st(it,wt){return it[0]<=it[1]?it[0]<=wt&&wt<=it[1]:wtvt(Bt[0],Bt[1])&&(Bt[1]=cr[1]),vt(cr[0],Bt[1])>vt(Bt[0],Bt[1])&&(Bt[0]=cr[0])):Sr.push(Bt=cr);for(Pr=-1/0,$t=Sr.length-1,wt=0,Bt=Sr[$t];wt<=$t;Bt=cr,++wt)cr=Sr[wt],(qr=vt(Bt[1],cr[0]))>Pr&&(Pr=qr,pe=cr[0],xe=Bt[1])}return _e=Se=null,pe===1/0||we===1/0?[[NaN,NaN],[NaN,NaN]]:[[pe,we],[xe,he]]}var Ye,me,be,Ee,De,Ce,Fe,Je,qe,at,tt,ct,At,ft,qt,ar,mt={sphere:D,point:gt,lineStart:Dt,lineEnd:lr,polygonStart:function(){mt.lineStart=dr,mt.lineEnd=yr},polygonEnd:function(){mt.lineStart=Dt,mt.lineEnd=lr}};function gt(it,wt){it*=g,wt*=g;var $t=v(wt);St($t*v(it),$t*w(it),w(wt))}function St(it,wt,$t){++Ye,be+=(it-be)/Ye,Ee+=(wt-Ee)/Ye,De+=($t-De)/Ye}function Dt(){mt.point=kt}function kt(it,wt){it*=g,wt*=g;var $t=v(wt);ft=$t*v(it),qt=$t*w(it),ar=w(wt),mt.point=Vt,St(ft,qt,ar)}function Vt(it,wt){it*=g,wt*=g;var $t=v(wt),Bt=$t*v(it),cr=$t*w(it),Sr=w(wt),Pr=_(T((Pr=qt*Sr-ar*cr)*Pr+(Pr=ar*Bt-ft*Sr)*Pr+(Pr=ft*cr-qt*Bt)*Pr),ft*Bt+qt*cr+ar*Sr);me+=Pr,Ce+=Pr*(ft+(ft=Bt)),Fe+=Pr*(qt+(qt=cr)),Je+=Pr*(ar+(ar=Sr)),St(ft,qt,ar)}function lr(){mt.point=gt}function dr(){mt.point=vr}function yr(){Fr(ct,At),mt.point=gt}function vr(it,wt){ct=it,At=wt,it*=g,wt*=g,mt.point=Fr;var $t=v(wt);ft=$t*v(it),qt=$t*w(it),ar=w(wt),St(ft,qt,ar)}function Fr(it,wt){it*=g,wt*=g;var $t=v(wt),Bt=$t*v(it),cr=$t*w(it),Sr=w(wt),Pr=qt*Sr-ar*cr,qr=ar*Bt-ft*Sr,$r=ft*cr-qt*Bt,va=T(Pr*Pr+qr*qr+$r*$r),Rr=A(va),Gr=va&&-Rr/va;qe+=Gr*Pr,at+=Gr*qr,tt+=Gr*$r,me+=Rr,Ce+=Rr*(ft+(ft=Bt)),Fe+=Rr*(qt+(qt=cr)),Je+=Rr*(ar+(ar=Sr)),St(ft,qt,ar)}function la(it){Ye=me=be=Ee=De=Ce=Fe=Je=qe=at=tt=0,B(it,mt);var wt=qe,$t=at,Bt=tt,cr=wt*wt+$t*$t+Bt*Bt;return crc?it+Math.round(-it/d)*d:it,wt]}Oa.invert=Oa;function Da(it,wt,$t){return(it%=d)?wt||$t?jr(ti(it),Ka(wt,$t)):ti(it):wt||$t?Ka(wt,$t):Oa}function _i(it){return function(wt,$t){return wt+=it,[wt>c?wt-d:wt<-c?wt+d:wt,$t]}}function ti(it){var wt=_i(it);return wt.invert=_i(-it),wt}function Ka(it,wt){var $t=v(it),Bt=w(it),cr=v(wt),Sr=w(wt);function Pr(qr,$r){var va=v($r),Rr=v(qr)*va,Gr=w(qr)*va,Yr=w($r),da=Yr*$t+Rr*Bt;return[_(Gr*cr-da*Sr,Rr*$t-Yr*Bt),A(da*cr+Gr*Sr)]}return Pr.invert=function(qr,$r){var va=v($r),Rr=v(qr)*va,Gr=w(qr)*va,Yr=w($r),da=Yr*cr-Gr*Sr;return[_(Gr*cr+Yr*Sr,Rr*$t+da*Bt),A(da*$t-Rr*Bt)]},Pr}function ia(it){it=Da(it[0]*g,it[1]*g,it.length>2?it[2]*g:0);function wt($t){return $t=it($t[0]*g,$t[1]*g),$t[0]*=p,$t[1]*=p,$t}return wt.invert=function($t){return $t=it.invert($t[0]*g,$t[1]*g),$t[0]*=p,$t[1]*=p,$t},wt}function na(it,wt,$t,Bt,cr,Sr){if($t){var Pr=v(wt),qr=w(wt),$r=Bt*$t;cr==null?(cr=wt+Bt*d,Sr=wt-$r/2):(cr=xi(Pr,cr),Sr=xi(Pr,Sr),(Bt>0?crSr)&&(cr+=Bt*d));for(var va,Rr=cr;Bt>0?Rr>Sr:Rr1&&it.push(it.pop().concat(it.shift()))},result:function(){var $t=it;return it=[],wt=null,$t}}}function Nr(it,wt){return m(it[0]-wt[0])=0;--qr)cr.point((Gr=Rr[qr])[0],Gr[1]);else Bt(Yr.x,Yr.p.x,-1,cr);Yr=Yr.p}Yr=Yr.o,Rr=Yr.z,da=!da}while(!Yr.v);cr.lineEnd()}}}function Et(it){if(wt=it.length){for(var wt,$t=0,Bt=it[0],cr;++$t=0?1:-1,ho=Co*ao,No=ho>c,Wn=gi*Ki;if(Mt.add(_(Wn*Co*w(ho),pi*pn+Wn*v(ho))),Pr+=No?ao+Co*d:ao,No^da>=$t^Ra>=$t){var Os=se(K(Yr),K(ji));fe(Os);var fs=se(Sr,Os);fe(fs);var zo=(No^ao>=0?-1:1)*A(fs[2]);(Bt>zo||Bt===zo&&(Os[0]||Os[1]))&&(qr+=No^ao>=0?1:-1)}}return(Pr<-n||Pr0){for($r||(cr.polygonStart(),$r=!0),cr.lineStart(),pn=0;pn1&&Ga&2&&Ki.push(Ki.pop().concat(Ki.shift())),Rr.push(Ki.filter(Be))}}return Yr}}function Be(it){return it.length>1}function et(it,wt){return((it=it.x)[0]<0?it[1]-f-n:f-it[1])-((wt=wt.x)[0]<0?wt[1]-f-n:f-wt[1])}var ut=Ht(function(){return!0},bt,It,[-c,-f]);function bt(it){var wt=NaN,$t=NaN,Bt=NaN,cr;return{lineStart:function(){it.lineStart(),cr=1},point:function(Sr,Pr){var qr=Sr>0?c:-c,$r=m(Sr-wt);m($r-c)0?f:-f),it.point(Bt,$t),it.lineEnd(),it.lineStart(),it.point(qr,$t),it.point(Sr,$t),cr=0):Bt!==qr&&$r>=c&&(m(wt-Bt)n?y((w(wt)*(Sr=v(Bt))*w($t)-w(Bt)*(cr=v(wt))*w(it))/(cr*Sr*Pr)):(wt+Bt)/2}function It(it,wt,$t,Bt){var cr;if(it==null)cr=$t*f,Bt.point(-c,cr),Bt.point(0,cr),Bt.point(c,cr),Bt.point(c,0),Bt.point(c,-cr),Bt.point(0,-cr),Bt.point(-c,-cr),Bt.point(-c,0),Bt.point(-c,cr);else if(m(it[0]-wt[0])>n){var Sr=it[0]0,cr=m(wt)>n;function Sr(Rr,Gr,Yr,da){na(da,it,$t,Yr,Rr,Gr)}function Pr(Rr,Gr){return v(Rr)*v(Gr)>wt}function qr(Rr){var Gr,Yr,da,La,gi;return{lineStart:function(){La=da=!1,gi=1},point:function(pi,Pi){var ji=[pi,Pi],Ra,Ga=Pr(pi,Pi),Ki=Bt?Ga?0:va(pi,Pi):Ga?va(pi+(pi<0?c:-c),Pi):0;if(!Gr&&(La=da=Ga)&&Rr.lineStart(),Ga!==da&&(Ra=$r(Gr,ji),(!Ra||Nr(Gr,Ra)||Nr(ji,Ra))&&(ji[2]=1)),Ga!==da)gi=0,Ga?(Rr.lineStart(),Ra=$r(ji,Gr),Rr.point(Ra[0],Ra[1])):(Ra=$r(Gr,ji),Rr.point(Ra[0],Ra[1],2),Rr.lineEnd()),Gr=Ra;else if(cr&&Gr&&Bt^Ga){var pn;!(Ki&Yr)&&(pn=$r(ji,Gr,!0))&&(gi=0,Bt?(Rr.lineStart(),Rr.point(pn[0][0],pn[0][1]),Rr.point(pn[1][0],pn[1][1]),Rr.lineEnd()):(Rr.point(pn[1][0],pn[1][1]),Rr.lineEnd(),Rr.lineStart(),Rr.point(pn[0][0],pn[0][1],3)))}Ga&&(!Gr||!Nr(Gr,ji))&&Rr.point(ji[0],ji[1]),Gr=ji,da=Ga,Yr=Ki},lineEnd:function(){da&&Rr.lineEnd(),Gr=null},clean:function(){return gi|(La&&da)<<1}}}function $r(Rr,Gr,Yr){var da=K(Rr),La=K(Gr),gi=[1,0,0],pi=se(da,La),Pi=re(pi,pi),ji=pi[0],Ra=Pi-ji*ji;if(!Ra)return!Yr&&Rr;var Ga=wt*Pi/Ra,Ki=-wt*ji/Ra,pn=se(gi,pi),ao=ue(gi,Ga),Co=ue(pi,Ki);le(ao,Co);var ho=pn,No=re(ao,ho),Wn=re(ho,ho),Os=No*No-Wn*(re(ao,ao)-1);if(!(Os<0)){var fs=T(Os),zo=ue(ho,(-No-fs)/Wn);if(le(zo,ao),zo=Y(zo),!Yr)return zo;var Qa=Rr[0],io=Gr[0],Ms=Rr[1],Ns=Gr[1],jl;io0^zo[1]<(m(zo[0]-Qa)c^(Qa<=zo[0]&&zo[0]<=io)){var Cl=ue(ho,(-No+fs)/Wn);return le(Cl,ao),[zo,Y(Cl)]}}}function va(Rr,Gr){var Yr=Bt?it:c-it,da=0;return Rr<-Yr?da|=1:Rr>Yr&&(da|=2),Gr<-Yr?da|=4:Gr>Yr&&(da|=8),da}return Ht(Pr,qr,Sr,Bt?[0,-it]:[-c,it-c])}function jt(it,wt,$t,Bt,cr,Sr){var Pr=it[0],qr=it[1],$r=wt[0],va=wt[1],Rr=0,Gr=1,Yr=$r-Pr,da=va-qr,La;if(La=$t-Pr,!(!Yr&&La>0)){if(La/=Yr,Yr<0){if(La0){if(La>Gr)return;La>Rr&&(Rr=La)}if(La=cr-Pr,!(!Yr&&La<0)){if(La/=Yr,Yr<0){if(La>Gr)return;La>Rr&&(Rr=La)}else if(Yr>0){if(La0)){if(La/=da,da<0){if(La0){if(La>Gr)return;La>Rr&&(Rr=La)}if(La=Sr-qr,!(!da&&La<0)){if(La/=da,da<0){if(La>Gr)return;La>Rr&&(Rr=La)}else if(da>0){if(La0&&(it[0]=Pr+Rr*Yr,it[1]=qr+Rr*da),Gr<1&&(wt[0]=Pr+Gr*Yr,wt[1]=qr+Gr*da),!0}}}}}var sr=1e9,kr=-sr;function Mr(it,wt,$t,Bt){function cr(va,Rr){return it<=va&&va<=$t&&wt<=Rr&&Rr<=Bt}function Sr(va,Rr,Gr,Yr){var da=0,La=0;if(va==null||(da=Pr(va,Gr))!==(La=Pr(Rr,Gr))||$r(va,Rr)<0^Gr>0)do Yr.point(da===0||da===3?it:$t,da>1?Bt:wt);while((da=(da+Gr+4)%4)!==La);else Yr.point(Rr[0],Rr[1])}function Pr(va,Rr){return m(va[0]-it)0?0:3:m(va[0]-$t)0?2:1:m(va[1]-wt)0?1:0:Rr>0?3:2}function qr(va,Rr){return $r(va.x,Rr.x)}function $r(va,Rr){var Gr=Pr(va,1),Yr=Pr(Rr,1);return Gr!==Yr?Gr-Yr:Gr===0?Rr[1]-va[1]:Gr===1?va[0]-Rr[0]:Gr===2?va[1]-Rr[1]:Rr[0]-va[0]}return function(va){var Rr=va,Gr=Qr(),Yr,da,La,gi,pi,Pi,ji,Ra,Ga,Ki,pn,ao={point:Co,lineStart:Os,lineEnd:fs,polygonStart:No,polygonEnd:Wn};function Co(Qa,io){cr(Qa,io)&&Rr.point(Qa,io)}function ho(){for(var Qa=0,io=0,Ms=da.length;ioBt&&(oc-Lc)*(Bt-Cl)>(of-Cl)*(it-Lc)&&++Qa:of<=Bt&&(oc-Lc)*(Bt-Cl)<(of-Cl)*(it-Lc)&&--Qa;return Qa}function No(){Rr=Gr,Yr=[],da=[],pn=!0}function Wn(){var Qa=ho(),io=pn&&Qa,Ms=(Yr=a.merge(Yr)).length;(io||Ms)&&(va.polygonStart(),io&&(va.lineStart(),Sr(null,null,1,va),va.lineEnd()),Ms&&Ie(Yr,qr,Qa,Sr,va),va.polygonEnd()),Rr=va,Yr=da=La=null}function Os(){ao.point=zo,da&&da.push(La=[]),Ki=!0,Ga=!1,ji=Ra=NaN}function fs(){Yr&&(zo(gi,pi),Pi&&Ga&&Gr.rejoin(),Yr.push(Gr.result())),ao.point=Co,Ga&&Rr.lineEnd()}function zo(Qa,io){var Ms=cr(Qa,io);if(da&&La.push([Qa,io]),Ki)gi=Qa,pi=io,Pi=Ms,Ki=!1,Ms&&(Rr.lineStart(),Rr.point(Qa,io));else if(Ms&&Ga)Rr.point(Qa,io);else{var Ns=[ji=Math.max(kr,Math.min(sr,ji)),Ra=Math.max(kr,Math.min(sr,Ra))],jl=[Qa=Math.max(kr,Math.min(sr,Qa)),io=Math.max(kr,Math.min(sr,io))];jt(Ns,jl,it,wt,$t,Bt)?(Ga||(Rr.lineStart(),Rr.point(Ns[0],Ns[1])),Rr.point(jl[0],jl[1]),Ms||Rr.lineEnd(),pn=!1):Ms&&(Rr.lineStart(),Rr.point(Qa,io),pn=!1)}ji=Qa,Ra=io,Ga=Ms}return ao}}function ua(){var it=0,wt=0,$t=960,Bt=500,cr,Sr,Pr;return Pr={stream:function(qr){return cr&&Sr===qr?cr:cr=Mr(it,wt,$t,Bt)(Sr=qr)},extent:function(qr){return arguments.length?(it=+qr[0][0],wt=+qr[0][1],$t=+qr[1][0],Bt=+qr[1][1],cr=Sr=null,Pr):[[it,wt],[$t,Bt]]}}}var ra=i(),ni,Ca,Li,Va={sphere:D,point:D,lineStart:dn,lineEnd:D,polygonStart:D,polygonEnd:D};function dn(){Va.point=pa,Va.lineEnd=rn}function rn(){Va.point=Va.lineEnd=D}function pa(it,wt){it*=g,wt*=g,ni=it,Ca=w(wt),Li=v(wt),Va.point=_n}function _n(it,wt){it*=g,wt*=g;var $t=w(wt),Bt=v(wt),cr=m(it-ni),Sr=v(cr),Pr=w(cr),qr=Bt*Pr,$r=Li*$t-Ca*Bt*Sr,va=Ca*$t+Li*Bt*Sr;ra.add(_(T(qr*qr+$r*$r),va)),ni=it,Ca=$t,Li=Bt}function Zi(it){return ra.reset(),B(it,Va),+ra}var Fi=[null,null],xn={type:"LineString",coordinates:Fi};function Ni(it,wt){return Fi[0]=it,Fi[1]=wt,Zi(xn)}var un={Feature:function(it,wt){return bn(it.geometry,wt)},FeatureCollection:function(it,wt){for(var $t=it.features,Bt=-1,cr=$t.length;++Bt0&&(cr=Ni(it[Sr],it[Sr-1]),cr>0&&$t<=cr&&Bt<=cr&&($t+Bt-cr)*(1-Math.pow(($t-Bt)/cr,2))n}).map(Yr)).concat(a.range(x(Sr/va)*va,cr,va).filter(function(Ra){return m(Ra%Gr)>n}).map(da))}return Pi.lines=function(){return ji().map(function(Ra){return{type:"LineString",coordinates:Ra}})},Pi.outline=function(){return{type:"Polygon",coordinates:[La(Bt).concat(gi(Pr).slice(1),La($t).reverse().slice(1),gi(qr).reverse().slice(1))]}},Pi.extent=function(Ra){return arguments.length?Pi.extentMajor(Ra).extentMinor(Ra):Pi.extentMinor()},Pi.extentMajor=function(Ra){return arguments.length?(Bt=+Ra[0][0],$t=+Ra[1][0],qr=+Ra[0][1],Pr=+Ra[1][1],Bt>$t&&(Ra=Bt,Bt=$t,$t=Ra),qr>Pr&&(Ra=qr,qr=Pr,Pr=Ra),Pi.precision(pi)):[[Bt,qr],[$t,Pr]]},Pi.extentMinor=function(Ra){return arguments.length?(wt=+Ra[0][0],it=+Ra[1][0],Sr=+Ra[0][1],cr=+Ra[1][1],wt>it&&(Ra=wt,wt=it,it=Ra),Sr>cr&&(Ra=Sr,Sr=cr,cr=Ra),Pi.precision(pi)):[[wt,Sr],[it,cr]]},Pi.step=function(Ra){return arguments.length?Pi.stepMajor(Ra).stepMinor(Ra):Pi.stepMinor()},Pi.stepMajor=function(Ra){return arguments.length?(Rr=+Ra[0],Gr=+Ra[1],Pi):[Rr,Gr]},Pi.stepMinor=function(Ra){return arguments.length?($r=+Ra[0],va=+Ra[1],Pi):[$r,va]},Pi.precision=function(Ra){return arguments.length?(pi=+Ra,Yr=Un(Sr,cr,90),da=Kn(wt,it,pi),La=Un(qr,Pr,90),gi=Kn(Bt,$t,pi),Pi):pi},Pi.extentMajor([[-180,-90+n],[180,90-n]]).extentMinor([[-180,-80-n],[180,80+n]])}function Jn(){return To()()}function qn(it,wt){var $t=it[0]*g,Bt=it[1]*g,cr=wt[0]*g,Sr=wt[1]*g,Pr=v(Bt),qr=w(Bt),$r=v(Sr),va=w(Sr),Rr=Pr*v($t),Gr=Pr*w($t),Yr=$r*v(cr),da=$r*w(cr),La=2*A(T(F(Sr-Bt)+Pr*$r*F(cr-$t))),gi=w(La),pi=La?function(Pi){var ji=w(Pi*=La)/gi,Ra=w(La-Pi)/gi,Ga=Ra*Rr+ji*Yr,Ki=Ra*Gr+ji*da,pn=Ra*qr+ji*va;return[_(Ki,Ga)*p,_(pn,T(Ga*Ga+Ki*Ki))*p]}:function(){return[$t*p,Bt*p]};return pi.distance=La,pi}function Fo(it){return it}var zn=i(),wn=i(),os,uo,Yn,go,Cn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){Cn.lineStart=Xo,Cn.lineEnd=sl},polygonEnd:function(){Cn.lineStart=Cn.lineEnd=Cn.point=D,zn.add(m(wn)),wn.reset()},result:function(){var it=zn/2;return zn.reset(),it}};function Xo(){Cn.point=gs}function gs(it,wt){Cn.point=yo,os=Yn=it,uo=go=wt}function yo(it,wt){wn.add(go*it-Yn*wt),Yn=it,go=wt}function sl(){yo(os,uo)}var ss=1/0,oo=ss,Bn=-ss,An=Bn,Po={point:Bl,lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D,result:function(){var it=[[ss,oo],[Bn,An]];return Bn=An=-(oo=ss=1/0),it}};function Bl(it,wt){itBn&&(Bn=it),wtAn&&(An=wt)}var Lu=0,Jl=0,Fu=0,Pu=0,Ku=0,mu=0,$c=0,Ju=0,Ol=0,Yc,Qu,Sl,cs,Qo={point:ml,lineStart:Xc,lineEnd:ed,polygonStart:function(){Qo.lineStart=td,Qo.lineEnd=bp},polygonEnd:function(){Qo.point=ml,Qo.lineStart=Xc,Qo.lineEnd=ed},result:function(){var it=Ol?[$c/Ol,Ju/Ol]:mu?[Pu/mu,Ku/mu]:Fu?[Lu/Fu,Jl/Fu]:[NaN,NaN];return Lu=Jl=Fu=Pu=Ku=mu=$c=Ju=Ol=0,it}};function ml(it,wt){Lu+=it,Jl+=wt,++Fu}function Xc(){Qo.point=Zc}function Zc(it,wt){Qo.point=kc,ml(Sl=it,cs=wt)}function kc(it,wt){var $t=it-Sl,Bt=wt-cs,cr=T($t*$t+Bt*Bt);Pu+=cr*(Sl+it)/2,Ku+=cr*(cs+wt)/2,mu+=cr,ml(Sl=it,cs=wt)}function ed(){Qo.point=ml}function td(){Qo.point=t0}function bp(){ec(Yc,Qu)}function t0(it,wt){Qo.point=ec,ml(Yc=Sl=it,Qu=cs=wt)}function ec(it,wt){var $t=it-Sl,Bt=wt-cs,cr=T($t*$t+Bt*Bt);Pu+=cr*(Sl+it)/2,Ku+=cr*(cs+wt)/2,mu+=cr,cr=cs*it-Sl*wt,$c+=cr*(Sl+it),Ju+=cr*(cs+wt),Ol+=cr*3,ml(Sl=it,cs=wt)}function ys(it){this._context=it}ys.prototype={_radius:4.5,pointRadius:function(it){return this._radius=it,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(it,wt){switch(this._point){case 0:{this._context.moveTo(it,wt),this._point=1;break}case 1:{this._context.lineTo(it,wt);break}default:{this._context.moveTo(it+this._radius,wt),this._context.arc(it,wt,this._radius,0,d);break}}},result:D};var rd=i(),Hf,Kc,ad,Jc,Tf,tc={point:D,lineStart:function(){tc.point=Wf},lineEnd:function(){Hf&&xh(Kc,ad),tc.point=D},polygonStart:function(){Hf=!0},polygonEnd:function(){Hf=null},result:function(){var it=+rd;return rd.reset(),it}};function Wf(it,wt){tc.point=xh,Kc=Jc=it,ad=Tf=wt}function xh(it,wt){Jc-=it,Tf-=wt,rd.add(T(Jc*Jc+Tf*Tf)),Jc=it,Tf=wt}function Qc(){this._string=[]}Qc.prototype={_radius:4.5,_circle:Wd(4.5),pointRadius:function(it){return(it=+it)!==this._radius&&(this._radius=it,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(it,wt){switch(this._point){case 0:{this._string.push("M",it,",",wt),this._point=1;break}case 1:{this._string.push("L",it,",",wt);break}default:{this._circle==null&&(this._circle=Wd(this._radius)),this._string.push("M",it,",",wt,this._circle);break}}},result:function(){if(this._string.length){var it=this._string.join("");return this._string=[],it}else return null}};function Wd(it){return"m0,"+it+"a"+it+","+it+" 0 1,1 0,"+-2*it+"a"+it+","+it+" 0 1,1 0,"+2*it+"z"}function bh(it,wt){var $t=4.5,Bt,cr;function Sr(Pr){return Pr&&(typeof $t=="function"&&cr.pointRadius(+$t.apply(this,arguments)),B(Pr,Bt(cr))),cr.result()}return Sr.area=function(Pr){return B(Pr,Bt(Cn)),Cn.result()},Sr.measure=function(Pr){return B(Pr,Bt(tc)),tc.result()},Sr.bounds=function(Pr){return B(Pr,Bt(Po)),Po.result()},Sr.centroid=function(Pr){return B(Pr,Bt(Qo)),Qo.result()},Sr.projection=function(Pr){return arguments.length?(Bt=Pr==null?(it=null,Fo):(it=Pr).stream,Sr):it},Sr.context=function(Pr){return arguments.length?(cr=Pr==null?(wt=null,new Qc):new ys(wt=Pr),typeof $t!="function"&&cr.pointRadius($t),Sr):wt},Sr.pointRadius=function(Pr){return arguments.length?($t=typeof Pr=="function"?Pr:(cr.pointRadius(+Pr),+Pr),Sr):$t},Sr.projection(it).context(wt)}function wp(it){return{stream:rc(it)}}function rc(it){return function(wt){var $t=new id;for(var Bt in it)$t[Bt]=it[Bt];return $t.stream=wt,$t}}function id(){}id.prototype={constructor:id,point:function(it,wt){this.stream.point(it,wt)},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 Iu(it,wt,$t){var Bt=it.clipExtent&&it.clipExtent();return it.scale(150).translate([0,0]),Bt!=null&&it.clipExtent(null),B($t,it.stream(Po)),wt(Po.result()),Bt!=null&&it.clipExtent(Bt),it}function wh(it,wt,$t){return Iu(it,function(Bt){var cr=wt[1][0]-wt[0][0],Sr=wt[1][1]-wt[0][1],Pr=Math.min(cr/(Bt[1][0]-Bt[0][0]),Sr/(Bt[1][1]-Bt[0][1])),qr=+wt[0][0]+(cr-Pr*(Bt[1][0]+Bt[0][0]))/2,$r=+wt[0][1]+(Sr-Pr*(Bt[1][1]+Bt[0][1]))/2;it.scale(150*Pr).translate([qr,$r])},$t)}function Nl(it,wt,$t){return wh(it,[[0,0],wt],$t)}function $f(it,wt,$t){return Iu(it,function(Bt){var cr=+wt,Sr=cr/(Bt[1][0]-Bt[0][0]),Pr=(cr-Sr*(Bt[1][0]+Bt[0][0]))/2,qr=-Sr*Bt[0][1];it.scale(150*Sr).translate([Pr,qr])},$t)}function ac(it,wt,$t){return Iu(it,function(Bt){var cr=+wt,Sr=cr/(Bt[1][1]-Bt[0][1]),Pr=-Sr*Bt[0][0],qr=(cr-Sr*(Bt[1][1]+Bt[0][1]))/2;it.scale(150*Sr).translate([Pr,qr])},$t)}var Yf=16,Xf=v(30*g);function Ah(it,wt){return+wt?ef(it,wt):nd(it)}function nd(it){return rc({point:function(wt,$t){wt=it(wt,$t),this.stream.point(wt[0],wt[1])}})}function ef(it,wt){function $t(Bt,cr,Sr,Pr,qr,$r,va,Rr,Gr,Yr,da,La,gi,pi){var Pi=va-Bt,ji=Rr-cr,Ra=Pi*Pi+ji*ji;if(Ra>4*wt&&gi--){var Ga=Pr+Yr,Ki=qr+da,pn=$r+La,ao=T(Ga*Ga+Ki*Ki+pn*pn),Co=A(pn/=ao),ho=m(m(pn)-1)wt||m((Pi*fs+ji*zo)/Ra-.5)>.3||Pr*Yr+qr*da+$r*La2?Qa[2]%360*g:0,fs()):[qr*p,$r*p,va*p]},Wn.angle=function(Qa){return arguments.length?(Gr=Qa%360*g,fs()):Gr*p},Wn.reflectX=function(Qa){return arguments.length?(Yr=Qa?-1:1,fs()):Yr<0},Wn.reflectY=function(Qa){return arguments.length?(da=Qa?-1:1,fs()):da<0},Wn.precision=function(Qa){return arguments.length?(pn=Ah(ao,Ki=Qa*Qa),zo()):T(Ki)},Wn.fitExtent=function(Qa,io){return wh(Wn,Qa,io)},Wn.fitSize=function(Qa,io){return Nl(Wn,Qa,io)},Wn.fitWidth=function(Qa,io){return $f(Wn,Qa,io)},Wn.fitHeight=function(Qa,io){return ac(Wn,Qa,io)};function fs(){var Qa=kl($t,0,0,Yr,da,Gr).apply(null,wt(Sr,Pr)),io=(Gr?kl:Ap)($t,Bt-Qa[0],cr-Qa[1],Yr,da,Gr);return Rr=Da(qr,$r,va),ao=jr(wt,io),Co=jr(Rr,ao),pn=Ah(ao,Ki),zo()}function zo(){return ho=No=null,Wn}return function(){return wt=it.apply(this,arguments),Wn.invert=wt.invert&&Os,fs()}}function yl(it){var wt=0,$t=c/3,Bt=tf(it),cr=Bt(wt,$t);return cr.parallels=function(Sr){return arguments.length?Bt(wt=Sr[0]*g,$t=Sr[1]*g):[wt*p,$t*p]},cr}function Th(it){var wt=v(it);function $t(Bt,cr){return[Bt*wt,w(cr)/wt]}return $t.invert=function(Bt,cr){return[Bt/wt,A(cr*wt)]},$t}function ic(it,wt){var $t=w(it),Bt=($t+w(wt))/2;if(m(Bt)=.12&&pi<.234&&gi>=-.425&&gi<-.214?cr:pi>=.166&&pi<.234&&gi>=-.214&&gi<-.115?Pr:$t).invert(Yr)},Rr.stream=function(Yr){return it&&wt===Yr?it:it=Tp([$t.stream(wt=Yr),cr.stream(Yr),Pr.stream(Yr)])},Rr.precision=function(Yr){return arguments.length?($t.precision(Yr),cr.precision(Yr),Pr.precision(Yr),Gr()):$t.precision()},Rr.scale=function(Yr){return arguments.length?($t.scale(Yr),cr.scale(Yr*.35),Pr.scale(Yr),Rr.translate($t.translate())):$t.scale()},Rr.translate=function(Yr){if(!arguments.length)return $t.translate();var da=$t.scale(),La=+Yr[0],gi=+Yr[1];return Bt=$t.translate(Yr).clipExtent([[La-.455*da,gi-.238*da],[La+.455*da,gi+.238*da]]).stream(va),Sr=cr.translate([La-.307*da,gi+.201*da]).clipExtent([[La-.425*da+n,gi+.12*da+n],[La-.214*da-n,gi+.234*da-n]]).stream(va),qr=Pr.translate([La-.205*da,gi+.212*da]).clipExtent([[La-.214*da+n,gi+.166*da+n],[La-.115*da-n,gi+.234*da-n]]).stream(va),Gr()},Rr.fitExtent=function(Yr,da){return wh(Rr,Yr,da)},Rr.fitSize=function(Yr,da){return Nl(Rr,Yr,da)},Rr.fitWidth=function(Yr,da){return $f(Rr,Yr,da)},Rr.fitHeight=function(Yr,da){return ac(Rr,Yr,da)};function Gr(){return it=wt=null,Rr}return Rr.scale(1070)}function nc(it){return function(wt,$t){var Bt=v(wt),cr=v($t),Sr=it(Bt*cr);return[Sr*cr*w(wt),Sr*w($t)]}}function Ql(it){return function(wt,$t){var Bt=T(wt*wt+$t*$t),cr=it(Bt),Sr=w(cr),Pr=v(cr);return[_(wt*Sr,Bt*Pr),A(Bt&&$t*Sr/Bt)]}}var eu=nc(function(it){return T(2/(1+it))});eu.invert=Ql(function(it){return 2*A(it/2)});function Mp(){return Ru(eu).scale(124.75).clipAngle(180-.001)}var Zf=nc(function(it){return(it=S(it))&&it/w(it)});Zf.invert=Ql(function(it){return it});function Yd(){return Ru(Zf).scale(79.4188).clipAngle(180-.001)}function gu(it,wt){return[it,M(b((f+wt)/2))]}gu.invert=function(it,wt){return[it,2*y(E(wt))-f]};function Mf(){return Eh(gu).scale(961/d)}function Eh(it){var wt=Ru(it),$t=wt.center,Bt=wt.scale,cr=wt.translate,Sr=wt.clipExtent,Pr=null,qr,$r,va;wt.scale=function(Gr){return arguments.length?(Bt(Gr),Rr()):Bt()},wt.translate=function(Gr){return arguments.length?(cr(Gr),Rr()):cr()},wt.center=function(Gr){return arguments.length?($t(Gr),Rr()):$t()},wt.clipExtent=function(Gr){return arguments.length?(Gr==null?Pr=qr=$r=va=null:(Pr=+Gr[0][0],qr=+Gr[0][1],$r=+Gr[1][0],va=+Gr[1][1]),Rr()):Pr==null?null:[[Pr,qr],[$r,va]]};function Rr(){var Gr=c*Bt(),Yr=wt(ia(wt.rotate()).invert([0,0]));return Sr(Pr==null?[[Yr[0]-Gr,Yr[1]-Gr],[Yr[0]+Gr,Yr[1]+Gr]]:it===gu?[[Math.max(Yr[0]-Gr,Pr),qr],[Math.min(Yr[0]+Gr,$r),va]]:[[Pr,Math.max(Yr[1]-Gr,qr)],[$r,Math.min(Yr[1]+Gr,va)]])}return Rr()}function Kf(it){return b((f+it)/2)}function Ep(it,wt){var $t=v(it),Bt=it===wt?w(it):M($t/v(wt))/M(Kf(wt)/Kf(it)),cr=$t*C(Kf(it),Bt)/Bt;if(!Bt)return gu;function Sr(Pr,qr){cr>0?qr<-f+n&&(qr=-f+n):qr>f-n&&(qr=f-n);var $r=cr/C(Kf(qr),Bt);return[$r*w(Bt*Pr),cr-$r*v(Bt*Pr)]}return Sr.invert=function(Pr,qr){var $r=cr-qr,va=k(Bt)*T(Pr*Pr+$r*$r),Rr=_(Pr,m($r))*k($r);return $r*Bt<0&&(Rr-=c*k(Pr)*k($r)),[Rr/Bt,2*y(C(cr/va,1/Bt))-f]},Sr}function Ef(){return yl(Ep).scale(109.5).parallels([30,30])}function af(it,wt){return[it,wt]}af.invert=af;function nf(){return Ru(af).scale(152.63)}function Jf(it,wt){var $t=v(it),Bt=it===wt?w(it):($t-v(wt))/(wt-it),cr=$t/Bt+it;if(m(Bt)n&&--Bt>0);return[it/(.8707+(Sr=$t*$t)*(-.131979+Sr*(-.013791+Sr*Sr*Sr*(.003971-.001529*Sr)))),$t]};function ld(){return Ru(Kd).scale(175.295)}function Ks(it,wt){return[v(wt)*w(it),w(wt)]}Ks.invert=Ql(A);function yu(){return Ru(Ks).scale(249.5).clipAngle(90+n)}function Lh(it,wt){var $t=v(wt),Bt=1+v(it)*$t;return[$t*w(it)/Bt,w(wt)/Bt]}Lh.invert=Ql(function(it){return 2*y(it)});function ud(){return Ru(Lh).scale(250).clipAngle(142)}function Fh(it,wt){return[M(b((f+wt)/2)),-it]}Fh.invert=function(it,wt){return[-wt,2*y(E(it))-f]};function eh(){var it=Eh(Fh),wt=it.center,$t=it.rotate;return it.center=function(Bt){return arguments.length?wt([-Bt[1],Bt[0]]):(Bt=wt(),[Bt[1],-Bt[0]])},it.rotate=function(Bt){return arguments.length?$t([Bt[0],Bt[1],Bt.length>2?Bt[2]+90:90]):(Bt=$t(),[Bt[0],Bt[1],Bt[2]-90])},$t([0,0,90]).scale(159.155)}t.geoAlbers=Mh,t.geoAlbersUsa=$d,t.geoArea=q,t.geoAzimuthalEqualArea=Mp,t.geoAzimuthalEqualAreaRaw=eu,t.geoAzimuthalEquidistant=Yd,t.geoAzimuthalEquidistantRaw=Zf,t.geoBounds=Ve,t.geoCentroid=la,t.geoCircle=Yi,t.geoClipAntimeridian=ut,t.geoClipCircle=Wt,t.geoClipExtent=ua,t.geoClipRectangle=Mr,t.geoConicConformal=Ef,t.geoConicConformalRaw=Ep,t.geoConicEqualArea=rf,t.geoConicEqualAreaRaw=ic,t.geoConicEquidistant=Xd,t.geoConicEquidistantRaw=Jf,t.geoContains=ro,t.geoDistance=Ni,t.geoEqualEarth=Zd,t.geoEqualEarthRaw=Ch,t.geoEquirectangular=nf,t.geoEquirectangularRaw=af,t.geoGnomonic=Sp,t.geoGnomonicRaw=sd,t.geoGraticule=To,t.geoGraticule10=Jn,t.geoIdentity=Dh,t.geoInterpolate=qn,t.geoLength=Zi,t.geoMercator=Mf,t.geoMercatorRaw=gu,t.geoNaturalEarth1=ld,t.geoNaturalEarth1Raw=Kd,t.geoOrthographic=yu,t.geoOrthographicRaw=Ks,t.geoPath=bh,t.geoProjection=Ru,t.geoProjectionMutator=tf,t.geoRotation=ia,t.geoStereographic=ud,t.geoStereographicRaw=Lh,t.geoStream=B,t.geoTransform=wp,t.geoTransverseMercator=eh,t.geoTransverseMercatorRaw=Fh,Object.defineProperty(t,"__esModule",{value:!0})}))}}),bse=ye({"src/lib/usa_location_names.js"(e,r){"use strict";var t={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},a=new Set(Object.values(t));r.exports={usaLocationAbbreviations:a,usaLocationList:t}}}),EP={};rl(EP,{COUNTRIES_X:()=>SP});var SP,wse=Si({"src/lib/custom_country_codes.ts"(){"use strict";SP=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),_0=ye({"src/lib/geo_location_utils.js"(e,r){"use strict";var t=ai(),{COUNTRIES:a,createLookup:i}=gse(),{area:o}=yse(),{centroid:s}=_se(),{coordAll:l}=_M(),{geoBounds:n}=xM(),u=Wx(),c=c0(),f=yv(),h=Ux(),d=Qx(),{usaLocationAbbreviations:p,usaLocationList:g}=bse(),{COUNTRIES_X:m}=(wse(),On(EP)),{lookupAlpha3:y}=i([...a,...m]),_={"ISO-3":u,"USA-states":x,"country names":v};function v(L){let B=y(L);return B||(c.log("Unrecognized country name: "+L+"."),!1)}function x(L){L=L.trim();let B=p.has(L.toUpperCase())?L.toUpperCase():g[L.toLowerCase()];return B||(c.log("Unrecognized US location: "+L+"."),!1)}function E(L,B,O){var G;if(!B||typeof B!="string")return!1;let $=_[L](B);if($){let X;if(L==="USA-states"){X=[];for(let Z of O)((G=Z?.properties)==null?void 0:G.gu)==="USA"&&X.push(Z)}else X=O;for(let Z of X)if(Z.id===$)return Z;c.log(`Location with id ${$} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(L){for(let B=0;B0&&L[B+1][0]<0)return B;return null}function w(L){var B=L.geometry,O=B.coordinates,G=L.id,$=[],X,Z,J,N;switch(G==="RUS"||G==="FJI"?X=function(H){var W;if(C(H)===null)W=H;else for(W=new Array(H.length),N=0;NW?U[V++]=[H[N][0]+M,H[N][1]]:N===W?(U[V++]=H[N],U[V++]=[H[N][0],-90]):U[V++]=H[N];var j=d.tester(U);j.pts.pop(),$.push(j)}:X=function(H){$.push(d.tester(H))},B.type){case"MultiPolygon":for(Z=0;Z$&&($=J,O=Z)}else O=B;return!O||!O.coordinates.some(N=>N.length>0)?[NaN,NaN]:s(O).geometry.coordinates}function S(L){var B=window.PlotlyGeoAssets||{},O=[];function G(N){return new Promise(function(H,W){t.json(N,function(U,V){if(U){delete B[N];var j=U.status===404?'GeoJSON at URL "'+N+'" does not exist.':"Unexpected error while fetching from "+N;return W(new Error(j))}return B[N]=V,H(V)})})}function $(N){return new Promise(function(H,W){var U=0,V=setInterval(function(){if(B[N]&&B[N]!=="pending")return clearInterval(V),H(B[N]);if(U>100)return clearInterval(V),W("Unexpected error while fetching from "+N);U++},50)})}for(var X=0;XD(F(L));function F(L){try{return l(L)}catch{return[]}}function D(L){if(L.length===0)return null;if(L.length===1){let[X,Z]=L[0];return[X,Z,X,Z]}let[[B,O],[G,$]]=n({type:"MultiPoint",coordinates:L});return[B,O,I([B,G])[1],$]}var R=(L,B)=>B.fitbounds==="geojson"&&L.locationmode==="geojson-id",P=(L,B)=>R(L,B)?F(k(L)):[],z=(L,B)=>D(P(L,B));function I([L,B]){return[L,L>B?B+M:B]}r.exports={locationToFeature:E,feature2polygons:w,getTraceGeojson:k,extractTraceFeature:T,fetchTraceGeoData:S,boundsOfCoords:D,computeBbox:A,coordsOf:F,doesCrossAntiMeridian:C,fitGeojsonBbox:z,fitGeojsonCoords:P,unwrapLonRange:I,ANTIMERIDIAN_LON_SHIFT:M}}}),kP=ye({"src/traces/scattergeo/style.js"(e,r){"use strict";var t=ai(),a=$i(),i=Ya(),o=Of(),s=o.stylePoints,l=o.styleText;r.exports=function(c,f){f&&n(c,f)};function n(u,c){var f=c[0].trace,h=c[0].node3;h.style("opacity",c[0].trace.opacity),s(h,f,u),l(h,f,u),h.selectAll("path.js-line").style("fill","none").each(function(d){var p=t.select(this),g=d.trace,m=g.line||{};p.call(i.stroke,m.color).call(a.dashLine,m.dash||"",m.width||0),g.fill!=="none"&&p.call(i.fill,g.fillcolor)})}}}),bM=ye({"src/traces/scattergeo/plot.js"(e,r){"use strict";var t=ai(),a=Yt(),i=gM().getTopojsonFeatures,o=Ob(),s=_0(),l=tp().findExtremes,n=Vn().BADNUM,u=Dd().calcMarkerSize,c=ms(),f=kP();function h(g,m,y){var _=m.layers.frontplot.select(".scatterlayer"),v=a.makeTraceGroups(_,y,"trace scattergeo");function x(E,M){E.lonlat[0]===n&&t.select(M).remove()}v.selectAll("*").remove(),v.each(function(E){var M=t.select(this),C=E[0].trace;if(c.hasLines(C)||C.fill!=="none"){var w=o.calcTraceToLineCoords(E),k=C.fill!=="none"?o.makePolygon(w):o.makeLine(w);M.selectAll("path.js-line").data([{geojson:k,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}c.hasMarkers(C)&&M.selectAll("path.point").data(a.identity).enter().append("path").classed("point",!0).each(function(T){x(T,this)}),c.hasText(C)&&M.selectAll("g").data(a.identity).enter().append("g").append("text").each(function(T){x(T,this)}),f(g,E)})}function d(g,m){var y=g[0].trace,_=m[y.geo],v=_._subplot,x=y._length,E,M;if(a.isArrayOrTypedArray(y.locations)){var C=y.locationmode,w=C==="geojson-id"?s.extractTraceFeature(g):i(y,v.topojson);for(E=0;E")}}}),Tse=ye({"src/traces/scattergeo/event_data.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){a.lon=i.lon,a.lat=i.lat,a.location=i.loc?i.loc:null;var n=s[l];return n.fIn&&n.fIn.properties&&(a.properties=n.fIn.properties),a}}}),Mse=ye({"src/traces/scattergeo/select.js"(e,r){"use strict";var t=ms(),a=Vn().BADNUM;r.exports=function(o,s){var l=o.cd,n=o.xaxis,u=o.yaxis,c=[],f=l[0].trace,h,d,p,g,m,y=!t.hasMarkers(f)&&!t.hasText(f);if(y)return[];if(s===!1)for(m=0;mU?1:W>=U?0:NaN}function i(W){return W.length===1&&(W=o(W)),{left:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)<0?j=Y+1:q=Y}return j},right:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)>0?q=Y:j=Y+1}return j}}}function o(W){return function(U,V){return a(W(U),V)}}var s=i(a),l=s.right,n=s.left;function u(W,U){U==null&&(U=c);for(var V=0,j=W.length-1,q=W[0],Y=new Array(j<0?0:j);VW?1:U>=W?0:NaN}function d(W){return W===null?NaN:+W}function p(W,U){var V=W.length,j=0,q=-1,Y=0,K,re,se=0;if(U==null)for(;++q1)return se/(j-1)}function g(W,U){var V=p(W,U);return V&&Math.sqrt(V)}function m(W,U){var V=W.length,j=-1,q,Y,K;if(U==null){for(;++j=q)for(Y=K=q;++jq&&(Y=q),K=q)for(Y=K=q;++jq&&(Y=q),K0)return[W];if((j=U0)for(W=Math.ceil(W/re),U=Math.floor(U/re),K=new Array(Y=Math.ceil(U-W+1));++q=0?(Y>=C?10:Y>=w?5:Y>=k?2:1)*Math.pow(10,q):-Math.pow(10,-q)/(Y>=C?10:Y>=w?5:Y>=k?2:1)}function S(W,U,V){var j=Math.abs(U-W)/Math.max(0,V),q=Math.pow(10,Math.floor(Math.log(j)/Math.LN10)),Y=j/q;return Y>=C?q*=10:Y>=w?q*=5:Y>=k&&(q*=2),Ufe;)pe.pop(),--we;var xe=new Array(we+1),he;for(Y=0;Y<=we;++Y)he=xe[Y]=[],he.x0=Y>0?pe[Y-1]:ue,he.x1=Y=1)return+V(W[j-1],j-1,W);var j,q=(j-1)*U,Y=Math.floor(q),K=+V(W[Y],Y,W),re=+V(W[Y+1],Y+1,W);return K+(re-K)*(q-Y)}}function R(W,U,V){return W=v.call(W,d).sort(a),Math.ceil((V-U)/(2*(D(W,.75)-D(W,.25))*Math.pow(W.length,-1/3)))}function P(W,U,V){return Math.ceil((V-U)/(3.5*g(W)*Math.pow(W.length,-1/3)))}function z(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jY&&(Y=q)}else for(;++j=q)for(Y=q;++jY&&(Y=q);return Y}function I(W,U){var V=W.length,j=V,q=-1,Y,K=0;if(U==null)for(;++q=0;)for(K=W[U],V=K.length;--V>=0;)Y[--q]=K[V];return Y}function O(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jq&&(Y=q)}else for(;++j=q)for(Y=q;++jq&&(Y=q);return Y}function G(W,U){for(var V=U.length,j=new Array(V);V--;)j[V]=W[U[V]];return j}function $(W,U){if(V=W.length){var V,j=0,q=0,Y,K=W[q];for(U==null&&(U=a);++j0?1:ke<0?-1:0},y=Math.sin,_=Math.tan,v=1e-6,x=1e-12,E=Math.PI,M=E/2,C=E/4,w=Math.SQRT1_2,k=P(2),T=P(E),b=E*2,S=180/E,A=E/180;function F(ke){return ke?ke/Math.sin(ke):1}function D(ke){return ke>1?M:ke<-1?-M:Math.asin(ke)}function R(ke){return ke>1?0:ke<-1?E:Math.acos(ke)}function P(ke){return ke>0?Math.sqrt(ke):0}function z(ke){return ke=u(2*ke),(ke-1)/(ke+1)}function I(ke){return(u(ke)-u(-ke))/2}function L(ke){return(u(ke)+u(-ke))/2}function B(ke){return f(ke+P(ke*ke+1))}function O(ke){return f(ke+P(ke*ke-1))}function G(ke){var Re=_(ke/2),He=2*f(n(ke/2))/(Re*Re);function $e(ot,nt){var ht=n(ot),Ut=n(nt),Xt=y(nt),Nt=Ut*ht,Zt=-((1-Nt?f((1+Nt)/2)/(1-Nt):-.5)+He/(1+Nt));return[Zt*Ut*y(ot),Zt*Xt]}return $e.invert=function(ot,nt){var ht=P(ot*ot+nt*nt),Ut=-ke/2,Xt=50,Nt;if(!ht)return[0,0];do{var Zt=Ut/2,or=n(Zt),gr=y(Zt),Er=gr/or,Br=-f(o(or));Ut-=Nt=(2/Er*Br-He*Er-ht)/(-Br/(gr*gr)+1-He/(2*or*or))*(or<0?.7:1)}while(o(Nt)>v&&--Xt>0);var oa=y(Ut);return[l(ot*oa,ht*n(Ut)),D(nt*oa/ht)]},$e}function $(){var ke=M,Re=a.geoProjectionMutator(G),He=Re(ke);return He.radius=function($e){return arguments.length?Re(ke=$e*A):ke*S},He.scale(179.976).clipAngle(147)}function X(ke,Re){var He=n(Re),$e=F(R(He*n(ke/=2)));return[2*He*y(ke)*$e,y(Re)*$e]}X.invert=function(ke,Re){if(!(ke*ke+4*Re*Re>E*E+v)){var He=ke,$e=Re,ot=25;do{var nt=y(He),ht=y(He/2),Ut=n(He/2),Xt=y($e),Nt=n($e),Zt=y(2*$e),or=Xt*Xt,gr=Nt*Nt,Er=ht*ht,Br=1-gr*Ut*Ut,oa=Br?R(Nt*Ut)*P(Ma=1/Br):Ma=0,Ma,si=2*oa*Nt*ht-ke,Wi=oa*Xt-Re,Qi=Ma*(gr*Er+oa*Nt*Ut*or),on=Ma*(.5*nt*Zt-oa*2*Xt*ht),yn=Ma*.25*(Zt*ht-oa*Xt*gr*nt),_o=Ma*(or*Ut+oa*Er*Nt),Io=on*yn-_o*Qi;if(!Io)break;var Pn=(Wi*on-si*_o)/Io,es=(si*yn-Wi*Qi)/Io;He-=Pn,$e-=es}while((o(Pn)>v||o(es)>v)&&--ot>0);return[He,$e]}};function Z(){return a.geoProjection(X).scale(152.63)}function J(ke){var Re=y(ke),He=n(ke),$e=ke>=0?1:-1,ot=_($e*ke),nt=(1+Re-He)/2;function ht(Ut,Xt){var Nt=n(Xt),Zt=n(Ut/=2);return[(1+Nt)*y(Ut),($e*Xt>-l(Zt,ot)-.001?0:-$e*10)+nt+y(Xt)*He-(1+Nt)*Re*Zt]}return ht.invert=function(Ut,Xt){var Nt=0,Zt=0,or=50;do{var gr=n(Nt),Er=y(Nt),Br=n(Zt),oa=y(Zt),Ma=1+Br,si=Ma*Er-Ut,Wi=nt+oa*He-Ma*Re*gr-Xt,Qi=Ma*gr/2,on=-Er*oa,yn=Re*Ma*Er/2,_o=He*Br+Re*gr*oa,Io=on*yn-_o*Qi,Pn=(Wi*on-si*_o)/Io/2,es=(si*yn-Wi*Qi)/Io;o(es)>2&&(es/=2),Nt-=Pn,Zt-=es}while((o(Pn)>v||o(es)>v)&&--or>0);return $e*Zt>-l(n(Nt),ot)-.001?[Nt*2,Zt]:null},ht}function N(){var ke=20*A,Re=ke>=0?1:-1,He=_(Re*ke),$e=a.geoProjectionMutator(J),ot=$e(ke),nt=ot.stream;return ot.parallel=function(ht){return arguments.length?(He=_((Re=(ke=ht*A)>=0?1:-1)*ke),$e(ke)):ke*S},ot.stream=function(ht){var Ut=ot.rotate(),Xt=nt(ht),Nt=(ot.rotate([0,0]),nt(ht)),Zt=ot.precision();return ot.rotate(Ut),Xt.sphere=function(){Nt.polygonStart(),Nt.lineStart();for(var or=Re*-180;Re*or<180;or+=Re*90)Nt.point(or,Re*90);if(ke)for(;Re*(or-=3*Re*Zt)>=-180;)Nt.point(or,Re*-l(n(or*A/2),He)*S);Nt.lineEnd(),Nt.polygonEnd()},Xt},ot.scale(218.695).center([0,28.0974])}function H(ke,Re){var He=_(Re/2),$e=P(1-He*He),ot=1+$e*n(ke/=2),nt=y(ke)*$e/ot,ht=He/ot,Ut=nt*nt,Xt=ht*ht;return[4/3*nt*(3+Ut-3*Xt),4/3*ht*(3+3*Ut-Xt)]}H.invert=function(ke,Re){if(ke*=3/8,Re*=3/8,!ke&&o(Re)>1)return null;var He=ke*ke,$e=Re*Re,ot=1+He+$e,nt=P((ot-P(ot*ot-4*Re*Re))/2),ht=D(nt)/3,Ut=nt?O(o(Re/nt))/3:B(o(ke))/3,Xt=n(ht),Nt=L(Ut),Zt=Nt*Nt-Xt*Xt;return[m(ke)*2*l(I(Ut)*Xt,.25-Zt),m(Re)*2*l(Nt*y(ht),.25+Zt)]};function W(){return a.geoProjection(H).scale(66.1603)}var U=P(8),V=f(1+k);function j(ke,Re){var He=o(Re);return Hex&&--$e>0);return[ke/(n(He)*(U-1/y(He))),m(Re)*He]};function q(){return a.geoProjection(j).scale(112.314)}function Y(ke){var Re=2*E/ke;function He($e,ot){var nt=a.geoAzimuthalEquidistantRaw($e,ot);if(o($e)>M){var ht=l(nt[1],nt[0]),Ut=P(nt[0]*nt[0]+nt[1]*nt[1]),Xt=Re*g((ht-M)/Re)+M,Nt=l(y(ht-=Xt),2-n(ht));ht=Xt+D(E/Ut*y(Nt))-Nt,nt[0]=Ut*n(ht),nt[1]=Ut*y(ht)}return nt}return He.invert=function($e,ot){var nt=P($e*$e+ot*ot);if(nt>M){var ht=l(ot,$e),Ut=Re*g((ht-M)/Re)+M,Xt=ht>Ut?-1:1,Nt=nt*n(Ut-ht),Zt=1/_(Xt*R((Nt-E)/P(E*(E-2*Nt)+nt*nt)));ht=Ut+2*s((Zt+Xt*P(Zt*Zt-3))/3),$e=nt*n(ht),ot=nt*y(ht)}return a.geoAzimuthalEquidistantRaw.invert($e,ot)},He}function K(){var ke=5,Re=a.geoProjectionMutator(Y),He=Re(ke),$e=He.stream,ot=.01,nt=-n(ot*A),ht=y(ot*A);return He.lobes=function(Ut){return arguments.length?Re(ke=+Ut):ke},He.stream=function(Ut){var Xt=He.rotate(),Nt=$e(Ut),Zt=(He.rotate([0,0]),$e(Ut));return He.rotate(Xt),Nt.sphere=function(){Zt.polygonStart(),Zt.lineStart();for(var or=0,gr=360/ke,Er=2*E/ke,Br=90-180/ke,oa=M;or0&&o(ot)>v);return $e<0?NaN:He}function fe(ke,Re,He){return Re===void 0&&(Re=40),He===void 0&&(He=x),function($e,ot,nt,ht){var Ut,Xt,Nt;nt=nt===void 0?0:+nt,ht=ht===void 0?0:+ht;for(var Zt=0;ZtUt){nt-=Xt/=2,ht-=Nt/=2;continue}Ut=Br;var oa=(nt>0?-1:1)*He,Ma=(ht>0?-1:1)*He,si=ke(nt+oa,ht),Wi=ke(nt,ht+Ma),Qi=(si[0]-or[0])/oa,on=(si[1]-or[1])/oa,yn=(Wi[0]-or[0])/Ma,_o=(Wi[1]-or[1])/Ma,Io=_o*Qi-on*yn,Pn=(o(Io)<.5?.5:1)/Io;if(Xt=(Er*yn-gr*_o)*Pn,Nt=(gr*on-Er*Qi)*Pn,nt+=Xt,ht+=Nt,o(Xt)0&&(Ut[1]*=1+Xt/1.5*Ut[0]*Ut[0]),Ut}return $e.invert=fe($e),$e}function we(){return a.geoProjection(pe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function xe(ke,Re){var He=ke*y(Re),$e=30,ot;do Re-=ot=(Re+y(Re)-He)/(1+n(Re));while(o(ot)>v&&--$e>0);return Re/2}function he(ke,Re,He){function $e(ot,nt){return[ke*ot*n(nt=xe(He,nt)),Re*y(nt)]}return $e.invert=function(ot,nt){return nt=D(nt/Re),[ot/(ke*n(nt)),D((2*nt+y(2*nt))/He)]},$e}var oe=he(k/M,k,E);function te(){return a.geoProjection(oe).scale(169.529)}var ie=2.00276,ee=1.11072;function ce(ke,Re){var He=xe(E,Re);return[ie*ke/(1/n(Re)+ee/n(He)),(Re+k*y(He))/ie]}ce.invert=function(ke,Re){var He=ie*Re,$e=Re<0?-C:C,ot=25,nt,ht;do ht=He-k*y($e),$e-=nt=(y(2*$e)+2*$e-E*y(ht))/(2*n(2*$e)+2+E*n(ht)*k*n($e));while(o(nt)>v&&--ot>0);return ht=He-k*y($e),[ke*(1/n(ht)+ee/n($e))/ie,ht]};function _e(){return a.geoProjection(ce).scale(160.857)}function Se(ke){var Re=0,He=a.geoProjectionMutator(ke),$e=He(Re);return $e.parallel=function(ot){return arguments.length?He(Re=ot*A):Re*S},$e}function Me(ke,Re){return[ke*n(Re),Re]}Me.invert=function(ke,Re){return[ke/n(Re),Re]};function Ue(){return a.geoProjection(Me).scale(152.63)}function Ge(ke){if(!ke)return Me;var Re=1/_(ke);function He($e,ot){var nt=Re+ke-ot,ht=nt&&$e*n(ot)/nt;return[nt*y(ht),Re-nt*n(ht)]}return He.invert=function($e,ot){var nt=P($e*$e+(ot=Re-ot)*ot),ht=Re+ke-nt;return[nt/n(ht)*l($e,ot),ht]},He}function Ze(){return Se(Ge).scale(123.082).center([0,26.1441]).parallel(45)}function Ke(ke){function Re(He,$e){var ot=M-$e,nt=ot&&He*ke*y(ot)/ot;return[ot*y(nt)/ke,M-ot*n(nt)]}return Re.invert=function(He,$e){var ot=He*ke,nt=M-$e,ht=P(ot*ot+nt*nt),Ut=l(ot,nt);return[(ht?ht/y(ht):1)*Ut/ke,M-ht]},Re}function dt(){var ke=.5,Re=a.geoProjectionMutator(Ke),He=Re(ke);return He.fraction=function($e){return arguments.length?Re(ke=+$e):ke},He.scale(158.837)}var _t=he(1,4/E,E);function Pt(){return a.geoProjection(_t).scale(152.63)}function vt(ke,Re,He,$e,ot,nt){var ht=n(nt),Ut;if(o(ke)>1||o(nt)>1)Ut=R(He*ot+Re*$e*ht);else{var Xt=y(ke/2),Nt=y(nt/2);Ut=2*D(P(Xt*Xt+Re*$e*Nt*Nt))}return o(Ut)>v?[Ut,l($e*y(nt),Re*ot-He*$e*ht)]:[0,0]}function Tt(ke,Re,He){return R((ke*ke+Re*Re-He*He)/(2*ke*Re))}function st(ke){return ke-2*E*c((ke+E)/(2*E))}function Ve(ke,Re,He){for(var $e=[[ke[0],ke[1],y(ke[1]),n(ke[1])],[Re[0],Re[1],y(Re[1]),n(Re[1])],[He[0],He[1],y(He[1]),n(He[1])]],ot=$e[2],nt,ht=0;ht<3;++ht,ot=nt)nt=$e[ht],ot.v=vt(nt[1]-ot[1],ot[3],ot[2],nt[3],nt[2],nt[0]-ot[0]),ot.point=[0,0];var Ut=Tt($e[0].v[0],$e[2].v[0],$e[1].v[0]),Xt=Tt($e[0].v[0],$e[1].v[0],$e[2].v[0]),Nt=E-Ut;$e[2].point[1]=0,$e[0].point[0]=-($e[1].point[0]=$e[0].v[0]/2);var Zt=[$e[2].point[0]=$e[0].point[0]+$e[2].v[0]*n(Ut),2*($e[0].point[1]=$e[1].point[1]=$e[2].v[0]*y(Ut))];function or(gr,Er){var Br=y(Er),oa=n(Er),Ma=new Array(3),si;for(si=0;si<3;++si){var Wi=$e[si];if(Ma[si]=vt(Er-Wi[1],Wi[3],Wi[2],oa,Br,gr-Wi[0]),!Ma[si][0])return Wi.point;Ma[si][1]=st(Ma[si][1]-Wi.v[1])}var Qi=Zt.slice();for(si=0;si<3;++si){var on=si==2?0:si+1,yn=Tt($e[si].v[0],Ma[si][0],Ma[on][0]);Ma[si][1]<0&&(yn=-yn),si?si==1?(yn=Xt-yn,Qi[0]-=Ma[si][0]*n(yn),Qi[1]-=Ma[si][0]*y(yn)):(yn=Nt-yn,Qi[0]+=Ma[si][0]*n(yn),Qi[1]+=Ma[si][0]*y(yn)):(Qi[0]+=Ma[si][0]*n(yn),Qi[1]-=Ma[si][0]*y(yn))}return Qi[0]/=3,Qi[1]/=3,Qi}return or}function Ye(ke){return ke[0]*=A,ke[1]*=A,ke}function me(){return be([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function be(ke,Re,He){var $e=a.geoCentroid({type:"MultiPoint",coordinates:[ke,Re,He]}),ot=[-$e[0],-$e[1]],nt=a.geoRotation(ot),ht=Ve(Ye(nt(ke)),Ye(nt(Re)),Ye(nt(He)));ht.invert=fe(ht);var Ut=a.geoProjection(ht).rotate(ot),Xt=Ut.center;return delete Ut.rotate,Ut.center=function(Nt){return arguments.length?Xt(nt(Nt)):nt.invert(Xt())},Ut.clipAngle(90)}function Ee(ke,Re){var He=P(1-y(Re));return[2/T*ke*He,T*(1-He)]}Ee.invert=function(ke,Re){var He=(He=Re/T-1)*He;return[He>0?ke*P(E/He)/2:0,D(1-He)]};function De(){return a.geoProjection(Ee).scale(95.6464).center([0,30])}function Ce(ke){var Re=_(ke);function He($e,ot){return[$e,($e?$e/y($e):1)*(y(ot)*n($e)-Re*n(ot))]}return He.invert=Re?function($e,ot){$e&&(ot*=y($e)/$e);var nt=n($e);return[$e,2*l(P(nt*nt+Re*Re-ot*ot)-nt,Re-ot)]}:function($e,ot){return[$e,D($e?ot*_($e)/$e:ot)]},He}function Fe(){return Se(Ce).scale(249.828).clipAngle(90)}var Je=P(3);function qe(ke,Re){return[Je*ke*(2*n(2*Re/3)-1)/T,Je*T*y(Re/3)]}qe.invert=function(ke,Re){var He=3*D(Re/(Je*T));return[T*ke/(Je*(2*n(2*He/3)-1)),He]};function at(){return a.geoProjection(qe).scale(156.19)}function tt(ke){var Re=n(ke);function He($e,ot){return[$e*Re,y(ot)/Re]}return He.invert=function($e,ot){return[$e/Re,D(ot*Re)]},He}function ct(){return Se(tt).parallel(38.58).scale(195.044)}function At(ke){var Re=n(ke);function He($e,ot){return[$e*Re,(1+Re)*_(ot/2)]}return He.invert=function($e,ot){return[$e/Re,s(ot/(1+Re))*2]},He}function ft(){return Se(At).scale(124.75)}function qt(ke,Re){var He=P(8/(3*E));return[He*ke*(1-o(Re)/E),He*Re]}qt.invert=function(ke,Re){var He=P(8/(3*E)),$e=Re/He;return[ke/(He*(1-o($e)/E)),$e]};function ar(){return a.geoProjection(qt).scale(165.664)}function mt(ke,Re){var He=P(4-3*y(o(Re)));return[2/P(6*E)*ke*He,m(Re)*P(2*E/3)*(2-He)]}mt.invert=function(ke,Re){var He=2-o(Re)/P(2*E/3);return[ke*P(6*E)/(2*He),m(Re)*D((4-He*He)/3)]};function gt(){return a.geoProjection(mt).scale(165.664)}function St(ke,Re){var He=P(E*(4+E));return[2/He*ke*(1+P(1-4*Re*Re/(E*E))),4/He*Re]}St.invert=function(ke,Re){var He=P(E*(4+E))/2;return[ke*He/(1+P(1-Re*Re*(4+E)/(4*E))),Re*He/2]};function Dt(){return a.geoProjection(St).scale(180.739)}function kt(ke,Re){var He=(2+M)*y(Re);Re/=2;for(var $e=0,ot=1/0;$e<10&&o(ot)>v;$e++){var nt=n(Re);Re-=ot=(Re+y(Re)*(nt+2)-He)/(2*nt*(1+nt))}return[2/P(E*(4+E))*ke*(1+n(Re)),2*P(E/(4+E))*y(Re)]}kt.invert=function(ke,Re){var He=Re*P((4+E)/E)/2,$e=D(He),ot=n($e);return[ke/(2/P(E*(4+E))*(1+ot)),D(($e+He*(ot+2))/(2+M))]};function Vt(){return a.geoProjection(kt).scale(180.739)}function lr(ke,Re){return[ke*(1+n(Re))/P(2+E),2*Re/P(2+E)]}lr.invert=function(ke,Re){var He=P(2+E),$e=Re*He/2;return[He*ke/(1+n($e)),$e]};function dr(){return a.geoProjection(lr).scale(173.044)}function yr(ke,Re){for(var He=(1+M)*y(Re),$e=0,ot=1/0;$e<10&&o(ot)>v;$e++)Re-=ot=(Re+y(Re)-He)/(1+n(Re));return He=P(2+E),[ke*(1+n(Re))/He,2*Re/He]}yr.invert=function(ke,Re){var He=1+M,$e=P(He/2);return[ke*2*$e/(1+n(Re*=$e)),D((Re+y(Re))/He)]};function vr(){return a.geoProjection(yr).scale(173.044)}var Fr=3+2*k;function la(ke,Re){var He=y(ke/=2),$e=n(ke),ot=P(n(Re)),nt=n(Re/=2),ht=y(Re)/(nt+k*$e*ot),Ut=P(2/(1+ht*ht)),Xt=P((k*nt+($e+He)*ot)/(k*nt+($e-He)*ot));return[Fr*(Ut*(Xt-1/Xt)-2*f(Xt)),Fr*(Ut*ht*(Xt+1/Xt)-2*s(ht))]}la.invert=function(ke,Re){if(!(nt=H.invert(ke/1.2,Re*1.065)))return null;var He=nt[0],$e=nt[1],ot=20,nt;ke/=Fr,Re/=Fr;do{var ht=He/2,Ut=$e/2,Xt=y(ht),Nt=n(ht),Zt=y(Ut),or=n(Ut),gr=n($e),Er=P(gr),Br=Zt/(or+k*Nt*Er),oa=Br*Br,Ma=P(2/(1+oa)),si=k*or+(Nt+Xt)*Er,Wi=k*or+(Nt-Xt)*Er,Qi=si/Wi,on=P(Qi),yn=on-1/on,_o=on+1/on,Io=Ma*yn-2*f(on)-ke,Pn=Ma*Br*_o-2*s(Br)-Re,es=Zt&&w*Er*Xt*oa/Zt,ll=(k*Nt*or+Er)/(2*(or+k*Nt*Er)*(or+k*Nt*Er)*Er),Dl=-.5*Br*Ma*Ma*Ma,lc=Dl*es,sf=Dl*ll,_l=(_l=2*or+k*Er*(Nt-Xt))*_l*on,xl=(k*Nt*or*Er+gr)/_l,Ou=-(k*Xt*Zt)/(Er*_l),Fc=yn*lc-2*xl/on+Ma*(xl+xl/Qi),Pc=yn*sf-2*Ou/on+Ma*(Ou+Ou/Qi),Ic=Br*_o*lc-2*es/(1+oa)+Ma*_o*es+Ma*Br*(xl-xl/Qi),lf=Br*_o*sf-2*ll/(1+oa)+Ma*_o*ll+Ma*Br*(Ou-Ou/Qi),uc=Pc*Ic-lf*Fc;if(!uc)break;var Pf=(Pn*Pc-Io*lf)/uc,Rh=(Io*Ic-Pn*Fc)/uc;He-=Pf,$e=h(-M,d(M,$e-Rh))}while((o(Pf)>v||o(Rh)>v)&&--ot>0);return o(o($e)-M)$e){var or=P(Zt),gr=l(Nt,Xt),Er=He*g(gr/He),Br=gr-Er,oa=ke*n(Br),Ma=(ke*y(Br)-Br*y(oa))/(M-oa),si=Nr(Br,Ma),Wi=(E-ke)/Oe(si,oa,E);Xt=or;var Qi=50,on;do Xt-=on=(ke+Oe(si,oa,Xt)*Wi-or)/(si(Xt)*Wi);while(o(on)>v&&--Qi>0);Nt=Br*y(Xt),Xt$e){var Xt=P(Ut),Nt=l(ht,nt),Zt=He*g(Nt/He),or=Nt-Zt;nt=Xt*n(or),ht=Xt*y(or);for(var gr=nt-M,Er=y(nt),Br=ht/Er,oa=ntv||o(Br)>v)&&--oa>0);return[or,gr]},Xt}var Mt=Et(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function zt(){return a.geoProjection(Mt).scale(149.995)}var Gt=Et(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Ht(){return a.geoProjection(Gt).scale(153.93)}var Be=Et(5/6*E,-.62636,-.0344,0,1.3493,-.05524,0,.045);function et(){return a.geoProjection(Be).scale(130.945)}function ut(ke,Re){var He=ke*ke,$e=Re*Re;return[ke*(1-.162388*$e)*(.87-952426e-9*He*He),Re*(1+$e/12)]}ut.invert=function(ke,Re){var He=ke,$e=Re,ot=50,nt;do{var ht=$e*$e;$e-=nt=($e*(1+ht/12)-Re)/(1+ht/4)}while(o(nt)>v&&--ot>0);ot=50,ke/=1-.162388*ht;do{var Ut=(Ut=He*He)*Ut;He-=nt=(He*(.87-952426e-9*Ut)-ke)/(.87-.00476213*Ut)}while(o(nt)>v&&--ot>0);return[He,$e]};function bt(){return a.geoProjection(ut).scale(131.747)}var Ot=Et(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function It(){return a.geoProjection(Ot).scale(131.087)}function Wt(ke){var Re=ke(M,0)[0]-ke(-M,0)[0];function He($e,ot){var nt=$e>0?-.5:.5,ht=ke($e+nt*E,ot);return ht[0]-=nt*Re,ht}return ke.invert&&(He.invert=function($e,ot){var nt=$e>0?-.5:.5,ht=ke.invert($e+nt*Re,ot),Ut=ht[0]-nt*E;return Ut<-E?Ut+=2*E:Ut>E&&(Ut-=2*E),ht[0]=Ut,ht}),He}function jt(ke,Re){var He=m(ke),$e=m(Re),ot=n(Re),nt=n(ke)*ot,ht=y(ke)*ot,Ut=y($e*Re);ke=o(l(ht,Ut)),Re=D(nt),o(ke-M)>v&&(ke%=M);var Xt=sr(ke>E/4?M-ke:ke,Re);return ke>E/4&&(Ut=Xt[0],Xt[0]=-Xt[1],Xt[1]=-Ut),Xt[0]*=He,Xt[1]*=-$e,Xt}jt.invert=function(ke,Re){o(ke)>1&&(ke=m(ke)*2-ke),o(Re)>1&&(Re=m(Re)*2-Re);var He=m(ke),$e=m(Re),ot=-He*ke,nt=-$e*Re,ht=nt/ot<1,Ut=kr(ht?nt:ot,ht?ot:nt),Xt=Ut[0],Nt=Ut[1],Zt=n(Nt);return ht&&(Xt=-M-Xt),[He*(l(y(Xt)*Zt,-y(Nt))+E),$e*D(n(Xt)*Zt)]};function sr(ke,Re){if(Re===M)return[0,0];var He=y(Re),$e=He*He,ot=$e*$e,nt=1+ot,ht=1+3*ot,Ut=1-ot,Xt=D(1/P(nt)),Nt=Ut+$e*nt*Xt,Zt=(1-He)/Nt,or=P(Zt),gr=Zt*nt,Er=P(gr),Br=or*Ut,oa,Ma;if(ke===0)return[0,-(Br+$e*Er)];var si=n(Re),Wi=1/si,Qi=2*He*si,on=(-3*$e+Xt*ht)*Qi,yn=(-Nt*si-(1-He)*on)/(Nt*Nt),_o=.5*yn/or,Io=Ut*_o-2*$e*or*Qi,Pn=$e*nt*yn+Zt*ht*Qi,es=-Wi*Qi,ll=-Wi*Pn,Dl=-2*Wi*Io,lc=4*ke/E,sf;if(ke>.222*E||Re.175*E){if(oa=(Br+$e*P(gr*(1+ot)-Br*Br))/(1+ot),ke>E/4)return[oa,oa];var _l=oa,xl=.5*oa;oa=.5*(xl+_l),Ma=50;do{var Ou=P(gr-oa*oa),Fc=oa*(Dl+es*Ou)+ll*D(oa/Er)-lc;if(!Fc)break;Fc<0?xl=oa:_l=oa,oa=.5*(xl+_l)}while(o(_l-xl)>v&&--Ma>0)}else{oa=v,Ma=25;do{var Pc=oa*oa,Ic=P(gr-Pc),lf=Dl+es*Ic,uc=oa*lf+ll*D(oa/Er)-lc,Pf=lf+(ll-es*Pc)/Ic;oa-=sf=Ic?uc/Pf:0}while(o(sf)>v&&--Ma>0)}return[oa,-Br-$e*P(gr-oa*oa)]}function kr(ke,Re){for(var He=0,$e=1,ot=.5,nt=50;;){var ht=ot*ot,Ut=P(ot),Xt=D(1/P(1+ht)),Nt=1-ht+ot*(1+ht)*Xt,Zt=(1-Ut)/Nt,or=P(Zt),gr=Zt*(1+ht),Er=or*(1-ht),Br=gr-ke*ke,oa=P(Br),Ma=Re+Er+ot*oa;if(o($e-He)0?He=ot:$e=ot,ot=.5*(He+$e)}if(!nt)return null;var si=D(Ut),Wi=n(si),Qi=1/Wi,on=2*Ut*Wi,yn=(-3*ot+Xt*(1+3*ht))*on,_o=(-Nt*Wi-(1-Ut)*yn)/(Nt*Nt),Io=.5*_o/or,Pn=(1-ht)*Io-2*ot*or*on,es=-2*Qi*Pn,ll=-Qi*on,Dl=-Qi*(ot*(1+ht)*_o+Zt*(1+3*ht)*on);return[E/4*(ke*(es+ll*oa)+Dl*D(ke/P(gr))),si]}function Mr(){return a.geoProjection(Wt(jt)).scale(239.75)}function ua(ke,Re,He){var $e,ot,nt;return ke?($e=ra(ke,He),Re?(ot=ra(Re,1-He),nt=ot[1]*ot[1]+He*$e[0]*$e[0]*ot[0]*ot[0],[[$e[0]*ot[2]/nt,$e[1]*$e[2]*ot[0]*ot[1]/nt],[$e[1]*ot[1]/nt,-$e[0]*$e[2]*ot[0]*ot[2]/nt],[$e[2]*ot[1]*ot[2]/nt,-He*$e[0]*$e[1]*ot[0]/nt]]):[[$e[0],0],[$e[1],0],[$e[2],0]]):(ot=ra(Re,1-He),[[0,ot[0]/ot[1]],[1/ot[1],0],[ot[2]/ot[1],0]])}function ra(ke,Re){var He,$e,ot,nt,ht;if(Re=1-v)return He=(1-Re)/4,$e=L(ke),nt=z(ke),ot=1/$e,ht=$e*I(ke),[nt+He*(ht-ke)/($e*$e),ot-He*nt*ot*(ht-ke),ot+He*nt*ot*(ht+ke),2*s(u(ke))-M+He*(ht-ke)/$e];var Ut=[1,0,0,0,0,0,0,0,0],Xt=[P(Re),0,0,0,0,0,0,0,0],Nt=0;for($e=P(1-Re),ht=1;o(Xt[Nt]/Ut[Nt])>v&&Nt<8;)He=Ut[Nt++],Xt[Nt]=(He-$e)/2,Ut[Nt]=(He+$e)/2,$e=P(He*$e),ht*=2;ot=ht*Ut[Nt]*ke;do nt=Xt[Nt]*y($e=ot)/Ut[Nt],ot=(D(nt)+ot)/2;while(--Nt);return[y(ot),nt=n(ot),nt/n(ot-$e),ot]}function ni(ke,Re,He){var $e=o(ke),ot=o(Re),nt=I(ot);if($e){var ht=1/y($e),Ut=1/(_($e)*_($e)),Xt=-(Ut+He*(nt*nt*ht*ht)-1+He),Nt=(He-1)*Ut,Zt=(-Xt+P(Xt*Xt-4*Nt))/2;return[Ca(s(1/P(Zt)),He)*m(ke),Ca(s(P((Zt/Ut-1)/He)),1-He)*m(Re)]}return[0,Ca(s(nt),1-He)*m(Re)]}function Ca(ke,Re){if(!Re)return ke;if(Re===1)return f(_(ke/2+C));for(var He=1,$e=P(1-Re),ot=P(Re),nt=0;o(ot)>v;nt++){if(ke%E){var ht=s($e*_(ke)/He);ht<0&&(ht+=E),ke+=ht+~~(ke/E)*E}else ke+=ke;ot=(He+$e)/2,$e=P(He*$e),ot=((He=ot)-$e)/2}return ke/(p(2,nt)*He)}function Li(ke,Re){var He=(k-1)/(k+1),$e=P(1-He*He),ot=Ca(M,$e*$e),nt=-1,ht=f(_(E/4+o(Re)/2)),Ut=u(nt*ht)/P(He),Xt=Va(Ut*n(nt*ke),Ut*y(nt*ke)),Nt=ni(Xt[0],Xt[1],$e*$e);return[-Nt[1],(Re>=0?1:-1)*(.5*ot-Nt[0])]}function Va(ke,Re){var He=ke*ke,$e=Re+1,ot=1-He-Re*Re;return[.5*((ke>=0?M:-M)-l(ot,2*ke)),-.25*f(ot*ot+4*He)+.5*f($e*$e+He)]}function dn(ke,Re){var He=Re[0]*Re[0]+Re[1]*Re[1];return[(ke[0]*Re[0]+ke[1]*Re[1])/He,(ke[1]*Re[0]-ke[0]*Re[1])/He]}Li.invert=function(ke,Re){var He=(k-1)/(k+1),$e=P(1-He*He),ot=Ca(M,$e*$e),nt=-1,ht=ua(.5*ot-Re,-ke,$e*$e),Ut=dn(ht[0],ht[1]),Xt=l(Ut[1],Ut[0])/nt;return[Xt,2*s(u(.5/nt*f(He*Ut[0]*Ut[0]+He*Ut[1]*Ut[1])))-M]};function rn(){return a.geoProjection(Wt(Li)).scale(151.496)}function pa(ke){var Re=y(ke),He=n(ke),$e=_n(ke);$e.invert=_n(-ke);function ot(nt,ht){var Ut=$e(nt,ht);nt=Ut[0],ht=Ut[1];var Xt=y(ht),Nt=n(ht),Zt=n(nt),or=R(Re*Xt+He*Nt*Zt),gr=y(or),Er=o(gr)>v?or/gr:1;return[Er*He*y(nt),(o(nt)>M?Er:-Er)*(Re*Nt-He*Xt*Zt)]}return ot.invert=function(nt,ht){var Ut=P(nt*nt+ht*ht),Xt=-y(Ut),Nt=n(Ut),Zt=Ut*Nt,or=-ht*Xt,gr=Ut*Re,Er=P(Zt*Zt+or*or-gr*gr),Br=l(Zt*gr+or*Er,or*gr-Zt*Er),oa=(Ut>M?-1:1)*l(nt*Xt,Ut*n(Br)*Nt+ht*y(Br)*Xt);return $e.invert(oa,Br)},ot}function _n(ke){var Re=y(ke),He=n(ke);return function($e,ot){var nt=n(ot),ht=n($e)*nt,Ut=y($e)*nt,Xt=y(ot);return[l(Ut,ht*He-Xt*Re),D(Xt*He+ht*Re)]}}function Zi(){var ke=0,Re=a.geoProjectionMutator(pa),He=Re(ke),$e=He.rotate,ot=He.stream,nt=a.geoCircle();return He.parallel=function(ht){if(!arguments.length)return ke*S;var Ut=He.rotate();return Re(ke=ht*A).rotate(Ut)},He.rotate=function(ht){return arguments.length?($e.call(He,[ht[0],ht[1]-ke*S]),nt.center([-ht[0],-ht[1]]),He):(ht=$e.call(He),ht[1]+=ke*S,ht)},He.stream=function(ht){return ht=ot(ht),ht.sphere=function(){ht.polygonStart();var Ut=.01,Xt=nt.radius(90-Ut)().coordinates[0],Nt=Xt.length-1,Zt=-1,or;for(ht.lineStart();++Zt=0;)ht.point((or=Xt[Zt])[0],or[1]);ht.lineEnd(),ht.polygonEnd()},ht},He.scale(79.4187).parallel(45).clipAngle(180-.001)}var Fi=3,xn=D(1-1/Fi)*S,Ni=tt(0);function un(ke){var Re=xn*A,He=Ee(E,Re)[0]-Ee(-E,Re)[0],$e=Ni(0,Re)[1],ot=Ee(0,Re)[1],nt=T-ot,ht=b/ke,Ut=4/b,Xt=$e+nt*nt*4/b;function Nt(Zt,or){var gr,Er=o(or);if(Er>Re){var Br=d(ke-1,h(0,c((Zt+E)/ht)));Zt+=E*(ke-1)/ke-Br*ht,gr=Ee(Zt,Er),gr[0]=gr[0]*b/He-b*(ke-1)/(2*ke)+Br*b/ke,gr[1]=$e+(gr[1]-ot)*4*nt/b,or<0&&(gr[1]=-gr[1])}else gr=Ni(Zt,or);return gr[0]*=Ut,gr[1]/=Xt,gr}return Nt.invert=function(Zt,or){Zt/=Ut,or*=Xt;var gr=o(or);if(gr>$e){var Er=d(ke-1,h(0,c((Zt+E)/ht)));Zt=(Zt+E*(ke-1)/ke-Er*ht)*He/b;var Br=Ee.invert(Zt,.25*(gr-$e)*b/nt+ot);return Br[0]-=E*(ke-1)/ke-Er*ht,or<0&&(Br[1]=-Br[1]),Br}return Ni.invert(Zt,or)},Nt}function jn(ke,Re){return[ke,Re&1?90-v:xn]}function bn(ke,Re){return[ke,Re&1?-90+v:-xn]}function Wa(ke){return[ke[0]*(1-v),ke[1]]}function ui(ke){var Re=[].concat(i.range(-180,180+ke/2,ke).map(jn),i.range(180,-180-ke/2,-ke).map(bn));return{type:"Polygon",coordinates:[ke===180?Re.map(Wa):Re]}}function Hi(){var ke=4,Re=a.geoProjectionMutator(un),He=Re(ke),$e=He.stream;return He.lobes=function(ot){return arguments.length?Re(ke=+ot):ke},He.stream=function(ot){var nt=He.rotate(),ht=$e(ot),Ut=(He.rotate([0,0]),$e(ot));return He.rotate(nt),ht.sphere=function(){a.geoStream(ui(180/ke),Ut)},ht},He.scale(239.75)}function Vi(ke){var Re=1+ke,He=y(1/Re),$e=D(He),ot=2*P(E/(nt=E+4*$e*Re)),nt,ht=.5*ot*(Re+P(ke*(2+ke))),Ut=ke*ke,Xt=Re*Re;function Nt(Zt,or){var gr=1-y(or),Er,Br;if(gr&&gr<2){var oa=M-or,Ma=25,si;do{var Wi=y(oa),Qi=n(oa),on=$e+l(Wi,Re-Qi),yn=1+Xt-2*Re*Qi;oa-=si=(oa-Ut*$e-Re*Wi+yn*on-.5*gr*nt)/(2*Re*Wi*on)}while(o(si)>x&&--Ma>0);Er=ot*P(yn),Br=Zt*on/E}else Er=ot*(ke+gr),Br=Zt*$e/E;return[Er*y(Br),ht-Er*n(Br)]}return Nt.invert=function(Zt,or){var gr=Zt*Zt+(or-=ht)*or,Er=(1+Xt-gr/(ot*ot))/(2*Re),Br=R(Er),oa=y(Br),Ma=$e+l(oa,Re-Er);return[D(Zt/P(gr))*E/Ma,D(1-2*(Br-Ut*$e-Re*oa+(1+Xt-2*Re*Er)*Ma)/nt)]},Nt}function $n(){var ke=1,Re=a.geoProjectionMutator(Vi),He=Re(ke);return He.ratio=function($e){return arguments.length?Re(ke=+$e):ke},He.scale(167.774).center([0,18.67])}var ro=.7109889596207567,Un=.0528035274542;function Kn(ke,Re){return Re>-ro?(ke=oe(ke,Re),ke[1]+=Un,ke):Me(ke,Re)}Kn.invert=function(ke,Re){return Re>-ro?oe.invert(ke,Re-Un):Me.invert(ke,Re)};function To(){return a.geoProjection(Kn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Jn(ke,Re){return o(Re)>ro?(ke=oe(ke,Re),ke[1]-=Re>0?Un:-Un,ke):Me(ke,Re)}Jn.invert=function(ke,Re){return o(Re)>ro?oe.invert(ke,Re+(Re>0?Un:-Un)):Me.invert(ke,Re)};function qn(){return a.geoProjection(Jn).scale(152.63)}function Fo(ke,Re,He,$e){var ot=P(4*E/(2*He+(1+ke-Re/2)*y(2*He)+(ke+Re)/2*y(4*He)+Re/2*y(6*He))),nt=P($e*y(He)*P((1+ke*n(2*He)+Re*n(4*He))/(1+ke+Re))),ht=He*Xt(1);function Ut(or){return P(1+ke*n(2*or)+Re*n(4*or))}function Xt(or){var gr=or*He;return(2*gr+(1+ke-Re/2)*y(2*gr)+(ke+Re)/2*y(4*gr)+Re/2*y(6*gr))/He}function Nt(or){return Ut(or)*y(or)}var Zt=function(or,gr){var Er=He*ue(Xt,ht*y(gr)/He,gr/E);isNaN(Er)&&(Er=He*m(gr));var Br=ot*Ut(Er);return[Br*nt*or/E*n(Er),Br/nt*y(Er)]};return Zt.invert=function(or,gr){var Er=ue(Nt,gr*nt/ot);return[or*E/(n(Er)*ot*nt*Ut(Er)),D(He*Xt(Er/He)/ht)]},He===0&&(ot=P($e/E),Zt=function(or,gr){return[or*ot,y(gr)/ot]},Zt.invert=function(or,gr){return[or/ot,D(gr*ot)]}),Zt}function zn(){var ke=1,Re=0,He=45*A,$e=2,ot=a.geoProjectionMutator(Fo),nt=ot(ke,Re,He,$e);return nt.a=function(ht){return arguments.length?ot(ke=+ht,Re,He,$e):ke},nt.b=function(ht){return arguments.length?ot(ke,Re=+ht,He,$e):Re},nt.psiMax=function(ht){return arguments.length?ot(ke,Re,He=+ht*A,$e):He*S},nt.ratio=function(ht){return arguments.length?ot(ke,Re,He,$e=+ht):$e},nt.scale(180.739)}function wn(ke,Re,He,$e,ot,nt,ht,Ut,Xt,Nt,Zt){if(Zt.nanEncountered)return NaN;var or,gr,Er,Br,oa,Ma,si,Wi,Qi,on;if(or=He-Re,gr=ke(Re+or*.25),Er=ke(He-or*.25),isNaN(gr)){Zt.nanEncountered=!0;return}if(isNaN(Er)){Zt.nanEncountered=!0;return}return Br=or*($e+4*gr+ot)/12,oa=or*(ot+4*Er+nt)/12,Ma=Br+oa,on=(Ma-ht)/15,Nt>Xt?(Zt.maxDepthCount++,Ma+on):Math.abs(on)>1;do Xt[Ma]>Er?oa=Ma:Br=Ma,Ma=Br+oa>>1;while(Ma>Br);var si=Xt[Ma+1]-Xt[Ma];return si&&(si=(Er-Xt[Ma+1])/si),(Ma+1+si)/ht}var or=2*Zt(1)/E*nt/He,gr=function(Er,Br){var oa=Zt(o(y(Br))),Ma=$e(oa)*Er;return oa/=or,[Ma,Br>=0?oa:-oa]};return gr.invert=function(Er,Br){var oa;return Br*=or,o(Br)<1&&(oa=m(Br)*D(ot(o(Br))*nt)),[Er/$e(o(Br)),oa]},gr}function Yn(){var ke=0,Re=2.5,He=1.183136,$e=a.geoProjectionMutator(uo),ot=$e(ke,Re,He);return ot.alpha=function(nt){return arguments.length?$e(ke=+nt,Re,He):ke},ot.k=function(nt){return arguments.length?$e(ke,Re=+nt,He):Re},ot.gamma=function(nt){return arguments.length?$e(ke,Re,He=+nt):He},ot.scale(152.63)}function go(ke,Re){return o(ke[0]-Re[0])=0;--Xt)He=ke[1][Xt],$e=He[0][0],ot=He[0][1],nt=He[1][1],ht=He[2][0],Ut=He[2][1],Re.push(Cn([[ht-v,Ut-v],[ht-v,nt+v],[$e+v,nt+v],[$e+v,ot-v]],30));return{type:"Polygon",coordinates:[i.merge(Re)]}}function gs(ke,Re,He){var $e,ot;function nt(Xt,Nt){for(var Zt=Nt<0?-1:1,or=Re[+(Nt<0)],gr=0,Er=or.length-1;gror[gr][2][0];++gr);var Br=ke(Xt-or[gr][1][0],Nt);return Br[0]+=ke(or[gr][1][0],Zt*Nt>Zt*or[gr][0][1]?or[gr][0][1]:Nt)[0],Br}He?nt.invert=He(nt):ke.invert&&(nt.invert=function(Xt,Nt){for(var Zt=ot[+(Nt<0)],or=Re[+(Nt<0)],gr=0,Er=Zt.length;grBr&&(oa=Er,Er=Br,Br=oa),[[or,Er],[gr,Br]]})}),ht):Re.map(function(Nt){return Nt.map(function(Zt){return[[Zt[0][0]*S,Zt[0][1]*S],[Zt[1][0]*S,Zt[1][1]*S],[Zt[2][0]*S,Zt[2][1]*S]]})})},Re!=null&&ht.lobes(Re),ht}var yo=[[[[-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 sl(){return gs(ce,yo).scale(160.857)}var ss=[[[[-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 oo(){return gs(Jn,ss).scale(152.63)}var Bn=[[[[-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 An(){return gs(oe,Bn).scale(169.529)}var Po=[[[[-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 Bl(){return gs(oe,Po).scale(169.529).rotate([20,0])}var Lu=[[[[-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 Jl(){return gs(Kn,Lu,fe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Fu=[[[[-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 Pu(){return gs(Me,Fu).scale(152.63).rotate([-20,0])}function Ku(ke,Re){return[3/b*ke*P(E*E/3-Re*Re),Re]}Ku.invert=function(ke,Re){return[b/3*ke/P(E*E/3-Re*Re),Re]};function mu(){return a.geoProjection(Ku).scale(158.837)}function $c(ke){function Re(He,$e){if(o(o($e)-M)2)return null;He/=2,$e/=2;var nt=He*He,ht=$e*$e,Ut=2*$e/(1+nt+ht);return Ut=p((1+Ut)/(1-Ut),1/ke),[l(2*He,1-nt-ht)/ke,D((Ut-1)/(Ut+1))]},Re}function Ju(){var ke=.5,Re=a.geoProjectionMutator($c),He=Re(ke);return He.spacing=function($e){return arguments.length?Re(ke=+$e):ke},He.scale(124.75)}var Ol=E/k;function Yc(ke,Re){return[ke*(1+P(n(Re)))/2,Re/(n(Re/2)*n(ke/6))]}Yc.invert=function(ke,Re){var He=o(ke),$e=o(Re),ot=v,nt=M;$ev||o(Ma)>v)&&--ot>0);return ot&&[He,$e]};function cs(){return a.geoProjection(Sl).scale(139.98)}function Qo(ke,Re){return[y(ke)/n(Re),_(Re)*n(ke)]}Qo.invert=function(ke,Re){var He=ke*ke,$e=Re*Re,ot=$e+1,nt=He+ot,ht=ke?w*P((nt-P(nt*nt-4*He))/He):1/P(ot);return[D(ke*ht),m(Re)*R(ht)]};function ml(){return a.geoProjection(Qo).scale(144.049).clipAngle(90-.001)}function Xc(ke){var Re=n(ke),He=_(C+ke/2);function $e(ot,nt){var ht=nt-ke,Ut=o(ht)=0;)Zt=ke[Nt],or=Zt[0]+Ut*(Er=or)-Xt*gr,gr=Zt[1]+Ut*gr+Xt*Er;return or=Ut*(Er=or)-Xt*gr,gr=Ut*gr+Xt*Er,[or,gr]}return He.invert=function($e,ot){var nt=20,ht=$e,Ut=ot;do{for(var Xt=Re,Nt=ke[Xt],Zt=Nt[0],or=Nt[1],gr=0,Er=0,Br;--Xt>=0;)Nt=ke[Xt],gr=Zt+ht*(Br=gr)-Ut*Er,Er=or+ht*Er+Ut*Br,Zt=Nt[0]+ht*(Br=Zt)-Ut*or,or=Nt[1]+ht*or+Ut*Br;gr=Zt+ht*(Br=gr)-Ut*Er,Er=or+ht*Er+Ut*Br,Zt=ht*(Br=Zt)-Ut*or-$e,or=ht*or+Ut*Br-ot;var oa=gr*gr+Er*Er,Ma,si;ht-=Ma=(Zt*gr+or*Er)/oa,Ut-=si=(or*gr-Zt*Er)/oa}while(o(Ma)+o(si)>v*v&&--nt>0);if(nt){var Wi=P(ht*ht+Ut*Ut),Qi=2*s(Wi*.5),on=y(Qi);return[l(ht*on,Wi*n(Qi)),Wi?D(Ut*on/Wi):0]}},He}var bp=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],t0=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],ec=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ys=[[.9245,0],[0,0],[.01943,0]],rd=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hf(){return tc(bp,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Kc(){return tc(t0,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function ad(){return tc(ec,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Jc(){return tc(ys,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Tf(){return tc(rd,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function tc(ke,Re){var He=a.geoProjection(td(ke)).rotate(Re).clipAngle(90),$e=a.geoRotation(Re),ot=He.center;return delete He.rotate,He.center=function(nt){return arguments.length?ot($e(nt)):$e.invert(ot())},He}var Wf=P(6),xh=P(7);function Qc(ke,Re){var He=D(7*y(Re)/(3*Wf));return[Wf*ke*(2*n(2*He/3)-1)/xh,9*y(He/3)/xh]}Qc.invert=function(ke,Re){var He=3*D(Re*xh/9);return[ke*xh/(Wf*(2*n(2*He/3)-1)),D(y(He)*3*Wf/7)]};function Wd(){return a.geoProjection(Qc).scale(164.859)}function bh(ke,Re){for(var He=(1+w)*y(Re),$e=Re,ot=0,nt;ot<25&&($e-=nt=(y($e/2)+y($e)-He)/(.5*n($e/2)+n($e)),!(o(nt)x&&--$e>0);return nt=He*He,ht=nt*nt,Ut=nt*ht,[ke/(.84719-.13063*nt+Ut*Ut*(-.04515+.05494*nt-.02326*ht+.00331*Ut)),He]};function wh(){return a.geoProjection(Iu).scale(175.295)}function Nl(ke,Re){return[ke*(1+n(Re))/2,2*(Re-_(Re/2))]}Nl.invert=function(ke,Re){for(var He=Re/2,$e=0,ot=1/0;$e<10&&o(ot)>v;++$e){var nt=n(Re/2);Re-=ot=(Re-_(Re/2)-He)/(1-.5/(nt*nt))}return[2*ke/(1+n(Re)),Re]};function $f(){return a.geoProjection(Nl).scale(152.63)}var ac=[[[[-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 Yf(){return gs(re(1/0),ac).rotate([20,0]).scale(152.63)}function Xf(ke,Re){var He=y(Re),$e=n(Re),ot=m(ke);if(ke===0||o(Re)===M)return[0,Re];if(Re===0)return[ke,0];if(o(ke)===M)return[ke*$e,M*He];var nt=E/(2*ke)-2*ke/E,ht=2*Re/E,Ut=(1-ht*ht)/(He-ht),Xt=nt*nt,Nt=Ut*Ut,Zt=1+Xt/Nt,or=1+Nt/Xt,gr=(nt*He/Ut-nt/2)/Zt,Er=(Nt*He/Xt+Ut/2)/or,Br=gr*gr+$e*$e/Zt,oa=Er*Er-(Nt*He*He/Xt+Ut*He-1)/or;return[M*(gr+P(Br)*ot),M*(Er+P(oa<0?0:oa)*m(-Re*nt)*ot)]}Xf.invert=function(ke,Re){ke/=M,Re/=M;var He=ke*ke,$e=Re*Re,ot=He+$e,nt=E*E;return[ke?(ot-1+P((1-ot)*(1-ot)+4*He))/(2*ke)*M:0,ue(function(ht){return ot*(E*y(ht)-2*ht)*E+4*ht*ht*(Re-y(ht))+2*E*ht-nt*Re},0)]};function Ah(){return a.geoProjection(Xf).scale(127.267)}var nd=1.0148,ef=.23185,od=-.14499,Cc=.02406,Ap=nd,kl=5*ef,Ru=7*od,tf=9*Cc,yl=1.790857183;function Th(ke,Re){var He=Re*Re;return[ke,Re*(nd+He*He*(ef+He*(od+Cc*He)))]}Th.invert=function(ke,Re){Re>yl?Re=yl:Re<-yl&&(Re=-yl);var He=Re,$e;do{var ot=He*He;He-=$e=(He*(nd+ot*ot*(ef+ot*(od+Cc*ot)))-Re)/(Ap+ot*ot*(kl+ot*(Ru+tf*ot)))}while(o($e)>v);return[ke,He]};function ic(){return a.geoProjection(Th).scale(139.319)}function rf(ke,Re){if(o(Re)v&&--ot>0);return ht=_($e),[(o(Re)=0;)if($e=Re[Ut],He[0]===$e[0]&&He[1]===$e[1]){if(nt)return[nt,He];nt=He}}}function Eh(ke){for(var Re=ke.length,He=[],$e=ke[Re-1],ot=0;ot0?[-$e[0],0]:[180-$e[0],180])};var Re=Ef.map(function(He){return{face:He,project:ke(He)}});return[-1,0,0,1,0,1,4,5].forEach(function(He,$e){var ot=Re[He];ot&&(ot.children||(ot.children=[])).push(Re[$e])}),Zf(Re[0],function(He,$e){return Re[He<-E/2?$e<0?6:4:He<0?$e<0?2:0:He$e^Er>$e&&He<(gr-Nt)*($e-Zt)/(Er-Zt)+Nt&&(ot=!ot)}return ot}function sd(ke,Re){var He=Re.stream,$e;if(!He)throw new Error("invalid projection");switch(ke&&ke.type){case"Feature":$e=Dh;break;case"FeatureCollection":$e=Sp;break;default:$e=ld;break}return $e(ke,He)}function Sp(ke,Re){return{type:"FeatureCollection",features:ke.features.map(function(He){return Dh(He,Re)})}}function Dh(ke,Re){return{type:"Feature",id:ke.id,properties:ke.properties,geometry:ld(ke.geometry,Re)}}function Kd(ke,Re){return{type:"GeometryCollection",geometries:ke.geometries.map(function(He){return ld(He,Re)})}}function ld(ke,Re){if(!ke)return null;if(ke.type==="GeometryCollection")return Kd(ke,Re);var He;switch(ke.type){case"Point":He=Lh;break;case"MultiPoint":He=Lh;break;case"LineString":He=ud;break;case"MultiLineString":He=ud;break;case"Polygon":He=Fh;break;case"MultiPolygon":He=Fh;break;case"Sphere":He=Fh;break;default:return null}return a.geoStream(ke,Re(He)),He.result()}var Ks=[],yu=[],Lh={point:function(ke,Re){Ks.push([ke,Re])},result:function(){var ke=Ks.length?Ks.length<2?{type:"Point",coordinates:Ks[0]}:{type:"MultiPoint",coordinates:Ks}:null;return Ks=[],ke}},ud={lineStart:Qf,point:function(ke,Re){Ks.push([ke,Re])},lineEnd:function(){Ks.length&&(yu.push(Ks),Ks=[])},result:function(){var ke=yu.length?yu.length<2?{type:"LineString",coordinates:yu[0]}:{type:"MultiLineString",coordinates:yu}:null;return yu=[],ke}},Fh={polygonStart:Qf,lineStart:Qf,point:function(ke,Re){Ks.push([ke,Re])},lineEnd:function(){var ke=Ks.length;if(ke){do Ks.push(Ks[0].slice());while(++ke<4);yu.push(Ks),Ks=[]}},polygonEnd:Qf,result:function(){if(!yu.length)return null;var ke=[],Re=[];return yu.forEach(function(He){Ch(He)?ke.push([He]):Re.push(He)}),Re.forEach(function(He){var $e=He[0];ke.some(function(ot){if(Zd(ot[0],$e))return ot.push(He),!0})||ke.push([He])}),yu=[],ke.length?ke.length>1?{type:"MultiPolygon",coordinates:ke}:{type:"Polygon",coordinates:ke[0]}:null}};function eh(ke){var Re=ke(M,0)[0]-ke(-M,0)[0];function He($e,ot){var nt=o($e)0?$e-E:$e+E,ot),Ut=(ht[0]-ht[1])*w,Xt=(ht[0]+ht[1])*w;if(nt)return[Ut,Xt];var Nt=Re*w,Zt=Ut>0^Xt>0?-1:1;return[Zt*Ut-m(Xt)*Nt,Zt*Xt-m(Ut)*Nt]}return ke.invert&&(He.invert=function($e,ot){var nt=($e+ot)*w,ht=(ot-$e)*w,Ut=o(nt)<.5*Re&&o(ht)<.5*Re;if(!Ut){var Xt=Re*w,Nt=nt>0^ht>0?-1:1,Zt=-Nt*$e+(ht>0?1:-1)*Xt,or=-Nt*ot+(nt>0?1:-1)*Xt;nt=(-Zt-or)*w,ht=(Zt-or)*w}var gr=ke.invert(nt,ht);return Ut||(gr[0]+=nt>0?E:-E),gr}),a.geoProjection(He).rotate([-90,-90,45]).clipAngle(180-.001)}function it(){return eh(jt).scale(176.423)}function wt(){return eh(Li).scale(111.48)}function $t(ke,Re){if(!(0<=(Re=+Re)&&Re<=20))throw new Error("invalid digits");function He(Nt){var Zt=Nt.length,or=2,gr=new Array(Zt);for(gr[0]=+Nt[0].toFixed(Re),gr[1]=+Nt[1].toFixed(Re);or2||Er[0]!=Zt[0]||Er[1]!=Zt[1])&&(or.push(Er),Zt=Er)}return or.length===1&&Nt.length>1&&or.push(He(Nt[Nt.length-1])),or}function nt(Nt){return Nt.map(ot)}function ht(Nt){if(Nt==null)return Nt;var Zt;switch(Nt.type){case"GeometryCollection":Zt={type:"GeometryCollection",geometries:Nt.geometries.map(ht)};break;case"Point":Zt={type:"Point",coordinates:He(Nt.coordinates)};break;case"MultiPoint":Zt={type:Nt.type,coordinates:$e(Nt.coordinates)};break;case"LineString":Zt={type:Nt.type,coordinates:ot(Nt.coordinates)};break;case"MultiLineString":case"Polygon":Zt={type:Nt.type,coordinates:nt(Nt.coordinates)};break;case"MultiPolygon":Zt={type:"MultiPolygon",coordinates:Nt.coordinates.map(nt)};break;default:return Nt}return Nt.bbox!=null&&(Zt.bbox=Nt.bbox),Zt}function Ut(Nt){var Zt={type:"Feature",properties:Nt.properties,geometry:ht(Nt.geometry)};return Nt.id!=null&&(Zt.id=Nt.id),Nt.bbox!=null&&(Zt.bbox=Nt.bbox),Zt}if(ke!=null)switch(ke.type){case"Feature":return Ut(ke);case"FeatureCollection":{var Xt={type:"FeatureCollection",features:ke.features.map(Ut)};return ke.bbox!=null&&(Xt.bbox=ke.bbox),Xt}default:return ht(ke)}return ke}function Bt(ke){var Re=y(ke);function He($e,ot){var nt=Re?_($e*Re/2)/Re:$e/2;if(!ot)return[2*nt,-ke];var ht=2*s(nt*y(ot)),Ut=1/_(ot);return[y(ht)*Ut,ot+(1-n(ht))*Ut-ke]}return He.invert=function($e,ot){if(o(ot+=ke)v&&--Ut>0);var gr=$e*(Nt=_(ht)),Er=_(o(ot)0?M:-M)*(Xt+ot*(Zt-ht)/2+ot*ot*(Zt-2*Xt+ht)/2)]}Pr.invert=function(ke,Re){var He=Re/M,$e=He*90,ot=d(18,o($e/5)),nt=h(0,c(ot));do{var ht=Sr[nt][1],Ut=Sr[nt+1][1],Xt=Sr[d(19,nt+2)][1],Nt=Xt-ht,Zt=Xt-2*Ut+ht,or=2*(o(He)-Ut)/Nt,gr=Zt/Nt,Er=or*(1-gr*or*(1-2*gr*or));if(Er>=0||nt===1){$e=(Re>=0?5:-5)*(Er+ot);var Br=50,oa;do ot=d(18,o($e)/5),nt=c(ot),Er=ot-nt,ht=Sr[nt][1],Ut=Sr[nt+1][1],Xt=Sr[d(19,nt+2)][1],$e-=(oa=(Re>=0?M:-M)*(Ut+Er*(Xt-ht)/2+Er*Er*(Xt-2*Ut+ht)/2)-Re)*S;while(o(oa)>x&&--Br>0);break}}while(--nt>=0);var Ma=Sr[nt][0],si=Sr[nt+1][0],Wi=Sr[d(19,nt+2)][0];return[ke/(si+Er*(Wi-Ma)/2+Er*Er*(Wi-2*si+Ma)/2),$e*A]};function qr(){return a.geoProjection(Pr).scale(152.63)}function $r(ke){function Re(He,$e){var ot=n($e),nt=(ke-1)/(ke-ot*n(He));return[nt*ot*y(He),nt*y($e)]}return Re.invert=function(He,$e){var ot=He*He+$e*$e,nt=P(ot),ht=(ke-P(1-ot*(ke+1)/(ke-1)))/((ke-1)/nt+nt/(ke-1));return[l(He*ht,nt*P(1-ht*ht)),nt?D($e*ht/nt):0]},Re}function va(ke,Re){var He=$r(ke);if(!Re)return He;var $e=n(Re),ot=y(Re);function nt(ht,Ut){var Xt=He(ht,Ut),Nt=Xt[1],Zt=Nt*ot/(ke-1)+$e;return[Xt[0]*$e/Zt,Nt/Zt]}return nt.invert=function(ht,Ut){var Xt=(ke-1)/(ke-1-Ut*ot);return He.invert(Xt*ht,Xt*Ut*$e)},nt}function Rr(){var ke=2,Re=0,He=a.geoProjectionMutator(va),$e=He(ke,Re);return $e.distance=function(ot){return arguments.length?He(ke=+ot,Re):ke},$e.tilt=function(ot){return arguments.length?He(ke,Re=ot*A):Re*S},$e.scale(432.147).clipAngle(R(1/ke)*S-1e-6)}var Gr=1e-4,Yr=1e4,da=-180,La=da+Gr,gi=180,pi=gi-Gr,Pi=-90,ji=Pi+Gr,Ra=90,Ga=Ra-Gr;function Ki(ke){return ke.length>0}function pn(ke){return Math.floor(ke*Yr)/Yr}function ao(ke){return ke===Pi||ke===Ra?[0,ke]:[da,pn(ke)]}function Co(ke){var Re=ke[0],He=ke[1],$e=!1;return Re<=La?(Re=da,$e=!0):Re>=pi&&(Re=gi,$e=!0),He<=ji?(He=Pi,$e=!0):He>=Ga&&(He=Ra,$e=!0),$e?[Re,He]:ke}function ho(ke){return ke.map(Co)}function No(ke,Re,He){for(var $e=0,ot=ke.length;$e=pi||Zt<=ji||Zt>=Ga){nt[ht]=Co(Xt);for(var or=ht+1;orLa&&Erji&&Br=Ut)break;He.push({index:-1,polygon:Re,ring:nt=nt.slice(or-1)}),nt[0]=ao(nt[0][1]),ht=-1,Ut=nt.length}}}}function Wn(ke){var Re,He=ke.length,$e={},ot={},nt,ht,Ut,Xt,Nt;for(Re=0;Re0?E-Ut:Ut)*S],Nt=a.geoProjection(ke(ht)).rotate(Xt),Zt=a.geoRotation(Xt),or=Nt.center;return delete Nt.rotate,Nt.center=function(gr){return arguments.length?or(Zt(gr)):Zt.invert(or())},Nt.clipAngle(90)}function Ns(ke){var Re=n(ke);function He($e,ot){var nt=a.geoGnomonicRaw($e,ot);return nt[0]*=Re,nt}return He.invert=function($e,ot){return a.geoGnomonicRaw.invert($e/Re,ot)},He}function jl(){return zu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function zu(ke,Re){return Ms(Ns,ke,Re)}function tu(ke){if(!(ke*=2))return a.geoAzimuthalEquidistantRaw;var Re=-ke/2,He=-Re,$e=ke*ke,ot=_(He),nt=.5/y(He);function ht(Ut,Xt){var Nt=R(n(Xt)*n(Ut-Re)),Zt=R(n(Xt)*n(Ut-He)),or=Xt<0?-1:1;return Nt*=Nt,Zt*=Zt,[(Nt-Zt)/(2*ke),or*P(4*$e*Zt-($e-Nt+Zt)*($e-Nt+Zt))/(2*ke)]}return ht.invert=function(Ut,Xt){var Nt=Xt*Xt,Zt=n(P(Nt+(gr=Ut+Re)*gr)),or=n(P(Nt+(gr=Ut+He)*gr)),gr,Er;return[l(Er=Zt-or,gr=(Zt+or)*ot),(Xt<0?-1:1)*R(P(gr*gr+Er*Er)*nt)]},ht}function Lc(){return Cl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Cl(ke,Re){return Ms(tu,ke,Re)}function oc(ke,Re){if(o(Re)v&&--Ut>0);return[m(ke)*(P(ot*ot+4)+ot)*E/4,M*ht]};function ru(){return a.geoProjection(cd).scale(127.16)}function Cp(ke,Re,He,$e,ot){function nt(ht,Ut){var Xt=He*y($e*Ut),Nt=P(1-Xt*Xt),Zt=P(2/(1+Nt*n(ht*=ot)));return[ke*Nt*Zt*y(ht),Re*Xt*Zt]}return nt.invert=function(ht,Ut){var Xt=ht/ke,Nt=Ut/Re,Zt=P(Xt*Xt+Nt*Nt),or=2*D(Zt/2);return[l(ht*_(or),ke*Zt)/ot,Zt&&D(Ut*y(or)/(Re*He*Zt))/$e]},nt}function th(ke,Re,He,$e){var ot=E/3;ke=h(ke,v),Re=h(Re,v),ke=d(ke,M),Re=d(Re,E-v),He=h(He,0),He=d(He,100-v),$e=h($e,v);var nt=He/100+1,ht=$e/100,Ut=R(nt*n(ot))/ot,Xt=y(ke)/y(Ut*M),Nt=Re/E,Zt=P(ht*y(ke/2)/y(Re/2)),or=Zt/P(Nt*Xt*Ut),gr=1/(Zt*P(Nt*Xt*Ut));return Cp(or,gr,Xt,Ut,Nt)}function fd(){var ke=65*A,Re=60*A,He=20,$e=200,ot=a.geoProjectionMutator(th),nt=ot(ke,Re,He,$e);return nt.poleline=function(ht){return arguments.length?ot(ke=+ht*A,Re,He,$e):ke*S},nt.parallels=function(ht){return arguments.length?ot(ke,Re=+ht*A,He,$e):Re*S},nt.inflation=function(ht){return arguments.length?ot(ke,Re,He=+ht,$e):He},nt.ratio=function(ht){return arguments.length?ot(ke,Re,He,$e=+ht):$e},nt.scale(163.775)}function hd(){return fd().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var sc=4*E+3*P(3),Qd=2*P(2*E*P(3)/sc),Df=he(Qd*P(3)/E,Qd,sc/6);function Ih(){return a.geoProjection(Df).scale(176.84)}function Lf(ke,Re){return[ke*P(1-3*Re*Re/(E*E)),Re]}Lf.invert=function(ke,Re){return[ke/P(1-3*Re*Re/(E*E)),Re]};function Bu(){return a.geoProjection(Lf).scale(152.63)}function Ff(ke,Re){var He=n(Re),$e=n(ke)*He,ot=1-$e,nt=n(ke=l(y(ke)*He,-y(Re))),ht=y(ke);return He=P(1-$e*$e),[ht*He-nt*ot,-nt*He-ht*ot]}Ff.invert=function(ke,Re){var He=(ke*ke+Re*Re)/-2,$e=P(-He*(2+He)),ot=Re*He+ke*$e,nt=ke*He-Re*$e,ht=P(nt*nt+ot*ot);return[l($e*ot,ht*(1+He)),ht?-D($e*nt/ht):0]};function rh(){return a.geoProjection(Ff).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function ep(ke,Re){var He=X(ke,Re);return[(He[0]+ke/M)/2,(He[1]+Re)/2]}ep.invert=function(ke,Re){var He=ke,$e=Re,ot=25;do{var nt=n($e),ht=y($e),Ut=y(2*$e),Xt=ht*ht,Nt=nt*nt,Zt=y(He),or=n(He/2),gr=y(He/2),Er=gr*gr,Br=1-Nt*or*or,oa=Br?R(nt*or)*P(Ma=1/Br):Ma=0,Ma,si=.5*(2*oa*nt*gr+He/M)-ke,Wi=.5*(oa*ht+$e)-Re,Qi=.5*Ma*(Nt*Er+oa*nt*or*Xt)+.5/M,on=Ma*(Zt*Ut/4-oa*ht*gr),yn=.125*Ma*(Ut*gr-oa*ht*Nt*Zt),_o=.5*Ma*(Xt*or+oa*Er*nt)+.5,Io=on*yn-_o*Qi,Pn=(Wi*on-si*_o)/Io,es=(si*yn-Wi*Qi)/Io;He-=Pn,$e-=es}while((o(Pn)>v||o(es)>v)&&--ot>0);return[He,$e]};function au(){return a.geoProjection(ep).scale(158.837)}t.geoNaturalEarth=a.geoNaturalEarth1,t.geoNaturalEarthRaw=a.geoNaturalEarth1Raw,t.geoAiry=$,t.geoAiryRaw=G,t.geoAitoff=Z,t.geoAitoffRaw=X,t.geoArmadillo=N,t.geoArmadilloRaw=J,t.geoAugust=W,t.geoAugustRaw=H,t.geoBaker=q,t.geoBakerRaw=j,t.geoBerghaus=K,t.geoBerghausRaw=Y,t.geoBertin1953=we,t.geoBertin1953Raw=pe,t.geoBoggs=_e,t.geoBoggsRaw=ce,t.geoBonne=Ze,t.geoBonneRaw=Ge,t.geoBottomley=dt,t.geoBottomleyRaw=Ke,t.geoBromley=Pt,t.geoBromleyRaw=_t,t.geoChamberlin=be,t.geoChamberlinRaw=Ve,t.geoChamberlinAfrica=me,t.geoCollignon=De,t.geoCollignonRaw=Ee,t.geoCraig=Fe,t.geoCraigRaw=Ce,t.geoCraster=at,t.geoCrasterRaw=qe,t.geoCylindricalEqualArea=ct,t.geoCylindricalEqualAreaRaw=tt,t.geoCylindricalStereographic=ft,t.geoCylindricalStereographicRaw=At,t.geoEckert1=ar,t.geoEckert1Raw=qt,t.geoEckert2=gt,t.geoEckert2Raw=mt,t.geoEckert3=Dt,t.geoEckert3Raw=St,t.geoEckert4=Vt,t.geoEckert4Raw=kt,t.geoEckert5=dr,t.geoEckert5Raw=lr,t.geoEckert6=vr,t.geoEckert6Raw=yr,t.geoEisenlohr=Hr,t.geoEisenlohrRaw=la,t.geoFahey=Da,t.geoFaheyRaw=Oa,t.geoFoucaut=ti,t.geoFoucautRaw=_i,t.geoFoucautSinusoidal=ia,t.geoFoucautSinusoidalRaw=Ka,t.geoGilbert=Yi,t.geoGingery=Ie,t.geoGingeryRaw=Qr,t.geoGinzburg4=zt,t.geoGinzburg4Raw=Mt,t.geoGinzburg5=Ht,t.geoGinzburg5Raw=Gt,t.geoGinzburg6=et,t.geoGinzburg6Raw=Be,t.geoGinzburg8=bt,t.geoGinzburg8Raw=ut,t.geoGinzburg9=It,t.geoGinzburg9Raw=Ot,t.geoGringorten=Mr,t.geoGringortenRaw=jt,t.geoGuyou=rn,t.geoGuyouRaw=Li,t.geoHammer=le,t.geoHammerRaw=re,t.geoHammerRetroazimuthal=Zi,t.geoHammerRetroazimuthalRaw=pa,t.geoHealpix=Hi,t.geoHealpixRaw=un,t.geoHill=$n,t.geoHillRaw=Vi,t.geoHomolosine=qn,t.geoHomolosineRaw=Jn,t.geoHufnagel=zn,t.geoHufnagelRaw=Fo,t.geoHyperelliptical=Yn,t.geoHyperellipticalRaw=uo,t.geoInterrupt=gs,t.geoInterruptedBoggs=sl,t.geoInterruptedHomolosine=oo,t.geoInterruptedMollweide=An,t.geoInterruptedMollweideHemispheres=Bl,t.geoInterruptedSinuMollweide=Jl,t.geoInterruptedSinusoidal=Pu,t.geoKavrayskiy7=mu,t.geoKavrayskiy7Raw=Ku,t.geoLagrange=Ju,t.geoLagrangeRaw=$c,t.geoLarrivee=Qu,t.geoLarriveeRaw=Yc,t.geoLaskowski=cs,t.geoLaskowskiRaw=Sl,t.geoLittrow=ml,t.geoLittrowRaw=Qo,t.geoLoximuthal=Zc,t.geoLoximuthalRaw=Xc,t.geoMiller=ed,t.geoMillerRaw=kc,t.geoModifiedStereographic=tc,t.geoModifiedStereographicRaw=td,t.geoModifiedStereographicAlaska=Hf,t.geoModifiedStereographicGs48=Kc,t.geoModifiedStereographicGs50=ad,t.geoModifiedStereographicMiller=Jc,t.geoModifiedStereographicLee=Tf,t.geoMollweide=te,t.geoMollweideRaw=oe,t.geoMtFlatPolarParabolic=Wd,t.geoMtFlatPolarParabolicRaw=Qc,t.geoMtFlatPolarQuartic=wp,t.geoMtFlatPolarQuarticRaw=bh,t.geoMtFlatPolarSinusoidal=id,t.geoMtFlatPolarSinusoidalRaw=rc,t.geoNaturalEarth2=wh,t.geoNaturalEarth2Raw=Iu,t.geoNellHammer=$f,t.geoNellHammerRaw=Nl,t.geoInterruptedQuarticAuthalic=Yf,t.geoNicolosi=Ah,t.geoNicolosiRaw=Xf,t.geoPatterson=ic,t.geoPattersonRaw=Th,t.geoPolyconic=Mh,t.geoPolyconicRaw=rf,t.geoPolyhedral=Zf,t.geoPolyhedralButterfly=af,t.geoPolyhedralCollignon=Xd,t.geoPolyhedralWaterman=Sh,t.geoProject=sd,t.geoGringortenQuincuncial=it,t.geoPeirceQuincuncial=wt,t.geoPierceQuincuncial=wt,t.geoQuantize=$t,t.geoQuincuncial=eh,t.geoRectangularPolyconic=cr,t.geoRectangularPolyconicRaw=Bt,t.geoRobinson=qr,t.geoRobinsonRaw=Pr,t.geoSatellite=Rr,t.geoSatelliteRaw=va,t.geoSinuMollweide=To,t.geoSinuMollweideRaw=Kn,t.geoSinusoidal=Ue,t.geoSinusoidalRaw=Me,t.geoStitch=zo,t.geoTimes=io,t.geoTimesRaw=Qa,t.geoTwoPointAzimuthal=zu,t.geoTwoPointAzimuthalRaw=Ns,t.geoTwoPointAzimuthalUsa=jl,t.geoTwoPointEquidistant=Cl,t.geoTwoPointEquidistantRaw=tu,t.geoTwoPointEquidistantUsa=Lc,t.geoVanDerGrinten=of,t.geoVanDerGrintenRaw=oc,t.geoVanDerGrinten2=Jd,t.geoVanDerGrinten2Raw=Cf,t.geoVanDerGrinten3=kp,t.geoVanDerGrinten3Raw=Ph,t.geoVanDerGrinten4=ru,t.geoVanDerGrinten4Raw=cd,t.geoWagner=fd,t.geoWagner7=hd,t.geoWagnerRaw=th,t.geoWagner4=Ih,t.geoWagner4Raw=Df,t.geoWagner6=Bu,t.geoWagner6Raw=Lf,t.geoWiechel=rh,t.geoWiechelRaw=Ff,t.geoWinkel3=au,t.geoWinkel3Raw=ep,Object.defineProperty(t,"__esModule",{value:!0})}))}}),kse=ye({"src/plots/geo/zoom.js"(e,r){"use strict";var t=ai(),a=Yt(),i=li(),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},n={cursor:"auto"};function u(S,A){var F=S.projection,D;return A._isScoped?D=h:A._isClipped?D=p:D=d,D(S,F)}r.exports=u;function c(S,A){return t.behavior.zoom().translate(A.translate()).scaleExtent(A.scaleExtent()).scale(A.scale())}function f(S,A,F){var D=S.id,R=S.graphDiv,P=R.layout,z=P[D],I=R._fullLayout,L=I[D],B={},O={};function G($,X){B[D+"."+$]=a.nestedProperty(z,$).get(),i.call("_storeDirectGUIEdit",P,I._preGUI,B);var Z=a.nestedProperty(L,$);Z.get()!==X&&(Z.set(X),a.nestedProperty(z,$).set(X),O[D+"."+$]=X)}F(G),G("projection.scale",A.scale()/S.fitScale),G("fitbounds",!1),R.emit("plotly_relayout",O)}function h(S,A){var F=c(S,A);function D(){t.select(this).style(l)}function R(){A.scale(t.event.scale).translate(t.event.translate),S.render(!0);var I=A.invert(S.midPt);S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":A.scale()/S.fitScale,"geo.center.lon":I[0],"geo.center.lat":I[1]})}function P(I){var L=A.invert(S.midPt);I("center.lon",L[0]),I("center.lat",L[1])}function z(){t.select(this).style(n),f(S,A,P)}return F.on("zoomstart",D).on("zoom",R).on("zoomend",z),F}function d(S,A){var F=c(S,A),D=2,R,P,z,I,L,B,O,G,$;function X(U){return A.invert(U)}function Z(U){var V=X(U);if(!V)return!0;var j=A(V);return Math.abs(j[0]-U[0])>D||Math.abs(j[1]-U[1])>D}function J(){t.select(this).style(l);let{x:U,y:V,width:j,height:q}=this.getBBox();R=t.event.sourceEvent?t.mouse(this):[U+j/2,V+q/2],P=A.rotate(),z=A.translate(),I=P,L=X(R)}function N(){let{x:U,y:V,width:j,height:q}=this.getBBox();if(B=t.event.sourceEvent?t.mouse(this):[U+j/2,V+q/2],Z(R)){F.scale(A.scale()),F.translate(A.translate());return}A.scale(t.event.scale),A.translate([z[0],t.event.translate[1]]),L?X(B)&&(G=X(B),O=[I[0]+(G[0]-L[0]),P[1],P[2]],A.rotate(O),I=O):(R=B,L=X(R)),$=!0,S.render(!0);var Y=A.rotate(),K=A.invert(S.midPt);S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":A.scale()/S.fitScale,"geo.center.lon":K[0],"geo.center.lat":K[1],"geo.projection.rotation.lon":-Y[0]})}function H(){t.select(this).style(n),$&&f(S,A,W)}function W(U){var V=A.rotate(),j=A.invert(S.midPt);U("projection.rotation.lon",-V[0]),U("center.lon",j[0]),U("center.lat",j[1])}return F.on("zoomstart",J).on("zoom",N).on("zoomend",H),F}function p(S,A){var F={r:A.rotate(),k:A.scale()},D=c(S,A),R=b(D,"zoomstart","zoom","zoomend"),P=0,z=D.on,I;D.on("zoomstart",function(){t.select(this).style(l);let{x:$,y:X,width:Z,height:J}=this.getBBox(),N=t.event.sourceEvent?t.mouse(this):[$+Z/2,X+J/2],H=A.rotate(),W=H,U=A.translate(),V=m(H);I=g(A,N),z.call(D,"zoom",function(){let{x:j,y:q,width:Y,height:K}=this.getBBox(),re=t.event.sourceEvent?t.mouse(this):[j+Y/2,q+K/2];if(A.scale(F.k=t.event.scale),!I)N=re,I=g(A,N);else if(g(A,re)){A.rotate(H).translate(U);var se=g(A,re),le=_(I,se),ue=C(y(V,le)),fe=F.r=v(ue,I,W);(!isFinite(fe[0])||!isFinite(fe[1])||!isFinite(fe[2]))&&(fe=W),A.rotate(fe),W=fe}B(R.of(this,arguments))}),L(R.of(this,arguments))}).on("zoomend",function(){t.select(this).style(n),z.call(D,"zoom",null),O(R.of(this,arguments)),f(S,A,G)}).on("zoom.redraw",function(){S.render(!0);var $=A.rotate();S.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":A.scale()/S.fitScale,"geo.projection.rotation.lon":-$[0],"geo.projection.rotation.lat":-$[1]})});function L($){P++||$({type:"zoomstart"})}function B($){$({type:"zoom"})}function O($){--P||$({type:"zoomend"})}function G($){var X=A.rotate();$("projection.rotation.lon",-X[0]),$("projection.rotation.lat",-X[1])}return t.rebind(D,R,"on")}function g(S,A){var F=S.invert(A);return F&&isFinite(F[0])&&isFinite(F[1])&&w(F)}function m(S){var A=.5*S[0]*o,F=.5*S[1]*o,D=.5*S[2]*o,R=Math.sin(A),P=Math.cos(A),z=Math.sin(F),I=Math.cos(F),L=Math.sin(D),B=Math.cos(D);return[P*I*B+R*z*L,R*I*B-P*z*L,P*z*B+R*I*L,P*I*L-R*z*B]}function y(S,A){var F=S[0],D=S[1],R=S[2],P=S[3],z=A[0],I=A[1],L=A[2],B=A[3];return[F*z-D*I-R*L-P*B,F*I+D*z+R*B-P*L,F*L-D*B+R*z+P*I,F*B+D*L-R*I+P*z]}function _(S,A){if(!(!S||!A)){var F=T(S,A),D=Math.sqrt(k(F,F)),R=.5*Math.acos(Math.max(-1,Math.min(1,k(S,A)))),P=Math.sin(R)/D;return D&&[Math.cos(R),F[2]*P,-F[1]*P,F[0]*P]}}function v(S,A,F){var D=M(A,2,S[0]);D=M(D,1,S[1]),D=M(D,0,S[2]-F[2]);var R=A[0],P=A[1],z=A[2],I=D[0],L=D[1],B=D[2],O=Math.atan2(P,R)*s,G=Math.sqrt(R*R+P*P),$,X;Math.abs(L)>G?(X=(L>0?90:-90)-O,$=0):(X=Math.asin(L/G)*s-O,$=Math.sqrt(G*G-L*L));var Z=180-X-2*O,J=(Math.atan2(B,I)-Math.atan2(z,$))*s,N=(Math.atan2(B,I)-Math.atan2(z,-$))*s,H=x(F[0],F[1],X,J),W=x(F[0],F[1],Z,N);return H<=W?[X,J,F[2]]:[Z,N,F[2]]}function x(S,A,F,D){var R=E(F-S),P=E(D-A);return Math.sqrt(R*R+P*P)}function E(S){return(S%360+540)%360-180}function M(S,A,F){var D=F*o,R=S.slice(),P=A===0?1:0,z=A===2?1:2,I=Math.cos(D),L=Math.sin(D);return R[P]=S[P]*I-S[z]*L,R[z]=S[z]*I+S[P]*L,R}function C(S){return[Math.atan2(2*(S[0]*S[1]+S[2]*S[3]),1-2*(S[1]*S[1]+S[2]*S[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(S[0]*S[2]-S[3]*S[1]))))*s,Math.atan2(2*(S[0]*S[3]+S[1]*S[2]),1-2*(S[2]*S[2]+S[3]*S[3]))*s]}function w(S){var A=S[0]*o,F=S[1]*o,D=Math.cos(F);return[D*Math.cos(A),D*Math.sin(A),Math.sin(F)]}function k(S,A){for(var F=0,D=0,R=S.length;D0&&G._module.calcGeoJSON(O,z)}if(!I){var $=this.updateProjection(P,z);if($)return;(!this.viewInitial||this.scope!==L.scope)&&this.saveViewInitial(L)}this.scope=L.scope,this.updateBaseLayers(z,L),this.updateDims(z,L),this.updateFx(z,L),d.generalUpdatePerTraceModule(this.graphDiv,this,P,L);var X=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=X.selectAll(".point"),this.dataPoints.text=X.selectAll("text"),this.dataPaths.line=X.selectAll(".js-line");var Z=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=Z.selectAll("path"),this._render()},A.updateProjection=function(P,z){var I=this.graphDiv,L=z[this.id],B=z._size,O=L.domain,G=L.projection,$=L.lonaxis,X=L.lataxis,Z=$._ax,J=X._ax,N=this.projection=F(L),H=[[B.l+B.w*O.x[0],B.t+B.h*(1-O.y[1])],[B.l+B.w*O.x[1],B.t+B.h*(1-O.y[0])]],W=L.center||{},U=G.rotation||{},V=$.range||[],j=X.range||[];if(L.fitbounds){Z._length=H[1][0]-H[0][0],J._length=H[1][1]-H[0][1],Z.range=m(I,Z),J.range=m(I,J);let ie=[];for(let dt of P){let _t=dt[0].trace;_t.visible===!0&&_t._module.fitCoords&&ie.push(_t._module.fitCoords(dt,L))}let ee=g(I,Z),ce=ee.min.reduce((dt,{val:_t})=>Math.min(dt,_t),1/0),Se=ee.max.reduce((dt,{val:_t})=>Math.max(dt,_t),-1/0)-ce,Me=w.boundsOfCoords(ie.flat()),[Ue,,Ge]=Me||[],Ze=Ge-Ue;if(!!Me&&(Se>360||Se<360&&ZeMath.max(Ye,dt(me)),0),vt=ee.max.reduce((Ye,me)=>Math.max(Ye,_t(me)),0),Tt=Z._length-Pt-vt,st=Tt>Z._length/10?Ze*Z._length/Tt:Ze,Ve=(Ue+Ge)/2;Z.range=[Ve-st/2,Ve+st/2]}var q=(Z.range[0]+Z.range[1])/2,Y=(J.range[0]+J.range[1])/2;if(L._isScoped)W={lon:q,lat:Y};else if(L._isClipped){W={lon:q,lat:Y},U={lon:q,lat:Y,roll:U.roll};var K=G.type,re=C.lonaxisSpan[K]/2||180,se=C.lataxisSpan[K]/2||90;V=[q-re,q+re],j=[Y-se,Y+se]}else W={lon:q,lat:Y},U={lon:q,lat:U.lat,roll:U.roll}}N.center([W.lon-U.lon,W.lat-U.lat]).rotate([-U.lon,-U.lat,U.roll]).parallels(G.parallels);var le=R(V,j);N.fitExtent(H,le);var ue=this.bounds=N.getBounds(le),fe=this.fitScale=N.scale(),pe=N.translate();if(N.scaleExtent=()=>{var ie;let{minscale:ee}=G,ce=(ie=G.maxscale)!=null?ie:1/0;return[fe*Math.min(ee,ce),fe*Math.max(ee,ce)]},L.fitbounds){var we=N.getBounds(R(Z.range,J.range)),xe=Math.min((ue[1][0]-ue[0][0])/(we[1][0]-we[0][0]),(ue[1][1]-ue[0][1])/(we[1][1]-we[0][1]));isFinite(xe)?N.scale(xe*fe):n.warn("Something went wrong during"+this.id+"fitbounds computations.")}else N.scale(G.scale*fe);var he=this.midPt=[(ue[0][0]+ue[1][0])/2,(ue[0][1]+ue[1][1])/2];if(N.translate([pe[0]+(he[0]-pe[0]),pe[1]+(he[1]-pe[1])]).clipExtent(ue),L._isAlbersUsa){var oe=N([W.lon,W.lat]);if(oe){var te=N.translate();N.translate([te[0]-(oe[0]-te[0]),te[1]-(oe[1]-te[1])])}}},A.updateBaseLayers=function(P,z){var I=this,L=I.topojson,B=I.layers,O=I.basePaths;function G(H){return H==="lonaxis"||H==="lataxis"}function $(H){return!!C.lineLayers[H]}function X(H){return!!C.fillLayers[H]}var Z=this.hasChoropleth?C.layersForChoropleth:C.layers,J=Z.filter(function(H){return $(H)||X(H)?z["show"+H]:G(H)?z[H].showgrid:!0}),N=I.framework.selectAll(".layer").data(J,String);N.exit().each(function(H){delete B[H],delete O[H],t.select(this).remove()}),N.enter().append("g").attr("class",function(H){return"layer "+H}).each(function(H){var W=B[H]=t.select(this);H==="bg"?I.bgRect=W.append("rect").style("pointer-events","all"):G(H)?O[H]=W.append("path").style("fill","none"):H==="backplot"?W.append("g").classed("choroplethlayer",!0):H==="frontplot"?W.append("g").classed("scatterlayer",!0):$(H)?O[H]=W.append("path").style("fill","none").style("stroke-miterlimit",2):X(H)&&(O[H]=W.append("path").style("stroke","none"))}),N.order(),N.each(function(H){var W=O[H],U=C.layerNameToAdjective[H];H==="frame"?W.datum(C.sphereSVG):$(H)||X(H)?W.datum(b(L,L.objects[H])):G(H)&&W.datum(D(H,z,P)).call(c.stroke,z[H].gridcolor).call(f.dashLine,z[H].griddash,z[H].gridwidth),$(H)?W.call(c.stroke,z[U+"color"]).call(f.dashLine,"",z[U+"width"]):X(H)&&W.call(c.fill,z[U+"color"])})},A.updateDims=function(P,z){var I=this.bounds,L=(z.framewidth||0)/2,B=I[0][0]-L,O=I[0][1]-L,G=I[1][0]-B+L,$=I[1][1]-O+L;f.setRect(this.clipRect,B,O,G,$),this.bgRect.call(f.setRect,B,O,G,$).call(c.fill,z.bgcolor),this.xaxis._offset=B,this.xaxis._length=G,this.yaxis._offset=O,this.yaxis._length=$},A.updateFx=function(P,z){var I=this,L=I.graphDiv,B=I.bgRect,O=P.dragmode,G=P.clickmode;if(I.isStatic)return;function $(){var N=I.viewInitial,H={};for(var W in N)H[I.id+"."+W]=N[W];l.call("_guiRelayout",L,H),L.emit("plotly_doubleclick",null)}function X(N){return I.projection.invert([N[0]+I.xaxis._offset,N[1]+I.yaxis._offset])}var Z=function(N,H){if(H.isRect){var W=N.range={};W[I.id]=[X([H.xmin,H.ymin]),X([H.xmax,H.ymax])]}else{var U=N.lassoPoints={};U[I.id]=H.map(X)}},J={element:I.bgRect.node(),gd:L,plotinfo:{id:I.id,xaxis:I.xaxis,yaxis:I.yaxis,fillRangeItems:Z},xaxes:[I.xaxis],yaxes:[I.yaxis],subplot:I.id,clickFn:function(N){N===2&&x(L)}};if(O==="pan"){B.node().onmousedown=null;let N=M(I,z);if(B.call(N),!t.event){let H=I.projection.scale(),[W,U]=I.projection.scaleExtent();(HU)&&N.event(B)}B.on("dblclick.zoom",$),L._context._scrollZoom.geo||B.on("wheel.zoom",null)}else(O==="select"||O==="lasso")&&(B.on(".zoom",null),J.prepFn=function(N,H,W){v(N,H,W,J,O)},_.init(J));B.on("mousemove",function(){var N=I.projection.invert(n.getPositionFromD3Event());if(!N)return _.unhover(L,t.event);I.xaxis.p2c=function(){return N[0]},I.yaxis.p2c=function(){return N[1]},h.hover(L,t.event,I.id)}),B.on("mouseout",function(){L._dragging||_.unhover(L,t.event)}),B.on("click",function(){O!=="select"&&O!=="lasso"&&(G.indexOf("select")>-1&&E(t.event,L,[I.xaxis],[I.yaxis],I.id,J),G.indexOf("event")>-1&&h.click(L,t.event))})},A.makeFramework=function(){var P=this,z=P.graphDiv,I=z._fullLayout,L="clip"+I._uid+P.id;P.clipDef=I._clips.append("clipPath").attr("id",L),P.clipRect=P.clipDef.append("rect"),P.framework=t.select(P.container).append("g").attr("class","geo "+P.id).call(f.setClipUrl,L,z),P.project=function(B){var O=P.projection(B);return O?[O[0]-P.xaxis._offset,O[1]-P.yaxis._offset]:[null,null]},P.xaxis={_id:"x",c2p:function(B){return P.project(B)[0]}},P.yaxis={_id:"y",c2p:function(B){return P.project(B)[1]}},P.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(P.mockAxis,I)},A.saveViewInitial=function(P){var z=P.center||{},I=P.projection,L=I.rotation||{};this.viewInitial={fitbounds:P.fitbounds,"projection.scale":I.scale};var B;P._isScoped?B={"center.lon":z.lon,"center.lat":z.lat}:P._isClipped?B={"projection.rotation.lon":L.lon,"projection.rotation.lat":L.lat,"center.lon":z.lon,"center.lat":z.lat}:B={"center.lon":z.lon,"center.lat":z.lat,"projection.rotation.lon":L.lon},n.extendFlat(this.viewInitial,B)},A.render=function(P){this._hasMarkerAngles&&P?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},A._render=function(){var P=this.projection,z=P.getPath(),I;function L(O){var G=P(O.lonlat);return G?u(G[0],G[1]):null}function B(O){return P.isLonLatOverEdges(O.lonlat)?"none":null}for(I in this.basePaths)this.basePaths[I].attr("d",z);for(I in this.dataPaths)this.dataPaths[I].attr("d",function(O){return z(O.geojson)});for(I in this.dataPoints)this.dataPoints[I].attr("display",B).attr("transform",L)};function F(P){var z=P.projection,I=z.type,L=C.projNames[I];L="geo"+n.titleCase(L);for(var B=a[L]||s[L],O=B(),G=P._isSatellite?Math.acos(1/z.distance)*180/Math.PI:P._isClipped?C.lonaxisSpan[I]/2:null,$=["center","rotate","parallels","clipExtent"],X=function(N){return N?O:[]},Z=0;Z<$.length;Z++){var J=$[Z];typeof O[J]!="function"&&(O[J]=X)}return O.isLonLatOverEdges=function(N){if(O(N)===null)return!0;if(G){var H=O.rotate(),W=o(N,[-H[0],-H[1]]),U=G*Math.PI/180;return W>U}else return!1},O.getPath=function(){return i().projection(O)},O.getBounds=function(N){return O.getPath().bounds(N)},O.precision(C.precision),P._isSatellite&&O.tilt(z.tilt).distance(z.distance),G&&O.clipAngle(G-C.clipPad),O}function D(P,z,I){var L=1e-6,B=2.5,O=z[P],G=C.scopeDefaults[z.scope],$,X,Z;P==="lonaxis"?($=G.lonaxisRange,X=G.lataxisRange,Z=function(Y,K){return[Y,K]}):P==="lataxis"&&($=G.lataxisRange,X=G.lonaxisRange,Z=function(Y,K){return[K,Y]});var J={type:"linear",range:[$[0],$[1]-L],tick0:O.tick0,dtick:O.dtick};p.setConvert(J,I);var N=p.calcTicks(J);!z.isScoped&&P==="lonaxis"&&N.pop();for(var H=N.length,W=new Array(H),U=0;Ure[se]!=null)||s.fitboundsIncompatible.has(v)?f.fitbounds=!1:Y.forEach(({dst:re,key:se})=>re&&(re[se]=null))}}}}),DP=ye({"src/plots/geo/index.js"(e,r){"use strict";var t=_c().getSubplotCalcData,a=Yt().counterRegex,i=Cse(),o="geo",s=a(o),l={};l[o]={valType:"subplotid",dflt:o,editType:"calc"};function n(f){for(var h=f._fullLayout,d=f.calcdata,p=h._subplots[o],g=0;g")}}}}),PP=ye({"src/traces/choropleth/event_data.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){a.location=i.location,a.z=i.z;var n=s[l];return n.fIn&&n.fIn.properties&&(a.properties=n.fIn.properties),a.ct=n.ct,a}}}),IP=ye({"src/traces/choropleth/select.js"(e,r){"use strict";r.exports=function(a,i){var o=a.cd,s=a.xaxis,l=a.yaxis,n=[],u,c,f,h,d;if(i===!1)for(u=0;u=Math.min(G,$)&&v<=Math.max(G,$)?0:1/0}if(R=Math.min(X,Z)&&x<=Math.max(X,Z)?0:1/0}I=Math.sqrt(R*R+P*P),S=M[D]}}}else for(D=M.length-1;D>-1;D--)b=M[D],A=y[b],F=_[b],R=g.c2p(A)-v,P=m.c2p(F)-x,z=Math.sqrt(R*R+P*P),z100},e.isDotSymbol=function(t){return typeof t=="string"?r.DOT_RE.test(t):t>200}}}),zse=ye({"src/traces/scattergl/defaults.js"(e,r){"use strict";var t=Yt(),a=li(),i=MM(),o=jb(),s=jp(),l=ms(),n=Lm(),u=ap(),c=kd(),f=ip(),h=qp(),d=np();r.exports=function(g,m,y,_){function v(b,S){return t.coerce(g,m,o,b,S)}var x=g.marker?i.isOpenSymbol(g.marker.symbol):!1,E=l.isBubble(g),M=n(g,m,_,v);if(!M){m.visible=!1;return}u(g,m,_,v),v("xhoverformat"),v("yhoverformat");var C=M>>1,g=n[p],m=c!==void 0?c(g,u):g-u;m>=0?(d=p,h=p-1):f=p+1}return d}function a(n,u,c,f,h){for(var d=h+1;f<=h;){var p=f+h>>>1,g=n[p],m=c!==void 0?c(g,u):g-u;m>0?(d=p,h=p-1):f=p+1}return d}function i(n,u,c,f,h){for(var d=f-1;f<=h;){var p=f+h>>>1,g=n[p],m=c!==void 0?c(g,u):g-u;m<0?(d=p,f=p+1):h=p-1}return d}function o(n,u,c,f,h){for(var d=f-1;f<=h;){var p=f+h>>>1,g=n[p],m=c!==void 0?c(g,u):g-u;m<=0?(d=p,f=p+1):h=p-1}return d}function s(n,u,c,f,h){for(;f<=h;){var d=f+h>>>1,p=n[d],g=c!==void 0?c(p,u):p-u;if(g===0)return d;g<=0?f=d+1:h=d-1}return-1}function l(n,u,c,f,h,d){return typeof c=="function"?d(n,u,c,f===void 0?0:f|0,h===void 0?n.length-1:h|0):d(n,u,void 0,c===void 0?0:c|0,f===void 0?n.length-1:f|0)}r.exports={ge:function(n,u,c,f,h){return l(n,u,c,f,h,t)},gt:function(n,u,c,f,h){return l(n,u,c,f,h,a)},lt:function(n,u,c,f,h){return l(n,u,c,f,h,i)},le:function(n,u,c,f,h){return l(n,u,c,f,h,o)},eq:function(n,u,c,f,h){return l(n,u,c,f,h,s)}}}}),RP=ye({"node_modules/clamp/index.js"(e,r){r.exports=t;function t(a,i,o){return io?o:a:ai?i:a}}}),Wp=ye({"node_modules/pick-by-alias/index.js"(e,r){"use strict";r.exports=function(o,s,l){var n={},u,c;if(typeof s=="string"&&(s=a(s)),Array.isArray(s)){var f={};for(c=0;c1&&(i=arguments),typeof i=="string"?i=i.split(/\s/).map(parseFloat):typeof i=="number"&&(i=[i]),i.length&&typeof i[0]=="number"?i.length===1?o={width:i[0],height:i[0],x:0,y:0}:i.length===2?o={width:i[0],height:i[1],x:0,y:0}:o={x:i[0],y:i[1],width:i[2]-i[0]||0,height:i[3]-i[1]||0}:i&&(i=t(i,{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"}),o={x:i.left||0,y:i.top||0},i.width==null?i.right?o.width=i.right-o.x:o.width=0:o.width=i.width,i.height==null?i.bottom?o.height=i.bottom-o.y:o.height=0:o.height=i.height),o}}}),Km=ye({"node_modules/array-bounds/index.js"(e,r){"use strict";r.exports=t;function t(a,i){if(!a||a.length==null)throw Error("Argument should be an array");i==null?i=1:i=Math.floor(i);for(var o=Array(i*2),s=0;sl&&(l=a[u]),a[u]>>1,E;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?E=new(c(m.dtype))(x):m.dtype&&(E=m.dtype,Array.isArray(E)&&(E.length=x));for(let D=0;Dy||L>h){for(let V=0;VK||G>re||$=Z||q===Y)return;let se=M[j];Y===void 0&&(Y=se.length);for(let te=q;te=z&&ee<=L&&ce>=I&&ce<=B&&J.push(ie)}let le=C[j],ue=le[q*4+0],fe=le[q*4+1],pe=le[q*4+2],we=le[q*4+3],xe=H(le,q+1),he=V*.5,oe=j+1;N(W,U,he,oe,ue,fe||pe||we||xe),N(W,U+he,he,oe,fe,pe||we||xe),N(W+he,U,he,oe,pe,we||xe),N(W+he,U+he,he,oe,we,xe)}function H(W,U){let V=null,j=0;for(;V===null;)if(V=W[U*4+j],j++,j>W.length)return null;return V}return J}function A(D,R,P,z,I){let L=[];for(let B=0;B2&&(n.push([c].concat(f.splice(0,2))),h="l",c=c=="m"?"l":"L");;){if(f.length==t[h])return f.unshift(c),n.push(f);if(f.length1&&(g=1),g<-1&&(g=-1),p*Math.acos(g)},l=function(c,f,h,d,p,g,m,y,_,v,x,E){var M=Math.pow(p,2),C=Math.pow(g,2),w=Math.pow(x,2),k=Math.pow(E,2),T=M*C-M*k-C*w;T<0&&(T=0),T/=M*k+C*w,T=Math.sqrt(T)*(m===y?-1:1);var b=T*p/g*E,S=T*-g/p*x,A=v*b-_*S+(c+h)/2,F=_*b+v*S+(f+d)/2,D=(x-b)/p,R=(E-S)/g,P=(-x-b)/p,z=(-E-S)/g,I=s(1,0,D,R),L=s(D,R,P,z);return y===0&&L>0&&(L-=a),y===1&&L<0&&(L+=a),[A,F,I,L]},n=function(c){var f=c.px,h=c.py,d=c.cx,p=c.cy,g=c.rx,m=c.ry,y=c.xAxisRotation,_=y===void 0?0:y,v=c.largeArcFlag,x=v===void 0?0:v,E=c.sweepFlag,M=E===void 0?0:E,C=[];if(g===0||m===0)return[];var w=Math.sin(_*a/360),k=Math.cos(_*a/360),T=k*(f-d)/2+w*(h-p)/2,b=-w*(f-d)/2+k*(h-p)/2;if(T===0&&b===0)return[];g=Math.abs(g),m=Math.abs(m);var S=Math.pow(T,2)/Math.pow(g,2)+Math.pow(b,2)/Math.pow(m,2);S>1&&(g*=Math.sqrt(S),m*=Math.sqrt(S));var A=l(f,h,d,p,g,m,x,M,w,k,T,b),F=t(A,4),D=F[0],R=F[1],P=F[2],z=F[3],I=Math.abs(z)/(a/4);Math.abs(1-I)<1e-7&&(I=1);var L=Math.max(Math.ceil(I),1);z/=L;for(var B=0;B4?(u=v[v.length-4],c=v[v.length-3]):(u=g,c=m),n.push(v)}return n}function i(s,l,n,u){return["C",s,l,n,u,n,u]}function o(s,l,n,u,c,f){return["C",s/3+2/3*n,l/3+2/3*u,c/3+2/3*n,f/3+2/3*u,c,f]}}}),zP=ye({"node_modules/is-svg-path/index.js"(e,r){"use strict";r.exports=function(a){return typeof a!="string"?!1:(a=a.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(a)&&/[\dz]$/i.test(a)&&a.length>4))}}}),$se=ye({"node_modules/svg-path-bounds/index.js"(e,r){"use strict";var t=Vse(),a=Gse(),i=Wse(),o=zP();r.exports=s;function s(l){if(Array.isArray(l)&&l.length===1&&typeof l[0]=="string"&&(l=l[0]),typeof l=="string"){if(!o(l))throw Error("String is not an SVG path.");l=t(l)}if(!Array.isArray(l))throw Error("Argument should be a string or an array of path segments.");if(l=a(l),l=i(l),!l.length)return[0,0,0,0];for(var n=[1/0,1/0,-1/0,-1/0],u=0,c=l.length;un[2]&&(n[2]=f[h+0]),f[h+1]>n[3]&&(n[3]=f[h+1]);return n}}}),Yse=ye({"node_modules/bitmap-sdf/index.js"(e,r){"use strict";r.exports=a;var t=1e20;function a(s,l){l||(l={});var n=l.cutoff==null?.25:l.cutoff,u=l.radius==null?8:l.radius,c=l.channel||0,f,h,d,p,g,m,y,_,v,x,E;if(ArrayBuffer.isView(s)||Array.isArray(s)){if(!l.width||!l.height)throw Error("For raw data width and height should be provided by options");f=l.width,h=l.height,p=s,l.stride?m=l.stride:m=Math.floor(s.length/f/h)}else window.HTMLCanvasElement&&s instanceof window.HTMLCanvasElement?(_=s,y=_.getContext("2d"),f=_.width,h=_.height,v=y.getImageData(0,0,f,h),p=v.data,m=4):window.CanvasRenderingContext2D&&s instanceof window.CanvasRenderingContext2D?(_=s.canvas,y=s,f=_.width,h=_.height,v=y.getImageData(0,0,f,h),p=v.data,m=4):window.ImageData&&s instanceof window.ImageData&&(v=s,f=s.width,h=s.height,p=v.data,m=4);if(d=Math.max(f,h),window.Uint8ClampedArray&&p instanceof window.Uint8ClampedArray||window.Uint8Array&&p instanceof window.Uint8Array)for(g=p,p=Array(f*h),x=0,E=Math.floor(g.length/m);xXse});function Xse(e,r={}){if(!(0,NP.default)(e))throw Error("Invalid SVG path");let t,a;r.shape||Array.isArray(r)?[t,a]=r.shape||r:(t=Ub.width=r.width||r.w||200,a=Ub.height=r.height||r.h||200);let i=Math.min(t,a),o=r.stroke||0,s=r.viewbox||r.viewBox||(0,OP.default)(e),l=[t/(s[2]-s[0]),a/(s[3]-s[1])],n=Math.min(l[0]||0,l[1]||0)/2;Nh.fillStyle="black",Nh.fillRect(0,0,t,a),Nh.fillStyle="white",o&&(typeof o!="number"&&(o=1),Nh.strokeStyle=o>0?"white":"black",Nh.lineWidth=Math.abs(o)),Nh.translate(t*.5,a*.5),Nh.scale(n,n);let u=new Path2D(e);return Nh.fill(u),o&&Nh.stroke(u),Nh.setTransform(1,0,0,1,0,0),(0,jP.default)(Nh,{cutoff:r.cutoff!=null?r.cutoff:.5,radius:r.radius!=null?r.radius:i*.5})}var OP,NP,jP,Ub,Nh,Zse=Si({"node_modules/svg-path-sdf/svg-path-sdf.js"(){OP=Vs($se()),NP=Vs(zP()),jP=Vs(Yse()),Ub=document.createElement("canvas"),Nh=Ub.getContext("2d",{willReadFrequently:!0})}}),Qm=ye({"src/traces/scattergl/convert.js"(e,r){"use strict";var t=en(),a=(Zse(),On(BP)).default,{normalize:i}=Ya(),o=li(),s=Yt(),l=s.isArrayOrTypedArray,n=$i(),u=Gs(),c=y0().formatColor,f=ms(),h=$x(),d=MM(),p=Ov(),g=f0().DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},y=Bf().appendArrayPointValue;function _(z,I){var L,B={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},O=z._context.plotGlPixelRatio;if(I.visible!==!0)return B;if(f.hasText(I)&&(B.text=v(z,I),B.textSel=C(z,I,I.selected),B.textUnsel=C(z,I,I.unselected)),f.hasMarkers(I)&&(B.marker=E(z,I),B.markerSel=M(z,I,I.selected),B.markerUnsel=M(z,I,I.unselected),!I.unselected&&l(I.marker.opacity))){var G=I.marker.opacity;for(B.markerUnsel.opacity=new Array(G.length),L=0;L500?"bold":"normal":z}function E(z,I){var L=I._length,B=I.marker,O={},G,$=l(B.symbol),X=l(B.angle),Z=l(B.color),J=l(B.line.color),N=l(B.opacity),H=l(B.size),W=l(B.line.width),U;if($||(U=d.isOpenSymbol(B.symbol)),$||Z||J||N||X){O.symbols=new Array(L),O.angles=new Array(L),O.colors=new Array(L),O.borderColors=new Array(L);var V=B.symbol,j=B.angle,q=c(B,B.opacity,L),Y=c(B.line,B.opacity,L);if(!l(Y[0])){var K=Y;for(Y=Array(L),G=0;Gp.TOO_MANY_POINTS||f.hasMarkers(I)?"rect":"round";if(J&&I.connectgaps){var H=G[0],W=G[1];for($=0;$1?Z[$]:Z[0]:Z,U=l(J)?J.length>1?J[$]:J[0]:J,V=m[W],j=m[U],q=N?N/.8+1:0,Y=-j*q-j*.5;G.offset[$]=[V*q/H,Y/H]}}return G}r.exports={style:_,markerStyle:E,markerSelection:M,linePositions:D,errorBarPositions:R,textPosition:P}}}),UP=ye({"src/traces/scattergl/scene_update.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o){var s=o._scene,l={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},n={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return o._scene||(s=o._scene={},s.init=function(){t.extendFlat(s,n,l)},s.init(),s.update=function(c){var f=t.repeat(c,s.count);if(s.fill2d&&s.fill2d.update(f),s.scatter2d&&s.scatter2d.update(f),s.line2d&&s.line2d.update(f),s.error2d&&s.error2d.update(f.concat(f)),s.select2d&&s.select2d.update(f),s.glText)for(var h=0;h=g,b=k*2,S={},A,F=M.makeCalcdata(x,"x"),D=C.makeCalcdata(x,"y"),R=s(x,M,"x",F),P=s(x,C,"y",D),z=R.vals,I=P.vals;x._x=z,x._y=I,x.xperiodalignment&&(x._origX=F,x._xStarts=R.starts,x._xEnds=R.ends),x.yperiodalignment&&(x._origY=D,x._yStarts=P.starts,x._yEnds=P.ends);var L=new Array(b),B=new Array(k);for(A=0;A1&&a.extendFlat(w.line,h.linePositions(_,x,E)),w.errorX||w.errorY){var k=h.errorBarPositions(_,x,E,M,C);w.errorX&&a.extendFlat(w.errorX,k.x),w.errorY&&a.extendFlat(w.errorY,k.y)}return w.text&&(a.extendFlat(w.text,{positions:E},h.textPosition(_,x,w.text,w.marker)),a.extendFlat(w.textSel,{positions:E},h.textPosition(_,x,w.text,w.markerSel)),a.extendFlat(w.textUnsel,{positions:E},h.textPosition(_,x,w.text,w.markerUnsel))),w}}}),qP=ye({"src/traces/scattergl/edit_style.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=f0().DESELECTDIM;function o(s){var l=s[0],n=l.trace,u=l.t,c=u._scene,f=u.index,h=c.selectBatch[f],d=c.unselectBatch[f],p=c.textOptions[f],g=c.textSelectedOptions[f]||{},m=c.textUnselectedOptions[f]||{},y=t.extendFlat({},p),_,v;if(h.length||d.length){var x=g.color,E=m.color,M=p.color,C=t.isArrayOrTypedArray(M);for(y.color=new Array(n._length),_=0;_10&&/[0-9](?:\s|\/)/.test(o)&&(l=o.match(/([0-9]+)/g).map(function(g){return parseFloat(g)}),u=o.match(/([a-z])/ig).join("").toLowerCase());else isNaN(o)?Array.isArray(o)||o.length?(l=[o[0],o[1],o[2]],u="rgb",n=o.length===4?o[3]:1):o instanceof Object&&(o.r!=null||o.red!=null||o.R!=null?(u="rgb",l=[o.r||o.red||o.R||0,o.g||o.green||o.G||0,o.b||o.blue||o.B||0]):(u="hsl",l=[o.h||o.hue||o.H||0,o.s||o.saturation||o.S||0,o.l||o.lightness||o.L||o.b||o.brightness]),n=o.a||o.alpha||o.opacity||1,o.opacity!=null&&(n/=100)):(u="rgb",l=[o>>>16,(o&65280)>>>8,o&255]);return{space:u,values:l,alpha:n}}}}),tle=ye({"node_modules/color-rgba/index.js"(e,r){"use strict";var t=ele();r.exports=function(o){Array.isArray(o)&&o.raw&&(o=String.raw.apply(null,arguments));var s,l,n,u=t(o);if(!u.space)return[];var c=[0,0,0],f=u.space[0]==="h"?[360,100,100]:[255,255,255];return s=Array(3),s[0]=Math.min(Math.max(u.values[0],c[0]),f[0]),s[1]=Math.min(Math.max(u.values[1],c[1]),f[1]),s[2]=Math.min(Math.max(u.values[2],c[2]),f[2]),u.space[0]==="h"&&(s=a(s)),s.push(Math.min(Math.max(u.alpha,0),1)),s};function a(i){var o=i[0]/360,s=i[1]/100,l=i[2]/100,n,u,c,f,h,d=0;if(s===0)return h=l*255,[h,h,h];for(u=l<.5?l*(1+s):l+s-l*s,n=2*l-u,f=[0,0,0];d<3;)c=o+1/3*-(d-1),c<0?c++:c>1&&c--,h=6*c<1?n+(u-n)*6*c:2*c<1?u:3*c<2?n+(u-n)*(2/3-c)*6:n,f[d++]=h*255;return f}}}),qb=ye({"node_modules/color-normalize/index.js"(e,r){"use strict";var t=tle(),a=EM();r.exports=function(s,l){(l==="float"||!l)&&(l="array"),l==="uint"&&(l="uint8"),l==="uint_clamped"&&(l="uint8_clamped");var n=a(l),u=new n(4),c=l!=="uint8"&&l!=="uint8_clamped";return(!s.length||typeof s=="string")&&(s=t(s),s[0]/=255,s[1]/=255,s[2]/=255),i(s)?(u[0]=s[0],u[1]=s[1],u[2]=s[2],u[3]=s[3]!=null?s[3]:255,c&&(u[0]/=255,u[1]/=255,u[2]/=255,u[3]/=255),u):(c?(u[0]=s[0],u[1]=s[1],u[2]=s[2],u[3]=s[3]!=null?s[3]:1):(u[0]=Math.min(Math.max(Math.floor(s[0]*255),0),255),u[1]=Math.min(Math.max(Math.floor(s[1]*255),0),255),u[2]=Math.min(Math.max(Math.floor(s[2]*255),0),255),u[3]=s[3]==null?255:Math.min(Math.max(Math.floor(s[3]*255),0),255)),u)};function i(o){return!!(o instanceof Uint8Array||o instanceof Uint8ClampedArray||Array.isArray(o)&&(o[0]>1||o[0]===0)&&(o[1]>1||o[1]===0)&&(o[2]>1||o[2]===0)&&(!o[3]||o[3]>1))}}}),rle=ye({"node_modules/color-id/index.js"(e,r){"use strict";var t=RP();r.exports=a,r.exports.to=a,r.exports.from=i;function a(o,s){s==null&&(s=!0);var l=o[0],n=o[1],u=o[2],c=o[3];c==null&&(c=s?1:255),s&&(l*=255,n*=255,u*=255,c*=255),l=t(l,0,255)&255,n=t(n,0,255)&255,u=t(u,0,255)&255,c=t(c,0,255)&255;var f=l*16777216+(n<<16)+(u<<8)+c;return f}function i(o,s){o=+o;var l=o>>>24,n=(o&16711680)>>>16,u=(o&65280)>>>8,c=o&255;return s===!1?[l,n,u,c]:[l/255,n/255,u/255,c/255]}}}),ale=ye({"node_modules/glslify/browser.js"(e,r){r.exports=function(t){typeof t=="string"&&(t=[t]);for(var a=[].slice.call(arguments,1),i=[],o=0;o[this.tooManyColors?0:w,_.height],pixelRatio:g.context("pixelRatio"),scale:g.prop("scale"),scaleFract:g.prop("scaleFract"),translate:g.prop("translate"),translateFract:g.prop("translateFract"),markerTexture:g.prop("markerTexture"),paletteTexture:_},attributes:{x:(A,F)=>F.xAttr||{buffer:F.positionBuffer,stride:8,offset:0},y:(A,F)=>F.yAttr||{buffer:F.positionBuffer,stride:8,offset:4},xFract:(A,F)=>F.xAttr?{constant:[0,0]}:{buffer:F.positionFractBuffer,stride:8,offset:0},yFract:(A,F)=>F.yAttr?{constant:[0,0]}:{buffer:F.positionFractBuffer,stride:8,offset:4},size:(A,F)=>F.size.length?{buffer:F.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(F.size*255/this.maxSize)]},borderSize:(A,F)=>F.borderSize.length?{buffer:F.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(F.borderSize*255/this.maxSize)]},colorId:(A,F)=>F.color.length?{buffer:F.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?v.slice(F.color*4,F.color*4+4):[F.color]},borderColorId:(A,F)=>F.borderColor.length?{buffer:F.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?v.slice(F.borderColor*4,F.borderColor*4+4):[F.borderColor]},isActive:(A,F)=>F.activation===!0?{constant:[1]}:F.activation?F.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:g.prop("viewport")},viewport:g.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:g.prop("elements"),count:g.prop("count"),offset:g.prop("offset"),primitive:"points"},b=Object.assign({},T);b.frag=s([`precision highp float; #define GLSLIFY 1 uniform float opacity; @@ -2031,7 +2031,7 @@ void main() { } } -`]),u.vert=l([`precision highp float; +`]),b.vert=s([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; @@ -2099,7 +2099,7 @@ void main() { fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); } -`]),this.drawMarker=m(u);let A=Object.assign({},f);A.frag=l([`precision highp float; +`]),this.drawMarker=g(b);let S=Object.assign({},T);S.frag=s([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor, fragBorderColor; @@ -2130,7 +2130,7 @@ void main() { color.a *= alpha * opacity; gl_FragColor = color; } -`]),A.vert=l([`precision highp float; +`]),S.vert=s([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; @@ -2194,8 +2194,8 @@ void main() { fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } -`]),this.drawCircle=m(A)}s.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},s.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this},s.prototype.draw=function(){for(var m=arguments.length,h=new Array(m),v=0;v{this.drawItem(w)});return this},s.prototype.drawItem=function(m,h){let{groups:v}=this,g=v[m];if(typeof h=="number"&&(m=h,g=v[h],h=null),!(g&&g.count&&g.opacity))return;g.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,g,h));let i=[];for(let w=1;w{let f=g[T];if(_===void 0)return f;_===null?_={positions:null}:typeof _=="function"?_={ondraw:_}:typeof _[0]=="number"&&(_={positions:_}),_=e(_,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),_.positions===null&&(_.positions=[]),_.tooManyColors!=null&&(this.tooManyColors=_.tooManyColors),f||(g[T]=f={id:T,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:w.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},_=Object.assign({},s.defaults,_)),_.positions&&!("marker"in _)&&(_.marker=f.marker,delete f.marker),_.marker&&!("positions"in _)&&(_.positions=f.positions,delete f.positions);let u=0,A=0;if(t(f,_,[{snap:!0,size:(x,z)=>(x==null&&(x=s.defaults.size),u+=x&&x.length?1:0,x),borderSize:(x,z)=>(x==null&&(x=s.defaults.borderSize),u+=x&&x.length?1:0,x),opacity:parseFloat,color:(x,z)=>(x==null&&(x=s.defaults.color),x=this.updateColor(x),A++,x),borderColor:(x,z)=>(x==null&&(x=s.defaults.borderColor),x=this.updateColor(x),A++,x),bounds:(x,z,I)=>("range"in I||(I.range=null),x),positions:(x,z,I)=>{let{snap:O}=z,{positionBuffer:D,positionFractBuffer:B,selectionBuffer:F}=z;if(x.x||x.y)return x.x.length?z.xAttr={buffer:w.buffer(x.x),offset:0,stride:4,count:x.x.length}:z.xAttr={buffer:x.x.buffer,offset:x.x.offset*4||0,stride:(x.x.stride||1)*4,count:x.x.count},x.y.length?z.yAttr={buffer:w.buffer(x.y),offset:0,stride:4,count:x.y.length}:z.yAttr={buffer:x.y.buffer,offset:x.y.offset*4||0,stride:(x.y.stride||1)*4,count:x.y.count},z.count=Math.max(z.xAttr.count,z.yAttr.count),x;x=n(x,"float64");let P=z.count=Math.floor(x.length/2),j=z.bounds=P?b(x,2):null;if(!I.range&&!z.range&&(delete z.range,I.range=j),!I.marker&&!z.marker&&(delete z.marker,I.marker=null),O&&(O===!0||P>O)?z.tree=k(x,{bounds:j}):O&&O.length&&(z.tree=O),z.tree){let Q={primitive:"points",usage:"static",data:z.tree,type:"uint32"};z.elements?z.elements(Q):z.elements=w.elements(Q)}var U=r.float32(x);D({data:U,usage:"dynamic"});var $=r.fract32(x,U);return B({data:$,usage:"dynamic"}),F({data:new Uint8Array(P),type:"uint8",usage:"stream"}),x}},{marker:(x,z,I)=>{let{activation:O}=z;if(O.forEach(D=>D&&D.destroy&&D.destroy()),O.length=0,!x||typeof x[0]=="number"){let D=this.addMarker(x);O[D]=!0}else{let D=[];for(let B=0,F=Math.min(x.length,z.count);B{let O=z.bounds;if(O)return x||(x=O),z.scale=[1/(x[2]-x[0]),1/(x[3]-x[1])],z.translate=[-x[0],-x[1]],z.scaleFract=r.fract(z.scale),z.translateFract=r.fract(z.translate),x},viewport:x=>a(x||[i.drawingBufferWidth,i.drawingBufferHeight])}]),u){let{count:x,size:z,borderSize:I,sizeBuffer:O}=f,D=new Uint8Array(x*2);if(z.length||I.length)for(let B=0;B=0)return i;let w;if(m instanceof Uint8Array||m instanceof Uint8ClampedArray)w=m;else{w=new Uint8Array(m.length);for(let M=0,C=m.length;Mg*4&&(this.tooManyColors=!0),this.updatePalette(v),i.length===1?i[0]:i},s.prototype.updatePalette=function(m){if(this.tooManyColors)return;let{maxColors:h,paletteTexture:v}=this,g=Math.ceil(m.length*.25/h);if(g>1){m=m.slice();for(let i=m.length*.25%h;i{m.sizeBuffer.destroy(),m.positionBuffer.destroy(),m.positionFractBuffer.destroy(),m.colorBuffer.destroy(),m.activation.forEach(h=>h&&h.destroy&&h.destroy()),m.selectionBuffer.destroy(),m.elements&&m.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(m=>m&&m.destroy&&m.destroy()),this};var c=function(m,h){var v=new o(m,h),g=v.render.bind(v);return Object.assign(g,{render:g,update:v.update.bind(v),draw:v.draw.bind(v),destroy:v.destroy.bind(v),regl:v.regl,gl:v.gl,canvas:v.gl.canvas,groups:v.groups,markers:v.markerCache,palette:v.palette}),g};V.exports=c}}),Vc=ze({"node_modules/object-assign/index.js"(J,V){"use strict";var p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function k(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function l(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(o){a[o]=o}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}V.exports=l()?Object.assign:function(e,t){for(var n,r=k(e),a,o=1;o80*P){re=se=B[0],ne=G=B[1];for(var Y=P;Yse&&(se=X),K>G&&(G=K);H=Math.max(se-re,G-ne),H=H!==0?32767/H:0}return k($,Q,P,re,ne,H,0),Q}function b(B,F,P,j,U){var $,Q;if(U===D(B,F,P,j)>0)for($=F;$=F;$-=j)Q=z($,B[$],B[$+1],Q);return Q&&M(Q,Q.next)&&(I(Q),Q=Q.next),Q}function E(B,F){if(!B)return B;F||(F=B);var P=B,j;do if(j=!1,!P.steiner&&(M(P,P.next)||S(P.prev,P,P.next)===0)){if(I(P),P=F=P.prev,P===P.next)break;j=!0}else P=P.next;while(j||P!==F);return F}function k(B,F,P,j,U,$,Q){if(B){!Q&&$&&m(B,j,U,$);for(var re=B,ne,se;B.prev!==B.next;){if(ne=B.prev,se=B.next,$?e(B,j,U,$):l(B)){F.push(ne.i/P|0),F.push(B.i/P|0),F.push(se.i/P|0),I(B),B=se.next,re=se.next;continue}if(B=se,B===re){Q?Q===1?(B=t(E(B),F,P),k(B,F,P,j,U,$,2)):Q===2&&n(B,F,P,j,U,$):k(E(B),F,P,j,U,$,1);break}}}}function l(B){var F=B.prev,P=B,j=B.next;if(S(F,P,j)>=0)return!1;for(var U=F.x,$=P.x,Q=j.x,re=F.y,ne=P.y,se=j.y,G=U<$?U$?U>Q?U:Q:$>Q?$:Q,H=re>ne?re>se?re:se:ne>se?ne:se,Y=j.next;Y!==F;){if(Y.x>=G&&Y.x<=K&&Y.y>=X&&Y.y<=H&&i(U,re,$,ne,Q,se,Y.x,Y.y)&&S(Y.prev,Y,Y.next)>=0)return!1;Y=Y.next}return!0}function e(B,F,P,j){var U=B.prev,$=B,Q=B.next;if(S(U,$,Q)>=0)return!1;for(var re=U.x,ne=$.x,se=Q.x,G=U.y,X=$.y,K=Q.y,H=rene?re>se?re:se:ne>se?ne:se,Z=G>X?G>K?G:K:X>K?X:K,ee=v(H,Y,F,P,j),ae=v(q,Z,F,P,j),he=B.prevZ,xe=B.nextZ;he&&he.z>=ee&&xe&&xe.z<=ae;){if(he.x>=H&&he.x<=q&&he.y>=Y&&he.y<=Z&&he!==U&&he!==Q&&i(re,G,ne,X,se,K,he.x,he.y)&&S(he.prev,he,he.next)>=0||(he=he.prevZ,xe.x>=H&&xe.x<=q&&xe.y>=Y&&xe.y<=Z&&xe!==U&&xe!==Q&&i(re,G,ne,X,se,K,xe.x,xe.y)&&S(xe.prev,xe,xe.next)>=0))return!1;xe=xe.nextZ}for(;he&&he.z>=ee;){if(he.x>=H&&he.x<=q&&he.y>=Y&&he.y<=Z&&he!==U&&he!==Q&&i(re,G,ne,X,se,K,he.x,he.y)&&S(he.prev,he,he.next)>=0)return!1;he=he.prevZ}for(;xe&&xe.z<=ae;){if(xe.x>=H&&xe.x<=q&&xe.y>=Y&&xe.y<=Z&&xe!==U&&xe!==Q&&i(re,G,ne,X,se,K,xe.x,xe.y)&&S(xe.prev,xe,xe.next)>=0)return!1;xe=xe.nextZ}return!0}function t(B,F,P){var j=B;do{var U=j.prev,$=j.next.next;!M(U,$)&&C(U,j,j.next,$)&&u(U,$)&&u($,U)&&(F.push(U.i/P|0),F.push(j.i/P|0),F.push($.i/P|0),I(j),I(j.next),j=B=$),j=j.next}while(j!==B);return E(j)}function n(B,F,P,j,U,$){var Q=B;do{for(var re=Q.next.next;re!==Q.prev;){if(Q.i!==re.i&&w(Q,re)){var ne=x(Q,re);Q=E(Q,Q.next),ne=E(ne,ne.next),k(Q,F,P,j,U,$,0),k(ne,F,P,j,U,$,0);return}re=re.next}Q=Q.next}while(Q!==B)}function r(B,F,P,j){var U=[],$,Q,re,ne,se;for($=0,Q=F.length;$=P.next.y&&P.next.y!==P.y){var re=P.x+(U-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(re<=j&&re>$&&($=re,Q=P.x=P.x&&P.x>=se&&j!==P.x&&i(UQ.x||P.x===Q.x&&c(Q,P)))&&(Q=P,X=K)),P=P.next;while(P!==ne);return Q}function c(B,F){return S(B.prev,B,F.prev)<0&&S(F.next,B,B.next)<0}function m(B,F,P,j){var U=B;do U.z===0&&(U.z=v(U.x,U.y,F,P,j)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==B);U.prevZ.nextZ=null,U.prevZ=null,h(U)}function h(B){var F,P,j,U,$,Q,re,ne,se=1;do{for(P=B,B=null,$=null,Q=0;P;){for(Q++,j=P,re=0,F=0;F0||ne>0&&j;)re!==0&&(ne===0||!j||P.z<=j.z)?(U=P,P=P.nextZ,re--):(U=j,j=j.nextZ,ne--),$?$.nextZ=U:B=U,U.prevZ=$,$=U;P=j}$.nextZ=null,se*=2}while(Q>1);return B}function v(B,F,P,j,U){return B=(B-P)*U|0,F=(F-j)*U|0,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,B|F<<1}function g(B){var F=B,P=B;do(F.x=(B-Q)*($-re)&&(B-Q)*(j-re)>=(P-Q)*(F-re)&&(P-Q)*($-re)>=(U-Q)*(j-re)}function w(B,F){return B.next.i!==F.i&&B.prev.i!==F.i&&!f(B,F)&&(u(B,F)&&u(F,B)&&A(B,F)&&(S(B.prev,B,F.prev)||S(B,F.prev,F))||M(B,F)&&S(B.prev,B,B.next)>0&&S(F.prev,F,F.next)>0)}function S(B,F,P){return(F.y-B.y)*(P.x-F.x)-(F.x-B.x)*(P.y-F.y)}function M(B,F){return B.x===F.x&&B.y===F.y}function C(B,F,P,j){var U=T(S(B,F,P)),$=T(S(B,F,j)),Q=T(S(P,j,B)),re=T(S(P,j,F));return!!(U!==$&&Q!==re||U===0&&_(B,P,F)||$===0&&_(B,j,F)||Q===0&&_(P,B,j)||re===0&&_(P,F,j))}function _(B,F,P){return F.x<=Math.max(B.x,P.x)&&F.x>=Math.min(B.x,P.x)&&F.y<=Math.max(B.y,P.y)&&F.y>=Math.min(B.y,P.y)}function T(B){return B>0?1:B<0?-1:0}function f(B,F){var P=B;do{if(P.i!==B.i&&P.next.i!==B.i&&P.i!==F.i&&P.next.i!==F.i&&C(P,P.next,B,F))return!0;P=P.next}while(P!==B);return!1}function u(B,F){return S(B.prev,B,B.next)<0?S(B,F,B.next)>=0&&S(B,B.prev,F)>=0:S(B,F,B.prev)<0||S(B,B.next,F)<0}function A(B,F){var P=B,j=!1,U=(B.x+F.x)/2,$=(B.y+F.y)/2;do P.y>$!=P.next.y>$&&P.next.y!==P.y&&U<(P.next.x-P.x)*($-P.y)/(P.next.y-P.y)+P.x&&(j=!j),P=P.next;while(P!==B);return j}function x(B,F){var P=new O(B.i,B.x,B.y),j=new O(F.i,F.x,F.y),U=B.next,$=F.prev;return B.next=F,F.prev=B,P.next=U,U.prev=P,j.next=P,P.prev=j,$.next=j,j.prev=$,j}function z(B,F,P,j){var U=new O(B,F,P);return j?(U.next=j.next,U.prev=j,j.next.prev=U,j.next=U):(U.prev=U,U.next=U),U}function I(B){B.next.prev=B.prev,B.prev.next=B.next,B.prevZ&&(B.prevZ.nextZ=B.nextZ),B.nextZ&&(B.nextZ.prevZ=B.prevZ)}function O(B,F,P){this.i=B,this.x=F,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}p.deviation=function(B,F,P,j){var U=F&&F.length,$=U?F[0]*P:B.length,Q=Math.abs(D(B,0,$,P));if(U)for(var re=0,ne=F.length;re0&&(j+=B[U-1].length,P.holes.push(j))}return P}}}),aU=ze({"node_modules/array-normalize/index.js"(J,V){"use strict";var p=c0();V.exports=b;function b(E,k,l){if(!E||E.length==null)throw Error("Argument should be an array");k==null&&(k=1),l==null&&(l=p(E,k));for(var e=0;e-1}}}),eM=ze({"node_modules/es5-ext/string/#/contains/index.js"(J,V){"use strict";V.exports=mU()()?String.prototype.contains:gU()}}),pp=ze({"node_modules/d/index.js"(J,V){"use strict";var p=d0(),b=JA(),E=N2(),k=QA(),l=eM(),e=V.exports=function(t,n){var r,a,o,s,c;return arguments.length<2||typeof t!="string"?(s=n,n=t,t=null):s=arguments[2],p(t)?(r=l.call(t,"c"),a=l.call(t,"e"),o=l.call(t,"w")):(r=o=!0,a=!1),c={value:n,configurable:r,enumerable:a,writable:o},s?E(k(s),c):c};e.gs=function(t,n,r){var a,o,s,c;return typeof t!="string"?(s=r,r=n,n=t,t=null):s=arguments[3],p(n)?b(n)?p(r)?b(r)||(s=r,r=void 0):r=void 0:(s=n,n=r=void 0):n=void 0,p(t)?(a=l.call(t,"c"),o=l.call(t,"e")):(a=!0,o=!1),c={get:n,set:r,configurable:a,enumerable:o},s?E(k(s),c):c}}}),ny=ze({"node_modules/es5-ext/function/is-arguments.js"(J,V){"use strict";var p=Object.prototype.toString,b=p.call(function(){return arguments}());V.exports=function(E){return p.call(E)===b}}}),iy=ze({"node_modules/es5-ext/string/is-string.js"(J,V){"use strict";var p=Object.prototype.toString,b=p.call("");V.exports=function(E){return typeof E=="string"||E&&typeof E=="object"&&(E instanceof String||p.call(E)===b)||!1}}}),yU=ze({"node_modules/ext/global-this/is-implemented.js"(J,V){"use strict";V.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),_U=ze({"node_modules/ext/global-this/implementation.js"(J,V){var p=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};V.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return p()}try{return __global__||p()}finally{delete Object.prototype.__global__}}()}}),oy=ze({"node_modules/ext/global-this/index.js"(J,V){"use strict";V.exports=yU()()?globalThis:_U()}}),xU=ze({"node_modules/es6-symbol/is-implemented.js"(J,V){"use strict";var p=oy(),b={object:!0,symbol:!0};V.exports=function(){var E=p.Symbol,k;if(typeof E!="function")return!1;k=E("test symbol");try{String(k)}catch{return!1}return!(!b[typeof E.iterator]||!b[typeof E.toPrimitive]||!b[typeof E.toStringTag])}}}),bU=ze({"node_modules/es6-symbol/is-symbol.js"(J,V){"use strict";V.exports=function(p){return p?typeof p=="symbol"?!0:!p.constructor||p.constructor.name!=="Symbol"?!1:p[p.constructor.toStringTag]==="Symbol":!1}}}),tM=ze({"node_modules/es6-symbol/validate-symbol.js"(J,V){"use strict";var p=bU();V.exports=function(b){if(!p(b))throw new TypeError(b+" is not a symbol");return b}}}),wU=ze({"node_modules/es6-symbol/lib/private/generate-name.js"(J,V){"use strict";var p=pp(),b=Object.create,E=Object.defineProperty,k=Object.prototype,l=b(null);V.exports=function(e){for(var t=0,n,r;l[e+(t||"")];)++t;return e+=t||"",l[e]=!0,n="@@"+e,E(k,n,p.gs(null,function(a){r||(r=!0,E(this,n,p(a)),r=!1)})),n}}}),TU=ze({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(J,V){"use strict";var p=pp(),b=oy().Symbol;V.exports=function(E){return Object.defineProperties(E,{hasInstance:p("",b&&b.hasInstance||E("hasInstance")),isConcatSpreadable:p("",b&&b.isConcatSpreadable||E("isConcatSpreadable")),iterator:p("",b&&b.iterator||E("iterator")),match:p("",b&&b.match||E("match")),replace:p("",b&&b.replace||E("replace")),search:p("",b&&b.search||E("search")),species:p("",b&&b.species||E("species")),split:p("",b&&b.split||E("split")),toPrimitive:p("",b&&b.toPrimitive||E("toPrimitive")),toStringTag:p("",b&&b.toStringTag||E("toStringTag")),unscopables:p("",b&&b.unscopables||E("unscopables"))})}}}),AU=ze({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(J,V){"use strict";var p=pp(),b=tM(),E=Object.create(null);V.exports=function(k){return Object.defineProperties(k,{for:p(function(l){return E[l]?E[l]:E[l]=k(String(l))}),keyFor:p(function(l){var e;b(l);for(e in E)if(E[e]===l)return e})})}}}),MU=ze({"node_modules/es6-symbol/polyfill.js"(J,V){"use strict";var p=pp(),b=tM(),E=oy().Symbol,k=wU(),l=TU(),e=AU(),t=Object.create,n=Object.defineProperties,r=Object.defineProperty,a,o,s;if(typeof E=="function")try{String(E()),s=!0}catch{}else E=null;o=function(m){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return a(m)},V.exports=a=function c(m){var h;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?E(m):(h=t(o.prototype),m=m===void 0?"":String(m),n(h,{__description__:p("",m),__name__:p("",k(m))}))},l(a),e(a),n(o.prototype,{constructor:p(a),toString:p("",function(){return this.__name__})}),n(a.prototype,{toString:p(function(){return"Symbol ("+b(this).__description__+")"}),valueOf:p(function(){return b(this)})}),r(a.prototype,a.toPrimitive,p("",function(){var c=b(this);return typeof c=="symbol"?c:c.toString()})),r(a.prototype,a.toStringTag,p("c","Symbol")),r(o.prototype,a.toStringTag,p("c",a.prototype[a.toStringTag])),r(o.prototype,a.toPrimitive,p("c",a.prototype[a.toPrimitive]))}}),Tv=ze({"node_modules/es6-symbol/index.js"(J,V){"use strict";V.exports=xU()()?oy().Symbol:MU()}}),SU=ze({"node_modules/es5-ext/array/#/clear.js"(J,V){"use strict";var p=dp();V.exports=function(){return p(this).length=0,this}}}),_g=ze({"node_modules/es5-ext/object/valid-callable.js"(J,V){"use strict";V.exports=function(p){if(typeof p!="function")throw new TypeError(p+" is not a function");return p}}}),EU=ze({"node_modules/type/string/coerce.js"(J,V){"use strict";var p=d0(),b=KA(),E=Object.prototype.toString;V.exports=function(k){if(!p(k))return null;if(b(k)){var l=k.toString;if(typeof l!="function"||l===E)return null}try{return""+k}catch{return null}}}}),kU=ze({"node_modules/type/lib/safe-to-string.js"(J,V){"use strict";V.exports=function(p){try{return p.toString()}catch{try{return String(p)}catch{return null}}}}}),CU=ze({"node_modules/type/lib/to-short-string.js"(J,V){"use strict";var p=kU(),b=/[\n\r\u2028\u2029]/g;V.exports=function(E){var k=p(E);return k===null?"":(k.length>100&&(k=k.slice(0,99)+"\u2026"),k=k.replace(b,function(l){switch(l){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),k)}}}),LU=ze({"node_modules/type/lib/resolve-error-message.js"(J,V){"use strict";var p=EU(),b=CU();V.exports=function(E,k,l){l&&l.errorMessage&&(E=p(l.errorMessage));var e=E.indexOf("%v"),t=e>-1?b(k):null;if(l&&l.name){var n=E.indexOf("%n");if(n>-1){if(e>-1){var r,a,o,s;return n>e?(r=t,o=e,a=l.name,s=n):(r=l.name,o=n,a=t,s=e),E.slice(0,o)+r+E.slice(o+2,s)+a+E.slice(s+2)}return E.slice(0,n)+l.name+E.slice(n+2)}}return e>-1?E.slice(0,e)+t+E.slice(e+2):E}}}),rM=ze({"node_modules/type/lib/resolve-exception.js"(J,V){"use strict";var p=d0(),b=LU();V.exports=function(E,k,l){if(l&&!p(E)){if("default"in l)return l.default;if(l.isOptional)return null}var e=l&&l.Error||TypeError,t=new e(b(k,E,l));throw l&&l.errorCode&&(t.code=l.errorCode),t}}}),PU=ze({"node_modules/type/value/ensure.js"(J,V){"use strict";var p=rM(),b=d0();V.exports=function(E){if(b(E))return E;var k=arguments[1],l=k&&k.name?"Expected a value for %n, received %v":"Cannot use %v";return p(E,l,k)}}}),RU=ze({"node_modules/type/plain-function/ensure.js"(J,V){"use strict";var p=rM(),b=JA();V.exports=function(E){if(b(E))return E;var k=arguments[1],l=k&&k.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return p(E,l,k)}}}),IU=ze({"node_modules/es5-ext/array/from/is-implemented.js"(J,V){"use strict";V.exports=function(){var p=Array.from,b,E;return typeof p!="function"?!1:(b=["raz","dwa"],E=p(b),!!(E&&E!==b&&E[1]==="dwa"))}}}),DU=ze({"node_modules/es5-ext/function/is-function.js"(J,V){"use strict";var p=Object.prototype.toString,b=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);V.exports=function(E){return typeof E=="function"&&b(p.call(E))}}}),FU=ze({"node_modules/es5-ext/math/sign/is-implemented.js"(J,V){"use strict";V.exports=function(){var p=Math.sign;return typeof p!="function"?!1:p(10)===1&&p(-20)===-1}}}),zU=ze({"node_modules/es5-ext/math/sign/shim.js"(J,V){"use strict";V.exports=function(p){return p=Number(p),isNaN(p)||p===0?p:p>0?1:-1}}}),BU=ze({"node_modules/es5-ext/math/sign/index.js"(J,V){"use strict";V.exports=FU()()?Math.sign:zU()}}),OU=ze({"node_modules/es5-ext/number/to-integer.js"(J,V){"use strict";var p=BU(),b=Math.abs,E=Math.floor;V.exports=function(k){return isNaN(k)?0:(k=Number(k),k===0||!isFinite(k)?k:p(k)*E(b(k)))}}}),NU=ze({"node_modules/es5-ext/number/to-pos-integer.js"(J,V){"use strict";var p=OU(),b=Math.max;V.exports=function(E){return b(0,p(E))}}}),jU=ze({"node_modules/es5-ext/array/from/shim.js"(J,V){"use strict";var p=Tv().iterator,b=ny(),E=DU(),k=NU(),l=_g(),e=dp(),t=wv(),n=iy(),r=Array.isArray,a=Function.prototype.call,o={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;V.exports=function(c){var m=arguments[1],h=arguments[2],v,g,i,w,S,M,C,_,T,f;if(c=Object(e(c)),t(m)&&l(m),!this||this===Array||!E(this)){if(!m){if(b(c))return S=c.length,S!==1?Array.apply(null,c):(w=new Array(1),w[0]=c[0],w);if(r(c)){for(w=new Array(S=c.length),g=0;g=55296&&M<=56319&&(f+=c[++g])),f=m?a.call(m,h,f,i):f,v?(o.value=f,s(w,i,o)):w[i]=f,++i;S=i}}if(S===void 0)for(S=k(c.length),v&&(w=new v(S)),g=0;g=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){n(this,"__redo__",l("c",[o]));return}this.__redo__.forEach(function(s,c){s>=o&&(this.__redo__[c]=++s)},this),this.__redo__.push(o)}}),_onDelete:l(function(o){var s;o>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(o),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,m){c>o&&(this.__redo__[m]=--c)},this)))}),_onClear:l(function(){this.__redo__&&p.call(this.__redo__),this.__nextIndex__=0})}))),n(a.prototype,t.iterator,l(function(){return this}))}}),YU=ze({"node_modules/es6-iterator/array.js"(J,V){"use strict";var p=O2(),b=eM(),E=pp(),k=Tv(),l=aM(),e=Object.defineProperty,t;t=V.exports=function(n,r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");l.call(this,n),r?b.call(r,"key+value")?r="key+value":b.call(r,"key")?r="key":r="value":r="value",e(this,"__kind__",E("",r))},p&&p(t,l),delete t.prototype.constructor,t.prototype=Object.create(l.prototype,{_resolve:E(function(n){return this.__kind__==="value"?this.__list__[n]:this.__kind__==="key+value"?[n,this.__list__[n]]:n})}),e(t.prototype,k.toStringTag,E("c","Array Iterator"))}}),XU=ze({"node_modules/es6-iterator/string.js"(J,V){"use strict";var p=O2(),b=pp(),E=Tv(),k=aM(),l=Object.defineProperty,e;e=V.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),k.call(this,t),l(this,"__length__",b("",t.length))},p&&p(e,k),delete e.prototype.constructor,e.prototype=Object.create(k.prototype,{_next:b(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?n+this.__list__[this.__nextIndex__++]:n)})}),l(e.prototype,E.toStringTag,b("c","String Iterator"))}}),ZU=ze({"node_modules/es6-iterator/is-iterable.js"(J,V){"use strict";var p=ny(),b=wv(),E=iy(),k=Tv().iterator,l=Array.isArray;V.exports=function(e){return b(e)?l(e)||E(e)||p(e)?!0:typeof e[k]=="function":!1}}}),$U=ze({"node_modules/es6-iterator/valid-iterable.js"(J,V){"use strict";var p=ZU();V.exports=function(b){if(!p(b))throw new TypeError(b+" is not iterable");return b}}}),nM=ze({"node_modules/es6-iterator/get.js"(J,V){"use strict";var p=ny(),b=iy(),E=YU(),k=XU(),l=$U(),e=Tv().iterator;V.exports=function(t){return typeof l(t)[e]=="function"?t[e]():p(t)?new E(t):b(t)?new k(t):new E(t)}}}),KU=ze({"node_modules/es6-iterator/for-of.js"(J,V){"use strict";var p=ny(),b=_g(),E=iy(),k=nM(),l=Array.isArray,e=Function.prototype.call,t=Array.prototype.some;V.exports=function(n,r){var a,o=arguments[2],s,c,m,h,v,g,i;if(l(n)||p(n)?a="array":E(n)?a="string":n=k(n),b(r),c=function(){m=!0},a==="array"){t.call(n,function(w){return e.call(r,o,w,c),m});return}if(a==="string"){for(v=n.length,h=0;h=55296&&i<=56319&&(g+=n[++h])),e.call(r,o,g,c),!m);++h);return}for(s=n.next();!s.done;){if(e.call(r,o,s.value,c),m)return;s=n.next()}}}}),JU=ze({"node_modules/es6-weak-map/is-native-implemented.js"(J,V){"use strict";V.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),QU=ze({"node_modules/es6-weak-map/polyfill.js"(J,V){"use strict";var p=wv(),b=O2(),E=sU(),k=dp(),l=lU(),e=pp(),t=nM(),n=KU(),r=Tv().toStringTag,a=JU(),o=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf,h;V.exports=h=function(){var v=arguments[0],g;if(!(this instanceof h))throw new TypeError("Constructor requires 'new'");return g=a&&b&&WeakMap!==h?b(new WeakMap,m(this)):this,p(v)&&(o(v)||(v=t(v))),s(g,"__weakMapData__",e("c","$weakMap$"+l())),v&&n(v,function(i){k(i),g.set(i[0],i[1])}),g},a&&(b&&b(h,WeakMap),h.prototype=Object.create(WeakMap.prototype,{constructor:e(h)})),Object.defineProperties(h.prototype,{delete:e(function(v){return c.call(E(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:e(function(v){if(c.call(E(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:e(function(v){return c.call(E(v),this.__weakMapData__)}),set:e(function(v,g){return s(E(v),this.__weakMapData__,e("c",g)),this}),toString:e(function(){return"[object WeakMap]"})}),s(h.prototype,r,e("c","WeakMap"))}}),iM=ze({"node_modules/es6-weak-map/index.js"(J,V){"use strict";V.exports=nU()()?WeakMap:QU()}}),eq=ze({"node_modules/array-find-index/index.js"(J,V){"use strict";V.exports=function(p,b,E){if(typeof Array.prototype.findIndex=="function")return p.findIndex(b,E);if(typeof b!="function")throw new TypeError("predicate must be a function");var k=Object(p),l=k.length;if(l===0)return-1;for(var e=0;e{this.drawItem(x)});return this},d.prototype.drawItem=function(g,m){let{groups:y}=this,_=y[g];if(typeof m=="number"&&(g=m,_=y[m],m=null),!(_&&_.count&&_.opacity))return;_.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,_,m));let v=[];for(let x=1;x<_.activation.length;x++)!_.activation[x]||_.activation[x]!==!0&&!_.activation[x].data.length||v.push(...this.getMarkerDrawOptions(x,_,m));v.length&&this.drawMarker(v)},d.prototype.getMarkerDrawOptions=function(g,m,y){let{range:_,tree:v,viewport:x,activation:E,selectionBuffer:M,count:C}=m;if(!v)return y?[Object.assign({},m,{markerTexture:this.markerTextures[g],activation:E[g],count:y.length,elements:y,offset:0})]:[Object.assign({},m,{markerTexture:this.markerTextures[g],activation:E[g],offset:0})];let w=[],k=v.range(_,{lod:!0,px:[(_[2]-_[0])/x.width,(_[3]-_[1])/x.height]});if(y){let b=E[g].data,S=new Uint8Array(C);for(let A=0;A{let T=_[k];if(w===void 0)return T;w===null?w={positions:null}:typeof w=="function"?w={ondraw:w}:typeof w[0]=="number"&&(w={positions:w}),w=l(w,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),w.positions===null&&(w.positions=[]),w.tooManyColors!=null&&(this.tooManyColors=w.tooManyColors),T||(_[k]=T={id:k,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:x.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:x.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:x.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:x.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:x.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},w=Object.assign({},d.defaults,w)),w.positions&&!("marker"in w)&&(w.marker=T.marker,delete T.marker),w.marker&&!("positions"in w)&&(w.positions=T.positions,delete T.positions);let b=0,S=0;if(n(T,w,[{snap:!0,size:(A,F)=>(A==null&&(A=d.defaults.size),b+=A&&A.length?1:0,A),borderSize:(A,F)=>(A==null&&(A=d.defaults.borderSize),b+=A&&A.length?1:0,A),opacity:parseFloat,color:(A,F)=>(A==null&&(A=d.defaults.color),A=this.updateColor(A),S++,A),borderColor:(A,F)=>(A==null&&(A=d.defaults.borderColor),A=this.updateColor(A),S++,A),bounds:(A,F,D)=>("range"in D||(D.range=null),A),positions:(A,F,D)=>{let{snap:R}=F,{positionBuffer:P,positionFractBuffer:z,selectionBuffer:I}=F;if(A.x||A.y)return A.x.length?F.xAttr={buffer:x.buffer(A.x),offset:0,stride:4,count:A.x.length}:F.xAttr={buffer:A.x.buffer,offset:A.x.offset*4||0,stride:(A.x.stride||1)*4,count:A.x.count},A.y.length?F.yAttr={buffer:x.buffer(A.y),offset:0,stride:4,count:A.y.length}:F.yAttr={buffer:A.y.buffer,offset:A.y.offset*4||0,stride:(A.y.stride||1)*4,count:A.y.count},F.count=Math.max(F.xAttr.count,F.yAttr.count),A;A=u(A,"float64");let L=F.count=Math.floor(A.length/2),B=F.bounds=L?a(A,2):null;if(!D.range&&!F.range&&(delete F.range,D.range=B),!D.marker&&!F.marker&&(delete F.marker,D.marker=null),R&&(R===!0||L>R)?F.tree=o(A,{bounds:B}):R&&R.length&&(F.tree=R),F.tree){let $={primitive:"points",usage:"static",data:F.tree,type:"uint32"};F.elements?F.elements($):F.elements=x.elements($)}var O=c.float32(A);P({data:O,usage:"dynamic"});var G=c.fract32(A,O);return z({data:G,usage:"dynamic"}),I({data:new Uint8Array(L),type:"uint8",usage:"stream"}),A}},{marker:(A,F,D)=>{let{activation:R}=F;if(R.forEach(P=>P&&P.destroy&&P.destroy()),R.length=0,!A||typeof A[0]=="number"){let P=this.addMarker(A);R[P]=!0}else{let P=[];for(let z=0,I=Math.min(A.length,F.count);z{let R=F.bounds;if(R)return A||(A=R),F.scale=[1/(A[2]-A[0]),1/(A[3]-A[1])],F.translate=[-A[0],-A[1]],F.scaleFract=c.fract(F.scale),F.translateFract=c.fract(F.translate),A},viewport:A=>f(A||[v.drawingBufferWidth,v.drawingBufferHeight])}]),b){let{count:A,size:F,borderSize:D,sizeBuffer:R}=T,P=new Uint8Array(A*2);if(F.length||D.length)for(let z=0;z=0)return v;let x;if(g instanceof Uint8Array||g instanceof Uint8ClampedArray)x=g;else{x=new Uint8Array(g.length);for(let M=0,C=g.length;M_*4&&(this.tooManyColors=!0),this.updatePalette(y),v.length===1?v[0]:v},d.prototype.updatePalette=function(g){if(this.tooManyColors)return;let{maxColors:m,paletteTexture:y}=this,_=Math.ceil(g.length*.25/m);if(_>1){g=g.slice();for(let v=g.length*.25%m;v<_*m;v++)g.push(0,0,0,0)}y.height<_&&y.resize(m,_),y.subimage({width:Math.min(g.length*.25,m),height:_,data:g},0,0)},d.prototype.destroy=function(){return this.groups.forEach(g=>{g.sizeBuffer.destroy(),g.positionBuffer.destroy(),g.positionFractBuffer.destroy(),g.colorBuffer.destroy(),g.activation.forEach(m=>m&&m.destroy&&m.destroy()),g.selectionBuffer.destroy(),g.elements&&g.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(g=>g&&g.destroy&&g.destroy()),this};var p=function(g,m){var y=new h(g,m),_=y.render.bind(y);return Object.assign(_,{render:_,update:y.update.bind(y),draw:y.draw.bind(y),destroy:y.destroy.bind(y),regl:y.regl,gl:y.gl,canvas:y.gl.canvas,groups:y.groups,markers:y.markerCache,palette:y.palette}),_};r.exports=p}}),ku=ye({"node_modules/object-assign/index.js"(e,r){"use strict";var t=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(l){if(l==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(l)}function s(){try{if(!Object.assign)return!1;var l=new String("abc");if(l[5]="de",Object.getOwnPropertyNames(l)[0]==="5")return!1;for(var n={},u=0;u<10;u++)n["_"+String.fromCharCode(u)]=u;var c=Object.getOwnPropertyNames(n).map(function(h){return n[h]});if(c.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(h){f[h]=h}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}r.exports=s()?Object.assign:function(l,n){for(var u,c=o(l),f,h=1;h80*L){X=J=z[0],Z=N=z[1];for(var V=L;VJ&&(J=H),W>N&&(N=W);U=Math.max(J-X,N-Z),U=U!==0?32767/U:0}return o(G,$,L,X,Z,U,0),$}function a(z,I,L,B,O){var G,$;if(O===P(z,I,L,B)>0)for(G=I;G=I;G-=B)$=F(G,z[G],z[G+1],$);return $&&M($,$.next)&&(D($),$=$.next),$}function i(z,I){if(!z)return z;I||(I=z);var L=z,B;do if(B=!1,!L.steiner&&(M(L,L.next)||E(L.prev,L,L.next)===0)){if(D(L),L=I=L.prev,L===L.next)break;B=!0}else L=L.next;while(B||L!==I);return I}function o(z,I,L,B,O,G,$){if(z){!$&&G&&g(z,B,O,G);for(var X=z,Z,J;z.prev!==z.next;){if(Z=z.prev,J=z.next,G?l(z,B,O,G):s(z)){I.push(Z.i/L|0),I.push(z.i/L|0),I.push(J.i/L|0),D(z),z=J.next,X=J.next;continue}if(z=J,z===X){$?$===1?(z=n(i(z),I,L),o(z,I,L,B,O,G,2)):$===2&&u(z,I,L,B,O,G):o(i(z),I,L,B,O,G,1);break}}}}function s(z){var I=z.prev,L=z,B=z.next;if(E(I,L,B)>=0)return!1;for(var O=I.x,G=L.x,$=B.x,X=I.y,Z=L.y,J=B.y,N=OG?O>$?O:$:G>$?G:$,U=X>Z?X>J?X:J:Z>J?Z:J,V=B.next;V!==I;){if(V.x>=N&&V.x<=W&&V.y>=H&&V.y<=U&&v(O,X,G,Z,$,J,V.x,V.y)&&E(V.prev,V,V.next)>=0)return!1;V=V.next}return!0}function l(z,I,L,B){var O=z.prev,G=z,$=z.next;if(E(O,G,$)>=0)return!1;for(var X=O.x,Z=G.x,J=$.x,N=O.y,H=G.y,W=$.y,U=XZ?X>J?X:J:Z>J?Z:J,q=N>H?N>W?N:W:H>W?H:W,Y=y(U,V,I,L,B),K=y(j,q,I,L,B),re=z.prevZ,se=z.nextZ;re&&re.z>=Y&&se&&se.z<=K;){if(re.x>=U&&re.x<=j&&re.y>=V&&re.y<=q&&re!==O&&re!==$&&v(X,N,Z,H,J,W,re.x,re.y)&&E(re.prev,re,re.next)>=0||(re=re.prevZ,se.x>=U&&se.x<=j&&se.y>=V&&se.y<=q&&se!==O&&se!==$&&v(X,N,Z,H,J,W,se.x,se.y)&&E(se.prev,se,se.next)>=0))return!1;se=se.nextZ}for(;re&&re.z>=Y;){if(re.x>=U&&re.x<=j&&re.y>=V&&re.y<=q&&re!==O&&re!==$&&v(X,N,Z,H,J,W,re.x,re.y)&&E(re.prev,re,re.next)>=0)return!1;re=re.prevZ}for(;se&&se.z<=K;){if(se.x>=U&&se.x<=j&&se.y>=V&&se.y<=q&&se!==O&&se!==$&&v(X,N,Z,H,J,W,se.x,se.y)&&E(se.prev,se,se.next)>=0)return!1;se=se.nextZ}return!0}function n(z,I,L){var B=z;do{var O=B.prev,G=B.next.next;!M(O,G)&&C(O,B,B.next,G)&&b(O,G)&&b(G,O)&&(I.push(O.i/L|0),I.push(B.i/L|0),I.push(G.i/L|0),D(B),D(B.next),B=z=G),B=B.next}while(B!==z);return i(B)}function u(z,I,L,B,O,G){var $=z;do{for(var X=$.next.next;X!==$.prev;){if($.i!==X.i&&x($,X)){var Z=A($,X);$=i($,$.next),Z=i(Z,Z.next),o($,I,L,B,O,G,0),o(Z,I,L,B,O,G,0);return}X=X.next}$=$.next}while($!==z)}function c(z,I,L,B){var O=[],G,$,X,Z,J;for(G=0,$=I.length;G<$;G++)X=I[G]*B,Z=G<$-1?I[G+1]*B:z.length,J=a(z,X,Z,B,!1),J===J.next&&(J.steiner=!0),O.push(_(J));for(O.sort(f),G=0;G=L.next.y&&L.next.y!==L.y){var X=L.x+(O-L.y)*(L.next.x-L.x)/(L.next.y-L.y);if(X<=B&&X>G&&(G=X,$=L.x=L.x&&L.x>=J&&B!==L.x&&v(O$.x||L.x===$.x&&p($,L)))&&($=L,H=W)),L=L.next;while(L!==Z);return $}function p(z,I){return E(z.prev,z,I.prev)<0&&E(I.next,z,z.next)<0}function g(z,I,L,B){var O=z;do O.z===0&&(O.z=y(O.x,O.y,I,L,B)),O.prevZ=O.prev,O.nextZ=O.next,O=O.next;while(O!==z);O.prevZ.nextZ=null,O.prevZ=null,m(O)}function m(z){var I,L,B,O,G,$,X,Z,J=1;do{for(L=z,z=null,G=null,$=0;L;){for($++,B=L,X=0,I=0;I0||Z>0&&B;)X!==0&&(Z===0||!B||L.z<=B.z)?(O=L,L=L.nextZ,X--):(O=B,B=B.nextZ,Z--),G?G.nextZ=O:z=O,O.prevZ=G,G=O;L=B}G.nextZ=null,J*=2}while($>1);return z}function y(z,I,L,B,O){return z=(z-L)*O|0,I=(I-B)*O|0,z=(z|z<<8)&16711935,z=(z|z<<4)&252645135,z=(z|z<<2)&858993459,z=(z|z<<1)&1431655765,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,z|I<<1}function _(z){var I=z,L=z;do(I.x=(z-$)*(G-X)&&(z-$)*(B-X)>=(L-$)*(I-X)&&(L-$)*(G-X)>=(O-$)*(B-X)}function x(z,I){return z.next.i!==I.i&&z.prev.i!==I.i&&!T(z,I)&&(b(z,I)&&b(I,z)&&S(z,I)&&(E(z.prev,z,I.prev)||E(z,I.prev,I))||M(z,I)&&E(z.prev,z,z.next)>0&&E(I.prev,I,I.next)>0)}function E(z,I,L){return(I.y-z.y)*(L.x-I.x)-(I.x-z.x)*(L.y-I.y)}function M(z,I){return z.x===I.x&&z.y===I.y}function C(z,I,L,B){var O=k(E(z,I,L)),G=k(E(z,I,B)),$=k(E(L,B,z)),X=k(E(L,B,I));return!!(O!==G&&$!==X||O===0&&w(z,L,I)||G===0&&w(z,B,I)||$===0&&w(L,z,B)||X===0&&w(L,I,B))}function w(z,I,L){return I.x<=Math.max(z.x,L.x)&&I.x>=Math.min(z.x,L.x)&&I.y<=Math.max(z.y,L.y)&&I.y>=Math.min(z.y,L.y)}function k(z){return z>0?1:z<0?-1:0}function T(z,I){var L=z;do{if(L.i!==z.i&&L.next.i!==z.i&&L.i!==I.i&&L.next.i!==I.i&&C(L,L.next,z,I))return!0;L=L.next}while(L!==z);return!1}function b(z,I){return E(z.prev,z,z.next)<0?E(z,I,z.next)>=0&&E(z,z.prev,I)>=0:E(z,I,z.prev)<0||E(z,z.next,I)<0}function S(z,I){var L=z,B=!1,O=(z.x+I.x)/2,G=(z.y+I.y)/2;do L.y>G!=L.next.y>G&&L.next.y!==L.y&&O<(L.next.x-L.x)*(G-L.y)/(L.next.y-L.y)+L.x&&(B=!B),L=L.next;while(L!==z);return B}function A(z,I){var L=new R(z.i,z.x,z.y),B=new R(I.i,I.x,I.y),O=z.next,G=I.prev;return z.next=I,I.prev=z,L.next=O,O.prev=L,B.next=L,L.prev=B,G.next=B,B.prev=G,B}function F(z,I,L,B){var O=new R(z,I,L);return B?(O.next=B.next,O.prev=B,B.next.prev=O,B.next=O):(O.prev=O,O.next=O),O}function D(z){z.next.prev=z.prev,z.prev.next=z.next,z.prevZ&&(z.prevZ.nextZ=z.nextZ),z.nextZ&&(z.nextZ.prevZ=z.prevZ)}function R(z,I,L){this.i=z,this.x=I,this.y=L,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}t.deviation=function(z,I,L,B){var O=I&&I.length,G=O?I[0]*L:z.length,$=Math.abs(P(z,0,G,L));if(O)for(var X=0,Z=I.length;X0&&(B+=z[O-1].length,L.holes.push(B))}return L}}}),nle=ye({"node_modules/array-normalize/index.js"(e,r){"use strict";var t=Km();r.exports=a;function a(i,o,s){if(!i||i.length==null)throw Error("Argument should be an array");o==null&&(o=1),s==null&&(s=t(i,o));for(var l=0;l-1}}}),JP=ye({"node_modules/es5-ext/string/#/contains/index.js"(e,r){"use strict";r.exports=yle()()?String.prototype.contains:_le()}}),b0=ye({"node_modules/d/index.js"(e,r){"use strict";var t=e1(),a=ZP(),i=DM(),o=KP(),s=JP(),l=r.exports=function(n,u){var c,f,h,d,p;return arguments.length<2||typeof n!="string"?(d=u,u=n,n=null):d=arguments[2],t(n)?(c=s.call(n,"c"),f=s.call(n,"e"),h=s.call(n,"w")):(c=h=!0,f=!1),p={value:u,configurable:c,enumerable:f,writable:h},d?i(o(d),p):p};l.gs=function(n,u,c){var f,h,d,p;return typeof n!="string"?(d=c,c=u,u=n,n=null):d=arguments[3],t(u)?a(u)?t(c)?a(c)||(d=c,c=void 0):c=void 0:(d=u,u=c=void 0):u=void 0,t(n)?(f=s.call(n,"c"),h=s.call(n,"e")):(f=!0,h=!1),p={get:u,set:c,configurable:f,enumerable:h},d?i(o(d),p):p}}}),Vb=ye({"node_modules/es5-ext/function/is-arguments.js"(e,r){"use strict";var t=Object.prototype.toString,a=t.call((function(){return arguments})());r.exports=function(i){return t.call(i)===a}}}),Gb=ye({"node_modules/es5-ext/string/is-string.js"(e,r){"use strict";var t=Object.prototype.toString,a=t.call("");r.exports=function(i){return typeof i=="string"||i&&typeof i=="object"&&(i instanceof String||t.call(i)===a)||!1}}}),xle=ye({"node_modules/ext/global-this/is-implemented.js"(e,r){"use strict";r.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),ble=ye({"node_modules/ext/global-this/implementation.js"(e,r){var t=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};r.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}})()}}),Hb=ye({"node_modules/ext/global-this/index.js"(e,r){"use strict";r.exports=xle()()?globalThis:ble()}}),wle=ye({"node_modules/es6-symbol/is-implemented.js"(e,r){"use strict";var t=Hb(),a={object:!0,symbol:!0};r.exports=function(){var i=t.Symbol,o;if(typeof i!="function")return!1;o=i("test symbol");try{String(o)}catch{return!1}return!(!a[typeof i.iterator]||!a[typeof i.toPrimitive]||!a[typeof i.toStringTag])}}}),Ale=ye({"node_modules/es6-symbol/is-symbol.js"(e,r){"use strict";r.exports=function(t){return t?typeof t=="symbol"?!0:!t.constructor||t.constructor.name!=="Symbol"?!1:t[t.constructor.toStringTag]==="Symbol":!1}}}),QP=ye({"node_modules/es6-symbol/validate-symbol.js"(e,r){"use strict";var t=Ale();r.exports=function(a){if(!t(a))throw new TypeError(a+" is not a symbol");return a}}}),Tle=ye({"node_modules/es6-symbol/lib/private/generate-name.js"(e,r){"use strict";var t=b0(),a=Object.create,i=Object.defineProperty,o=Object.prototype,s=a(null);r.exports=function(l){for(var n=0,u,c;s[l+(n||"")];)++n;return l+=n||"",s[l]=!0,u="@@"+l,i(o,u,t.gs(null,function(f){c||(c=!0,i(this,u,t(f)),c=!1)})),u}}}),Mle=ye({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(e,r){"use strict";var t=b0(),a=Hb().Symbol;r.exports=function(i){return Object.defineProperties(i,{hasInstance:t("",a&&a.hasInstance||i("hasInstance")),isConcatSpreadable:t("",a&&a.isConcatSpreadable||i("isConcatSpreadable")),iterator:t("",a&&a.iterator||i("iterator")),match:t("",a&&a.match||i("match")),replace:t("",a&&a.replace||i("replace")),search:t("",a&&a.search||i("search")),species:t("",a&&a.species||i("species")),split:t("",a&&a.split||i("split")),toPrimitive:t("",a&&a.toPrimitive||i("toPrimitive")),toStringTag:t("",a&&a.toStringTag||i("toStringTag")),unscopables:t("",a&&a.unscopables||i("unscopables"))})}}}),Ele=ye({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(e,r){"use strict";var t=b0(),a=QP(),i=Object.create(null);r.exports=function(o){return Object.defineProperties(o,{for:t(function(s){return i[s]?i[s]:i[s]=o(String(s))}),keyFor:t(function(s){var l;a(s);for(l in i)if(i[l]===s)return l})})}}}),Sle=ye({"node_modules/es6-symbol/polyfill.js"(e,r){"use strict";var t=b0(),a=QP(),i=Hb().Symbol,o=Tle(),s=Mle(),l=Ele(),n=Object.create,u=Object.defineProperties,c=Object.defineProperty,f,h,d;if(typeof i=="function")try{String(i()),d=!0}catch{}else i=null;h=function(g){if(this instanceof h)throw new TypeError("Symbol is not a constructor");return f(g)},r.exports=f=function p(g){var m;if(this instanceof p)throw new TypeError("Symbol is not a constructor");return d?i(g):(m=n(h.prototype),g=g===void 0?"":String(g),u(m,{__description__:t("",g),__name__:t("",o(g))}))},s(f),l(f),u(h.prototype,{constructor:t(f),toString:t("",function(){return this.__name__})}),u(f.prototype,{toString:t(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:t(function(){return a(this)})}),c(f.prototype,f.toPrimitive,t("",function(){var p=a(this);return typeof p=="symbol"?p:p.toString()})),c(f.prototype,f.toStringTag,t("c","Symbol")),c(h.prototype,f.toStringTag,t("c",f.prototype[f.toStringTag])),c(h.prototype,f.toPrimitive,t("c",f.prototype[f.toPrimitive]))}}),jv=ye({"node_modules/es6-symbol/index.js"(e,r){"use strict";r.exports=wle()()?Hb().Symbol:Sle()}}),kle=ye({"node_modules/es5-ext/array/#/clear.js"(e,r){"use strict";var t=x0();r.exports=function(){return t(this).length=0,this}}}),qy=ye({"node_modules/es5-ext/object/valid-callable.js"(e,r){"use strict";r.exports=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");return t}}}),Cle=ye({"node_modules/type/string/coerce.js"(e,r){"use strict";var t=e1(),a=XP(),i=Object.prototype.toString;r.exports=function(o){if(!t(o))return null;if(a(o)){var s=o.toString;if(typeof s!="function"||s===i)return null}try{return""+o}catch{return null}}}}),Dle=ye({"node_modules/type/lib/safe-to-string.js"(e,r){"use strict";r.exports=function(t){try{return t.toString()}catch{try{return String(t)}catch{return null}}}}}),Lle=ye({"node_modules/type/lib/to-short-string.js"(e,r){"use strict";var t=Dle(),a=/[\n\r\u2028\u2029]/g;r.exports=function(i){var o=t(i);return o===null?"":(o.length>100&&(o=o.slice(0,99)+"\u2026"),o=o.replace(a,function(s){switch(s){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),o)}}}),Fle=ye({"node_modules/type/lib/resolve-error-message.js"(e,r){"use strict";var t=Cle(),a=Lle();r.exports=function(i,o,s){s&&s.errorMessage&&(i=t(s.errorMessage));var l=i.indexOf("%v"),n=l>-1?a(o):null;if(s&&s.name){var u=i.indexOf("%n");if(u>-1){if(l>-1){var c,f,h,d;return u>l?(c=n,h=l,f=s.name,d=u):(c=s.name,h=u,f=n,d=l),i.slice(0,h)+c+i.slice(h+2,d)+f+i.slice(d+2)}return i.slice(0,u)+s.name+i.slice(u+2)}}return l>-1?i.slice(0,l)+n+i.slice(l+2):i}}}),eI=ye({"node_modules/type/lib/resolve-exception.js"(e,r){"use strict";var t=e1(),a=Fle();r.exports=function(i,o,s){if(s&&!t(i)){if("default"in s)return s.default;if(s.isOptional)return null}var l=s&&s.Error||TypeError,n=new l(a(o,i,s));throw s&&s.errorCode&&(n.code=s.errorCode),n}}}),Ple=ye({"node_modules/type/value/ensure.js"(e,r){"use strict";var t=eI(),a=e1();r.exports=function(i){if(a(i))return i;var o=arguments[1],s=o&&o.name?"Expected a value for %n, received %v":"Cannot use %v";return t(i,s,o)}}}),Ile=ye({"node_modules/type/plain-function/ensure.js"(e,r){"use strict";var t=eI(),a=ZP();r.exports=function(i){if(a(i))return i;var o=arguments[1],s=o&&o.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return t(i,s,o)}}}),Rle=ye({"node_modules/es5-ext/array/from/is-implemented.js"(e,r){"use strict";r.exports=function(){var t=Array.from,a,i;return typeof t!="function"?!1:(a=["raz","dwa"],i=t(a),!!(i&&i!==a&&i[1]==="dwa"))}}}),zle=ye({"node_modules/es5-ext/function/is-function.js"(e,r){"use strict";var t=Object.prototype.toString,a=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);r.exports=function(i){return typeof i=="function"&&a(t.call(i))}}}),Ble=ye({"node_modules/es5-ext/math/sign/is-implemented.js"(e,r){"use strict";r.exports=function(){var t=Math.sign;return typeof t!="function"?!1:t(10)===1&&t(-20)===-1}}}),Ole=ye({"node_modules/es5-ext/math/sign/shim.js"(e,r){"use strict";r.exports=function(t){return t=Number(t),isNaN(t)||t===0?t:t>0?1:-1}}}),Nle=ye({"node_modules/es5-ext/math/sign/index.js"(e,r){"use strict";r.exports=Ble()()?Math.sign:Ole()}}),jle=ye({"node_modules/es5-ext/number/to-integer.js"(e,r){"use strict";var t=Nle(),a=Math.abs,i=Math.floor;r.exports=function(o){return isNaN(o)?0:(o=Number(o),o===0||!isFinite(o)?o:t(o)*i(a(o)))}}}),Ule=ye({"node_modules/es5-ext/number/to-pos-integer.js"(e,r){"use strict";var t=jle(),a=Math.max;r.exports=function(i){return a(0,t(i))}}}),qle=ye({"node_modules/es5-ext/array/from/shim.js"(e,r){"use strict";var t=jv().iterator,a=Vb(),i=zle(),o=Ule(),s=qy(),l=x0(),n=Nv(),u=Gb(),c=Array.isArray,f=Function.prototype.call,h={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;r.exports=function(p){var g=arguments[1],m=arguments[2],y,_,v,x,E,M,C,w,k,T;if(p=Object(l(p)),n(g)&&s(g),!this||this===Array||!i(this)){if(!g){if(a(p))return E=p.length,E!==1?Array.apply(null,p):(x=new Array(1),x[0]=p[0],x);if(c(p)){for(x=new Array(E=p.length),_=0;_=55296&&M<=56319&&(T+=p[++_])),T=g?f.call(g,m,T,v):T,y?(h.value=T,d(x,v,h)):x[v]=T,++v;E=v}}if(E===void 0)for(E=o(p.length),y&&(x=new y(E)),_=0;_=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){u(this,"__redo__",s("c",[h]));return}this.__redo__.forEach(function(d,p){d>=h&&(this.__redo__[p]=++d)},this),this.__redo__.push(h)}}),_onDelete:s(function(h){var d;h>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(d=this.__redo__.indexOf(h),d!==-1&&this.__redo__.splice(d,1),this.__redo__.forEach(function(p,g){p>h&&(this.__redo__[g]=--p)},this)))}),_onClear:s(function(){this.__redo__&&t.call(this.__redo__),this.__nextIndex__=0})}))),u(f.prototype,n.iterator,s(function(){return this}))}}),Xle=ye({"node_modules/es6-iterator/array.js"(e,r){"use strict";var t=CM(),a=JP(),i=b0(),o=jv(),s=tI(),l=Object.defineProperty,n;n=r.exports=function(u,c){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");s.call(this,u),c?a.call(c,"key+value")?c="key+value":a.call(c,"key")?c="key":c="value":c="value",l(this,"__kind__",i("",c))},t&&t(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_resolve:i(function(u){return this.__kind__==="value"?this.__list__[u]:this.__kind__==="key+value"?[u,this.__list__[u]]:u})}),l(n.prototype,o.toStringTag,i("c","Array Iterator"))}}),Zle=ye({"node_modules/es6-iterator/string.js"(e,r){"use strict";var t=CM(),a=b0(),i=jv(),o=tI(),s=Object.defineProperty,l;l=r.exports=function(n){if(!(this instanceof l))throw new TypeError("Constructor requires 'new'");n=String(n),o.call(this,n),s(this,"__length__",a("",n.length))},t&&t(l,o),delete l.prototype.constructor,l.prototype=Object.create(o.prototype,{_next:a(function(){if(this.__list__){if(this.__nextIndex__=55296&&c<=56319?u+this.__list__[this.__nextIndex__++]:u)})}),s(l.prototype,i.toStringTag,a("c","String Iterator"))}}),Kle=ye({"node_modules/es6-iterator/is-iterable.js"(e,r){"use strict";var t=Vb(),a=Nv(),i=Gb(),o=jv().iterator,s=Array.isArray;r.exports=function(l){return a(l)?s(l)||i(l)||t(l)?!0:typeof l[o]=="function":!1}}}),Jle=ye({"node_modules/es6-iterator/valid-iterable.js"(e,r){"use strict";var t=Kle();r.exports=function(a){if(!t(a))throw new TypeError(a+" is not iterable");return a}}}),rI=ye({"node_modules/es6-iterator/get.js"(e,r){"use strict";var t=Vb(),a=Gb(),i=Xle(),o=Zle(),s=Jle(),l=jv().iterator;r.exports=function(n){return typeof s(n)[l]=="function"?n[l]():t(n)?new i(n):a(n)?new o(n):new i(n)}}}),Qle=ye({"node_modules/es6-iterator/for-of.js"(e,r){"use strict";var t=Vb(),a=qy(),i=Gb(),o=rI(),s=Array.isArray,l=Function.prototype.call,n=Array.prototype.some;r.exports=function(u,c){var f,h=arguments[2],d,p,g,m,y,_,v;if(s(u)||t(u)?f="array":i(u)?f="string":u=o(u),a(c),p=function(){g=!0},f==="array"){n.call(u,function(x){return l.call(c,h,x,p),g});return}if(f==="string"){for(y=u.length,m=0;m=55296&&v<=56319&&(_+=u[++m])),l.call(c,h,_,p),!g);++m);return}for(d=u.next();!d.done;){if(l.call(c,h,d.value,p),g)return;d=u.next()}}}}),eue=ye({"node_modules/es6-weak-map/is-native-implemented.js"(e,r){"use strict";r.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()}}),tue=ye({"node_modules/es6-weak-map/polyfill.js"(e,r){"use strict";var t=Nv(),a=CM(),i=ule(),o=x0(),s=cle(),l=b0(),n=rI(),u=Qle(),c=jv().toStringTag,f=eue(),h=Array.isArray,d=Object.defineProperty,p=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf,m;r.exports=m=function(){var y=arguments[0],_;if(!(this instanceof m))throw new TypeError("Constructor requires 'new'");return _=f&&a&&WeakMap!==m?a(new WeakMap,g(this)):this,t(y)&&(h(y)||(y=n(y))),d(_,"__weakMapData__",l("c","$weakMap$"+s())),y&&u(y,function(v){o(v),_.set(v[0],v[1])}),_},f&&(a&&a(m,WeakMap),m.prototype=Object.create(WeakMap.prototype,{constructor:l(m)})),Object.defineProperties(m.prototype,{delete:l(function(y){return p.call(i(y),this.__weakMapData__)?(delete y[this.__weakMapData__],!0):!1}),get:l(function(y){if(p.call(i(y),this.__weakMapData__))return y[this.__weakMapData__]}),has:l(function(y){return p.call(i(y),this.__weakMapData__)}),set:l(function(y,_){return d(i(y),this.__weakMapData__,l("c",_)),this}),toString:l(function(){return"[object WeakMap]"})}),d(m.prototype,c,l("c","WeakMap"))}}),aI=ye({"node_modules/es6-weak-map/index.js"(e,r){"use strict";r.exports=ole()()?WeakMap:tue()}}),rue=ye({"node_modules/array-find-index/index.js"(e,r){"use strict";r.exports=function(t,a,i){if(typeof Array.prototype.findIndex=="function")return t.findIndex(a,i);if(typeof a!="function")throw new TypeError("predicate must be a function");var o=Object(t),s=o.length;if(s===0)return-1;for(var l=0;lA.join==="round"?2:1,miterLimit:S.prop("miterLimit"),scale:S.prop("scale"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),thickness:S.prop("thickness"),dashTexture:S.prop("dashTexture"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),dashLength:S.prop("dashLength"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight],depth:S.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,A)=>!A.overlay},stencil:{enable:!1},scissor:{enable:!0,box:S.prop("viewport")},viewport:S.prop("viewport")},_=S(E({vert:c,frag:m,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},C)),T;try{T=S(E({cull:{enable:!0,face:"back"},vert:g,frag:i,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:S.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},C))}catch{T=_}return{fill:S({primitive:"triangle",elements:(u,A)=>A.triangles,offset:0,vert:h,frag:v,uniforms:{scale:S.prop("scale"),color:S.prop("fill"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:S.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8}},blend:C.blend,depth:{enable:!1},scissor:C.scissor,stencil:C.stencil,viewport:C.viewport}),rect:_,miter:T}},w.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},w.prototype.render=function(...S){S.length&&this.update(...S),this.draw()},w.prototype.draw=function(...S){return(S.length?S:this.passes).forEach((M,C)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>w.precisionThreshold||M.scale[1]*M.viewport.height>w.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=w.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},w.prototype.update=function(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let{regl:M,gl:C}=this;if(S.forEach((T,f)=>{let u=this.passes[f];if(T!==void 0){if(T===null){this.passes[f]=null;return}if(typeof T[0]=="number"&&(T={positions:T}),T=k(T,{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[f]=u={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},T=E({},w.defaults,T)),T.thickness!=null&&(u.thickness=parseFloat(T.thickness)),T.opacity!=null&&(u.opacity=parseFloat(T.opacity)),T.miterLimit!=null&&(u.miterLimit=parseFloat(T.miterLimit)),T.overlay!=null&&(u.overlay=!!T.overlay,fne-se),$=[],Q=0,re=u.hole!=null?u.hole[0]:null;if(re!=null){let ne=s(U,se=>se>=re);U=U.slice(0,ne),U.push(re)}for(let ne=0;neK-re+(U[ne]-Q)),X=e(se,G);X=X.map(K=>K+Q+(K+Q{S.colorBuffer.destroy(),S.positionBuffer.destroy(),S.dashTexture.destroy()}),this.passes.length=0,this}}}),tq=ze({"node_modules/regl-error2d/index.js"(J,V){"use strict";var p=c0(),b=ay(),E=WA(),k=qd(),l=Vc(),e=f0(),{float32:t,fract32:n}=B2();V.exports=a;var r=[[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 a(o,s){if(typeof o=="function"?(s||(s={}),s.regl=o):s=o,s.length&&(s.positions=s),o=s.regl,!o.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=o._gl,m,h,v,g,i,w,S={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return g=o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),h=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),w=o.buffer({usage:"static",type:"float",data:r}),f(s),m=o({vert:` +`;r.exports=x;function x(E,M){if(!(this instanceof x))return new x(E,M);if(typeof E=="function"?(M||(M={}),M.regl=E):M=E,M.length&&(M.positions=M),E=M.regl,!E.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=E._gl,this.regl=E,this.passes=[],this.shaders=x.shaders.has(E)?x.shaders.get(E):x.shaders.set(E,x.createShaders(E)).get(E),this.update(M)}x.dashMult=2,x.maxPatternLength=256,x.precisionThreshold=3e6,x.maxPoints=1e4,x.maxLines=2048,x.shaders=new f,x.createShaders=function(E){let M=E.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),C={primitive:"triangle strip",instances:E.prop("count"),count:4,offset:0,uniforms:{miterMode:(b,S)=>S.join==="round"?2:1,miterLimit:E.prop("miterLimit"),scale:E.prop("scale"),scaleFract:E.prop("scaleFract"),translateFract:E.prop("translateFract"),translate:E.prop("translate"),thickness:E.prop("thickness"),dashTexture:E.prop("dashTexture"),opacity:E.prop("opacity"),pixelRatio:E.context("pixelRatio"),id:E.prop("id"),dashLength:E.prop("dashLength"),viewport:(b,S)=>[S.viewport.x,S.viewport.y,b.viewportWidth,b.viewportHeight],depth:E.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:(b,S)=>!S.overlay},stencil:{enable:!1},scissor:{enable:!0,box:E.prop("viewport")},viewport:E.prop("viewport")},w=E(i({vert:p,frag:g,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:E.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:E.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:E.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},C)),k;try{k=E(i({cull:{enable:!0,face:"back"},vert:_,frag:v,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:E.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:E.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:E.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},C))}catch{k=w}return{fill:E({primitive:"triangle",elements:(b,S)=>S.triangles,offset:0,vert:m,frag:y,uniforms:{scale:E.prop("scale"),color:E.prop("fill"),scaleFract:E.prop("scaleFract"),translateFract:E.prop("translateFract"),translate:E.prop("translate"),opacity:E.prop("opacity"),pixelRatio:E.context("pixelRatio"),id:E.prop("id"),viewport:(b,S)=>[S.viewport.x,S.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{position:{buffer:E.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:E.prop("positionFractBuffer"),stride:8,offset:8}},blend:C.blend,depth:{enable:!1},scissor:C.scissor,stencil:C.stencil,viewport:C.viewport}),rect:w,miter:k}},x.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},x.prototype.render=function(...E){E.length&&this.update(...E),this.draw()},x.prototype.draw=function(...E){return(E.length?E:this.passes).forEach((M,C)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>x.precisionThreshold||M.scale[1]*M.viewport.height>x.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=x.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},x.prototype.update=function(E){if(!E)return;E.length!=null?typeof E[0]=="number"&&(E=[{positions:E}]):Array.isArray(E)||(E=[E]);let{regl:M,gl:C}=this;if(E.forEach((k,T)=>{let b=this.passes[T];if(k!==void 0){if(k===null){this.passes[T]=null;return}if(typeof k[0]=="number"&&(k={positions:k}),k=o(k,{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"}),b||(this.passes[T]=b={id:T,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},k=i({},x.defaults,k)),k.thickness!=null&&(b.thickness=parseFloat(k.thickness)),k.opacity!=null&&(b.opacity=parseFloat(k.opacity)),k.miterLimit!=null&&(b.miterLimit=parseFloat(k.miterLimit)),k.overlay!=null&&(b.overlay=!!k.overlay,TZ-J),G=[],$=0,X=b.hole!=null?b.hole[0]:null;if(X!=null){let Z=d(O,J=>J>=X);O=O.slice(0,Z),O.push(X)}for(let Z=0;ZW-X+(O[Z]-$)),H=l(J,N);H=H.map(W=>W+$+(W+${E.colorBuffer.destroy(),E.positionBuffer.destroy(),E.dashTexture.destroy()}),this.passes.length=0,this}}}),aue=ye({"node_modules/regl-error2d/index.js"(e,r){"use strict";var t=Km(),a=qb(),i=GP(),o=Wp(),s=ku(),l=Jm(),{float32:n,fract32:u}=kM();r.exports=f;var c=[[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 f(h,d){if(typeof h=="function"?(d||(d={}),d.regl=h):d=h,d.length&&(d.positions=d),h=d.regl,!h.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let p=h._gl,g,m,y,_,v,x,E={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return _=h.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),m=h.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),y=h.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=h.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),x=h.buffer({usage:"static",type:"float",data:c}),T(d),g=h({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2615,10 +2615,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:o.prop("range"),lineWidth:o.prop("lineWidth"),capSize:o.prop("capSize"),opacity:o.prop("opacity"),scale:o.prop("scale"),translate:o.prop("translate"),scaleFract:o.prop("scaleFract"),translateFract:o.prop("translateFract"),viewport:(A,x)=>[x.viewport.x,x.viewport.y,A.viewportWidth,A.viewportHeight]},attributes:{color:{buffer:g,offset:(A,x)=>x.offset*4,divisor:1},position:{buffer:h,offset:(A,x)=>x.offset*8,divisor:1},positionFract:{buffer:v,offset:(A,x)=>x.offset*8,divisor:1},error:{buffer:i,offset:(A,x)=>x.offset*16,divisor:1},direction:{buffer:w,stride:24,offset:0},lineOffset:{buffer:w,stride:24,offset:8},capOffset:{buffer:w,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:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:r.length}),l(C,{update:f,draw:_,destroy:u,regl:o,gl:c,canvas:c.canvas,groups:M}),C;function C(A){A?f(A):A===null&&u(),_()}function _(A){if(typeof A=="number")return T(A);A&&!Array.isArray(A)&&(A=[A]),o._refresh(),M.forEach((x,z)=>{if(x){if(A&&(A[z]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}T(z)}})}function T(A){typeof A=="number"&&(A=M[A]),A!=null&&A&&A.count&&A.color&&A.opacity&&A.positions&&A.positions.length>1&&(A.scaleRatio=[A.scale[0]*A.viewport.width,A.scale[1]*A.viewport.height],m(A),A.after&&A.after(A))}function f(A){if(!A)return;A.length!=null?typeof A[0]=="number"&&(A=[{positions:A}]):Array.isArray(A)||(A=[A]);let x=0,z=0;if(C.groups=M=A.map((D,B)=>{let F=M[B];if(D)typeof D=="function"?D={after:D}:typeof D[0]=="number"&&(D={positions:D});else return F;return D=k(D,{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"}),F||(M[B]=F={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},D=l({},S,D)),E(F,D,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=e(P),z+=P.length,P),positions:(P,j)=>(P=e(P,"float64"),j.count=Math.floor(P.length/2),j.bounds=p(P,2),j.offset=x,x+=j.count,P)},{color:(P,j)=>{let U=j.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let Q=P;P=Array(U);for(let re=0;re{let $=j.bounds;return P||(P=$),j.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],j.translate=[-P[0],-P[1]],j.scaleFract=n(j.scale),j.translateFract=n(j.translate),P},viewport:P=>{let j;return Array.isArray(P)?j={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(j={x:P.x||P.left||0,y:P.y||P.top||0},P.right?j.width=P.right-j.x:j.width=P.w||P.width||0,P.bottom?j.height=P.bottom-j.y:j.height=P.h||P.height||0):j={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},j}}]),F}),x||z){let D=M.reduce((j,U,$)=>j+(U?U.count:0),0),B=new Float64Array(D*2),F=new Uint8Array(D*4),P=new Float32Array(D*4);M.forEach((j,U)=>{if(!j)return;let{positions:$,count:Q,offset:re,color:ne,errors:se}=j;Q&&(F.set(ne,re*4),P.set(se,re*4),B.set($,re*2))});var I=t(B);h(I);var O=n(B,I);v(O),g(F),i(P)}}function u(){h.destroy(),v.destroy(),g.destroy(),i.destroy(),w.destroy()}}}}),rq=ze({"node_modules/unquote/index.js"(J,V){var p=/[\'\"]/;V.exports=function(E){return E?(p.test(E.charAt(0))&&(E=E.substr(1)),p.test(E.charAt(E.length-1))&&(E=E.substr(0,E.length-1)),E):""}}}),sM=ze({"node_modules/css-global-keywords/index.json"(J,V){V.exports=["inherit","initial","unset"]}}),lM=ze({"node_modules/css-system-font-keywords/index.json"(J,V){V.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),uM=ze({"node_modules/css-font-weight-keywords/index.json"(J,V){V.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),cM=ze({"node_modules/css-font-style-keywords/index.json"(J,V){V.exports=["normal","italic","oblique"]}}),fM=ze({"node_modules/css-font-stretch-keywords/index.json"(J,V){V.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),aq=ze({"node_modules/parenthesis/index.js"(J,V){"use strict";function p(k,l){if(typeof k!="string")return[k];var e=[k];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],n=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),m=[];function h(v,g,i){var w=e.push(v.slice(s[0].length,-s[1].length))-1;return m.push(w),n+w+n}e.forEach(function(v,g){for(var i,w=0;v!=i;)if(i=v,v=v.replace(c,h),w++>1e4)throw Error("References have circular dependency. Please, check them.");e[g]=v}),m=m.reverse(),e=e.map(function(v){return m.forEach(function(g){v=v.replace(new RegExp("(\\"+n+g+"\\"+n+")","g"),s[0]+"$1"+s[1])}),v})});var a=new RegExp("\\"+n+"([0-9]+)\\"+n);function o(s,c,m){for(var h=[],v,g=0;v=a.exec(s);){if(g++>1e4)throw Error("Circular references in parenthesis");h.push(s.slice(0,v.index)),h.push(o(c[v[1]],c)),s=s.slice(v.index+v[0].length)}return h.push(s),h}return r?e:o(e[0],e)}function b(k,l){if(l&&l.flat){var e=l&&l.escape||"___",t=k[0],n;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),a=0;t!=n;){if(a++>1e4)throw Error("Circular references in "+k);n=t,t=t.replace(r,o)}return t}return k.reduce(function s(c,m){return Array.isArray(m)&&(m=m.reduce(s,"")),c+m},"");function o(s,c){if(k[c]==null)throw Error("Reference "+c+"is undefined");return k[c]}}function E(k,l){return Array.isArray(k)?b(k,l):p(k,l)}E.parse=p,E.stringify=b,V.exports=E}}),nq=ze({"node_modules/string-split-by/index.js"(J,V){"use strict";var p=aq();V.exports=function(E,k,l){if(E==null)throw Error("First argument should be a string");if(k==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=p.parse(E,{flat:!0,brackets:l.ignore}),t=e[0],n=t.split(k);if(l.escape){for(var r=[],a=0;a1&&It===Ut&&(It==='"'||It==="'"))return['"'+t(st.substr(1,st.length-2))+'"'];var ir=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(st);if(ir)return n(st.substr(0,ir.index)).concat(n(ir[1])).concat(n(st.substr(ir.index+ir[0].length)));var dr=st.split(".");if(dr.length===1)return['"'+t(st)+'"'];for(var Ar=[],hr=0;hr"u"?1:window.devicePixelRatio,ta=!1,ka={},Ta=function(ia){},Ra=function(){};if(typeof It=="string"?Ut=document.querySelector(It):typeof It=="object"&&(w(It)?Ut=It:S(It)?(Ar=It,dr=Ar.canvas):("gl"in It?Ar=It.gl:"canvas"in It?dr=C(It.canvas):"container"in It&&(ir=C(It.container)),"attributes"in It&&(hr=It.attributes),"extensions"in It&&(vr=M(It.extensions)),"optionalExtensions"in It&&(Or=M(It.optionalExtensions)),"onDone"in It&&(Ta=It.onDone),"profile"in It&&(ta=!!It.profile),"pixelRatio"in It&&(Cr=+It.pixelRatio),"cachedCode"in It&&(ka=It.cachedCode))),Ut&&(Ut.nodeName.toLowerCase()==="canvas"?dr=Ut:ir=Ut),!Ar){if(!dr){var ua=g(ir||document.body,Ta,Cr);if(!ua)return null;dr=ua.canvas,Ra=ua.onDestroy}hr.premultipliedAlpha===void 0&&(hr.premultipliedAlpha=!0),Ar=i(dr,hr)}return Ar?{gl:Ar,canvas:dr,container:ir,extensions:vr,optionalExtensions:Or,pixelRatio:Cr,profile:ta,cachedCode:ka,onDone:Ta,onDestroy:Ra}:(Ra(),Ta("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(st,It){var Ut={};function ir(hr){var vr=hr.toLowerCase(),Or;try{Or=Ut[vr]=st.getExtension(vr)}catch{}return!!Or}for(var dr=0;dr65535)<<4,st>>>=It,Ut=(st>255)<<3,st>>>=Ut,It|=Ut,Ut=(st>15)<<2,st>>>=Ut,It|=Ut,Ut=(st>3)<<1,st>>>=Ut,It|=Ut,It|st>>1}function P(){var st=f(8,function(){return[]});function It(Ar){var hr=B(Ar),vr=st[F(hr)>>2];return vr.length>0?vr.pop():new ArrayBuffer(hr)}function Ut(Ar){st[F(Ar.byteLength)>>2].push(Ar)}function ir(Ar,hr){var vr=null;switch(Ar){case u:vr=new Int8Array(It(hr),0,hr);break;case A:vr=new Uint8Array(It(hr),0,hr);break;case x:vr=new Int16Array(It(2*hr),0,hr);break;case z:vr=new Uint16Array(It(2*hr),0,hr);break;case I:vr=new Int32Array(It(4*hr),0,hr);break;case O:vr=new Uint32Array(It(4*hr),0,hr);break;case D:vr=new Float32Array(It(4*hr),0,hr);break;default:return null}return vr.length!==hr?vr.subarray(0,hr):vr}function dr(Ar){Ut(Ar.buffer)}return{alloc:It,free:Ut,allocType:ir,freeType:dr}}var j=P();j.zero=P();var U=3408,$=3410,Q=3411,re=3412,ne=3413,se=3414,G=3415,X=33901,K=33902,H=3379,Y=3386,q=34921,Z=36347,ee=36348,ae=35661,he=35660,xe=34930,we=36349,Me=34076,Se=34024,Ie=7936,Ve=7937,Ge=7938,ke=35724,_e=34047,ce=36063,ve=34852,le=3553,Ae=34067,Be=34069,Xe=33984,Ye=6408,yt=5126,gt=5121,Tt=36160,At=36053,$t=36064,rr=16384,_r=function(st,It){var Ut=1;It.ext_texture_filter_anisotropic&&(Ut=st.getParameter(_e));var ir=1,dr=1;It.webgl_draw_buffers&&(ir=st.getParameter(ve),dr=st.getParameter(ce));var Ar=!!It.oes_texture_float;if(Ar){var hr=st.createTexture();st.bindTexture(le,hr),st.texImage2D(le,0,Ye,1,1,0,Ye,yt,null);var vr=st.createFramebuffer();if(st.bindFramebuffer(Tt,vr),st.framebufferTexture2D(Tt,$t,le,hr,0),st.bindTexture(le,null),st.checkFramebufferStatus(Tt)!==At)Ar=!1;else{st.viewport(0,0,1,1),st.clearColor(1,0,0,1),st.clear(rr);var Or=j.allocType(yt,4);st.readPixels(0,0,1,1,Ye,yt,Or),st.getError()?Ar=!1:(st.deleteFramebuffer(vr),st.deleteTexture(hr),Ar=Or[0]===1),j.freeType(Or)}}var Cr=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ta=!0;if(!Cr){var ka=st.createTexture(),Ta=j.allocType(gt,36);st.activeTexture(Xe),st.bindTexture(Ae,ka),st.texImage2D(Be,0,Ye,3,3,0,Ye,gt,Ta),j.freeType(Ta),st.bindTexture(Ae,null),st.deleteTexture(ka),ta=!st.getError()}return{colorBits:[st.getParameter($),st.getParameter(Q),st.getParameter(re),st.getParameter(ne)],depthBits:st.getParameter(se),stencilBits:st.getParameter(G),subpixelBits:st.getParameter(U),extensions:Object.keys(It).filter(function(Ra){return!!It[Ra]}),maxAnisotropic:Ut,maxDrawbuffers:ir,maxColorAttachments:dr,pointSizeDims:st.getParameter(X),lineWidthDims:st.getParameter(K),maxViewportDims:st.getParameter(Y),maxCombinedTextureUnits:st.getParameter(ae),maxCubeMapSize:st.getParameter(Me),maxRenderbufferSize:st.getParameter(Se),maxTextureUnits:st.getParameter(xe),maxTextureSize:st.getParameter(H),maxAttributes:st.getParameter(q),maxVertexUniforms:st.getParameter(Z),maxVertexTextureUnits:st.getParameter(he),maxVaryingVectors:st.getParameter(ee),maxFragmentUniforms:st.getParameter(we),glsl:st.getParameter(ke),renderer:st.getParameter(Ve),vendor:st.getParameter(Ie),version:st.getParameter(Ge),readFloat:Ar,npotTextureCube:ta}},Xt=function(st){return st instanceof Uint8Array||st instanceof Uint16Array||st instanceof Uint32Array||st instanceof Int8Array||st instanceof Int16Array||st instanceof Int32Array||st instanceof Float32Array||st instanceof Float64Array||st instanceof Uint8ClampedArray};function or(st){return!!st&&typeof st=="object"&&Array.isArray(st.shape)&&Array.isArray(st.stride)&&typeof st.offset=="number"&&st.shape.length===st.stride.length&&(Array.isArray(st.data)||Xt(st.data))}var Ot=function(st){return Object.keys(st).map(function(It){return st[It]})},vt={shape:Je,flatten:Ke};function ht(st,It,Ut){for(var ir=0;ir0){var ui;if(Array.isArray(ga[0])){Dn=cr(ga);for(var cn=1,sn=1;sn0){if(typeof cn[0]=="number"){var Rn=j.allocType(za.dtype,cn.length);un(Rn,cn),Dn(Rn,ei),j.freeType(Rn)}else if(Array.isArray(cn[0])||Xt(cn[0])){Pn=cr(cn);var In=ur(cn,Pn,za.dtype);Dn(In,ei),j.freeType(In)}}}else if(or(cn)){Pn=cn.shape;var Jn=cn.stride,Ei=0,so=0,ti=0,bi=0;Pn.length===1?(Ei=Pn[0],so=1,ti=Jn[0],bi=0):Pn.length===2&&(Ei=Pn[0],so=Pn[1],ti=Jn[0],bi=Jn[1]);var Wi=Array.isArray(cn.data)?za.dtype:La(cn.data),ro=j.allocType(Wi,Ei*so);Xa(ro,cn.data,Ei,so,ti,bi,cn.offset),Dn(ro,ei),j.freeType(ro)}return Cn}return da||Cn(ia),Cn._reglType="buffer",Cn._buffer=za,Cn.subdata=ui,Ut.profile&&(Cn.stats=za.stats),Cn.destroy=function(){Ta(za)},Cn}function ua(){Ot(Ar).forEach(function(ia){ia.buffer=st.createBuffer(),st.bindBuffer(ia.type,ia.buffer),st.bufferData(ia.type,ia.persistentData||ia.byteLength,ia.usage)})}return Ut.profile&&(It.getTotalBufferSize=function(){var ia=0;return Object.keys(Ar).forEach(function(ga){ia+=Ar[ga].stats.size}),ia}),{create:Ra,createStream:Or,destroyStream:Cr,clear:function(){Ot(Ar).forEach(Ta),vr.forEach(Ta)},getBuffer:function(ia){return ia&&ia._buffer instanceof hr?ia._buffer:null},restore:ua,_initBuffer:ka}}var Nn=0,yn=0,Un=1,li=1,Yn=4,on=4,en={points:Nn,point:yn,lines:Un,line:li,triangles:Yn,triangle:on,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},vi=0,Yi=1,Ja=4,Oa=5120,lt=5121,rt=5122,fr=5123,lr=5124,Tr=5125,Ir=34963,Dr=35040,ot=35044;function kt(st,It,Ut,ir){var dr={},Ar=0,hr={uint8:lt,uint16:fr};It.oes_element_index_uint&&(hr.uint32=Tr);function vr(ua){this.id=Ar++,dr[this.id]=this,this.buffer=ua,this.primType=Ja,this.vertCount=0,this.type=0}vr.prototype.bind=function(){this.buffer.bind()};var Or=[];function Cr(ua){var ia=Or.pop();return ia||(ia=new vr(Ut.create(null,Ir,!0,!1)._buffer)),ka(ia,ua,Dr,-1,-1,0,0),ia}function ta(ua){Or.push(ua)}function ka(ua,ia,ga,da,Fa,za,Cn){ua.buffer.bind();var Dn;if(ia){var ui=Cn;!Cn&&(!Xt(ia)||or(ia)&&!Xt(ia.data))&&(ui=It.oes_element_index_uint?Tr:fr),Ut._initBuffer(ua.buffer,ia,ga,ui,3)}else st.bufferData(Ir,za,ga),ua.buffer.dtype=Dn||lt,ua.buffer.usage=ga,ua.buffer.dimension=3,ua.buffer.byteLength=za;if(Dn=Cn,!Cn){switch(ua.buffer.dtype){case lt:case Oa:Dn=lt;break;case fr:case rt:Dn=fr;break;case Tr:case lr:Dn=Tr;break;default:}ua.buffer.dtype=Dn}ua.type=Dn;var cn=Fa;cn<0&&(cn=ua.buffer.byteLength,Dn===fr?cn>>=1:Dn===Tr&&(cn>>=2)),ua.vertCount=cn;var sn=da;if(da<0){sn=Ja;var ei=ua.buffer.dimension;ei===1&&(sn=vi),ei===2&&(sn=Yi),ei===3&&(sn=Ja)}ua.primType=sn}function Ta(ua){ir.elementsCount--,delete dr[ua.id],ua.buffer.destroy(),ua.buffer=null}function Ra(ua,ia){var ga=Ut.create(null,Ir,!0),da=new vr(ga._buffer);ir.elementsCount++;function Fa(za){if(!za)ga(),da.primType=Ja,da.vertCount=0,da.type=lt;else if(typeof za=="number")ga(za),da.primType=Ja,da.vertCount=za|0,da.type=lt;else{var Cn=null,Dn=ot,ui=-1,cn=-1,sn=0,ei=0;Array.isArray(za)||Xt(za)||or(za)?Cn=za:("data"in za&&(Cn=za.data),"usage"in za&&(Dn=nr[za.usage]),"primitive"in za&&(ui=en[za.primitive]),"count"in za&&(cn=za.count|0),"type"in za&&(ei=hr[za.type]),"length"in za?sn=za.length|0:(sn=cn,ei===fr||ei===rt?sn*=2:(ei===Tr||ei===lr)&&(sn*=4))),ka(da,Cn,Dn,ui,cn,sn,ei)}return Fa}return Fa(ua),Fa._reglType="elements",Fa._elements=da,Fa.subdata=function(za,Cn){return ga.subdata(za,Cn),Fa},Fa.destroy=function(){Ta(da)},Fa}return{create:Ra,createStream:Cr,destroyStream:ta,getElements:function(ua){return typeof ua=="function"&&ua._elements instanceof vr?ua._elements:null},clear:function(){Ot(dr).forEach(Ta)}}}var jt=new Float32Array(1),ar=new Uint32Array(jt.buffer),Er=5123;function xr(st){for(var It=j.allocType(Er,st.length),Ut=0;Ut>>31<<15,Ar=(ir<<1>>>24)-127,hr=ir>>13&1023;if(Ar<-24)It[Ut]=dr;else if(Ar<-14){var vr=-14-Ar;It[Ut]=dr+(hr+1024>>vr)}else Ar>15?It[Ut]=dr+31744:It[Ut]=dr+(Ar+15<<10)+hr}return It}function zr(st){return Array.isArray(st)||Xt(st)}var Lr=34467,aa=3553,Sa=34067,wa=34069,pn=6408,tn=6406,ai=6407,rn=6409,Ri=6410,Gn=32854,no=32855,Di=36194,fn=32819,Ai=32820,jn=33635,Xn=34042,eo=6402,gi=34041,qi=35904,io=35906,oo=36193,Vn=33776,qn=33777,Hi=33778,Mi=33779,Ro=35986,go=35987,Eo=34798,Ao=35840,ds=35841,jo=35842,Wo=35843,to=36196,wo=5121,pi=5123,Vi=5125,Io=5126,Xi=10242,Ko=10243,Uo=10497,Ls=33071,Ss=33648,Vo=10240,Vs=10241,Ts=9728,Bo=9729,_o=9984,Pi=9985,yo=9986,bs=9987,Dl=33170,hl=4352,ps=4353,dl=4354,wu=34046,lu=3317,xc=37440,Fl=37441,pl=37443,$u=37444,uu=33984,tl=[_o,yo,Pi,bs],vs=[0,rn,Ri,ai,pn],os={};os[rn]=os[tn]=os[eo]=1,os[gi]=os[Ri]=2,os[ai]=os[qi]=3,os[pn]=os[io]=4;function ms(st){return"[object "+st+"]"}var rl=ms("HTMLCanvasElement"),Fu=ms("OffscreenCanvas"),zu=ms("CanvasRenderingContext2D"),Ku=ms("ImageBitmap"),bc=ms("HTMLImageElement"),Lh=ms("HTMLVideoElement"),rh=Object.keys(et).concat([rl,Fu,zu,Ku,bc,Lh]),Ju=[];Ju[wo]=1,Ju[Io]=4,Ju[oo]=2,Ju[pi]=2,Ju[Vi]=4;var ss=[];ss[Gn]=2,ss[no]=2,ss[Di]=2,ss[gi]=4,ss[Vn]=.5,ss[qn]=.5,ss[Hi]=1,ss[Mi]=1,ss[Ro]=.5,ss[go]=1,ss[Eo]=1,ss[Ao]=.5,ss[ds]=.25,ss[jo]=.5,ss[Wo]=.25,ss[to]=.5;function ah(st){return Array.isArray(st)&&(st.length===0||typeof st[0]=="number")}function wc(st){if(!Array.isArray(st))return!1;var It=st.length;return!(It===0||!zr(st[0]))}function pc(st){return Object.prototype.toString.call(st)}function Nf(st){return pc(st)===rl}function Bu(st){return pc(st)===Fu}function Tc(st){return pc(st)===zu}function Ou(st){return pc(st)===Ku}function Gc(st){return pc(st)===bc}function pf(st){return pc(st)===Lh}function $l(st){if(!st)return!1;var It=pc(st);return rh.indexOf(It)>=0?!0:ah(st)||wc(st)||or(st)}function jf(st){return et[Object.prototype.toString.call(st)]|0}function Hc(st,It){var Ut=It.length;switch(st.type){case wo:case pi:case Vi:case Io:var ir=j.allocType(st.type,Ut);ir.set(It),st.data=ir;break;case oo:st.data=xr(It);break;default:}}function Wc(st,It){return j.allocType(st.type===oo?Io:st.type,It)}function Qu(st,It){st.type===oo?(st.data=xr(It),j.freeType(It)):st.data=It}function Yc(st,It,Ut,ir,dr,Ar){for(var hr=st.width,vr=st.height,Or=st.channels,Cr=hr*vr*Or,ta=Wc(st,Cr),ka=0,Ta=0;Ta=1;)vr+=hr*Or*Or,Or/=2;return vr}else return hr*Ut*ir}function Uf(st,It,Ut,ir,dr,Ar,hr){var vr={"don't care":hl,"dont care":hl,nice:dl,fast:ps},Or={repeat:Uo,clamp:Ls,mirror:Ss},Cr={nearest:Ts,linear:Bo},ta=p({mipmap:bs,"nearest mipmap nearest":_o,"linear mipmap nearest":Pi,"nearest mipmap linear":yo,"linear mipmap linear":bs},Cr),ka={none:0,browser:$u},Ta={uint8:wo,rgba4:fn,rgb565:jn,"rgb5 a1":Ai},Ra={alpha:tn,luminance:rn,"luminance alpha":Ri,rgb:ai,rgba:pn,rgba4:Gn,"rgb5 a1":no,rgb565:Di},ua={};It.ext_srgb&&(Ra.srgb=qi,Ra.srgba=io),It.oes_texture_float&&(Ta.float32=Ta.float=Io),It.oes_texture_half_float&&(Ta.float16=Ta["half float"]=oo),It.webgl_depth_texture&&(p(Ra,{depth:eo,"depth stencil":gi}),p(Ta,{uint16:pi,uint32:Vi,"depth stencil":Xn})),It.webgl_compressed_texture_s3tc&&p(ua,{"rgb s3tc dxt1":Vn,"rgba s3tc dxt1":qn,"rgba s3tc dxt3":Hi,"rgba s3tc dxt5":Mi}),It.webgl_compressed_texture_atc&&p(ua,{"rgb atc":Ro,"rgba atc explicit alpha":go,"rgba atc interpolated alpha":Eo}),It.webgl_compressed_texture_pvrtc&&p(ua,{"rgb pvrtc 4bppv1":Ao,"rgb pvrtc 2bppv1":ds,"rgba pvrtc 4bppv1":jo,"rgba pvrtc 2bppv1":Wo}),It.webgl_compressed_texture_etc1&&(ua["rgb etc1"]=to);var ia=Array.prototype.slice.call(st.getParameter(Lr));Object.keys(ua).forEach(function(ra){var Ya=ua[ra];ia.indexOf(Ya)>=0&&(Ra[ra]=Ya)});var ga=Object.keys(Ra);Ut.textureFormats=ga;var da=[];Object.keys(Ra).forEach(function(ra){var Ya=Ra[ra];da[Ya]=ra});var Fa=[];Object.keys(Ta).forEach(function(ra){var Ya=Ta[ra];Fa[Ya]=ra});var za=[];Object.keys(Cr).forEach(function(ra){var Ya=Cr[ra];za[Ya]=ra});var Cn=[];Object.keys(ta).forEach(function(ra){var Ya=ta[ra];Cn[Ya]=ra});var Dn=[];Object.keys(Or).forEach(function(ra){var Ya=Or[ra];Dn[Ya]=ra});var ui=ga.reduce(function(ra,Ya){var Ka=Ra[Ya];return Ka===rn||Ka===tn||Ka===rn||Ka===Ri||Ka===eo||Ka===gi||It.ext_srgb&&(Ka===qi||Ka===io)?ra[Ka]=Ka:Ka===no||Ya.indexOf("rgba")>=0?ra[Ka]=pn:ra[Ka]=ai,ra},{});function cn(){this.internalformat=pn,this.format=pn,this.type=wo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=$u,this.width=0,this.height=0,this.channels=0}function sn(ra,Ya){ra.internalformat=Ya.internalformat,ra.format=Ya.format,ra.type=Ya.type,ra.compressed=Ya.compressed,ra.premultiplyAlpha=Ya.premultiplyAlpha,ra.flipY=Ya.flipY,ra.unpackAlignment=Ya.unpackAlignment,ra.colorSpace=Ya.colorSpace,ra.width=Ya.width,ra.height=Ya.height,ra.channels=Ya.channels}function ei(ra,Ya){if(!(typeof Ya!="object"||!Ya)){if("premultiplyAlpha"in Ya&&(ra.premultiplyAlpha=Ya.premultiplyAlpha),"flipY"in Ya&&(ra.flipY=Ya.flipY),"alignment"in Ya&&(ra.unpackAlignment=Ya.alignment),"colorSpace"in Ya&&(ra.colorSpace=ka[Ya.colorSpace]),"type"in Ya){var Ka=Ya.type;ra.type=Ta[Ka]}var Bi=ra.width,rs=ra.height,Is=ra.channels,Oi=!1;"shape"in Ya?(Bi=Ya.shape[0],rs=Ya.shape[1],Ya.shape.length===3&&(Is=Ya.shape[2],Oi=!0)):("radius"in Ya&&(Bi=rs=Ya.radius),"width"in Ya&&(Bi=Ya.width),"height"in Ya&&(rs=Ya.height),"channels"in Ya&&(Is=Ya.channels,Oi=!0)),ra.width=Bi|0,ra.height=rs|0,ra.channels=Is|0;var Wr=!1;if("format"in Ya){var na=Ya.format,pa=ra.internalformat=Ra[na];ra.format=ui[pa],na in Ta&&("type"in Ya||(ra.type=Ta[na])),na in ua&&(ra.compressed=!0),Wr=!0}!Oi&&Wr?ra.channels=os[ra.format]:Oi&&!Wr&&ra.channels!==vs[ra.format]&&(ra.format=ra.internalformat=vs[ra.channels])}}function Pn(ra){st.pixelStorei(xc,ra.flipY),st.pixelStorei(Fl,ra.premultiplyAlpha),st.pixelStorei(pl,ra.colorSpace),st.pixelStorei(lu,ra.unpackAlignment)}function Rn(){cn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function In(ra,Ya){var Ka=null;if($l(Ya)?Ka=Ya:Ya&&(ei(ra,Ya),"x"in Ya&&(ra.xOffset=Ya.x|0),"y"in Ya&&(ra.yOffset=Ya.y|0),$l(Ya.data)&&(Ka=Ya.data)),Ya.copy){var Bi=dr.viewportWidth,rs=dr.viewportHeight;ra.width=ra.width||Bi-ra.xOffset,ra.height=ra.height||rs-ra.yOffset,ra.needsCopy=!0}else if(!Ka)ra.width=ra.width||1,ra.height=ra.height||1,ra.channels=ra.channels||4;else if(Xt(Ka))ra.channels=ra.channels||4,ra.data=Ka,!("type"in Ya)&&ra.type===wo&&(ra.type=jf(Ka));else if(ah(Ka))ra.channels=ra.channels||4,Hc(ra,Ka),ra.alignment=1,ra.needsFree=!0;else if(or(Ka)){var Is=Ka.data;!Array.isArray(Is)&&ra.type===wo&&(ra.type=jf(Is));var Oi=Ka.shape,Wr=Ka.stride,na,pa,Wa,ln,Le,Ue;Oi.length===3?(Wa=Oi[2],Ue=Wr[2]):(Wa=1,Ue=1),na=Oi[0],pa=Oi[1],ln=Wr[0],Le=Wr[1],ra.alignment=1,ra.width=na,ra.height=pa,ra.channels=Wa,ra.format=ra.internalformat=vs[Wa],ra.needsFree=!0,Yc(ra,Is,ln,Le,Ue,Ka.offset)}else if(Nf(Ka)||Bu(Ka)||Tc(Ka))Nf(Ka)||Bu(Ka)?ra.element=Ka:ra.element=Ka.canvas,ra.width=ra.element.width,ra.height=ra.element.height,ra.channels=4;else if(Ou(Ka))ra.element=Ka,ra.width=Ka.width,ra.height=Ka.height,ra.channels=4;else if(Gc(Ka))ra.element=Ka,ra.width=Ka.naturalWidth,ra.height=Ka.naturalHeight,ra.channels=4;else if(pf(Ka))ra.element=Ka,ra.width=Ka.videoWidth,ra.height=Ka.videoHeight,ra.channels=4;else if(wc(Ka)){var Qe=ra.width||Ka[0].length,_t=ra.height||Ka.length,wt=ra.channels;zr(Ka[0][0])?wt=wt||Ka[0][0].length:wt=wt||1;for(var Lt=vt.shape(Ka),pr=1,Gr=0;Gr>=rs,Ka.height>>=rs,In(Ka,Bi[rs]),ra.mipmask|=1<=0&&!("faces"in Ya)&&(ra.genMipmaps=!0)}if("mag"in Ya){var Bi=Ya.mag;ra.magFilter=Cr[Bi]}var rs=ra.wrapS,Is=ra.wrapT;if("wrap"in Ya){var Oi=Ya.wrap;typeof Oi=="string"?rs=Is=Or[Oi]:Array.isArray(Oi)&&(rs=Or[Oi[0]],Is=Or[Oi[1]])}else{if("wrapS"in Ya){var Wr=Ya.wrapS;rs=Or[Wr]}if("wrapT"in Ya){var na=Ya.wrapT;Is=Or[na]}}if(ra.wrapS=rs,ra.wrapT=Is,"anisotropic"in Ya){var pa=Ya.anisotropic;ra.anisotropic=Ya.anisotropic}if("mipmap"in Ya){var Wa=!1;switch(typeof Ya.mipmap){case"string":ra.mipmapHint=vr[Ya.mipmap],ra.genMipmaps=!0,Wa=!0;break;case"boolean":Wa=ra.genMipmaps=Ya.mipmap;break;case"object":ra.genMipmaps=!1,Wa=!0;break;default:}Wa&&!("min"in Ya)&&(ra.minFilter=_o)}}function $o(ra,Ya){st.texParameteri(Ya,Vs,ra.minFilter),st.texParameteri(Ya,Vo,ra.magFilter),st.texParameteri(Ya,Xi,ra.wrapS),st.texParameteri(Ya,Ko,ra.wrapT),It.ext_texture_filter_anisotropic&&st.texParameteri(Ya,wu,ra.anisotropic),ra.genMipmaps&&(st.hint(Dl,ra.mipmapHint),st.generateMipmap(Ya))}var _s=0,Go={},Ys=Ut.maxTextureUnits,Ll=Array(Ys).map(function(){return null});function mo(ra){cn.call(this),this.mipmask=0,this.internalformat=pn,this.id=_s++,this.refCount=1,this.target=ra,this.texture=st.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Zo,hr.profile&&(this.stats={size:0})}function ru(ra){st.activeTexture(uu),st.bindTexture(ra.target,ra.texture)}function Rs(){var ra=Ll[0];ra?st.bindTexture(ra.target,ra.texture):st.bindTexture(aa,null)}function Yu(ra){var Ya=ra.texture,Ka=ra.unit,Bi=ra.target;Ka>=0&&(st.activeTexture(uu+Ka),st.bindTexture(Bi,null),Ll[Ka]=null),st.deleteTexture(Ya),ra.texture=null,ra.params=null,ra.pixels=null,ra.refCount=0,delete Go[ra.id],Ar.textureCount--}p(mo.prototype,{bind:function(){var ra=this;ra.bindCount+=1;var Ya=ra.unit;if(Ya<0){for(var Ka=0;Ka0)continue;Bi.unit=-1}Ll[Ka]=ra,Ya=Ka;break}Ya>=Ys,hr.profile&&Ar.maxTextureUnits>Le)-Wa,Ue.height=Ue.height||(Ka.height>>Le)-ln,ru(Ka),Ei(Ue,aa,Wa,ln,Le),Rs(),bi(Ue),Bi}function Is(Oi,Wr){var na=Oi|0,pa=Wr|0||na;if(na===Ka.width&&pa===Ka.height)return Bi;Bi.width=Ka.width=na,Bi.height=Ka.height=pa,ru(Ka);for(var Wa=0;Ka.mipmask>>Wa;++Wa){var ln=na>>Wa,Le=pa>>Wa;if(!ln||!Le)break;st.texImage2D(aa,Wa,Ka.format,ln,Le,0,Ka.format,Ka.type,null)}return Rs(),hr.profile&&(Ka.stats.size=Nu(Ka.internalformat,Ka.type,na,pa,!1,!1)),Bi}return Bi(ra,Ya),Bi.subimage=rs,Bi.resize=Is,Bi._reglType="texture2d",Bi._texture=Ka,hr.profile&&(Bi.stats=Ka.stats),Bi.destroy=function(){Ka.decRef()},Bi}function ql(ra,Ya,Ka,Bi,rs,Is){var Oi=new mo(Sa);Go[Oi.id]=Oi,Ar.cubeCount++;var Wr=new Array(6);function na(ln,Le,Ue,Qe,_t,wt){var Lt,pr=Oi.texInfo;for(Zo.call(pr),Lt=0;Lt<6;++Lt)Wr[Lt]=So();if(typeof ln=="number"||!ln){var Gr=ln|0||1;for(Lt=0;Lt<6;++Lt)ro(Wr[Lt],Gr,Gr)}else if(typeof ln=="object")if(Le)Mo(Wr[0],ln),Mo(Wr[1],Le),Mo(Wr[2],Ue),Mo(Wr[3],Qe),Mo(Wr[4],_t),Mo(Wr[5],wt);else if(es(pr,ln),ei(Oi,ln),"faces"in ln){var va=ln.faces;for(Lt=0;Lt<6;++Lt)sn(Wr[Lt],Oi),Mo(Wr[Lt],va[Lt])}else for(Lt=0;Lt<6;++Lt)Mo(Wr[Lt],ln);for(sn(Oi,Wr[0]),pr.genMipmaps?Oi.mipmask=(Wr[0].width<<1)-1:Oi.mipmask=Wr[0].mipmask,Oi.internalformat=Wr[0].internalformat,na.width=Wr[0].width,na.height=Wr[0].height,ru(Oi),Lt=0;Lt<6;++Lt)zs(Wr[Lt],wa+Lt);for($o(pr,Sa),Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,pr.genMipmaps,!0)),na.format=da[Oi.internalformat],na.type=Fa[Oi.type],na.mag=za[pr.magFilter],na.min=Cn[pr.minFilter],na.wrapS=Dn[pr.wrapS],na.wrapT=Dn[pr.wrapT],Lt=0;Lt<6;++Lt)Ws(Wr[Lt]);return na}function pa(ln,Le,Ue,Qe,_t){var wt=Ue|0,Lt=Qe|0,pr=_t|0,Gr=ti();return sn(Gr,Oi),Gr.width=0,Gr.height=0,In(Gr,Le),Gr.width=Gr.width||(Oi.width>>pr)-wt,Gr.height=Gr.height||(Oi.height>>pr)-Lt,ru(Oi),Ei(Gr,wa+ln,wt,Lt,pr),Rs(),bi(Gr),na}function Wa(ln){var Le=ln|0;if(Le!==Oi.width){na.width=Oi.width=Le,na.height=Oi.height=Le,ru(Oi);for(var Ue=0;Ue<6;++Ue)for(var Qe=0;Oi.mipmask>>Qe;++Qe)st.texImage2D(wa+Ue,Qe,Oi.format,Le>>Qe,Le>>Qe,0,Oi.format,Oi.type,null);return Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,!1,!0)),na}}return na(ra,Ya,Ka,Bi,rs,Is),na.subimage=pa,na.resize=Wa,na._reglType="textureCube",na._texture=Oi,hr.profile&&(na.stats=Oi.stats),na.destroy=function(){Oi.decRef()},na}function fo(){for(var ra=0;ra>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);else for(var rs=0;rs<6;++rs)st.texImage2D(wa+rs,Bi,Ka.internalformat,Ka.width>>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);$o(Ka.texInfo,Ka.target)})}function Os(){for(var ra=0;ra=0?Ws=!0:Or.indexOf(Zo)>=0&&(Ws=!1))),("depthTexture"in mo||"depthStencilTexture"in mo)&&(Ll=!!(mo.depthTexture||mo.depthStencilTexture)),"depth"in mo&&(typeof mo.depth=="boolean"?zs=mo.depth:(_s=mo.depth,Bs=!1)),"stencil"in mo&&(typeof mo.stencil=="boolean"?Bs=mo.stencil:(Go=mo.stencil,zs=!1)),"depthStencil"in mo&&(typeof mo.depthStencil=="boolean"?zs=Bs=mo.depthStencil:(Ys=mo.depthStencil,zs=!1,Bs=!1))}var Rs=null,Yu=null,Ul=null,ql=null;if(Array.isArray(So))Rs=So.map(ua);else if(So)Rs=[ua(So)];else for(Rs=new Array($o),Wi=0;Wi<$o;++Wi)Rs[Wi]=ia(ro,Mo,Ws,Zo,es);ro=ro||Rs[0].width,Mo=Mo||Rs[0].height,_s?Yu=ua(_s):zs&&!Bs&&(Yu=ia(ro,Mo,Ll,"depth","uint32")),Go?Ul=ua(Go):Bs&&!zs&&(Ul=ia(ro,Mo,!1,"stencil","uint8")),Ys?ql=ua(Ys):!_s&&!Go&&Bs&&zs&&(ql=ia(ro,Mo,Ll,"depth stencil","depth stencil"));var fo=null;for(Wi=0;Wi0&&(bi.depth=In[0].depth,bi.stencil=In[0].stencil,bi.depthStencil=In[0].depthStencil),In[ti]?In[ti](bi):In[ti]=sn(bi)}return p(Jn,{width:Wi,height:Wi,color:Zo})}function Ei(so){var ti,bi=so|0;if(bi===Jn.width)return Jn;var Wi=Jn.color;for(ti=0;ti=Wi.byteLength?ro.subdata(Wi):(ro.destroy(),sn.buffers[so]=null)),sn.buffers[so]||(ro=sn.buffers[so]=dr.create(ti,hu,!1,!0)),bi.buffer=dr.getBuffer(ro),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1,Jn[so]=1}else dr.getBuffer(ti)?(bi.buffer=dr.getBuffer(ti),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1):dr.getBuffer(ti.buffer)?(bi.buffer=dr.getBuffer(ti.buffer),bi.size=(+ti.size||bi.buffer.dimension)|0,bi.normalized=!!ti.normalized||!1,"type"in ti?bi.type=Kr[ti.type]:bi.type=bi.buffer.dtype,bi.offset=(ti.offset||0)|0,bi.stride=(ti.stride||0)|0,bi.divisor=(ti.divisor||0)|0,bi.state=1):"x"in ti&&(bi.x=+ti.x||0,bi.y=+ti.y||0,bi.z=+ti.z||0,bi.w=+ti.w||0,bi.state=2)}for(var Mo=0;Mo1)for(var Pn=0;Pnia&&(ia=ga.stats.uniformsCount)}),ia},Ut.getMaxAttributesCount=function(){var ia=0;return ta.forEach(function(ga){ga.stats.attributesCount>ia&&(ia=ga.stats.attributesCount)}),ia});function ua(){dr={},Ar={};for(var ia=0;ia16&&(Ut=Da(Ut,st.length*8));for(var ir=Array(16),dr=Array(16),Ar=0;Ar<16;Ar++)ir[Ar]=Ut[Ar]^909522486,dr[Ar]=Ut[Ar]^1549556828;var hr=Da(ir.concat(vc(It)),512+It.length*8);return Ft(Da(dr.concat(hr),768))}function kl(st){for(var It=xf?"0123456789ABCDEF":"0123456789abcdef",Ut="",ir,dr=0;dr>>4&15)+It.charAt(ir&15);return Ut}function kc(st){for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut="",ir=st.length,dr=0;drst.length*8?Ut+=Gf:Ut+=It.charAt(Ar>>>6*(3-hr)&63);return Ut}function Cc(st,It){var Ut=It.length,ir=Array(),dr,Ar,hr,vr,Or=Array(Math.ceil(st.length/2));for(dr=0;dr0;){for(vr=Array(),hr=0,dr=0;dr0||Ar>0)&&(vr[vr.length]=Ar);ir[ir.length]=hr,Or=vr}var Cr="";for(dr=ir.length-1;dr>=0;dr--)Cr+=It.charAt(ir[dr]);var ta=Math.ceil(st.length*8/(Math.log(It.length)/Math.log(2)));for(dr=Cr.length;dr>>6&31,128|ir&63):ir<=65535?It+=String.fromCharCode(224|ir>>>12&15,128|ir>>>6&63,128|ir&63):ir<=2097151&&(It+=String.fromCharCode(240|ir>>>18&7,128|ir>>>12&63,128|ir>>>6&63,128|ir&63));return It}function vc(st){for(var It=Array(st.length>>2),Ut=0;Ut>5]|=(st.charCodeAt(Ut/8)&255)<<24-Ut%32;return It}function Ft(st){for(var It="",Ut=0;Ut>5]>>>24-Ut%32&255);return It}function tr(st,It){return st>>>It|st<<32-It}function Fr(st,It){return st>>>It}function wr(st,It,Ut){return st&It^~st&Ut}function ea(st,It,Ut){return st&It^st&Ut^It&Ut}function ba(st){return tr(st,2)^tr(st,13)^tr(st,22)}function Ia(st){return tr(st,6)^tr(st,11)^tr(st,25)}function Na(st){return tr(st,7)^tr(st,18)^Fr(st,3)}function Za(st){return tr(st,17)^tr(st,19)^Fr(st,10)}var mn=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 Da(st,It){var Ut=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ir=new Array(64),dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia;for(st[It>>5]|=128<<24-It%32,st[(It+64>>9<<4)+15]=It,Ta=0;Ta>16)+(It>>16)+(Ut>>16);return ir<<16|Ut&65535}function $a(st){return Array.prototype.slice.call(st)}function vn(st){return $a(st).join("")}function En(st){var It=st&&st.cache,Ut=0,ir=[],dr=[],Ar=[];function hr(ua,ia){var ga=ia&&ia.stable;if(!ga){for(var da=0;da0&&(ua.push(Fa,"="),ua.push.apply(ua,$a(arguments)),ua.push(";")),Fa}return p(ia,{def:da,toString:function(){return vn([ga.length>0?"var "+ga.join(",")+";":"",vn(ua)])}})}function Or(){var ua=vr(),ia=vr(),ga=ua.toString,da=ia.toString;function Fa(za,Cn){ia(za,Cn,"=",ua.def(za,Cn),";")}return p(function(){ua.apply(ua,$a(arguments))},{def:ua.def,entry:ua,exit:ia,save:Fa,set:function(za,Cn,Dn){Fa(za,Cn),ua(za,Cn,"=",Dn,";")},toString:function(){return ga()+da()}})}function Cr(){var ua=vn(arguments),ia=Or(),ga=Or(),da=ia.toString,Fa=ga.toString;return p(ia,{then:function(){return ia.apply(ia,$a(arguments)),this},else:function(){return ga.apply(ga,$a(arguments)),this},toString:function(){var za=Fa();return za&&(za="else{"+za+"}"),vn(["if(",ua,"){",da(),"}",za])}})}var ta=vr(),ka={};function Ta(ua,ia){var ga=[];function da(){var ui="a"+ga.length;return ga.push(ui),ui}ia=ia||0;for(var Fa=0;Fa[A.viewport.x,A.viewport.y,S.viewportWidth,S.viewportHeight]},attributes:{color:{buffer:_,offset:(S,A)=>A.offset*4,divisor:1},position:{buffer:m,offset:(S,A)=>A.offset*8,divisor:1},positionFract:{buffer:y,offset:(S,A)=>A.offset*8,divisor:1},error:{buffer:v,offset:(S,A)=>A.offset*16,divisor:1},direction:{buffer:x,stride:24,offset:0},lineOffset:{buffer:x,stride:24,offset:8},capOffset:{buffer:x,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:h.prop("viewport")},viewport:h.prop("viewport"),stencil:!1,instances:h.prop("count"),count:c.length}),s(C,{update:T,draw:w,destroy:b,regl:h,gl:p,canvas:p.canvas,groups:M}),C;function C(S){S?T(S):S===null&&b(),w()}function w(S){if(typeof S=="number")return k(S);S&&!Array.isArray(S)&&(S=[S]),h._refresh(),M.forEach((A,F)=>{if(A){if(S&&(S[F]?A.draw=!0:A.draw=!1),!A.draw){A.draw=!0;return}k(F)}})}function k(S){typeof S=="number"&&(S=M[S]),S!=null&&S&&S.count&&S.color&&S.opacity&&S.positions&&S.positions.length>1&&(S.scaleRatio=[S.scale[0]*S.viewport.width,S.scale[1]*S.viewport.height],g(S),S.after&&S.after(S))}function T(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let A=0,F=0;if(C.groups=M=S.map((P,z)=>{let I=M[z];if(P)typeof P=="function"?P={after:P}:typeof P[0]=="number"&&(P={positions:P});else return I;return P=o(P,{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"}),I||(M[z]=I={id:z,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},P=s({},E,P)),i(I,P,[{lineWidth:L=>+L*.5,capSize:L=>+L*.5,opacity:parseFloat,errors:L=>(L=l(L),F+=L.length,L),positions:(L,B)=>(L=l(L,"float64"),B.count=Math.floor(L.length/2),B.bounds=t(L,2),B.offset=A,A+=B.count,L)},{color:(L,B)=>{let O=B.count;if(L||(L="transparent"),!Array.isArray(L)||typeof L[0]=="number"){let $=L;L=Array(O);for(let X=0;X{let G=B.bounds;return L||(L=G),B.scale=[1/(L[2]-L[0]),1/(L[3]-L[1])],B.translate=[-L[0],-L[1]],B.scaleFract=u(B.scale),B.translateFract=u(B.translate),L},viewport:L=>{let B;return Array.isArray(L)?B={x:L[0],y:L[1],width:L[2]-L[0],height:L[3]-L[1]}:L?(B={x:L.x||L.left||0,y:L.y||L.top||0},L.right?B.width=L.right-B.x:B.width=L.w||L.width||0,L.bottom?B.height=L.bottom-B.y:B.height=L.h||L.height||0):B={x:0,y:0,width:p.drawingBufferWidth,height:p.drawingBufferHeight},B}}]),I}),A||F){let P=M.reduce((B,O,G)=>B+(O?O.count:0),0),z=new Float64Array(P*2),I=new Uint8Array(P*4),L=new Float32Array(P*4);M.forEach((B,O)=>{if(!B)return;let{positions:G,count:$,offset:X,color:Z,errors:J}=B;$&&(I.set(Z,X*4),L.set(J,X*4),z.set(G,X*2))});var D=n(z);m(D);var R=u(z,D);y(R),_(I),v(L)}}function b(){m.destroy(),y.destroy(),_.destroy(),v.destroy(),x.destroy()}}}}),iue=ye({"node_modules/unquote/index.js"(e,r){var t=/[\'\"]/;r.exports=function(i){return i?(t.test(i.charAt(0))&&(i=i.substr(1)),t.test(i.charAt(i.length-1))&&(i=i.substr(0,i.length-1)),i):""}}}),nI=ye({"node_modules/css-global-keywords/index.json"(e,r){r.exports=["inherit","initial","unset"]}}),oI=ye({"node_modules/css-system-font-keywords/index.json"(e,r){r.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),sI=ye({"node_modules/css-font-weight-keywords/index.json"(e,r){r.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),lI=ye({"node_modules/css-font-style-keywords/index.json"(e,r){r.exports=["normal","italic","oblique"]}}),uI=ye({"node_modules/css-font-stretch-keywords/index.json"(e,r){r.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),nue=ye({"node_modules/parenthesis/index.js"(e,r){"use strict";function t(o,s){if(typeof o!="string")return[o];var l=[o];typeof s=="string"||Array.isArray(s)?s={brackets:s}:s||(s={});var n=s.brackets?Array.isArray(s.brackets)?s.brackets:[s.brackets]:["{}","[]","()"],u=s.escape||"___",c=!!s.flat;n.forEach(function(d){var p=new RegExp(["\\",d[0],"[^\\",d[0],"\\",d[1],"]*\\",d[1]].join("")),g=[];function m(y,_,v){var x=l.push(y.slice(d[0].length,-d[1].length))-1;return g.push(x),u+x+u}l.forEach(function(y,_){for(var v,x=0;y!=v;)if(v=y,y=y.replace(p,m),x++>1e4)throw Error("References have circular dependency. Please, check them.");l[_]=y}),g=g.reverse(),l=l.map(function(y){return g.forEach(function(_){y=y.replace(new RegExp("(\\"+u+_+"\\"+u+")","g"),d[0]+"$1"+d[1])}),y})});var f=new RegExp("\\"+u+"([0-9]+)\\"+u);function h(d,p,g){for(var m=[],y,_=0;y=f.exec(d);){if(_++>1e4)throw Error("Circular references in parenthesis");m.push(d.slice(0,y.index)),m.push(h(p[y[1]],p)),d=d.slice(y.index+y[0].length)}return m.push(d),m}return c?l:h(l[0],l)}function a(o,s){if(s&&s.flat){var l=s&&s.escape||"___",n=o[0],u;if(!n)return"";for(var c=new RegExp("\\"+l+"([0-9]+)\\"+l),f=0;n!=u;){if(f++>1e4)throw Error("Circular references in "+o);u=n,n=n.replace(c,h)}return n}return o.reduce(function d(p,g){return Array.isArray(g)&&(g=g.reduce(d,"")),p+g},"");function h(d,p){if(o[p]==null)throw Error("Reference "+p+"is undefined");return o[p]}}function i(o,s){return Array.isArray(o)?a(o,s):t(o,s)}i.parse=t,i.stringify=a,r.exports=i}}),oue=ye({"node_modules/string-split-by/index.js"(e,r){"use strict";var t=nue();r.exports=function(i,o,s){if(i==null)throw Error("First argument should be a string");if(o==null)throw Error("Separator should be a string or a RegExp");s?(typeof s=="string"||Array.isArray(s))&&(s={ignore:s}):s={},s.escape==null&&(s.escape=!0),s.ignore==null?s.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof s.ignore=="string"&&(s.ignore=[s.ignore]),s.ignore=s.ignore.map(function(p){return p.length===1&&(p=p+p),p}));var l=t.parse(i,{flat:!0,brackets:s.ignore}),n=l[0],u=n.split(o);if(s.escape){for(var c=[],f=0;f1&&nr===fr&&(nr==='"'||nr==="'"))return['"'+n(xt.substr(1,xt.length-2))+'"'];var Or=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(xt);if(Or)return u(xt.substr(0,Or.index)).concat(u(Or[1])).concat(u(xt.substr(Or.index+Or[0].length)));var Xr=xt.split(".");if(Xr.length===1)return['"'+n(xt)+'"'];for(var aa=[],Wr=0;Wr"u"?1:window.devicePixelRatio,Na=!1,Ji={},ki=function(Ir){},ii=function(){};if(typeof nr=="string"?fr=document.querySelector(nr):typeof nr=="object"&&(x(nr)?fr=nr:E(nr)?(aa=nr,Xr=aa.canvas):("gl"in nr?aa=nr.gl:"canvas"in nr?Xr=C(nr.canvas):"container"in nr&&(Or=C(nr.container)),"attributes"in nr&&(Wr=nr.attributes),"extensions"in nr&&(wa=M(nr.extensions)),"optionalExtensions"in nr&&(za=M(nr.optionalExtensions)),"onDone"in nr&&(ki=nr.onDone),"profile"in nr&&(Na=!!nr.profile),"pixelRatio"in nr&&(Ba=+nr.pixelRatio),"cachedCode"in nr&&(Ji=nr.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?Xr=fr:Or=fr),!aa){if(!Xr){var ma=_(Or||document.body,ki,Ba);if(!ma)return null;Xr=ma.canvas,ii=ma.onDestroy}Wr.premultipliedAlpha===void 0&&(Wr.premultipliedAlpha=!0),aa=v(Xr,Wr)}return aa?{gl:aa,canvas:Xr,container:Or,extensions:wa,optionalExtensions:za,pixelRatio:Ba,profile:Na,cachedCode:Ji,onDone:ki,onDestroy:ii}:(ii(),ki("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function k(xt,nr){var fr={};function Or(Wr){var wa=Wr.toLowerCase(),za;try{za=fr[wa]=xt.getExtension(wa)}catch{}return!!za}for(var Xr=0;Xr65535)<<4,xt>>>=nr,fr=(xt>255)<<3,xt>>>=fr,nr|=fr,fr=(xt>15)<<2,xt>>>=fr,nr|=fr,fr=(xt>3)<<1,xt>>>=fr,nr|=fr,nr|xt>>1}function L(){var xt=T(8,function(){return[]});function nr(aa){var Wr=z(aa),wa=xt[I(Wr)>>2];return wa.length>0?wa.pop():new ArrayBuffer(Wr)}function fr(aa){xt[I(aa.byteLength)>>2].push(aa)}function Or(aa,Wr){var wa=null;switch(aa){case b:wa=new Int8Array(nr(Wr),0,Wr);break;case S:wa=new Uint8Array(nr(Wr),0,Wr);break;case A:wa=new Int16Array(nr(2*Wr),0,Wr);break;case F:wa=new Uint16Array(nr(2*Wr),0,Wr);break;case D:wa=new Int32Array(nr(4*Wr),0,Wr);break;case R:wa=new Uint32Array(nr(4*Wr),0,Wr);break;case P:wa=new Float32Array(nr(4*Wr),0,Wr);break;default:return null}return wa.length!==Wr?wa.subarray(0,Wr):wa}function Xr(aa){fr(aa.buffer)}return{alloc:nr,free:fr,allocType:Or,freeType:Xr}}var B=L();B.zero=L();var O=3408,G=3410,$=3411,X=3412,Z=3413,J=3414,N=3415,H=33901,W=33902,U=3379,V=3386,j=34921,q=36347,Y=36348,K=35661,re=35660,se=34930,le=36349,ue=34076,fe=34024,pe=7936,we=7937,xe=7938,he=35724,oe=34047,te=36063,ie=34852,ee=3553,ce=34067,_e=34069,Se=33984,Me=6408,Ue=5126,Ge=5121,Ze=36160,Ke=36053,dt=36064,_t=16384,Pt=function(xt,nr){var fr=1;nr.ext_texture_filter_anisotropic&&(fr=xt.getParameter(oe));var Or=1,Xr=1;nr.webgl_draw_buffers&&(Or=xt.getParameter(ie),Xr=xt.getParameter(te));var aa=!!nr.oes_texture_float;if(aa){var Wr=xt.createTexture();xt.bindTexture(ee,Wr),xt.texImage2D(ee,0,Me,1,1,0,Me,Ue,null);var wa=xt.createFramebuffer();if(xt.bindFramebuffer(Ze,wa),xt.framebufferTexture2D(Ze,dt,ee,Wr,0),xt.bindTexture(ee,null),xt.checkFramebufferStatus(Ze)!==Ke)aa=!1;else{xt.viewport(0,0,1,1),xt.clearColor(1,0,0,1),xt.clear(_t);var za=B.allocType(Ue,4);xt.readPixels(0,0,1,1,Me,Ue,za),xt.getError()?aa=!1:(xt.deleteFramebuffer(wa),xt.deleteTexture(Wr),aa=za[0]===1),B.freeType(za)}}var Ba=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Na=!0;if(!Ba){var Ji=xt.createTexture(),ki=B.allocType(Ge,36);xt.activeTexture(Se),xt.bindTexture(ce,Ji),xt.texImage2D(_e,0,Me,3,3,0,Me,Ge,ki),B.freeType(ki),xt.bindTexture(ce,null),xt.deleteTexture(Ji),Na=!xt.getError()}return{colorBits:[xt.getParameter(G),xt.getParameter($),xt.getParameter(X),xt.getParameter(Z)],depthBits:xt.getParameter(J),stencilBits:xt.getParameter(N),subpixelBits:xt.getParameter(O),extensions:Object.keys(nr).filter(function(ii){return!!nr[ii]}),maxAnisotropic:fr,maxDrawbuffers:Or,maxColorAttachments:Xr,pointSizeDims:xt.getParameter(H),lineWidthDims:xt.getParameter(W),maxViewportDims:xt.getParameter(V),maxCombinedTextureUnits:xt.getParameter(K),maxCubeMapSize:xt.getParameter(ue),maxRenderbufferSize:xt.getParameter(fe),maxTextureUnits:xt.getParameter(se),maxTextureSize:xt.getParameter(U),maxAttributes:xt.getParameter(j),maxVertexUniforms:xt.getParameter(q),maxVertexTextureUnits:xt.getParameter(re),maxVaryingVectors:xt.getParameter(Y),maxFragmentUniforms:xt.getParameter(le),glsl:xt.getParameter(he),renderer:xt.getParameter(we),vendor:xt.getParameter(pe),version:xt.getParameter(xe),readFloat:aa,npotTextureCube:Na}},vt=function(xt){return xt instanceof Uint8Array||xt instanceof Uint16Array||xt instanceof Uint32Array||xt instanceof Int8Array||xt instanceof Int16Array||xt instanceof Int32Array||xt instanceof Float32Array||xt instanceof Float64Array||xt instanceof Uint8ClampedArray};function Tt(xt){return!!xt&&typeof xt=="object"&&Array.isArray(xt.shape)&&Array.isArray(xt.stride)&&typeof xt.offset=="number"&&xt.shape.length===xt.stride.length&&(Array.isArray(xt.data)||vt(xt.data))}var st=function(xt){return Object.keys(xt).map(function(nr){return xt[nr]})},Ve={shape:Ce,flatten:De};function Ye(xt,nr,fr){for(var Or=0;Or0){var an;if(Array.isArray(fa[0])){oi=kt(fa);for(var Aa=1,ga=1;ga0){if(typeof Aa[0]=="number"){var $a=B.allocType(Ta.dtype,Aa.length);la($a,Aa),oi($a,wi),B.freeType($a)}else if(Array.isArray(Aa[0])||vt(Aa[0])){ri=kt(Aa);var Ja=Dt(Aa,ri,Ta.dtype);oi(Ja,wi),B.freeType(Ja)}}}else if(Tt(Aa)){ri=Aa.shape;var Ai=Aa.stride,nn=0,Ln=0,fi=0,zi=0;ri.length===1?(nn=ri[0],Ln=1,fi=Ai[0],zi=0):ri.length===2&&(nn=ri[0],Ln=ri[1],fi=Ai[0],zi=Ai[1]);var Sn=Array.isArray(Aa.data)?Ta.dtype:Fr(Aa.data),kn=B.allocType(Sn,nn*Ln);Hr(kn,Aa.data,nn,Ln,fi,zi,Aa.offset),oi(kn,wi),B.freeType(kn)}return hi}return Pa||hi(Ir),hi._reglType="buffer",hi._buffer=Ta,hi.subdata=an,fr.profile&&(hi.stats=Ta.stats),hi.destroy=function(){ki(Ta)},hi}function ma(){st(aa).forEach(function(Ir){Ir.buffer=xt.createBuffer(),xt.bindBuffer(Ir.type,Ir.buffer),xt.bufferData(Ir.type,Ir.persistentData||Ir.byteLength,Ir.usage)})}return fr.profile&&(nr.getTotalBufferSize=function(){var Ir=0;return Object.keys(aa).forEach(function(fa){Ir+=aa[fa].stats.size}),Ir}),{create:ii,createStream:za,destroyStream:Ba,clear:function(){st(aa).forEach(ki),wa.forEach(ki)},getBuffer:function(Ir){return Ir&&Ir._buffer instanceof Wr?Ir._buffer:null},restore:ma,_initBuffer:Ji}}var Oa=0,Da=0,_i=1,ti=1,Ka=4,ia=4,na={points:Oa,point:Da,lines:_i,line:ti,triangles:Ka,triangle:ia,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},xi=0,Yi=1,Qr=4,Nr=5120,Oe=5121,Ie=5122,Et=5123,Mt=5124,zt=5125,Gt=34963,Ht=35040,Be=35044;function et(xt,nr,fr,Or){var Xr={},aa=0,Wr={uint8:Oe,uint16:Et};nr.oes_element_index_uint&&(Wr.uint32=zt);function wa(ma){this.id=aa++,Xr[this.id]=this,this.buffer=ma,this.primType=Qr,this.vertCount=0,this.type=0}wa.prototype.bind=function(){this.buffer.bind()};var za=[];function Ba(ma){var Ir=za.pop();return Ir||(Ir=new wa(fr.create(null,Gt,!0,!1)._buffer)),Ji(Ir,ma,Ht,-1,-1,0,0),Ir}function Na(ma){za.push(ma)}function Ji(ma,Ir,fa,Pa,Ha,Ta,hi){ma.buffer.bind();var oi;if(Ir){var an=hi;!hi&&(!vt(Ir)||Tt(Ir)&&!vt(Ir.data))&&(an=nr.oes_element_index_uint?zt:Et),fr._initBuffer(ma.buffer,Ir,fa,an,3)}else xt.bufferData(Gt,Ta,fa),ma.buffer.dtype=oi||Oe,ma.buffer.usage=fa,ma.buffer.dimension=3,ma.buffer.byteLength=Ta;if(oi=hi,!hi){switch(ma.buffer.dtype){case Oe:case Nr:oi=Oe;break;case Et:case Ie:oi=Et;break;case zt:case Mt:oi=zt;break;default:}ma.buffer.dtype=oi}ma.type=oi;var Aa=Ha;Aa<0&&(Aa=ma.buffer.byteLength,oi===Et?Aa>>=1:oi===zt&&(Aa>>=2)),ma.vertCount=Aa;var ga=Pa;if(Pa<0){ga=Qr;var wi=ma.buffer.dimension;wi===1&&(ga=xi),wi===2&&(ga=Yi),wi===3&&(ga=Qr)}ma.primType=ga}function ki(ma){Or.elementsCount--,delete Xr[ma.id],ma.buffer.destroy(),ma.buffer=null}function ii(ma,Ir){var fa=fr.create(null,Gt,!0),Pa=new wa(fa._buffer);Or.elementsCount++;function Ha(Ta){if(!Ta)fa(),Pa.primType=Qr,Pa.vertCount=0,Pa.type=Oe;else if(typeof Ta=="number")fa(Ta),Pa.primType=Qr,Pa.vertCount=Ta|0,Pa.type=Oe;else{var hi=null,oi=Be,an=-1,Aa=-1,ga=0,wi=0;Array.isArray(Ta)||vt(Ta)||Tt(Ta)?hi=Ta:("data"in Ta&&(hi=Ta.data),"usage"in Ta&&(oi=St[Ta.usage]),"primitive"in Ta&&(an=na[Ta.primitive]),"count"in Ta&&(Aa=Ta.count|0),"type"in Ta&&(wi=Wr[Ta.type]),"length"in Ta?ga=Ta.length|0:(ga=Aa,wi===Et||wi===Ie?ga*=2:(wi===zt||wi===Mt)&&(ga*=4))),Ji(Pa,hi,oi,an,Aa,ga,wi)}return Ha}return Ha(ma),Ha._reglType="elements",Ha._elements=Pa,Ha.subdata=function(Ta,hi){return fa.subdata(Ta,hi),Ha},Ha.destroy=function(){ki(Pa)},Ha}return{create:ii,createStream:Ba,destroyStream:Na,getElements:function(ma){return typeof ma=="function"&&ma._elements instanceof wa?ma._elements:null},clear:function(){st(Xr).forEach(ki)}}}var ut=new Float32Array(1),bt=new Uint32Array(ut.buffer),Ot=5123;function It(xt){for(var nr=B.allocType(Ot,xt.length),fr=0;fr>>31<<15,aa=(Or<<1>>>24)-127,Wr=Or>>13&1023;if(aa<-24)nr[fr]=Xr;else if(aa<-14){var wa=-14-aa;nr[fr]=Xr+(Wr+1024>>wa)}else aa>15?nr[fr]=Xr+31744:nr[fr]=Xr+(aa+15<<10)+Wr}return nr}function Wt(xt){return Array.isArray(xt)||vt(xt)}var jt=34467,sr=3553,kr=34067,Mr=34069,ua=6408,ra=6406,ni=6407,Ca=6409,Li=6410,Va=32854,dn=32855,rn=36194,pa=32819,_n=32820,Zi=33635,Fi=34042,xn=6402,Ni=34041,un=35904,jn=35906,bn=36193,Wa=33776,ui=33777,Hi=33778,Vi=33779,$n=35986,ro=35987,Un=34798,Kn=35840,To=35841,Jn=35842,qn=35843,Fo=36196,zn=5121,wn=5123,os=5125,uo=5126,Yn=10242,go=10243,Cn=10497,Xo=33071,gs=33648,yo=10240,sl=10241,ss=9728,oo=9729,Bn=9984,An=9985,Po=9986,Bl=9987,Lu=33170,Jl=4352,Fu=4353,Pu=4354,Ku=34046,mu=3317,$c=37440,Ju=37441,Ol=37443,Yc=37444,Qu=33984,Sl=[Bn,Po,An,Bl],cs=[0,Ca,Li,ni,ua],Qo={};Qo[Ca]=Qo[ra]=Qo[xn]=1,Qo[Ni]=Qo[Li]=2,Qo[ni]=Qo[un]=3,Qo[ua]=Qo[jn]=4;function ml(xt){return"[object "+xt+"]"}var Xc=ml("HTMLCanvasElement"),Zc=ml("OffscreenCanvas"),kc=ml("CanvasRenderingContext2D"),ed=ml("ImageBitmap"),td=ml("HTMLImageElement"),bp=ml("HTMLVideoElement"),t0=Object.keys(Fe).concat([Xc,Zc,kc,ed,td,bp]),ec=[];ec[zn]=1,ec[uo]=4,ec[bn]=2,ec[wn]=2,ec[os]=4;var ys=[];ys[Va]=2,ys[dn]=2,ys[rn]=2,ys[Ni]=4,ys[Wa]=.5,ys[ui]=.5,ys[Hi]=1,ys[Vi]=1,ys[$n]=.5,ys[ro]=1,ys[Un]=1,ys[Kn]=.5,ys[To]=.25,ys[Jn]=.5,ys[qn]=.25,ys[Fo]=.5;function rd(xt){return Array.isArray(xt)&&(xt.length===0||typeof xt[0]=="number")}function Hf(xt){if(!Array.isArray(xt))return!1;var nr=xt.length;return!(nr===0||!Wt(xt[0]))}function Kc(xt){return Object.prototype.toString.call(xt)}function ad(xt){return Kc(xt)===Xc}function Jc(xt){return Kc(xt)===Zc}function Tf(xt){return Kc(xt)===kc}function tc(xt){return Kc(xt)===ed}function Wf(xt){return Kc(xt)===td}function xh(xt){return Kc(xt)===bp}function Qc(xt){if(!xt)return!1;var nr=Kc(xt);return t0.indexOf(nr)>=0?!0:rd(xt)||Hf(xt)||Tt(xt)}function Wd(xt){return Fe[Object.prototype.toString.call(xt)]|0}function bh(xt,nr){var fr=nr.length;switch(xt.type){case zn:case wn:case os:case uo:var Or=B.allocType(xt.type,fr);Or.set(nr),xt.data=Or;break;case bn:xt.data=It(nr);break;default:}}function wp(xt,nr){return B.allocType(xt.type===bn?uo:xt.type,nr)}function rc(xt,nr){xt.type===bn?(xt.data=It(nr),B.freeType(nr)):xt.data=nr}function id(xt,nr,fr,Or,Xr,aa){for(var Wr=xt.width,wa=xt.height,za=xt.channels,Ba=Wr*wa*za,Na=wp(xt,Ba),Ji=0,ki=0;ki=1;)wa+=Wr*za*za,za/=2;return wa}else return Wr*fr*Or}function wh(xt,nr,fr,Or,Xr,aa,Wr){var wa={"don't care":Jl,"dont care":Jl,nice:Pu,fast:Fu},za={repeat:Cn,clamp:Xo,mirror:gs},Ba={nearest:ss,linear:oo},Na=t({mipmap:Bl,"nearest mipmap nearest":Bn,"linear mipmap nearest":An,"nearest mipmap linear":Po,"linear mipmap linear":Bl},Ba),Ji={none:0,browser:Yc},ki={uint8:zn,rgba4:pa,rgb565:Zi,"rgb5 a1":_n},ii={alpha:ra,luminance:Ca,"luminance alpha":Li,rgb:ni,rgba:ua,rgba4:Va,"rgb5 a1":dn,rgb565:rn},ma={};nr.ext_srgb&&(ii.srgb=un,ii.srgba=jn),nr.oes_texture_float&&(ki.float32=ki.float=uo),nr.oes_texture_half_float&&(ki.float16=ki["half float"]=bn),nr.webgl_depth_texture&&(t(ii,{depth:xn,"depth stencil":Ni}),t(ki,{uint16:wn,uint32:os,"depth stencil":Fi})),nr.webgl_compressed_texture_s3tc&&t(ma,{"rgb s3tc dxt1":Wa,"rgba s3tc dxt1":ui,"rgba s3tc dxt3":Hi,"rgba s3tc dxt5":Vi}),nr.webgl_compressed_texture_atc&&t(ma,{"rgb atc":$n,"rgba atc explicit alpha":ro,"rgba atc interpolated alpha":Un}),nr.webgl_compressed_texture_pvrtc&&t(ma,{"rgb pvrtc 4bppv1":Kn,"rgb pvrtc 2bppv1":To,"rgba pvrtc 4bppv1":Jn,"rgba pvrtc 2bppv1":qn}),nr.webgl_compressed_texture_etc1&&(ma["rgb etc1"]=Fo);var Ir=Array.prototype.slice.call(xt.getParameter(jt));Object.keys(ma).forEach(function(ur){var Kr=ma[ur];Ir.indexOf(Kr)>=0&&(ii[ur]=Kr)});var fa=Object.keys(ii);fr.textureFormats=fa;var Pa=[];Object.keys(ii).forEach(function(ur){var Kr=ii[ur];Pa[Kr]=ur});var Ha=[];Object.keys(ki).forEach(function(ur){var Kr=ki[ur];Ha[Kr]=ur});var Ta=[];Object.keys(Ba).forEach(function(ur){var Kr=Ba[ur];Ta[Kr]=ur});var hi=[];Object.keys(Na).forEach(function(ur){var Kr=Na[ur];hi[Kr]=ur});var oi=[];Object.keys(za).forEach(function(ur){var Kr=za[ur];oi[Kr]=ur});var an=fa.reduce(function(ur,Kr){var Jr=ii[Kr];return Jr===Ca||Jr===ra||Jr===Ca||Jr===Li||Jr===xn||Jr===Ni||nr.ext_srgb&&(Jr===un||Jr===jn)?ur[Jr]=Jr:Jr===dn||Kr.indexOf("rgba")>=0?ur[Jr]=ua:ur[Jr]=ni,ur},{});function Aa(){this.internalformat=ua,this.format=ua,this.type=zn,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Yc,this.width=0,this.height=0,this.channels=0}function ga(ur,Kr){ur.internalformat=Kr.internalformat,ur.format=Kr.format,ur.type=Kr.type,ur.compressed=Kr.compressed,ur.premultiplyAlpha=Kr.premultiplyAlpha,ur.flipY=Kr.flipY,ur.unpackAlignment=Kr.unpackAlignment,ur.colorSpace=Kr.colorSpace,ur.width=Kr.width,ur.height=Kr.height,ur.channels=Kr.channels}function wi(ur,Kr){if(!(typeof Kr!="object"||!Kr)){if("premultiplyAlpha"in Kr&&(ur.premultiplyAlpha=Kr.premultiplyAlpha),"flipY"in Kr&&(ur.flipY=Kr.flipY),"alignment"in Kr&&(ur.unpackAlignment=Kr.alignment),"colorSpace"in Kr&&(ur.colorSpace=Ji[Kr.colorSpace]),"type"in Kr){var Jr=Kr.type;ur.type=ki[Jr]}var Gi=ur.width,Eo=ur.height,ds=ur.channels,Ui=!1;"shape"in Kr?(Gi=Kr.shape[0],Eo=Kr.shape[1],Kr.shape.length===3&&(ds=Kr.shape[2],Ui=!0)):("radius"in Kr&&(Gi=Eo=Kr.radius),"width"in Kr&&(Gi=Kr.width),"height"in Kr&&(Eo=Kr.height),"channels"in Kr&&(ds=Kr.channels,Ui=!0)),ur.width=Gi|0,ur.height=Eo|0,ur.channels=ds|0;var tr=!1;if("format"in Kr){var hr=Kr.format,_r=ur.internalformat=ii[hr];ur.format=an[_r],hr in ki&&("type"in Kr||(ur.type=ki[hr])),hr in ma&&(ur.compressed=!0),tr=!0}!Ui&&tr?ur.channels=Qo[ur.format]:Ui&&!tr&&ur.channels!==cs[ur.format]&&(ur.format=ur.internalformat=cs[ur.channels])}}function ri(ur){xt.pixelStorei($c,ur.flipY),xt.pixelStorei(Ju,ur.premultiplyAlpha),xt.pixelStorei(Ol,ur.colorSpace),xt.pixelStorei(mu,ur.unpackAlignment)}function $a(){Aa.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ja(ur,Kr){var Jr=null;if(Qc(Kr)?Jr=Kr:Kr&&(wi(ur,Kr),"x"in Kr&&(ur.xOffset=Kr.x|0),"y"in Kr&&(ur.yOffset=Kr.y|0),Qc(Kr.data)&&(Jr=Kr.data)),Kr.copy){var Gi=Xr.viewportWidth,Eo=Xr.viewportHeight;ur.width=ur.width||Gi-ur.xOffset,ur.height=ur.height||Eo-ur.yOffset,ur.needsCopy=!0}else if(!Jr)ur.width=ur.width||1,ur.height=ur.height||1,ur.channels=ur.channels||4;else if(vt(Jr))ur.channels=ur.channels||4,ur.data=Jr,!("type"in Kr)&&ur.type===zn&&(ur.type=Wd(Jr));else if(rd(Jr))ur.channels=ur.channels||4,bh(ur,Jr),ur.alignment=1,ur.needsFree=!0;else if(Tt(Jr)){var ds=Jr.data;!Array.isArray(ds)&&ur.type===zn&&(ur.type=Wd(ds));var Ui=Jr.shape,tr=Jr.stride,hr,_r,Zr,sa,ve,Ae;Ui.length===3?(Zr=Ui[2],Ae=tr[2]):(Zr=1,Ae=1),hr=Ui[0],_r=Ui[1],sa=tr[0],ve=tr[1],ur.alignment=1,ur.width=hr,ur.height=_r,ur.channels=Zr,ur.format=ur.internalformat=cs[Zr],ur.needsFree=!0,id(ur,ds,sa,ve,Ae,Jr.offset)}else if(ad(Jr)||Jc(Jr)||Tf(Jr))ad(Jr)||Jc(Jr)?ur.element=Jr:ur.element=Jr.canvas,ur.width=ur.element.width,ur.height=ur.element.height,ur.channels=4;else if(tc(Jr))ur.element=Jr,ur.width=Jr.width,ur.height=Jr.height,ur.channels=4;else if(Wf(Jr))ur.element=Jr,ur.width=Jr.naturalWidth,ur.height=Jr.naturalHeight,ur.channels=4;else if(xh(Jr))ur.element=Jr,ur.width=Jr.videoWidth,ur.height=Jr.videoHeight,ur.channels=4;else if(Hf(Jr)){var Le=ur.width||Jr[0].length,We=ur.height||Jr.length,Xe=ur.channels;Wt(Jr[0][0])?Xe=Xe||Jr[0][0].length:Xe=Xe||1;for(var rt=Ve.shape(Jr),Ct=1,Jt=0;Jt>=Eo,Jr.height>>=Eo,Ja(Jr,Gi[Eo]),ur.mipmask|=1<=0&&!("faces"in Kr)&&(ur.genMipmaps=!0)}if("mag"in Kr){var Gi=Kr.mag;ur.magFilter=Ba[Gi]}var Eo=ur.wrapS,ds=ur.wrapT;if("wrap"in Kr){var Ui=Kr.wrap;typeof Ui=="string"?Eo=ds=za[Ui]:Array.isArray(Ui)&&(Eo=za[Ui[0]],ds=za[Ui[1]])}else{if("wrapS"in Kr){var tr=Kr.wrapS;Eo=za[tr]}if("wrapT"in Kr){var hr=Kr.wrapT;ds=za[hr]}}if(ur.wrapS=Eo,ur.wrapT=ds,"anisotropic"in Kr){var _r=Kr.anisotropic;ur.anisotropic=Kr.anisotropic}if("mipmap"in Kr){var Zr=!1;switch(typeof Kr.mipmap){case"string":ur.mipmapHint=wa[Kr.mipmap],ur.genMipmaps=!0,Zr=!0;break;case"boolean":Zr=ur.genMipmaps=Kr.mipmap;break;case"object":ur.genMipmaps=!1,Zr=!0;break;default:}Zr&&!("min"in Kr)&&(ur.minFilter=Bn)}}function Rc(ur,Kr){xt.texParameteri(Kr,sl,ur.minFilter),xt.texParameteri(Kr,yo,ur.magFilter),xt.texParameteri(Kr,Yn,ur.wrapS),xt.texParameteri(Kr,go,ur.wrapT),nr.ext_texture_filter_anisotropic&&xt.texParameteri(Kr,Ku,ur.anisotropic),ur.genMipmaps&&(xt.hint(Lu,ur.mipmapHint),xt.generateMipmap(Kr))}var cf=0,ql={},Vl=fr.maxTextureUnits,nu=Array(Vl).map(function(){return null});function Xn(ur){Aa.call(this),this.mipmask=0,this.internalformat=ua,this.id=cf++,this.refCount=1,this.target=ur,this.texture=xt.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new hs,Wr.profile&&(this.stats={size:0})}function xu(ur){xt.activeTexture(Qu),xt.bindTexture(ur.target,ur.texture)}function xs(){var ur=nu[0];ur?xt.bindTexture(ur.target,ur.texture):xt.bindTexture(sr,null)}function zc(ur){var Kr=ur.texture,Jr=ur.unit,Gi=ur.target;Jr>=0&&(xt.activeTexture(Qu+Jr),xt.bindTexture(Gi,null),nu[Jr]=null),xt.deleteTexture(Kr),ur.texture=null,ur.params=null,ur.pixels=null,ur.refCount=0,delete ql[ur.id],aa.textureCount--}t(Xn.prototype,{bind:function(){var ur=this;ur.bindCount+=1;var Kr=ur.unit;if(Kr<0){for(var Jr=0;Jr0)continue;Gi.unit=-1}nu[Jr]=ur,Kr=Jr;break}Kr>=Vl,Wr.profile&&aa.maxTextureUnits>ve)-Zr,Ae.height=Ae.height||(Jr.height>>ve)-sa,xu(Jr),nn(Ae,sr,Zr,sa,ve),xs(),zi(Ae),Gi}function ds(Ui,tr){var hr=Ui|0,_r=tr|0||hr;if(hr===Jr.width&&_r===Jr.height)return Gi;Gi.width=Jr.width=hr,Gi.height=Jr.height=_r,xu(Jr);for(var Zr=0;Jr.mipmask>>Zr;++Zr){var sa=hr>>Zr,ve=_r>>Zr;if(!sa||!ve)break;xt.texImage2D(sr,Zr,Jr.format,sa,ve,0,Jr.format,Jr.type,null)}return xs(),Wr.profile&&(Jr.stats.size=Iu(Jr.internalformat,Jr.type,hr,_r,!1,!1)),Gi}return Gi(ur,Kr),Gi.subimage=Eo,Gi.resize=ds,Gi._reglType="texture2d",Gi._texture=Jr,Wr.profile&&(Gi.stats=Jr.stats),Gi.destroy=function(){Jr.decRef()},Gi}function hf(ur,Kr,Jr,Gi,Eo,ds){var Ui=new Xn(kr);ql[Ui.id]=Ui,aa.cubeCount++;var tr=new Array(6);function hr(sa,ve,Ae,Le,We,Xe){var rt,Ct=Ui.texInfo;for(hs.call(Ct),rt=0;rt<6;++rt)tr[rt]=bo();if(typeof sa=="number"||!sa){var Jt=sa|0||1;for(rt=0;rt<6;++rt)kn(tr[rt],Jt,Jt)}else if(typeof sa=="object")if(ve)so(tr[0],sa),so(tr[1],ve),so(tr[2],Ae),so(tr[3],Le),so(tr[4],We),so(tr[5],Xe);else if(cc(Ct,sa),wi(Ui,sa),"faces"in sa){var br=sa.faces;for(rt=0;rt<6;++rt)ga(tr[rt],Ui),so(tr[rt],br[rt])}else for(rt=0;rt<6;++rt)so(tr[rt],sa);for(ga(Ui,tr[0]),Ct.genMipmaps?Ui.mipmask=(tr[0].width<<1)-1:Ui.mipmask=tr[0].mipmask,Ui.internalformat=tr[0].internalformat,hr.width=tr[0].width,hr.height=tr[0].height,xu(Ui),rt=0;rt<6;++rt)Us(tr[rt],Mr+rt);for(Rc(Ct,kr),xs(),Wr.profile&&(Ui.stats.size=Iu(Ui.internalformat,Ui.type,hr.width,hr.height,Ct.genMipmaps,!0)),hr.format=Pa[Ui.internalformat],hr.type=Ha[Ui.type],hr.mag=Ta[Ct.magFilter],hr.min=hi[Ct.minFilter],hr.wrapS=oi[Ct.wrapS],hr.wrapT=oi[Ct.wrapT],rt=0;rt<6;++rt)uf(tr[rt]);return hr}function _r(sa,ve,Ae,Le,We){var Xe=Ae|0,rt=Le|0,Ct=We|0,Jt=fi();return ga(Jt,Ui),Jt.width=0,Jt.height=0,Ja(Jt,ve),Jt.width=Jt.width||(Ui.width>>Ct)-Xe,Jt.height=Jt.height||(Ui.height>>Ct)-rt,xu(Ui),nn(Jt,Mr+sa,Xe,rt,Ct),xs(),zi(Jt),hr}function Zr(sa){var ve=sa|0;if(ve!==Ui.width){hr.width=Ui.width=ve,hr.height=Ui.height=ve,xu(Ui);for(var Ae=0;Ae<6;++Ae)for(var Le=0;Ui.mipmask>>Le;++Le)xt.texImage2D(Mr+Ae,Le,Ui.format,ve>>Le,ve>>Le,0,Ui.format,Ui.type,null);return xs(),Wr.profile&&(Ui.stats.size=Iu(Ui.internalformat,Ui.type,hr.width,hr.height,!1,!0)),hr}}return hr(ur,Kr,Jr,Gi,Eo,ds),hr.subimage=_r,hr.resize=Zr,hr._reglType="textureCube",hr._texture=Ui,Wr.profile&&(hr.stats=Ui.stats),hr.destroy=function(){Ui.decRef()},hr}function Nn(){for(var ur=0;ur>Gi,Jr.height>>Gi,0,Jr.internalformat,Jr.type,null);else for(var Eo=0;Eo<6;++Eo)xt.texImage2D(Mr+Eo,Gi,Jr.internalformat,Jr.width>>Gi,Jr.height>>Gi,0,Jr.internalformat,Jr.type,null);Rc(Jr.texInfo,Jr.target)})}function Ps(){for(var ur=0;ur=0?uf=!0:za.indexOf(hs)>=0&&(uf=!1))),("depthTexture"in Xn||"depthStencilTexture"in Xn)&&(nu=!!(Xn.depthTexture||Xn.depthStencilTexture)),"depth"in Xn&&(typeof Xn.depth=="boolean"?Us=Xn.depth:(cf=Xn.depth,iu=!1)),"stencil"in Xn&&(typeof Xn.stencil=="boolean"?iu=Xn.stencil:(ql=Xn.stencil,Us=!1)),"depthStencil"in Xn&&(typeof Xn.depthStencil=="boolean"?Us=iu=Xn.depthStencil:(Vl=Xn.depthStencil,Us=!1,iu=!1))}var xs=null,zc=null,ff=null,hf=null;if(Array.isArray(bo))xs=bo.map(ma);else if(bo)xs=[ma(bo)];else for(xs=new Array(Rc),Sn=0;Sn0&&(zi.depth=Ja[0].depth,zi.stencil=Ja[0].stencil,zi.depthStencil=Ja[0].depthStencil),Ja[fi]?Ja[fi](zi):Ja[fi]=ga(zi)}return t(Ai,{width:Sn,height:Sn,color:hs})}function nn(Ln){var fi,zi=Ln|0;if(zi===Ai.width)return Ai;var Sn=Ai.color;for(fi=0;fi=Sn.byteLength?kn.subdata(Sn):(kn.destroy(),ga.buffers[Ln]=null)),ga.buffers[Ln]||(kn=ga.buffers[Ln]=Xr.create(fi,Ef,!1,!0)),zi.buffer=Xr.getBuffer(kn),zi.size=zi.buffer.dimension|0,zi.normalized=!1,zi.type=zi.buffer.dtype,zi.offset=0,zi.stride=0,zi.divisor=0,zi.state=1,Ai[Ln]=1}else Xr.getBuffer(fi)?(zi.buffer=Xr.getBuffer(fi),zi.size=zi.buffer.dimension|0,zi.normalized=!1,zi.type=zi.buffer.dtype,zi.offset=0,zi.stride=0,zi.divisor=0,zi.state=1):Xr.getBuffer(fi.buffer)?(zi.buffer=Xr.getBuffer(fi.buffer),zi.size=(+fi.size||zi.buffer.dimension)|0,zi.normalized=!!fi.normalized||!1,"type"in fi?zi.type=ar[fi.type]:zi.type=zi.buffer.dtype,zi.offset=(fi.offset||0)|0,zi.stride=(fi.stride||0)|0,zi.divisor=(fi.divisor||0)|0,zi.state=1):"x"in fi&&(zi.x=+fi.x||0,zi.y=+fi.y||0,zi.z=+fi.z||0,zi.w=+fi.w||0,zi.state=2)}for(var so=0;so1)for(var ri=0;riIr&&(Ir=fa.stats.uniformsCount)}),Ir},fr.getMaxAttributesCount=function(){var Ir=0;return Na.forEach(function(fa){fa.stats.attributesCount>Ir&&(Ir=fa.stats.attributesCount)}),Ir});function ma(){Xr={},aa={};for(var Ir=0;Ir16&&(fr=Rr(fr,xt.length*8));for(var Or=Array(16),Xr=Array(16),aa=0;aa<16;aa++)Or[aa]=fr[aa]^909522486,Xr[aa]=fr[aa]^1549556828;var Wr=Rr(Or.concat(eh(nr)),512+nr.length*8);return it(Rr(Xr.concat(Wr),768))}function yu(xt){for(var nr=Sp?"0123456789ABCDEF":"0123456789abcdef",fr="",Or,Xr=0;Xr>>4&15)+nr.charAt(Or&15);return fr}function Lh(xt){for(var nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",Or=xt.length,Xr=0;Xrxt.length*8?fr+=Dh:fr+=nr.charAt(aa>>>6*(3-Wr)&63);return fr}function ud(xt,nr){var fr=nr.length,Or=Array(),Xr,aa,Wr,wa,za=Array(Math.ceil(xt.length/2));for(Xr=0;Xr0;){for(wa=Array(),Wr=0,Xr=0;Xr0||aa>0)&&(wa[wa.length]=aa);Or[Or.length]=Wr,za=wa}var Ba="";for(Xr=Or.length-1;Xr>=0;Xr--)Ba+=nr.charAt(Or[Xr]);var Na=Math.ceil(xt.length*8/(Math.log(nr.length)/Math.log(2)));for(Xr=Ba.length;Xr>>6&31,128|Or&63):Or<=65535?nr+=String.fromCharCode(224|Or>>>12&15,128|Or>>>6&63,128|Or&63):Or<=2097151&&(nr+=String.fromCharCode(240|Or>>>18&7,128|Or>>>12&63,128|Or>>>6&63,128|Or&63));return nr}function eh(xt){for(var nr=Array(xt.length>>2),fr=0;fr>5]|=(xt.charCodeAt(fr/8)&255)<<24-fr%32;return nr}function it(xt){for(var nr="",fr=0;fr>5]>>>24-fr%32&255);return nr}function wt(xt,nr){return xt>>>nr|xt<<32-nr}function $t(xt,nr){return xt>>>nr}function Bt(xt,nr,fr){return xt&nr^~xt&fr}function cr(xt,nr,fr){return xt&nr^xt&fr^nr&fr}function Sr(xt){return wt(xt,2)^wt(xt,13)^wt(xt,22)}function Pr(xt){return wt(xt,6)^wt(xt,11)^wt(xt,25)}function qr(xt){return wt(xt,7)^wt(xt,18)^$t(xt,3)}function $r(xt){return wt(xt,17)^wt(xt,19)^$t(xt,10)}var va=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 Rr(xt,nr){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Or=new Array(64),Xr,aa,Wr,wa,za,Ba,Na,Ji,ki,ii,ma,Ir;for(xt[nr>>5]|=128<<24-nr%32,xt[(nr+64>>9<<4)+15]=nr,ki=0;ki>16)+(nr>>16)+(fr>>16);return Or<<16|fr&65535}function Yr(xt){return Array.prototype.slice.call(xt)}function da(xt){return Yr(xt).join("")}function La(xt){var nr=xt&&xt.cache,fr=0,Or=[],Xr=[],aa=[];function Wr(ma,Ir){var fa=Ir&&Ir.stable;if(!fa){for(var Pa=0;Pa0&&(ma.push(Ha,"="),ma.push.apply(ma,Yr(arguments)),ma.push(";")),Ha}return t(Ir,{def:Pa,toString:function(){return da([fa.length>0?"var "+fa.join(",")+";":"",da(ma)])}})}function za(){var ma=wa(),Ir=wa(),fa=ma.toString,Pa=Ir.toString;function Ha(Ta,hi){Ir(Ta,hi,"=",ma.def(Ta,hi),";")}return t(function(){ma.apply(ma,Yr(arguments))},{def:ma.def,entry:ma,exit:Ir,save:Ha,set:function(Ta,hi,oi){Ha(Ta,hi),ma(Ta,hi,"=",oi,";")},toString:function(){return fa()+Pa()}})}function Ba(){var ma=da(arguments),Ir=za(),fa=za(),Pa=Ir.toString,Ha=fa.toString;return t(Ir,{then:function(){return Ir.apply(Ir,Yr(arguments)),this},else:function(){return fa.apply(fa,Yr(arguments)),this},toString:function(){var Ta=Ha();return Ta&&(Ta="else{"+Ta+"}"),da(["if(",ma,"){",Pa(),"}",Ta])}})}var Na=wa(),Ji={};function ki(ma,Ir){var fa=[];function Pa(){var an="a"+fa.length;return fa.push(an),an}Ir=Ir||0;for(var Ha=0;Ha":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},oa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fa={cw:qe,ccw:tt};function Ea(st){return Array.isArray(st)||Xt(st)||or(st)}function Ma(st){return st.sort(function(It,Ut){return It===Ks?-1:Ut===Ks?1:It=1,ir>=2,It)}else if(Ut===Co){var dr=st.data;return new sa(dr.thisDep,dr.contextDep,dr.propDep,It)}else{if(Ut===Do)return new sa(!1,!1,!1,It);if(Ut===Fo){for(var Ar=!1,hr=!1,vr=!1,Or=0;Or=1&&(hr=!0),ta>=2&&(vr=!0)}else Cr.type===Co&&(Ar=Ar||Cr.data.thisDep,hr=hr||Cr.data.contextDep,vr=vr||Cr.data.propDep)}return new sa(Ar,hr,vr,It)}else return new sa(Ut===Zi,Ut===Ni,Ut===Ln,It)}}var $n=new sa(!1,!1,!1,function(){});function xi(st,It,Ut,ir,dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia){var ga=Cr.Record,da={add:32774,subtract:32778,"reverse subtract":32779};Ut.ext_blend_minmax&&(da.min=at,da.max=ct);var Fa=Ut.angle_instanced_arrays,za=Ut.webgl_draw_buffers,Cn=Ut.oes_vertex_array_object,Dn={dirty:!0,profile:ia.profile},ui={},cn=[],sn={},ei={};function Pn(Wr){return Wr.replace(".","_")}function Rn(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),ui[Wa]=Dn[Wa]=!!pa,sn[Wa]=na}function In(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),Array.isArray(pa)?(Dn[Wa]=pa.slice(),ui[Wa]=pa.slice()):Dn[Wa]=ui[Wa]=pa,ei[Wa]=na}function Jn(Wr){return!!isNaN(Wr)}Rn(Yo,an),Rn(bo,Ba),In(Gs,"blendColor",[0,0,0,0]),In(Es,"blendEquationSeparate",[gr,gr]),In(ns,"blendFuncSeparate",[mr,Jt,mr,Jt]),Rn(Kn,ii,!0),In(zo,"depthFunc",Hr),In(gs,"depthRange",[0,1]),In(js,"depthMask",!0),In(Cl,Cl,[!0,!0,!0,!0]),Rn(zl,xa),In(Kl,"cullFace",Ee),In(Gu,Gu,tt),In(xl,xl,1),Rn(Hu,oi),In(Su,"polygonOffset",[0,0]),Rn(mc,Ji),Rn(Jc,Qi),In(oc,"sampleCoverage",[1,!1]),Rn(du,Tn),In(Jl,"stencilMask",-1),In(Ql,"stencilFunc",[Nt,0,-1]),In(Eu,"stencilOpSeparate",[de,St,St,St]),In(bf,"stencilOpSeparate",[Ee,St,St,St]),Rn(lh,Si),In(Pc,"scissor",[0,0,st.drawingBufferWidth,st.drawingBufferHeight]),In(Ks,Ks,[0,0,st.drawingBufferWidth,st.drawingBufferHeight]);var Ei={gl:st,context:Ta,strings:It,next:ui,current:Dn,draw:ka,elements:Ar,buffer:dr,shader:ta,attributes:Cr.state,vao:Cr,uniforms:Or,framebuffer:vr,extensions:Ut,timer:Ra,isBufferArgs:Ea},so={primTypes:en,compareFuncs:Xr,blendFuncs:Aa,blendEquations:da,stencilOps:oa,glTypes:Kr,orientationType:fa};za&&(so.backBuffer=[Ee],so.drawBuffer=f(ir.maxDrawbuffers,function(Wr){return Wr===0?[0]:f(Wr,function(na){return ca+na})}));var ti=0;function bi(){var Wr=En({cache:ua}),na=Wr.link,pa=Wr.global;Wr.id=ti++,Wr.batchId="0";var Wa=na(Ei),ln=Wr.shared={props:"a0"};Object.keys(Ei).forEach(function(wt){ln[wt]=pa.def(Wa,".",wt)});var Le=Wr.next={},Ue=Wr.current={};Object.keys(ei).forEach(function(wt){Array.isArray(Dn[wt])&&(Le[wt]=pa.def(ln.next,".",wt),Ue[wt]=pa.def(ln.current,".",wt))});var Qe=Wr.constants={};Object.keys(so).forEach(function(wt){Qe[wt]=pa.def(JSON.stringify(so[wt]))}),Wr.invoke=function(wt,Lt){switch(Lt.type){case kn:var pr=["this",ln.context,ln.props,Wr.batchId];return wt.def(na(Lt.data),".call(",pr.slice(0,Math.max(Lt.data.length+1,4)),")");case Ln:return wt.def(ln.props,Lt.data);case Ni:return wt.def(ln.context,Lt.data);case Zi:return wt.def("this",Lt.data);case Co:return Lt.data.append(Wr,wt),Lt.data.ref;case Do:return Lt.data.toString();case Fo:return Lt.data.map(function(Gr){return Wr.invoke(wt,Gr)})}},Wr.attribCache={};var _t={};return Wr.scopeAttrib=function(wt){var Lt=It.id(wt);if(Lt in _t)return _t[Lt];var pr=Cr.scope[Lt];pr||(pr=Cr.scope[Lt]=new ga);var Gr=_t[Lt]=na(pr);return Gr},Wr}function Wi(Wr){var na=Wr.static,pa=Wr.dynamic,Wa;if(Bl in na){var ln=!!na[Bl];Wa=An(function(Ue,Qe){return ln}),Wa.enable=ln}else if(Bl in pa){var Le=pa[Bl];Wa=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}return Wa}function ro(Wr,na){var pa=Wr.static,Wa=Wr.dynamic;if(Wu in pa){var ln=pa[Wu];return ln?(ln=vr.getFramebuffer(ln),An(function(Ue,Qe){var _t=Ue.link(ln),wt=Ue.shared;Qe.set(wt.framebuffer,".next",_t);var Lt=wt.context;return Qe.set(Lt,"."+xt,_t+".width"),Qe.set(Lt,"."+Bt,_t+".height"),_t})):An(function(Ue,Qe){var _t=Ue.shared;Qe.set(_t.framebuffer,".next","null");var wt=_t.context;return Qe.set(wt,"."+xt,wt+"."+Br),Qe.set(wt,"."+Bt,wt+"."+kr),"null"})}else if(Wu in Wa){var Le=Wa[Wu];return zn(Le,function(Ue,Qe){var _t=Ue.invoke(Qe,Le),wt=Ue.shared,Lt=wt.framebuffer,pr=Qe.def(Lt,".getFramebuffer(",_t,")");Qe.set(Lt,".next",pr);var Gr=wt.context;return Qe.set(Gr,"."+xt,pr+"?"+pr+".width:"+Gr+"."+Br),Qe.set(Gr,"."+Bt,pr+"?"+pr+".height:"+Gr+"."+kr),pr})}else return null}function Mo(Wr,na,pa){var Wa=Wr.static,ln=Wr.dynamic;function Le(_t){if(_t in Wa){var wt=Wa[_t],Lt=!0,pr=wt.x|0,Gr=wt.y|0,va,Qa;return"width"in wt?va=wt.width|0:Lt=!1,"height"in wt?Qa=wt.height|0:Lt=!1,new sa(!Lt&&na&&na.thisDep,!Lt&&na&&na.contextDep,!Lt&&na&&na.propDep,function(Mn,dn){var _n=Mn.shared.context,Sn=va;"width"in wt||(Sn=dn.def(_n,".",xt,"-",pr));var Bn=Qa;return"height"in wt||(Bn=dn.def(_n,".",Bt,"-",Gr)),[pr,Gr,Sn,Bn]})}else if(_t in ln){var Ga=ln[_t],Ua=zn(Ga,function(Mn,dn){var _n=Mn.invoke(dn,Ga),Sn=Mn.shared.context,Bn=dn.def(_n,".x|0"),Zn=dn.def(_n,".y|0"),Ci=dn.def('"width" in ',_n,"?",_n,".width|0:","(",Sn,".",xt,"-",Bn,")"),qo=dn.def('"height" in ',_n,"?",_n,".height|0:","(",Sn,".",Bt,"-",Zn,")");return[Bn,Zn,Ci,qo]});return na&&(Ua.thisDep=Ua.thisDep||na.thisDep,Ua.contextDep=Ua.contextDep||na.contextDep,Ua.propDep=Ua.propDep||na.propDep),Ua}else return na?new sa(na.thisDep,na.contextDep,na.propDep,function(Mn,dn){var _n=Mn.shared.context;return[0,0,dn.def(_n,".",xt),dn.def(_n,".",Bt)]}):null}var Ue=Le(Ks);if(Ue){var Qe=Ue;Ue=new sa(Ue.thisDep,Ue.contextDep,Ue.propDep,function(_t,wt){var Lt=Qe.append(_t,wt),pr=_t.shared.context;return wt.set(pr,"."+zt,Lt[2]),wt.set(pr,"."+Wt,Lt[3]),Lt})}return{viewport:Ue,scissor_box:Le(Pc)}}function zs(Wr,na){var pa=Wr.static,Wa=typeof pa[Qc]=="string"&&typeof pa[wf]=="string";if(Wa){if(Object.keys(na.dynamic).length>0)return null;var ln=na.static,Le=Object.keys(ln);if(Le.length>0&&typeof ln[Le[0]]=="number"){for(var Ue=[],Qe=0;Qe"+Bn+"?"+Lt+".constant["+Bn+"]:0;"}).join(""),"}}else{","if(",va,"(",Lt,".buffer)){",Mn,"=",Qa,".createStream(",Jr,",",Lt,".buffer);","}else{",Mn,"=",Qa,".getBuffer(",Lt,".buffer);","}",dn,'="type" in ',Lt,"?",Gr.glTypes,"[",Lt,".type]:",Mn,".dtype;",Ga.normalized,"=!!",Lt,".normalized;");function _n(Sn){wt(Ga[Sn],"=",Lt,".",Sn,"|0;")}return _n("size"),_n("offset"),_n("stride"),_n("divisor"),wt("}}"),wt.exit("if(",Ga.isStream,"){",Qa,".destroyStream(",Mn,");","}"),Ga}ln[Le]=zn(Ue,Qe)}),ln}function $o(Wr){var na=Wr.static,pa=Wr.dynamic,Wa={};return Object.keys(na).forEach(function(ln){var Le=na[ln];Wa[ln]=An(function(Ue,Qe){return typeof Le=="number"||typeof Le=="boolean"?""+Le:Ue.link(Le)})}),Object.keys(pa).forEach(function(ln){var Le=pa[ln];Wa[ln]=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}),Wa}function _s(Wr,na,pa,Wa,ln){var Le=Wr.static,Ue=Wr.dynamic,Qe=zs(Wr,na),_t=ro(Wr,ln),wt=Mo(Wr,_t,ln),Lt=So(Wr,ln),pr=Ws(Wr,ln),Gr=Bs(Wr,ln,Qe);function va(_n){var Sn=wt[_n];Sn&&(pr[_n]=Sn)}va(Ks),va(Pn(Pc));var Qa=Object.keys(pr).length>0,Ga={framebuffer:_t,draw:Lt,shader:Gr,state:pr,dirty:Qa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Wi(Wr,ln),Ga.uniforms=Zo(pa,ln),Ga.drawVAO=Ga.scopeVAO=Lt.vao,!Ga.drawVAO&&Gr.program&&!Qe&&Ut.angle_instanced_arrays&&Lt.static.elements){var Ua=!0,Mn=Gr.program.attributes.map(function(_n){var Sn=na.static[_n];return Ua=Ua&&!!Sn,Sn});if(Ua&&Mn.length>0){var dn=Cr.getVAO(Cr.createVAO({attributes:Mn,elements:Lt.static.elements}));Ga.drawVAO=new sa(null,null,null,function(_n,Sn){return _n.link(dn)}),Ga.useVAO=!0}}return Qe?Ga.useVAO=!0:Ga.attributes=es(na,ln),Ga.context=$o(Wa,ln),Ga}function Go(Wr,na,pa){var Wa=Wr.shared,ln=Wa.context,Le=Wr.scope();Object.keys(pa).forEach(function(Ue){na.save(ln,"."+Ue);var Qe=pa[Ue],_t=Qe.append(Wr,na);Array.isArray(_t)?Le(ln,".",Ue,"=[",_t.join(),"];"):Le(ln,".",Ue,"=",_t,";")}),na(Le)}function Ys(Wr,na,pa,Wa){var ln=Wr.shared,Le=ln.gl,Ue=ln.framebuffer,Qe;za&&(Qe=na.def(ln.extensions,".webgl_draw_buffers"));var _t=Wr.constants,wt=_t.drawBuffer,Lt=_t.backBuffer,pr;pa?pr=pa.append(Wr,na):pr=na.def(Ue,".next"),Wa||na("if(",pr,"!==",Ue,".cur){"),na("if(",pr,"){",Le,".bindFramebuffer(",Vr,",",pr,".framebuffer);"),za&&na(Qe,".drawBuffersWEBGL(",wt,"[",pr,".colorAttachments.length]);"),na("}else{",Le,".bindFramebuffer(",Vr,",null);"),za&&na(Qe,".drawBuffersWEBGL(",Lt,");"),na("}",Ue,".cur=",pr,";"),Wa||na("}")}function Ll(Wr,na,pa){var Wa=Wr.shared,ln=Wa.gl,Le=Wr.current,Ue=Wr.next,Qe=Wa.current,_t=Wa.next,wt=Wr.cond(Qe,".dirty");cn.forEach(function(Lt){var pr=Pn(Lt);if(!(pr in pa.state)){var Gr,va;if(pr in Ue){Gr=Ue[pr],va=Le[pr];var Qa=f(Dn[pr].length,function(Ua){return wt.def(Gr,"[",Ua,"]")});wt(Wr.cond(Qa.map(function(Ua,Mn){return Ua+"!=="+va+"["+Mn+"]"}).join("||")).then(ln,".",ei[pr],"(",Qa,");",Qa.map(function(Ua,Mn){return va+"["+Mn+"]="+Ua}).join(";"),";"))}else{Gr=wt.def(_t,".",pr);var Ga=Wr.cond(Gr,"!==",Qe,".",pr);wt(Ga),pr in sn?Ga(Wr.cond(Gr).then(ln,".enable(",sn[pr],");").else(ln,".disable(",sn[pr],");"),Qe,".",pr,"=",Gr,";"):Ga(ln,".",ei[pr],"(",Gr,");",Qe,".",pr,"=",Gr,";")}}}),Object.keys(pa.state).length===0&&wt(Qe,".dirty=false;"),na(wt)}function mo(Wr,na,pa,Wa){var ln=Wr.shared,Le=Wr.current,Ue=ln.current,Qe=ln.gl,_t;Ma(Object.keys(pa)).forEach(function(wt){var Lt=pa[wt];if(!(Wa&&!Wa(Lt))){var pr=Lt.append(Wr,na);if(sn[wt]){var Gr=sn[wt];hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Wr.cond(_t).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",_t,";")):(na(Wr.cond(pr).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",pr,";"))}else if(zr(pr)){var va=Le[wt];na(Qe,".",ei[wt],"(",pr,");",pr.map(function(Qa,Ga){return va+"["+Ga+"]="+Qa}).join(";"),";")}else hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Qe,".",ei[wt],"(",_t,");",Ue,".",wt,"=",_t,";")):na(Qe,".",ei[wt],"(",pr,");",Ue,".",wt,"=",pr,";")}})}function ru(Wr,na){Fa&&(Wr.instancing=na.def(Wr.shared.extensions,".angle_instanced_arrays"))}function Rs(Wr,na,pa,Wa,ln){var Le=Wr.shared,Ue=Wr.stats,Qe=Le.current,_t=Le.timer,wt=pa.profile;function Lt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var pr,Gr;function va(_n){pr=na.def(),_n(pr,"=",Lt(),";"),typeof ln=="string"?_n(Ue,".count+=",ln,";"):_n(Ue,".count++;"),Ra&&(Wa?(Gr=na.def(),_n(Gr,"=",_t,".getNumPendingQueries();")):_n(_t,".beginQuery(",Ue,");"))}function Qa(_n){_n(Ue,".cpuTime+=",Lt(),"-",pr,";"),Ra&&(Wa?_n(_t,".pushScopeStats(",Gr,",",_t,".getNumPendingQueries(),",Ue,");"):_n(_t,".endQuery();"))}function Ga(_n){var Sn=na.def(Qe,".profile");na(Qe,".profile=",_n,";"),na.exit(Qe,".profile=",Sn,";")}var Ua;if(wt){if(hn(wt)){wt.enable?(va(na),Qa(na.exit),Ga("true")):Ga("false");return}Ua=wt.append(Wr,na),Ga(Ua)}else Ua=na.def(Qe,".profile");var Mn=Wr.block();va(Mn),na("if(",Ua,"){",Mn,"}");var dn=Wr.block();Qa(dn),na.exit("if(",Ua,"){",dn,"}")}function Yu(Wr,na,pa,Wa,ln){var Le=Wr.shared;function Ue(_t){switch(_t){case Qo:case jl:case wi:return 2;case vo:case Hs:case sl:return 3;case ys:case Cu:case sc:return 4;default:return 1}}function Qe(_t,wt,Lt){var pr=Le.gl,Gr=na.def(_t,".location"),va=na.def(Le.attributes,"[",Gr,"]"),Qa=Lt.state,Ga=Lt.buffer,Ua=[Lt.x,Lt.y,Lt.z,Lt.w],Mn=["buffer","normalized","offset","stride"];function dn(){na("if(!",va,".buffer){",pr,".enableVertexAttribArray(",Gr,");}");var Sn=Lt.type,Bn;if(Lt.size?Bn=na.def(Lt.size,"||",wt):Bn=wt,na("if(",va,".type!==",Sn,"||",va,".size!==",Bn,"||",Mn.map(function(Ci){return va+"."+Ci+"!=="+Lt[Ci]}).join("||"),"){",pr,".bindBuffer(",Jr,",",Ga,".buffer);",pr,".vertexAttribPointer(",[Gr,Bn,Sn,Lt.normalized,Lt.stride,Lt.offset],");",va,".type=",Sn,";",va,".size=",Bn,";",Mn.map(function(Ci){return va+"."+Ci+"="+Lt[Ci]+";"}).join(""),"}"),Fa){var Zn=Lt.divisor;na("if(",va,".divisor!==",Zn,"){",Wr.instancing,".vertexAttribDivisorANGLE(",[Gr,Zn],");",va,".divisor=",Zn,";}")}}function _n(){na("if(",va,".buffer){",pr,".disableVertexAttribArray(",Gr,");",va,".buffer=null;","}if(",yi.map(function(Sn,Bn){return va+"."+Sn+"!=="+Ua[Bn]}).join("||"),"){",pr,".vertexAttrib4f(",Gr,",",Ua,");",yi.map(function(Sn,Bn){return va+"."+Sn+"="+Ua[Bn]+";"}).join(""),"}")}Qa===ki?dn():Qa===ri?_n():(na("if(",Qa,"===",ki,"){"),dn(),na("}else{"),_n(),na("}"))}Wa.forEach(function(_t){var wt=_t.name,Lt=pa.attributes[wt],pr;if(Lt){if(!ln(Lt))return;pr=Lt.append(Wr,na)}else{if(!ln($n))return;var Gr=Wr.scopeAttrib(wt);pr={},Object.keys(new ga).forEach(function(va){pr[va]=na.def(Gr,".",va)})}Qe(Wr.link(_t),Ue(_t.info.type),pr)})}function Ul(Wr,na,pa,Wa,ln,Le){for(var Ue=Wr.shared,Qe=Ue.gl,_t,wt=0;wt1){for(var As=[],ls=[],Vl=0;Vl>1)",Ga],");")}function Zn(){pa(Ua,".drawArraysInstancedANGLE(",[Gr,va,Qa,Ga],");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}function Sn(){function Bn(){pa(Le+".drawElements("+[Gr,Qa,Mn,va+"<<(("+Mn+"-"+_i+")>>1)"]+");")}function Zn(){pa(Le+".drawArrays("+[Gr,va,Qa]+");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}Fa&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(pa("if(",Ga,">0){"),_n(),pa("}else if(",Ga,"<0){"),Sn(),pa("}")):_n():Sn()}function fo(Wr,na,pa,Wa,ln){var Le=bi(),Ue=Le.proc("body",ln);return Fa&&(Le.instancing=Ue.def(Le.shared.extensions,".angle_instanced_arrays")),Wr(Le,Ue,pa,Wa),Le.compile().body}function Xo(Wr,na,pa,Wa){ru(Wr,na),pa.useVAO?pa.drawVAO?na(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,na),");"):na(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(na(Wr.shared.vao,".setVAO(null);"),Yu(Wr,na,pa,Wa.attributes,function(){return!0})),Ul(Wr,na,pa,Wa.uniforms,function(){return!0},!1),ql(Wr,na,na,pa)}function Os(Wr,na){var pa=Wr.proc("draw",1);ru(Wr,pa),Go(Wr,pa,na.context),Ys(Wr,pa,na.framebuffer),Ll(Wr,pa,na),mo(Wr,pa,na.state),Rs(Wr,pa,na,!1,!0);var Wa=na.shader.progVar.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",Wa,".program);"),na.shader.program)Xo(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var ln=Wr.global.def("{}"),Le=pa.def(Wa,".id"),Ue=pa.def(ln,"[",Le,"]");pa(Wr.cond(Ue).then(Ue,".call(this,a0);").else(Ue,"=",ln,"[",Le,"]=",Wr.link(function(Qe){return fo(Xo,Wr,na,Qe,1)}),"(",Wa,");",Ue,".call(this,a0);"))}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function ra(Wr,na,pa,Wa){Wr.batchId="a1",ru(Wr,na);function ln(){return!0}Yu(Wr,na,pa,Wa.attributes,ln),Ul(Wr,na,pa,Wa.uniforms,ln,!1),ql(Wr,na,na,pa)}function Ya(Wr,na,pa,Wa){ru(Wr,na);var ln=pa.contextDep,Le=na.def(),Ue="a0",Qe="a1",_t=na.def();Wr.shared.props=_t,Wr.batchId=Le;var wt=Wr.scope(),Lt=Wr.scope();na(wt.entry,"for(",Le,"=0;",Le,"<",Qe,";++",Le,"){",_t,"=",Ue,"[",Le,"];",Lt,"}",wt.exit);function pr(Mn){return Mn.contextDep&&ln||Mn.propDep}function Gr(Mn){return!pr(Mn)}if(pa.needsContext&&Go(Wr,Lt,pa.context),pa.needsFramebuffer&&Ys(Wr,Lt,pa.framebuffer),mo(Wr,Lt,pa.state,pr),pa.profile&&pr(pa.profile)&&Rs(Wr,Lt,pa,!1,!0),Wa)pa.useVAO?pa.drawVAO?pr(pa.drawVAO)?Lt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,Lt),");"):wt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,wt),");"):wt(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(wt(Wr.shared.vao,".setVAO(null);"),Yu(Wr,wt,pa,Wa.attributes,Gr),Yu(Wr,Lt,pa,Wa.attributes,pr)),Ul(Wr,wt,pa,Wa.uniforms,Gr,!1),Ul(Wr,Lt,pa,Wa.uniforms,pr,!0),ql(Wr,wt,Lt,pa);else{var va=Wr.global.def("{}"),Qa=pa.shader.progVar.append(Wr,Lt),Ga=Lt.def(Qa,".id"),Ua=Lt.def(va,"[",Ga,"]");Lt(Wr.shared.gl,".useProgram(",Qa,".program);","if(!",Ua,"){",Ua,"=",va,"[",Ga,"]=",Wr.link(function(Mn){return fo(ra,Wr,pa,Mn,2)}),"(",Qa,");}",Ua,".call(this,a0[",Le,"],",Le,");")}}function Ka(Wr,na){var pa=Wr.proc("batch",2);Wr.batchId="0",ru(Wr,pa);var Wa=!1,ln=!0;Object.keys(na.context).forEach(function(va){Wa=Wa||na.context[va].propDep}),Wa||(Go(Wr,pa,na.context),ln=!1);var Le=na.framebuffer,Ue=!1;Le?(Le.propDep?Wa=Ue=!0:Le.contextDep&&Wa&&(Ue=!0),Ue||Ys(Wr,pa,Le)):Ys(Wr,pa,null),na.state.viewport&&na.state.viewport.propDep&&(Wa=!0);function Qe(va){return va.contextDep&&Wa||va.propDep}Ll(Wr,pa,na),mo(Wr,pa,na.state,function(va){return!Qe(va)}),(!na.profile||!Qe(na.profile))&&Rs(Wr,pa,na,!1,"a1"),na.contextDep=Wa,na.needsContext=ln,na.needsFramebuffer=Ue;var _t=na.shader.progVar;if(_t.contextDep&&Wa||_t.propDep)Ya(Wr,pa,na,null);else{var wt=_t.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",wt,".program);"),na.shader.program)Ya(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var Lt=Wr.global.def("{}"),pr=pa.def(wt,".id"),Gr=pa.def(Lt,"[",pr,"]");pa(Wr.cond(Gr).then(Gr,".call(this,a0,a1);").else(Gr,"=",Lt,"[",pr,"]=",Wr.link(function(va){return fo(Ya,Wr,na,va,2)}),"(",wt,");",Gr,".call(this,a0,a1);"))}}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function Bi(Wr,na){var pa=Wr.proc("scope",3);Wr.batchId="a2";var Wa=Wr.shared,ln=Wa.current;if(Go(Wr,pa,na.context),na.framebuffer&&na.framebuffer.append(Wr,pa),Ma(Object.keys(na.state)).forEach(function(Qe){var _t=na.state[Qe],wt=_t.append(Wr,pa);zr(wt)?wt.forEach(function(Lt,pr){Jn(Lt)?pa.set(Wr.next[Qe],"["+pr+"]",Lt):pa.set(Wr.next[Qe],"["+pr+"]",Wr.link(Lt,{stable:!0}))}):hn(_t)?pa.set(Wa.next,"."+Qe,Wr.link(wt,{stable:!0})):pa.set(Wa.next,"."+Qe,wt)}),Rs(Wr,pa,na,!0,!0),[ku,fi,Nl,eu,Ol].forEach(function(Qe){var _t=na.draw[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.draw,"."+Qe,wt):pa.set(Wa.draw,"."+Qe,Wr.link(wt),{stable:!0})}}),Object.keys(na.uniforms).forEach(function(Qe){var _t=na.uniforms[Qe].append(Wr,pa);Array.isArray(_t)&&(_t="["+_t.map(function(wt){return Jn(wt)?wt:Wr.link(wt,{stable:!0})})+"]"),pa.set(Wa.uniforms,"["+Wr.link(It.id(Qe),{stable:!0})+"]",_t)}),Object.keys(na.attributes).forEach(function(Qe){var _t=na.attributes[Qe].append(Wr,pa),wt=Wr.scopeAttrib(Qe);Object.keys(new ga).forEach(function(Lt){pa.set(wt,"."+Lt,_t[Lt])})}),na.scopeVAO){var Le=na.scopeVAO.append(Wr,pa);Jn(Le)?pa.set(Wa.vao,".targetVAO",Le):pa.set(Wa.vao,".targetVAO",Wr.link(Le,{stable:!0}))}function Ue(Qe){var _t=na.shader[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.shader,"."+Qe,wt):pa.set(Wa.shader,"."+Qe,Wr.link(wt,{stable:!0}))}}Ue(wf),Ue(Qc),Object.keys(na.state).length>0&&(pa(ln,".dirty=true;"),pa.exit(ln,".dirty=true;")),pa("a1(",Wr.shared.context,",a0,",Wr.batchId,");")}function rs(Wr){if(!(typeof Wr!="object"||zr(Wr))){for(var na=Object.keys(Wr),pa=0;pa=0;--fo){var Xo=Ei[fo];Xo&&Xo(ua,null,0)}Ut.flush(),ta&&ta.update()}function Mo(){!Wi&&Ei.length>0&&(Wi=m.next(ro))}function zs(){Wi&&(m.cancel(ro),Wi=null)}function Bs(fo){fo.preventDefault(),dr=!0,zs(),so.forEach(function(Xo){Xo()})}function So(fo){Ut.getError(),dr=!1,Ar.restore(),ui.restore(),Fa.restore(),cn.restore(),sn.restore(),ei.restore(),Cn.restore(),ta&&ta.restore(),Pn.procs.refresh(),Mo(),ti.forEach(function(Xo){Xo()})}Jn&&(Jn.addEventListener(je,Bs,!1),Jn.addEventListener(Ze,So,!1));function Ws(){Ei.length=0,zs(),Jn&&(Jn.removeEventListener(je,Bs),Jn.removeEventListener(Ze,So)),ui.clear(),ei.clear(),sn.clear(),Cn.clear(),cn.clear(),za.clear(),Fa.clear(),ta&&ta.clear(),bi.forEach(function(fo){fo()})}function Zo(fo){function Xo(Le){var Ue=p({},Le);delete Ue.uniforms,delete Ue.attributes,delete Ue.context,delete Ue.vao,"stencil"in Ue&&Ue.stencil.op&&(Ue.stencil.opBack=Ue.stencil.opFront=Ue.stencil.op,delete Ue.stencil.op);function Qe(_t){if(_t in Ue){var wt=Ue[_t];delete Ue[_t],Object.keys(wt).forEach(function(Lt){Ue[_t+"."+Lt]=wt[Lt]})}}return Qe("blend"),Qe("depth"),Qe("cull"),Qe("stencil"),Qe("polygonOffset"),Qe("scissor"),Qe("sample"),"vao"in Le&&(Ue.vao=Le.vao),Ue}function Os(Le,Ue){var Qe={},_t={};return Object.keys(Le).forEach(function(wt){var Lt=Le[wt];if(c.isDynamic(Lt)){_t[wt]=c.unbox(Lt,wt);return}else if(Ue&&Array.isArray(Lt)){for(var pr=0;pr0)return Wr.call(this,Wa(Le|0),Le|0)}else if(Array.isArray(Le)){if(Le.length)return Wr.call(this,Le,Le.length)}else return Oi.call(this,Le)}return p(ln,{stats:rs,destroy:function(){Is.destroy()}})}var es=ei.setFBO=Zo({framebuffer:c.define.call(null,ut,"framebuffer")});function $o(fo,Xo){var Os=0;Pn.procs.poll();var ra=Xo.color;ra&&(Ut.clearColor(+ra[0]||0,+ra[1]||0,+ra[2]||0,+ra[3]||0),Os|=ie),"depth"in Xo&&(Ut.clearDepth(+Xo.depth),Os|=fe),"stencil"in Xo&&(Ut.clearStencil(Xo.stencil|0),Os|=be),Ut.clear(Os)}function _s(fo){if("framebuffer"in fo)if(fo.framebuffer&&fo.framebuffer_reglType==="framebufferCube")for(var Xo=0;Xo<6;++Xo)es(p({framebuffer:fo.framebuffer.faces[Xo]},fo),$o);else es(fo,$o);else $o(null,fo)}function Go(fo){Ei.push(fo);function Xo(){var Os=Gt(Ei,fo);function ra(){var Ya=Gt(Ei,ra);Ei[Ya]=Ei[Ei.length-1],Ei.length-=1,Ei.length<=0&&zs()}Ei[Os]=ra}return Mo(),{cancel:Xo}}function Ys(){var fo=In.viewport,Xo=In.scissor_box;fo[0]=fo[1]=Xo[0]=Xo[1]=0,ua.viewportWidth=ua.framebufferWidth=ua.drawingBufferWidth=fo[2]=Xo[2]=Ut.drawingBufferWidth,ua.viewportHeight=ua.framebufferHeight=ua.drawingBufferHeight=fo[3]=Xo[3]=Ut.drawingBufferHeight}function Ll(){ua.tick+=1,ua.time=ru(),Ys(),Pn.procs.poll()}function mo(){cn.refresh(),Ys(),Pn.procs.refresh(),ta&&ta.update()}function ru(){return(h()-ka)/1e3}mo();function Rs(fo,Xo){var Os;switch(fo){case"frame":return Go(Xo);case"lost":Os=so;break;case"restore":Os=ti;break;case"destroy":Os=bi;break;default:}return Os.push(Xo),{cancel:function(){for(var ra=0;ra=0},read:Rn,destroy:Ws,_gl:Ut,_refresh:mo,poll:function(){Ll(),ta&&ta.update()},now:ru,stats:vr,getCachedCode:Yu,preloadCachedCode:Ul});return It.onDone(null,ql),ql}return Kt})}}),lq=ze({"node_modules/gl-util/context.js"(J,V){"use strict";var p=qd();V.exports=function(n){if(n?typeof n=="string"&&(n={container:n}):n={},E(n)?n={container:n}:k(n)?n={container:n}:l(n)?n={gl:n}:n=p(n,{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),n.pixelRatio||(n.pixelRatio=window.pixelRatio||1),n.gl)return n.gl;if(n.canvas&&(n.container=n.canvas.parentNode),n.container){if(typeof n.container=="string"){var r=document.querySelector(n.container);if(!r)throw Error("Element "+n.container+" is not found");n.container=r}E(n.container)?(n.canvas=n.container,n.container=n.canvas.parentNode):n.canvas||(n.canvas=e(),n.container.appendChild(n.canvas),b(n))}else if(!n.canvas)if(typeof document<"u")n.container=document.body||document.documentElement,n.canvas=e(),n.container.appendChild(n.canvas),b(n);else throw Error("Not DOM environment. Use headless-gl.");return n.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{n.gl=n.canvas.getContext(a,n.attrs)}catch{}return n.gl}),n.gl};function b(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var n=t.container.getBoundingClientRect();t.canvas.width=t.width||n.right-n.left,t.canvas.height=t.height||n.bottom-n.top}}function E(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function k(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),uq=ze({"node_modules/font-atlas/index.js"(J,V){"use strict";var p=dM(),b=[32,126];V.exports=E;function E(k){k=k||{};var l=k.shape?k.shape:k.canvas?[k.canvas.width,k.canvas.height]:[512,512],e=k.canvas||document.createElement("canvas"),t=k.font,n=typeof k.step=="number"?[k.step,k.step]:k.step||[32,32],r=k.chars||b;if(t&&typeof t!="string"&&(t=p(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var a=[],o=r[0],s=0;o<=r[1];o++)a[s++]=String.fromCharCode(o);r=a}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var m=n[0]/2,h=n[1]/2,o=0;ol[0]-n[0]/2&&(m=n[0]/2,h+=n[1]);return e}}}),vM=ze({"node_modules/bit-twiddle/twiddle.js"(J){"use strict";"use restrict";var V=32;J.INT_BITS=V,J.INT_MAX=2147483647,J.INT_MIN=-1<0)-(E<0)},J.abs=function(E){var k=E>>V-1;return(E^k)-k},J.min=function(E,k){return k^(E^k)&-(E65535)<<4,E>>>=k,l=(E>255)<<3,E>>>=l,k|=l,l=(E>15)<<2,E>>>=l,k|=l,l=(E>3)<<1,E>>>=l,k|=l,k|E>>1},J.log10=function(E){return E>=1e9?9:E>=1e8?8:E>=1e7?7:E>=1e6?6:E>=1e5?5:E>=1e4?4:E>=1e3?3:E>=100?2:E>=10?1:0},J.popCount=function(E){return E=E-(E>>>1&1431655765),E=(E&858993459)+(E>>>2&858993459),(E+(E>>>4)&252645135)*16843009>>>24};function p(E){var k=32;return E&=-E,E&&k--,E&65535&&(k-=16),E&16711935&&(k-=8),E&252645135&&(k-=4),E&858993459&&(k-=2),E&1431655765&&(k-=1),k}J.countTrailingZeros=p,J.nextPow2=function(E){return E+=E===0,--E,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E+1},J.prevPow2=function(E){return E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E-(E>>>1)},J.parity=function(E){return E^=E>>>16,E^=E>>>8,E^=E>>>4,E&=15,27030>>>E&1};var b=new Array(256);(function(E){for(var k=0;k<256;++k){var l=k,e=k,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;E[k]=e<>>8&255]<<16|b[E>>>16&255]<<8|b[E>>>24&255]},J.interleave2=function(E,k){return E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,k&=65535,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,E|k<<1},J.deinterleave2=function(E,k){return E=E>>>k&1431655765,E=(E|E>>>1)&858993459,E=(E|E>>>2)&252645135,E=(E|E>>>4)&16711935,E=(E|E>>>16)&65535,E<<16>>16},J.interleave3=function(E,k,l){return E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,k&=1023,k=(k|k<<16)&4278190335,k=(k|k<<8)&251719695,k=(k|k<<4)&3272356035,k=(k|k<<2)&1227133513,E|=k<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,E|l<<2},J.deinterleave3=function(E,k){return E=E>>>k&1227133513,E=(E|E>>>2)&3272356035,E=(E|E>>>4)&251719695,E=(E|E>>>8)&4278190335,E=(E|E>>>16)&1023,E<<22>>22},J.nextCombination=function(E){var k=E|E-1;return k+1|(~k&-~k)-1>>>p(E)+1}}}),cq=ze({"node_modules/dup/dup.js"(J,V){"use strict";function p(k,l,e){var t=k[e]|0;if(t<=0)return[];var n=new Array(t),r;if(e===k.length-1)for(r=0;r"u"&&(l=0),typeof k){case"number":if(k>0)return b(k|0,l);break;case"object":if(typeof k.length=="number")return p(k,l,0);break}return[]}V.exports=E}}),fq=ze({"node_modules/typedarray-pool/pool.js"(J){"use strict";var V=vM(),p=cq(),b=$v().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:p([32,0]),UINT16:p([32,0]),UINT32:p([32,0]),BIGUINT64:p([32,0]),INT8:p([32,0]),INT16:p([32,0]),INT32:p([32,0]),BIGINT64:p([32,0]),FLOAT:p([32,0]),DOUBLE:p([32,0]),DATA:p([32,0]),UINT8C:p([32,0]),BUFFER:p([32,0])});var E=typeof Uint8ClampedArray<"u",k=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=p([32,0])),e.BIGUINT64||(e.BIGUINT64=p([32,0])),e.BIGINT64||(e.BIGINT64=p([32,0])),e.BUFFER||(e.BUFFER=p([32,0]));var t=e.DATA,n=e.BUFFER;J.free=function(u){if(b.isBuffer(u))n[V.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var A=u.length||u.byteLength,x=V.log2(A)|0;t[x].push(u)}};function r(f){if(f){var u=f.length||f.byteLength,A=V.log2(u);t[A].push(f)}}function a(f){r(f.buffer)}J.freeUint8=J.freeUint16=J.freeUint32=J.freeBigUint64=J.freeInt8=J.freeInt16=J.freeInt32=J.freeBigInt64=J.freeFloat32=J.freeFloat=J.freeFloat64=J.freeDouble=J.freeUint8Clamped=J.freeDataView=a,J.freeArrayBuffer=r,J.freeBuffer=function(u){n[V.log2(u.length)].push(u)},J.malloc=function(u,A){if(A===void 0||A==="arraybuffer")return o(u);switch(A){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return m(u);case"int8":return h(u);case"int16":return v(u);case"int32":return g(u);case"float":case"float32":return i(u);case"double":case"float64":return w(u);case"uint8_clamped":return S(u);case"bigint64":return C(u);case"biguint64":return M(u);case"buffer":return T(u);case"data":case"dataview":return _(u);default:return null}return null};function o(u){var u=V.nextPow2(u),A=V.log2(u),x=t[A];return x.length>0?x.pop():new ArrayBuffer(u)}J.mallocArrayBuffer=o;function s(f){return new Uint8Array(o(f),0,f)}J.mallocUint8=s;function c(f){return new Uint16Array(o(2*f),0,f)}J.mallocUint16=c;function m(f){return new Uint32Array(o(4*f),0,f)}J.mallocUint32=m;function h(f){return new Int8Array(o(f),0,f)}J.mallocInt8=h;function v(f){return new Int16Array(o(2*f),0,f)}J.mallocInt16=v;function g(f){return new Int32Array(o(4*f),0,f)}J.mallocInt32=g;function i(f){return new Float32Array(o(4*f),0,f)}J.mallocFloat32=J.mallocFloat=i;function w(f){return new Float64Array(o(8*f),0,f)}J.mallocFloat64=J.mallocDouble=w;function S(f){return E?new Uint8ClampedArray(o(f),0,f):s(f)}J.mallocUint8Clamped=S;function M(f){return k?new BigUint64Array(o(8*f),0,f):null}J.mallocBigUint64=M;function C(f){return l?new BigInt64Array(o(8*f),0,f):null}J.mallocBigInt64=C;function _(f){return new DataView(o(f),0,f)}J.mallocDataView=_;function T(f){f=V.nextPow2(f);var u=V.log2(f),A=n[u];return A.length>0?A.pop():new b(f)}J.mallocBuffer=T,J.clearCache=function(){for(var u=0;u<32;++u)e.UINT8[u].length=0,e.UINT16[u].length=0,e.UINT32[u].length=0,e.INT8[u].length=0,e.INT16[u].length=0,e.INT32[u].length=0,e.FLOAT[u].length=0,e.DOUBLE[u].length=0,e.BIGUINT64[u].length=0,e.BIGINT64[u].length=0,e.UINT8C[u].length=0,t[u].length=0,n[u].length=0}}}),hq=ze({"node_modules/is-plain-obj/index.js"(J,V){"use strict";var p=Object.prototype.toString;V.exports=function(b){var E;return p.call(b)==="[object Object]"&&(E=Object.getPrototypeOf(b),E===null||E===Object.getPrototypeOf({}))}}}),mM=ze({"node_modules/parse-unit/index.js"(J,V){V.exports=function(b,E){E||(E=[0,""]),b=String(b);var k=parseFloat(b,10);return E[0]=k,E[1]=b.match(/[\d.\-\+]*\s*(.*)/)[1]||"",E}}}),dq=ze({"node_modules/gl-text/node_modules/to-px/topx.js"(J,V){"use strict";var p=mM();V.exports=l;var b=96;function E(e,t){var n=p(getComputedStyle(e).getPropertyValue(t));return n[0]*l(n[1],e)}function k(e,t){var n=document.createElement("div");n.style["font-size"]="128"+e,t.appendChild(n);var r=E(n,"font-size")/128;return t.removeChild(n),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return k(e,t);case"em":return E(t,"font-size");case"rem":return E(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 b;case"cm":return b/2.54;case"mm":return b/25.4;case"pt":return b/72;case"pc":return b/6}return 1}}}),pq=ze({"node_modules/detect-kerning/index.js"(J,V){"use strict";V.exports=k;var p=k.canvas=document.createElement("canvas"),b=p.getContext("2d"),E=l([32,126]);k.createPairs=l,k.ascii=E;function k(e,t){Array.isArray(e)&&(e=e.join(", "));var n={},r,a=16,o=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(o=t.threshold))),r||(r=E),b.font=a+"px "+e;for(var s=0;sa*o){var v=(h-m)/a;n[c]=v*1e3}}return n}function l(e){for(var t=[],n=e[0];n<=e[1];n++)for(var r=String.fromCharCode(n),a=e[0];a0;n-=4)if(t[n]!==0)return Math.floor((n-3)*.25/e)}}}),mq=ze({"node_modules/gl-text/dist.js"(J,V){"use strict";var p=sq(),b=qd(),E=pM(),k=lq(),l=iM(),e=ay(),t=uq(),n=fq(),r=yg(),a=hq(),o=mM(),s=dq(),c=pq(),m=Vc(),h=vq(),v=f0(),g=vM(),i=g.nextPow2,w=new l,S=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(S=!0),document.body.removeChild(M));var M,C=function(f){_(f)?(f={regl:f},this.gl=f.regl._gl):this.gl=k(f),this.shader=w.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=f.regl||E({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(),w.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(a(f)?f:{})};C.prototype.createShader=function(){var f=this.regl,u=f({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:f.prop("count"),offset:f.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:f.this("sizeBuffer")},width:{offset:0,stride:8,buffer:f.this("sizeBuffer")},char:f.this("charBuffer"),position:f.this("position")},uniforms:{atlasSize:function(x,z){return[z.atlas.width,z.atlas.height]},atlasDim:function(x,z){return[z.atlas.cols,z.atlas.rows]},atlas:function(x,z){return z.atlas.texture},charStep:function(x,z){return z.atlas.step},em:function(x,z){return z.atlas.em},color:f.prop("color"),opacity:f.prop("opacity"),viewport:f.this("viewportArray"),scale:f.this("scale"),align:f.prop("align"),baseline:f.prop("baseline"),translate:f.this("translate"),positionOffset:f.prop("positionOffset")},primitive:"points",viewport:f.this("viewport"),vert:` +`),fa;if(nr&&(fa=Kd(Ir),nr[fa]))return nr[fa].apply(null,Xr);var Pa=Function.apply(null,Or.concat(Ir));return nr&&(nr[fa]=Pa),Pa.apply(null,Xr)}return{global:Na,link:Wr,block:wa,proc:ki,scope:za,cond:Ba,compile:ii}}var gi="xyzw".split(""),pi=5121,Pi=1,ji=2,Ra=0,Ga=1,Ki=2,pn=3,ao=4,Co=5,ho=6,No="dither",Wn="blend.enable",Os="blend.color",fs="blend.equation",zo="blend.func",Qa="depth.enable",io="depth.func",Ms="depth.range",Ns="depth.mask",jl="colorMask",zu="cull.enable",tu="cull.face",Lc="frontFace",Cl="lineWidth",oc="polygonOffset.enable",of="polygonOffset.offset",Cf="sample.alpha",Jd="sample.enable",Ph="sample.coverage",kp="stencil.enable",cd="stencil.mask",ru="stencil.func",Cp="stencil.opFront",th="stencil.opBack",fd="scissor.enable",hd="scissor.box",sc="viewport",Qd="profile",Df="framebuffer",Ih="vert",Lf="frag",Bu="elements",Ff="primitive",rh="count",ep="offset",au="instances",ke="vao",Re="Width",He="Height",$e=Df+Re,ot=Df+He,nt=sc+Re,ht=sc+He,Ut="drawingBuffer",Xt=Ut+Re,Nt=Ut+He,Zt=[zo,fs,ru,Cp,th,Ph,sc,hd,of],or=34962,gr=34963,Er=2884,Br=3042,oa=3024,Ma=2960,si=2929,Wi=3089,Qi=32823,on=32926,yn=32928,_o=5126,Io=35664,Pn=35665,es=35666,ll=5124,Dl=35667,lc=35668,sf=35669,_l=35670,xl=35671,Ou=35672,Fc=35673,Pc=35674,Ic=35675,lf=35676,uc=35678,Pf=35680,Rh=4,ae=1028,de=1029,Te=2304,Pe=2305,ze=32775,Ne=32776,lt=519,Qe=7680,yt=0,Ft=1,Rt=32774,er=513,Qt=36160,wr=36064,Cr={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ir={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},pr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},xr={cw:Te,ccw:Pe};function Dr(xt){return Array.isArray(xt)||vt(xt)||Tt(xt)}function Lr(xt){return xt.sort(function(nr,fr){return nr===sc?-1:fr===sc?1:nr=1,Or>=2,nr)}else if(fr===ao){var Xr=xt.data;return new mr(Xr.thisDep,Xr.contextDep,Xr.propDep,nr)}else{if(fr===Co)return new mr(!1,!1,!1,nr);if(fr===ho){for(var aa=!1,Wr=!1,wa=!1,za=0;za=1&&(Wr=!0),Na>=2&&(wa=!0)}else Ba.type===ao&&(aa=aa||Ba.data.thisDep,Wr=Wr||Ba.data.contextDep,wa=wa||Ba.data.propDep)}return new mr(aa,Wr,wa,nr)}else return new mr(fr===pn,fr===Ki,fr===Ga,nr)}}var ei=new mr(!1,!1,!1,function(){});function bi(xt,nr,fr,Or,Xr,aa,Wr,wa,za,Ba,Na,Ji,ki,ii,ma,Ir){var fa=Ba.Record,Pa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Pa.min=ze,Pa.max=Ne);var Ha=fr.angle_instanced_arrays,Ta=fr.webgl_draw_buffers,hi=fr.oes_vertex_array_object,oi={dirty:!0,profile:Ir.profile},an={},Aa=[],ga={},wi={};function ri(tr){return tr.replace(".","_")}function $a(tr,hr,_r){var Zr=ri(tr);Aa.push(tr),an[Zr]=oi[Zr]=!!_r,ga[Zr]=hr}function Ja(tr,hr,_r){var Zr=ri(tr);Aa.push(tr),Array.isArray(_r)?(oi[Zr]=_r.slice(),an[Zr]=_r.slice()):oi[Zr]=an[Zr]=_r,wi[Zr]=hr}function Ai(tr){return!!isNaN(tr)}$a(No,oa),$a(Wn,Br),Ja(Os,"blendColor",[0,0,0,0]),Ja(fs,"blendEquationSeparate",[Rt,Rt]),Ja(zo,"blendFuncSeparate",[Ft,yt,Ft,yt]),$a(Qa,si,!0),Ja(io,"depthFunc",er),Ja(Ms,"depthRange",[0,1]),Ja(Ns,"depthMask",!0),Ja(jl,jl,[!0,!0,!0,!0]),$a(zu,Er),Ja(tu,"cullFace",de),Ja(Lc,Lc,Pe),Ja(Cl,Cl,1),$a(oc,Qi),Ja(of,"polygonOffset",[0,0]),$a(Cf,on),$a(Jd,yn),Ja(Ph,"sampleCoverage",[1,!1]),$a(kp,Ma),Ja(cd,"stencilMask",-1),Ja(ru,"stencilFunc",[lt,0,-1]),Ja(Cp,"stencilOpSeparate",[ae,Qe,Qe,Qe]),Ja(th,"stencilOpSeparate",[de,Qe,Qe,Qe]),$a(fd,Wi),Ja(hd,"scissor",[0,0,xt.drawingBufferWidth,xt.drawingBufferHeight]),Ja(sc,sc,[0,0,xt.drawingBufferWidth,xt.drawingBufferHeight]);var nn={gl:xt,context:ki,strings:nr,next:an,current:oi,draw:Ji,elements:aa,buffer:Xr,shader:Na,attributes:Ba.state,vao:Ba,uniforms:za,framebuffer:wa,extensions:fr,timer:ii,isBufferArgs:Dr},Ln={primTypes:na,compareFuncs:ir,blendFuncs:Cr,blendEquations:Pa,stencilOps:pr,glTypes:ar,orientationType:xr};Ta&&(Ln.backBuffer=[de],Ln.drawBuffer=T(Or.maxDrawbuffers,function(tr){return tr===0?[0]:T(tr,function(hr){return wr+hr})}));var fi=0;function zi(){var tr=La({cache:ma}),hr=tr.link,_r=tr.global;tr.id=fi++,tr.batchId="0";var Zr=hr(nn),sa=tr.shared={props:"a0"};Object.keys(nn).forEach(function(Xe){sa[Xe]=_r.def(Zr,".",Xe)});var ve=tr.next={},Ae=tr.current={};Object.keys(wi).forEach(function(Xe){Array.isArray(oi[Xe])&&(ve[Xe]=_r.def(sa.next,".",Xe),Ae[Xe]=_r.def(sa.current,".",Xe))});var Le=tr.constants={};Object.keys(Ln).forEach(function(Xe){Le[Xe]=_r.def(JSON.stringify(Ln[Xe]))}),tr.invoke=function(Xe,rt){switch(rt.type){case Ra:var Ct=["this",sa.context,sa.props,tr.batchId];return Xe.def(hr(rt.data),".call(",Ct.slice(0,Math.max(rt.data.length+1,4)),")");case Ga:return Xe.def(sa.props,rt.data);case Ki:return Xe.def(sa.context,rt.data);case pn:return Xe.def("this",rt.data);case ao:return rt.data.append(tr,Xe),rt.data.ref;case Co:return rt.data.toString();case ho:return rt.data.map(function(Jt){return tr.invoke(Xe,Jt)})}},tr.attribCache={};var We={};return tr.scopeAttrib=function(Xe){var rt=nr.id(Xe);if(rt in We)return We[rt];var Ct=Ba.scope[rt];Ct||(Ct=Ba.scope[rt]=new fa);var Jt=We[rt]=hr(Ct);return Jt},tr}function Sn(tr){var hr=tr.static,_r=tr.dynamic,Zr;if(Qd in hr){var sa=!!hr[Qd];Zr=ka(function(Ae,Le){return sa}),Zr.enable=sa}else if(Qd in _r){var ve=_r[Qd];Zr=Ua(ve,function(Ae,Le){return Ae.invoke(Le,ve)})}return Zr}function kn(tr,hr){var _r=tr.static,Zr=tr.dynamic;if(Df in _r){var sa=_r[Df];return sa?(sa=wa.getFramebuffer(sa),ka(function(Ae,Le){var We=Ae.link(sa),Xe=Ae.shared;Le.set(Xe.framebuffer,".next",We);var rt=Xe.context;return Le.set(rt,"."+$e,We+".width"),Le.set(rt,"."+ot,We+".height"),We})):ka(function(Ae,Le){var We=Ae.shared;Le.set(We.framebuffer,".next","null");var Xe=We.context;return Le.set(Xe,"."+$e,Xe+"."+Xt),Le.set(Xe,"."+ot,Xe+"."+Nt),"null"})}else if(Df in Zr){var ve=Zr[Df];return Ua(ve,function(Ae,Le){var We=Ae.invoke(Le,ve),Xe=Ae.shared,rt=Xe.framebuffer,Ct=Le.def(rt,".getFramebuffer(",We,")");Le.set(rt,".next",Ct);var Jt=Xe.context;return Le.set(Jt,"."+$e,Ct+"?"+Ct+".width:"+Jt+"."+Xt),Le.set(Jt,"."+ot,Ct+"?"+Ct+".height:"+Jt+"."+Nt),Ct})}else return null}function so(tr,hr,_r){var Zr=tr.static,sa=tr.dynamic;function ve(We){if(We in Zr){var Xe=Zr[We],rt=!0,Ct=Xe.x|0,Jt=Xe.y|0,br,ea;return"width"in Xe?br=Xe.width|0:rt=!1,"height"in Xe?ea=Xe.height|0:rt=!1,new mr(!rt&&hr&&hr.thisDep,!rt&&hr&&hr.contextDep,!rt&&hr&&hr.propDep,function(ba,ca){var _a=ba.shared.context,Ea=br;"width"in Xe||(Ea=ca.def(_a,".",$e,"-",Ct));var Ia=ea;return"height"in Xe||(Ia=ca.def(_a,".",ot,"-",Jt)),[Ct,Jt,Ea,Ia]})}else if(We in sa){var Vr=sa[We],Ur=Ua(Vr,function(ba,ca){var _a=ba.invoke(ca,Vr),Ea=ba.shared.context,Ia=ca.def(_a,".x|0"),Za=ca.def(_a,".y|0"),Mi=ca.def('"width" in ',_a,"?",_a,".width|0:","(",Ea,".",$e,"-",Ia,")"),lo=ca.def('"height" in ',_a,"?",_a,".height|0:","(",Ea,".",ot,"-",Za,")");return[Ia,Za,Mi,lo]});return hr&&(Ur.thisDep=Ur.thisDep||hr.thisDep,Ur.contextDep=Ur.contextDep||hr.contextDep,Ur.propDep=Ur.propDep||hr.propDep),Ur}else return hr?new mr(hr.thisDep,hr.contextDep,hr.propDep,function(ba,ca){var _a=ba.shared.context;return[0,0,ca.def(_a,".",$e),ca.def(_a,".",ot)]}):null}var Ae=ve(sc);if(Ae){var Le=Ae;Ae=new mr(Ae.thisDep,Ae.contextDep,Ae.propDep,function(We,Xe){var rt=Le.append(We,Xe),Ct=We.shared.context;return Xe.set(Ct,"."+nt,rt[2]),Xe.set(Ct,"."+ht,rt[3]),rt})}return{viewport:Ae,scissor_box:ve(hd)}}function Us(tr,hr){var _r=tr.static,Zr=typeof _r[Lf]=="string"&&typeof _r[Ih]=="string";if(Zr){if(Object.keys(hr.dynamic).length>0)return null;var sa=hr.static,ve=Object.keys(sa);if(ve.length>0&&typeof sa[ve[0]]=="number"){for(var Ae=[],Le=0;Le"+Ia+"?"+rt+".constant["+Ia+"]:0;"}).join(""),"}}else{","if(",br,"(",rt,".buffer)){",ba,"=",ea,".createStream(",or,",",rt,".buffer);","}else{",ba,"=",ea,".getBuffer(",rt,".buffer);","}",ca,'="type" in ',rt,"?",Jt.glTypes,"[",rt,".type]:",ba,".dtype;",Vr.normalized,"=!!",rt,".normalized;");function _a(Ea){Xe(Vr[Ea],"=",rt,".",Ea,"|0;")}return _a("size"),_a("offset"),_a("stride"),_a("divisor"),Xe("}}"),Xe.exit("if(",Vr.isStream,"){",ea,".destroyStream(",ba,");","}"),Vr}sa[ve]=Ua(Ae,Le)}),sa}function Rc(tr){var hr=tr.static,_r=tr.dynamic,Zr={};return Object.keys(hr).forEach(function(sa){var ve=hr[sa];Zr[sa]=ka(function(Ae,Le){return typeof ve=="number"||typeof ve=="boolean"?""+ve:Ae.link(ve)})}),Object.keys(_r).forEach(function(sa){var ve=_r[sa];Zr[sa]=Ua(ve,function(Ae,Le){return Ae.invoke(Le,ve)})}),Zr}function cf(tr,hr,_r,Zr,sa){var ve=tr.static,Ae=tr.dynamic,Le=Us(tr,hr),We=kn(tr,sa),Xe=so(tr,We,sa),rt=bo(tr,sa),Ct=uf(tr,sa),Jt=iu(tr,sa,Le);function br(_a){var Ea=Xe[_a];Ea&&(Ct[_a]=Ea)}br(sc),br(ri(hd));var ea=Object.keys(Ct).length>0,Vr={framebuffer:We,draw:rt,shader:Jt,state:Ct,dirty:ea,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Vr.profile=Sn(tr,sa),Vr.uniforms=hs(_r,sa),Vr.drawVAO=Vr.scopeVAO=rt.vao,!Vr.drawVAO&&Jt.program&&!Le&&fr.angle_instanced_arrays&&rt.static.elements){var Ur=!0,ba=Jt.program.attributes.map(function(_a){var Ea=hr.static[_a];return Ur=Ur&&!!Ea,Ea});if(Ur&&ba.length>0){var ca=Ba.getVAO(Ba.createVAO({attributes:ba,elements:rt.static.elements}));Vr.drawVAO=new mr(null,null,null,function(_a,Ea){return _a.link(ca)}),Vr.useVAO=!0}}return Le?Vr.useVAO=!0:Vr.attributes=cc(hr,sa),Vr.context=Rc(Zr,sa),Vr}function ql(tr,hr,_r){var Zr=tr.shared,sa=Zr.context,ve=tr.scope();Object.keys(_r).forEach(function(Ae){hr.save(sa,"."+Ae);var Le=_r[Ae],We=Le.append(tr,hr);Array.isArray(We)?ve(sa,".",Ae,"=[",We.join(),"];"):ve(sa,".",Ae,"=",We,";")}),hr(ve)}function Vl(tr,hr,_r,Zr){var sa=tr.shared,ve=sa.gl,Ae=sa.framebuffer,Le;Ta&&(Le=hr.def(sa.extensions,".webgl_draw_buffers"));var We=tr.constants,Xe=We.drawBuffer,rt=We.backBuffer,Ct;_r?Ct=_r.append(tr,hr):Ct=hr.def(Ae,".next"),Zr||hr("if(",Ct,"!==",Ae,".cur){"),hr("if(",Ct,"){",ve,".bindFramebuffer(",Qt,",",Ct,".framebuffer);"),Ta&&hr(Le,".drawBuffersWEBGL(",Xe,"[",Ct,".colorAttachments.length]);"),hr("}else{",ve,".bindFramebuffer(",Qt,",null);"),Ta&&hr(Le,".drawBuffersWEBGL(",rt,");"),hr("}",Ae,".cur=",Ct,";"),Zr||hr("}")}function nu(tr,hr,_r){var Zr=tr.shared,sa=Zr.gl,ve=tr.current,Ae=tr.next,Le=Zr.current,We=Zr.next,Xe=tr.cond(Le,".dirty");Aa.forEach(function(rt){var Ct=ri(rt);if(!(Ct in _r.state)){var Jt,br;if(Ct in Ae){Jt=Ae[Ct],br=ve[Ct];var ea=T(oi[Ct].length,function(Ur){return Xe.def(Jt,"[",Ur,"]")});Xe(tr.cond(ea.map(function(Ur,ba){return Ur+"!=="+br+"["+ba+"]"}).join("||")).then(sa,".",wi[Ct],"(",ea,");",ea.map(function(Ur,ba){return br+"["+ba+"]="+Ur}).join(";"),";"))}else{Jt=Xe.def(We,".",Ct);var Vr=tr.cond(Jt,"!==",Le,".",Ct);Xe(Vr),Ct in ga?Vr(tr.cond(Jt).then(sa,".enable(",ga[Ct],");").else(sa,".disable(",ga[Ct],");"),Le,".",Ct,"=",Jt,";"):Vr(sa,".",wi[Ct],"(",Jt,");",Le,".",Ct,"=",Jt,";")}}}),Object.keys(_r.state).length===0&&Xe(Le,".dirty=false;"),hr(Xe)}function Xn(tr,hr,_r,Zr){var sa=tr.shared,ve=tr.current,Ae=sa.current,Le=sa.gl,We;Lr(Object.keys(_r)).forEach(function(Xe){var rt=_r[Xe];if(!(Zr&&!Zr(rt))){var Ct=rt.append(tr,hr);if(ga[Xe]){var Jt=ga[Xe];ha(rt)?(We=tr.link(Ct,{stable:!0}),hr(tr.cond(We).then(Le,".enable(",Jt,");").else(Le,".disable(",Jt,");")),hr(Ae,".",Xe,"=",We,";")):(hr(tr.cond(Ct).then(Le,".enable(",Jt,");").else(Le,".disable(",Jt,");")),hr(Ae,".",Xe,"=",Ct,";"))}else if(Wt(Ct)){var br=ve[Xe];hr(Le,".",wi[Xe],"(",Ct,");",Ct.map(function(ea,Vr){return br+"["+Vr+"]="+ea}).join(";"),";")}else ha(rt)?(We=tr.link(Ct,{stable:!0}),hr(Le,".",wi[Xe],"(",We,");",Ae,".",Xe,"=",We,";")):hr(Le,".",wi[Xe],"(",Ct,");",Ae,".",Xe,"=",Ct,";")}})}function xu(tr,hr){Ha&&(tr.instancing=hr.def(tr.shared.extensions,".angle_instanced_arrays"))}function xs(tr,hr,_r,Zr,sa){var ve=tr.shared,Ae=tr.stats,Le=ve.current,We=ve.timer,Xe=_r.profile;function rt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Ct,Jt;function br(_a){Ct=hr.def(),_a(Ct,"=",rt(),";"),typeof sa=="string"?_a(Ae,".count+=",sa,";"):_a(Ae,".count++;"),ii&&(Zr?(Jt=hr.def(),_a(Jt,"=",We,".getNumPendingQueries();")):_a(We,".beginQuery(",Ae,");"))}function ea(_a){_a(Ae,".cpuTime+=",rt(),"-",Ct,";"),ii&&(Zr?_a(We,".pushScopeStats(",Jt,",",We,".getNumPendingQueries(),",Ae,");"):_a(We,".endQuery();"))}function Vr(_a){var Ea=hr.def(Le,".profile");hr(Le,".profile=",_a,";"),hr.exit(Le,".profile=",Ea,";")}var Ur;if(Xe){if(ha(Xe)){Xe.enable?(br(hr),ea(hr.exit),Vr("true")):Vr("false");return}Ur=Xe.append(tr,hr),Vr(Ur)}else Ur=hr.def(Le,".profile");var ba=tr.block();br(ba),hr("if(",Ur,"){",ba,"}");var ca=tr.block();ea(ca),hr.exit("if(",Ur,"){",ca,"}")}function zc(tr,hr,_r,Zr,sa){var ve=tr.shared;function Ae(We){switch(We){case Io:case Dl:case xl:return 2;case Pn:case lc:case Ou:return 3;case es:case sf:case Fc:return 4;default:return 1}}function Le(We,Xe,rt){var Ct=ve.gl,Jt=hr.def(We,".location"),br=hr.def(ve.attributes,"[",Jt,"]"),ea=rt.state,Vr=rt.buffer,Ur=[rt.x,rt.y,rt.z,rt.w],ba=["buffer","normalized","offset","stride"];function ca(){hr("if(!",br,".buffer){",Ct,".enableVertexAttribArray(",Jt,");}");var Ea=rt.type,Ia;if(rt.size?Ia=hr.def(rt.size,"||",Xe):Ia=Xe,hr("if(",br,".type!==",Ea,"||",br,".size!==",Ia,"||",ba.map(function(Mi){return br+"."+Mi+"!=="+rt[Mi]}).join("||"),"){",Ct,".bindBuffer(",or,",",Vr,".buffer);",Ct,".vertexAttribPointer(",[Jt,Ia,Ea,rt.normalized,rt.stride,rt.offset],");",br,".type=",Ea,";",br,".size=",Ia,";",ba.map(function(Mi){return br+"."+Mi+"="+rt[Mi]+";"}).join(""),"}"),Ha){var Za=rt.divisor;hr("if(",br,".divisor!==",Za,"){",tr.instancing,".vertexAttribDivisorANGLE(",[Jt,Za],");",br,".divisor=",Za,";}")}}function _a(){hr("if(",br,".buffer){",Ct,".disableVertexAttribArray(",Jt,");",br,".buffer=null;","}if(",gi.map(function(Ea,Ia){return br+"."+Ea+"!=="+Ur[Ia]}).join("||"),"){",Ct,".vertexAttrib4f(",Jt,",",Ur,");",gi.map(function(Ea,Ia){return br+"."+Ea+"="+Ur[Ia]+";"}).join(""),"}")}ea===Pi?ca():ea===ji?_a():(hr("if(",ea,"===",Pi,"){"),ca(),hr("}else{"),_a(),hr("}"))}Zr.forEach(function(We){var Xe=We.name,rt=_r.attributes[Xe],Ct;if(rt){if(!sa(rt))return;Ct=rt.append(tr,hr)}else{if(!sa(ei))return;var Jt=tr.scopeAttrib(Xe);Ct={},Object.keys(new fa).forEach(function(br){Ct[br]=hr.def(Jt,".",br)})}Le(tr.link(We),Ae(We.info.type),Ct)})}function ff(tr,hr,_r,Zr,sa,ve){for(var Ae=tr.shared,Le=Ae.gl,We,Xe=0;Xe1){for(var ps=[],Qs=[],bl=0;bl>1)",Vr],");")}function Za(){_r(Ur,".drawArraysInstancedANGLE(",[Jt,br,ea,Vr],");")}rt&&rt!=="null"?ca?Ia():(_r("if(",rt,"){"),Ia(),_r("}else{"),Za(),_r("}")):Za()}function Ea(){function Ia(){_r(ve+".drawElements("+[Jt,ea,ba,br+"<<(("+ba+"-"+pi+")>>1)"]+");")}function Za(){_r(ve+".drawArrays("+[Jt,br,ea]+");")}rt&&rt!=="null"?ca?Ia():(_r("if(",rt,"){"),Ia(),_r("}else{"),Za(),_r("}")):Za()}Ha&&(typeof Vr!="number"||Vr>=0)?typeof Vr=="string"?(_r("if(",Vr,">0){"),_a(),_r("}else if(",Vr,"<0){"),Ea(),_r("}")):_a():Ea()}function Nn(tr,hr,_r,Zr,sa){var ve=zi(),Ae=ve.proc("body",sa);return Ha&&(ve.instancing=Ae.def(ve.shared.extensions,".angle_instanced_arrays")),tr(ve,Ae,_r,Zr),ve.compile().body}function Do(tr,hr,_r,Zr){xu(tr,hr),_r.useVAO?_r.drawVAO?hr(tr.shared.vao,".setVAO(",_r.drawVAO.append(tr,hr),");"):hr(tr.shared.vao,".setVAO(",tr.shared.vao,".targetVAO);"):(hr(tr.shared.vao,".setVAO(null);"),zc(tr,hr,_r,Zr.attributes,function(){return!0})),ff(tr,hr,_r,Zr.uniforms,function(){return!0},!1),hf(tr,hr,hr,_r)}function Ps(tr,hr){var _r=tr.proc("draw",1);xu(tr,_r),ql(tr,_r,hr.context),Vl(tr,_r,hr.framebuffer),nu(tr,_r,hr),Xn(tr,_r,hr.state),xs(tr,_r,hr,!1,!0);var Zr=hr.shader.progVar.append(tr,_r);if(_r(tr.shared.gl,".useProgram(",Zr,".program);"),hr.shader.program)Do(tr,_r,hr,hr.shader.program);else{_r(tr.shared.vao,".setVAO(null);");var sa=tr.global.def("{}"),ve=_r.def(Zr,".id"),Ae=_r.def(sa,"[",ve,"]");_r(tr.cond(Ae).then(Ae,".call(this,a0);").else(Ae,"=",sa,"[",ve,"]=",tr.link(function(Le){return Nn(Do,tr,hr,Le,1)}),"(",Zr,");",Ae,".call(this,a0);"))}Object.keys(hr.state).length>0&&_r(tr.shared.current,".dirty=true;"),tr.shared.vao&&_r(tr.shared.vao,".setVAO(null);")}function ur(tr,hr,_r,Zr){tr.batchId="a1",xu(tr,hr);function sa(){return!0}zc(tr,hr,_r,Zr.attributes,sa),ff(tr,hr,_r,Zr.uniforms,sa,!1),hf(tr,hr,hr,_r)}function Kr(tr,hr,_r,Zr){xu(tr,hr);var sa=_r.contextDep,ve=hr.def(),Ae="a0",Le="a1",We=hr.def();tr.shared.props=We,tr.batchId=ve;var Xe=tr.scope(),rt=tr.scope();hr(Xe.entry,"for(",ve,"=0;",ve,"<",Le,";++",ve,"){",We,"=",Ae,"[",ve,"];",rt,"}",Xe.exit);function Ct(ba){return ba.contextDep&&sa||ba.propDep}function Jt(ba){return!Ct(ba)}if(_r.needsContext&&ql(tr,rt,_r.context),_r.needsFramebuffer&&Vl(tr,rt,_r.framebuffer),Xn(tr,rt,_r.state,Ct),_r.profile&&Ct(_r.profile)&&xs(tr,rt,_r,!1,!0),Zr)_r.useVAO?_r.drawVAO?Ct(_r.drawVAO)?rt(tr.shared.vao,".setVAO(",_r.drawVAO.append(tr,rt),");"):Xe(tr.shared.vao,".setVAO(",_r.drawVAO.append(tr,Xe),");"):Xe(tr.shared.vao,".setVAO(",tr.shared.vao,".targetVAO);"):(Xe(tr.shared.vao,".setVAO(null);"),zc(tr,Xe,_r,Zr.attributes,Jt),zc(tr,rt,_r,Zr.attributes,Ct)),ff(tr,Xe,_r,Zr.uniforms,Jt,!1),ff(tr,rt,_r,Zr.uniforms,Ct,!0),hf(tr,Xe,rt,_r);else{var br=tr.global.def("{}"),ea=_r.shader.progVar.append(tr,rt),Vr=rt.def(ea,".id"),Ur=rt.def(br,"[",Vr,"]");rt(tr.shared.gl,".useProgram(",ea,".program);","if(!",Ur,"){",Ur,"=",br,"[",Vr,"]=",tr.link(function(ba){return Nn(ur,tr,_r,ba,2)}),"(",ea,");}",Ur,".call(this,a0[",ve,"],",ve,");")}}function Jr(tr,hr){var _r=tr.proc("batch",2);tr.batchId="0",xu(tr,_r);var Zr=!1,sa=!0;Object.keys(hr.context).forEach(function(br){Zr=Zr||hr.context[br].propDep}),Zr||(ql(tr,_r,hr.context),sa=!1);var ve=hr.framebuffer,Ae=!1;ve?(ve.propDep?Zr=Ae=!0:ve.contextDep&&Zr&&(Ae=!0),Ae||Vl(tr,_r,ve)):Vl(tr,_r,null),hr.state.viewport&&hr.state.viewport.propDep&&(Zr=!0);function Le(br){return br.contextDep&&Zr||br.propDep}nu(tr,_r,hr),Xn(tr,_r,hr.state,function(br){return!Le(br)}),(!hr.profile||!Le(hr.profile))&&xs(tr,_r,hr,!1,"a1"),hr.contextDep=Zr,hr.needsContext=sa,hr.needsFramebuffer=Ae;var We=hr.shader.progVar;if(We.contextDep&&Zr||We.propDep)Kr(tr,_r,hr,null);else{var Xe=We.append(tr,_r);if(_r(tr.shared.gl,".useProgram(",Xe,".program);"),hr.shader.program)Kr(tr,_r,hr,hr.shader.program);else{_r(tr.shared.vao,".setVAO(null);");var rt=tr.global.def("{}"),Ct=_r.def(Xe,".id"),Jt=_r.def(rt,"[",Ct,"]");_r(tr.cond(Jt).then(Jt,".call(this,a0,a1);").else(Jt,"=",rt,"[",Ct,"]=",tr.link(function(br){return Nn(Kr,tr,hr,br,2)}),"(",Xe,");",Jt,".call(this,a0,a1);"))}}Object.keys(hr.state).length>0&&_r(tr.shared.current,".dirty=true;"),tr.shared.vao&&_r(tr.shared.vao,".setVAO(null);")}function Gi(tr,hr){var _r=tr.proc("scope",3);tr.batchId="a2";var Zr=tr.shared,sa=Zr.current;if(ql(tr,_r,hr.context),hr.framebuffer&&hr.framebuffer.append(tr,_r),Lr(Object.keys(hr.state)).forEach(function(Le){var We=hr.state[Le],Xe=We.append(tr,_r);Wt(Xe)?Xe.forEach(function(rt,Ct){Ai(rt)?_r.set(tr.next[Le],"["+Ct+"]",rt):_r.set(tr.next[Le],"["+Ct+"]",tr.link(rt,{stable:!0}))}):ha(We)?_r.set(Zr.next,"."+Le,tr.link(Xe,{stable:!0})):_r.set(Zr.next,"."+Le,Xe)}),xs(tr,_r,hr,!0,!0),[Bu,ep,rh,au,Ff].forEach(function(Le){var We=hr.draw[Le];if(We){var Xe=We.append(tr,_r);Ai(Xe)?_r.set(Zr.draw,"."+Le,Xe):_r.set(Zr.draw,"."+Le,tr.link(Xe),{stable:!0})}}),Object.keys(hr.uniforms).forEach(function(Le){var We=hr.uniforms[Le].append(tr,_r);Array.isArray(We)&&(We="["+We.map(function(Xe){return Ai(Xe)?Xe:tr.link(Xe,{stable:!0})})+"]"),_r.set(Zr.uniforms,"["+tr.link(nr.id(Le),{stable:!0})+"]",We)}),Object.keys(hr.attributes).forEach(function(Le){var We=hr.attributes[Le].append(tr,_r),Xe=tr.scopeAttrib(Le);Object.keys(new fa).forEach(function(rt){_r.set(Xe,"."+rt,We[rt])})}),hr.scopeVAO){var ve=hr.scopeVAO.append(tr,_r);Ai(ve)?_r.set(Zr.vao,".targetVAO",ve):_r.set(Zr.vao,".targetVAO",tr.link(ve,{stable:!0}))}function Ae(Le){var We=hr.shader[Le];if(We){var Xe=We.append(tr,_r);Ai(Xe)?_r.set(Zr.shader,"."+Le,Xe):_r.set(Zr.shader,"."+Le,tr.link(Xe,{stable:!0}))}}Ae(Ih),Ae(Lf),Object.keys(hr.state).length>0&&(_r(sa,".dirty=true;"),_r.exit(sa,".dirty=true;")),_r("a1(",tr.shared.context,",a0,",tr.batchId,");")}function Eo(tr){if(!(typeof tr!="object"||Wt(tr))){for(var hr=Object.keys(tr),_r=0;_r=0;--Nn){var Do=nn[Nn];Do&&Do(ma,null,0)}fr.flush(),Na&&Na.update()}function so(){!Sn&&nn.length>0&&(Sn=g.next(kn))}function Us(){Sn&&(g.cancel(kn),Sn=null)}function iu(Nn){Nn.preventDefault(),Xr=!0,Us(),Ln.forEach(function(Do){Do()})}function bo(Nn){fr.getError(),Xr=!1,aa.restore(),an.restore(),Ha.restore(),Aa.restore(),ga.restore(),wi.restore(),hi.restore(),Na&&Na.restore(),ri.procs.refresh(),so(),fi.forEach(function(Do){Do()})}Ai&&(Ai.addEventListener(Dn,iu,!1),Ai.addEventListener(Mo,bo,!1));function uf(){nn.length=0,Us(),Ai&&(Ai.removeEventListener(Dn,iu),Ai.removeEventListener(Mo,bo)),an.clear(),wi.clear(),ga.clear(),hi.clear(),Aa.clear(),Ta.clear(),Ha.clear(),Na&&Na.clear(),zi.forEach(function(Nn){Nn()})}function hs(Nn){function Do(ve){var Ae=t({},ve);delete Ae.uniforms,delete Ae.attributes,delete Ae.context,delete Ae.vao,"stencil"in Ae&&Ae.stencil.op&&(Ae.stencil.opBack=Ae.stencil.opFront=Ae.stencil.op,delete Ae.stencil.op);function Le(We){if(We in Ae){var Xe=Ae[We];delete Ae[We],Object.keys(Xe).forEach(function(rt){Ae[We+"."+rt]=Xe[rt]})}}return Le("blend"),Le("depth"),Le("cull"),Le("stencil"),Le("polygonOffset"),Le("scissor"),Le("sample"),"vao"in ve&&(Ae.vao=ve.vao),Ae}function Ps(ve,Ae){var Le={},We={};return Object.keys(ve).forEach(function(Xe){var rt=ve[Xe];if(p.isDynamic(rt)){We[Xe]=p.unbox(rt,Xe);return}else if(Ae&&Array.isArray(rt)){for(var Ct=0;Ct0)return tr.call(this,Zr(ve|0),ve|0)}else if(Array.isArray(ve)){if(ve.length)return tr.call(this,ve,ve.length)}else return Ui.call(this,ve)}return t(sa,{stats:Eo,destroy:function(){ds.destroy()}})}var cc=wi.setFBO=hs({framebuffer:p.define.call(null,_s,"framebuffer")});function Rc(Nn,Do){var Ps=0;ri.procs.poll();var ur=Do.color;ur&&(fr.clearColor(+ur[0]||0,+ur[1]||0,+ur[2]||0,+ur[3]||0),Ps|=js),"depth"in Do&&(fr.clearDepth(+Do.depth),Ps|=Bo),"stencil"in Do&&(fr.clearStencil(Do.stencil|0),Ps|=Xa),fr.clear(Ps)}function cf(Nn){if("framebuffer"in Nn)if(Nn.framebuffer&&Nn.framebuffer_reglType==="framebufferCube")for(var Do=0;Do<6;++Do)cc(t({framebuffer:Nn.framebuffer.faces[Do]},Nn),Rc);else cc(Nn,Rc);else Rc(null,Nn)}function ql(Nn){nn.push(Nn);function Do(){var Ps=Ul(nn,Nn);function ur(){var Kr=Ul(nn,ur);nn[Kr]=nn[nn.length-1],nn.length-=1,nn.length<=0&&Us()}nn[Ps]=ur}return so(),{cancel:Do}}function Vl(){var Nn=Ja.viewport,Do=Ja.scissor_box;Nn[0]=Nn[1]=Do[0]=Do[1]=0,ma.viewportWidth=ma.framebufferWidth=ma.drawingBufferWidth=Nn[2]=Do[2]=fr.drawingBufferWidth,ma.viewportHeight=ma.framebufferHeight=ma.drawingBufferHeight=Nn[3]=Do[3]=fr.drawingBufferHeight}function nu(){ma.tick+=1,ma.time=xu(),Vl(),ri.procs.poll()}function Xn(){Aa.refresh(),Vl(),ri.procs.refresh(),Na&&Na.update()}function xu(){return(m()-Ji)/1e3}Xn();function xs(Nn,Do){var Ps;switch(Nn){case"frame":return ql(Do);case"lost":Ps=Ln;break;case"restore":Ps=fi;break;case"destroy":Ps=zi;break;default:}return Ps.push(Do),{cancel:function(){for(var ur=0;ur=0},read:$a,destroy:uf,_gl:fr,_refresh:Xn,poll:function(){nu(),Na&&Na.update()},now:xu,stats:wa,getCachedCode:zc,preloadCachedCode:ff});return nr.onDone(null,hf),hf}return _u}))}}),cue=ye({"node_modules/gl-util/context.js"(e,r){"use strict";var t=Wp();r.exports=function(u){if(u?typeof u=="string"&&(u={container:u}):u={},i(u)?u={container:u}:o(u)?u={container:u}:s(u)?u={gl:u}:u=t(u,{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),u.pixelRatio||(u.pixelRatio=window.pixelRatio||1),u.gl)return u.gl;if(u.canvas&&(u.container=u.canvas.parentNode),u.container){if(typeof u.container=="string"){var c=document.querySelector(u.container);if(!c)throw Error("Element "+u.container+" is not found");u.container=c}i(u.container)?(u.canvas=u.container,u.container=u.canvas.parentNode):u.canvas||(u.canvas=l(),u.container.appendChild(u.canvas),a(u))}else if(!u.canvas)if(typeof document<"u")u.container=document.body||document.documentElement,u.canvas=l(),u.container.appendChild(u.canvas),a(u);else throw Error("Not DOM environment. Use headless-gl.");return u.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(f){try{u.gl=u.canvas.getContext(f,u.attrs)}catch{}return u.gl}),u.gl};function a(n){if(n.container)if(n.container==document.body)document.body.style.width||(n.canvas.width=n.width||n.pixelRatio*window.innerWidth),document.body.style.height||(n.canvas.height=n.height||n.pixelRatio*window.innerHeight);else{var u=n.container.getBoundingClientRect();n.canvas.width=n.width||u.right-u.left,n.canvas.height=n.height||u.bottom-u.top}}function i(n){return typeof n.getContext=="function"&&"width"in n&&"height"in n}function o(n){return typeof n.nodeName=="string"&&typeof n.appendChild=="function"&&typeof n.getBoundingClientRect=="function"}function s(n){return typeof n.drawArrays=="function"||typeof n.drawElements=="function"}function l(){var n=document.createElement("canvas");return n.style.position="absolute",n.style.top=0,n.style.left=0,n}}}),fue=ye({"node_modules/font-atlas/index.js"(e,r){"use strict";var t=fI(),a=[32,126];r.exports=i;function i(o){o=o||{};var s=o.shape?o.shape:o.canvas?[o.canvas.width,o.canvas.height]:[512,512],l=o.canvas||document.createElement("canvas"),n=o.font,u=typeof o.step=="number"?[o.step,o.step]:o.step||[32,32],c=o.chars||a;if(n&&typeof n!="string"&&(n=t(n)),!Array.isArray(c))c=String(c).split("");else if(c.length===2&&typeof c[0]=="number"&&typeof c[1]=="number"){for(var f=[],h=c[0],d=0;h<=c[1];h++)f[d++]=String.fromCharCode(h);c=f}s=s.slice(),l.width=s[0],l.height=s[1];var p=l.getContext("2d");p.fillStyle="#000",p.fillRect(0,0,l.width,l.height),p.font=n,p.textAlign="center",p.textBaseline="middle",p.fillStyle="#fff";for(var g=u[0]/2,m=u[1]/2,h=0;hs[0]-u[0]/2&&(g=u[0]/2,m+=u[1]);return l}}}),dI=ye({"node_modules/bit-twiddle/twiddle.js"(e){"use strict";"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(i<0)},e.abs=function(i){var o=i>>r-1;return(i^o)-o},e.min=function(i,o){return o^(i^o)&-(i65535)<<4,i>>>=o,s=(i>255)<<3,i>>>=s,o|=s,s=(i>15)<<2,i>>>=s,o|=s,s=(i>3)<<1,i>>>=s,o|=s,o|i>>1},e.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},e.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function t(i){var o=32;return i&=-i,i&&o--,i&65535&&(o-=16),i&16711935&&(o-=8),i&252645135&&(o-=4),i&858993459&&(o-=2),i&1431655765&&(o-=1),o}e.countTrailingZeros=t,e.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},e.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},e.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var a=new Array(256);(function(i){for(var o=0;o<256;++o){var s=o,l=o,n=7;for(s>>>=1;s;s>>>=1)l<<=1,l|=s&1,--n;i[o]=l<>>8&255]<<16|a[i>>>16&255]<<8|a[i>>>24&255]},e.interleave2=function(i,o){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i|o<<1},e.deinterleave2=function(i,o){return i=i>>>o&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},e.interleave3=function(i,o,s){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,i|s<<2},e.deinterleave3=function(i,o){return i=i>>>o&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},e.nextCombination=function(i){var o=i|i-1;return o+1|(~o&-~o)-1>>>t(i)+1}}}),hue=ye({"node_modules/dup/dup.js"(e,r){"use strict";function t(o,s,l){var n=o[l]|0;if(n<=0)return[];var u=new Array(n),c;if(l===o.length-1)for(c=0;c"u"&&(s=0),typeof o){case"number":if(o>0)return a(o|0,s);break;case"object":if(typeof o.length=="number")return t(o,s,0);break}return[]}r.exports=i}}),due=ye({"node_modules/typedarray-pool/pool.js"(e){"use strict";var r=dI(),t=hue(),a=Bm().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:t([32,0]),UINT16:t([32,0]),UINT32:t([32,0]),BIGUINT64:t([32,0]),INT8:t([32,0]),INT16:t([32,0]),INT32:t([32,0]),BIGINT64:t([32,0]),FLOAT:t([32,0]),DOUBLE:t([32,0]),DATA:t([32,0]),UINT8C:t([32,0]),BUFFER:t([32,0])});var i=typeof Uint8ClampedArray<"u",o=typeof BigUint64Array<"u",s=typeof BigInt64Array<"u",l=window.__TYPEDARRAY_POOL;l.UINT8C||(l.UINT8C=t([32,0])),l.BIGUINT64||(l.BIGUINT64=t([32,0])),l.BIGINT64||(l.BIGINT64=t([32,0])),l.BUFFER||(l.BUFFER=t([32,0]));var n=l.DATA,u=l.BUFFER;e.free=function(b){if(a.isBuffer(b))u[r.log2(b.length)].push(b);else{if(Object.prototype.toString.call(b)!=="[object ArrayBuffer]"&&(b=b.buffer),!b)return;var S=b.length||b.byteLength,A=r.log2(S)|0;n[A].push(b)}};function c(T){if(T){var b=T.length||T.byteLength,S=r.log2(b);n[S].push(T)}}function f(T){c(T.buffer)}e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=f,e.freeArrayBuffer=c,e.freeBuffer=function(b){u[r.log2(b.length)].push(b)},e.malloc=function(b,S){if(S===void 0||S==="arraybuffer")return h(b);switch(S){case"uint8":return d(b);case"uint16":return p(b);case"uint32":return g(b);case"int8":return m(b);case"int16":return y(b);case"int32":return _(b);case"float":case"float32":return v(b);case"double":case"float64":return x(b);case"uint8_clamped":return E(b);case"bigint64":return C(b);case"biguint64":return M(b);case"buffer":return k(b);case"data":case"dataview":return w(b);default:return null}return null};function h(b){var b=r.nextPow2(b),S=r.log2(b),A=n[S];return A.length>0?A.pop():new ArrayBuffer(b)}e.mallocArrayBuffer=h;function d(T){return new Uint8Array(h(T),0,T)}e.mallocUint8=d;function p(T){return new Uint16Array(h(2*T),0,T)}e.mallocUint16=p;function g(T){return new Uint32Array(h(4*T),0,T)}e.mallocUint32=g;function m(T){return new Int8Array(h(T),0,T)}e.mallocInt8=m;function y(T){return new Int16Array(h(2*T),0,T)}e.mallocInt16=y;function _(T){return new Int32Array(h(4*T),0,T)}e.mallocInt32=_;function v(T){return new Float32Array(h(4*T),0,T)}e.mallocFloat32=e.mallocFloat=v;function x(T){return new Float64Array(h(8*T),0,T)}e.mallocFloat64=e.mallocDouble=x;function E(T){return i?new Uint8ClampedArray(h(T),0,T):d(T)}e.mallocUint8Clamped=E;function M(T){return o?new BigUint64Array(h(8*T),0,T):null}e.mallocBigUint64=M;function C(T){return s?new BigInt64Array(h(8*T),0,T):null}e.mallocBigInt64=C;function w(T){return new DataView(h(T),0,T)}e.mallocDataView=w;function k(T){T=r.nextPow2(T);var b=r.log2(T),S=u[b];return S.length>0?S.pop():new a(T)}e.mallocBuffer=k,e.clearCache=function(){for(var b=0;b<32;++b)l.UINT8[b].length=0,l.UINT16[b].length=0,l.UINT32[b].length=0,l.INT8[b].length=0,l.INT16[b].length=0,l.INT32[b].length=0,l.FLOAT[b].length=0,l.DOUBLE[b].length=0,l.BIGUINT64[b].length=0,l.BIGINT64[b].length=0,l.UINT8C[b].length=0,n[b].length=0,u[b].length=0}}}),pue=ye({"node_modules/is-plain-obj/index.js"(e,r){"use strict";var t=Object.prototype.toString;r.exports=function(a){var i;return t.call(a)==="[object Object]"&&(i=Object.getPrototypeOf(a),i===null||i===Object.getPrototypeOf({}))}}}),pI=ye({"node_modules/parse-unit/index.js"(e,r){r.exports=function(a,i){i||(i=[0,""]),a=String(a);var o=parseFloat(a,10);return i[0]=o,i[1]=a.match(/[\d.\-\+]*\s*(.*)/)[1]||"",i}}}),vue=ye({"node_modules/gl-text/node_modules/to-px/topx.js"(e,r){"use strict";var t=pI();r.exports=s;var a=96;function i(l,n){var u=t(getComputedStyle(l).getPropertyValue(n));return u[0]*s(u[1],l)}function o(l,n){var u=document.createElement("div");u.style["font-size"]="128"+l,n.appendChild(u);var c=i(u,"font-size")/128;return n.removeChild(u),c}function s(l,n){switch(n=n||document.body,l=(l||"px").trim().toLowerCase(),(n===window||n===document)&&(n=document.body),l){case"%":return n.clientHeight/100;case"ch":case"ex":return o(l,n);case"em":return i(n,"font-size");case"rem":return i(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}}}),mue=ye({"node_modules/detect-kerning/index.js"(e,r){"use strict";r.exports=o;var t=o.canvas=document.createElement("canvas"),a=t.getContext("2d"),i=s([32,126]);o.createPairs=s,o.ascii=i;function o(l,n){Array.isArray(l)&&(l=l.join(", "));var u={},c,f=16,h=.05;n&&(n.length===2&&typeof n[0]=="number"?c=s(n):Array.isArray(n)?c=n:(n.o?c=s(n.o):n.pairs&&(c=n.pairs),n.fontSize&&(f=n.fontSize),n.threshold!=null&&(h=n.threshold))),c||(c=i),a.font=f+"px "+l;for(var d=0;df*h){var y=(m-g)/f;u[p]=y*1e3}}return u}function s(l){for(var n=[],u=l[0];u<=l[1];u++)for(var c=String.fromCharCode(u),f=l[0];f0;u-=4)if(n[u]!==0)return Math.floor((u-3)*.25/l)}}}),yue=ye({"node_modules/gl-text/dist.js"(e,r){"use strict";var t=uue(),a=Wp(),i=hI(),o=cue(),s=aI(),l=qb(),n=fue(),u=due(),c=Uy(),f=pue(),h=pI(),d=vue(),p=mue(),g=ku(),m=gue(),y=Jm(),_=dI(),v=_.nextPow2,x=new s,E=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(E=!0),document.body.removeChild(M));var M,C=function(T){w(T)?(T={regl:T},this.gl=T.regl._gl):this.gl=o(T),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=T.regl||i({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(f(T)?T:{})};C.prototype.createShader=function(){var T=this.regl,b=T({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:T.prop("count"),offset:T.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:T.this("sizeBuffer")},width:{offset:0,stride:8,buffer:T.this("sizeBuffer")},char:T.this("charBuffer"),position:T.this("position")},uniforms:{atlasSize:function(A,F){return[F.atlas.width,F.atlas.height]},atlasDim:function(A,F){return[F.atlas.cols,F.atlas.rows]},atlas:function(A,F){return F.atlas.texture},charStep:function(A,F){return F.atlas.step},em:function(A,F){return F.atlas.em},color:T.prop("color"),opacity:T.prop("opacity"),viewport:T.this("viewportArray"),scale:T.this("scale"),align:T.prop("align"),baseline:T.prop("baseline"),translate:T.this("translate"),positionOffset:T.prop("positionOffset")},primitive:"points",viewport:T.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2692,9 +2692,9 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),A={};return{regl:f,draw:u,atlas:A}},C.prototype.update=function(f){var u=this;if(typeof f=="string")f={text:f};else if(!f)return;f=b(f,{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),f.opacity!=null&&(Array.isArray(f.opacity)?this.opacity=f.opacity.map(function(le){return parseFloat(le)}):this.opacity=parseFloat(f.opacity)),f.viewport!=null&&(this.viewport=r(f.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]),f.kerning!=null&&(this.kerning=f.kerning),f.offset!=null&&(typeof f.offset=="number"&&(f.offset=[f.offset,0]),this.positionOffset=v(f.offset)),f.direction&&(this.direction=f.direction),f.range&&(this.range=f.range,this.scale=[1/(f.range[2]-f.range[0]),1/(f.range[3]-f.range[1])],this.translate=[-f.range[0],-f.range[1]]),f.scale&&(this.scale=f.scale),f.translate&&(this.translate=f.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!f.font&&(f.font=C.baseFontSize+"px sans-serif");var A=!1,x=!1;if(f.font&&(Array.isArray(f.font)?f.font:[f.font]).forEach(function(le,Ae){if(typeof le=="string")try{le=p.parse(le)}catch{le=p.parse(C.baseFontSize+"px "+le)}else{var Be=le.style,Xe=le.weight,Ye=le.stretch,yt=le.variant;le=p.parse(p.stringify(le)),Be&&(le.style=Be),Xe&&(le.weight=Xe),Ye&&(le.stretch=Ye),yt&&(le.variant=yt)}var gt=p.stringify({size:C.baseFontSize,family:le.family,stretch:S?le.stretch:void 0,variant:le.variant,weight:le.weight,style:le.style}),Tt=o(le.size),At=Math.round(Tt[0]*s(Tt[1]));if(At!==u.fontSize[Ae]&&(x=!0,u.fontSize[Ae]=At),(!u.font[Ae]||gt!=u.font[Ae].baseString)&&(A=!0,u.font[Ae]=C.fonts[gt],!u.font[Ae])){var $t=le.family.join(", "),rr=[le.style];le.style!=le.variant&&rr.push(le.variant),le.variant!=le.weight&&rr.push(le.weight),S&&le.weight!=le.stretch&&rr.push(le.stretch),u.font[Ae]={baseString:gt,family:$t,weight:le.weight,stretch:le.stretch,style:le.style,variant:le.variant,width:{},kerning:{},metrics:h($t,{origin:"top",fontSize:C.baseFontSize,fontStyle:rr.join(" ")})},C.fonts[gt]=u.font[Ae]}}),(A||x)&&this.font.forEach(function(le,Ae){var Be=p.stringify({size:u.fontSize[Ae],family:le.family,stretch:S?le.stretch:void 0,variant:le.variant,weight:le.weight,style:le.style});if(u.fontAtlas[Ae]=u.shader.atlas[Be],!u.fontAtlas[Ae]){var Xe=le.metrics;u.shader.atlas[Be]=u.fontAtlas[Ae]={fontString:Be,step:Math.ceil(u.fontSize[Ae]*Xe.bottom*.5)*2,em:u.fontSize[Ae],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}f.text==null&&(f.text=u.text)}),typeof f.text=="string"&&f.position&&f.position.length>2){for(var z=Array(f.position.length*.5),I=0;I2){for(var B=!f.position[0].length,F=n.mallocFloat(this.count*2),P=0,j=0;P1?u.align[Ae]:u.align[0]:u.align;if(typeof Be=="number")return Be;switch(Be){case"right":case"end":return-le;case"center":case"centre":case"middle":return-le*.5}return 0})),this.baseline==null&&f.baseline==null&&(f.baseline=0),f.baseline!=null&&(this.baseline=f.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(le,Ae){var Be=(u.font[Ae]||u.font[0]).metrics,Xe=0;return Xe+=Be.bottom*.5,typeof le=="number"?Xe+=le-Be.baseline:Xe+=-Be[le],Xe*=-1,Xe})),f.color!=null)if(f.color||(f.color="transparent"),typeof f.color=="string"||!isNaN(f.color))this.color=e(f.color,"uint8");else{var Me;if(typeof f.color[0]=="number"&&f.color.length>this.counts.length){var Se=f.color.length;Me=n.mallocUint8(Se);for(var Ie=(f.color.subarray||f.color.slice).bind(f.color),Ve=0;Ve4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(_e){var ce=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(ce);for(var ve=0;ve1?this.counts[ve]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ve]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ve*4,ve*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ve]:this.opacity,baseline:this.baselineOffset[ve]!=null?this.baselineOffset[ve]:this.baselineOffset[0],align:this.align?this.alignOffset[ve]!=null?this.alignOffset[ve]:this.alignOffset[0]:0,atlas:this.fontAtlas[ve]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ve*2,ve*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=[]}},C.prototype.destroy=function(){},C.prototype.kerning=!0,C.prototype.position={constant:new Float32Array(2)},C.prototype.translate=null,C.prototype.scale=null,C.prototype.font=null,C.prototype.text="",C.prototype.positionOffset=[0,0],C.prototype.opacity=1,C.prototype.color=new Uint8Array([0,0,0,255]),C.prototype.alignOffset=[0,0],C.maxAtlasSize=1024,C.atlasCanvas=document.createElement("canvas"),C.atlasContext=C.atlasCanvas.getContext("2d",{alpha:!1}),C.baseFontSize=64,C.fonts={};function _(T){return typeof T=="function"&&T._gl&&T.prop&&T.texture&&T.buffer}V.exports=C}}),j2=ze({"src/lib/prepare_regl.js"(J,V){"use strict";var p=gA(),b=pM();V.exports=function(k,l,e){var t=k._fullLayout,n=!0;return t._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(e);return}if(!(r.pick&&!t._has("parcoords"))){try{r.regl=b({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:k._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:e||{}})}catch{n=!1}r.regl||(n=!1),n&&this.addEventListener("webglcontextlost",function(a){k&&k.emit&&k.emit("plotly_webglcontextlost",{event:a,layer:r.key})},!1)}}),n||p({container:t._glcontainer.node()}),n}}}),gM=ze({"src/traces/scattergl/plot.js"(c,V){"use strict";var p=YA(),b=oM(),E=tq(),k=mq(),l=Nr(),e=Fd().selectMode,t=j2(),n=el(),r=S5(),a=GA().styleTextSelection,o={};function s(m,h,v,g){var i=m._size,w=m.width*g,S=m.height*g,M=i.l*g,C=i.b*g,_=i.r*g,T=i.t*g,f=i.w*g,u=i.h*g;return[M+h.domain[0]*f,C+v.domain[0]*u,w-_-(1-h.domain[1])*f,S-T-(1-v.domain[1])*u]}var c=V.exports=function(h,v,g){if(g.length){var i=h._fullLayout,w=v._scene,S=v.xaxis,M=v.yaxis,C,_;if(w){var T=t(h,["ANGLE_instanced_arrays","OES_element_index_uint"],o);if(!T){w.init();return}var f=w.count,u=i._glcanvas.data()[0].regl;if(r(h,v,g),w.dirty){if((w.line2d||w.error2d)&&!(w.scatter2d||w.fill2d||w.glText)&&u.clear({color:!0,depth:!0}),w.error2d===!0&&(w.error2d=E(u)),w.line2d===!0&&(w.line2d=b(u)),w.scatter2d===!0&&(w.scatter2d=p(u)),w.fill2d===!0&&(w.fill2d=b(u)),w.glText===!0)for(w.glText=new Array(f),C=0;Cw.glText.length){var A=f-w.glText.length;for(C=0;Cee&&(isNaN(Z[ae])||isNaN(Z[ae+1]));)ae-=2;q.positions=Z.slice(ee,ae+2)}return q}),w.line2d.update(w.lineOptions)),w.error2d){var I=(w.errorXOptions||[]).concat(w.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});w.error2d.update(I)}w.scatter2d&&w.scatter2d.update(w.markerOptions),w.fillOrder=l.repeat(null,f),w.fill2d&&(w.fillOptions=w.fillOptions.map(function(q,Z){var ee=g[Z];if(!(!q||!ee||!ee[0]||!ee[0].trace)){var ae=ee[0],he=ae.trace,xe=ae.t,we=w.lineOptions[Z],Me,Se,Ie=[];he._ownfill&&Ie.push(Z),he._nexttrace&&Ie.push(Z+1),Ie.length&&(w.fillOrder[Z]=Ie);var Ve=[],Ge=we&&we.positions||xe.positions,ke,_e;if(he.fill==="tozeroy"){for(ke=0;keke&&isNaN(Ge[_e+1]);)_e-=2;Ge[ke+1]!==0&&(Ve=[Ge[ke],0]),Ve=Ve.concat(Ge.slice(ke,_e+2)),Ge[_e+1]!==0&&(Ve=Ve.concat([Ge[_e],0]))}else if(he.fill==="tozerox"){for(ke=0;keke&&isNaN(Ge[_e]);)_e-=2;Ge[ke]!==0&&(Ve=[0,Ge[ke+1]]),Ve=Ve.concat(Ge.slice(ke,_e+2)),Ge[_e]!==0&&(Ve=Ve.concat([0,Ge[_e+1]]))}else if(he.fill==="toself"||he.fill==="tonext"){for(Ve=[],Me=0,q.splitNull=!0,Se=0;Se-1;for(let[q]of g)if(q){var F=q.trace,P=q.t,j=P.index,U=F._length,$=P.x,Q=P.y;if(F.selectedpoints||D||B){if(D||(D=!0),F.selectedpoints){var re=w.selectBatch[j]=F.selectedpoints,ne={};for(_=0;_S&&v||wa,x;for(A?x=v.sizeAvg||Math.max(v.size,3):x=E(c,h),M=0;M{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,k(()=>{this.dirty=!1})),this)},n.prototype.update=function(...s){if(!s.length)return;for(let h=0;hx||!v.lower&&A{c[g+w]=h})}this.scatter.draw(...c)}return this},n.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 r(s,c,m){let h=s.id!=null?s.id:s,v=c,g=m;return h<<16|(v&255)<<8|g&255}function a(s,c,m){let h,v,g,i,w,S,M,C,_=s[c],T=s[m];return _.length>2?(h=_[0],g=_[2],v=_[1],i=_[3]):_.length?(h=v=_[0],g=i=_[1]):(h=_.x,v=_.y,g=_.x+_.width,i=_.y+_.height),T.length>2?(w=T[0],M=T[2],S=T[1],C=T[3]):T.length?(w=S=T[0],M=C=T[1]):(w=T.x,S=T.y,M=T.x+T.width,C=T.y+T.height),[w,v,M,i]}function o(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=e(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),Sq=ze({"src/traces/splom/plot.js"(J,V){"use strict";var p=Mq(),b=Nr(),E=Xl(),k=Fd().selectMode;V.exports=function(t,n,r){if(r.length)for(var a=0;a-1,B=k(v)||!!a.selectedpoints||D,F=!0;if(B){var P=a._length;if(a.selectedpoints){s.selectBatch=a.selectedpoints;var j=a.selectedpoints,U={};for(w=0;w=$[Q][0]&&U<=$[Q][1])return!0;return!1}function c(U){U.attr("x",-p.bar.captureWidth/2).attr("width",p.bar.captureWidth)}function m(U){U.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function h(U){if(!U.brush.filterSpecified)return"0,"+U.height;for(var $=v(U.brush.filter.getConsolidated(),U.height),Q=[0],re,ne,se,G=$.length?$[0][0]:null,X=0;X<$.length;X++)re=$[X],ne=re[1]-re[0],Q.push(G),Q.push(ne),se=X+1,se<$.length&&(G=$[se][0]-re[1]);return Q.push(U.height),Q}function v(U,$){return U.map(function(Q){return Q.map(function(re){return Math.max(0,re*$)}).sort(l)})}function g(U,$){var Q=p.bar.handleHeight;if(!($>U[1]+Q||$=.9*U[1]+.1*U[0]?"n":$<=.9*U[0]+.1*U[1]?"s":"ns"}function i(){b.select(document.body).style("cursor",null)}function w(U){U.attr("stroke-dasharray",h)}function S(U,$){var Q=b.select(U).selectAll(".highlight, .highlight-shadow"),re=$?Q.transition().duration(p.bar.snapDuration).each("end",$):Q;w(re)}function M(U,$){var Q=U.brush,re=Q.filterSpecified,ne=NaN,se={},G;if(re){var X=U.height,K=Q.filter.getConsolidated(),H=v(K,X),Y=NaN,q=NaN,Z=NaN;for(G=0;G<=H.length;G++){var ee=H[G];if(ee&&ee[0]<=$&&$<=ee[1]){Y=G;break}else if(q=G?G-1:NaN,ee&&ee[0]>$){Z=G;break}}if(ne=Y,isNaN(ne)&&(isNaN(q)||isNaN(Z)?ne=isNaN(q)?Z:q:ne=$-H[q][1]=Me[0]&&we<=Me[1]){se.clickableOrdinalRange=Me;break}}}return se}function C(U,$){b.event.sourceEvent.stopPropagation();var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=$.unitToPaddedPx.invert(Q),ne=$.brush,se=M($,Q),G=se.interval,X=ne.svgBrush;if(X.wasDragged=!1,X.grabbingBar=se.region==="ns",X.grabbingBar){var K=G.map($.unitToPaddedPx);X.grabPoint=Q-K[0]-p.verticalPadding,X.barLength=K[1]-K[0]}X.clickableOrdinalRange=se.clickableOrdinalRange,X.stayingIntervals=$.multiselect&&ne.filterSpecified?ne.filter.getConsolidated():[],G&&(X.stayingIntervals=X.stayingIntervals.filter(function(H){return H[0]!==G[0]&&H[1]!==G[1]})),X.startExtent=se.region?G[se.region==="s"?1:0]:re,$.parent.inBrushDrag=!0,X.brushStartCallback()}function _(U,$){b.event.sourceEvent.stopPropagation();var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=$.brush.svgBrush;re.wasDragged=!0,re._dragging=!0,re.grabbingBar?re.newExtent=[Q-re.grabPoint,Q+re.barLength-re.grabPoint].map($.unitToPaddedPx.invert):re.newExtent=[re.startExtent,$.unitToPaddedPx.invert(Q)].sort(l),$.brush.filterSpecified=!0,re.extent=re.stayingIntervals.concat([re.newExtent]),re.brushCallback($),S(U.parentNode)}function T(U,$){var Q=$.brush,re=Q.filter,ne=Q.svgBrush;ne._dragging||(f(U,$),_(U,$),$.brush.svgBrush.wasDragged=!1),ne._dragging=!1;var se=b.event;se.sourceEvent.stopPropagation();var G=ne.grabbingBar;if(ne.grabbingBar=!1,ne.grabLocation=void 0,$.parent.inBrushDrag=!1,i(),!ne.wasDragged){ne.wasDragged=void 0,ne.clickableOrdinalRange?Q.filterSpecified&&$.multiselect?ne.extent.push(ne.clickableOrdinalRange):(ne.extent=[ne.clickableOrdinalRange],Q.filterSpecified=!0):G?(ne.extent=ne.stayingIntervals,ne.extent.length===0&&O(Q)):O(Q),ne.brushCallback($),S(U.parentNode),ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[]);return}var X=function(){re.set(re.getConsolidated())};if($.ordinal){var K=$.unitTickvals;K[K.length-1]ne.newExtent[0];ne.extent=ne.stayingIntervals.concat(H?[ne.newExtent]:[]),ne.extent.length||O(Q),ne.brushCallback($),H?S(U.parentNode,X):(X(),S(U.parentNode))}else X();ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[])}function f(U,$){var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=M($,Q),ne="crosshair";re.clickableOrdinalRange?ne="pointer":re.region&&(ne=re.region+"-resize"),b.select(document.body).style("cursor",ne)}function u(U){U.on("mousemove",function($){b.event.preventDefault(),$.parent.inBrushDrag||f(this,$)}).on("mouseleave",function($){$.parent.inBrushDrag||i()}).call(b.behavior.drag().on("dragstart",function($){C(this,$)}).on("drag",function($){_(this,$)}).on("dragend",function($){T(this,$)}))}function A(U,$){return U[0]-$[0]}function x(U,$,Q){var re=Q._context.staticPlot,ne=U.selectAll(".background").data(k);ne.enter().append("rect").classed("background",!0).call(c).call(m).style("pointer-events",re?"none":"auto").attr("transform",e(0,p.verticalPadding)),ne.call(u).attr("height",function(X){return X.height-p.verticalPadding});var se=U.selectAll(".highlight-shadow").data(k);se.enter().append("line").classed("highlight-shadow",!0).attr("x",-p.bar.width/2).attr("stroke-width",p.bar.width+p.bar.strokeWidth).attr("stroke",$).attr("opacity",p.bar.strokeOpacity).attr("stroke-linecap","butt"),se.attr("y1",function(X){return X.height}).call(w);var G=U.selectAll(".highlight").data(k);G.enter().append("line").classed("highlight",!0).attr("x",-p.bar.width/2).attr("stroke-width",p.bar.width-p.bar.strokeWidth).attr("stroke",p.bar.fillColor).attr("opacity",p.bar.fillOpacity).attr("stroke-linecap","butt"),G.attr("y1",function(X){return X.height}).call(w)}function z(U,$,Q){var re=U.selectAll("."+p.cn.axisBrush).data(k,E);re.enter().append("g").classed(p.cn.axisBrush,!0),x(re,$,Q)}function I(U){return U.svgBrush.extent.map(function($){return $.slice()})}function O(U){U.filterSpecified=!1,U.svgBrush.extent=[[-1/0,1/0]]}function D(U){return function(Q){var re=Q.brush,ne=I(re),se=ne.slice();re.filter.set(se),U()}}function B(U){for(var $=U.slice(),Q=[],re,ne=$.shift();ne;){for(re=ne.slice();(ne=$.shift())&&ne[0]<=re[1];)re[1]=Math.max(re[1],ne[1]);Q.push(re)}return Q.length===1&&Q[0][0]>Q[0][1]&&(Q=[]),Q}function F(){var U=[],$,Q;return{set:function(re){U=re.map(function(ne){return ne.slice().sort(l)}).sort(A),U.length===1&&U[0][0]===-1/0&&U[0][1]===1/0&&(U=[[0,-1]]),$=B(U),Q=U.reduce(function(ne,se){return[Math.min(ne[0],se[0]),Math.max(ne[1],se[1])]},[1/0,-1/0])},get:function(){return U.slice()},getConsolidated:function(){return $},getBounds:function(){return Q}}}function P(U,$,Q,re,ne,se){var G=F();return G.set(Q),{filter:G,filterSpecified:$,svgBrush:{extent:[],brushStartCallback:re,brushCallback:D(ne),brushEndCallback:se}}}function j(U,$){if(Array.isArray(U[0])?(U=U.map(function(re){return re.sort(l)}),$.multiselect?U=B(U.sort(A)):U=[U[0]]):U=[U.sort(l)],$.tickvals){var Q=$.tickvals.slice().sort(l);if(U=U.map(function(re){var ne=[o(0,Q,re[0],[]),o(1,Q,re[1],[])];if(ne[1]>ne[0])return ne}).filter(function(re){return re}),!U.length)return}return U.length>1?U:U[0]}V.exports={makeBrush:P,ensureAxisBrush:z,cleanRanges:j}}}),Dq=ze({"src/traces/parcoords/defaults.js"(J,V){"use strict";var p=Nr(),b=Bf().hasColorscale,E=qc(),k=Ml().defaults,l=Jf(),e=Gi(),t=xM(),n=bM(),r=sy().maxDimensionCount,a=U2();function o(c,m,h,v,g){var i=g("line.color",h);if(b(c,"line")&&p.isArrayOrTypedArray(i)){if(i.length)return g("line.colorscale"),E(c,m,v,g,{prefix:"line.",cLetter:"c"}),i.length;m.line.color=h}return 1/0}function s(c,m,h,v){function g(C,_){return p.coerce(c,m,t.dimensions,C,_)}var i=g("values"),w=g("visible");if(i&&i.length||(w=m.visible=!1),w){g("label"),g("tickvals"),g("ticktext"),g("tickformat");var S=g("range");m._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:S},e.setConvert(m._ax,v.layout),g("multiselect");var M=g("constraintrange");M&&(m.constraintrange=n.cleanRanges(M,m))}}V.exports=function(m,h,v,g){function i(_,T){return p.coerce(m,h,t,_,T)}var w=m.dimensions;Array.isArray(w)&&w.length>r&&(p.log("parcoords traces support up to "+r+" dimensions at the moment"),w.splice(r));var S=l(m,h,{name:"dimensions",layout:g,handleItemDefaults:s}),M=o(m,h,v,g,i);k(h,g,i),(!Array.isArray(S)||!S.length)&&(h.visible=!1),a(h,S,"values",M);var C=p.extendFlat({},g.font,{size:Math.round(g.font.size/1.2)});p.coerceFont(i,"labelfont",C),p.coerceFont(i,"tickfont",C,{autoShadowDflt:!0}),p.coerceFont(i,"rangefont",C),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}}}),Fq=ze({"src/traces/parcoords/calc.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray,b=fl(),E=Vd().wrap;V.exports=function(e,t){var n,r;return b.hasColorscale(t,"line")&&p(t.line.color)?(n=t.line.color,r=b.extractOpts(t.line).colorscale,b.calc(e,t,{vals:n,containerStr:"line",cLetter:"c"})):(n=k(t._length),r=[[0,t.line.color],[1,t.line.color]]),E({lineColor:n,cscale:r})};function k(l){for(var e=new Array(l),t=0;t 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(` -`),b=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),E=sy().maxDimensionCount,k=Nr(),l=1e-6,e=2048,t=new Uint8Array(4),n=new Uint8Array(4),r={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function a(T){T.read({x:0,y:0,width:1,height:1,data:t})}function o(T,f,u,A,x){var z=T._gl;z.enable(z.SCISSOR_TEST),z.scissor(f,u,A,x),T.clear({color:[0,0,0,0],depth:1})}function s(T,f,u,A,x,z){var I=z.key;function O(D){var B=Math.min(A,x-D*A);D===0&&(window.cancelAnimationFrame(u.currentRafs[I]),delete u.currentRafs[I],o(T,z.scissorX,z.scissorY,z.scissorWidth,z.viewBoxSize[1])),!u.clearOnly&&(z.count=2*B,z.offset=2*D*A,f(z),D*A+B>>8*f)%256/255}function v(T,f,u){for(var A=new Array(T*(E+4)),x=0,z=0;zSe&&(Se=q[he].dim1.canvasX,we=he);ae===0&&o(x,0,0,B.canvasWidth,B.canvasHeight);var Ie=G(u);for(he=0;hehe._length&&(_e=_e.slice(0,he._length));var ce=he.tickvals,ve;function le(yt,gt){return{val:yt,text:ve[gt]}}function Ae(yt,gt){return yt.val-gt.val}if(E(ce)&&ce.length){b.isTypedArray(ce)&&(ce=Array.from(ce)),ve=he.ticktext,!E(ve)||!ve.length?ve=ce.map(k(he.tickformat)):ve.length>ce.length?ve=ve.slice(0,ce.length):ce.length>ve.length&&(ce=ce.slice(0,ve.length));for(var Be=1;Be=gt||rr>=Tt)return;var _r=Ye.lineLayer.readPixel($t,Tt-1-rr),Xt=_r[3]!==0,or=Xt?_r[2]+256*(_r[1]+256*_r[0]):null,Ot={x:$t,y:rr,clientX:yt.clientX,clientY:yt.clientY,dataIndex:Ye.model.key,curveNumber:or};or!==we&&(Xt?X.hover(Ot):X.unhover&&X.unhover(Ot),we=or)}}),xe.style("opacity",function(Ye){return Ye.pick?0:1}),Y.style("background","rgba(255, 255, 255, 0)");var Se=Y.selectAll("."+g.cn.parcoords).data(he,c);Se.exit().remove(),Se.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Se.attr("transform",function(Ye){return n(Ye.model.translateX,Ye.model.translateY)});var Ie=Se.selectAll("."+g.cn.parcoordsControlView).data(m,c);Ie.enter().append("g").classed(g.cn.parcoordsControlView,!0),Ie.attr("transform",function(Ye){return n(Ye.model.pad.l,Ye.model.pad.t)});var Ve=Ie.selectAll("."+g.cn.yAxis).data(function(Ye){return Ye.dimensions},c);Ve.enter().append("g").classed(g.cn.yAxis,!0),Ie.each(function(Ye){j(Ve,Ye,Z)}),xe.each(function(Ye){if(Ye.viewModel){!Ye.lineLayer||X?Ye.lineLayer=w(this,Ye):Ye.lineLayer.update(Ye),(Ye.key||Ye.key===0)&&(Ye.viewModel[Ye.key]=Ye.lineLayer);var yt=!Ye.context||X;Ye.lineLayer.render(Ye.viewModel.panels,yt)}}),Ve.attr("transform",function(Ye){return n(Ye.xScale(Ye.xIndex),0)}),Ve.call(p.behavior.drag().origin(function(Ye){return Ye}).on("drag",function(Ye){var yt=Ye.parent;ae.linePickActive(!1),Ye.x=Math.max(-g.overdrag,Math.min(Ye.model.width+g.overdrag,p.event.x)),Ye.canvasX=Ye.x*Ye.model.canvasPixelRatio,Ve.sort(function(gt,Tt){return gt.x-Tt.x}).each(function(gt,Tt){gt.xIndex=Tt,gt.x=Ye===gt?gt.x:gt.xScale(gt.xIndex),gt.canvasX=gt.x*gt.model.canvasPixelRatio}),j(Ve,yt,Z),Ve.filter(function(gt){return Math.abs(Ye.xIndex-gt.xIndex)!==0}).attr("transform",function(gt){return n(gt.xScale(gt.xIndex),0)}),p.select(this).attr("transform",n(Ye.x,0)),Ve.each(function(gt,Tt,At){At===Ye.parent.key&&(yt.dimensions[Tt]=gt)}),yt.contextLayer&&yt.contextLayer.render(yt.panels,!1,!I(yt)),yt.focusLayer.render&&yt.focusLayer.render(yt.panels)}).on("dragend",function(Ye){var yt=Ye.parent;Ye.x=Ye.xScale(Ye.xIndex),Ye.canvasX=Ye.x*Ye.model.canvasPixelRatio,j(Ve,yt,Z),p.select(this).attr("transform",function(gt){return n(gt.x,0)}),yt.contextLayer&&yt.contextLayer.render(yt.panels,!1,!I(yt)),yt.focusLayer&&yt.focusLayer.render(yt.panels),yt.pickLayer&&yt.pickLayer.render(yt.panels,!0),ae.linePickActive(!0),X&&X.axesMoved&&X.axesMoved(yt.key,yt.dimensions.map(function(gt){return gt.crossfilterDimensionIndex}))})),Ve.exit().remove();var Ge=Ve.selectAll("."+g.cn.axisOverlays).data(m,c);Ge.enter().append("g").classed(g.cn.axisOverlays,!0),Ge.selectAll("."+g.cn.axis).remove();var ke=Ge.selectAll("."+g.cn.axis).data(m,c);ke.enter().append("g").classed(g.cn.axis,!0),ke.each(function(Ye){var yt=Ye.model.height/Ye.model.tickDistance,gt=Ye.domainScale,Tt=gt.domain();p.select(this).call(p.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(yt,Ye.tickFormat).tickValues(Ye.ordinal?Tt:null).tickFormat(function(At){return v.isOrdinal(Ye)?At:$(Ye.model.dimensions[Ye.visibleIndex],At)}).scale(gt)),a.font(ke.selectAll("text"),Ye.model.tickFont)}),ke.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ke.selectAll("text").style("cursor","default");var _e=Ge.selectAll("."+g.cn.axisHeading).data(m,c);_e.enter().append("g").classed(g.cn.axisHeading,!0);var ce=_e.selectAll("."+g.cn.axisTitle).data(m,c);ce.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",K?"none":"auto"),ce.text(function(Ye){return Ye.label}).each(function(Ye){var yt=p.select(this);a.font(yt,Ye.model.labelFont),r.convertToTspans(yt,ne)}).attr("transform",function(Ye){var yt=P(Ye.model.labelAngle,Ye.model.labelSide),gt=g.axisTitleOffset;return(yt.dir>0?"":n(0,2*gt+Ye.model.height))+t(yt.degrees)+n(-gt*yt.dx,-gt*yt.dy)}).attr("text-anchor",function(Ye){var yt=P(Ye.model.labelAngle,Ye.model.labelSide),gt=Math.abs(yt.dx),Tt=Math.abs(yt.dy);return 2*gt>Tt?yt.dir*yt.dx<0?"start":"end":"middle"});var ve=Ge.selectAll("."+g.cn.axisExtent).data(m,c);ve.enter().append("g").classed(g.cn.axisExtent,!0);var le=ve.selectAll("."+g.cn.axisExtentTop).data(m,c);le.enter().append("g").classed(g.cn.axisExtentTop,!0),le.attr("transform",n(0,-g.axisExtentOffset));var Ae=le.selectAll("."+g.cn.axisExtentTopText).data(m,c);Ae.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(B),Ae.text(function(Ye){return Q(Ye,!0)}).each(function(Ye){a.font(p.select(this),Ye.model.rangeFont)});var Be=ve.selectAll("."+g.cn.axisExtentBottom).data(m,c);Be.enter().append("g").classed(g.cn.axisExtentBottom,!0),Be.attr("transform",function(Ye){return n(0,Ye.model.height+g.axisExtentOffset)});var Xe=Be.selectAll("."+g.cn.axisExtentBottomText).data(m,c);Xe.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(B),Xe.text(function(Ye){return Q(Ye,!1)}).each(function(Ye){a.font(p.select(this),Ye.model.rangeFont)}),i.ensureAxisBrush(Ge,ee,ne)}}}),TM=ze({"src/traces/parcoords/plot.js"(t,V){"use strict";var p=Bq(),b=j2(),E=wM().isVisible,k={};function l(n,r,a){var o=r.indexOf(a),s=n.indexOf(o);return s===-1&&(s+=r.length),s}function e(n,r){return function(o,s){return l(n,r,o)-l(n,r,s)}}var t=V.exports=function(r,a){var o=r._fullLayout,s=b(r,[],k);if(s){var c={},m={},h={},v=o._size;a.forEach(function(M,C){var _=M[0].trace,T=h[C]=_.index;c[C]=r.data[T].dimensions,m[C]=r.data[T].dimensions.slice()});var g=function(M,C,_){var T=m[M][C],f=_.map(function(O){return O.slice()}),u="dimensions["+C+"].constraintrange",A=o._tracePreGUI[r._fullData[h[M]].uid];if(A[u]===void 0){var x=T.constraintrange;A[u]=x||null}var z=r._fullData[h[M]].dimensions[C];f.length?(f.length===1&&(f=f[0]),T.constraintrange=f,z.constraintrange=f.slice(),f=[f]):(delete T.constraintrange,delete z.constraintrange,f=null);var I={};I[u]=f,r.emit("plotly_restyle",[I,[h[M]]])},i=function(M){r.emit("plotly_hover",M)},w=function(M){r.emit("plotly_unhover",M)},S=function(M,C){var _=e(C,m[M].filter(E));c[M].sort(_),m[M].filter(function(T){return!E(T)}).sort(function(T){return m[M].indexOf(T)}).forEach(function(T){c[M].splice(c[M].indexOf(T),1),c[M].splice(m[M].indexOf(T),0,T)}),r.emit("plotly_restyle",[{dimensions:[c[M]]},[h[M]]])};p(r,a,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:g,hover:i,unhover:w,axesMoved:S})}};t.reglPrecompiled=k}}),Oq=ze({"src/traces/parcoords/base_plot.js"(J){"use strict";var V=ci(),p=zf().getModuleCalcData,b=TM(),E=nd();J.name="parcoords",J.plot=function(k){var l=p(k.calcdata,"parcoords")[0];l.length&&b(k,l)},J.clean=function(k,l,e,t){var n=t._has&&t._has("parcoords"),r=l._has&&l._has("parcoords");n&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},J.toSVG=function(k){var l=k._fullLayout._glimages,e=V.select(k).selectAll(".svg-container"),t=e.filter(function(r,a){return a===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var r=this,a=r.toDataURL("image/png"),o=l.append("svg:image");o.attr({xmlns:E.svg,"xlink:href":a,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})}t.each(n),window.setTimeout(function(){V.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Nq=ze({"src/traces/parcoords/base_index.js"(J,V){"use strict";V.exports={attributes:xM(),supplyDefaults:Dq(),calc:Fq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:Oq(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),jq=ze({"src/traces/parcoords/index.js"(J,V){"use strict";var p=Nq();p.plot=TM(),V.exports=p}}),Uq=ze({"lib/parcoords.js"(J,V){"use strict";V.exports=jq()}}),AM=ze({"src/traces/parcats/attributes.js"(J,V){"use strict";var p=Ki().extendFlat,b=ws(),E=Qs(),k=qs(),{hovertemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=Ml().attributes,n=p({editType:"calc"},k("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});V.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:p({},b.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({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:E({editType:"calc"}),tickfont:E({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:n,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}}}),qq=ze({"src/traces/parcats/defaults.js"(J,V){"use strict";var p=Nr(),b=Bf().hasColorscale,E=qc(),k=Ml().defaults,l=Jf(),e=AM(),t=U2(),n=Ff().isTypedArraySpec;function r(o,s,c,m,h){h("line.shape"),h("line.hovertemplate"),h("line.hovertemplatefallback");var v=h("line.color",m.colorway[0]);if(b(o,"line")&&p.isArrayOrTypedArray(v)){if(v.length)return h("line.colorscale"),E(o,s,m,h,{prefix:"line.",cLetter:"c"}),v.length;s.line.color=c}return 1/0}function a(o,s){function c(S,M){return p.coerce(o,s,e.dimensions,S,M)}var m=c("values"),h=c("visible");if(m&&m.length||(h=s.visible=!1),h){c("label"),c("displayindex",s._index);var v=o.categoryarray,g=p.isArrayOrTypedArray(v)&&v.length>0||n(v),i;g&&(i="array");var w=c("categoryorder",i);w==="array"?(c("categoryarray"),c("ticktext")):(delete o.categoryarray,delete o.ticktext),!g&&w==="array"&&(s.categoryorder="trace")}}V.exports=function(s,c,m,h){function v(S,M){return p.coerce(s,c,e,S,M)}var g=l(s,c,{name:"dimensions",handleItemDefaults:a}),i=r(s,c,m,h,v);k(c,h,v),(!Array.isArray(g)||!g.length)&&(c.visible=!1),t(c,g,"values",i),v("hoveron"),v("hovertemplate"),v("hovertemplatefallback"),v("arrangement"),v("bundlecolors"),v("sortpaths"),v("counts");var w=h.font;p.coerceFont(v,"labelfont",w,{overrideDflt:{size:Math.round(w.size)}}),p.coerceFont(v,"tickfont",w,{autoShadowDflt:!0,overrideDflt:{size:Math.round(w.size/1.2)}})}}}),Vq=ze({"src/traces/parcats/calc.js"(J,V){"use strict";var p=Vd().wrap,b=Bf().hasColorscale,E=Qf(),k=Bw(),l=$i(),e=Nr(),t=ao();V.exports=function(w,S){var M=e.filterVisible(S.dimensions);if(M.length===0)return[];var C=M.map(function(G){var X;if(G.categoryorder==="trace")X=null;else if(G.categoryorder==="array")X=G.categoryarray;else{X=k(G.values);for(var K=!0,H=0;H=i.length||w[i[S]]!==void 0)return!1;w[i[S]]=!0}return!0}}}),Gq=ze({"src/traces/parcats/parcats.js"(J,V){"use strict";var p=ci(),b=(l0(),Po(_v)).interpolateNumber,E=Ux(),k=Qn(),l=Zl(),e=Nr(),t=e.strTranslate,n=$i(),r=Cs();function a(Y,q,Z,ee){var ae=q._context.staticPlot,he=Y.map(se.bind(0,q,Z)),xe=ee.selectAll("g.parcatslayer").data([null]);xe.enter().append("g").attr("class","parcatslayer").style("pointer-events",ae?"none":"all");var we=xe.selectAll("g.trace.parcats").data(he,o),Me=we.enter().append("g").attr("class","trace parcats");we.attr("transform",function(Ae){return t(Ae.x,Ae.y)}),Me.append("g").attr("class","paths");var Se=we.select("g.paths"),Ie=Se.selectAll("path.path").data(function(Ae){return Ae.paths},o);Ie.attr("fill",function(Ae){return Ae.model.color});var Ve=Ie.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.model.color}).attr("fill-opacity",0);S(Ve),Ie.attr("d",function(Ae){return Ae.svgD}),Ve.empty()||Ie.sort(c),Ie.exit().remove(),Ie.on("mouseover",h).on("mouseout",v).on("click",w),Me.append("g").attr("class","dimensions");var Ge=we.select("g.dimensions"),ke=Ge.selectAll("g.dimension").data(function(Ae){return Ae.dimensions},o);ke.enter().append("g").attr("class","dimension"),ke.attr("transform",function(Ae){return t(Ae.x,0)}),ke.exit().remove();var _e=ke.selectAll("g.category").data(function(Ae){return Ae.categories},o),ce=_e.enter().append("g").attr("class","category");_e.attr("transform",function(Ae){return t(0,Ae.y)}),ce.append("rect").attr("class","catrect").attr("pointer-events","none"),_e.select("rect.catrect").attr("fill","none").attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}),_(ce);var ve=_e.selectAll("rect.bandrect").data(function(Ae){return Ae.bands},o);ve.each(function(){e.raiseToTop(this)}),ve.attr("fill",function(Ae){return Ae.color});var le=ve.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.color}).attr("fill-opacity",0);ve.attr("fill",function(Ae){return Ae.color}).attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}).attr("y",function(Ae){return Ae.y}).attr("cursor",function(Ae){return Ae.parcatsViewModel.arrangement==="fixed"?"default":Ae.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),f(le),ve.exit().remove(),ce.append("text").attr("class","catlabel").attr("pointer-events","none"),_e.select("text.catlabel").attr("text-anchor",function(Ae){return s(Ae)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Ae){return s(Ae)?Ae.width+5:-5}).attr("y",function(Ae){return Ae.height/2}).text(function(Ae){return Ae.model.categoryLabel}).each(function(Ae){n.font(p.select(this),Ae.parcatsViewModel.categorylabelfont),r.convertToTspans(p.select(this),q)}),ce.append("text").attr("class","dimlabel"),_e.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ae){return Ae.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Ae){return Ae.width/2}).attr("y",-5).text(function(Ae,Be){return Be===0?Ae.parcatsViewModel.model.dimensions[Ae.model.dimensionInd].dimensionLabel:null}).each(function(Ae){n.font(p.select(this),Ae.parcatsViewModel.labelfont)}),_e.selectAll("rect.bandrect").on("mouseover",F).on("mouseout",P),_e.exit().remove(),ke.call(p.behavior.drag().origin(function(Ae){return{x:Ae.x,y:0}}).on("dragstart",j).on("drag",U).on("dragend",$)),we.each(function(Ae){Ae.traceSelection=p.select(this),Ae.pathSelection=p.select(this).selectAll("g.paths").selectAll("path.path"),Ae.dimensionSelection=p.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),we.exit().remove()}V.exports=function(Y,q,Z,ee){a(Z,Y,ee,q)};function o(Y){return Y.key}function s(Y){var q=Y.parcatsViewModel.dimensions.length,Z=Y.parcatsViewModel.dimensions[q-1].model.dimensionInd;return Y.model.dimensionInd===Z}function c(Y,q){return Y.model.rawColor>q.model.rawColor?1:Y.model.rawColorae)return 1;if(ee!==ae){var he=isNaN(ee),xe=isNaN(ae);if(he!==xe)return he?1:-1}}return Y.length-q.length}function h(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),M(p.select(this));var q=g(Y),Z=i(Y);if(Y.parcatsViewModel.graphDiv.emit("plotly_hover",{points:q,event:p.event,constraints:Z}),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ee=p.mouse(this)[0],ae=Y.parcatsViewModel.graphDiv,he=Y.parcatsViewModel.trace,xe=ae._fullLayout,we=xe._paperdiv.node().getBoundingClientRect(),Me=Y.parcatsViewModel.graphDiv.getBoundingClientRect(),Se,Ie,Ve;for(Ve=0;Ve"),yt=p.mouse(ae)[0];l.loneHover({trace:he,x:_e-we.left+Me.left,y:ce-we.top+Me.top,text:Ye,color:Y.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ve,idealAlign:yt<_e?"right":"left",hovertemplate:(he.line||{}).hovertemplate,hovertemplateLabels:Be,eventData:[{data:he._input,fullData:he,count:le,probability:Ae}]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:ae})}}}function v(Y){if(!Y.parcatsViewModel.dragDimension&&(S(p.select(this)),l.loneUnhover(Y.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),Y.parcatsViewModel.pathSelection.sort(c),Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var q=g(Y),Z=i(Y);Y.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:q,event:p.event,constraints:Z})}}function g(Y){for(var q=[],Z=Q(Y.parcatsViewModel),ee=0;eek.mostReadable(q.model.color)).attr("stroke-width",.3)}function C(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function _(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function T(Y){Y.attr("stroke","black").attr("stroke-width",1.5)}function f(Y){Y.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function u(Y){var q=Y.parcatsViewModel.pathSelection,Z=Y.categoryViewModel.model.dimensionInd,ee=Y.categoryViewModel.model.categoryInd;return q.filter(function(ae){return ae.model.categoryInds[Z]===ee&&ae.model.color===Y.color})}function A(Y){var q=p.select(Y.parentNode).selectAll("rect.bandrect");q.each(function(Z){var ee=u(Z);M(ee),ee.each(function(){e.raiseToTop(this)})}),C(p.select(Y.parentNode))}function x(Y){var q=p.select(Y).datum(),Z=u(q);M(Z),Z.each(function(){e.raiseToTop(this)}),p.select(Y.parentNode).selectAll("rect.bandrect").filter(function(ee){return ee.color===q.color}).each(function(){e.raiseToTop(this),T(p.select(this))})}function z(Y,q,Z){var ee=p.select(Y).datum(),ae=ee.categoryViewModel.model,he=ee.parcatsViewModel.graphDiv,xe=p.select(Y.parentNode).selectAll("rect.bandrect"),we=[];xe.each(function(Se){var Ie=u(Se);Ie.each(function(Ve){Array.prototype.push.apply(we,g(Ve))})});var Me={};Me[ae.dimensionInd]=ae.categoryValue,he.emit(q,{points:we,event:Z,constraints:Me})}function I(Y,q,Z){var ee=p.select(Y).datum(),ae=ee.categoryViewModel.model,he=ee.parcatsViewModel.graphDiv,xe=u(ee),we=[];xe.each(function(Se){Array.prototype.push.apply(we,g(Se))});var Me={};Me[ae.dimensionInd]=ae.categoryValue,ee.rawColor!==void 0&&(Me.color=ee.rawColor),he.emit(q,{points:we,event:Z,constraints:Me})}function O(Y,q,Z){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ae=Y._fullLayout._invScaleY,he=p.select(Z.parentNode).select("rect.catrect"),xe=he.node().getBoundingClientRect(),we=he.datum(),Me=we.parcatsViewModel,Se=Me.model.dimensions[we.model.dimensionInd],Ie=Me.trace,Ve=xe.top+xe.height/2,Ge,ke;Me.dimensions.length>1&&Se.displayInd===Me.dimensions.length-1?(Ge=xe.left,ke="left"):(Ge=xe.left+xe.width,ke="right");var _e=we.model.count,ce=we.model.categoryLabel,ve=_e/we.parcatsViewModel.model.count,le={countLabel:_e,categoryLabel:ce,probabilityLabel:ve.toFixed(3)},Ae=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ae.push(["Count:",le.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ae.push(["P("+le.categoryLabel+"):",le.probabilityLabel].join(" "));var Be=Ae.join("
");return{trace:Ie,x:ee*(Ge-q.left),y:ae*(Ve-q.top),text:Be,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:le,eventData:[{data:Ie._input,fullData:Ie,count:_e,category:ce,probability:ve}]}}function D(Y,q,Z){var ee=[];return p.select(Z.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ae=this;ee.push(O(Y,q,ae))}),ee}function B(Y,q,Z){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ae=Y._fullLayout._invScaleY,he=Z.getBoundingClientRect(),xe=p.select(Z).datum(),we=xe.categoryViewModel,Me=we.parcatsViewModel,Se=Me.model.dimensions[we.model.dimensionInd],Ie=Me.trace,Ve=he.y+he.height/2,Ge,ke;Me.dimensions.length>1&&Se.displayInd===Me.dimensions.length-1?(Ge=he.left,ke="left"):(Ge=he.left+he.width,ke="right");var _e=we.model.categoryLabel,ce=xe.parcatsViewModel.model.count,ve=0;xe.categoryViewModel.bands.forEach(function($t){$t.color===xe.color&&(ve+=$t.count)});var le=we.model.count,Ae=0;Me.pathSelection.each(function($t){$t.model.color===xe.color&&(Ae+=$t.model.count)});var Be=ve/ce,Xe=ve/Ae,Ye=ve/le,yt={countLabel:ve,categoryLabel:_e,probabilityLabel:Be.toFixed(3)},gt=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&>.push(["Count:",yt.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(gt.push("P(color \u2229 "+_e+"): "+yt.probabilityLabel),gt.push("P("+_e+" | color): "+Xe.toFixed(3)),gt.push("P(color | "+_e+"): "+Ye.toFixed(3)));var Tt=gt.join("
"),At=k.mostReadable(xe.color);return{trace:Ie,x:ee*(Ge-q.left),y:ae*(Ve-q.top),text:Tt,color:xe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:At,fontSize:10,idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:yt,eventData:[{data:Ie._input,fullData:Ie,category:_e,count:ce,probability:Be,categorycount:le,colorcount:Ae,bandcolorcount:ve}]}}function F(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var q=p.mouse(this)[1];if(q<-1)return;var Z=Y.parcatsViewModel.graphDiv,ee=Z._fullLayout,ae=ee._paperdiv.node().getBoundingClientRect(),he=Y.parcatsViewModel.hoveron,xe=this;if(he==="color"?(x(xe),I(xe,"plotly_hover",p.event)):(A(xe),z(xe,"plotly_hover",p.event)),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var we;he==="category"?we=O(Z,ae,xe):he==="color"?we=B(Z,ae,xe):he==="dimension"&&(we=D(Z,ae,xe)),we&&l.loneHover(we,{container:ee._hoverlayer.node(),outerContainer:ee._paper.node(),gd:Z})}}}function P(Y){var q=Y.parcatsViewModel;if(!q.dragDimension&&(S(q.pathSelection),_(q.dimensionSelection.selectAll("g.category")),f(q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),l.loneUnhover(q.graphDiv._fullLayout._hoverlayer.node()),q.pathSelection.sort(c),q.hoverinfoItems.indexOf("skip")===-1)){var Z=Y.parcatsViewModel.hoveron,ee=this;Z==="color"?I(ee,"plotly_unhover",p.event):z(ee,"plotly_unhover",p.event)}}function j(Y){Y.parcatsViewModel.arrangement!=="fixed"&&(Y.dragDimensionDisplayInd=Y.model.displayInd,Y.initialDragDimensionDisplayInds=Y.parcatsViewModel.model.dimensions.map(function(q){return q.displayInd}),Y.dragHasMoved=!1,Y.dragCategoryDisplayInd=null,p.select(this).selectAll("g.category").select("rect.catrect").each(function(q){var Z=p.mouse(this)[0],ee=p.mouse(this)[1];-2<=Z&&Z<=q.width+2&&-2<=ee&&ee<=q.height+2&&(Y.dragCategoryDisplayInd=q.model.displayInd,Y.initialDragCategoryDisplayInds=Y.model.categories.map(function(ae){return ae.displayInd}),q.model.dragY=q.y,e.raiseToTop(this.parentNode),p.select(this.parentNode).selectAll("rect.bandrect").each(function(ae){ae.yIe.y+Ie.height/2&&(he.model.displayInd=Ie.model.displayInd,Ie.model.displayInd=we),Y.dragCategoryDisplayInd=he.model.displayInd}if(Y.dragCategoryDisplayInd===null||Y.parcatsViewModel.arrangement==="freeform"){ae.model.dragX=p.event.x;var Ve=Y.parcatsViewModel.dimensions[Z],Ge=Y.parcatsViewModel.dimensions[ee];Ve!==void 0&&ae.model.dragXGe.x&&(ae.model.displayInd=Ge.model.displayInd,Ge.model.displayInd=Y.dragDimensionDisplayInd),Y.dragDimensionDisplayInd=ae.model.displayInd}K(Y.parcatsViewModel),X(Y.parcatsViewModel),ne(Y.parcatsViewModel),re(Y.parcatsViewModel)}}function $(Y){if(Y.parcatsViewModel.arrangement!=="fixed"&&Y.dragDimensionDisplayInd!==null){p.select(this).selectAll("text").attr("font-weight","normal");var q={},Z=Q(Y.parcatsViewModel),ee=Y.parcatsViewModel.model.dimensions.map(function(Ge){return Ge.displayInd}),ae=Y.initialDragDimensionDisplayInds.some(function(Ge,ke){return Ge!==ee[ke]});ae&&ee.forEach(function(Ge,ke){var _e=Y.parcatsViewModel.model.dimensions[ke].containerInd;q["dimensions["+_e+"].displayindex"]=Ge});var he=!1;if(Y.dragCategoryDisplayInd!==null){var xe=Y.model.categories.map(function(Ge){return Ge.displayInd});if(he=Y.initialDragCategoryDisplayInds.some(function(Ge,ke){return Ge!==xe[ke]}),he){var we=Y.model.categories.slice().sort(function(Ge,ke){return Ge.displayInd-ke.displayInd}),Me=we.map(function(Ge){return Ge.categoryValue}),Se=we.map(function(Ge){return Ge.categoryLabel});q["dimensions["+Y.model.containerInd+"].categoryarray"]=[Me],q["dimensions["+Y.model.containerInd+"].ticktext"]=[Se],q["dimensions["+Y.model.containerInd+"].categoryorder"]="array"}}if(Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!Y.dragHasMoved&&Y.potentialClickBand&&(Y.parcatsViewModel.hoveron==="color"?I(Y.potentialClickBand,"plotly_click",p.event.sourceEvent):z(Y.potentialClickBand,"plotly_click",p.event.sourceEvent)),Y.model.dragX=null,Y.dragCategoryDisplayInd!==null){var Ie=Y.parcatsViewModel.dimensions[Y.dragDimensionDisplayInd].categories[Y.dragCategoryDisplayInd];Ie.model.dragY=null,Y.dragCategoryDisplayInd=null}Y.dragDimensionDisplayInd=null,Y.parcatsViewModel.dragDimension=null,Y.dragHasMoved=null,Y.potentialClickBand=null,K(Y.parcatsViewModel),X(Y.parcatsViewModel);var Ve=p.transition().duration(300).ease("cubic-in-out");Ve.each(function(){ne(Y.parcatsViewModel,!0),re(Y.parcatsViewModel,!0)}).each("end",function(){(ae||he)&&E.restyle(Y.parcatsViewModel.graphDiv,q,[Z])})}}function Q(Y){for(var q,Z=Y.graphDiv._fullData,ee=0;ee=0;Me--)Se+="C"+xe[Me]+","+(q[Me+1]+ee)+" "+he[Me]+","+(q[Me]+ee)+" "+(Y[Me]+Z[Me])+","+(q[Me]+ee),Se+="l-"+Z[Me]+",0 ";return Se+="Z",Se}function X(Y){var q=Y.dimensions,Z=Y.model,ee=q.map(function(Xt){return Xt.categories.map(function(or){return or.y})}),ae=Y.model.dimensions.map(function(Xt){return Xt.categories.map(function(or){return or.displayInd})}),he=Y.model.dimensions.map(function(Xt){return Xt.displayInd}),xe=Y.dimensions.map(function(Xt){return Xt.model.dimensionInd}),we=q.map(function(Xt){return Xt.x}),Me=q.map(function(Xt){return Xt.width}),Se=[];for(var Ie in Z.paths)Z.paths.hasOwnProperty(Ie)&&Se.push(Z.paths[Ie]);function Ve(Xt){var or=Xt.categoryInds.map(function(vt,ht){return ae[ht][vt]}),Ot=xe.map(function(vt){return or[vt]});return Ot}Se.sort(function(Xt,or){var Ot=Ve(Xt),vt=Ve(or);return Y.sortpaths==="backward"&&(Ot.reverse(),vt.reverse()),Ot.push(Xt.valueInds[0]),vt.push(or.valueInds[0]),Y.bundlecolors&&(Ot.unshift(Xt.rawColor),vt.unshift(or.rawColor)),m(Ot,vt)});for(var Ge=new Array(Se.length),ke=q[0].model.count,_e=q[0].categories.map(function(Xt){return Xt.height}).reduce(function(Xt,or){return Xt+or}),ce=0;ce0?le=_e*(ve.count/ke):le=0;for(var Ae=new Array(ee.length),Be=0;Be1?xe=(Y.width-2*Z-ee)/(ae-1):xe=0,we=Z,Me=we+xe*he;var Se=[],Ie=Y.model.maxCats,Ve=q.categories.length,Ge=8,ke=q.count,_e=Y.height-Ge*(Ie-1),ce,ve,le,Ae,Be,Xe=(Ie-Ve)*Ge/2,Ye=q.categories.map(function(yt){return{displayInd:yt.displayInd,categoryInd:yt.categoryInd}});for(Ye.sort(function(yt,gt){return yt.displayInd-gt.displayInd}),Be=0;Be0?ce=ve.count/ke*_e:ce=0,le={key:ve.valueInds[0],model:ve,width:ee,height:ce,y:ve.dragY!==null?ve.dragY:Xe,bands:[],parcatsViewModel:Y},Xe=Xe+ce+Ge,Se.push(le);return{key:q.dimensionInd,x:q.dragX!==null?q.dragX:Me,y:0,width:ee,model:q,categories:Se,parcatsViewModel:Y,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),MM=ze({"src/traces/parcats/plot.js"(J,V){"use strict";var p=Gq();V.exports=function(E,k,l,e){var t=E._fullLayout,n=t._paper,r=t._size;p(E,n,k,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},l,e)}}}),Hq=ze({"src/traces/parcats/base_plot.js"(J){"use strict";var V=zf().getModuleCalcData,p=MM(),b="parcats";J.name=b,J.plot=function(E,k,l,e){var t=V(E.calcdata,b);if(t.length){var n=t[0];p(E,n,l,e)}},J.clean=function(E,k,l,e){var t=e._has&&e._has("parcats"),n=k._has&&k._has("parcats");t&&!n&&e._paperdiv.selectAll(".parcats").remove()}}}),Wq=ze({"src/traces/parcats/index.js"(J,V){"use strict";V.exports={attributes:AM(),supplyDefaults:qq(),calc:Vq(),plot:MM(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:Hq(),categories:["noOpacity"],meta:{}}}}),Yq=ze({"lib/parcats.js"(J,V){"use strict";V.exports=Wq()}}),Xq=ze({"src/plots/map/styles/arcgis-sat-hybrid.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},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"}},{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} + }`}),S={};return{regl:T,draw:b,atlas:S}},C.prototype.update=function(T){var b=this;if(typeof T=="string")T={text:T};else if(!T)return;T=a(T,{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),T.opacity!=null&&(Array.isArray(T.opacity)?this.opacity=T.opacity.map(function(ee){return parseFloat(ee)}):this.opacity=parseFloat(T.opacity)),T.viewport!=null&&(this.viewport=c(T.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]),T.kerning!=null&&(this.kerning=T.kerning),T.offset!=null&&(typeof T.offset=="number"&&(T.offset=[T.offset,0]),this.positionOffset=y(T.offset)),T.direction&&(this.direction=T.direction),T.range&&(this.range=T.range,this.scale=[1/(T.range[2]-T.range[0]),1/(T.range[3]-T.range[1])],this.translate=[-T.range[0],-T.range[1]]),T.scale&&(this.scale=T.scale),T.translate&&(this.translate=T.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!T.font&&(T.font=C.baseFontSize+"px sans-serif");var S=!1,A=!1;if(T.font&&(Array.isArray(T.font)?T.font:[T.font]).forEach(function(ee,ce){if(typeof ee=="string")try{ee=t.parse(ee)}catch{ee=t.parse(C.baseFontSize+"px "+ee)}else{var _e=ee.style,Se=ee.weight,Me=ee.stretch,Ue=ee.variant;ee=t.parse(t.stringify(ee)),_e&&(ee.style=_e),Se&&(ee.weight=Se),Me&&(ee.stretch=Me),Ue&&(ee.variant=Ue)}var Ge=t.stringify({size:C.baseFontSize,family:ee.family,stretch:E?ee.stretch:void 0,variant:ee.variant,weight:ee.weight,style:ee.style}),Ze=h(ee.size),Ke=Math.round(Ze[0]*d(Ze[1]));if(Ke!==b.fontSize[ce]&&(A=!0,b.fontSize[ce]=Ke),(!b.font[ce]||Ge!=b.font[ce].baseString)&&(S=!0,b.font[ce]=C.fonts[Ge],!b.font[ce])){var dt=ee.family.join(", "),_t=[ee.style];ee.style!=ee.variant&&_t.push(ee.variant),ee.variant!=ee.weight&&_t.push(ee.weight),E&&ee.weight!=ee.stretch&&_t.push(ee.stretch),b.font[ce]={baseString:Ge,family:dt,weight:ee.weight,stretch:ee.stretch,style:ee.style,variant:ee.variant,width:{},kerning:{},metrics:m(dt,{origin:"top",fontSize:C.baseFontSize,fontStyle:_t.join(" ")})},C.fonts[Ge]=b.font[ce]}}),(S||A)&&this.font.forEach(function(ee,ce){var _e=t.stringify({size:b.fontSize[ce],family:ee.family,stretch:E?ee.stretch:void 0,variant:ee.variant,weight:ee.weight,style:ee.style});if(b.fontAtlas[ce]=b.shader.atlas[_e],!b.fontAtlas[ce]){var Se=ee.metrics;b.shader.atlas[_e]=b.fontAtlas[ce]={fontString:_e,step:Math.ceil(b.fontSize[ce]*Se.bottom*.5)*2,em:b.fontSize[ce],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:b.regl.texture()}}T.text==null&&(T.text=b.text)}),typeof T.text=="string"&&T.position&&T.position.length>2){for(var F=Array(T.position.length*.5),D=0;D2){for(var z=!T.position[0].length,I=u.mallocFloat(this.count*2),L=0,B=0;L1?b.align[ce]:b.align[0]:b.align;if(typeof _e=="number")return _e;switch(_e){case"right":case"end":return-ee;case"center":case"centre":case"middle":return-ee*.5}return 0})),this.baseline==null&&T.baseline==null&&(T.baseline=0),T.baseline!=null&&(this.baseline=T.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ee,ce){var _e=(b.font[ce]||b.font[0]).metrics,Se=0;return Se+=_e.bottom*.5,typeof ee=="number"?Se+=ee-_e.baseline:Se+=-_e[ee],Se*=-1,Se})),T.color!=null)if(T.color||(T.color="transparent"),typeof T.color=="string"||!isNaN(T.color))this.color=l(T.color,"uint8");else{var ue;if(typeof T.color[0]=="number"&&T.color.length>this.counts.length){var fe=T.color.length;ue=u.mallocUint8(fe);for(var pe=(T.color.subarray||T.color.slice).bind(T.color),we=0;we4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(oe){var te=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(te);for(var ie=0;ie1?this.counts[ie]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ie]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ie*4,ie*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ie]:this.opacity,baseline:this.baselineOffset[ie]!=null?this.baselineOffset[ie]:this.baselineOffset[0],align:this.align?this.alignOffset[ie]!=null?this.alignOffset[ie]:this.alignOffset[0]:0,atlas:this.fontAtlas[ie]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ie*2,ie*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=[]}},C.prototype.destroy=function(){},C.prototype.kerning=!0,C.prototype.position={constant:new Float32Array(2)},C.prototype.translate=null,C.prototype.scale=null,C.prototype.font=null,C.prototype.text="",C.prototype.positionOffset=[0,0],C.prototype.opacity=1,C.prototype.color=new Uint8Array([0,0,0,255]),C.prototype.alignOffset=[0,0],C.maxAtlasSize=1024,C.atlasCanvas=document.createElement("canvas"),C.atlasContext=C.atlasCanvas.getContext("2d",{alpha:!1}),C.baseFontSize=64,C.fonts={};function w(k){return typeof k=="function"&&k._gl&&k.prop&&k.texture&&k.buffer}r.exports=C}}),LM=ye({"src/lib/prepare_regl.js"(e,r){"use strict";var t=vP(),a=hI();r.exports=function(o,s,l){var n=o._fullLayout,u=!0;return n._glcanvas.each(function(c){if(c.regl){c.regl.preloadCachedCode(l);return}if(!(c.pick&&!n._has("parcoords"))){try{c.regl=a({canvas:this,attributes:{antialias:!c.pick,preserveDrawingBuffer:!0},pixelRatio:o._context.plotGlPixelRatio||window.devicePixelRatio,extensions:s||[],cachedCode:l||{}})}catch{u=!1}c.regl||(u=!1),u&&this.addEventListener("webglcontextlost",function(f){o&&o.emit&&o.emit("plotly_webglcontextlost",{event:f,layer:c.key})},!1)}}),u||t({container:n._glcontainer.node()}),u}}}),vI=ye({"src/traces/scattergl/plot.js"(p,r){"use strict";var t=HP(),a=iI(),i=aue(),o=yue(),s=Yt(),l=Np().selectMode,n=LM(),u=ms(),c=T9(),f=qP().styleTextSelection,h={};function d(g,m,y,_){var v=g._size,x=g.width*_,E=g.height*_,M=v.l*_,C=v.b*_,w=v.r*_,k=v.t*_,T=v.w*_,b=v.h*_;return[M+m.domain[0]*T,C+y.domain[0]*b,x-w-(1-m.domain[1])*T,E-k-(1-y.domain[1])*b]}var p=r.exports=function(m,y,_){if(_.length){var v=m._fullLayout,x=y._scene,E=y.xaxis,M=y.yaxis,C,w;if(x){var k=n(m,["ANGLE_instanced_arrays","OES_element_index_uint"],h);if(!k){x.init();return}var T=x.count,b=v._glcanvas.data()[0].regl;if(c(m,y,_),x.dirty){if((x.line2d||x.error2d)&&!(x.scatter2d||x.fill2d||x.glText)&&b.clear({color:!0,depth:!0}),x.error2d===!0&&(x.error2d=i(b)),x.line2d===!0&&(x.line2d=a(b)),x.scatter2d===!0&&(x.scatter2d=t(b)),x.fill2d===!0&&(x.fill2d=a(b)),x.glText===!0)for(x.glText=new Array(T),C=0;Cx.glText.length){var S=T-x.glText.length;for(C=0;CY&&(isNaN(q[K])||isNaN(q[K+1]));)K-=2;j.positions=q.slice(Y,K+2)}return j}),x.line2d.update(x.lineOptions)),x.error2d){var D=(x.errorXOptions||[]).concat(x.errorYOptions||[]).map(function(j){return j||{positions:[],errors:[]}});x.error2d.update(D)}x.scatter2d&&x.scatter2d.update(x.markerOptions),x.fillOrder=s.repeat(null,T),x.fill2d&&(x.fillOptions=x.fillOptions.map(function(j,q){var Y=_[q];if(!(!j||!Y||!Y[0]||!Y[0].trace)){var K=Y[0],re=K.trace,se=K.t,le=x.lineOptions[q],ue,fe,pe=[];re._ownfill&&pe.push(q),re._nexttrace&&pe.push(q+1),pe.length&&(x.fillOrder[q]=pe);var we=[],xe=le&&le.positions||se.positions,he,oe;if(re.fill==="tozeroy"){for(he=0;hehe&&isNaN(xe[oe+1]);)oe-=2;xe[he+1]!==0&&(we=[xe[he],0]),we=we.concat(xe.slice(he,oe+2)),xe[oe+1]!==0&&(we=we.concat([xe[oe],0]))}else if(re.fill==="tozerox"){for(he=0;hehe&&isNaN(xe[oe]);)oe-=2;xe[he]!==0&&(we=[0,xe[he+1]]),we=we.concat(xe.slice(he,oe+2)),xe[oe]!==0&&(we=we.concat([0,xe[oe+1]]))}else if(re.fill==="toself"||re.fill==="tonext"){for(we=[],ue=0,j.splitNull=!0,fe=0;fe-1;for(let[j]of _)if(j){var I=j.trace,L=j.t,B=L.index,O=I._length,G=L.x,$=L.y;if(I.selectedpoints||P||z){if(P||(P=!0),I.selectedpoints){var X=x.selectBatch[B]=I.selectedpoints,Z={};for(w=0;wE&&y||xf,A;for(S?A=y.sizeAvg||Math.max(y.size,3):A=i(p,m),M=0;M{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,o(()=>{this.dirty=!1})),this)},u.prototype.update=function(...d){if(!d.length)return;for(let m=0;mA||!y.lower&&S{p[_+x]=m})}this.scatter.draw(...p)}return this},u.prototype.destroy=function(){return this.traces.forEach(d=>{d.buffer&&d.buffer.destroy&&d.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function c(d,p,g){let m=d.id!=null?d.id:d,y=p,_=g;return m<<16|(y&255)<<8|_&255}function f(d,p,g){let m,y,_,v,x,E,M,C,w=d[p],k=d[g];return w.length>2?(m=w[0],_=w[2],y=w[1],v=w[3]):w.length?(m=y=w[0],_=v=w[1]):(m=w.x,y=w.y,_=w.x+w.width,v=w.y+w.height),k.length>2?(x=k[0],M=k[2],E=k[1],C=k[3]):k.length?(x=E=k[0],M=C=k[1]):(x=k.x,E=k.y,M=k.x+k.width,C=k.y+k.height),[x,y,M,v]}function h(d){if(typeof d=="number")return[d,d,d,d];if(d.length===2)return[d[0],d[1],d[0],d[1]];{let p=l(d);return[p.x,p.y,p.x+p.width,p.y+p.height]}}}}),kue=ye({"src/traces/splom/plot.js"(e,r){"use strict";var t=Sue(),a=Yt(),i=Gs(),o=Np().selectMode;r.exports=function(n,u,c){if(c.length)for(var f=0;f-1,z=o(y)||!!f.selectedpoints||P,I=!0;if(z){var L=f._length;if(f.selectedpoints){d.selectBatch=f.selectedpoints;var B=f.selectedpoints,O={};for(x=0;x=G[$][0]&&O<=G[$][1])return!0;return!1}function p(O){O.attr("x",-t.bar.captureWidth/2).attr("width",t.bar.captureWidth)}function g(O){O.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(O){if(!O.brush.filterSpecified)return"0,"+O.height;for(var G=y(O.brush.filter.getConsolidated(),O.height),$=[0],X,Z,J,N=G.length?G[0][0]:null,H=0;HO[1]+$||G=.9*O[1]+.1*O[0]?"n":G<=.9*O[0]+.1*O[1]?"s":"ns"}function v(){a.select(document.body).style("cursor",null)}function x(O){O.attr("stroke-dasharray",m)}function E(O,G){var $=a.select(O).selectAll(".highlight, .highlight-shadow"),X=G?$.transition().duration(t.bar.snapDuration).each("end",G):$;x(X)}function M(O,G){var $=O.brush,X=$.filterSpecified,Z=NaN,J={},N;if(X){var H=O.height,W=$.filter.getConsolidated(),U=y(W,H),V=NaN,j=NaN,q=NaN;for(N=0;N<=U.length;N++){var Y=U[N];if(Y&&Y[0]<=G&&G<=Y[1]){V=N;break}else if(j=N?N-1:NaN,Y&&Y[0]>G){q=N;break}}if(Z=V,isNaN(Z)&&(isNaN(j)||isNaN(q)?Z=isNaN(j)?q:j:Z=G-U[j][1]=ue[0]&&le<=ue[1]){J.clickableOrdinalRange=ue;break}}}return J}function C(O,G){a.event.sourceEvent.stopPropagation();var $=G.height-a.mouse(O)[1]-2*t.verticalPadding,X=G.unitToPaddedPx.invert($),Z=G.brush,J=M(G,$),N=J.interval,H=Z.svgBrush;if(H.wasDragged=!1,H.grabbingBar=J.region==="ns",H.grabbingBar){var W=N.map(G.unitToPaddedPx);H.grabPoint=$-W[0]-t.verticalPadding,H.barLength=W[1]-W[0]}H.clickableOrdinalRange=J.clickableOrdinalRange,H.stayingIntervals=G.multiselect&&Z.filterSpecified?Z.filter.getConsolidated():[],N&&(H.stayingIntervals=H.stayingIntervals.filter(function(U){return U[0]!==N[0]&&U[1]!==N[1]})),H.startExtent=J.region?N[J.region==="s"?1:0]:X,G.parent.inBrushDrag=!0,H.brushStartCallback()}function w(O,G){a.event.sourceEvent.stopPropagation();var $=G.height-a.mouse(O)[1]-2*t.verticalPadding,X=G.brush.svgBrush;X.wasDragged=!0,X._dragging=!0,X.grabbingBar?X.newExtent=[$-X.grabPoint,$+X.barLength-X.grabPoint].map(G.unitToPaddedPx.invert):X.newExtent=[X.startExtent,G.unitToPaddedPx.invert($)].sort(s),G.brush.filterSpecified=!0,X.extent=X.stayingIntervals.concat([X.newExtent]),X.brushCallback(G),E(O.parentNode)}function k(O,G){var $=G.brush,X=$.filter,Z=$.svgBrush;Z._dragging||(T(O,G),w(O,G),G.brush.svgBrush.wasDragged=!1),Z._dragging=!1;var J=a.event;J.sourceEvent.stopPropagation();var N=Z.grabbingBar;if(Z.grabbingBar=!1,Z.grabLocation=void 0,G.parent.inBrushDrag=!1,v(),!Z.wasDragged){Z.wasDragged=void 0,Z.clickableOrdinalRange?$.filterSpecified&&G.multiselect?Z.extent.push(Z.clickableOrdinalRange):(Z.extent=[Z.clickableOrdinalRange],$.filterSpecified=!0):N?(Z.extent=Z.stayingIntervals,Z.extent.length===0&&R($)):R($),Z.brushCallback(G),E(O.parentNode),Z.brushEndCallback($.filterSpecified?X.getConsolidated():[]);return}var H=function(){X.set(X.getConsolidated())};if(G.ordinal){var W=G.unitTickvals;W[W.length-1]Z.newExtent[0];Z.extent=Z.stayingIntervals.concat(U?[Z.newExtent]:[]),Z.extent.length||R($),Z.brushCallback(G),U?E(O.parentNode,H):(H(),E(O.parentNode))}else H();Z.brushEndCallback($.filterSpecified?X.getConsolidated():[])}function T(O,G){var $=G.height-a.mouse(O)[1]-2*t.verticalPadding,X=M(G,$),Z="crosshair";X.clickableOrdinalRange?Z="pointer":X.region&&(Z=X.region+"-resize"),a.select(document.body).style("cursor",Z)}function b(O){O.on("mousemove",function(G){a.event.preventDefault(),G.parent.inBrushDrag||T(this,G)}).on("mouseleave",function(G){G.parent.inBrushDrag||v()}).call(a.behavior.drag().on("dragstart",function(G){C(this,G)}).on("drag",function(G){w(this,G)}).on("dragend",function(G){k(this,G)}))}function S(O,G){return O[0]-G[0]}function A(O,G,$){var X=$._context.staticPlot,Z=O.selectAll(".background").data(o);Z.enter().append("rect").classed("background",!0).call(p).call(g).style("pointer-events",X?"none":"auto").attr("transform",l(0,t.verticalPadding)),Z.call(b).attr("height",function(H){return H.height-t.verticalPadding});var J=O.selectAll(".highlight-shadow").data(o);J.enter().append("line").classed("highlight-shadow",!0).attr("x",-t.bar.width/2).attr("stroke-width",t.bar.width+t.bar.strokeWidth).attr("stroke",G).attr("opacity",t.bar.strokeOpacity).attr("stroke-linecap","butt"),J.attr("y1",function(H){return H.height}).call(x);var N=O.selectAll(".highlight").data(o);N.enter().append("line").classed("highlight",!0).attr("x",-t.bar.width/2).attr("stroke-width",t.bar.width-t.bar.strokeWidth).attr("stroke",t.bar.fillColor).attr("opacity",t.bar.fillOpacity).attr("stroke-linecap","butt"),N.attr("y1",function(H){return H.height}).call(x)}function F(O,G,$){var X=O.selectAll("."+t.cn.axisBrush).data(o,i);X.enter().append("g").classed(t.cn.axisBrush,!0),A(X,G,$)}function D(O){return O.svgBrush.extent.map(function(G){return G.slice()})}function R(O){O.filterSpecified=!1,O.svgBrush.extent=[[-1/0,1/0]]}function P(O){return function($){var X=$.brush,Z=D(X),J=Z.slice();X.filter.set(J),O()}}function z(O){for(var G=O.slice(),$=[],X,Z=G.shift();Z;){for(X=Z.slice();(Z=G.shift())&&Z[0]<=X[1];)X[1]=Math.max(X[1],Z[1]);$.push(X)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function I(){var O=[],G,$;return{set:function(X){O=X.map(function(Z){return Z.slice().sort(s)}).sort(S),O.length===1&&O[0][0]===-1/0&&O[0][1]===1/0&&(O=[[0,-1]]),G=z(O),$=O.reduce(function(Z,J){return[Math.min(Z[0],J[0]),Math.max(Z[1],J[1])]},[1/0,-1/0])},get:function(){return O.slice()},getConsolidated:function(){return G},getBounds:function(){return $}}}function L(O,G,$,X,Z,J){var N=I();return N.set($),{filter:N,filterSpecified:G,svgBrush:{extent:[],brushStartCallback:X,brushCallback:P(Z),brushEndCallback:J}}}function B(O,G){if(Array.isArray(O[0])?(O=O.map(function(X){return X.sort(s)}),G.multiselect?O=z(O.sort(S)):O=[O[0]]):O=[O.sort(s)],G.tickvals){var $=G.tickvals.slice().sort(s);if(O=O.map(function(X){var Z=[h(0,$,X[0],[]),h(1,$,X[1],[])];if(Z[1]>Z[0])return Z}).filter(function(X){return X}),!O.length)return}return O.length>1?O:O[0]}r.exports={makeBrush:L,ensureAxisBrush:F,cleanRanges:B}}}),zue=ye({"src/traces/parcoords/defaults.js"(e,r){"use strict";var t=Yt(),a=xc().hasColorscale,i=Su(),o=Ds().defaults,s=Oc(),l=qi(),n=yI(),u=_I(),c=Wb().maxDimensionCount,f=FM();function h(p,g,m,y,_){var v=_("line.color",m);if(a(p,"line")&&t.isArrayOrTypedArray(v)){if(v.length)return _("line.colorscale"),i(p,g,y,_,{prefix:"line.",cLetter:"c"}),v.length;g.line.color=m}return 1/0}function d(p,g,m,y){function _(C,w){return t.coerce(p,g,n.dimensions,C,w)}var v=_("values"),x=_("visible");if(v&&v.length||(x=g.visible=!1),x){_("label"),_("tickvals"),_("ticktext"),_("tickformat");var E=_("range");g._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:E},l.setConvert(g._ax,y.layout),_("multiselect");var M=_("constraintrange");M&&(g.constraintrange=u.cleanRanges(M,g))}}r.exports=function(g,m,y,_){function v(w,k){return t.coerce(g,m,n,w,k)}var x=g.dimensions;Array.isArray(x)&&x.length>c&&(t.log("parcoords traces support up to "+c+" dimensions at the moment"),x.splice(c));var E=s(g,m,{name:"dimensions",layout:_,handleItemDefaults:d}),M=h(g,m,y,_,v);o(m,_,v),(!Array.isArray(E)||!E.length)&&(m.visible=!1),f(m,E,"values",M);var C=t.extendFlat({},_.font,{size:Math.round(_.font.size/1.2)});t.coerceFont(v,"labelfont",C),t.coerceFont(v,"tickfont",C,{autoShadowDflt:!0}),t.coerceFont(v,"rangefont",C),v("labelangle"),v("labelside"),v("unselected.line.color"),v("unselected.line.opacity")}}}),Bue=ye({"src/traces/parcoords/calc.js"(e,r){"use strict";var t=Yt().isArrayOrTypedArray,a=As(),i=$p().wrap;r.exports=function(l,n){var u,c;return a.hasColorscale(n,"line")&&t(n.line.color)?(u=n.line.color,c=a.extractOpts(n.line).colorscale,a.calc(l,n,{vals:u,containerStr:"line",cLetter:"c"})):(u=o(n._length),c=[[0,n.line.color],[1,n.line.color]]),i({lineColor:u,cscale:c})};function o(s){for(var l=new Array(s),n=0;n 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(` +`),a=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),i=Wb().maxDimensionCount,o=Yt(),s=1e-6,l=2048,n=new Uint8Array(4),u=new Uint8Array(4),c={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function f(k){k.read({x:0,y:0,width:1,height:1,data:n})}function h(k,T,b,S,A){var F=k._gl;F.enable(F.SCISSOR_TEST),F.scissor(T,b,S,A),k.clear({color:[0,0,0,0],depth:1})}function d(k,T,b,S,A,F){var D=F.key;function R(P){var z=Math.min(S,A-P*S);P===0&&(window.cancelAnimationFrame(b.currentRafs[D]),delete b.currentRafs[D],h(k,F.scissorX,F.scissorY,F.scissorWidth,F.viewBoxSize[1])),!b.clearOnly&&(F.count=2*z,F.offset=2*P*S,T(F),P*S+z>>8*T)%256/255}function y(k,T,b){for(var S=new Array(k*(i+4)),A=0,F=0;Ffe&&(fe=j[re].dim1.canvasX,le=re);K===0&&h(A,0,0,z.canvasWidth,z.canvasHeight);var pe=N(b);for(re=0;rere._length&&(oe=oe.slice(0,re._length));var te=re.tickvals,ie;function ee(Ue,Ge){return{val:Ue,text:ie[Ge]}}function ce(Ue,Ge){return Ue.val-Ge.val}if(i(te)&&te.length){a.isTypedArray(te)&&(te=Array.from(te)),ie=re.ticktext,!i(ie)||!ie.length?ie=te.map(o(re.tickformat)):ie.length>te.length?ie=ie.slice(0,te.length):te.length>ie.length&&(te=te.slice(0,ie.length));for(var _e=1;_e=Ge||_t>=Ze)return;var Pt=Me.lineLayer.readPixel(dt,Ze-1-_t),vt=Pt[3]!==0,Tt=vt?Pt[2]+256*(Pt[1]+256*Pt[0]):null,st={x:dt,y:_t,clientX:Ue.clientX,clientY:Ue.clientY,dataIndex:Me.model.key,curveNumber:Tt};Tt!==le&&(vt?H.hover(st):H.unhover&&H.unhover(st),le=Tt)}}),se.style("opacity",function(Me){return Me.pick?0:1}),V.style("background","rgba(255, 255, 255, 0)");var fe=V.selectAll("."+_.cn.parcoords).data(re,p);fe.exit().remove(),fe.enter().append("g").classed(_.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),fe.attr("transform",function(Me){return u(Me.model.translateX,Me.model.translateY)});var pe=fe.selectAll("."+_.cn.parcoordsControlView).data(g,p);pe.enter().append("g").classed(_.cn.parcoordsControlView,!0),pe.attr("transform",function(Me){return u(Me.model.pad.l,Me.model.pad.t)});var we=pe.selectAll("."+_.cn.yAxis).data(function(Me){return Me.dimensions},p);we.enter().append("g").classed(_.cn.yAxis,!0),pe.each(function(Me){B(we,Me,q)}),se.each(function(Me){if(Me.viewModel){!Me.lineLayer||H?Me.lineLayer=x(this,Me):Me.lineLayer.update(Me),(Me.key||Me.key===0)&&(Me.viewModel[Me.key]=Me.lineLayer);var Ue=!Me.context||H;Me.lineLayer.render(Me.viewModel.panels,Ue)}}),we.attr("transform",function(Me){return u(Me.xScale(Me.xIndex),0)}),we.call(t.behavior.drag().origin(function(Me){return Me}).on("drag",function(Me){var Ue=Me.parent;K.linePickActive(!1),Me.x=Math.max(-_.overdrag,Math.min(Me.model.width+_.overdrag,t.event.x)),Me.canvasX=Me.x*Me.model.canvasPixelRatio,we.sort(function(Ge,Ze){return Ge.x-Ze.x}).each(function(Ge,Ze){Ge.xIndex=Ze,Ge.x=Me===Ge?Ge.x:Ge.xScale(Ge.xIndex),Ge.canvasX=Ge.x*Ge.model.canvasPixelRatio}),B(we,Ue,q),we.filter(function(Ge){return Math.abs(Me.xIndex-Ge.xIndex)!==0}).attr("transform",function(Ge){return u(Ge.xScale(Ge.xIndex),0)}),t.select(this).attr("transform",u(Me.x,0)),we.each(function(Ge,Ze,Ke){Ke===Me.parent.key&&(Ue.dimensions[Ze]=Ge)}),Ue.contextLayer&&Ue.contextLayer.render(Ue.panels,!1,!D(Ue)),Ue.focusLayer.render&&Ue.focusLayer.render(Ue.panels)}).on("dragend",function(Me){var Ue=Me.parent;Me.x=Me.xScale(Me.xIndex),Me.canvasX=Me.x*Me.model.canvasPixelRatio,B(we,Ue,q),t.select(this).attr("transform",function(Ge){return u(Ge.x,0)}),Ue.contextLayer&&Ue.contextLayer.render(Ue.panels,!1,!D(Ue)),Ue.focusLayer&&Ue.focusLayer.render(Ue.panels),Ue.pickLayer&&Ue.pickLayer.render(Ue.panels,!0),K.linePickActive(!0),H&&H.axesMoved&&H.axesMoved(Ue.key,Ue.dimensions.map(function(Ge){return Ge.crossfilterDimensionIndex}))})),we.exit().remove();var xe=we.selectAll("."+_.cn.axisOverlays).data(g,p);xe.enter().append("g").classed(_.cn.axisOverlays,!0),xe.selectAll("."+_.cn.axis).remove();var he=xe.selectAll("."+_.cn.axis).data(g,p);he.enter().append("g").classed(_.cn.axis,!0),he.each(function(Me){var Ue=Me.model.height/Me.model.tickDistance,Ge=Me.domainScale,Ze=Ge.domain();t.select(this).call(t.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ue,Me.tickFormat).tickValues(Me.ordinal?Ze:null).tickFormat(function(Ke){return y.isOrdinal(Me)?Ke:G(Me.model.dimensions[Me.visibleIndex],Ke)}).scale(Ge)),f.font(he.selectAll("text"),Me.model.tickFont)}),he.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),he.selectAll("text").style("cursor","default");var oe=xe.selectAll("."+_.cn.axisHeading).data(g,p);oe.enter().append("g").classed(_.cn.axisHeading,!0);var te=oe.selectAll("."+_.cn.axisTitle).data(g,p);te.enter().append("text").classed(_.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",W?"none":"auto"),te.text(function(Me){return Me.label}).each(function(Me){var Ue=t.select(this);f.font(Ue,Me.model.labelFont),c.convertToTspans(Ue,Z)}).attr("transform",function(Me){var Ue=L(Me.model.labelAngle,Me.model.labelSide),Ge=_.axisTitleOffset;return(Ue.dir>0?"":u(0,2*Ge+Me.model.height))+n(Ue.degrees)+u(-Ge*Ue.dx,-Ge*Ue.dy)}).attr("text-anchor",function(Me){var Ue=L(Me.model.labelAngle,Me.model.labelSide),Ge=Math.abs(Ue.dx),Ze=Math.abs(Ue.dy);return 2*Ge>Ze?Ue.dir*Ue.dx<0?"start":"end":"middle"});var ie=xe.selectAll("."+_.cn.axisExtent).data(g,p);ie.enter().append("g").classed(_.cn.axisExtent,!0);var ee=ie.selectAll("."+_.cn.axisExtentTop).data(g,p);ee.enter().append("g").classed(_.cn.axisExtentTop,!0),ee.attr("transform",u(0,-_.axisExtentOffset));var ce=ee.selectAll("."+_.cn.axisExtentTopText).data(g,p);ce.enter().append("text").classed(_.cn.axisExtentTopText,!0).call(z),ce.text(function(Me){return $(Me,!0)}).each(function(Me){f.font(t.select(this),Me.model.rangeFont)});var _e=ie.selectAll("."+_.cn.axisExtentBottom).data(g,p);_e.enter().append("g").classed(_.cn.axisExtentBottom,!0),_e.attr("transform",function(Me){return u(0,Me.model.height+_.axisExtentOffset)});var Se=_e.selectAll("."+_.cn.axisExtentBottomText).data(g,p);Se.enter().append("text").classed(_.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(z),Se.text(function(Me){return $(Me,!1)}).each(function(Me){f.font(t.select(this),Me.model.rangeFont)}),v.ensureAxisBrush(xe,Y,Z)}}}),bI=ye({"src/traces/parcoords/plot.js"(n,r){"use strict";var t=Nue(),a=LM(),i=xI().isVisible,o={};function s(u,c,f){var h=c.indexOf(f),d=u.indexOf(h);return d===-1&&(d+=c.length),d}function l(u,c){return function(h,d){return s(u,c,h)-s(u,c,d)}}var n=r.exports=function(c,f){var h=c._fullLayout,d=a(c,[],o);if(d){var p={},g={},m={},y=h._size;f.forEach(function(M,C){var w=M[0].trace,k=m[C]=w.index;p[C]=c.data[k].dimensions,g[C]=c.data[k].dimensions.slice()});var _=function(M,C,w){var k=g[M][C],T=w.map(function(R){return R.slice()}),b="dimensions["+C+"].constraintrange",S=h._tracePreGUI[c._fullData[m[M]].uid];if(S[b]===void 0){var A=k.constraintrange;S[b]=A||null}var F=c._fullData[m[M]].dimensions[C];T.length?(T.length===1&&(T=T[0]),k.constraintrange=T,F.constraintrange=T.slice(),T=[T]):(delete k.constraintrange,delete F.constraintrange,T=null);var D={};D[b]=T,c.emit("plotly_restyle",[D,[m[M]]])},v=function(M){c.emit("plotly_hover",M)},x=function(M){c.emit("plotly_unhover",M)},E=function(M,C){var w=l(C,g[M].filter(i));p[M].sort(w),g[M].filter(function(k){return!i(k)}).sort(function(k){return g[M].indexOf(k)}).forEach(function(k){p[M].splice(p[M].indexOf(k),1),p[M].splice(g[M].indexOf(k),0,k)}),c.emit("plotly_restyle",[{dimensions:[p[M]]},[m[M]]])};t(c,f,{width:y.w,height:y.h,margin:{t:y.t,r:y.r,b:y.b,l:y.l}},{filterChanged:_,hover:v,unhover:x,axesMoved:E})}};n.reglPrecompiled=o}}),jue=ye({"src/traces/parcoords/base_plot.js"(e){"use strict";var r=ai(),t=_c().getModuleCalcData,a=bI(),i=Sd();e.name="parcoords",e.plot=function(o){var s=t(o.calcdata,"parcoords")[0];s.length&&a(o,s)},e.clean=function(o,s,l,n){var u=n._has&&n._has("parcoords"),c=s._has&&s._has("parcoords");u&&!c&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},e.toSVG=function(o){var s=o._fullLayout._glimages,l=r.select(o).selectAll(".svg-container"),n=l.filter(function(c,f){return f===l.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function u(){var c=this,f=c.toDataURL("image/png"),h=s.append("svg:image");h.attr({xmlns:i.svg,"xlink:href":f,preserveAspectRatio:"none",x:0,y:0,width:c.style.width,height:c.style.height})}n.each(u),window.setTimeout(function(){r.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Uue=ye({"src/traces/parcoords/base_index.js"(e,r){"use strict";r.exports={attributes:yI(),supplyDefaults:zue(),calc:Bue(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:jue(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),que=ye({"src/traces/parcoords/index.js"(e,r){"use strict";var t=Uue();t.plot=bI(),r.exports=t}}),Vue=ye({"lib/parcoords.js"(e,r){"use strict";r.exports=que()}}),wI=ye({"src/traces/parcats/attributes.js"(e,r){"use strict";var t=Xi().extendFlat,a=Oo(),i=vs(),o=rs(),{hovertemplateAttrs:s,templatefallbackAttrs:l}=Ro(),n=Ds().attributes,u=t({editType:"calc"},o("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:l({editType:"plot"})});r.exports={domain:n({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:t({},a.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:l({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:i({editType:"calc"}),tickfont:i({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:u,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}}}),Gue=ye({"src/traces/parcats/defaults.js"(e,r){"use strict";var t=Yt(),a=xc().hasColorscale,i=Su(),o=Ds().defaults,s=Oc(),l=wI(),n=FM(),u=yc().isTypedArraySpec;function c(h,d,p,g,m){m("line.shape"),m("line.hovertemplate"),m("line.hovertemplatefallback");var y=m("line.color",g.colorway[0]);if(a(h,"line")&&t.isArrayOrTypedArray(y)){if(y.length)return m("line.colorscale"),i(h,d,g,m,{prefix:"line.",cLetter:"c"}),y.length;d.line.color=p}return 1/0}function f(h,d){function p(E,M){return t.coerce(h,d,l.dimensions,E,M)}var g=p("values"),m=p("visible");if(g&&g.length||(m=d.visible=!1),m){p("label"),p("displayindex",d._index);var y=h.categoryarray,_=t.isArrayOrTypedArray(y)&&y.length>0||u(y),v;_&&(v="array");var x=p("categoryorder",v);x==="array"?(p("categoryarray"),p("ticktext")):(delete h.categoryarray,delete h.ticktext),!_&&x==="array"&&(d.categoryorder="trace")}}r.exports=function(d,p,g,m){function y(E,M){return t.coerce(d,p,l,E,M)}var _=s(d,p,{name:"dimensions",handleItemDefaults:f}),v=c(d,p,g,m,y);o(p,m,y),(!Array.isArray(_)||!_.length)&&(p.visible=!1),n(p,_,"values",v),y("hoveron"),y("hovertemplate"),y("hovertemplatefallback"),y("arrangement"),y("bundlecolors"),y("sortpaths"),y("counts");var x=m.font;t.coerceFont(y,"labelfont",x,{overrideDflt:{size:Math.round(x.size)}}),t.coerceFont(y,"tickfont",x,{autoShadowDflt:!0,overrideDflt:{size:Math.round(x.size/1.2)}})}}}),Hue=ye({"src/traces/parcats/calc.js"(e,r){"use strict";var t=$p().wrap,a=xc().hasColorscale,i=Nc(),o=RD(),s=$i(),l=Yt(),n=en();r.exports=function(x,E){var M=l.filterVisible(E.dimensions);if(M.length===0)return[];var C=M.map(function(N){var H;if(N.categoryorder==="trace")H=null;else if(N.categoryorder==="array")H=N.categoryarray;else{H=o(N.values);for(var W=!0,U=0;U=v.length||x[v[E]]!==void 0)return!1;x[v[E]]=!0}return!0}}}),Wue=ye({"src/traces/parcats/parcats.js"(e,r){"use strict";var t=ai(),a=(Xm(),On(zv)).interpolateNumber,i=FA(),o=Ya(),s=Hs(),l=Yt(),n=l.strTranslate,u=$i(),c=Go();function f(V,j,q,Y){var K=j._context.staticPlot,re=V.map(J.bind(0,j,q)),se=Y.selectAll("g.parcatslayer").data([null]);se.enter().append("g").attr("class","parcatslayer").style("pointer-events",K?"none":"all");var le=se.selectAll("g.trace.parcats").data(re,h),ue=le.enter().append("g").attr("class","trace parcats");le.attr("transform",function(ce){return n(ce.x,ce.y)}),ue.append("g").attr("class","paths");var fe=le.select("g.paths"),pe=fe.selectAll("path.path").data(function(ce){return ce.paths},h);pe.attr("fill",function(ce){return ce.model.color});var we=pe.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(ce){return ce.model.color}).attr("fill-opacity",0);E(we),pe.attr("d",function(ce){return ce.svgD}),we.empty()||pe.sort(p),pe.exit().remove(),pe.on("mouseover",m).on("mouseout",y).on("click",x),ue.append("g").attr("class","dimensions");var xe=le.select("g.dimensions"),he=xe.selectAll("g.dimension").data(function(ce){return ce.dimensions},h);he.enter().append("g").attr("class","dimension"),he.attr("transform",function(ce){return n(ce.x,0)}),he.exit().remove();var oe=he.selectAll("g.category").data(function(ce){return ce.categories},h),te=oe.enter().append("g").attr("class","category");oe.attr("transform",function(ce){return n(0,ce.y)}),te.append("rect").attr("class","catrect").attr("pointer-events","none"),oe.select("rect.catrect").attr("fill","none").attr("width",function(ce){return ce.width}).attr("height",function(ce){return ce.height}),w(te);var ie=oe.selectAll("rect.bandrect").data(function(ce){return ce.bands},h);ie.each(function(){l.raiseToTop(this)}),ie.attr("fill",function(ce){return ce.color});var ee=ie.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(ce){return ce.color}).attr("fill-opacity",0);ie.attr("fill",function(ce){return ce.color}).attr("width",function(ce){return ce.width}).attr("height",function(ce){return ce.height}).attr("y",function(ce){return ce.y}).attr("cursor",function(ce){return ce.parcatsViewModel.arrangement==="fixed"?"default":ce.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),T(ee),ie.exit().remove(),te.append("text").attr("class","catlabel").attr("pointer-events","none"),oe.select("text.catlabel").attr("text-anchor",function(ce){return d(ce)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(ce){return d(ce)?ce.width+5:-5}).attr("y",function(ce){return ce.height/2}).text(function(ce){return ce.model.categoryLabel}).each(function(ce){u.font(t.select(this),ce.parcatsViewModel.categorylabelfont),c.convertToTspans(t.select(this),j)}),te.append("text").attr("class","dimlabel"),oe.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(ce){return ce.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(ce){return ce.width/2}).attr("y",-5).text(function(ce,_e){return _e===0?ce.parcatsViewModel.model.dimensions[ce.model.dimensionInd].dimensionLabel:null}).each(function(ce){u.font(t.select(this),ce.parcatsViewModel.labelfont)}),oe.selectAll("rect.bandrect").on("mouseover",I).on("mouseout",L),oe.exit().remove(),he.call(t.behavior.drag().origin(function(ce){return{x:ce.x,y:0}}).on("dragstart",B).on("drag",O).on("dragend",G)),le.each(function(ce){ce.traceSelection=t.select(this),ce.pathSelection=t.select(this).selectAll("g.paths").selectAll("path.path"),ce.dimensionSelection=t.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),le.exit().remove()}r.exports=function(V,j,q,Y){f(q,V,Y,j)};function h(V){return V.key}function d(V){var j=V.parcatsViewModel.dimensions.length,q=V.parcatsViewModel.dimensions[j-1].model.dimensionInd;return V.model.dimensionInd===q}function p(V,j){return V.model.rawColor>j.model.rawColor?1:V.model.rawColorK)return 1;if(Y!==K){var re=isNaN(Y),se=isNaN(K);if(re!==se)return re?1:-1}}return V.length-j.length}function m(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){l.raiseToTop(this),M(t.select(this));var j=_(V),q=v(V);if(V.parcatsViewModel.graphDiv.emit("plotly_hover",{points:j,event:t.event,constraints:q}),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var Y=t.mouse(this)[0],K=V.parcatsViewModel.graphDiv,re=V.parcatsViewModel.trace,se=K._fullLayout,le=se._paperdiv.node().getBoundingClientRect(),ue=V.parcatsViewModel.graphDiv.getBoundingClientRect(),fe,pe,we;for(we=0;we"),Ue=t.mouse(K)[0];s.loneHover({trace:re,x:oe-le.left+ue.left,y:te-le.top+ue.top,text:Me,color:V.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ie,idealAlign:Ueo.mostReadable(j.model.color)).attr("stroke-width",.3)}function C(V){V.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function w(V){V.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function k(V){V.attr("stroke","black").attr("stroke-width",1.5)}function T(V){V.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function b(V){var j=V.parcatsViewModel.pathSelection,q=V.categoryViewModel.model.dimensionInd,Y=V.categoryViewModel.model.categoryInd;return j.filter(function(K){return K.model.categoryInds[q]===Y&&K.model.color===V.color})}function S(V){var j=t.select(V.parentNode).selectAll("rect.bandrect");j.each(function(q){var Y=b(q);M(Y),Y.each(function(){l.raiseToTop(this)})}),C(t.select(V.parentNode))}function A(V){var j=t.select(V).datum(),q=b(j);M(q),q.each(function(){l.raiseToTop(this)}),t.select(V.parentNode).selectAll("rect.bandrect").filter(function(Y){return Y.color===j.color}).each(function(){l.raiseToTop(this),k(t.select(this))})}function F(V,j,q){var Y=t.select(V).datum(),K=Y.categoryViewModel.model,re=Y.parcatsViewModel.graphDiv,se=t.select(V.parentNode).selectAll("rect.bandrect"),le=[];se.each(function(fe){var pe=b(fe);pe.each(function(we){Array.prototype.push.apply(le,_(we))})});var ue={};ue[K.dimensionInd]=K.categoryValue,re.emit(j,{points:le,event:q,constraints:ue})}function D(V,j,q){var Y=t.select(V).datum(),K=Y.categoryViewModel.model,re=Y.parcatsViewModel.graphDiv,se=b(Y),le=[];se.each(function(fe){Array.prototype.push.apply(le,_(fe))});var ue={};ue[K.dimensionInd]=K.categoryValue,Y.rawColor!==void 0&&(ue.color=Y.rawColor),re.emit(j,{points:le,event:q,constraints:ue})}function R(V,j,q){V._fullLayout._calcInverseTransform(V);var Y=V._fullLayout._invScaleX,K=V._fullLayout._invScaleY,re=t.select(q.parentNode).select("rect.catrect"),se=re.node().getBoundingClientRect(),le=re.datum(),ue=le.parcatsViewModel,fe=ue.model.dimensions[le.model.dimensionInd],pe=ue.trace,we=se.top+se.height/2,xe,he;ue.dimensions.length>1&&fe.displayInd===ue.dimensions.length-1?(xe=se.left,he="left"):(xe=se.left+se.width,he="right");var oe=le.model.count,te=le.model.categoryLabel,ie=oe/le.parcatsViewModel.model.count,ee={countLabel:oe,categoryLabel:te,probabilityLabel:ie.toFixed(3)},ce=[];le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ce.push(["Count:",ee.countLabel].join(" ")),le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ce.push(["P("+ee.categoryLabel+"):",ee.probabilityLabel].join(" "));var _e=ce.join("
");return{trace:pe,x:Y*(xe-j.left),y:K*(we-j.top),text:_e,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:he,hovertemplate:pe.hovertemplate,hovertemplateLabels:ee,eventData:[{data:pe._input,fullData:pe,count:oe,category:te,probability:ie}]}}function P(V,j,q){var Y=[];return t.select(q.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var K=this;Y.push(R(V,j,K))}),Y}function z(V,j,q){V._fullLayout._calcInverseTransform(V);var Y=V._fullLayout._invScaleX,K=V._fullLayout._invScaleY,re=q.getBoundingClientRect(),se=t.select(q).datum(),le=se.categoryViewModel,ue=le.parcatsViewModel,fe=ue.model.dimensions[le.model.dimensionInd],pe=ue.trace,we=re.y+re.height/2,xe,he;ue.dimensions.length>1&&fe.displayInd===ue.dimensions.length-1?(xe=re.left,he="left"):(xe=re.left+re.width,he="right");var oe=le.model.categoryLabel,te=se.parcatsViewModel.model.count,ie=0;se.categoryViewModel.bands.forEach(function(dt){dt.color===se.color&&(ie+=dt.count)});var ee=le.model.count,ce=0;ue.pathSelection.each(function(dt){dt.model.color===se.color&&(ce+=dt.model.count)});var _e=ie/te,Se=ie/ce,Me=ie/ee,Ue={countLabel:ie,categoryLabel:oe,probabilityLabel:_e.toFixed(3)},Ge=[];le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ge.push(["Count:",Ue.countLabel].join(" ")),le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Ge.push("P(color \u2229 "+oe+"): "+Ue.probabilityLabel),Ge.push("P("+oe+" | color): "+Se.toFixed(3)),Ge.push("P(color | "+oe+"): "+Me.toFixed(3)));var Ze=Ge.join("
"),Ke=o.mostReadable(se.color);return{trace:pe,x:Y*(xe-j.left),y:K*(we-j.top),text:Ze,color:se.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:Ke,fontSize:10,idealAlign:he,hovertemplate:pe.hovertemplate,hovertemplateLabels:Ue,eventData:[{data:pe._input,fullData:pe,category:oe,count:te,probability:_e,categorycount:ee,colorcount:ce,bandcolorcount:ie}]}}function I(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var j=t.mouse(this)[1];if(j<-1)return;var q=V.parcatsViewModel.graphDiv,Y=q._fullLayout,K=Y._paperdiv.node().getBoundingClientRect(),re=V.parcatsViewModel.hoveron,se=this;if(re==="color"?(A(se),D(se,"plotly_hover",t.event)):(S(se),F(se,"plotly_hover",t.event)),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var le;re==="category"?le=R(q,K,se):re==="color"?le=z(q,K,se):re==="dimension"&&(le=P(q,K,se)),le&&s.loneHover(le,{container:Y._hoverlayer.node(),outerContainer:Y._paper.node(),gd:q})}}}function L(V){var j=V.parcatsViewModel;if(!j.dragDimension&&(E(j.pathSelection),w(j.dimensionSelection.selectAll("g.category")),T(j.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),s.loneUnhover(j.graphDiv._fullLayout._hoverlayer.node()),j.pathSelection.sort(p),j.hoverinfoItems.indexOf("skip")===-1)){var q=V.parcatsViewModel.hoveron,Y=this;q==="color"?D(Y,"plotly_unhover",t.event):F(Y,"plotly_unhover",t.event)}}function B(V){V.parcatsViewModel.arrangement!=="fixed"&&(V.dragDimensionDisplayInd=V.model.displayInd,V.initialDragDimensionDisplayInds=V.parcatsViewModel.model.dimensions.map(function(j){return j.displayInd}),V.dragHasMoved=!1,V.dragCategoryDisplayInd=null,t.select(this).selectAll("g.category").select("rect.catrect").each(function(j){var q=t.mouse(this)[0],Y=t.mouse(this)[1];-2<=q&&q<=j.width+2&&-2<=Y&&Y<=j.height+2&&(V.dragCategoryDisplayInd=j.model.displayInd,V.initialDragCategoryDisplayInds=V.model.categories.map(function(K){return K.displayInd}),j.model.dragY=j.y,l.raiseToTop(this.parentNode),t.select(this.parentNode).selectAll("rect.bandrect").each(function(K){K.ype.y+pe.height/2&&(re.model.displayInd=pe.model.displayInd,pe.model.displayInd=le),V.dragCategoryDisplayInd=re.model.displayInd}if(V.dragCategoryDisplayInd===null||V.parcatsViewModel.arrangement==="freeform"){K.model.dragX=t.event.x;var we=V.parcatsViewModel.dimensions[q],xe=V.parcatsViewModel.dimensions[Y];we!==void 0&&K.model.dragXxe.x&&(K.model.displayInd=xe.model.displayInd,xe.model.displayInd=V.dragDimensionDisplayInd),V.dragDimensionDisplayInd=K.model.displayInd}W(V.parcatsViewModel),H(V.parcatsViewModel),Z(V.parcatsViewModel),X(V.parcatsViewModel)}}function G(V){if(V.parcatsViewModel.arrangement!=="fixed"&&V.dragDimensionDisplayInd!==null){t.select(this).selectAll("text").attr("font-weight","normal");var j={},q=$(V.parcatsViewModel),Y=V.parcatsViewModel.model.dimensions.map(function(xe){return xe.displayInd}),K=V.initialDragDimensionDisplayInds.some(function(xe,he){return xe!==Y[he]});K&&Y.forEach(function(xe,he){var oe=V.parcatsViewModel.model.dimensions[he].containerInd;j["dimensions["+oe+"].displayindex"]=xe});var re=!1;if(V.dragCategoryDisplayInd!==null){var se=V.model.categories.map(function(xe){return xe.displayInd});if(re=V.initialDragCategoryDisplayInds.some(function(xe,he){return xe!==se[he]}),re){var le=V.model.categories.slice().sort(function(xe,he){return xe.displayInd-he.displayInd}),ue=le.map(function(xe){return xe.categoryValue}),fe=le.map(function(xe){return xe.categoryLabel});j["dimensions["+V.model.containerInd+"].categoryarray"]=[ue],j["dimensions["+V.model.containerInd+"].ticktext"]=[fe],j["dimensions["+V.model.containerInd+"].categoryorder"]="array"}}if(V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!V.dragHasMoved&&V.potentialClickBand&&(V.parcatsViewModel.hoveron==="color"?D(V.potentialClickBand,"plotly_click",t.event.sourceEvent):F(V.potentialClickBand,"plotly_click",t.event.sourceEvent)),V.model.dragX=null,V.dragCategoryDisplayInd!==null){var pe=V.parcatsViewModel.dimensions[V.dragDimensionDisplayInd].categories[V.dragCategoryDisplayInd];pe.model.dragY=null,V.dragCategoryDisplayInd=null}V.dragDimensionDisplayInd=null,V.parcatsViewModel.dragDimension=null,V.dragHasMoved=null,V.potentialClickBand=null,W(V.parcatsViewModel),H(V.parcatsViewModel);var we=t.transition().duration(300).ease("cubic-in-out");we.each(function(){Z(V.parcatsViewModel,!0),X(V.parcatsViewModel,!0)}).each("end",function(){(K||re)&&i.restyle(V.parcatsViewModel.graphDiv,j,[q])})}}function $(V){for(var j,q=V.graphDiv._fullData,Y=0;Y=0;ue--)fe+="C"+se[ue]+","+(j[ue+1]+Y)+" "+re[ue]+","+(j[ue]+Y)+" "+(V[ue]+q[ue])+","+(j[ue]+Y),fe+="l-"+q[ue]+",0 ";return fe+="Z",fe}function H(V){var j=V.dimensions,q=V.model,Y=j.map(function(vt){return vt.categories.map(function(Tt){return Tt.y})}),K=V.model.dimensions.map(function(vt){return vt.categories.map(function(Tt){return Tt.displayInd})}),re=V.model.dimensions.map(function(vt){return vt.displayInd}),se=V.dimensions.map(function(vt){return vt.model.dimensionInd}),le=j.map(function(vt){return vt.x}),ue=j.map(function(vt){return vt.width}),fe=[];for(var pe in q.paths)q.paths.hasOwnProperty(pe)&&fe.push(q.paths[pe]);function we(vt){var Tt=vt.categoryInds.map(function(Ve,Ye){return K[Ye][Ve]}),st=se.map(function(Ve){return Tt[Ve]});return st}fe.sort(function(vt,Tt){var st=we(vt),Ve=we(Tt);return V.sortpaths==="backward"&&(st.reverse(),Ve.reverse()),st.push(vt.valueInds[0]),Ve.push(Tt.valueInds[0]),V.bundlecolors&&(st.unshift(vt.rawColor),Ve.unshift(Tt.rawColor)),g(st,Ve)});for(var xe=new Array(fe.length),he=j[0].model.count,oe=j[0].categories.map(function(vt){return vt.height}).reduce(function(vt,Tt){return vt+Tt}),te=0;te0?ee=oe*(ie.count/he):ee=0;for(var ce=new Array(Y.length),_e=0;_e1?se=(V.width-2*q-Y)/(K-1):se=0,le=q,ue=le+se*re;var fe=[],pe=V.model.maxCats,we=j.categories.length,xe=8,he=j.count,oe=V.height-xe*(pe-1),te,ie,ee,ce,_e,Se=(pe-we)*xe/2,Me=j.categories.map(function(Ue){return{displayInd:Ue.displayInd,categoryInd:Ue.categoryInd}});for(Me.sort(function(Ue,Ge){return Ue.displayInd-Ge.displayInd}),_e=0;_e0?te=ie.count/he*oe:te=0,ee={key:ie.valueInds[0],model:ie,width:Y,height:te,y:ie.dragY!==null?ie.dragY:Se,bands:[],parcatsViewModel:V},Se=Se+te+xe,fe.push(ee);return{key:j.dimensionInd,x:j.dragX!==null?j.dragX:ue,y:0,width:Y,model:j,categories:fe,parcatsViewModel:V,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),AI=ye({"src/traces/parcats/plot.js"(e,r){"use strict";var t=Wue();r.exports=function(i,o,s,l){var n=i._fullLayout,u=n._paper,c=n._size;t(i,u,o,{width:c.w,height:c.h,margin:{t:c.t,r:c.r,b:c.b,l:c.l}},s,l)}}}),$ue=ye({"src/traces/parcats/base_plot.js"(e){"use strict";var r=_c().getModuleCalcData,t=AI(),a="parcats";e.name=a,e.plot=function(i,o,s,l){var n=r(i.calcdata,a);if(n.length){var u=n[0];t(i,u,s,l)}},e.clean=function(i,o,s,l){var n=l._has&&l._has("parcats"),u=o._has&&o._has("parcats");n&&!u&&l._paperdiv.selectAll(".parcats").remove()}}}),Yue=ye({"src/traces/parcats/index.js"(e,r){"use strict";r.exports={attributes:wI(),supplyDefaults:Gue(),calc:Hue(),plot:AI(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:$ue(),categories:["noOpacity"],meta:{}}}}),Xue=ye({"lib/parcats.js"(e,r){"use strict";r.exports=Yue()}}),Zue=ye({"src/plots/map/styles/arcgis-sat-hybrid.js"(e,r){"use strict";r.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},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"}},{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} @@ -2705,10 +2705,61 @@ void main() { {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"}}}),Zq=ze({"src/plots/map/styles/arcgis-sat.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),Av=ze({"src/plots/map/constants.js"(J,V){"use strict";var p=(Nv(),Po(nv)).default,b=Xq(),E=Zq(),k='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:E,"satellite-streets":b,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:k,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":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":n,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":a},s=p(o);V.exports={styleValueDflt:"basic",stylesMap:o,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.",fitBoundsPadding:20}}}),ly=ze({"src/plots/map/layout_attributes.js"(J,V){"use strict";var p=Nr(),b=Qn().defaultLine,E=Ml().attributes,k=Qs(),l=su().textposition,e=Al().overrideAll,t=hs().templatedArray,n=Av(),r=k({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=V.exports=e({_arrayAttrRegexps:[p.counterRegex("map",".layers",!0)],domain:E({name:"map"}),style:{valType:"any",values:n.styleValuesMap,dflt:n.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},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("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:b},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:b}},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:r,textposition:p.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}}),q2=ze({"src/traces/scattermap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=gg(),e=su(),t=ly(),n=ws(),r=qs(),a=Ki().extendFlat,o=Al().overrideAll,s=ly(),c=l.line,m=l.marker;V.exports=o({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:a({},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:a({},m.opacity,{dflt:1})},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:b({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:e.connectgaps,marker:a({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},r("marker")),fill:l.fill,fillcolor:k(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:a({},n.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:p(),hovertemplatefallback:E()},"calc","nested")}}),SM=ze({"src/traces/scattermap/constants.js"(J,V){"use strict";var p=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];V.exports={isSupportedFont:function(b){return p.indexOf(b)!==-1}}}}),$q=ze({"src/traces/scattermap/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=id(),k=_d(),l=xd(),e=Od(),t=q2(),n=SM().isSupportedFont;V.exports=function(o,s,c,m){function h(A,x){return p.coerce(o,s,t,A,x)}function v(A,x){return p.coerce2(o,s,t,A,x)}var g=r(o,s,h);if(!g){s.visible=!1;return}if(h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("mode"),h("below"),b.hasMarkers(s)){E(o,s,c,m,h,{noLine:!0,noAngle:!0}),h("marker.allowoverlap"),h("marker.angle");var i=s.marker;i.symbol!=="circle"&&(p.isArrayOrTypedArray(i.size)&&(i.size=i.size[0]),p.isArrayOrTypedArray(i.color)&&(i.color=i.color[0]))}b.hasLines(s)&&(k(o,s,c,m,h,{noDash:!0}),h("connectgaps"));var w=v("cluster.maxzoom"),S=v("cluster.step"),M=v("cluster.color",s.marker&&s.marker.color||c),C=v("cluster.size"),_=v("cluster.opacity"),T=w!==!1||S!==!1||M!==!1||C!==!1||_!==!1,f=h("cluster.enabled",T);if(f||b.hasText(s)){var u=m.font.family;l(o,s,m,h,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:n(u)?u:"Open Sans Regular",weight:m.font.weight,style:m.font.style,size:m.font.size,color:m.font.color}})}h("fill"),s.fill!=="none"&&e(o,s,c,h),p.coerceSelectionMarkerOpacity(s,h)};function r(a,o,s){var c=s("lon")||[],m=s("lat")||[],h=Math.min(c.length,m.length);return o._length=h,h}}}),EM=ze({"src/traces/scattermap/format_labels.js"(J,V){"use strict";var p=Gi();V.exports=function(E,k,l){var e={},t=l[k.subplot]._subplot,n=t.mockAxis,r=E.lonlat;return e.lonLabel=p.tickText(n,n.c2l(r[0]),!0).text,e.latLabel=p.tickText(n,n.c2l(r[1]),!0).text,e}}}),kM=ze({"src/plots/map/convert_text_opts.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=E.split(" "),e=l[0],t=l[1],n=p.isArrayOrTypedArray(k)?p.mean(k):k,r=.5+n/100,a=1.5+n/100,o=["",""],s=[0,0];switch(e){case"top":o[0]="top",s[1]=-a;break;case"bottom":o[0]="bottom",s[1]=a;break}switch(t){case"left":o[1]="right",s[0]=-r;break;case"right":o[1]="left",s[0]=r;break}var c;return o[0]&&o[1]?c=o.join("-"):o[0]?c=o[0]:o[1]?c=o[1]:c="center",{anchor:c,offset:s}}}}),Kq=ze({"src/traces/scattermap/convert.js"(J,V){"use strict";var p=ao(),b=Nr(),E=No().BADNUM,k=Q1(),l=fl(),e=$i(),t=l1(),n=el(),r=SM().isSupportedFont,a=kM(),o=kh().appendArrayPointValue,s=Cs().NEWLINES,c=Cs().BR_TAG_ALL;V.exports=function(_,T){var f=T[0].trace,u=f.visible===!0&&f._length!==0,A=f.fill!=="none",x=n.hasLines(f),z=n.hasMarkers(f),I=n.hasText(f),O=z&&f.marker.symbol==="circle",D=z&&f.marker.symbol!=="circle",B=f.cluster&&f.cluster.enabled,F=m("fill"),P=m("line"),j=m("circle"),U=m("symbol"),$={fill:F,line:P,circle:j,symbol:U};if(!u)return $;var Q;if((A||x)&&(Q=k.calcTraceToLineCoords(T)),A&&(F.geojson=k.makePolygon(Q),F.layout.visibility="visible",b.extendFlat(F.paint,{"fill-color":f.fillcolor})),x&&(P.geojson=k.makeLine(Q),P.layout.visibility="visible",b.extendFlat(P.paint,{"line-width":f.line.width,"line-color":f.line.color,"line-opacity":f.opacity})),O){var re=h(T);j.geojson=re.geojson,j.layout.visibility="visible",B&&(j.filter=["!",["has","point_count"]],$.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":S(f.cluster.color,f.cluster.step),"circle-radius":S(f.cluster.size,f.cluster.step),"circle-opacity":S(f.cluster.opacity,f.cluster.step)}},$.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(f),"text-size":12}}),b.extendFlat(j.paint,{"circle-color":re.mcc,"circle-radius":re.mrc,"circle-opacity":re.mo})}if(O&&B&&(j.filter=["!",["has","point_count"]]),(D||I)&&(U.geojson=v(T,_),b.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),D&&(b.extendFlat(U.layout,{"icon-size":f.marker.size/10}),"angle"in f.marker&&f.marker.angle!=="auto"&&b.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=f.marker.allowoverlap,b.extendFlat(U.paint,{"icon-opacity":f.opacity*f.marker.opacity,"icon-color":f.marker.color,"icon-halo-color":f.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),I)){var ne=(f.marker||{}).size,se=a(f.textposition,ne);b.extendFlat(U.layout,{"text-size":f.textfont.size,"text-anchor":se.anchor,"text-offset":se.offset,"text-font":M(f)}),b.extendFlat(U.paint,{"text-color":f.textfont.color,"text-opacity":f.opacity})}return $};function m(C){return{type:C,geojson:k.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function h(C){var _=C[0].trace,T=_.marker,f=_.selectedpoints,u=b.isArrayOrTypedArray(T.color),A=b.isArrayOrTypedArray(T.size),x=b.isArrayOrTypedArray(T.opacity),z;function I(ne){return _.opacity*ne}function O(ne){return ne/2}var D;u&&(l.hasColorscale(_,"marker")?D=l.makeColorScaleFuncFromTrace(T):D=b.identity);var B;A&&(B=t(_));var F;x&&(F=function(ne){var se=p(ne)?+b.constrain(ne,0,1):0;return I(se)});var P=[];for(z=0;z850?z+=" Black":u>750?z+=" Extra Bold":u>650?z+=" Bold":u>550?z+=" Semi Bold":u>450?z+=" Medium":u>350?z+=" Regular":u>250?z+=" Light":u>150?z+=" Extra Light":z+=" Thin"):A.slice(0,2).join(" ")==="Open Sans"?(z="Open Sans",u>750?z+=" Extrabold":u>650?z+=" Bold":u>550?z+=" Semibold":u>350?z+=" Regular":z+=" Light"):A.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(z="Klokantech Noto Sans",A[3]==="CJK"&&(z+=" CJK"),z+=u>500?" Bold":" Regular")),x&&(z+=" Italic"),z==="Open Sans Regular Italic"?z="Open Sans Italic":z==="Open Sans Regular Bold"?z="Open Sans Bold":z==="Open Sans Regular Bold Italic"?z="Open Sans Bold Italic":z==="Klokantech Noto Sans Regular Italic"&&(z="Klokantech Noto Sans Italic"),r(z)||(z=T);var I=z.split(", ");return I}}}),Jq=ze({"src/traces/scattermap/plot.js"(J,V){"use strict";var p=Nr(),b=Kq(),E=Av().traceLayerPrefix,k={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,n,r,a){this.type="scattermap",this.subplot=t,this.uid=n,this.clusterEnabled=r,this.isHidden=a,this.sourceIds={fill:"source-"+n+"-fill",line:"source-"+n+"-line",circle:"source-"+n+"-circle",symbol:"source-"+n+"-symbol",cluster:"source-"+n+"-circle",clusterCount:"source-"+n+"-circle"},this.layerIds={fill:E+n+"-fill",line:E+n+"-line",circle:E+n+"-circle",symbol:E+n+"-symbol",cluster:E+n+"-cluster",clusterCount:E+n+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,n,r){var a={type:"geojson",data:n.geojson};r&&r.enabled&&p.extendFlat(a,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[t]);o?o.setData(n.geojson):this.subplot.map.addSource(this.sourceIds[t],a)},e.setSourceData=function(t,n){this.subplot.map.getSource(this.sourceIds[t]).setData(n.geojson)},e.addLayer=function(t,n,r){var a={type:n.type,id:this.layerIds[t],source:this.sourceIds[t],layout:n.layout,paint:n.paint};n.filter&&(a.filter=n.filter);for(var o=this.layerIds[t],s,c=this.subplot.getMapLayers(),m=0;m=0;x--){var z=A[x];o.removeLayer(v.layerIds[z])}u||o.removeSource(v.sourceIds.circle)}function w(u){for(var A=k.nonCluster,x=0;x=0;x--){var z=A[x];o.removeLayer(v.layerIds[z]),u||o.removeSource(v.sourceIds[z])}}function M(u){h?i(u):S(u)}function C(u){m?g(u):w(u)}function _(){for(var u=m?k.cluster:k.nonCluster,A=0;A=0;a--){var o=r[a];n.removeLayer(this.layerIds[o]),n.removeSource(this.sourceIds[o])}},V.exports=function(n,r){var a=r[0].trace,o=a.cluster&&a.cluster.enabled,s=a.visible!==!0,c=new l(n,a.uid,o,s),m=b(n.gd,r),h=c.below=n.belowLookup["trace-"+a.uid],v,g,i;if(o)for(c.addSource("circle",m.circle,a.cluster),v=0;v=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),C=M*360,_=a-C;function T(B){var F=B.lonlat;if(F[0]===l||w&&g.indexOf(B.i+1)===-1)return 1/0;var P=b.modHalf(F[0],360),j=F[1],U=v.project([P,j]),$=U.x-m.c2p([_,j]),Q=U.y-h.c2p([P,o]),re=Math.max(3,B.mrc||0);return Math.max(Math.sqrt($*$+Q*Q)-re,1-3/re)}if(p.getClosest(s,T,r),r.index!==!1){var f=s[r.index],u=f.lonlat,A=[b.modHalf(u[0],360)+C,u[1]],x=m.c2p(A),z=h.c2p(A),I=f.mrc||1;r.x0=x-I,r.x1=x+I,r.y0=z-I,r.y1=z+I;var O={};O[c.subplot]={_subplot:v};var D=c._module.formatLabels(f,c,O);return r.lonLabel=D.lonLabel,r.latLabel=D.latLabel,r.color=E(c,f),r.extraText=n(c,f,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function n(r,a,o){if(r.hovertemplate)return;var s=a.hi||r.hoverinfo,c=s.split("+"),m=c.indexOf("all")!==-1,h=c.indexOf("lon")!==-1,v=c.indexOf("lat")!==-1,g=a.lonlat,i=[];function w(S){return S+"\xB0"}return m||h&&v?i.push("("+w(g[1])+", "+w(g[0])+")"):h?i.push(o.lon+w(g[0])):v&&i.push(o.lat+w(g[1])),(m||c.indexOf("text")!==-1)&&k(a,r,i),i.join("
")}V.exports={hoverPoints:t,getExtraText:n}}}),Qq=ze({"src/traces/scattermap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b}}}),eV=ze({"src/traces/scattermap/select.js"(J,V){"use strict";var p=Nr(),b=el(),{BADNUM:E}=No();V.exports=function(l,e){var t;let{cd:n,xaxis:r,yaxis:a}=l,{trace:o}=n[0];if(!b.hasMarkers(o))return[];if(e===!1){for(let h of n)h.selected=0;return[]}let s=(t=r._subplot)==null?void 0:t.map,c=s?.getRenderWorldCopies()&&e.xmax>e.xmin?s.transform.worldSize:0,m=[];for(let h=0;h1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},r}(),s=n(o);let c,m;function h(){return c!=null||(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function v(){if(m==null&&(m=!1,h())){let d=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(d){for(let W=0;W<5*5;W++){let te=4*W;d.fillStyle=`rgb(${te},${te+1},${te+2})`,d.fillRect(W%5,Math.floor(W/5),1,1)}let L=d.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&L[W]!==W){m=!0;break}}}return m||!1}var g=1e-6,i=typeof Float32Array<"u"?Float32Array:Array;function w(){var R=new i(9);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[5]=0,R[6]=0,R[7]=0),R[0]=1,R[4]=1,R[8]=1,R}function S(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}function M(){var R=new i(3);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R}function C(R){var d=R[0],L=R[1],W=R[2];return Math.sqrt(d*d+L*L+W*W)}function _(R,d,L){var W=new i(3);return W[0]=R,W[1]=d,W[2]=L,W}function T(R,d,L){return R[0]=d[0]+L[0],R[1]=d[1]+L[1],R[2]=d[2]+L[2],R}function f(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R}function u(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[0],ge=L[1],Ce=L[2];return R[0]=te*Ce-ue*ge,R[1]=ue*me-W*Ce,R[2]=W*ge-te*me,R}var A,x=C;function z(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3];return R[0]=L[0]*W+L[4]*te+L[8]*ue+L[12]*me,R[1]=L[1]*W+L[5]*te+L[9]*ue+L[13]*me,R[2]=L[2]*W+L[6]*te+L[10]*ue+L[14]*me,R[3]=L[3]*W+L[7]*te+L[11]*ue+L[15]*me,R}function I(){var R=new i(4);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R[3]=1,R}function O(R,d,L,W){var te=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",ue=Math.PI/360;d*=ue,W*=ue,L*=ue;var me=Math.sin(d),ge=Math.cos(d),Ce=Math.sin(L),Te=Math.cos(L),Oe=Math.sin(W),Pe=Math.cos(W);switch(te){case"xyz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"xzy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yxz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yzx":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zxy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zyx":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;default:throw new Error("Unknown angle order "+te)}return R}function D(){var R=new i(2);return i!=Float32Array&&(R[0]=0,R[1]=0),R}function B(R,d){var L=new i(2);return L[0]=R,L[1]=d,L}M(),A=new i(4),i!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),M(),_(1,0,0),_(0,1,0),I(),I(),w(),D();let F=8192;function P(R,d,L){return d*(F/(R.tileSize*Math.pow(2,L-R.tileID.overscaledZ)))}function j(R){return R instanceof Error?R:new Error(typeof R=="string"?R:String(R))}function U(R,d){return(R%d+d)%d}function $(R,d,L){return R*(1-L)+d*L}function Q(R){if(R<=0)return 0;if(R>=1)return 1;let d=R*R,L=d*R;return 4*(R<.5?L:3*(R-d)+L-.75)}function re(R,d,L,W){let te=new s(R,d,L,W);return ue=>te.solve(ue)}let ne=re(.25,.1,.25,1);function se(R,d,L){return Math.min(L,Math.max(d,R))}function G(R,d,L){let W=L-d,te=((R-d)%W+W)%W+d;return te===d?L:te}function X(R,...d){for(let L of d)for(let W in L)R[W]=L[W];return R}let K=1;function H(R,d,L){let W={};for(let te in R)W[te]=d.call(this,R[te],te,R);return W}function Y(R,d,L){let W={};for(let te in R)d.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function q(R){return Array.isArray(R)?R.map(q):typeof R=="object"&&R?H(R,q):R}let Z={};function ee(R){Z[R]||(typeof console<"u"&&console.warn(R),Z[R]=!0)}function ae(R,d,L){return(L.y-R.y)*(d.x-R.x)>(d.y-R.y)*(L.x-R.x)}function he(R){return typeof WorkerGlobalScope<"u"&&R!==void 0&&R instanceof WorkerGlobalScope}let xe=null;function we(R){return typeof ImageBitmap<"u"&&R instanceof ImageBitmap}let Me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Se(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let ue=new VideoFrame(R,{timestamp:0});try{let me=ue?.format;if(!me||!me.startsWith("BGR")&&!me.startsWith("RGB"))throw new Error(`Unrecognized format ${me}`);let ge=me.startsWith("BGR"),Ce=new Uint8ClampedArray(W*te*4);if(yield ue.copyTo(Ce,function(Te,Oe,Pe,it,He){let bt=4*Math.max(-Oe,0),Et=(Math.max(0,Pe)-Pe)*it*4+bt,Qt=4*it,er=Math.max(0,Oe),br=Math.max(0,Pe);return{rect:{x:er,y:br,width:Math.min(Te.width,Oe+it)-er,height:Math.min(Te.height,Pe+He)-br},layout:[{offset:Et,stride:Qt}]}}(R,d,L,W,te)),ge)for(let Te=0;Te{R.removeEventListener(d,L,W)}}}function ke(R){return R*Math.PI/180}function _e(R){return R/Math.PI*180}let ce={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ve={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},le="AbortError";class Ae extends Error{constructor(d=le){super(d instanceof Error?d.message:d),this.name=le,d instanceof Error&&d.stack&&(this.stack=d.stack)}}function Be(R){return R instanceof Error&&R.name===le}function Xe(R){if(R.aborted)throw new Ae(R.reason)}let Ye={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function yt(R){return Ye.REGISTERED_PROTOCOLS[R.substring(0,R.indexOf("://"))]}let gt="global-dispatcher";class Tt extends Error{constructor(d,L,W,te){super(`AJAXError: ${L} (${d}): ${W}`),this.status=d,this.statusText=L,this.url=W,this.body=te}}let At=()=>{var R;return he(self)?(R=self.worker)===null||R===void 0?void 0:R.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},$t=function(R,d){return e(this,void 0,void 0,function*(){var L,W;if(R.url.includes("://")&&!/^https?:|^file:/.test(R.url)){let te=yt(R.url);if(te){let ue=yield te(R,d);return ue.data||R.type!=="arrayBuffer"?ue:X(ue,{data:new ArrayBuffer(0)})}if(he(self)&&(!((L=self.worker)===null||L===void 0)&&L.actor))return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:gt},d)}if(!(te=>{var ue;return te.startsWith("file:")||((ue=At())===null||ue===void 0?void 0:ue.startsWith("file:"))&&!/^\w+:/.test(te)})(R.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(te,ue){return e(this,void 0,void 0,function*(){let me=new Request(te.url,{method:te.method||"GET",body:te.body,credentials:te.credentials,headers:te.headers,cache:te.cache,referrer:At(),referrerPolicy:te.referrerPolicy,signal:ue.signal}),ge,Ce;te.type!=="json"||me.headers.has("Accept")||me.headers.set("Accept","application/json");try{ge=yield fetch(me)}catch(Oe){throw Be(Oe)?Oe:new Tt(0,j(Oe).message,te.url,new Blob)}if(!ge.ok){let Oe=yield ge.blob();throw new Tt(ge.status,ge.statusText,te.url,Oe)}Ce=te.type==="arrayBuffer"||te.type==="image"?ge.arrayBuffer():te.type==="json"?ge.json():ge.text();let Te=yield Ce;return Xe(ue.signal),{data:Te,cacheControl:ge.headers.get("Cache-Control"),expires:ge.headers.get("Expires"),etag:ge.headers.get("ETag")}})}(R,d);if(he(self)&&(!((W=self.worker)===null||W===void 0)&&W.actor))return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:gt},d)}return function(te,ue){return new Promise((me,ge)=>{var Ce;let Te=new XMLHttpRequest;Te.open(te.method||"GET",te.url,!0),te.type!=="arrayBuffer"&&te.type!=="image"||(Te.responseType="arraybuffer");for(let Oe in te.headers)Te.setRequestHeader(Oe,te.headers[Oe]);te.type==="json"&&(Te.responseType="text",!((Ce=te.headers)===null||Ce===void 0)&&Ce.Accept||Te.setRequestHeader("Accept","application/json")),Te.withCredentials=te.credentials==="include",Te.onerror=()=>{ge(new Error(Te.statusText))},Te.onload=()=>{if(!ue.signal.aborted)if((Te.status>=200&&Te.status<300||Te.status===0)&&Te.response!==null){let Oe=Te.response;if(te.type==="json")try{Oe=JSON.parse(Te.response)}catch(Pe){return void ge(Pe)}me({data:Oe,cacheControl:Te.getResponseHeader("Cache-Control"),expires:Te.getResponseHeader("Expires"),etag:Te.getResponseHeader("ETag")})}else{let Oe=new Blob([Te.response],{type:Te.getResponseHeader("Content-Type")});ge(new Tt(Te.status,Te.statusText,te.url,Oe))}},ue.signal.addEventListener("abort",()=>{Te.abort(),ge(new Ae(ue.signal.reason))}),Te.send(te.body)})}(R,d)})};function rr(R){if(!R||R.indexOf("://")<=0||R.startsWith("data:image/")||R.startsWith("blob:"))return!0;let d=new URL(R),L=window.location;return d.protocol===L.protocol&&d.host===L.host}function _r(R,d,L){var W;!((W=L[R])===null||W===void 0)&&W.includes(d)||(L[R]||(L[R]=[]),L[R].push(d))}function Xt(R,d,L){if(L?.[R]){let W=L[R].indexOf(d);W!==-1&&L[R].splice(W,1)}}class or{constructor(d,L={}){X(this,L),this.type=d}}class Ot extends or{constructor(d,L={}){super("error",X({error:d},L))}}class vt{on(d,L){return this._listeners||(this._listeners={}),_r(d,L,this._listeners),{unsubscribe:()=>{this.off(d,L)}}}off(d,L){return Xt(d,L,this._listeners),Xt(d,L,this._oneTimeListeners),this}once(d,L){return L?(this._oneTimeListeners||(this._oneTimeListeners={}),_r(d,L,this._oneTimeListeners),this):new Promise(W=>this.once(d,W))}fire(d,L){var W,te;typeof d=="string"&&(d=new or(d,L||{}));let ue=d.type;if(this.listens(ue)){d.target=this;let me=!((W=this._listeners)===null||W===void 0)&&W[ue]?this._listeners[ue].slice():[];for(let Te of me)Te.call(this,d);let ge=!((te=this._oneTimeListeners)===null||te===void 0)&&te[ue]?this._oneTimeListeners[ue].slice():[];for(let Te of ge)Xt(ue,Te,this._oneTimeListeners),Te.call(this,d);let Ce=this._eventedParent;Ce&&(X(d,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ce.fire(d))}else d instanceof Ot&&console.error(d.error);return this}listens(d){var L,W,te,ue,me;return((W=(L=this._listeners)===null||L===void 0?void 0:L[d])===null||W===void 0?void 0:W.length)>0||((ue=(te=this._oneTimeListeners)===null||te===void 0?void 0:te[d])===null||ue===void 0?void 0:ue.length)>0||((me=this._eventedParent)===null||me===void 0?void 0:me.listens(d))}setEventedParent(d,L){return this._eventedParent=d,this._eventedParentData=L,this}}var ht={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},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},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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:"filter"},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:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","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","feature"]},"property-type":"cross-faded-data-driven"},"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"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let De=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ne(R,d){let L={};for(let W in R)W!=="ref"&&(L[W]=R[W]);return De.forEach(W=>{W in d&&(L[W]=d[W])}),L}function We(R,d){if(Array.isArray(R)){if(!Array.isArray(d)||R.length!==d.length)return!1;for(let L=0;L`:R.itemType.kind==="value"?"array":`array<${d}>`}return R.kind}let li=[Yt,Rt,nr,ur,cr,Rr,Pa,Qr,yn(Zr),La,Xa,un,ja,Nn];function Yn(R,d){if(d.kind==="error")return null;if(R.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!Yn(R.itemType,d.itemType))&&(typeof R.N!="number"||R.N===d.N))return null}else{if(R.kind===d.kind)return null;if(R.kind==="value"){for(let L of li)if(!Yn(L,d))return null}}return`Expected ${Un(R)} but found ${Un(d)} instead.`}function on(R,d){return d.some(L=>L.kind===R.kind)}function en(R,d){return d.some(L=>L==="null"?R===null:L==="array"?Array.isArray(R):L==="object"?R&&!Array.isArray(R)&&typeof R=="object":L===typeof R)}function vi(R,d){return R.kind==="array"&&d.kind==="array"?R.itemType.kind===d.itemType.kind&&typeof R.N=="number":R.kind===d.kind}let Yi=.96422,Ja=.82521,Oa=4/29,lt=6/29,rt=3*lt*lt,fr=lt*lt*lt,lr=Math.PI/180,Tr=180/Math.PI;function Ir(R){return(R%=360)<0&&(R+=360),R}function Dr([R,d,L,W]){let te,ue,me=kt((.2225045*(R=ot(R))+.7168786*(d=ot(d))+.0606169*(L=ot(L)))/1);R===d&&d===L?te=ue=me:(te=kt((.4360747*R+.3850649*d+.1430804*L)/Yi),ue=kt((.0139322*R+.0971045*d+.7141733*L)/Ja));let ge=116*me-16;return[ge<0?0:ge,500*(te-me),200*(me-ue),W]}function ot(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function kt(R){return R>fr?Math.pow(R,1/3):R/rt+Oa}function jt([R,d,L,W]){let te=(R+16)/116,ue=isNaN(d)?te:te+d/500,me=isNaN(L)?te:te-L/200;return te=1*Er(te),ue=Yi*Er(ue),me=Ja*Er(me),[ar(3.1338561*ue-1.6168667*te-.4906146*me),ar(-.9787684*ue+1.9161415*te+.033454*me),ar(.0719453*ue-.2289914*te+1.4052427*me),W]}function ar(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Er(R){return R>lt?R*R*R:rt*(R-Oa)}let xr=Object.hasOwn||function(R,d){return Object.prototype.hasOwnProperty.call(R,d)};function zr(R,d){return xr(R,d)?R[d]:void 0}function Lr(R){return parseInt(R.padEnd(2,R),16)/255}function aa(R,d){return Sa(d?R/100:R,0,1)}function Sa(R,d,L){return Math.min(Math.max(d,R),L)}function wa(R){return!R.some(Number.isNaN)}let pn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function tn(R,d,L){return R+L*(d-R)}function ai(R,d,L){return R.map((W,te)=>tn(W,d[te],L))}class rn{constructor(d,L,W,te=1,ue=!0){this.r=d,this.g=L,this.b=W,this.a=te,ue||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[d,L,W,te]))}static parse(d){if(d instanceof rn)return d;if(typeof d!="string")return;let L=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=zr(pn,W);if(te){let[me,ge,Ce]=te;return[me/255,ge/255,Ce/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let me=W.length<6?1:2,ge=1;return[Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+me)||"ff")]}if(W.startsWith("rgb")){let me=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(me){let[ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br]=me,sr=[Oe||" ",He||" ",Qt].join("");if(sr===" "||sr===" /"||sr===",,"||sr===",,,"){let Mr=[Te,it,Et].join(""),qr=Mr==="%%%"?100:Mr===""?255:0;if(qr){let $r=[Sa(+Ce/qr,0,1),Sa(+Pe/qr,0,1),Sa(+bt/qr,0,1),er?aa(+er,br):1];if(wa($r))return $r}}return}}let ue=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ue){let[me,ge,Ce,Te,Oe,Pe,it,He,bt]=ue,Et=[Ce||" ",Oe||" ",it].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){let Qt=[+ge,Sa(+Te,0,100),Sa(+Pe,0,100),He?aa(+He,bt):1];if(wa(Qt))return function([er,br,sr,Mr]){function qr($r){let _a=($r+er/30)%12,Ca=br*Math.min(sr,1-sr);return sr-Ca*Math.max(-1,Math.min(_a-3,9-_a,1))}return er=Ir(er),br/=100,sr/=100,[qr(0),qr(8),qr(4),Mr]}(Qt)}}}(d);return L?new rn(...L,!1):void 0}get rgb(){let{r:d,g:L,b:W,a:te}=this,ue=te||1/0;return this.overwriteGetter("rgb",[d/ue,L/ue,W/ue,te])}get hcl(){return this.overwriteGetter("hcl",function(d){let[L,W,te,ue]=Dr(d),me=Math.sqrt(W*W+te*te);return[Math.round(1e4*me)?Ir(Math.atan2(te,W)*Tr):NaN,me,L,ue]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Dr(this.rgb))}overwriteGetter(d,L){return Object.defineProperty(this,d,{value:L}),L}toString(){let[d,L,W,te]=this.rgb;return`rgba(${[d,L,W].map(ue=>Math.round(255*ue)).join(",")},${te})`}static interpolate(d,L,W,te="rgb"){switch(te){case"rgb":{let[ue,me,ge,Ce]=ai(d.rgb,L.rgb,W);return new rn(ue,me,ge,Ce,!1)}case"hcl":{let[ue,me,ge,Ce]=d.hcl,[Te,Oe,Pe,it]=L.hcl,He,bt;if(isNaN(ue)||isNaN(Te))isNaN(ue)?isNaN(Te)?He=NaN:(He=Te,ge!==1&&ge!==0||(bt=Oe)):(He=ue,Pe!==1&&Pe!==0||(bt=me));else{let sr=Te-ue;Te>ue&&sr>180?sr-=360:Te180&&(sr+=360),He=ue+W*sr}let[Et,Qt,er,br]=function([sr,Mr,qr,$r]){return sr=isNaN(sr)?0:sr*lr,jt([qr,Math.cos(sr)*Mr,Math.sin(sr)*Mr,$r])}([He,bt??tn(me,Oe,W),tn(ge,Pe,W),tn(Ce,it,W)]);return new rn(Et,Qt,er,br,!1)}case"lab":{let[ue,me,ge,Ce]=jt(ai(d.lab,L.lab,W));return new rn(ue,me,ge,Ce,!1)}}}}rn.black=new rn(0,0,0,1),rn.white=new rn(1,1,1,1),rn.transparent=new rn(0,0,0,0),rn.red=new rn(1,0,0,1);class Ri{constructor(d,L,W){this.sensitivity=d?L?"variant":"case":L?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(d,L){return this.collator.compare(d,L)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let Gn=["bottom","center","top"];class no{constructor(d,L,W,te,ue,me){this.text=d,this.image=L,this.scale=W,this.fontStack=te,this.textColor=ue,this.verticalAlign=me}}class Di{constructor(d){this.sections=d}static fromString(d){return new Di([new no(d,null,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 Di?d:Di.fromString(d)}toString(){return this.sections.length===0?"":this.sections.map(d=>d.text).join("")}}class fn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof fn)return d;if(typeof d=="number")return new fn([d,d,d,d]);if(Array.isArray(d)&&!(d.length<1||d.length>4)){for(let L of d)if(typeof L!="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 fn(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new fn(ai(d.values,L.values,W))}}class Ai{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Ai)return d;if(typeof d=="number")return new Ai([d]);if(Array.isArray(d)){for(let L of d)if(typeof L!="number")return;return new Ai(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new Ai(ai(d.values,L.values,W))}}class jn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof jn)return d;if(typeof d=="string"){let W=rn.parse(d);return W?new jn([W]):void 0}if(!Array.isArray(d))return;let L=[];for(let W of d){if(typeof W!="string")return;let te=rn.parse(W);if(!te)return;L.push(te)}return new jn(L)}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W,te="rgb"){let ue=[];if(d.values.length!=L.values.length)throw new Error(`colorArray: Arrays have mismatched length (${d.values.length} vs. ${L.values.length}), cannot interpolate.`);for(let me=0;me=0&&R<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof L=="number"&&L>=0&&L<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,d,L,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,d,L,W]:[R,d,L]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Vn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof io||R instanceof rn||R instanceof Ri||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi)return!0;if(Array.isArray(R)){for(let d of R)if(!Vn(d))return!1;return!0}if(typeof R=="object"){for(let d in R)if(!Vn(R[d]))return!1;return!0}return!1}function qn(R){if(R===null)return Yt;if(typeof R=="string")return nr;if(typeof R=="boolean")return ur;if(typeof R=="number")return Rt;if(R instanceof rn)return cr;if(R instanceof io)return Rr;if(R instanceof Ri)return ha;if(R instanceof Di)return Pa;if(R instanceof fn)return La;if(R instanceof Ai)return Xa;if(R instanceof jn)return un;if(R instanceof gi)return Nn;if(R instanceof qi)return ja;if(Array.isArray(R)){let d=R.length,L;for(let W of R){let te=qn(W);if(L){if(L===te)continue;L=Zr;break}L=te}return yn(L||Zr,d)}return Qr}function Hi(R){let d=typeof R;return R===null?"":d==="string"||d==="number"||d==="boolean"?String(R):R instanceof rn||R instanceof io||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi?R.toString():JSON.stringify(R)}class Mi{constructor(d,L){this.type=d,this.value=L}static parse(d,L){if(d.length!==2)return L.error(`'literal' expression requires exactly one argument, but found ${d.length-1} instead.`);if(!Vn(d[1]))return L.error("invalid value");let W=d[1],te=qn(W),ue=L.expectedType;return te.kind!=="array"||te.N!==0||!ue||ue.kind!=="array"||typeof ue.N=="number"&&ue.N!==0||(te=ue),new Mi(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let Ro={string:nr,number:Rt,boolean:ur,object:Qr};class go{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W,te=1,ue=d[0];if(ue==="array"){let ge,Ce;if(d.length>2){let Te=d[1];if(typeof Te!="string"||!(Te in Ro)||Te==="object")return L.error('The item type argument of "array" must be one of string, number, boolean',1);ge=Ro[Te],te++}else ge=Zr;if(d.length>3){if(d[2]!==null&&(typeof d[2]!="number"||d[2]<0||d[2]!==Math.floor(d[2])))return L.error('The length argument to "array" must be a positive integer literal',2);Ce=d[2],te++}W=yn(ge,Ce)}else{if(!Ro[ue])throw new Error(`Types doesn't contain name = ${ue}`);W=Ro[ue]}let me=[];for(;ted.outputDefined())}}let Eo={"to-boolean":ur,"to-color":cr,"to-number":Rt,"to-string":nr};class Ao{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[0];if(!Eo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&d.length!==2)return L.error("Expected one argument.");let te=Eo[W],ue=[];for(let me=1;me4?`Invalid rgba value ${JSON.stringify(L)}: expected an array containing either three or four numeric values.`:oo(L[0],L[1],L[2],L[3]),!W))return new rn(L[0]/255,L[1]/255,L[2]/255,L[3])}throw new Xn(W||`Could not parse color from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"padding":{let L;for(let W of this.args){L=W.evaluate(d);let te=fn.parse(L);if(te)return te}throw new Xn(`Could not parse padding from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"numberArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=Ai.parse(L);if(te)return te}throw new Xn(`Could not parse numberArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"colorArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=jn.parse(L);if(te)return te}throw new Xn(`Could not parse colorArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"variableAnchorOffsetCollection":{let L;for(let W of this.args){L=W.evaluate(d);let te=gi.parse(L);if(te)return te}throw new Xn(`Could not parse variableAnchorOffsetCollection from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"number":{let L=null;for(let W of this.args){if(L=W.evaluate(d),L===null)return 0;let te=Number(L);if(!isNaN(te))return te}throw new Xn(`Could not convert ${JSON.stringify(L)} to number.`)}case"formatted":return Di.fromString(Hi(this.args[0].evaluate(d)));case"resolvedImage":return qi.fromString(Hi(this.args[0].evaluate(d)));case"projectionDefinition":return this.args[0].evaluate(d);default:return Hi(this.args[0].evaluate(d))}}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}let ds=["Unknown","Point","LineString","Polygon"];class jo{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ds[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 L=this._parseColorCache.get(d);return L||(L=rn.parse(d),this._parseColorCache.set(d,L)),L}}class Wo{constructor(d,L,W=[],te,ue=new Kr,me=[]){this.registry=d,this.path=W,this.key=W.map(ge=>`[${ge}]`).join(""),this.scope=ue,this.errors=me,this.expectedType=te,this._isConstant=L}parse(d,L,W,te,ue={}){return L?this.concat(L,W,te)._parse(d,ue):this._parse(d,ue)}_parse(d,L){function W(te,ue,me){return me==="assert"?new go(ue,[te]):me==="coerce"?new Ao(ue,[te]):te}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 te=d[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ue=this.registry[te];if(ue){let me=ue.parse(d,this);if(!me)return null;if(this.expectedType){let ge=this.expectedType,Ce=me.type;if(ge.kind!=="string"&&ge.kind!=="number"&&ge.kind!=="boolean"&&ge.kind!=="object"&&ge.kind!=="array"||Ce.kind!=="value"){if(ge.kind==="projectionDefinition"&&["string","array"].includes(Ce.kind)||["color","formatted","resolvedImage"].includes(ge.kind)&&["value","string"].includes(Ce.kind)||["padding","numberArray"].includes(ge.kind)&&["value","number","array"].includes(Ce.kind)||ge.kind==="colorArray"&&["value","string","array"].includes(Ce.kind)||ge.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(Ce.kind))me=W(me,ge,L.typeAnnotation||"coerce");else if(this.checkSubtype(ge,Ce))return null}else me=W(me,ge,L.typeAnnotation||"assert")}if(!(me instanceof Mi)&&me.type.kind!=="resolvedImage"&&this._isConstant(me)){let ge=new jo;try{me=new Mi(me.type,me.evaluate(ge))}catch(Ce){return this.error(Ce.message),null}}return me}return this.error(`Unknown expression "${te}". 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,L,W){let te=typeof d=="number"?this.path.concat(d):this.path,ue=W?this.scope.concat(W):this.scope;return new Wo(this.registry,this._isConstant,te,L||null,ue,this.errors)}error(d,...L){let W=`${this.key}${L.map(te=>`[${te}]`).join("")}`;this.errors.push(new Sr(W,d))}checkSubtype(d,L){let W=Yn(d,L);return W&&this.error(W),W}}class to{constructor(d,L){this.type=L.type,this.bindings=[].concat(d),this.result=L}evaluate(d){return this.result.evaluate(d)}eachChild(d){for(let L of this.bindings)d(L[1]);d(this.result)}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found ${d.length-1} instead.`);let W=[];for(let ue=1;ue=W.length)throw new Xn(`Array index out of bounds: ${L} > ${W.length-1}.`);if(L!==Math.floor(L))throw new Xn(`Array index must be an integer, but found ${L} instead.`);return W[L]}eachChild(d){d(this.index),d(this.input)}outputDefined(){return!1}}class Vi{constructor(d,L){this.type=ur,this.needle=d,this.haystack=L}static parse(d,L){if(d.length!==3)return L.error(`Expected 2 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);return W&&te?on(W.type,[ur,nr,Rt,Yt,Zr])?new Vi(W,te):L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`):null}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!W)return!1;if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);if(!en(W,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`);return W.indexOf(L)>=0}eachChild(d){d(this.needle),d(this.haystack)}outputDefined(){return!0}}class Io{constructor(d,L,W){this.type=Rt,this.needle=d,this.haystack=L,this.fromIndex=W}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);if(!W||!te)return null;if(!on(W.type,[ur,nr,Rt,Yt,Zr]))return L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Io(W,te,ue):null}return new Io(W,te)}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(d)),en(W,["string"])){let ue=W.indexOf(L,te);return ue===-1?-1:[...W.slice(0,ue)].length}if(en(W,["array"]))return W.indexOf(L,te);throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`)}eachChild(d){d(this.needle),d(this.haystack),this.fromIndex&&d(this.fromIndex)}outputDefined(){return!1}}class Xi{constructor(d,L,W,te,ue,me){this.inputType=d,this.type=L,this.input=W,this.cases=te,this.outputs=ue,this.otherwise=me}static parse(d,L){if(d.length<5)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if(d.length%2!=1)return L.error("Expected an even number of arguments.");let W,te;L.expectedType&&L.expectedType.kind!=="value"&&(te=L.expectedType);let ue={},me=[];for(let Te=2;TeNumber.MAX_SAFE_INTEGER)return it.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return it.error("Numeric branch labels must be integer values.");if(W){if(it.checkSubtype(W,qn(bt)))return null}else W=qn(bt);if(ue[String(bt)]!==void 0)return it.error("Branch labels must be unique.");ue[String(bt)]=me.length}let He=L.parse(Pe,Te,te);if(!He)return null;te=te||He.type,me.push(He)}let ge=L.parse(d[1],1,Zr);if(!ge)return null;let Ce=L.parse(d[d.length-1],d.length-1,te);return Ce?ge.type.kind!=="value"&&L.concat(1).checkSubtype(W,ge.type)?null:new Xi(W,te,ge,ue,me,Ce):null}evaluate(d){let L=this.input.evaluate(d);return(qn(L)===this.inputType&&this.outputs[this.cases[L]]||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 Ko{constructor(d,L,W){this.type=d,this.branches=L,this.otherwise=W}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found only ${d.length-1}.`);if(d.length%2!=0)return L.error("Expected an odd number of arguments.");let W;L.expectedType&&L.expectedType.kind!=="value"&&(W=L.expectedType);let te=[];for(let me=1;meL.outputDefined())&&this.otherwise.outputDefined()}}class Uo{constructor(d,L,W,te){this.type=d,this.input=L,this.beginIndex=W,this.endIndex=te}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Rt);if(!W||!te)return null;if(!on(W.type,[yn(Zr),nr,Zr]))return L.error(`Expected first argument to be of type array or string, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Uo(W.type,W,te,ue):null}return new Uo(W.type,W,te)}evaluate(d){let L=this.input.evaluate(d),W=this.beginIndex.evaluate(d),te;if(this.endIndex&&(te=this.endIndex.evaluate(d)),en(L,["string"]))return[...L].slice(W,te).join("");if(en(L,["array"]))return L.slice(W,te);throw new Xn(`Expected first argument to be of type array or string, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input),d(this.beginIndex),this.endIndex&&d(this.endIndex)}outputDefined(){return!1}}function Ls(R,d){let L=R.length-1,W,te,ue=0,me=L,ge=0;for(;ue<=me;)if(ge=Math.floor((ue+me)/2),W=R[ge],te=R[ge+1],W<=d){if(ge===L||dd))throw new Xn("Input is not a number.");me=ge-1}return 0}class Ss{constructor(d,L,W){this.type=d,this.input=L,this.labels=[],this.outputs=[];for(let[te,ue]of W)this.labels.push(te),this.outputs.push(ue)}static parse(d,L){if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=[],ue=null;L.expectedType&&L.expectedType.kind!=="value"&&(ue=L.expectedType);for(let me=1;me=ge)return L.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Te);let Pe=L.parse(Ce,Oe,ue);if(!Pe)return null;ue=ue||Pe.type,te.push([ge,Pe])}return new Ss(ue,W,te)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;return te>=L[ue-1]?W[ue-1].evaluate(d):W[Ls(L,te)].evaluate(d)}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function Vo(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var Vs,Ts,Bo=function(){if(Ts)return Vs;function R(d,L,W,te){this.cx=3*d,this.bx=3*(W-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*L,this.by=3*(te-L)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=L,this.p2x=W,this.p2y=te}return Ts=1,Vs=R,R.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,L){if(L===void 0&&(L=1e-6),d<0)return 0;if(d>1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},Vs}(),_o=Vo(Bo);class Pi{constructor(d,L,W,te,ue){this.type=d,this.operator=L,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[me,ge]of ue)this.labels.push(me),this.outputs.push(ge)}static interpolationFactor(d,L,W,te){let ue=0;if(d.name==="exponential")ue=yo(L,d.base,W,te);else if(d.name==="linear")ue=yo(L,1,W,te);else if(d.name==="cubic-bezier"){let me=d.controlPoints;ue=new _o(me[0],me[1],me[2],me[3]).solve(yo(L,1,W,te))}return ue}static parse(d,L){let[W,te,ue,...me]=d;if(!Array.isArray(te)||te.length===0)return L.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let Te=te[1];if(typeof Te!="number")return L.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:Te}}else{if(te[0]!=="cubic-bezier")return L.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let Te=te.slice(1);if(Te.length!==4||Te.some(Oe=>typeof Oe!="number"||Oe<0||Oe>1))return L.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:Te}}}if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");if(ue=L.parse(ue,2,Rt),!ue)return null;let ge=[],Ce=null;W!=="interpolate-hcl"&&W!=="interpolate-lab"||L.expectedType==un?L.expectedType&&L.expectedType.kind!=="value"&&(Ce=L.expectedType):Ce=cr;for(let Te=0;Te=Oe)return L.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',it);let bt=L.parse(Pe,He,Ce);if(!bt)return null;Ce=Ce||bt.type,ge.push([Oe,bt])}return vi(Ce,Rt)||vi(Ce,Rr)||vi(Ce,cr)||vi(Ce,La)||vi(Ce,Xa)||vi(Ce,un)||vi(Ce,Nn)||vi(Ce,yn(Rt))?new Pi(Ce,W,te,ue,ge):L.error(`Type ${Un(Ce)} is not interpolatable.`)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;if(te>=L[ue-1])return W[ue-1].evaluate(d);let me=Ls(L,te),ge=Pi.interpolationFactor(this.interpolation,te,L[me],L[me+1]),Ce=W[me].evaluate(d),Te=W[me+1].evaluate(d);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return tn(Ce,Te,ge);case"color":return rn.interpolate(Ce,Te,ge);case"padding":return fn.interpolate(Ce,Te,ge);case"colorArray":return jn.interpolate(Ce,Te,ge);case"numberArray":return Ai.interpolate(Ce,Te,ge);case"variableAnchorOffsetCollection":return gi.interpolate(Ce,Te,ge);case"array":return ai(Ce,Te,ge);case"projectionDefinition":return io.interpolate(Ce,Te,ge)}case"interpolate-hcl":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"hcl");case"colorArray":return jn.interpolate(Ce,Te,ge,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"lab");case"colorArray":return jn.interpolate(Ce,Te,ge,"lab")}}}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function yo(R,d,L,W){let te=W-L,ue=R-L;return te===0?0:d===1?ue/te:(Math.pow(d,ue)-1)/(Math.pow(d,te)-1)}let bs={color:rn.interpolate,number:tn,padding:fn.interpolate,numberArray:Ai.interpolate,colorArray:jn.interpolate,variableAnchorOffsetCollection:gi.interpolate,array:ai};class Dl{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=null,te=L.expectedType;te&&te.kind!=="value"&&(W=te);let ue=[];for(let ge of d.slice(1)){let Ce=L.parse(ge,1+ue.length,W,void 0,{typeAnnotation:"omit"});if(!Ce)return null;W=W||Ce.type,ue.push(Ce)}if(!W)throw new Error("No output type");let me=te&&ue.some(ge=>Yn(te,ge.type));return new Dl(me?Zr:W,ue)}evaluate(d){let L,W=null,te=0;for(let ue of this.args)if(te++,W=ue.evaluate(d),W&&W instanceof qi&&!W.available&&(L||(L=W.name),W=null,te===this.args.length&&(W=L)),W!==null)break;return W}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}function hl(R,d){return R==="=="||R==="!="?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 ps(R,d,L,W){return W.compare(d,L)===0}function dl(R,d,L){let W=R!=="=="&&R!=="!=";return class ER{constructor(ue,me,ge){this.type=ur,this.lhs=ue,this.rhs=me,this.collator=ge,this.hasUntypedArgument=ue.type.kind==="value"||me.type.kind==="value"}static parse(ue,me){if(ue.length!==3&&ue.length!==4)return me.error("Expected two or three arguments.");let ge=ue[0],Ce=me.parse(ue[1],1,Zr);if(!Ce)return null;if(!hl(ge,Ce.type))return me.concat(1).error(`"${ge}" comparisons are not supported for type '${Un(Ce.type)}'.`);let Te=me.parse(ue[2],2,Zr);if(!Te)return null;if(!hl(ge,Te.type))return me.concat(2).error(`"${ge}" comparisons are not supported for type '${Un(Te.type)}'.`);if(Ce.type.kind!==Te.type.kind&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error(`Cannot compare types '${Un(Ce.type)}' and '${Un(Te.type)}'.`);W&&(Ce.type.kind==="value"&&Te.type.kind!=="value"?Ce=new go(Te.type,[Ce]):Ce.type.kind!=="value"&&Te.type.kind==="value"&&(Te=new go(Ce.type,[Te])));let Oe=null;if(ue.length===4){if(Ce.type.kind!=="string"&&Te.type.kind!=="string"&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error("Cannot use collator to compare non-string types.");if(Oe=me.parse(ue[3],3,ha),!Oe)return null}return new ER(Ce,Te,Oe)}evaluate(ue){let me=this.lhs.evaluate(ue),ge=this.rhs.evaluate(ue);if(W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!==Te.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new Xn(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ce.kind}, ${Te.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!=="string"||Te.kind!=="string")return d(ue,me,ge)}return this.collator?L(ue,me,ge,this.collator.evaluate(ue)):d(ue,me,ge)}eachChild(ue){ue(this.lhs),ue(this.rhs),this.collator&&ue(this.collator)}outputDefined(){return!0}}}let wu=dl("==",function(R,d,L){return d===L},ps),lu=dl("!=",function(R,d,L){return d!==L},function(R,d,L,W){return!ps(0,d,L,W)}),xc=dl("<",function(R,d,L){return d",function(R,d,L){return d>L},function(R,d,L,W){return W.compare(d,L)>0}),pl=dl("<=",function(R,d,L){return d<=L},function(R,d,L,W){return W.compare(d,L)<=0}),$u=dl(">=",function(R,d,L){return d>=L},function(R,d,L,W){return W.compare(d,L)>=0});class uu{constructor(d,L,W){this.type=ha,this.locale=W,this.caseSensitive=d,this.diacriticSensitive=L}static parse(d,L){if(d.length!==2)return L.error("Expected one argument.");let W=d[1];if(typeof W!="object"||Array.isArray(W))return L.error("Collator options argument must be an object.");let te=L.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,ur);if(!te)return null;let ue=L.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,ur);if(!ue)return null;let me=null;return W.locale&&(me=L.parse(W.locale,1,nr),!me)?null:new uu(te,ue,me)}evaluate(d){return new Ri(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 tl{constructor(d,L,W,te,ue,me){this.type=nr,this.number=d,this.locale=L,this.currency=W,this.unit=te,this.minFractionDigits=ue,this.maxFractionDigits=me}static parse(d,L){if(d.length!==3)return L.error("Expected two arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=d[2];if(typeof te!="object"||Array.isArray(te))return L.error("NumberFormat options argument must be an object.");let ue=null;if(te.locale&&(ue=L.parse(te.locale,1,nr),!ue))return null;let me=null;if(te.currency&&(me=L.parse(te.currency,1,nr),!me))return null;let ge=null;if(te.unit&&(ge=L.parse(te.unit,1,nr),!ge))return null;if(me&&ge)return L.error("NumberFormat options `currency` and `unit` are mutually exclusive");let Ce=null;if(te["min-fraction-digits"]&&(Ce=L.parse(te["min-fraction-digits"],1,Rt),!Ce))return null;let Te=null;return te["max-fraction-digits"]&&(Te=L.parse(te["max-fraction-digits"],1,Rt),!Te)?null:new tl(W,ue,me,ge,Ce,Te)}evaluate(d){return new Intl.NumberFormat(this.locale?this.locale.evaluate(d):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(d):void 0,unit:this.unit?this.unit.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.unit&&d(this.unit),this.minFractionDigits&&d(this.minFractionDigits),this.maxFractionDigits&&d(this.maxFractionDigits)}outputDefined(){return!1}}class vs{constructor(d){this.type=Pa,this.sections=d}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[1];if(!Array.isArray(W)&&typeof W=="object")return L.error("First argument must be an image or text section.");let te=[],ue=!1;for(let me=1;me<=d.length-1;++me){let ge=d[me];if(ue&&typeof ge=="object"&&!Array.isArray(ge)){ue=!1;let Ce=null;if(ge["font-scale"]&&(Ce=L.parse(ge["font-scale"],1,Rt),!Ce))return null;let Te=null;if(ge["text-font"]&&(Te=L.parse(ge["text-font"],1,yn(nr)),!Te))return null;let Oe=null;if(ge["text-color"]&&(Oe=L.parse(ge["text-color"],1,cr),!Oe))return null;let Pe=null;if(ge["vertical-align"]){if(typeof ge["vertical-align"]=="string"&&!Gn.includes(ge["vertical-align"]))return L.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${ge["vertical-align"]}' instead.`);if(Pe=L.parse(ge["vertical-align"],1,nr),!Pe)return null}let it=te[te.length-1];it.scale=Ce,it.font=Te,it.textColor=Oe,it.verticalAlign=Pe}else{let Ce=L.parse(d[me],1,Zr);if(!Ce)return null;let Te=Ce.type.kind;if(Te!=="string"&&Te!=="value"&&Te!=="null"&&Te!=="resolvedImage")return L.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ue=!0,te.push({content:Ce,scale:null,font:null,textColor:null,verticalAlign:null})}}return new vs(te)}evaluate(d){return new Di(this.sections.map(L=>{let W=L.content.evaluate(d);return qn(W)===ja?new no("",W,null,null,null,L.verticalAlign?L.verticalAlign.evaluate(d):null):new no(Hi(W),null,L.scale?L.scale.evaluate(d):null,L.font?L.font.evaluate(d).join(","):null,L.textColor?L.textColor.evaluate(d):null,L.verticalAlign?L.verticalAlign.evaluate(d):null)}))}eachChild(d){for(let L of this.sections)d(L.content),L.scale&&d(L.scale),L.font&&d(L.font),L.textColor&&d(L.textColor),L.verticalAlign&&d(L.verticalAlign)}outputDefined(){return!1}}class os{constructor(d){this.type=ja,this.input=d}static parse(d,L){if(d.length!==2)return L.error("Expected two arguments.");let W=L.parse(d[1],1,nr);return W?new os(W):L.error("No image name provided.")}evaluate(d){let L=this.input.evaluate(d),W=qi.fromString(L);return W&&d.availableImages&&(W.available=d.availableImages.indexOf(L)>-1),W}eachChild(d){d(this.input)}outputDefined(){return!1}}class ms{constructor(d){this.type=Rt,this.input=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=L.parse(d[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?L.error(`Expected argument of type string or array, but found ${Un(W.type)} instead.`):new ms(W):null}evaluate(d){let L=this.input.evaluate(d);if(typeof L=="string")return[...L].length;if(Array.isArray(L))return L.length;throw new Xn(`Expected value to be of type string or array, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input)}outputDefined(){return!1}}let rl=8192;function Fu(R,d){let L=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,d.z);return[Math.round(L*te*rl),Math.round(W*te*rl)]}function zu(R,d){let L=Math.pow(2,d.z);return[(te=(R[0]/rl+d.x)/L,360*te-180),(W=(R[1]/rl+d.y)/L,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Ku(R,d){R[0]=Math.min(R[0],d[0]),R[1]=Math.min(R[1],d[1]),R[2]=Math.max(R[2],d[0]),R[3]=Math.max(R[3],d[1])}function bc(R,d){return!(R[0]<=d[0]||R[2]>=d[2]||R[1]<=d[1]||R[3]>=d[3])}function Lh(R,d,L){let W=R[0]-d[0],te=R[1]-d[1],ue=R[0]-L[0],me=R[1]-L[1];return W*me-ue*te==0&&W*ue<=0&&te*me<=0}function rh(R,d,L,W){return(te=[W[0]-L[0],W[1]-L[1]])[0]*(ue=[d[0]-R[0],d[1]-R[1]])[1]-te[1]*ue[0]!=0&&!(!Nf(R,d,L,W)||!Nf(L,W,R,d));var te,ue}function Ju(R,d,L){for(let W of L)for(let te=0;te(te=R)[1]!=(me=ge[Ce+1])[1]>te[1]&&te[0]<(me[0]-ue[0])*(te[1]-ue[1])/(me[1]-ue[1])+ue[0]&&(W=!W)}var te,ue,me;return W}function ah(R,d){for(let L of d)if(ss(R,L))return!0;return!1}function wc(R,d){for(let L of R)if(!ss(L,d))return!1;for(let L=0;L0&&ge<0||me<0&&ge>0}function Bu(R,d,L){let W=[];for(let te=0;teL[2]){let te=.5*W,ue=R[0]-L[0]>te?-W:L[0]-R[0]>te?W:0;ue===0&&(ue=R[0]-L[2]>te?-W:L[2]-R[0]>te?W:0),R[0]+=ue}Ku(d,R)}function Gc(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let ge of R)for(let Ce of ge){let Te=[Ce.x+ue[0],Ce.y+ue[1]];Ou(Te,d,L,te),me.push(Te)}return me}function pf(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let Ce of R){let Te=[];for(let Oe of Ce){let Pe=[Oe.x+ue[0],Oe.y+ue[1]];Ku(d,Pe),Te.push(Pe)}me.push(Te)}if(d[2]-d[0]<=te/2){(ge=d)[0]=ge[1]=1/0,ge[2]=ge[3]=-1/0;for(let Ce of me)for(let Te of Ce)Ou(Te,d,L,te)}var ge;return me}class $l{constructor(d,L){this.type=ur,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'within' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection"){let te=[];for(let ue of W.features){let{type:me,coordinates:ge}=ue.geometry;me==="Polygon"&&te.push(ge),me==="MultiPolygon"&&te.push(...ge)}if(te.length)return new $l(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new $l(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new $l(W,W)}return L.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(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ss(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ah(Te,ge))return!1}return!0}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!wc(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!pc(Te,ge))return!1}return!0}(d,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let jf=class{constructor(R=[],d=(L,W)=>LW?1:0){if(this.data=R,this.length=this.data.length,this.compare=d,this.length>0)for(let L=(this.length>>1)-1;L>=0;L--)this._down(L)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:d,compare:L}=this,W=d[R];for(;R>0;){let te=R-1>>1,ue=d[te];if(L(W,ue)>=0)break;d[R]=ue,R=te}d[R]=W}_down(R){let{data:d,compare:L}=this,W=this.length>>1,te=d[R];for(;R=0)break;d[R]=d[ue],R=ue}d[R]=te}};function Hc(R,d,L=0,W=R.length-1,te=Qu){for(;W>L;){if(W-L>600){let Ce=W-L+1,Te=d-L+1,Oe=Math.log(Ce),Pe=.5*Math.exp(2*Oe/3),it=.5*Math.sqrt(Oe*Pe*(Ce-Pe)/Ce)*(Te-Ce/2<0?-1:1);Hc(R,d,Math.max(L,Math.floor(d-Te*Pe/Ce+it)),Math.min(W,Math.floor(d+(Ce-Te)*Pe/Ce+it)),te)}let ue=R[d],me=L,ge=W;for(Wc(R,L,d),te(R[W],ue)>0&&Wc(R,L,W);me0;)ge--}te(R[L],ue)===0?Wc(R,L,ge):(ge++,Wc(R,ge,W)),ge<=d&&(L=ge+1),d<=ge&&(W=ge-1)}}function Wc(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function Qu(R,d){return Rd?1:0}function Yc(R,d){if(R.length<=1)return[R];let L=[],W,te;for(let ue of R){let me=Uf(ue);me!==0&&(ue.area=Math.abs(me),te===void 0&&(te=me<0),te===me<0?(W&&L.push(W),W=[ue]):W.push(ue))}if(W&&L.push(W),d>1)for(let ue=0;ue1?(Te=d[Ce+1][0],Oe=d[Ce+1][1]):He>0&&(Te+=Pe/this.kx*He,Oe+=it/this.ky*He)),Pe=this.wrap(L[0]-Te)*this.kx,it=(L[1]-Oe)*this.ky;let bt=Pe*Pe+it*it;bt180;)d-=360;return d}}function Zc(R,d){return d[0]-R[0]}function ec(R){return R[1]-R[0]+1}function cu(R,d){return R[1]>=R[0]&&R[1]R[1])return[null,null];let L=ec(R);if(d){if(L===2)return[R,null];let te=Math.floor(L/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(L===1)return[R,null];let W=Math.floor(L/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function vf(R,d){if(!cu(d,R.length))return[1/0,1/0,-1/0,-1/0];let L=[1/0,1/0,-1/0,-1/0];for(let W=d[0];W<=d[1];++W)Ku(L,R[W]);return L}function Tu(R){let d=[1/0,1/0,-1/0,-1/0];for(let L of R)for(let W of L)Ku(d,W);return d}function nh(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function vl(R,d,L){if(!nh(R)||!nh(d))return NaN;let W=0,te=0;return R[2]d[2]&&(W=R[0]-d[2]),R[1]>d[3]&&(te=R[1]-d[3]),R[3]=W)return W;if(bc(te,ue)){if(mf(R,d))return 0}else if(mf(d,R))return 0;let me=1/0;for(let ge of R)for(let Ce=0,Te=ge.length,Oe=Te-1;Ce0;){let Ce=me.pop();if(Ce[0]>=ue)continue;let Te=Ce[1],Oe=d?50:100;if(ec(Te)<=Oe){if(!cu(Te,R.length))return NaN;if(d){let Pe=Mc(R,Te,L,W);if(isNaN(Pe)||Pe===0)return Pe;ue=Math.min(ue,Pe)}else for(let Pe=Te[0];Pe<=Te[1];++Pe){let it=ac(R[Pe],L,W);if(ue=Math.min(ue,it),ue===0)return 0}}else{let Pe=tc(Te,d);ih(me,ue,W,R,ge,Pe[0]),ih(me,ue,W,R,ge,Pe[1])}}return ue}function El(R,d,L,W,te,ue=1/0){let me=Math.min(ue,te.distance(R[0],L[0]));if(me===0)return me;let ge=new jf([[0,[0,R.length-1],[0,L.length-1]]],Zc);for(;ge.length>0;){let Ce=ge.pop();if(Ce[0]>=me)continue;let Te=Ce[1],Oe=Ce[2],Pe=d?50:100,it=W?50:100;if(ec(Te)<=Pe&&ec(Oe)<=it){if(!cu(Te,R.length)&&cu(Oe,L.length))return NaN;let He;if(d&&W)He=yl(R,Te,L,Oe,te),me=Math.min(me,He);else if(d&&!W){let bt=R.slice(Te[0],Te[1]+1);for(let Et=Oe[0];Et<=Oe[1];++Et)if(He=ml(L[Et],bt,te),me=Math.min(me,He),me===0)return me}else if(!d&&W){let bt=L.slice(Oe[0],Oe[1]+1);for(let Et=Te[0];Et<=Te[1];++Et)if(He=ml(R[Et],bt,te),me=Math.min(me,He),me===0)return me}else He=qf(R,Te,L,Oe,te),me=Math.min(me,He)}else{let He=tc(Te,d),bt=tc(Oe,W);fu(ge,me,te,R,L,He[0],bt[0]),fu(ge,me,te,R,L,He[0],bt[1]),fu(ge,me,te,R,L,He[1],bt[0]),fu(ge,me,te,R,L,He[1],bt[1])}}return me}function oh(R){return R.type==="MultiPolygon"?R.coordinates.map(d=>({type:"Polygon",coordinates:d})):R.type==="MultiLineString"?R.coordinates.map(d=>({type:"LineString",coordinates:d})):R.type==="MultiPoint"?R.coordinates.map(d=>({type:"Point",coordinates:d})):[R]}class Au{constructor(d,L){this.type=Rt,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'distance' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection")return new Au(W,W.features.map(te=>oh(te.geometry)).flat());if(W.type==="Feature")return new Au(W,oh(W.geometry));if("type"in W&&"coordinates"in W)return new Au(W,oh(W))}return L.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(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!1,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!1,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!1,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!0,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!0,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!0,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="Polygon")return function(L,W){let te=L.geometry();if(te.length===0||te[0].length===0)return NaN;let ue=Yc(te,0).map(Ce=>Ce.map(Te=>Te.map(Oe=>zu([Oe.x,Oe.y],L.canonical)))),me=new Ac(ue[0][0][0][1]),ge=1/0;for(let Ce of W)for(let Te of ue){switch(Ce.type){case"Point":ge=Math.min(ge,Sl([Ce.coordinates],!1,Te,me,ge));break;case"LineString":ge=Math.min(ge,Sl(Ce.coordinates,!0,Te,me,ge));break;case"Polygon":ge=Math.min(ge,Jo(Te,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class $c{constructor(d){this.type=Zr,this.key=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=d[1];return W==null?L.error("Global state property must be defined."):typeof W!="string"?L.error(`Global state property must be string, but found ${typeof d[1]} instead.`):new $c(W)}evaluate(d){var L;let W=(L=d.globals)===null||L===void 0?void 0:L.globalState;return W&&Object.keys(W).length!==0?zr(W,this.key):null}eachChild(){}outputDefined(){return!1}}let _l={"==":wu,"!=":lu,">":Fl,"<":xc,">=":$u,"<=":pl,array:go,at:pi,boolean:go,case:Ko,coalesce:Dl,collator:uu,format:vs,image:os,in:Vi,"index-of":Io,interpolate:Pi,"interpolate-hcl":Pi,"interpolate-lab":Pi,length:ms,let:to,literal:Mi,match:Xi,number:go,"number-format":tl,object:go,slice:Uo,step:Ss,string:go,"to-boolean":Ao,"to-color":Ao,"to-number":Ao,"to-string":Ao,var:wo,within:$l,distance:Au,"global-state":$c};class nl{constructor(d,L,W,te){this.name=d,this.type=L,this._evaluate=W,this.args=te}evaluate(d){return this._evaluate(d,this.args)}eachChild(d){this.args.forEach(d)}outputDefined(){return!1}static parse(d,L){let W=d[0],te=nl.definitions[W];if(!te)return L.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let ue=Array.isArray(te)?te[0]:te.type,me=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,ge=me.filter(([Te])=>!Array.isArray(Te)||Te.length===d.length-1),Ce=null;for(let[Te,Oe]of ge){Ce=new Wo(L.registry,Uu,L.path,null,L.scope);let Pe=[],it=!1;for(let He=1;He{return it=Pe,Array.isArray(it)?`(${it.map(Un).join(", ")})`:`(${Un(it.type)}...)`;var it}).join(" | "),Oe=[];for(let Pe=1;Pe{L=d?L&&Uu(W):L&&W instanceof Mi}),!!L&&qu(R)&&yf(R,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function qu(R){if(R instanceof nl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof $l||R instanceof Au)return!1;let d=!0;return R.eachChild(L=>{d&&!qu(L)&&(d=!1)}),d}function nc(R){if(R instanceof nl&&R.name==="feature-state")return!1;let d=!0;return R.eachChild(L=>{d&&!nc(L)&&(d=!1)}),d}function yf(R,d){if(R instanceof nl&&d.indexOf(R.name)>=0)return!1;let L=!0;return R.eachChild(W=>{L&&!yf(W,d)&&(L=!1)}),L}function _f(R){return{result:"success",value:R}}function Mu(R){return{result:"error",value:R}}function ic(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Sc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Vu(R){return!!R.expression&&R.expression.interpolated}function xo(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Ec(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&qn(R)===Qr}function xh(R){return R}function Vf(R,d){let L=R.stops&&typeof R.stops[0][0]=="object",W=L||!(L||R.property!==void 0),te=R.type||(Vu(d)?"exponential":"interval"),ue=function(Oe){switch(Oe.type){case"color":return rn.parse;case"padding":return fn.parse;case"numberArray":return Ai.parse;case"colorArray":return jn.parse;default:return null}}(d);if(ue&&((R=Ht({},R)).stops&&(R.stops=R.stops.map(Oe=>[Oe[0],ue(Oe[1])])),R.default=ue(R.default?R.default:d.default)),R.colorSpace&&(me=R.colorSpace)!=="rgb"&&me!=="hcl"&&me!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var me;let ge=function(Oe){switch(Oe){case"exponential":return Hf;case"interval":return bh;case"categorical":return Gf;case"identity":return il;default:throw new Error(`Unknown function type "${Oe}"`)}}(te),Ce,Te;if(te==="categorical"){Ce=Object.create(null);for(let Oe of R.stops)Ce[Oe[0]]=Oe[1];Te=typeof R.stops[0][0]}if(L){let Oe={},Pe=[];for(let bt=0;btbt[0]),evaluate:({zoom:bt},Et)=>Hf({stops:it,base:R.base},d,bt).evaluate(bt,Et)}}if(W){let Oe=te==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Oe,interpolationFactor:Pi.interpolationFactor.bind(void 0,Oe),zoomStops:R.stops.map(Pe=>Pe[0]),evaluate:({zoom:Pe})=>ge(R,d,Pe,Ce,Te)}}return{kind:"source",evaluate(Oe,Pe){let it=Pe&&Pe.properties?Pe.properties[R.property]:void 0;return it===void 0?xf(R.default,d.default):ge(R,d,it,Ce,Te)}}}function xf(R,d,L){return R!==void 0?R:d!==void 0?d:L!==void 0?L:void 0}function Gf(R,d,L,W,te){return xf(typeof L===te?W[L]:void 0,R.default,d.default)}function bh(R,d,L){if(xo(L)!=="number")return xf(R.default,d.default);let W=R.stops.length;if(W===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[W-1][0])return R.stops[W-1][1];let te=Ls(R.stops.map(ue=>ue[0]),L);return R.stops[te][1]}function Hf(R,d,L){let W=R.base!==void 0?R.base:1;if(xo(L)!=="number")return xf(R.default,d.default);let te=R.stops.length;if(te===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[te-1][0])return R.stops[te-1][1];let ue=Ls(R.stops.map(Oe=>Oe[0]),L),me=function(Oe,Pe,it,He){let bt=He-it,Et=Oe-it;return bt===0?0:Pe===1?Et/bt:(Math.pow(Pe,Et)-1)/(Math.pow(Pe,bt)-1)}(L,W,R.stops[ue][0],R.stops[ue+1][0]),ge=R.stops[ue][1],Ce=R.stops[ue+1][1],Te=bs[d.type]||xh;return typeof ge.evaluate=="function"?{evaluate(...Oe){let Pe=ge.evaluate.apply(void 0,Oe),it=Ce.evaluate.apply(void 0,Oe);if(Pe!==void 0&&it!==void 0)return Te(Pe,it,me,R.colorSpace)}}:Te(ge,Ce,me,R.colorSpace)}function il(R,d,L){switch(d.type){case"color":L=rn.parse(L);break;case"formatted":L=Di.fromString(L.toString());break;case"resolvedImage":L=qi.fromString(L.toString());break;case"padding":L=fn.parse(L);break;case"colorArray":L=jn.parse(L);break;case"numberArray":L=Ai.parse(L);break;default:xo(L)===d.type||d.type==="enum"&&d.values[L]||(L=void 0)}return xf(L,R.default,d.default)}nl.register(_l,{error:[{kind:"error"},[nr],(R,[d])=>{throw new Xn(d.evaluate(R))}],typeof:[nr,[Zr],(R,[d])=>Un(qn(d.evaluate(R)))],"to-rgba":[yn(Rt,4),[cr],(R,[d])=>{let[L,W,te,ue]=d.evaluate(R).rgb;return[255*L,255*W,255*te,ue]}],rgb:[cr,[Rt,Rt,Rt],gf],rgba:[cr,[Rt,Rt,Rt,Rt],gf],has:{type:ur,overloads:[[[nr],(R,[d])=>Kc(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>Kc(d.evaluate(R),L.evaluate(R))]]},get:{type:Zr,overloads:[[[nr],(R,[d])=>sh(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>sh(d.evaluate(R),L.evaluate(R))]]},"feature-state":[Zr,[nr],(R,[d])=>sh(d.evaluate(R),R.featureState||{})],properties:[Qr,[],R=>R.properties()],"geometry-type":[nr,[],R=>R.geometryType()],id:[Zr,[],R=>R.id()],zoom:[Rt,[],R=>R.globals.zoom],"heatmap-density":[Rt,[],R=>R.globals.heatmapDensity||0],elevation:[Rt,[],R=>R.globals.elevation||0],"line-progress":[Rt,[],R=>R.globals.lineProgress||0],accumulated:[Zr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[Rt,hu(Rt),(R,d)=>{let L=0;for(let W of d)L+=W.evaluate(R);return L}],"*":[Rt,hu(Rt),(R,d)=>{let L=1;for(let W of d)L*=W.evaluate(R);return L}],"-":{type:Rt,overloads:[[[Rt,Rt],(R,[d,L])=>d.evaluate(R)-L.evaluate(R)],[[Rt],(R,[d])=>-d.evaluate(R)]]},"/":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)/L.evaluate(R)],"%":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)%L.evaluate(R)],ln2:[Rt,[],()=>Math.LN2],pi:[Rt,[],()=>Math.PI],e:[Rt,[],()=>Math.E],"^":[Rt,[Rt,Rt],(R,[d,L])=>Math.pow(d.evaluate(R),L.evaluate(R))],sqrt:[Rt,[Rt],(R,[d])=>Math.sqrt(d.evaluate(R))],log10:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN10],ln:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))],log2:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN2],sin:[Rt,[Rt],(R,[d])=>Math.sin(d.evaluate(R))],cos:[Rt,[Rt],(R,[d])=>Math.cos(d.evaluate(R))],tan:[Rt,[Rt],(R,[d])=>Math.tan(d.evaluate(R))],asin:[Rt,[Rt],(R,[d])=>Math.asin(d.evaluate(R))],acos:[Rt,[Rt],(R,[d])=>Math.acos(d.evaluate(R))],atan:[Rt,[Rt],(R,[d])=>Math.atan(d.evaluate(R))],min:[Rt,hu(Rt),(R,d)=>Math.min(...d.map(L=>L.evaluate(R)))],max:[Rt,hu(Rt),(R,d)=>Math.max(...d.map(L=>L.evaluate(R)))],abs:[Rt,[Rt],(R,[d])=>Math.abs(d.evaluate(R))],round:[Rt,[Rt],(R,[d])=>{let L=d.evaluate(R);return L<0?-Math.round(-L):Math.round(L)}],floor:[Rt,[Rt],(R,[d])=>Math.floor(d.evaluate(R))],ceil:[Rt,[Rt],(R,[d])=>Math.ceil(d.evaluate(R))],"filter-==":[ur,[nr,Zr],(R,[d,L])=>R.properties()[d.value]===L.value],"filter-id-==":[ur,[Zr],(R,[d])=>R.id()===d.value],"filter-type-==":[ur,[nr],(R,[d])=>R.geometryType()===d.value],"filter-<":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W{let L=R.id(),W=d.value;return typeof L==typeof W&&L":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>te}],"filter-id->":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>W}],"filter-<=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L<=W}],"filter->=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>=W}],"filter-has":[ur,[Zr],(R,[d])=>d.value in R.properties()],"filter-has-id":[ur,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[ur,[yn(nr)],(R,[d])=>d.value.indexOf(R.geometryType())>=0],"filter-id-in":[ur,[yn(Zr)],(R,[d])=>d.value.indexOf(R.id())>=0],"filter-in-small":[ur,[nr,yn(Zr)],(R,[d,L])=>L.value.indexOf(R.properties()[d.value])>=0],"filter-in-large":[ur,[nr,yn(Zr)],(R,[d,L])=>function(W,te,ue,me){for(;ue<=me;){let ge=ue+me>>1;if(te[ge]===W)return!0;te[ge]>W?me=ge-1:ue=ge+1}return!1}(R.properties()[d.value],L.value,0,L.value.length-1)],all:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)&&L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(!L.evaluate(R))return!1;return!0}]]},any:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)||L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(L.evaluate(R))return!0;return!1}]]},"!":[ur,[ur],(R,[d])=>!d.evaluate(R)],"is-supported-script":[ur,[nr],(R,[d])=>{let L=R.globals&&R.globals.isSupportedScript;return!L||L(d.evaluate(R))}],upcase:[nr,[nr],(R,[d])=>d.evaluate(R).toUpperCase()],downcase:[nr,[nr],(R,[d])=>d.evaluate(R).toLowerCase()],concat:[nr,hu(Zr),(R,d)=>d.map(L=>Hi(L.evaluate(R))).join("")],split:[yn(nr),[nr,nr],(R,[d,L])=>d.evaluate(R).split(L.evaluate(R))],join:[nr,[yn(nr),nr],(R,[d,L])=>d.evaluate(R).join(L.evaluate(R))],"resolved-locale":[nr,[ha],(R,[d])=>d.evaluate(R).resolvedLocale()]});class kl{constructor(d,L,W){this.expression=d,this._warningHistory={},this._evaluator=new jo,this._defaultValue=L?function(te){if(te.type==="color"&&Ec(te.default))return new rn(0,0,0,0);switch(te.type){case"color":return rn.parse(te.default)||null;case"padding":return fn.parse(te.default)||null;case"numberArray":return Ai.parse(te.default)||null;case"colorArray":return jn.parse(te.default)||null;case"variableAnchorOffsetCollection":return gi.parse(te.default)||null;case"projectionDefinition":return io.parse(te.default)||null;default:return te.default===void 0?null:te.default}}(L):null,this._enumValues=L&&L.type==="enum"?L.values:null,this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me,this.expression.evaluate(this._evaluator)}evaluate(d,L,W,te,ue,me){this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me||null;try{let ge=this.expression.evaluate(this._evaluator);if(ge==null||typeof ge=="number"&&ge!=ge)return this._defaultValue;if(this._enumValues&&!(ge in this._enumValues))throw new Xn(`Expected value to be one of ${Object.keys(this._enumValues).map(Ce=>JSON.stringify(Ce)).join(", ")}, but found ${JSON.stringify(ge)} instead.`);return ge}catch(ge){return this._warningHistory[ge.message]||(this._warningHistory[ge.message]=!0,typeof console<"u"&&console.warn(ge.message)),this._defaultValue}}}function kc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in _l}function Cc(R,d,L){let W=new Wo(_l,Uu,[],d?function(ue){let me={color:cr,string:nr,number:Rt,enum:nr,boolean:ur,formatted:Pa,padding:La,numberArray:Xa,colorArray:un,projectionDefinition:Rr,resolvedImage:ja,variableAnchorOffsetCollection:Nn};return ue.type==="array"?yn(me[ue.value]||Zr,ue.length):me[ue.type]}(d):void 0),te=W.parse(R,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return te?_f(new kl(te,d,L)):Mu(W.errors)}class Lc{constructor(d,L,W){this.kind=d,this._styleExpression=L,this.isStateDependent=d!=="constant"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}}class vc{constructor(d,L,W,te,ue){this.kind=d,this.zoomStops=W,this._styleExpression=L,this.isStateDependent=d!=="camera"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this.interpolationType=te,this._globalState=ue}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}interpolationFactor(d,L,W){return this.interpolationType?Pi.interpolationFactor(this.interpolationType,d,L,W):0}}function Ft(R,d,L){let W=Cc(R,d,L);if(W.result==="error")return W;let te=W.value.expression,ue=qu(te);if(!ue&&!ic(d))return Mu([new Sr("","data expressions not supported")]);let me=yf(te,["zoom"]);if(!me&&!Sc(d))return Mu([new Sr("","zoom expressions not supported")]);let ge=Fr(te);return ge||me?ge instanceof Sr?Mu([ge]):ge instanceof Pi&&!Vu(d)?Mu([new Sr("",'"interpolate" expressions cannot be used with this property')]):_f(ge?new vc(ue?"camera":"composite",W.value,ge.labels,ge instanceof Pi?ge.interpolation:void 0,L):new Lc(ue?"constant":"source",W.value,L)):Mu([new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class tr{constructor(d,L){this._parameters=d,this._specification=L,Ht(this,Vf(this._parameters,this._specification))}static deserialize(d){return new tr(d._parameters,d._specification)}static serialize(d){return{_parameters:d._parameters,_specification:d._specification}}}function Fr(R){let d=null;if(R instanceof to)d=Fr(R.result);else if(R instanceof Dl){for(let L of R.args)if(d=Fr(L),d)break}else(R instanceof Ss||R instanceof Pi)&&R.input instanceof nl&&R.input.name==="zoom"&&(d=R);return d instanceof Sr||R.eachChild(L=>{let W=Fr(L);W instanceof Sr?d=W:!d&&W?d=new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):d&&W&&d!==W&&(d=new Sr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),d}function wr(R,d=new Set){return R instanceof $c&&d.add(R.key),R.eachChild(L=>{wr(L,d)}),d}function ea(R,d){let{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge}=R??{};return{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge,globalState:d}}function ba(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let d of R.slice(1))if(!ba(d)&&typeof d!="boolean")return!1;return!0;default:return!0}}let Ia={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Na(R,d){if(R==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};ba(R)||(R=Da(R));let L=Cc(R,Ia,d);if(L.result==="error")throw new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));return{filter:(W,te,ue)=>L.value.evaluate(W,te,{},ue),needGeometry:mn(R),getGlobalStateRefs:()=>wr(L.value.expression)}}function Za(R,d){return Rd?1:0}function mn(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let d=1;d"||d==="<="||d===">="?Ha(R[1],R[2],d):d==="any"?(L=R.slice(1),["any"].concat(L.map(Da))):d==="all"?["all"].concat(R.slice(1).map(Da)):d==="none"?["all"].concat(R.slice(1).map(Da).map(En)):d==="in"?$a(R[1],R.slice(2)):d==="!in"?En($a(R[1],R.slice(2))):d==="has"?vn(R[1]):d!=="!has"||En(vn(R[1]));var L}function Ha(R,d,L){switch(R){case"$type":return[`filter-type-${L}`,d];case"$id":return[`filter-id-${L}`,d];default:return[`filter-${L}`,R,d]}}function $a(R,d){if(d.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(L=>typeof L!=typeof d[0])?["filter-in-large",R,["literal",d.sort(Za)]]:["filter-in-small",R,["literal",d]]}}function vn(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function En(R){return["!",R]}function yi(R){let d=typeof R;if(d==="number"||d==="boolean"||d==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let ue of R)te+=`${yi(ue)},`;return`${te}]`}let L=Object.keys(R).sort(),W="{";for(let te=0;teW.maximum?[new Vt(d,L,`${L} is greater than the maximum value ${W.maximum}`)]:[]}function Co(R){let d=R.valueSpec,L=ri(R.value.type),W,te,ue,me={},ge=L!=="categorical"&&R.value.property===void 0,Ce=!ge,Te=xo(R.value.stops)==="array"&&xo(R.value.stops[0])==="array"&&xo(R.value.stops[0][0])==="object",Oe=Ln({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(He){if(L==="identity")return[new Vt(He.key,He.value,'identity function may not have a "stops" property')];let bt=[],Et=He.value;return bt=bt.concat(Ni({key:He.key,value:Et,valueSpec:He.valueSpec,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,arrayElementValidator:Pe})),xo(Et)==="array"&&Et.length===0&&bt.push(new Vt(He.key,Et,"array must have at least one stop")),bt},default:function(He){return He.validateSpec({key:He.key,value:He.value,valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec})}}});return L==="identity"&&ge&&Oe.push(new Vt(R.key,R.value,'missing required property "property"')),L==="identity"||R.value.stops||Oe.push(new Vt(R.key,R.value,'missing required property "stops"')),L==="exponential"&&R.valueSpec.expression&&!Vu(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ce&&!ic(R.valueSpec)?Oe.push(new Vt(R.key,R.value,"property functions not supported")):ge&&!Sc(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"zoom functions not supported"))),L!=="categorical"&&!Te||R.value.property!==void 0||Oe.push(new Vt(R.key,R.value,'"property" property is required')),Oe;function Pe(He){let bt=[],Et=He.value,Qt=He.key;if(xo(Et)!=="array")return[new Vt(Qt,Et,`array expected, ${xo(Et)} found`)];if(Et.length!==2)return[new Vt(Qt,Et,`array length 2 expected, length ${Et.length} found`)];if(Te){if(xo(Et[0])!=="object")return[new Vt(Qt,Et,`object expected, ${xo(Et[0])} found`)];if(Et[0].zoom===void 0)return[new Vt(Qt,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new Vt(Qt,Et,"object stop key must have value")];if(ue&&ue>ri(Et[0].zoom))return[new Vt(Qt,Et[0].zoom,"stop zoom values must appear in ascending order")];ri(Et[0].zoom)!==ue&&(ue=ri(Et[0].zoom),te=void 0,me={}),bt=bt.concat(Ln({key:`${Qt}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,objectElementValidators:{zoom:Zi,value:it}}))}else bt=bt.concat(it({key:`${Qt}[0]`,value:Et[0],validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec},Et));return kc(kn(Et[1]))?bt.concat([new Vt(`${Qt}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(He.validateSpec({key:`${Qt}[1]`,value:Et[1],valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec}))}function it(He,bt){let Et=xo(He.value),Qt=ri(He.value),er=He.value!==null?He.value:bt;if(W){if(Et!==W)return[new Vt(He.key,er,`${Et} stop domain type must match previous stop domain type ${W}`)]}else W=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new Vt(He.key,er,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&L!=="categorical"){let br=`number expected, ${Et} found`;return ic(d)&&L===void 0&&(br+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Vt(He.key,er,br)]}return L!=="categorical"||Et!=="number"||isFinite(Qt)&&Math.floor(Qt)===Qt?L!=="categorical"&&Et==="number"&&te!==void 0&&Qtnew Vt(`${R.key}${W.key}`,R.value,W.message));let L=d.value.expression||d.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!L.outputDefined())return[new Vt(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!yf(L,["zoom","feature-state"]))return[new Vt(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!qu(L))return[new Vt(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fo(R){let d=R.key,L=R.value,W=xo(L);return W!=="string"?[new Vt(d,L,`color expected, ${W} found`)]:rn.parse(String(L))?[]:[new Vt(d,L,`color expected, "${L}" found`)]}function Yo(R){let d=R.key,L=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${W.values.join(", ")}], ${JSON.stringify(L)} found`)):Object.keys(W.values).indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(L)} found`)),te}function bo(R){return ba(kn(R.value))?Do(Ht({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Gs(R)}function Gs(R){let d=R.value,L=R.key;if(xo(d)!=="array")return[new Vt(L,d,`array expected, ${xo(d)} found`)];let W=R.styleSpec,te,ue=[];if(d.length<1)return[new Vt(L,d,"filter array must have at least 1 element")];switch(ue=ue.concat(Yo({key:`${L}[0]`,value:d[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),ri(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&ri(d[1])==="$type"&&ue.push(new Vt(L,d,`"$type" cannot be use with operator "${d[0]}"`));case"==":case"!=":d.length!==3&&ue.push(new Vt(L,d,`filter array for operator "${d[0]}" must have 3 elements`));case"in":case"!in":d.length>=2&&(te=xo(d[1]),te!=="string"&&ue.push(new Vt(`${L}[1]`,d[1],`string expected, ${te} found`)));for(let me=2;me{Pe in te&&W.push(new Vt(ue,te[Pe],`"${Pe}" is prohibited for ref layers`))}),me.layers.forEach(Pe=>{ri(Pe.id)===Te&&(Oe=Pe)}),Oe?Oe.ref?W.push(new Vt(ue,te.ref,"ref cannot reference another ref layer")):Ce=ri(Oe.type):W.push(new Vt(ue,te.ref,`ref layer "${Te}" not found`))}else if(Ce!=="background")if(te.source){let Oe=me.sources&&me.sources[te.source],Pe=Oe&&ri(Oe.type);Oe?Pe==="vector"&&Ce==="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster source`)):Pe!=="raster-dem"&&Ce==="hillshade"||Pe!=="raster-dem"&&Ce==="color-relief"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster-dem source`)):Pe==="raster"&&Ce!=="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a vector source`)):Pe!=="vector"||te["source-layer"]?Pe==="raster-dem"&&Ce!=="hillshade"&&Ce!=="color-relief"?W.push(new Vt(ue,te.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):Ce!=="line"||!te.paint||!te.paint["line-gradient"]||Pe==="geojson"&&Oe.lineMetrics||W.push(new Vt(ue,te,`layer "${te.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):W.push(new Vt(ue,te,`layer "${te.id}" must specify a "source-layer"`)):W.push(new Vt(ue,te.source,`source "${te.source}" not found`))}else W.push(new Vt(ue,te,'missing required property "source"'));return Ce==="raster"&&(!((d=te.paint)===null||d===void 0)&&d.resampling)&&(!((L=te.paint)===null||L===void 0)&&L["raster-resampling"])&&W.push(new Vt(ue,te.paint,`layer "${te.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),W=W.concat(Ln({key:ue,value:te,valueSpec:ge.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${ue}.type`,value:te.type,valueSpec:ge.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:te,objectKey:"type"}),filter:bo,layout:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>Kn(Ht({layerType:Ce},Pe))}}),paint:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>ns(Ht({layerType:Ce},Pe))}})}})),W}function gs(R){let d=R.value,L=R.key,W=xo(d);return W!=="string"?[new Vt(L,d,`string expected, ${W} found`)]:[]}let js={promoteId:function({key:R,value:d}){if(xo(d)==="string")return gs({key:R,value:d});{let L=[];for(let W in d)L.push(...gs({key:`${R}.${W}`,value:d[W]}));return L}}};function Cl(R){let d=R.value,L=R.key,W=R.styleSpec,te=R.style,ue=R.validateSpec;if(!d.type)return[new Vt(L,d,'"type" is required')];let me=ri(d.type),ge;switch(me){case"vector":case"raster":return ge=Ln({key:L,value:d,valueSpec:W[`source_${me.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:js,validateSpec:ue}),ge;case"raster-dem":return ge=function(Ce){var Te;let Oe=(Te=Ce.sourceName)!==null&&Te!==void 0?Te:"",Pe=Ce.value,it=Ce.styleSpec,He=it.source_raster_dem,bt=Ce.style,Et=[],Qt=xo(Pe);if(Pe===void 0)return Et;if(Qt!=="object")return Et.push(new Vt("source_raster_dem",Pe,`object expected, ${Qt} found`)),Et;let er=ri(Pe.encoding)==="custom",br=["redFactor","greenFactor","blueFactor","baseShift"],sr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let Mr in Pe)!er&&br.includes(Mr)?Et.push(new Vt(Mr,Pe[Mr],`In "${Oe}": "${Mr}" is only valid when "encoding" is set to "custom". ${sr} encoding found`)):He[Mr]?Et=Et.concat(Ce.validateSpec({key:Mr,value:Pe[Mr],valueSpec:He[Mr],validateSpec:Ce.validateSpec,style:bt,styleSpec:it})):Et.push(new Vt(Mr,Pe[Mr],`unknown property "${Mr}"`));return Et}({sourceName:L,value:d,style:R.style,styleSpec:W,validateSpec:ue}),ge;case"geojson":if(ge=Ln({key:L,value:d,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:ue,objectElementValidators:js}),d.cluster)for(let Ce in d.clusterProperties){let[Te,Oe]=d.clusterProperties[Ce],Pe=typeof Te=="string"?[Te,["accumulated"],["get",Ce]]:Te;ge.push(...Do({key:`${L}.${Ce}.map`,value:Oe,expressionContext:"cluster-map"})),ge.push(...Do({key:`${L}.${Ce}.reduce`,value:Pe,expressionContext:"cluster-reduce"}))}return ge;case"video":return Ln({key:L,value:d,valueSpec:W.source_video,style:te,validateSpec:ue,styleSpec:W});case"image":return Ln({key:L,value:d,valueSpec:W.source_image,style:te,validateSpec:ue,styleSpec:W});case"canvas":return[new Vt(L,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yo({key:`${L}.type`,value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function zl(R){let d=R.value,L=R.styleSpec,W=L.light,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("light",d,`object expected, ${me} found`)]),ue;for(let ge in d){let Ce=ge.match(/^(.*)-transition$/);ue=ue.concat(Ce&&W[Ce[1]]&&W[Ce[1]].transition?R.validateSpec({key:ge,value:d[ge],valueSpec:L.transition,validateSpec:R.validateSpec,style:te,styleSpec:L}):W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)])}return ue}function Kl(R){let d=R.value,L=R.styleSpec,W=L.sky,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("sky",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me}function Gu(R){let d=R.value,L=R.styleSpec,W=L.terrain,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("terrain",d,`object expected, ${me} found`)]),ue;for(let ge in d)ue=ue.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return ue}function xl(R){let d=[],L=R.value,W=R.key;if(Array.isArray(L)){let te=[],ue=[];for(let me in L)L[me].id&&te.includes(L[me].id)&&d.push(new Vt(W,L,`all the sprites' ids must be unique, but ${L[me].id} is duplicated`)),te.push(L[me].id),L[me].url&&ue.includes(L[me].url)&&d.push(new Vt(W,L,`all the sprites' URLs must be unique, but ${L[me].url} is duplicated`)),ue.push(L[me].url),d=d.concat(Ln({key:`${W}[${me}]`,value:L[me],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return d}return gs({key:W,value:L})}function Hu(R){return!!R&&R.constructor===Object}function Su(R){return Hu(R.value)?[]:[new Vt(R.key,R.value,`object expected, ${xo(R.value)} found`)]}let mc={"*":()=>[],array:Ni,boolean:function(R){let d=R.value,L=R.key,W=xo(d);return W!=="boolean"?[new Vt(L,d,`boolean expected, ${W} found`)]:[]},number:Zi,color:Fo,constants:ki,enum:Yo,filter:bo,function:Co,layer:zo,object:Ln,source:Cl,light:zl,sky:Kl,terrain:Gu,projection:function(R){let d=R.value,L=R.styleSpec,W=L.projection,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("projection",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me},projectionDefinition:function(R){let d=R.key,L=R.value;L=L instanceof String?L.valueOf():L;let W=xo(L);return W!=="array"||function(te){return Array.isArray(te)&&te.length===3&&typeof te[0]=="string"&&typeof te[1]=="string"&&typeof te[2]=="number"}(L)||function(te){return!!["interpolate","step","literal"].includes(te[0])}(L)?["array","string"].includes(W)?[]:[new Vt(d,L,`projection expected, invalid type "${W}" found`)]:[new Vt(d,L,`projection expected, invalid array ${JSON.stringify(L)} found`)]},string:gs,formatted:function(R){return gs(R).length===0?[]:Do(R)},resolvedImage:function(R){return gs(R).length===0?[]:Do(R)},padding:function(R){let d=R.key,L=R.value;if(xo(L)==="array"){if(L.length<1||L.length>4)return[new Vt(d,L,`padding requires 1 to 4 values; ${L.length} values found`)];let W={type:"number"},te=[];for(let ue=0;ue[]}})),R.constants&&(L=L.concat(ki({key:"constants",value:R.constants}))),Ql(L)}function Jl(R){return function(d){return R(Object.assign({},d,{validateSpec:Jc}))}}function Ql(R){return[].concat(R).sort((d,L)=>d.line-L.line)}function Eu(R){return function(...d){return Ql(R.apply(this,d))}}du.source=Eu(Jl(Cl)),du.sprite=Eu(Jl(xl)),du.glyphs=Eu(Jl(oc)),du.light=Eu(Jl(zl)),du.sky=Eu(Jl(Kl)),du.terrain=Eu(Jl(Gu)),du.state=Eu(Jl(Su)),du.layer=Eu(Jl(zo)),du.filter=Eu(Jl(bo)),du.paintProperty=Eu(Jl(ns)),du.layoutProperty=Eu(Jl(Kn));let bf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class lh{constructor(d,L){this._globalState=L,this.setValue(d)}evaluate(){var d;return(d=this._literalValue)!==null&&d!==void 0?d:this._compiledValue.evaluate({})}setValue(d){if(d==null||d==="visible"||d==="none")return this._literalValue=d==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let L=Cc(d,bf,this._globalState);if(L.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));this._literalValue=void 0,this._compiledValue=L.value,this._globalStateRefs=wr(L.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Pc=ht,Ks=du,Bl=Ks.light,Wu=Ks.sky,wf=Ks.paintProperty,Qc=Ks.layoutProperty;function ku(R,d){let L=!1;if(d?.length)for(let W of d)R.fire(new Ot(new Error(W.message))),L=!0;return L}class Ol{constructor(d,L,W){let te=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;let me=new Int32Array(this.arrayBuffer);d=me[0],this.d=(L=me[1])+2*(W=me[2]);for(let Ce=0;Ce=Pe[He+0]&&te>=Pe[He+1])?(ge[it]=!0,me.push(Oe[it])):ge[it]=!1}}}_forEachCell(d,L,W,te,ue,me,ge,Ce){let Te=this._convertToCellCoord(d),Oe=this._convertToCellCoord(L),Pe=this._convertToCellCoord(W),it=this._convertToCellCoord(te);for(let He=Te;He<=Pe;He++)for(let bt=Oe;bt<=it;bt++){let Et=this.d*bt+He;if((!Ce||Ce(this._convertFromCellCoord(He),this._convertFromCellCoord(bt),this._convertFromCellCoord(He+1),this._convertFromCellCoord(bt+1)))&&ue.call(this,d,L,W,te,Et,me,ge,Ce))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,L=3+this.cells.length+1+1,W=0;for(let me of this.cells)W+=me.length;let te=new Int32Array(L+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let ue=L;for(let me=0;meW?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=L):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${L}}`,"u").source}catch{return null}}).filter(L=>L);return new RegExp(d.join("|"),"u")}let Jr=jr(["Arab","Dupl","Mong","Ougr","Syrc"]);function la(R){return!Jr.test(String.fromCodePoint(R))}function xa(R){return!(Wt(R)||(d=R,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(d))));var d}let Ba=jr(["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 an(R){return Ba.test(String.fromCodePoint(R))}function Tn(R,d){return!(!d&&an(R)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(R)))}function ii(R){for(let d of R)if(an(d.codePointAt(0)))return!0;return!1}let Si=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){if(Si.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(R,d){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(R.pluginStatus!=="loading")return this.setState(R),R;let L=R.pluginURL,W=new Promise(ue=>{this.loadScriptResolve=ue});d(L);let te=new Promise(ue=>setTimeout(()=>ue(),this.TIMEOUT));if(yield Promise.race([W,te]),this.isParsed()){let ue={pluginStatus:"loaded",pluginURL:L};return this.setState(ue),ue}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${L}`)})}};class oi{constructor(d,L){this.isSupportedScript=Ji,this.zoom=d,L?(this.now=L.now||0,this.fadeDuration=L.fadeDuration||0,this.zoomHistory=L.zoomHistory||new Bt,this.transition=L.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Bt,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let d=this.zoom,L=d-Math.floor(d),W=this.crossFadingFactor();return d>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:L+(1-L)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*L}}}function Ji(R){return function(d,L){for(let W of d)if(!Tn(W.codePointAt(0),L))return!1;return!0}(R,Si.getRTLTextPluginStatus()==="loaded")}let Qi="-transition";class Oo{constructor(d,L,W){this.property=d,this.value=L,this.expression=function(te,ue,me){if(Ec(te))return new tr(te,ue);if(kc(te)){let ge=Ft(te,ue,me);if(ge.result==="error")throw new Error(ge.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));return ge.value}{let ge=te;return ue.type==="color"&&typeof te=="string"?ge=rn.parse(te):ue.type!=="padding"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="numberArray"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="colorArray"||typeof te!="string"&&!Array.isArray(te)?ue.type==="variableAnchorOffsetCollection"&&Array.isArray(te)?ge=gi.parse(te):ue.type==="projectionDefinition"&&typeof te=="string"&&(ge=io.parse(te)):ge=jn.parse(te):ge=Ai.parse(te):ge=fn.parse(te),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>ge}}}(L===void 0?d.specification.default:L,d.specification,W)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(d,L,W){return this.property.possiblyEvaluate(this,d,L,W)}}class Qo{constructor(d,L){this.property=d,this.value=new Oo(d,void 0,L)}transitioned(d,L){return new ys(this.property,this.value,L,X({},d.transition,this.transition),d.now)}untransitioned(){return new ys(this.property,this.value,null,{},0)}}class vo{constructor(d,L){this._properties=d,this._values=Object.create(d.defaultTransitionablePropertyValues),this._globalState=L}hasProperty(d){return d in this._properties.defaultTransitionablePropertyValues}getValue(d){return q(this._values[d].value.value)}setValue(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].value=new Oo(this._values[d].property,L===null?void 0:q(L),this._globalState)}getTransition(d){return q(this._values[d].transition)}setTransition(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].transition=q(L)||void 0}serialize(){let d={};for(let L of Object.keys(this._values)){let W=this.getValue(L);W!==void 0&&(d[L]=W);let te=this.getTransition(L);te!==void 0&&(d[`${L}${Qi}`]=te)}return d}transitioned(d,L){let W=new ol(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(d,L._values[te]);return W}untransitioned(){let d=new ol(this._properties);for(let L of Object.keys(this._values))d._values[L]=this._values[L].untransitioned();return d}}class ys{constructor(d,L,W,te,ue){this.property=d,this.value=L,this.begin=ue+te.delay||0,this.end=this.begin+te.duration||0,d.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(d,L,W){let te=d.now||0,ue=this.value.possiblyEvaluate(d,L,W),me=this.prior;if(me){if(te>this.end)return this.prior=null,ue;if(this.value.isDataDriven())return this.prior=null,ue;if(tete.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class sc{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){if(d.value!==void 0){if(d.expression.kind==="constant"){let ue=d.expression.evaluate(L,null,{},W,te);return this._calculate(ue,ue,ue,L)}return this._calculate(d.expression.evaluate(new oi(Math.floor(L.zoom-1),L)),d.expression.evaluate(new oi(Math.floor(L.zoom),L)),d.expression.evaluate(new oi(Math.floor(L.zoom+1),L)),L)}}_calculate(d,L,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class tu{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){return!!d.expression.evaluate(L,null,{},W,te)}interpolate(){return!1}}class Ps{constructor(d){this.properties=d,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let L in d){let W=d[L];W.specification.overridable&&this.overridableProperties.push(L);let te=this.defaultPropertyValues[L]=new Oo(W,void 0,void 0),ue=this.defaultTransitionablePropertyValues[L]=new Qo(W,void 0);this.defaultTransitioningPropertyValues[L]=ue.untransitioned(),this.defaultPossiblyEvaluatedValues[L]=te.possiblyEvaluate({})}}}fi("DataDrivenProperty",wi),fi("DataConstantProperty",hi),fi("CrossFadedDataDrivenProperty",sl),fi("CrossFadedProperty",sc),fi("ColorRampProperty",tu);let gc=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",pu=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class ll extends vt{constructor(d,L,W){if(super(),this.id=d.id,this.type=d.type,this._globalState=W,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(te,ue){return new lh(te,ue)}(this.visibility,W),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,this._featureFilter=Na(d.filter,W)),L.layout&&(this._unevaluatedLayout=new jl(L.layout,W)),L.paint)){this._transitionablePaint=new vo(L.paint,W);for(let te in d.paint)this.setPaintProperty(te,d.paint[te],{validate:!1});for(let te in d.layout)this.setLayoutProperty(te,d.layout[te],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Cu(L.paint)}}setFilter(d){this.filter=d,this._featureFilter=Na(d,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(d){var L;if(d==="visibility")return this.visibility;if(!((L=this._transitionablePaint)===null||L===void 0)&&L.hasProperty(d))throw new Error(d+gc);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${d}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(d)}getLayoutAffectingGlobalStateRefs(){let d=new Set;for(let L of this._visibilityExpression.getGlobalStateRefs())d.add(L);if(this._unevaluatedLayout)for(let L in this._unevaluatedLayout._values){let W=this._unevaluatedLayout._values[L];for(let te of W.getGlobalStateRefs())d.add(te)}for(let L of this._featureFilter.getGlobalStateRefs())d.add(L);return d}getPaintAffectingGlobalStateRefs(){var d;let L=new globalThis.Map;if(this._transitionablePaint)for(let W in this._transitionablePaint._values){let te=this._transitionablePaint._values[W].value;for(let ue of te.getGlobalStateRefs()){let me=(d=L.get(ue))!==null&&d!==void 0?d:[];me.push({name:W,value:te.value}),L.set(ue,me)}}return L}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(d,L,W={}){var te;if(d==="visibility")return this.visibility=L,this._visibilityExpression.setValue(L),void this.recalculateVisibility();!((te=this._transitionablePaint)===null||te===void 0)&&te.hasProperty(d)?this.fire(new Ot(new Error(d+gc))):L!=null&&this._validate(Qc,`layers.${this.id}.layout.${d}`,d,L,W)||this._unevaluatedLayout.setValue(d,L)}getPaintProperty(d){var L,W;if(d.endsWith(Qi)){let te=d.slice(0,-11);if(te==="visibility"||!((L=this._unevaluatedLayout)===null||L===void 0)&&L.hasProperty(te))throw new Error(d+pu);return this._transitionablePaint.getTransition(te)}if(d==="visibility"||!((W=this._unevaluatedLayout)===null||W===void 0)&&W.hasProperty(d))throw new Error(d+pu);return this._transitionablePaint.getValue(d)}setPaintProperty(d,L,W={}){var te;if(d==="visibility"||!((te=this._unevaluatedLayout)===null||te===void 0)&&te.hasProperty(d))return this.fire(new Ot(new Error(d+pu))),!1;if(L!=null&&this._validate(wf,`layers.${this.id}.paint.${d}`,d,L,W))return!1;if(d.endsWith(Qi))return this._transitionablePaint.setTransition(d.slice(0,-11),L||void 0),!1;{let ue=this._transitionablePaint._values[d],me=ue.property.specification["property-type"]==="cross-faded-data-driven",ge=ue.value.isDataDriven(),Ce=ue.value;this._transitionablePaint.setValue(d,L),this._handleSpecialPaintPropertyUpdate(d);let Te=this._transitionablePaint._values[d].value;return Te.isDataDriven()||ge||me||this._handleOverridablePaintPropertyUpdate(d,Ce,Te)}}_handleSpecialPaintPropertyUpdate(d){}_handleOverridablePaintPropertyUpdate(d,L,W){return!1}isHidden(d=this.minzoom,L=!1){return!!(this.minzoom&&d<(L?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&d>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(d){this._transitioningPaint=this._transitionablePaint.transitioned(d,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(d,L){d.getCrossfadeParameters&&(this._crossfadeParameters=d.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(d,void 0,L)),this.paint=this._transitioningPaint.possiblyEvaluate(d,void 0,L)}serialize(){var d,L;let W={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:(d=this._unevaluatedLayout)===null||d===void 0?void 0:d.serialize(),paint:(L=this._transitionablePaint)===null||L===void 0?void 0:L.serialize()};return this.visibility&&(W.layout||(W.layout={}),W.layout.visibility=this.visibility),Y(W,(te,ue)=>!(te===void 0||ue==="layout"&&!Object.keys(te).length||ue==="paint"&&!Object.keys(te).length))}_validate(d,L,W,te,ue={}){return ue?.validate!==!1&&ku(this,d.call(Ks,{key:L,layerType:this.type,objectKey:W,value:te,styleSpec:ht,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let d in this.paint._values){let L=this.paint.get(d);if(L instanceof Hs&&ic(L.property.specification)&&(L.value.kind==="source"||L.value.kind==="composite")&&L.value.isStateDependent)return!0}return!1}}let ef;var de={get paint(){return ef=ef||new Ps({"raster-opacity":new hi(ht.paint_raster["raster-opacity"]),"raster-hue-rotate":new hi(ht.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new hi(ht.paint_raster["raster-brightness-min"]),"raster-brightness-max":new hi(ht.paint_raster["raster-brightness-max"]),"raster-saturation":new hi(ht.paint_raster["raster-saturation"]),"raster-contrast":new hi(ht.paint_raster["raster-contrast"]),resampling:new hi(ht.paint_raster.resampling),"raster-resampling":new hi(ht.paint_raster["raster-resampling"]),"raster-fade-duration":new hi(ht.paint_raster["raster-fade-duration"])})}};class Ee extends ll{constructor(d,L){super(d,de,L)}}let qe={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class tt{constructor(d,L){this._structArray=d,this._pos1=L*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class at{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(d,L){return d._trim(),L&&(d.isTransferred=!0,L.push(d.arrayBuffer)),{length:d.length,arrayBuffer:d.arrayBuffer}}static deserialize(d){let L=Object.create(this.prototype);return L.arrayBuffer=d.arrayBuffer,L.length=d.length,L.capacity=d.arrayBuffer.byteLength/L.bytesPerElement,L._refreshViews(),L}_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 L=this.uint8;this._refreshViews(),L&&this.uint8.set(L)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ct(R,d=1){let L=0,W=0;return{members:R.map(te=>{let ue=qe[te.type].BYTES_PER_ELEMENT,me=L=Nt(L,Math.max(d,ue)),ge=te.components||1;return W=Math.max(W,ue),L+=ue*ge,{name:te.name,type:te.type,components:ge,offset:me}}),size:Nt(L,Math.max(W,d)),alignment:d}}function Nt(R,d){return Math.ceil(R/d)*d}class St extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.int16[te+0]=L,this.int16[te+1]=W,d}}St.prototype.bytesPerElement=4,fi("StructArrayLayout2i4",St);class Jt extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.int16[ue+0]=L,this.int16[ue+1]=W,this.int16[ue+2]=te,d}}Jt.prototype.bytesPerElement=6,fi("StructArrayLayout3i6",Jt);class mr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.int16[me+0]=L,this.int16[me+1]=W,this.int16[me+2]=te,this.int16[me+3]=ue,d}}mr.prototype.bytesPerElement=8,fi("StructArrayLayout4i8",mr);class gr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}gr.prototype.bytesPerElement=12,fi("StructArrayLayout2i4i12",gr);class Hr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=4*d,Te=8*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.uint8[Te+4]=te,this.uint8[Te+5]=ue,this.uint8[Te+6]=me,this.uint8[Te+7]=ge,d}}Hr.prototype.bytesPerElement=8,fi("StructArrayLayout2i4ub8",Hr);class Vr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.float32[te+0]=L,this.float32[te+1]=W,d}}Vr.prototype.bytesPerElement=8,fi("StructArrayLayout2f8",Vr);class ca extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,d,L,W,te,ue,me,ge,Ce,Te,Oe)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=10*d;return this.uint16[it+0]=L,this.uint16[it+1]=W,this.uint16[it+2]=te,this.uint16[it+3]=ue,this.uint16[it+4]=me,this.uint16[it+5]=ge,this.uint16[it+6]=Ce,this.uint16[it+7]=Te,this.uint16[it+8]=Oe,this.uint16[it+9]=Pe,d}}ca.prototype.bytesPerElement=20,fi("StructArrayLayout10ui20",ca);class Aa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce){let Te=this.length;return this.resize(Te+1),this.emplace(Te,d,L,W,te,ue,me,ge,Ce)}emplace(d,L,W,te,ue,me,ge,Ce,Te){let Oe=8*d;return this.uint16[Oe+0]=L,this.uint16[Oe+1]=W,this.uint16[Oe+2]=te,this.uint16[Oe+3]=ue,this.uint16[Oe+4]=me,this.uint16[Oe+5]=ge,this.uint16[Oe+6]=Ce,this.uint16[Oe+7]=Te,d}}Aa.prototype.bytesPerElement=16,fi("StructArrayLayout8ui16",Aa);class Xr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it){let He=this.length;return this.resize(He+1),this.emplace(He,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He){let bt=12*d;return this.int16[bt+0]=L,this.int16[bt+1]=W,this.int16[bt+2]=te,this.int16[bt+3]=ue,this.uint16[bt+4]=me,this.uint16[bt+5]=ge,this.uint16[bt+6]=Ce,this.uint16[bt+7]=Te,this.int16[bt+8]=Oe,this.int16[bt+9]=Pe,this.int16[bt+10]=it,this.int16[bt+11]=He,d}}Xr.prototype.bytesPerElement=24,fi("StructArrayLayout4i4ui4i24",Xr);class oa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.float32[ue+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}oa.prototype.bytesPerElement=12,fi("StructArrayLayout3f12",oa);class fa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint32[1*d+0]=L,d}}fa.prototype.bytesPerElement=4,fi("StructArrayLayout1ul4",fa);class Ea extends at{_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,L,W,te,ue,me,ge,Ce,Te){let Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,d,L,W,te,ue,me,ge,Ce,Te)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=10*d,it=5*d;return this.int16[Pe+0]=L,this.int16[Pe+1]=W,this.int16[Pe+2]=te,this.int16[Pe+3]=ue,this.int16[Pe+4]=me,this.int16[Pe+5]=ge,this.uint32[it+3]=Ce,this.uint16[Pe+8]=Te,this.uint16[Pe+9]=Oe,d}}Ea.prototype.bytesPerElement=20,fi("StructArrayLayout6i1ul2ui20",Ea);class Ma extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}Ma.prototype.bytesPerElement=12,fi("StructArrayLayout2i2i2i12",Ma);class sa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,ue)}emplace(d,L,W,te,ue,me){let ge=4*d,Ce=8*d;return this.float32[ge+0]=L,this.float32[ge+1]=W,this.float32[ge+2]=te,this.int16[Ce+6]=ue,this.int16[Ce+7]=me,d}}sa.prototype.bytesPerElement=16,fi("StructArrayLayout2f1f2i16",sa);class hn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=16*d,Te=4*d,Oe=8*d;return this.uint8[Ce+0]=L,this.uint8[Ce+1]=W,this.float32[Te+1]=te,this.float32[Te+2]=ue,this.int16[Oe+6]=me,this.int16[Oe+7]=ge,d}}hn.prototype.bytesPerElement=16,fi("StructArrayLayout2ub2f2i16",hn);class An extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[ue+0]=L,this.uint16[ue+1]=W,this.uint16[ue+2]=te,d}}An.prototype.bytesPerElement=6,fi("StructArrayLayout3ui6",An);class zn extends at{_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,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er){let br=this.length;return this.resize(br+1),this.emplace(br,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br){let sr=24*d,Mr=12*d,qr=48*d;return this.int16[sr+0]=L,this.int16[sr+1]=W,this.uint16[sr+2]=te,this.uint16[sr+3]=ue,this.uint32[Mr+2]=me,this.uint32[Mr+3]=ge,this.uint32[Mr+4]=Ce,this.uint16[sr+10]=Te,this.uint16[sr+11]=Oe,this.uint16[sr+12]=Pe,this.float32[Mr+7]=it,this.float32[Mr+8]=He,this.uint8[qr+36]=bt,this.uint8[qr+37]=Et,this.uint8[qr+38]=Qt,this.uint32[Mr+10]=er,this.int16[sr+22]=br,d}}zn.prototype.bytesPerElement=48,fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",zn);class $n extends at{_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,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn){let gn=this.length;return this.resize(gn+1),this.emplace(gn,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn,gn){let Va=32*d,Hn=16*d;return this.int16[Va+0]=L,this.int16[Va+1]=W,this.int16[Va+2]=te,this.int16[Va+3]=ue,this.int16[Va+4]=me,this.int16[Va+5]=ge,this.int16[Va+6]=Ce,this.int16[Va+7]=Te,this.uint16[Va+8]=Oe,this.uint16[Va+9]=Pe,this.uint16[Va+10]=it,this.uint16[Va+11]=He,this.uint16[Va+12]=bt,this.uint16[Va+13]=Et,this.uint16[Va+14]=Qt,this.uint16[Va+15]=er,this.uint16[Va+16]=br,this.uint16[Va+17]=sr,this.uint16[Va+18]=Mr,this.uint16[Va+19]=qr,this.uint16[Va+20]=$r,this.uint16[Va+21]=_a,this.uint16[Va+22]=Ca,this.uint32[Hn+12]=nn,this.float32[Hn+13]=qa,this.float32[Hn+14]=bn,this.uint16[Va+30]=Fn,this.uint16[Va+31]=gn,d}}$n.prototype.bytesPerElement=64,fi("StructArrayLayout8i15ui1ul2f2ui64",$n);class xi extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.float32[1*d+0]=L,d}}xi.prototype.bytesPerElement=4,fi("StructArrayLayout1f4",xi);class di extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[6*d+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}di.prototype.bytesPerElement=12,fi("StructArrayLayout1ui2f12",di);class uo extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=4*d;return this.uint32[2*d+0]=L,this.uint16[ue+2]=W,this.uint16[ue+3]=te,d}}uo.prototype.bytesPerElement=8,fi("StructArrayLayout1ul2ui8",uo);class pe extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.uint16[te+0]=L,this.uint16[te+1]=W,d}}pe.prototype.bytesPerElement=4,fi("StructArrayLayout2ui4",pe);class y extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint16[1*d+0]=L,d}}y.prototype.bytesPerElement=2,fi("StructArrayLayout1ui2",y);class N extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.float32[me+0]=L,this.float32[me+1]=W,this.float32[me+2]=te,this.float32[me+3]=ue,d}}N.prototype.bytesPerElement=16,fi("StructArrayLayout4f16",N);class ie extends tt{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 t(this.anchorPointX,this.anchorPointY)}}ie.prototype.size=20;class fe extends Ea{get(d){return new ie(this,d)}}fi("CollisionBoxArray",fe);class be extends tt{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]}}be.prototype.size=48;class Re extends zn{get(d){return new be(this,d)}}fi("PlacedSymbolArray",Re);class je extends tt{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]}}je.prototype.size=64;class Ze extends $n{get(d){return new je(this,d)}}fi("SymbolInstanceArray",Ze);class ut extends xi{getoffsetX(d){return this.float32[1*d+0]}}fi("GlyphOffsetArray",ut);class ft extends Jt{getx(d){return this.int16[3*d+0]}gety(d){return this.int16[3*d+1]}gettileUnitDistanceFromAnchor(d){return this.int16[3*d+2]}}fi("SymbolLineVertexArray",ft);class Dt extends tt{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]}}Dt.prototype.size=12;class Gt extends di{get(d){return new Dt(this,d)}}fi("TextAnchorOffsetArray",Gt);class Kt extends tt{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]}}Kt.prototype.size=8;class st extends uo{get(d){return new Kt(this,d)}}fi("FeatureIndexArray",st);class It extends St{}class Ut extends St{}class ir extends St{}class dr extends gr{}class Ar extends Hr{}class hr extends Vr{}class vr extends ca{}class Or extends Aa{}class Cr extends Xr{}class ta extends oa{}class ka extends fa{}class Ta extends Ma{}class Ra extends hn{}class ua extends An{}class ia extends pe{}let ga=ct([{name:"a_pos",components:2,type:"Int16"}],4),{members:da}=ga;class Fa{constructor(d=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=d}prepareSegment(d,L,W,te){let ue=this.segments[this.segments.length-1];return d>Fa.MAX_VERTEX_ARRAY_LENGTH&&ee(`Max vertices per segment is ${Fa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${d}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Fa.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!ue||ue.vertexLength+d>Fa.MAX_VERTEX_ARRAY_LENGTH||ue.sortKey!==te?this.createNewSegment(L,W,te):ue}createNewSegment(d,L,W){let te={vertexOffset:d.length,primitiveOffset:L.length,vertexLength:0,primitiveLength:0,vaos:{}};return W!==void 0&&(te.sortKey=W),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(te),te}getOrCreateLatestSegment(d,L,W){return this.prepareSegment(0,d,L,W)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let d of this.segments)for(let L in d.vaos)d.vaos[L].destroy()}static simpleSegment(d,L,W,te){return new Fa([{vertexOffset:d,primitiveOffset:L,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function za(R,d){return 256*(R=se(Math.floor(R),0,255))+se(Math.floor(d),0,255)}Fa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,fi("SegmentVector",Fa);let Cn=ct([{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"}]),Dn=ct([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var ui,cn,sn,ei={exports:{}},Pn={exports:{}},Rn={exports:{}},In=function(){if(sn)return ei.exports;sn=1;var R=(ui||(ui=1,Pn.exports=function(L,W){var te,ue,me,ge,Ce,Te,Oe,Pe;for(ue=L.length-(te=3&L.length),me=W,Ce=3432918353,Te=461845907,Pe=0;Pe>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295)<<13|me>>>19))+((5*(me>>>16)&65535)<<16)&4294967295))+((58964+(ge>>>16)&65535)<<16);switch(Oe=0,te){case 3:Oe^=(255&L.charCodeAt(Pe+2))<<16;case 2:Oe^=(255&L.charCodeAt(Pe+1))<<8;case 1:me^=Oe=(65535&(Oe=(Oe=(65535&(Oe^=255&L.charCodeAt(Pe)))*Ce+(((Oe>>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295}return me^=L.length,me=2246822507*(65535&(me^=me>>>16))+((2246822507*(me>>>16)&65535)<<16)&4294967295,me=3266489909*(65535&(me^=me>>>13))+((3266489909*(me>>>16)&65535)<<16)&4294967295,(me^=me>>>16)>>>0}),Pn.exports),d=(cn||(cn=1,Rn.exports=function(L,W){for(var te,ue=L.length,me=W^ue,ge=0;ue>=4;)te=1540483477*(65535&(te=255&L.charCodeAt(ge)|(255&L.charCodeAt(++ge))<<8|(255&L.charCodeAt(++ge))<<16|(255&L.charCodeAt(++ge))<<24))+((1540483477*(te>>>16)&65535)<<16),me=1540483477*(65535&me)+((1540483477*(me>>>16)&65535)<<16)^(te=1540483477*(65535&(te^=te>>>24))+((1540483477*(te>>>16)&65535)<<16)),ue-=4,++ge;switch(ue){case 3:me^=(255&L.charCodeAt(ge+2))<<16;case 2:me^=(255&L.charCodeAt(ge+1))<<8;case 1:me=1540483477*(65535&(me^=255&L.charCodeAt(ge)))+((1540483477*(me>>>16)&65535)<<16)}return me=1540483477*(65535&(me^=me>>>13))+((1540483477*(me>>>16)&65535)<<16),(me^=me>>>15)>>>0}),Rn.exports);return ei.exports=R,ei.exports.murmur3=R,ei.exports.murmur2=d,ei.exports}(),Jn=n(In);class Ei{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(d,L,W,te){this.ids.push(so(d)),this.positions.push(L,W,te)}getPositions(d){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let L=so(d),W=0,te=this.ids.length-1;for(;W>1;this.ids[me]>=L?te=me:W=me+1}let ue=[];for(;this.ids[W]===L;)ue.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return ue}static serialize(d,L){let W=new Float64Array(d.ids),te=new Uint32Array(d.positions);return ti(W,te,0,W.length-1),L&&L.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(d){let L=new Ei;return L.ids=d.ids,L.positions=d.positions,L.indexed=!0,L}}function so(R){let d=+R;return!isNaN(d)&&d<=Number.MAX_SAFE_INTEGER?d:Jn(String(R))}function ti(R,d,L,W){for(;L>1],ue=L-1,me=W+1;for(;;){do ue++;while(R[ue]te);if(ue>=me)break;bi(R,ue,me),bi(d,3*ue,3*me),bi(d,3*ue+1,3*me+1),bi(d,3*ue+2,3*me+2)}me-L`u_${te}`),this.type=W}setUniform(d,L,W){d.set(W.constantOr(this.value))}getBinding(d,L,W){return this.type==="color"?new zs(d,L):new ro(d,L)}}class Zo{constructor(d,L){this.uniformNames=L.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(d,L){this.pixelRatioFrom=L.pixelRatio,this.pixelRatioTo=d.pixelRatio,this.patternFrom=L.tlbr,this.patternTo=d.tlbr}setConstantDashPositions(d,L){this.dashTo=[0,d.y,d.height,d.width],this.dashFrom=[0,L.y,L.height,L.width]}setUniform(d,L,W,te){let ue=null;te==="u_pattern_to"?ue=this.patternTo:te==="u_pattern_from"?ue=this.patternFrom:te==="u_dasharray_to"?ue=this.dashTo:te==="u_dasharray_from"?ue=this.dashFrom:te==="u_pixel_ratio_to"?ue=this.pixelRatioTo:te==="u_pixel_ratio_from"&&(ue=this.pixelRatioFrom),ue!==null&&d.set(ue)}getBinding(d,L,W){return W.startsWith("u_pattern")||W.startsWith("u_dasharray_")?new Mo(d,L):new ro(d,L)}}class es{constructor(d,L,W,te){this.expression=d,this.type=W,this.maxValue=0,this.paintVertexAttributes=L.map(ue=>({name:`a_${ue}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(d,L,W){let te=this.paintVertexArray.length,ue=this.expression.evaluate(new oi(0,W),L,{},W.canonical,[],W.formattedSection);this.paintVertexArray.resize(d),this._setPaintValue(te,d,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(0,ue),W,te);this._setPaintValue(d,L,me)}_setPaintValue(d,L,W){if(this.type==="color"){let te=So(W);for(let ue=d;ue`u_${ge}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=ue,this.maxValue=0,this.paintVertexAttributes=L.map(ge=>({name:`a_${ge}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new me}populatePaintArray(d,L,W){let te=this.expression.evaluate(new oi(this.zoom,W),L,{},W.canonical,[],W.formattedSection),ue=this.expression.evaluate(new oi(this.zoom+1,W),L,{},W.canonical,[],W.formattedSection),me=this.paintVertexArray.length;this.paintVertexArray.resize(d),this._setPaintValue(me,d,te,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(this.zoom,ue),W,te),ge=this.expression.evaluate(new oi(this.zoom+1,ue),W,te);this._setPaintValue(d,L,me,ge)}_setPaintValue(d,L,W,te){if(this.type==="color"){let ue=So(W),me=So(te);for(let ge=d;ge`#define HAS_UNIFORM_${te}`))}return d}getBinderAttributes(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof es||W instanceof $o)for(let te of W.paintVertexAttributes)d.push(te.name);else if(W instanceof _s){let te=W.getVertexAttributes();for(let ue of te)d.push(ue.name)}}return d}getBinderUniforms(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof Ws||W instanceof Zo||W instanceof $o)for(let te of W.uniformNames)d.push(te)}return d}getPaintVertexBuffers(){return this._buffers}getUniforms(d,L){let W=[];for(let te in this.binders){let ue=this.binders[te];if(ue instanceof Ws||ue instanceof Zo||ue instanceof $o){for(let me of ue.uniformNames)if(L[me]){let ge=ue.getBinding(d,L[me],me);W.push({name:me,property:te,binding:ge})}}}return W}setUniforms(d,L,W,te){for(let{name:ue,property:me,binding:ge}of L)this.binders[me].setUniform(ge,te,W.get(me),ue)}updatePaintBuffers(d){this._buffers=[];for(let L in this.binders){let W=this.binders[L];if(d&&W instanceof _s){let te=d.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof es||W instanceof $o)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(d){for(let L in this.binders){let W=this.binders[L];(W instanceof es||W instanceof $o||W instanceof _s)&&W.upload(d)}this.updatePaintBuffers()}destroy(){for(let d in this.binders){let L=this.binders[d];(L instanceof es||L instanceof $o||L instanceof _s)&&L.destroy()}}}class mo{constructor(d,L,W=()=>!0){this.programConfigurations={};for(let te of d)this.programConfigurations[te.id]=new Ll(te,L,W);this.needsUpload=!1,this._featureMap=new Ei,this._bufferOffset=0}populatePaintArrays(d,L,W,te){for(let ue in this.programConfigurations)this.programConfigurations[ue].populatePaintArrays(d,L,te);L.id!==void 0&&this._featureMap.add(L.id,W,this._bufferOffset,d),this._bufferOffset=d,this.needsUpload=!0}updatePaintArrays(d,L,W,te){for(let ue of W)this.needsUpload=this.programConfigurations[ue.id].updatePaintArrays(d,this._featureMap,L,ue,te)||this.needsUpload}get(d){return this.programConfigurations[d]}upload(d){if(this.needsUpload){for(let L in this.programConfigurations)this.programConfigurations[L].upload(d);this.needsUpload=!1}}destroy(){for(let d in this.programConfigurations)this.programConfigurations[d].destroy()}}function ru(R,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-dasharray":["dasharray_to","dasharray_from"],"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"]}[R]||[R.replace(`${d}-`,"").replace(/-/g,"_")]}function Rs(R,d,L){let W={color:{source:Vr,composite:N},number:{source:xi,composite:Vr}},te=function(ue){return{"line-pattern":{source:vr,composite:vr},"fill-pattern":{source:vr,composite:vr},"fill-extrusion-pattern":{source:vr,composite:vr},"line-dasharray":{source:Or,composite:Or}}[ue]}(R);return te?.[L]||W[d][L]}fi("ConstantBinder",Ws),fi("CrossFadedConstantBinder",Zo),fi("SourceExpressionBinder",es),fi("CrossFadedPatternBinder",Go),fi("CrossFadedDasharrayBinder",Ys),fi("CompositeExpressionBinder",$o),fi("ProgramConfiguration",Ll,{omit:["_buffers"]}),fi("ProgramConfigurationSet",mo);let Yu=Math.pow(2,14)-1,Ul=-Yu-1;function ql(R){let d=F/R.extent,L=R.loadGeometry();for(let W of L)for(let te of W){let ue=Math.round(te.x*d),me=Math.round(te.y*d);te.x=se(ue,Ul,Yu),te.y=se(me,Ul,Yu),(uete.x+1||mete.y+1)&&ee("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return L}function fo(R,d){return{type:R.type,id:R.id,properties:R.properties,geometry:d?ql(R):[]}}let Xo=-32768;function Os(R,d,L,W,te){R.emplaceBack(Xo+8*d+W,Xo+8*L+te)}class ra{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new Ut,this.indexArray=new ua,this.segments=new Fa,this.programConfigurations=new mo(d.layers,d.zoom),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){let te=this.layers[0],ue=[],me=null,ge=!1,Ce=te.type==="heatmap";if(te.type==="circle"){let Oe=te;me=Oe.layout.get("circle-sort-key"),ge=!me.isConstant(),Ce||(Ce=Oe.paint.get("circle-pitch-alignment")==="map")}let Te=Ce?L.subdivisionGranularity.circle:1;for(let{feature:Oe,id:Pe,index:it,sourceLayerIndex:He}of d){let bt=this.layers[0]._featureFilter.needGeometry,Et=fo(Oe,bt);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Et,W))continue;let Qt=ge?me.evaluate(Et,{},W):void 0,er={id:Pe,properties:Oe.properties,type:Oe.type,sourceLayerIndex:He,index:it,geometry:bt?Et.geometry:ql(Oe),patterns:{},sortKey:Qt};ue.push(er)}ge&&ue.sort((Oe,Pe)=>Oe.sortKey-Pe.sortKey);for(let Oe of ue){let{geometry:Pe,index:it,sourceLayerIndex:He}=Oe,bt=d[it].feature;this.addFeature(Oe,Pe,it,W,Te),L.featureIndex.insert(bt,Pe,it,He,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,da),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,L,W,te,ue=1){let me;switch(ue){case 1:me=[0,7];break;case 3:me=[0,2,5,7];break;case 5:me=[0,1,3,4,6,7];break;case 7:me=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${ue}; valid values are 1, 3, 5, 7.`)}let ge=me.length;for(let Ce of L)for(let Te of Ce){let Oe=Te.x,Pe=Te.y;if(Oe<0||Oe>=F||Pe<0||Pe>=F)continue;let it=this.segments.prepareSegment(ge*ge,this.layoutVertexArray,this.indexArray,d.sortKey),He=it.vertexLength;for(let bt=0;bt1){if(Is(R,d))return!0;for(let W of d)if(Wr(W,R,L))return!0}for(let W of R)if(Wr(W,d,L))return!0;return!1}function Is(R,d){if(R.length===0||d.length===0)return!1;for(let L=0;L1?L:L.sub(d)._mult(te)._add(d))}function pa(R,d){let L,W,te,ue=!1;for(let me of R){L=me;for(let ge=0,Ce=L.length-1;ged.y!=te.y>d.y&&d.x<(te.x-W.x)*(d.y-W.y)/(te.y-W.y)+W.x&&(ue=!ue)}return ue}function Wa(R,d){let L=!1;for(let W=0,te=R.length-1;Wd.y!=me.y>d.y&&d.x<(me.x-ue.x)*(d.y-ue.y)/(me.y-ue.y)+ue.x&&(L=!L)}return L}function ln(R,d,L){let W=L[0],te=L[2];if(R.xte.x&&d.x>te.x||R.yte.y&&d.y>te.y)return!1;let ue=ae(R,d,L[0]);return ue!==ae(R,d,L[1])||ue!==ae(R,d,L[2])||ue!==ae(R,d,L[3])}function Le(R,d,L){let W=d.paint.get(R).value;return W.kind==="constant"?W.value:L.programConfigurations.get(d.id).getMaxValue(R)}function Ue(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qe(R,d,L,W,te){if(!d[0]&&!d[1])return R;let ue=t.convert(d)._mult(te);L==="viewport"&&ue._rotate(-W);let me=[];for(let ge of R)me.push(ge.sub(ue));return me}function _t(R){let d=[];for(let L=0;LQa(sr,Qt,er,br))}(Te,ue,ge,Ce),bt=Oe),va({queryGeometry:He,size:bt,transform:ue,unwrappedTileID:ge,getElevation:Ce,pitchAlignment:it,pitchScale:Pe},te)}}class _n extends ra{}let Sn;fi("HeatmapBucket",_n,{omit:["layers"]});var Bn={get paint(){return Sn=Sn||new Ps({"heatmap-radius":new wi(ht.paint_heatmap["heatmap-radius"]),"heatmap-weight":new wi(ht.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new hi(ht.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tu(ht.paint_heatmap["heatmap-color"]),"heatmap-opacity":new hi(ht.paint_heatmap["heatmap-opacity"])})}};function Zn(R,{width:d,height:L},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==d*L*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${d*L*W}`)}else te=new Uint8Array(d*L*W);return R.width=d,R.height=L,R.data=te,R}function Ci(R,{width:d,height:L},W){if(d===R.width&&L===R.height)return;let te=Zn({},{width:d,height:L},W);qo(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,d),height:Math.min(R.height,L)},W),R.width=d,R.height=L,R.data=te.data}function qo(R,d,L,W,te,ue){if(te.width===0||te.height===0)return d;if(te.width>R.width||te.height>R.height||L.x>R.width-te.width||L.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>d.width||te.height>d.height||W.x>d.width-te.width||W.y>d.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let me=R.data,ge=d.data;if(me===ge)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{d[R.evaluationKey]=Ce;let Te=R.expression.evaluate(d);te.setPixel(me/4/L,ge/4,Te)};if(R.clips)for(let me=0,ge=0;methis.max&&(this.max=Pe),Pe=this.dim+1||L<-1||L>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${d}, y: ${L}, dim: ${this.dim}`);return(L+1)*this.stride+(d+1)}unpack(d,L,W){return d*this.redFactor+L*this.greenFactor+W*this.blueFactor-this.baseShift}pack(d){return gp(d,this.getUnpackVector())}getPixels(){return new ls({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(d,L,W){if(this.dim!==d.dim)throw new Error("dem dimension mismatch");let te=L*this.dim,ue=L*this.dim+this.dim,me=W*this.dim,ge=W*this.dim+this.dim;switch(L){case-1:te=ue-1;break;case 1:ue=te+1}switch(W){case-1:me=ge-1;break;case 1:ge=me+1}let Ce=-L*this.dim,Te=-W*this.dim;for(let Oe=me;Oe0)for(let me=d;me=d;me-=W)ue=m4(me/W|0,R[me],R[me+1],ue);return ue&&g0(ue,ue.next)&&(Ag(ue),ue=ue.next),ue}function Hd(R,d){if(!R)return R;d||(d=R);let L,W=R;do if(L=!1,W.steiner||!g0(W,W.next)&&Xu(W.prev,W,W.next)!==0)W=W.next;else{if(Ag(W),W=d=W.prev,W===W.next)break;L=!0}while(L||W!==d);return d}function _p(R,d,L,W,te,ue,me){if(!R)return;!me&&ue&&function(Ce,Te,Oe,Pe){let it=Ce;do it.z===0&&(it.z=t3(it.x,it.y,Te,Oe,Pe)),it.prevZ=it.prev,it.nextZ=it.next,it=it.next;while(it!==Ce);it.prevZ.nextZ=null,it.prevZ=null,function(He){let bt,Et=1;do{let Qt,er=He;He=null;let br=null;for(bt=0;er;){bt++;let sr=er,Mr=0;for(let $r=0;$r0||qr>0&&sr;)Mr!==0&&(qr===0||!sr||er.z<=sr.z)?(Qt=er,er=er.nextZ,Mr--):(Qt=sr,sr=sr.nextZ,qr--),br?br.nextZ=Qt:He=Qt,Qt.prevZ=br,br=Qt;er=sr}br.nextZ=null,Et*=2}while(bt>1)}(it)}(R,W,te,ue);let ge=R;for(;R.prev!==R.next;){let Ce=R.prev,Te=R.next;if(ue?GH(R,W,te,ue):bg(R))d.push(Ce.i,R.i,Te.i),Ag(R),R=Te.next,ge=Te.next;else if((R=Te)===ge){me?me===1?_p(R=HH(Hd(R),d),d,L,W,te,ue,2):me===2&&WH(R,d,L,W,te,ue):_p(Hd(R),d,L,W,te,ue,1);break}}}function bg(R){let d=R.prev,L=R,W=R.next;if(Xu(d,L,W)>=0)return!1;let te=d.x,ue=L.x,me=W.x,ge=d.y,Ce=L.y,Te=W.y,Oe=Math.min(te,ue,me),Pe=Math.min(ge,Ce,Te),it=Math.max(te,ue,me),He=Math.max(ge,Ce,Te),bt=W.next;for(;bt!==d;){if(bt.x>=Oe&&bt.x<=it&&bt.y>=Pe&&bt.y<=He&&wg(te,ge,ue,Ce,me,Te,bt.x,bt.y)&&Xu(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function GH(R,d,L,W){let te=R.prev,ue=R,me=R.next;if(Xu(te,ue,me)>=0)return!1;let ge=te.x,Ce=ue.x,Te=me.x,Oe=te.y,Pe=ue.y,it=me.y,He=Math.min(ge,Ce,Te),bt=Math.min(Oe,Pe,it),Et=Math.max(ge,Ce,Te),Qt=Math.max(Oe,Pe,it),er=t3(He,bt,d,L,W),br=t3(Et,Qt,d,L,W),sr=R.prevZ,Mr=R.nextZ;for(;sr&&sr.z>=er&&Mr&&Mr.z<=br;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0||(sr=sr.prevZ,Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0))return!1;Mr=Mr.nextZ}for(;sr&&sr.z>=er;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0)return!1;sr=sr.prevZ}for(;Mr&&Mr.z<=br;){if(Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0)return!1;Mr=Mr.nextZ}return!0}function HH(R,d){let L=R;do{let W=L.prev,te=L.next.next;!g0(W,te)&&p4(W,L,L.next,te)&&Tg(W,te)&&Tg(te,W)&&(d.push(W.i,L.i,te.i),Ag(L),Ag(L.next),L=R=te),L=L.next}while(L!==R);return Hd(L)}function WH(R,d,L,W,te,ue){let me=R;do{let ge=me.next.next;for(;ge!==me.prev;){if(me.i!==ge.i&&KH(me,ge)){let Ce=v4(me,ge);return me=Hd(me,me.next),Ce=Hd(Ce,Ce.next),_p(me,d,L,W,te,ue,0),void _p(Ce,d,L,W,te,ue,0)}ge=ge.next}me=me.next}while(me!==R)}function YH(R,d){let L=R.x-d.x;return L===0&&(L=R.y-d.y,L===0)&&(L=(R.next.y-R.y)/(R.next.x-R.x)-(d.next.y-d.y)/(d.next.x-d.x)),L}function XH(R,d){let L=function(te,ue){let me=ue,ge=te.x,Ce=te.y,Te,Oe=-1/0;if(g0(te,me))return me;do{if(g0(te,me.next))return me.next;if(Ce<=me.y&&Ce>=me.next.y&&me.next.y!==me.y){let Et=me.x+(Ce-me.y)*(me.next.x-me.x)/(me.next.y-me.y);if(Et<=ge&&Et>Oe&&(Oe=Et,Te=me.x=me.x&&me.x>=it&&ge!==me.x&&d4(CeTe.x||me.x===Te.x&&ZH(Te,me)))&&(Te=me,bt=Et)}me=me.next}while(me!==Pe);return Te}(R,d);if(!L)return d;let W=v4(L,R);return Hd(W,W.next),Hd(L,L.next)}function ZH(R,d){return Xu(R.prev,R,d.prev)<0&&Xu(d.next,R,R.next)<0}function t3(R,d,L,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-L)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-W)*te|0)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function $H(R){let d=R,L=R;do(d.x=(R-me)*(ue-ge)&&(R-me)*(W-ge)>=(L-me)*(d-ge)&&(L-me)*(ue-ge)>=(te-me)*(W-ge)}function wg(R,d,L,W,te,ue,me,ge){return!(R===me&&d===ge)&&d4(R,d,L,W,te,ue,me,ge)}function KH(R,d){return R.next.i!==d.i&&R.prev.i!==d.i&&!function(L,W){let te=L;do{if(te.i!==L.i&&te.next.i!==L.i&&te.i!==W.i&&te.next.i!==W.i&&p4(te,te.next,L,W))return!0;te=te.next}while(te!==L);return!1}(R,d)&&(Tg(R,d)&&Tg(d,R)&&function(L,W){let te=L,ue=!1,me=(L.x+W.x)/2,ge=(L.y+W.y)/2;do te.y>ge!=te.next.y>ge&&te.next.y!==te.y&&me<(te.next.x-te.x)*(ge-te.y)/(te.next.y-te.y)+te.x&&(ue=!ue),te=te.next;while(te!==L);return ue}(R,d)&&(Xu(R.prev,R,d.prev)||Xu(R,d.prev,d))||g0(R,d)&&Xu(R.prev,R,R.next)>0&&Xu(d.prev,d,d.next)>0)}function Xu(R,d,L){return(d.y-R.y)*(L.x-d.x)-(d.x-R.x)*(L.y-d.y)}function g0(R,d){return R.x===d.x&&R.y===d.y}function p4(R,d,L,W){let te=fy(Xu(R,d,L)),ue=fy(Xu(R,d,W)),me=fy(Xu(L,W,R)),ge=fy(Xu(L,W,d));return te!==ue&&me!==ge||!(te!==0||!cy(R,L,d))||!(ue!==0||!cy(R,W,d))||!(me!==0||!cy(L,R,W))||!(ge!==0||!cy(L,d,W))}function cy(R,d,L){return d.x<=Math.max(R.x,L.x)&&d.x>=Math.min(R.x,L.x)&&d.y<=Math.max(R.y,L.y)&&d.y>=Math.min(R.y,L.y)}function fy(R){return R>0?1:R<0?-1:0}function Tg(R,d){return Xu(R.prev,R,R.next)<0?Xu(R,d,R.next)>=0&&Xu(R,R.prev,d)>=0:Xu(R,d,R.prev)<0||Xu(R,R.next,d)<0}function v4(R,d){let L=r3(R.i,R.x,R.y),W=r3(d.i,d.x,d.y),te=R.next,ue=d.prev;return R.next=d,d.prev=R,L.next=te,te.prev=L,W.next=L,L.prev=W,ue.next=W,W.prev=ue,W}function m4(R,d,L,W){let te=r3(R,d,L);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ag(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function r3(R,d,L){return{i:R,x:d,y:L,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class y0{constructor(d,L){if(L>d)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=d,this._minGranularity=L}getGranularityForZoomLevel(d){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||L>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let W=0|Math.round(d),te=0|Math.round(L),ue=this._getKey(W,te);if(this._vertexDictionary.has(ue))return this._vertexDictionary.get(ue);let me=this._vertexBuffer.length/2;return this._vertexDictionary.set(ue,me),this._vertexBuffer.push(W,te),me}_subdivideTrianglesScanline(d){if(this._granularity<2)return function(te,ue){let me=[];for(let ge=0;ge0?(me.push(Ce),me.push(Oe),me.push(Te)):(me.push(Ce),me.push(Te),me.push(Oe))}return me}(this._vertexBuffer,d);let L=[],W=d.length;for(let te=0;te=1||qr<=0)||er&&(Teue)){Pe>=te&&Pe<=ue&&me.push(W[(ge+1)%3]);continue}!er&&Mr>0&&me.push(this._vertexToIndex(Ce+bt*Mr,Te+Et*Mr));let $r=Ce+bt*Math.max(Mr,0),_a=Ce+bt*Math.min(qr,1);Qt||this._generateIntraEdgeVertices(me,Ce,Te,Oe,Pe,$r,_a),!er&&qr<1&&me.push(this._vertexToIndex(Ce+bt*qr,Te+Et*qr)),(er||Pe>=te&&Pe<=ue)&&me.push(W[(ge+1)%3]),!er&&(Pe<=te||Pe>=ue)&&this._generateInterEdgeVertices(me,Ce,Te,Oe,Pe,it,He,_a,te,ue)}return me}_generateIntraEdgeVertices(d,L,W,te,ue,me,ge){let Ce=te-L,Te=ue-W,Oe=Te===0,Pe=Oe?Math.min(L,te):Math.min(me,ge),it=Oe?Math.max(L,te):Math.max(me,ge),He=Math.floor(Pe/this._granularityCellSize)+1,bt=Math.ceil(it/this._granularityCellSize)-1;if(Oe?L=He;Et--){let Qt=Et*this._granularityCellSize;d.push(this._vertexToIndex(Qt,W+Te*(Qt-L)/Ce))}}_generateInterEdgeVertices(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=ue-W,it=me-te,He=ge-ue,bt=(Te-ue)/He,Et=(Oe-ue)/He,Qt=Math.min(bt,Et),er=Math.max(bt,Et),br=te+it*Qt,sr=Math.floor(Math.min(br,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(br,Ce)/this._granularityCellSize)-1,qr=Ce=1||er<=0){let Ca=W-ge,nn=me+(L-me)*Math.min((Te-ge)/Ca,(Oe-ge)/Ca);sr=Math.floor(Math.min(nn,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(nn,Ce)/this._granularityCellSize)-1,qr=Ce0?Oe:Te;if(qr)for(let Ca=sr;Ca<=Mr;Ca++)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a));else for(let Ca=Mr;Ca>=sr;Ca--)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a))}_generateOutline(d){let L=[];for(let W of d){let te=Sv(W,this._granularity,!0),ue=this._pointArrayToIndices(te),me=[];for(let ge=1;geue!=(me===_0)?(d.push(L),d.push(W),d.push(this._vertexToIndex(te,me)),d.push(W),d.push(this._vertexToIndex(ue,me)),d.push(this._vertexToIndex(te,me))):(d.push(W),d.push(L),d.push(this._vertexToIndex(te,me)),d.push(this._vertexToIndex(ue,me)),d.push(W),d.push(this._vertexToIndex(te,me)))}_fillPoles(d,L,W){let te=this._vertexBuffer,ue=F,me=d.length;for(let ge=2;ge80*Pe){Qt=Te[0],er=Te[1];let sr=Qt,Mr=er;for(let qr=Pe;qrsr&&(sr=$r),_a>Mr&&(Mr=_a)}br=Math.max(sr-Qt,Mr-er),br=br!==0?32767/br:0}return _p(bt,Et,Pe,Qt,er,br,0),Et}(W,te),Ce=this._convertIndices(W,ge);ue=this._subdivideTrianglesScanline(Ce)}catch(ge){console.error(ge)}let me=[];return L&&(me=this._generateOutline(d)),this._ensureNoPoleVertices(),this._handlePoles(ue),{verticesFlattened:this._vertexBuffer,indicesTriangles:ue,indicesLineList:me}}_convertIndices(d,L){let W=[];for(let te of L)W.push(this._vertexToIndex(d[2*te],d[2*te+1]));return W}_pointArrayToIndices(d){let L=[];for(let W of d)L.push(this._vertexToIndex(W.x,W.y));return L}}function g4(R,d,L,W=!0){return new JH(L,d).subdividePolygonInternal(R,W)}function Sv(R,d,L=!1){if(!R||R.length<1)return[];if(R.length<2)return[];let W=R[0],te=R[R.length-1],ue=L&&(W.x!==te.x||W.y!==te.y);if(d<2)return ue?[...R,R[0]]:[...R];let me=Math.floor(F/d),ge=[];ge.push(new t(R[0].x,R[0].y));let Ce=R.length,Te=ue?Ce:Ce-1;for(let Oe=0;Oe0?(Math.floor(_a/me)+1)*me:(Math.ceil(_a/me)-1)*me,bn=Mr>0?(Math.floor(Ca/me)+1)*me:(Math.ceil(Ca/me)-1)*me,Fn=Math.abs(_a-qa),gn=Math.abs(Ca-bn),Va=Math.abs(_a-Et),Hn=Math.abs(Ca-Qt),ni=er?Fn/qr:Number.POSITIVE_INFINITY,Wn=br?gn/$r:Number.POSITIVE_INFINITY;if((Va<=Fn||!er)&&(Hn<=gn||!br))break;if(ni=0?me-1:ue-1,Te=(ge+1)%ue,Oe=R[2*d[Ce]],Pe=R[2*d[Te]],it=R[2*d[me]],He=R[2*d[me]+1],bt=R[2*d[ge]+1],Et=!1;if(OePe)Et=!1;else{let Qt=bt-He,er=-(R[2*d[ge]]-it),br=He((Pe-it)*Qt+(R[2*d[Te]+1]-He)*er)*br&&(Et=!0)}if(Et){let Qt=d[Ce],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),me--,me<0&&(me=ue-1)}else{let Qt=d[Te],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),ge++,ge>=ue&&(ge=0)}if(Ce===Te)break}}function y4(R,d,L,W,te,ue,me,ge,Ce){let Te=te.length/2,Oe=me&&ge&&Ce;if(TeFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,Fn=!0,qr=0);let gn=Sg(er,bt,Qt,br,_a,qa,Mr),Va=Sg(er,bt,Qt,br,Ca,bn,Mr),Hn=Sg(er,bt,Qt,br,nn,Fn,Mr);He.emplaceBack(qr+gn-sr,qr+Va-sr,qr+Hn-sr),Mr.primitiveLength++}})(d,L,W,te,ue,R),Oe&&function(Pe,it,He,bt,Et,Qt){let er=[];for(let $r=0;$rFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,qr=0);let Fn=Sg(er,bt,Qt,br,Ca,qa,Mr),gn=Sg(er,bt,Qt,br,nn,bn,Mr);He.emplaceBack(qr+Fn-sr,qr+gn-sr),Mr.primitiveLength++}}(me,L,ge,te,Ce,R),d.forceNewSegmentOnNextPrepare(),me?.forceNewSegmentOnNextPrepare()}function Sg(R,d,L,W,te,ue,me){if(ue){let ge=W.count;return L(d[2*te],d[2*te+1]),R[te]=W.count,W.count++,me.vertexLength++,ge}return R[te]}class a3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new ir,this.indexArray=new ua,this.indexArray2=new ia,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.segments2=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("fill",this.layers,L);let te=this.layers[0].layout.get("fill-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W,L.availableImages):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;if(this.hasDependencies){let Pe=v0("fill",this.layers,ge,{zoom:this.zoom},L);this.patternFeatures.push(Pe)}else this.addFeature(ge,Ce,Te,W,{},L.subdivisionGranularity);L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}addFeatures(d,L,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,L,W,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,p0),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,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce=g4(ge,te,me.fill.getGranularityForZoomLevel(te.z)),Te=this.layoutVertexArray;y4((Oe,Pe)=>{Te.emplaceBack(Oe,Pe)},this.segments,this.layoutVertexArray,this.indexArray,Ce.verticesFlattened,Ce.indicesTriangles,this.segments2,this.indexArray2,Ce.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,canonical:te})}}let _4,x4;fi("FillBucket",a3,{omit:["layers","patternFeatures"]});var eW={get paint(){return x4=x4||new Ps({"fill-antialias":new hi(ht.paint_fill["fill-antialias"]),"fill-opacity":new wi(ht.paint_fill["fill-opacity"]),"fill-color":new wi(ht.paint_fill["fill-color"]),"fill-outline-color":new wi(ht.paint_fill["fill-outline-color"]),"fill-translate":new hi(ht.paint_fill["fill-translate"]),"fill-translate-anchor":new hi(ht.paint_fill["fill-translate-anchor"]),"fill-pattern":new sl(ht.paint_fill["fill-pattern"])})},get layout(){return _4=_4||new Ps({"fill-sort-key":new wi(ht.layout_fill["fill-sort-key"])})}};class tW extends ll{constructor(d,L){super(d,eW,L)}recalculate(d,L){super.recalculate(d,L);let W=this.paint._values["fill-outline-color"];W.value.kind==="constant"&&W.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new a3(d)}queryRadius(){return Ue(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:d,geometry:L,transform:W,pixelsToTileUnits:te}){return Bi(Qe(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-W.bearingInRadians,te),L)}isTileClipped(){return!0}}let rW=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),aW=ct([{name:"a_centroid",components:2,type:"Int16"}],4),{members:nW}=rW;class Eg{constructor(d,L,W,te,ue){this.properties={},this.extent=W,this.type=0,this.id=void 0,this._pbf=d,this._geometry=-1,this._keys=te,this._values=ue,d.readFields(iW,this,L)}loadGeometry(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=[],te,ue=1,me=0,ge=0,Ce=0;for(;d.pos>3}if(me--,ue===1||ue===2)ge+=d.readSVarint(),Ce+=d.readSVarint(),ue===1&&(te&&W.push(te),te=[]),te&&te.push(new t(ge,Ce));else{if(ue!==7)throw new Error(`unknown command ${ue}`);te&&te.push(te[0].clone())}}return te&&W.push(te),W}bbox(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=1,te=0,ue=0,me=0,ge=1/0,Ce=-1/0,Te=1/0,Oe=-1/0;for(;d.pos>3}if(te--,W===1||W===2)ue+=d.readSVarint(),me+=d.readSVarint(),ueCe&&(Ce=ue),meOe&&(Oe=me);else if(W!==7)throw new Error(`unknown command ${W}`)}return[ge,Te,Ce,Oe]}toGeoJSON(d,L,W){let te=this.extent*Math.pow(2,W),ue=this.extent*d,me=this.extent*L,ge=this.loadGeometry();function Ce(it){return[360*(it.x+ue)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(it.y+me)/te)*Math.PI))-90]}function Te(it){return it.map(Ce)}let Oe;if(this.type===1){let it=[];for(let bt of ge)it.push(bt[0]);let He=Te(it);Oe=it.length===1?{type:"Point",coordinates:He[0]}:{type:"MultiPoint",coordinates:He}}else if(this.type===2){let it=ge.map(Te);Oe=it.length===1?{type:"LineString",coordinates:it[0]}:{type:"MultiLineString",coordinates:it}}else{if(this.type!==3)throw new Error("unknown feature type");{let it=b4(ge),He=[];for(let bt of it)He.push(bt.map(Te));Oe=He.length===1?{type:"Polygon",coordinates:He[0]}:{type:"MultiPolygon",coordinates:He}}}let Pe={type:"Feature",geometry:Oe,properties:this.properties};return this.id!=null&&(Pe.id=this.id),Pe}}function iW(R,d,L){R===1?d.id=L.readVarint():R===2?function(W,te){let ue=W.readVarint()+W.pos;for(;W.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];let L=this._pbf.readVarint()+this._pbf.pos;return new Eg(this._pbf,L,this.extent,this._keys,this._values)}}function lW(R,d,L){R===15?d.version=L.readVarint():R===1?d.name=L.readString():R===5?d.extent=L.readVarint():R===2?d._features.push(L.pos):R===3?d._keys.push(L.readString()):R===4&&d._values.push(function(W){let te=null,ue=W.readVarint()+W.pos;for(;W.pos>3;te=me===1?W.readString():me===2?W.readFloat():me===3?W.readDouble():me===4?W.readVarint64():me===5?W.readVarint():me===6?W.readSVarint():me===7?W.readBoolean():null}if(te==null)throw new Error("unknown feature value");return te}(L))}class w4{constructor(d,L){this.layers=d.readFields(uW,{},L)}}function uW(R,d,L){if(R===3){let W=new sW(L,L.readVarint()+L.pos);W.length&&(d[W.name]=W)}}let n3=Math.pow(2,13);function kg(R,d,L,W,te,ue,me,ge){R.emplaceBack(d,L,2*Math.floor(W*n3)+me,te*n3*2,ue*n3*2,Math.round(ge))}class i3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new dr,this.centroidVertexArray=new It,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.features=[],this.hasDependencies=Md("fill-extrusion",this.layers,L);for(let{feature:te,id:ue,index:me,sourceLayerIndex:ge}of d){let Ce=this.layers[0]._featureFilter.needGeometry,Te=fo(te,Ce);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Te,W))continue;let Oe={id:ue,sourceLayerIndex:ge,index:me,geometry:Ce?Te.geometry:ql(te),properties:te.properties,type:te.type,patterns:{}};this.hasDependencies?this.features.push(v0("fill-extrusion",this.layers,Oe,{zoom:this.zoom},L)):this.addFeature(Oe,Oe.geometry,me,W,{},L.subdivisionGranularity),L.featureIndex.insert(te,Oe.geometry,me,ge,this.index,!0)}}addFeatures(d,L,W){for(let te of this.features){let{geometry:ue}=te;this.addFeature(te,ue,te.index,L,W,d.subdivisionGranularity)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}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,nW),this.centroidVertexBuffer=d.createVertexBuffer(this.centroidVertexArray,aW.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,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce={x:0,y:0,sampleCount:0},Te=this.layoutVertexArray.length;this.processPolygon(Ce,te,d,ge,me);let Oe=this.layoutVertexArray.length-Te,Pe=Math.floor(Ce.x/Ce.sampleCount),it=Math.floor(Ce.y/Ce.sampleCount);for(let He=0;He{kg(Oe,Pe,it,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,Te.verticesFlattened,Te.indicesTriangles)}_generateSideFaces(d,L){let W=0;for(let te=1;teFa.MAX_VERTEX_ARRAY_LENGTH&&(L.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let ge=ue.sub(me)._perp()._unit(),Ce=me.dist(ue);W+Ce>32768&&(W=0),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,1,W),W+=Ce,kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,1,W);let Te=L.segment.vertexLength;this.indexArray.emplaceBack(Te,Te+2,Te+1),this.indexArray.emplaceBack(Te+1,Te+2,Te+3),L.segment.vertexLength+=4,L.segment.primitiveLength+=2}}}function cW(R,d){for(let L=0;LF)||R.y===d.y&&(R.y<0||R.y>F)}function T4(R){return R.every(d=>d.x<0)||R.every(d=>d.x>F)||R.every(d=>d.y<0)||R.every(d=>d.y>F)}let A4;fi("FillExtrusionBucket",i3,{omit:["layers","features"]});var hW={get paint(){return A4=A4||new Ps({"fill-extrusion-opacity":new hi(ht["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new wi(ht["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new sl(ht["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new wi(ht["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new wi(ht["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new hi(ht["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class dW extends ll{constructor(d,L){super(d,hW,L)}createBucket(d){return new i3(d)}queryRadius(){return Ue(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me,pixelPosMatrix:ge}){let Ce=Qe(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-ue.bearingInRadians,me),Te=this.paint.get("fill-extrusion-height").evaluate(L,W),Oe=this.paint.get("fill-extrusion-base").evaluate(L,W),Pe=function(He,bt){let Et=[];for(let Qt of He){let er=[Qt.x,Qt.y,0,1];z(er,er,bt),Et.push(new t(er[0]/er[3],er[1]/er[3]))}return Et}(Ce,ge),it=function(He,bt,Et,Qt){let er=[],br=[],sr=Qt[8]*bt,Mr=Qt[9]*bt,qr=Qt[10]*bt,$r=Qt[11]*bt,_a=Qt[8]*Et,Ca=Qt[9]*Et,nn=Qt[10]*Et,qa=Qt[11]*Et;for(let bn of He){let Fn=[],gn=[];for(let Va of bn){let Hn=Va.x,ni=Va.y,Wn=Qt[0]*Hn+Qt[4]*ni+Qt[12],si=Qt[1]*Hn+Qt[5]*ni+Qt[13],po=Qt[2]*Hn+Qt[6]*ni+Qt[14],cs=Qt[3]*Hn+Qt[7]*ni+Qt[15],Ds=po+qr,Xs=cs+$r,Mf=Wn+_a,vu=si+Ca,yc=po+nn,Dc=cs+qa,Hl=new t((Wn+sr)/Xs,(si+Mr)/Xs);Hl.z=Ds/Xs,Fn.push(Hl);let rf=new t(Mf/Dc,vu/Dc);rf.z=yc/Dc,gn.push(rf)}er.push(Fn),br.push(gn)}return[er,br]}(te,Oe,Te,ge);return function(He,bt,Et){let Qt=1/0;Bi(Et,bt)&&(Qt=M4(Et,bt[0]));for(let er=0;er>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let ue=S4[15&W];if(!ue)throw new Error("Unrecognized array type.");let[me]=new Uint16Array(d,2,1),[ge]=new Uint32Array(d,4,1);return new dy(ge,me,ue,d)}constructor(d,L=64,W=Float64Array,te){if(isNaN(d)||d<0)throw new Error(`Unpexpected numItems value: ${d}.`);this.numItems=+d,this.nodeSize=Math.min(Math.max(+L,2),65535),this.ArrayType=W,this.IndexArrayType=d<65536?Uint16Array:Uint32Array;let ue=S4.indexOf(this.ArrayType),me=2*d*this.ArrayType.BYTES_PER_ELEMENT,ge=d*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-ge%8)%8;if(ue<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=2*d,this._finished=!0):(this.data=new ArrayBuffer(8+me+ge+Ce),this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ue]),new Uint16Array(this.data,2,1)[0]=L,new Uint32Array(this.data,4,1)[0]=d)}add(d,L){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=d,this.coords[this._pos++]=L,W}finish(){let d=this._pos>>1;if(d!==this.numItems)throw new Error(`Added ${d} items when expected ${this.numItems}.`);return o3(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(d,L,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ue,coords:me,nodeSize:ge}=this,Ce=[0,ue.length-1,0],Te=[];for(;Ce.length;){let Oe=Ce.pop()||0,Pe=Ce.pop()||0,it=Ce.pop()||0;if(Pe-it<=ge){for(let Qt=it;Qt<=Pe;Qt++){let er=me[2*Qt],br=me[2*Qt+1];er>=d&&er<=W&&br>=L&&br<=te&&Te.push(ue[Qt])}continue}let He=it+Pe>>1,bt=me[2*He],Et=me[2*He+1];bt>=d&&bt<=W&&Et>=L&&Et<=te&&Te.push(ue[He]),(Oe===0?d<=bt:L<=Et)&&(Ce.push(it),Ce.push(He-1),Ce.push(1-Oe)),(Oe===0?W>=bt:te>=Et)&&(Ce.push(He+1),Ce.push(Pe),Ce.push(1-Oe))}return Te}within(d,L,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:ue,nodeSize:me}=this,ge=[0,te.length-1,0],Ce=[],Te=W*W;for(;ge.length;){let Oe=ge.pop()||0,Pe=ge.pop()||0,it=ge.pop()||0;if(Pe-it<=me){for(let Qt=it;Qt<=Pe;Qt++)k4(ue[2*Qt],ue[2*Qt+1],d,L)<=Te&&Ce.push(te[Qt]);continue}let He=it+Pe>>1,bt=ue[2*He],Et=ue[2*He+1];k4(bt,Et,d,L)<=Te&&Ce.push(te[He]),(Oe===0?d-W<=bt:L-W<=Et)&&(ge.push(it),ge.push(He-1),ge.push(1-Oe)),(Oe===0?d+W>=bt:L+W>=Et)&&(ge.push(He+1),ge.push(Pe),ge.push(1-Oe))}return Ce}}function o3(R,d,L,W,te,ue){if(te-W<=L)return;let me=W+te>>1;E4(R,d,me,W,te,ue),o3(R,d,L,W,me-1,1-ue),o3(R,d,L,me+1,te,1-ue)}function E4(R,d,L,W,te,ue){for(;te>W;){if(te-W>600){let Te=te-W+1,Oe=L-W+1,Pe=Math.log(Te),it=.5*Math.exp(2*Pe/3),He=.5*Math.sqrt(Pe*it*(Te-it)/Te)*(Oe-Te/2<0?-1:1);E4(R,d,L,Math.max(W,Math.floor(L-Oe*it/Te+He)),Math.min(te,Math.floor(L+(Te-Oe)*it/Te+He)),ue)}let me=d[2*L+ue],ge=W,Ce=te;for(Lg(R,d,W,L),d[2*te+ue]>me&&Lg(R,d,W,te);geme;)Ce--}d[2*W+ue]===me?Lg(R,d,W,Ce):(Ce++,Lg(R,d,Ce,te)),Ce<=L&&(W=Ce+1),L<=Ce&&(te=Ce-1)}}function Lg(R,d,L,W){s3(R,L,W),s3(d,2*L,2*W),s3(d,2*L+1,2*W+1)}function s3(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function k4(R,d,L,W){let te=R-L,ue=d-W;return te*te+ue*ue}function l3(R,d,L,W){let te=W,ue=d+(L-d>>1),me,ge=L-d,Ce=R[d],Te=R[d+1],Oe=R[L],Pe=R[L+1];for(let it=d+3;itte)me=it,te=He;else if(He===te){let bt=Math.abs(it-ue);btW&&(me-d>3&&l3(R,d,me,W),R[me+2]=te,L-me>3&&l3(R,me,L,W))}function pW(R,d,L,W,te,ue){let me=te-L,ge=ue-W;if(me!==0||ge!==0){let Ce=((R-L)*me+(d-W)*ge)/(me*me+ge*ge);Ce>1?(L=te,W=ue):Ce>0&&(L+=me*Ce,W+=ge*Ce)}return me=R-L,ge=d-W,me*me+ge*ge}function tf(R,d,L,W){let te={type:d,geom:L},ue={id:R??null,type:te.type,geometry:te.geom,tags:W,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(te.type){case"Point":case"MultiPoint":Pg(ue,te.geom);break;case"LineString":Pg(ue,te.geom.points);break;case"Polygon":Pg(ue,te.geom[0].points);break;case"MultiLineString":for(let me of te.geom)Pg(ue,me.points);break;case"MultiPolygon":for(let me of te.geom)Pg(ue,me[0].points)}return ue}function u3(R){R.points.length>64&&(R.points=new Float64Array(R.points))}function Pg(R,d){for(let L=0;L0&&(me+=W?(te*Oe-Te*ue)/2:Math.sqrt(Math.pow(Te-te,2)+Math.pow(Oe-ue,2))),te=Te,ue=Oe}let ge=d.points.length-3;d.points[2]=1,L>0&&l3(d.points,0,ge,L),d.points[ge+2]=1,u3(d),d.size=Math.abs(me),d.start=0,d.end=d.size}function h3(R,d,L,W){for(let te=0;te1?1:L}function vy(R){let d={type:"Feature",geometry:vW(R),properties:R.tags};return R.id!=null&&(d.id=R.id),d}function vW(R){let{type:d,geometry:L}=R;switch(d){case"Point":return{type:d,coordinates:C4(L[0],L[1])};case"MultiPoint":return{type:d,coordinates:my(L)};case"LineString":return{type:d,coordinates:my(L.points)};case"MultiLineString":case"Polygon":return{type:d,coordinates:L.map(W=>my(W.points))};case"MultiPolygon":return{type:d,coordinates:L.map(W=>W.map(te=>my(te.points)))}}}function my(R){let d=[];for(let L=0;L=(L/=d)&&me=W)return null;let Ce=[];for(let Te of R){let Oe=te===Wf.X?Te.minX:Te.minY,Pe=te===Wf.X?Te.maxX:Te.maxY;if(Oe>=L&&Pe=W))switch(Te.type){case"Point":case"MultiPoint":mW(Te,Ce,L,W,te);continue;case"LineString":gW(Te,Ce,L,W,te,ge);continue;case"MultiLineString":yW(Te,Ce,L,W,te);continue;case"Polygon":_W(Te,Ce,L,W,te);continue;case"MultiPolygon":xW(Te,Ce,L,W,te);continue}}return Ce.length?Ce:null}function mW(R,d,L,W,te){let ue=[];(function(me,ge,Ce,Te,Oe){for(let Pe=0;Pe=Ce&&it<=Te&&w0(ge,me[Pe],me[Pe+1],me[Pe+2])}})(R.geometry,ue,L,W,te),ue.length&&d.push(tf(R.id,ue.length===3?"Point":"MultiPoint",ue,R.tags))}function gW(R,d,L,W,te,ue){let me=[];if(R4(R.geometry,me,L,W,te,!1,ue.lineMetrics),me.length)if(ue.lineMetrics)for(let ge of me)d.push(tf(R.id,"LineString",ge,R.tags));else d.push(me.length>1?tf(R.id,"MultiLineString",me,R.tags):tf(R.id,"LineString",me[0],R.tags))}function yW(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!1),ue.length&&d.push(ue.length!==1?tf(R.id,"MultiLineString",ue,R.tags):tf(R.id,"LineString",ue[0],R.tags))}function _W(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!0),ue.length&&d.push(tf(R.id,"Polygon",ue,R.tags))}function xW(R,d,L,W,te){let ue=[];for(let me of R.geometry){let ge=[];d3(me,ge,L,W,te,!0),ge.length&&ue.push(ge)}ue.length&&d.push(tf(R.id,"MultiPolygon",ue,R.tags))}function R4(R,d,L,W,te,ue,me){let ge=I4(R),Ce=te===Wf.X?bW:wW,Te,Oe,Pe=R.start;for(let Qt=0;QtL&&(Oe=Ce(ge,er,br,Mr,qr,L),me&&(ge.start=Pe+Te*Oe)):$r>W?_a=L&&(Oe=Ce(ge,er,br,Mr,qr,L),Ca=!0),_a>W&&$r<=W&&(Oe=Ce(ge,er,br,Mr,qr,W),Ca=!0),!ue&&Ca&&(me&&(ge.end=Pe+Te*Oe),d.push(ge),ge=I4(R)),me&&(Pe+=Te)}let it=R.points.length-3,He=R.points[it],bt=R.points[it+1],Et=te===Wf.X?He:bt;Et>=L&&Et<=W&&w0(ge.points,He,bt,R.points[it+2]),it=ge.points.length-3,ue&&it>=3&&(ge.points[it]!==ge.points[0]||ge.points[it+1]!==ge.points[1])&&w0(ge.points,ge.points[0],ge.points[1],ge.points[2]),ge.points.length&&(u3(ge),d.push(ge))}function I4(R){return{points:[],size:R.size,start:R.start,end:R.end}}function d3(R,d,L,W,te,ue){for(let me of R)R4(me,d,L,W,te,ue,!1)}function w0(R,d,L,W){R.push(d,L,W)}function bW(R,d,L,W,te,ue){let me=(ue-d)/(W-d);return w0(R.points,ue,L+(te-L)*me,1),me}function wW(R,d,L,W,te,ue){let me=(ue-L)/(te-L);return w0(R.points,d+(W-d)*me,ue,1),me}function p3(R,d){let L=d.buffer/d.extent,W=R,te=Wd(R,1,-1-L,L,Wf.X,-1,2,d),ue=Wd(R,1,1-L,2+L,Wf.X,-1,2,d);return(te||ue)&&(W=Wd(R,1,-L,1+L,Wf.X,-1,2,d)||[],te&&(W=D4(te,1).concat(W)),ue&&(W=W.concat(D4(ue,-1)))),W}function D4(R,d){let L=[];for(let W of R)switch(W.type){case"Point":case"MultiPoint":{let te=TW(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"LineString":{let te=v3(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiLineString":case"Polygon":{let te=[];for(let ue of W.geometry)te.push(v3(ue,d));L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiPolygon":{let te=[];for(let ue of W.geometry){let me=[];for(let ge of ue)me.push(v3(ge,d));te.push(me)}L.push(tf(W.id,W.type,te,W.tags));continue}}return L}function TW(R,d){let L=[];for(let W=0;W0||((te=d.addOrUpdateProperties)==null?void 0:te.length)>0;if(ue){let ge=R[0],Ce=c3({type:"FeatureCollection",features:[{type:"Feature",id:ge.id,geometry:d.newGeometry,properties:me?F4(ge.tags,d):ge.tags}]},L);return Ce=p3(Ce,L),Ce}if(me){let ge=[];for(let Ce of R){let Te=Li({},Ce);Te.tags=F4(Te.tags,d),ge.push(Te)}return ge}return R}function F4(R,d){if(d.removeAllProperties)return{};let L=Li({},R||{});if(d.removeProperties)for(let W of d.removeProperties)delete L[W];if(d.addOrUpdateProperties)for(let{key:W,value:te}of d.addOrUpdateProperties)L[W]=te;return L}(function(R){R[R.X=0]="X",R[R.Y=1]="Y"})(Wf||(Wf={}));let m3={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:R=>R};class MW{constructor(d){this.options=Object.assign(Object.create(m3),d),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(d){let L=[];for(let W of d){if(!W.geometry)continue;let[te,ue]=W.geometry.coordinates,[me,ge]=[x0(te),b0(ue)];L.push({id:W.id,type:"Point",geometry:[me,ge],tags:W.properties})}this.createIndex(L)}initialize(d){let L=[];for(let W of d)W.type==="Point"&&L.push(W);this.createIndex(L)}updateIndex(d,L,W){this.options=Object.assign(Object.create(m3),W.clusterOptions),this.initialize(d)}createIndex(d){let{log:L,minZoom:W,maxZoom:te}=this.options;L&&console.time("total time");let ue=`prepare ${d.length} points`;L&&console.time(ue),this.points=d;let me=[];for(let Ce=0;Ce=W;Ce--){let Te=Date.now();ge=this.trees[Ce]=this.createTree(this.cluster(ge,Ce)),L&&console.log("z%d: %d clusters in %dms",Ce,ge.numItems,Date.now()-Te)}L&&console.timeEnd("total time")}getClusters(d,L){return this.getClustersInternal(d,L).map(W=>vy(W))}getClustersInternal(d,L){let W=((d[0]+180)%360+360)%360-180,te=Math.max(-90,Math.min(90,d[1])),ue=d[2]===180?180:((d[2]+180)%360+360)%360-180,me=Math.max(-90,Math.min(90,d[3]));if(d[2]-d[0]>=360)W=-180,ue=180;else if(W>ue){let Pe=this.getClustersInternal([W,te,180,me],L),it=this.getClustersInternal([-180,te,ue,me],L);return Pe.concat(it)}let ge=this.trees[this.limitZoom(L)],Ce=ge.range(x0(W),b0(me),x0(ue),b0(te)),Te=ge.flatData,Oe=[];for(let Pe of Ce){let it=this.stride*Pe;Oe.push(Te[it+5]>1?SW(Te,it,this.clusterProps):this.points[Te[it+3]])}return Oe}getChildren(d){let L=this.getOriginId(d),W=this.getOriginZoom(d),te=new Error("No cluster with the specified id: "+d),ue=this.trees[W];if(!ue)throw te;let me=ue.flatData;if(L*this.stride>=me.length)throw te;let ge=this.options.radius/(this.options.extent*Math.pow(2,W-1)),Ce=ue.within(me[L*this.stride],me[L*this.stride+1],ge),Te=[];for(let Oe of Ce){let Pe=Oe*this.stride;me[Pe+4]===d&&Te.push(me[Pe+5]>1?EW(me,Pe,this.clusterProps):vy(this.points[me[Pe+3]]))}if(Te.length===0)throw te;return Te}getLeaves(d,L,W){let te=[];return this.appendLeaves(te,d,L=L||10,W=W||0,0),te}getTile(d,L,W){let te=this.trees[this.limitZoom(d)];if(!te)return null;let ue=Math.pow(2,d),{extent:me,radius:ge}=this.options,Ce=ge/me,Te=(W-Ce)/ue,Oe=(W+1+Ce)/ue,Pe={transformed:!0,features:[],source:null,x:L,y:W,z:d};return this.addTileFeatures(te.range((L-Ce)/ue,Te,(L+1+Ce)/ue,Oe),te.flatData,L,W,ue,Pe),L===0&&this.addTileFeatures(te.range(1-Ce/ue,Te,1,Oe),te.flatData,ue,W,ue,Pe),L===ue-1&&this.addTileFeatures(te.range(0,Te,Ce/ue,Oe),te.flatData,-1,W,ue,Pe),Pe}getClusterExpansionZoom(d){return this.getOriginZoom(d)}appendLeaves(d,L,W,te,ue){let me=this.getChildren(L);for(let ge of me){let Ce=ge.properties;if(Ce?.cluster?ue+Ce.point_count<=te?ue+=Ce.point_count:ue=this.appendLeaves(d,Ce.cluster_id,W,te,ue):ue1,Oe,Pe,it;if(Te)Oe=g3(L,Ce,this.clusterProps),Pe=L[Ce],it=L[Ce+1];else{let Et=this.points[L[Ce+3]];Oe=Et.tags,[Pe,it]=Et.geometry}let He={type:1,geometry:[[Math.round(this.options.extent*(Pe*ue-W)),Math.round(this.options.extent*(it*ue-te))]],tags:Oe},bt;bt=Te||this.options.generateId?L[Ce+3]:this.points[L[Ce+3]].id,bt!==void 0&&(He.id=bt),me.features.push(He)}}limitZoom(d){return Math.max(this.options.minZoom,Math.min(Math.floor(+d),this.options.maxZoom+1))}cluster(d,L){let{radius:W,extent:te,reduce:ue,minPoints:me}=this.options,ge=W/(te*Math.pow(2,L)),Ce=d.flatData,Te=[],Oe=this.stride;for(let Pe=0;PeL&&(Qt+=Ce[br+5])}if(Qt>Et&&Qt>=me){let er,br=it*Et,sr=He*Et,Mr=-1,qr=(Pe/Oe<<5)+(L+1)+this.points.length;for(let $r of bt){let _a=$r*Oe;if(Ce[_a+2]<=L)continue;Ce[_a+2]=L;let Ca=Ce[_a+5];br+=Ce[_a]*Ca,sr+=Ce[_a+1]*Ca,Ce[_a+4]=qr,ue&&(er||(er=this.map(Ce,Pe,!0),Mr=this.clusterProps.length,this.clusterProps.push(er)),ue(er,this.map(Ce,_a)))}Ce[Pe+4]=qr,Te.push(br/Qt,sr/Qt,1/0,qr,-1,Qt),ue&&Te.push(Mr)}else{for(let er=0;er1)for(let er of bt){let br=er*Oe;if(!(Ce[br+2]<=L)){Ce[br+2]=L;for(let sr=0;sr>5}getOriginZoom(d){return(d-this.points.length)%32}map(d,L,W){if(d[L+5]>1){let me=this.clusterProps[d[L+6]];return W?Object.assign({},me):me}let te=this.points[d[L+3]].tags,ue=this.options.map(te);return W&&ue===te?Object.assign({},ue):ue}}function SW(R,d,L){return{id:R[d+3],type:"Point",tags:g3(R,d,L),geometry:[R[d],R[d+1]]}}function EW(R,d,L){return{type:"Feature",id:R[d+3],properties:g3(R,d,L),geometry:{type:"Point",coordinates:[L4(R[d]),P4(R[d+1])]}}}function g3(R,d,L){let W=R[d+5],te=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W,ue=R[d+6],me=ue===-1?{}:Object.assign({},L[ue]);return Object.assign(me,{cluster:!0,cluster_id:R[d+3],point_count:W,point_count_abbreviated:te})}let y3="geojsonvt_clip_start",_3="geojsonvt_clip_end";function z4(R,d,L,W,te){let ue=d===te.maxZoom?0:te.tolerance/((1<0&&d.size<(te?me:W))return void(L.numPoints+=d.points.length/3);let ge=[];for(let Ce=0;Ceme)&&(L.numSimplified++,ge.push(d.points[Ce],d.points[Ce+1])),L.numPoints++;te&&function(Ce,Te){let Oe=0;for(let Pe=0,it=Ce.length,He=it-2;Pe0===Te)for(let Pe=0,it=Ce.length;Pe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(L),W.debug>1&&console.timeEnd("invalidating");let[te,ue,me]=[0,0,0],ge=z4(d,te,ue,me,W);ge.source=d;let Ce=gy(te,ue,me);if(this.tiles[Ce]=ge,this.tileCoords.push({z:te,x:ue,y:me,id:Ce}),W.debug){let Te=`z${te}`;this.stats[Te]=(this.stats[Te]||0)+1,this.total++}}getClusterExpansionZoom(d){return null}getChildren(d){return null}getLeaves(d,L,W){return null}getTile(d,L,W){let{extent:te,debug:ue}=this.options,me=1<1&&console.log("drilling down to z%d-%d-%d",d,L,W);let Ce,Te=d,Oe=L,Pe=W;for(;!Ce&&Te>0;)Te--,Oe>>=1,Pe>>=1,Ce=this.tiles[gy(Te,Oe,Pe)];return Ce?.source?(ue>1&&(console.log("found parent tile z%d-%d-%d",Te,Oe,Pe),console.time("drilling down")),this.splitTile(Ce.source,Te,Oe,Pe,d,L,W),ue>1&&console.timeEnd("drilling down"),this.tiles[ge]?B4(this.tiles[ge],te):null):null}splitTile(d,L,W,te,ue,me,ge){let Ce=[d,L,W,te],Te=this.options,Oe=Te.debug;for(;Ce.length;){te=Ce.pop(),W=Ce.pop(),L=Ce.pop(),d=Ce.pop();let Pe=1<1&&console.time("creation"),He=this.tiles[it]=z4(d,L,W,te,Te),this.tileCoords.push({z:L,x:W,y:te,id:it}),Oe)){Oe>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,W,te,He.numFeatures,He.numPoints,He.numSimplified),console.timeEnd("creation"));let Ca=`z${L}`;this.stats[Ca]=(this.stats[Ca]||0)+1,this.total++}if(He.source=d,ue==null){if(L===Te.indexMaxZoom||He.numPoints<=Te.indexMaxPoints)continue}else{if(L===Te.maxZoom||L===ue)continue;if(ue!=null){let Ca=ue-L;if(W!==me>>Ca||te!==ge>>Ca)continue}}if(He.source=null,!d.length)continue;Oe>1&&console.time("clipping");let bt=.5*Te.buffer/Te.extent,Et=.5-bt,Qt=.5+bt,er=1+bt,br=null,sr=null,Mr=null,qr=null,$r=Wd(d,Pe,W-bt,W+Qt,Wf.X,He.minX,He.maxX,Te),_a=Wd(d,Pe,W+Et,W+er,Wf.X,He.minX,He.maxX,Te);$r&&(br=Wd($r,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),sr=Wd($r,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),_a&&(Mr=Wd(_a,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),qr=Wd(_a,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),Oe>1&&console.timeEnd("clipping"),Ce.push(br||[],L+1,2*W,2*te),Ce.push(sr||[],L+1,2*W,2*te+1),Ce.push(Mr||[],L+1,2*W+1,2*te),Ce.push(qr||[],L+1,2*W+1,2*te+1)}}invalidateTiles(d){if(!d.length)return;let L=this.options,{debug:W}=L,te=1/0,ue=-1/0,me=1/0,ge=-1/0;for(let Oe of d)te=Math.min(te,Oe.minX),ue=Math.max(ue,Oe.maxX),me=Math.min(me,Oe.minY),ge=Math.max(ge,Oe.maxY);let Ce=L.buffer/L.extent,Te=new Set;for(let Oe in this.tiles){let Pe=this.tiles[Oe],it=1<=bt||ge=Qt)continue;let er=!1;for(let br of d)if(br.maxX>=He&&br.minX=Et&&br.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Pe.z,Pe.x,Pe.y,Pe.numFeatures,Pe.numPoints,Pe.numSimplified);let br=`z${Pe.z}`;this.stats[br]=(this.stats[br]||0)-1,this.total--}delete this.tiles[Oe],Te.add(Oe)}}Te.size&&(this.tileCoords=this.tileCoords.filter(Oe=>!Te.has(Oe.id)))}}function gy(R,d,L){return 32*((1<L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let L of this.layers)this.gradients[L.id]={};this.layoutVertexArray=new Ar,this.layoutVertexArray2=new hr,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("line",this.layers,L)||this.hasLineDasharray(this.layers);let te=this.layers[0].layout.get("line-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},dashes:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;this.hasDependencies?(Md("line",this.layers,L)?v0("line",this.layers,ge,{zoom:this.zoom},L):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,ge,this.zoom,L),this.patternFeatures.push(ge)):this.addFeature(ge,Ce,Te,W,{},{},L.subdivisionGranularity),L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W,te){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W,dashPositions:te})}addFeatures(d,L,W,te){for(let ue of this.patternFeatures)this.addFeature(ue,ue.geometry,ue.index,L,W,te,d.subdivisionGranularity)}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,zW)),this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,DW),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.hasOwn(d.properties,y3)&&Object.hasOwn(d.properties,_3))return{start:+d.properties[y3],end:+d.properties[_3]}}addFeature(d,L,W,te,ue,me,ge){let Ce=this.layers[0].layout,Te=Ce.get("line-join").evaluate(d,{}),Oe=Ce.get("line-cap").evaluate(d,{}),Pe=Ce.get("line-miter-limit").evaluate(d,{}),it=Ce.get("line-round-limit").evaluate(d,{});this.lineClips=this.lineFeatureClips(d);for(let He of L)this.addLine(He,d,Te,Oe,Pe,it,te,ge);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,dashPositions:me,canonical:te})}addLine(d,L,W,te,ue,me,ge,Ce){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,d=Sv(d,ge?Ce.line.getGranularityForZoomLevel(ge.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let sr=0;sr=2&&d[Oe-1].equals(d[Oe-2]);)Oe--;let Pe=0;for(;Pe0;if(nn&&sr>Pe){let gn=bt.dist(Et);if(gn>2*it){let Va=bt.sub(bt.sub(Et)._mult(it/gn)._round());this.updateDistance(Et,Va),this.addCurrentVertex(Va,er,0,0,He),Et=Va}}let bn=Et&&Qt,Fn=bn?W:Te?"butt":te;if(bn&&Fn==="round"&&(_aue&&(Fn="bevel"),Fn==="bevel"&&(_a>2&&(Fn="flipbevel"),_a100)Mr=br.mult(-1);else{let gn=_a*er.add(br).mag()/er.sub(br).mag();Mr._perp()._mult(gn*(qa?-1:1))}this.addCurrentVertex(bt,Mr,0,0,He),this.addCurrentVertex(bt,Mr.mult(-1),0,0,He)}else if(Fn==="bevel"||Fn==="fakeround"){let gn=-Math.sqrt(_a*_a-1),Va=qa?gn:0,Hn=qa?0:gn;if(Et&&this.addCurrentVertex(bt,er,Va,Hn,He),Fn==="fakeround"){let ni=Math.round(180*Ca/Math.PI/20);for(let Wn=1;Wn2*it){let Va=bt.add(Qt.sub(bt)._mult(it/gn)._round());this.updateDistance(bt,Va),this.addCurrentVertex(Va,br,0,0,He),bt=Va}}}}addCurrentVertex(d,L,W,te,ue,me=!1){let ge=L.y*te-L.x,Ce=-L.y-L.x*te;this.addHalfVertex(d,L.x+L.y*W,L.y-L.x*W,me,!1,W,ue),this.addHalfVertex(d,ge,Ce,me,!0,-te,ue),this.distance>N4/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(d,L,W,te,ue,me))}addHalfVertex({x:d,y:L},W,te,ue,me,ge,Ce){let Te=.5*(this.lineClips?this.scaledDistance*(N4-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((d<<1)+(ue?1:0),(L<<1)+(me?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(ge===0?0:ge<0?-1:1)|(63&Te)<<2,Te>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Oe=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,Oe,this.e2),Ce.primitiveLength++),me?this.e2=Oe:this.e1=Oe}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(d,L){this.distance+=d.dist(L),this.updateScaledDistance()}hasLineDasharray(d){for(let L of d){let W=L.paint.get("line-dasharray");if(W&&!W.isConstant())return!0}return!1}addLineDashDependencies(d,L,W,te){for(let ue of d){let me=ue.paint.get("line-dasharray");if(!me||me.value.kind==="constant")continue;let ge=ue.layout.get("line-cap").evaluate(L,{})==="round",Ce={dasharray:me.value.evaluate({zoom:W-1},L,{}),round:ge},Te={dasharray:me.value.evaluate({zoom:W},L,{}),round:ge},Oe={dasharray:me.value.evaluate({zoom:W+1},L,{}),round:ge},Pe=`${Ce.dasharray.join(",")},${Ce.round}`,it=`${Te.dasharray.join(",")},${Te.round}`,He=`${Oe.dasharray.join(",")},${Oe.round}`;te.dashDependencies[Pe]=Ce,te.dashDependencies[it]=Te,te.dashDependencies[He]=Oe,L.dashes[ue.id]={min:Pe,mid:it,max:He}}}}let j4,U4;fi("LineBucket",b3,{omit:["layers","patternFeatures"]});var q4={get paint(){return U4=U4||new Ps({"line-opacity":new wi(ht.paint_line["line-opacity"]),"line-color":new wi(ht.paint_line["line-color"]),"line-translate":new hi(ht.paint_line["line-translate"]),"line-translate-anchor":new hi(ht.paint_line["line-translate-anchor"]),"line-width":new wi(ht.paint_line["line-width"]),"line-gap-width":new wi(ht.paint_line["line-gap-width"]),"line-offset":new wi(ht.paint_line["line-offset"]),"line-blur":new wi(ht.paint_line["line-blur"]),"line-dasharray":new sl(ht.paint_line["line-dasharray"]),"line-pattern":new sl(ht.paint_line["line-pattern"]),"line-gradient":new tu(ht.paint_line["line-gradient"])})},get layout(){return j4=j4||new Ps({"line-cap":new wi(ht.layout_line["line-cap"]),"line-join":new wi(ht.layout_line["line-join"]),"line-miter-limit":new wi(ht.layout_line["line-miter-limit"]),"line-round-limit":new wi(ht.layout_line["line-round-limit"]),"line-sort-key":new wi(ht.layout_line["line-sort-key"])})}};class OW extends wi{possiblyEvaluate(d,L){return L=new oi(Math.floor(L.zoom),{now:L.now,fadeDuration:L.fadeDuration,zoomHistory:L.zoomHistory,transition:L.transition}),super.possiblyEvaluate(d,L)}evaluate(d,L,W,te){return L=X({},L,{zoom:Math.floor(L.zoom)}),super.evaluate(d,L,W,te)}}let yy;class NW extends ll{constructor(d,L){super(d,q4,L),this.gradientVersion=0,yy||(yy=new OW(q4.paint.properties["line-width"].specification),yy.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(d){if(d==="line-gradient"){let L=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(L)&&L._styleExpression.expression instanceof Ss,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,L){super.recalculate(d,L),this.paint._values["line-floorwidth"]=yy.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new b3(d)}queryRadius(d){let L=d,W=V4(Le("line-width",this,L),Le("line-gap-width",this,L)),te=Le("line-offset",this,L);return W/2+Math.abs(te)+Ue(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me}){let ge=Qe(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-ue.bearingInRadians,me),Ce=me/2*V4(this.paint.get("line-width").evaluate(L,W),this.paint.get("line-gap-width").evaluate(L,W)),Te=this.paint.get("line-offset").evaluate(L,W);return Te&&(te=function(Oe,Pe){let it=[];for(let He of Oe){let bt=_t(He),Et=[];for(let Qt=0;Qt=3){for(let bt of He)if(Wa(Oe,bt))return!0}if(rs(Oe,He,it))return!0}return!1}(ge,te,Ce)}isTileClipped(){return!0}}function V4(R,d){return d>0?d+2*R:R}let jW=ct([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),UW=ct([{name:"a_projected_pos",components:3,type:"Float32"}],4);ct([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let qW=ct([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ct([{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 G4=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),VW=ct([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function GW(R,d,L){let W=d.layout.get("text-transform").evaluate(L,{});return W==="uppercase"?R=R.toLocaleUpperCase():W==="lowercase"&&(R=R.toLocaleLowerCase()),Si.applyArabicShaping&&(R=Si.applyArabicShaping(R)),R}function HW(R,d,L){for(let W of R.sections)W.text=GW(W.text,d,L);return R}ct([{name:"triangle",components:3,type:"Uint16"}]),ct([{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"}]),ct([{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"}]),ct([{type:"Float32",name:"offsetX"}]),ct([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ct([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let Rg={"!":"\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","\u22EF":"\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"},WW={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},YW={40:!0};function H4(R,d,L,W,te,ue){if("fontStack"in d){let me=L[d.fontStack],ge=me?.[R];return ge?ge.metrics.advance*d.scale+te:0}{let me=W[d.imageName];return me?me.displaySize[0]*d.scale*Rc/ue+te:0}}function W4(R,d,L,W){let te=Math.pow(R-d,2);return W?RMath.max(d,this.sections[L].scale),0)}getMaxImageSize(d){let L=0,W=0;for(let te=0;teW))}addImageSection(d){let L=d.image?d.image.name:"";if(L.length===0)return void ee("Can't add FormattedSection with an empty image.");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push({scale:1,verticalAlign:d.verticalAlign||"bottom",imageName:L}),this.sectionIndex.push(this.sections.length-1)):ee("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(d,L,W,te,ue){let me=[],ge=this.determineAverageLineWidth(d,L,W,te,ue),Ce=this.hasZeroWidthSpaces(),Te=0,Oe=0,Pe=this.text[Symbol.iterator](),it=Pe.next(),He=this.text[Symbol.iterator]();He.next();let bt=He.next(),Et=this.text[Symbol.iterator]();Et.next(),Et.next();let Qt=Et.next();for(;!it.done;){let er=this.getSection(Oe),br=it.value.codePointAt(0);if(Pr(br)||(Te+=H4(br,er,W,te,d,ue)),!bt.done){let sr=zt(br),Mr=bt.value.codePointAt(0);(WW[br]||sr||"imageName"in er||!Qt.done&&YW[Mr])&&me.push(Y4(Oe+1,Te,ge,me,XW(br,Mr,sr&&Ce),!1))}Oe++,it=Pe.next(),bt=He.next(),Qt=Et.next()}return X4(Y4(this.length(),Te,ge,me,0,!0))}determineAverageLineWidth(d,L,W,te,ue){let me=0,ge=0;for(let Ce of this.text){let Te=this.getSection(ge);me+=H4(Ce.codePointAt(0),Te,W,te,d,ue),ge++}return me/Math.max(1,Math.ceil(me/L))}}let w3=4294967296,Z4=1/w3,$4=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class _y{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,L,W=this.length){for(;this.pos>3,me=this.pos;this.type=7&te,d(ue,L,this),this.pos===me&&this.skip(te)}return L}readMessage(d,L){return this.readFields(d,L,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*w3;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*w3;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let L=this.buf,W,te;return te=L[this.pos++],W=127&te,te<128?W:(te=L[this.pos++],W|=(127&te)<<7,te<128?W:(te=L[this.pos++],W|=(127&te)<<14,te<128?W:(te=L[this.pos++],W|=(127&te)<<21,te<128?W:(te=L[this.pos],W|=(15&te)<<28,function(ue,me,ge){let Ce=ge.buf,Te,Oe;if(Oe=Ce[ge.pos++],Te=(112&Oe)>>4,Oe<128||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<3,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<10,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<17,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<24,Oe<128)||(Oe=Ce[ge.pos++],Te|=(1&Oe)<<31,Oe<128))return A0(ue,Te,me);throw new Error("Expected varint not more than 10 bytes")}(W,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,L=this.pos;return this.pos=d,d-L>=12&&$4?$4.decode(this.buf.subarray(L,d)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(this.buf,L,d)}readBytes(){let d=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,d);return this.pos=d,L}readPackedVarint(d=[],L){let W=this.readPackedEnd();for(;this.pos127;);else if(L===2)this.pos=this.readVarint()+this.pos;else if(L===5)this.pos+=4;else{if(L!==1)throw new Error(`Unimplemented type: ${L}`);this.pos+=8}}writeTag(d,L){this.writeVarint(d<<3|L)}realloc(d){let L=this.length||16;for(;L268435455||d<0?function(L,W){let te,ue;if(L>=0?(te=L%4294967296|0,ue=L/4294967296|0):(te=~(-L%4294967296),ue=~(-L/4294967296),4294967295^te?te=te+1|0:(te=0,ue=ue+1|0)),L>=18446744073709552e3||L<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");W.realloc(10),function(me,ge,Ce){Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,Ce.buf[Ce.pos]=127&(me>>>=7)}(te,0,W),function(me,ge){let Ce=(7&me)<<4;ge.buf[ge.pos++]|=Ce|((me>>>=3)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me)))))}(ue,W)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let L=this.pos;this.pos=function(te,ue,me){for(let ge,Ce,Te=0;Te55295&&ge<57344){if(!Ce){ge>56319||Te+1===ue.length?(te[me++]=239,te[me++]=191,te[me++]=189):Ce=ge;continue}if(ge<56320){te[me++]=239,te[me++]=191,te[me++]=189,Ce=ge;continue}ge=Ce-55296<<10|ge-56320|65536,Ce=null}else Ce&&(te[me++]=239,te[me++]=191,te[me++]=189,Ce=null);ge<128?te[me++]=ge:(ge<2048?te[me++]=ge>>6|192:(ge<65536?te[me++]=ge>>12|224:(te[me++]=ge>>18|240,te[me++]=ge>>12&63|128),te[me++]=ge>>6&63|128),te[me++]=63&ge|128)}return me}(this.buf,d,this.pos);let W=this.pos-L;W>=128&&K4(L,W,this),this.pos=L-1,this.writeVarint(W),this.pos+=W}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let L=d.length;this.writeVarint(L),this.realloc(L);for(let W=0;W=128&&K4(W,te,this),this.pos=W-1,this.writeVarint(te),this.pos+=te}writeMessage(d,L,W){this.writeTag(d,2),this.writeRawMessage(L,W)}writePackedVarint(d,L){L.length&&this.writeMessage(d,ZW,L)}writePackedSVarint(d,L){L.length&&this.writeMessage(d,$W,L)}writePackedBoolean(d,L){L.length&&this.writeMessage(d,QW,L)}writePackedFloat(d,L){L.length&&this.writeMessage(d,KW,L)}writePackedDouble(d,L){L.length&&this.writeMessage(d,JW,L)}writePackedFixed32(d,L){L.length&&this.writeMessage(d,eY,L)}writePackedSFixed32(d,L){L.length&&this.writeMessage(d,tY,L)}writePackedFixed64(d,L){L.length&&this.writeMessage(d,rY,L)}writePackedSFixed64(d,L){L.length&&this.writeMessage(d,aY,L)}writeBytesField(d,L){this.writeTag(d,2),this.writeBytes(L)}writeFixed32Field(d,L){this.writeTag(d,5),this.writeFixed32(L)}writeSFixed32Field(d,L){this.writeTag(d,5),this.writeSFixed32(L)}writeFixed64Field(d,L){this.writeTag(d,1),this.writeFixed64(L)}writeSFixed64Field(d,L){this.writeTag(d,1),this.writeSFixed64(L)}writeVarintField(d,L){this.writeTag(d,0),this.writeVarint(L)}writeSVarintField(d,L){this.writeTag(d,0),this.writeSVarint(L)}writeStringField(d,L){this.writeTag(d,2),this.writeString(L)}writeFloatField(d,L){this.writeTag(d,5),this.writeFloat(L)}writeDoubleField(d,L){this.writeTag(d,1),this.writeDouble(L)}writeBooleanField(d,L){this.writeVarintField(d,+L)}}function A0(R,d,L){return L?4294967296*d+(R>>>0):4294967296*(d>>>0)+(R>>>0)}function K4(R,d,L){let W=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));L.realloc(W);for(let te=L.pos-1;te>=R;te--)L.buf[te+W]=L.buf[te]}function ZW(R,d){for(let L=0;Lge.h-me.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),L),h:1/0}],te=0,ue=0;for(let me of R)for(let ge=W.length-1;ge>=0;ge--){let Ce=W[ge];if(!(me.w>Ce.w||me.h>Ce.h)){if(me.x=Ce.x,me.y=Ce.y,ue=Math.max(ue,me.y+me.h),te=Math.max(te,me.x+me.w),me.w===Ce.w&&me.h===Ce.h){let Te=W.pop();Te&&geEt.toCodeUnitIndex(_a));let $r=br(Et.toString(),er);for(let _a of $r){let Ca=[..._a].map(()=>0);Qt.push(new T0(_a,Et.sections,Ca))}}else if(sr){Qt=[],er=er.map(nn=>Et.toCodeUnitIndex(nn));let $r=0,_a=[];for(let nn of Et.text)_a.push(...Array(nn.length).fill(Et.sectionIndex[$r])),$r++;let Ca=sr(Et.text,_a,er);for(let nn of Ca){let qa=[],bn="";for(let Fn of nn[0])qa.push(nn[1][bn.length]),bn+=Fn;Qt.push(new T0(nn[0],Et.sections,qa))}}else Qt=function($r,_a){let Ca=[],nn=0;for(let qa of _a)Ca.push($r.substring(nn,qa)),nn=qa;return nn<$r.length()&&Ca.push($r.substring(nn,$r.length())),Ca}(Et,er);let Mr=[],qr={positionedLines:Mr,text:Et.toString(),top:Oe[1],bottom:Oe[1],left:Oe[0],right:Oe[0],writingMode:Pe,iconsInText:!1,verticalizable:!1};return function($r,_a,Ca,nn,qa,bn,Fn,gn,Va,Hn,ni,Wn){let si=0,po=0,cs=0,Ds=0,Xs=gn==="right"?1:gn==="left"?0:.5,Mf=Rc/Wn,vu=0;for(let Hl of qa){Hl.trim();let rf=Hl.getMaxScale(),Xf={positionedGlyphs:[],lineOffset:0};$r.positionedLines[vu]=Xf;let Zf=Xf.positionedGlyphs,Th=0;if(!Hl.length()){po+=bn,++vu;continue}let Sf=sY(nn,Hl,Mf),Ah=0;for(let Fc of Hl.text){let nu=Hl.getSection(Ah),lc=Fc.codePointAt(0),mu=lY(Va,ni,lc),zc={glyph:lc,imageName:null,x:si,y:po+-17,vertical:mu,scale:1,fontStack:"",sectionIndex:Hl.getSectionIndex(Ah),metrics:null,rect:null},Zd;if("fontStack"in nu){if(Zd=uY(nu,lc,mu,Sf,_a,Ca),!Zd)continue;zc.fontStack=nu.fontStack}else{if($r.iconsInText=!0,nu.scale*=Mf,Zd=cY(nu,mu,rf,Sf,nn),!Zd)continue;Th=Math.max(Th,Zd.imageOffset),zc.imageName=nu.imageName}let{rect:dd,metrics:Bg,baselineOffset:Ep}=Zd;zc.y+=Ep,zc.scale=nu.scale,zc.metrics=Bg,zc.rect=dd,Zf.push(zc),mu?($r.verticalizable=!0,si+=("imageName"in nu?Bg.advance:Rc)*nu.scale+Hn):si+=Bg.advance*nu.scale+Hn,Ah++}Zf.length!==0&&(cs=Math.max(si-Hn,cs),fY(Zf,0,Zf.length-1,Xs)),si=0,Xf.lineOffset=Math.max(Th,(rf-1)*Rc);let Hh=bn*rf+Th;po+=Hh,Ds=Math.max(Hh,Ds),++vu}let{horizontalAlign:yc,verticalAlign:Dc}=A3(Fn);(function(Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc){let nu=(rf-Xf)*Th,lc=0;lc=Sf!==Ah?-Hh*Zf- -17:-Zf*Fc*Ah+.5*Ah;for(let mu of Hl)for(let zc of mu.positionedGlyphs)zc.x+=nu,zc.y+=lc})($r.positionedLines,Xs,yc,Dc,cs,Ds,bn,po,qa.length),$r.top+=-Dc*po,$r.bottom=$r.top+po,$r.left+=-yc*cs,$r.right=$r.left+cs}(qr,d,L,W,Qt,me,ge,Ce,Pe,Te,it,bt),!function($r){for(let _a of $r)if(_a.positionedGlyphs.length!==0)return!1;return!0}(Mr)&&qr}function A3(R){let d=.5,L=.5;switch(R){case"right":case"top-right":case"bottom-right":d=1;break;case"left":case"top-left":case"bottom-left":d=0}switch(R){case"bottom":case"bottom-right":case"bottom-left":L=1;break;case"top":case"top-right":case"top-left":L=0}return{horizontalAlign:d,verticalAlign:L}}function sY(R,d,L){let W=d.getMaxScale()*Rc,{maxImageWidth:te,maxImageHeight:ue}=d.getMaxImageSize(R),me=Math.max(W,ue*L);return{verticalLineContentWidth:Math.max(W,te*L),horizontalLineContentHeight:me}}function eS(R){switch(R){case"top":return 0;case"center":return .5;default:return 1}}function lY(R,d,L){return!(R===l.ax.horizontal||!d&&!Wt(L)||d&&(Pr(L)||(W=L,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(W)))));var W}function uY(R,d,L,W,te,ue){let me=ue[R.fontStack],ge=function(Te,Oe,Pe,it){if(Te?.rect)return Te;let He=Oe[Pe.fontStack],bt=He?.[it];return bt?{rect:null,metrics:bt.metrics}:null}(me?.[d],te,R,d);if(ge===null)return null;let Ce;if(L)Ce=W.verticalLineContentWidth-R.scale*Rc;else{let Te=eS(R.verticalAlign);Ce=(W.horizontalLineContentHeight-R.scale*Rc)*Te}return{rect:ge.rect,metrics:ge.metrics,baselineOffset:Ce}}function cY(R,d,L,W,te){let ue=te[R.imageName];if(!ue)return null;let me=ue.paddedRect,ge=ue.displaySize,Ce={width:ge[0],height:ge[1],left:1,top:-3,advance:d?ge[1]:ge[0]},Te;if(d)Te=W.verticalLineContentWidth-ge[1]*R.scale;else{let Oe=eS(R.verticalAlign);Te=(W.horizontalLineContentHeight-ge[1]*R.scale)*Oe}return{rect:me,metrics:Ce,baselineOffset:Te,imageOffset:(d?ge[0]:ge[1])*R.scale-Rc*L}}function fY(R,d,L,W){if(W===0)return;let te=R[L],ue=(R[L].x+te.metrics.advance*te.scale)*W;for(let me=d;me<=L;me++)R[me].x-=ue}function hY(R,d,L){let{horizontalAlign:W,verticalAlign:te}=A3(L),ue=d[0]-R.displaySize[0]*W,me=d[1]-R.displaySize[1]*te;return{image:R,top:me,bottom:me+R.displaySize[1],left:ue,right:ue+R.displaySize[0]}}function tS(R){var d,L;let W=R.left,te=R.top,ue=R.right-W,me=R.bottom-te,ge=(d=R.image.textFitWidth)!==null&&d!==void 0?d:"stretchOrShrink",Ce=(L=R.image.textFitHeight)!==null&&L!==void 0?L:"stretchOrShrink",Te=(R.image.content[2]-R.image.content[0])/(R.image.content[3]-R.image.content[1]);if(Ce==="proportional"){if(ge==="stretchOnly"&&ue/meTe){let Oe=Math.ceil(ue/Te);te*=Oe/me,me=Oe}return{x1:W,y1:te,x2:W+ue,y2:te+me}}function rS(R,d,L,W,te,ue){let me=R.image,ge;if(me.content){let Qt=me.content,er=me.pixelRatio||1;ge=[Qt[0]/er,Qt[1]/er,me.displaySize[0]-Qt[2]/er,me.displaySize[1]-Qt[3]/er]}let Ce=d.left*ue,Te=d.right*ue,Oe,Pe,it,He;L==="width"||L==="both"?(He=te[0]+Ce-W[3],Pe=te[0]+Te+W[1]):(He=te[0]+(Ce+Te-me.displaySize[0])/2,Pe=He+me.displaySize[0]);let bt=d.top*ue,Et=d.bottom*ue;return L==="height"||L==="both"?(Oe=te[1]+bt-W[0],it=te[1]+Et+W[2]):(Oe=te[1]+(bt+Et-me.displaySize[1])/2,it=Oe+me.displaySize[1]),{image:me,top:Oe,right:Pe,bottom:it,left:He,collisionPadding:ge}}fi("ImagePosition",T3),fi("ImageAtlas",Q4),l.ax=void 0,(xp=l.ax||(l.ax={}))[xp.none=0]="none",xp[xp.horizontal=1]="horizontal",xp[xp.vertical=2]="vertical",xp[xp.horizontalOnly=3]="horizontalOnly";let Yd=128,bp=32640;function aS(R,d){let{expression:L}=d;if(L.kind==="constant")return{kind:"constant",layoutSize:L.evaluate(new oi(R+1))};if(L.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=L,ue=0;for(;ueme.id),this.index=d.index,this.pixelRatio=d.pixelRatio,this.sourceLayerIndex=d.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let L=this.layers[0]._unevaluatedLayout._values;this.textSizeData=aS(this.zoom,L["text-size"]),this.iconSizeData=aS(this.zoom,L["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),ue=W.get("symbol-z-order");this.canOverlap=M3(W,"text-overlap","text-allow-overlap")!=="never"||M3(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=ue!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(ue==="viewport-y"||ue==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(me=>l.ax[me])),this.stateDependentLayerIds=this.layers.filter(me=>me.isStateDependent()).map(me=>me.id),this.sourceID=d.sourceID}createArrays(){this.text=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("text"))),this.icon=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("icon"))),this.glyphOffsetArray=new ut,this.lineVertexArray=new ft,this.symbolInstances=new Ze,this.textAnchorOffsets=new Gt}calculateGlyphDependencies(d,L,W,te,ue){for(let me of d)if(L[me.codePointAt(0)]=!0,(W||te)&&ue){let ge=Rg[me];ge&&(L[ge.codePointAt(0)]=!0)}}populate(d,L,W){var te;let ue=this.layers[0],me=ue.layout,ge=me.get("text-font"),Ce=me.get("text-field"),Te=me.get("icon-image"),Oe=(Ce.value.kind!=="constant"||Ce.value.value instanceof Di&&!Ce.value.value.isEmpty()||Ce.value.value.toString().length>0)&&(ge.value.kind!=="constant"||ge.value.value.length>0),Pe=Te.value.kind!=="constant"||!!Te.value.value||Object.keys(Te.parameters).length>0,it=me.get("symbol-sort-key");if(this.features=[],!Oe&&!Pe)return;let He=L.iconDependencies,bt=L.glyphDependencies,Et=L.availableImages,Qt=new oi(this.zoom);for(let{feature:er,id:br,index:sr,sourceLayerIndex:Mr}of d){let qr=ue._featureFilter.needGeometry,$r=fo(er,qr);if(!ue._featureFilter.filter(Qt,$r,W))continue;let _a,Ca;if(qr||($r.geometry=ql(er)),Oe){let qa=ue.getValueAndResolveTokens("text-field",$r,W,Et),bn=Di.factory(qa);this.hasRTLText||(this.hasRTLText=pY(bn)),(!this.hasRTLText||Si.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Si.isParsed())&&(_a=HW(bn,ue,$r))}if(Pe){let qa=ue.getValueAndResolveTokens("icon-image",$r,W,Et);Ca=qa instanceof qi?qa:qi.fromString(qa)}if(!_a&&!Ca)continue;let nn=this.sortFeaturesByKey?it.evaluate($r,{},W):void 0;if(this.features.push({id:br,text:_a,icon:Ca,index:sr,sourceLayerIndex:Mr,geometry:$r.geometry,properties:er.properties,type:Eg.types[er.type],sortKey:nn}),Ca&&(He[Ca.name]=!0),_a){let qa=ge.evaluate($r,{},W).join(","),bn=me.get("text-rotation-alignment")!=="viewport"&&me.get("symbol-placement")!=="point";this.allowVerticalPlacement=(te=this.writingModes)===null||te===void 0?void 0:te.includes(l.ax.vertical);for(let Fn of _a.sections)if(Fn.image)He[Fn.image.name]=!0;else{let gn=Br(_a.toString()),Va=Fn.fontStack||qa;bt[Va]||(bt[Va]={}),this.calculateGlyphDependencies(Fn.text,bt[Va],bn,this.allowVerticalPlacement,gn)}}}me.get("symbol-placement")==="line"&&(this.features=function(er){let br={},sr={},Mr=[],qr=0;function $r(qa){Mr.push(er[qa]),qr++}function _a(qa,bn,Fn){let gn=sr[qa];return delete sr[qa],sr[bn]=gn,Mr[gn].geometry[0].pop(),Mr[gn].geometry[0]=Mr[gn].geometry[0].concat(Fn[0]),gn}function Ca(qa,bn,Fn){let gn=br[bn];return delete br[bn],br[qa]=gn,Mr[gn].geometry[0].shift(),Mr[gn].geometry[0]=Fn[0].concat(Mr[gn].geometry[0]),gn}function nn(qa,bn,Fn){let gn=Fn?bn[0][bn[0].length-1]:bn[0][0];return`${qa}:${gn.x}:${gn.y}`}for(let qa=0;qaqa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((er,br)=>er.sortKey-br.sortKey)}update(d,L,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}),this.icon.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}))}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,L){let W=this.lineVertexArray.length;if(d.segment!==void 0){let te=d.dist(L[d.segment+1]),ue=d.dist(L[d.segment]),me={};for(let ge=d.segment+1;ge=0;ge--)me[ge]={x:L[ge].x,y:L[ge].y,tileUnitDistanceFromAnchor:ue},ge>0&&(ue+=L[ge-1].dist(L[ge]));for(let ge=0;ge0}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,L){let W=d.placedSymbolArray.get(L),te=W.vertexStartIndex+4*W.numGlyphs;for(let ue=W.vertexStartIndex;uete[ge]-te[Ce]||ue[Ce]-ue[ge]),me}addToSortKeyRanges(d,L){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W?.sortKey===L?W.symbolInstanceEnd=d+1:this.sortKeyRanges.push({sortKey:L,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 L of this.symbolInstanceIndexes){let W=this.symbolInstances.get(L);this.featureSortOrder.push(W.featureIndex);let te=[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex];for(let ue=0;ue=0&&te.indexOf(me)===ue&&this.addIndicesForPlacedSymbol(this.text,me)}W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let nS,iS;fi("SymbolBucket",M0,{omit:["layers","collisionBoxArray","features","compareText"]}),M0.MAX_GLYPHS=65535,M0.addDynamicAttributes=S3;var C3={get paint(){return iS=iS||new Ps({"icon-opacity":new wi(ht.paint_symbol["icon-opacity"]),"icon-color":new wi(ht.paint_symbol["icon-color"]),"icon-halo-color":new wi(ht.paint_symbol["icon-halo-color"]),"icon-halo-width":new wi(ht.paint_symbol["icon-halo-width"]),"icon-halo-blur":new wi(ht.paint_symbol["icon-halo-blur"]),"icon-translate":new hi(ht.paint_symbol["icon-translate"]),"icon-translate-anchor":new hi(ht.paint_symbol["icon-translate-anchor"]),"text-opacity":new wi(ht.paint_symbol["text-opacity"]),"text-color":new wi(ht.paint_symbol["text-color"],{runtimeType:cr,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new wi(ht.paint_symbol["text-halo-color"]),"text-halo-width":new wi(ht.paint_symbol["text-halo-width"]),"text-halo-blur":new wi(ht.paint_symbol["text-halo-blur"]),"text-translate":new hi(ht.paint_symbol["text-translate"]),"text-translate-anchor":new hi(ht.paint_symbol["text-translate-anchor"])})},get layout(){return nS=nS||new Ps({"symbol-placement":new hi(ht.layout_symbol["symbol-placement"]),"symbol-spacing":new hi(ht.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new hi(ht.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new wi(ht.layout_symbol["symbol-sort-key"]),"symbol-z-order":new hi(ht.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new hi(ht.layout_symbol["icon-allow-overlap"]),"icon-overlap":new hi(ht.layout_symbol["icon-overlap"]),"icon-ignore-placement":new hi(ht.layout_symbol["icon-ignore-placement"]),"icon-optional":new hi(ht.layout_symbol["icon-optional"]),"icon-rotation-alignment":new hi(ht.layout_symbol["icon-rotation-alignment"]),"icon-size":new wi(ht.layout_symbol["icon-size"]),"icon-text-fit":new hi(ht.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new hi(ht.layout_symbol["icon-text-fit-padding"]),"icon-image":new wi(ht.layout_symbol["icon-image"]),"icon-rotate":new wi(ht.layout_symbol["icon-rotate"]),"icon-padding":new wi(ht.layout_symbol["icon-padding"]),"icon-keep-upright":new hi(ht.layout_symbol["icon-keep-upright"]),"icon-offset":new wi(ht.layout_symbol["icon-offset"]),"icon-anchor":new wi(ht.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new hi(ht.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new hi(ht.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new hi(ht.layout_symbol["text-rotation-alignment"]),"text-field":new wi(ht.layout_symbol["text-field"]),"text-font":new wi(ht.layout_symbol["text-font"]),"text-size":new wi(ht.layout_symbol["text-size"]),"text-max-width":new wi(ht.layout_symbol["text-max-width"]),"text-line-height":new hi(ht.layout_symbol["text-line-height"]),"text-letter-spacing":new wi(ht.layout_symbol["text-letter-spacing"]),"text-justify":new wi(ht.layout_symbol["text-justify"]),"text-radial-offset":new wi(ht.layout_symbol["text-radial-offset"]),"text-variable-anchor":new hi(ht.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new wi(ht.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new wi(ht.layout_symbol["text-anchor"]),"text-max-angle":new hi(ht.layout_symbol["text-max-angle"]),"text-writing-mode":new hi(ht.layout_symbol["text-writing-mode"]),"text-rotate":new wi(ht.layout_symbol["text-rotate"]),"text-padding":new hi(ht.layout_symbol["text-padding"]),"text-keep-upright":new hi(ht.layout_symbol["text-keep-upright"]),"text-transform":new wi(ht.layout_symbol["text-transform"]),"text-offset":new wi(ht.layout_symbol["text-offset"]),"text-allow-overlap":new hi(ht.layout_symbol["text-allow-overlap"]),"text-overlap":new hi(ht.layout_symbol["text-overlap"]),"text-ignore-placement":new hi(ht.layout_symbol["text-ignore-placement"]),"text-optional":new hi(ht.layout_symbol["text-optional"])})}};class oS{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:Yt,this.defaultValue=d}evaluate(d){if(d.formattedSection){let L=this.defaultValue.property.overrides;if(L?.hasOverride(d.formattedSection))return L.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}}fi("FormatSectionOverride",oS,{omit:["defaultValue"]});class wy extends ll{constructor(d,L){super(d,C3,L)}recalculate(d,L){if(super.recalculate(d,L),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 W=this.layout.get("text-writing-mode");if(W){let te=[];for(let ue of W)te.includes(ue)||te.push(ue);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(d,L,W,te){let ue=this.layout.get(d).evaluate(L,{},W,te),me=this._unevaluatedLayout._values[d];return me.isDataDriven()||kc(me.value)||!ue?ue:function(ge,Ce){return Ce.replace(/{([^{}]+)}/g,(Te,Oe)=>ge&&Oe in ge?String(ge[Oe]):"")}(L.properties,ue)}createBucket(d){return new M0(d)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let d of C3.paint.overridableProperties){if(!wy.hasPaintOverride(this.layout,d))continue;let L=this.paint.get(d),W=new oS(L),te=new kl(W,L.property.specification),ue=null;ue=L.value.kind==="constant"||L.value.kind==="source"?new Lc("source",te):new vc("composite",te,L.value.zoomStops),this.paint._values[d]=new Hs(L.property,ue,L.parameters)}}_handleOverridablePaintPropertyUpdate(d,L,W){return!(!this.layout||L.isDataDriven()||W.isDataDriven())&&wy.hasPaintOverride(this.layout,d)}static hasPaintOverride(d,L){let W=d.get("text-field"),te=C3.paint.properties[L],ue=!1,me=ge=>{var Ce;for(let Te of ge)if(!((Ce=te.overrides)===null||Ce===void 0)&&Ce.hasOverride(Te))return void(ue=!0)};if(W.value.kind==="constant"&&W.value.value instanceof Di)me(W.value.value.sections);else if(W.value.kind==="source"||W.value.kind==="composite"){let ge=Te=>{ue||(Te instanceof Mi&&qn(Te.value)===Pa?me(Te.value.sections):Te instanceof vs?me(Te.sections):Te.eachChild(ge))},Ce=W.value;Ce._styleExpression&&ge(Ce._styleExpression.expression)}return ue}}let sS;var vY={get paint(){return sS=sS||new Ps({"background-color":new hi(ht.paint_background["background-color"]),"background-pattern":new sc(ht.paint_background["background-pattern"]),"background-opacity":new hi(ht.paint_background["background-opacity"])})}};class mY extends ll{constructor(d,L){super(d,vY,L)}}class gY extends ll{constructor(d,L){super(d,{},L),this.onAdd=W=>{this.implementation.onAdd&&this.implementation.onAdd(W,W.painter.context.gl)},this.onRemove=W=>{this.implementation.onRemove&&this.implementation.onRemove(W,W.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 yY{constructor(d){this._methodToThrottle=d,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var d;this._triggered||(this._triggered=!0,(d=this._channel)===null||d===void 0||d.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let _Y={once:!0},L3=63710088e-1;class wp{constructor(d,L){if(isNaN(d)||isNaN(L))throw new Error(`Invalid LngLat object: (${d}, ${L})`);if(this.lng=+d,this.lat=+L,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new wp(G(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(d){let L=Math.PI/180,W=this.lat*L,te=d.lat*L,ue=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((d.lng-this.lng)*L);return L3*Math.acos(Math.min(ue,1))}static convert(d){if(d instanceof wp)return d;if(Array.isArray(d)&&(d.length===2||d.length===3))return new wp(Number(d[0]),Number(d[1]));if(!Array.isArray(d)&&typeof d=="object"&&d!==null)return new wp(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 lS=2*Math.PI*L3;function uS(R){return lS*Math.cos(R*Math.PI/180)}function cS(R){return(180+R)/360}function fS(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function hS(R,d){return R/uS(d)}function dS(R){return 360*R-180}function Ty(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}function pS(R,d){return R*uS(Ty(d))}class Ig{constructor(d,L,W=0){this.x=+d,this.y=+L,this.z=+W}static fromLngLat(d,L=0){let W=wp.convert(d);return new Ig(cS(W.lng),fS(W.lat),hS(L,W.lat))}toLngLat(){return new wp(dS(this.x),Ty(this.y))}toAltitude(){return pS(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/lS*(d=Ty(this.y),1/Math.cos(d*Math.PI/180));var d}}function vS(R,d,L){var W=2*Math.PI*6378137/256/Math.pow(2,L);return[R*W-2*Math.PI*6378137/2,d*W-2*Math.PI*6378137/2]}class P3{constructor(d,L,W){if(!function(te,ue,me){return!(te<0||te>25||me<0||me>=Math.pow(2,te)||ue<0||ue>=Math.pow(2,te))}(d,L,W))throw new Error(`x=${L}, y=${W}, 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=L,this.y=W,this.key=S0(0,d,d,L,W)}equals(d){return this.z===d.z&&this.x===d.x&&this.y===d.y}url(d,L,W){let te=(me=this.y,ge=this.z,Ce=vS(256*(ue=this.x),256*(me=Math.pow(2,ge)-me-1),ge),Te=vS(256*(ue+1),256*(me+1),ge),Ce[0]+","+Ce[1]+","+Te[0]+","+Te[1]);var ue,me,ge,Ce,Te;let Oe=function(Pe,it,He){let bt="";for(let Et=Pe;Et>0;Et--){let Qt=1<1?"@2x":"").replace(/{quadkey}/g,Oe).replace(/{bbox-epsg-3857}/g,te)}isChildOf(d){let L=this.z-d.z;return L>0&&d.x===this.x>>L&&d.y===this.y>>L}getTilePoint(d){let L=Math.pow(2,this.z);return new t((d.x*L-this.x)*F,(d.y*L-this.y)*F)}toString(){return`${this.z}/${this.x}/${this.y}`}}class mS{constructor(d,L){this.wrap=d,this.canonical=L,this.key=S0(d,L.z,L.z,L.x,L.y)}}class Ph{constructor(d,L,W,te,ue){if(this.terrainRttPosMatrix32f=null,d= z; overscaledZ = ${d}; z = ${W}`);this.overscaledZ=d,this.wrap=L,this.canonical=new P3(W,+te,+ue),this.key=S0(L,d,W,te,ue)}clone(){return new Ph(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 L=this.canonical.z-d;return d>this.canonical.z?new Ph(d,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ph(d,this.wrap,d,this.canonical.x>>L,this.canonical.y>>L)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(d,L){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-d;return d>this.canonical.z?S0(this.wrap*+L,d,this.canonical.z,this.canonical.x,this.canonical.y):S0(this.wrap*+L,d,d,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(d){if(d.wrap!==this.wrap||this.overscaledZ-d.overscaledZ<=0)return!1;if(d.overscaledZ===0)return this.overscaledZ>0;let L=this.canonical.z-d.canonical.z;return!(L<0)&&d.canonical.x===this.canonical.x>>L&&d.canonical.y===this.canonical.y>>L}children(d){if(this.overscaledZ>=d)return[new Ph(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let L=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new Ph(L,this.wrap,L,W,te),new Ph(L,this.wrap,L,W+1,te),new Ph(L,this.wrap,L,W,te+1),new Ph(L,this.wrap,L,W+1,te+1)]}isLessThan(d){return this.wrapd.wrap)&&(this.overscaledZd.overscaledZ)&&(this.canonical.xd.canonical.x)&&this.canonical.y=0&&d=0&&L=Te)return null;let Pe=this.canonical.x+te,it=this.wrap;return Pe<0?(it-=Math.ceil(-Pe/Te),Pe=(Pe%Te+Te)%Te):Pe>=Te&&(it+=Math.floor(Pe/Te),Pe%=Te),{tileID:new Ph(this.overscaledZ,it,Ce,Pe,Oe),x:me,y:ge}}}function S0(R,d,L,W,te){(R*=2)<0&&(R=-1*R-1);let ue=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(d){return this.expandBy(-d)}map(d){let L=new Ev;return L.extend(d(new t(this.minX,this.minY))),L.extend(d(new t(this.maxX,this.minY))),L.extend(d(new t(this.minX,this.maxY))),L.extend(d(new t(this.maxX,this.maxY))),L}static fromPoints(d){let L=new Ev;for(let W of d)L.extend(W);return L}contains(d){return d.x>=this.minX&&d.x<=this.maxX&&d.y>=this.minY&&d.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(d){return!this.empty()&&!d.empty()&&d.minX>=this.minX&&d.maxX<=this.maxX&&d.minY>=this.minY&&d.maxY<=this.maxY}intersects(d){return!this.empty()&&!d.empty()&&d.minX<=this.maxX&&d.maxX>=this.minX&&d.minY<=this.maxY&&d.maxY>=this.minY}}class gS{constructor(d){this._stringToNumber={},this._numberToString=[];for(let L=0;L=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 yS{constructor(d,L,W,te,ue){this.type="Feature",this._vectorTileFeature=d,this._x=W,this._y=te,this._z=L,this.properties=d.properties,this.id=ue}projectPoint(d,L,W,te){return[360*(d.x+L)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(d.y+W)/te)*Math.PI))-90]}projectLine(d,L,W,te){return d.map(ue=>this.projectPoint(ue,L,W,te))}get geometry(){if(this._geometry)return this._geometry;let d=this._vectorTileFeature,L=d.extent*Math.pow(2,this._z),W=d.extent*this._x,te=d.extent*this._y,ue=d.loadGeometry();switch(d.type){case 1:{let me=[];for(let Ce of ue)me.push(Ce[0]);let ge=this.projectLine(me,W,te,L);this._geometry=me.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge};break}case 2:{let me=ue.map(ge=>this.projectLine(ge,W,te,L));this._geometry=me.length===1?{type:"LineString",coordinates:me[0]}:{type:"MultiLineString",coordinates:me};break}case 3:{let me=b4(ue),ge=[];for(let Ce of me)ge.push(Ce.map(Te=>this.projectLine(Te,W,te,L)));this._geometry=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge};break}default:throw new Error(`unknown feature type: ${d.type}`)}return this._geometry}set geometry(d){this._geometry=d}toJSON(){let d={geometry:this.geometry};for(let L in this)L!=="_geometry"&&L!=="_vectorTileFeature"&&L!=="_x"&&L!=="_y"&&L!=="_z"&&(d[L]=this[L]);return d}}class E0{constructor(d,L,W){this._name=d,this.dataBuffer=L,typeof W=="number"?this._size=W:(this.nullabilityBuffer=W,this._size=W.size())}getValue(d){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(d)?null:this.getValueFromBuffer(d)}has(d){var L;return((L=this.nullabilityBuffer)==null?void 0:L.get(d))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Ay extends E0{}class R3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class I3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class _S extends E0{constructor(d,L,W,te){super(d,L,te),this.delta=W}}class D3 extends _S{constructor(d,L,W,te){super(d,Int32Array.of(L),W,te)}getValueFromBuffer(d){return this.dataBuffer[0]+d*this.delta}}class F3 extends E0{constructor(d,L,W,te){super(d,te?Int32Array.of(L):Uint32Array.of(L),W)}getValueFromBuffer(d){return this.dataBuffer[0]}}class xY{constructor(d,L,W,te,ue=4096){this._name=d,this._geometryVector=L,this._idVector=W,this._propertyVectors=te,this._extent=ue}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(d){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(L=>[L.name,L]))),this.propertyVectorsMap.get(d)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let d=[],L=this.geometryVector.getGeometries();for(let W=0;W>>32-R;let B3=z3,Xd=256;function O3(R,d){return R-R%d}function bY(R){let d=R>>>0;return((255&d)<<24|(65280&d)<<8|d>>>8&65280|d>>>24&255)>>>0}let N3=function(){if(!Number.isFinite(65536))return 65536;let R=O3(Math.floor(65536),Xd);return R===0?Xd:R}(),wY=3*N3/Xd+N3|0;function bS(){let R=new Uint8Array(wY);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:R,byteContainerI32:new Int32Array(R.buffer,R.byteOffset,R.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function TY(R,d,L,W,te){switch(te){case 1:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=it>>>0&1,ge[Te++]=it>>>1&1,ge[Te++]=it>>>2&1,ge[Te++]=it>>>3&1,ge[Te++]=it>>>4&1,ge[Te++]=it>>>5&1,ge[Te++]=it>>>6&1,ge[Te++]=it>>>7&1,ge[Te++]=it>>>8&1,ge[Te++]=it>>>9&1,ge[Te++]=it>>>10&1,ge[Te++]=it>>>11&1,ge[Te++]=it>>>12&1,ge[Te++]=it>>>13&1,ge[Te++]=it>>>14&1,ge[Te++]=it>>>15&1,ge[Te++]=it>>>16&1,ge[Te++]=it>>>17&1,ge[Te++]=it>>>18&1,ge[Te++]=it>>>19&1,ge[Te++]=it>>>20&1,ge[Te++]=it>>>21&1,ge[Te++]=it>>>22&1,ge[Te++]=it>>>23&1,ge[Te++]=it>>>24&1,ge[Te++]=it>>>25&1,ge[Te++]=it>>>26&1,ge[Te++]=it>>>27&1,ge[Te++]=it>>>28&1,ge[Te++]=it>>>29&1,ge[Te++]=it>>>30&1,ge[Te++]=it>>>31&1}})(R,d,L,W);break;case 2:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0;ge[Te++]=it>>>0&3,ge[Te++]=it>>>2&3,ge[Te++]=it>>>4&3,ge[Te++]=it>>>6&3,ge[Te++]=it>>>8&3,ge[Te++]=it>>>10&3,ge[Te++]=it>>>12&3,ge[Te++]=it>>>14&3,ge[Te++]=it>>>16&3,ge[Te++]=it>>>18&3,ge[Te++]=it>>>20&3,ge[Te++]=it>>>22&3,ge[Te++]=it>>>24&3,ge[Te++]=it>>>26&3,ge[Te++]=it>>>28&3,ge[Te++]=it>>>30&3,ge[Te++]=He>>>0&3,ge[Te++]=He>>>2&3,ge[Te++]=He>>>4&3,ge[Te++]=He>>>6&3,ge[Te++]=He>>>8&3,ge[Te++]=He>>>10&3,ge[Te++]=He>>>12&3,ge[Te++]=He>>>14&3,ge[Te++]=He>>>16&3,ge[Te++]=He>>>18&3,ge[Te++]=He>>>20&3,ge[Te++]=He>>>22&3,ge[Te++]=He>>>24&3,ge[Te++]=He>>>26&3,ge[Te++]=He>>>28&3,ge[Te++]=He>>>30&3}})(R,d,L,W);break;case 3:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0;ge[Te++]=it>>>0&7,ge[Te++]=it>>>3&7,ge[Te++]=it>>>6&7,ge[Te++]=it>>>9&7,ge[Te++]=it>>>12&7,ge[Te++]=it>>>15&7,ge[Te++]=it>>>18&7,ge[Te++]=it>>>21&7,ge[Te++]=it>>>24&7,ge[Te++]=it>>>27&7,ge[Te++]=7&(it>>>30|(1&He)<<2),ge[Te++]=He>>>1&7,ge[Te++]=He>>>4&7,ge[Te++]=He>>>7&7,ge[Te++]=He>>>10&7,ge[Te++]=He>>>13&7,ge[Te++]=He>>>16&7,ge[Te++]=He>>>19&7,ge[Te++]=He>>>22&7,ge[Te++]=He>>>25&7,ge[Te++]=He>>>28&7,ge[Te++]=7&(He>>>31|(3&bt)<<1),ge[Te++]=bt>>>2&7,ge[Te++]=bt>>>5&7,ge[Te++]=bt>>>8&7,ge[Te++]=bt>>>11&7,ge[Te++]=bt>>>14&7,ge[Te++]=bt>>>17&7,ge[Te++]=bt>>>20&7,ge[Te++]=bt>>>23&7,ge[Te++]=bt>>>26&7,ge[Te++]=bt>>>29&7}})(R,d,L,W);break;case 4:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0;ge[Te++]=it>>>0&15,ge[Te++]=it>>>4&15,ge[Te++]=it>>>8&15,ge[Te++]=it>>>12&15,ge[Te++]=it>>>16&15,ge[Te++]=it>>>20&15,ge[Te++]=it>>>24&15,ge[Te++]=it>>>28&15,ge[Te++]=He>>>0&15,ge[Te++]=He>>>4&15,ge[Te++]=He>>>8&15,ge[Te++]=He>>>12&15,ge[Te++]=He>>>16&15,ge[Te++]=He>>>20&15,ge[Te++]=He>>>24&15,ge[Te++]=He>>>28&15,ge[Te++]=bt>>>0&15,ge[Te++]=bt>>>4&15,ge[Te++]=bt>>>8&15,ge[Te++]=bt>>>12&15,ge[Te++]=bt>>>16&15,ge[Te++]=bt>>>20&15,ge[Te++]=bt>>>24&15,ge[Te++]=bt>>>28&15,ge[Te++]=Et>>>0&15,ge[Te++]=Et>>>4&15,ge[Te++]=Et>>>8&15,ge[Te++]=Et>>>12&15,ge[Te++]=Et>>>16&15,ge[Te++]=Et>>>20&15,ge[Te++]=Et>>>24&15,ge[Te++]=Et>>>28&15}})(R,d,L,W);break;case 5:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0;ge[Te++]=it>>>0&31,ge[Te++]=it>>>5&31,ge[Te++]=it>>>10&31,ge[Te++]=it>>>15&31,ge[Te++]=it>>>20&31,ge[Te++]=it>>>25&31,ge[Te++]=31&(it>>>30|(7&He)<<2),ge[Te++]=He>>>3&31,ge[Te++]=He>>>8&31,ge[Te++]=He>>>13&31,ge[Te++]=He>>>18&31,ge[Te++]=He>>>23&31,ge[Te++]=31&(He>>>28|(1&bt)<<4),ge[Te++]=bt>>>1&31,ge[Te++]=bt>>>6&31,ge[Te++]=bt>>>11&31,ge[Te++]=bt>>>16&31,ge[Te++]=bt>>>21&31,ge[Te++]=bt>>>26&31,ge[Te++]=31&(bt>>>31|(15&Et)<<1),ge[Te++]=Et>>>4&31,ge[Te++]=Et>>>9&31,ge[Te++]=Et>>>14&31,ge[Te++]=Et>>>19&31,ge[Te++]=Et>>>24&31,ge[Te++]=31&(Et>>>29|(3&Qt)<<3),ge[Te++]=Qt>>>2&31,ge[Te++]=Qt>>>7&31,ge[Te++]=Qt>>>12&31,ge[Te++]=Qt>>>17&31,ge[Te++]=Qt>>>22&31,ge[Te++]=Qt>>>27&31}})(R,d,L,W);break;case 6:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0;ge[Te++]=it>>>0&63,ge[Te++]=it>>>6&63,ge[Te++]=it>>>12&63,ge[Te++]=it>>>18&63,ge[Te++]=it>>>24&63,ge[Te++]=63&(it>>>30|(15&He)<<2),ge[Te++]=He>>>4&63,ge[Te++]=He>>>10&63,ge[Te++]=He>>>16&63,ge[Te++]=He>>>22&63,ge[Te++]=63&(He>>>28|(3&bt)<<4),ge[Te++]=bt>>>2&63,ge[Te++]=bt>>>8&63,ge[Te++]=bt>>>14&63,ge[Te++]=bt>>>20&63,ge[Te++]=bt>>>26&63,ge[Te++]=Et>>>0&63,ge[Te++]=Et>>>6&63,ge[Te++]=Et>>>12&63,ge[Te++]=Et>>>18&63,ge[Te++]=Et>>>24&63,ge[Te++]=63&(Et>>>30|(15&Qt)<<2),ge[Te++]=Qt>>>4&63,ge[Te++]=Qt>>>10&63,ge[Te++]=Qt>>>16&63,ge[Te++]=Qt>>>22&63,ge[Te++]=63&(Qt>>>28|(3&er)<<4),ge[Te++]=er>>>2&63,ge[Te++]=er>>>8&63,ge[Te++]=er>>>14&63,ge[Te++]=er>>>20&63,ge[Te++]=er>>>26&63}})(R,d,L,W);break;case 7:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0;ge[Te++]=it>>>0&127,ge[Te++]=it>>>7&127,ge[Te++]=it>>>14&127,ge[Te++]=it>>>21&127,ge[Te++]=127&(it>>>28|(7&He)<<4),ge[Te++]=He>>>3&127,ge[Te++]=He>>>10&127,ge[Te++]=He>>>17&127,ge[Te++]=He>>>24&127,ge[Te++]=127&(He>>>31|(63&bt)<<1),ge[Te++]=bt>>>6&127,ge[Te++]=bt>>>13&127,ge[Te++]=bt>>>20&127,ge[Te++]=127&(bt>>>27|(3&Et)<<5),ge[Te++]=Et>>>2&127,ge[Te++]=Et>>>9&127,ge[Te++]=Et>>>16&127,ge[Te++]=Et>>>23&127,ge[Te++]=127&(Et>>>30|(31&Qt)<<2),ge[Te++]=Qt>>>5&127,ge[Te++]=Qt>>>12&127,ge[Te++]=Qt>>>19&127,ge[Te++]=127&(Qt>>>26|(1&er)<<6),ge[Te++]=er>>>1&127,ge[Te++]=er>>>8&127,ge[Te++]=er>>>15&127,ge[Te++]=er>>>22&127,ge[Te++]=127&(er>>>29|(15&br)<<3),ge[Te++]=br>>>4&127,ge[Te++]=br>>>11&127,ge[Te++]=br>>>18&127,ge[Te++]=br>>>25&127}})(R,d,L,W);break;case 8:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0,sr=ue[Oe++]>>>0;ge[Te++]=it>>>0&255,ge[Te++]=it>>>8&255,ge[Te++]=it>>>16&255,ge[Te++]=it>>>24&255,ge[Te++]=He>>>0&255,ge[Te++]=He>>>8&255,ge[Te++]=He>>>16&255,ge[Te++]=He>>>24&255,ge[Te++]=bt>>>0&255,ge[Te++]=bt>>>8&255,ge[Te++]=bt>>>16&255,ge[Te++]=bt>>>24&255,ge[Te++]=Et>>>0&255,ge[Te++]=Et>>>8&255,ge[Te++]=Et>>>16&255,ge[Te++]=Et>>>24&255,ge[Te++]=Qt>>>0&255,ge[Te++]=Qt>>>8&255,ge[Te++]=Qt>>>16&255,ge[Te++]=Qt>>>24&255,ge[Te++]=er>>>0&255,ge[Te++]=er>>>8&255,ge[Te++]=er>>>16&255,ge[Te++]=er>>>24&255,ge[Te++]=br>>>0&255,ge[Te++]=br>>>8&255,ge[Te++]=br>>>16&255,ge[Te++]=br>>>24&255,ge[Te++]=sr>>>0&255,ge[Te++]=sr>>>8&255,ge[Te++]=sr>>>16&255,ge[Te++]=sr>>>24&255}})(R,d,L,W);break;case 16:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<128;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=65535&it,ge[Te++]=it>>>16&65535}})(R,d,L,W);break;default:(function(ue,me,ge,Ce,Te){let Oe=B3[Te]>>>0,Pe=me,it=0,He=ue[Pe]>>>0,bt=Ce;for(let Et=0;Et<8;Et++){for(let Qt=0;Qt<32;Qt++)if(it+Te<=32)ge[bt+Qt]=He>>>it&Oe,it+=Te,it===32&&(it=0,Pe++,Qt!==31&&(He=ue[Pe]>>>0));else{let er=32-it,br=He>>>it;Pe++,He=ue[Pe]>>>0;let sr=Te-er;ge[bt+Qt]=(br|(He&-1>>>32-sr>>>0)<>>0)}})(R,d,L,W,te)}return d+(te<<3)|0}function AY(R,d,L,W){if(L+2>d)throw new Error(`FastPFOR decode: byteContainer underflow at block=${W} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${L}, byteSize=${d})`);let te=R[L++],ue=R[L++];if(te>32)throw new Error(`FastPFOR decode: invalid bitWidth=${te} at block=${W} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:te,exceptionCount:ue,bytePosIn:L}}function MY(R,d,L,W,te,ue,me,ge,Ce){let{maxBits:Te,exceptionBitWidth:Oe,bytePosIn:Pe}=function(Qt,er,br,sr,Mr,qr){if(br+1>er)throw new Error(`FastPFOR decode: exception header underflow at block=${qr} (need 1 byte for maxBits, bytePos=${br}, byteSize=${er})`);let $r=Qt[br++];if($r32)throw new Error(`FastPFOR decode: invalid maxBits=${$r} at block=${qr} (bitWidth=${sr}, expected ${sr}..32)`);let _a=$r-sr|0;if(_a<1||_a>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${_a} at block=${qr} (bitWidth=${sr}, maxBits=${$r})`);if(br+Mr>er)throw new Error(`FastPFOR decode: exception positions underflow at block=${qr} (need=${Mr}, have=${er-br})`);return{maxBits:$r,exceptionBitWidth:_a,bytePosIn:br}}(te,ue,me,L,W,Ce);if(me=Pe,Oe===1){let Qt=1<Et)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${Oe} (ptr=${bt}, need ${W}, size=${Et}) at block ${Ce}`);for(let Qt=0;QtR.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${ge} at pageStart=${me} (expected > 0 and pageStart+whereMeta < encoded.length=${R.length})`);let Ce=me+1|0,Te=me+ge|0,Oe=R[Te]>>>0,Pe=Oe+3>>>2,it=Te+1,He=it+Pe;if(He>=R.length)throw new Error(`FastPFOR decode: invalid byteSize=${Oe} (metaInts=${Pe}, pageStart=${me}, packedEnd=${Te}, byteContainerStart=${it}) causes bitmapPos=${He} out of bounds (encoded.length=${R.length})`);let bt=function(er,br,sr,Mr){Mr.byteContainer.length>>2;if(3&qr.byteOffset)for(let Ca=0;Ca<$r;Ca=Ca+1|0){let nn=0|er[br+Ca|0],qa=Ca<<2;qr[qa]=255&nn,qr[qa+1|0]=nn>>>8&255,qr[qa+2|0]=nn>>>16&255,qr[qa+3|0]=nn>>>24&255}else{let Ca=Mr.byteContainerI32;(!Ca||Ca.buffer!==qr.buffer||Ca.byteOffset!==qr.byteOffset||Ca.length<$r)&&(Ca=Mr.byteContainerI32=new Int32Array(qr.buffer,qr.byteOffset,qr.byteLength>>>2)),Ca.set(er.subarray(br,br+$r))}let _a=3&sr;if(_a>0){let Ca=0|er[br+$r|0],nn=$r<<2;for(let qa=0;qa<_a;qa=qa+1|0)qr[nn+qa|0]=Ca>>>(qa<<3)&255}return qr}(R,it,Oe,ue),Et=Oe,Qt=function(er,br,sr){let Mr=0|er[br++],qr=sr.dataToBePacked;for(let $r=2;$r<=32;$r=$r+1|0){if(!(Mr>>>$r-1&1))continue;if(br>=er.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${$r}, streamWordIndex=${br}, needWords=1, availableWords=${er.length-br}, encodedWords=${er.length})`);let _a=er[br++]>>>0,Ca=O3(_a+31,32),nn=_a*$r+31>>>5;if(br+nn>er.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${$r}, size=${_a}, streamWordIndex=${br}, needWords=${nn}, availableWords=${er.length-br}, encodedWords=${er.length})`);let qa=qr[$r];(!qa||qa.length>>5)|0,sr.exceptionSizes[$r]=_a}return br}(R,He,ue);return ue.dataPointers.fill(0),function(er,br,sr,Mr,qr,$r,_a,Ca,nn,qa){let bn=0|sr,Fn=0;for(let gn=0;gn<_a;gn=gn+1|0){let Va=AY(Ca,nn,Fn,gn);Fn=Va.bytePosIn;let Hn=Va.bitWidth,ni=Va.exceptionCount,Wn=$r+gn*Xd|0;switch(Hn){case 0:qr.fill(0,Wn,Wn+Xd);break;case 32:for(let si=0;si0&&(Fn=MY(qr,Wn,Hn,ni,Ca,nn,Fn,qa,gn))}if(bn!==Mr)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${br}, packedStart=${sr}, consumedPackedEnd=${bn}, expectedPackedEnd=${Mr}, packedWords=${Mr-sr}, encoded.length=${er.length})`)}(R,me,Ce,Te,d,0|W,te/Xd|0,bt,Et,ue),Qt}function EY(R,d,L,W,te){switch(te){case 2:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0;Pe[He++]=bt>>>0&3,Pe[He++]=bt>>>2&3,Pe[He++]=bt>>>4&3,Pe[He++]=bt>>>6&3,Pe[He++]=bt>>>8&3,Pe[He++]=bt>>>10&3,Pe[He++]=bt>>>12&3,Pe[He++]=bt>>>14&3,Pe[He++]=bt>>>16&3,Pe[He++]=bt>>>18&3,Pe[He++]=bt>>>20&3,Pe[He++]=bt>>>22&3,Pe[He++]=bt>>>24&3,Pe[He++]=bt>>>26&3,Pe[He++]=bt>>>28&3,Pe[He++]=bt>>>30&3,Pe[He++]=Et>>>0&3,Pe[He++]=Et>>>2&3,Pe[He++]=Et>>>4&3,Pe[He++]=Et>>>6&3,Pe[He++]=Et>>>8&3,Pe[He++]=Et>>>10&3,Pe[He++]=Et>>>12&3,Pe[He++]=Et>>>14&3,Pe[He++]=Et>>>16&3,Pe[He++]=Et>>>18&3,Pe[He++]=Et>>>20&3,Pe[He++]=Et>>>22&3,Pe[He++]=Et>>>24&3,Pe[He++]=Et>>>26&3,Pe[He++]=Et>>>28&3,Pe[He]=Et>>>30&3}(R,d,L,W);case 3:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0;Pe[He++]=bt>>>0&7,Pe[He++]=bt>>>3&7,Pe[He++]=bt>>>6&7,Pe[He++]=bt>>>9&7,Pe[He++]=bt>>>12&7,Pe[He++]=bt>>>15&7,Pe[He++]=bt>>>18&7,Pe[He++]=bt>>>21&7,Pe[He++]=bt>>>24&7,Pe[He++]=bt>>>27&7,Pe[He++]=7&(bt>>>30|(1&Et)<<2),Pe[He++]=Et>>>1&7,Pe[He++]=Et>>>4&7,Pe[He++]=Et>>>7&7,Pe[He++]=Et>>>10&7,Pe[He++]=Et>>>13&7,Pe[He++]=Et>>>16&7,Pe[He++]=Et>>>19&7,Pe[He++]=Et>>>22&7,Pe[He++]=Et>>>25&7,Pe[He++]=Et>>>28&7,Pe[He++]=7&(Et>>>31|(3&Qt)<<1),Pe[He++]=Qt>>>2&7,Pe[He++]=Qt>>>5&7,Pe[He++]=Qt>>>8&7,Pe[He++]=Qt>>>11&7,Pe[He++]=Qt>>>14&7,Pe[He++]=Qt>>>17&7,Pe[He++]=Qt>>>20&7,Pe[He++]=Qt>>>23&7,Pe[He++]=Qt>>>26&7,Pe[He]=Qt>>>29&7}(R,d,L,W);case 4:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0;Pe[He++]=bt>>>0&15,Pe[He++]=bt>>>4&15,Pe[He++]=bt>>>8&15,Pe[He++]=bt>>>12&15,Pe[He++]=bt>>>16&15,Pe[He++]=bt>>>20&15,Pe[He++]=bt>>>24&15,Pe[He++]=bt>>>28&15,Pe[He++]=Et>>>0&15,Pe[He++]=Et>>>4&15,Pe[He++]=Et>>>8&15,Pe[He++]=Et>>>12&15,Pe[He++]=Et>>>16&15,Pe[He++]=Et>>>20&15,Pe[He++]=Et>>>24&15,Pe[He++]=Et>>>28&15,Pe[He++]=Qt>>>0&15,Pe[He++]=Qt>>>4&15,Pe[He++]=Qt>>>8&15,Pe[He++]=Qt>>>12&15,Pe[He++]=Qt>>>16&15,Pe[He++]=Qt>>>20&15,Pe[He++]=Qt>>>24&15,Pe[He++]=Qt>>>28&15,Pe[He++]=er>>>0&15,Pe[He++]=er>>>4&15,Pe[He++]=er>>>8&15,Pe[He++]=er>>>12&15,Pe[He++]=er>>>16&15,Pe[He++]=er>>>20&15,Pe[He++]=er>>>24&15,Pe[He]=er>>>28&15}(R,d,L,W);case 5:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0;Pe[He++]=bt>>>0&31,Pe[He++]=bt>>>5&31,Pe[He++]=bt>>>10&31,Pe[He++]=bt>>>15&31,Pe[He++]=bt>>>20&31,Pe[He++]=bt>>>25&31,Pe[He++]=31&(bt>>>30|(7&Et)<<2),Pe[He++]=Et>>>3&31,Pe[He++]=Et>>>8&31,Pe[He++]=Et>>>13&31,Pe[He++]=Et>>>18&31,Pe[He++]=Et>>>23&31,Pe[He++]=31&(Et>>>28|(1&Qt)<<4),Pe[He++]=Qt>>>1&31,Pe[He++]=Qt>>>6&31,Pe[He++]=Qt>>>11&31,Pe[He++]=Qt>>>16&31,Pe[He++]=Qt>>>21&31,Pe[He++]=Qt>>>26&31,Pe[He++]=31&(Qt>>>31|(15&er)<<1),Pe[He++]=er>>>4&31,Pe[He++]=er>>>9&31,Pe[He++]=er>>>14&31,Pe[He++]=er>>>19&31,Pe[He++]=er>>>24&31,Pe[He++]=31&(er>>>29|(3&br)<<3),Pe[He++]=br>>>2&31,Pe[He++]=br>>>7&31,Pe[He++]=br>>>12&31,Pe[He++]=br>>>17&31,Pe[He++]=br>>>22&31,Pe[He]=br>>>27&31}(R,d,L,W);case 6:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0;Pe[He++]=bt>>>0&63,Pe[He++]=bt>>>6&63,Pe[He++]=bt>>>12&63,Pe[He++]=bt>>>18&63,Pe[He++]=bt>>>24&63,Pe[He++]=63&(bt>>>30|(15&Et)<<2),Pe[He++]=Et>>>4&63,Pe[He++]=Et>>>10&63,Pe[He++]=Et>>>16&63,Pe[He++]=Et>>>22&63,Pe[He++]=63&(Et>>>28|(3&Qt)<<4),Pe[He++]=Qt>>>2&63,Pe[He++]=Qt>>>8&63,Pe[He++]=Qt>>>14&63,Pe[He++]=Qt>>>20&63,Pe[He++]=Qt>>>26&63,Pe[He++]=er>>>0&63,Pe[He++]=er>>>6&63,Pe[He++]=er>>>12&63,Pe[He++]=er>>>18&63,Pe[He++]=er>>>24&63,Pe[He++]=63&(er>>>30|(15&br)<<2),Pe[He++]=br>>>4&63,Pe[He++]=br>>>10&63,Pe[He++]=br>>>16&63,Pe[He++]=br>>>22&63,Pe[He++]=63&(br>>>28|(3&sr)<<4),Pe[He++]=sr>>>2&63,Pe[He++]=sr>>>8&63,Pe[He++]=sr>>>14&63,Pe[He++]=sr>>>20&63,Pe[He]=sr>>>26&63}(R,d,L,W);case 7:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0;Pe[He++]=bt>>>0&127,Pe[He++]=bt>>>7&127,Pe[He++]=bt>>>14&127,Pe[He++]=bt>>>21&127,Pe[He++]=127&(bt>>>28|(7&Et)<<4),Pe[He++]=Et>>>3&127,Pe[He++]=Et>>>10&127,Pe[He++]=Et>>>17&127,Pe[He++]=Et>>>24&127,Pe[He++]=127&(Et>>>31|(63&Qt)<<1),Pe[He++]=Qt>>>6&127,Pe[He++]=Qt>>>13&127,Pe[He++]=Qt>>>20&127,Pe[He++]=127&(Qt>>>27|(3&er)<<5),Pe[He++]=er>>>2&127,Pe[He++]=er>>>9&127,Pe[He++]=er>>>16&127,Pe[He++]=er>>>23&127,Pe[He++]=127&(er>>>30|(31&br)<<2),Pe[He++]=br>>>5&127,Pe[He++]=br>>>12&127,Pe[He++]=br>>>19&127,Pe[He++]=127&(br>>>26|(1&sr)<<6),Pe[He++]=sr>>>1&127,Pe[He++]=sr>>>8&127,Pe[He++]=sr>>>15&127,Pe[He++]=sr>>>22&127,Pe[He++]=127&(sr>>>29|(15&Mr)<<3),Pe[He++]=Mr>>>4&127,Pe[He++]=Mr>>>11&127,Pe[He++]=Mr>>>18&127,Pe[He]=Mr>>>25&127}(R,d,L,W);case 8:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0;Pe[He++]=bt>>>0&255,Pe[He++]=bt>>>8&255,Pe[He++]=bt>>>16&255,Pe[He++]=bt>>>24&255,Pe[He++]=Et>>>0&255,Pe[He++]=Et>>>8&255,Pe[He++]=Et>>>16&255,Pe[He++]=Et>>>24&255,Pe[He++]=Qt>>>0&255,Pe[He++]=Qt>>>8&255,Pe[He++]=Qt>>>16&255,Pe[He++]=Qt>>>24&255,Pe[He++]=er>>>0&255,Pe[He++]=er>>>8&255,Pe[He++]=er>>>16&255,Pe[He++]=er>>>24&255,Pe[He++]=br>>>0&255,Pe[He++]=br>>>8&255,Pe[He++]=br>>>16&255,Pe[He++]=br>>>24&255,Pe[He++]=sr>>>0&255,Pe[He++]=sr>>>8&255,Pe[He++]=sr>>>16&255,Pe[He++]=sr>>>24&255,Pe[He++]=Mr>>>0&255,Pe[He++]=Mr>>>8&255,Pe[He++]=Mr>>>16&255,Pe[He++]=Mr>>>24&255,Pe[He++]=qr>>>0&255,Pe[He++]=qr>>>8&255,Pe[He++]=qr>>>16&255,Pe[He]=qr>>>24&255}(R,d,L,W);case 9:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0;Pe[He++]=bt>>>0&511,Pe[He++]=bt>>>9&511,Pe[He++]=bt>>>18&511,Pe[He++]=511&(bt>>>27|(15&Et)<<5),Pe[He++]=Et>>>4&511,Pe[He++]=Et>>>13&511,Pe[He++]=Et>>>22&511,Pe[He++]=511&(Et>>>31|(255&Qt)<<1),Pe[He++]=Qt>>>8&511,Pe[He++]=Qt>>>17&511,Pe[He++]=511&(Qt>>>26|(7&er)<<6),Pe[He++]=er>>>3&511,Pe[He++]=er>>>12&511,Pe[He++]=er>>>21&511,Pe[He++]=511&(er>>>30|(127&br)<<2),Pe[He++]=br>>>7&511,Pe[He++]=br>>>16&511,Pe[He++]=511&(br>>>25|(3&sr)<<7),Pe[He++]=sr>>>2&511,Pe[He++]=sr>>>11&511,Pe[He++]=sr>>>20&511,Pe[He++]=511&(sr>>>29|(63&Mr)<<3),Pe[He++]=Mr>>>6&511,Pe[He++]=Mr>>>15&511,Pe[He++]=511&(Mr>>>24|(1&qr)<<8),Pe[He++]=qr>>>1&511,Pe[He++]=qr>>>10&511,Pe[He++]=qr>>>19&511,Pe[He++]=511&(qr>>>28|(31&$r)<<4),Pe[He++]=$r>>>5&511,Pe[He++]=$r>>>14&511,Pe[He]=$r>>>23&511}(R,d,L,W);case 10:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0;Pe[He++]=bt>>>0&1023,Pe[He++]=bt>>>10&1023,Pe[He++]=bt>>>20&1023,Pe[He++]=1023&(bt>>>30|(255&Et)<<2),Pe[He++]=Et>>>8&1023,Pe[He++]=Et>>>18&1023,Pe[He++]=1023&(Et>>>28|(63&Qt)<<4),Pe[He++]=Qt>>>6&1023,Pe[He++]=Qt>>>16&1023,Pe[He++]=1023&(Qt>>>26|(15&er)<<6),Pe[He++]=er>>>4&1023,Pe[He++]=er>>>14&1023,Pe[He++]=1023&(er>>>24|(3&br)<<8),Pe[He++]=br>>>2&1023,Pe[He++]=br>>>12&1023,Pe[He++]=br>>>22&1023,Pe[He++]=sr>>>0&1023,Pe[He++]=sr>>>10&1023,Pe[He++]=sr>>>20&1023,Pe[He++]=1023&(sr>>>30|(255&Mr)<<2),Pe[He++]=Mr>>>8&1023,Pe[He++]=Mr>>>18&1023,Pe[He++]=1023&(Mr>>>28|(63&qr)<<4),Pe[He++]=qr>>>6&1023,Pe[He++]=qr>>>16&1023,Pe[He++]=1023&(qr>>>26|(15&$r)<<6),Pe[He++]=$r>>>4&1023,Pe[He++]=$r>>>14&1023,Pe[He++]=1023&($r>>>24|(3&_a)<<8),Pe[He++]=_a>>>2&1023,Pe[He++]=_a>>>12&1023,Pe[He]=_a>>>22&1023}(R,d,L,W);case 11:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0;Pe[He++]=bt>>>0&2047,Pe[He++]=bt>>>11&2047,Pe[He++]=2047&(bt>>>22|(1&Et)<<10),Pe[He++]=Et>>>1&2047,Pe[He++]=Et>>>12&2047,Pe[He++]=2047&(Et>>>23|(3&Qt)<<9),Pe[He++]=Qt>>>2&2047,Pe[He++]=Qt>>>13&2047,Pe[He++]=2047&(Qt>>>24|(7&er)<<8),Pe[He++]=er>>>3&2047,Pe[He++]=er>>>14&2047,Pe[He++]=2047&(er>>>25|(15&br)<<7),Pe[He++]=br>>>4&2047,Pe[He++]=br>>>15&2047,Pe[He++]=2047&(br>>>26|(31&sr)<<6),Pe[He++]=sr>>>5&2047,Pe[He++]=sr>>>16&2047,Pe[He++]=2047&(sr>>>27|(63&Mr)<<5),Pe[He++]=Mr>>>6&2047,Pe[He++]=Mr>>>17&2047,Pe[He++]=2047&(Mr>>>28|(127&qr)<<4),Pe[He++]=qr>>>7&2047,Pe[He++]=qr>>>18&2047,Pe[He++]=2047&(qr>>>29|(255&$r)<<3),Pe[He++]=$r>>>8&2047,Pe[He++]=$r>>>19&2047,Pe[He++]=2047&($r>>>30|(511&_a)<<2),Pe[He++]=_a>>>9&2047,Pe[He++]=_a>>>20&2047,Pe[He++]=2047&(_a>>>31|(1023&Ca)<<1),Pe[He++]=Ca>>>10&2047,Pe[He]=Ca>>>21&2047}(R,d,L,W);case 12:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0;Pe[He++]=bt>>>0&4095,Pe[He++]=bt>>>12&4095,Pe[He++]=4095&(bt>>>24|(15&Et)<<8),Pe[He++]=Et>>>4&4095,Pe[He++]=Et>>>16&4095,Pe[He++]=4095&(Et>>>28|(255&Qt)<<4),Pe[He++]=Qt>>>8&4095,Pe[He++]=Qt>>>20&4095,Pe[He++]=er>>>0&4095,Pe[He++]=er>>>12&4095,Pe[He++]=4095&(er>>>24|(15&br)<<8),Pe[He++]=br>>>4&4095,Pe[He++]=br>>>16&4095,Pe[He++]=4095&(br>>>28|(255&sr)<<4),Pe[He++]=sr>>>8&4095,Pe[He++]=sr>>>20&4095,Pe[He++]=Mr>>>0&4095,Pe[He++]=Mr>>>12&4095,Pe[He++]=4095&(Mr>>>24|(15&qr)<<8),Pe[He++]=qr>>>4&4095,Pe[He++]=qr>>>16&4095,Pe[He++]=4095&(qr>>>28|(255&$r)<<4),Pe[He++]=$r>>>8&4095,Pe[He++]=$r>>>20&4095,Pe[He++]=_a>>>0&4095,Pe[He++]=_a>>>12&4095,Pe[He++]=4095&(_a>>>24|(15&Ca)<<8),Pe[He++]=Ca>>>4&4095,Pe[He++]=Ca>>>16&4095,Pe[He++]=4095&(Ca>>>28|(255&nn)<<4),Pe[He++]=nn>>>8&4095,Pe[He]=nn>>>20&4095}(R,d,L,W);case 16:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0,qa=Te[Oe+12]>>>0,bn=Te[Oe+13]>>>0,Fn=Te[Oe+14]>>>0,gn=Te[Oe+15]>>>0;Pe[He++]=bt>>>0&65535,Pe[He++]=bt>>>16&65535,Pe[He++]=Et>>>0&65535,Pe[He++]=Et>>>16&65535,Pe[He++]=Qt>>>0&65535,Pe[He++]=Qt>>>16&65535,Pe[He++]=er>>>0&65535,Pe[He++]=er>>>16&65535,Pe[He++]=br>>>0&65535,Pe[He++]=br>>>16&65535,Pe[He++]=sr>>>0&65535,Pe[He++]=sr>>>16&65535,Pe[He++]=Mr>>>0&65535,Pe[He++]=Mr>>>16&65535,Pe[He++]=qr>>>0&65535,Pe[He++]=qr>>>16&65535,Pe[He++]=$r>>>0&65535,Pe[He++]=$r>>>16&65535,Pe[He++]=_a>>>0&65535,Pe[He++]=_a>>>16&65535,Pe[He++]=Ca>>>0&65535,Pe[He++]=Ca>>>16&65535,Pe[He++]=nn>>>0&65535,Pe[He++]=nn>>>16&65535,Pe[He++]=qa>>>0&65535,Pe[He++]=qa>>>16&65535,Pe[He++]=bn>>>0&65535,Pe[He++]=bn>>>16&65535,Pe[He++]=Fn>>>0&65535,Pe[He++]=Fn>>>16&65535,Pe[He++]=gn>>>0&65535,Pe[He]=gn>>>16&65535}(R,d,L,W);case 32:for(let Te=0;Te<32;Te=Te+1|0)L[W+Te|0]=0|R[d+Te|0];return}let ue=B3[te]>>>0,me=d,ge=0,Ce=R[me]>>>0;for(let Te=0;Te<32;Te++)if(ge+te<=32)L[W+Te]=Ce>>>ge&ue,ge+=te,ge===32&&(ge=0,me++,Te!==31&&(Ce=R[me]>>>0));else{let Oe=32-ge,Pe=Ce>>>ge;me++,Ce=R[me]>>>0,L[W+Te]=(Pe|(Ce&B3[te-Oe]>>>0)<=64)throw new Error("Varint too long")}return d.set(te),L}function CY(R,d){let L,W;return W=R[d.get()],d.increment(),L=127&W,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<7,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<14,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<21,W<128?L:(W=R[d.get()],L|=(15&W)<<28,function(te,ue,me){let ge,Ce;if(Ce=ue[me.get()],me.increment(),ge=(112&Ce)>>4,Ce<128||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<3,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<10,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<17,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<24,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(1&Ce)<<31,Ce<128))return 4294967296*ge+(te>>>0);throw new Error("Expected varint not more than 10 bytes")}(L,R,d)))))}function Js(R){return R>>>1^-(1&R)}function fh(R){return R>>BigInt("1")^-(BigInt("1")&R)}function C0(R){return R%2==1?(R+1)/-2:R/2}function j3(R,d,L){if(L===void 0){L=0;for(let ue=0;ue=4)for(;W=4)for(;W=4)for(let W=R[0];L>4],ge=null;switch(me){case Tf.DATA:ge={dictionaryType:Object.values(fd)[15&ue]};break;case Tf.OFFSET:ge={offsetType:Object.values(kv)[15&ue]};break;case Tf.LENGTH:ge={lengthType:Object.values(Rh)[15&ue]}}te.increment();let Ce=W[te.get()],Te=Object.values(us)[Ce>>5],Oe=Object.values(us)[Ce>>2&7],Pe=Object.values(Tp)[3&Ce];te.increment();let it=Yf(W,te,2),He=it[0];return{physicalStreamType:me,logicalStreamType:ge,logicalLevelTechnique1:Te,logicalLevelTechnique2:Oe,physicalLevelTechnique:Pe,numValues:He,byteLength:it[1],decompressedCount:He}}(R,d);return L.logicalLevelTechnique1===us.MORTON?function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:W.decompressedCount,numBits:me[0],coordinateShift:me[1]}}(L,R,d):us.RLE!==L.logicalLevelTechnique1&&us.RLE!==L.logicalLevelTechnique2||Tp.NONE===L.physicalLevelTechnique?L:function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:me[1],runs:me[0],numRleValues:me[1]}}(L,R,d)}(function(R){R.PRESENT="PRESENT",R.DATA="DATA",R.OFFSET="OFFSET",R.LENGTH="LENGTH"})(Tf||(Tf={})),function(R){R.NONE="NONE",R.SINGLE="SINGLE",R.SHARED="SHARED",R.VERTEX="VERTEX",R.MORTON="MORTON",R.FSST="FSST"}(fd||(fd={})),function(R){R.VERTEX="VERTEX",R.INDEX="INDEX",R.STRING="STRING",R.KEY="KEY"}(kv||(kv={})),function(R){R.VAR_BINARY="VAR_BINARY",R.GEOMETRIES="GEOMETRIES",R.PARTS="PARTS",R.RINGS="RINGS",R.TRIANGLES="TRIANGLES",R.SYMBOL="SYMBOL",R.DICTIONARY="DICTIONARY"}(Rh||(Rh={})),function(R){R[R.FLAT=0]="FLAT",R[R.CONST=1]="CONST",R[R.SEQUENCE=2]="SEQUENCE",R[R.DICTIONARY=3]="DICTIONARY",R[R.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(Gl||(Gl={}));class hd{constructor(d,L){this.values=d,this._size=L}get(d){let L=Math.floor(d/8);return(this.values[L]>>d%8&1)==1}set(d,L){let W=Math.floor(d/8);this.values[W]=this.values[W]|(L?1:0)<>d%8&1}size(){return this._size}getBuffer(){return this.values}}function L0(R,d,L){if(!d)return R;let W=d.size(),te=new R.constructor(W),ue=0;for(let me=0;me=4)for(;He>>0;for(let it=1;it>>0;return Pe}(me.logicalLevelTechnique2===us.RLE?j3(ue,me.runs,me.numRleValues):ue);break;case us.RLE:Te=j3(ue,me.runs,me.numRleValues);break;case us.MORTON:q3(ue),Te=ue;break;case us.COMPONENTWISE_DELTA:Te=function(Oe){if(Oe.length<2)return new Uint32Array(Oe);let Pe=new Uint32Array(Oe.length);Pe[0]=Js(Oe[0])>>>0,Pe[1]=Js(Oe[1])>>>0;for(let it=2;it>>0,Pe[it+1]=Pe[it-1]+Js(Oe[it+1])>>>0;return Pe}(ue);break;case us.NONE:Te=ue;break;default:throw new Error(`The specified Logical level technique is not supported: ${me.logicalLevelTechnique1}`)}return Ce?L0(Te,Ce,0):Te}(P0(R,d,L),L,0,te)}function Mp(R,d,L){return function(W,te){if(te.logicalLevelTechnique1===us.DELTA&&te.logicalLevelTechnique2===us.NONE)return function(ue){let me=new Int32Array(ue.length+1);me[0]=0,me[1]=Js(ue[0]);let ge=me[1];for(let Ce=2;Ce!==me.length;++Ce)ge+=Js(ue[Ce-1]),me[Ce]=me[Ce-1]+ge;return new Uint32Array(me)}(W);if(te.logicalLevelTechnique1===us.RLE&&te.logicalLevelTechnique2===us.NONE)return function(ue,me,ge){let Ce=new Uint32Array(ge+1);Ce[0]=0;let Te=1,Oe=Ce[0];for(let Pe=0;Pe>>2,Et=function(er,br){if(br<=er.encodedWords.length)return er.encodedWords;let sr=new Uint32Array(Math.max(16,2*br));return er.encodedWords=sr,sr}(it,bt);(function(er,br,sr,Mr){if(br<0||sr<0||br+sr>er.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${br}, byteLength=${sr}, bytes.length=${er.length})`);let qr=Math.floor(sr/4),$r=sr%4!=0,_a=$r?qr+1:qr;if(Mr.length<_a)throw new RangeError(`decodeBigEndianInt32sInto: out.length=${Mr.length} < ${_a}`);if(qr>0){let Ca=er.byteOffset+br;if(3&Ca)for(let nn=0;nn0){let Ca=0|er[Mr];if(Mr=Mr+1|0,255&Ca)throw new Error(`FastPFOR decode: invalid alignedLength=${Ca} (expected multiple of 256)`);if(qr+Ca>$r.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${qr}, alignedLength=${Ca}, out.length=${$r.length})`);Mr=function(nn,qa,bn,Fn,gn,Va){let Hn=Fn+O3(gn,Xd),ni=Fn,Wn=bn;for(;ni!==Hn;){let si=Math.min(N3,Hn-ni);Wn=SY(nn,qa,Wn,ni,si,Va),ni=ni+si|0}return Wn}(er,$r,Mr,qr,Ca,_a),qr=qr+Ca|0}return function(Ca,nn,qa,bn,Fn,gn){if(gn===0)return nn;let Va=0,Hn=nn,ni=nn+qa,Wn=Fn,si=Fn,po=Fn+gn,cs=0,Ds=0;for(;Hn>>Va&255;if(Va+=8,Hn+=Va>>>5,Va&=31,cs|=(127&Xs)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${Ds}, partial=${cs}, decoded=${si-Wn}/${gn}, inPos=${Hn}, inEnd=${ni})`)}if(si!==po)throw new Error(`FastPFOR VByte: truncated stream (decoded=${si-Wn}, expected=${gn}, consumedWords=${Hn-nn}/${qa}, vbyteStart=${nn}, vbyteEnd=${ni})`)}(er,Mr,er.length-Mr|0,$r,qr,br-qr|0),$r}(Et.subarray(0,bt),Te,it.decoderWorkspace);return Pe.add(Oe),Qt}(te,ue,me,ge,function(Ce=16){if(Ce<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${Ce}`);let Te=Math.max(16,0|Ce);return{encodedWords:new Uint32Array(Te),decoderWorkspace:bS()}}(me>>>2))}(R,L.numValues,L.byteLength,d);case Tp.VARINT:return Yf(R,d,L.numValues);case Tp.NONE:{let te=d.get();d.add(L.byteLength);let ue=R.subarray(te,d.get());return new Uint32Array(ue)}default:throw new Error(`Specified physicalLevelTechnique ${W} is not supported (yet).`)}}function G3(R,d,L){let W=P0(R,d,L);return W.length===1?W[0]:function(te){return te[1]}(W)}function SS(R,d,L){return function(W){if(W.length===2){let te=Js(W[1]);return[te,te]}return[Js(W[2]),Js(W[3])]}(P0(R,d,L))}function ES(R,d,L){return function(W){if(W.length===2){let te=fh(W[1]);return[te,te]}return[fh(W[2]),fh(W[3])]}(k0(R,d,L.numValues))}function kS(R,d,L,W){return function(te,ue,me){let ge;switch(ue.logicalLevelTechnique1){case us.DELTA:ge=function(Ce){let Te=new BigUint64Array(Ce.length);Te[0]=BigInt.asUintN(64,fh(Ce[0]));for(let Oe=1;Oe>1,d)-L}}function RS(R,d){let L=0;for(let W=0;W>W;return L}function R0(R,d,L,W,te,ue,me){return R===Ap.MORTON?function(ge,Ce,Te,Oe,Pe,it){let He=new Array(Pe?Oe+1:Oe);for(let bt=0;bt[qr]),W+=sr,te+=sr}break;case Ic.LINESTRING:{let sr,Mr;Qt?(sr=He[te]-He[te-1],te++):sr=it[W]-it[W-1],W++,Et?(Mr=I0(er,ge,sr,!1),ge+=2*sr):(Mr=R0(d.vertexBufferType,er,bt,Ce,sr,!1,Te),Ce+=sr),L[me++]=[Mr],Pe&&ue++}break;case Ic.POLYGON:{let sr=it[W]-it[W-1];W++;let Mr=new Array(sr-1),qr,$r=He[te]-He[te-1];if(te++,Et){qr=I0(er,ge,$r,!0),ge+=2*$r;for(let _a=0;_a0&&Et.push(Et[0]),it.push(Et)}d[Oe]=it,ue&&Te++}break;case Ic.MULTIPOLYGON:{let Pe=ue[Te]-ue[Te-1];Te++;let it=[];for(let He=0;He0&&er.push(er[0]),it.push(er)}}d[Oe]=it}}return d}[Symbol.iterator](){return null}}function BS(R,d,L,W,te,ue){return new LY(R,d,L,W,te,ue)}class LY extends zS{constructor(d,L,W,te,ue,me){super(W,te,ue,me),this._numGeometries=d,this._geometryType=L}geometryType(d){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function OS(R,d,L,W,te){return new PY(R,d,L,W,te)}class PY extends zS{constructor(d,L,W,te,ue){super(L,W,te,ue),this._geometryTypes=d}geometryType(d){return this._geometryTypes[d]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function RY(R,d,L,W,te){let ue=hh(R,L),me,ge,Ce,Te;if(My(ue,W,R,L)===Gl.CONST){let br=G3(R,L,ue),sr,Mr,qr,$r;for(let _a=0;_aL?d[ue++]:1);return W}function NS(R,d,L,W){let te=new Uint32Array(d[d.length-1]+1),ue=0;te[0]=ue;let me=1,ge=0;for(let Ce=0;Ce=it);){let He=me[Te.increment()];if(He<=127){let bt=He+3,Et=me[Te.increment()],Qt=Math.min(Pe+bt,ge);Oe.fill(Et,Pe,Qt),Pe=Qt}else{let bt=256-He;for(let Et=0;Et=12?FY.decode(R.subarray(d,L)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(R,d,L)}class X3 extends E0{constructor(d,L,W,te){super(d,W,te),this.offsetBuffer=L}}class US extends X3{constructor(d,L,W,te){super(d,L,W,te??L.length-1)}getValueFromBuffer(d){return Y3(this.dataBuffer,this.offsetBuffer[d],this.offsetBuffer[d+1])}}class D0 extends X3{constructor(d,L,W,te,ue){super(d,W,te,ue??L.length),this.indexBuffer=L,this.indexBuffer=L}getValueFromBuffer(d){let L=this.indexBuffer[d];return Y3(this.dataBuffer,this.offsetBuffer[L],this.offsetBuffer[L+1])}}class qS extends X3{constructor(d,L,W,te,ue,me,ge){super(d,W,te,ge),this.indexBuffer=L,this.symbolOffsetBuffer=ue,this.symbolTableBuffer=me}getValueFromBuffer(d){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(W,te,ue){let me=[],ge=new Array(te.length).fill(0);for(let Ce=1;Ce=10}function HS(R){return R===30}function BY(R){if(R.type==="scalarType"){let d=R.scalarType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(d.type==="logicalType")return!1}else if(R.type==="complexType"){let d=R.complexType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",R),!1}function OY(R){var d;return R.type==="complexType"&&((d=R.complexType)==null?void 0:d.type)==="physicalType"&&R.complexType.physicalType===0}let NY=new TextDecoder;function Z3(R,d){let L=Yf(R,d,1)[0];if(L===0)return"";let W=d.get(),te=R.subarray(W,W+L);return d.add(L),NY.decode(te)}function WS(R,d){let L=Yf(R,d,1)[0]>>>0;if(L<10||L>30)throw new Error(`Unsupported field type code ${L}. Supported: 10-29(scalars), 30(STRUCT)`);let W=VS(L);if(GS(L)&&(W.name=Z3(R,d)),HS(L)){let te=Yf(R,d,1)[0]>>>0;W.complexType.children=new Array(te);for(let ue=0;ue>>0,W=VS(L);if(!W)throw new Error(`Unsupported column type code ${L}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(GS(L)?W.name=Z3(R,d):L>=0&&L<=3?W.name="id":L===4&&(W.name="geometry"),HS(L)){let te=Yf(R,d,1)[0]>>>0,ue=W.complexType;ue.children=new Array(te);for(let me=0;me>>0,ue=Yf(R,d,1)[0]>>>0;W.columns=new Array(ue);for(let me=0;me=4)for(;qr>>0,Pe=ge.get()+Oe;if(Pe>W.length)throw new Error(`Block overruns tile: ${Pe} > ${W.length}`);if(Yf(W,ge,1)[0]>>>0!=1){ge.set(Pe);continue}let[it,He]=UY(W,ge),bt=it.featureTables[0],Et=null,Qt=null,er=[],br=0;for(let Mr of bt.columns){let qr=Mr.name;if((Te=Mr).type==="scalarType"&&((me=Te.scalarType)==null?void 0:me.type)==="logicalType"&&Te.scalarType.logicalType===0){let $r=null;if(Mr.nullable){let Ca=hh(W,ge),nn=ge.get(),qa=Dg(W,Ca.numValues,Ca.byteLength,ge);ge.set(nn+Ca.byteLength),$r=new hd(qa,Ca.numValues)}let _a=hh(W,ge);br=$r?$r.size():_a.decompressedCount,Et=qY(W,Mr,ge,qr,_a,$r??br,ue)}else if(OY(Mr)){let $r=Yf(W,ge,1)[0];if(br===0){let _a=ge.get();br=hh(W,ge).decompressedCount,ge.set(_a)}Qt=RY(W,$r,ge,br)}else{let $r=BY(Mr)?Yf(W,ge,1)[0]:1;if($r===0)continue;let _a=zY(W,ge,Mr,$r,br);if(_a)if(Array.isArray(_a))for(let Ca of _a)er.push(Ca);else er.push(_a)}}let sr=new xY(bt.name,Qt,Et,er,He);Ce.push(sr),ge.set(Pe)}var Te;return Ce}(new Uint8Array(d));this.layers=L.reduce((W,te)=>Object.assign(Object.assign({},W),{[te.name]:new GY(te)}),{})}}class HY{constructor(d,L){this.feature=d,this.type=d.type,this.properties=d.tags?d.tags:{},this.extent=L,"id"in d&&(typeof d.id=="string"?this.id=parseInt(d.id,10):typeof d.id!="number"||isNaN(d.id)||(this.id=d.id))}loadGeometry(){let d=[],L=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let W of L){let te=[];for(let ue of W)te.push(new t(ue[0],ue[1]));d.push(te)}return d}}let zg="_geojsonTileLayer";function WY(R,d,L=""){d.writeVarintField(15,R.version||1),d.writeStringField(1,R.name||""),d.writeVarintField(5,R.extent||4096);let W={jsonPrefix:L,keys:[],values:[],keycache:{},valuecache:{}};for(let me=0;me>31}function ZY(R,d){let L=R.loadGeometry(),W=R.type,te=0,ue=0;for(let me of L){let ge=1;W===1&&(ge=me.length),d.writeVarint($3(1,ge));let Ce=W===3?me.length-1:me.length;for(let Te=0;Te=0&&Oe[3]>=0&&Ce.insert(ge,Oe[0],Oe[1],Oe[2],Oe[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new w4(new _y(this.rawTileData)).layers:new YS(this.rawTileData).layers,this.sourceLayerCoder=new gS(this.vtLayers?Object.keys(this.vtLayers).sort():[zg])),this.vtLayers}query(d,L,W,te){this.loadVTLayers();let ue=d.params,me=F/d.tileSize/d.scale,ge=Na(ue.filter,ue.globalState),Ce=d.queryGeometry,Te=d.queryPadding*me,Oe=Ev.fromPoints(Ce),Pe=this.grid.query(Oe.minX-Te,Oe.minY-Te,Oe.maxX+Te,Oe.maxY+Te),it=Ev.fromPoints(d.cameraQueryGeometry).expandBy(Te),He=this.grid3D.query(it.minX,it.minY,it.maxX,it.maxY,(Qt,er,br,sr)=>function(Mr,qr,$r,_a,Ca){for(let qa of Mr)if(qr<=qa.x&&$r<=qa.y&&_a>=qa.x&&Ca>=qa.y)return!0;let nn=[new t(qr,$r),new t(qr,Ca),new t(_a,Ca),new t(_a,$r)];if(Mr.length>2){for(let qa of nn)if(Wa(Mr,qa))return!0}for(let qa=0;qa(br||(br=ql(sr)),Mr.queryIntersectsFeature({queryGeometry:Ce,feature:sr,featureState:qr,geometry:br,zoom:this.z,transform:d.transform,pixelsToTileUnits:me,pixelPosMatrix:d.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:d.getElevation})))}return bt}loadMatchingFeature(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=this.bucketLayerIDs[L];if(me&&!it.some(Qt=>me.has(Qt)))return;let He=this.sourceLayerCoder.decode(W),bt=this.vtLayers[He].feature(te);if(ue.needGeometry){let Qt=fo(bt,!0);if(!ue.filter(new oi(this.tileID.overscaledZ),Qt,this.tileID.canonical))return}else if(!ue.filter(new oi(this.tileID.overscaledZ),bt))return;let Et=this.getId(bt,He);for(let Qt of it){if(me&&!me.has(Qt))continue;let er=Ce[Qt];if(!er)continue;let br={};Et&&Oe&&(br=Oe.getState(er.sourceLayer||zg,Et));let sr=X({},Te[Qt]);sr.paint=$S(sr.paint,er.paint,bt,br,ge),sr.layout=$S(sr.layout,er.layout,bt,br,ge);let Mr=!Pe||Pe(bt,er,br);if(!Mr)continue;let qr=new yS(bt,this.z,this.x,this.y,Et);qr.layer=sr;let $r=d[Qt];$r===void 0&&($r=d[Qt]=[]),$r.push({featureIndex:te,feature:qr,intersectionZ:Mr})}}lookupSymbolFeatures(d,L,W,te,ue,me,ge,Ce){let Te={};this.loadVTLayers();let Oe=Na(ue.filterSpec,ue.globalState);for(let Pe of d)this.loadMatchingFeature(Te,W,te,Pe,Oe,me,ge,Ce,L);return Te}hasLayer(d){for(let L of this.bucketLayerIDs)for(let W of L)if(d===W)return!0;return!1}getId(d,L){var W;let te=d.id;return this.promoteId&&(te=d.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[L]],typeof te=="boolean"&&(te=Number(te)),te===void 0&&(!((W=d.properties)===null||W===void 0)&&W.cluster)&&this.promoteId&&(te=Number(d.properties.cluster_id))),te}}function $S(R,d,L,W,te){return H(R,(ue,me)=>{let ge=d instanceof Cu?d.get(me):null;return ge?.evaluate?ge.evaluate(L,W,te):ge})}function KY(R,d){return d-R}function KS(R,d,L,W,te){let ue=[];for(let me of R){let ge;for(let Ce=0;Ce=W&&Oe.x>=W||(Te.x>=W?Te=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round():Oe.x>=W&&(Oe=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round()),Te.y>=te&&Oe.y>=te||(Te.y>=te?Te=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round():Oe.y>=te&&(Oe=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round()),ge&&Te.equals(ge[ge.length-1])||(ge=[Te],ue.push(ge)),ge.push(Oe)))))}}return ue}function JS(R,d,L,W,te){switch(d){case 1:return function(ue,me,ge,Ce){let Te=[];for(let Oe of ue)for(let Pe of Oe){let it=Ce===0?Pe.x:Pe.y;it>=me&&it<=ge&&Te.push([Pe])}return Te}(R,L,W,te);case 2:return QS(R,L,W,te,!1);case 3:return QS(R,L,W,te,!0)}return[]}function JY(R,d,L,W,te){let ue=W===0?QY:eX,me=[],ge=[];for(let Oe=0;Oed&&me.push(ue(Pe,it,d)):He>L?bt=d&&(me.push(ue(Pe,it,d)),Et=!0),bt>L&&He<=L&&(me.push(ue(Pe,it,L)),Et=!0),!te&&Et&&(ge.push(me),me=[])}let Ce=R.length-1,Te=W===0?R[Ce].x:R[Ce].y;return Te>=d&&Te<=L&&me.push(R[Ce]),te&&me.length>0&&!me[0].equals(me[me.length-1])&&me.push(new t(me[0].x,me[0].y)),me.length>0&&ge.push(me),ge}function QS(R,d,L,W,te){let ue=[];for(let me of R){let ge=JY(me,d,L,W,te);ge.length>0&&ue.push(...ge)}return ue}function QY(R,d,L){return new t(L,R.y+(L-R.x)/(d.x-R.x)*(d.y-R.y))}function eX(R,d,L){return new t(R.x+(L-R.y)/(d.y-R.y)*(d.x-R.x),L)}fi("FeatureIndex",ZS,{omit:["rawTileData","sourceLayerCoder"]});class Sp extends t{constructor(d,L,W,te){super(d,L),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new Sp(this.x,this.y,this.angle,this.segment)}}function eE(R,d,L,W,te){if(d.segment===void 0||L===0)return!0;let ue=d,me=d.segment+1,ge=0;for(;ge>-L/2;){if(me--,me<0)return!1;ge-=R[me].dist(ue),ue=R[me]}ge+=R[me].dist(R[me+1]),me++;let Ce=[],Te=0;for(;geW;)Te-=Ce.shift().angleDelta;if(Te>te)return!1;me++,ge+=Oe.dist(Pe)}return!0}function tE(R){let d=0;for(let L=0;LTe){let bt=(Te-Ce)/He,Et=bs.number(Pe.x,it.x,bt),Qt=bs.number(Pe.y,it.y,bt),er=new Sp(Et,Qt,it.angleTo(Pe),Oe);return er._round(),!me||eE(R,er,ge,me,d)?er:void 0}Ce+=He}}function rX(R,d,L,W,te,ue,me,ge,Ce){let Te=rE(W,ue,me),Oe=aE(W,te),Pe=Oe*me,it=R[0].x===0||R[0].x===Ce||R[0].y===0||R[0].y===Ce;return d-Pe=0&&Mr=0&&qr=0&&it+Te<=Oe){let $r=new Sp(Mr,qr,br,bt);$r._round(),W&&!eE(R,$r,ue,W,te)||He.push($r)}}Pe+=er}return ge||He.length||me||(He=nE(R,Pe/2,L,W,te,ue,me,!0,Ce)),He}function iE(R,d,L,W){let te=[],ue=R.image,me=ue.pixelRatio,ge=ue.paddedRect.w-2,Ce=ue.paddedRect.h-2,Te={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Oe=ue.stretchX||[[0,ge]],Pe=ue.stretchY||[[0,Ce]],it=(Va,Hn)=>Va+Hn[1]-Hn[0],He=Oe.reduce(it,0),bt=Pe.reduce(it,0),Et=ge-He,Qt=Ce-bt,er=0,br=He,sr=0,Mr=bt,qr=0,$r=Et,_a=0,Ca=Qt;if(ue.content&&W){let Va=ue.content,Hn=Va[2]-Va[0],ni=Va[3]-Va[1];(ue.textFitWidth||ue.textFitHeight)&&(Te=tS(R)),er=Sy(Oe,0,Va[0]),sr=Sy(Pe,0,Va[1]),br=Sy(Oe,Va[0],Va[2]),Mr=Sy(Pe,Va[1],Va[3]),qr=Va[0]-er,_a=Va[1]-sr,$r=Hn-br,Ca=ni-Mr}let nn=Te.x1,qa=Te.y1,bn=Te.x2-nn,Fn=Te.y2-qa,gn=(Va,Hn,ni,Wn)=>{let si=Ey(Va.stretch-er,br,bn,nn),po=ky(Va.fixed-qr,$r,Va.stretch,He),cs=Ey(Hn.stretch-sr,Mr,Fn,qa),Ds=ky(Hn.fixed-_a,Ca,Hn.stretch,bt),Xs=Ey(ni.stretch-er,br,bn,nn),Mf=ky(ni.fixed-qr,$r,ni.stretch,He),vu=Ey(Wn.stretch-sr,Mr,Fn,qa),yc=ky(Wn.fixed-_a,Ca,Wn.stretch,bt),Dc=new t(si,cs),Hl=new t(Xs,cs),rf=new t(Xs,vu),Xf=new t(si,vu),Zf=new t(po/me,Ds/me),Th=new t(Mf/me,yc/me),Sf=d*Math.PI/180;if(Sf){let Fc=Math.sin(Sf),nu=Math.cos(Sf),lc=[nu,-Fc,Fc,nu];Dc._matMult(lc),Hl._matMult(lc),Xf._matMult(lc),rf._matMult(lc)}let Ah=Va.stretch+Va.fixed,Hh=Hn.stretch+Hn.fixed;return{tl:Dc,tr:Hl,bl:Xf,br:rf,tex:{x:ue.paddedRect.x+1+Ah,y:ue.paddedRect.y+1+Hh,w:ni.stretch+ni.fixed-Ah,h:Wn.stretch+Wn.fixed-Hh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Zf,pixelOffsetBR:Th,minFontScaleX:$r/me/bn,minFontScaleY:Ca/me/Fn,isSDF:L}};if(W&&(ue.stretchX||ue.stretchY)){let Va=oE(Oe,Et,He),Hn=oE(Pe,Qt,bt);for(let ni=0;ni0&&(Et=Math.max(10,Et),this.circleDiameter=Et)}else{let it=!((Pe=me.image)===null||Pe===void 0)&&Pe.content&&(me.image.textFitWidth||me.image.textFitHeight)?tS(me):{x1:me.left,y1:me.top,x2:me.right,y2:me.bottom};it.y1=it.y1*ge-Ce[0],it.y2=it.y2*ge+Ce[2],it.x1=it.x1*ge-Ce[3],it.x2=it.x2*ge+Ce[1];let He=me.collisionPadding;if(He&&(it.x1-=He[0]*ge,it.y1-=He[1]*ge,it.x2+=He[2]*ge,it.y2+=He[3]*ge),Oe){let bt=new t(it.x1,it.y1),Et=new t(it.x2,it.y1),Qt=new t(it.x1,it.y2),er=new t(it.x2,it.y2),br=Oe*Math.PI/180;bt._rotate(br),Et._rotate(br),Qt._rotate(br),er._rotate(br),it.x1=Math.min(bt.x,Et.x,Qt.x,er.x),it.x2=Math.max(bt.x,Et.x,Qt.x,er.x),it.y1=Math.min(bt.y,Et.y,Qt.y,er.y),it.y2=Math.max(bt.y,Et.y,Qt.y,er.y)}d.emplaceBack(L.x,L.y,it.x1,it.y1,it.x2,it.y2,W,te,ue)}this.boxEndIndex=d.length}}class aX{constructor(d=[],L=(W,te)=>Wte?1:0){if(this.data=d,this.length=this.data.length,this.compare=L,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(d){this.data.push(d),this._up(this.length++)}pop(){if(this.length===0)return;let d=this.data[0],L=this.data.pop();return--this.length>0&&(this.data[0]=L,this._down(0)),d}peek(){return this.data[0]}_up(d){let{data:L,compare:W}=this,te=L[d];for(;d>0;){let ue=d-1>>1,me=L[ue];if(W(te,me)>=0)break;L[d]=me,d=ue}L[d]=te}_down(d){let{data:L,compare:W}=this,te=this.length>>1,ue=L[d];for(;d=0)break;L[d]=L[me],d=me}L[d]=ue}}function nX(R,d=1){let L=Ev.fromPoints(R[0]),W=Math.min(L.width(),L.height()),te=W/2,ue=new aX([],iX),{minX:me,minY:ge,maxX:Ce,maxY:Te}=L;if(W===0)return new t(me,ge);for(let it=me;itPe.d||!Pe.d)&&(Pe=it),it.max-Pe.d<=d||(te=it.h/2,ue.push(new F0(it.p.x-te,it.p.y-te,te,R)),ue.push(new F0(it.p.x+te,it.p.y-te,te,R)),ue.push(new F0(it.p.x-te,it.p.y+te,te,R)),ue.push(new F0(it.p.x+te,it.p.y+te,te,R)))}return Oe.d>0&&Pe.d-Oe.d<=d?Oe.p:Pe.p}function iX(R,d){return d.max-R.max}class F0{constructor(d,L,W,te){this.p=new t(d,L),this.h=W,this.d=function(ue,me){let ge=!1,Ce=1/0;for(let Te of me)for(let Oe=0,Pe=Te.length,it=Pe-1;Oeue.y!=bt.y>ue.y&&ue.x<(bt.x-He.x)*(ue.y-He.y)/(bt.y-He.y)+He.x&&(ge=!ge),Ce=Math.min(Ce,na(ue,He,bt))}return(ge?1:-1)*Math.sqrt(Ce)}(this.p,te),this.max=this.d+this.h*Math.SQRT2}}var Af;l.aM=void 0,(Af=l.aM||(l.aM={}))[Af.center=1]="center",Af[Af.left=2]="left",Af[Af.right=3]="right",Af[Af.top=4]="top",Af[Af.bottom=5]="bottom",Af[Af["top-left"]=6]="top-left",Af[Af["top-right"]=7]="top-right",Af[Af["bottom-left"]=8]="bottom-left",Af[Af["bottom-right"]=9]="bottom-right";let K3=Number.POSITIVE_INFINITY;function sE(R,d){return d[1]!==K3?function(L,W,te){let ue=0,me=0;switch(W=Math.abs(W),te=Math.abs(te),L){case"top-right":case"top-left":case"top":me=te-7;break;case"bottom-right":case"bottom-left":case"bottom":me=7-te}switch(L){case"top-right":case"bottom-right":case"right":ue=-W;break;case"top-left":case"bottom-left":case"left":ue=W}return[ue,me]}(R,d[0],d[1]):function(L,W){let te=0,ue=0;W<0&&(W=0);let me=W/Math.SQRT2;switch(L){case"top-right":case"top-left":ue=me-7;break;case"bottom-right":case"bottom-left":ue=7-me;break;case"bottom":ue=7-W;break;case"top":ue=W-7}switch(L){case"top-right":case"bottom-right":te=-me;break;case"top-left":case"bottom-left":te=me;break;case"left":te=W;break;case"right":te=-W}return[te,ue]}(R,d[0])}function lE(R,d,L){var W;let te=R.layout,ue=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(d,{},L);if(ue){let ge=ue.values,Ce=[];for(let Te=0;Teit*Rc);Oe.startsWith("top")?Pe[1]-=7:Oe.startsWith("bottom")&&(Pe[1]+=7),Ce[Te+1]=Pe}return new gi(Ce)}let me=te.get("text-variable-anchor");if(me){let ge;ge=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(d,{},L)*Rc,K3]:te.get("text-offset").evaluate(d,{},L).map(Te=>Te*Rc);let Ce=[];for(let Te of me)Ce.push(Te,sE(Te,ge));return new gi(Ce)}return null}function J3(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function oX(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=ue.textMaxSize.evaluate(d,{});it===void 0&&(it=me);let He=R.layers[0].layout,bt=He.get("icon-offset").evaluate(d,{},Oe),Et=cE(L.horizontal),Qt=me/24,er=R.tilePixelRatio*Qt,br=R.tilePixelRatio*it/24,sr=R.tilePixelRatio*ge,Mr=R.tilePixelRatio*He.get("symbol-spacing"),qr=He.get("text-padding")*R.tilePixelRatio,$r=function(ni,Wn,si,po=1){let cs=ni.get("icon-padding").evaluate(Wn,{},si),Ds=cs?.values;return[Ds[0]*po,Ds[1]*po,Ds[2]*po,Ds[3]*po]}(He,d,Oe,R.tilePixelRatio),_a=He.get("text-max-angle")/180*Math.PI,Ca=He.get("text-rotation-alignment")!=="viewport"&&He.get("symbol-placement")!=="point",nn=He.get("icon-rotation-alignment")==="map"&&He.get("symbol-placement")!=="point",qa=He.get("symbol-placement"),bn=Mr/2,Fn=He.get("icon-text-fit"),gn;W&&Fn!=="none"&&(R.allowVerticalPlacement&&L.vertical&&(gn=rS(W,L.vertical,Fn,He.get("icon-text-fit-padding"),bt,Qt)),Et&&(W=rS(W,Et,Fn,He.get("icon-text-fit-padding"),bt,Qt)));let Va=Oe?Pe.line.getGranularityForZoomLevel(Oe.z):1,Hn=(ni,Wn)=>{Wn.x<0||Wn.x>=F||Wn.y<0||Wn.y>=F||function(si,po,cs,Ds,Xs,Mf,vu,yc,Dc,Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc,nu,lc,mu,zc,Zd,dd,Bg){let Ep=si.addToLineVertexArray(po,cs),Cv,z0,B0,O0,fE=0,hE=0,dE=0,pE=0,Q3=-1,ew=-1,$d={},vE=Jn("");if(si.allowVerticalPlacement&&Ds.vertical){let $f=yc.layout.get("text-rotate").evaluate(mu,{},dd)+90;B0=new Cy(Dc,po,Hl,rf,Xf,Ds.vertical,Zf,Th,Sf,$f),vu&&(O0=new Cy(Dc,po,Hl,rf,Xf,vu,Hh,Fc,Sf,$f))}if(Xs){let $f=yc.layout.get("icon-rotate").evaluate(mu,{}),Nh=yc.layout.get("icon-text-fit")!=="none",Lv=iE(Xs,$f,Zd,Nh),vd=vu?iE(vu,$f,Zd,Nh):void 0;z0=new Cy(Dc,po,Hl,rf,Xf,Xs,Hh,Fc,!1,$f),fE=4*Lv.length;let Pv=si.iconSizeData,Sd=null;Pv.kind==="source"?(Sd=[Yd*yc.layout.get("icon-size").evaluate(mu,{})],Sd[0]>bp&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):Pv.kind==="composite"&&(Sd=[Yd*zc.compositeIconSizes[0].evaluate(mu,{},dd),Yd*zc.compositeIconSizes[1].evaluate(mu,{},dd)],(Sd[0]>bp||Sd[1]>bp)&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),si.addSymbols(si.icon,Lv,Sd,lc,nu,mu,l.ax.none,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),Q3=si.icon.placedSymbolArray.length-1,vd&&(hE=4*vd.length,si.addSymbols(si.icon,vd,Sd,lc,nu,mu,l.ax.vertical,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),ew=si.icon.placedSymbolArray.length-1)}let mE=Object.keys(Ds.horizontal);for(let $f of mE){let Nh=Ds.horizontal[$f];if(!Cv){vE=Jn(Nh.text);let vd=yc.layout.get("text-rotate").evaluate(mu,{},dd);Cv=new Cy(Dc,po,Hl,rf,Xf,Nh,Zf,Th,Sf,vd)}let Lv=Nh.positionedLines.length===1;if(dE+=uE(si,po,Nh,Mf,yc,Sf,mu,Ah,Ep,Ds.vertical?l.ax.horizontal:l.ax.horizontalOnly,Lv?mE:[$f],$d,Q3,zc,dd),Lv)break}Ds.vertical&&(pE+=uE(si,po,Ds.vertical,Mf,yc,Sf,mu,Ah,Ep,l.ax.vertical,["vertical"],$d,ew,zc,dd));let lX=Cv?Cv.boxStartIndex:si.collisionBoxArray.length,uX=Cv?Cv.boxEndIndex:si.collisionBoxArray.length,cX=B0?B0.boxStartIndex:si.collisionBoxArray.length,fX=B0?B0.boxEndIndex:si.collisionBoxArray.length,hX=z0?z0.boxStartIndex:si.collisionBoxArray.length,dX=z0?z0.boxEndIndex:si.collisionBoxArray.length,pX=O0?O0.boxStartIndex:si.collisionBoxArray.length,vX=O0?O0.boxEndIndex:si.collisionBoxArray.length,pd=-1,Ly=($f,Nh)=>$f?.circleDiameter?Math.max($f.circleDiameter,Nh):Nh;pd=Ly(Cv,pd),pd=Ly(B0,pd),pd=Ly(z0,pd),pd=Ly(O0,pd);let gE=pd>-1?1:0;gE&&(pd*=Bg/Rc),si.glyphOffsetArray.length>=M0.MAX_GLYPHS&&ee("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),mu.sortKey!==void 0&&si.addToSortKeyRanges(si.symbolInstances.length,mu.sortKey);let mX=lE(yc,mu,dd),[gX,yX]=function($f,Nh){let Lv=$f.length,vd=Nh?.values;if(vd?.length>0)for(let Pv=0;Pv=0?$d.right:-1,$d.center>=0?$d.center:-1,$d.left>=0?$d.left:-1,$d.vertical||-1,Q3,ew,vE,lX,uX,cX,fX,hX,dX,pX,vX,Hl,dE,pE,fE,hE,gE,0,Zf,pd,gX,yX)}(R,Wn,ni,L,W,te,gn,R.layers[0],R.collisionBoxArray,d.index,d.sourceLayerIndex,R.index,er,[qr,qr,qr,qr],Ca,Ce,sr,$r,nn,bt,d,ue,Te,Oe,me)};if(qa==="line")for(let ni of KS(d.geometry,0,0,F,F)){let Wn=Sv(ni,Va),si=rX(Wn,Mr,_a,L.vertical||Et,W,24,br,R.overscaling,F);for(let po of si)Et&&sX(R,Et.text,bn,po)||Hn(Wn,po)}else if(qa==="line-center"){for(let ni of d.geometry)if(ni.length>1){let Wn=Sv(ni,Va),si=tX(Wn,_a,L.vertical||Et,W,24,br);si&&Hn(Wn,si)}}else if(d.type==="Polygon")for(let ni of Yc(d.geometry,0)){let Wn=nX(ni,16);Hn(Sv(ni[0],Va,!0),new Sp(Wn.x,Wn.y,0))}else if(d.type==="LineString")for(let ni of d.geometry){let Wn=Sv(ni,Va);Hn(Wn,new Sp(Wn[0].x,Wn[0].y,0))}else if(d.type==="Point")for(let ni of d.geometry)for(let Wn of ni)Hn([Wn],new Sp(Wn.x,Wn.y,0))}function uE(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt){let Et=function(br,sr,Mr,qr,$r,_a,Ca,nn){let qa=qr.layout.get("text-rotate").evaluate(_a,{})*Math.PI/180,bn=[];for(let Fn of sr.positionedLines)for(let gn of Fn.positionedGlyphs){if(!gn.rect)continue;let Va=gn.rect||{},Hn=4,ni=!0,Wn=1,si=0,po=($r||nn)&&gn.vertical,cs=gn.metrics.advance*gn.scale/2;if(nn&&sr.verticalizable&&(si=Fn.lineOffset/2-(gn.imageName?-(Rc-gn.metrics.width*gn.scale)/2:(gn.scale-1)*Rc)),gn.imageName){let Fc=Ca[gn.imageName];ni=Fc.sdf,Wn=Fc.pixelRatio,Hn=1/Wn}let Ds=$r?[gn.x+cs,gn.y]:[0,0],Xs=$r?[0,0]:[gn.x+cs+Mr[0],gn.y+Mr[1]-si],Mf=[0,0];po&&(Mf=Xs,Xs=[0,0]);let vu=gn.metrics.isDoubleResolution?2:1,yc=(gn.metrics.left-Hn)*gn.scale-cs+Xs[0],Dc=(-gn.metrics.top-Hn)*gn.scale+Xs[1],Hl=yc+Va.w/vu*gn.scale/Wn,rf=Dc+Va.h/vu*gn.scale/Wn,Xf=new t(yc,Dc),Zf=new t(Hl,Dc),Th=new t(yc,rf),Sf=new t(Hl,rf);if(po){let Fc=new t(-cs,cs- -17),nu=-Math.PI/2,lc=12-cs,mu=new t(22-lc,-(gn.imageName?lc:0)),zc=new t(...Mf);Xf._rotateAround(nu,Fc)._add(mu)._add(zc),Zf._rotateAround(nu,Fc)._add(mu)._add(zc),Th._rotateAround(nu,Fc)._add(mu)._add(zc),Sf._rotateAround(nu,Fc)._add(mu)._add(zc)}if(qa){let Fc=Math.sin(qa),nu=Math.cos(qa),lc=[nu,-Fc,Fc,nu];Xf._matMult(lc),Zf._matMult(lc),Th._matMult(lc),Sf._matMult(lc)}let Ah=new t(0,0),Hh=new t(0,0);bn.push({tl:Xf,tr:Zf,bl:Th,br:Sf,tex:Va,writingMode:sr.writingMode,glyphOffset:Ds,sectionIndex:gn.sectionIndex,isSDF:ni,pixelOffsetTL:Ah,pixelOffsetBR:Hh,minFontScaleX:0,minFontScaleY:0})}return bn}(0,L,ge,te,ue,me,W,R.allowVerticalPlacement),Qt=R.textSizeData,er=null;Qt.kind==="source"?(er=[Yd*te.layout.get("text-size").evaluate(me,{})],er[0]>bp&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Qt.kind==="composite"&&(er=[Yd*He.compositeTextSizes[0].evaluate(me,{},bt),Yd*He.compositeTextSizes[1].evaluate(me,{},bt)],(er[0]>bp||er[1]>bp)&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),R.addSymbols(R.text,Et,er,ge,ue,me,Te,d,Ce.lineStartIndex,Ce.lineLength,it,bt);for(let br of Oe)Pe[br]=R.text.placedSymbolArray.length-1;return 4*Et.length}function cE(R){for(let d in R)return R[d];return null}function sX(R,d,L,W){let te=R.compareText;if(d in te){let ue=te[d];for(let me=ue.length-1;me>=0;me--)if(W.dist(ue[me])this.process()),this.subscription=Ge(this.target,"message",L=>this.receive(L),!1),this.globalScope=he(self)?R:window}registerMessageHandler(R,d){this.messageHandlers[R]=d}unregisterMessageHandler(R){delete this.messageHandlers[R]}sendAsync(R,d){return new Promise((L,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10),ue=d?Ge(d.signal,"abort",()=>{ue?.unsubscribe(),delete this.resolveRejects[te];let Ce={id:te,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ce)},_Y):null;this.resolveRejects[te]={resolve:Ce=>{ue?.unsubscribe(),L(Ce)},reject:Ce=>{ue?.unsubscribe(),W(Ce)}};let me=[],ge=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:mt(R.data,me)});this.target.postMessage(ge,{transfer:me})})}receive(R){let d=R.data,L=d.id,W=["file://","resource://android","null"],te=[d.origin,location.origin],ue=d.origin===location.origin,me=te.some(ge=>W.includes(ge));if((ue||me)&&(!d.targetMapId||this.mapId===d.targetMapId)){if(d.type===""){delete this.tasks[L];let ge=this.abortControllers[L];return delete this.abortControllers[L],void(ge&&ge.abort())}if(he(self)||d.mustQueue)return this.tasks[L]=d,this.taskQueue.push(L),void this.invoker.trigger();this.processTask(L,d)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),d=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),d&&this.processTask(R,d)}processTask(R,d){return e(this,void 0,void 0,function*(){if(d.type===""){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(d.error?te.reject(j(xt(d.error))):te.resolve(xt(d.data))):void 0}if(!this.messageHandlers[d.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${d.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let L=xt(d.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[d.type](d.sourceMapId,L,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,j(te))}})}completeTask(R,d,L){let W=[];delete this.abortControllers[R];let te={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:d?mt(d):null,data:mt(L,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.O=function(){var R=new i(16);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},l.P=t,l.Q=function(R,d,L){var W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et=L[0],Qt=L[1],er=L[2];return d===R?(R[12]=d[0]*Et+d[4]*Qt+d[8]*er+d[12],R[13]=d[1]*Et+d[5]*Qt+d[9]*er+d[13],R[14]=d[2]*Et+d[6]*Qt+d[10]*er+d[14],R[15]=d[3]*Et+d[7]*Qt+d[11]*er+d[15]):(te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],R[0]=W=d[0],R[1]=te,R[2]=ue,R[3]=me,R[4]=ge,R[5]=Ce,R[6]=Te,R[7]=Oe,R[8]=Pe,R[9]=it,R[10]=He,R[11]=bt,R[12]=W*Et+ge*Qt+Pe*er+d[12],R[13]=te*Et+Ce*Qt+it*er+d[13],R[14]=ue*Et+Te*Qt+He*er+d[14],R[15]=me*Et+Oe*Qt+bt*er+d[15]),R},l.R=ls,l.S=function(R,d,L){var W=L[0],te=L[1],ue=L[2];return R[0]=d[0]*W,R[1]=d[1]*W,R[2]=d[2]*W,R[3]=d[3]*W,R[4]=d[4]*te,R[5]=d[5]*te,R[6]=d[6]*te,R[7]=d[7]*te,R[8]=d[8]*ue,R[9]=d[9]*ue,R[10]=d[10]*ue,R[11]=d[11]*ue,R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.T=vp,l.U=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],Et=d[12],Qt=d[13],er=d[14],br=d[15],sr=L[0],Mr=L[1],qr=L[2],$r=L[3];return R[0]=sr*W+Mr*ge+qr*Pe+$r*Et,R[1]=sr*te+Mr*Ce+qr*it+$r*Qt,R[2]=sr*ue+Mr*Te+qr*He+$r*er,R[3]=sr*me+Mr*Oe+qr*bt+$r*br,R[4]=(sr=L[4])*W+(Mr=L[5])*ge+(qr=L[6])*Pe+($r=L[7])*Et,R[5]=sr*te+Mr*Ce+qr*it+$r*Qt,R[6]=sr*ue+Mr*Te+qr*He+$r*er,R[7]=sr*me+Mr*Oe+qr*bt+$r*br,R[8]=(sr=L[8])*W+(Mr=L[9])*ge+(qr=L[10])*Pe+($r=L[11])*Et,R[9]=sr*te+Mr*Ce+qr*it+$r*Qt,R[10]=sr*ue+Mr*Te+qr*He+$r*er,R[11]=sr*me+Mr*Oe+qr*bt+$r*br,R[12]=(sr=L[12])*W+(Mr=L[13])*ge+(qr=L[14])*Pe+($r=L[15])*Et,R[13]=sr*te+Mr*Ce+qr*it+$r*Qt,R[14]=sr*ue+Mr*Te+qr*He+$r*er,R[15]=sr*me+Mr*Oe+qr*bt+$r*br,R},l.V=function(R,d){let L={};for(let W of d)W in R&&(L[W]=R[W]);return L},l.W=wp,l.X=G,l.Y=fS,l.Z=cS,l._=e,l.a=Ae,l.a$=function(R){var d=new i(3);return d[0]=R[0],d[1]=R[1],d[2]=R[2],d},l.a0=h,l.a1=v,l.a2=Se,l.a3=Ph,l.a4=dS,l.a5=Ty,l.a6=F,l.a7=Ig,l.a8=Ev,l.a9=25,l.aA=function(R){var d=R[0],L=R[1];return Math.sqrt(d*d+L*L)},l.aB=function(R){return R[0]=0,R[1]=0,R},l.aC=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R},l.aD=S3,l.aE=z,l.aF=function(R,d,L,W){let te=d.y-R.y,ue=d.x-R.x,me=W.y-L.y,ge=W.x-L.x,Ce=me*ue-ge*te;if(Ce===0)return null;let Te=(ge*(R.y-L.y)-me*(R.x-L.x))/Ce;return new t(R.x+Te*ue,R.y+Te*te)},l.aG=KS,l.aH=Ya,l.aI=function(R){let d=1/0,L=1/0,W=-1/0,te=-1/0;for(let ue of R)d=Math.min(d,ue.x),L=Math.min(L,ue.y),W=Math.max(W,ue.x),te=Math.max(te,ue.y);return[d,L,W,te]},l.aJ=Rc,l.aK=P,l.aL=function(R,d,L,W,te=!1){if(!L[0]&&!L[1])return[0,0];let ue=te?W==="map"?-R.bearingInRadians:0:W==="viewport"?R.bearingInRadians:0;if(ue){let me=Math.sin(ue),ge=Math.cos(ue);L=[L[0]*ge-L[1]*me,L[0]*me+L[1]*ge]}return[te?L[0]:P(d,L[0],R.zoom),te?L[1]:P(d,L[1],R.zoom)]},l.aN=M3,l.aO=J3,l.aP=A3,l.aQ=R=>R.type==="symbol",l.aR=dy,l.aS=ct,l.aT=hy,l.aU=It,l.aV=Fa,l.aW=ua,l.aX=_e,l.aY=pS,l.aZ=f,l.a_=T,l.aa=P3,l.ab=R=>{let d=window.document.createElement("video");return d.muted=!0,new Promise(L=>{d.onloadstart=()=>{L(d)};for(let W of R){let te=window.document.createElement("source");rr(W)||(d.crossOrigin="Anonymous"),te.src=W,d.appendChild(te)}})},l.ac=Vt,l.ad=function(){return K++},l.ae=fe,l.af=M0,l.ag=zg,l.ah=Na,l.ai=fo,l.aj=yS,l.ak=function(R){let d={};if(R.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(L,W,te,ue)=>{let me=te||ue;return d[W]=!me||me.toLowerCase(),""}),d["max-age"]){let L=parseInt(d["max-age"],10);isNaN(L)?delete d["max-age"]:d["max-age"]=L}return d},l.al=se,l.am=85.051129,l.an=ke,l.ao=function(R){return Math.pow(2,R)},l.ap=S,l.aq=hS,l.ar=function(R){return Math.log(R)/Math.LN2},l.as=function(R){var d=R[0],L=R[1];return d*d+L*L},l.at=function(R){if(!R.length)return new Set;let d=Math.max(...R.map(Ce=>Ce.canonical.z)),L=1/0,W=-1/0,te=1/0,ue=-1/0,me=[];for(let Ce of R){let{x:Te,y:Oe,z:Pe}=Ce.canonical,it=Math.pow(2,d-Pe),He=Te*it,bt=Oe*it;me.push({id:Ce,x:He,y:bt}),HeW&&(W=He),btue&&(ue=bt)}let ge=new Set;for(let Ce of me)Ce.x!==L&&Ce.x!==W&&Ce.y!==te&&Ce.y!==ue||ge.add(Ce.id);return ge},l.au=function(R,d){let L=Math.abs(2*R.wrap)-+(R.wrap<0),W=Math.abs(2*d.wrap)-+(d.wrap<0);return R.overscaledZ-d.overscaledZ||W-L||d.canonical.y-R.canonical.y||d.canonical.x-R.canonical.x},l.av=class{constructor(R,d){this.max=R,this.onRemove=d,this.reset()}reset(){for(let R in this.data)for(let d of this.data[R])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(R,d,L){let W=R.wrapped().key;this.data[W]===void 0&&(this.data[W]=[]);let te={value:d,timeout:void 0};if(L!==void 0&&(te.timeout=setTimeout(()=>{this.remove(R,te)},L)),this.data[W].push(te),this.order.push(W),this.order.length>this.max){let ue=this._getAndRemoveByKey(this.order[0]);ue&&this.onRemove(ue)}return this}has(R){return R.wrapped().key in this.data}getAndRemove(R){return this.has(R)?this._getAndRemoveByKey(R.wrapped().key):null}_getAndRemoveByKey(R){let d=this.data[R].shift();return d.timeout&&clearTimeout(d.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),d.value}getByKey(R){let d=this.data[R];return d?d[0].value:null}get(R){return this.has(R)?this.data[R.wrapped().key][0].value:null}remove(R,d){if(!this.has(R))return this;let L=R.wrapped().key,W=d===void 0?0:this.data[L].indexOf(d),te=this.data[L][W];return this.data[L].splice(W,1),te.timeout&&clearTimeout(te.timeout),this.data[L].length===0&&delete this.data[L],this.onRemove(te.value),this.order.splice(this.order.indexOf(L),1),this}setMaxSize(R){for(this.max=R;this.order.length>this.max;){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(R){let d=[];for(let L in this.data)for(let W of this.data[L])R(W.value)||d.push(W);for(let L of d)this.remove(L.value.tileID,L)}},l.aw=function(R,d){let L=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:ue,maxZoom:me}=R,ge=te?se(Pi.interpolationFactor(te,d,ue,me),0,1):0;R.kind==="camera"?W=bs.number(R.minSize,R.maxSize,ge):L=ge}return{uSizeT:L,uSize:W}},l.ay=function(R,{uSize:d,uSizeT:L},{lowerSize:W,upperSize:te}){return R.kind==="source"?W/Yd:R.kind==="composite"?bs.number(W/Yd,te/Yd,L):d},l.az=D,l.b=we,l.b$=zs,l.b0=function(R,d,L){return R[0]=d[0]-L[0],R[1]=d[1]-L[1],R[2]=d[2]-L[2],R},l.b1=function(R,d){var L=d[0],W=d[1],te=d[2],ue=L*L+W*W+te*te;return ue>0&&(ue=1/Math.sqrt(ue)),R[0]=d[0]*ue,R[1]=d[1]*ue,R[2]=d[2]*ue,R},l.b2=u,l.b3=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]},l.b4=function(R,d,L){return R[0]=d[0]*L[0],R[1]=d[1]*L[1],R[2]=d[2]*L[2],R[3]=d[3]*L[3],R},l.b5=C,l.b6=function(R,d,L){let W=d[0]*L[0]+d[1]*L[1]+d[2]*L[2];return W===0?null:(-(R[0]*L[0]+R[1]*L[1]+R[2]*L[2])-L[3])/W},l.b7=x,l.b8=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R[3]=d[3]*L,R},l.b9=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]+R[3]},l.bA=O,l.bB=function(R,d,L){var W=L[0],te=L[1],ue=L[2],me=L[3],ge=d[0],Ce=d[1],Te=d[2],Oe=te*Te-ue*Ce,Pe=ue*ge-W*Te,it=W*Ce-te*ge;return R[0]=ge+me*(Oe+=Oe)+te*(it+=it)-ue*(Pe+=Pe),R[1]=Ce+me*Pe+ue*Oe-W*it,R[2]=Te+me*it+W*Pe-te*Oe,R},l.bC=function(R,d,L){let W=(te=[R[0],R[1],R[2],d[0],d[1],d[2],L[0],L[1],L[2]])[0]*((Oe=te[8])*(me=te[4])-(ge=te[5])*(Te=te[7]))+te[1]*(-Oe*(ue=te[3])+ge*(Ce=te[6]))+te[2]*(Te*ue-me*Ce);var te,ue,me,ge,Ce,Te,Oe;if(W===0)return null;let Pe=u([],[d[0],d[1],d[2]],[L[0],L[1],L[2]]),it=u([],[L[0],L[1],L[2]],[R[0],R[1],R[2]]),He=u([],[R[0],R[1],R[2]],[d[0],d[1],d[2]]),bt=f([],Pe,-R[3]);return T(bt,bt,f([],it,-d[3])),T(bt,bt,f([],He,-L[3])),f(bt,bt,1/W),bt},l.bD=L3,l.bE=function(){return new Float64Array(4)},l.bF=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0]*Math.cos(W)-te[1]*Math.sin(W),ue[1]=te[0]*Math.sin(W)+te[1]*Math.cos(W),ue[2]=te[2],R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bG=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0],ue[1]=te[1]*Math.cos(W)-te[2]*Math.sin(W),ue[2]=te[1]*Math.sin(W)+te[2]*Math.cos(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bH=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[2]*Math.sin(W)+te[0]*Math.cos(W),ue[1]=te[1],ue[2]=te[2]*Math.cos(W)-te[0]*Math.sin(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bI=function(R,d,L){var W=Math.sin(L),te=Math.cos(L),ue=d[0],me=d[1],ge=d[2],Ce=d[3],Te=d[8],Oe=d[9],Pe=d[10],it=d[11];return d!==R&&(R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15]),R[0]=ue*te-Te*W,R[1]=me*te-Oe*W,R[2]=ge*te-Pe*W,R[3]=Ce*te-it*W,R[8]=ue*W+Te*te,R[9]=me*W+Oe*te,R[10]=ge*W+Pe*te,R[11]=Ce*W+it*te,R},l.bJ=function(R,d){let L=U(R,360),W=U(d,360),te=W-L,ue=W>L?te-360:te+360;return Math.abs(te)0?me:-me},l.bM=function(R,d){let L=U(R,2*Math.PI),W=U(d,2*Math.PI);return Math.min(Math.abs(L-W),Math.abs(L-W+2*Math.PI),Math.abs(L-W-2*Math.PI))},l.bN=function(){let R={},d=ht.$version;for(let L in ht.$root){let W=ht.$root[L];if(W.required){let te=null;te=L==="version"?d:W.type==="array"?[]:{},te!=null&&(R[L]=te)}}return R},l.bO=At,l.bP=Bt,l.bQ=function R(d,L){if(Array.isArray(d)){if(!Array.isArray(L)||d.length!==L.length)return!1;for(let W=0;WR.type==="raster",l.bV=q,l.bW=function(R,d){if(!R)return[{command:"setStyle",args:[d]}];let L=[];try{if(!We(R.version,d.version))return[{command:"setStyle",args:[d]}];We(R.center,d.center)||L.push({command:"setCenter",args:[d.center]}),We(R.state,d.state)||L.push({command:"setGlobalState",args:[d.state]}),We(R.centerAltitude,d.centerAltitude)||L.push({command:"setCenterAltitude",args:[d.centerAltitude]}),We(R.zoom,d.zoom)||L.push({command:"setZoom",args:[d.zoom]}),We(R.bearing,d.bearing)||L.push({command:"setBearing",args:[d.bearing]}),We(R.pitch,d.pitch)||L.push({command:"setPitch",args:[d.pitch]}),We(R.roll,d.roll)||L.push({command:"setRoll",args:[d.roll]}),We(R.sprite,d.sprite)||L.push({command:"setSprite",args:[d.sprite]}),We(R.glyphs,d.glyphs)||L.push({command:"setGlyphs",args:[d.glyphs]}),We(R.transition,d.transition)||L.push({command:"setTransition",args:[d.transition]}),We(R.light,d.light)||L.push({command:"setLight",args:[d.light]}),We(R.terrain,d.terrain)||L.push({command:"setTerrain",args:[d.terrain]}),We(R.sky,d.sky)||L.push({command:"setSky",args:[d.sky]}),We(R.projection,d.projection)||L.push({command:"setProjection",args:[d.projection]});let W={},te=[];(function(me,ge,Ce,Te){let Oe;for(Oe in ge=ge||{},me=me||{})Object.prototype.hasOwnProperty.call(me,Oe)&&(Object.prototype.hasOwnProperty.call(ge,Oe)||et(Oe,Ce,Te));for(Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&(Object.prototype.hasOwnProperty.call(me,Oe)?We(me[Oe],ge[Oe])||(me[Oe].type==="geojson"&&ge[Oe].type==="geojson"&&pt(me,ge,Oe)?Ke(Ce,{command:"setGeoJSONSourceData",args:[Oe,ge[Oe].data]}):Mt(Oe,ge,Ce,Te)):Je(Oe,ge,Ce))})(R.sources,d.sources,te,W);let ue=[];R.layers&&R.layers.forEach(me=>{"source"in me&&W[me.source]?L.push({command:"removeLayer",args:[me.id]}):ue.push(me)}),L=L.concat(te),function(me,ge,Ce){ge=ge||[];let Te=(me=me||[]).map(Ct),Oe=ge.map(Ct),Pe=me.reduce(qt,{}),it=ge.reduce(qt,{}),He=Te.slice(),bt=Object.create(null),Et,Qt,er,br,sr;for(let Mr=0,qr=0;Mrg?(te=Math.acos(ue),me=Math.sin(te),ge=Math.sin((1-W)*te)/me,Ce=Math.sin(W*te)/me):(ge=1-W,Ce=W),R[0]=ge*Te+Ce*He,R[1]=ge*Oe+Ce*bt,R[2]=ge*Pe+Ce*Et,R[3]=ge*it+Ce*Qt,R},l.bm=function(R){let d=new Float64Array(9);var L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr;Pe=(te=(W=R)[0])*(Ce=te+te),it=(ue=W[1])*Ce,bt=(me=W[2])*Ce,Et=me*(Te=ue+ue),er=(ge=W[3])*Ce,br=ge*Te,sr=ge*(Oe=me+me),(L=d)[0]=1-(He=ue*Te)-(Qt=me*Oe),L[3]=it-sr,L[6]=bt+br,L[1]=it+sr,L[4]=1-Pe-Qt,L[7]=Et-er,L[2]=bt-br,L[5]=Et+er,L[8]=1-Pe-He;let Mr=_e(-Math.asin(se(d[2],-1,1))),qr,$r;return Math.hypot(d[5],d[8])<.001?(qr=0,$r=-_e(Math.atan2(d[3],d[4]))):(qr=_e(d[5]===0&&d[8]===0?0:Math.atan2(d[5],d[8])),$r=_e(d[1]===0&&d[0]===0?0:Math.atan2(d[1],d[0]))),{roll:qr,pitch:Mr+90,bearing:$r}},l.bn=function(R,d){return R.roll==d.roll&&R.pitch==d.pitch&&R.bearing==d.bearing},l.bo=rn,l.bp=ro,l.bq=_0,l.br=Mg,l.bs=y0,l.bt=$,l.bu=Q,l.bv=io,l.bw=function(R,d,L,W,te){return $(W,te,se((R-d)/(L-d),0,1))},l.bx=function(R,d,L,W){return R[0]=d[0]+L[0]*W,R[1]=d[1]+L[1]*W,R[2]=d[2]+L[2]*W,R},l.by=U,l.bz=function(){return new Float64Array(3)},l.c=Ye,l.c$=Cc,l.c0=class extends Wi{constructor(R,d){super(R,d),this.current=Bs}set(R){if(R[12]!==this.current[12]||R[0]!==this.current[0])return this.current=R,void this.gl.uniformMatrix4fv(this.location,!1,R);for(let d=1;d<16;d++)if(R[d]!==this.current[d]){this.current=R,this.gl.uniformMatrix4fv(this.location,!1,R);break}}},l.c1=Mo,l.c2=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]&&R[2]===this.current[2]||(this.current=R,this.gl.uniform3f(this.location,R[0],R[1],R[2]))}},l.c3=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]||(this.current=R,this.gl.uniform2f(this.location,R[0],R[1]))}},l.c4=w,l.c5=function(R,d){var L=Math.sin(d),W=Math.cos(d);return R[0]=W,R[1]=L,R[2]=0,R[3]=-L,R[4]=W,R[5]=0,R[6]=0,R[7]=0,R[8]=1,R},l.c6=function(R,d,L){var W=d[0],te=d[1],ue=d[2];return R[0]=W*L[0]+te*L[3]+ue*L[6],R[1]=W*L[1]+te*L[4]+ue*L[7],R[2]=W*L[2]+te*L[5]+ue*L[8],R},l.c7=function(R,d,L,W,te,ue,me){var ge=1/(d-L),Ce=1/(W-te),Te=1/(ue-me);return R[0]=-2*ge,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Ce,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*Te,R[11]=0,R[12]=(d+L)*ge,R[13]=(te+W)*Ce,R[14]=(me+ue)*Te,R[15]=1,R},l.c8=class extends Wi{constructor(R,d){super(R,d),this.current=new Array}set(R){if(R!=this.current){this.current=R;let d=new Float32Array(4*R.length);for(let L=0;L25||W<0||W>=1||L<0||L>=1)},l.cE=function(R,d){return R[0]=d[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=d[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=d[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},l.cF=class extends Jt{},l.cG=Tt,l.cH=function(R,d){Ye.REGISTERED_PROTOCOLS[R]=d},l.cI=function(R){delete Ye.REGISTERED_PROTOCOLS[R]},l.cJ=function(R,d){let L={};for(let te=0;teHn*Rc)}let bn=Ce?"center":te.get("text-justify").evaluate(Pe,{},R.canonical),Fn=te.get("symbol-placement")==="point"?te.get("text-max-width").evaluate(Pe,{},R.canonical)*Rc:1/0,gn=()=>{R.bucket.allowVerticalPlacement&&Br($r)&&(Qt.vertical=xy(er,R.glyphMap,R.glyphPositions,R.imagePositions,it,Fn,ge,nn,"left",Ca,sr,l.ax.vertical,!0,bt,He))};if(!Ce&&qa){let Va=new Set;if(bn==="auto")for(let ni=0;niWY(ge,Ce,ue),W.layers[me])}(R,L,d),L.finish()},l.cT=function(R,d,L,W,te,ue){let me=JS(R,d,L,te,0);return me=JS(me,d,W,ue,1),me},l.cU=class{constructor(R){this.maxEntries=R,this.map=new Map}get(R){let d=this.map.get(R);return d!==void 0&&(this.map.delete(R),this.map.set(R,d)),d}set(R,d){if(this.map.has(R))this.map.delete(R);else if(this.map.size>=this.maxEntries){let L=this.map.keys().next().value;this.map.delete(L)}this.map.set(R,d)}clear(){this.map.clear()}},l.cV=w4,l.cW=_y,l.cX=YS,l.cY=function(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(v())try{return yield Se(R,d,L,W,te)}catch{}return function(ue,me,ge,Ce,Te){let Oe=ue.width,Pe=ue.height;Ie&&Ve||(Ie=new OffscreenCanvas(Oe,Pe),Ve=Ie.getContext("2d",{willReadFrequently:!0})),Ie.width=Oe,Ie.height=Pe,Ve.drawImage(ue,0,0,Oe,Pe);let it=Ve.getImageData(me,ge,Ce,Te);return Ve.clearRect(0,0,Oe,Pe),it.data}(R,d,L,W,te)})},l.cZ=mp,l.c_=class{constructor(R,d){this.layers={[zg]:this},this.name=zg,this.version=d?d.version:1,this.extent=d?d.extent:4096,this.length=R.length,this.features=R}feature(R){return new HY(this.features[R],this.extent)}},l.ca=class extends sa{},l.cb=VW,l.cc=class extends An{},l.cd=Lu,l.ce=function(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))},l.cf=au,l.cg=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[3]*W+L[7]*te+L[11]*ue+L[15];return R[0]=(L[0]*W+L[4]*te+L[8]*ue+L[12])/(me=me||1),R[1]=(L[1]*W+L[5]*te+L[9]*ue+L[13])/me,R[2]=(L[2]*W+L[6]*te+L[10]*ue+L[14])/me,R},l.ch=class extends mr{},l.ci=class extends y{},l.cj=function(R,d){return R[0]===d[0]&&R[1]===d[1]&&R[2]===d[2]&&R[3]===d[3]&&R[4]===d[4]&&R[5]===d[5]&&R[6]===d[6]&&R[7]===d[7]&&R[8]===d[8]&&R[9]===d[9]&&R[10]===d[10]&&R[11]===d[11]&&R[12]===d[12]&&R[13]===d[13]&&R[14]===d[14]&&R[15]===d[15]},l.ck=function(R,d){var L=R[0],W=R[1],te=R[2],ue=R[3],me=R[4],ge=R[5],Ce=R[6],Te=R[7],Oe=R[8],Pe=R[9],it=R[10],He=R[11],bt=R[12],Et=R[13],Qt=R[14],er=R[15],br=d[0],sr=d[1],Mr=d[2],qr=d[3],$r=d[4],_a=d[5],Ca=d[6],nn=d[7],qa=d[8],bn=d[9],Fn=d[10],gn=d[11],Va=d[12],Hn=d[13],ni=d[14],Wn=d[15];return Math.abs(L-br)<=g*Math.max(1,Math.abs(L),Math.abs(br))&&Math.abs(W-sr)<=g*Math.max(1,Math.abs(W),Math.abs(sr))&&Math.abs(te-Mr)<=g*Math.max(1,Math.abs(te),Math.abs(Mr))&&Math.abs(ue-qr)<=g*Math.max(1,Math.abs(ue),Math.abs(qr))&&Math.abs(me-$r)<=g*Math.max(1,Math.abs(me),Math.abs($r))&&Math.abs(ge-_a)<=g*Math.max(1,Math.abs(ge),Math.abs(_a))&&Math.abs(Ce-Ca)<=g*Math.max(1,Math.abs(Ce),Math.abs(Ca))&&Math.abs(Te-nn)<=g*Math.max(1,Math.abs(Te),Math.abs(nn))&&Math.abs(Oe-qa)<=g*Math.max(1,Math.abs(Oe),Math.abs(qa))&&Math.abs(Pe-bn)<=g*Math.max(1,Math.abs(Pe),Math.abs(bn))&&Math.abs(it-Fn)<=g*Math.max(1,Math.abs(it),Math.abs(Fn))&&Math.abs(He-gn)<=g*Math.max(1,Math.abs(He),Math.abs(gn))&&Math.abs(bt-Va)<=g*Math.max(1,Math.abs(bt),Math.abs(Va))&&Math.abs(Et-Hn)<=g*Math.max(1,Math.abs(Et),Math.abs(Hn))&&Math.abs(Qt-ni)<=g*Math.max(1,Math.abs(Qt),Math.abs(ni))&&Math.abs(er-Wn)<=g*Math.max(1,Math.abs(er),Math.abs(Wn))},l.cl=function(R,d){return R[0]=d[0],R[1]=d[1],R[2]=d[2],R[3]=d[3],R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[8]=d[8],R[9]=d[9],R[10]=d[10],R[11]=d[11],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.cm=R=>R.type==="circle",l.cn=R=>R.type==="heatmap",l.co=R=>R.type==="line",l.cp=R=>R.type==="fill",l.cq=R=>R.type==="fill-extrusion",l.cr=R=>R.type==="hillshade",l.cs=R=>R.type==="color-relief",l.ct=R=>R.type==="background",l.cu=R=>R.type==="custom",l.cv=re,l.cw=function(R,d,L){if(d<=0)return R;let W=1/d;return L===void 0||Math.abs(L)<1e-10?Math.round(R*W)/W:(L>0?Math.ceil(R*W-1e-9):Math.floor(R*W+1e-10))/W},l.cx=function(R,d,L){let W=B(d.x-L.x,d.y-L.y),te=B(R.x-L.x,R.y-L.y);var ue,me;return _e(Math.atan2(W[0]*te[1]-W[1]*te[0],(ue=W)[0]*(me=te)[0]+ue[1]*me[1]))},l.cy=ne,l.cz=function(R,d){var L;if(!ve[d])return!1;let W=R?.target,te=((L=W?.ownerDocument)===null||L===void 0?void 0:L.defaultView)||window;return R instanceof te.MouseEvent||R instanceof te.WheelEvent},l.d=j,l.d0=class{constructor(R,d){let L=(d=this.options=Object.assign({},RW,d)).debug;if(L&&console.time("preprocess data"),d.maxZoom<0||d.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(d.promoteId&&d.generateId)throw new Error("promoteId and generateId cannot be used together.");let W=c3(R,d);L&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",d.indexMaxZoom,d.indexMaxPoints),console.time("generate tiles")),W=p3(W,d),d.updateable&&(this.source=W),this.initializeIndex(W,d)}initializeIndex(R,d){this.tileIndex=d.cluster?new MW(d.clusterOptions):new PW(d),R.length&&this.tileIndex.initialize(R)}getTile(R,d,L){return d=+d,L=+L,(R=+R)<0||R>24?null:this.tileIndex.getTile(R,d,L)}updateData(R,d){let L=this.options;if(!L.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:W,source:te}=function(ue,me,ge){let Ce=function(Oe,Pe){var it,He;return Oe?{removeAll:Oe.removeAll,remove:new Set(Oe.remove||[]),add:new Map((it=Oe.add)==null?void 0:it.map(bt=>[Pe.promoteId?bt.properties[Pe.promoteId]:bt.id,bt])),update:new Map((He=Oe.update)==null?void 0:He.map(bt=>[bt.id,bt]))}:{remove:new Set,add:new Map,update:new Map}}(me,ge),Te=[];if(Ce.removeAll&&(Te=ue,ue=[]),Ce.remove.size||Ce.add.size){let Oe=[];for(let Pe of ue)(Ce.remove.has(Pe.id)||Ce.add.has(Pe.id))&&Oe.push(Pe);if(Oe.length){Te.push(...Oe);let Pe=new Set(Oe.map(it=>it.id));ue=ue.filter(it=>!Pe.has(it.id))}if(Ce.add.size){let Pe=c3({type:"FeatureCollection",features:Array.from(Ce.add.values())},ge);Pe=p3(Pe,ge),Te.push(...Pe),ue.push(...Pe)}}if(Ce.update.size){let Oe=new Map,Pe=[];for(let it of ue)Ce.update.has(it.id)?Oe.set(it.id,[...Oe.get(it.id)||[],it]):Pe.push(it);for(let[it,He]of Ce.update){let bt=Oe.get(it);if(!bt||bt.length===0)continue;let Et=AW(bt,He,ge);Te.push(...bt,...Et),Pe.push(...Et)}ue=Pe}return{affected:Te,source:ue}}(this.source,R,L);d&&({affected:W,source:te}=this.filterUpdate(te,W,d)),W.length&&(this.source=te,this.tileIndex.updateIndex(te,W,L))}filterUpdate(R,d,L){let W=new Set;for(let te of R)te.id!=null&&(L(vy(te))||(d.push(te),W.add(te.id)));return{affected:d,source:R=R.filter(te=>!W.has(te.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(R=>vy(R))}}updateClusterOptions(R,d){let L=this.options.cluster;this.options.cluster=R,this.options.clusterOptions=d,L!=R?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(R){return this.tileIndex.getClusterExpansionZoom(R)}getClusterChildren(R){return this.tileIndex.getChildren(R)}getClusterLeaves(R,d,L){return this.tileIndex.getLeaves(R,d,L)}},l.d1=Si,l.e=X,l.f=rr,l.g=yt,l.h=R=>e(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let d=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(d)}catch(L){throw new Error(`Could not load image because of ${j(L).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.i=he,l.j=R=>new Promise((d,L)=>{let W=new Image;W.onload=()=>{d(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>W.src=Me)},W.onerror=()=>L(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 te=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(te):Me}),l.k=(R,d)=>$t(X(R,{type:"json"}),d),l.l=Ot,l.m=$t,l.n=or,l.o=(R,d)=>$t(X(R,{type:"arrayBuffer"}),d),l.p=J4,l.q=function(R){return new _y(R).readFields(nY,[])},l.r=function(R){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(R))},l.s=Ge,l.t=As,l.u=Ps,l.v=Pc,l.w=ee,l.x=ht,l.y=vo,l.z=Bl}),E("worker",["./shared"],function(l){"use strict";class e{constructor(T,f){this.keyCache={},T&&this.replace(T,f)}replace(T,f){this._layerConfigs={},this._layers={},this.update(T,[],f)}update(T,f,u){for(let x of T){this._layerConfigs[x.id]=x;let z=this._layers[x.id]=l.bT(x,u);z._featureFilter=l.ah(z.filter,u),this.keyCache[x.id]&&delete this.keyCache[x.id]}for(let x of f)delete this.keyCache[x],delete this._layerConfigs[x],delete this._layers[x];this.familiesBySource={};let A=l.cJ(Object.values(this._layerConfigs),this.keyCache);for(let x of A){let z=x.map(P=>this._layers[P.id]),I=z[0];if(I.isHidden())continue;let O=I.source||"",D=this.familiesBySource[O];D||(D=this.familiesBySource[O]={});let B=I.sourceLayer||l.ag,F=D[B];F||(F=D[B]=[]),F.push(z)}}}class t{constructor(T){let f={},u=[];for(let I in T){let O=T[I],D=f[I]={};for(let B in O){let F=O[+B];if(!F||F.bitmap.width===0||F.bitmap.height===0)continue;let P={x:0,y:0,w:F.bitmap.width+2,h:F.bitmap.height+2};u.push(P),D[B]={rect:P,metrics:F.metrics}}}let{w:A,h:x}=l.p(u),z=new l.t({width:A||1,height:x||1});for(let I in T){let O=T[I];for(let D in O){let B=O[+D];if(!B||B.bitmap.width===0||B.bitmap.height===0)continue;let F=f[I][D].rect;l.t.copy(B.bitmap,z,{x:0,y:0},{x:F.x+1,y:F.y+1},B.bitmap)}}this.image=z,this.positions=f}}l.cK("GlyphAtlas",t);class n{constructor(T){this.tileID=new l.a3(T.tileID.overscaledZ,T.tileID.wrap,T.tileID.canonical.z,T.tileID.canonical.x,T.tileID.canonical.y),this.uid=T.uid,this.zoom=T.zoom,this.pixelRatio=T.pixelRatio,this.tileSize=T.tileSize,this.source=T.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=T.showCollisionBoxes,this.collectResourceTiming=!!T.collectResourceTiming,this.returnDependencies=!!T.returnDependencies,this.promoteId=T.promoteId,this.inFlightDependencies=[]}parse(T,f,u,A,x){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=T,this.collisionBoxArray=new l.ae;let z=new l.cL(Object.keys(T.layers).sort()),I=new l.cM(this.tileID,this.promoteId);I.bucketLayerIDs=[];let O={},D={featureIndex:I,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:u,subdivisionGranularity:x},B=f.familiesBySource[this.source];for(let q in B){let Z=T.layers[q];if(!Z)continue;Z.version===1&&l.w(`Vector tile source "${this.source}" layer "${q}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ee=z.encode(q),ae=[];for(let he=0;hewe.id)))}}let F=l.bY(D.glyphDependencies,q=>Object.keys(q).map(Number));for(let q of this.inFlightDependencies)q?.abort();this.inFlightDependencies=[];let P=Promise.resolve({});if(Object.keys(F).length){let q=new AbortController;this.inFlightDependencies.push(q),P=A.sendAsync({type:"GG",data:{stacks:F,source:this.source,tileID:this.tileID,type:"glyphs"}},q)}let j=Object.keys(D.iconDependencies),U=Promise.resolve({});if(j.length){let q=new AbortController;this.inFlightDependencies.push(q),U=A.sendAsync({type:"GI",data:{icons:j,source:this.source,tileID:this.tileID,type:"icons"}},q)}let $=Object.keys(D.patternDependencies),Q=Promise.resolve({});if($.length){let q=new AbortController;this.inFlightDependencies.push(q),Q=A.sendAsync({type:"GI",data:{icons:$,source:this.source,tileID:this.tileID,type:"patterns"}},q)}let re=D.dashDependencies,ne=Promise.resolve({});if(Object.keys(re).length){let q=new AbortController;this.inFlightDependencies.push(q),ne=A.sendAsync({type:"GDA",data:{dashes:re}},q)}let[se,G,X,K]=yield Promise.all([P,U,Q,ne]),H=new t(se),Y=new l.cN(G,X);for(let q in O){let Z=O[q];Z instanceof l.af?(r(Z.layers,this.zoom,u),l.cO({bucket:Z,glyphMap:se,glyphPositions:H.positions,imageMap:G,imagePositions:Y.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:D.subdivisionGranularity})):Z.hasDependencies&&(Z instanceof l.cP||Z instanceof l.cQ||Z instanceof l.cR)&&(r(Z.layers,this.zoom,u),Z.addFeatures(D,this.tileID.canonical,Y.patternPositions,K))}return this.status="done",{buckets:Object.values(O).filter(q=>!q.isEmpty()),featureIndex:I,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:H.image,imageAtlas:Y,dashPositions:K,glyphMap:this.returnDependencies?se:null,iconMap:this.returnDependencies?G:null,glyphPositions:this.returnDependencies?H.positions:null}})}}function r(_,T,f){let u=new l.J(T);for(let A of _)A.recalculate(u,f)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(T,f){this.loading[T]=f}finishLoading(T){delete this.loading[T]}abort(T){let f=this.loading[T];f?.abort&&(f.abort.abort(),delete this.loading[T])}setParsing(T,f){this.parsing[T]=f}consumeParsing(T){let f=this.parsing[T];if(f)return delete this.parsing[T],f}clearParsing(T){delete this.parsing[T]}markLoaded(T,f){this.loaded[T]=f}getLoaded(T){let f=this.loaded[T];if(f)return f}removeLoaded(T){delete this.loaded[T]}clearLoaded(){this.loaded={}}}class o{constructor(T){this.start=`${T}#start`,this.end=`${T}#end`,this.measure=T,performance.mark(this.start)}finish(){performance.mark(this.end);let T=performance.getEntriesByName(this.measure);return T.length===0&&(performance.measure(this.measure,this.start,this.end),T=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),T}}class s{constructor(T,f,u,A,x){this.type=T,this.properties=u||{},this.extent=x,this.pointsArray=f,this.id=A}loadGeometry(){return this.pointsArray.map(T=>T.map(f=>new l.P(f.x,f.y)))}}class c{constructor(T,f,u){this.version=2,this._myFeatures=T,this.name=f,this.length=T.length,this.extent=u}feature(T){return this._myFeatures[T]}}class m{constructor(){this.layers={}}addLayer(T){this.layers[T.name]=T}}function h(_){let T=l.cS(_);return T.byteOffset===0&&T.byteLength===T.buffer.byteLength||(T=new Uint8Array(T)),{vectorTile:_,rawData:T.buffer}}function v(_,T,f){let{extent:u}=_,A=Math.pow(2,f.z-T.z),x=(f.x-T.x*A)*u,z=(f.y-T.y*A)*u,I=[];for(let O=0;O<_.length;O++){let D=_.feature(O),B=D.loadGeometry();for(let P of B)for(let j of P)j.x=j.x*A-x,j.y=j.y*A-z;let F=128;B=l.cT(B,D.type,-F,-F,u+F,u+F),B.length!==0&&I.push(new s(D.type,B,D.properties,D.id,u))}return new c(I,_.name,u)}class g{constructor(T,f,u){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this.overzoomedTileResultCache=new l.cU(1e3)}loadVectorTile(T,f){try{return{vectorTile:T.encoding!=="mlt"?new l.cV(new l.cW(f)):new l.cX(f),rawData:f}}catch(u){let A=new Uint8Array(f),x=`Unable to parse the tile at ${T.request.url}, `;throw x+=A[0]===31&&A[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${l.d(u).message}`,new Error(x)}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,overzoomParameters:u}=T;u&&(T.request=u.overzoomRequest);let A=this._startRequestTiming(T),x=new n(T);this.tileState.startLoading(f,x);let z=new AbortController;x.abort=z;try{let I=yield l.o(T.request,z);if(T.etag&&T.etag===I.etag)return this.tileState.finishLoading(f),this._getEtagUnmodifiedResult(I,A);let O=this.loadVectorTile(T,I.data);if(this.tileState.finishLoading(f),!O)return null;let{vectorTile:D,rawData:B}=O;u&&({vectorTile:D,rawData:B}=this._getOverzoomTile(T,D));let F=this._getExpiryData(I),P=this._finishRequestTiming(A);x.vectorTile=D,this.tileState.markLoaded(f,x);let j={rawData:B,cacheControl:F,resourceTiming:P};this.tileState.setParsing(f,j);try{return yield this._parseWorkerTile(x,T,j)}finally{this.tileState.clearParsing(f)}}catch(I){throw this.tileState.finishLoading(f),x.status="done",this.tileState.markLoaded(f,x),I}})}_getEtagUnmodifiedResult(T,f){let u=this._getExpiryData(T),A=this._finishRequestTiming(f);return l.e({etagUnmodified:!0},u,A)}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x,cacheControl:z,resourceTiming:I}=u;A=l.e({rawTileData:x.slice(0),encoding:f.encoding},A,z,I)}return A})}_getExpiryData({expires:T,cacheControl:f,etag:u}){let A={};return T&&(A.expires=T),f&&(A.cacheControl=f),u&&(A.etag=u),A}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T){let f=T?.finish();return f?{resourceTiming:JSON.parse(JSON.stringify(f))}:{}}_getOverzoomTile(T,f){var u;let{tileID:A,source:x,overzoomParameters:z}=T,{maxZoomTileID:I}=z,O=`${I.key}_${A.key}_${(u=T.request)===null||u===void 0?void 0:u.url}`,D=this.overzoomedTileResultCache.get(O);if(D)return D;let B=new m,F=this.layerIndex.familiesBySource[x];for(let j in F){let U=f.layers[j];if(!U)continue;let $=v(U,I,A.canonical);$.length>0&&B.addLayer($)}let P=h(B);return this.overzoomedTileResultCache.set(O,P),P}reloadTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}}class i{constructor(){this.loaded={}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,encoding:u,rawImageData:A,redFactor:x,greenFactor:z,blueFactor:I,baseShift:O}=T,D=A.width+2,B=A.height+2,F=l.b(A)?new l.R({width:D,height:B},yield l.cY(A,-1,-1,D,B)):A,P=new l.cZ(f,F,u,x,z,I,O);return this.loaded||(this.loaded={}),this.loaded[f]=P,P})}removeTile(T){let f=this.loaded,u=T.uid;f?.[u]&&delete f[u]}}class w{constructor(T,f,u,A=S){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this._createGeoJSONIndex=A}loadVectorTile(T){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:f,x:u,y:A}=T.tileID.canonical,x=this._geoJSONIndex.getTile(f,u,A);return x?h(new l.c_(x.features,{version:2,extent:l.a6})):null}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f}=T,u=new n(T);u.abort=new AbortController;try{let A=this.loadVectorTile(T);if(!A)return null;let{vectorTile:x,rawData:z}=A;u.vectorTile=x,this.tileState.markLoaded(f,u);let I={rawData:z};this.tileState.setParsing(f,I);try{return yield this._parseWorkerTile(u,T,I)}finally{this.tileState.clearParsing(f)}}catch(A){throw u.status="done",this.tileState.markLoaded(f,u),A}})}_reloadLoadedTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x}=u;A=l.e({rawTileData:x.slice(0),encoding:"mvt"},A)}return A})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}loadData(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort();let u=this._startRequestTiming(T);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(T,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let A={};return T.request&&(A.data=T.data),this._finishRequestTiming(u,T,A),A}catch(A){if(delete this._pendingRequest,!l.$(A))throw A;return{abandoned:!0}}})}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T,f,u){let A=T?.finish();A&&(u.resourceTiming={[f.source]:JSON.parse(JSON.stringify(A))})}reloadTile(T){return this.tileState.getLoaded(T.uid)?this._reloadLoadedTile(T):this.loadTile(T)}loadAndProcessGeoJSON(T,f){return l._(this,void 0,void 0,function*(){var u;if(T.request&&(T.data=(yield l.k(T.request,f)).data),T.data)return T.data=this._filterGeoJSON(T.data,T.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(T.data,T));if(T.dataDiff)return(u=this._geoJSONIndex)!==null&&u!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},T)),void this._geoJSONIndex.updateData(T.dataDiff,this._getFilterPredicate(T.filter));if(T.updateCluster&&this._geoJSONIndex.updateClusterOptions(T.geojsonVtOptions.cluster,M(T)),this._geoJSONIndex==null)throw new Error(`Input data given to '${T.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(T,f){if(T.type!=="FeatureCollection")return T;let u=this._getFilterPredicate(f);return u?{type:"FeatureCollection",features:T.features.filter(A=>u(A))}:T}_getFilterPredicate(T){if(typeof T!="boolean"&&!T?.length)return;let f=l.c$(T,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(f.result==="error")throw new Error(f.value.map(u=>`${u.key}: ${u.message}`).join(", "));return u=>f.value.evaluate({zoom:0},u)}removeSource(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort()})}getClusterExpansionZoom(T){return this._geoJSONIndex.getClusterExpansionZoom(T.clusterId)}getClusterChildren(T){return this._geoJSONIndex.getClusterChildren(T.clusterId)}getClusterLeaves(T){return this._geoJSONIndex.getClusterLeaves(T.clusterId,T.limit,T.offset)}}function S(_,T){let f=l.e(T.geojsonVtOptions||{},{updateable:!0,clusterOptions:M(T)});return new l.d0(_,f)}function M({geojsonVtOptions:_,clusterProperties:T}){if(!T||!_.clusterOptions)return _.clusterOptions;let f={},u={},A={accumulated:null,zoom:0},x={properties:null},z=Object.keys(T);for(let I of z){let[O,D]=T[I],B=l.c$(D),F=l.c$(typeof O=="string"?[O,["accumulated"],["get",I]]:O);f[I]=B.value,u[I]=F.value}return _.clusterOptions.map=I=>{x.properties=I;let O={};for(let D of z)O[D]=f[D].evaluate(A,x);return O},_.clusterOptions.reduce=(I,O)=>{x.properties=O;for(let D of z)A.accumulated=I[D],I[D]=u[D].evaluate(A,x)},_.clusterOptions}class C{constructor(T){this.self=T,this.actor=new l.N(T),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(f,u)=>{if(this.externalWorkerSourceTypes[f])throw new Error(`Worker source with name "${f}" already registered.`);this.externalWorkerSourceTypes[f]=u},this.self.addProtocol=l.cH,this.self.removeProtocol=l.cI,this.self.registerRTLTextPlugin=f=>{l.d1.setMethods(f)},this.self.makeRequest=l.m,this.actor.registerMessageHandler("LDT",(f,u)=>this._getDEMWorkerSource(f,u.source).loadTile(u)),this.actor.registerMessageHandler("RDT",(f,u)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(f,u.source).removeTile(u)})),this.actor.registerMessageHandler("GCEZ",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterExpansionZoom(u)})),this.actor.registerMessageHandler("GCC",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterChildren(u)})),this.actor.registerMessageHandler("GCL",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterLeaves(u)})),this.actor.registerMessageHandler("LD",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadData(u)),this.actor.registerMessageHandler("LT",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadTile(u)),this.actor.registerMessageHandler("RT",(f,u)=>this._getWorkerSource(f,u.type,u.source).reloadTile(u)),this.actor.registerMessageHandler("AT",(f,u)=>this._getWorkerSource(f,u.type,u.source).abortTile(u)),this.actor.registerMessageHandler("RMT",(f,u)=>this._getWorkerSource(f,u.type,u.source).removeTile(u)),this.actor.registerMessageHandler("RS",(f,u)=>l._(this,void 0,void 0,function*(){var A,x;if(!(!((x=(A=this.workerSources[f])===null||A===void 0?void 0:A[u.type])===null||x===void 0)&&x[u.source]))return;let z=this.workerSources[f][u.type][u.source];delete this.workerSources[f][u.type][u.source],z.removeSource!==void 0&&z.removeSource(u)})),this.actor.registerMessageHandler("RM",f=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[f],delete this.availableImages[f],delete this.workerSources[f],delete this.demWorkerSources[f],this.globalStates.delete(f)})),this.actor.registerMessageHandler("SR",(f,u)=>l._(this,void 0,void 0,function*(){this.referrer=u})),this.actor.registerMessageHandler("SRPS",(f,u)=>this._syncRTLPluginState(f,u)),this.actor.registerMessageHandler("IS",(f,u)=>l._(this,void 0,void 0,function*(){this.self.importScripts(u)})),this.actor.registerMessageHandler("SI",(f,u)=>this._setImages(f,u)),this.actor.registerMessageHandler("UL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).update(u.layers,u.removedIds,this._getGlobalState(f))})),this.actor.registerMessageHandler("UGS",(f,u)=>l._(this,void 0,void 0,function*(){let A=this._getGlobalState(f);for(let x in u)A[x]=u[x]})),this.actor.registerMessageHandler("SL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).replace(u,this._getGlobalState(f))}))}_getGlobalState(T){let f=this.globalStates.get(T);return f||(f={},this.globalStates.set(T,f)),f}_setImages(T,f){return l._(this,void 0,void 0,function*(){this.availableImages[T]=f;for(let u in this.workerSources[T]){let A=this.workerSources[T][u];for(let x in A)A[x].availableImages=f}})}_syncRTLPluginState(T,f){return l._(this,void 0,void 0,function*(){return yield l.d1.syncState(f,this.self.importScripts)})}_getAvailableImages(T){let f=this.availableImages[T];return f||(f=[]),f}_getLayerIndex(T){let f=this.layerIndexes[T];return f||(f=this.layerIndexes[T]=new e),f}_getWorkerSource(T,f,u){var A,x;if((A=this.workerSources)[T]||(A[T]={}),(x=this.workerSources[T])[f]||(x[f]={}),!this.workerSources[T][f][u]){let z={sendAsync:(I,O)=>(I.targetMapId=T,this.actor.sendAsync(I,O))};switch(f){case"vector":this.workerSources[T][f][u]=new g(z,this._getLayerIndex(T),this._getAvailableImages(T));break;case"geojson":this.workerSources[T][f][u]=new w(z,this._getLayerIndex(T),this._getAvailableImages(T));break;default:this.workerSources[T][f][u]=new this.externalWorkerSourceTypes[f](z,this._getLayerIndex(T),this._getAvailableImages(T))}}return this.workerSources[T][f][u]}_getDEMWorkerSource(T,f){var u,A;return(u=this.demWorkerSources)[T]||(u[T]={}),(A=this.demWorkerSources[T])[f]||(A[f]=new i),this.demWorkerSources[T][f]}}return l.i(self)&&(self.worker=new C(self)),C}),E("index",["exports","./shared"],function(l,e){"use strict";var t="5.24.0";function n(){var pe=new e.A(4);return e.A!=Float32Array&&(pe[1]=0,pe[2]=0),pe[0]=1,pe[3]=1,pe}let r,a,o,s={frame(pe,y,N,ie){let fe=ie||window,be=fe.requestAnimationFrame(je=>{Re(),y(je)}),{unsubscribe:Re}=e.s(pe.signal,"abort",()=>{Re(),fe.cancelAnimationFrame(be),N(new e.a(pe.signal.reason))},!1)},frameAsync(pe,y){return new Promise((N,ie)=>{this.frame(pe,N,ie,y)})},getImageData(pe,y=0){return this.getImageCanvasContext(pe).getImageData(-y,-y,pe.width+2*y,pe.height+2*y)},getImageCanvasContext(pe){let y=window.document.createElement("canvas"),N=y.getContext("2d",{willReadFrequently:!0});if(!N)throw new Error("failed to create canvas 2d context");return y.width=pe.width,y.height=pe.height,N.drawImage(pe,0,0,pe.width,pe.height),N},resolveURL:pe=>(r||(r=document.createElement("a")),r.href=pe,r.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return o!==void 0?o:!!matchMedia&&(a!=null||(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)},set prefersReducedMotion(pe){o=pe}},c=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(pe){this._frozenAt=pe}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function m(){return c.getCurrentTime()}var h,v;class g{static create(y,N,ie){let fe=window.document.createElement(y);return N!==void 0&&(fe.className=N),ie&&ie.appendChild(fe),fe}static createNS(y,N){return window.document.createElementNS(y,N)}static disableDrag(){g.docStyle&&g.selectProp&&(g.userSelect=g.docStyle[g.selectProp],g.docStyle[g.selectProp]="none")}static enableDrag(){g.docStyle&&g.selectProp&&(g.docStyle[g.selectProp]=g.userSelect)}static suppressClickInternal(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",g.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",g.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",g.suppressClickInternal,!0)},0)}static getScale(y){let N=y.getBoundingClientRect();return{x:N.width/y.offsetWidth||1,y:N.height/y.offsetHeight||1,boundingClientRect:N}}static getPoint(y,N,ie){let fe=N.boundingClientRect;return new e.P((ie.clientX-fe.left)/N.x-y.clientLeft,(ie.clientY-fe.top)/N.y-y.clientTop)}static mousePos(y,N){let ie=g.getScale(y);return g.getPoint(y,ie,N)}static touchPos(y,N){let ie=[],fe=g.getScale(y);for(let be of N)ie.push(g.getPoint(y,fe,be));return ie}static sanitize(y){let N=new DOMParser().parseFromString(y,"text/html").body||document.createElement("body"),ie=N.querySelectorAll("script");for(let fe of ie)fe.remove();return g.clean(N),N.innerHTML}static isPossiblyDangerous(y,N){let ie=N.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(y)||!ie.includes("javascript:")&&!ie.includes("data:"))||!!y.startsWith("on")||void 0}static clean(y){let N=y.children;for(let ie of N)g.removeAttributes(ie),g.clean(ie)}static removeAttributes(y){for(let{name:N,value:ie}of y.attributes)g.isPossiblyDangerous(N,ie)&&y.removeAttribute(N)}}g.docStyle=typeof window<"u"&&((h=window.document)===null||h===void 0?void 0:h.documentElement.style),g.selectProp=!g.docStyle||"userSelect"in g.docStyle?"userSelect":"webkitUserSelect",function(pe){let y,N,ie,fe;pe.resetRequestQueue=()=>{y=[],N=0,ie=0,fe={}},pe.addThrottleControl=Ze=>{let ut=ie++;return fe[ut]=Ze,ut},pe.removeThrottleControl=Ze=>{delete fe[Ze],Re()},pe.getImage=(Ze,ut,ft=!0)=>new Promise((Dt,Gt)=>{Ze.headers||(Ze.headers={}),Ze.headers.accept="image/webp,*/*",e.e(Ze,{type:"image"}),y.push({abortController:ut,requestParameters:Ze,supportImageRefresh:ft,state:"queued",onError:Kt=>{Gt(Kt)},onSuccess:Kt=>{Dt(Kt)}}),Re()});let be=Ze=>e._(this,void 0,void 0,function*(){Ze.state="running";let{requestParameters:ut,supportImageRefresh:ft,onError:Dt,onSuccess:Gt,abortController:Kt}=Ze,st=ft===!1&&!e.i(self)&&!e.g(ut.url)&&(!ut.headers||Object.keys(ut.headers).reduce((ir,dr)=>ir&&dr==="accept",!0));N++;let It=st?je(ut,Kt):e.m(ut,Kt);try{let ir=yield It;delete Ze.abortController,Ze.state="completed",ir.data instanceof HTMLImageElement||e.b(ir.data)?Gt(ir):ir.data&&Gt({data:yield(Ut=ir.data,typeof createImageBitmap=="function"?e.h(Ut):e.j(Ut)),cacheControl:ir.cacheControl,expires:ir.expires})}catch(ir){delete Ze.abortController,Dt(e.d(ir))}finally{N--,Re()}var Ut}),Re=()=>{let Ze=(()=>{for(let ut of Object.keys(fe))if(fe[ut]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let ut=N;ut0;ut++){let ft=y.shift();ft.abortController.signal.aborted?ut--:be(ft)}},je=(Ze,ut)=>new Promise((ft,Dt)=>{let Gt=new Image,Kt=Ze.url,st=Ze.credentials;st&&st==="include"?Gt.crossOrigin="use-credentials":(st&&st==="same-origin"||!e.f(Kt))&&(Gt.crossOrigin="anonymous"),ut.signal.addEventListener("abort",()=>{Gt.src="",Dt(new e.a(ut.signal.reason))}),Gt.fetchPriority="high",Gt.onload=()=>{Gt.onerror=Gt.onload=null,ft({data:Gt})},Gt.onerror=()=>{Gt.onerror=Gt.onload=null,ut.signal.aborted||Dt(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."))},Gt.src=Kt})}(v||(v={})),v.resetRequestQueue();class i{constructor(y){this._transformRequestFn=y??null}transformRequest(y,N){return this._transformRequestFn&&this._transformRequestFn(y,N)||{url:y}}setTransformRequest(y){this._transformRequestFn=y}}function w(pe){let y=[];if(typeof pe=="string")y.push({id:"default",url:pe});else if(pe&&pe.length>0){let N=[];for(let{id:ie,url:fe}of pe){let be=`${ie}${fe}`;N.includes(be)||(N.push(be),y.push({id:ie,url:fe}))}}return y}function S(pe,y,N){try{let ie=new URL(pe);return ie.pathname+=`${y}${N}`,ie.toString()}catch{throw new Error(`Invalid sprite URL "${pe}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function M(pe){let{userImage:y}=pe;return!(!y?.render||!y.render()||(pe.data.replace(new Uint8Array(y.data.buffer)),0))}class C extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let y of Object.keys(this.images))this.removeImage(y);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(y){if(this.loaded!==y&&(this.loaded=y,y)){for(let{ids:N,promiseResolve:ie}of this.requestors)ie(this._getImagesForIds(N));this.requestors=[]}}getImage(y){let N=this.images[y];if(N&&!N.data&&N.spriteData){let ie=N.spriteData;N.data=new e.R({width:ie.width,height:ie.height},ie.context.getImageData(ie.x,ie.y,ie.width,ie.height).data),N.spriteData=null}return N}addImage(y,N){if(this.images[y])throw new Error(`Image id ${y} already exist, use updateImage instead`);this._validate(y,N)&&(this.images[y]=N)}_validate(y,N){let ie=!0,fe=N.data||N.spriteData;return this._validateStretch(N.stretchX,fe?.width)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchX" value`))),ie=!1),this._validateStretch(N.stretchY,fe?.height)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchY" value`))),ie=!1),this._validateContent(N.content,N)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "content" value`))),ie=!1),ie}_validateStretch(y,N){if(!y)return!0;let ie=0;for(let fe of y){if(fe[0]=y[1]))}updateImage(y,N,ie=!0){let fe=this.getImage(y);if(ie&&(fe.data.width!==N.data.width||fe.data.height!==N.data.height))throw new Error(`size mismatch between old image (${fe.data.width}x${fe.data.height}) and new image (${N.data.width}x${N.data.height}).`);N.version=fe.version+1,this.images[y]=N,this.updatedImages[y]=!0}removeImage(y){var N;let ie=this.images[y];delete this.images[y],delete this.patterns[y],!((N=ie.userImage)===null||N===void 0)&&N.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(y){return new Promise((N,ie)=>{let fe=!0;if(!this.isLoaded())for(let be of y)this.images[be]||(fe=!1);this.isLoaded()||fe?N(this._getImagesForIds(y)):this.requestors.push({ids:y,promiseResolve:N})})}_getImagesForIds(y){var N;let ie={};for(let fe of y){let be=this.getImage(fe);be||(this.fire(new e.n("styleimagemissing",{id:fe})),be=this.getImage(fe)),be?ie[fe]={data:be.data.clone(),pixelRatio:be.pixelRatio,sdf:be.sdf,version:be.version,stretchX:be.stretchX,stretchY:be.stretchY,content:be.content,textFitWidth:be.textFitWidth,textFitHeight:be.textFitHeight,hasRenderCallback:!!(!((N=be.userImage)===null||N===void 0)&&N.render)}:e.w(`Image "${fe}" 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:y,height:N}=this.atlasImage;return{width:y,height:N}}getPattern(y){let N=this.patterns[y],ie=this.getImage(y);if(!ie)return null;if(N&&N.position.version===ie.version)return N.position;if(N)N.position.version=ie.version;else{let fe={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},be=new e.I(fe,ie);this.patterns[y]={bin:fe,position:be}}return this._updatePatternAtlas(),this.patterns[y].position}bind(y){let N=y.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(y,this.atlasImage,N.RGBA),this.atlasTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE)}_updatePatternAtlas(){let y=[];for(let be in this.patterns)y.push(this.patterns[be].bin);let{w:N,h:ie}=e.p(y),fe=this.atlasImage;fe.resize({width:N||1,height:ie||1});for(let be in this.patterns){let{bin:Re}=this.patterns[be],je=Re.x+1,Ze=Re.y+1,ut=this.getImage(be).data,ft=ut.width,Dt=ut.height;e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze},{width:ft,height:Dt}),e.R.copy(ut,fe,{x:0,y:Dt-1},{x:je,y:Ze-1},{width:ft,height:1}),e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze+Dt},{width:ft,height:1}),e.R.copy(ut,fe,{x:ft-1,y:0},{x:je-1,y:Ze},{width:1,height:Dt}),e.R.copy(ut,fe,{x:0,y:0},{x:je+ft,y:Ze},{width:1,height:Dt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(y){for(let N of y){if(this.callbackDispatchedThisFrame[N])continue;this.callbackDispatchedThisFrame[N]=!0;let ie=this.getImage(N);ie||e.w(`Image with ID: "${N}" was not found`),M(ie)&&this.updateImage(N,ie)}}cloneImages(){let y={};for(let N in this.images){let ie=this.images[N];y[N]=Object.assign(Object.assign({},ie),{data:ie.data?ie.data.clone():null})}return y}}let _=1e20,T=new Float64Array(256);for(let pe=0;pe<256;pe++){let y=.5-Math.pow(pe/255,.45454545454545453);T[pe]=y*Math.abs(y)}function f(pe,y,N,ie,fe,be,Re,je,Ze){for(let ut=y;ut-1);Ze++,be[Ze]=je,Re[Ze]=ut,Re[Ze+1]=_}for(let je=0,Ze=0;je/[-\w]+/.test(fe)?fe:`'${CSS.escape(fe)}'`).join(",");return new x.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ie,fontWeight:this._fontWeight(N[0]),fontStyle:this._fontStyle(N[0]),lang:this.lang})}_fontStyle(y){return/italic/i.test(y)?"italic":/oblique/i.test(y)?"oblique":"normal"}_fontWeight(y){let N={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},ie;for(let[fe,be]of Object.entries(N))new RegExp(`\\b${fe}\\b`,"i").test(y)&&(ie=`${be}`);return ie}destroy(){for(let y in this.entries){let N=this.entries[y];N.tinySDF=null,N.ideographTinySDF=null,N.glyphs={},N.requests={},N.ranges={}}this.entries={}}}x.loadGlyphRange=function(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=256*y,be=fe+255,Re=yield ie.transformRequest(N.replace("{fontstack}",pe).replace("{range}",`${fe}-${be}`),"Glyphs"),je=yield e.o(Re,new AbortController);if(!je?.data)throw new Error(`Could not load glyph range. range: ${y}, ${fe}-${be}`);let Ze={};for(let ut of e.q(je.data))Ze[ut.id]=ut;return Ze})},x.TinySDF=class{constructor({fontSize:pe=24,buffer:y=3,radius:N=8,cutoff:ie=.25,fontFamily:fe="sans-serif",fontWeight:be="normal",fontStyle:Re="normal",lang:je=null}={}){this.buffer=y,this.radius=N,this.cutoff=ie,this.lang=je;let Ze=this.size=pe+4*y,ut=this._createCanvas(Ze),ft=this.ctx=ut.getContext("2d",{willReadFrequently:!0});ft.font=`${Re} ${be} ${pe}px ${fe}`,ft.textBaseline="alphabetic",ft.textAlign="left",ft.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(pe){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(pe,pe);let y=document.createElement("canvas");return y.width=y.height=pe,y}draw(pe){let{width:y,actualBoundingBoxAscent:N,actualBoundingBoxDescent:ie,actualBoundingBoxLeft:fe,actualBoundingBoxRight:be}=this.ctx.measureText(pe),Re=Math.ceil(N),je=Math.floor(fe),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(be)-je)),ut=Math.max(0,Math.min(this.size-this.buffer,Re+Math.ceil(ie))),ft=Ze+2*this.buffer,Dt=ut+2*this.buffer,Gt=Math.max(ft*Dt,0),Kt=new Uint8ClampedArray(Gt),st={data:Kt,width:ft,height:Dt,glyphWidth:Ze,glyphHeight:ut,glyphTop:Re,glyphLeft:je,glyphAdvance:y};if(Ze===0||ut===0)return st;let{ctx:It,buffer:Ut,gridInner:ir,gridOuter:dr}=this;this.lang&&(It.lang=this.lang),It.clearRect(Ut,Ut,Ze,ut),It.fillText(pe,Ut-je,Ut+Re);let Ar=It.getImageData(Ut,Ut,Ze,ut);dr.fill(_,0,Gt),ir.fill(0,0,Gt);let hr=3;for(let Cr=0;Cr1&&(Ze=y[++je]);let ft=Math.abs(ut-Ze.left),Dt=Math.abs(ut-Ze.right),Gt=Math.min(ft,Dt),Kt,st=be/ie*(fe+1);if(Ze.isDash){let It=fe-Math.abs(st);Kt=Math.sqrt(Gt*Gt+It*It)}else Kt=fe-Math.sqrt(Gt*Gt+st*st);this.data[Re+ut]=Math.max(0,Math.min(255,Kt+128))}}}addRegularDash(y){for(let je=y.length-1;je>=0;--je){let Ze=y[je],ut=y[je+1];Ze.zeroLength?y.splice(je,1):ut&&ut.isDash===Ze.isDash&&(ut.left=Ze.left,y.splice(je,1))}let N=y[0],ie=y[y.length-1];N.isDash===ie.isDash&&(N.left=ie.left-this.width,ie.right=N.right+this.width);let fe=this.width*this.nextRow,be=0,Re=y[be];for(let je=0;je1&&(Re=y[++be]);let Ze=Math.abs(je-Re.left),ut=Math.abs(je-Re.right),ft=Math.min(Ze,ut);this.data[fe+je]=Math.max(0,Math.min(255,(Re.isDash?ft:-ft)+128))}}addDash(y,N){let ie=N?7:0,fe=2*ie+1;if(this.nextRow+fe>this.height)return e.w("LineAtlas out of space"),null;let be=0;for(let je of y)be+=je;if(be!==0){let je=this.width/be,Ze=this.getDashRanges(y,this.width,je);N?this.addRoundDash(Ze,je,ie):this.addRegularDash(Ze)}let Re={y:this.nextRow+ie,height:2*ie,width:be};return this.nextRow+=fe,this.dirty=!0,Re}bind(y){let N=y.gl;this.texture?(N.bindTexture(N.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,N.texSubImage2D(N.TEXTURE_2D,0,0,0,this.width,this.height,N.ALPHA,N.UNSIGNED_BYTE,this.data))):(this.texture=N.createTexture(),N.bindTexture(N.TEXTURE_2D,this.texture),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.LINEAR),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.LINEAR),N.texImage2D(N.TEXTURE_2D,0,N.ALPHA,this.width,this.height,0,N.ALPHA,N.UNSIGNED_BYTE,this.data))}}let P="maplibre_preloaded_worker_pool";class j{constructor(){this.active={}}acquire(y){if(!this.workers)for(this.workers=[];this.workers.lengthe.m(y,N))),Q}function G(pe,y){let N=e.O();return e.Q(N,N,[1,1,0]),e.S(N,N,[.5*pe.width,.5*pe.height,1]),pe.calculatePosMatrix?e.U(N,N,pe.calculatePosMatrix(y.toUnwrapped())):N}function X(pe,y,N,ie,fe,be,Re){var je;let Ze=function(Gt,Kt,st){if(Gt)for(let It of Gt){let Ut=Kt[It];if(Ut?.source===st&&Ut.type==="fill-extrusion")return!0}else for(let It in Kt){let Ut=Kt[It];if(Ut.source===st&&Ut.type==="fill-extrusion")return!0}return!1}((je=fe?.layers)!==null&&je!==void 0?je:null,y,pe.id),ut=be.maxPitchScaleFactor(),ft=pe.tilesIn(ie,ut,Ze);ft.sort(K);let Dt=[];for(let Gt of ft)Dt.push({wrappedTileID:Gt.tileID.wrapped().key,queryResults:Gt.tile.queryRenderedFeatures(y,N,pe.getState(),Gt.queryGeometry,Gt.cameraQueryGeometry,Gt.scale,fe,be,ut,G(be,Gt.tileID),Re?(Kt,st)=>Re(Gt.tileID,Kt,st):void 0)});return function(Gt,Kt){for(let st in Gt)for(let It of Gt[st])H(It,Kt);return Gt}(function(Gt){let Kt={},st={};for(let{queryResults:It,wrappedTileID:Ut}of Gt){st[Ut]||(st[Ut]={});let ir=st[Ut];for(let dr in It){let Ar=It[dr];ir[dr]||(ir[dr]={});let hr=ir[dr];Kt[dr]||(Kt[dr]=[]);for(let vr of Ar)hr[vr.featureIndex]||(hr[vr.featureIndex]=!0,Kt[dr].push(vr))}}return Kt}(Dt),pe)}function K(pe,y){let N=pe.tileID,ie=y.tileID;return N.overscaledZ-ie.overscaledZ||N.canonical.y-ie.canonical.y||N.wrap-ie.wrap||N.canonical.x-ie.canonical.x}function H(pe,y){let N=pe.feature,ie=y.getFeatureState(N.layer["source-layer"],N.id);N.source=N.layer.source,N.layer["source-layer"]&&(N.sourceLayer=N.layer["source-layer"]),N.state=ie}function Y(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=pe;if(pe.url?fe=(yield e.k(yield y.transformRequest(pe.url,"Source"),N)).data:yield s.frameAsync(N,ie),!fe)return null;let be=e.V(e.e(fe,pe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in fe&&fe.vector_layers&&(be.vectorLayerIds=fe.vector_layers.map(Re=>Re.id)),be})}class q{constructor(y,N){y&&(N?this.setSouthWest(y).setNorthEast(N):Array.isArray(y)&&(y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1])))}setNorthEast(y){return this._ne=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}setSouthWest(y){return this._sw=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}extend(y){let N=this._sw,ie=this._ne,fe,be;if(y instanceof e.W)fe=y,be=y;else{if(!(y instanceof q))return Array.isArray(y)?y.length===4||y.every(Array.isArray)?this.extend(q.convert(y)):this.extend(e.W.convert(y)):y&&("lng"in y||"lon"in y)&&"lat"in y?this.extend(e.W.convert(y)):this;if(fe=y._sw,be=y._ne,!fe||!be)return this}return N||ie?(N.lng=Math.min(fe.lng,N.lng),N.lat=Math.min(fe.lat,N.lat),ie.lng=Math.max(be.lng,ie.lng),ie.lat=Math.max(be.lat,ie.lat)):(this._sw=new e.W(fe.lng,fe.lat),this._ne=new e.W(be.lng,be.lat)),this}getCenter(){return new e.W((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 e.W(this.getWest(),this.getNorth())}getSouthEast(){return new e.W(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(y){let{lng:N,lat:ie}=e.W.convert(y),fe=this._sw.lng<=N&&N<=this._ne.lng;return this._sw.lng>this._ne.lng&&(fe=this._sw.lng>=N&&N>=this._ne.lng),this._sw.lat<=ie&&ie<=this._ne.lat&&fe}intersects(y){if(!((y=q.convert(y)).getNorth()>=this.getSouth()&&y.getSouth()<=this.getNorth()))return!1;let N=Math.abs(this.getEast()-this.getWest()),ie=Math.abs(y.getEast()-y.getWest());if(N>=360||ie>=360)return!0;let fe=e.X(this.getWest(),-180,180),be=e.X(this.getEast(),-180,180),Re=e.X(y.getWest(),-180,180),je=e.X(y.getEast(),-180,180),Ze=fe>be,ut=Re>je;return!(!Ze||!ut)||(Ze?je>=fe||Re<=be:ut?be>=Re||fe<=je:Re<=be&&je>=fe)}static convert(y){return y instanceof q?y:y&&new q(y)}static fromLngLat(y,N=0){let ie=360*N/40075017,fe=ie/Math.cos(Math.PI/180*y.lat);return new q(new e.W(y.lng-fe,y.lat-ie),new e.W(y.lng+fe,y.lat+ie))}adjustAntiMeridian(){let y=new e.W(this._sw.lng,this._sw.lat),N=new e.W(this._ne.lng,this._ne.lat);return new q(y,y.lng>N.lng?new e.W(N.lng+360,N.lat):N)}}class Z{constructor(y,N,ie){this.bounds=q.convert(this.validateBounds(y)),this.minzoom=N||0,this.maxzoom=ie||24}validateBounds(y){return Array.isArray(y)&&y.length===4?[Math.max(-180,y[0]),Math.max(-90,y[1]),Math.min(180,y[2]),Math.min(90,y[3])]:[-180,-90,180,90]}contains(y){let N=Math.pow(2,y.z),ie=Math.floor(e.Z(this.bounds.getWest())*N),fe=Math.floor(e.Y(this.bounds.getNorth())*N),be=Math.ceil(e.Z(this.bounds.getEast())*N),Re=Math.ceil(e.Y(this.bounds.getSouth())*N);return y.x>=ie&&y.x=fe&&y.y{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie={request:yield this.map._requestManager.transformRequest(N,"Tile"),uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(y),etag:y.etag};ie.request.collectResourceTiming=this._collectResourceTiming;let fe="RT";if(y.actor&&y.state!=="expired"){if(y.state==="loading")return new Promise((be,Re)=>{y.reloadPromise={resolve:be,reject:Re}})}else y.actor=this.dispatcher.getActor(),fe="LT";y.abortController=new AbortController;try{let be=yield y.actor.sendAsync({type:fe,data:ie},y.abortController);if(delete y.abortController,y.aborted)return;this._afterTileLoadWorkerResponse(y,be);let Re={};return be?.etagUnmodified&&(Re.unmodified=!0),Re}catch(be){if(delete y.abortController,y.aborted)return;if(be&&be.status!==404)throw be;this._afterTileLoadWorkerResponse(y,null)}})}_getOverzoomParameters(y){return e._(this,void 0,void 0,function*(){if(y.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let N=y.tileID.scaledTo(this.maxzoom).canonical,ie=N.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:N,overzoomRequest:yield this.map._requestManager.transformRequest(ie,"Tile")}})}_afterTileLoadWorkerResponse(y,N){if(N?.resourceTiming&&(y.resourceTiming=N.resourceTiming),N&&this.map._refreshExpiredTiles&&y.setExpiryData(N),y.etag=N?.etag,y.loadVectorData(N,this.map.painter),y.reloadPromise){let ie=y.reloadPromise;y.reloadPromise=null,this.loadTile(y).then(ie.resolve).catch(ie.reject)}}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.actor&&(yield y.actor.sendAsync({type:"AT",data:{uid:y.uid,type:this.type,source:this.id}}))})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),y.actor&&(yield y.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ae extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.dispatcher=ie,this.setEventedParent(fe),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},N),e.e(this,e.V(N,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(y=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let N=yield Y(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,N&&(e.e(this,N),N.bounds&&(this.tileBounds=new Z(N.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:y})))}catch(N){this._tileJSONRequest=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}onAdd(y){this.map=y,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(y){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),y(),this.load(!0)}setTiles(y){return this.setSourceProperty(()=>{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}serialize(){return e.e({},this._options)}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);y.abortController=new AbortController;try{let ie=yield v.getImage(yield this.map._requestManager.transformRequest(N,"Tile"),y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ie?.data){this.map._refreshExpiredTiles&&(ie.cacheControl||ie.expires)&&y.setExpiryData({cacheControl:ie.cacheControl,expires:ie.expires});let fe=this.map.painter.context,be=fe.gl,Re=ie.data;y.texture=this.map.painter.getTileTexture(Re.width),y.texture?y.texture.update(Re,{useMipmap:!0}):(y.texture=new e.T(fe,Re,be.RGBA,{useMipmap:!0}),y.texture.bind(be.LINEAR,be.CLAMP_TO_EDGE,be.LINEAR_MIPMAP_NEAREST)),y.state="loaded"}}catch(ie){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ie)throw y.state="errored",ie}})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController)})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.texture&&this.map.painter.saveTileTexture(y.texture)})}hasTransition(){return!1}}class he extends ae{constructor(y,N,ie,fe){super(y,N,ie,fe),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},N),this.encoding=N.encoding||"mapbox",this.redFactor=N.redFactor,this.greenFactor=N.greenFactor,this.blueFactor=N.blueFactor,this.baseShift=N.baseShift}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie=yield this.map._requestManager.transformRequest(N,"Tile");y.neighboringTiles=this._getNeighboringTiles(y.tileID),y.abortController=new AbortController;try{let fe=yield v.getImage(ie,y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(fe?.data){let be=fe.data;this.map._refreshExpiredTiles&&(fe.cacheControl||fe.expires)&&y.setExpiryData({cacheControl:fe.cacheControl,expires:fe.expires});let Re=e.b(be)&&e.a0()?be:yield this.readImageNow(be),je={type:this.type,uid:y.uid,source:this.id,rawImageData:Re,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(y.actor&&y.state!=="expired"&&y.state!=="reloading")return;y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor()),y.dem=yield y.actor.sendAsync({type:"LDT",data:je}),y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0,y.state="loaded"}}catch(fe){if(delete y.abortController,y.aborted)y.state="unloaded";else if(fe)throw y.state="errored",fe}})}readImageNow(y){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.a1()){let N=y.width+2,ie=y.height+2;try{return new e.R({width:N,height:ie},yield e.a2(y,-1,-1,N,ie))}catch{}}return s.getImageData(y,1)})}_getNeighboringTiles(y){let N=y.canonical,ie=Math.pow(2,N.z),fe=(N.x-1+ie)%ie,be=N.x===0?y.wrap-1:y.wrap,Re=(N.x+1+ie)%ie,je=N.x+1===ie?y.wrap+1:y.wrap,Ze={};return Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y).key]={backfilled:!1},N.y>0&&(Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,y.wrap,N.z,N.x,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y-1).key]={backfilled:!1}),N.y+1be.key===ie);fe>-1&&pe.addOrUpdateProperties.splice(fe,1)}return(pe.removeAllProperties||y.removeAllProperties)&&(N.removeAllProperties=!0),(pe.removeProperties||y.removeProperties)&&(N.removeProperties=[...pe.removeProperties||[],...y.removeProperties||[]]),(pe.addOrUpdateProperties||y.addOrUpdateProperties)&&(N.addOrUpdateProperties=[...pe.addOrUpdateProperties||[],...y.addOrUpdateProperties||[]]),(pe.newGeometry||y.newGeometry)&&(N.newGeometry=y.newGeometry||pe.newGeometry),N}function Me(pe){var y,N;if(!pe)return{};let ie={};return ie.removeAll=pe.removeAll,ie.remove=new Set(pe.remove||[]),ie.add=new Map((y=pe.add)===null||y===void 0?void 0:y.map(fe=>[fe.id,fe])),ie.update=new Map((N=pe.update)===null||N===void 0?void 0:N.map(fe=>[fe.id,fe])),ie}function Se(pe){return pe&&pe.length!==0?typeof pe[0]=="number"?[pe]:pe.flatMap(y=>Se(y)):[]}function Ie(pe){return pe.type==="GeometryCollection"?pe.geometries.flatMap(y=>Ie(y)):Se(pe.coordinates)}function Ve(pe){let y=new q,N;switch(pe.type){case"FeatureCollection":N=pe.features.flatMap(ie=>Ie(ie.geometry));break;case"Feature":N=Ie(pe.geometry);break;default:N=Ie(pe)}if(N.length===0)return y;for(let ie of N){let[fe,be]=ie;y.extend([fe,be])}return y}class Ge extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:N.data},this.actor=ie.getActor(),this.setEventedParent(fe),this._data=typeof N.data=="string"?{url:N.data}:{geojson:N.data},this._options=e.e({},N),this._collectResourceTiming=N.collectResourceTiming,N.maxzoom!==void 0&&(this.maxzoom=N.maxzoom),N.type&&(this.type=N.type),N.attribution&&(this.attribution=N.attribution),this.promoteId=N.promoteId,N.clusterMaxZoom!==void 0&&this.maxzoom<=N.clusterMaxZoom&&e.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${N.clusterMaxZoom}".`),this.workerOptions=e.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(N.buffer!==void 0?N.buffer:128),tolerance:this._pixelsToTileUnits(N.tolerance!==void 0?N.tolerance:.375),extent:e.a6,maxZoom:this.maxzoom,lineMetrics:N.lineMetrics||!1,generateId:N.generateId||!1,promoteId:typeof N.promoteId=="string"?N.promoteId:void 0,cluster:N.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(N.clusterMaxZoom),minPoints:Math.max(2,N.clusterMinPoints||2),extent:e.a6,radius:this._pixelsToTileUnits(N.clusterRadius||50),log:!1,generateId:N.generateId||!1}},clusterProperties:N.clusterProperties,filter:N.filter},N.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(y){return y*(e.a6/this.tileSize)}_getClusterMaxZoom(y){let N=y?Math.round(y):this.maxzoom-1;return Number.isInteger(y)||y===void 0||e.w(`Integer expected for option 'clusterMaxZoom': provided value "${y}" rounded to "${N}"`),N}load(){return e._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(y){this.map=y,this.load()}setData(y,N){this._data=typeof y=="string"?{url:y}:{geojson:y},this._pendingWorkerUpdate={data:y};let ie=this._updateWorkerData();return N?ie:this}updateData(y,N){this._pendingWorkerUpdate.diff=function(fe,be){if(!fe)return be||{};if(!be)return fe||{};let Re=Me(fe),je=Me(be);(function(ut,ft){ft.removeAll&&(ut.add.clear(),ut.update.clear(),ut.remove.clear(),ft.remove.clear());for(let Dt of ft.remove)ut.add.delete(Dt),ut.update.delete(Dt);for(let[Dt,Gt]of ft.update){let Kt=ut.update.get(Dt);Kt&&(ft.update.set(Dt,we(Kt,Gt)),ut.update.delete(Dt))}})(Re,je);let Ze={};if((Re.removeAll||je.removeAll)&&(Ze.removeAll=!0),Ze.remove=new Set([...Re.remove,...je.remove]),Ze.add=new Map([...Re.add,...je.add]),Ze.update=new Map([...Re.update,...je.update]),Ze.remove.size&&Ze.add.size)for(let ut of Ze.add.keys())Ze.remove.delete(ut);return function(ut){let ft={};return ut.removeAll&&(ft.removeAll=ut.removeAll),ut.remove&&(ft.remove=Array.from(ut.remove)),ut.add&&(ft.add=Array.from(ut.add.values())),ut.update&&(ft.update=Array.from(ut.update.values())),ft}(Ze)}(this._pendingWorkerUpdate.diff,y);let ie=this._updateWorkerData();return N?ie:this}getData(){return e._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return e._(this,void 0,void 0,function*(){return Ve(yield this.getData())})}setClusterOptions(y){return this.workerOptions.geojsonVtOptions.cluster=y.cluster,y.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(y.clusterRadius)),y.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(y.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(y){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:y,source:this.id}})}getClusterChildren(y){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:y,source:this.id}})}getClusterLeaves(y,N,ie){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:y,limit:N,offset:ie}})}_updateWorkerData(){return e._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void e.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:y,diff:N,updateCluster:ie}=this._pendingWorkerUpdate,fe=this._getLoadGeoJSONParameters(y,N,ie);y!==void 0?this._pendingWorkerUpdate.data=void 0:N?this._pendingWorkerUpdate.diff=void 0:ie&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(fe)})}_getLoadGeoJSONParameters(y,N,ie){return e._(this,void 0,void 0,function*(){let fe=e.e({type:this.type},this.workerOptions);return typeof y=="string"?(fe.request=yield this.map._requestManager.transformRequest(s.resolveURL(y),"Source"),fe.request.collectResourceTiming=this._collectResourceTiming,fe):y!==void 0?(fe.data=y,fe):N?(fe.dataDiff=N,fe):ie?(fe.updateCluster=!0,fe):void 0})}_dispatchWorkerUpdate(y){return e._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new e.n("dataloading",{dataType:"source"}));try{let N=yield y,ie=yield this.actor.sendAsync({type:"LD",data:N});if(this._isUpdatingWorker=!1,this._removed||ie.abandoned)return void this.fire(new e.n("dataabort",{dataType:"source"}));ie.data&&(this._data={geojson:ie.data});let fe=this._applyDiffToSource(N.dataDiff),be=this._getShouldReloadTileOptions(fe),Re={dataType:"source"};this._applyResourceTiming(Re,ie),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"metadata"}))),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"content",shouldReloadTileOptions:be})))}catch(N){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new e.n("dataabort",{dataType:"source"}));this.fire(new e.l(e.d(N)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(y,N){var ie;if(!this._collectResourceTiming)return;let fe=(ie=N.resourceTiming)===null||ie===void 0?void 0:ie[this.id];if(!fe)return;let be=fe.slice(0);be?.length&&e.e(y,{resourceTiming:be})}_applyDiffToSource(y){if(!y)return;let N=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let fe=function(be,Re){let je=new Map;if(be==null||be.type==null)return je;if(be.type==="Feature"){let Ze=xe(be,Re);return Ze==null?void 0:(je.set(Ze,be),je)}if(be.type==="FeatureCollection"){let Ze=new Set;for(let ut of be.features){let ft=xe(ut,Re);if(ft==null||Ze.has(ft))return;Ze.add(ft),je.set(ft,ut)}return je}}(this._data.geojson,N);if(!fe)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:fe}}if(!this._data.updateable)return;let ie=function(fe,be,Re){var je,Ze;let ut=[];if(be.removeAll)fe.clear();else if(be.remove)for(let ft of be.remove){let Dt=fe.get(ft);Dt&&(ut.push(Dt.geometry),fe.delete(ft))}if(be.add)for(let ft of be.add){let Dt=xe(ft,Re);if(Dt==null)continue;let Gt=fe.get(Dt);Gt&&ut.push(Gt.geometry),ut.push(ft.geometry),fe.set(Dt,ft)}if(be.update)for(let ft of be.update){let Dt=fe.get(ft.id);if(!Dt)continue;let Gt=!!ft.newGeometry,Kt=ft.removeAllProperties||((je=ft.removeProperties)===null||je===void 0?void 0:je.length)>0||((Ze=ft.addOrUpdateProperties)===null||Ze===void 0?void 0:Ze.length)>0;if(!Gt&&!Kt)continue;ut.push(Dt.geometry);let st=Object.assign({},Dt);if(fe.set(ft.id,st),Gt&&(ut.push(ft.newGeometry),st.geometry=ft.newGeometry),Kt){if(st.properties=ft.removeAllProperties?{}:Object.assign({},st.properties||{}),ft.removeProperties)for(let It of ft.removeProperties)delete st.properties[It];if(ft.addOrUpdateProperties)for(let{key:It,value:Ut}of ft.addOrUpdateProperties)st.properties[It]=Ut}}return ut}(this._data.updateable,y,N);return y.removeAll||this._options.cluster?void 0:ie}_getShouldReloadTileOptions(y){if(y)return{affectedBounds:y.filter(Boolean).map(N=>Ve(N))}}shouldReloadTile(y,{affectedBounds:N}){if(y.state==="loading")return!0;if(y.state==="unloaded")return!1;let{buffer:ie,extent:fe}=this.workerOptions.geojsonVtOptions,be=function({x:Re,y:je,z:Ze},ut=0){let ft=e.a4((Re-ut)/Math.pow(2,Ze)),Dt=e.a5((je+1+ut)/Math.pow(2,Ze)),Gt=e.a4((Re+1+ut)/Math.pow(2,Ze)),Kt=e.a5((je-ut)/Math.pow(2,Ze));return new q([ft,Dt],[Gt,Kt])}(y.tileID.canonical,ie/fe);for(let Re of N)if(be.intersects(Re))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.actor?"RT":"LT";y.actor=this.actor;let ie={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};y.abortController=new AbortController;let fe=yield this.actor.sendAsync({type:N,data:ie},y.abortController);delete y.abortController,y.unloadVectorData(),y.aborted||y.loadVectorData(fe,this.map.painter,N==="RT")})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.aborted=!0})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:y.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 e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class ke extends e.E{constructor(y,N,ie,fe){super(),this.flippedWindingOrder=!1,this.id=y,this.dispatcher=ie,this.coordinates=N.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(fe),this.options=N}load(y){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let N=yield v.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,N?.data&&(this.image=N.data,y&&(this.coordinates=y),this._finishLoading())}catch(N){this._request=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}updateImage(y){return y.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=y.url,this.load(y.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(y){this.map=y,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(y){this.coordinates=y;let N=y.map(e.a7.fromLngLat);var ie;return this.tileID=function(fe){let be=e.a8.fromPoints(fe),Re=be.width(),je=be.height(),Ze=Math.max(Re,je),ut=Math.max(0,Math.floor(-Math.log(Ze)/Math.LN2)),ft=Math.pow(2,ut);return new e.aa(ut,Math.floor((be.minX+be.maxX)/2*ft),Math.floor((be.minY+be.maxY)/2*ft))}(N),this.terrainTileRanges=this._getOverlappingTileRanges(N),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=N.map(fe=>this.tileID.getTilePoint(fe)._round()),this.flippedWindingOrder=((ie=this.tileCoords)[1].x-ie[0].x)*(ie[2].y-ie[0].y)-(ie[1].y-ie[0].y)*(ie[2].x-ie[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let y=this.map.painter.context,N=y.gl;this.texture||(this.texture=new e.T(y,this.image,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(y){return e._(this,void 0,void 0,function*(){var N;!((N=this.tileID)===null||N===void 0)&&N.equals(y.tileID.canonical)?(this.tiles[String(y.tileID.wrap)]=y,y.buckets={}):y.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(y){let{minX:N,minY:ie,maxX:fe,maxY:be}=e.a8.fromPoints(y),Re={};for(let je=0;je<=e.a9;je++){let Ze=Math.pow(2,je),ut=Math.floor(N*Ze),ft=Math.floor(ie*Ze),Dt=Math.floor(fe*Ze),Gt=Math.floor(be*Ze),Kt=(ut%Ze+Ze)%Ze,st=Dt%Ze,It=Math.floor(ut/Ze),Ut=Math.floor(Dt/Ze);Re[je]={minWrap:It,maxWrap:Ut,minTileXWrapped:Kt,maxTileXWrapped:st,minTileY:ft,maxTileY:Gt}}return Re}}class _e extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),this._onPlayingHandler=()=>{var be;(be=this.map)===null||be===void 0||be.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=N}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let y=this.options;this.urls=[];for(let N of y.urls)this.urls.push((yield this.map._requestManager.transformRequest(N,"Source")).url);try{let N=yield e.ab(this.urls);if(this._loaded=!0,!N)return;this.video=N,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(N){this.fire(new e.l(e.d(N)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(y){if(this.video){let N=this.video.seekable;yN.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${N.start(0)} and ${N.end(0)}-second mark.`))):this.video.currentTime=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let y=this.map.painter.context,N=y.gl;this.texture?this.video.paused||(this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE),N.texSubImage2D(N.TEXTURE_2D,0,0,0,N.RGBA,N.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(y,this.video,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("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 ce extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),N.coordinates?Array.isArray(N.coordinates)&&N.coordinates.length===4&&!N.coordinates.some(be=>!Array.isArray(be)||be.length!==2||be.some(Re=>typeof Re!="number"))||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "coordinates"'))),N.animate&&typeof N.animate!="boolean"&&this.fire(new e.l(new e.ac(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),N.canvas?typeof N.canvas=="string"||N.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${y}`,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.l(new e.ac(`sources.${y}`,null,'missing required property "canvas"'))),this.options=N,this.animate=N.animate===void 0||N.animate}load(){return e._(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 e.l(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(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let N=this.map.painter.context,ie=N.gl;this.texture?(y||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(N,this.canvas,ie.RGBA,{premultiply:!0}),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let fe=!1;for(let be in this.tiles){let Re=this.tiles[be];Re.state!=="loaded"&&(Re.state="loaded",Re.texture=this.texture,fe=!0)}fe&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}}let ve={},le=pe=>{switch(pe){case"geojson":return Ge;case"image":return ke;case"raster":return ae;case"raster-dem":return he;case"vector":return ee;case"video":return _e;case"canvas":return ce}return ve[pe]},Ae="RTLPluginLoaded";class Be extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=se()}_syncState(y){return this.status=y,this.dispatcher.broadcast("SRPS",{pluginStatus:y,pluginURL:this.url}).catch(N=>{throw this.status="error",N})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(y){return e._(this,arguments,void 0,function*(N,ie=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(N),!this.url)throw new Error(`requested url ${N} is invalid`);if(this.status==="unavailable"){if(!ie)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(Ae))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Xe=null;function Ye(){return Xe||(Xe=new Be),Xe}var yt,gt;(function(pe){pe[pe.Base=0]="Base",pe[pe.Parent=1]="Parent"})(yt||(yt={})),function(pe){pe[pe.Departing=0]="Departing",pe[pe.Incoming=1]="Incoming"}(gt||(gt={}));class Tt{constructor(y,N){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=y,this.uid=e.ad(),this.uses=0,this.tileSize=N,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(y){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(y||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:y,fadingDirection:N,fadingParentID:ie,fadeEndTime:fe}){this.resetFadeLogic(),this.fadingRole=y,this.fadingDirection=N,this.fadingParentID=ie,this.fadeEndTime=fe}setSelfFadeLogic(y){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=y}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=m(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(y){this.demTexture&&y.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(y,N,ie){if(y?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",y){y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestEncoding=y.encoding,this.latestFeatureIndex.rawTileData=y.rawTileData,this.latestFeatureIndex.encoding=y.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=function(fe,be){let Re={};if(!be)return Re;for(let je of fe){let Ze=je.layerIds.map(ut=>be.getLayer(ut)).filter(Boolean);if(Ze.length!==0){je.layers=Ze,je.stateDependentLayerIds&&(je.stateDependentLayers=je.stateDependentLayerIds.map(ut=>Ze.filter(ft=>ft.id===ut)[0]));for(let ut of Ze)Re[ut.id]=je}}return Re}(y.buckets,N?.style),this.hasSymbolBuckets=!1;for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af){if(this.hasSymbolBuckets=!0,!ie)break;be.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af&&be.hasRTLText){this.hasRTLText=!0,Ye().lazyLoad();break}}this.queryPadding=0;for(let fe in this.buckets){let be=this.buckets[fe];this.queryPadding=Math.max(this.queryPadding,N.style.getLayer(fe).queryRadius(be))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage),this.dashPositions=y.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(let y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(y){return this.buckets[y.id]}upload(y){for(let ie in this.buckets){let fe=this.buckets[ie];fe.uploadPending()&&fe.upload(y)}let N=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(y,this.imageAtlas.image,N.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(y,this.glyphAtlasImage,N.ALPHA),this.glyphAtlasImage=null)}prepare(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)}queryRenderedFeatures(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt){var Gt;return!((Gt=this.latestFeatureIndex)===null||Gt===void 0)&&Gt.rawTileData?this.latestFeatureIndex.query({queryGeometry:fe,cameraQueryGeometry:be,scale:Re,tileSize:this.tileSize,pixelPosMatrix:ft,transform:Ze,params:je,queryPadding:this.queryPadding*ut,getElevation:Dt},y,N,ie):{}}querySourceFeatures(y,N){let ie=this.latestFeatureIndex;if(!ie?.rawTileData)return;let fe=ie.loadVTLayers(),be=N?.sourceLayer?N.sourceLayer:"",Re=fe[e.ag]||fe[be];if(!Re)return;let je=e.ah(N?.filter,N?.globalState),{z:Ze,x:ut,y:ft}=this.tileID.canonical,Dt={z:Ze,x:ut,y:ft};for(let Gt=0;Gtie)fe=!1;else if(N)if(this.expirationTime({zoom:0,x:0,y:0,wrap:vr,fullyVisible:!1}),Ar=[],hr=[];if(pe.renderWorldCopies&&Re.allowWorldCopies())for(let vr=1;vr<=3;vr++)Ar.push(dr(-vr)),Ar.push(dr(vr));for(Ar.push(dr(0));Ar.length>0;){let vr=Ar.pop(),Or=vr.x,Cr=vr.y,ta=vr.fullyVisible,ka={x:Or,y:Cr,z:vr.zoom},Ta=Re.getTileBoundingVolume(ka,vr.wrap,pe.elevation,y);if(!ta){let ga=ht(N,Ta,ie);if(ga===0)continue;ta=ga===2}let Ra=Re.distanceToTile2d(fe.x,fe.y,ka,Ta),ua=Ze;je&&(ua=(y.calculateTileZoom||We)(pe.zoom+e.ar(pe.tileSize/y.tileSize),Ra,Ut,ir,pe.fov)),ua=(y.roundZoom?Math.round:Math.floor)(ua),ua=Math.max(0,ua);let ia=Math.min(ua,ft);if(vr.wrap=Re.getWrap(be,ka,vr.wrap),vr.zoom>=ia){if(vr.zoom>1),wrap:vr.wrap,fullyVisible:ta})}return hr.sort((vr,Or)=>vr.distanceSq-Or.distanceSq).map(vr=>vr.tileID)}let et=e.a8.fromPoints([new e.P(0,0),new e.P(e.a6,e.a6)]);function Mt(pe){return pe==="raster"||pe==="image"||pe==="video"}function pt(pe,y,N,ie,fe,be,Re){if(!y.hasData())return!1;let{tileID:je,fadingRole:Ze,fadingDirection:ut,fadingParentID:ft}=y;if(Ze===yt.Base&&ut===gt.Incoming&&ft)return N[ft.key]=ft,!0;let Dt=Math.max(je.overscaledZ-fe,be);for(let Gt=je.overscaledZ-1;Gt>=Dt;Gt--){let Kt=je.scaledTo(Gt),st=pe.getLoadedTile(Kt);if(st)return y.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Incoming,fadingParentID:st.tileID,fadeEndTime:ie+Re}),st.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Departing,fadeEndTime:ie+Re}),N[Kt.key]=Kt,!0}return!1}function Pt(pe,y,N,ie,fe,be){if(!y.hasData())return!1;let Re=y.tileID.children(fe),je=Ct(pe,y,Re,N,ie,fe,be);if(je)return!0;for(let Ze of Re)Ct(pe,y,Ze.children(fe),N,ie,fe,be)&&(je=!0);return je}function Ct(pe,y,N,ie,fe,be,Re){if(N[0].overscaledZ>=be)return!1;let je=!1;for(let Ze of N){let ut=pe.getLoadedTile(Ze);if(!ut)continue;let{fadingRole:ft,fadingDirection:Dt,fadingParentID:Gt}=ut;ft===yt.Base&&Dt===gt.Departing&&Gt||(ut.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Departing,fadingParentID:y.tileID,fadeEndTime:fe+Re}),y.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Incoming,fadeEndTime:fe+Re})),ie[Ze.key]=Ze,je=!0}return je}function qt(pe,y,N,ie){let fe=pe.tileID;return!!pe.selfFading||!pe.hasData()&&!!y.has(fe)&&(pe.setSelfFadeLogic(N+ie),!0)}function Vt(pe,y){var N;pe.needsHillshadePrepare=!0,pe.needsTerrainPrepare=!0;let ie=y.tileID.canonical.x-pe.tileID.canonical.x,fe=y.tileID.canonical.y-pe.tileID.canonical.y,be=Math.pow(2,pe.tileID.canonical.z),Re=y.tileID.key;ie===0&&fe===0||Math.abs(fe)>1||(Math.abs(ie)>1&&(Math.abs(ie+be)===1?ie+=be:Math.abs(ie-be)===1&&(ie-=be)),y.dem&&pe.dem&&(pe.dem.backfillBorder(y.dem,ie,fe),!((N=pe.neighboringTiles)===null||N===void 0)&&N[Re]&&(pe.neighboringTiles[Re].backfilled=!0)))}class Ht{constructor(){this._tiles={}}handleWrapJump(y){let N={};for(let ie in this._tiles){let fe=this._tiles[ie];fe.tileID=fe.tileID.unwrapTo(fe.tileID.wrap+y),N[fe.tileID.key]=fe}this._tiles=N}setFeatureState(y,N){for(let ie in this._tiles)this._tiles[ie].setFeatureState(y,N)}getAllTiles(){return Object.values(this._tiles)}getAllIds(y=!1){return y?Object.values(this._tiles).map(N=>N.tileID).sort(e.au).map(N=>N.key):Object.keys(this._tiles)}getTileById(y){return this._tiles[y]}setTile(y,N){this._tiles[y]=N}deleteTileById(y){delete this._tiles[y]}getLoadedTile(y){let N=this.getTileById(y.key);return N?.hasData()?N:null}isIdRenderable(y,N=!1){var ie;return(ie=this.getTileById(y))===null||ie===void 0?void 0:ie.isRenderable(N)}getRenderableIds(y=0,N){let ie=[];for(let fe of this.getAllIds())this.isIdRenderable(fe,N)&&ie.push(this.getTileById(fe));return N?ie.sort((fe,be)=>{let Re=fe.tileID,je=be.tileID,Ze=new e.P(Re.canonical.x,Re.canonical.y)._rotate(-y),ut=new e.P(je.canonical.x,je.canonical.y)._rotate(-y);return Re.overscaledZ-je.overscaledZ||ut.y-Ze.y||ut.x-Ze.x}).map(fe=>fe.tileID.key):ie.map(fe=>fe.tileID).sort(e.au).map(fe=>fe.key)}}class Sr extends e.E{constructor(y,N,ie){super(),this.id=y,this.dispatcher=ie,this.on("data",fe=>{this._dataHandler(fe)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((fe,be,Re,je)=>{let Ze=new(le(be.type))(fe,be,Re,je);if(Ze.id!==fe)throw new Error(`Expected Source id to be ${fe} instead of ${Ze.id}`);return Ze})(y,N,ie,this),this._inViewTiles=new Ht,this._outOfViewCache=new e.av(0,fe=>this._unloadTile(fe)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new At,this._didEmitContent=!1,this._updated=!1}onAdd(y){var N;this.map=y,this._maxTileCacheSize=y?y._maxTileCacheSize:null,this._maxTileCacheZoomLevels=y?y._maxTileCacheZoomLevels:null,!((N=this._source)===null||N===void 0)&&N.onAdd&&this._source.onAdd(y)}onRemove(y){var N;for(let ie of this._inViewTiles.getAllTiles())ie.unloadVectorData();this.clearTiles(),!((N=this._source)===null||N===void 0)&&N.onRemove&&this._source.onRemove(y),this._inViewTiles=new Ht}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 y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let y=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,y&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(y,N,ie){return e._(this,void 0,void 0,function*(){try{let fe=yield this._source.loadTile(y);this._tileLoaded(y,N,ie,fe)}catch(fe){y.state="errored",fe.status!==404?this._source.fire(new e.l(e.d(fe),{tile:y})):this.update(this.transform,this.terrain)}})}_unloadTile(y){this._source.unloadTile&&this._source.unloadTile(y)}_abortTile(y){this._source.abortTile&&this._source.abortTile(y),this._source.fire(new e.n("dataabort",{tile:y,coord:y.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(y){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let N of this._inViewTiles.getAllTiles())N.upload(y),N.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(y){var N;return this._inViewTiles.getRenderableIds((N=this.transform)===null||N===void 0?void 0:N.bearingInRadians,y)}hasRenderableParent(y){let N=y.overscaledZ-1;if(N>=this._source.minzoom){let ie=this.getLoadedTile(y.scaledTo(N));if(ie)return this._inViewTiles.isIdRenderable(ie.tileID.key)}return!1}reload(y,N=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let ie of this._inViewTiles.getAllIds()){let fe=this._inViewTiles.getTileById(ie);N&&!this._source.shouldReloadTile(fe,N)||(y?this._reloadTile(ie,"expired"):fe.state!=="errored"&&this._reloadTile(ie,"reloading"))}}}_reloadTile(y,N){return e._(this,void 0,void 0,function*(){let ie=this._inViewTiles.getTileById(y);ie&&(ie.state!=="loading"&&(ie.state=N),yield this._loadTile(ie,y,N))})}_tileLoaded(y,N,ie,fe){y.timeAdded=m(),y.selfFading&&(y.fadeEndTime=y.timeAdded+this._rasterFadeDuration),ie==="expired"&&(y.refreshedUponExpiration=!0),this._setTileReloadTimer(N,y),fe?.unmodified||(this.getSource().type==="raster-dem"&&y.dem&&function(be,Re){var je,Ze,ut;let ft=Re.getRenderableIds();for(let Dt of ft){if(!(!((je=be.neighboringTiles)===null||je===void 0)&&je[Dt]))continue;let Gt=Re.getTileById(Dt);be.neighboringTiles[Dt].backfilled||Vt(be,Gt),!((ut=(Ze=Gt.neighboringTiles)===null||Ze===void 0?void 0:Ze[be.tileID.key])===null||ut===void 0)&&ut.backfilled||Vt(Gt,be)}}(y,this._inViewTiles),this._state.initializeTileState(y,this.map?this.map.painter:null),y.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:y,coord:y.tileID})))}getTile(y){return this.getTileByID(y.key)}getTileByID(y){return this._inViewTiles.getTileById(y)}_retainLoadedChildren(y,N){let ie=this._getLoadedDescendents(N),fe=new Set;for(let be of N){let Re=ie[be.key];if(!Re?.length){fe.add(be);continue}let je=be.overscaledZ+Sr.maxOverzooming,Ze=Re.filter(Dt=>Dt.tileID.overscaledZ<=je);if(!Ze.length){fe.add(be);continue}let ut=Math.min(...Ze.map(Dt=>Dt.tileID.overscaledZ)),ft=Ze.filter(Dt=>Dt.tileID.overscaledZ===ut).map(Dt=>Dt.tileID);for(let Dt of ft)y[Dt.key]=Dt;this._areDescendentsComplete(ft,ut,be.overscaledZ)||fe.add(be)}return fe}_getLoadedDescendents(y){var N;let ie={};for(let fe of this._inViewTiles.getAllTiles().filter(be=>be.hasData()))for(let be of y)fe.tileID.isChildOf(be)&&(ie[N=be.key]||(ie[N]=[]),ie[be.key].push(fe));return ie}_areDescendentsComplete(y,N,ie){return y.length===1&&y[0].isOverscaled()?y[0].overscaledZ===N:Math.pow(4,N-ie)===y.length}getLoadedTile(y){return this._inViewTiles.getLoadedTile(y)}updateCacheSize(y){let N=Math.ceil(y.width/this._source.tileSize)+1,ie=Math.ceil(y.height/this._source.tileSize)+1,fe=Math.floor(N*ie*(this._maxTileCacheZoomLevels===null?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),be=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,fe):fe;this._outOfViewCache.setMaxSize(be)}handleWrapJump(y){let N=Math.round((y-(this._prevLng===void 0?y:this._prevLng))/360);this._prevLng=y,N&&(this._inViewTiles.handleWrapJump(N),this._resetTileReloadTimers())}update(y,N){if(!this._sourceLoaded||this._paused)return;let ie;this.transform=y,this.terrain=N,this.updateCacheSize(y),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?ie=y.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ze=>new e.a3(Ze.canonical.z,Ze.wrap,Ze.canonical.z,Ze.canonical.x,Ze.canonical.y)):(ie=Je(y,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?y.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:N,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(ie=ie.filter(Ze=>this._source.hasTile(Ze)))):ie=[],this.usedForTerrain&&(ie=this._addTerrainIdealTiles(ie));let fe=ie.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,fe&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let be=Ke(y,this._source),Re=this._updateRetainedTiles(ie,be),je=Mt(this._source.type);je&&this._rasterFadeDuration>0&&!N&&function(Ze,ut,ft,Dt,Gt,Kt,st){let It=m(),Ut=e.at(ut);for(let ir of ut){let dr=Ze.getTileById(ir.key);dr.fadingDirection!==gt.Departing&&dr.fadeOpacity!==0||dr.resetFadeLogic(),pt(Ze,dr,ft,It,Dt,Gt,st)||Pt(Ze,dr,ft,It,Kt,st)||qt(dr,Ut,It,st)||dr.resetFadeLogic()}}(this._inViewTiles,ie,Re,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),je?this._cleanUpRasterTiles(Re):this._cleanUpVectorTiles(Re)}_cleanUpRasterTiles(y){for(let N of this._inViewTiles.getAllIds())y[N]||this._removeTile(N)}_cleanUpVectorTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);y[N]?ie.clearSymbolFadeHold():ie.hasSymbolBuckets?ie.holdingForSymbolFade()?ie.symbolFadeFinished()&&this._removeTile(N):ie.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(N)}}_addTerrainIdealTiles(y){let N=[];for(let ie of y)if(ie.canonical.z>this._source.minzoom){let fe=ie.scaledTo(ie.canonical.z-1);N.push(fe);let be=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));N.push(be)}return y.concat(N)}releaseSymbolFadeTiles(){for(let y of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(y).holdingForSymbolFade()&&this._removeTile(y)}_updateRetainedTiles(y,N){var ie;let fe=new Set;for(let ut of y)this._addTile(ut).hasData()||fe.add(ut);let be=y.reduce((ut,ft)=>(ut[ft.key]=ft,ut),{}),Re=this._retainLoadedChildren(be,fe),je={},Ze=Math.max(N-Sr.maxUnderzooming,this._source.minzoom);for(let ut of Re){let ft=this._inViewTiles.getTileById(ut.key),Dt=ft?.wasRequested();for(let Gt=ut.overscaledZ-1;Gt>=Ze;--Gt){let Kt=ut.scaledTo(Gt);if(je[Kt.key])break;if(je[Kt.key]=!0,ft=this.getTile(Kt),!ft&&Dt&&(ft=this._addTile(Kt)),ft){let st=ft.hasData();if((st||!(!((ie=this.map)===null||ie===void 0)&&ie.cancelPendingTileRequestsWhileZooming)||Dt)&&(be[Kt.key]=Kt),Dt=ft.wasRequested(),st)break}}}return be}_addTile(y){let N=this._inViewTiles.getTileById(y.key);if(N)return N;N=this._outOfViewCache.getAndRemove(y),N&&(N.resetFadeLogic(),this._setTileReloadTimer(y.key,N),N.tileID=y,this._state.initializeTileState(N,this.map?this.map.painter:null));let ie=N;return N||(N=new Tt(y,this._source.tileSize*y.overscaleFactor()),this._loadTile(N,y.key,N.state)),N.uses++,this._inViewTiles.setTile(y.key,N),ie||this._source.fire(new e.n("dataloading",{tile:N,coord:N.tileID,dataType:"source"})),N}_setTileReloadTimer(y,N){this._clearTileReloadTimer(y);let ie=N.getExpiryTimeout();ie&&(this._timers[y]=setTimeout(()=>{this._reloadTile(y,"expired"),delete this._timers[y]},ie))}_clearTileReloadTimer(y){let N=this._timers[y];N&&(clearTimeout(N),delete this._timers[y])}_resetTileReloadTimers(){for(let y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(let y of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(y);this._setTileReloadTimer(y,N)}}refreshTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);(this._inViewTiles.isIdRenderable(N)||ie.state=="errored")&&y.some(fe=>fe.equals(ie.tileID.canonical))&&this._reloadTile(N,"expired")}}_removeTile(y){let N=this._inViewTiles.getTileById(y);N&&(N.uses--,this._inViewTiles.deleteTileById(y),this._clearTileReloadTimer(y),N.uses>0||(N.hasData()&&N.state!=="reloading"?this._outOfViewCache.add(N.tileID,N,N.getExpiryTimeout()):(N.aborted=!0,this._abortTile(N),this._unloadTile(N))))}_dataHandler(y){y.dataType==="source"&&(y.sourceDataType!=="metadata"?y.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(y.sourceDataChanged,y.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let y of this._inViewTiles.getAllIds())this._removeTile(y);this._outOfViewCache.reset()}tilesIn(y,N,ie){let fe=[],be=this.transform;if(!be)return fe;let Re=be.getCoveringTilesDetailsProvider().allowWorldCopies(),je=ie?be.getCameraQueryGeometry(y):y,Ze=Kt=>be.screenPointToMercatorCoordinate(Kt,this.terrain),ut=this.transformBbox(y,Ze,!Re),ft=this.transformBbox(je,Ze,!Re),Dt=this.getIds(),Gt=e.a8.fromPoints(ft);for(let Kt of Dt){let st=this._inViewTiles.getTileById(Kt);if(st.holdingForSymbolFade())continue;let It=Re?[st.tileID]:[st.tileID.unwrapTo(-1),st.tileID.unwrapTo(0)],Ut=Math.pow(2,be.zoom-st.tileID.overscaledZ),ir=N*st.queryPadding*e.a6/st.tileSize/Ut;for(let dr of It){let Ar=Gt.map(hr=>dr.getTilePoint(new e.a7(hr.x,hr.y)));if(Ar.expandBy(ir),Ar.intersects(et)){let hr=ut.map(Or=>dr.getTilePoint(Or)),vr=ft.map(Or=>dr.getTilePoint(Or));fe.push({tile:st,tileID:Re?dr:dr.unwrapTo(0),queryGeometry:hr,cameraQueryGeometry:vr,scale:Ut})}}}return fe}transformBbox(y,N,ie){let fe=y.map(N);if(ie){let be=e.a8.fromPoints(y);be.shrinkBy(.001*Math.min(be.width(),be.height()));let Re=be.map(N);e.a8.fromPoints(fe).covers(Re)||(fe=fe.map(je=>je.x>.5?new e.a7(je.x-1,je.y,je.z):je))}return fe}getVisibleCoordinates(y){let N=this.getRenderableIds(y).map(ie=>this._inViewTiles.getTileById(ie).tileID);return this.transform&&this.transform.populateCache(N),N}hasTransition(){return!!this._source.hasTransition()||Mt(this._source.type)&&function(y,N){if(N<=0)return!1;let ie=m();for(let fe of y.getAllTiles())if(fe.fadeEndTime>=ie)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(y){this._rasterFadeDuration=y}setFeatureState(y,N,ie){y||(y=e.ag),this._state.updateState(y,N,ie)}removeFeatureState(y,N,ie){y||(y=e.ag),this._state.removeFeatureState(y,N,ie)}getFeatureState(y,N){return y||(y=e.ag),this._state.getState(y,N)}setDependencies(y,N,ie){let fe=this._inViewTiles.getTileById(y);fe&&fe.setDependencies(N,ie)}reloadTilesForDependencies(y,N){for(let ie of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(ie).hasDependency(y,N)&&this._reloadTile(ie,"reloading");this._outOfViewCache.filter(ie=>!ie.hasDependency(y,N))}areTilesLoaded(){for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}}Sr.maxUnderzooming=10,Sr.maxOverzooming=3;class Kr{constructor(y,N){this.reset(y,N)}reset(y,N){this.points=y||[],this._distances=[0];for(let ie=1;ie0?(fe-Re)/je:0;return this.points[be].mult(1-Ze).add(this.points[N].mult(Ze))}}function Yt(pe,y){let N=!0;return pe==="always"||pe!=="never"&&y!=="never"||(N=!1),N}class Rt{constructor(y,N,ie){let fe=this.boxCells=[],be=this.circleCells=[];this.xCellCount=Math.ceil(y/ie),this.yCellCount=Math.ceil(N/ie);for(let Re=0;Rethis.width||fe<0||N>this.height)return[];let Ze=[];if(y<=0&&N<=0&&this.width<=ie&&this.height<=fe){if(be)return[{key:null,x1:y,y1:N,x2:ie,y2:fe}];for(let ut=0;ut0}hitTestCircle(y,N,ie,fe,be){let Re=y-ie,je=y+ie,Ze=N-ie,ut=N+ie;if(je<0||Re>this.width||ut<0||Ze>this.height)return!1;let ft=[];return this._forEachCell(Re,Ze,je,ut,this._queryCellCircle,ft,{hitTest:!0,overlapMode:fe,circle:{x:y,y:N,radius:ie},seenUids:{box:{},circle:{}}},be),ft.length>0}_queryCell(y,N,ie,fe,be,Re,je,Ze){let{seenUids:ut,hitTest:ft,overlapMode:Dt}=je,Gt=this.boxCells[be],Kt=1e-6;if(Gt!==null){let It=this.bboxes;for(let Ut of Gt)if(!ut.box[Ut]){ut.box[Ut]=!0;let ir=4*Ut,dr=this.boxKeys[Ut];if(y<=It[ir+2]+Kt&&N<=It[ir+3]+Kt&&ie>=It[ir+0]-Kt&&fe>=It[ir+1]-Kt&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))&&(Re.push({key:dr,x1:It[ir],y1:It[ir+1],x2:It[ir+2],y2:It[ir+3]}),ft))return!0}}let st=this.circleCells[be];if(st!==null){let It=this.circles;for(let Ut of st)if(!ut.circle[Ut]){ut.circle[Ut]=!0;let ir=3*Ut,dr=this.circleKeys[Ut];if(this._circleAndRectCollide(It[ir],It[ir+1],It[ir+2],y,N,ie,fe)&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))){let Ar=It[ir],hr=It[ir+1],vr=It[ir+2];if(Re.push({key:dr,x1:Ar-vr,y1:hr-vr,x2:Ar+vr,y2:hr+vr}),ft)return!0}}}return!1}_queryCellCircle(y,N,ie,fe,be,Re,je,Ze){let{circle:ut,seenUids:ft,overlapMode:Dt}=je,Gt=this.boxCells[be];if(Gt!==null){let st=this.bboxes;for(let It of Gt)if(!ft.box[It]){ft.box[It]=!0;let Ut=4*It,ir=this.boxKeys[It];if(this._circleAndRectCollide(ut.x,ut.y,ut.radius,st[Ut+0],st[Ut+1],st[Ut+2],st[Ut+3])&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}let Kt=this.circleCells[be];if(Kt!==null){let st=this.circles;for(let It of Kt)if(!ft.circle[It]){ft.circle[It]=!0;let Ut=3*It,ir=this.circleKeys[It];if(this._circlesCollide(st[Ut],st[Ut+1],st[Ut+2],ut.x,ut.y,ut.radius)&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}}_forEachCell(y,N,ie,fe,be,Re,je,Ze){let ut=this._convertToXCellCoord(y),ft=this._convertToYCellCoord(N),Dt=this._convertToXCellCoord(ie),Gt=this._convertToYCellCoord(fe);for(let Kt=ut;Kt<=Dt;Kt++)for(let st=ft;st<=Gt;st++)if(be.call(this,y,N,ie,fe,this.xCellCount*st+Kt,Re,je,Ze))return}_convertToXCellCoord(y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(y*this.xScale)))}_convertToYCellCoord(y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(y*this.yScale)))}_circlesCollide(y,N,ie,fe,be,Re){let je=fe-y,Ze=be-N,ut=ie+Re;return ut*ut>je*je+Ze*Ze}_circleAndRectCollide(y,N,ie,fe,be,Re,je){let Ze=(Re-fe)/2,ut=Math.abs(y-(fe+Ze));if(ut>Ze+ie)return!1;let ft=(je-be)/2,Dt=Math.abs(N-(be+ft));if(Dt>ft+ie)return!1;if(ut<=Ze||Dt<=ft)return!0;let Gt=ut-Ze,Kt=Dt-ft;return Gt*Gt+Kt*Kt<=ie*ie}}function nr(pe,y){let N=1/(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]),ie=1/(y[8]*y[8]+y[9]*y[9]+y[10]*y[10]),fe=y[0]*N,be=y[4]*N,Re=y[8]*ie,je=y[1]*N,Ze=y[5]*N,ut=y[9]*ie,ft=y[2]*N,Dt=y[6]*N,Gt=y[10]*ie;pe[0]=fe,pe[1]=be,pe[2]=Re,pe[4]=je,pe[5]=Ze,pe[6]=ut,pe[8]=ft,pe[9]=Dt,pe[10]=Gt;let Kt=y[12],st=y[13],It=y[14];return pe[12]=-fe*Kt-je*st-ft*It,pe[13]=-be*Kt-Ze*st-Dt*It,pe[14]=-Re*Kt-ut*st-Gt*It,pe[3]=0,pe[7]=0,pe[11]=0,pe[15]=1,pe}let ur=e.O();function cr(pe,y,N){let ie=e.O();if(!pe){let{vecSouth:Dt,vecEast:Gt}=Qr(y),Kt=n();Kt[0]=Gt[0],Kt[1]=Gt[1],Kt[2]=Dt[0],Kt[3]=Dt[1],fe=Kt,(ft=(Re=(be=Kt)[0])*(ut=be[3])-(Ze=be[2])*(je=be[1]))&&(fe[0]=ut*(ft=1/ft),fe[1]=-je*ft,fe[2]=-Ze*ft,fe[3]=Re*ft),ie[0]=Kt[0],ie[1]=Kt[1],ie[4]=Kt[2],ie[5]=Kt[3]}var fe,be,Re,je,Ze,ut,ft;return e.S(ie,ie,[1/N,1/N,1]),ie}function Rr(pe,y,N,ie){if(pe){let fe=e.O();if(!y){let{vecSouth:be,vecEast:Re}=Qr(N);fe[0]=Re[0],fe[1]=Re[1],fe[4]=be[0],fe[5]=be[1]}return e.S(fe,fe,[ie,ie,1]),fe}return N.pixelsToClipSpaceMatrix}function Qr(pe){let y=Math.cos(pe.rollInRadians),N=Math.sin(pe.rollInRadians),ie=Math.cos(pe.pitchInRadians),fe=Math.cos(pe.bearingInRadians),be=Math.sin(pe.bearingInRadians),Re=e.az();Re[0]=-fe*ie*N-be*y,Re[1]=-be*ie*N+fe*y;let je=e.aA(Re);je<1e-9?e.aB(Re):e.aC(Re,Re,1/je);let Ze=e.az();Ze[0]=fe*ie*y-be*N,Ze[1]=be*ie*y+fe*N;let ut=e.aA(Ze);return ut<1e-9?e.aB(Ze):e.aC(Ze,Ze,1/ut),{vecEast:Ze,vecSouth:Re}}function Zr(pe,y,N,ie){let fe;ie?(fe=[pe,y,ie(pe,y),1],e.aE(fe,fe,N)):(fe=[pe,y,0,1],Oa(fe,fe,N));let be=fe[3];return{point:new e.P(fe[0]/be,fe[1]/be),signedDistanceFromCamera:be,isOccluded:!1}}function ha(pe,y){return .5+pe/y*.5}function Pa(pe,y){return pe.x>=-y[0]&&pe.x<=y[0]&&pe.y>=-y[1]&&pe.y<=y[1]}function La(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt){let Kt=N?pe.textSizeData:pe.iconSizeData,st=e.aw(Kt,y.transform.zoom),It=[256/y.width*2+1,256/y.height*2+1],Ut=N?pe.text.dynamicLayoutVertexArray:pe.icon.dynamicLayoutVertexArray;Ut.clear();let ir=pe.lineVertexArray,dr=N?pe.text.placedSymbolArray:pe.icon.placedSymbolArray,Ar=y.transform.width/y.transform.height,hr=!1;for(let vr=0;vrMath.abs(N.x-y.x)*ie?{useVertical:!0}:(pe===e.ax.vertical?y.yN.x)?{needsFlipping:!0}:null}function ja(pe){let{projectionContext:y,pitchedLabelPlaneMatrixInverse:N,symbol:ie,fontSize:fe,flip:be,keepUpright:Re,glyphOffsetArray:je,dynamicLayoutVertexArray:Ze,aspectRatio:ut,rotateToLine:ft}=pe,Dt=fe/24,Gt=ie.lineOffsetX*Dt,Kt=ie.lineOffsetY*Dt,st;if(ie.numGlyphs>1){let It=ie.glyphStartIndex+ie.numGlyphs,Ut=ie.lineStartIndex,ir=ie.lineStartIndex+ie.lineLength,dr=un(Dt,je,Gt,Kt,be,ie,ft,y);if(!dr)return{notEnoughRoom:!0};let Ar=li(dr.first.point.x,dr.first.point.y,y,N),hr=li(dr.last.point.x,dr.last.point.y,y,N);if(Re&&!be){let vr=Xa(ie.writingMode,Ar,hr,ut);if(vr)return vr}st=[dr.first];for(let vr=ie.glyphStartIndex+1;vr0?Ar.point:Nn(y.tileAnchorPoint,dr,Ut,1,y),vr=li(Ut.x,Ut.y,y,N),Or=li(hr.x,hr.y,y,N),Cr=Xa(ie.writingMode,vr,Or,ut);if(Cr)return Cr}let It=vi(Dt*je.getoffsetX(ie.glyphStartIndex),Gt,Kt,be,ie.segment,ie.lineStartIndex,ie.lineStartIndex+ie.lineLength,y,ft);if(!It||y.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};st=[It]}for(let It of st)e.aD(Ze,It.point,It.angle);return{}}function Nn(pe,y,N,ie,fe){let be=pe.add(pe.sub(y)._unit()),Re=Un(be.x,be.y,fe).point,je=N.sub(Re);return N.add(je._mult(ie/je.mag()))}function yn(pe,y,N){let ie=y.projectionCache;if(ie.projections[pe])return ie.projections[pe];let fe=new e.P(y.lineVertexArray.getx(pe),y.lineVertexArray.gety(pe)),be=Un(fe.x,fe.y,y);if(be.signedDistanceFromCamera>0)return ie.projections[pe]=be.point,ie.anyProjectionOccluded||(ie.anyProjectionOccluded=be.isOccluded),be.point;let Re=pe-N.direction;return Nn(N.distanceFromAnchor===0?y.tileAnchorPoint:new e.P(y.lineVertexArray.getx(Re),y.lineVertexArray.gety(Re)),fe,N.previousVertex,N.absOffsetX-N.distanceFromAnchor+1,y)}function Un(pe,y,N){let ie=pe+N.translation[0],fe=y+N.translation[1],be;return N.pitchWithMap?(be=Zr(ie,fe,N.pitchedLabelPlaneMatrix,N.getElevation),be.isOccluded=!1):(be=N.transform.projectTileCoordinates(ie,fe,N.unwrappedTileID,N.getElevation),be.point.x=(.5*be.point.x+.5)*N.width,be.point.y=(.5*-be.point.y+.5)*N.height),be}function li(pe,y,N,ie){if(N.pitchWithMap){let fe=[pe,y,0,1];return e.aE(fe,fe,ie),N.transform.projectTileCoordinates(fe[0]/fe[3],fe[1]/fe[3],N.unwrappedTileID,N.getElevation).point}return{x:pe/N.width*2-1,y:1-y/N.height*2}}function Yn(pe,y,N){return N.transform.projectTileCoordinates(pe,y,N.unwrappedTileID,N.getElevation)}function on(pe,y,N){return pe._unit()._perp()._mult(y*N)}function en(pe,y,N,ie,fe,be,Re,je,Ze){if(je.projectionCache.offsets[pe])return je.projectionCache.offsets[pe];let ut=N.add(y);if(pe+Ze.direction=fe)return je.projectionCache.offsets[pe]=ut,ut;let ft=yn(pe+Ze.direction,je,Ze),Dt=on(ft.sub(N),Re,Ze.direction),Gt=N.add(Dt),Kt=ft.add(Dt);return je.projectionCache.offsets[pe]=e.aF(be,ut,Gt,Kt)||ut,je.projectionCache.offsets[pe]}function vi(pe,y,N,ie,fe,be,Re,je,Ze){let ut=ie?pe-y:pe+y,ft=ut>0?1:-1,Dt=0;ie&&(ft*=-1,Dt=Math.PI),ft<0&&(Dt+=Math.PI);let Gt,Kt=ft>0?be+fe:be+fe+1;je.projectionCache.cachedAnchorPoint?Gt=je.projectionCache.cachedAnchorPoint:(Gt=Un(je.tileAnchorPoint.x,je.tileAnchorPoint.y,je).point,je.projectionCache.cachedAnchorPoint=Gt);let st,It,Ut=Gt,ir=Gt,dr=0,Ar=0,hr=Math.abs(ut),vr=[],Or;for(;dr+Ar<=hr;){if(Kt+=ft,Kt=Re)return null;dr+=Ar,ir=Ut,It=st;let ka={absOffsetX:hr,direction:ft,distanceFromAnchor:dr,previousVertex:ir};if(Ut=yn(Kt,je,ka),N===0)vr.push(ir),Or=Ut.sub(ir);else{let Ta,Ra=Ut.sub(ir);Ta=Ra.mag()===0?on(yn(Kt+ft,je,ka).sub(Ut),N,ft):on(Ra,N,ft),It||(It=ir.add(Ta)),st=en(Kt,Ta,Ut,be,Re,It,N,je,ka),vr.push(It),Or=st.sub(It)}Ar=Or.mag()}let Cr=Or._mult((hr-dr)/Ar)._add(It||ir),ta=Dt+Math.atan2(Ut.y-ir.y,Ut.x-ir.x);return vr.push(Cr),{point:Cr,angle:Ze?ta:0,path:vr}}let Yi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ja(pe,y){for(let N=0;N=1;za--)ga.push(ua.path[za]);for(let za=1;zaCn.signedDistanceFromCamera<=0)?[]:za.map(Cn=>Cn.point)}let Fa=[];if(ga.length>0){let za=ga[0].clone(),Cn=ga[0].clone();for(let Dn=1;Dn=ka.x&&Cn.x<=Ta.x&&za.y>=ka.y&&Cn.y<=Ta.y?[ga]:Cn.xTa.x||Cn.yTa.y?[]:e.aG([ga],ka.x,ka.y,Ta.x,Ta.y)}for(let za of Fa){Ra.reset(za,.25*ta);let Cn=0;Cn=Ra.length<=.5*ta?1:Math.ceil(Ra.paddedLength/da)+1;for(let Dn=0;Dn{let Ze=Zr(je.x,je.y,Re,be.getElevation),ut=be.transform.projectTileCoordinates(Ze.point.x,Ze.point.y,be.unwrappedTileID,be.getElevation);return ut.point.x=(.5*ut.point.x+.5)*be.width,ut.point.y=(.5*-ut.point.y+.5)*be.height,ut})}(y,N);return function(fe){let be=0,Re=0,je=0,Ze=0;for(let ut=0;utRe&&(Re=Ze,be=je));return fe.slice(be,be+Re)}(ie)}queryRenderedSymbols(y){if(y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let N=[],ie=new e.a8;for(let Dt of y){let Gt=new e.P(Dt.x+lt,Dt.y+lt);ie.extend(Gt),N.push(Gt)}let{minX:fe,minY:be,maxX:Re,maxY:je}=ie,Ze=this.grid.query(fe,be,Re,je).concat(this.ignoredGrid.query(fe,be,Re,je)),ut={},ft={};for(let Dt of Ze){let Gt=Dt.key;if(ut[Gt.bucketInstanceId]===void 0&&(ut[Gt.bucketInstanceId]={}),ut[Gt.bucketInstanceId][Gt.featureIndex])continue;let Kt=[new e.P(Dt.x1,Dt.y1),new e.P(Dt.x2,Dt.y1),new e.P(Dt.x2,Dt.y2),new e.P(Dt.x1,Dt.y2)];e.aH(N,Kt)&&(ut[Gt.bucketInstanceId][Gt.featureIndex]=!0,ft[Gt.bucketInstanceId]===void 0&&(ft[Gt.bucketInstanceId]=[]),ft[Gt.bucketInstanceId].push(Gt.featureIndex))}return ft}insertCollisionBox(y,N,ie,fe,be,Re){(ie?this.ignoredGrid:this.grid).insert({bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N},y[0],y[1],y[2],y[3])}insertCollisionCircles(y,N,ie,fe,be,Re){let je=ie?this.ignoredGrid:this.grid,Ze={bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N};for(let ut=0;ut=this.screenRightBoundary||fethis.screenBottomBoundary}isInsideGrid(y,N,ie,fe){return ie>=0&&y=0&&Nthis.projectAndGetPerspectiveRatio(da.x,da.y,fe,ut,Dt));ia=ga.some(da=>!da.isOccluded),ua=ga.map(da=>new e.P(da.x,da.y))}else ia=!0;return{box:e.aI(ua),allPointsOccluded:!ia}}}class fr{constructor(y,N,ie,fe){this.opacity=y?Math.max(0,Math.min(1,y.opacity+(y.placed?N:-N))):fe&&ie?1:0,this.placed=ie}isHidden(){return this.opacity===0&&!this.placed}}class lr{constructor(y,N,ie,fe,be){this.text=new fr(y?y.text:null,N,ie,be),this.icon=new fr(y?y.icon:null,N,fe,be)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tr{constructor(y,N,ie){this.text=y,this.icon=N,this.skipFade=ie}}class Ir{constructor(y,N,ie,fe,be){this.bucketInstanceId=y,this.featureIndex=N,this.sourceLayerIndex=ie,this.bucketIndex=fe,this.tileID=be}}class Dr{constructor(y){this.crossSourceCollisions=y,this.maxGroupID=0,this.collisionGroups={}}get(y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[y]){let N=++this.maxGroupID;this.collisionGroups[y]={ID:N,predicate:ie=>ie.collisionGroupID===N}}return this.collisionGroups[y]}}function ot(pe,y,N,ie,fe){let{horizontalAlign:be,verticalAlign:Re}=e.aP(pe);return new e.P(-(be-.5)*y+ie[0]*fe,-(Re-.5)*N+ie[1]*fe)}class kt{constructor(y,N,ie,fe,be){this.transform=y.clone(),this.terrain=N,this.collisionIndex=new rt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ie,this.retainedQueryData={},this.collisionGroups=new Dr(fe),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=be,be&&(be.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(y){let N=this.terrain;return N?(ie,fe)=>N.getElevation(y,ie,fe):null}getBucketParts(y,N,ie,fe){let be=ie.getBucket(N),Re=ie.latestFeatureIndex;if(!be||!Re||N.id!==be.layerIds[0])return;let je=ie.collisionBoxArray,Ze=be.layers[0].layout,ut=be.layers[0].paint,ft=Math.pow(2,this.transform.zoom-ie.tileID.overscaledZ),Dt=ie.tileSize/e.a6,Gt=ie.tileID.toUnwrapped(),Kt=Ze.get("text-rotation-alignment")==="map",st=e.aK(ie,1,this.transform.zoom),It=e.aL(this.collisionIndex.transform,ie,ut.get("text-translate"),ut.get("text-translate-anchor")),Ut=e.aL(this.collisionIndex.transform,ie,ut.get("icon-translate"),ut.get("icon-translate-anchor")),ir=cr(Kt,this.transform,st);this.retainedQueryData[be.bucketInstanceId]=new Ir(be.bucketInstanceId,Re,be.sourceLayerIndex,be.index,ie.tileID);let dr={bucket:be,layout:Ze,translationText:It,translationIcon:Ut,unwrappedTileID:Gt,pitchedLabelPlaneMatrix:ir,scale:ft,textPixelRatio:Dt,holdingForFade:ie.holdingForSymbolFade(),collisionBoxArray:je,partiallyEvaluatedTextSize:e.aw(be.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(be.sourceID)};if(fe)for(let Ar of be.sortKeyRanges){let{sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or}=Ar;y.push({sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or,parameters:dr})}else y.push({symbolInstanceStart:0,symbolInstanceEnd:be.symbolInstances.length,parameters:dr})}attemptAnchorPlacement(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar,hr){var vr,Or,Cr;let ta=e.aM[y.textAnchor],ka=[y.textOffset0,y.textOffset1],Ta=ot(ta,ie,fe,ka,be),Ra=this.collisionIndex.placeCollisionBox(N,Gt,Ze,ut,ft,je,Re,Ut,Dt.predicate,Ar,Ta,hr);if((!dr||this.collisionIndex.placeCollisionBox(dr,Gt,Ze,ut,ft,je,Re,ir,Dt.predicate,Ar,Ta,hr).placeable)&&Ra.placeable){let ua;if(!((vr=this.prevPlacement)===null||vr===void 0)&&vr.variableOffsets[Kt.crossTileID]&&(!((Cr=(Or=this.prevPlacement)===null||Or===void 0?void 0:Or.placements[Kt.crossTileID])===null||Cr===void 0)&&Cr.text)&&(ua=this.prevPlacement.variableOffsets[Kt.crossTileID].anchor),Kt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Kt.crossTileID]={textOffset:ka,width:ie,height:fe,anchor:ta,textBoxScale:be,prevAnchor:ua},this.markUsedJustification(st,ta,Kt,It),st.allowVerticalPlacement&&(this.markUsedOrientation(st,It,Kt),this.placedOrientations[Kt.crossTileID]=It),{shift:Ta,placedGlyphBoxes:Ra}}}placeLayerBucketPart(y,N,ie){let{bucket:fe,layout:be,translationText:Re,translationIcon:je,unwrappedTileID:Ze,pitchedLabelPlaneMatrix:ut,textPixelRatio:ft,holdingForFade:Dt,collisionBoxArray:Gt,partiallyEvaluatedTextSize:Kt,collisionGroup:st}=y.parameters,It=be.get("text-optional"),Ut=be.get("icon-optional"),ir=e.aN(be,"text-overlap","text-allow-overlap"),dr=ir==="always",Ar=e.aN(be,"icon-overlap","icon-allow-overlap"),hr=Ar==="always",vr=be.get("text-rotation-alignment")==="map",Or=be.get("text-pitch-alignment")==="map",Cr=be.get("icon-text-fit")!=="none",ta=be.get("symbol-z-order")==="viewport-y",ka=dr&&(hr||!fe.hasIconData()||Ut),Ta=hr&&(dr||!fe.hasTextData()||It);!fe.collisionArrays&&Gt&&fe.deserializeCollisionBoxes(Gt);let Ra=this.retainedQueryData[fe.bucketInstanceId].tileID,ua=this._getTerrainElevationFunc(Ra),ia=this.transform.getFastPathSimpleProjectionMatrix(Ra),ga=(da,Fa,za)=>{var Cn,Dn;if(N[da.crossTileID])return;if(Dt)return void(this.placements[da.crossTileID]=new Tr(!1,!1,!1));let ui=!1,cn=!1,sn=!0,ei=null,Pn={box:null,placeable:!1,offscreen:null,occluded:!1},Rn={placeable:!1},In=null,Jn=null,Ei=null,so=0,ti=0,bi=0;Fa.textFeatureIndex?so=Fa.textFeatureIndex:da.useRuntimeCollisionCircles&&(so=da.featureIndex),Fa.verticalTextFeatureIndex&&(ti=Fa.verticalTextFeatureIndex);let Wi=Fa.textBox;if(Wi){let Bs=es=>{let $o=e.ax.horizontal;if(fe.allowVerticalPlacement&&!es&&this.prevPlacement){let _s=this.prevPlacement.placedOrientations[da.crossTileID];_s&&(this.placedOrientations[da.crossTileID]=_s,$o=_s,this.markUsedOrientation(fe,$o,da))}return $o},So=(es,$o)=>{if(fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&Fa.verticalTextBox){for(let _s of fe.writingModes)if(_s===e.ax.vertical?(Pn=$o(),Rn=Pn):Pn=es(),Pn?.placeable)break}else Pn=es()},Ws=da.textAnchorOffsetStartIndex,Zo=da.textAnchorOffsetEndIndex;if(Zo===Ws){let es=($o,_s)=>{let Go=this.collisionIndex.placeCollisionBox($o,ir,ft,Ra,Ze,Or,vr,Re,st.predicate,ua,void 0,ia);return Go?.placeable&&(this.markUsedOrientation(fe,_s,da),this.placedOrientations[da.crossTileID]=_s),Go};So(()=>es(Wi,e.ax.horizontal),()=>{let $o=Fa.verticalTextBox;return fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&$o?es($o,e.ax.vertical):{box:null,offscreen:null}}),Bs(Pn?.placeable)}else{let es=e.aM[(Dn=(Cn=this.prevPlacement)===null||Cn===void 0?void 0:Cn.variableOffsets[da.crossTileID])===null||Dn===void 0?void 0:Dn.anchor],$o=(Go,Ys,Ll)=>{let mo=Go.x2-Go.x1,ru=Go.y2-Go.y1,Rs=da.textBoxScale,Yu=Cr&&Ar==="never"?Ys:null,Ul=null,ql=ir==="never"?1:2,fo="never";es&&ql++;for(let Xo=0;Xo$o(Wi,Fa.iconBox,e.ax.horizontal),()=>{let Go=Fa.verticalTextBox;return fe.allowVerticalPlacement&&!Pn?.placeable&&da.numVerticalGlyphVertices>0&&Go?$o(Go,Fa.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Pn&&(ui=Pn.placeable,sn=Pn.offscreen);let _s=Bs(Pn?.placeable);if(!ui&&this.prevPlacement){let Go=this.prevPlacement.variableOffsets[da.crossTileID];Go&&(this.variableOffsets[da.crossTileID]=Go,this.markUsedJustification(fe,Go.anchor,da,_s))}}}if(In=Pn,ui=In?.placeable,sn=In?.offscreen,da.useRuntimeCollisionCircles&&da.centerJustifiedTextSymbolIndex>=0){let Bs=fe.text.placedSymbolArray.get(da.centerJustifiedTextSymbolIndex),So=e.ay(fe.textSizeData,Kt,Bs),Ws=be.get("text-padding");Jn=this.collisionIndex.placeCollisionCircles(ir,Bs,fe.lineVertexArray,fe.glyphOffsetArray,So,Ze,ut,ie,Or,st.predicate,da.collisionCircleDiameter,Ws,Re,ua),Jn.circles.length&&Jn.collisionDetected&&!ie&&e.w("Collisions detected, but collision boxes are not shown"),ui=dr||Jn.circles.length>0&&!Jn.collisionDetected,sn&&(sn=Jn.offscreen)}if(Fa.iconFeatureIndex&&(bi=Fa.iconFeatureIndex),Fa.iconBox){let Bs=So=>this.collisionIndex.placeCollisionBox(So,Ar,ft,Ra,Ze,Or,vr,je,st.predicate,ua,Cr&&ei?ei:void 0,ia);Rn&&Rn.placeable&&Fa.verticalIconBox?(Ei=Bs(Fa.verticalIconBox),cn=Ei.placeable):(Ei=Bs(Fa.iconBox),cn=Ei.placeable),sn&&(sn=Ei.offscreen)}let ro=It||da.numHorizontalGlyphVertices===0&&da.numVerticalGlyphVertices===0,Mo=Ut||da.numIconVertices===0;ro||Mo?Mo?ro||cn&&(cn=ui):ui=cn&&ui:cn=ui=cn&&ui;let zs=cn&&Ei.placeable;if(ui&&In.placeable&&this.collisionIndex.insertCollisionBox(In.box,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,Rn&&Rn.placeable&&ti?ti:so,st.ID),zs&&this.collisionIndex.insertCollisionBox(Ei.box,Ar,be.get("icon-ignore-placement"),fe.bucketInstanceId,bi,st.ID),Jn&&ui&&this.collisionIndex.insertCollisionCircles(Jn.circles,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,so,st.ID),ie&&this.storeCollisionData(fe.bucketInstanceId,za,Fa,In,Ei,Jn),da.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(fe.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[da.crossTileID]=new Tr((ui||ka)&&!In?.occluded,(cn||Ta)&&!Ei?.occluded,sn||fe.justReloaded),N[da.crossTileID]=!0};if(ta){if(y.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let da=fe.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Fa=da.length-1;Fa>=0;--Fa){let za=da[Fa];ga(fe.symbolInstances.get(za),fe.collisionArrays[za],za)}}else for(let da=y.symbolInstanceStart;da=0&&(y.text.placedSymbolArray.get(je).crossTileID=be>=0&&je!==be?0:ie.crossTileID)}markUsedOrientation(y,N,ie){let fe=N===e.ax.horizontal||N===e.ax.horizontalOnly?N:0,be=N===e.ax.vertical?N:0,Re=[ie.leftJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.rightJustifiedTextSymbolIndex];for(let je of Re)y.text.placedSymbolArray.get(je).placedOrientation=fe;ie.verticalPlacedTextSymbolIndex&&(y.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).placedOrientation=be)}commit(y){this.commitTime=y,this.zoomAtLastRecencyCheck=this.transform.zoom;let N=this.prevPlacement,ie=!1;this.prevZoomAdjustment=N?N.zoomAdjustment(this.transform.zoom):0;let fe=N?N.symbolFadeChange(y):1,be=N?N.opacities:{},Re=N?N.variableOffsets:{},je=N?N.placedOrientations:{};for(let Ze in this.placements){let ut=this.placements[Ze],ft=be[Ze];ft?(this.opacities[Ze]=new lr(ft,fe,ut.text,ut.icon),ie||(ie=ut.text!==ft.text.placed),ie||(ie=ut.icon!==ft.icon.placed)):(this.opacities[Ze]=new lr(null,fe,ut.text,ut.icon,ut.skipFade),ie||(ie=ut.text||ut.icon))}for(let Ze in be){let ut=be[Ze];if(!this.opacities[Ze]){let ft=new lr(ut,fe,!1,!1);ft.isHidden()||(this.opacities[Ze]=ft,ie||(ie=ut.text.placed),ie||(ie=ut.icon.placed))}}for(let Ze in Re)this.variableOffsets[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.variableOffsets[Ze]=Re[Ze]);for(let Ze in je)this.placedOrientations[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.placedOrientations[Ze]=je[Ze]);if(N&&N.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");ie?this.lastPlacementChangeTime=y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=N?N.lastPlacementChangeTime:y)}updateLayerOpacities(y,N){let ie={};for(let fe of N){let be=fe.getBucket(y);be&&fe.latestFeatureIndex&&y.id===be.layerIds[0]&&this.updateBucketOpacities(be,fe.tileID,ie,fe.collisionBoxArray)}}updateBucketOpacities(y,N,ie,fe){y.hasTextData()&&(y.text.opacityVertexArray.clear(),y.text.hasVisibleVertices=!1),y.hasIconData()&&(y.icon.opacityVertexArray.clear(),y.icon.hasVisibleVertices=!1),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexArray.clear(),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexArray.clear();let be=y.layers[0],Re=be.layout,je=new lr(null,0,!1,!1,!0),Ze=Re.get("text-allow-overlap"),ut=Re.get("icon-allow-overlap"),ft=be._unevaluatedLayout.hasValue("text-variable-anchor")||be._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Dt=Re.get("text-rotation-alignment")==="map",Gt=Re.get("text-pitch-alignment")==="map",Kt=Re.get("icon-text-fit")!=="none",st=new lr(null,0,Ze&&(ut||!y.hasIconData()||Re.get("icon-optional")),ut&&(Ze||!y.hasTextData()||Re.get("text-optional")),!0);!y.collisionArrays&&fe&&(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData())&&y.deserializeCollisionBoxes(fe);let It=(ir,dr,Ar)=>{for(let hr=0;hr0,ta=this.placedOrientations[dr.crossTileID],ka=ta===e.ax.vertical,Ta=ta===e.ax.horizontal||ta===e.ax.horizontalOnly;if(Ar>0||hr>0){let ua=wa(Or.text);It(y.text,Ar,ka?pn:ua),It(y.text,hr,Ta?pn:ua);let ia=Or.text.isHidden(),ga=[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex];for(let za of ga)za>=0&&(y.text.placedSymbolArray.get(za).hidden=ia||ka?1:0);dr.verticalPlacedTextSymbolIndex>=0&&(y.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=ia||Ta?1:0);let da=this.variableOffsets[dr.crossTileID];da&&this.markUsedJustification(y,da.anchor,dr,ta);let Fa=this.placedOrientations[dr.crossTileID];Fa&&(this.markUsedJustification(y,"left",dr,Fa),this.markUsedOrientation(y,Fa,dr))}if(Cr){let ua=wa(Or.icon),ia=!(Kt&&dr.verticalPlacedIconSymbolIndex&&ka);dr.placedIconSymbolIndex>=0&&(It(y.icon,dr.numIconVertices,ia?ua:pn),y.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Or.icon.isHidden()),dr.verticalPlacedIconSymbolIndex>=0&&(It(y.icon,dr.numVerticalIconVertices,ia?pn:ua),y.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let Ra=Ut?.has(ir)?Ut.get(ir):{text:null,icon:null};if(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData()){let ua=y.collisionArrays[ir];if(ua){let ia=new e.P(0,0);if(ua.textBox||ua.verticalTextBox){let ga=!0;if(ft){let da=this.variableOffsets[vr];da?(ia=ot(da.anchor,da.width,da.height,da.textOffset,da.textBoxScale),Dt&&ia._rotate(Gt?-this.transform.bearingInRadians:this.transform.bearingInRadians)):ga=!1}if(ua.textBox||ua.verticalTextBox){let da;ua.textBox&&(da=ka),ua.verticalTextBox&&(da=Ta),jt(y.textCollisionBox.collisionVertexArray,Or.text.placed,!ga||da,Ra.text,ia.x,ia.y)}}if(ua.iconBox||ua.verticalIconBox){let ga=!!(!Ta&&ua.verticalIconBox),da;ua.iconBox&&(da=ga),ua.verticalIconBox&&(da=!ga),jt(y.iconCollisionBox.collisionVertexArray,Or.icon.placed,da,Ra.icon,Kt?ia.x:0,Kt?ia.y:0)}}}}if(y.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[y.bucketInstanceId]&&(this.retainedQueryData[y.bucketInstanceId].featureSortOrder=y.featureSortOrder),y.hasTextData()&&y.text.opacityVertexBuffer&&y.text.opacityVertexBuffer.updateData(y.text.opacityVertexArray),y.hasIconData()&&y.icon.opacityVertexBuffer&&y.icon.opacityVertexBuffer.updateData(y.icon.opacityVertexArray),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexBuffer&&y.iconCollisionBox.collisionVertexBuffer.updateData(y.iconCollisionBox.collisionVertexArray),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexBuffer&&y.textCollisionBox.collisionVertexBuffer.updateData(y.textCollisionBox.collisionVertexArray),y.text.opacityVertexArray.length!==y.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);if(y.icon.opacityVertexArray.length!==y.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);y.bucketInstanceId in this.collisionCircleArrays&&(y.collisionCircleArray=this.collisionCircleArrays[y.bucketInstanceId],delete this.collisionCircleArrays[y.bucketInstanceId])}symbolFadeChange(y){return this.fadeDuration===0?1:(y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(y){return Math.max(0,(this.transform.zoom-y)/1.5)}hasTransitions(y){return this.stale||y-this.lastPlacementChangeTimey}setStale(){this.stale=!0}}function jt(pe,y,N,ie,fe,be){ie&&ie.length!==0||(ie=[0,0,0,0]);let Re=ie[0]-lt,je=ie[1]-lt,Ze=ie[2]-lt,ut=ie[3]-lt;pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,ut),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,ut)}let ar=Math.pow(2,25),Er=Math.pow(2,24),xr=Math.pow(2,17),zr=Math.pow(2,16),Lr=Math.pow(2,9),aa=Math.pow(2,8),Sa=Math.pow(2,1);function wa(pe){if(pe.opacity===0&&!pe.placed)return 0;if(pe.opacity===1&&pe.placed)return 4294967295;let y=pe.placed?1:0,N=Math.floor(127*pe.opacity);return N*ar+y*Er+N*xr+y*zr+N*Lr+y*aa+N*Sa+y}let pn=0;class tn{constructor(y){this._sortAcrossTiles=y.layout.get("symbol-z-order")!=="viewport-y"&&!y.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(y,N,ie,fe,be){let Re=this._bucketParts;for(;this._currentTileIndexje.sortKey-Ze.sortKey));this._currentPartIndex!this._forceFullPlacement&&m()-fe>2;for(;this._currentPlacementIndex>=0;){let Re=N[y[this._currentPlacementIndex]],je=this.placement.collisionIndex.transform.zoom;if(e.aQ(Re)&&Re.layout&&(!Re.minzoom||Re.minzoom<=je)&&(!Re.maxzoom||Re.maxzoom>je)){if(this._inProgressLayer||(this._inProgressLayer=new tn(Re)),this._inProgressLayer.continuePlacement(ie[Re.source],this.placement,this._showCollisionBoxes,Re,be))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(y){return this.placement.commit(y),this.placement}}let rn=512/e.a6/2;class Ri{constructor(y,N,ie){this.tileID=y,this.bucketInstanceId=ie,this._symbolsByKey={};let fe=new Map;for(let be=0;be({x:Math.floor(Ze.anchorX*rn),y:Math.floor(Ze.anchorY*rn)})),crossTileIDs:Re.map(Ze=>Ze.crossTileID)};if(je.positions.length>128){let Ze=new e.aR(je.positions.length,16,Uint16Array);for(let{x:ut,y:ft}of je.positions)Ze.add(ut,ft);Ze.finish(),delete je.positions,je.index=Ze}this._symbolsByKey[be]=je}}getScaledCoordinates(y,N){let{x:ie,y:fe,z:be}=this.tileID.canonical,{x:Re,y:je,z:Ze}=N.canonical,ut=rn/Math.pow(2,Ze-be),ft=(je*e.a6+y.anchorY)*ut,Dt=fe*e.a6*rn;return{x:Math.floor((Re*e.a6+y.anchorX)*ut-ie*e.a6*rn),y:Math.floor(ft-Dt)}}findMatches(y,N,ie){let fe=this.tileID.canonical.zy)}}class Gn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class no{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(y){let N=Math.round((y-this.lng)/360);if(N!==0)for(let ie in this.indexes){let fe=this.indexes[ie],be={};for(let Re in fe){let je=fe[Re];je.tileID=je.tileID.unwrapTo(je.tileID.wrap+N),be[je.tileID.key]=je}this.indexes[ie]=be}this.lng=y}addBucket(y,N,ie){var fe,be,Re;if(!((fe=this.indexes[y.overscaledZ])===null||fe===void 0)&&fe[y.key]){if(this.indexes[y.overscaledZ][y.key].bucketInstanceId===N.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(y.overscaledZ,this.indexes[y.overscaledZ][y.key])}for(let Ze=0;Zey.overscaledZ)for(let ft in ut){let Dt=ut[ft];Dt.tileID.isChildOf(y)&&Dt.findMatches(N.symbolInstances,y,je)}else{let ft=ut[y.scaledTo(Number(Ze)).key];ft&&ft.findMatches(N.symbolInstances,y,je)}}for(let Ze=0;Ze=","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"}}}),Kue=ye({"src/plots/map/styles/arcgis-sat.js"(e,r){"use strict";r.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"}}]}}}),Uv=ye({"src/plots/map/constants.js"(e,r){"use strict";var t=(Em(),On(bv)).default,a=Zue(),i=Kue(),o='\xA9 OpenStreetMap contributors',s="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",l="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",u="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",c="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",f="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",h={basic:n,streets:n,outdoors:n,light:s,dark:l,satellite:i,"satellite-streets":a,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:o,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":s,"carto-darkmatter":l,"carto-voyager":n,"carto-positron-nolabels":u,"carto-darkmatter-nolabels":c,"carto-voyager-nolabels":f},d=t(h);r.exports={styleValueDflt:"basic",stylesMap:h,styleValuesMap:d,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",d.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),$b=ye({"src/plots/map/layout_attributes.js"(e,r){"use strict";var t=Yt(),a=Ya().defaultLine,i=Ds().attributes,o=vs(),s=al().textposition,l=Cs().overrideAll,n=ko().templatedArray,u=Uv(),c=o({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});c.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var f=r.exports=l({_arrayAttrRegexps:[t.counterRegex("map",".layers",!0)],domain:i({name:"map"}),style:{valType:"any",values:u.styleValuesMap,dflt:u.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},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:n("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:a},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:a}},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:c,textposition:t.extendFlat({},s,{arrayOk:!1})}})},"plot","from-root");f.uirevision={valType:"any",editType:"none"}}}),PM=ye({"src/traces/scattermap/attributes.js"(e,r){"use strict";var{hovertemplateAttrs:t,texttemplateAttrs:a,templatefallbackAttrs:i}=Ro(),o=Up(),s=jy(),l=al(),n=$b(),u=Oo(),c=rs(),f=Xi().extendFlat,h=Cs().overrideAll,d=$b(),p=s.line,g=s.marker;r.exports=h({lon:s.lon,lat:s.lat,cluster:{enabled:{valType:"boolean"},maxzoom:f({},d.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:f({},g.opacity,{dflt:1})},mode:f({},l.mode,{dflt:"markers"}),text:f({},l.text,{}),texttemplate:a({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:f({},l.hovertext,{}),line:{color:p.color,width:p.width},connectgaps:l.connectgaps,marker:f({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:g.opacity,size:g.size,sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode},c("marker")),fill:s.fill,fillcolor:o(),textfont:n.layers.symbol.textfont,textposition:n.layers.symbol.textposition,below:{valType:"string"},selected:{marker:l.selected.marker},unselected:{marker:l.unselected.marker},hoverinfo:f({},u.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:t(),hovertemplatefallback:i()},"calc","nested")}}),TI=ye({"src/traces/scattermap/constants.js"(e,r){"use strict";var t=["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"];r.exports={isSupportedFont:function(a){return t.indexOf(a)!==-1}}}}),Jue=ye({"src/traces/scattermap/defaults.js"(e,r){"use strict";var t=Yt(),a=ms(),i=kd(),o=ip(),s=np(),l=qp(),n=PM(),u=TI().isSupportedFont;r.exports=function(h,d,p,g){function m(S,A){return t.coerce(h,d,n,S,A)}function y(S,A){return t.coerce2(h,d,n,S,A)}var _=c(h,d,m);if(!_){d.visible=!1;return}if(m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("mode"),m("below"),a.hasMarkers(d)){i(h,d,p,g,m,{noLine:!0,noAngle:!0}),m("marker.allowoverlap"),m("marker.angle");var v=d.marker;v.symbol!=="circle"&&(t.isArrayOrTypedArray(v.size)&&(v.size=v.size[0]),t.isArrayOrTypedArray(v.color)&&(v.color=v.color[0]))}a.hasLines(d)&&(o(h,d,p,g,m,{noDash:!0}),m("connectgaps"));var x=y("cluster.maxzoom"),E=y("cluster.step"),M=y("cluster.color",d.marker&&d.marker.color||p),C=y("cluster.size"),w=y("cluster.opacity"),k=x!==!1||E!==!1||M!==!1||C!==!1||w!==!1,T=m("cluster.enabled",k);if(T||a.hasText(d)){var b=g.font.family;s(h,d,g,m,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:u(b)?b:"Open Sans Regular",weight:g.font.weight,style:g.font.style,size:g.font.size,color:g.font.color}})}m("fill"),d.fill!=="none"&&l(h,d,p,m),t.coerceSelectionMarkerOpacity(d,m)};function c(f,h,d){var p=d("lon")||[],g=d("lat")||[],m=Math.min(p.length,g.length);return h._length=m,m}}}),MI=ye({"src/traces/scattermap/format_labels.js"(e,r){"use strict";var t=qi();r.exports=function(i,o,s){var l={},n=s[o.subplot]._subplot,u=n.mockAxis,c=i.lonlat;return l.lonLabel=t.tickText(u,u.c2l(c[0]),!0).text,l.latLabel=t.tickText(u,u.c2l(c[1]),!0).text,l}}}),EI=ye({"src/plots/map/convert_text_opts.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o){var s=i.split(" "),l=s[0],n=s[1],u=t.isArrayOrTypedArray(o)?t.mean(o):o,c=.5+u/100,f=1.5+u/100,h=["",""],d=[0,0];switch(l){case"top":h[0]="top",d[1]=-f;break;case"bottom":h[0]="bottom",d[1]=f;break}switch(n){case"left":h[1]="right",d[0]=-c;break;case"right":h[1]="left",d[0]=c;break}var p;return h[0]&&h[1]?p=h.join("-"):h[0]?p=h[0]:h[1]?p=h[1]:p="center",{anchor:p,offset:d}}}}),Que=ye({"src/traces/scattermap/convert.js"(e,r){"use strict";var t=en(),a=Yt(),i=Vn().BADNUM,o=Ob(),s=As(),l=$i(),n=$x(),u=ms(),c=TI().isSupportedFont,f=EI(),h=Bf().appendArrayPointValue,d=Go().NEWLINES,p=Go().BR_TAG_ALL;r.exports=function(w,k){var T=k[0].trace,b=T.visible===!0&&T._length!==0,S=T.fill!=="none",A=u.hasLines(T),F=u.hasMarkers(T),D=u.hasText(T),R=F&&T.marker.symbol==="circle",P=F&&T.marker.symbol!=="circle",z=T.cluster&&T.cluster.enabled,I=g("fill"),L=g("line"),B=g("circle"),O=g("symbol"),G={fill:I,line:L,circle:B,symbol:O};if(!b)return G;var $;if((S||A)&&($=o.calcTraceToLineCoords(k)),S&&(I.geojson=o.makePolygon($),I.layout.visibility="visible",a.extendFlat(I.paint,{"fill-color":T.fillcolor})),A&&(L.geojson=o.makeLine($),L.layout.visibility="visible",a.extendFlat(L.paint,{"line-width":T.line.width,"line-color":T.line.color,"line-opacity":T.opacity})),R){var X=m(k);B.geojson=X.geojson,B.layout.visibility="visible",z&&(B.filter=["!",["has","point_count"]],G.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":E(T.cluster.color,T.cluster.step),"circle-radius":E(T.cluster.size,T.cluster.step),"circle-opacity":E(T.cluster.opacity,T.cluster.step)}},G.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(T),"text-size":12}}),a.extendFlat(B.paint,{"circle-color":X.mcc,"circle-radius":X.mrc,"circle-opacity":X.mo})}if(R&&z&&(B.filter=["!",["has","point_count"]]),(P||D)&&(O.geojson=y(k,w),a.extendFlat(O.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),P&&(a.extendFlat(O.layout,{"icon-size":T.marker.size/10}),"angle"in T.marker&&T.marker.angle!=="auto"&&a.extendFlat(O.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),O.layout["icon-allow-overlap"]=T.marker.allowoverlap,a.extendFlat(O.paint,{"icon-opacity":T.opacity*T.marker.opacity,"icon-color":T.marker.color,"icon-halo-color":T.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),D)){var Z=(T.marker||{}).size,J=f(T.textposition,Z);a.extendFlat(O.layout,{"text-size":T.textfont.size,"text-anchor":J.anchor,"text-offset":J.offset,"text-font":M(T)}),a.extendFlat(O.paint,{"text-color":T.textfont.color,"text-opacity":T.opacity})}return G};function g(C){return{type:C,geojson:o.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function m(C){var w=C[0].trace,k=w.marker,T=w.selectedpoints,b=a.isArrayOrTypedArray(k.color),S=a.isArrayOrTypedArray(k.size),A=a.isArrayOrTypedArray(k.opacity),F;function D(Z){return w.opacity*Z}function R(Z){return Z/2}var P;b&&(s.hasColorscale(w,"marker")?P=s.makeColorScaleFuncFromTrace(k):P=a.identity);var z;S&&(z=n(w));var I;A&&(I=function(Z){var J=t(Z)?+a.constrain(Z,0,1):0;return D(J)});var L=[];for(F=0;F850?F+=" Black":b>750?F+=" Extra Bold":b>650?F+=" Bold":b>550?F+=" Semi Bold":b>450?F+=" Medium":b>350?F+=" Regular":b>250?F+=" Light":b>150?F+=" Extra Light":F+=" Thin"):S.slice(0,2).join(" ")==="Open Sans"?(F="Open Sans",b>750?F+=" Extrabold":b>650?F+=" Bold":b>550?F+=" Semibold":b>350?F+=" Regular":F+=" Light"):S.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(F="Klokantech Noto Sans",S[3]==="CJK"&&(F+=" CJK"),F+=b>500?" Bold":" Regular")),A&&(F+=" Italic"),F==="Open Sans Regular Italic"?F="Open Sans Italic":F==="Open Sans Regular Bold"?F="Open Sans Bold":F==="Open Sans Regular Bold Italic"?F="Open Sans Bold Italic":F==="Klokantech Noto Sans Regular Italic"&&(F="Klokantech Noto Sans Italic"),c(F)||(F=k);var D=F.split(", ");return D}}}),ece=ye({"src/traces/scattermap/plot.js"(e,r){"use strict";var t=Yt(),a=Que(),i=Uv().traceLayerPrefix,o={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function s(n,u,c,f){this.type="scattermap",this.subplot=n,this.uid=u,this.clusterEnabled=c,this.isHidden=f,this.sourceIds={fill:"source-"+u+"-fill",line:"source-"+u+"-line",circle:"source-"+u+"-circle",symbol:"source-"+u+"-symbol",cluster:"source-"+u+"-circle",clusterCount:"source-"+u+"-circle"},this.layerIds={fill:i+u+"-fill",line:i+u+"-line",circle:i+u+"-circle",symbol:i+u+"-symbol",cluster:i+u+"-cluster",clusterCount:i+u+"-cluster-count"},this.below=null}var l=s.prototype;l.addSource=function(n,u,c){var f={type:"geojson",data:u.geojson};c&&c.enabled&&t.extendFlat(f,{cluster:!0,clusterMaxZoom:c.maxzoom});var h=this.subplot.map.getSource(this.sourceIds[n]);h?h.setData(u.geojson):this.subplot.map.addSource(this.sourceIds[n],f)},l.setSourceData=function(n,u){this.subplot.map.getSource(this.sourceIds[n]).setData(u.geojson)},l.addLayer=function(n,u,c){var f={type:u.type,id:this.layerIds[n],source:this.sourceIds[n],layout:u.layout,paint:u.paint};u.filter&&(f.filter=u.filter);for(var h=this.layerIds[n],d,p=this.subplot.getMapLayers(),g=0;g=0;A--){var F=S[A];h.removeLayer(y.layerIds[F])}b||h.removeSource(y.sourceIds.circle)}function x(b){for(var S=o.nonCluster,A=0;A=0;A--){var F=S[A];h.removeLayer(y.layerIds[F]),b||h.removeSource(y.sourceIds[F])}}function M(b){m?v(b):E(b)}function C(b){g?_(b):x(b)}function w(){for(var b=g?o.cluster:o.nonCluster,S=0;S=0;f--){var h=c[f];u.removeLayer(this.layerIds[h]),u.removeSource(this.sourceIds[h])}},r.exports=function(u,c){var f=c[0].trace,h=f.cluster&&f.cluster.enabled,d=f.visible!==!0,p=new s(u,f.uid,h,d),g=a(u.gd,c),m=p.below=u.belowLookup["trace-"+f.uid],y,_,v;if(h)for(p.addSource("circle",g.circle,f.cluster),y=0;y=0?Math.floor((f+180)/360):Math.ceil((f-180)/360),C=M*360,w=f-C;function k(z){var I=z.lonlat;if(I[0]===s||x&&_.indexOf(z.i+1)===-1)return 1/0;var L=a.modHalf(I[0],360),B=I[1],O=y.project([L,B]),G=O.x-g.c2p([w,B]),$=O.y-m.c2p([L,h]),X=Math.max(3,z.mrc||0);return Math.max(Math.sqrt(G*G+$*$)-X,1-3/X)}if(t.getClosest(d,k,c),c.index!==!1){var T=d[c.index],b=T.lonlat,S=[a.modHalf(b[0],360)+C,b[1]],A=g.c2p(S),F=m.c2p(S),D=T.mrc||1;c.x0=A-D,c.x1=A+D,c.y0=F-D,c.y1=F+D;var R={};R[p.subplot]={_subplot:y};var P=p._module.formatLabels(T,p,R);return c.lonLabel=P.lonLabel,c.latLabel=P.latLabel,c.color=i(p,T),c.extraText=u(p,T,d[0].t.labels),c.hovertemplate=p.hovertemplate,[c]}}function u(c,f,h){if(c.hovertemplate)return;var d=f.hi||c.hoverinfo,p=d.split("+"),g=p.indexOf("all")!==-1,m=p.indexOf("lon")!==-1,y=p.indexOf("lat")!==-1,_=f.lonlat,v=[];function x(E){return E+"\xB0"}return g||m&&y?v.push("("+x(_[1])+", "+x(_[0])+")"):m?v.push(h.lon+x(_[0])):y&&v.push(h.lat+x(_[1])),(g||p.indexOf("text")!==-1)&&o(f,c,v),v.join("
")}r.exports={hoverPoints:n,getExtraText:u}}}),tce=ye({"src/traces/scattermap/event_data.js"(e,r){"use strict";r.exports=function(a,i){return a.lon=i.lon,a.lat=i.lat,a}}}),rce=ye({"src/traces/scattermap/select.js"(e,r){"use strict";var t=Yt(),a=ms(),{BADNUM:i}=Vn(),o=360,s=.001,l=(c,f,h,d)=>[c.c2p([h,d]),f.c2p([h,d])];function n(c,f,h,d,p){let g=l(c,f,h+o,d),m=l(c,f,h-o,d),y=g[0]-p[0],_=g[1]-p[1],v=Math.abs(y-(p[0]-m[0])){if(Math.abs(m)p?null:[Math.floor(d)-1,Math.ceil(p)+1]}r.exports=function(f,h){var d;let{cd:p,xaxis:g,yaxis:m}=f,{trace:y}=p[0];if(!a.hasMarkers(y))return[];if(h===!1){for(let E of p)E.selected=0;return[]}let _=(d=g._subplot)==null?void 0:d.map,v=!!_?.getRenderWorldCopies()&&h.xmax>h.xmin,x=[];for(let E=0;E=1)return 1;let h=c;for(let g=0;g<8;g++){let m=((s*h+o)*h+i)*h-c;if(Math.abs(m)m?d=h:p=h,h=(d+p)*.5}return((u*h+n)*h+l)*h}}function RM(){return G2??(G2=typeof OffscreenCanvas<"u"&&!!new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),G2}function SI(){if(H2==null&&(H2=!1,RM())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let a=t*4;e.fillStyle=`rgb(${a},${a+1},${a+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let r=e.getImageData(0,0,5,5).data;for(let t=0;t<100;t++)if(t%4!=3&&r[t]!==t){H2=!0;break}}}return H2||!1}function kI(){var e=new fu(9);return fu!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ice(e){var r=e[0],t=e[1],a=e[2],i=e[3],o=e[4],s=e[5],l=e[6],n=e[7],u=e[8];return r*(u*o-s*n)+t*(-u*i+s*l)+a*(n*i-o*l)}function nce(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=-t,e[4]=a,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function oce(e,r){var t=r[0],a=r[1],i=r[2],o=r[3],s=t+t,l=a+a,n=i+i,u=t*s,c=a*s,f=a*l,h=i*s,d=i*l,p=i*n,g=o*s,m=o*l,y=o*n;return e[0]=1-f-p,e[3]=c-y,e[6]=h+m,e[1]=c+y,e[4]=1-u-p,e[7]=d-g,e[2]=h-m,e[5]=d+g,e[8]=1-u-f,e}function w0(){var e=new fu(16);return fu!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function zM(e){var r=new fu(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function sce(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function Id(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Yb(e,r){var t=r[0],a=r[1],i=r[2],o=r[3],s=r[4],l=r[5],n=r[6],u=r[7],c=r[8],f=r[9],h=r[10],d=r[11],p=r[12],g=r[13],m=r[14],y=r[15],_=t*l-a*s,v=t*n-i*s,x=t*u-o*s,E=a*n-i*l,M=a*u-o*l,C=i*u-o*n,w=c*g-f*p,k=c*m-h*p,T=c*y-d*p,b=f*m-h*g,S=f*y-d*g,A=h*y-d*m,F=_*A-v*S+x*b+E*T-M*k+C*w;return F?(F=1/F,e[0]=(l*A-n*S+u*b)*F,e[1]=(i*S-a*A-o*b)*F,e[2]=(g*C-m*M+y*E)*F,e[3]=(h*M-f*C-d*E)*F,e[4]=(n*T-s*A-u*k)*F,e[5]=(t*A-i*T+o*k)*F,e[6]=(m*x-p*C-y*v)*F,e[7]=(c*C-h*x+d*v)*F,e[8]=(s*S-l*T+u*w)*F,e[9]=(a*T-t*S-o*w)*F,e[10]=(p*M-g*x+y*_)*F,e[11]=(f*x-c*M-d*_)*F,e[12]=(l*k-s*b-n*w)*F,e[13]=(t*b-a*k+i*w)*F,e[14]=(g*v-p*E-m*_)*F,e[15]=(c*E-f*v+h*_)*F,e):null}function t1(e,r,t){var a=r[0],i=r[1],o=r[2],s=r[3],l=r[4],n=r[5],u=r[6],c=r[7],f=r[8],h=r[9],d=r[10],p=r[11],g=r[12],m=r[13],y=r[14],_=r[15],v=t[0],x=t[1],E=t[2],M=t[3];return e[0]=v*a+x*l+E*f+M*g,e[1]=v*i+x*n+E*h+M*m,e[2]=v*o+x*u+E*d+M*y,e[3]=v*s+x*c+E*p+M*_,v=t[4],x=t[5],E=t[6],M=t[7],e[4]=v*a+x*l+E*f+M*g,e[5]=v*i+x*n+E*h+M*m,e[6]=v*o+x*u+E*d+M*y,e[7]=v*s+x*c+E*p+M*_,v=t[8],x=t[9],E=t[10],M=t[11],e[8]=v*a+x*l+E*f+M*g,e[9]=v*i+x*n+E*h+M*m,e[10]=v*o+x*u+E*d+M*y,e[11]=v*s+x*c+E*p+M*_,v=t[12],x=t[13],E=t[14],M=t[15],e[12]=v*a+x*l+E*f+M*g,e[13]=v*i+x*n+E*h+M*m,e[14]=v*o+x*u+E*d+M*y,e[15]=v*s+x*c+E*p+M*_,e}function Xl(e,r,t){var a=t[0],i=t[1],o=t[2],s,l,n,u,c,f,h,d,p,g,m,y;return r===e?(e[12]=r[0]*a+r[4]*i+r[8]*o+r[12],e[13]=r[1]*a+r[5]*i+r[9]*o+r[13],e[14]=r[2]*a+r[6]*i+r[10]*o+r[14],e[15]=r[3]*a+r[7]*i+r[11]*o+r[15]):(s=r[0],l=r[1],n=r[2],u=r[3],c=r[4],f=r[5],h=r[6],d=r[7],p=r[8],g=r[9],m=r[10],y=r[11],e[0]=s,e[1]=l,e[2]=n,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=p,e[9]=g,e[10]=m,e[11]=y,e[12]=s*a+c*i+p*o+r[12],e[13]=l*a+f*i+g*o+r[13],e[14]=n*a+h*i+m*o+r[14],e[15]=u*a+d*i+y*o+r[15]),e}function wc(e,r,t){var a=t[0],i=t[1],o=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*i,e[5]=r[5]*i,e[6]=r[6]*i,e[7]=r[7]*i,e[8]=r[8]*o,e[9]=r[9]*o,e[10]=r[10]*o,e[11]=r[11]*o,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function r1(e,r,t){var a=Math.sin(t),i=Math.cos(t),o=r[4],s=r[5],l=r[6],n=r[7],u=r[8],c=r[9],f=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=o*i+u*a,e[5]=s*i+c*a,e[6]=l*i+f*a,e[7]=n*i+h*a,e[8]=u*i-o*a,e[9]=c*i-s*a,e[10]=f*i-l*a,e[11]=h*i-n*a,e}function CI(e,r,t){var a=Math.sin(t),i=Math.cos(t),o=r[0],s=r[1],l=r[2],n=r[3],u=r[8],c=r[9],f=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=o*i-u*a,e[1]=s*i-c*a,e[2]=l*i-f*a,e[3]=n*i-h*a,e[8]=o*a+u*i,e[9]=s*a+c*i,e[10]=l*a+f*i,e[11]=n*a+h*i,e}function A0(e,r,t){var a=Math.sin(t),i=Math.cos(t),o=r[0],s=r[1],l=r[2],n=r[3],u=r[4],c=r[5],f=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=o*i+u*a,e[1]=s*i+c*a,e[2]=l*i+f*a,e[3]=n*i+h*a,e[4]=u*i-o*a,e[5]=c*i-s*a,e[6]=f*i-l*a,e[7]=h*i-n*a,e}function lce(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function uce(e,r,t,a,i){var o=1/Math.tan(r/2);if(e[0]=o/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0){var s=1/(a-i);e[10]=(i+a)*s,e[14]=2*i*a*s}else e[10]=-1,e[14]=-2*a;return e}function cce(e,r,t,a,i,o,s){var l=1/(r-t),n=1/(a-i),u=1/(o-s);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*l,e[13]=(i+a)*n,e[14]=(s+o)*u,e[15]=1,e}function fce(e,r){return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]&&e[4]===r[4]&&e[5]===r[5]&&e[6]===r[6]&&e[7]===r[7]&&e[8]===r[8]&&e[9]===r[9]&&e[10]===r[10]&&e[11]===r[11]&&e[12]===r[12]&&e[13]===r[13]&&e[14]===r[14]&&e[15]===r[15]}function hce(e,r){var t=e[0],a=e[1],i=e[2],o=e[3],s=e[4],l=e[5],n=e[6],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],m=e[14],y=e[15],_=r[0],v=r[1],x=r[2],E=r[3],M=r[4],C=r[5],w=r[6],k=r[7],T=r[8],b=r[9],S=r[10],A=r[11],F=r[12],D=r[13],R=r[14],P=r[15];return Math.abs(t-_)<=1e-6*Math.max(1,Math.abs(t),Math.abs(_))&&Math.abs(a-v)<=1e-6*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(i-x)<=1e-6*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-E)<=1e-6*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(s-M)<=1e-6*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(l-C)<=1e-6*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(n-w)<=1e-6*Math.max(1,Math.abs(n),Math.abs(w))&&Math.abs(u-k)<=1e-6*Math.max(1,Math.abs(u),Math.abs(k))&&Math.abs(c-T)<=1e-6*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(f-b)<=1e-6*Math.max(1,Math.abs(f),Math.abs(b))&&Math.abs(h-S)<=1e-6*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(d-A)<=1e-6*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-F)<=1e-6*Math.max(1,Math.abs(p),Math.abs(F))&&Math.abs(g-D)<=1e-6*Math.max(1,Math.abs(g),Math.abs(D))&&Math.abs(m-R)<=1e-6*Math.max(1,Math.abs(m),Math.abs(R))&&Math.abs(y-P)<=1e-6*Math.max(1,Math.abs(y),Math.abs(P))}function DI(){var e=new fu(3);return fu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function BM(e){var r=new fu(3);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function Yp(e){var r=e[0],t=e[1],a=e[2];return Math.sqrt(r*r+t*t+a*a)}function LI(e,r,t){var a=new fu(3);return a[0]=e,a[1]=r,a[2]=t,a}function jh(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e[2]=r[2]+t[2],e}function FI(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e[2]=r[2]-t[2],e}function Ws(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e}function Xb(e,r,t,a){return e[0]=r[0]+t[0]*a,e[1]=r[1]+t[1]*a,e[2]=r[2]+t[2]*a,e}function dce(e,r){var t=r[0]-e[0],a=r[1]-e[1],i=r[2]-e[2];return Math.sqrt(t*t+a*a+i*i)}function pce(e,r){return e[0]=-r[0],e[1]=-r[1],e[2]=-r[2],e}function xf(e,r){var t=r[0],a=r[1],i=r[2],o=t*t+a*a+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=r[0]*o,e[1]=r[1]*o,e[2]=r[2]*o,e}function uu(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]}function Nf(e,r,t){var a=r[0],i=r[1],o=r[2],s=t[0],l=t[1],n=t[2];return e[0]=i*n-o*l,e[1]=o*s-a*n,e[2]=a*l-i*s,e}function vce(e,r,t){var a=r[0],i=r[1],o=r[2],s=t[3]*a+t[7]*i+t[11]*o+t[15];return s||(s=1),e[0]=(t[0]*a+t[4]*i+t[8]*o+t[12])/s,e[1]=(t[1]*a+t[5]*i+t[9]*o+t[13])/s,e[2]=(t[2]*a+t[6]*i+t[10]*o+t[14])/s,e}function mce(e,r,t){var a=r[0],i=r[1],o=r[2];return e[0]=a*t[0]+i*t[3]+o*t[6],e[1]=a*t[1]+i*t[4]+o*t[7],e[2]=a*t[2]+i*t[5]+o*t[8],e}function OM(e,r,t){var a=t[0],i=t[1],o=t[2],s=t[3],l=r[0],n=r[1],u=r[2],c=i*u-o*n,f=o*l-a*u,h=a*n-i*l;return c+=c,f+=f,h+=h,e[0]=l+s*c+i*h-o*f,e[1]=n+s*f+o*c-a*h,e[2]=u+s*h+a*f-i*c,e}function Vy(e,r,t,a){var i=[],o=[];return i[0]=r[0]-t[0],i[1]=r[1]-t[1],i[2]=r[2]-t[2],o[0]=i[0],o[1]=i[1]*Math.cos(a)-i[2]*Math.sin(a),o[2]=i[1]*Math.sin(a)+i[2]*Math.cos(a),e[0]=o[0]+t[0],e[1]=o[1]+t[1],e[2]=o[2]+t[2],e}function a1(e,r,t,a){var i=[],o=[];return i[0]=r[0]-t[0],i[1]=r[1]-t[1],i[2]=r[2]-t[2],o[0]=i[2]*Math.sin(a)+i[0]*Math.cos(a),o[1]=i[1],o[2]=i[2]*Math.cos(a)-i[0]*Math.sin(a),e[0]=o[0]+t[0],e[1]=o[1]+t[1],e[2]=o[2]+t[2],e}function NM(e,r,t,a){var i=[],o=[];return i[0]=r[0]-t[0],i[1]=r[1]-t[1],i[2]=r[2]-t[2],o[0]=i[0]*Math.cos(a)-i[1]*Math.sin(a),o[1]=i[0]*Math.sin(a)+i[1]*Math.cos(a),o[2]=i[2],e[0]=o[0]+t[0],e[1]=o[1]+t[1],e[2]=o[2]+t[2],e}function gce(e){return e[0]=0,e[1]=0,e[2]=0,e}function yce(){var e=new fu(4);return fu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function _ce(e,r,t,a){var i=new fu(4);return i[0]=e,i[1]=r,i[2]=t,i[3]=a,i}function xce(e,r,t){return e[0]=r[0]*t[0],e[1]=r[1]*t[1],e[2]=r[2]*t[2],e[3]=r[3]*t[3],e}function bce(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e[2]=r[2]*t,e[3]=r[3]*t,e}function wce(e,r){var t=r[0],a=r[1],i=r[2],o=r[3],s=t*t+a*a+i*i+o*o;return s>0&&(s=1/Math.sqrt(s)),e[0]=t*s,e[1]=a*s,e[2]=i*s,e[3]=o*s,e}function Cu(e,r,t){var a=r[0],i=r[1],o=r[2],s=r[3];return e[0]=t[0]*a+t[4]*i+t[8]*o+t[12]*s,e[1]=t[1]*a+t[5]*i+t[9]*o+t[13]*s,e[2]=t[2]*a+t[6]*i+t[10]*o+t[14]*s,e[3]=t[3]*a+t[7]*i+t[11]*o+t[15]*s,e}function PI(){var e=new fu(4);return fu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Ace(e,r,t){t*=.5;var a=Math.sin(t);return e[0]=a*r[0],e[1]=a*r[1],e[2]=a*r[2],e[3]=Math.cos(t),e}function Tce(e,r,t){var a=r[0],i=r[1],o=r[2],s=r[3],l=t[0],n=t[1],u=t[2],c=t[3];return e[0]=a*c+s*l+i*u-o*n,e[1]=i*c+s*n+o*l-a*u,e[2]=o*c+s*u+a*n-i*l,e[3]=s*c-a*l-i*n-o*u,e}function Zb(e,r,t,a){var i=r[0],o=r[1],s=r[2],l=r[3],n=t[0],u=t[1],c=t[2],f=t[3],h,d=i*n+o*u+s*c+l*f,p,g,m;return d<0&&(d=-d,n=-n,u=-u,c=-c,f=-f),1-d>1e-6?(h=Math.acos(d),p=Math.sin(h),g=Math.sin((1-a)*h)/p,m=Math.sin(a*h)/p):(g=1-a,m=a),e[0]=g*i+m*n,e[1]=g*o+m*u,e[2]=g*s+m*c,e[3]=g*l+m*f,e}function Mce(e,r){var t=r[0]+r[4]+r[8],a;if(t>0)a=Math.sqrt(t+1),e[3]=.5*a,a=.5/a,e[0]=(r[5]-r[7])*a,e[1]=(r[6]-r[2])*a,e[2]=(r[1]-r[3])*a;else{var i=0;r[4]>r[0]&&(i=1),r[8]>r[i*3+i]&&(i=2);var o=(i+1)%3,s=(i+2)%3;a=Math.sqrt(r[i*3+i]-r[o*3+o]-r[s*3+s]+1),e[i]=.5*a,a=.5/a,e[3]=(r[o*3+s]-r[s*3+o])*a,e[o]=(r[o*3+i]+r[i*3+o])*a,e[s]=(r[s*3+i]+r[i*3+s])*a}return e}function jM(e,r,t,a){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",o=Math.PI/360;r*=o,a*=o,t*=o;var s=Math.sin(r),l=Math.cos(r),n=Math.sin(t),u=Math.cos(t),c=Math.sin(a),f=Math.cos(a);switch(i){case"xyz":e[0]=s*u*f+l*n*c,e[1]=l*n*f-s*u*c,e[2]=l*u*c+s*n*f,e[3]=l*u*f-s*n*c;break;case"xzy":e[0]=s*u*f-l*n*c,e[1]=l*n*f-s*u*c,e[2]=l*u*c+s*n*f,e[3]=l*u*f+s*n*c;break;case"yxz":e[0]=s*u*f+l*n*c,e[1]=l*n*f-s*u*c,e[2]=l*u*c-s*n*f,e[3]=l*u*f+s*n*c;break;case"yzx":e[0]=s*u*f+l*n*c,e[1]=l*n*f+s*u*c,e[2]=l*u*c-s*n*f,e[3]=l*u*f-s*n*c;break;case"zxy":e[0]=s*u*f-l*n*c,e[1]=l*n*f+s*u*c,e[2]=l*u*c+s*n*f,e[3]=l*u*f-s*n*c;break;case"zyx":e[0]=s*u*f-l*n*c,e[1]=l*n*f+s*u*c,e[2]=l*u*c-s*n*f,e[3]=l*u*f+s*n*c;break;default:throw Error("Unknown angle order "+i)}return e}function UM(){var e=new fu(2);return fu!=Float32Array&&(e[0]=0,e[1]=0),e}function II(e,r){var t=new fu(2);return t[0]=e,t[1]=r,t}function RI(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e}function zI(e){var r=e[0],t=e[1];return Math.sqrt(r*r+t*t)}function Ece(e){var r=e[0],t=e[1];return r*r+t*t}function Sce(e,r){return e[0]*r[0]+e[1]*r[1]}function BI(e){return e[0]=0,e[1]=0,e}function uh(e,r,t){return r*(xa/(e.tileSize*2**(t-e.tileID.overscaledZ)))}function Ac(e){return e instanceof Error?e:Error(typeof e=="string"?e:String(e))}function T0(){return new Float64Array(4)}function as(){return new Float64Array(3)}function qv(){return new Float64Array(16)}function Kb(){let e=new Float64Array(16);return Id(e),e}function OI(){let e=new Float32Array(16);return Id(e),e}function M0(e,r,t,a,i=!1){if(!t[0]&&!t[1])return[0,0];let o=i?a==="map"?-e.bearingInRadians:0:a==="viewport"?e.bearingInRadians:0;if(o){let s=Math.sin(o),l=Math.cos(o);t=[t[0]*l-t[1]*s,t[0]*s+t[1]*l]}return[i?t[0]:uh(r,t[0],e.zoom),i?t[1]:uh(r,t[1],e.zoom)]}function qM(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]}function Uh(e,r,t){let a=ice([e[0],e[1],e[2],r[0],r[1],r[2],t[0],t[1],t[2]]);if(a===0)return null;let i=Nf([],[r[0],r[1],r[2]],[t[0],t[1],t[2]]),o=Nf([],[t[0],t[1],t[2]],[e[0],e[1],e[2]]),s=Nf([],[e[0],e[1],e[2]],[r[0],r[1],r[2]]),l=Ws([],i,-e[3]);return jh(l,l,Ws([],o,-r[3])),jh(l,l,Ws([],s,-t[3])),Ws(l,l,1/a),l}function kce(e,r,t){let a=e[0]*t[0]+e[1]*t[1]+e[2]*t[2],i=r[0]*t[0]+r[1]*t[1]+r[2]*t[2];return i===0?null:(-a-t[3])/i}function Jb(e,r,t,a){let i=Math.sqrt(e*e+r*r),o=Math.sqrt(t*t+a*a);e/=i,r/=i,t/=o,a/=o;let s=e*t+r*a,l=Math.acos(s);return-r*t+e*a>0?l:-l}function ch(e,r){let t=Vv(e,360),a=Vv(r,360),i=a-t,o=a>t?i-360:i+360;return Math.abs(i)n.canonical.z)),t=1/0,a=-1/0,i=1/0,o=-1/0,s=[];for(let n of e){let{x:u,y:c,z:f}=n.canonical,h=2**(r-f),d=u*h,p=c*h;s.push({id:n,x:d,y:p}),da&&(a=d),po&&(o=p)}let l=new Set;for(let n of s)(n.x===t||n.x===a||n.y===i||n.y===o)&&l.add(n.id);return l}function Lce(e){if(e<=0)return 0;if(e>=1)return 1;let r=e*e,t=r*e;return 4*(e<.5?t:3*(e-r)+t-.75)}function VM(e,r,t,a){return ace(e,r,t,a)}function Gn(e,r,t){return Math.min(t,Math.max(r,e))}function qh(e,r,t){let a=t-r,i=((e-r)%a+a)%a+r;return i===r?t:i}function tn(e,...r){for(let t of r)for(let a in t)e[a]=t[a];return e}function Gy(e,r){let t={};for(let a of r)a in e&&(t[a]=e[a]);return t}function NI(){return Uz++}function Fce(e){return Math.log(e)/Math.LN2%1==0}function Pce(e){return e<=1?1:2**Math.ceil(Math.log(e)/Math.LN2)}function bf(e){return 2**e}function Tc(e){return Math.log(e)/Math.LN2}function fh(e,r,t){if(r<=0)return e;let a=1/r;return t===void 0||Math.abs(t)<1e-10?Math.round(e*a)/a:(t>0?Math.ceil(e*a-1e-9):Math.floor(e*a+1e-10))/a}function GM(e,r,t){let a={};for(let i in e)a[i]=r.call(t||this,e[i],i,e);return a}function jI(e,r,t){let a={};for(let i in e)r.call(t||this,e[i],i,e)&&(a[i]=e[i]);return a}function up(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(let t=0;t(r.y-e.y)*(t.x-e.x)}function Ice(e,r,t,a){let i=r.y-e.y,o=r.x-e.x,s=a.y-t.y,l=a.x-t.x,n=s*o-l*i;if(n===0)return null;let u=e.y-t.y,c=e.x-t.x,f=(l*u-s*c)/n;return new zr(e.x+f*o,e.y+f*i)}function Rce([e,r,t]){return r+=90,r*=Math.PI/180,t*=Math.PI/180,[e*Math.cos(r)*Math.sin(t),e*Math.sin(r)*Math.sin(t),e*Math.cos(t)]}function n1(e){return typeof WorkerGlobalScope<"u"&&e!==void 0&&e instanceof WorkerGlobalScope}function zce(e){let r=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,t={};if(e.replace(r,(a,i,o,s)=>{let l=o||s;return t[i]=!l||l.toLowerCase(),""}),t["max-age"]){let a=parseInt(t["max-age"],10);isNaN(a)?delete t["max-age"]:t["max-age"]=a}return t}function Bce(e){if(Y2==null){let r=e.navigator?e.navigator.userAgent:null;Y2=!!e.safari||!!(r&&(/\b(iPad|iPhone|iPod)\b/.test(r)||r.match("Safari")&&!r.match("Chrome")))}return Y2}function Gv(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap}function Oce(e,r,t,a,i){let o=Math.max(-r,0)*4,s=(Math.max(0,t)-t)*a*4+o,l=a*4,n=Math.max(0,r),u=Math.max(0,t),c=Math.min(e.width,r+a),f=Math.min(e.height,t+i);return{rect:{x:n,y:u,width:c-n,height:f-u},layout:[{offset:s,stride:l}]}}function Nce(e,r,t,a,i){return yi(this,null,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let o=new VideoFrame(e,{timestamp:0});try{let s=o?.format;if(!s||!(s.startsWith("BGR")||s.startsWith("RGB")))throw Error(`Unrecognized format ${s}`);let l=s.startsWith("BGR"),n=new Uint8ClampedArray(a*i*4);if(yield o.copyTo(n,Oce(e,r,t,a,i)),l)for(let u=0;u{e.removeEventListener(r,t,a)}}}function il(e){return e*Math.PI/180}function cp(e){return e/Math.PI*180}function UI(e,r){return e.roll==r.roll&&e.pitch==r.pitch&&e.bearing==r.bearing}function jce(e){let r=new Float64Array(9);oce(r,e);let t=cp(-Math.asin(Gn(r[2],-1,1))),a,i;return Math.hypot(r[5],r[8])<.001?(a=0,i=-cp(Math.atan2(r[3],r[4]))):(a=cp(r[5]===0&&r[8]===0?0:Math.atan2(r[5],r[8])),i=cp(r[1]===0&&r[0]===0?0:Math.atan2(r[1],r[0]))),{roll:a,pitch:t+90,bearing:i}}function qI(e,r,t){let a=II(r.x-t.x,r.y-t.y),i=II(e.x-t.x,e.y-t.y),o=a[0]*i[1]-a[1]*i[0];return cp(Math.atan2(o,Sce(a,i)))}function VI(e,r,t){let a=new Float64Array(4);return jM(a,e,r-90,t),a}function Uce(e,r){return lS[r]&&"touches"in e}function qce(e,r){var t,a;if(!uS[r])return!1;let i=e,o=((a=(t=i?.target)==null?void 0:t.ownerDocument)==null?void 0:a.defaultView)||window;return i instanceof o.MouseEvent||i instanceof o.WheelEvent}function Vce(e){return lS[e]||uS[e]}function S0(e){return e instanceof Error&&e.name==="AbortError"}function WM(e){if(e.aborted)throw new T1(e.reason)}function GI(e){return Uf.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}function Gce(e,r){Uf.REGISTERED_PROTOCOLS[e]=r}function Hce(e){delete Uf.REGISTERED_PROTOCOLS[e]}function $M(){var e;if(n1(self))return(e=self.worker)==null?void 0:e.referrer;if(window.location.protocol==="blob:")try{return window.parent.location.href}catch{}return window.location.href}function Wce(e,r){return yi(this,null,function*(){let t=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:$M(),referrerPolicy:e.referrerPolicy,signal:r.signal});e.type==="json"&&!t.headers.has("Accept")&&t.headers.set("Accept","application/json");let a;try{a=yield fetch(t)}catch(s){throw S0(s)?s:new M1(0,Ac(s).message,e.url,new Blob)}if(!a.ok){let s=yield a.blob();throw new M1(a.status,a.statusText,e.url,s)}let i;i=e.type==="arrayBuffer"||e.type==="image"?a.arrayBuffer():e.type==="json"?a.json():a.text();let o=yield i;return WM(r.signal),{data:o,cacheControl:a.headers.get("Cache-Control"),expires:a.headers.get("Expires"),etag:a.headers.get("ETag")}})}function $ce(e,r){return new Promise((t,a)=>{var i;let o=new XMLHttpRequest;o.open(e.method||"GET",e.url,!0),(e.type==="arrayBuffer"||e.type==="image")&&(o.responseType="arraybuffer");for(let s in e.headers)o.setRequestHeader(s,e.headers[s]);e.type==="json"&&(o.responseType="text",(i=e.headers)!=null&&i.Accept||o.setRequestHeader("Accept","application/json")),o.withCredentials=e.credentials==="include",o.onerror=()=>{a(Error(o.statusText))},o.onload=()=>{if(!r.signal.aborted)if((o.status>=200&&o.status<300||o.status===0)&&o.response!==null){let s=o.response;if(e.type==="json")try{s=JSON.parse(o.response)}catch(l){a(l);return}t({data:s,cacheControl:o.getResponseHeader("Cache-Control"),expires:o.getResponseHeader("Expires"),etag:o.getResponseHeader("ETag")})}else{let s=new Blob([o.response],{type:o.getResponseHeader("Content-Type")});a(new M1(o.status,o.statusText,e.url,s))}},r.signal.addEventListener("abort",()=>{o.abort(),a(new T1(r.signal.reason))}),o.send(e.body)})}function HI(e){if(!e||e.startsWith("data:image/"))return!0;if(e.startsWith("blob:")&&(e=e.slice(5),e.startsWith("null")))return!1;if(e.indexOf("://")<=0)return!0;let r=new URL(e),t=window.location;return r.protocol===t.protocol&&r.host===t.host}function WI(e,r,t){var a;(a=t[e])!=null&&a.includes(r)||(t[e]||(t[e]=[]),t[e].push(r))}function YM(e,r,t){if(t?.[e]){let a=t[e].indexOf(r);a!==-1&&t[e].splice(a,1)}}function Uc(e,r){return{kind:"array",itemType:e,N:r}}function dl(e){if(e.kind==="array"){let r=dl(e.itemType);return typeof e.N=="number"?`array<${r}, ${e.N}>`:e.itemType.kind==="value"?"array":`array<${r}>`}return e.kind}function Hy(e,r){if(r.kind==="error")return null;if(e.kind==="array"){if(r.kind==="array"&&(r.N===0&&r.itemType.kind==="value"||!Hy(e.itemType,r.itemType))&&(typeof e.N!="number"||e.N===r.N))return null}else{if(e.kind===r.kind)return null;if(e.kind==="value"){for(let t of Yz)if(!Hy(t,r))return null}}return`Expected ${dl(e)} but found ${dl(r)} instead.`}function XM(e,r){return r.some(t=>t.kind===e.kind)}function Hv(e,r){return r.some(t=>t==="null"?e===null:t==="array"?Array.isArray(e):t==="object"?e&&!Array.isArray(e)&&typeof e=="object":t===typeof e)}function k0(e,r){return e.kind==="array"&&r.kind==="array"?e.itemType.kind===r.itemType.kind&&typeof e.N=="number":e.kind===r.kind}function $I(e){return e%=360,e<0&&(e+=360),e}function YI([e,r,t,a]){e=ZM(e),r=ZM(r),t=ZM(t);let i,o,s=KM((.2225045*e+.7168786*r+.0606169*t)/1);e===r&&r===t?i=o=s:(i=KM((.4360747*e+.3850649*r+.1430804*t)/dS),o=KM((.0139322*e+.0971045*r+.7141733*t)/pS));let l=116*s-16;return[l<0?0:l,500*(i-s),200*(s-o),a]}function ZM(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function KM(e){return e>.008856451679035631?e**.3333333333333333:e/mS+vS}function XI([e,r,t,a]){let i=(e+16)/116,o=isNaN(r)?i:i+r/500,s=isNaN(t)?i:i-t/200;return i=1*QM(i),o=dS*QM(o),s=pS*QM(s),[JM(3.1338561*o-1.6168667*i-.4906146*s),JM(-.9787684*o+1.9161415*i+.033454*s),JM(.0719453*o-.2289914*i+1.4052427*s),a]}function JM(e){return e=e<=.00304?12.92*e:1.055*e**.4166666666666667-.055,e<0?0:e>1?1:e}function QM(e){return e>Z2?e*e*e:mS*(e-vS)}function Yce(e){let[r,t,a,i]=YI(e),o=Math.sqrt(t*t+a*a);return[Math.round(o*1e4)?$I(Math.atan2(a,t)*Zz):NaN,o,r,i]}function Xce([e,r,t,a]){return e=isNaN(e)?0:e*Xz,XI([t,Math.cos(e)*r,Math.sin(e)*r,a])}function Zce([e,r,t,a]){e=$I(e),r/=100,t/=100;function i(o){let s=(o+e/30)%12,l=r*Math.min(t,1-t);return t-l*Math.max(-1,Math.min(s-3,9-s,1))}return[i(0),i(8),i(4),a]}function Wy(e,r){return Kz(e,r)?e[r]:void 0}function Kce(e){if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let r=Wy(Jz,e);if(r){let[a,i,o]=r;return[a/255,i/255,o/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let a=e.length<6?1:2,i=1;return[t2(e.slice(i,i+=a)),t2(e.slice(i,i+=a)),t2(e.slice(i,i+=a)),t2(e.slice(i,i+a)||"ff")]}if(e.startsWith("rgb")){let a=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(a){let[i,o,s,l,n,u,c,f,h,d,p,g]=a,m=[l||" ",c||" ",d].join("");if(m===" "||m===" /"||m===",,"||m===",,,"){let y=[s,u,h].join(""),_=y==="%%%"?100:y===""?255:0;if(_){let v=[o1(+o/_,0,1),o1(+n/_,0,1),o1(+f/_,0,1),p?ZI(+p,g):1];if(KI(v))return v}}return}}let t=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[a,i,o,s,l,n,u,c,f]=t,h=[o||" ",l||" ",u].join("");if(h===" "||h===" /"||h===",,"||h===",,,"){let d=[+i,o1(+s,0,100),o1(+n,0,100),c?ZI(+c,f):1];if(KI(d))return Zce(d)}}}function t2(e){return parseInt(e.padEnd(2,e),16)/255}function ZI(e,r){return o1(r?e/100:e,0,1)}function o1(e,r,t){return Math.min(Math.max(r,e),t)}function KI(e){return!e.some(Number.isNaN)}function C0(e,r,t){return e+t*(r-e)}function s1(e,r,t){return e.map((a,i)=>C0(a,r[i],t))}function Jce(e){return e==="rgb"||e==="hcl"||e==="lab"}function JI(e,r,t,a){return typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255&&typeof t=="number"&&t>=0&&t<=255?a===void 0||typeof a=="number"&&a>=0&&a<=1?null:`Invalid rgba value [${[e,r,t,a].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof a=="number"?[e,r,t,a]:[e,r,t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function l1(e){if(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||e instanceof Zp||e instanceof Hn||e instanceof J2||e instanceof dp||e instanceof Bd||e instanceof Od||e instanceof ph||e instanceof Nd||e instanceof jd)return!0;if(Array.isArray(e)){for(let r of e)if(!l1(r))return!1;return!0}if(typeof e=="object"){for(let r in e)if(!l1(e[r]))return!1;return!0}return!1}function Il(e){if(e===null)return E1;if(typeof e=="string")return Zn;if(typeof e=="boolean")return mo;if(typeof e=="number")return mi;if(e instanceof Hn)return Hh;if(e instanceof Zp)return b_;if(e instanceof J2)return w_;if(e instanceof dp)return S1;if(e instanceof Bd)return A_;if(e instanceof Od)return T_;if(e instanceof ph)return k1;if(e instanceof Nd)return M_;if(e instanceof jd)return C1;if(Array.isArray(e)){let r=e.length,t;for(let a of e){let i=Il(a);if(!t)t=i;else{if(t===i)continue;t=eo;break}}return Uc(t||eo,r)}return I0}function $y(e){let r=typeof e;return e===null?"":r==="string"||r==="number"||r==="boolean"?String(e):e instanceof Hn||e instanceof Zp||e instanceof dp||e instanceof Bd||e instanceof Od||e instanceof ph||e instanceof Nd||e instanceof jd?e.toString():JSON.stringify(e)}function r2(e,r,t){let a=e.length-1,i=0,o=a,s=0,l,n;for(;i<=o;)if(s=Math.floor((i+o)/2),l=e[s],n=e[s+1],l<=r){if(s===a||rr)o=s-1;else throw new Ys("Input is not a number.",t);return 0}function Qce(e,r,t,a){let i=3*e,o=3*(t-e)-i,s=1-i-o,l=3*r,n=3*(a-r)-l,u=1-l-n;return function(c,f=1e-6){if(c<=0)return 0;if(c>=1)return 1;let h=c;for(let g=0;g<8;g++){let m=((s*h+o)*h+i)*h-c;if(Math.abs(m)m?d=h:p=h,h=(d+p)*.5}return((u*h+n)*h+l)*h}}function eE(e,r,t,a){let i=a-t,o=e-t;return i===0?0:r===1?o/i:(r**+o-1)/(r**+i-1)}function QI(e,r,t=0,a=e.length-1,i=efe){for(;a>t;){if(a-t>600){let n=a-t+1,u=r-t+1,c=Math.log(n),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(n-f)/n)*(u-n/2<0?-1:1);QI(e,r,Math.max(t,Math.floor(r-u*f/n+h)),Math.min(a,Math.floor(r+(n-u)*f/n+h)),i)}let o=e[r],s=t,l=a;for(Yy(e,t,r),i(e[a],o)>0&&Yy(e,t,a);s0;)l--}i(e[t],o)===0?Yy(e,t,l):(l++,Yy(e,l,a)),l<=r&&(t=l+1),r<=l&&(a=l-1)}}function Yy(e,r,t){let a=e[r];e[r]=e[t],e[t]=a}function efe(e,r){return er)}function a2(e,r){if(e.length<=1)return[e];let t=[],a,i;for(let o of e){let s=rfe(o);s!==0&&(o.area=Math.abs(s),i===void 0&&(i=s<0),i===s<0?(a&&t.push(a),a=[o]):a.push(o))}if(a&&t.push(a),r>1)for(let o=0;ot}function sfe(e,r,t){return r<=t}function lfe(e,r,t){return r>=t}function tR(e,r,t,a){return a.compare(r,t)===0}function ufe(e,r,t,a){return!tR(e,r,t,a)}function cfe(e,r,t,a){return a.compare(r,t)<0}function ffe(e,r,t,a){return a.compare(r,t)>0}function hfe(e,r,t,a){return a.compare(r,t)<=0}function dfe(e,r,t,a){return a.compare(r,t)>=0}function u1(e,r,t){let a=e!=="=="&&e!=="!=";return class YJ{constructor(o,s,l,n){this.lhs=o,this.rhs=s,this.key=l,this.collator=n,this.type=mo,this.hasUntypedArgument=o.type.kind==="value"||s.type.kind==="value"}static parse(o,s){if(o.length!==3&&o.length!==4)return s.error("Expected two or three arguments.");let l=o[0],n=s.parse(o[1],1,eo);if(!n)return null;if(!eR(l,n.type))return s.concat(1).error(`"${l}" comparisons are not supported for type '${dl(n.type)}'.`);let u=s.parse(o[2],2,eo);if(!u)return null;if(!eR(l,u.type))return s.concat(2).error(`"${l}" comparisons are not supported for type '${dl(u.type)}'.`);if(n.type.kind!==u.type.kind&&n.type.kind!=="value"&&u.type.kind!=="value")return s.error(`Cannot compare types '${dl(n.type)}' and '${dl(u.type)}'.`);a&&(n.type.kind==="value"&&u.type.kind!=="value"?n=new pp(u.type,[n],s.key):n.type.kind!=="value"&&u.type.kind==="value"&&(u=new pp(n.type,[u],s.key)));let c=null;if(o.length===4){if(n.type.kind!=="string"&&u.type.kind!=="string"&&n.type.kind!=="value"&&u.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(c=s.parse(o[3],3,w_),!c)return null}return new YJ(n,u,s.key,c)}evaluate(o){let s=this.lhs.evaluate(o),l=this.rhs.evaluate(o);if(a&&this.hasUntypedArgument){let n=Il(s),u=Il(l);if(n.kind!==u.kind||n.kind!=="string"&&n.kind!=="number")throw new Ys(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${n.kind}, ${u.kind}) instead.`,this.key)}if(this.collator&&!a&&this.hasUntypedArgument){let n=Il(s),u=Il(l);if(n.kind!=="string"||u.kind!=="string")return r(o,s,l)}return this.collator?t(o,s,l,this.collator.evaluate(o)):r(o,s,l)}eachChild(o){o(this.lhs),o(this.rhs),this.collator&&o(this.collator)}outputDefined(){return!0}}}function pfe(e,r){let t=vfe(e[0]),a=gfe(e[1]),i=2**r.z;return[Math.round(t*i*Ud),Math.round(a*i*Ud)]}function tE(e,r){let t=2**r.z,a=(e[0]/Ud+r.x)/t,i=(e[1]/Ud+r.y)/t;return[mfe(a),yfe(i)]}function vfe(e){return(180+e)/360}function mfe(e){return e*360-180}function gfe(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function yfe(e){return 360/Math.PI*Math.atan(Math.exp((180-e*360)*Math.PI/180))-90}function Xy(e,r){e[0]=Math.min(e[0],r[0]),e[1]=Math.min(e[1],r[1]),e[2]=Math.max(e[2],r[0]),e[3]=Math.max(e[3],r[1])}function Zy(e,r){return!(e[0]<=r[0]||e[2]>=r[2]||e[1]<=r[1]||e[3]>=r[3])}function _fe(e,r,t){return r[1]>e[1]!=t[1]>e[1]&&e[0]<(t[0]-r[0])*(e[1]-r[1])/(t[1]-r[1])+r[0]}function xfe(e,r,t){let a=e[0]-r[0],i=e[1]-r[1],o=e[0]-t[0],s=e[1]-t[1];return a*s-o*i===0&&a*o<=0&&i*s<=0}function i2(e,r,t,a){let i=[r[0]-e[0],r[1]-e[1]];return Tfe([a[0]-t[0],a[1]-t[1]],i)!==0&&!!(aR(e,r,t,a)&&aR(t,a,e,r))}function bfe(e,r,t){for(let a of t)for(let i=0;i0&&f<0||c<0&&f>0}function rE(e,r,t){let a=[];for(let i=0;it[2]){let i=a*.5,o=e[0]-t[0]>i?-a:t[0]-e[0]>i?a:0;o===0&&(o=e[0]-t[2]>i?-a:t[2]-e[0]>i?a:0),e[0]+=o}Xy(r,e)}function Mfe(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function oR(e,r,t,a){let i=2**a.z*Ud,o=[a.x*Ud,a.y*Ud],s=[];for(let l of e)for(let n of l){let u=[n.x+o[0],n.y+o[1]];nR(u,r,t,i),s.push(u)}return s}function sR(e,r,t,a){let i=2**a.z*Ud,o=[a.x*Ud,a.y*Ud],s=[];for(let l of e){let n=[];for(let u of l){let c=[u.x+o[0],u.y+o[1]];Xy(r,c),n.push(c)}s.push(n)}if(r[2]-r[0]<=i/2){Mfe(r);for(let l of s)for(let n of l)nR(n,r,t,i)}return s}function Efe(e,r){let t=[1/0,1/0,-1/0,-1/0],a=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if(r.type==="Polygon"){let o=rE(r.coordinates,a,i),s=oR(e.geometry(),t,a,i);if(!Zy(t,a))return!1;for(let l of s)if(!c1(l,o))return!1}if(r.type==="MultiPolygon"){let o=iR(r.coordinates,a,i),s=oR(e.geometry(),t,a,i);if(!Zy(t,a))return!1;for(let l of s)if(!wfe(l,o))return!1}return!0}function Sfe(e,r){let t=[1/0,1/0,-1/0,-1/0],a=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if(r.type==="Polygon"){let o=rE(r.coordinates,a,i),s=sR(e.geometry(),t,a,i);if(!Zy(t,a))return!1;for(let l of s)if(!rR(l,o))return!1}if(r.type==="MultiPolygon"){let o=iR(r.coordinates,a,i),s=sR(e.geometry(),t,a,i);if(!Zy(t,a))return!1;for(let l of s)if(!Afe(l,o))return!1}return!0}function lR(e,r){return r[0]-e[0]}function n2(e){return e[1]-e[0]+1}function Xp(e,r){return e[1]>=e[0]&&e[1]e[1])return[null,null];let t=n2(e);if(r){if(t===2)return[e,null];let i=Math.floor(t/2);return[[e[0],e[0]+i],[e[0]+i,e[1]]]}if(t===1)return[e,null];let a=Math.floor(t/2)-1;return[[e[0],e[0]+a],[e[0]+a+1,e[1]]]}function iE(e,r){if(!Xp(r,e.length))return[1/0,1/0,-1/0,-1/0];let t=[1/0,1/0,-1/0,-1/0];for(let a=r[0];a<=r[1];++a)Xy(t,e[a]);return t}function nE(e){let r=[1/0,1/0,-1/0,-1/0];for(let t of e)for(let a of t)Xy(r,a);return r}function uR(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function oE(e,r,t){if(!uR(e)||!uR(r))return NaN;let a=0,i=0;return e[2]r[2]&&(a=e[0]-r[2]),e[1]>r[3]&&(i=e[1]-r[3]),e[3]=a)return a;if(Zy(i,o)){if(cR(e,r))return 0}else if(cR(r,e))return 0;let s=1/0;for(let l of e)for(let n=0,u=l.length,c=u-1;n0;){let n=s.pop();if(n[0]>=o)continue;let u=n[1],c=r?50:100;if(n2(u)<=c){if(!Xp(u,e.length))return NaN;if(r){let f=Lfe(e,u,t,a);if(isNaN(f)||f===0)return f;o=Math.min(o,f)}else for(let f=u[0];f<=u[1];++f){let h=Dfe(e[f],t,a);if(o=Math.min(o,h),o===0)return 0}}else{let f=aE(u,r);fR(s,o,a,e,l,f[0]),fR(s,o,a,e,l,f[1])}}return o}function l2(e,r,t,a,i,o=1/0){let s=Math.min(o,i.distance(e[0],t[0]));if(s===0)return s;let l=new TS([[0,[0,e.length-1],[0,t.length-1]]],lR);for(;l.length>0;){let n=l.pop();if(n[0]>=s)continue;let u=n[1],c=n[2],f=r?50:100,h=a?50:100;if(n2(u)<=f&&n2(c)<=h){if(!Xp(u,e.length)&&Xp(c,t.length))return NaN;let d;if(r&&a)d=kfe(e,u,t,c,i),s=Math.min(s,d);else if(r&&!a){let p=e.slice(u[0],u[1]+1);for(let g=c[0];g<=c[1];++g)if(d=Wv(t[g],p,i),s=Math.min(s,d),s===0)return s}else if(!r&&a){let p=t.slice(c[0],c[1]+1);for(let g=u[0];g<=u[1];++g)if(d=Wv(e[g],p,i),s=Math.min(s,d),s===0)return s}else d=Cfe(e,u,t,c,i),s=Math.min(s,d)}else{let d=aE(u,r),p=aE(c,a);o2(l,s,i,e,t,d[0],p[0]),o2(l,s,i,e,t,d[0],p[1]),o2(l,s,i,e,t,d[1],p[0]),o2(l,s,i,e,t,d[1],p[1])}}return s}function Pfe(e,r){let t=e.geometry(),a=t.flat().map(s=>tE([s.x,s.y],e.canonical));if(t.length===0)return NaN;let i=new tw(a[0][1]),o=1/0;for(let s of r){switch(s.type){case"Point":o=Math.min(o,l2(a,!1,[s.coordinates],!1,i,o));break;case"LineString":o=Math.min(o,l2(a,!1,s.coordinates,!0,i,o));break;case"Polygon":o=Math.min(o,s2(a,!1,s.coordinates,i,o))}if(o===0)return o}return o}function Ife(e,r){let t=e.geometry(),a=t.flat().map(s=>tE([s.x,s.y],e.canonical));if(t.length===0)return NaN;let i=new tw(a[0][1]),o=1/0;for(let s of r){switch(s.type){case"Point":o=Math.min(o,l2(a,!0,[s.coordinates],!1,i,o));break;case"LineString":o=Math.min(o,l2(a,!0,s.coordinates,!0,i,o));break;case"Polygon":o=Math.min(o,s2(a,!0,s.coordinates,i,o))}if(o===0)return o}return o}function Rfe(e,r){let t=e.geometry();if(t.length===0||t[0].length===0)return NaN;let a=a2(t,0).map(s=>s.map(l=>l.map(n=>tE([n.x,n.y],e.canonical)))),i=new tw(a[0][0][0][1]),o=1/0;for(let s of r)for(let l of a){switch(s.type){case"Point":o=Math.min(o,s2([s.coordinates],!1,l,i,o));break;case"LineString":o=Math.min(o,s2(s.coordinates,!0,l,i,o));break;case"Polygon":o=Math.min(o,Ffe(l,s.coordinates,i,o))}if(o===0)return o}return o}function lE(e){return e.type==="MultiPolygon"?e.coordinates.map(r=>({type:"Polygon",coordinates:r})):e.type==="MultiLineString"?e.coordinates.map(r=>({type:"LineString",coordinates:r})):e.type==="MultiPoint"?e.coordinates.map(r=>({type:"Point",coordinates:r})):[e]}function hR(e,[r,t,a,i],o){r=r.evaluate(e),t=t.evaluate(e),a=a.evaluate(e);let s=i?i.evaluate(e):1,l=JI(r,t,a,s);if(l)throw new Ys(l,o);return new Hn(r/255,t/255,a/255,s,!1)}function dR(e,r){return e in r&&r[e]!==void 0}function uE(e,r){let t=r[e];return t===void 0?null:t}function zfe(e,r,t,a){for(;t<=a;){let i=t+a>>1;if(r[i]===e)return!0;r[i]>e?a=i-1:t=i+1}return!1}function $v(e){return{type:e}}function Bfe(e){return Array.isArray(e)?`(${e.map(dl).join(", ")})`:`(${dl(e.type)}...)`}function u2(e){if(e instanceof bS)return u2(e.boundExpression);if(e instanceof R0&&e.name==="error"||e instanceof AS||e instanceof ew||e instanceof rw||e instanceof aw)return!1;let r=e instanceof am||e instanceof pp,t=!0;return e.eachChild(a=>{t&&(t=r?u2(a):a instanceof rm)}),t?c2(e)&&f2(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function c2(e){if(e instanceof R0&&(e.name==="get"&&e.args.length===1||e.name==="feature-state"||e.name==="has"&&e.args.length===1||e.name==="properties"||e.name==="geometry-type"||e.name==="id"||/^filter-/.test(e.name))||e instanceof ew||e instanceof rw)return!1;let r=!0;return e.eachChild(t=>{r&&!c2(t)&&(r=!1)}),r}function Ky(e){if(e instanceof R0&&e.name==="feature-state")return!1;let r=!0;return e.eachChild(t=>{r&&!Ky(t)&&(r=!1)}),r}function f2(e,r){if(e instanceof R0&&r.indexOf(e.name)>=0)return!1;let t=!0;return e.eachChild(a=>{t&&!f2(a,r)&&(t=!1)}),t}function f1(e){return e["property-type"]==="data-driven"||e["property-type"]==="cross-faded-data-driven"}function pR(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function cE(e){return!!e.expression&&e.expression.interpolated}function Jy(e,...r){for(let t of r)for(let a in t)e[a]=t[a];return e}function fo(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":e===null?"null":typeof e}function h2(e){return typeof e=="object"&&!!e&&!Array.isArray(e)&&Il(e)===I0}function Ofe(e){return e}function Nfe(e){switch(e.type){case"color":return Hn.parse;case"padding":return Bd.parse;case"numberArray":return Od.parse;case"colorArray":return ph.parse;default:return null}}function jfe(e){switch(e){case"exponential":return mR;case"interval":return qfe;case"categorical":return Ufe;case"identity":return Vfe;default:throw Error(`Unknown function type "${e}"`)}}function vR(e,r){let t=e.stops&&typeof e.stops[0][0]=="object",a=t||e.property!==void 0,i=t||!a,o=e.type||(cE(r)?"exponential":"interval"),s=Nfe(r);if(s&&(e=Jy({},e),e.stops&&(e.stops=e.stops.map(c=>[c[0],s(c[1])])),e.default?e.default=s(e.default):e.default=s(r.default)),e.colorSpace&&!Jce(e.colorSpace))throw Error(`Unknown color space: "${e.colorSpace}"`);let l=jfe(o),n,u;if(o==="categorical"){n=Object.create(null);for(let c of e.stops)n[c[0]]=c[1];u=typeof e.stops[0][0]}if(t){let c={},f=[];for(let p=0;pp[0]),evaluate({zoom:p},g){return mR({stops:h,base:e.base},r,p).evaluate(p,g)}}}if(i){let c=o==="exponential"?{name:"exponential",base:e.base===void 0?1:e.base}:null;return{kind:"camera",interpolationType:c,interpolationFactor:vh.interpolationFactor.bind(void 0,c),zoomStops:e.stops.map(f=>f[0]),evaluate:({zoom:f})=>l(e,r,f,n,u)}}return{kind:"source",evaluate(c,f){let h=f&&f.properties?f.properties[e.property]:void 0;return h===void 0?Qy(e.default,r.default):l(e,r,h,n,u)}}}function Qy(e,r,t){if(e!==void 0)return e;if(r!==void 0)return r;if(t!==void 0)return t}function Ufe(e,r,t,a,i){return Qy(typeof t===i?a[t]:void 0,e.default,r.default)}function qfe(e,r,t){if(fo(t)!=="number")return Qy(e.default,r.default);let a=e.stops.length;if(a===1||t<=e.stops[0][0])return e.stops[0][1];if(t>=e.stops[a-1][0])return e.stops[a-1][1];let i=r2(e.stops.map(o=>o[0]),t,"");return e.stops[i][1]}function mR(e,r,t){let a=e.base===void 0?1:e.base;if(fo(t)!=="number")return Qy(e.default,r.default);let i=e.stops.length;if(i===1||t<=e.stops[0][0])return e.stops[0][1];if(t>=e.stops[i-1][0])return e.stops[i-1][1];let o=r2(e.stops.map(c=>c[0]),t,""),s=Gfe(t,a,e.stops[o][0],e.stops[o+1][0]),l=e.stops[o][1],n=e.stops[o+1][1],u=Xs[r.type]||Ofe;return typeof l.evaluate=="function"?{evaluate(...c){let f=l.evaluate.apply(void 0,c),h=n.evaluate.apply(void 0,c);if(f!==void 0&&h!==void 0)return u(f,h,s,e.colorSpace)}}:u(l,n,s,e.colorSpace)}function Vfe(e,r,t){switch(r.type){case"color":t=Hn.parse(t);break;case"formatted":t=dp.fromString(t.toString());break;case"resolvedImage":t=jd.fromString(t.toString());break;case"padding":t=Bd.parse(t);break;case"colorArray":t=ph.parse(t);break;case"numberArray":t=Od.parse(t);break;default:fo(t)!==r.type&&(r.type!=="enum"||!r.values[t])&&(t=void 0)}return Qy(t,e.default,r.default)}function Gfe(e,r,t,a){let i=a-t,o=e-t;return i===0?0:r===1?o/i:(r**+o-1)/(r**+i-1)}function fE(e){return{result:"success",value:e}}function h1(e){return{result:"error",value:e}}function gR(e,r,t,a){return`${e}${r}: ${t}${a==null?"":` Falling back to ${String(a)}.`}`}function yR(e){if(!e)throw Error('rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".')}function d2(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="string"&&e[0]in im}function p2(e,r,t,a){yR(r);let i=new ES(im,u2,[],t?$fe(t):void 0),o=i.parse(e,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?fE(new nw(o,r,t,a)):h1(i.errors)}function Hfe(e){return e._styleExpression!==void 0}function _R(e,r,t,a){let i=p2(e,r,t,a);if(i.result==="error")return i;let o=i.value.expression,s=c2(o);if(!s&&!f1(t))return h1([new qd("","data expressions not supported")]);let l=f2(o,["zoom"]);if(!l&&!pR(t))return h1([new qd("","zoom expressions not supported")]);let n=v2(o);if(!n&&!l)return h1([new qd("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(n instanceof qd)return h1([n]);if(n instanceof vh&&!cE(t))return h1([new qd("",'"interpolate" expressions cannot be used with this property')]);if(!n)return fE(s?new D1("constant",i.value,a):new D1("source",i.value,a));let u=n instanceof vh?n.interpolation:void 0;return fE(s?new S_("camera",i.value,n.labels,u,a):new S_("composite",i.value,n.labels,u,a))}function Wfe(e,r,t,a){if(h2(e))return new SS(e,r,t);if(d2(e)){let i=_R(e,r,t,a);if(i.result==="error")throw Error(i.value.map(o=>`${o.key}: ${o.message}`).join(", "));return i.value}{let i=e;return t.type==="color"&&typeof e=="string"?i=Hn.parse(e):t.type==="padding"&&(typeof e=="number"||Array.isArray(e))?i=Bd.parse(e):t.type==="numberArray"&&(typeof e=="number"||Array.isArray(e))?i=Od.parse(e):t.type==="colorArray"&&(typeof e=="string"||Array.isArray(e))?i=ph.parse(e):t.type==="variableAnchorOffsetCollection"&&Array.isArray(e)?i=Nd.parse(e):t.type==="projectionDefinition"&&typeof e=="string"&&(i=Zp.parse(e)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>i}}}function v2(e){let r=null;if(e instanceof xS)r=v2(e.result);else if(e instanceof wS){for(let t of e.args)if(r=v2(t),r)break}else(e instanceof Q2||e instanceof vh)&&e.input instanceof R0&&e.input.name==="zoom"&&(r=e);return r instanceof qd||e.eachChild(t=>{let a=v2(t);a instanceof qd?r=a:!r&&a?r=new qd("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&a&&r!==a&&(r=new qd("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}function e_(e,r=new Set){return e instanceof aw&&r.add(e.key),e.eachChild(t=>{e_(t,r)}),r}function $fe(e){let r={color:Hh,string:Zn,number:mi,enum:Zn,boolean:mo,formatted:S1,padding:A_,numberArray:T_,colorArray:k1,projectionDefinition:b_,resolvedImage:C1,variableAnchorOffsetCollection:M_};return e.type==="array"?Uc(r[e.value]||eo,e.length):r[e.type]}function xR(e){if(e.type==="color"&&h2(e.default))return new Hn(0,0,0,0);switch(e.type){case"color":return Hn.parse(e.default)||null;case"padding":return Bd.parse(e.default)||null;case"numberArray":return Od.parse(e.default)||null;case"colorArray":return ph.parse(e.default)||null;case"variableAnchorOffsetCollection":return Nd.parse(e.default)||null;case"projectionDefinition":return Zp.parse(e.default)||null;default:return e.default===void 0?null:e.default}}function d1(e,r){let{zoom:t,heatmapDensity:a,elevation:i,lineProgress:o,isSupportedScript:s,accumulated:l}=e??{};return{zoom:t,heatmapDensity:a,elevation:i,lineProgress:o,isSupportedScript:s,accumulated:l,globalState:r}}function Yfe(e){let r=!1;for(let t of e){let a=bR(t);if(a==="expression")return"expression";a==="legacy"&&(r=!0)}return r?"legacy":"neutral"}function bR(e){if(typeof e=="boolean")return"neutral";if(!Array.isArray(e)||e.length===0)return"legacy";switch(e[0]){case"has":return e.length<2||e[1]==="$id"||e[1]==="$type"?"legacy":e.length===2?"neutral":"expression";case"in":return e.length>=3&&(typeof e[1]!="string"||Array.isArray(e[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return e.length!==3||Array.isArray(e[1])||Array.isArray(e[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return Yfe(e.slice(1));default:return"expression"}}function hE(e){return bR(e)!=="legacy"}function wR(e){return e==="$type"?["geometry-type"]:e==="$id"?["id"]:["get",e]}function Xfe(e){switch(e[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return e.length!==3||typeof e[1]!="string"?null:[e[0],wR(e[1]),e[2]];case"in":case"!in":{if(e.length<2||typeof e[1]!="string")return null;let r=["in",wR(e[1]),["literal",e.slice(2)]];return e[0]==="!in"?["!",r]:r}case"has":case"!has":{if(e.length!==2||typeof e[1]!="string"||e[1]==="$type"||e[1]==="$id")return null;let r=["has",e[1]];return e[0]==="!has"?["!",r]:r}default:return null}}function AR(e){if((e[0]==="<"||e[0]==="<="||e[0]===">"||e[0]===">=")&&e[1]==="$type")return`"$type" cannot be use with operator "${e[0]}"`;let r=Xfe(e);return r?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(e)} with ${JSON.stringify(r)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(e)} to expression syntax.`}function dE(e,r,t){let a=t[e];return Array.isArray(a)?hE(a)?pE(a,r.concat(e)):{path:r.concat(e),legacyFilter:a}:null}function pE(e,r=[]){if(!Array.isArray(e)||e.length<1)return null;switch(e[0]){case"all":case"any":case"none":for(let t=1;t"u")return;let a=t.path.map(i=>`[${i}]`).join("");console.warn(`${r}${a}: ${AR(t.legacyFilter)}`)}function t_(e,r,t){if(e==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};hE(e)?Zfe(e,r):e=m2(e);let a=p2(e,r,_B,t);if(a.result==="error")throw Error(a.value.map(i=>`${i.key}: ${i.message}`).join(", "));return{filter:(i,o,s)=>a.value.evaluate(i,o,{},s),needGeometry:TR(e),getGlobalStateRefs:()=>e_(a.value.expression)}}function Kfe(e,r){return er)}function TR(e){if(!Array.isArray(e))return!1;if(e[0]==="within"||e[0]==="distance")return!0;for(let r=1;r"||r==="<="||r===">="?vE(e[1],e[2],r):r==="any"?Jfe(e.slice(1)):r==="all"?["all"].concat(e.slice(1).map(m2)):r==="none"?["all"].concat(e.slice(1).map(m2).map(g2)):r==="in"?MR(e[1],e.slice(2)):r==="!in"?g2(MR(e[1],e.slice(2))):r==="has"?ER(e[1]):r!=="!has"||g2(ER(e[1]))}function vE(e,r,t){switch(e){case"$type":return[`filter-type-${t}`,r];case"$id":return[`filter-id-${t}`,r];default:return[`filter-${t}`,e,r]}}function Jfe(e){return["any"].concat(e.map(m2))}function MR(e,r){if(r.length===0)return!1;switch(e){case"$type":return["filter-type-in",["literal",r]];case"$id":return["filter-id-in",["literal",r]];default:return r.length>200&&!r.some(t=>typeof t!=typeof r[0])?["filter-in-large",e,["literal",r.sort(Kfe)]]:["filter-in-small",e,["literal",r]]}}function ER(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function g2(e){return["!",e]}function SR(e){let r=e.key,t=e.value;return t?[new qa(r,t,"constants have been deprecated as of v8")]:[]}function Rl(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function Yv(e){if(Array.isArray(e))return e.map(Yv);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let r={};for(let t in e)r[t]=Yv(e[t]);return r}return Rl(e)}function hh(e){let r=e.key,t=e.value,a=e.valueSpec||{},i=e.objectElementValidators||{},o=e.style,s=e.styleSpec,l=e.validateSpec,n=[],u=fo(t);if(u!=="object")return[new qa(r,t,`object expected, ${u} found`)];for(let c in t){let f=c.split(".")[0],h=Wy(a,f)||a["*"],d;if(Wy(i,f))d=i[f];else if(Wy(a,f)){if(t[c]===void 0)continue;d=l}else if(i["*"])d=i["*"];else if(a["*"])d=l;else{n.push(new qa(r,t[c],`unknown property "${c}"`));continue}n=n.concat(d({key:(r&&`${r}.`)+c,value:t[c],valueSpec:h,style:o,styleSpec:s,object:t,objectKey:c,validateSpec:l},t))}for(let c in a)i[c]||a[c].required&&a[c].default===void 0&&t[c]===void 0&&n.push(new qa(r,t,`missing required property "${c}"`));return n}function mE(e){let r=e.value,t=e.valueSpec,a=e.validateSpec,i=e.style,o=e.styleSpec,s=e.key,l=e.arrayElementValidator||a;if(fo(r)!=="array")return[new qa(s,r,`array expected, ${fo(r)} found`)];if(t.length&&r.length!==t.length)return[new qa(s,r,`array length ${t.length} expected, length ${r.length} found`)];let n={type:t.value,values:t.values};o.$version<7&&(n.function=t.function),fo(t.value)==="object"&&(n=t.value);let u=[];for(let c=0;ca.maximum?[new qa(r,t,`${t} is greater than the maximum value ${a.maximum}`)]:[]:[new qa(r,t,`number expected, ${i} found`)]}function kR(e){let r=e.valueSpec,t=Rl(e.value.type),a,i={},o,s,l=t!=="categorical"&&e.value.property===void 0,n=!l,u=fo(e.value.stops)==="array"&&fo(e.value.stops[0])==="array"&&fo(e.value.stops[0][0])==="object",c=hh({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:f,default:p}});return t==="identity"&&l&&c.push(new qa(e.key,e.value,'missing required property "property"')),t!=="identity"&&!e.value.stops&&c.push(new qa(e.key,e.value,'missing required property "stops"')),t==="exponential"&&e.valueSpec.expression&&!cE(e.valueSpec)&&c.push(new qa(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(n&&!f1(e.valueSpec)?c.push(new qa(e.key,e.value,"property functions not supported")):l&&!pR(e.valueSpec)&&c.push(new qa(e.key,e.value,"zoom functions not supported"))),(t==="categorical"||u)&&e.value.property===void 0&&c.push(new qa(e.key,e.value,'"property" property is required')),c;function f(g){if(t==="identity")return[new qa(g.key,g.value,'identity function may not have a "stops" property')];let m=[],y=g.value;return m=m.concat(mE({key:g.key,value:y,valueSpec:g.valueSpec,validateSpec:g.validateSpec,style:g.style,styleSpec:g.styleSpec,arrayElementValidator:h})),fo(y)==="array"&&y.length===0&&m.push(new qa(g.key,y,"array must have at least one stop")),m}function h(g){let m=[],y=g.value,_=g.key;if(fo(y)!=="array")return[new qa(_,y,`array expected, ${fo(y)} found`)];if(y.length!==2)return[new qa(_,y,`array length 2 expected, length ${y.length} found`)];if(u){if(fo(y[0])!=="object")return[new qa(_,y,`object expected, ${fo(y[0])} found`)];if(y[0].zoom===void 0)return[new qa(_,y,"object stop key must have zoom")];if(y[0].value===void 0)return[new qa(_,y,"object stop key must have value")];if(s&&s>Rl(y[0].zoom))return[new qa(_,y[0].zoom,"stop zoom values must appear in ascending order")];Rl(y[0].zoom)!==s&&(s=Rl(y[0].zoom),o=void 0,i={}),m=m.concat(hh({key:`${_}[0]`,value:y[0],valueSpec:{zoom:{}},validateSpec:g.validateSpec,style:g.style,styleSpec:g.styleSpec,objectElementValidators:{zoom:y2,value:d}}))}else m=m.concat(d({key:`${_}[0]`,value:y[0],valueSpec:{},validateSpec:g.validateSpec,style:g.style,styleSpec:g.styleSpec},y));return d2(Yv(y[1]))?m.concat([new qa(`${_}[1]`,y[1],"expressions are not allowed in function stops.")]):m.concat(g.validateSpec({key:`${_}[1]`,value:y[1],valueSpec:r,validateSpec:g.validateSpec,style:g.style,styleSpec:g.styleSpec}))}function d(g,m){let y=fo(g.value),_=Rl(g.value),v=g.value===null?m:g.value;if(!a)a=y;else if(y!==a)return[new qa(g.key,v,`${y} stop domain type must match previous stop domain type ${a}`)];if(y!=="number"&&y!=="string"&&y!=="boolean")return[new qa(g.key,v,"stop domain value must be a number, string, or boolean")];if(y!=="number"&&t!=="categorical"){let x=`number expected, ${y} found`;return f1(r)&&t===void 0&&(x+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new qa(g.key,v,x)]}return t==="categorical"&&y==="number"&&(!isFinite(_)||Math.floor(_)!==_)?[new qa(g.key,v,`integer expected, found ${_}`)]:t!=="categorical"&&y==="number"&&o!==void 0&&_new qa(`${e.key}${a.key}`,e.value,a.message));let t=r.value.expression||r.value._styleExpression.expression;if(e.expressionContext==="property"&&e.propertyKey==="text-font"&&!t.outputDefined())return[new qa(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if(e.expressionContext==="property"&&e.propertyType==="layout"&&!Ky(t))return[new qa(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if(e.expressionContext==="filter"&&!Ky(t))return[new qa(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&e.expressionContext.indexOf("cluster")===0){if(!f2(t,["zoom","feature-state"]))return[new qa(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(e.expressionContext==="cluster-initial"&&!c2(t))return[new qa(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Qfe(e){let r=e.value,t=e.key,a=fo(r);return a==="boolean"?[]:[new qa(t,r,`boolean expected, ${a} found`)]}function gE(e){let r=e.key,t=e.value,a=fo(t);return a==="string"?Hn.parse(String(t))?[]:[new qa(r,t,`color expected, "${t}" found`)]:[new qa(r,t,`color expected, ${a} found`)]}function r_(e){let r=e.key,t=e.value,a=e.valueSpec,i=[];return Array.isArray(a.values)?a.values.indexOf(Rl(t))===-1&&i.push(new qa(r,t,`expected one of [${a.values.join(", ")}], ${JSON.stringify(t)} found`)):Object.keys(a.values).indexOf(Rl(t))===-1&&i.push(new qa(r,t,`expected one of [${Object.keys(a.values).join(", ")}], ${JSON.stringify(t)} found`)),i}function ehe(e,r){let t=e;for(let a of r)t=t[a];return t}function the(e,r){let t=pE(r);return t?[new qa(`${e.key}${t.path.map(a=>`[${a}]`).join("")}`,ehe(e.value,t.path),AR(t.legacyFilter),null,"warning")]:[]}function yE(e){let r=Yv(e.value);return hE(r)?[...the(e,r),...p1(Jy({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:CR(e)}function CR(e){let r=e.value,t=e.key;if(fo(r)!=="array")return[new qa(t,r,`array expected, ${fo(r)} found`)];let a=e.styleSpec,i,o=[];if(r.length<1)return[new qa(t,r,"filter array must have at least 1 element")];switch(o=o.concat(r_({key:`${t}[0]`,value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Rl(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&Rl(r[1])==="$type"&&o.push(new qa(t,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":r.length!==3&&o.push(new qa(t,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&(i=fo(r[1]),i!=="string"&&o.push(new qa(`${t}[1]`,r[1],`string expected, ${i} found`)));for(let s=2;s{f in i&&a.push(new qa(o,i[f],`"${f}" is prohibited for ref layers`))});let c;s.layers.forEach(f=>{Rl(f.id)===u&&(c=f)}),c?c.ref?a.push(new qa(o,i.ref,"ref cannot reference another ref layer")):n=Rl(c.type):a.push(new qa(o,i.ref,`ref layer "${u}" not found`))}else if(n!=="background")if(!i.source)a.push(new qa(o,i,'missing required property "source"'));else{let c=s.sources&&s.sources[i.source],f=c&&Rl(c.type);c?f==="vector"&&n==="raster"?a.push(new qa(o,i.source,`layer "${i.id}" requires a raster source`)):f!=="raster-dem"&&n==="hillshade"||f!=="raster-dem"&&n==="color-relief"?a.push(new qa(o,i.source,`layer "${i.id}" requires a raster-dem source`)):f==="raster"&&n!=="raster"?a.push(new qa(o,i.source,`layer "${i.id}" requires a vector source`)):f==="vector"&&!i["source-layer"]?a.push(new qa(o,i,`layer "${i.id}" must specify a "source-layer"`)):f==="raster-dem"&&n!=="hillshade"&&n!=="color-relief"?a.push(new qa(o,i.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):n==="line"&&i.paint&&i.paint["line-gradient"]&&(f!=="geojson"||!c.lineMetrics)&&a.push(new qa(o,i,`layer "${i.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):a.push(new qa(o,i.source,`source "${i.source}" not found`))}return n==="raster"&&((r=i.paint)!=null&&r.resampling)&&((t=i.paint)!=null&&t["raster-resampling"])&&a.push(new qa(o,i.paint,`layer "${i.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),a=a.concat(hh({key:o,value:i,valueSpec:l.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*"(){return[]},type(){return e.validateSpec({key:`${o}.type`,value:i.type,valueSpec:l.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:i,objectKey:"type"})},filter:yE,layout(c){return hh({layer:i,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(f){return FR(Jy({layerType:n},f))}}})},paint(c){return hh({layer:i,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(f){return LR(Jy({layerType:n},f))}}})}}})),a}function D0(e){let r=e.value,t=e.key,a=fo(r);return a==="string"?[]:[new qa(t,r,`string expected, ${a} found`)]}function rhe(e){var r;let t=(r=e.sourceName)!=null?r:"",a=e.value,i=e.styleSpec,o=i.source_raster_dem,s=e.style,l=[],n=fo(a);if(a===void 0)return l;if(n!=="object")return l.push(new qa("source_raster_dem",a,`object expected, ${n} found`)),l;let u=Rl(a.encoding)==="custom",c=["redFactor","greenFactor","blueFactor","baseShift"],f=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let h in a)!u&&c.includes(h)?l.push(new qa(h,a[h],`In "${t}": "${h}" is only valid when "encoding" is set to "custom". ${f} encoding found`)):o[h]?l=l.concat(e.validateSpec({key:h,value:a[h],valueSpec:o[h],validateSpec:e.validateSpec,style:s,styleSpec:i})):l.push(new qa(h,a[h],`unknown property "${h}"`));return l}function IR(e){let r=e.value,t=e.key,a=e.styleSpec,i=e.style,o=e.validateSpec;if(!r.type)return[new qa(t,r,'"type" is required')];let s=Rl(r.type),l;switch(s){case"vector":case"raster":return l=hh({key:t,value:r,valueSpec:a[`source_${s.replace("-","_")}`],style:e.style,styleSpec:a,objectElementValidators:kS,validateSpec:o}),l;case"raster-dem":return l=rhe({sourceName:t,value:r,style:e.style,styleSpec:a,validateSpec:o}),l;case"geojson":if(l=hh({key:t,value:r,valueSpec:a.source_geojson,style:i,styleSpec:a,validateSpec:o,objectElementValidators:kS}),r.cluster)for(let n in r.clusterProperties){let[u,c]=r.clusterProperties[n],f=typeof u=="string"?[u,["accumulated"],["get",n]]:u;l.push(...p1({key:`${t}.${n}.map`,value:c,validateSpec:o,expressionContext:"cluster-map"})),l.push(...p1({key:`${t}.${n}.reduce`,value:f,validateSpec:o,expressionContext:"cluster-reduce"}))}return l;case"video":return hh({key:t,value:r,valueSpec:a.source_video,style:i,validateSpec:o,styleSpec:a});case"image":return hh({key:t,value:r,valueSpec:a.source_image,style:i,validateSpec:o,styleSpec:a});case"canvas":return[new qa(t,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return r_({key:`${t}.type`,value:r.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:o,styleSpec:a})}}function ahe({key:e,value:r}){if(fo(r)==="string")return D0({key:e,value:r});{let t=[];for(let a in r)t.push(...D0({key:`${e}.${a}`,value:r[a]}));return t}}function RR(e){let r=e.value,t=e.styleSpec,a=t.light,i=e.style,o=[],s=fo(r);if(r===void 0)return o;if(s!=="object")return o=o.concat([new qa("light",r,`object expected, ${s} found`)]),o;for(let l in r){let n=l.match(iw);o=n&&a[n[1]]&&a[n[1]].transition?o.concat(e.validateSpec({key:l,value:r[l],valueSpec:t.transition,validateSpec:e.validateSpec,style:i,styleSpec:t})):a[l]?o.concat(e.validateSpec({key:l,value:r[l],valueSpec:a[l],validateSpec:e.validateSpec,style:i,styleSpec:t})):o.concat([new qa(l,r[l],`unknown property "${l}"`)])}return o}function zR(e){let r=e.value,t=e.styleSpec,a=t.sky,i=e.style,o=fo(r);if(r===void 0)return[];if(o!=="object")return[new qa("sky",r,`object expected, ${o} found`)];let s=[];for(let l in r){let n=l.match(iw);s=n&&a[n[1]]&&a[n[1]].transition?s.concat(e.validateSpec({key:l,value:r[l],valueSpec:t.transition,style:i,styleSpec:t})):a[l]?s.concat(e.validateSpec({key:l,value:r[l],valueSpec:a[l],style:i,styleSpec:t})):s.concat([new qa(l,r[l],`unknown property "${l}"`)])}return s}function BR(e){let r=e.value,t=e.styleSpec,a=t.terrain,i=e.style,o=[],s=fo(r);if(r===void 0)return o;if(s!=="object")return o=o.concat([new qa("terrain",r,`object expected, ${s} found`)]),o;for(let l in r)o=a[l]?o.concat(e.validateSpec({key:l,value:r[l],valueSpec:a[l],validateSpec:e.validateSpec,style:i,styleSpec:t})):o.concat([new qa(l,r[l],`unknown property "${l}"`)]);return o}function ihe(e){return D0(e).length===0?[]:p1(e)}function nhe(e){return D0(e).length===0?[]:p1(e)}function ohe(e){let r=e.key,t=e.value;if(fo(t)==="array"){if(t.length<1||t.length>4)return[new qa(r,t,`padding requires 1 to 4 values; ${t.length} values found`)];let a={type:"number"},i=[];for(let o=0;o[new qa(e,r,'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"')],i=t.match(xB);if(!i)return a();let[,o,s,l]=i;if(l!==void 0)return l.length>6?a():[];let n=parseInt(o,16),u=s===void 0?n:parseInt(s,16);return n>CS||u>CS?[new qa(e,r,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:n>u?[new qa(e,r,`unicode range start must not be greater than its end, but ${t} is`)]:[]}function jR(e){var r,t;let a=(r=e.key)!=null?r:"font-faces",i=e.value,o=e.validateSpec,s=(t=e.styleSpec)!=null?t:hS,l=e.style;if(!_E(i))return[new qa(a,i,`object expected, ${fo(i)} found`)];let n=[];for(let u in i){let c=i[u],f=fo(c);if(f==="string")n.push(...D0({key:`${a}.${u}`,value:c}));else if(f==="array"){let h={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[d,p]of c.entries()){let g=`${a}.${u}[${d}]`;n.push(...hh({key:g,value:p,valueSpec:h,styleSpec:s,style:l,validateSpec:o}));let m=_E(p)?p["unicode-range"]:void 0;if(fo(m)==="array")for(let[y,_]of m.entries())n.push(...phe(`${g}.unicode-range[${y}]`,_))}}else n.push(new qa(`${a}.${u}`,c,`string or array expected, ${f} found`))}return n}function a_(e){let r=e.value,t=e.valueSpec,a=e.styleSpec;return e.validateSpec=a_,t.expression&&h2(Rl(r))?kR(e):t.expression&&d2(Yv(r))?p1(e):t.type&&DS[t.type]?DS[t.type](e):hh(Jy({},e,{valueSpec:t.type?a[t.type]:t}))}function UR(e){let r=e.value,t=e.key,a=D0(e);return a.length||(r.indexOf("{fontstack}")===-1&&a.push(new qa(t,r,'"glyphs" url must include a "{fontstack}" token')),r.indexOf("{range}")===-1&&a.push(new qa(t,r,'"glyphs" url must include a "{range}" token'))),a}function dh(e,r=ta){let t=[];return t=t.concat(a_({key:"",value:e,valueSpec:r.$root,styleSpec:r,style:e,validateSpec:a_,objectElementValidators:{glyphs:UR,"*"(){return[]}}})),e.constants&&(t=t.concat(SR({key:"constants",value:e.constants,style:e,styleSpec:r,validateSpec:a_}))),qR(t)}function Vh(e){return function(r){return e(Object.assign({},r,{validateSpec:a_}))}}function qR(e){return[].concat(e).sort((r,t)=>r.line-t.line)}function Gh(e){return function(...r){return qR(e.apply(this,r))}}function vhe(e,r,t){return new wB(e,r,t)}function mhe(e){var r;return Object.entries((r=e.sources)!=null?r:{}).filter(([,t])=>!LS.has(t.type)).map(([t])=>`sources.${t}`)}function VR(e,r){let t=mhe(r);return xE(e,Af(r).filter(({message:a})=>!t.some(i=>a.startsWith(`${i}:`)||a.startsWith(`${i}.`))))}function xE(e,r){let t=!1;for(let a of r){if(a.severity==="warning"){vo(a.message);continue}e.fire(new mn(Error(a.message))),t=!0}return t}function i_(e,r,t,a){return a?.validate!==!1&&xE(e,r(ja({styleSpec:ta},t)))}function Ri(e,r,t={}){if(vp[e])throw Error(`${e} is already registered.`);Object.defineProperty(r,"_classRegistryKey",{value:e,writeable:!1}),vp[e]={klass:r,omit:t.omit||[],shallow:t.shallow||[]}}function GR(e){var r;return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||((r=e.constructor)==null?void 0:r.name)==="ArrayBuffer")}function bE(e){let r=e.constructor;return e.$name||r._classRegistryKey}function ghe(e){if(typeof e!="object"||!e)return!1;let r=bE(e);return r&&r!=="Object"}function HR(e){return!ghe(e)&&(e==null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||GR(e)||Gv(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function n_(e,r){if(HR(e))return(GR(e)||Gv(e))&&r&&r.push(e),ArrayBuffer.isView(e)&&r&&r.push(e.buffer),e instanceof ImageData&&r&&r.push(e.data.buffer),e;if(Array.isArray(e)){let o=[];for(let s of e)o.push(n_(s,r));return o}if(typeof e!="object")throw Error(`can't serialize object of type ${typeof e}`);let t=bE(e);if(!t)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!vp[t])throw Error(`${t} is not registered.`);let{klass:a}=vp[t],i=a.serialize?a.serialize(e,r):{};if(a.serialize){if(i===r?.[r.length-1])throw Error("statically serialized object won't survive transfer of $name property")}else{for(let o in e){if(!e.hasOwnProperty(o)||vp[t].omit.includes(o))continue;let s=e[o];s!==void 0&&(i[o]=vp[t].shallow.includes(o)?s:n_(s,r))}e instanceof Error&&(i.message=e.message)}if(i.$name)throw Error("$name property is reserved for worker serialization logic.");return t!=="Object"&&(i.$name=t),i}function o_(e){if(HR(e))return e;if(Array.isArray(e))return e.map(o_);if(typeof e!="object")throw Error(`can't deserialize object of type ${typeof e}`);let r=bE(e)||"Object";if(!vp[r])throw Error(`can't deserialize unregistered class ${r}`);let{klass:t}=vp[r];if(!t)throw Error(`can't deserialize unregistered class ${r}`);if(t.deserialize)return t.deserialize(e);let a=Object.create(t.prototype);for(let i of Object.keys(e)){if(i==="$name")continue;let o=e[i];a[i]=vp[r].shallow.includes(i)?o:o_(o)}return a}function WR(e){if(Array.isArray(e))return e.length;let r=e?.values;return Array.isArray(r)?r.length:void 0}function $R(e,r){let t=WR(e),a=WR(r);return t!==void 0&&a!==void 0&&t!==a}function pl(e,r=1){let t=0,a=0;return{members:e.map(i=>{let o=yhe(i.type),s=t=YR(t,Math.max(r,o)),l=i.components||1;return a=Math.max(a,o),t+=o*l,{name:i.name,type:i.type,components:l,offset:s}}),size:YR(t,Math.max(a,r)),alignment:r}}function yhe(e){return kB[e].BYTES_PER_ELEMENT}function YR(e,r){return Math.ceil(e/r)*r}function XR(e,r){return e=Gn(Math.floor(e),0,255),r=Gn(Math.floor(r),0,255),256*e+r}function ZR(e){let r=+e;return!isNaN(r)&&r<=9007199254740991?r:(0,Pw.default)(String(e))}function wE(e,r,t,a){for(;t>1],o=t-1,s=a+1;for(;;){do o++;while(e[o]i);if(o>=s)break;_2(e,o,s),_2(r,3*o,3*s),_2(r,3*o+1,3*s+1),_2(r,3*o+2,3*s+2)}s-ti.x+1||si.y+1)&&vo("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return t}function Zv(e,r){return{type:e.type,id:e.id,properties:e.properties,geometry:r?Xv(e):[]}}function bhe(e,r,t,a,i){e.emplaceBack(ak+r*8+a,ak+t*8+i)}function JR(e,r){for(let t of e)if(v1(r,t))return!0;for(let t of r)if(v1(e,t))return!0;return TE(e,r)}function x2(e,r,t){return v1(e,r)?!0:ME(r,e,t)}function QR(e,r){if(e.length===1)return t5(r,e[0]);for(let t of r)for(let a of t)if(v1(e,a))return!0;for(let t of e)if(t5(r,t))return!0;for(let t of r)if(TE(e,t))return!0;return!1}function whe(e,r,t){for(let a of r){if(e.length>=3){for(let i of a)if(v1(e,i))return!0}if(Ahe(e,a,t))return!0}return!1}function Ahe(e,r,t){if(e.length>1){if(TE(e,r))return!0;for(let a of r)if(ME(a,e,t))return!0}for(let a of e)if(ME(a,r,t))return!0;return!1}function TE(e,r){if(e.length===0||r.length===0)return!1;for(let t=0;t1?e.distSqr(t):e.distSqr(t.sub(r)._mult(i)._add(r))}function t5(e,r){let t=!1,a,i,o;for(let s of e){a=s;for(let l=0,n=a.length-1;lr.y!=o.y>r.y&&r.x<(o.x-i.x)*(r.y-i.y)/(o.y-i.y)+i.x&&(t=!t)}return t}function v1(e,r){let t=!1;for(let a=0,i=e.length-1;ar.y!=s.y>r.y&&r.x<(s.x-o.x)*(r.y-o.y)/(s.y-o.y)+o.x&&(t=!t)}return t}function Mhe(e,r,t,a,i){for(let s of e)if(r<=s.x&&t<=s.y&&a>=s.x&&i>=s.y)return!0;let o=[new zr(r,t),new zr(r,i),new zr(a,i),new zr(a,t)];if(e.length>2){for(let s of o)if(v1(e,s))return!0}for(let s=0;si.x&&r.x>i.x||e.yi.y&&r.y>i.y)return!1;let o=E0(e,r,t[0]);return o!==E0(e,r,t[1])||o!==E0(e,r,t[2])||o!==E0(e,r,t[3])}function m1(e,r,t){let a=r.paint.get(e).value;return a.kind==="constant"?a.value:t.programConfigurations.get(r.id).getMaxValue(e)}function b2(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function w2(e,r,t,a,i){if(!r[0]&&!r[1])return e;let o=zr.convert(r)._mult(i);t==="viewport"&&o._rotate(-a);let s=[];for(let l of e)s.push(l.sub(o));return s}function She(e){let r=[];for(let t=0;tEE(i,r,t,a))}function SE(e,{width:r,height:t},a,i){if(!i)i=new Uint8Array(r*t*a);else if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==r*t*a)throw RangeError(`mismatched image size. expected: ${i.length} but got: ${r*t*a}`);return e.width=r,e.height=t,e.data=i,e}function a5(e,{width:r,height:t},a){if(r===e.width&&t===e.height)return;let i=SE({},{width:r,height:t},a);kE(e,i,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,r),height:Math.min(e.height,t)},a),e.width=r,e.height=t,e.data=i.data}function kE(e,r,t,a,i,o){if(i.width===0||i.height===0)return r;if(i.width>e.width||i.height>e.height||t.x>e.width-i.width||t.y>e.height-i.height)throw RangeError("out of range source coordinates for image copy");if(i.width>r.width||i.height>r.height||a.x>r.width-i.width||a.y>r.height-i.height)throw RangeError("out of range destination coordinates for image copy");let s=e.data,l=r.data;if(s===l)throw Error("srcData equals dstData, so image is already copied");for(let n=0;n{r[e.evaluationKey]=n;let u=e.expression.evaluate(r);i.setPixel(s/4/t,l/4,u)};if(e.clips)for(let s=0,l=0;s80*t){l=e[0],n=e[1];let c=l,f=n;for(let h=t;hc&&(c=d),p>f&&(f=p)}u=Math.max(c-l,f-n),u=u===0?0:32767/u}return LE(o,s,l,n,u),s}function o5(e,r,t,a,i){let o=null;if(i===Jhe(e,r,t,a)>0)for(let s=r;s=r;s-=a)o=h5(s/a|0,e[s],e[s+1],o);return o&&s_(o,o.next)&&(u_(o),o=o.next),o}function Kv(e,r=e){let t=r===e,a=e,i;do i=!1,a!==a.next&&(O1.size===0||!O1.has(a))&&(s_(a,a.next)||cu(a.prev,a,a.next)===0)?((t||a===r)&&(r=a.prev),Ow=!0,u_(a),a=a.prev,i=!0):(t||a!==r)&&(a=a.next,i=!t);while(i||a!==r);return r}function LE(e,r,t,a,i){i&&Whe(e,t,a,i);let o=e,s=!1;for(;e.prev!==e.next;){let l=e.prev,n=e.next;if(cu(l,e,n)<0&&(i?zhe(e,t,a,i):Rhe(e))){r.push(l.i,e.i,n.i),u_(e),e=n,o=n;continue}if(e=n,e===o){if(Ow=!1,e=Kv(e),Ow){o=e;continue}if(!s){e=Bhe(e,r),o=e,s=!0;continue}Ohe(e,r,t,a,i);break}}}function Rhe(e){let r=e.prev,t=e,a=e.next,i=r.x,o=t.x,s=a.x,l=r.y,n=t.y,u=a.y,c=Math.min(i,o,s),f=Math.min(l,n,u),h=Math.max(i,o,s),d=Math.max(l,n,u),p=a.next;for(;p!==r;){if(p.x>=c&&p.x<=h&&p.y>=f&&p.y<=d&&(i!==p.x||l!==p.y)&&E2(i,l,o,n,s,u,p.x,p.y)&&cu(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function zhe(e,r,t,a){let i=e.prev,o=e,s=e.next,l=i.x,n=o.x,u=s.x,c=i.y,f=o.y,h=s.y,d=Math.min(l,n,u),p=Math.min(c,f,h),g=Math.max(l,n,u),m=Math.max(c,f,h),y=FE(d,p,r,t,a),_=FE(g,m,r,t,a),v=e.prevZ;for(;v&&v.z>=y;){if(v.x>=d&&v.x<=g&&v.y>=p&&v.y<=m&&v!==s&&(l!==v.x||c!==v.y)&&E2(l,c,n,f,u,h,v.x,v.y)&&cu(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let x=e.nextZ;for(;x&&x.z<=_;){if(x.x>=d&&x.x<=g&&x.y>=p&&x.y<=m&&x!==s&&(l!==x.x||c!==x.y)&&E2(l,c,n,f,u,h,x.x,x.y)&&cu(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Bhe(e,r){let t=e,a=!1;do{let i=t.prev,o=t.next.next;c5(i,t,t.next,o,!1)&&l_(i,o)&&l_(o,i)&&(r.push(i.i,t.i,o.i),u_(t),u_(t.next),t=e=o,a=!0),t=t.next}while(t!==e);return a?Kv(t):t}function Ohe(e,r,t,a,i){let o=e;do{let s=o.next.next;for(;s!==o.prev;){if(o.i!==s.i&&Xhe(o,s)){let l=f5(o,s);o=Kv(o,o.next),l=Kv(l,l.next),LE(o,r,t,a,i),LE(l,r,t,a,i);return}s=s.next}o=o.next}while(o!==e)}function Nhe(e,r,t,a){let i=[];for(let o=0,s=r.length;os&&(s=t.x),t.yl&&(l=t.y),c.xs&&(s=c.x),c.yl&&(l=c.y),t=c}while(++n<16&&t!==r);Uw[a]=t;let u=a*4;El[u]=i,El[u+1]=o,El[u+2]=s,El[u+3]=l}while(t!==r)}function Vhe(e,r){let t=e.z*4;r.xEl[t+2]&&(El[t+2]=r.x),r.y>El[t+3]&&(El[t+3]=r.y)}function l5(e){let r=Uw[e];for(;r.prev.next!==r;)r=r.next;return Uw[e]=r,r}function u5(e){let r=jw[e];for(;r.prev.next!==r;)r=r.next;return jw[e]=r,r}function Ghe(e,r){let t=r,a=e.x,i=e.y,o=-1/0,s;if(s_(e,t))return t;for(let h=0,d=0;hEl[d+3]||El[d]>a||El[d+2]<=o)continue;let p=l5(h);t=u5(h);do{if(t.prev.next===t){if(s_(e,t.next))return t.next;if(i<=t.y&&i>=t.next.y&&t.next.y!==t.y){let g=t.x+(i-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(g<=a&&g>o&&(o=g,s=t.xa||El[d+3]c)continue;let p=l5(h);t=u5(h);do{if(t.prev.next===t&&a>=t.x&&t.x>=l&&a!==t.x&&E2(ia)&&(gs.x||t.x===s.x&&Hhe(s,t)))&&(s=t,f=g)}t=t.next}while(t!==p)}return s}function Hhe(e,r){return cu(e.prev,e,r.prev)<0&&cu(r.next,e,e.next)<0}function Whe(e,r,t,a){let i=e,o=0;do i.z=FE(i.x,i.y,r,t,a),gh[o++]=i,i=i.next;while(i!==e);$he(o);let s=null;for(let l=0;l=0&&gh[i].z>a;)gh[i+1]=gh[i],i--;gh[i+1]=t}return}O0.length>>o&255]++;let s=0;for(let l=0;l<256;l++){let n=U1[l];U1[l]=s,s+=n}for(let l=0;l>>o&255]++;a[u]=r[l],i[u]=n}}function FE(e,r,t,a,i){return e=(e-t)*i|0,r=(r-a)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e|r<<1}function Yhe(e){let r=e,t=e;do(r.x=(e-s)*(o-l)&&(e-s)*(a-l)>=(t-s)*(r-l)&&(t-s)*(o-l)>=(i-s)*(a-l)}function Xhe(e,r){let t=s_(e,r)&&cu(e.prev,e,e.next)>0&&cu(r.prev,r,r.next)>0;return e.next.i!==r.i&&(t||l_(e,r)&&l_(r,e)&&(cu(e.prev,e,r.prev)!==0||cu(e,r.prev,r)!==0))&&!Zhe(e,r)&&(t||Khe(e,r))}function cu(e,r,t){return(r.y-e.y)*(t.x-r.x)-(r.x-e.x)*(t.y-r.y)}function s_(e,r){return e.x===r.x&&e.y===r.y}function c5(e,r,t,a,i=!0){let o=cu(e,r,t),s=cu(e,r,a),l=cu(t,a,e),n=cu(t,a,r);return(o>0&&s<0||o<0&&s>0)&&(l>0&&n<0||l<0&&n>0)?!0:i?!!(o===0&&S2(e,t,r)||s===0&&S2(e,a,r)||l===0&&S2(t,e,a)||n===0&&S2(t,r,a)):!1}function S2(e,r,t){return r.x<=Math.max(e.x,t.x)&&r.x>=Math.min(e.x,t.x)&&r.y<=Math.max(e.y,t.y)&&r.y>=Math.min(e.y,t.y)}function Zhe(e,r){let t=Math.min(e.x,r.x),a=Math.max(e.x,r.x),i=Math.min(e.y,r.y),o=Math.max(e.y,r.y),s=e;do{let l=s.next;if(s.x>a&&l.x>a||s.xo&&l.y>o||s.y=0&&cu(e,e.prev,r)>=0:cu(e,r,e.prev)<0||cu(e,e.next,r)<0}function Khe(e,r){let t=e,a=!1,i=(e.x+r.x)/2,o=(e.y+r.y)/2;do{let s=t.next;t.y>o!=s.y>o&&i<(s.x-t.x)*(o-t.y)/(s.y-t.y)+t.x&&(a=!a),t=s}while(t!==e);return a}function f5(e,r){let t=PE(e.i,e.x,e.y),a=PE(r.i,r.x,r.y),i=e.next,o=r.prev;return e.next=r,r.prev=e,t.next=i,i.prev=t,a.next=t,t.prev=a,o.next=a,a.prev=o,a}function h5(e,r,t,a){let i=PE(e,r,t);return a?(i.next=a.next,i.prev=a,a.next.prev=i,a.next=i):(i.prev=i,i.next=i),i}function u_(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),Nw&&Vhe(e.prev,e.next)}function PE(e,r,t){return{i:e,x:r,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function Jhe(e,r,t,a){let i=0;for(let o=r,s=t-a;o0?(Math.floor(C/s)+1)*s:(Math.ceil(C/s)-1)*s,b=x>0?(Math.floor(w/s)+1)*s:(Math.ceil(w/s)-1)*s,S=Math.abs(C-T),A=Math.abs(w-b),F=Math.abs(C-g),D=Math.abs(w-m),R=y?S/E:1/0,P=_?A/M:1/0;if((F<=S||!y)&&(D<=A||!_))break;if(R0?(t.push(i),t.push(s),t.push(o)):(t.push(i),t.push(o),t.push(s))}return t}function tde(e,r,t){if(r.length===0)throw Error("Subdivision vertex ring is empty.");let a=0,i=e[r[0]*2];for(let n=1;n=0?s-1:o-1,u=(l+1)%o,c=e[r[n]*2],f=e[r[n]*2+1],h=e[r[u]*2],d=e[r[u]*2+1],p=e[r[s]*2],g=e[r[s]*2+1],m=e[r[l]*2],y=e[r[l]*2+1],_=!1;if(ch)_=!1;else{let v=y-g,x=-(m-p),E=g((h-p)*v+(d-g)*x)*E&&(_=!0)}if(_){let v=r[n],x=r[s],E=r[l];v!==x&&v!==E&&x!==E&&t.push(E,x,v),s--,s<0&&(s=o-1)}else{let v=r[u],x=r[s],E=r[l];v!==x&&v!==E&&x!==E&&t.push(E,x,v),l++,l>=o&&(l=0)}if(n===u)break}}function p5(e,r,t,a,i,o,s,l,n){let u=i.length/2,c=s&&l&&n;if(uZs.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(r,t),n=l.count,g=!0,m=!0,y=!0,c=0);let v=c_(s,a,o,l,h,g,u),x=c_(s,a,o,l,d,m,u),E=c_(s,a,o,l,p,y,u);t.emplaceBack(c+v-n,c+x-n,c+E-n),u.primitiveLength++}}function ade(e,r,t,a,i,o){let s=[];for(let f=0;fZs.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(r,t),n=l.count,g=!0,m=!0,c=0);let _=c_(s,a,o,l,d,g,u),v=c_(s,a,o,l,p,m,u);t.emplaceBack(c+_-n,c+v-n),u.primitiveLength++}}function IE(e,r){return e.x===r.x&&(e.x<0||e.x>8192)||e.y===r.y&&(e.y<0||e.y>8192)}function v5(e){return e.every(r=>r.x<0)||e.every(r=>r.x>8192)||e.every(r=>r.y<0)||e.every(r=>r.y>8192)}function m5(e){let r=e.length;if(r<=1)return[e];let t=[],a,i;for(let o=0;ocde(i,a))}function ude(e,r){let t=sde(xa/2,xa/2,r),a=$o.fromLngLat(t).meterInMercatorCoordinateUnits(),i=(1<1&&r[0].x===r[r.length-1].x&&r[0].y===r[r.length-1].y;)r.pop();return r}function hde(e,r,t,a,i){let o=r.sub(t),s=a.sub(t),l=o.mag(),n=s.mag();if(l<1e-6||n<1e-6){e.push(t.clone());return}o._div(l),s._div(n);let u=o.x*s.x+o.y*s.y;if(Math.abs(u)>Math.cos(5*Math.PI/180)){e.push(t.clone());return}let c=.2,f=Math.min(i,l*c,n*c),h=t.add(o.mult(f)),d=t.add(s.mult(f)),p=Math.sqrt((1+u)/2),g=t.add(o.add(s)._unit()._mult(f/p)),m=h.sub(g).angleWith(d.sub(g)),y=Math.max(2,Math.ceil(Math.abs(m)/(Math.PI/6)-1e-6));for(let _=0;_<=y;_++)e.push(h.rotateAround(_/y*m,g))}function p_(e,r,t,a,i,o,s,l){e.emplaceBack(r,t,Math.floor(a*Hw)*2+s,i*Hw*2,o*Hw*2,Math.round(l))}function dde(e,r){for(let t=0;t0?r+2*e:e}function gde(e){return/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u070D\u070F-\u074A\u074D-\u077F\u07C0-\u07FA\u07FD-\u07FF\u0840-\u085B\u085E\u0860-\u086A\u0870-\u0891\u0897-\u08E1\u08E3-\u08FF\u1800\u1801\u1804\u1806-\u1819\u1820-\u1878\u1880-\u18AA\uA840-\uA877\uFB50-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]|\uD803[\uDD00-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDEC2-\uDEC7\uDED0-\uDED8\uDEFA-\uDEFF\uDF30-\uDF59\uDF70-\uDF89\uDFB0-\uDFCB]|\uD805[\uDE60-\uDE6C]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]|\uD83A[\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/gim.test(String.fromCodePoint(e))}function yde(e){return/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u0891\u0897-\u08E1\u08E3-\u08FF\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC57-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD1F-\uDD39\uDD3F-\uDD59\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58\uDE60-\uDE9F\uDEC0-\uDEE6\uDEEB-\uDEF6\uDF00-\uDF35\uDF39-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDD40-\uDD65\uDD69-\uDD85\uDD8E\uDD8F\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB-\uDEAD\uDEB0\uDEB1\uDEC2-\uDEC7\uDED0-\uDED8\uDEFA-\uDF27\uDF30-\uDF59\uDF70-\uDF89\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/gim.test(String.fromCodePoint(e))}function _de(e){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function xde(e){return/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function k2(e){return/[\u02EA\u02EB\u1100-\u11FF\u1401-\u167F\u18B0-\u18FF\u2065\u20DD-\u20E0\u20E2-\u20E4\u2B97\u2BF0-\u2BFF\u2E50\u2E51\u2E80-\u3007\u3012\u3013\u3020-\u302F\u3031-\u30FB\u30FD-\uA4CF\uA960-\uA97F\uAC00-\uD7FF\uF900-\uFAFF\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7\uFFF0-\uFFF8]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|[\uD80C-\uD810\uD81C-\uD822\uD83C\uD83D\uD840-\uD87E\uD880-\uD8BE][\uDC00-\uDFFF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFFF]|\uD823[\uDC00-\uDDFF]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFF]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83E[\uDD00-\uDEFF]|[\uD87F\uD8BF][\uDC00-\uDFFD]/gim.test(String.fromCodePoint(e))}function bde(e){return/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e))}function wde(e){return/[\r\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0600-\u0605\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DD\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0890\u0891\u0897-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E33-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB3-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1037\u1039-\u103E\u1056-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1084-\u1086\u108D\u109D\u1100-\u11FF\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60\u1A62\u1A65-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA960-\uA97C\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCBD\uDCC2\uDCCD\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC2\uDDC3\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDFB8-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD2\uDFE1\uDFE2]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF1F\uDF22-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE84-\uDE99\uDF60-\uDF67]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00-\uDF03\uDF34-\uDF3A\uDF3E-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDD63\uDD67-\uDD6A\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDDE6-\uDDFF\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]/.test(e)}function T5(e){return/[\u0E01-\u0E3A\u0E40-\u0E4E\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA\u1000-\u103F\u1050-\u108F\u109A-\u109F\u1780-\u17D3\u17D7\u17DC\u17DD\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19DE\u19DF\u1A20-\u1A5E\u1A60-\u1A7C\u1AA0-\u1AAD\u1B00-\u1B4C\u1B4E-\u1B7F\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE-\uA9EF\uA9FA-\uA9FE\uAA60-\uAAC2\uAADB-\uAADF]|\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF3A\uDF3B\uDF3F-\uDF46]/gim.test(String.fromCodePoint(e))}function Ade(e,r){return/(?:[\u1039\u17D2\u1A60\u1BAB\u200D\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807[\uDD45\uDD97\uDF42])$/.test(e)||new RegExp("^\\p{gc=Mc}","u").test(r)}function Tde(e,r,t){let a=0;for(let i of e.split(";")){let[o,s]=i.split(",").map(n=>parseInt(n,36)),l=a+o;for(let n=l;n{let t=r.codePointAt(0);return{codePoint:t,type:Mde(t),form:null}})}function Dde(e){let r=e.filter(t=>t.type!=="T");for(let t=0;t0&&Ede(r[t-1].type),o=t+1String.fromCodePoint(Pde(t))).join("")}function Rde(e,r,t){var a;let i=r.layout.get("text-transform").evaluate(t,{});return i==="uppercase"?e=e.toLocaleUpperCase():i==="lowercase"&&(e=e.toLocaleLowerCase()),((a=B_.applyArabicShaping)!=null?a:Ide)(e)}function zde(e,r,t){for(let a of e.sections)a.text=Rde(a.text,r,t);return e}function Bde(e){let r={},t={},a=[],i=0;function o(u){a.push(e[u]),i++}function s(u,c,f){let h=t[u];return delete t[u],t[c]=h,a[h].geometry[0].pop(),a[h].geometry[0]=a[h].geometry[0].concat(f[0]),h}function l(u,c,f){let h=r[c];return delete r[c],r[u]=h,a[h].geometry[0].shift(),a[h].geometry[0]=f[0].concat(a[h].geometry[0]),h}function n(u,c,f){let h=f?c[0][c[0].length-1]:c[0][0];return`${u}:${h.x}:${h.y}`}for(let u=0;uu.geometry)}function OE(e){if(!vk||!wde(e))return[...e];Xw??(Xw=new Intl.Segmenter(void 0,{granularity:"grapheme"}));let r=[];for(let{segment:t}of Xw.segment(e)){let a=r.length-1;a>=0&&Ade(r[a],t)?r[a]+=t:r.push(t)}return r}function Ode(e){let r=new Set;if(vk){Zw??(Zw=new Intl.Segmenter(void 0,{granularity:"word"}));for(let{index:a}of Zw.segment(e))r.add(a);return r}let t=0;for(let a of e.split(new RegExp("\\b|(?=\\p{Ideo})","u")))r.add(t),t+=a.length;return r}function C2(e){let r=e.codePointAt(0);return e.length>(r>65535?2:1)}function NE(e){return/\s/u.test(String.fromCodePoint(e))}function jE(e){for(let r of e)if(k2(r.codePointAt(0)))return!0;return!1}function Nde(e){for(let r of e)if(!jde(r.codePointAt(0)))return!1;return!0}function jde(e){return!gde(e)}function M5(e){return!(k2(e)||bde(e))}function E5(e){return new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(e))}function S5(e){return yde(e)}function k5(e){for(let r of e)if(S5(r.codePointAt(0)))return!0;return!1}function Ude(e){let r="",t={premature:!0,value:void 0},a=e[Symbol.iterator](),i=a.next(),o=e[Symbol.iterator]();o.next();let s=o.next();for(;!i.done;)(s.done||!M5(s.value.codePointAt(0))||om[s.value])&&(t.premature||!M5(t.value.codePointAt(0))||om[t.value])&&om[i.value]?r+=om[i.value]:r+=i.value,t={value:i.value,premature:!1},i=a.next(),s=o.next();return r}function C5(e,r,t,a,i,o){if("fontStack"in r){let s=t[r.fontStack],l=s?.[e];if(l)return l.metrics.advance*r.scale+i;let n=0;for(let u of e){let c=s?.[u];c&&(n+=c.metrics.advance*r.scale+i)}return n}{let s=a[r.imageName];return s?s.displaySize[0]*r.scale*24/o+i:0}}function D5(e,r,t,a){let i=(e-r)**2;return a?e1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function p(re,se){var le=0,ue=new Map,fe=se&&new Map,pe;return re.split(",").forEach(function we(xe){if(xe.indexOf("+")!==-1)for(var he=+xe;he--;)we(pe);else{pe=xe;var oe=xe.split(">"),te=oe[0],ie=oe[1];te=String.fromCodePoint(le+=parseInt(te,36)),ie=String.fromCodePoint(le+=parseInt(ie,36)),ue.set(te,ie),se&&fe.set(ie,te)}}),{map:ue,reverseMap:fe}}var g,m,y;function _(){if(!g){var re=p(d.pairs,!0),se=re.map,le=re.reverseMap;g=se,m=le,y=p(d.canonical,!1).map}}function v(re){return _(),g.get(re)||null}function x(re){return _(),m.get(re)||null}function E(re){return _(),y.get(re)||null}var M=t.L,C=t.R,w=t.EN,k=t.ES,T=t.ET,b=t.AN,S=t.CS,A=t.B,F=t.S,D=t.ON,R=t.BN,P=t.NSM,z=t.AL,I=t.LRO,L=t.RLO,B=t.LRE,O=t.RLE,G=t.PDF,$=t.LRI,X=t.RLI,Z=t.FSI,J=t.PDI;function N(re,se){for(var le=125,ue=new Uint32Array(re.length),fe=0;fe0)Ge--;else if(Ke>0){for(Ze=0;!Me[Me.length-1]._isolate;)Me.pop();var st=Me[Me.length-1]._isolInitIndex;st!=null&&(he.set(st,dt),he.set(dt,st)),Me.pop(),Ke--}Ue=Me[Me.length-1],xe[dt]=Ue._level,Ue._override&&we(dt,Ue._override)}else _t&G?(Ge===0&&(Ze>0?Ze--:!Ue._isolate&&Me.length>1&&(Me.pop(),Ue=Me[Me.length-1])),xe[dt]=Ue._level):_t&A&&(xe[dt]=te.level);else xe[dt]=Ue._level,Ue._override&&_t!==R&&we(dt,Ue._override)}for(var Ve=[],Ye=null,me=te.start;me<=te.end;me++){var be=ue[me];if(!(be&l)){var Ee=xe[me],De=be&i,Ce=be===J;Ye&&Ee===Ye._level?(Ye._end=me,Ye._endsWithIsolInit=De):Ve.push(Ye={_start:me,_end:me,_level:Ee,_startsWithPDI:Ce,_endsWithIsolInit:De})}}for(var Fe=[],Je=0;Je=0;St--)if(!(ue[St]&l)){gt=xe[St];break}var Dt=At[At.length-1],kt=xe[Dt],Vt=te.level;if(!(ue[Dt]&i)){for(var lr=Dt+1;lr<=te.end;lr++)if(!(ue[lr]&l)){Vt=xe[lr];break}}Fe.push({_seqIndices:At,_sosType:Math.max(gt,mt)%2?C:M,_eosType:Math.max(Vt,kt)%2?C:M})}}for(var dr=0;dr=0;_i--)if(!(ue[vr[_i]]&l)){Da=ue[vr[_i]];break}we(Oa,Da&(i|J)?D:Da)}}if(pe.get(w))for(var ti=0;ti=-1;ia--){var na=ia===-1?Fr:ue[vr[ia]];if(na&o){na===z&&we(Ka,b);break}}}if(pe.get(z))for(var xi=0;xi=0&&(Oe=ue[vr[Et]],Oe&l);Et--);for(var Mt=Qr+1;Mt=0&&ue[vr[Gt]]&(T|l);Gt--)we(vr[Gt],w);for(zt++;zt=0&&ue[vr[et]]&l;et--)we(vr[et],D);for(var ut=Ht+1;ut=0;Ca--){var Li=Mr[Ca].char;if(Li===ni||Li===x(E(ra))||v(E(Li))===ra){kr.push([Mr[Ca].seqIndex,ua]),Mr.length=Ca;break}}}kr.sort(function(Yn,go){return Yn[0]-go[0]});for(var Va=0;Va=0;un--){var jn=vr[un];if(ue[jn]&sr){var bn=ue[jn]&jt?C:M;Zi=bn===Hr?Hr:bn;break}}}if(Zi){if(ue[vr[rn]]=ue[vr[pa]]=Zi,Zi!==Hr){for(var Wa=rn+1;Wa=0;Un--)if(ue[vr[Un]]&l)Vi=Un;else{ro=ue[vr[Un]]&jt?C:M;break}for(var Kn=la,To=Hi+1;To=0&&f(re[wn])&n;wn--)xe[wn]=te.level}}return{levels:xe,paragraphs:oe};function os(Yn,go){for(var Cn=Yn;Cn=xe&&f(re[te])&n;te--)oe[te]=we.level;for(var ie=we.level,ee=1/0,ce=0;ceie&&(ie=_e),_e=ee;Se--)for(var Me=0;Me=Se){for(var Ue=Me;Me+1=Se;)Me++;Me>Ue&&pe.push([Ue+xe,Me+xe])}}}),pe}function Y(re,se,le,ue){var fe=K(re,se,le,ue),pe=[].concat(re);return fe.forEach(function(we,xe){pe[xe]=(se.levels[we]&1?V(re[we]):null)||re[we]}),pe.join("")}function K(re,se,le,ue){for(var fe=q(re,se,le,ue),pe=[],we=0;we=0;a--){let i=Jw.getBidiCharTypeName(e[a].text[0]);uN.has(i)?(e[a].level=r,t=!0):t&&lN.has(i)?e[a].level=r:t=!1}}function Wde(e,r){let t=r,a=1/0;for(let{level:o}of e)o>t&&(t=o),(o|1)=a;o--)for(let s=0;s=o;)l++;for(let n=s,u=l;nr>=i.start&&r<=i.end))==null?void 0:t.level)!=null?a:0}function Xde(e,r,t,a,i){let o=Gde(e,r,a,i);Hde(o,t);let s="",l=[];for(let n of Wde(o,t)){if(sN.test(n.text))continue;let u=$de(n);s+=u,l.push(...Array(u.length).fill(n.index))}return{text:s,sourceIndices:l}}function Zde(e,r){let t=r.filter(o=>o>0&&oo-s),i=[];for(let o=0;o+1i.start))).map(([i,o])=>Xde(e,t,Yde(a,i),i,o))}function Kde(e,r){return I5(e,r).map(t=>t.text)}function Jde(e,r,t){return I5(e,t).map(a=>[a.text,a.sourceIndices.map(i=>{var o;return(o=r[i])!=null?o:0})])}function Qde(e,r,t){let a=t.buf,i,o;if(o=a[t.pos++],i=(o&112)>>4,o<128||(o=a[t.pos++],i|=(o&127)<<3,o<128)||(o=a[t.pos++],i|=(o&127)<<10,o<128)||(o=a[t.pos++],i|=(o&127)<<17,o<128)||(o=a[t.pos++],i|=(o&127)<<24,o<128)||(o=a[t.pos++],i|=(o&1)<<31,o<128))return epe(e,i,r);throw Error("Expected varint not more than 10 bytes")}function epe(e,r,t){return t?r*4294967296+(e>>>0):(r>>>0)*4294967296+(e>>>0)}function tpe(e,r,t){let a="",i=r;for(;i239?4:o>223?3:o>191?2:1;if(i+l>t)break;let n,u,c;l===1?o<128&&(s=o):l===2?(n=e[i+1],(n&192)==128&&(s=(o&31)<<6|n&63,s<=127&&(s=null))):l===3?(n=e[i+1],u=e[i+2],(n&192)==128&&(u&192)==128&&(s=(o&15)<<12|(n&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):l===4&&(n=e[i+1],u=e[i+2],c=e[i+3],(n&192)==128&&(u&192)==128&&(c&192)==128&&(s=(o&15)<<18|(n&63)<<12|(u&63)<<6|c&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,l=1):s>65535&&(s-=65536,a+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),a+=String.fromCharCode(s),i+=l}return a}function rpe(e,r,t){e===1&&t.readMessage(ape,r)}function ape(e,r,t){if(e===3){let{id:a,bitmap:i,width:o,height:s,left:l,top:n,advance:u}=t.readMessage(ipe,{});r.push({id:a,bitmap:new zw({width:o+6,height:s+6},i),metrics:{width:o,height:s,left:l,top:n,advance:u}})}}function ipe(e,r,t){e===1?r.id=t.readVarint():e===2?r.bitmap=t.readBytes():e===3?r.width=t.readVarint():e===4?r.height=t.readVarint():e===5?r.left=t.readSVarint():e===6?r.top=t.readSVarint():e===7&&(r.advance=t.readVarint())}function npe(e){return new gk(e).readFields(rpe,[])}function D2(e){return typeof e?.renderWithWebGL=="function"}function ope(e){let{userImage:r}=e;return!r?.render||!r.render()?!1:(D2(r.data)||e.data.replace(new Uint8Array(r.data.buffer)),!0)}function R5(e){let r=0,t=0;for(let s of e)r+=s.w*s.h,t=Math.max(t,s.w);e.sort((s,l)=>l.h-s.h);let a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(r/.95)),t),h:1/0}],i=0,o=0;for(let s of e)for(let l=a.length-1;l>=0;l--){let n=a[l];if(!(s.w>n.w||s.h>n.h)){if(s.x=n.x,s.y=n.y,o=Math.max(o,s.y+s.h),i=Math.max(i,s.x+s.w),s.w===n.w&&s.h===n.h){let u=a.pop();u&&l=t;o--)r.push(o);t=a+1}else{for(let o=t;oe.toCodeUnitIndex(o)),a=B_.isParsed()?B_:null;if(e.sections.length===1)return a?a.processBidirectionalText(e.toString(),t).map(o=>B5(o,e.sections,[...o].map(()=>0))):Kde(e.toString(),t).map(o=>UE([...o],e.sections,[...o].map(()=>0)));let i=cpe(e);return a?a.processStyledBidirectionalText(e.text,i,t).map(([o,s])=>B5(o,e.sections,s)):Jde(e.text,i,t).map(([o,s])=>{let l=[...o];return UE(l,e.sections,z5(l).map(n=>{var u;return(u=s[n])!=null?u:0}))})}function UE(e,r,t){var a;let i=new Kw(e.join(""),r,[]),o=0;for(let s of i.graphemes())i.sectionIndex.push((a=t[o])!=null?a:0),o+=[...s].length;return i}function z5(e){let r=[],t=0;for(let a of e)r.push(t),t+=a.length;return r}function B5(e,r,t){let a=[...e],i=z5(a),o=upe(a);return UE(o.map(s=>a[s]),r,o.map(s=>{var l;return(l=t[i[s]])!=null?l:0}))}function L2(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p){let g=Kw.fromFeature(e,i);f===2&&g.verticalizePunctuation();let m=g.determineLineBreaks(u,o,r,a,d),y=k5(g.text)?fpe(g,m):lpe(g,m),_=[],v={positionedLines:_,text:g.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:f,iconsInText:!1,verticalizable:!1};return xpe(v,r,t,a,y,s,l,n,f,u,h,p),!spe(_)&&v}function F2(e){let r=.5,t=.5;switch(e){case"right":case"top-right":case"bottom-right":r=1;break;case"left":case"top-left":case"bottom-left":r=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":t=1;break;case"top":case"top-right":case"top-left":t=0}return{horizontalAlign:r,verticalAlign:t}}function hpe(e,r,t){let a=r.getMaxScale()*24,{maxImageWidth:i,maxImageHeight:o}=r.getMaxImageSize(e),s=Math.max(a,o*t);return{verticalLineContentWidth:Math.max(a,i*t),horizontalLineContentHeight:s}}function O5(e){switch(e){case"top":return 0;case"center":return .5;default:return 1}}function dpe(e,r,t,a){var i;if(e?.rect)return e;let o=(i=r[t.fontStack])==null?void 0:i[a];return o?{rect:null,metrics:o.metrics}:null}function ppe(e,r,t){return!(e===1||!r&&!k2(t)||r&&(NE(t)||E5(t)))}function P2(e){return new RegExp("\\p{Nd}","u").test(String.fromCodePoint(e))}function N5(e){return new RegExp("\\p{Lu}","u").test(String.fromCodePoint(e))}function vpe(e){return/[\p{P}\p{S}]/u.test(String.fromCodePoint(e))}function mpe(e){let r=e.some(P2)&&e.every(a=>P2(a)||vpe(a)),t=e.length<=3&&e.every(a=>N5(a)||P2(a));return r||t}function gpe(e){return(P2(e)||N5(e))&&!E5(e)}function ype(e,r){let t=!1;for(let a=0;ao.codePointAt(0)),a=t.map(k2),i=o=>!a[o]&&!NE(t[o])&&!("imageName"in e.getSection(o));for(let o=0;of){let h=Math.ceil(o/f);i*=h/s,s=h}return{x1:a,y1:i,x2:a+o,y2:i+s}}function U5(e,r,t,a,i,o){let s=e.image,l;if(s.content){let m=s.content,y=s.pixelRatio||1;l=[m[0]/y,m[1]/y,s.displaySize[0]-m[2]/y,s.displaySize[1]-m[3]/y]}let n=r.left*o,u=r.right*o,c,f,h,d;t==="width"||t==="both"?(d=i[0]+n-a[3],f=i[0]+u+a[1]):(d=i[0]+(n+u-s.displaySize[0])/2,f=d+s.displaySize[0]);let p=r.top*o,g=r.bottom*o;return t==="height"||t==="both"?(c=i[1]+p-a[0],h=i[1]+g+a[2]):(c=i[1]+(p+g-s.displaySize[1])/2,h=c+s.displaySize[1]),{image:s,top:c,right:f,bottom:h,left:d,collisionPadding:l}}function q5(e,r){let{expression:t}=r;if(t.kind==="constant")return{kind:"constant",layoutSize:t.evaluate(new Ko(e+1))};if(t.kind==="source")return{kind:"source"};if(t.kind==="composite"){let{minZoom:a,maxZoom:i}=Epe(t.zoomStops,e);return{kind:"composite",minZoom:a,maxZoom:i,interpolationType:t.interpolationType}}{let a=Spe(t),i=t.evaluate(new Ko(e+1));return{kind:"camera",zoomStops:t.zoomStops,sizes:a,layoutSize:i,interpolationType:t.interpolationType}}}function Epe(e,r){let t=0;for(;te.evaluate(new Ko(r===-1/0?e.zoomStops[1]-1:r)))}function qE(e,{uSize:r,uSizeT:t},{lowerSize:a,upperSize:i}){return e.kind==="source"?a/128:e.kind==="composite"?Xs.number(a/128,i/128,t):r}function I2(e,r){let t=0,a=0;return e.kind==="constant"?a=e.layoutSize:e.kind==="camera"?a=kpe(e,r):e.kind==="composite"&&(t=Cpe(e,r)),{uSizeT:t,uSize:a}}function kpe({zoomStops:e,sizes:r,layoutSize:t,interpolationType:a},i){let o=e.length-1;for(;o>0&&e[o]>i;)o--;let s=Math.min(o+1,e.length-1),l=a?Gn(vh.interpolationFactor(a,i,e[o],e[s]),0,1):0;return Math.min(Xs.number(r[o],r[s],l),t)}function Cpe({interpolationType:e,minZoom:r,maxZoom:t},a){return e?Gn(vh.interpolationFactor(e,a,r,t),0,1):0}function V5(e,r,t,a,i){if(r.segment===void 0||t===0)return!0;let o=r,s=r.segment+1,l=0;for(;l>-t/2;){if(s--,s<0)return!1;l-=e[s].dist(o),o=e[s]}l+=e[s].dist(e[s+1]),s++;let n=[],u=0;for(;la;)u-=n.shift().angleDelta;if(u>i)return!1;s++,l+=f.dist(h)}return!0}function G5(e){let r=0;for(let t=0;tu){let p=(u-n)/d,g=new sm(Xs.number(f.x,h.x,p),Xs.number(f.y,h.y,p),h.angleTo(f),c);return g._round(),!s||V5(e,g,l,s,r)?g:void 0}n+=d}}function Lpe(e,r,t,a,i,o,s,l,n){let u=H5(a,o,s),c=W5(a,i),f=c*s,h=e[0].x===0||e[0].x===n||e[0].y===0||e[0].y===n;r-f=0&&x=0&&E=0&&h+u<=c){let M=new sm(x,E,_,p);M._round(),(!a||V5(e,M,o,a,i))&&d.push(M)}}f+=y}return!l&&!d.length&&!s&&(d=$5(e,f/2,t,a,i,o,s,!0,n)),d}function Y5(e,r,t,a,i){let o=[];for(let s of e){let l;for(let n=0;n=a&&c.x>=a)&&(u.x>=a?u=new zr(a,u.y+(c.y-u.y)*((a-u.x)/(c.x-u.x)))._round():c.x>=a&&(c=new zr(a,u.y+(c.y-u.y)*((a-u.x)/(c.x-u.x)))._round()),!(u.y>=i&&c.y>=i)&&(u.y>=i?u=new zr(u.x+(c.x-u.x)*((i-u.y)/(c.y-u.y)),i)._round():c.y>=i&&(c=new zr(u.x+(c.x-u.x)*((i-u.y)/(c.y-u.y)),i)._round()),(!l||!u.equals(l[l.length-1]))&&(l=[u],o.push(l)),l.push(c)))))}}return o}function X5(e,r,t,a){let i=[],o=e.image,s=o.pixelRatio,l=o.paddedRect.w-2,n=o.paddedRect.h-2,u={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},c=o.stretchX||[[0,l]],f=o.stretchY||[[0,n]],h=(F,D)=>F+D[1]-D[0],d=c.reduce(h,0),p=f.reduce(h,0),g=l-d,m=n-p,y=0,_=d,v=0,x=p,E=0,M=g,C=0,w=m;if(o.content&&a){let F=o.content,D=F[2]-F[0],R=F[3]-F[1];(o.textFitWidth||o.textFitHeight)&&(u=j5(e)),y=R2(c,0,F[0]),v=R2(f,0,F[1]),_=R2(c,F[0],F[2]),x=R2(f,F[1],F[3]),E=F[0]-y,C=F[1]-v,M=D-_,w=R-x}let k=u.x1,T=u.y1,b=u.x2-k,S=u.y2-T,A=(F,D,R,P)=>{let z=z2(F.stretch-y,_,b,k),I=B2(F.fixed-E,M,F.stretch,d),L=z2(D.stretch-v,x,S,T),B=B2(D.fixed-C,w,D.stretch,p),O=z2(R.stretch-y,_,b,k),G=B2(R.fixed-E,M,R.stretch,d),$=z2(P.stretch-v,x,S,T),X=B2(P.fixed-C,w,P.stretch,p),Z=new zr(z,L),J=new zr(O,L),N=new zr(O,$),H=new zr(z,$),W=new zr(I/s,B/s),U=new zr(G/s,X/s),V=r*Math.PI/180;if(V){let re=Math.sin(V),se=Math.cos(V),le=[se,-re,re,se];Z._matMult(le),J._matMult(le),H._matMult(le),N._matMult(le)}let j=F.stretch+F.fixed,q=R.stretch+R.fixed,Y=D.stretch+D.fixed,K=P.stretch+P.fixed;return{tl:Z,tr:J,bl:H,br:N,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+Y,w:q-j,h:K-Y},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:W,pixelOffsetBR:U,minFontScaleX:M/s/b,minFontScaleY:w/s/S,isSDF:t}};if(!a||!o.stretchX&&!o.stretchY)i.push(A({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:l+1},{fixed:0,stretch:n+1}));else{let F=Z5(c,g,d),D=Z5(f,m,p);for(let R=0;Rf.d||!f.d)&&(f=h),!(h.max-f.d<=r)&&(i=h.h/2,o.push(new lm(h.p.x-i,h.p.y-i,i,e)),o.push(new lm(h.p.x+i,h.p.y-i,i,e)),o.push(new lm(h.p.x-i,h.p.y+i,i,e)),o.push(new lm(h.p.x+i,h.p.y+i,i,e)))}return c.d>0&&f.d-c.d<=r?c.p:f.p}function Ipe(e,r){return r.max-e.max}function Rpe(e,r){let t=!1,a=1/0;for(let i of r)for(let o=0,s=i.length,l=s-1;oe.y!=u.y>e.y&&e.x<(u.x-n.x)*(e.y-n.y)/(u.y-n.y)+n.x&&(t=!t),a=Math.min(a,e5(e,n,u))}return(t?1:-1)*Math.sqrt(a)}function zpe(e){let r=0,t=0,a=0,i=e[0];for(let o=0,s=i.length,l=s-1;oh*24);c.startsWith("top")?f[1]-=7:c.startsWith("bottom")&&(f[1]+=7),n[u+1]=f}return new Nd(n)}let s=i.get("text-variable-anchor");if(s){let l;l=e._unevaluatedLayout.getValue("text-radial-offset")===void 0?i.get("text-offset").evaluate(r,{},t).map(u=>u*24):[i.get("text-radial-offset").evaluate(r,{},t)*24,r3];let n=[];for(let u of s)n.push(u,K5(u,l));return new Nd(n)}return null}function Bpe(e){var r,t;e.bucket.createArrays();let a=512*e.bucket.overscaling;e.bucket.tilePixelRatio=xa/a,e.bucket.compareText={},e.bucket.iconsNeedLinear=!1;let i=e.bucket.layers[0],o=i.layout,s=i._unevaluatedLayout._values,l={layoutIconSize:s["icon-size"].possiblyEvaluate(new Ko(e.bucket.zoom+1),e.canonical),layoutTextSize:s["text-size"].possiblyEvaluate(new Ko(e.bucket.zoom+1),e.canonical),textMaxSize:s["text-size"].possiblyEvaluate(new Ko(18))};if(e.bucket.textSizeData.kind==="composite"){let{minZoom:h,maxZoom:d}=e.bucket.textSizeData;l.compositeTextSizes=[s["text-size"].possiblyEvaluate(new Ko(h),e.canonical),s["text-size"].possiblyEvaluate(new Ko(d),e.canonical)]}if(e.bucket.iconSizeData.kind==="composite"){let{minZoom:h,maxZoom:d}=e.bucket.iconSizeData;l.compositeIconSizes=[s["icon-size"].possiblyEvaluate(new Ko(h),e.canonical),s["icon-size"].possiblyEvaluate(new Ko(d),e.canonical)]}let n=o.get("text-line-height")*24,u=o.get("text-rotation-alignment")!=="viewport"&&o.get("symbol-placement")!=="point",c=o.get("text-keep-upright"),f=o.get("text-size");for(let h of e.bucket.features){let d=o.get("text-font").evaluate(h,{},e.canonical).join(","),p=f.evaluate(h,{},e.canonical),g=l.layoutTextSize.evaluate(h,{},e.canonical),m=l.layoutIconSize.evaluate(h,{},e.canonical),y={horizontal:{},vertical:void 0},_=h.text,v=[0,0];if(_){let C=_.toString(),w=o.get("text-letter-spacing").evaluate(h,{},e.canonical)*24,k=Nde(C)?w:0,T=o.get("text-anchor").evaluate(h,{},e.canonical),b=J5(i,h,e.canonical);if(!b){let D=o.get("text-radial-offset").evaluate(h,{},e.canonical);v=D?K5(T,[D*24,r3]):o.get("text-offset").evaluate(h,{},e.canonical).map(R=>R*24)}let S=u?"center":o.get("text-justify").evaluate(h,{},e.canonical),A=o.get("symbol-placement")==="point"?o.get("text-max-width").evaluate(h,{},e.canonical)*24:1/0,F=()=>{e.bucket.allowVerticalPlacement&&jE(C)&&(y.vertical=L2(_,e.glyphMap,e.glyphPositions,e.imagePositions,d,A,n,T,"left",k,v,2,!0,g,p))};if(!u&&b){let D=new Set;if(S==="auto")for(let P=0;P{P.x<0||P.x>=8192||P.y<0||P.y>=8192||jpe(e,P,R,t,a,i,A,e.layers[0],e.collisionBoxArray,r.index,r.sourceLayerIndex,e.index,y,[E,E,E,E],w,n,v,M,k,p,r,o,u,c,s)};if(T==="line")for(let R of Y5(r.geometry,0,0,xa,xa)){let P=Jv(R,F),z=Lpe(P,x,C,t.vertical||g,a,24,_,e.overscaling,xa);for(let I of z){let L=g;(!L||!Upe(e,L.text,b,I))&&D(P,I)}}else if(T==="line-center"){for(let R of r.geometry)if(R.length>1){let P=Jv(R,F),z=Dpe(P,C,t.vertical||g,a,24,_);z&&D(P,z)}}else if(r.type==="Polygon")for(let R of a2(r.geometry,0)){let P=Ppe(R,16);D(Jv(R[0],F,!0),new sm(P.x,P.y,0))}else if(r.type==="LineString")for(let R of r.geometry){let P=Jv(R,F);D(P,new sm(P[0].x,P[0].y,0))}else if(r.type==="Point")for(let R of r.geometry)for(let P of R)D([P],new sm(P.x,P.y,0))}function Npe(e,r){let t=e.length,a=r?.values;if(a?.length>0)for(let i=0;i32640&&vo(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):y.kind==="composite"&&(_=[128*p.compositeTextSizes[0].evaluate(s,{},g),128*p.compositeTextSizes[1].evaluate(s,{},g)],(_[0]>32640||_[1]>32640)&&vo(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),e.addSymbols(e.text,m,_,l,o,s,c,r,u.lineStartIndex,u.lineLength,d,g,n);for(let v of f)h[v]=e.text.placedSymbolArray.length-1;return m.length*4}function ez(e){for(let r in e)return e[r];return null}function jpe(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_,v,x,E,M,C,w){let k=e.addToLineVertexArray(r,t),T=l.layout.get("symbol-height-offset").evaluate(x,{},C);T>e.maxHeightOffset&&(e.maxHeightOffset=T);let b,S,A,F,D=0,R=0,P=0,z=0,I=-1,L=-1,B={},O=(0,Pw.default)("");if(e.allowVerticalPlacement&&a.vertical){let se=l.layout.get("text-rotate").evaluate(x,{},C)+90,le=a.vertical;A=new O_(n,r,u,c,f,le,h,d,p,se),s&&(F=new O_(n,r,u,c,f,s,m,y,p,se))}if(i){let se=l.layout.get("icon-rotate").evaluate(x,{}),le=l.layout.get("icon-text-fit")!=="none",ue=X5(i,se,M,le),fe=s?X5(s,se,M,le):void 0;S=new O_(n,r,u,c,f,i,m,y,!1,se),D=ue.length*4;let pe=e.iconSizeData,we=null;pe.kind==="source"?(we=[128*l.layout.get("icon-size").evaluate(x,{})],we[0]>32640&&vo(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):pe.kind==="composite"&&(we=[128*E.compositeIconSizes[0].evaluate(x,{},C),128*E.compositeIconSizes[1].evaluate(x,{},C)],(we[0]>32640||we[1]>32640)&&vo(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),e.addSymbols(e.icon,ue,we,v,_,x,0,r,k.lineStartIndex,k.lineLength,-1,C,T),I=e.icon.placedSymbolArray.length-1,fe&&(R=fe.length*4,e.addSymbols(e.icon,fe,we,v,_,x,2,r,k.lineStartIndex,k.lineLength,-1,C,T),L=e.icon.placedSymbolArray.length-1)}let G=Object.keys(a.horizontal);for(let se of G){let le=a.horizontal[se];b||(b=(O=(0,Pw.default)(le.text),new O_(n,r,u,c,f,le,h,d,p,l.layout.get("text-rotate").evaluate(x,{},C))));let ue=le.positionedLines.length===1;if(P+=Q5(e,r,le,o,l,p,x,g,T,k,a.vertical?1:3,ue?G:[se],B,I,E,C),ue)break}a.vertical&&(z+=Q5(e,r,a.vertical,o,l,p,x,g,T,k,2,["vertical"],B,L,E,C));let $=b?b.boxStartIndex:e.collisionBoxArray.length,X=b?b.boxEndIndex:e.collisionBoxArray.length,Z=A?A.boxStartIndex:e.collisionBoxArray.length,J=A?A.boxEndIndex:e.collisionBoxArray.length,N=S?S.boxStartIndex:e.collisionBoxArray.length,H=S?S.boxEndIndex:e.collisionBoxArray.length,W=F?F.boxStartIndex:e.collisionBoxArray.length,U=F?F.boxEndIndex:e.collisionBoxArray.length,V=-1,j=(se,le)=>se?.circleDiameter?Math.max(se.circleDiameter,le):le;V=j(b,V),V=j(A,V),V=j(S,V),V=j(F,V);let q=+(V>-1);q&&(V*=w/24),e.glyphOffsetArray.length>=e.maxGlyphs&&vo("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),x.sortKey!==void 0&&e.addToSortKeyRanges(e.symbolInstances.length,x.sortKey);let Y=J5(l,x,C),[K,re]=Npe(e.textAnchorOffsets,Y);e.symbolInstances.emplaceBack(r.x,r.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,I,L,O,$,X,Z,J,N,H,W,U,u,P,z,D,R,q,0,h,V,K,re,T)}function Upe(e,r,t,a){let i=e.compareText;if(!(r in i))i[r]=[];else{let o=i[r];for(let s=o.length-1;s>=0;s--)if(a.dist(o[s])e&&a in e?String(e[a]):"")}function Gpe(e,r,t,a=1){var i;let o=(i=e.get("icon-padding").evaluate(r,{},t))==null?void 0:i.values;return[o[0]*a,o[1]*a,o[2]*a,o[3]*a]}function Hpe(e){let r=[],t=e.id;return t===void 0&&r.push(new qa(`layers.${t}`,null,'missing required property "id"')),e.render===void 0&&r.push(new qa(`layers.${t}`,null,'missing required method "render"')),e.renderingMode&&e.renderingMode!=="2d"&&e.renderingMode!=="3d"&&r.push(new qa(`layers.${t}`,null,'property "renderingMode" must be either "2d" or "3d"')),r}function GE(e,r){if(e.type==="custom")return new TN(e,r);switch(e.type){case"background":return new wN(e,r);case"circle":return new tO(e,r);case"color-relief":return new gO(e,r);case"fill":return new EO(e,r);case"fill-extrusion":return new OO(e,r);case"heatmap":return new oO(e,r);case"hillshade":return new fO(e,r);case"line":return new ZO(e,r);case"raster":return new SB(e,r);case"symbol":return new gN(e,r)}}function Wpe(e,r,t){return!(e<0||e>25||t<0||t>=2**e||r<0||r>=2**e)}function tz(e,r){let{x:t,y:a}=$o.fromLngLat(r);return!(e<0||e>25||a<0||a>=1||t<0||t>=1)}function _1(e,r,t,a,i){e*=2,e<0&&(e=e*-1-1);let o=1<0;i--){let o=1<>>0;return((r&255)<<24|(r&65280)<<8|r>>>8&65280|r>>>24&255)>>>0}function Jpe(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0;t[i++]=o>>>0&3,t[i++]=o>>>2&3,t[i++]=o>>>4&3,t[i++]=o>>>6&3,t[i++]=o>>>8&3,t[i++]=o>>>10&3,t[i++]=o>>>12&3,t[i++]=o>>>14&3,t[i++]=o>>>16&3,t[i++]=o>>>18&3,t[i++]=o>>>20&3,t[i++]=o>>>22&3,t[i++]=o>>>24&3,t[i++]=o>>>26&3,t[i++]=o>>>28&3,t[i++]=o>>>30&3,t[i++]=s>>>0&3,t[i++]=s>>>2&3,t[i++]=s>>>4&3,t[i++]=s>>>6&3,t[i++]=s>>>8&3,t[i++]=s>>>10&3,t[i++]=s>>>12&3,t[i++]=s>>>14&3,t[i++]=s>>>16&3,t[i++]=s>>>18&3,t[i++]=s>>>20&3,t[i++]=s>>>22&3,t[i++]=s>>>24&3,t[i++]=s>>>26&3,t[i++]=s>>>28&3,t[i]=s>>>30&3}function Qpe(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0;t[i++]=o>>>0&7,t[i++]=o>>>3&7,t[i++]=o>>>6&7,t[i++]=o>>>9&7,t[i++]=o>>>12&7,t[i++]=o>>>15&7,t[i++]=o>>>18&7,t[i++]=o>>>21&7,t[i++]=o>>>24&7,t[i++]=o>>>27&7,t[i++]=(o>>>30|(s&1)<<2)&7,t[i++]=s>>>1&7,t[i++]=s>>>4&7,t[i++]=s>>>7&7,t[i++]=s>>>10&7,t[i++]=s>>>13&7,t[i++]=s>>>16&7,t[i++]=s>>>19&7,t[i++]=s>>>22&7,t[i++]=s>>>25&7,t[i++]=s>>>28&7,t[i++]=(s>>>31|(l&3)<<1)&7,t[i++]=l>>>2&7,t[i++]=l>>>5&7,t[i++]=l>>>8&7,t[i++]=l>>>11&7,t[i++]=l>>>14&7,t[i++]=l>>>17&7,t[i++]=l>>>20&7,t[i++]=l>>>23&7,t[i++]=l>>>26&7,t[i]=l>>>29&7}function e0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0;t[i++]=o>>>0&15,t[i++]=o>>>4&15,t[i++]=o>>>8&15,t[i++]=o>>>12&15,t[i++]=o>>>16&15,t[i++]=o>>>20&15,t[i++]=o>>>24&15,t[i++]=o>>>28&15,t[i++]=s>>>0&15,t[i++]=s>>>4&15,t[i++]=s>>>8&15,t[i++]=s>>>12&15,t[i++]=s>>>16&15,t[i++]=s>>>20&15,t[i++]=s>>>24&15,t[i++]=s>>>28&15,t[i++]=l>>>0&15,t[i++]=l>>>4&15,t[i++]=l>>>8&15,t[i++]=l>>>12&15,t[i++]=l>>>16&15,t[i++]=l>>>20&15,t[i++]=l>>>24&15,t[i++]=l>>>28&15,t[i++]=n>>>0&15,t[i++]=n>>>4&15,t[i++]=n>>>8&15,t[i++]=n>>>12&15,t[i++]=n>>>16&15,t[i++]=n>>>20&15,t[i++]=n>>>24&15,t[i]=n>>>28&15}function t0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0;t[i++]=o>>>0&31,t[i++]=o>>>5&31,t[i++]=o>>>10&31,t[i++]=o>>>15&31,t[i++]=o>>>20&31,t[i++]=o>>>25&31,t[i++]=(o>>>30|(s&7)<<2)&31,t[i++]=s>>>3&31,t[i++]=s>>>8&31,t[i++]=s>>>13&31,t[i++]=s>>>18&31,t[i++]=s>>>23&31,t[i++]=(s>>>28|(l&1)<<4)&31,t[i++]=l>>>1&31,t[i++]=l>>>6&31,t[i++]=l>>>11&31,t[i++]=l>>>16&31,t[i++]=l>>>21&31,t[i++]=l>>>26&31,t[i++]=(l>>>31|(n&15)<<1)&31,t[i++]=n>>>4&31,t[i++]=n>>>9&31,t[i++]=n>>>14&31,t[i++]=n>>>19&31,t[i++]=n>>>24&31,t[i++]=(n>>>29|(u&3)<<3)&31,t[i++]=u>>>2&31,t[i++]=u>>>7&31,t[i++]=u>>>12&31,t[i++]=u>>>17&31,t[i++]=u>>>22&31,t[i]=u>>>27&31}function r0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0;t[i++]=o>>>0&63,t[i++]=o>>>6&63,t[i++]=o>>>12&63,t[i++]=o>>>18&63,t[i++]=o>>>24&63,t[i++]=(o>>>30|(s&15)<<2)&63,t[i++]=s>>>4&63,t[i++]=s>>>10&63,t[i++]=s>>>16&63,t[i++]=s>>>22&63,t[i++]=(s>>>28|(l&3)<<4)&63,t[i++]=l>>>2&63,t[i++]=l>>>8&63,t[i++]=l>>>14&63,t[i++]=l>>>20&63,t[i++]=l>>>26&63,t[i++]=n>>>0&63,t[i++]=n>>>6&63,t[i++]=n>>>12&63,t[i++]=n>>>18&63,t[i++]=n>>>24&63,t[i++]=(n>>>30|(u&15)<<2)&63,t[i++]=u>>>4&63,t[i++]=u>>>10&63,t[i++]=u>>>16&63,t[i++]=u>>>22&63,t[i++]=(u>>>28|(c&3)<<4)&63,t[i++]=c>>>2&63,t[i++]=c>>>8&63,t[i++]=c>>>14&63,t[i++]=c>>>20&63,t[i]=c>>>26&63}function a0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0;t[i++]=o>>>0&127,t[i++]=o>>>7&127,t[i++]=o>>>14&127,t[i++]=o>>>21&127,t[i++]=(o>>>28|(s&7)<<4)&127,t[i++]=s>>>3&127,t[i++]=s>>>10&127,t[i++]=s>>>17&127,t[i++]=s>>>24&127,t[i++]=(s>>>31|(l&63)<<1)&127,t[i++]=l>>>6&127,t[i++]=l>>>13&127,t[i++]=l>>>20&127,t[i++]=(l>>>27|(n&3)<<5)&127,t[i++]=n>>>2&127,t[i++]=n>>>9&127,t[i++]=n>>>16&127,t[i++]=n>>>23&127,t[i++]=(n>>>30|(u&31)<<2)&127,t[i++]=u>>>5&127,t[i++]=u>>>12&127,t[i++]=u>>>19&127,t[i++]=(u>>>26|(c&1)<<6)&127,t[i++]=c>>>1&127,t[i++]=c>>>8&127,t[i++]=c>>>15&127,t[i++]=c>>>22&127,t[i++]=(c>>>29|(f&15)<<3)&127,t[i++]=f>>>4&127,t[i++]=f>>>11&127,t[i++]=f>>>18&127,t[i]=f>>>25&127}function i0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0;t[i++]=o>>>0&255,t[i++]=o>>>8&255,t[i++]=o>>>16&255,t[i++]=o>>>24&255,t[i++]=s>>>0&255,t[i++]=s>>>8&255,t[i++]=s>>>16&255,t[i++]=s>>>24&255,t[i++]=l>>>0&255,t[i++]=l>>>8&255,t[i++]=l>>>16&255,t[i++]=l>>>24&255,t[i++]=n>>>0&255,t[i++]=n>>>8&255,t[i++]=n>>>16&255,t[i++]=n>>>24&255,t[i++]=u>>>0&255,t[i++]=u>>>8&255,t[i++]=u>>>16&255,t[i++]=u>>>24&255,t[i++]=c>>>0&255,t[i++]=c>>>8&255,t[i++]=c>>>16&255,t[i++]=c>>>24&255,t[i++]=f>>>0&255,t[i++]=f>>>8&255,t[i++]=f>>>16&255,t[i++]=f>>>24&255,t[i++]=h>>>0&255,t[i++]=h>>>8&255,t[i++]=h>>>16&255,t[i]=h>>>24&255}function n0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0,d=e[r+8]>>>0;t[i++]=o>>>0&511,t[i++]=o>>>9&511,t[i++]=o>>>18&511,t[i++]=(o>>>27|(s&15)<<5)&511,t[i++]=s>>>4&511,t[i++]=s>>>13&511,t[i++]=s>>>22&511,t[i++]=(s>>>31|(l&255)<<1)&511,t[i++]=l>>>8&511,t[i++]=l>>>17&511,t[i++]=(l>>>26|(n&7)<<6)&511,t[i++]=n>>>3&511,t[i++]=n>>>12&511,t[i++]=n>>>21&511,t[i++]=(n>>>30|(u&127)<<2)&511,t[i++]=u>>>7&511,t[i++]=u>>>16&511,t[i++]=(u>>>25|(c&3)<<7)&511,t[i++]=c>>>2&511,t[i++]=c>>>11&511,t[i++]=c>>>20&511,t[i++]=(c>>>29|(f&63)<<3)&511,t[i++]=f>>>6&511,t[i++]=f>>>15&511,t[i++]=(f>>>24|(h&1)<<8)&511,t[i++]=h>>>1&511,t[i++]=h>>>10&511,t[i++]=h>>>19&511,t[i++]=(h>>>28|(d&31)<<4)&511,t[i++]=d>>>5&511,t[i++]=d>>>14&511,t[i]=d>>>23&511}function o0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0,d=e[r+8]>>>0,p=e[r+9]>>>0;t[i++]=o>>>0&1023,t[i++]=o>>>10&1023,t[i++]=o>>>20&1023,t[i++]=(o>>>30|(s&255)<<2)&1023,t[i++]=s>>>8&1023,t[i++]=s>>>18&1023,t[i++]=(s>>>28|(l&63)<<4)&1023,t[i++]=l>>>6&1023,t[i++]=l>>>16&1023,t[i++]=(l>>>26|(n&15)<<6)&1023,t[i++]=n>>>4&1023,t[i++]=n>>>14&1023,t[i++]=(n>>>24|(u&3)<<8)&1023,t[i++]=u>>>2&1023,t[i++]=u>>>12&1023,t[i++]=u>>>22&1023,t[i++]=c>>>0&1023,t[i++]=c>>>10&1023,t[i++]=c>>>20&1023,t[i++]=(c>>>30|(f&255)<<2)&1023,t[i++]=f>>>8&1023,t[i++]=f>>>18&1023,t[i++]=(f>>>28|(h&63)<<4)&1023,t[i++]=h>>>6&1023,t[i++]=h>>>16&1023,t[i++]=(h>>>26|(d&15)<<6)&1023,t[i++]=d>>>4&1023,t[i++]=d>>>14&1023,t[i++]=(d>>>24|(p&3)<<8)&1023,t[i++]=p>>>2&1023,t[i++]=p>>>12&1023,t[i]=p>>>22&1023}function s0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0,d=e[r+8]>>>0,p=e[r+9]>>>0,g=e[r+10]>>>0;t[i++]=o>>>0&2047,t[i++]=o>>>11&2047,t[i++]=(o>>>22|(s&1)<<10)&2047,t[i++]=s>>>1&2047,t[i++]=s>>>12&2047,t[i++]=(s>>>23|(l&3)<<9)&2047,t[i++]=l>>>2&2047,t[i++]=l>>>13&2047,t[i++]=(l>>>24|(n&7)<<8)&2047,t[i++]=n>>>3&2047,t[i++]=n>>>14&2047,t[i++]=(n>>>25|(u&15)<<7)&2047,t[i++]=u>>>4&2047,t[i++]=u>>>15&2047,t[i++]=(u>>>26|(c&31)<<6)&2047,t[i++]=c>>>5&2047,t[i++]=c>>>16&2047,t[i++]=(c>>>27|(f&63)<<5)&2047,t[i++]=f>>>6&2047,t[i++]=f>>>17&2047,t[i++]=(f>>>28|(h&127)<<4)&2047,t[i++]=h>>>7&2047,t[i++]=h>>>18&2047,t[i++]=(h>>>29|(d&255)<<3)&2047,t[i++]=d>>>8&2047,t[i++]=d>>>19&2047,t[i++]=(d>>>30|(p&511)<<2)&2047,t[i++]=p>>>9&2047,t[i++]=p>>>20&2047,t[i++]=(p>>>31|(g&1023)<<1)&2047,t[i++]=g>>>10&2047,t[i]=g>>>21&2047}function l0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0,d=e[r+8]>>>0,p=e[r+9]>>>0,g=e[r+10]>>>0,m=e[r+11]>>>0;t[i++]=o>>>0&4095,t[i++]=o>>>12&4095,t[i++]=(o>>>24|(s&15)<<8)&4095,t[i++]=s>>>4&4095,t[i++]=s>>>16&4095,t[i++]=(s>>>28|(l&255)<<4)&4095,t[i++]=l>>>8&4095,t[i++]=l>>>20&4095,t[i++]=n>>>0&4095,t[i++]=n>>>12&4095,t[i++]=(n>>>24|(u&15)<<8)&4095,t[i++]=u>>>4&4095,t[i++]=u>>>16&4095,t[i++]=(u>>>28|(c&255)<<4)&4095,t[i++]=c>>>8&4095,t[i++]=c>>>20&4095,t[i++]=f>>>0&4095,t[i++]=f>>>12&4095,t[i++]=(f>>>24|(h&15)<<8)&4095,t[i++]=h>>>4&4095,t[i++]=h>>>16&4095,t[i++]=(h>>>28|(d&255)<<4)&4095,t[i++]=d>>>8&4095,t[i++]=d>>>20&4095,t[i++]=p>>>0&4095,t[i++]=p>>>12&4095,t[i++]=(p>>>24|(g&15)<<8)&4095,t[i++]=g>>>4&4095,t[i++]=g>>>16&4095,t[i++]=(g>>>28|(m&255)<<4)&4095,t[i++]=m>>>8&4095,t[i]=m>>>20&4095}function u0e(e,r,t,a){let i=a,o=e[r]>>>0,s=e[r+1]>>>0,l=e[r+2]>>>0,n=e[r+3]>>>0,u=e[r+4]>>>0,c=e[r+5]>>>0,f=e[r+6]>>>0,h=e[r+7]>>>0,d=e[r+8]>>>0,p=e[r+9]>>>0,g=e[r+10]>>>0,m=e[r+11]>>>0,y=e[r+12]>>>0,_=e[r+13]>>>0,v=e[r+14]>>>0,x=e[r+15]>>>0;t[i++]=o>>>0&65535,t[i++]=o>>>16&65535,t[i++]=s>>>0&65535,t[i++]=s>>>16&65535,t[i++]=l>>>0&65535,t[i++]=l>>>16&65535,t[i++]=n>>>0&65535,t[i++]=n>>>16&65535,t[i++]=u>>>0&65535,t[i++]=u>>>16&65535,t[i++]=c>>>0&65535,t[i++]=c>>>16&65535,t[i++]=f>>>0&65535,t[i++]=f>>>16&65535,t[i++]=h>>>0&65535,t[i++]=h>>>16&65535,t[i++]=d>>>0&65535,t[i++]=d>>>16&65535,t[i++]=p>>>0&65535,t[i++]=p>>>16&65535,t[i++]=g>>>0&65535,t[i++]=g>>>16&65535,t[i++]=m>>>0&65535,t[i++]=m>>>16&65535,t[i++]=y>>>0&65535,t[i++]=y>>>16&65535,t[i++]=_>>>0&65535,t[i++]=_>>>16&65535,t[i++]=v>>>0&65535,t[i++]=v>>>16&65535,t[i++]=x>>>0&65535,t[i]=x>>>16&65535}function c0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0;t[i++]=l>>>0&1,t[i++]=l>>>1&1,t[i++]=l>>>2&1,t[i++]=l>>>3&1,t[i++]=l>>>4&1,t[i++]=l>>>5&1,t[i++]=l>>>6&1,t[i++]=l>>>7&1,t[i++]=l>>>8&1,t[i++]=l>>>9&1,t[i++]=l>>>10&1,t[i++]=l>>>11&1,t[i++]=l>>>12&1,t[i++]=l>>>13&1,t[i++]=l>>>14&1,t[i++]=l>>>15&1,t[i++]=l>>>16&1,t[i++]=l>>>17&1,t[i++]=l>>>18&1,t[i++]=l>>>19&1,t[i++]=l>>>20&1,t[i++]=l>>>21&1,t[i++]=l>>>22&1,t[i++]=l>>>23&1,t[i++]=l>>>24&1,t[i++]=l>>>25&1,t[i++]=l>>>26&1,t[i++]=l>>>27&1,t[i++]=l>>>28&1,t[i++]=l>>>29&1,t[i++]=l>>>30&1,t[i++]=l>>>31&1}}function f0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0;t[i++]=l>>>0&3,t[i++]=l>>>2&3,t[i++]=l>>>4&3,t[i++]=l>>>6&3,t[i++]=l>>>8&3,t[i++]=l>>>10&3,t[i++]=l>>>12&3,t[i++]=l>>>14&3,t[i++]=l>>>16&3,t[i++]=l>>>18&3,t[i++]=l>>>20&3,t[i++]=l>>>22&3,t[i++]=l>>>24&3,t[i++]=l>>>26&3,t[i++]=l>>>28&3,t[i++]=l>>>30&3,t[i++]=n>>>0&3,t[i++]=n>>>2&3,t[i++]=n>>>4&3,t[i++]=n>>>6&3,t[i++]=n>>>8&3,t[i++]=n>>>10&3,t[i++]=n>>>12&3,t[i++]=n>>>14&3,t[i++]=n>>>16&3,t[i++]=n>>>18&3,t[i++]=n>>>20&3,t[i++]=n>>>22&3,t[i++]=n>>>24&3,t[i++]=n>>>26&3,t[i++]=n>>>28&3,t[i++]=n>>>30&3}}function h0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0;t[i++]=l>>>0&7,t[i++]=l>>>3&7,t[i++]=l>>>6&7,t[i++]=l>>>9&7,t[i++]=l>>>12&7,t[i++]=l>>>15&7,t[i++]=l>>>18&7,t[i++]=l>>>21&7,t[i++]=l>>>24&7,t[i++]=l>>>27&7,t[i++]=(l>>>30|(n&1)<<2)&7,t[i++]=n>>>1&7,t[i++]=n>>>4&7,t[i++]=n>>>7&7,t[i++]=n>>>10&7,t[i++]=n>>>13&7,t[i++]=n>>>16&7,t[i++]=n>>>19&7,t[i++]=n>>>22&7,t[i++]=n>>>25&7,t[i++]=n>>>28&7,t[i++]=(n>>>31|(u&3)<<1)&7,t[i++]=u>>>2&7,t[i++]=u>>>5&7,t[i++]=u>>>8&7,t[i++]=u>>>11&7,t[i++]=u>>>14&7,t[i++]=u>>>17&7,t[i++]=u>>>20&7,t[i++]=u>>>23&7,t[i++]=u>>>26&7,t[i++]=u>>>29&7}}function d0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0;t[i++]=l>>>0&15,t[i++]=l>>>4&15,t[i++]=l>>>8&15,t[i++]=l>>>12&15,t[i++]=l>>>16&15,t[i++]=l>>>20&15,t[i++]=l>>>24&15,t[i++]=l>>>28&15,t[i++]=n>>>0&15,t[i++]=n>>>4&15,t[i++]=n>>>8&15,t[i++]=n>>>12&15,t[i++]=n>>>16&15,t[i++]=n>>>20&15,t[i++]=n>>>24&15,t[i++]=n>>>28&15,t[i++]=u>>>0&15,t[i++]=u>>>4&15,t[i++]=u>>>8&15,t[i++]=u>>>12&15,t[i++]=u>>>16&15,t[i++]=u>>>20&15,t[i++]=u>>>24&15,t[i++]=u>>>28&15,t[i++]=c>>>0&15,t[i++]=c>>>4&15,t[i++]=c>>>8&15,t[i++]=c>>>12&15,t[i++]=c>>>16&15,t[i++]=c>>>20&15,t[i++]=c>>>24&15,t[i++]=c>>>28&15}}function p0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0,f=e[o++]>>>0;t[i++]=l>>>0&31,t[i++]=l>>>5&31,t[i++]=l>>>10&31,t[i++]=l>>>15&31,t[i++]=l>>>20&31,t[i++]=l>>>25&31,t[i++]=(l>>>30|(n&7)<<2)&31,t[i++]=n>>>3&31,t[i++]=n>>>8&31,t[i++]=n>>>13&31,t[i++]=n>>>18&31,t[i++]=n>>>23&31,t[i++]=(n>>>28|(u&1)<<4)&31,t[i++]=u>>>1&31,t[i++]=u>>>6&31,t[i++]=u>>>11&31,t[i++]=u>>>16&31,t[i++]=u>>>21&31,t[i++]=u>>>26&31,t[i++]=(u>>>31|(c&15)<<1)&31,t[i++]=c>>>4&31,t[i++]=c>>>9&31,t[i++]=c>>>14&31,t[i++]=c>>>19&31,t[i++]=c>>>24&31,t[i++]=(c>>>29|(f&3)<<3)&31,t[i++]=f>>>2&31,t[i++]=f>>>7&31,t[i++]=f>>>12&31,t[i++]=f>>>17&31,t[i++]=f>>>22&31,t[i++]=f>>>27&31}}function v0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0,f=e[o++]>>>0,h=e[o++]>>>0;t[i++]=l>>>0&63,t[i++]=l>>>6&63,t[i++]=l>>>12&63,t[i++]=l>>>18&63,t[i++]=l>>>24&63,t[i++]=(l>>>30|(n&15)<<2)&63,t[i++]=n>>>4&63,t[i++]=n>>>10&63,t[i++]=n>>>16&63,t[i++]=n>>>22&63,t[i++]=(n>>>28|(u&3)<<4)&63,t[i++]=u>>>2&63,t[i++]=u>>>8&63,t[i++]=u>>>14&63,t[i++]=u>>>20&63,t[i++]=u>>>26&63,t[i++]=c>>>0&63,t[i++]=c>>>6&63,t[i++]=c>>>12&63,t[i++]=c>>>18&63,t[i++]=c>>>24&63,t[i++]=(c>>>30|(f&15)<<2)&63,t[i++]=f>>>4&63,t[i++]=f>>>10&63,t[i++]=f>>>16&63,t[i++]=f>>>22&63,t[i++]=(f>>>28|(h&3)<<4)&63,t[i++]=h>>>2&63,t[i++]=h>>>8&63,t[i++]=h>>>14&63,t[i++]=h>>>20&63,t[i++]=h>>>26&63}}function m0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0,f=e[o++]>>>0,h=e[o++]>>>0,d=e[o++]>>>0;t[i++]=l>>>0&127,t[i++]=l>>>7&127,t[i++]=l>>>14&127,t[i++]=l>>>21&127,t[i++]=(l>>>28|(n&7)<<4)&127,t[i++]=n>>>3&127,t[i++]=n>>>10&127,t[i++]=n>>>17&127,t[i++]=n>>>24&127,t[i++]=(n>>>31|(u&63)<<1)&127,t[i++]=u>>>6&127,t[i++]=u>>>13&127,t[i++]=u>>>20&127,t[i++]=(u>>>27|(c&3)<<5)&127,t[i++]=c>>>2&127,t[i++]=c>>>9&127,t[i++]=c>>>16&127,t[i++]=c>>>23&127,t[i++]=(c>>>30|(f&31)<<2)&127,t[i++]=f>>>5&127,t[i++]=f>>>12&127,t[i++]=f>>>19&127,t[i++]=(f>>>26|(h&1)<<6)&127,t[i++]=h>>>1&127,t[i++]=h>>>8&127,t[i++]=h>>>15&127,t[i++]=h>>>22&127,t[i++]=(h>>>29|(d&15)<<3)&127,t[i++]=d>>>4&127,t[i++]=d>>>11&127,t[i++]=d>>>18&127,t[i++]=d>>>25&127}}function g0e(e,r,t,a){let i=a,o=r;for(let s=0;s<8;s++){let l=e[o++]>>>0,n=e[o++]>>>0,u=e[o++]>>>0,c=e[o++]>>>0,f=e[o++]>>>0,h=e[o++]>>>0,d=e[o++]>>>0,p=e[o++]>>>0;t[i++]=l>>>0&255,t[i++]=l>>>8&255,t[i++]=l>>>16&255,t[i++]=l>>>24&255,t[i++]=n>>>0&255,t[i++]=n>>>8&255,t[i++]=n>>>16&255,t[i++]=n>>>24&255,t[i++]=u>>>0&255,t[i++]=u>>>8&255,t[i++]=u>>>16&255,t[i++]=u>>>24&255,t[i++]=c>>>0&255,t[i++]=c>>>8&255,t[i++]=c>>>16&255,t[i++]=c>>>24&255,t[i++]=f>>>0&255,t[i++]=f>>>8&255,t[i++]=f>>>16&255,t[i++]=f>>>24&255,t[i++]=h>>>0&255,t[i++]=h>>>8&255,t[i++]=h>>>16&255,t[i++]=h>>>24&255,t[i++]=d>>>0&255,t[i++]=d>>>8&255,t[i++]=d>>>16&255,t[i++]=d>>>24&255,t[i++]=p>>>0&255,t[i++]=p>>>8&255,t[i++]=p>>>16&255,t[i++]=p>>>24&255}}function y0e(e,r,t,a){let i=a,o=r;for(let s=0;s<128;s++){let l=e[o++]>>>0;t[i++]=l&65535,t[i++]=l>>>16&65535}}function _0e(e,r,t,a,i){let o=h3[i]>>>0,s=r,l=0,n=e[s]>>>0,u=a;for(let c=0;c<8;c++){for(let f=0;f<32;f++)if(l+i<=32){let h=n>>>l&o;t[u+f]=h|0,l+=i,l===32&&(l=0,s++,f!==31&&(n=e[s]>>>0))}else{let h=32-l,d=n>>>l;s++,n=e[s]>>>0;let p=i-h,g=-1>>>32-p>>>0,m=(d|(n&g)<>>0)}}function iz(){let e=new Uint8Array(DN);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:e,byteContainerI32:new Int32Array(e.buffer,e.byteOffset,e.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function x0e(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);let r=Math.max(16,e|0);return{encodedWords:new Uint32Array(r),decoderWorkspace:iz()}}function b0e(e,r){if(r<=e.encodedWords.length)return e.encodedWords;let t=new Uint32Array(Math.max(16,r*2));return e.encodedWords=t,t}function w0e(e,r,t,a){a.byteContainer.length>>2;if(i.byteOffset&3)for(let l=0;l>>8&255,i[u+2|0]=n>>>16&255,i[u+3|0]=n>>>24&255}else{let l=a.byteContainerI32;(!l||l.buffer!==i.buffer||l.byteOffset!==i.byteOffset||l.length>>2)),l.set(e.subarray(r,r+o))}let s=t&3;if(s>0){let l=e[r+o|0]|0,n=o<<2;for(let u=0;u>>(u<<3)&255}return i}function A0e(e,r,t){let a=e[r++]|0,i=t.dataToBePacked;for(let o=2;o<=32;o=o+1|0){if(!(a>>>o-1&1))continue;if(r>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${o}, streamWordIndex=${r}, needWords=1, availableWords=${e.length-r}, encodedWords=${e.length})`);let s=e[r++]>>>0,l=Xpe(s),n=s*o+31>>>5;if(r+n>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${o}, size=${s}, streamWordIndex=${r}, needWords=${n}, availableWords=${e.length-r}, encodedWords=${e.length})`);let u=i[o];(!u||u.length>>5)|0,t.exceptionSizes[o]=s}return r}function T0e(e,r,t,a,i){switch(i){case 1:c0e(e,r,t,a);break;case 2:f0e(e,r,t,a);break;case 3:h0e(e,r,t,a);break;case 4:d0e(e,r,t,a);break;case 5:p0e(e,r,t,a);break;case 6:v0e(e,r,t,a);break;case 7:m0e(e,r,t,a);break;case 8:g0e(e,r,t,a);break;case 16:y0e(e,r,t,a);break;default:_0e(e,r,t,a,i)}return r+(i<<3)|0}function M0e(e,r,t,a){if(t+2>r)throw Error(`FastPFOR decode: byteContainer underflow at block=${a} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${t}, byteSize=${r})`);let i=e[t++],o=e[t++];if(i>32)throw Error(`FastPFOR decode: invalid bitWidth=${i} at block=${a} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:i,exceptionCount:o,bytePosIn:t}}function E0e(e,r,t,a,i,o){if(t+1>r)throw Error(`FastPFOR decode: exception header underflow at block=${o} (need 1 byte for maxBits, bytePos=${t}, byteSize=${r})`);let s=e[t++];if(s32)throw Error(`FastPFOR decode: invalid maxBits=${s} at block=${o} (bitWidth=${a}, expected ${a}..32)`);let l=s-a|0;if(l<1||l>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${l} at block=${o} (bitWidth=${a}, maxBits=${s})`);if(t+i>r)throw Error(`FastPFOR decode: exception positions underflow at block=${o} (need=${i}, have=${r-t})`);return{maxBits:s,exceptionBitWidth:l,bytePosIn:t}}function S0e(e,r,t,a,i,o,s,l,n){let{maxBits:u,exceptionBitWidth:c,bytePosIn:f}=E0e(i,o,s,t,a,n);if(s=f,c===1){let m=1<g)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${c} (ptr=${p}, need ${a}, size=${g}) at block ${n}`);for(let m=0;m0&&(f=S0e(i,m,p,g,l,n,f,u,h))}if(c!==a)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${r}, packedStart=${t}, consumedPackedEnd=${c}, expectedPackedEnd=${a}, packedWords=${a-t}, encoded.length=${e.length})`)}function C0e(e,r,t,a,i,o){let s=t|0,l=e[s]|0;if(l<=0||s+l>e.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${l} at pageStart=${s} (expected > 0 and pageStart+whereMeta < encoded.length=${e.length})`);let n=s+1|0,u=s+l|0,c=e[u]>>>0,f=c+3>>>2,h=u+1,d=h+f;if(d>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${c} (metaInts=${f}, pageStart=${s}, packedEnd=${u}, byteContainerStart=${h}) causes bitmapPos=${d} out of bounds (encoded.length=${e.length})`);let p=w0e(e,h,c,o),g=c,m=A0e(e,d,o);return o.dataPointers.fill(0),k0e(e,s,n,u,r,a|0,i/256|0,p,g,o),m}function D0e(e,r,t,a,i,o){let s=a+HE(i,256),l=a,n=t;for(;l!==s;){let u=Math.min(d3,s-l);n=C0e(e,r,n,l,u,o),l=l+u|0}return n}function L0e(e,r,t,a,i,o){if(o===0)return r;let s=0,l=r,n=r+t,u=i,c=i,f=i+o,h=0,d=0;for(;l>>s&255;if(s+=8,l+=s>>>5,s&=31,h|=(p&127)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${d}, partial=${h}, decoded=${c-u}/${o}, inPos=${l}, inEnd=${n})`)}if(c!==f)throw Error(`FastPFOR VByte: truncated stream (decoded=${c-u}, expected=${o}, consumedWords=${l-r}/${t}, vbyteStart=${r}, vbyteEnd=${n})`);return l}function F0e(e,r,t){let a=0,i=0,o=new Uint32Array(r),s=t??iz();if(e.length>0){let u=e[a]|0;if(a=a+1|0,u&255)throw Error(`FastPFOR decode: invalid alignedLength=${u} (expected multiple of 256)`);if(i+u>o.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${i}, alignedLength=${u}, out.length=${o.length})`);a=D0e(e,o,a,i,u,s),i=i+u|0}let l=e.length-a|0,n=r-i|0;return L0e(e,a,l,o,i,n),o}function P0e(e,r,t,a,i){switch(i){case 2:Jpe(e,r,t,a);return;case 3:Qpe(e,r,t,a);return;case 4:e0e(e,r,t,a);return;case 5:t0e(e,r,t,a);return;case 6:r0e(e,r,t,a);return;case 7:a0e(e,r,t,a);return;case 8:i0e(e,r,t,a);return;case 9:n0e(e,r,t,a);return;case 10:o0e(e,r,t,a);return;case 11:s0e(e,r,t,a);return;case 12:l0e(e,r,t,a);return;case 16:u0e(e,r,t,a);return;case 32:for(let u=0;u<32;u=u+1|0)t[a+u|0]=e[r+u|0]|0;return}let o=h3[i]>>>0,s=r,l=0,n=e[s]>>>0;for(let u=0;u<32;u++)if(l+i<=32){let c=n>>>l&o;t[a+u]=c|0,l+=i,l===32&&(l=0,s++,u!==31&&(n=e[s]>>>0))}else{let c=32-l,f=n>>>l;s++,n=e[s]>>>0;let h=h3[i-c]>>>0,d=(f|(n&h)<e.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${r}, byteLength=${t}, bytes.length=${e.length})`);let i=Math.floor(t/4),o=t%4!=0,s=o?i+1:i;if(a.length0){let l=e.byteOffset+r;if(l&3)for(let n=0;n=64)throw Error("Varint too long")}return r.set(i),t}function z0e(e,r,t){let a=new Float64Array(t);for(let i=0;i>4,i<128||(i=r[t.get()],t.increment(),a|=(i&127)<<3,i<128)||(i=r[t.get()],t.increment(),a|=(i&127)<<10,i<128)||(i=r[t.get()],t.increment(),a|=(i&127)<<17,i<128)||(i=r[t.get()],t.increment(),a|=(i&127)<<24,i<128)||(i=r[t.get()],t.increment(),a|=(i&1)<<31,i<128))return a*4294967296+(e>>>0);throw Error("Expected varint not more than 10 bytes")}function N0e(e,r,t,a){return j0e(e,r,t,a,x0e(t>>>2))}function j0e(e,r,t,a,i){let o=a.get();if(t&3)throw Error(`FastPFOR: invalid encodedByteLength=${t} at offset=${o} (encodedBytes.length=${e.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let s=t>>>2,l=b0e(i,s);I0e(e,o,t,l);let n=F0e(l.subarray(0,s),r,i.decoderWorkspace);return a.add(t),n}function Lo(e){return e>>>1^-(e&1)}function Ec(e){return e>>BigInt("1")^-(e&BigInt("1"))}function L0(e){return e%2==1?(e+1)/-2:e/2}function U0e(e){let r=new Int32Array(e.length);for(let t=0;t=4)for(;a=4)for(;a=4)for(;t=4)for(let a=e[0];t=4)for(;a=4)for(;n>>0;for(let t=1;t>>0;return r}function cz(e){let r=new BigUint64Array(e.length);r[0]=BigInt.asUintN(64,Ec(e[0]));for(let t=1;t>>0,r[1]=Lo(e[1])>>>0;for(let t=2;t>>0,r[t+1]=r[t-1]+Lo(e[t+1])>>>0;return r}function rve(e,r,t,a){let i=lz(e,r,t,a);return new Uint32Array(i)}function ave(e){return e[1]}function ive(e){return Lo(e[1])}function nve(e){if(e.length===2){let r=Lo(e[1]);return[r,r]}return[Lo(e[2]),Lo(e[3])]}function ove(e){return e[1]}function sve(e){return Ec(e[1])}function lve(e){if(e.length===2){let r=Ec(e[1]);return[r,r]}return[Ec(e[2]),Ec(e[3])]}function $s(e,r){let t=fve(e,r);return t.logicalLevelTechnique1===to.MORTON?uve(t,e,r):(to.RLE===t.logicalLevelTechnique1||to.RLE===t.logicalLevelTechnique2)&&yh.NONE!==t.physicalLevelTechnique?cve(t,e,r):t}function uve(e,r,t){let a=Mc(r,t,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:e.decompressedCount,numBits:a[0],coordinateShift:a[1]}}function cve(e,r,t){let a=Mc(r,t,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:a[1],runs:a[0],numRleValues:a[1]}}function fve(e,r){let t=e[r.get()],a=LN[t>>4],i={};switch(a){case zl.DATA:i={dictionaryType:PN[t&15]};break;case zl.OFFSET:i={offsetType:IN[t&15]};break;case zl.LENGTH:i={lengthType:RN[t&15]}}r.increment();let o=e[r.get()],s=kk[o>>5],l=kk[o>>2&7],n=FN[o&3];r.increment();let u=Mc(e,r,2),c=u[0],f=u[1];return{physicalStreamType:a,logicalStreamType:i,logicalLevelTechnique1:s,logicalLevelTechnique2:l,physicalLevelTechnique:n,numValues:c,byteLength:f,decompressedCount:c}}function em(e,r,t){if(!r)return e;let a=r.size(),i=e.constructor,o=new i(a),s=0;for(let l=0;l=s);){let l=e[a.increment()];if(l<=127){let n=l+3,u=e[a.increment()],c=Math.min(o+n,r);i.fill(u,o,c),o=c}else{let n=256-l;for(let u=0;u=12?zN.decode(e.subarray(r,t)):mve(e,r,t)}function mve(e,r,t){let a="",i=r;for(;i239?4:o>223?3:o>191?2:1;if(i+l>t)break;let n,u,c;l===1?o<128&&(s=o):l===2?(n=e[i+1],(n&192)==128&&(s=(o&31)<<6|n&63,s<=127&&(s=null))):l===3?(n=e[i+1],u=e[i+2],(n&192)==128&&(u&192)==128&&(s=(o&15)<<12|(n&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):l===4&&(n=e[i+1],u=e[i+2],c=e[i+3],(n&192)==128&&(u&192)==128&&(c&192)==128&&(s=(o&15)<<18|(n&63)<<12|(u&63)<<6|c&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,l=1):s>65535&&(s-=65536,a+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),a+=String.fromCharCode(s),i+=l}return a}function U2(e,r,t,a,i){return bve(b1(e,r,t),t,a,i)}function Sc(e,r,t,a,i){return wve(b1(e,r,t),t,a,i)}function P0(e,r,t){return Tve(b1(e,r,t),t)}function b1(e,r,t){let a=t.physicalLevelTechnique;switch(a){case yh.FAST_PFOR:return N0e(e,t.numValues,t.byteLength,r);case yh.VARINT:return Mc(e,r,t.numValues);case yh.NONE:return pve(e,r,t.numValues);default:throw Error(`Specified physicalLevelTechnique ${a} is not supported (yet).`)}}function m_(e,r,t){let a=t.physicalLevelTechnique;switch(a){case yh.VARINT:return WE(e,r,t.numValues);case yh.NONE:return vve(e,r,t.numValues);default:throw Error(`Specified physicalLevelTechnique ${a} is not supported (yet).`)}}function gve(e,r,t){let a=b1(e,r,t);return a.length===1?Lo(a[0]):ive(a)}function KE(e,r,t){let a=b1(e,r,t);return a.length===1?t.logicalLevelTechnique1===to.DELTA?Lo(a[0]):a[0]:ave(a)}function pz(e,r,t){return nve(b1(e,r,t))}function vz(e,r,t){return lve(WE(e,r,t.numValues))}function mz(e,r,t,a){return yz(m_(e,r,t),t,a)}function JE(e,r,t,a){return _z(m_(e,r,t),t,a)}function yve(e,r,t,a){let i=_ve(e,r,t,!1);return a?em(i,a,0):i}function _ve(e,r,t,a){if(t.physicalLevelTechnique===yh.VARINT)return Ave(z0e(e,r,t.numValues),t,a);let i=m_(e,r,t),o=a?yz(i,t):_z(i,t);return Float64Array.from(o,Number)}function xve(e,r,t){let a=m_(e,r,t);return a.length===1?Ec(a[0]):sve(a)}function gz(e,r,t){let a=m_(e,r,t);return a.length===1?t.logicalLevelTechnique1===to.DELTA?Ec(a[0]):a[0]:ove(a)}function bve(e,r,t,a){let i;switch(r.logicalLevelTechnique1){case to.DELTA:if(r.logicalLevelTechnique2===to.RLE){let o=r;if(!a)return Q0e(e,o.runs,o.numRleValues);e=$E(e,o.runs,o.numRleValues),i=oz(e)}else i=oz(e);break;case to.RLE:i=H0e(e,r.runs,r.numRleValues);break;case to.MORTON:XE(e),i=new Int32Array(e);break;case to.COMPONENTWISE_DELTA:if(t&&!a)return lz(e,t.scale,t.min,t.max);i=X0e(e);break;case to.NONE:i=U0e(e);break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return a?em(i,a,0):i}function wve(e,r,t,a){let i;switch(r.logicalLevelTechnique1){case to.DELTA:if(r.logicalLevelTechnique2===to.RLE){let o=r;i=uz($E(e,o.runs,o.numRleValues))}else i=uz(e);break;case to.RLE:i=$E(e,r.runs,r.numRleValues);break;case to.MORTON:XE(e),i=e;break;case to.COMPONENTWISE_DELTA:i=t&&!a?rve(e,t.scale,t.min,t.max):tve(e);break;case to.NONE:i=e;break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return a?em(i,a,0):i}function yz(e,r,t){let a;switch(r.logicalLevelTechnique1){case to.DELTA:if(r.logicalLevelTechnique2===to.RLE){let i=r;if(!t)return eve(e,i.runs,i.numRleValues);e=YE(e,i.runs,i.numRleValues),a=sz(e)}else a=sz(e);break;case to.RLE:a=W0e(e,r.runs,r.numRleValues);break;case to.NONE:a=q0e(e);break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return t?em(a,t,BigInt("0")):a}function _z(e,r,t){let a;switch(r.logicalLevelTechnique1){case to.DELTA:if(r.logicalLevelTechnique2===to.RLE){let i=r;a=cz(YE(e,i.runs,i.numRleValues))}else a=cz(e);break;case to.RLE:a=YE(e,r.runs,r.numRleValues);break;case to.NONE:a=e;break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return t?em(a,t,BigInt("0")):a}function Ave(e,r,t){switch(r.logicalLevelTechnique1){case to.DELTA:if(r.logicalLevelTechnique2===to.RLE){let a=r;e=nz(e,a.runs,a.numRleValues)}return G0e(e),e;case to.RLE:return Eve(e,r,t);case to.NONE:return t&&V0e(e),e;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}}function Tve(e,r){if(r.logicalLevelTechnique1===to.DELTA&&r.logicalLevelTechnique2===to.NONE)return Z0e(e);if(r.logicalLevelTechnique1===to.RLE&&r.logicalLevelTechnique2===to.NONE){let t=r;return J0e(e,t.runs,t.numRleValues)}if(r.logicalLevelTechnique1===to.NONE&&r.logicalLevelTechnique2===to.NONE){Y0e(e);let t=new Uint32Array(r.numValues+1);return t[0]=0,t.set(e,1),t}if(r.logicalLevelTechnique1===to.DELTA&&r.logicalLevelTechnique2===to.RLE){let t=r,a=K0e(e,t.runs,t.numRleValues);return XE(a),new Uint32Array(a)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function q2(e,r,t,a,i="int32"){let o=e.logicalLevelTechnique1;if(o===to.RLE)return e.runs===1?Bs.CONST:Bs.FLAT;if(o!==to.DELTA||e.logicalLevelTechnique2!==to.RLE)return e.numValues===1?Bs.CONST:Bs.FLAT;let s=r instanceof Zh?r.size():r,l=e;if(l.numRleValues!==s)return Bs.FLAT;if(l.runs===1)return Bs.SEQUENCE;if(l.runs!==2)return e.numValues===1?Bs.CONST:Bs.FLAT;let n=a.get();if(e.physicalLevelTechnique===yh.VARINT)return Mve(t,a,i)?Bs.SEQUENCE:e.numValues===1?Bs.CONST:Bs.FLAT;let u=a.get(),c=new Int32Array(t.buffer,t.byteOffset+u,4);return a.set(n),c[2]===2&&c[3]===2?Bs.SEQUENCE:e.numValues===1?Bs.CONST:Bs.FLAT}function Mve(e,r,t){let a=new Ek(r.get());if(t==="int64"){let o=WE(e,a,4);return o[2]===BigInt("2")&&o[3]===BigInt("2")}let i=Mc(e,a,4);return i[2]===2&&i[3]===2}function Eve(e,r,t){return t?$0e(e,r.runs,r.numRleValues):nz(e,r.runs,r.numRleValues)}function QE(e,r,t){return{x:xz(e,r)-t,y:xz(e>>1,r)-t}}function xz(e,r){let t=0;for(let a=0;a>a;return t}function Sve(e){let r=Array(e.numGeometries),t=1,a=1,i=1,o=0,s=0,l=0,n=e.mortonSettings,u=e.topologyVector,c=u.geometryOffsets,f=u.partOffsets,h=u.ringOffsets,d=e.vertexOffsets,p=!d||d.length===0,g=e.containsPolygonGeometry(),m=e.vertexBuffer;for(let y=0;y[E]),t+=v,a+=v}break;case Xu.LINESTRING:{let v;g?(v=h[a]-h[a-1],a++):v=f[t]-f[t-1],t++;let x;p?(x=w1(m,s,v,!1),s+=v*2):(x=tm(e.vertexBufferType,m,d,l,v,!1,n),l+=v),r[o++]=[x],c&&i++}break;case Xu.POLYGON:{let v=f[t]-f[t-1];t++;let x=Array(v-1),E,M=h[a]-h[a-1];if(a++,p){E=w1(m,s,M,!0),s+=M*2;for(let C=0;Ct?r[o++]:1);return a}function Tz(e,r,t,a){let i=new Uint32Array(r[r.length-1]+1),o=0;i[0]=o;let s=1,l=0;for(let n=0;n0;)i[o++]=e[u++]}}return i}function Mz(e,r,t,a,i){var o,s;let l,n,u,c,f,h=i,d,p;for(let g=0;g1&&!d.nullable||p===1&&d.nullable)throw Error(`The number of streams for the child field ${d.name} does not match its nullability. nullibilty: ${d.nullable}, numStreams: ${p}`);let m;if(d.nullable){let _=$s(e,r);m=new Zh(x1(e,_.numValues,_.byteLength,r),_.numValues)}let y=Sc(e,r,$s(e,r),void 0,m);if(l){if(!s)throw Error(`Incomplete shared FSST dictionary for column "${g}"`);c[h++]=new Bk(g,y,i,o,s,l,m,f)}else c[h++]=new um(g,y,i,o,m)}return c}function qve(e,r,t,a){let i=Vve(t);if(a===0)return i.map(c=>new Ok(c,[]));let o=Gve(e,r,a),s=(o.presentStream?o.presentCount:o.lengthStream.length)/i.length,l=[],n=0,u=0;for(let c=0;c{var a;return e.name+((a=t.name)!=null?a:"")})}function Gve(e,r,t){let a=e[r.get()];r.add(1);let i=Sc(e,r,$s(e,r)),o=t-1,s=[];a&xp.STRING&&(o-=Hve(e,r,s)),o-=Wve(e,r,a,s),o-=$ve(e,r,a,s);let l,n=0;if(a&xp.PRESENCE){let c=Yve(e,r);l=c.value,n=c.count,o--}let u=new Uint32Array;if(o>0&&(u=Sc(e,r,$s(e,r)),o--),o!==0)throw Error(`Unexpected number of remaining streams while decoding map column: ${o}`);return{lengthStream:i,dictionary:s,presentStream:l,presentCount:n,flattenedValues:u}}function Hve(e,r,t){let a=e[r.get()];r.add(1);let i=Mz("",e,r,a);if(i)for(let o=0;oo.length)throw Error("Merged map counts underflow while decoding child streams");let d=Array(t),p=a,g=i;for(let _=0;_s.length)throw Error("Map value stream underflow while decoding feature payload");let x=Zve(s,g,v,n);d[_]=x.value,g=x.nextIndex}let m=0;for(let _=a;_=t)throw Error("Unexpected end of map value stream");let i=e[r];if(i===q0.FALSE)return{value:!1,nextIndex:r+1};if(i===q0.TRUE)return{value:!0,nextIndex:r+1};if(i===q0.START_MAP){let o=Sz(e,r,t);return{value:Ez(e,r+2,o,a).value,nextIndex:o}}if(i===q0.START_LIST){let o=Sz(e,r,t),s=[],l=r+2;for(;l=t)throw Error("Missing length for nested map/list payload");let a=e[r+1];if(a<2)throw Error(`Invalid nested payload length: ${a}`);let i=r+a;if(i>t)throw Error("Nested payload exceeds containing payload bounds");return i}function kz(e,r){let t=e-q0.COUNT;if(t<0||t>=r.length)throw Error(`Scalar dictionary index out of range: ${e}`);return r[t]}function A1(e,r){for(let t of r)e.push(t)}function Kve(e,r,t,a,i,o){var s;return t.type==="scalarType"?o&&!o.has(t.name)?(fz(a,e,r),null):Jve(a,e,r,i,t.scalarType,t):((s=t.complexType)==null?void 0:s.physicalType)===e0.MAP?qve(e,r,t,a):a===0?null:Uve(e,r,t,o)}function Jve(e,r,t,a,i,o){var s;let l;if(e===0)return null;if(o.nullable){let u=$s(r,t),c=u.numValues,f=t.get(),h=x1(r,c,u.byteLength,t);t.set(f+u.byteLength),l=new Zh(h,u.numValues)}let n=l??a;switch(i.physicalType){case Uo.UINT_32:case Uo.INT_32:return ame(r,t,o,i,n);case Uo.STRING:{let u=o.nullable?e-1:e;return(s=Mz(o.name,r,t,u,l))!=null?s:null}case Uo.BOOLEAN:return Qve(r,t,o,a,n);case Uo.UINT_64:case Uo.INT_64:return rme(r,t,o,n,i);case Uo.FLOAT:return eme(r,t,o,n);case Uo.DOUBLE:return tme(r,t,o,n);default:throw Error(`The specified data type for the field is currently not supported: ${i}`)}}function Qve(e,r,t,a,i){let o=$s(e,r),s=o.numValues,l=r.get(),n=g_(i)?i:void 0,u=x1(e,s,o.byteLength,r,n);r.set(l+o.byteLength);let c=new Zh(u,s);return new jN(t.name,c,i)}function eme(e,r,t,a){let i=$s(e,r),o=g_(a)?a:void 0,s=hz(e,r,i.numValues,o);return new UN(t.name,s,a)}function tme(e,r,t,a){let i=$s(e,r),o=g_(a)?a:void 0,s=dz(e,r,i.numValues,o);return new l3(t.name,s,a)}function rme(e,r,t,a,i){let o=$s(e,r),s=q2(o,a,e,r,"int64"),l=i.physicalType===Uo.INT_64;if(s===Bs.FLAT){let u=g_(a)?a:void 0,c=l?mz(e,r,o,u):JE(e,r,o,u);return new Ck(t.name,c,a)}if(s===Bs.SEQUENCE){let u=vz(e,r,o);return new Dk(t.name,u[0],u[1],o.numRleValues,l)}let n=l?xve(e,r,o):gz(e,r,o);return new Rk(t.name,n,a,l)}function ame(e,r,t,a,i){let o=$s(e,r),s=q2(o,i,e,r),l=a.physicalType===Uo.INT_32;if(s===Bs.FLAT){let u=g_(i)?i:void 0,c=l?U2(e,r,o,void 0,u):Sc(e,r,o,void 0,u);return new s3(t.name,c,i)}if(s===Bs.SEQUENCE){let u=pz(e,r,o);return new u3(t.name,u[0],u[1],o.numRleValues,l)}let n=l?gve(e,r,o):KE(e,r,o);return new c3(t.name,n,i,l)}function g_(e){return e instanceof Zh}function Cz(e){switch(e){case du.ID:case du.ID|du.ID_NULLABLE:case du.ID|du.ID_LONG:case du.ID|du.ID_LONG|du.ID_NULLABLE:return{nullable:(e&du.ID_NULLABLE)!==0,columnScope:H1.FEATURE,type:"scalarType",scalarType:{longID:(e&du.ID_LONG)!==0,type:"logicalType",logicalType:Mk.ID}};case du.GEOMETRY:return{nullable:!1,columnScope:H1.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:e0.GEOMETRY,children:[]}};case du.STRUCT:return{nullable:!1,columnScope:H1.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:e0.STRUCT,children:[]}};case du.MAP:return{nullable:!0,columnScope:H1.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:e0.MAP,children:[]}};default:return lme(e)}}function ime(e){return e>=du.SCALAR_BASE}function Dz(e){return e===du.STRUCT||e===du.MAP}function nme(e){if(e.type==="scalarType"){let r=e.scalarType;if(r.type==="physicalType")switch(r.physicalType){case Uo.BOOLEAN:case Uo.INT_8:case Uo.UINT_8:case Uo.INT_32:case Uo.UINT_32:case Uo.INT_64:case Uo.UINT_64:case Uo.FLOAT:case Uo.DOUBLE:return!1;case Uo.STRING:return!0;default:return!1}if(r.type==="logicalType")return!1}else if(e.type==="complexType"){let r=e.complexType;if(r.type==="physicalType")switch(r.physicalType){case e0.GEOMETRY:case e0.STRUCT:case e0.MAP:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",e),!1}function ome(e){var r;return e.type==="scalarType"&&((r=e.scalarType)==null?void 0:r.type)==="logicalType"&&e.scalarType.logicalType===Mk.ID}function sme(e){var r;return e.type==="complexType"&&((r=e.complexType)==null?void 0:r.type)==="physicalType"&&e.complexType.physicalType===e0.GEOMETRY}function lme(e){let r;switch(e){case 10:case 11:r=Uo.BOOLEAN;break;case 12:case 13:r=Uo.INT_8;break;case 14:case 15:r=Uo.UINT_8;break;case 16:case 17:r=Uo.INT_32;break;case 18:case 19:r=Uo.UINT_32;break;case 20:case 21:r=Uo.INT_64;break;case 22:case 23:r=Uo.UINT_64;break;case 24:case 25:r=Uo.FLOAT;break;case 26:case 27:r=Uo.DOUBLE;break;case 28:case 29:r=Uo.STRING;break;default:return null}return{nullable:!!(e&1),columnScope:H1.FEATURE,type:"scalarType",scalarType:{longID:!1,type:"physicalType",physicalType:r}}}function rS(e,r){let t=Mc(e,r,1)[0];if(t===0)return"";let a=r.get(),i=a+t,o=e.subarray(a,i);return r.add(t),qN.decode(o)}function ume(e){let r=e.name,t=e.nullable;return e.type==="scalarType"?{type:"scalarField",scalarField:e.scalarType,name:r,nullable:t}:{type:"complexField",complexField:e.complexType,name:r,nullable:t}}function Lz(e,r){let t=Mc(e,r,1)[0]>>>0,a=t>=du.SCALAR_BASE?Cz(t):null;if(!a)throw Error(`Unsupported field type code ${t}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let i=Ci(ja({},a),{name:rS(e,r)});if(i.type==="complexType"&&Dz(t)){let o=i.complexType,s=Mc(e,r,1)[0]>>>0;o.children=Array(s);for(let l=0;l>>0,a=Cz(t);if(!a)throw Error(`Unsupported column type code ${t}. Supported: ${Nk}`);let i;if(ime(t))i=rS(e,r);else if(t>>0,l=o.complexType;l.children=Array(s);for(let n=0;n>>0,o=Mc(e,r,1)[0]>>>0;a.columns=Array(o);for(let s=0;s>>0,s=a.get()+o;if(s>e.length)throw Error(`Block overruns tile: ${s} > ${e.length}`);let l=Mc(e,a,1)[0]>>>0;if(l!==1&&l!==2){a.set(s);continue}let[n,u]=fme(e,a),c=n.featureTables[0],f=null,h=null,d=[],p=0;for(let m of c.columns){let y=m.name;if(ome(m)){let _=null;if(m.nullable){let x=$s(e,a),E=a.get(),M=x1(e,x.numValues,x.byteLength,a);a.set(E+x.byteLength),_=new Zh(M,x.numValues)}let v=$s(e,a);p=_?_.size():v.decompressedCount,f=dme(e,m,a,y,v,_??p,t)}else if(sme(m)){let _=Mc(e,a,1)[0];if(p===0){let v=a.get();p=$s(e,a).decompressedCount,a.set(v)}r&&(r.scale=r.extent/u),h=Pve(e,_,a,p,r)}else{let _=nme(m)?Mc(e,a,1)[0]:1;if(_===0)continue;let v=Kve(e,a,m,_,p,void 0);if(v)if(Array.isArray(v))for(let x of v)d.push(x);else d.push(v)}}let g=new CN(c.name,h,f,d,u);i.push(g),a.set(s)}return i}function dme(e,r,t,a,i,o,s=!1){var l;let n=(l=r.scalarType)!=null&&l.longID?Uo.UINT_64:Uo.UINT_32,u=typeof o=="number"?void 0:o,c=q2(i,o,e,t,n===Uo.UINT_64?"int64":"int32");if(n===Uo.UINT_32)switch(c){case Bs.FLAT:return new s3(a,Sc(e,t,i,void 0,u),o);case Bs.SEQUENCE:{let f=pz(e,t,i);return new u3(a,f[0],f[1],i.numRleValues,!1)}case Bs.CONST:return new c3(a,KE(e,t,i),o,!1)}switch(c){case Bs.FLAT:return s?new l3(a,yve(e,t,i,u),o):new Ck(a,JE(e,t,i,u),o);case Bs.SEQUENCE:{let f=vz(e,t,i);return new Dk(a,f[0],f[1],i.numRleValues,!1)}case Bs.CONST:return new Rk(a,gz(e,t,i),o,!1)}throw Error("Vector type not supported for id column.")}function pme(e){return typeof e=="object"&&!!e&&"evaluate"in e}function Fz(e,r,t,a,i){return GM(e,(o,s)=>{let l=r instanceof D_?r.get(s):null;return pme(l)?l.evaluate(t,a,void 0,i):l})}function vme(e,r){return r-e}var Pz,aS,Iz,Rz,zz,iS,V2,Bz,Oz,G2,H2,fu,W2,Rd,hp,y_,Nz,nS,oS,jz,xa,$2,Uz,sS,Y2,qz,Vz,zd,lS,uS,cS,T1,Uf,X2,M1,Gz,__,x_,fS,Hz,qf,mn,Zl,hS,ta,Wz,qa,E1,mi,Zn,mo,Hh,b_,I0,eo,$z,w_,S1,A_,k1,T_,C1,M_,Yz,dS,pS,vS,Z2,mS,Xz,Zz,Kz,Jz,wf,Hn,Qz,K2,dp,Bd,Od,ph,Ys,eB,Nd,jd,Zp,J2,rm,tB,gS,Q2,vh,Xs,yS,E_,pp,_S,am,xS,bS,rB,aB,iB,nB,oB,sB,wS,lB,uB,cB,fB,hB,dB,AS,pB,vB,mB,Ud,ew,TS,MS,tw,rw,gB,aw,im,qd,yB,ES,R0,iw,nw,D1,S_,SS,_B,kS,CS,xB,DS,bB,wB,Af,LS,ow,vp,sw,Ko,lw,k_,uw,C_,FS,PS,AB,mh,D_,Ti,gn,L1,IS,L_,Du,RS,cw,Wh,TB,MB,EB,fw,SB,kB,F1,nl,P1,F_,hw,dw,pw,I1,vw,mw,gw,yw,_w,xw,bw,ww,Aw,P_,Tw,Mw,I_,Ew,Sw,kw,Cw,Dw,zS,BS,OS,NS,jS,US,qS,VS,GS,HS,WS,$S,Kp,CB,DB,LB,FB,PB,IB,RB,nm,YS,zB,BB,OB,XS,NB,jB,UB,Vd,Lw,qB,Fw,VB,Zs,GB,HB,WB,$B,Pw,ZS,mp,fn,Di,no,qc,R1,Jp,KS,JS,YB,$h,z1,z0,gp,Yh,Qp,QS,ek,tk,B0,Iw,rk,ak,Rw,XB,ZB,KB,JB,QB,eO,tO,ik,rO,aO,iO,zw,Ls,R_,nO,oO,sO,lO,uO,cO,fO,hO,dO,pO,Kl,B1,vO,mO,gO,Bw,yO,O1,Ow,Nw,El,z_,jw,Uw,gh,N1,O0,j1,U1,yp,qw,Vw,q1,V1,_O,nk,xO,bO,wO,AO,TO,MO,EO,Gw,SO,kO,Xh,CO,G1,DO,LO,Vc,ln,ok,$o,N0,Hw,sk,FO,PO,IO,RO,zO,BO,OO,mme,NO,jO,Ww,UO,$w,qO,VO,lk,uk,ck,GO,HO,WO,$O,fk,YO,Yw,XO,ZO,KO,JO,QO,hk,eN,B_,tN,rN,aN,dk,iN,pk,vk,Xw,Zw,om,nN,oN,Kw,Jw,sN,lN,uN,Qw,gme,mk,gk,e3,cN,yk,_k,xk,sm,O_,fN,lm,t3,r3,hN,a3,i3,N_,dN,pN,vN,mN,n3,bk,wk,gN,yN,_N,xN,bN,wN,AN,TN,MN,EN,SN,j_,U_,Yu,o3,q_,kN,Ak,j0,V_,s3,l3,Tk,u3,c3,CN,H1,Uo,e0,Mk,Ek,to,yh,f3,h3,Sk,d3,DN,zl,Gc,_p,hu,LN,kk,FN,PN,IN,RN,Bs,Zh,zN,Ck,Dk,Xu,BN,U0,Lk,Fk,Pk,Ik,ON,NN,jN,UN,Rk,p3,zk,um,Bk,Ok,xp,q0,du,qN,Nk,VN,GN,HN,WN,$N,yme=Si({"node_modules/maplibre-gl/dist/maplibre-gl-shared.mjs"(){Pz=Object.create,aS=Object.defineProperty,Iz=Object.getOwnPropertyDescriptor,Rz=Object.getOwnPropertyNames,zz=Object.getPrototypeOf,iS=Object.prototype.hasOwnProperty,V2=(e,r)=>()=>(r||(e((r={exports:{}}).exports,r),e=null),r.exports),Bz=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(var i=Rz(r),o=0,s=i.length,l;or[n]).bind(null,l),enumerable:!(a=Iz(r,l))||a.enumerable});return e},Oz=(e,r,t)=>(t=e==null?{}:Pz(zz(e)),Bz(r||!e||!e.__esModule||!iS.call(e,"default")?aS(t,"default",{value:e,enumerable:!0}):t,e)),zr.prototype={clone(){return new zr(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,r){return this.clone()._rotateAround(e,r)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let r=e.x-this.x,t=e.y-this.y;return r*r+t*t},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,r){return Math.atan2(this.x*r-this.y*e,this.x*e+this.y*r)},_matMult(e){let r=e[0]*this.x+e[1]*this.y,t=e[2]*this.x+e[3]*this.y;return this.x=r,this.y=t,this},_add(e){return this.x+=e.x,this.y+=e.y,this},_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let r=Math.cos(e),t=Math.sin(e),a=r*this.x-t*this.y,i=t*this.x+r*this.y;return this.x=a,this.y=i,this},_rotateAround(e,r){let t=Math.cos(e),a=Math.sin(e),i=r.x+t*(this.x-r.x)-a*(this.y-r.y),o=r.y+a*(this.x-r.x)+t*(this.y-r.y);return this.x=i,this.y=o,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:zr},zr.convert=function(e){if(e instanceof zr)return e;if(Array.isArray(e))return new zr(+e[0],+e[1]);if(e.x!==void 0&&e.y!==void 0)return new zr(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")},fu=typeof Float32Array<"u"?Float32Array:Array,Math.PI/180,180/Math.PI,W2=uce,Rd=cce,hp=FI,y_=Yp,(function(){var e=DI();return function(r,t,a,i,o,s){var l,n;for(t||(t=3),a||(a=0),n=i?Math.min(i*t+a,r.length):r.length,l=a;l.999999?(a[0]=0,a[1]=0,a[2]=0,a[3]=1,a):(Nf(e,i,o),a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=1+s,oS(a,a))}})(),(function(){var e=PI(),r=PI();return function(t,a,i,o,s,l){return Zb(e,a,s,l),Zb(r,i,o,l),Zb(t,e,r,2*l*(1-l)),t}})(),(function(){var e=kI();return function(r,t,a,i){return e[0]=a[0],e[3]=a[1],e[6]=a[2],e[1]=i[0],e[4]=i[1],e[7]=i[2],e[2]=-t[0],e[5]=-t[1],e[8]=-t[2],oS(r,Mce(r,e))}})(),jz=Ece,(function(){var e=UM();return function(r,t,a,i,o,s){var l,n;for(t||(t=2),a||(a=0),n=i?Math.min(i*t+a,r.length):r.length,l=a;lyi(null,null,function*(){let t=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(t,r)}catch(a){throw Error(`Could not load image because of ${Ac(a).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),Vz=e=>new Promise((r,t)=>{let a=new Image;a.onload=()=>{r(a),URL.revokeObjectURL(a.src),a.onload=null,window.requestAnimationFrame(()=>a.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=")},a.onerror=()=>t(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 i=new Blob([new Uint8Array(e)],{type:"image/png"});a.src=URL.createObjectURL(i)}),zd=85.051129,lS={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},uS={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},cS="AbortError",T1=class extends Error{constructor(e=cS){super(e instanceof Error?e.message:e),this.name=cS,e instanceof Error&&e.stack&&(this.stack=e.stack)}},Uf={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""},X2="global-dispatcher",M1=class extends Error{constructor(e,r,t,a){super(`AJAXError: ${r} (${e}): ${t}`),this.status=e,this.statusText=r,this.url=t,this.body=a}},Gz=e=>{var r;return e.startsWith("file:")||((r=$M())==null?void 0:r.startsWith("file:"))&&!/^\w+:/.test(e)},__=function(e,r){return yi(this,null,function*(){var t,a;if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let i=GI(e.url);if(i){let o=yield i(e,r);return!o.data&&e.type==="arrayBuffer"?tn(o,{data:new ArrayBuffer(0)}):o}if(n1(self)&&((t=self.worker)!=null&&t.actor))return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:X2},r)}if(!Gz(e.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return Wce(e,r);if(n1(self)&&((a=self.worker)!=null&&a.actor))return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:X2},r)}return $ce(e,r)})},x_=(e,r)=>__(tn(e,{type:"json"}),r),fS=(e,r)=>__(tn(e,{type:"arrayBuffer"}),r),Hz=e=>{let r=window.document.createElement("video");return r.muted=!0,new Promise(t=>{r.onloadstart=()=>{t(r)};for(let a of e){let i=window.document.createElement("source");HI(a)||(r.crossOrigin="Anonymous"),i.src=a,r.appendChild(i)}})},qf=class{constructor(e,r={}){tn(this,r),this.type=e}},mn=class extends qf{constructor(e,r={}){super("error",tn({error:e},r))}},Zl=class{on(e,r){return this._listeners||(this._listeners={}),WI(e,r,this._listeners),{unsubscribe:()=>{this.off(e,r)}}}off(e,r){return YM(e,r,this._listeners),YM(e,r,this._oneTimeListeners),this}once(e,r){return r?(this._oneTimeListeners||(this._oneTimeListeners={}),WI(e,r,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,r){var t,a,i,o,s,l;let n=typeof e=="string"?new qf(e,r||{}):e,u=n.type;if(this.listens(u)){n.target=this;let c=(i=(a=(t=this._listeners)==null?void 0:t[u])==null?void 0:a.slice())!=null?i:[];for(let d of c)d.call(this,n);let f=(l=(s=(o=this._oneTimeListeners)==null?void 0:o[u])==null?void 0:s.slice())!=null?l:[];for(let d of f)YM(u,d,this._oneTimeListeners),d.call(this,n);let h=this._eventedParent;h&&(tn(n,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),h.fire(n))}else n instanceof mn&&console.error(n.error);return this}listens(e){var r,t,a,i,o;return!!((t=(r=this._listeners)==null?void 0:r[e])!=null&&t.length||(i=(a=this._oneTimeListeners)==null?void 0:a[e])!=null&&i.length||(o=this._eventedParent)!=null&&o.listens(e))}setEventedParent(e,r){return this._eventedParent=e,this._eventedParentData=r,this}},hS={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},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},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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:"filter"},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:{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:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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","feature"]},"property-type":"data-driven"},"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"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,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,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default: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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"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","feature"]},"property-type":"cross-faded-data-driven"},"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"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}},ta=hS,Wz=["type","source","source-layer","minzoom","maxzoom","filter","layout"],qa=class{constructor(e,r,t,a,i="error"){this.message=(e?`${e}: `:"")+t,a&&(this.identifier=a),this.severity=i,r!=null&&r.__line__&&(this.line=r.__line__)}},E1={kind:"null"},mi={kind:"number"},Zn={kind:"string"},mo={kind:"boolean"},Hh={kind:"color"},b_={kind:"projectionDefinition"},I0={kind:"object"},eo={kind:"value"},$z={kind:"error"},w_={kind:"collator"},S1={kind:"formatted"},A_={kind:"padding"},k1={kind:"colorArray"},T_={kind:"numberArray"},C1={kind:"resolvedImage"},M_={kind:"variableAnchorOffsetCollection"},Yz=[E1,mi,Zn,mo,Hh,b_,S1,I0,Uc(eo),A_,T_,k1,C1,M_],dS=.96422,pS=.82521,vS=4/29,Z2=6/29,mS=3*Z2*Z2,Xz=Math.PI/180,Zz=180/Math.PI,Kz=Object.hasOwn||function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},Jz={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Hn=(wf=class{constructor(e,r,t,a=1,i=!0){this.r=e,this.g=r,this.b=t,this.a=a,i||(this.r*=a,this.g*=a,this.b*=a,a||this.overwriteGetter("rgb",[e,r,t,a]))}static parse(e){if(e instanceof wf)return e;if(typeof e!="string")return;let r=Kce(e);if(r)return new wf(...r,!1)}get rgb(){let{r:e,g:r,b:t,a}=this,i=a||1/0;return this.overwriteGetter("rgb",[e/i,r/i,t/i,a])}get hcl(){return this.overwriteGetter("hcl",Yce(this.rgb))}get lab(){return this.overwriteGetter("lab",YI(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){let[e,r,t,a]=this.rgb;return`rgba(${[e,r,t].map(i=>Math.round(i*255)).join(",")},${a})`}static interpolate(e,r,t,a="rgb"){switch(a){case"rgb":{let[i,o,s,l]=s1(e.rgb,r.rgb,t);return new wf(i,o,s,l,!1)}case"hcl":{let[i,o,s,l]=e.hcl,[n,u,c,f]=r.hcl,h,d;if(!isNaN(i)&&!isNaN(n)){let _=n-i;n>i&&_>180?_-=360:n180&&(_+=360),h=i+t*_}else isNaN(i)?isNaN(n)?h=NaN:(h=n,(s===1||s===0)&&(d=u)):(h=i,(c===1||c===0)&&(d=o));let[p,g,m,y]=Xce([h,d??C0(o,u,t),C0(s,c,t),C0(l,f,t)]);return new wf(p,g,m,y,!1)}case"lab":{let[i,o,s,l]=XI(s1(e.lab,r.lab,t));return new wf(i,o,s,l,!1)}}}},wf.black=new wf(0,0,0,1),wf.white=new wf(1,1,1,1),wf.transparent=new wf(0,0,0,0),wf.red=new wf(1,0,0,1),wf),Qz=["bottom","center","top"],K2=class{constructor(e,r,t,a,i,o){this.text=e,this.image=r,this.scale=t,this.fontStack=a,this.textColor=i,this.verticalAlign=o}},dp=class lA{constructor(r){this.sections=r}static fromString(r){return new lA([new K2(r,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(r=>r.text.length!==0||r.image&&r.image.name.length!==0)}static factory(r){return r instanceof lA?r:lA.fromString(r)}toString(){return this.sections.length===0?"":this.sections.map(r=>r.text).join("")}},Bd=class Px{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof Px)return r;if(typeof r=="number")return new Px([r,r,r,r]);if(Array.isArray(r)&&!(r.length<1||r.length>4)){for(let t of r)if(typeof t!="number")return;switch(r.length){case 1:r=[r[0],r[0],r[0],r[0]];break;case 2:r=[r[0],r[1],r[0],r[1]];break;case 3:r=[r[0],r[1],r[2],r[1]]}return new Px(r)}}toString(){return JSON.stringify(this.values)}static interpolate(r,t,a){return new Px(s1(r.values,t.values,a))}},Od=class Ix{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof Ix)return r;if(typeof r=="number")return new Ix([r]);if(Array.isArray(r)){for(let t of r)if(typeof t!="number")return;return new Ix(r)}}toString(){return JSON.stringify(this.values)}static interpolate(r,t,a){return new Ix(s1(r.values,t.values,a))}},ph=class Rx{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof Rx)return r;if(typeof r=="string"){let a=Hn.parse(r);return a?new Rx([a]):void 0}if(!Array.isArray(r))return;let t=[];for(let a of r){if(typeof a!="string")return;let i=Hn.parse(a);if(!i)return;t.push(i)}return new Rx(t)}toString(){return JSON.stringify(this.values)}static interpolate(r,t,a,i="rgb"){let o=[];if(r.values.length!=t.values.length)throw Error(`colorArray: Arrays have mismatched length (${r.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let s=0;s=l)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);let f=t.parse(n,c,o);if(!f)return null;o||(o=f.type),i.push([l,f])}return new KJ(o,a,i,t.key)}evaluate(r){let t=this.labels,a=this.outputs;if(t.length===1)return a[0].evaluate(r);let i=this.input.evaluate(r);if(i<=t[0])return a[0].evaluate(r);let o=t.length;return i>=t[o-1]?a[o-1].evaluate(r):a[r2(t,i,this.key)].evaluate(r)}eachChild(r){r(this.input);for(let t of this.outputs)r(t)}outputDefined(){return this.outputs.every(r=>r.outputDefined())}},vh=class mD{constructor(r,t,a,i,o,s){this.type=r,this.operator=t,this.interpolation=a,this.input=i,this.key=s,this.labels=[],this.outputs=[];for(let[l,n]of o)this.labels.push(l),this.outputs.push(n)}static interpolationFactor(r,t,a,i){let o=0;if(r.name==="exponential")o=eE(t,r.base,a,i);else if(r.name==="linear")o=eE(t,1,a,i);else if(r.name==="cubic-bezier"){let s=r.controlPoints;o=Qce(s[0],s[1],s[2],s[3])(eE(t,1,a,i))}return o}static parse(r,t){let[a,i,o,...s]=r;if(!Array.isArray(i)||i.length===0)return t.error("Expected an interpolation type expression.",1);if(i[0]==="linear")i={name:"linear"};else if(i[0]==="exponential"){let u=i[1];if(typeof u!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:u}}else if(i[0]==="cubic-bezier"){let u=i.slice(1);if(u.length!==4||u.some(c=>typeof c!="number"||c<0||c>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:u}}else return t.error(`Unknown interpolation type ${String(i[0])}`,1,0);if(r.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${r.length-1}.`);if((r.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,mi),!o)return null;let l=[],n=null;(a==="interpolate-hcl"||a==="interpolate-lab")&&t.expectedType!=k1?n=Hh:t.expectedType&&t.expectedType.kind!=="value"&&(n=t.expectedType);for(let u=0;u=c)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);let p=t.parse(f,d,n);if(!p)return null;n||(n=p.type),l.push([c,p])}return!k0(n,mi)&&!k0(n,b_)&&!k0(n,Hh)&&!k0(n,A_)&&!k0(n,T_)&&!k0(n,k1)&&!k0(n,M_)&&!k0(n,Uc(mi))?t.error(`Type ${dl(n)} is not interpolatable.`):new mD(n,a,i,o,l,t.key)}evaluate(r){let t=this.labels,a=this.outputs;if(t.length===1)return a[0].evaluate(r);let i=this.input.evaluate(r);if(i<=t[0])return a[0].evaluate(r);let o=t.length;if(i>=t[o-1])return a[o-1].evaluate(r);let s=r2(t,i,this.key),l=t[s],n=t[s+1],u=mD.interpolationFactor(this.interpolation,i,l,n),c=a[s].evaluate(r),f=a[s+1].evaluate(r);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return C0(c,f,u);case"color":return Hn.interpolate(c,f,u);case"padding":return Bd.interpolate(c,f,u);case"colorArray":return ph.interpolate(c,f,u);case"numberArray":return Od.interpolate(c,f,u);case"variableAnchorOffsetCollection":return Nd.interpolate(c,f,u,this.key);case"array":return s1(c,f,u);case"projectionDefinition":return Zp.interpolate(c,f,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return Hn.interpolate(c,f,u,"hcl");case"colorArray":return ph.interpolate(c,f,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Hn.interpolate(c,f,u,"lab");case"colorArray":return ph.interpolate(c,f,u,"lab")}}}eachChild(r){r(this.input);for(let t of this.outputs)r(t)}outputDefined(){return this.outputs.every(r=>r.outputDefined())}},Xs={color:Hn.interpolate,number:C0,padding:Bd.interpolate,numberArray:Od.interpolate,colorArray:ph.interpolate,variableAnchorOffsetCollection:Nd.interpolate,array:s1},yS=class JJ{constructor(r){this.type=S1,this.sections=r}static parse(r,t){if(r.length<2)return t.error("Expected at least one argument.");let a=r[1];if(!Array.isArray(a)&&typeof a=="object")return t.error("First argument must be an image or text section.");let i=[],o=!1;for(let s=1;s<=r.length-1;++s){let l=r[s];if(o&&typeof l=="object"&&!Array.isArray(l)){o=!1;let n=null;if(l["font-scale"]&&(n=t.parse(l["font-scale"],1,mi),!n))return null;let u=null;if(l["text-font"]&&(u=t.parse(l["text-font"],1,Uc(Zn)),!u))return null;let c=null;if(l["text-color"]&&(c=t.parse(l["text-color"],1,Hh),!c))return null;let f=null;if(l["vertical-align"]){if(typeof l["vertical-align"]=="string"&&!Qz.includes(l["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${l["vertical-align"]}' instead.`);if(f=t.parse(l["vertical-align"],1,Zn),!f)return null}let h=i[i.length-1];h.scale=n,h.font=u,h.textColor=c,h.verticalAlign=f}else{let n=t.parse(r[s],1,eo);if(!n)return null;let u=n.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,i.push({content:n,scale:null,font:null,textColor:null,verticalAlign:null})}}return new JJ(i)}evaluate(r){return new dp(this.sections.map(t=>{let a=t.content.evaluate(r);return Il(a)===C1?new K2("",a,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(r):null):new K2($y(a),null,t.scale?t.scale.evaluate(r):null,t.font?t.font.evaluate(r).join(","):null,t.textColor?t.textColor.evaluate(r):null,t.verticalAlign?t.verticalAlign.evaluate(r):null)}))}eachChild(r){for(let t of this.sections)r(t.content),t.scale&&r(t.scale),t.font&&r(t.font),t.textColor&&r(t.textColor),t.verticalAlign&&r(t.verticalAlign)}outputDefined(){return!1}},E_={string:Zn,number:mi,boolean:mo,object:I0},pp=class QJ{constructor(r,t,a){this.type=r,this.args=t,this.key=a}static parse(r,t){if(r.length<2)return t.error("Expected at least one argument.");let a=1,i,o=r[0];if(o==="array"){let l;if(r.length>2){let u=r[1];if(typeof u!="string"||!(u in E_)||u==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);l=E_[u],a++}else l=eo;let n;if(r.length>3){if(r[2]!==null&&(typeof r[2]!="number"||r[2]<0||r[2]!==Math.floor(r[2])))return t.error('The length argument to "array" must be a positive integer literal',2);n=r[2],a++}i=Uc(l,n)}else{if(!E_[o])throw Error(`Types doesn't contain name = ${o}`);i=E_[o]}let s=[];for(;ar.outputDefined())}},_S={"to-boolean":mo,"to-color":Hh,"to-number":mi,"to-string":Zn},am=class eQ{constructor(r,t,a){this.type=r,this.args=t,this.key=a}static parse(r,t){if(r.length<2)return t.error("Expected at least one argument.");let a=r[0];if(!_S[a])throw Error(`Can't parse ${a} as it is not part of the known types`);if((a==="to-boolean"||a==="to-string")&&r.length!==2)return t.error("Expected one argument.");let i=_S[a],o=[];for(let s=1;s4?`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:JI(t[0],t[1],t[2],t[3]),!a))return new Hn(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Ys(a||`Could not parse color from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}case"padding":{let t;for(let a of this.args){t=a.evaluate(r);let i=Bd.parse(t);if(i)return i}throw new Ys(`Could not parse padding from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}case"numberArray":{let t;for(let a of this.args){t=a.evaluate(r);let i=Od.parse(t);if(i)return i}throw new Ys(`Could not parse numberArray from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}case"colorArray":{let t;for(let a of this.args){t=a.evaluate(r);let i=ph.parse(t);if(i)return i}throw new Ys(`Could not parse colorArray from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}case"variableAnchorOffsetCollection":{let t;for(let a of this.args){t=a.evaluate(r);let i=Nd.parse(t);if(i)return i}throw new Ys(`Could not parse variableAnchorOffsetCollection from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}case"number":{let t=null;for(let a of this.args){if(t=a.evaluate(r),t===null)return 0;let i=Number(t);if(!isNaN(i))return i}throw new Ys(`Could not convert ${JSON.stringify(t)} to number.`,this.key)}case"formatted":return dp.fromString($y(this.args[0].evaluate(r)));case"resolvedImage":return jd.fromString($y(this.args[0].evaluate(r)));case"projectionDefinition":{let t=this.args[0].evaluate(r);if(Zp.parse(t))return t;throw new Ys(`Could not parse projectionDefinition from value '${typeof t=="string"?t:JSON.stringify(t)}'`,this.key)}default:return $y(this.args[0].evaluate(r))}}eachChild(r){this.args.forEach(r)}outputDefined(){return this.args.every(r=>r.outputDefined())}},xS=class tQ{constructor(r,t){this.type=t.type,this.bindings=[].concat(r),this.result=t}evaluate(r){return this.result.evaluate(r)}eachChild(r){for(let t of this.bindings)r(t[1]);r(this.result)}static parse(r,t){if(r.length<4)return t.error(`Expected at least 3 arguments, but found ${r.length-1} instead.`);let a=[];for(let o=1;o=a.length)throw new Ys(`Array index out of bounds: ${t} > ${a.length-1}.`,this.key);if(t!==Math.floor(t))throw new Ys(`Array index must be an integer, but found ${t} instead.`,this.key);return a[t]}eachChild(r){r(this.index),r(this.input)}outputDefined(){return!1}},aB=class iQ{constructor(r,t,a){this.needle=r,this.haystack=t,this.key=a,this.type=mo}static parse(r,t){if(r.length!==3)return t.error(`Expected 2 arguments, but found ${r.length-1} instead.`);let a=t.parse(r[1],1,eo),i=t.parse(r[2],2,eo);return!a||!i?null:XM(a.type,[mo,Zn,mi,E1,eo])?new iQ(a,i,t.key):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${dl(a.type)} instead`)}evaluate(r){let t=this.needle.evaluate(r),a=this.haystack.evaluate(r);if(!a)return!1;if(!Hv(t,["boolean","string","number","null"]))throw new Ys(`Expected first argument to be of type boolean, string, number or null, but found ${dl(Il(t))} instead.`,this.key);if(!Hv(a,["string","array"]))throw new Ys(`Expected second argument to be of type array or string, but found ${dl(Il(a))} instead.`,this.key);return a.indexOf(t)>=0}eachChild(r){r(this.needle),r(this.haystack)}outputDefined(){return!0}},iB=class gD{constructor(r,t,a,i){this.needle=r,this.haystack=t,this.key=a,this.fromIndex=i,this.type=mi}static parse(r,t){if(r.length<=2||r.length>=5)return t.error(`Expected 2 or 3 arguments, but found ${r.length-1} instead.`);let a=t.parse(r[1],1,eo),i=t.parse(r[2],2,eo);if(!a||!i)return null;if(!XM(a.type,[mo,Zn,mi,E1,eo]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${dl(a.type)} instead`);if(r.length===4){let o=t.parse(r[3],3,mi);return o?new gD(a,i,t.key,o):null}return new gD(a,i,t.key)}evaluate(r){let t=this.needle.evaluate(r),a=this.haystack.evaluate(r);if(!Hv(t,["boolean","string","number","null"]))throw new Ys(`Expected first argument to be of type boolean, string, number or null, but found ${dl(Il(t))} instead.`,this.key);let i;if(this.fromIndex&&(i=this.fromIndex.evaluate(r)),Hv(a,["string"])){let o=a.indexOf(t,i);return o===-1?-1:[...a.slice(0,o)].length}if(Hv(a,["array"]))return a.indexOf(t,i);throw new Ys(`Expected second argument to be of type array or string, but found ${dl(Il(a))} instead.`,this.key)}eachChild(r){r(this.needle),r(this.haystack),this.fromIndex&&r(this.fromIndex)}outputDefined(){return!1}},nB=class nQ{constructor(r,t,a,i,o,s){this.inputType=r,this.type=t,this.input=a,this.cases=i,this.outputs=o,this.otherwise=s}static parse(r,t){if(r.length<5)return t.error(`Expected at least 4 arguments, but found only ${r.length-1}.`);if(r.length%2!=1)return t.error("Expected an even number of arguments.");let a,i;t.expectedType&&t.expectedType.kind!=="value"&&(i=t.expectedType);let o={},s=[];for(let u=2;u2**53-1)return h.error(`Branch labels must be integers no larger than ${2**53-1}.`);if(typeof p=="number"&&Math.floor(p)!==p)return h.error("Numeric branch labels must be integer values.");if(!a)a=Il(p);else if(h.checkSubtype(a,Il(p)))return null;if(o[String(p)]!==void 0)return h.error("Branch labels must be unique.");o[String(p)]=s.length}let d=t.parse(f,u,i);if(!d)return null;i||(i=d.type),s.push(d)}let l=t.parse(r[1],1,eo);if(!l)return null;let n=t.parse(r[r.length-1],r.length-1,i);return!n||l.type.kind!=="value"&&t.concat(1).checkSubtype(a,l.type)?null:new nQ(a,i,l,o,s,n)}evaluate(r){let t=this.input.evaluate(r);return(Il(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(r)}eachChild(r){r(this.input),this.outputs.forEach(r),r(this.otherwise)}outputDefined(){return this.outputs.every(r=>r.outputDefined())&&this.otherwise.outputDefined()}},oB=class oQ{constructor(r,t,a){this.type=r,this.branches=t,this.otherwise=a}static parse(r,t){if(r.length<4)return t.error(`Expected at least 3 arguments, but found only ${r.length-1}.`);if(r.length%2!=0)return t.error("Expected an odd number of arguments.");let a;t.expectedType&&t.expectedType.kind!=="value"&&(a=t.expectedType);let i=[];for(let s=1;st.outputDefined())&&this.otherwise.outputDefined()}},sB=class yD{constructor(r,t,a,i,o){this.type=r,this.input=t,this.beginIndex=a,this.key=i,this.endIndex=o}static parse(r,t){if(r.length<=2||r.length>=5)return t.error(`Expected 2 or 3 arguments, but found ${r.length-1} instead.`);let a=t.parse(r[1],1,eo),i=t.parse(r[2],2,mi);if(!a||!i)return null;if(!XM(a.type,[Uc(eo),Zn,eo]))return t.error(`Expected first argument to be of type array or string, but found ${dl(a.type)} instead`);if(r.length===4){let o=t.parse(r[3],3,mi);return o?new yD(a.type,a,i,t.key,o):null}return new yD(a.type,a,i,t.key)}evaluate(r){let t=this.input.evaluate(r),a=this.beginIndex.evaluate(r),i;if(this.endIndex&&(i=this.endIndex.evaluate(r)),Hv(t,["string"]))return[...t].slice(a,i).join("");if(Hv(t,["array"]))return t.slice(a,i);throw new Ys(`Expected first argument to be of type array or string, but found ${dl(Il(t))} instead.`,this.key)}eachChild(r){r(this.input),r(this.beginIndex),this.endIndex&&r(this.endIndex)}outputDefined(){return!1}},wS=class _D{constructor(r,t){this.type=r,this.args=t}static parse(r,t){if(r.length<2)return t.error("Expected at least one argument.");let a=null,i=t.expectedType;i&&i.kind!=="value"&&(a=i);let o=[];for(let s of r.slice(1)){let l=t.parse(s,1+o.length,a,void 0,{typeAnnotation:"omit"});if(!l)return null;a||(a=l.type),o.push(l)}if(!a)throw Error("No output type");return i&&o.some(s=>Hy(i,s.type))?new _D(eo,o):new _D(a,o)}evaluate(r){let t=null,a=0,i;for(let o of this.args)if(a++,t=o.evaluate(r),t&&t instanceof jd&&!t.available&&(i||(i=t.name),t=null,a===this.args.length&&(t=i)),t!==null)break;return t}eachChild(r){this.args.forEach(r)}outputDefined(){return this.args.every(r=>r.outputDefined())}},lB=u1("==",afe,tR),uB=u1("!=",ife,ufe),cB=u1("<",nfe,cfe),fB=u1(">",ofe,ffe),hB=u1("<=",sfe,hfe),dB=u1(">=",lfe,dfe),AS=class sQ{constructor(r,t,a){this.type=w_,this.locale=a,this.caseSensitive=r,this.diacriticSensitive=t}static parse(r,t){if(r.length!==2)return t.error("Expected one argument.");let a=r[1];if(typeof a!="object"||Array.isArray(a))return t.error("Collator options argument must be an object.");let i=t.parse(a["case-sensitive"]!==void 0&&a["case-sensitive"],1,mo);if(!i)return null;let o=t.parse(a["diacritic-sensitive"]!==void 0&&a["diacritic-sensitive"],1,mo);if(!o)return null;let s=null;return a.locale&&(s=t.parse(a.locale,1,Zn),!s)?null:new sQ(i,o,s)}evaluate(r){return new J2(this.caseSensitive.evaluate(r),this.diacriticSensitive.evaluate(r),this.locale?this.locale.evaluate(r):null)}eachChild(r){r(this.caseSensitive),r(this.diacriticSensitive),this.locale&&r(this.locale)}outputDefined(){return!1}},pB=class lQ{constructor(r,t,a,i,o,s){this.type=Zn,this.number=r,this.locale=t,this.currency=a,this.unit=i,this.minFractionDigits=o,this.maxFractionDigits=s}static parse(r,t){if(r.length!==3)return t.error("Expected two arguments.");let a=t.parse(r[1],1,mi);if(!a)return null;let i=r[2];if(typeof i!="object"||Array.isArray(i))return t.error("NumberFormat options argument must be an object.");let o=null;if(i.locale&&(o=t.parse(i.locale,1,Zn),!o))return null;let s=null;if(i.currency&&(s=t.parse(i.currency,1,Zn),!s))return null;let l=null;if(i.unit&&(l=t.parse(i.unit,1,Zn),!l))return null;if(s&&l)return t.error("NumberFormat options `currency` and `unit` are mutually exclusive");let n=null;if(i["min-fraction-digits"]&&(n=t.parse(i["min-fraction-digits"],1,mi),!n))return null;let u=null;return i["max-fraction-digits"]&&(u=t.parse(i["max-fraction-digits"],1,mi),!u)?null:new lQ(a,o,s,l,n,u)}evaluate(r){return new Intl.NumberFormat(this.locale?this.locale.evaluate(r):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(r):void 0,unit:this.unit?this.unit.evaluate(r):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(r):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(r):void 0}).format(this.number.evaluate(r))}eachChild(r){r(this.number),this.locale&&r(this.locale),this.currency&&r(this.currency),this.unit&&r(this.unit),this.minFractionDigits&&r(this.minFractionDigits),this.maxFractionDigits&&r(this.maxFractionDigits)}outputDefined(){return!1}},vB=class uQ{constructor(r){this.type=C1,this.input=r}static parse(r,t){if(r.length!==2)return t.error("Expected two arguments.");let a=t.parse(r[1],1,Zn);return a?new uQ(a):t.error("No image name provided.")}evaluate(r){let t=this.input.evaluate(r),a=jd.fromString(t);return a&&r.availableImages&&(a.available=r.availableImages.indexOf(t)>-1),a}eachChild(r){r(this.input)}outputDefined(){return!1}},mB=class cQ{constructor(r,t){this.input=r,this.key=t,this.type=mi}static parse(r,t){if(r.length!==2)return t.error(`Expected 1 argument, but found ${r.length-1} instead.`);let a=t.parse(r[1],1);return a?a.type.kind!=="array"&&a.type.kind!=="string"&&a.type.kind!=="value"?t.error(`Expected argument of type string or array, but found ${dl(a.type)} instead.`):new cQ(a,t.key):null}evaluate(r){let t=this.input.evaluate(r);if(typeof t=="string")return[...t].length;if(Array.isArray(t))return t.length;throw new Ys(`Expected value to be of type string or array, but found ${dl(Il(t))} instead.`,this.key)}eachChild(r){r(this.input)}outputDefined(){return!1}},Ud=8192,ew=class cA{constructor(r,t){this.type=mo,this.geojson=r,this.geometries=t}static parse(r,t){if(r.length!==2)return t.error(`'within' expression requires exactly one argument, but found ${r.length-1} instead.`);if(l1(r[1])){let a=r[1];if(a.type==="FeatureCollection"){let i=[];for(let o of a.features){let{type:s,coordinates:l}=o.geometry;s==="Polygon"&&i.push(l),s==="MultiPolygon"&&i.push(...l)}if(i.length)return new cA(a,{type:"MultiPolygon",coordinates:i})}else if(a.type==="Feature"){let i=a.geometry.type;if(i==="Polygon"||i==="MultiPolygon")return new cA(a,a.geometry)}else if(a.type==="Polygon"||a.type==="MultiPolygon")return new cA(a,a)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(r){if(r.geometry()!=null&&r.canonicalID()!=null){if(r.geometryType()==="Point")return Efe(r,this.geometries);if(r.geometryType()==="LineString")return Sfe(r,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},TS=class{constructor(e=[],r=(t,a)=>ta)){if(this.data=e,this.length=this.data.length,this.compare=r,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;let e=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:r,compare:t}=this,a=r[e];for(;e>0;){let i=e-1>>1,o=r[i];if(t(a,o)>=0)break;r[e]=o,e=i}r[e]=a}_down(e){let{data:r,compare:t}=this,a=this.length>>1,i=r[e];for(;e=0)break;r[e]=r[o],e=o}r[e]=i}},MS=Math.PI/180,tw=class{constructor(e){let r=MS*6378.137*1e3,t=Math.cos(e*MS),a=1/(1-.0066943799901413165*(1-t*t)),i=Math.sqrt(a);this.kx=r*i*t,this.ky=r*i*a*.9933056200098587}distance(e,r){let t=this.wrap(e[0]-r[0])*this.kx,a=(e[1]-r[1])*this.ky;return Math.sqrt(t*t+a*a)}pointOnLine(e,r){let t=1/0,a,i,o,s;for(let l=0;l1?(n=e[l+1][0],u=e[l+1][1]):h>0&&(n+=c/this.kx*h,u+=f/this.ky*h)),c=this.wrap(r[0]-n)*this.kx,f=(r[1]-u)*this.ky;let d=c*c+f*f;d180;)e-=360;return e}},rw=class fA{constructor(r,t){this.type=mi,this.geojson=r,this.geometries=t}static parse(r,t){if(r.length!==2)return t.error(`'distance' expression requires exactly one argument, but found ${r.length-1} instead.`);if(l1(r[1])){let a=r[1];if(a.type==="FeatureCollection")return new fA(a,a.features.map(i=>lE(i.geometry)).flat());if(a.type==="Feature")return new fA(a,lE(a.geometry));if("type"in a&&"coordinates"in a)return new fA(a,lE(a))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(r){if(r.geometry()!=null&&r.canonicalID()!=null){if(r.geometryType()==="Point")return Pfe(r,this.geometries);if(r.geometryType()==="LineString")return Ife(r,this.geometries);if(r.geometryType()==="Polygon")return Rfe(r,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},gB=class fQ{constructor(r){let t=null;for(let a of r)if(!t)t=a.type;else{if(t===a.type)continue;t=eo;break}this.type=Uc(t??eo,r.length),this.arr=r}static parse(r,t){if(r.length!==2)return t.error(`'semiliteral' expression requires exactly one argument, but found ${r.length-1} instead.`);if(!l1(r[1]))return t.error(`invalid value of type "${typeof r[1]}"`);let a=r[1],i=Il(a);if(i.kind==="array"){let o=a.map(s=>t.parse(s,null,eo));return new fQ(o)}return new rm(i,a)}evaluate(r){return this.arr.map(t=>t.evaluate(r))}eachChild(r){this.arr.forEach(r)}outputDefined(){return this.arr.every(r=>r.outputDefined())}},aw=class hQ{constructor(r){this.key=r,this.type=eo}static parse(r,t){if(r.length!==2)return t.error(`Expected 1 argument, but found ${r.length-1} instead.`);let a=r[1];return a==null?t.error("Global state property must be defined."):typeof a=="string"?new hQ(a):t.error(`Global state property must be string, but found ${typeof r[1]} instead.`)}evaluate(r){var t,a;let i=(t=r.globals)==null?void 0:t.globalState;return!i||Object.keys(i).length===0?null:(a=Wy(i,this.key))!=null?a:null}eachChild(){}outputDefined(){return!1}},im={"==":lB,"!=":uB,">":fB,"<":cB,">=":dB,"<=":hB,array:pp,at:rB,boolean:pp,case:oB,coalesce:wS,collator:AS,format:yS,image:vB,in:aB,"index-of":iB,interpolate:vh,"interpolate-hcl":vh,"interpolate-lab":vh,length:mB,let:xS,literal:rm,match:nB,number:pp,"number-format":pB,object:pp,semiliteral:gB,slice:sB,step:Q2,string:pp,"to-boolean":am,"to-color":am,"to-number":am,"to-string":am,var:bS,within:ew,distance:rw,"global-state":aw},qd=class extends Error{constructor(e,r){super(r),this.message=r,this.key=e}},yB=class dQ{constructor(r,t=[]){this.parent=r,this.bindings={};for(let[a,i]of t)this.bindings[a]=i}concat(r){return new dQ(this,r)}get(r){if(this.bindings[r])return this.bindings[r];if(this.parent)return this.parent.get(r);throw Error(`${r} not found in scope.`)}has(r){return this.bindings[r]?!0:this.parent?this.parent.has(r):!1}},ES=class pQ{constructor(r,t,a=[],i,o=new yB,s=[]){this.registry=r,this.path=a,this.key=a.map(l=>`[${l}]`).join(""),this.scope=o,this.errors=s,this.expectedType=i,this._isConstant=t}parse(r,t,a,i,o={}){return t?this.concat(t,a,i)._parse(r,o):this._parse(r,o)}_parse(r,t){(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number")&&(r=["literal",r]);let a=this.key;function i(o,s,l){return l==="assert"?new pp(s,[o],a):l==="coerce"?new am(s,[o],a):o}if(Array.isArray(r)){if(r.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let o=r[0];if(typeof o!="string")return this.error(`Expression name must be a string, but found ${typeof o} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let s=this.registry[o];if(s){let l=s.parse(r,this);if(!l)return null;if(this.expectedType){let n=this.expectedType,u=l.type;if((n.kind==="string"||n.kind==="number"||n.kind==="boolean"||n.kind==="object"||n.kind==="array")&&u.kind==="value")l=i(l,n,t.typeAnnotation||"assert");else if(n.kind==="projectionDefinition"&&["string","array","value"].includes(u.kind)||["color","formatted","resolvedImage"].includes(n.kind)&&["value","string"].includes(u.kind)||["padding","numberArray"].includes(n.kind)&&["value","number","array"].includes(u.kind)||n.kind==="colorArray"&&["value","string","array"].includes(u.kind)||n.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(u.kind))l=i(l,n,t.typeAnnotation||"coerce");else if(this.checkSubtype(n,u))return null}if(!(l instanceof rm)&&l.type.kind!=="resolvedImage"&&this._isConstant(l)){let n=new gS;try{l=new rm(l.type,l.evaluate(n))}catch(u){return this.error(u.message),null}}return l}return this.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0)}return r===void 0?this.error("'undefined' value invalid. Use null instead."):typeof r=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof r} instead.`)}concat(r,t,a){let i=typeof r=="number"?this.path.concat(r):this.path,o=a?this.scope.concat(a):this.scope;return new pQ(this.registry,this._isConstant,i,t||null,o,this.errors)}error(r,...t){let a=`${this.key}${t.map(i=>`[${i}]`).join("")}`;this.errors.push(new qd(a,r))}checkSubtype(r,t){let a=Hy(r,t);return a&&this.error(a),a}},R0=class zx{constructor(r,t,a,i,o){this.name=r,this.type=t,this._evaluate=a,this.args=i,this.key=o}evaluate(r){return this._evaluate(r,this.args,this.key)}eachChild(r){this.args.forEach(r)}outputDefined(){return!1}static parse(r,t){let a=r[0],i=zx.definitions[a];if(!i)return t.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0);let o=Array.isArray(i)?i[0]:i.type,s=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,l=s.filter(([u])=>!Array.isArray(u)||u.length===r.length-1),n=null;for(let[u,c]of l){n=new ES(t.registry,u2,t.path,null,t.scope);let f=[],h=!1;for(let d=1;dBfe(f)).join(" | "),c=[];for(let f=1;f{throw new Ys(r.evaluate(e),t)}],typeof:[Zn,[eo],(e,[r])=>dl(Il(r.evaluate(e)))],"to-rgba":[Uc(mi,4),[Hh],(e,[r])=>{let[t,a,i,o]=r.evaluate(e).rgb;return[t*255,a*255,i*255,o]}],rgb:[Hh,[mi,mi,mi],hR],rgba:[Hh,[mi,mi,mi,mi],hR],has:{type:mo,overloads:[[[Zn],(e,[r])=>dR(r.evaluate(e),e.properties())],[[Zn,I0],(e,[r,t])=>dR(r.evaluate(e),t.evaluate(e))]]},get:{type:eo,overloads:[[[Zn],(e,[r])=>uE(r.evaluate(e),e.properties())],[[Zn,I0],(e,[r,t])=>uE(r.evaluate(e),t.evaluate(e))]]},"feature-state":[eo,[Zn],(e,[r])=>uE(r.evaluate(e),e.featureState||{})],properties:[I0,[],e=>e.properties()],"geometry-type":[Zn,[],e=>e.geometryType()],id:[eo,[],e=>e.id()],zoom:[mi,[],e=>e.globals.zoom],"heatmap-density":[mi,[],e=>e.globals.heatmapDensity||0],elevation:[mi,[],e=>e.globals.elevation||0],"line-progress":[mi,[],e=>e.globals.lineProgress||0],accumulated:[eo,[],e=>e.globals.accumulated===void 0?null:e.globals.accumulated],"+":[mi,$v(mi),(e,r)=>{let t=0;for(let a of r)t+=a.evaluate(e);return t}],"*":[mi,$v(mi),(e,r)=>{let t=1;for(let a of r)t*=a.evaluate(e);return t}],"-":{type:mi,overloads:[[[mi,mi],(e,[r,t])=>r.evaluate(e)-t.evaluate(e)],[[mi],(e,[r])=>-r.evaluate(e)]]},"/":[mi,[mi,mi],(e,[r,t])=>r.evaluate(e)/t.evaluate(e)],"%":[mi,[mi,mi],(e,[r,t])=>r.evaluate(e)%t.evaluate(e)],ln2:[mi,[],()=>Math.LN2],pi:[mi,[],()=>Math.PI],e:[mi,[],()=>Math.E],"^":[mi,[mi,mi],(e,[r,t])=>r.evaluate(e)**+t.evaluate(e)],sqrt:[mi,[mi],(e,[r])=>Math.sqrt(r.evaluate(e))],log10:[mi,[mi],(e,[r])=>Math.log(r.evaluate(e))/Math.LN10],ln:[mi,[mi],(e,[r])=>Math.log(r.evaluate(e))],log2:[mi,[mi],(e,[r])=>Math.log(r.evaluate(e))/Math.LN2],sin:[mi,[mi],(e,[r])=>Math.sin(r.evaluate(e))],cos:[mi,[mi],(e,[r])=>Math.cos(r.evaluate(e))],tan:[mi,[mi],(e,[r])=>Math.tan(r.evaluate(e))],asin:[mi,[mi],(e,[r])=>Math.asin(r.evaluate(e))],acos:[mi,[mi],(e,[r])=>Math.acos(r.evaluate(e))],atan:[mi,[mi],(e,[r])=>Math.atan(r.evaluate(e))],min:[mi,$v(mi),(e,r)=>Math.min(...r.map(t=>t.evaluate(e)))],max:[mi,$v(mi),(e,r)=>Math.max(...r.map(t=>t.evaluate(e)))],abs:[mi,[mi],(e,[r])=>Math.abs(r.evaluate(e))],round:[mi,[mi],(e,[r])=>{let t=r.evaluate(e);return t<0?-Math.round(-t):Math.round(t)}],floor:[mi,[mi],(e,[r])=>Math.floor(r.evaluate(e))],ceil:[mi,[mi],(e,[r])=>Math.ceil(r.evaluate(e))],"filter-==":[mo,[Zn,eo],(e,[r,t])=>e.properties()[r.value]===t.value],"filter-id-==":[mo,[eo],(e,[r])=>e.id()===r.value],"filter-type-==":[mo,[Zn],(e,[r])=>e.geometryType()===r.value],"filter-<":[mo,[Zn,eo],(e,[r,t])=>{let a=e.properties()[r.value],i=t.value;return typeof a==typeof i&&a{let t=e.id(),a=r.value;return typeof t==typeof a&&t":[mo,[Zn,eo],(e,[r,t])=>{let a=e.properties()[r.value],i=t.value;return typeof a==typeof i&&a>i}],"filter-id->":[mo,[eo],(e,[r])=>{let t=e.id(),a=r.value;return typeof t==typeof a&&t>a}],"filter-<=":[mo,[Zn,eo],(e,[r,t])=>{let a=e.properties()[r.value],i=t.value;return typeof a==typeof i&&a<=i}],"filter-id-<=":[mo,[eo],(e,[r])=>{let t=e.id(),a=r.value;return typeof t==typeof a&&t<=a}],"filter->=":[mo,[Zn,eo],(e,[r,t])=>{let a=e.properties()[r.value],i=t.value;return typeof a==typeof i&&a>=i}],"filter-id->=":[mo,[eo],(e,[r])=>{let t=e.id(),a=r.value;return typeof t==typeof a&&t>=a}],"filter-has":[mo,[eo],(e,[r])=>{let t=r.value,a=e.properties();return t in a&&a[t]!==void 0}],"filter-has-id":[mo,[],e=>e.id()!==null&&e.id()!==void 0],"filter-type-in":[mo,[Uc(Zn)],(e,[r])=>r.value.indexOf(e.geometryType())>=0],"filter-id-in":[mo,[Uc(eo)],(e,[r])=>r.value.indexOf(e.id())>=0],"filter-in-small":[mo,[Zn,Uc(eo)],(e,[r,t])=>t.value.indexOf(e.properties()[r.value])>=0],"filter-in-large":[mo,[Zn,Uc(eo)],(e,[r,t])=>zfe(e.properties()[r.value],t.value,0,t.value.length-1)],all:{type:mo,overloads:[[[mo,mo],(e,[r,t])=>r.evaluate(e)&&t.evaluate(e)],[$v(mo),(e,r)=>{for(let t of r)if(!t.evaluate(e))return!1;return!0}]]},any:{type:mo,overloads:[[[mo,mo],(e,[r,t])=>r.evaluate(e)||t.evaluate(e)],[$v(mo),(e,r)=>{for(let t of r)if(t.evaluate(e))return!0;return!1}]]},"!":[mo,[mo],(e,[r])=>!r.evaluate(e)],"is-supported-script":[mo,[Zn],(e,[r])=>{let t=e.globals&&e.globals.isSupportedScript;return!t||t(r.evaluate(e))}],upcase:[Zn,[Zn],(e,[r])=>r.evaluate(e).toUpperCase()],downcase:[Zn,[Zn],(e,[r])=>r.evaluate(e).toLowerCase()],concat:[Zn,$v(eo),(e,r)=>r.map(t=>$y(t.evaluate(e))).join("")],split:[Uc(Zn),[Zn,Zn],(e,[r,t])=>r.evaluate(e).split(t.evaluate(e))],join:[Zn,[Uc(Zn),Zn],(e,[r,t])=>r.evaluate(e).join(t.evaluate(e))],"resolved-locale":[Zn,[w_],(e,[r])=>r.evaluate(e).resolvedLocale()]}),iw=/^(.*)-transition$/,nw=class{constructor(e,r,t,a){this.expression=e,this._warningHistory={},this._evaluator=new gS,this._defaultValue=t?xR(t):null,this._enumValues=t&&t.type==="enum"?t.values:null,this._globalState=a,this._rootKey=r}evaluateWithoutErrorHandling(e,r,t,a,i,o){return this._globalState&&(e=d1(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=r,this._evaluator.featureState=t,this._evaluator.canonical=a,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}evaluate(e,r,t,a,i,o){this._globalState&&(e=d1(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=r||null,this._evaluator.featureState=t||null,this._evaluator.canonical=a,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{let s=this.expression.evaluate(this._evaluator);if(s==null||typeof s=="number"&&s!==s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new Ys(`Expected value to be one of ${Object.keys(this._enumValues).map(l=>JSON.stringify(l)).join(", ")}, but found ${JSON.stringify(s)} instead.`,"");return s}catch(s){let l=s instanceof Ys?s.path:"",n=`${l}|${s.message}`;return this._warningHistory[n]||(this._warningHistory[n]=!0,typeof console<"u"&&console.warn(gR(this._rootKey,l,s.message,this._defaultValue))),this._defaultValue}}},D1=class{constructor(e,r,t){this.kind=e,this._styleExpression=r,this.isStateDependent=e!=="constant"&&!Ky(r.expression),this.globalStateRefs=e_(r.expression),this._globalState=t}evaluateWithoutErrorHandling(e,r,t,a,i,o){return this._globalState&&(e=d1(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,r,t,a,i,o)}evaluate(e,r,t,a,i,o){return this._globalState&&(e=d1(e,this._globalState)),this._styleExpression.evaluate(e,r,t,a,i,o)}},S_=class{constructor(e,r,t,a,i){this.kind=e,this.zoomStops=t,this._styleExpression=r,this.isStateDependent=e!=="camera"&&!Ky(r.expression),this.globalStateRefs=e_(r.expression),this.interpolationType=a,this._globalState=i}evaluateWithoutErrorHandling(e,r,t,a,i,o){return this._globalState&&(e=d1(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,r,t,a,i,o)}evaluate(e,r,t,a,i,o){return this._globalState&&(e=d1(e,this._globalState)),this._styleExpression.evaluate(e,r,t,a,i,o)}interpolationFactor(e,r,t){return this.interpolationType?vh.interpolationFactor(this.interpolationType,e,r,t):0}},SS=class vQ{constructor(r,t,a){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,yR(t),this._parameters=r,this._specification=a,this._rootKey=t,this._defaultValue=xR(a),this._warningHistory={};let i=vR(this._parameters,this._specification);this.kind=i.kind,this.interpolationFactor=i.interpolationFactor,this.zoomStops=i.zoomStops,this.interpolationType=i.interpolationType,this._innerEvaluate=i.evaluate}evaluate(r,t){try{return this._innerEvaluate(r,t)}catch(a){let i=a instanceof Error?a.message:String(a),o=`|${i}`;return this._warningHistory[o]||(this._warningHistory[o]=!0,typeof console<"u"&&console.warn(gR(this._rootKey,"",i,this._defaultValue))),this._defaultValue}}static deserialize(r){return new vQ(r._parameters,r._rootKey,r._specification)}static serialize(r){return{_parameters:r._parameters,_specification:r._specification,_rootKey:r._rootKey}}},_B={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},kS={promoteId:ahe},CS=1114111,xB=/^u\+(?:([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?|([0-9a-f]{0,5}\?{1,6}))$/i,DS={"*"(){return[]},array:mE,boolean:Qfe,number:y2,color:gE,constants:SR,enum:r_,filter:yE,function:kR,layer:PR,object:hh,source:IR,light:RR,sky:zR,terrain:BR,projection:che,projectionDefinition:fhe,string:D0,formatted:ihe,resolvedImage:nhe,padding:ohe,numberArray:she,colorArray:lhe,variableAnchorOffsetCollection:uhe,sprite:OR,state:NR,fontFaces:jR},dh.source=Gh(Vh(IR)),dh.sprite=Gh(Vh(OR)),dh.glyphs=Gh(Vh(UR)),dh.fontFaces=Gh(Vh(jR)),dh.light=Gh(Vh(RR)),dh.sky=Gh(Vh(zR)),dh.terrain=Gh(Vh(BR)),dh.state=Gh(Vh(NR)),dh.layer=Gh(Vh(PR)),dh.filter=Gh(Vh(yE)),dh.paintProperty=Gh(Vh(LR)),dh.layoutProperty=Gh(Vh(FR)),bB={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"},wB=class{constructor(e,r,t){this._rootKey=r,this._globalState=t,this.setValue(e)}evaluate(){var e;return(e=this._literalValue)!=null?e:this._compiledValue.evaluate({})}setValue(e){if(e==null||e==="visible"||e==="none"){this._literalValue=e==="none"?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let r=p2(e,this._rootKey,bB,this._globalState);if(r.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,Error(r.value.map(t=>`${t.key}: ${t.message}`).join(", "));this._literalValue=void 0,this._compiledValue=r.value,this._globalStateRefs=e_(r.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}},Af=dh,LS=new Set(Object.keys(ta).filter(e=>e.startsWith("source_")).map(e=>e.slice(7).replaceAll("_","-"))),ow=class mQ{constructor(r,t,a){let i=this.cells=[];if(r instanceof ArrayBuffer){this.arrayBuffer=r;let s=new Int32Array(this.arrayBuffer);r=s[0],t=s[1],a=s[2],this.d=t+2*a;for(let u=0;u=f[d+0]&&i>=f[d+1])?(l[h]=!0,s.push(c[h])):l[h]=!1}}}_forEachCell(r,t,a,i,o,s,l,n){let u=this._convertToCellCoord(r),c=this._convertToCellCoord(t),f=this._convertToCellCoord(a),h=this._convertToCellCoord(i);for(let d=u;d<=f;d++)for(let p=c;p<=h;p++){let g=this.d*p+d;if((!n||n(this._convertFromCellCoord(d),this._convertFromCellCoord(p),this._convertFromCellCoord(d+1),this._convertFromCellCoord(p+1)))&&o.call(this,r,t,a,i,g,s,l,n))return}}_convertFromCellCoord(r){return(r-this.padding)/this.scale}_convertToCellCoord(r){return Math.max(0,Math.min(this.d-1,Math.floor(r*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let r=this.cells,t=3+this.cells.length+1+1,a=0;for(let s of this.cells)a+=s.length;let i=new Int32Array(t+a+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;let o=t;for(let s=0;st?(this.lastIntegerZoom=t+1,this.lastIntegerZoomTime=r):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*t}:{fromScale:.5,toScale:1,t:1-(1-t)*r}}},lw="-transition",k_=class{constructor(e,r,t,a){this.property=e,this.value=r,this.expression=Wfe(r===void 0?e.specification.default:r,t,e.specification,a)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(e,r,t){return this.property.possiblyEvaluate(this,e,r,t)}},uw=class{constructor(e,r,t){this.property=e,this.value=new k_(e,void 0,r,t)}transitioned(e,r){return new FS(this.property,this.value,r,tn({},e.transition,this.transition),e.now)}untransitioned(){return new FS(this.property,this.value,null,{},0)}},C_=class{constructor(e,r,t){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=t,this._rootKey=r}_propertyRootKey(e){return`${this._rootKey}.${String(e)}`}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return jf(this._values[e].value.value)}setValue(e,r){Object.hasOwn(this._values,e)||(this._values[e]=new uw(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].value=new k_(this._values[e].property,r===null?void 0:jf(r),this._propertyRootKey(e),this._globalState)}getTransition(e){return jf(this._values[e].transition)}setTransition(e,r){Object.hasOwn(this._values,e)||(this._values[e]=new uw(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].transition=jf(r)||void 0}serialize(){let e={};for(let r of Object.keys(this._values)){let t=this.getValue(r);t!==void 0&&(e[r]=t);let a=this.getTransition(r);a!==void 0&&(e[`${r}${lw}`]=a)}return e}transitioned(e,r){let t=new PS(this._properties);for(let a of Object.keys(this._values))t._values[a]=this._values[a].transitioned(e,r._values[a]);return t}untransitioned(){let e=new PS(this._properties);for(let r of Object.keys(this._values))e._values[r]=this._values[r].untransitioned();return e}},FS=class{constructor(e,r,t,a,i){this.property=e,this.value=r,this.begin=i+a.delay||0,this.end=this.begin+a.duration||0,e.specification.transition&&(a.delay||a.duration)&&(this.prior=t)}possiblyEvaluate(e,r,t){let a=e.now||0,i=this.value.possiblyEvaluate(e,r,t),o=this.prior;if(!o)return i;if(a>this.end||this.value.isDataDriven())return this.prior=null,i;if(aa.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:t,to:r}}interpolate(e){return e}},IS=class{constructor(e,r){this.specification=e,this.name=r}possiblyEvaluate(e,r,t,a){if(e.value!==void 0){if(e.expression.kind==="constant"){let i=e.expression.evaluate(r,null,{},t,a);return this._calculate(i,i,i,r)}return this._calculate(e.expression.evaluate(new Ko(Math.floor(r.zoom-1),r)),e.expression.evaluate(new Ko(Math.floor(r.zoom),r)),e.expression.evaluate(new Ko(Math.floor(r.zoom+1),r)),r)}}_calculate(e,r,t,a){return a.zoom>a.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:t,to:r}}interpolate(e){return e}},L_=class{constructor(e,r){this.specification=e,this.name=r}possiblyEvaluate(e,r,t,a){return!!e.expression.evaluate(r,null,{},t,a)}interpolate(){return!1}},Du=class{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let r in e){let t=e[r];t.specification.overridable&&this.overridableProperties.push(r);let a=this.defaultPropertyValues[r]=new k_(t,void 0,t.name,void 0),i=this.defaultTransitionablePropertyValues[r]=new uw(t,t.name,void 0);this.defaultTransitioningPropertyValues[r]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=a.possiblyEvaluate({})}}},Ri("DataDrivenProperty",gn),Ri("DataConstantProperty",Ti),Ri("CrossFadedDataDrivenProperty",L1),Ri("CrossFadedProperty",IS),Ri("ColorRampProperty",L_),RS=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",cw=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?",Wh=class extends Zl{constructor(e,r,t){if(super(),this.id=e.id,this.type=e.type,this._globalState=t,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=vhe(this.visibility,`layers[${this.id}].layout.visibility`,t),e.type!=="custom"&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,e.type!=="background"&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=t_(e.filter,`layers[${this.id}].filter`,t)),r.layout&&(this._unevaluatedLayout=new AB(r.layout,`layers[${this.id}].layout`,t)),r.paint)){this._transitionablePaint=new C_(r.paint,`layers[${this.id}].paint`,t);for(let a in e.paint)this.setPaintProperty(a,e.paint[a],{validate:!1});for(let a in e.layout)this.setLayoutProperty(a,e.layout[a],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new D_(r.paint)}}setFilter(e){this.filter=e,this._featureFilter=t_(e,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){var r;if(e==="visibility")return this.visibility;if((r=this._transitionablePaint)!=null&&r.hasProperty(e))throw Error(e+RS);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${e}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(e)}getLayoutAffectingGlobalStateRefs(){let e=new Set;for(let r of this._visibilityExpression.getGlobalStateRefs())e.add(r);if(this._unevaluatedLayout)for(let r in this._unevaluatedLayout._values){let t=this._unevaluatedLayout._values[r];for(let a of t.getGlobalStateRefs())e.add(a)}for(let r of this._featureFilter.getGlobalStateRefs())e.add(r);return e}getPaintAffectingGlobalStateRefs(){var e;let r=new globalThis.Map;if(this._transitionablePaint)for(let t in this._transitionablePaint._values){let a=this._transitionablePaint._values[t].value;for(let i of a.getGlobalStateRefs()){let o=(e=r.get(i))!=null?e:[];o.push({name:t,value:a.value}),r.set(i,o)}}return r}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,r,t={}){var a;if(e==="visibility"){this.visibility=r,this._visibilityExpression.setValue(r),this.recalculateVisibility();return}if((a=this._transitionablePaint)!=null&&a.hasProperty(e)){this.fire(new mn(Error(e+RS)));return}r!=null&&this._validate(Af.layoutProperty,`layers.${this.id}.layout.${e}`,e,r,t)||this._unevaluatedLayout.setValue(e,r)}getPaintProperty(e){var r,t;if(e.endsWith("-transition")){let a=e.slice(0,-11);if(a==="visibility"||(r=this._unevaluatedLayout)!=null&&r.hasProperty(a))throw Error(e+cw);return this._transitionablePaint.getTransition(a)}if(e==="visibility"||(t=this._unevaluatedLayout)!=null&&t.hasProperty(e))throw Error(e+cw);return this._transitionablePaint.getValue(e)}setPaintProperty(e,r,t={}){var a;if(e==="visibility"||(a=this._unevaluatedLayout)!=null&&a.hasProperty(e))return this.fire(new mn(Error(e+cw))),!1;if(r!=null&&this._validate(Af.paintProperty,`layers.${this.id}.paint.${e}`,e,r,t))return!1;if(e.endsWith("-transition"))return this._transitionablePaint.setTransition(e.slice(0,-11),r||void 0),!1;{let i=this._transitionablePaint._values[e],o=i.property.specification["property-type"]==="cross-faded-data-driven",s=i.value.isDataDriven(),l=i.value;this._transitionablePaint.setValue(e,r),this._handleSpecialPaintPropertyUpdate(e);let n=this._transitionablePaint._values[e].value;return n.isDataDriven()||s||o||this._handleOverridablePaintPropertyUpdate(e,l,n)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,r,t){return!1}isHidden(e=this.minzoom,r=!1){return this.minzoom&&e<(r?Math.floor(this.minzoom):this.minzoom)||this.maxzoom&&e>=this.maxzoom?!0:this._evaluatedVisibility==="none"}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,r){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,r)}serialize(){var e,r;let t={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:(e=this._unevaluatedLayout)==null?void 0:e.serialize(),paint:(r=this._transitionablePaint)==null?void 0:r.serialize()};return this.visibility&&(t.layout||(t.layout={}),t.layout.visibility=this.visibility),jI(t,(a,i)=>a!==void 0&&!(i==="layout"&&!Object.keys(a).length)&&!(i==="paint"&&!Object.keys(a).length))}_validate(e,r,t,a,i={}){return i_(this,e,{key:r,layerType:this.type,objectKey:t,value:a},i)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let r=this.paint.get(e);if(r instanceof mh&&f1(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}},MB=()=>TB||(TB=new Du({"raster-opacity":new Ti(ta.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new Ti(ta.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new Ti(ta.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new Ti(ta.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new Ti(ta.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new Ti(ta.paint_raster["raster-contrast"],"raster-contrast"),resampling:new Ti(ta.paint_raster.resampling,"resampling"),"raster-resampling":new Ti(ta.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new Ti(ta.paint_raster["raster-fade-duration"],"raster-fade-duration")})),EB={get paint(){return MB()}},fw=e=>e.type==="raster",SB=class extends Wh{constructor(e,r){super(e,EB,r)}},kB={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},F1=class{constructor(e,r){this._structArray=e,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},nl=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,r){return e._trim(),r&&(e.isTransferred=!0,r.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let r=Object.create(this.prototype);return r.arrayBuffer=e.arrayBuffer,r.length=e.length,r.capacity=e.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}_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(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*5),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}},P1=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r){let t=this.length;return this.resize(t+1),this.emplace(t,e,r)}emplace(e,r,t){let a=e*2;return this.int16[a+0]=r,this.int16[a+1]=t,e}},P1.prototype.bytesPerElement=4,Ri("StructArrayLayout2i4",P1),F_=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t){let a=this.length;return this.resize(a+1),this.emplace(a,e,r,t)}emplace(e,r,t,a){let i=e*3;return this.int16[i+0]=r,this.int16[i+1]=t,this.int16[i+2]=a,e}},F_.prototype.bytesPerElement=6,Ri("StructArrayLayout3i6",F_),hw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a){let i=this.length;return this.resize(i+1),this.emplace(i,e,r,t,a)}emplace(e,r,t,a,i){let o=e*4;return this.int16[o+0]=r,this.int16[o+1]=t,this.int16[o+2]=a,this.int16[o+3]=i,e}},hw.prototype.bytesPerElement=8,Ri("StructArrayLayout4i8",hw),dw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o){let s=this.length;return this.resize(s+1),this.emplace(s,e,r,t,a,i,o)}emplace(e,r,t,a,i,o,s){let l=e*6;return this.int16[l+0]=r,this.int16[l+1]=t,this.int16[l+2]=a,this.int16[l+3]=i,this.int16[l+4]=o,this.int16[l+5]=s,e}},dw.prototype.bytesPerElement=12,Ri("StructArrayLayout2i4i12",dw),pw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o){let s=this.length;return this.resize(s+1),this.emplace(s,e,r,t,a,i,o)}emplace(e,r,t,a,i,o,s){let l=e*4,n=e*8;return this.int16[l+0]=r,this.int16[l+1]=t,this.uint8[n+4]=a,this.uint8[n+5]=i,this.uint8[n+6]=o,this.uint8[n+7]=s,e}},pw.prototype.bytesPerElement=8,Ri("StructArrayLayout2i4ub8",pw),I1=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r){let t=this.length;return this.resize(t+1),this.emplace(t,e,r)}emplace(e,r,t){let a=e*2;return this.float32[a+0]=r,this.float32[a+1]=t,e}},I1.prototype.bytesPerElement=8,Ri("StructArrayLayout2f8",I1),vw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o,s,l,n,u){let c=this.length;return this.resize(c+1),this.emplace(c,e,r,t,a,i,o,s,l,n,u)}emplace(e,r,t,a,i,o,s,l,n,u,c){let f=e*10;return this.uint16[f+0]=r,this.uint16[f+1]=t,this.uint16[f+2]=a,this.uint16[f+3]=i,this.uint16[f+4]=o,this.uint16[f+5]=s,this.uint16[f+6]=l,this.uint16[f+7]=n,this.uint16[f+8]=u,this.uint16[f+9]=c,e}},vw.prototype.bytesPerElement=20,Ri("StructArrayLayout10ui20",vw),mw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o,s,l){let n=this.length;return this.resize(n+1),this.emplace(n,e,r,t,a,i,o,s,l)}emplace(e,r,t,a,i,o,s,l,n){let u=e*8;return this.uint16[u+0]=r,this.uint16[u+1]=t,this.uint16[u+2]=a,this.uint16[u+3]=i,this.uint16[u+4]=o,this.uint16[u+5]=s,this.uint16[u+6]=l,this.uint16[u+7]=n,e}},mw.prototype.bytesPerElement=16,Ri("StructArrayLayout8ui16",mw),gw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o,s,l,n,u,c,f,h){let d=this.length;return this.resize(d+1),this.emplace(d,e,r,t,a,i,o,s,l,n,u,c,f,h)}emplace(e,r,t,a,i,o,s,l,n,u,c,f,h,d){let p=e*14,g=e*7;return this.int16[p+0]=r,this.int16[p+1]=t,this.int16[p+2]=a,this.int16[p+3]=i,this.uint16[p+4]=o,this.uint16[p+5]=s,this.uint16[p+6]=l,this.uint16[p+7]=n,this.int16[p+8]=u,this.int16[p+9]=c,this.int16[p+10]=f,this.int16[p+11]=h,this.float32[g+6]=d,e}},gw.prototype.bytesPerElement=28,Ri("StructArrayLayout4i4ui4i1f28",gw),yw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,t){let a=this.length;return this.resize(a+1),this.emplace(a,e,r,t)}emplace(e,r,t,a){let i=e*3;return this.float32[i+0]=r,this.float32[i+1]=t,this.float32[i+2]=a,e}},yw.prototype.bytesPerElement=12,Ri("StructArrayLayout3f12",yw),_w=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){let t=e*1;return this.uint32[t+0]=r,e}},_w.prototype.bytesPerElement=4,Ri("StructArrayLayout1ul4",_w),xw=class extends nl{_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(e,r,t,a,i,o,s,l,n){let u=this.length;return this.resize(u+1),this.emplace(u,e,r,t,a,i,o,s,l,n)}emplace(e,r,t,a,i,o,s,l,n,u){let c=e*10,f=e*5;return this.int16[c+0]=r,this.int16[c+1]=t,this.int16[c+2]=a,this.int16[c+3]=i,this.int16[c+4]=o,this.int16[c+5]=s,this.uint32[f+3]=l,this.uint16[c+8]=n,this.uint16[c+9]=u,e}},xw.prototype.bytesPerElement=20,Ri("StructArrayLayout6i1ul2ui20",xw),bw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o){let s=this.length;return this.resize(s+1),this.emplace(s,e,r,t,a,i,o)}emplace(e,r,t,a,i,o,s){let l=e*6;return this.int16[l+0]=r,this.int16[l+1]=t,this.int16[l+2]=a,this.int16[l+3]=i,this.int16[l+4]=o,this.int16[l+5]=s,e}},bw.prototype.bytesPerElement=12,Ri("StructArrayLayout2i2i2i12",bw),ww=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i){let o=this.length;return this.resize(o+1),this.emplace(o,e,r,t,a,i)}emplace(e,r,t,a,i,o){let s=e*4,l=e*8;return this.float32[s+0]=r,this.float32[s+1]=t,this.float32[s+2]=a,this.int16[l+6]=i,this.int16[l+7]=o,e}},ww.prototype.bytesPerElement=16,Ri("StructArrayLayout2f1f2i16",ww),Aw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,t,a,i,o){let s=this.length;return this.resize(s+1),this.emplace(s,e,r,t,a,i,o)}emplace(e,r,t,a,i,o,s){let l=e*16,n=e*4,u=e*8;return this.uint8[l+0]=r,this.uint8[l+1]=t,this.float32[n+1]=a,this.float32[n+2]=i,this.int16[u+6]=o,this.int16[u+7]=s,e}},Aw.prototype.bytesPerElement=16,Ri("StructArrayLayout2ub2f2i16",Aw),P_=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,t){let a=this.length;return this.resize(a+1),this.emplace(a,e,r,t)}emplace(e,r,t,a){let i=e*3;return this.uint16[i+0]=r,this.uint16[i+1]=t,this.uint16[i+2]=a,e}},P_.prototype.bytesPerElement=6,Ri("StructArrayLayout3ui6",P_),Tw=class extends nl{_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(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y){let _=this.length;return this.resize(_+1),this.emplace(_,e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y)}emplace(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_){let v=e*26,x=e*13,E=e*52;return this.int16[v+0]=r,this.int16[v+1]=t,this.uint16[v+2]=a,this.uint16[v+3]=i,this.uint32[x+2]=o,this.uint32[x+3]=s,this.uint32[x+4]=l,this.uint16[v+10]=n,this.uint16[v+11]=u,this.uint16[v+12]=c,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[E+36]=d,this.uint8[E+37]=p,this.uint8[E+38]=g,this.uint32[x+10]=m,this.int16[v+22]=y,this.float32[x+12]=_,e}},Tw.prototype.bytesPerElement=52,Ri("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",Tw),Mw=class extends nl{_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(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_,v,x,E,M,C,w,k,T,b,S){let A=this.length;return this.resize(A+1),this.emplace(A,e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_,v,x,E,M,C,w,k,T,b,S)}emplace(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_,v,x,E,M,C,w,k,T,b,S,A){let F=e*34,D=e*17;return this.int16[F+0]=r,this.int16[F+1]=t,this.int16[F+2]=a,this.int16[F+3]=i,this.int16[F+4]=o,this.int16[F+5]=s,this.int16[F+6]=l,this.int16[F+7]=n,this.uint16[F+8]=u,this.uint16[F+9]=c,this.uint16[F+10]=f,this.uint16[F+11]=h,this.uint16[F+12]=d,this.uint16[F+13]=p,this.uint16[F+14]=g,this.uint16[F+15]=m,this.uint16[F+16]=y,this.uint16[F+17]=_,this.uint16[F+18]=v,this.uint16[F+19]=x,this.uint16[F+20]=E,this.uint16[F+21]=M,this.uint16[F+22]=C,this.uint32[D+12]=w,this.float32[D+13]=k,this.float32[D+14]=T,this.uint16[F+30]=b,this.uint16[F+31]=S,this.float32[D+16]=A,e}},Mw.prototype.bytesPerElement=68,Ri("StructArrayLayout8i15ui1ul2f2ui1f68",Mw),I_=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){let t=e*1;return this.float32[t+0]=r,e}},I_.prototype.bytesPerElement=4,Ri("StructArrayLayout1f4",I_),Ew=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,t){let a=this.length;return this.resize(a+1),this.emplace(a,e,r,t)}emplace(e,r,t,a){let i=e*6,o=e*3;return this.uint16[i+0]=r,this.float32[o+1]=t,this.float32[o+2]=a,e}},Ew.prototype.bytesPerElement=12,Ri("StructArrayLayout1ui2f12",Ew),Sw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,t){let a=this.length;return this.resize(a+1),this.emplace(a,e,r,t)}emplace(e,r,t,a){let i=e*2,o=e*4;return this.uint32[i+0]=r,this.uint16[o+2]=t,this.uint16[o+3]=a,e}},Sw.prototype.bytesPerElement=8,Ri("StructArrayLayout1ul2ui8",Sw),kw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r){let t=this.length;return this.resize(t+1),this.emplace(t,e,r)}emplace(e,r,t){let a=e*2;return this.uint16[a+0]=r,this.uint16[a+1]=t,e}},kw.prototype.bytesPerElement=4,Ri("StructArrayLayout2ui4",kw),Cw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){let t=e*1;return this.uint16[t+0]=r,e}},Cw.prototype.bytesPerElement=2,Ri("StructArrayLayout1ui2",Cw),Dw=class extends nl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,t,a){let i=this.length;return this.resize(i+1),this.emplace(i,e,r,t,a)}emplace(e,r,t,a,i){let o=e*4;return this.float32[o+0]=r,this.float32[o+1]=t,this.float32[o+2]=a,this.float32[o+3]=i,e}},Dw.prototype.bytesPerElement=16,Ri("StructArrayLayout4f16",Dw),zS=class extends F1{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 zr(this.anchorPointX,this.anchorPointY)}},zS.prototype.size=20,BS=class extends xw{get(e){return new zS(this,e)}},Ri("CollisionBoxArray",BS),OS=class extends F1{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(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}},OS.prototype.size=52,NS=class extends Tw{get(e){return new OS(this,e)}},Ri("PlacedSymbolArray",NS),jS=class extends F1{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(e){this._structArray.uint32[this._pos4+12]=e}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]}get heightOffset(){return this._structArray.float32[this._pos4+16]}},jS.prototype.size=68,US=class extends Mw{get(e){return new jS(this,e)}},Ri("SymbolInstanceArray",US),qS=class extends I_{getoffsetX(e){return this.float32[e*1+0]}},Ri("GlyphOffsetArray",qS),VS=class extends F_{getx(e){return this.int16[e*3+0]}gety(e){return this.int16[e*3+1]}gettileUnitDistanceFromAnchor(e){return this.int16[e*3+2]}},Ri("SymbolLineVertexArray",VS),GS=class extends F1{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]}},GS.prototype.size=12,HS=class extends Ew{get(e){return new GS(this,e)}},Ri("TextAnchorOffsetArray",HS),WS=class extends F1{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]}},WS.prototype.size=8,$S=class extends Sw{get(e){return new WS(this,e)}},Ri("FeatureIndexArray",$S),Kp=class extends P1{},CB=class extends F_{},DB=class extends hw{},LB=class extends P1{},FB=class extends P1{},PB=class extends dw{},IB=class extends pw{},RB=class extends I1{},nm=class extends vw{},YS=class extends mw{},zB=class extends gw{},BB=class extends yw{},OB=class extends _w{},XS=class extends bw{},NB=class extends ww{},jB=class extends Aw{},UB=class extends P_{},Vd=class extends P_{},Lw=class extends kw{},qB=class extends Cw{},Fw=pl([{name:"a_pos",components:2,type:"Int16"}],4),VB=Fw.members,Fw.size,Fw.alignment,Zs=class ly{constructor(r=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=r}prepareSegment(r,t,a,i){let o=this.segments[this.segments.length-1];return r>ly.MAX_VERTEX_ARRAY_LENGTH&&vo(`Max vertices per segment is ${ly.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${r}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${ly.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!o||o.vertexLength+r>ly.MAX_VERTEX_ARRAY_LENGTH||o.sortKey!==i?this.createNewSegment(t,a,i):o}createNewSegment(r,t,a){let i={vertexOffset:r.length,primitiveOffset:t.length,vertexLength:0,primitiveLength:0,vaos:{}};return a!==void 0&&(i.sortKey=a),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(i),i}getOrCreateLatestSegment(r,t,a){return this.prepareSegment(0,r,t,a)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let r of this.segments)for(let t in r.vaos)r.vaos[t].destroy()}static simpleSegment(r,t,a,i){return new ly([{vertexOffset:r,primitiveOffset:t,vertexLength:a,primitiveLength:i,vaos:{},sortKey:0}])}},Zs.MAX_VERTEX_ARRAY_LENGTH=2**16-1,Ri("SegmentVector",Zs),GB=pl([{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"}]),HB=pl([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]),WB=V2(((e,r)=>{function t(a,i){for(var o=a.length&3,s=a.length-o,l=i,n,u=3432918353,c=461845907,f,h=0;h>>16)*u&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,l^=f,l=l<<13|l>>>19,n=(l&65535)*5+(((l>>>16)*5&65535)<<16)&4294967295,l=(n&65535)+27492+(((n>>>16)+58964&65535)<<16);switch(f=0,o){case 3:f^=(a.charCodeAt(h+2)&255)<<16;case 2:f^=(a.charCodeAt(h+1)&255)<<8;case 1:f^=a.charCodeAt(h)&255,f=(f&65535)*u+(((f>>>16)*u&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,l^=f}return l^=a.length,l^=l>>>16,l=(l&65535)*2246822507+(((l>>>16)*2246822507&65535)<<16)&4294967295,l^=l>>>13,l=(l&65535)*3266489909+(((l>>>16)*3266489909&65535)<<16)&4294967295,l^=l>>>16,l>>>0}r!==void 0&&(r.exports=t)})),$B=V2(((e,r)=>{function t(a,i){for(var o=a.length,s=i^o,l=0,n;o>=4;)n=a.charCodeAt(l)&255|(a.charCodeAt(++l)&255)<<8|(a.charCodeAt(++l)&255)<<16|(a.charCodeAt(++l)&255)<<24,n=(n&65535)*1540483477+(((n>>>16)*1540483477&65535)<<16),n^=n>>>24,n=(n&65535)*1540483477+(((n>>>16)*1540483477&65535)<<16),s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)^n,o-=4,++l;switch(o){case 3:s^=(a.charCodeAt(l+2)&255)<<16;case 2:s^=(a.charCodeAt(l+1)&255)<<8;case 1:s^=a.charCodeAt(l)&255,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)}return s^=s>>>13,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>15,s>>>0}r.exports=t})),Pw=Oz(V2(((e,r)=>{var t=WB(),a=$B();r.exports=t,r.exports.murmur3=t,r.exports.murmur2=a}))(),1),ZS=class gQ{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(r,t,a,i){this.ids.push(ZR(r)),this.positions.push(t,a,i)}getPositions(r){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let t=ZR(r),a=0,i=this.ids.length-1;for(;a>1;this.ids[s]>=t?i=s:a=s+1}let o=[];for(;this.ids[a]===t;){let s=this.positions[3*a],l=this.positions[3*a+1],n=this.positions[3*a+2];o.push({index:s,start:l,end:n}),a++}return o}static serialize(r,t){let a=new Float64Array(r.ids),i=new Uint32Array(r.positions);return wE(a,i,0,a.length-1),t&&t.push(a.buffer,i.buffer),{ids:a,positions:i}}static deserialize(r){let t=new gQ;return t.ids=r.ids,t.positions=r.positions,t.indexed=!0,t}},Ri("FeaturePositionMap",ZS),mp=class{constructor(e,r){this.gl=e.gl,this.location=r}},fn=class extends mp{constructor(e,r){super(e,r),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},Di=class extends mp{constructor(e,r){super(e,r),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}},no=class extends mp{constructor(e,r){super(e,r),this.current=[0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},qc=class extends mp{constructor(e,r){super(e,r),this.current=[0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},R1=class extends mp{constructor(e,r){super(e,r),this.current=[0,0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}},Jp=class extends mp{constructor(e,r){super(e,r),this.current=Hn.transparent}set(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}},KS=class extends mp{constructor(e,r){super(e,r),this.current=[]}set(e){if(e!=this.current){this.current=e;let r=new Float32Array(e.length*4);for(let t=0;t`u_${a}`),this.type=t}setUniform(e,r,t){e.set(t.constantOr(this.value))}getBinding(e,r,t){return this.type==="color"?new Jp(e,r):new Di(e,r)}},z0=class{constructor(e,r){this.uniformNames=r.map(t=>`u_${t}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=e.tlbr}setConstantDashPositions(e,r){this.dashTo=[0,e.y,e.height,e.width],this.dashFrom=[0,r.y,r.height,r.width]}setUniform(e,r,t,a){let i=null;a==="u_pattern_to"?i=this.patternTo:a==="u_pattern_from"?i=this.patternFrom:a==="u_dasharray_to"?i=this.dashTo:a==="u_dasharray_from"?i=this.dashFrom:a==="u_pixel_ratio_to"?i=this.pixelRatioTo:a==="u_pixel_ratio_from"&&(i=this.pixelRatioFrom),i!==null&&e.set(i)}getBinding(e,r,t){return t.startsWith("u_pattern")||t.startsWith("u_dasharray_")?new R1(e,r):new Di(e,r)}},gp=class{constructor(e,r,t,a){this.expression=e,this.type=t,this.maxValue=0,this.paintVertexAttributes=r.map(i=>({name:`a_${i}`,type:"Float32",components:t==="color"?2:1,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,r,t){let a=this.paintVertexArray.length,i=this.expression.evaluate(new Ko(0,t),r,{},t.canonical,[],t.formattedSection);this.paintVertexArray.resize(e),this._setPaintValue(a,e,i)}updatePaintArray(e,r,t,a,i){let o=this.expression.evaluate(new Ko(0,i),t,a);this._setPaintValue(e,r,o)}_setPaintValue(e,r,t){if(this.type==="color"){let a=AE(t);for(let i=e;i`u_${s}_t`),this.type=t,this.useIntegerZoom=a,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=r.map(s=>({name:`a_${s}`,type:"Float32",components:t==="color"?4:2,offset:0})),this.paintVertexArray=new o}populatePaintArray(e,r,t){let a=this.expression.evaluate(new Ko(this.zoom,t),r,{},t.canonical,[],t.formattedSection),i=this.expression.evaluate(new Ko(this.zoom+1,t),r,{},t.canonical,[],t.formattedSection),o=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(o,e,a,i)}updatePaintArray(e,r,t,a,i){let o=this.expression.evaluate(new Ko(this.zoom,i),t,a),s=this.expression.evaluate(new Ko(this.zoom+1,i),t,a);this._setPaintValue(e,r,o,s)}_setPaintValue(e,r,t,a){if(this.type==="color"){let i=AE(t),o=AE(a);for(let s=e;s`#define HAS_UNIFORM_${a}`))}return e}getBinderAttributes(){let e=[];for(let r in this.binders){let t=this.binders[r];if(t instanceof gp||t instanceof Yh)for(let a of t.paintVertexAttributes)e.push(a.name);else if(t instanceof Qp){let a=t.getVertexAttributes();for(let i of a)e.push(i.name)}}return e}getBinderUniforms(){let e=[];for(let r in this.binders){let t=this.binders[r];if(t instanceof z1||t instanceof z0||t instanceof Yh)for(let a of t.uniformNames)e.push(a)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,r){let t=[];for(let a in this.binders){let i=this.binders[a];if(i instanceof z1||i instanceof z0||i instanceof Yh){for(let o of i.uniformNames)if(r[o]){let s=i.getBinding(e,r[o],o);t.push({name:o,property:a,binding:s})}}}return t}setUniforms(e,r,t,a){for(let{name:i,property:o,binding:s}of r)this.binders[o].setUniform(s,a,t.get(o),i)}updatePaintBuffers(e){this._buffers=[];for(let r in this.binders){let t=this.binders[r];if(e&&t instanceof Qp){let a=e.fromScale===2?t.zoomInPaintVertexBuffer:t.zoomOutPaintVertexBuffer;a&&this._buffers.push(a)}else(t instanceof gp||t instanceof Yh)&&t.paintVertexBuffer&&this._buffers.push(t.paintVertexBuffer)}}upload(e){for(let r in this.binders){let t=this.binders[r];(t instanceof gp||t instanceof Yh||t instanceof Qp)&&t.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let r=this.binders[e];(r instanceof gp||r instanceof Yh||r instanceof Qp)&&r.destroy()}}},B0=class{constructor(e,r,t=()=>!0){this.programConfigurations={};for(let a of e)this.programConfigurations[a.id]=new tk(a,r,t);this.needsUpload=!1,this._featureMap=new ZS,this._bufferOffset=0}populatePaintArrays(e,r,t,a){for(let i in this.programConfigurations)this.programConfigurations[i].populatePaintArrays(e,r,a);r.id!==void 0&&this._featureMap.add(r.id,t,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,r,t,a){for(let i of t)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,r,i,a)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let r in this.programConfigurations)this.programConfigurations[r].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}},Ri("ConstantBinder",z1),Ri("CrossFadedConstantBinder",z0),Ri("SourceExpressionBinder",gp),Ri("CrossFadedPatternBinder",QS),Ri("CrossFadedDasharrayBinder",ek),Ri("CompositeExpressionBinder",Yh),Ri("ProgramConfiguration",tk,{omit:["_buffers"]}),Ri("ProgramConfigurationSet",B0),Iw=2**14-1,rk=-Iw-1,ak=-32768,Rw=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new LB,this.indexArray=new Vd,this.segments=new Zs,this.programConfigurations=new B0(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,t){let a=this.layers[0],i=[],o=null,s=!1,l=a.type==="heatmap";if(a.type==="circle"){let f=a;o=f.layout.get("circle-sort-key"),s=!o.isConstant(),l||(l=f.paint.get("circle-pitch-alignment")==="map")}let n=l?r.subdivisionGranularity.circle:1,u=new Ko(this.zoom),c=this.layers[0]._featureFilter.needGeometry;for(let{feature:f,id:h,index:d,sourceLayerIndex:p}of e){let g=Zv(f,c);if(!this.layers[0]._featureFilter.filter(u,g,t))continue;let m=s?o.evaluate(g,{},t):void 0,y={id:h,properties:f.properties,type:f.type,sourceLayerIndex:p,index:d,geometry:c?g.geometry:Xv(f),patterns:{},sortKey:m};i.push(y)}s&&i.sort((f,h)=>f.sortKey-h.sortKey);for(let f of i){let{geometry:h,index:d,sourceLayerIndex:p}=f,g=e[d].feature;this.addFeature(f,h,d,t,n),r.featureIndex.insert(g,h,d,p,this.index)}}update(e,r,t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,{imagePositions:t})}addFeatures(e){}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,VB),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,r,t,a,i=1){let o;switch(i){case 1:o=[0,7];break;case 3:o=[0,2,5,7];break;case 5:o=[0,1,3,4,6,7];break;case 7:o=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${i}; valid values are 1, 3, 5, 7.`)}let s=o.length;for(let l of r)for(let n of l){let u=n.x,c=n.y;if(u<0||u>=8192||c<0||c>=8192)continue;let f=this.segments.prepareSegment(s*s,this.layoutVertexArray,this.indexArray,e.sortKey),h=f.vertexLength;for(let d=0;dXB||(XB=new Du({"circle-sort-key":new gn(ta.layout_circle["circle-sort-key"],"circle-sort-key")})),JB=()=>KB||(KB=new Du({"circle-radius":new gn(ta.paint_circle["circle-radius"],"circle-radius"),"circle-color":new gn(ta.paint_circle["circle-color"],"circle-color"),"circle-blur":new gn(ta.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new gn(ta.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new Ti(ta.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new Ti(ta.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new Ti(ta.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new Ti(ta.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new gn(ta.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new gn(ta.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new gn(ta.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})),QB={get paint(){return JB()},get layout(){return ZB()}},eO=e=>e.type==="circle",tO=class extends Wh{constructor(e,r){super(e,QB,r)}createBucket(e){return new Rw(e)}queryRadius(e){let r=e;return m1("circle-radius",this,r)+m1("circle-stroke-width",this,r)+b2(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:t,geometry:a,transform:i,pixelsToTileUnits:o,unwrappedTileID:s,getElevation:l}){let n=w2(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-i.bearingInRadians,o),u=this.paint.get("circle-radius").evaluate(r,t)+this.paint.get("circle-stroke-width").evaluate(r,t),c=this.paint.get("circle-pitch-scale"),f=this.paint.get("circle-pitch-alignment"),h,d;return f==="map"?(h=n,d=u*o):(h=Phe(n,i,s,l),d=u),r5({queryGeometry:h,size:d,transform:i,unwrappedTileID:s,getElevation:l,pitchAlignment:f,pitchScale:c},a)}},ik=class extends Rw{},Ri("HeatmapBucket",ik,{omit:["layers"]}),aO=()=>rO||(rO=new Du({"heatmap-radius":new gn(ta.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new gn(ta.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new Ti(ta.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new L_(ta.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new Ti(ta.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})),iO={get paint(){return aO()}},zw=class yQ{constructor(r,t){SE(this,r,1,t)}resize(r){a5(this,r,1)}clone(){return new yQ({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(r,t,a,i,o){kE(r,t,a,i,o,1)}},Ls=class _Q{constructor(r,t){SE(this,r,4,t)}resize(r){a5(this,r,4)}replace(r,t){t?this.data.set(r):this.data=r instanceof Uint8ClampedArray?new Uint8Array(r.buffer):r}clone(){return new _Q({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(r,t,a,i,o){kE(r,t,a,i,o,4)}setPixel(r,t,a){let i=(r*this.width+t)*4;this.data[i+0]=Math.round(a.r*255/a.a),this.data[i+1]=Math.round(a.g*255/a.a),this.data[i+2]=Math.round(a.b*255/a.a),this.data[i+3]=Math.round(a.a*255)}},Ri("AlphaImage",zw),Ri("RGBAImage",Ls),R_="big-fb",nO=e=>e.type==="heatmap",oO=class extends Wh{createBucket(e){return new ik(e)}constructor(e,r){super(e,iO,r),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){e==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){let e=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=i5({expression:e,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has("big-fb")&&this.heatmapFbos.delete(R_)}queryRadius(e){return m1("heatmap-radius",this,e)}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:t,geometry:a,transform:i,pixelsToTileUnits:o,unwrappedTileID:s,getElevation:l}){return r5({queryGeometry:e,size:this.paint.get("heatmap-radius").evaluate(r,t)*o,transform:i,unwrappedTileID:s,getElevation:l},a)}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&!this.isHidden()}},lO=()=>sO||(sO=new Du({"hillshade-illumination-direction":new Ti(ta.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new Ti(ta.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new Ti(ta.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new Ti(ta.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new Ti(ta.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new Ti(ta.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new Ti(ta.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new Ti(ta.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new Ti(ta.paint_hillshade.resampling,"resampling")})),uO={get paint(){return lO()}},cO=e=>e.type==="hillshade",fO=class extends Wh{constructor(e,r){super(e,uO,r),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let e=this.paint.get("hillshade-illumination-direction").values,r=this.paint.get("hillshade-illumination-altitude").values,t=this.paint.get("hillshade-highlight-color").values,a=this.paint.get("hillshade-shadow-color").values,i=Math.max(e.length,r.length,t.length,a.length);e=e.concat(Array(i-e.length).fill(e.at(-1))),r=r.concat(Array(i-r.length).fill(r.at(-1))),t=t.concat(Array(i-t.length).fill(t.at(-1))),a=a.concat(Array(i-a.length).fill(a.at(-1)));let o=r.map(il);return{directionRadians:e.map(il),altitudeRadians:o,shadowColor:a,highlightColor:t}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}},dO=()=>hO||(hO=new Du({"color-relief-opacity":new Ti(ta["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new L_(ta["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new Ti(ta["paint_color-relief"].resampling,"resampling")})),pO={get paint(){return dO()}},Kl=class{constructor(e,r,t,a){this.context=e,this.format=t,this.texture=e.gl.createTexture(),this._ownedHandle=this.texture,this.update(r,a)}update(e,r,t){var a;let{width:i,height:o}=e,s=(((a=this.size)==null?void 0:a[0])!==i||this.size[1]!==o)&&!t,{context:l}=this,{gl:n}=l;this.useMipmap=!!r?.useMipmap,s&&this.size&&this.format===n.RGBA&&(n.deleteTexture(this.texture),this.texture=n.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),n.bindTexture(n.TEXTURE_2D,this.texture),l.pixelStoreUnpackFlipY.set(!1),l.pixelStoreUnpack.set(1);let u=this.format===n.RGBA&&r?.premultiply!==!1;if(s)if(this.size=[i,o],this.format===n.RGBA&&i>0&&o>0){let c=this.useMipmap?Math.floor(Math.log2(Math.max(i,o)))+1:1;if(n.texStorage2D(n.TEXTURE_2D,c,n.RGBA8,i,o),A2(e)){l.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:f}=e;u&&f&&(f=CE(f)),f&&n.texSubImage2D(n.TEXTURE_2D,0,0,0,i,o,n.RGBA,n.UNSIGNED_BYTE,f)}else l.pixelStoreUnpackPremultiplyAlpha.set(u),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,e)}else A2(e)?(l.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(e,u,i,o,n)):(l.pixelStoreUnpackPremultiplyAlpha.set(u),this._uploadDomImage(e,n));else{let{x:c,y:f}=t||{x:0,y:0};A2(e)?(l.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(e,u,c,f,i,o,n)):(l.pixelStoreUnpackPremultiplyAlpha.set(u),this._updateDomImage(e,c,f,n))}this.useMipmap&&!(A2(e)&&e.data===null)&&n.generateMipmap(n.TEXTURE_2D),l.pixelStoreUnpackFlipY.setDefault(),l.pixelStoreUnpack.setDefault(),l.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(e,r){r.texImage2D(r.TEXTURE_2D,0,this.format,this.format,r.UNSIGNED_BYTE,e)}_uploadRawData(e,r,t,a,i){let{data:o}=e;r&&o&&(o=CE(o)),i.texImage2D(i.TEXTURE_2D,0,this.format,t,a,0,this.format,i.UNSIGNED_BYTE,o)}_updateDomImage(e,r,t,a){a.texSubImage2D(a.TEXTURE_2D,0,r,t,a.RGBA,a.UNSIGNED_BYTE,e)}_updateRawData(e,r,t,a,i,o,s){let{data:l}=e;r&&l&&(l=CE(l)),s.texSubImage2D(s.TEXTURE_2D,0,t,a,i,o,s.RGBA,s.UNSIGNED_BYTE,l)}bind(e,r,t){let{context:a}=this,{gl:i}=a;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),i.bindTexture(i.TEXTURE_2D,this.texture),(t===i.LINEAR_MIPMAP_NEAREST||t===i.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(t=i.LINEAR);let o=t||e;e!==this.magFilter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),this.magFilter=e),o!==this.minFilter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,o),this.minFilter=o),r!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,r),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,r),this.wrap=r)}generateMipmap(){if(!this.useMipmap)return;let{gl:e}=this.context;e.bindTexture(e.TEXTURE_2D,this.texture),e.generateMipmap(e.TEXTURE_2D)}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},vO=(B1=class{constructor(e,r,t,a=1,i=1,o=1,s=0){if(this.uid=e,r.height!==r.width)throw RangeError("DEM tiles must be square");if(t&&!["mapbox","terrarium","custom"].includes(t)){vo(`"${t}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);return}this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),B1.byteViewCache.set(this,new Uint8Array(this.data.buffer)),t){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=a,this.greenFactor=i,this.blueFactor=o,this.baseShift=s;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let u=-2;u=l)&&this.data.copyWithin(this._idx(0,u),c,c+l),this.data.fill(this.data[c],this._idx(-2,u),this._idx(0,u)),this.data.fill(this.data[c+l-1],this._idx(l,u),this._idx(l+1,u)+1)}let n=this._getByteView();this.min=2**53-1,this.max=-(2**53-1);for(let u=0;uthis.max&&(this.max=h),h=this.dim||a<-1||a>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);let i=this._getByteView(),o=((a+2)*this.stride+t+2)*4,s=this.stride*4,l=e-t,n=r-a,u=this._unpackAtIndex(i,o),c=this._unpackAtIndex(i,o+4),f=this._unpackAtIndex(i,o+s),h=this._unpackAtIndex(i,o+s+4);return u*(1-l)*(1-n)+c*l*(1-n)+f*(1-l)*n+h*l*n}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,r){if(e<-2||e>=this.dim+2||r<-2||r>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);return(r+2)*this.stride+(e+2)}unpack(e,r,t){return e*this.redFactor+r*this.greenFactor+t*this.blueFactor-this.baseShift}pack(e){return n5(e,this.getUnpackVector())}getPixels(){return new Ls({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(e,r,t){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let a=r*this.dim,i=r*this.dim+this.dim,o=t*this.dim,s=t*this.dim+this.dim;switch(r){case-1:a=i-2;break;case 1:i=a+2}switch(t){case-1:o=s-2;break;case 1:s=o+2}let l=-r*this.dim,n=-t*this.dim;for(let u=o;ue.type==="color-relief",gO=class extends Wh{constructor(e,r){super(e,pO,r)}_createColorRamp(e){let r={elevationStops:[],colorStops:[]},t=this._transitionablePaint._values["color-relief-color"].value.expression;if(t instanceof D1&&t._styleExpression.expression instanceof vh){this.colorRampExpression=t;let o=t._styleExpression.expression;r.elevationStops=o.labels,r.colorStops=[];for(let s of r.elevationStops)r.colorStops.push(o.evaluate({globals:{elevation:s}}))}if(r.elevationStops.length<1&&(r.elevationStops=[0],r.colorStops=[Hn.transparent]),r.elevationStops.length<2&&(r.elevationStops.push(r.elevationStops[0]+1),r.colorStops.push(r.colorStops[0])),r.elevationStops.length<=e)return r;let a={elevationStops:[],colorStops:[]},i=(r.elevationStops.length-1)/(e-1);for(let o=0;oe)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=r}getGranularityForZoomLevel(e){let r=1<32767||r>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let t=Math.round(e)|0,a=Math.round(r)|0,i=this._getKey(t,a);if(this._vertexDictionary.has(i))return this._vertexDictionary.get(i);let o=this._vertexBuffer.length/2;return this._vertexDictionary.set(i,o),this._vertexBuffer.push(t,a),o}_subdivideTrianglesScanline(e){if(this._granularity<2)return ede(this._vertexBuffer,e);let r=[],t=e.length;for(let a=0;a=1||x<=0)||m&&(ni)){c>=a&&c<=i&&o.push(t[(s+1)%3]);continue}if(!m&&v>0){let C=l+d*v,w=n+p*v;o.push(this._vertexToIndex(C,w))}let E=l+d*Math.max(v,0),M=l+d*Math.min(x,1);if(g||this._generateIntraEdgeVertices(o,l,n,u,c,E,M),!m&&x<1){let C=l+d*x,w=n+p*x;o.push(this._vertexToIndex(C,w))}(m||c>=a&&c<=i)&&o.push(t[(s+1)%3]),!m&&(c<=a||c>=i)&&this._generateInterEdgeVertices(o,l,n,u,c,f,h,M,a,i)}return o}_generateIntraEdgeVertices(e,r,t,a,i,o,s){let l=a-r,n=i-t,u=n===0,c=u?Math.min(r,a):Math.min(o,s),f=u?Math.max(r,a):Math.max(o,s),h=Math.floor(c/this._granularityCellSize)+1,d=Math.ceil(f/this._granularityCellSize)-1;if(u?r=h;p--){let g=p*this._granularityCellSize,m=t+n*(g-r)/l;e.push(this._vertexToIndex(g,m))}}_generateInterEdgeVertices(e,r,t,a,i,o,s,l,n,u){let c=i-t,f=o-a,h=s-i,d=(n-i)/h,p=(u-i)/h,g=Math.min(d,p),m=Math.max(d,p),y=a+f*g,_=Math.floor(Math.min(y,l)/this._granularityCellSize)+1,v=Math.ceil(Math.max(y,l)/this._granularityCellSize)-1,x=l=1||m<=0){let C=r-o,w=t-s,k=(n-s)/w,T=(u-s)/w,b=o+C*Math.min(k,T);_=Math.floor(Math.min(b,l)/this._granularityCellSize)+1,v=Math.ceil(Math.max(b,l)/this._granularityCellSize)-1,x=l0?u:n;if(x)for(let C=_;C<=v;C++){let w=C*this._granularityCellSize;e.push(this._vertexToIndex(w,M))}else for(let C=v;C>=_;C--){let w=C*this._granularityCellSize;e.push(this._vertexToIndex(w,M))}}_generateOutline(e){let r=[];for(let t of e){let a=Jv(t,this._granularity,!0),i=this._pointArrayToIndices(a),o=[];for(let s=1;si==(o===-32768)?(e.push(t),e.push(r),e.push(this._vertexToIndex(a,o)),e.push(this._vertexToIndex(i,o)),e.push(t),e.push(this._vertexToIndex(a,o))):(e.push(r),e.push(t),e.push(this._vertexToIndex(a,o)),e.push(t),e.push(this._vertexToIndex(i,o)),e.push(this._vertexToIndex(a,o)))}_fillPoles(e,r,t){let a=this._vertexBuffer,i=xa,o=e.length;for(let s=2;s=2&&((t=this._canonical)==null?void 0:t.z)===0&&(o=this._removeTrianglesOutsideTileX(o),s=s.map(l=>this._removeLinesOutsideTileX(l))),{verticesFlattened:this._vertexBuffer,indicesTriangles:o,indicesLineList:s}}_vertexOutsideTileX(e){let r=this._vertexBuffer[e*2];return r<0||r>8192}_removeTrianglesOutsideTileX(e){let r=[];for(let t=0;tr.id),this.index=e.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new FB,this.indexArray=new Vd,this.indexArray2=new Lw,this.programConfigurations=new B0(e.layers,e.zoom),this.segments=new Zs,this.segments2=new Zs,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,t){this.hasDependencies=T2("fill",this.layers,r);let a=this.layers[0].layout.get("fill-sort-key"),i=!a.isConstant(),o=[],s=new Ko(this.zoom),l=this.layers[0]._featureFilter.needGeometry;for(let{feature:n,id:u,index:c,sourceLayerIndex:f}of e){let h=Zv(n,l);if(!this.layers[0]._featureFilter.filter(s,h,t))continue;let d=i?a.evaluate(h,{},t,r.availableImages):void 0,p={id:u,properties:n.properties,type:n.type,sourceLayerIndex:f,index:c,geometry:l?h.geometry:Xv(n),patterns:{},sortKey:d};o.push(p)}i&&o.sort((n,u)=>n.sortKey-u.sortKey);for(let n of o){let{geometry:u,index:c,sourceLayerIndex:f}=n;if(this.hasDependencies){let d=DE("fill",this.layers,n,{zoom:this.zoom},r);this.patternFeatures.push(d)}else this.addFeature(n,u,c,t,{},r.subdivisionGranularity);let h=e[c].feature;r.featureIndex.insert(h,u,c,f,this.index)}}update(e,r,t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,{imagePositions:t})}addFeatures({options:e,canonical:r,patternPositions:t,patternMap:a}){this.detectSdfPatterns(a);for(let i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,r,t,e.subdivisionGranularity)}detectSdfPatterns(e){for(let r of this.patternFeatures)for(let t in r.patterns){let a=r.patterns[t];this.recordSdfPattern(t,e[a.min]),this.recordSdfPattern(t,e[a.mid]),this.recordSdfPattern(t,e[a.max])}for(let r of this.layers){let t=r.paint.get("fill-pattern").constantOr(null);t&&(this.recordSdfPattern(r.id,e[t.from.toString()]),this.recordSdfPattern(r.id,e[t.to.toString()]))}}recordSdfPattern(e,r){if(!r)return;let t=r.sdf===!0,a=this.sdfPatterns[e];a===void 0?this.sdfPatterns[e]=t:a!==t&&vo(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${e}"`)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,yO),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),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(e,r,t,a,i,o){for(let s of a2(r,500)){let l=d5(s,a,o.fill.getGranularityForZoomLevel(a.z)),n=this.layoutVertexArray;p5((u,c)=>{n.emplaceBack(u,c)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles,this.segments2,this.indexArray2,l.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,t,{imagePositions:i,canonical:a})}},Ri("FillBucket",nk,{omit:["layers","patternFeatures"]}),bO=()=>xO||(xO=new Du({"fill-sort-key":new gn(ta.layout_fill["fill-sort-key"],"fill-sort-key")})),AO=()=>wO||(wO=new Du({"fill-antialias":new Ti(ta.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new gn(ta.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new Ti(ta.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new gn(ta.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new gn(ta.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new Ti(ta.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new Ti(ta.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new L1(ta.paint_fill["fill-pattern"],"fill-pattern")})),TO={get paint(){return AO()},get layout(){return bO()}},MO=e=>e.type==="fill",EO=class extends Wh{constructor(e,r){super(e,TO,r)}recalculate(e,r){super.recalculate(e,r);let t=this.paint._values["fill-outline-color"];t.value.kind==="constant"&&t.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new nk(e)}queryRadius(){return b2(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:r,transform:t,pixelsToTileUnits:a}){return QR(w2(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-t.bearingInRadians,a),r)}isTileClipped(){return!0}},Gw=pl([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),SO=pl([{name:"a_centroid",components:2,type:"Int16"}],4),kO=Gw.members,Gw.size,Gw.alignment,Xh=class xD{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(r){return this.minX=Math.min(this.minX,r.x),this.minY=Math.min(this.minY,r.y),this.maxX=Math.max(this.maxX,r.x),this.maxY=Math.max(this.maxY,r.y),this}expandBy(r){return this.minX-=r,this.minY-=r,this.maxX+=r,this.maxY+=r,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(r){return this.expandBy(-r)}map(r){let t=new xD;return t.extend(r(new zr(this.minX,this.minY))),t.extend(r(new zr(this.maxX,this.minY))),t.extend(r(new zr(this.minX,this.maxY))),t.extend(r(new zr(this.maxX,this.maxY))),t}static fromPoints(r){let t=new xD;for(let a of r)t.extend(a);return t}contains(r){return r.x>=this.minX&&r.x<=this.maxX&&r.y>=this.minY&&r.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(r){return!this.empty()&&!r.empty()&&r.minX>=this.minX&&r.maxX<=this.maxX&&r.minY>=this.minY&&r.maxY<=this.maxY}intersects(r){return!this.empty()&&!r.empty()&&r.minX<=this.maxX&&r.maxX>=this.minX&&r.minY<=this.maxY&&r.maxY>=this.minY}},CO=Xh.fromPoints([new zr(0,0),new zr(xa,xa)]),G1=class{constructor(e,r,t,a,i){for(this.properties=Object.create(null),this.extent=t,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=a,this._values=i;e.pos>3,o===0)continue}if(o--,i===1)s+=e.readSVarint(),l+=e.readSVarint(),a&&t.push(a),a=[new zr(s,l)];else if(i===2)s+=e.readSVarint(),l+=e.readSVarint(),a&&a.push(new zr(s,l));else if(i===7)a&&a.push(a[0].clone());else throw Error(`unknown command ${i}`)}return a&&t.push(a),t}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let e=this._pbf;e.pos=this._geometry;let r=e.readVarint()+e.pos,t=1,a=0,i=0,o=0,s=1/0,l=-1/0,n=1/0,u=-1/0;for(;e.pos>3,a===0)continue}if(a--,t===1||t===2)i+=e.readSVarint(),o+=e.readSVarint(),il&&(l=i),ou&&(u=o);else if(t!==7)throw Error(`unknown command ${t}`)}return[s,n,l,u]}toGeoJSON(e,r,t){let a=this.extent*2**t,i=this.extent*e,o=this.extent*r,s=this.loadGeometry();function l(f){return[(f.x+i)*360/a-180,360/Math.PI*Math.atan(Math.exp((1-(f.y+o)*2/a)*Math.PI))-90]}function n(f){return f.map(l)}let u;if(this.type===1){let f=[];for(let d of s)f.push(d[0]);let h=n(f);u=f.length===1?{type:"Point",coordinates:h[0]}:{type:"MultiPoint",coordinates:h}}else if(this.type===2){let f=s.map(n);u=f.length===1?{type:"LineString",coordinates:f[0]}:{type:"MultiLineString",coordinates:f}}else if(this.type===3){let f=m5(s),h=[];for(let d of f)h.push(d.map(n));u=h.length===1?{type:"Polygon",coordinates:h[0]}:{type:"MultiPolygon",coordinates:h}}else throw Error("unknown feature type");let c={type:"Feature",geometry:u,properties:this.properties};return this.id!=null&&(c.id=this.id),c}},G1.types=["Unknown","Point","LineString","Polygon"],DO=class{constructor(e,r){for(this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],r===void 0&&(r=e.length);e.pos=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];let r=this._pbf.readVarint()+this._pbf.pos;return new G1(this._pbf,r,this.extent,this._keys,this._values)}},LO=class{constructor(e,r=e.length){let t=Object.create(null);for(;e.pos90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Bx(qh(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(r){let t=Math.PI/180,a=this.lat*t,i=r.lat*t,o=Math.sin(a)*Math.sin(i)+Math.cos(a)*Math.cos(i)*Math.cos((r.lng-this.lng)*t);return Vc*Math.acos(Math.min(o,1))}static convert(r){if(r instanceof Bx)return r;if(Array.isArray(r)&&(r.length===2||r.length===3))return new Bx(Number(r[0]),Number(r[1]));if(!Array.isArray(r)&&typeof r=="object"&&r)return new Bx(Number("lng"in r?r.lng:r.lon),Number(r.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}},ok=2*Math.PI*Vc,$o=class xQ{constructor(r,t,a=0){this.x=+r,this.y=+t,this.z=+a}static fromLngLat(r,t=0){let a=ln.convert(r);return new xQ(g1(a.lng),y1(a.lat),Qv(t,a.lat))}toLngLat(){return new ln(RE(this.x),f_(this.y))}toAltitude(){return y5(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/ok*ode(f_(this.y))}},N0=89.25,Hw=8192,sk=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new PB,this.centroidVertexArray=new Kp,this.indexArray=new Vd,this.programConfigurations=new B0(e.layers,e.zoom),this.segments=new Zs,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,t){this.features=[],this.hasDependencies=T2("fill-extrusion",this.layers,r);let a=new Ko(this.zoom),i=this.layers[0],o=i.layout.get("fill-extrusion-rounded-corner-distance"),s=i._featureFilter.needGeometry;for(let{feature:l,id:n,index:u,sourceLayerIndex:c}of e){let f=Zv(l,s);if(!i._featureFilter.filter(a,f,t))continue;let h=s?f.geometry:Xv(l),d={id:n,sourceLayerIndex:c,index:u,geometry:o>0?b5(h,o,t):h,properties:l.properties,type:l.type,patterns:{}};this.hasDependencies?this.features.push(DE("fill-extrusion",this.layers,d,{zoom:this.zoom},r)):this.addFeature(d,d.geometry,u,t,{},r.subdivisionGranularity),r.featureIndex.insert(l,d.geometry,u,c,this.index,!0)}}addFeatures({options:e,canonical:r,patternPositions:t}){for(let a of this.features){let{geometry:i}=a;this.addFeature(a,i,a.index,r,t,e.subdivisionGranularity)}}update(e,r,t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,{imagePositions:t})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,kO),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,SO.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,r,t,a,i,o){let s=this.layers[0],l=s.layout?s.layout.get("fill-extrusion-rounded-corner-distance"):0,n=l>0?b5(r,l,a):r;for(let u of a2(n,500)){let c={x:0,y:0,sampleCount:0},f=this.layoutVertexArray.length;this.processPolygon(c,a,e,u,o);let h=this.layoutVertexArray.length-f,d=Math.floor(c.x/c.sampleCount),p=Math.floor(c.y/c.sampleCount);for(let g=0;g{p_(u,c,f,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,n.verticesFlattened,n.indicesTriangles)}_generateSideFaces(e,r){let t=0;for(let a=1;aZs.MAX_VERTEX_ARRAY_LENGTH&&(r.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let s=i.sub(o)._perp()._unit(),l=o.dist(i);t+l>32768&&(t=0),p_(this.layoutVertexArray,i.x,i.y,s.x,s.y,0,0,t),p_(this.layoutVertexArray,i.x,i.y,s.x,s.y,0,1,t),t+=l,p_(this.layoutVertexArray,o.x,o.y,s.x,s.y,0,0,t),p_(this.layoutVertexArray,o.x,o.y,s.x,s.y,0,1,t);let n=r.segment.vertexLength;this.indexArray.emplaceBack(n,n+2,n+1),this.indexArray.emplaceBack(n+1,n+2,n+3),r.segment.vertexLength+=4,r.segment.primitiveLength+=2}}},Ri("FillExtrusionBucket",sk,{omit:["layers","features"]}),PO=()=>FO||(FO=new Du({"fill-extrusion-rounded-corner-distance":new Ti(ta["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})),RO=()=>IO||(IO=new Du({"fill-extrusion-opacity":new Ti(ta["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new gn(ta["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new Ti(ta["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new Ti(ta["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new L1(ta["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new gn(ta["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new gn(ta["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new Ti(ta["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})),zO={get paint(){return RO()},get layout(){return PO()}},BO=e=>e.type==="fill-extrusion",OO=class extends Wh{constructor(e,r){super(e,zO,r)}createBucket(e){return new sk(e)}queryRadius(){return b2(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:t,geometry:a,transform:i,pixelsToTileUnits:o,pixelPosMatrix:s}){let l=w2(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-i.bearingInRadians,o),n=this.paint.get("fill-extrusion-height").evaluate(r,t),u=this.paint.get("fill-extrusion-base").evaluate(r,t),c=mde(l,s,0),f=vde(a,u,n,s),h=f[0],d=f[1];return pde(h,d,c)}},mme=new Uint32Array(96),NO="geojsonvt_clip_start",jO="geojsonvt_clip_end",Ww=pl([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),UO=Ww.members,Ww.size,Ww.alignment,$w=pl([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),qO=$w.members,$w.size,$w.alignment,VO=Math.cos(75/2*(Math.PI/180)),lk=1/2,uk=2**14/lk,ck=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let r of this.layers)this.gradients[r.id]={};this.layoutVertexArray=new IB,this.layoutVertexArray2=new RB,this.indexArray=new Vd,this.programConfigurations=new B0(e.layers,e.zoom),this.segments=new Zs,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,t){this.hasDependencies=T2("line",this.layers,r)||this.hasLineDasharray(this.layers);let a=this.layers[0].layout.get("line-sort-key"),i=!a.isConstant(),o=[],s=new Ko(this.zoom),l=this.layers[0]._featureFilter.needGeometry;for(let{feature:n,id:u,index:c,sourceLayerIndex:f}of e){let h=Zv(n,l);if(!this.layers[0]._featureFilter.filter(s,h,t))continue;let d=i?a.evaluate(h,{},t):void 0,p={id:u,properties:n.properties,type:n.type,sourceLayerIndex:f,index:c,geometry:l?h.geometry:Xv(n),patterns:{},dashes:{},sortKey:d};o.push(p)}i&&o.sort((n,u)=>n.sortKey-u.sortKey);for(let n of o){let{geometry:u,index:c,sourceLayerIndex:f}=n;this.hasDependencies?(T2("line",this.layers,r)?DE("line",this.layers,n,{zoom:this.zoom},r):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,n,this.zoom,r),this.patternFeatures.push(n)):this.addFeature(n,u,c,t,{},{},r.subdivisionGranularity);let h=e[c].feature;r.featureIndex.insert(h,u,c,f,this.index)}}update(e,r,t,a){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,{imagePositions:t,dashPositions:a})}addFeatures({options:e,canonical:r,patternPositions:t,dashPositions:a}){for(let i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,r,t,a,e.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,qO)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,UO),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.hasOwn(e.properties,"geojsonvt_clip_start")&&Object.hasOwn(e.properties,"geojsonvt_clip_end"))return{start:+e.properties[NO],end:+e.properties[jO]}}addFeature(e,r,t,a,i,o,s){let l=this.layers[0].layout,n=l.get("line-join").evaluate(e,{}),u=l.get("line-cap").evaluate(e,{}),c=l.get("line-miter-limit").evaluate(e,{}),f=l.get("line-round-limit").evaluate(e,{});this.lineClips=this.lineFeatureClips(e);for(let h of r)this.addLine(h,e,n,u,c,f,a,s);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,t,{imagePositions:i,dashPositions:o,canonical:a})}addLine(e,r,t,a,i,o,s,l){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let n=s?l.line.getGranularityForZoomLevel(s.z):1;if(e=Jv(e,n),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let v=0;v=2&&e[c-1].equals(e[c-2]);)c--;let f=0;for(;f0;if(k&&v>f){let A=p.dist(g);if(A>2*h){let F=p.sub(p.sub(g)._mult(h/A)._round());this.updateDistance(g,F),this.addCurrentVertex(F,y,0,0,d),g=F}}let b=g&&m,S=b?t:u?"butt":a;if(b&&S==="round"&&(Ci&&(S="bevel"),S==="bevel"&&(C>2&&(S="flipbevel"),C100)x=_.mult(-1);else{let A=C*y.add(_).mag()/y.sub(_).mag();x._perp()._mult(A*(T?-1:1))}this.addCurrentVertex(p,x,0,0,d),this.addCurrentVertex(p,x.mult(-1),0,0,d)}else if(S==="bevel"||S==="fakeround"){let A=-Math.sqrt(C*C-1),F=T?A:0,D=T?0:A;if(g&&this.addCurrentVertex(p,y,F,D,d),S==="fakeround"){let R=Math.round(w*180/Math.PI/20);for(let P=1;P2*h){let F=p.add(m.sub(p)._mult(h/A)._round());this.updateDistance(p,F),this.addCurrentVertex(F,_,0,0,d),p=F}}}}addCurrentVertex(e,r,t,a,i,o=!1){let s=r.x+r.y*t,l=r.y-r.x*t,n=-r.x+r.y*a,u=-r.y-r.x*a;this.addHalfVertex(e,s,l,o,!1,t,i),this.addHalfVertex(e,n,u,o,!0,-a,i),this.distance>uk/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,r,t,a,i,o))}addHalfVertex({x:e,y:r},t,a,i,o,s,l){let n=(this.lineClips?this.scaledDistance*(uk-1):this.scaledDistance)*lk;if(this.layoutVertexArray.emplaceBack((e<<1)+ +!!i,(r<<1)+ +!!o,Math.round(63*t)+128,Math.round(63*a)+128,(s===0?0:s<0?-1:1)+1|(n&63)<<2,n>>6),this.lineClips){let c=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(c,this.lineClipsArray.length)}let u=l.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),l.primitiveLength++),o?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,r){this.distance+=e.dist(r),this.updateScaledDistance()}hasLineDasharray(e){for(let r of e){let t=r.paint.get("line-dasharray");if(t&&!t.isConstant())return!0}return!1}addLineDashDependencies(e,r,t,a){for(let i of e){let o=i.paint.get("line-dasharray");if(!o||o.value.kind==="constant")continue;let s=i.layout.get("line-cap").evaluate(r,{})==="round",l={dasharray:o.value.evaluate({zoom:t-1},r,{}),round:s},n={dasharray:o.value.evaluate({zoom:t},r,{}),round:s},u={dasharray:o.value.evaluate({zoom:t+1},r,{}),round:s},c=`${l.dasharray.join(",")},${l.round}`,f=`${n.dasharray.join(",")},${n.round}`,h=`${u.dasharray.join(",")},${u.round}`;a.dashDependencies[c]=l,a.dashDependencies[f]=n,a.dashDependencies[h]=u,r.dashes[i.id]={min:c,mid:f,max:h}}}},Ri("LineBucket",ck,{omit:["layers","patternFeatures"]}),HO=()=>GO||(GO=new Du({"line-cap":new gn(ta.layout_line["line-cap"],"line-cap"),"line-join":new gn(ta.layout_line["line-join"],"line-join"),"line-miter-limit":new gn(ta.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new gn(ta.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new gn(ta.layout_line["line-sort-key"],"line-sort-key")})),$O=()=>WO||(WO=new Du({"line-opacity":new gn(ta.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new Ti(ta.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new gn(ta.paint_line["line-color"],"line-color"),"line-translate":new Ti(ta.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new Ti(ta.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new gn(ta.paint_line["line-width"],"line-width"),"line-gap-width":new gn(ta.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new gn(ta.paint_line["line-offset"],"line-offset"),"line-blur":new gn(ta.paint_line["line-blur"],"line-blur"),"line-dasharray":new L1(ta.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new L1(ta.paint_line["line-pattern"],"line-pattern"),"line-gradient":new L_(ta.paint_line["line-gradient"],"line-gradient")})),fk={get paint(){return $O()},get layout(){return HO()}},YO=class extends gn{possiblyEvaluate(e,r){return r=new Ko(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(e,r)}evaluate(e,r,t,a){return r=tn({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(e,r,t,a)}},XO=e=>e.type==="line",ZO=class extends Wh{constructor(e,r){super(e,fk,r),this.gradientVersion=0,Yw||(Yw=new YO(fk.paint.properties["line-width"].specification,"line-floorwidth"),Yw.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if(e==="line-gradient"){let r=this.gradientExpression();this.stepInterpolant=Hfe(r)?r._styleExpression.expression instanceof Q2:!1,this.gradientVersion=(this.gradientVersion+1)%(2**53-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,r){super.recalculate(e,r),this.paint._values["line-floorwidth"]=Yw.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new ck(e)}queryRadius(e){let r=e,t=A5(m1("line-width",this,r),m1("line-gap-width",this,r)),a=m1("line-offset",this,r);return t/2+Math.abs(a)+b2(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:r,featureState:t,geometry:a,transform:i,pixelsToTileUnits:o}){let s=w2(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-i.bearingInRadians,o),l=o/2*A5(this.paint.get("line-width").evaluate(r,t),this.paint.get("line-gap-width").evaluate(r,t)),n=this.paint.get("line-offset").evaluate(r,t);return n&&(a=khe(a,n*o)),whe(s,a,l)}isTileClipped(){return!0}},KO=pl([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),JO=pl([{name:"a_projected_pos",components:3,type:"Float32"}],4),pl([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),QO=pl([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]),pl([{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"}]),hk=pl([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),eN=pl([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4),pl([{name:"triangle",components:3,type:"Uint16"}]),pl([{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"},{type:"Float32",name:"heightOffset"}]),pl([{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"},{type:"Float32",name:"heightOffset"}]),pl([{type:"Float32",name:"offsetX"}]),pl([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),pl([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]),B_=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){if(B_.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(e,r){return yi(this,null,function*(){if(this.isParsed())return this.getState();if(e.pluginStatus!=="loading")return this.setState(e),e;let t=e.pluginURL,a=new Promise(o=>{this.loadScriptResolve=o}),i=new Promise(o=>setTimeout(()=>o(),this.TIMEOUT));if(yield r(t),yield Promise.race([a,i]),this.isParsed()){let o={pluginStatus:"loaded",pluginURL:t};return this.setState(o),o}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${t}`)})}},tN={C:"18g,1;g2,3;4nb,1",D:"17k,1;5,1;1,1;1,5;4,d;1,7;1,2;z,2;8,g;i,12;1,2;9,1;1,1;1,2;14,3;2,1;28,9;3,f;2,4;1,1;2,3;2,6;7a,1;2,5;1,1;g,a;5,2;2,6;1,f",R:"17m,4;1,1;1,1;5,4;l,1;14,3;1,3;g,i;12,1;2,9;1,1;1,1;2,2;1,1;o,2;2x,3;f,2;4,1;1,2;3,2;6u,j;b,1;r,3;1,1;2,2;6,1",T:"174,b;1,1;1a,l;g,1;2t,7;2,6;2,2;1,4;bt,9;16,o;1,t;1clb,1"},rN={1569:[65152,0,0,0],1570:[65153,65154,0,0],1571:[65155,65156,0,0],1572:[65157,65158,0,0],1573:[65159,65160,0,0],1574:[65161,65162,65163,65164],1575:[65165,65166,0,0],1576:[65167,65168,65169,65170],1577:[65171,65172,0,0],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194,0,0],1584:[65195,65196,0,0],1585:[65197,65198,0,0],1586:[65199,65200,0,0],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262,0,0],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1611:[65136,0,0,65137],1612:[65138,0,0,0],1613:[65140,0,0,0],1614:[65142,0,0,65143],1615:[65144,0,0,65145],1616:[65146,0,0,65147],1617:[65148,0,0,65149],1618:[65150,0,0,65151],1649:[64336,64337,0,0],1655:[64477,0,0,0],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393,0,0],1676:[64388,64389,0,0],1677:[64386,64387,0,0],1678:[64390,64391,0,0],1681:[64396,64397,0,0],1688:[64394,64395,0,0],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415,0,0],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421,0,0],1729:[64422,64423,64424,64425],1733:[64480,64481,0,0],1734:[64473,64474,0,0],1735:[64471,64472,0,0],1736:[64475,64476,0,0],1737:[64482,64483,0,0],1739:[64478,64479,0,0],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431,0,0],1747:[64432,64433,0,0]},aN={\u0644\u0622:[65269,65270],\u0644\u0623:[65271,65272],\u0644\u0625:[65273,65274],\u0644\u0627:[65275,65276]},dk=1604,iN=/[\u0600-\u06ff\u0750-\u077f\u0870-\u089f\u08a0-\u08ff\ufb50-\ufdff\ufe70-\ufeff]/,pk=new Map;for(let[e,r]of Object.entries(tN))Tde(r,e,pk);vk=typeof Intl<"u"&&"Segmenter"in Intl,om={"!":"\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","\u22EF":"\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"},nN={10:!0,13:!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},oN={40:!0},Kw=class bD{constructor(r="",t=[],a=[]){this.text=r,this.sections=t,this.sectionIndex=a,this.imageSectionID=null,this._graphemes=null}graphemes(){var r;return(r=this._graphemes)!=null||(this._graphemes=OE(this.text)),this._graphemes}static fromFeature(r,t){let a=new bD;for(let i of r.sections)i.image?a.addImageSection(i):a.addTextSection(i,t);return a}length(){return this.graphemes().length}getSection(r){return this.sections[this.sectionIndex[r]]}getSectionIndex(r){return this.sectionIndex[r]}verticalizePunctuation(){this.text=Ude(this.text),this._graphemes=null}hasZeroWidthSpaces(){return this.text.includes("\u200B")}trim(){let r=this.graphemes(),t=0;for(;tt&&L5(r[a-1]);)a--;this.text=r.slice(t,a).join(""),this.sectionIndex=this.sectionIndex.slice(t,a),this._graphemes=null}substring(r,t){let a=this.graphemes().slice(r,t).join(""),i=this.sectionIndex.slice(r,t);return new bD(a,this.sections,i)}toCodeUnitIndex(r){return this.graphemes().slice(0,r).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((r,t)=>Math.max(r,this.sections[t].scale),0)}getMaxImageSize(r){let t=0,a=0;for(let i=0;i0?a[a.length-1]:"",o=OE(i+r);this.text+=r,this._graphemes=a.slice(0,i?-1:void 0).concat(o);let s=o.length-+!!i;for(let l=0;l=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(r,t,a,i,o){let s=[],l=this.determineAverageLineWidth(r,t,a,i,o),n=this.hasZeroWidthSpaces(),u=this.graphemes(),c=null,f=0,h=0;for(let d=0;d0){let g=u[d-1].codePointAt(0),m=p.codePointAt(0),y=xde(g),_=T5(g)&&T5(m);(nN[g]||y||"imageName"in this.getSection(d-1)||u[d+1]!==void 0&&oN[m]||_&&(c??(c=Ode(this.text))).has(h))&&s.push(F5(d,f,l,s,qde(g,m,y&&n),!1))}NE(p.codePointAt(0))||(f+=C5(p,this.getSection(d),a,i,r,o)),h+=p.length}return P5(F5(this.length(),f,l,s,0,!0))}determineAverageLineWidth(r,t,a,i,o){let s=0,l=0;for(let u of this.graphemes()){let c=this.getSection(l);s+=C5(u,c,a,i,r,o),l++}let n=Math.max(1,Math.ceil(s/t));return s/n}},Jw=Vde(),sN=/[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/,lN=new Set(["WS","FSI","LRI","RLI","PDI"]),uN=new Set(["S","B"]),Qw=4294967296,gme=1/Qw,mk=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),gk=class{constructor(e){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(e,r,t=this.length){let a;for(;a=this.nextField(t);)e(a,r,this);return r}readMessage(e,r){return this.readFields(e,r,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*Qw;return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*Qw;return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){let r=this.buf,t=r[this.pos++];if(t<128)return t;let a=t&127,i;return i=r[this.pos++],a|=(i&127)<<7,i<128||(i=r[this.pos++],a|=(i&127)<<14,i<128)||(i=r[this.pos++],a|=(i&127)<<21,i<128)?a:(i=r[this.pos],a|=(i&15)<<28,Qde(a,e,this))}readSVarint(){let e=this.readVarint();return e%2==1?(e+1)/-2:e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,r=this.pos;return this.pos=e,e-r>=12&&mk?mk.decode(this.buf.subarray(r,e)):tpe(this.buf,r,e)}readBytes(){let e=this.readVarint()+this.pos,r=this.buf.subarray(this.pos,e);return this.pos=e,r}readPackedVarint(e=[],r){let t=this.readPackedEnd();for(;this.pos=e)return 0;let r=this.readVarint();return this.type=r&7,this._valueStart=this.pos,r>>>3}skip(e){let r=e&7;if(r===0)for(;this.buf[this.pos++]>127;);else if(r===2)this.pos=this.readVarint()+this.pos;else if(r===5)this.pos+=4;else if(r===1)this.pos+=8;else throw Error(`Unimplemented type: ${r}`)}},e3=class{constructor(e,{pixelRatio:r,version:t,isWebGLImage:a=!1,stretchX:i,stretchY:o,content:s,textFitWidth:l,textFitHeight:n}){this.paddedRect=e,this.pixelRatio=r,this.stretchX=i,this.stretchY=o,this.content=s,this.version=t,this.needsFirstWebGLRender=a,this.textFitWidth=l,this.textFitHeight=n}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}},cN=class{constructor(e,r){let t={},a={};this.haveRenderCallbacks=[],this.patchedUpdateVersion=-1;let i=[];this.addImages(e,t,i),this.addImages(r,a,i);let{w:o,h:s}=R5(i),l=new Ls({width:o||1,height:s||1});for(let n in e){let u=e[n];if(u.isWebGLImage)continue;let c=t[n].paddedRect;Ls.copy(u.data,l,{x:0,y:0},{x:c.x+1,y:c.y+1},u.data)}for(let n in r){let u=r[n],c=a[n].paddedRect,f=c.x+1,h=c.y+1,d=u.data.width,p=u.data.height;Ls.copy(u.data,l,{x:0,y:0},{x:f,y:h},u.data),Ls.copy(u.data,l,{x:0,y:p-1},{x:f,y:h-1},{width:d,height:1}),Ls.copy(u.data,l,{x:0,y:0},{x:f,y:h+p},{width:d,height:1}),Ls.copy(u.data,l,{x:d-1,y:0},{x:f-1,y:h},{width:1,height:p}),Ls.copy(u.data,l,{x:0,y:0},{x:f+d,y:h},{width:1,height:p})}this.image=l,this.iconPositions=t,this.patternPositions=a}addImages(e,r,t){for(let a in e){let i=e[a],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};t.push(o),r[a]=new e3(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(a)}}patchUpdatedImages(e,r){if(e.dispatchRenderCallbacks(this.haveRenderCallbacks),this.patchedUpdateVersion!==e.updateVersion){this.patchedUpdateVersion=e.updateVersion;for(let t in this.iconPositions)this.patchUpdatedImage(this.iconPositions[t],e.getImage(t),r);for(let t in this.patternPositions)this.patchUpdatedImage(this.patternPositions[t],e.getImage(t),r)}}patchUpdatedImage(e,r,t){var a;if(!e||!r||!e.needsFirstWebGLRender&&e.version===r.version)return;e.needsFirstWebGLRender=!1,e.version=r.version;let[i,o]=e.tl,s=(a=r.userImage)==null?void 0:a.data;if(!D2(s)){t.update(r.data,void 0,{x:i,y:o});return}let{width:l,height:n}=r.data;t.context.setCustomLayerDefaults(),s.renderWithWebGL({gl:t.context.gl,texture:t.texture,x:i,y:o,width:l,height:n}),t.context.setDirty()}},Ri("ImagePosition",e3),Ri("ImageAtlas",cN),yk=(function(e){return e[e.none=0]="none",e[e.horizontal=1]="horizontal",e[e.vertical=2]="vertical",e[e.horizontalOnly=3]="horizontalOnly",e})(yk||{}),_k=new RegExp("^\\p{gc=M}$","u"),xk=32640,sm=class bQ extends zr{constructor(r,t,a,i){super(r,t),this.angle=a,i!==void 0&&(this.segment=i)}clone(){return new bQ(this.x,this.y,this.angle,this.segment)}},Ri("Anchor",sm),O_=class{constructor(e,r,t,a,i,o,s,l,n,u){var c;if(this.boxStartIndex=e.length,n){let f=o.top,h=o.bottom,d=o.collisionPadding;d&&(f-=d[1],h+=d[3]);let p=h-f;p>0&&(p=Math.max(10,p),this.circleDiameter=p)}else{let f=(c=o.image)!=null&&c.content&&(o.image.textFitWidth||o.image.textFitHeight)?j5(o):{x1:o.left,y1:o.top,x2:o.right,y2:o.bottom};f.y1=f.y1*s-l[0],f.y2=f.y2*s+l[2],f.x1=f.x1*s-l[3],f.x2=f.x2*s+l[1];let h=o.collisionPadding;if(h&&(f.x1-=h[0]*s,f.y1-=h[1]*s,f.x2+=h[2]*s,f.y2+=h[3]*s),u){let d=new zr(f.x1,f.y1),p=new zr(f.x2,f.y1),g=new zr(f.x1,f.y2),m=new zr(f.x2,f.y2),y=u*Math.PI/180;d._rotate(y),p._rotate(y),g._rotate(y),m._rotate(y),f.x1=Math.min(d.x,p.x,g.x,m.x),f.x2=Math.max(d.x,p.x,g.x,m.x),f.y1=Math.min(d.y,p.y,g.y,m.y),f.y2=Math.max(d.y,p.y,g.y,m.y)}e.emplaceBack(r.x,r.y,f.x1,f.y1,f.x2,f.y2,t,a,i)}this.boxEndIndex=e.length}},fN=class{constructor(e=[],r=(t,a)=>ta)){if(this.data=e,this.length=this.data.length,this.compare=r,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;let e=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:r,compare:t}=this,a=r[e];for(;e>0;){let i=e-1>>1,o=r[i];if(t(a,o)>=0)break;r[e]=o,e=i}r[e]=a}_down(e){let{data:r,compare:t}=this,a=this.length>>1,i=r[e];for(;e=0)break;r[e]=r[o],e=o}r[e]=i}},lm=class{constructor(e,r,t,a){this.p=new zr(e,r),this.h=t,this.d=Rpe(this.p,a),this.max=this.d+this.h*Math.SQRT2}},t3=(function(e){return e[e.center=1]="center",e[e.left=2]="left",e[e.right=3]="right",e[e.top=4]="top",e[e.bottom=5]="bottom",e[e["top-left"]=6]="top-left",e[e["top-right"]=7]="top-right",e[e["bottom-left"]=8]="bottom-left",e[e["bottom-right"]=9]="bottom-right",e})({}),r3=1/0,hN=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}],a3=class{constructor(e){this.layoutVertexArray=new zB,this.indexArray=new Vd,this.programConfigurations=e,this.segments=new Zs,this.dynamicLayoutVertexArray=new BB,this.opacityVertexArray=new OB,this.hasVisibleVertices=!1,this.placedSymbolArray=new NS}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(e,r,t,a){this.isEmpty()||(t&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,KO.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,r),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,JO.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,hN,!0),this.opacityVertexBuffer.itemSize=1),(t||a)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}},Ri("SymbolBuffers",a3),i3=class{constructor(e,r,t){this.layoutVertexArray=new e,this.layoutAttributes=r,this.indexArray=new t,this.segments=new Zs,this.collisionVertexArray=new jB}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,QO.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}},Ri("CollisionBuffers",i3),N_=class{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(s=>s.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=q5(this.zoom,r["text-size"]),this.iconSizeData=q5(this.zoom,r["icon-size"]);let t=this.layers[0].layout,a=t.get("symbol-sort-key"),i=t.get("symbol-z-order");this.canOverlap=O2(t,"text-overlap","text-allow-overlap")!=="never"||O2(t,"icon-overlap","icon-allow-overlap")!=="never"||t.get("text-ignore-placement")||t.get("icon-ignore-placement"),this.sortFeaturesByKey=i!=="viewport-y"&&!a.isConstant();let o=i==="viewport-y"||i==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&this.canOverlap,t.get("symbol-placement")==="point"&&(this.writingModes=t.get("text-writing-mode").map(s=>yk[s])),this.stateDependentLayerIds=this.layers.filter(s=>s.isStateDependent()).map(s=>s.id),this.sourceID=e.sourceID}createArrays(){this.text=new a3(new B0(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new a3(new B0(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new qS,this.lineVertexArray=new VS,this.symbolInstances=new US,this.textAnchorOffsets=new HS}calculateGlyphDependencies(e,r,t,a,i){var o;let s=(a||this.allowVerticalPlacement)&&i,l=Kw.fromFeature(e,t),n=l.graphemes();for(let u=0;u0)&&(s.value.kind!=="constant"||s.value.value.length>0),c=n.value.kind!=="constant"||!!n.value.value||Object.keys(n.parameters).length>0,f=o.get("symbol-sort-key");if(this.features=[],!u&&!c)return;let h=r.iconDependencies,d=r.glyphDependencies,p=r.availableImages,g=new Ko(this.zoom);for(let{feature:m,id:y,index:_,sourceLayerIndex:v}of e){let x=i._featureFilter.needGeometry,E=Zv(m,x);if(!i._featureFilter.filter(g,E,t))continue;x||(E.geometry=Xv(m));let M;if(u){let T=i.getValueAndResolveTokens("text-field",E,t,p),b=dp.factory(T);this.hasRTLText||(this.hasRTLText=qpe(b)),M=zde(b,i,E)}let C;if(c){let T=i.getValueAndResolveTokens("icon-image",E,t,p);C=T instanceof jd?T:jd.fromString(T)}if(!M&&!C)continue;let w=this.sortFeaturesByKey?f.evaluate(E,{},t):void 0,k={id:y,text:M,icon:C,index:_,sourceLayerIndex:v,geometry:E.geometry,properties:m.properties,type:G1.types[m.type],sortKey:w};if(this.features.push(k),C&&(h[C.name]=!0),M){let T=s.evaluate(E,{},t).join(","),b=o.get("text-rotation-alignment")!=="viewport"&&o.get("symbol-placement")!=="point";this.allowVerticalPlacement=(a=this.writingModes)==null?void 0:a.includes(2);let S=jE(M.toString());this.calculateGlyphDependencies(M,d,T,b,S);for(let A of M.sections)A.image&&(h[A.image.name]=!0)}}o.get("symbol-placement")==="line"&&(this.features=Bde(this.features)),this.sortFeaturesByKey&&this.features.sort((m,y)=>m.sortKey-y.sortKey)}update(e,r,t){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,r,this.layers,{imagePositions:t}),this.icon.programConfigurations.updatePaintArrays(e,r,this.layers,{imagePositions:t}))}addFeatures({options:e,canonical:r,glyphMap:t,glyphPositions:a,iconMap:i,iconPositions:o,showCollisionBoxes:s}){Bpe({bucket:this,glyphMap:t,glyphPositions:a,imageMap:i,imagePositions:o,showCollisionBoxes:s,canonical:r,subdivisionGranularity:e.subdivisionGranularity})}isEmpty(){return this.symbolInstances.length===0}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,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(e,r){let t=this.lineVertexArray.length;if(e.segment!==void 0){let a=e.dist(r[e.segment+1]),i=e.dist(r[e.segment]),o={};for(let s=e.segment+1;s=0;s--)o[s]={x:r[s].x,y:r[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=r[s-1].dist(r[s]));for(let s=0;s0}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(e,r){let t=e.placedSymbolArray.get(r),a=t.vertexStartIndex+t.numGlyphs*4;for(let i=t.vertexStartIndex;ia[s]-a[l]||i[l]-i[s]),o}addToSortKeyRanges(e,r){let t=this.sortKeyRanges[this.sortKeyRanges.length-1];t?.sortKey===r?t.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:r,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let r of this.symbolInstanceIndexes){let t=this.symbolInstances.get(r);this.featureSortOrder.push(t.featureIndex);let a=[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex];for(let i=0;i=0&&a.indexOf(o)===i&&this.addIndicesForPlacedSymbol(this.text,o)}t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}},Ri("SymbolBucket",N_,{omit:["layers","collisionBoxArray","features","compareText"]}),pN=()=>dN||(dN=new Du({"symbol-placement":new Ti(ta.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new Ti(ta.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new Ti(ta.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new gn(ta.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new Ti(ta.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new Ti(ta.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new Ti(ta.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new Ti(ta.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new Ti(ta.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new gn(ta.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new gn(ta.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new Ti(ta.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new Ti(ta.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new gn(ta.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new gn(ta.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new gn(ta.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new Ti(ta.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new gn(ta.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new gn(ta.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new Ti(ta.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new Ti(ta.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new Ti(ta.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new gn(ta.layout_symbol["text-field"],"text-field"),"text-font":new gn(ta.layout_symbol["text-font"],"text-font"),"text-size":new gn(ta.layout_symbol["text-size"],"text-size"),"text-max-width":new gn(ta.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new Ti(ta.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new gn(ta.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new gn(ta.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new gn(ta.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new Ti(ta.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new gn(ta.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new gn(ta.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new Ti(ta.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new Ti(ta.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new gn(ta.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new Ti(ta.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new Ti(ta.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new gn(ta.layout_symbol["text-transform"],"text-transform"),"text-offset":new gn(ta.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new Ti(ta.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new Ti(ta.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new Ti(ta.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new Ti(ta.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new gn(ta.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new Ti(ta.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})),mN=()=>vN||(vN=new Du({"icon-opacity":new gn(ta.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new gn(ta.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new gn(ta.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new gn(ta.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new gn(ta.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new Ti(ta.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new Ti(ta.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new gn(ta.paint_symbol["text-opacity"],"text-opacity"),"text-color":new gn(ta.paint_symbol["text-color"],"text-color",{runtimeType:Hh,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new gn(ta.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new gn(ta.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new gn(ta.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new Ti(ta.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new Ti(ta.paint_symbol["text-translate-anchor"],"text-translate-anchor")})),n3={get paint(){return mN()},get layout(){return pN()}},bk=class{constructor(e){if(e.property.overrides===void 0)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:E1,this.defaultValue=e}evaluate(e){if(e.formattedSection){let r=this.defaultValue.property.overrides;if(r?.hasOverride(e.formattedSection))return r.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){if(!this.defaultValue.isConstant()){let r=this.defaultValue.value;e(r._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}},Ri("FormatSectionOverride",bk,{omit:["defaultValue"]}),wk=e=>e.type==="symbol",gN=class wD extends Wh{constructor(r,t){super(r,n3,t)}recalculate(r,t){super.recalculate(r,t);let a=this.layout.get("icon-rotation-alignment");if((a.value.kind!=="constant"||a.value.value==="auto")&&(this.layout._values["icon-rotation-alignment"]=new mh(a.property,{kind:"constant",value:this.layout.get("symbol-placement")==="point"?"viewport":"map"},a.parameters)),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="point"?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),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").constantOr("viewport")),this.layout.get("symbol-placement")==="point"){let i=this.layout.get("text-writing-mode");if(i){let o=[];for(let s of i)o.includes(s)||o.push(s);this.layout._values["text-writing-mode"]=o}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(r,t,a,i){let o=this.layout.get(r).evaluate(t,{},a,i),s=this._unevaluatedLayout._values[r];return!s.isDataDriven()&&!d2(s.value)&&o?Vpe(t.properties,o):o}createBucket(r){return new N_(r)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let r of n3.paint.overridableProperties){if(!wD.hasPaintOverride(this.layout,r))continue;let t=this.paint.get(r),a=new nw(new bk(t),`layers[${this.id}].paint.${t.property.name}`,t.property.specification),i=null;i=t.value.kind==="constant"||t.value.kind==="source"?new D1("source",a):new S_("composite",a,t.value.zoomStops),this.paint._values[r]=new mh(t.property,i,t.parameters)}}_handleOverridablePaintPropertyUpdate(r,t,a){return!this.layout||t.isDataDriven()||a.isDataDriven()?!1:wD.hasPaintOverride(this.layout,r)}static hasPaintOverride(r,t){let a=r.get("text-field"),i=n3.paint.properties[t],o=!1,s=l=>{var n;for(let u of l)if((n=i.overrides)!=null&&n.hasOverride(u)){o=!0;return}};if(a.value.kind==="constant"&&a.value.value instanceof dp)s(a.value.value.sections);else if(a.value.kind==="source"||a.value.kind==="composite"){let l=u=>{if(!o)if(u instanceof rm&&Il(u.value)===S1){let c=u.value;s(c.sections)}else u instanceof yS?s(u.sections):u.eachChild(l)},n=a.value;n._styleExpression&&l(n._styleExpression.expression)}return o}},_N=()=>yN||(yN=new Du({"background-color":new Ti(ta.paint_background["background-color"],"background-color"),"background-pattern":new IS(ta.paint_background["background-pattern"],"background-pattern"),"background-opacity":new Ti(ta.paint_background["background-opacity"],"background-opacity")})),xN={get paint(){return _N()}},bN=e=>e.type==="background",wN=class extends Wh{constructor(e,r){super(e,xN,r)}},AN=e=>e.type==="custom",TN=class extends Wh{constructor(e,r){super(e,{},r),this.onAdd=t=>{this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},this.onRemove=t=>{this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},this.implementation=e}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}},MN=class{constructor(e){this._methodToThrottle=e,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var e;this._triggered||(this._triggered=!0,(e=this._channel)==null||e.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}},EN={once:!0},SN=class{constructor(e,r){this.target=e,this.mapId=r,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new MN(()=>this.process()),this.subscription=HM(this.target,"message",t=>this.receive(t),!1),this.globalScope=n1(self)?e:window}registerMessageHandler(e,r){this.messageHandlers[e]=r}unregisterMessageHandler(e){delete this.messageHandlers[e]}sendAsync(e,r){return new Promise((t,a)=>{let i=Math.round(Math.random()*1e18).toString(36).substring(0,10),o=r?HM(r.signal,"abort",()=>{o?.unsubscribe(),delete this.resolveRejects[i];let n={id:i,type:"",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(n),a(new T1(r.signal.reason))},EN):null;this.resolveRejects[i]={resolve:n=>{o?.unsubscribe(),t(n)},reject:n=>{o?.unsubscribe(),a(n)}};let s=[],l=Ci(ja({},e),{id:i,sourceMapId:this.mapId,origin:location.origin,data:n_(e.data,s)});this.target.postMessage(l,{transfer:s})})}receive(e){let r=e.data,t=r.id,a=["file://","resource://android","null"],i=[r.origin,location.origin],o=r.origin===location.origin,s=i.some(l=>a.includes(l));if((o||s)&&!(r.targetMapId&&this.mapId!==r.targetMapId)){if(r.type===""){delete this.tasks[t];let l=this.abortControllers[t];delete this.abortControllers[t],l&&l.abort();return}if(n1(self)||r.mustQueue){this.tasks[t]=r,this.taskQueue.push(t),this.invoker.trigger();return}this.processTask(t,r)}}process(){if(this.taskQueue.length===0)return;let e=this.taskQueue.shift(),r=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),r&&this.processTask(e,r)}processTask(e,r){return yi(this,null,function*(){if(r.type===""){let i=this.resolveRejects[e];if(delete this.resolveRejects[e],!i)return;r.error?i.reject(Ac(o_(r.error))):i.resolve(o_(r.data));return}if(!this.messageHandlers[r.type]){this.completeTask(e,null,null);return}let t=o_(r.data),a=new AbortController;this.abortControllers[e]=a;try{let i=yield this.messageHandlers[r.type](r.sourceMapId,t,a);this.completeTask(e,null,i)}catch(i){this.completeTask(e,Ac(i))}})}completeTask(e,r,t){let a=[];delete this.abortControllers[e];let i={id:e,type:"",sourceMapId:this.mapId,origin:location.origin,error:r?n_(r):null,data:n_(t,a)};this.target.postMessage(i,{transfer:a})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},j_=class{constructor(e,r,t){if(!Wpe(e,r,t))throw Error(`x=${r}, y=${t}, z=${e} outside of bounds. 0<=x<${2**e}, 0<=y<${2**e} 0<=z<=25 `);this.z=e,this.x=r,this.y=t,this.key=_1(0,e,e,r,t)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,r,t){let a=$pe(this.x,this.y,this.z),i=Ype(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(t==="tms"?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,r>1?"@2x":"").replace(/{quadkey}/g,i).replace(/{bbox-epsg-3857}/g,a)}isChildOf(e){let r=this.z-e.z;return r>0&&e.x===this.x>>r&&e.y===this.y>>r}getTilePoint(e){let r=2**this.z;return new zr((e.x*r-this.x)*xa,(e.y*r-this.y)*xa)}toString(){return`${this.z}/${this.x}/${this.y}`}},U_=class{constructor(e,r){this.wrap=e,this.canonical=r,this.key=_1(e,r.z,r.z,r.x,r.y)}},Yu=class Td{constructor(r,t,a,i,o){if(this.terrainRttPosMatrix32f=null,r= z; overscaledZ = ${r}; z = ${a}`);this.overscaledZ=r,this.wrap=t,this.canonical=new j_(a,+i,+o),this.key=_1(t,r,a,i,o)}clone(){return new Td(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(r){return this.overscaledZ===r.overscaledZ&&this.wrap===r.wrap&&this.canonical.equals(r.canonical)}scaledTo(r){if(r>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${r}; overscaledZ = ${this.overscaledZ}`);let t=this.canonical.z-r;return r>this.canonical.z?new Td(r,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Td(r,this.wrap,r,this.canonical.x>>t,this.canonical.y>>t)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(r,t){if(r>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${r}; overscaledZ = ${this.overscaledZ}`);let a=this.canonical.z-r;return r>this.canonical.z?_1(this.wrap*+t,r,this.canonical.z,this.canonical.x,this.canonical.y):_1(this.wrap*+t,r,r,this.canonical.x>>a,this.canonical.y>>a)}isChildOf(r){if(r.wrap!==this.wrap||this.overscaledZ-r.overscaledZ<=0)return!1;if(r.overscaledZ===0)return this.overscaledZ>0;let t=this.canonical.z-r.canonical.z;return t<0?!1:r.canonical.x===this.canonical.x>>t&&r.canonical.y===this.canonical.y>>t}children(r){if(this.overscaledZ>=r)return[new Td(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let t=this.canonical.z+1,a=this.canonical.x*2,i=this.canonical.y*2;return[new Td(t,this.wrap,t,a,i),new Td(t,this.wrap,t,a+1,i),new Td(t,this.wrap,t,a,i+1),new Td(t,this.wrap,t,a+1,i+1)]}isLessThan(r){return this.wrapr.wrap?!1:this.overscaledZr.overscaledZ?!1:this.canonical.xr.canonical.x?!1:this.canonical.y=0&&r=0&&t=u)return null;let f=this.canonical.x+i,h=this.wrap;return f<0?(h-=Math.ceil(-f/u),f=(f%u+u)%u):f>=u&&(h+=Math.floor(f/u),f%=u),{tileID:new Td(this.overscaledZ,h,n,f,c),x:s,y:l}}},o3=Math.PI*6378137,Ri("CanonicalTileID",j_),Ri("OverscaledTileID",Yu,{omit:["terrainRttPosMatrix32f"]}),q_="_geojsonTileLayer",kN=class{constructor(e){this._stringToNumber={},this._numberToString=[];for(let r=0;r=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}},Ak=class{constructor(e,r,t,a,i){this.type="Feature",this._vectorTileFeature=e,this._x=t,this._y=a,this._z=r;for(let o in e.properties)typeof e.properties[o]=="string"&&e.properties[o].startsWith("__$json__:")&&(e.properties[o]=JSON.parse(e.properties[o].slice(10)));this.properties=e.properties,this.id=i}projectPoint(e,r,t,a){return[(e.x+r)*360/a-180,360/Math.PI*Math.atan(Math.exp((1-(e.y+t)*2/a)*Math.PI))-90]}projectLine(e,r,t,a){return e.map(i=>this.projectPoint(i,r,t,a))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,r=e.extent*2**this._z,t=e.extent*this._x,a=e.extent*this._y,i=e.loadGeometry();switch(e.type){case 1:{let o=[];for(let l of i)o.push(l[0]);let s=this.projectLine(o,t,a,r);this._geometry=o.length===1?{type:"Point",coordinates:s[0]}:{type:"MultiPoint",coordinates:s};break}case 2:{let o=i.map(s=>this.projectLine(s,t,a,r));this._geometry=o.length===1?{type:"LineString",coordinates:o[0]}:{type:"MultiLineString",coordinates:o};break}case 3:{let o=m5(i),s=[];for(let l of o)s.push(l.map(n=>this.projectLine(n,t,a,r)));this._geometry=s.length===1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s};break}default:throw Error(`unknown feature type: ${e.type}`)}return this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&r!=="_x"&&r!=="_y"&&r!=="_z"&&(e[r]=this[r]);return e}},j0=class{constructor(e,r,t){this._name=e,this.dataBuffer=r,typeof t=="number"?this._size=t:(this.nullabilityBuffer=t,this._size=t.size())}getValue(e){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(e)?null:this.getValueFromBuffer(e)}has(e){var r;return((r=this.nullabilityBuffer)==null?void 0:r.get(e))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},V_=class extends j0{},s3=class extends V_{getValueFromBuffer(e){return this.dataBuffer[e]}},l3=class extends V_{getValueFromBuffer(e){return this.dataBuffer[e]}},Tk=class extends j0{constructor(e,r,t,a){super(e,r,a),this.delta=t}},u3=class extends Tk{constructor(e,r,t,a,i){super(e,i?Int32Array.of(r):Uint32Array.of(r),t,a)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}},c3=class extends j0{constructor(e,r,t,a){super(e,a?Int32Array.of(r):Uint32Array.of(r),t)}getValueFromBuffer(e){return this.dataBuffer[0]}},CN=class{constructor(e,r,t,a,i=4096){if(this._name=e,this._geometryVector=r,this._idVector=t,this._propertyVectors=a,this._extent=i,e.length===0)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){var e;return(e=this._propertyVectors)!=null?e:[]}getPropertyVector(e){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this.propertyVectors.map(r=>[r.name,r]))),this.propertyVectorsMap.get(e)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let e=[],r=this.geometryVector.getGeometries();for(let t=0;t>>32-e;h3=f3,Sk=65536,d3=Zpe(Sk),DN=3*d3/256+d3|0,(function(e){e.PRESENT="PRESENT",e.DATA="DATA",e.OFFSET="OFFSET",e.LENGTH="LENGTH"})(zl||(zl={})),(function(e){e.NONE="NONE",e.SINGLE="SINGLE",e.SHARED="SHARED",e.VERTEX="VERTEX",e.MORTON="MORTON",e.FSST="FSST"})(Gc||(Gc={})),(function(e){e.VERTEX="VERTEX",e.INDEX="INDEX",e.STRING="STRING",e.KEY="KEY"})(_p||(_p={})),(function(e){e.VAR_BINARY="VAR_BINARY",e.GEOMETRIES="GEOMETRIES",e.PARTS="PARTS",e.RINGS="RINGS",e.TRIANGLES="TRIANGLES",e.SYMBOL="SYMBOL",e.DICTIONARY="DICTIONARY"})(hu||(hu={})),LN=[zl.PRESENT,zl.DATA,zl.OFFSET,zl.LENGTH],kk=[to.NONE,to.DELTA,to.COMPONENTWISE_DELTA,to.RLE,to.MORTON],FN=[yh.NONE,yh.FAST_PFOR,yh.VARINT],PN=[Gc.NONE,Gc.SINGLE,Gc.SHARED,Gc.VERTEX,Gc.MORTON,Gc.FSST],IN=[_p.VERTEX,_p.INDEX,_p.STRING,_p.KEY],RN=[hu.VAR_BINARY,hu.GEOMETRIES,hu.PARTS,hu.RINGS,hu.TRIANGLES,hu.SYMBOL,hu.DICTIONARY],(function(e){e[e.FLAT=0]="FLAT",e[e.CONST=1]="CONST",e[e.SEQUENCE=2]="SEQUENCE",e[e.DICTIONARY=3]="DICTIONARY",e[e.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(Bs||(Bs={})),Zh=class{constructor(e,r){this.values=e,this._size=r}get(e){let r=Math.floor(e/8),t=e%8;return(this.values[r]>>t&1)==1}set(e,r){let t=Math.floor(e/8),a=e%8;this.values[t]=this.values[t]|+!!r<>t&1}size(){return this._size}getBuffer(){return this.values}},zN=new TextDecoder,Ck=class extends V_{getValueFromBuffer(e){return this.dataBuffer[e]}},Dk=class extends Tk{constructor(e,r,t,a,i){super(e,i?BigInt64Array.of(r):BigUint64Array.of(r),t,a)}getValueFromBuffer(e){return this.dataBuffer[0]+BigInt(e)*this.delta}},(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON",e[e.MULTIPOINT=3]="MULTIPOINT",e[e.MULTILINESTRING=4]="MULTILINESTRING",e[e.MULTIPOLYGON=5]="MULTIPOLYGON"})(Xu||(Xu={})),(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON"})(BN||(BN={})),(function(e){e[e.MORTON=0]="MORTON",e[e.VEC_2=1]="VEC_2",e[e.VEC_3=2]="VEC_3"})(U0||(U0={})),Lk=class{constructor(e,r,t,a,i){this._vertexBufferType=e,this._topologyVector=r,this._vertexOffsets=t,this._vertexBuffer=a,this._mortonSettings=i}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(e){let r=this.vertexOffsets?this.vertexOffsets[e]*2:e*2;return[this.vertexBuffer[r],this.vertexBuffer[r+1]]}getVertex(e){if(this.vertexOffsets&&this.mortonSettings){let t=this.vertexOffsets[e],a=this.vertexBuffer[t],i=QE(a,this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[i.x,i.y]}let r=this.vertexOffsets?this.vertexOffsets[e]*2:e*2;return[this.vertexBuffer[r],this.vertexBuffer[r+1]]}getGeometries(){return Sve(this)}get mortonSettings(){return this._mortonSettings}},Fk=class extends Lk{constructor(e,r,t,a,i,o,s){super(t,a,i,o,s),this._numGeometries=e,this._geometryType=r}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===Xu.POLYGON||this._geometryType===Xu.MULTIPOLYGON}containsSingleGeometryType(){return!0}},Pk=class extends Lk{constructor(e,r,t,a,i,o){super(e,t,a,i,o),this._geometryTypes=r}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let e=0;eCi(ja({},t),{[a.name]:new GN(a)}),{})}},WN=class{constructor(e,r){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new ow(xa,16,0),this.grid3D=new ow(xa,16,0),this.featureIndexArray=new $S,this.promoteId=r}insert(e,r,t,a,i,o){let s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(t,a,i);let l=o?this.grid3D:this.grid;for(let n of r){let u=[1/0,1/0,-1/0,-1/0];for(let c of n)u[0]=Math.min(u[0],c.x),u[1]=Math.min(u[1],c.y),u[2]=Math.max(u[2],c.x),u[3]=Math.max(u[3],c.y);u[0]<8192&&u[1]<8192&&u[2]>=0&&u[3]>=0&&l.insert(s,u[0],u[1],u[2],u[3])}}loadVTLayers(){return this.vtLayers||(this.encoding==="mlt"?this.vtLayers=new HN(this.rawTileData).layers:this.vtLayers=new LO(new gk(this.rawTileData)).layers,this.sourceLayerCoder=new kN(this.vtLayers?Object.keys(this.vtLayers).sort():[q_])),this.vtLayers}query(e,r,t,a){this.loadVTLayers();let i=e.params,o=xa/e.tileSize/e.scale,s=t_(i.filter,"queryRenderedFeatures filter",i.globalState),l=e.queryGeometry,n=e.queryPadding*o,u=Xh.fromPoints(l),c=this.grid.query(u.minX-n,u.minY-n,u.maxX+n,u.maxY+n),f=Xh.fromPoints(e.cameraQueryGeometry).expandBy(n),h=this.grid3D.query(f.minX,f.minY,f.maxX,f.maxY,(g,m,y,_)=>Mhe(e.cameraQueryGeometry,g-n,m-n,y+n,_+n));for(let g of h)c.push(g);c.sort(vme);let d={},p;for(let g of c){if(g===p)continue;p=g;let m=this.featureIndexArray.get(g),y=null;this.loadMatchingFeature(d,m.bucketIndex,m.sourceLayerIndex,m.featureIndex,s,i.layers,i.availableImages,r,t,a,(_,v,x)=>(y||(y=Xv(_)),v.queryIntersectsFeature({queryGeometry:l,feature:_,featureState:x,geometry:y,zoom:this.z,transform:e.transform,pixelsToTileUnits:o,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return d}loadMatchingFeature(e,r,t,a,i,o,s,l,n,u,c){let f=this.bucketLayerIDs[r];if(o&&!f.some(g=>o.has(g)))return;let h=this.sourceLayerCoder.decode(t),d=this.vtLayers[h].feature(a);if(i.needGeometry){let g=Zv(d,!0);if(!i.filter(new Ko(this.tileID.overscaledZ),g,this.tileID.canonical))return}else if(!i.filter(new Ko(this.tileID.overscaledZ),d))return;let p=this.getId(d,h);for(let g of f){if(o&&!o.has(g))continue;let m=l[g];if(!m)continue;let y={};p&&u&&(y=u.getState(m.sourceLayer||"_geojsonTileLayer",p));let _=tn({},n[g]);_.paint=Fz(_.paint,m.paint,d,y,s),_.layout=Fz(_.layout,m.layout,d,y,s);let v=!c||c(d,m,y);if(!v)continue;let x=new Ak(d,this.z,this.x,this.y,p);x.layer=_;let E=e[g];E===void 0&&(E=e[g]=[]),E.push({featureIndex:a,feature:x,intersectionZ:v})}}lookupSymbolFeatures(e,r,t,a,i,o,s,l){let n={};this.loadVTLayers();let u=t_(i.filterSpec,"queryRenderedFeatures symbol filter",i.globalState);for(let c of e)this.loadMatchingFeature(n,t,a,c,u,o,s,l,r);return n}hasLayer(e){for(let r of this.bucketLayerIDs)for(let t of r)if(e===t)return!0;return!1}getId(e,r){var t;let a=e.id;if(this.promoteId){let i=typeof this.promoteId=="string"?this.promoteId:this.promoteId[r];a=e.properties[i],typeof a=="boolean"&&(a=Number(a)),a===void 0&&((t=e.properties)!=null&&t.cluster)&&this.promoteId&&(a=Number(e.properties.cluster_id))}return a}},Ri("FeatureIndex",WN,{omit:["rawTileData","sourceLayerCoder"]}),$N=class{constructor(e,r){this.max=e,this.onRemove=r,this.reset()}reset(){for(let e in this.data)for(let r of this.data[e])r.timeout&&clearTimeout(r.timeout),this.onRemove(r.value);return this.data={},this.order=[],this}add(e,r,t){let a=e.wrapped().key;this.data[a]===void 0&&(this.data[a]=[]);let i={value:r,timeout:void 0};if(t!==void 0&&(i.timeout=setTimeout(()=>{this.remove(e,i)},t)),this.data[a].push(i),this.order.push(a),this.order.length>this.max){let o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let r=this.data[e].shift();return r.timeout&&clearTimeout(r.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),r.value}getByKey(e){let r=this.data[e];return r?r[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,r){if(!this.has(e))return this;let t=e.wrapped().key,a=r===void 0?0:this.data[t].indexOf(r),i=this.data[t][a];return this.data[t].splice(a,1),i.timeout&&clearTimeout(i.timeout),this.data[t].length===0&&delete this.data[t],this.onRemove(i.value),this.order.splice(this.order.indexOf(t),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let r=this._getAndRemoveByKey(this.order[0]);r&&this.onRemove(r)}return this}filter(e){let r=[];for(let t in this.data)for(let a of this.data[t])e(a.value)||r.push(a);for(let t of r)this.remove(t.value.tileID,t)}}}}),YN={};rl(YN,{AJAXError:()=>M1,AttributionControl:()=>b7,BoxZoomHandler:()=>s7,CanvasSource:()=>MC,CooperativeGesturesHandler:()=>_7,DoubleClickZoomHandler:()=>v7,DragPanHandler:()=>m7,DragRotateHandler:()=>g7,EXTENT:()=>xa,EdgeInsets:()=>$3,ErrorEvent:()=>mn,Event:()=>qf,Evented:()=>Zl,FullscreenControl:()=>WV,FullscreenEvent:()=>h4,GPUInitializationError:()=>n7,GeoJSONSource:()=>AC,GeolocateControl:()=>VV,GeolocateErrorEvent:()=>D7,GeolocateEvent:()=>W0,GeolocatePositionEvent:()=>f4,GlobeControl:()=>YV,Hash:()=>o7,ImageSource:()=>dm,KeyboardHandler:()=>h7,LngLat:()=>ln,LngLatBounds:()=>Qh,LogoControl:()=>w7,Map:()=>M7,MapBoxZoomEvent:()=>I3,MapContextEvent:()=>J_,MapLibreEvent:()=>vu,MapLibreMap:()=>M7,MapMouseEvent:()=>Vf,MapMovementEvent:()=>hn,MapProjectionEvent:()=>gC,MapSourceDataEvent:()=>Fs,MapStyleDataEvent:()=>_h,MapStyleImageMissingEvent:()=>yC,MapStyleLoadEvent:()=>P3,MapTerrainEvent:()=>mC,MapTouchEvent:()=>X1,MapWheelEvent:()=>vC,Marker:()=>c4,MarkerClickEvent:()=>C7,MarkerDragEvent:()=>H0,MercatorCoordinate:()=>$o,NavigationControl:()=>jV,Point:()=>zr,Popup:()=>KV,PopupEvent:()=>d4,RasterDEMTileSource:()=>wC,RasterTileSource:()=>j3,ScaleControl:()=>HV,ScrollZoomHandler:()=>p7,Style:()=>J3,TerrainControl:()=>$V,TwoFingersTouchPitchHandler:()=>f7,TwoFingersTouchRotateHandler:()=>c7,TwoFingersTouchZoomHandler:()=>u7,TwoFingersTouchZoomRotateHandler:()=>y7,VectorTileSource:()=>bC,VideoSource:()=>TC,addProtocol:()=>Gce,addSourceType:()=>Bj,clearPrewarmedResources:()=>qme,config:()=>Uf,createTileMesh:()=>d8,getGlobalDispatcher:()=>qk,getMaxParallelImageRequests:()=>cye,getRTLTextPluginStatus:()=>oye,getVersion:()=>sye,getWorkerCount:()=>lye,getWorkerUrl:()=>hye,importScriptInWorkers:()=>pye,isTimeFrozen:()=>Tme,now:()=>is,prewarm:()=>Ume,removeProtocol:()=>Hce,restoreNow:()=>Ame,setMaxParallelImageRequests:()=>fye,setNow:()=>wme,setRTLTextPlugin:()=>nye,setWorkerCount:()=>uye,setWorkerUrl:()=>dye});function XN(){var e=new fu(4);return fu!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function _me(e,r){var t=r[0],a=r[1],i=r[2],o=r[3],s=t*o-i*a;return s?(s=1/s,e[0]=o*s,e[1]=-a*s,e[2]=-i*s,e[3]=t*s,e):null}function xme(e){return e[0]*e[3]-e[2]*e[1]}function bme(e,r,t){var a=r[0],i=r[1],o=r[2],s=r[3],l=Math.sin(t),n=Math.cos(t);return e[0]=a*n+o*l,e[1]=i*n+s*l,e[2]=a*-l+o*n,e[3]=i*-l+s*n,e}function is(){return K_.getCurrentTime()}function wme(e){K_.setNow(e)}function Ame(){K_.restoreNow()}function Tme(){return K_.isFrozen()}function Mme(e,r){let t={};for(let a in e)a!=="ref"&&(t[a]=e[a]);return Wz.forEach(a=>{a in r&&(t[a]=r[a])}),t}function ZN(e){e=e.slice();let r=Object.create(null);for(let t=0;t{"source"in s&&a[s.source]?t.push({command:"removeLayer",args:[s.id]}):o.push(s)}),t=t.concat(i),Cme(o,r.layers,t)}catch(a){console.warn("Unable to compute style diff:",a),t=[{command:"setStyle",args:[r]}]}return t}function Lme(){let e={},r=ta.$version;for(let t in ta.$root){let a=ta.$root[t];if(a.required){let i=null;i=t==="version"?r:a.type==="array"?[]:{},i!=null&&(e[t]=i)}}return e}function m3(e){let r=[];if(typeof e=="string")r.push({id:"default",url:e});else if(e&&e.length>0){let t=[];for(let{id:a,url:i}of e){let o=`${a}${i}`;t.includes(o)||(t.push(o),r.push({id:a,url:i}))}}return r}function t8(e,r,t){try{let a=new URL(e);return a.pathname+=`${r}${t}`,a.toString()}catch{throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function Fme(e,r,t,a){return yi(this,null,function*(){let i=m3(e),o=t>1?"@2x":"",s={},l={};for(let{id:n,url:u}of i){let c=yield r.transformRequest(t8(u,o,".json"),"SpriteJSON");s[n]=x_(c,a);let f=yield r.transformRequest(t8(u,o,".png"),"SpriteImage");l[n]=Gd.getImage(f,a)}return yield Promise.all([...Object.values(s),...Object.values(l)]),Pme(s,l)})}function Pme(e,r){return yi(this,null,function*(){let t={};for(let a in e){t[a]={};let i=(yield r[a]).data;if(!i)throw Error(`Could not load sprite image for ${a}: the response is empty`);let o=Hc.getImageCanvasContext(i),s=(yield e[a]).data;for(let l in s){let{width:n,height:u,x:c,y:f,sdf:h,pixelRatio:d,stretchX:p,stretchY:g,content:m,textFitWidth:y,textFitHeight:_}=s[l],v={width:n,height:u,x:c,y:f,context:o};t[a][l]={data:null,pixelRatio:d,sdf:h,stretchX:p,stretchY:g,content:m,textFitWidth:y,textFitHeight:_,spriteData:v}}}return t})}function Ime(e){let r=/^u\+([0-9a-f]*)(\?+)$/i.exec(e);if(r){let[,i,o]=r;return i.length+o.length>6?null:r8(parseInt(`${i}${"0".repeat(o.length)}`,16),parseInt(`${i}${"f".repeat(o.length)}`,16))}let t=/^u\+([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?$/i.exec(e);if(!t)return null;let a=parseInt(t[1],16);return r8(a,t[2]===void 0?a:parseInt(t[2],16))}function r8(e,r){return e>r||e>R3?null:{start:e,end:Math.min(r,R3)}}function Rme(e,r){return e.ranges.some(({start:t,end:a})=>r>=t&&r<=a)}function a8(e,r,t,a,i,o,s,l,n){for(let u=r;u-1);n++,o[n]=l,s[n]=u,s[n+1]=z3}for(let l=0,n=0;l__(r,t))),N3}function Vme(e,r){let t=w0();return Xl(t,t,[1,1,0]),wc(t,t,[e.width*.5,e.height*.5,1]),e.calculatePosMatrix?t1(t,t,e.calculatePosMatrix(r.toUnwrapped())):t}function Gme(e,r,t){if(e)for(let a of e){let i=r[a];if(i?.source===t&&i.type==="fill-extrusion")return!0}else for(let a in r){let i=r[a];if(i.source===t&&i.type==="fill-extrusion")return!0}return!1}function Hme(e,r,t,a,i,o,s){var l;let n=Gme((l=i?.layers)!=null?l:null,r,e.id),u=o.maxPitchScaleFactor(),c=e.tilesIn(a,u,n);c.sort(n8);let f=[];for(let h of c)f.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(r,t,e.getState(),h.queryGeometry,h.cameraQueryGeometry,h.scale,i,o,u,Vme(o,h.tileID),s?(d,p)=>s(h.tileID,d,p):void 0)});return Xme(Yme(f),e)}function Wme(e,r,t,a,i,o,s){let l={},n=o.queryRenderedSymbols(a),u=[];for(let c of Object.keys(n).map(Number))u.push(s[c]);u.sort(n8);for(let c of u){let f=c.featureIndex.lookupSymbolFeatures(n[c.bucketInstanceId],r,c.bucketIndex,c.sourceLayerIndex,{filterSpec:i.filter,globalState:i.globalState},i.layers,i.availableImages,e);for(let h in f){l[h]||(l[h]=[]);let d=f[h];d.sort((p,g)=>{let m=c.featureSortOrder;if(m){let y=m.indexOf(p.featureIndex);return m.indexOf(g.featureIndex)-y}return g.featureIndex-p.featureIndex});for(let p of d)l[h].push(p)}}return Zme(l,e,t)}function $me(e,r){let t=e.getRenderableIds().map(o=>e.getTileByID(o)),a=[],i={};for(let o of t){let s=o.tileID.canonical.key;i[s]||(i[s]=!0,o.querySourceFeatures(a,r))}return a}function n8(e,r){let t=e.tileID,a=r.tileID;return t.overscaledZ-a.overscaledZ||t.canonical.y-a.canonical.y||t.wrap-a.wrap||t.canonical.x-a.canonical.x}function Yme(e){let r={},t={};for(let{queryResults:a,wrappedTileID:i}of e){t[i]||(t[i]={});let o=t[i];for(let s in a){let l=a[s];o[s]||(o[s]={});let n=o[s];r[s]||(r[s]=[]);for(let u of l)n[u.featureIndex]||(n[u.featureIndex]=!0,r[s].push(u))}}return r}function Xme(e,r){for(let t in e)for(let a of e[t])o8(a,r);return e}function Zme(e,r,t){for(let a in e)for(let i of e[a]){let o=t[r[a].source];o8(i,o)}return e}function o8(e,r){let t=e.feature,a=r.getFeatureState(t.layer["source-layer"],t.id);t.source=t.layer.source,t.layer["source-layer"]&&(t.sourceLayer=t.layer["source-layer"]),t.state=a}function s8(e,r,t,a){return yi(this,null,function*(){let i=e;if(e.url?i=(yield x_(yield r.transformRequest(e.url,"Source"),t)).data:yield Hc.frameAsync(t,a),!i)return null;let o=Gy(tn(i,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in i&&i.vector_layers&&(o.vectorLayerIds=i.vector_layers.map(s=>s.id)),o})}function G_(e,r){return r?e.properties[r]:e.id}function Kme(e,r){let t=new Map;if(e==null||e.type==null)return t;if(e.type==="Feature"){let a=G_(e,r);return a==null?void 0:(t.set(a,e),t)}if(e.type==="FeatureCollection"){let a=new Set;for(let i of e.features){let o=G_(i,r);if(o==null||a.has(o))return;a.add(o),t.set(o,i)}return t}}function Jme(e,r,t){var a,i;let o=[];if(r.removeAll)e.clear();else if(r.remove)for(let s of r.remove){let l=e.get(s);l&&(o.push(l.geometry),e.delete(s))}if(r.add)for(let s of r.add){let l=G_(s,t);if(l==null)continue;let n=e.get(l);n&&o.push(n.geometry),o.push(s.geometry),e.set(l,s)}if(r.update)for(let s of r.update){let l=e.get(s.id);if(!l)continue;let n=!!s.newGeometry,u=s.removeAllProperties||((a=s.removeProperties)==null?void 0:a.length)>0||((i=s.addOrUpdateProperties)==null?void 0:i.length)>0;if(!n&&!u)continue;o.push(l.geometry);let c=ja({},l);if(e.set(s.id,c),n&&(o.push(s.newGeometry),c.geometry=s.newGeometry),u){if(c.properties=s.removeAllProperties?{}:ja({},c.properties||{}),s.removeProperties)for(let f of s.removeProperties)delete c.properties[f];if(s.addOrUpdateProperties)for(let{key:f,value:h}of s.addOrUpdateProperties)c.properties[f]=h}}return o}function Qme(e,r,t){if(!e)return r||{};if(!r)return e||{};t&&(l8(e.add,t),l8(r.add,t));let a=u8(e),i=u8(r);e1e(a,i);let o={};if((a.removeAll||i.removeAll)&&(o.removeAll=!0),o.remove=new Set([...a.remove,...i.remove]),o.add=new Map([...a.add,...i.add]),o.update=new Map([...a.update,...i.update]),o.remove.size&&o.add.size)for(let l of o.add.keys())o.remove.delete(l);let s=a1e(o);return t&&r1e(s.add,t),s}function e1e(e,r){r.removeAll&&(e.add.clear(),e.update.clear(),e.remove.clear(),r.remove.clear());for(let t of r.remove)e.add.delete(t),e.update.delete(t);for(let[t,a]of r.update){let i=e.update.get(t);i&&(r.update.set(t,t1e(i,a)),e.update.delete(t))}}function t1e(e,r){let t={id:e.id};if(r.removeAllProperties&&(delete e.removeProperties,delete e.addOrUpdateProperties,delete r.removeProperties),r.removeProperties&&e.addOrUpdateProperties){let a=new Set(r.removeProperties);e.addOrUpdateProperties=e.addOrUpdateProperties.filter(i=>!a.has(i.key))}return(e.removeAllProperties||r.removeAllProperties)&&(t.removeAllProperties=!0),(e.removeProperties||r.removeProperties)&&(t.removeProperties=[...e.removeProperties||[],...r.removeProperties||[]]),(e.addOrUpdateProperties||r.addOrUpdateProperties)&&(t.addOrUpdateProperties=[...e.addOrUpdateProperties||[],...r.addOrUpdateProperties||[]]),(e.newGeometry||r.newGeometry)&&(t.newGeometry=r.newGeometry||e.newGeometry),t}function l8(e,r){if(e)for(let t of e){let a=G_(t,r);a!=null&&(t.id=a)}}function r1e(e,r){if(e)for(let t of e)G_(t,r)!=null&&delete t.id}function u8(e){var r,t;if(!e)return{};let a={};return a.removeAll=e.removeAll,a.remove=new Set(e.remove||[]),a.add=new Map((r=e.add)==null?void 0:r.map(i=>[i.id,i])),a.update=new Map((t=e.update)==null?void 0:t.map(i=>[i.id,i])),a}function a1e(e){let r={};return e.removeAll&&(r.removeAll=e.removeAll),e.remove&&(r.remove=Array.from(e.remove)),e.add&&(r.add=Array.from(e.add.values())),e.update&&(r.update=Array.from(e.update.values())),r}function c8(e){return!e||e.length===0?[]:typeof e[0]=="number"?[e]:e.flatMap(r=>c8(r))}function g3(e){return e.type==="GeometryCollection"?e.geometries.flatMap(r=>g3(r)):c8(e.coordinates)}function f8(e){let r=new Qh,t;switch(e.type){case"FeatureCollection":t=e.features.flatMap(a=>g3(a.geometry));break;case"Feature":t=g3(e.geometry);break;default:t=g3(e)}if(t.length===0)return r;for(let a of t){let[i,o]=a;r.extend([i,o])}return r}function i1e({x:e,y:r,z:t},a=0){let i=RE((e-a)/2**t),o=f_((r+1+a)/2**t),s=RE((e+1+a)/2**t),l=f_((r-a)/2**t);return new Qh([i,o],[s,l])}function n1e(e){e*=Math.PI/180;let r=Math.sin(e),t=Math.cos(e);return[(2*t+1)/3,(-Math.sqrt(3)*r-t+1)/3,(Math.sqrt(3)*r-t+1)/3]}function o1e(e){return e>0?1/(1-e):1+e}function s1e(e){return e>0?1-1/(1.001-e):-e}function h8(e,r){let t=d8(r,"16bit"),a=Kp.deserialize({arrayBuffer:t.vertices,length:t.vertices.byteLength/2/2}),i=Vd.deserialize({arrayBuffer:t.indices,length:t.indices.byteLength/2/3});return new Z1(e.createVertexBuffer(a,G0.members),e.createIndexBuffer(i),Zs.simpleSegment(0,0,a.length,i.length))}function d8(e,r){let t=e.granularity===void 0?1:Math.max(e.granularity,1),a=t+(e.generateBorders?2:0),i=t+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),o=a+1,s=i+1,l=e.generateBorders?-1:0,n=e.generateBorders||e.extendToNorthPole?-1:0,u=t+ +!!e.generateBorders,c=t+(e.generateBorders||e.extendToSouthPole?1:0),f=o*s,h=a*i*6,d=o*s>65536;if(d&&r==="16bit")throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let p=d||r==="32bit",g=new Int16Array(f*2),m=0;for(let v=n;v<=c;v++)for(let x=l;x<=u;x++){let E=x/t*xa;x===-1&&(E=-tx),x===t+1&&(E=xa+tx);let M=v/t*xa;v===-1&&(M=e.extendToNorthPole?q1:-tx),v===t+1&&(M=e.extendToSouthPole?V1:xa+tx),g[m++]=E,g[m++]=M}let y=p?new Uint32Array(h):new Uint16Array(h),_=0;for(let v=0;v=1&&y<=512)||_>=1?hm:[p,g,_]}function f1e(e){let r=(1-4/e)/.9921875;return Math.max(0,r)}function p8(e){let[r,t,a,i]=e;return r.x+a.x===t.x+i.x&&r.y+a.y===t.y+i.y}function h1e(e,r){let t={};if(!r)return t;for(let a of e){let i=a.layerIds.map(o=>r.getLayer(o)).filter(Boolean);if(i.length!==0){a.layers=i,a.stateDependentLayerIds&&(a.stateDependentLayers=a.stateDependentLayerIds.map(o=>i.filter(s=>s.id===o)[0]));for(let o of i)t[o.id]=a}}return t}function H_(){return q3||(q3=new Oj),q3}function v8(e){let r=[];for(let t in e)r.push({id:t,state:e[t]});return r}function d1e(e,r,t,a){let i=Cu([],e,r),o=1/i[3]/t*a;return Nz(i,i,[o,o,1/i[3],o])}function p1e(e,r,t,a){let i=a?4:0,o=a?0:4,s=0,l=[],n=[];for(let f=0;f<4;f++){let h=hp([],e[f+o],e[f+i]),d=Yp(h);Ws(h,h,1/d),l.push(d),n.push(h)}for(let f=0;f<4;f++){let h=kce(e[f+i],n[f],t);s=h!==null&&h>=0?Math.max(s,h):Math.max(s,l[f])}let u=v1e(e,r),c=m1e(t,u);if(c!==null){let f=c/uu(n[0],u);s=Math.min(s,f)}for(let f=0;f<4;f++){let h=Math.min(s,l[f]);e[f+o]=[e[f+i][0]+n[f][0]*h,e[f+i][1]+n[f][1]*h,e[f+i][2]+n[f][2]*h,1]}}function v1e(e,r){let t=hp([],e[r[0]],e[r[1]]),a=hp([],e[r[2]],e[r[1]]),i=[0,0,0,0];return xf(i,Nf([],t,a)),i[3]=-uu(i,e[r[0]]),i}function m1e(e,r){let t=y_(e),a=bce([],e,1/t),i=hp([],r,Ws([],a,uu(r,a))),o=y_(i);if(o>0){let s=Math.sqrt(1-a[3]*a[3]),l=Ws([],a,-a[3]),n=jh([],l,Ws([],i,s/o));return qM(r,n)}return null}function g1e(e,r,t){let a=r.intersectsFrustum(e);if(!t||a===0)return a;let i=r.intersectsPlane(t);return i===0?0:a===2&&i===2?2:1}function m8(e,r,t){let a=0,i=(t-r)/10;for(let o=0;o<10;o++){let s=r+(o+.5)/10*(t-r);a+=i*Math.cos(s)**+e}return a}function Vk(e,r){return function(t,a,i,o,s){let l=2*((e-1)/Tc(Math.cos(il(N0-s))/Math.cos(il(N0)))-1),n=Math.acos(i/o),u=2*m8(l-1,0,il(s/2)),c=Math.min(il(N0),n+il(s/2)),f=Math.min(c,n-il(s/2)),h=m8(l-1,f,c),d=Math.atan(a/i),p=Math.hypot(a,i),g=t;return g+=Tc(o/p/Math.max(.5,Math.cos(il(s/2)))),g+=l*Tc(Math.cos(d))/2,g-=Tc(Math.max(1,h/u/r))/2,g}}function Gk(e,r){let t=(r.roundZoom?Math.round:Math.floor)(e.zoom+Tc(e.tileSize/r.tileSize));return Math.max(0,t)}function y1e(e,r){let t=N0-e.pitch-e.fov/2,a=Gn((15-t)/15,0,1),i=Math.max(500,r??0);return e.elevation+a*i}function _1e(e,r,t){let a=e.planes[1],i=e.points.map(n=>{let u=a[0]*n[0]+a[1]*n[1]+a[2]*n[2]+a[3];if(Math.abs(u)>1e-6)return n;let c=[n[0]-t[0],n[1]-t[1],n[2]-t[2]],f=a[0]*c[0]+a[1]*c[1]+a[2]*c[2];if(f>=-1e-9)return n;let h=r/-f;return[n[0]+c[0]*h,n[1]+c[1]*h,n[2]+c[2]*h,n[3]]}),o=e.planes.map((n,u)=>u===1?[n[0],n[1],n[2],n[3]+r]:n),s=[1/0,1/0,1/0],l=[-1/0,-1/0,-1/0];for(let n of i)for(let u=0;u<3;u++)s[u]=Math.min(s[u],n[u]),l[u]=Math.max(l[u],n[u]);return new G3(i,o,new V3(s,l))}function W1(e,r){let t=e.getCameraFrustum(),a=e.getClippingPlane();if(a&&r.maxContentElevation>0){let M=Math.hypot(a[0],a[1],a[2]);if(M>0){let C=1+r.maxContentElevation/Vc,w=Gn(-a[3]/M,-1,1),k=Math.cos(Math.acos(w)+Math.acos(1/C));a=[a[0],a[1],a[2],-k*M],t=_1e(t,Math.sqrt(C*C-1),e.cameraPosition)}}let i=lde(e),o=$o.fromLngLat(e.center,e.elevation),s=y1e(e,r.maxContentElevation),l=e.getCoveringTilesDetailsProvider(),n=l.allowVariableZoom(e,r),u=Gk(e,r),c=r.minzoom||0,f=r.maxzoom===void 0?e.maxZoom:r.maxzoom,h=Math.min(Math.max(0,u),f),d=2**h,p=[d*i.x,d*i.y,0],g=[d*o.x,d*o.y,0],m=Math.hypot(o.x-i.x,o.y-i.y),y=Math.abs(o.z-i.z),_=Math.hypot(m,y),v=M=>({zoom:0,x:0,y:0,wrap:M,fullyVisible:!1}),x=[],E=[];if(e.renderWorldCopies&&l.allowWorldCopies())for(let M=1;M<=3;M++)x.push(v(-M)),x.push(v(M));for(x.push(v(0));x.length>0;){let M=x.pop(),C=M.x,w=M.y,k=M.fullyVisible,T={x:C,y:w,z:M.zoom},b=l.getTileBoundingVolume(T,M.wrap,s,r);if(!k){let D=g1e(t,b,a);if(D===0)continue;k=D===2}let S=l.distanceToTile2d(i.x,i.y,T,b),A=u;n&&(A=(r.calculateTileZoom||jj)(e.zoom+Tc(e.tileSize/r.tileSize),S,y,_,e.fov)),A=(r.roundZoom?Math.round:Math.floor)(A),A=Math.max(0,A);let F=Math.min(A,f);if(M.wrap=l.getWrap(o,T,M.wrap),M.zoom>=F){if(M.zoom>1),z=M.zoom+1;x.push({zoom:z,x:R,y:P,wrap:M.wrap,fullyVisible:k})}}return E.sort((M,C)=>M.distanceSq-C.distanceSq).map(M=>M.tileID)}function g8(e){return e==="raster"||e==="image"||e==="video"}function x1e(e,r,t,a,i,o,s){let l=is(),n=Dce(r);for(let u of r){let c=e.getTileById(u.key);(c.fadingDirection===0||c.fadeOpacity===0)&&c.resetFadeLogic(),!b1e(e,c,t,l,a,i,s)&&(w1e(e,c,t,l,o,s)||A1e(c,n,l,s)||c.resetFadeLogic())}}function b1e(e,r,t,a,i,o,s){if(!r.hasData())return!1;let{tileID:l,fadingRole:n,fadingDirection:u,fadingParentID:c}=r;if(n===0&&u===1&&c)return t[c.key]=c,!0;let f=Math.max(l.overscaledZ-i,o);for(let h=l.overscaledZ-1;h>=f;h--){let d=l.scaledTo(h),p=e.getLoadedTile(d);if(p)return r.setCrossFadeLogic({fadingRole:0,fadingDirection:1,fadingParentID:p.tileID,fadeEndTime:a+s}),p.setCrossFadeLogic({fadingRole:1,fadingDirection:0,fadeEndTime:a+s}),t[d.key]=d,!0}return!1}function w1e(e,r,t,a,i,o){if(!r.hasData())return!1;let s=r.tileID.children(i),l=y8(e,r,s,t,a,i,o);if(l)return!0;for(let n of s)y8(e,r,n.children(i),t,a,i,o)&&(l=!0);return l}function y8(e,r,t,a,i,o,s){if(t[0].overscaledZ>=o)return!1;let l=!1;for(let n of t){let u=e.getLoadedTile(n);if(!u)continue;let{fadingRole:c,fadingDirection:f,fadingParentID:h}=u;(c!==0||f!==0||!h)&&(u.setCrossFadeLogic({fadingRole:0,fadingDirection:0,fadingParentID:r.tileID,fadeEndTime:i+s}),r.setCrossFadeLogic({fadingRole:1,fadingDirection:1,fadeEndTime:i+s})),a[n.key]=n,l=!0}return l}function A1e(e,r,t,a){let i=e.tileID;if(e.selfFading)return!0;if(e.hasData())return!1;if(r.has(i)){let o=t+a;return e.setSelfFadeLogic(o),!0}return!1}function T1e(e,r){if(r<=0)return!1;let t=is();for(let a of e.getAllTiles())if(a.fadeEndTime>=t)return!0;return!1}function M1e(e,r){var t,a,i;let o=r.getRenderableIds();for(let s of o){if(!((t=e.neighboringTiles)!=null&&t[s]))continue;let l=r.getTileById(s);e.neighboringTiles[s].backfilled||_8(e,l),!((i=(a=l.neighboringTiles)==null?void 0:a[e.tileID.key])!=null&&i.backfilled)&&_8(l,e)}}function _8(e,r){var t;e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0;let a=r.tileID.canonical.x-e.tileID.canonical.x,i=r.tileID.canonical.y-e.tileID.canonical.y,o=2**e.tileID.canonical.z,s=r.tileID.key;(a!==0||i!==0)&&(Math.abs(i)>1||(Math.abs(a)>1&&(Math.abs(a+o)===1?a+=o:Math.abs(a-o)===1&&(a-=o)),r.dem&&e.dem&&(e.dem.backfillBorder(r.dem,a,i),(t=e.neighboringTiles)!=null&&t[s]&&(e.neighboringTiles[s].backfilled=!0))))}function y3(e,r,t,a,i){return i?e?e(r,t)+a:a===0?void 0:a:a}function _3(e,r){let t=!0;return e==="always"||(e==="never"||r==="never")&&(t=!1),t}function E1e(e,r){let t=1/(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),a=1/(r[8]*r[8]+r[9]*r[9]+r[10]*r[10]),i=r[0]*t,o=r[4]*t,s=r[8]*a,l=r[1]*t,n=r[5]*t,u=r[9]*a,c=r[2]*t,f=r[6]*t,h=r[10]*a;e[0]=i,e[1]=o,e[2]=s,e[4]=l,e[5]=n,e[6]=u,e[8]=c,e[9]=f,e[10]=h;let d=r[12],p=r[13],g=r[14];return e[12]=-i*d-l*p-c*g,e[13]=-o*d-n*p-f*g,e[14]=-s*d-u*p-h*g,e[3]=0,e[7]=0,e[11]=0,e[15]=1,e}function S1e(e,r){return e[0]=1/r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1/r[5],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=0,e[11]=1/r[14],e[12]=0,e[13]=0,e[14]=-1,e[15]=r[10]/r[14],e}function k1e(e,r){let t=1/(r[0]*r[5]-r[1]*r[4]);return e[0]=r[5]*t,e[1]=-r[1]*t,e[2]=0,e[3]=0,e[4]=-r[4]*t,e[5]=r[0]*t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1/r[10],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1/r[15],e}function Hk(e,r,t){let a=w0();if(!e){let{vecSouth:i,vecEast:o}=Wk(r),s=XN();s[0]=o[0],s[1]=o[1],s[2]=i[0],s[3]=i[1],_me(s,s),a[0]=s[0],a[1]=s[1],a[4]=s[2],a[5]=s[3]}return wc(a,a,[1/t,1/t,1]),a}function C1e(e,r,t,a){if(e){let i=w0();if(!r){let{vecSouth:o,vecEast:s}=Wk(t);i[0]=s[0],i[1]=s[1],i[4]=o[0],i[5]=o[1]}return wc(i,i,[a,a,1]),i}return t.pixelsToClipSpaceMatrix}function Wk(e){let r=Math.cos(e.rollInRadians),t=Math.sin(e.rollInRadians),a=Math.cos(e.pitchInRadians),i=Math.cos(e.bearingInRadians),o=Math.sin(e.bearingInRadians),s=UM();s[0]=-i*a*t-o*r,s[1]=-o*a*t+i*r;let l=zI(s);l<1e-9?BI(s):RI(s,s,1/l);let n=UM();n[0]=i*a*r-o*t,n[1]=o*a*r+i*t;let u=zI(n);return u<1e-9?BI(n):RI(n,n,1/u),{vecEast:n,vecSouth:s}}function cm(e,r,t){var a,i;return y3(e.getElevation,r,t,(a=e.heightOffset)!=null?a:0,(i=e.heightAnchorGround)!=null?i:!0)}function $k(e,r,t,a){let i;a==null?(i=[e,r,0,1],Zk(i,i,t)):(i=[e,r,a,1],Cu(i,i,t));let o=i[3];return{point:new zr(i[0]/o,i[1]/o),signedDistanceFromCamera:o,isOccluded:!1}}function x8(e,r){return .5+e/r*.5}function D1e(e,r){return e.x>=-r[0]&&e.x<=r[0]&&e.y>=-r[1]&&e.y<=r[1]}function L1e(e,r,t,a,i,o,s,l,n,u,c,f,h){let d=t?e.textSizeData:e.iconSizeData,p=I2(d,r.transform.zoom),g=[256/r.width*2+1,256/r.height*2+1],m=t?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;m.clear();let y=e.lineVertexArray,_=t?e.text.placedSymbolArray:e.icon.placedSymbolArray,v=r.transform.width/r.transform.height,x=!1;for(let E=0;E<_.length;E++){let M=_.get(E);if(M.hidden||M.writingMode===2&&!x){$1(M.numGlyphs,m);continue}x=!1;let C=new zr(M.anchorX,M.anchorY),w={getElevation:h,pitchedLabelPlaneMatrix:a,lineVertexArray:y,pitchWithMap:o,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:r.transform,tileAnchorPoint:C,unwrappedTileID:n,width:u,height:c,translation:f},k=M8(M.anchorX,M.anchorY,w);if(!D1e(k.point,g)){$1(M.numGlyphs,m);continue}let T=k.signedDistanceFromCamera,b=x8(r.transform.cameraToCenterDistance,T),S=qE(d,p,M),A=o?S*r.transform.getPitchedTextCorrection(M.anchorX,M.anchorY,n)/b:S*b,F=A8({projectionContext:w,pitchedLabelPlaneMatrixInverse:i,symbol:M,fontSize:A,flip:!1,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:m,aspectRatio:v,rotateToLine:l});x=F.useVertical,(F.notEnoughRoom||x||F.needsFlipping&&A8({projectionContext:w,pitchedLabelPlaneMatrixInverse:i,symbol:M,fontSize:A,flip:!0,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:m,aspectRatio:v,rotateToLine:l}).notEnoughRoom)&&$1(M.numGlyphs,m)}t?e.text.dynamicLayoutVertexBuffer.updateData(m):e.icon.dynamicLayoutVertexBuffer.updateData(m)}function b8(e,r,t,a,i,o,s,l){let n=o.glyphStartIndex+o.numGlyphs,u=o.lineStartIndex,c=o.lineStartIndex+o.lineLength,f=r.getoffsetX(o.glyphStartIndex),h=r.getoffsetX(n-1),d=b3(e*f,t,a,i,o.segment,u,c,l,s);if(!d)return null;let p=b3(e*h,t,a,i,o.segment,u,c,l,s);return!p||l.projectionCache.anyProjectionOccluded?null:{first:d,last:p}}function w8(e,r,t,a){return e===1&&Math.abs(t.y-r.y)>Math.abs(t.x-r.x)*a?{useVertical:!0}:(e===2?r.yt.x)?{needsFlipping:!0}:null}function A8(e){let{projectionContext:r,pitchedLabelPlaneMatrixInverse:t,symbol:a,fontSize:i,flip:o,keepUpright:s,glyphOffsetArray:l,dynamicLayoutVertexArray:n,aspectRatio:u,rotateToLine:c}=e,f=i/24,h=a.lineOffsetX*f,d=a.lineOffsetY*f,p;if(a.numGlyphs>1){let g=a.glyphStartIndex+a.numGlyphs,m=a.lineStartIndex,y=a.lineStartIndex+a.lineLength,_=b8(f,l,h,d,o,a,c,r);if(!_)return{notEnoughRoom:!0};let v=x3(_.first.point.x,_.first.point.y,r,t),x=x3(_.last.point.x,_.last.point.y,r,t);if(s&&!o){let E=w8(a.writingMode,v,x,u);if(E)return E}p=[_.first];for(let E=a.glyphStartIndex+1;E0?v.point:T8(r.tileAnchorPoint,_,m,1,r),E=x3(m.x,m.y,r,t),M=x3(x.x,x.y,r,t),C=w8(a.writingMode,E,M,u);if(C)return C}let g=b3(f*l.getoffsetX(a.glyphStartIndex),h,d,o,a.segment,a.lineStartIndex,a.lineStartIndex+a.lineLength,r,c);if(!g||r.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};p=[g]}for(let g of p)j2(n,g.point,g.angle);return{}}function T8(e,r,t,a,i){let o=e.add(e.sub(r)._unit()),s=fm(o.x,o.y,i).point,l=t.sub(s);return t.add(l._mult(a/l.mag()))}function Yk(e,r,t){let a=r.projectionCache;if(a.projections[e])return a.projections[e];let i=new zr(r.lineVertexArray.getx(e),r.lineVertexArray.gety(e)),o=fm(i.x,i.y,r);if(o.signedDistanceFromCamera>0)return a.projections[e]=o.point,a.anyProjectionOccluded||(a.anyProjectionOccluded=o.isOccluded),o.point;let s=e-t.direction,l=t.distanceFromAnchor===0?r.tileAnchorPoint:new zr(r.lineVertexArray.getx(s),r.lineVertexArray.gety(s)),n=t.absOffsetX-t.distanceFromAnchor+1;return T8(l,i,t.previousVertex,n,r)}function fm(e,r,t){let a=e+t.translation[0],i=r+t.translation[1],o;return t.pitchWithMap?(o=$k(a,i,t.pitchedLabelPlaneMatrix,cm(t,a,i)),o.isOccluded=!1):(o=t.transform.projectTileCoordinates(a,i,t.unwrappedTileID,cm(t,a,i)),o.point.x=(o.point.x*.5+.5)*t.width,o.point.y=(-o.point.y*.5+.5)*t.height),o}function x3(e,r,t,a){if(t.pitchWithMap){let i=[e,r,0,1];Cu(i,i,a);let o=i[0]/i[3],s=i[1]/i[3];return t.transform.projectTileCoordinates(o,s,t.unwrappedTileID,cm(t,o,s)).point}return{x:e/t.width*2-1,y:1-r/t.height*2}}function M8(e,r,t){return t.transform.projectTileCoordinates(e,r,t.unwrappedTileID,cm(t,e,r))}function Xk(e,r,t){return e._unit()._perp()._mult(r*t)}function F1e(e,r,t,a,i,o,s,l,n){if(l.projectionCache.offsets[e])return l.projectionCache.offsets[e];let u=t.add(r);if(e+n.direction=i)return l.projectionCache.offsets[e]=u,u;let c=Yk(e+n.direction,l,n),f=Xk(c.sub(t),s,n.direction),h=t.add(f),d=c.add(f);return l.projectionCache.offsets[e]=Ice(o,u,h,d)||u,l.projectionCache.offsets[e]}function b3(e,r,t,a,i,o,s,l,n){let u=a?e-r:e+r,c=u>0?1:-1,f=0;a&&(c*=-1,f=Math.PI),c<0&&(f+=Math.PI);let h=c>0?o+i:o+i+1,d;l.projectionCache.cachedAnchorPoint?d=l.projectionCache.cachedAnchorPoint:(d=fm(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l).point,l.projectionCache.cachedAnchorPoint=d);let p=d,g=d,m,y,_=0,v=0,x=Math.abs(u),E=[],M;for(;_+v<=x;){if(h+=c,h=s)return null;_+=v,g=p,y=m;let T={absOffsetX:x,direction:c,distanceFromAnchor:_,previousVertex:g};if(p=Yk(h,l,T),t===0)E.push(g),M=p.sub(g);else{let b,S=p.sub(g);b=S.mag()===0?Xk(Yk(h+c,l,T).sub(p),t,c):Xk(S,t,c),y||(y=g.add(b)),m=F1e(h,b,p,o,s,y,t,l,T),E.push(y),M=m.sub(y)}v=M.mag()}let C=(x-_)/v,w=M._mult(C)._add(y||g),k=f+Math.atan2(p.y-g.y,p.x-g.x);return E.push(w),{point:w,angle:n?k:0,path:E}}function $1(e,r){for(let t=0;t{let i=$k(a.x,a.y,t,cm(r,a.x,a.y)),o=r.transform.projectTileCoordinates(i.point.x,i.point.y,r.unwrappedTileID,cm(r,i.point.x,i.point.y));return o.point.x=(o.point.x*.5+.5)*r.width,o.point.y=(-o.point.y*.5+.5)*r.height,o})}function I1e(e){let r=0,t=0,a=0,i=0;for(let o=0;ot&&(t=i,r=a));return e.slice(r,r+t)}function E8(e,r,t,a,i){let{horizontalAlign:o,verticalAlign:s}=F2(e),l=-(o-.5)*r,n=-(s-.5)*t;return new zr(l+a[0]*i,n+a[1]*i)}function S8(e,r,t,a,i,o){(!a||a.length===0)&&(a=[0,0,0,0]);let s=a[0]-100,l=a[1]-100,n=a[2]-100,u=a[3]-100;e.emplaceBack(+!!r,+!!t,i||0,o||0,s,l),e.emplaceBack(+!!r,+!!t,i||0,o||0,n,l),e.emplaceBack(+!!r,+!!t,i||0,o||0,n,u),e.emplaceBack(+!!r,+!!t,i||0,o||0,s,u)}function k8(e){if(e.opacity===0&&!e.placed)return 0;if(e.opacity===1&&e.placed)return 4294967295;let r=+!!e.placed,t=Math.floor(e.opacity*127);return t*Yj+r*Xj+t*Zj+r*Kj+t*512+r*256+t*2+r}function Kk(e,r,t,a,i,o){if(i-a<=t)return;let s=a+i>>1;C8(e,r,s,a,i,o),Kk(e,r,t,a,s-1,1-o),Kk(e,r,t,s+1,i,1-o)}function C8(e,r,t,a,i,o){for(;i>a;){if(i-a>600){let u=i-a+1,c=t-a+1,f=Math.log(u),h=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*h*(u-h)/u)*(c-u/2<0?-1:1);C8(e,r,t,Math.max(a,Math.floor(t-c*h/u+d)),Math.min(i,Math.floor(t+(u-c)*h/u+d)),o)}let s=r[2*t+o],l=a,n=i;for(W_(e,r,a,t),r[2*i+o]>s&&W_(e,r,a,i);ls;)n--}r[2*a+o]===s?W_(e,r,a,n):(n++,W_(e,r,n,i)),n<=t&&(a=n+1),t<=n&&(i=n-1)}}function W_(e,r,t,a){Jk(e,t,a),Jk(r,2*t,2*a),Jk(r,2*t+1,2*a+1)}function Jk(e,r,t){let a=e[r];e[r]=e[t],e[t]=a}function D8(e,r,t,a){let i=e-t,o=r-a;return i*i+o*o}function qo(e,r){let t=/#pragma maplibre: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,a=r.match(/in ([\w]+) ([\w]+)/g),i=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=r.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),s=o?o.concat(i):i,l=a?a.length:0,n={};return e=e.replace(t,(u,c,f,h,d)=>(n[d]=!0,c==="define"?` +#ifndef HAS_UNIFORM_u_${d} +in ${f} ${h} ${d}; +#else +uniform ${f} ${h} u_${d}; +#endif +`:` +#ifdef HAS_UNIFORM_u_${d} + ${f} ${h} ${d} = u_${d}; +#endif +`)),r=r.replace(t,(u,c,f,h,d)=>{let p=h==="float"?"vec2":"vec4",g=d.match(/color/)?"color":p;return n[d]?c==="define"?` +#ifndef HAS_UNIFORM_u_${d} +uniform lowp float u_${d}_t; +layout(location = ${l++}) in ${f} ${p} a_${d}; +out ${f} ${h} ${d}; +#else +uniform ${f} ${h} u_${d}; +#endif +`:g==="vec4"?` +#ifndef HAS_UNIFORM_u_${d} + ${d} = a_${d}; +#else + ${f} ${h} ${d} = u_${d}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${d} + ${d} = unpack_mix_${g}(a_${d}, u_${d}_t); +#else + ${f} ${h} ${d} = u_${d}; +#endif +`:c==="define"?` +#ifndef HAS_UNIFORM_u_${d} +uniform lowp float u_${d}_t; +layout(location = ${l++}) in ${f} ${p} a_${d}; +#else +uniform ${f} ${h} u_${d}; +#endif +`:g==="vec4"?` +#ifndef HAS_UNIFORM_u_${d} + ${f} ${h} ${d} = a_${d}; +#else + ${f} ${h} ${d} = u_${d}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${d} + ${f} ${h} ${d} = unpack_mix_${g}(a_${d}, u_${d}_t); +#else + ${f} ${h} ${d} = u_${d}; +#endif +`}),{fragmentSource:e,vertexSource:r,staticAttributes:a,staticUniforms:s}}function w3(e,r){if(!e.renderWorldCopies||e.lngRange)return;let t=r.lng-e.center.lng;r.lng+=t>180?-360:t<-180?360:0}function L8(e){return Math.max(0,Math.floor(e))}function Qk(e,r,t,a){if(a<0||a>=1)return NC;let i=Math.floor(t),o=t-i;for(let s of e.zooms){let l=1<i;o++){let s=(t+a)/2;r(e,s)?a=s:t=s}return{lo:t,hi:a}}function A3(e,r){return Qk(e.index,e.exaggeration,(e.near[0]+r*e.dx)/e.worldSize,(e.near[1]+r*e.dy)/e.worldSize)}function T3(e,r){return F8(A3(e,r),e.near[2]+r*e.dz)}function I8(){vo("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function R8(e){if(e.useSlerp)if(e.k<1){let r=VI(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),t=VI(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),a=new Float64Array(4);Zb(a,r,t,e.k);let i=jce(a);e.tr.setRoll(i.roll),e.tr.setPitch(i.pitch),e.tr.setBearing(i.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll(Xs.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch(Xs.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing(Xs.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function z8(e,r,t,a,i){let o=i.padding,s=fp(i.worldSize,t.getNorthWest()),l=fp(i.worldSize,t.getNorthEast()),n=fp(i.worldSize,t.getSouthEast()),u=fp(i.worldSize,t.getSouthWest()),c=il(-a),f=s.rotate(c),h=l.rotate(c),d=n.rotate(c),p=u.rotate(c),g=new zr(Math.max(f.x,h.x,p.x,d.x),Math.max(f.y,h.y,p.y,d.y)),m=new zr(Math.min(f.x,h.x,p.x,d.x),Math.min(f.y,h.y,p.y,d.y)),y=g.sub(m),_=i.width-(o.left+o.right+r.left+r.right),v=i.height-(o.top+o.bottom+r.top+r.bottom),x=_/y.x,E=v/y.y;if(E<0||x<0){I8();return}let M=Math.min(Tc(i.scale*Math.min(x,E)),e.maxZoom),C=zr.convert(e.offset),w=(r.left-r.right)/2,k=(r.top-r.bottom)/2,T=new zr(w,k).rotate(il(a)),b=C.add(T).mult(i.scale/bf(M));return{center:h_(i.worldSize,s.add(n).div(2).sub(b)),zoom:M,bearing:a}}function B8(e){let r=Y1(e.worldSize,e.center.lat);return 2*Math.PI*r}function R1e(e,r,t){let a=pu(r),i=pu(t),o=uu(a,i),s=Math.acos(o),l=B8(e);return s/(2*Math.PI)*l}function z1e(e,r){return[Vv(e*Math.PI*2+Math.PI,Math.PI*2),2*Math.atan(Math.exp(Math.PI-r*Math.PI*2))-Math.PI*.5]}function B1e(e,r){let t=Math.cos(r),a=new Float64Array(3);return a[0]=Math.sin(e)*t,a[1]=Math.sin(r),a[2]=Math.cos(e)*t,a}function V0(e,r,t,a,i){let o=1/(1<1e-6){let a=e[0]/t,i=e[2]/t,o=Math.acos(i),s=(a>0?o:-o)/Math.PI*180;return new ln(qh(s,-180,180),r)}return new ln(0,r)}function O1e(e,r){return jM(T0(),-e.lng,-e.lat,r)}function N1e(e){let r=e[0],t=e[1],a=e[2],i=e[3];return{lng:-Math.atan2(2*(i*r+t*a),1-2*(r*r+t*t))*180/Math.PI,lat:-Math.asin(Gn(2*(i*t-a*r),-1,1))*180/Math.PI,bearing:Math.atan2(2*(i*a+r*t),1-2*(t*t+a*a))*180/Math.PI}}function N8(e,r){let t=e.cameraPosition,a=Yp(t);if(a<=1)return e.screenPointToLocation(r);let i=as();xf(i,t);let o=e.getRayDirectionFromPixel(r),s=-uu(o,i),l=as();Xb(l,o,i,s);let n=Yp(l);if(n<1e-9)return e.screenPointToLocation(r);let u=Math.atan2(n,s),c=Math.asin(1/a)*.9;if(u=0?90:-90,l=e.locationToScreenPoint(new ln(0,s)),n=r.x-l.x,u=r.y-l.y,c=n*n+u*u,f=Gn(1-(zd-Math.abs(o))/12,0,1),h=f*f*(3-2*f),d=Vv(a-i+180,360)-180,p=0;if(h>0&&t){let g=(n*t.y-u*t.x)/Math.max(c,400);p=(s>0?1:-1)*g*180/Math.PI}return i+(1-h)*d+h*p}function q1e(e){let r=as();return r[0]=e[0]*-e[3],r[1]=e[1]*-e[3],r[2]=e[2]*-e[3],{center:r,radius:Math.sqrt(1-e[3]*e[3])}}function V1e(e,r,t){let a=as();hp(a,t,e);let i=as();return Xb(i,e,a,r/y_(a)),i}function M3(e){return Math.cos(e*Math.PI/180)}function Zu(e,r){let t=M3(e),a=M3(r);return Tc(a/t)}function G1e(e,r){return 360/B8({worldSize:e,center:{lat:r}})}function H1e(e,r){let t=e.rotate(r.bearingInRadians),a=r.zoom+Zu(r.center.lat,0),i=i1(1/M3(r.center.lat),1/M3(Math.min(Math.abs(r.center.lat),60)),e2(a,7,3,0,1)),o=G1e(r.worldSize,r.center.lat);return new ln(r.center.lng-t.x*o*i,Gn(r.center.lat+t.y*o,-zd,zd))}function eC(e){let r=.5*e,t=Math.sin(r),a=Math.cos(r);return Math.log(t+a)-Math.log(a-t)}function j8(e,r,t,a){let i=e.lat+t*a;if(Math.abs(t)>1){let o=e.lat+t,s=(Math.sign(o)===Math.sign(e.lat)?Math.abs(e.lat):-Math.abs(e.lat))*Math.PI/180,l=Math.abs(e.lat+t)*Math.PI/180,n=eC(s+a*(l-s)),u=eC(s),c=eC(l),f=(n-u)/(c-u),h=e.lng+r*f;return new ln(h,i)}{let o=e.lng+r*a;return new ln(o,i)}}function E3(e,r,t=1){let a=uu(e,r),i=t*t,o=as(),s=as();Ws(s,r,a),hp(o,e,s);let l=i-uu(o,o);if(l<0)return null;let n=uu(e,e)-i,u=-a+(a<0?1:-1)*Math.sqrt(l),c=n/u,f=u;return{tMin:Math.min(c,f),tMax:Math.max(c,f)}}function S3(e,r,t){let a=e-r;return a<0?-a:Math.max(0,a-t)}function tC(e,r,t,a,i){let o=e-t,s;return s=o<0?Math.min(-o,1+o-i):o>i?Math.min(Math.max(o-i,0),1-o):0,Math.max(s,S3(r,a,i))}function U8(e,r){let t=1/0,a=-1/0;for(let i of r){let o=uu(e,i);t=Math.min(t,o),a=Math.max(a,o)}return{min:t,max:a}}function q8(e,r){let t=as();Xb(t,e.origin,e.direction,r);let a=Yp(t),i=as();Ws(i,t,1/a);let o=$_(i),s=$o.fromLngLat(o),l=new $o(s.x,Gn(s.y,0,.999999999)),n=Qk(e.index,e.exaggeration,l.x,l.y),u=Math.abs(o.lat)>85.051129?0:n.elevation;return{sample:Ci(ja({},n),{elevation:u}),radius:a,mercator:l}}function V8(e,r){let{sample:t,radius:a}=q8(e,r);return F8(t,(a-1)*Vc)}function W1e(e,r,t){let a={constrainOverride:r};if(Array.isArray(e)){let i=new UC({type:e},t);return{projection:i,transform:new GC(a),cameraHelper:new WC(i)}}switch(e){case"mercator":return{projection:new W3,transform:new rx(a),cameraHelper:new ax};case"globe":{let i=new UC({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]},{});return{projection:i,transform:new GC(a),cameraHelper:new WC(i)}}case"vertical-perspective":return{projection:new jC,transform:new VC(a),cameraHelper:new HC};default:return vo(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new W3,transform:new rx(a),cameraHelper:new ax}}}function $1e(e,r){for(let[t,a]of Object.entries(ix)){let i=e.getUniformBlockIndex(r,t);i!==e.INVALID_INDEX&&e.uniformBlockBinding(r,i,a)}}function rC(e){let r={},t=0;for(let{name:a,type:i}of e){let[o,s]=kU[i];t=Math.ceil(t/s)*s,r[a]=t,t+=o}return{offsets:r,contentWords:t,sizeWords:Math.ceil(t/4)*4}}function Y1e(e){return new Q3(e,ix.ProjectionUBO,$C)}function X1e(e,r){let t=e.pending;t.set(r.mainMatrix,pm.u_projection_matrix),t.set(r.fallbackMatrix,pm.u_projection_fallback_matrix),t.set(r.tileMercatorCoords,pm.u_projection_tile_mercator_coords),t.set(r.clippingPlane,pm.u_projection_clipping_plane),t[pm.u_projection_transition]=r.projectionTransition,e.pendingWords[pm.u_projection_clip_antimeridian]=+!!r.clipAntimeridian,e.upload()}function Z1e(e){return new Q3(e,ix.TerrainUBO,YC)}function K1e(e,r){let t=e.pending;t.set(r.u_terrain_matrix,nx.u_terrain_matrix),t.set(r.u_terrain_unpack,nx.u_terrain_unpack),t[nx.u_terrain_dim]=r.u_terrain_dim,t[nx.u_terrain_exaggeration]=r.u_terrain_exaggeration,e.upload()}function aC(e){let r=[];for(let t of e){if(t===null)continue;let a=t.split(" ");r.push(a.pop())}return r}function J1e(e,r){let t=new Set([e.INT,e.INT_VEC2,e.INT_VEC3,e.INT_VEC4,e.UNSIGNED_INT,e.UNSIGNED_INT_VEC2,e.UNSIGNED_INT_VEC3,e.UNSIGNED_INT_VEC4]),a=new Set,i=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES);for(let o=0;o>16,l>>16],u_pixel_coord_lower:[s&65535,l&65535]}}function Q1e(e,r,t,a){let i=t.patternAtlas.getPattern(e.from.toString()),o=t.patternAtlas.getPattern(e.to.toString()),{width:s,height:l}=t.patternAtlas.getPixelSize(),n=2**a.tileID.overscaledZ,u=a.tileSize*2**t.transform.tileZoom/n,c=u*(a.tileID.canonical.x+a.tileID.wrap*n),f=u*a.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:r.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:r.fromScale,u_scale_b:r.toScale,u_tile_units_to_pixels:1/uh(a,1,t.transform.tileZoom),u_pixel_coord_upper:[c>>16,f>>16],u_pixel_coord_lower:[c&65535,f&65535]}}function ege(e,r){let t=2**r.canonical.z,a=r.canonical.y;return[new $o(0,a/t).toLngLat().lat,new $o(0,(a+1)/t).toLngLat().lat]}function iC(e,r){return 1/uh(e,1,r.tileZoom)}function H8(e,r,t){return M0(e.transform,r,t.paint.get("line-translate"),t.paint.get("line-translate-anchor"))}function tge(e){return new Q3(e,ix.FrameUBO,a7)}function rge(e,r){let t=e.pending,{transform:a}=r,i=r.context.gl;t[Gf.u_units_to_pixels]=1/a.pixelsToGLUnits[0],t[Gf.u_units_to_pixels+1]=1/a.pixelsToGLUnits[1],t[Gf.u_world_size]=i.drawingBufferWidth,t[Gf.u_world_size+1]=i.drawingBufferHeight,t[Gf.u_camera_to_center_distance]=a.cameraToCenterDistance,t[Gf.u_symbol_fade_change]=r.options.fadeDuration?r.symbolFadeChange:1,t[Gf.u_aspect_ratio]=a.width/a.height,t[Gf.u_device_pixel_ratio]=r.pixelRatio,t[Gf.u_viewport_size]=a.width,t[Gf.u_viewport_size+1]=a.height,t[Gf.u_pixel_extrude_scale]=1/a.width,t[Gf.u_pixel_extrude_scale+1]=1/a.height,t[Gf.u_pitch]=a.pitch/360*2*Math.PI,e.upload()}function W8(e,r,t,a,i){var o,s;let l=e.context,n=e.transform,u=l.gl,c=e.useProgram("collisionBox"),f=[],h=0,d=0;for(let v of a){let x=r.getTile(v).getBucket(t);if(!x)continue;let E=i?x.textCollisionBox:x.iconCollisionBox,M=x.collisionCircleArray;M.length>0&&(f.push({circleArray:M,circleOffset:d,coord:v}),h+=M.length/4,d=h),E&&c.draw(l,u.LINES,Ao.disabled,Yo.disabled,e.colorModeForRenderPass(),Ho.disabled,null,(o=e.style.map.terrain)==null?void 0:o.getTerrainData(v),n.getProjectionData({overscaledTileID:v,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),t.id,E.layoutVertexBuffer,E.indexBuffer,E.segments,null,e.transform.zoom,null,null,E.collisionVertexBuffer)}if(!i||!f.length)return;let p=e.useProgram("collisionCircle"),g=new NB;g.resize(h*4),g._trim();let m=0;for(let v of f)for(let x=0;xf.getElevation(p,w,k):void 0;lge(m,h,d,n,c,x,M,_,E,M0(c,g,s,l),p.toUnwrapped(),C,t.layout.get("symbol-height-anchor")==="ground")}}}function sge(e,r,t,a,i,o){let s=r.tileAnchorPoint.add(new zr(r.translation[0],r.translation[1]));if(r.pitchWithMap){let l=a.mult(o);t||(l=l.rotate(-i));let n=s.add(l);return $k(n.x,n.y,r.pitchedLabelPlaneMatrix,cm(r,n.x,n.y)).point}if(t){let l=fm(r.tileAnchorPoint.x+1,r.tileAnchorPoint.y,r).point.sub(e),n=Math.atan(l.y/l.x)+(l.x<0?Math.PI:0);return e.add(a.rotate(n))}return e.add(a)}function lge(e,r,t,a,i,o,s,l,n,u,c,f,h){let d=e.text.placedSymbolArray,p=e.text.dynamicLayoutVertexArray,g=e.icon.dynamicLayoutVertexArray,m={};p.clear();for(let y=0;y=0&&(m[_.associatedIconIndex]={shiftedAnchor:P,angle:z})}}if(n){g.clear();let y=e.icon.placedSymbolArray;for(let _=0;_e.style.map.terrain.getElevation(F,ie,ee):void 0;L1e(R,e,i,V,oe,v,u,t.layout.get("text-rotation-alignment")==="map",F.toUnwrapped(),y.width,y.height,q,te)}let ue=i&&k||re,fe=v?V:e.transform.clipSpaceToPixelsMatrix,pe=x||ue?nV:fe,we=I&&t.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(1)!==0,xe;xe=I?R.iconsInText?fq(L.kind,G,E,v,x,ue,e,pe,j,q,X,Z,b,se,le):t7(L.kind,G,E,v,x,ue,e,pe,j,q,i,X,we,b,se,le):e7(L.kind,G,E,v,x,ue,e,pe,j,q,i,X,b,se,le);let he={program:O,buffers:P,uniformValues:xe,projectionData:Y,atlasTexture:J,atlasTextureIcon:H,atlasInterpolation:N,atlasInterpolationIcon:W,isSDF:I,hasHalo:we};if(M&&R.canOverlap){C=!0;let oe=P.segments.get();for(let te of oe)T.push({segments:new Zs([te]),sortKey:te.sortKey,state:he,terrainData:$})}else T.push({segments:P.segments,sortKey:0,state:he,terrainData:$})}C&&T.sort((F,D)=>F.sortKey-D.sortKey);let S=(p=t.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(null))!=null?p:1/0,A=t.layout.get("text-letter-spacing").constantOr(0)*24<0||S>1;for(let F of T){let D=F.state;g.activeTexture.set(m.TEXTURE0),D.atlasTexture.bind(D.atlasInterpolation,m.CLAMP_TO_EDGE),D.atlasTextureIcon&&(g.activeTexture.set(m.TEXTURE1),D.atlasTextureIcon&&D.atlasTextureIcon.bind(D.atlasInterpolationIcon,m.CLAMP_TO_EDGE));let R=D.isSDF&&D.hasHalo;if(R){let P=D.uniformValues;P.u_is_halo=1,A&&(P.u_is_plain=0,Y8(D.buffers,F.segments,t,e,D.program,w,c,f,P,D.projectionData,F.terrainData),P.u_is_halo=0,P.u_is_plain=1)}Y8(D.buffers,F.segments,t,e,D.program,w,c,f,D.uniformValues,D.projectionData,F.terrainData),R&&!A&&(D.uniformValues.u_is_halo=0)}}function Y8(e,r,t,a,i,o,s,l,n,u,c){let f=a.context,h=f.gl;i.draw(f,h.TRIANGLES,o,s,l,Ho.backCCW,n,c,u,t.id,e.layoutVertexBuffer,e.indexBuffer,r,t.paint,a.transform.zoom,e.programConfigurations.get(t.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function cge(e,r,t,a,i){var o;if(i.currentPass!=="translucent")return;let{isRenderingToTexture:s}=i,l=t.paint.get("circle-opacity"),n=t.paint.get("circle-stroke-width"),u=t.paint.get("circle-stroke-opacity"),c=!t.layout.get("circle-sort-key").isConstant();if(l.constantOr(1)===0&&(n.constantOr(1)===0||u.constantOr(1)===0))return;let f=e.context,h=f.gl,d=e.transform,p=e.getDepthModeForSublayer(0,Ao.ReadOnly),g=Yo.disabled,m=e.colorModeForRenderPass(),y=[],_=d.getCircleRadiusCorrection();for(let v of a){let x=r.getTile(v),E=x.getBucket(t);if(!E)continue;let M=t.paint.get("circle-translate"),C=t.paint.get("circle-translate-anchor"),w=M0(d,x,M,C),k=E.programConfigurations.get(t.id),T=e.useProgram("circle",k),b=E.layoutVertexBuffer,S=E.indexBuffer,A=(o=e.style.map.terrain)==null?void 0:o.getTerrainData(v),F={programConfiguration:k,program:T,layoutVertexBuffer:b,indexBuffer:S,uniformValues:UU(e,x,t,w,_),terrainData:A,projectionData:d.getProjectionData({overscaledTileID:v,applyGlobeMatrix:!s,applyTerrainMatrix:!0})};if(c){let D=E.segments.get();for(let R of D)y.push({segments:new Zs([R]),sortKey:R.sortKey,state:F})}else y.push({segments:E.segments,sortKey:0,state:F})}c&&y.sort((v,x)=>v.sortKey-x.sortKey);for(let v of y){let{programConfiguration:x,program:E,layoutVertexBuffer:M,indexBuffer:C,uniformValues:w,terrainData:k,projectionData:T}=v.state,b=v.segments;E.draw(f,h.TRIANGLES,p,g,m,Ho.backCCW,w,k,T,t.id,M,C,b,t.paint,e.transform.zoom,x)}}function fge(e,r,t,a,i){if(t.paint.get("heatmap-opacity")===0)return;let o=e.context,{isRenderingToTexture:s,isRenderingGlobe:l}=i;if(e.style.map.terrain){for(let n of a){let u=r.getTile(n);r.hasRenderableParent(n)||(i.currentPass==="offscreen"?pge(e,u,t,n,l):i.currentPass==="translucent"&&vge(e,t,n,s,l))}o.viewport.set([0,0,e.width,e.height])}else i.currentPass==="offscreen"?hge(e,r,t,a):i.currentPass==="translucent"&&dge(e,t)}function hge(e,r,t,a){let i=e.context,o=i.gl,s=e.transform,l=Yo.disabled,n=new vl([o.ONE,o.ONE],Hn.transparent,[!0,!0,!0,!0]);mge(i,e,t),i.clear({color:Hn.transparent});for(let u of a){if(r.hasRenderableParent(u))continue;let c=r.getTile(u),f=c.getBucket(t);if(!f)continue;let h=f.programConfigurations.get(t.id),d=e.useProgram("heatmap",h),p=s.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),g=s.getCircleRadiusCorrection();d.draw(i,o.TRIANGLES,Ao.disabled,l,n,Ho.backCCW,JC(c,s.zoom,t.paint.get("heatmap-intensity"),g),null,p,t.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,t.paint,s.zoom,h)}i.viewport.set([0,0,e.width,e.height])}function dge(e,r){let t=e.context,a=t.gl;t.setColorMode(e.colorModeForRenderPass());let i=r.heatmapFbos.get(R_);i&&(t.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,i.colorAttachment.get()),t.activeTexture.set(a.TEXTURE1),Z8(t,r).bind(a.LINEAR,a.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(t,a.TRIANGLES,Ao.disabled,Yo.disabled,e.colorModeForRenderPass(),Ho.disabled,QC(e,r,0,1),null,null,r.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,r.paint,e.transform.zoom))}function pge(e,r,t,a,i){let o=e.context,s=o.gl,l=Yo.disabled,n=new vl([s.ONE,s.ONE],Hn.transparent,[!0,!0,!0,!0]),u=r.getBucket(t);if(!u)return;let c=a.key,f=t.heatmapFbos.get(c);f||(f=X8(o,r.tileSize,r.tileSize),t.heatmapFbos.set(c,f)),o.bindFramebuffer.set(f.framebuffer),o.viewport.set([0,0,r.tileSize,r.tileSize]),o.clear({color:Hn.transparent});let h=u.programConfigurations.get(t.id),d=e.useProgram("heatmap",h,!i),p=e.transform.getProjectionData({overscaledTileID:r.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),g=e.style.map.terrain.getTerrainData(a);d.draw(o,s.TRIANGLES,Ao.disabled,l,n,Ho.disabled,JC(r,e.transform.zoom,t.paint.get("heatmap-intensity"),1),g,p,t.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,t.paint,e.transform.zoom,h)}function vge(e,r,t,a,i){let o=e.context,s=o.gl,l=e.transform;o.setColorMode(e.colorModeForRenderPass());let n=Z8(o,r),u=t.key,c=r.heatmapFbos.get(u);if(!c)return;o.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,c.colorAttachment.get()),o.activeTexture.set(s.TEXTURE1),n.bind(s.LINEAR,s.CLAMP_TO_EDGE);let f=l.getProjectionData({overscaledTileID:t,applyTerrainMatrix:i,applyGlobeMatrix:!a});e.useProgram("heatmapTexture").draw(o,s.TRIANGLES,Ao.disabled,Yo.disabled,e.colorModeForRenderPass(),Ho.disabled,QC(e,r,0,1),null,f,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,r.paint,l.zoom),c.destroy(),r.heatmapFbos.delete(u)}function mge(e,r,t){let a=e.gl;e.activeTexture.set(a.TEXTURE1),e.viewport.set([0,0,r.width/4,r.height/4]);let i=t.heatmapFbos.get(R_);i?(a.bindTexture(a.TEXTURE_2D,i.colorAttachment.get()),e.bindFramebuffer.set(i.framebuffer)):(i=X8(e,r.width/4,r.height/4),t.heatmapFbos.set(R_,i))}function X8(e,r,t){let a=e.gl,i=a.createTexture();a.bindTexture(a.TEXTURE_2D,i),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texStorage2D(a.TEXTURE_2D,1,a.RGBA16F,r,t);let o=e.createFramebuffer(r,t,!1,!1);return o.colorAttachment.set(i),o}function Z8(e,r){return r.colorRampTexture||(r.colorRampTexture=new Kl(e,r.colorRamp,e.gl.RGBA)),r.colorRampTexture}function K8(e,r,t,a){let i=e.context,o=i.bindFramebuffer.get(),s=i.viewport.get(),[,,l,n]=s;return gge(e,l,n),i.viewport.set([0,0,l,n]),i.clear({color:Hn.transparent,depth:1,stencil:0}),e.currentStencilSource=void 0,e.renderTileClippingMasks(r,t,a),{compositeTarget:o,compositeViewport:s}}function gge(e,r,t){let a=e.context.gl;if(!e.layerOpacityFbo){let o=e.context.createFramebuffer(r,t,!0,!0),s=a.createTexture();a.bindTexture(a.TEXTURE_2D,s),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,r,t,0,a.RGBA,a.UNSIGNED_BYTE,null),o.colorAttachment.set(s),o.depthAttachment.set(e.context.createRenderbuffer(a.DEPTH_STENCIL,r,t)),e.layerOpacityFbo=o,e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);return}if(e.layerOpacityFbo.width===r&&e.layerOpacityFbo.height===t){e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);return}let i=e.layerOpacityFbo;a.bindTexture(a.TEXTURE_2D,i.colorAttachment.get()),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,r,t,0,a.RGBA,a.UNSIGNED_BYTE,null),e.context.bindRenderbuffer.set(i.depthAttachment.get()),a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,r,t),e.context.bindRenderbuffer.set(null),i.width=r,i.height=t,e.context.bindFramebuffer.set(i.framebuffer)}function J8(e,r,t,a){let i=e.context,o=i.gl;i.bindFramebuffer.set(t.compositeTarget),i.viewport.set(t.compositeViewport),i.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,e.layerOpacityFbo.colorAttachment.get()),e.useProgram("layerOpacity").draw(i,o.TRIANGLES,Ao.disabled,Yo.disabled,e.colorModeForRenderPass(),Ho.disabled,sq(r,0),null,null,a.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,a.paint,e.transform.zoom),e.currentStencilSource=void 0}function Q8(e,r,t,a,i,o,s,l){let n=256;if(i.stepInterpolant){let u=r.getSource().maxzoom,c=s.canonical.z===u?Math.ceil(1<e.options.anisotropicFilterPitch&&p.texParameterf(p.TEXTURE_2D,d.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,d.extTextureFilterAnisotropicMax);let D=e.getTerrainDataForTile(w,c),R=m.getProjectionData({overscaledTileID:w,aligned:v,applyGlobeMatrix:!c,applyTerrainMatrix:!0}),P=Ij(A,S,F.fadeMix,t,l,n),z=f??y.getMeshFromTileID(d,w.canonical,o,s,"raster"),I=i?i[w.overscaledZ]:Yo.disabled;g.draw(d,p.TRIANGLES,k,I,_,u?Ho.frontCCW:Ho.backCCW,P,D,R,t.id,z.vertexBuffer,z.indexBuffer,z.segments)}}function Cge(e,r,t,a){let i={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(t===0||a)return i;if(e.fadingParentID){let o=r.getLoadedTile(e.fadingParentID);if(!o)return i;let s=2**(o.tileID.overscaledZ-e.tileID.overscaledZ);return{parentTile:o,parentScaleBy:s,parentTopLeft:[e.tileID.canonical.x*s%1,e.tileID.canonical.y*s%1],fadeValues:Dge(e,o,t)}}return e.selfFading?{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:Lge(e,t)}:i}function Dge(e,r,t){let a=is(),i=(a-e.timeAdded)/t,o=(a-r.timeAdded)/t,s=e.fadingDirection===1,l=Gn(i,0,1),n=Gn(1-o,0,1),u=s?l:n;return{tileOpacity:u,parentTileOpacity:s?n:l,fadeMix:{opacity:1,mix:1-u}}}function Lge(e,r){let t=(is()-e.timeAdded)/r,a=Gn(t,0,1);return{tileOpacity:a,fadeMix:{opacity:a,mix:0}}}function Fge(e,r,t,a,i){let o=t.paint.get("background-color"),s=t.paint.get("background-opacity");if(s===0)return;let{isRenderingToTexture:l}=i,n=e.context,u=n.gl,c=e.style.projection,f=e.transform,h=f.tileSize,d=t.paint.get("background-pattern");if(e.isPatternMissing(d))return;let p=!d&&o.a===1&&s===1&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(i.currentPass!==p)return;let g=Yo.disabled,m=e.getDepthModeForSublayer(0,p==="opaque"?Ao.ReadWrite:Ao.ReadOnly),y=e.colorModeForRenderPass(),_=e.useProgram(d?"backgroundPattern":"background"),v=a||W1(f,{tileSize:h,terrain:e.style.map.terrain});d&&(n.activeTexture.set(u.TEXTURE0),e.patternAtlas.bind(e.context));let x=t.getCrossfadeParameters();for(let E of v){let M=f.getProjectionData({overscaledTileID:E,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),C=d?vq(s,e,d,{tileID:E,tileSize:h},x):pq(s,o),w=e.getTerrainDataForTile(E,l),k=c.getMeshFromTileID(n,E.canonical,!1,!0,"raster");_.draw(n,u.TRIANGLES,m,g,y,Ho.backCCW,C,w,M,t.id,k.vertexBuffer,k.indexBuffer,k.segments)}}function Pge(e){let r=e.transform.padding;ij(e,e.transform.height-(r.top||0),3,oV),ij(e,r.bottom||0,3,sV),nj(e,r.left||0,3,lV),nj(e,e.transform.width-(r.right||0),3,uV);let t=e.transform.centerPoint;Ige(e,t.x,e.transform.height-t.y,cV)}function Ige(e,r,t,a){C3(e,r-1,t-10,2,20,a),C3(e,r-10,t-1,20,2,a)}function ij(e,r,t,a){C3(e,0,r+t/2,e.transform.width,t,a)}function nj(e,r,t,a){C3(e,r-t/2,0,t,e.transform.height,a)}function C3(e,r,t,a,i,o){let s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*e.pixelRatio,t*e.pixelRatio,a*e.pixelRatio,i*e.pixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function Rge(e,r,t){for(let a of t)zge(e,r,a)}function zge(e,r,t){var a,i;let o=e.context,s=o.gl,l=e.useProgram("debug"),n=Ao.disabled,u=Yo.disabled,c=e.colorModeForRenderPass(),f="$debug",h=(a=e.style.map.terrain)==null?void 0:a.getTerrainData(t);o.activeTexture.set(s.TEXTURE0);let d=((i=r.getTileByID(t.key).latestRawTileData)==null?void 0:i.byteLength)||0,p=Math.floor(d/1024),g=r.getTile(t).tileSize,m=512/Math.min(g,512)*(t.overscaledZ/e.transform.zoom)*.5,y=t.canonical.toString();t.overscaledZ!==t.canonical.z&&(y+=` => ${t.overscaledZ}`),Bge(e,`${y} ${p}kB`);let _=e.transform.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!0,applyTerrainMatrix:!0});l.draw(o,s.TRIANGLES,n,u,vl.alphaBlended,Ho.disabled,KC(Hn.transparent,m),null,_,f,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),l.draw(o,s.LINE_STRIP,n,u,c,Ho.disabled,KC(Hn.red),h,_,f,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}function Bge(e,r){e.initDebugOverlayCanvas();let t=e.debugOverlayCanvas,a=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,t.width,t.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(r,5,5),i.strokeText(r,5,5),e.debugOverlayTexture.update(t),e.debugOverlayTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE)}function Oge(e,r){let t=null,a=Object.values(e._layers).flatMap(l=>l.source&&!l.isHidden(r)?[e.tileManagers[l.source]]:[]),i=a.filter(l=>l.getSource().type==="vector"),o=a.filter(l=>l.getSource().type!=="vector"),s=l=>{(!t||t.getSource().maxzoom{var d;return n.getProjectionData({overscaledTileID:new Yu(h.tileID.canonical.z,(d=h.tileID.wrap)!=null?d:0,h.tileID.canonical.z,h.tileID.canonical.x,h.tileID.canonical.y),aligned:h.aligned,applyGlobeMatrix:h.applyGlobeMatrix,applyTerrainMatrix:h.applyTerrainMatrix})}},f=s.renderingMode?s.renderingMode:"2d";if(a.currentPass==="offscreen"){let h=s.prerender;h&&(e.setCustomLayerDefaults(),o.setColorMode(e.colorModeForRenderPass()),h.call(s,o.gl,c),o.setDirty(),e.setBaseState())}else if(a.currentPass==="translucent"){e.setCustomLayerDefaults(),o.setColorMode(e.colorModeForRenderPass()),o.setStencilMode(Yo.disabled);let h=f==="3d"?e.getDepthModeFor3D():e.getDepthModeForSublayer(0,Ao.ReadOnly);o.setDepthMode(h),s.render(o.gl,c),o.setDirty(),e.setBaseState(),o.bindFramebuffer.set(null)}}function jge(e,r){let t=e.context,a=t.gl,i=e.transform,o=vl.unblended,s=new Ao(a.LEQUAL,Ao.ReadWrite,[0,1]),l=r.tileManager.getRenderableTiles(),n=e.useProgram("terrainDepth");t.bindFramebuffer.set(r.getFramebuffer().framebuffer),t.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),t.clear({color:Hn.white,depth:1});for(let u of l){let c=r.getTerrainMesh(u.tileID),f=r.getTerrainData(u.tileID),h=i.getProjectionData({overscaledTileID:u.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),d=SU(r.getSkirtLength(i.zoom));n.draw(t,a.TRIANGLES,s,Yo.disabled,o,Ho.backCCW,d,f,h,"terrain",c.vertexBuffer,c.indexBuffer,c.segments)}t.bindFramebuffer.set(null),t.viewport.set([0,0,e.width,e.height])}function Uge(e,r,t,a){let{isRenderingGlobe:i}=a,o=e.context,s=o.gl,l=e.transform,n=e.colorModeForRenderPass(),u=e.getDepthModeFor3D(),c=e.useProgram("terrain");o.bindFramebuffer.set(null),o.viewport.set([0,0,e.width,e.height]);for(let f of t){let h=r.getTerrainMesh(f.tileID),d=e.renderToTexture.getTexture(f),p=r.getTerrainData(f.tileID);o.activeTexture.set(s.TEXTURE0),d.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_LINEAR);let g=r.getSkirtLength(l.zoom),m=l.calculateFogMatrix(f.tileID.toUnwrapped()),y=EU(g,m,e.style.sky,l.pitch,i),_=l.getProjectionData({overscaledTileID:f.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});c.draw(o,s.TRIANGLES,u,Yo.disabled,n,Ho.backCCW,y,p,_,"terrain",h.vertexBuffer,h.indexBuffer,h.segments)}}function oj(e,r){if(!r.mesh){let t=new Kp;t.emplaceBack(-1,-1),t.emplaceBack(1,-1),t.emplaceBack(1,1),t.emplaceBack(-1,1);let a=new Vd;a.emplaceBack(0,1,2),a.emplaceBack(0,2,3),r.mesh=new Z1(e.createVertexBuffer(t,G0.members),e.createIndexBuffer(a),Zs.simpleSegment(0,0,t.length,a.length))}return r.mesh}function qge(e,r){let t=e.context,a=t.gl,i=_q(r,e.transform,e.pixelRatio),o=new Ao(a.LEQUAL,Ao.ReadWrite,[0,1]),s=Yo.disabled,l=e.colorModeForRenderPass(),n=e.useProgram("sky"),u=oj(t,r);n.draw(t,a.TRIANGLES,o,s,l,Ho.disabled,i,null,void 0,"sky",u.vertexBuffer,u.indexBuffer,u.segments)}function Vge(e,r){let t=e.getCartesianPosition();pce(t,t);let a=Id(new Float64Array(16));return e.properties.get("anchor")==="map"&&(A0(a,a,r.rollInRadians),r1(a,a,-r.pitchInRadians),A0(a,a,r.bearingInRadians),r1(a,a,r.center.lat*Math.PI/180),CI(a,a,-r.center.lng*Math.PI/180)),vce(t,t,a),t}function Gge(e,r,t){let a=e.context,i=a.gl,o=e.useProgram("atmosphere"),s=new Ao(i.LEQUAL,Ao.ReadOnly,[0,1]),l=e.transform,n=Vge(t,e.transform),u=l.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),c=r.properties.get("atmosphere-blend")*u.projectionTransition;if(c===0)return;let f=Y1(l.worldSize,l.center.lat),h=O8(l),d=gq(n,c,h,f,l.inverseProjectionMatrix),p=oj(a,r);o.draw(a,i.TRIANGLES,s,Yo.disabled,vl.alphaBlended,Ho.disabled,d,null,null,"atmosphere",p.vertexBuffer,p.indexBuffer,p.segments)}function Hge(e,r,t){var a;let i=(a=r?.transitionState)!=null?a:0;return{currentPass:"offscreen",currentLayer:0,opaquePassCutoff:1/0,depthRangeFor3D:[0,1],isRenderingToTexture:!1,transform:e,terrain:t,projectionTransition:i,isRenderingGlobe:i>0}}function sj(e,r){let t=!1,a=null,i,o=()=>{a=null,t&&(t=(e(...i),a=setTimeout(o,r),!1))};return(...s)=>(t=!0,i=s,a||o(),a)}function Y_(e,r){(!e.duration||e.duration({around:a,panDelta:a.sub(t)}),activateOnStart:!0,moveStateManager:new ag({checkCorrectEvent:t=>t.button===0&&!t.ctrlKey}),enable:e,assignEvents:lx})}function Xge({enable:e,clickTolerance:r,aroundCenter:t=!0,minPixelCenterThreshold:a=100,rotateSpeed:i=.8},o){return new rg({clickTolerance:r,move:(s,l)=>{let n=o();if(t&&Math.abs(n.y-s.y)>a)return{bearingDelta:qI(new zr(s.x,l.y),l,n)};let u=(l.x-s.x)*i;return t&&l.ys.button===0&&s.ctrlKey||s.button===2&&!s.ctrlKey}),enable:e,assignEvents:lx})}function Zge({enable:e,clickTolerance:r,pitchSpeed:t=-.5}){return new rg({clickTolerance:r,move:(a,i)=>({pitchDelta:(i.y-a.y)*t}),moveStateManager:new ag({checkCorrectEvent:a=>a.button===0&&a.ctrlKey||a.button===2}),enable:e,assignEvents:lx})}function Kge({enable:e,clickTolerance:r,rollDegreesPerPixelMoved:t=.3},a){return new rg({clickTolerance:r,move:(i,o)=>{let s=a(),l=(o.x-i.x)*t;return o.yi.button===2&&i.ctrlKey}),enable:e,assignEvents:lx})}function D3(e,r,t){for(let a=0;aMath.abs(e.x)}function Jge(e){return e*(2-e)}function fC(e){var r;return((r=e.panDelta)==null?void 0:r.mag())||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}function Qge(e=!1){return yi(this,null,function*(){if(mm!==void 0&&!e)return mm;if(window.navigator.permissions===void 0)return mm=!!window.navigator.geolocation,mm;try{mm=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{mm=!!window.navigator.geolocation}return mm})}function cj(e,r,t,a=!1){if(a||!t.getCoveringTilesDetailsProvider().allowWorldCopies())return e?.wrap();let i=new ln(e.lng,e.lat);if(e=new ln(e.lng,e.lat),r){let o=new ln(e.lng-360,e.lat),s=new ln(e.lng+360,e.lat),l=t.locationToScreenPoint(e).distSqr(r);t.locationToScreenPoint(o).distSqr(r)180;){let o=t.locationToScreenPoint(e);if(o.x>=0&&o.y>=0&&o.x<=t.width&&o.y<=t.height)break;e.lng>t.center.lng?e.lng-=360:e.lng+=360}return e.lng!==i.lng&&t.isPointOnMapSurface(t.locationToScreenPoint(e))?e:i}function fj(e,r,t){let a=e.classList;for(let i in u4)a.remove(`maplibregl-${t}-anchor-${i}`);a.add(`maplibregl-${t}-anchor-${r}`)}function Jh(e,r,t=[]){let a=Fn.createNS("http://www.w3.org/2000/svg",e);for(let i in r)a.setAttributeNS(null,i,r[i]);for(let i of t)a.appendChild(i);return a}function eye(){return k7||(k7=Jh("svg",{display:"block",height:"41px",width:"27px",viewBox:"0 0 27 41"},[Jh("g",{"fill-rule":"nonzero"},[Jh("g",{transform:"translate(3.0, 29.0)",fill:"#000000"},[["10.5","5.25002273"],["10.5","5.25002273"],["9.5","4.77275007"],["8.5","4.29549936"],["7.5","3.81822308"],["6.5","3.34094679"],["5.5","2.86367051"],["4.5","2.38636864"]].map(([e,r])=>Jh("ellipse",{opacity:"0.04",cx:"10.5",cy:"5.80029008",rx:e,ry:r}))),Jh("g",{fill:S7},[Jh("path",{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"})]),Jh("g",{opacity:"0.25",fill:"#000000"},[Jh("path",{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"})]),Jh("g",{transform:"translate(6.0, 7.0)",fill:"#FFFFFF"}),Jh("g",{transform:"translate(8.0, 8.0)"},[Jh("circle",{fill:"#000000",opacity:"0.25",cx:"5.5",cy:"5.5",r:"5.4999962"}),Jh("circle",{fill:"#FFFFFF",cx:"5.5",cy:"5.5",r:"5.4999962"})])])]),k7)}function tye(e){return e.firstElementChild.children[1]}function hj(e,r,t){let a=t?.maxWidth||100,i=e._container.clientHeight/2,o=e._container.clientWidth/2,s=e.unproject([o-a/2,i]),l=e.unproject([o+a/2,i]),n=Math.round(e.project(l).x-e.project(s).x),u=Math.min(a,n,e._container.clientWidth),c=s.distanceTo(l);if(t?.unit==="imperial"){let f=3.2808*c;f>5280?Z_(r,u,f/5280,e._getUIString("ScaleControl.Miles")):Z_(r,u,f,e._getUIString("ScaleControl.Feet"))}else t?.unit==="nautical"?Z_(r,u,c/1852,e._getUIString("ScaleControl.NauticalMiles")):c>=1e3?Z_(r,u,c/1e3,e._getUIString("ScaleControl.Kilometers")):Z_(r,u,c,e._getUIString("ScaleControl.Meters"))}function Z_(e,r,t,a){let i=aye(t),o=i/t;e.style.width=`${r*o}px`,e.innerHTML=`${i} ${a}`}function rye(e){let r=10**Math.ceil(-Math.log(e)/Math.LN10);return Math.round(e*r)/r}function aye(e){let r=10**(`${Math.floor(e)}`.length-1),t=e/r;return t=t>=10?10:t>=5?5:t>=3?3:t>=2?2:t>=1?1:rye(t),r*t}function dj(e){if(!e)return dj(new zr(0,0));if(typeof e=="number"){let r=Math.round(Math.abs(e)/Math.SQRT2);return{center:new zr(0,0),top:new zr(0,e),"top-left":new zr(r,r),"top-right":new zr(-r,r),bottom:new zr(0,-e),"bottom-left":new zr(r,-r),"bottom-right":new zr(-r,-r),left:new zr(e,0),right:new zr(-e,0)}}if(e instanceof zr||Array.isArray(e)){let r=zr.convert(e);return{center:r,top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{center:zr.convert(e.center||[0,0]),top:zr.convert(e.top||[0,0]),"top-left":zr.convert(e["top-left"]||[0,0]),"top-right":zr.convert(e["top-right"]||[0,0]),bottom:zr.convert(e.bottom||[0,0]),"bottom-left":zr.convert(e["bottom-left"]||[0,0]),"bottom-right":zr.convert(e["bottom-right"]||[0,0]),left:zr.convert(e.left||[0,0]),right:zr.convert(e.right||[0,0])}}function iye(e){var r,t,a,i;return e?{top:(r=e.top)!=null?r:0,right:(t=e.right)!=null?t:0,bottom:(a=e.bottom)!=null?a:0,left:(i=e.left)!=null?i:0}:{top:0,right:0,bottom:0,left:0}}function nye(e,r){return H_().setRTLTextPlugin(e,r)}function oye(){return H_().getRTLTextPluginStatus()}function sye(){return JV}function lye(){return Q_.workerCount}function uye(e){Q_.workerCount=e}function cye(){return Uf.MAX_PARALLEL_IMAGE_REQUESTS}function fye(e){Uf.MAX_PARALLEL_IMAGE_REQUESTS=e}function hye(){return Uf.WORKER_URL}function dye(e){Uf.WORKER_URL=e}function pye(e){return yi(this,null,function*(){yield qk().broadcast("IS",e)})}var hC,dC,L3,F3,pC,Hc,K_,pj,Ts,Fn,Gd,vj,vu,hn,P3,_h,Fs,Vf,X1,vC,I3,mC,gC,J_,yC,mj,gj,R3,yj,_j,xj,z3,B3,bj,wj,Aj,Tj,Mj,Ej,Sj,kj,Cj,Dj,Lj,O3,Q_,Fj,ex,_C,N3,Qh,xC,bC,j3,wC,AC,hm,Pj,Ij,Z1,G0,tx,dm,TC,MC,EC,Rj,SC,zj,Bj,U3,Oj,q3,kC,Nj,V3,G3,jj,CC,K1,H3,Uj,DC,qj,Vj,Gj,LC,J1,FC,Hj,Wj,$j,Yj,Xj,Zj,Kj,Q1,Jj,Qj,PC,ol,eU,eg,tU,rU,aU,IC,iU,nU,oU,sU,lU,uU,cU,fU,RC,Hd,zC,BC,W3,$3,Y3,hU,dU,pU,OC,vU,NC,rx,ax,mU,gU,X3,jC,UC,Z3,yU,K3,_U,qC,VC,GC,HC,WC,xU,J3,bU,wU,AU,TU,MU,EU,SU,ix,kU,Q3,$C,pm,YC,nx,CU,DU,LU,XC,FU,PU,IU,RU,zU,ZC,BU,OU,NU,jU,UU,qU,KC,VU,GU,JC,QC,HU,WU,$U,YU,XU,ZU,KU,JU,QU,eq,tq,ox,rq,aq,iq,nq,oq,sq,lq,uq,cq,e7,t7,fq,hq,dq,pq,vq,mq,gq,yq,_q,sx,xq,bq,r7,wq,Jo,Aq,Tq,Mq,Eq,Sq,kq,Cq,Dq,Lq,Fq,Pq,Iq,Rq,zq,Bq,Oq,Nq,jq,Uq,qq,Vq,Gq,Hq,Wq,$q,Yq,Xq,Zq,Kq,Jq,Qq,e4,eV,tV,rV,aV,a7,Gf,vl,iV,Ao,t4,Yo,i7,r4,Ho,a4,nV,i4,n4,oV,sV,lV,uV,cV,fV,o4,hV,n7,o7,tg,dV,pV,vV,mV,gV,yV,_V,xV,s7,bV,s4,wV,rg,AV,ag,TV,MV,lx,EV,l4,l7,u7,c7,f7,SV,h7,d7,p7,v7,kV,CV,m7,g7,y7,_7,DV,ux,LV,FV,PV,x7,b7,w7,IV,A7,RV,vm,zV,BV,OV,T7,M7,NV,jV,UV,mm,u4,E7,S7,k7,H0,C7,c4,qV,cx,ig,W0,f4,D7,VV,GV,HV,h4,WV,$V,YV,XV,ZV,d4,KV,JV,vye=Si({"node_modules/maplibre-gl/dist/maplibre-gl.mjs"(){yme(),hC={},dC="6.9.0",Hc={frame(e,r,t,a){let i=a||window,o=i.requestAnimationFrame(l=>{s(),r(l)}),{unsubscribe:s}=HM(e.signal,"abort",()=>{s(),i.cancelAnimationFrame(o),t(new T1(e.signal.reason))},!1)},frameAsync(e,r){return new Promise((t,a)=>{this.frame(e,t,a,r)})},getImageData(e,r=0){return this.getImageCanvasContext(e).getImageData(-r,-r,e.width+2*r,e.height+2*r)},getImageCanvasContext(e){let r;if(RM()&&!SI())r=new OffscreenCanvas(e.width,e.height).getContext("2d",{willReadFrequently:!0});else{let t=window.document.createElement("canvas");t.width=e.width,t.height=e.height,r=t.getContext("2d",{willReadFrequently:!0})}if(!r)throw Error("failed to create canvas 2d context");return r.drawImage(e,0,0,e.width,e.height),r},resolveURL(e){return L3||(L3=document.createElement("a")),L3.href=e,L3.href},get hardwareConcurrency(){return typeof navigator<"u"&&navigator.hardwareConcurrency||4},get prefersReducedMotion(){return pC===void 0?matchMedia?(F3??(F3=matchMedia("(prefers-reduced-motion: reduce)")),F3.matches):!1:pC},set prefersReducedMotion(e){pC=e}},K_=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt===null?performance.now():this._frozenAt}setNow(e){this._frozenAt=e}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}},Fn=(Ts=class{static create(e,r,t){let a=window.document.createElement(e);return r!==void 0&&(a.className=r),t&&t.appendChild(a),a}static createNS(e,r){return window.document.createElementNS(e,r)}static disableDrag(){Ts.docStyle&&Ts.selectProp&&(Ts.userSelect=Ts.docStyle[Ts.selectProp],Ts.docStyle[Ts.selectProp]="none")}static enableDrag(){Ts.docStyle&&Ts.selectProp&&(Ts.docStyle[Ts.selectProp]=Ts.userSelect)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",Ts.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",Ts.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",Ts.suppressClickInternal,!0)},0)}static getScale(e){let r=e.getBoundingClientRect();return{x:r.width/e.offsetWidth||1,y:r.height/e.offsetHeight||1,boundingClientRect:r}}static getPoint(e,r,t){let a=r.boundingClientRect;return new zr((t.clientX-a.left)/r.x-e.clientLeft,(t.clientY-a.top)/r.y-e.clientTop)}static mousePos(e,r){let t=Ts.getScale(e);return Ts.getPoint(e,t,r)}static touchPos(e,r){let t=[],a=Ts.getScale(e);for(let i of r)t.push(Ts.getPoint(e,a,i));return t}static sanitize(e){let r=new DOMParser().parseFromString(e,"text/html").body||document.createElement("body"),t=r.querySelectorAll("script, iframe");for(let a of t)a.remove();return Ts.clean(r),r.innerHTML}static isPossiblyDangerous(e,r){let t=r.replace(/\s+/g,"").toLowerCase();if(["src","href","xlink:href"].includes(e)&&(t.includes("javascript:")||t.includes("data:"))||e==="srcdoc"||e.startsWith("on"))return!0}static clean(e){let r=e.children;for(let t of r)Ts.removeAttributes(t),Ts.clean(t)}static removeAttributes(e){for(let{name:r,value:t}of Array.from(e.attributes))Ts.isPossiblyDangerous(r,t)&&e.removeAttribute(r)}},Ts.docStyle=typeof window<"u"&&((pj=window.document)==null?void 0:pj.documentElement.style),Ts.selectProp=!Ts.docStyle||"userSelect"in Ts.docStyle?"userSelect":"webkitUserSelect",Ts),(function(e){let r,t,a,i;e.resetRequestQueue=()=>{r=[],t=0,a=0,i={}},e.addThrottleControl=f=>{let h=a++;return i[h]=f,h},e.removeThrottleControl=f=>{delete i[f],u()};let o=()=>{for(let f of Object.keys(i))if(i[f]())return!0;return!1};function s(f,h,d,p,g=!0,m){return yi(this,null,function*(){let y=yield f.transformRequest(h,d);return WM(p.signal),Gd.getImage(y,p,g,m)})}e.transformAndGetImage=s,e.getImage=(f,h,d=!0,p)=>new Promise((g,m)=>{f.headers||(f.headers={}),f.headers.accept="image/webp,*/*",tn(f,{type:"image"});let y={abortController:h,requestParameters:f,supportImageRefresh:d,imageBitmapOptions:p,state:"queued",onError:_=>{m(_)},onSuccess:_=>{g(_)}};r.push(y),u()});let l=(f,h)=>typeof createImageBitmap=="function"?qz(f,h):Vz(f),n=f=>yi(null,null,function*(){f.state="running";let{requestParameters:h,supportImageRefresh:d,imageBitmapOptions:p,onError:g,onSuccess:m,abortController:y}=f,_=d===!1&&!p&&!n1(self)&&!GI(h.url)&&(!h.headers||Object.keys(h.headers).reduce((x,E)=>x&&E==="accept",!0));t++;let v=_?c(h,y):__(h,y);try{let x=yield v;delete f.abortController,f.state="completed",x.data instanceof HTMLImageElement||Gv(x.data)?m(x):!x.data||x.data.byteLength===0?m({data:null,cacheControl:x.cacheControl,expires:x.expires}):m({data:yield l(x.data,p),cacheControl:x.cacheControl,expires:x.expires})}catch(x){delete f.abortController,g(Ac(x))}finally{t--,u()}}),u=()=>{let f=o()?Uf.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:Uf.MAX_PARALLEL_IMAGE_REQUESTS;for(let h=t;h0;h++){let d=r.shift();if(d.abortController.signal.aborted){h--;continue}n(d)}},c=(f,h)=>new Promise((d,p)=>{let g=new Image,m=f.url,y=f.credentials;y&&y==="include"?g.crossOrigin="use-credentials":(y&&y==="same-origin"||!HI(m))&&(g.crossOrigin="anonymous"),h.signal.addEventListener("abort",()=>{g.src="",p(new T1(h.signal.reason))}),g.fetchPriority="high",g.onload=()=>{g.onerror=g.onload=null,d({data:g})},g.onerror=()=>{g.onerror=g.onload=null,!h.signal.aborted&&p(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."))},g.src=m})})(Gd||(Gd={})),Gd.resetRequestQueue(),vj=class{constructor(e){this._transformRequestFn=e??null}transformRequest(e,r){return this._transformRequestFn&&this._transformRequestFn(e,r)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}},vu=class extends qf{},hn=class extends vu{},P3=class extends vu{constructor(e={}){super("style.load",e)}},_h=class extends vu{constructor(e,r={}){super(e,r),this.dataType="style"}},Fs=class extends vu{constructor(e,r={}){super(e,r),this.dataType="source"}},Vf=class extends vu{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,t,a={}){t=t instanceof MouseEvent?t:new MouseEvent(e,t);let i=Fn.mousePos(r.getCanvas(),t),o=r.unproject(i);super(e,tn({point:i,lngLat:o,originalEvent:t},a)),this._defaultPrevented=!1,this.target=r}},X1=class extends vu{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,t){let a=e==="touchend"?t.changedTouches:t.touches,i=Fn.touchPos(r.getCanvasContainer(),a),o=i.map(n=>r.unproject(n)),s=i.reduce((n,u,c,f)=>n.add(u.div(f.length)),new zr(0,0)),l=r.unproject(s);super(e,{points:i,point:s,lngLats:o,lngLat:l,originalEvent:t}),this._defaultPrevented=!1}},vC=class extends vu{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r){super("wheel",{originalEvent:r}),this._defaultPrevented=!1}},I3=class extends vu{},mC=class extends vu{constructor(e={}){super("terrain",e)}},gC=class extends vu{constructor(e={}){super("projectiontransition",e)}},J_=class extends vu{},yC=class extends vu{constructor(e={}){super("styleimagemissing",e)}},mj=class extends Zl{constructor(){super(),this.images={},this.updateVersion=0,this.loaded=!1,this.requestors=[],this.missingImageResolver=null,this._spriteImagesIds={},this._imagesIds=null,this._renderCallbacksDispatchedThisFrame={}}destroy(){for(let e of Object.keys(this.images))this.removeImage(e);this._spriteImagesIds={}}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:r,promiseResolve:t}of this.requestors)t(this._getImagesForIds(r));this.requestors=[]}}getImage(e){let r=this.images[e];if(r&&!r.data&&r.spriteData){let t=r.spriteData;r.data=new Ls({width:t.width,height:t.height},t.context.getImageData(t.x,t.y,t.width,t.height).data),r.spriteData=null}return r}addImage(e,r){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,r)&&(this.images[e]=r,this._imagesIds=null,r.isWebGLImage&&this.updateImage(e,r,!1))}_validate(e,r){let t=!0,a=r.data||r.spriteData;return this._validateStretch(r.stretchX,a?.width)||(this.fire(new mn(Error(`Image "${e}" has invalid "stretchX" value`))),t=!1),this._validateStretch(r.stretchY,a?.height)||(this.fire(new mn(Error(`Image "${e}" has invalid "stretchY" value`))),t=!1),this._validateContent(r.content,r)||(this.fire(new mn(Error(`Image "${e}" has invalid "content" value`))),t=!1),t}_validateStretch(e,r){if(!e)return!0;let t=0;for(let a of e){if(a[0]=e[1]}updateImage(e,r,t=!0){var a;let i=this.images[e];if(t){let o=i.data||i.spriteData;if(o.width!==r.data.width||o.height!==r.data.height)throw Error(`size mismatch between old image (${o.width}x${o.height}) and new image (${r.data.width}x${r.data.height}).`)}r.version=((a=i.version)!=null?a:0)+1,this.images[e]=r,this.updateVersion++}removeImage(e){var r;let t=this.images[e];t&&(delete this.images[e],this._imagesIds=null,(r=t.userImage)!=null&&r.onRemove&&t.userImage.onRemove())}listImages(){var e;return(e=this._imagesIds)!=null||(this._imagesIds=Object.keys(this.images)),this._imagesIds}_getSpriteImageId(e,r){return e==="default"?r:`${e}:${r}`}setSpriteImages(e,r){var t;let a=(t=this._spriteImagesIds[e])!=null?t:[],i=[];for(let l in r){let n=this._getSpriteImageId(e,l);i.push(n),n in this.images?this.updateImage(n,r[l],!1):this.addImage(n,r[l])}let o=new Set(i),s=a.filter(l=>!o.has(l));for(let l of s)this.removeImage(l);return this._spriteImagesIds[e]=i,{loaded:i,removed:s}}removeSpriteImages(e){var r;let t=(r=this._spriteImagesIds[e])!=null?r:[];for(let a of t)this.removeImage(a);return delete this._spriteImagesIds[e],t}removeAllSpriteImages(){let e=Object.values(this._spriteImagesIds).flat();for(let r of e)this.removeImage(r);return this._spriteImagesIds={},e}setMissingImageResolver(e){this.missingImageResolver=e}getImages(e){return new Promise((r,t)=>{let a=!0;if(!this.isLoaded())for(let i of e)this.images[i]||(a=!1);this.isLoaded()||a?r(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:r})})}_getImagesForIds(e){return yi(this,null,function*(){var r;let t=new Set(e.filter(o=>!this.getImage(o))),a=this.missingImageResolver;a&&(yield Promise.allSettled(Array.from(t,o=>a(o))));let i={};for(let o of e){let s=this.getImage(o);s&&(t.delete(o),i[o]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,stretchX:s.stretchX,stretchY:s.stretchY,content:s.content,textFitWidth:s.textFitWidth,textFitHeight:s.textFitHeight,hasRenderCallback:!!((r=s.userImage)!=null&&r.render),isWebGLImage:s.isWebGLImage})}for(let o of t)this.fire(new yC({id:o})),vo(`Image "${o}" could not be loaded. Please make sure you have added the image before it is needed with map.addImage(), resolved it with map.setMissingStyleImageResolver(), or included it in a "sprite" property in your style.`);return i})}beginFrame(){this._renderCallbacksDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let r of e){if(this._renderCallbacksDispatchedThisFrame[r])continue;this._renderCallbacksDispatchedThisFrame[r]=!0;let t=this.getImage(r);t||vo(`Image with ID: "${r}" was not found`),ope(t)&&this.updateImage(r,t)}}cloneImages(){let e={};for(let r in this.images){let t=this.images[r];e[r]=Ci(ja({},t),{data:t.data?t.data.clone():null})}return e}},gj=class{constructor(e){this._imageManager=e,this._entries={},this._image=new Ls({width:1,height:1}),this._dirty=!0}destroy(){this._texture&&(this._texture=(this._texture.destroy(),null)),this._entries={},this._image=new Ls({width:1,height:1}),this._dirty=!0}getPixelSize(){let{width:e,height:r}=this._image;return{width:e,height:r}}getPattern(e){let r=this._imageManager.getImage(e);if(!r)return null;let t=this._entries[e];if(t?.image!==r){let a={w:r.data.width+2,h:r.data.height+2,x:0,y:0};this._entries[e]={bin:a,position:new e3(a,r),image:r}}else if(t.position.version!==r.version)t.position.version=r.version;else return t.position;return this._update(),this._entries[e].position}bind(e){let r=e.gl;this._texture?this._dirty&&(this._dirty=(this._texture.update(this._image),!1)):(this._texture=new Kl(e,this._image,r.RGBA),this._dirty=!1),this._texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}_update(){for(let i in this._entries)this._imageManager.getImage(i)||delete this._entries[i];let e=[];for(let i in this._entries)e.push(this._entries[i].bin);let{w:r,h:t}=R5(e),a=this._image;a.resize({width:r||1,height:t||1});for(let i in this._entries){let{bin:o}=this._entries[i],s=o.x+1,l=o.y+1,n=this._entries[i].image.data,u=n.width,c=n.height;Ls.copy(n,a,{x:0,y:0},{x:s,y:l},{width:u,height:c}),Ls.copy(n,a,{x:0,y:c-1},{x:s,y:l-1},{width:u,height:1}),Ls.copy(n,a,{x:0,y:0},{x:s,y:l+c},{width:u,height:1}),Ls.copy(n,a,{x:u-1,y:0},{x:s-1,y:l},{width:1,height:c}),Ls.copy(n,a,{x:0,y:0},{x:s+u,y:l},{width:1,height:c})}this._dirty=!0}},R3=1114111,yj={start:0,end:R3},_j=0,xj=class{constructor(e){this.requestManager=e,this._faces={},this._registered=new Set}setFontFaces(e){this._unregisterAll(),this._faces={};for(let[r,t]of Object.entries(e??{})){let a=Array.isArray(t)?t:[t];this._faces[r]=a.map(i=>this._declareFontFace(r,i)).filter(i=>i!==null)}}hasFontFaces(){return Object.keys(this._faces).length>0}getFontFamily(e,r){return yi(this,null,function*(){var t,a;for(let i of e.split(","))for(let o of(t=this._faces[i.trim()])!=null?t:[])if(Rme(o,r)&&((a=o.loaded)!=null||(o.loaded=this._loadFontFace(o)),yield o.loaded))return o.family;return null})}_declareFontFace(e,r){let t=typeof r=="string"?{url:r}:r;if(typeof t?.url!="string")return vo(`Ignoring the font face declared for "${e}": it has no URL.`),null;let a=`maplibre-gl-font-face-${_j++}`,i=t["unicode-range"];if(!i?.length)return{url:t.url,ranges:[yj],family:a};let o=[];for(let s of i){let l=Ime(s);if(!l){vo(`Ignoring the unicode range "${s}" of the font face at ${t.url}: it is not a valid range.`);continue}o.push(l)}return o.length?{url:t.url,ranges:o,family:a}:null}_loadFontFace(e){return yi(this,null,function*(){if(typeof FontFace>"u"||typeof document>"u"||!document.fonts)return vo(`Ignoring the font face at ${e.url}: this environment has no CSS Font Loading API.`),!1;let r;try{return r=new FontFace(e.family,yield this._downloadFontFile(e.url)),Object.values(this._faces).some(t=>t.includes(e))?(document.fonts.add(r),this._registered.add(r),yield r.load(),!0):!1}catch(t){return r&&this._unregister(r),vo(`Ignoring the font face at ${e.url}: ${Ac(t).message}`),!1}})}_downloadFontFile(e){return yi(this,null,function*(){let r=yield this.requestManager.transformRequest(e,"Glyphs"),t=yield fS(r,new AbortController);if(!t?.data)throw Error(`the response was empty for the font file at ${e}`);return t.data})}_unregister(e){var r;(r=document.fonts)==null||r.delete(e),this._registered.delete(e)}_unregisterAll(){var e;for(let r of this._registered)(e=document.fonts)==null||e.delete(r);this._registered.clear()}destroy(){this._unregisterAll(),this._faces={}}},z3=1e20,B3=new Float64Array(256);for(let e=0;e<256;e++){let r=.5-(e/255)**.45454545454545453;B3[e]=r*Math.abs(r)}B3[255]=-1e20,bj=class{constructor({fontSize:e=24,buffer:r=3,radius:t=8,cutoff:a=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:s="normal",lang:l=null}={}){this.buffer=r,this.radius=t,this.cutoff=a,this.lang=l;let n=this.size=e+r*4,u=this._createCanvas(n),c=this.ctx=u.getContext("2d",{willReadFrequently:!0});c.font=`${s} ${o} ${e}px ${i}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(n*n),this.gridInner=new Float64Array(n*n),this.f=new Float64Array(n),this.z=new Float64Array(n+1),this.v=new Uint16Array(n)}_createCanvas(e){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(e,e);let r=document.createElement("canvas");return r.width=r.height=e,r}draw(e){let{width:r,actualBoundingBoxAscent:t,actualBoundingBoxDescent:a,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(e),s=Math.ceil(t),l=Math.floor(-i),n=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o)-l)),u=Math.max(0,Math.min(this.size-this.buffer,s+Math.ceil(a))),c=n+2*this.buffer,f=u+2*this.buffer,h=Math.max(c*f,0),d=new Uint8ClampedArray(h),p={data:d,width:c,height:f,glyphWidth:n,glyphHeight:u,glyphTop:s,glyphLeft:l,glyphAdvance:r};if(n===0||u===0)return p;let{ctx:g,buffer:m,gridInner:y,gridOuter:_}=this;this.lang&&(g.lang=this.lang),g.clearRect(m,m,n,u),g.fillText(e,m-l,m+s);let v=g.getImageData(m,m,n,u);_.fill(z3,0,h),y.fill(0,0,h);let x=3;for(let w=0;w{let t=new bj(e);return t.buffer=r,t},Tj=class{constructor(e,r,t,a=Aj){this.requestManager=e,this.localIdeographFontFamily=r,this.entries={},this.lang=t,this.fontFaceManager=new xj(e),this.createRasterizer=a}setURL(e){this.url=e}setFontFaces(e){this.fontFaceManager.setFontFaces(e),this.entries={}}getGlyphs(e){return yi(this,null,function*(){let r=[];for(let i in e)for(let o of e[i])r.push(this._getAndCacheGlyphsPromise(i,o));let t=yield Promise.all(r),a={};for(let{stack:i,id:o,glyph:s}of t)a[i]||(a[i]={}),a[i][o]=s&&{id:s.id,bitmap:s.bitmap.clone(),metrics:s.metrics};return a})}_getAndCacheGlyphsPromise(e,r){return yi(this,null,function*(){var t,a;(a=(t=this.entries)[e])!=null||(t[e]={glyphs:{},requests:{},ranges:{}});let i=this.entries[e],o=i.glyphs[r];if(o!==void 0)return{stack:e,id:r,glyph:o};let s=r.codePointAt(0),l=this.fontFaceManager.hasFontFaces()?yield this.fontFaceManager.getFontFamily(e,s):null;return l?(o=i.glyphs[r]=yield this._drawGlyph(i,e,r,l),{stack:e,id:r,glyph:o}):!this.url||C2(r)||this._charUsesLocalIdeographFontFamily(s)?(o=i.glyphs[r]=yield this._drawGlyph(i,e,r),{stack:e,id:r,glyph:o}):yield this._downloadAndCacheRangePromise(e,r)})}_downloadAndCacheRangePromise(e,r){return yi(this,null,function*(){var t;let a=r.codePointAt(0),i=this.entries[e],o=Math.floor(a/256);if(i.ranges[o])return{stack:e,id:r,glyph:null};(t=i.requests)[o]||(t[o]=this._loadGlyphRange(e,o));try{let s=yield i.requests[o];for(let l in s)i.glyphs[String.fromCodePoint(+l)]=s[+l];return i.ranges[o]=!0,{stack:e,id:r,glyph:s[a]||null}}catch(s){let l=i.glyphs[r]=yield this._drawGlyph(i,e,r);return this._warnOnMissingGlyphRange(l,o,a,Ac(s)),{stack:e,id:r,glyph:l}}})}_loadGlyphRange(e,r){return yi(this,null,function*(){let t=r*256,a=t+255,i=yield this.requestManager.transformRequest(this.url.replace("{fontstack}",e).replace("{range}",`${t}-${a}`),"Glyphs"),o=yield fS(i,new AbortController);if(!o?.data)throw Error(`Could not load glyph range. range: ${r}, ${t}-${a}`);let s={};for(let l of npe(o.data))s[l.id]=l;return s})}_warnOnMissingGlyphRange(e,r,t,a){let i=r*256,o=i+255,s=t.toString(16).padStart(4,"0").toUpperCase();vo(`Unable to load glyph range ${r}, ${i}-${o}. Rendering codepoint U+${s} locally instead. ${a}`)}_charUsesLocalIdeographFontFamily(e){return!!this.localIdeographFontFamily&&_de(e)}_drawGlyph(e,r,t,a){return yi(this,null,function*(){let i=(yield this._getTinySDF(e,r,t,a)).draw(t),o=new RegExp("^\\p{gc=Cf}+$","u").test(t);return{id:t.codePointAt(0),bitmap:new zw({width:i.width||60,height:i.height||60},i.data),metrics:{width:o?0:i.glyphWidth/2||24,height:i.glyphHeight/2||24,left:i.glyphLeft/2+.5||0,top:i.glyphTop/2-27.5||-8,advance:o?0:i.glyphAdvance/2||24,isDoubleResolution:!0}}})}_getTinySDF(e,r,t,a){var i,o,s,l;let n=C2(t);if(a){let h=n?"clusterTinySDFs":"fontFaceTinySDFs";return(i=e[h])!=null||(e[h]={}),(o=e[h])[a]||(o[a]=this._createTinySDF(a,!1,n?3:1)),e[h][a]}let u=r===wj&&this.localIdeographFontFamily!==""&&this._charUsesLocalIdeographFontFamily(t.codePointAt(0)),c=u?this.localIdeographFontFamily:r;if(n)return(s=e.clusterTinySDFs)!=null||(e.clusterTinySDFs={}),(l=e.clusterTinySDFs)[c]||(l[c]=this._createTinySDF(c,!0,3)),e.clusterTinySDFs[c];let f=u?"ideographTinySDF":"tinySDF";return e[f]||(e[f]=this._createTinySDF(c)),e[f]}_createTinySDF(e,r=!0,t=1){return yi(this,null,function*(){var a;let i=e?e.split(","):[];i.push("sans-serif");let o=i.map(n=>/[-\w]+/.test(n)?n:`'${CSS.escape(n)}'`).join(","),s=r?this._fontWeight(i[0]):void 0,l=r?this._fontStyle(i[0]):"normal";if(typeof document<"u"&&((a=document.fonts)!=null&&a.load))try{yield document.fonts.load(`${l} ${s||"normal"} 48px ${o}`)}catch(n){vo(`Failed to load font "${o}": ${Ac(n).message}`)}return this.createRasterizer({fontSize:48,buffer:Math.max(6,Math.ceil(48*(t-1)/4)),radius:16,cutoff:.25,fontFamily:o,fontWeight:s,fontStyle:l,lang:this.lang},6)})}_fontStyle(e){return/italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){let r={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},t;for(let[a,i]of Object.entries(r))RegExp(`\\b${a}\\b`,"i").test(e)&&(t=`${i}`);return t}destroy(){for(let e in this.entries){let r=this.entries[e];r.tinySDF=null,r.ideographTinySDF=null,r.fontFaceTinySDFs={},r.glyphs={},r.requests={},r.ranges={}}this.entries={},this.fontFaceManager.destroy()}},Ej=()=>Mj||(Mj=new Du({anchor:new Ti(ta.light.anchor,"anchor"),position:new Ti(ta.light.position,"position"),color:new Ti(ta.light.color,"color"),intensity:new Ti(ta.light.intensity,"intensity")})),Sj=class extends Zl{constructor(e,r){super(),this._transitionable=new C_(Ej(),"light",r),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}getCartesianPosition(){return Rce(this.properties.get("position"))}setLight(e,r={}){if(!this._validate(Af.light,e,r))for(let t in e){let a=e[t];t.endsWith("-transition")?this._transitionable.setTransition(t.slice(0,-lw.length),a):this._transitionable.setValue(t,a)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,r,t){return i_(this,e,{value:r},t)}},Cj=()=>kj||(kj=new Du({"sky-color":new Ti(ta.sky["sky-color"],"sky-color"),"horizon-color":new Ti(ta.sky["horizon-color"],"horizon-color"),"fog-color":new Ti(ta.sky["fog-color"],"fog-color"),"fog-ground-blend":new Ti(ta.sky["fog-ground-blend"],"fog-ground-blend"),"horizon-fog-blend":new Ti(ta.sky["horizon-fog-blend"],"horizon-fog-blend"),"sky-horizon-blend":new Ti(ta.sky["sky-horizon-blend"],"sky-horizon-blend"),"atmosphere-blend":new Ti(ta.sky["atmosphere-blend"],"atmosphere-blend")})),Dj=class extends Zl{constructor(e,r){super(),this._transitionable=new C_(Cj(),"sky",r),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new Ko(0))}setSky(e,r={}){if(!this._validate(Af.sky,e,r)){e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let t in e){let a=e[t];t.endsWith("-transition")?this._transitionable.setTransition(t.slice(0,-lw.length),a):this._transitionable.setValue(t,a)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,r,t={}){return i_(this,e,{value:r},t)}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}},Lj=class{constructor(e,r){this.width=e,this.height=r,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,r){var t;let a=e.join(",")+String(r);return(t=this.dashEntry)[a]||(t[a]=this.addDash(e,r)),this.dashEntry[a]}getDashRanges(e,r,t){let a=e.length%2==1,i=[],o=a?-e[e.length-1]*t:0,s=e[0]*t,l=!0;i.push({left:o,right:s,isDash:l,zeroLength:e[0]===0});let n=e[0];for(let u=1;u1&&(n=e[++l]);let c=Math.abs(u-n.left),f=Math.abs(u-n.right),h=Math.min(c,f),d,p=i/t*(a+1);if(n.isDash){let g=a-Math.abs(p);d=Math.sqrt(h*h+g*g)}else d=a-Math.sqrt(h*h+p*p);this.data[s+u]=Math.max(0,Math.min(255,d+128))}}}addRegularDash(e){for(let s=e.length-1;s>=0;--s){let l=e[s],n=e[s+1];l.zeroLength?e.splice(s,1):n?.isDash===l.isDash&&(n.left=l.left,e.splice(s,1))}let r=e[0],t=e[e.length-1];r.isDash===t.isDash&&(r.left=t.left-this.width,t.right=r.right+this.width);let a=this.width*this.nextRow,i=0,o=e[i];for(let s=0;s1&&(o=e[++i]);let l=Math.abs(s-o.left),n=Math.abs(s-o.right),u=Math.min(l,n),c=o.isDash?u:-u;this.data[a+s]=Math.max(0,Math.min(255,c+128))}}addDash(e,r){let t=r?7:0,a=2*t+1;if(this.nextRow+a>this.height)return vo("LineAtlas out of space"),null;let i=0;for(let s of e)i+=s;if(i!==0){let s=this.width/i,l=this.getDashRanges(e,this.width,s);r?this.addRoundDash(l,s,t):this.addRegularDash(l)}let o={y:this.nextRow+t,height:2*t,width:i};return this.nextRow+=a,this.dirty=!0,o}bind(e){let r=e.gl;this.texture?(r.bindTexture(r.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,r.texSubImage2D(r.TEXTURE_2D,0,0,0,this.width,this.height,r.ALPHA,r.UNSIGNED_BYTE,this.data))):(this.texture=r.createTexture(),r.bindTexture(r.TEXTURE_2D,this.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.REPEAT),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.REPEAT),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texImage2D(r.TEXTURE_2D,0,r.ALPHA,this.width,this.height,0,r.ALPHA,r.UNSIGNED_BYTE,this.data))}},O3="maplibre_preloaded_worker_pool",Q_=class wQ{constructor(){this.active={},this.workersPromise=null}acquire(r){return yi(this,null,function*(){if(this.active[r]=!0,!this.workersPromise){let t=[];for(;t.length{for(let i of a)i.terminate()})}}isPreloaded(){return!!this.active[O3]}numActive(){return Object.keys(this.active).length}},Fj=Math.floor(Hc.hardwareConcurrency/2),Q_.workerCount=Bce(globalThis)?Math.max(Math.min(Fj,3),1):1,_C=class{constructor(e,r){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=r,this.removed=!1,this.actorsPromise=this.initActors(r)}initActors(e){return yi(this,null,function*(){let r=yield this.workerPool.acquire(e);if(this.removed)return[];if(this.actors=r.map((t,a)=>{let i=new SN(t,e);return i.name=`Worker ${a}`,i}),!this.actors.length)throw Error("No actors found");return this.actors})}broadcast(e,r){return yi(this,null,function*(){let t=yield this.actorsPromise;return Promise.all(t.map(a=>a.sendAsync({type:e,data:r})))})}getActor(){return yi(this,null,function*(){let e=yield this.actorsPromise;return this.currentActor=(this.currentActor+1)%e.length,e[this.currentActor]})}waitForInitComplete(){return yi(this,null,function*(){this.actors.length===0&&(yield this.actorsPromise)})}getReadyActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.removed=!0;for(let r of this.actors)r.remove();this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,r){return yi(this,null,function*(){let t=yield this.actorsPromise;for(let a of t)a.registerMessageHandler(e,r)})}unregisterMessageHandler(e){return yi(this,null,function*(){let r=yield this.actorsPromise;for(let t of r)t.unregisterMessageHandler(e)})}},Qh=class l0{constructor(r,t){r&&(t?this.setSouthWest(r).setNorthEast(t):Array.isArray(r)&&(r.length===4?this.setSouthWest([r[0],r[1]]).setNorthEast([r[2],r[3]]):this.setSouthWest(r[0]).setNorthEast(r[1])))}setNorthEast(r){return this._ne=r instanceof ln?new ln(r.lng,r.lat):ln.convert(r),this}setSouthWest(r){return this._sw=r instanceof ln?new ln(r.lng,r.lat):ln.convert(r),this}extend(r){let t=this._sw,a=this._ne,i,o;if(r instanceof ln)i=r,o=r;else if(r instanceof l0){if(i=r._sw,o=r._ne,!i||!o)return this}else{if(Array.isArray(r)){if(r.length===4||r.every(Array.isArray)){let s=r;return this.extend(l0.convert(s))}{let s=r;return this.extend(ln.convert(s))}}return r&&("lng"in r||"lon"in r)&&"lat"in r?this.extend(ln.convert(r)):this}return!t&&!a?(this._sw=new ln(i.lng,i.lat),this._ne=new ln(o.lng,o.lat)):(t.lng=Math.min(i.lng,t.lng),t.lat=Math.min(i.lat,t.lat),a.lng=Math.max(o.lng,a.lng),a.lat=Math.max(o.lat,a.lat)),this}getCenter(){return new ln((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 ln(this.getWest(),this.getNorth())}getSouthEast(){return new ln(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(r){let{lng:t,lat:a}=ln.convert(r),i=this._sw.lat<=a&&a<=this._ne.lat,o=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(o=this._sw.lng>=t&&t>=this._ne.lng),i&&o}intersects(r){if(r=l0.convert(r),!(r.getNorth()>=this.getSouth()&&r.getSouth()<=this.getNorth()))return!1;let t=Math.abs(this.getEast()-this.getWest()),a=Math.abs(r.getEast()-r.getWest());if(t>=360||a>=360)return!0;let i=qh(this.getWest(),-180,180),o=qh(this.getEast(),-180,180),s=qh(r.getWest(),-180,180),l=qh(r.getEast(),-180,180),n=i>o,u=s>l;return n&&u?!0:n?l>=i||s<=o:u?o>=s||i<=l:s<=o&&l>=i}static convert(r){return r instanceof l0||!r?r:new l0(r)}static fromLngLat(r,t=0){let a=360*t/40075017,i=a/Math.cos(Math.PI/180*r.lat);return new l0(new ln(r.lng-i,r.lat-a),new ln(r.lng+i,r.lat+a))}adjustAntiMeridian(){let r=new ln(this._sw.lng,this._sw.lat),t=new ln(this._ne.lng,this._ne.lat);return r.lng>t.lng?new l0(r,new ln(t.lng+360,t.lat)):new l0(r,t)}},xC=class{constructor(e,r,t){this.bounds=Qh.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=t||24}validateBounds(e){return!Array.isArray(e)||e.length!==4?[-180,-90,180,90]:[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]}contains(e){let r=2**e.z,t={minX:Math.floor(g1(this.bounds.getWest())*r),minY:Math.floor(y1(this.bounds.getNorth())*r),maxX:Math.ceil(g1(this.bounds.getEast())*r),maxY:Math.ceil(y1(this.bounds.getSouth())*r)};return e.x>=t.minX&&e.x=t.minY&&e.y{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null))}serialize(){return tn({},this._options)}loadTile(e){return yi(this,null,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),t={request:yield this.map._requestManager.transformRequest(r,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(e),etag:e.etag};t.request.collectResourceTiming=this._collectResourceTiming,yield this.dispatcher.waitForInitComplete();let a="RT";if(!e.actor||e.state==="expired")e.actor=this.dispatcher.getReadyActor(),a="LT";else if(e.state==="loading")return new Promise((i,o)=>{e.reloadPromise={resolve:i,reject:o}});e.abortController=new AbortController;try{let i=yield e.actor.sendAsync({type:a,data:t},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,i);let o={};return i?.etagUnmodified&&(o.unmodified=!0),o}catch(i){if(delete e.abortController,e.aborted||S0(i))return;if(i&&i.status!==404)throw i;this._afterTileLoadWorkerResponse(e,null)}})}_getOverzoomParameters(e){return yi(this,null,function*(){if(e.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let r=e.tileID.scaledTo(this.maxzoom).canonical,t=r.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:r,overzoomRequest:yield this.map._requestManager.transformRequest(t,"Tile")}})}_afterTileLoadWorkerResponse(e,r){if(r?.resourceTiming&&(e.resourceTiming=r.resourceTiming),r&&this.map._refreshExpiredTiles&&e.setExpiryData(r),e.etag=r?.etag,e.loadVectorData(r,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}abortTile(e){return yi(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return yi(this,null,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}},j3=class extends Zl{constructor(e,r,t,a){super(),this.id=e,this.dispatcher=t,this.setEventedParent(a),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._premultiplyAlpha=!0,this._options=tn({type:"raster"},r),tn(this,Gy(r,["url","scheme","tileSize"]))}load(e=!1){return yi(this,null,function*(){this._loaded=!1,this.fire(new Fs("dataloading")),this._tileJSONRequest=new AbortController;try{let r=yield s8(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,r&&(tn(this,r),r.bounds&&(this.tileBounds=new xC(r.bounds,this.minzoom,this.maxzoom)),this.fire(new Fs("data",{sourceDataType:"metadata"})),this.fire(new Fs("data",{sourceDataType:"content",sourceDataChanged:e})))}catch(r){this._tileJSONRequest=null,this._loaded=!0,S0(r)||this.fire(new mn(Ac(r)))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null))}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null)),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return tn({},this._options)}setPremultiplyAlpha(e){return this._premultiplyAlpha===e||this.setSourceProperty(()=>{this._premultiplyAlpha=e}),this}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return yi(this,null,function*(){var r;let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),a=this._premultiplyAlpha,i=a?void 0:{premultiplyAlpha:"none"};e.abortController=new AbortController;try{let o=yield Gd.transformAndGetImage(this.map._requestManager,t,"Tile",e.abortController,this.map._refreshExpiredTiles,i);if(delete e.abortController,e.aborted){e.state="unloaded";return}if(o){this.map._refreshExpiredTiles&&(o.cacheControl||o.expires)&&e.setExpiryData({cacheControl:o.cacheControl,expires:o.expires});let s=this.map.painter.context,l=s.gl,n=(r=o.data)!=null?r:new Ls({width:1,height:1},new Uint8Array(4));e.texture=this.map.painter.getTileTexture(n.width),e.texture?e.texture.update(n,{useMipmap:!0,premultiply:a}):(e.texture=new Kl(s,n,l.RGBA,{useMipmap:!0,premultiply:a}),e.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE,l.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(o){if(delete e.abortController,e.aborted)e.state="unloaded";else if(o)throw e.state="errored",o}})}abortTile(e){return yi(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return yi(this,null,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}},wC=class extends j3{constructor(e,r,t,a){super(e,r,t,a),this.type="raster-dem",this.maxzoom=22,this._options=tn({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return yi(this,null,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let t=yield Gd.transformAndGetImage(this.map._requestManager,r,"Tile",e.abortController,this.map._refreshExpiredTiles,{colorSpaceConversion:"none"});if(delete e.abortController,e.aborted){e.state="unloaded";return}if(t){if(this.map._refreshExpiredTiles&&(t.cacheControl||t.expires)&&e.setExpiryData({cacheControl:t.cacheControl,expires:t.expires}),!t.data){e.state="loaded";return}let a=t.data,i=Gv(a)&&RM()?a:yield this.readImageNow(a),o={type:this.type,uid:e.uid,source:this.id,rawImageData:i,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(e.actor&&e.state!=="expired"&&e.state!=="reloading")return;yield this.dispatcher.waitForInitComplete(),(!e.actor||e.state==="expired")&&(e.actor=this.dispatcher.getReadyActor()),e.dem=yield e.actor.sendAsync({type:"LDT",data:o}),e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0,e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}readImageNow(e){return yi(this,null,function*(){if(typeof VideoFrame<"u"&&SI()){let r=e.width+4,t=e.height+4;try{return new Ls({width:r,height:t},yield Nce(e,-2,-2,r,t))}catch{}}return Hc.getImageData(e,2)})}_getNeighboringTiles(e){let r=e.canonical,t=2**r.z,a=(r.x-1+t)%t,i=r.x===0?e.wrap-1:e.wrap,o=(r.x+1+t)%t,s=r.x+1===t?e.wrap+1:e.wrap,l={};return l[new Yu(e.overscaledZ,i,r.z,a,r.y).key]={backfilled:!1},l[new Yu(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new Yu(e.overscaledZ,i,r.z,a,r.y-1).key]={backfilled:!1},l[new Yu(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new Yu(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1f8(r))}}shouldReloadTile(e,{affectedBounds:r}){if(e.state==="loading")return!0;if(e.state==="unloaded")return!1;let{buffer:t,extent:a}=this.workerOptions.geojsonVtOptions,i=i1e(e.tileID.canonical,t/a);for(let o of r)if(i.intersects(o))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(e){return yi(this,null,function*(){let r=e.actor?"RT":"LT";e.actor=yield this.actorPromise;let t={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;try{let a=yield(yield this.actorPromise).sendAsync({type:r,data:t},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(a,this.map.painter,r==="RT")}catch(a){if(delete e.abortController,e.aborted||S0(a))return;throw a}})}abortTile(e){return yi(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return yi(this,null,function*(){e.unloadVectorData(),yield(yield this.actorPromise).sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actorPromise.then(e=>e.sendAsync({type:"RS",data:{type:this.type,source:this.id}}))}serialize(){return tn({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}},hm=[0,0,1],Pj=(e,r)=>({u_tl_parent:new no(e,r.u_tl_parent),u_scale_parent:new Di(e,r.u_scale_parent),u_buffer_scale:new Di(e,r.u_buffer_scale),u_image_warp:new qc(e,r.u_image_warp),u_fade_t:new Di(e,r.u_fade_t),u_opacity:new Di(e,r.u_opacity),u_image0:new fn(e,r.u_image0),u_image1:new fn(e,r.u_image1),u_brightness_low:new Di(e,r.u_brightness_low),u_brightness_high:new Di(e,r.u_brightness_high),u_saturation_factor:new Di(e,r.u_saturation_factor),u_contrast_factor:new Di(e,r.u_contrast_factor),u_spin_weights:new qc(e,r.u_spin_weights),u_coords_top:new R1(e,r.u_coords_top),u_coords_bottom:new R1(e,r.u_coords_bottom)}),Ij=(e,r,t,a,i,o)=>({u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_image_warp:o,u_fade_t:t.mix,u_opacity:t.opacity*a.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:a.paint.get("raster-brightness-min"),u_brightness_high:a.paint.get("raster-brightness-max"),u_saturation_factor:s1e(a.paint.get("raster-saturation")),u_contrast_factor:o1e(a.paint.get("raster-contrast")),u_spin_weights:n1e(a.paint.get("raster-hue-rotate")),u_coords_top:[i[0].x,i[0].y,i[1].x,i[1].y],u_coords_bottom:[i[3].x,i[3].y,i[2].x,i[2].y]}),Z1=class{constructor(e,r,t){this.vertexBuffer=e,this.indexBuffer=r,this.segments=t}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}},G0=pl([{name:"a_pos",type:"Int16",components:2}]),tx=xa/128,dm=class extends Zl{constructor(e,r,t,a){super(),this.imageWarp=hm,this.flippedWindingOrder=!1,this._warp="auto",this._imageDirty=!1,this._subdividedQuad=!1,this._subdividedMesh=null,this.id=e,this.dispatcher=t,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(a),this.options=r}load(e){return yi(this,null,function*(){if(this.options.url===void 0){this._loaded=!0,this._finishLoading();return}this._loaded=!1,this.fire(new Fs("dataloading")),this.url=this.options.url,this._abortController=new AbortController;try{let r=yield Gd.transformAndGetImage(this.map._requestManager,this.url,"Image",this._abortController);this._abortController=null,this._loaded=!0,r?.data?(this._setImage(r.data),e&&(this.coordinates=e),this._finishLoading()):this.fire(new mn(Error(`Could not load image ${this.url}: the response is empty`)))}catch(r){if(S0(r))return;this._abortController=null,this._loaded=!0,this.fire(new mn(Ac(r)))}})}loaded(){return this._loaded}updateImage(e){return this._abortController&&(this._abortController=(this._abortController.abort(),null)),"image"in e?(this._loaded=!0,this._setImage(e.image),e.coordinates&&(this.coordinates=e.coordinates),this._finishLoading(),this):e.url?(this.options.url=e.url,this.load(e.coordinates),this):this}_setImage(e){this.image=e,this._imageDirty=!0}getMesh(e,r){var t;return!this._subdividedQuad||r?null:((t=this._subdividedMesh)!=null||(this._subdividedMesh=h8(e,{granularity:16})),this._subdividedMesh)}_disposeTexture(){var e;(e=this.texture)==null||e.destroy(),this.texture=null}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new Fs("data",{sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){var e;this._abortController&&(this._abortController=(this._abortController.abort(),null)),this._disposeTexture(),(e=this._subdividedMesh)==null||e.destroy(),this._subdividedMesh=null,this.image=null,this.tiles={}}setWarp(e){return this._warp===e?this:(this._warp=e,this.tileCoords&&this.setCoordinates(this.coordinates),this)}getWarp(){return this._warp}setCoordinates(e){this.coordinates=e;let r=e.map($o.fromLngLat);return this.tileID=l1e(r),this.terrainTileRanges=this._getOverlappingTileRanges(r),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=r.map(t=>this.tileID.getTilePoint(t)._round()),this.imageWarp=c1e(this.tileCoords,this._warp),this._subdividedQuad=this.imageWarp[2]>0&&!p8(this.tileCoords),this.flippedWindingOrder=u1e(this.tileCoords),this.fire(new Fs("data",{sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let e=this.map.painter.context,r=e.gl;this.texture?this._imageDirty&&(this.texture.update(this.image),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)):(this.texture=new Kl(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this._imageDirty=!1;let t=!1;for(let a in this.tiles){let i=this.tiles[a];i.state!=="loaded"&&(i.state="loaded",i.texture=this.texture,t=!0)}t&&this.fire(new Fs("data",{sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return yi(this,null,function*(){var r;(r=this.tileID)!=null&&r.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){let e={type:"image",coordinates:this.coordinates};return this.options.url!==void 0&&(e.url=this.options.url),e}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:r,minY:t,maxX:a,maxY:i}=Xh.fromPoints(e),o={};for(let s=0;s<=25;s++){let l=2**s,n=Math.floor(r*l),u=Math.floor(t*l),c=Math.floor(a*l),f=Math.floor(i*l),h=(n%l+l)%l,d=c%l,p=Math.floor(n/l),g=Math.floor(c/l);o[s]={minWrap:p,maxWrap:g,minTileXWrapped:h,maxTileXWrapped:d,minTileY:u,maxTileY:f}}return o}},TC=class extends dm{constructor(e,r,t,a){super(e,r,t,a),this._onPlayingHandler=()=>{var i;(i=this.map)==null||i.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=r}load(){return yi(this,null,function*(){this._loaded=!1;let e=this.options;this.urls=[];for(let r of e.urls)this.urls.push((yield this.map._requestManager.transformRequest(r,"Source")).url);try{let r=yield Hz(this.urls);if(this._loaded=!0,!r)return;this.video=r,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(r){this.fire(new mn(Ac(r)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let r=this.video.seekable;er.end(0)?this.fire(new mn(new qa(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let e=this.map.painter.context,r=e.gl;this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new Kl(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let t=!1;for(let a in this.tiles){let i=this.tiles[a];i.state!=="loaded"&&(i.state="loaded",i.texture=this.texture,t=!0)}t&&this.fire(new Fs("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},MC=class extends dm{constructor(e,r,t,a){super(e,r,t,a),r.coordinates?(!Array.isArray(r.coordinates)||r.coordinates.length!==4||r.coordinates.some(i=>!Array.isArray(i)||i.length!==2||i.some(o=>typeof o!="number")))&&this.fire(new mn(new qa(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new mn(new qa(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&typeof r.animate!="boolean"&&this.fire(new mn(new qa(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?typeof r.canvas!="string"&&!(r.canvas instanceof HTMLCanvasElement)&&this.fire(new mn(new qa(`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 mn(new qa(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=r.animate===void 0||r.animate}load(){return yi(this,null,function*(){if(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 mn(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._playing=(this.prepare(),!1))},this._finishLoading()})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this._playing=!1,super.onRemove()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let r=this.map.painter.context,t=r.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new Kl(r,this.canvas,t.RGBA,{premultiply:!0}),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE));let a=!1;for(let i in this.tiles){let o=this.tiles[i];o.state!=="loaded"&&(o.state="loaded",o.texture=this.texture,a=!0)}a&&this.fire(new Fs("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}},EC={},Rj=(e,r,t,a)=>{let i=new(SC(r.type))(e,r,t,a);if(i.id!==e)throw Error(`Expected Source id to be ${e} instead of ${i.id}`);return i},SC=e=>{switch(e){case"geojson":return AC;case"image":return dm;case"raster":return j3;case"raster-dem":return wC;case"vector":return bC;case"video":return TC;case"canvas":return MC}return EC[e]},zj=(e,r)=>{EC[e]=r},Bj=(e,r)=>yi(null,null,function*(){if(SC(e))throw Error(`A source type called "${e}" already exists.`);zj(e,r)}),U3="RTLPluginLoaded",Oj=class extends Zl{constructor(...e){super(...e),this.status="unavailable",this.url=null,this.dispatcher=qk()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(r=>{throw this.status="error",r})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e,r=!1){return yi(this,null,function*(){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=Hc.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if(this.status==="unavailable")if(r)this.status="deferred",this._syncState(this.status);else return this._requestImport();else if(this.status==="requested")return this._requestImport()})}_requestImport(){return yi(this,null,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new qf(U3))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}},q3=null,kC=class{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=NI(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rttObjects=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading",this.featureStateRevision=-1}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection:r,fadingParentID:t,fadeEndTime:a}){this.resetFadeLogic(),this.fadingRole=e,this.fadingDirection=r,this.fadingParentID=t,this.fadeEndTime=a}setSelfFadeLogic(e){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=e}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=is(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}getRTT(e){return this.rttObjects[e]}acquireRTT(e,r,t){return this.rttObjects[r]=e.acquireRTT(t)}releaseRTT(e){if(this.rttObjects.length!==0){for(let r of this.rttObjects)r&&e.releaseRTT(r);this.rttObjects.length=0}}loadVectorData(e,r,t){if(e?.etagUnmodified===!0){this.state="loaded";return}if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!e){this.collisionBoxArray=new BS;return}e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestEncoding=e.encoding,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=h1e(e.buckets,r?.style),this.hasSymbolBuckets=!1;for(let a in this.buckets){let i=this.buckets[a];if(i instanceof N_)if(this.hasSymbolBuckets=!0,t)i.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let a in this.buckets){let i=this.buckets[a];if(i instanceof N_&&i.hasRTLText){this.hasRTLText=!0,H_().lazyLoad();break}}this.queryPadding=0;for(let a in this.buckets){let i=this.buckets[a];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(a).queryRadius(i))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let a=this.buckets[t];a.uploadPending()&&a.upload(e)}let r=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Kl(e,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasImage=(this.glyphAtlasTexture=new Kl(e,this.glyphAtlasImage,r.ALPHA),null))}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,r,t,a,i,o,s,l,n,u,c){var f;return(f=this.latestFeatureIndex)!=null&&f.rawTileData?this.latestFeatureIndex.query({queryGeometry:a,cameraQueryGeometry:i,scale:o,tileSize:this.tileSize,pixelPosMatrix:u,transform:l,params:s,queryPadding:this.queryPadding*n,getElevation:c},e,r,t):{}}querySourceFeatures(e,r){let t=this.latestFeatureIndex;if(!t?.rawTileData)return;let a=t.loadVTLayers(),i=r?.sourceLayer?r.sourceLayer:"",o=a._geojsonTileLayer||a[i];if(!o)return;let s=t_(r?.filter,`querySourceFeatures[${i}].filter`,r?.globalState),{z:l,x:n,y:u}=this.tileID.canonical,c={z:l,x:n,y:u};for(let f=0;ft)a=!1;else if(!r)a=!0;else if(this.expirationTimethis.max[0]||r.aabb.min[1]>this.max[1]||r.aabb.min[2]>this.max[2]||r.aabb.max[0]0?(t+=r[i]*this.min[i],a+=r[i]*this.max[i]):(a+=r[i]*this.min[i],t+=r[i]*this.max[i]);return t>=0?2:a<0?0:1}},G3=class TQ{constructor(r,t,a){this.points=r,this.planes=t,this.aabb=a}static fromInvProjectionMatrix(r,t=1,a=0,i,o){let s=[[-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]],l=o?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],n=2**a,u=s.map(d=>d1e(d,r,t,n));i&&p1e(u,l[0],i,o);let c=l.map(d=>{let p=hp([],u[d[0]],u[d[1]]),g=hp([],u[d[2]],u[d[1]]),m=xf([],Nf([],p,g)),y=-uu(m,u[d[1]]);return m.concat(y)}),f=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let d of u)for(let p=0;p<3;p++)f[p]=Math.min(f[p],d[p]),h[p]=Math.max(h[p],d[p]);return new TQ(u,c,new V3(f,h))}},jj=Vk(9.314,3),CC=class{constructor(){this._tiles={}}handleWrapJump(e){let r={};for(let t in this._tiles){let a=this._tiles[t];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),r[a.tileID.key]=a}this._tiles=r}setFeatureState(e,r,t){for(let a in this._tiles)this._tiles[a].setFeatureState(e,r,t)}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map(r=>r.tileID).sort(az).map(r=>r.key):Object.keys(this._tiles)}getTileById(e){return this._tiles[e]}setTile(e,r){this._tiles[e]=r}deleteTileById(e){delete this._tiles[e]}getLoadedTile(e){let r=this.getTileById(e.key);return r?.hasData()?r:null}isIdRenderable(e,r=!1){var t;return(t=this.getTileById(e))==null?void 0:t.isRenderable(r)}getRenderableIds(e=0,r){let t=[];for(let a of this.getAllIds())this.isIdRenderable(a,r)&&t.push(this.getTileById(a));return r?t.sort((a,i)=>{let o=a.tileID,s=i.tileID,l=new zr(o.canonical.x,o.canonical.y)._rotate(-e),n=new zr(s.canonical.x,s.canonical.y)._rotate(-e);return o.overscaledZ-s.overscaledZ||n.y-l.y||n.x-l.x}).map(a=>a.tileID.key):t.map(a=>a.tileID).sort(az).map(a=>a.key)}},H3=(K1=class extends Zl{constructor(e,r,t){super(),this._maxContentElevationSeen=0,this.id=e,this.dispatcher=t,this.on("data",a=>{this._dataHandler(a)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=Rj(e,r,t,this),this._inViewTiles=new CC,this._outOfViewCache=new $N(0,a=>this._unloadTile(a)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new Nj,this._didEmitContent=!1,this._updated=!1}onAdd(e){var r;this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,(r=this._source)!=null&&r.onAdd&&this._source.onAdd(e)}onRemove(e){var r;for(let t of this._inViewTiles.getAllTiles())t.unloadVectorData();this.clearTiles(),(r=this._source)!=null&&r.onRemove&&this._source.onRemove(e),this._inViewTiles=new CC}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 e of this._inViewTiles.getAllTiles())if(e.state!=="loaded"&&e.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,t,a){return yi(this,null,function*(){try{let i=yield this._source.loadTile(e);this._tileLoaded(e,r,t,a,i)}catch(i){e.state="errored",i.status===404?this.update(this.transform,this.terrain):this._source.fire(new mn(Ac(i),{tile:e}))}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new Fs("dataabort",{tile:e,coord:e.tileID}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let r of this._inViewTiles.getAllTiles())r.upload(e),r.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(e){var r;return this._inViewTiles.getRenderableIds((r=this.transform)==null?void 0:r.bearingInRadians,e)}hasRenderableParent(e){let r=e.overscaledZ-1;if(r>=this._source.minzoom){let t=this.getLoadedTile(e.scaledTo(r));if(t)return this._inViewTiles.isIdRenderable(t.tileID.key)}return!1}reload(e,r=void 0){if(this._paused){this._shouldReloadOnResume=!0;return}this._outOfViewCache.reset();for(let t of this._inViewTiles.getAllIds()){let a=this._inViewTiles.getTileById(t);(!r||this._source.shouldReloadTile(a,r))&&(e?this._reloadTile(t,a.state==="errored"?"loading":"expired"):a.state!=="errored"&&this._reloadTile(t,"reloading"))}}_reloadTile(e,r){return yi(this,null,function*(){let t=this._inViewTiles.getTileById(e);if(!t)return;let a=t.hasData();t.state!=="loading"&&(t.state=r),yield this._loadTile(t,e,r,a)})}_tileLoaded(e,r,t,a,i){a||(e.timeAdded=is(),e.selfFading&&(e.fadeEndTime=e.timeAdded+this._rasterFadeDuration)),t==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),!i?.unmodified&&(this.getSource().type==="raster-dem"&&e.dem&&M1e(e,this._inViewTiles),e.featureStateRevision=-1,this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new Fs("data",{tile:e,coord:e.tileID})))}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._inViewTiles.getTileById(e)}_retainLoadedChildren(e,r){let t=this._getLoadedDescendents(r),a=new Set;for(let i of r){let o=t[i.key];if(!o?.length){a.add(i);continue}let s=i.overscaledZ+K1.maxOverzooming,l=o.filter(c=>c.tileID.overscaledZ<=s);if(!l.length){a.add(i);continue}let n=Math.min(...l.map(c=>c.tileID.overscaledZ)),u=l.filter(c=>c.tileID.overscaledZ===n).map(c=>c.tileID);for(let c of u)e[c.key]=c;this._areDescendentsComplete(u,n,i.overscaledZ)||a.add(i)}return a}_getLoadedDescendents(e){var r;let t={};for(let a of this._inViewTiles.getAllTiles().filter(i=>i.hasData()))for(let i of e)a.tileID.isChildOf(i)&&(t[r=i.key]||(t[r]=[]),t[i.key].push(a));return t}_areDescendentsComplete(e,r,t){return e.length===1&&e[0].isOverscaled()?e[0].overscaledZ===r:4**(r-t)===e.length}getLoadedTile(e){return this._inViewTiles.getLoadedTile(e)}updateCacheSize(e){let r=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),t=this._maxTileCacheZoomLevels===null?Uf.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels,a=Math.floor(r*t),i=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,a):a;this._outOfViewCache.setMaxSize(i)}handleWrapJump(e){let r=(e-(this._prevLng===void 0?e:this._prevLng))/360,t=Math.round(r);this._prevLng=e,t&&(this._inViewTiles.handleWrapJump(t),this._resetTileReloadTimers())}_updateMaxContentElevation(){var e,r;let t=this._maxContentElevationSeen,a=(r=(e=this.map)==null?void 0:e.style)==null?void 0:r._layers;if(!a)return t;let i=this._inViewTiles.getAllTiles();for(let o in a){let s=a[o];if(s.type!=="symbol"||s.source!==this.id||s.isHidden(this.transform.zoom))continue;let l=s;if(l.layout){t=Math.max(t,l.layout.get("symbol-height-offset").constantOr(0));for(let n of i){let u=n.getBucket(s);u&&u.maxHeightOffset>t&&(t=u.maxHeightOffset)}}}return this._maxContentElevationSeen=t,t}update(e,r){if(!this._sourceLoaded||this._paused)return;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng);let t;!this.used&&!this.usedForTerrain?t=[]:this._source.tileID?t=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(l=>new Yu(l.canonical.z,l.wrap,l.canonical.z,l.canonical.x,l.canonical.y)):(t=W1(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?Math.max(this._source.maxzoom,e.maxZoom-this.map._zoomLevelsToOverscale):this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom,maxContentElevation:this._updateMaxContentElevation()}),this._source.hasTile&&(t=t.filter(l=>this._source.hasTile(l)))),this.usedForTerrain&&(t=this._addTerrainIdealTiles(t));let a=t.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,a&&this.fire(new Fs("data",{sourceDataType:"idle",sourceId:this.id}));let i=Gk(e,this._source),o=this._updateRetainedTiles(t,i),s=g8(this._source.type);s&&this._rasterFadeDuration>0&&!r&&x1e(this._inViewTiles,t,o,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),s?this._cleanUpRasterTiles(o):this._cleanUpVectorTiles(o)}_cleanUpRasterTiles(e){for(let r of this._inViewTiles.getAllIds())e[r]||this._removeTile(r)}_cleanUpVectorTiles(e){for(let r of this._inViewTiles.getAllIds()){let t=this._inViewTiles.getTileById(r);if(e[r]){t.clearSymbolFadeHold();continue}if(!t.hasSymbolBuckets){this._removeTile(r);continue}t.holdingForSymbolFade()?t.symbolFadeFinished()&&this._removeTile(r):t.setSymbolHoldDuration(this.map._fadeDuration)}}_addTerrainIdealTiles(e){let r=[];for(let t of e)if(t.canonical.z>this._source.minzoom){let a=t.scaledTo(t.canonical.z-1);r.push(a);let i=t.scaledTo(Math.max(this._source.minzoom,Math.min(t.canonical.z,5)));r.push(i)}return e.concat(r)}releaseSymbolFadeTiles(){for(let e of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(e).holdingForSymbolFade()&&this._removeTile(e)}_updateRetainedTiles(e,r){var t;let a=new Set;for(let n of e)this._addTile(n).hasData()||a.add(n);let i=e.reduce((n,u)=>(n[u.key]=u,n),{}),o=this._retainLoadedChildren(i,a),s={},l=Math.max(r-K1.maxUnderzooming,this._source.minzoom);for(let n of o){let u=this._inViewTiles.getTileById(n.key),c=u?.wasRequested();for(let f=n.overscaledZ-1;f>=l;--f){let h=n.scaledTo(f);if(s[h.key])break;if(s[h.key]=!0,u=this.getTile(h),!u&&c&&(u=this._addTile(h)),u){let d=u.hasData();if((d||!((t=this.map)!=null&&t.cancelPendingTileRequestsWhileZooming)||c)&&(i[h.key]=h),c=u.wasRequested(),d)break}}}return i}_addTile(e){let r=this._inViewTiles.getTileById(e.key);if(r)return r;r=this._outOfViewCache.getAndRemove(e),r&&(r.resetFadeLogic(),this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null));let t=r;return r||(r=new kC(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state,!1)),r.uses++,this._inViewTiles.setTile(e.key,r),t||this._source.fire(new Fs("dataloading",{tile:r,coord:r.tileID})),r}_setTileReloadTimer(e,r){this._clearTileReloadTimer(e);let t=r.getExpiryTimeout();if(t){let a=()=>{this._reloadTile(e,"expired"),delete this._timers[e]};this._timers[e]=setTimeout(a,t)}}_clearTileReloadTimer(e){let r=this._timers[e];r&&(clearTimeout(r),delete this._timers[e])}_resetTileReloadTimers(){for(let e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(let e of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(e);this._setTileReloadTimer(e,r)}}refreshTiles(e){for(let r of this._inViewTiles.getAllIds()){let t=this._inViewTiles.getTileById(r);(this._inViewTiles.isIdRenderable(r)||t.state=="errored")&&e.some(a=>a.equals(t.tileID.canonical))&&this._reloadTile(r,"expired")}}_removeTile(e){let r=this._inViewTiles.getTileById(e);r&&(r.uses--,this._inViewTiles.deleteTileById(e),this._clearTileReloadTimer(e),!(r.uses>0)&&(r.hasData()&&r.state!=="reloading"?this._outOfViewCache.add(r.tileID,r,r.getExpiryTimeout()):(r.aborted=!0,this._abortTile(r),this._unloadTile(r))))}_dataHandler(e){if(e.dataType==="source"){if(e.sourceDataType==="metadata"){this._sourceLoaded=!0;return}e.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(e.sourceDataChanged,e.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}}resetMaxContentElevation(){this._maxContentElevationSeen=0}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1,this.resetMaxContentElevation();for(let e of this._inViewTiles.getAllIds())this._removeTile(e);this._outOfViewCache.reset()}tilesIn(e,r,t){let a=[],i=this.transform;if(!i)return a;let o=i.getCoveringTilesDetailsProvider().allowWorldCopies(),s=t?i.getCameraQueryGeometry(e):e,l=h=>i.screenPointToMercatorCoordinate(h,this.terrain),n=this.transformBbox(e,l,!o),u=this.transformBbox(s,l,!o),c=this.getIds(),f=Xh.fromPoints(u);for(let h of c){let d=this._inViewTiles.getTileById(h);if(d.holdingForSymbolFade())continue;let p=o?[d.tileID]:[d.tileID.unwrapTo(-1),d.tileID.unwrapTo(0)],g=2**(i.zoom-d.tileID.overscaledZ),m=r*d.queryPadding*xa/d.tileSize/g;for(let y of p){let _=f.map(v=>y.getTilePoint(new $o(v.x,v.y)));if(_.expandBy(m),_.intersects(CO)){let v=n.map(E=>y.getTilePoint(E)),x=u.map(E=>y.getTilePoint(E));a.push({tile:d,tileID:o?y:y.unwrapTo(0),queryGeometry:v,cameraQueryGeometry:x,scale:g})}}}return a}transformBbox(e,r,t){let a=e.map(r);if(t){let i=Xh.fromPoints(e);i.shrinkBy(Math.min(i.width(),i.height())*.001);let o=i.map(r);Xh.fromPoints(a).covers(o)||(a=a.map(s=>s.x>.5?new $o(s.x-1,s.y,s.z):s))}return a}getVisibleCoordinates(e){let r=this.getRenderableIds(e).map(t=>this._inViewTiles.getTileById(t).tileID);return this.transform&&this.transform.populateCache(r),r}hasTransition(){return this._source.hasTransition()?!0:g8(this._source.type)&&T1e(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(e){this._rasterFadeDuration=e}setFeatureState(e,r,t){e||(e=q_),this._state.updateState(e,r,t)}removeFeatureState(e,r,t){e||(e=q_),this._state.removeFeatureState(e,r,t)}getFeatureState(e,r){return e||(e=q_),this._state.getState(e,r)}setDependencies(e,r,t){let a=this._inViewTiles.getTileById(e);a&&a.setDependencies(r,t)}reloadTilesForDependencies(e,r){for(let t of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(t).hasDependency(e,r)&&this._reloadTile(t,"reloading");this._outOfViewCache.filter(t=>!t.hasDependency(e,r))}areTilesLoaded(){for(let e of this._inViewTiles.getAllTiles())if(e.state!=="loaded"&&e.state!=="errored")return!1;return!0}},K1.maxUnderzooming=10,K1.maxOverzooming=3,K1),Uj=class{constructor(e,r){this.reset(e,r)}reset(e,r){this.points=e||[],this._distances=[0];for(let t=1;t0?(a-o)/s:0;return this.points[i].mult(1-l).add(this.points[r].mult(l))}},DC=class{constructor(e,r,t){let a=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/t),this.yCellCount=Math.ceil(r/t);for(let o=0;othis.width||a<0||r>this.height)return[];let l=[];if(e<=0&&r<=0&&this.width<=t&&this.height<=a){if(i)return[{key:null,x1:e,y1:r,x2:t,y2:a}];for(let n=0;n0}hitTestCircle(e,r,t,a,i){let o=e-t,s=e+t,l=r-t,n=r+t;if(s<0||o>this.width||n<0||l>this.height)return!1;let u=[],c={hitTest:!0,overlapMode:a,circle:{x:e,y:r,radius:t},seenUids:{box:{},circle:{}}};return this._forEachCell(o,l,s,n,this._queryCellCircle,u,c,i),u.length>0}_queryCell(e,r,t,a,i,o,s,l){let{seenUids:n,hitTest:u,overlapMode:c}=s,f=this.boxCells[i],h=1e-6;if(f!==null){let p=this.bboxes;for(let g of f)if(!n.box[g]){n.box[g]=!0;let m=g*4,y=this.boxKeys[g];if(e<=p[m+2]+h&&r<=p[m+3]+h&&t>=p[m+0]-h&&a>=p[m+1]-h&&(!l||l(y))&&(!u||!_3(c,y.overlapMode))&&(o.push({key:y,x1:p[m],y1:p[m+1],x2:p[m+2],y2:p[m+3]}),u))return!0}}let d=this.circleCells[i];if(d!==null){let p=this.circles;for(let g of d)if(!n.circle[g]){n.circle[g]=!0;let m=g*3,y=this.circleKeys[g];if(this._circleAndRectCollide(p[m],p[m+1],p[m+2],e,r,t,a)&&(!l||l(y))&&(!u||!_3(c,y.overlapMode))){let _=p[m],v=p[m+1],x=p[m+2];if(o.push({key:y,x1:_-x,y1:v-x,x2:_+x,y2:v+x}),u)return!0}}}return!1}_queryCellCircle(e,r,t,a,i,o,s,l){let{circle:n,seenUids:u,overlapMode:c}=s,f=this.boxCells[i];if(f!==null){let d=this.bboxes;for(let p of f)if(!u.box[p]){u.box[p]=!0;let g=p*4,m=this.boxKeys[p];if(this._circleAndRectCollide(n.x,n.y,n.radius,d[g+0],d[g+1],d[g+2],d[g+3])&&(!l||l(m))&&!_3(c,m.overlapMode))return o.push(!0),!0}}let h=this.circleCells[i];if(h!==null){let d=this.circles;for(let p of h)if(!u.circle[p]){u.circle[p]=!0;let g=p*3,m=this.circleKeys[p];if(this._circlesCollide(d[g],d[g+1],d[g+2],n.x,n.y,n.radius)&&(!l||l(m))&&!_3(c,m.overlapMode))return o.push(!0),!0}}}_forEachCell(e,r,t,a,i,o,s,l){let n=this._convertToXCellCoord(e),u=this._convertToYCellCoord(r),c=this._convertToXCellCoord(t),f=this._convertToYCellCoord(a);for(let h=n;h<=c;h++)for(let d=u;d<=f;d++){let p=this.xCellCount*d+h;if(i.call(this,e,r,t,a,p,o,s,l))return}}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,r,t,a,i,o){let s=a-e,l=i-r,n=t+o;return n*n>s*s+l*l}_circleAndRectCollide(e,r,t,a,i,o,s){let l=(o-a)/2,n=Math.abs(e-(a+l));if(n>l+t)return!1;let u=(s-i)/2,c=Math.abs(r-(i+u));if(c>u+t)return!1;if(n<=l||c<=u)return!0;let f=n-l,h=c-u;return f*f+h*h<=t*t}},qj=w0(),Vj=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]),Gj=class{constructor(e,r=new DC(e.width+200,e.height+200,25),t=new DC(e.width+200,e.height+200,25)){this.transform=e,this.grid=r,this.ignoredGrid=t,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+100,this.screenBottomBoundary=e.height+100,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,r,t,a,i,o,s,l,n,u,c,f,h=0,d=!0){let p=e.anchorPointX+l[0],g=e.anchorPointY+l[1],m=this.projectAndGetPerspectiveRatio(p,g,i,y3(u,p,g,h,d),f),y=t*m.perspectiveRatio,_;if(!o&&!s){let k=m.x+(c?c.x*y:0),T=m.y+(c?c.y*y:0);_={allPointsOccluded:!1,box:[k+e.x1*y,T+e.y1*y,k+e.x2*y,T+e.y2*y]}}else _=this._projectCollisionBox(e,y,a,i,o,s,l,m,u,c,f,h,d);let[v,x,E,M]=_.box,C=o?_.allPointsOccluded:m.isOccluded,w=C;return w||(w=m.perspectiveRatio=1;I--)R.push(F.path[I]);for(let I=1;IL.signedDistanceFromCamera<=0)?[]:I.map(L=>L.point)}let z=[];if(R.length>0){let I=R[0].clone(),L=R[0].clone();for(let B=1;B=b.x&&L.x<=S.x&&I.y>=b.y&&L.y<=S.y?[R]:L.xS.x||L.yS.y?[]:Y5([R],b.x,b.y,S.x,S.y)}for(let I of z){A.reset(I,T*.25);let L=0;L=A.length<=.5*T?1:Math.ceil(A.paddedLength/P)+1;for(let B=0;B=this.screenRightBoundary||a<100||r>this.screenBottomBoundary}isInsideGrid(e,r,t,a){return t>=0&&e=0&&rthis.projectAndGetPerspectiveRatio(R.x,R.y,a,y3(n,R.x,R.y,f,h),c));F=D.some(R=>!R.isOccluded),A=D.map(R=>new zr(R.x,R.y))}else F=!0;return{box:Cce(A),allPointsOccluded:!F}}},LC=class{constructor(e,r,t,a){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?r:-r))):a&&t?1:0,this.placed=t}isHidden(){return this.opacity===0&&!this.placed}},J1=class{constructor(e,r,t,a,i){this.text=new LC(e?e.text:null,r,t,i),this.icon=new LC(e?e.icon:null,r,a,i)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}},FC=class{constructor(e,r,t){this.text=e,this.icon=r,this.skipFade=t}},Hj=class{constructor(e,r,t,a,i){this.bucketInstanceId=e,this.featureIndex=r,this.sourceLayerIndex=t,this.bucketIndex=a,this.tileID=i}},Wj=class{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let r=++this.maxGroupID;this.collisionGroups[e]={ID:r,predicate:t=>t.collisionGroupID===r}}return this.collisionGroups[e]}},$j=class{constructor(e,r,t,a,i){this.transform=e.clone(),this.terrain=r,this.collisionIndex=new Gj(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=t,this.retainedQueryData={},this.collisionGroups=new Wj(a),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=i,i&&(i.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let r=this.terrain;if(r)return(t,a)=>r.getElevation(e,t,a)}getBucketParts(e,r,t,a){let i=t.getBucket(r),o=t.latestFeatureIndex;if(!i||!o||r.id!==i.layerIds[0])return;let s=t.collisionBoxArray,l=i.layers[0].layout,n=i.layers[0].paint,u=2**(this.transform.zoom-t.tileID.overscaledZ),c=t.tileSize/xa,f=t.tileID.toUnwrapped(),h=l.get("text-rotation-alignment")==="map",d=uh(t,1,this.transform.zoom),p=M0(this.collisionIndex.transform,t,n.get("text-translate"),n.get("text-translate-anchor")),g=M0(this.collisionIndex.transform,t,n.get("icon-translate"),n.get("icon-translate-anchor")),m=Hk(h,this.transform,d);this.retainedQueryData[i.bucketInstanceId]=new Hj(i.bucketInstanceId,o,i.sourceLayerIndex,i.index,t.tileID);let y={bucket:i,layout:l,translationText:p,translationIcon:g,unwrappedTileID:f,pitchedLabelPlaneMatrix:m,scale:u,textPixelRatio:c,holdingForFade:t.holdingForSymbolFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:I2(i.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(i.sourceID)};if(a)for(let _ of i.sortKeyRanges){let{sortKey:v,symbolInstanceStart:x,symbolInstanceEnd:E}=_;e.push({sortKey:v,symbolInstanceStart:x,symbolInstanceEnd:E,parameters:y})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:i.symbolInstances.length,parameters:y})}attemptAnchorPlacement(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_,v,x,E){var M,C,w;let k=t3[e.textAnchor],T=[e.textOffset0,e.textOffset1],b=E8(k,t,a,T,i),S=this.collisionIndex.placeCollisionBox(r,f,l,n,u,s,o,g,c.predicate,_,b,v,x,E);if((!y||this.collisionIndex.placeCollisionBox(y,f,l,n,u,s,o,m,c.predicate,_,b,v,x,E).placeable)&&S.placeable){let A;if((M=this.prevPlacement)!=null&&M.variableOffsets[h.crossTileID]&&((w=(C=this.prevPlacement)==null?void 0:C.placements[h.crossTileID])!=null&&w.text)&&(A=this.prevPlacement.variableOffsets[h.crossTileID].anchor),h.crossTileID===0)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[h.crossTileID]={textOffset:T,width:t,height:a,anchor:k,textBoxScale:i,prevAnchor:A},this.markUsedJustification(d,k,h,p),d.allowVerticalPlacement&&(this.markUsedOrientation(d,p,h),this.placedOrientations[h.crossTileID]=p),{shift:b,placedGlyphBoxes:S}}}placeLayerBucketPart(e,r,t){let{bucket:a,layout:i,translationText:o,translationIcon:s,unwrappedTileID:l,pitchedLabelPlaneMatrix:n,textPixelRatio:u,holdingForFade:c,collisionBoxArray:f,partiallyEvaluatedTextSize:h,collisionGroup:d}=e.parameters,p=i.get("text-optional"),g=i.get("icon-optional"),m=O2(i,"text-overlap","text-allow-overlap"),y=m==="always",_=O2(i,"icon-overlap","icon-allow-overlap"),v=_==="always",x=i.get("text-rotation-alignment")==="map",E=i.get("text-pitch-alignment")==="map",M=i.get("icon-text-fit")!=="none",C=i.get("symbol-z-order")==="viewport-y",w=i.get("symbol-height-anchor")==="ground",k=y&&(v||!a.hasIconData()||g),T=v&&(y||!a.hasTextData()||p);!a.collisionArrays&&f&&a.deserializeCollisionBoxes(f);let b=this.retainedQueryData[a.bucketInstanceId].tileID,S=this._getTerrainElevationFunc(b),A=this.transform.getFastPathSimpleProjectionMatrix(b),F=(D,R,P)=>{var z,I;if(r[D.crossTileID])return;if(c){this.placements[D.crossTileID]=new FC(!1,!1,!1);return}let L=D.heightOffset,B=!1,O=!1,G=!0,$=null,X={box:null,placeable:!1,offscreen:null,occluded:!1},Z={box:null,placeable:!1,offscreen:null},J=null,N=null,H=null,W=0,U=0,V=0;R.textFeatureIndex?W=R.textFeatureIndex:D.useRuntimeCollisionCircles&&(W=D.featureIndex),R.verticalTextFeatureIndex&&(U=R.verticalTextFeatureIndex);let j=R.textBox;if(j){let ue=xe=>{let he=1;if(a.allowVerticalPlacement&&!xe&&this.prevPlacement){let oe=this.prevPlacement.placedOrientations[D.crossTileID];oe&&(this.placedOrientations[D.crossTileID]=oe,he=oe,this.markUsedOrientation(a,he,D))}return he},fe=(xe,he)=>{if(a.allowVerticalPlacement&&D.numVerticalGlyphVertices>0&&R.verticalTextBox){for(let oe of a.writingModes)if(oe===2?(X=he(),Z=X):X=xe(),X?.placeable)break}else X=xe()},pe=D.textAnchorOffsetStartIndex,we=D.textAnchorOffsetEndIndex;if(we===pe){let xe=(he,oe)=>{let te=this.collisionIndex.placeCollisionBox(he,m,u,b,l,E,x,o,d.predicate,S,void 0,A,L,w);return te?.placeable&&(this.markUsedOrientation(a,oe,D),this.placedOrientations[D.crossTileID]=oe),te};fe(()=>xe(j,1),()=>{let he=R.verticalTextBox;return a.allowVerticalPlacement&&D.numVerticalGlyphVertices>0&&he?xe(he,2):{box:null,offscreen:null}}),ue(X?.placeable)}else{let xe=t3[(I=(z=this.prevPlacement)==null?void 0:z.variableOffsets[D.crossTileID])==null?void 0:I.anchor],he=(te,ie,ee)=>{let ce=te.x2-te.x1,_e=te.y2-te.y1,Se=D.textBoxScale,Me=M&&_==="never"?ie:null,Ue=null,Ge=m==="never"?1:2,Ze="never";xe&&Ge++;for(let Ke=0;Kehe(j,R.iconBox,1),()=>{let te=R.verticalTextBox,ie=X?.placeable;return a.allowVerticalPlacement&&!ie&&D.numVerticalGlyphVertices>0&&te?he(te,R.verticalIconBox,2):{box:null,occluded:!0,offscreen:null}}),X&&(B=X.placeable,G=X.offscreen);let oe=ue(X?.placeable);if(!B&&this.prevPlacement){let te=this.prevPlacement.variableOffsets[D.crossTileID];te&&(this.variableOffsets[D.crossTileID]=te,this.markUsedJustification(a,te.anchor,D,oe))}}}if(J=X,B=J?.placeable,G=J?.offscreen,D.useRuntimeCollisionCircles&&D.centerJustifiedTextSymbolIndex>=0){let ue=a.text.placedSymbolArray.get(D.centerJustifiedTextSymbolIndex),fe=qE(a.textSizeData,h,ue),pe=i.get("text-padding"),we=D.collisionCircleDiameter;N=this.collisionIndex.placeCollisionCircles(m,ue,a.lineVertexArray,a.glyphOffsetArray,fe,l,n,t,E,d.predicate,we,pe,o,S),N.circles.length&&N.collisionDetected&&!t&&vo("Collisions detected, but collision boxes are not shown"),B=y||N.circles.length>0&&!N.collisionDetected,G&&(G=N.offscreen)}if(R.iconFeatureIndex&&(V=R.iconFeatureIndex),R.iconBox){let ue=fe=>this.collisionIndex.placeCollisionBox(fe,_,u,b,l,E,x,s,d.predicate,S,M&&$?$:void 0,A,L,w);Z&&Z.placeable&&R.verticalIconBox?(H=ue(R.verticalIconBox),O=H.placeable):(H=ue(R.iconBox),O=H.placeable),G&&(G=H.offscreen)}let q=p||D.numHorizontalGlyphVertices===0&&D.numVerticalGlyphVertices===0,Y=g||D.numIconVertices===0;!q&&!Y?O=B=O&&B:Y?q||O&&(O=B):B=O&&B;let K=B&&J.placeable,re=O&&H.placeable;if(K&&(Z&&Z.placeable&&U?this.collisionIndex.insertCollisionBox(J.box,m,i.get("text-ignore-placement"),a.bucketInstanceId,U,d.ID):this.collisionIndex.insertCollisionBox(J.box,m,i.get("text-ignore-placement"),a.bucketInstanceId,W,d.ID)),re&&this.collisionIndex.insertCollisionBox(H.box,_,i.get("icon-ignore-placement"),a.bucketInstanceId,V,d.ID),N&&B&&this.collisionIndex.insertCollisionCircles(N.circles,m,i.get("text-ignore-placement"),a.bucketInstanceId,W,d.ID),t&&this.storeCollisionData(a.bucketInstanceId,P,R,J,H,N),D.crossTileID===0)throw Error("symbolInstance.crossTileID can't be 0");if(a.bucketInstanceId===0)throw Error("bucket.bucketInstanceId can't be 0");let se=(B||k)&&!J?.occluded,le=(O||T)&&!H?.occluded;this.placements[D.crossTileID]=new FC(se,le,G||a.justReloaded),r[D.crossTileID]=!0};if(C){if(e.symbolInstanceStart!==0)throw Error("bucket.bucketInstanceId should be 0");let D=a.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let R=D.length-1;R>=0;--R){let P=D[R];F(a.symbolInstances.get(P),a.collisionArrays[P],P)}}else for(let D=e.symbolInstanceStart;D=0&&(o>=0&&l!==o?e.text.placedSymbolArray.get(l).crossTileID=0:e.text.placedSymbolArray.get(l).crossTileID=t.crossTileID)}markUsedOrientation(e,r,t){let a=r===1||r===3?r:0,i=r===2?r:0,o=[t.leftJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.rightJustifiedTextSymbolIndex];for(let s of o)e.text.placedSymbolArray.get(s).placedOrientation=a;t.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(t.verticalPlacedTextSymbolIndex).placedOrientation=i)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let r=this.prevPlacement,t=!1;this.prevZoomAdjustment=r?r.zoomAdjustment(this.transform.zoom):0;let a=r?r.symbolFadeChange(e):1,i=r?r.opacities:{},o=r?r.variableOffsets:{},s=r?r.placedOrientations:{};for(let l in this.placements){let n=this.placements[l],u=i[l];u?(this.opacities[l]=new J1(u,a,n.text,n.icon),t||(t=n.text!==u.text.placed),t||(t=n.icon!==u.icon.placed)):(this.opacities[l]=new J1(null,a,n.text,n.icon,n.skipFade),t||(t=n.text||n.icon))}for(let l in i){let n=i[l];if(!this.opacities[l]){let u=new J1(n,a,!1,!1);u.isHidden()||(this.opacities[l]=u,t||(t=n.text.placed),t||(t=n.icon.placed))}}for(let l in o)!this.variableOffsets[l]&&this.opacities[l]&&!this.opacities[l].isHidden()&&(this.variableOffsets[l]=o[l]);for(let l in s)!this.placedOrientations[l]&&this.opacities[l]&&!this.opacities[l].isHidden()&&(this.placedOrientations[l]=s[l]);if(r&&r.lastPlacementChangeTime===void 0)throw Error("Last placement time for previous placement is not defined");t?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=r?r.lastPlacementChangeTime:e)}updateLayerOpacities(e,r){let t={};for(let a of r){let i=a.getBucket(e);i&&a.latestFeatureIndex&&e.id===i.layerIds[0]&&this.updateBucketOpacities(i,a.tileID,t,a.collisionBoxArray)}}updateBucketOpacities(e,r,t,a){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let i=e.layers[0],o=i.layout,s=new J1(null,0,!1,!1,!0),l=o.get("text-allow-overlap"),n=o.get("icon-allow-overlap"),u=i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"),c=o.get("text-rotation-alignment")==="map",f=o.get("text-pitch-alignment")==="map",h=o.get("icon-text-fit")!=="none",d=new J1(null,0,l&&(n||!e.hasIconData()||o.get("icon-optional")),n&&(l||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&a&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(a);let p=(m,y,_)=>{for(let v=0;v0||v>0,w=y.numIconVertices>0,k=this.placedOrientations[y.crossTileID],T=k===2,b=k===1||k===3;if(C){let A=k8(M.text),F=T?Q1:A;p(e.text,_,F);let D=b?Q1:A;p(e.text,v,D);let R=M.text.isHidden(),P=[y.rightJustifiedTextSymbolIndex,y.centerJustifiedTextSymbolIndex,y.leftJustifiedTextSymbolIndex];for(let L of P)L>=0&&(e.text.placedSymbolArray.get(L).hidden=R||T?1:0);y.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(y.verticalPlacedTextSymbolIndex).hidden=R||b?1:0);let z=this.variableOffsets[y.crossTileID];z&&this.markUsedJustification(e,z.anchor,y,k);let I=this.placedOrientations[y.crossTileID];I&&(this.markUsedJustification(e,"left",y,I),this.markUsedOrientation(e,I,y))}if(w){let A=k8(M.icon),F=!(h&&y.verticalPlacedIconSymbolIndex&&T);if(y.placedIconSymbolIndex>=0){let D=F?A:Q1;p(e.icon,y.numIconVertices,D),e.icon.placedSymbolArray.get(y.placedIconSymbolIndex).hidden=M.icon.isHidden()}if(y.verticalPlacedIconSymbolIndex>=0){let D=F?Q1:A;p(e.icon,y.numVerticalIconVertices,D),e.icon.placedSymbolArray.get(y.verticalPlacedIconSymbolIndex).hidden=M.icon.isHidden()}}let S=g?.has(m)?g.get(m):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let A=e.collisionArrays[m];if(A){let F=new zr(0,0);if(A.textBox||A.verticalTextBox){let D=!0;if(u){let R=this.variableOffsets[x];R?(F=E8(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),c&&F._rotate(f?-this.transform.bearingInRadians:this.transform.bearingInRadians)):D=!1}if(A.textBox||A.verticalTextBox){let R;A.textBox&&(R=T),A.verticalTextBox&&(R=b),S8(e.textCollisionBox.collisionVertexArray,M.text.placed,!D||R,S.text,F.x,F.y)}}if(A.iconBox||A.verticalIconBox){let D=!(b||!A.verticalIconBox),R;A.iconBox&&(R=D),A.verticalIconBox&&(R=!D),S8(e.iconCollisionBox.collisionVertexArray,M.icon.placed,R,S.icon,h?F.x:0,h?F.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}},Yj=2**25,Xj=2**24,Zj=2**17,Kj=2**16,Q1=0,Jj=class{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,r,t,a,i){let o=this._bucketParts;for(;this._currentTileIndexs.sortKey-l.sortKey));this._currentPartIndex!this._forceFullPlacement&&is()-a>2;for(;this._currentPlacementIndex>=0;){let o=r[e[this._currentPlacementIndex]],s=this.placement.collisionIndex.transform.zoom;if(wk(o)&&o.layout&&(!o.minzoom||o.minzoom<=s)&&(!o.maxzoom||o.maxzoom>s)){if(this._inProgressLayer||(this._inProgressLayer=new Jj(o)),this._inProgressLayer.continuePlacement(t[o.source],this.placement,this._showCollisionBoxes,o,i))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}},PC=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ol=new Uint32Array(96),eU=class MQ{static from(r){if(!r||r.byteLength===void 0||r.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[t,a]=new Uint8Array(r,0,2);if(t!==219)throw Error("Data does not appear to be in a KDBush format.");let i=a>>4;if(i!==1)throw Error(`Got v${i} data when expected v1.`);let o=PC[a&15];if(!o)throw Error("Unrecognized array type.");let[s]=new Uint16Array(r,2,1),[l]=new Uint32Array(r,4,1);return new MQ(l,s,o,void 0,r)}constructor(r,t=64,a=Float64Array,i=ArrayBuffer,o){if(isNaN(r)||r<0)throw Error(`Unexpected numItems value: ${r}.`);this.numItems=+r,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=a,this.IndexArrayType=r<65536?Uint16Array:Uint32Array;let s=PC.indexOf(this.ArrayType),l=r*2*this.ArrayType.BYTES_PER_ELEMENT,n=r*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-n%8)%8;if(s<0)throw Error(`Unexpected typed array class: ${a}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,8,r),this.coords=new a(o,8+n+u,r*2),this._pos=r*2,this._finished=!0;else{let c=this.data=new i(8+l+n+u);this.ids=new this.IndexArrayType(c,8,r),this.coords=new a(c,8+n+u,r*2),this._pos=0,this._finished=!1,new Uint8Array(c,0,2).set([219,16+s]),new Uint16Array(c,2,1)[0]=t,new Uint32Array(c,4,1)[0]=r}}add(r,t){let a=this._pos>>1;return this.ids[a]=a,this.coords[this._pos++]=r,this.coords[this._pos++]=t,a}finish(){let r=this._pos>>1;if(r!==this.numItems)throw Error(`Added ${r} items when expected ${this.numItems}.`);return Kk(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(r,t,a,i){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:o,coords:s,nodeSize:l}=this;ol[0]=0,ol[1]=o.length-1,ol[2]=0;let n=3,u=[];for(;n>0;){let c=ol[--n],f=ol[--n],h=ol[--n];if(f-h<=l){for(let m=h;m<=f;m++){let y=s[2*m],_=s[2*m+1];y>=r&&y<=a&&_>=t&&_<=i&&u.push(o[m])}continue}let d=h+f>>1,p=s[2*d],g=s[2*d+1];p>=r&&p<=a&&g>=t&&g<=i&&u.push(o[d]),(c===0?r<=p:t<=g)&&(ol[n++]=h,ol[n++]=d-1,ol[n++]=1-c),(c===0?a>=p:i>=g)&&(ol[n++]=d+1,ol[n++]=f,ol[n++]=1-c)}return u}within(r,t,a){let i=[];return this.withinInto(r,t,a,i),i}withinInto(r,t,a,i){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:o,coords:s,nodeSize:l}=this;ol[0]=0,ol[1]=o.length-1,ol[2]=0;let n=3,u=0,c=a*a;for(;n>0;){let f=ol[--n],h=ol[--n],d=ol[--n];if(h-d<=l){for(let y=d;y<=h;y++)D8(s[2*y],s[2*y+1],r,t)<=c&&(i[u++]=o[y]);continue}let p=d+h>>1,g=s[2*p],m=s[2*p+1];D8(g,m,r,t)<=c&&(i[u++]=o[p]),(f===0?r-a<=g:t-a<=m)&&(ol[n++]=d,ol[n++]=p-1,ol[n++]=1-f),(f===0?r+a>=g:t+a>=m)&&(ol[n++]=p+1,ol[n++]=h,ol[n++]=1-f)}return u}},eg=512/xa/2,tU=class{constructor(e,r,t){this.tileID=e,this.bucketInstanceId=t,this._symbolsByKey={};let a=new Map;for(let i=0;i({x:Math.floor(l.anchorX*eg),y:Math.floor(l.anchorY*eg)})),crossTileIDs:o.map(l=>l.crossTileID)};if(s.positions.length>128){let l=new eU(s.positions.length,16,Uint16Array);for(let{x:n,y:u}of s.positions)l.add(n,u);l.finish(),delete s.positions,s.index=l}this._symbolsByKey[i]=s}}getScaledCoordinates(e,r){let{x:t,y:a,z:i}=this.tileID.canonical,{x:o,y:s,z:l}=r.canonical,n=l-i,u=eg/2**n,c=(o*xa+e.anchorX)*u,f=(s*xa+e.anchorY)*u,h=t*xa*eg,d=a*xa*eg;return{x:Math.floor(c-h),y:Math.floor(f-d)}}findMatches(e,r,t){let a=this.tileID.canonical.ze)}},rU=class{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}},aU=class{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let r=Math.round((e-this.lng)/360);if(r!==0)for(let t in this.indexes){let a=this.indexes[t],i={};for(let o in a){let s=a[o];s.tileID=s.tileID.unwrapTo(s.tileID.wrap+r),i[s.tileID.key]=s}this.indexes[t]=i}this.lng=e}addBucket(e,r,t){var a,i,o;if((a=this.indexes[e.overscaledZ])!=null&&a[e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===r.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let l=0;le.overscaledZ)for(let u in n){let c=n[u];c.tileID.isChildOf(e)&&c.findMatches(r.symbolInstances,e,s)}else{let u=n[e.scaledTo(Number(l)).key];u&&u.findMatches(r.symbolInstances,e,s)}}for(let l=0;l> 1u)/127.0,float(packedOpacity & 1u));}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;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c );} #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; +uniform sampler2D u_terrain;uniform highp sampler2D u_depth;layout(std140) uniform TerrainUBO {highp mat4 u_terrain_matrix;highp vec4 u_terrain_unpack;highp float u_terrain_dim;highp float u_terrain_exaggeration;}; #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 @@ -2752,9 +2803,9 @@ vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1. #else return 1.0; #endif -}float ele(vec2 pos) { +}float ele(ivec2 pos) { #ifdef TERRAIN3D -vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; +vec4 rgb=(texelFetch(u_terrain,pos,0)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; #else return 0.0; #endif @@ -2763,59 +2814,57 @@ return 0.0; #ifdef GLOBE if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} #endif -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; +vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+2.0;vec2 f=fract(coord);ivec2 c=ivec2(floor(coord));ivec2 hi=textureSize(u_terrain,0)-1;float tl=ele(clamp(c,ivec2(0),hi));float tr=ele(clamp(c+ivec2(1,0),ivec2(0),hi));float bl=ele(clamp(c+ivec2(0,1),ivec2(0),hi));float br=ele(clamp(c+ivec2(1,1),ivec2(0),hi));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 -}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:jn("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:jn("",`#define GLOBE_RADIUS 6371008.8 -uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos -);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); -if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len -);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:jn(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; +}const float PI=3.141592653589793; +#define PROJECTION_UBO +layout(std140) uniform ProjectionUBO {highp mat4 u_projection_matrix;highp mat4 u_projection_fallback_matrix;highp vec4 u_projection_tile_mercator_coords;highp vec4 u_projection_clipping_plane;highp float u_projection_transition;highp int u_projection_clip_antimeridian;};layout(std140) uniform FrameUBO {highp vec2 u_units_to_pixels;highp vec2 u_world_size;highp float u_camera_to_center_distance;highp float u_symbol_fade_change;highp float u_aspect_ratio;highp float u_device_pixel_ratio;highp vec2 u_viewport_size;highp vec2 u_pixel_extrude_scale;highp float u_pitch;};`,oU=`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:jn(`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;in vec2 v_pos_a;in 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; +}`,sU="layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}",lU=`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;in vec2 v_pos_a;in 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,"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;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);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:jn(`in vec3 v_data;in 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 +}`,uU="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;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);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);}",cU=`in vec3 v_data;flat in float v_visibility; +#pragma maplibre: define highp vec4 color +#pragma maplibre: define mediump float radius +#pragma maplibre: define lowp float blur +#pragma maplibre: define lowp float opacity +#pragma maplibre: define highp vec4 stroke_color +#pragma maplibre: define mediump float stroke_width +#pragma maplibre: define lowp float stroke_opacity +void main() { +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize mediump float radius +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize highp vec4 stroke_color +#pragma maplibre: initialize mediump float stroke_width +#pragma maplibre: 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));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out 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 +}`,fU=`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform vec2 u_translate;layout(location=0) in ivec2 a_pos;out vec3 v_data;flat out float v_visibility; +#pragma maplibre: define highp vec4 color +#pragma maplibre: define mediump float radius +#pragma maplibre: define lowp float blur +#pragma maplibre: define lowp float opacity +#pragma maplibre: define highp vec4 stroke_color +#pragma maplibre: define mediump float stroke_width +#pragma maplibre: 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 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize mediump float radius +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize highp vec4 stroke_color +#pragma maplibre: initialize mediump float stroke_width +#pragma maplibre: initialize lowp float stroke_opacity +ivec2 pos_raw=a_pos+32768;vec2 extrude=vec2(pos_raw & 7)/7.0*2.0-1.0;vec2 circle_center=vec2(pos_raw >> 3)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { #ifdef GLOBE vec3 center_vector=projectToSphere(circle_center); #endif @@ -2831,71 +2880,78 @@ vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vect #else gl_Position=projectTileWithElevation(corner_position,ele); #endif -} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}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:jn(fn,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:jn(`uniform highp float u_intensity;in vec2 v_extrude; -#pragma mapbox: define highp float weight +} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}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);}`,RC="void main() {fragColor=vec4(1.0);}",Hd={prelude:qo(iU,nU),projectionMercator:qo(` +void clipAntimeridian() {}`,"float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:qo("in highp float v_projection_tile_x;void clipAntimeridian() {if (u_projection_clip_antimeridian !=0 && (v_projection_tile_x < 0.0 || v_projection_tile_x >=8192.0)) {discard;}}",`#define GLOBE_RADIUS 6371008.8 +#ifndef PROJECTION_UBO +uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix; +#endif +out highp float v_projection_tile_x;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos +);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float t=exp(PI-(mercator_pos_y*PI*2.0));return (2.0*t)/(t*t+1.0);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;float spherical_x=mercator_pos.x*PI*2.0+PI;float t=exp(PI-(mercator_pos.y*PI*2.0));float t2=t*t;float denom=t2+1.0;float sin_sy=(t2-1.0)/denom;float cos_sy=(2.0*t)/denom;vec3 pos=vec3(sin(spherical_x)*cos_sy,sin_sy,cos(spherical_x)*cos_sy +);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:qo(oU,sU),backgroundPattern:qo(lU,uU),circle:qo(cU,fU),clippingMask:qo(RC,"layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:qo(`uniform highp float u_intensity;in vec2 v_extrude; +#pragma maplibre: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { -#pragma mapbox: initialize highp float weight +#pragma maplibre: 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);fragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude; -#pragma mapbox: define highp float weight -#pragma mapbox: define mediump float radius +}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;layout(location=0) in ivec2 a_pos;out vec2 v_extrude; +#pragma maplibre: define highp float weight +#pragma maplibre: 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 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.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;vec2 circle_center=floor(pos_raw/8.0); +#pragma maplibre: initialize highp float weight +#pragma maplibre: initialize mediump float radius +ivec2 pos_raw=a_pos+32768;vec2 unscaled_extrude=vec2(pos_raw & 7)/7.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;vec2 circle_center=vec2(pos_raw >> 3); #ifdef GLOBE vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); #else gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); #endif -}`),heatmapTexture:jn(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; +}`),heatmapTexture:qo(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(0.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out 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:jn("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;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:jn("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;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);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {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;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:jn(`#ifdef GL_ES +}`,"uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world_size,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:qo("flat in float v_placed;flat in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","layout(location=0) in vec2 a_anchor_pos;layout(location=1) in vec2 a_placed;layout(location=2) in vec2 a_box_real;flat out float v_placed;flat out float v_notUsed;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:qo("flat in float v_radius;in vec2 v_extrude;flat in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;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);fragColor=color*alpha*opacity_t;}","layout(location=0) in vec2 a_pos;layout(location=1) in float a_radius;layout(location=2) in vec2 a_flags;flat out float v_radius;out vec2 v_extrude;flat out float v_collision;void main() {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;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:qo(`#ifdef GL_ES precision highp float; #endif -uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else +uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {vec4 data=texelFetch(u_elevation_stops,ivec2(stop,0),0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else {l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0)); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:jn("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:jn(fn,`in vec2 a_pos;void main() { +}`,"uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=2.0/u_dimension;float scale=(u_dimension.x-4.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:qo("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","layout(location=0) in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:qo(RC,`layout(location=0) in vec2 a_pos;void main() { #ifdef GLOBE gl_Position=projectTileFor3D(a_pos,0.0); #else gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); #endif -}`),fill:jn(`#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity +}`),fill:qo(`#pragma maplibre: define highp vec4 color +#pragma maplibre: define lowp float opacity void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize lowp float opacity fragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec2 u_fill_translate;in vec2 a_pos; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity +}`,`uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos; +#pragma maplibre: define highp vec4 color +#pragma maplibre: define lowp float opacity void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:jn(`in vec2 v_pos; +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize lowp float opacity +if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:qo(`in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity +#pragma maplibre: define highp vec4 outline_color +#pragma maplibre: define lowp float opacity void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity +#pragma maplibre: initialize highp vec4 outline_color +#pragma maplibre: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} @@ -2903,106 +2959,114 @@ if (v_depth > 1.0) {discard;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; +}`,`uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity +#pragma maplibre: define highp vec4 outline_color +#pragma maplibre: define lowp float opacity void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#pragma maplibre: initialize highp vec4 outline_color +#pragma maplibre: initialize lowp float opacity +if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world_size; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif -}`),fillOutlinePattern:jn(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; +}`),fillOutlinePattern:qo(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;uniform bool u_sdf_pattern;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to +#pragma maplibre: define lowp float opacity +#pragma maplibre: define highp vec4 color +#pragma maplibre: define lowp vec4 pattern_from +#pragma maplibre: 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=texture(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=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity; +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize mediump vec4 pattern_from +#pragma maplibre: 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=texture(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=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*alpha*opacity;} else {fragColor=mix(color1,color2,u_fade)*alpha*opacity;} #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif -#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=projectTile(a_pos+u_fill_translate,a_pos);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; +#pragma maplibre: define lowp float opacity +#pragma maplibre: define highp vec4 color +#pragma maplibre: define lowp vec4 pattern_from +#pragma maplibre: define lowp vec4 pattern_to +#pragma maplibre: define lowp float pixel_ratio_from +#pragma maplibre: define lowp float pixel_ratio_to +void main() { +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize mediump vec4 pattern_from +#pragma maplibre: initialize mediump vec4 pattern_to +#pragma maplibre: initialize lowp float pixel_ratio_from +#pragma maplibre: initialize lowp float pixel_ratio_to +if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}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=projectTile(a_pos+u_fill_translate,a_pos);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_size; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif -}`),fillPattern:jn(`#ifdef GL_ES +}`),fillPattern:qo(`#ifdef GL_ES precision highp float; #endif -uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity; +uniform vec2 u_texsize;uniform float u_fade;uniform bool u_sdf_pattern;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; +#pragma maplibre: define lowp float opacity +#pragma maplibre: define highp vec4 color +#pragma maplibre: define lowp vec4 pattern_from +#pragma maplibre: define lowp vec4 pattern_to +void main() { +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize mediump vec4 pattern_from +#pragma maplibre: 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=texture(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=texture(u_image,pos2);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*opacity;} else {fragColor=mix(color1,color2,u_fade)*opacity;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out 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=projectTile(a_pos+u_fill_translate,a_pos);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:jn(`in vec4 v_color;void main() {fragColor=v_color; +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; +#pragma maplibre: define lowp float opacity +#pragma maplibre: define highp vec4 color +#pragma maplibre: define lowp vec4 pattern_from +#pragma maplibre: define lowp vec4 pattern_to +#pragma maplibre: define lowp float pixel_ratio_from +#pragma maplibre: define lowp float pixel_ratio_to +void main() { +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize mediump vec4 pattern_from +#pragma maplibre: initialize mediump vec4 pattern_to +#pragma maplibre: initialize lowp float pixel_ratio_from +#pragma maplibre: initialize lowp float pixel_ratio_to +if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}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=projectTile(a_pos+u_fill_translate,a_pos);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:qo(`in vec4 v_color;void main() {fragColor=v_color; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed; +}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed; #ifdef TERRAIN3D -in vec2 a_centroid; +layout(location=2) in vec2 a_centroid; #endif out 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; +#pragma maplibre: define highp float base +#pragma maplibre: define highp float height +#pragma maplibre: define highp vec4 color +void main() { +#pragma maplibre: initialize highp float base +#pragma maplibre: initialize highp float height +#pragma maplibre: initialize highp vec4 color +vec3 normal=vec3(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);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else @@ -3012,67 +3076,67 @@ float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0 #ifdef GLOBE mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); #endif -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:jn(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in 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 +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:qo(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; +#pragma maplibre: define lowp float base +#pragma maplibre: define lowp float height +#pragma maplibre: define lowp vec4 pattern_from +#pragma maplibre: define lowp vec4 pattern_to +#pragma maplibre: define lowp float pixel_ratio_from +#pragma maplibre: define lowp float pixel_ratio_to +void main() { +#pragma maplibre: initialize lowp float base +#pragma maplibre: initialize lowp float height +#pragma maplibre: initialize mediump vec4 pattern_from +#pragma maplibre: initialize mediump vec4 pattern_to +#pragma maplibre: initialize lowp float pixel_ratio_from +#pragma maplibre: 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=texture(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=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`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 vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed; +}`,`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 vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed; #ifdef TERRAIN3D -in vec2 a_centroid; +layout(location=2) in vec2 a_centroid; #endif #ifdef GLOBE out vec3 v_sphere_pos; #endif out vec2 v_pos_a;out vec2 v_pos_b;out 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; +#pragma maplibre: define lowp float base +#pragma maplibre: define lowp float height +#pragma maplibre: define lowp vec4 pattern_from +#pragma maplibre: define lowp vec4 pattern_to +#pragma maplibre: define lowp float pixel_ratio_from +#pragma maplibre: define lowp float pixel_ratio_to +void main() { +#pragma maplibre: initialize lowp float base +#pragma maplibre: initialize lowp float height +#pragma maplibre: initialize mediump vec4 pattern_from +#pragma maplibre: initialize mediump vec4 pattern_to +#pragma maplibre: initialize lowp float pixel_ratio_from +#pragma maplibre: 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=vec3(a_normal_ed.xyz);float edgedistance=float(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 elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); #endif -vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +vec2 pos=a_normal_ed.x==1 && a_normal_ed.y==0 && a_normal_ed.z==16384 ? a_pos -: vec2(edgedistance,elevation*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:jn(`#ifdef GL_ES +: vec2(edgedistance,elevation*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:qo(`#ifdef GL_ES precision highp float; #endif -uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;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))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); +uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(ivec2 texel) {vec4 data=texelFetch(u_image,texel,0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {ivec2 pos=ivec2(gl_FragCoord.xy)+ivec2(1);float tileSize=u_dimension.x-4.0;float a=getElevation(pos+ivec2(-1,-1));float b=getElevation(pos+ivec2(0,-1));float c=getElevation(pos+ivec2(1,-1));float d=getElevation(pos+ivec2(-1,0));float e=getElevation(pos);float f=getElevation(pos+ivec2(1,0));float g=getElevation(pos+ivec2(-1,1));float h=getElevation(pos+ivec2(0,1));float i=getElevation(pos+ivec2(1,1));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))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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:jn(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;layout(location=1) in vec2 a_texture_pos;out 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:qo(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; #define PI 3.141592653589793 #define STANDARD 0 #define COMBINED 1 @@ -3081,22 +3145,22 @@ fragColor=vec4(1.0); #define BASIC 4 float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;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_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else {fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else -{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} +{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec2 size=vec2(textureSize(u_image,0));vec2 texturePos=(v_pos*(size-2.0)+1.0)/size;vec4 pixel=texture(u_image,texturePos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:jn(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; +}`,"uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:qo(`flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity +#pragma maplibre: define highp vec4 color +#pragma maplibre: define lowp float blur +#pragma maplibre: 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);fragColor=color*(alpha*opacity); +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +clipAntimeridian();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);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif @@ -3105,24 +3169,24 @@ fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 -in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; +layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; #ifdef GLOBE out float v_depth; #endif -#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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#pragma maplibre: define highp vec4 color +#pragma maplibre: define lowp float blur +#pragma maplibre: define lowp float opacity +#pragma maplibre: define mediump float gapwidth +#pragma maplibre: define lowp float offset +#pragma maplibre: define mediump float width +void main() { +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize mediump float gapwidth +#pragma maplibre: initialize lowp float offset +#pragma maplibre: initialize mediump float width +if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);v_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*2.0;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif @@ -3131,16 +3195,16 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),lineGradient:jn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; +v_width2=vec2(outset,inset);}`),lineGradient:qo(`uniform sampler2D u_image;flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity +#pragma maplibre: define lowp float blur +#pragma maplibre: 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=texture(u_image,v_uv);fragColor=color*(alpha*opacity); +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +clipAntimeridian();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=texture(u_image,v_uv);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif @@ -3149,22 +3213,22 @@ fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 -in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; +layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; #ifdef GLOBE out float v_depth; #endif -#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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#pragma maplibre: define lowp float blur +#pragma maplibre: define lowp float opacity +#pragma maplibre: define mediump float gapwidth +#pragma maplibre: define lowp float offset +#pragma maplibre: define mediump float width +void main() { +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize mediump float gapwidth +#pragma maplibre: initialize lowp float offset +#pragma maplibre: initialize mediump float width +if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);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=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif @@ -3173,27 +3237,27 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),linePattern:jn(`#ifdef GL_ES +v_width2=vec2(outset,inset);}`),linePattern:qo(`#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;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width; +uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;flat in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;flat in float v_width; #ifdef GLOBE in float v_depth; #endif -#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(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; +#pragma maplibre: define lowp vec4 pattern_from +#pragma maplibre: define lowp vec4 pattern_to +#pragma maplibre: define lowp float pixel_ratio_from +#pragma maplibre: define lowp float pixel_ratio_to +#pragma maplibre: define lowp float blur +#pragma maplibre: define lowp float opacity +void main() { +#pragma maplibre: initialize mediump vec4 pattern_from +#pragma maplibre: initialize mediump vec4 pattern_to +#pragma maplibre: initialize lowp float pixel_ratio_from +#pragma maplibre: initialize lowp float pixel_ratio_to +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +clipAntimeridian();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(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif @@ -3203,32 +3267,32 @@ fragColor=vec4(1.0); }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width; +layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;flat out float v_width; #ifdef GLOBE out float v_depth; #endif -#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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#pragma maplibre: define lowp float blur +#pragma maplibre: define lowp float opacity +#pragma maplibre: define lowp float offset +#pragma maplibre: define mediump float gapwidth +#pragma maplibre: define mediump float width +#pragma maplibre: define lowp float floorwidth +#pragma maplibre: define lowp vec4 pattern_from +#pragma maplibre: define lowp vec4 pattern_to +#pragma maplibre: define lowp float pixel_ratio_from +#pragma maplibre: define lowp float pixel_ratio_to +void main() { +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize lowp float offset +#pragma maplibre: initialize mediump float gapwidth +#pragma maplibre: initialize mediump float width +#pragma maplibre: initialize lowp float floorwidth +#pragma maplibre: initialize mediump vec4 pattern_from +#pragma maplibre: initialize mediump vec4 pattern_to +#pragma maplibre: initialize lowp float pixel_ratio_from +#pragma maplibre: initialize lowp float pixel_ratio_to +if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif @@ -3237,26 +3301,26 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.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:jn(`uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:qo(`uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif -#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 -#pragma mapbox: define mediump vec4 dasharray_from -#pragma mapbox: define mediump vec4 dasharray_to -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 -#pragma mapbox: initialize mediump vec4 dasharray_from -#pragma mapbox: initialize mediump vec4 dasharray_to -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=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); +#pragma maplibre: define highp vec4 color +#pragma maplibre: define lowp float blur +#pragma maplibre: define lowp float opacity +#pragma maplibre: define mediump float width +#pragma maplibre: define lowp float floorwidth +#pragma maplibre: define mediump vec4 dasharray_from +#pragma maplibre: define mediump vec4 dasharray_to +void main() { +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize mediump float width +#pragma maplibre: initialize lowp float floorwidth +#pragma maplibre: initialize mediump vec4 dasharray_from +#pragma maplibre: initialize mediump vec4 dasharray_to +clipAntimeridian();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=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif @@ -3266,30 +3330,30 @@ fragColor=vec4(1.0); }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; +layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; #ifdef GLOBE out float v_depth; #endif -#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 -#pragma mapbox: define mediump vec4 dasharray_from -#pragma mapbox: define mediump vec4 dasharray_to -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 -#pragma mapbox: initialize mediump vec4 dasharray_from -#pragma mapbox: initialize mediump vec4 dasharray_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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#pragma maplibre: define highp vec4 color +#pragma maplibre: define lowp float blur +#pragma maplibre: define lowp float opacity +#pragma maplibre: define mediump float gapwidth +#pragma maplibre: define lowp float offset +#pragma maplibre: define mediump float width +#pragma maplibre: define lowp float floorwidth +#pragma maplibre: define mediump vec4 dasharray_from +#pragma maplibre: define mediump vec4 dasharray_to +void main() { +#pragma maplibre: initialize highp vec4 color +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize mediump float gapwidth +#pragma maplibre: initialize lowp float offset +#pragma maplibre: initialize mediump float width +#pragma maplibre: initialize lowp float floorwidth +#pragma maplibre: initialize mediump vec4 dasharray_from +#pragma maplibre: initialize mediump vec4 dasharray_to +if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif @@ -3298,24 +3362,24 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:jn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:qo(`uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -#pragma mapbox: define mediump vec4 dasharray_from -#pragma mapbox: define mediump vec4 dasharray_to -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -#pragma mapbox: initialize mediump vec4 dasharray_from -#pragma mapbox: initialize mediump vec4 dasharray_to -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=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); +#pragma maplibre: define lowp float blur +#pragma maplibre: define lowp float opacity +#pragma maplibre: define mediump float width +#pragma maplibre: define lowp float floorwidth +#pragma maplibre: define mediump vec4 dasharray_from +#pragma maplibre: define mediump vec4 dasharray_to +void main() { +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize mediump float width +#pragma maplibre: initialize lowp float floorwidth +#pragma maplibre: initialize mediump vec4 dasharray_from +#pragma maplibre: initialize mediump vec4 dasharray_to +clipAntimeridian();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=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif @@ -3325,28 +3389,28 @@ fragColor=vec4(1.0); }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; +layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; #ifdef GLOBE out float v_depth; #endif -#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 -#pragma mapbox: define mediump vec4 dasharray_from -#pragma mapbox: define mediump vec4 dasharray_to -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 -#pragma mapbox: initialize lowp float floorwidth -#pragma mapbox: initialize mediump vec4 dasharray_from -#pragma mapbox: initialize mediump vec4 dasharray_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;float texel_height=1.0/u_image_height;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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#pragma maplibre: define lowp float blur +#pragma maplibre: define lowp float opacity +#pragma maplibre: define mediump float gapwidth +#pragma maplibre: define lowp float offset +#pragma maplibre: define mediump float width +#pragma maplibre: define lowp float floorwidth +#pragma maplibre: define mediump vec4 dasharray_from +#pragma maplibre: define mediump vec4 dasharray_to +void main() { +#pragma maplibre: initialize lowp float blur +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize mediump float gapwidth +#pragma maplibre: initialize lowp float offset +#pragma maplibre: initialize mediump float width +#pragma maplibre: initialize lowp float floorwidth +#pragma maplibre: initialize mediump vec4 dasharray_from +#pragma maplibre: initialize mediump vec4 dasharray_to +if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif @@ -3355,75 +3419,79 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),raster:jn(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in 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=texture(u_image0,v_pos0);vec4 color1=texture(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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),layerOpacity:qo(`uniform sampler2D u_image;uniform float u_opacity;in vec2 v_pos;void main() {fragColor=texture(u_image,v_pos)*u_opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(0.0); +#endif +}`,"layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=vec4(a_pos.x*2.0-1.0,1.0-a_pos.y*2.0,0.0,1.0);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),raster:qo(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec3 v_pos0;in vec3 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=texture(u_image0,v_pos0.xy/v_pos0.z);vec4 color1=texture(u_image1,v_pos1.xy/v_pos1.z);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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5; +}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec3 u_image_warp;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;layout(location=0) in vec2 a_pos;out vec3 v_pos0;out vec3 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 topLeft=u_coords_top.xy;vec2 topRight=u_coords_top.zw;vec2 bottomLeft=u_coords_bottom.xy;vec2 bottomRight=u_coords_bottom.zw;vec2 bilinearPos=mix(mix(topLeft,topRight,fractionalPos.x),mix(bottomLeft,bottomRight,fractionalPos.x),fractionalPos.y);float denominator=dot(u_image_warp.xy,fractionalPos)+1.0;vec2 acrossTop=topRight-topLeft+u_image_warp.x*topRight;vec2 downLeft=bottomLeft-topLeft+u_image_warp.y*bottomLeft;vec2 projectivePos=(acrossTop*fractionalPos.x+downLeft*fractionalPos.y+topLeft)/denominator;vec2 position=mix(projectivePos,bilinearPos,u_image_warp.z);gl_Position=projectTile(position,position);vec2 texturePos=((fractionalPos-0.5)/u_buffer_scale)+0.5; #ifdef GLOBE -if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} +if (a_pos.y <-32767.5) {texturePos.y=0.0;}if (a_pos.y > 32766.5) {texturePos.y=1.0;} #endif -v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:jn(`uniform sampler2D u_texture;in vec2 v_tex;in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; +float perspectiveRatio=mix(1.0/denominator,1.0,u_image_warp.z);v_pos0=vec3(texturePos*perspectiveRatio,perspectiveRatio);vec2 parentPos=(texturePos*u_scale_parent)+u_tl_parent;v_pos1=vec3(parentPos*perspectiveRatio,perspectiveRatio);}`),symbolIcon:qo(`uniform sampler2D u_texture;in vec2 v_tex;flat in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_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;out vec2 v_tex;out float v_total_opacity; -#pragma mapbox: define lowp float opacity +}`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;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 bool u_rotate_symbol;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;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_tex;flat out float v_total_opacity; +#pragma maplibre: 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);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_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +#pragma maplibre: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}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; +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {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; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif -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;}`),symbolSDF:jn(`#define SDF_PX 8.0 -uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#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 halo_width -#pragma mapbox: initialize lowp float halo_blur +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;}`),symbolSDF:qo(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; +#pragma maplibre: define highp vec4 fill_color +#pragma maplibre: define highp vec4 halo_color +#pragma maplibre: define lowp float halo_width +#pragma maplibre: define lowp float halo_blur +void main() { +#pragma maplibre: initialize highp vec4 fill_color +#pragma maplibre: initialize highp vec4 halo_color +#pragma maplibre: initialize lowp float halo_width +#pragma maplibre: 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 total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_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;out vec2 v_data0;out 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/16.0;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);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));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +}`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;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_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 bool u_rotate_symbol;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_data0;out vec3 v_data1; +#pragma maplibre: define highp vec4 fill_color +#pragma maplibre: define highp vec4 halo_color +#pragma maplibre: define lowp float opacity +#pragma maplibre: define lowp float halo_width +#pragma maplibre: define lowp float halo_blur +void main() { +#pragma maplibre: initialize highp vec4 fill_color +#pragma maplibre: initialize highp vec4 halo_color +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize lowp float halo_width +#pragma maplibre: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}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; +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {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; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif -vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,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;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:jn(`#define SDF_PX 8.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)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:qo(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 -uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#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 halo_width -#pragma mapbox: initialize lowp float halo_blur -float total_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; +uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;in vec4 v_data0;in vec3 v_data1;flat in float v_is_sdf; +#pragma maplibre: define highp vec4 fill_color +#pragma maplibre: define highp vec4 halo_color +#pragma maplibre: define lowp float halo_width +#pragma maplibre: define lowp float halo_blur +void main() { +#pragma maplibre: initialize highp vec4 fill_color +#pragma maplibre: initialize highp vec4 halo_color +#pragma maplibre: initialize lowp float halo_width +#pragma maplibre: initialize lowp float halo_blur +float total_opacity=v_data1[2];if (v_is_sdf==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif @@ -3431,101 +3499,50 @@ return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float ga #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif -}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in 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_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;out vec4 v_data0;out 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;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);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));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +}`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec3 a_projected_pos;layout(location=3) in uint a_fade_opacity;layout(location=4) in float a_height_offset;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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;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;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec4 v_data0;out vec3 v_data1;flat out float v_is_sdf; +#pragma maplibre: define highp vec4 fill_color +#pragma maplibre: define highp vec4 halo_color +#pragma maplibre: define lowp float opacity +#pragma maplibre: define lowp float halo_width +#pragma maplibre: define lowp float halo_blur +void main() { +#pragma maplibre: initialize highp vec4 fill_color +#pragma maplibre: initialize highp vec4 halo_color +#pragma maplibre: initialize lowp float opacity +#pragma maplibre: initialize lowp float halo_width +#pragma maplibre: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);float is_sdf=float(a_data.z & 1u);float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}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; +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {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; #ifdef GLOBE if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif -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;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,total_opacity,is_sdf);}`),terrain:jn("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;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in 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=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && 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);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out 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=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:jn("in 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() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out 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=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:jn("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out 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=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:jn("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:jn(`#ifdef GL_ES +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;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec3(gamma_scale,size,total_opacity);v_is_sdf=is_sdf;}`),terrain:qo("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;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in 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=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && 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);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","layout(location=0) in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out 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=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:qo("in 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() {fragColor=pack(v_depth);}","layout(location=0) in vec3 a_pos3d;uniform float u_ele_delta;out 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=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),atmosphere:qo(`#ifdef GL_ES precision highp float; #endif in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 -);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:jn("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function jn(pe,y){let N=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,ie=y.match(/in ([\w]+) ([\w]+)/g),fe=pe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),be=y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Re=be?be.concat(fe):fe,je={};return{fragmentSource:pe=pe.replace(N,(Ze,ut,ft,Dt,Gt)=>(je[Gt]=!0,ut==="define"?` -#ifndef HAS_UNIFORM_u_${Gt} -in ${ft} ${Dt} ${Gt}; -#else -uniform ${ft} ${Dt} u_${Gt}; -#endif -`:` -#ifdef HAS_UNIFORM_u_${Gt} - ${ft} ${Dt} ${Gt} = u_${Gt}; -#endif -`)),vertexSource:y=y.replace(N,(Ze,ut,ft,Dt,Gt)=>{let Kt=Dt==="float"?"vec2":"vec4",st=Gt.match(/color/)?"color":Kt;return je[Gt]?ut==="define"?` -#ifndef HAS_UNIFORM_u_${Gt} -uniform lowp float u_${Gt}_t; -in ${ft} ${Kt} a_${Gt}; -out ${ft} ${Dt} ${Gt}; -#else -uniform ${ft} ${Dt} u_${Gt}; -#endif -`:st==="vec4"?` -#ifndef HAS_UNIFORM_u_${Gt} - ${Gt} = a_${Gt}; -#else - ${ft} ${Dt} ${Gt} = u_${Gt}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${Gt} - ${Gt} = unpack_mix_${st}(a_${Gt}, u_${Gt}_t); -#else - ${ft} ${Dt} ${Gt} = u_${Gt}; -#endif -`:ut==="define"?` -#ifndef HAS_UNIFORM_u_${Gt} -uniform lowp float u_${Gt}_t; -in ${ft} ${Kt} a_${Gt}; -#else -uniform ${ft} ${Dt} u_${Gt}; -#endif -`:st==="vec4"?` -#ifndef HAS_UNIFORM_u_${Gt} - ${ft} ${Dt} ${Gt} = a_${Gt}; -#else - ${ft} ${Dt} ${Gt} = u_${Gt}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${Gt} - ${ft} ${Dt} ${Gt} = unpack_mix_${st}(a_${Gt}, u_${Gt}_t); -#else - ${ft} ${Dt} ${Gt} = u_${Gt}; -#endif -`}),staticAttributes:ie,staticUniforms:Re}}class Xn{constructor(y,N,ie){this.vertexBuffer=y,this.indexBuffer=N,this.segments=ie}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var eo=e.aS([{name:"a_pos",type:"Int16",components:2}]);let gi="#define PROJECTION_MERCATOR",qi="mercator";class io{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return qi}get shaderDefine(){return gi}get shaderPreludeCode(){return Ai.projectionMercator}get vertexShaderPreludeCode(){return Ai.projectionMercator.vertexSource}get subdivisionGranularity(){return e.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(y){}getMeshFromTileID(y,N,ie,fe,be){if(this._cachedMesh)return this._cachedMesh;let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(e.a6,0),Re.emplaceBack(0,e.a6),Re.emplaceBack(e.a6,e.a6);let je=y.createVertexBuffer(Re,eo.members),Ze=e.aV.simpleSegment(0,0,4,2),ut=new e.aW;ut.emplaceBack(1,0,2),ut.emplaceBack(1,2,3);let ft=y.createIndexBuffer(ut);return this._cachedMesh=new Xn(je,ft,Ze),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(y){}}class oo{constructor(y=0,N=0,ie=0,fe=0){if(isNaN(y)||y<0||isNaN(N)||N<0||isNaN(ie)||ie<0||isNaN(fe)||fe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=y,this.bottom=N,this.left=ie,this.right=fe}interpolate(y,N,ie){return N.top!=null&&y.top!=null&&(this.top=e.H.number(y.top,N.top,ie)),N.bottom!=null&&y.bottom!=null&&(this.bottom=e.H.number(y.bottom,N.bottom,ie)),N.left!=null&&y.left!=null&&(this.left=e.H.number(y.left,N.left,ie)),N.right!=null&&y.right!=null&&(this.right=e.H.number(y.right,N.right,ie)),this}getCenter(y,N){let ie=e.al((this.left+y-this.right)/2,0,y),fe=e.al((this.top+N-this.bottom)/2,0,N);return new e.P(ie,fe)}equals(y){return this.top===y.top&&this.bottom===y.bottom&&this.left===y.left&&this.right===y.right}clone(){return new oo(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Vn(pe,y){if(!pe.renderWorldCopies||pe.lngRange)return;let N=y.lng-pe.center.lng;y.lng+=N>180?-360:N<-180?360:0}function qn(pe){return Math.max(0,Math.floor(pe))}class Hi{constructor(y,N){var ie;this.applyConstrain=(fe,be)=>this._constrainOverride!==null?this._constrainOverride(fe,be):this._callbacks.defaultConstrain(fe,be),this._callbacks=y,this._tileSize=512,this._renderWorldCopies=N?.renderWorldCopies===void 0||!!N?.renderWorldCopies,this._minZoom=N?.minZoom||0,this._maxZoom=N?.maxZoom||22,this._minPitch=N?.minPitch==null?0:N?.minPitch,this._maxPitch=N?.maxPitch==null?60:N?.maxPitch,this._constrainOverride=(ie=N?.constrainOverride)!==null&&ie!==void 0?ie:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new oo,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(y,N,ie){this._constrainOverride=y.constrainOverride,this._latRange=y.latRange,this._lngRange=y.lngRange,this._width=y.width,this._height=y.height,this._center=y.center,this._elevation=y.elevation,this._minElevationForCurrentTile=y.minElevationForCurrentTile,this._zoom=y.zoom,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=y.bearingInRadians,this._fovInRadians=y.fovInRadians,this._pitchInRadians=y.pitchInRadians,this._rollInRadians=y.rollInRadians,this._unmodified=y.unmodified,this._edgeInsets=new oo(y.padding.top,y.padding.bottom,y.padding.left,y.padding.right),this._minZoom=y.minZoom,this._maxZoom=y.maxZoom,this._minPitch=y.minPitch,this._maxPitch=y.maxPitch,this._renderWorldCopies=y.renderWorldCopies,this._cameraToCenterDistance=y.cameraToCenterDistance,this._nearZ=y.nearZ,this._farZ=y.farZ,this._autoCalculateNearFarZ=!ie&&y.autoCalculateNearFarZ,N&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(y){this._minElevationForCurrentTile=y}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(y){this._minZoom!==y&&(this._minZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(y){this._maxZoom!==y&&(this._maxZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(y){this._minPitch!==y&&(this._minPitch=y,this.setPitch(Math.max(this.pitch,y)))}get maxPitch(){return this._maxPitch}setMaxPitch(y){this._maxPitch!==y&&(this._maxPitch=y,this.setPitch(Math.min(this.pitch,y)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(y){y===void 0?y=!0:y===null&&(y=!1),this._renderWorldCopies=y}get constrainOverride(){return this._constrainOverride}setConstrainOverride(y){y===void 0&&(y=null),this._constrainOverride!==y&&(this._constrainOverride=y,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(y){let N=e.X(y,-180,180)*Math.PI/180;var ie,fe,be,Re,je,Ze,ut,ft,Dt;this._bearingInRadians!==N&&(this._unmodified=!1,this._bearingInRadians=N,this._calcMatrices(),this._rotationMatrix=n(),ie=this._rotationMatrix,be=-this._bearingInRadians,Re=(fe=this._rotationMatrix)[0],je=fe[1],Ze=fe[2],ut=fe[3],ft=Math.sin(be),Dt=Math.cos(be),ie[0]=Re*Dt+Ze*ft,ie[1]=je*Dt+ut*ft,ie[2]=Re*-ft+Ze*Dt,ie[3]=je*-ft+ut*Dt)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(y){let N=e.al(y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==N&&(this._unmodified=!1,this._pitchInRadians=N,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(y){let N=y/180*Math.PI;this._rollInRadians!==N&&(this._unmodified=!1,this._rollInRadians=N,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(y){y=e.al(y,.1,150),this.fov!==y&&(this._unmodified=!1,this._fovInRadians=e.an(y),this._calcMatrices())}get zoom(){return this._zoom}setZoom(y){let N=this.applyConstrain(this._center,y).zoom;this._zoom!==N&&(this._unmodified=!1,this._zoom=N,this._tileZoom=Math.max(0,Math.floor(N)),this._scale=e.ao(N),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(y){y.lat===this._center.lat&&y.lng===this._center.lng||(this._unmodified=!1,this._center=y,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(y){y!==this._elevation&&(this._elevation=y,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(y){this._edgeInsets.equals(y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,y,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(y,N){this._autoCalculateNearFarZ=!1,this._nearZ=y,this._farZ=N,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(y){return this._edgeInsets.equals(y)}interpolatePadding(y,N,ie){this._unmodified=!1,this._edgeInsets.interpolate(y,N,ie),this.constrainInternal(),this._calcMatrices()}resize(y,N,ie=!0){this._width=y,this._height=N,ie&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var y,N;return((y=this._latRange)===null||y===void 0?void 0:y.length)!==2||((N=this._lngRange)===null||N===void 0?void 0:N.length)!==2?null:new q([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(y){y?(this._lngRange=[y.getWest(),y.getEast()],this._latRange=[y.getSouth(),y.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(y,N){if(N.length===1)return[N[0],y];{let{minX:ie,minY:fe,maxX:be,maxY:Re}=e.a8.fromPoints(N).extend(y);return[new e.P(ie,fe),new e.P(be,fe),new e.P(be,Re),new e.P(ie,Re),new e.P(ie,fe)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let y=this._unmodified,{center:N,zoom:ie}=this.applyConstrain(this.center,this.zoom);this.setCenter(N),this.setZoom(ie),this._unmodified=y,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let y=e.ap(new Float64Array(16));e.S(y,y,[this._width/2,-this._height/2,1]),e.Q(y,y,[1,-1,0]),this._clipSpaceToPixelsMatrix=y,y=e.ap(new Float64Array(16)),e.S(y,y,[1,-1,1]),e.Q(y,y,[-1,-1,0]),e.S(y,y,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=y,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){let be=ie!==void 0?ie:this.bearing,Re=fe=fe!==void 0?fe:this.pitch,{distanceToCenter:je,clampedElevation:Ze}=this._distanceToCenterFromAltElevationPitch(N,this.elevation,Re),{x:ut,y:ft}=vt(Re,be),Dt=e.a7.fromLngLat(y,N),Gt,Kt,st=e.aY(1,Dt.y),It=0;do{if(It+=1,It>10)break;Kt=je/st,Gt=new e.a7(Dt.x+ut*Kt,Dt.y+ft*Kt),st=1/Gt.meterInMercatorCoordinateUnits()}while(Math.abs(je-Kt*st)>1e-12);return{center:Gt.toLngLat(),elevation:Ze,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/Kt/this.tileSize)}}recalculateZoomAndCenter(y){if(this.elevation-y==0)return;let N=1/this.worldSize,ie=e.aq(1,this.center.lat)*this.worldSize,fe=e.a7.fromLngLat(this.center,this.elevation),be=fe.x/N,Re=fe.y/N,je=fe.z/N,Ze=this.pitch,ut=this.bearing,{x:ft,y:Dt,z:Gt}=vt(Ze,ut),Kt=this.cameraToCenterDistance,st=be+Kt*-ft,It=Re+Kt*-Dt,Ut=je+Kt*Gt,{distanceToCenter:ir,clampedElevation:dr}=this._distanceToCenterFromAltElevationPitch(Ut/ie,y,Ze),Ar=ir*ie,hr=new e.a7((st+ft*Ar)*N,(It+Dt*Ar)*N,0).toLngLat(),vr=e.aq(1,hr.lat),Or=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/ir/vr/this.tileSize);this._elevation=dr,this._center=hr,this.setZoom(Or)}_distanceToCenterFromAltElevationPitch(y,N,ie){let fe=-Math.cos(e.an(ie)),be=y-N,Re,je=N;return fe*be>=0||Math.abs(fe)<.1?(Re=1e4,je=y+Re*fe):Re=-be/fe,{distanceToCenter:Re,clampedElevation:je}}getCameraPoint(){let y=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(y*Math.sin(this.rollInRadians),y*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/y).toLngLat()}getMercatorTileCoordinates(y){if(!y)return[0,0,1,1];let N=y.canonical.z>=0?1<this.max[0]||y.aabb.min[1]>this.max[1]||y.aabb.min[2]>this.max[2]||y.aabb.max[0]0?(N+=y[fe]*this.min[fe],ie+=y[fe]*this.max[fe]):(ie+=y[fe]*this.min[fe],N+=y[fe]*this.max[fe]);return N>=0?2:ie<0?0:1}}class Ro{distanceToTile2d(y,N,ie,fe){let be=fe,Re=be.distanceX([y,N]),je=be.distanceY([y,N]);return Math.hypot(Re,je)}getWrap(y,N,ie){return ie}getTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ft=new e.a3(y.z,N,y.z,y.x,y.y),Dt=fe.terrain.getMinMaxElevation(ft);je=(be=Dt.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=Dt.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}let ut=1<fe}allowWorldCopies(){return!0}prepareNextFrame(){}}class go{constructor(y,N,ie){this.points=y,this.planes=N,this.aabb=ie}static fromInvProjectionMatrix(y,N=1,ie=0,fe,be){let Re=be?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],je=Math.pow(2,ie),Ze=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Gt=>function(Kt,st,It,Ut){let ir=e.aE([],Kt,st),dr=1/ir[3]/It*Ut;return e.b4(ir,ir,[dr,dr,1/ir[3],dr])}(Gt,y,N,je));fe&&function(Gt,Kt,st,It){let Ut=It?4:0,ir=It?0:4,dr=0,Ar=[],hr=[];for(let Cr=0;Cr<4;Cr++){let ta=e.b0([],Gt[Cr+ir],Gt[Cr+Ut]),ka=e.b5(ta);e.aZ(ta,ta,1/ka),Ar.push(ka),hr.push(ta)}for(let Cr=0;Cr<4;Cr++){let ta=e.b6(Gt[Cr+Ut],hr[Cr],st);dr=ta!==null&&ta>=0?Math.max(dr,ta):Math.max(dr,Ar[Cr])}let vr=function(Cr,ta){let ka=e.b0([],Cr[ta[0]],Cr[ta[1]]),Ta=e.b0([],Cr[ta[2]],Cr[ta[1]]),Ra=[0,0,0,0];return e.b1(Ra,e.b2([],ka,Ta)),Ra[3]=-e.b3(Ra,Cr[ta[0]]),Ra}(Gt,Kt),Or=function(Cr,ta){let ka=e.b7(Cr),Ta=e.b8([],Cr,1/ka),Ra=e.b0([],ta,e.aZ([],Ta,e.b3(ta,Ta))),ua=e.b7(Ra);if(ua>0){let ia=Math.sqrt(1-Ta[3]*Ta[3]),ga=e.aZ([],Ta,-Ta[3]),da=e.a_([],ga,e.aZ([],Ra,ia/ua));return e.b9(ta,da)}return null}(st,vr);if(Or!==null){let Cr=Or/e.b3(hr[0],vr);dr=Math.min(dr,Cr)}for(let Cr=0;Cr<4;Cr++){let ta=Math.min(dr,Ar[Cr]);Gt[Cr+ir]=[Gt[Cr+Ut][0]+hr[Cr][0]*ta,Gt[Cr+Ut][1]+hr[Cr][1]*ta,Gt[Cr+Ut][2]+hr[Cr][2]*ta,1]}}(Ze,Re[0],fe,be);let ut=Re.map(Gt=>{let Kt=e.b0([],Ze[Gt[0]],Ze[Gt[1]]),st=e.b0([],Ze[Gt[2]],Ze[Gt[1]]),It=e.b1([],e.b2([],Kt,st)),Ut=-e.b3(It,Ze[Gt[1]]);return It.concat(Ut)}),ft=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Dt=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let Gt of Ze)for(let Kt=0;Kt<3;Kt++)ft[Kt]=Math.min(ft[Kt],Gt[Kt]),Dt[Kt]=Math.max(Dt[Kt],Gt[Kt]);return new go(Ze,ut,new Mi(ft,Dt))}}class Eo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(y,N){}constructor(y){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(N,ie)=>{ie=e.al(+ie,this.minZoom,this.maxZoom);let fe={center:new e.W(N.lng,N.lat),zoom:ie},be=this._helper._lngRange;if(!this._helper._renderWorldCopies&&be===null){let hr=179.9999999999;be=[-hr,hr]}let Re=this.tileSize*e.ao(fe.zoom),je=0,Ze=Re,ut=0,ft=Re,Dt=0,Gt=0,{x:Kt,y:st}=this.size;if(this._helper._latRange){let hr=this._helper._latRange;je=e.Y(hr[1])*Re,Ze=e.Y(hr[0])*Re,Ze-jeZe&&(dr=Ze-hr)}if(be){let hr=(ut+ft)/2,vr=It;this._helper._renderWorldCopies&&(vr=e.X(It,hr-Re/2,hr+Re/2));let Or=Kt/2;vr-Orft&&(ir=ft-Or)}if(ir!==void 0||dr!==void 0){let hr=new e.P(ir??It,dr??Ut);fe.center=_r(Re,hr).wrap()}return fe},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new Ro}clone(){let y=new Eo;return y.apply(this,!1),y}apply(y,N,ie){this._helper.apply(y,N,ie)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(y){let N=[new e.ba(0,y)];if(this._helper._renderWorldCopies){let ie=this.screenPointToMercatorCoordinate(new e.P(0,0)),fe=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),be=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),Re=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),je=Math.floor(Math.min(ie.x,fe.x,be.x,Re.x)),Ze=Math.floor(Math.max(ie.x,fe.x,be.x,Re.x)),ut=1;for(let ft=je-ut;ft<=Ze+ut;ft++)ft!==0&&N.push(new e.ba(ft,y))}return N}getCameraFrustum(){return go.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(y){let N=this.screenPointToLocation(this.centerPoint,y),ie=y?y.getElevationForLngLatZoom(N,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(ie)}setLocationAtPoint(y,N){let ie=e.aq(this.elevation,this.center.lat),fe=this.screenPointToMercatorCoordinateAtZ(N,ie),be=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,ie),Re=e.a7.fromLngLat(y),je=new e.a7(Re.x-(fe.x-be.x),Re.y-(fe.y-be.y));this.setCenter(je?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(y,N){return N?this.coordinatePoint(e.a7.fromLngLat(y),N.getElevationForLngLat(y,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(y))}screenPointToLocation(y,N){var ie;return(ie=this.screenPointToMercatorCoordinate(y,N))===null||ie===void 0?void 0:ie.toLngLat()}screenPointToMercatorCoordinate(y,N){if(N){let ie=N.pointCoordinate(y);if(ie!=null)return ie}return this.screenPointToMercatorCoordinateAtZ(y)}screenPointToMercatorCoordinateAtZ(y,N){let ie=N||0,fe=[y.x,y.y,0,1],be=[y.x,y.y,1,1];e.aE(fe,fe,this._pixelMatrixInverse),e.aE(be,be,this._pixelMatrixInverse);let Re=fe[3],je=be[3],Ze=fe[1]/Re,ut=be[1]/je,ft=fe[2]/Re,Dt=be[2]/je,Gt=ft===Dt?0:(ie-ft)/(Dt-ft);return new e.a7(e.H.number(fe[0]/Re,be[0]/je,Gt)/this.worldSize,e.H.number(Ze,ut,Gt)/this.worldSize,ie)}coordinatePoint(y,N=0,ie=this._pixelMatrix){let fe=[y.x*this.worldSize,y.y*this.worldSize,N,1];return e.aE(fe,fe,ie),new e.P(fe[0]/fe[3],fe[1]/fe[3])}getBounds(){let y=Math.max(0,this._helper._height/2-Xt(this));return new q().extend(this.screenPointToLocation(new e.P(0,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(y,N){return N?N.pointCoordinate(y)!=null:y.y>this.height/2-Xt(this)}calculatePosMatrix(y,N=!1,ie){var fe;let be=(fe=y.key)!==null&&fe!==void 0?fe:e.bb(y.wrap,y.canonical.z,y.canonical.z,y.canonical.x,y.canonical.y),Re=N?this._alignedPosMatrixCache:this._posMatrixCache;if(Re.has(be)){let ut=Re.get(be);return ie?ut.f32:ut.f64}let je=or(y,this.worldSize);e.U(je,N?this._alignedProjMatrix:this._viewProjMatrix,je);let Ze={f64:je,f32:new Float32Array(je)};return Re.set(be,Ze),ie?Ze.f32:Ze.f64}calculateFogMatrix(y){let N=y.key,ie=this._fogMatrixCacheF32;if(ie.has(N))return ie.get(N);let fe=or(y,this.worldSize);return e.U(fe,this._fogMatrix,fe),ie.set(N,new Float32Array(fe)),ie.get(N)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}_calculateNearFarZIfNeeded(y,N,ie){if(!this._helper.autoCalculateNearFarZ)return;let fe=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),be=y-fe*this._helper._pixelPerMeter/Math.cos(N),Re=fe<0?be:y,je=Math.PI/2+this.pitchInRadians,Ze=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+ie.y/this.height),ut=Math.sin(Ze)*Re/Math.sin(e.al(Math.PI-je-Ze,.01,Math.PI-.01)),ft=Xt(this),Dt=Math.atan(ft/this._helper.cameraToCenterDistance),Gt=e.an(.75),Kt=Dt>Gt?2*Dt*(.5+ie.y/(2*ft)):Gt,st=Math.sin(Kt)*Re/Math.sin(e.al(Math.PI-je-Kt,.01,Math.PI-.01)),It=Math.min(ut,st);this._helper._farZ=1.01*(Math.cos(Math.PI/2-N)*It+Re),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let y=this.centerOffset,N=rr(this.worldSize,this.center),ie=N.x,fe=N.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;let be=e.an(Math.min(this.pitch,$t)),Re=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(be)),je;var Ze,ut;this._calculateNearFarZIfNeeded(Re,be,y),je=new Float64Array(16),e.bc(je,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ze=this._invProjMatrix)[0]=1/(ut=je)[0],Ze[1]=0,Ze[2]=0,Ze[3]=0,Ze[4]=0,Ze[5]=1/ut[5],Ze[6]=0,Ze[7]=0,Ze[8]=0,Ze[9]=0,Ze[10]=0,Ze[11]=1/ut[14],Ze[12]=0,Ze[13]=0,Ze[14]=-1,Ze[15]=ut[10]/ut[14],je[8]=2*-y.x/this._helper._width,je[9]=2*y.y/this._helper._height,this._projectionMatrix=e.bd(je),e.S(je,je,[1,-1,1]),e.Q(je,je,[0,0,-this._helper.cameraToCenterDistance]),e.be(je,je,-this.rollInRadians),e.bf(je,je,this.pitchInRadians),e.be(je,je,-this.bearingInRadians),e.Q(je,je,[-ie,-fe,0]),this._mercatorMatrix=e.S([],je,[this.worldSize,this.worldSize,this.worldSize]),e.S(je,je,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je),e.Q(je,je,[0,0,-this.elevation]),this._viewProjMatrix=je,this._invViewProjMatrix=e.bg([],je);let ft=[0,0,-1,1];e.aE(ft,ft,this._invViewProjMatrix),this._cameraPosition=[ft[0]/ft[3],ft[1]/ft[3],ft[2]/ft[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,Re,this._helper._farZ),this._fogMatrix[8]=2*-y.x/this.width,this._fogMatrix[9]=2*y.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-ie,-fe,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je);let Dt=this._helper._width%2/2,Gt=this._helper._height%2/2,Kt=Math.cos(this.bearingInRadians),st=Math.sin(-this.bearingInRadians),It=ie-Math.round(ie)+Kt*Dt+st*Gt,Ut=fe-Math.round(fe)+Kt*Gt+st*Dt,ir=new Float64Array(je);if(e.Q(ir,ir,[It>.5?It-1:It,Ut>.5?Ut-1:Ut,0]),this._alignedProjMatrix=ir,je=e.bg(new Float64Array(16),this._pixelMatrix),!je)throw new Error("failed to invert matrix");this._pixelMatrixInverse=je,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let y=this.screenPointToMercatorCoordinate(new e.P(0,0)),N=[y.x*this.worldSize,y.y*this.worldSize,0,1];return e.aE(N,N,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/y).toLngLat()}lngLatToCameraDepth(y,N){let ie=e.a7.fromLngLat(y),fe=[ie.x*this.worldSize,ie.y*this.worldSize,N,1];return e.aE(fe,fe,this._viewProjMatrix),fe[2]/fe[3]}getProjectionData(y){let{overscaledTileID:N,aligned:ie,applyTerrainMatrix:fe}=y,be=this._helper.getMercatorTileCoordinates(N),Re=N?this.calculatePosMatrix(N,ie,!0):null,je;return je=N?.terrainRttPosMatrix32f&&fe?N.terrainRttPosMatrix32f:Re||e.bh(),{mainMatrix:je,tileMercatorCoords:be,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:je}}isLocationOccluded(y){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(y,N,ie){return 1}transformLightDirection(y){return e.a$(y)}getRayDirectionFromPixel(y){throw new Error("Not implemented.")}projectTileCoordinates(y,N,ie,fe){let be=this.calculatePosMatrix(ie),Re;fe?(Re=[y,N,fe(y,N),1],e.aE(Re,Re,be)):(Re=[y,N,0,1],Oa(Re,Re,be));let je=Re[3];return{point:new e.P(Re[0]/je,Re[1]/je),signedDistanceFromCamera:je,isOccluded:!1}}populateCache(y){for(let N of y)this.calculatePosMatrix(N)}getMatrixForModel(y,N){let ie=e.a7.fromLngLat(y,N),fe=ie.meterInMercatorCoordinateUnits(),be=e.bi();return e.Q(be,be,[ie.x,ie.y,ie.z]),e.be(be,be,Math.PI),e.bf(be,be,Math.PI/2),e.S(be,be,[-fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=new e.a3(0,0,0,0,0),ie=this.getProjectionData({overscaledTileID:N,applyGlobeMatrix:y}),fe=or(N,this.worldSize);e.U(fe,this._viewProjMatrix,fe),ie.tileMercatorCoords=[0,0,1,1];let be=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],Re=e.bj();return e.S(Re,fe,be),ie.fallbackMatrix=Re,ie.mainMatrix=Re,ie}getFastPathSimpleProjectionMatrix(y){return this.calculatePosMatrix(y)}}function Ao(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ds(pe){if(pe.useSlerp)if(pe.k<1){let y=e.bk(pe.startEulerAngles.roll,pe.startEulerAngles.pitch,pe.startEulerAngles.bearing),N=e.bk(pe.endEulerAngles.roll,pe.endEulerAngles.pitch,pe.endEulerAngles.bearing),ie=new Float64Array(4);e.bl(ie,y,N,pe.k);let fe=e.bm(ie);pe.tr.setRoll(fe.roll),pe.tr.setPitch(fe.pitch),pe.tr.setBearing(fe.bearing)}else pe.tr.setRoll(pe.endEulerAngles.roll),pe.tr.setPitch(pe.endEulerAngles.pitch),pe.tr.setBearing(pe.endEulerAngles.bearing);else pe.tr.setRoll(e.H.number(pe.startEulerAngles.roll,pe.endEulerAngles.roll,pe.k)),pe.tr.setPitch(e.H.number(pe.startEulerAngles.pitch,pe.endEulerAngles.pitch,pe.k)),pe.tr.setBearing(e.H.number(pe.startEulerAngles.bearing,pe.endEulerAngles.bearing,pe.k))}function jo(pe,y,N,ie,fe){let be=fe.padding,Re=rr(fe.worldSize,N.getNorthWest()),je=rr(fe.worldSize,N.getNorthEast()),Ze=rr(fe.worldSize,N.getSouthEast()),ut=rr(fe.worldSize,N.getSouthWest()),ft=e.an(-ie),Dt=Re.rotate(ft),Gt=je.rotate(ft),Kt=Ze.rotate(ft),st=ut.rotate(ft),It=new e.P(Math.max(Dt.x,Gt.x,st.x,Kt.x),Math.max(Dt.y,Gt.y,st.y,Kt.y)),Ut=new e.P(Math.min(Dt.x,Gt.x,st.x,Kt.x),Math.min(Dt.y,Gt.y,st.y,Kt.y)),ir=It.sub(Ut),dr=(fe.width-(be.left+be.right+y.left+y.right))/ir.x,Ar=(fe.height-(be.top+be.bottom+y.top+y.bottom))/ir.y;if(Ar<0||dr<0)return void Ao();let hr=Math.min(e.ar(fe.scale*Math.min(dr,Ar)),pe.maxZoom),vr=e.P.convert(pe.offset),Or=new e.P((y.left-y.right)/2,(y.top-y.bottom)/2).rotate(e.an(ie)),Cr=vr.add(Or).mult(fe.scale/e.ao(hr));return{center:_r(fe.worldSize,Re.add(Ze).div(2).sub(Cr)),zoom:hr,bearing:ie}}class Wo{get useGlobeControls(){return!1}handlePanInertia(y,N){let ie=y.mag(),fe=Math.abs(Xt(N));return{easingOffset:y.mult(Math.min(.75*fe/ie,1)),easingCenter:N.center}}handleMapControlsRollPitchBearingZoom(y,N){y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta),y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta)}handleMapControlsPan(y,N,ie){y.around.distSqr(N.centerPoint)<.01||N.setLocationAtPoint(ie,y.around)}cameraForBoxAndBearing(y,N,ie,fe,be){return jo(y,N,ie,fe,be)}handleJumpToCenterZoom(y,N){y.zoom!==(N.zoom!==void 0?+N.zoom:y.zoom)&&y.setZoom(+N.zoom),N.center!==void 0&&y.setCenter(e.W.convert(N.center))}handleEaseTo(y,N){let ie=y.zoom,fe=y.padding,be={roll:y.roll,pitch:y.pitch,bearing:y.bearing},Re={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},je=N.zoom!==void 0,Ze=!y.isPaddingEqual(N.padding),ut=!1,ft=je?+N.zoom:y.zoom,Dt=y.centerPoint.add(N.offsetAsPoint),Gt=y.screenPointToLocation(Dt),{center:Kt,zoom:st}=y.applyConstrain(e.W.convert(N.center||Gt),ft??ie);Vn(y,Kt);let It=rr(y.worldSize,Gt),Ut=rr(y.worldSize,Kt).sub(It),ir=e.ao(st-ie);return ut=st!==ie,{easeFunc:dr=>{if(ut&&y.setZoom(e.H.number(ie,st,dr)),e.bn(be,Re)||ds({startEulerAngles:be,endEulerAngles:Re,tr:y,k:dr,useSlerp:be.roll!=Re.roll}),Ze&&(y.interpolatePadding(fe,N.padding,dr),Dt=y.centerPoint.add(N.offsetAsPoint)),N.around)y.setLocationAtPoint(N.around,N.aroundPoint);else{let Ar=e.ao(y.zoom-ie),hr=st>ie?Math.min(2,ir):Math.max(.5,ir),vr=Math.pow(hr,1-dr),Or=_r(y.worldSize,It.add(Ut.mult(dr*vr)).mult(Ar));y.setLocationAtPoint(y.renderWorldCopies?Or.wrap():Or,Dt)}},isZooming:ut,elevationCenter:Kt}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.zoom,be=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),ie?+N.zoom:fe),Re=be.center,je=be.zoom;Vn(y,Re);let Ze=rr(y.worldSize,N.locationAtOffset),ut=rr(y.worldSize,Re).sub(Ze),ft=ut.mag(),Dt=e.ao(je-fe),Gt;if(N.minZoom!==void 0){let Kt=Math.min(+N.minZoom,fe,je),st=y.applyConstrain(Re,Kt).zoom;Gt=e.ao(st-fe)}return{easeFunc:(Kt,st,It,Ut)=>{y.setZoom(Kt===1?je:fe+e.ar(st));let ir=Kt===1?Re:_r(y.worldSize,Ze.add(ut.mult(It)).mult(st));y.setLocationAtPoint(y.renderWorldCopies?ir.wrap():ir,Ut)},scaleOfZoom:Dt,targetCenter:Re,scaleOfMinZoom:Gt,pixelPathLength:ft}}}class to{constructor(y,N,ie){this.blendFunction=y,this.blendColor=N,this.mask=ie}}to.Replace=[1,0],to.disabled=new to(to.Replace,e.bo.transparent,[!1,!1,!1,!1]),to.unblended=new to(to.Replace,e.bo.transparent,[!0,!0,!0,!0]),to.alphaBlended=new to([1,771],e.bo.transparent,[!0,!0,!0,!0]);let wo=2305;class pi{constructor(y,N,ie){this.enable=y,this.mode=N,this.frontFace=ie}}pi.disabled=new pi(!1,1029,wo),pi.backCCW=new pi(!0,1029,wo),pi.frontCCW=new pi(!0,1028,wo);class Vi{constructor(y,N,ie){this.func=y,this.mask=N,this.range=ie}}Vi.ReadOnly=!1,Vi.ReadWrite=!0,Vi.disabled=new Vi(519,Vi.ReadOnly,[0,1]);let Io=7680;class Xi{constructor(y,N,ie,fe,be,Re){this.test=y,this.ref=N,this.mask=ie,this.fail=fe,this.depthFail=be,this.pass=Re}}function Ko(pe){return typeof WebGL2RenderingContext<"u"&&pe instanceof WebGL2RenderingContext}Xi.disabled=new Xi({func:519,mask:0},0,0,Io,Io,Io);class Uo{get awaitingQuery(){return!!this._readbackQueue}constructor(y){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=y;let N=y.context,ie=N.gl;this._texFormat=ie.RGBA,this._texType=ie.UNSIGNED_BYTE;let fe=new e.aU;fe.emplaceBack(-1,-1),fe.emplaceBack(2,-1),fe.emplaceBack(-1,2);let be=new e.aW;be.emplaceBack(0,1,2),this._fullscreenTriangle=new Xn(N.createVertexBuffer(fe,eo.members),N.createIndexBuffer(be),e.aV.simpleSegment(0,0,fe.length,be.length)),this._resultBuffer=new Uint8Array(4),N.activeTexture.set(ie.TEXTURE1);let Re=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,Re),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.NEAREST),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.NEAREST),ie.texImage2D(ie.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=N.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(Re),Ko(ie)&&(this._pbo=ie.createBuffer(),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,this._pbo),ie.bufferData(ie.PIXEL_PACK_BUFFER,4,ie.STREAM_READ),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,null))}destroy(){let y=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),y.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(y,N){let ie=this._updateCount;return this._readbackQueue?ie>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():ie>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(y,N),this._updateCount++,this._measuredError}_bindFramebuffer(){let y=this._cachedRenderContext.context,N=y.gl;y.activeTexture.set(N.TEXTURE1),N.bindTexture(N.TEXTURE_2D,this._fbo.colorAttachment.get()),y.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(y,N){let ie=this._cachedRenderContext.context,fe=ie.gl;if(this._bindFramebuffer(),ie.viewport.set([0,0,this._texWidth,this._texHeight]),ie.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(ie,fe.TRIANGLES,Vi.disabled,Xi.disabled,to.unblended,pi.disabled,((be,Re)=>({u_input:be,u_output_expected:Re}))(y,N),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Ko(fe)){fe.bindBuffer(fe.PIXEL_PACK_BUFFER,this._pbo),fe.readBuffer(fe.COLOR_ATTACHMENT0),fe.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),fe.bindBuffer(fe.PIXEL_PACK_BUFFER,null);let be=fe.fenceSync(fe.SYNC_GPU_COMMANDS_COMPLETE,0);fe.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:be}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let y=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Ko(y)){let N=y.clientWaitSync(this._readbackQueue.sync,0,0);if(N===y.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(N===y.TIMEOUT_EXPIRED)return;y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.getBufferSubData(y.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),y.bindBuffer(y.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Uo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(y){let N=0;return N+=y[0]/256,N+=y[1]/65536,N+=y[2]/16777216,y[3]<127&&(N=-N),N/128}}let Ls=e.a6/128;function Ss(pe,y){let N=pe.granularity!==void 0?Math.max(pe.granularity,1):1,ie=N+(pe.generateBorders?2:0),fe=N+(pe.extendToNorthPole||pe.generateBorders?1:0)+(pe.extendToSouthPole||pe.generateBorders?1:0),be=ie+1,Re=fe+1,je=pe.generateBorders?-1:0,Ze=pe.generateBorders||pe.extendToNorthPole?-1:0,ut=N+(pe.generateBorders?1:0),ft=N+(pe.generateBorders||pe.extendToSouthPole?1:0),Dt=be*Re,Gt=ie*fe*6,Kt=be*Re>65536;if(Kt&&y==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let st=Kt||y==="32bit",It=new Int16Array(2*Dt),Ut=0;for(let Ar=Ze;Ar<=ft;Ar++)for(let hr=je;hr<=ut;hr++){let vr=hr/N*e.a6;hr===-1&&(vr=-Ls),hr===N+1&&(vr=e.a6+Ls);let Or=Ar/N*e.a6;Ar===-1&&(Or=pe.extendToNorthPole?e.bq:-Ls),Ar===N+1&&(Or=pe.extendToSouthPole?e.br:e.a6+Ls),It[Ut++]=vr,It[Ut++]=Or}let ir=st?new Uint32Array(Gt):new Uint16Array(Gt),dr=0;for(let Ar=0;Ar0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(y){this._mercatorProjection.updateGPUdependent(y),this._verticalPerspectiveProjection.updateGPUdependent(y)}getMeshFromTileID(y,N,ie,fe,be){return this.currentProjection.getMeshFromTileID(y,N,ie,fe,be)}setProjection(y){this._transitionable.setValue("type",y?.type||"mercator")}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}setErrorQueryLatitudeDegrees(y){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(y),this._mercatorProjection.setErrorQueryLatitudeDegrees(y)}}function _o(pe){let y=bs(pe.worldSize,pe.center.lat);return 2*Math.PI*y}function Pi(pe,y,N,ie,fe){let be=1/(1<1e-6){let ie=pe[0]/N,fe=Math.acos(pe[2]/N),be=(ie>0?fe:-fe)/Math.PI*180;return new e.W(e.X(be,-180,180),y)}return new e.W(0,y)}function hl(pe){return Math.cos(pe*Math.PI/180)}function ps(pe,y){let N=hl(pe),ie=hl(y);return e.ar(ie/N)}function dl(pe,y){let N=pe.rotate(y.bearingInRadians),ie=y.zoom+ps(y.center.lat,0),fe=e.bt(1/hl(y.center.lat),1/hl(Math.min(Math.abs(y.center.lat),60)),e.bw(ie,7,3,0,1)),be=360/_o({worldSize:y.worldSize,center:{lat:y.center.lat}});return new e.W(y.center.lng-N.x*be*fe,e.al(y.center.lat+N.y*be,-e.am,e.am))}function wu(pe){let y=.5*pe,N=Math.sin(y),ie=Math.cos(y);return Math.log(N+ie)-Math.log(ie-N)}function lu(pe,y,N,ie){let fe=pe.lat+N*ie;if(Math.abs(N)>1){let be=(Math.sign(pe.lat+N)!==Math.sign(pe.lat)?-Math.abs(pe.lat):Math.abs(pe.lat))*Math.PI/180,Re=Math.abs(pe.lat+N)*Math.PI/180,je=wu(be+ie*(Re-be)),Ze=wu(be),ut=wu(Re);return new e.W(pe.lng+y*((je-Ze)/(ut-Ze)),fe)}return new e.W(pe.lng+y*ie,fe)}class xc{constructor(y){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=y}swapBuffers(){if(!this._hadAnyChanges)return;let y=this._cachePrevious;this._cachePrevious=this._cache,this._cache=y,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(y,N,ie,fe){let be=`${y.z}_${y.x}_${y.y}_${fe?.terrain?"t":""}`,Re=this._cache.get(be);if(Re)return Re;let je=this._cachePrevious.get(be);if(je)return this._cache.set(be,je),je;let Ze=this._boundingVolumeFactory(y,N,ie,fe);return this._cache.set(be,Ze),this._hadAnyChanges=!0,Ze}}class Fl{constructor(y,N,ie,fe){this.min=ie,this.max=fe,this.points=y,this.planes=N}static fromAabb(y,N){let ie=[];for(let fe=0;fe<8;fe++)ie.push([1&~fe?y[0]:N[0],(fe>>1&1)==1?N[1]:y[1],(fe>>2&1)==1?N[2]:y[2]]);return new Fl(ie,[[-1,0,0,N[0]],[1,0,0,-y[0]],[0,-1,0,N[1]],[0,1,0,-y[1]],[0,0,-1,N[2]],[0,0,1,-y[2]]],y,N)}static fromCenterSizeAngles(y,N,ie){let fe=e.bA([],ie[0],ie[1],ie[2]),be=e.bB([],[N[0],0,0],fe),Re=e.bB([],[0,N[1],0],fe),je=e.bB([],[0,0,N[2]],fe),Ze=[...y],ut=[...y];for(let Dt=0;Dt<8;Dt++)for(let Gt=0;Gt<3;Gt++){let Kt=y[Gt]+be[Gt]*(1&~Dt?-1:1)+Re[Gt]*((Dt>>1&1)==1?1:-1)+je[Gt]*((Dt>>2&1)==1?1:-1);Ze[Gt]=Math.min(Ze[Gt],Kt),ut[Gt]=Math.max(ut[Gt],Kt)}let ft=[];for(let Dt=0;Dt<8;Dt++){let Gt=[...y];e.a_(Gt,Gt,e.aZ([],be,1&~Dt?-1:1)),e.a_(Gt,Gt,e.aZ([],Re,(Dt>>1&1)==1?1:-1)),e.a_(Gt,Gt,e.aZ([],je,(Dt>>2&1)==1?1:-1)),ft.push(Gt)}return new Fl(ft,[[...be,-e.b3(be,ft[0])],[...Re,-e.b3(Re,ft[0])],[...je,-e.b3(je,ft[0])],[-be[0],-be[1],-be[2],-e.b3(be,ft[7])],[-Re[0],-Re[1],-Re[2],-e.b3(Re,ft[7])],[-je[0],-je[1],-je[2],-e.b3(je,ft[7])]],Ze,ut)}intersectsFrustum(y){let N=!0,ie=this.points.length,fe=this.planes.length,be=y.planes.length,Re=y.points.length;for(let je=0;je=0&&ut++}if(ut===0)return 0;ut=0&&ut++}if(ut===0)return 0}return 1}intersectsPlane(y){let N=this.points.length,ie=0;for(let fe=0;fe=0&&ie++}return ie===N?2:ie===0?0:1}}function pl(pe,y,N){let ie=pe-y;return ie<0?-ie:Math.max(0,ie-N)}function $u(pe,y,N,ie,fe){let be=pe-N,Re;return Re=be<0?Math.min(-be,1+be-fe):be>fe?Math.min(Math.max(be-fe,0),1-be):0,Math.max(Re,pl(y,ie,fe))}class uu{constructor(){this._boundingVolumeCache=new xc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(y,N,ie,fe){let be=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(y,N,ie,fe){return this._boundingVolumeCache.getTileBoundingVolume(y,N,ie,fe)}_computeTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ut=new e.a3(y.z,N,y.z,y.x,y.y),ft=fe.terrain.getMinMaxElevation(ut);je=(be=ft.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=ft.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}if(je/=e.bD,Ze/=e.bD,je+=1,Ze+=1,y.z<=0)return Fl.fromAabb([-Ze,-Ze,-Ze],[Ze,Ze,Ze]);if(y.z===1)return Fl.fromAabb([y.x===0?-Ze:0,y.y===0?0:-Ze,-Ze],[y.x===0?0:Ze,y.y===0?Ze:0,Ze]);{let ut=[Pi(0,0,y.x,y.y,y.z),Pi(e.a6,0,y.x,y.y,y.z),Pi(e.a6,e.a6,y.x,y.y,y.z),Pi(0,e.a6,y.x,y.y,y.z)],ft=[];for(let Ra of ut)ft.push(e.aZ([],Ra,Ze));if(Ze!==je)for(let Ra of ut)ft.push(e.aZ([],Ra,je));y.y===0&&ft.push([0,1,0]),y.y===(1<=(1<{let fe=e.al(N.lat,-e.am,e.am),be=e.al(+ie,this.minZoom+ps(0,fe),this.maxZoom);return{center:new e.W(N.lng,fe),zoom:be}},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new uu}clone(){let y=new vs;return y.apply(this,!1),y}apply(y,N,ie){this._globeLatitudeErrorCorrectionRadians=ie||0,this._helper.apply(y,N)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let y=e.bz();return y[0]=this._cameraPosition[0],y[1]=this._cameraPosition[1],y[2]=this._cameraPosition[2],y}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(y){let{overscaledTileID:N,applyGlobeMatrix:ie}=y,fe=this._helper.getMercatorTileCoordinates(N);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:fe,clippingPlane:this._cachedClippingPlane,projectionTransition:ie?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(y){let N=this.pitchInRadians,ie=this.cameraToCenterDistance/y,fe=Math.sin(N)*ie,be=Math.cos(N)*ie+1,Re=1/Math.sqrt(fe*fe+be*be)*1,je=-fe,Ze=be,ut=Math.sqrt(je*je+Ze*Ze);je/=ut,Ze/=ut;let ft=[0,je,Ze];e.bF(ft,ft,[0,0,0],-this.bearingInRadians),e.bG(ft,ft,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(ft,ft,[0,0,0],this.center.lng*Math.PI/180);let Dt=1/e.b5(ft);return e.aZ(ft,ft,Dt),[...ft,-Re*Dt]}isLocationOccluded(y){return!this.isSurfacePointVisible(yo(y))}transformLightDirection(y){let N=this._helper._center.lng*Math.PI/180,ie=this._helper._center.lat*Math.PI/180,fe=Math.cos(ie),be=[Math.sin(N)*fe,Math.sin(ie),Math.cos(N)*fe],Re=[be[2],0,-be[0]],je=[0,0,0];e.b2(je,Re,be),e.b1(Re,Re),e.b1(je,je);let Ze=[0,0,0];return e.b1(Ze,[Re[0]*y[0]+je[0]*y[1]+be[0]*y[2],Re[1]*y[0]+je[1]*y[1]+be[1]*y[2],Re[2]*y[0]+je[2]*y[1]+be[2]*y[2]]),Ze}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(y,N,ie){let fe=function(je,Ze,ut){let ft=1/(1<be&&(be=Gt),Ktje&&(je=Kt)}let ft=[ut.lng+Re,ut.lat+Ze,ut.lng+be,ut.lat+je];return this.isSurfacePointOnScreen([0,1,0])&&(ft[3]=90,ft[0]=-180,ft[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(ft[1]=-90,ft[0]=-180,ft[2]=180),new q(ft)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){let ie=yo(this.unprojectScreenPoint(N)),fe=yo(y),be=e.bz();e.bK(be);let Re=e.bz();e.bH(Re,ie,be,-this.center.lng*Math.PI/180),e.bG(Re,Re,be,this.center.lat*Math.PI/180);let je=fe[0]*fe[0]+fe[2]*fe[2],Ze=Re[0]*Re[0];if(je=-ir&&st<=ir,Ar=Ut>=-ir&&Ut<=ir,hr,vr;if(dr&&Ar){let ka=this.center.lng*Math.PI/180,Ta=this.center.lat*Math.PI/180;e.bM(Dt,ka)+e.bM(st,Ta)=0}isSurfacePointOnScreen(y){if(!this.isSurfacePointVisible(y))return!1;let N=e.bE();return e.aE(N,[...y,1],this._globeViewProjMatrixNoCorrection),N[0]/=N[3],N[1]/=N[3],N[2]/=N[3],N[0]>-1&&N[0]<1&&N[1]>-1&&N[1]<1&&N[2]>-1&&N[2]<1}rayPlanetIntersection(y,N){let ie=e.b3(y,N),fe=e.bz(),be=e.bz();e.aZ(be,N,ie),e.b0(fe,y,be);let Re=1-e.b3(fe,fe);if(Re<0)return null;let je=e.b3(y,y)-1,Ze=-ie+(ie<0?1:-1)*Math.sqrt(Re),ut=je/Ze,ft=Ze;return{tMin:Math.min(ut,ft),tMax:Math.max(ut,ft)}}unprojectScreenPoint(y){let N=this._cameraPosition,ie=this.getRayDirectionFromPixel(y),fe=this.rayPlanetIntersection(N,ie);if(fe){let ft=e.bz();e.a_(ft,N,[ie[0]*fe.tMin,ie[1]*fe.tMin,ie[2]*fe.tMin]);let Dt=e.bz();return e.b1(Dt,ft),Dl(Dt)}let be=this._cachedClippingPlane,Re=be[0]*ie[0]+be[1]*ie[1]+be[2]*ie[2],je=-e.b9(be,N)/Re,Ze=e.bz();if(je>0)e.a_(Ze,N,[ie[0]*je,ie[1]*je,ie[2]*je]);else{let ft=e.bz();e.a_(ft,N,[2*ie[0],2*ie[1],2*ie[2]]);let Dt=e.b9(this._cachedClippingPlane,ft);e.b0(Ze,ft,[this._cachedClippingPlane[0]*Dt,this._cachedClippingPlane[1]*Dt,this._cachedClippingPlane[2]*Dt])}let ut=function(ft){let Dt=e.bz();return Dt[0]=ft[0]*-ft[3],Dt[1]=ft[1]*-ft[3],Dt[2]=ft[2]*-ft[3],{center:Dt,radius:Math.sqrt(1-ft[3]*ft[3])}}(be);return Dl(function(ft,Dt,Gt){let Kt=e.bz();e.b0(Kt,Gt,ft);let st=e.bz();return e.bx(st,ft,Kt,Dt/e.b7(Kt)),st}(ut.center,ut.radius,Ze))}getMatrixForModel(y,N){let ie=e.W.convert(y),fe=1/e.bD,be=e.bi();return e.bI(be,be,ie.lng/180*Math.PI),e.bf(be,be,-ie.lat/180*Math.PI),e.Q(be,be,[0,0,1+N/e.bD]),e.bf(be,be,.5*Math.PI),e.S(be,be,[fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:y});return N.tileMercatorCoords=[0,0,1,1],N}getFastPathSimpleProjectionMatrix(y){}}class os{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(y,N){this._globeness=y,this._globeLatitudeErrorCorrectionRadians=N,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(y){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(N,ie)=>this.currentTransform.defaultConstrain(N,ie),this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._globeness=1,this._mercatorTransform=new Eo,this._verticalPerspectiveTransform=new vs}clone(){let y=new os;return y._globeness=this._globeness,y._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,y.apply(this,!1),y}apply(y,N){this._helper.apply(y,N),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(y){let N=this._mercatorTransform.getProjectionData(y),ie=this._verticalPerspectiveTransform.getProjectionData(y);return{mainMatrix:this.isGlobeRendering?ie.mainMatrix:N.mainMatrix,clippingPlane:ie.clippingPlane,tileMercatorCoords:ie.tileMercatorCoords,projectionTransition:y.applyGlobeMatrix?this._globeness:0,fallbackMatrix:N.fallbackMatrix}}isLocationOccluded(y){return this.currentTransform.isLocationOccluded(y)}transformLightDirection(y){return this.currentTransform.transformLightDirection(y)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(y,N,ie){let fe=this._mercatorTransform.getPitchedTextCorrection(y,N,ie),be=this._verticalPerspectiveTransform.getPitchedTextCorrection(y,N,ie);return e.bt(fe,be,this._globeness)}projectTileCoordinates(y,N,ie,fe){return this.currentTransform.projectTileCoordinates(y,N,ie,fe)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(y){return this.currentTransform.calculateFogMatrix(y)}getVisibleUnwrappedCoordinates(y){return this.currentTransform.getVisibleUnwrappedCoordinates(y)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(y){this._mercatorTransform.recalculateZoomAndCenter(y),this._verticalPerspectiveTransform.recalculateZoomAndCenter(y)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(y,N){return this.currentTransform.lngLatToCameraDepth(y,N)}populateCache(y){this._mercatorTransform.populateCache(y),this._verticalPerspectiveTransform.populateCache(y)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(y,N),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(y,N),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(y,N){return this.currentTransform.locationToScreenPoint(y,N)}screenPointToMercatorCoordinate(y,N){return this.currentTransform.screenPointToMercatorCoordinate(y,N)}screenPointToLocation(y,N){return this.currentTransform.screenPointToLocation(y,N)}isPointOnMapSurface(y,N){return this.currentTransform.isPointOnMapSurface(y,N)}getRayDirectionFromPixel(y){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(y)}getMatrixForModel(y,N){return this.currentTransform.getMatrixForModel(y,N)}getProjectionDataForCustomLayer(y=!0){let N=this._mercatorTransform.getProjectionDataForCustomLayer(y);if(!this.isGlobeRendering)return N;let ie=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(y);return ie.fallbackMatrix=N.mainMatrix,ie}getFastPathSimpleProjectionMatrix(y){return this.currentTransform.getFastPathSimpleProjectionMatrix(y)}}class ms{get useGlobeControls(){return!0}handlePanInertia(y,N){let ie=dl(y,N);return Math.abs(ie.lng-N.center.lng)>180&&(ie.lng=N.center.lng+179.5*Math.sign(ie.lng-N.center.lng)),{easingCenter:ie,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(y,N){let ie=y.around,fe=N.screenPointToLocation(ie);y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta);let be=N.zoom;y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta);let Re=N.zoom-be;if(Re===0)return;let je=e.bJ(N.center.lng,fe.lng),Ze=je/(Math.abs(je/180)+1),ut=e.bJ(N.center.lat,fe.lat),ft=N.getRayDirectionFromPixel(ie),Dt=N.cameraPosition,Gt=-1*e.b3(Dt,ft),Kt=e.bz();e.a_(Kt,Dt,[ft[0]*Gt,ft[1]*Gt,ft[2]*Gt]);let st=e.b5(Kt)-1,It=Math.exp(.5*-Math.max(st-.3,0)),Ut=bs(N.worldSize,N.center.lat)/Math.min(N.width,N.height),ir=e.bw(Ut,.9,.5,1,.25),dr=(1-e.ao(-Re))*Math.min(It,ir),Ar=N.center.lat,hr=N.zoom,vr=new e.W(N.center.lng+Ze*dr,e.al(N.center.lat+ut*dr,-e.am,e.am));N.setLocationAtPoint(fe,ie);let Or=N.center,Cr=e.bw(Math.abs(je),45,85,0,1),ta=e.bw(Ut,.75,.35,0,1),ka=Math.pow(Math.max(Cr,ta),.25),Ta=e.bJ(Or.lng,vr.lng),Ra=e.bJ(Or.lat,vr.lat);N.setCenter(new e.W(Or.lng+Ta*ka,Or.lat+Ra*ka).wrap()),N.setZoom(hr+ps(Ar,N.center.lat))}handleMapControlsPan(y,N,ie){if(!y.panDelta)return;let fe=N.center.lat,be=N.zoom;N.setCenter(dl(y.panDelta,N).wrap()),N.setZoom(be+ps(fe,N.center.lat))}cameraForBoxAndBearing(y,N,ie,fe,be){let Re=jo(y,N,ie,fe,be),je=N.left/be.width*2-1,Ze=(be.width-N.right)/be.width*2-1,ut=N.top/be.height*-2+1,ft=(be.height-N.bottom)/be.height*-2+1,Dt=e.bJ(ie.getWest(),ie.getEast())<0,Gt=Dt?ie.getEast():ie.getWest(),Kt=Dt?ie.getWest():ie.getEast(),st=Math.max(ie.getNorth(),ie.getSouth()),It=Math.min(ie.getNorth(),ie.getSouth()),Ut=Gt+.5*e.bJ(Gt,Kt),ir=st+.5*e.bJ(st,It),dr=be.clone();dr.setCenter(Re.center),dr.setBearing(Re.bearing),dr.setPitch(0),dr.setRoll(0),dr.setZoom(Re.zoom);let Ar=dr.modelViewProjectionMatrix,hr=[yo(ie.getNorthWest()),yo(ie.getNorthEast()),yo(ie.getSouthWest()),yo(ie.getSouthEast()),yo(new e.W(Kt,ir)),yo(new e.W(Gt,ir)),yo(new e.W(Ut,st)),yo(new e.W(Ut,It))],vr=yo(Re.center),Or=Number.POSITIVE_INFINITY;for(let Cr of hr)je<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",je))),Ze>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",Ze))),ut>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ut))),ft<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ft)));if(Number.isFinite(Or)&&Or!==0)return Re.zoom=Math.min(dr.zoom+e.ar(Or),y.maxZoom),Re;Ao()}handleJumpToCenterZoom(y,N){let ie=y.center.lat,fe=y.applyConstrain(N.center?e.W.convert(N.center):y.center,y.zoom).center;y.setCenter(fe.wrap());let be=N.zoom!==void 0?+N.zoom:y.zoom+ps(ie,fe.lat);y.zoom!==be&&y.setZoom(be)}handleEaseTo(y,N){let ie=y.zoom,fe=y.center,be=y.padding,Re={roll:y.roll,pitch:y.pitch,bearing:y.bearing},je={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},Ze=N.zoom!==void 0,ut=!y.isPaddingEqual(N.padding),ft=!1,Dt=N.center?e.W.convert(N.center):fe,Gt=y.applyConstrain(Dt,ie).center;Vn(y,Gt);let Kt=y.clone();Kt.setCenter(Gt),Kt.setZoom(Ze?+N.zoom:ie+ps(fe.lat,Dt.lat)),Kt.setBearing(N.bearing);let st=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));Kt.setLocationAtPoint(Gt,st);let It=(N.offset&&N.offsetAsPoint.mag())>0?Kt.center:Gt,Ut=Ze?+N.zoom:ie+ps(fe.lat,It.lat),ir=ie+ps(fe.lat,0),dr=Ut+ps(It.lat,0),Ar=e.bJ(fe.lng,It.lng),hr=e.bJ(fe.lat,It.lat),vr=e.ao(dr-ir);return ft=Ut!==ie,{easeFunc:Or=>{if(e.bn(Re,je)||ds({startEulerAngles:Re,endEulerAngles:je,tr:y,k:Or,useSlerp:Re.roll!=je.roll}),ut&&y.interpolatePadding(be,N.padding,Or),N.around)e.w("Easing around a point is not supported under globe projection."),y.setLocationAtPoint(N.around,N.aroundPoint);else{let Cr=dr>ir?Math.min(2,vr):Math.max(.5,vr),ta=Math.pow(Cr,1-Or),ka=lu(fe,Ar,hr,Or*ta);y.setCenter(ka.wrap())}if(ft){let Cr=e.H.number(ir,dr,Or)+ps(0,y.center.lat);y.setZoom(Cr)}},isZooming:ft,elevationCenter:It}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.center,be=y.zoom,Re=y.padding,je=!y.isPaddingEqual(N.padding),Ze=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),be).center,ut=ie?+N.zoom:y.zoom+ps(y.center.lat,Ze.lat),ft=y.clone();ft.setCenter(Ze),ft.setZoom(ut),ft.setBearing(N.bearing);let Dt=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));ft.setLocationAtPoint(Ze,Dt);let Gt=ft.center;Vn(y,Gt);let Kt=function(hr,vr,Or){let Cr=yo(vr),ta=yo(Or),ka=e.b3(Cr,ta),Ta=Math.acos(ka),Ra=_o(hr);return Ta/(2*Math.PI)*Ra}(y,fe,Gt),st=be+ps(fe.lat,0),It=ut+ps(Gt.lat,0),Ut=e.ao(It-st),ir;if(typeof N.minZoom=="number"){let hr=+N.minZoom+ps(Gt.lat,0),vr=Math.min(hr,st,It)+ps(0,Gt.lat),Or=y.applyConstrain(Gt,vr).zoom+ps(Gt.lat,0);ir=e.ao(Or-st)}let dr=e.bJ(fe.lng,Gt.lng),Ar=e.bJ(fe.lat,Gt.lat);return{easeFunc:(hr,vr,Or,Cr)=>{let ta=lu(fe,dr,Ar,Or);je&&y.interpolatePadding(Re,N.padding,hr);let ka=hr===1?Gt:ta;y.setCenter(ka.wrap());let Ta=st+e.ar(vr);y.setZoom(hr===1?ut:Ta+ps(0,ka.lat))},scaleOfZoom:Ut,targetCenter:Gt,scaleOfMinZoom:ir,pixelPathLength:Kt}}static solveVectorScale(y,N,ie,fe,be){let Re=fe==="x"?[ie[0],ie[4],ie[8],ie[12]]:[ie[1],ie[5],ie[9],ie[13]],je=[ie[3],ie[7],ie[11],ie[15]],Ze=y[0]*Re[0]+y[1]*Re[1]+y[2]*Re[2],ut=y[0]*je[0]+y[1]*je[1]+y[2]*je[2],ft=N[0]*Re[0]+N[1]*Re[1]+N[2]*Re[2],Dt=N[0]*je[0]+N[1]*je[1]+N[2]*je[2];return ft+be*ut===Ze+be*Dt||je[3]*(Ze-ft)+Re[3]*(Dt-ut)+Ze*Dt==ft*ut?null:(ft+Re[3]-be*Dt-be*je[3])/(ft-Ze-be*Dt+be*ut)}static getLesserNonNegativeNonNull(y,N){return N!==null&&N>=0&&Ne.C(pe,y?.filter(N=>N.identifier!=="source.canvas")),zu=e.bN();class Ku extends e.E{constructor(y,N={}){var ie,fe;super(),this._rtlPluginLoaded=()=>{for(let Re in this.tileManagers){let je=this.tileManagers[Re].getSource().type;je!=="vector"&&je!=="geojson"||this.tileManagers[Re].reload()}},this.map=y,this.dispatcher=new ne(re(),y._getMapId()),this.dispatcher.registerMessageHandler("GG",(Re,je)=>this.getGlyphs(Re,je)),this.dispatcher.registerMessageHandler("GI",(Re,je)=>this.getImages(Re,je)),this.dispatcher.registerMessageHandler("GDA",(Re,je)=>this.getDashes(Re,je)),this.imageManager=new C,this.imageManager.setEventedParent(this);let be=((ie=y._container)===null||ie===void 0?void 0:ie.lang)||typeof document<"u"&&((fe=document.documentElement)===null||fe===void 0?void 0:fe.lang)||void 0;this.glyphManager=new x(y._requestManager,N.localIdeographFontFamily,be),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new Di,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),Ye().on(Ae,this._rtlPluginLoaded),this.on("data",Re=>{if(Re.dataType!=="source"||Re.sourceDataType!=="metadata")return;let je=this.tileManagers[Re.sourceId];if(!je)return;let Ze=je.getSource();if(Ze?.vectorLayerIds)for(let ut in this._layers){let ft=this._layers[ut];ft.source===Ze.id&&this._validateLayer(ft)}})}_setInitialValues(){var y;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((y=this.crossTileSymbolIndex)===null||y===void 0?void 0:y.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(y,N){var ie,fe,be;this._checkLoaded();let Re=N===null?(be=(fe=(ie=this.stylesheet.state)===null||ie===void 0?void 0:ie[y])===null||fe===void 0?void 0:fe.default)!==null&&be!==void 0?be:null:N;if(e.bQ(Re,this._globalState[y]))return this;this._globalState[y]=Re,this._applyGlobalStateChanges([y])}getGlobalState(){return this._globalState}setGlobalState(y){this._checkLoaded();let N=[];for(let ie in y)!e.bQ(this._globalState[ie],y[ie].default)&&(N.push(ie),this._globalState[ie]=y[ie].default);this._applyGlobalStateChanges(N)}_applyGlobalStateChanges(y){if(y.length===0)return;let N=new Set,ie={};for(let fe of y){ie[fe]=this._globalState[fe];for(let be in this._layers){let Re=this._layers[be],je=Re.getLayoutAffectingGlobalStateRefs(),Ze=Re.getPaintAffectingGlobalStateRefs(),ut=Re.getVisibilityAffectingGlobalStateRefs();if(je.has(fe)&&N.add(Re.source),Ze.has(fe))for(let{name:ft,value:Dt}of Ze.get(fe))this._updatePaintProperty(Re,ft,Dt);ut?.has(fe)&&(Re.recalculateVisibility(),this._updateLayer(Re))}}this.dispatcher.broadcast("UGS",ie);for(let fe in this.tileManagers)N.has(fe)&&(this._reloadSource(fe),this._changed=!0)}loadURL(y){return e._(this,arguments,void 0,function*(N,ie={},fe){this.fire(new e.n("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate,this._loadStyleRequest=new AbortController;let be=this._loadStyleRequest;try{let Re=yield this.map._requestManager.transformRequest(N,"Style");e.bR(be.signal);let je=yield e.k(Re,be);this._loadStyleRequest===be&&(this._loadStyleRequest=null),this._load(je.data,ie,fe)}catch(Re){this._loadStyleRequest===be&&(this._loadStyleRequest=null),Re&&!be.signal.aborted&&this.fire(new e.l(e.d(Re)))}})}loadJSON(y,N={},ie){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,N.validate=N.validate!==!1,this._load(y,N,ie)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(zu,{validate:!1})}_load(y,N,ie){var fe,be;let Re=N.transformStyle?N.transformStyle(ie,y):y;if(!N.validate||!Fu(this,e.F(Re))){Re=Object.assign({},Re),this._loaded=!0,this.stylesheet=Re;for(let je in Re.sources)this.addSource(je,Re.sources[je],{validate:!1});Re.sprite?this._loadSprite(Re.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Re.glyphs),this._createLayers(),this.light=new O(this.stylesheet.light),this._setProjectionInternal(((fe=this.stylesheet.projection)===null||fe===void 0?void 0:fe.type)||"mercator"),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((be=this.stylesheet.terrain)!==null&&be!==void 0?be:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var y,N,ie;let fe=e.bS(this.stylesheet.layers);this.setGlobalState((y=this.stylesheet.state)!==null&&y!==void 0?y:null),this.dispatcher.broadcast("SL",fe),this._order=fe.map(be=>be.id),this._layers={},this._serializedLayers=null;for(let be of fe){let Re=e.bT(be,this._globalState);if(Re.setEventedParent(this,{layer:{id:be.id}}),this._layers[be.id]=Re,e.bU(Re)&&this.tileManagers[Re.source]){let je=(ie=(N=be.paint)===null||N===void 0?void 0:N["raster-fade-duration"])!==null&&ie!==void 0?ie:Re.paint.get("raster-fade-duration");this.tileManagers[Re.source].setRasterFadeDuration(je)}}}_loadSprite(y,N=!1,ie=void 0){this.imageManager.setLoaded(!1);let fe=new AbortController,be;this._spriteRequest=fe,function(Re,je,Ze,ut){return e._(this,void 0,void 0,function*(){let ft=w(Re),Dt=Ze>1?"@2x":"",Gt={},Kt={};for(let{id:st,url:It}of ft){let Ut=yield je.transformRequest(S(It,Dt,".json"),"SpriteJSON");Gt[st]=e.k(Ut,ut);let ir=yield je.transformRequest(S(It,Dt,".png"),"SpriteImage");Kt[st]=v.getImage(ir,ut)}return yield Promise.all([...Object.values(Gt),...Object.values(Kt)]),function(st,It){return e._(this,void 0,void 0,function*(){let Ut={};for(let ir in st){Ut[ir]={};let dr=s.getImageCanvasContext((yield It[ir]).data),Ar=(yield st[ir]).data;for(let hr in Ar){let{width:vr,height:Or,x:Cr,y:ta,sdf:ka,pixelRatio:Ta,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ga,textFitHeight:da}=Ar[hr];Ut[ir][hr]={data:null,pixelRatio:Ta,sdf:ka,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ga,textFitHeight:da,spriteData:{width:vr,height:Or,x:Cr,y:ta,context:dr}}}}return Ut})}(Gt,Kt)})}(y,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Re=>{if(this._spriteRequest=null,Re)for(let je in Re){this._spritesImagesIds[je]=[];let Ze=this._spritesImagesIds[je]?this._spritesImagesIds[je].filter(ut=>!(ut in Re)):[];for(let ut of Ze)this.imageManager.removeImage(ut),this._changedImages[ut]=!0;for(let ut in Re[je]){let ft=je==="default"?ut:`${je}:${ut}`;this._spritesImagesIds[je].push(ft),ft in this.imageManager.images?this.imageManager.updateImage(ft,Re[je][ut],!1):this.imageManager.addImage(ft,Re[je][ut]),N&&(this._changedImages[ft]=!0)}}}).catch(Re=>{this._spriteRequest=null,be=Re,fe.signal.aborted||this.fire(new e.l(be))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),N&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),ie&&ie(be)})}_unloadSprite(){for(let y of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(y),this._changedImages[y]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(y){let N=this.tileManagers[y.source];if(!N)return;let ie=y.sourceLayer;if(!ie)return;let fe=N.getSource();(fe.type==="geojson"||fe.vectorLayerIds&&!fe.vectorLayerIds.includes(ie))&&this.fire(new e.l(new Error(`Source layer "${ie}" does not exist on source "${fe.id}" as specified by style layer "${y.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let y in this.tileManagers)if(!this.tileManagers[y].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(y,N=!1){let ie=this._serializedAllLayers();if(!y||y.length===0)return Object.values(N?e.bV(ie):ie);let fe=[];for(let be of y)if(ie[be]){let Re=N?e.bV(ie[be]):ie[be];fe.push(Re)}return fe}_serializedAllLayers(){let y=this._serializedLayers;if(y)return y;y=this._serializedLayers={};let N=Object.keys(this._layers);for(let ie of N){let fe=this._layers[ie];fe.type!=="custom"&&(y[ie]=fe.serialize())}return y}hasTransitions(){var y,N,ie;if(!((y=this.light)===null||y===void 0)&&y.hasTransition()||!((N=this.sky)===null||N===void 0)&&N.hasTransition()||!((ie=this.projection)===null||ie===void 0)&&ie.hasTransition())return!0;for(let fe in this.tileManagers)if(this.tileManagers[fe].hasTransition())return!0;for(let fe in this._layers)if(this._layers[fe].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(y){if(!this._loaded)return;let N=this._changed;if(N){let fe=Object.keys(this._updatedLayers),be=Object.keys(this._removedLayers);(fe.length||be.length)&&this._updateWorkerLayers(fe,be);for(let Re in this._updatedSources){let je=this._updatedSources[Re];if(je==="reload")this._reloadSource(Re);else{if(je!=="clear")throw new Error(`Invalid action ${je}`);this._clearSource(Re)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Re in this._updatedPaintProps)this._layers[Re].updateTransitions(y);this.light.updateTransitions(y),this.sky.updateTransitions(y),this._resetUpdates()}let ie={};for(let fe in this.tileManagers){let be=this.tileManagers[fe];ie[fe]=be.used,be.used=!1}for(let fe of this._order){let be=this._layers[fe];be.recalculate(y,this._availableImages),!be.isHidden(y.zoom)&&be.source&&(this.tileManagers[be.source].used=!0)}for(let fe in ie){let be=this.tileManagers[fe];!!ie[fe]!=!!be.used&&be.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:fe}))}this.light.recalculate(y),this.sky.recalculate(y),this.projection.recalculate(y),this.z=y.zoom,N&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let y=Object.keys(this._changedImages);if(y.length){for(let N in this.tileManagers)this.tileManagers[N].reloadTilesForDependencies(["icons","patterns"],y);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let y in this.tileManagers)this.tileManagers[y].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(y,N){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(y,!1),removedIds:N})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(y,N={}){var ie;this._checkLoaded();let fe=this.serialize();if(y=N.transformStyle?N.transformStyle(fe,y):y,((ie=N.validate)===null||ie===void 0||ie)&&Fu(this,e.F(y)))return!1;(y=e.bV(y)).layers=e.bS(y.layers);let be=e.bW(fe,y),Re=this._getOperationsToPerform(be);if(Re.unimplemented.length>0)throw new Error(`Unimplemented: ${Re.unimplemented.join(", ")}.`);if(Re.operations.length===0)return!1;for(let je of Re.operations)je();return this.stylesheet=y,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(y){let N=[],ie=[];for(let fe of y)switch(fe.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":N.push(()=>this.addLayer.apply(this,fe.args));break;case"removeLayer":N.push(()=>this.removeLayer.apply(this,fe.args));break;case"setPaintProperty":N.push(()=>this.setPaintProperty.apply(this,fe.args));break;case"setLayoutProperty":N.push(()=>this.setLayoutProperty.apply(this,fe.args));break;case"setFilter":N.push(()=>this.setFilter.apply(this,fe.args));break;case"addSource":N.push(()=>this.addSource.apply(this,fe.args));break;case"removeSource":N.push(()=>this.removeSource.apply(this,fe.args));break;case"setLayerZoomRange":N.push(()=>this.setLayerZoomRange.apply(this,fe.args));break;case"setLight":N.push(()=>this.setLight.apply(this,fe.args));break;case"setGeoJSONSourceData":N.push(()=>this.setGeoJSONSourceData.apply(this,fe.args));break;case"setGlyphs":N.push(()=>this.setGlyphs.apply(this,fe.args));break;case"setSprite":N.push(()=>this.setSprite.apply(this,fe.args));break;case"setTerrain":N.push(()=>this.map.setTerrain.apply(this,fe.args));break;case"setSky":N.push(()=>this.setSky.apply(this,fe.args));break;case"setProjection":this.setProjection.apply(this,fe.args);break;case"setGlobalState":N.push(()=>this.setGlobalState.apply(this,fe.args));break;case"setTransition":N.push(()=>{});break;default:ie.push(fe.command)}return{operations:N,unimplemented:ie}}addImage(y,N){if(this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" already exists.`)));this.imageManager.addImage(y,N),this._afterImageUpdated(y)}updateImage(y,N){this.imageManager.updateImage(y,N)}getImage(y){return this.imageManager.getImage(y)}removeImage(y){if(!this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" does not exist.`)));this.imageManager.removeImage(y),this._afterImageUpdated(y)}_afterImageUpdated(y){this._availableImages=this.imageManager.listImages(),this._changedImages[y]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(y,N,ie={}){var fe;if(this._checkLoaded(),this.tileManagers[y]!==void 0)throw new Error(`Source "${y}" already exists.`);if(!N.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(N).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(N.type)&&this._validate(e.F.source,`sources.${y}`,N,null,ie))return;!((fe=this.map)===null||fe===void 0)&&fe._collectResourceTiming&&(N.collectResourceTiming=!0);let be=this.tileManagers[y]=new Sr(y,N,this.dispatcher);be.style=this,be.setEventedParent(this,()=>({isSourceLoaded:be.loaded(),source:be.serialize(),sourceId:y})),be.onAdd(this.map),this._changed=!0}removeSource(y){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);for(let ie in this._layers)if(this._layers[ie].source===y)return this.fire(new e.l(new Error(`Source "${y}" cannot be removed while layer "${ie}" is using it.`)));let N=this.tileManagers[y];delete this.tileManagers[y],delete this._updatedSources[y],N.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:y})),N.setEventedParent(null),N.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(y,N){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);let ie=this.tileManagers[y].getSource();if(ie.type!=="geojson")throw new Error(`geojsonSource.type is ${ie.type}, which is !== 'geojson`);ie.setData(N),this._changed=!0}getSource(y){var N;return(N=this.tileManagers[y])===null||N===void 0?void 0:N.getSource()}addLayer(y,N,ie={}){this._checkLoaded();let fe=y.id;if(this.getLayer(fe))return void this.fire(new e.l(new Error(`Layer "${fe}" already exists on this map.`)));let be;if(y.type==="custom"){if(Fu(this,e.bX(y)))return;be=e.bT(y,this._globalState)}else{if("source"in y&&typeof y.source=="object"&&(this.addSource(fe,y.source),y=e.bV(y),y=e.e(y,{source:fe})),this._validate(e.F.layer,`layers.${fe}`,y,{arrayIndex:-1},ie))return;be=e.bT(y,this._globalState),this._validateLayer(be),be.setEventedParent(this,{layer:{id:fe}})}let Re=N?this._order.indexOf(N):this._order.length;if(N&&Re===-1)this.fire(new e.l(new Error(`Cannot add layer "${fe}" before non-existing layer "${N}".`)));else{if(this._order.splice(Re,0,fe),this._layerOrderChanged=!0,this._layers[fe]=be,this._removedLayers[fe]&&be.source&&be.type!=="custom"){let je=this._removedLayers[fe];delete this._removedLayers[fe],je.type!==be.type?this._updatedSources[be.source]="clear":(this._updatedSources[be.source]="reload",this.tileManagers[be.source].pause())}this._updateLayer(be),be.onAdd&&be.onAdd(this.map)}}moveLayer(y,N){if(this._checkLoaded(),this._changed=!0,!this._layers[y])return void this.fire(new e.l(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));if(y===N)return;let ie=this._order.indexOf(y);this._order.splice(ie,1);let fe=N?this._order.indexOf(N):this._order.length;N&&fe===-1?this.fire(new e.l(new Error(`Cannot move layer "${y}" before non-existing layer "${N}".`))):(this._order.splice(fe,0,y),this._layerOrderChanged=!0)}removeLayer(y){this._checkLoaded();let N=this._layers[y];if(!N)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${y}".`)));N.setEventedParent(null);let ie=this._order.indexOf(y);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[y]=N,delete this._layers[y],this._serializedLayers&&delete this._serializedLayers[y],delete this._updatedLayers[y],delete this._updatedPaintProps[y],N.onRemove&&N.onRemove(this.map)}getLayer(y){return this._layers[y]}getLayersOrder(){return[...this._order]}hasLayer(y){return y in this._layers}setLayerZoomRange(y,N,ie){this._checkLoaded();let fe=this.getLayer(y);fe?fe.minzoom===N&&fe.maxzoom===ie||(N!=null&&(fe.minzoom=N),ie!=null&&(fe.maxzoom=ie),this._updateLayer(fe)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)))}setFilter(y,N,ie={}){this._checkLoaded();let fe=this.getLayer(y);if(fe){if(!e.bQ(fe.filter,N))return N==null?(fe.setFilter(void 0),void this._updateLayer(fe)):void(this._validate(e.F.filter,`layers.${fe.id}.filter`,N,null,ie)||(fe.setFilter(e.bV(N)),this._updateLayer(fe)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${y}".`)))}getFilter(y){return e.bV(this.getLayer(y).filter)}setLayoutProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getLayoutProperty(N),ie)||(be.setLayoutProperty(N,ie,fe),this._updateLayer(be)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}getLayoutProperty(y,N){let ie=this.getLayer(y);if(ie)return ie.getLayoutProperty(N);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${y}".`)))}setPaintProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getPaintProperty(N),ie)||this._updatePaintProperty(be,N,ie,fe):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}_updatePaintProperty(y,N,ie,fe={}){y.setPaintProperty(N,ie,fe)&&this._updateLayer(y),e.bU(y)&&N==="raster-fade-duration"&&this.tileManagers[y.source].setRasterFadeDuration(ie),this._changed=!0,this._updatedPaintProps[y.id]=!0,this._serializedLayers=null}getPaintProperty(y,N){return this.getLayer(y).getPaintProperty(N)}setFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=y.sourceLayer,be=this.tileManagers[ie];if(be===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let Re=be.getSource().type;Re==="geojson"&&fe?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Re!=="vector"||fe?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),be.setFeatureState(fe,y.id,N)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=this.tileManagers[ie];if(fe===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let be=fe.getSource().type,Re=be==="vector"?y.sourceLayer:void 0;be!=="vector"||Re?N&&typeof y.id!="string"&&typeof y.id!="number"?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):fe.removeFeatureState(Re,y.id,N):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(y){this._checkLoaded();let N=y.source,ie=y.sourceLayer,fe=this.tileManagers[N];if(fe!==void 0)return fe.getSource().type!=="vector"||ie?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),fe.getFeatureState(ie,y.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${N}' does not exist in the map's style.`)))}getTransition(){var y;return e.e({duration:300,delay:0},(y=this.stylesheet)===null||y===void 0?void 0:y.transition)}serialize(){if(!this._loaded)return;let y=e.bY(this.tileManagers,be=>be.serialize()),N=this._serializeByIds(this._order,!0),ie=this.map.getTerrain()||void 0,fe=this.stylesheet;return e.bZ({version:fe.version,name:fe.name,metadata:fe.metadata,light:fe.light,sky:fe.sky,center:fe.center,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,sprite:fe.sprite,glyphs:fe.glyphs,transition:fe.transition,projection:fe.projection,sources:y,layers:N,terrain:ie},be=>be!==void 0)}_updateLayer(y){this._updatedLayers[y.id]=!0,y.source&&!this._updatedSources[y.source]&&this.tileManagers[y.source].getSource().type!=="raster"&&(this._updatedSources[y.source]="reload",this.tileManagers[y.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(y){let N=Re=>this._layers[Re].type==="fill-extrusion",ie={},fe=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je)){ie[je]=Re;for(let Ze of y){let ut=Ze[je];if(ut)for(let ft of ut)fe.push(ft)}}}fe.sort((Re,je)=>je.intersectionZ-Re.intersectionZ);let be=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je))for(let Ze=fe.length-1;Ze>=0;Ze--){let ut=fe[Ze].feature;if(ie[ut.layer.id]this.map.terrain.getElevation(ft,Dt,Gt):void 0));return this.placement&&be.push(function(ut,ft,Dt,Gt,Kt,st,It){let Ut={},ir=st.queryRenderedSymbols(Gt),dr=[];for(let Ar of Object.keys(ir).map(Number))dr.push(It[Ar]);dr.sort(K);for(let Ar of dr){let hr=Ar.featureIndex.lookupSymbolFeatures(ir[Ar.bucketInstanceId],ft,Ar.bucketIndex,Ar.sourceLayerIndex,{filterSpec:Kt.filter,globalState:Kt.globalState},Kt.layers,Kt.availableImages,ut);for(let vr in hr){Ut[vr]||(Ut[vr]=[]);let Or=hr[vr];Or.sort((Cr,ta)=>{let ka=Ar.featureSortOrder;if(ka){let Ta=ka.indexOf(Cr.featureIndex);return ka.indexOf(ta.featureIndex)-Ta}return ta.featureIndex-Cr.featureIndex});for(let Cr of Or)Ut[vr].push(Cr)}}return function(Ar,hr,vr){for(let Or in Ar)for(let Cr of Ar[Or])H(Cr,vr[hr[Or].source]);return Ar}(Ut,ut,Dt)}(this._layers,Re,this.tileManagers,y,Ze,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(be)}querySourceFeatures(y,N){N?.filter&&this._validate(e.F.filter,"querySourceFeatures.filter",N.filter,null,N);let ie=this.tileManagers[y];return ie?function(fe,be){let Re=fe.getRenderableIds().map(ut=>fe.getTileByID(ut)),je=[],Ze={};for(let ut of Re){let ft=ut.tileID.canonical.key;Ze[ft]||(Ze[ft]=!0,ut.querySourceFeatures(je,be))}return je}(ie,N?Object.assign(Object.assign({},N),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(y,N={}){this._checkLoaded();let ie=this.light.getLight(),fe=!1;for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(y,N),this.light.updateTransitions(be)}getProjection(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.projection}setProjection(y){this._checkLoaded();let N=y??{type:"mercator"};if(this.stylesheet.projection=y,this.projection){if(this.projection.name===N.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(N.type)}getSky(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.sky}setSky(y,N={}){this._checkLoaded();let ie=this.getSky(),fe=!1;if(!y&&!ie)return;if(y&&!ie)fe=!0;else if(!y&&ie)fe=!0;else for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=y,this.sky.setSky(y,N),this.sky.updateTransitions(be)}_setProjectionInternal(y){let N=function(ie,fe){let be={constrainOverride:fe};if(Array.isArray(ie)){let Re=new Bo({type:ie});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}switch(ie){case"mercator":return{projection:new io,transform:new Eo(be),cameraHelper:new Wo};case"globe":{let Re=new Bo({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}case"vertical-perspective":return{projection:new Vs,transform:new vs(be),cameraHelper:new ms};default:return e.w(`Unknown projection name: ${ie}. Falling back to mercator projection.`),{projection:new io,transform:new Eo(be),cameraHelper:new Wo}}}(y,this.map.transformConstrain);this.projection=N.projection,this.map.migrateProjection(N.transform,N.cameraHelper);for(let ie in this.tileManagers)this.tileManagers[ie].reload()}_validate(y,N,ie,fe,be={}){return be?.validate!==!1&&Fu(this,y.call(e.F,e.e({key:N,style:this.serialize(),value:ie,styleSpec:e.x},fe)))}_remove(y=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Ye().off(Ae,this._rtlPluginLoaded);for(let N in this._layers)this._layers[N].setEventedParent(null);for(let N in this.tileManagers){let ie=this.tileManagers[N];ie.setEventedParent(null),ie.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),y&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(y)}_clearSource(y){this.tileManagers[y].clearTiles()}_reloadSource(y){this.tileManagers[y].resume(),this.tileManagers[y].reload()}_updateSources(y){for(let N in this.tileManagers)this.tileManagers[N].update(y,this.map.terrain)}_generateCollisionBoxes(){for(let y in this.tileManagers)this._reloadSource(y)}_updatePlacement(y,N,ie,fe,be=!1){let Re=!1,je=!1,Ze={};for(let ut of this._order){let ft=this._layers[ut];if(ft.type!=="symbol")continue;if(!Ze[ft.source]){let Gt=this.tileManagers[ft.source];Ze[ft.source]=Gt.getRenderableIds(!0).map(Kt=>Gt.getTileByID(Kt)).sort((Kt,st)=>st.tileID.overscaledZ-Kt.tileID.overscaledZ||(Kt.tileID.isLessThan(st.tileID)?-1:1))}let Dt=this.crossTileSymbolIndex.addLayer(ft,Ze[ft.source],y.center.lng);Re||(Re=Dt)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),be||(be=this._layerOrderChanged||ie===0),(be||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(m(),y.zoom))&&(this.pauseablePlacement=new ai(y,this.map.terrain,this._order,be,N,ie,fe,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ze),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(m()),je=!0),Re&&this.pauseablePlacement.placement.setStale()),je||Re)for(let ut of this._order){let ft=this._layers[ut];ft.type==="symbol"&&this.placement.updateLayerOpacities(ft,Ze[ft.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(m())}_releaseSymbolFadeTiles(){for(let y in this.tileManagers)this.tileManagers[y].releaseSymbolFadeTiles()}getImages(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.imageManager.getImages(N.icons);this._updateTilesForChangedImages();let fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,N.icons),ie})}getGlyphs(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.glyphManager.getGlyphs(N.stacks),fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,[""]),ie})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(y,N={}){this._checkLoaded(),y&&this._validate(e.F.glyphs,"glyphs",y,null,N)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=y,this.glyphManager.entries={},this.glyphManager.setURL(y))}getDashes(y,N){return e._(this,void 0,void 0,function*(){let ie={};for(let[fe,be]of Object.entries(N.dashes))ie[fe]=this.lineAtlas.getDash(be.dasharray,be.round);return ie})}addSprite(y,N,ie={},fe){this._checkLoaded();let be=[{id:y,url:N}],Re=[...w(this.stylesheet.sprite),...be];this._validate(e.F.sprite,"sprite",Re,null,ie)||(this.stylesheet.sprite=Re,this._loadSprite(be,!0,fe))}removeSprite(y){this._checkLoaded();let N=w(this.stylesheet.sprite);if(N.find(ie=>ie.id===y)){if(this._spritesImagesIds[y])for(let ie of this._spritesImagesIds[y])this.imageManager.removeImage(ie),this._changedImages[ie]=!0;N.splice(N.findIndex(ie=>ie.id===y),1),this.stylesheet.sprite=N.length>0?N:void 0,delete this._spritesImagesIds[y],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${y}" doesn't exists on this map.`)))}getSprite(){return w(this.stylesheet.sprite)}setSprite(y,N={},ie){this._checkLoaded(),y&&this._validate(e.F.sprite,"sprite",y,null,N)||(this.stylesheet.sprite=y,y?this._loadSprite(y,!0,ie):(this._unloadSprite(),ie&&ie(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let y in this.tileManagers){let N=this.tileManagers[y];N.setEventedParent(null),N.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let y in this._layers){let N=this._layers[y];N.setEventedParent(null),N.onRemove&&N.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var bc=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Lh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(y,N,ie,fe,be,Re,je,Ze,ut){this.context=y;let ft=this.boundPaintVertexBuffers.length!==fe.length;for(let Dt=0;!ft&&Dt({u_texture:0,u_ele_delta:pe,u_fog_matrix:y,u_fog_color:N?N.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:N?N.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:fe?0:N?N.calculateFogBlendOpacity(ie):0,u_horizon_color:N?N.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:N?N.properties.get("horizon-fog-blend"):1,u_is_globe_mode:fe?1:0}),Ju={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function ss(pe){let y=[];for(let N of pe){if(N===null)continue;let ie=N.split(" ");y.push(ie.pop())}return y}class ah{constructor(y,N,ie,fe,be,Re,je,Ze,ut=[]){let ft=y.gl;this.program=ft.createProgram();let Dt=ss(N.staticAttributes),Gt=ie?ie.getBinderAttributes():[],Kt=Dt.concat(Gt),st=Ai.prelude.staticUniforms?ss(Ai.prelude.staticUniforms):[],It=je.staticUniforms?ss(je.staticUniforms):[],Ut=N.staticUniforms?ss(N.staticUniforms):[],ir=ie?ie.getBinderUniforms():[],dr=st.concat(It).concat(Ut).concat(ir),Ar=[];for(let Ta of dr)Ar.includes(Ta)||Ar.push(Ta);let hr=ie?ie.defines():[];Ko(ft)&&hr.unshift("#version 300 es"),be&&hr.push("#define OVERDRAW_INSPECTOR;"),Re&&hr.push("#define TERRAIN3D;"),Ze&&hr.push(Ze),ut&&hr.push(...ut);let vr=hr.concat(Ai.prelude.fragmentSource,je.fragmentSource,N.fragmentSource).join(` -`),Or=hr.concat(Ai.prelude.vertexSource,je.vertexSource,N.vertexSource).join(` -`);Ko(ft)||(vr=function(Ta){return Ta.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(vr),Or=function(Ta){return Ta.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Or));let Cr=ft.createShader(ft.FRAGMENT_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(Cr,vr),ft.compileShader(Cr),!ft.getShaderParameter(Cr,ft.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ft.getShaderInfoLog(Cr)}`);ft.attachShader(this.program,Cr);let ta=ft.createShader(ft.VERTEX_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(ta,Or),ft.compileShader(ta),!ft.getShaderParameter(ta,ft.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ft.getShaderInfoLog(ta)}`);ft.attachShader(this.program,ta),this.attributes={};let ka={};this.numAttributes=Kt.length;for(let Ta=0;Ta({u_depth:new e.b_(Ta,Ra.u_depth),u_terrain:new e.b_(Ta,Ra.u_terrain),u_terrain_dim:new e.bp(Ta,Ra.u_terrain_dim),u_terrain_matrix:new e.c0(Ta,Ra.u_terrain_matrix),u_terrain_unpack:new e.c1(Ta,Ra.u_terrain_unpack),u_terrain_exaggeration:new e.bp(Ta,Ra.u_terrain_exaggeration)}))(y,ka),this.projectionUniforms=((Ta,Ra)=>({u_projection_matrix:new e.c0(Ta,Ra.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(Ta,Ra.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(Ta,Ra.u_projection_clipping_plane),u_projection_transition:new e.bp(Ta,Ra.u_projection_transition),u_projection_fallback_matrix:new e.c0(Ta,Ra.u_projection_fallback_matrix)}))(y,ka),this.binderUniforms=ie?ie.getUniforms(y,ka):[]}draw(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar){var hr;let vr=y.gl;if(this.failedToCreate)return;if(y.program.set(this.program),y.setDepthMode(ie),y.setStencilMode(fe),y.setColorMode(be),y.setCullFace(Re),Ze){y.activeTexture.set(vr.TEXTURE2),vr.bindTexture(vr.TEXTURE_2D,Ze.depthTexture),y.activeTexture.set(vr.TEXTURE3),vr.bindTexture(vr.TEXTURE_2D,Ze.texture);for(let Cr in this.terrainUniforms)this.terrainUniforms[Cr].set(Ze[Cr])}if(ut)for(let Cr in ut)this.projectionUniforms[Ju[Cr]].set(ut[Cr]);if(je)for(let Cr in this.fixedUniforms)this.fixedUniforms[Cr].set(je[Cr]);Ut&&Ut.setUniforms(y,this.binderUniforms,st,{zoom:It});let Or=0;switch(N){case vr.LINES:Or=2;break;case vr.TRIANGLES:Or=3;break;case vr.LINE_STRIP:Or=1}for(let Cr of Kt.get())Cr.vaos||(Cr.vaos={}),(hr=Cr.vaos)[ft]||(hr[ft]=new Lh),Cr.vaos[ft].bind(y,this,Dt,Ut?Ut.getPaintVertexBuffers():[],Gt,Cr.vertexOffset,ir,dr,Ar),vr.drawElements(N,Cr.primitiveLength*Or,vr.UNSIGNED_SHORT,Cr.primitiveOffset*Or*2)}}function wc(pe,y,N){let ie=1/e.aK(N,1,y.transform.tileZoom),fe=Math.pow(2,N.tileID.overscaledZ),be=N.tileSize*Math.pow(2,y.transform.tileZoom)/fe,Re=be*(N.tileID.canonical.x+N.tileID.wrap*fe),je=be*N.tileID.canonical.y;return{u_image:0,u_texsize:N.imageAtlasTexture.size,u_scale:[ie,pe.fromScale,pe.toScale],u_fade:pe.t,u_pixel_coord_upper:[Re>>16,je>>16],u_pixel_coord_lower:[65535&Re,65535&je]}}let pc=(pe,y,N,ie)=>{let fe=pe.style.light,be=fe.properties.get("position"),Re=[be.x,be.y,be.z],je=e.c4();fe.properties.get("anchor")==="viewport"&&e.c5(je,pe.transform.bearingInRadians),e.c6(Re,Re,je);let Ze=pe.transform.transformLightDirection(Re),ut=fe.properties.get("color");return{u_lightpos:Re,u_lightpos_globe:Ze,u_lightintensity:fe.properties.get("intensity"),u_lightcolor:[ut.r,ut.g,ut.b],u_vertical_gradient:+y,u_opacity:N,u_fill_translate:ie}},Nf=(pe,y,N,ie,fe,be,Re)=>e.e(pc(pe,y,N,ie),wc(be,pe,Re),{u_height_factor:-Math.pow(2,fe.overscaledZ)/Re.tileSize/8}),Bu=(pe,y,N,ie)=>e.e(wc(y,pe,N),{u_fill_translate:ie}),Tc=(pe,y)=>({u_world:pe,u_fill_translate:y}),Ou=(pe,y,N,ie,fe)=>e.e(Bu(pe,y,N,fe),{u_world:ie}),Gc=(pe,y,N,ie,fe)=>{let be=pe.transform,Re,je,Ze=0;if(N.paint.get("circle-pitch-alignment")==="map"){let ut=e.aK(y,1,be.zoom);Re=!0,je=[ut,ut],Ze=ut/(e.a6*Math.pow(2,y.tileID.overscaledZ))*2*Math.PI*fe}else Re=!1,je=be.pixelsToGLUnits;return{u_camera_to_center_distance:be.cameraToCenterDistance,u_scale_with_map:+(N.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+Re,u_device_pixel_ratio:pe.pixelRatio,u_extrude_scale:je,u_globe_extrude_scale:Ze,u_translate:ie}},pf=pe=>({u_pixel_extrude_scale:[1/pe.width,1/pe.height]}),$l=pe=>({u_viewport_size:[pe.width,pe.height]}),jf=(pe,y=1)=>({u_color:pe,u_overlay:0,u_overlay_scale:y}),Hc=(pe,y,N,ie)=>{let fe=e.aK(pe,1,y)/(e.a6*Math.pow(2,pe.tileID.overscaledZ))*2*Math.PI*ie;return{u_extrude_scale:e.aK(pe,1,y),u_intensity:N,u_globe_extrude_scale:fe}},Wc=(pe,y,N,ie)=>{let fe=e.O();e.c7(fe,0,pe.width,pe.height,0,0,1);let be=pe.context.gl;return{u_matrix:fe,u_world:[be.drawingBufferWidth,be.drawingBufferHeight],u_image:N,u_color_ramp:ie,u_opacity:y.paint.get("heatmap-opacity")}},Qu=(pe,y,N)=>{let ie=N.paint.get("hillshade-accent-color"),fe;switch(N.paint.get("hillshade-method")){case"basic":fe=4;break;case"combined":fe=1;break;case"igor":fe=2;break;case"multidirectional":fe=3;break;default:fe=0}let be=N.getIlluminationProperties();for(let Re=0;Re{let N=y.stride,ie=e.O();return e.c7(ie,0,e.a6,-e.a6,0,0,1),e.Q(ie,ie,[0,-e.a6,0]),{u_matrix:ie,u_image:1,u_dimension:[N,N],u_zoom:pe.overscaledZ,u_unpack:y.getUnpackVector()}};function Nu(pe,y){let N=Math.pow(2,y.canonical.z),ie=y.canonical.y;return[new e.a7(0,ie/N).toLngLat().lat,new e.a7(0,(ie+1)/N).toLngLat().lat]}let Uf=(pe,y,N=0)=>({u_image:0,u_unpack:y.getUnpackVector(),u_dimension:[y.stride,y.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:N,u_opacity:pe.paint.get("color-relief-opacity")}),al=(pe,y,N,ie)=>{let fe=pe.transform;return{u_translation:cu(pe,y,N),u_ratio:ie/e.aK(y,1,fe.zoom),u_device_pixel_ratio:pe.pixelRatio,u_units_to_pixels:[1/fe.pixelsToGLUnits[0],1/fe.pixelsToGLUnits[1]]}},Xc=(pe,y,N,ie,fe)=>e.e(al(pe,y,N,ie),{u_image:0,u_image_height:fe}),ju=(pe,y,N,ie,fe)=>{let be=pe.transform,Re=ec(y,be);return{u_translation:cu(pe,y,N),u_texsize:y.imageAtlasTexture.size,u_ratio:ie/e.aK(y,1,be.zoom),u_device_pixel_ratio:pe.pixelRatio,u_image:0,u_scale:[Re,fe.fromScale,fe.toScale],u_fade:fe.t,u_units_to_pixels:[1/be.pixelsToGLUnits[0],1/be.pixelsToGLUnits[1]]}},Ac=(pe,y,N,ie,fe)=>{let be=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_tileratio:be,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image:0,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})},Zc=(pe,y,N,ie,fe,be)=>{let Re=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_image:0,u_image_height:be,u_tileratio:Re,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image_dash:1,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})};function ec(pe,y){return 1/e.aK(pe,1,y.tileZoom)}function cu(pe,y,N){return e.aL(pe.transform,y,N.paint.get("line-translate"),N.paint.get("line-translate-anchor"))}let tc=(pe,y,N,ie,fe)=>{return{u_tl_parent:pe,u_scale_parent:y,u_buffer_scale:1,u_fade_t:N.mix,u_opacity:N.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(Re=ie.paint.get("raster-saturation"),Re>0?1-1/(1.001-Re):-Re),u_contrast_factor:(be=ie.paint.get("raster-contrast"),be>0?1/(1-be):1+be),u_spin_weights:vf(ie.paint.get("raster-hue-rotate")),u_coords_top:[fe[0].x,fe[0].y,fe[1].x,fe[1].y],u_coords_bottom:[fe[3].x,fe[3].y,fe[2].x,fe[2].y]};var be,Re};function vf(pe){pe*=Math.PI/180;let y=Math.sin(pe),N=Math.cos(pe);return[(2*N+1)/3,(-Math.sqrt(3)*y-N+1)/3,(Math.sqrt(3)*y-N+1)/3]}let Tu=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>{let Kt=Re.transform;return{u_is_size_zoom_constant:+(pe==="constant"||pe==="source"),u_is_size_feature_constant:+(pe==="constant"||pe==="camera"),u_size_t:y?y.uSizeT:0,u_size:y?y.uSize:0,u_camera_to_center_distance:Kt.cameraToCenterDistance,u_pitch:Kt.pitch/360*2*Math.PI,u_rotate_symbol:+N,u_aspect_ratio:Kt.width/Kt.height,u_fade_change:Re.options.fadeDuration?Re.symbolFadeChange:1,u_label_plane_matrix:je,u_coord_matrix:Ze,u_is_text:+ft,u_pitch_with_map:+ie,u_is_along_line:fe,u_is_variable_anchor:be,u_texsize:Dt,u_texture:0,u_translation:ut,u_pitched_scale:Gt}},nh=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt)=>{let st=Re.transform;return e.e(Tu(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Kt),{u_gamma_scale:ie?Math.cos(st.pitch*Math.PI/180)*st.cameraToCenterDistance:1,u_device_pixel_ratio:Re.pixelRatio,u_is_halo:Gt?1:0,u_is_plain:1})},vl=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>e.e(nh(pe,y,N,ie,fe,be,Re,je,Ze,ut,!0,ft,!0,Gt),{u_texsize_icon:Dt,u_texture_icon:1}),ml=(pe,y)=>({u_opacity:pe,u_color:y}),rc=(pe,y,N,ie,fe)=>e.e(function(be,Re,je,Ze){let ut=je.imageManager.getPattern(be.from.toString()),ft=je.imageManager.getPattern(be.to.toString()),{width:Dt,height:Gt}=je.imageManager.getPixelSize(),Kt=Math.pow(2,Ze.tileID.overscaledZ),st=Ze.tileSize*Math.pow(2,je.transform.tileZoom)/Kt,It=st*(Ze.tileID.canonical.x+Ze.tileID.wrap*Kt),Ut=st*Ze.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ut.tl,u_pattern_br_a:ut.br,u_pattern_tl_b:ft.tl,u_pattern_br_b:ft.br,u_texsize:[Dt,Gt],u_mix:Re.t,u_pattern_size_a:ut.displaySize,u_pattern_size_b:ft.displaySize,u_scale_a:Re.fromScale,u_scale_b:Re.toScale,u_tile_units_to_pixels:1/e.aK(Ze,1,je.transform.tileZoom),u_pixel_coord_upper:[It>>16,Ut>>16],u_pixel_coord_lower:[65535&It,65535&Ut]}}(N,fe,y,ie),{u_opacity:pe}),yl=(pe,y)=>{},qf={fillExtrusion:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillExtrusionPattern:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_height_factor:new e.bp(pe,y.u_height_factor),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),fill:(pe,y)=>({u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillPattern:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutline:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutlinePattern:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),circle:(pe,y)=>({u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_scale_with_map:new e.b_(pe,y.u_scale_with_map),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_extrude_scale:new e.c3(pe,y.u_extrude_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale),u_translate:new e.c3(pe,y.u_translate)}),collisionBox:(pe,y)=>({u_pixel_extrude_scale:new e.c3(pe,y.u_pixel_extrude_scale)}),collisionCircle:(pe,y)=>({u_viewport_size:new e.c3(pe,y.u_viewport_size)}),debug:(pe,y)=>({u_color:new e.b$(pe,y.u_color),u_overlay:new e.b_(pe,y.u_overlay),u_overlay_scale:new e.bp(pe,y.u_overlay_scale)}),depth:yl,clippingMask:yl,heatmap:(pe,y)=>({u_extrude_scale:new e.bp(pe,y.u_extrude_scale),u_intensity:new e.bp(pe,y.u_intensity),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale)}),heatmapTexture:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_color_ramp:new e.b_(pe,y.u_color_ramp),u_opacity:new e.bp(pe,y.u_opacity)}),hillshade:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_latrange:new e.c3(pe,y.u_latrange),u_exaggeration:new e.bp(pe,y.u_exaggeration),u_altitudes:new e.c9(pe,y.u_altitudes),u_azimuths:new e.c9(pe,y.u_azimuths),u_accent:new e.b$(pe,y.u_accent),u_method:new e.b_(pe,y.u_method),u_shadows:new e.c8(pe,y.u_shadows),u_highlights:new e.c8(pe,y.u_highlights)}),hillshadePrepare:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_image:new e.b_(pe,y.u_image),u_dimension:new e.c3(pe,y.u_dimension),u_zoom:new e.bp(pe,y.u_zoom),u_unpack:new e.c1(pe,y.u_unpack)}),colorRelief:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_unpack:new e.c1(pe,y.u_unpack),u_dimension:new e.c3(pe,y.u_dimension),u_elevation_stops:new e.b_(pe,y.u_elevation_stops),u_color_stops:new e.b_(pe,y.u_color_stops),u_color_ramp_size:new e.b_(pe,y.u_color_ramp_size),u_opacity:new e.bp(pe,y.u_opacity)}),line:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels)}),lineGradient:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height)}),linePattern:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_texsize:new e.c3(pe,y.u_texsize),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_image:new e.b_(pe,y.u_image),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),lineSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_mix:new e.bp(pe,y.u_mix),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),lineGradientSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_image_dash:new e.b_(pe,y.u_image_dash),u_mix:new e.bp(pe,y.u_mix),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),raster:(pe,y)=>({u_tl_parent:new e.c3(pe,y.u_tl_parent),u_scale_parent:new e.bp(pe,y.u_scale_parent),u_buffer_scale:new e.bp(pe,y.u_buffer_scale),u_fade_t:new e.bp(pe,y.u_fade_t),u_opacity:new e.bp(pe,y.u_opacity),u_image0:new e.b_(pe,y.u_image0),u_image1:new e.b_(pe,y.u_image1),u_brightness_low:new e.bp(pe,y.u_brightness_low),u_brightness_high:new e.bp(pe,y.u_brightness_high),u_saturation_factor:new e.bp(pe,y.u_saturation_factor),u_contrast_factor:new e.bp(pe,y.u_contrast_factor),u_spin_weights:new e.c2(pe,y.u_spin_weights),u_coords_top:new e.c1(pe,y.u_coords_top),u_coords_bottom:new e.c1(pe,y.u_coords_bottom)}),symbolIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolSDF:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_is_plain:new e.b_(pe,y.u_is_plain),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolTextAndIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texsize_icon:new e.c3(pe,y.u_texsize_icon),u_texture:new e.b_(pe,y.u_texture),u_texture_icon:new e.b_(pe,y.u_texture_icon),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),background:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_color:new e.b$(pe,y.u_color)}),backgroundPattern:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_image:new e.b_(pe,y.u_image),u_pattern_tl_a:new e.c3(pe,y.u_pattern_tl_a),u_pattern_br_a:new e.c3(pe,y.u_pattern_br_a),u_pattern_tl_b:new e.c3(pe,y.u_pattern_tl_b),u_pattern_br_b:new e.c3(pe,y.u_pattern_br_b),u_texsize:new e.c3(pe,y.u_texsize),u_mix:new e.bp(pe,y.u_mix),u_pattern_size_a:new e.c3(pe,y.u_pattern_size_a),u_pattern_size_b:new e.c3(pe,y.u_pattern_size_b),u_scale_a:new e.bp(pe,y.u_scale_a),u_scale_b:new e.bp(pe,y.u_scale_b),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(pe,y.u_tile_units_to_pixels)}),terrain:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_ele_delta:new e.bp(pe,y.u_ele_delta),u_fog_matrix:new e.c0(pe,y.u_fog_matrix),u_fog_color:new e.b$(pe,y.u_fog_color),u_fog_ground_blend:new e.bp(pe,y.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(pe,y.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon_fog_blend:new e.bp(pe,y.u_horizon_fog_blend),u_is_globe_mode:new e.bp(pe,y.u_is_globe_mode)}),terrainDepth:(pe,y)=>({u_ele_delta:new e.bp(pe,y.u_ele_delta)}),terrainCoords:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_terrain_coords_id:new e.bp(pe,y.u_terrain_coords_id),u_ele_delta:new e.bp(pe,y.u_ele_delta)}),projectionErrorMeasurement:(pe,y)=>({u_input:new e.bp(pe,y.u_input),u_output_expected:new e.bp(pe,y.u_output_expected)}),atmosphere:(pe,y)=>({u_sun_pos:new e.c2(pe,y.u_sun_pos),u_atmosphere_blend:new e.bp(pe,y.u_atmosphere_blend),u_globe_position:new e.c2(pe,y.u_globe_position),u_globe_radius:new e.bp(pe,y.u_globe_radius),u_inv_proj_matrix:new e.c0(pe,y.u_inv_proj_matrix)}),sky:(pe,y)=>({u_sky_color:new e.b$(pe,y.u_sky_color),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon:new e.c3(pe,y.u_horizon),u_horizon_normal:new e.c3(pe,y.u_horizon_normal),u_sky_horizon_blend:new e.bp(pe,y.u_sky_horizon_blend),u_sky_blend:new e.bp(pe,y.u_sky_blend)})};class ac{constructor(y,N,ie){this.context=y;let fe=y.gl;this.buffer=fe.createBuffer(),this.dynamicDraw=!!ie,this.context.unbindVAO(),y.bindElementBuffer.set(this.buffer),fe.bufferData(fe.ELEMENT_ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?fe.DYNAMIC_DRAW:fe.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(y){let N=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),N.bufferSubData(N.ELEMENT_ARRAY_BUFFER,0,y.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Mc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class mf{constructor(y,N,ie,fe){this.length=N.length,this.attributes=ie,this.itemSize=N.bytesPerElement,this.dynamicDraw=fe,this.context=y;let be=y.gl;this.buffer=be.createBuffer(),y.bindVertexBuffer.set(this.buffer),be.bufferData(be.ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?be.DYNAMIC_DRAW:be.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(y){if(y.length!==this.length)throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);let N=this.context.gl;this.bind(),N.bufferSubData(N.ARRAY_BUFFER,0,y.arrayBuffer)}enableAttributes(y,N){for(let ie of this.attributes){let fe=N.attributes[ie.name];fe!==void 0&&y.enableVertexAttribArray(fe)}}setVertexAttribPointers(y,N,ie){for(let fe of this.attributes){let be=N.attributes[fe.name];be!==void 0&&y.vertexAttribPointer(be,fe.components,y[Mc[fe.type]],!1,this.itemSize,fe.offset+this.itemSize*(ie||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Jo{constructor(y){this.gl=y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(y){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ih extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.clearColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class fu extends Jo{getDefault(){return 1}set(y){(y!==this.current||this.dirty)&&(this.gl.clearDepth(y),this.current=y,this.dirty=!1)}}class Sl extends Jo{getDefault(){return 0}set(y){(y!==this.current||this.dirty)&&(this.gl.clearStencil(y),this.current=y,this.dirty=!1)}}class El extends Jo{getDefault(){return[!0,!0,!0,!0]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.colorMask(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class oh extends Jo{getDefault(){return!0}set(y){(y!==this.current||this.dirty)&&(this.gl.depthMask(y),this.current=y,this.dirty=!1)}}class Au extends Jo{getDefault(){return 255}set(y){(y!==this.current||this.dirty)&&(this.gl.stencilMask(y),this.current=y,this.dirty=!1)}}class $c extends Jo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(y){let N=this.current;(y.func!==N.func||y.ref!==N.ref||y.mask!==N.mask||this.dirty)&&(this.gl.stencilFunc(y.func,y.ref,y.mask),this.current=y,this.dirty=!1)}}class _l extends Jo{getDefault(){let y=this.gl;return[y.KEEP,y.KEEP,y.KEEP]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||this.dirty)&&(this.gl.stencilOp(y[0],y[1],y[2]),this.current=y,this.dirty=!1)}}class nl extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.STENCIL_TEST):N.disable(N.STENCIL_TEST),this.current=y,this.dirty=!1}}class gf extends Jo{getDefault(){return[0,1]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.depthRange(y[0],y[1]),this.current=y,this.dirty=!1)}}class Kc extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.DEPTH_TEST):N.disable(N.DEPTH_TEST),this.current=y,this.dirty=!1}}class sh extends Jo{getDefault(){return this.gl.LESS}set(y){(y!==this.current||this.dirty)&&(this.gl.depthFunc(y),this.current=y,this.dirty=!1)}}class hu extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.BLEND):N.disable(N.BLEND),this.current=y,this.dirty=!1}}class Uu extends Jo{getDefault(){let y=this.gl;return[y.ONE,y.ZERO]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.blendFunc(y[0],y[1]),this.current=y,this.dirty=!1)}}class qu extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.blendColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class nc extends Jo{getDefault(){return this.gl.FUNC_ADD}set(y){(y!==this.current||this.dirty)&&(this.gl.blendEquation(y),this.current=y,this.dirty=!1)}}class yf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.CULL_FACE):N.disable(N.CULL_FACE),this.current=y,this.dirty=!1}}class _f extends Jo{getDefault(){return this.gl.BACK}set(y){(y!==this.current||this.dirty)&&(this.gl.cullFace(y),this.current=y,this.dirty=!1)}}class Mu extends Jo{getDefault(){return this.gl.CCW}set(y){(y!==this.current||this.dirty)&&(this.gl.frontFace(y),this.current=y,this.dirty=!1)}}class ic extends Jo{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}}class Sc extends Jo{getDefault(){return this.gl.TEXTURE0}set(y){(y!==this.current||this.dirty)&&(this.gl.activeTexture(y),this.current=y,this.dirty=!1)}}class Vu extends Jo{getDefault(){let y=this.gl;return[0,0,y.drawingBufferWidth,y.drawingBufferHeight]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.viewport(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class xo extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindFramebuffer(N.FRAMEBUFFER,y),this.current=y,this.dirty=!1}}class Ec extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindRenderbuffer(N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class xh extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindTexture(N.TEXTURE_2D,y),this.current=y,this.dirty=!1}}class Vf extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindBuffer(N.ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class xf extends Jo{getDefault(){return null}set(y){let N=this.gl;N.bindBuffer(N.ELEMENT_ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class Gf extends Jo{getDefault(){return null}set(y){var N;if(y===this.current&&!this.dirty)return;let ie=this.gl;Ko(ie)?ie.bindVertexArray(y):(N=ie.getExtension("OES_vertex_array_object"))===null||N===void 0||N.bindVertexArrayOES(y),this.current=y,this.dirty=!1}}class bh extends Jo{getDefault(){return 4}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_ALIGNMENT,y),this.current=y,this.dirty=!1}}class Hf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),this.current=y,this.dirty=!1}}class il extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,y),this.current=y,this.dirty=!1}}class kl extends Jo{constructor(y,N){super(y),this.context=y,this.parent=N}getDefault(){return null}}class kc extends kl{setDirty(){this.dirty=!0}set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,y,0),this.current=y,this.dirty=!1}}class Cc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class Lc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_STENCIL_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}let vc="Framebuffer is not complete";class Ft{constructor(y,N,ie,fe,be){this.context=y,this.width=N,this.height=ie;let Re=y.gl,je=this.framebuffer=Re.createFramebuffer();if(this.colorAttachment=new kc(y,je),fe)this.depthAttachment=be?new Lc(y,je):new Cc(y,je);else if(be)throw new Error("Stencil cannot be set without depth");if(Re.checkFramebufferStatus(Re.FRAMEBUFFER)!==Re.FRAMEBUFFER_COMPLETE)throw new Error(vc)}destroy(){let y=this.context.gl,N=this.colorAttachment.get();if(N&&y.deleteTexture(N),this.depthAttachment){let ie=this.depthAttachment.get();ie&&y.deleteRenderbuffer(ie)}y.deleteFramebuffer(this.framebuffer)}}class tr{constructor(y){var N,ie;if(this.gl=y,this.clearColor=new ih(this),this.clearDepth=new fu(this),this.clearStencil=new Sl(this),this.colorMask=new El(this),this.depthMask=new oh(this),this.stencilMask=new Au(this),this.stencilFunc=new $c(this),this.stencilOp=new _l(this),this.stencilTest=new nl(this),this.depthRange=new gf(this),this.depthTest=new Kc(this),this.depthFunc=new sh(this),this.blend=new hu(this),this.blendFunc=new Uu(this),this.blendColor=new qu(this),this.blendEquation=new nc(this),this.cullFace=new yf(this),this.cullFaceSide=new _f(this),this.frontFace=new Mu(this),this.program=new ic(this),this.activeTexture=new Sc(this),this.viewport=new Vu(this),this.bindFramebuffer=new xo(this),this.bindRenderbuffer=new Ec(this),this.bindTexture=new xh(this),this.bindVertexBuffer=new Vf(this),this.bindElementBuffer=new xf(this),this.bindVertexArray=new Gf(this),this.pixelStoreUnpack=new bh(this),this.pixelStoreUnpackPremultiplyAlpha=new Hf(this),this.pixelStoreUnpackFlipY=new il(this),this.extTextureFilterAnisotropic=y.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE),Ko(y)){this.HALF_FLOAT=y.HALF_FLOAT;let fe=y.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(N=y.RGBA16F)!==null&&N!==void 0?N:fe?.RGBA16F_EXT,this.RGB16F=(ie=y.RGB16F)!==null&&ie!==void 0?ie:fe?.RGB16F_EXT,y.getExtension("EXT_color_buffer_float")}else{y.getExtension("EXT_color_buffer_half_float"),y.getExtension("OES_texture_half_float_linear");let fe=y.getExtension("OES_texture_half_float");this.HALF_FLOAT=fe?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(y,N){return new ac(this,y,N)}createVertexBuffer(y,N,ie){return new mf(this,y,N,ie)}createRenderbuffer(y,N,ie){let fe=this.gl,be=fe.createRenderbuffer();return this.bindRenderbuffer.set(be),fe.renderbufferStorage(fe.RENDERBUFFER,y,N,ie),this.bindRenderbuffer.set(null),be}createFramebuffer(y,N,ie,fe){return new Ft(this,y,N,ie,fe)}clear({color:y,depth:N,stencil:ie}){let fe=this.gl,be=0;y&&(be|=fe.COLOR_BUFFER_BIT,this.clearColor.set(y),this.colorMask.set([!0,!0,!0,!0])),N!==void 0&&(be|=fe.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(N),this.depthMask.set(!0)),ie!==void 0&&(be|=fe.STENCIL_BUFFER_BIT,this.clearStencil.set(ie),this.stencilMask.set(255)),fe.clear(be)}setCullFace(y){y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(y.mode),this.frontFace.set(y.frontFace))}setDepthMode(y){y.func!==this.gl.ALWAYS||y.mask?(this.depthTest.set(!0),this.depthFunc.set(y.func),this.depthMask.set(y.mask),this.depthRange.set(y.range)):this.depthTest.set(!1)}setStencilMode(y){y.test.func!==this.gl.ALWAYS||y.mask?(this.stencilTest.set(!0),this.stencilMask.set(y.mask),this.stencilOp.set([y.fail,y.depthFail,y.pass]),this.stencilFunc.set({func:y.test.func,ref:y.ref,mask:y.test.mask})):this.stencilTest.set(!1)}setColorMode(y){e.bQ(y.blendFunction,to.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(y.blendFunction),this.blendColor.set(y.blendColor)),this.colorMask.set(y.mask)}createVertexArray(){var y;return Ko(this.gl)?this.gl.createVertexArray():(y=this.gl.getExtension("OES_vertex_array_object"))===null||y===void 0?void 0:y.createVertexArrayOES()}deleteVertexArray(y){var N;Ko(this.gl)?this.gl.deleteVertexArray(y):(N=this.gl.getExtension("OES_vertex_array_object"))===null||N===void 0||N.deleteVertexArrayOES(y)}unbindVAO(){this.bindVertexArray.set(null)}}let Fr;function wr(pe,y,N,ie,fe){var be,Re;let je=pe.context,Ze=pe.transform,ut=je.gl,ft=pe.useProgram("collisionBox"),Dt=[],Gt=0,Kt=0;for(let Ar of ie){let hr=y.getTile(Ar).getBucket(N);if(!hr)continue;let vr=fe?hr.textCollisionBox:hr.iconCollisionBox,Or=hr.collisionCircleArray;Or.length>0&&(Dt.push({circleArray:Or,circleOffset:Kt,coord:Ar}),Gt+=Or.length/4,Kt=Gt),vr&&ft.draw(je,ut.LINES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,pf(pe.transform),(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),Ze.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),N.id,vr.layoutVertexBuffer,vr.indexBuffer,vr.segments,null,pe.transform.zoom,null,null,vr.collisionVertexBuffer)}if(!fe||!Dt.length)return;let st=pe.useProgram("collisionCircle"),It=new e.ca;It.resize(4*Gt),It._trim();let Ut=0;for(let Ar of Dt)for(let hr=0;hr=0&&(It[ir.associatedIconIndex]={shiftedAnchor:da,angle:Fa})}else Ja(ir.numGlyphs,Kt)}if(Ze){st.clear();let Ut=pe.icon.placedSymbolArray;for(let ir=0;irpe.style.map.terrain.getElevation(ga,mo,ru):null,Ll=N.layout.get("text-rotation-alignment")==="map";La(Fa,pe,fe,Wi,Go,Ar,ut,Ll,ga.toUnwrapped(),ir.width,ir.height,Mo,Ys)}let Ws=fe&&ka||So,Zo=hr||Ws?ea:Ar?Wi:pe.transform.clipSpaceToPixelsMatrix,es=Dn&&N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(1)!==0,$o;$o=Dn?Fa.iconsInText?vl(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,Rn,so,Ra):nh(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,es,Ra):Tu(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,Ra);let _s={program:sn,buffers:za,uniformValues:$o,projectionData:zs,atlasTexture:In,atlasTextureIcon:ti,atlasInterpolation:Jn,atlasInterpolationIcon:Ei,isSDF:Dn,hasHalo:es};if(Or&&Fa.canOverlap){Cr=!0;let Go=za.segments.get();for(let Ys of Go)Ta.push({segments:new e.aV([Ys]),sortKey:Ys.sortKey,state:_s,terrainData:Pn})}else Ta.push({segments:za.segments,sortKey:0,state:_s,terrainData:Pn})}Cr&&Ta.sort((ga,da)=>ga.sortKey-da.sortKey);let ua=(st=N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&st!==void 0?st:1/0,ia=N.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||ua>1;for(let ga of Ta){let da=ga.state;It.activeTexture.set(Ut.TEXTURE0),da.atlasTexture.bind(da.atlasInterpolation,Ut.CLAMP_TO_EDGE),da.atlasTextureIcon&&(It.activeTexture.set(Ut.TEXTURE1),da.atlasTextureIcon&&da.atlasTextureIcon.bind(da.atlasInterpolationIcon,Ut.CLAMP_TO_EDGE));let Fa=da.isSDF&&da.hasHalo;if(Fa){let za=da.uniformValues;za.u_is_halo=1,ia&&(za.u_is_plain=0,Da(da.buffers,ga.segments,N,pe,da.program,ta,ft,Dt,za,da.projectionData,ga.terrainData),za.u_is_halo=0,za.u_is_plain=1)}Da(da.buffers,ga.segments,N,pe,da.program,ta,ft,Dt,da.uniformValues,da.projectionData,ga.terrainData),Fa&&!ia&&(da.uniformValues.u_is_halo=0)}}function Da(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft){let Dt=ie.context;fe.draw(Dt,Dt.gl.TRIANGLES,be,Re,je,pi.backCCW,Ze,ft,ut,N.id,pe.layoutVertexBuffer,pe.indexBuffer,y,N.paint,ie.transform.zoom,pe.programConfigurations.get(N.id),pe.dynamicLayoutVertexBuffer,pe.opacityVertexBuffer)}function Ha(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=Xi.disabled,Ze=new to([Re.ONE,Re.ONE],e.bo.transparent,[!0,!0,!0,!0]),ut=y.getBucket(N);if(!ut)return;let ft=ie.key,Dt=N.heatmapFbos.get(ft);Dt||(Dt=vn(be,y.tileSize,y.tileSize),N.heatmapFbos.set(ft,Dt)),be.bindFramebuffer.set(Dt.framebuffer),be.viewport.set([0,0,y.tileSize,y.tileSize]),be.clear({color:e.bo.transparent});let Gt=ut.programConfigurations.get(N.id),Kt=pe.useProgram("heatmap",Gt,!fe),st=pe.transform.getProjectionData({overscaledTileID:y.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),It=pe.style.map.terrain.getTerrainData(ie);Kt.draw(be,Re.TRIANGLES,Vi.disabled,je,Ze,pi.disabled,Hc(y,pe.transform.zoom,N.paint.get("heatmap-intensity"),1),It,st,N.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,N.paint,pe.transform.zoom,Gt)}function $a(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=pe.transform;be.setColorMode(pe.colorModeForRenderPass());let Ze=En(be,y),ut=N.key,ft=y.heatmapFbos.get(ut);if(!ft)return;be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,ft.colorAttachment.get()),be.activeTexture.set(Re.TEXTURE1),Ze.bind(Re.LINEAR,Re.CLAMP_TO_EDGE);let Dt=je.getProjectionData({overscaledTileID:N,applyTerrainMatrix:fe,applyGlobeMatrix:!ie});pe.useProgram("heatmapTexture").draw(be,Re.TRIANGLES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,Wc(pe,y,0,1),null,Dt,y.id,pe.rasterBoundsBuffer,pe.quadTriangleIndexBuffer,pe.rasterBoundsSegments,y.paint,je.zoom),ft.destroy(),y.heatmapFbos.delete(ut)}function vn(pe,y,N){var ie,fe;let be=pe.gl,Re=be.createTexture();be.bindTexture(be.TEXTURE_2D,Re),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 je=(ie=pe.HALF_FLOAT)!==null&&ie!==void 0?ie:be.UNSIGNED_BYTE,Ze=(fe=pe.RGBA16F)!==null&&fe!==void 0?fe:be.RGBA;be.texImage2D(be.TEXTURE_2D,0,Ze,y,N,0,be.RGBA,je,null);let ut=pe.createFramebuffer(y,N,!1,!1);return ut.colorAttachment.set(Re),ut}function En(pe,y){return y.colorRampTexture||(y.colorRampTexture=new e.T(pe,y.colorRamp,pe.gl.RGBA)),y.colorRampTexture}function yi(pe,y,N,ie,fe,be,Re,je){let Ze=256;if(fe.stepInterpolant){let ut=y.getSource().maxzoom,ft=Re.canonical.z===ut?Math.ceil(1<pe.options.anisotropicFilterPitch&&Kt.texParameterf(Kt.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax);let ga=(ft=pe.style.map.terrain)===null||ft===void 0?void 0:ft.getTerrainData(Cr),da=It.getProjectionData({overscaledTileID:Cr,aligned:dr,applyGlobeMatrix:!ut,applyTerrainMatrix:!0}),Fa=tc(ua,Ra,ia.fadeMix,N,je),za=Ut.getMeshFromTileID(Gt,Cr.canonical,be,Re,"raster");st.draw(Gt,Kt.TRIANGLES,ta,fe?fe[Cr.overscaledZ]:Xi.disabled,ir,Ze?pi.frontCCW:pi.backCCW,Fa,ga,da,N.id,za.vertexBuffer,za.indexBuffer,za.segments)}}function Gs(pe,y,N,ie){let fe={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(N===0||ie)return fe;if(pe.fadingParentID){let be=y.getLoadedTile(pe.fadingParentID);if(!be)return fe;let Re=Math.pow(2,be.tileID.overscaledZ-pe.tileID.overscaledZ),je=[pe.tileID.canonical.x*Re%1,pe.tileID.canonical.y*Re%1],Ze=function(ut,ft,Dt){let Gt=m(),Kt=(Gt-ft.timeAdded)/Dt,st=ut.fadingDirection===gt.Incoming,It=e.al((Gt-ut.timeAdded)/Dt,0,1),Ut=e.al(1-Kt,0,1),ir=st?It:Ut;return{tileOpacity:ir,parentTileOpacity:st?Ut:It,fadeMix:{opacity:1,mix:1-ir}}}(pe,be,N);return{parentTile:be,parentScaleBy:Re,parentTopLeft:je,fadeValues:Ze}}if(pe.selfFading){let be=function(Re,je){let Ze=(m()-Re.timeAdded)/je,ut=e.al(Ze,0,1);return{tileOpacity:ut,fadeMix:{opacity:ut,mix:0}}}(pe,N);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:be}}return fe}let Es=new e.bo(1,0,0,1),ns=new e.bo(0,1,0,1),Kn=new e.bo(0,0,1,1),zo=new e.bo(1,0,1,1),gs=new e.bo(0,1,1,1);function js(pe,y,N,ie){zl(pe,0,y+N/2,pe.transform.width,N,ie)}function Cl(pe,y,N,ie){zl(pe,y-N/2,0,N,pe.transform.height,ie)}function zl(pe,y,N,ie,fe,be){let Re=pe.context,je=Re.gl;je.enable(je.SCISSOR_TEST),je.scissor(y*pe.pixelRatio,N*pe.pixelRatio,ie*pe.pixelRatio,fe*pe.pixelRatio),Re.clear({color:be}),je.disable(je.SCISSOR_TEST)}function Kl(pe,y,N){var ie;let fe=pe.context,be=fe.gl,Re=pe.useProgram("debug"),je=Vi.disabled,Ze=Xi.disabled,ut=pe.colorModeForRenderPass(),ft="$debug",Dt=(ie=pe.style.map.terrain)===null||ie===void 0?void 0:ie.getTerrainData(N);fe.activeTexture.set(be.TEXTURE0);let Gt=y.getTileByID(N.key).latestRawTileData,Kt=Math.floor((Gt?.byteLength||0)/1024),st=y.getTile(N).tileSize,It=512/Math.min(st,512)*(N.overscaledZ/pe.transform.zoom)*.5,Ut=N.canonical.toString();N.overscaledZ!==N.canonical.z&&(Ut+=` => ${N.overscaledZ}`),function(dr,Ar){dr.initDebugOverlayCanvas();let hr=dr.debugOverlayCanvas,vr=dr.context.gl,Or=dr.debugOverlayCanvas.getContext("2d");Or.clearRect(0,0,hr.width,hr.height),Or.shadowColor="white",Or.shadowBlur=2,Or.lineWidth=1.5,Or.strokeStyle="white",Or.textBaseline="top",Or.font="bold 36px Open Sans, sans-serif",Or.fillText(Ar,5,5),Or.strokeText(Ar,5,5),dr.debugOverlayTexture.update(hr),dr.debugOverlayTexture.bind(vr.LINEAR,vr.CLAMP_TO_EDGE)}(pe,`${Ut} ${Kt}kB`);let ir=pe.transform.getProjectionData({overscaledTileID:N,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(fe,be.TRIANGLES,je,Ze,to.alphaBlended,pi.disabled,jf(e.bo.transparent,It),null,ir,ft,pe.debugBuffer,pe.quadTriangleIndexBuffer,pe.debugSegments),Re.draw(fe,be.LINE_STRIP,je,Ze,ut,pi.disabled,jf(e.bo.red),Dt,ir,ft,pe.debugBuffer,pe.tileBorderIndexBuffer,pe.debugSegments)}function Gu(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=be.gl,je=pe.transform,Ze=pe.colorModeForRenderPass(),ut=pe.getDepthModeFor3D(),ft=pe.useProgram("terrain");be.bindFramebuffer.set(null),be.viewport.set([0,0,pe.width,pe.height]);for(let Dt of N){let Gt=y.getTerrainMesh(Dt.tileID),Kt=pe.renderToTexture.getTexture(Dt),st=y.getTerrainData(Dt.tileID);be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,Kt.texture);let It=y.getMeshFrameDelta(je.zoom),Ut=je.calculateFogMatrix(Dt.tileID.toUnwrapped()),ir=rh(It,Ut,pe.style.sky,je.pitch,fe),dr=je.getProjectionData({overscaledTileID:Dt.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ft.draw(be,Re.TRIANGLES,ut,Xi.disabled,Ze,pi.backCCW,ir,st,dr,"terrain",Gt.vertexBuffer,Gt.indexBuffer,Gt.segments)}}function xl(pe,y){if(!y.mesh){let N=new e.aU;N.emplaceBack(-1,-1),N.emplaceBack(1,-1),N.emplaceBack(1,1),N.emplaceBack(-1,1);let ie=new e.aW;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),y.mesh=new Xn(pe.createVertexBuffer(N,eo.members),pe.createIndexBuffer(ie),e.aV.simpleSegment(0,0,N.length,ie.length))}return y.mesh}let Hu={symbol:function(pe,y,N,ie,fe,be){if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=be,je=Xi.disabled,Ze=pe.colorModeForRenderPass();(N._unevaluatedLayout.hasValue("text-variable-anchor")||N._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ut,ft,Dt,Gt,Kt,st,It,Ut,ir){var dr;let Ar=ft.transform,hr=ft.style.map.terrain,vr=Kt==="map",Or=st==="map";for(let Cr of ut){let ta=Gt.getTile(Cr),ka=ta.getBucket(Dt);if(!(!((dr=ka?.text)===null||dr===void 0)&&dr.segments.get().length))continue;let Ta=e.aw(ka.textSizeData,Ar.zoom),Ra=e.aK(ta,1,ft.transform.zoom),ua=cr(vr,ft.transform,Ra),ia=Dt.layout.get("icon-text-fit")!=="none"&&ka.hasIconData();if(Ta){let ga=Math.pow(2,Ar.zoom-ta.tileID.overscaledZ),da=hr?(Fa,za)=>hr.getElevation(Cr,Fa,za):null;Na(ka,vr,Or,ir,Ar,ua,ga,Ta,ia,e.aL(Ar,ta,It,Ut),Cr.toUnwrapped(),da)}}}(ie,pe,N,y,N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),fe),N.paint.get("icon-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!1,N.paint.get("icon-translate"),N.paint.get("icon-translate-anchor"),N.layout.get("icon-rotation-alignment"),N.layout.get("icon-pitch-alignment"),N.layout.get("icon-keep-upright"),je,Ze,Re),N.paint.get("text-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!0,N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.layout.get("text-keep-upright"),je,Ze,Re),y.map.showCollisionBoxes&&(wr(pe,y,N,ie,!0),wr(pe,y,N,ie,!1))},circle:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("circle-opacity"),Ze=N.paint.get("circle-stroke-width"),ut=N.paint.get("circle-stroke-opacity"),ft=!N.layout.get("circle-sort-key").isConstant();if(je.constantOr(1)===0&&(Ze.constantOr(1)===0||ut.constantOr(1)===0))return;let Dt=pe.context,Gt=Dt.gl,Kt=pe.transform,st=pe.getDepthModeForSublayer(0,Vi.ReadOnly),It=Xi.disabled,Ut=pe.colorModeForRenderPass(),ir=[],dr=Kt.getCircleRadiusCorrection();for(let Ar of ie){let hr=y.getTile(Ar),vr=hr.getBucket(N);if(!vr)continue;let Or=N.paint.get("circle-translate"),Cr=N.paint.get("circle-translate-anchor"),ta=e.aL(Kt,hr,Or,Cr),ka=vr.programConfigurations.get(N.id),Ta=pe.useProgram("circle",ka),Ra=vr.layoutVertexBuffer,ua=vr.indexBuffer,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),ga={programConfiguration:ka,program:Ta,layoutVertexBuffer:Ra,indexBuffer:ua,uniformValues:Gc(pe,hr,N,ta,dr),terrainData:ia,projectionData:Kt.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!Re,applyTerrainMatrix:!0})};if(ft){let da=vr.segments.get();for(let Fa of da)ir.push({segments:new e.aV([Fa]),sortKey:Fa.sortKey,state:ga})}else ir.push({segments:vr.segments,sortKey:0,state:ga})}ft&&ir.sort((Ar,hr)=>Ar.sortKey-hr.sortKey);for(let Ar of ir){let{programConfiguration:hr,program:vr,layoutVertexBuffer:Or,indexBuffer:Cr,uniformValues:ta,terrainData:ka,projectionData:Ta}=Ar.state;vr.draw(Dt,Gt.TRIANGLES,st,It,Ut,pi.backCCW,ta,ka,Ta,N.id,Or,Cr,Ar.segments,N.paint,pe.transform.zoom,hr)}},heatmap:function(pe,y,N,ie,fe){if(N.paint.get("heatmap-opacity")===0)return;let be=pe.context,{isRenderingToTexture:Re,isRenderingGlobe:je}=fe;if(pe.style.map.terrain){for(let Ze of ie){let ut=y.getTile(Ze);y.hasRenderableParent(Ze)||(pe.renderPass==="offscreen"?Ha(pe,ut,N,Ze,je):pe.renderPass==="translucent"&&$a(pe,N,Ze,Re,je))}be.viewport.set([0,0,pe.width,pe.height])}else pe.renderPass==="offscreen"?function(Ze,ut,ft,Dt){let Gt=Ze.context,Kt=Gt.gl,st=Ze.transform,It=Xi.disabled,Ut=new to([Kt.ONE,Kt.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(ir,dr,Ar){let hr=ir.gl;ir.activeTexture.set(hr.TEXTURE1),ir.viewport.set([0,0,dr.width/4,dr.height/4]);let vr=Ar.heatmapFbos.get(e.cd);vr?(hr.bindTexture(hr.TEXTURE_2D,vr.colorAttachment.get()),ir.bindFramebuffer.set(vr.framebuffer)):(vr=vn(ir,dr.width/4,dr.height/4),Ar.heatmapFbos.set(e.cd,vr))})(Gt,Ze,ft),Gt.clear({color:e.bo.transparent});for(let ir of Dt){if(ut.hasRenderableParent(ir))continue;let dr=ut.getTile(ir),Ar=dr.getBucket(ft);if(!Ar)continue;let hr=Ar.programConfigurations.get(ft.id),vr=Ze.useProgram("heatmap",hr),Or=st.getProjectionData({overscaledTileID:ir,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Cr=st.getCircleRadiusCorrection();vr.draw(Gt,Kt.TRIANGLES,Vi.disabled,It,Ut,pi.backCCW,Hc(dr,st.zoom,ft.paint.get("heatmap-intensity"),Cr),null,Or,ft.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,ft.paint,st.zoom,hr)}Gt.viewport.set([0,0,Ze.width,Ze.height])}(pe,y,N,ie):pe.renderPass==="translucent"&&function(Ze,ut){let ft=Ze.context,Dt=ft.gl;ft.setColorMode(Ze.colorModeForRenderPass());let Gt=ut.heatmapFbos.get(e.cd);Gt&&(ft.activeTexture.set(Dt.TEXTURE0),Dt.bindTexture(Dt.TEXTURE_2D,Gt.colorAttachment.get()),ft.activeTexture.set(Dt.TEXTURE1),En(ft,ut).bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE),Ze.useProgram("heatmapTexture").draw(ft,Dt.TRIANGLES,Vi.disabled,Xi.disabled,Ze.colorModeForRenderPass(),pi.disabled,Wc(Ze,ut,0,1),null,null,ut.id,Ze.viewportBuffer,Ze.quadTriangleIndexBuffer,Ze.viewportSegments,ut.paint,Ze.transform.zoom))}(pe,N)},line:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("line-opacity"),Ze=N.paint.get("line-width");if(je.constantOr(1)===0||Ze.constantOr(1)===0)return;let ut=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ft=pe.colorModeForRenderPass(),Dt=N.paint.get("line-dasharray"),Gt=Dt.constantOr(1),Kt=N.paint.get("line-pattern"),st=Kt.constantOr(1),It=N.paint.get("line-gradient"),Ut=N.getCrossfadeParameters(),ir;ir=st?"linePattern":Gt&&It?"lineGradientSDF":Gt?"lineSDF":It?"lineGradient":"line";let dr=pe.context,Ar=dr.gl,hr=pe.transform,vr=!0;for(let Or of ie){let Cr=y.getTile(Or);if(st&&!Cr.patternsLoaded())continue;let ta=Cr.getBucket(N);if(!ta)continue;let ka=ta.programConfigurations.get(N.id),Ta=pe.context.program.get(),Ra=pe.useProgram(ir,ka),ua=vr||Ra.program!==Ta,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),ga=Kt.constantOr(null),da=Dt?.constantOr(null);if(ga&&Cr.imageAtlas){let ui=Cr.imageAtlas,cn=ui.patternPositions[ga.to.toString()],sn=ui.patternPositions[ga.from.toString()];cn&&sn&&ka.setConstantPatternPositions(cn,sn)}else if(da){let ui=N.layout.get("line-cap").constantOr(null)==="round",cn=pe.lineAtlas.getDash(da.to,ui),sn=pe.lineAtlas.getDash(da.from,ui);ka.setConstantDashPositions(cn,sn)}let Fa=hr.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Re,applyTerrainMatrix:!0}),za=hr.getPixelScale(),Cn;st?(Cn=ju(pe,Cr,N,za,Ut),_i(dr,Ar,Cr,ka,Ut)):Gt&&It?(Cn=Zc(pe,Cr,N,za,Ut,ta.lineClipsArray.length),kn(pe,y,dr,Ar,N,ta,Or,ka,Ut)):Gt?(Cn=Ac(pe,Cr,N,za,Ut),ki(pe,dr,Ar,ka,ua,Ut)):It?(Cn=Xc(pe,Cr,N,za,ta.lineClipsArray.length),ri(pe,y,dr,Ar,N,ta,Or)):Cn=al(pe,Cr,N,za);let Dn=pe.stencilModeForClipping(Or);Ra.draw(dr,Ar.TRIANGLES,ut,Dn,ft,pi.disabled,Cn,ia,Fa,N.id,ta.layoutVertexBuffer,ta.indexBuffer,ta.segments,N.paint,pe.transform.zoom,ka,ta.layoutVertexBuffer2),vr=!1}},fill:function(pe,y,N,ie,fe){let be=N.paint.get("fill-color"),Re=N.paint.get("fill-opacity");if(Re.constantOr(1)===0)return;let{isRenderingToTexture:je}=fe,Ze=pe.colorModeForRenderPass(),ut=N.paint.get("fill-pattern"),ft=pe.opaquePassEnabledForLayer()&&!ut.constantOr(1)&&be.constantOr(e.bo.transparent).a===1&&Re.constantOr(0)===1?"opaque":"translucent";if(pe.renderPass===ft){let Dt=pe.getDepthModeForSublayer(1,pe.renderPass==="opaque"?Vi.ReadWrite:Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!1,je)}if(pe.renderPass==="translucent"&&N.paint.get("fill-antialias")){let Dt=pe.getDepthModeForSublayer(N.getPaintProperty("fill-outline-color")?2:0,Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!0,je)}},fillExtrusion:function(pe,y,N,ie,fe){let be=N.paint.get("fill-extrusion-opacity");if(be===0)return;let{isRenderingToTexture:Re}=fe;if(pe.renderPass==="translucent"){let je=new Vi(pe.context.gl.LEQUAL,Vi.ReadWrite,pe.depthRangeFor3D);if(be!==1||N.paint.get("fill-extrusion-pattern").constantOr(1))Zi(pe,y,N,ie,je,Xi.disabled,to.disabled,Re),Zi(pe,y,N,ie,je,pe.stencilModeFor3D(),pe.colorModeForRenderPass(),Re);else{let Ze=pe.colorModeForRenderPass();Zi(pe,y,N,ie,je,Xi.disabled,Ze,Re)}}},hillshade:function(pe,y,N,ie,fe){if(pe.renderPass!=="offscreen"&&pe.renderPass!=="translucent")return;let{isRenderingToTexture:be}=fe,Re=pe.context,je=pe.style.projection.useSubdivision,Ze=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ut=pe.colorModeForRenderPass();if(pe.renderPass==="offscreen")(function(ft,Dt,Gt,Kt,st,It,Ut){let ir=ft.context,dr=ir.gl,Ar=Kt.paint.get("resampling")==="nearest"?dr.NEAREST:dr.LINEAR;for(let hr of Gt){let vr=Dt.getTile(hr),Or=vr.dem;if(!Or?.data||!vr.needsHillshadePrepare)continue;let Cr=Or.dim,ta=Or.stride,ka=Or.getPixels();if(ir.activeTexture.set(dr.TEXTURE1),ir.pixelStoreUnpackPremultiplyAlpha.set(!1),vr.demTexture||(vr.demTexture=ft.getTileTexture(ta)),vr.demTexture){let Ra=vr.demTexture;Ra.update(ka,{premultiply:!1}),Ra.bind(dr.NEAREST,dr.CLAMP_TO_EDGE)}else vr.demTexture=new e.T(ir,ka,dr.RGBA,{premultiply:!1}),vr.demTexture.bind(dr.NEAREST,dr.CLAMP_TO_EDGE);ir.activeTexture.set(dr.TEXTURE0);let Ta=vr.fbo;if(!Ta){let Ra=new e.T(ir,{width:Cr,height:Cr,data:null},dr.RGBA);Ra.bind(Ar,dr.CLAMP_TO_EDGE),Ta=vr.fbo=ir.createFramebuffer(Cr,Cr,!0,!1),Ta.colorAttachment.set(Ra.texture)}ir.bindFramebuffer.set(Ta.framebuffer),ir.viewport.set([0,0,Cr,Cr]),ft.useProgram("hillshadePrepare").draw(ir,dr.TRIANGLES,st,It,Ut,pi.disabled,Yc(vr.tileID,Or),null,null,Kt.id,ft.rasterBoundsBuffer,ft.quadTriangleIndexBuffer,ft.rasterBoundsSegments),vr.needsHillshadePrepare=!1}})(pe,y,ie,N,Ze,Xi.disabled,ut),Re.viewport.set([0,0,pe.width,pe.height]);else if(pe.renderPass==="translucent")if(je){let[ft,Dt,Gt]=pe.stencilConfigForOverlapTwoPass(ie);Co(pe,y,N,Gt,ft,Ze,ut,!1,be),Co(pe,y,N,Gt,Dt,Ze,ut,!0,be)}else{let[ft,Dt]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Co(pe,y,N,Dt,ft,Ze,ut,!1,be)}},colorRelief:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=pe.style.projection.useSubdivision,je=pe.getDepthModeForSublayer(0,Vi.ReadOnly),Ze=pe.colorModeForRenderPass();if(Re){let[ut,ft,Dt]=pe.stencilConfigForOverlapTwoPass(ie);Fo(pe,y,N,Dt,ut,je,Ze,!1,be),Fo(pe,y,N,Dt,ft,je,Ze,!0,be)}else{let[ut,ft]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Fo(pe,y,N,ft,ut,je,Ze,!1,be)}},raster:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||N.paint.get("raster-opacity")===0||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=y.getSource(),je=pe.style.projection.useSubdivision;if(Re instanceof ke)bo(pe,y,N,ie,null,!1,!1,Re.tileCoords,Re.flippedWindingOrder,be);else if(je){let[Ze,ut,ft]=pe.stencilConfigForOverlapTwoPass(ie);bo(pe,y,N,ft,Ze,!1,!0,Yo,!1,be),bo(pe,y,N,ft,ut,!0,!0,Yo,!1,be)}else{let[Ze,ut]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);bo(pe,y,N,ut,Ze,!1,!0,Yo,!1,be)}},background:function(pe,y,N,ie,fe){var be;let Re=N.paint.get("background-color"),je=N.paint.get("background-opacity");if(je===0)return;let{isRenderingToTexture:Ze}=fe,ut=pe.context,ft=ut.gl,Dt=pe.style.projection,Gt=pe.transform,Kt=Gt.tileSize,st=N.paint.get("background-pattern");if(pe.isPatternMissing(st))return;let It=!st&&Re.a===1&&je===1&&pe.opaquePassEnabledForLayer()?"opaque":"translucent";if(pe.renderPass!==It)return;let Ut=Xi.disabled,ir=pe.getDepthModeForSublayer(0,It==="opaque"?Vi.ReadWrite:Vi.ReadOnly),dr=pe.colorModeForRenderPass(),Ar=pe.useProgram(st?"backgroundPattern":"background"),hr=ie||Je(Gt,{tileSize:Kt,terrain:pe.style.map.terrain});st&&(ut.activeTexture.set(ft.TEXTURE0),pe.imageManager.bind(pe.context));let vr=N.getCrossfadeParameters();for(let Or of hr){let Cr=Gt.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Ze,applyTerrainMatrix:!0}),ta=st?rc(je,pe,st,{tileID:Or,tileSize:Kt},vr):ml(je,Re),ka=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),Ta=Dt.getMeshFromTileID(ut,Or.canonical,!1,!0,"raster");Ar.draw(ut,ft.TRIANGLES,ir,Ut,dr,pi.backCCW,ta,ka,Cr,N.id,Ta.vertexBuffer,Ta.indexBuffer,Ta.segments)}},sky:function(pe,y){let N=pe.context,ie=N.gl,fe=((ft,Dt,Gt)=>{let Kt=Math.cos(Dt.rollInRadians),st=Math.sin(Dt.rollInRadians),It=Xt(Dt),Ut=Dt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ft.properties.get("sky-color"),u_horizon_color:ft.properties.get("horizon-color"),u_horizon:[(Dt.width/2-It*st)*Gt,(Dt.height/2+It*Kt)*Gt],u_horizon_normal:[-st,Kt],u_sky_horizon_blend:ft.properties.get("sky-horizon-blend")*Dt.height/2*Gt,u_sky_blend:Ut}})(y,pe.style.map.transform,pe.pixelRatio),be=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),Re=Xi.disabled,je=pe.colorModeForRenderPass(),Ze=pe.useProgram("sky"),ut=xl(N,y);Ze.draw(N,ie.TRIANGLES,be,Re,je,pi.disabled,fe,null,void 0,"sky",ut.vertexBuffer,ut.indexBuffer,ut.segments)},atmosphere:function(pe,y,N){let ie=pe.context,fe=ie.gl,be=pe.useProgram("atmosphere"),Re=new Vi(fe.LEQUAL,Vi.ReadOnly,[0,1]),je=pe.transform,Ze=function(Ut,ir){let dr=Ut.properties.get("position"),Ar=[-dr.x,-dr.y,-dr.z],hr=e.ap(new Float64Array(16));return Ut.properties.get("anchor")==="map"&&(e.be(hr,hr,ir.rollInRadians),e.bf(hr,hr,-ir.pitchInRadians),e.be(hr,hr,ir.bearingInRadians),e.bf(hr,hr,ir.center.lat*Math.PI/180),e.bI(hr,hr,-ir.center.lng*Math.PI/180)),e.cg(Ar,Ar,hr),Ar}(N,pe.transform),ut=je.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ft=y.properties.get("atmosphere-blend")*ut.projectionTransition;if(ft===0)return;let Dt=bs(je.worldSize,je.center.lat),Gt=je.inverseProjectionMatrix,Kt=new Float64Array(4);Kt[3]=1,e.aE(Kt,Kt,je.modelViewProjectionMatrix),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1,e.aE(Kt,Kt,Gt),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1;let st=((Ut,ir,dr,Ar,hr)=>({u_sun_pos:Ut,u_atmosphere_blend:ir,u_globe_position:dr,u_globe_radius:Ar,u_inv_proj_matrix:hr}))(Ze,ft,[Kt[0],Kt[1],Kt[2]],Dt,Gt),It=xl(ie,y);be.draw(ie,fe.TRIANGLES,Re,Xi.disabled,to.alphaBlended,pi.disabled,st,null,null,"atmosphere",It.vertexBuffer,It.indexBuffer,It.segments)},custom:function(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=N.implementation,je=pe.style.projection,Ze=pe.transform,ut=Ze.getProjectionDataForCustomLayer(fe),ft={farZ:Ze.farZ,nearZ:Ze.nearZ,fov:Ze.fov*Math.PI/180,modelViewProjectionMatrix:Ze.modelViewProjectionMatrix,projectionMatrix:Ze.projectionMatrix,shaderData:{variantName:je.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; -uniform mat4 u_projection_matrix; -${je.shaderPreludeCode.vertexSource}`,define:je.shaderDefine},defaultProjectionData:ut},Dt=Re.renderingMode?Re.renderingMode:"2d";if(pe.renderPass==="offscreen"){let Gt=Re.prerender;Gt&&(pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),Gt.call(Re,be.gl,ft),be.setDirty(),pe.setBaseState())}else if(pe.renderPass==="translucent"){pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),be.setStencilMode(Xi.disabled);let Gt=Dt==="3d"?pe.getDepthModeFor3D():pe.getDepthModeForSublayer(0,Vi.ReadOnly);be.setDepthMode(Gt),Re.render(be.gl,ft),be.setDirty(),pe.setBaseState(),be.bindFramebuffer.set(null)}},debug:function(pe,y,N){for(let ie of N)Kl(pe,y,ie)},debugPadding:function(pe){let y=pe.transform.padding;js(pe,pe.transform.height-(y.top||0),3,Es),js(pe,y.bottom||0,3,ns),Cl(pe,y.left||0,3,Kn),Cl(pe,pe.transform.width-(y.right||0),3,zo);let N=pe.transform.centerPoint;(function(ie,fe,be,Re){zl(ie,fe-1,be-10,2,20,Re),zl(ie,fe-10,be-1,20,2,Re)})(pe,N.x,pe.transform.height-N.y,gs)},terrainDepth:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.tileManager.getRenderableTiles(),Ze=pe.useProgram("terrainDepth");N.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1});for(let ut of je){let ft=y.getTerrainMesh(ut.tileID),Dt=y.getTerrainData(ut.tileID),Gt=fe.getProjectionData({overscaledTileID:ut.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Kt={u_ele_delta:y.getMeshFrameDelta(fe.zoom)};Ze.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Dt,Gt,"terrain",ft.vertexBuffer,ft.indexBuffer,ft.segments)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])},terrainCoords:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.getCoordsTexture(),Ze=y.tileManager.getRenderableTiles(),ut=pe.useProgram("terrainCoords");N.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1}),y.coordsIndex=[];for(let ft of Ze){let Dt=y.getTerrainMesh(ft.tileID),Gt=y.getTerrainData(ft.tileID);N.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,je.texture);let Kt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(fe.zoom)},st=fe.getProjectionData({overscaledTileID:ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ut.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Gt,st,"terrain",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments),y.coordsIndex.push(ft.tileID.key)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])}};class Su{constructor(y,N){this.drawFunctions=Hu,this.context=new tr(y),this.transform=N,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Sr.maxOverzooming+Sr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Di}resize(y,N,ie){if(this.width=Math.floor(y*ie),this.height=Math.floor(N*ie),this.pixelRatio=ie,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let fe of this.style._order)this.style._layers[fe].resize()}setup(){let y=this.context,N=new e.aU;N.emplaceBack(0,0),N.emplaceBack(e.a6,0),N.emplaceBack(0,e.a6),N.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=y.createVertexBuffer(N,eo.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);let ie=new e.aU;ie.emplaceBack(0,0),ie.emplaceBack(e.a6,0),ie.emplaceBack(0,e.a6),ie.emplaceBack(e.a6,e.a6),this.debugBuffer=y.createVertexBuffer(ie,eo.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);let fe=new e.ch;fe.emplaceBack(0,0,0,0),fe.emplaceBack(e.a6,0,e.a6,0),fe.emplaceBack(0,e.a6,0,e.a6),fe.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=y.createVertexBuffer(fe,bc.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);let be=new e.aU;be.emplaceBack(0,0),be.emplaceBack(e.a6,0),be.emplaceBack(0,e.a6),be.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=y.createVertexBuffer(be,eo.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(1,0),Re.emplaceBack(0,1),Re.emplaceBack(1,1),this.viewportBuffer=y.createVertexBuffer(Re,eo.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);let je=new e.ci;je.emplaceBack(0),je.emplaceBack(1),je.emplaceBack(3),je.emplaceBack(2),je.emplaceBack(0),this.tileBorderIndexBuffer=y.createIndexBuffer(je);let Ze=new e.aW;Ze.emplaceBack(1,0,2),Ze.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=y.createIndexBuffer(Ze);let ut=this.context.gl;this.stencilClearMode=new Xi({func:ut.ALWAYS,mask:0},0,255,ut.ZERO,ut.ZERO,ut.ZERO),this.tileExtentMesh=new Xn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let y=this.context,N=y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let ie=e.O();e.c7(ie,0,this.width,this.height,0,0,1),e.S(ie,ie,[N.drawingBufferWidth,N.drawingBufferHeight,0]);let fe={mainMatrix:ie,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:ie};this.useProgram("clippingMask",null,!0).draw(y,N.TRIANGLES,Vi.disabled,this.stencilClearMode,to.disabled,pi.disabled,null,null,fe,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(y,N,ie){if(this.currentStencilSource===y.source||!y.isTileClipped()||!N?.length)return;this.currentStencilSource=y.source,this.nextStencilID+N.length>256&&this.clearStencil();let fe=this.context;fe.setColorMode(to.disabled),fe.setDepthMode(Vi.disabled);let be={};for(let Re of N)be[Re.key]=this.nextStencilID++;this._renderTileMasks(be,N,ie,!0),this._renderTileMasks(be,N,ie,!1),this._tileClippingMaskIDs=be}_renderTileMasks(y,N,ie,fe){var be;let Re=this.context,je=Re.gl,Ze=this.style.projection,ut=this.transform,ft=this.useProgram("clippingMask");for(let Dt of N){let Gt=y[Dt.key],Kt=(be=this.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Dt),st=Ze.getMeshFromTileID(this.context,Dt.canonical,fe,!0,"stencil"),It=ut.getProjectionData({overscaledTileID:Dt,applyGlobeMatrix:!ie,applyTerrainMatrix:!0});ft.draw(Re,je.TRIANGLES,Vi.disabled,new Xi({func:je.ALWAYS,mask:0},Gt,255,je.KEEP,je.KEEP,je.REPLACE),to.disabled,ie?pi.disabled:pi.backCCW,null,Kt,It,"$clipping",st.vertexBuffer,st.indexBuffer,st.segments)}}_renderTilesDepthBuffer(){var y;let N=this.context,ie=N.gl,fe=this.style.projection,be=this.transform,Re=this.useProgram("depth"),je=this.getDepthModeFor3D(),Ze=Je(be,{tileSize:be.tileSize});for(let ut of Ze){let ft=(y=this.style.map.terrain)===null||y===void 0?void 0:y.getTerrainData(ut),Dt=fe.getMeshFromTileID(this.context,ut.canonical,!0,!0,"raster"),Gt=be.getProjectionData({overscaledTileID:ut,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(N,ie.TRIANGLES,je,Xi.disabled,to.disabled,pi.backCCW,null,ft,Gt,"$clipping",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let y=this.nextStencilID++,N=this.context.gl;return new Xi({func:N.NOTEQUAL,mask:255},y,255,N.KEEP,N.KEEP,N.REPLACE)}stencilModeForClipping(y){let N=this.context.gl;return new Xi({func:N.EQUAL,mask:255},this._tileClippingMaskIDs[y.key],0,N.KEEP,N.KEEP,N.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(y){let N=this.context.gl,ie=y.sort((Re,je)=>je.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(be>1){this.currentStencilSource=void 0,this.nextStencilID+be>256&&this.clearStencil();let Re={};for(let je=0;jeje.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(this.clearStencil(),be>1){let Re={},je={};for(let Ze=0;Ze0};for(let Kt in je){let st=je[Kt];st.used&&st.prepare(this.context),Ze[Kt]=st.getVisibleCoordinates(!1),ut[Kt]=Ze[Kt].slice().reverse(),ft[Kt]=st.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Kt=0;Ktthis.useProgram(Kt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:N.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=N.showOverdrawInspector,this.depthRangeFor3D=[0,1-(y._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Re.length-1;this.currentLayer>=0;this.currentLayer--){let Kt=this.style._layers[Re[this.currentLayer]],st=je[Kt.source],It=Ze[Kt.source];this._renderTileClippingMasks(Kt,It,!1),this.renderLayer(this,st,Kt,It,Dt)}this.renderPass="translucent";let Gt=!1;for(this.currentLayer=0;this.currentLayervr.source&&!vr.isHidden(It)?[st.tileManagers[vr.source]]:[]),dr=ir.filter(vr=>vr.getSource().type==="vector"),Ar=ir.filter(vr=>vr.getSource().type!=="vector"),hr=vr=>{(!Ut||Ut.getSource().maxzoom0?N.pop():null}isPatternMissing(y){if(!y)return!1;if(!y.from||!y.to)return!0;let N=this.imageManager.getPattern(y.from.toString()),ie=this.imageManager.getPattern(y.to.toString());return!N||!ie}useProgram(y,N,ie=!1,fe=[]){var be;this.cache||(this.cache={});let Re=!!this.style.map.terrain,je=this.style.projection,Ze=ie?Ai.projectionMercator:je.shaderPreludeCode,ut=ie?gi:je.shaderDefine,ft=y+(N?N.cacheKey:"")+`/${ie?qi:je.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(Re?"/terrain":"")+(fe?`/${fe.join("/")}`:"");return(be=this.cache)[ft]||(be[ft]=new ah(this.context,Ai[y],N,qf[y],this._showOverdrawInspector,Re,Ze,ut,fe)),this.cache[ft]}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 y=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(y.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var y,N;if(this._tileTextures){for(let ie in this._tileTextures){let fe=this._tileTextures[ie];if(fe)for(let be of fe)be.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((y=this.tileExtentMesh.vertexBuffer)===null||y===void 0||y.destroy()),this.tileExtentMesh&&((N=this.tileExtentMesh.indexBuffer)===null||N===void 0||N.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let ie in this.cache){let fe=this.cache[ie];fe?.program&&this.context.gl.deleteProgram(fe.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:y,drawingBufferHeight:N}=this.context.gl;return this.width!==y||this.height!==N}}function mc(pe,y){let N,ie=!1,fe=null,be=()=>{fe=null,ie&&(pe(...N),fe=setTimeout(be,y),ie=!1)};return(...Re)=>(ie=!0,N=Re,fe||be(),fe)}Su.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Jc{constructor(y){this._getCurrentHash=()=>{let N=window.location.hash.replace("#","");if(this._hashName){let ie,fe=N.split("&").map(be=>be.split("="));for(let be of fe)be[0]===this._hashName&&(ie=be);return(ie&&ie[1]||"").split("/")}return N.split("/")},this._onHashChange=()=>{let N=this._getCurrentHash();if(!this._isValidHash(N))return!1;let ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(N[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+N[2],+N[1]],zoom:+N[0],bearing:ie,pitch:+(N[4]||0)}),!0},this._updateHashUnthrottled=()=>{let N=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,N)},this._removeHash=()=>{let N=this._getCurrentHash();if(N.length===0)return;let ie=N.join("/"),fe=ie;fe.split("&").length>0&&(fe=fe.split("&")[0]),this._hashName&&(fe=`${this._hashName}=${ie}`);let be=window.location.hash.replace(fe,"");be.startsWith("#&")?be=be.slice(0,1)+be.slice(2):be==="#"&&(be="");let Re=window.location.href.replace(/(#.+)?$/,be);Re=Re.replace("&&","&"),window.history.replaceState(window.history.state,null,Re)},this._updateHash=mc(this._updateHashUnthrottled,300),this._hashName=y&&encodeURIComponent(y)}addTo(y){return this._map=y,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(y){let N=this._map.getCenter(),ie=Math.round(100*this._map.getZoom())/100,fe=Math.ceil((ie*Math.LN2+Math.log(512/360/.5))/Math.LN10),be=Math.pow(10,fe),Re=Math.round(N.lng*be)/be,je=Math.round(N.lat*be)/be,Ze=this._map.getBearing(),ut=this._map.getPitch(),ft="";if(ft+=y?`/${Re}/${je}/${ie}`:`${ie}/${je}/${Re}`,(Ze||ut)&&(ft+="/"+Math.round(10*Ze)/10),ut&&(ft+=`/${Math.round(ut)}`),this._hashName){let Dt=this._hashName,Gt=!1,Kt=window.location.hash.slice(1).split("&").map(st=>{let It=st.split("=")[0];return It===Dt?(Gt=!0,`${It}=${ft}`):st}).filter(st=>st);return Gt||Kt.push(`${Dt}=${ft}`),`#${Kt.join("&")}`}return`#${ft}`}_isValidHash(y){if(y.length<3||y.some(isNaN))return!1;try{new e.W(+y[2],+y[1])}catch{return!1}let N=+y[0],ie=+(y[3]||0),fe=+(y[4]||0);return N>=this._map.getMinZoom()&&N<=this._map.getMaxZoom()&&ie>=-180&&ie<=180&&fe>=this._map.getMinPitch()&&fe<=this._map.getMaxPitch()}}let oc={linearity:.3,easing:e.cv(0,0,.3,1)},du=e.e({deceleration:2500,maxSpeed:1400},oc),Jl=e.e({deceleration:20,maxSpeed:1400},oc),Ql=e.e({deceleration:1e3,maxSpeed:360},oc),Eu=e.e({deceleration:1e3,maxSpeed:90},oc),bf=e.e({deceleration:1e3,maxSpeed:360},oc);class lh{constructor(y){this._map=y,this.clear()}clear(){this._inertiaBuffer=[]}record(y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:m(),settings:y})}_drainInertiaBuffer(){let y=this._inertiaBuffer,N=m();for(;y.length>0&&N-y[0].time>160;)y.shift()}_onMoveEnd(y){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let N={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:be}of this._inertiaBuffer)N.zoom+=be.zoomDelta||0,N.bearing+=be.bearingDelta||0,N.pitch+=be.pitchDelta||0,N.roll+=be.rollDelta||0,be.panDelta&&N.pan._add(be.panDelta),be.around&&(N.around=be.around),be.pinchAround&&(N.pinchAround=be.pinchAround);let ie=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,fe={};if(N.pan.mag()){let be=Ks(N.pan.mag(),ie,e.e({},du,y||{})),Re=N.pan.mult(be.amount/N.pan.mag()),je=this._map.cameraHelper.handlePanInertia(Re,this._map.transform);fe.center=je.easingCenter,fe.offset=je.easingOffset,Pc(fe,be)}if(N.zoom){let be=Ks(N.zoom,ie,Jl);fe.zoom=e.cw(this._map.transform.zoom+be.amount,this._map.getZoomSnap(),be.amount),Pc(fe,be)}if(N.bearing){let be=Ks(N.bearing,ie,Ql);fe.bearing=this._map.transform.bearing+e.al(be.amount,-179,179),Pc(fe,be)}if(N.pitch){let be=Ks(N.pitch,ie,Eu);fe.pitch=this._map.transform.pitch+be.amount,Pc(fe,be)}if(N.roll){let be=Ks(N.roll,ie,bf);fe.roll=this._map.transform.roll+e.al(be.amount,-179,179),Pc(fe,be)}if(fe.zoom||fe.bearing){let be=N.pinchAround===void 0?N.around:N.pinchAround;fe.around=be?this._map.unproject(be):this._map.getCenter()}return this.clear(),e.e(fe,{noMoveStart:!0})}}function Pc(pe,y){(!pe.duration||pe.durationN.unproject(Ze)),je=be.reduce((Ze,ut,ft,Dt)=>Ze.add(ut.div(Dt.length)),new e.P(0,0));super(y,{points:be,point:je,lngLats:Re,lngLat:N.unproject(je),originalEvent:ie}),this._defaultPrevented=!1}}class wf extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(y,N,ie){super(y,{originalEvent:ie}),this._defaultPrevented=!1}}class Qc{constructor(y,N){this._map=y,this._clickTolerance=N.clickTolerance}reset(){delete this._mousedownPos}wheel(y){return this._firePreventable(new wf(y.type,this._map,y))}mousedown(y,N){return this._mousedownPos=N,this._firePreventable(new Bl(y.type,this._map,y))}mouseup(y){this._map.fire(new Bl(y.type,this._map,y))}click(y,N){this._mousedownPos&&this._mousedownPos.dist(N)>=this._clickTolerance||this._map.fire(new Bl(y.type,this._map,y))}dblclick(y){return this._firePreventable(new Bl(y.type,this._map,y))}mouseover(y){this._map.fire(new Bl(y.type,this._map,y))}mouseout(y){this._map.fire(new Bl(y.type,this._map,y))}touchstart(y){return this._firePreventable(new Wu(y.type,this._map,y))}touchmove(y){this._map.fire(new Wu(y.type,this._map,y))}touchend(y){this._map.fire(new Wu(y.type,this._map,y))}touchcancel(y){this._map.fire(new Wu(y.type,this._map,y))}_firePreventable(y){if(this._map.fire(y),y.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ku{constructor(y){this._map=y}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(y){this._map.fire(new Bl(y.type,this._map,y))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(y){this._delayContextMenu?this._contextMenuEvent=y:this._ignoreContextMenu||this._map.fire(new Bl(y.type,this._map,y)),this._map.listens("contextmenu")&&y.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ol{constructor(y){this._map=y}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(y){return this.transform.screenPointToLocation(e.P.convert(y),this._map.terrain)}}class Nl{constructor(y,N){this._map=y,this._tr=new Ol(y),this._el=y.getCanvasContainer(),this._container=y.getContainer(),this._clickTolerance=N.clickTolerance||1,N.boxZoom&&typeof N.boxZoom=="object"&&(this._boxZoomEnd=N.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(y,N){this.isEnabled()&&y.shiftKey&&y.button===0&&(g.disableDrag(),this._startPos=this._lastPos=N,this._active=!0)}mousemoveWindow(y,N){if(!this._active)return;let ie=N;if(this._lastPos.equals(ie)||!this._box&&ie.dist(this._startPos)be.fitScreenCoordinates(ie,fe,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",y)}keydown(y){this._active&&y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",y))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),g.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(y,N){return this._map.fire(new e.n(y,{originalEvent:N}))}}function fi(pe,y){if(pe.length!==y.length)throw new Error(`The number of touches and points are not equal - touches ${pe.length}, points ${y.length}`);let N={};for(let ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=y.timeStamp),ie.length===this.numTouches&&(this.centroid=function(fe){let be=new e.P(0,0);for(let Re of fe)be._add(Re);return be.div(fe.length)}(N),this.touches=fi(ie,N)))}touchmove(y,N,ie){if(this.aborted||!this.centroid)return;let fe=fi(ie,N);for(let be in this.touches){let Re=fe[be];(!Re||Re.dist(this.touches[be])>30)&&(this.aborted=!0)}}touchend(y,N,ie){if((!this.centroid||y.timeStamp-this.startTime>500)&&(this.aborted=!0),ie.length===0){let fe=!this.aborted&&this.centroid;if(this.reset(),fe)return fe}}}class $e{constructor(y){this.singleTap=new eu(y),this.numTaps=y.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(y,N,ie){this.singleTap.touchstart(y,N,ie)}touchmove(y,N,ie){this.singleTap.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this.singleTap.touchend(y,N,ie);if(fe){let be=y.timeStamp-this.lastTime<500,Re=!this.lastTap||this.lastTap.dist(fe)<30;if(be&&Re||this.reset(),this.count++,this.lastTime=y.timeStamp,this.lastTap=fe,this.count===this.numTaps)return this.reset(),fe}}}class nt{constructor(y){this._tr=new Ol(y),this._zoomIn=new $e({numTouches:1,numTaps:2}),this._zoomOut=new $e({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(y,N,ie){this._zoomIn.touchstart(y,N,ie),this._zoomOut.touchstart(y,N,ie)}touchmove(y,N,ie){this._zoomIn.touchmove(y,N,ie),this._zoomOut.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this._zoomIn.touchend(y,N,ie),be=this._zoomOut.touchend(y,N,ie),Re=this._tr;return fe?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom+1,je.getZoomSnap()),around:Re.unproject(fe)},{originalEvent:y})}):be?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom-1,je.getZoomSnap()),around:Re.unproject(be)},{originalEvent:y})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mt{constructor(y){this._enabled=!!y.enable,this._moveStateManager=y.moveStateManager,this._clickTolerance=y.clickTolerance||1,this._moveFunction=y.move,this._activateOnStart=!!y.activateOnStart,y.assignEvents(this),this.reset()}reset(y){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(y)}_move(...y){let N=this._moveFunction(...y);if(N.bearingDelta||N.pitchDelta||N.rollDelta||N.around||N.panDelta)return this._active=!0,N}dragStart(y,N){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(y)&&(this._moveStateManager.startMove(y),this._lastPoint=Array.isArray(N)?N[0]:N,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(y,N){if(!this.isEnabled())return;let ie=this._lastPoint;if(!ie)return;if(y.preventDefault(),!this._moveStateManager.isValidMoveEvent(y))return void this.reset(y);let fe=Array.isArray(N)?N[0]:N;return!this._moved&&fe.dist(ie)!0}),N=new Pr){this.mouseMoveStateManager=y,this.oneFingerTouchMoveStateManager=N}_executeRelevantHandler(y,N,ie){return y instanceof MouseEvent?N(y):typeof TouchEvent<"u"&&y instanceof TouchEvent?ie(y):void 0}startMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.startMove(N)},N=>{this.oneFingerTouchMoveStateManager.startMove(N)})}endMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.endMove(N)},N=>{this.oneFingerTouchMoveStateManager.endMove(N)})}isValidStartEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidStartEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidStartEvent(N))}isValidMoveEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidMoveEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(N))}isValidEndEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidEndEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidEndEvent(N))}}let kr=pe=>{pe.mousedown=pe.dragStart,pe.mousemoveWindow=pe.dragMove,pe.mouseup=pe.dragEnd,pe.contextmenu=y=>{y.preventDefault()}};class jr{constructor(y,N){this._clickTolerance=y.clickTolerance||1,this._map=N,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(y){return y<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(y,N,ie){return this._calculateTransform(y,N,ie)}touchmove(y,N,ie){if(this._active){if(!this._shouldBePrevented(ie.length))return y.preventDefault(),this._calculateTransform(y,N,ie);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",y)}}touchend(y,N,ie){this._calculateTransform(y,N,ie),this._active&&this._shouldBePrevented(ie.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(y,N,ie){ie.length>0&&(this._active=!0);let fe=fi(ie,N),be=new e.P(0,0),Re=new e.P(0,0),je=0;for(let ut in fe){let ft=fe[ut],Dt=this._touches[ut];Dt&&(be._add(ft),Re._add(ft.sub(Dt)),je++,fe[ut]=ft)}if(this._touches=fe,this._shouldBePrevented(je)||!Re.mag())return;let Ze=Re.div(je);return this._sum._add(Ze),this._sum.mag()Math.abs(pe.x)}class Si extends Jr{constructor(y){super(),this._currentTouchCount=0,this._map=y}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(y,N,ie){super.touchstart(y,N,ie),this._currentTouchCount=ie.length}_start(y){this._lastPoints=y,ii(y[0].sub(y[1]))&&(this._valid=!1)}_move(y,N,ie){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let fe=y[0].sub(this._lastPoints[0]),be=y[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(fe,be,ie.timeStamp),this._valid?(this._lastPoints=y,this._active=!0,{pitchDelta:(fe.y+be.y)/2*-.5}):void 0}gestureBeginsVertically(y,N,ie){if(this._valid!==void 0)return this._valid;let fe=y.mag()>=2,be=N.mag()>=2;if(!fe&&!be)return;if(!fe||!be)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;let Re=y.y>0==N.y>0;return ii(y)&&ii(N)&&Re}}let oi={panStep:100,bearingStep:15,pitchStep:10};class Ji{constructor(y){this._tr=new Ol(y);let N=oi;this._panStep=N.panStep,this._bearingStep=N.bearingStep,this._pitchStep=N.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(y){if(y.altKey||y.ctrlKey||y.metaKey)return;let N=0,ie=0,fe=0,be=0,Re=0;switch(y.keyCode){case 61:case 107:case 171:case 187:N=1;break;case 189:case 109:case 173:N=-1;break;case 37:y.shiftKey?ie=-1:(y.preventDefault(),be=-1);break;case 39:y.shiftKey?ie=1:(y.preventDefault(),be=1);break;case 38:y.shiftKey?fe=1:(y.preventDefault(),Re=-1);break;case 40:y.shiftKey?fe=-1:(y.preventDefault(),Re=1);break;default:return}return this._rotationDisabled&&(ie=0,fe=0),{cameraAnimation:je=>{let Ze=this._tr;je.easeTo({duration:300,easeId:"keyboardHandler",easing:Qi,zoom:N?e.cw(Ze.zoom+N*(y.shiftKey?2:1),je.getZoomSnap()):Ze.zoom,bearing:Ze.bearing+ie*this._bearingStep,pitch:Ze.pitch+fe*this._pitchStep,offset:[-be*this._panStep,-Re*this._panStep],center:Ze.center},{originalEvent:y})}}}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 Qi(pe){return pe*(2-pe)}let Oo=4.000244140625,Qo=1/450;class vo{constructor(y,N){this._onTimeout=ie=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ie)},this._map=y,this._tr=new Ol(y),this._triggerRenderFrame=N,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Qo}setZoomRate(y){this._defaultZoomRate=y}setWheelZoomRate(y){this._wheelZoomRate=y}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!y&&y.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(y){return!!this._map.cooperativeGestures.isEnabled()&&!(y.ctrlKey||this._map.cooperativeGestures.isBypassed(y))}wheel(y){if(!this.isEnabled())return;if(this._shouldBePrevented(y))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",y);let N=y.deltaMode===WheelEvent.DOM_DELTA_LINE?40*y.deltaY:y.deltaY,ie=m(),fe=ie-(this._lastWheelEventTime||0);this._lastWheelEventTime=ie,N!==0&&N%Oo==0?this._type="wheel":N!==0&&Math.abs(N)<4?this._type="trackpad":fe>400?(this._type=null,this._lastValue=N,this._timeout=setTimeout(this._onTimeout,40,y)):this._type||(this._type=Math.abs(fe*N)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,N+=this._lastValue)),y.shiftKey&&N&&(N/=4),this._type&&(this._lastWheelEvent=y,this._delta-=N,this._active||this._start(y)),y.preventDefault()}_start(y){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let N=g.mousePos(this._map.getCanvas(),y),ie=this._tr;this._aroundPoint=this._aroundCenter?ie.transform.locationToScreenPoint(e.W.convert(ie.center)):N,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let y=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let je=y.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=je),typeof this._targetZoom=="number"&&(this._targetZoom+=je)}if(this._delta!==0){let je=this._type==="wheel"&&Math.abs(this._delta)>Oo?this._wheelZoomRate:this._defaultZoomRate,Ze=2/(1+Math.exp(-Math.abs(this._delta*je)));this._delta<0&&Ze!==0&&(Ze=1/Ze);let ut=typeof this._targetZoom!="number"?y.scale:e.ao(this._targetZoom),ft=y.applyConstrain(y.getCameraLngLat(),e.ar(ut*Ze)).zoom,Dt=this._map.getZoomSnap();if(this._type==="wheel"&&Dt>0){let Gt=e.cw(y.zoom,Dt);this._targetZoom=e.cw(ft,Dt,ft-Gt)}else this._targetZoom=ft;this._type==="wheel"&&(this._startZoom=y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let N=typeof this._targetZoom!="number"?y.zoom:this._targetZoom,ie=this._startZoom,fe=this._easing,be,Re=!1;if(this._type==="wheel"&&ie&&fe){let je=m()-this._lastWheelEventTime,Ze=Math.min((je+5)/200,1),ut=fe(Ze);be=e.H.number(ie,N,ut),Ze<1?this._needsRerender=!0:Re=!0}else be=N,Re=!0;return this._active=!0,Re&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=be,{noInertia:!0,needsRenderFrame:!Re,zoomDelta:be-y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(y){let N=e.cy;if(this._prevEase){let ie=this._prevEase,fe=(m()-ie.start)/ie.duration,be=ie.easing(fe+.01)-ie.easing(fe),Re=.27/Math.sqrt(be*be+1e-4)*.01,je=Math.sqrt(.0729-Re*Re);N=e.cv(Re,je,.25,1)}return this._prevEase={start:m(),duration:y,easing:N},N}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ys{constructor(y,N){this._clickZoom=y,this._tapZoom=N}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 ol{constructor(y){this._tr=new Ol(y),this.reset()}reset(){this._active=!1}dblclick(y,N){return y.preventDefault(),{cameraAnimation:ie=>{ie.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(y.shiftKey?-1:1),ie.getZoomSnap()),around:this._tr.unproject(N)},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class jl{constructor(){this._tap=new $e({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(y){this._zoomRate=y??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(y,N,ie){if(!this._swipePoint)if(this._tapTime){let fe=N[0],be=y.timeStamp-this._tapTime<500,Re=this._tapPoint.dist(fe)<30;be&&Re?ie.length>0&&(this._swipePoint=fe,this._swipeTouch=ie[0].identifier):this.reset()}else this._tap.touchstart(y,N,ie)}touchmove(y,N,ie){if(this._tapTime){if(this._swipePoint){if(ie[0].identifier!==this._swipeTouch)return;let fe=N[0],be=fe.y-this._swipePoint.y;return this._swipePoint=fe,y.preventDefault(),this._active=!0,{zoomDelta:be/128*this._zoomRate}}}else this._tap.touchmove(y,N,ie)}touchend(y,N,ie){if(this._tapTime)this._swipePoint&&ie.length===0&&this.reset();else{let fe=this._tap.touchend(y,N,ie);fe&&(this._tapTime=y.timeStamp,this._tapPoint=fe)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hs{constructor(y,N,ie){this._el=y,this._mousePan=N,this._touchPan=ie}enable(y){this._inertiaOptions=y||{},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 Cu{constructor(y,N,ie,fe){this._pitchWithRotate=y.pitchWithRotate,this._rollEnabled=y.rollEnabled,this._mouseRotate=N,this._mousePitch=ie,this._mouseRoll=fe}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class hi{constructor(y,N,ie,fe){this._el=y,this._touchZoom=N,this._touchRotate=ie,this._tapDragZoom=fe,this._rotationDisabled=!1,this._enabled=!0}enable(y){this._touchZoom.enable(y),this._rotationDisabled||this._touchRotate.enable(y),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()}setZoomRate(y){this._touchZoom.setZoomRate(y),this._tapDragZoom.setZoomRate(y)}setZoomThreshold(y){this._touchZoom.setZoomThreshold(y)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class wi{constructor(y,N){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=y,this._options=N,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let y=this._map.getCanvasContainer();y.classList.add("maplibregl-cooperative-gestures"),this._container=g.create("div","maplibregl-cooperative-gesture-screen",y);let N=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(N=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let ie=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),fe=document.createElement("div");fe.className="maplibregl-desktop-message",fe.textContent=N,this._container.appendChild(fe);let be=document.createElement("div");be.className="maplibregl-mobile-message",be.textContent=ie,this._container.appendChild(be),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),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(y){return y[this._bypassKey]}notifyGestureBlocked(y,N){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:y,originalEvent:N})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let sl=pe=>pe.zoom||pe.drag||pe.roll||pe.pitch||pe.rotate;class sc extends e.n{}function tu(pe){var y;return((y=pe.panDelta)===null||y===void 0?void 0:y.mag())||pe.zoomDelta||pe.bearingDelta||pe.pitchDelta||pe.rollDelta}class Ps{get _ownerDocument(){var y;return((y=this._el)===null||y===void 0?void 0:y.ownerDocument)||document}get _ownerWindow(){var y,N;return((N=(y=this._el)===null||y===void 0?void 0:y.ownerDocument)===null||N===void 0?void 0:N.defaultView)||window}constructor(y,N){this.handleWindowEvent=fe=>{this.handleEvent(fe,`${fe.type}Window`)},this.handleEvent=(fe,be)=>{if(fe.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Re=fe.type==="renderFrame"?void 0:fe,je={needsRenderFrame:!1},Ze={},ut={};for(let{handlerName:Gt,handler:Kt,allowed:st}of this._handlers){if(!Kt.isEnabled())continue;let It;if(this._blockedByActive(ut,st,Gt))Kt.reset();else if(Kt[be||fe.type]){if(e.cz(fe,be||fe.type)){let Ut=g.mousePos(this._map.getCanvas(),fe);It=Kt[be||fe.type](fe,Ut)}else if(e.cA(fe,be||fe.type)){let Ut=this._getMapTouches(fe.touches),ir=g.touchPos(this._map.getCanvas(),Ut);It=Kt[be||fe.type](fe,ir,Ut)}else e.cB(be||fe.type)||(It=Kt[be||fe.type](fe));this.mergeHandlerResult(je,Ze,It,Gt,Re),It?.needsRenderFrame&&this._triggerRenderFrame()}(It||Kt.isActive())&&(ut[Gt]=Kt)}let ft={};for(let Gt in this._previousActiveHandlers)ut[Gt]||(ft[Gt]=Re);this._previousActiveHandlers=ut,(Object.keys(ft).length||tu(je))&&(this._changes.push([je,Ze,ft]),this._triggerRenderFrame()),(Object.keys(ut).length||tu(je))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Dt}=je;Dt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Dt(this._map))},this._map=y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lh(y),this._bearingSnap=N.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(N);let ie=this._el;this._listeners=[[ie,"touchstart",{passive:!0}],[ie,"touchmove",{passive:!1}],[ie,"touchend",void 0],[ie,"touchcancel",void 0],[ie,"mousedown",void 0],[ie,"mousemove",void 0],[ie,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[ie,"mouseover",void 0],[ie,"mouseout",void 0],[ie,"dblclick",void 0],[ie,"click",void 0],[ie,"keydown",{capture:!1}],[ie,"keyup",void 0],[ie,"wheel",{passive:!1}],[ie,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[fe,be,Re]of this._listeners)fe.addEventListener(be,fe===this._ownerDocument?this.handleWindowEvent:this.handleEvent,Re)}destroy(){for(let[y,N,ie]of this._listeners)y.removeEventListener(N,y===this._ownerDocument?this.handleWindowEvent:this.handleEvent,ie)}_addDefaultHandlers(y){let N=this._map,ie=N.getCanvasContainer();this._add("mapEvent",new Qc(N,y));let fe=N.boxZoom=new Nl(N,y);this._add("boxZoom",fe),y.interactive&&y.boxZoom&&fe.enable();let be=N.cooperativeGestures=new wi(N,y.cooperativeGestures);this._add("cooperativeGestures",be),y.cooperativeGestures&&be.enable();let Re=new nt(N),je=new ol(N);N.doubleClickZoom=new ys(je,Re),this._add("tapZoom",Re),this._add("clickZoom",je),y.interactive&&y.doubleClickZoom&&N.doubleClickZoom.enable();let Ze=new jl;this._add("tapDragZoom",Ze);let ut=N.touchPitch=new Si(N);this._add("touchPitch",ut),y.interactive&&y.touchPitch&&N.touchPitch.enable(y.touchPitch);let ft=()=>N.project(N.getCenter()),Dt=function({enable:hr,clickTolerance:vr,aroundCenter:Or=!0,minPixelCenterThreshold:Cr=100,rotateDegreesPerPixelMoved:ta=.8},ka){let Ta=new Wt({checkCorrectEvent:Ra=>Ra.button===0&&Ra.ctrlKey||Ra.button===2&&!Ra.ctrlKey});return new mt({clickTolerance:vr,move:(Ra,ua)=>{let ia=ka();if(Or&&Math.abs(ia.y-Ra.y)>Cr)return{bearingDelta:e.cx(new e.P(Ra.x,ua.y),ua,ia)};let ga=(ua.x-Ra.x)*ta;return Or&&ua.yta.button===0&&ta.ctrlKey||ta.button===2});return new mt({clickTolerance:vr,move:(ta,ka)=>({pitchDelta:(ka.y-ta.y)*Or}),moveStateManager:Cr,enable:hr,assignEvents:kr})}(y),Kt=function({enable:hr,clickTolerance:vr,rollDegreesPerPixelMoved:Or=.3},Cr){let ta=new Wt({checkCorrectEvent:ka=>ka.button===2&&ka.ctrlKey});return new mt({clickTolerance:vr,move:(ka,Ta)=>{let Ra=Cr(),ua=(Ta.x-ka.x)*Or;return Ta.yCr.button===0&&!Cr.ctrlKey});return new mt({clickTolerance:vr,move:(Cr,ta)=>({around:ta,panDelta:ta.sub(Cr)}),activateOnStart:!0,moveStateManager:Or,enable:hr,assignEvents:kr})}(y),It=new jr(y,N);N.dragPan=new Hs(ie,st,It),this._add("mousePan",st),this._add("touchPan",It,["touchZoom","touchRotate"]),y.interactive&&y.dragPan&&N.dragPan.enable(y.dragPan);let Ut=new Tn,ir=new Ba;N.touchZoomRotate=new hi(ie,ir,Ut,Ze),this._add("touchRotate",Ut,["touchPan","touchZoom"]),this._add("touchZoom",ir,["touchPan","touchRotate"]),y.interactive&&y.touchZoomRotate&&N.touchZoomRotate.enable(y.touchZoomRotate),this._add("blockableMapEvent",new ku(N));let dr=N.scrollZoom=new vo(N,()=>this._triggerRenderFrame());this._add("scrollZoom",dr,["mousePan"]),y.interactive&&y.scrollZoom&&N.scrollZoom.enable(y.scrollZoom);let Ar=N.keyboard=new Ji(N);this._add("keyboard",Ar),y.interactive&&y.keyboard&&N.keyboard.enable()}_add(y,N,ie){this._handlers.push({handlerName:y,handler:N,allowed:ie}),this._handlersById[y]=N}stop(y){if(!this._updatingCamera){for(let{handler:N}of this._handlers)N.reset();this._inertia.clear(),this._fireEvents({},{},y),this._changes=[]}}isActive(){for(let{handler:y}of this._handlers)if(y.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!sl(this._eventsInProgress)||this.isZooming()}_blockedByActive(y,N,ie){for(let fe in y)if(fe!==ie&&!N?.includes(fe))return!0;return!1}_getMapTouches(y){let N=[];for(let ie of y)this._el.contains(ie.target)&&N.push(ie);return N}mergeHandlerResult(y,N,ie,fe,be){if(!ie)return;e.e(y,ie);let Re={handlerName:fe,originalEvent:ie.originalEvent||be};ie.zoomDelta!==void 0&&(N.zoom=Re),ie.panDelta!==void 0&&(N.drag=Re),ie.rollDelta!==void 0&&(N.roll=Re),ie.pitchDelta!==void 0&&(N.pitch=Re),ie.bearingDelta!==void 0&&(N.rotate=Re)}_applyChanges(){let y={},N={},ie={};for(let[fe,be,Re]of this._changes)fe.panDelta&&(y.panDelta=(y.panDelta||new e.P(0,0))._add(fe.panDelta)),fe.zoomDelta&&(y.zoomDelta=(y.zoomDelta||0)+fe.zoomDelta),fe.bearingDelta&&(y.bearingDelta=(y.bearingDelta||0)+fe.bearingDelta),fe.pitchDelta&&(y.pitchDelta=(y.pitchDelta||0)+fe.pitchDelta),fe.rollDelta&&(y.rollDelta=(y.rollDelta||0)+fe.rollDelta),fe.around!==void 0&&(y.around=fe.around),fe.pinchAround!==void 0&&(y.pinchAround=fe.pinchAround),fe.noInertia&&(y.noInertia=fe.noInertia),e.e(N,be),e.e(ie,Re);this._updateMapTransform(y,N,ie),this._changes=[]}_updateMapTransform(y,N,ie){let fe=this._map,be=fe._getTransformForUpdate(),Re=fe.terrain;if(!(tu(y)||Re&&this._terrainMovement))return void this._fireEvents(N,ie,!0);fe._stop(!0);let{panDelta:je,zoomDelta:Ze,bearingDelta:ut,pitchDelta:ft,rollDelta:Dt,around:Gt,pinchAround:Kt}=y;Kt!==void 0&&(Gt=Kt),Gt||(Gt=fe.transform.centerPoint),Re&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let st={panDelta:je,zoomDelta:Ze,rollDelta:Dt,pitchDelta:ft,bearingDelta:ut,around:Gt};this._map.cameraHelper.useGlobeControls&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let It=Gt.distSqr(be.centerPoint)<.01?be.center:be.screenPointToLocation(je?Gt.sub(je):Gt);this._handleMapControls({terrain:Re,tr:be,deltasForHelper:st,preZoomAroundLoc:It,combinedEventsInProgress:N,panDelta:je}),fe._applyUpdatedTransform(be),this._map._update(),y.noInertia||this._inertia.record(y),this._fireEvents(N,ie,!0)}_handleMapControls({terrain:y,tr:N,deltasForHelper:ie,preZoomAroundLoc:fe,combinedEventsInProgress:be,panDelta:Re}){let je=this._map.cameraHelper;if(je.handleMapControlsRollPitchBearingZoom(ie,N),y)return je.useGlobeControls?(this._terrainMovement||!be.drag&&!be.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void je.handleMapControlsPan(ie,N,fe)):this._terrainMovement||!be.drag&&!be.zoom?void(be.drag&&this._terrainMovement&&Re?N.setCenter(N.screenPointToLocation(N.centerPoint.sub(Re))):je.handleMapControlsPan(ie,N,fe)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void je.handleMapControlsPan(ie,N,fe));je.handleMapControlsPan(ie,N,fe)}_fireEvents(y,N,ie){let fe=sl(this._eventsInProgress),be=sl(y),Re={};for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._eventsInProgress[Dt]||(Re[`${Dt}start`]=Gt),this._eventsInProgress[Dt]=y[Dt]}!fe&&be&&this._fireEvent("movestart",be.originalEvent);for(let Dt in Re)this._fireEvent(Dt,Re[Dt]);be&&this._fireEvent("move",be.originalEvent);for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._fireEvent(Dt,Gt)}let je={},Ze;for(let Dt in this._eventsInProgress){let{handlerName:Gt,originalEvent:Kt}=this._eventsInProgress[Dt];this._handlersById[Gt].isActive()||(delete this._eventsInProgress[Dt],Ze=N[Gt]||Kt,je[`${Dt}end`]=Ze)}for(let Dt in je)this._fireEvent(Dt,je[Dt]);let ut=sl(this._eventsInProgress),ft=(fe||be)&&!ut;if(ft&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Dt=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Dt.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Dt)}if(ie&&ft){this._updatingCamera=!0;let Dt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Gt=Kt=>Kt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new sc("renderFrame",{timeStamp:y})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class gc extends e.E{constructor(y,N,ie){super(),this._renderFrameCallback=()=>{let fe=Math.min((m()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(fe)),fe<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=y,this._bearingSnap=ie.bearingSnap,this._zoomSnap=ie.zoomSnap,this.cameraHelper=N,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(y,N){y.apply(this.transform,!0),this.transform=y,this.cameraHelper=N}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(y,N){return this.jumpTo({center:y},N)}getCenterElevation(){return this.transform.elevation}setCenterElevation(y,N){return this.jumpTo({elevation:y},N),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(y){this._centerClampedToGround=y}panBy(y,N,ie){return y=e.P.convert(y).mult(-1),this.panTo(this.transform.center,e.e({offset:y},N),ie)}panTo(y,N,ie){return this.easeTo(e.e({center:y},N),ie)}getZoom(){return this.transform.zoom}setZoom(y,N){return this.jumpTo({zoom:y},N),this}zoomTo(y,N,ie){return this.easeTo(e.e({zoom:y},N),ie)}zoomIn(y,N){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),y,N),this}zoomOut(y,N){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),y,N),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(y,N){return y!=this.transform.fov&&(this.transform.setFov(y),this.fire(new e.n("movestart",N)).fire(new e.n("move",N)).fire(new e.n("moveend",N))),this}getBearing(){return this.transform.bearing}setZoomSnap(y){return this._zoomSnap=y,this}getZoomSnap(){return this._zoomSnap}setBearing(y,N){return this.jumpTo({bearing:y},N),this}getPadding(){return this.transform.padding}setPadding(y,N){return this.jumpTo({padding:y},N),this}rotateTo(y,N,ie){return this.easeTo(e.e({bearing:y},N),ie)}resetNorth(y,N){return this.rotateTo(0,e.e({duration:1e3},y),N),this}resetNorthPitch(y,N){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},y),N),this}snapToNorth(y,N){return Math.abs(this.getBearing()){It.easeFunc(Ut),this.terrain&&!y.freezeElevation&&this._updateElevation(Ut),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},Ut=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N,Ut)},y),this}_prepareEase(y,N,ie={}){this._moving=!0,N||ie.moving||this.fire(new e.n("movestart",y)),this._zooming&&!ie.zooming&&this.fire(new e.n("zoomstart",y)),this._rotating&&!ie.rotating&&this.fire(new e.n("rotatestart",y)),this._pitching&&!ie.pitching&&this.fire(new e.n("pitchstart",y)),this._rolling&&!ie.rolling&&this.fire(new e.n("rollstart",y))}_prepareElevation(y){this._elevationCenter=y,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(y,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(y){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let N=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(y<1&&N!==this._elevationTarget){let ie=this._elevationTarget-this._elevationStart;this._elevationStart+=y*(ie-(N-(ie*y+this._elevationStart))/(1-y)),this._elevationTarget=N}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,y))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(y){if(!this.terrain&&y.elevation>=0&&y.pitch<=90)return{};let N=y.getCameraLngLat(),ie=y.getCameraAltitude(),fe=this.terrain?this.terrain.getElevationForLngLatZoom(N,y.zoom):0;if(iethis._elevateCameraIfInsideTerrain(fe)),this.transformCameraUpdate&&N.push(fe=>this.transformCameraUpdate(fe)),!N.length)return;let ie=y.clone();for(let fe of N){let be=ie.clone(),{center:Re,zoom:je,roll:Ze,pitch:ut,bearing:ft,elevation:Dt}=fe(be);Re&&be.setCenter(Re),Dt!==void 0&&be.setElevation(Dt),je!==void 0&&be.setZoom(je),Ze!==void 0&&be.setRoll(Ze),ut!==void 0&&be.setPitch(ut),ft!==void 0&&be.setBearing(ft),ie.apply(be,!1)}this.transform.apply(ie,!1)}_fireMoveEvents(y){this.fire(new e.n("move",y)),this._zooming&&this.fire(new e.n("zoom",y)),this._rotating&&this.fire(new e.n("rotate",y)),this._pitching&&this.fire(new e.n("pitch",y)),this._rolling&&this.fire(new e.n("roll",y))}_afterEase(y,N){if(this._easeId&&N&&this._easeId===N)return;delete this._easeId;let ie=this._zooming,fe=this._rotating,be=this._pitching,Re=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,ie&&this.fire(new e.n("zoomend",y)),fe&&this.fire(new e.n("rotateend",y)),be&&this.fire(new e.n("pitchend",y)),Re&&this.fire(new e.n("rollend",y)),this.fire(new e.n("moveend",y))}flyTo(y,N){if(!y.essential&&s.prefersReducedMotion){let ua=e.V(y,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(ua,N)}this.stop(),"zoom"in(y=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},y))&&this._zoomSnap&&(y.zoom=e.cw(y.zoom,this._zoomSnap));let ie=this._getTransformForUpdate(),fe=ie.bearing,be=ie.pitch,Re=ie.roll,je=ie.padding,Ze="bearing"in y?this._normalizeBearing(y.bearing,fe):fe,ut="pitch"in y?+y.pitch:be,ft="roll"in y?this._normalizeBearing(y.roll,Re):Re,Dt="padding"in y?y.padding:ie.padding,Gt=e.P.convert(y.offset),Kt=ie.centerPoint.add(Gt),st=ie.screenPointToLocation(Kt),It=this.cameraHelper.handleFlyTo(ie,{bearing:Ze,pitch:ut,roll:ft,padding:Dt,locationAtOffset:st,offsetAsPoint:Gt,center:y.center,minZoom:y.minZoom,zoom:y.zoom}),Ut=y.curve,ir=Math.max(ie.width,ie.height),dr=ir/It.scaleOfZoom,Ar=It.pixelPathLength;typeof It.scaleOfMinZoom=="number"&&(Ut=Math.sqrt(ir/It.scaleOfMinZoom/Ar*2));let hr=Ut*Ut;function vr(ua){let ia=(dr*dr-ir*ir+(ua?-1:1)*hr*hr*Ar*Ar)/(2*(ua?dr:ir)*hr*Ar);return Math.log(Math.sqrt(ia*ia+1)-ia)}function Or(ua){return(Math.exp(ua)-Math.exp(-ua))/2}function Cr(ua){return(Math.exp(ua)+Math.exp(-ua))/2}let ta=vr(!1),ka=function(ua){return Cr(ta)/Cr(ta+Ut*ua)},Ta=function(ua){return ir*((Cr(ta)*(Or(ia=ta+Ut*ua)/Cr(ia))-Or(ta))/hr)/Ar;var ia},Ra=(vr(!0)-ta)/Ut;if(Math.abs(Ar)<2e-6||!isFinite(Ra)){if(Math.abs(ir-dr)<1e-6)return this.easeTo(y,N);let ua=dr0,ka=ia=>Math.exp(ua*Ut*ia)}return y.duration="duration"in y?+y.duration:1e3*Ra/("screenSpeed"in y?+y.screenSpeed/Ut:+y.speed),y.maxDuration&&y.duration>y.maxDuration&&(y.duration=0),this._zooming=!0,this._rotating=fe!==Ze,this._pitching=ut!==be,this._rolling=ft!==Re,this._padding=!ie.isPaddingEqual(Dt),this._prepareEase(N,!1),this.terrain&&this._prepareElevation(It.targetCenter),this._ease(ua=>{let ia=ua*Ra,ga=1/ka(ia),da=Ta(ia);this._rotating&&ie.setBearing(e.H.number(fe,Ze,ua)),this._pitching&&ie.setPitch(e.H.number(be,ut,ua)),this._rolling&&ie.setRoll(e.H.number(Re,ft,ua)),this._padding&&(ie.interpolatePadding(je,Dt,ua),Kt=ie.centerPoint.add(Gt)),It.easeFunc(ua,ga,da,Kt),this.terrain&&!y.freezeElevation&&this._updateElevation(ua),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},()=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N)},y),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(y,N){var ie;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let fe=this._onEaseEnd;delete this._onEaseEnd,fe.call(this,N)}return y||(ie=this.handlers)===null||ie===void 0||ie.stop(!1),this}_ease(y,N,ie){ie.animate===!1||ie.duration===0?(y(1),N()):(this._easeStart=m(),this._easeOptions=ie,this._onEaseFrame=y,this._onEaseEnd=N,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(y,N){y=e.X(y,-180,180);let ie=Math.abs(y-N);return Math.abs(y-360-N)MapLibre'};class ll{constructor(y=pu){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=N=>{!N||N.sourceDataType!=="metadata"&&N.sourceDataType!=="visibility"&&N.dataType!=="style"&&N.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=y}getDefaultPosition(){return"bottom-right"}onAdd(y){return this._map=y,this._compact=this.options.compact,this._container=g.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=g.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=g.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(){this._container.remove(),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(y,N){let ie=this._map._getUIString(`AttributionControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)}_updateAttributions(){if(!this._map.style)return;let y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?y=y.concat(this.options.customAttribution.map(fe=>typeof fe!="string"?"":fe)):typeof this.options.customAttribution=="string"&&y.push(this.options.customAttribution)),this._map.style.stylesheet){let fe=this._map.style.stylesheet;this.styleOwner=fe.owner,this.styleId=fe.id}let N=this._map.style.tileManagers;for(let fe in N){let be=N[fe];if(be.used||be.usedForTerrain){let Re=be.getSource();Re.attribution&&!y.includes(Re.attribution)&&y.push(Re.attribution)}}y=y.filter(fe=>String(fe).trim()),y.sort((fe,be)=>fe.length-be.length),y=y.filter((fe,be)=>{for(let Re=be+1;Re{let N=this._container.children;if(N.length){let ie=N[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&ie.classList.add("maplibregl-compact"):ie.classList.remove("maplibregl-compact")}},this.options=y}getDefaultPosition(){return"bottom-left"}onAdd(y){var N;this._map=y,this._compact=(N=this.options)===null||N===void 0?void 0:N.compact,this._container=g.create("div","maplibregl-ctrl");let ie=g.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(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class de{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(y){let N=++this._id;return this._queue.push({callback:y,id:N,cancelled:!1}),N}remove(y){let N=this._currentlyRunning,ie=N?this._queue.concat(N):this._queue;for(let fe of ie)if(fe.id===y)return void(fe.cancelled=!0)}run(y=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let N=this._currentlyRunning=this._queue;this._queue=[];for(let ie of N)if(!ie.cancelled&&(ie.callback(y),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ee=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class qe extends e.E{constructor(y){super(),this._lastTilesetChange=m(),this.tileManager=y,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=y._source.tileSize*2**this.deltaZoom,y.usedForTerrain=!0,y.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(y,N){this.tileManager.update(y,N),this._renderableTilesKeys=[];let ie={};for(let fe of Je(y,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:N,calculateTileZoom:this.tileManager._source.calculateTileZoom}))ie[fe.key]=!0,this._renderableTilesKeys.push(fe.key),this._tiles[fe.key]||(fe.terrainRttPosMatrix32f=new Float64Array(16),e.c7(fe.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[fe.key]=new Tt(fe,this.tileSize),this._lastTilesetChange=m());for(let fe in this._tiles)ie[fe]||delete this._tiles[fe]}freeRtt(y){for(let N in this._tiles){let ie=this._tiles[N];(!y||ie.tileID.equals(y)||ie.tileID.isChildOf(y)||y.isChildOf(ie.tileID))&&(ie.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(y=>this.getTileByID(y))}getTileByID(y){return this._tiles[y]}getTerrainCoords(y,N){return N?this._getTerrainCoordsForTileRanges(y,N):this._getTerrainCoordsForRegularTile(y)}_getTerrainCoordsForRegularTile(y){let N={};for(let ie of this._renderableTilesKeys){let fe=this._tiles[ie].tileID,be=y.clone(),Re=e.bj();if(fe.canonical.equals(y.canonical))e.c7(Re,0,e.a6,e.a6,0,0,1);else if(fe.canonical.isChildOf(y.canonical)){let je=fe.canonical.z-y.canonical.z,Ze=fe.canonical.x-(fe.canonical.x>>je<>je<>je;e.c7(Re,0,ft,ft,0,0,1),e.Q(Re,Re,[-Ze*ft,-ut*ft,0])}else{if(!y.canonical.isChildOf(fe.canonical))continue;{let je=y.canonical.z-fe.canonical.z,Ze=y.canonical.x-(y.canonical.x>>je<>je<>je;e.c7(Re,0,e.a6,e.a6,0,0,1),e.Q(Re,Re,[Ze*ft,ut*ft,0]),e.S(Re,Re,[1/2**je,1/2**je,0])}}be.terrainRttPosMatrix32f=new Float32Array(Re),N[ie]=be}return N}_getTerrainCoordsForTileRanges(y,N){let ie={};for(let fe of this._renderableTilesKeys){let be=this._tiles[fe].tileID;if(!this._isWithinTileRanges(be,N))continue;let Re=y.clone(),je=e.bj();if(be.canonical.z===y.canonical.z){let Ze=y.canonical.x-be.canonical.x+y.wrap*(1<y.canonical.z){let Ze=be.canonical.z-y.canonical.z,ut=be.canonical.x-(be.canonical.x>>Ze<>Ze<>Ze),Gt=y.canonical.y-(be.canonical.y>>Ze),Kt=e.a6>>Ze;e.c7(je,0,Kt,Kt,0,0,1),e.Q(je,je,[-ut*Kt+Dt*e.a6,-ft*Kt+Gt*e.a6,0])}else{let Ze=y.canonical.z-be.canonical.z,ut=y.canonical.x-(y.canonical.x>>Ze<>Ze<>Ze)-be.canonical.x,Gt=(y.canonical.y>>Ze)-be.canonical.y,Kt=e.a6<be.maxzoom&&(Re=be.maxzoom),Re=be.minzoom&&!je?.dem;)je=this.findTileInCaches(y.scaledTo(Re--).key);return je}findTileInCaches(y){let N=this.tileManager.getTileByID(y);return N||(N=this.tileManager._outOfViewCache.getByKey(y),N)}anyTilesAfterTime(y=Date.now()){return this._lastTilesetChange>=y}_isWithinTileRanges(y,N){let ie=N[y.canonical.z];return!!ie&&(y.wrap>ie.minWrap||y.wrap=ie.minTileXWrapped&&y.canonical.x<=ie.maxTileXWrapped&&y.canonical.y>=ie.minTileY&&y.canonical.y<=ie.maxTileY)}}class tt{constructor(y,N,ie){this._meshCache={},this.painter=y,this.tileManager=new qe(N),this.options=ie,this.exaggeration=typeof ie.exaggeration=="number"?ie.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let y in this._meshCache)this._meshCache[y].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(y,N,ie,fe=e.a6){var be;let Re=y.normalizeCoordinates(N,ie,fe);if(!Re)return 0;let je=this.getTerrainData(Re.tileID),Ze=(be=je.tile)===null||be===void 0?void 0:be.dem;if(!Ze)return 0;let ut=e.cC([],[Re.x/fe*e.a6,Re.y/fe*e.a6],je.u_terrain_matrix),ft=[ut[0]*Ze.dim,ut[1]*Ze.dim],Dt=Math.floor(ft[0]),Gt=Math.floor(ft[1]),Kt=ft[0]-Dt,st=ft[1]-Gt;return Ze.get(Dt,Gt)*(1-Kt)*(1-st)+Ze.get(Dt+1,Gt)*Kt*(1-st)+Ze.get(Dt,Gt+1)*(1-Kt)*st+Ze.get(Dt+1,Gt+1)*Kt*st}getElevationForLngLatZoom(y,N){if(!e.cD(N,y.wrap()))return 0;let{tileID:ie,mercatorX:fe,mercatorY:be}=this._getOverscaledTileIDFromLngLatZoom(y,N);return this.getElevation(ie,fe%e.a6,be%e.a6,e.a6)}getElevationForLngLat(y,N){let ie=Je(N,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),fe=0;for(let be of ie)be.canonical.z>fe&&(fe=Math.min(be.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(y,fe)}getElevation(y,N,ie,fe=e.a6){return this.getDEMElevation(y,N,ie,fe)*this.exaggeration}getTerrainData(y){var N,ie;if(!this._emptyDemTexture){let Re=this.painter.context,je=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(Re,je,Re.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(Re,new e.R({width:1,height:1}),Re.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}let fe=this.tileManager.getSourceTile(y,!0);if(fe?.dem&&(!fe.demTexture||fe.needsTerrainPrepare)){let Re=this.painter.context;fe.demTexture=this.painter.getTileTexture(fe.dem.stride),fe.demTexture?fe.demTexture.update(fe.dem.getPixels(),{premultiply:!1}):fe.demTexture=new e.T(Re,fe.dem.getPixels(),Re.gl.RGBA,{premultiply:!1}),fe.demTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),fe.needsTerrainPrepare=!1}let be=fe&&fe.toString()+fe.tileID.key+y.key;if(be&&!this._demMatrixCache[be]){let Re=this.tileManager.getSource().maxzoom,je=y.canonical.z-fe.tileID.canonical.z;y.overscaledZ>y.canonical.z&&(y.canonical.z>=Re?je=y.canonical.z-Re:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ze=y.canonical.x-(y.canonical.x>>je<>je<>8<<4|be>>8,N[Re+3]=0;let ie=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(N.buffer)),fe=new e.T(y,ie,y.gl.RGBA,{premultiply:!1});return fe.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._coordsTexture=fe,fe}pointCoordinate(y){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let N=new Uint8Array(4),ie=this.painter.context,fe=ie.gl,be=Math.round(y.x*this.painter.pixelRatio/devicePixelRatio),Re=Math.round(y.y*this.painter.pixelRatio/devicePixelRatio),je=Math.round(this.painter.height/devicePixelRatio);ie.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),fe.readPixels(be,je-Re-1,1,1,fe.RGBA,fe.UNSIGNED_BYTE,N),ie.bindFramebuffer.set(null);let Ze=N[0]+(N[2]>>4<<8),ut=N[1]+((15&N[2])<<8),ft=this.coordsIndex[255-N[3]],Dt=ft&&this.tileManager.getTileByID(ft);if(!Dt)return null;let Gt=this._coordsTextureSize,Kt=(1<0,fe=ie&&y.canonical.y===0,be=ie&&y.canonical.y===(1<y.id!==N),this._recentlyUsed.push(y.id)}stampObject(y){y.stamp=++this._stamp}getOrCreateFreeObject(){for(let N of this._recentlyUsed)if(!this._objects[N].inUse)return this._objects[N];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let y=this._createObject(this._objects.length);return this._objects.push(y),y}freeObject(y){y.inUse=!1}freeAllObjects(){for(let y of this._objects)this.freeObject(y)}isFull(){return!(this._objects.length!y.inUse)===!1}}let ct={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Nt{constructor(y,N){this.painter=y,this.terrain=N,this.pool=new at(y.context,30,N.tileManager.tileSize*N.qualityFactor)}destruct(){this.pool.destruct()}getTexture(y){return this.pool.getObjectForId(y.rtt[this._stacks.length-1].id).texture}prepareForRender(y,N){var ie,fe,be;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=y._order.filter(Re=>!y._layers[Re].isHidden(N)),this._coordsAscending={};for(let Re in y.tileManagers){this._coordsAscending[Re]={};let je=y.tileManagers[Re].getVisibleCoordinates(),Ze=y.tileManagers[Re].getSource(),ut=Ze instanceof ke?Ze.terrainTileRanges:null;for(let ft of je){let Dt=this.terrain.tileManager.getTerrainCoords(ft,ut);for(let Gt in Dt)(be=this._coordsAscending[Re])[Gt]||(be[Gt]=[]),this._coordsAscending[Re][Gt].push(Dt[Gt])}}this._rttFingerprints={};for(let Re of y._order){let je=y._layers[Re],Ze=je.source;if(ct[je.type]&&!this._rttFingerprints[Ze]){this._rttFingerprints[Ze]={};let ut=(fe=(ie=y.tileManagers[Ze])===null||ie===void 0?void 0:ie.getState().revision)!==null&&fe!==void 0?fe:0;for(let ft in this._coordsAscending[Ze])this._rttFingerprints[Ze][ft]=`${this._coordsAscending[Ze][ft].map(Dt=>Dt.key).sort().join()}#${ut}`}}for(let Re of this._renderableTiles)for(let je in this._rttFingerprints){let Ze=this._rttFingerprints[je][Re.tileID.key];Ze&&Ze!==Re.rttFingerprint[je]&&(Re.rtt=[])}}renderLayer(y,N){if(y.isHidden(this.painter.transform.zoom))return!1;let ie=Object.assign(Object.assign({},N),{isRenderingToTexture:!0}),fe=y.type,be=this.painter,Re=this._renderableLayerIds[this._renderableLayerIds.length-1]===y.id;if(ct[fe]&&(this._prevType&&ct[this._prevType]||this._stacks.push([]),this._prevType=fe,this._stacks[this._stacks.length-1].push(y.id),!Re))return!0;if(ct[this._prevType]||ct[fe]&&Re){this._prevType=fe;let je=this._stacks.length-1,Ze=this._stacks[je]||[];for(let ut of this._renderableTiles){if(this.pool.isFull()&&(Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(ut),ut.rtt[je]){let Dt=this.pool.getObjectForId(ut.rtt[je].id);if(Dt.stamp===ut.rtt[je].stamp){this.pool.useObject(Dt);continue}}let ft=this.pool.getOrCreateFreeObject();this.pool.useObject(ft),this.pool.stampObject(ft),ut.rtt[je]={id:ft.id,stamp:ft.stamp},be.context.bindFramebuffer.set(ft.fbo.framebuffer),be.context.clear({color:e.bo.transparent,stencil:0}),be.currentStencilSource=void 0;for(let Dt of Ze){let Gt=be.style._layers[Dt],Kt=Gt.source?this._coordsAscending[Gt.source][ut.tileID.key]:[ut.tileID];be.context.viewport.set([0,0,ft.fbo.width,ft.fbo.height]),be._renderTileClippingMasks(Gt,Kt,!0),be.renderLayer(be,be.style.tileManagers[Gt.source],Gt,Kt,ie),Gt.source&&(ut.rttFingerprint[Gt.source]=this._rttFingerprints[Gt.source][ut.tileID.key])}}return Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects(),ct[fe]}return!1}}let St={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Jt=t,mr={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:pu,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},gr=class extends gc{get _ownerWindow(){var pe,y;return((y=(pe=this._container)===null||pe===void 0?void 0:pe.ownerDocument)===null||y===void 0?void 0:y.defaultView)||window}constructor(pe){var y,N,ie;let fe=Object.assign(Object.assign(Object.assign({},mr),pe),{canvasContextAttributes:Object.assign(Object.assign({},mr.canvasContextAttributes),pe.canvasContextAttributes)});if(fe.minZoom!=null&&fe.maxZoom!=null&&fe.minZoom>fe.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(fe.minPitch!=null&&fe.maxPitch!=null&&fe.minPitch>fe.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(fe.minPitch!=null&&fe.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(fe.maxPitch!=null&&fe.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let be=new Eo,Re=new Wo;fe.minZoom!==void 0&&be.setMinZoom(fe.minZoom),fe.maxZoom!==void 0&&be.setMaxZoom(fe.maxZoom),fe.minPitch!==void 0&&be.setMinPitch(fe.minPitch),fe.maxPitch!==void 0&&be.setMaxPitch(fe.maxPitch),fe.renderWorldCopies!==void 0&&be.setRenderWorldCopies(fe.renderWorldCopies),fe.transformConstrain!==null&&be.setConstrainOverride(fe.transformConstrain),super(be,Re,{bearingSnap:fe.bearingSnap,zoomSnap:fe.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new de,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ze=>{if(Ze.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let ut of Object.values(this.style._layers))if(ut.type==="custom"&&console.warn(`Custom layer with id '${ut.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),ut._listeners)for(let[ft]of Object.entries(ut._listeners))console.warn(`Custom layer with id '${ut.id}' had event listeners for event '${ft}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))}else this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))},this._contextRestored=Ze=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:Ze}))},this._onMapScroll=Ze=>{if(Ze.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=fe.interactive,this._maxTileCacheSize=fe.maxTileCacheSize,this._maxTileCacheZoomLevels=fe.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},fe.canvasContextAttributes),this._trackResize=fe.trackResize===!0,this._bearingSnap=fe.bearingSnap,this._zoomSnap=fe.zoomSnap,this._centerClampedToGround=fe.centerClampedToGround,this._refreshExpiredTiles=fe.refreshExpiredTiles===!0,this._fadeDuration=fe.fadeDuration,this._crossSourceCollisions=fe.crossSourceCollisions===!0,this._collectResourceTiming=fe.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},St),fe.locale),this._clickTolerance=fe.clickTolerance,this._overridePixelRatio=fe.pixelRatio,this._maxCanvasSize=fe.maxCanvasSize,this._zoomLevelsToOverscale=fe.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=fe.transformCameraUpdate,this.transformConstrain=fe.transformConstrain,this.cancelPendingTileRequestsWhileZooming=fe.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(fe.anisotropicFilterPitch),fe.reduceMotion!==void 0&&(s.prefersReducedMotion=fe.reduceMotion),this._imageQueueHandle=v.addThrottleControl(()=>this.isMoving()),this._requestManager=new i(fe.transformRequest),this._container=this._resolveContainer(fe.container),fe.maxBounds&&this.setMaxBounds(fe.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Ps(this,fe),this._hash=fe.hash?new Jc(typeof fe.hash=="string"&&fe.hash||void 0).addTo(this):void 0,!((y=this._hash)===null||y===void 0)&&y._onHashChange()||(this.jumpTo({center:fe.center,elevation:fe.elevation,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,roll:fe.roll}),fe.bounds&&(this.resize(),this.fitBounds(fe.bounds,e.e({},fe.fitBoundsOptions,{duration:0}))));let je=typeof fe.style=="string"||((ie=(N=fe.style)===null||N===void 0?void 0:N.projection)===null||ie===void 0?void 0:ie.type)!=="globe";this.resize(null,je),this._localIdeographFontFamily=fe.localIdeographFontFamily,this._validateStyle=fe.validateStyle,fe.style&&this.setStyle(fe.style,{localIdeographFontFamily:fe.localIdeographFontFamily}),fe.attributionControl&&this.addControl(new ll(typeof fe.attributionControl=="boolean"?void 0:fe.attributionControl)),fe.maplibreLogo&&this.addControl(new ef,fe.logoPosition),this.on("style.load",()=>{if(je||this._resizeTransform(),this.transform.unmodified){let Ze=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ze)}}),this.on("data",Ze=>{this._update(Ze.dataType==="style"),this.fire(new e.n(`${Ze.dataType}data`,Ze))}),this.on("dataloading",Ze=>{this.fire(new e.n(`${Ze.dataType}dataloading`,Ze))}),this.on("dataabort",Ze=>{this.fire(new e.n("sourcedataabort",Ze))})}_getMapId(){return this._mapId}setGlobalStateProperty(pe,y){return this.style.setGlobalStateProperty(pe,y),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(pe,y){if(y===void 0&&(y=pe.getDefaultPosition?pe.getDefaultPosition():"top-right"),!pe?.onAdd)return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let N=pe.onAdd(this);this._controls.push(pe);let ie=this._controlPositions[y];return y.includes("bottom")?ie.insertBefore(N,ie.firstChild):ie.appendChild(N),this}removeControl(pe){if(!pe?.onRemove)return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let y=this._controls.indexOf(pe);return y>-1&&this._controls.splice(y,1),pe.onRemove(this),this}hasControl(pe){return this._controls.includes(pe)}coveringTiles(pe){return Je(this.transform,pe)}calculateCameraOptionsFromTo(pe,y,N,ie){return ie==null&&this.terrain&&(ie=this.terrain.getElevationForLngLat(N,this.transform)),super.calculateCameraOptionsFromTo(pe,y,N,ie)}resize(pe,y=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(y);let N=!this._moving;return N&&(this.stop(),this.fire(new e.n("movestart",pe)).fire(new e.n("move",pe))),this.fire(new e.n("resize",pe)),N&&this.fire(new e.n("moveend",pe)),this}_resizeInternal(pe=!0){let[y,N]=this._containerDimensions(),ie=this._getClampedPixelRatio(y,N);if(this._resizeCanvas(y,N,ie),this.painter.resize(y,N,ie),this.painter.overLimit()){let fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];let be=this._getClampedPixelRatio(y,N);this._resizeCanvas(y,N,be),this.painter.resize(y,N,be)}this._resizeTransform(pe)}_resizeTransform(pe=!0){var y;let[N,ie]=this._containerDimensions();this.transform.resize(N,ie,pe),(y=this._requestedCameraState)===null||y===void 0||y.resize(N,ie,pe)}_getClampedPixelRatio(pe,y){let{0:N,1:ie}=this._maxCanvasSize,fe=this.getPixelRatio(),be=pe*fe,Re=y*fe;return Math.min(be>N?N/be:1,Re>ie?ie/Re:1)*fe}getPixelRatio(){var pe;return(pe=this._overridePixelRatio)!==null&&pe!==void 0?pe:devicePixelRatio}setPixelRatio(pe){this._overridePixelRatio=pe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(pe){return this.transform.setMaxBounds(q.convert(pe)),this._update()}setMinZoom(pe){if((pe=pe??-2)>=-2&&pe<=this.transform.maxZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMinZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(pe){if((pe=pe??22)>=this.transform.minZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMaxZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(pe){if((pe=pe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(pe>=0&&pe<=this.transform.maxPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMinPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(pe){if((pe=pe??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(pe>=this.transform.minPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMaxPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(pe){if((pe=pe??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(pe<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=pe,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(pe){return this.transform.setRenderWorldCopies(pe),this._update()}setTransformConstrain(pe){return this.transform.setConstrainOverride(pe),this._update()}project(pe){return this.transform.locationToScreenPoint(e.W.convert(pe),this.style&&this.terrain)}unproject(pe){return this.transform.screenPointToLocation(e.P.convert(pe),this.terrain)}isMoving(){var pe;return this._moving||((pe=this.handlers)===null||pe===void 0?void 0:pe.isMoving())}isZooming(){var pe;return this._zooming||((pe=this.handlers)===null||pe===void 0?void 0:pe.isZooming())}isRotating(){var pe;return this._rotating||((pe=this.handlers)===null||pe===void 0?void 0:pe.isRotating())}_createDelegatedListener(pe,y,N){if(pe==="mouseenter"||pe==="mouseover"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:be=>{let Re=y.filter(Ze=>this.getLayer(Ze)),je=Re.length!==0?this.queryRenderedFeatures(be.point,{layers:Re}):[];je.length?ie||(ie=!0,N.call(this,new Bl(pe,this,be.originalEvent,{features:je}))):ie=!1},mouseout:()=>{ie=!1}}}}if(pe==="mouseleave"||pe==="mouseout"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:Re=>{let je=y.filter(Ze=>this.getLayer(Ze));(je.length!==0?this.queryRenderedFeatures(Re.point,{layers:je}):[]).length?ie=!0:ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))},mouseout:Re=>{ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))}}}}{let ie=fe=>{let be=y.filter(je=>this.getLayer(je)),Re=be.length!==0?this.queryRenderedFeatures(fe.point,{layers:be}):[];Re.length&&(fe.features=Re,N.call(this,fe),delete fe.features)};return{layers:y,listener:N,delegates:{[pe]:ie}}}}_saveDelegatedListener(pe,y){var N;this._delegatedListeners||(this._delegatedListeners={}),(N=this._delegatedListeners)[pe]||(N[pe]=[]),this._delegatedListeners[pe].push(y)}_removeDelegatedListener(pe,y,N){var ie;if(!(!((ie=this._delegatedListeners)===null||ie===void 0)&&ie[pe]))return;let fe=this._delegatedListeners[pe];for(let be=0;bey.includes(je))){for(let je in Re.delegates)this.off(je,Re.delegates[je]);return void fe.splice(be,1)}}}on(pe,y,N){if(N===void 0)return super.on(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.on(be,fe.delegates[be]);return{unsubscribe:()=>{this._removeDelegatedListener(pe,ie,N)}}}once(pe,y,N){if(N===void 0)return super.once(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);for(let be in fe.delegates){let Re=fe.delegates[be];fe.delegates[be]=(...je)=>{this._removeDelegatedListener(pe,ie,N),Re(...je)}}this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.once(be,fe.delegates[be]);return this}off(pe,y,N){return N===void 0?super.off(pe,y):(this._removeDelegatedListener(pe,typeof y=="string"?[y]:y,N),this)}queryRenderedFeatures(pe,y){if(!this.style)return[];let N,ie=pe instanceof e.P||Array.isArray(pe),fe=ie?pe:[[0,0],[this.transform.width,this.transform.height]];if(y||(y=(ie?{}:pe)||{}),fe instanceof e.P||typeof fe[0]=="number")N=[e.P.convert(fe)];else{let be=e.P.convert(fe[0]),Re=e.P.convert(fe[1]);N=[be,new e.P(Re.x,be.y),Re,new e.P(be.x,Re.y),be]}return this.style.queryRenderedFeatures(N,y,this.transform)}querySourceFeatures(pe,y){return this.style.querySourceFeatures(pe,y)}setStyle(pe,y){return(y=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&pe?(this._diffStyle(pe,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(pe,y))}setTransformRequest(pe){return this._requestManager.setTransformRequest(pe),this}_getUIString(pe){let y=this._locale[pe];if(y==null)throw new Error(`Missing UI string '${pe}'`);return y}_updateStyle(pe,y){var N,ie,fe;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),this._diffStyleRequest=null,y.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(pe,y));let be=this.style&&y.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!pe)),pe?(this.style=new Ku(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof pe=="string"?this.style.loadURL(pe,y,be):this.style.loadJSON(pe,y,be),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(fe=(ie=this.style)===null||ie===void 0?void 0:ie.projection)===null||fe===void 0||fe.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ku(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(pe,y){return e._(this,void 0,void 0,function*(){var N;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),typeof pe=="string"){let ie=pe;this._diffStyleRequest=new AbortController;let fe=this._diffStyleRequest;try{let be=yield this._requestManager.transformRequest(ie,"Style");if(fe.signal.aborted)return void(this._diffStyleRequest=null);let Re=yield e.k(be,fe);this._diffStyleRequest=null,this._updateDiff(Re.data,y)}catch(be){this._diffStyleRequest=null,e.$(be)||this.fire(new e.l(e.d(be)))}}else typeof pe=="object"&&(this._diffStyleRequest=null,this._updateDiff(pe,y))})}_updateDiff(pe,y){try{this.style.setState(pe,y)&&this._update(!0)}catch(N){e.w(`Unable to perform style diff: ${e.d(N).message}. Rebuilding the style from scratch.`),this._updateStyle(pe,y)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(pe,y){return this._lazyInitEmptyStyle(),this.style.addSource(pe,y),this._update(!0)}isSourceLoaded(pe){var y;let N=(y=this.style)===null||y===void 0?void 0:y.tileManagers[pe];if(N!==void 0)return N.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${pe}'`)))}setTerrain(pe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),pe){let y=this.style.tileManagers[pe.source];if(!y)throw new Error(`cannot load terrain, because there exists no source with ID: ${pe.source}`);this.terrain===null&&y.reload();for(let N in this.style._layers){let ie=this.style._layers[N];ie.type==="hillshade"&&ie.source===pe.source&&e.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."),ie.type==="color-relief"&&ie.source===pe.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new tt(this.painter,y,pe),this.painter.renderToTexture=new Nt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=N=>{var ie;N.dataType==="style"?this.terrain.tileManager.freeRtt():N.dataType==="source"&&N.tile&&(N.sourceId!==pe.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((ie=N.source)===null||ie===void 0?void 0:ie.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(N.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:pe})),this}getTerrain(){var pe,y;return(y=(pe=this.terrain)===null||pe===void 0?void 0:pe.options)!==null&&y!==void 0?y:null}areTilesLoaded(){var pe;let y=(pe=this.style)===null||pe===void 0?void 0:pe.tileManagers;for(let N of Object.values(y))if(!N.areTilesLoaded())return!1;return!0}removeSource(pe){return this.style.removeSource(pe),this._update(!0)}getSource(pe){return this.style.getSource(pe)}setSourceTileLodParams(pe,y,N){if(N){let ie=this.getSource(N);if(!ie)throw new Error(`There is no source with ID "${N}", cannot set LOD parameters`);ie.calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y))}else for(let ie in this.style.tileManagers)this.style.tileManagers[ie].getSource().calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y));return this._update(!0),this}refreshTiles(pe,y){let N=this.style.tileManagers[pe];if(!N)throw new Error(`There is no tile manager with ID "${pe}", cannot refresh tile`);y===void 0?N.reload(!0):N.refreshTiles(y.map(ie=>new e.aa(ie.z,ie.x,ie.y)))}addImage(pe,y,N={}){let{pixelRatio:ie=1,sdf:fe=!1,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut}=N;if(this._lazyInitEmptyStyle(),!(y instanceof HTMLImageElement||e.b(y))){if(y.width===void 0||y.height===void 0)return this.fire(new e.l(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:ft,height:Dt,data:Gt}=y,Kt=y;return this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},new Uint8Array(Gt)),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0,userImage:Kt}),Kt.onAdd&&Kt.onAdd(this,pe),this}}{let{width:ft,height:Dt,data:Gt}=s.getImageData(y);this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},Gt),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0})}}updateImage(pe,y){let N=this.style.getImage(pe);if(!N)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let ie=y instanceof HTMLImageElement||e.b(y)?s.getImageData(y):y,{width:fe,height:be,data:Re}=ie;if(fe===void 0||be===void 0)return this.fire(new e.l(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(fe!==N.data.width||be!==N.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let je=!(y instanceof HTMLImageElement||e.b(y));return N.data.replace(Re,je),this.style.updateImage(pe,N),this}getImage(pe){return this.style.getImage(pe)}hasImage(pe){return pe?!!this.style.getImage(pe):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(pe){this.style.removeImage(pe)}loadImage(pe){return e._(this,void 0,void 0,function*(){return v.getImage(yield this._requestManager.transformRequest(pe,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(pe,y){return this._lazyInitEmptyStyle(),this.style.addLayer(pe,y),this._update(!0)}moveLayer(pe,y){return this.style.moveLayer(pe,y),this._update(!0)}removeLayer(pe){return this.style.removeLayer(pe),this._update(!0)}getLayer(pe){return this.style.getLayer(pe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(pe,y,N){return this.style.setLayerZoomRange(pe,y,N),this._update(!0)}setFilter(pe,y,N={}){return this.style.setFilter(pe,y,N),this._update(!0)}getFilter(pe){return this.style.getFilter(pe)}setPaintProperty(pe,y,N,ie={}){return this.style.setPaintProperty(pe,y,N,ie),this._update(!0)}getPaintProperty(pe,y){return this.style.getPaintProperty(pe,y)}setLayoutProperty(pe,y,N,ie={}){return this.style.setLayoutProperty(pe,y,N,ie),this._update(!0)}getLayoutProperty(pe,y){return this.style.getLayoutProperty(pe,y)}setGlyphs(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(pe,y),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(pe,y,N={}){return this._lazyInitEmptyStyle(),this.style.addSprite(pe,y,N,ie=>{ie||this._update(!0)}),this}removeSprite(pe){return this._lazyInitEmptyStyle(),this.style.removeSprite(pe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSprite(pe,y,N=>{N||this._update(!0)}),this}setLight(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setLight(pe,y),this._update(!0)}getLight(){return this.style.getLight()}setSky(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSky(pe,y),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(pe,y){return this.style.setFeatureState(pe,y),this._update()}removeFeatureState(pe,y){return this.style.removeFeatureState(pe,y),this._update()}getFeatureState(pe){return this.style.getFeatureState(pe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let pe=0,y=0;return this._container&&(pe=this._container.clientWidth||400,y=this._container.clientHeight||300),[pe,y]}_setupResizeObserver(){var pe;let y=!1,N=mc(fe=>{this._trackResize&&!this._removed&&(this.resize(fe),this.redraw())},50),ie=(pe=this._ownerWindow.ResizeObserver)!==null&&pe!==void 0?pe:ResizeObserver;this._resizeObserver=new ie(fe=>{y?N(fe):y=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(pe){if(typeof pe=="string"){let y=document.getElementById(pe);if(!y)throw new Error(`Container '${pe}' not found.`);return y}if(pe instanceof HTMLElement||pe&&typeof pe=="object"&&pe.nodeType===1)return pe;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let pe=this._container;pe.classList.add("maplibregl-map");let y=this._canvasContainer=g.create("div","maplibregl-canvas-container",pe);this._interactive&&y.classList.add("maplibregl-interactive"),this._canvas=g.create("canvas","maplibregl-canvas",y),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 N=this._containerDimensions(),ie=this._getClampedPixelRatio(N[0],N[1]);this._resizeCanvas(N[0],N[1],ie);let fe=this._controlContainer=g.create("div","maplibregl-control-container",pe),be=this._controlPositions={};for(let Re of["top-left","top-right","bottom-left","bottom-right"])be[Re]=g.create("div",`maplibregl-ctrl-${Re} `,fe);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(pe,y,N){this._canvas.width=Math.floor(N*pe),this._canvas.height=Math.floor(N*y),this._canvas.style.width=`${pe}px`,this._canvas.style.height=`${y}px`}_setupPainter(){let pe=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),y=null;this._canvas.addEventListener("webglcontextcreationerror",ie=>{y={requestedAttributes:pe},ie&&(y.statusMessage=ie.statusMessage,y.type=ie.type)},{once:!0});let N=null;if(N=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,pe):this._canvas.getContext("webgl2",pe)||this._canvas.getContext("webgl",pe),!N){let ie="Failed to initialize WebGL";throw y?(y.message=ie,new Error(JSON.stringify(y))):new Error(ie)}this.painter=new Su(N,this.transform)}migrateProjection(pe,y){super.migrateProjection(pe,y),this.painter.transform=pe,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(pe){var y;return!((y=this.style)===null||y===void 0)&&y._loaded?(this._styleDirty||(this._styleDirty=pe),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(pe){return this._update(),this._renderTaskQueue.add(pe)}_cancelRenderFrame(pe){this._renderTaskQueue.remove(pe)}_render(pe){var y,N,ie,fe,be,Re;let je=this._idleTriggered?this._fadeDuration:0,Ze=((y=this.style.projection)===null||y===void 0?void 0:y.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(pe),this._removed)return;let ut=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Gt=this.transform.zoom,Kt=m();this.style.zoomHistory.update(Gt,Kt);let st=new e.J(Gt,{now:Kt,fadeDuration:je,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),It=st.crossFadingFactor();It===1&&It===this._crossFadingFactor||(ut=!0,this._crossFadingFactor=It),this.style.update(st)}let ft=((N=this.style.projection)===null||N===void 0?void 0:N.transitionState)>0!==Ze;(ie=this.style.projection)===null||ie===void 0||ie.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((fe=this.style.projection)===null||fe===void 0?void 0:fe.transitionState,(be=this.style.projection)===null||be===void 0?void 0:be.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ft)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(Re=this.style)===null||Re===void 0?void 0:Re._updatePlacement(this.transform,this.showCollisionBoxes,je,this._crossSourceCollisions,ft),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:je,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||ut)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Dt=this._sourcesDirty||this._styleDirty||this._placementDirty;return Dt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||Dt||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var pe,y;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(),(pe=this._diffStyleRequest)===null||pe===void 0||pe.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),v.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();let N=this.painter.context.gl.getExtension("WEBGL_lose_context");N?.loseContext&&N.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frame(this._frameRequest,pe=>{this._frameRequest=null;try{this._render(pe)}catch(y){if(!e.$(y)&&!function(N){return N.message===vc}(y))throw y}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(pe){this._showTileBoundaries!==pe&&(this._showTileBoundaries=pe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(pe){this._showPadding!==pe&&(this._showPadding=pe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(pe){this._showCollisionBoxes!==pe&&(this._showCollisionBoxes=pe,pe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(pe){this._showOverdrawInspector!==pe&&(this._showOverdrawInspector=pe,this._update())}get repaint(){return!!this._repaint}set repaint(pe){this._repaint!==pe&&(this._repaint=pe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(pe){this._vertices=pe,this._update()}get version(){return Jt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(pe){return this._lazyInitEmptyStyle(),this.style.setProjection(pe),this._update(!0)}},Hr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Vr{constructor(y,N,ie=!1){this.mousedown=be=>{this.startMove(be,g.mousePos(this.element,be)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=be=>{this.move(be,g.mousePos(this.element,be))},this.mouseup=be=>{this._rotatePitchHandler.dragEnd(be),this.offTemp()},this.touchstart=be=>{be.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.startMove(be,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=be=>{be.targetTouches.length!==1?this.reset():(this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.move(be,this._lastPos))},this.touchend=be=>{be.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=N;let fe=new Br;this._rotatePitchHandler=new mt({clickTolerance:3,move:(be,Re)=>{let je=N.getBoundingClientRect(),Ze=new e.P((je.bottom-je.top)/2,(je.right-je.left)/2);return{bearingDelta:e.cx(new e.P(be.x,Re.y),Re,Ze),pitchDelta:ie?-.5*(Re.y-be.y):void 0}},moveStateManager:fe,enable:!0,assignEvents:()=>{}}),this.map=y,N.addEventListener("mousedown",this.mousedown),N.addEventListener("touchstart",this.touchstart,{passive:!1}),N.addEventListener("touchcancel",this.reset)}startMove(y,N){this._rotatePitchHandler.dragStart(y,N),g.disableDrag()}move(y,N){let ie=this.map,{bearingDelta:fe,pitchDelta:be}=this._rotatePitchHandler.dragMove(y,N)||{};fe&&ie.setBearing(ie.getBearing()+fe),be&&ie.setPitch(ie.getPitch()+be)}off(){let y=this.element;y.removeEventListener("mousedown",this.mousedown),y.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),y.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){g.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let ca;function Aa(pe,y,N,ie=!1){if(ie||!N.getCoveringTilesDetailsProvider().allowWorldCopies())return pe?.wrap();let fe=new e.W(pe.lng,pe.lat);if(pe=new e.W(pe.lng,pe.lat),y){let be=new e.W(pe.lng-360,pe.lat),Re=new e.W(pe.lng+360,pe.lat),je=N.locationToScreenPoint(pe).distSqr(y);N.locationToScreenPoint(be).distSqr(y)180;){let be=N.locationToScreenPoint(pe);if(be.x>=0&&be.y>=0&&be.x<=N.width&&be.y<=N.height)break;pe.lng>N.center.lng?pe.lng-=360:pe.lng+=360}return pe.lng!==fe.lng&&N.isPointOnMapSurface(N.locationToScreenPoint(pe))?pe:fe}let Xr={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 oa(pe,y,N){let ie=pe.classList;for(let fe in Xr)ie.remove(`maplibregl-${N}-anchor-${fe}`);ie.add(`maplibregl-${N}-anchor-${y}`)}class fa extends e.E{constructor(y){if(super(),this._onClick=N=>{this.fire(new e.n("click",{originalEvent:N}))},this._onKeyPress=N=>{N.code!=="Space"&&N.code!=="Enter"||this.togglePopup()},this._onMapClick=N=>{let ie=N.originalEvent.target,fe=this._element;this._popup&&(ie===fe||fe.contains(ie))&&this.togglePopup()},this._update=N=>{if(!this._map)return;let ie=this._map.loaded()&&!this._map.isMoving();(N?.type==="terrain"||N?.type==="render"&&!ie)&&this._map.once("render",this._update),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let fe="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?fe=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(fe=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let be="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?be="rotateX(0deg)":this._pitchAlignment==="map"&&(be=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||N&&N.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${Xr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${be} ${fe}`,s.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(N?.type==="moveend")}).catch(()=>{})},this._onMove=N=>{if(!this._isDragging){let ie=this._clickTolerance||this._map._clickTolerance;this._isDragging=N.point.dist(this._pointerdownPos)>=ie}this._isDragging&&(this._pos=N.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.n("dragstart"))),this.fire(new e.n("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 e.n("dragend")),this._state="inactive"},this._addDragHandler=N=>{this._element.contains(N.originalEvent.target)&&(N.preventDefault(),this._positionDelta=N.point.sub(this._pos).add(this._offset),this._pointerdownPos=N.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=y?.anchor||"center",this._color=y?.color||"#3FB1CE",this._scale=y?.scale||1,this._draggable=y?.draggable||!1,this._clickTolerance=y?.clickTolerance||0,this._subpixelPositioning=y?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=y?.rotation||0,this._rotationAlignment=y?.rotationAlignment||"auto",this._pitchAlignment=y?.pitchAlignment&&y.pitchAlignment!=="auto"?y.pitchAlignment:this._rotationAlignment,this.setOpacity(y?.opacity,y?.opacityWhenCovered),y?.element)this._element=y.element,this._offset=e.P.convert(y?.offset||[0,0]);else{this._defaultMarker=!0,this._element=g.create("div");let N=g.createNS("http://www.w3.org/2000/svg","svg"),ie=41,fe=27;N.setAttributeNS(null,"display","block"),N.setAttributeNS(null,"height",`${ie}px`),N.setAttributeNS(null,"width",`${fe}px`),N.setAttributeNS(null,"viewBox",`0 0 ${fe} ${ie}`);let be=g.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 Re=g.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"fill-rule","nonzero");let je=g.createNS("http://www.w3.org/2000/svg","g");je.setAttributeNS(null,"transform","translate(3.0, 29.0)"),je.setAttributeNS(null,"fill","#000000");let Ze=[{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 ir of Ze){let dr=g.createNS("http://www.w3.org/2000/svg","ellipse");dr.setAttributeNS(null,"opacity","0.04"),dr.setAttributeNS(null,"cx","10.5"),dr.setAttributeNS(null,"cy","5.80029008"),dr.setAttributeNS(null,"rx",ir.rx),dr.setAttributeNS(null,"ry",ir.ry),je.appendChild(dr)}let ut=g.createNS("http://www.w3.org/2000/svg","g");ut.setAttributeNS(null,"fill",this._color);let ft=g.createNS("http://www.w3.org/2000/svg","path");ft.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"),ut.appendChild(ft);let Dt=g.createNS("http://www.w3.org/2000/svg","g");Dt.setAttributeNS(null,"opacity","0.25"),Dt.setAttributeNS(null,"fill","#000000");let Gt=g.createNS("http://www.w3.org/2000/svg","path");Gt.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"),Dt.appendChild(Gt);let Kt=g.createNS("http://www.w3.org/2000/svg","g");Kt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Kt.setAttributeNS(null,"fill","#FFFFFF");let st=g.createNS("http://www.w3.org/2000/svg","g");st.setAttributeNS(null,"transform","translate(8.0, 8.0)");let It=g.createNS("http://www.w3.org/2000/svg","circle");It.setAttributeNS(null,"fill","#000000"),It.setAttributeNS(null,"opacity","0.25"),It.setAttributeNS(null,"cx","5.5"),It.setAttributeNS(null,"cy","5.5"),It.setAttributeNS(null,"r","5.4999962");let Ut=g.createNS("http://www.w3.org/2000/svg","circle");Ut.setAttributeNS(null,"fill","#FFFFFF"),Ut.setAttributeNS(null,"cx","5.5"),Ut.setAttributeNS(null,"cy","5.5"),Ut.setAttributeNS(null,"r","5.4999962"),st.appendChild(It),st.appendChild(Ut),Re.appendChild(je),Re.appendChild(ut),Re.appendChild(Dt),Re.appendChild(Kt),Re.appendChild(st),N.appendChild(Re),N.setAttributeNS(null,"height",ie*this._scale+"px"),N.setAttributeNS(null,"width",fe*this._scale+"px"),this._element.appendChild(N),this._offset=e.P.convert(y?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",N=>{N.preventDefault()}),this._element.addEventListener("mousedown",N=>{N.preventDefault()}),oa(this._element,this._anchor,"marker"),y?.className)for(let N of y.className.split(" "))this._element.classList.add(N);this._popup=null}addTo(y){return this.remove(),this._map=y,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",y._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),y.getCanvasContainer().appendChild(this._element),y.on("move",this._update),y.on("moveend",this._update),y.on("terrain",this._update),y.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),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("projectiontransition",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),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=e.W.convert(y),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(y){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),y){if(!("offset"in y.options)){let fe=Math.abs(13.5)/Math.SQRT2;y.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[fe,-1*(38.1-13.5+fe)],"bottom-right":[-fe,-1*(38.1-13.5+fe)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=y,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(y){return this._subpixelPositioning=y,this}getPopup(){return this._popup}togglePopup(){let y=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:y?(y.isOpen()?y.remove():(y.setLngLat(this._lngLat),y.addTo(this._map)),this):this}_updateOpacity(y=!1){var N,ie;let fe=(N=this._map)===null||N===void 0?void 0:N.terrain,be=this._map.transform.isLocationOccluded(this._lngLat);if(!fe||be){let Kt=be?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Kt&&(this._element.style.opacity=Kt,this._element.classList.toggle("maplibregl-marker-covered",be)))}if(y)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Re=this._map,je=Re.terrain.depthAtPoint(this._pos),Ze=Re.terrain.getElevationForLngLat(this._lngLat,Re.transform);if(Re.transform.lngLatToCameraDepth(this._lngLat,Ze)-je<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let ut=-this._offset.y/Re.transform.pixelsPerMeter,ft=Math.sin(Re.getPitch()*Math.PI/180)*ut,Dt=Re.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=Re.transform.lngLatToCameraDepth(this._lngLat,Ze+ft)-Dt>.006;!((ie=this._popup)===null||ie===void 0)&&ie.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",Gt)}getOffset(){return this._offset}setOffset(y){return this._offset=e.P.convert(y),this._update(),this}addClassName(y){this._element.classList.add(y)}removeClassName(y){this._element.classList.remove(y)}toggleClassName(y){return this._element.classList.toggle(y)}setDraggable(y){return this._draggable=!!y,this._map&&(y?(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(y){return this._rotation=y||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(y){return this._rotationAlignment=y||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(y){return this._pitchAlignment=y&&y!=="auto"?y:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(y,N){return(this._opacity===void 0||y===void 0&&N===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),y!==void 0&&(this._opacity=String(y)),N!==void 0&&(this._opacityWhenCovered=String(N)),this._map&&this._updateOpacity(!0),this}}let Ea={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ma=0,sa=!1,hn={maxWidth:100,unit:"metric"};function An(pe,y,N){let ie=N?.maxWidth||100,fe=pe._container.clientHeight/2,be=pe._container.clientWidth/2,Re=pe.unproject([be-ie/2,fe]),je=pe.unproject([be+ie/2,fe]),Ze=Math.round(pe.project(je).x-pe.project(Re).x),ut=Math.min(ie,Ze,pe._container.clientWidth),ft=Re.distanceTo(je);if(N?.unit==="imperial"){let Dt=3.2808*ft;Dt>5280?zn(y,ut,Dt/5280,pe._getUIString("ScaleControl.Miles")):zn(y,ut,Dt,pe._getUIString("ScaleControl.Feet"))}else N?.unit==="nautical"?zn(y,ut,ft/1852,pe._getUIString("ScaleControl.NauticalMiles")):ft>=1e3?zn(y,ut,ft/1e3,pe._getUIString("ScaleControl.Kilometers")):zn(y,ut,ft,pe._getUIString("ScaleControl.Meters"))}function zn(pe,y,N,ie){let fe=function(be){let Re=Math.pow(10,`${Math.floor(be)}`.length-1),je=be/Re;return je=je>=10?10:je>=5?5:je>=3?3:je>=2?2:je>=1?1:function(Ze){let ut=Math.pow(10,Math.ceil(-Math.log(Ze)/Math.LN10));return Math.round(Ze*ut)/ut}(je),Re*je}(N);pe.style.width=y*(fe/N)+"px",pe.innerHTML=`${fe} ${ie}`}let $n={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},xi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function di(pe){if(pe){if(typeof pe=="number"){let y=Math.round(Math.abs(pe)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,pe),"top-left":new e.P(y,y),"top-right":new e.P(-y,y),bottom:new e.P(0,-pe),"bottom-left":new e.P(y,-y),"bottom-right":new e.P(-y,-y),left:new e.P(pe,0),right:new e.P(-pe,0)}}if(pe instanceof e.P||Array.isArray(pe)){let y=e.P.convert(pe);return{center:y,top:y,"top-left":y,"top-right":y,bottom:y,"bottom-left":y,"bottom-right":y,left:y,right:y}}return{center:e.P.convert(pe.center||[0,0]),top:e.P.convert(pe.top||[0,0]),"top-left":e.P.convert(pe["top-left"]||[0,0]),"top-right":e.P.convert(pe["top-right"]||[0,0]),bottom:e.P.convert(pe.bottom||[0,0]),"bottom-left":e.P.convert(pe["bottom-left"]||[0,0]),"bottom-right":e.P.convert(pe["bottom-right"]||[0,0]),left:e.P.convert(pe.left||[0,0]),right:e.P.convert(pe.right||[0,0])}}return di(new e.P(0,0))}let uo=t;l.AJAXError=e.cG,l.EXTENT=e.a6,l.Event=e.n,l.Evented=e.E,l.LngLat=e.W,l.MercatorCoordinate=e.a7,l.Point=e.P,l.addProtocol=e.cH,l.config=e.c,l.removeProtocol=e.cI,l.AttributionControl=ll,l.BoxZoomHandler=Nl,l.CanvasSource=ce,l.CooperativeGesturesHandler=wi,l.DoubleClickZoomHandler=ys,l.DragPanHandler=Hs,l.DragRotateHandler=Cu,l.EdgeInsets=oo,l.FullscreenControl=class extends e.E{constructor(pe={}){var y;super(),this._onFullscreenChange=()=>{var N;let ie=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((N=ie?.shadowRoot)===null||N===void 0)&&N.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(y=pe.pseudo)!==null&&y!==void 0&&y,pe?.container&&(pe.container instanceof HTMLElement?this._container=pe.container:e.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(pe){return this._map=pe,this._container||(this._container=this._map.getContainer()),this._controlContainer=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let pe=this._fullscreenButton=g.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);g.create("span","maplibregl-ctrl-icon",pe).setAttribute("aria-hidden","true"),pe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let pe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",pe),this._fullscreenButton.title=pe}_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 e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=Ge,l.GeolocateControl=class extends e.E{constructor(pe){super(),this._onSuccess=y=>{if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,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(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",y)),this._finish()}},this._updateCamera=y=>{let N=new e.W(y.coords.longitude,y.coords.latitude),ie=y.coords.accuracy,fe=this._map.getBearing(),be=e.e({bearing:fe},this.options.fitBoundsOptions),Re=q.fromLngLat(N,ie);this._map.fitBounds(Re,be,{geolocateSource:!0})},this._updateMarker=y=>{if(y){let N=new e.W(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(N).addTo(this._map),this._userLocationDotMarker.setLngLat(N).addTo(this._map),this._accuracy=y.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=y=>{if(this._map){if(y.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 N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&sa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",y)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=y=>{if(!this._map)return;let N=y?.[0]instanceof ResizeObserverEntry;y.geolocateSource||this._watchState!=="ACTIVE_LOCK"||N||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",y=>{y.preventDefault()}),this._geolocateButton=g.create("button","maplibregl-ctrl-geolocate",this._container),g.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=y=>{if(this._map){if(y===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}else{let N=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=g.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new fa({element:this._dotElement}),this._circleElement=g.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new fa({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},Ea,pe)}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(y=!1){if(ca!==void 0&&!y)return ca;if(window.navigator.permissions===void 0)return ca=!!window.navigator.geolocation,ca;try{ca=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ca=!!window.navigator.geolocation}return ca})}().then(y=>this._finishSetupUI(y)),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(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ma=0,sa=!1}_isOutOfMapMaxBounds(pe){let y=this._map.getMaxBounds(),N=pe.coords;return y&&(N.longitudey.getEast()||N.latitudey.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":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let pe=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&pe))return;let y=this._map.project(pe),N=this._map.unproject([y.x+100,y.y]),ie=pe.distanceTo(N)/100,fe=2*this._accuracy/ie;this._circleElement.style.width=`${fe.toFixed(2)}px`,this._circleElement.style.height=`${fe.toFixed(2)}px`}trigger(){if(!this._setup)return e.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 e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ma--,sa=!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 e.n("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 e.n("trackuserlocationstart")),this.fire(new e.n("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 pe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ma++,Ma>1?(pe={maximumAge:6e5,timeout:0},sa=!0):(pe=this.options.positionOptions,sa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,pe)}}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)}},l.GlobeControl=class{constructor(){this._toggleProjection=()=>{var pe;let y=(pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type;this._map.setProjection(y!=="mercator"&&y?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var pe;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=g.create("button","maplibregl-ctrl-globe",this._container),g.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},l.Hash=Jc,l.ImageSource=ke,l.KeyboardHandler=Ji,l.LngLatBounds=q,l.LogoControl=ef,l.Map=gr,l.MapLibreMap=gr,l.MapMouseEvent=Bl,l.MapTouchEvent=Wu,l.MapWheelEvent=wf,l.Marker=fa,l.NavigationControl=class{constructor(pe){this._updateZoomButtons=()=>{let y=this._map.getZoom(),N=y===this._map.getMaxZoom(),ie=y===this._map.getMinZoom();this._zoomInButton.disabled=N,this._zoomOutButton.disabled=ie,this._zoomInButton.setAttribute("aria-disabled",N.toString()),this._zoomOutButton.setAttribute("aria-disabled",ie.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(y,N)=>{let ie=this._map._getUIString(`NavigationControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)},this.options=e.e({},Hr,pe),this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",y=>y.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",y=>this._map.zoomIn({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",y=>this._map.zoomOut({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",y=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:y}):this._map.resetNorth({},{originalEvent:y})}),this._compassIcon=g.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(pe){return this._map=pe,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.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(pe,y){let N=g.create("button",pe,this._container);return N.type="button",N.addEventListener("click",y),N}},l.Popup=class extends e.E{constructor(pe){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),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("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=y=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=g.create("div","maplibregl-popup",this._map.getContainer()),this._tip=g.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let je of this.options.className.split(" "))this._container.classList.add(je);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let N;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),y&&"point"in y&&y.point&&(N=y.point),this._trackPointer&&!N)return;let ie=this._flatPos=this._pos=this._trackPointer&&N?N:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&N?N:this._map.transform.locationToScreenPoint(this._lngLat));let fe=this.options.anchor,be=di(this.options.offset);if(!fe){let je=this._container.offsetWidth,Ze=this._container.offsetHeight,ut=function(Dt){var Gt,Kt,st,It;return Dt?{top:(Gt=Dt.top)!==null&&Gt!==void 0?Gt:0,right:(Kt=Dt.right)!==null&&Kt!==void 0?Kt:0,bottom:(st=Dt.bottom)!==null&&st!==void 0?st:0,left:(It=Dt.left)!==null&&It!==void 0?It:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding),ft;ft=ie.y+be.bottom.ythis._map.transform.height-Ze-ut.bottom?["bottom"]:[],ie.xthis._map.transform.width-je/2-ut.right&&ft.push("right"),fe=ft.length===0?"bottom":ft.join("-")}let Re=ie.add(be[fe]);this.options.subpixelPositioning||(Re=Re.round()),this._container.style.transform=`${Xr[fe]} translate(${Re.x}px,${Re.y}px)`,oa(this._container,fe,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create($n),pe)}addTo(pe){return this._map&&this.remove(),this._map=pe,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._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),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 e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(pe){return this._lngLat=e.W.convert(pe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),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._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(pe){return this.setDOMContent(document.createTextNode(pe))}setHTML(pe){let y=document.createDocumentFragment(),N=document.createElement("body"),ie;for(N.innerHTML=pe;ie=N.firstChild,ie;)y.appendChild(ie);return this.setDOMContent(y)}getMaxWidth(){var pe;return(pe=this._container)===null||pe===void 0?void 0:pe.style.maxWidth}setMaxWidth(pe){return this.options.maxWidth=pe,this._update(),this}setDOMContent(pe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=g.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(pe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(pe){return this._container&&this._container.classList.add(pe),this}removeClassName(pe){return this._container&&this._container.classList.remove(pe),this}setOffset(pe){return this.options.offset=pe,this._update(),this}toggleClassName(pe){if(this._container)return this._container.classList.toggle(pe)}setSubpixelPositioning(pe){this.options.subpixelPositioning=pe}setPadding(pe){this.options.padding=pe,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=g.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 pe=this._container.querySelector(xi);pe&&pe.focus()}},l.RasterDEMTileSource=he,l.RasterTileSource=ae,l.ScaleControl=class{constructor(pe){this._onMove=()=>{An(this._map,this._container,this.options)},this.setUnit=y=>{this.options.unit=y,An(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},hn),pe)}getDefaultPosition(){return"bottom-left"}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-scale",pe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=vo,l.Style=Ku,l.TerrainControl=class{constructor(pe){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=pe}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=g.create("button","maplibregl-ctrl-terrain",this._container),g.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(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Si,l.TwoFingersTouchRotateHandler=Tn,l.TwoFingersTouchZoomHandler=Ba,l.TwoFingersTouchZoomRotateHandler=hi,l.VectorTileSource=ee,l.VideoSource=_e,l.addSourceType=(pe,y)=>e._(void 0,void 0,void 0,function*(){if(le(pe))throw new Error(`A source type called "${pe}" already exists.`);((N,ie)=>{ve[N]=ie})(pe,y)}),l.clearPrewarmedResources=function(){let pe=$;pe&&(pe.isPreloaded()&&pe.numActive()===1?(pe.release(P),$=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()"))},l.createTileMesh=Ss,l.getGlobalDispatcher=se,l.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Ye().getRTLTextPluginStatus()},l.getVersion=function(){return uo},l.getWorkerCount=function(){return j.workerCount},l.getWorkerUrl=function(){return e.c.WORKER_URL},l.importScriptInWorkers=function(pe){return se().broadcast("IS",pe)},l.isTimeFrozen=function(){return c.isFrozen()},l.now=m,l.prewarm=function(){re().acquire(P)},l.restoreNow=function(){c.restoreNow()},l.setMaxParallelImageRequests=function(pe){e.c.MAX_PARALLEL_IMAGE_REQUESTS=pe},l.setNow=function(pe){c.setNow(pe)},l.setRTLTextPlugin=function(pe,y){return Ye().setRTLTextPlugin(pe,y)},l.setWorkerCount=function(pe){j.workerCount=pe},l.setWorkerUrl=function(pe){e.c.WORKER_URL=pe}});var k=p;return k})}}),rV=ze({"src/plots/map/layers.js"(J,V){"use strict";var p=Nr(),b=Cs().sanitizeHTML,E=kM(),k=Av();function l(a,o){this.subplot=a,this.uid=a.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=k.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=t(o)},e.needsNewImage=function(a){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&a.sourcetype==="image"&&(this.source!==a.source||JSON.stringify(this.coordinates)!==JSON.stringify(a.coordinates))},e.needsNewSource=function(a){return this.sourceType!==a.sourcetype||JSON.stringify(this.source)!==JSON.stringify(a.source)||this.layerType!==a.type},e.needsNewLayer=function(a){return this.layerType!==a.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(a){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:a.source,coordinates:a.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(a){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=a.sourcetype,this.source=a.source,!!t(a)){var s=r(a);o.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(a){if(a==="traces")for(var o=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function n(a){var o={},s={};switch(a.type){case"circle":p.extendFlat(s,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":p.extendFlat(s,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":p.extendFlat(s,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,m=E(c.textposition,c.iconsize);p.extendFlat(o,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":m.anchor,"text-offset":m.offset,"symbol-placement":c.placement}),p.extendFlat(s,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":p.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:o,paint:s}}function r(a){var o=a.sourcetype,s=a.source,c={type:o},m;return o==="geojson"?m="data":o==="vector"?m=typeof s=="string"?"url":"tiles":o==="raster"?(m="tiles",c.tileSize=256):o==="image"&&(m="url",c.coordinates=a.coordinates),c[m]=s,a.sourceattribution&&(c.attribution=b(a.sourceattribution)),c}V.exports=function(o,s,c){var m=new l(o,s);return m.update(c),m}}}),aV=ze({"src/plots/map/map.js"(J,V){"use strict";var p=tV(),b=Nr(),E=hp(),k=mi(),l=Gi(),e=_h(),t=Zl(),n=Fd(),r=n.drawMode,a=n.selectMode,o=_c().prepSelect,s=_c().clearOutline,c=_c().clearSelectionsCache,m=_c().selectOnClick,h=Av(),v=rV();function g(T,f){this.id=f,this.gd=T;var u=T._fullLayout,A=T._context;this.container=u._glcontainer.node(),this.isStatic=A.staticPlot,this.uid=u._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(u),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var i=g.prototype;i.plot=function(T,f,u){var A=this,x;A.map?x=new Promise(function(z,I){A.updateMap(T,f,z,I)}):x=new Promise(function(z,I){A.createMap(T,f,z,I)}),u.push(x)},i.createMap=function(T,f,u,A){var x=this,z=f[x.id],I=x.styleObj=C(z.style),O=z.bounds,D=O?[[O.west,O.south],[O.east,O.north]]:null;let B={container:x.div,style:I.style,center:_(z.center),zoom:z.zoom,bearing:z.bearing,pitch:z.pitch,maxBounds:D,interactive:!x.isStatic,canvasContextAttributes:{preserveDrawingBuffer:x.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},F=z._fitBounds;F&&(B.bounds=[[F.west,F.south],[F.east,F.north]],B.fitBoundsOptions={padding:h.fitBoundsPadding});let P=x.map=new p.Map(B).addControl(new p.AttributionControl({compact:!0}));var j={};P.on("styleimagemissing",function($){var Q=$.id;if(!j[Q]&&/^[a-zA-Z0-9-]+$/.test(Q)){j[Q]=!0;var re=new Image(15,15);re.onload=function(){P.addImage(Q,re,{sdf:!0})},re.crossOrigin="Anonymous",re.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Q+".svg"}}),P.setTransformRequest(function($){return $=$.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:$}}),P._canvas.style.left="0px",P._canvas.style.top="0px",x.rejectOnError(A),x.isStatic||x.initFx(T,f);var U=[];U.push(new Promise(function($){P.once("load",$)})),U=U.concat(E.fetchTraceGeoData(T)),Promise.all(U).then(function(){F&&w(x,z),S(x,z),x.fillBelowLookup(T,f),x.updateData(T),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)},i.updateMap=function(T,f,u,A){var x=this,z=x.map,I=f[this.id];x.rejectOnError(A);var O=[],D=C(I.style);JSON.stringify(x.styleObj)!==JSON.stringify(D)&&(x.styleObj=D,z.setStyle(D.style),x.traceHash={},O.push(new Promise(function(B){z.once("styledata",B)}))),O=O.concat(E.fetchTraceGeoData(T)),Promise.all(O).then(function(){x.fillBelowLookup(T,f),x.updateData(T);let B=I._fitBounds;B&&(z.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:h.fitBoundsPadding,animate:!1}),w(x,I),S(x,I)),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)};function w(T,f){let{center:u,zoom:A}=T.getView();f._input.center=f.center=u,f._input.zoom=f.zoom=A,f._input._fitView={center:Li({},u),zoom:A}}function S(T,f){let u=T.getView();T.viewInitial={center:b.extendFlat({},u.center),bearing:f.bearing,pitch:f.pitch,zoom:u.zoom}}i.fillBelowLookup=function(T,f){var u=f[this.id],A=u.layers,x,z,I=this.belowLookup={},O=!1;for(x=0;x1)for(x=0;x<$.length;x++)j=$[x],j.indexOf("trace-")===0?(U=j.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):j.indexOf("layout-")===0&&(U=j.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var M={choroplethmap:0,densitymap:1,scattermap:2};i.updateData=function(T){var f=this.traceHash,u,A,x,z,I=T.slice().sort(function(P,j){return M[P[0].trace.type]-M[j[0].trace.type]});for(x=0;xf.project(A).x,_subplot:f},f.yaxis={_id:"y",c2p:A=>f.project(A).y,_subplot:f},f.updateFramework(T),f.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(f.mockAxis,T)},i.initFx=function(T,f){var u=this,A=u.gd,x=u.map;x.on("moveend",function(O){if(u.map){var D=A._fullLayout;if(O.originalEvent||u.wheeling){var B=D[u.id];k.call("_storeDirectGUIEdit",A.layout,D._preGUI,u.getViewEdits(B));var F=u.getView();B._input.center=B.center=F.center,B._input.zoom=B.zoom=F.zoom,B._input.bearing=B.bearing=F.bearing,B._input.pitch=B.pitch=F.pitch,A.emit("plotly_relayout",u.getViewEditsWithDerived(F))}O.originalEvent&&O.originalEvent.type==="mouseup"?u.dragging=!1:u.wheeling&&(u.wheeling=!1),D&&D._rehover&&D._rehover()}}),x.on("wheel",function(){u.wheeling=!0}),x.on("mousemove",function(O){var D=u.div.getBoundingClientRect(),B=[O.originalEvent.offsetX,O.originalEvent.offsetY];O.target.getBoundingClientRect=function(){return D},u.xaxis.p2c=function(){return x.unproject(B).lng},u.yaxis.p2c=function(){return x.unproject(B).lat},A._fullLayout._rehover=function(){A._fullLayout._hoversubplot===u.id&&A._fullLayout[u.id]&&t.hover(A,O,u.id)},t.hover(A,O,u.id),A._fullLayout._hoversubplot=u.id});function z(){t.loneUnhover(f._hoverlayer)}x.on("dragstart",function(){u.dragging=!0,z()}),x.on("zoomstart",z),x.on("mouseout",function(){A._fullLayout._hoversubplot=null});function I(){var O=u.getView();A.emit("plotly_relayouting",u.getViewEditsWithDerived(O))}x.on("drag",I),x.on("zoom",I),x.on("dblclick",function(){var O=A._fullLayout[u.id];k.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,u.getViewEdits(O));var D=u.viewInitial;x.setCenter(_(D.center)),x.setZoom(D.zoom),x.setBearing(D.bearing),x.setPitch(D.pitch);var B=u.getView();O._input.center=O.center=B.center,O._input.zoom=O.zoom=B.zoom,O._input.bearing=O.bearing=B.bearing,O._input.pitch=O.pitch=B.pitch,A.emit("plotly_doubleclick",null),A.emit("plotly_relayout",u.getViewEditsWithDerived(B))}),u.clearOutline=function(){c(u.dragOptions),s(u.dragOptions.gd)},u.onClickInPanFn=function(O){return function(D){var B=A._fullLayout.clickmode;B.indexOf("select")>-1&&m(D.originalEvent,A,[u.xaxis],[u.yaxis],u.id,O),B.indexOf("event")>-1&&t.click(A,D.originalEvent)}}},i.updateFx=function(T){var f=this,u=f.map,A=f.gd;if(f.isStatic)return;function x(D){var B=f.map.unproject(D);return[B.lng,B.lat]}var z=T.dragmode,I;I=function(D,B){if(B.isRect){var F=D.range={};F[f.id]=[x([B.xmin,B.ymin]),x([B.xmax,B.ymax])]}else{var P=D.lassoPoints={};P[f.id]=B.map(x)}};var O=f.dragOptions;f.dragOptions=b.extendDeep(O||{},{dragmode:T.dragmode,element:f.div,gd:A,plotinfo:{id:f.id,domain:T[f.id].domain,xaxis:f.xaxis,yaxis:f.yaxis,fillRangeItems:I},xaxes:[f.xaxis],yaxes:[f.yaxis],subplot:f.id}),u.off("click",f.onClickInPanHandler),a(z)||r(z)?(u.dragPan.disable(),u.on("zoomstart",f.clearOutline),f.dragOptions.prepFn=function(D,B,F){o(D,B,F,f.dragOptions,z)},e.init(f.dragOptions)):(u.dragPan.enable(),u.off("zoomstart",f.clearOutline),f.div.onmousedown=null,f.div.ontouchstart=null,f.div.removeEventListener("touchstart",f.div._ontouchstart),f.onClickInPanHandler=f.onClickInPanFn(f.dragOptions),u.on("click",f.onClickInPanHandler))},i.updateFramework=function(T){var f=T[this.id].domain,u=T._size,A=this.div.style;A.width=u.w*(f.x[1]-f.x[0])+"px",A.height=u.h*(f.y[1]-f.y[0])+"px",A.left=u.l+f.x[0]*u.w+"px",A.top=u.t+(1-f.y[1])*u.h+"px",this.xaxis._offset=u.l+f.x[0]*u.w,this.xaxis._length=u.w*(f.x[1]-f.x[0]),this.yaxis._offset=u.t+(1-f.y[1])*u.h,this.yaxis._length=u.h*(f.y[1]-f.y[0])},i.updateLayers=function(T){var f=T[this.id],u=f.layers,A=this.layerList,x;if(u.length!==A.length){for(x=0;xnV});function nV(J,V){let p=[];for(let t of J){if(t.subplot!==V||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:n,lon:r}=t;if(!r||!n)continue;let a=Math.min(r.length,n.length);for(let o=0;of/2){var u=M.split("|").join("
");_.text(u).attr("data-unformatted",u).call(t.convertToTspans,a),T=e.bBox(_.node())}_.attr("transform",p(-3,-T.height+8)),C.insert("rect",".static-attribution").attr({x:-T.width-6,y:-T.height-3,width:T.width+6,height:T.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;T.width+6>f&&(A=f/(T.width+6));var x=[c.l+c.w*v.x[1],c.t+c.h*(1-v.y[0])];C.attr("transform",p(x[0],x[1])+b(A))}},J.updateFx=function(a){for(var o=a._fullLayout,s=o._subplots[r],c=0;c=0;n--)e.removeLayer(t[n][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,n){var r=n[0].trace,a=new k(t,r.uid),o=a.sourceId,s=p(n),c=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,c),n[0].trace._glTrace=a,a}}}),fV=ze({"src/traces/choroplethmap/index.js"(J,V){"use strict";V.exports={attributes:PM(),supplyDefaults:uV(),colorbar:ag(),calc:IA(),plot:cV(),hoverPoints:DA(),eventData:FA(),selectPoints:zA(),styleOnSelect:function(p,b){if(b){var E=b[0].trace;E._glTrace.updateOnSelect(b)}},getBelow:function(p,b){for(var E=b.getMapLayers(),k=E.length-2;k>=0;k--){var l=E[k].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=k+1;e0?+v[m]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:M})}}var _=k.extractOpts(r),T=_.reversescale?k.flipScale(_.colorscale):_.colorscale,f=T[0][1],u=E.opacity(f)<1?f:E.addOpacity(f,0),A=["interpolate",["linear"],["heatmap-density"],0,u];for(m=1;m=0;t--)l.removeLayer(e[t][1])},k.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},V.exports=function(e,t){var n=t[0].trace,r=new E(e,n.uid),a=r.sourceId,o=p(t),s=r.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(a,{type:"geojson",data:o.geojson}),r._addLayers(o,s),r}}}),gV=ze({"src/traces/densitymap/hover.js"(J,V){"use strict";var p=Gi(),b=V2().hoverPoints,E=V2().getExtraText;V.exports=function(l,e,t){var n=b(l,e,t);if(n){var r=n[0],a=r.cd,o=a[0].trace,s=a[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=p.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=E(o,s,a[0].t.labels),[r]}}}}),yV=ze({"src/traces/densitymap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b.z=E.z,b}}}),_V=ze({"src/traces/densitymap/index.js"(J,V){"use strict";V.exports={attributes:IM(),supplyDefaults:dV(),colorbar:ag(),formatLabels:EM(),calc:pV(),plot:mV(),hoverPoints:gV(),eventData:yV(),getBelow:function(p,b){for(var E=b.getMapLayers(),k=0;kw[z%w.length];i("color",g.label.map((z,I)=>E.addOpacity(S(I),.8))),i("customdata");var M=a.link||{},C=e.newContainer(o,"link");function _(z,I){return p.coerce(M,C,b.link,z,I)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",a.hoverinfo),l(M,C,_,h),_("hovertemplate"),_("sort");var T=E.luminosity(c.paper_bgcolor)<.333,f=T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",u=_("color",f);function A(z){if(!E.isValid(z))return z;let I=E.opacity(z);return I<=.8?E.addOpacity(z,I+.2):T?E.brighten(z,10):E.adjustLightness(z,-10)}_("hovercolor",Array.isArray(u)?u.map(A):A(u)),_("customdata"),t(M,C,{name:"colorscales",handleItemDefaults:n}),k(o,c,m),m("orientation"),m("direction"),m("valueformat"),m("valuesuffix");let x=g.x.length&&g.y.length?"freeform":void 0;m("arrangement",x),p.coerceFont(m,"textfont",c.font,{autoShadowDflt:!0}),o._length=null};function n(r,a){function o(s,c){return p.coerce(r,a,b.link.colorscales,s,c)}o("label"),o("cmin"),o("cmax"),o("colorscale")}}}),FM=ze({"node_modules/strongly-connected-components/scc.js"(J,V){"use strict";V.exports=p;function p(b){for(var E=b.length,k=new Array(E),l=new Array(E),e=new Array(E),t=new Array(E),n=new Array(E),r=new Array(E),a=0;a0;){i=S[S.length-1];var M=b[i];if(t[i]=0&&r[i].push(n[_])}t[i]=C}else{if(l[i]===k[i]){for(var T=[],f=[],u=0,C=w.length-1;C>=0;--C){var A=w[C];if(e[A]=!1,T.push(A),f.push(r[A]),u+=r[A].length,n[A]=s.length,A===i){w.length=C;break}}s.push(T);for(var x=new Array(u),C=0;C_&&(_=o.source[w]),o.target[w]>_&&(_=o.target[w]);var T=_+1;r.node._count=T;var f,u=r.node.groups,A={};for(w=0;w0&&l(B,T)&&l(F,T)&&!(A.hasOwnProperty(B)&&A.hasOwnProperty(F)&&A[B]===A[F])){A.hasOwnProperty(F)&&(F=A[F]),A.hasOwnProperty(B)&&(B=A[B]),B=+B,F=+F,v[B]=v[F]=!0;var P="";o.label&&o.label[w]&&(P=o.label[w]);var j=null;P&&g.hasOwnProperty(P)&&(j=g[P]),s.push({pointNumber:w,label:P,color:c?o.color[w]:o.color,hovercolor:m?o.hovercolor[w]:o.hovercolor,customdata:h?o.customdata[w]:o.customdata,concentrationscale:j,source:B,target:F,value:+D}),O.source.push(B),O.target.push(F)}}var U=T+u.length,$=k(a.color),Q=k(a.customdata),re=[];for(w=0;wT-1,childrenNodes:[],pointNumber:w,label:ne,color:$?a.color[w]:a.color,customdata:Q?a.customdata[w]:a.customdata})}var se=!1;return n(U,O.source,O.target)&&(se=!0),{circular:se,links:s,nodes:re,groups:u,groupLookup:A}}function n(r,a,o){for(var s=b.init2dArray(r,0),c=0;c1})}V.exports=function(a,o){var s=t(o);return E({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),TV=ze({"node_modules/d3-quadtree/dist/d3-quadtree.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){var f=+this._x.call(null,T),u=+this._y.call(null,T);return E(this.cover(f,u),f,u,T)}function E(T,f,u,A){if(isNaN(f)||isNaN(u))return T;var x,z=T._root,I={data:A},O=T._x0,D=T._y0,B=T._x1,F=T._y1,P,j,U,$,Q,re,ne,se;if(!z)return T._root=I,T;for(;z.length;)if((Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j,x=z,!(z=z[ne=re<<1|Q]))return x[ne]=I,T;if(U=+T._x.call(null,z.data),$=+T._y.call(null,z.data),f===U&&u===$)return I.next=z,x?x[ne]=I:T._root=I,T;do x=x?x[ne]=new Array(4):T._root=new Array(4),(Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j;while((ne=re<<1|Q)===(se=($>=j)<<1|U>=P));return x[se]=z,x[ne]=I,T}function k(T){var f,u,A=T.length,x,z,I=new Array(A),O=new Array(A),D=1/0,B=1/0,F=-1/0,P=-1/0;for(u=0;uF&&(F=x),zP&&(P=z));if(D>F||B>P)return this;for(this.cover(D,B).cover(F,P),u=0;uT||T>=x||A>f||f>=z;)switch(B=(fF||(O=$.y0)>P||(D=$.x1)=ne)<<1|T>=re)&&($=j[j.length-1],j[j.length-1]=j[j.length-1-Q],j[j.length-1-Q]=$)}else{var se=T-+this._x.call(null,U.data),G=f-+this._y.call(null,U.data),X=se*se+G*G;if(X=(j=(I+D)/2))?I=j:D=j,(Q=P>=(U=(O+B)/2))?O=U:B=U,f=u,!(u=u[re=Q<<1|$]))return this;if(!u.length)break;(f[re+1&3]||f[re+2&3]||f[re+3&3])&&(A=f,ne=re)}for(;u.data!==T;)if(x=u,!(u=u.next))return this;return(z=u.next)&&delete u.next,x?(z?x.next=z:delete x.next,this):f?(z?f[re]=z:delete f[re],(u=f[0]||f[1]||f[2]||f[3])&&u===(f[3]||f[2]||f[1]||f[0])&&!u.length&&(A?A[ne]=u:this._root=u),this):(this._root=z,this)}function o(T){for(var f=0,u=T.length;f=v.length)return i!=null&&_.sort(i),w!=null?w(_):_;for(var A=-1,x=_.length,z=v[T++],I,O,D=k(),B,F=f();++Av.length)return _;var f,u=g[T-1];return w!=null&&T>=v.length?f=_.entries():(f=[],_.each(function(A,x){f.push({key:x,values:C(A,T)})})),u!=null?f.sort(function(A,x){return u(A.key,x.key)}):f}return S={object:function(_){return M(_,0,e,t)},map:function(_){return M(_,0,n,r)},entries:function(_){return C(M(_,0,n,r),0)},key:function(_){return v.push(_),S},sortKeys:function(_){return g[v.length-1]=_,S},sortValues:function(_){return i=_,S},rollup:function(_){return w=_,S}}}function e(){return{}}function t(v,g,i){v[g]=i}function n(){return k()}function r(v,g,i){v.set(g,i)}function a(){}var o=k.prototype;a.prototype=s.prototype={constructor:a,has:o.has,add:function(v){return v+="",this[b+v]=v,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function s(v,g){var i=new a;if(v instanceof a)v.each(function(M){i.add(M)});else if(v){var w=-1,S=v.length;if(g==null)for(;++w=0&&(o=a.slice(s+1),a=a.slice(0,s)),a&&!r.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:o}})}k.prototype=E.prototype={constructor:k,on:function(n,r){var a=this._,o=l(n+"",a),s,c=-1,m=o.length;if(arguments.length<2){for(;++c0)for(var a=new Array(s),o=0,s,c;o=0&&T._call.call(null,f),T=T._next;--b}function i(){r=(n=o.now())+a,b=E=0;try{g()}finally{b=0,S(),r=0}}function w(){var T=o.now(),f=T-n;f>l&&(a-=f,n=T)}function S(){for(var T,f=e,u,A=1/0;f;)f._call?(A>f._time&&(A=f._time),T=f,f=f._next):(u=f._next,f._next=null,f=T?T._next=u:e=u);t=T,M(A)}function M(T){if(!b){E&&(E=clearTimeout(E));var f=T-r;f>24?(T<1/0&&(E=setTimeout(i,T-o.now()-a)),k&&(k=clearInterval(k))):(k||(n=o.now(),k=setInterval(w,l)),b=1,s(i))}}function C(T,f,u){var A=new h;return f=f==null?0:+f,A.restart(function(x){A.stop(),T(x+f)},f,u),A}function _(T,f,u){var A=new h,x=f;return f==null?(A.restart(T,f,u),A):(f=+f,u=u==null?c():+u,A.restart(function z(I){I+=x,A.restart(z,x+=f,u),T(I)},f,u),A)}p.interval=_,p.now=c,p.timeout=C,p.timer=v,p.timerFlush=g,Object.defineProperty(p,"__esModule",{value:!0})})}}),SV=ze({"node_modules/d3-force/dist/d3-force.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,TV(),zM(),AV(),MV()):b(p.d3=p.d3||{},p.d3,p.d3,p.d3,p.d3)})(J,function(p,b,E,k,l){"use strict";function e(T,f){var u;T==null&&(T=0),f==null&&(f=0);function A(){var x,z=u.length,I,O=0,D=0;for(x=0;xP.index){var ee=j-Y.x-Y.vx,ae=U-Y.y-Y.vy,he=ee*ee+ae*ae;hej+Z||KU+Z||HD.r&&(D.r=D[B].r)}function O(){if(f){var D,B=f.length,F;for(u=new Array(B),D=0;D1?(Q==null?O.remove($):O.set($,U(Q)),f):O.get($)},find:function($,Q,re){var ne=0,se=T.length,G,X,K,H,Y;for(re==null?re=1/0:re*=re,ne=0;ne1?(B.on($,Q),f):B.on($)}}}function S(){var T,f,u,A=t(-30),x,z=1,I=1/0,O=.81;function D(j){var U,$=T.length,Q=b.quadtree(T,h,v).visitAfter(F);for(u=j,U=0;U<$;++U)f=T[U],Q.visit(P)}function B(){if(T){var j,U=T.length,$;for(x=new Array(U),j=0;j=I)return;(j.data!==f||j.next)&&(re===0&&(re=n(),G+=re*re),ne===0&&(ne=n(),G+=ne*ne),GRt?1:Yt>=Rt?0:NaN}function E(Yt){let Rt=Yt,nr=Yt;Yt.length===1&&(Rt=(Qr,Zr)=>Yt(Qr)-Zr,nr=k(Yt));function ur(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)<0?ha=La+1:Pa=La}return ha}function cr(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)>0?Pa=La:ha=La+1}return ha}function Rr(Qr,Zr,ha,Pa){ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);let La=ur(Qr,Zr,ha,Pa-1);return La>ha&&Rt(Qr[La-1],Zr)>-Rt(Qr[La],Zr)?La-1:La}return{left:ur,center:Rr,right:cr}}function k(Yt){return(Rt,nr)=>b(Yt(Rt),nr)}function l(Yt){return Yt===null?NaN:+Yt}function*e(Yt,Rt){if(Rt===void 0)for(let nr of Yt)nr!=null&&(nr=+nr)>=nr&&(yield nr);else{let nr=-1;for(let ur of Yt)(ur=Rt(ur,++nr,Yt))!=null&&(ur=+ur)>=ur&&(yield ur)}}let t=E(b),n=t.right,r=t.left,a=E(l).center;function o(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)ur!=null&&(ur=+ur)>=ur&&++nr;else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(cr=+cr)>=cr&&++nr}return nr}function s(Yt){return Yt.length|0}function c(Yt){return!(Yt>0)}function m(Yt){return typeof Yt!="object"||"length"in Yt?Yt:Array.from(Yt)}function h(Yt){return Rt=>Yt(...Rt)}function v(...Yt){let Rt=typeof Yt[Yt.length-1]=="function"&&h(Yt.pop());Yt=Yt.map(m);let nr=Yt.map(s),ur=Yt.length-1,cr=new Array(ur+1).fill(0),Rr=[];if(ur<0||nr.some(c))return Rr;for(;;){Rr.push(cr.map((Zr,ha)=>Yt[ha][Zr]));let Qr=ur;for(;++cr[Qr]===nr[Qr];){if(Qr===0)return Rt?Rr.map(Rt):Rr;cr[Qr--]=0}}}function g(Yt,Rt){var nr=0,ur=0;return Float64Array.from(Yt,Rt===void 0?cr=>nr+=+cr||0:cr=>nr+=+Rt(cr,ur++,Yt)||0)}function i(Yt,Rt){return RtYt?1:Rt>=Yt?0:NaN}function w(Yt,Rt){let nr=0,ur,cr=0,Rr=0;if(Rt===void 0)for(let Qr of Yt)Qr!=null&&(Qr=+Qr)>=Qr&&(ur=Qr-cr,cr+=ur/++nr,Rr+=ur*(Qr-cr));else{let Qr=-1;for(let Zr of Yt)(Zr=Rt(Zr,++Qr,Yt))!=null&&(Zr=+Zr)>=Zr&&(ur=Zr-cr,cr+=ur/++nr,Rr+=ur*(Zr-cr))}if(nr>1)return Rr/(nr-1)}function S(Yt,Rt){let nr=w(Yt,Rt);return nr&&Math.sqrt(nr)}function M(Yt,Rt){let nr,ur;if(Rt===void 0)for(let cr of Yt)cr!=null&&(nr===void 0?cr>=cr&&(nr=ur=cr):(nr>cr&&(nr=cr),ur=Rr&&(nr=ur=Rr):(nr>Rr&&(nr=Rr),ur0){for(Qr=Rt[--nr];nr>0&&(ur=Qr,cr=Rt[--nr],Qr=ur+cr,Rr=cr-(Qr-ur),!Rr););nr>0&&(Rr<0&&Rt[nr-1]<0||Rr>0&&Rt[nr-1]>0)&&(cr=Rr*2,ur=Qr+cr,cr==ur-Qr&&(Qr=ur))}return Qr}}function _(Yt,Rt){let nr=new C;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&nr.add(ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&nr.add(cr)}return+nr}function T(Yt,Rt){let nr=new C,ur=-1;return Float64Array.from(Yt,Rt===void 0?cr=>nr.add(+cr||0):cr=>nr.add(+Rt(cr,++ur,Yt)||0))}class f extends Map{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let[ur,cr]of Rt)this.set(ur,cr)}get(Rt){return super.get(A(this,Rt))}has(Rt){return super.has(A(this,Rt))}set(Rt,nr){return super.set(x(this,Rt),nr)}delete(Rt){return super.delete(z(this,Rt))}}class u extends Set{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let ur of Rt)this.add(ur)}has(Rt){return super.has(A(this,Rt))}add(Rt){return super.add(x(this,Rt))}delete(Rt){return super.delete(z(this,Rt))}}function A({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):nr}function x({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):(Yt.set(ur,nr),nr)}function z({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)&&(nr=Yt.get(nr),Yt.delete(ur)),nr}function I(Yt){return Yt!==null&&typeof Yt=="object"?Yt.valueOf():Yt}function O(Yt){return Yt}function D(Yt,...Rt){return Q(Yt,O,O,Rt)}function B(Yt,...Rt){return Q(Yt,Array.from,O,Rt)}function F(Yt,Rt,...nr){return Q(Yt,O,Rt,nr)}function P(Yt,Rt,...nr){return Q(Yt,Array.from,Rt,nr)}function j(Yt,...Rt){return Q(Yt,O,$,Rt)}function U(Yt,...Rt){return Q(Yt,Array.from,$,Rt)}function $(Yt){if(Yt.length!==1)throw new Error("duplicate key");return Yt[0]}function Q(Yt,Rt,nr,ur){return function cr(Rr,Qr){if(Qr>=ur.length)return nr(Rr);let Zr=new f,ha=ur[Qr++],Pa=-1;for(let La of Rr){let un=ha(La,++Pa,Rr),Xa=Zr.get(un);Xa?Xa.push(La):Zr.set(un,[La])}for(let[La,un]of Zr)Zr.set(La,cr(un,Qr));return Rt(Zr)}(Yt,0)}function re(Yt,Rt){return Array.from(Rt,nr=>Yt[nr])}function ne(Yt,...Rt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Yt=Array.from(Yt);let[nr=b]=Rt;if(nr.length===1||Rt.length>1){let ur=Uint32Array.from(Yt,(cr,Rr)=>Rr);return Rt.length>1?(Rt=Rt.map(cr=>Yt.map(cr)),ur.sort((cr,Rr)=>{for(let Qr of Rt){let Zr=b(Qr[cr],Qr[Rr]);if(Zr)return Zr}})):(nr=Yt.map(nr),ur.sort((cr,Rr)=>b(nr[cr],nr[Rr]))),re(Yt,ur)}return Yt.sort(nr)}function se(Yt,Rt,nr){return(Rt.length===1?ne(F(Yt,Rt,nr),([ur,cr],[Rr,Qr])=>b(cr,Qr)||b(ur,Rr)):ne(D(Yt,nr),([ur,cr],[Rr,Qr])=>Rt(cr,Qr)||b(ur,Rr))).map(([ur])=>ur)}var G=Array.prototype,X=G.slice;function K(Yt){return function(){return Yt}}var H=Math.sqrt(50),Y=Math.sqrt(10),q=Math.sqrt(2);function Z(Yt,Rt,nr){var ur,cr=-1,Rr,Qr,Zr;if(Rt=+Rt,Yt=+Yt,nr=+nr,Yt===Rt&&nr>0)return[Yt];if((ur=Rt0){let ha=Math.round(Yt/Zr),Pa=Math.round(Rt/Zr);for(ha*ZrRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++crRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++cr=0?(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)*Math.pow(10,cr):-Math.pow(10,-cr)/(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)}function ae(Yt,Rt,nr){var ur=Math.abs(Rt-Yt)/Math.max(0,nr),cr=Math.pow(10,Math.floor(Math.log(ur)/Math.LN10)),Rr=ur/cr;return Rr>=H?cr*=10:Rr>=Y?cr*=5:Rr>=q&&(cr*=2),Rt0?(Yt=Math.floor(Yt/cr)*cr,Rt=Math.ceil(Rt/cr)*cr):cr<0&&(Yt=Math.ceil(Yt*cr)/cr,Rt=Math.floor(Rt*cr)/cr),ur=cr}}function xe(Yt){return Math.ceil(Math.log(o(Yt))/Math.LN2)+1}function we(){var Yt=O,Rt=M,nr=xe;function ur(cr){Array.isArray(cr)||(cr=Array.from(cr));var Rr,Qr=cr.length,Zr,ha=new Array(Qr);for(Rr=0;Rr=un)if(Un>=un&&Rt===M){let Yn=ee(La,un,li);isFinite(Yn)&&(Yn>0?un=(Math.floor(un/Yn)+1)*Yn:Yn<0&&(un=(Math.ceil(un*-Yn)+1)/-Yn))}else Xa.pop()}for(var ja=Xa.length;Xa[0]<=La;)Xa.shift(),--ja;for(;Xa[ja-1]>un;)Xa.pop(),--ja;var Nn=new Array(ja+1),yn;for(Rr=0;Rr<=ja;++Rr)yn=Nn[Rr]=[],yn.x0=Rr>0?Xa[Rr-1]:La,yn.x1=Rr=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr=cr)&&(nr=cr)}return nr}function Se(Yt,Rt){let nr;if(Rt===void 0)for(let ur of Yt)ur!=null&&(nr>ur||nr===void 0&&ur>=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr>cr||nr===void 0&&cr>=cr)&&(nr=cr)}return nr}function Ie(Yt,Rt,nr=0,ur=Yt.length-1,cr=b){for(;ur>nr;){if(ur-nr>600){let ha=ur-nr+1,Pa=Rt-nr+1,La=Math.log(ha),un=.5*Math.exp(2*La/3),Xa=.5*Math.sqrt(La*un*(ha-un)/ha)*(Pa-ha/2<0?-1:1),ja=Math.max(nr,Math.floor(Rt-Pa*un/ha+Xa)),Nn=Math.min(ur,Math.floor(Rt+(ha-Pa)*un/ha+Xa));Ie(Yt,Rt,ja,Nn,cr)}let Rr=Yt[Rt],Qr=nr,Zr=ur;for(Ve(Yt,nr,Rt),cr(Yt[ur],Rr)>0&&Ve(Yt,nr,ur);Qr0;)--Zr}cr(Yt[nr],Rr)===0?Ve(Yt,nr,Zr):(++Zr,Ve(Yt,Zr,ur)),Zr<=Rt&&(nr=Zr+1),Rt<=Zr&&(ur=Zr-1)}return Yt}function Ve(Yt,Rt,nr){let ur=Yt[Rt];Yt[Rt]=Yt[nr],Yt[nr]=ur}function Ge(Yt,Rt,nr){if(Yt=Float64Array.from(e(Yt,nr)),!!(ur=Yt.length)){if((Rt=+Rt)<=0||ur<2)return Se(Yt);if(Rt>=1)return Me(Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=Me(Ie(Yt,Rr).subarray(0,Rr+1)),Zr=Se(Yt.subarray(Rr+1));return Qr+(Zr-Qr)*(cr-Rr)}}function ke(Yt,Rt,nr=l){if(ur=Yt.length){if((Rt=+Rt)<=0||ur<2)return+nr(Yt[0],0,Yt);if(Rt>=1)return+nr(Yt[ur-1],ur-1,Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=+nr(Yt[Rr],Rr,Yt),Zr=+nr(Yt[Rr+1],Rr+1,Yt);return Qr+(Zr-Qr)*(cr-Rr)}}function _e(Yt,Rt,nr){return Math.ceil((nr-Rt)/(2*(Ge(Yt,.75)-Ge(Yt,.25))*Math.pow(o(Yt),-1/3)))}function ce(Yt,Rt,nr){return Math.ceil((nr-Rt)/(3.5*S(Yt)*Math.pow(o(Yt),-1/3)))}function ve(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr=Rr)&&(nr=Rr,ur=cr);return ur}function le(Yt,Rt){let nr=0,ur=0;if(Rt===void 0)for(let cr of Yt)cr!=null&&(cr=+cr)>=cr&&(++nr,ur+=cr);else{let cr=-1;for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(Rr=+Rr)>=Rr&&(++nr,ur+=Rr)}if(nr)return ur/nr}function Ae(Yt,Rt){return Ge(Yt,.5,Rt)}function*Be(Yt){for(let Rt of Yt)yield*ad(Rt)}function Xe(Yt){return Array.from(Be(Yt))}function Ye(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);return ur}function yt(Yt,Rt=gt){let nr=[],ur,cr=!1;for(let Rr of Yt)cr&&nr.push(Rt(ur,Rr)),ur=Rr,cr=!0;return nr}function gt(Yt,Rt){return[Yt,Rt]}function Tt(Yt,Rt,nr){Yt=+Yt,Rt=+Rt,nr=(cr=arguments.length)<2?(Rt=Yt,Yt=0,1):cr<3?1:+nr;for(var ur=-1,cr=Math.max(0,Math.ceil((Rt-Yt)/nr))|0,Rr=new Array(cr);++ur0:b(Qr,Qr)===0)&&(nr=Rr,cr=Qr,ur=!0)}}else for(let cr of Yt)(ur?Rt(cr,nr)>0:Rt(cr,cr)===0)&&(nr=cr,ur=!0);return nr}function _r(Yt,Rt=b){if(Rt.length===1)return ve(Yt,Rt);let nr,ur=-1,cr=-1;for(let Rr of Yt)++cr,(ur<0?Rt(Rr,Rr)===0:Rt(Rr,nr)>0)&&(nr=Rr,ur=cr);return ur}function Xt(Yt,Rt){let nr=$t(Yt,Rt);return nr<0?void 0:nr}var or=Ot(Math.random);function Ot(Yt){return function(nr,ur=0,cr=nr.length){let Rr=cr-(ur=+ur);for(;Rr;){let Qr=Yt()*Rr--|0,Zr=nr[Rr+ur];nr[Rr+ur]=nr[Qr+ur],nr[Qr+ur]=Zr}return nr}}function vt(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&(nr+=ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&(nr+=cr)}return nr}function ht(Yt){if(!(Rr=Yt.length))return[];for(var Rt=-1,nr=Se(Yt,De),ur=new Array(nr);++RtRt(nr,ur,Yt))}function Mt(Yt,Rt,nr){if(typeof Rt!="function")throw new TypeError("reducer is not a function");let ur=Yt[Symbol.iterator](),cr,Rr,Qr=-1;if(arguments.length<3){if({done:cr,value:nr}=ur.next(),cr)return;++Qr}for(;{done:cr,value:Rr}=ur.next(),!cr;)nr=Rt(nr,Rr,++Qr,Yt);return nr}function pt(Yt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Yt).reverse()}function Pt(Yt,...Rt){Yt=new Set(Yt);for(let nr of Rt)for(let ur of nr)Yt.delete(ur);return Yt}function Ct(Yt,Rt){let nr=Rt[Symbol.iterator](),ur=new Set;for(let cr of Yt){if(ur.has(cr))return!1;let Rr,Qr;for(;({value:Rr,done:Qr}=nr.next())&&!Qr;){if(Object.is(cr,Rr))return!1;ur.add(Rr)}}return!0}function qt(Yt){return Yt instanceof Set?Yt:new Set(Yt)}function Vt(Yt,...Rt){Yt=new Set(Yt),Rt=Rt.map(qt);e:for(let nr of Yt)for(let ur of Rt)if(!ur.has(nr)){Yt.delete(nr);continue e}return Yt}function Ht(Yt,Rt){let nr=Yt[Symbol.iterator](),ur=new Set;for(let cr of Rt){if(ur.has(cr))continue;let Rr,Qr;for(;{value:Rr,done:Qr}=nr.next();){if(Qr)return!1;if(ur.add(Rr),Object.is(cr,Rr))break}}return!0}function Sr(Yt,Rt){return Ht(Rt,Yt)}function Kr(...Yt){let Rt=new Set;for(let nr of Yt)for(let ur of nr)Rt.add(ur);return Rt}p.Adder=C,p.InternMap=f,p.InternSet=u,p.ascending=b,p.bin=we,p.bisect=n,p.bisectCenter=a,p.bisectLeft=r,p.bisectRight=n,p.bisector=E,p.count=o,p.cross=v,p.cumsum=g,p.descending=i,p.deviation=S,p.difference=Pt,p.disjoint=Ct,p.every=We,p.extent=M,p.fcumsum=T,p.filter=Je,p.fsum=_,p.greatest=rr,p.greatestIndex=_r,p.group=D,p.groupSort=se,p.groups=B,p.histogram=we,p.index=j,p.indexes=U,p.intersection=Vt,p.least=At,p.leastIndex=$t,p.map=et,p.max=Me,p.maxIndex=ve,p.mean=le,p.median=Ae,p.merge=Xe,p.min=Se,p.minIndex=Ye,p.nice=he,p.pairs=yt,p.permute=re,p.quantile=Ge,p.quantileSorted=ke,p.quickselect=Ie,p.range=Tt,p.reduce=Mt,p.reverse=pt,p.rollup=F,p.rollups=P,p.scan=Xt,p.shuffle=or,p.shuffler=Ot,p.some=Ke,p.sort=ne,p.subset=Sr,p.sum=vt,p.superset=Ht,p.thresholdFreedmanDiaconis=_e,p.thresholdScott=ce,p.thresholdSturges=xe,p.tickIncrement=ee,p.tickStep=ae,p.ticks=Z,p.transpose=ht,p.union=Kr,p.variance=w,p.zip=Ne,Object.defineProperty(p,"__esModule",{value:!0})})}}),kV=ze({"node_modules/d3-path/dist/d3-path.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";var b=Math.PI,E=2*b,k=1e-6,l=E-k;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t(){return new e}e.prototype=t.prototype={constructor:e,moveTo:function(n,r){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(n,r){this._+="L"+(this._x1=+n)+","+(this._y1=+r)},quadraticCurveTo:function(n,r,a,o){this._+="Q"+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+o)},bezierCurveTo:function(n,r,a,o,s,c){this._+="C"+ +n+","+ +r+","+ +a+","+ +o+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(n,r,a,o,s){n=+n,r=+r,a=+a,o=+o,s=+s;var c=this._x1,m=this._y1,h=a-n,v=o-r,g=c-n,i=m-r,w=g*g+i*i;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=n)+","+(this._y1=r);else if(w>k)if(!(Math.abs(i*h-v*g)>k)||!s)this._+="L"+(this._x1=n)+","+(this._y1=r);else{var S=a-c,M=o-m,C=h*h+v*v,_=S*S+M*M,T=Math.sqrt(C),f=Math.sqrt(w),u=s*Math.tan((b-Math.acos((C+w-_)/(2*T*f)))/2),A=u/f,x=u/T;Math.abs(A-1)>k&&(this._+="L"+(n+A*g)+","+(r+A*i)),this._+="A"+s+","+s+",0,0,"+ +(i*S>g*M)+","+(this._x1=n+x*h)+","+(this._y1=r+x*v)}},arc:function(n,r,a,o,s,c){n=+n,r=+r,a=+a,c=!!c;var m=a*Math.cos(o),h=a*Math.sin(o),v=n+m,g=r+h,i=1^c,w=c?o-s:s-o;if(a<0)throw new Error("negative radius: "+a);this._x1===null?this._+="M"+v+","+g:(Math.abs(this._x1-v)>k||Math.abs(this._y1-g)>k)&&(this._+="L"+v+","+g),a&&(w<0&&(w=w%E+E),w>l?this._+="A"+a+","+a+",0,1,"+i+","+(n-m)+","+(r-h)+"A"+a+","+a+",0,1,"+i+","+(this._x1=v)+","+(this._y1=g):w>k&&(this._+="A"+a+","+a+",0,"+ +(w>=b)+","+i+","+(this._x1=n+a*Math.cos(s))+","+(this._y1=r+a*Math.sin(s))))},rect:function(n,r,a,o){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)+"h"+ +a+"v"+ +o+"h"+-a+"Z"},toString:function(){return this._}},p.path=t,Object.defineProperty(p,"__esModule",{value:!0})})}}),BM=ze({"node_modules/d3-shape/dist/d3-shape.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kV()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(ot){return function(){return ot}}var k=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,n=Math.min,r=Math.sin,a=Math.sqrt,o=1e-12,s=Math.PI,c=s/2,m=2*s;function h(ot){return ot>1?0:ot<-1?s:Math.acos(ot)}function v(ot){return ot>=1?c:ot<=-1?-c:Math.asin(ot)}function g(ot){return ot.innerRadius}function i(ot){return ot.outerRadius}function w(ot){return ot.startAngle}function S(ot){return ot.endAngle}function M(ot){return ot&&ot.padAngle}function C(ot,kt,jt,ar,Er,xr,zr,Lr){var aa=jt-ot,Sa=ar-kt,wa=zr-Er,pn=Lr-xr,tn=pn*aa-wa*Sa;if(!(tn*tnHi*Hi+Mi*Mi&&(gi=io,qi=oo),{cx:gi,cy:qi,x01:-wa,y01:-pn,x11:gi*(Er/jn-1),y11:qi*(Er/jn-1)}}function T(){var ot=g,kt=i,jt=E(0),ar=null,Er=w,xr=S,zr=M,Lr=null;function aa(){var Sa,wa,pn=+ot.apply(this,arguments),tn=+kt.apply(this,arguments),ai=Er.apply(this,arguments)-c,rn=xr.apply(this,arguments)-c,Ri=k(rn-ai),Gn=rn>ai;if(Lr||(Lr=Sa=b.path()),tno))Lr.moveTo(0,0);else if(Ri>m-o)Lr.moveTo(tn*e(ai),tn*r(ai)),Lr.arc(0,0,tn,ai,rn,!Gn),pn>o&&(Lr.moveTo(pn*e(rn),pn*r(rn)),Lr.arc(0,0,pn,rn,ai,Gn));else{var no=ai,Di=rn,fn=ai,Ai=rn,jn=Ri,Xn=Ri,eo=zr.apply(this,arguments)/2,gi=eo>o&&(ar?+ar.apply(this,arguments):a(pn*pn+tn*tn)),qi=n(k(tn-pn)/2,+jt.apply(this,arguments)),io=qi,oo=qi,Vn,qn;if(gi>o){var Hi=v(gi/pn*r(eo)),Mi=v(gi/tn*r(eo));(jn-=Hi*2)>o?(Hi*=Gn?1:-1,fn+=Hi,Ai-=Hi):(jn=0,fn=Ai=(ai+rn)/2),(Xn-=Mi*2)>o?(Mi*=Gn?1:-1,no+=Mi,Di-=Mi):(Xn=0,no=Di=(ai+rn)/2)}var Ro=tn*e(no),go=tn*r(no),Eo=pn*e(Ai),Ao=pn*r(Ai);if(qi>o){var ds=tn*e(Di),jo=tn*r(Di),Wo=pn*e(fn),to=pn*r(fn),wo;if(Rio?oo>o?(Vn=_(Wo,to,Ro,go,tn,oo,Gn),qn=_(ds,jo,Eo,Ao,tn,oo,Gn),Lr.moveTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),ooo)||!(jn>o)?Lr.lineTo(Eo,Ao):io>o?(Vn=_(Eo,Ao,ds,jo,pn,-io,Gn),qn=_(Ro,go,Wo,to,pn,-io,Gn),Lr.lineTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),io=tn;--ai)Lr.point(Di[ai],fn[ai]);Lr.lineEnd(),Lr.areaEnd()}Gn&&(Di[pn]=+ot(Ri,pn,wa),fn[pn]=+jt(Ri,pn,wa),Lr.point(kt?+kt(Ri,pn,wa):Di[pn],ar?+ar(Ri,pn,wa):fn[pn]))}if(no)return Lr=null,no+""||null}function Sa(){return z().defined(Er).curve(zr).context(xr)}return aa.x=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),kt=null,aa):ot},aa.x0=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),aa):ot},aa.x1=function(wa){return arguments.length?(kt=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):kt},aa.y=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),ar=null,aa):jt},aa.y0=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),aa):jt},aa.y1=function(wa){return arguments.length?(ar=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):ar},aa.lineX0=aa.lineY0=function(){return Sa().x(ot).y(jt)},aa.lineY1=function(){return Sa().x(ot).y(ar)},aa.lineX1=function(){return Sa().x(kt).y(jt)},aa.defined=function(wa){return arguments.length?(Er=typeof wa=="function"?wa:E(!!wa),aa):Er},aa.curve=function(wa){return arguments.length?(zr=wa,xr!=null&&(Lr=zr(xr)),aa):zr},aa.context=function(wa){return arguments.length?(wa==null?xr=Lr=null:Lr=zr(xr=wa),aa):xr},aa}function O(ot,kt){return ktot?1:kt>=ot?0:NaN}function D(ot){return ot}function B(){var ot=D,kt=O,jt=null,ar=E(0),Er=E(m),xr=E(0);function zr(Lr){var aa,Sa=Lr.length,wa,pn,tn=0,ai=new Array(Sa),rn=new Array(Sa),Ri=+ar.apply(this,arguments),Gn=Math.min(m,Math.max(-m,Er.apply(this,arguments)-Ri)),no,Di=Math.min(Math.abs(Gn)/Sa,xr.apply(this,arguments)),fn=Di*(Gn<0?-1:1),Ai;for(aa=0;aa0&&(tn+=Ai);for(kt!=null?ai.sort(function(jn,Xn){return kt(rn[jn],rn[Xn])}):jt!=null&&ai.sort(function(jn,Xn){return jt(Lr[jn],Lr[Xn])}),aa=0,pn=tn?(Gn-Sa*fn)/tn:0;aa0?Ai*pn:0)+fn,rn[wa]={data:Lr[wa],index:aa,value:Ai,startAngle:Ri,endAngle:no,padAngle:Di};return rn}return zr.value=function(Lr){return arguments.length?(ot=typeof Lr=="function"?Lr:E(+Lr),zr):ot},zr.sortValues=function(Lr){return arguments.length?(kt=Lr,jt=null,zr):kt},zr.sort=function(Lr){return arguments.length?(jt=Lr,kt=null,zr):jt},zr.startAngle=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.endAngle=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.padAngle=function(Lr){return arguments.length?(xr=typeof Lr=="function"?Lr:E(+Lr),zr):xr},zr}var F=j(u);function P(ot){this._curve=ot}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ot,kt){this._curve.point(kt*Math.sin(ot),kt*-Math.cos(ot))}};function j(ot){function kt(jt){return new P(ot(jt))}return kt._curve=ot,kt}function U(ot){var kt=ot.curve;return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot.curve=function(jt){return arguments.length?kt(j(jt)):kt()._curve},ot}function $(){return U(z().curve(F))}function Q(){var ot=I().curve(F),kt=ot.curve,jt=ot.lineX0,ar=ot.lineX1,Er=ot.lineY0,xr=ot.lineY1;return ot.angle=ot.x,delete ot.x,ot.startAngle=ot.x0,delete ot.x0,ot.endAngle=ot.x1,delete ot.x1,ot.radius=ot.y,delete ot.y,ot.innerRadius=ot.y0,delete ot.y0,ot.outerRadius=ot.y1,delete ot.y1,ot.lineStartAngle=function(){return U(jt())},delete ot.lineX0,ot.lineEndAngle=function(){return U(ar())},delete ot.lineX1,ot.lineInnerRadius=function(){return U(Er())},delete ot.lineY0,ot.lineOuterRadius=function(){return U(xr())},delete ot.lineY1,ot.curve=function(zr){return arguments.length?kt(j(zr)):kt()._curve},ot}function re(ot,kt){return[(kt=+kt)*Math.cos(ot-=Math.PI/2),kt*Math.sin(ot)]}var ne=Array.prototype.slice;function se(ot){return ot.source}function G(ot){return ot.target}function X(ot){var kt=se,jt=G,ar=A,Er=x,xr=null;function zr(){var Lr,aa=ne.call(arguments),Sa=kt.apply(this,aa),wa=jt.apply(this,aa);if(xr||(xr=Lr=b.path()),ot(xr,+ar.apply(this,(aa[0]=Sa,aa)),+Er.apply(this,aa),+ar.apply(this,(aa[0]=wa,aa)),+Er.apply(this,aa)),Lr)return xr=null,Lr+""||null}return zr.source=function(Lr){return arguments.length?(kt=Lr,zr):kt},zr.target=function(Lr){return arguments.length?(jt=Lr,zr):jt},zr.x=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.y=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.context=function(Lr){return arguments.length?(xr=Lr??null,zr):xr},zr}function K(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt=(kt+ar)/2,jt,kt,Er,ar,Er)}function H(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt,jt=(jt+Er)/2,ar,jt,ar,Er)}function Y(ot,kt,jt,ar,Er){var xr=re(kt,jt),zr=re(kt,jt=(jt+Er)/2),Lr=re(ar,jt),aa=re(ar,Er);ot.moveTo(xr[0],xr[1]),ot.bezierCurveTo(zr[0],zr[1],Lr[0],Lr[1],aa[0],aa[1])}function q(){return X(K)}function Z(){return X(H)}function ee(){var ot=X(Y);return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot}var ae={draw:function(ot,kt){var jt=Math.sqrt(kt/s);ot.moveTo(jt,0),ot.arc(0,0,jt,0,m)}},he={draw:function(ot,kt){var jt=Math.sqrt(kt/5)/2;ot.moveTo(-3*jt,-jt),ot.lineTo(-jt,-jt),ot.lineTo(-jt,-3*jt),ot.lineTo(jt,-3*jt),ot.lineTo(jt,-jt),ot.lineTo(3*jt,-jt),ot.lineTo(3*jt,jt),ot.lineTo(jt,jt),ot.lineTo(jt,3*jt),ot.lineTo(-jt,3*jt),ot.lineTo(-jt,jt),ot.lineTo(-3*jt,jt),ot.closePath()}},xe=Math.sqrt(1/3),we=xe*2,Me={draw:function(ot,kt){var jt=Math.sqrt(kt/we),ar=jt*xe;ot.moveTo(0,-jt),ot.lineTo(ar,0),ot.lineTo(0,jt),ot.lineTo(-ar,0),ot.closePath()}},Se=.8908130915292852,Ie=Math.sin(s/10)/Math.sin(7*s/10),Ve=Math.sin(m/10)*Ie,Ge=-Math.cos(m/10)*Ie,ke={draw:function(ot,kt){var jt=Math.sqrt(kt*Se),ar=Ve*jt,Er=Ge*jt;ot.moveTo(0,-jt),ot.lineTo(ar,Er);for(var xr=1;xr<5;++xr){var zr=m*xr/5,Lr=Math.cos(zr),aa=Math.sin(zr);ot.lineTo(aa*jt,-Lr*jt),ot.lineTo(Lr*ar-aa*Er,aa*ar+Lr*Er)}ot.closePath()}},_e={draw:function(ot,kt){var jt=Math.sqrt(kt),ar=-jt/2;ot.rect(ar,ar,jt,jt)}},ce=Math.sqrt(3),ve={draw:function(ot,kt){var jt=-Math.sqrt(kt/(ce*3));ot.moveTo(0,jt*2),ot.lineTo(-ce*jt,-jt),ot.lineTo(ce*jt,-jt),ot.closePath()}},le=-.5,Ae=Math.sqrt(3)/2,Be=1/Math.sqrt(12),Xe=(Be/2+1)*3,Ye={draw:function(ot,kt){var jt=Math.sqrt(kt/Xe),ar=jt/2,Er=jt*Be,xr=ar,zr=jt*Be+jt,Lr=-xr,aa=zr;ot.moveTo(ar,Er),ot.lineTo(xr,zr),ot.lineTo(Lr,aa),ot.lineTo(le*ar-Ae*Er,Ae*ar+le*Er),ot.lineTo(le*xr-Ae*zr,Ae*xr+le*zr),ot.lineTo(le*Lr-Ae*aa,Ae*Lr+le*aa),ot.lineTo(le*ar+Ae*Er,le*Er-Ae*ar),ot.lineTo(le*xr+Ae*zr,le*zr-Ae*xr),ot.lineTo(le*Lr+Ae*aa,le*aa-Ae*Lr),ot.closePath()}},yt=[ae,he,Me,_e,ke,ve,Ye];function gt(){var ot=E(ae),kt=E(64),jt=null;function ar(){var Er;if(jt||(jt=Er=b.path()),ot.apply(this,arguments).draw(jt,+kt.apply(this,arguments)),Er)return jt=null,Er+""||null}return ar.type=function(Er){return arguments.length?(ot=typeof Er=="function"?Er:E(Er),ar):ot},ar.size=function(Er){return arguments.length?(kt=typeof Er=="function"?Er:E(+Er),ar):kt},ar.context=function(Er){return arguments.length?(jt=Er??null,ar):jt},ar}function Tt(){}function At(ot,kt,jt){ot._context.bezierCurveTo((2*ot._x0+ot._x1)/3,(2*ot._y0+ot._y1)/3,(ot._x0+2*ot._x1)/3,(ot._y0+2*ot._y1)/3,(ot._x0+4*ot._x1+kt)/6,(ot._y0+4*ot._y1+jt)/6)}function $t(ot){this._context=ot}$t.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:At(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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function rr(ot){return new $t(ot)}function _r(ot){this._context=ot}_r.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x2=ot,this._y2=kt;break;case 1:this._point=2,this._x3=ot,this._y3=kt;break;case 2:this._point=3,this._x4=ot,this._y4=kt,this._context.moveTo((this._x0+4*this._x1+ot)/6,(this._y0+4*this._y1+kt)/6);break;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Xt(ot){return new _r(ot)}function or(ot){this._context=ot}or.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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var jt=(this._x0+4*this._x1+ot)/6,ar=(this._y0+4*this._y1+kt)/6;this._line?this._context.lineTo(jt,ar):this._context.moveTo(jt,ar);break;case 3:this._point=4;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Ot(ot){return new or(ot)}function vt(ot,kt){this._basis=new $t(ot),this._beta=kt}vt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length-1;if(jt>0)for(var ar=ot[0],Er=kt[0],xr=ot[jt]-ar,zr=kt[jt]-Er,Lr=-1,aa;++Lr<=jt;)aa=Lr/jt,this._basis.point(this._beta*ot[Lr]+(1-this._beta)*(ar+aa*xr),this._beta*kt[Lr]+(1-this._beta)*(Er+aa*zr));this._x=this._y=null,this._basis.lineEnd()},point:function(ot,kt){this._x.push(+ot),this._y.push(+kt)}};var ht=function ot(kt){function jt(ar){return kt===1?new $t(ar):new vt(ar,kt)}return jt.beta=function(ar){return ot(+ar)},jt}(.85);function De(ot,kt,jt){ot._context.bezierCurveTo(ot._x1+ot._k*(ot._x2-ot._x0),ot._y1+ot._k*(ot._y2-ot._y0),ot._x2+ot._k*(ot._x1-kt),ot._y2+ot._k*(ot._y1-jt),ot._x2,ot._y2)}function Ne(ot,kt){this._context=ot,this._k=(1-kt)/6}Ne.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:De(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2,this._x1=ot,this._y1=kt;break;case 2:this._point=3;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var We=function ot(kt){function jt(ar){return new Ne(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function Ke(ot,kt){this._context=ot,this._k=(1-kt)/6}Ke.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Je=function ot(kt){function jt(ar){return new Ke(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function et(ot,kt){this._context=ot,this._k=(1-kt)/6}et.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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Mt=function ot(kt){function jt(ar){return new et(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function pt(ot,kt,jt){var ar=ot._x1,Er=ot._y1,xr=ot._x2,zr=ot._y2;if(ot._l01_a>o){var Lr=2*ot._l01_2a+3*ot._l01_a*ot._l12_a+ot._l12_2a,aa=3*ot._l01_a*(ot._l01_a+ot._l12_a);ar=(ar*Lr-ot._x0*ot._l12_2a+ot._x2*ot._l01_2a)/aa,Er=(Er*Lr-ot._y0*ot._l12_2a+ot._y2*ot._l01_2a)/aa}if(ot._l23_a>o){var Sa=2*ot._l23_2a+3*ot._l23_a*ot._l12_a+ot._l12_2a,wa=3*ot._l23_a*(ot._l23_a+ot._l12_a);xr=(xr*Sa+ot._x1*ot._l23_2a-kt*ot._l12_2a)/wa,zr=(zr*Sa+ot._y1*ot._l23_2a-jt*ot._l12_2a)/wa}ot._context.bezierCurveTo(ar,Er,xr,zr,ot._x2,ot._y2)}function Pt(ot,kt){this._context=ot,this._alpha=kt}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3;default:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ct=function ot(kt){function jt(ar){return kt?new Pt(ar,kt):new Ne(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function qt(ot,kt){this._context=ot,this._alpha=kt}qt.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Vt=function ot(kt){function jt(ar){return kt?new qt(ar,kt):new Ke(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Ht(ot,kt){this._context=ot,this._alpha=kt}Ht.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(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,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:pt(this,ot,kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Sr=function ot(kt){function jt(ar){return kt?new Ht(ar,kt):new et(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Kr(ot){this._context=ot}Kr.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ot,kt){ot=+ot,kt=+kt,this._point?this._context.lineTo(ot,kt):(this._point=1,this._context.moveTo(ot,kt))}};function Yt(ot){return new Kr(ot)}function Rt(ot){return ot<0?-1:1}function nr(ot,kt,jt){var ar=ot._x1-ot._x0,Er=kt-ot._x1,xr=(ot._y1-ot._y0)/(ar||Er<0&&-0),zr=(jt-ot._y1)/(Er||ar<0&&-0),Lr=(xr*Er+zr*ar)/(ar+Er);return(Rt(xr)+Rt(zr))*Math.min(Math.abs(xr),Math.abs(zr),.5*Math.abs(Lr))||0}function ur(ot,kt){var jt=ot._x1-ot._x0;return jt?(3*(ot._y1-ot._y0)/jt-kt)/2:kt}function cr(ot,kt,jt){var ar=ot._x0,Er=ot._y0,xr=ot._x1,zr=ot._y1,Lr=(xr-ar)/3;ot._context.bezierCurveTo(ar+Lr,Er+Lr*kt,xr-Lr,zr-Lr*jt,xr,zr)}function Rr(ot){this._context=ot}Rr.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:cr(this,this._t0,ur(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){var jt=NaN;if(ot=+ot,kt=+kt,!(ot===this._x1&&kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,cr(this,ur(this,jt=nr(this,ot,kt)),jt);break;default:cr(this,this._t0,jt=nr(this,ot,kt));break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt,this._t0=jt}}};function Qr(ot){this._context=new Zr(ot)}(Qr.prototype=Object.create(Rr.prototype)).point=function(ot,kt){Rr.prototype.point.call(this,kt,ot)};function Zr(ot){this._context=ot}Zr.prototype={moveTo:function(ot,kt){this._context.moveTo(kt,ot)},closePath:function(){this._context.closePath()},lineTo:function(ot,kt){this._context.lineTo(kt,ot)},bezierCurveTo:function(ot,kt,jt,ar,Er,xr){this._context.bezierCurveTo(kt,ot,ar,jt,xr,Er)}};function ha(ot){return new Rr(ot)}function Pa(ot){return new Qr(ot)}function La(ot){this._context=ot}La.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length;if(jt)if(this._line?this._context.lineTo(ot[0],kt[0]):this._context.moveTo(ot[0],kt[0]),jt===2)this._context.lineTo(ot[1],kt[1]);else for(var ar=un(ot),Er=un(kt),xr=0,zr=1;zr=0;--kt)Er[kt]=(zr[kt]-Er[kt+1])/xr[kt];for(xr[jt-1]=(ot[jt]+Er[jt-1])/2,kt=0;kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kt),this._context.lineTo(ot,kt);else{var jt=this._x*(1-this._t)+ot*this._t;this._context.lineTo(jt,this._y),this._context.lineTo(jt,kt)}break}}this._x=ot,this._y=kt}};function Nn(ot){return new ja(ot,.5)}function yn(ot){return new ja(ot,0)}function Un(ot){return new ja(ot,1)}function li(ot,kt){if((zr=ot.length)>1)for(var jt=1,ar,Er,xr=ot[kt[0]],zr,Lr=xr.length;jt=0;)jt[kt]=kt;return jt}function on(ot,kt){return ot[kt]}function en(){var ot=E([]),kt=Yn,jt=li,ar=on;function Er(xr){var zr=ot.apply(this,arguments),Lr,aa=xr.length,Sa=zr.length,wa=new Array(Sa),pn;for(Lr=0;Lr0){for(var jt,ar,Er=0,xr=ot[0].length,zr;Er0)for(var jt,ar=0,Er,xr,zr,Lr,aa,Sa=ot[kt[0]].length;ar0?(Er[0]=zr,Er[1]=zr+=xr):xr<0?(Er[1]=Lr,Er[0]=Lr+=xr):(Er[0]=0,Er[1]=xr)}function Ja(ot,kt){if((Er=ot.length)>0){for(var jt=0,ar=ot[kt[0]],Er,xr=ar.length;jt0)||!((xr=(Er=ot[kt[0]]).length)>0))){for(var jt=0,ar=1,Er,xr,zr;arxr&&(xr=Er,jt=kt);return jt}function fr(ot){var kt=ot.map(lr);return Yn(ot).sort(function(jt,ar){return kt[jt]-kt[ar]})}function lr(ot){for(var kt=0,jt=-1,ar=ot.length,Er;++jt[I(Ve,Ge,Me),Ve]));for(let[Ve,Ge]of Se.entries()){Ge.index=Ve;let{source:ke,target:_e}=Ge;typeof ke!="object"&&(ke=Ge.source=g(Ie,ke)),typeof _e!="object"&&(_e=Ge.target=g(Ie,_e)),ke.sourceLinks.push(Ge),_e.targetLinks.push(Ge)}if(B!=null)for(let{sourceLinks:Ve,targetLinks:Ge}of Me)Ve.sort(B),Ge.sort(B)}function re({nodes:Me}){for(let Se of Me)Se.value=Se.fixedValue===void 0?Math.max(b.sum(Se.sourceLinks,c),b.sum(Se.targetLinks,c)):Se.fixedValue}function ne({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.depth=Ge;for(let{target:_e}of ke.sourceLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function se({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.height=Ge;for(let{source:_e}of ke.targetLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function G({nodes:Me}){let Se=b.max(Me,Ge=>Ge.depth)+1,Ie=(f-_-A)/(Se-1),Ve=new Array(Se);for(let Ge of Me){let ke=Math.max(0,Math.min(Se-1,Math.floor(O.call(null,Ge,Se))));Ge.layer=ke,Ge.x0=_+ke*Ie,Ge.x1=Ge.x0+A,Ve[ke]?Ve[ke].push(Ge):Ve[ke]=[Ge]}if(D)for(let Ge of Ve)Ge.sort(D);return Ve}function X(Me){let Se=b.min(Me,Ie=>(u-T-(Ie.length-1)*z)/b.sum(Ie,c));for(let Ie of Me){let Ve=T;for(let Ge of Ie){Ge.y0=Ve,Ge.y1=Ve+Ge.value*Se,Ve=Ge.y1+z;for(let ke of Ge.sourceLinks)ke.width=ke.value*Se}Ve=(u-Ve+z)/(Ie.length+1);for(let Ge=0;GeIe.length)-1)),X(Se);for(let Ie=0;Ie0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function Y(Me,Se,Ie){for(let Ve=Me.length,Ge=Ve-2;Ge>=0;--Ge){let ke=Me[Ge];for(let _e of ke){let ce=0,ve=0;for(let{target:Ae,value:Be}of _e.sourceLinks){let Xe=Be*(Ae.layer-_e.layer);ce+=we(_e,Ae)*Xe,ve+=Xe}if(!(ve>0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function q(Me,Se){let Ie=Me.length>>1,Ve=Me[Ie];ee(Me,Ve.y0-z,Ie-1,Se),Z(Me,Ve.y1+z,Ie+1,Se),ee(Me,u,Me.length-1,Se),Z(Me,T,0,Se)}function Z(Me,Se,Ie,Ve){for(;Ie1e-6&&(Ge.y0+=ke,Ge.y1+=ke),Se=Ge.y1+z}}function ee(Me,Se,Ie,Ve){for(;Ie>=0;--Ie){let Ge=Me[Ie],ke=(Ge.y1-Se)*Ve;ke>1e-6&&(Ge.y0-=ke,Ge.y1-=ke),Se=Ge.y0-z}}function ae({sourceLinks:Me,targetLinks:Se}){if(B===void 0){for(let{source:{sourceLinks:Ie}}of Se)Ie.sort(o);for(let{target:{targetLinks:Ie}}of Me)Ie.sort(a)}}function he(Me){if(B===void 0)for(let{sourceLinks:Se,targetLinks:Ie}of Me)Se.sort(o),Ie.sort(a)}function xe(Me,Se){let Ie=Me.y0-(Me.sourceLinks.length-1)*z/2;for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie+=Ge+z}for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie-=Ge}return Ie}function we(Me,Se){let Ie=Se.y0-(Se.targetLinks.length-1)*z/2;for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie+=Ge+z}for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie-=Ge}return Ie}return $}function S(_){return[_.source.x1,_.y0]}function M(_){return[_.target.x0,_.y1]}function C(){return E.linkHorizontal().source(S).target(M)}p.sankey=w,p.sankeyCenter=n,p.sankeyJustify=t,p.sankeyLeft=l,p.sankeyLinkHorizontal=C,p.sankeyRight=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),LV=ze({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q=M})}function h(M){m(M);for(var C=E,_=p(C),T=_.components.filter(function(O){return O.length>1}),f=1/0,u,A=0;A"u"?"undefined":s(Ne))!=="object"&&(Ne=ht.source=_(vt,Ne)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=ht.target=_(vt,We)),Ne.sourceLinks.push(ht),We.targetLinks.push(ht)}),Ot}function At(Ot){Ot.nodes.forEach(function(vt){vt.partOfCycle=!1,vt.value=Math.max(b.sum(vt.sourceLinks,v),b.sum(vt.targetLinks,v)),vt.sourceLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)}),vt.targetLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)})})}function $t(Ot){var vt=0,ht=0,De=0,Ne=0,We=b.max(Ot.nodes,function(Ke){return Ke.column});return Ot.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?vt=vt+Ke.width:ht=ht+Ke.width,Ke.target.column==0&&(Ne=Ne+Ke.width),Ke.source.column==We&&(De=De+Ke.width))}),vt=vt>0?vt+f+u:vt,ht=ht>0?ht+f+u:ht,De=De>0?De+f+u:De,Ne=Ne>0?Ne+f+u:Ne,{top:vt,bottom:ht,left:Ne,right:De}}function rr(Ot,vt){var ht=b.max(Ot.nodes,function(Mt){return Mt.column}),De=Ve-Se,Ne=Ge-Ie,We=De+vt.right+vt.left,Ke=Ne+vt.top+vt.bottom,Je=De/We,et=Ne/Ke;return Se=Se*Je+vt.left,Ve=vt.right==0?Ve:Ve*Je,Ie=Ie*et+vt.top,Ge=Ge*et,Ot.nodes.forEach(function(Mt){Mt.x0=Se+Mt.column*((Ve-Se-ke)/ht),Mt.x1=Mt.x0+ke}),et}function _r(Ot){var vt,ht,De;for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.depth=De,Ne.sourceLinks.forEach(function(We){ht.indexOf(We.target)<0&&!We.circular&&ht.push(We.target)})});for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.height=De,Ne.targetLinks.forEach(function(We){ht.indexOf(We.source)<0&&!We.circular&&ht.push(We.source)})});Ot.nodes.forEach(function(Ne){Ne.column=Math.floor(ve.call(null,Ne,De))})}function Xt(Ot,vt,ht){var De=E.nest().key(function(Mt){return Mt.column}).sortKeys(b.ascending).entries(Ot.nodes).map(function(Mt){return Mt.values});Ke(ht),et();for(var Ne=1,We=vt;We>0;--We)Je(Ne*=.99,ht),et();function Ke(Mt){if(Ye){var pt=1/0;De.forEach(function(Vt){var Ht=Ge*Ye/(Vt.length+1);pt=Ht0))if(Vt==0&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else if(Vt==Pt-1&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else{var Kr=0,Yt=b.mean(Ht.sourceLinks,w),Rt=b.mean(Ht.targetLinks,i);Yt&&Rt?Kr=(Yt+Rt)/2:Kr=Yt||Rt;var nr=(Kr-g(Ht))*Mt;Ht.y0+=nr,Ht.y1+=nr}})})}function et(){De.forEach(function(Mt){var pt,Pt,Ct=Ie,qt=Mt.length,Vt;for(Mt.sort(h),Vt=0;Vt0&&(pt.y0+=Pt,pt.y1+=Pt),Ct=pt.y1+_e;if(Pt=Ct-_e-Ge,Pt>0)for(Ct=pt.y0-=Pt,pt.y1-=Pt,Vt=qt-2;Vt>=0;--Vt)pt=Mt[Vt],Pt=pt.y1+_e-Ct,Pt>0&&(pt.y0-=Pt,pt.y1-=Pt),Ct=pt.y0})}}function or(Ot){Ot.nodes.forEach(function(vt){vt.sourceLinks.sort(m),vt.targetLinks.sort(c)}),Ot.nodes.forEach(function(vt){var ht=vt.y0,De=ht,Ne=vt.y1,We=Ne;vt.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Ne-Ke.width/2,Ne=Ne-Ke.width):(Ke.y0=ht+Ke.width/2,ht+=Ke.width)}),vt.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=De+Ke.width/2,De+=Ke.width)})})}return gt}function z(Se,Ie,Ve){var Ge=0;if(Ve===null){for(var ke=[],_e=0;_eIe.source.column)}function B(Se,Ie){var Ve=0;Se.sourceLinks.forEach(function(ke){Ve=ke.circular&&!we(ke,Ie)?Ve+1:Ve});var Ge=0;return Se.targetLinks.forEach(function(ke){Ge=ke.circular&&!we(ke,Ie)?Ge+1:Ge}),Ve+Ge}function F(Se){var Ie=Se.source.sourceLinks,Ve=0;Ie.forEach(function(_e){Ve=_e.circular?Ve+1:Ve});var Ge=Se.target.targetLinks,ke=0;return Ge.forEach(function(_e){ke=_e.circular?ke+1:ke}),!(Ve>1||ke>1)}function P(Se,Ie,Ve){return Se.sort($),Se.forEach(function(Ge,ke){var _e=0;if(we(Ge,Ve)&&F(Ge))Ge.circularPathData.verticalBuffer=_e+Ge.width/2;else{var ce=0;for(ce;ce_e?ve:_e}Ge.circularPathData.verticalBuffer=_e+Ge.width/2}}),Se}function j(Se,Ie,Ve,Ge){var ke=5,_e=b.min(Se.links,function(le){return le.source.y0});Se.links.forEach(function(le){le.circular&&(le.circularPathData={})});var ce=Se.links.filter(function(le){return le.circularLinkType=="top"});P(ce,Ie,Ge);var ve=Se.links.filter(function(le){return le.circularLinkType=="bottom"});P(ve,Ie,Ge),Se.links.forEach(function(le){if(le.circular){if(le.circularPathData.arcRadius=le.width+u,le.circularPathData.leftNodeBuffer=ke,le.circularPathData.rightNodeBuffer=ke,le.circularPathData.sourceWidth=le.source.x1-le.source.x0,le.circularPathData.sourceX=le.source.x0+le.circularPathData.sourceWidth,le.circularPathData.targetX=le.target.x0,le.circularPathData.sourceY=le.y0,le.circularPathData.targetY=le.y1,we(le,Ge)&&F(le))le.circularPathData.leftSmallArcRadius=u+le.width/2,le.circularPathData.leftLargeArcRadius=u+le.width/2,le.circularPathData.rightSmallArcRadius=u+le.width/2,le.circularPathData.rightLargeArcRadius=u+le.width/2,le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=le.source.y1+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=le.source.y0-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius);else{var Ae=le.source.column,Be=le.circularLinkType,Xe=Se.links.filter(function(gt){return gt.source.column==Ae&>.circularLinkType==Be});le.circularLinkType=="bottom"?Xe.sort(re):Xe.sort(Q);var Ye=0;Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.leftSmallArcRadius=u+le.width/2+Ye,le.circularPathData.leftLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),Ae=le.target.column,Xe=Se.links.filter(function(gt){return gt.target.column==Ae&>.circularLinkType==Be}),le.circularLinkType=="bottom"?Xe.sort(se):Xe.sort(ne),Ye=0,Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.rightSmallArcRadius=u+le.width/2+Ye,le.circularPathData.rightLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=Math.max(Ve,le.source.y1,le.target.y1)+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=_e-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius)}le.circularPathData.leftInnerExtent=le.circularPathData.sourceX+le.circularPathData.leftNodeBuffer,le.circularPathData.rightInnerExtent=le.circularPathData.targetX-le.circularPathData.rightNodeBuffer,le.circularPathData.leftFullExtent=le.circularPathData.sourceX+le.circularPathData.leftLargeArcRadius+le.circularPathData.leftNodeBuffer,le.circularPathData.rightFullExtent=le.circularPathData.targetX-le.circularPathData.rightLargeArcRadius-le.circularPathData.rightNodeBuffer}if(le.circular)le.path=U(le);else{var yt=k.linkHorizontal().source(function(gt){var Tt=gt.source.x0+(gt.source.x1-gt.source.x0),At=gt.y0;return[Tt,At]}).target(function(gt){var Tt=gt.target.x0,At=gt.y1;return[Tt,At]});le.path=yt(le)}})}function U(Se){var Ie="";return Se.circularLinkType=="top"?Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 0 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY-Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 0 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 0 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY-Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 0 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY:Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 1 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY+Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 1 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 1 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY+Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 1 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY,Ie}function $(Se,Ie){return G(Se)==G(Ie)?Se.circularLinkType=="bottom"?re(Se,Ie):Q(Se,Ie):G(Ie)-G(Se)}function Q(Se,Ie){return Se.y0-Ie.y0}function re(Se,Ie){return Ie.y0-Se.y0}function ne(Se,Ie){return Se.y1-Ie.y1}function se(Se,Ie){return Ie.y1-Se.y1}function G(Se){return Se.target.column-Se.source.column}function X(Se){return Se.target.x0-Se.source.x1}function K(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1+Ge:Se.y1-Ge;return ke}function H(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1-Ge:Se.y1+Ge;return ke}function Y(Se,Ie,Ve,Ge){Se.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var _e=ke.source.column+1,ce=ke.target.column-1,ve=1,le=ce-_e+1;for(ve=1;_e<=ce;_e++,ve++)Se.nodes.forEach(function(Ae){if(Ae.column==_e){var Be=ve/(le+1),Xe=Math.pow(1-Be,3),Ye=3*Be*Math.pow(1-Be,2),yt=3*Math.pow(Be,2)*(1-Be),gt=Math.pow(Be,3),Tt=Xe*ke.y0+Ye*ke.y0+yt*ke.y1+gt*ke.y1,At=Tt-ke.width/2,$t=Tt+ke.width/2,rr;At>Ae.y0&&AtAe.y0&&$tAe.y1&&Z(_r,rr,Ie,Ve)})):AtAe.y1&&(rr=$t-Ae.y0+10,Ae=Z(Ae,rr,Ie,Ve),Se.nodes.forEach(function(_r){T(_r,Ge)==T(Ae,Ge)||_r.column!=Ae.column||_r.y0Ae.y1&&Z(_r,rr,Ie,Ve)}))}})}})}function q(Se,Ie){return Se.y0>Ie.y0&&Se.y0Ie.y0&&Se.y1Ie.y1}function Z(Se,Ie,Ve,Ge){return Se.y0+Ie>=Ve&&Se.y1+Ie<=Ge&&(Se.y0=Se.y0+Ie,Se.y1=Se.y1+Ie,Se.targetLinks.forEach(function(ke){ke.y1=ke.y1+Ie}),Se.sourceLinks.forEach(function(ke){ke.y0=ke.y0+Ie})),Se}function ee(Se,Ie,Ve,Ge){Se.nodes.forEach(function(ke){Ge&&ke.y+(ke.y1-ke.y0)>Ie&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-Ie));var _e=Se.links.filter(function(le){return T(le.source,Ve)==T(ke,Ve)}),ce=_e.length;ce>1&&_e.sort(function(le,Ae){if(!le.circular&&!Ae.circular){if(le.target.column==Ae.target.column)return le.y1-Ae.y1;if(he(le,Ae)){if(le.target.column>Ae.target.column){var Be=H(Ae,le);return le.y1-Be}if(Ae.target.column>le.target.column){var Xe=H(le,Ae);return Xe-Ae.y1}}else return le.y1-Ae.y1}if(le.circular&&!Ae.circular)return le.circularLinkType=="top"?-1:1;if(Ae.circular&&!le.circular)return Ae.circularLinkType=="top"?1:-1;if(le.circular&&Ae.circular)return le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="top"?le.target.column===Ae.target.column?le.target.y1-Ae.target.y1:Ae.target.column-le.target.column:le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="bottom"?le.target.column===Ae.target.column?Ae.target.y1-le.target.y1:le.target.column-Ae.target.column:le.circularLinkType=="top"?-1:1});var ve=ke.y0;_e.forEach(function(le){le.y0=ve+le.width/2,ve=ve+le.width}),_e.forEach(function(le,Ae){if(le.circularLinkType=="bottom"){var Be=Ae+1,Xe=0;for(Be;Be1&&ke.sort(function(ve,le){if(!ve.circular&&!le.circular){if(ve.source.column==le.source.column)return ve.y0-le.y0;if(he(ve,le)){if(le.source.column0?"up":"down"}function we(Se,Ie){return T(Se.source,Ie)==T(Se.target,Ie)}function Me(Se,Ie,Ve){var Ge=Se.nodes,ke=Se.links,_e=!1,ce=!1;if(ke.forEach(function(Ye){Ye.circularLinkType=="top"?_e=!0:Ye.circularLinkType=="bottom"&&(ce=!0)}),_e==!1||ce==!1){var ve=b.min(Ge,function(Ye){return Ye.y0}),le=b.max(Ge,function(Ye){return Ye.y1}),Ae=le-ve,Be=Ve-Ie,Xe=Be/Ae;Ge.forEach(function(Ye){var yt=(Ye.y1-Ye.y0)*Xe;Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=Ye.y0+yt}),ke.forEach(function(Ye){Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=(Ye.y1-ve)*Xe,Ye.width=Ye.width*Xe})}}p.sankeyCircular=x,p.sankeyCenter=a,p.sankeyLeft=t,p.sankeyRight=n,p.sankeyJustify=r,Object.defineProperty(p,"__esModule",{value:!0})})}}),OM=ze({"src/traces/sankey/constants.js"(J,V){"use strict";V.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),IV=ze({"src/traces/sankey/render.js"(J,V){"use strict";var p=SV(),b=(l0(),Po(_v)).interpolateNumber,E=ci(),k=CV(),l=RV(),e=OM(),t=Qn(),n=$i(),r=Nr(),a=r.strTranslate,o=r.strRotate,s=Vd(),c=s.keyFun,m=s.repeat,h=s.unwrap,v=Cs(),g=mi(),i=dc(),w=i.CAP_SHIFT,S=i.LINE_SPACING,M=3;function C(X,K,H){var Y=h(K),q=Y.trace,Z=q.domain,ee=q.orientation==="h",ae=q.direction==="reversed",he=q.node.pad,xe=q.node.thickness,we={justify:k.sankeyJustify,left:k.sankeyLeft,right:k.sankeyRight,center:k.sankeyCenter}[q.node.align],Me=X.width*(Z.x[1]-Z.x[0]),Se=X.height*(Z.y[1]-Z.y[0]),Ie=Y._nodes,Ve=Y._links,Ge=Y.circular,ke;Ge?ke=l.sankeyCircular().circularLinkGap(0):ke=k.sankey(),ke.iterations(e.sankeyIterations).size(ee?[Me,Se]:[Se,Me]).nodeWidth(xe).nodePadding(he).nodeId(function(Xt){return Xt.pointNumber}).nodeAlign(we).nodes(Ie).links(Ve);function _e(Xt){q[Xt].sort==="input"&&(Ge?r.warn(`Circular Sankey diagrams do not support the "input" ${Xt}.sort mode; falling back to the default sort.`):ke[`${Xt}Sort`](null))}_e("link"),_e("node");var ce=ke();ke.nodePadding()=ht||(vt=ht-Ot.y0,vt>1e-6&&(Ot.y0+=vt,Ot.y1+=vt)),ht=Ot.y1+he})}function At(Xt){var or=Xt.map(function(Ke,Je){return{x0:Ke.x0,index:Je}}).sort(function(Ke,Je){return Ke.x0-Je.x0}),Ot=[],vt=-1,ht,De=-1/0,Ne;for(ve=0;veDe+xe&&(vt+=1,ht=We.x0),De=We.x0,Ot[vt]||(Ot[vt]=[]),Ot[vt].push(We),Ne=ht-We.x0,We.x0+=Ne,We.x1+=Ne}return Ot}if(q.node.x.length&&q.node.y.length){for(ve=0;ve0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(H="M "+(q.targetX-K)+" "+(q.targetY-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.targetY-Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightSmallArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent-Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-Y-K)+" "+q.verticalRightInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-Y-K)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent+Y-K-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent-K-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.leftFullExtent+Y+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+Y)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+Y)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent,H+=" L "+(q.leftFullExtent+Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftSmallArcRadius+Y)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY+Y)+" L "+q.leftInnerExtent+" "+(q.sourceY+Y)+" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Y)+" "+q.verticalLeftInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.rightFullExtent+Y-K+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent-K-Y)+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:H+=" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftLargeArcRadius-Y)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightLargeArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent,H+=" L "+(q.rightFullExtent+Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+Y)+" L "+(q.targetX-K)+" "+(q.targetY+Y)+(K>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),H}function f(){var X=.5;function K(H){var Y=H.linkArrowLength;if(H.link.circular)return T(H.link,Y);var q=Math.abs((H.link.target.x0-H.link.source.x1)/2);Y>q&&(Y=q);var Z=H.link.source.x1,ee=H.link.target.x0-Y,ae=b(Z,ee),he=ae(X),xe=ae(1-X),we=H.link.y0-H.link.width/2,Me=H.link.y0+H.link.width/2,Se=H.link.y1-H.link.width/2,Ie=H.link.y1+H.link.width/2,Ve="M"+Z+","+we,Ge="C"+he+","+we+" "+xe+","+Se+" "+ee+","+Se,ke="C"+xe+","+Ie+" "+he+","+Me+" "+Z+","+Me,_e=Y>0?"L"+(ee+Y)+","+(Se+H.link.width/2):"";return _e+="L"+ee+","+Ie,Ve+Ge+_e+ke+"Z"}return K}function u(X,K){var H=e.nodePadAcross,Y=X.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var q=K.dx,Z=Math.max(.5,K.dy),ee="node_"+K.pointNumber;return K.group&&(ee=r.randstr()),K.trace=X.trace,K.curveNumber=X.trace.index,{index:K.pointNumber,key:ee,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:X.key,trace:X.trace,node:K,nodePad:X.nodePad,nodeLineColor:X.nodeLineColor,nodeLineWidth:X.nodeLineWidth,textFont:X.textFont,size:X.horizontal?X.height:X.width,visibleWidth:Math.ceil(q),visibleHeight:Z,zoneX:-H,zoneY:-Y,zoneWidth:q+2*H,zoneHeight:Z+2*Y,labelY:X.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:X.width,forceLayouts:X.forceLayouts,horizontal:X.horizontal,reversed:X.reversed,rgb:t.rgb(K.color),alpha:t.parse(K.color).alpha,valueFormat:X.valueFormat,valueSuffix:X.valueSuffix,sankey:X.sankey,graph:X.graph,arrangement:X.arrangement,uniqueNodeLabelPathId:[X.guid,X.key,ee].join("_"),interactionState:X.interactionState,figure:X}}function A(X){X.attr("transform",function(K){return a(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function x(X){X.call(A)}function z(X,K){X.call(x),K.attr("d",f())}function I(X){X.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function O(X){return X.link.width>1||X.linkLineWidth>0}function D(X){return X.horizontal?X.reversed?a(X.translateX+X.width,X.translateY)+"matrix(-1 0 0 1 0 0)":a(X.translateX,X.translateY)+"matrix(1 0 0 1 0 0)":X.reversed?a(X.translateX,X.translateY+X.height)+"matrix(0 -1 1 0 0 0)":a(X.translateX,X.translateY)+"matrix(0 1 1 0 0 0)"}function B(X,K,H){X.on(".basic",null).on("mouseover.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.hover(this,Y,K),Y.interactionState.hovered=[this,Y])}).on("mousemove.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.follow(this,Y),Y.interactionState.hovered=[this,Y])}).on("mouseout.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1)}).on("click.basic",function(Y){Y.interactionState.hovered&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1),!Y.interactionState.dragInProgress&&!Y.partOfGroup&&H.select(this,Y,K)})}function F(X,K,H,Y){var q=E.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(r.ensureSingle(Y._fullLayout._infolayer,"g","dragcover",function(ae){Y._fullLayout._dragCover=ae}),r.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,re(Z.node),Z.interactionState.hovered&&(H.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var ee=Z.traceId+"|"+Z.key;Z.forceLayouts[ee]?Z.forceLayouts[ee].alpha(1):P(X,ee,Z,Y),j(X,K,Z,ee,Y)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var ee=E.event.x,ae=E.event.y;Z.arrangement==="snap"?(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2,Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2),ae=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,ae)),Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2),re(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),z(X.filter(ne(Z)),K))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var ee=0;ee0)window.requestAnimationFrame(Z);else{var he=H.node.originalX;H.node.x0=he-H.visibleWidth/2,H.node.x1=he+H.visibleWidth/2,$(H,q)}})}function U(X,K,H,Y){return function(){for(var Z=0,ee=0;ee0&&Y.forceLayouts[K].alpha(0)}}function $(X,K){for(var H=[],Y=[],q=0;qO(ke)?t.rgb(ke.linkLineColor):ke.rgb).style("stroke-opacity",ke=>O(ke)?t.opacity(ke.linkLineColor):ke.alpha).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha).style("stroke-width",ke=>O(ke)?ke.linkLineWidth:1).attr("d",f()),Me.style("opacity",function(){return X._context.staticPlot||ee||ae?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Me.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Se=xe.selectAll("."+e.cn.sankeyNodeSet).data(m,c);Se.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Se.style("cursor",function(ke){switch(ke.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ie=Se.selectAll("."+e.cn.sankeyNode).data(function(ke){var _e=ke.graph.nodes;return Q(_e),_e.map(u.bind(null,ke))},c);Ie.enter().append("g").classed(e.cn.sankeyNode,!0).call(A).style("opacity",function(ke){return(X._context.staticPlot||ee)&&!ke.partOfGroup?1:0}),Ie.call(B,xe,q.nodeEvents).call(F,Me,q,X),Ie.transition().ease(e.ease).duration(e.duration).call(A).style("opacity",function(ke){return ke.partOfGroup?0:1}),Ie.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Ve=Ie.selectAll("."+e.cn.nodeRect).data(m);Ve.enter().append("rect").classed(e.cn.nodeRect,!0).call(I),Ve.style("stroke-width",function(ke){return ke.nodeLineWidth}).style("stroke",function(ke){return t.rgb(ke.nodeLineColor)}).style("stroke-opacity",function(ke){return t.opacity(ke.nodeLineColor)}).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha),Ve.transition().ease(e.ease).duration(e.duration).call(I);var Ge=Ie.selectAll("."+e.cn.nodeLabel).data(m);Ge.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),Ge.attr("data-notex",1).text(function(ke){return ke.node.label}).each(function(ke){var _e=E.select(this);n.font(_e,ke.textFont),v.convertToTspans(_e,X)}).attr("text-anchor",function(ke){return ke.horizontal&&ke.left!==ke.reversed?"end":"start"}).attr("transform",function(ke){var _e=E.select(this),ce=v.lineCount(_e),ve=ke.textFont.size*((ce-1)*S-w),le=ke.nodeLineWidth/2+M;if(!ke.horizontal){var Xe=ke.reversed?(ke.visibleWidth+ve)/2:(ke.visibleWidth-ve)/2,Ae=ke.reversed?o(90):"scale(-1,1)"+o(90);return a(Xe,le)+Ae}var Be=le,Xe=(ke.visibleHeight-ve)/2;return ke.left?Be=-Be:Be+=ke.visibleWidth,a(Be,Xe)+(ke.reversed?"scale(-1,1)":"")}),Ge.transition().ease(e.ease).duration(e.duration)}}}),NM=ze({"src/traces/sankey/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=b.numberFormat,k=IV(),l=Zl(),e=Qn(),t=OM().cn,n=b._;function r(S){return S!==""}function a(S,M){return S.filter(function(C){return C.key===M.traceId})}function o(S,M){p.select(S).select("path").style("fill-opacity",M),p.select(S).select("rect").style("fill-opacity",M)}function s(S){p.select(S).select("text.name").style("fill","black")}function c(S){return function(M){return S.node.sourceLinks.indexOf(M.link)!==-1||S.node.targetLinks.indexOf(M.link)!==-1}}function m(S){return function(M){return M.node.sourceLinks.indexOf(S.link)!==-1||M.node.targetLinks.indexOf(S.link)!==-1}}function h(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(g.bind(0,M,C,!1))}function v(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(i.bind(0,M,C,!1))}function g(S,M,C,_){_.style("fill",function(T){if(!T.link.concentrationscale)return T.hoverRgb}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.hoverAlpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",function(u){if(!u.link.concentrationscale)return u.hoverRgb}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.hoverAlpha})}),C&&a(M,S).selectAll("."+t.sankeyNode).filter(m(S)).call(h)}function i(S,M,C,_){_.style("fill",function(T){return T.rgb}).style("fill-opacity",function(T){return T.alpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",u=>u.rgb).style("fill-opacity",u=>u.alpha)}),C&&a(M,S).selectAll(t.sankeyNode).filter(m(S)).call(v)}function w(S,M){var C=S.hoverlabel||{},_=b.nestedProperty(C,M).get();return Array.isArray(_)?!1:_}V.exports=function(M,C){for(var _=M._fullLayout,T=_._paper,f=_._size,u=0;u"),color:w(G,"bgcolor")||e.addOpacity(q.color,1),borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:p.event.x"),color:w(G,"bgcolor")||se.rgb,borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:ee,eventData:[se.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M});o(xe,.85),s(xe)}}},re=function(ne,se,G){M._fullLayout.hovermode!==!1&&(p.select(ne).call(v,se,G),se.node.trace.node.hoverinfo!=="skip"&&(se.node.fullData=se.node.trace,M.emit("plotly_unhover",{event:p.event,points:[se.node]})),l.loneUnhover(_._hoverlayer.node()))};k(M,T,C,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:z,follow:P,unhover:j,select:x},nodeEvents:{hover:$,follow:Q,unhover:re,select:U}})}}}),DV=ze({"src/traces/sankey/base_plot.js"(J){"use strict";var V=Al().overrideAll,p=zf().getModuleCalcData,b=NM(),E=rv(),k=gd(),l=_h(),e=_c().prepSelect,t=Nr(),n=mi(),r="sankey";J.name=r,J.baseLayoutAttrOverrides=V({hoverlabel:E.hoverlabel},"plot","nested"),J.plot=function(o){var s=p(o.calcdata,r)[0];b(o,s),J.updateFx(o)},J.clean=function(o,s,c,m){var h=m._has&&m._has(r),v=s._has&&s._has(r);h&&!v&&(m._paperdiv.selectAll(".sankey").remove(),m._paperdiv.selectAll(".bgsankey").remove())},J.updateFx=function(o){for(var s=0;s0}V.exports=function(D,B,F,P){var j=D._fullLayout,U;S(F)&&P&&(U=P()),k.makeTraceGroups(j._indicatorlayer,B,"trace").each(function($){var Q=$[0],re=Q.trace,ne=p.select(this),se=re._hasGauge,G=re._isAngular,X=re._isBullet,K=re.domain,H={w:j._size.w*(K.x[1]-K.x[0]),h:j._size.h*(K.y[1]-K.y[0]),l:j._size.l+j._size.w*K.x[0],r:j._size.r+j._size.w*(1-K.x[1]),t:j._size.t+j._size.h*(1-K.y[1]),b:j._size.b+j._size.h*K.y[0]},Y=H.l+H.w/2,q=H.t+H.h/2,Z=Math.min(H.w/2,H.h),ee=a.innerRadius*Z,ae,he,xe,we=re.align||"center";if(he=q,!se)ae=H.l+i[we]*H.w,xe=function(le){return A(le,H.w,H.h)};else if(G&&(ae=Y,he=q+Z/2,xe=function(le){return x(le,.9*ee)}),X){var Me=a.bulletPadding,Se=1-a.bulletNumberDomainSize+Me;ae=H.l+(Se+(1-Se)*i[we])*H.w,xe=function(le){return A(le,(a.bulletNumberDomainSize-Me)*H.w,H.h)}}_(D,ne,$,{numbersX:ae,numbersY:he,numbersScaler:xe,transitionOpts:F,onComplete:U});var Ie,Ve;se&&(Ie={range:re.gauge.axis.range,color:re.gauge.bgcolor,line:{color:re.gauge.bordercolor,width:0},thickness:1},Ve={range:re.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:re.gauge.bordercolor,width:re.gauge.borderwidth},thickness:1});var Ge=ne.selectAll("g.angular").data(G?$:[]);Ge.exit().remove();var ke=ne.selectAll("g.angularaxis").data(G?$:[]);ke.exit().remove(),G&&C(D,ne,$,{radius:Z,innerRadius:ee,gauge:Ge,layer:ke,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var _e=ne.selectAll("g.bullet").data(X?$:[]);_e.exit().remove();var ce=ne.selectAll("g.bulletaxis").data(X?$:[]);ce.exit().remove(),X&&M(D,ne,$,{gauge:_e,layer:ce,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var ve=ne.selectAll("text.title").data($);ve.exit().remove(),ve.enter().append("text").classed("title",!0),ve.attr("text-anchor",function(){return X?g.right:g[re.title.align]}).text(re.title.text).call(r.font,re.title.font).call(o.convertToTspans,D),ve.attr("transform",function(){var le=H.l+H.w*i[re.title.align],Ae,Be=a.titlePadding,Xe=r.bBox(ve.node());if(se){if(G)if(re.gauge.axis.visible){var Ye=r.bBox(ke.node());Ae=Ye.top-Be-Xe.bottom}else Ae=H.t+H.h/2-Z/2-Xe.bottom-Be;X&&(Ae=he-(Xe.top+Xe.bottom)/2,le=H.l-a.bulletPadding*H.w)}else Ae=re._numbersTop-Be-Xe.bottom;return e(le,Ae)})})};function M(O,D,B,F){var P=B[0].trace,j=F.gauge,U=F.layer,$=F.gaugeBg,Q=F.gaugeOutline,re=F.size,ne=P.domain,se=F.transitionOpts,G=F.onComplete,X,K,H,Y,q;j.enter().append("g").classed("bullet",!0),j.attr("transform",e(re.l,re.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var Z=re.h,ee=P.gauge.bar.thickness*Z,ae=ne.x[0],he=ne.x[0]+(ne.x[1]-ne.x[0])*(P._hasNumber||P._hasDelta?1-a.bulletNumberDomainSize:1);X=u(O,P.gauge.axis),X._id="xbulletaxis",X.domain=[ae,he],X.setScale(),K=s.calcTicks(X),H=s.makeTransTickFn(X),Y=s.getTickSigns(X)[2],q=re.t+re.h,X.visible&&(s.drawTicks(O,X,{vals:X.ticks==="inside"?s.clipEnds(X,K):K,layer:U,path:s.makeTickPath(X,q,Y),transFn:H}),s.drawLabels(O,X,{vals:K,layer:U,transFn:H,labelFns:s.makeLabelFns(X,q)}));function xe(ke){ke.attr("width",function(_e){return Math.max(0,X.c2p(_e.range[1])-X.c2p(_e.range[0]))}).attr("x",function(_e){return X.c2p(_e.range[0])}).attr("y",function(_e){return .5*(1-_e.thickness)*Z}).attr("height",function(_e){return _e.thickness*Z})}var we=[$].concat(P.gauge.steps),Me=j.selectAll("g.bg-bullet").data(we);Me.enter().append("g").classed("bg-bullet",!0).append("rect"),Me.select("rect").call(xe).call(T),Me.exit().remove();var Se=j.selectAll("g.value-bullet").data([P.gauge.bar]);Se.enter().append("g").classed("value-bullet",!0).append("rect"),Se.select("rect").attr("height",ee).attr("y",(Z-ee)/2).call(T),S(se)?Se.select("rect").transition().duration(se.duration).ease(se.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()}).attr("width",Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y)))):Se.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y))):0),Se.exit().remove();var Ie=B.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),Ve=j.selectAll("g.threshold-bullet").data(Ie);Ve.enter().append("g").classed("threshold-bullet",!0).append("line"),Ve.select("line").attr("x1",X.c2p(P.gauge.threshold.value)).attr("x2",X.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*Z).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*Z).call(v.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),Ve.exit().remove();var Ge=j.selectAll("g.gauge-outline").data([Q]);Ge.enter().append("g").classed("gauge-outline",!0).append("rect"),Ge.select("rect").call(xe).call(T),Ge.exit().remove()}function C(O,D,B,F){var P=B[0].trace,j=F.size,U=F.radius,$=F.innerRadius,Q=F.gaugeBg,re=F.gaugeOutline,ne=[j.l+j.w/2,j.t+j.h/2+U/2],se=F.gauge,G=F.layer,X=F.transitionOpts,K=F.onComplete,H=Math.PI/2;function Y(yt){var gt=P.gauge.axis.range[0],Tt=P.gauge.axis.range[1],At=(yt-gt)/(Tt-gt)*Math.PI-H;return At<-H?-H:At>H?H:At}function q(yt){return p.svg.arc().innerRadius(($+U)/2-yt/2*(U-$)).outerRadius(($+U)/2+yt/2*(U-$)).startAngle(-H)}function Z(yt){yt.attr("d",function(gt){return q(gt.thickness).startAngle(Y(gt.range[0])).endAngle(Y(gt.range[1]))()})}var ee,ae,he,xe;se.enter().append("g").classed("angular",!0),se.attr("transform",e(ne[0],ne[1])),G.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),G.selectAll("g.xangularaxistick,path,text").remove(),ee=u(O,P.gauge.axis),ee.type="linear",ee.range=P.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var we=function(yt){return(ee.range[0]-yt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Me={},Se=s.makeLabelFns(ee,0),Ie=Se.labelStandoff;Me.xFn=function(yt){var gt=we(yt);return Math.cos(gt)*Ie},Me.yFn=function(yt){var gt=we(yt),Tt=Math.sin(gt)>0?.2:1;return-Math.sin(gt)*(Ie+yt.fontSize*Tt)+Math.abs(Math.cos(gt))*(yt.fontSize*n)},Me.anchorFn=function(yt){var gt=we(yt),Tt=Math.cos(gt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Me.heightFn=function(yt,gt,Tt){var At=we(yt);return-.5*(1+Math.sin(At))*Tt};var Ve=function(yt){return e(ne[0]+U*Math.cos(yt),ne[1]-U*Math.sin(yt))};he=function(yt){return Ve(we(yt))};var Ge=function(yt){var gt=we(yt);return Ve(gt)+"rotate("+-t(gt)+")"};if(ae=s.calcTicks(ee),xe=s.getTickSigns(ee)[2],ee.visible){xe=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;s.drawTicks(O,ee,{vals:ae,layer:G,path:"M"+xe*ke+",0h"+xe*ee.ticklen,transFn:Ge}),s.drawLabels(O,ee,{vals:ae,layer:G,transFn:he,labelFns:Me})}var _e=[Q].concat(P.gauge.steps),ce=se.selectAll("g.bg-arc").data(_e);ce.enter().append("g").classed("bg-arc",!0).append("path"),ce.select("path").call(Z).call(T),ce.exit().remove();var ve=q(P.gauge.bar.thickness),le=se.selectAll("g.value-arc").data([P.gauge.bar]);le.enter().append("g").classed("value-arc",!0).append("path");var Ae=le.select("path");S(X)?(Ae.transition().duration(X.duration).ease(X.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",f(ve,Y(B[0].lastY),Y(B[0].y))),P._lastValue=B[0].y):Ae.attr("d",typeof B[0].y=="number"?ve.endAngle(Y(B[0].y)):"M0,0Z"),Ae.call(T),le.exit().remove(),_e=[];var Be=P.gauge.threshold.value;(Be||Be===0)&&_e.push({range:[Be,Be],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var Xe=se.selectAll("g.threshold-arc").data(_e);Xe.enter().append("g").classed("threshold-arc",!0).append("path"),Xe.select("path").call(Z).call(T),Xe.exit().remove();var Ye=se.selectAll("g.gauge-outline").data([re]);Ye.enter().append("g").classed("gauge-outline",!0).append("path"),Ye.select("path").call(Z).call(T),Ye.exit().remove()}function _(O,D,B,F){var P=B[0].trace,j=F.numbersX,U=F.numbersY,$=P.align||"center",Q=g[$],re=F.transitionOpts,ne=F.onComplete,se=k.ensureSingle(D,"g","numbers"),G,X,K,H=[];P._hasNumber&&H.push("number"),P._hasDelta&&(H.push("delta"),P.delta.position==="left"&&H.reverse());var Y=se.selectAll("text").data(H);Y.enter().append("text"),Y.attr("text-anchor",function(){return Q}).attr("class",function(Ve){return Ve}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Y.exit().remove();function q(Ve,Ge,ke,_e){if(Ve.match("s")&&ke>=0!=_e>=0&&!Ge(ke).slice(-1).match(w)&&!Ge(_e).slice(-1).match(w)){var ce=Ve.slice().replace("s","f").replace(/\d+/,function(le){return parseInt(le)-1}),ve=u(O,{tickformat:ce});return function(le){return Math.abs(le)<1?s.tickText(ve,le).text:Ge(le)}}else return Ge}function Z(){var Ve=u(O,{tickformat:P.number.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(le){return s.tickText(Ve,le).text},ke=P.number.suffix,_e=P.number.prefix,ce=se.select("text.number");function ve(){var le=typeof B[0].y=="number"?_e+Ge(B[0].y)+ke:"-";ce.text(le).call(r.font,P.number.font).call(o.convertToTspans,O)}return S(re)?ce.transition().duration(re.duration).ease(re.easing).each("end",function(){ve(),ne&&ne()}).each("interrupt",function(){ve(),ne&&ne()}).attrTween("text",function(){var le=p.select(this),Ae=E(B[0].lastY,B[0].y);P._lastValue=B[0].y;var Be=q(P.number.valueformat,Ge,B[0].lastY,B[0].y);return function(Xe){le.text(_e+Be(Ae(Xe))+ke)}}):ve(),G=z(_e+Ge(B[0].y)+ke,P.number.font,Q,O),ce}function ee(){var Ve=u(O,{tickformat:P.delta.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(Xe){return s.tickText(Ve,Xe).text},ke=P.delta.suffix,_e=P.delta.prefix,ce=function(Xe){var Ye=P.delta.relative?Xe.relativeDelta:Xe.delta;return Ye},ve=function(Xe,Ye){return Xe===0||typeof Xe!="number"||isNaN(Xe)?"-":(Xe>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+_e+Ye(Xe)+ke},le=function(Xe){return Xe.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=ce(B[0]));var Ae=se.select("text.delta");Ae.call(r.font,P.delta.font).call(v.fill,le({delta:P._deltaLastValue}));function Be(){Ae.text(ve(ce(B[0]),Ge)).call(v.fill,le(B[0])).call(o.convertToTspans,O)}return S(re)?Ae.transition().duration(re.duration).ease(re.easing).tween("text",function(){var Xe=p.select(this),Ye=ce(B[0]),yt=P._deltaLastValue,gt=q(P.delta.valueformat,Ge,yt,Ye),Tt=E(yt,Ye);return P._deltaLastValue=Ye,function(At){Xe.text(ve(Tt(At),gt)),Xe.call(v.fill,le({delta:Tt(At)}))}}).each("end",function(){Be(),ne&&ne()}).each("interrupt",function(){Be(),ne&&ne()}):Be(),X=z(ve(ce(B[0]),Ge),P.delta.font,Q,O),Ae}var ae=P.mode+P.align,he;if(P._hasDelta&&(he=ee(),ae+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,ae+=P.delta.increasing.symbol+P.delta.decreasing.symbol,K=X),P._hasNumber&&(Z(),ae+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,K=G),P._hasDelta&&P._hasNumber){var xe=[(G.left+G.right)/2,(G.top+G.bottom)/2],we=[(X.left+X.right)/2,(X.top+X.bottom)/2],Me,Se,Ie=.75*P.delta.font.size;P.delta.position==="left"&&(Me=I(P,"deltaPos",0,-1*(G.width*i[P.align]+X.width*(1-i[P.align])+Ie),ae,Math.min),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:X.left+Me,right:G.right,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="right"&&(Me=I(P,"deltaPos",0,G.width*(1-i[P.align])+X.width*i[P.align]+Ie,ae,Math.max),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:G.left,right:X.right+Me,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="bottom"&&(Me=null,Se=X.height,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height,bottom:G.bottom+X.height}),P.delta.position==="top"&&(Me=null,Se=G.top,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height-X.height,bottom:G.bottom}),he.attr({dx:Me,dy:Se})}(P._hasNumber||P._hasDelta)&&se.attr("transform",function(){var Ve=F.numbersScaler(K);ae+=Ve[2];var Ge=I(P,"numbersScale",1,Ve[0],ae,Math.min),ke;P._scaleNumbers||(Ge=1),P._isAngular?ke=U-Ge*K.bottom:ke=U-Ge*(K.top+K.bottom)/2,P._numbersTop=Ge*K.top+ke;var _e=K[$];$==="center"&&(_e=(K.left+K.right)/2);var ce=j-Ge*_e;return ce=I(P,"numbersTranslate",0,ce,ae,Math.max),e(ce,ke)+l(Ge)})}function T(O){O.each(function(D){v.stroke(p.select(this),D.line.color)}).each(function(D){v.fill(p.select(this),D.color)}).style("stroke-width",function(D){return D.line.width})}function f(O,D,B){return function(){var F=b(D,B);return function(P){return O.endAngle(F(P))()}}}function u(O,D,B){var F=O._fullLayout,P=k.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},D),j={type:"linear",_id:"x"+D._id},U={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function $(Q,re){return k.coerce(P,j,h,Q,re)}return c(P,j,$,U,F),m(P,j,$,U),j}function A(O,D,B){var F=Math.min(D/O.width,B/O.height);return[F,O,D+"x"+B]}function x(O,D){var B=Math.sqrt(O.width/2*(O.width/2)+O.height*O.height),F=D/B;return[F,O,D]}function z(O,D,B,F){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),j=p.select(P);return j.text(O).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",O).call(o.convertToTspans,F).call(r.font,D),r.bBox(j.node())}function I(O,D,B,F,P,j){var U="_cache"+D;O[U]&&O[U].key===P||(O[U]={key:P,value:B});var $=k.aggNums(j,null,[O[U].value,F],2);return O[U].value=$,$}}}),qV=ze({"src/traces/indicator/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"indicator",basePlotModule:OV(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:jM(),supplyDefaults:NV().supplyDefaults,calc:jV().calc,plot:UV(),meta:{}}}}),VV=ze({"lib/indicator.js"(J,V){"use strict";V.exports=qV()}}),qM=ze({"src/traces/table/attributes.js"(J,V){"use strict";var p=fv(),b=Ki().extendFlat,E=Al().overrideAll,k=Qs(),l=Ml().attributes,e=Il().descriptionOnlyNumbers,t=V.exports=E({domain:l({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:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:b({},p.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:b({},k({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:b({},p.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:b({},k({arrayOk:!0}))}},"calc","from-root")}}),GV=ze({"src/traces/table/defaults.js"(J,V){"use strict";var p=Nr(),b=qM(),E=Ml().defaults;function k(l,e){for(var t=l.columnorder||[],n=l.header.values.length,r=t.slice(0,n),a=r.slice().sort(function(c,m){return c-m}),o=r.map(function(c){return a.indexOf(c)}),s=o.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"}}}}),WV=ze({"src/traces/table/data_preparation_helper.js"(J,V){"use strict";var p=VM(),b=Ki().extendFlat,E=ao(),k=Ff().isTypedArray,l=Ff().isArrayOrTypedArray;V.exports=function(h,v){var g=n(v.cells.values),i=function(Q){return Q.slice(v.header.values.length,Q.length)},w=n(v.header.values);w.length&&!w[0].length&&(w[0]=[""],w=n(w));var S=w.concat(i(g).map(function(){return r((w[0]||[""]).length)})),M=v.domain,C=Math.floor(h._fullLayout._size.w*(M.x[1]-M.x[0])),_=Math.floor(h._fullLayout._size.h*(M.y[1]-M.y[0])),T=v.header.values.length?S[0].map(function(){return v.header.height}):[p.emptyHeaderHeight],f=g.length?g[0].map(function(){return v.cells.height}):[],u=T.reduce(t,0),A=_-u,x=A+p.uplift,z=s(f,x),I=s(T,u),O=o(I,[]),D=o(z,O),B={},F=v.columnorder;l(F)&&(F=Array.from(F)),F=F.concat(i(g.map(function(Q,re){return re})));var P=S.map(function(Q,re){var ne=l(v.columnwidth)?v.columnwidth[Math.min(re,v.columnwidth.length-1)]:v.columnwidth;return E(ne)?Number(ne):1}),j=P.reduce(t,0);P=P.map(function(Q){return Q/j*C});var U=Math.max(e(v.header.line.width),e(v.cells.line.width)),$={key:v.uid+h._context.staticPlot,translateX:M.x[0]*h._fullLayout._size.w,translateY:h._fullLayout._size.h*(1-M.y[1]),size:h._fullLayout._size,width:C,maxLineWidth:U,height:_,columnOrder:F,groupHeight:_,rowBlocks:D,headerRowBlocks:O,scrollY:0,cells:b({},v.cells,{values:g}),headerCells:b({},v.header,{values:S}),gdColumns:S.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:S.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:S.map(function(Q,re){var ne=B[Q];B[Q]=(ne||0)+1;var se=Q+"__"+B[Q];return{key:se,label:Q,specIndex:re,xIndex:F[re],xScale:a,x:void 0,calcdata:void 0,columnWidth:P[re]}})};return $.columns.forEach(function(Q){Q.calcdata=$,Q.x=a(Q)}),$};function e(m){if(l(m)){for(var h=0,v=0;v=h||_===m.length-1)&&(v[i]=S,S.key=C++,S.firstRowIndex=M,S.lastRowIndex=_,S=c(),i+=w,M=_+1,w=0);return v}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),YV=ze({"src/traces/table/data_split_helpers.js"(J){"use strict";var V=Ki().extendFlat;J.splitToPanels=function(b){var E=[0,0],k=V({},b,{key:"header",type:"header",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!0,values:b.calcdata.headerCells.values[b.specIndex],rowBlocks:b.calcdata.headerRowBlocks,calcdata:V({},b.calcdata,{cells:b.calcdata.headerCells})}),l=V({},b,{key:"cells1",type:"cells",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks}),e=V({},b,{key:"cells2",type:"cells",page:1,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks});return[l,e,k]},J.splitToCells=function(b){var E=p(b);return(b.values||[]).slice(E[0],E[1]).map(function(k,l){var e=typeof k=="string"&&k.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:E[0]+l,column:b,calcdata:b.calcdata,page:b.page,rowBlocks:b.rowBlocks,value:k}})};function p(b){var E=b.rowBlocks[b.page],k=E?E.rows[0].rowIndex:0,l=E?k+E.rows.length:0;return[k,l]}}}),GM=ze({"src/traces/table/plot.js"(J,V){"use strict";var p=VM(),b=ci(),E=Nr(),k=E.numberFormat,l=Vd(),e=$i(),t=Cs(),n=Nr().raiseToTop,r=Nr().strTranslate,a=Nr().cancelTransition,o=WV(),s=YV(),c=Qn();V.exports=function(ae,he){var xe=!ae._context.staticPlot,we=ae._fullLayout._paper.selectAll("."+p.cn.table).data(he.map(function(Ye){var yt=l.unwrap(Ye),gt=yt.trace;return o(ae,gt)}),l.keyFun);we.exit().remove(),we.enter().append("g").classed(p.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"),we.attr("width",function(Ye){return Ye.width+Ye.size.l+Ye.size.r}).attr("height",function(Ye){return Ye.height+Ye.size.t+Ye.size.b}).attr("transform",function(Ye){return r(Ye.translateX,Ye.translateY)});var Me=we.selectAll("."+p.cn.tableControlView).data(l.repeat,l.keyFun),Se=Me.enter().append("g").classed(p.cn.tableControlView,!0).style("box-sizing","content-box");if(xe){var Ie="onwheel"in document?"wheel":"mousewheel";Se.on("mousemove",function(Ye){Me.filter(function(yt){return Ye===yt}).call(i,ae)}).on(Ie,function(Ye){if(!Ye.scrollbarState.wheeling){Ye.scrollbarState.wheeling=!0;var yt=Ye.scrollY+b.event.deltaY,gt=Q(ae,Me,null,yt)(Ye);gt||(b.event.stopPropagation(),b.event.preventDefault()),Ye.scrollbarState.wheeling=!1}}).call(i,ae,!0)}Me.attr("transform",function(Ye){return r(Ye.size.l,Ye.size.t)});var Ve=Me.selectAll("."+p.cn.scrollBackground).data(l.repeat,l.keyFun);Ve.enter().append("rect").classed(p.cn.scrollBackground,!0).attr("fill","none"),Ve.attr("width",function(Ye){return Ye.width}).attr("height",function(Ye){return Ye.height}),Me.each(function(Ye){e.setClipUrl(b.select(this),h(ae,Ye),ae)});var Ge=Me.selectAll("."+p.cn.yColumn).data(function(Ye){return Ye.columns},l.keyFun);Ge.enter().append("g").classed(p.cn.yColumn,!0),Ge.exit().remove(),Ge.attr("transform",function(Ye){return r(Ye.x,0)}),xe&&Ge.call(b.behavior.drag().origin(function(Ye){var yt=b.select(this);return B(yt,Ye,-p.uplift),n(this),Ye.calcdata.columnDragInProgress=!0,i(Me.filter(function(gt){return Ye.calcdata.key===gt.key}),ae),Ye}).on("drag",function(Ye){var yt=b.select(this),gt=function($t){return(Ye===$t?b.event.x:$t.x)+$t.columnWidth/2};Ye.x=Math.max(-p.overdrag,Math.min(Ye.calcdata.width+p.overdrag-Ye.columnWidth,b.event.x));var Tt=g(Ge).filter(function($t){return $t.calcdata.key===Ye.calcdata.key}),At=Tt.sort(function($t,rr){return gt($t)-gt(rr)});At.forEach(function($t,rr){$t.xIndex=rr,$t.x=Ye===$t?$t.x:$t.xScale($t)}),Ge.filter(function($t){return Ye!==$t}).transition().ease(p.transitionEase).duration(p.transitionDuration).attr("transform",function($t){return r($t.x,0)}),yt.call(a).attr("transform",r(Ye.x,-p.uplift))}).on("dragend",function(Ye){var yt=b.select(this),gt=Ye.calcdata;Ye.x=Ye.xScale(Ye),Ye.calcdata.columnDragInProgress=!1,B(yt,Ye,0),O(ae,gt,gt.columns.map(function(Tt){return Tt.xIndex}))})),Ge.each(function(Ye){e.setClipUrl(b.select(this),v(ae,Ye),ae)});var ke=Ge.selectAll("."+p.cn.columnBlock).data(s.splitToPanels,l.keyFun);ke.enter().append("g").classed(p.cn.columnBlock,!0).attr("id",function(Ye){return Ye.key}),ke.style("cursor",function(Ye){return Ye.dragHandle?"ew-resize":Ye.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var _e=ke.filter(P),ce=ke.filter(F);xe&&ce.call(b.behavior.drag().origin(function(Ye){return b.event.stopPropagation(),Ye}).on("drag",Q(ae,Me,-1)).on("dragend",function(){})),w(ae,Me,_e,ke),w(ae,Me,ce,ke);var ve=Me.selectAll("."+p.cn.scrollAreaClip).data(l.repeat,l.keyFun);ve.enter().append("clipPath").classed(p.cn.scrollAreaClip,!0).attr("id",function(Ye){return h(ae,Ye)});var le=ve.selectAll("."+p.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);le.enter().append("rect").classed(p.cn.scrollAreaClipRect,!0).attr("x",-p.overdrag).attr("y",-p.uplift).attr("fill","none"),le.attr("width",function(Ye){return Ye.width+2*p.overdrag}).attr("height",function(Ye){return Ye.height+p.uplift});var Ae=Ge.selectAll("."+p.cn.columnBoundary).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(p.cn.columnBoundary,!0);var Be=Ge.selectAll("."+p.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Be.enter().append("clipPath").classed(p.cn.columnBoundaryClippath,!0),Be.attr("id",function(Ye){return v(ae,Ye)});var Xe=Be.selectAll("."+p.cn.columnBoundaryRect).data(l.repeat,l.keyFun);Xe.enter().append("rect").classed(p.cn.columnBoundaryRect,!0).attr("fill","none"),Xe.attr("width",function(Ye){return Ye.columnWidth+2*m(Ye)}).attr("height",function(Ye){return Ye.calcdata.height+2*m(Ye)+p.uplift}).attr("x",function(Ye){return-m(Ye)}).attr("y",function(Ye){return-m(Ye)}),$(null,ce,Me)};function m(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function h(ee,ae){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+ae.key}function v(ee,ae){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+ae.calcdata.key+"_"+ae.specIndex}function g(ee){return[].concat.apply([],ee.map(function(ae){return ae})).map(function(ae){return ae.__data__})}function i(ee,ae,he){function xe(Ge){var ke=Ge.rowBlocks;return K(ke,ke.length-1)+(ke.length?H(ke[ke.length-1],1/0):1)}var we=ee.selectAll("."+p.cn.scrollbarKit).data(l.repeat,l.keyFun);we.enter().append("g").classed(p.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),we.each(function(Ge){var ke=Ge.scrollbarState;ke.totalHeight=xe(Ge),ke.scrollableAreaHeight=Ge.groupHeight-j(Ge),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,p.goldenRatio*p.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:Ge.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(Ge){var ke=Ge.width+p.scrollbarWidth/2+p.scrollbarOffset;return r(ke,j(Ge))});var Me=we.selectAll("."+p.cn.scrollbar).data(l.repeat,l.keyFun);Me.enter().append("g").classed(p.cn.scrollbar,!0);var Se=Me.selectAll("."+p.cn.scrollbarSlider).data(l.repeat,l.keyFun);Se.enter().append("g").classed(p.cn.scrollbarSlider,!0),Se.attr("transform",function(Ge){return r(0,Ge.scrollbarState.topY||0)});var Ie=Se.selectAll("."+p.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ie.enter().append("line").classed(p.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",p.scrollbarWidth).attr("stroke-linecap","round").attr("y1",p.scrollbarWidth/2),Ie.attr("y2",function(Ge){return Ge.scrollbarState.barLength-p.scrollbarWidth/2}).attr("stroke-opacity",function(Ge){return Ge.columnDragInProgress||!Ge.scrollbarState.barWiggleRoom||he?0:.4}),Ie.transition().delay(0).duration(0),Ie.transition().delay(p.scrollbarHideDelay).duration(p.scrollbarHideDuration).attr("stroke-opacity",0);var Ve=Me.selectAll("."+p.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);Ve.enter().append("line").classed(p.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",p.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Ge){var ke=b.event.y,_e=this.getBoundingClientRect(),ce=Ge.scrollbarState,ve=ke-_e.top,le=b.scale.linear().domain([0,ce.scrollableAreaHeight]).range([0,ce.totalHeight]).clamp(!0);ce.topY<=ve&&ve<=ce.bottomY||Q(ae,ee,null,le(ve-ce.barLength/2))(Ge)}).call(b.behavior.drag().origin(function(Ge){return b.event.stopPropagation(),Ge.scrollbarState.scrollbarScrollInProgress=!0,Ge}).on("drag",Q(ae,ee)).on("dragend",function(){})),Ve.attr("y2",function(Ge){return Ge.scrollbarState.scrollableAreaHeight}),ae._context.staticPlot&&(Ie.remove(),Ve.remove())}function w(ee,ae,he,xe){var we=S(he),Me=M(we);f(Me);var Se=C(Me);A(Se);var Ie=T(Me),Ve=_(Ie);u(Ve),x(Ve,ae,xe,ee),X(Me)}function S(ee){var ae=ee.selectAll("."+p.cn.columnCells).data(l.repeat,l.keyFun);return ae.enter().append("g").classed(p.cn.columnCells,!0),ae.exit().remove(),ae}function M(ee){var ae=ee.selectAll("."+p.cn.columnCell).data(s.splitToCells,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.columnCell,!0),ae.exit().remove(),ae}function C(ee){var ae=ee.selectAll("."+p.cn.cellRect).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("rect").classed(p.cn.cellRect,!0),ae}function _(ee){var ae=ee.selectAll("."+p.cn.cellText).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("text").classed(p.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){b.event.stopPropagation()}),ae}function T(ee){var ae=ee.selectAll("."+p.cn.cellTextHolder).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ae}function f(ee){ee.each(function(ae,he){var xe=ae.calcdata.cells.font,we=ae.column.specIndex,Me={size:D(xe.size,we,he),color:D(xe.color,we,he),family:D(xe.family,we,he),weight:D(xe.weight,we,he),style:D(xe.style,we,he),variant:D(xe.variant,we,he),textcase:D(xe.textcase,we,he),lineposition:D(xe.lineposition,we,he),shadow:D(xe.shadow,we,he)};ae.rowNumber=ae.key,ae.align=D(ae.calcdata.cells.align,we,he),ae.cellBorderWidth=D(ae.calcdata.cells.line.width,we,he),ae.font=Me})}function u(ee){ee.each(function(ae){e.font(b.select(this),ae.font)})}function A(ee){ee.attr("width",function(ae){return ae.column.columnWidth}).attr("stroke-width",function(ae){return ae.cellBorderWidth}).each(function(ae){var he=b.select(this);c.stroke(he,D(ae.calcdata.cells.line.color,ae.column.specIndex,ae.rowNumber)),c.fill(he,D(ae.calcdata.cells.fill.color,ae.column.specIndex,ae.rowNumber))})}function x(ee,ae,he,xe){ee.text(function(we){var Me=we.column.specIndex,Se=we.rowNumber,Ie=we.value,Ve=typeof Ie=="string",Ge=Ve&&Ie.match(/
/i),ke=!Ve||Ge;we.mayHaveMarkup=Ve&&Ie.match(/[<&>]/);var _e=z(Ie);we.latex=_e;var ce=_e?"":D(we.calcdata.cells.prefix,Me,Se)||"",ve=_e?"":D(we.calcdata.cells.suffix,Me,Se)||"",le=_e?null:D(we.calcdata.cells.format,Me,Se)||null,Ae=ce+(le?k(le)(we.value):we.value)+ve,Be;we.wrappingNeeded=!we.wrapped&&!ke&&!_e&&(Be=I(Ae)),we.cellHeightMayIncrease=Ge||_e||we.mayHaveMarkup||(Be===void 0?I(Ae):Be),we.needsConvertToTspans=we.mayHaveMarkup||we.wrappingNeeded||we.latex;var Xe;if(we.wrappingNeeded){var Ye=p.wrapSplitCharacter===" "?Ae.replace(/we&&xe.push(Me),we+=Ve}return xe}function $(ee,ae,he){var xe=g(ae)[0];if(xe!==void 0){var we=xe.rowBlocks,Me=xe.calcdata,Se=K(we,we.length),Ie=xe.calcdata.groupHeight-j(xe),Ve=Me.scrollY=Math.max(0,Math.min(Se-Ie,Me.scrollY)),Ge=U(we,Ve,Ie);Ge.length===1&&(Ge[0]===we.length-1?Ge.unshift(Ge[0]-1):Ge.push(Ge[0]+1)),Ge[0]%2&&Ge.reverse(),ae.each(function(ke,_e){ke.page=Ge[_e],ke.scrollY=Ve}),ae.attr("transform",function(ke){var _e=K(ke.rowBlocks,ke.page)-ke.scrollY;return r(0,_e)}),ee&&(re(ee,he,ae,Ge,xe.prevPages,xe,0),re(ee,he,ae,Ge,xe.prevPages,xe,1),i(he,ee))}}function Q(ee,ae,he,xe){return function(Me){var Se=Me.calcdata?Me.calcdata:Me,Ie=ae.filter(function(_e){return Se.key===_e.key}),Ve=he||Se.scrollbarState.dragMultiplier,Ge=Se.scrollY;Se.scrollY=xe===void 0?Se.scrollY+Ve*b.event.dy:xe;var ke=Ie.selectAll("."+p.cn.yColumn).selectAll("."+p.cn.columnBlock).filter(F);return $(ee,ke,Ie),Se.scrollY===Ge}}function re(ee,ae,he,xe,we,Me,Se){var Ie=xe[Se]!==we[Se];Ie&&(clearTimeout(Me.currentRepaint[Se]),Me.currentRepaint[Se]=setTimeout(function(){var Ve=he.filter(function(Ge,ke){return ke===Se&&xe[ke]!==we[ke]});w(ee,ae,Ve,he),we[Se]=xe[Se]}))}function ne(ee,ae,he,xe){return function(){var Me=b.select(ae.parentNode);Me.each(function(Se){var Ie=Se.fragments;Me.selectAll("tspan.line").each(function(Ae,Be){Ie[Be].width=this.getComputedTextLength()});var Ve=Ie[Ie.length-1].width,Ge=Ie.slice(0,-1),ke=[],_e,ce,ve=0,le=Se.column.columnWidth-2*p.cellPad;for(Se.value="";Ge.length;)_e=Ge.shift(),ce=_e.width+Ve,ve+ce>le&&(Se.value+=ke.join(p.wrapSpacer)+p.lineBreaker,ke=[],ve=0),ke.push(_e.text),ve+=ce;ve&&(Se.value+=ke.join(p.wrapSpacer)),Se.wrapped=!0}),Me.selectAll("tspan.line").remove(),x(Me.select("."+p.cn.cellText),he,ee,xe),b.select(ae.parentNode.parentNode).call(X)}}function se(ee,ae,he,xe,we){return function(){if(!we.settledY){var Se=b.select(ae.parentNode),Ie=q(we),Ve=we.key-Ie.firstRowIndex,Ge=Ie.rows[Ve].rowHeight,ke=we.cellHeightMayIncrease?ae.parentNode.getBoundingClientRect().height+2*p.cellPad:Ge,_e=Math.max(ke,Ge),ce=_e-Ie.rows[Ve].rowHeight;ce&&(Ie.rows[Ve].rowHeight=_e,ee.selectAll("."+p.cn.columnCell).call(X),$(null,ee.filter(F),0),i(he,xe,!0)),Se.attr("transform",function(){var ve=this,le=ve.parentNode,Ae=le.getBoundingClientRect(),Be=b.select(ve.parentNode).select("."+p.cn.cellRect).node().getBoundingClientRect(),Xe=ve.transform.baseVal.consolidate(),Ye=Be.top-Ae.top+(Xe?Xe.matrix.f:p.cellPad);return r(G(we,b.select(ve.parentNode).select("."+p.cn.cellTextHolder).node().getBoundingClientRect().width),Ye)}),we.settledY=!0}}}function G(ee,ae){switch(ee.align){case"left":return p.cellPad;case"right":return ee.column.columnWidth-(ae||0)-p.cellPad;case"center":return(ee.column.columnWidth-(ae||0))/2;default:return p.cellPad}}function X(ee){ee.attr("transform",function(ae){var he=ae.rowBlocks[0].auxiliaryBlocks.reduce(function(Se,Ie){return Se+H(Ie,1/0)},0),xe=q(ae),we=H(xe,ae.key),Me=we+he;return r(0,Me)}).selectAll("."+p.cn.cellRect).attr("height",function(ae){return Z(q(ae),ae.key).rowHeight})}function K(ee,ae){for(var he=0,xe=ae-1;xe>=0;xe--)he+=Y(ee[xe]);return he}function H(ee,ae){for(var he=0,xe=0;xek.length&&(E=E.slice(0,k.length)):E=[],e=0;e90&&(h-=180,a=-a),{angle:h,flip:a,p:b.c2p(l,E,k),offsetMultplier:o}}}}),aG=ze({"src/traces/carpet/plot.js"(J,V){"use strict";var p=ci(),b=$i(),E=HM(),k=WM(),l=rG(),e=Cs(),t=Nr(),n=t.strRotate,r=t.strTranslate,a=dc();V.exports=function(w,S,M,C){var _=w._context.staticPlot,T=S.xaxis,f=S.yaxis,u=w._fullLayout,A=u._clips;t.makeTraceGroups(C,M,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace,D=O.aaxis,B=O.baxis,F=t.ensureSingle(z,"g","minorlayer"),P=t.ensureSingle(z,"g","majorlayer"),j=t.ensureSingle(z,"g","boundarylayer"),U=t.ensureSingle(z,"g","labellayer");z.style("opacity",O.opacity),s(T,f,P,D,"a",D._gridlines,!0,_),s(T,f,P,B,"b",B._gridlines,!0,_),s(T,f,F,D,"a",D._minorgridlines,!0,_),s(T,f,F,B,"b",B._minorgridlines,!0,_),s(T,f,j,D,"a-boundary",D._boundarylines,_),s(T,f,j,B,"b-boundary",B._boundarylines,_);var $=c(w,T,f,O,I,U,D._labels,"a-label"),Q=c(w,T,f,O,I,U,B._labels,"b-label");m(w,U,O,I,T,f,$,Q),o(O,I,A,T,f)})};function o(i,w,S,M,C){var _,T,f,u,A=S.select("#"+i._clipPathId);A.size()||(A=S.append("clipPath").classed("carpetclip",!0));var x=t.ensureSingle(A,"path","carpetboundary"),z=w.clipsegments,I=[];for(u=0;u0?"start":"end","data-notex":1}).call(b.font,z.font).text(z.text).call(e.convertToTspans,i),P=b.bBox(this);F.attr("transform",r(O.p[0],O.p[1])+n(O.angle)+r(z.axis.labelpadding*B,P.height*.3)),A=Math.max(A,P.width+z.axis.labelpadding)}),u.exit().remove(),x.maxExtent=A,x}function m(i,w,S,M,C,_,T,f){var u,A,x,z,I=t.aggNums(Math.min,null,S.a),O=t.aggNums(Math.max,null,S.a),D=t.aggNums(Math.min,null,S.b),B=t.aggNums(Math.max,null,S.b);u=.5*(I+O),A=D,x=S.ab2xy(u,A,!0),z=S.dxyda_rough(u,A),T.angle===void 0&&t.extendFlat(T,l(S,C,_,x,S.dxydb_rough(u,A))),g(i,w,S,M,x,z,S.aaxis,C,_,T,"a-title"),u=I,A=.5*(D+B),x=S.ab2xy(u,A,!0),z=S.dxydb_rough(u,A),f.angle===void 0&&t.extendFlat(f,l(S,C,_,x,S.dxyda_rough(u,A))),g(i,w,S,M,x,z,S.baxis,C,_,f,"b-title")}var h=a.LINE_SPACING,v=(1-a.MID_SHIFT)/h+1;function g(i,w,S,M,C,_,T,f,u,A,x){var z=[];T.title.text&&z.push(T.title.text);var I=w.selectAll("text."+x).data(z),O=A.maxExtent;I.enter().append("text").classed(x,!0),I.each(function(){var D=l(S,f,u,C,_);["start","both"].indexOf(T.showticklabels)===-1&&(O=0);var B=T.title.font.size;O+=B+T.title.offset;var F=A.angle+(A.flip<0?180:0),P=(F-D.angle+450)%360,j=P>90&&P<270,U=p.select(this);U.text(T.title.text).call(e.convertToTspans,i),j&&(O=(-e.lineCount(U)+v)*h*B-O),U.attr("transform",r(D.p[0],D.p[1])+n(D.angle)+r(0,O)).attr("text-anchor","middle").call(b.font,T.title.font)}),I.exit().remove()}}}),nG=ze({"src/traces/carpet/cheater_basis.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k){var l,e,t,n,r,a,o=[],s=p(b)?b.length:b,c=p(E)?E.length:E,m=p(b)?b:null,h=p(E)?E:null;m&&(t=(m.length-1)/(m[m.length-1]-m[0])/(s-1)),h&&(n=(h.length-1)/(h[h.length-1]-h[0])/(c-1));var v,g=1/0,i=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=E.length,n=0;n0&&(H=k.dxydi([],$-1,re,0,ne),ee.push(se[0]+H[0]/3),ae.push(se[1]+H[1]/3),Y=k.dxydi([],$-1,re,1,ne),ee.push(K[0]-Y[0]/3),ae.push(K[1]-Y[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;else for($=k.a2i(U),G=Math.floor(Math.max(0,Math.min(D-2,$))),X=$-G,he.length=D,he.crossLength=B,he.xy=function(xe){return k.evalxy([],$,xe)},he.dxy=function(xe,we){return k.dxydj([],G,xe,X,we)},Q=0;Q0&&(q=k.dxydj([],G,Q-1,X,0),ee.push(se[0]+q[0]/3),ae.push(se[1]+q[1]/3),Z=k.dxydj([],G,Q-1,X,1),ee.push(K[0]-Z[0]/3),ae.push(K[1]-Z[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;return he.axisLetter=l,he.axis=C,he.crossAxis=A,he.value=U,he.constvar=e,he.index=m,he.x=ee,he.y=ae,he.smoothing=A.smoothing,he}function j(U){var $,Q,re,ne,se,G=[],X=[],K={};if(K.length=M.length,K.crossLength=u.length,l==="b")for(re=Math.max(0,Math.min(B-2,U)),se=Math.min(1,Math.max(0,U-re)),K.xy=function(H){return k.evalxy([],H,U)},K.dxy=function(H,Y){return k.dxydi([],H,re,Y,se)},$=0;$M.length-1)&&_.push(b(j(n),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s;mM.length-1)&&!(g<0||g>M.length-1))for(i=M[r],w=M[g],t=0;tM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&f.push(b(j(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(j(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(a=5e-15,o=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+a)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+a))].sort(function(U,$){return U-$}),s=o[0],c=o[1],m=s;m<=c;m++)h=C.tick0+C.dtick*m,_.push(b(P(h),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s-1;mM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&f.push(b(P(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(P(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),sG=ze({"src/traces/carpet/calc_labels.js"(J,V){"use strict";var p=Gi(),b=Ki().extendFlat;V.exports=function(k,l){var e,t,n,r,a,o=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=b[c][e],n[s-e]=E[c][e];for(r.push({x:t,y:n,bicubic:a}),e=c,t=[],n=[];e>=0;e--)t[c-e]=b[e][0],n[c-e]=E[e][0];return r.push({x:t,y:n,bicubic:o}),r}}}),uG=ze({"src/traces/carpet/smooth_fill_2d_array.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k,l){var e,t,n,r=[],a=[],o=E[0].length,s=E.length;function c(Q,re){var ne=0,se,G=0;return Q>0&&(se=E[re][Q-1])!==void 0&&(G++,ne+=se),Q0&&(se=E[re-1][Q])!==void 0&&(G++,ne+=se),re0&&t0&&eu);return p.log("Smoother converged to",A,"after",z,"iterations"),E}}}),cG=ze({"src/traces/carpet/constants.js"(J,V){"use strict";V.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),fG=ze({"src/traces/carpet/catmull_rom.js"(J,V){"use strict";var p=.5;V.exports=function(E,k,l,e){var t=E[0]-k[0],n=E[1]-k[1],r=l[0]-k[0],a=l[1]-k[1],o=Math.pow(t*t+n*n,p/2),s=Math.pow(r*r+a*a,p/2),c=(s*s*t-o*o*r)*e,m=(s*s*n-o*o*a)*e,h=s*(o+s)*3,v=o*(o+s)*3;return[[k[0]+(h&&c/h),k[1]+(h&&m/h)],[k[0]-(v&&c/v),k[1]-(v&&m/v)]]}}}),hG=ze({"src/traces/carpet/compute_control_points.js"(J,V){"use strict";var p=fG(),b=Nr().ensureArray;function E(k,l,e){var t=-.5*e[0]+1.5*l[0],n=-.5*e[1]+1.5*l[1];return[(2*t+k[0])/3,(2*n+k[1])/3]}V.exports=function(l,e,t,n,r,a){var o,s,c,m,h,v,g,i,w,S,M=t[0].length,C=t.length,_=r?3*M-2:M,T=a?3*C-2:C;for(l=b(l,T),e=b(e,T),c=0;ch&&_g&&Tv||Ti},n.setScale=function(){var _=n._x,T=n._y,f=E(n._xctrl,n._yctrl,_,T,c.smoothing,m.smoothing);n._xctrl=f[0],n._yctrl=f[1],n.evalxy=k([n._xctrl,n._yctrl],o,s,c.smoothing,m.smoothing),n.dxydi=l([n._xctrl,n._yctrl],c.smoothing,m.smoothing),n.dxydj=e([n._xctrl,n._yctrl],c.smoothing,m.smoothing)},n.i2a=function(_){var T=Math.max(0,Math.floor(_[0]),o-2),f=_[0]-T;return(1-f)*r[T]+f*r[T+1]},n.j2b=function(_){var T=Math.max(0,Math.floor(_[1]),o-2),f=_[1]-T;return(1-f)*a[T]+f*a[T+1]},n.ij2ab=function(_){return[n.i2a(_[0]),n.j2b(_[1])]},n.a2i=function(_){var T=Math.max(0,Math.min(b(_,r),o-2)),f=r[T],u=r[T+1];return Math.max(0,Math.min(o-1,T+(_-f)/(u-f)))},n.b2j=function(_){var T=Math.max(0,Math.min(b(_,a),s-2)),f=a[T],u=a[T+1];return Math.max(0,Math.min(s-1,T+(_-f)/(u-f)))},n.ab2ij=function(_){return[n.a2i(_[0]),n.b2j(_[1])]},n.i2c=function(_,T){return n.evalxy([],_,T)},n.ab2xy=function(_,T,f){if(!f&&(_r[o-1]|Ta[s-1]))return[!1,!1];var u=n.a2i(_),A=n.b2j(T),x=n.evalxy([],u,A);if(f){var z=0,I=0,O=[],D,B,F,P;_r[o-1]?(D=o-2,B=1,z=(_-r[o-1])/(r[o-1]-r[o-2])):(D=Math.max(0,Math.min(o-2,Math.floor(u))),B=u-D),Ta[s-1]?(F=s-2,P=1,I=(T-a[s-1])/(a[s-1]-a[s-2])):(F=Math.max(0,Math.min(s-2,Math.floor(A))),P=A-F),z&&(n.dxydi(O,D,F,B,P),x[0]+=O[0]*z,x[1]+=O[1]*z),I&&(n.dxydj(O,D,F,B,P),x[0]+=O[0]*I,x[1]+=O[1]*I)}return x},n.c2p=function(_,T,f){return[T.c2p(_[0]),f.c2p(_[1])]},n.p2x=function(_,T,f){return[T.p2c(_[0]),f.p2c(_[1])]},n.dadi=function(_){var T=Math.max(0,Math.min(r.length-2,_));return r[T+1]-r[T]},n.dbdj=function(_){var T=Math.max(0,Math.min(a.length-2,_));return a[T+1]-a[T]},n.dxyda=function(_,T,f,u){var A=n.dxydi(null,_,T,f,u),x=n.dadi(_,f);return[A[0]/x,A[1]/x]},n.dxydb=function(_,T,f,u){var A=n.dxydj(null,_,T,f,u),x=n.dbdj(T,u);return[A[0]/x,A[1]/x]},n.dxyda_rough=function(_,T,f){var u=w*(f||.1),A=n.ab2xy(_+u,T,!0),x=n.ab2xy(_-u,T,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dxydb_rough=function(_,T,f){var u=S*(f||.1),A=n.ab2xy(_,T+u,!0),x=n.ab2xy(_,T-u,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dpdx=function(_){return _._m},n.dpdy=function(_){return _._m}}}}),gG=ze({"src/traces/carpet/calc.js"(J,V){"use strict";var p=Gi(),b=Nr().isArray1D,E=nG(),k=iG(),l=oG(),e=sG(),t=lG(),n=lb(),r=uG(),a=sb(),o=mG();V.exports=function(c,m){var h=p.getFromId(c,m.xaxis),v=p.getFromId(c,m.yaxis),g=m.aaxis,i=m.baxis,w=m.x,S=m.y,M=[];w&&b(w)&&M.push("x"),S&&b(S)&&M.push("y"),M.length&&a(m,g,i,"a","b",M);var C=m._a=m._a||m.a,_=m._b=m._b||m.b;w=m._x||m.x,S=m._y||m.y;var T={};if(m._cheater){var f=g.cheatertype==="index"?C.length:C,u=i.cheatertype==="index"?_.length:_;w=E(f,u,m.cheaterslope)}m._x=w=n(w),m._y=S=n(S),r(w,C,_),r(S,C,_),o(m),m.setScale();var A=k(w),x=k(S),z=.5*(A[1]-A[0]),I=.5*(A[1]+A[0]),O=.5*(x[1]-x[0]),D=.5*(x[1]+x[0]),B=1.3;return A=[I-z*B,I+z*B],x=[D-O*B,D+O*B],m._extremes[h._id]=p.findExtremes(h,A,{padded:!0}),m._extremes[v._id]=p.findExtremes(v,x,{padded:!0}),l(m,"a","b"),l(m,"b","a"),e(m,g),e(m,i),T.clipsegments=t(m._xctrl,m._yctrl,g,i),T.x=w,T.y=S,T.a=C,T.b=_,[T]}}}),yG=ze({"src/traces/carpet/index.js"(J,V){"use strict";V.exports={attributes:H2(),supplyDefaults:tG(),plot:aG(),calc:gG(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Du(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),_G=ze({"lib/carpet.js"(J,V){"use strict";V.exports=yG()}}),YM=ze({"src/traces/scattercarpet/attributes.js"(J,V){"use strict";var p=Bd(),b=su(),E=ws(),{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=qs(),n=Ki().extendFlat,r=b.marker,a=b.line,o=r.line;V.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:n({},b.mode,{dflt:"markers"}),text:n({},b.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:n({},b.hovertext,{}),line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:n({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:b.connectgaps,fill:n({},b.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:p(),marker:n({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:n({width:o.width,dash:o.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:n({},E.hoverinfo,{flags:["a","b","text","name"]}),hoveron:b.hoveron,hovertemplate:k(),hovertemplatefallback:e(),zorder:b.zorder}}}),xG=ze({"src/traces/scattercarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=YM();V.exports=function(o,s,c,m){function h(C,_){return p.coerce(o,s,r,C,_)}h("carpet"),s.xaxis="x",s.yaxis="y";var v=h("a"),g=h("b"),i=Math.min(v.length,g.length);if(!i){s.visible=!1;return}s._length=i,h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext");var w=i0?T=C.labelprefix.replace(/ = $/,""):T=C._hovertitle,i.push(T+": "+_.toFixed(3)+C.labelsuffix)}if(!h.hovertemplate){var S=m.hi||h.hoverinfo,M=S.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&w(v.aaxis,m.a),M.indexOf("b")!==-1&&w(v.baxis,m.b),i.push("y: "+r.yLabel),M.indexOf("text")!==-1&&b(m,h,i),r.extraText=i.join("
")}return n}}}),MG=ze({"src/traces/scattercarpet/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=l[e];return b.a=t.a,b.b=t.b,b.y=t.y,b}}}),SG=ze({"src/traces/scattercarpet/index.js"(J,V){"use strict";V.exports={attributes:YM(),supplyDefaults:xG(),colorbar:Of(),formatLabels:bG(),calc:wG(),plot:TG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:AG(),selectPoints:Yv(),eventData:MG(),moduleType:"trace",name:"scattercarpet",basePlotModule:Du(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),EG=ze({"lib/scattercarpet.js"(J,V){"use strict";V.exports=SG()}}),XM=ze({"src/traces/contourcarpet/attributes.js"(J,V){"use strict";var p=rg(),b=M1(),E=qs(),k=Ki().extendFlat,l=b.contours;V.exports=k({carpet:{valType:"string",editType:"calc"},z:p.z,a:p.x,a0:p.x0,da:p.dx,b:p.y,b0:p.y0,db:p.dy,text:p.text,hovertext:p.hovertext,transpose:p.transpose,atype:p.xtype,btype:p.ytype,fillcolor:b.fillcolor,autocontour:b.autocontour,ncontours:b.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:b.line.color,width:b.line.width,dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},zorder:b.zorder},E("",{cLetter:"z",autoColorDflt:!1}))}}),ZM=ze({"src/traces/contourcarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=ob(),E=XM(),k=hT(),l=xb(),e=bb();V.exports=function(n,r,a,o){function s(v,g){return p.coerce(n,r,E,v,g)}function c(v){return p.coerce2(n,r,E,v)}if(s("carpet"),n.a&&n.b){var m=b(n,r,s,o,"a","b");if(!m){r.visible=!1;return}s("text");var h=s("contours.type")==="constraint";h?k(n,r,s,o,a,{hasHover:!1}):(l(n,r,s,c),e(n,r,s,o,{hasHover:!1}))}else r._defaultColor=a,r._length=null;s("zorder")}}}),kG=ze({"src/traces/contourcarpet/calc.js"(J,V){"use strict";var p=Qf(),b=Nr(),E=sb(),k=lb(),l=ub(),e=cb(),t=$5(),n=ZM(),r=W2(),a=aT();V.exports=function(c,m){var h=m._carpetTrace=r(c,m);if(!(!h||!h.visible||h.visible==="legendonly")){if(!m.a||!m.b){var v=c.data[h.index],g=c.data[m.index];g.a||(g.a=v.a),g.b||(g.b=v.b),n(g,m,m._defaultColor,c._fullLayout)}var i=o(c,m);return a(m,m._z),i}};function o(s,c){var m=c._carpetTrace,h=m.aaxis,v=m.baxis,g,i,w,S,M,C,_;h._minDtick=0,v._minDtick=0,b.isArray1D(c.z)&&E(c,h,v,"a","b",["z"]),g=c._a=c._a||c.a,S=c._b=c._b||c.b,g=g?h.makeCalcdata(c,"_a"):[],S=S?v.makeCalcdata(c,"_b"):[],i=c.a0||0,w=c.da||1,M=c.b0||0,C=c.db||1,_=c._z=k(c._z||c.z,c.transpose),c._emptypoints=e(_),l(_,c._emptypoints);var T=b.maxRowLength(_),f=c.xtype==="scaled"?"":g,u=t(c,f,i,w,T,h),A=c.ytype==="scaled"?"":S,x=t(c,A,M,C,_.length,v),z={a:u,b:x,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&p(s,c,{vals:_,containerStr:"",cLetter:"z"}),[z]}}}),CG=ze({"src/traces/carpet/axis_aligned_line.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k,l){var e,t,n,r,a,o,s,c,m,h,v,g,i,w=p(k)?"a":"b",S=w==="a"?b.aaxis:b.baxis,M=S.smoothing,C=w==="a"?b.a2i:b.b2j,_=w==="a"?k:l,T=w==="a"?l:k,f=w==="a"?E.a.length:E.b.length,u=w==="a"?E.b.length:E.a.length,A=Math.floor(w==="a"?b.b2j(T):b.a2i(T)),x=w==="a"?function(re){return b.evalxy([],re,A)}:function(re){return b.evalxy([],A,re)};M&&(n=Math.max(0,Math.min(u-2,A)),r=A-n,t=w==="a"?function(re,ne){return b.dxydi([],re,n,ne,r)}:function(re,ne){return b.dxydj([],n,re,r,ne)});var z=C(_[0]),I=C(_[1]),O=z0?Math.floor:Math.ceil,F=O>0?Math.ceil:Math.floor,P=O>0?Math.min:Math.max,j=O>0?Math.max:Math.min,U=B(z+D),$=F(I-D);s=x(z);var Q=[[s]];for(e=U;e*O<$*O;e+=O)a=[],v=j(z,e),g=P(I,e+O),i=g-v,o=Math.max(0,Math.min(f-2,Math.floor(.5*(v+g)))),c=x(g),M&&(m=t(o,v-o),h=t(o,g-o),a.push([s[0]+m[0]/3*i,s[1]+m[1]/3*i]),a.push([c[0]-h[0]/3*i,c[1]-h[1]/3*i])),a.push(c),Q.push(a),s=c;return Q}}}),LG=ze({"src/traces/contourcarpet/plot.js"(J,V){"use strict";var p=ci(),b=HM(),E=WM(),k=$i(),l=Nr(),e=iT(),t=oT(),n=wb(),r=E1(),a=lT(),o=sT(),s=uT(),c=W2(),m=CG();V.exports=function(f,u,A,x){var z=u.xaxis,I=u.yaxis;l.makeTraceGroups(x,A,"contour").each(function(O){var D=p.select(this),B=O[0],F=B.trace,P=F._carpetTrace=c(f,F),j=f.calcdata[P.index][0];if(!P.visible||P.visible==="legendonly")return;var U=B.a,$=B.b,Q=F.contours,re=o(Q,u,B),ne=Q.type==="constraint",se=Q._operation,G=ne?se==="="?"lines":"fill":Q.coloring;function X(Me){var Se=P.ab2xy(Me[0],Me[1],!0);return[z.c2p(Se[0]),I.c2p(Se[1])]}var K=[[U[0],$[$.length-1]],[U[U.length-1],$[$.length-1]],[U[U.length-1],$[0]],[U[0],$[0]]];e(re);var H=(U[U.length-1]-U[0])*1e-8,Y=($[$.length-1]-$[0])*1e-8;t(re,H,Y);var q=re;Q.type==="constraint"&&(q=a(re,se)),h(re,X);var Z,ee,ae,he,xe=[];for(he=j.clipsegments.length-1;he>=0;he--)Z=j.clipsegments[he],ee=b([],Z.x,z.c2p),ae=b([],Z.y,I.c2p),ee.reverse(),ae.reverse(),xe.push(E(ee,ae,Z.bicubic));var we="M"+xe.join("L")+"Z";M(D,j.clipsegments,z,I,ne,G),C(F,D,z,I,q,K,X,P,j,G,we),v(D,re,f,B,Q,u,P),k.setClipUrl(D,P._clipPathId,f)})};function h(T,f){var u,A,x,z,I,O,D,B,F;for(u=0;ure&&(A.max=re),A.len=A.max-A.min}function i(T,f,u){var A=T.getPointAtLength(f),x=T.getPointAtLength(u),z=x.x-A.x,I=x.y-A.y,O=Math.sqrt(z*z+I*I);return[z/O,I/O]}function w(T){var f=Math.sqrt(T[0]*T[0]+T[1]*T[1]);return[T[0]/f,T[1]/f]}function S(T,f){var u=Math.abs(T[0]*f[0]+T[1]*f[1]),A=Math.sqrt(1-u*u);return A/u}function M(T,f,u,A,x,z){var I,O,D,B,F=l.ensureSingle(T,"g","contourbg"),P=F.selectAll("path").data(z==="fill"&&!x?[0]:[]);P.enter().append("path"),P.exit().remove();var j=[];for(B=0;B=0&&(U=ee,Q=re):Math.abs(j[1]-U[1])=0&&(U=ee,Q=re):l.log("endpt to newendpt is not vert. or horz.",j,U,ee)}if(Q>=0)break;B+=q(j,U),j=U}if(Q===f.edgepaths.length){l.log("unclosed perimeter path");break}D=Q,P=F.indexOf(D)===-1,P&&(D=F[0],B+=q(j,U)+"Z",j=null)}for(D=0;D_):C=O>x,_=O;var D=h(x,z,I,O);D.pos=A,D.yc=(x+O)/2,D.i=u,D.dir=C?"increasing":"decreasing",D.x=D.pos,D.y=[I,z],T&&(D.orig_p=s[u]),S&&(D.tx=o.text[u]),M&&(D.htx=o.hovertext[u]),f.push(D)}else f.push({pos:A,empty:!0})}return o._extremes[m._id]=E.findExtremes(m,p.concat(i,g),{padded:!0}),f.length&&(f[0].t={labels:{open:b(a,"open:")+" ",high:b(a,"high:")+" ",low:b(a,"low:")+" ",close:b(a,"close:")+" "}}),f}function r(a,o,s){var c=s._minDiff;if(!c){var m=a._fullData,h=[];c=1/0;var v;for(v=0;v"+w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat)):(I=b.extendFlat({},M),I.y0=I.y1=z,I.yLabelVal=x,I.yLabel=w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat),I.name="",S.push(I),f[x]=I)}return S}function o(s,c,m,h){var v=s.cd,g=s.ya,i=v[0].trace,w=v[0].t,S=r(s,c,m,h);if(!S)return[];var M=S.index,C=v[M],_=S.index=C.i,T=C.dir;function f(D){return w.labels[D]+p.hoverLabelText(g,i[D][_],i.yhoverformat)}var u=C.hi||i.hoverinfo||"",A=u.split("+"),x=u==="all",z=x||A.indexOf("y")!==-1,I=x||A.indexOf("text")!==-1,O=z?[f("open"),f("high"),f("low"),f("close")+" "+t[T]]:[];return I&&l(C,i,O),S.extraText=O.join("
"),S.y0=S.y1=g.c2p(C.yc,!0),[S]}V.exports={hoverPoints:n,hoverSplit:a,hoverOnPoints:o}}}),QM=ze({"src/traces/ohlc/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r=k[0].t.bPos||0;if(E===!1)for(n=0;nc?function(i){return i<=0}:function(i){return i>=0};r.c2g=function(i){var w=r.c2l(i)-s;return(g(w)?w:0)+v},r.g2c=function(i){return r.l2c(i+s-v)},r.g2p=function(i){return i*h},r.c2p=function(i){return r.g2p(r.c2g(i))}}}function e(r,a){return a==="degrees"?E(r):r}function t(r,a){return a==="degrees"?k(r):r}function n(r,a){var o=r.type;if(o==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(m,h){return e(s(m),h)},r.c2d=function(m,h){return c(t(m,h))}}r.makeCalcdata=function(m,h){var v=m[h],g=m._length,i,w,S=function(f){return r.d2c(f,m.thetaunit)};if(v)for(i=new Array(g),w=0;w0?f:1/0},C=E(S,M),_=p.mod(C+1,S.length);return[S[C],S[_]]}function h(w){return Math.abs(w)>1e-10?w:0}function v(w,S,M){S=S||0,M=M||0;for(var C=w.length,_=new Array(C),T=0;T0?1:0}function b(t){var n=t[0],r=t[1];if(!isFinite(n)||!isFinite(r))return[1,0];var a=(n+1)*(n+1)+r*r;return[(n*n+r*r-1)/a,2*r/a]}function E(t,n){var r=n[0],a=n[1];return[r*t.radius+t.cx,-a*t.radius+t.cy]}function k(t,n){return n*t.radius}function l(t,n,r,a){var o=E(t,b([r,n])),s=o[0],c=o[1],m=E(t,b([a,n])),h=m[0],v=m[1];if(n===0)return["M"+s+","+c,"L"+h+","+v].join(" ");var g=k(t,1/Math.abs(n));return["M"+s+","+c,"A"+g+","+g+" 0 0,"+(n<0?1:0)+" "+h+","+v].join(" ")}function e(t,n,r,a){var o=k(t,1/(n+1)),s=E(t,b([n,r])),c=s[0],m=s[1],h=E(t,b([n,a])),v=h[0],g=h[1];if(p(r)!==p(a)){var i=E(t,b([n,0])),w=i[0],S=i[1];return["M"+c+","+m,"A"+o+","+o+" 0 0,"+(0Ie?(Ve=ee,Ge=ee*Ie,ce=(ae-Ge)/K.h/2,ke=[q[0],q[1]],_e=[Z[0]+ce,Z[1]-ce]):(Ve=ae/Ie,Ge=ae,ce=(ee-Ve)/K.w/2,ke=[q[0]+ce,q[1]-ce],_e=[Z[0],Z[1]]),G.xLength2=Ve,G.yLength2=Ge,G.xDomain2=ke,G.yDomain2=_e;var ve=G.xOffset2=K.l+K.w*ke[0],le=G.yOffset2=K.t+K.h*(1-_e[1]),Ae=G.radius=Ve/we,Be=G.innerRadius=G.getHole(se)*Ae,Xe=G.cx=ve-Ae*xe[0],Ye=G.cy=le+Ae*xe[3],yt=G.cxx=Xe-ve,gt=G.cyy=Ye-le,Tt=H.side,At;Tt==="counterclockwise"?(At=Tt,Tt="top"):Tt==="clockwise"&&(At=Tt,Tt="bottom"),G.radialAxis=G.mockAxis(ne,se,H,{_id:"x",side:Tt,_trueSide:At,domain:[Be/K.w,Ae/K.w]}),G.angularAxis=G.mockAxis(ne,se,Y,{side:"right",domain:[0,Math.PI],autorange:!1}),G.doAutoRange(ne,se),G.updateAngularAxis(ne,se),G.updateRadialAxis(ne,se),G.updateRadialAxisTitle(ne,se),G.xaxis=G.mockCartesianAxis(ne,se,{_id:"x",domain:ke}),G.yaxis=G.mockCartesianAxis(ne,se,{_id:"y",domain:_e});var $t=G.pathSubplot();G.clipPaths.forTraces.select("path").attr("d",$t).attr("transform",l(yt,gt)),X.frontplot.attr("transform",l(ve,le)).call(t.setClipUrl,G._hasClipOnAxisFalse?null:G.clipIds.forTraces,G.gd),X.bg.attr("d",$t).attr("transform",l(Xe,Ye)).call(e.fill,se.bgcolor)},j.mockAxis=function(ne,se,G,X){var K=E.extendFlat({},G,X);return o(K,se,ne),K},j.mockCartesianAxis=function(ne,se,G){var X=this,K=X.isSmith,H=G._id,Y=E.extendFlat({type:"linear"},G);a(Y,ne);var q={x:[0,2],y:[1,3]};return Y.setRange=function(){var Z=X.sectorBBox,ee=q[H],ae=X.radialAxis._rl,he=(ae[1]-ae[0])/(1-X.getHole(se));Y.range=[Z[ee[0]]*he,Z[ee[1]]*he]},Y.isPtWithinRange=H==="x"&&!K?function(Z){return X.isPtInside(Z)}:function(){return!0},Y.setRange(),Y.setScale(),Y},j.doAutoRange=function(ne,se){var G=this,X=G.gd,K=G.radialAxis,H=G.getRadial(se);s(X,K);var Y=K.range;if(H.range=Y.slice(),H._input.range=Y.slice(),K._rl=[K.r2l(Y[0],null,"gregorian"),K.r2l(Y[1],null,"gregorian")],K.minallowed!==void 0){var q=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],q):K._rl[0]=Math.max(K._rl[0],q)}if(K.maxallowed!==void 0){var Z=K.r2l(K.maxallowed);K._rl[0]90&&ae<=270&&(he.tickangle=180);var Me=we?function(Ae){var Be=I(G,A([Ae.x,0]));return l(Be[0]-q,Be[1]-Z)}:function(Ae){return l(he.l2p(Ae.x)+Y,0)},Se=we?function(Ae){return z(G,Ae.x,-1/0,1/0)}:function(Ae){return G.pathArc(he.r2p(Ae.x)+Y)},Ie=U(ee);if(G.radialTickLayout!==Ie&&(K["radial-axis"].selectAll(".xtick").remove(),G.radialTickLayout=Ie),xe){he.setScale();var Ve=0,Ge=we?(he.tickvals||[]).filter(function(Ae){return Ae>=0}).map(function(Ae){return r.tickText(he,Ae,!0,!1)}):r.calcTicks(he),ke=we?Ge:r.clipEnds(he,Ge),_e=r.getTickSigns(he)[2];we&&((he.ticks==="top"&&he.side==="bottom"||he.ticks==="bottom"&&he.side==="top")&&(_e=-_e),he.ticks==="top"&&he.side==="top"&&(Ve=-he.ticklen),he.ticks==="bottom"&&he.side==="bottom"&&(Ve=he.ticklen)),r.drawTicks(X,he,{vals:Ge,layer:K["radial-axis"],path:r.makeTickPath(he,0,_e),transFn:Me,crisp:!1}),r.drawGrid(X,he,{vals:ke,layer:K["radial-grid"],path:Se,transFn:E.noop,crisp:!1}),r.drawLabels(X,he,{vals:Ge,layer:K["radial-axis"],transFn:Me,labelFns:r.makeLabelFns(he,Ve)})}var ce=G.radialAxisAngle=G.vangles?F(Q(B(ee.angle),G.vangles)):ee.angle,ve=l(q,Z),le=ve+k(-ce);re(K["radial-axis"],xe&&(ee.showticklabels||ee.ticks),{transform:le}),re(K["radial-grid"],xe&&ee.showgrid,{transform:we?"":ve}),re(K["radial-line"].select("line"),xe&&ee.showline,{x1:we?-H:Y,y1:0,x2:H,y2:0,transform:le}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateRadialAxisTitle=function(ne,se,G){if(!this.isSmith){var X=this,K=X.gd,H=X.radius,Y=X.cx,q=X.cy,Z=X.getRadial(se),ee=X.id+"title",ae=0;if(Z.title){var he=t.bBox(X.layers["radial-axis"].node()).height,xe=Z.title.font.size,we=Z.side;ae=we==="top"?xe:we==="counterclockwise"?-(he+xe*.4):he+xe*.8}var Me=G!==void 0?G:X.radialAxisAngle,Se=B(Me),Ie=Math.cos(Se),Ve=Math.sin(Se),Ge=Y+H/2*Ie+ae*Ve,ke=q-H/2*Ve+ae*Ie;X.layers["radial-axis-title"]=v.draw(K,ee,{propContainer:Z,propName:X.id+".radialaxis.title.text",placeholder:O(K,"Click to enter radial axis title"),attributes:{x:Ge,y:ke,"text-anchor":"middle"},transform:{rotate:-Me}})}},j.updateAngularAxis=function(ne,se){var G=this,X=G.gd,K=G.layers,H=G.radius,Y=G.innerRadius,q=G.cx,Z=G.cy,ee=G.getAngular(se),ae=G.angularAxis,he=G.isSmith;he||(G.fillViewInitialKey("angularaxis.rotation",ee.rotation),ae.setGeometry(),ae.setScale());var xe=he?function(Be){var Xe=I(G,A([0,Be.x]));return Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2}:function(Be){return ae.t2g(Be.x)};ae.type==="linear"&&ae.thetaunit==="radians"&&(ae.tick0=F(ae.tick0),ae.dtick=F(ae.dtick));var we=function(Be){return l(q+H*Math.cos(Be),Z-H*Math.sin(Be))},Me=he?function(Be){var Xe=I(G,A([0,Be.x]));return l(Xe[0],Xe[1])}:function(Be){return we(xe(Be))},Se=he?function(Be){var Xe=I(G,A([0,Be.x])),Ye=Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2;return l(Xe[0],Xe[1])+k(-F(Ye))}:function(Be){var Xe=xe(Be);return we(Xe)+k(-F(Xe))},Ie=he?function(Be){return x(G,Be.x,0,1/0)}:function(Be){var Xe=xe(Be),Ye=Math.cos(Xe),yt=Math.sin(Xe);return"M"+[q+Y*Ye,Z-Y*yt]+"L"+[q+H*Ye,Z-H*yt]},Ve=r.makeLabelFns(ae,0),Ge=Ve.labelStandoff,ke={};ke.xFn=function(Be){var Xe=xe(Be);return Math.cos(Xe)*Ge},ke.yFn=function(Be){var Xe=xe(Be),Ye=Math.sin(Xe)>0?.2:1;return-Math.sin(Xe)*(Ge+Be.fontSize*Ye)+Math.abs(Math.cos(Xe))*(Be.fontSize*_)},ke.anchorFn=function(Be){var Xe=xe(Be),Ye=Math.cos(Xe);return Math.abs(Ye)<.1?"middle":Ye>0?"start":"end"},ke.heightFn=function(Be,Xe,Ye){var yt=xe(Be);return-.5*(1+Math.sin(yt))*Ye};var _e=U(ee);G.angularTickLayout!==_e&&(K["angular-axis"].selectAll("."+ae._id+"tick").remove(),G.angularTickLayout=_e);var ce=he?[1/0].concat(ae.tickvals||[]).map(function(Be){return r.tickText(ae,Be,!0,!1)}):r.calcTicks(ae);he&&(ce[0].text="\u221E",ce[0].fontSize*=1.75);var ve;if(se.gridshape==="linear"?(ve=ce.map(xe),E.angleDelta(ve[0],ve[1])<0&&(ve=ve.slice().reverse())):ve=null,G.vangles=ve,ae.type==="category"&&(ce=ce.filter(function(Be){return E.isAngleInsideSector(xe(Be),G.sectorInRad)})),ae.visible){var le=ae.ticks==="inside"?-1:1,Ae=(ae.linewidth||1)/2;r.drawTicks(X,ae,{vals:ce,layer:K["angular-axis"],path:"M"+le*Ae+",0h"+le*ae.ticklen,transFn:Se,crisp:!1}),r.drawGrid(X,ae,{vals:ce,layer:K["angular-grid"],path:Ie,transFn:E.noop,crisp:!1}),r.drawLabels(X,ae,{vals:ce,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Me,labelFns:ke})}re(K["angular-line"].select("path"),ee.showline,{d:G.pathSubplot(),transform:l(q,Z)}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateFx=function(ne,se){if(!this.gd._context.staticPlot){var G=!this.isSmith;G&&(this.updateAngularDrag(ne),this.updateRadialDrag(ne,se,0),this.updateRadialDrag(ne,se,1)),this.updateHoverAndMainDrag(ne)}},j.updateHoverAndMainDrag=function(ne){var se=this,G=se.isSmith,X=se.gd,K=se.layers,H=ne._zoomlayer,Y=T.MINZOOM,q=T.OFFEDGE,Z=se.radius,ee=se.innerRadius,ae=se.cx,he=se.cy,xe=se.cxx,we=se.cyy,Me=se.sectorInRad,Se=se.vangles,Ie=se.radialAxis,Ve=f.clampTiny,Ge=f.findXYatLength,ke=f.findEnclosingVertexAngles,_e=T.cornerHalfWidth,ce=T.cornerLen/2,ve,le,Ae=c.makeDragger(K,"path","maindrag",ne.dragmode===!1?"none":"crosshair");p.select(Ae).attr("d",se.pathSubplot()).attr("transform",l(ae,he)),Ae.onmousemove=function(qt){h.hover(X,qt,se.id),X._fullLayout._lasthover=Ae,X._fullLayout._hoversubplot=se.id},Ae.onmouseout=function(qt){X._dragging||m.unhover(X,qt)};var Be={element:Ae,gd:X,subplot:se.id,plotinfo:{id:se.id,xaxis:se.xaxis,yaxis:se.yaxis},xaxes:[se.xaxis],yaxes:[se.yaxis]},Xe,Ye,yt,gt,Tt,At,$t,rr,_r;function Xt(qt,Vt){return Math.sqrt(qt*qt+Vt*Vt)}function or(qt,Vt){return Xt(qt-xe,Vt-we)}function Ot(qt,Vt){return Math.atan2(we-Vt,qt-xe)}function vt(qt,Vt){return[qt*Math.cos(Vt),qt*Math.sin(-Vt)]}function ht(qt,Vt){if(qt===0)return se.pathSector(2*_e);var Ht=ce/qt,Sr=Vt-Ht,Kr=Vt+Ht,Yt=Math.max(0,Math.min(qt,Z)),Rt=Yt-_e,nr=Yt+_e;return"M"+vt(Rt,Sr)+"A"+[Rt,Rt]+" 0,0,0 "+vt(Rt,Kr)+"L"+vt(nr,Kr)+"A"+[nr,nr]+" 0,0,1 "+vt(nr,Sr)+"Z"}function De(qt,Vt,Ht){if(qt===0)return se.pathSector(2*_e);var Sr=vt(qt,Vt),Kr=vt(qt,Ht),Yt=Ve((Sr[0]+Kr[0])/2),Rt=Ve((Sr[1]+Kr[1])/2),nr,ur;if(Yt&&Rt){var cr=Rt/Yt,Rr=-1/cr,Qr=Ge(_e,cr,Yt,Rt);nr=Ge(ce,Rr,Qr[0][0],Qr[0][1]),ur=Ge(ce,Rr,Qr[1][0],Qr[1][1])}else{var Zr,ha;Rt?(Zr=ce,ha=_e):(Zr=_e,ha=ce),nr=[[Yt-Zr,Rt-ha],[Yt+Zr,Rt-ha]],ur=[[Yt-Zr,Rt+ha],[Yt+Zr,Rt+ha]]}return"M"+nr.join("L")+"L"+ur.reverse().join("L")+"Z"}function Ne(){yt=null,gt=null,Tt=se.pathSubplot(),At=!1;var qt=X._fullLayout[se.id];$t=e.luminosity(qt.bgcolor),rr=c.makeZoombox(H,$t,ae,he,Tt),rr.attr("fill-rule","evenodd"),_r=c.makeCorners(H,ae,he),w(X)}function We(qt,Vt){return Vt=Math.max(Math.min(Vt,Z),ee),qtY?(qt-1&&qt===1&&i(Vt,X,[se.xaxis],[se.yaxis],se.id,Be),Ht.indexOf("event")>-1&&h.click(X,Vt,se.id)}Be.prepFn=function(qt,Vt,Ht){var Sr=X._fullLayout.dragmode,Kr=Ae.getBoundingClientRect();X._fullLayout._calcInverseTransform(X);var Yt=X._fullLayout._invTransform;ve=X._fullLayout._invScaleX,le=X._fullLayout._invScaleY;var Rt=E.apply3DTransform(Yt)(Vt-Kr.left,Ht-Kr.top);if(Xe=Rt[0],Ye=Rt[1],Se){var nr=f.findPolygonOffset(Z,Me[0],Me[1],Se);Xe+=xe+nr[0],Ye+=we+nr[1]}switch(Sr){case"zoom":Be.clickFn=Ct,G||(Se?Be.moveFn=Mt:Be.moveFn=Je,Be.doneFn=pt,Ne(qt,Vt,Ht));break;case"select":case"lasso":g(qt,Vt,Ht,Be,Sr);break}},m.init(Be)},j.updateRadialDrag=function(ne,se,G){var X=this,K=X.gd,H=X.layers,Y=X.radius,q=X.innerRadius,Z=X.cx,ee=X.cy,ae=X.radialAxis,he=T.radialDragBoxSize,xe=he/2;if(!ae.visible)return;var we=B(X.radialAxisAngle),Me=ae._rl,Se=Me[0],Ie=Me[1],Ve=Me[G],Ge=.75*(Me[1]-Me[0])/(1-X.getHole(se))/Y,ke,_e,ce;G?(ke=Z+(Y+xe)*Math.cos(we),_e=ee-(Y+xe)*Math.sin(we),ce="radialdrag"):(ke=Z+(q-xe)*Math.cos(we),_e=ee-(q-xe)*Math.sin(we),ce="radialdrag-inner");var ve=c.makeRectDragger(H,ce,"crosshair",-xe,-xe,he,he),le={element:ve,gd:K};ne.dragmode===!1&&(le.dragmode=!1),re(p.select(ve),ae.visible&&q0!=(G?Xe>Se:Xe=90||K>90&&H>=450?we=1:q<=0&&ee<=0?we=0:we=Math.max(q,ee),K<=180&&H>=180||K>180&&H>=540?ae=-1:Y>=0&&Z>=0?ae=0:ae=Math.min(Y,Z),K<=270&&H>=270||K>270&&H>=630?he=-1:q>=0&&ee>=0?he=0:he=Math.min(q,ee),H>=360?xe=1:Y<=0&&Z<=0?xe=0:xe=Math.max(Y,Z),[ae,he,xe,we]}function Q(ne,se){var G=function(K){return E.angleDist(ne,K)},X=E.findIndexOfMin(se,G);return se[X]}function re(ne,se,G){return se?(ne.attr("display",null),ne.attr(G)):ne&&ne.attr("display","none"),ne}}}),n4=ze({"src/plots/polar/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,ticklabelstep:b.ticklabelstep,showticklabels:b.showticklabels,labelalias:b.labelalias,minorloglabels:b.minorloglabels,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickfont:b.tickfont,tickangle:b.tickangle,tickformat:b.tickformat,tickformatstops:b.tickformatstops,layer:b.layer},"plot","from-root"),n={visible:k({},b.visible,{dflt:!0}),type:k({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},autorange:k({},b.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:k({},b.minallowed,{editType:"plot"}),maxallowed:k({},b.maxallowed,{editType:"plot"}),range:k({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:b.categoryorder,categoryarray:b.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:b.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:k({},b.title.text,{editType:"plot",dflt:""}),font:k({},b.title.font,{editType:"plot"}),editType:"plot"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(n,e,t);var r={visible:k({},b.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:b.autotypenumbers,categoryorder:b.categoryorder,categoryarray:b.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:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(r,e,t),V.exports={domain:E({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:p.background},radialaxis:n,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),qG=ze({"src/plots/polar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=Uv(),t=Ym(),n=ov(),r=sv(),a=Hx(),o=g1(),s=Jw(),c=Xm(),m=n4(),h=t4(),v=X2(),g=v.axisNames;function i(S,M,C,_){var T=C("bgcolor");_.bgColor=b.combine(T,_.paper_bgcolor);var f=C("sector");C("hole");var u=l(_.fullData,v.name,_.id),A=_.layoutOut,x;function z(xe,we){return C(x+"."+xe,we)}for(var I=0;I")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),HG=ze({"src/traces/scatterpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:$2(),categories:["polar","symbols","showLegend","scatter-like"],attributes:uy(),supplyDefaults:K2().supplyDefaults,colorbar:Of(),formatLabels:J2(),calc:VG(),plot:GG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:Q2().hoverPoints,selectPoints:Yv(),meta:{}}}}),WG=ze({"lib/scatterpolar.js"(J,V){"use strict";V.exports=HG()}}),i4=ze({"src/traces/scatterpolargl/attributes.js"(J,V){"use strict";var p=uy(),{cliponaxis:b,hoveron:E}=p,k=Lo(p,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:n},fill:r,fillcolor:a,marker:o,textfont:s,textposition:c}=ty();V.exports=lo(Li({},k),{connectgaps:l,fill:r,fillcolor:a,line:{color:e,dash:t,editType:"calc",width:n},marker:o,textfont:s,textposition:c})}}),YG=ze({"src/traces/scatterpolargl/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=K2().handleRThetaDefaults,k=id(),l=_d(),e=xd(),t=Od(),n=zd().PTS_LINESONLY,r=i4();V.exports=function(o,s,c,m){function h(g,i){return p.coerce(o,s,r,g,i)}var v=E(o,s,m,h);if(!v){s.visible=!1;return}h("thetaunit"),h("mode",v=t&&(_.marker.cluster=w.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=A),_.line&&A.length>1&&e.extendFlat(_.line,l.linePositions(a,i,A)),_.text&&(e.extendFlat(_.text,{positions:A},l.textPosition(a,i,_.text,_.marker)),e.extendFlat(_.textSel,{positions:A},l.textPosition(a,i,_.text,_.markerSel)),e.extendFlat(_.textUnsel,{positions:A},l.textPosition(a,i,_.text,_.markerUnsel))),_.fill&&!h.fill2d&&(h.fill2d=!0),_.marker&&!h.scatter2d&&(h.scatter2d=!0),_.line&&!h.line2d&&(h.line2d=!0),_.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(_.line),h.fillOptions.push(_.fill),h.markerOptions.push(_.marker),h.markerSelectedOptions.push(_.markerSel),h.markerUnselectedOptions.push(_.markerUnsel),h.textOptions.push(_.text),h.textSelectedOptions.push(_.textSel),h.textUnselectedOptions.push(_.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),w.x=x,w.y=z,w.rawx=x,w.rawy=z,w.r=M,w.theta=C,w.positions=A,w._scene=h,w.index=h.count,h.count++}}),E(a,o,s)}},V.exports.reglPrecompiled=n}}),QG=ze({"src/traces/scatterpolargl/index.js"(J,V){"use strict";var p=KG();p.plot=JG(),V.exports=p}}),eH=ze({"lib/scatterpolargl.js"(J,V){"use strict";V.exports=QG()}}),o4=ze({"src/traces/barpolar/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,templatefallbackAttrs:b}=xs(),E=Ki().extendFlat,k=uy(),l=jd();V.exports={r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,base:E({},l.base,{}),offset:E({},l.offset,{}),width:E({},l.width,{}),text:E({},l.text,{}),hovertext:E({},l.hovertext,{}),marker:e(),hoverinfo:k.hoverinfo,hovertemplate:p(),hovertemplatefallback:b(),selected:l.selected,unselected:l.unselected};function e(){var t=E({},l.marker);return delete t.cornerradius,t}}}),s4=ze({"src/traces/barpolar/layout_attributes.js"(J,V){"use strict";V.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),tH=ze({"src/traces/barpolar/defaults.js"(J,V){"use strict";var p=Nr(),b=K2().handleRThetaDefaults,E=eb(),k=o4();V.exports=function(e,t,n,r){function a(s,c){return p.coerce(e,t,k,s,c)}var o=b(e,t,r,a);if(!o){t.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),E(e,t,a,n,r),p.coerceSelectionMarkerOpacity(t,a)}}}),rH=ze({"src/traces/barpolar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=s4();V.exports=function(E,k,l){var e={},t;function n(o,s){return p.coerce(E[t]||{},k[t],b,o,s)}for(var r=0;r0?(m=s,h=c):(m=c,h=s);var v=l.findEnclosingVertexAngles(m,t.vangles)[0],g=l.findEnclosingVertexAngles(h,t.vangles)[1],i=[v,(m+h)/2,g];return l.pathPolygonAnnulus(a,o,m,h,i,n,r)}:function(a,o,s,c){return E.pathAnnulus(a,o,s,c,n,r)}}}}),nH=ze({"src/traces/barpolar/hover.js"(J,V){"use strict";var p=Zl(),b=Nr(),E=eg().getTraceColor,k=b.fillText,l=Q2().makeHoverPointText,e=Z2().isPtInsidePolygon;V.exports=function(n,r,a){var o=n.cd,s=o[0].trace,c=n.subplot,m=c.radialAxis,h=c.angularAxis,v=c.vangles,g=v?e:b.isPtInsideSector,i=n.maxHoverDistance,w=h._period||2*Math.PI,S=Math.abs(m.g2p(Math.sqrt(r*r+a*a))),M=Math.atan2(a,r);m.range[0]>m.range[1]&&(M+=Math.PI);var C=function(u){return g(S,M,[u.rp0,u.rp1],[u.thetag0,u.thetag1],v)?i+Math.min(1,Math.abs(u.thetag1-u.thetag0)/w)-1+(u.rp1-S)/(u.rp1-u.rp0)-1:1/0};if(p.getClosest(o,C,n),n.index!==!1){var _=n.index,T=o[_];n.x0=n.x1=T.ct[0],n.y0=n.y1=T.ct[1];var f=b.extendFlat({},T,{r:T.s,theta:T.p});return k(T,s,n),l(f,s,c,n),n.hovertemplate=s.hovertemplate,n.color=E(s,T),n.xLabelVal=n.yLabelVal=void 0,T.s<0&&(n.idealAlign="left"),[n]}}}}),iH=ze({"src/traces/barpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"barpolar",basePlotModule:$2(),categories:["polar","bar","showLegend"],attributes:o4(),layoutAttributes:s4(),supplyDefaults:tH(),supplyLayoutDefaults:rH(),calc:l4().calc,crossTraceCalc:l4().crossTraceCalc,plot:aH(),colorbar:Of(),formatLabels:J2(),style:ld().style,styleOnSelect:ld().styleOnSelect,hoverPoints:nH(),selectPoints:tg(),meta:{}}}}),oH=ze({"lib/barpolar.js"(J,V){"use strict";V.exports=iH()}}),u4=ze({"src/plots/smith/constants.js"(J,V){"use strict";V.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),c4=ze({"src/plots/smith/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({ticklen:b.ticklen,tickwidth:k({},b.tickwidth,{dflt:2}),tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,tickfont:b.tickfont,tickformat:b.tickformat,hoverformat:b.hoverformat,layer:b.layer},"plot","from-root"),n=k({visible:k({},b.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:k({},b.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=k({visible:k({},b.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:b.ticks,editType:"calc"},e,t);V.exports={domain:E({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:p.background},realaxis:n,imaginaryaxis:r,editType:"calc"}}}),sH=ze({"src/plots/smith/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=sv(),t=ov(),n=g1(),r=Dd(),a=c4(),o=u4(),s=o.axisNames,c=h(function(v){return p.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(g){return-g}).concat([0]).concat(v)},String);function m(v,g,i,w){var S=i("bgcolor");w.bgColor=b.combine(S,w.paper_bgcolor);var M=l(w.fullData,o.name,w.id),C=w.layoutOut,_;function T(U,$){return i(_+"."+U,$)}for(var f=0;f")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),pH=ze({"src/traces/scattersmith/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scattersmith",basePlotModule:lH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:f4(),supplyDefaults:uH(),colorbar:Of(),formatLabels:cH(),calc:fH(),plot:hH(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:dH().hoverPoints,selectPoints:Yv(),meta:{}}}}),vH=ze({"lib/scattersmith.js"(J,V){"use strict";V.exports=pH()}}),h4=ze({"src/traces/quiver/attributes.js"(J,V){"use strict";var p=ws(),b=xs().hovertemplateAttrs,E=Il().axisHoverFormat,k=Ki().extendFlat,l=qs(),e=Uc().dash,t=fv(),n=su(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:n.x0,dx:n.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:n.y0,dy:n.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:E("x"),yhoverformat:E("y"),uhoverformat:E("u","noDate"),vhoverformat:E("v","noDate"),hoverinfo:k({},p.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:b({},{keys:["x","y","u","v","text","name"]}),text:n.text,textposition:n.textposition,textfont:n.textfont,marker:k({arrowsize:k({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};V.exports=r}}),mH=ze({"src/traces/quiver/defaults.js"(J,V){"use strict";var p=Nr(),b=h4(),E=Gv(),k=Bf().hasColorscale,l=qc();V.exports=function(t,n,r,a){function o(S,M){return p.coerce(t,n,b,S,M)}var s=E(t,n,a,o);if(!s){n.visible=!1;return}var c=o("u"),m=o("v");if(!p.isArrayOrTypedArray(c)||c.length===0){n.u=new Array(s);for(var h=0;hO&&(O=c[Q]),m[Q]B&&(B=m[Q]),GP&&(P=G),XU&&(U=X);var K=Math.sqrt(G*G+X*X);if(K>i&&(i=K),KS&&(S=H))}}else re.x=k,re.y=k}if(a._maxNorm=i,u==="scaled"||A==="paper"){let Me=O-I,Se=B-D;var Y;Me===0&&Se===0?Y=1:Y=(Me+Se+Math.sqrt((Me-Se)*(Me-Se)+4*$*Me*Se))/(2*($-1)),Y*=t,a._scaleFactor=Y/a._maxNorm}else a._scaleFactor=1;a._scaleFactor*=a.lengthfactor;let q=new Array(h),Z=new Array(h),ee=new Array(h),ae=new Array(h);for(var he,xe,Q=0;Qm.i&&isFinite(h[m.i]))v=h[m.i];else{var g=o.u&&o.u[m.i]||0,i=o.v&&o.v[m.i]||0;v=Math.sqrt(g*g+i*i)}return c(v)})}function t(a){var o=p.select(a).selectAll("g.trace.quiver");o.each(function(s){r(a,s,p.select(this))})}function n(a,o,s){r(a,o,s)}function r(a,o,s){var c=o[0].trace,m=c.marker||{},h=m.line||{},v=b.isArrayOrTypedArray(m.color)?void 0:m.color,g=c._hasColorscale;if(s)if(c.selectedpoints){var i=(c.selected||{}).marker||{},w=(c.unselected||{}).marker||{},S=i.line||{},M=w.line||{};s.selectAll("path.js-line").each(function(_){var T=p.select(this),f=!_.selected,u=f?w.color:i.color,A=f?M.width!==void 0?M.width:h.width:S.width!==void 0?S.width:h.width;u?(E.lineGroupStyle(T,A,u,h.dash),T.style("stroke-opacity",1)):(E.lineGroupStyle(T,A,v,h.dash),g&&e(T,c),T.style("stroke-opacity",f?l:1))}),E.selectedTextStyle(s.selectAll("text"),c)}else{var C=s.selectAll("path.js-line");C.call(E.lineGroupStyle,h.width,v,h.dash),g&&e(C,c),C.style("stroke-opacity",1),E.textPointStyle(s.selectAll("text"),c,a)}}V.exports={style:t,styleOnSelect:n,colorscaleStroke:e}}}),_H=ze({"src/traces/quiver/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=$i(),k=e3().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,n=.7;V.exports=function(o,s,c,m,h,v){var g,i,w=!h,S=!!h&&h.duration>0;if(g=m.selectAll("g.trace").data(c,function(C){return C[0].trace.uid}),g.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),g.order(),S){v&&(i=v());var M=p.transition().duration(h.duration).ease(h.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()});M.each(function(){m.selectAll("g.trace").each(function(C,_){r(o,_,s,C,c,this,h)})})}else g.each(function(C,_){r(o,_,s,C,c,this,h)});w&&g.exit().remove()};function r(a,o,s,c,m,h,v){var g=c[0].trace,i=s.xaxis,w=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=p.select(h);var S=p.select(h).selectAll("g.lines").data([c]);S.enter().append("g").classed("lines",!0),E.setClipUrl(S,s.layerClipId,a);var M=S.selectAll("path.js-line").data(c);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:_=0,arrowref:T}=g,f=T==="paper"?g._scaleFactor*Math.sqrt(Math.abs(i._m*w._m)):g._scaleFactor,u=g.marker.arrowsize;M.each(function(B){let F=p.select(this);if(B.x===void 0||B.y===void 0){F.attr("d",null);return}let P=(T==="paper"?B._u*Math.sign(i._m):p.round(i._m*B._u))*f,j=(T==="paper"?B._v*Math.sign(w._m):p.round(w._m*B._v))*f,U=(g._input.marker||{}).arrowsize!==void 0;var $,Q,re,ne;C==="tip"?($=i.c2p(B.x)-P,re=w.c2p(B.y)-j,Q=i.c2p(B.x),ne=w.c2p(B.y)):C==="center"?($=i.c2p(B.x)-P/2,re=w.c2p(B.y)-j/2,Q=i.c2p(B.x)+P/2,ne=w.c2p(B.y)+j/2):($=i.c2p(B.x),re=w.c2p(B.y),Q=i.c2p(B.x)+P,ne=w.c2p(B.y)+j),B._px0=$,B._py0=re,B._px1=Q,B._py1=ne;var se=g.marker.line.width;U||(se=Math.max(se,t));let G=Math.sqrt((Q-$)*(Q-$)+(ne-re)*(ne-re)),X=n*G,K=Math.min(e*u*se,X),H=Math.atan2(ne-re,Q-$),Y=Q-K*Math.cos(H-l),q=ne-K*Math.sin(H-l),Z=Q-K*Math.cos(H+l),ee=ne-K*Math.sin(H+l),ae="M"+$+","+re+"L"+Q+","+ne+"L"+Y+","+q+"L"+Q+","+ne+"L"+Z+","+ee;F.attr("d",ae)});var A=g.marker||{},x=A.line||{},z=b.isArrayOrTypedArray(A.color)?void 0:A.color;E.lineGroupStyle(M,x.width,z,x.dash),g._hasColorscale&&k(M,g);var I=p.select(h).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),E.setClipUrl(I,s.layerClipId,a);var O=I.selectAll("g.textpoint").data(c);if(O.enter().append("g").classed("textpoint",!0).append("text"),O.exit().remove(),O.each(function(B){var F=p.select(this),P=E.translatePoint(B,F.select("text"),i,w);P||F.remove()}),O.selectAll("text").call(E.textPointStyle,g,a).each(function(B){var F=i.c2p(B.x),P=w.c2p(B.y);p.select(this).selectAll("tspan.line").each(function(){p.select(this).attr({x:F,y:P})})}),v&&v.duration>0){var D=p.transition().duration(v.duration).ease(v.easing);M.transition(D).style("opacity",1)}}}}),xH=ze({"src/traces/quiver/hover.js"(J,V){"use strict";var p=Nr(),b=Zl(),E=Jm();function k(l,e,t,n,r,a){let o=r-t,s=a-n,c=o*o+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-n)*(e-n));var m=((l-t)*o+(e-n)*s)/c;m=Math.max(0,Math.min(1,m));let h=t+m*o,v=n+m*s;return Math.sqrt((l-h)*(l-h)+(e-v)*(e-v))}V.exports=function(e,t,n,r){var a=e.cd,o=a[0].trace,s=e.xa,c=e.ya,m=s.c2p(t),h=c.c2p(n),v=function(T){return T._px0===void 0?1/0:k(m,h,T._px0,T._py0,T._px1,T._py1)};if(b.getClosest(a,v,e),e.index!==!1){var g=a[e.index],i=s.c2p(g.x,!0),w=c.c2p(g.y,!0),S=Math.sqrt((m-i)*(m-i)+(h-w)*(h-w));e.index=g.i;var M=o.u?o.u[g.i]:0,C=o.v?o.v[g.i]:0,_="u: "+M+", v: "+C;return p.extendFlat(e,{color:E(o,g),x0:i-3,x1:i+3,xLabelVal:g.x,y0:w-3,y1:w+3,yLabelVal:g.y,uLabelVal:M,vLabelVal:C,extraText:_,spikeDistance:S,hovertemplate:o.hovertemplate}),p.fillText(g,o,e),[e]}}}}),bH=ze({"src/traces/quiver/format_labels.js"(J,V){"use strict";var p=Gi(),b=Nr();V.exports=function(k,l,e){var t={},n={_fullLayout:e},r=p.getFromTrace(n,l,"x"),a=p.getFromTrace(n,l,"y"),o=k.x,s=k.y;t.xLabel=p.tickText(r,r.c2l(o),!0).text,t.yLabel=p.tickText(a,a.c2l(s),!0).text;var c=l.u?l.u[k.i]:0,m=l.v?l.v[k.i]:0,h=l.uhoverformat,v=l.vhoverformat;return t.uLabel=h?b.numberFormat(h)(c):String(c),t.vLabel=v?b.numberFormat(v)(m):String(m),t}}}),wH=ze({"src/traces/quiver/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){return b.x=E.x,b.y=E.y,b.u=k.u?k.u[e]:void 0,b.v=k.v?k.v[e]:void 0,b}}}),TH=ze({"src/traces/quiver/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"quiver",basePlotModule:Du(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:h4(),supplyDefaults:mH(),calc:gH(),crossTraceCalc:yH(),plot:_H(),style:e3().style,styleOnSelect:e3().styleOnSelect,hoverPoints:xH(),formatLabels:bH(),eventData:wH(),selectPoints:Yv(),colorbar:Of(),animatable:!0,meta:{}}}}),AH=ze({"lib/quiver.js"(J,V){"use strict";V.exports=TH()}}),th=ze({"node_modules/world-calendars/dist/main.js"(J,V){var p=Vc();function b(){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={}}p(b.prototype,{instance:function(n,r){n=(n||"gregorian").toLowerCase(),r=r||"";var a=this._localCals[n+"-"+r];if(!a&&this.calendars[n]&&(a=new this.calendars[n](r),this._localCals[n+"-"+r]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,n);return a},newDate:function(n,r,a,o,s){return o=(n!=null&&n.year?n.calendar():typeof o=="string"?this.instance(o,s):o)||this.instance(),o.newDate(n,r,a)},substituteDigits:function(n){return function(r){return(r+"").replace(/[0-9]/g,function(a){return n[a]})}},substituteChineseDigits:function(n,r){return function(a){for(var o="",s=0;a>0;){var c=a%10;o=(c===0?"":n[c]+r[s])+o,s++,a=Math.floor(a/10)}return o.indexOf(n[1]+r[1])===0&&(o=o.substr(1)),o||n[0]}}});function E(n,r,a,o){if(this._calendar=n,this._year=r,this._month=a,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function k(n,r){return n=""+n,"000000".substring(0,r-n.length)+n}p(E.prototype,{newDate:function(n,r,a){return this._calendar.newDate(n??this,r,a)},year:function(n){return arguments.length===0?this._year:this.set(n,"y")},month:function(n){return arguments.length===0?this._month:this.set(n,"m")},day:function(n){return arguments.length===0?this._day:this.set(n,"d")},date:function(n,r,a){if(!this._calendar.isValid(n,r,a))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=n,this._month=r,this._day=a,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(n,r){return this._calendar.add(this,n,r)},set:function(n,r){return this._calendar.set(this,n,r)},compareTo:function(n){if(this._calendar.name!==n._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,n._calendar.local.name);var r=this._year!==n._year?this._year-n._year:this._month!==n._month?this.monthOfYear()-n.monthOfYear():this._day-n._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(n){return this._calendar.fromJD(n)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(n){return this._calendar.fromJSDate(n)},toString:function(){return(this.year()<0?"-":"")+k(Math.abs(this.year()),4)+"-"+k(this.month(),2)+"-"+k(this.day(),2)}});function l(){this.shortYearCutoff="+10"}p(l.prototype,{_validateLevel:0,newDate:function(n,r,a){return n==null?this.today():(n.year&&(this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),a=n.day(),r=n.month(),n=n.year()),new E(this,n,r,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+k(Math.abs(r.year()),4)},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(n,r){var a=this._validate(n,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(n,r){var a=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(n)+this.minMonth;return this._validate(n,a,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),a},daysInYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(n,r,a){return this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(n,r,a){return this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(n,this._add(n,r,a),r,a)},_add:function(n,r,a){if(this._validateLevel++,a==="d"||a==="w"){var o=n.toJD()+r*(a==="w"?this.daysInWeek():1),s=n.calendar().fromJD(o);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=n.year()+(a==="y"?r:0),m=n.monthOfYear()+(a==="m"?r:0),s=n.day(),h=function(i){for(;mw-1+i.minMonth;)c++,m-=w,w=i.monthsInYear(c)};a==="y"?(n.month()!==this.fromMonthOfYear(c,m)&&(m=this.newDate(c,n.month(),this.minDay).monthOfYear()),m=Math.min(m,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m)))):a==="m"&&(h(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m))));var v=[c,this.fromMonthOfYear(c,m),s];return this._validateLevel--,v}catch(g){throw this._validateLevel--,g}},_correctAdd:function(n,r,a,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(r[0]===0||n.year()>0!=r[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"]}[o],c=a<0?-1:1;r=this._add(n,a*s[0]+c*s[1],s[2])}return n.date(r[0],r[1],r[2])},set:function(n,r,a){this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var o=a==="y"?r:n.year(),s=a==="m"?r:n.month(),c=a==="d"?r:n.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(o,s))),n.date(o,s,c)},isValid:function(n,r,a){this._validateLevel++;var o=this.hasYearZero||n!==0;if(o){var s=this.newDate(n,r,this.minDay);o=r>=this.minMonth&&r-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),g=s-(v>2.5?4716:4715);return g<=0&&g--,this.newDate(g,v,h)},toJSDate:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(o.year(),o.month()-1,o.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(n){return this.newDate(n.getFullYear(),n.getMonth()+1,n.getDate())}});var t=V.exports=new b;t.cdate=E,t.baseCalendar=l,t.calendars.gregorian=e}}),MH=ze({"node_modules/world-calendars/dist/plus.js"(){var J=Vc(),V=th();J(V.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),V.local=V.regionalOptions[""],J(V.cdate.prototype,{formatDate:function(p,b){return typeof p!="string"&&(b=p,p=""),this._calendar.formatDate(p||"",this,b)}}),J(V.baseCalendar.prototype,{UNIX_EPOCH:V.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:V.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(p,b,E){if(typeof p!="string"&&(E=b,b=p,p=""),!b)return"";if(b.calendar()!==this)throw V.local.invalidFormat||V.regionalOptions[""].invalidFormat;p=p||this.local.dateFormat,E=E||{};for(var k=E.dayNamesShort||this.local.dayNamesShort,l=E.dayNames||this.local.dayNames,e=E.monthNumbers||this.local.monthNumbers,t=E.monthNamesShort||this.local.monthNamesShort,n=E.monthNames||this.local.monthNames,r=E.calculateWeek||this.local.calculateWeek,a=function(M,C){for(var _=1;S+_1},o=function(M,C,_,T){var f=""+C;if(a(M,T))for(;f.length<_;)f="0"+f;return f},s=function(M,C,_,T){return a(M)?T[C]:_[C]},c=this,m=function(M){return typeof e=="function"?e.call(c,M,a("m")):g(o("m",M.month(),2))},h=function(M,C){return C?typeof n=="function"?n.call(c,M):n[M.month()-c.minMonth]:typeof t=="function"?t.call(c,M):t[M.month()-c.minMonth]},v=this.local.digits,g=function(M){return E.localNumbers&&v?v(M):M},i="",w=!1,S=0;S1},w=function(z,I){var O=i(z,I),D=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],B=new RegExp("^-?\\d{1,"+D+"}"),F=b.substring(f).match(B);if(!F)throw(V.local.missingNumberAt||V.regionalOptions[""].missingNumberAt).replace(/\{0\}/,f);return f+=F[0].length,parseInt(F[0],10)},S=this,M=function(){if(typeof n=="function"){i("m");var z=n.call(S,b.substring(f));return f+=z.length,z}return w("m")},C=function(z,I,O,D){for(var B=i(z,D)?O:I,F=0;F-1){c=1,m=h;for(var x=this.daysInMonth(s,c);m>x;x=this.daysInMonth(s,c))c++,m-=x}return o>-1?this.fromJD(o):this.newDate(s,c,m)},determineDate:function(p,b,E,k,l){E&&typeof E!="object"&&(l=k,k=E,E=null),typeof k!="string"&&(l=k,k="");var e=this,t=function(n){try{return e.parseDate(k,n,l)}catch{}n=n.toLowerCase();for(var r=(n.match(/^c/)&&E?E.newDate():null)||e.today(),a=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=a.exec(n);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=a.exec(n);return r};return b=b?b.newDate():null,p=p==null?b:typeof p=="string"?t(p):typeof p=="number"?isNaN(p)||p===1/0||p===-1/0?b:e.today().add(p,"d"):e.newDate(p),p}})}}),SH=ze({"node_modules/world-calendars/dist/calendars/chinese.js"(){var J=th(),V=Vc(),p=J.instance();function b(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,s){if(typeof o=="string"){var c=o.match(k);return c?c[0]:""}var m=this._validateYear(o),h=o.month(),v=""+this.toChineseMonth(m,h);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(m,h)&&(v+="i"),v},monthNames:function(o){if(typeof o=="string"){var s=o.match(l);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),v=["\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"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},monthNamesShort:function(o){if(typeof o=="string"){var s=o.match(e);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),v=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},parseMonth:function(o,s){o=this._validateYear(o);var c=parseInt(s),m;if(isNaN(c))s[0]==="\u95F0"&&(m=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var h=s[s.length-1];m=h==="i"||h==="I"}var v=this.toMonthIndex(o,c,m);return v},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(o,s){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw s.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,s,c){var m=this.intercalaryMonth(o),h=c&&s!==m;if(h||s<1||s>12)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return m?!c&&s<=m?v=s-1:v=s:v=s-1,v},toChineseMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o),m=c?12:11;if(s<0||s>m)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var h;return c?s>13;return c},isIntercalaryMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o);return!!c&&c===s},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,s,c){var m=this._validateYear(o,J.local.invalidyear),h=n[m-n[0]],v=h>>9&4095,g=h>>5&15,i=h&31,w;w=p.newDate(v,g,i),w.add(4-(w.dayOfWeek()||7),"d");var S=this.toJD(o,s,c)-w.toJD();return 1+Math.floor(S/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,s){o.year&&(s=o.month(),o=o.year()),o=this._validateYear(o);var c=t[o-t[0]],m=c>>13,h=m?12:11;if(s>h)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=c&1<<12-s?30:29;return v},weekDay:function(o,s,c){return(this.dayOfWeek(o,s,c)||7)<6},toJD:function(o,s,c){var m=this._validate(o,v,c,J.local.invalidDate);o=this._validateYear(m.year()),s=m.month(),c=m.day();var h=this.isIntercalaryMonth(o,s),v=this.toChineseMonth(o,s),g=a(o,v,c,h);return p.toJD(g.year,g.month,g.day)},fromJD:function(o){var s=p.fromJD(o),c=r(s.year(),s.month(),s.day()),m=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,m,c.day)},fromString:function(o){var s=o.match(E),c=this._validateYear(+s[1]),m=+s[2],h=!!s[3],v=this.toMonthIndex(c,m,h),g=+s[4];return this.newDate(c,v,g)},add:function(o,s,c){var m=o.year(),h=o.month(),v=this.isIntercalaryMonth(m,h),g=this.toChineseMonth(m,h),i=Object.getPrototypeOf(b.prototype).add.call(this,o,s,c);if(c==="y"){var w=i.year(),S=i.month(),M=this.isIntercalaryMonth(w,g),C=v&&M?this.toMonthIndex(w,g,!0):this.toMonthIndex(w,g,!1);C!==S&&i.month(C)}return i}});var E=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,k=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;J.calendars.chinese=b;var t=[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],n=[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 r(o,s,c,m){var h,v;if(typeof o=="object")h=o,v=s||{};else{var g=typeof o=="number"&&o>=1888&&o<=2111;if(!g)throw new Error("Solar year outside range 1888-2111");var i=typeof s=="number"&&s>=1&&s<=12;if(!i)throw new Error("Solar month outside range 1 - 12");var w=typeof c=="number"&&c>=1&&c<=31;if(!w)throw new Error("Solar day outside range 1 - 31");h={year:o,month:s,day:c},v=m||{}}var S=n[h.year-n[0]],M=h.year<<9|h.month<<5|h.day;v.year=M>=S?h.year:h.year-1,S=n[v.year-n[0]];var C=S>>9&4095,_=S>>5&15,T=S&31,f,u=new Date(C,_-1,T),A=new Date(h.year,h.month-1,h.day);f=Math.round((A-u)/(24*3600*1e3));var x=t[v.year-t[0]],z;for(z=0;z<13;z++){var I=x&1<<12-z?30:29;if(f>13;return!O||z=1888&&o<=2111;if(!i)throw new Error("Lunar year outside range 1888-2111");var w=typeof s=="number"&&s>=1&&s<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var S=typeof c=="number"&&c>=1&&c<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var M;typeof m=="object"?(M=!1,v=m):(M=!!m,v=h||{}),g={year:o,month:s,day:c,isIntercalary:M}}var C;C=g.day-1;var _=t[g.year-t[0]],T=_>>13,f;T&&(g.month>T||g.isIntercalary)?f=g.month:f=g.month-1;for(var u=0;u>9&4095,I=x>>5&15,O=x&31,D=new Date(z,I-1,O+C);return v.year=D.getFullYear(),v.month=1+D.getMonth(),v.day=D.getDate(),v}}}),EH=ze({"node_modules/world-calendars/dist/calendars/coptic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.coptic=p}}),kH=ze({"node_modules/world-calendars/dist/calendars/discworld.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),!1},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),13},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),400},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return(e.day()+1)%8},weekDay:function(E,k,l){var e=this.dayOfWeek(E,k,l);return e>=2&&e<=6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{century:b[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return E=e.year()+(e.year()<0?1:0),k=e.month(),l=e.day(),l+(k>1?16:0)+(k>2?(k-2)*32:0)+(E-1)*400+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E+.5)-Math.floor(this.jdEpoch)-1;var k=Math.floor(E/400)+1;E-=(k-1)*400,E+=E>15?16:0;var l=Math.floor(E/32)+1,e=E-(l-1)*32+1;return this.newDate(k<=0?k-1:k,l,e)}});var b={20:"Fruitbat",21:"Anchovy"};J.calendars.discworld=p}}),CH=ze({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.ethiopian=p}}),LH=ze({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this._leapYear(k.year())},_leapYear:function(E){return E=E<0?E+1:E,b(E*7+1,19)<7},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),this._leapYear(E.year?E.year():E)?13:12},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return E=k.year(),this.toJD(E===-1?1:E+1,7,1)-this.toJD(E,7,1)},daysInMonth:function(E,k){return E.year&&(k=E.month(),E=E.year()),this._validate(E,k,this.minDay,J.local.invalidMonth),k===12&&this.leapYear(E)||k===8&&b(this.daysInYear(E),10)===5?30:k===9&&b(this.daysInYear(E),10)===3?29:this.daysPerMonth[k-1]},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=E<=0?E+1:E,n=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(k<7){for(var r=7;r<=this.monthsInYear(E);r++)n+=this.daysInMonth(E,r);for(var r=1;r=this.toJD(k===-1?1:k+1,7,1);)k++;for(var l=Ethis.toJD(k,l,this.daysInMonth(k,l));)l++;var e=E-this.toJD(k,l,1)+1;return this.newDate(k,l,e)}});function b(E,k){return E-k*Math.floor(E/k)}J.calendars.hebrew=p}}),PH=ze({"node_modules/world-calendars/dist/calendars/islamic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);return(E.year()*11+14)%30<11},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){return this.leapYear(b)?355:354},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===12&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==5},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b=b<=0?b+1:b,k+Math.ceil(29.5*(E-1))+(b-1)*354+Math.floor((3+11*b)/30)+this.jdEpoch-1},fromJD:function(b){b=Math.floor(b)+.5;var E=Math.floor((30*(b-this.jdEpoch)+10646)/10631);E=E<=0?E-1:E;var k=Math.min(12,Math.ceil((b-29-this.toJD(E,1,1))/29.5)+1),l=b-this.toJD(E,k,1)+1;return this.newDate(E,k,l)}}),J.calendars.islamic=p}}),RH=ze({"node_modules/world-calendars/dist/calendars/julian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()<0?E.year()+1:E.year();return k%4===0},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===2&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b<0&&b++,E<=2&&(b--,E+=12),Math.floor(365.25*(b+4716))+Math.floor(30.6001*(E+1))+k-1524.5},fromJD:function(b){var E=Math.floor(b+.5),k=E+1524,l=Math.floor((k-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((k-e)/30.6001),n=t-Math.floor(t<14?1:13),r=l-Math.floor(n>2?4716:4715),a=k-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,n,a)}}),J.calendars.julian=p}}),IH=ze({"node_modules/world-calendars/dist/calendars/mayan.js"(){var J=th(),V=Vc();function p(k){this.local=this.regionalOptions[k||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),!1},formatYear:function(k){var l=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear);k=l.year();var e=Math.floor(k/400);k=k%400,k+=k<0?400:0;var t=Math.floor(k/20);return e+"."+t+"."+k%20},forYear:function(k){if(k=k.split("."),k.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),18},weekOfYear:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),0},daysInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),360},daysInMonth:function(k,l){return this._validate(k,l,this.minDay,J.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()},weekDay:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),!0},extraInfo:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate),n=t.toJD(),r=this._toHaab(n),a=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(k){k-=this.jdEpoch;var l=b(k+8+17*20,365);return[Math.floor(l/20)+1,b(l,20)]},_toTzolkin:function(k){return k-=this.jdEpoch,[E(k+20,20),E(k+4,13)]},toJD:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(k){k=Math.floor(k)+.5-this.jdEpoch;var l=Math.floor(k/360);k=k%360,k+=k<0?360:0;var e=Math.floor(k/20),t=k%20;return this.newDate(l,e,t)}});function b(k,l){return k-l*Math.floor(k/l)}function E(k,l){return b(k-1,l)+1}J.calendars.mayan=p}}),DH=ze({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar;var b=J.instance("gregorian");V(p.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear);return b.leapYear(k.year()+(k.year()<1?1:0)+1469)},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidMonth),t=e.year();t<0&&t++;for(var n=e.day(),r=1;r=this.toJD(k+1,1,1);)k++;for(var l=E-Math.floor(this.toJD(k,1,1)+.5)+1,e=1;l>this.daysInMonth(k,e);)l-=this.daysInMonth(k,e),e++;return this.newDate(k,e,l)}}),J.calendars.nanakshahi=p}}),FH=ze({"node_modules/world-calendars/dist/calendars/nepali.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(b){return this.daysInYear(b)!==this.daysPerYear},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);if(b=E.year(),typeof this.NEPALI_CALENDAR_DATA[b]>"u")return this.daysPerYear;for(var k=0,l=this.minMonth;l<=12;l++)k+=this.NEPALI_CALENDAR_DATA[b][l];return k},daysInMonth:function(b,E){return b.year&&(E=b.month(),b=b.year()),this._validate(b,E,this.minDay,J.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[b]>"u"?this.daysPerMonth[E-1]:this.NEPALI_CALENDAR_DATA[b][E]},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);b=l.year(),E=l.month(),k=l.day();var e=J.instance(),t=0,n=E,r=b;this._createMissingCalendarData(b);var a=b-(n>9||n===9&&k>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(E!==9&&(t=k,n--);n!==9;)n<=0&&(n=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][n],n--;return E===9?(t+=k-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(a))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(a,1,1).add(t,"d").toJD()},fromJD:function(b){var E=J.instance(),k=E.fromJD(b),l=k.year(),e=k.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var n=9,r=this.NEPALI_CALENDAR_DATA[t][0],a=this.NEPALI_CALENDAR_DATA[t][n]-r+1;e>a;)n++,n>12&&(n=1,t++),a+=this.NEPALI_CALENDAR_DATA[t][n];var o=this.NEPALI_CALENDAR_DATA[t][n]-(a-e);return this.newDate(t,n,o)},_createMissingCalendarData:function(b){var E=this.daysPerMonth.slice(0);E.unshift(17);for(var k=b-1;k"u"&&(this.NEPALI_CALENDAR_DATA[k]=E)},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]}}),J.calendars.nepali=p}}),zH=ze({"node_modules/world-calendars/dist/calendars/persian.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}function b(E){var k=E-475;E<0&&k++;var l=.242197,e=l*k,t=l*(k+1),n=e-Math.floor(e),r=t-Math.floor(t);return n>r}p.prototype=new J.baseCalendar,V(p.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return b(k.year())},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=0;if(E>0)for(var n=1;n0?E-1:E)*365+t+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E)+.5;var k=475+(E-this.toJD(475,1,1))/365.242197,l=Math.floor(k);l<=0&&l--,E>this.toJD(l,12,b(l)?30:29)&&(l++,l===0&&l++);var e=E-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),n=E-this.toJD(l,t,1)+1;return this.newDate(l,t,n)}}),J.calendars.persian=p,J.calendars.jalali=p}}),BH=ze({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)},_g2tYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)}}),J.calendars.taiwan=b}}),OH=ze({"node_modules/world-calendars/dist/calendars/thai.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)},_g2tYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)}}),J.calendars.thai=b}}),NH=ze({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this.daysInYear(k.year())===355},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){for(var k=0,l=1;l<=12;l++)k+=this.daysInMonth(E,l);return k},daysInMonth:function(E,k){for(var l=this._validate(E,k,this.minDay,J.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,n=0;ne)return b[t]-b[t-1];t++}return 30},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,n=e.day()+b[t-1]-1;return n+24e5-.5},fromJD:function(E){for(var k=E-24e5+.5,l=0,e=0;ek);e++)l++;var t=l+15292,n=Math.floor((t-1)/12),r=n+1,a=t-12*n,o=k-b[l-1]+1;return this.newDate(r,a,o)},isValid:function(E,k,l){var e=J.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(E=E.year!=null?E.year:E,e=E>=1276&&E<=1500),e},_validate:function(E,k,l,e){var t=J.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),J.calendars.ummalqura=p;var b=[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]}}),jH=ze({"src/components/calendars/calendars.js"(J,V){"use strict";V.exports=th(),MH(),SH(),EH(),kH(),CH(),LH(),PH(),RH(),IH(),DH(),FH(),zH(),BH(),OH(),NH()}}),UH=ze({"src/components/calendars/index.js"(J,V){"use strict";var p=jH(),b=Nr(),E=No(),k=E.EPOCHJD,l=E.ONEDAY,e={valType:"enumerated",values:b.sortObjectKeys(p.calendars),editType:"calc",dflt:"gregorian"},t=function(_,T,f,u){var A={};return A[f]=e,b.coerce(_,T,A,f,u)},n=function(_,T,f,u){for(var A=0;A0){if(++ye>=n$)return arguments[0]}else ye=0;return oe.apply(void 0,arguments)}}var qy=s$;var l$=qy(Fy),Vy=l$;var u$=/\{\n\/\* \[wrapped with (.+)\] \*/,c$=/,? & /;function f$(oe){var ye=oe.match(u$);return ye?ye[1].split(c$):[]}var zE=f$;var h$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function d$(oe,ye){var Fe=ye.length;if(!Fe)return oe;var dt=Fe-1;return ye[dt]=(Fe>1?"& ":"")+ye[dt],ye=ye.join(Fe>2?", ":" "),oe.replace(h$,`{ -/* [wrapped with `+ye+`] */ -`)}var BE=d$;function p$(oe){return function(){return oe}}var G0=p$;var v$=function(){try{var oe=Fh(Object,"defineProperty");return oe({},"",{}),oe}catch{}}(),H0=v$;var m$=H0?function(oe,ye){return H0(oe,"toString",{configurable:!0,enumerable:!1,value:G0(ye),writable:!0})}:wl,OE=m$;var g$=qy(OE),W0=g$;function y$(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++Fe-1}var Rp=T$;var A$=1,M$=2,S$=8,E$=16,k$=32,C$=64,L$=128,P$=256,R$=512,I$=[["ary",L$],["bind",A$],["bindKey",M$],["curry",S$],["curryRight",E$],["flip",R$],["partial",k$],["partialRight",C$],["rearg",P$]];function D$(oe,ye){return af(I$,function(Fe){var dt="_."+Fe[0];ye&Fe[1]&&!Rp(oe,dt)&&oe.push(dt)}),oe.sort()}var jE=D$;function F$(oe,ye,Fe){var dt=ye+"";return W0(oe,BE(dt,jE(zE(dt),Fe)))}var Hy=F$;var z$=1,B$=2,O$=4,N$=8,UE=32,qE=64;function j$(oe,ye,Fe,dt,Zt,yr,Yr,ma,ya,wn){var xn=ye&N$,On=xn?Yr:void 0,Fi=xn?void 0:Yr,ho=xn?yr:void 0,Li=xn?void 0:yr;ye|=xn?UE:qE,ye&=~(xn?qE:UE),ye&O$||(ye&=~(z$|B$));var lo=[oe,ye,Zt,ho,On,Li,Fi,ma,ya,wn],Lo=Fe.apply(void 0,lo);return Ng(oe)&&Vy(Lo,lo),Lo.placeholder=dt,Hy(Lo,oe,ye)}var Wy=j$;function U$(oe){var ye=oe;return ye.placeholder}var Xh=U$;var q$=9007199254740991,V$=/^(?:0|[1-9]\d*)$/;function G$(oe,ye){var Fe=typeof oe;return ye=ye??q$,!!ye&&(Fe=="number"||Fe!="symbol"&&V$.test(oe))&&oe>-1&&oe%1==0&&oe1&&ze.reverse(),xn&&ya-1&&oe%1==0&&oe<=xK}var Ip=bK;function wK(oe){return oe!=null&&Ip(oe.length)&&!Ef(oe)}var Pl=wK;function TK(oe,ye,Fe){if(!as(Fe))return!1;var dt=typeof ye;return(dt=="number"?Pl(Fe)&&kf(ye,Fe.length):dt=="string"&&ye in Fe)?cc(Fe[ye],oe):!1}var Tl=TK;function AK(oe){return Ui(function(ye,Fe){var dt=-1,Zt=Fe.length,yr=Zt>1?Fe[Zt-1]:void 0,Yr=Zt>2?Fe[2]:void 0;for(yr=oe.length>3&&typeof yr=="function"?(Zt--,yr):void 0,Yr&&Tl(Fe[0],Fe[1],Yr)&&(yr=Zt<3?void 0:yr,Zt=1),ye=Object(ye);++dt-1}var w8=QJ;function eQ(oe,ye){var Fe=this.__data__,dt=Fp(Fe,oe);return dt<0?(++this.size,Fe.push([oe,ye])):Fe[dt][1]=ye,this}var T8=eQ;function Q0(oe){var ye=-1,Fe=oe==null?0:oe.length;for(this.clear();++ye0&&Fe(ma)?ye>1?I8(ma,ye-1,Fe,dt,Zt):vh(Zt,ma):dt||(Zt[Zt.length]=ma)}return Zt}var Zs=I8;function AQ(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,1):[]}var Qy=AQ;function MQ(oe){return W0(Xy(oe,void 0,Qy),oe+"")}var Rf=MQ;var SQ=Rf(rm),D8=SQ;var EQ=$y(Object.getPrototypeOf,Object),Np=EQ;var kQ="[object Object]",CQ=Function.prototype,LQ=Object.prototype,F8=CQ.toString,PQ=LQ.hasOwnProperty,RQ=F8.call(Object);function IQ(oe){if(!is(oe)||bl(oe)!=kQ)return!1;var ye=Np(oe);if(ye===null)return!0;var Fe=PQ.call(ye,"constructor")&&ye.constructor;return typeof Fe=="function"&&Fe instanceof Fe&&F8.call(Fe)==RQ}var Cd=IQ;var DQ="[object DOMException]",FQ="[object Error]";function zQ(oe){if(!is(oe))return!1;var ye=bl(oe);return ye==FQ||ye==DQ||typeof oe.message=="string"&&typeof oe.name=="string"&&!Cd(oe)}var am=zQ;var BQ=Ui(function(oe,ye){try{return gu(oe,void 0,ye)}catch(Fe){return am(Fe)?Fe:new Error(Fe)}}),e_=BQ;var OQ="Expected a function";function NQ(oe,ye){var Fe;if(typeof ye!="function")throw new TypeError(OQ);return oe=ji(oe),function(){return--oe>0&&(Fe=ye.apply(this,arguments)),oe<=1&&(ye=void 0),Fe}}var t_=NQ;var jQ=1,UQ=32,cw=Ui(function(oe,ye,Fe){var dt=jQ;if(Fe.length){var Zt=Mh(Fe,Xh(cw));dt|=UQ}return Cf(oe,dt,ye,Fe,Zt)});cw.placeholder={};var r_=cw;var qQ=Rf(function(oe,ye){return af(ye,function(Fe){Fe=Nc(Fe),Lf(oe,Fe,r_(oe[Fe],oe))}),oe}),z8=qQ;var VQ=1,GQ=2,HQ=32,fw=Ui(function(oe,ye,Fe){var dt=VQ|GQ;if(Fe.length){var Zt=Mh(Fe,Xh(fw));dt|=HQ}return Cf(ye,dt,oe,Fe,Zt)});fw.placeholder={};var B8=fw;function WQ(oe,ye,Fe){var dt=-1,Zt=oe.length;ye<0&&(ye=-ye>Zt?0:Zt+ye),Fe=Fe>Zt?Zt:Fe,Fe<0&&(Fe+=Zt),Zt=ye>Fe?0:Fe-ye>>>0,ye>>>=0;for(var yr=Array(Zt);++dt=dt?oe:Zu(oe,ye,Fe)}var mh=YQ;var XQ="\\ud800-\\udfff",ZQ="\\u0300-\\u036f",$Q="\\ufe20-\\ufe2f",KQ="\\u20d0-\\u20ff",JQ=ZQ+$Q+KQ,QQ="\\ufe0e\\ufe0f",eee="\\u200d",tee=RegExp("["+eee+XQ+JQ+QQ+"]");function ree(oe){return tee.test(oe)}var Kh=ree;function aee(oe){return oe.split("")}var O8=aee;var N8="\\ud800-\\udfff",nee="\\u0300-\\u036f",iee="\\ufe20-\\ufe2f",oee="\\u20d0-\\u20ff",see=nee+iee+oee,lee="\\ufe0e\\ufe0f",uee="["+N8+"]",hw="["+see+"]",dw="\\ud83c[\\udffb-\\udfff]",cee="(?:"+hw+"|"+dw+")",j8="[^"+N8+"]",U8="(?:\\ud83c[\\udde6-\\uddff]){2}",q8="[\\ud800-\\udbff][\\udc00-\\udfff]",fee="\\u200d",V8=cee+"?",G8="["+lee+"]?",hee="(?:"+fee+"(?:"+[j8,U8,q8].join("|")+")"+G8+V8+")*",dee=G8+V8+hee,pee="(?:"+[j8+hw+"?",hw,U8,q8,uee].join("|")+")",vee=RegExp(dw+"(?="+dw+")|"+pee+dee,"g");function mee(oe){return oe.match(vee)||[]}var H8=mee;function gee(oe){return Kh(oe)?H8(oe):O8(oe)}var nf=gee;function yee(oe){return function(ye){ye=To(ye);var Fe=Kh(ye)?nf(ye):void 0,dt=Fe?Fe[0]:ye.charAt(0),Zt=Fe?mh(Fe,1).join(""):ye.slice(1);return dt[oe]()+Zt}}var a_=yee;var _ee=a_("toUpperCase"),nm=_ee;function xee(oe){return nm(To(oe).toLowerCase())}var n_=xee;function bee(oe,ye,Fe,dt){var Zt=-1,yr=oe==null?0:oe.length;for(dt&&yr&&(Fe=oe[++Zt]);++Zt=ye?oe:ye)),oe}var Bh=xte;function bte(oe,ye,Fe){return Fe===void 0&&(Fe=ye,ye=void 0),Fe!==void 0&&(Fe=Bc(Fe),Fe=Fe===Fe?Fe:0),ye!==void 0&&(ye=Bc(ye),ye=ye===ye?ye:0),Bh(Bc(oe),ye,Fe)}var gk=bte;function wte(){this.__data__=new zp,this.size=0}var yk=wte;function Tte(oe){var ye=this.__data__,Fe=ye.delete(oe);return this.size=ye.size,Fe}var _k=Tte;function Ate(oe){return this.__data__.get(oe)}var xk=Ate;function Mte(oe){return this.__data__.has(oe)}var bk=Mte;var Ste=200;function Ete(oe,ye){var Fe=this.__data__;if(Fe instanceof zp){var dt=Fe.__data__;if(!Bp||dt.lengthma))return!1;var wn=yr.get(oe),xn=yr.get(ye);if(wn&&xn)return wn==ye&&xn==oe;var On=-1,Fi=!0,ho=Fe&Eae?new Up:void 0;for(yr.set(oe,ye),yr.set(ye,oe);++On=ye||Oh<0||On&&ad>=yr}function zi(){var Po=wm();if(Lo(Po))return ze(Po);ma=setTimeout(zi,lo(Po))}function ze(Po){return ma=void 0,Fi&&dt?ho(Po):(dt=Zt=void 0,Yr)}function bu(){ma!==void 0&&clearTimeout(ma),wn=0,dt=ya=Zt=ma=void 0}function uf(){return ma===void 0?Yr:ze(wm())}function Yl(){var Po=wm(),Oh=Lo(Po);if(dt=arguments,Zt=this,ya=Po,Oh){if(ma===void 0)return Li(ya);if(On)return clearTimeout(ma),ma=setTimeout(zi,ye),ho(ya)}return ma===void 0&&(ma=setTimeout(zi,ye)),Yr}return Yl.cancel=bu,Yl.flush=uf,Yl}var P_=jne;function Une(oe,ye){return oe==null||oe!==oe?ye:oe}var MC=Une;var SC=Object.prototype,qne=SC.hasOwnProperty,Vne=Ui(function(oe,ye){oe=Object(oe);var Fe=-1,dt=ye.length,Zt=dt>2?ye[2]:void 0;for(Zt&&Tl(ye[0],ye[1],Zt)&&(dt=1);++Fe=rie&&(yr=ep,Yr=!1,ye=new Up(ye));e:for(;++Zt=0&&oe.slice(Fe,Zt)==ye}var GC=bie;function wie(oe,ye){return ts(ye,function(Fe){return[Fe,oe[Fe]]})}var HC=wie;function Tie(oe){var ye=-1,Fe=Array(oe.size);return oe.forEach(function(dt){Fe[++ye]=[dt,dt]}),Fe}var WC=Tie;var Aie="[object Map]",Mie="[object Set]";function Sie(oe){return function(ye){var Fe=of(ye);return Fe==Aie?mm(ye):Fe==Mie?WC(ye):HC(ye,oe(ye))}}var B_=Sie;var Eie=B_(Ms),Xg=Eie;var kie=B_(Rl),Zg=kie;var Cie={"&":"&","<":"<",">":">",'"':""","'":"'"},Lie=om(Cie),YC=Lie;var XC=/[&<>"']/g,Pie=RegExp(XC.source);function Rie(oe){return oe=To(oe),oe&&Pie.test(oe)?oe.replace(XC,YC):oe}var O_=Rie;var ZC=/[\\^$.*+?()[\]{}|]/g,Iie=RegExp(ZC.source);function Die(oe){return oe=To(oe),oe&&Iie.test(oe)?oe.replace(ZC,"\\$&"):oe}var $C=Die;function Fie(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++FeZt?0:Zt+Fe),dt=dt===void 0||dt>Zt?Zt:ji(dt),dt<0&&(dt+=Zt),dt=Fe>dt?0:j_(dt);Fe-1?Zt[yr?ye[Yr]:Yr]:void 0}}var q_=Gie;var Hie=Math.max;function Wie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Hie(dt+Zt,0)),Pp(oe,Ti(ye,3),Zt)}var V_=Wie;var Yie=q_(V_),r7=Yie;function Xie(oe,ye,Fe){var dt;return Fe(oe,function(Zt,yr,Yr){if(ye(Zt,yr,Yr))return dt=yr,!1}),dt}var G_=Xie;function Zie(oe,ye){return G_(oe,Ti(ye,3),Df)}var a7=Zie;var $ie=Math.max,Kie=Math.min;function Jie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt-1;return Fe!==void 0&&(Zt=ji(Fe),Zt=Fe<0?$ie(dt+Zt,0):Kie(Zt,dt-1)),Pp(oe,Ti(ye,3),Zt,!0)}var H_=Jie;var Qie=q_(H_),n7=Qie;function eoe(oe,ye){return G_(oe,Ti(ye,3),Mm)}var i7=eoe;function toe(oe){return oe&&oe.length?oe[0]:void 0}var $g=toe;function roe(oe,ye){var Fe=-1,dt=Pl(oe)?Array(oe.length):[];return yh(oe,function(Zt,yr,Yr){dt[++Fe]=ye(Zt,yr,Yr)}),dt}var W_=roe;function aoe(oe,ye){var Fe=Ii(oe)?ts:W_;return Fe(oe,Ti(ye,3))}var Wp=aoe;function noe(oe,ye){return Zs(Wp(oe,ye),1)}var o7=noe;var ioe=1/0;function ooe(oe,ye){return Zs(Wp(oe,ye),ioe)}var s7=ooe;function soe(oe,ye,Fe){return Fe=Fe===void 0?1:ji(Fe),Zs(Wp(oe,ye),Fe)}var l7=soe;var loe=1/0;function uoe(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,loe):[]}var u7=uoe;function coe(oe,ye){var Fe=oe==null?0:oe.length;return Fe?(ye=ye===void 0?1:ji(ye),Zs(oe,ye)):[]}var c7=coe;var foe=512;function hoe(oe){return Cf(oe,foe)}var f7=hoe;var doe=lm("floor"),h7=doe;var poe="Expected a function",voe=8,moe=32,goe=128,yoe=256;function _oe(oe){return Rf(function(ye){var Fe=ye.length,dt=Fe,Zt=dh.prototype.thru;for(oe&&ye.reverse();dt--;){var yr=ye[dt];if(typeof yr!="function")throw new TypeError(poe);if(Zt&&!Yr&&V0(yr)=="wrapper")var Yr=new dh([],!0)}for(dt=Yr?dt:Fe;++dtye}var Sm=Ioe;function Doe(oe){return function(ye,Fe){return typeof ye=="string"&&typeof Fe=="string"||(ye=Bc(ye),Fe=Bc(Fe)),oe(ye,Fe)}}var Xp=Doe;var Foe=Xp(Sm),T7=Foe;var zoe=Xp(function(oe,ye){return oe>=ye}),A7=zoe;var Boe=Object.prototype,Ooe=Boe.hasOwnProperty;function Noe(oe,ye){return oe!=null&&Ooe.call(oe,ye)}var M7=Noe;function joe(oe,ye){return oe!=null&&M_(oe,ye,M7)}var S7=joe;var Uoe=Math.max,qoe=Math.min;function Voe(oe,ye,Fe){return oe>=qoe(ye,Fe)&&oe-1:!!Zt&&Yh(oe,ye,Fe)>-1}var C7=$oe;var Koe=Math.max;function Joe(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Koe(dt+Zt,0)),Yh(oe,ye,Zt)}var L7=Joe;function Qoe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,0,-1):[]}var P7=Qoe;var ese=Math.min;function tse(oe,ye,Fe){for(var dt=Fe?Am:Rp,Zt=oe[0].length,yr=oe.length,Yr=yr,ma=Array(yr),ya=1/0,wn=[];Yr--;){var xn=oe[Yr];Yr&&ye&&(xn=ts(xn,_u(ye))),ya=ese(xn.length,ya),ma[Yr]=!Fe&&(ye||Zt>=120&&xn.length>=120)?new Up(Yr&&xn):void 0}xn=oe[0];var On=-1,Fi=ma[0];e:for(;++On=-l9&&oe<=l9}var u9=$se;function Kse(oe){return oe===void 0}var c9=Kse;var Jse="[object WeakMap]";function Qse(oe){return is(oe)&&of(oe)==Jse}var f9=Qse;var ele="[object WeakSet]";function tle(oe){return is(oe)&&bl(oe)==ele}var h9=tle;var rle=1;function ale(oe){return Ti(typeof oe=="function"?oe:If(oe,rle))}var d9=ale;var nle=Array.prototype,ile=nle.join;function ole(oe,ye){return oe==null?"":ile.call(oe,ye)}var p9=ole;var sle=Jh(function(oe,ye,Fe){return oe+(Fe?"-":"")+ye.toLowerCase()}),v9=sle;var lle=Gp(function(oe,ye,Fe){Lf(oe,Fe,ye)}),m9=lle;function ule(oe,ye,Fe){for(var dt=Fe+1;dt--;)if(oe[dt]===ye)return dt;return dt}var g9=ule;var cle=Math.max,fle=Math.min;function hle(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt;return Fe!==void 0&&(Zt=ji(Fe),Zt=Zt<0?cle(dt+Zt,0):fle(Zt,dt-1)),ye===ye?g9(oe,ye,Zt):Pp(oe,Gy,Zt,!0)}var y9=hle;var dle=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+ye.toLowerCase()}),_9=dle;var ple=a_("toLowerCase"),x9=ple;function vle(oe,ye){return oe=this.__values__.length,ye=oe?void 0:this.__values__[this.__index__++];return{done:oe,value:ye}}var O9=Hle;function Wle(oe,ye){var Fe=oe.length;if(Fe)return ye+=ye<0?Fe:0,kf(ye,Fe)?oe[ye]:void 0}var tx=Wle;function Yle(oe,ye){return oe&&oe.length?tx(oe,ji(ye)):void 0}var N9=Yle;function Xle(oe){return oe=ji(oe),Ui(function(ye){return tx(ye,oe)})}var j9=Xle;function Zle(oe,ye){return ye=ph(ye,oe),oe=Z_(oe,ye),oe==null||delete oe[Nc(xu(ye))]}var Im=Zle;function $le(oe){return Cd(oe)?void 0:oe}var U9=$le;var Kle=1,Jle=2,Qle=4,eue=Rf(function(oe,ye){var Fe={};if(oe==null)return Fe;var dt=!1;ye=ts(ye,function(yr){return yr=ph(yr,oe),dt||(dt=yr.length>1),yr}),Oc(oe,hm(oe),Fe),dt&&(Fe=If(Fe,Kle|Jle|Qle,U9));for(var Zt=ye.length;Zt--;)Im(Fe,ye[Zt]);return Fe}),q9=eue;function tue(oe,ye,Fe,dt){if(!as(oe))return oe;ye=ph(ye,oe);for(var Zt=-1,yr=ye.length,Yr=yr-1,ma=oe;ma!=null&&++Ztye||yr&&Yr&&ya&&!ma&&!wn||dt&&Yr&&ya||!Fe&&ya||!Zt)return 1;if(!dt&&!yr&&!wn&&oe=ma)return ya;var wn=Fe[dt];return ya*(wn=="desc"?-1:1)}}return oe.index-ye.index}var W9=lue;function uue(oe,ye,Fe){ye.length?ye=ts(ye,function(yr){return Ii(yr)?function(Yr){return zh(Yr,yr.length===1?yr[0]:yr)}:yr}):ye=[wl];var dt=-1;ye=ts(ye,_u(Ti));var Zt=W_(oe,function(yr,Yr,ma){var ya=ts(ye,function(wn){return wn(yr)});return{criteria:ya,index:++dt,value:yr}});return H9(Zt,function(yr,Yr){return W9(yr,Yr,Fe)})}var ix=uue;function cue(oe,ye,Fe,dt){return oe==null?[]:(Ii(ye)||(ye=ye==null?[]:[ye]),Fe=dt?void 0:Fe,Ii(Fe)||(Fe=Fe==null?[]:[Fe]),ix(oe,ye,Fe))}var Y9=cue;function fue(oe){return Rf(function(ye){return ye=ts(ye,_u(Ti)),Ui(function(Fe){var dt=this;return oe(ye,function(Zt){return gu(Zt,dt,Fe)})})})}var Dm=fue;var hue=Dm(ts),X9=hue;var due=Ui,Z9=due;var pue=Math.min,vue=Z9(function(oe,ye){ye=ye.length==1&&Ii(ye[0])?ts(ye[0],_u(Ti)):ts(Zs(ye,1),_u(Ti));var Fe=ye.length;return Ui(function(dt){for(var Zt=-1,yr=pue(dt.length,Fe);++Ztyue)return Fe;do ye%2&&(Fe+=oe),ye=_ue(ye/2),ye&&(oe+=oe);while(ye);return Fe}var Kg=xue;var bue=xm("length"),Q9=bue;var tL="\\ud800-\\udfff",wue="\\u0300-\\u036f",Tue="\\ufe20-\\ufe2f",Aue="\\u20d0-\\u20ff",Mue=wue+Tue+Aue,Sue="\\ufe0e\\ufe0f",Eue="["+tL+"]",yw="["+Mue+"]",_w="\\ud83c[\\udffb-\\udfff]",kue="(?:"+yw+"|"+_w+")",rL="[^"+tL+"]",aL="(?:\\ud83c[\\udde6-\\uddff]){2}",nL="[\\ud800-\\udbff][\\udc00-\\udfff]",Cue="\\u200d",iL=kue+"?",oL="["+Sue+"]?",Lue="(?:"+Cue+"(?:"+[rL,aL,nL].join("|")+")"+oL+iL+")*",Pue=oL+iL+Lue,Rue="(?:"+[rL+yw+"?",yw,aL,nL,Eue].join("|")+")",eL=RegExp(_w+"(?="+_w+")|"+Rue+Pue,"g");function Iue(oe){for(var ye=eL.lastIndex=0;eL.test(oe);)++ye;return ye}var sL=Iue;function Due(oe){return Kh(oe)?sL(oe):Q9(oe)}var ed=Due;var Fue=Math.ceil;function zue(oe,ye){ye=ye===void 0?" ":uc(ye);var Fe=ye.length;if(Fe<2)return Fe?Kg(ye,oe):ye;var dt=Kg(ye,Fue(oe/ed(ye)));return Kh(ye)?mh(nf(dt),0,oe).join(""):dt.slice(0,oe)}var Fv=zue;var Bue=Math.ceil,Oue=Math.floor;function Nue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;if(!ye||dt>=ye)return oe;var Zt=(ye-dt)/2;return Fv(Oue(Zt),Fe)+oe+Fv(Bue(Zt),Fe)}var lL=Nue;function jue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;return ye&&dt-1;)ma!==oe&&_L.call(ma,ya,1),_L.call(oe,ya,1);return oe}var Fm=ece;function tce(oe,ye){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye):oe}var sx=tce;var rce=Ui(sx),xL=rce;function ace(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,Ti(Fe,2)):oe}var bL=ace;function nce(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,void 0,Fe):oe}var wL=nce;var ice=Array.prototype,oce=ice.splice;function sce(oe,ye){for(var Fe=oe?ye.length:0,dt=Fe-1;Fe--;){var Zt=ye[Fe];if(Fe==dt||Zt!==yr){var yr=Zt;kf(Zt)?oce.call(oe,Zt,1):Im(oe,Zt)}}return oe}var lx=sce;var lce=Rf(function(oe,ye){var Fe=oe==null?0:oe.length,dt=rm(oe,ye);return lx(oe,ts(ye,function(Zt){return kf(Zt,Fe)?+Zt:Zt}).sort(nx)),dt}),TL=lce;var uce=Math.floor,cce=Math.random;function fce(oe,ye){return oe+uce(cce()*(ye-oe+1))}var zm=fce;var hce=parseFloat,dce=Math.min,pce=Math.random;function vce(oe,ye,Fe){if(Fe&&typeof Fe!="boolean"&&Tl(oe,ye,Fe)&&(ye=Fe=void 0),Fe===void 0&&(typeof ye=="boolean"?(Fe=ye,ye=void 0):typeof oe=="boolean"&&(Fe=oe,oe=void 0)),oe===void 0&&ye===void 0?(oe=0,ye=1):(oe=Dh(oe),ye===void 0?(ye=oe,oe=0):ye=Dh(ye)),oe>ye){var dt=oe;oe=ye,ye=dt}if(Fe||oe%1||ye%1){var Zt=pce();return dce(oe+Zt*(ye-oe+hce("1e-"+((Zt+"").length-1))),ye)}return zm(oe,ye)}var AL=vce;var mce=Math.ceil,gce=Math.max;function yce(oe,ye,Fe,dt){for(var Zt=-1,yr=gce(mce((ye-oe)/(Fe||1)),0),Yr=Array(yr);yr--;)Yr[dt?yr:++Zt]=oe,oe+=Fe;return Yr}var ML=yce;function _ce(oe){return function(ye,Fe,dt){return dt&&typeof dt!="number"&&Tl(ye,Fe,dt)&&(Fe=dt=void 0),ye=Dh(ye),Fe===void 0?(Fe=ye,ye=0):Fe=Dh(Fe),dt=dt===void 0?ye1&&Tl(oe,ye[0],ye[1])?ye=[]:Fe>2&&Tl(ye[0],ye[1],ye[2])&&(ye=[ye[0]]),ix(oe,Zs(ye,1),[])}),eP=nfe;var ife=4294967295,ofe=ife-1,sfe=Math.floor,lfe=Math.min;function ufe(oe,ye,Fe,dt){var Zt=0,yr=oe==null?0:oe.length;if(yr===0)return 0;ye=Fe(ye);for(var Yr=ye!==ye,ma=ye===null,ya=Ru(ye),wn=ye===void 0;Zt>>1;function hfe(oe,ye,Fe){var dt=0,Zt=oe==null?dt:oe.length;if(typeof ye=="number"&&ye===ye&&Zt<=ffe){for(;dt>>1,Yr=oe[yr];Yr!==null&&!Ru(Yr)&&(Fe?Yr<=ye:Yr>>0,Fe?(oe=To(oe),oe&&(typeof ye=="string"||ye!=null&&!Lm(ye))&&(ye=uc(ye),!ye&&Kh(oe))?mh(nf(oe),0,Fe):oe.split(ye,Fe)):[]}var uP=Tfe;var Afe="Expected a function",Mfe=Math.max;function Sfe(oe,ye){if(typeof oe!="function")throw new TypeError(Afe);return ye=ye==null?0:Mfe(ji(ye),0),Ui(function(Fe){var dt=Fe[ye],Zt=mh(Fe,0,ye);return dt&&vh(Zt,dt),gu(oe,this,Zt)})}var cP=Sfe;var Efe=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+nm(ye)}),fP=Efe;function kfe(oe,ye,Fe){return oe=To(oe),Fe=Fe==null?0:Bh(ji(Fe),0,oe.length),ye=uc(ye),oe.slice(Fe,Fe+ye.length)==ye}var hP=kfe;function Cfe(){return{}}var dP=Cfe;function Lfe(){return""}var pP=Lfe;function Pfe(){return!0}var vP=Pfe;var Rfe=kp(function(oe,ye){return oe-ye},0),mP=Rfe;function Ife(oe){return oe&&oe.length?Rm(oe,wl):0}var gP=Ife;function Dfe(oe,ye){return oe&&oe.length?Rm(oe,Ti(ye,2)):0}var yP=Dfe;function Ffe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,1,ye):[]}var _P=Ffe;function zfe(oe,ye,Fe){return oe&&oe.length?(ye=Fe||ye===void 0?1:ji(ye),Zu(oe,0,ye<0?0:ye)):[]}var xP=zfe;function Bfe(oe,ye,Fe){var dt=oe==null?0:oe.length;return dt?(ye=Fe||ye===void 0?1:ji(ye),ye=dt-ye,Zu(oe,ye<0?0:ye,dt)):[]}var bP=Bfe;function Ofe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3),!1,!0):[]}var wP=Ofe;function Nfe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3)):[]}var TP=Nfe;function jfe(oe,ye){return ye(oe),oe}var AP=jfe;var MP=Object.prototype,Ufe=MP.hasOwnProperty;function qfe(oe,ye,Fe,dt){return oe===void 0||cc(oe,MP[Fe])&&!Ufe.call(dt,Fe)?ye:oe}var ww=qfe;var Vfe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Gfe(oe){return"\\"+Vfe[oe]}var SP=Gfe;var Hfe=/<%=([\s\S]+?)%>/g,dx=Hfe;var Wfe=/<%-([\s\S]+?)%>/g,EP=Wfe;var Yfe=/<%([\s\S]+?)%>/g,kP=Yfe;var Xfe={escape:EP,evaluate:kP,interpolate:dx,variable:"",imports:{_:{escape:O_}}},Qg=Xfe;var Zfe="Invalid `variable` option passed into `_.template`",$fe=/\b__p \+= '';/g,Kfe=/\b(__p \+=) '' \+/g,Jfe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qfe=/[()=,{}\[\]\/\s]/,ehe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,px=/($^)/,the=/['\n\r\u2028\u2029\\]/g,rhe=Object.prototype,CP=rhe.hasOwnProperty;function ahe(oe,ye,Fe){var dt=Qg.imports._.templateSettings||Qg;Fe&&Tl(oe,ye,Fe)&&(ye=void 0),oe=To(oe),ye=Dp({},ye,dt,ww);var Zt=Dp({},ye.imports,dt.imports,ww),yr=Ms(Zt),Yr=Em(Zt,yr),ma,ya,wn=0,xn=ye.interpolate||px,On="__p += '",Fi=RegExp((ye.escape||px).source+"|"+xn.source+"|"+(xn===dx?ehe:px).source+"|"+(ye.evaluate||px).source+"|$","g"),ho=CP.call(ye,"sourceURL")?"//# sourceURL="+(ye.sourceURL+"").replace(/\s/g," ")+` -`:"";oe.replace(Fi,function(Lo,zi,ze,bu,uf,Yl){return ze||(ze=bu),On+=oe.slice(wn,Yl).replace(the,SP),zi&&(ma=!0,On+=`' + -__e(`+zi+`) + -'`),uf&&(ya=!0,On+=`'; -`+uf+`; -__p += '`),ze&&(On+=`' + -((__t = (`+ze+`)) == null ? '' : __t) + -'`),wn=Yl+Lo.length,Lo}),On+=`'; -`;var Li=CP.call(ye,"variable")&&ye.variable;if(!Li)On=`with (obj) { -`+On+` -} -`;else if(Qfe.test(Li))throw new Error(Zfe);On=(ya?On.replace($fe,""):On).replace(Kfe,"$1").replace(Jfe,"$1;"),On="function("+(Li||"obj")+`) { -`+(Li?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ma?", __e = _.escape":"")+(ya?`, __j = Array.prototype.join; +);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:qo("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;uniform vec3 u_globe_position;uniform float u_globe_radius;in vec3 v_view_direction;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (u_sky_blend > 0.0) {vec3 ray=normalize(v_view_direction);float globe_distance=length(u_globe_position);float angle_to_globe_center=acos(clamp(dot(ray,u_globe_position)/globe_distance,-1.0,1.0));float horizon_angle=asin(min(u_globe_radius/globe_distance,1.0));blend=mix(blend,(angle_to_globe_center-horizon_angle)*u_camera_to_center_distance*u_device_pixel_ratio,u_sky_blend);}if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 v_view_direction;void main() {v_view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,1.0,1.0);}")},zC="#define PROJECTION_MERCATOR",BC="mercator",W3=class{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return BC}get shaderDefine(){return zC}get shaderPreludeCode(){return Hd.projectionMercator}get vertexShaderPreludeCode(){return Hd.projectionMercator.vertexSource}get subdivisionGranularity(){return Vw.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}destroy(){}getMeshFromTileID(e,r,t,a,i){if(this._cachedMesh)return this._cachedMesh;let o=new Kp;o.emplaceBack(0,0),o.emplaceBack(xa,0),o.emplaceBack(0,xa),o.emplaceBack(xa,xa);let s=e.createVertexBuffer(o,G0.members),l=Zs.simpleSegment(0,0,4,2),n=new Vd;n.emplaceBack(1,0,2),n.emplaceBack(1,2,3);let u=e.createIndexBuffer(n);return this._cachedMesh=new Z1(s,u,l),this._cachedMesh}recalculate(){}hasTransition(){return!1}},$3=class EQ{constructor(r=0,t=0,a=0,i=0){if(isNaN(r)||r<0||isNaN(t)||t<0||isNaN(a)||a<0||isNaN(i)||i<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=r,this.bottom=t,this.left=a,this.right=i}interpolate(r,t,a){return t.top!=null&&r.top!=null&&(this.top=Xs.number(r.top,t.top,a)),t.bottom!=null&&r.bottom!=null&&(this.bottom=Xs.number(r.bottom,t.bottom,a)),t.left!=null&&r.left!=null&&(this.left=Xs.number(r.left,t.left,a)),t.right!=null&&r.right!=null&&(this.right=Xs.number(r.right,t.right,a)),this}getCenter(r,t){let a=Gn((this.left+r-this.right)/2,0,r),i=Gn((this.top+t-this.bottom)/2,0,t);return new zr(a,i)}equals(r){return this.top===r.top&&this.bottom===r.bottom&&this.left===r.left&&this.right===r.right}clone(){return new EQ(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}},Y3=class{constructor(e,r){var t;this.applyConstrain=(a,i)=>this._constrainOverride===null?this._callbacks.defaultConstrain(a,i):this._constrainOverride(a,i),this._callbacks=e,this._tileSize=512,this._renderWorldCopies=r?.renderWorldCopies===void 0||!!r?.renderWorldCopies,this._minZoom=r?.minZoom||0,this._maxZoom=r?.maxZoom||22,this._minPitch=r?.minPitch===void 0||r?.minPitch===null?0:r?.minPitch,this._maxPitch=r?.maxPitch===void 0||r?.maxPitch===null?60:r?.maxPitch,this._constrainOverride=(t=r?.constrainOverride)!=null?t:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new ln(0,0),this._elevation=0,this._zoom=0,this._tileZoom=L8(this._zoom),this._scale=bf(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new $3,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,r,t){this._constrainOverride=e.constrainOverride,this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=L8(this._zoom),this._scale=bf(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new $3(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!t&&e.autoCalculateNearFarZ,r&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){if(this._minZoom===e)return;this._minZoom=e;let r=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=r}get maxZoom(){return this._maxZoom}setMaxZoom(e){if(this._maxZoom===e)return;this._maxZoom=e;let r=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=r}get minPitch(){return this._minPitch}setMinPitch(e){if(this._minPitch===e)return;this._minPitch=e;let r=this._unmodified;this.setPitch(Math.max(this.pitch,e)),this._unmodified=r}get maxPitch(){return this._maxPitch}setMaxPitch(e){if(this._maxPitch===e)return;this._maxPitch=e;let r=this._unmodified;this.setPitch(Math.min(this.pitch,e)),this._unmodified=r}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){e===void 0&&(e=null),this._constrainOverride!==e&&(this._constrainOverride=e,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new zr(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){let r=qh(e,-180,180)*Math.PI/180;this._bearingInRadians!==r&&(this._unmodified=!1,this._bearingInRadians=r,this._calcMatrices(),this._rotationMatrix=XN(),bme(this._rotationMatrix,this._rotationMatrix,-this._bearingInRadians))}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let r=Gn(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==r&&(this._unmodified=!1,this._pitchInRadians=r,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){let r=e/180*Math.PI;this._rollInRadians!==r&&(this._unmodified=!1,this._rollInRadians=r,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return cp(this._fovInRadians)}setFov(e){e=Gn(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=il(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let r=this.applyConstrain(this._center,e).zoom;this._zoom!==r&&(this._unmodified=!1,this._zoom=r,this._tileZoom=Math.max(0,Math.floor(r)),this._scale=bf(r),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(e){(e.lat!==this._center.lat||e.lng!==this._center.lng)&&(this._unmodified=!1,this._center=e,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,r){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=r,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,r,t){this._unmodified=!1,this._edgeInsets.interpolate(e,r,t),this.constrainInternal(),this._calcMatrices()}resize(e,r,t=!0){this._width=e,this._height=r,t&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var e,r;return((e=this._latRange)==null?void 0:e.length)!==2||((r=this._lngRange)==null?void 0:r.length)!==2?null:new Qh([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-zd,zd])}getCameraQueryGeometry(e,r){if(r.length===1)return[r[0],e];{let{minX:t,minY:a,maxX:i,maxY:o}=Xh.fromPoints(r).extend(e);return[new zr(t,a),new zr(i,a),new zr(i,o),new zr(t,o),new zr(t,a)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:r,zoom:t}=this.applyConstrain(this.center,this.zoom);this.setCenter(r),this.setZoom(t),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._pixelPerMeter=Qv(1,this.center.lat)*this.worldSize,!this._width||!this._height)return;this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=Id(new Float64Array(16));wc(e,e,[this._width/2,-this._height/2,1]),Xl(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=Id(new Float64Array(16)),wc(e,e,[1,-1,1]),Xl(e,e,[-1,-1,0]),wc(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e;let r=this.fovInRadians/2;this._cameraToCenterDistance=.5/Math.tan(r)*this._height,this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,r,t,a){let i=t===void 0?this.bearing:t,o=a=a===void 0?this.pitch:a,{distanceToCenter:s,clampedElevation:l}=this._distanceToCenterFromAltElevationPitch(r,this.elevation,o),{x:n,y:u}=BE(o,i),c=$o.fromLngLat(e,r),f=y5(1,c.y),h,d,p=0;do{if(p+=1,p>10)break;d=s/f;let g=n*d,m=u*d;h=new $o(c.x+g,c.y+m),f=1/h.meterInMercatorCoordinateUnits()}while(Math.abs(s-d*f)>1e-12);return{center:h.toLngLat(),elevation:l,zoom:Tc(this.height/2/Math.tan(this.fovInRadians/2)/d/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e===0)return;let r=1/this.worldSize,t=Qv(1,this.center.lat)*this.worldSize,a=$o.fromLngLat(this.center,this.elevation),i=a.x/r,o=a.y/r,s=a.z/r,l=this.pitch,n=this.bearing,{x:u,y:c,z:f}=BE(l,n),h=this.cameraToCenterDistance,d=i+h*-u,p=o+h*-c,g=s+h*f,{distanceToCenter:m,clampedElevation:y}=this._distanceToCenterFromAltElevationPitch(g/t,e,l),_=m*t,v=d+u*_,x=p+c*_,E=new $o(v*r,x*r,0).toLngLat(),M=Qv(1,E.lat),C=Tc(this.height/2/Math.tan(this.fovInRadians/2)/m/M/this.tileSize);this._elevation=y,this._center=E,this.setZoom(C)}_distanceToCenterFromAltElevationPitch(e,r,t){let a=-Math.cos(il(t)),i=e-r,o,s=r;return a*i>=0||Math.abs(a)<.1?(o=1e4,s=e+o*a):o=-i/a,{distanceToCenter:o,clampedElevation:s}}getCameraPoint(){let e=this.pitchInRadians,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new zr(r*Math.sin(this.rollInRadians),r*Math.cos(this.rollInRadians)))}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let r=e.canonical.z>=0?1<a}allowWorldCopies(){return!0}prepareNextFrame(){}},dU=pl([{name:"a_pos3d",type:"Int16",components:3}]),pU=class extends Zl{constructor(e){super(),this._lastTilesetChange=is(),this.tileManager=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null,this.releaseAllRTT()}getSource(){return this.tileManager._source}update(e,r){this.tileManager.update(e,r),this._renderableTilesKeys=[];let t={},a=!1;for(let i of W1(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r,calculateTileZoom:this.tileManager._source.calculateTileZoom}))t[i.key]=!0,this._renderableTilesKeys.push(i.key),this._tiles[i.key]||(i.terrainRttPosMatrix32f=new Float32Array(16),Rd(i.terrainRttPosMatrix32f,0,xa,xa,0,0,1),this._tiles[i.key]=new kC(i,this.tileSize),this._lastTilesetChange=is(),a=!0);for(let i in this._tiles)t[i]||(this._tiles[i].releaseRTT(this.tileManager.map.painter),delete this._tiles[i],a=!0);return a}releaseRTT(e){for(let r in this._tiles){let t=this._tiles[r];(t.tileID.equals(e)||t.tileID.isChildOf(e)||e.isChildOf(t.tileID))&&t.releaseRTT(this.tileManager.map.painter)}}releaseAllRTT(){for(let e in this._tiles)this._tiles[e].releaseRTT(this.tileManager.map.painter)}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,r){return r?this._getTerrainCoordsForTileRanges(e,r):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let r={};for(let t of this._renderableTilesKeys){let a=this._tiles[t].tileID,i=e.clone(),o=qv();if(a.canonical.equals(e.canonical))Rd(o,0,xa,xa,0,0,1);else if(a.canonical.isChildOf(e.canonical)){let s=a.canonical.z-e.canonical.z,l=a.canonical.x-(a.canonical.x>>s<>s<>s;Rd(o,0,u,u,0,0,1),Xl(o,o,[-l*u,-n*u,0])}else if(e.canonical.isChildOf(a.canonical)){let s=e.canonical.z-a.canonical.z,l=e.canonical.x-(e.canonical.x>>s<>s<>s;Rd(o,0,xa,xa,0,0,1),Xl(o,o,[l*u,n*u,0]),wc(o,o,[1/2**s,1/2**s,0])}else continue;i.terrainRttPosMatrix32f=new Float32Array(o),r[t]=i}return r}_getTerrainCoordsForTileRanges(e,r){let t={};for(let a of this._renderableTilesKeys){let i=this._tiles[a].tileID;if(!this._isWithinTileRanges(i,r))continue;let o=e.clone(),s=qv();if(i.canonical.z===e.canonical.z){let l=e.canonical.x-i.canonical.x+e.wrap*(1<e.canonical.z){let l=i.canonical.z-e.canonical.z,n=i.canonical.x-(i.canonical.x>>l<>l<>l),f=e.canonical.y-(i.canonical.y>>l),h=xa>>l;Rd(s,0,h,h,0,0,1),Xl(s,s,[-n*h+c*xa,-u*h+f*xa,0])}else{let l=e.canonical.z-i.canonical.z,n=e.canonical.x-(e.canonical.x>>l<>l<>l)-i.canonical.x,f=(e.canonical.y>>l)-i.canonical.y,h=xa<i.maxzoom&&(o=i.maxzoom),o=i.minzoom&&!s?.dem;)s=this.findTileInCaches(e.scaledTo(o--).key);return s}findTileInCaches(e){let r=this.tileManager.getTileByID(e);return r||(r=this.tileManager._outOfViewCache.getByKey(e),r)}anyTilesAfterTime(e=is()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,r){let t=r[e.canonical.z];return!!t&&(e.wrap>t.minWrap||e.wrap=t.minTileXWrapped&&e.canonical.x<=t.maxTileXWrapped&&e.canonical.y>=t.minTileY&&e.canonical.y<=t.maxTileY)}},OC=xa*(1-1e-12),vU=class{constructor(e,r,t,a="auto"){this._meshCache={},this.painter=e,this.tileManager=new pU(r),this.options=t,this.exaggeration=typeof t.exaggeration=="number"?t.exaggeration:1,this._terrainSkirtLength=a,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache=new Map,this._elevationSamplerCache=new Map}destroy(){this._fbo&&(this._fbo=(this._fbo.destroy(),null)),this._fboDepthTexture&&(this._fboDepthTexture=(this._fboDepthTexture.destroy(),null)),this._emptyDemTexture&&(this._emptyDemTexture=(this._emptyDemTexture.destroy(),null)),this._emptyDepthTexture&&(this._emptyDepthTexture=(this._emptyDepthTexture.destroy(),null));for(let e in this._meshCache)this._meshCache[e].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(e,r,t,a=xa){let i=e.normalizeCoordinates(r,t,a);if(!i)return 0;let o=this.getElevationSampler(i.tileID);return o?o(i.x,i.y,a):0}getElevationForLngLatZoom(e,r){if(!tz(r,e.wrap()))return 0;let{tileID:t,mercatorX:a,mercatorY:i}=this._getOverscaledTileIDFromLngLatZoom(e,r);return this.getElevation(t,a%xa,i%xa,xa)}getElevationForLngLat(e,r){let t=this.getCoverageIndex();if(t){let o=$o.fromLngLat(e),s=Qk(t,this.exaggeration,o.x,o.y);if(s.demLoaded)return s.elevation}let a=W1(r,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),i=0;for(let o of a)o.canonical.z>i&&(i=Math.min(o.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,i)}getElevation(e,r,t,a=xa){return this.getDEMElevation(e,r,t,a)*this.exaggeration}resetElevationCache(){this._elevationSamplerCache.clear(),this._coverageIndex=void 0}getCoverageIndex(){return this._coverageIndex===void 0&&(this._coverageIndex=this._buildCoverageIndex()),this._coverageIndex}_buildCoverageIndex(){let e=[],r=new Map,t=0,a=0;for(let i of this.tileManager.getRenderableTiles()){if(!i)continue;let{canonical:o,wrap:s}=i.tileID;e.includes(o.z)||e.push(o.z);let l=this.getElevationSampler(i.tileID);r.set(`${s}/${o.z}/${o.x}/${o.y}`,l);let{minElevation:n,maxElevation:u}=this.getMinMaxElevation(i.tileID);t=Math.min(t,n??0),a=Math.max(a,u??0)}return r.size===0?null:(e.sort((i,o)=>o-i),{zooms:e,samplerPerTile:r,minElevation:t-10,maxElevation:a+10})}getElevationSampler(e){let r=e.key,t=this._elevationSamplerCache.get(r);if(t)return t;let a=this.tileManager.getSourceTile(e,!0),i=a?.dem;if(!a||!i)return null;let o=this._getDEMTileMatrix(e,a),s=o[0]*i.dim,l=o[5]*i.dim,n=o[12]*i.dim,u=o[13]*i.dim,c=(f,h,d)=>{let p=d===8192?1:xa/d;return i.sampleBilinear(f*p*s+n,h*p*l+u)};return this._elevationSamplerCache.set(r,c),c}_getDEMTileMatrix(e,r){let t=`${r.tileID.key}/${e.key}`,a=this._demMatrixCache.get(t);if(a)return a;let i=this.tileManager.getSource().maxzoom,o=e.canonical.z-r.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=i?o=e.canonical.z-i:vo("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let s=e.canonical.x-(e.canonical.x>>o<>o<0,a=t&&e.canonical.y===0,i=t&&e.canonical.y===(1<{a=Gn(+a,this.minZoom,this.maxZoom);let i={center:new ln(t.lng,t.lat),zoom:a},o=this._helper._lngRange;!this._helper._renderWorldCopies&&o===null&&(o=[-179.9999999999,180-1e-10]);let s=this.tileSize*bf(i.zoom),l=0,n=s,u=0,c=s,f=0,h=0,{x:d,y:p}=this.size;if(this._helper._latRange){let x=this._helper._latRange;l=y1(x[1])*s,n=y1(x[0])*s,n-ln&&(_=n-x)}if(o){let x=(u+c)/2,E=g;this._helper._renderWorldCopies&&(E=qh(g,x-s/2,x+s/2));let M=d/2;E-Mc&&(y=c-M)}if(y!==void 0||_!==void 0){let x=new zr(y??g,_??m);i.center=h_(s,x).wrap()}return i},this.applyConstrain=(t,a)=>this._helper.applyConstrain(t,a),this._helper=new Y3({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(t,a)=>this.defaultConstrain(t,a)},r),this._coveringTilesDetailsProvider=new hU}clone(){let r=new SQ;return r.apply(this,!1),r}apply(r,t,a){this._helper.apply(r,t,a)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(r){let t=[new U_(0,r)];if(this._helper._renderWorldCopies){let a=this.screenPointToMercatorCoordinate(new zr(0,0)),i=this.screenPointToMercatorCoordinate(new zr(this._helper._width,0)),o=this.screenPointToMercatorCoordinate(new zr(this._helper._width,this._helper._height)),s=this.screenPointToMercatorCoordinate(new zr(0,this._helper._height)),l=Math.floor(Math.min(a.x,i.x,o.x,s.x)),n=Math.floor(Math.max(a.x,i.x,o.x,s.x));for(let u=l-1;u<=n+1;u++)u!==0&&t.push(new U_(u,r))}return t}getCameraFrustum(){return G3.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(r){let t=this.screenPointToLocation(this.centerPoint,r),a=r?r.getElevationForLngLat(t,this):0;this._helper.recalculateZoomAndCenter(a)}setLocationAtPoint(r,t,a=this.elevation){let i=a-this.elevation,o=this.screenPointToMercatorCoordinateAtZ(t,i),s=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,0),l=$o.fromLngLat(r),n=new $o(l.x-(o.x-s.x),l.y-(o.y-s.y));this.setCenter(n?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(r,t){return t?this.coordinatePoint($o.fromLngLat(r),t.getElevationForLngLat(r,this),this._pixelMatrix3D):this.coordinatePoint($o.fromLngLat(r))}screenPointToLocation(r,t){var a;return(a=this.screenPointToMercatorCoordinate(r,t))==null?void 0:a.toLngLat()}screenPointToLocationAtElevation(r,t){var a;return(a=this.screenPointToMercatorCoordinateAtZ(r,t-this.elevation))==null?void 0:a.toLngLat()}screenPointToMercatorCoordinate(r,t){if(t){let a=this.screenTerrainPointToMercatorCoordinate(r,t);if(a!=null)return a}return this.screenPointToMercatorCoordinateAtZ(r)}screenTerrainPointToMercatorCoordinate(r,t){let a=t.getCoverageIndex();if(!a)return null;let{near:i,far:o}=this.getRaySegmentFromPixel(r),s=this.worldSize,l=o[0]-i[0],n=o[1]-i[1],u=o[2]-i[2],c={index:a,exaggeration:t.exaggeration,near:i,dx:l,dy:n,dz:u,worldSize:s},f=0,h=1;if(u===0){if(i[2]>a.maxElevation||i[2]h)return null}let d=Math.hypot(l,n),p=Gn(Math.ceil(d*(h-f)/4),1,512),g=0,m=!T3(c,0);for(let y=0;y<=p;y++){let _=f+(h-f)*y/p;if(!m)m=!T3(c,_);else if(T3(c,_)){let{lo:v,hi:x}=P8(c,T3,g,_,.001/d),E=A3(c,v),M=A3(c,x),C=i[2]+v*u-E.elevation,w=i[2]+x*u-M.elevation,k=E.covered&&C>w?Gn(v+C*(x-v)/(C-w),v,x):x;return new $o((i[0]+k*l)/s,(i[1]+k*n)/s,A3(c,k).elevation)}g=_}return null}getRaySegmentFromPixel(r){let t=[r.x,r.y,0,1],a=[r.x,r.y,1,1];Cu(t,t,this._pixelMatrixInverse),Cu(a,a,this._pixelMatrixInverse);let i=t[3],o=a[3],s=this.elevation;return{near:[t[0]/i,t[1]/i,t[2]/i+s],far:[a[0]/o,a[1]/o,a[2]/o+s]}}screenPointToMercatorCoordinateAtZ(r,t){let a=t||0,{near:i,far:o}=this.getRaySegmentFromPixel(r),s=i[2]===o[2]?0:(a+this.elevation-i[2])/(o[2]-i[2]);return new $o(Xs.number(i[0],o[0],s)/this.worldSize,Xs.number(i[1],o[1],s)/this.worldSize,a)}coordinatePoint(r,t=0,a=this._pixelMatrix){let i=[r.x*this.worldSize,r.y*this.worldSize,t,1];return Cu(i,i,a),new zr(i[0]/i[3],i[1]/i[3])}getBounds(){let r=Math.max(0,this._helper._height/2-d_(this));return new Qh().extend(this.screenPointToLocation(new zr(0,r))).extend(this.screenPointToLocation(new zr(this._helper._width,r))).extend(this.screenPointToLocation(new zr(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new zr(0,this._helper._height)))}isPointOnMapSurface(r,t){return t?this.screenTerrainPointToMercatorCoordinate(r,t)!=null:r.y>this.height/2-d_(this)}calculatePosMatrix(r,t=!1,a=!1){var i;let o=(i=r.key)!=null?i:_1(r.wrap,r.canonical.z,r.canonical.z,r.canonical.x,r.canonical.y),s=t?this._alignedPosMatrixCache:this._posMatrixCache;if(s.has(o)){let u=s.get(o);return a?u.f32:u.f64}let l=zE(r,this.worldSize);t1(l,t?this._alignedProjMatrix:this._viewProjMatrix,l);let n={f64:l,f32:new Float32Array(l)};return s.set(o,n),a?n.f32:n.f64}calculateFogMatrix(r){let t=r.key,a=this._fogMatrixCacheF32;if(a.has(t))return a.get(t);let i=zE(r,this.worldSize);return t1(i,this._fogMatrix,i),a.set(t,new Float32Array(i)),a.get(t)}calculateCenterFromCameraLngLatAlt(r,t,a,i){return this._helper.calculateCenterFromCameraLngLatAlt(r,t,a,i)}calculateCameraOptionsFromTo(r,t,a,i){let o=$o.fromLngLat(r,t),s=$o.fromLngLat(a,i),l=s.x-o.x,n=s.y-o.y,u=s.z-o.z,c=Math.hypot(l,n,u);if(c===0)throw Error("Can't calculate camera options with same From and To");let f=Math.hypot(l,n),h=Tc(this.cameraToCenterDistance/c/this.tileSize),d=cp(Math.atan2(l,-n)),p=cp(Math.acos(f/c));return p=u<0?90-p:90+p,{center:s.toLngLat(),elevation:i,zoom:h,pitch:p,bearing:d}}_calculateNearFarZIfNeeded(r,t,a){if(!this._helper.autoCalculateNearFarZ)return;let i=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),o=r-i*this._helper._pixelPerMeter/Math.cos(t),s=i<0?o:r,l=Math.PI/2+this.pitchInRadians,n=il(this.fov)*(Math.abs(Math.cos(il(this.roll)))*this.height+Math.abs(Math.sin(il(this.roll)))*this.width)/this.height*(.5+a.y/this.height),u=Math.sin(n)*s/Math.sin(Gn(Math.PI-l-n,.01,Math.PI-.01)),c=d_(this),f=Math.atan(c/this._helper.cameraToCenterDistance),h=il(90-N0),d=f>h?2*f*(.5+a.y/(c*2)):h,p=Math.sin(d)*s/Math.sin(Gn(Math.PI-l-d,.01,Math.PI-.01)),g=Math.min(u,p);this._helper._farZ=(Math.cos(Math.PI/2-t)*g+s)*1.01,this._helper._nearZ=this._helper._height/50}_calcMatrices(){let r=this.centerOffset,t=fp(this.worldSize,this.center),a=t.x,i=t.y,o=il(Math.min(this.pitch,N0)),s=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(o));this._calculateNearFarZIfNeeded(s,o,r);let l;l=new Float64Array(16),W2(l,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),S1e(this._invProjMatrix,l),l[8]=-r.x*2/this._helper._width,l[9]=r.y*2/this._helper._height,this._projectionMatrix=zM(l),wc(l,l,[1,-1,1]),Xl(l,l,[0,0,-this._helper.cameraToCenterDistance]),A0(l,l,-this.rollInRadians),r1(l,l,this.pitchInRadians),A0(l,l,-this.bearingInRadians),Xl(l,l,[-a,-i,0]),this._mercatorMatrix=wc([],l,[this.worldSize,this.worldSize,this.worldSize]),wc(l,l,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=t1(new Float64Array(16),this.clipSpaceToPixelsMatrix,l),Xl(l,l,[0,0,-this.elevation]),this._viewProjMatrix=l,this._invViewProjMatrix=Yb([],l);let n=[0,0,-1,1];Cu(n,n,this._invViewProjMatrix),this._cameraPosition=[n[0]/n[3],n[1]/n[3],n[2]/n[3]],this._fogMatrix=new Float64Array(16),W2(this._fogMatrix,this.fovInRadians,this.width/this.height,s,this._helper._farZ),this._fogMatrix[8]=-r.x*2/this.width,this._fogMatrix[9]=r.y*2/this.height,wc(this._fogMatrix,this._fogMatrix,[1,-1,1]),Xl(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),A0(this._fogMatrix,this._fogMatrix,-this.rollInRadians),r1(this._fogMatrix,this._fogMatrix,this.pitchInRadians),A0(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),Xl(this._fogMatrix,this._fogMatrix,[-a,-i,0]),wc(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),Xl(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=t1(new Float64Array(16),this.clipSpaceToPixelsMatrix,l);let u=this._helper._width%2/2,c=this._helper._height%2/2,f=Math.cos(this.bearingInRadians),h=Math.sin(-this.bearingInRadians),d=a-Math.round(a)+f*u+h*c,p=i-Math.round(i)+f*c+h*u,g=new Float64Array(l);if(Xl(g,g,[d>.5?d-1:d,p>.5?p-1:p,0]),this._alignedProjMatrix=g,l=Yb(new Float64Array(16),this._pixelMatrix),!l)throw Error("failed to invert matrix");this._pixelMatrixInverse=l,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let r=this.screenPointToMercatorCoordinate(new zr(0,0)),t=[r.x*this.worldSize,r.y*this.worldSize,0,1];return Cu(t,t,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this.cameraToCenterDistance/this.pixelsPerMeter+this.elevation}getCameraLngLat(){let r=Qv(1,this.center.lat)*this.worldSize,t=this._helper.cameraToCenterDistance/r;return x5(this.center,this.elevation,this.pitch,this.bearing,t).toLngLat()}lngLatToCameraDepth(r,t){let a=$o.fromLngLat(r),i=[a.x*this.worldSize,a.y*this.worldSize,t,1];return Cu(i,i,this._viewProjMatrix),i[2]/i[3]}getProjectionData(r){let{overscaledTileID:t,aligned:a,applyTerrainMatrix:i}=r,o=this._helper.getMercatorTileCoordinates(t),s=t?this.calculatePosMatrix(t,a,!0):null,l;return l=t?.terrainRttPosMatrix32f&&i?t.terrainRttPosMatrix32f:s||OI(),{mainMatrix:l,tileMercatorCoords:o,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:l,clipAntimeridian:!1}}isLocationOccluded(r){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(r,t,a){return 1}transformLightDirection(r){return BM(r)}getRayDirectionFromPixel(r){throw Error("Not implemented.")}projectTileCoordinates(r,t,a,i){let o=this.calculatePosMatrix(a),s;i==null?(s=[r,t,0,1],Zk(s,s,o)):(s=[r,t,i,1],Cu(s,s,o));let l=s[3];return{point:new zr(s[0]/l,s[1]/l),signedDistanceFromCamera:l,isOccluded:!1}}populateCache(r){for(let t of r)this.calculatePosMatrix(t)}getProjectionDataForCustomLayer(r=!0){let t=new Yu(0,0,0,0,0),a=this.getProjectionData({overscaledTileID:t,applyGlobeMatrix:r}),i=zE(t,this.worldSize);t1(i,this._viewProjMatrix,i);let o=[xa,xa,this.worldSize/this._helper.pixelsPerMeter],s=qv();return wc(s,i,o),Ci(ja({},a),{tileMercatorCoords:[0,0,1,1],fallbackMatrix:s,mainMatrix:s})}getFastPathSimpleProjectionMatrix(r){return this.calculatePosMatrix(r)}},ax=class{get useGlobeControls(){return!1}handlePanInertia(e,r){let t=e.mag(),a=Math.abs(d_(r));return{easingOffset:e.mult(Math.min(a*.75/t,1)),easingCenter:r.center}}handleMapControlsRollPitchBearingZoom(e,r){e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta),e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta)}handleMapControlsPan(e,r,t){e.around.distSqr(r.centerPoint)<.01||r.setLocationAtPoint(t,e.around,e.aroundElevation)}cameraForBoxAndBearing(e,r,t,a,i){return z8(e,r,t,a,i)}handleJumpToCenterZoom(e,r){let t=r.zoom===void 0?e.zoom:+r.zoom;e.zoom!==t&&e.setZoom(+r.zoom),r.center!==void 0&&e.setCenter(ln.convert(r.center))}handleEaseTo(e,r){let t=e.zoom,a=e.padding,i={roll:e.roll,pitch:e.pitch,bearing:e.bearing},o={roll:r.roll===void 0?e.roll:r.roll,pitch:r.pitch===void 0?e.pitch:r.pitch,bearing:r.bearing===void 0?e.bearing:r.bearing},s=r.zoom!==void 0,l=!e.isPaddingEqual(r.padding),n=!1,u=s?+r.zoom:e.zoom,c=e.centerPoint.add(r.offsetAsPoint),f=e.screenPointToLocation(c),{center:h,zoom:d}=e.applyConstrain(ln.convert(r.center||f),u??t);w3(e,h);let p=fp(e.worldSize,f),g=fp(e.worldSize,h).sub(p),m=bf(d-t);return n=d!==t,{easeFunc:y=>{if(n&&e.setZoom(Xs.number(t,d,y)),UI(i,o)||R8({startEulerAngles:i,endEulerAngles:o,tr:e,k:y,useSlerp:i.roll!=o.roll}),l&&(e.interpolatePadding(a,r.padding,y),c=e.centerPoint.add(r.offsetAsPoint)),r.around)e.setLocationAtPoint(r.around,r.aroundPoint);else{let _=bf(e.zoom-t),v=(d>t?Math.min(2,m):Math.max(.5,m))**(1-y),x=h_(e.worldSize,p.add(g.mult(y*v)).mult(_));e.setLocationAtPoint(e.renderWorldCopies?x.wrap():x,c)}},isZooming:n,elevationCenter:h}}handleFlyTo(e,r){let t=r.zoom!==void 0,a=e.zoom,i=e.applyConstrain(ln.convert(r.center||r.locationAtOffset),t?+r.zoom:a),o=i.center,s=i.zoom;w3(e,o);let l=e.worldSize,n=fp(l,r.locationAtOffset),u=fp(l,o).sub(n),c=u.mag(),f=bf(s-a),h=r.minZoom===void 0?e.minZoom:+r.minZoom,d=Math.max(h,e.minZoom),p=Math.min(d,a,s),g=e.applyConstrain(o,p).zoom;return{easeFunc:(m,y,_,v)=>{e.setZoom(m===1?s:a+Tc(y));let x=m===1?o:h_(l,n.add(u.mult(_)));e.setLocationAtPoint(e.renderWorldCopies?x.wrap():x,v)},scaleOfZoom:f,targetCenter:o,scaleOfMinZoom:bf(g-a),pixelPathLength:c}}},gU=()=>mU||(mU=new Du({type:new Ti(ta.projection.type,"type")})),X3=new Vw({fill:new yp(128,2),line:new yp(512,0),tile:new yp(128,32),stencil:new yp(128,1),circle:3}),jC=class{constructor(){this._tileMeshCache={}}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return Hd.projectionGlobe}get vertexShaderPreludeCode(){return Hd.projectionMercator.vertexSource}get subdivisionGranularity(){return X3}get useGlobeControls(){return!0}destroy(){}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,r,t,a,i){let o=(i==="stencil"?X3.stencil:X3.tile).getGranularityForZoomLevel(r.z),s=r.y===0&&a,l=r.y===(1<0}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}getMeshFromTileID(e,r,t,a,i){return this.currentProjection.getMeshFromTileID(e,r,t,a,i)}setProjection(e){this._transitionable.setValue("type",e?.type||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}},Z3=Math.PI*.98,yU=class{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,r,t,a){let i=`${e.z}_${e.x}_${e.y}_${a?.terrain?"t":""}_${Math.round(t)}`,o=this._cache.get(i);if(o)return o;let s=this._cachePrevious.get(i);if(s)return this._cache.set(i,s),s;let l=this._boundingVolumeFactory(e,r,t,a);return this._cache.set(i,l),this._hadAnyChanges=!0,l}},K3=class AD{constructor(r,t,a,i){this.min=a,this.max=i,this.points=r,this.planes=t}static fromAabb(r,t){let a=[];for(let i=0;i<8;i++)a.push([(i>>0&1)==1?t[0]:r[0],(i>>1&1)==1?t[1]:r[1],(i>>2&1)==1?t[2]:r[2]]);return new AD(a,[[-1,0,0,t[0]],[1,0,0,-r[0]],[0,-1,0,t[1]],[0,1,0,-r[1]],[0,0,-1,t[2]],[0,0,1,-r[2]]],r,t)}static fromCenterSizeAngles(r,t,a){let i=jM([],a[0],a[1],a[2]),o=OM([],[t[0],0,0],i),s=OM([],[0,t[1],0],i),l=OM([],[0,0,t[2]],i),n=[...r],u=[...r];for(let f=0;f<8;f++)for(let h=0;h<3;h++){let d=r[h]+o[h]*((f>>0&1)==1?1:-1)+s[h]*((f>>1&1)==1?1:-1)+l[h]*((f>>2&1)==1?1:-1);n[h]=Math.min(n[h],d),u[h]=Math.max(u[h],d)}let c=[];for(let f=0;f<8;f++){let h=[...r];jh(h,h,Ws([],o,(f>>0&1)==1?1:-1)),jh(h,h,Ws([],s,(f>>1&1)==1?1:-1)),jh(h,h,Ws([],l,(f>>2&1)==1?1:-1)),c.push(h)}return new AD(c,[[...o,-uu(o,c[0])],[...s,-uu(s,c[0])],[...l,-uu(l,c[0])],[-o[0],-o[1],-o[2],-uu(o,c[7])],[-s[0],-s[1],-s[2],-uu(s,c[7])],[-l[0],-l[1],-l[2],-uu(l,c[7])]],n,u)}intersectsFrustum(r){let t=!0,a=this.points.length,i=this.planes.length,o=r.planes.length,s=r.points.length;for(let l=0;l=0&&u++}if(u===0)return 0;u=0&&u++}if(u===0)return 0}return 1}intersectsPlane(r){let t=this.points.length,a=0;for(let i=0;i=0&&a++}return a===t?2:a===0?0:1}},_U=class{constructor(){this._boundingVolumeCache=new yU(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,r,t,a){let i=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(e,r,t,a){return this._boundingVolumeCache.getTileBoundingVolume(e,r,t,a)}_computeTileBoundingVolume(e,r,t,a){var i,o;let s=Math.min(0,t),l=Math.max(0,t);if(a?.terrain){let n=new Yu(e.z,r,e.z,e.x,e.y),u=a.terrain.getMinMaxElevation(n);s=(i=u.minElevation)!=null?i:s,l=Math.max((o=u.maxElevation)!=null?o:l,l)}if(s/=Vc,l/=Vc,s+=1,l+=1,e.z<=0)return K3.fromAabb([-l,-l,-l],[l,l,l]);if(e.z===1)return K3.fromAabb([e.x===0?-l:0,e.y===0?0:-l,-l],[e.x===0?0:l,e.y===0?l:0,l]);{let n=[V0(0,0,e.x,e.y,e.z),V0(xa,0,e.x,e.y,e.z),V0(xa,xa,e.x,e.y,e.z),V0(0,xa,e.x,e.y,e.z)],u=[];for(let T of n)u.push(Ws([],T,l));if(l!==s)for(let T of n)u.push(Ws([],T,s));e.y===0&&u.push([0,1,0]),e.y===(1<=(1<{let i=Gn(t.lat,-zd,zd),o=Gn(+a,this.minZoom+Zu(0,i),this.maxZoom);return{center:new ln(t.lng,i),zoom:o}},this.applyConstrain=(t,a)=>this._helper.applyConstrain(t,a),this._helper=new Y3({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(t,a)=>this.defaultConstrain(t,a)},r),this._coveringTilesDetailsProvider=new _U}clone(){let r=new kQ;return r.apply(this,!1),r}apply(r,t){this._helper.apply(r,t)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixF64}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let r=as();return r[0]=this._cameraPosition[0],r[1]=this._cameraPosition[1],r[2]=this._cameraPosition[2],r}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(r){let{overscaledTileID:t,applyGlobeMatrix:a}=r,i=this._helper.getMercatorTileCoordinates(t);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:i,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!a,fallbackMatrix:this._globeViewProjMatrix32f,clipAntimeridian:t?.canonical.z===0}}_computeClippingPlane(r){let t=this.pitchInRadians,a=this.cameraToCenterDistance/r,i=Math.sin(t)*a,o=Math.cos(t)*a+1,s=1/Math.sqrt(i*i+o*o)*1,l=-i,n=o,u=Math.sqrt(l*l+n*n);l/=u,n/=u;let c=[0,l,n];NM(c,c,[0,0,0],-this.bearingInRadians),Vy(c,c,[0,0,0],-1*this.center.lat*Math.PI/180),a1(c,c,[0,0,0],this.center.lng*Math.PI/180);let f=1/Yp(c);return Ws(c,c,f),[...c,-s*f]}isLocationOccluded(r){return!this.isSurfacePointVisible(pu(r))}transformLightDirection(r){let t=this._helper._center.lng*Math.PI/180,a=this._helper._center.lat*Math.PI/180,i=Math.cos(a),o=[Math.sin(t)*i,Math.sin(a),Math.cos(t)*i],s=[o[2],0,-o[0]],l=[0,0,0];Nf(l,s,o),xf(s,s),xf(l,l);let n=[s[0]*r[0]+l[0]*r[1]+o[0]*r[2],s[1]*r[0]+l[1]*r[1]+o[1]*r[2],s[2]*r[0]+l[2]*r[1]+o[2]*r[2]],u=[0,0,0];return xf(u,n),u}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(r,t,a){let i=_5(r,t,a.canonical),o=z1e(i.x,i.y);return this.getCircleRadiusCorrection()/Math.cos(o[1])}projectTileCoordinates(r,t,a,i){let o=a.canonical,s=V0(r,t,o.x,o.y,o.z),l=1+(i??0)/Vc,n=s[0]*l,u=s[1]*l,c=s[2]*l,f=[n,u,c,1];Cu(f,f,this._globeViewProjMatrixF64);let h;if(l<=1){let d=this._cachedClippingPlane;h=d[0]*s[0]+d[1]*s[1]+d[2]*s[2]+d[3]<0}else h=this._isLineOfSightBlocked(n,u,c);return{point:new zr(f[0]/f[3],f[1]/f[3]),signedDistanceFromCamera:f[3],isOccluded:h}}_isLineOfSightBlocked(r,t,a){let i=this._cameraPosition,o=r-i[0],s=t-i[1],l=a-i[2],n=o*o+s*s+l*l;if(n===0)return!1;let u=Gn(-(i[0]*o+i[1]*s+i[2]*l)/n,0,1),c=i[0]+u*o,f=i[1]+u*s,h=i[2]+u*l;return c*c+f*f+h*h<1}_calcMatrices(){let r=Y1(this.worldSize,this.center.lat),t=qv();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+r*2),W2(t,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let a=this.centerOffset;t[8]=-a.x*2/this._helper._width,t[9]=a.y*2/this._helper._height,this._projectionMatrix=zM(t),this._globeProjMatrixInverted=qv(),Yb(this._globeProjMatrixInverted,t),Xl(t,t,[0,0,-this.cameraToCenterDistance]),A0(t,t,this.rollInRadians),r1(t,t,-this.pitchInRadians),A0(t,t,this.bearingInRadians),Xl(t,t,[0,0,-r]);let i=as();i[0]=r,i[1]=r,i[2]=r,r1(t,t,this.center.lat*Math.PI/180),CI(t,t,-this.center.lng*Math.PI/180),wc(t,t,i),this._globeViewProjMatrixF64=t,this._globeViewProjMatrix32f=new Float32Array(t),this._globeViewProjMatrixF64Inverted=qv(),Yb(this._globeViewProjMatrixF64Inverted,t);let o=as();this._cameraPosition=as(),this._cameraPosition[2]=this.cameraToCenterDistance/r,NM(this._cameraPosition,this._cameraPosition,o,-this.rollInRadians),Vy(this._cameraPosition,this._cameraPosition,o,this.pitchInRadians),NM(this._cameraPosition,this._cameraPosition,o,-this.bearingInRadians),jh(this._cameraPosition,this._cameraPosition,[0,0,1]),Vy(this._cameraPosition,this._cameraPosition,o,-this.center.lat*Math.PI/180),a1(this._cameraPosition,this._cameraPosition,o,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(r);let s=zM(this._globeViewProjMatrixF64Inverted);wc(s,s,[1,1,-1]),this._cachedFrustum=G3.fromInvProjectionMatrix(s,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(r){vo("calculateFogMatrix is not supported on globe projection.");let t=qv();return Id(t),t}getVisibleUnwrappedCoordinates(r){return[new U_(0,r)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(r){if(r){vo("terrain is not fully supported on vertical perspective projection.");return}this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return(Yp(this._cameraPosition)-1)*Vc}getCameraLngLat(){let r=as();return xf(r,this._cameraPosition),$_(r)}lngLatToCameraDepth(r,t){let a=pu(r);Ws(a,a,1+t/Vc);let i=T0();return Cu(i,[a[0],a[1],a[2],1],this._globeViewProjMatrixF64),i[2]/i[3]}populateCache(r){}getBounds(){let r=this.width*.5,t=this.height*.5,a=[new zr(0,0),new zr(r,0),new zr(this.width,0),new zr(this.width,t),new zr(this.width,this.height),new zr(r,this.height),new zr(0,this.height),new zr(0,t)],i=[];for(let f of a)i.push(this.unprojectScreenPoint(f));let o=0,s=0,l=0,n=0,u=this.center;for(let f of i){let h=ch(u.lng,f.lng),d=ch(u.lat,f.lat);ho&&(o=h),dl&&(l=d)}let c=[u.lng+s,u.lat+n,u.lng+o,u.lat+l];return this.isSurfacePointOnScreen([0,1,0])&&(c[3]=90,c[0]=-180,c[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(c[1]=-90,c[0]=-180,c[2]=180),new Qh(c)}calculateCenterFromCameraLngLatAlt(r,t,a,i){return this._helper.calculateCenterFromCameraLngLatAlt(r,t,a,i)}calculateCameraOptionsFromTo(r,t,a,i){let o=ln.convert(a),s=pu(ln.convert(r));Ws(s,s,1+t/Vc);let l=pu(o),n=Ws(as(),l,1+i/Vc),u=FI(as(),s,l),c=Yp(u);if(c=-_&&g<=_,x=y>=-_&&y<=_,E,M;if(v&&x){let T=this.center.lng*Math.PI/180,b=this.center.lat*Math.PI/180,S=Qb(h,T),A=Qb(g,b),F=Qb(d,T),D=Qb(y,b);S+A=0}isSurfacePointOnScreen(r){if(!this.isSurfacePointVisible(r))return!1;let t=T0();return Cu(t,[...r,1],this._globeViewProjMatrixF64),t[0]/=t[3],t[1]/=t[3],t[2]/=t[3],t[0]>-1&&t[0]<1&&t[1]>-1&&t[1]<1&&t[2]>-1&&t[2]<1}unprojectScreenPoint(r){let t=this._cameraPosition,a=this.getRayDirectionFromPixel(r),i=E3(t,a);if(i){let c=as();jh(c,t,[a[0]*i.tMin,a[1]*i.tMin,a[2]*i.tMin]);let f=as();return xf(f,c),$_(f)}let o=this._cachedClippingPlane,s=o[0]*a[0]+o[1]*a[1]+o[2]*a[2],l=-qM(o,t)/s,n=as();if(l>0)jh(n,t,[a[0]*l,a[1]*l,a[2]*l]);else{let c=as();jh(c,t,[a[0]*2,a[1]*2,a[2]*2]);let f=qM(this._cachedClippingPlane,c);hp(n,c,[this._cachedClippingPlane[0]*f,this._cachedClippingPlane[1]*f,this._cachedClippingPlane[2]*f])}let u=q1e(o);return $_(V1e(u.center,u.radius,n))}getProjectionDataForCustomLayer(r=!0){let t=this.getProjectionData({overscaledTileID:new Yu(0,0,0,0,0),applyGlobeMatrix:r});return t.tileMercatorCoords=[0,0,1,1],t}getFastPathSimpleProjectionMatrix(r){}},GC=class CQ{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(r){this._helper.setMinZoom(r)}setMaxZoom(r){this._helper.setMaxZoom(r)}setMinPitch(r){this._helper.setMinPitch(r)}setMaxPitch(r){this._helper.setMaxPitch(r)}setRenderWorldCopies(r){this._helper.setRenderWorldCopies(r)}setBearing(r){this._helper.setBearing(r)}setPitch(r){this._helper.setPitch(r)}setRoll(r){this._helper.setRoll(r)}setFov(r){this._helper.setFov(r)}setZoom(r){this._helper.setZoom(r)}setCenter(r){this._helper.setCenter(r)}setElevation(r){this._helper.setElevation(r)}setMinElevationForCurrentTile(r){this._helper.setMinElevationForCurrentTile(r)}setPadding(r){this._helper.setPadding(r)}interpolatePadding(r,t,a){this._helper.interpolatePadding(r,t,a)}isPaddingEqual(r){return this._helper.isPaddingEqual(r)}resize(r,t,a=!0){this._helper.resize(r,t,a)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(r){this._helper.setMaxBounds(r)}setConstrainOverride(r){this._helper.setConstrainOverride(r)}overrideNearFarZ(r,t){this._helper.overrideNearFarZ(r,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(r){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),r)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(r){this._globeness=r,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(r){this._globeness=1,this.defaultConstrain=(t,a)=>this.currentTransform.defaultConstrain(t,a),this.applyConstrain=(t,a)=>this._helper.applyConstrain(t,a),this._helper=new Y3({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(t,a)=>this.defaultConstrain(t,a)},r),this._globeness=1,this._mercatorTransform=new rx,this._verticalPerspectiveTransform=new VC}clone(){let r=new CQ;return r._globeness=this._globeness,r.apply(this,!1),r}apply(r,t){this._helper.apply(r,t),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(r){let t=this._mercatorTransform.getProjectionData(r),a=this._verticalPerspectiveTransform.getProjectionData(r);return{mainMatrix:this.isGlobeRendering?a.mainMatrix:t.mainMatrix,clippingPlane:a.clippingPlane,tileMercatorCoords:a.tileMercatorCoords,projectionTransition:r.applyGlobeMatrix?this._globeness:0,fallbackMatrix:t.fallbackMatrix,clipAntimeridian:a.clipAntimeridian}}isLocationOccluded(r){return this.currentTransform.isLocationOccluded(r)}transformLightDirection(r){return this.currentTransform.transformLightDirection(r)}getPixelScale(){return i1(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return i1(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(r,t,a){let i=this._mercatorTransform.getPitchedTextCorrection(r,t,a),o=this._verticalPerspectiveTransform.getPitchedTextCorrection(r,t,a);return i1(i,o,this._globeness)}projectTileCoordinates(r,t,a,i){return this.currentTransform.projectTileCoordinates(r,t,a,i)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(r){return this.currentTransform.calculateFogMatrix(r)}getVisibleUnwrappedCoordinates(r){return this.currentTransform.getVisibleUnwrappedCoordinates(r)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(r){this.currentTransform.recalculateZoomAndCenter(r)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this.currentTransform.getCameraAltitude()}getCameraLngLat(){return this.currentTransform.getCameraLngLat()}lngLatToCameraDepth(r,t){return this.currentTransform.lngLatToCameraDepth(r,t)}populateCache(r){this._mercatorTransform.populateCache(r),this._verticalPerspectiveTransform.populateCache(r)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(r,t,a,i){return this._helper.calculateCenterFromCameraLngLatAlt(r,t,a,i)}calculateCameraOptionsFromTo(r,t,a,i){return this.currentTransform.calculateCameraOptionsFromTo(r,t,a,i)}setLocationAtPoint(r,t,a){if(!this.isGlobeRendering){this._mercatorTransform.setLocationAtPoint(r,t,a),this.apply(this._mercatorTransform,!1);return}this._verticalPerspectiveTransform.setLocationAtPoint(r,t,a),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(r,t){return this.currentTransform.locationToScreenPoint(r,t)}screenPointToMercatorCoordinate(r,t){return this.currentTransform.screenPointToMercatorCoordinate(r,t)}screenTerrainPointToMercatorCoordinate(r,t){return this.currentTransform.screenTerrainPointToMercatorCoordinate(r,t)}screenPointToLocation(r,t){return this.currentTransform.screenPointToLocation(r,t)}screenPointToLocationAtElevation(r,t){return this.currentTransform.screenPointToLocationAtElevation(r,t)}isPointOnMapSurface(r,t){return this.currentTransform.isPointOnMapSurface(r,t)}getRayDirectionFromPixel(r){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(r)}getProjectionDataForCustomLayer(r=!0){let t=this._mercatorTransform.getProjectionDataForCustomLayer(r);if(!this.isGlobeRendering)return t;let a=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(r);return a.fallbackMatrix=t.mainMatrix,a.projectionTransition=this._globeness,a}getFastPathSimpleProjectionMatrix(r){return this.currentTransform.getFastPathSimpleProjectionMatrix(r)}},HC=class u0{get useGlobeControls(){return!0}handlePanInertia(r,t){let a=H1e(r,t);return Math.abs(a.lng-t.center.lng)>180&&(a.lng=t.center.lng+179.5*Math.sign(a.lng-t.center.lng)),{easingCenter:a,easingOffset:new zr(0,0)}}handleMapControlsRollPitchBearingZoom(r,t){let a=r.around,i=t.screenPointToLocation(a);r.bearingDelta&&t.setBearing(t.bearing+r.bearingDelta),r.pitchDelta&&t.setPitch(t.pitch+r.pitchDelta),r.rollDelta&&t.setRoll(t.roll+r.rollDelta);let o=t.zoom;r.zoomDelta&&t.setZoom(t.zoom+r.zoomDelta);let s=t.zoom-o;if(s===0)return;let l=ch(t.center.lng,i.lng),n=l/(Math.abs(l/180)+1),u=ch(t.center.lat,i.lat),c=t.getRayDirectionFromPixel(a),f=t.cameraPosition,h=uu(f,c)*-1,d=as();jh(d,f,[c[0]*h,c[1]*h,c[2]*h]);let p=Yp(d),g=p-1,m=Math.exp(-Math.max(g-.3,0)*.5),y=e2(p,.95,.999,0,1),_=Y1(t.worldSize,t.center.lat)/Math.min(t.width,t.height),v=e2(_,.9,.5,1,.25),x=Math.min(m,i1(1,v,y)),E=(1-bf(-s))*x,M=t.center.lat,C=t.zoom,w=new ln(t.center.lng+n*E,Gn(t.center.lat+u*E,-zd,zd));t.setLocationAtPoint(i,a);let k=t.center,T=e2(Math.abs(l),45,85,0,1),b=Math.max(T,y)**.25,S=ch(k.lng,w.lng),A=ch(k.lat,w.lat);t.setCenter(new ln(k.lng+S*b,k.lat+A*b).wrap()),t.setZoom(C+Zu(M,t.center.lat))}handleMapControlsPan(r,t,a){r.panDelta&&j1e(t,a,t.isPointOnMapSurface(r.around)?r.around:t.centerPoint,r.panDelta)}cameraForBoxAndBearing(r,t,a,i,o){let s=z8(r,t,a,i,o),l=t.left/o.width*2-1,n=(o.width-t.right)/o.width*2-1,u=t.top/o.height*-2+1,c=(o.height-t.bottom)/o.height*-2+1,f=ch(a.getWest(),a.getEast())<0,h=f?a.getEast():a.getWest(),d=f?a.getWest():a.getEast(),p=Math.max(a.getNorth(),a.getSouth()),g=Math.min(a.getNorth(),a.getSouth()),m=h+ch(h,d)*.5,y=p+ch(p,g)*.5,_=o.clone();_.setCenter(s.center),_.setBearing(s.bearing),_.setPitch(0),_.setRoll(0),_.setZoom(s.zoom);let v=_.modelViewProjectionMatrix,x=[pu(a.getNorthWest()),pu(a.getNorthEast()),pu(a.getSouthWest()),pu(a.getSouthEast()),pu(new ln(d,y)),pu(new ln(h,y)),pu(new ln(m,p)),pu(new ln(m,g))],E=pu(s.center),M=1/0;for(let C of x)l<0&&(M=u0.getLesserNonNegativeNonNull(M,u0.solveVectorScale(C,E,v,"x",l))),n>0&&(M=u0.getLesserNonNegativeNonNull(M,u0.solveVectorScale(C,E,v,"x",n))),u>0&&(M=u0.getLesserNonNegativeNonNull(M,u0.solveVectorScale(C,E,v,"y",u))),c<0&&(M=u0.getLesserNonNegativeNonNull(M,u0.solveVectorScale(C,E,v,"y",c)));if(!Number.isFinite(M)||M===0){I8();return}return s.zoom=Math.min(_.zoom+Tc(M),r.maxZoom),s}handleJumpToCenterZoom(r,t){let a=r.center.lat,i=r.applyConstrain(t.center?ln.convert(t.center):r.center,r.zoom).center;r.setCenter(i.wrap());let o=t.zoom===void 0?r.zoom+Zu(a,i.lat):+t.zoom;r.zoom!==o&&r.setZoom(o)}handleEaseTo(r,t){let a=r.zoom,i=r.center,o=r.padding,s={roll:r.roll,pitch:r.pitch,bearing:r.bearing},l={roll:t.roll===void 0?r.roll:t.roll,pitch:t.pitch===void 0?r.pitch:t.pitch,bearing:t.bearing===void 0?r.bearing:t.bearing},n=t.zoom!==void 0,u=!r.isPaddingEqual(t.padding),c=!1,f=t.center?ln.convert(t.center):i,h=r.applyConstrain(f,a).center;w3(r,h);let d=r.clone();d.setCenter(h),d.setZoom(n?+t.zoom:a+Zu(i.lat,f.lat)),d.setBearing(t.bearing);let p=new zr(Gn(r.centerPoint.x+t.offsetAsPoint.x,0,r.width),Gn(r.centerPoint.y+t.offsetAsPoint.y,0,r.height));d.setLocationAtPoint(h,p);let g=(t.offset&&t.offsetAsPoint.mag())>0?d.center:h,m=n?+t.zoom:a+Zu(i.lat,g.lat),y=a+Zu(i.lat,0),_=m+Zu(g.lat,0),v=ch(i.lng,g.lng),x=ch(i.lat,g.lat),E=bf(_-y);return c=m!==a,{easeFunc:M=>{if(UI(s,l)||R8({startEulerAngles:s,endEulerAngles:l,tr:r,k:M,useSlerp:s.roll!=l.roll}),u&&r.interpolatePadding(o,t.padding,M),t.around)vo("Easing around a point is not supported under globe projection."),r.setLocationAtPoint(t.around,t.aroundPoint);else{let C=M*(_>y?Math.min(2,E):Math.max(.5,E))**(1-M),w=j8(i,v,x,C);r.setCenter(w.wrap())}if(c){let C=Xs.number(y,_,M)+Zu(0,r.center.lat);r.setZoom(C)}},isZooming:c,elevationCenter:g}}handleFlyTo(r,t){let a=t.zoom!==void 0,i=r.center,o=r.zoom,s=r.padding,l=!r.isPaddingEqual(t.padding),n=r.applyConstrain(ln.convert(t.center||t.locationAtOffset),o).center,u=a?+t.zoom:r.zoom+Zu(r.center.lat,n.lat),c=r.clone();c.setCenter(n),c.setZoom(u),c.setBearing(t.bearing);let f=new zr(Gn(r.centerPoint.x+t.offsetAsPoint.x,0,r.width),Gn(r.centerPoint.y+t.offsetAsPoint.y,0,r.height));c.setLocationAtPoint(n,f);let h=c.center;w3(r,h);let d=R1e(r,i,h),p=o+Zu(i.lat,0),g=u+Zu(h.lat,0),m=bf(g-p),y=typeof t.minZoom=="number"?+t.minZoom:r.minZoom,_=Math.max(y,r.minZoom)+Zu(h.lat,0),v=Math.min(_,p,g)+Zu(0,h.lat),x=r.applyConstrain(h,v).zoom+Zu(h.lat,0),E=bf(x-p),M=ch(i.lng,h.lng),C=ch(i.lat,h.lat);return{easeFunc:(w,k,T,b)=>{let S=j8(i,M,C,T);l&&r.interpolatePadding(s,t.padding,w);let A=w===1?h:S;r.setCenter(A.wrap());let F=p+Tc(k);r.setZoom(w===1?u:F+Zu(0,A.lat))},scaleOfZoom:m,targetCenter:h,scaleOfMinZoom:E,pixelPathLength:d}}static solveVectorScale(r,t,a,i,o){let s=o,l=i==="x"?[a[0],a[4],a[8],a[12]]:[a[1],a[5],a[9],a[13]],n=[a[3],a[7],a[11],a[15]],u=r[0]*l[0]+r[1]*l[1]+r[2]*l[2],c=r[0]*n[0]+r[1]*n[1]+r[2]*n[2],f=t[0]*l[0]+t[1]*l[1]+t[2]*l[2],h=t[0]*n[0]+t[1]*n[1]+t[2]*n[2],d=(f+l[3]-s*h-s*n[3])/(f-u-s*h+s*c);return f+s*c===u+s*h||n[3]*(u-f)+l[3]*(h-c)+u*h===f*c?null:d}static getLesserNonNegativeNonNull(r,t){return t!==null&&t>=0&&t{for(let o in this.tileManagers){let s=this.tileManagers[o].getSource().type;(s==="vector"||s==="geojson")&&this.tileManagers[o].reload()}},this.map=e,this.dispatcher=new _C(Uk(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(o,s)=>this.getGlyphs(o,s)),this.dispatcher.registerMessageHandler("GI",(o,s)=>this.getImages(o,s)),this.dispatcher.registerMessageHandler("GDA",(o,s)=>this.getDashes(o,s)),this.imageManager=new mj,this.imageManager.setEventedParent(this),this.imageManager.setMissingImageResolver(e._missingStyleImageResolver),this.patternAtlas=new gj(this.imageManager);let i=((t=e._container)==null?void 0:t.lang)||typeof document<"u"&&((a=document.documentElement)==null?void 0:a.lang)||void 0;this.glyphManager=new Tj(e._requestManager,r.localIdeographFontFamily,i),this.lineAtlas=new Lj(256,512),this.crossTileSymbolIndex=new IC,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",$M()),H_().on(U3,this._rtlPluginLoaded),this.on("data",o=>{if(o.dataType!=="source"||o.sourceDataType!=="metadata")return;let s=this.tileManagers[o.sourceId];if(!s)return;let l=s.getSource();if(l?.vectorLayerIds)for(let n in this._layers){let u=this._layers[n];u.source===l.id&&this._validateLayer(u)}})}_setInitialValues(){var e;this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new sw,this._imagesListDirty=!1,this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this._symbolPlacementTriggered=!1,this._placedProjectionTransition=void 0,this.crossTileSymbolIndex=new(((e=this.crossTileSymbolIndex)==null?void 0:e.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(e,r){var t,a,i;this._checkLoaded();let o=r===null?(i=(a=(t=this.stylesheet.state)==null?void 0:t[e])==null?void 0:a.default)!=null?i:null:r;if(up(o,this._globalState[e]))return this;this._globalState[e]=o,this._applyGlobalStateChanges([e])}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();let r=[];for(let t in e)up(this._globalState[t],e[t].default)||(r.push(t),this._globalState[t]=e[t].default);this._applyGlobalStateChanges(r)}_applyGlobalStateChanges(e){if(e.length===0)return;let r=new Set,t={};for(let a of e){t[a]=this._globalState[a];for(let i in this._layers){let o=this._layers[i],s=o.getLayoutAffectingGlobalStateRefs(),l=o.getPaintAffectingGlobalStateRefs(),n=o.getVisibilityAffectingGlobalStateRefs();if(s.has(a)&&r.add(o.source),l.has(a))for(let{name:u,value:c}of l.get(a))this._updatePaintProperty(o,u,c);n?.has(a)&&(o.recalculateVisibility(),this._updateLayer(o))}}this.dispatcher.broadcast("UGS",t);for(let a in this.tileManagers)r.has(a)&&(this._reloadSource(a),this._changed=!0)}loadURL(e){return yi(this,arguments,function*(r,t={},a){this.fire(new _h("dataloading")),t.validate=typeof t.validate!="boolean"||t.validate,this._loadStyleRequest=new AbortController;let i=this._loadStyleRequest;try{let o=yield this.map._requestManager.transformRequest(r,"Style");WM(i.signal);let s=yield x_(o,i);this._loadStyleRequest===i&&(this._loadStyleRequest=null),this._load(s.data,t,a)}catch(o){this._loadStyleRequest===i&&(this._loadStyleRequest=null),o&&!i.signal.aborted&&this.fire(new mn(Ac(o)))}})}loadJSON(e,r={},t){this.fire(new _h("dataloading")),this._frameRequest=new AbortController,Hc.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,r.validate=r.validate!==!1,this._load(e,r,t)}).catch(()=>{})}loadEmpty(){this.fire(new _h("dataloading")),this._load(xU,{validate:!1})}_load(e,r,t){var a,i,o;let s=r.transformStyle?r.transformStyle(t,e):e;if(!(r.validate&&VR(this,s))){s=ja({},s),this._loaded=!0,this.stylesheet=s;for(let l in s.sources)this.addSource(l,s.sources[l],{validate:!1});s.sprite?this._loadSprite(s.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(s.glyphs),this.glyphManager.setFontFaces(s["font-faces"]),this._createLayers(),this.light=new Sj((a=this.stylesheet.light)!=null?a:{},this._globalState),this._setProjectionInternal(((i=this.stylesheet.projection)==null?void 0:i.type)||"mercator"),this.sky=new Dj(this.stylesheet.sky,this._globalState),this.map.setTerrain((o=this.stylesheet.terrain)!=null?o:null,{validate:!1}),this.fire(new _h("data")),this.fire(new P3)}}_createLayers(){var e,r,t;let a=ZN(this.stylesheet.layers);this.setGlobalState((e=this.stylesheet.state)!=null?e:null),this.dispatcher.broadcast("SL",a),this._order=a.map(i=>i.id),this._layers={},this._serializedLayers=null;for(let i of a){let o=GE(i,this._globalState);if(o.setEventedParent(this,{layer:{id:i.id}}),this._layers[i.id]=o,fw(o)&&this.tileManagers[o.source]){let s=(t=(r=i.paint)==null?void 0:r["raster-fade-duration"])!=null?t:o.paint.get("raster-fade-duration");this.tileManagers[o.source].setRasterFadeDuration(s)}}}_loadSprite(e,r=!1,t=void 0){return yi(this,null,function*(){this.imageManager.setLoaded(!1);let a=new AbortController;this._spriteRequest=a;let i;try{let o=yield Fme(e,this.map._requestManager,this.map.getPixelRatio(),a);if(!o)return;for(let s in o){let{loaded:l,removed:n}=this.imageManager.setSpriteImages(s,o[s]);this._markImagesChanged(n),r&&this._markImagesChanged(l)}}catch(o){i=o,a.signal.aborted||this.fire(new mn(i))}finally{this._spriteRequest=null,this.imageManager.setLoaded(!0),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this.imageManager.listImages()),this.fire(new _h("data")),t?.(i)}})}_unloadSprite(){this._markImagesChanged(this.imageManager.removeAllSpriteImages()),this._imagesListDirty=!0,this._changed=!0,this.fire(new _h("data"))}_validateLayer(e){let r=this.tileManagers[e.source];if(!r)return;let t=e.sourceLayer;if(!t)return;let a=r.getSource();(a.type==="geojson"||a.vectorLayerIds&&!a.vectorLayerIds.includes(t))&&this.fire(new mn(Error(`Source layer "${t}" does not exist on source "${a.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.tileManagers)if(!this.tileManagers[e].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(e,r=!1){let t=this._serializedAllLayers();if(!e||e.length===0)return Object.values(r?jf(t):t);let a=[];for(let i of e)if(t[i]){let o=r?jf(t[i]):t[i];a.push(o)}return a}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};let r=Object.keys(this._layers);for(let t of r){let a=this._layers[t];a.type!=="custom"&&(e[t]=a.serialize())}return e}hasTransitions(){var e,r,t;if((e=this.light)!=null&&e.hasTransition()||(r=this.sky)!=null&&r.hasTransition()||(t=this.projection)!=null&&t.hasTransition())return!0;for(let a in this.tileManagers)if(this.tileManagers[a].hasTransition())return!0;for(let a in this._layers)if(this._layers[a].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw Error("Style is not done loading.")}update(e){if(!this._loaded)return;let r=this._changed;if(r){this._imagesListDirty&&(this._imagesListDirty=(this.dispatcher.broadcast("SI",this.imageManager.listImages()),!1));let i=Object.keys(this._updatedLayers),o=Object.keys(this._removedLayers);(i.length||o.length)&&this._updateWorkerLayers(i,o);for(let s in this._updatedSources){let l=this._updatedSources[s];if(l==="reload")this._reloadSource(s);else if(l==="clear")this._clearSource(s);else throw Error(`Invalid action ${l}`)}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let s in this._updatedPaintProps)this._layers[s].updateTransitions(e);this._resetUpdates()}let t={};for(let i in this.tileManagers){let o=this.tileManagers[i];t[i]=o.used,o.used=!1}let a=this.imageManager.listImages();for(let i of this._order){let o=this._layers[i];o.recalculate(e,a),!o.isHidden(e.zoom)&&o.source&&(this.tileManagers[o.source].used=!0)}for(let i in t){let o=this.tileManagers[i];!!t[i]!=!!o.used&&o.fire(new Fs("data",{sourceDataType:"visibility",sourceId:i}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,r&&this.fire(new _h("data"))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let r in this.tileManagers)this.tileManagers[r].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.tileManagers)this.tileManagers[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,r){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:r})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var t;this._checkLoaded();let a=this.serialize();if(e=r.transformStyle?r.transformStyle(a,e):e,((t=r.validate)!=null?t:!0)&&VR(this,e))return!1;e=jf(e),e.layers=ZN(e.layers);let i=Dme(a,e),o=this._getOperationsToPerform(i);if(o.unimplemented.length>0)throw Error(`Unimplemented: ${o.unimplemented.join(", ")}.`);if(o.operations.length===0)return!1;for(let s of o.operations)s();return this.stylesheet=e,this._serializedLayers=null,this.fire(new P3({style:this})),!0}_getOperationsToPerform(e){let r=[],t=[];for(let a of e)switch(a.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":r.push(()=>this.addLayer.apply(this,a.args));break;case"removeLayer":r.push(()=>this.removeLayer.apply(this,a.args));break;case"setPaintProperty":r.push(()=>this.setPaintProperty.apply(this,a.args));break;case"setLayoutProperty":r.push(()=>this.setLayoutProperty.apply(this,a.args));break;case"setFilter":r.push(()=>this.setFilter.apply(this,a.args));break;case"addSource":r.push(()=>this.addSource.apply(this,a.args));break;case"removeSource":r.push(()=>this.removeSource.apply(this,a.args));break;case"setLayerZoomRange":r.push(()=>this.setLayerZoomRange.apply(this,a.args));break;case"setLight":r.push(()=>this.setLight.apply(this,a.args));break;case"setGeoJSONSourceData":r.push(()=>this.setGeoJSONSourceData.apply(this,a.args));break;case"setGlyphs":r.push(()=>this.setGlyphs.apply(this,a.args));break;case"setFontFaces":r.push(()=>this.setFontFaces.apply(this,a.args));break;case"setSprite":r.push(()=>this.setSprite.apply(this,a.args));break;case"setTerrain":r.push(()=>this.map.setTerrain.apply(this,a.args));break;case"setSky":r.push(()=>this.setSky.apply(this,a.args));break;case"setProjection":this.setProjection.apply(this,a.args);break;case"setGlobalState":r.push(()=>this.setGlobalState.apply(this,a.args));break;case"setTransition":r.push(()=>{});break;default:t.push(a.command)}return{operations:r,unimplemented:t}}addImage(e,r){if(this.getImage(e)){this.fire(new mn(Error(`An image named "${e}" already exists.`)));return}this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,r){this.imageManager.updateImage(e,r)}getImage(e){return this.imageManager.getImage(e)}setMissingImageResolver(e){this.imageManager.setMissingImageResolver(e)}removeImage(e){if(!this.getImage(e)){this.fire(new mn(Error(`An image named "${e}" does not exist.`)));return}this.imageManager.removeImage(e),this._afterImageUpdated(e)}_markImagesChanged(e){for(let r of e)this._changedImages[r]=!0}_afterImageUpdated(e){this._changedImages[e]=!0,this._imagesListDirty=!0,this._changed=!0,this.fire(new _h("data"))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,t={}){var a;if(this._checkLoaded(),this.tileManagers[e]!==void 0)throw Error(`Source "${e}" already exists.`);if(!r.type)throw Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(LS.has(r.type)&&this._validate(Af.source,`sources.${e}`,r,null,t))return;(a=this.map)!=null&&a._collectResourceTiming&&(r.collectResourceTiming=!0);let i=this.tileManagers[e]=new H3(e,r,this.dispatcher);i.style=this,i.setEventedParent(this,()=>({isSourceLoaded:i.loaded(),source:i.serialize(),sourceId:e})),i.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.tileManagers[e]===void 0)throw Error(`There is no source with this ID=${e}`);for(let t in this._layers)if(this._layers[t].source===e)return this.fire(new mn(Error(`Source "${e}" cannot be removed while layer "${t}" is using it.`)));let r=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],r.fire(new Fs("data",{sourceDataType:"metadata",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,r){if(this._checkLoaded(),this.tileManagers[e]===void 0)throw Error(`There is no source with this ID=${e}`);let t=this.tileManagers[e].getSource();if(t.type!=="geojson")throw Error(`geojsonSource.type is ${t.type}, which is !== 'geojson`);t.setData(r),this._changed=!0}getSource(e){var r;return(r=this.tileManagers[e])==null?void 0:r.getSource()}addLayer(e,r,t={}){this._checkLoaded();let a=e.id;if(this.getLayer(a)){this.fire(new mn(Error(`Layer "${a}" already exists on this map.`)));return}let i;if(e.type==="custom"){if(xE(this,Hpe(e)))return;i=GE(e,this._globalState)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(a,e.source),e=jf(e),e=tn(e,{source:a})),this._validate(Af.layer,`layers.${a}`,e,{arrayIndex:-1},t))return;i=GE(e,this._globalState),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}})}let o=r?this._order.indexOf(r):this._order.length;if(r&&o===-1){this.fire(new mn(Error(`Cannot add layer "${a}" before non-existing layer "${r}".`)));return}if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&i.type!=="custom"){let s=this._removedLayers[a];delete this._removedLayers[a],s.type===i.type?(this._updatedSources[i.source]="reload",this.tileManagers[i.source].pause()):this._updatedSources[i.source]="clear"}this._updateLayer(i),i.onAdd&&i.onAdd(this.map)}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e]){this.fire(new mn(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));return}if(e===r)return;if(r&&!this._order.includes(r)){this.fire(new mn(Error(`Cannot move layer "${e}" before non-existing layer "${r}".`)));return}let t=this._order.indexOf(e);this._order.splice(t,1);let a=r?this._order.indexOf(r):this._order.length;this._order.splice(a,0,e),this._layerOrderChanged=!0}removeLayer(e){var r;this._checkLoaded();let t=this._layers[e];if(!t){this.fire(new mn(Error(`Cannot remove non-existing layer "${e}".`)));return}t.setEventedParent(null);let a=this._order.indexOf(e);this._order.splice(a,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],t.type==="symbol"&&t.source&&((r=this.tileManagers[t.source])==null||r.resetMaxContentElevation()),t.onRemove&&t.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,t){this._checkLoaded();let a=this.getLayer(e);if(!a){this.fire(new mn(Error(`Cannot set the zoom range of non-existing layer "${e}".`)));return}(a.minzoom!==r||a.maxzoom!==t)&&(r!=null&&(a.minzoom=r),t!=null&&(a.maxzoom=t),this._updateLayer(a))}setFilter(e,r,t={}){this._checkLoaded();let a=this.getLayer(e);if(!a){this.fire(new mn(Error(`Cannot filter non-existing layer "${e}".`)));return}if(!up(a.filter,r)){if(r==null){a.setFilter(void 0),this._updateLayer(a);return}this._validate(Af.filter,`layers.${a.id}.filter`,r,null,t)||(a.setFilter(jf(r)),this._updateLayer(a))}}getFilter(e){return jf(this.getLayer(e).filter)}setLayoutProperty(e,r,t,a={}){this._checkLoaded();let i=this.getLayer(e);if(!i){this.fire(new mn(Error(`Cannot style non-existing layer "${e}".`)));return}up(i.getLayoutProperty(r),t)||(i.setLayoutProperty(r,t,a),this._updateLayer(i))}getLayoutProperty(e,r){let t=this.getLayer(e);if(!t){this.fire(new mn(Error(`Cannot get style of non-existing layer "${e}".`)));return}return t.getLayoutProperty(r)}setPaintProperty(e,r,t,a={}){this._checkLoaded();let i=this.getLayer(e);if(!i){this.fire(new mn(Error(`Cannot style non-existing layer "${e}".`)));return}up(i.getPaintProperty(r),t)||this._updatePaintProperty(i,r,t,a)}_updatePaintProperty(e,r,t,a={}){e.setPaintProperty(r,t,a)&&this._updateLayer(e),fw(e)&&r==="raster-fade-duration"&&this.tileManagers[e.source].setRasterFadeDuration(t),this._changed=!0,this._updatedPaintProps[e.id]=!0,e.type==="symbol"&&this.triggerSymbolPlacement(),this._serializedLayers=null}getPaintProperty(e,r){return this.getLayer(e).getPaintProperty(r)}setFeatureState(e,r){this._checkLoaded();let t=e.source,a=e.sourceLayer,i=this.tileManagers[t];if(i===void 0){this.fire(new mn(Error(`The source '${t}' does not exist in the map's style.`)));return}let o=i.getSource().type;if(o==="geojson"&&a){this.fire(new mn(Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(o==="vector"&&!a){this.fire(new mn(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(e.id===void 0){this.fire(new mn(Error("The feature id parameter must be provided.")));return}let s=["__proto__","constructor","prototype"];if(r&&Object.keys(r).some(l=>s.includes(l))){this.fire(new mn(Error(`The feature state should not include one of the following keys: ${s}`)));return}i.setFeatureState(a,e.id,r)}removeFeatureState(e,r){this._checkLoaded();let t=e.source,a=this.tileManagers[t];if(a===void 0){this.fire(new mn(Error(`The source '${t}' does not exist in the map's style.`)));return}let i=a.getSource().type,o=i==="vector"?e.sourceLayer:void 0;if(i==="vector"&&!o){this.fire(new mn(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(r&&typeof e.id!="string"&&typeof e.id!="number"){this.fire(new mn(Error("A feature id is required to remove its specific state property.")));return}a.removeFeatureState(o,e.id,r)}getFeatureState(e){this._checkLoaded();let r=e.source,t=e.sourceLayer,a=this.tileManagers[r];if(a===void 0){this.fire(new mn(Error(`The source '${r}' does not exist in the map's style.`)));return}if(a.getSource().type==="vector"&&!t){this.fire(new mn(Error("The sourceLayer parameter must be provided for vector source types.")));return}return e.id===void 0&&this.fire(new mn(Error("The feature id parameter must be provided."))),a.getFeatureState(t,e.id)}getTransition(){var e;return tn({duration:300,delay:0},(e=this.stylesheet)==null?void 0:e.transition)}serialize(){if(!this._loaded)return;let e=GM(this.tileManagers,i=>i.serialize()),r=this._serializeByIds(this._order,!0),t=this.map.getTerrain()||void 0,a=this.stylesheet;return jI({version:a.version,name:a.name,metadata:a.metadata,light:a.light,sky:a.sky,center:a.center,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,sprite:a.sprite,glyphs:a.glyphs,"font-faces":a["font-faces"],transition:a.transition,projection:a.projection,state:a.state,sources:e,layers:r,terrain:t},i=>i!==void 0)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.tileManagers[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let r=o=>this._layers[o].type==="fill-extrusion",t={},a=[];for(let o=this._order.length-1;o>=0;o--){let s=this._order[o];if(r(s)){t[s]=o;for(let l of e){let n=l[s];if(n)for(let u of n)a.push(u)}}}a.sort((o,s)=>s.intersectionZ-o.intersectionZ);let i=[];for(let o=this._order.length-1;o>=0;o--){let s=this._order[o];if(r(s))for(let l=a.length-1;l>=0;l--){let n=a[l].feature;if(t[n.layer.id]this.map.terrain.getElevation(u,c,f):void 0));return this.placement&&i.push(Wme(this._layers,o,this.tileManagers,e,l,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(i)}querySourceFeatures(e,r){r?.filter&&this._validate(Af.filter,"querySourceFeatures.filter",r.filter,null,r);let t=this.tileManagers[e];return t?$me(t,r?Ci(ja({},r),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,r={}){this._checkLoaded();let t=this.light.getLight(),a=!1;for(let o in e)if(!up(e[o],t[o])){a=!0;break}if(!a)return;let i={now:is(),transition:tn({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(i)}getProjection(){var e;return(e=this.stylesheet)==null?void 0:e.projection}setProjection(e){this._checkLoaded();let r=e??{type:"mercator"};if(this.stylesheet.projection=e,this.projection){if(this.projection.name===r.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(r.type)}getSky(){var e;return(e=this.stylesheet)==null?void 0:e.sky}setSky(e,r={}){this._checkLoaded();let t=this.getSky(),a=!1;if(!e&&!t)return;if(e&&!t)a=!0;else if(!e&&t)a=!0;else for(let o in e)if(!up(e[o],t[o])){a=!0;break}if(!a)return;let i={now:is(),transition:tn({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,r),this.sky.updateTransitions(i)}_setProjectionInternal(e){var r;let t=W1e(e,(r=this.map._camera)==null?void 0:r.transform.constrainOverride,this._globalState);this.projection=t.projection,this.map.migrateProjection(t.transform,t.cameraHelper);for(let a in this.tileManagers)this.tileManagers[a].reload()}_validate(e,r,t,a,i={}){return i.validate!==!1&&i_(this,e,ja({key:r,style:this.serialize(),value:t},a),i)}_remove(e=!0){this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._loadStyleRequest&&(this._loadStyleRequest=(this._loadStyleRequest.abort(),null)),this._spriteRequest&&(this._spriteRequest=(this._spriteRequest.abort(),null)),H_().off(U3,this._rtlPluginLoaded);for(let r in this._layers)this._layers[r].setEventedParent(null);for(let r in this.tileManagers){let t=this.tileManagers[r];t.setEventedParent(null),t.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.tileManagers[e].clearTiles()}_reloadSource(e){this.tileManagers[e].resume(),this.tileManagers[e].reload()}_updateSources(e){for(let r in this.tileManagers)this.tileManagers[r].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.tileManagers)this._reloadSource(e)}triggerSymbolPlacement(){this._symbolPlacementTriggered=!0}_placementInputsChanged(e,r,t){var a;let i=this.pauseablePlacement;return!i||this._symbolPlacementTriggered||this._placedProjectionTransition!==((a=this.projection)==null?void 0:a.transitionState)||i._showCollisionBoxes!==r||i.placement.collisionGroups.crossSourceCollisions!==t||i.placement.transform.renderWorldCopies!==e.renderWorldCopies||!fce(i.placement.transform.modelViewProjectionMatrix,e.modelViewProjectionMatrix)}_updatePlacement(e,r,t,a,i=!1){var o,s;let l=!1,n=!1,u={};for(let h of this._order){let d=this._layers[h];if(d.type!=="symbol")continue;if(!u[d.source]){let g=this.tileManagers[d.source];u[d.source]=g.getRenderableIds(!0).map(m=>g.getTileByID(m)).sort((m,y)=>y.tileID.overscaledZ-m.tileID.overscaledZ||(m.tileID.isLessThan(y.tileID)?-1:1))}let p=this.crossTileSymbolIndex.addLayer(d,u[d.source],e.center.lng);l||(l=p)}this.crossTileSymbolIndex.pruneUnusedLayers(this._order),i||(i=this._layerOrderChanged||t===0);let c=l||this._placementInputsChanged(e,r,a),f=((o=this.pauseablePlacement)==null?void 0:o.isDone())&&!this.placement.stillRecent(is(),e.zoom);if((i||!this.pauseablePlacement||f&&(c||this.placement.stale))&&(this._symbolPlacementTriggered=!1,this._placedProjectionTransition=(s=this.projection)==null?void 0:s.transitionState,this.pauseablePlacement=new Qj(e,this.map.terrain,this._order,i,r,t,a,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?c&&this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,u),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(is()),n=!0),l&&this.pauseablePlacement.placement.setStale()),n||l)for(let h of this._order){let d=this._layers[h];d.type==="symbol"&&this.placement.updateLayerOpacities(d,u[d.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(is())}_releaseSymbolFadeTiles(){for(let e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles()}getImages(e,r){return yi(this,null,function*(){let t=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();let a=this.tileManagers[r.source];return a&&a.setDependencies(r.tileID.key,r.type,r.icons),t})}getGlyphs(e,r){return yi(this,null,function*(){let t=yield this.glyphManager.getGlyphs(r.stacks),a=this.tileManagers[r.source];return a&&a.setDependencies(r.tileID.key,r.type,[""]),t})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),!(e&&this._validate(Af.glyphs,"glyphs",e,null,r))&&(this._changed=!0,this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getFontFaces(){return this.stylesheet["font-faces"]||null}setFontFaces(e){this._checkLoaded(),this._changed=!0,this._glyphsDidChange=!0,this.stylesheet["font-faces"]=e,this.glyphManager.setFontFaces(e)}getDashes(e,r){return yi(this,null,function*(){let t={};for(let[a,i]of Object.entries(r.dashes))t[a]=this.lineAtlas.getDash(i.dasharray,i.round);return t})}addSprite(e,r,t={},a){this._checkLoaded();let i=[{id:e,url:r}],o=[...m3(this.stylesheet.sprite),...i];this._validate(Af.sprite,"sprite",o,null,t)||(this.stylesheet.sprite=o,this._loadSprite(i,!0,a))}removeSprite(e){this._checkLoaded();let r=m3(this.stylesheet.sprite);if(!r.find(a=>a.id===e)){this.fire(new mn(Error(`Sprite "${e}" doesn't exists on this map.`)));return}let t=this.imageManager.removeSpriteImages(e);this._markImagesChanged(t),r.splice(r.findIndex(a=>a.id===e),1),this.stylesheet.sprite=r.length>0?r:void 0,this._imagesListDirty=!0,this._changed=!0,this.fire(new _h("data"))}getSprite(){return m3(this.stylesheet.sprite)}setSprite(e,r={},t){this._checkLoaded(),!(e&&this._validate(Af.sprite,"sprite",e,null,r))&&(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,t):(this._unloadSprite(),t&&t(null)))}destroy(){this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._loadStyleRequest&&(this._loadStyleRequest=(this._loadStyleRequest.abort(),null)),this._spriteRequest&&(this._spriteRequest=(this._spriteRequest.abort(),null));for(let e in this.tileManagers){let r=this.tileManagers[e];r.setEventedParent(null),r.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this.patternAtlas.destroy()),this.glyphManager&&this.glyphManager.destroy();for(let e in this._layers){let r=this._layers[e];r.setEventedParent(null),r.onRemove&&r.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}},bU=pl([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),wU=class{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,r,t,a,i,o,s,l,n){this.context=e;let u=this.boundPaintVertexBuffers.length!==a.length;for(let c=0;!u&&c({u_depth:new fn(e,r.u_depth),u_terrain:new fn(e,r.u_terrain)}),TU=(e,r)=>({u_texture:new fn(e,r.u_texture),u_ele_delta:new Di(e,r.u_ele_delta),u_fog_matrix:new $h(e,r.u_fog_matrix),u_fog_color:new Jp(e,r.u_fog_color),u_fog_ground_blend:new Di(e,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new Di(e,r.u_fog_ground_blend_opacity),u_horizon_color:new Jp(e,r.u_horizon_color),u_horizon_fog_blend:new Di(e,r.u_horizon_fog_blend),u_is_globe_mode:new Di(e,r.u_is_globe_mode)}),MU=(e,r)=>({u_ele_delta:new Di(e,r.u_ele_delta)}),EU=(e,r,t,a,i)=>({u_texture:0,u_ele_delta:e,u_fog_matrix:r,u_fog_color:t?t.properties.get("fog-color"):Hn.white,u_fog_ground_blend:t?t.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:i?0:t?t.calculateFogBlendOpacity(a):0,u_horizon_color:t?t.properties.get("horizon-color"):Hn.white,u_horizon_fog_blend:t?t.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!i}),SU=e=>({u_ele_delta:e}),ix={ProjectionUBO:0,TerrainUBO:1,FrameUBO:2},kU={float:[1,1],int:[1,1],vec2:[2,2],vec4:[4,4],mat4:[16,4]},Q3=class{constructor(e,r,t){this.context=e,this.binding=r,this.contentWords=t.contentWords;let a=e.gl;this.buffer=a.createBuffer(),a.bindBuffer(a.UNIFORM_BUFFER,this.buffer),a.bufferData(a.UNIFORM_BUFFER,t.sizeWords*4,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,r,this.buffer),this.uploaded=new Float32Array(t.sizeWords),this.pending=new Float32Array(t.sizeWords),this.uploadedWords=new Uint32Array(this.uploaded.buffer),this.pendingWords=new Uint32Array(this.pending.buffer),this.hasData=!1,this.bindingDirty=!1}upload(){let e=this.context.gl,r=!this.hasData;if(!r){let t=this.pendingWords,a=this.uploadedWords;for(let i=0;i=0&&(this.attributes[k]={location:T,isInteger:w.has(k)})}u.deleteShader(M),u.deleteShader(E);for(let k of y)if(k&&!C[k]){let T=u.getUniformLocation(this.program,k);T&&(C[k]=T)}this.fixedUniforms=a(e,C),this.terrainUniforms=AU(e,C),this.binderUniforms=t?t.getUniforms(e,C):[]}draw(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g,m,y,_){var v;let x=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(t),e.setStencilMode(a),e.setColorMode(i),e.setCullFace(o),l){e.activeTexture.set(x.TEXTURE2),x.bindTexture(x.TEXTURE_2D,l.depthTexture),e.activeTexture.set(x.TEXTURE3),x.bindTexture(x.TEXTURE_2D,l.texture);for(let M in this.terrainUniforms)this.terrainUniforms[M].set(l[M]);K1e(e.terrainUniformBuffer,l)}if(n&&X1e(e.projectionUniformBuffer,n),s)for(let M in this.fixedUniforms)this.fixedUniforms[M].set(s[M]);g&&g.setUniforms(e,this.binderUniforms,d,{zoom:p});let E=0;switch(r){case x.LINES:E=2;break;case x.TRIANGLES:E=3;break;case x.LINE_STRIP:E=1}for(let M of h.get())M.vaos||(M.vaos={}),(v=M.vaos)[u]||(v[u]=new wU),M.vaos[u].bind(e,this,c,g?g.getPaintVertexBuffers():[],f,M.vertexOffset,m,y,_),x.drawElements(r,M.primitiveLength*E,x.UNSIGNED_SHORT,M.primitiveOffset*E*2)}},DU=(e,r)=>({u_lightpos:new qc(e,r.u_lightpos),u_lightpos_globe:new qc(e,r.u_lightpos_globe),u_lightintensity:new Di(e,r.u_lightintensity),u_lightcolor:new qc(e,r.u_lightcolor),u_vertical_gradient:new Di(e,r.u_vertical_gradient),u_opacity:new Di(e,r.u_opacity),u_fill_translate:new no(e,r.u_fill_translate)}),LU=(e,r)=>({u_lightpos:new qc(e,r.u_lightpos),u_lightpos_globe:new qc(e,r.u_lightpos_globe),u_lightintensity:new Di(e,r.u_lightintensity),u_lightcolor:new qc(e,r.u_lightcolor),u_vertical_gradient:new Di(e,r.u_vertical_gradient),u_height_factor:new Di(e,r.u_height_factor),u_opacity:new Di(e,r.u_opacity),u_fill_translate:new no(e,r.u_fill_translate),u_image:new fn(e,r.u_image),u_texsize:new no(e,r.u_texsize),u_pixel_coord_upper:new no(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new no(e,r.u_pixel_coord_lower),u_scale:new qc(e,r.u_scale),u_fade:new Di(e,r.u_fade)}),XC=(e,r,t,a)=>{let i=e.style.light,o=i.getCartesianPosition(),s=kI();i.properties.get("anchor")==="viewport"&&nce(s,e.transform.bearingInRadians),mce(o,o,s);let l=e.transform.transformLightDirection(o),n=i.properties.get("color");return{u_lightpos:o,u_lightpos_globe:l,u_lightintensity:i.properties.get("intensity"),u_lightcolor:[n.r,n.g,n.b],u_vertical_gradient:+r,u_opacity:t,u_fill_translate:a}},FU=(e,r,t,a,i,o,s)=>tn(XC(e,r,t,a),G8(o,e,s),{u_height_factor:-(2**i.overscaledZ)/s.tileSize/8}),PU=(e,r)=>({u_fill_translate:new no(e,r.u_fill_translate)}),IU=(e,r)=>({u_image:new fn(e,r.u_image),u_texsize:new no(e,r.u_texsize),u_pixel_coord_upper:new no(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new no(e,r.u_pixel_coord_lower),u_scale:new qc(e,r.u_scale),u_fade:new Di(e,r.u_fade),u_sdf_pattern:new fn(e,r.u_sdf_pattern),u_fill_translate:new no(e,r.u_fill_translate)}),RU=(e,r)=>({u_fill_translate:new no(e,r.u_fill_translate)}),zU=(e,r)=>({u_image:new fn(e,r.u_image),u_texsize:new no(e,r.u_texsize),u_pixel_coord_upper:new no(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new no(e,r.u_pixel_coord_lower),u_scale:new qc(e,r.u_scale),u_fade:new Di(e,r.u_fade),u_sdf_pattern:new fn(e,r.u_sdf_pattern),u_fill_translate:new no(e,r.u_fill_translate)}),ZC=(e,r,t,a,i)=>tn(G8(r,e,t),{u_fill_translate:a,u_sdf_pattern:+!!i}),BU=e=>({u_fill_translate:e}),OU=e=>({u_fill_translate:e}),NU=(e,r,t,a,i)=>ZC(e,r,t,a,i),jU=(e,r)=>({u_scale_with_map:new fn(e,r.u_scale_with_map),u_pitch_with_map:new fn(e,r.u_pitch_with_map),u_extrude_scale:new no(e,r.u_extrude_scale),u_globe_extrude_scale:new Di(e,r.u_globe_extrude_scale),u_translate:new no(e,r.u_translate)}),UU=(e,r,t,a,i)=>{let o=e.transform,s,l,n=0;if(t.paint.get("circle-pitch-alignment")==="map"){let u=uh(r,1,o.zoom);s=!0,l=[u,u],n=u/(xa*2**r.tileID.overscaledZ)*2*Math.PI*i}else s=!1,l=o.pixelsToGLUnits;return{u_scale_with_map:+(t.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+s,u_extrude_scale:l,u_globe_extrude_scale:n,u_translate:a}},qU=(e,r)=>({u_color:new Jp(e,r.u_color),u_overlay:new fn(e,r.u_overlay),u_overlay_scale:new Di(e,r.u_overlay_scale)}),KC=(e,r=1)=>({u_color:e,u_overlay:0,u_overlay_scale:r}),VU=(e,r)=>({u_extrude_scale:new Di(e,r.u_extrude_scale),u_intensity:new Di(e,r.u_intensity),u_globe_extrude_scale:new Di(e,r.u_globe_extrude_scale)}),GU=(e,r)=>({u_matrix:new $h(e,r.u_matrix),u_image:new fn(e,r.u_image),u_color_ramp:new fn(e,r.u_color_ramp),u_opacity:new Di(e,r.u_opacity)}),JC=(e,r,t,a)=>{let i=uh(e,1,r)/(xa*2**e.tileID.overscaledZ)*2*Math.PI*a;return{u_extrude_scale:uh(e,1,r),u_intensity:t,u_globe_extrude_scale:i}},QC=(e,r,t,a)=>{let i=w0();return Rd(i,0,e.width,e.height,0,0,1),{u_matrix:i,u_image:t,u_color_ramp:a,u_opacity:r.paint.get("heatmap-opacity")}},HU=(e,r)=>({u_image:new fn(e,r.u_image),u_latrange:new no(e,r.u_latrange),u_exaggeration:new Di(e,r.u_exaggeration),u_altitudes:new JS(e,r.u_altitudes),u_azimuths:new JS(e,r.u_azimuths),u_accent:new Jp(e,r.u_accent),u_method:new fn(e,r.u_method),u_shadows:new KS(e,r.u_shadows),u_highlights:new KS(e,r.u_highlights)}),WU=(e,r)=>({u_matrix:new $h(e,r.u_matrix),u_image:new fn(e,r.u_image),u_dimension:new no(e,r.u_dimension),u_zoom:new Di(e,r.u_zoom),u_unpack:new R1(e,r.u_unpack)}),$U=(e,r,t)=>{let a=t.paint.get("hillshade-accent-color"),i;switch(t.paint.get("hillshade-method")){case"basic":i=4;break;case"combined":i=1;break;case"igor":i=2;break;case"multidirectional":i=3;break;default:i=0}let o=t.getIlluminationProperties();for(let s=0;s{let t=r.stride,a=w0();return Rd(a,0,xa,-xa,0,0,1),Xl(a,a,[0,-xa,0]),{u_matrix:a,u_image:1,u_dimension:[t,t],u_zoom:e.overscaledZ,u_unpack:r.getUnpackVector()}},XU=(e,r)=>({u_image:new fn(e,r.u_image),u_unpack:new R1(e,r.u_unpack),u_dimension:new no(e,r.u_dimension),u_elevation_stops:new fn(e,r.u_elevation_stops),u_color_stops:new fn(e,r.u_color_stops),u_color_ramp_size:new fn(e,r.u_color_ramp_size),u_opacity:new Di(e,r.u_opacity)}),ZU=(e,r,t=0)=>({u_image:0,u_unpack:r.getUnpackVector(),u_dimension:[r.stride,r.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:t,u_opacity:e.paint.get("color-relief-opacity")}),KU=(e,r)=>({u_translation:new no(e,r.u_translation),u_ratio:new Di(e,r.u_ratio)}),JU=(e,r)=>({u_translation:new no(e,r.u_translation),u_ratio:new Di(e,r.u_ratio),u_image:new fn(e,r.u_image),u_image_height:new Di(e,r.u_image_height)}),QU=(e,r)=>({u_translation:new no(e,r.u_translation),u_texsize:new no(e,r.u_texsize),u_ratio:new Di(e,r.u_ratio),u_image:new fn(e,r.u_image),u_scale:new qc(e,r.u_scale),u_fade:new Di(e,r.u_fade)}),eq=(e,r)=>({u_translation:new no(e,r.u_translation),u_ratio:new Di(e,r.u_ratio),u_image:new fn(e,r.u_image),u_mix:new Di(e,r.u_mix),u_tileratio:new Di(e,r.u_tileratio),u_crossfade_from:new Di(e,r.u_crossfade_from),u_crossfade_to:new Di(e,r.u_crossfade_to),u_lineatlas_width:new Di(e,r.u_lineatlas_width),u_lineatlas_height:new Di(e,r.u_lineatlas_height)}),tq=(e,r)=>({u_translation:new no(e,r.u_translation),u_ratio:new Di(e,r.u_ratio),u_image:new fn(e,r.u_image),u_image_height:new Di(e,r.u_image_height),u_tileratio:new Di(e,r.u_tileratio),u_crossfade_from:new Di(e,r.u_crossfade_from),u_crossfade_to:new Di(e,r.u_crossfade_to),u_image_dash:new fn(e,r.u_image_dash),u_mix:new Di(e,r.u_mix),u_lineatlas_width:new Di(e,r.u_lineatlas_width),u_lineatlas_height:new Di(e,r.u_lineatlas_height)}),ox=(e,r,t,a)=>{let i=e.transform;return{u_translation:H8(e,r,t),u_ratio:a/uh(r,1,i.zoom)}},rq=(e,r,t,a,i)=>tn(ox(e,r,t,a),{u_image:0,u_image_height:i}),aq=(e,r,t,a,i)=>{let o=e.transform,s=iC(r,o);return{u_translation:H8(e,r,t),u_texsize:r.imageAtlasTexture.size,u_ratio:a/uh(r,1,o.zoom),u_image:0,u_scale:[s,i.fromScale,i.toScale],u_fade:i.t}},iq=(e,r,t,a,i)=>{let o=e.transform,s=iC(r,o);return tn(ox(e,r,t,a),{u_tileratio:s,u_crossfade_from:i.fromScale,u_crossfade_to:i.toScale,u_image:0,u_mix:i.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},nq=(e,r,t,a,i,o)=>{let s=e.transform,l=iC(r,s);return tn(ox(e,r,t,a),{u_image:0,u_image_height:o,u_tileratio:l,u_crossfade_from:i.fromScale,u_crossfade_to:i.toScale,u_image_dash:1,u_mix:i.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},oq=(e,r)=>({u_image:new fn(e,r.u_image),u_opacity:new Di(e,r.u_opacity)}),sq=(e,r)=>({u_image:r,u_opacity:e}),lq=(e,r)=>({u_is_size_zoom_constant:new fn(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new fn(e,r.u_is_size_feature_constant),u_size_t:new Di(e,r.u_size_t),u_size:new Di(e,r.u_size),u_rotate_symbol:new fn(e,r.u_rotate_symbol),u_label_plane_matrix:new $h(e,r.u_label_plane_matrix),u_coord_matrix:new $h(e,r.u_coord_matrix),u_is_text:new fn(e,r.u_is_text),u_pitch_with_map:new fn(e,r.u_pitch_with_map),u_is_along_line:new fn(e,r.u_is_along_line),u_is_variable_anchor:new fn(e,r.u_is_variable_anchor),u_texsize:new no(e,r.u_texsize),u_texture:new fn(e,r.u_texture),u_translation:new no(e,r.u_translation),u_pitched_scale:new Di(e,r.u_pitched_scale),u_is_offset:new fn(e,r.u_is_offset),u_height_anchor_ground:new fn(e,r.u_height_anchor_ground)}),uq=(e,r)=>({u_is_size_zoom_constant:new fn(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new fn(e,r.u_is_size_feature_constant),u_size_t:new Di(e,r.u_size_t),u_size:new Di(e,r.u_size),u_rotate_symbol:new fn(e,r.u_rotate_symbol),u_label_plane_matrix:new $h(e,r.u_label_plane_matrix),u_coord_matrix:new $h(e,r.u_coord_matrix),u_is_text:new fn(e,r.u_is_text),u_pitch_with_map:new fn(e,r.u_pitch_with_map),u_is_along_line:new fn(e,r.u_is_along_line),u_is_variable_anchor:new fn(e,r.u_is_variable_anchor),u_texsize:new no(e,r.u_texsize),u_texture:new fn(e,r.u_texture),u_gamma_scale:new Di(e,r.u_gamma_scale),u_is_halo:new fn(e,r.u_is_halo),u_is_plain:new fn(e,r.u_is_plain),u_translation:new no(e,r.u_translation),u_pitched_scale:new Di(e,r.u_pitched_scale),u_is_offset:new fn(e,r.u_is_offset),u_height_anchor_ground:new fn(e,r.u_height_anchor_ground)}),cq=(e,r)=>({u_is_size_zoom_constant:new fn(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new fn(e,r.u_is_size_feature_constant),u_size_t:new Di(e,r.u_size_t),u_size:new Di(e,r.u_size),u_rotate_symbol:new fn(e,r.u_rotate_symbol),u_label_plane_matrix:new $h(e,r.u_label_plane_matrix),u_coord_matrix:new $h(e,r.u_coord_matrix),u_is_text:new fn(e,r.u_is_text),u_pitch_with_map:new fn(e,r.u_pitch_with_map),u_is_along_line:new fn(e,r.u_is_along_line),u_is_variable_anchor:new fn(e,r.u_is_variable_anchor),u_texsize:new no(e,r.u_texsize),u_texsize_icon:new no(e,r.u_texsize_icon),u_texture:new fn(e,r.u_texture),u_texture_icon:new fn(e,r.u_texture_icon),u_gamma_scale:new Di(e,r.u_gamma_scale),u_is_halo:new fn(e,r.u_is_halo),u_translation:new no(e,r.u_translation),u_pitched_scale:new Di(e,r.u_pitched_scale),u_is_offset:new fn(e,r.u_is_offset),u_height_anchor_ground:new fn(e,r.u_height_anchor_ground)}),e7=(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p)=>({u_is_size_zoom_constant:+(e==="constant"||e==="source"),u_is_size_feature_constant:+(e==="constant"||e==="camera"),u_size_t:r?r.uSizeT:0,u_size:r?r.uSize:0,u_rotate_symbol:+t,u_label_plane_matrix:l,u_coord_matrix:n,u_is_text:+c,u_pitch_with_map:+a,u_is_along_line:i,u_is_variable_anchor:o,u_texsize:f,u_texture:0,u_translation:u,u_pitched_scale:h,u_is_offset:d,u_height_anchor_ground:+p}),t7=(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p,g)=>{let m=s.transform;return tn(e7(e,r,t,a,i,o,s,l,n,u,c,f,d,p,g),{u_gamma_scale:a?Math.cos(m.pitch*Math.PI/180)*m.cameraToCenterDistance:1,u_is_halo:+!!h,u_is_plain:1})},fq=(e,r,t,a,i,o,s,l,n,u,c,f,h,d,p)=>tn(t7(e,r,t,a,i,o,s,l,n,u,!0,c,!0,h,d,p),{u_texsize_icon:f,u_texture_icon:1}),hq=(e,r)=>({u_opacity:new Di(e,r.u_opacity),u_color:new Jp(e,r.u_color)}),dq=(e,r)=>({u_opacity:new Di(e,r.u_opacity),u_image:new fn(e,r.u_image),u_pattern_tl_a:new no(e,r.u_pattern_tl_a),u_pattern_br_a:new no(e,r.u_pattern_br_a),u_pattern_tl_b:new no(e,r.u_pattern_tl_b),u_pattern_br_b:new no(e,r.u_pattern_br_b),u_texsize:new no(e,r.u_texsize),u_mix:new Di(e,r.u_mix),u_pattern_size_a:new no(e,r.u_pattern_size_a),u_pattern_size_b:new no(e,r.u_pattern_size_b),u_scale_a:new Di(e,r.u_scale_a),u_scale_b:new Di(e,r.u_scale_b),u_pixel_coord_upper:new no(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new no(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new Di(e,r.u_tile_units_to_pixels)}),pq=(e,r)=>({u_opacity:e,u_color:r}),vq=(e,r,t,a,i)=>tn(Q1e(t,i,r,a),{u_opacity:e}),mq=(e,r)=>({u_sun_pos:new qc(e,r.u_sun_pos),u_atmosphere_blend:new Di(e,r.u_atmosphere_blend),u_globe_position:new qc(e,r.u_globe_position),u_globe_radius:new Di(e,r.u_globe_radius),u_inv_proj_matrix:new $h(e,r.u_inv_proj_matrix)}),gq=(e,r,t,a,i)=>({u_sun_pos:e,u_atmosphere_blend:r,u_globe_position:t,u_globe_radius:a,u_inv_proj_matrix:i}),yq=(e,r)=>({u_sky_color:new Jp(e,r.u_sky_color),u_horizon_color:new Jp(e,r.u_horizon_color),u_horizon:new no(e,r.u_horizon),u_horizon_normal:new no(e,r.u_horizon_normal),u_sky_horizon_blend:new Di(e,r.u_sky_horizon_blend),u_sky_blend:new Di(e,r.u_sky_blend),u_inv_proj_matrix:new $h(e,r.u_inv_proj_matrix),u_globe_position:new qc(e,r.u_globe_position),u_globe_radius:new Di(e,r.u_globe_radius)}),_q=(e,r,t)=>{let a=Math.cos(r.rollInRadians),i=Math.sin(r.rollInRadians),o=d_(r),s=r.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:e.properties.get("sky-color"),u_horizon_color:e.properties.get("horizon-color"),u_horizon:[(r.width/2-o*i)*t,(r.height/2+o*a)*t],u_horizon_normal:[-i,a],u_sky_horizon_blend:e.properties.get("sky-horizon-blend")*r.height/2*t,u_sky_blend:s,u_inv_proj_matrix:r.inverseProjectionMatrix,u_globe_position:O8(r),u_globe_radius:Y1(r.worldSize,r.center.lat)}},sx=(e,r)=>({}),xq={fillExtrusion:DU,fillExtrusionPattern:LU,fill:PU,fillPattern:IU,fillOutline:RU,fillOutlinePattern:zU,circle:jU,collisionBox:sx,collisionCircle:sx,debug:qU,depth:sx,clippingMask:sx,heatmap:VU,heatmapTexture:GU,hillshade:HU,hillshadePrepare:WU,colorRelief:XU,line:KU,lineGradient:JU,linePattern:QU,lineSDF:eq,lineGradientSDF:tq,layerOpacity:oq,raster:Pj,symbolIcon:lq,symbolSDF:uq,symbolTextAndIcon:cq,background:hq,backgroundPattern:dq,terrain:TU,terrainDepth:MU,atmosphere:mq,sky:yq},bq=class{constructor(e,r,t){this.context=e;let a=e.gl;this.buffer=a.createBuffer(),this.dynamicDraw=!!t,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,r.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||r.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let r=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},r7={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},wq=class{constructor(e,r,t,a){this.length=r.length,this.attributes=t,this.itemSize=r.bytesPerElement,this.dynamicDraw=a,this.context=e;let i=e.gl;this.buffer=i.createBuffer(),e.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,r.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||r.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let r=this.context.gl;this.bind(),r.bufferSubData(r.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,r){for(let t of this.attributes){let a=r.attributes[t.name];a!==void 0&&e.enableVertexAttribArray(a.location)}}setVertexAttribPointers(e,r,t){for(let a of this.attributes){let i=r.attributes[a.name];if(i!==void 0){let o=a.offset+this.itemSize*(t||0);i.isInteger?e.vertexAttribIPointer(i.location,a.components,e[r7[a.type]],this.itemSize,o):e.vertexAttribPointer(i.location,a.components,e[r7[a.type]],!1,this.itemSize,o)}}}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},Jo=class{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}},Aq=class extends Jo{getDefault(){return Hn.transparent}set(e){let r=this.current;(e.r!==r.r||e.g!==r.g||e.b!==r.b||e.a!==r.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}},Tq=class extends Jo{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}},Mq=class extends Jo{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}},Eq=class extends Jo{getDefault(){return[!0,!0,!0,!0]}set(e){let r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||e[3]!==r[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}},Sq=class extends Jo{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}},kq=class extends Jo{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}},Cq=class extends Jo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let r=this.current;(e.func!==r.func||e.ref!==r.ref||e.mask!==r.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}},Dq=class extends Jo{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}},Lq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;e?r.enable(r.STENCIL_TEST):r.disable(r.STENCIL_TEST),this.current=e,this.dirty=!1}},Fq=class extends Jo{getDefault(){return[0,1]}set(e){let r=this.current;(e[0]!==r[0]||e[1]!==r[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}},Pq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;e?r.enable(r.DEPTH_TEST):r.disable(r.DEPTH_TEST),this.current=e,this.dirty=!1}},Iq=class extends Jo{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}},Rq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;e?r.enable(r.BLEND):r.disable(r.BLEND),this.current=e,this.dirty=!1}},zq=class extends Jo{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let r=this.current;(e[0]!==r[0]||e[1]!==r[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}},Bq=class extends Jo{getDefault(){return Hn.transparent}set(e){let r=this.current;(e.r!==r.r||e.g!==r.g||e.b!==r.b||e.a!==r.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}},Oq=class extends Jo{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}},Nq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;e?r.enable(r.CULL_FACE):r.disable(r.CULL_FACE),this.current=e,this.dirty=!1}},jq=class extends Jo{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}},Uq=class extends Jo{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}},qq=class extends Jo{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}},Vq=class extends Jo{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}},Gq=class extends Jo{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||e[3]!==r[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}},Hq=class extends Jo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.bindFramebuffer(r.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},Wq=class extends Jo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.bindRenderbuffer(r.RENDERBUFFER,e),this.current=e,this.dirty=!1}},$q=class extends Jo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.bindTexture(r.TEXTURE_2D,e),this.current=e,this.dirty=!1}},Yq=class extends Jo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.bindBuffer(r.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},Xq=class extends Jo{getDefault(){return null}set(e){let r=this.gl;r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},Zq=class extends Jo{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.bindVertexArray(e),this.current=e,this.dirty=!1)}},Kq=class extends Jo{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.pixelStorei(r.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},Jq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},Qq=class extends Jo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let r=this.gl;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},e4=class extends Jo{constructor(e,r){super(e),this.context=e,this.parent=r}getDefault(){return null}},eV=class extends e4{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let r=this.gl;r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},tV=class extends e4{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let r=this.gl;r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,e),this.current=e,this.dirty=!1}},rV=class extends e4{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let r=this.gl;r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,e),this.current=e,this.dirty=!1}},aV=class{constructor(e,r,t,a,i){this.context=e,this.width=r,this.height=t;let o=e.gl,s=this.framebuffer=o.createFramebuffer();if(this.colorAttachment=new eV(e,s),a)this.depthAttachment=i?new rV(e,s):new tV(e,s);else if(i)throw Error("Stencil cannot be set without depth")}destroy(){let e=this.context.gl,r=this.colorAttachment.get();if(r&&e.deleteTexture(r),this.depthAttachment){let t=this.depthAttachment.get();t&&e.deleteRenderbuffer(t)}e.deleteFramebuffer(this.framebuffer)}},a7=rC([{name:"u_units_to_pixels",type:"vec2"},{name:"u_world_size",type:"vec2"},{name:"u_camera_to_center_distance",type:"float"},{name:"u_symbol_fade_change",type:"float"},{name:"u_aspect_ratio",type:"float"},{name:"u_device_pixel_ratio",type:"float"},{name:"u_viewport_size",type:"vec2"},{name:"u_pixel_extrude_scale",type:"vec2"},{name:"u_pitch",type:"float"}]),Gf=a7.offsets,vl=class{constructor(e,r,t){this.blendFunction=e,this.blendColor=r,this.mask=t}},vl.Replace=[1,0],vl.disabled=new vl(vl.Replace,Hn.transparent,[!1,!1,!1,!1]),vl.unblended=new vl(vl.Replace,Hn.transparent,[!0,!0,!0,!0]),vl.alphaBlended=new vl([1,771],Hn.transparent,[!0,!0,!0,!0]),iV=class{constructor(e){this.gl=e,this.clearColor=new Aq(this),this.clearDepth=new Tq(this),this.clearStencil=new Mq(this),this.colorMask=new Eq(this),this.depthMask=new Sq(this),this.stencilMask=new kq(this),this.stencilFunc=new Cq(this),this.stencilOp=new Dq(this),this.stencilTest=new Lq(this),this.depthRange=new Fq(this),this.depthTest=new Pq(this),this.depthFunc=new Iq(this),this.blend=new Rq(this),this.blendFunc=new zq(this),this.blendColor=new Bq(this),this.blendEquation=new Oq(this),this.cullFace=new Nq(this),this.cullFaceSide=new jq(this),this.frontFace=new Uq(this),this.program=new qq(this),this.activeTexture=new Vq(this),this.viewport=new Gq(this),this.bindFramebuffer=new Hq(this),this.bindRenderbuffer=new Wq(this),this.bindTexture=new $q(this),this.bindVertexBuffer=new Yq(this),this.bindElementBuffer=new Xq(this),this.bindVertexArray=new Zq(this),this.pixelStoreUnpack=new Kq(this),this.pixelStoreUnpackPremultiplyAlpha=new Jq(this),this.pixelStoreUnpackFlipY=new Qq(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),e.getExtension("EXT_color_buffer_half_float"),e.getExtension("EXT_color_buffer_float"),this.projectionUniformBuffer=Y1e(this),this.terrainUniformBuffer=Z1e(this),this.frameUniformBuffer=tge(this)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0,this.projectionUniformBuffer.bindingDirty=!0,this.terrainUniformBuffer.bindingDirty=!0,this.frameUniformBuffer.bindingDirty=!0}setCustomLayerDefaults(){this.unbindVAO(),this.cullFace.setDefault(),this.activeTexture.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}createIndexBuffer(e,r){return new bq(this,e,r)}createVertexBuffer(e,r,t){return new wq(this,e,r,t)}createRenderbuffer(e,r,t){let a=this.gl,i=a.createRenderbuffer();return this.bindRenderbuffer.set(i),a.renderbufferStorage(a.RENDERBUFFER,e,r,t),this.bindRenderbuffer.set(null),i}createFramebuffer(e,r,t,a){return new aV(this,e,r,t,a)}clear({color:e,depth:r,stencil:t}){let a=this.gl,i=0;e&&(i|=a.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),r!==void 0&&(i|=a.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),t!==void 0&&(i|=a.STENCIL_BUFFER_BIT,this.clearStencil.set(t),this.stencilMask.set(255)),a.clear(i)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func===this.gl.ALWAYS&&!e.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range))}setStencilMode(e){e.test.func===this.gl.ALWAYS&&!e.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask}))}setColorMode(e){up(e.blendFunction,vl.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){return this.gl.createVertexArray()}deleteVertexArray(e){this.gl.deleteVertexArray(e)}unbindVAO(){this.bindVertexArray.set(null)}},Ao=class{constructor(e,r,t){this.func=e,this.mask=r,this.range=t}},Ao.ReadOnly=!1,Ao.ReadWrite=!0,Ao.disabled=new Ao(519,Ao.ReadOnly,[0,1]),t4=7680,Yo=class{constructor(e,r,t,a,i,o){this.test=e,this.ref=r,this.mask=t,this.fail=a,this.depthFail=i,this.pass=o}},Yo.disabled=new Yo({func:519,mask:0},0,0,t4,t4,t4),i7=1029,r4=2305,Ho=class{constructor(e,r,t){this.enable=e,this.mode=r,this.frontFace=t}},Ho.disabled=new Ho(!1,i7,r4),Ho.backCCW=new Ho(!0,i7,r4),Ho.frontCCW=new Ho(!0,1028,r4),nV=Id(new Float32Array(16)),i4=0,n4=[new zr(0,0),new zr(xa,0),new zr(xa,xa),new zr(0,xa)],oV=new Hn(1,0,0,1),sV=new Hn(0,1,0,1),lV=new Hn(0,0,1,1),uV=new Hn(1,0,1,1),cV=new Hn(0,1,1,1),fV={symbol:ige,circle:cge,heatmap:fge,line:wge,fill:Age,fillExtrusion:Tge,hillshade:Mge,colorRelief:Sge,raster:kge,background:Fge,sky:qge,atmosphere:Gge,custom:Nge,debug:Rge,debugPadding:Pge,terrainDepth:jge},hV=(o4=class{constructor(e,r){this.drawFunctions=fV,this.context=new iV(e),this.transform=r,this.layerOpacityFbo=null,this._tileTextures={},this._rttObjectRecyclePool=[],this._rttSharedFbo=null,this.terrainFacilitator={depthDirty:!0,matrix:Id(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=H3.maxOverzooming+H3.maxUnderzooming+1,this.depthEpsilon=1/2**16,this.crossTileSymbolIndex=new IC}resize(e,r,t){if(this.width=Math.floor(e*t),this.height=Math.floor(r*t),this.pixelRatio=t,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let a of this.style._order)this.style._layers[a].resize()}setup(){let e=this.context,r=new Kp;r.emplaceBack(0,0),r.emplaceBack(xa,0),r.emplaceBack(0,xa),r.emplaceBack(xa,xa),this.tileExtentBuffer=e.createVertexBuffer(r,G0.members),this.tileExtentSegments=Zs.simpleSegment(0,0,4,2);let t=new Kp;t.emplaceBack(0,0),t.emplaceBack(xa,0),t.emplaceBack(0,xa),t.emplaceBack(xa,xa),this.debugBuffer=e.createVertexBuffer(t,G0.members),this.debugSegments=Zs.simpleSegment(0,0,4,5);let a=new DB;a.emplaceBack(0,0,0,0),a.emplaceBack(xa,0,xa,0),a.emplaceBack(0,xa,0,xa),a.emplaceBack(xa,xa,xa,xa),this.rasterBoundsBuffer=e.createVertexBuffer(a,bU.members),this.rasterBoundsSegments=Zs.simpleSegment(0,0,4,2);let i=new Kp;i.emplaceBack(0,0),i.emplaceBack(xa,0),i.emplaceBack(0,xa),i.emplaceBack(xa,xa),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(i,G0.members),this.rasterBoundsSegmentsPosOnly=Zs.simpleSegment(0,0,4,5);let o=new Kp;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,G0.members),this.viewportSegments=Zs.simpleSegment(0,0,4,2);let s=new qB;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(s);let l=new Vd;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(l);let n=this.context.gl;this.stencilClearMode=new Yo({func:n.ALWAYS,mask:0},0,255,n.ZERO,n.ZERO,n.ZERO),this.tileExtentMesh=new Z1(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let t=w0();Rd(t,0,this.width,this.height,0,0,1),wc(t,t,[r.drawingBufferWidth,r.drawingBufferHeight,0]);let a={mainMatrix:t,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:t,clipAntimeridian:!1};this.useProgram("clippingMask",null,!0).draw(e,r.TRIANGLES,Ao.disabled,this.stencilClearMode,vl.disabled,Ho.disabled,null,null,a,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}renderTileClippingMasks(e,r,t){if(this.currentStencilSource===e.source||!e.isTileClipped()||!r?.length)return;this.currentStencilSource=e.source,this.nextStencilID+r.length>256&&this.clearStencil();let a=this.context;a.setColorMode(vl.disabled),a.setDepthMode(Ao.disabled);let i={};for(let o of r)i[o.key]=this.nextStencilID++;this.style.projection.useSubdivision&&this._renderTileMasks(i,r,t,!0),this._renderTileMasks(i,r,t,!1),this._tileClippingMaskIDs=i}_renderTileMasks(e,r,t,a){let i=this.context,o=i.gl,s=this.style.projection,l=this.transform,n=this.useProgram("clippingMask");for(let u of r){let c=e[u.key],f=this.getTerrainDataForTile(u,t),h=s.getMeshFromTileID(this.context,u.canonical,a,!0,"stencil"),d=l.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!t,applyTerrainMatrix:!0});n.draw(i,o.TRIANGLES,Ao.disabled,new Yo({func:o.ALWAYS,mask:0},c,255,o.KEEP,o.KEEP,o.REPLACE),vl.disabled,t?Ho.disabled:Ho.backCCW,null,f,d,"$clipping",h.vertexBuffer,h.indexBuffer,h.segments)}}getTerrainDataForTile(e,r){var t,a;return r&&((t=this.style.projection)==null?void 0:t.name)==="mercator"?null:((a=this.style.map.terrain)==null?void 0:a.getTerrainData(e))||null}_renderTilesDepthBuffer(){var e;let r=this.context,t=r.gl,a=this.style.projection,i=this.transform,o=this.useProgram("depth"),s=this.getDepthModeFor3D(),l=W1(i,{tileSize:i.tileSize});for(let n of l){let u=(e=this.style.map.terrain)==null?void 0:e.getTerrainData(n),c=a.getMeshFromTileID(this.context,n.canonical,!0,!0,"raster"),f=i.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!0,applyTerrainMatrix:!0});o.draw(r,t.TRIANGLES,s,Yo.disabled,vl.disabled,Ho.backCCW,null,u,f,"$clipping",c.vertexBuffer,c.indexBuffer,c.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,r=this.context.gl;return new Yo({func:r.NOTEQUAL,mask:255},e,255,r.KEEP,r.KEEP,r.REPLACE)}stencilModeForClipping(e){let r=this.context.gl;return new Yo({func:r.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,r.KEEP,r.KEEP,r.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){let r=this.context.gl,t=e.sort((o,s)=>s.overscaledZ-o.overscaledZ),a=t[t.length-1].overscaledZ,i=t[0].overscaledZ-a+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();let o={};for(let s=0;ss.overscaledZ-o.overscaledZ),a=t[t.length-1].overscaledZ,i=t[0].overscaledZ-a+1;if(this.clearStencil(),i>1){let o={},s={};for(let l=0;l=0;i.currentLayer--){let f=this.style._layers[o[i.currentLayer]];if(f.isHidden(this.transform.zoom))continue;let h=s[f.source],d=l[f.source];this.renderTileClippingMasks(f,d,!1),this.renderLayer(this,h,f,d,i)}i.currentPass="translucent";let c=!1;for(i.currentLayer=0;i.currentLayer0?r.pop():null}acquireRTT(e){let r=this.context.gl,t=this._rttObjectRecyclePool.pop();if(t)return t.size!==e&&(t.texture.update({width:e,height:e,data:null},{premultiply:!1,useMipmap:!0}),t.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),t.size=e),t;let a=new Kl(this.context,{width:e,height:e,data:null},r.RGBA,{premultiply:!1,useMipmap:!0});return a.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),{texture:a,size:e}}bindRTT(e){let r=this.context.gl,t=e.size;if(!this._rttSharedFbo){let a=this.context.createFramebuffer(t,t,!0,!0),i=this.context.createRenderbuffer(r.DEPTH_STENCIL,t,t);a.depthAttachment.set(i),this._rttSharedFbo={fbo:a,depthRenderbuffer:i,size:t}}this._rttSharedFbo.size!==t&&(this.context.bindRenderbuffer.set(this._rttSharedFbo.depthRenderbuffer),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,t),this.context.bindRenderbuffer.set(null),this._rttSharedFbo.fbo.width=t,this._rttSharedFbo.fbo.height=t,this._rttSharedFbo.size=t),this._rttSharedFbo.fbo.colorAttachment.set(e.texture.texture),this.context.bindFramebuffer.set(this._rttSharedFbo.fbo.framebuffer)}releaseRTT(e){this._rttObjectRecyclePool.push(e)}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let r=this.patternAtlas.getPattern(e.from.toString()),t=this.patternAtlas.getPattern(e.to.toString());return!r||!t}useProgram(e,r,t=!1,a=[]){var i;this.cache||(this.cache={});let o=!!this.style.map.terrain,s=this.style.projection,l=t?Hd.projectionMercator:s.shaderPreludeCode,n=t?zC:s.shaderDefine,u=`/${t?BC:s.shaderVariantName}`,c=r?r.cacheKey:"",f=this._showOverdrawInspector?"/overdraw":"",h=o?"/terrain":"",d=a?`/${a.join("/")}`:"",p=e+c+u+f+h+d;return(i=this.cache)[p]||(i[p]=new CU(this.context,Hd[e],r,xq[e],this._showOverdrawInspector,o,l,n,a)),this.cache[p]}setCustomLayerDefaults(){this.context.setCustomLayerDefaults()}setBaseState(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;let e=this.context.gl;this.debugOverlayTexture=new Kl(this.context,this.debugOverlayCanvas,e.RGBA)}}destroy(){var e,r,t;if(this._tileTextures){for(let a in this._tileTextures){let i=this._tileTextures[a];if(i)for(let o of i)o.destroy()}this._tileTextures={}}for(let a of this._rttObjectRecyclePool)a.texture.destroy();if(this._rttObjectRecyclePool=[],this._rttSharedFbo){this._rttSharedFbo.fbo.colorAttachment.set(null),this._rttSharedFbo.fbo.depthAttachment.set(null);let a=this.context.gl;a.deleteRenderbuffer(this._rttSharedFbo.depthRenderbuffer),a.deleteFramebuffer(this._rttSharedFbo.fbo.framebuffer),this._rttSharedFbo=null}if((e=this.layerOpacityFbo)==null||e.destroy(),this.layerOpacityFbo=null,this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((r=this.tileExtentMesh.vertexBuffer)==null||r.destroy()),this.tileExtentMesh&&((t=this.tileExtentMesh.indexBuffer)==null||t.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.context.projectionUniformBuffer.destroy(),this.context.terrainUniformBuffer.destroy(),this.context.frameUniformBuffer.destroy(),this.cache){for(let a in this.cache){let i=this.cache[a];i?.program&&this.context.gl.deleteProgram(i.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:r}=this.context.gl;return this.width!==e||this.height!==r}},o4.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50,o4),n7=class extends Error{constructor(e,r){var t;super("WebGL2 is required to display this map. We are sorry, but it seems that your browser does not support WebGL2, a technology for rendering 3D graphics on the web. Read more on https://wiki.openstreetmap.org/wiki/This_map_requires_WebGL"),this.name="GPUInitializationError",this.requestedAttributes=e,this.statusMessage=(t=r?.statusMessage)!=null?t:null}},o7=class{constructor(e){this._getHashParams=()=>new URLSearchParams(window.location.hash.replace("#","")),this._getCurrentHash=()=>{var r;let t=this._getHashParams();return this._hashName?(t.get(this._hashName)||"").split("/"):((r=[...t.keys()][0])!=null?r:"").split("/")},this._onHashChange=()=>{let r=this._getCurrentHash();if(!this._isValidHash(r))return!1;let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(r[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+r[2],+r[1]],zoom:+r[0],bearing:t,pitch:+(r[4]||0)}),!0},this._updateHashUnthrottled=()=>{let r=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,r)},this._removeHash=()=>{let r=this._getHashParams();if(this._hashName)r.delete(this._hashName);else{let o=Array.from(r.keys());o.length>0&&r.delete(o[0])}let t=decodeURIComponent(r.toString()).replace(/=&/g,"&").replace(/=$/g,""),a=t?`#${t}`:"",i=window.location.href.replace(/(#.+)?$/,a);i=i.replace("&&","&"),window.history.replaceState(window.history.state,null,i)},this._updateHash=sj(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,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(e){let r=this._map.getCenter(),t=Math.round(this._map.getZoom()*100)/100,a=10**Math.ceil((t*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.round(r.lng*a)/a,o=Math.round(r.lat*a)/a,s=this._map.getBearing(),l=this._map.getPitch(),n="";if(n+=e?`/${i}/${o}/${t}`:`${t}/${o}/${i}`,(s||l)&&(n+=`/${Math.round(s*10)/10}`),l&&(n+=`/${Math.round(l)}`),this._hashName){let u=this._getHashParams();return u.set(this._hashName,n),`#${decodeURIComponent(u.toString()).replace(/=&/g,"&").replace(/=$/g,"")}`}return`#${n}`}_isValidHash(e){if(e.length<3||e.some(i=>isNaN(+i)))return!1;try{new ln(+e[2],+e[1])}catch{return!1}let r=+e[0],t=+(e[3]||0),a=+(e[4]||0);return r>=this._map.getMinZoom()&&r<=this._map.getMaxZoom()&&t>=-180&&t<=180&&a>=this._map.getMinPitch()&&a<=this._map.getMaxPitch()}},tg={linearity:.3,easing:VM(0,0,.3,1)},dV=tn({deceleration:2500,maxSpeed:1400},tg),pV=tn({deceleration:20,maxSpeed:1400},tg),vV=tn({deceleration:1e3,maxSpeed:360},tg),mV=tn({deceleration:1e3,maxSpeed:90},tg),gV=tn({deceleration:1e3,maxSpeed:360},tg),yV=class{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:is(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,r=is();for(;e.length>0&&r-e[0].time>160;)e.shift()}_getVelocityEntries(){let e=this._inertiaBuffer,r=is()-60,t=Math.max(0,e.length-2);for(;t>0&&e[t-1].time>=r;)t--;return e.slice(t)}_onMoveEnd(e){this._drainInertiaBuffer();let r=this._getVelocityEntries();if(r.length<2){this.clear();return}let t={zoom:0,bearing:0,pitch:0,roll:0,pan:new zr(0,0),pinchAround:void 0,around:void 0};for(let{settings:o}of r)o.around&&(t.around=o.around),o.pinchAround&&(t.pinchAround=o.pinchAround);for(let{settings:o}of r.slice(1))t.zoom+=o.zoomDelta||0,t.bearing+=o.bearingDelta||0,t.pitch+=o.pitchDelta||0,t.roll+=o.rollDelta||0,o.panDelta&&t.pan._add(o.panDelta);if(!t.pan.mag()&&!t.zoom&&!t.bearing&&!t.pitch&&!t.roll){this.clear();return}let a=is()-r[0].time,i={};if(t.pan.mag()){let o=X_(t.pan.mag(),a,tn({},dV,e||{})),s=t.pan.mult(o.amount/t.pan.mag()),l=this._map._camera.cameraHelper.handlePanInertia(s,this._map._camera.transform);i.center=l.easingCenter,i.offset=l.easingOffset,Y_(i,o)}if(t.zoom){let o=X_(t.zoom,a,pV);i.zoom=fh(this._map.getZoom()+o.amount,this._map.getZoomSnap(),o.amount),Y_(i,o)}if(t.bearing){let o=X_(t.bearing,a,vV);i.bearing=this._map.getBearing()+Gn(o.amount,-179,179),Y_(i,o)}if(t.pitch){let o=X_(t.pitch,a,mV);i.pitch=this._map.getPitch()+o.amount,Y_(i,o)}if(t.roll){let o=X_(t.roll,a,gV);i.roll=this._map.getRoll()+Gn(o.amount,-179,179),Y_(i,o)}if(i.zoom||i.bearing){let o=t.pinchAround===void 0?t.around:t.pinchAround;i.around=o?this._map.unproject(o):this._map.getCenter()}return this.clear(),tn(i,{noMoveStart:!0})}},_V=class{constructor(e,r){this._map=e,this._clickTolerance=r.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new vC(this._map,e))}mousedown(e,r){return this._mousedownPos=r,this._firePreventable(new Vf(e.type,this._map,e))}mouseup(e){this._map.fire(new Vf(e.type,this._map,e))}click(e,r){this._mousedownPos&&this._mousedownPos.dist(r)>=this._clickTolerance||this._map.fire(new Vf(e.type,this._map,e))}dblclick(e){return this._firePreventable(new Vf(e.type,this._map,e))}mouseover(e){this._map.fire(new Vf(e.type,this._map,e))}mouseout(e){this._map.fire(new Vf(e.type,this._map,e))}touchstart(e){return this._firePreventable(new X1(e.type,this._map,e))}touchmove(e){this._map.fire(new X1(e.type,this._map,e))}touchend(e){this._map.fire(new X1(e.type,this._map,e))}touchcancel(e){this._map.fire(new X1(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},xV=class{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new Vf(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Vf("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new Vf(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},s7=class{constructor(e,r,t){this._map=e,this._tr=t,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1,r.boxZoom&&typeof r.boxZoom=="object"&&(this._boxZoomEnd=r.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,r){this.isEnabled()&&e.shiftKey&&e.button===0&&(Fn.disableDrag(),this._startPos=this._lastPos=r,this._active=!0)}mousemoveWindow(e,r){if(!this._active)return;let t=r;if(this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)i.fitScreenCoordinates(t,a,this._tr.bearing,{linear:!0})}}}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box=(this._box.remove(),null)),Fn.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new I3(e,{originalEvent:r}))}},bV=class{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,r,t){(this.centroid||t.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=e.timeStamp),t.length===this.numTouches&&(this.centroid=Wge(r),this.touches=uC(t,r)))}touchmove(e,r,t){if(this.aborted||!this.centroid)return;let a=uC(t,r);for(let i in this.touches){let o=this.touches[i],s=a[i];(!s||s.dist(o)>30)&&(this.aborted=!0)}}touchend(e,r,t){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),t.length===0){let a=!this.aborted&&this.centroid;if(this.reset(),a)return a}}},s4=class{constructor(e){this.singleTap=new bV(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,r,t){this.singleTap.touchstart(e,r,t)}touchmove(e,r,t){this.singleTap.touchmove(e,r,t)}touchend(e,r,t){let a=this.singleTap.touchend(e,r,t);if(a){let i=e.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(a)<30;if((!i||!o)&&this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=a,this.count===this.numTaps)return this.reset(),a}}},wV=class{constructor(e,r){this._tr=r,this._zoomIn=new s4({numTouches:1,numTaps:2}),this._zoomOut=new s4({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,r,t){this._zoomIn.touchstart(e,r,t),this._zoomOut.touchstart(e,r,t)}touchmove(e,r,t){this._zoomIn.touchmove(e,r,t),this._zoomOut.touchmove(e,r,t)}touchend(e,r,t){let a=this._zoomIn.touchend(e,r,t),i=this._zoomOut.touchend(e,r,t),o=this._tr;if(a)return this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:s=>s.easeTo({duration:300,zoom:fh(o.zoom+1,s.getZoomSnap()),around:o.unproject(a)},{originalEvent:e})};if(i)return this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:s=>s.easeTo({duration:300,zoom:fh(o.zoom-1,s.getZoomSnap()),around:o.unproject(i)},{originalEvent:e})}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},rg=class{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let r=this._moveFunction(...e);if(r.bearingDelta||r.pitchDelta||r.rollDelta||r.around||r.panDelta)return this._active=!0,r}dragStart(e,r){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(r)?r[0]:r,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,r){if(!this.isEnabled())return;let t=this._lastPoint;if(!t)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e)){this.reset(e);return}let a=Array.isArray(r)?r[0]:r;if(!(!this._moved&&a.dist(t)!0}),r=new TV){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=r}_executeRelevantHandler(e,r,t){if(e instanceof MouseEvent)return r(e);if(typeof TouchEvent<"u"&&e instanceof TouchEvent)return t(e)}startMove(e){this._executeRelevantHandler(e,r=>{this.mouseMoveStateManager.startMove(r)},r=>{this.oneFingerTouchMoveStateManager.startMove(r)})}endMove(e){this._executeRelevantHandler(e,r=>{this.mouseMoveStateManager.endMove(r)},r=>{this.oneFingerTouchMoveStateManager.endMove(r)})}isValidStartEvent(e){return!!this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidStartEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidStartEvent(r))}isValidMoveEvent(e){return!!this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidMoveEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(r))}isValidEndEvent(e){return!!this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidEndEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidEndEvent(r))}},lx=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=r=>{r.preventDefault()}},EV=class{constructor(e,r){this._clickTolerance=e.clickTolerance||1,this._map=r,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new zr(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,r,t){return this._calculateTransform(e,r,t)}touchmove(e,r,t){if(this._active){if(this._shouldBePrevented(t.length)){this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e);return}return e.preventDefault(),this._calculateTransform(e,r,t)}}touchend(e,r,t){this._calculateTransform(e,r,t),this._active&&this._shouldBePrevented(t.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,t){t.length>0&&(this._active=!0);let a=uC(t,r),i=new zr(0,0),o=new zr(0,0),s=0;for(let n in a){let u=a[n],c=this._touches[n];c&&(i._add(u),o._add(u.sub(c)),s++,a[n]=u)}if(this._touches=a,this._shouldBePrevented(s)||!o.mag())return;let l=o.div(s);if(this._sum._add(l),!(this._sum.mag()=2,i=r.mag()>=2;if(!a&&!i)return;if(!a||!i)return this._firstMove===void 0&&(this._firstMove=t),t-this._firstMove<100&&void 0;let o=e.y>0==r.y>0;return cC(e)&&cC(r)&&o}},SV={panStep:100,bearingStep:15,pitchStep:10},h7=class{constructor(e,r){this._tr=r;let t=SV;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let r=0,t=0,a=0,i=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?t=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?t=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?a=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?a=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(t=0,a=0),{cameraAnimation:s=>{let l=this._tr;s.easeTo({duration:300,easeId:"keyboardHandler",easing:Jge,zoom:r?fh(l.zoom+r*(e.shiftKey?2:1),s.getZoomSnap()):l.zoom,bearing:l.bearing+t*this._bearingStep,pitch:l.pitch+a*this._pitchStep,offset:[-i*this._panStep,-o*this._panStep],center:l.center},{originalEvent:e})}}}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}},d7=4.000244140625,p7=class{constructor(e,r,t){this._onTimeout=a=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(a)},this._map=e,this._tr=t,this._triggerRenderFrame=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return this._map.cooperativeGestures.isEnabled()?!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e)):!1}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e)){this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);return}let r=e.deltaMode===WheelEvent.DOM_DELTA_LINE?e.deltaY*40:e.deltaY,t=is(),a=t-(this._lastWheelEventTime||0);this._lastWheelEventTime=t,r!==0&&r%d7==0?this._type="wheel":r!==0&&Math.abs(r)<4?this._type="trackpad":a>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(a*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let r=Fn.mousePos(this._map.getCanvas(),e),t=this._tr;this._aroundPoint=this._aroundCenter?t.transform.locationToScreenPoint(ln.convert(t.center)):r,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let s=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=s),typeof this._targetZoom=="number"&&(this._targetZoom+=s)}if(this._delta!==0){let s=this._type==="wheel"&&Math.abs(this._delta)>d7?this._wheelZoomRate:this._defaultZoomRate,l=2/(1+Math.exp(-Math.abs(this._delta*s)));this._delta<0&&l!==0&&(l=1/l);let n=typeof this._targetZoom=="number"?bf(this._targetZoom):e.scale,u=e.applyConstrain(e.getCameraLngLat(),Tc(n*l)).zoom,c=this._map.getZoomSnap();if(this._type==="wheel"&&c>0){let f=fh(e.zoom,c);this._targetZoom=fh(u,c,u-f)}else this._targetZoom=u;this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let r=typeof this._targetZoom=="number"?this._targetZoom:e.zoom,t=this._startZoom,a=this._easing,i=!1,o;if(this._type==="wheel"&&t&&a){let s=is()-this._lastWheelEventTime,l=Math.min((s+5)/200,1),n=a(l);o=Xs.number(t,r,n),l<1?this._needsRerender=!0:i=!0}else o=r,i=!0;return this._active=!0,i&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=o,{noInertia:!0,needsRenderFrame:!i,zoomDelta:o-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=$2;if(this._prevEase){let t=this._prevEase,a=(is()-t.start)/t.duration,i=t.easing(a+.01)-t.easing(a),o=.27/Math.sqrt(i*i+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=VM(o,s,.25,1)}return this._prevEase={start:is(),duration:e,easing:r},r}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}},v7=class{constructor(e,r){this._clickZoom=e,this._tapZoom=r}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()}},kV=class{constructor(e,r){this._tr=r,this.reset()}reset(){this._active=!1}dblclick(e,r){return e.preventDefault(),{cameraAnimation:t=>{t.easeTo({duration:300,zoom:fh(this._tr.zoom+(e.shiftKey?-1:1),t.getZoomSnap()),around:this._tr.unproject(r)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},CV=class{constructor(){this._tap=new s4({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(e){this._zoomRate=e??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,r,t){if(!this._swipePoint)if(!this._tapTime)this._tap.touchstart(e,r,t);else{let a=r[0],i=e.timeStamp-this._tapTime<500,o=this._tapPoint.dist(a)<30;!i||!o?this.reset():t.length>0&&(this._swipePoint=a,this._swipeTouch=t[0].identifier)}}touchmove(e,r,t){if(!this._tapTime)this._tap.touchmove(e,r,t);else if(this._swipePoint){if(t[0].identifier!==this._swipeTouch)return;let a=r[0],i=a.y-this._swipePoint.y;return this._swipePoint=a,e.preventDefault(),this._active=!0,{zoomDelta:i/128*this._zoomRate}}}touchend(e,r,t){if(this._tapTime)this._swipePoint&&t.length===0&&this.reset();else{let a=this._tap.touchend(e,r,t);a&&(this._tapTime=e.timeStamp,this._tapPoint=a)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},m7=class{constructor(e,r,t){this._el=e,this._mousePan=r,this._touchPan=t}enable(e){this._inertiaOptions=e||{},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()}},g7=class{constructor(e,r,t,a){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=r,this._mousePitch=t,this._mouseRoll=a}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}},y7=class{constructor(e,r,t,a){this._el=e,this._touchZoom=r,this._touchRotate=t,this._tapDragZoom=a,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),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()}setZoomRate(e){this._touchZoom.setZoomRate(e),this._tapDragZoom.setZoomRate(e)}setZoomThreshold(e){this._touchZoom.setZoomThreshold(e)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}},_7=class{constructor(e,r){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=r,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=Fn.create("div","maplibregl-cooperative-gesture-screen",e);let r=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(r=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let t=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),a=document.createElement("div");a.className="maplibregl-desktop-message",a.textContent=r,this._container.appendChild(a);let i=document.createElement("div");i.className="maplibregl-mobile-message",i.textContent=t,this._container.appendChild(i),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),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(e){return e[this._bypassKey]}notifyGestureBlocked(e,r){this._enabled&&(this._map.fire(new vu("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}},DV=class{constructor(e){this._camera=e}get transform(){return this._camera._requestedCameraState||this._camera.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(e){return this.transform.screenPointToLocation(zr.convert(e),this._camera.terrain)}},ux=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate,LV=class extends qf{},FV=class{get _ownerDocument(){var e;return((e=this._el)==null?void 0:e.ownerDocument)||document}get _ownerWindow(){var e,r;return((r=(e=this._el)==null?void 0:e.ownerDocument)==null?void 0:r.defaultView)||window}constructor(e,r,t){this._terrainGestureAnchorElevation=null,this.handleWindowEvent=i=>{this.handleEvent(i,`${i.type}Window`)},this.handleEvent=(i,o)=>{if(i.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;let s=i.type==="renderFrame"?void 0:i,l={needsRenderFrame:!1},n={},u={};for(let{handlerName:h,handler:d,allowed:p}of this._handlers){if(!d.isEnabled())continue;let g;if(this._blockedByActive(u,p,h))d.reset();else if(d[o||i.type]){if(qce(i,o||i.type)){let m=Fn.mousePos(this._map.getCanvas(),i);g=d[o||i.type](i,m)}else if(Uce(i,o||i.type)){let m=i.touches,y=this._getMapTouches(m),_=Fn.touchPos(this._map.getCanvas(),y);g=d[o||i.type](i,_,y)}else Vce(o||i.type)||(g=d[o||i.type](i));this.mergeHandlerResult(l,n,g,h,s),g?.needsRenderFrame&&this._triggerRenderFrame()}(g||d.isActive())&&(u[h]=d)}let c={};for(let h in this._previousActiveHandlers)u[h]||(c[h]=s);this._previousActiveHandlers=u,(Object.keys(c).length||fC(l))&&(this._changes.push([l,n,c]),this._triggerRenderFrame()),(Object.keys(u).length||fC(l))&&this._camera.stop(!0),this._updatingCamera=!1;let{cameraAnimation:f}=l;f&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],f(this._map))},this._map=e,this._camera=r,this._transformProvider=new DV(this._camera),this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new yV(e),this._bearingSnap=t.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(t);let a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[i,o,s]of this._listeners)i.addEventListener(o,i===this._ownerDocument?this.handleWindowEvent:this.handleEvent,s)}destroy(){for(let[e,r,t]of this._listeners)e.removeEventListener(r,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,t)}_addDefaultHandlers(e){let r=this._map,t=r.getCanvasContainer();this._add("mapEvent",new _V(r,e));let a=r.boxZoom=new s7(r,e,this._transformProvider);this._add("boxZoom",a),e.interactive&&e.boxZoom&&a.enable();let i=r.cooperativeGestures=new _7(r,e.cooperativeGestures);this._add("cooperativeGestures",i),e.cooperativeGestures&&i.enable();let o=new wV(r,this._transformProvider),s=new kV(r,this._transformProvider);r.doubleClickZoom=new v7(s,o),this._add("tapZoom",o),this._add("clickZoom",s),e.interactive&&e.doubleClickZoom&&r.doubleClickZoom.enable();let l=new CV;this._add("tapDragZoom",l);let n=r.touchPitch=new f7(r);this._add("touchPitch",n),e.interactive&&e.touchPitch&&r.touchPitch.enable(e.touchPitch);let u=()=>r.project(r.getCenter()),c=Xge(e,u),f=Zge(e),h=Kge(e,u);r.dragRotate=new g7(e,c,f,h),this._add("mouseRotate",c,["mousePitch"]),this._add("mousePitch",f,["mouseRotate","mouseRoll"]),this._add("mouseRoll",h,["mousePitch"]),e.interactive&&e.dragRotate&&r.dragRotate.enable();let d=Yge(e),p=new EV(e,r);r.dragPan=new m7(t,d,p),this._add("mousePan",d),this._add("touchPan",p,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&r.dragPan.enable(e.dragPan);let g=new c7,m=new u7;r.touchZoomRotate=new y7(t,m,g,l),this._add("touchRotate",g,["touchPan","touchZoom"]),this._add("touchZoom",m,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&r.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new xV(r));let y=r.scrollZoom=new p7(r,()=>this._triggerRenderFrame(),this._transformProvider);this._add("scrollZoom",y,["mousePan"]),e.interactive&&e.scrollZoom&&r.scrollZoom.enable(e.scrollZoom);let _=r.keyboard=new h7(r,this._transformProvider);this._add("keyboard",_),e.interactive&&e.keyboard&&r.keyboard.enable()}_add(e,r,t){this._handlers.push({handlerName:e,handler:r,allowed:t}),this._handlersById[e]=r}stop(e){if(!this._updatingCamera){for(let{handler:r}of this._handlers)r.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!ux(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,r,t){for(let a in e)if(a!==t&&!r?.includes(a))return!0;return!1}_getMapTouches(e){let r=[];for(let t of e){let a=t.target;this._el.contains(a)&&r.push(t)}return r}mergeHandlerResult(e,r,t,a,i){if(!t)return;tn(e,t);let o={handlerName:a,originalEvent:t.originalEvent||i};t.zoomDelta!==void 0&&(r.zoom=o),t.panDelta!==void 0&&(r.drag=o),t.rollDelta!==void 0&&(r.roll=o),t.pitchDelta!==void 0&&(r.pitch=o),t.bearingDelta!==void 0&&(r.rotate=o)}_applyChanges(){let e={},r={},t={};for(let[a,i,o]of this._changes)a.panDelta&&(e.panDelta=(e.panDelta||new zr(0,0))._add(a.panDelta)),a.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+a.zoomDelta),a.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+a.bearingDelta),a.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+a.pitchDelta),a.rollDelta&&(e.rollDelta=(e.rollDelta||0)+a.rollDelta),a.around!==void 0&&(e.around=a.around),a.pinchAround!==void 0&&(e.pinchAround=a.pinchAround),a.noInertia&&(e.noInertia=a.noInertia),tn(r,i),tn(t,o);this._updateMapTransform(e,r,t),this._changes=[]}_updateMapTransform(e,r,t){let a=this._map,i=this._camera.getTransformForUpdate(),o=a.terrain;if(!fC(e)&&!(o&&this._terrainMovement)){this._fireEvents(r,t,!0);return}this._camera.stop(!0);let{panDelta:s,zoomDelta:l,bearingDelta:n,pitchDelta:u,rollDelta:c}=e,{around:f,aroundOnSurface:h}=this._resolveAround(e,o,i),d=o?this._terrainGestureElevation(o,f,h,i,r):void 0,p={panDelta:s,zoomDelta:l,rollDelta:c,pitchDelta:u,bearingDelta:n,around:f,aroundElevation:d};this._camera.cameraHelper.useGlobeControls&&!i.isPointOnMapSurface(f)&&(f=i.centerPoint);let g=this._computePreZoomAroundLoc(i,f,s,d);this._handleMapControls({terrain:o,tr:i,deltasForHelper:p,preZoomAroundLoc:g,combinedEventsInProgress:r,panDelta:s}),this._camera.applyUpdatedTransform(i),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(r,t,!0)}_resolveAround(e,r,t){let a=e.pinchAround===void 0?e.around:e.pinchAround;return a||(a=this._camera.transform.centerPoint),r&&!t.isPointOnMapSurface(a)?{around:t.centerPoint,aroundOnSurface:!1}:{around:a,aroundOnSurface:!0}}_terrainGestureElevation(e,r,t,a,i){if(!t)return;if(!this._terrainMovement&&(i.drag||i.zoom)){let s=a.screenTerrainPointToMercatorCoordinate(r,e);this._terrainGestureAnchorElevation=s?s.z:null}if(this._terrainGestureAnchorElevation===null)return;let o=this._terrainGestureAnchorElevation;if(!(r.distSqr(a.centerPoint)<.01)&&!(o-a.elevation>=.9*(a.getCameraAltitude()-a.elevation)))return o}_computePreZoomAroundLoc(e,r,t,a){if(r.distSqr(e.centerPoint)<.01)return e.center;let i=t?r.sub(t):r;return a===void 0?e.screenPointToLocation(i):e.screenPointToLocationAtElevation(i,a)}_handleMapControls({terrain:e,tr:r,deltasForHelper:t,preZoomAroundLoc:a,combinedEventsInProgress:i,panDelta:o}){let s=this._camera.cameraHelper;if(s.handleMapControlsRollPitchBearingZoom(t,r),!e){s.handleMapControlsPan(t,r,a);return}if(s.useGlobeControls){!this._terrainMovement&&(i.drag||i.zoom)&&(this._terrainMovement=!0,this._camera.elevationFreeze=!0),s.handleMapControlsPan(t,r,a);return}if(!this._terrainMovement&&(i.drag||i.zoom)){this._terrainMovement=!0,this._camera.elevationFreeze=!0,s.handleMapControlsPan(t,r,a);return}if(t.aroundElevation===void 0&&i.drag&&this._terrainMovement&&o){r.setCenter(r.screenPointToLocation(r.centerPoint.sub(o)));return}s.handleMapControlsPan(t,r,a)}_fireEvents(e,r,t){let a=ux(this._eventsInProgress),i=ux(e),o={};for(let c in e){let{originalEvent:f}=e[c];this._eventsInProgress[c]||(o[`${c}start`]=f),this._eventsInProgress[c]=e[c]}!a&&i&&this._fireEvent("movestart",i.originalEvent);for(let c in o)this._fireEvent(c,o[c]);i&&this._fireEvent("move",i.originalEvent);for(let c in e){let{originalEvent:f}=e[c];this._fireEvent(c,f)}let s={},l;for(let c in this._eventsInProgress){let{handlerName:f,originalEvent:h}=this._eventsInProgress[c];this._handlersById[f].isActive()||(delete this._eventsInProgress[c],l=r[f]||h,s[`${c}end`]=l)}for(let c in s)this._fireEvent(c,s[c]);let n=ux(this._eventsInProgress),u=(a||i)&&!n;if(u&&this._terrainMovement){this._camera.elevationFreeze=!1,this._terrainMovement=!1,this._terrainGestureAnchorElevation=null;let c=this._camera.getTransformForUpdate();this._map.getCenterClampedToGround()&&c.recalculateZoomAndCenter(this._map.terrain),this._camera.applyUpdatedTransform(c)}if(t&&u){this._updatingCamera=!0;let c=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),f=h=>h!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new LV("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}},PV=class extends Zl{constructor(e){var r,t,a;super(),this._renderFrameCallback=()=>{let i=Math.min((is()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(i)),i<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this.transform=new rx,this.cameraHelper=new ax,e.minZoom!==void 0&&this.transform.setMinZoom(e.minZoom),e.maxZoom!==void 0&&this.transform.setMaxZoom(e.maxZoom),e.minPitch!==void 0&&this.transform.setMinPitch(e.minPitch),e.maxPitch!==void 0&&this.transform.setMaxPitch(e.maxPitch),e.renderWorldCopies!==void 0&&this.transform.setRenderWorldCopies(e.renderWorldCopies),e.transformConstrain!==null&&this.transform.setConstrainOverride(e.transformConstrain),this._moving=!1,this._zooming=!1,this._bearingSnap=e.bearingSnap,this._zoomSnap=e.zoomSnap,this._requestRenderFrame=e.requestRenderFrame,this._cancelRenderFrame=e.cancelRenderFrame,this.terrain=e.terrain,this._centerClampedToGround=(r=e.centerClampedToGround)!=null?r:!0,this.transformCameraUpdate=(t=e.transformCameraUpdate)!=null?t:null,this._stopHandlers=(a=e.stopHandlers)!=null?a:(()=>{}),this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,r){if(e.apply(this.transform,!0),this.transform=e,this.cameraHelper=r,this._requestedCameraState){let t=e.clone();t.apply(this._requestedCameraState,!0),this._requestedCameraState=t}}getCenter(){return new ln(this.transform.center.lng,this.transform.center.lat)}setCenter(e,r){return this.jumpTo({center:e},r)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,r){return this.jumpTo({elevation:e},r),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,r,t){return e=zr.convert(e).mult(-1),this.panTo(this.transform.center,tn({offset:e},r),t)}panTo(e,r,t){return this.easeTo(tn({center:e},r),t)}getZoom(){return this.transform.zoom}setZoom(e,r){return this.jumpTo({zoom:e},r),this}zoomTo(e,r,t){return this.easeTo(tn({zoom:e},r),t)}zoomIn(e,r){return this.zoomTo(fh(this.getZoom()+1,this._zoomSnap),e,r),this}zoomOut(e,r){return this.zoomTo(fh(this.getZoom()-1,this._zoomSnap),e,r),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,r){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new hn("movestart",r)).fire(new hn("move",r)).fire(new hn("moveend",r))),this}getBearing(){return this.transform.bearing}setZoomSnap(e){return this._zoomSnap=e,this}getZoomSnap(){return this._zoomSnap}setBearing(e,r){return this.jumpTo({bearing:e},r),this}getPadding(){return this.transform.padding}setPadding(e,r){return this.jumpTo({padding:e},r),this}rotateTo(e,r,t){return this.easeTo(tn({bearing:e},r),t)}resetNorth(e,r){return this.rotateTo(0,tn({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(tn({bearing:0,pitch:0,roll:0,duration:1e3},e),r),this}snapToNorth(e,r){return Math.abs(this.getBearing()){p.easeFunc(g),this.terrain&&!e.freezeElevation&&this._updateElevation(g),this.applyUpdatedTransform(t),this._fireMoveEvents(r)},g=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,g)},e),this}_prepareEase(e,r,t={}){this._moving=!0,!r&&!t.moving&&this.fire(new hn("movestart",e)),this._zooming&&!t.zooming&&this.fire(new hn("zoomstart",e)),this._rotating&&!t.rotating&&this.fire(new hn("rotatestart",e)),this._pitching&&!t.pitching&&this.fire(new hn("pitchstart",e)),this._rolling&&!t.rolling&&this.fire(new hn("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLat(e,this.transform),this.elevationFreeze=!0}_updateElevation(e){(this._elevationStart===void 0||this._elevationCenter===void 0)&&this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let r=this.terrain.getElevationForLngLat(this._elevationCenter,this.transform);if(e<1&&r!==this._elevationTarget){let t=this._elevationTarget-this._elevationStart,a=(r-(t*e+this._elevationStart))/(1-e);this._elevationStart+=e*(t-a),this._elevationTarget=r}this.transform.setElevation(Xs.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this.elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}getTransformForUpdate(){return!this.transformCameraUpdate&&!this.terrain?this.transform:(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState)}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let r=e.getCameraLngLat(),t=e.getCameraAltitude(),a=this.terrain?this.terrain.getElevationForLngLatZoom(r,e.zoom):0;if(tthis._elevateCameraIfInsideTerrain(a)),this.transformCameraUpdate&&r.push(a=>this.transformCameraUpdate(a)),!r.length)return;let t=e.clone();for(let a of r){let i=t.clone(),{center:o,zoom:s,roll:l,pitch:n,bearing:u,elevation:c}=a(i);o&&i.setCenter(o),c!==void 0&&i.setElevation(c),s!==void 0&&i.setZoom(s),l!==void 0&&i.setRoll(l),n!==void 0&&i.setPitch(n),u!==void 0&&i.setBearing(u),t.apply(i,!1)}this.transform.apply(t,!1)}_fireMoveEvents(e){this.fire(new hn("move",e)),this._zooming&&this.fire(new hn("zoom",e)),this._rotating&&this.fire(new hn("rotate",e)),this._pitching&&this.fire(new hn("pitch",e)),this._rolling&&this.fire(new hn("roll",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;let t=this._zooming,a=this._rotating,i=this._pitching,o=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,t&&this.fire(new hn("zoomend",e)),a&&this.fire(new hn("rotateend",e)),i&&this.fire(new hn("pitchend",e)),o&&this.fire(new hn("rollend",e)),this.fire(new hn("moveend",e))}flyTo(e,r){if(!e.essential&&Hc.prefersReducedMotion){let A=Gy(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(A,r)}this.stop(),e=tn({offset:[0,0],speed:1.2,curve:1.42,easing:$2},e),e.zoom!==void 0&&this._zoomSnap&&(e.zoom=fh(e.zoom,this._zoomSnap));let t=this.getTransformForUpdate(),a=t.bearing,i=t.pitch,o=t.roll,s=t.padding,l=e.bearing===void 0?a:this._normalizeBearing(e.bearing,a),n=e.pitch===void 0?i:+e.pitch,u=e.roll===void 0?o:this._normalizeBearing(e.roll,o),c=e.padding===void 0?t.padding:e.padding,f=zr.convert(e.offset),h=t.centerPoint.add(f),d=t.screenPointToLocation(h),p=this.cameraHelper.handleFlyTo(t,{bearing:l,pitch:n,roll:u,padding:c,locationAtOffset:d,offsetAsPoint:f,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),g=e.curve,m=Math.max(t.width,t.height),y=m/p.scaleOfZoom,_=p.pixelPathLength,v=m/p.scaleOfMinZoom;g=Math.min(g,Math.sqrt(v/_*2));let x=g*g;function E(A){let F=(y*y-m*m+(A?-1:1)*x*x*_*_)/(2*(A?y:m)*x*_);return Math.log(Math.sqrt(F*F+1)-F)}function M(A){return(Math.exp(A)-Math.exp(-A))/2}function C(A){return(Math.exp(A)+Math.exp(-A))/2}function w(A){return M(A)/C(A)}let k=E(!1),T=function(A){return C(k)/C(k+g*A)},b=function(A){return m*((C(k)*w(k+g*A)-M(k))/x)/_},S=(E(!0)-k)/g;if(Math.abs(_)<2e-6||!isFinite(S)){if(Math.abs(m-y)<1e-6)return this.easeTo(e,r);let A=y0,T=F=>Math.exp(A*g*F)}if(e.duration!==void 0)e.duration=+e.duration;else{let A=e.screenSpeed===void 0?+e.speed:+e.screenSpeed/g;e.duration=1e3*S/A}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==l,this._pitching=n!==i,this._rolling=u!==o,this._padding=!t.isPaddingEqual(c),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(p.targetCenter),this._ease(A=>{let F=A*S,D=1/T(F),R=b(F);this._rotating&&t.setBearing(Xs.number(a,l,A)),this._pitching&&t.setPitch(Xs.number(i,n,A)),this._rolling&&t.setRoll(Xs.number(o,u,A)),this._padding&&(t.interpolatePadding(s,c,A),h=t.centerPoint.add(f)),p.easeFunc(A,D,R,h),this.terrain&&!e.freezeElevation&&this._updateElevation(A),this.applyUpdatedTransform(t),this._fireMoveEvents(r)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)},e),this}isEasing(){return!!this._easeFrameId}stop(e){return this._stop(e)}_stop(e,r){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let t=this._onEaseEnd;delete this._onEaseEnd,t.call(this,r)}return e||this._stopHandlers(),this}_ease(e,r,t){t.animate===!1||t.duration===0?(e(1),r()):(this._easeStart=is(),this._easeOptions=t,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){e=qh(e,-180,180);let t=Math.abs(e-r);return Math.abs(e-360-r)MapLibre
'},b7=class{constructor(e=x7){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=r=>{r&&(r.type==="terrain"||r.dataType==="style"||r.dataType==="source"&&(r.sourceDataType==="metadata"||r.sourceDataType==="visibility"))&&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=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=Fn.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=Fn.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=Fn.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(){this._container.remove(),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(e,r){let t=this._map._getUIString(`AttributionControl.${r}`);e.title=t,e.setAttribute("aria-label",t)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(a=>typeof a=="string"?a:"")):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let a=this._map.style.stylesheet;this.styleOwner=a.owner,this.styleId=a.id}let r=this._map.style.tileManagers;for(let a in r){let i=r[a];if(i.used||i.usedForTerrain){let o=i.getSource();o.attribution&&!e.includes(o.attribution)&&e.push(o.attribution)}}e=e.filter(a=>String(a).trim()),e.sort((a,i)=>a.length-i.length),e=e.filter((a,i)=>{for(let o=i+1;o{let r=this._container.children;if(r.length){let t=r[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){var r;this._map=e,this._compact=(r=this.options)==null?void 0:r.compact,this._container=Fn.create("div","maplibregl-ctrl");let t=Fn.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}},IV=class{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let r=++this._id;return this._queue.push({callback:e,id:r,cancelled:!1}),r}remove(e){let r=this._currentlyRunning,t=r?this._queue.concat(r):this._queue;for(let a of t)if(a.id===e){a.cancelled=!0;return}}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let r=this._currentlyRunning=this._queue;this._queue=[];let t=!1,a;for(let i of r)if(!i.cancelled){try{i.callback(e)}catch(o){t||(t=!0,a=o)}if(this._cleared)break}if(this._cleared=!1,this._currentlyRunning=!1,t)throw a}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}},A7=["none","zoom","sourceTiles","visibleLayers","revision"],RV=class{constructor(e,r,t,a){this._tileKeys=e.map(i=>i.key).sort().join(),this._revision=r,this._zoom=t,this._visibleLayerIds=a}difference(e){return this._revision===e?._revision?this._visibleLayerIds===e._visibleLayerIds?this._tileKeys===e._tileKeys?this._zoom===e._zoom?"none":"zoom":"sourceTiles":"visibleLayers":"revision"}},vm={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0},zV=class{constructor(e,r){this.needsFollowUpFrame=!1,this.painter=e,this.terrain=r,this.rttSize=r.tileManager.tileSize*r.qualityFactor}getTexture(e){return e.getRTT(this._stacks.length-1).texture}prepareForRender(e,r){let t=r!==this._lastPrepareZoom;this._lastPrepareZoom=r,this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter(l=>!e._layers[l].isHidden(r));let a=this._renderableLayerIds.join(),i=new Set;for(let l of this._renderableLayerIds){let n=e._layers[l],u=n.source;u&&vm[n.type]&&i.add(u)}this._coordsAscending={},this._rttFingerprints={};for(let l of i){let n=e.tileManagers[l];if(!n)continue;this._coordsAscending[l]={};let u=this._coordsAscending[l],c=n.getSource(),f=c instanceof dm?c.terrainTileRanges:null;for(let p of n.getVisibleCoordinates()){let g=this.terrain.tileManager.getTerrainCoords(p,f);for(let m in g)u[m]||(u[m]=[]),u[m].push(g[m])}this._rttFingerprints[l]={};let h=this._rttFingerprints[l],d=n.getState().revision;for(let p in u)h[p]=new RV(u[p],d,r,a)}this.needsFollowUpFrame=!1;let o=t||this.painter.options.moving,s=!1;for(let l of this._renderableTiles){let n=this._textureDifference(l);n!=="none"&&(n==="zoom"&&o||n==="visibleLayers"&&t?this.needsFollowUpFrame=!0:n==="zoom"||n==="sourceTiles"?(s?this.needsFollowUpFrame=!0:l.releaseRTT(this.painter),s=!0):l.releaseRTT(this.painter))}}_textureDifference(e){let r="none";for(let t in this._rttFingerprints){let a=this._rttFingerprints[t][e.tileID.key];if(!a)continue;let i=a.difference(e.rttFingerprint[t]);A7.indexOf(i)>A7.indexOf(r)&&(r=i)}return r}renderLayer(e,r){if(e.isHidden(this.painter.transform.zoom))return!1;let t=Ci(ja({},r),{isRenderingToTexture:!0}),a=e.type,i=this.painter,o=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(vm[a]&&((!this._prevType||!vm[this._prevType])&&this._stacks.push([]),this._prevType=a,this._stacks[this._stacks.length-1].push(e.id),!o))return!0;if(vm[this._prevType]||vm[a]&&o){this._prevType=a;let s=this._stacks.length-1,l=this._stacks[s]||[];for(let n of this._renderableTiles){if(this._rttTiles.push(n),n.getRTT(s))continue;let u=n.acquireRTT(i,s,this.rttSize);i.bindRTT(u),i.context.clear({color:Hn.transparent,stencil:0}),i.currentStencilSource=void 0;for(let c of l){let f=i.style._layers[c],h=f.source?this._coordsAscending[f.source][n.tileID.key]:[n.tileID];i.context.viewport.set([0,0,this.rttSize,this.rttSize]),i.renderTileClippingMasks(f,h,!0),i.renderLayer(i,i.style.tileManagers[f.source],f,h,t),f.source&&(n.rttFingerprint[f.source]=this._rttFingerprints[f.source][n.tileID.key])}u.texture.generateMipmap()}return Uge(this.painter,this.terrain,this._rttTiles,t),this._rttTiles=[],vm[a]}return!1}},BV={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},OV=dC,T7={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:x7,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:Uf.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,rotateSpeed:.8,pitchSpeed:-.5,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,terrainSkirtLength:"auto",zoomLevelsToOverscale:4,anisotropicFilterPitch:20},M7=class extends Zl{get _ownerWindow(){var e,r;return((r=(e=this._container)==null?void 0:e.ownerDocument)==null?void 0:r.defaultView)||window}constructor(e){var r,t,a;super(),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new IV,this._controls=[],this._mapId=NI(),this._styleUrl=null,this._missingStyleImageResolver=null,this._lostContextStyle={style:null,images:null},this._contextLost=l=>{if(l.preventDefault(),this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),!this.style){this.fire(new J_("webglcontextlost",{originalEvent:l}));return}for(let n of Object.values(this.style._layers))if(n.type==="custom"&&console.warn(`Custom layer with id '${n.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),n._listeners)for(let[u]of Object.entries(n._listeners))console.warn(`Custom layer with id '${n.id}' had event listeners for event '${u}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new J_("webglcontextlost",{originalEvent:l}))},this._contextRestored=l=>{if(this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style){this.style.imageManager.images=this._lostContextStyle.images;for(let n in this._lostContextStyle.images){let u=this._lostContextStyle.images[n];u.isWebGLImage&&this.style.imageManager.updateImage(n,u,!1)}}this._lostContextStyle={style:null,images:null};try{this._setupPainter()}catch(n){this.fire(new mn(n));return}this.resize(),this._update(),this._resizeInternal(),this.fire(new J_("webglcontextrestored",{originalEvent:l}))},this._onMapScroll=l=>{if(l.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()};let i=Ci(ja(ja({},T7),e),{canvasContextAttributes:ja(ja({},T7.canvasContextAttributes),e.canvasContextAttributes)});if(i.minZoom!=null&&i.maxZoom!=null&&i.minZoom>i.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(i.minPitch!=null&&i.maxPitch!=null&&i.minPitch>i.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(i.minPitch!=null&&i.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(i.maxPitch!=null&&i.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");this._camera=new PV({minZoom:i.minZoom,maxZoom:i.maxZoom,minPitch:i.minPitch,maxPitch:i.maxPitch,bearingSnap:i.bearingSnap,zoomSnap:i.zoomSnap,renderWorldCopies:i.renderWorldCopies,centerClampedToGround:i.centerClampedToGround,terrain:this.terrain,transformConstrain:i.transformConstrain,requestRenderFrame:l=>this._requestRenderFrame(l),cancelRenderFrame:l=>this._cancelRenderFrame(l),transformCameraUpdate:i.transformCameraUpdate,stopHandlers:()=>{var l;return(l=this._handlers)==null?void 0:l.stop(!1)}}),this._camera.setEventedParent(this),this._interactive=i.interactive,this._maxTileCacheSize=i.maxTileCacheSize,this._maxTileCacheZoomLevels=i.maxTileCacheZoomLevels,this._canvasContextAttributes=ja({},i.canvasContextAttributes),this._trackResize=i.trackResize===!0,this._terrainSkirtLength=i.terrainSkirtLength,this._refreshExpiredTiles=i.refreshExpiredTiles===!0,this._fadeDuration=i.fadeDuration,this._crossSourceCollisions=i.crossSourceCollisions===!0,this._collectResourceTiming=i.collectResourceTiming===!0,this._locale=ja(ja({},BV),i.locale),this._clickTolerance=i.clickTolerance,this._overridePixelRatio=i.pixelRatio,this._maxCanvasSize=i.maxCanvasSize,this._zoomLevelsToOverscale=i.zoomLevelsToOverscale,this.cancelPendingTileRequestsWhileZooming=i.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(i.anisotropicFilterPitch),i.reduceMotion!==void 0&&(Hc.prefersReducedMotion=i.reduceMotion),this._requestManager=new vj(i.transformRequest),this._container=this._resolveContainer(i.container),i.maxBounds&&this.setMaxBounds(i.maxBounds),this._setupContainer();try{this._setupPainter()}catch(l){throw this._cleanupContainer(),l}this._imageQueueHandle=Gd.addThrottleControl(()=>this.isMoving()),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),this._handlers=new FV(this,this._camera,i),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver());let o=typeof i.hash=="string"&&i.hash||void 0;this._hash=i.hash?new o7(o).addTo(this):void 0,(r=this._hash)!=null&&r._onHashChange()||(this.jumpTo({center:i.center,elevation:i.elevation,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,roll:i.roll}),i.bounds&&(this.resize(),this.fitBounds(i.bounds,tn({},i.fitBoundsOptions,{duration:0}))));let s=typeof i.style=="string"||((a=(t=i.style)==null?void 0:t.projection)==null?void 0:a.type)!=="globe";this.resize(null,s),this._localIdeographFontFamily=i.localIdeographFontFamily,this._validateStyle=i.validateStyle,i.style&&this.setStyle(i.style,{localIdeographFontFamily:i.localIdeographFontFamily}),i.attributionControl&&this.addControl(new b7(typeof i.attributionControl=="boolean"?void 0:i.attributionControl)),i.maplibreLogo&&this.addControl(new w7,i.logoPosition),this.on("style.load",()=>{if(s||this._resizeTransform(),this._camera.transform.unmodified){let l=Gy(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(l)}}),this.on("data",l=>{this._update(l.dataType==="style"),this.fire(l.dataType==="style"?new _h("styledata",l):new Fs("sourcedata",l))}),this.on("dataloading",l=>{this.fire(l.dataType==="style"?new _h("styledataloading",l):new Fs("sourcedataloading",l))}),this.on("dataabort",l=>{this.fire(new Fs("sourcedataabort",l))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,r){return this.style.setGlobalStateProperty(e,r),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,r){if(r===void 0&&(r=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e?.onAdd)return this.fire(new mn(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let t=e.onAdd(this);this._controls.push(e);let a=this._controlPositions[r];return r.includes("bottom")?a.insertBefore(t,a.firstChild):a.appendChild(t),this}removeControl(e){if(!e?.onRemove)return this.fire(new mn(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this}hasControl(e){return this._controls.includes(e)}coveringTiles(e){return W1(this._camera.transform,e)}setTransformCameraUpdate(e){this._camera.transformCameraUpdate=e}getCenter(){return new ln(this._camera.transform.center.lng,this._camera.transform.center.lat)}setCenter(e,r){return this._camera.setCenter(e,r),this}getCenterElevation(){return this._camera.transform.elevation}setCenterElevation(e,r){return this._camera.setCenterElevation(e,r),this}setCenterClampedToGround(e){this._camera.setCenterClampedToGround(e)}panBy(e,r,t){return this._camera.panBy(e,r,t),this}panTo(e,r,t){return this._camera.panTo(e,r,t),this}getZoom(){return this._camera.transform.zoom}setZoom(e,r){return this._camera.setZoom(e,r),this}zoomTo(e,r,t){return this._camera.zoomTo(e,r,t),this}zoomIn(e,r){return this._camera.zoomIn(e,r),this}zoomOut(e,r){return this._camera.zoomOut(e,r),this}getVerticalFieldOfView(){return this._camera.transform.fov}setVerticalFieldOfView(e,r){return this._camera.setVerticalFieldOfView(e,r),this}getBearing(){return this._camera.transform.bearing}setBearing(e,r){return this._camera.setBearing(e,r),this}getZoomSnap(){return this._camera.getZoomSnap()}setZoomSnap(e){return this._camera.setZoomSnap(e),this}getPadding(){return this._camera.transform.padding}setPadding(e,r){return this._camera.setPadding(e,r),this}rotateTo(e,r,t){return this._camera.rotateTo(e,r,t),this}resetNorth(e,r){return this._camera.resetNorth(e,r),this}resetNorthPitch(e,r){return this._camera.resetNorthPitch(e,r),this}snapToNorth(e,r){return this._camera.snapToNorth(e,r),this}getPitch(){return this._camera.transform.pitch}setPitch(e,r){return this._camera.setPitch(e,r),this}getRoll(){return this._camera.transform.roll}setRoll(e,r){return this._camera.setRoll(e,r),this}cameraForBounds(e,r){return this._camera.cameraForBounds(e,r)}fitBounds(e,r,t){return this._camera.fitBounds(e,r,t),this}fitScreenCoordinates(e,r,t,a,i){return this._camera.fitScreenCoordinates(e,r,t,a,i),this}jumpTo(e,r){return this._camera.jumpTo(e,r),this}calculateCameraOptionsFromCameraLngLatAltRotation(e,r,t,a,i){return this._camera.calculateCameraOptionsFromCameraLngLatAltRotation(e,r,t,a,i)}easeTo(e,r){return this._camera.easeTo(e,r),this}flyTo(e,r){return this._camera.flyTo(e,r),this}stop(){return this._camera.stop(),this}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLat(ln.convert(e),this._camera.transform):null}getCenterClampedToGround(){return this._camera.getCenterClampedToGround()}calculateCameraOptionsFromTo(e,r,t,a){return a==null&&this.terrain&&(a=this.terrain.getElevationForLngLat(t,this._camera.transform)),this._camera.transform.calculateCameraOptionsFromTo(e,r,t,a??0)}resize(e,r=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(r);let t=!this._camera._moving;return t&&(this.stop(),this.fire(new hn("movestart",e)).fire(new hn("move",e))),this.fire(new vu("resize",e)),t&&this.fire(new hn("moveend",e)),this}_resizeInternal(e=!0){let[r,t]=this._containerDimensions(),a=this._getClampedPixelRatio(r,t);if(this._resizeCanvas(r,t,a),this.painter.resize(r,t,a),this.painter.overLimit()){let i=this.painter.context.gl;this._maxCanvasSize=[i.drawingBufferWidth,i.drawingBufferHeight];let o=this._getClampedPixelRatio(r,t);this._resizeCanvas(r,t,o),this.painter.resize(r,t,o)}this._resizeTransform(e)}_resizeTransform(e=!0){var r;let[t,a]=this._containerDimensions();this._camera.transform.resize(t,a,e),(r=this._camera._requestedCameraState)==null||r.resize(t,a,e)}_getClampedPixelRatio(e,r){let{0:t,1:a}=this._maxCanvasSize,i=this.getPixelRatio(),o=e*i,s=r*i,l=o>t?t/o:1,n=s>a?a/s:1,u=Math.min(l,n);return u<1&&vo("The canvas is larger than maxCanvasSize and is rendered at a lower pixel ratio to fit. Increase maxCanvasSize, within MAX_TEXTURE_SIZE, to render at full resolution."),u*i}getPixelRatio(){var e;return(e=this._overridePixelRatio)!=null?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this._camera.transform.getBounds()}getMaxBounds(){return this._camera.transform.getMaxBounds()}setMaxBounds(e){return this._camera.transform.setMaxBounds(Qh.convert(e)),this._update()}setMinZoom(e){if(e??(e=-2),e>=-2&&e<=this._camera.transform.maxZoom){let r=this._camera.transform.zoom,t=this._camera.getTransformForUpdate();return t.setMinZoom(e),this._camera.applyUpdatedTransform(t),this._update(),r!==this._camera.transform.zoom&&this.fire(new hn("zoomstart")).fire(new hn("zoom")).fire(new hn("zoomend")).fire(new hn("movestart")).fire(new hn("move")).fire(new hn("moveend")),this}throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(e=!1){let r=this._camera.transform;return e?r.applyConstrain(r.center,r.minZoom).zoom:r.minZoom}setMaxZoom(e){if(e??(e=22),e>=this._camera.transform.minZoom){let r=this._camera.transform.zoom,t=this._camera.getTransformForUpdate();return t.setMaxZoom(e),this._camera.applyUpdatedTransform(t),this._update(),r!==this._camera.transform.zoom&&this.fire(new hn("zoomstart")).fire(new hn("zoom")).fire(new hn("zoomend")).fire(new hn("movestart")).fire(new hn("move")).fire(new hn("moveend")),this}throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this._camera.transform.maxZoom}setMinPitch(e){if(e??(e=0),e<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this._camera.transform.maxPitch){let r=this._camera.transform.pitch,t=this._camera.getTransformForUpdate();return t.setMinPitch(e),this._camera.applyUpdatedTransform(t),this._update(),r!==this._camera.transform.pitch&&this.fire(new hn("pitchstart")).fire(new hn("pitch")).fire(new hn("pitchend")).fire(new hn("movestart")).fire(new hn("move")).fire(new hn("moveend")),this}throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this._camera.transform.minPitch}setMaxPitch(e){if(e??(e=60),e>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this._camera.transform.minPitch){let r=this._camera.transform.pitch,t=this._camera.getTransformForUpdate();return t.setMaxPitch(e),this._camera.applyUpdatedTransform(t),this._update(),r!==this._camera.transform.pitch&&this.fire(new hn("pitchstart")).fire(new hn("pitch")).fire(new hn("pitchend")).fire(new hn("movestart")).fire(new hn("move")).fire(new hn("moveend")),this}throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this._camera.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(e){if(e??(e=20),e>180)throw Error("anisotropicFilterPitch must be less than or equal to 180");if(e<0)throw Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=e,this._update()}getRenderWorldCopies(){return this._camera.transform.renderWorldCopies}setRenderWorldCopies(e){return this._camera.transform.setRenderWorldCopies(e),this._update()}setTransformConstrain(e){return this._camera.transform.setConstrainOverride(e),this._update()}project(e){return this._camera.transform.locationToScreenPoint(ln.convert(e),this.style&&this.terrain)}unproject(e){return this._camera.transform.screenPointToLocation(zr.convert(e),this.terrain)}isMoving(){var e;return this._camera.isMoving()||((e=this._handlers)==null?void 0:e.isMoving())||!1}isZooming(){var e;return this._camera.isZooming()||((e=this._handlers)==null?void 0:e.isZooming())||!1}isRotating(){var e;return this._camera.isRotating()||((e=this._handlers)==null?void 0:e.isRotating())||!1}_createDelegatedListener(e,r,t){if(e==="mouseenter"||e==="mouseover"){let a=!1;return{layers:r,listener:t,delegates:{mousemove:i=>{let o=r.filter(l=>this.getLayer(l)),s=o.length===0?[]:this.queryRenderedFeatures(i.point,{layers:o});s.length?a||(a=!0,t.call(this,new Vf(e,this,i.originalEvent,{features:s}))):a=!1},mouseout:()=>{a=!1}}}}if(e==="mouseleave"||e==="mouseout"){let a=!1;return{layers:r,listener:t,delegates:{mousemove:i=>{let o=r.filter(s=>this.getLayer(s));(o.length===0?[]:this.queryRenderedFeatures(i.point,{layers:o})).length?a=!0:a&&(a=!1,t.call(this,new Vf(e,this,i.originalEvent)))},mouseout:i=>{a&&(a=!1,t.call(this,new Vf(e,this,i.originalEvent)))}}}}{let a=i=>{let o=r.filter(l=>this.getLayer(l)),s=o.length===0?[]:this.queryRenderedFeatures(i.point,{layers:o});s.length&&(i.features=s,t.call(this,i),delete i.features)};return{layers:r,listener:t,delegates:{[e]:a}}}}_saveDelegatedListener(e,r){var t;this._delegatedListeners||(this._delegatedListeners={}),(t=this._delegatedListeners)[e]||(t[e]=[]),this._delegatedListeners[e].push(r)}_removeDelegatedListener(e,r,t){var a;if(!((a=this._delegatedListeners)!=null&&a[e]))return;let i=this._delegatedListeners[e];for(let o=0;or.includes(l))){for(let l in s.delegates)this.off(l,s.delegates[l]);i.splice(o,1);return}}}on(e,r,t){if(t===void 0)return super.on(e,r);let a=typeof r=="string"?[r]:r,i=this._createDelegatedListener(e,a,t);this._saveDelegatedListener(e,i);for(let o in i.delegates)this.on(o,i.delegates[o]);return{unsubscribe:()=>{this._removeDelegatedListener(e,a,t)}}}once(e,r,t){if(t===void 0)return super.once(e,r);let a=typeof r=="string"?[r]:r,i=this._createDelegatedListener(e,a,t);for(let o in i.delegates){let s=i.delegates[o];i.delegates[o]=(...l)=>{this._removeDelegatedListener(e,a,t),s(...l)}}this._saveDelegatedListener(e,i);for(let o in i.delegates)this.once(o,i.delegates[o]);return this}off(e,r,t){if(t===void 0)return super.off(e,r);let a=typeof r=="string"?[r]:r;return this._removeDelegatedListener(e,a,t),this}queryRenderedFeatures(e,r){if(!this.style)return[];let t,a=e instanceof zr||Array.isArray(e),i=a?e:[[0,0],[this._camera.transform.width,this._camera.transform.height]];if(r||(r=(a?{}:e)||{}),i instanceof zr||typeof i[0]=="number")t=[zr.convert(i)];else{let o=zr.convert(i[0]),s=zr.convert(i[1]);t=[o,new zr(s.x,o.y),s,new zr(o.x,s.y),o]}return this.style.queryRenderedFeatures(t,r,this._camera.transform)}querySourceFeatures(e,r){return this.style.querySourceFeatures(e,r)}setStyle(e,r){return r=tn({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},r),this._styleUrl=typeof e=="string"?e:null,r.diff!==!1&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let r=this._locale[e];if(r==null)throw Error(`Missing UI string '${e}'`);return r}_updateStyle(e,r){var t,a,i;if((t=this._diffStyleRequest)==null||t.abort(),this._diffStyleRequest=null,r.transformStyle&&this.style&&!this.style._loaded){this.style.once("style.load",()=>this._updateStyle(e,r));return}let o=this.style&&r.transformStyle?this.style.serialize():void 0;if(this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e)this.style=new J3(this,r||{});else return this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),(i=(a=this.style)==null?void 0:a.projection)==null||i.destroy(),delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof e=="string"?this.style.loadURL(e,r,o):this.style.loadJSON(e,r,o),this}_lazyInitEmptyStyle(){this.style||(this.style=new J3(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,r){return yi(this,null,function*(){var t;if((t=this._diffStyleRequest)==null||t.abort(),typeof e=="string"){let a=e;this._diffStyleRequest=new AbortController;let i=this._diffStyleRequest;try{let o=yield this._requestManager.transformRequest(a,"Style");if(i.signal.aborted){this._diffStyleRequest=null;return}let s=yield x_(o,i);this._diffStyleRequest=null,this._updateDiff(s.data,r)}catch(o){this._diffStyleRequest=null,S0(o)||this.fire(new mn(Ac(o)))}}else typeof e=="object"&&(this._diffStyleRequest=null,this._updateDiff(e,r))})}_updateDiff(e,r){try{this.style.setState(e,r)&&this._update(!0)}catch(t){vo(`Unable to perform style diff: ${Ac(t).message}. Rebuilding the style from scratch.`),this._updateStyle(e,r)}}getStyle(){if(this.style)return this.style.serialize()}getStyleUrl(){return this._styleUrl}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(!this.style){vo("There is no style added to the map.");return}return this.style.loaded()}addSource(e,r){return this._lazyInitEmptyStyle(),this.style.addSource(e,r),this._update(!0)}isSourceLoaded(e){var r;let t=(r=this.style)==null?void 0:r.tileManagers[e];if(t===void 0){this.fire(new mn(Error(`There is no tile manager with ID '${e}'`)));return}return t.loaded()}setTerrain(e,r={}){if(this.style._checkLoaded(),e&&i_(this,Af.terrain,{value:e},r))return this;if(this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),!e)this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture=null,this._camera.terrain=null,this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGround()&&this._camera.transform.setElevation(0);else{let t=this.style.tileManagers[e.source];if(!t)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);this.terrain===null&&t.reload();for(let a in this.style._layers){let i=this.style._layers[a];i.type==="hillshade"&&i.source===e.source&&vo("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),i.type==="color-relief"&&i.source===e.source&&vo("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain&&this.terrain.destroy(),this.terrain=new vU(this.painter,t,e,this._terrainSkirtLength),this.painter.renderToTexture=new zV(this.painter,this.terrain),this._camera.terrain=this.terrain,this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform)),this._terrainDataCallback=a=>this._handleTerrainDataEvent(a,e.source),this.style.on("data",this._terrainDataCallback)}return this.style.triggerSymbolPlacement(),this.fire(new mC({terrain:e})),this}_handleTerrainDataEvent(e,r){var t;if(e.dataType==="style"){this.terrain.tileManager.releaseAllRTT();return}let a=e.sourceId===r;if(a&&(this.terrain.resetElevationCache(),this.style.triggerSymbolPlacement()),a&&e.tile&&!this._camera.elevationFreeze&&(this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))),e.tile){if(((t=e.source)==null?void 0:t.type)==="image"){this.terrain.tileManager.releaseAllRTT();return}this.terrain.tileManager.releaseRTT(e.tile.tileID)}}getTerrain(){var e,r;return(r=(e=this.terrain)==null?void 0:e.options)!=null?r:null}areTilesLoaded(){var e;let r=(e=this.style)==null?void 0:e.tileManagers;for(let t of Object.values(r))if(!t.areTilesLoaded())return!1;return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){var r;return(r=this.style)==null?void 0:r.getSource(e)}setSourceTileLodParams(e,r,t){if(t){let a=this.getSource(t);if(!a)throw Error(`There is no source with ID "${t}", cannot set LOD parameters`);a.calculateTileZoom=Vk(Math.max(1,e),Math.max(1,r))}else for(let a in this.style.tileManagers)this.style.tileManagers[a].getSource().calculateTileZoom=Vk(Math.max(1,e),Math.max(1,r));return this._update(!0),this}refreshTiles(e,r){let t=this.style.tileManagers[e];if(!t)throw Error(`There is no tile manager with ID "${e}", cannot refresh tile`);r===void 0?t.reload(!0):t.refreshTiles(r.map(a=>new j_(a.z,a.x,a.y)))}addImage(e,r,t={}){var a;this._lazyInitEmptyStyle();let i=this._createStyleImage(r,t);return i?(this.style.addImage(e,i),(a=i.userImage)!=null&&a.onAdd&&i.userImage.onAdd(this,e),this):this}setMissingStyleImageResolver(e){var r;return this._missingStyleImageResolver=e,(r=this.style)==null||r.setMissingImageResolver(e),this}_createStyleImage(e,r={}){let{pixelRatio:t=1,sdf:a=!1,stretchX:i,stretchY:o,content:s,textFitWidth:l,textFitHeight:n}=r;if(e instanceof HTMLImageElement||Gv(e)){let{width:u,height:c,data:f}=Hc.getImageData(e);return{data:new Ls({width:u,height:c},f),pixelRatio:t,stretchX:i,stretchY:o,content:s,textFitWidth:l,textFitHeight:n,sdf:a,version:0}}if(e.width===void 0||e.height===void 0)return this.fire(new mn(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`"))),null;{let{width:u,height:c,data:f}=e,h=e,d=D2(h.data);return{data:d?new Ls({width:u,height:c}):new Ls({width:u,height:c},new Uint8Array(f)),pixelRatio:t,stretchX:i,stretchY:o,content:s,textFitWidth:l,textFitHeight:n,sdf:a,version:0,isWebGLImage:d,userImage:h}}}updateImage(e,r){let t=this.style.getImage(e);if(!t)return this.fire(new mn(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:a,height:i,data:o}=r instanceof HTMLImageElement||Gv(r)?Hc.getImageData(r):r;if(a===void 0||i===void 0)return this.fire(new mn(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(a!==t.data.width||i!==t.data.height)return this.fire(new mn(Error("The width and height of the updated image must be that same as the previous version of the image")));if(t.isWebGLImage=D2(o),t.isWebGLImage)t.userImage=r;else{let s=!(r instanceof HTMLImageElement||Gv(r));t.data.replace(o,s)}return this.style.updateImage(e,t),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new mn(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return yi(this,null,function*(){let r=yield Gd.getImage(yield this._requestManager.transformRequest(e,"Image"),new AbortController);if(!r.data)throw Error(`Could not load image ${e}: the response is empty`);return r})}listImages(){var e,r;return(r=(e=this.style)==null?void 0:e.listImages())!=null?r:[]}addLayer(e,r){return this._lazyInitEmptyStyle(),this.style.addLayer(e,r),this._update(!0)}moveLayer(e,r){return this.style.moveLayer(e,r),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){var r;return(r=this.style)==null?void 0:r.getLayer(e)}getLayersOrder(){var e,r;return(r=(e=this.style)==null?void 0:e.getLayersOrder())!=null?r:[]}setLayerZoomRange(e,r,t){return this.style.setLayerZoomRange(e,r,t),this._update(!0)}setFilter(e,r,t={}){var a;return(a=this.style)==null||a.setFilter(e,r,t),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,r,t,a={}){var i;return(i=this.style)==null||i.setPaintProperty(e,r,t,a),this._update(!0)}getPaintProperty(e,r){return this.style.getPaintProperty(e,r)}setLayoutProperty(e,r,t,a={}){return this.style.setLayoutProperty(e,r,t,a),this._update(!0)}getLayoutProperty(e,r){return this.style.getLayoutProperty(e,r)}setGlyphs(e,r={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,r),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}setFontFaces(e){return this._lazyInitEmptyStyle(),this.style.setFontFaces(e),this._update(!0)}getFontFaces(){return this.style.getFontFaces()}addSprite(e,r,t={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,r,t,a=>{a||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,r={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,r,t=>{t||this._update(!0)}),this}setLight(e,r={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,r),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,r={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,r),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,r){return this.style.setFeatureState(e,r),this._update()}removeFeatureState(e,r){return this.style.removeFeatureState(e,r),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,r=0;return this._container&&(e=this._container.clientWidth||400,r=this._container.clientHeight||300),[e,r]}_shouldHandleInitialResize(){var e;if(!((e=this._container)!=null&&e.clientWidth)||!this._container.clientHeight)return!1;let[r,t]=this._containerDimensions();return r!==this._camera.transform.width||t!==this._camera.transform.height}_setupResizeObserver(){var e;let r=!1,t=sj(i=>{this._trackResize&&!this._removed&&(this.resize(i),this.redraw())},50),a=(e=this._ownerWindow.ResizeObserver)!=null?e:ResizeObserver;this._resizeObserver=new a(i=>{!r&&(r=!0,!this._shouldHandleInitialResize())||t(i)}),this._resizeObserver.observe(this._container)}_resolveContainer(e){if(typeof e=="string"){let r=document.getElementById(e);if(!r)throw Error(`Container '${e}' not found.`);return r}if(e instanceof HTMLElement||e&&typeof e=="object"&&e.nodeType===1)return e;throw Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let r=this._canvasContainer=Fn.create("div","maplibregl-canvas-container",e);this._interactive&&r.classList.add("maplibregl-interactive"),this._canvas=Fn.create("canvas","maplibregl-canvas",r),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 t=this._containerDimensions(),a=this._getClampedPixelRatio(t[0],t[1]);this._resizeCanvas(t[0],t[1],a);let i=this._controlContainer=Fn.create("div","maplibregl-control-container",e),o=this._controlPositions={};for(let s of["top-left","top-right","bottom-left","bottom-right"])o[s]=Fn.create("div",`maplibregl-ctrl-${s} `,i);this._container.addEventListener("scroll",this._onMapScroll,!1)}_cleanupContainer(){this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map")}_resizeCanvas(e,r,t){this._canvas.width=Math.floor(t*e),this._canvas.height=Math.floor(t*r),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${r}px`}_setupPainter(){let e=Ci(ja({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),r=null;this._canvas.addEventListener("webglcontextcreationerror",a=>{r=a},{once:!0});let t=this._canvas.getContext("webgl2",e);if(!t)throw new n7(e,r);this.painter=new hV(t,this._camera.transform)}migrateProjection(e,r){this._camera.migrateProjection(e,r),this.painter.transform=e,this.fire(new gC({newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){var r;return(r=this.style)!=null&&r._loaded?(this._styleDirty||(this._styleDirty=e),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){var r,t,a,i,o;let s=this._idleTriggered?this._fadeDuration:0,l=((r=this.style.projection)==null?void 0:r.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let n=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let f=this._camera.transform.zoom,h=is();this.style.zoomHistory.update(f,h);let d=new Ko(f,{now:h,fadeDuration:s,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),p=d.crossFadingFactor();(p!==1||p!==this._crossFadingFactor)&&(n=!0,this._crossFadingFactor=p),this.style.update(d)}let u=((t=this.style.projection)==null?void 0:t.transitionState)>0!==l;this._camera.transform.setTransitionState((a=this.style.projection)==null?void 0:a.transitionState),this.style&&(this._sourcesDirty||u)&&(this._sourcesDirty=!1,this.style._updateSources(this._camera.transform)),this.terrain?(this.terrain.tileManager.update(this._camera.transform,this.terrain)&&this.terrain.resetElevationCache(),this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),!this._camera.elevationFreeze&&this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))):(this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGround()&&this._camera.transform.setElevation(0)),this._placementDirty=(i=this.style)==null?void 0:i._updatePlacement(this._camera.transform,this.showCollisionBoxes,s,this._crossSourceCollisions,u),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:s,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new vu("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new vu("load"))),this.style&&(this.style.hasTransitions()||n)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let c=this._sourcesDirty||this._styleDirty||this._placementDirty||((o=this.painter.renderToTexture)==null?void 0:o.needsFollowUpFrame);return c||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new vu("idle")),this._loaded&&!this._fullyLoaded&&!c&&(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._render(0)),this}remove(){var e,r;this._hash&&this._hash.remove();for(let a of this._controls)a.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._renderTaskQueue.clear(),(e=this._diffStyleRequest)==null||e.abort(),this.painter.destroy(),this._handlers.destroy(),this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),Gd.removeThrottleControl(this._imageQueueHandle),(r=this._resizeObserver)==null||r.disconnect();let t=this.painter.context.gl.getExtension("WEBGL_lose_context");t?.loseContext&&t.loseContext(),this._cleanupContainer(),this._removed=!0,this.fire(new vu("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,Hc.frame(this._frameRequest,e=>{this._frameRequest=null;try{this._render(e)}catch(r){if(!S0(r))throw r}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return OV}getCameraTargetElevation(){return this._camera.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(e){return this._lazyInitEmptyStyle(),this.style.setProjection(e),this._update(!0)}},NV={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0},jV=class{constructor(e){this._updateZoomButtons=()=>{let r=this._map.getZoom(),t=r===this._map.getMaxZoom(),a=r===this._map.getMinZoom(!0);this._zoomInButton.disabled=t,this._zoomOutButton.disabled=a,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",a.toString())},this._rotateCompassArrow=()=>{let r=this._map.getPitch(),t=this._map.getRoll(),a=this._map.getBearing(),i=1/Math.cos(il(r))**.5;if(this.options.visualizePitch&&this.options.visualizeRoll){this._compassIcon.style.transform=`scale(${i}) rotateZ(${-t}deg) rotateX(${r}deg) rotateZ(${-a}deg)`;return}if(this.options.visualizePitch){this._compassIcon.style.transform=`scale(${i}) rotateX(${r}deg) rotateZ(${-a}deg)`;return}if(this.options.visualizeRoll){this._compassIcon.style.transform=`rotate(${-a-t}deg)`;return}this._compassIcon.style.transform=`rotate(${-a}deg)`},this._setButtonTitle=(r,t)=>{let a=this._map._getUIString(`NavigationControl.${t}`);r.title=a,r.setAttribute("aria-label",a)},this.options=tn({},NV,e),this._container=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",r=>r.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",r=>this._map.zoomIn({},{originalEvent:r})),Fn.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",r=>this._map.zoomOut({},{originalEvent:r})),Fn.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",r=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:r}):this._map.resetNorth({},{originalEvent:r})}),this._compassIcon=Fn.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("move",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new UV(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("move",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,r){let t=Fn.create("button",e,this._container);return t.type="button",t.addEventListener("click",r),t}},UV=class{constructor(e,r,t=!1){this.mousedown=i=>{this.startMove(i,Fn.mousePos(this.element,i)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=i=>{this.move(i,Fn.mousePos(this.element,i))},this.mouseup=i=>{this._rotatePitchHandler.dragEnd(i),this.offTemp()},this.touchstart=i=>{i.targetTouches.length===1?(this._startPos=this._lastPos=Fn.touchPos(this.element,i.targetTouches)[0],this.startMove(i,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend)):this.reset()},this.touchmove=i=>{i.targetTouches.length===1?(this._lastPos=Fn.touchPos(this.element,i.targetTouches)[0],this.move(i,this._lastPos)):this.reset()},this.touchend=i=>{i.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=r;let a=new MV;this._rotatePitchHandler=new rg({clickTolerance:3,move:(i,o)=>{let s=r.getBoundingClientRect(),l=new zr((s.bottom-s.top)/2,(s.right-s.left)/2);return{bearingDelta:qI(new zr(i.x,o.y),o,l),pitchDelta:t?(o.y-i.y)*-.5:void 0}},moveStateManager:a,enable:!0,assignEvents:()=>{}}),this.map=e,r.addEventListener("mousedown",this.mousedown),r.addEventListener("touchstart",this.touchstart,{passive:!1}),r.addEventListener("touchcancel",this.reset)}startMove(e,r){this._rotatePitchHandler.dragStart(e,r),Fn.disableDrag()}move(e,r){let t=this.map,{bearingDelta:a,pitchDelta:i}=this._rotatePitchHandler.dragMove(e,r)||{};a&&t.setBearing(t.getBearing()+a),i&&t.setPitch(t.getPitch()+i)}off(){let e=this.element;e.removeEventListener("mousedown",this.mousedown),e.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){Fn.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}},u4={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%)"},E7={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]},S7="#3FB1CE",H0=class extends qf{},C7=class extends qf{},c4=class extends Zl{constructor(e){if(super(),this._onClick=r=>{this.fire(new C7("click",{originalEvent:r}))},this._onKeyPress=r=>{(r.code==="Space"||r.code==="Enter")&&this.togglePopup()},this._onKeyDown=r=>{if(!this._defaultMarker||!this._draggable||!this._map||!this._lngLat||r.composedPath()[0]!==this._element||r.altKey||r.ctrlKey||r.metaKey)return;let t=E7[r.key];if(!t)return;r.preventDefault(),r.stopPropagation();let a=r.shiftKey?10:1,i=this._map.project(this._lngLat);this.setLngLat(this._map.unproject(new zr(i.x+t[0]*a,i.y+t[1]*a))),this._keyboardDragActive||(this._keyboardDragActive=!0,this.fire(new H0("dragstart"))),this.fire(new H0("drag"))},this._onKeyUp=r=>{E7[r.key]&&this._endKeyboardDrag()},this._onBlur=()=>{this._endKeyboardDrag()},this._onMapClick=r=>{let t=r.originalEvent.target,a=this._element;this._popup&&(t===a||a.contains(t))&&this.togglePopup()},this._update=r=>{if(!this._map)return;let t=this._map.loaded()&&!this._map.isMoving();(r?.type==="terrain"||r?.type==="render"&&!t)&&this._map.once("render",this._update),this._lngLat=cj(this._lngLat,this._flatPos,this._map._camera.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map._camera.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let a="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?a=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(a=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?i="rotateX(0deg)":this._pitchAlignment==="map"&&(i=`rotateX(${this._map.getPitch()}deg)`),!this._subpixelPositioning&&(!r||r.type==="moveend")&&(this._pos=this._pos.round()),this._element.style.transform=`${u4[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${a}`,Hc.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(r?.type==="moveend")}).catch(()=>{})},this._onMove=r=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=r.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=r.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 H0("dragstart"))),this.fire(new H0("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 H0("dragend")),this._state="inactive"},this._addDragHandler=r=>{this._element.contains(r.originalEvent.target)&&(r.preventDefault(),this._positionDelta=r.point.sub(this._pos).add(this._offset),this._pointerdownPos=r.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=e?.anchor||"center",this._color=e?.color||S7,this._scale=e?.scale||1,this._draggable=e?.draggable||!1,this._clickTolerance=e?.clickTolerance||0,this._subpixelPositioning=e?.subpixelPositioning||!1,this._isDragging=!1,this._roleManaged=!1,this._tabIndexManaged=!1,this._keyboardDragActive=!1,this._state="inactive",this._rotation=e?.rotation||0,this._rotationAlignment=e?.rotationAlignment||"auto",this._pitchAlignment=e?.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e?.opacity,e?.opacityWhenCovered),e?.element)this._element=e.element,this._offset=zr.convert(e?.offset||[0,0]);else{this._defaultMarker=!0,this._element=Fn.create("div");let r=eye().cloneNode(!0);r.setAttributeNS(null,"height",`${41*this._scale}px`),r.setAttributeNS(null,"width",`${27*this._scale}px`),tye(r).setAttributeNS(null,"fill",this._color),this._element.appendChild(r),this._offset=zr.convert(e?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",r=>{r.preventDefault()}),this._element.addEventListener("mousedown",r=>{r.preventDefault()}),fj(this._element,this._anchor,"marker"),e?.className)for(let r of e.className.split(" "))this._element.classList.add(r);this._popup=null}addTo(e){return this.remove(),this._map=e,this._defaultMarker&&!this._element.hasAttribute("aria-label")&&this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._updateAccessibilityRole(),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),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("projectiontransition",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),this._element.removeEventListener("click",this._onClick),this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._element.removeEventListener("keypress",this._onKeyPress),this._keyboardDragActive=!1,this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=ln.convert(e),this._pos=null,this._update(),this._popup&&this._popup.setLngLat(this._lngLat),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress)),e){if(!("offset"in e.options)){let r=13.5/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[r,(24.6+r)*-1],"bottom-right":[-r,(24.6+r)*-1],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._element.addEventListener("keypress",this._onKeyPress)}return this._updateTabIndex(),this._updateAccessibilityRole(),this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}_endKeyboardDrag(){this._keyboardDragActive&&(this._keyboardDragActive=!1,this.fire(new H0("dragend")))}getPopup(){return this._popup}togglePopup(){let e=this._popup;if(this._element.style.opacity===this._opacityWhenCovered)return this;if(e)e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map));else return this;return this}_updateOpacity(e=!1){var r,t;let a=(r=this._map)==null?void 0:r.terrain,i=this._map._camera.transform.isLocationOccluded(this._lngLat);if(!a||i){let p=i?this._opacityWhenCovered:this._opacity;this._element.style.opacity!==p&&(this._element.style.opacity=p,this._element.classList.toggle("maplibregl-marker-covered",i));return}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let o=this._map,s=o.terrain.depthAtPoint(this._pos),l=o.terrain.getElevationForLngLat(this._lngLat,o._camera.transform),n=o._camera.transform.lngLatToCameraDepth(this._lngLat,l),u=.006;if(n-su;(t=this._popup)!=null&&t.isOpen()&&d&&this._popup.remove(),this._element.style.opacity=d?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",d)}getOffset(){return this._offset}setOffset(e){return this._offset=zr.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._element.classList.toggle("maplibregl-marker-draggable",this._draggable),this._map&&(e?(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._defaultMarker&&(this._draggable?(this._element.addEventListener("keydown",this._onKeyDown),this._element.addEventListener("keyup",this._onKeyUp),this._element.addEventListener("blur",this._onBlur)):(this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._endKeyboardDrag())),this._updateTabIndex(),this._updateAccessibilityRole(),this}isDraggable(){return this._draggable}_updateTabIndex(){this._popup||this._defaultMarker&&this._draggable?this._element.hasAttribute("tabindex")||(this._element.setAttribute("tabindex","0"),this._tabIndexManaged=!0):this._tabIndexManaged&&(this._tabIndexManaged=(this._element.getAttribute("tabindex")==="0"&&this._element.removeAttribute("tabindex"),!1))}_updateAccessibilityRole(){if(!this._defaultMarker||this._element.hasAttribute("role")&&!this._roleManaged)return;let e=this._draggable||this._popup?"button":"img";this._element.setAttribute("role",e),this._roleManaged=!0}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,r){return(this._opacity===void 0||e===void 0&&r===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=String(e)),r!==void 0&&(this._opacityWhenCovered=String(r)),this._map&&this._updateOpacity(!0),this}},qV={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},cx=0,ig=!1,W0=class extends qf{},f4=class extends qf{},D7=class extends qf{},VV=class extends Zl{constructor(e){super(),this._onSuccess=r=>{if(this._map){if(this._isOutOfMapMaxBounds(r)){this._setErrorState(),this.fire(new f4("outofmaxbounds",r)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=r,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 Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(r),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(r),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new f4("geolocate",r)),this._finish()}},this._updateCamera=r=>{let t=new ln(r.coords.longitude,r.coords.latitude),a=r.coords.accuracy,i=this._map.getBearing(),o=tn({bearing:i},this.options.fitBoundsOptions),s=Qh.fromLngLat(t,a);this._map.fitBounds(s,o,{geolocateSource:!0})},this._updateMarker=r=>{if(r){let t=new ln(r.coords.longitude,r.coords.latitude);this._accuracyCircleMarker.setLngLat(t).addTo(this._map),this._userLocationDotMarker.setLngLat(t).addTo(this._map),this._accuracy=r.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=r=>{if(this._map){if(r.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 t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(r.code===3&&ig)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new D7("error",r)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=r=>{if(!this._map)return;let t=r?.[0]instanceof ResizeObserverEntry;!r.geolocateSource&&this._watchState==="ACTIVE_LOCK"&&!t&&!this._map.isZooming()&&(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new W0("trackuserlocationend")),this.fire(new W0("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",r=>{r.preventDefault()}),this._geolocateButton=Fn.create("button","maplibregl-ctrl-geolocate",this._container),Fn.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=r=>{if(this._map){if(r===!1){vo("Geolocation support is not available so the GeolocateControl will be disabled.");let t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}else{let t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Fn.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new c4({element:this._dotElement}),this._circleElement=Fn.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new c4({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=tn({},qV,e)}onAdd(e){return this._map=e,this._container=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),Qge().then(r=>this._finishSetupUI(r)),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(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,cx=0,ig=!1}_isOutOfMapMaxBounds(e){let r=this._map.getMaxBounds(),t=e.coords;return r&&(t.longituder.getEast()||t.latituder.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":case"BACKGROUND_ERROR":break;case"OFF":case void 0:break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let e=this._userLocationDotMarker.getLngLat();if(!this.options.showUserLocation||!this.options.showAccuracyCircle||!this._accuracy||!e)return;let r=this._map.project(e),t=this._map.unproject([r.x+100,r.y]),a=e.distanceTo(t)/100,i=2*this._accuracy/a;this._circleElement.style.width=`${i.toFixed(2)}px`,this._circleElement.style.height=`${i.toFixed(2)}px`}trigger(){if(!this._setup)return vo("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 W0("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":cx--,ig=!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 W0("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 W0("trackuserlocationstart")),this.fire(new W0("userlocationfocus"));break;default:throw 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 Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),cx++;let e;cx>1?(e={maximumAge:6e5,timeout:0},ig=!0):(e=this.options.positionOptions,ig=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}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)}},GV={maxWidth:100,unit:"metric"},HV=class{constructor(e){this._onMove=()=>{hj(this._map,this._container,this.options)},this.setUnit=r=>{this.options.unit=r,hj(this._map,this._container,this.options)},this.options=ja(ja({},GV),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},h4=class extends qf{},WV=class extends Zl{constructor(e={}){var r;super(),this._onFullscreenChange=()=>{var t;let a=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;(t=a?.shadowRoot)!=null&&t.fullscreenElement;)a=a.shadowRoot.fullscreenElement;a===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(r=e.pseudo)!=null?r:!1,e?.container&&(e.container instanceof HTMLElement?this._container=e.container:vo("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(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let e=this._fullscreenButton=Fn.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);Fn.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_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 h4("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new h4("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},$V=class{constructor(e){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=e}onAdd(e){return this._map=e,this._container=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=Fn.create("button","maplibregl-ctrl-terrain",this._container),Fn.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(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},YV=class{constructor(){this._toggleProjection=()=>{var e;let r=(e=this._map.getProjection())==null?void 0:e.type;r==="mercator"||!r?this._map.setProjection({type:"globe"}):this._map.setProjection({type:"mercator"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((e=this._map.getProjection())==null?void 0:e.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(e){return this._map=e,this._container=Fn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=Fn.create("button","maplibregl-ctrl-globe",this._container),Fn.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},XV={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},ZV=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),d4=class extends qf{},KV=class extends Zl{constructor(e){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._map._camera.transform.isLocationOccluded(this.getLngLat())?this._container.style.opacity=`${this.options.locationOccludedOpacity}`:this._container.style.opacity="")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),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("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new d4("close"))),this),this._update=r=>{let t=this._lngLat||this._trackPointer;if(!this._map||!t||!this._content)return;if(!this._container){if(this._container=Fn.create("div","maplibregl-popup",this._map.getContainer()),this._tip=Fn.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let n of this.options.className.split(" "))this._container.classList.add(n);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=cj(this._lngLat,this._flatPos,this._map._camera.transform,this._trackPointer);let a;if(r&&"point"in r&&r.point&&(a=r.point),this._trackPointer&&!a)return;let i=this._flatPos=this._pos=this._trackPointer&&a?a:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&a?a:this._map._camera.transform.locationToScreenPoint(this._lngLat));let o=this.options.anchor,s=dj(this.options.offset);if(!o){let n=this._container.offsetWidth,u=this._container.offsetHeight,c=iye(this.options.padding),f;f=i.y+s.bottom.ythis._map._camera.transform.height-u-c.bottom?["bottom"]:[],i.xthis._map._camera.transform.width-n/2-c.right&&f.push("right"),o=f.length===0?"bottom":f.join("-")}let l=i.add(s[o]);this.options.subpixelPositioning||(l=l.round()),this._container.style.transform=`${u4[o]} translate(${l.x}px,${l.y}px)`,fj(this._container,o,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=tn(Object.create(XV),e)}addTo(e){return this._map&&this.remove(),this._map=e,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._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),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 d4("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=ln.convert(e),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),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._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let r=document.createDocumentFragment(),t=document.createElement("body"),a;for(t.innerHTML=e;a=t.firstChild,a;)r.appendChild(a);return this.setDOMContent(r)}getMaxWidth(){var e;return(e=this._container)==null?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=Fn.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}setPadding(e){this.options.padding=e,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=Fn.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 e=this._container.querySelector(ZV);e&&e.focus()}},JV=dC}}),mye=ye({"build/maplibre_worker.js"(e,r){"use strict";r.exports='var t1=Object.defineProperty,e1=Object.defineProperties;var r1=Object.getOwnPropertyDescriptors;var nh=Object.getOwnPropertySymbols;var i1=Object.prototype.hasOwnProperty,n1=Object.prototype.propertyIsEnumerable;var ah=(t,e,r)=>e in t?t1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,je=(t,e)=>{for(var r in e||(e={}))i1.call(e,r)&&ah(t,r,e[r]);if(nh)for(var r of nh(e))n1.call(e,r)&&ah(t,r,e[r]);return t},Si=(t,e)=>e1(t,r1(e));var rt=(t,e,r)=>new Promise((i,n)=>{var a=l=>{try{o(r.next(l))}catch(u){n(u)}},s=l=>{try{o(r.throw(l))}catch(u){n(u)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(a,s);o((r=r.apply(t,e)).next())});var a1=Object.create,ep=Object.defineProperty,s1=Object.getOwnPropertyDescriptor,o1=Object.getOwnPropertyNames,l1=Object.getPrototypeOf,rp=Object.prototype.hasOwnProperty,fl=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),u1=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=o1(e),a=0,s=n.length,o;ae[l]).bind(null,o),enumerable:!(i=s1(e,o))||i.enumerable});return t},h1=(t,e,r)=>(r=t==null?{}:a1(l1(t)),u1(e||!t||!t.__esModule||!rp.call(t,"default")?ep(r,"default",{value:t,enumerable:!0}):r,t));function B(t,e){this.x=t,this.y=e}B.prototype={clone(){return new B(this.x,this.y)},add(t){return this.clone()._add(t)},sub(t){return this.clone()._sub(t)},multByPoint(t){return this.clone()._multByPoint(t)},divByPoint(t){return this.clone()._divByPoint(t)},mult(t){return this.clone()._mult(t)},div(t){return this.clone()._div(t)},rotate(t){return this.clone()._rotate(t)},rotateAround(t,e){return this.clone()._rotateAround(t,e)},matMult(t){return this.clone()._matMult(t)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(t){return this.x===t.x&&this.y===t.y},dist(t){return Math.sqrt(this.distSqr(t))},distSqr(t){let e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith(t){return this.angleWithSep(t.x,t.y)},angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult(t){let e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add(t){return this.x+=t.x,this.y+=t.y,this},_sub(t){return this.x-=t.x,this.y-=t.y,this},_mult(t){return this.x*=t,this.y*=t,this},_div(t){return this.x/=t,this.y/=t,this},_multByPoint(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint(t){return this.x/=t.x,this.y/=t.y,this},_unit(){return this._div(this.mag()),this},_perp(){let t=this.y;return this.y=this.x,this.x=-t,this},_rotate(t){let e=Math.cos(t),r=Math.sin(t),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround(t,e){let r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),a=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:B},B.convert=function(t){if(t instanceof B)return t;if(Array.isArray(t))return new B(+t[0],+t[1]);if(t.x!==void 0&&t.y!==void 0)return new B(+t.x,+t.y);throw Error("Expected [x, y] or {x, y} point format")};function c1(t,e,r,i){let n=3*t,a=3*(r-t)-n,s=1-n-a,o=3*e,l=3*(i-e)-o,u=1-o-l;return function(h,c=1e-6){if(h<=0)return 0;if(h>=1)return 1;let p=h;for(let y=0;y<8;y++){let m=((s*p+a)*p+n)*p-h;if(Math.abs(m)m?f=p:d=p,p=(f+d)*.5}return((u*p+l)*p+o)*p}}var Nn;function p1(){return Nn!=null||(Nn=typeof OffscreenCanvas<"u"&&!!new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Nn}var Un;function f1(){if(Un==null&&(Un=!1,p1())){let t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let r=0;r<25;r++){let i=r*4;t.fillStyle=`rgb(${i},${i+1},${i+2})`,t.fillRect(r%5,Math.floor(r/5),1,1)}let e=t.getImageData(0,0,5,5).data;for(let r=0;r<100;r++)if(r%4!=3&&e[r]!==r){Un=!0;break}}}return Un||!1}var pe=typeof Float32Array<"u"?Float32Array:Array;Math.PI/180,180/Math.PI;function d1(){var t=new pe(9);return pe!=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}function ip(){var t=new pe(3);return pe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function y1(t){var e=t[0],r=t[1],i=t[2];return Math.sqrt(e*e+r*r+i*i)}function sh(t,e,r){var i=new pe(3);return i[0]=t,i[1]=e,i[2]=r,i}function m1(t,e){var r=e[0],i=e[1],n=e[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function g1(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ks(t,e,r){var i=e[0],n=e[1],a=e[2],s=r[0],o=r[1],l=r[2];return t[0]=n*l-a*o,t[1]=a*s-i*l,t[2]=i*o-n*s,t}var x1=y1;(function(){var t=ip();return function(e,r,i,n,a,s){var o,l;for(r||(r=3),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o0&&(s=1/Math.sqrt(s)),t[0]=r*s,t[1]=i*s,t[2]=n*s,t[3]=a*s,t}function w1(t,e,r){var i=e[0],n=e[1],a=e[2],s=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*s,t[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*s,t[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*s,t[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*s,t}(function(){var t=v1();return function(e,r,i,n,a,s){var o,l;for(r||(r=4),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o1e-6?(p=Math.acos(f),d=Math.sin(p),y=Math.sin((1-i)*p)/d,m=Math.sin(i*p)/d):(y=1-i,m=i),t[0]=y*n+m*l,t[1]=y*a+m*u,t[2]=y*s+m*h,t[3]=y*o+m*c,t}function _1(t,e){var r=e[0]+e[4]+e[8],i;if(r>0)i=Math.sqrt(r+1),t[3]=.5*i,i=.5/i,t[0]=(e[5]-e[7])*i,t[1]=(e[6]-e[2])*i,t[2]=(e[1]-e[3])*i;else{var n=0;e[4]>e[0]&&(n=1),e[8]>e[n*3+n]&&(n=2);var a=(n+1)%3,s=(n+2)%3;i=Math.sqrt(e[n*3+n]-e[a*3+a]-e[s*3+s]+1),t[n]=.5*i,i=.5/i,t[3]=(e[a*3+s]-e[s*3+a])*i,t[a]=(e[a*3+n]+e[n*3+a])*i,t[s]=(e[s*3+n]+e[n*3+s])*i}return t}var lh=b1;(function(){var t=ip(),e=sh(1,0,0),r=sh(0,1,0);return function(i,n,a){var s=g1(n,a);return s<-.999999?(ks(t,e,n),x1(t)<1e-6&&ks(t,r,n),m1(t,t),D1(i,t,Math.PI),i):s>.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(ks(t,n,a),i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=1+s,lh(i,i))}})(),(function(){var t=oh(),e=oh();return function(r,i,n,a,s,o){return Ts(t,i,s,o),Ts(e,n,a,o),Ts(r,t,e,2*o*(1-o)),r}})(),(function(){var t=d1();return function(e,r,i,n){return t[0]=i[0],t[3]=i[1],t[6]=i[2],t[1]=n[0],t[4]=n[1],t[7]=n[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],lh(e,_1(e,t))}})();function A1(){var t=new pe(2);return pe!=Float32Array&&(t[0]=0,t[1]=0),t}(function(){var t=A1();return function(e,r,i,n,a,s){var o,l;for(r||(r=2),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o=1)return 1;let e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function E1(t,e,r,i){return c1(t,e,r,i)}var d5=E1(.25,.1,.25,1);function Ji(t,e,r){return Math.min(r,Math.max(e,t))}function F1(t,e,r){let i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n}function Gt(t,...e){for(let r of e)for(let i in r)t[i]=r[i];return t}function k1(t){return Math.log(t)/Math.LN2%1==0}function Ia(t,e,r){let i={};for(let n in t)i[n]=e.call(r||this,t[n],n,t);return i}function T1(t,e,r){let i={};for(let n in t)e.call(r||this,t[n],n,t)&&(i[n]=t[n]);return i}function He(t){return Array.isArray(t)?t.map(He):typeof t=="object"&&t?Ia(t,He):t}var uh={};function Bt(t){uh[t]||(typeof console<"u"&&console.warn(t),uh[t]=!0)}function Ke(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function mr(t){return typeof WorkerGlobalScope<"u"&&t!==void 0&&t instanceof WorkerGlobalScope}function Ca(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap}function I1(t,e,r,i,n){let a=Math.max(-e,0)*4,s=(Math.max(0,r)-r)*i*4+a,o=i*4,l=Math.max(0,e),u=Math.max(0,r),h=Math.min(t.width,e+i),c=Math.min(t.height,r+n);return{rect:{x:l,y:u,width:h-l,height:c-u},layout:[{offset:s,stride:o}]}}function C1(t,e,r,i,n){return rt(this,null,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(t,{timestamp:0});try{let s=a==null?void 0:a.format;if(!s||!(s.startsWith("BGR")||s.startsWith("RGB")))throw Error(`Unrecognized format ${s}`);let o=s.startsWith("BGR"),l=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(l,I1(t,e,r,i,n)),o)for(let u=0;u{t.removeEventListener(e,r,i)}}}function ch(t){return t*Math.PI/180}var ph="AbortError",dl=class extends Error{constructor(t=ph){super(t instanceof Error?t.message:t),this.name=ph,t instanceof Error&&t.stack&&(this.stack=t.stack)}};function yl(t){return t instanceof Error&&t.name==="AbortError"}function B1(t){if(t.aborted)throw new dl(t.reason)}var ml={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function P1(t){return ml.REGISTERED_PROTOCOLS[t.substring(0,t.indexOf("://"))]}function sp(t,e){ml.REGISTERED_PROTOCOLS[t]=e}function op(t){delete ml.REGISTERED_PROTOCOLS[t]}var fh="global-dispatcher",ya=class extends Error{constructor(t,e,r,i){super(`AJAXError: ${e} (${t}): ${r}`),this.status=t,this.statusText=e,this.url=r,this.body=i}};function lp(){var t;if(mr(self))return(t=self.worker)==null?void 0:t.referrer;if(window.location.protocol==="blob:")try{return window.parent.location.href}catch(e){}return window.location.href}var z1=t=>{var e;return t.startsWith("file:")||((e=lp())==null?void 0:e.startsWith("file:"))&&!/^\\w+:/.test(t)};function L1(t,e){return rt(this,null,function*(){let r=new Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,cache:t.cache,referrer:lp(),referrerPolicy:t.referrerPolicy,signal:e.signal});t.type==="json"&&!r.headers.has("Accept")&&r.headers.set("Accept","application/json");let i;try{i=yield fetch(r)}catch(s){throw yl(s)?s:new ya(0,Ki(s).message,t.url,new Blob)}if(!i.ok){let s=yield i.blob();throw new ya(i.status,i.statusText,t.url,s)}let n;n=t.type==="arrayBuffer"||t.type==="image"?i.arrayBuffer():t.type==="json"?i.json():i.text();let a=yield n;return B1(e.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}function V1(t,e){return new Promise((r,i)=>{var a;let n=new XMLHttpRequest;n.open(t.method||"GET",t.url,!0),(t.type==="arrayBuffer"||t.type==="image")&&(n.responseType="arraybuffer");for(let s in t.headers)n.setRequestHeader(s,t.headers[s]);t.type==="json"&&(n.responseType="text",(a=t.headers)!=null&&a.Accept||n.setRequestHeader("Accept","application/json")),n.withCredentials=t.credentials==="include",n.onerror=()=>{i(Error(n.statusText))},n.onload=()=>{if(!e.signal.aborted)if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let s=n.response;if(t.type==="json")try{s=JSON.parse(n.response)}catch(o){i(o);return}r({data:s,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires"),etag:n.getResponseHeader("ETag")})}else{let s=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});i(new ya(n.status,n.statusText,t.url,s))}},e.signal.addEventListener("abort",()=>{n.abort(),i(new dl(e.signal.reason))}),n.send(t.body)})}var Ma=function(t,e){return rt(this,null,function*(){var r,i;if(t.url.includes("://")&&!/^https?:|^file:/.test(t.url)){let n=P1(t.url);if(n){let a=yield n(t,e);return!a.data&&t.type==="arrayBuffer"?Gt(a,{data:new ArrayBuffer(0)}):a}if(mr(self)&&((r=self.worker)!=null&&r.actor))return self.worker.actor.sendAsync({type:"GR",data:t,targetMapId:fh},e)}if(!z1(t.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return L1(t,e);if(mr(self)&&((i=self.worker)!=null&&i.actor))return self.worker.actor.sendAsync({type:"GR",data:t,mustQueue:!0,targetMapId:fh},e)}return V1(t,e)})},up=(t,e)=>Ma(Gt(t,{type:"json"}),e),hp=(t,e)=>Ma(Gt(t,{type:"arrayBuffer"}),e);function dh(t,e,r){var i;(i=r[t])!=null&&i.includes(e)||(r[t]||(r[t]=[]),r[t].push(e))}function Is(t,e,r){if(r!=null&&r[t]){let i=r[t].indexOf(e);i!==-1&&r[t].splice(i,1)}}var cp=class{constructor(t,e={}){Gt(this,e),this.type=t}},ma=class extends cp{constructor(t,e={}){super("error",Gt({error:t},e))}},O1=class{on(t,e){return this._listeners||(this._listeners={}),dh(t,e,this._listeners),{unsubscribe:()=>{this.off(t,e)}}}off(t,e){return Is(t,e,this._listeners),Is(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners||(this._oneTimeListeners={}),dh(t,e,this._oneTimeListeners),this):new Promise(r=>this.once(t,r))}fire(t,e){var n,a,s,o,l,u;let r=typeof t=="string"?new cp(t,e||{}):t,i=r.type;if(this.listens(i)){r.target=this;let h=(s=(a=(n=this._listeners)==null?void 0:n[i])==null?void 0:a.slice())!=null?s:[];for(let f of h)f.call(this,r);let c=(u=(l=(o=this._oneTimeListeners)==null?void 0:o[i])==null?void 0:l.slice())!=null?u:[];for(let f of c)Is(i,f,this._oneTimeListeners),f.call(this,r);let p=this._eventedParent;p&&(Gt(r,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(r))}else r instanceof ma&&console.error(r.error);return this}listens(t){var e,r,i,n,a;return!!((r=(e=this._listeners)==null?void 0:e[t])!=null&&r.length||(n=(i=this._oneTimeListeners)==null?void 0:i[t])!=null&&n.length||(a=this._eventedParent)!=null&&a.listens(t))}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}},pp={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},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},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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:"filter"},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:{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:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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","feature"]},"property-type":"data-driven"},"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"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,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,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default: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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"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","feature"]},"property-type":"cross-faded-data-driven"},"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"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}},w=pp,fp=["type","source","source-layer","minzoom","maxzoom","filter","layout"],E=class{constructor(t,e,r,i,n="error"){this.message=(t?`${t}: `:"")+r,i&&(this.identifier=i),this.severity=n,e!=null&&e.__line__&&(this.line=e.__line__)}},dn={kind:"null"},I={kind:"number"},Y={kind:"string"},tt={kind:"boolean"},ce={kind:"color"},Ba={kind:"projectionDefinition"},fr={kind:"object"},Z={kind:"value"},R1={kind:"error"},Pa={kind:"collator"},yn={kind:"formatted"},za={kind:"padding"},Qi={kind:"colorArray"},La={kind:"numberArray"},mn={kind:"resolvedImage"},Va={kind:"variableAnchorOffsetCollection"};function Ut(t,e){return{kind:"array",itemType:t,N:e}}function yt(t){if(t.kind==="array"){let e=yt(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}var $1=[dn,I,Y,tt,ce,Ba,yn,fr,Ut(Z),za,La,Qi,mn,Va];function tn(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!tn(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(let r of $1)if(!tn(r,e))return null}}return`Expected ${yt(t)} but found ${yt(e)} instead.`}function gl(t,e){return e.some(r=>r.kind===t.kind)}function dr(t,e){return e.some(r=>r==="null"?t===null:r==="array"?Array.isArray(t):r==="object"?t&&!Array.isArray(t)&&typeof t=="object":r===typeof t)}function Ge(t,e){return t.kind==="array"&&e.kind==="array"?t.itemType.kind===e.itemType.kind&&typeof t.N=="number":t.kind===e.kind}var dp=.96422,yp=.82521,mp=4/29,Ks=6/29,gp=3*Ks*Ks,N1=Math.PI/180,U1=180/Math.PI;function xp(t){return t%=360,t<0&&(t+=360),t}function vp([t,e,r,i]){t=Cs(t),e=Cs(e),r=Cs(r);let n,a,s=Ms((.2225045*t+.7168786*e+.0606169*r)/1);t===e&&e===r?n=a=s:(n=Ms((.4360747*t+.3850649*e+.1430804*r)/dp),a=Ms((.0139322*t+.0971045*e+.7141733*r)/yp));let o=116*s-16;return[o<0?0:o,500*(n-s),200*(s-a),i]}function Cs(t){return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function Ms(t){return t>.008856451679035631?t**(1/3):t/gp+mp}function bp([t,e,r,i]){let n=(t+16)/116,a=isNaN(e)?n:n+e/500,s=isNaN(r)?n:n-r/200;return n=1*Ps(n),a=dp*Ps(a),s=yp*Ps(s),[Bs(3.1338561*a-1.6168667*n-.4906146*s),Bs(-.9787684*a+1.9161415*n+.033454*s),Bs(.0719453*a-.2289914*n+1.4052427*s),i]}function Bs(t){return t=t<=.00304?12.92*t:1.055*t**(1/2.4)-.055,t<0?0:t>1?1:t}function Ps(t){return t>Ks?t*t*t:gp*(t-mp)}function q1(t){let[e,r,i,n]=vp(t),a=Math.sqrt(r*r+i*i);return[Math.round(a*1e4)?xp(Math.atan2(i,r)*U1):NaN,a,e,n]}function j1([t,e,r,i]){return t=isNaN(t)?0:t*N1,bp([r,Math.cos(t)*e,Math.sin(t)*e,i])}function G1([t,e,r,i]){t=xp(t),e/=100,r/=100;function n(a){let s=(a+t/30)%12,o=e*Math.min(r,1-r);return r-o*Math.max(-1,Math.min(s-3,9-s,1))}return[n(0),n(8),n(4),i]}var X1=Object.hasOwn||function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};function ji(t,e){return X1(t,e)?t[e]:void 0}function Y1(t){if(t=t.toLowerCase().trim(),t==="transparent")return[0,0,0,0];let e=ji(W1,t);if(e){let[i,n,a]=e;return[i/255,n/255,a/255,1]}if(t.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(t)){let i=t.length<6?1:2,n=1;return[qn(t.slice(n,n+=i)),qn(t.slice(n,n+=i)),qn(t.slice(n,n+=i)),qn(t.slice(n,n+i)||"ff")]}if(t.startsWith("rgb")){let i=t.match(/^rgba?\\(\\s*([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(i){let[n,a,s,o,l,u,h,c,p,f,d,y]=i,m=[o||" ",h||" ",f].join("");if(m===" "||m===" /"||m===",,"||m===",,,"){let g=[s,u,p].join(""),x=g==="%%%"?100:g===""?255:0;if(x){let v=[Rr(+a/x,0,1),Rr(+l/x,0,1),Rr(+c/x,0,1),d?yh(+d,y):1];if(mh(v))return v}}return}}let r=t.match(/^hsla?\\(\\s*([\\de.+-]+)(?:deg)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(r){let[i,n,a,s,o,l,u,h,c]=r,p=[a||" ",o||" ",u].join("");if(p===" "||p===" /"||p===",,"||p===",,,"){let f=[+n,Rr(+s,0,100),Rr(+l,0,100),h?yh(+h,c):1];if(mh(f))return G1(f)}}}function qn(t){return parseInt(t.padEnd(2,t),16)/255}function yh(t,e){return Rr(e?t/100:t,0,1)}function Rr(t,e,r){return Math.min(Math.max(e,t),r)}function mh(t){return!t.some(Number.isNaN)}var W1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function Je(t,e,r){return t+r*(e-t)}function ti(t,e,r){return t.map((i,n)=>Je(i,e[n],r))}function Z1(t){return t==="rgb"||t==="hcl"||t==="lab"}var Pt,gt=(Pt=class{constructor(e,r,i,n=1,a=!0){this.r=e,this.g=r,this.b=i,this.a=n,a||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,r,i,n]))}static parse(e){if(e instanceof Pt)return e;if(typeof e!="string")return;let r=Y1(e);if(r)return new Pt(...r,!1)}get rgb(){let{r:e,g:r,b:i,a:n}=this,a=n||1/0;return this.overwriteGetter("rgb",[e/a,r/a,i/a,n])}get hcl(){return this.overwriteGetter("hcl",q1(this.rgb))}get lab(){return this.overwriteGetter("lab",vp(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){let[e,r,i,n]=this.rgb;return`rgba(${[e,r,i].map(a=>Math.round(a*255)).join(",")},${n})`}static interpolate(e,r,i,n="rgb"){switch(n){case"rgb":{let[a,s,o,l]=ti(e.rgb,r.rgb,i);return new Pt(a,s,o,l,!1)}case"hcl":{let[a,s,o,l]=e.hcl,[u,h,c,p]=r.hcl,f,d;if(!isNaN(a)&&!isNaN(u)){let v=u-a;u>a&&v>180?v-=360:u180&&(v+=360),f=a+i*v}else isNaN(a)?isNaN(u)?f=NaN:(f=u,(o===1||o===0)&&(d=h)):(f=a,(c===1||c===0)&&(d=s));let[y,m,g,x]=j1([f,d!=null?d:Je(s,h,i),Je(o,c,i),Je(l,p,i)]);return new Pt(y,m,g,x,!1)}case"lab":{let[a,s,o,l]=bp(ti(e.lab,r.lab,i));return new Pt(a,s,o,l,!1)}}}},Pt.black=new Pt(0,0,0,1),Pt.white=new Pt(1,1,1,1),Pt.transparent=new Pt(0,0,0,0),Pt.red=new Pt(1,0,0,1),Pt),H1=["bottom","center","top"],Js=class{constructor(t,e,r,i,n,a){this.text=t,this.image=e,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=a}},ze=class la{constructor(e){this.sections=e}static fromString(e){return new la([new Js(e,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof la?e:la.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}},Ae=class Li{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Li)return e;if(typeof e=="number")return new Li([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Li(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i){return new Li(ti(e.values,r.values,i))}},Se=class Vi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Vi)return e;if(typeof e=="number")return new Vi([e]);if(Array.isArray(e)){for(let r of e)if(typeof r!="number")return;return new Vi(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i){return new Vi(ti(e.values,r.values,i))}},oe=class Oi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Oi)return e;if(typeof e=="string"){let i=gt.parse(e);return i?new Oi([i]):void 0}if(!Array.isArray(e))return;let r=[];for(let i of e){if(typeof i!="string")return;let n=gt.parse(i);if(!n)return;r.push(n)}return new Oi(r)}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i,n="rgb"){let a=[];if(e.values.length!=r.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let s=0;s=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?i===void 0||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[t,e,r,i].join(", ")}]: \'a\' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[t,e,r,i]:[t,e,r]).join(", ")}]: \'r\', \'g\', and \'b\' must be between 0 and 255.`}function ei(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof Dr||t instanceof gt||t instanceof xl||t instanceof ze||t instanceof Ae||t instanceof Se||t instanceof oe||t instanceof De||t instanceof _e)return!0;if(Array.isArray(t)){for(let e of t)if(!ei(e))return!1;return!0}if(typeof t=="object"){for(let e in t)if(!ei(t[e]))return!1;return!0}return!1}function _t(t){if(t===null)return dn;if(typeof t=="string")return Y;if(typeof t=="boolean")return tt;if(typeof t=="number")return I;if(t instanceof gt)return ce;if(t instanceof Dr)return Ba;if(t instanceof xl)return Pa;if(t instanceof ze)return yn;if(t instanceof Ae)return za;if(t instanceof Se)return La;if(t instanceof oe)return Qi;if(t instanceof De)return Va;if(t instanceof _e)return mn;if(Array.isArray(t)){let e=t.length,r;for(let i of t){let n=_t(i);if(!r)r=n;else{if(r===n)continue;r=Z;break}}return Ut(r||Z,e)}return fr}function Gi(t){let e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof gt||t instanceof Dr||t instanceof ze||t instanceof Ae||t instanceof Se||t instanceof oe||t instanceof De||t instanceof _e?t.toString():JSON.stringify(t)}var ri=class _p{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`\'literal\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ei(e[1]))return r.error(`invalid value of type "${typeof e[1]}"`);let i=e[1],n=_t(i),a=r.expectedType;return n.kind==="array"&&n.N===0&&a&&a.kind==="array"&&(typeof a.N!="number"||a.N===0)&&(n=a),new _p(n,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}},J1=["Unknown","Point","LineString","Polygon"],Ap=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?J1[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let e=this._parseColorCache.get(t);return e||(e=gt.parse(t),this._parseColorCache.set(t,e)),e}};function Oa(t,e,r){let i=t.length-1,n=0,a=i,s=0,o,l;for(;n<=a;)if(s=Math.floor((n+a)/2),o=t[s],l=t[s+1],o<=e){if(s===i||ee)a=s-1;else throw new ft("Input is not a number.",r);return 0}var vl=class Sp{constructor(e,r,i,n){this.type=e,this.input=r,this.key=n,this.labels=[],this.outputs=[];for(let[a,s]of i)this.labels.push(a),this.outputs.push(s)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");let i=r.parse(e[1],1,I);if(!i)return null;let n=[],a=null;r.expectedType&&r.expectedType.kind!=="value"&&(a=r.expectedType);for(let s=1;s=o)return r.error(\'Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.\',u);let c=r.parse(l,h,a);if(!c)return null;a||(a=c.type),n.push([o,c])}return new Sp(a,i,n,r.key)}evaluate(e){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(e);let n=this.input.evaluate(e);if(n<=r[0])return i[0].evaluate(e);let a=r.length;return n>=r[a-1]?i[a-1].evaluate(e):i[Oa(r,n,this.key)].evaluate(e)}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function Q1(t,e,r,i){let n=3*t,a=3*(r-t)-n,s=1-n-a,o=3*e,l=3*(i-e)-o,u=1-o-l;return function(h,c=1e-6){if(h<=0)return 0;if(h>=1)return 1;let p=h;for(let y=0;y<8;y++){let m=((s*p+a)*p+n)*p-h;if(Math.abs(m)m?f=p:d=p,p=(f+d)*.5}return((u*p+l)*p+o)*p}}var be=class Qs{constructor(e,r,i,n,a,s){this.type=e,this.operator=r,this.interpolation=i,this.input=n,this.key=s,this.labels=[],this.outputs=[];for(let[o,l]of a)this.labels.push(o),this.outputs.push(l)}static interpolationFactor(e,r,i,n){let a=0;if(e.name==="exponential")a=zs(r,e.base,i,n);else if(e.name==="linear")a=zs(r,1,i,n);else if(e.name==="cubic-bezier"){let s=e.controlPoints;a=Q1(s[0],s[1],s[2],s[3])(zs(r,1,i,n))}return a}static parse(e,r){let[i,n,a,...s]=e;if(!Array.isArray(n)||n.length===0)return r.error("Expected an interpolation type expression.",1);if(n[0]==="linear")n={name:"linear"};else if(n[0]==="exponential"){let u=n[1];if(typeof u!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:u}}else if(n[0]==="cubic-bezier"){let u=n.slice(1);if(u.length!==4||u.some(h=>typeof h!="number"||h<0||h>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:u}}else return r.error(`Unknown interpolation type ${String(n[0])}`,1,0);if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(a=r.parse(a,2,I),!a)return null;let o=[],l=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&r.expectedType!=Qi?l=ce:r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(let u=0;u=h)return r.error(\'Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.\',p);let d=r.parse(c,f,l);if(!d)return null;l||(l=d.type),o.push([h,d])}return!Ge(l,I)&&!Ge(l,Ba)&&!Ge(l,ce)&&!Ge(l,za)&&!Ge(l,La)&&!Ge(l,Qi)&&!Ge(l,Va)&&!Ge(l,Ut(I))?r.error(`Type ${yt(l)} is not interpolatable.`):new Qs(l,i,n,a,o,r.key)}evaluate(e){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(e);let n=this.input.evaluate(e);if(n<=r[0])return i[0].evaluate(e);let a=r.length;if(n>=r[a-1])return i[a-1].evaluate(e);let s=Oa(r,n,this.key),o=r[s],l=r[s+1],u=Qs.interpolationFactor(this.interpolation,n,o,l),h=i[s].evaluate(e),c=i[s+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Je(h,c,u);case"color":return gt.interpolate(h,c,u);case"padding":return Ae.interpolate(h,c,u);case"colorArray":return oe.interpolate(h,c,u);case"numberArray":return Se.interpolate(h,c,u);case"variableAnchorOffsetCollection":return De.interpolate(h,c,u,this.key);case"array":return ti(h,c,u);case"projectionDefinition":return Dr.interpolate(h,c,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return gt.interpolate(h,c,u,"hcl");case"colorArray":return oe.interpolate(h,c,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return gt.interpolate(h,c,u,"lab");case"colorArray":return oe.interpolate(h,c,u,"lab")}}}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function zs(t,e,r,i){let n=i-r,a=t-r;return n===0?0:e===1?a/n:(e**+a-1)/(e**+n-1)}var gr={color:gt.interpolate,number:Je,padding:Ae.interpolate,numberArray:Se.interpolate,colorArray:oe.interpolate,variableAnchorOffsetCollection:De.interpolate,array:ti},Ep=class Fp{constructor(e){this.type=yn,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=e[1];if(!Array.isArray(i)&&typeof i=="object")return r.error("First argument must be an image or text section.");let n=[],a=!1;for(let s=1;s<=e.length-1;++s){let o=e[s];if(a&&typeof o=="object"&&!Array.isArray(o)){a=!1;let l=null;if(o["font-scale"]&&(l=r.parse(o["font-scale"],1,I),!l))return null;let u=null;if(o["text-font"]&&(u=r.parse(o["text-font"],1,Ut(Y)),!u))return null;let h=null;if(o["text-color"]&&(h=r.parse(o["text-color"],1,ce),!h))return null;let c=null;if(o["vertical-align"]){if(typeof o["vertical-align"]=="string"&&!H1.includes(o["vertical-align"]))return r.error(`\'vertical-align\' must be one of: \'bottom\', \'center\', \'top\' but found \'${o["vertical-align"]}\' instead.`);if(c=r.parse(o["vertical-align"],1,Y),!c)return null}let p=n[n.length-1];p.scale=l,p.font=u,p.textColor=h,p.verticalAlign=c}else{let l=r.parse(e[s],1,Z);if(!l)return null;let u=l.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return r.error("Formatted text type must be \'string\', \'value\', \'image\' or \'null\'.");a=!0,n.push({content:l,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Fp(n)}evaluate(e){return new ze(this.sections.map(r=>{let i=r.content.evaluate(e);return _t(i)===mn?new Js("",i,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(e):null):new Js(Gi(i),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null,r.verticalAlign?r.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor),r.verticalAlign&&e(r.verticalAlign)}outputDefined(){return!1}};function kp(t,e,r=0,i=t.length-1,n=t0){for(;i>r;){if(i-r>600){let l=i-r+1,u=e-r+1,h=Math.log(l),c=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*c*(l-c)/l)*(u-l/2<0?-1:1);kp(t,e,Math.max(r,Math.floor(e-u*c/l+p)),Math.min(i,Math.floor(e+(l-u)*c/l+p)),n)}let a=t[e],s=r,o=i;for(ki(t,r,e),n(t[i],a)>0&&ki(t,r,i);s0;)o--}n(t[r],a)===0?ki(t,r,o):(o++,ki(t,o,i)),o<=e&&(r=o+1),e<=o&&(i=o-1)}}function ki(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function t0(t,e){return te)}function Ra(t,e){if(t.length<=1)return[t];let r=[],i,n;for(let a of t){let s=r0(a);s!==0&&(a.area=Math.abs(s),n===void 0&&(n=s<0),n===s<0?(i&&r.push(i),i=[a]):i.push(a))}if(i&&r.push(i),e>1)for(let a=0;a2){let u=e[1];if(typeof u!="string"||!(u in jn)||u==="object")return r.error(\'The item type argument of "array" must be one of string, number, boolean\',1);o=jn[u],i++}else o=Z;let l;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error(\'The length argument to "array" must be a positive integer literal\',2);l=e[2],i++}n=Ut(o,l)}else{if(!jn[a])throw Error(`Types doesn\'t contain name = ${a}`);n=jn[a]}let s=[];for(;ie.outputDefined())}},gh={"to-boolean":tt,"to-color":ce,"to-number":I,"to-string":Y},jr=class Ip{constructor(e,r,i){this.type=e,this.args=r,this.key=i}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=e[0];if(!gh[i])throw Error(`Can\'t parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&e.length!==2)return r.error("Expected one argument.");let n=gh[i],a=[];for(let s=1;s4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:Dp(r[0],r[1],r[2],r[3]),!i))return new gt(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new ft(i||`Could not parse color from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"padding":{let r;for(let i of this.args){r=i.evaluate(e);let n=Ae.parse(r);if(n)return n}throw new ft(`Could not parse padding from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"numberArray":{let r;for(let i of this.args){r=i.evaluate(e);let n=Se.parse(r);if(n)return n}throw new ft(`Could not parse numberArray from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"colorArray":{let r;for(let i of this.args){r=i.evaluate(e);let n=oe.parse(r);if(n)return n}throw new ft(`Could not parse colorArray from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"variableAnchorOffsetCollection":{let r;for(let i of this.args){r=i.evaluate(e);let n=De.parse(r);if(n)return n}throw new ft(`Could not parse variableAnchorOffsetCollection from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"number":{let r=null;for(let i of this.args){if(r=i.evaluate(e),r===null)return 0;let n=Number(r);if(!isNaN(n))return n}throw new ft(`Could not convert ${JSON.stringify(r)} to number.`,this.key)}case"formatted":return ze.fromString(Gi(this.args[0].evaluate(e)));case"resolvedImage":return _e.fromString(Gi(this.args[0].evaluate(e)));case"projectionDefinition":{let r=this.args[0].evaluate(e);if(Dr.parse(r))return r;throw new ft(`Could not parse projectionDefinition from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}default:return Gi(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}},Cp=class Mp{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let i=[];for(let a=1;a=i.length)throw new ft(`Array index out of bounds: ${r} > ${i.length-1}.`,this.key);if(r!==Math.floor(r))throw new ft(`Array index must be an integer, but found ${r} instead.`,this.key);return i[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},n0=class Lp{constructor(e,r,i){this.needle=e,this.haystack=r,this.key=i,this.type=tt}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,Z);return!i||!n?null:gl(i.type,[tt,Y,I,dn,Z])?new Lp(i,n,r.key):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${yt(i.type)} instead`)}evaluate(e){let r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!i)return!1;if(!dr(r,["boolean","string","number","null"]))throw new ft(`Expected first argument to be of type boolean, string, number or null, but found ${yt(_t(r))} instead.`,this.key);if(!dr(i,["string","array"]))throw new ft(`Expected second argument to be of type array or string, but found ${yt(_t(i))} instead.`,this.key);return i.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},a0=class to{constructor(e,r,i,n){this.needle=e,this.haystack=r,this.key=i,this.fromIndex=n,this.type=I}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,Z);if(!i||!n)return null;if(!gl(i.type,[tt,Y,I,dn,Z]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${yt(i.type)} instead`);if(e.length===4){let a=r.parse(e[3],3,I);return a?new to(i,n,r.key,a):null}return new to(i,n,r.key)}evaluate(e){let r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!dr(r,["boolean","string","number","null"]))throw new ft(`Expected first argument to be of type boolean, string, number or null, but found ${yt(_t(r))} instead.`,this.key);let n;if(this.fromIndex&&(n=this.fromIndex.evaluate(e)),dr(i,["string"])){let a=i.indexOf(r,n);return a===-1?-1:[...i.slice(0,a)].length}if(dr(i,["array"]))return i.indexOf(r,n);throw new ft(`Expected second argument to be of type array or string, but found ${yt(_t(i))} instead.`,this.key)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},s0=class Vp{constructor(e,r,i,n,a,s){this.inputType=e,this.type=r,this.input=i,this.cases=n,this.outputs=a,this.otherwise=s}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let i,n;r.expectedType&&r.expectedType.kind!=="value"&&(n=r.expectedType);let a={},s=[];for(let u=2;u2**53-1)return p.error(`Branch labels must be integers no larger than ${2**53-1}.`);if(typeof d=="number"&&Math.floor(d)!==d)return p.error("Numeric branch labels must be integer values.");if(!i)i=_t(d);else if(p.checkSubtype(i,_t(d)))return null;if(a[String(d)]!==void 0)return p.error("Branch labels must be unique.");a[String(d)]=s.length}let f=r.parse(c,u,n);if(!f)return null;n||(n=f.type),s.push(f)}let o=r.parse(e[1],1,Z);if(!o)return null;let l=r.parse(e[e.length-1],e.length-1,n);return!l||o.type.kind!=="value"&&r.concat(1).checkSubtype(i,o.type)?null:new Vp(i,n,o,a,s,l)}evaluate(e){let r=this.input.evaluate(e);return(_t(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},o0=class Op{constructor(e,r,i){this.type=e,this.branches=r,this.otherwise=i}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);let n=[];for(let s=1;sr.outputDefined())&&this.otherwise.outputDefined()}},l0=class eo{constructor(e,r,i,n,a){this.type=e,this.input=r,this.beginIndex=i,this.key=n,this.endIndex=a}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,I);if(!i||!n)return null;if(!gl(i.type,[Ut(Z),Y,Z]))return r.error(`Expected first argument to be of type array or string, but found ${yt(i.type)} instead`);if(e.length===4){let a=r.parse(e[3],3,I);return a?new eo(i.type,i,n,r.key,a):null}return new eo(i.type,i,n,r.key)}evaluate(e){let r=this.input.evaluate(e),i=this.beginIndex.evaluate(e),n;if(this.endIndex&&(n=this.endIndex.evaluate(e)),dr(r,["string"]))return[...r].slice(i,n).join("");if(dr(r,["array"]))return r.slice(i,n);throw new ft(`Expected first argument to be of type array or string, but found ${yt(_t(r))} instead.`,this.key)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},Rp=class ro{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=null,n=r.expectedType;n&&n.kind!=="value"&&(i=n);let a=[];for(let s of e.slice(1)){let o=r.parse(s,1+a.length,i,void 0,{typeAnnotation:"omit"});if(!o)return null;i||(i=o.type),a.push(o)}if(!i)throw Error("No output type");return n&&a.some(s=>tn(n,s.type))?new ro(Z,a):new ro(i,a)}evaluate(e){let r=null,i=0,n;for(let a of this.args)if(i++,r=a.evaluate(e),r&&r instanceof _e&&!r.available&&(n||(n=r.name),r=null,i===this.args.length&&(r=n)),r!==null)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};function xh(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function u0(t,e,r){return e===r}function h0(t,e,r){return e!==r}function c0(t,e,r){return er}function f0(t,e,r){return e<=r}function d0(t,e,r){return e>=r}function $p(t,e,r,i){return i.compare(e,r)===0}function y0(t,e,r,i){return!$p(t,e,r,i)}function m0(t,e,r,i){return i.compare(e,r)<0}function g0(t,e,r,i){return i.compare(e,r)>0}function x0(t,e,r,i){return i.compare(e,r)<=0}function v0(t,e,r,i){return i.compare(e,r)>=0}function li(t,e,r){let i=t!=="=="&&t!=="!=";return class Np{constructor(a,s,o,l){this.lhs=a,this.rhs=s,this.key=o,this.collator=l,this.type=tt,this.hasUntypedArgument=a.type.kind==="value"||s.type.kind==="value"}static parse(a,s){if(a.length!==3&&a.length!==4)return s.error("Expected two or three arguments.");let o=a[0],l=s.parse(a[1],1,Z);if(!l)return null;if(!xh(o,l.type))return s.concat(1).error(`"${o}" comparisons are not supported for type \'${yt(l.type)}\'.`);let u=s.parse(a[2],2,Z);if(!u)return null;if(!xh(o,u.type))return s.concat(2).error(`"${o}" comparisons are not supported for type \'${yt(u.type)}\'.`);if(l.type.kind!==u.type.kind&&l.type.kind!=="value"&&u.type.kind!=="value")return s.error(`Cannot compare types \'${yt(l.type)}\' and \'${yt(u.type)}\'.`);i&&(l.type.kind==="value"&&u.type.kind!=="value"?l=new Ie(u.type,[l],s.key):l.type.kind!=="value"&&u.type.kind==="value"&&(u=new Ie(l.type,[u],s.key)));let h=null;if(a.length===4){if(l.type.kind!=="string"&&u.type.kind!=="string"&&l.type.kind!=="value"&&u.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(h=s.parse(a[3],3,Pa),!h)return null}return new Np(l,u,s.key,h)}evaluate(a){let s=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){let l=_t(s),u=_t(o);if(l.kind!==u.kind||l.kind!=="string"&&l.kind!=="number")throw new ft(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`,this.key)}if(this.collator&&!i&&this.hasUntypedArgument){let l=_t(s),u=_t(o);if(l.kind!=="string"||u.kind!=="string")return e(a,s,o)}return this.collator?r(a,s,o,this.collator.evaluate(a)):e(a,s,o)}eachChild(a){a(this.lhs),a(this.rhs),this.collator&&a(this.collator)}outputDefined(){return!0}}}var b0=li("==",u0,$p),w0=li("!=",h0,y0),D0=li("<",c0,m0),_0=li(">",p0,g0),A0=li("<=",f0,x0),S0=li(">=",d0,v0),Up=class qp{constructor(e,r,i){this.type=Pa,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");let i=e[1];if(typeof i!="object"||Array.isArray(i))return r.error("Collator options argument must be an object.");let n=r.parse(i["case-sensitive"]!==void 0&&i["case-sensitive"],1,tt);if(!n)return null;let a=r.parse(i["diacritic-sensitive"]!==void 0&&i["diacritic-sensitive"],1,tt);if(!a)return null;let s=null;return i.locale&&(s=r.parse(i.locale,1,Y),!s)?null:new qp(n,a,s)}evaluate(e){return new xl(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}},E0=class jp{constructor(e,r,i,n,a,s){this.type=Y,this.number=e,this.locale=r,this.currency=i,this.unit=n,this.minFractionDigits=a,this.maxFractionDigits=s}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");let i=r.parse(e[1],1,I);if(!i)return null;let n=e[2];if(typeof n!="object"||Array.isArray(n))return r.error("NumberFormat options argument must be an object.");let a=null;if(n.locale&&(a=r.parse(n.locale,1,Y),!a))return null;let s=null;if(n.currency&&(s=r.parse(n.currency,1,Y),!s))return null;let o=null;if(n.unit&&(o=r.parse(n.unit,1,Y),!o))return null;if(s&&o)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(n["min-fraction-digits"]&&(l=r.parse(n["min-fraction-digits"],1,I),!l))return null;let u=null;return n["max-fraction-digits"]&&(u=r.parse(n["max-fraction-digits"],1,I),!u)?null:new jp(i,a,s,o,l,u)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},F0=class Gp{constructor(e){this.type=mn,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");let i=r.parse(e[1],1,Y);return i?new Gp(i):r.error("No image name provided.")}evaluate(e){let r=this.input.evaluate(e),i=_e.fromString(r);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(r)>-1),i}eachChild(e){e(this.input)}outputDefined(){return!1}},k0=class Xp{constructor(e,r){this.input=e,this.key=r,this.type=I}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=r.parse(e[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${yt(i.type)} instead.`):new Xp(i,r.key):null}evaluate(e){let r=this.input.evaluate(e);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new ft(`Expected value to be of type string or array, but found ${yt(_t(r))} instead.`,this.key)}eachChild(e){e(this.input)}outputDefined(){return!1}},we=8192;function T0(t,e){let r=I0(t[0]),i=M0(t[1]),n=2**e.z;return[Math.round(r*n*we),Math.round(i*n*we)]}function bl(t,e){let r=2**e.z,i=(t[0]/we+e.x)/r,n=(t[1]/we+e.y)/r;return[C0(i),B0(n)]}function I0(t){return(180+t)/360}function C0(t){return t*360-180}function M0(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function B0(t){return 360/Math.PI*Math.atan(Math.exp((180-t*360)*Math.PI/180))-90}function gn(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function en(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function P0(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function z0(t,e,r){let i=t[0]-e[0],n=t[1]-e[1],a=t[0]-r[0],s=t[1]-r[1];return i*s-a*n===0&&i*a<=0&&n*s<=0}function $a(t,e,r,i){let n=[e[0]-t[0],e[1]-t[1]];return R0([i[0]-r[0],i[1]-r[1]],n)!==0&&!!(vh(t,e,r,i)&&vh(r,i,t,e))}function L0(t,e,r){for(let i of r)for(let n=0;n0&&c<0||h<0&&c>0}function wl(t,e,r){let i=[];for(let n=0;nr[2]){let n=i*.5,a=t[0]-r[0]>n?-i:r[0]-t[0]>n?i:0;a===0&&(a=t[0]-r[2]>n?-i:r[2]-t[0]>n?i:0),t[0]+=a}gn(e,t)}function $0(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}function bh(t,e,r,i){let n=2**i.z*we,a=[i.x*we,i.y*we],s=[];for(let o of t)for(let l of o){let u=[l.x+a[0],l.y+a[1]];Zp(u,e,r,n),s.push(u)}return s}function wh(t,e,r,i){let n=2**i.z*we,a=[i.x*we,i.y*we],s=[];for(let o of t){let l=[];for(let u of o){let h=[u.x+a[0],u.y+a[1]];gn(e,h),l.push(h)}s.push(l)}if(e[2]-e[0]<=n/2){$0(e);for(let o of s)for(let l of o)Zp(l,e,r,n)}return s}function N0(t,e){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(e.type==="Polygon"){let a=wl(e.coordinates,i,n),s=bh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!ui(o,a))return!1}if(e.type==="MultiPolygon"){let a=Wp(e.coordinates,i,n),s=bh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!V0(o,a))return!1}return!0}function U0(t,e){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(e.type==="Polygon"){let a=wl(e.coordinates,i,n),s=wh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!Yp(o,a))return!1}if(e.type==="MultiPolygon"){let a=Wp(e.coordinates,i,n),s=wh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!O0(o,a))return!1}return!0}var Dl=class ha{constructor(e,r){this.type=tt,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`\'within\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ei(e[1])){let i=e[1];if(i.type==="FeatureCollection"){let n=[];for(let a of i.features){let{type:s,coordinates:o}=a.geometry;s==="Polygon"&&n.push(o),s==="MultiPolygon"&&n.push(...o)}if(n.length)return new ha(i,{type:"MultiPolygon",coordinates:n})}else if(i.type==="Feature"){let n=i.geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new ha(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new ha(i,i)}return r.error("\'within\' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return N0(e,this.geometries);if(e.geometryType()==="LineString")return U0(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},Hp=class{constructor(t=[],e=(r,i)=>ri)){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:r}=this,i=e[t];for(;t>0;){let n=t-1>>1,a=e[n];if(r(i,a)>=0)break;e[t]=a,t=n}e[t]=i}_down(t){let{data:e,compare:r}=this,i=this.length>>1,n=e[t];for(;t=0)break;e[t]=e[a],t=a}e[t]=n}},Dh=Math.PI/180,_l=class{constructor(t){let e=Dh*6378.137*1e3,r=Math.cos(t*Dh),i=1/(1-.0066943799901413165*(1-r*r)),n=Math.sqrt(i);this.kx=e*n*r,this.ky=e*n*i*.9933056200098587}distance(t,e){let r=this.wrap(t[0]-e[0])*this.kx,i=(t[1]-e[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(t,e){let r=1/0,i,n,a,s;for(let o=0;o1?(l=t[o+1][0],u=t[o+1][1]):p>0&&(l+=h/this.kx*p,u+=c/this.ky*p)),h=this.wrap(e[0]-l)*this.kx,c=(e[1]-u)*this.ky;let f=h*h+c*c;f180;)t-=360;return t}};function Kp(t,e){return e[0]-t[0]}function ga(t){return t[1]-t[0]+1}function Le(t,e){return t[1]>=t[0]&&t[1]t[1])return[null,null];let r=ga(t);if(e){if(r===2)return[t,null];let n=Math.floor(r/2);return[[t[0],t[0]+n],[t[0]+n,t[1]]]}if(r===1)return[t,null];let i=Math.floor(r/2)-1;return[[t[0],t[0]+i],[t[0]+i+1,t[1]]]}function no(t,e){if(!Le(e,t.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=e[0];i<=e[1];++i)gn(r,t[i]);return r}function ao(t){let e=[1/0,1/0,-1/0,-1/0];for(let r of t)for(let i of r)gn(e,i);return e}function _h(t){return t[0]!==-1/0&&t[1]!==-1/0&&t[2]!==1/0&&t[3]!==1/0}function Al(t,e,r){if(!_h(t)||!_h(e))return NaN;let i=0,n=0;return t[2]e[2]&&(i=t[0]-e[2]),t[1]>e[3]&&(n=t[1]-e[3]),t[3]=i)return i;if(en(n,a)){if(Ah(t,e))return 0}else if(Ah(e,t))return 0;let s=1/0;for(let o of t)for(let l=0,u=o.length,h=u-1;l0;){let l=s.pop();if(l[0]>=a)continue;let u=l[1],h=e?50:100;if(ga(u)<=h){if(!Le(u,t.length))return NaN;if(e){let c=X0(t,u,r,i);if(isNaN(c)||c===0)return c;a=Math.min(a,c)}else for(let c=u[0];c<=u[1];++c){let p=G0(t[c],r,i);if(a=Math.min(a,p),a===0)return 0}}else{let c=io(u,e);Sh(s,a,i,t,o,c[0]),Sh(s,a,i,t,o,c[1])}}return a}function va(t,e,r,i,n,a=1/0){let s=Math.min(a,n.distance(t[0],r[0]));if(s===0)return s;let o=new Hp([[0,[0,t.length-1],[0,r.length-1]]],Kp);for(;o.length>0;){let l=o.pop();if(l[0]>=s)continue;let u=l[1],h=l[2],c=e?50:100,p=i?50:100;if(ga(u)<=c&&ga(h)<=p){if(!Le(u,t.length)&&Le(h,r.length))return NaN;let f;if(e&&i)f=q0(t,u,r,h,n),s=Math.min(s,f);else if(e&&!i){let d=t.slice(u[0],u[1]+1);for(let y=h[0];y<=h[1];++y)if(f=hr(r[y],d,n),s=Math.min(s,f),s===0)return s}else if(!e&&i){let d=r.slice(h[0],h[1]+1);for(let y=u[0];y<=u[1];++y)if(f=hr(t[y],d,n),s=Math.min(s,f),s===0)return s}else f=j0(t,u,r,h,n),s=Math.min(s,f)}else{let f=io(u,e),d=io(h,i);Gn(o,s,n,t,r,f[0],d[0]),Gn(o,s,n,t,r,f[0],d[1]),Gn(o,s,n,t,r,f[1],d[0]),Gn(o,s,n,t,r,f[1],d[1])}}return s}function W0(t,e){let r=t.geometry(),i=r.flat().map(s=>bl([s.x,s.y],t.canonical));if(r.length===0)return NaN;let n=new _l(i[0][1]),a=1/0;for(let s of e){switch(s.type){case"Point":a=Math.min(a,va(i,!1,[s.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,va(i,!1,s.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,xa(i,!1,s.coordinates,n,a))}if(a===0)return a}return a}function Z0(t,e){let r=t.geometry(),i=r.flat().map(s=>bl([s.x,s.y],t.canonical));if(r.length===0)return NaN;let n=new _l(i[0][1]),a=1/0;for(let s of e){switch(s.type){case"Point":a=Math.min(a,va(i,!0,[s.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,va(i,!0,s.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,xa(i,!0,s.coordinates,n,a))}if(a===0)return a}return a}function H0(t,e){let r=t.geometry();if(r.length===0||r[0].length===0)return NaN;let i=Ra(r,0).map(s=>s.map(o=>o.map(l=>bl([l.x,l.y],t.canonical)))),n=new _l(i[0][0][0][1]),a=1/0;for(let s of e)for(let o of i){switch(s.type){case"Point":a=Math.min(a,xa([s.coordinates],!1,o,n,a));break;case"LineString":a=Math.min(a,xa(s.coordinates,!0,o,n,a));break;case"Polygon":a=Math.min(a,Y0(o,s.coordinates,n,a))}if(a===0)return a}return a}function Ls(t){return t.type==="MultiPolygon"?t.coordinates.map(e=>({type:"Polygon",coordinates:e})):t.type==="MultiLineString"?t.coordinates.map(e=>({type:"LineString",coordinates:e})):t.type==="MultiPoint"?t.coordinates.map(e=>({type:"Point",coordinates:e})):[t]}var El=class ca{constructor(e,r){this.type=I,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`\'distance\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ei(e[1])){let i=e[1];if(i.type==="FeatureCollection")return new ca(i,i.features.map(n=>Ls(n.geometry)).flat());if(i.type==="Feature")return new ca(i,Ls(i.geometry));if("type"in i&&"coordinates"in i)return new ca(i,Ls(i))}return r.error("\'distance\' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return W0(e,this.geometries);if(e.geometryType()==="LineString")return Z0(e,this.geometries);if(e.geometryType()==="Polygon")return H0(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},K0=class Jp{constructor(e){let r=null;for(let i of e)if(!r)r=i.type;else{if(r===i.type)continue;r=Z;break}this.type=Ut(r!=null?r:Z,e.length),this.arr=e}static parse(e,r){if(e.length!==2)return r.error(`\'semiliteral\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ei(e[1]))return r.error(`invalid value of type "${typeof e[1]}"`);let i=e[1],n=_t(i);if(n.kind==="array"){let a=i.map(s=>r.parse(s,null,Z));return new Jp(a)}return new ri(n,i)}evaluate(e){return this.arr.map(r=>r.evaluate(e))}eachChild(e){this.arr.forEach(e)}outputDefined(){return this.arr.every(e=>e.outputDefined())}},Fl=class Qp{constructor(e){this.key=e,this.type=Z}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=e[1];return i==null?r.error("Global state property must be defined."):typeof i=="string"?new Qp(i):r.error(`Global state property must be string, but found ${typeof e[1]} instead.`)}evaluate(e){var i,n;let r=(i=e.globals)==null?void 0:i.globalState;return!r||Object.keys(r).length===0?null:(n=ji(r,this.key))!=null?n:null}eachChild(){}outputDefined(){return!1}},Yr={"==":b0,"!=":w0,">":_0,"<":D0,">=":S0,"<=":A0,array:Ie,at:i0,boolean:Ie,case:o0,coalesce:Rp,collator:Up,format:Ep,image:F0,in:n0,"index-of":a0,interpolate:be,"interpolate-hcl":be,"interpolate-lab":be,length:k0,let:Cp,literal:ri,match:s0,number:Ie,"number-format":E0,object:Ie,semiliteral:K0,slice:l0,step:vl,string:Ie,"to-boolean":jr,"to-color":jr,"to-number":jr,"to-string":jr,var:Bp,within:Dl,distance:El,"global-state":Fl},ve=class extends Error{constructor(t,e){super(e),this.message=e,this.key=t}},J0=class tf{constructor(e,r=[]){this.parent=e,this.bindings={};for(let[i,n]of r)this.bindings[i]=n}concat(e){return new tf(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}},ef=class rf{constructor(e,r,i=[],n,a=new J0,s=[]){this.registry=e,this.path=i,this.key=i.map(o=>`[${o}]`).join(""),this.scope=a,this.errors=s,this.expectedType=n,this._isConstant=r}parse(e,r,i,n,a={}){return r?this.concat(r,i,n)._parse(e,a):this._parse(e,a)}_parse(e,r){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);let i=this.key;function n(a,s,o){return o==="assert"?new Ie(s,[a],i):o==="coerce"?new jr(s,[a],i):a}if(Array.isArray(e)){if(e.length===0)return this.error(\'Expected an array with at least one element. If you wanted a literal array, use ["literal", []].\');let a=e[0];if(typeof a!="string")return this.error(`Expression name must be a string, but found ${typeof a} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let s=this.registry[a];if(s){let o=s.parse(e,this);if(!o)return null;if(this.expectedType){let l=this.expectedType,u=o.type;if((l.kind==="string"||l.kind==="number"||l.kind==="boolean"||l.kind==="object"||l.kind==="array")&&u.kind==="value")o=n(o,l,r.typeAnnotation||"assert");else if(l.kind==="projectionDefinition"&&["string","array","value"].includes(u.kind)||["color","formatted","resolvedImage"].includes(l.kind)&&["value","string"].includes(u.kind)||["padding","numberArray"].includes(l.kind)&&["value","number","array"].includes(u.kind)||l.kind==="colorArray"&&["value","string","array"].includes(u.kind)||l.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(u.kind))o=n(o,l,r.typeAnnotation||"coerce");else if(this.checkSubtype(l,u))return null}if(!(o instanceof ri)&&o.type.kind!=="resolvedImage"&&this._isConstant(o)){let l=new Ap;try{o=new ri(o.type,o.evaluate(l))}catch(u){return this.error(u.message),null}}return o}return this.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0)}return e===void 0?this.error("\'undefined\' value invalid. Use null instead."):typeof e=="object"?this.error(\'Bare objects invalid. Use ["literal", {...}] instead.\'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,r,i){let n=typeof e=="number"?this.path.concat(e):this.path,a=i?this.scope.concat(i):this.scope;return new rf(this.registry,this._isConstant,n,r||null,a,this.errors)}error(e,...r){let i=`${this.key}${r.map(n=>`[${n}]`).join("")}`;this.errors.push(new ve(i,e))}checkSubtype(e,r){let i=tn(e,r);return i&&this.error(i),i}},_r=class Ri{constructor(e,r,i,n,a){this.name=e,this.type=r,this._evaluate=i,this.args=n,this.key=a}evaluate(e){return this._evaluate(e,this.args,this.key)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,r){let i=e[0],n=Ri.definitions[i];if(!n)return r.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(n)?n[0]:n.type,s=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=s.filter(([u])=>!Array.isArray(u)||u.length===e.length-1),l=null;for(let[u,h]of o){l=new ef(r.registry,ba,r.path,null,r.scope);let c=[],p=!1;for(let f=1;ftm(c)).join(" | "),h=[];for(let c=1;c>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}function sr(t){return{type:t}}_r.register(Yr,{error:[R1,[Y],(t,[e],r)=>{throw new ft(e.evaluate(t),r)}],typeof:[Y,[Z],(t,[e])=>yt(_t(e.evaluate(t)))],"to-rgba":[Ut(I,4),[ce],(t,[e])=>{let[r,i,n,a]=e.evaluate(t).rgb;return[r*255,i*255,n*255,a]}],rgb:[ce,[I,I,I],Eh],rgba:[ce,[I,I,I,I],Eh],has:{type:tt,overloads:[[[Y],(t,[e])=>Fh(e.evaluate(t),t.properties())],[[Y,fr],(t,[e,r])=>Fh(e.evaluate(t),r.evaluate(t))]]},get:{type:Z,overloads:[[[Y],(t,[e])=>Vs(e.evaluate(t),t.properties())],[[Y,fr],(t,[e,r])=>Vs(e.evaluate(t),r.evaluate(t))]]},"feature-state":[Z,[Y],(t,[e])=>Vs(e.evaluate(t),t.featureState||{})],properties:[fr,[],t=>t.properties()],"geometry-type":[Y,[],t=>t.geometryType()],id:[Z,[],t=>t.id()],zoom:[I,[],t=>t.globals.zoom],"heatmap-density":[I,[],t=>t.globals.heatmapDensity||0],elevation:[I,[],t=>t.globals.elevation||0],"line-progress":[I,[],t=>t.globals.lineProgress||0],accumulated:[Z,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[I,sr(I),(t,e)=>{let r=0;for(let i of e)r+=i.evaluate(t);return r}],"*":[I,sr(I),(t,e)=>{let r=1;for(let i of e)r*=i.evaluate(t);return r}],"-":{type:I,overloads:[[[I,I],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[I],(t,[e])=>-e.evaluate(t)]]},"/":[I,[I,I],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[I,[I,I],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[I,[],()=>Math.LN2],pi:[I,[],()=>Math.PI],e:[I,[],()=>Math.E],"^":[I,[I,I],(t,[e,r])=>e.evaluate(t)**+r.evaluate(t)],sqrt:[I,[I],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[I,[I],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[I,[I],(t,[e])=>Math.log(e.evaluate(t))],log2:[I,[I],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[I,[I],(t,[e])=>Math.sin(e.evaluate(t))],cos:[I,[I],(t,[e])=>Math.cos(e.evaluate(t))],tan:[I,[I],(t,[e])=>Math.tan(e.evaluate(t))],asin:[I,[I],(t,[e])=>Math.asin(e.evaluate(t))],acos:[I,[I],(t,[e])=>Math.acos(e.evaluate(t))],atan:[I,[I],(t,[e])=>Math.atan(e.evaluate(t))],min:[I,sr(I),(t,e)=>Math.min(...e.map(r=>r.evaluate(t)))],max:[I,sr(I),(t,e)=>Math.max(...e.map(r=>r.evaluate(t)))],abs:[I,[I],(t,[e])=>Math.abs(e.evaluate(t))],round:[I,[I],(t,[e])=>{let r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[I,[I],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[I,[I],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[tt,[Y,Z],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[tt,[Z],(t,[e])=>t.id()===e.value],"filter-type-==":[tt,[Y],(t,[e])=>t.geometryType()===e.value],"filter-<":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i{let r=t.id(),i=e.value;return typeof r==typeof i&&r":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r>i}],"filter-<=":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r<=i}],"filter->=":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r>=i}],"filter-has":[tt,[Z],(t,[e])=>{let r=e.value,i=t.properties();return r in i&&i[r]!==void 0}],"filter-has-id":[tt,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[tt,[Ut(Y)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[tt,[Ut(Z)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[tt,[Y,Ut(Z)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[tt,[Y,Ut(Z)],(t,[e,r])=>Q0(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:tt,overloads:[[[tt,tt],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[sr(tt),(t,e)=>{for(let r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:tt,overloads:[[[tt,tt],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[sr(tt),(t,e)=>{for(let r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[tt,[tt],(t,[e])=>!e.evaluate(t)],"is-supported-script":[tt,[Y],(t,[e])=>{let r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[Y,[Y],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Y,[Y],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Y,sr(Z),(t,e)=>e.map(r=>Gi(r.evaluate(t))).join("")],split:[Ut(Y),[Y,Y],(t,[e,r])=>e.evaluate(t).split(r.evaluate(t))],join:[Y,[Ut(Y),Y],(t,[e,r])=>e.evaluate(t).join(r.evaluate(t))],"resolved-locale":[Y,[Pa],(t,[e])=>e.evaluate(t).resolvedLocale()]});function tm(t){return Array.isArray(t)?`(${t.map(yt).join(", ")})`:`(${yt(t.type)}...)`}function ba(t){if(t instanceof Bp)return ba(t.boundExpression);if(t instanceof _r&&t.name==="error"||t instanceof Up||t instanceof Dl||t instanceof El||t instanceof Fl)return!1;let e=t instanceof jr||t instanceof Ie,r=!0;return t.eachChild(i=>{r&&(r=e?ba(i):i instanceof ri)}),r?Na(t)&&Ua(t,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function Na(t){if(t instanceof _r&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof Dl||t instanceof El)return!1;let e=!0;return t.eachChild(r=>{e&&!Na(r)&&(e=!1)}),e}function rn(t){if(t instanceof _r&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(r=>{e&&!rn(r)&&(e=!1)}),e}function Ua(t,e){if(t instanceof _r&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild(i=>{r&&!Ua(i,e)&&(r=!1)}),r}function ii(t){return t["property-type"]==="data-driven"||t["property-type"]==="cross-faded-data-driven"}function nf(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function kl(t){return!!t.expression&&t.expression.interpolated}var Tl=/^(.*)-transition$/;function nn(t,...e){for(let r of e)for(let i in r)t[i]=r[i];return t}function Q(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}function qa(t){return typeof t=="object"&&!!t&&!Array.isArray(t)&&_t(t)===fr}function em(t){return t}function rm(t){switch(t.type){case"color":return gt.parse;case"padding":return Ae.parse;case"numberArray":return Se.parse;case"colorArray":return oe.parse;default:return null}}function im(t){switch(t){case"exponential":return sf;case"interval":return am;case"categorical":return nm;case"identity":return sm;default:throw Error(`Unknown function type "${t}"`)}}function af(t,e){let r=t.stops&&typeof t.stops[0][0]=="object",i=r||t.property!==void 0,n=r||!i,a=t.type||(kl(e)?"exponential":"interval"),s=rm(e);if(s&&(t=nn({},t),t.stops&&(t.stops=t.stops.map(h=>[h[0],s(h[1])])),t.default?t.default=s(t.default):t.default=s(e.default)),t.colorSpace&&!Z1(t.colorSpace))throw Error(`Unknown color space: "${t.colorSpace}"`);let o=im(a),l,u;if(a==="categorical"){l=Object.create(null);for(let h of t.stops)l[h[0]]=h[1];u=typeof t.stops[0][0]}if(r){let h={},c=[];for(let d=0;dd[0]),evaluate({zoom:d},y){return sf({stops:p,base:t.base},e,d).evaluate(d,y)}}}if(n){let h=a==="exponential"?{name:"exponential",base:t.base===void 0?1:t.base}:null;return{kind:"camera",interpolationType:h,interpolationFactor:be.interpolationFactor.bind(void 0,h),zoomStops:t.stops.map(c=>c[0]),evaluate:({zoom:c})=>o(t,e,c,l,u)}}return{kind:"source",evaluate(h,c){let p=c&&c.properties?c.properties[t.property]:void 0;return p===void 0?xn(t.default,e.default):o(t,e,p,l,u)}}}function xn(t,e,r){if(t!==void 0)return t;if(e!==void 0)return e;if(r!==void 0)return r}function nm(t,e,r,i,n){return xn(typeof r===n?i[r]:void 0,t.default,e.default)}function am(t,e,r){if(Q(r)!=="number")return xn(t.default,e.default);let i=t.stops.length;if(i===1||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];let n=Oa(t.stops.map(a=>a[0]),r,"");return t.stops[n][1]}function sf(t,e,r){let i=t.base===void 0?1:t.base;if(Q(r)!=="number")return xn(t.default,e.default);let n=t.stops.length;if(n===1||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];let a=Oa(t.stops.map(h=>h[0]),r,""),s=om(r,i,t.stops[a][0],t.stops[a+1][0]),o=t.stops[a][1],l=t.stops[a+1][1],u=gr[e.type]||em;return typeof o.evaluate=="function"?{evaluate(...h){let c=o.evaluate.apply(void 0,h),p=l.evaluate.apply(void 0,h);if(c!==void 0&&p!==void 0)return u(c,p,s,t.colorSpace)}}:u(o,l,s,t.colorSpace)}function sm(t,e,r){switch(e.type){case"color":r=gt.parse(r);break;case"formatted":r=ze.fromString(r.toString());break;case"resolvedImage":r=_e.fromString(r.toString());break;case"padding":r=Ae.parse(r);break;case"colorArray":r=oe.parse(r);break;case"numberArray":r=Se.parse(r);break;default:Q(r)!==e.type&&(e.type!=="enum"||!e.values[r])&&(r=void 0)}return xn(r,t.default,e.default)}function om(t,e,r,i){let n=i-r,a=t-r;return n===0?0:e===1?a/n:(e**+a-1)/(e**+n-1)}function so(t){return{result:"success",value:t}}function Nr(t){return{result:"error",value:t}}var Il=class{constructor(t,e,r,i){this.expression=t,this._warningHistory={},this._evaluator=new Ap,this._defaultValue=r?pf(r):null,this._enumValues=r&&r.type==="enum"?r.values:null,this._globalState=i,this._rootKey=e}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(t,e,r,i,n,a){this._globalState&&(t=ni(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a||null;try{let s=this.expression.evaluate(this._evaluator);if(s==null||typeof s=="number"&&s!==s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new ft(`Expected value to be one of ${Object.keys(this._enumValues).map(o=>JSON.stringify(o)).join(", ")}, but found ${JSON.stringify(s)} instead.`,"");return s}catch(s){let o=s instanceof ft?s.path:"",l=`${o}|${s.message}`;return this._warningHistory[l]||(this._warningHistory[l]=!0,typeof console<"u"&&console.warn(of(this._rootKey,o,s.message,this._defaultValue))),this._defaultValue}}};function of(t,e,r,i){return`${t}${e}: ${r}${i==null?"":` Falling back to ${String(i)}.`}`}function lf(t){if(!t)throw Error(\'rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".\')}function ja(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Yr}function er(t,e,r,i){lf(e);let n=new ef(Yr,ba,[],r?hm(r):void 0),a=n.parse(t,void 0,void 0,void 0,r&&r.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?so(new Il(a,e,r,i)):Nr(n.errors)}var an=class{constructor(t,e,r){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!rn(e.expression),this.globalStateRefs=vn(e.expression),this._globalState=r}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,a)}evaluate(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluate(t,e,r,i,n,a)}},wa=class{constructor(t,e,r,i,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!rn(e.expression),this.globalStateRefs=vn(e.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,a)}evaluate(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluate(t,e,r,i,n,a)}interpolationFactor(t,e,r){return this.interpolationType?be.interpolationFactor(this.interpolationType,t,e,r):0}};function lm(t){return t._styleExpression!==void 0}function uf(t,e,r,i){let n=er(t,e,r,i);if(n.result==="error")return n;let a=n.value.expression,s=Na(a);if(!s&&!ii(r))return Nr([new ve("","data expressions not supported")]);let o=Ua(a,["zoom"]);if(!o&&!nf(r))return Nr([new ve("","zoom expressions not supported")]);let l=pa(a);if(!l&&!o)return Nr([new ve("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\')]);if(l instanceof ve)return Nr([l]);if(l instanceof be&&!kl(r))return Nr([new ve("",\'"interpolate" expressions cannot be used with this property\')]);if(!l)return so(s?new an("constant",n.value,i):new an("source",n.value,i));let u=l instanceof be?l.interpolation:void 0;return so(s?new wa("camera",n.value,l.labels,u,i):new wa("composite",n.value,l.labels,u,i))}var hf=class cf{constructor(e,r,i){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,lf(r),this._parameters=e,this._specification=i,this._rootKey=r,this._defaultValue=pf(i),this._warningHistory={};let n=af(this._parameters,this._specification);this.kind=n.kind,this.interpolationFactor=n.interpolationFactor,this.zoomStops=n.zoomStops,this.interpolationType=n.interpolationType,this._innerEvaluate=n.evaluate}evaluate(e,r){try{return this._innerEvaluate(e,r)}catch(i){let n=i instanceof Error?i.message:String(i),a=`|${n}`;return this._warningHistory[a]||(this._warningHistory[a]=!0,typeof console<"u"&&console.warn(of(this._rootKey,"",n,this._defaultValue))),this._defaultValue}}static deserialize(e){return new cf(e._parameters,e._rootKey,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification,_rootKey:e._rootKey}}};function um(t,e,r,i){if(qa(t))return new hf(t,e,r);if(ja(t)){let n=uf(t,e,r,i);if(n.result==="error")throw Error(n.value.map(a=>`${a.key}: ${a.message}`).join(", "));return n.value}{let n=t;return r.type==="color"&&typeof t=="string"?n=gt.parse(t):r.type==="padding"&&(typeof t=="number"||Array.isArray(t))?n=Ae.parse(t):r.type==="numberArray"&&(typeof t=="number"||Array.isArray(t))?n=Se.parse(t):r.type==="colorArray"&&(typeof t=="string"||Array.isArray(t))?n=oe.parse(t):r.type==="variableAnchorOffsetCollection"&&Array.isArray(t)?n=De.parse(t):r.type==="projectionDefinition"&&typeof t=="string"&&(n=Dr.parse(t)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>n}}}function pa(t){let e=null;if(t instanceof Cp)e=pa(t.result);else if(t instanceof Rp){for(let r of t.args)if(e=pa(r),e)break}else(t instanceof vl||t instanceof be)&&t.input instanceof _r&&t.input.name==="zoom"&&(e=t);return e instanceof ve||t.eachChild(r=>{let i=pa(r);i instanceof ve?e=i:!e&&i?e=new ve("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\'):e&&i&&e!==i&&(e=new ve("",\'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.\'))}),e}function vn(t,e=new Set){return t instanceof Fl&&e.add(t.key),t.eachChild(r=>{vn(r,e)}),e}function hm(t){let e={color:ce,string:Y,number:I,enum:Y,boolean:tt,formatted:yn,padding:za,numberArray:La,colorArray:Qi,projectionDefinition:Ba,resolvedImage:mn,variableAnchorOffsetCollection:Va};return t.type==="array"?Ut(e[t.value]||Z,t.length):e[t.type]}function pf(t){if(t.type==="color"&&qa(t.default))return new gt(0,0,0,0);switch(t.type){case"color":return gt.parse(t.default)||null;case"padding":return Ae.parse(t.default)||null;case"numberArray":return Se.parse(t.default)||null;case"colorArray":return oe.parse(t.default)||null;case"variableAnchorOffsetCollection":return De.parse(t.default)||null;case"projectionDefinition":return Dr.parse(t.default)||null;default:return t.default===void 0?null:t.default}}function ni(t,e){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:s,accumulated:o}=t!=null?t:{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:s,accumulated:o,globalState:e}}function cm(t){let e=!1;for(let r of t){let i=ff(r);if(i==="expression")return"expression";i==="legacy"&&(e=!0)}return e?"legacy":"neutral"}function ff(t){if(typeof t=="boolean")return"neutral";if(!Array.isArray(t)||t.length===0)return"legacy";switch(t[0]){case"has":return t.length<2||t[1]==="$id"||t[1]==="$type"?"legacy":t.length===2?"neutral":"expression";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return cm(t.slice(1));default:return"expression"}}function Cl(t){return ff(t)!=="legacy"}function kh(t){return t==="$type"?["geometry-type"]:t==="$id"?["id"]:["get",t]}function pm(t){switch(t[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return t.length!==3||typeof t[1]!="string"?null:[t[0],kh(t[1]),t[2]];case"in":case"!in":{if(t.length<2||typeof t[1]!="string")return null;let e=["in",kh(t[1]),["literal",t.slice(2)]];return t[0]==="!in"?["!",e]:e}case"has":case"!has":{if(t.length!==2||typeof t[1]!="string"||t[1]==="$type"||t[1]==="$id")return null;let e=["has",t[1]];return t[0]==="!has"?["!",e]:e}default:return null}}function df(t){if((t[0]==="<"||t[0]==="<="||t[0]===">"||t[0]===">=")&&t[1]==="$type")return`"$type" cannot be use with operator "${t[0]}"`;let e=pm(t);return e?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(t)} with ${JSON.stringify(e)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(t)} to expression syntax.`}function Os(t,e,r){let i=r[t];return Array.isArray(i)?Cl(i)?Ml(i,e.concat(t)):{path:e.concat(t),legacyFilter:i}:null}function Ml(t,e=[]){if(!Array.isArray(t)||t.length<1)return null;switch(t[0]){case"all":case"any":case"none":for(let r=1;r"u")return;let i=r.path.map(n=>`[${n}]`).join("");console.warn(`${e}${i}: ${df(r.legacyFilter)}`)}var dm={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ai(t,e,r){if(t==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Cl(t)?fm(t,e):t=Da(t);let i=er(t,e,dm,r);if(i.result==="error")throw Error(i.value.map(n=>`${n.key}: ${n.message}`).join(", "));return{filter:(n,a,s)=>i.value.evaluate(n,a,{},s),needGeometry:yf(t),getGlobalStateRefs:()=>vn(i.value.expression)}}function ym(t,e){return te)}function yf(t){if(!Array.isArray(t))return!1;if(t[0]==="within"||t[0]==="distance")return!0;for(let e=1;e"||e==="<="||e===">="?Rs(t[1],t[2],e):e==="any"?mm(t.slice(1)):e==="all"?["all"].concat(t.slice(1).map(Da)):e==="none"?["all"].concat(t.slice(1).map(Da).map(Xn)):e==="in"?Th(t[1],t.slice(2)):e==="!in"?Xn(Th(t[1],t.slice(2))):e==="has"?Ih(t[1]):e!=="!has"||Xn(Ih(t[1]))}function Rs(t,e,r){switch(t){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,t,e]}}function mm(t){return["any"].concat(t.map(Da))}function Th(t,e){if(e.length===0)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",t,["literal",e.sort(ym)]]:["filter-in-small",t,["literal",e]]}}function Ih(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Xn(t){return["!",t]}function mf(t){let e=t.key,r=t.value;return r?[new E(e,r,"constants have been deprecated as of v8")]:[]}function Dt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function xr(t){if(Array.isArray(t))return t.map(xr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){let e={};for(let r in t)e[r]=xr(t[r]);return e}return Dt(t)}function te(t){let e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},a=t.style,s=t.styleSpec,o=t.validateSpec,l=[],u=Q(r);if(u!=="object")return[new E(e,r,`object expected, ${u} found`)];for(let h in r){let c=h.split(".")[0],p=ji(i,c)||i["*"],f;if(ji(n,c))f=n[c];else if(ji(i,c)){if(r[h]===void 0)continue;f=o}else if(n["*"])f=n["*"];else if(i["*"])f=o;else{l.push(new E(e,r[h],`unknown property "${h}"`));continue}l=l.concat(f({key:(e&&`${e}.`)+h,value:r[h],valueSpec:p,style:a,styleSpec:s,object:r,objectKey:h,validateSpec:o},r))}for(let h in i)n[h]||i[h].required&&i[h].default===void 0&&r[h]===void 0&&l.push(new E(e,r,`missing required property "${h}"`));return l}function Bl(t){let e=t.value,r=t.valueSpec,i=t.validateSpec,n=t.style,a=t.styleSpec,s=t.key,o=t.arrayElementValidator||i;if(Q(e)!=="array")return[new E(s,e,`array expected, ${Q(e)} found`)];if(r.length&&e.length!==r.length)return[new E(s,e,`array length ${r.length} expected, length ${e.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),Q(r.value)==="object"&&(l=r.value);let u=[];for(let h=0;hi.maximum?[new E(e,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]:[new E(e,r,`number expected, ${n} found`)]}function gf(t){let e=t.valueSpec,r=Dt(t.value.type),i,n={},a,s,o=r!=="categorical"&&t.value.property===void 0,l=!o,u=Q(t.value.stops)==="array"&&Q(t.value.stops[0])==="array"&&Q(t.value.stops[0][0])==="object",h=te({key:t.key,value:t.value,valueSpec:t.styleSpec.function,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:c,default:d}});return r==="identity"&&o&&h.push(new E(t.key,t.value,\'missing required property "property"\')),r!=="identity"&&!t.value.stops&&h.push(new E(t.key,t.value,\'missing required property "stops"\')),r==="exponential"&&t.valueSpec.expression&&!kl(t.valueSpec)&&h.push(new E(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ii(t.valueSpec)?h.push(new E(t.key,t.value,"property functions not supported")):o&&!nf(t.valueSpec)&&h.push(new E(t.key,t.value,"zoom functions not supported"))),(r==="categorical"||u)&&t.value.property===void 0&&h.push(new E(t.key,t.value,\'"property" property is required\')),h;function c(y){if(r==="identity")return[new E(y.key,y.value,\'identity function may not have a "stops" property\')];let m=[],g=y.value;return m=m.concat(Bl({key:y.key,value:g,valueSpec:y.valueSpec,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec,arrayElementValidator:p})),Q(g)==="array"&&g.length===0&&m.push(new E(y.key,g,"array must have at least one stop")),m}function p(y){let m=[],g=y.value,x=y.key;if(Q(g)!=="array")return[new E(x,g,`array expected, ${Q(g)} found`)];if(g.length!==2)return[new E(x,g,`array length 2 expected, length ${g.length} found`)];if(u){if(Q(g[0])!=="object")return[new E(x,g,`object expected, ${Q(g[0])} found`)];if(g[0].zoom===void 0)return[new E(x,g,"object stop key must have zoom")];if(g[0].value===void 0)return[new E(x,g,"object stop key must have value")];if(s&&s>Dt(g[0].zoom))return[new E(x,g[0].zoom,"stop zoom values must appear in ascending order")];Dt(g[0].zoom)!==s&&(s=Dt(g[0].zoom),a=void 0,n={}),m=m.concat(te({key:`${x}[0]`,value:g[0],valueSpec:{zoom:{}},validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{zoom:Ga,value:f}}))}else m=m.concat(f({key:`${x}[0]`,value:g[0],valueSpec:{},validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec},g));return ja(xr(g[1]))?m.concat([new E(`${x}[1]`,g[1],"expressions are not allowed in function stops.")]):m.concat(y.validateSpec({key:`${x}[1]`,value:g[1],valueSpec:e,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec}))}function f(y,m){let g=Q(y.value),x=Dt(y.value),v=y.value===null?m:y.value;if(!i)i=g;else if(g!==i)return[new E(y.key,v,`${g} stop domain type must match previous stop domain type ${i}`)];if(g!=="number"&&g!=="string"&&g!=="boolean")return[new E(y.key,v,"stop domain value must be a number, string, or boolean")];if(g!=="number"&&r!=="categorical"){let b=`number expected, ${g} found`;return ii(e)&&r===void 0&&(b+=\'\\nIf you intended to use a categorical function, specify `"type": "categorical"`.\'),[new E(y.key,v,b)]}return r==="categorical"&&g==="number"&&(!isFinite(x)||Math.floor(x)!==x)?[new E(y.key,v,`integer expected, found ${x}`)]:r!=="categorical"&&g==="number"&&a!==void 0&&xnew E(`${t.key}${i.key}`,t.value,i.message));let r=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!r.outputDefined())return[new E(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!rn(r))return[new E(t.key,t.value,\'"feature-state" data expressions are not supported with layout properties.\')];if(t.expressionContext==="filter"&&!rn(r))return[new E(t.key,t.value,\'"feature-state" data expressions are not supported with filters.\')];if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!Ua(r,["zoom","feature-state"]))return[new E(t.key,t.value,\'"zoom" and "feature-state" expressions are not supported with cluster properties.\')];if(t.expressionContext==="cluster-initial"&&!Na(r))return[new E(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function gm(t){let e=t.value,r=t.key,i=Q(e);return i==="boolean"?[]:[new E(r,e,`boolean expected, ${i} found`)]}function oo(t){let e=t.key,r=t.value,i=Q(r);return i==="string"?gt.parse(String(r))?[]:[new E(e,r,`color expected, "${r}" found`)]:[new E(e,r,`color expected, ${i} found`)]}function sn(t){let e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?i.values.indexOf(Dt(r))===-1&&n.push(new E(e,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(i.values).indexOf(Dt(r))===-1&&n.push(new E(e,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function xm(t,e){let r=t;for(let i of e)r=r[i];return r}function vm(t,e){let r=Ml(e);return r?[new E(`${t.key}${r.path.map(i=>`[${i}]`).join("")}`,xm(t.value,r.path),df(r.legacyFilter),null,"warning")]:[]}function Pl(t){let e=xr(t.value);return Cl(e)?[...vm(t,e),...si(nn({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:xf(t)}function xf(t){let e=t.value,r=t.key;if(Q(e)!=="array")return[new E(r,e,`array expected, ${Q(e)} found`)];let i=t.styleSpec,n,a=[];if(e.length<1)return[new E(r,e,"filter array must have at least 1 element")];switch(a=a.concat(sn({key:`${r}[0]`,value:e[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),Dt(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Dt(e[1])==="$type"&&a.push(new E(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&a.push(new E(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(n=Q(e[1]),n!=="string"&&a.push(new E(`${r}[1]`,e[1],`string expected, ${n} found`)));for(let s=2;s{c in r&&e.push(new E(i,r[c],`"${c}" is prohibited for ref layers`))});let h;n.layers.forEach(c=>{Dt(c.id)===o&&(h=c)}),h?h.ref?e.push(new E(i,r.ref,"ref cannot reference another ref layer")):s=Dt(h.type):e.push(new E(i,r.ref,`ref layer "${o}" not found`))}else if(s!=="background")if(!r.source)e.push(new E(i,r,\'missing required property "source"\'));else{let h=n.sources&&n.sources[r.source],c=h&&Dt(h.type);h?c==="vector"&&s==="raster"?e.push(new E(i,r.source,`layer "${r.id}" requires a raster source`)):c!=="raster-dem"&&s==="hillshade"||c!=="raster-dem"&&s==="color-relief"?e.push(new E(i,r.source,`layer "${r.id}" requires a raster-dem source`)):c==="raster"&&s!=="raster"?e.push(new E(i,r.source,`layer "${r.id}" requires a vector source`)):c==="vector"&&!r["source-layer"]?e.push(new E(i,r,`layer "${r.id}" must specify a "source-layer"`)):c==="raster-dem"&&s!=="hillshade"&&s!=="color-relief"?e.push(new E(i,r.source,"raster-dem source can only be used with layer type \'hillshade\' or \'color-relief\'.")):s==="line"&&r.paint&&r.paint["line-gradient"]&&(c!=="geojson"||!h.lineMetrics)&&e.push(new E(i,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`)):e.push(new E(i,r.source,`source "${r.source}" not found`))}return s==="raster"&&((l=r.paint)!=null&&l.resampling)&&((u=r.paint)!=null&&u["raster-resampling"])&&e.push(new E(i,r.paint,`layer "${r.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),e=e.concat(te({key:i,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*"(){return[]},type(){return t.validateSpec({key:`${i}.type`,value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,object:r,objectKey:"type"})},filter:Pl,layout(h){return te({layer:r,key:h.key,value:h.value,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*"(c){return wf(nn({layerType:s},c))}}})},paint(h){return te({layer:r,key:h.key,value:h.value,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*"(c){return bf(nn({layerType:s},c))}}})}}})),e}function tr(t){let e=t.value,r=t.key,i=Q(e);return i==="string"?[]:[new E(r,e,`string expected, ${i} found`)]}function bm(t){var c;let e=(c=t.sourceName)!=null?c:"",r=t.value,i=t.styleSpec,n=i.source_raster_dem,a=t.style,s=[],o=Q(r);if(r===void 0)return s;if(o!=="object")return s.push(new E("source_raster_dem",r,`object expected, ${o} found`)),s;let l=Dt(r.encoding)==="custom",u=["redFactor","greenFactor","blueFactor","baseShift"],h=t.value.encoding?`"${t.value.encoding}"`:"Default";for(let p in r)!l&&u.includes(p)?s.push(new E(p,r[p],`In "${e}": "${p}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):n[p]?s=s.concat(t.validateSpec({key:p,value:r[p],valueSpec:n[p],validateSpec:t.validateSpec,style:a,styleSpec:i})):s.push(new E(p,r[p],`unknown property "${p}"`));return s}var Ch={promoteId:wm};function _f(t){let e=t.value,r=t.key,i=t.styleSpec,n=t.style,a=t.validateSpec;if(!e.type)return[new E(r,e,\'"type" is required\')];let s=Dt(e.type),o;switch(s){case"vector":case"raster":return o=te({key:r,value:e,valueSpec:i[`source_${s.replace("-","_")}`],style:t.style,styleSpec:i,objectElementValidators:Ch,validateSpec:a}),o;case"raster-dem":return o=bm({sourceName:r,value:e,style:t.style,styleSpec:i,validateSpec:a}),o;case"geojson":if(o=te({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:Ch}),e.cluster)for(let l in e.clusterProperties){let[u,h]=e.clusterProperties[l],c=typeof u=="string"?[u,["accumulated"],["get",l]]:u;o.push(...si({key:`${r}.${l}.map`,value:h,validateSpec:a,expressionContext:"cluster-map"})),o.push(...si({key:`${r}.${l}.reduce`,value:c,validateSpec:a,expressionContext:"cluster-reduce"}))}return o;case"video":return te({key:r,value:e,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return te({key:r,value:e,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new E(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return sn({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,validateSpec:a,styleSpec:i})}}function wm({key:t,value:e}){if(Q(e)==="string")return tr({key:t,value:e});{let r=[];for(let i in e)r.push(...tr({key:`${t}.${i}`,value:e[i]}));return r}}function Af(t){let e=t.value,r=t.styleSpec,i=r.light,n=t.style,a=[],s=Q(e);if(e===void 0)return a;if(s!=="object")return a=a.concat([new E("light",e,`object expected, ${s} found`)]),a;for(let o in e){let l=o.match(Tl);a=l&&i[l[1]]&&i[l[1]].transition?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:r.transition,validateSpec:t.validateSpec,style:n,styleSpec:r})):i[o]?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],validateSpec:t.validateSpec,style:n,styleSpec:r})):a.concat([new E(o,e[o],`unknown property "${o}"`)])}return a}function Sf(t){let e=t.value,r=t.styleSpec,i=r.sky,n=t.style,a=Q(e);if(e===void 0)return[];if(a!=="object")return[new E("sky",e,`object expected, ${a} found`)];let s=[];for(let o in e){let l=o.match(Tl);s=l&&i[l[1]]&&i[l[1]].transition?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:r.transition,style:n,styleSpec:r})):i[o]?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],style:n,styleSpec:r})):s.concat([new E(o,e[o],`unknown property "${o}"`)])}return s}function Ef(t){let e=t.value,r=t.styleSpec,i=r.terrain,n=t.style,a=[],s=Q(e);if(e===void 0)return a;if(s!=="object")return a=a.concat([new E("terrain",e,`object expected, ${s} found`)]),a;for(let o in e)a=i[o]?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],validateSpec:t.validateSpec,style:n,styleSpec:r})):a.concat([new E(o,e[o],`unknown property "${o}"`)]);return a}function Dm(t){return tr(t).length===0?[]:si(t)}function _m(t){return tr(t).length===0?[]:si(t)}function Am(t){let e=t.key,r=t.value;if(Q(r)==="array"){if(r.length<1||r.length>4)return[new E(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a[new E(t,e,\'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"\')],n=r.match(Mm);if(!n)return i();let[,a,s,o]=n;if(o!==void 0)return o.length>6?i():[];let l=parseInt(a,16),u=s===void 0?l:parseInt(s,16);return l>Mh||u>Mh?[new E(t,e,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:l>u?[new E(t,e,`unicode range start must not be greater than its end, but ${r} is`)]:[]}function Tf(t){var o,l;let e=(o=t.key)!=null?o:"font-faces",r=t.value,i=t.validateSpec,n=(l=t.styleSpec)!=null?l:pp,a=t.style;if(!lo(r))return[new E(e,r,`object expected, ${Q(r)} found`)];let s=[];for(let u in r){let h=r[u],c=Q(h);if(c==="string")s.push(...tr({key:`${e}.${u}`,value:h}));else if(c==="array"){let p={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[f,d]of h.entries()){let y=`${e}.${u}[${f}]`;s.push(...te({key:y,value:d,valueSpec:p,styleSpec:n,style:a,validateSpec:i}));let m=lo(d)?d["unicode-range"]:void 0;if(Q(m)==="array")for(let[g,x]of m.entries())s.push(...Bm(`${y}.unicode-range[${g}]`,x))}}else s.push(new E(`${e}.${u}`,h,`string or array expected, ${c} found`))}return s}var Bh={"*"(){return[]},array:Bl,boolean:gm,number:Ga,color:oo,constants:mf,enum:sn,filter:Pl,function:gf,layer:Df,object:te,source:_f,light:Af,sky:Sf,terrain:Ef,projection:km,projectionDefinition:Tm,string:tr,formatted:Dm,resolvedImage:_m,padding:Am,numberArray:Sm,colorArray:Em,variableAnchorOffsetCollection:Fm,sprite:Ff,state:kf,fontFaces:Tf};function Xi(t){let e=t.value,r=t.valueSpec,i=t.styleSpec;return t.validateSpec=Xi,r.expression&&qa(Dt(e))?gf(t):r.expression&&ja(xr(e))?si(t):r.type&&Bh[r.type]?Bh[r.type](t):te(nn({},t,{valueSpec:r.type?i[r.type]:r}))}function If(t){let e=t.value,r=t.key,i=tr(t);return i.length||(e.indexOf("{fontstack}")===-1&&i.push(new E(r,e,\'"glyphs" url must include a "{fontstack}" token\')),e.indexOf("{range}")===-1&&i.push(new E(r,e,\'"glyphs" url must include a "{range}" token\'))),i}function Qt(t,e=w){let r=[];return r=r.concat(Xi({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,validateSpec:Xi,objectElementValidators:{glyphs:If,"*"(){return[]}}})),t.constants&&(r=r.concat(mf({key:"constants",value:t.constants,style:t,styleSpec:e,validateSpec:Xi}))),Cf(r)}Qt.source=ie(re(_f)),Qt.sprite=ie(re(Ff)),Qt.glyphs=ie(re(If)),Qt.fontFaces=ie(re(Tf)),Qt.light=ie(re(Af)),Qt.sky=ie(re(Sf)),Qt.terrain=ie(re(Ef)),Qt.state=ie(re(kf)),Qt.layer=ie(re(Df)),Qt.filter=ie(re(Pl)),Qt.paintProperty=ie(re(bf)),Qt.layoutProperty=ie(re(wf));function re(t){return function(e){return t(Object.assign({},e,{validateSpec:Xi}))}}function Cf(t){return[].concat(t).sort((e,r)=>e.line-r.line)}function ie(t){return function(...e){return Cf(t.apply(this,e))}}var Pm={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"},zm=class{constructor(t,e,r){this._rootKey=e,this._globalState=r,this.setValue(t)}evaluate(){var t;return(t=this._literalValue)!=null?t:this._compiledValue.evaluate({})}setValue(t){if(t==null||t==="visible"||t==="none"){this._literalValue=t==="none"?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let e=er(t,this._rootKey,Pm,this._globalState);if(e.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));this._literalValue=void 0,this._compiledValue=e.value,this._globalStateRefs=vn(e.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}};function Lm(t,e,r){return new zm(t,e,r)}var Ph=Qt,y5=new Set(Object.keys(w).filter(t=>t.startsWith("source_")).map(t=>t.slice(7).replaceAll("_","-")));function Vm(t,e){let r=!1;for(let i of e){if(i.severity==="warning"){Bt(i.message);continue}t.fire(new ma(Error(i.message))),r=!0}return r}function Om(t,e,r,i){return(i==null?void 0:i.validate)!==!1&&Vm(t,e(je({styleSpec:w},r)))}var uo=class Mf{constructor(e,r,i){let n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let s=new Int32Array(this.arrayBuffer);e=s[0],r=s[1],i=s[2],this.d=r+2*i;for(let u=0;u=c[f+0]&&n>=c[f+1])?(o[p]=!0,s.push(h[p])):o[p]=!1}}}_forEachCell(e,r,i,n,a,s,o,l){let u=this._convertToCellCoord(e),h=this._convertToCellCoord(r),c=this._convertToCellCoord(i),p=this._convertToCellCoord(n);for(let f=u;f<=c;f++)for(let d=h;d<=p;d++){let y=this.d*d+f;if((!l||l(this._convertFromCellCoord(f),this._convertFromCellCoord(d),this._convertFromCellCoord(f+1),this._convertFromCellCoord(d+1)))&&a.call(this,e,r,i,n,y,s,o,l))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,r=3+this.cells.length+1+1,i=0;for(let s of this.cells)i+=s.length;let n=new Int32Array(r+i+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;let a=r;for(let s=0;sr?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}}},$m="-transition",Xa=class{constructor(t,e,r,i){this.property=t,this.value=e,this.expression=um(e===void 0?t.specification.default:e,r,t.specification,i)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)}},ho=class{constructor(t,e,r){this.property=t,this.value=new Xa(t,void 0,e,r)}transitioned(t,e){return new Lh(this.property,this.value,e,Gt({},t.transition,this.transition),t.now)}untransitioned(){return new Lh(this.property,this.value,null,{},0)}},Nm=class{constructor(t,e,r){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=r,this._rootKey=e}_propertyRootKey(t){return`${this._rootKey}.${String(t)}`}hasProperty(t){return t in this._properties.defaultTransitionablePropertyValues}getValue(t){return He(this._values[t].value.value)}setValue(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new ho(this._values[t].property,this._propertyRootKey(t),this._globalState)),this._values[t].value=new Xa(this._values[t].property,e===null?void 0:He(e),this._propertyRootKey(t),this._globalState)}getTransition(t){return He(this._values[t].transition)}setTransition(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new ho(this._values[t].property,this._propertyRootKey(t),this._globalState)),this._values[t].transition=He(e)||void 0}serialize(){let t={};for(let e of Object.keys(this._values)){let r=this.getValue(e);r!==void 0&&(t[e]=r);let i=this.getTransition(e);i!==void 0&&(t[`${e}${$m}`]=i)}return t}transitioned(t,e){let r=new Vh(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(t,e._values[i]);return r}untransitioned(){let t=new Vh(this._properties);for(let e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}},Lh=class{constructor(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(t,e,r){let i=t.now||0,n=this.value.possiblyEvaluate(t,e,r),a=this.prior;if(!a)return n;if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(ii.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}},Lf=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e,r,i){if(t.value!==void 0){if(t.expression.kind==="constant"){let n=t.expression.evaluate(e,null,{},r,i);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new st(Math.floor(e.zoom-1),e)),t.expression.evaluate(new st(Math.floor(e.zoom),e)),t.expression.evaluate(new st(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}},Wa=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e,r,i){return!!t.expression.evaluate(e,null,{},r,i)}interpolate(){return!1}},Xt=class{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let e in t){let r=t[e];r.specification.overridable&&this.overridableProperties.push(e);let i=this.defaultPropertyValues[e]=new Xa(r,void 0,r.name,void 0),n=this.defaultTransitionablePropertyValues[e]=new ho(r,r.name,void 0);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}}};C("DataDrivenProperty",N),C("DataConstantProperty",V),C("CrossFadedDataDrivenProperty",on),C("CrossFadedProperty",Lf),C("ColorRampProperty",Wa);var Rh=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",$s=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?",de=class extends O1{constructor(t,e,r){if(super(),this.id=t.id,this.type=t.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=Lm(this.visibility,`layers[${this.id}].layout.visibility`,r),t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=ai(t.filter,`layers[${this.id}].filter`,r)),e.layout&&(this._unevaluatedLayout=new Um(e.layout,`layers[${this.id}].layout`,r)),e.paint)){this._transitionablePaint=new Nm(e.paint,`layers[${this.id}].paint`,r);for(let i in t.paint)this.setPaintProperty(i,t.paint[i],{validate:!1});for(let i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ya(e.paint)}}setFilter(t){this.filter=t,this._featureFilter=ai(t,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){var e;if(t==="visibility")return this.visibility;if((e=this._transitionablePaint)!=null&&e.hasProperty(t))throw Error(t+Rh);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${t}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){let t=new Set;for(let e of this._visibilityExpression.getGlobalStateRefs())t.add(e);if(this._unevaluatedLayout)for(let e in this._unevaluatedLayout._values){let r=this._unevaluatedLayout._values[e];for(let i of r.getGlobalStateRefs())t.add(i)}for(let e of this._featureFilter.getGlobalStateRefs())t.add(e);return t}getPaintAffectingGlobalStateRefs(){var e;let t=new globalThis.Map;if(this._transitionablePaint)for(let r in this._transitionablePaint._values){let i=this._transitionablePaint._values[r].value;for(let n of i.getGlobalStateRefs()){let a=(e=t.get(n))!=null?e:[];a.push({name:r,value:i.value}),t.set(n,a)}}return t}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(t,e,r={}){var i;if(t==="visibility"){this.visibility=e,this._visibilityExpression.setValue(e),this.recalculateVisibility();return}if((i=this._transitionablePaint)!=null&&i.hasProperty(t)){this.fire(new ma(Error(t+Rh)));return}e!=null&&this._validate(Ph.layoutProperty,`layers.${this.id}.layout.${t}`,t,e,r)||this._unevaluatedLayout.setValue(t,e)}getPaintProperty(t){var e,r;if(t.endsWith("-transition")){let i=t.slice(0,-11);if(i==="visibility"||(e=this._unevaluatedLayout)!=null&&e.hasProperty(i))throw Error(t+$s);return this._transitionablePaint.getTransition(i)}if(t==="visibility"||(r=this._unevaluatedLayout)!=null&&r.hasProperty(t))throw Error(t+$s);return this._transitionablePaint.getValue(t)}setPaintProperty(t,e,r={}){var i;if(t==="visibility"||(i=this._unevaluatedLayout)!=null&&i.hasProperty(t))return this.fire(new ma(Error(t+$s))),!1;if(e!=null&&this._validate(Ph.paintProperty,`layers.${this.id}.paint.${t}`,t,e,r))return!1;if(t.endsWith("-transition"))return this._transitionablePaint.setTransition(t.slice(0,-11),e||void 0),!1;{let n=this._transitionablePaint._values[t],a=n.property.specification["property-type"]==="cross-faded-data-driven",s=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);let l=this._transitionablePaint._values[t].value;return l.isDataDriven()||s||a||this._handleOverridablePaintPropertyUpdate(t,o,l)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,e,r){return!1}isHidden(t=this.minzoom,e=!1){return this.minzoom&&t<(e?Math.floor(this.minzoom):this.minzoom)||this.maxzoom&&t>=this.maxzoom?!0:this._evaluatedVisibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}serialize(){var e,r;let t={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:(e=this._unevaluatedLayout)==null?void 0:e.serialize(),paint:(r=this._transitionablePaint)==null?void 0:r.serialize()};return this.visibility&&(t.layout||(t.layout={}),t.layout.visibility=this.visibility),T1(t,(i,n)=>i!==void 0&&!(n==="layout"&&!Object.keys(i).length)&&!(n==="paint"&&!Object.keys(i).length))}_validate(t,e,r,i,n={}){return Om(this,t,{key:e,layerType:this.type,objectKey:r,value:i},n)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let t in this.paint._values){let e=this.paint.get(t);if(e instanceof se&&ii(e.property.specification)&&(e.value.kind==="source"||e.value.kind==="composite")&&e.value.isStateDependent)return!0}return!1}},qm,jm=()=>qm||(qm=new Xt({"raster-opacity":new V(w.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new V(w.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new V(w.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new V(w.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new V(w.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new V(w.paint_raster["raster-contrast"],"raster-contrast"),resampling:new V(w.paint_raster.resampling,"resampling"),"raster-resampling":new V(w.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new V(w.paint_raster["raster-fade-duration"],"raster-fade-duration")})),Gm={get paint(){return jm()}};var Xm=class extends de{constructor(t,e){super(t,Gm,e)}},Ym={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bn=class{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},xt=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){let e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_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(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*5),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}};function At(t,e=1){let r=0,i=0;return{members:t.map(n=>{let a=Wm(n.type),s=r=$h(r,Math.max(e,a)),o=n.components||1;return i=Math.max(i,a),r+=a*o,{name:n.name,type:n.type,components:o,offset:s}}),size:$h(r,Math.max(i,e)),alignment:e}}function Wm(t){return Ym[t].BYTES_PER_ELEMENT}function $h(t,e){return Math.ceil(t/e)*e}var ln=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.int16[i+0]=e,this.int16[i+1]=r,t}};ln.prototype.bytesPerElement=4,C("StructArrayLayout2i4",ln);var co=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.int16[n+0]=e,this.int16[n+1]=r,this.int16[n+2]=i,t}};co.prototype.bytesPerElement=6,C("StructArrayLayout3i6",co);var Nh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)}emplace(t,e,r,i,n){let a=t*4;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,t}};Nh.prototype.bytesPerElement=8,C("StructArrayLayout4i8",Nh);var po=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*6;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,this.int16[o+4]=a,this.int16[o+5]=s,t}};po.prototype.bytesPerElement=12,C("StructArrayLayout2i4i12",po);var fo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*4,l=t*8;return this.int16[o+0]=e,this.int16[o+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=a,this.uint8[l+7]=s,t}};fo.prototype.bytesPerElement=8,C("StructArrayLayout2i4ub8",fo);var un=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.float32[i+0]=e,this.float32[i+1]=r,t}};un.prototype.bytesPerElement=8,C("StructArrayLayout2f8",un);var yo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u){let h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,i,n,a,s,o,l,u)}emplace(t,e,r,i,n,a,s,o,l,u,h){let c=t*10;return this.uint16[c+0]=e,this.uint16[c+1]=r,this.uint16[c+2]=i,this.uint16[c+3]=n,this.uint16[c+4]=a,this.uint16[c+5]=s,this.uint16[c+6]=o,this.uint16[c+7]=l,this.uint16[c+8]=u,this.uint16[c+9]=h,t}};yo.prototype.bytesPerElement=20,C("StructArrayLayout10ui20",yo);var mo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o){let l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,i,n,a,s,o)}emplace(t,e,r,i,n,a,s,o,l){let u=t*8;return this.uint16[u+0]=e,this.uint16[u+1]=r,this.uint16[u+2]=i,this.uint16[u+3]=n,this.uint16[u+4]=a,this.uint16[u+5]=s,this.uint16[u+6]=o,this.uint16[u+7]=l,t}};mo.prototype.bytesPerElement=16,C("StructArrayLayout8ui16",mo);var go=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u,h,c,p){let f=this.length;return this.resize(f+1),this.emplace(f,t,e,r,i,n,a,s,o,l,u,h,c,p)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f){let d=t*14,y=t*7;return this.int16[d+0]=e,this.int16[d+1]=r,this.int16[d+2]=i,this.int16[d+3]=n,this.uint16[d+4]=a,this.uint16[d+5]=s,this.uint16[d+6]=o,this.uint16[d+7]=l,this.int16[d+8]=u,this.int16[d+9]=h,this.int16[d+10]=c,this.int16[d+11]=p,this.float32[y+6]=f,t}};go.prototype.bytesPerElement=28,C("StructArrayLayout4i4ui4i1f28",go);var xo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.float32[n+0]=e,this.float32[n+1]=r,this.float32[n+2]=i,t}};xo.prototype.bytesPerElement=12,C("StructArrayLayout3f12",xo);var vo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.uint32[r+0]=e,t}};vo.prototype.bytesPerElement=4,C("StructArrayLayout1ul4",vo);var bo=class extends xt{_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(t,e,r,i,n,a,s,o,l){let u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,a,s,o,l)}emplace(t,e,r,i,n,a,s,o,l,u){let h=t*10,c=t*5;return this.int16[h+0]=e,this.int16[h+1]=r,this.int16[h+2]=i,this.int16[h+3]=n,this.int16[h+4]=a,this.int16[h+5]=s,this.uint32[c+3]=o,this.uint16[h+8]=l,this.uint16[h+9]=u,t}};bo.prototype.bytesPerElement=20,C("StructArrayLayout6i1ul2ui20",bo);var wo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*6;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,this.int16[o+4]=a,this.int16[o+5]=s,t}};wo.prototype.bytesPerElement=12,C("StructArrayLayout2i2i2i12",wo);var Uh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n){let a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n)}emplace(t,e,r,i,n,a){let s=t*4,o=t*8;return this.float32[s+0]=e,this.float32[s+1]=r,this.float32[s+2]=i,this.int16[o+6]=n,this.int16[o+7]=a,t}};Uh.prototype.bytesPerElement=16,C("StructArrayLayout2f1f2i16",Uh);var Do=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*16,l=t*4,u=t*8;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[u+6]=a,this.int16[u+7]=s,t}};Do.prototype.bytesPerElement=16,C("StructArrayLayout2ub2f2i16",Do);var _o=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.uint16[n+0]=e,this.uint16[n+1]=r,this.uint16[n+2]=i,t}};_o.prototype.bytesPerElement=6,C("StructArrayLayout3ui6",_o);var Ao=class extends xt{_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(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g){let x=this.length;return this.resize(x+1),this.emplace(x,t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x){let v=t*26,b=t*13,D=t*52;return this.int16[v+0]=e,this.int16[v+1]=r,this.uint16[v+2]=i,this.uint16[v+3]=n,this.uint32[b+2]=a,this.uint32[b+3]=s,this.uint32[b+4]=o,this.uint16[v+10]=l,this.uint16[v+11]=u,this.uint16[v+12]=h,this.float32[b+7]=c,this.float32[b+8]=p,this.uint8[D+36]=f,this.uint8[D+37]=d,this.uint8[D+38]=y,this.uint32[b+10]=m,this.int16[v+22]=g,this.float32[b+12]=x,t}};Ao.prototype.bytesPerElement=52,C("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",Ao);var So=class extends xt{_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(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P){let L=this.length;return this.resize(L+1),this.emplace(L,t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P,L){let F=t*34,$=t*17;return this.int16[F+0]=e,this.int16[F+1]=r,this.int16[F+2]=i,this.int16[F+3]=n,this.int16[F+4]=a,this.int16[F+5]=s,this.int16[F+6]=o,this.int16[F+7]=l,this.uint16[F+8]=u,this.uint16[F+9]=h,this.uint16[F+10]=c,this.uint16[F+11]=p,this.uint16[F+12]=f,this.uint16[F+13]=d,this.uint16[F+14]=y,this.uint16[F+15]=m,this.uint16[F+16]=g,this.uint16[F+17]=x,this.uint16[F+18]=v,this.uint16[F+19]=b,this.uint16[F+20]=D,this.uint16[F+21]=A,this.uint16[F+22]=_,this.uint32[$+12]=S,this.float32[$+13]=k,this.float32[$+14]=z,this.uint16[F+30]=O,this.uint16[F+31]=P,this.float32[$+16]=L,t}};So.prototype.bytesPerElement=68,C("StructArrayLayout8i15ui1ul2f2ui1f68",So);var _a=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.float32[r+0]=e,t}};_a.prototype.bytesPerElement=4,C("StructArrayLayout1f4",_a);var Eo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*6,a=t*3;return this.uint16[n+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,t}};Eo.prototype.bytesPerElement=12,C("StructArrayLayout1ui2f12",Eo);var Fo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*2,a=t*4;return this.uint32[n+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=i,t}};Fo.prototype.bytesPerElement=8,C("StructArrayLayout1ul2ui8",Fo);var ko=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.uint16[i+0]=e,this.uint16[i+1]=r,t}};ko.prototype.bytesPerElement=4,C("StructArrayLayout2ui4",ko);var qh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.uint16[r+0]=e,t}};qh.prototype.bytesPerElement=2,C("StructArrayLayout1ui2",qh);var To=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)}emplace(t,e,r,i,n){let a=t*4;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,t}};To.prototype.bytesPerElement=16,C("StructArrayLayout4f16",To);var Vf=class extends bn{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 B(this.anchorPointX,this.anchorPointY)}};Vf.prototype.size=20;var Ll=class extends bo{get(t){return new Vf(this,t)}};C("CollisionBoxArray",Ll);var Of=class extends bn{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(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}};Of.prototype.size=52;var Rf=class extends Ao{get(t){return new Of(this,t)}};C("PlacedSymbolArray",Rf);var $f=class extends bn{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(t){this._structArray.uint32[this._pos4+12]=t}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]}get heightOffset(){return this._structArray.float32[this._pos4+16]}};$f.prototype.size=68;var Nf=class extends So{get(t){return new $f(this,t)}};C("SymbolInstanceArray",Nf);var Uf=class extends _a{getoffsetX(t){return this.float32[t*1+0]}};C("GlyphOffsetArray",Uf);var qf=class extends co{getx(t){return this.int16[t*3+0]}gety(t){return this.int16[t*3+1]}gettileUnitDistanceFromAnchor(t){return this.int16[t*3+2]}};C("SymbolLineVertexArray",qf);var jf=class extends bn{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]}};jf.prototype.size=12;var Gf=class extends Eo{get(t){return new jf(this,t)}};C("TextAnchorOffsetArray",Gf);var Xf=class extends bn{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]}};Xf.prototype.size=8;var Yf=class extends Fo{get(t){return new Xf(this,t)}};C("FeatureIndexArray",Yf);var Zm=class extends ln{};var Hm=class extends ln{},Km=class extends ln{},Jm=class extends po{},Qm=class extends fo{},tg=class extends un{},Vr=class extends yo{},jh=class extends mo{},eg=class extends go{},rg=class extends xo{},ig=class extends vo{},Gh=class extends wo{};var ng=class extends Do{};var wn=class extends _o{},Io=class extends ko{};var Co=At([{name:"a_pos",components:2,type:"Int16"}],4),ag=Co.members;Co.size,Co.alignment;var ee=class Ur{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,r,i,n){let a=this.segments[this.segments.length-1];return e>Ur.MAX_VERTEX_ARRAY_LENGTH&&Bt(`Max vertices per segment is ${Ur.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \\`fillLargeMeshArrays\\` function if you require meshes with more than ${Ur.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+e>Ur.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n?this.createNewSegment(r,i,n):a}createNewSegment(e,r,i){let n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return i!==void 0&&(n.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(e,r,i){return this.prepareSegment(0,e,r,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let r in e.vaos)e.vaos[r].destroy()}static simpleSegment(e,r,i,n){return new Ur([{vertexOffset:e,primitiveOffset:r,vertexLength:i,primitiveLength:n,vaos:{},sortKey:0}])}};ee.MAX_VERTEX_ARRAY_LENGTH=2**16-1,C("SegmentVector",ee);function Xh(t,e){return t=Ji(Math.floor(t),0,255),e=Ji(Math.floor(e),0,255),256*t+e}var sg=At([{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"}]),og=At([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]),lg=fl(((t,e)=>{function r(i,n){for(var a=i.length&3,s=i.length-a,o=n,l,u=3432918353,h=461845907,c,p=0;p>>16)*u&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(c&65535)*h+(((c>>>16)*h&65535)<<16)&4294967295,o^=c,o=o<<13|o>>>19,l=(o&65535)*5+(((o>>>16)*5&65535)<<16)&4294967295,o=(l&65535)+27492+(((l>>>16)+58964&65535)<<16);switch(c=0,a){case 3:c^=(i.charCodeAt(p+2)&255)<<16;case 2:c^=(i.charCodeAt(p+1)&255)<<8;case 1:c^=i.charCodeAt(p)&255,c=(c&65535)*u+(((c>>>16)*u&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(c&65535)*h+(((c>>>16)*h&65535)<<16)&4294967295,o^=c}return o^=i.length,o^=o>>>16,o=(o&65535)*2246822507+(((o>>>16)*2246822507&65535)<<16)&4294967295,o^=o>>>13,o=(o&65535)*3266489909+(((o>>>16)*3266489909&65535)<<16)&4294967295,o^=o>>>16,o>>>0}e!==void 0&&(e.exports=r)})),ug=fl(((t,e)=>{function r(i,n){for(var a=i.length,s=n^a,o=0,l;a>=4;)l=i.charCodeAt(o)&255|(i.charCodeAt(++o)&255)<<8|(i.charCodeAt(++o)&255)<<16|(i.charCodeAt(++o)&255)<<24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),l^=l>>>24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)^l,a-=4,++o;switch(a){case 3:s^=(i.charCodeAt(o+2)&255)<<16;case 2:s^=(i.charCodeAt(o+1)&255)<<8;case 1:s^=i.charCodeAt(o)&255,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)}return s^=s>>>13,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>15,s>>>0}e.exports=r})),Mo=h1(fl(((t,e)=>{var r=lg(),i=ug();e.exports=r,e.exports.murmur3=r,e.exports.murmur2=i}))(),1),Wf=class Zf{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,r,i,n){this.ids.push(Yh(e)),this.positions.push(r,i,n)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let r=Yh(e),i=0,n=this.ids.length-1;for(;i>1;this.ids[s]>=r?n=s:i=s+1}let a=[];for(;this.ids[i]===r;){let s=this.positions[3*i],o=this.positions[3*i+1],l=this.positions[3*i+2];a.push({index:s,start:o,end:l}),i++}return a}static serialize(e,r){let i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Bo(i,n,0,i.length-1),r&&r.push(i.buffer,n.buffer),{ids:i,positions:n}}static deserialize(e){let r=new Zf;return r.ids=e.ids,r.positions=e.positions,r.indexed=!0,r}};function Yh(t){let e=+t;return!isNaN(e)&&e<=2**53-1?e:(0,Mo.default)(String(t))}function Bo(t,e,r,i){for(;r>1],a=r-1,s=i+1;for(;;){do a++;while(t[a]n);if(a>=s)break;Yn(t,a,s),Yn(e,3*a,3*s),Yn(e,3*a+1,3*s+1),Yn(e,3*a+2,3*s+2)}s-r`u_${i}`),this.type=r}setUniform(t,e,r){t.set(r.constantOr(this.value))}getBinding(t,e,r){return this.type==="color"?new cg(t,e):new Ol(t,e)}},ur=class{constructor(t,e){this.uniformNames=e.map(r=>`u_${r}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr}setConstantDashPositions(t,e){this.dashTo=[0,t.y,t.height,t.width],this.dashFrom=[0,e.y,e.height,e.width]}setUniform(t,e,r,i){let n=null;i==="u_pattern_to"?n=this.patternTo:i==="u_pattern_from"?n=this.patternFrom:i==="u_dasharray_to"?n=this.dashTo:i==="u_dasharray_from"?n=this.dashFrom:i==="u_pixel_ratio_to"?n=this.pixelRatioTo:i==="u_pixel_ratio_from"&&(n=this.pixelRatioFrom),n!==null&&t.set(n)}getBinding(t,e,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new hg(t,e):new Ol(t,e)}},ke=class{constructor(t,e,r,i){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map(n=>({name:`a_${n}`,type:"Float32",components:r==="color"?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(t,e,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new st(0,r),e,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(i,t,n)}updatePaintArray(t,e,r,i,n){let a=this.expression.evaluate(new st(0,n),r,i);this._setPaintValue(t,e,a)}_setPaintValue(t,e,r){if(this.type==="color"){let i=Po(r);for(let n=t;n`u_${s}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=e.map(s=>({name:`a_${s}`,type:"Float32",components:r==="color"?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(t,e,r){let i=this.expression.evaluate(new st(this.zoom,r),e,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new st(this.zoom+1,r),e,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(a,t,i,n)}updatePaintArray(t,e,r,i,n){let a=this.expression.evaluate(new st(this.zoom,n),r,i),s=this.expression.evaluate(new st(this.zoom+1,n),r,i);this._setPaintValue(t,e,a,s)}_setPaintValue(t,e,r,i){if(this.type==="color"){let n=Po(r),a=Po(i);for(let s=t;s`#define HAS_UNIFORM_${i}`))}return t}getBinderAttributes(){let t=[];for(let e in this.binders){let r=this.binders[e];if(r instanceof ke||r instanceof he)for(let i of r.paintVertexAttributes)t.push(i.name);else if(r instanceof Ye){let i=r.getVertexAttributes();for(let n of i)t.push(n.name)}}return t}getBinderUniforms(){let t=[];for(let e in this.binders){let r=this.binders[e];if(r instanceof $i||r instanceof ur||r instanceof he)for(let i of r.uniformNames)t.push(i)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,e){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof $i||n instanceof ur||n instanceof he){for(let a of n.uniformNames)if(e[a]){let s=n.getBinding(t,e[a],a);r.push({name:a,property:i,binding:s})}}}return r}setUniforms(t,e,r,i){for(let{name:n,property:a,binding:s}of e)this.binders[a].setUniform(s,i,r.get(a),n)}updatePaintBuffers(t){this._buffers=[];for(let e in this.binders){let r=this.binders[e];if(t&&r instanceof Ye){let i=t.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;i&&this._buffers.push(i)}else(r instanceof ke||r instanceof he)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(t){for(let e in this.binders){let r=this.binders[e];(r instanceof ke||r instanceof he||r instanceof Ye)&&r.upload(t)}this.updatePaintBuffers()}destroy(){for(let t in this.binders){let e=this.binders[t];(e instanceof ke||e instanceof he||e instanceof Ye)&&e.destroy()}}},vr=class{constructor(t,e,r=()=>!0){this.programConfigurations={};for(let i of t)this.programConfigurations[i.id]=new Jf(i,e,r);this.needsUpload=!1,this._featureMap=new Wf,this._bufferOffset=0}populatePaintArrays(t,e,r,i){for(let n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e,i);e.id!==void 0&&this._featureMap.add(e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(t,this._featureMap,e,n,i)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(let e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(let t in this.programConfigurations)this.programConfigurations[t].destroy()}};function pg(t,e){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-dasharray":["dasharray_to","dasharray_from"],"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"]}[t]||[t.replace(`${e}-`,"").replace(/-/g,"_")]}function fg(t){return{"line-pattern":{source:Vr,composite:Vr},"fill-pattern":{source:Vr,composite:Vr},"fill-extrusion-pattern":{source:Vr,composite:Vr},"line-dasharray":{source:jh,composite:jh}}[t]}function Wh(t,e,r){var n;let i={color:{source:un,composite:To},number:{source:_a,composite:un}};return((n=fg(t))==null?void 0:n[r])||i[e][r]}C("ConstantBinder",$i),C("CrossFadedConstantBinder",ur),C("SourceExpressionBinder",ke),C("CrossFadedPatternBinder",Hf),C("CrossFadedDasharrayBinder",Kf),C("CompositeExpressionBinder",he),C("ProgramConfiguration",Jf,{omit:["_buffers"]}),C("ProgramConfigurationSet",vr);var zo=2**14-1,Zh=-zo-1;function Ar(t){let e=mt/t.extent,r=t.loadGeometry();for(let i of r)for(let n of i){let a=Math.round(n.x*e),s=Math.round(n.y*e);n.x=Ji(a,Zh,zo),n.y=Ji(s,Zh,zo),(an.x+1||sn.y+1)&&Bt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function hi(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Ar(t):[]}}var Hh=-32768;function dg(t,e,r,i,n){t.emplaceBack(Hh+e*8+i,Hh+r*8+n)}var Rl=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Hm,this.indexArray=new wn,this.segments=new ee,this.programConfigurations=new vr(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){let i=this.layers[0],n=[],a=null,s=!1,o=i.type==="heatmap";if(i.type==="circle"){let c=i;a=c.layout.get("circle-sort-key"),s=!a.isConstant(),o||(o=c.paint.get("circle-pitch-alignment")==="map")}let l=o?e.subdivisionGranularity.circle:1,u=new st(this.zoom),h=this.layers[0]._featureFilter.needGeometry;for(let{feature:c,id:p,index:f,sourceLayerIndex:d}of t){let y=hi(c,h);if(!this.layers[0]._featureFilter.filter(u,y,r))continue;let m=s?a.evaluate(y,{},r):void 0,g={id:p,properties:c.properties,type:c.type,sourceLayerIndex:d,index:f,geometry:h?y.geometry:Ar(c),patterns:{},sortKey:m};n.push(g)}s&&n.sort((c,p)=>c.sortKey-p.sortKey);for(let c of n){let{geometry:p,index:f,sourceLayerIndex:d}=c,y=t[f].feature;this.addFeature(c,p,f,r,l),e.featureIndex.insert(y,p,f,d,this.index)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}addFeatures(t){}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ag),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,r,i,n=1){let a;switch(n){case 1:a=[0,7];break;case 3:a=[0,2,5,7];break;case 5:a=[0,1,3,4,6,7];break;case 7:a=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${n}; valid values are 1, 3, 5, 7.`)}let s=a.length;for(let o of e)for(let l of o){let u=l.x,h=l.y;if(u<0||u>=8192||h<0||h>=8192)continue;let c=this.segments.prepareSegment(s*s,this.layoutVertexArray,this.indexArray,t.sortKey),p=c.vertexLength;for(let f=0;f=3){for(let n of i)if(oi(t,n))return!0}if(gg(t,i,r))return!0}return!1}function gg(t,e,r){if(t.length>1){if($l(t,e))return!0;for(let i of e)if(Lo(i,t,r))return!0}for(let i of t)if(Lo(i,e,r))return!0;return!1}function $l(t,e){if(t.length===0||e.length===0)return!1;for(let r=0;r1?t.distSqr(r):t.distSqr(r.sub(e)._mult(n)._add(e))}function Kh(t,e){let r=!1,i,n,a;for(let s of t){i=s;for(let o=0,l=i.length-1;oe.y!=a.y>e.y&&e.x<(a.x-n.x)*(e.y-n.y)/(a.y-n.y)+n.x&&(r=!r)}return r}function oi(t,e){let r=!1;for(let i=0,n=t.length-1;ie.y!=s.y>e.y&&e.x<(s.x-a.x)*(e.y-a.y)/(s.y-a.y)+a.x&&(r=!r)}return r}function vg(t,e,r,i,n){for(let s of t)if(e<=s.x&&r<=s.y&&i>=s.x&&n>=s.y)return!0;let a=[new B(e,r),new B(e,n),new B(i,n),new B(i,r)];if(t.length>2){for(let s of a)if(oi(t,s))return!0}for(let s=0;sn.x&&e.x>n.x||t.yn.y&&e.y>n.y)return!1;let a=Ke(t,e,r[0]);return a!==Ke(t,e,r[1])||a!==Ke(t,e,r[2])||a!==Ke(t,e,r[3])}function Wr(t,e,r){let i=e.paint.get(t).value;return i.kind==="constant"?i.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Ha(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ka(t,e,r,i,n){if(!e[0]&&!e[1])return t;let a=B.convert(e)._mult(n);r==="viewport"&&a._rotate(-i);let s=[];for(let o of t)s.push(o.sub(a));return s}function wg(t){let e=[];for(let r=0;rNl(n,e,r,i))}var kg,Tg=()=>kg||(kg=new Xt({"circle-sort-key":new N(w.layout_circle["circle-sort-key"],"circle-sort-key")})),Ig,Cg=()=>Ig||(Ig=new Xt({"circle-radius":new N(w.paint_circle["circle-radius"],"circle-radius"),"circle-color":new N(w.paint_circle["circle-color"],"circle-color"),"circle-blur":new N(w.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new N(w.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new V(w.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new V(w.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new V(w.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new V(w.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new N(w.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new N(w.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new N(w.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})),Mg={get paint(){return Cg()},get layout(){return Tg()}};var Bg=class extends de{constructor(t,e){super(t,Mg,e)}createBucket(t){return new Rl(t)}queryRadius(t){let e=t;return Wr("circle-radius",this,e)+Wr("circle-stroke-width",this,e)+Ha(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:s,getElevation:o}){let l=Ka(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),h=this.paint.get("circle-pitch-scale"),c=this.paint.get("circle-pitch-alignment"),p,f;return c==="map"?(p=l,f=u*a):(p=Fg(l,n,s,o),f=u),ed({queryGeometry:p,size:f,transform:n,unwrappedTileID:s,getElevation:o,pitchAlignment:c,pitchScale:h},i)}},rd=class extends Rl{};C("HeatmapBucket",rd,{omit:["layers"]});var Pg,zg=()=>Pg||(Pg=new Xt({"heatmap-radius":new N(w.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new N(w.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new V(w.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new Wa(w.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new V(w.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})),Lg={get paint(){return zg()}};function Ul(t,{width:e,height:r},i,n){if(!n)n=new Uint8Array(e*r*i);else if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==e*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${e*r*i}`);return t.width=e,t.height=r,t.data=n,t}function id(t,{width:e,height:r},i){if(e===t.width&&r===t.height)return;let n=Ul({},{width:e,height:r},i);ql(t,n,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,e),height:Math.min(t.height,r)},i),t.width=e,t.height=r,t.data=n.data}function ql(t,e,r,i,n,a){if(n.width===0||n.height===0)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw RangeError("out of range destination coordinates for image copy");let s=t.data,o=e.data;if(s===o)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l{e[t.evaluationKey]=l;let u=t.expression.evaluate(e);n.setPixel(s/4/r,o/4,u)};if(t.clips)for(let s=0,o=0;s$g||($g=new Xt({"hillshade-illumination-direction":new V(w.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new V(w.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new V(w.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new V(w.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new V(w.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new V(w.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new V(w.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new V(w.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new V(w.paint_hillshade.resampling,"resampling")})),Ug={get paint(){return Ng()}};var qg=class extends de{constructor(t,e){super(t,Ug,e),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,e=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,i=this.paint.get("hillshade-shadow-color").values,n=Math.max(t.length,e.length,r.length,i.length);t=t.concat(Array(n-t.length).fill(t.at(-1))),e=e.concat(Array(n-e.length).fill(e.at(-1))),r=r.concat(Array(n-r.length).fill(r.at(-1))),i=i.concat(Array(n-i.length).fill(i.at(-1)));let a=e.map(ch);return{directionRadians:t.map(ch),altitudeRadians:a,shadowColor:i,highlightColor:r}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}},jg,Gg=()=>jg||(jg=new Xt({"color-relief-opacity":new V(w["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new Wa(w["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new V(w["paint_color-relief"].resampling,"resampling")})),Xg={get paint(){return Gg()}};function Wn(t){return"data"in t}var Jh=class{constructor(t,e,r,i){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this._ownedHandle=this.texture,this.update(e,i)}update(t,e,r){var u;let{width:i,height:n}=t,a=(((u=this.size)==null?void 0:u[0])!==i||this.size[1]!==n)&&!r,{context:s}=this,{gl:o}=s;this.useMipmap=!!(e!=null&&e.useMipmap),a&&this.size&&this.format===o.RGBA&&(o.deleteTexture(this.texture),this.texture=o.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),o.bindTexture(o.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1);let l=this.format===o.RGBA&&(e==null?void 0:e.premultiply)!==!1;if(a)if(this.size=[i,n],this.format===o.RGBA&&i>0&&n>0){let h=this.useMipmap?Math.floor(Math.log2(Math.max(i,n)))+1:1;if(o.texStorage2D(o.TEXTURE_2D,h,o.RGBA8,i,n),Wn(t)){s.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:c}=t;l&&c&&(c=Ns(c)),c&&o.texSubImage2D(o.TEXTURE_2D,0,0,0,i,n,o.RGBA,o.UNSIGNED_BYTE,c)}else s.pixelStoreUnpackPremultiplyAlpha.set(l),o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,t)}else Wn(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(t,l,i,n,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._uploadDomImage(t,o));else{let{x:h,y:c}=r||{x:0,y:0};Wn(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(t,l,h,c,i,n,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._updateDomImage(t,h,c,o))}this.useMipmap&&!(Wn(t)&&t.data===null)&&o.generateMipmap(o.TEXTURE_2D),s.pixelStoreUnpackFlipY.setDefault(),s.pixelStoreUnpack.setDefault(),s.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(t,e){e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,e.UNSIGNED_BYTE,t)}_uploadRawData(t,e,r,i,n){let{data:a}=t;e&&a&&(a=Ns(a)),n.texImage2D(n.TEXTURE_2D,0,this.format,r,i,0,this.format,n.UNSIGNED_BYTE,a)}_updateDomImage(t,e,r,i){i.texSubImage2D(i.TEXTURE_2D,0,e,r,i.RGBA,i.UNSIGNED_BYTE,t)}_updateRawData(t,e,r,i,n,a,s){let{data:o}=t;e&&o&&(o=Ns(o)),s.texSubImage2D(s.TEXTURE_2D,0,r,i,n,a,s.RGBA,s.UNSIGNED_BYTE,o)}bind(t,e,r){let{context:i}=this,{gl:n}=i;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),n.bindTexture(n.TEXTURE_2D,this.texture),(r===n.LINEAR_MIPMAP_NEAREST||r===n.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(r=n.LINEAR);let a=r||t;t!==this.magFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),this.magFilter=t),a!==this.minFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,a),this.minFilter=a),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)}generateMipmap(){if(!this.useMipmap)return;let{gl:t}=this.context;t.bindTexture(t.TEXTURE_2D,this.texture),t.generateMipmap(t.TEXTURE_2D)}destroy(){let{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},Pe,jl=(Pe=class{constructor(e,r,i,n=1,a=1,s=1,o=0){if(this.uid=e,r.height!==r.width)throw RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i)){Bt(`"${i}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);return}this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),Pe.byteViewCache.set(this,new Uint8Array(this.data.buffer)),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=n,this.greenFactor=a,this.blueFactor=s,this.baseShift=o;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let h=-2;h=l)&&this.data.copyWithin(this._idx(0,h),c,c+l),this.data.fill(this.data[c],this._idx(-2,h),this._idx(0,h)),this.data.fill(this.data[c+l-1],this._idx(l,h),this._idx(l+1,h)+1)}let u=this._getByteView();this.min=2**53-1,this.max=-(2**53-1);for(let h=0;hthis.max&&(this.max=f),f=this.dim||n<-1||n>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);let a=this._getByteView(),s=((n+2)*this.stride+i+2)*4,o=this.stride*4,l=e-i,u=r-n,h=this._unpackAtIndex(a,s),c=this._unpackAtIndex(a,s+4),p=this._unpackAtIndex(a,s+o),f=this._unpackAtIndex(a,s+o+4);return h*(1-l)*(1-u)+c*l*(1-u)+p*(1-l)*u+f*l*u}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,r){if(e<-2||e>=this.dim+2||r<-2||r>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);return(r+2)*this.stride+(e+2)}unpack(e,r,i){return e*this.redFactor+r*this.greenFactor+i*this.blueFactor-this.baseShift}pack(e){return sd(e,this.getUnpackVector())}getPixels(){return new Zt({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(e,r,i){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let n=r*this.dim,a=r*this.dim+this.dim,s=i*this.dim,o=i*this.dim+this.dim;switch(r){case-1:n=a-2;break;case 1:a=n+2}switch(i){case-1:s=o-2;break;case 1:o=s+2}let l=-r*this.dim,u=-i*this.dim;for(let h=s;h80*r){o=t[0],l=t[1];let h=o,c=l;for(let p=r;ph&&(h=f),d>c&&(c=d)}u=Math.max(h-o,c-l),u=u===0?0:32767/u}return Ro(a,s,o,l,u),s}function od(t,e,r,i,n){let a=null;if(n===fx(t,e,r,i)>0)for(let s=e;s=e;s-=i)a=ec(s/i|0,t[s],t[s+1],a);return a&&cn(a,a.next)&&(fn(a),a=a.next),a}function br(t,e=t){let r=e===t,i=t,n;do n=!1,i!==i.next&&(hn.size===0||!hn.has(i))&&(cn(i,i.next)||Ft(i.prev,i,i.next)===0)?((r||i===e)&&(e=i.prev),Oo=!0,fn(i),i=i.prev,n=!0):(r||i!==e)&&(i=i.next,n=!r);while(n||i!==e);return e}function Ro(t,e,r,i,n){n&&ox(t,r,i,n);let a=t,s=!1;for(;t.prev!==t.next;){let o=t.prev,l=t.next;if(Ft(o,t,l)<0&&(n?Kg(t,r,i,n):Hg(t))){e.push(o.i,t.i,l.i),fn(t),t=l,a=l;continue}if(t=l,t===a){if(Oo=!1,t=br(t),Oo){a=t;continue}if(!s){t=Jg(t,e),a=t,s=!0;continue}Qg(t,e,r,i,n);break}}}function Hg(t){let e=t.prev,r=t,i=t.next,n=e.x,a=r.x,s=i.x,o=e.y,l=r.y,u=i.y,h=Math.min(n,a,s),c=Math.min(o,l,u),p=Math.max(n,a,s),f=Math.max(o,l,u),d=i.next;for(;d!==e;){if(d.x>=h&&d.x<=p&&d.y>=c&&d.y<=f&&(n!==d.x||o!==d.y)&&Ea(n,o,a,l,s,u,d.x,d.y)&&Ft(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function Kg(t,e,r,i){let n=t.prev,a=t,s=t.next,o=n.x,l=a.x,u=s.x,h=n.y,c=a.y,p=s.y,f=Math.min(o,l,u),d=Math.min(h,c,p),y=Math.max(o,l,u),m=Math.max(h,c,p),g=qo(f,d,e,r,i),x=qo(y,m,e,r,i),v=t.prevZ;for(;v&&v.z>=g;){if(v.x>=f&&v.x<=y&&v.y>=d&&v.y<=m&&v!==s&&(o!==v.x||h!==v.y)&&Ea(o,h,l,c,u,p,v.x,v.y)&&Ft(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let b=t.nextZ;for(;b&&b.z<=x;){if(b.x>=f&&b.x<=y&&b.y>=d&&b.y<=m&&b!==s&&(o!==b.x||h!==b.y)&&Ea(o,h,l,c,u,p,b.x,b.y)&&Ft(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Jg(t,e){let r=t,i=!1;do{let n=r.prev,a=r.next.next;ud(n,r,r.next,a,!1)&&pn(n,a)&&pn(a,n)&&(e.push(n.i,r.i,a.i),fn(r),fn(r.next),r=t=a,i=!0),r=r.next}while(r!==t);return i?br(r):r}function Qg(t,e,r,i,n){let a=t;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&hx(a,s)){let o=hd(a,s);a=br(a,a.next),o=br(o,o.next),Ro(a,e,r,i,n),Ro(o,e,r,i,n);return}s=s.next}a=a.next}while(a!==t)}var $o=!1;function tx(t,e,r,i){let n=[];for(let a=0,s=e.length;as&&(s=r.x),r.yo&&(o=r.y),h.xs&&(s=h.x),h.yo&&(o=h.y),r=h}while(++l<16&&r!==e);Uo[i]=r;let u=i*4;wt[u]=n,wt[u+1]=a,wt[u+2]=s,wt[u+3]=o}while(r!==e)}function nx(t,e){let r=t.z*4;e.xwt[r+2]&&(wt[r+2]=e.x),e.y>wt[r+3]&&(wt[r+3]=e.y)}function Qh(t){let e=Uo[t];for(;e.prev.next!==e;)e=e.next;return Uo[t]=e,e}function tc(t){let e=No[t];for(;e.prev.next!==e;)e=e.next;return No[t]=e,e}function ax(t,e){let r=e,i=t.x,n=t.y,a=-1/0,s;if(cn(t,r))return r;for(let p=0,f=0;pwt[f+3]||wt[f]>i||wt[f+2]<=a)continue;let d=Qh(p);r=tc(p);do{if(r.prev.next===r){if(cn(t,r.next))return r.next;if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){let y=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(y<=i&&y>a&&(a=y,s=r.xi||wt[f+3]h)continue;let d=Qh(p);r=tc(p);do{if(r.prev.next===r&&i>=r.x&&r.x>=o&&i!==r.x&&Ea(ni)&&(ys.x||r.x===s.x&&sx(s,r)))&&(s=r,c=y)}r=r.next}while(r!==d)}return s}function sx(t,e){return Ft(t.prev,t,e.prev)<0&&Ft(e.next,t,t.next)<0}var ae=[],Ti=[],or=new Uint32Array,Ii=new Uint32Array,Ci=new Uint32Array(256);function ox(t,e,r,i){let n=t,a=0;do n.z=qo(n.x,n.y,e,r,i),ae[a++]=n,n=n.next;while(n!==t);lx(a);let s=null;for(let o=0;o=0&&ae[n].z>i;)ae[n+1]=ae[n],n--;ae[n+1]=r}return}or.length>>a&255]++;let s=0;for(let o=0;o<256;o++){let l=Ci[o];Ci[o]=s,s+=l}for(let o=0;o>>a&255]++;i[u]=e[o],n[u]=l}}function qo(t,e,r,i,n){return t=(t-r)*n|0,e=(e-i)*n|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function ux(t){let e=t,r=t;do(e.x=(t-s)*(a-o)&&(t-s)*(i-o)>=(r-s)*(e-o)&&(r-s)*(a-o)>=(n-s)*(i-o)}function hx(t,e){let r=cn(t,e)&&Ft(t.prev,t,t.next)>0&&Ft(e.prev,e,e.next)>0;return t.next.i!==e.i&&(r||pn(t,e)&&pn(e,t)&&(Ft(t.prev,t,e.prev)!==0||Ft(t,e.prev,e)!==0))&&!cx(t,e)&&(r||px(t,e))}function Ft(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function cn(t,e){return t.x===e.x&&t.y===e.y}function ud(t,e,r,i,n=!0){let a=Ft(t,e,r),s=Ft(t,e,i),o=Ft(r,i,t),l=Ft(r,i,e);return(a>0&&s<0||a<0&&s>0)&&(o>0&&l<0||o<0&&l>0)?!0:n?!!(a===0&&Hn(t,r,e)||s===0&&Hn(t,i,e)||o===0&&Hn(r,t,i)||l===0&&Hn(r,e,i)):!1}function Hn(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function cx(t,e){let r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.y,e.y),s=t;do{let o=s.next;if(s.x>i&&o.x>i||s.xa&&o.y>a||s.y=0&&Ft(t,t.prev,e)>=0:Ft(t,e,t.prev)<0||Ft(t,t.next,e)<0}function px(t,e){let r=t,i=!1,n=(t.x+e.x)/2,a=(t.y+e.y)/2;do{let s=r.next;r.y>a!=s.y>a&&n<(s.x-r.x)*(a-r.y)/(s.y-r.y)+r.x&&(i=!i),r=s}while(r!==t);return i}function hd(t,e){let r=jo(t.i,t.x,t.y),i=jo(e.i,e.x,e.y),n=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function ec(t,e,r,i){let n=jo(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function fn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),$o&&nx(t.prev,t.next)}function jo(t,e,r){return{i:t,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function fx(t,e,r,i){let n=0;for(let a=e,s=r-i;at)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=e}getGranularityForZoomLevel(t){let e=1<32767||e>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=Math.round(t)|0,i=Math.round(e)|0,n=this._getKey(r,i);if(this._vertexDictionary.has(n))return this._vertexDictionary.get(n);let a=this._vertexBuffer.length/2;return this._vertexDictionary.set(n,a),this._vertexBuffer.push(r,i),a}_subdivideTrianglesScanline(t){if(this._granularity<2)return gx(this._vertexBuffer,t);let e=[],r=t.length;for(let i=0;i=1||b<=0)||m&&(ln)){h>=i&&h<=n&&a.push(r[(s+1)%3]);continue}if(!m&&v>0){let _=o+f*v,S=l+d*v;a.push(this._vertexToIndex(_,S))}let D=o+f*Math.max(v,0),A=o+f*Math.min(b,1);if(y||this._generateIntraEdgeVertices(a,o,l,u,h,D,A),!m&&b<1){let _=o+f*b,S=l+d*b;a.push(this._vertexToIndex(_,S))}(m||h>=i&&h<=n)&&a.push(r[(s+1)%3]),!m&&(h<=i||h>=n)&&this._generateInterEdgeVertices(a,o,l,u,h,c,p,A,i,n)}return a}_generateIntraEdgeVertices(t,e,r,i,n,a,s){let o=i-e,l=n-r,u=l===0,h=u?Math.min(e,i):Math.min(a,s),c=u?Math.max(e,i):Math.max(a,s),p=Math.floor(h/this._granularityCellSize)+1,f=Math.ceil(c/this._granularityCellSize)-1;if(u?e=p;d--){let y=d*this._granularityCellSize,m=r+l*(y-e)/o;t.push(this._vertexToIndex(y,m))}}_generateInterEdgeVertices(t,e,r,i,n,a,s,o,l,u){let h=n-r,c=a-i,p=s-n,f=(l-n)/p,d=(u-n)/p,y=Math.min(f,d),m=Math.max(f,d),g=i+c*y,x=Math.floor(Math.min(g,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(g,o)/this._granularityCellSize)-1,b=o=1||m<=0){let _=e-a,S=r-s,k=(l-s)/S,z=(u-s)/S,O=a+_*Math.min(k,z);x=Math.floor(Math.min(O,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(O,o)/this._granularityCellSize)-1,b=o0?u:l;if(b)for(let _=x;_<=v;_++){let S=_*this._granularityCellSize;t.push(this._vertexToIndex(S,A))}else for(let _=v;_>=x;_--){let S=_*this._granularityCellSize;t.push(this._vertexToIndex(S,A))}}_generateOutline(t){let e=[];for(let r of t){let i=cr(r,this._granularity,!0),n=this._pointArrayToIndices(i),a=[];for(let s=1;sn==(a===-32768)?(t.push(r),t.push(e),t.push(this._vertexToIndex(i,a)),t.push(this._vertexToIndex(n,a)),t.push(r),t.push(this._vertexToIndex(i,a))):(t.push(e),t.push(r),t.push(this._vertexToIndex(i,a)),t.push(r),t.push(this._vertexToIndex(n,a)),t.push(this._vertexToIndex(i,a)))}_fillPoles(t,e,r){let i=this._vertexBuffer,n=mt,a=t.length;for(let s=2;s=2&&((s=this._canonical)==null?void 0:s.z)===0&&(n=this._removeTrianglesOutsideTileX(n),a=a.map(o=>this._removeLinesOutsideTileX(o))),{verticesFlattened:this._vertexBuffer,indicesTriangles:n,indicesLineList:a}}_vertexOutsideTileX(t){let e=this._vertexBuffer[t*2];return e<0||e>8192}_removeTrianglesOutsideTileX(t){let e=[];for(let r=0;r0?(Math.floor(_/s)+1)*s:(Math.ceil(_/s)-1)*s,O=b>0?(Math.floor(S/s)+1)*s:(Math.ceil(S/s)-1)*s,P=Math.abs(_-z),L=Math.abs(S-O),F=Math.abs(_-y),$=Math.abs(S-m),U=g?P/D:1/0,T=x?L/A:1/0;if((F<=P||!g)&&($<=L||!x))break;if(U0?(r.push(n),r.push(s),r.push(a)):(r.push(n),r.push(a),r.push(s))}return r}function xx(t,e,r){if(e.length===0)throw Error("Subdivision vertex ring is empty.");let i=0,n=t[e[0]*2];for(let l=1;l=0?s-1:a-1,u=(o+1)%a,h=t[e[l]*2],c=t[e[l]*2+1],p=t[e[u]*2],f=t[e[u]*2+1],d=t[e[s]*2],y=t[e[s]*2+1],m=t[e[o]*2],g=t[e[o]*2+1],x=!1;if(hp)x=!1;else{let v=g-y,b=-(m-d),D=y((p-d)*v+(f-y)*b)*D&&(x=!0)}if(x){let v=e[l],b=e[s],D=e[o];v!==b&&v!==D&&b!==D&&r.push(D,b,v),s--,s<0&&(s=a-1)}else{let v=e[u],b=e[s],D=e[o];v!==b&&v!==D&&b!==D&&r.push(D,b,v),o++,o>=a&&(o=0)}if(l===u)break}}function pd(t,e,r,i,n,a,s,o,l){let u=n.length/2,h=s&&o&&l;if(uee.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,g=!0,h=0);let v=Zi(s,i,a,o,p,y,u),b=Zi(s,i,a,o,f,m,u),D=Zi(s,i,a,o,d,g,u);r.emplaceBack(h+v-l,h+b-l,h+D-l),u.primitiveLength++}}function bx(t,e,r,i,n,a){let s=[];for(let c=0;cee.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,h=0);let x=Zi(s,i,a,o,f,y,u),v=Zi(s,i,a,o,d,m,u);r.emplaceBack(h+x-l,h+v-l),u.primitiveLength++}}var fd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new Km,this.indexArray=new wn,this.indexArray2=new Io,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.segments2=new ee,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.hasDependencies=Aa("fill",this.layers,e);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[],s=new st(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!this.layers[0]._featureFilter.filter(s,p,r))continue;let f=n?i.evaluate(p,{},r,e.availableImages):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?p.geometry:Ar(l),patterns:{},sortKey:f};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:h,sourceLayerIndex:c}=l;if(this.hasDependencies){let f=Gl("fill",this.layers,l,{zoom:this.zoom},e);this.patternFeatures.push(f)}else this.addFeature(l,u,h,r,{},e.subdivisionGranularity);let p=t[h].feature;e.featureIndex.insert(p,u,h,c,this.index)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}addFeatures({options:t,canonical:e,patternPositions:r,patternMap:i}){this.detectSdfPatterns(i);for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,t.subdivisionGranularity)}detectSdfPatterns(t){for(let e of this.patternFeatures)for(let r in e.patterns){let i=e.patterns[r];this.recordSdfPattern(r,t[i.min]),this.recordSdfPattern(r,t[i.mid]),this.recordSdfPattern(r,t[i.max])}for(let e of this.layers){let r=e.paint.get("fill-pattern").constantOr(null);r&&(this.recordSdfPattern(e.id,t[r.from.toString()]),this.recordSdfPattern(e.id,t[r.to.toString()]))}}recordSdfPattern(t,e){if(!e)return;let r=e.sdf===!0,i=this.sdfPatterns[t];i===void 0?this.sdfPatterns[t]=r:i!==r&&Bt(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${t}"`)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Wg),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),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(t,e,r,i,n,a){for(let s of Ra(e,500)){let o=cd(s,i,a.fill.getGranularityForZoomLevel(i.z)),l=this.layoutVertexArray;pd((u,h)=>{l.emplaceBack(u,h)},this.segments,this.layoutVertexArray,this.indexArray,o.verticesFlattened,o.indicesTriangles,this.segments2,this.indexArray2,o.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,canonical:i})}};C("FillBucket",fd,{omit:["layers","patternFeatures"]});var wx,Dx=()=>wx||(wx=new Xt({"fill-sort-key":new N(w.layout_fill["fill-sort-key"],"fill-sort-key")})),_x,Ax=()=>_x||(_x=new Xt({"fill-antialias":new V(w.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new N(w.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new V(w.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new N(w.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new N(w.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new V(w.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new V(w.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new on(w.paint_fill["fill-pattern"],"fill-pattern")})),Sx={get paint(){return Ax()},get layout(){return Dx()}};var Ex=class extends de{constructor(t,e){super(t,Sx,e)}recalculate(t,e){super.recalculate(t,e);let r=this.paint._values["fill-outline-color"];r.value.kind==="constant"&&r.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new fd(t)}queryRadius(){return Ha(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:e,transform:r,pixelsToTileUnits:i}){return Qf(Ka(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),e)}isTileClipped(){return!0}},Go=At([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Fx=At([{name:"a_centroid",components:2,type:"Int16"}],4),kx=Go.members;Go.size,Go.alignment;var Fa=class Xo{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(e){return this.minX=Math.min(this.minX,e.x),this.minY=Math.min(this.minY,e.y),this.maxX=Math.max(this.maxX,e.x),this.maxY=Math.max(this.maxY,e.y),this}expandBy(e){return this.minX-=e,this.minY-=e,this.maxX+=e,this.maxY+=e,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(e){let r=new Xo;return r.extend(e(new B(this.minX,this.minY))),r.extend(e(new B(this.maxX,this.minY))),r.extend(e(new B(this.minX,this.maxY))),r.extend(e(new B(this.maxX,this.maxY))),r}static fromPoints(e){let r=new Xo;for(let i of e)r.extend(i);return r}contains(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(e){return!this.empty()&&!e.empty()&&e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY}intersects(e){return!this.empty()&&!e.empty()&&e.minX<=this.maxX&&e.maxX>=this.minX&&e.minY<=this.maxY&&e.maxY>=this.minY}},g5=Fa.fromPoints([new B(0,0),new B(mt,mt)]);function Yo(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function rc(t){return t.every(e=>e.x<0)||t.every(e=>e.x>8192)||t.every(e=>e.y<0)||t.every(e=>e.y>8192)}var Dn=class{constructor(t,e,r,i,n){for(this.properties=Object.create(null),this.extent=r,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n;t.pos>3,a===0)continue}if(a--,n===1)s+=t.readSVarint(),o+=t.readSVarint(),i&&r.push(i),i=[new B(s,o)];else if(n===2)s+=t.readSVarint(),o+=t.readSVarint(),i&&i.push(new B(s,o));else if(n===7)i&&i.push(i[0].clone());else throw Error(`unknown command ${n}`)}return i&&r.push(i),r}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let t=this._pbf;t.pos=this._geometry;let e=t.readVarint()+t.pos,r=1,i=0,n=0,a=0,s=1/0,o=-1/0,l=1/0,u=-1/0;for(;t.pos>3,i===0)continue}if(i--,r===1||r===2)n+=t.readSVarint(),a+=t.readSVarint(),no&&(o=n),au&&(u=a);else if(r!==7)throw Error(`unknown command ${r}`)}return[s,l,o,u]}toGeoJSON(t,e,r){let i=this.extent*2**r,n=this.extent*t,a=this.extent*e,s=this.loadGeometry();function o(c){return[(c.x+n)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(c.y+a)*2/i)*Math.PI))-90]}function l(c){return c.map(o)}let u;if(this.type===1){let c=[];for(let f of s)c.push(f[0]);let p=l(c);u=c.length===1?{type:"Point",coordinates:p[0]}:{type:"MultiPoint",coordinates:p}}else if(this.type===2){let c=s.map(l);u=c.length===1?{type:"LineString",coordinates:c[0]}:{type:"MultiLineString",coordinates:c}}else if(this.type===3){let c=dd(s),p=[];for(let f of c)p.push(f.map(l));u=p.length===1?{type:"Polygon",coordinates:p[0]}:{type:"MultiPolygon",coordinates:p}}else throw Error("unknown feature type");let h={type:"Feature",geometry:u,properties:this.properties};return this.id!=null&&(h.id=this.id),h}};Dn.types=["Unknown","Point","LineString","Polygon"];function dd(t){let e=t.length;if(e<=1)return[t];let r=[],i,n;for(let a=0;a=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[t];let e=this._pbf.readVarint()+this._pbf.pos;return new Dn(this._pbf,e,this.extent,this._keys,this._values)}};function Cx(t){let e=null,r=t.readVarint()+t.pos;for(;t.pos90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Ui(F1(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let r=Math.PI/180,i=this.lat*r,n=e.lat*r,a=Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos((e.lng-this.lng)*r);return yd*Math.acos(Math.min(a,1))}static convert(e){if(e instanceof Ui)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new Ui(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e)return new Ui(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}},md=2*Math.PI*yd;function gd(t){return md*Math.cos(t*Math.PI/180)}function Mx(t){return(180+t)/360}function Bx(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Px(t,e){return t/gd(e)}function zx(t){return t*360-180}function Wo(t){let e=180-t*360;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function Lx(t,e){return t*gd(Wo(e))}function Vx(t){return 1/Math.cos(t*Math.PI/180)}var Yl=class xd{constructor(e,r,i=0){this.x=+e,this.y=+r,this.z=+i}static fromLngLat(e,r=0){let i=ic.convert(e);return new xd(Mx(i.lng),Bx(i.lat),Px(r,i.lat))}toLngLat(){return new ic(zx(this.x),Wo(this.y))}toAltitude(){return Lx(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/md*Vx(Wo(this.y))}};function Ox(t,e,r){let i=1/(1<Nx(n,i))}function $x(t,e){let r=Rx(mt/2,mt/2,e),i=Yl.fromLngLat(r).meterInMercatorCoordinateUnits(),n=(1<1&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y;)e.pop();return e}function qx(t,e,r,i,n){let a=e.sub(r),s=i.sub(r),o=a.mag(),l=s.mag();if(o<1e-6||l<1e-6){t.push(r.clone());return}a._div(o),s._div(l);let u=a.x*s.x+a.y*s.y;if(Math.abs(u)>Math.cos(5*Math.PI/180)){t.push(r.clone());return}let h=.2,c=Math.min(n,o*h,l*h),p=r.add(a.mult(c)),f=r.add(s.mult(c)),d=Math.sqrt((1+u)/2),y=r.add(a.add(s)._unit()._mult(c/d)),m=p.sub(y).angleWith(f.sub(y)),g=Math.max(2,Math.ceil(Math.abs(m)/(Math.PI/6)-1e-6));for(let x=0;x<=g;x++)t.push(p.rotateAround(x/g*m,y))}var js=8192;function Mi(t,e,r,i,n,a,s,o){t.emplaceBack(e,r,Math.floor(i*js)*2+s,n*js*2,a*js*2,Math.round(o))}var vd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Jm,this.centroidVertexArray=new Zm,this.indexArray=new wn,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.features=[],this.hasDependencies=Aa("fill-extrusion",this.layers,e);let i=new st(this.zoom),n=this.layers[0],a=n.layout.get("fill-extrusion-rounded-corner-distance"),s=n._featureFilter.needGeometry;for(let{feature:o,id:l,index:u,sourceLayerIndex:h}of t){let c=hi(o,s);if(!n._featureFilter.filter(i,c,r))continue;let p=s?c.geometry:Ar(o),f={id:l,sourceLayerIndex:h,index:u,geometry:a>0?nc(p,a,r):p,properties:o.properties,type:o.type,patterns:{}};this.hasDependencies?this.features.push(Gl("fill-extrusion",this.layers,f,{zoom:this.zoom},e)):this.addFeature(f,f.geometry,u,r,{},e.subdivisionGranularity),e.featureIndex.insert(o,f.geometry,u,h,this.index,!0)}}addFeatures({options:t,canonical:e,patternPositions:r}){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,e,r,t.subdivisionGranularity)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,kx),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Fx.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,e,r,i,n,a){let s=this.layers[0],o=s.layout?s.layout.get("fill-extrusion-rounded-corner-distance"):0,l=o>0?nc(e,o,i):e;for(let u of Ra(l,500)){let h={x:0,y:0,sampleCount:0},c=this.layoutVertexArray.length;this.processPolygon(h,i,t,u,a);let p=this.layoutVertexArray.length-c,f=Math.floor(h.x/h.sampleCount),d=Math.floor(h.y/h.sampleCount);for(let y=0;y{Mi(u,h,c,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(t,e){let r=0;for(let i=1;iee.MAX_VERTEX_ARRAY_LENGTH&&(e.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let s=n.sub(a)._perp()._unit(),o=a.dist(n);r+o>32768&&(r=0),Mi(this.layoutVertexArray,n.x,n.y,s.x,s.y,0,0,r),Mi(this.layoutVertexArray,n.x,n.y,s.x,s.y,0,1,r),r+=o,Mi(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,0,r),Mi(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,1,r);let l=e.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),e.segment.vertexLength+=4,e.segment.primitiveLength+=2}}};function jx(t,e){for(let r=0;rGx||(Gx=new Xt({"fill-extrusion-rounded-corner-distance":new V(w["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})),Yx,Wx=()=>Yx||(Yx=new Xt({"fill-extrusion-opacity":new V(w["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new N(w["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new V(w["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new V(w["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new on(w["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new N(w["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new N(w["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new V(w["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})),Zx={get paint(){return Wx()},get layout(){return Xx()}};var Hx=class extends de{constructor(t,e){super(t,Zx,e)}createBucket(t){return new vd(t)}queryRadius(){return Ha(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,pixelPosMatrix:s}){let o=Ka(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(e,r),u=this.paint.get("fill-extrusion-base").evaluate(e,r),h=Qx(o,s,0),c=Jx(i,u,l,s),p=c[0],f=c[1];return Kx(p,f,h)}};function Bi(t,e){return t.x*e.x+t.y*e.y}function ac(t,e){if(t.length===1){let r=0,i=e[r++],n;for(;!n||i.equals(n);)if(n=e[r++],!n)return 1/0;for(;r>1),s=r-e,o,l=t[e],u=t[e+1],h=t[r],c=t[r+1];for(let p=e+3;pn){o=p,n=f;continue}if(f===n){let d=Math.abs(p-a);di&&(o-e>3&&Zo(t,e,o,i),t[o+2]=n,r-o>3&&Zo(t,o,r,i))}function t2(t,e,r,i,n,a){let s=n-r,o=a-i;if(s!==0||o!==0){let l=((t-r)*s+(e-i)*o)/(s*s+o*o);l>1?(r=n,i=a):l>0&&(r+=s*l,i+=o*l)}return s=t-r,o=e-i,s*s+o*o}function Mt(t,e,r,i){let n={type:e,geom:r},a={id:t!=null?t:null,type:n.type,geometry:n.geom,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(n.type){case"Point":case"MultiPoint":Pi(a,n.geom);break;case"LineString":Pi(a,n.geom.points);break;case"Polygon":Pi(a,n.geom[0].points);break;case"MultiLineString":for(let s of n.geom)Pi(a,s.points);break;case"MultiPolygon":for(let s of n.geom)Pi(a,s[0].points)}return a}function Wl(t){let e=t;t.points.length>64&&(e.points=new Float64Array(t.points))}function Pi(t,e){for(let r=0;r1024)throw Error("GeometryCollection nesting exceeds supported depth: 1024");if(e.geometry.type==="GeometryCollection"){r2(t,e,e.geometry,r,i,n+1);return}if(!((o=e.geometry.coordinates)!=null&&o.length))return;let a=e2(e,r,i),s=(r.tolerance/((1<0&&(s+=i?(n*h-u*a)/2:Math.sqrt((u-n)**2+(h-a)**2)),n=u,a=h}let o=e.points.length-3;e.points[2]=1,r>0&&Zo(e.points,0,o,r),e.points[o+2]=1,Wl(e),e.size=Math.abs(s),e.start=0,e.end=e.size}function Kl(t,e,r,i){for(let n=0;n1?1:r}function u2(t){return{type:"FeatureCollection",features:t.map(e=>ka(e))}}function ka(t){let e={type:"Feature",geometry:h2(t),properties:t.tags};return t.id!=null&&(e.id=t.id),e}function h2(t){let{type:e,geometry:r}=t;switch(e){case"Point":return{type:e,coordinates:bd(r[0],r[1])};case"MultiPoint":return{type:e,coordinates:Kn(r)};case"LineString":return{type:e,coordinates:Kn(r.points)};case"MultiLineString":case"Polygon":return{type:e,coordinates:r.map(i=>Kn(i.points))};case"MultiPolygon":return{type:e,coordinates:r.map(i=>i.map(n=>Kn(n.points)))}}}function Kn(t){let e=[];for(let r=0;r=r&&s=i)return null;let l=[];for(let u of t){let h=n===0?u.minX:u.minY,c=n===0?u.maxX:u.maxY;if(h>=r&&c=i))switch(u.type){case"Point":case"MultiPoint":c2(u,l,r,i,n);continue;case"LineString":p2(u,l,r,i,n,o);continue;case"MultiLineString":f2(u,l,r,i,n);continue;case"Polygon":d2(u,l,r,i,n);continue;case"MultiPolygon":y2(u,l,r,i,n);continue}}return l.length?l:null}function c2(t,e,r,i,n){let a=[];if(m2(t.geometry,a,r,i,n),!a.length)return;let s=a.length===3?"Point":"MultiPoint";e.push(Mt(t.id,s,a,t.tags))}function p2(t,e,r,i,n,a){let s=[];if(_d(t.geometry,s,r,i,n,!1,a.lineMetrics),s.length){if(a.lineMetrics){for(let o of s)e.push(Mt(t.id,"LineString",o,t.tags));return}if(s.length>1){e.push(Mt(t.id,"MultiLineString",s,t.tags));return}e.push(Mt(t.id,"LineString",s[0],t.tags))}}function f2(t,e,r,i,n){let a=[];if(Jl(t.geometry,a,r,i,n,!1),a.length){if(a.length===1){e.push(Mt(t.id,"LineString",a[0],t.tags));return}e.push(Mt(t.id,"MultiLineString",a,t.tags))}}function d2(t,e,r,i,n){let a=[];Jl(t.geometry,a,r,i,n,!0),a.length&&e.push(Mt(t.id,"Polygon",a,t.tags))}function y2(t,e,r,i,n){let a=[];for(let s of t.geometry){let o=[];Jl(s,o,r,i,n,!0),o.length&&a.push(o)}a.length&&e.push(Mt(t.id,"MultiPolygon",a,t.tags))}function m2(t,e,r,i,n){for(let a=0;a=r&&s<=i&&Kr(e,t[a],t[a+1],t[a+2])}}function _d(t,e,r,i,n,a,s){let o=sc(t),l=n===0?g2:x2,u=t.start,h,c;for(let g=0;gr&&(c=l(o,x,v,D,A,r),s&&(o.start=u+h*c)):_>i?S=r&&(c=l(o,x,v,D,A,r),k=!0),S>i&&_<=i&&(c=l(o,x,v,D,A,i),k=!0),!a&&k&&(s&&(o.end=u+h*c),e.push(o),o=sc(t)),s&&(u+=h)}let p=t.points.length-3,f=t.points[p],d=t.points[p+1],y=t.points[p+2],m=n===0?f:d;m>=r&&m<=i&&Kr(o.points,f,d,y),p=o.points.length-3,a&&p>=3&&(o.points[p]!==o.points[0]||o.points[p+1]!==o.points[1])&&Kr(o.points,o.points[0],o.points[1],o.points[2]),o.points.length&&(Wl(o),e.push(o))}function sc(t){return{points:[],size:t.size,start:t.start,end:t.end}}function Jl(t,e,r,i,n,a){for(let s of t)_d(s,e,r,i,n,a,!1)}function Kr(t,e,r,i){t.push(e,r,i)}function g2(t,e,r,i,n,a){let s=(a-e)/(i-e);return Kr(t.points,a,r+(n-r)*s,1),s}function x2(t,e,r,i,n,a){let s=(a-r)/(n-r);return Kr(t.points,e+(i-e)*s,a,1),s}function Ql(t,e){let r=e.buffer/e.extent,i=t,n=Te(t,1,-1-r,r,0,-1,2,e),a=Te(t,1,1-r,2+r,0,-1,2,e);return!n&&!a||(i=Te(t,1,-r,1+r,0,-1,2,e)||[],n&&(i=oc(n,1).concat(i)),a&&(i=i.concat(oc(a,-1)))),i}function oc(t,e){let r=[];for(let i of t)switch(i.type){case"Point":case"MultiPoint":{let n=v2(i.geometry,e);r.push(Mt(i.id,i.type,n,i.tags));continue}case"LineString":{let n=Gs(i.geometry,e);r.push(Mt(i.id,i.type,n,i.tags));continue}case"MultiLineString":case"Polygon":{let n=[];for(let a of i.geometry)n.push(Gs(a,e));r.push(Mt(i.id,i.type,n,i.tags));continue}case"MultiPolygon":{let n=[];for(let a of i.geometry){let s=[];for(let o of a)s.push(Gs(o,e));n.push(s)}r.push(Mt(i.id,i.type,n,i.tags));continue}}return r}function v2(t,e){let r=[];for(let i=0;io.id));t=t.filter(o=>!s.has(o.id))}if(i.add.size){let s=Zl({type:"FeatureCollection",features:Array.from(i.add.values())},r);s=Ql(s,r),n=n.concat(s),t=t.concat(s)}}if(i.update.size){let a=new Map,s=[];for(let o of t)i.update.has(o.id)?a.set(o.id,[...a.get(o.id)||[],o]):s.push(o);for(let[o,l]of i.update){let u=a.get(o);if(!u||u.length===0)continue;let h=w2(u,l,r);n=n.concat(u,h),s=s.concat(h)}t=s}return{affected:n,source:t}}function w2(t,e,r){var a,s;let i=!!e.newGeometry,n=e.removeAllProperties||((a=e.removeProperties)==null?void 0:a.length)>0||((s=e.addOrUpdateProperties)==null?void 0:s.length)>0;if(i){let o=t[0],l=Zl({type:"FeatureCollection",features:[{type:"Feature",id:o.id,geometry:e.newGeometry,properties:n?lc(o.tags,e):o.tags}]},r);return l=Ql(l,r),l}if(n){let o=[];for(let l of t){let u=je({},l);u.tags=lc(u.tags,e),o.push(u)}return o}return t}function lc(t,e){if(e.removeAllProperties)return{};let r=je({},t||{});if(e.removeProperties)for(let i of e.removeProperties)delete r[i];if(e.addOrUpdateProperties)for(let{key:i,value:n}of e.addOrUpdateProperties)r[i]=n;return r}function D2(t,e){var r,i;return t?{removeAll:t.removeAll,remove:new Set(t.remove||[]),add:new Map((r=t.add)==null?void 0:r.map(n=>[e.promoteId?n.properties[e.promoteId]:n.id,n])),update:new Map((i=t.update)==null?void 0:i.map(n=>[n.id,n]))}:{remove:new Set,add:new Map,update:new Map}}var uc=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],dt=new Uint32Array(96),_2=class Ad{static from(e){if(!e||e.byteLength===void 0||e.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[r,i]=new Uint8Array(e,0,2);if(r!==219)throw Error("Data does not appear to be in a KDBush format.");let n=i>>4;if(n!==1)throw Error(`Got v${n} data when expected v1.`);let a=uc[i&15];if(!a)throw Error("Unrecognized array type.");let[s]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new Ad(o,s,a,void 0,e)}constructor(e,r=64,i=Float64Array,n=ArrayBuffer,a){if(isNaN(e)||e<0)throw Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=i,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let s=uc.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,l=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-l%8)%8;if(s<0)throw Error(`Unexpected typed array class: ${i}.`);if(a)this.data=a,this.ids=new this.IndexArrayType(a,8,e),this.coords=new i(a,8+l+u,e*2),this._pos=e*2,this._finished=!0;else{let h=this.data=new n(8+o+l+u);this.ids=new this.IndexArrayType(h,8,e),this.coords=new i(h,8+l+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(h,0,2).set([219,16+s]),new Uint16Array(h,2,1)[0]=r,new Uint32Array(h,4,1)[0]=e}}add(e,r){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=e,this.coords[this._pos++]=r,i}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return Ho(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:s,nodeSize:o}=this;dt[0]=0,dt[1]=a.length-1,dt[2]=0;let l=3,u=[];for(;l>0;){let h=dt[--l],c=dt[--l],p=dt[--l];if(c-p<=o){for(let m=p;m<=c;m++){let g=s[2*m],x=s[2*m+1];g>=e&&g<=i&&x>=r&&x<=n&&u.push(a[m])}continue}let f=p+c>>1,d=s[2*f],y=s[2*f+1];d>=e&&d<=i&&y>=r&&y<=n&&u.push(a[f]),(h===0?e<=d:r<=y)&&(dt[l++]=p,dt[l++]=f-1,dt[l++]=1-h),(h===0?i>=d:n>=y)&&(dt[l++]=f+1,dt[l++]=c,dt[l++]=1-h)}return u}within(e,r,i){let n=[];return this.withinInto(e,r,i,n),n}withinInto(e,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:s,nodeSize:o}=this;dt[0]=0,dt[1]=a.length-1,dt[2]=0;let l=3,u=0,h=i*i;for(;l>0;){let c=dt[--l],p=dt[--l],f=dt[--l];if(p-f<=o){for(let g=f;g<=p;g++)hc(s[2*g],s[2*g+1],e,r)<=h&&(n[u++]=a[g]);continue}let d=f+p>>1,y=s[2*d],m=s[2*d+1];hc(y,m,e,r)<=h&&(n[u++]=a[d]),(c===0?e-i<=y:r-i<=m)&&(dt[l++]=f,dt[l++]=d-1,dt[l++]=1-c),(c===0?e+i>=y:r+i>=m)&&(dt[l++]=d+1,dt[l++]=p,dt[l++]=1-c)}return u}};function Ho(t,e,r,i,n,a){if(n-i<=r)return;let s=i+n>>1;Sd(t,e,s,i,n,a),Ho(t,e,r,i,s-1,1-a),Ho(t,e,r,s+1,n,1-a)}function Sd(t,e,r,i,n,a){for(;n>i;){if(n-i>600){let u=n-i+1,h=r-i+1,c=Math.log(u),p=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*p*(u-p)/u)*(h-u/2<0?-1:1);Sd(t,e,r,Math.max(i,Math.floor(r-h*p/u+f)),Math.min(n,Math.floor(r+(u-h)*p/u+f)),a)}let s=e[2*r+a],o=i,l=n;for(zi(t,e,i,r),e[2*n+a]>s&&zi(t,e,i,n);os;)l--}e[2*i+a]===s?zi(t,e,i,l):(l++,zi(t,e,l,n)),l<=r&&(i=l+1),r<=l&&(n=l-1)}}function zi(t,e,r,i){Xs(t,r,i),Xs(e,2*r,2*i),Xs(e,2*r+1,2*i+1)}function Xs(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function hc(t,e,r,i){let n=t-r,a=e-i;return n*n+a*a}var Ko={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},A2=class{constructor(t){this.options=Object.assign(Object.create(Ko),t),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(t){let e=[];for(let r of t){if(!r.geometry)continue;let[i,n]=r.geometry.coordinates,[a,s]=[Zr(i),Hr(n)],o={id:r.id,type:"Point",geometry:[a,s],tags:r.properties};e.push(o)}this.createIndex(e)}initialize(t){let e=[];for(let r of t)r.type==="Point"&&e.push(r);this.createIndex(e)}updateIndex(t,e,r){this.options=Object.assign(Object.create(Ko),r.clusterOptions),this.initialize(t)}createIndex(t){let{log:e,minZoom:r,maxZoom:i}=this.options;e&&console.time("total time");let n=`prepare ${t.length} points`;e&&console.time(n),this.points=t;let a=[];for(let o=0;o=r;o--){let l=Date.now();s=this.trees[o]=this.createTree(this.cluster(s,o)),e&&console.log("z%d: %d clusters in %dms",o,s.numItems,Date.now()-l)}e&&console.timeEnd("total time")}getClusters(t,e){return this.getClustersInternal(t,e).map(r=>ka(r))}getClustersInternal(t,e){let r=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),n=t[2]===180?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,n=180;else if(r>n){let h=this.getClustersInternal([r,i,180,a],e),c=this.getClustersInternal([-180,i,n,a],e);return h.concat(c)}let s=this.trees[this.limitZoom(e)],o=s.range(Zr(r),Hr(a),Zr(n),Hr(i)),l=s.flatData,u=[];for(let h of o){let c=this.stride*h;u.push(l[c+5]>1?S2(l,c,this.clusterProps):this.points[l[c+3]])}return u}getChildren(t){let e=this.getOriginId(t),r=this.getOriginZoom(t),i=Error("No cluster with the specified id: "+t),n=this.trees[r];if(!n)throw i;let a=n.flatData;if(e*this.stride>=a.length)throw i;let s=this.options.radius/(this.options.extent*2**(r-1)),o=a[e*this.stride],l=a[e*this.stride+1],u=n.within(o,l,s),h=[];for(let c of u){let p=c*this.stride;a[p+4]===t&&h.push(a[p+5]>1?E2(a,p,this.clusterProps):ka(this.points[a[p+3]]))}if(h.length===0)throw i;return h}getLeaves(t,e,r){e||(e=10),r||(r=0);let i=[];return this.appendLeaves(i,t,e,r,0),i}getTile(t,e,r){let i=this.trees[this.limitZoom(t)];if(!i)return null;let n=2**t,{extent:a,radius:s}=this.options,o=s/a,l=(r-o)/n,u=(r+1+o)/n,h={transformed:!0,features:[],source:null,x:e,y:r,z:t};return this.addTileFeatures(i.range((e-o)/n,l,(e+1+o)/n,u),i.flatData,e,r,n,h),e===0&&this.addTileFeatures(i.range(1-o/n,l,1,u),i.flatData,n,r,n,h),e===n-1&&this.addTileFeatures(i.range(0,l,o/n,u),i.flatData,-1,r,n,h),h}getClusterExpansionZoom(t){return this.getOriginZoom(t)}appendLeaves(t,e,r,i,n){let a=this.getChildren(e);for(let s of a){let o=s.properties;if(o!=null&&o.cluster?n+o.point_count<=i?n+=o.point_count:n=this.appendLeaves(t,o.cluster_id,r,i,n):n1,u,h,c;if(l)u=tu(e,o,this.clusterProps),h=e[o],c=e[o+1];else{let d=this.points[e[o+3]];u=d.tags,[h,c]=d.geometry}let p={type:1,geometry:[[Math.round(this.options.extent*(h*n-r)),Math.round(this.options.extent*(c*n-i))]],tags:u},f;f=l||this.options.generateId?e[o+3]:this.points[e[o+3]].id,f!==void 0&&(p.id=f),a.features.push(p)}}limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}cluster(t,e){let{radius:r,extent:i,reduce:n,minPoints:a}=this.options,s=r/(i*2**e),o=t.flatData,l=[],u=this.stride;for(let h=0;he&&(y+=o[g+5])}if(y>d&&y>=a){let m=c*d,g=p*d,x,v=-1,b=((h/u|0)<<5)+(e+1)+this.points.length;for(let D of f){let A=D*u;if(o[A+2]<=e)continue;o[A+2]=e;let _=o[A+5];m+=o[A]*_,g+=o[A+1]*_,o[A+4]=b,n&&(x||(x=this.map(o,h,!0),v=this.clusterProps.length,this.clusterProps.push(x)),n(x,this.map(o,A)))}o[h+4]=b,l.push(m/y,g/y,1/0,b,-1,y),n&&l.push(v)}else{for(let m=0;m1)for(let m of f){let g=m*u;if(!(o[g+2]<=e)){o[g+2]=e;for(let x=0;x>5}getOriginZoom(t){return(t-this.points.length)%32}map(t,e,r){if(t[e+5]>1){let a=this.clusterProps[t[e+6]];return r?Object.assign({},a):a}let i=this.points[t[e+3]].tags,n=this.options.map(i);return r&&n===i?Object.assign({},n):n}};function S2(t,e,r){return{id:t[e+3],type:"Point",tags:tu(t,e,r),geometry:[t[e],t[e+1]]}}function E2(t,e,r){return{type:"Feature",id:t[e+3],properties:tu(t,e,r),geometry:{type:"Point",coordinates:[wd(t[e]),Dd(t[e+1])]}}}function tu(t,e,r){let i=t[e+5],n=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?`${Math.round(i/100)/10}k`:i,a=t[e+6],s=a===-1?{}:Object.assign({},r[a]);return Object.assign(s,{cluster:!0,cluster_id:t[e+3],point_count:i,point_count_abbreviated:n})}var Ed="geojsonvt_clip_start",Fd="geojsonvt_clip_end";function cc(t,e,r,i,n){let a=e===n.maxZoom?0:n.tolerance/((1<0&&e.size<(n?s:i)){r.numPoints+=e.points.length/3;return}let o=[];for(let l=0;ls)&&(r.numSimplified++,o.push(e.points[l],e.points[l+1])),r.numPoints++;n&&M2(o,a),t.push(o)}function M2(t,e){let r=0;for(let i=0,n=t.length,a=n-2;i0===e)for(let i=0,n=t.length;i1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(e),r.debug>1&&console.timeEnd("invalidating");let[i,n,a]=[0,0,0],s=cc(t,i,n,a,r);s.source=t;let o=Jn(i,n,a);if(this.tiles[o]=s,this.tileCoords.push({z:i,x:n,y:a,id:o}),r.debug){let l=`z${i}`;this.stats[l]=(this.stats[l]||0)+1,this.total++}}getClusterExpansionZoom(t){return null}getChildren(t){return null}getLeaves(t,e,r){return null}getTile(t,e,r){let{extent:i,debug:n}=this.options,a=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);let o=t,l=e,u=r,h;for(;!h&&o>0;)o--,l>>=1,u>>=1,h=this.tiles[Jn(o,l,u)];return!(h!=null&&h.source)||(n>1&&(console.log("found parent tile z%d-%d-%d",o,l,u),console.time("drilling down")),this.splitTile(h.source,o,l,u,t,e,r),n>1&&console.timeEnd("drilling down"),!this.tiles[s])?null:pc(this.tiles[s],i)}splitTile(t,e,r,i,n,a,s){let o=[t,e,r,i],l=this.options,u=l.debug;for(;o.length;){i=o.pop(),r=o.pop(),e=o.pop(),t=o.pop();let h=1<1&&console.time("creation"),p=this.tiles[c]=cc(t,e,r,i,l),this.tileCoords.push({z:e,x:r,y:i,id:c}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));let _=`z${e}`;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(p.source=t,n==null){if(e===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue}else{if(e===l.maxZoom||e===n)continue;if(n!=null){let _=n-e;if(r!==a>>_||i!==s>>_)continue}}if(p.source=null,!t.length)continue;u>1&&console.time("clipping");let f=.5*l.buffer/l.extent,d=.5-f,y=.5+f,m=1+f,g=null,x=null,v=null,b=null,D=Te(t,h,r-f,r+y,0,p.minX,p.maxX,l),A=Te(t,h,r+d,r+m,0,p.minX,p.maxX,l);D&&(g=Te(D,h,i-f,i+y,1,p.minY,p.maxY,l),x=Te(D,h,i+d,i+m,1,p.minY,p.maxY,l)),A&&(v=Te(A,h,i-f,i+y,1,p.minY,p.maxY,l),b=Te(A,h,i+d,i+m,1,p.minY,p.maxY,l)),u>1&&console.timeEnd("clipping"),o.push(g||[],e+1,r*2,i*2),o.push(x||[],e+1,r*2,i*2+1),o.push(v||[],e+1,r*2+1,i*2),o.push(b||[],e+1,r*2+1,i*2+1)}}invalidateTiles(t){if(!t.length)return;let e=this.options,{debug:r}=e,i=1/0,n=-1/0,a=1/0,s=-1/0;for(let u of t)i=Math.min(i,u.minX),n=Math.max(n,u.maxX),a=Math.min(a,u.minY),s=Math.max(s,u.maxY);let o=e.buffer/e.extent,l=new Set;for(let u in this.tiles){let h=this.tiles[u],c=1<=f||s=y)continue;let m=!1;for(let g of t)if(g.maxX>=p&&g.minX=d&&g.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",h.z,h.x,h.y,h.numFeatures,h.numPoints,h.numSimplified);let g=`z${h.z}`;this.stats[g]=(this.stats[g]||0)-1,this.total--}delete this.tiles[u],l.add(u)}}l.size&&(this.tileCoords=this.tileCoords.filter(u=>!l.has(u.id)))}};function Jn(t,e,r){return((1<24)throw Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw Error("promoteId and generateId cannot be used together.");let i=Zl(t,e);r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles")),i=Ql(i,e),e.updateable&&(this.source=i),this.initializeIndex(i,e)}initializeIndex(t,e){this.tileIndex=e.cluster?new A2(e.clusterOptions):new z2(e),t.length&&this.tileIndex.initialize(t)}getTile(t,e,r){return t=+t,e=+e,r=+r,t<0||t>24?null:this.tileIndex.getTile(t,e,r)}updateData(t,e){let r=this.options;if(!r.updateable)throw Error("to update tile geojson `updateable` option must be set to true");let{affected:i,source:n}=b2(this.source,t,r);e&&({affected:i,source:n}=this.filterUpdate(n,i,e)),i.length&&(this.source=n,this.tileIndex.updateIndex(n,i,r))}filterUpdate(t,e,r){let i=new Set;for(let n of t)n.id!=null&&(r(ka(n))||(e.push(n),i.add(n.id)));return t=t.filter(n=>!i.has(n.id)),{affected:e,source:t}}getData(){if(!this.options.updateable)throw Error("to retrieve data the `updateable` option must be set to true");return u2(this.source)}updateClusterOptions(t,e){let r=this.options.cluster;if(this.options.cluster=t,this.options.clusterOptions=e,r==t){this.tileIndex.updateIndex(this.source,[],this.options);return}this.initializeIndex(this.source,this.options)}getClusterExpansionZoom(t){return this.tileIndex.getClusterExpansionZoom(t)}getClusterChildren(t){return this.tileIndex.getChildren(t)}getClusterLeaves(t,e,r){return this.tileIndex.getLeaves(t,e,r)}},Jo=At([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),V2=Jo.members;Jo.size,Jo.alignment;var Qo=At([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),O2=Qo.members;Qo.size,Qo.alignment;var R2=Math.cos(75/2*(Math.PI/180)),Id=1/2,fc=2**14/Id,Cd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let e of this.layers)this.gradients[e.id]={};this.layoutVertexArray=new Qm,this.layoutVertexArray2=new tg,this.indexArray=new wn,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.hasDependencies=Aa("line",this.layers,e)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[],s=new st(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!this.layers[0]._featureFilter.filter(s,p,r))continue;let f=n?i.evaluate(p,{},r):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?p.geometry:Ar(l),patterns:{},dashes:{},sortKey:f};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:h,sourceLayerIndex:c}=l;this.hasDependencies?(Aa("line",this.layers,e)?Gl("line",this.layers,l,{zoom:this.zoom},e):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,l,this.zoom,e),this.patternFeatures.push(l)):this.addFeature(l,u,h,r,{},{},e.subdivisionGranularity);let p=t[h].feature;e.featureIndex.insert(p,u,h,c,this.index)}}update(t,e,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures({options:t,canonical:e,patternPositions:r,dashPositions:i}){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,i,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,O2)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,V2),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.hasOwn(t.properties,"geojsonvt_clip_start")&&Object.hasOwn(t.properties,"geojsonvt_clip_end"))return{start:+t.properties[Ed],end:+t.properties[Fd]}}addFeature(t,e,r,i,n,a,s){let o=this.layers[0].layout,l=o.get("line-join").evaluate(t,{}),u=o.get("line-cap").evaluate(t,{}),h=o.get("line-miter-limit").evaluate(t,{}),c=o.get("line-round-limit").evaluate(t,{});this.lineClips=this.lineFeatureClips(t);for(let p of e)this.addLine(p,t,l,u,h,c,i,s);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,dashPositions:a,canonical:i})}addLine(t,e,r,i,n,a,s,o){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let l=s?o.line.getGranularityForZoomLevel(s.z):1;if(t=cr(t,l),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let v=0;v=2&&t[h-1].equals(t[h-2]);)h--;let c=0;for(;c0;if(k&&v>c){let L=d.dist(y);if(L>2*p){let F=d.sub(d.sub(y)._mult(p/L)._round());this.updateDistance(y,F),this.addCurrentVertex(F,g,0,0,f),y=F}}let O=y&&m,P=O?r:u?"butt":i;if(O&&P==="round"&&(_n&&(P="bevel"),P==="bevel"&&(_>2&&(P="flipbevel"),_100)b=x.mult(-1);else{let L=_*g.add(x).mag()/g.sub(x).mag();b._perp()._mult(L*(z?-1:1))}this.addCurrentVertex(d,b,0,0,f),this.addCurrentVertex(d,b.mult(-1),0,0,f)}else if(P==="bevel"||P==="fakeround"){let L=-Math.sqrt(_*_-1),F=z?L:0,$=z?0:L;if(y&&this.addCurrentVertex(d,g,F,$,f),P==="fakeround"){let U=Math.round(S*180/Math.PI/20);for(let T=1;T2*p){let F=d.add(m.sub(d)._mult(p/L)._round());this.updateDistance(d,F),this.addCurrentVertex(F,x,0,0,f),d=F}}}}addCurrentVertex(t,e,r,i,n,a=!1){let s=e.x+e.y*r,o=e.y-e.x*r,l=-e.x+e.y*i,u=-e.y-e.x*i;this.addHalfVertex(t,s,o,a,!1,r,n),this.addHalfVertex(t,l,u,a,!0,-i,n),this.distance>fc/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,e,r,i,n,a))}addHalfVertex({x:t,y:e},r,i,n,a,s,o){let l=(this.lineClips?this.scaledDistance*(fc-1):this.scaledDistance)*Id;if(this.layoutVertexArray.emplaceBack((t<<1)+ +!!n,(e<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,(s===0?0:s<0?-1:1)+1|(l&63)<<2,l>>6),this.lineClips){let h=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(h,this.lineClipsArray.length)}let u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),o.primitiveLength++),a?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}hasLineDasharray(t){for(let e of t){let r=e.paint.get("line-dasharray");if(r&&!r.isConstant())return!0}return!1}addLineDashDependencies(t,e,r,i){for(let n of t){let a=n.paint.get("line-dasharray");if(!a||a.value.kind==="constant")continue;let s=n.layout.get("line-cap").evaluate(e,{})==="round",o={dasharray:a.value.evaluate({zoom:r-1},e,{}),round:s},l={dasharray:a.value.evaluate({zoom:r},e,{}),round:s},u={dasharray:a.value.evaluate({zoom:r+1},e,{}),round:s},h=`${o.dasharray.join(",")},${o.round}`,c=`${l.dasharray.join(",")},${l.round}`,p=`${u.dasharray.join(",")},${u.round}`;i.dashDependencies[h]=o,i.dashDependencies[c]=l,i.dashDependencies[p]=u,e.dashes[n.id]={min:h,mid:c,max:p}}}};C("LineBucket",Cd,{omit:["layers","patternFeatures"]});var $2,N2=()=>$2||($2=new Xt({"line-cap":new N(w.layout_line["line-cap"],"line-cap"),"line-join":new N(w.layout_line["line-join"],"line-join"),"line-miter-limit":new N(w.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new N(w.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new N(w.layout_line["line-sort-key"],"line-sort-key")})),U2,q2=()=>U2||(U2=new Xt({"line-opacity":new N(w.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new V(w.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new N(w.paint_line["line-color"],"line-color"),"line-translate":new V(w.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new V(w.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new N(w.paint_line["line-width"],"line-width"),"line-gap-width":new N(w.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new N(w.paint_line["line-offset"],"line-offset"),"line-blur":new N(w.paint_line["line-blur"],"line-blur"),"line-dasharray":new on(w.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new on(w.paint_line["line-pattern"],"line-pattern"),"line-gradient":new Wa(w.paint_line["line-gradient"],"line-gradient")})),dc={get paint(){return q2()},get layout(){return N2()}},j2=class extends N{possiblyEvaluate(t,e){return e=new st(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,r,i){return e=Gt({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,r,i)}},Qn;var G2=class extends de{constructor(t,e){super(t,dc,e),this.gradientVersion=0,Qn||(Qn=new j2(dc.paint.properties["line-width"].specification,"line-floorwidth"),Qn.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){let e=this.gradientExpression();this.stepInterpolant=lm(e)?e._styleExpression.expression instanceof vl:!1,this.gradientVersion=(this.gradientVersion+1)%(2**53-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=Qn.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Cd(t)}queryRadius(t){let e=t,r=yc(Wr("line-width",this,e),Wr("line-gap-width",this,e)),i=Wr("line-offset",this,e);return r/2+Math.abs(i)+Ha(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){let s=Ka(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),o=a/2*yc(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),l=this.paint.get("line-offset").evaluate(e,r);return l&&(i=Dg(i,l*a)),mg(s,i,o)}isTileClipped(){return!0}};function yc(t,e){return e>0?e+2*t:t}var X2=At([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),Y2=At([{name:"a_projected_pos",components:3,type:"Float32"}],4);At([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var W2=At([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);At([{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"}]);var mc=At([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),x5=At([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);At([{name:"triangle",components:3,type:"Uint16"}]),At([{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"},{type:"Float32",name:"heightOffset"}]),At([{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"},{type:"Float32",name:"heightOffset"}]),At([{type:"Float32",name:"offsetX"}]),At([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),At([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var wr=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(t){this.pluginStatus=t.pluginStatus,this.pluginURL=t.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(t){if(wr.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=t.applyArabicShaping,this.processBidirectionalText=t.processBidirectionalText,this.processStyledBidirectionalText=t.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(t,e){return rt(this,null,function*(){if(this.isParsed())return this.getState();if(t.pluginStatus!=="loading")return this.setState(t),t;let r=t.pluginURL,i=new Promise(a=>{this.loadScriptResolve=a}),n=new Promise(a=>setTimeout(()=>a(),this.TIMEOUT));if(yield e(r),yield Promise.race([i,n]),this.isParsed()){let a={pluginStatus:"loaded",pluginURL:r};return this.setState(a),a}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};function Z2(t){return/[\\u0600-\\u0604\\u0606-\\u060B\\u060D-\\u061A\\u061C-\\u061E\\u0620-\\u063F\\u0641-\\u064A\\u0656-\\u066F\\u0671-\\u06DC\\u06DE-\\u070D\\u070F-\\u074A\\u074D-\\u077F\\u07C0-\\u07FA\\u07FD-\\u07FF\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u08E1\\u08E3-\\u08FF\\u1800\\u1801\\u1804\\u1806-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\uA840-\\uA877\\uFB50-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFF\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\\uD802[\\uDEC0-\\uDEE6\\uDEEB-\\uDEF6\\uDF80-\\uDF91\\uDF99-\\uDF9C\\uDFA9-\\uDFAF]|\\uD803[\\uDD00-\\uDD27\\uDD30-\\uDD39\\uDE60-\\uDE7E\\uDEC2-\\uDEC7\\uDED0-\\uDED8\\uDEFA-\\uDEFF\\uDF30-\\uDF59\\uDF70-\\uDF89\\uDFB0-\\uDFCB]|\\uD805[\\uDE60-\\uDE6C]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9C-\\uDC9F]|\\uD83A[\\uDD00-\\uDD4B\\uDD50-\\uDD59\\uDD5E\\uDD5F]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB\\uDEF0\\uDEF1]/gim.test(String.fromCodePoint(t))}function H2(t){return/[\\u0591-\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u0604\\u0606-\\u060B\\u060D-\\u061A\\u061C-\\u061E\\u0620-\\u063F\\u0641-\\u064A\\u0656-\\u066F\\u0671-\\u06DC\\u06DE-\\u070D\\u070F-\\u074A\\u074D-\\u07B1\\u07C0-\\u07FA\\u07FD-\\u082D\\u0830-\\u083E\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u08E1\\u08E3-\\u08FF\\uFB1D-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFF\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC57-\\uDC9E\\uDCA7-\\uDCAF\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDCFB-\\uDD1B\\uDD1F-\\uDD39\\uDD3F-\\uDD59\\uDD80-\\uDDB7\\uDDBC-\\uDDCF\\uDDD2-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE38-\\uDE3A\\uDE3F-\\uDE48\\uDE50-\\uDE58\\uDE60-\\uDE9F\\uDEC0-\\uDEE6\\uDEEB-\\uDEF6\\uDF00-\\uDF35\\uDF39-\\uDF55\\uDF58-\\uDF72\\uDF78-\\uDF91\\uDF99-\\uDF9C\\uDFA9-\\uDFAF]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDCFA-\\uDD27\\uDD30-\\uDD39\\uDD40-\\uDD65\\uDD69-\\uDD85\\uDD8E\\uDD8F\\uDE60-\\uDE7E\\uDE80-\\uDEA9\\uDEAB-\\uDEAD\\uDEB0\\uDEB1\\uDEC2-\\uDEC7\\uDED0-\\uDED8\\uDEFA-\\uDF27\\uDF30-\\uDF59\\uDF70-\\uDF89\\uDFB0-\\uDFCB\\uDFE0-\\uDFF6]|\\uD83A[\\uDC00-\\uDCC4\\uDCC7-\\uDCD6\\uDD00-\\uDD4B\\uDD50-\\uDD59\\uDD5E\\uDD5F]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB\\uDEF0\\uDEF1]/gim.test(String.fromCodePoint(t))}function K2(t){return/[\\u02EA\\u02EB\\u2E80-\\u2FDF\\u2FF0-\\u303F\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FD-\\u30FF\\u3105-\\u312F\\u31A0-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFE10-\\uFE1F\\uFE30-\\uFE4F\\uFF00-\\uFFEF]|\\uD81B[\\uDFE0-\\uDFFF]|[\\uD81C-\\uD822\\uD840-\\uD868\\uD86A-\\uD86D\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD88C][\\uDC00-\\uDFFF]|\\uD823[\\uDC00-\\uDCD5\\uDCFF-\\uDD1E\\uDD80-\\uDDF2]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFB]|\\uD83C[\\uDE00-\\uDEFF]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEAD\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0\\uDFF0-\\uDFFF]|\\uD87B[\\uDC00-\\uDE5D]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD88D[\\uDC00-\\uDC79]/gim.test(String.fromCodePoint(t))}function Qa(t){return/[\\u02EA\\u02EB\\u1100-\\u11FF\\u1401-\\u167F\\u18B0-\\u18FF\\u2065\\u20DD-\\u20E0\\u20E2-\\u20E4\\u2B97\\u2BF0-\\u2BFF\\u2E50\\u2E51\\u2E80-\\u3007\\u3012\\u3013\\u3020-\\u302F\\u3031-\\u30FB\\u30FD-\\uA4CF\\uA960-\\uA97F\\uAC00-\\uD7FF\\uF900-\\uFAFF\\uFE10-\\uFE1F\\uFE30-\\uFE48\\uFE50-\\uFE57\\uFE5F-\\uFE62\\uFE67-\\uFE6F\\uFF00-\\uFF07\\uFF0A-\\uFF0C\\uFF0E-\\uFF19\\uFF1F-\\uFF3A\\uFF3C\\uFF3E\\uFF40-\\uFF5A\\uFFE0-\\uFFE2\\uFFE4-\\uFFE7\\uFFF0-\\uFFF8]|\\uD802[\\uDD80-\\uDD9F]|\\uD805[\\uDD80-\\uDDFF]|\\uD806[\\uDE00-\\uDEBF]|[\\uD80C-\\uD810\\uD81C-\\uD822\\uD83C\\uD83D\\uD840-\\uD87E\\uD880-\\uD8BE][\\uDC00-\\uDFFF]|\\uD811[\\uDC00-\\uDE7F]|\\uD81B[\\uDFE0-\\uDFFF]|\\uD823[\\uDC00-\\uDDFF]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFF]|\\uD833[\\uDEC0-\\uDFCF]|\\uD834[\\uDC00-\\uDDFF\\uDEE0-\\uDF7F]|\\uD836[\\uDC00-\\uDEAF]|\\uD83E[\\uDD00-\\uDEFF]|[\\uD87F\\uD8BF][\\uDC00-\\uDFFD]/gim.test(String.fromCodePoint(t))}function J2(t){return/[\\xA7\\xA9\\xAE\\xB1\\xBC-\\xBE\\xD7\\xF7\\u2016\\u2020\\u2021\\u2030\\u2031\\u203B\\u203C\\u2042\\u2047-\\u2049\\u2051\\u2100-\\u218F\\u221E\\u2234\\u2235\\u2300-\\u2307\\u230C-\\u231F\\u2324-\\u2328\\u232B\\u237D-\\u239A\\u23BE-\\u23CD\\u23CF\\u23D1-\\u23DB\\u23E2-\\u2422\\u2424-\\u24FF\\u25A0-\\u2619\\u2620-\\u2767\\u2776-\\u2793\\u2B12-\\u2B2F\\u2B50-\\u2B59\\u2BB8-\\u2BEB\\u3000-\\u303F\\u30A0-\\u30FF\\uE000-\\uF8FF\\uFE30-\\uFE6F\\uFF00-\\uFFEF\\uFFFC\\uFFFD]|[\\uDB80-\\uDBFF][\\uDC00-\\uDFFF]/gim.test(String.fromCodePoint(t))}function Q2(t){return/[\\r\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0600-\\u0605\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DD\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u070F\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0890\\u0891\\u0897-\\u089F\\u08CA-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E33-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB3-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1037\\u1039-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1084-\\u1086\\u108D\\u109D\\u1100-\\u11FF\\u135D-\\u135F\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u200C\\u200D\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA960-\\uA97C\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E\\uFF9F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDD69-\\uDD6D\\uDEAB\\uDEAC\\uDEFA-\\uDEFF\\uDF46-\\uDF50\\uDF82-\\uDF85]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC70\\uDC73\\uDC74\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDCBD\\uDCC2\\uDCCD\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD45\\uDD46\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDDC2\\uDDC3\\uDDC9-\\uDDCC\\uDDCE\\uDDCF\\uDE2C-\\uDE37\\uDE3E\\uDE41\\uDEDF-\\uDEEA\\uDF00-\\uDF03\\uDF3B\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74\\uDFB8-\\uDFC0\\uDFC2\\uDFC5\\uDFC7-\\uDFCA\\uDFCC-\\uDFD2\\uDFE1\\uDFE2]|\\uD805[\\uDC35-\\uDC46\\uDC5E\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDDDC\\uDDDD\\uDE30-\\uDE40\\uDEAB-\\uDEB7\\uDF1D-\\uDF1F\\uDF22-\\uDF2B]|\\uD806[\\uDC2C-\\uDC3A\\uDD30-\\uDD35\\uDD37\\uDD38\\uDD3B-\\uDD43\\uDDD1-\\uDDD7\\uDDDA-\\uDDE0\\uDDE4\\uDE01-\\uDE0A\\uDE33-\\uDE39\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE5B\\uDE84-\\uDE99\\uDF60-\\uDF67]|\\uD807[\\uDC2F-\\uDC36\\uDC38-\\uDC3F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD8A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD97\\uDEF3-\\uDEF6\\uDF00-\\uDF03\\uDF34-\\uDF3A\\uDF3E-\\uDF42\\uDF5A]|\\uD80D[\\uDC40\\uDC47-\\uDC55]|\\uD818[\\uDD1E-\\uDD2F]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDD63\\uDD67-\\uDD6A\\uDF4F\\uDF51-\\uDF87\\uDF8F-\\uDF92\\uDFE4\\uDFF0\\uDFF1]|\\uD82F[\\uDC9D\\uDC9E]|\\uD833[\\uDF00-\\uDF2D\\uDF30-\\uDF46]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDC8F\\uDD30-\\uDD36\\uDEAE\\uDEEC-\\uDEEF]|\\uD839[\\uDCEC-\\uDCEF\\uDDEE\\uDDEF\\uDEE3\\uDEE6\\uDEEE\\uDEEF\\uDEF5]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A]|\\uD83C[\\uDDE6-\\uDDFF\\uDFFB-\\uDFFF]|\\uDB40[\\uDC20-\\uDC7F\\uDD00-\\uDDEF]/.test(t)}function gc(t){return/[\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECE\\u0EDC-\\u0EDF\\u0F00-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F97\\u0F99-\\u0FBC\\u0FBE-\\u0FCC\\u0FCE-\\u0FD4\\u0FD9\\u0FDA\\u1000-\\u103F\\u1050-\\u108F\\u109A-\\u109F\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19DE\\u19DF\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1AA0-\\u1AAD\\u1B00-\\u1B4C\\u1B4E-\\u1B7F\\uA980-\\uA9CD\\uA9D0-\\uA9D9\\uA9DE-\\uA9EF\\uA9FA-\\uA9FE\\uAA60-\\uAAC2\\uAADB-\\uAADF]|\\uD805[\\uDF00-\\uDF1A\\uDF1D-\\uDF2B\\uDF3A\\uDF3B\\uDF3F-\\uDF46]/gim.test(String.fromCodePoint(t))}function tv(t,e){return/(?:[\\u1039\\u17D2\\u1A60\\u1BAB\\u200D\\uAAF6]|\\uD802\\uDE3F|\\uD804[\\uDD33\\uDFD0]|\\uD806[\\uDD3E\\uDE47\\uDE99]|\\uD807[\\uDD45\\uDD97\\uDF42])$/.test(t)||new RegExp("^\\\\p{gc=Mc}","u").test(e)}var ev={C:"18g,1;g2,3;4nb,1",D:"17k,1;5,1;1,1;1,5;4,d;1,7;1,2;z,2;8,g;i,12;1,2;9,1;1,1;1,2;14,3;2,1;28,9;3,f;2,4;1,1;2,3;2,6;7a,1;2,5;1,1;g,a;5,2;2,6;1,f",R:"17m,4;1,1;1,1;5,4;l,1;14,3;1,3;g,i;12,1;2,9;1,1;1,1;2,2;1,1;o,2;2x,3;f,2;4,1;1,2;3,2;6u,j;b,1;r,3;1,1;2,2;6,1",T:"174,b;1,1;1a,l;g,1;2t,7;2,6;2,2;1,4;bt,9;16,o;1,t;1clb,1"},rv={1569:[65152,0,0,0],1570:[65153,65154,0,0],1571:[65155,65156,0,0],1572:[65157,65158,0,0],1573:[65159,65160,0,0],1574:[65161,65162,65163,65164],1575:[65165,65166,0,0],1576:[65167,65168,65169,65170],1577:[65171,65172,0,0],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194,0,0],1584:[65195,65196,0,0],1585:[65197,65198,0,0],1586:[65199,65200,0,0],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262,0,0],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1611:[65136,0,0,65137],1612:[65138,0,0,0],1613:[65140,0,0,0],1614:[65142,0,0,65143],1615:[65144,0,0,65145],1616:[65146,0,0,65147],1617:[65148,0,0,65149],1618:[65150,0,0,65151],1649:[64336,64337,0,0],1655:[64477,0,0,0],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393,0,0],1676:[64388,64389,0,0],1677:[64386,64387,0,0],1678:[64390,64391,0,0],1681:[64396,64397,0,0],1688:[64394,64395,0,0],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415,0,0],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421,0,0],1729:[64422,64423,64424,64425],1733:[64480,64481,0,0],1734:[64473,64474,0,0],1735:[64471,64472,0,0],1736:[64475,64476,0,0],1737:[64482,64483,0,0],1739:[64478,64479,0,0],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431,0,0],1747:[64432,64433,0,0]},iv={\\u0644\\u0622:[65269,65270],\\u0644\\u0623:[65271,65272],\\u0644\\u0625:[65273,65274],\\u0644\\u0627:[65275,65276]},xc=1604,nv=/[\\u0600-\\u06ff\\u0750-\\u077f\\u0870-\\u089f\\u08a0-\\u08ff\\ufb50-\\ufdff\\ufe70-\\ufeff]/;function av(t,e,r){let i=0;for(let n of t.split(";")){let[a,s]=n.split(",").map(l=>parseInt(l,36)),o=i+a;for(let l=o;l{let r=e.codePointAt(0);return{codePoint:r,type:sv(r),form:null}})}function cv(t){let e=t.filter(r=>r.type!=="T");for(let r=0;r0&&ov(e[r-1].type),a=r+1String.fromCodePoint(dv(r))).join("")}function mv(t,e,r){var n;let i=e.layout.get("text-transform").evaluate(r,{});return i==="uppercase"?t=t.toLocaleUpperCase():i==="lowercase"&&(t=t.toLocaleLowerCase()),((n=wr.applyArabicShaping)!=null?n:yv)(t)}function gv(t,e,r){for(let i of t.sections)i.text=mv(i.text,e,r);return t}function xv(t){let e={},r={},i=[],n=0;function a(u){i.push(t[u]),n++}function s(u,h,c){let p=r[u];return delete r[u],r[h]=p,i[p].geometry[0].pop(),i[p].geometry[0]=i[p].geometry[0].concat(c[0]),p}function o(u,h,c){let p=e[h];return delete e[h],e[u]=p,i[p].geometry[0].shift(),i[p].geometry[0]=c[0].concat(i[p].geometry[0]),p}function l(u,h,c){let p=c?h[0][h[0].length-1]:h[0][0];return`${u}:${p.x}:${p.y}`}for(let u=0;uu.geometry)}var Bd=typeof Intl<"u"&&"Segmenter"in Intl,ta,ea;function tl(t){if(!Bd||!Q2(t))return[...t];ta!=null||(ta=new Intl.Segmenter(void 0,{granularity:"grapheme"}));let e=[];for(let{segment:r}of ta.segment(t)){let i=e.length-1;i>=0&&tv(e[i],r)?e[i]+=r:e.push(r)}return e}function vv(t){let e=new Set;if(Bd){ea!=null||(ea=new Intl.Segmenter(void 0,{granularity:"word"}));for(let{index:i}of ea.segment(t))e.add(i);return e}let r=0;for(let i of t.split(new RegExp("\\\\b|(?=\\\\p{Ideo})","u")))e.add(r),r+=i.length;return e}function Pd(t){let e=t.codePointAt(0);return t.length>(e>65535?2:1)}function ru(t){return/\\s/u.test(String.fromCodePoint(t))}function el(t){for(let e of t)if(Qa(e.codePointAt(0)))return!0;return!1}function bv(t){for(let e of t)if(!wv(e.codePointAt(0)))return!1;return!0}function wv(t){return!Z2(t)}function vc(t){return!(Qa(t)||J2(t))}function zd(t){return new RegExp("\\\\p{sc=Arab}","u").test(String.fromCodePoint(t))}function Ld(t){return H2(t)}function Vd(t){for(let e of t)if(Ld(e.codePointAt(0)))return!0;return!1}var Gr={"!":"\\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","\\u22EF":"\\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 Dv(t){let e="",r={premature:!0,value:void 0},i=t[Symbol.iterator](),n=i.next(),a=t[Symbol.iterator]();a.next();let s=a.next();for(;!n.done;)(s.done||!vc(s.value.codePointAt(0))||Gr[s.value])&&(r.premature||!vc(r.value.codePointAt(0))||Gr[r.value])&&Gr[n.value]?e+=Gr[n.value]:e+=n.value,r={value:n.value,premature:!1},n=i.next(),s=a.next();return e}var _v={10:!0,13:!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},Av={40:!0};function bc(t,e,r,i,n,a){if("fontStack"in e){let s=r[e.fontStack],o=s==null?void 0:s[t];if(o)return o.metrics.advance*e.scale+n;let l=0;for(let u of t){let h=s==null?void 0:s[u];h&&(l+=h.metrics.advance*e.scale+n)}return l}{let s=i[e.imageName];return s?s.displaySize[0]*e.scale*24/a+n:0}}function wc(t,e,r,i){let n=(t-e)**2;return i?tr&&Dc(e[i-1]);)i--;this.text=e.slice(r,i).join(""),this.sectionIndex=this.sectionIndex.slice(r,i),this._graphemes=null}substring(e,r){let i=this.graphemes().slice(e,r).join(""),n=this.sectionIndex.slice(e,r);return new rl(i,this.sections,n)}toCodeUnitIndex(e){return this.graphemes().slice(0,e).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,r)=>Math.max(e,this.sections[r].scale),0)}getMaxImageSize(e){let r=0,i=0;for(let n=0;n0?i[i.length-1]:"",a=tl(n+e);this.text+=e,this._graphemes=i.slice(0,n?-1:void 0).concat(a);let s=a.length-+!!n;for(let o=0;o=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,r,i,n,a){let s=[],o=this.determineAverageLineWidth(e,r,i,n,a),l=this.hasZeroWidthSpaces(),u=this.graphemes(),h=null,c=0,p=0;for(let f=0;f0){let y=u[f-1].codePointAt(0),m=d.codePointAt(0),g=K2(y),x=gc(y)&&gc(m);(_v[y]||g||"imageName"in this.getSection(f-1)||u[f+1]!==void 0&&Av[m]||x&&(h!=null?h:h=vv(this.text)).has(p))&&s.push(_c(f,c,o,s,Sv(y,m,g&&l),!1))}ru(d.codePointAt(0))||(c+=bc(d,this.getSection(f),i,n,e,a)),p+=d.length}return Od(_c(this.length(),c,o,s,0,!0))}determineAverageLineWidth(e,r,i,n,a){let s=0,o=0;for(let u of this.graphemes()){let h=this.getSection(o);s+=bc(u,h,i,n,e,a),o++}let l=Math.max(1,Math.ceil(s/r));return s/l}};function Ev(){return(function(t){var e={R:"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",EN:"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",ES:"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",ET:"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj",AN:"16o+5,2j+9,2+1,35,ed,1ff2+9,87+u",CS:"18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b",B:"a,3,f+2,2v,690",S:"9,2,k",WS:"c,k,4f4,1vk+a,u,1j,335",ON:"x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i",BN:"0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1",NSM:"lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",AL:"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",LRO:"6ct",RLO:"6cu",LRE:"6cq",RLE:"6cr",PDF:"6cs",LRI:"6ee",RLI:"6ef",FSI:"6eg",PDI:"6eh"},r={},i={};r.L=1,i[1]="L",Object.keys(e).forEach(function(R,J){r[R]=1<1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function d(R,J){var W=0,M=new Map,ut=J&&new Map,X;return R.split(",").forEach(function G(K){if(K.indexOf("+")!==-1)for(var Nt=+K;Nt--;)G(X);else{X=K;var vt=K.split(">"),nt=vt[0],Tt=vt[1];nt=String.fromCodePoint(W+=parseInt(nt,36)),Tt=String.fromCodePoint(W+=parseInt(Tt,36)),M.set(nt,Tt),J&&ut.set(Tt,nt)}}),{map:M,reverseMap:ut}}var y,m,g;function x(){if(!y){var R=d(f.pairs,!0),J=R.map,W=R.reverseMap;y=J,m=W,g=d(f.canonical,!1).map}}function v(R){return x(),y.get(R)||null}function b(R){return x(),m.get(R)||null}function D(R){return x(),g.get(R)||null}var A=r.L,_=r.R,S=r.EN,k=r.ES,z=r.ET,O=r.AN,P=r.CS,L=r.B,F=r.S,$=r.ON,U=r.BN,T=r.NSM,q=r.AL,at=r.LRO,ot=r.RLO,pt=r.LRE,Et=r.RLE,qt=r.PDF,Ht=r.LRI,Ve=r.RLI,ye=r.FSI,Kt=r.PDI;function Oe(R,J){for(var W=125,M=new Uint32Array(R.length),ut=0;ut0)Fe--;else if(rs>0){for(Ne=0;!lt[lt.length-1]._isolate;)lt.pop();var is=lt[lt.length-1]._isolInitIndex;is!=null&&(Nt.set(is,zt),Nt.set(zt,is)),lt.pop(),rs--}bt=lt[lt.length-1],K[zt]=bt._level,bt._override&&G(zt,bt._override)}else Lt&qt?(Fe===0&&(Ne>0?Ne--:!bt._isolate&<.length>1&&(lt.pop(),bt=lt[lt.length-1])),K[zt]=bt._level):Lt&L&&(K[zt]=nt.level);else K[zt]=bt._level,bt._override&&Lt!==U&&G(zt,bt._override)}for(var Cr=[],me=null,ar=nt.start;ar<=nt.end;ar++){var ns=M[ar];if(!(ns&o)){var Bu=K[ar],Pu=ns&n,Wy=ns===Kt;me&&Bu===me._level?(me._end=ar,me._endsWithIsolInit=Pu):Cr.push(me={_start:ar,_end:ar,_level:Bu,_startsWithPDI:Wy,_endsWithIsolInit:Pu})}}for(var as=[],Sn=0;Sn=0;kn--)if(!(M[kn]&o)){Vu=K[kn];break}var us=Mr[Mr.length-1],Hy=K[us],Ou=nt.level;if(!(M[us]&n)){for(var Tn=us+1;Tn<=nt.end;Tn++)if(!(M[Tn]&o)){Ou=K[Tn];break}}as.push({_seqIndices:Mr,_sosType:Math.max(Vu,Zy)%2?_:A,_eosType:Math.max(Ou,Hy)%2?_:A})}}for(var hs=0;hs=0;Cn--)if(!(M[j[Cn]]&o)){ps=M[j[Cn]];break}G(Ru,ps&(n|Kt)?$:ps)}}if(X.get(S))for(var Mn=0;Mn=-1;Bn--){var Nu=Bn===-1?yi:M[j[Bn]];if(Nu&a){Nu===q&&G($u,O);break}}}if(X.get(q))for(var fs=0;fs=0&&(Pr=M[j[ms]],Pr&o);ms--);for(var gs=mi+1;gs=0&&M[j[Pn]]&(z|o);Pn--)G(j[Pn],S);for(ge++;ge=0&&M[j[zn]]&o;zn--)G(j[zn],$);for(var Ln=gi+1;Ln=0;bi--){var bs=zr[bi].char;if(bs===Yu||bs===b(D(vi))||v(D(bs))===vi){Vn.push([zr[bi].seqIndex,Lr]),zr.length=bi;break}}}Vn.sort(function(Yt,ue){return Yt[0]-ue[0]});for(var ws=0;ws=0;As--){var Ju=j[As];if(M[Ju]&Xu){var Qu=M[Ju]&xi?_:A;xe=Qu===Br?Br:Qu;break}}}if(xe){if(M[j[On]]=M[j[Ds]]=xe,xe!==Br){for(var wi=On+1;wi=0;_i--)if(M[j[_i]]&o)th=_i;else{Es=M[j[_i]]&xi?_:A;break}for(var eh=Ky,Ai=Ue+1;Ai=0&&c(R[$n])&l;$n--)K[$n]=nt.level}}return{levels:K,paragraphs:vt};function rh(Yt,ue){for(var Wt=Yt;Wt=K&&c(R[nt])&l;nt--)vt[nt]=G.level;for(var Tt=G.level,di=1/0,nr=0;nrTt&&(Tt=Re),Re=di;$e--)for(var lt=0;lt=$e){for(var bt=lt;lt+1=$e;)lt++;lt>bt&&X.push([bt+K,lt+K])}}}),X}function Tr(R,J,W,M){var ut=Ir(R,J,W,M),X=[].concat(R);return ut.forEach(function(G,K){X[K]=(J.levels[G]&1?kt(R[G]):null)||R[G]}),X.join("")}function Ir(R,J,W,M){for(var ut=ir(R,J,W,M),X=[],G=0;G=0;i--){let n=nu.getBidiCharTypeName(t[i].text[0]);Tv.has(n)?(t[i].level=e,r=!0):r&&kv.has(n)?t[i].level=e:r=!1}}function Mv(t,e){let r=e,i=1/0;for(let{level:a}of t)a>r&&(r=a),(a|1)=i;a--)for(let s=0;s=a;)o++;for(let l=s,u=o;le>=n.start&&e<=n.end))==null?void 0:r.level)!=null?i:0}function zv(t,e,r,i,n){let a=Iv(t,e,i,n);Cv(a,r);let s="",o=[];for(let l of Mv(a,r)){if(Fv.test(l.text))continue;let u=Bv(l);s+=u,o.push(...Array(u.length).fill(l.index))}return{text:s,sourceIndices:o}}function Lv(t,e){let r=e.filter(a=>a>0&&aa-s),n=[];for(let a=0;a+1n.start))).map(([n,a])=>zv(t,r,Pv(i,n),n,a))}function Vv(t,e){return Rd(t,e).map(r=>r.text)}function Ov(t,e,r){return Rd(t,r).map(i=>[i.text,i.sourceIndices.map(n=>{var a;return(a=e[n])!=null?a:0})])}var il=4294967296,Ac=1/il,Sc=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),au=class{constructor(t){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(t,e,r=this.length){let i;for(;i=this.nextField(r);)t(i,e,this);return e}readMessage(t,e){return this.readFields(t,e,this.readVarint()+this.pos)}readFixed32(){let t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){let t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*il;return this.pos+=8,t}readSFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*il;return this.pos+=8,t}readFloat(){let t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){let t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){let e=this.buf,r=e[this.pos++];if(r<128)return r;let i=r&127,n;return n=e[this.pos++],i|=(n&127)<<7,n<128||(n=e[this.pos++],i|=(n&127)<<14,n<128)||(n=e[this.pos++],i|=(n&127)<<21,n<128)?i:(n=e[this.pos],i|=(n&15)<<28,$v(i,t,this))}readSVarint(){let t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return!!this.readVarint()}readString(){let t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Sc?Sc.decode(this.buf.subarray(e,t)):tb(this.buf,e,t)}readBytes(){let t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}readPackedVarint(t=[],e){let r=this.readPackedEnd();for(;this.pos=t)return 0;let e=this.readVarint();return this.type=e&7,this._valueStart=this.pos,e>>>3}skip(t){let e=t&7;if(e===0)for(;this.buf[this.pos++]>127;);else if(e===2)this.pos=this.readVarint()+this.pos;else if(e===5)this.pos+=4;else if(e===1)this.pos+=8;else throw Error(`Unimplemented type: ${e}`)}},Rv=class{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.length=this.buf.length}writeTag(t,e){this.writeVarint(t<<3|e)}realloc(t){let e=this.length||16;for(;e=0&&t<128){this.pos>=this.length&&this.realloc(1),this.buf[this.pos++]=t;return}if(t>268435455||t<0){Uv(t,this);return}this.realloc(4),this.buf[this.pos++]=t&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127)))}writeSVarint(t){this.writeVarint(t<0?-t*2-1:t*2)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(t.length*4),this.pos++;let e=this.pos;this.pos=eb(this.buf,t,this.pos);let r=this.pos-e;r>=128&&Ec(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){let e=t.length;this.writeVarint(e),this.realloc(e),this.buf.set(t,this.pos),this.pos+=e}writeRawMessage(t,e){this.pos++;let r=this.pos;t(e,this);let i=this.pos-r;i>=128&&Ec(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i}writeMessage(t,e,r){this.writeTag(t,2),this.writeRawMessage(e,r)}writePackedVarint(t,e){e.length&&this.writeMessage(t,Gv,e)}writePackedSVarint(t,e){e.length&&this.writeMessage(t,Xv,e)}writePackedBoolean(t,e){e.length&&this.writeMessage(t,Zv,e)}writePackedFloat(t,e){e.length&&this.writeMessage(t,Yv,e)}writePackedDouble(t,e){e.length&&this.writeMessage(t,Wv,e)}writePackedFixed32(t,e){e.length&&this.writeMessage(t,Hv,e)}writePackedSFixed32(t,e){e.length&&this.writeMessage(t,Kv,e)}writePackedFixed64(t,e){e.length&&this.writeMessage(t,Jv,e)}writePackedSFixed64(t,e){e.length&&this.writeMessage(t,Qv,e)}writeBytesField(t,e){this.writeTag(t,2),this.writeBytes(e)}writeFixed32Field(t,e){this.writeTag(t,5),this.writeFixed32(e)}writeSFixed32Field(t,e){this.writeTag(t,5),this.writeSFixed32(e)}writeFixed64Field(t,e){this.writeTag(t,1),this.writeFixed64(e)}writeSFixed64Field(t,e){this.writeTag(t,1),this.writeSFixed64(e)}writeVarintField(t,e){this.writeTag(t,0),this.writeVarint(e)}writeSVarintField(t,e){this.writeTag(t,0),this.writeSVarint(e)}writeStringField(t,e){this.writeTag(t,2),this.writeString(e)}writeFloatField(t,e){this.writeTag(t,5),this.writeFloat(e)}writeDoubleField(t,e){this.writeTag(t,1),this.writeDouble(e)}writeBooleanField(t,e){this.writeVarintField(t,+e)}};function $v(t,e,r){let i=r.buf,n,a;if(a=i[r.pos++],n=(a&112)>>4,a<128||(a=i[r.pos++],n|=(a&127)<<3,a<128)||(a=i[r.pos++],n|=(a&127)<<10,a<128)||(a=i[r.pos++],n|=(a&127)<<17,a<128)||(a=i[r.pos++],n|=(a&127)<<24,a<128)||(a=i[r.pos++],n|=(a&1)<<31,a<128))return Nv(t,n,e);throw Error("Expected varint not more than 10 bytes")}function Nv(t,e,r){return r?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function Uv(t,e){let r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(r=~(-t%4294967296),i=~(-t/4294967296),r^4294967295?r=r+1|0:(r=0,i=i+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw Error("Given varint doesn\'t fit into 10 bytes");e.realloc(10),qv(r,i,e),jv(i,e)}function qv(t,e,r){r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos]=t&127}function jv(t,e){let r=(t&7)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function Ec(t,e,r){let i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));r.realloc(i),r.buf.copyWithin(t+i,t,r.pos)}function Gv(t,e){let r=t.length,i=e.buf,n=e.pos,a=e.length;for(let s=0;sa){e.pos=n,e.writeVarint(o),i=e.buf,n=e.pos,a=e.length;continue}for(;o>127;)i[n++]=o%128|128,o=Math.floor(o/128);i[n++]=o}e.pos=n}function Xv(t,e){for(let r=0;r239?4:a>223?3:a>191?2:1;if(n+o>r)break;let l,u,h;o===1?a<128&&(s=a):o===2?(l=t[n+1],(l&192)==128&&(s=(a&31)<<6|l&63,s<=127&&(s=null))):o===3?(l=t[n+1],u=t[n+2],(l&192)==128&&(u&192)==128&&(s=(a&15)<<12|(l&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):o===4&&(l=t[n+1],u=t[n+2],h=t[n+3],(l&192)==128&&(u&192)==128&&(h&192)==128&&(s=(a&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,o=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=o}return i}function eb(t,e,r){for(let i=0,n,a;i55295&&n<57344)if(a){if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,a=n;continue}n=a-55296<<10|n-56320|65536,a=null}else{n>56319||i+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):a=n;continue}else a&&(a=(t[r++]=239,t[r++]=191,t[r++]=189,null));n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=n&63|128)}return r}function rb(t){return typeof(t==null?void 0:t.renderWithWebGL)=="function"}function su(t){let e=0,r=0;for(let s of t)e+=s.w*s.h,r=Math.max(r,s.w);t.sort((s,o)=>o.h-s.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],n=0,a=0;for(let s of t)for(let o=i.length-1;o>=0;o--){let l=i[o];if(!(s.w>l.w||s.h>l.h)){if(s.x=l.x,s.y=l.y,a=Math.max(a,s.y+s.h),n=Math.max(n,s.x+s.w),s.w===l.w&&s.h===l.h){let u=i.pop();u&&o=r;a--)e.push(a);r=i+1}else{for(let a=r;at.toCodeUnitIndex(a)),i=wr.isParsed()?wr:null;if(t.sections.length===1)return i?i.processBidirectionalText(t.toString(),r).map(a=>kc(a,t.sections,[...a].map(()=>0))):Vv(t.toString(),r).map(a=>nl([...a],t.sections,[...a].map(()=>0)));let n=sb(t);return i?i.processStyledBidirectionalText(t.text,n,r).map(([a,s])=>kc(a,t.sections,s)):Ov(t.text,n,r).map(([a,s])=>{let o=[...a];return nl(o,t.sections,Ud(o).map(l=>{var u;return(u=s[l])!=null?u:0}))})}function nl(t,e,r){var a;let i=new iu(t.join(""),e,[]),n=0;for(let s of i.graphemes())i.sectionIndex.push((a=r[n])!=null?a:0),n+=[...s].length;return i}function Ud(t){let e=[],r=0;for(let i of t)e.push(r),r+=i.length;return e}function kc(t,e,r){let i=[...t],n=Ud(i),a=ab(i);return nl(a.map(s=>i[s]),e,a.map(s=>{var o;return(o=r[n[s]])!=null?o:0}))}function ra(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d){let y=iu.fromFeature(t,n);c===2&&y.verticalizePunctuation();let m=y.determineLineBreaks(u,a,e,i,f),g=Vd(y.text)?ob(y,m):nb(y,m),x=[],v={positionedLines:x,text:y.toString(),top:h[1],bottom:h[1],left:h[0],right:h[0],writingMode:c,iconsInText:!1,verticalizable:!1};return mb(v,e,r,i,g,s,o,l,c,u,p,d),!ib(x)&&v}function qd(t){let e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function lb(t,e,r){let i=e.getMaxScale()*24,{maxImageWidth:n,maxImageHeight:a}=e.getMaxImageSize(t),s=Math.max(i,a*r);return{verticalLineContentWidth:Math.max(i,n*r),horizontalLineContentHeight:s}}function jd(t){switch(t){case"top":return 0;case"center":return .5;default:return 1}}function ub(t,e,r,i){var a;if(t!=null&&t.rect)return t;let n=(a=e[r.fontStack])==null?void 0:a[i];return n?{rect:null,metrics:n.metrics}:null}function hb(t,e,r){return!(t===1||!e&&!Qa(r)||e&&(ru(r)||zd(r)))}function da(t){return new RegExp("\\\\p{Nd}","u").test(String.fromCodePoint(t))}function Gd(t){return new RegExp("\\\\p{Lu}","u").test(String.fromCodePoint(t))}function cb(t){return/[\\p{P}\\p{S}]/u.test(String.fromCodePoint(t))}function pb(t){let e=t.some(da)&&t.every(i=>da(i)||cb(i)),r=t.length<=3&&t.every(i=>Gd(i)||da(i));return e||r}function fb(t){return(da(t)||Gd(t))&&!zd(t)}function db(t,e){let r=!1;for(let i=0;ia.codePointAt(0)),i=r.map(Qa),n=a=>!i[a]&&!ru(r[a])&&!("imageName"in t.getSection(a));for(let a=0;au){let p=Math.ceil(i/u);r*=p/n,n=p}return{x1:e,y1:r,x2:e+i,y2:r+n}}function Tc(t,e,r,i,n,a){let s=t.image,o;if(s.content){let m=s.content,g=s.pixelRatio||1;o=[m[0]/g,m[1]/g,s.displaySize[0]-m[2]/g,s.displaySize[1]-m[3]/g]}let l=e.left*a,u=e.right*a,h,c,p,f;r==="width"||r==="both"?(f=n[0]+l-i[3],c=n[0]+u+i[1]):(f=n[0]+(l+u-s.displaySize[0])/2,c=f+s.displaySize[0]);let d=e.top*a,y=e.bottom*a;return r==="height"||r==="both"?(h=n[1]+d-i[0],p=n[1]+y+i[2]):(h=n[1]+(d+y-s.displaySize[1])/2,p=h+s.displaySize[1]),{image:s,top:h,right:c,bottom:p,left:f,collisionPadding:o}}var Ic=32640;function Cc(t,e){let{expression:r}=e;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new st(t+1))};if(r.kind==="source")return{kind:"source"};if(r.kind==="composite"){let{minZoom:i,maxZoom:n}=Db(r.zoomStops,t);return{kind:"composite",minZoom:i,maxZoom:n,interpolationType:r.interpolationType}}{let i=_b(r),n=r.evaluate(new st(t+1));return{kind:"camera",zoomStops:r.zoomStops,sizes:i,layoutSize:n,interpolationType:r.interpolationType}}}function Db(t,e){let r=0;for(;rt.evaluate(new st(e===-1/0?t.zoomStops[1]-1:e)))}var Jr=class Yd extends B{constructor(e,r,i,n){super(e,r),this.angle=i,n!==void 0&&(this.segment=n)}clone(){return new Yd(this.x,this.y,this.angle,this.segment)}};C("Anchor",Jr);function Wd(t,e,r,i,n){if(e.segment===void 0||r===0)return!0;let a=e,s=e.segment+1,o=0;for(;o>-r/2;){if(s--,s<0)return!1;o-=t[s].dist(a),a=t[s]}o+=t[s].dist(t[s+1]),s++;let l=[],u=0;for(;oi;)u-=l.shift().angleDelta;if(u>n)return!1;s++,o+=c.dist(p)}return!0}function Zd(t){let e=0;for(let r=0;ru){let d=(u-l)/f,y=new Jr(gr.number(c.x,p.x,d),gr.number(c.y,p.y,d),p.angleTo(c),h);return y._round(),!s||Wd(t,y,o,s,e)?y:void 0}l+=f}}function Sb(t,e,r,i,n,a,s,o,l){let u=Hd(i,a,s),h=Kd(i,n),c=h*s,p=t[0].x===0||t[0].x===l||t[0].y===0||t[0].y===l;e-c=0&&b=0&&D=0&&p+u<=h){let A=new Jr(b,D,x,d);A._round(),(!i||Wd(t,A,a,i,n))&&f.push(A)}}c+=g}return!o&&!f.length&&!s&&(f=Jd(t,c/2,r,i,n,a,s,!0,l)),f}function Eb(t,e,r,i,n){let a=[];for(let s of t){let o;for(let l=0;l=i&&h.x>=i)&&(u.x>=i?u=new B(i,u.y+(h.y-u.y)*((i-u.x)/(h.x-u.x)))._round():h.x>=i&&(h=new B(i,u.y+(h.y-u.y)*((i-u.x)/(h.x-u.x)))._round()),!(u.y>=n&&h.y>=n)&&(u.y>=n?u=new B(u.x+(h.x-u.x)*((n-u.y)/(h.y-u.y)),n)._round():h.y>=n&&(h=new B(u.x+(h.x-u.x)*((n-u.y)/(h.y-u.y)),n)._round()),(!o||!u.equals(o[o.length-1]))&&(o=[u],a.push(o)),o.push(h)))))}}return a}function Qd(t,e,r,i,n,a){let s=Mc(t,e,r,n,0);return s=Mc(s,e,i,a,1),s}function Mc(t,e,r,i,n){switch(e){case 1:return Fb(t,r,i,n);case 2:return Bc(t,r,i,n,!1);case 3:return Bc(t,r,i,n,!0)}return[]}function Fb(t,e,r,i){let n=[];for(let a of t)for(let s of a){let o=i===0?s.x:s.y;o>=e&&o<=r&&n.push([s])}return n}function kb(t,e,r,i,n){let a=i===0?Tb:Ib,s=[],o=[];for(let h=0;he&&s.push(a(c,p,e)):f>r?d=e&&(s.push(a(c,p,e)),y=!0),d>r&&f<=r&&(s.push(a(c,p,r)),y=!0),!n&&y&&(o.push(s),s=[])}let l=t.length-1,u=i===0?t[l].x:t[l].y;return u>=e&&u<=r&&s.push(t[l]),n&&s.length>0&&!s[0].equals(s[s.length-1])&&s.push(new B(s[0].x,s[0].y)),s.length>0&&o.push(s),o}function Bc(t,e,r,i,n){let a=[];for(let s of t){let o=kb(s,e,r,i,n);o.length>0&&a.push(...o)}return a}function Tb(t,e,r){let i=(r-t.x)/(e.x-t.x);return new B(r,t.y+(e.y-t.y)*i)}function Ib(t,e,r){let i=(r-t.y)/(e.y-t.y);return new B(t.x+(e.x-t.x)*i,r)}function Pc(t,e,r,i){let n=[],a=t.image,s=a.pixelRatio,o=a.paddedRect.w-2,l=a.paddedRect.h-2,u={x1:t.left,y1:t.top,x2:t.right,y2:t.bottom},h=a.stretchX||[[0,o]],c=a.stretchY||[[0,l]],p=(F,$)=>F+$[1]-$[0],f=h.reduce(p,0),d=c.reduce(p,0),y=o-f,m=l-d,g=0,x=f,v=0,b=d,D=0,A=y,_=0,S=m;if(a.content&&i){let F=a.content,$=F[2]-F[0],U=F[3]-F[1];(a.textFitWidth||a.textFitHeight)&&(u=Xd(t)),g=ia(h,0,F[0]),v=ia(c,0,F[1]),x=ia(h,F[0],F[2]),b=ia(c,F[1],F[3]),D=F[0]-g,_=F[1]-v,A=$-x,S=U-b}let k=u.x1,z=u.y1,O=u.x2-k,P=u.y2-z,L=(F,$,U,T)=>{let q=na(F.stretch-g,x,O,k),at=aa(F.fixed-D,A,F.stretch,f),ot=na($.stretch-v,b,P,z),pt=aa($.fixed-_,S,$.stretch,d),Et=na(U.stretch-g,x,O,k),qt=aa(U.fixed-D,A,U.stretch,f),Ht=na(T.stretch-v,b,P,z),Ve=aa(T.fixed-_,S,T.stretch,d),ye=new B(q,ot),Kt=new B(Et,ot),Oe=new B(Et,Ht),kr=new B(q,Ht),rr=new B(at/s,pt/s),fi=new B(qt/s,Ve/s),kt=e*Math.PI/180;if(kt){let R=Math.sin(kt),J=Math.cos(kt),W=[J,-R,R,J];ye._matMult(W),Kt._matMult(W),kr._matMult(W),Oe._matMult(W)}let Ee=F.stretch+F.fixed,ir=U.stretch+U.fixed,Tr=$.stretch+$.fixed,Ir=T.stretch+T.fixed;return{tl:ye,tr:Kt,bl:kr,br:Oe,tex:{x:a.paddedRect.x+1+Ee,y:a.paddedRect.y+1+Tr,w:ir-Ee,h:Ir-Tr},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:rr,pixelOffsetBR:fi,minFontScaleX:A/s/O,minFontScaleY:S/s/P,isSDF:r}};if(!i||!a.stretchX&&!a.stretchY)n.push(L({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:o+1},{fixed:0,stretch:l+1}));else{let F=zc(h,y,f),$=zc(c,m,d);for(let U=0;U0&&(d=Math.max(10,d),this.circleDiameter=d)}else{let c=(h=a.image)!=null&&h.content&&(a.image.textFitWidth||a.image.textFitHeight)?Xd(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};c.y1=c.y1*s-o[0],c.y2=c.y2*s+o[2],c.x1=c.x1*s-o[3],c.x2=c.x2*s+o[1];let p=a.collisionPadding;if(p&&(c.x1-=p[0]*s,c.y1-=p[1]*s,c.x2+=p[2]*s,c.y2+=p[3]*s),u){let f=new B(c.x1,c.y1),d=new B(c.x2,c.y1),y=new B(c.x1,c.y2),m=new B(c.x2,c.y2),g=u*Math.PI/180;f._rotate(g),d._rotate(g),y._rotate(g),m._rotate(g),c.x1=Math.min(f.x,d.x,y.x,m.x),c.x2=Math.max(f.x,d.x,y.x,m.x),c.y1=Math.min(f.y,d.y,y.y,m.y),c.y2=Math.max(f.y,d.y,y.y,m.y)}t.emplaceBack(e.x,e.y,c.x1,c.y1,c.x2,c.y2,r,i,n)}this.boxEndIndex=t.length}},Mb=class{constructor(t=[],e=(r,i)=>ri)){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:r}=this,i=e[t];for(;t>0;){let n=t-1>>1,a=e[n];if(r(i,a)>=0)break;e[t]=a,t=n}e[t]=i}_down(t){let{data:e,compare:r}=this,i=this.length>>1,n=e[t];for(;t=0)break;e[t]=e[a],t=a}e[t]=n}};function Bb(t,e=1){let r=Fa.fromPoints(t[0]),i=Math.min(r.width(),r.height()),n=i/2,a=new Mb([],Pb),{minX:s,minY:o,maxX:l,maxY:u}=r;if(i===0)return new B(s,o);for(let p=s;pc.d||!c.d)&&(c=p),!(p.max-c.d<=e)&&(n=p.h/2,a.push(new qr(p.p.x-n,p.p.y-n,n,t)),a.push(new qr(p.p.x+n,p.p.y-n,n,t)),a.push(new qr(p.p.x-n,p.p.y+n,n,t)),a.push(new qr(p.p.x+n,p.p.y+n,n,t)))}return h.d>0&&c.d-h.d<=e?h.p:c.p}function Pb(t,e){return e.max-t.max}var qr=class{constructor(t,e,r,i){this.p=new B(t,e),this.h=r,this.d=zb(this.p,i),this.max=this.d+this.h*Math.SQRT2}};function zb(t,e){let r=!1,i=1/0;for(let n of e)for(let a=0,s=n.length,o=s-1;at.y!=u.y>t.y&&t.x<(u.x-l.x)*(t.y-l.y)/(u.y-l.y)+l.x&&(r=!r),i=Math.min(i,td(t,l,u))}return(r?1:-1)*Math.sqrt(i)}function Lb(t){let e=0,r=0,i=0,n=t[0];for(let a=0,s=n.length,o=s-1;ap*24);h.startsWith("top")?c[1]-=7:h.startsWith("bottom")&&(c[1]+=7),l[u+1]=c}return new De(l)}let a=i.get("text-variable-anchor");if(a){let o;o=t._unevaluatedLayout.getValue("text-radial-offset")===void 0?i.get("text-offset").evaluate(e,{},r).map(u=>u*24):[i.get("text-radial-offset").evaluate(e,{},r)*24,lu];let l=[];for(let u of a)l.push(u,ty(u,o));return new De(l)}return null}function Ob(t){var h,c;t.bucket.createArrays();let e=512*t.bucket.overscaling;t.bucket.tilePixelRatio=mt/e,t.bucket.compareText={},t.bucket.iconsNeedLinear=!1;let r=t.bucket.layers[0],i=r.layout,n=r._unevaluatedLayout._values,a={layoutIconSize:n["icon-size"].possiblyEvaluate(new st(t.bucket.zoom+1),t.canonical),layoutTextSize:n["text-size"].possiblyEvaluate(new st(t.bucket.zoom+1),t.canonical),textMaxSize:n["text-size"].possiblyEvaluate(new st(18))};if(t.bucket.textSizeData.kind==="composite"){let{minZoom:p,maxZoom:f}=t.bucket.textSizeData;a.compositeTextSizes=[n["text-size"].possiblyEvaluate(new st(p),t.canonical),n["text-size"].possiblyEvaluate(new st(f),t.canonical)]}if(t.bucket.iconSizeData.kind==="composite"){let{minZoom:p,maxZoom:f}=t.bucket.iconSizeData;a.compositeIconSizes=[n["icon-size"].possiblyEvaluate(new st(p),t.canonical),n["icon-size"].possiblyEvaluate(new st(f),t.canonical)]}let s=i.get("text-line-height")*24,o=i.get("text-rotation-alignment")!=="viewport"&&i.get("symbol-placement")!=="point",l=i.get("text-keep-upright"),u=i.get("text-size");for(let p of t.bucket.features){let f=i.get("text-font").evaluate(p,{},t.canonical).join(","),d=u.evaluate(p,{},t.canonical),y=a.layoutTextSize.evaluate(p,{},t.canonical),m=a.layoutIconSize.evaluate(p,{},t.canonical),g={horizontal:{},vertical:void 0},x=p.text,v=[0,0];if(x){let _=x.toString(),S=i.get("text-letter-spacing").evaluate(p,{},t.canonical)*24,k=bv(_)?S:0,z=i.get("text-anchor").evaluate(p,{},t.canonical),O=ey(r,p,t.canonical);if(!O){let $=i.get("text-radial-offset").evaluate(p,{},t.canonical);v=$?ty(z,[$*24,lu]):i.get("text-offset").evaluate(p,{},t.canonical).map(U=>U*24)}let P=o?"center":i.get("text-justify").evaluate(p,{},t.canonical),L=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(p,{},t.canonical)*24:1/0,F=()=>{t.bucket.allowVerticalPlacement&&el(_)&&(g.vertical=ra(x,t.glyphMap,t.glyphPositions,t.imagePositions,f,L,s,z,"left",k,v,2,!0,y,d))};if(!o&&O){let $=new Set;if(P==="auto")for(let T=0;T{T.x<0||T.x>=8192||T.y<0||T.y>=8192||Nb(t,T,U,r,i,n,L,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,[D,D,D,D],S,l,v,A,k,d,e,a,u,h,s)};if(z==="line")for(let U of Eb(e.geometry,0,0,mt,mt)){let T=cr(U,F),q=Sb(T,b,_,r.vertical||y,i,24,x,t.overscaling,mt);for(let at of q){let ot=y;(!ot||!Ub(t,ot.text,O,at))&&$(T,at)}}else if(z==="line-center"){for(let U of e.geometry)if(U.length>1){let T=cr(U,F),q=Ab(T,_,r.vertical||y,i,24,x);q&&$(T,q)}}else if(e.type==="Polygon")for(let U of Ra(e.geometry,0)){let T=Bb(U,16);$(cr(U[0],F,!0),new Jr(T.x,T.y,0))}else if(e.type==="LineString")for(let U of e.geometry){let T=cr(U,F);$(T,new Jr(T[0].x,T[0].y,0))}else if(e.type==="Point")for(let U of e.geometry)for(let T of U)$([T],new Jr(T.x,T.y,0))}function $b(t,e){let r=t.length,i=e==null?void 0:e.values;if((i==null?void 0:i.length)>0)for(let n=0;n32640&&Bt(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):g.kind==="composite"&&(x=[128*d.compositeTextSizes[0].evaluate(s,{},y),128*d.compositeTextSizes[1].evaluate(s,{},y)],(x[0]>32640||x[1]>32640)&&Bt(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),t.addSymbols(t.text,m,x,o,a,s,h,e,u.lineStartIndex,u.lineLength,f,y,l);for(let v of c)p[v]=t.text.placedSymbolArray.length-1;return m.length*4}function ry(t){for(let e in t)return t[e];return null}function Nb(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S){let k=t.addToLineVertexArray(e,r),z=o.layout.get("symbol-height-offset").evaluate(b,{},_);z>t.maxHeightOffset&&(t.maxHeightOffset=z);let O,P,L,F,$=0,U=0,T=0,q=0,at=-1,ot=-1,pt={},Et=(0,Mo.default)("");if(t.allowVerticalPlacement&&i.vertical){let J=o.layout.get("text-rotate").evaluate(b,{},_)+90,W=i.vertical;L=new sa(l,e,u,h,c,W,p,f,d,J),s&&(F=new sa(l,e,u,h,c,s,m,g,d,J))}if(n){let J=o.layout.get("icon-rotate").evaluate(b,{}),W=o.layout.get("icon-text-fit")!=="none",M=Pc(n,J,A,W),ut=s?Pc(s,J,A,W):void 0;P=new sa(l,e,u,h,c,n,m,g,!1,J),$=M.length*4;let X=t.iconSizeData,G=null;X.kind==="source"?(G=[128*o.layout.get("icon-size").evaluate(b,{})],G[0]>32640&&Bt(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):X.kind==="composite"&&(G=[128*D.compositeIconSizes[0].evaluate(b,{},_),128*D.compositeIconSizes[1].evaluate(b,{},_)],(G[0]>32640||G[1]>32640)&&Bt(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),t.addSymbols(t.icon,M,G,v,x,b,0,e,k.lineStartIndex,k.lineLength,-1,_,z),at=t.icon.placedSymbolArray.length-1,ut&&(U=ut.length*4,t.addSymbols(t.icon,ut,G,v,x,b,2,e,k.lineStartIndex,k.lineLength,-1,_,z),ot=t.icon.placedSymbolArray.length-1)}let qt=Object.keys(i.horizontal);for(let J of qt){let W=i.horizontal[J];O||(O=(Et=(0,Mo.default)(W.text),new sa(l,e,u,h,c,W,p,f,d,o.layout.get("text-rotate").evaluate(b,{},_))));let M=W.positionedLines.length===1;if(T+=Vc(t,e,W,a,o,d,b,y,z,k,i.vertical?1:3,M?qt:[J],pt,at,D,_),M)break}i.vertical&&(q+=Vc(t,e,i.vertical,a,o,d,b,y,z,k,2,["vertical"],pt,ot,D,_));let Ht=O?O.boxStartIndex:t.collisionBoxArray.length,Ve=O?O.boxEndIndex:t.collisionBoxArray.length,ye=L?L.boxStartIndex:t.collisionBoxArray.length,Kt=L?L.boxEndIndex:t.collisionBoxArray.length,Oe=P?P.boxStartIndex:t.collisionBoxArray.length,kr=P?P.boxEndIndex:t.collisionBoxArray.length,rr=F?F.boxStartIndex:t.collisionBoxArray.length,fi=F?F.boxEndIndex:t.collisionBoxArray.length,kt=-1,Ee=(J,W)=>J!=null&&J.circleDiameter?Math.max(J.circleDiameter,W):W;kt=Ee(O,kt),kt=Ee(L,kt),kt=Ee(P,kt),kt=Ee(F,kt);let ir=+(kt>-1);ir&&(kt*=S/24),t.glyphOffsetArray.length>=t.maxGlyphs&&Bt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),b.sortKey!==void 0&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);let Tr=ey(o,b,_),[Ir,R]=$b(t.textAnchorOffsets,Tr);t.symbolInstances.emplaceBack(e.x,e.y,pt.right>=0?pt.right:-1,pt.center>=0?pt.center:-1,pt.left>=0?pt.left:-1,pt.vertical||-1,at,ot,Et,Ht,Ve,ye,Kt,Oe,kr,rr,fi,u,T,q,$,U,ir,0,p,kt,Ir,R,z)}function Ub(t,e,r,i){let n=t.compareText;if(!(e in n))n[e]=[];else{let a=n[e];for(let s=a.length-1;s>=0;s--)if(i.dist(a[s])s.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Cc(this.zoom,e["text-size"]),this.iconSizeData=Cc(this.zoom,e["icon-size"]);let r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap=Oc(r,"text-overlap","text-allow-overlap")!=="never"||Oc(r,"icon-overlap","icon-allow-overlap")!=="never"||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey=n!=="viewport-y"&&!i.isConstant();let a=n==="viewport-y"||n==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,r.get("symbol-placement")==="point"&&(this.writingModes=r.get("text-writing-mode").map(s=>Nd[s])),this.stateDependentLayerIds=this.layers.filter(s=>s.isStateDependent()).map(s=>s.id),this.sourceID=t.sourceID}createArrays(){this.text=new al(new vr(this.layers,this.zoom,t=>t.startsWith("text"))),this.icon=new al(new vr(this.layers,this.zoom,t=>t.startsWith("icon"))),this.glyphOffsetArray=new Uf,this.lineVertexArray=new qf,this.symbolInstances=new Nf,this.textAnchorOffsets=new Gf}calculateGlyphDependencies(t,e,r,i,n){var l;let a=(i||this.allowVerticalPlacement)&&n,s=iu.fromFeature(t,r),o=s.graphemes();for(let u=0;u0)&&(a.value.kind!=="constant"||a.value.value.length>0),u=o.value.kind!=="constant"||!!o.value.value||Object.keys(o.parameters).length>0,h=n.get("symbol-sort-key");if(this.features=[],!l&&!u)return;let c=e.iconDependencies,p=e.glyphDependencies,f=e.availableImages,d=new st(this.zoom);for(let{feature:m,id:g,index:x,sourceLayerIndex:v}of t){let b=i._featureFilter.needGeometry,D=hi(m,b);if(!i._featureFilter.filter(d,D,r))continue;b||(D.geometry=Ar(m));let A;if(l){let z=i.getValueAndResolveTokens("text-field",D,r,f),O=ze.factory(z);this.hasRTLText||(this.hasRTLText=Gb(O)),A=gv(O,i,D)}let _;if(u){let z=i.getValueAndResolveTokens("icon-image",D,r,f);_=z instanceof _e?z:_e.fromString(z)}if(!A&&!_)continue;let S=this.sortFeaturesByKey?h.evaluate(D,{},r):void 0,k={id:g,text:A,icon:_,index:x,sourceLayerIndex:v,geometry:D.geometry,properties:m.properties,type:Dn.types[m.type],sortKey:S};if(this.features.push(k),_&&(c[_.name]=!0),A){let z=a.evaluate(D,{},r).join(","),O=n.get("text-rotation-alignment")!=="viewport"&&n.get("symbol-placement")!=="point";this.allowVerticalPlacement=(y=this.writingModes)==null?void 0:y.includes(2);let P=el(A.toString());this.calculateGlyphDependencies(A,p,z,O,P);for(let L of A.sections)L.image&&(c[L.image.name]=!0)}}n.get("symbol-placement")==="line"&&(this.features=xv(this.features)),this.sortFeaturesByKey&&this.features.sort((m,g)=>m.sortKey-g.sortKey)}update(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}))}addFeatures({options:t,canonical:e,glyphMap:r,glyphPositions:i,iconMap:n,iconPositions:a,showCollisionBoxes:s}){Ob({bucket:this,glyphMap:r,glyphPositions:i,imageMap:n,imagePositions:a,showCollisionBoxes:s,canonical:e,subdivisionGranularity:t.subdivisionGranularity})}isEmpty(){return this.symbolInstances.length===0}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,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(t,e){let r=this.lineVertexArray.length;if(t.segment!==void 0){let i=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),a={};for(let s=t.segment+1;s=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s>0&&(n+=e[s-1].dist(e[s]));for(let s=0;s0}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(t,e){let r=t.placedSymbolArray.get(e),i=r.vertexStartIndex+r.numGlyphs*4;for(let n=r.vertexStartIndex;ni[s]-i[o]||n[o]-n[s]),a}addToSortKeyRanges(t,e){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];(r==null?void 0:r.sortKey)===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let e of this.symbolInstanceIndexes){let r=this.symbolInstances.get(e);this.featureSortOrder.push(r.featureIndex);let i=[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex];for(let n=0;n=0&&i.indexOf(a)===n&&this.addIndicesForPlacedSymbol(this.text,a)}r.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,r.verticalPlacedTextSymbolIndex),r.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.placedIconSymbolIndex),r.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}};C("SymbolBucket",iy,{omit:["layers","collisionBoxArray","features","compareText"]});function Xb(t,e){return e.replace(/{([^{}]+)}/g,(r,i)=>t&&i in t?String(t[i]):"")}var Yb,Wb=()=>Yb||(Yb=new Xt({"symbol-placement":new V(w.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new V(w.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new V(w.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new N(w.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new V(w.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new V(w.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new V(w.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new V(w.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new V(w.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new N(w.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new N(w.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new V(w.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new V(w.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new N(w.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new N(w.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new N(w.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new V(w.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new N(w.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new N(w.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new V(w.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new V(w.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new V(w.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new N(w.layout_symbol["text-field"],"text-field"),"text-font":new N(w.layout_symbol["text-font"],"text-font"),"text-size":new N(w.layout_symbol["text-size"],"text-size"),"text-max-width":new N(w.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new V(w.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new N(w.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new N(w.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new N(w.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new V(w.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new N(w.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new N(w.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new V(w.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new V(w.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new N(w.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new V(w.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new V(w.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new N(w.layout_symbol["text-transform"],"text-transform"),"text-offset":new N(w.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new V(w.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new V(w.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new V(w.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new V(w.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new N(w.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new V(w.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})),Zb,Hb=()=>Zb||(Zb=new Xt({"icon-opacity":new N(w.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new N(w.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new N(w.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new N(w.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new N(w.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new V(w.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new V(w.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new N(w.paint_symbol["text-opacity"],"text-opacity"),"text-color":new N(w.paint_symbol["text-color"],"text-color",{runtimeType:ce,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new N(w.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new N(w.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new N(w.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new V(w.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new V(w.paint_symbol["text-translate-anchor"],"text-translate-anchor")})),Ys={get paint(){return Hb()},get layout(){return Wb()}},ny=class{constructor(t){if(t.property.overrides===void 0)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:dn,this.defaultValue=t}evaluate(t){if(t.formattedSection){let e=this.defaultValue.property.overrides;if(e!=null&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){if(!this.defaultValue.isConstant()){let e=this.defaultValue.value;t(e._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}};C("FormatSectionOverride",ny,{omit:["defaultValue"]});var Kb=class ol extends de{constructor(e,r){super(e,Ys,r)}recalculate(e,r){super.recalculate(e,r);let i=this.layout.get("icon-rotation-alignment");if((i.value.kind!=="constant"||i.value.value==="auto")&&(this.layout._values["icon-rotation-alignment"]=new se(i.property,{kind:"constant",value:this.layout.get("symbol-placement")==="point"?"viewport":"map"},i.parameters)),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="point"?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),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").constantOr("viewport")),this.layout.get("symbol-placement")==="point"){let n=this.layout.get("text-writing-mode");if(n){let a=[];for(let s of n)a.includes(s)||a.push(s);this.layout._values["text-writing-mode"]=a}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,r,i,n){let a=this.layout.get(e).evaluate(r,{},i,n),s=this._unevaluatedLayout._values[e];return!s.isDataDriven()&&!ja(s.value)&&a?Xb(r.properties,a):a}createBucket(e){return new iy(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of Ys.paint.overridableProperties){if(!ol.hasPaintOverride(this.layout,e))continue;let r=this.paint.get(e),i=new Il(new ny(r),`layers[${this.id}].paint.${r.property.name}`,r.property.specification),n=null;n=r.value.kind==="constant"||r.value.kind==="source"?new an("source",i):new wa("composite",i,r.value.zoomStops),this.paint._values[e]=new se(r.property,n,r.parameters)}}_handleOverridablePaintPropertyUpdate(e,r,i){return!this.layout||r.isDataDriven()||i.isDataDriven()?!1:ol.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,r){let i=e.get("text-field"),n=Ys.paint.properties[r],a=!1,s=o=>{var l;for(let u of o)if((l=n.overrides)!=null&&l.hasOverride(u)){a=!0;return}};if(i.value.kind==="constant"&&i.value.value instanceof ze)s(i.value.value.sections);else if(i.value.kind==="source"||i.value.kind==="composite"){let o=u=>{if(!a)if(u instanceof ri&&_t(u.value)===yn){let h=u.value;s(h.sections)}else u instanceof Ep?s(u.sections):u.eachChild(o)},l=i.value;l._styleExpression&&o(l._styleExpression.expression)}return a}};function Jb(t,e,r,i=1){var a;let n=(a=t.get("icon-padding").evaluate(e,{},r))==null?void 0:a.values;return[n[0]*i,n[1]*i,n[2]*i,n[3]*i]}var Qb,tw=()=>Qb||(Qb=new Xt({"background-color":new V(w.paint_background["background-color"],"background-color"),"background-pattern":new Lf(w.paint_background["background-pattern"],"background-pattern"),"background-opacity":new V(w.paint_background["background-opacity"],"background-opacity")})),ew={get paint(){return tw()}};var rw=class extends de{constructor(t,e){super(t,ew,e)}};var iw=class extends de{constructor(t,e){super(t,{},e),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=t}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}};function ay(t,e){if(t.type==="custom")return new iw(t,e);switch(t.type){case"background":return new rw(t,e);case"circle":return new Bg(t,e);case"color-relief":return new Yg(t,e);case"fill":return new Ex(t,e);case"fill-extrusion":return new Hx(t,e);case"heatmap":return new Rg(t,e);case"hillshade":return new qg(t,e);case"line":return new G2(t,e);case"raster":return new Xm(t,e);case"symbol":return new Kb(t,e)}}var nw=class{constructor(t){this._methodToThrottle=t,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var t;this._triggered||(this._triggered=!0,(t=this._channel)==null||t.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}},aw={once:!0},sy=class{constructor(t,e){this.target=t,this.mapId=e,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new nw(()=>this.process()),this.subscription=hh(this.target,"message",r=>this.receive(r),!1),this.globalScope=mr(self)?t:window}registerMessageHandler(t,e){this.messageHandlers[t]=e}unregisterMessageHandler(t){delete this.messageHandlers[t]}sendAsync(t,e){return new Promise((r,i)=>{let n=Math.round(Math.random()*1e18).toString(36).substring(0,10),a=e?hh(e.signal,"abort",()=>{a==null||a.unsubscribe(),delete this.resolveRejects[n];let l={id:n,type:"",origin:location.origin,targetMapId:t.targetMapId,sourceMapId:this.mapId};this.target.postMessage(l),i(new dl(e.signal.reason))},aw):null;this.resolveRejects[n]={resolve:l=>{a==null||a.unsubscribe(),r(l)},reject:l=>{a==null||a.unsubscribe(),i(l)}};let s=[],o=Si(je({},t),{id:n,sourceMapId:this.mapId,origin:location.origin,data:Yi(t.data,s)});this.target.postMessage(o,{transfer:s})})}receive(t){let e=t.data,r=e.id,i=["file://","resource://android","null"],n=[e.origin,location.origin],a=e.origin===location.origin,s=n.some(o=>i.includes(o));if((a||s)&&!(e.targetMapId&&this.mapId!==e.targetMapId)){if(e.type===""){delete this.tasks[r];let o=this.abortControllers[r];delete this.abortControllers[r],o&&o.abort();return}if(mr(self)||e.mustQueue){this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger();return}this.processTask(r,e)}}process(){if(this.taskQueue.length===0)return;let t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length>0&&this.invoker.trigger(),e&&this.processTask(t,e)}processTask(t,e){return rt(this,null,function*(){if(e.type===""){let n=this.resolveRejects[t];if(delete this.resolveRejects[t],!n)return;e.error?n.reject(Ki(Wi(e.error))):n.resolve(Wi(e.data));return}if(!this.messageHandlers[e.type]){this.completeTask(t,null,null);return}let r=Wi(e.data),i=new AbortController;this.abortControllers[t]=i;try{let n=yield this.messageHandlers[e.type](e.sourceMapId,r,i);this.completeTask(t,null,n)}catch(n){this.completeTask(t,Ki(n))}})}completeTask(t,e,r){let i=[];delete this.abortControllers[t];let n={id:t,type:"",sourceMapId:this.mapId,origin:location.origin,error:e?Yi(e):null,data:Yi(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}};function sw(t,e,r){return!(t<0||t>25||r<0||r>=2**t||e<0||e>=2**t)}var oy=class{constructor(t,e,r){if(!sw(t,e,r))throw Error(`x=${e}, y=${r}, z=${t} outside of bounds. 0<=x<${2**t}, 0<=y<${2**t} 0<=z<=25 `);this.z=t,this.x=e,this.y=r,this.key=Hi(0,t,t,e,r)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e,r){let i=lw(this.x,this.y,this.z),n=uw(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(r==="tms"?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,e>1?"@2x":"").replace(/{quadkey}/g,n).replace(/{bbox-epsg-3857}/g,i)}isChildOf(t){let e=this.z-t.z;return e>0&&t.x===this.x>>e&&t.y===this.y>>e}getTilePoint(t){let e=2**this.z;return new B((t.x*e-this.x)*mt,(t.y*e-this.y)*mt)}toString(){return`${this.z}/${this.x}/${this.y}`}},ow=class{constructor(t,e){this.wrap=t,this.canonical=e,this.key=Hi(t,e.z,e.z,e.x,e.y)}},uu=class ne{constructor(e,r,i,n,a){if(this.terrainRttPosMatrix32f=null,e= z; overscaledZ = ${e}; z = ${i}`);this.overscaledZ=e,this.wrap=r,this.canonical=new oy(i,+n,+a),this.key=Hi(r,e,i,n,a)}clone(){return new ne(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?new ne(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ne(e,this.wrap,e,this.canonical.x>>r,this.canonical.y>>r)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,r){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let i=this.canonical.z-e;return e>this.canonical.z?Hi(this.wrap*+r,e,this.canonical.z,this.canonical.x,this.canonical.y):Hi(this.wrap*+r,e,e,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(e.overscaledZ===0)return this.overscaledZ>0;let r=this.canonical.z-e.canonical.z;return r<0?!1:e.canonical.x===this.canonical.x>>r&&e.canonical.y===this.canonical.y>>r}children(e){if(this.overscaledZ>=e)return[new ne(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,i=this.canonical.x*2,n=this.canonical.y*2;return[new ne(r,this.wrap,r,i,n),new ne(r,this.wrap,r,i+1,n),new ne(r,this.wrap,r,i,n+1),new ne(r,this.wrap,r,i+1,n+1)]}isLessThan(e){return this.wrape.wrap?!1:this.overscaledZe.overscaledZ?!1:this.canonical.xe.canonical.x?!1:this.canonical.y=0&&e=0&&r=u)return null;let c=this.canonical.x+n,p=this.wrap;return c<0?(p-=Math.ceil(-c/u),c=(c%u+u)%u):c>=u&&(p+=Math.floor(c/u),c%=u),{tileID:new ne(this.overscaledZ,p,l,c,h),x:s,y:o}}};function Hi(t,e,r,i,n){t*=2,t<0&&(t=t*-1-1);let a=1<0;n--){let a=1<pw(n,a,r),t.layers[i])}function pw(t,e,r=""){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);let i={jsonPrefix:r,keys:[],values:[],keycache:{},valuecache:{}};for(let s=0;s>31}function yw(t,e){let r=t.loadGeometry(),i=t.type,n=0,a=0;for(let s of r){let o=1;i===1&&(o=s.length),e.writeVarint(Zs(1,o));let l=i===3?s.length-1:s.length;for(let u=0;u=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${t} can\'t be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}},gw=class{constructor(t,e,r,i,n){this.type="Feature",this._vectorTileFeature=t,this._x=r,this._y=i,this._z=e;for(let a in t.properties)typeof t.properties[a]=="string"&&t.properties[a].startsWith("__$json__:")&&(t.properties[a]=JSON.parse(t.properties[a].slice(10)));this.properties=t.properties,this.id=n}projectPoint(t,e,r,i){return[(t.x+e)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(t.y+r)*2/i)*Math.PI))-90]}projectLine(t,e,r,i){return t.map(n=>this.projectPoint(n,e,r,i))}get geometry(){if(this._geometry)return this._geometry;let t=this._vectorTileFeature,e=t.extent*2**this._z,r=t.extent*this._x,i=t.extent*this._y,n=t.loadGeometry();switch(t.type){case 1:{let a=[];for(let o of n)a.push(o[0]);let s=this.projectLine(a,r,i,e);this._geometry=a.length===1?{type:"Point",coordinates:s[0]}:{type:"MultiPoint",coordinates:s};break}case 2:{let a=n.map(s=>this.projectLine(s,r,i,e));this._geometry=a.length===1?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a};break}case 3:{let a=dd(n),s=[];for(let o of a)s.push(o.map(l=>this.projectLine(l,r,i,e)));this._geometry=s.length===1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s};break}default:throw Error(`unknown feature type: ${t.type}`)}return this._geometry}set geometry(t){this._geometry=t}toJSON(){let t={geometry:this.geometry};for(let e in this)e!=="_geometry"&&e!=="_vectorTileFeature"&&e!=="_x"&&e!=="_y"&&e!=="_z"&&(t[e]=this[e]);return t}},Sr=class{constructor(t,e,r){this._name=t,this.dataBuffer=e,typeof r=="number"?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(t){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(t)?null:this.getValueFromBuffer(t)}has(t){var e;return((e=this.nullabilityBuffer)==null?void 0:e.get(t))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},ts=class extends Sr{},pu=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},fu=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},uy=class extends Sr{constructor(t,e,r,i){super(t,e,i),this.delta=r}},du=class extends uy{constructor(t,e,r,i,n){super(t,n?Int32Array.of(e):Uint32Array.of(e),r,i)}getValueFromBuffer(t){return this.dataBuffer[0]+t*this.delta}},yu=class extends Sr{constructor(t,e,r,i){super(t,i?Int32Array.of(e):Uint32Array.of(e),r)}getValueFromBuffer(t){return this.dataBuffer[0]}},xw=class{constructor(t,e,r,i,n=4096){if(this._name=t,this._geometryVector=e,this._idVector=r,this._propertyVectors=i,this._extent=n,t.length===0)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){var t;return(t=this._propertyVectors)!=null?t:[]}getPropertyVector(t){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this.propertyVectors.map(e=>[e.name,e]))),this.propertyVectorsMap.get(t)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let t=[],e=this.geometryVector.getGeometries();for(let r=0;r>>32-t;var ul=mu,py=65536;function gu(t,e){return t-t%e}function vw(t){return gu(t+31,32)}function bw(t){if(!Number.isFinite(t)||t<=0)return py;let e=gu(Math.floor(t),256);return e===0?256:e}function ww(t){let e=t>>>0;return((e&255)<<24|(e&65280)<<8|e>>>8&65280|e>>>24&255)>>>0}function Dw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0;r[n++]=a>>>0&3,r[n++]=a>>>2&3,r[n++]=a>>>4&3,r[n++]=a>>>6&3,r[n++]=a>>>8&3,r[n++]=a>>>10&3,r[n++]=a>>>12&3,r[n++]=a>>>14&3,r[n++]=a>>>16&3,r[n++]=a>>>18&3,r[n++]=a>>>20&3,r[n++]=a>>>22&3,r[n++]=a>>>24&3,r[n++]=a>>>26&3,r[n++]=a>>>28&3,r[n++]=a>>>30&3,r[n++]=s>>>0&3,r[n++]=s>>>2&3,r[n++]=s>>>4&3,r[n++]=s>>>6&3,r[n++]=s>>>8&3,r[n++]=s>>>10&3,r[n++]=s>>>12&3,r[n++]=s>>>14&3,r[n++]=s>>>16&3,r[n++]=s>>>18&3,r[n++]=s>>>20&3,r[n++]=s>>>22&3,r[n++]=s>>>24&3,r[n++]=s>>>26&3,r[n++]=s>>>28&3,r[n]=s>>>30&3}function _w(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0;r[n++]=a>>>0&7,r[n++]=a>>>3&7,r[n++]=a>>>6&7,r[n++]=a>>>9&7,r[n++]=a>>>12&7,r[n++]=a>>>15&7,r[n++]=a>>>18&7,r[n++]=a>>>21&7,r[n++]=a>>>24&7,r[n++]=a>>>27&7,r[n++]=(a>>>30|(s&1)<<2)&7,r[n++]=s>>>1&7,r[n++]=s>>>4&7,r[n++]=s>>>7&7,r[n++]=s>>>10&7,r[n++]=s>>>13&7,r[n++]=s>>>16&7,r[n++]=s>>>19&7,r[n++]=s>>>22&7,r[n++]=s>>>25&7,r[n++]=s>>>28&7,r[n++]=(s>>>31|(o&3)<<1)&7,r[n++]=o>>>2&7,r[n++]=o>>>5&7,r[n++]=o>>>8&7,r[n++]=o>>>11&7,r[n++]=o>>>14&7,r[n++]=o>>>17&7,r[n++]=o>>>20&7,r[n++]=o>>>23&7,r[n++]=o>>>26&7,r[n]=o>>>29&7}function Aw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0;r[n++]=a>>>0&15,r[n++]=a>>>4&15,r[n++]=a>>>8&15,r[n++]=a>>>12&15,r[n++]=a>>>16&15,r[n++]=a>>>20&15,r[n++]=a>>>24&15,r[n++]=a>>>28&15,r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15,r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n]=l>>>28&15}function Sw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0;r[n++]=a>>>0&31,r[n++]=a>>>5&31,r[n++]=a>>>10&31,r[n++]=a>>>15&31,r[n++]=a>>>20&31,r[n++]=a>>>25&31,r[n++]=(a>>>30|(s&7)<<2)&31,r[n++]=s>>>3&31,r[n++]=s>>>8&31,r[n++]=s>>>13&31,r[n++]=s>>>18&31,r[n++]=s>>>23&31,r[n++]=(s>>>28|(o&1)<<4)&31,r[n++]=o>>>1&31,r[n++]=o>>>6&31,r[n++]=o>>>11&31,r[n++]=o>>>16&31,r[n++]=o>>>21&31,r[n++]=o>>>26&31,r[n++]=(o>>>31|(l&15)<<1)&31,r[n++]=l>>>4&31,r[n++]=l>>>9&31,r[n++]=l>>>14&31,r[n++]=l>>>19&31,r[n++]=l>>>24&31,r[n++]=(l>>>29|(u&3)<<3)&31,r[n++]=u>>>2&31,r[n++]=u>>>7&31,r[n++]=u>>>12&31,r[n++]=u>>>17&31,r[n++]=u>>>22&31,r[n]=u>>>27&31}function Ew(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0;r[n++]=a>>>0&63,r[n++]=a>>>6&63,r[n++]=a>>>12&63,r[n++]=a>>>18&63,r[n++]=a>>>24&63,r[n++]=(a>>>30|(s&15)<<2)&63,r[n++]=s>>>4&63,r[n++]=s>>>10&63,r[n++]=s>>>16&63,r[n++]=s>>>22&63,r[n++]=(s>>>28|(o&3)<<4)&63,r[n++]=o>>>2&63,r[n++]=o>>>8&63,r[n++]=o>>>14&63,r[n++]=o>>>20&63,r[n++]=o>>>26&63,r[n++]=l>>>0&63,r[n++]=l>>>6&63,r[n++]=l>>>12&63,r[n++]=l>>>18&63,r[n++]=l>>>24&63,r[n++]=(l>>>30|(u&15)<<2)&63,r[n++]=u>>>4&63,r[n++]=u>>>10&63,r[n++]=u>>>16&63,r[n++]=u>>>22&63,r[n++]=(u>>>28|(h&3)<<4)&63,r[n++]=h>>>2&63,r[n++]=h>>>8&63,r[n++]=h>>>14&63,r[n++]=h>>>20&63,r[n]=h>>>26&63}function Fw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0;r[n++]=a>>>0&127,r[n++]=a>>>7&127,r[n++]=a>>>14&127,r[n++]=a>>>21&127,r[n++]=(a>>>28|(s&7)<<4)&127,r[n++]=s>>>3&127,r[n++]=s>>>10&127,r[n++]=s>>>17&127,r[n++]=s>>>24&127,r[n++]=(s>>>31|(o&63)<<1)&127,r[n++]=o>>>6&127,r[n++]=o>>>13&127,r[n++]=o>>>20&127,r[n++]=(o>>>27|(l&3)<<5)&127,r[n++]=l>>>2&127,r[n++]=l>>>9&127,r[n++]=l>>>16&127,r[n++]=l>>>23&127,r[n++]=(l>>>30|(u&31)<<2)&127,r[n++]=u>>>5&127,r[n++]=u>>>12&127,r[n++]=u>>>19&127,r[n++]=(u>>>26|(h&1)<<6)&127,r[n++]=h>>>1&127,r[n++]=h>>>8&127,r[n++]=h>>>15&127,r[n++]=h>>>22&127,r[n++]=(h>>>29|(c&15)<<3)&127,r[n++]=c>>>4&127,r[n++]=c>>>11&127,r[n++]=c>>>18&127,r[n]=c>>>25&127}function kw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0;r[n++]=a>>>0&255,r[n++]=a>>>8&255,r[n++]=a>>>16&255,r[n++]=a>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n]=p>>>24&255}function Tw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0;r[n++]=a>>>0&511,r[n++]=a>>>9&511,r[n++]=a>>>18&511,r[n++]=(a>>>27|(s&15)<<5)&511,r[n++]=s>>>4&511,r[n++]=s>>>13&511,r[n++]=s>>>22&511,r[n++]=(s>>>31|(o&255)<<1)&511,r[n++]=o>>>8&511,r[n++]=o>>>17&511,r[n++]=(o>>>26|(l&7)<<6)&511,r[n++]=l>>>3&511,r[n++]=l>>>12&511,r[n++]=l>>>21&511,r[n++]=(l>>>30|(u&127)<<2)&511,r[n++]=u>>>7&511,r[n++]=u>>>16&511,r[n++]=(u>>>25|(h&3)<<7)&511,r[n++]=h>>>2&511,r[n++]=h>>>11&511,r[n++]=h>>>20&511,r[n++]=(h>>>29|(c&63)<<3)&511,r[n++]=c>>>6&511,r[n++]=c>>>15&511,r[n++]=(c>>>24|(p&1)<<8)&511,r[n++]=p>>>1&511,r[n++]=p>>>10&511,r[n++]=p>>>19&511,r[n++]=(p>>>28|(f&31)<<4)&511,r[n++]=f>>>5&511,r[n++]=f>>>14&511,r[n]=f>>>23&511}function Iw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0;r[n++]=a>>>0&1023,r[n++]=a>>>10&1023,r[n++]=a>>>20&1023,r[n++]=(a>>>30|(s&255)<<2)&1023,r[n++]=s>>>8&1023,r[n++]=s>>>18&1023,r[n++]=(s>>>28|(o&63)<<4)&1023,r[n++]=o>>>6&1023,r[n++]=o>>>16&1023,r[n++]=(o>>>26|(l&15)<<6)&1023,r[n++]=l>>>4&1023,r[n++]=l>>>14&1023,r[n++]=(l>>>24|(u&3)<<8)&1023,r[n++]=u>>>2&1023,r[n++]=u>>>12&1023,r[n++]=u>>>22&1023,r[n++]=h>>>0&1023,r[n++]=h>>>10&1023,r[n++]=h>>>20&1023,r[n++]=(h>>>30|(c&255)<<2)&1023,r[n++]=c>>>8&1023,r[n++]=c>>>18&1023,r[n++]=(c>>>28|(p&63)<<4)&1023,r[n++]=p>>>6&1023,r[n++]=p>>>16&1023,r[n++]=(p>>>26|(f&15)<<6)&1023,r[n++]=f>>>4&1023,r[n++]=f>>>14&1023,r[n++]=(f>>>24|(d&3)<<8)&1023,r[n++]=d>>>2&1023,r[n++]=d>>>12&1023,r[n]=d>>>22&1023}function Cw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0;r[n++]=a>>>0&2047,r[n++]=a>>>11&2047,r[n++]=(a>>>22|(s&1)<<10)&2047,r[n++]=s>>>1&2047,r[n++]=s>>>12&2047,r[n++]=(s>>>23|(o&3)<<9)&2047,r[n++]=o>>>2&2047,r[n++]=o>>>13&2047,r[n++]=(o>>>24|(l&7)<<8)&2047,r[n++]=l>>>3&2047,r[n++]=l>>>14&2047,r[n++]=(l>>>25|(u&15)<<7)&2047,r[n++]=u>>>4&2047,r[n++]=u>>>15&2047,r[n++]=(u>>>26|(h&31)<<6)&2047,r[n++]=h>>>5&2047,r[n++]=h>>>16&2047,r[n++]=(h>>>27|(c&63)<<5)&2047,r[n++]=c>>>6&2047,r[n++]=c>>>17&2047,r[n++]=(c>>>28|(p&127)<<4)&2047,r[n++]=p>>>7&2047,r[n++]=p>>>18&2047,r[n++]=(p>>>29|(f&255)<<3)&2047,r[n++]=f>>>8&2047,r[n++]=f>>>19&2047,r[n++]=(f>>>30|(d&511)<<2)&2047,r[n++]=d>>>9&2047,r[n++]=d>>>20&2047,r[n++]=(d>>>31|(y&1023)<<1)&2047,r[n++]=y>>>10&2047,r[n]=y>>>21&2047}function Mw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0,m=t[e+11]>>>0;r[n++]=a>>>0&4095,r[n++]=a>>>12&4095,r[n++]=(a>>>24|(s&15)<<8)&4095,r[n++]=s>>>4&4095,r[n++]=s>>>16&4095,r[n++]=(s>>>28|(o&255)<<4)&4095,r[n++]=o>>>8&4095,r[n++]=o>>>20&4095,r[n++]=l>>>0&4095,r[n++]=l>>>12&4095,r[n++]=(l>>>24|(u&15)<<8)&4095,r[n++]=u>>>4&4095,r[n++]=u>>>16&4095,r[n++]=(u>>>28|(h&255)<<4)&4095,r[n++]=h>>>8&4095,r[n++]=h>>>20&4095,r[n++]=c>>>0&4095,r[n++]=c>>>12&4095,r[n++]=(c>>>24|(p&15)<<8)&4095,r[n++]=p>>>4&4095,r[n++]=p>>>16&4095,r[n++]=(p>>>28|(f&255)<<4)&4095,r[n++]=f>>>8&4095,r[n++]=f>>>20&4095,r[n++]=d>>>0&4095,r[n++]=d>>>12&4095,r[n++]=(d>>>24|(y&15)<<8)&4095,r[n++]=y>>>4&4095,r[n++]=y>>>16&4095,r[n++]=(y>>>28|(m&255)<<4)&4095,r[n++]=m>>>8&4095,r[n]=m>>>20&4095}function Bw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0,m=t[e+11]>>>0,g=t[e+12]>>>0,x=t[e+13]>>>0,v=t[e+14]>>>0,b=t[e+15]>>>0;r[n++]=a>>>0&65535,r[n++]=a>>>16&65535,r[n++]=s>>>0&65535,r[n++]=s>>>16&65535,r[n++]=o>>>0&65535,r[n++]=o>>>16&65535,r[n++]=l>>>0&65535,r[n++]=l>>>16&65535,r[n++]=u>>>0&65535,r[n++]=u>>>16&65535,r[n++]=h>>>0&65535,r[n++]=h>>>16&65535,r[n++]=c>>>0&65535,r[n++]=c>>>16&65535,r[n++]=p>>>0&65535,r[n++]=p>>>16&65535,r[n++]=f>>>0&65535,r[n++]=f>>>16&65535,r[n++]=d>>>0&65535,r[n++]=d>>>16&65535,r[n++]=y>>>0&65535,r[n++]=y>>>16&65535,r[n++]=m>>>0&65535,r[n++]=m>>>16&65535,r[n++]=g>>>0&65535,r[n++]=g>>>16&65535,r[n++]=x>>>0&65535,r[n++]=x>>>16&65535,r[n++]=v>>>0&65535,r[n++]=v>>>16&65535,r[n++]=b>>>0&65535,r[n]=b>>>16&65535}function Pw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0;r[n++]=o>>>0&1,r[n++]=o>>>1&1,r[n++]=o>>>2&1,r[n++]=o>>>3&1,r[n++]=o>>>4&1,r[n++]=o>>>5&1,r[n++]=o>>>6&1,r[n++]=o>>>7&1,r[n++]=o>>>8&1,r[n++]=o>>>9&1,r[n++]=o>>>10&1,r[n++]=o>>>11&1,r[n++]=o>>>12&1,r[n++]=o>>>13&1,r[n++]=o>>>14&1,r[n++]=o>>>15&1,r[n++]=o>>>16&1,r[n++]=o>>>17&1,r[n++]=o>>>18&1,r[n++]=o>>>19&1,r[n++]=o>>>20&1,r[n++]=o>>>21&1,r[n++]=o>>>22&1,r[n++]=o>>>23&1,r[n++]=o>>>24&1,r[n++]=o>>>25&1,r[n++]=o>>>26&1,r[n++]=o>>>27&1,r[n++]=o>>>28&1,r[n++]=o>>>29&1,r[n++]=o>>>30&1,r[n++]=o>>>31&1}}function zw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0;r[n++]=o>>>0&3,r[n++]=o>>>2&3,r[n++]=o>>>4&3,r[n++]=o>>>6&3,r[n++]=o>>>8&3,r[n++]=o>>>10&3,r[n++]=o>>>12&3,r[n++]=o>>>14&3,r[n++]=o>>>16&3,r[n++]=o>>>18&3,r[n++]=o>>>20&3,r[n++]=o>>>22&3,r[n++]=o>>>24&3,r[n++]=o>>>26&3,r[n++]=o>>>28&3,r[n++]=o>>>30&3,r[n++]=l>>>0&3,r[n++]=l>>>2&3,r[n++]=l>>>4&3,r[n++]=l>>>6&3,r[n++]=l>>>8&3,r[n++]=l>>>10&3,r[n++]=l>>>12&3,r[n++]=l>>>14&3,r[n++]=l>>>16&3,r[n++]=l>>>18&3,r[n++]=l>>>20&3,r[n++]=l>>>22&3,r[n++]=l>>>24&3,r[n++]=l>>>26&3,r[n++]=l>>>28&3,r[n++]=l>>>30&3}}function Lw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0;r[n++]=o>>>0&7,r[n++]=o>>>3&7,r[n++]=o>>>6&7,r[n++]=o>>>9&7,r[n++]=o>>>12&7,r[n++]=o>>>15&7,r[n++]=o>>>18&7,r[n++]=o>>>21&7,r[n++]=o>>>24&7,r[n++]=o>>>27&7,r[n++]=(o>>>30|(l&1)<<2)&7,r[n++]=l>>>1&7,r[n++]=l>>>4&7,r[n++]=l>>>7&7,r[n++]=l>>>10&7,r[n++]=l>>>13&7,r[n++]=l>>>16&7,r[n++]=l>>>19&7,r[n++]=l>>>22&7,r[n++]=l>>>25&7,r[n++]=l>>>28&7,r[n++]=(l>>>31|(u&3)<<1)&7,r[n++]=u>>>2&7,r[n++]=u>>>5&7,r[n++]=u>>>8&7,r[n++]=u>>>11&7,r[n++]=u>>>14&7,r[n++]=u>>>17&7,r[n++]=u>>>20&7,r[n++]=u>>>23&7,r[n++]=u>>>26&7,r[n++]=u>>>29&7}}function Vw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0;r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n++]=l>>>28&15,r[n++]=u>>>0&15,r[n++]=u>>>4&15,r[n++]=u>>>8&15,r[n++]=u>>>12&15,r[n++]=u>>>16&15,r[n++]=u>>>20&15,r[n++]=u>>>24&15,r[n++]=u>>>28&15,r[n++]=h>>>0&15,r[n++]=h>>>4&15,r[n++]=h>>>8&15,r[n++]=h>>>12&15,r[n++]=h>>>16&15,r[n++]=h>>>20&15,r[n++]=h>>>24&15,r[n++]=h>>>28&15}}function Ow(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0;r[n++]=o>>>0&31,r[n++]=o>>>5&31,r[n++]=o>>>10&31,r[n++]=o>>>15&31,r[n++]=o>>>20&31,r[n++]=o>>>25&31,r[n++]=(o>>>30|(l&7)<<2)&31,r[n++]=l>>>3&31,r[n++]=l>>>8&31,r[n++]=l>>>13&31,r[n++]=l>>>18&31,r[n++]=l>>>23&31,r[n++]=(l>>>28|(u&1)<<4)&31,r[n++]=u>>>1&31,r[n++]=u>>>6&31,r[n++]=u>>>11&31,r[n++]=u>>>16&31,r[n++]=u>>>21&31,r[n++]=u>>>26&31,r[n++]=(u>>>31|(h&15)<<1)&31,r[n++]=h>>>4&31,r[n++]=h>>>9&31,r[n++]=h>>>14&31,r[n++]=h>>>19&31,r[n++]=h>>>24&31,r[n++]=(h>>>29|(c&3)<<3)&31,r[n++]=c>>>2&31,r[n++]=c>>>7&31,r[n++]=c>>>12&31,r[n++]=c>>>17&31,r[n++]=c>>>22&31,r[n++]=c>>>27&31}}function Rw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0;r[n++]=o>>>0&63,r[n++]=o>>>6&63,r[n++]=o>>>12&63,r[n++]=o>>>18&63,r[n++]=o>>>24&63,r[n++]=(o>>>30|(l&15)<<2)&63,r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=(l>>>28|(u&3)<<4)&63,r[n++]=u>>>2&63,r[n++]=u>>>8&63,r[n++]=u>>>14&63,r[n++]=u>>>20&63,r[n++]=u>>>26&63,r[n++]=h>>>0&63,r[n++]=h>>>6&63,r[n++]=h>>>12&63,r[n++]=h>>>18&63,r[n++]=h>>>24&63,r[n++]=(h>>>30|(c&15)<<2)&63,r[n++]=c>>>4&63,r[n++]=c>>>10&63,r[n++]=c>>>16&63,r[n++]=c>>>22&63,r[n++]=(c>>>28|(p&3)<<4)&63,r[n++]=p>>>2&63,r[n++]=p>>>8&63,r[n++]=p>>>14&63,r[n++]=p>>>20&63,r[n++]=p>>>26&63}}function $w(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0,f=t[a++]>>>0;r[n++]=o>>>0&127,r[n++]=o>>>7&127,r[n++]=o>>>14&127,r[n++]=o>>>21&127,r[n++]=(o>>>28|(l&7)<<4)&127,r[n++]=l>>>3&127,r[n++]=l>>>10&127,r[n++]=l>>>17&127,r[n++]=l>>>24&127,r[n++]=(l>>>31|(u&63)<<1)&127,r[n++]=u>>>6&127,r[n++]=u>>>13&127,r[n++]=u>>>20&127,r[n++]=(u>>>27|(h&3)<<5)&127,r[n++]=h>>>2&127,r[n++]=h>>>9&127,r[n++]=h>>>16&127,r[n++]=h>>>23&127,r[n++]=(h>>>30|(c&31)<<2)&127,r[n++]=c>>>5&127,r[n++]=c>>>12&127,r[n++]=c>>>19&127,r[n++]=(c>>>26|(p&1)<<6)&127,r[n++]=p>>>1&127,r[n++]=p>>>8&127,r[n++]=p>>>15&127,r[n++]=p>>>22&127,r[n++]=(p>>>29|(f&15)<<3)&127,r[n++]=f>>>4&127,r[n++]=f>>>11&127,r[n++]=f>>>18&127,r[n++]=f>>>25&127}}function Nw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0,f=t[a++]>>>0,d=t[a++]>>>0;r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n++]=p>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=d>>>0&255,r[n++]=d>>>8&255,r[n++]=d>>>16&255,r[n++]=d>>>24&255}}function Uw(t,e,r,i){let n=i,a=e;for(let s=0;s<128;s++){let o=t[a++]>>>0;r[n++]=o&65535,r[n++]=o>>>16&65535}}function qw(t,e,r,i,n){let a=ul[n]>>>0,s=e,o=0,l=t[s]>>>0,u=i;for(let h=0;h<8;h++){for(let c=0;c<32;c++)if(o+n<=32){let p=l>>>o&a;r[u+c]=p|0,o+=n,o===32&&(o=0,s++,c!==31&&(l=t[s]>>>0))}else{let p=32-o,f=l>>>o;s++,l=t[s]>>>0;let d=n-p,y=-1>>>32-d>>>0,m=(f|(l&y)<>>0)}}var hl=bw(py),jw=3*hl/256+hl|0;function fy(){let t=new Uint8Array(jw);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:t,byteContainerI32:new Int32Array(t.buffer,t.byteOffset,t.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function Gw(t=16){if(t<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${t}`);let e=Math.max(16,t|0);return{encodedWords:new Uint32Array(e),decoderWorkspace:fy()}}function Xw(t,e){if(e<=t.encodedWords.length)return t.encodedWords;let r=new Uint32Array(Math.max(16,e*2));return t.encodedWords=r,r}function Yw(t,e,r,i){i.byteContainer.length>>2;if(n.byteOffset&3)for(let o=0;o>>8&255,n[u+2|0]=l>>>16&255,n[u+3|0]=l>>>24&255}else{let o=i.byteContainerI32;(!o||o.buffer!==n.buffer||o.byteOffset!==n.byteOffset||o.length>>2)),o.set(t.subarray(e,e+a))}let s=r&3;if(s>0){let o=t[e+a|0]|0,l=a<<2;for(let u=0;u>>(u<<3)&255}return n}function Ww(t,e,r){let i=t[e++]|0,n=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){if(!(i>>>a-1&1))continue;if(e>=t.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${e}, needWords=1, availableWords=${t.length-e}, encodedWords=${t.length})`);let s=t[e++]>>>0,o=vw(s),l=s*a+31>>>5;if(e+l>t.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${s}, streamWordIndex=${e}, needWords=${l}, availableWords=${t.length-e}, encodedWords=${t.length})`);let u=n[a];(!u||u.length>>5)|0,r.exceptionSizes[a]=s}return e}function Zw(t,e,r,i,n){switch(n){case 1:Pw(t,e,r,i);break;case 2:zw(t,e,r,i);break;case 3:Lw(t,e,r,i);break;case 4:Vw(t,e,r,i);break;case 5:Ow(t,e,r,i);break;case 6:Rw(t,e,r,i);break;case 7:$w(t,e,r,i);break;case 8:Nw(t,e,r,i);break;case 16:Uw(t,e,r,i);break;default:qw(t,e,r,i,n)}return e+(n<<3)|0}function Hw(t,e,r,i){if(r+2>e)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${e})`);let n=t[r++],a=t[r++];if(n>32)throw Error(`FastPFOR decode: invalid bitWidth=${n} at block=${i} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:n,exceptionCount:a,bytePosIn:r}}function Kw(t,e,r,i,n,a){if(r+1>e)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${e})`);let s=t[r++];if(s32)throw Error(`FastPFOR decode: invalid maxBits=${s} at block=${a} (bitWidth=${i}, expected ${i}..32)`);let o=s-i|0;if(o<1||o>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${o} at block=${a} (bitWidth=${i}, maxBits=${s})`);if(r+n>e)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${n}, have=${e-r})`);return{maxBits:s,exceptionBitWidth:o,bytePosIn:r}}function Jw(t,e,r,i,n,a,s,o,l){let{maxBits:u,exceptionBitWidth:h,bytePosIn:c}=Kw(n,a,s,r,i,l);if(s=c,h===1){let m=1<y)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${h} (ptr=${d}, need ${i}, size=${y}) at block ${l}`);for(let m=0;m0&&(c=Jw(n,m,d,y,o,l,c,u,p))}if(h!==i)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${e}, packedStart=${r}, consumedPackedEnd=${h}, expectedPackedEnd=${i}, packedWords=${i-r}, encoded.length=${t.length})`)}function t3(t,e,r,i,n,a){let s=r|0,o=t[s]|0;if(o<=0||s+o>t.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${o} at pageStart=${s} (expected > 0 and pageStart+whereMeta < encoded.length=${t.length})`);let l=s+1|0,u=s+o|0,h=t[u]>>>0,c=h+3>>>2,p=u+1,f=p+c;if(f>=t.length)throw Error(`FastPFOR decode: invalid byteSize=${h} (metaInts=${c}, pageStart=${s}, packedEnd=${u}, byteContainerStart=${p}) causes bitmapPos=${f} out of bounds (encoded.length=${t.length})`);let d=Yw(t,p,h,a),y=h,m=Ww(t,f,a);return a.dataPointers.fill(0),Qw(t,s,l,u,e,i|0,n/256|0,d,y,a),m}function e3(t,e,r,i,n,a){let s=i+gu(n,256),o=i,l=r;for(;o!==s;){let u=Math.min(hl,s-o);l=t3(t,e,l,o,u,a),o=o+u|0}return l}function r3(t,e,r,i,n,a){if(a===0)return e;let s=0,o=e,l=e+r,u=n,h=n,c=n+a,p=0,f=0;for(;o>>s&255;if(s+=8,o+=s>>>5,s&=31,p|=(d&127)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${f}, partial=${p}, decoded=${h-u}/${a}, inPos=${o}, inEnd=${l})`)}if(h!==c)throw Error(`FastPFOR VByte: truncated stream (decoded=${h-u}, expected=${a}, consumedWords=${o-e}/${r}, vbyteStart=${e}, vbyteEnd=${l})`);return o}function i3(t,e,r){let i=0,n=0,a=new Uint32Array(e),s=r!=null?r:fy();if(t.length>0){let u=t[i]|0;if(i=i+1|0,u&255)throw Error(`FastPFOR decode: invalid alignedLength=${u} (expected multiple of 256)`);if(n+u>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${u}, out.length=${a.length})`);i=e3(t,a,i,n,u,s),n=n+u|0}let o=t.length-i|0,l=e-n|0;return r3(t,i,o,a,n,l),a}function n3(t,e,r,i,n){switch(n){case 2:Dw(t,e,r,i);return;case 3:_w(t,e,r,i);return;case 4:Aw(t,e,r,i);return;case 5:Sw(t,e,r,i);return;case 6:Ew(t,e,r,i);return;case 7:Fw(t,e,r,i);return;case 8:kw(t,e,r,i);return;case 9:Tw(t,e,r,i);return;case 10:Iw(t,e,r,i);return;case 11:Cw(t,e,r,i);return;case 12:Mw(t,e,r,i);return;case 16:Bw(t,e,r,i);return;case 32:for(let u=0;u<32;u=u+1|0)r[i+u|0]=t[e+u|0]|0;return}let a=ul[n]>>>0,s=e,o=0,l=t[s]>>>0;for(let u=0;u<32;u++)if(o+n<=32){let h=l>>>o&a;r[i+u]=h|0,o+=n,o===32&&(o=0,s++,u!==31&&(l=t[s]>>>0))}else{let h=32-o,c=l>>>o;s++,l=t[s]>>>0;let p=ul[n-h]>>>0,f=(c|(l&p)<t.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${e}, byteLength=${r}, bytes.length=${t.length})`);let n=Math.floor(r/4),a=r%4!=0,s=a?n+1:n;if(i.length0){let o=t.byteOffset+e;if(o&3)for(let l=0;l=64)throw Error("Varint too long")}return e.set(n),r}function o3(t,e,r){let i=new Float64Array(r);for(let n=0;n>4,n<128||(n=e[r.get()],r.increment(),i|=(n&127)<<3,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<10,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<17,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<24,n<128)||(n=e[r.get()],r.increment(),i|=(n&1)<<31,n<128))return i*4294967296+(t>>>0);throw Error("Expected varint not more than 10 bytes")}function h3(t,e,r,i){return c3(t,e,r,i,Gw(r>>>2))}function c3(t,e,r,i,n){let a=i.get();if(r&3)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${a} (encodedBytes.length=${t.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let s=r>>>2,o=Xw(n,s);a3(t,a,r,o);let l=i3(o.subarray(0,s),e,n.decoderWorkspace);return i.add(r),l}function et(t){return t>>>1^-(t&1)}function Ot(t){return t>>BigInt(1)^-(t&BigInt(1))}function We(t){return t%2==1?(t+1)/-2:t/2}function p3(t){let e=new Int32Array(t.length);for(let r=0;r=4)for(;i=4)for(;i=4)for(;r=4)for(let i=t[0];r=4)for(;i=4)for(;l>>0;for(let r=1;r>>0;return e}function jc(t){let e=new BigUint64Array(t.length);e[0]=BigInt.asUintN(64,Ot(t[0]));for(let r=1;r>>0,e[1]=et(t[1])>>>0;for(let r=2;r>>0,e[r+1]=e[r-1]+et(t[r+1])>>>0;return e}function F3(t,e,r,i){let n=yy(t,e,r,i);return new Uint32Array(n)}function k3(t){return t[1]}function T3(t){return et(t[1])}function I3(t){if(t.length===2){let e=et(t[1]);return[e,e]}return[et(t[2]),et(t[3])]}function C3(t){return t[1]}function M3(t){return Ot(t[1])}function B3(t){if(t.length===2){let e=Ot(t[1]);return[e,e]}return[Ot(t[2]),Ot(t[3])]}var St;(function(t){t.PRESENT="PRESENT",t.DATA="DATA",t.OFFSET="OFFSET",t.LENGTH="LENGTH"})(St||(St={}));var jt;(function(t){t.NONE="NONE",t.SINGLE="SINGLE",t.SHARED="SHARED",t.VERTEX="VERTEX",t.MORTON="MORTON",t.FSST="FSST"})(jt||(jt={}));var Me;(function(t){t.VERTEX="VERTEX",t.INDEX="INDEX",t.STRING="STRING",t.KEY="KEY"})(Me||(Me={}));var Ct;(function(t){t.VAR_BINARY="VAR_BINARY",t.GEOMETRIES="GEOMETRIES",t.PARTS="PARTS",t.RINGS="RINGS",t.TRIANGLES="TRIANGLES",t.SYMBOL="SYMBOL",t.DICTIONARY="DICTIONARY"})(Ct||(Ct={}));var P3=[St.PRESENT,St.DATA,St.OFFSET,St.LENGTH],Gc=[H.NONE,H.DELTA,H.COMPONENTWISE_DELTA,H.RLE,H.MORTON],z3=[le.NONE,le.FAST_PFOR,le.VARINT],L3=[jt.NONE,jt.SINGLE,jt.SHARED,jt.VERTEX,jt.MORTON,jt.FSST],V3=[Me.VERTEX,Me.INDEX,Me.STRING,Me.KEY],O3=[Ct.VAR_BINARY,Ct.GEOMETRIES,Ct.PARTS,Ct.RINGS,Ct.TRIANGLES,Ct.SYMBOL,Ct.DICTIONARY];function ct(t,e){let r=N3(t,e);return r.logicalLevelTechnique1===H.MORTON?R3(r,t,e):(H.RLE===r.logicalLevelTechnique1||H.RLE===r.logicalLevelTechnique2)&&le.NONE!==r.physicalLevelTechnique?$3(r,t,e):r}function R3(t,e,r){let i=$t(e,r,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:t.decompressedCount,numBits:i[0],coordinateShift:i[1]}}function $3(t,e,r){let i=$t(e,r,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]}}function N3(t,e){let r=t[e.get()],i=P3[r>>4],n={};switch(i){case St.DATA:n={dictionaryType:L3[r&15]};break;case St.OFFSET:n={offsetType:V3[r&15]};break;case St.LENGTH:n={lengthType:O3[r&15]}}e.increment();let a=t[e.get()],s=Gc[a>>5],o=Gc[a>>2&7],l=z3[a&3];e.increment();let u=$t(t,e,2),h=u[0],c=u[1];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:s,logicalLevelTechnique2:o,physicalLevelTechnique:l,numValues:h,byteLength:c,decompressedCount:h}}var ht;(function(t){t[t.FLAT=0]="FLAT",t[t.CONST=1]="CONST",t[t.SEQUENCE=2]="SEQUENCE",t[t.DICTIONARY=3]="DICTIONARY",t[t.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(ht||(ht={}));var fe=class{constructor(t,e){this.values=t,this._size=e}get(t){let e=Math.floor(t/8),r=t%8;return(this.values[e]>>r&1)==1}set(t,e){let r=Math.floor(t/8),i=t%8;this.values[r]=this.values[r]|+!!e<>r&1}size(){return this._size}getBuffer(){return this.values}};function Er(t,e,r){if(!e)return t;let i=e.size(),n=t.constructor,a=new n(i),s=0;for(let o=0;o=s);){let o=t[i.increment()];if(o<=127){let l=o+3,u=t[i.increment()],h=Math.min(a+l,e);n.fill(u,a,h),a=h}else{let l=256-o;for(let u=0;u=12?X3.decode(t.subarray(e,r)):Y3(t,e,r)}function Y3(t,e,r){let i="",n=e;for(;n239?4:a>223?3:a>191?2:1;if(n+o>r)break;let l,u,h;o===1?a<128&&(s=a):o===2?(l=t[n+1],(l&192)==128&&(s=(a&31)<<6|l&63,s<=127&&(s=null))):o===3?(l=t[n+1],u=t[n+2],(l&192)==128&&(u&192)==128&&(s=(a&15)<<12|(l&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):o===4&&(l=t[n+1],u=t[n+2],h=t[n+3],(l&192)==128&&(u&192)==128&&(h&192)==128&&(s=(a&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,o=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=o}return i}function Ta(t,e,r,i,n){return J3(pi(t,e,r),r,i,n)}function Vt(t,e,r,i,n){return Q3(pi(t,e,r),r,i,n)}function Ze(t,e,r){return e6(pi(t,e,r),r)}function pi(t,e,r){let i=r.physicalLevelTechnique;switch(i){case le.FAST_PFOR:return h3(t,r.numValues,r.byteLength,e);case le.VARINT:return $t(t,e,r.numValues);case le.NONE:return j3(t,e,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function _n(t,e,r){let i=r.physicalLevelTechnique;switch(i){case le.VARINT:return xu(t,e,r.numValues);case le.NONE:return G3(t,e,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function W3(t,e,r){let i=pi(t,e,r);return i.length===1?et(i[0]):T3(i)}function wu(t,e,r){let i=pi(t,e,r);return i.length===1?r.logicalLevelTechnique1===H.DELTA?et(i[0]):i[0]:k3(i)}function vy(t,e,r){return I3(pi(t,e,r))}function by(t,e,r){return B3(xu(t,e,r.numValues))}function wy(t,e,r,i){return _y(_n(t,e,r),r,i)}function Du(t,e,r,i){return Ay(_n(t,e,r),r,i)}function Z3(t,e,r,i){let n=H3(t,e,r,!1);return i?Er(n,i,0):n}function H3(t,e,r,i){if(r.physicalLevelTechnique===le.VARINT)return t6(o3(t,e,r.numValues),r,i);let n=_n(t,e,r),a=i?_y(n,r):Ay(n,r);return Float64Array.from(a,Number)}function K3(t,e,r){let i=_n(t,e,r);return i.length===1?Ot(i[0]):M3(i)}function Dy(t,e,r){let i=_n(t,e,r);return i.length===1?r.logicalLevelTechnique1===H.DELTA?Ot(i[0]):i[0]:C3(i)}function J3(t,e,r,i){let n;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let a=e;if(!i)return A3(t,a.runs,a.numRleValues);t=cl(t,a.runs,a.numRleValues),n=Nc(t)}else n=Nc(t);break;case H.RLE:n=m3(t,e.runs,e.numRleValues);break;case H.MORTON:vu(t),n=new Int32Array(t);break;case H.COMPONENTWISE_DELTA:if(r&&!i)return yy(t,r.scale,r.min,r.max);n=b3(t);break;case H.NONE:n=p3(t);break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return i?Er(n,i,0):n}function Q3(t,e,r,i){let n;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let a=e;n=qc(cl(t,a.runs,a.numRleValues))}else n=qc(t);break;case H.RLE:n=cl(t,e.runs,e.numRleValues);break;case H.MORTON:vu(t),n=t;break;case H.COMPONENTWISE_DELTA:n=r&&!i?F3(t,r.scale,r.min,r.max):E3(t);break;case H.NONE:n=t;break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return i?Er(n,i,0):n}function _y(t,e,r){let i;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let n=e;if(!r)return S3(t,n.runs,n.numRleValues);t=pl(t,n.runs,n.numRleValues),i=Uc(t)}else i=Uc(t);break;case H.RLE:i=g3(t,e.runs,e.numRleValues);break;case H.NONE:i=f3(t);break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?Er(i,r,BigInt(0)):i}function Ay(t,e,r){let i;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let n=e;i=jc(pl(t,n.runs,n.numRleValues))}else i=jc(t);break;case H.RLE:i=pl(t,e.runs,e.numRleValues);break;case H.NONE:i=t;break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?Er(i,r,BigInt(0)):i}function t6(t,e,r){switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let i=e;t=dy(t,i.runs,i.numRleValues)}return y3(t),t;case H.RLE:return i6(t,e,r);case H.NONE:return r&&d3(t),t;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}}function e6(t,e){if(e.logicalLevelTechnique1===H.DELTA&&e.logicalLevelTechnique2===H.NONE)return w3(t);if(e.logicalLevelTechnique1===H.RLE&&e.logicalLevelTechnique2===H.NONE){let r=e;return _3(t,r.runs,r.numRleValues)}if(e.logicalLevelTechnique1===H.NONE&&e.logicalLevelTechnique2===H.NONE){v3(t);let r=new Uint32Array(e.numValues+1);return r[0]=0,r.set(t,1),r}if(e.logicalLevelTechnique1===H.DELTA&&e.logicalLevelTechnique2===H.RLE){let r=e,i=D3(t,r.runs,r.numRleValues);return vu(i),new Uint32Array(i)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function es(t,e,r,i,n="int32"){let a=t.logicalLevelTechnique1;if(a===H.RLE)return t.runs===1?ht.CONST:ht.FLAT;if(a!==H.DELTA||t.logicalLevelTechnique2!==H.RLE)return t.numValues===1?ht.CONST:ht.FLAT;let s=e instanceof fe?e.size():e,o=t;if(o.numRleValues!==s)return ht.FLAT;if(o.runs===1)return ht.SEQUENCE;if(o.runs!==2)return t.numValues===1?ht.CONST:ht.FLAT;let l=i.get();if(t.physicalLevelTechnique===le.VARINT)return r6(r,i,n)?ht.SEQUENCE:t.numValues===1?ht.CONST:ht.FLAT;let u=i.get(),h=new Int32Array(r.buffer,r.byteOffset+u,4);return i.set(l),h[2]===2&&h[3]===2?ht.SEQUENCE:t.numValues===1?ht.CONST:ht.FLAT}function r6(t,e,r){let i=new cy(e.get());if(r==="int64"){let a=xu(t,i,4);return a[2]===BigInt(2)&&a[3]===BigInt(2)}let n=$t(t,i,4);return n[2]===2&&n[3]===2}function i6(t,e,r){return r?x3(t,e.runs,e.numRleValues):dy(t,e.runs,e.numRleValues)}var Sy=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},Ey=class extends uy{constructor(t,e,r,i,n){super(t,n?BigInt64Array.of(e):BigUint64Array.of(e),r,i)}getValueFromBuffer(t){return this.dataBuffer[0]+BigInt(t)*this.delta}};function _u(t,e,r){return{x:Xc(t,e)-r,y:Xc(t>>1,e)-r}}function Xc(t,e){let r=0;for(let i=0;i>i;return r}var Rt;(function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON",t[t.MULTIPOINT=3]="MULTIPOINT",t[t.MULTILINESTRING=4]="MULTILINESTRING",t[t.MULTIPOLYGON=5]="MULTIPOLYGON"})(Rt||(Rt={}));var n6;(function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON"})(n6||(n6={}));var Fr;(function(t){t[t.MORTON=0]="MORTON",t[t.VEC_2=1]="VEC_2",t[t.VEC_3=2]="VEC_3"})(Fr||(Fr={}));function a6(t){let e=Array(t.numGeometries),r=1,i=1,n=1,a=0,s=0,o=0,l=t.mortonSettings,u=t.topologyVector,h=u.geometryOffsets,c=u.partOffsets,p=u.ringOffsets,f=t.vertexOffsets,d=!f||f.length===0,y=t.containsPolygonGeometry(),m=t.vertexBuffer;for(let g=0;g[D]),r+=v,i+=v}break;case Rt.LINESTRING:{let v;y?(v=p[i]-p[i-1],i++):v=c[r]-c[r-1],r++;let b;d?(b=Or(m,s,v,!1),s+=v*2):(b=lr(t.vertexBufferType,m,f,o,v,!1,l),o+=v),e[a++]=[b],h&&n++}break;case Rt.POLYGON:{let v=c[r]-c[r-1];r++;let b=Array(v-1),D,A=p[i]-p[i-1];if(i++,d){D=Or(m,s,A,!0),s+=A*2;for(let _=0;_r?e[a++]:1);return i}function Zc(t,e,r,i){let n=new Uint32Array(e[e.length-1]+1),a=0;n[0]=a;let s=1,o=0;for(let l=0;l0;)n[a++]=t[u++]}}return n}var By=class extends Au{constructor(t,e,r,i,n,a,s,o){super(t,r,i,s!=null?s:e.length),this.indexBuffer=e,this.symbolOffsetBuffer=n,this.symbolTableBuffer=a,this.sharedDictionaryCache=o}getValueFromBuffer(t){var n,a,s;(s=this.decodedDictionary)!=null||(this.decodedDictionary=(n=this.sharedDictionaryCache)==null?void 0:n.decodedDictionary,(a=this.decodedDictionary)!=null||(this.decodedDictionary=this.decodeDictionary(),this.sharedDictionaryCache&&(this.sharedDictionaryCache.decodedDictionary=this.decodedDictionary)));let e=this.indexBuffer[t],r=this.offsetBuffer[e],i=this.offsetBuffer[e+1];return bu(this.decodedDictionary,r,i)}decodeDictionary(){var t;return(t=this.symbolLengthBuffer)!=null||(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),v6(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer)}offsetToLengthBuffer(t){let e=new Uint32Array(t.length-1),r=t[0];for(let i=1;i1&&!f.nullable||d===1&&f.nullable)throw Error(`The number of streams for the child field ${f.name} does not match its nullability. nullibilty: ${f.nullable}, numStreams: ${d}`);let m;if(f.nullable){let x=ct(t,e);m=new fe(ci(t,x.numValues,x.byteLength,e),x.numValues)}let g=Vt(t,e,ct(t,e),void 0,m);if(o){if(!s)throw Error(`Incomplete shared FSST dictionary for column "${y}"`);h[p++]=new By(y,g,n,a,s,o,m,c)}else h[p++]=new Qr(y,g,n,a,m)}return h}var Kc=class extends Sr{constructor(t,e,r){super(t,new Uint8Array,r!=null?r:e.length),this.values=e}getValueFromBuffer(t){return this.values[t]}},Be;(function(t){t[t.STRING=1]="STRING",t[t.INT32=2]="INT32",t[t.UINT32=4]="UINT32",t[t.INT64=8]="INT64",t[t.UINT64=16]="UINT64",t[t.FLOAT=32]="FLOAT",t[t.DOUBLE=64]="DOUBLE",t[t.PRESENCE=128]="PRESENCE"})(Be||(Be={}));var pr;(function(t){t[t.FALSE=0]="FALSE",t[t.TRUE=1]="TRUE",t[t.START_MAP=2]="START_MAP",t[t.START_LIST=3]="START_LIST",t[t.COUNT=4]="COUNT"})(pr||(pr={}));function A6(t,e,r,i){let n=S6(r);if(i===0)return n.map(h=>new Kc(h,[]));let a=E6(t,e,i),s=(a.presentStream?a.presentCount:a.lengthStream.length)/n.length,o=[],l=0,u=0;for(let h=0;h{var i;return t.name+((i=r.name)!=null?i:"")})}function E6(t,e,r){let i=t[e.get()];e.add(1);let n=Vt(t,e,ct(t,e)),a=r-1,s=[];i&Be.STRING&&(a-=F6(t,e,s)),a-=k6(t,e,i,s),a-=T6(t,e,i,s);let o,l=0;if(i&Be.PRESENCE){let h=I6(t,e);o=h.value,l=h.count,a--}let u=new Uint32Array;if(a>0&&(u=Vt(t,e,ct(t,e)),a--),a!==0)throw Error(`Unexpected number of remaining streams while decoding map column: ${a}`);return{lengthStream:n,dictionary:s,presentStream:o,presentCount:l,flattenedValues:u}}function F6(t,e,r){let i=t[e.get()];e.add(1);let n=Py("",t,e,i);if(n)for(let a=0;aa.length)throw Error("Merged map counts underflow while decoding child streams");let f=Array(r),d=i,y=n;for(let x=0;xs.length)throw Error("Map value stream underflow while decoding feature payload");let b=M6(s,y,v,l);f[x]=b.value,y=b.nextIndex}let m=0;for(let x=i;x=r)throw Error("Unexpected end of map value stream");let n=t[e];if(n===pr.FALSE)return{value:!1,nextIndex:e+1};if(n===pr.TRUE)return{value:!0,nextIndex:e+1};if(n===pr.START_MAP){let a=Jc(t,e,r);return{value:zy(t,e+2,a,i).value,nextIndex:a}}if(n===pr.START_LIST){let a=Jc(t,e,r),s=[],o=e+2;for(;o=r)throw Error("Missing length for nested map/list payload");let i=t[e+1];if(i<2)throw Error(`Invalid nested payload length: ${i}`);let n=e+i;if(n>r)throw Error("Nested payload exceeds containing payload bounds");return n}function Ly(t,e){let r=t-pr.COUNT;if(r<0||r>=e.length)throw Error(`Scalar dictionary index out of range: ${t}`);return e[r]}function Xr(t,e){for(let r of e)t.push(r)}function B6(t,e,r,i,n,a){var s;return r.type==="scalarType"?a&&!a.has(r.name)?(my(i,t,e),null):P6(i,t,e,n,r.scalarType,r):((s=r.complexType)==null?void 0:s.physicalType)===Qe.MAP?A6(t,e,r,i):i===0?null:_6(t,e,r,a)}function P6(t,e,r,i,n,a){var l;let s;if(t===0)return null;if(a.nullable){let u=ct(e,r),h=u.numValues,c=r.get(),p=ci(e,h,u.byteLength,r);r.set(c+u.byteLength),s=new fe(p,u.numValues)}let o=s!=null?s:i;switch(n.physicalType){case it.UINT_32:case it.INT_32:return R6(e,r,a,n,o);case it.STRING:{let u=a.nullable?t-1:t;return(l=Py(a.name,e,r,u,s))!=null?l:null}case it.BOOLEAN:return z6(e,r,a,i,o);case it.UINT_64:case it.INT_64:return O6(e,r,a,o,n);case it.FLOAT:return L6(e,r,a,o);case it.DOUBLE:return V6(e,r,a,o);default:throw Error(`The specified data type for the field is currently not supported: ${n}`)}}function z6(t,e,r,i,n){let a=ct(t,e),s=a.numValues,o=e.get(),l=An(n)?n:void 0,u=ci(t,s,a.byteLength,e,l);e.set(o+a.byteLength);let h=new fe(u,s);return new m6(r.name,h,n)}function L6(t,e,r,i){let n=ct(t,e),a=An(i)?i:void 0,s=gy(t,e,n.numValues,a);return new g6(r.name,s,i)}function V6(t,e,r,i){let n=ct(t,e),a=An(i)?i:void 0,s=xy(t,e,n.numValues,a);return new fu(r.name,s,i)}function O6(t,e,r,i,n){let a=ct(t,e),s=es(a,i,t,e,"int64"),o=n.physicalType===it.INT_64;if(s===ht.FLAT){let u=An(i)?i:void 0,h=o?wy(t,e,a,u):Du(t,e,a,u);return new Sy(r.name,h,i)}if(s===ht.SEQUENCE){let u=by(t,e,a);return new Ey(r.name,u[0],u[1],a.numRleValues,o)}let l=o?K3(t,e,a):Dy(t,e,a);return new My(r.name,l,i,o)}function R6(t,e,r,i,n){let a=ct(t,e),s=es(a,n,t,e),o=i.physicalType===it.INT_32;if(s===ht.FLAT){let u=An(n)?n:void 0,h=o?Ta(t,e,a,void 0,u):Vt(t,e,a,void 0,u);return new pu(r.name,h,n)}if(s===ht.SEQUENCE){let u=vy(t,e,a);return new du(r.name,u[0],u[1],a.numRleValues,o)}let l=o?W3(t,e,a):wu(t,e,a);return new yu(r.name,l,n,o)}function An(t){return t instanceof fe}var It={ID:0,ID_NULLABLE:1,ID_LONG:2,GEOMETRY:4,SCALAR_BASE:10,STRUCT:30,MAP:31};function Vy(t){switch(t){case It.ID:case It.ID|It.ID_NULLABLE:case It.ID|It.ID_LONG:case It.ID|It.ID_LONG|It.ID_NULLABLE:return{nullable:(t&It.ID_NULLABLE)!==0,columnScope:qi.FEATURE,type:"scalarType",scalarType:{longID:(t&It.ID_LONG)!==0,type:"logicalType",logicalType:hy.ID}};case It.GEOMETRY:return{nullable:!1,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.GEOMETRY,children:[]}};case It.STRUCT:return{nullable:!1,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.STRUCT,children:[]}};case It.MAP:return{nullable:!0,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.MAP,children:[]}};default:return j6(t)}}function $6(t){return t>=It.SCALAR_BASE}function Oy(t){return t===It.STRUCT||t===It.MAP}function N6(t){if(t.type==="scalarType"){let e=t.scalarType;if(e.type==="physicalType")switch(e.physicalType){case it.BOOLEAN:case it.INT_8:case it.UINT_8:case it.INT_32:case it.UINT_32:case it.INT_64:case it.UINT_64:case it.FLOAT:case it.DOUBLE:return!1;case it.STRING:return!0;default:return!1}if(e.type==="logicalType")return!1}else if(t.type==="complexType"){let e=t.complexType;if(e.type==="physicalType")switch(e.physicalType){case Qe.GEOMETRY:case Qe.STRUCT:case Qe.MAP:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",t),!1}function U6(t){var e;return t.type==="scalarType"&&((e=t.scalarType)==null?void 0:e.type)==="logicalType"&&t.scalarType.logicalType===hy.ID}function q6(t){var e;return t.type==="complexType"&&((e=t.complexType)==null?void 0:e.type)==="physicalType"&&t.complexType.physicalType===Qe.GEOMETRY}function j6(t){let e;switch(t){case 10:case 11:e=it.BOOLEAN;break;case 12:case 13:e=it.INT_8;break;case 14:case 15:e=it.UINT_8;break;case 16:case 17:e=it.INT_32;break;case 18:case 19:e=it.UINT_32;break;case 20:case 21:e=it.INT_64;break;case 22:case 23:e=it.UINT_64;break;case 24:case 25:e=it.FLOAT;break;case 26:case 27:e=it.DOUBLE;break;case 28:case 29:e=it.STRING;break;default:return null}return{nullable:!!(t&1),columnScope:qi.FEATURE,type:"scalarType",scalarType:{longID:!1,type:"physicalType",physicalType:e}}}var G6=new TextDecoder,Qc="0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT), 31(MAP)";function Eu(t,e){let r=$t(t,e,1)[0];if(r===0)return"";let i=e.get(),n=i+r,a=t.subarray(i,n);return e.add(r),G6.decode(a)}function X6(t){let e=t.name,r=t.nullable;return t.type==="scalarType"?{type:"scalarField",scalarField:t.scalarType,name:e,nullable:r}:{type:"complexField",complexField:t.complexType,name:e,nullable:r}}function Ry(t,e){let r=$t(t,e,1)[0]>>>0,i=r>=It.SCALAR_BASE?Vy(r):null;if(!i)throw Error(`Unsupported field type code ${r}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let n=Si(je({},i),{name:Eu(t,e)});if(n.type==="complexType"&&Oy(r)){let a=n.complexType,s=$t(t,e,1)[0]>>>0;a.children=Array(s);for(let o=0;o>>0,i=Vy(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: ${Qc}`);let n;if($6(r))n=Eu(t,e);else if(r>>0,o=a.complexType;o.children=Array(s);for(let l=0;l>>0,a=$t(t,e,1)[0]>>>0;i.columns=Array(a);for(let s=0;s>>0,s=i.get()+a;if(s>t.length)throw Error(`Block overruns tile: ${s} > ${t.length}`);let o=$t(t,i,1)[0]>>>0;if(o!==1&&o!==2){i.set(s);continue}let[l,u]=W6(t,i),h=l.featureTables[0],c=null,p=null,f=[],d=0;for(let m of h.columns){let g=m.name;if(U6(m)){let x=null;if(m.nullable){let b=ct(t,i),D=i.get(),A=ci(t,b.numValues,b.byteLength,i);i.set(D+b.byteLength),x=new fe(A,b.numValues)}let v=ct(t,i);d=x?x.size():v.decompressedCount,c=H6(t,m,i,g,v,x!=null?x:d,r)}else if(q6(m)){let x=$t(t,i,1)[0];if(d===0){let v=i.get();d=ct(t,i).decompressedCount,i.set(v)}e&&(e.scale=e.extent/u),p=f6(t,x,i,d,e)}else{let x=N6(m)?$t(t,i,1)[0]:1;if(x===0)continue;let v=B6(t,i,m,x,d,void 0);if(v)if(Array.isArray(v))for(let b of v)f.push(b);else f.push(v)}}let y=new xw(h.name,p,c,f,u);n.push(y),i.set(s)}return n}function H6(t,e,r,i,n,a,s=!1){var h;let o=(h=e.scalarType)!=null&&h.longID?it.UINT_64:it.UINT_32,l=typeof a=="number"?void 0:a,u=es(n,a,t,r,o===it.UINT_64?"int64":"int32");if(o===it.UINT_32)switch(u){case ht.FLAT:return new pu(i,Vt(t,r,n,void 0,l),a);case ht.SEQUENCE:{let c=vy(t,r,n);return new du(i,c[0],c[1],n.numRleValues,!1)}case ht.CONST:return new yu(i,wu(t,r,n),a,!1)}switch(u){case ht.FLAT:return s?new fu(i,Z3(t,r,n,l),a):new Sy(i,Du(t,r,n,l),a);case ht.SEQUENCE:{let c=by(t,r,n);return new Ey(i,c[0],c[1],n.numRleValues,!1)}case ht.CONST:return new My(i,Dy(t,r,n),a,!1)}throw Error("Vector type not supported for id column.")}var K6=class{constructor(t,e){var r;switch(this._featureData=t,this.properties=this._featureData.properties||{},(r=this._featureData.geometry)==null?void 0:r.type){case Rt.POINT:case Rt.MULTIPOINT:this.type=1;break;case Rt.LINESTRING:case Rt.MULTILINESTRING:this.type=2;break;case Rt.POLYGON:case Rt.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=e,this.id=Number(this._featureData.id)}loadGeometry(){let t=[];for(let e of this._featureData.geometry.coordinates){let r=[];for(let i of e)r.push(new B(i.x,i.y));t.push(r)}return t}},J6=class{constructor(t){this.features=[],this.featureTable=t,this.name=t.name,this.extent=t.extent,this.version=2,this.features=t.getFeatures(),this.length=this.features.length}feature(t){return new K6(this.features[t],this.extent)}},Fu=class{constructor(t){this.layers={};let e=Z6(new Uint8Array(t));this.layers=e.reduce((r,i)=>Si(je({},r),{[i.name]:new J6(i)}),{})}},ku=class{constructor(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new uo(mt,16,0),this.grid3D=new uo(mt,16,0),this.featureIndexArray=new Yf,this.promoteId=e}insert(t,e,r,i,n,a){let s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let o=a?this.grid3D:this.grid;for(let l of e){let u=[1/0,1/0,-1/0,-1/0];for(let h of l)u[0]=Math.min(u[0],h.x),u[1]=Math.min(u[1],h.y),u[2]=Math.max(u[2],h.x),u[3]=Math.max(u[3],h.y);u[0]<8192&&u[1]<8192&&u[2]>=0&&u[3]>=0&&o.insert(s,u[0],u[1],u[2],u[3])}}loadVTLayers(){return this.vtLayers||(this.encoding==="mlt"?this.vtLayers=new Fu(this.rawTileData).layers:this.vtLayers=new Xl(new au(this.rawTileData)).layers,this.sourceLayerCoder=new cu(this.vtLayers?Object.keys(this.vtLayers).sort():[ll])),this.vtLayers}query(t,e,r,i){this.loadVTLayers();let n=t.params,a=mt/t.tileSize/t.scale,s=ai(n.filter,"queryRenderedFeatures filter",n.globalState),o=t.queryGeometry,l=t.queryPadding*a,u=Fa.fromPoints(o),h=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l),c=Fa.fromPoints(t.cameraQueryGeometry).expandBy(l),p=this.grid3D.query(c.minX,c.minY,c.maxX,c.maxY,(y,m,g,x)=>vg(t.cameraQueryGeometry,y-l,m-l,g+l,x+l));for(let y of p)h.push(y);h.sort(t5);let f={},d;for(let y of h){if(y===d)continue;d=y;let m=this.featureIndexArray.get(y),g=null;this.loadMatchingFeature(f,m.bucketIndex,m.sourceLayerIndex,m.featureIndex,s,n.layers,n.availableImages,e,r,i,(x,v,b)=>(g||(g=Ar(x)),v.queryIntersectsFeature({queryGeometry:o,feature:x,featureState:b,geometry:g,zoom:this.z,transform:t.transform,pixelsToTileUnits:a,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation})))}return f}loadMatchingFeature(t,e,r,i,n,a,s,o,l,u,h){let c=this.bucketLayerIDs[e];if(a&&!c.some(y=>a.has(y)))return;let p=this.sourceLayerCoder.decode(r),f=this.vtLayers[p].feature(i);if(n.needGeometry){let y=hi(f,!0);if(!n.filter(new st(this.tileID.overscaledZ),y,this.tileID.canonical))return}else if(!n.filter(new st(this.tileID.overscaledZ),f))return;let d=this.getId(f,p);for(let y of c){if(a&&!a.has(y))continue;let m=o[y];if(!m)continue;let g={};d&&u&&(g=u.getState(m.sourceLayer||"_geojsonTileLayer",d));let x=Gt({},l[y]);x.paint=tp(x.paint,m.paint,f,g,s),x.layout=tp(x.layout,m.layout,f,g,s);let v=!h||h(f,m,g);if(!v)continue;let b=new gw(f,this.z,this.x,this.y,d);b.layer=x;let D=t[y];D===void 0&&(D=t[y]=[]),D.push({featureIndex:i,feature:b,intersectionZ:v})}}lookupSymbolFeatures(t,e,r,i,n,a,s,o){let l={};this.loadVTLayers();let u=ai(n.filterSpec,"queryRenderedFeatures symbol filter",n.globalState);for(let h of t)this.loadMatchingFeature(l,r,i,h,u,a,s,o,e);return l}hasLayer(t){for(let e of this.bucketLayerIDs)for(let r of e)if(t===r)return!0;return!1}getId(t,e){var i;let r=t.id;if(this.promoteId){let n=typeof this.promoteId=="string"?this.promoteId:this.promoteId[e];r=t.properties[n],typeof r=="boolean"&&(r=Number(r)),r===void 0&&((i=t.properties)!=null&&i.cluster)&&this.promoteId&&(r=Number(t.properties.cluster_id))}return r}};C("FeatureIndex",ku,{omit:["rawTileData","sourceLayerCoder"]});function Q6(t){return typeof t=="object"&&!!t&&"evaluate"in t}function tp(t,e,r,i,n){return Ia(t,(a,s)=>{let o=e instanceof Ya?e.get(s):null;return Q6(o)?o.evaluate(r,i,void 0,n):o})}function t5(t,e){return e-t}var $y=class{constructor(t){this.maxEntries=t,this.map=new Map}get(t){let e=this.map.get(t);return e!==void 0&&(this.map.delete(t),this.map.set(t,e)),e}set(t,e){if(this.map.has(t))this.map.delete(t);else if(this.map.size>=this.maxEntries){let r=this.map.keys().next().value;this.map.delete(r)}this.map.set(t,e)}clear(){this.map.clear()}};function Tu(t){let e=typeof t;if(e==="number"||e==="boolean"||e==="string"||t==null)return JSON.stringify(t);if(Array.isArray(t)){let n="[";for(let a of t)n+=`${Tu(a)},`;return`${n}]`}let r=Object.keys(t).sort(),i="{";for(let n=0;nthis._layers[c.id]),s=a[0];if(s.isHidden())continue;let o=s.source||"",l=this.familiesBySource[o];l||(l=this.familiesBySource[o]={});let u=s.sourceLayer||"_geojsonTileLayer",h=l[u];h||(h=l[u]=[]),h.push(a)}}},qy=class{constructor(t){let e={},r=[];for(let s in t){let o=t[s],l=e[s]={};for(let u in o){let h=o[u];if(!h||h.bitmap.width===0||h.bitmap.height===0)continue;let c={x:0,y:0,w:h.bitmap.width+2,h:h.bitmap.height+2};r.push(c),l[u]={rect:c,metrics:h.metrics}}}let{w:i,h:n}=su(r),a=new Ja({width:i||1,height:n||1});for(let s in t){let o=t[s];for(let l in o){let u=o[l];if(!u||u.bitmap.width===0||u.bitmap.height===0)continue;let h=e[s][l].rect;Ja.copy(u.bitmap,a,{x:0,y:0},{x:h.x+1,y:h.y+1},u.bitmap)}}this.image=a,this.positions=e}};C("GlyphAtlas",qy);var jy=class{constructor(t){this.tileID=new uu(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,e,r,i,n){return rt(this,null,function*(){this.data=t,this.collisionBoxArray=new Ll;let a=new cu(Object.keys(t.layers).sort()),s=new ku(this.tileID,this.promoteId);s.bucketLayerIDs=[];let o={},l={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:r,subdivisionGranularity:n},u=e.familiesBySource[this.source];for(let S in u){let k=t.layers[S];if(!k)continue;k.version===1&&Bt(`Vector tile source "${this.source}" layer "${S}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let z=a.encode(S),O=[];for(let P=0;PF.id)))}}let h=Ia(l.glyphDependencies,S=>Object.keys(S));for(let S of this.inFlightDependencies)S==null||S.abort();this.inFlightDependencies=[];let c=Promise.resolve({});if(Object.keys(h).length){let S=new AbortController;this.inFlightDependencies.push(S),c=i.sendAsync({type:"GG",data:{stacks:h,source:this.source,tileID:this.tileID,type:"glyphs"}},S)}let p=Object.keys(l.iconDependencies),f=Promise.resolve({});if(p.length){let S=new AbortController;this.inFlightDependencies.push(S),f=i.sendAsync({type:"GI",data:{icons:p,source:this.source,tileID:this.tileID,type:"icons"}},S)}let d=Object.keys(l.patternDependencies),y=Promise.resolve({});if(d.length){let S=new AbortController;this.inFlightDependencies.push(S),y=i.sendAsync({type:"GI",data:{icons:d,source:this.source,tileID:this.tileID,type:"patterns"}},S)}let m=l.dashDependencies,g=Promise.resolve({});if(Object.keys(m).length){let S=new AbortController;this.inFlightDependencies.push(S),g=i.sendAsync({type:"GDA",data:{dashes:m}},S)}let[x,v,b,D]=yield Promise.all([c,f,y,g]),A=new qy(x),_=new ou(v,b);for(let S in o){let k=o[S];k.hasDependencies&&(Ny(k.layers,this.zoom,r),k.addFeatures({options:l,canonical:this.tileID.canonical,glyphMap:x,glyphPositions:A.positions,iconMap:v,iconPositions:_.iconPositions,patternMap:b,patternPositions:_.patternPositions,dashPositions:D,showCollisionBoxes:this.showCollisionBoxes}))}return{buckets:Object.values(o).filter(S=>!S.isEmpty()),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:A.image,imageAtlas:_,dashPositions:D,glyphMap:this.returnDependencies?x:null,iconMap:this.returnDependencies?v:null,glyphPositions:this.returnDependencies?A.positions:null}})}};function Ny(t,e,r){let i=new st(e);for(let n of t)n.recalculate(i,r)}var Gy=class{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(t,e){this.loading[t]=e}finishLoading(t){delete this.loading[t]}abort(t){let e=this.loading[t];e!=null&&e.abort&&(e.abort.abort(),delete this.loading[t])}getParsing(t){return this.parsing[t]}setParsing(t,e){this.parsing[t]=e}removeParsing(t){delete this.parsing[t]}markLoaded(t,e){this.loaded[t]=e}getLoaded(t){let e=this.loaded[t];if(e)return e}removeLoaded(t){delete this.loaded[t]}clearLoaded(){this.loaded={}}},Xy=class{constructor(t){this.start=`${t}#start`,this.end=`${t}#end`,this.measure=t,performance.mark(this.start)}finish(){performance.mark(this.end);let t=performance.getEntriesByName(this.measure);return t.length===0&&(performance.measure(this.measure,this.start,this.end),t=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),t}},n5=class{constructor(t,e,r,i,n){this.type=t,this.properties=r||{},this.extent=n,this.pointsArray=e,this.id=i}loadGeometry(){return this.pointsArray.map(t=>t.map(e=>new B(e.x,e.y)))}},a5=class{constructor(t,e,r){this.version=2,this._myFeatures=t,this.name=e,this.length=t.length,this.extent=r}feature(t){return this._myFeatures[t]}},s5=class{constructor(){this.layers={}}addLayer(t){this.layers[t.name]=t}};function o5(t,e,r){let{extent:i}=t,n=2**(r.z-e.z),a=(r.x-e.x*n)*i,s=(r.y-e.y*n)*i,o=[];for(let l=0;l0&&l.addLayer(d)}let h={vectorTile:l,rawData:hu(l).buffer};return this.overzoomedTileResultCache.set(s,h),h}reloadTile(t){return rt(this,null,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)throw Error("Should not be trying to reload a tile that was never loaded or has been removed");if(r.vectorTile)return r.showCollisionBoxes=t.showCollisionBoxes,yield this._parseWorkerTile(r,t)})}abortTile(t){return rt(this,null,function*(){this.tileState.abort(t.uid)})}removeTile(t){return rt(this,null,function*(){this.tileState.removeLoaded(t.uid)})}},u5=class{constructor(){this.loaded={}}loadTile(t){return rt(this,null,function*(){let{uid:e,encoding:r,rawImageData:i,redFactor:n,greenFactor:a,blueFactor:s,baseShift:o}=t,l=i.width+4,u=i.height+4,h=Ca(i)?new Zt({width:l,height:u},yield ap(i,-2,-2,l,u)):i,c=new jl(e,h,r,n,a,s,o);return this.loaded||(this.loaded={}),this.loaded[e]=c,c})}removeTile(t){let e=this.loaded,r=t.uid;e!=null&&e[r]&&delete e[r]}},h5=class{constructor(t,e,r,i=c5){this.actor=t,this.layerIndex=e,this.availableImages=r,this.tileState=new Gy,this._createGeoJSONIndex=i}loadVectorTile(t){if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let{z:e,x:r,y:i}=t.tileID.canonical,n=this._geoJSONIndex.getTile(e,r,i);if(!n)return null;let a=new ly(n.features,{version:2,extent:mt});return{vectorTile:a,rawData:hu(a,np).buffer}}loadTile(t){return rt(this,null,function*(){let{uid:e}=t,r=new jy(t);r.abort=new AbortController;try{let i=this.loadVectorTile(t);if(!i)return null;let{vectorTile:n,rawData:a}=i;r.vectorTile=n,this.tileState.markLoaded(e,r);let s={rawData:a};return this.tileState.setParsing(e,s),yield this._parseWorkerTile(r,t)}catch(i){throw this.tileState.markLoaded(e,r),i}})}_parseWorkerTile(t,e){return rt(this,null,function*(){let r=this.tileState.getParsing(t.uid),i=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,e.subdivisionGranularity);if(r){let{rawData:n}=r;i=Gt({rawTileData:n.slice(0),encoding:"mvt"},i),this.tileState.removeParsing(t.uid)}return i})}abortTile(t){return rt(this,null,function*(){this.tileState.abort(t.uid)})}removeTile(t){return rt(this,null,function*(){this.tileState.removeLoaded(t.uid)})}loadData(t){return rt(this,null,function*(){var r;(r=this._pendingRequest)==null||r.abort();let e=this._startRequestTiming(t);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(t,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let i={};return t.request&&(i.data=t.data),this._finishRequestTiming(e,t,i),i}catch(i){if(delete this._pendingRequest,!yl(i))throw i;return{abandoned:!0}}})}_startRequestTiming(t){var e;if((e=t.request)!=null&&e.collectResourceTiming)return new Xy(t.request.url)}_finishRequestTiming(t,e,r){let i=t==null?void 0:t.finish();i&&(r.resourceTiming={[e.source]:JSON.parse(JSON.stringify(i))})}reloadTile(t){return rt(this,null,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)return yield this.loadTile(t);if(r.vectorTile)return r.showCollisionBoxes=t.showCollisionBoxes,yield this._parseWorkerTile(r,t)})}loadAndProcessGeoJSON(t,e){return rt(this,null,function*(){var r;if(t.request&&(t.data=(yield up(t.request,e)).data),t.data){t.data=this._filterGeoJSON(t.data,t.filter,t.source),this._geoJSONIndex=this._createGeoJSONIndex(t.data,t);return}if(t.dataDiff){(r=this._geoJSONIndex)!=null||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},t)),this._geoJSONIndex.updateData(t.dataDiff,this._getFilterPredicate(t.filter,t.source));return}if(t.updateCluster&&this._geoJSONIndex.updateClusterOptions(t.geojsonVtOptions.cluster,Yy(t)),this._geoJSONIndex==null)throw Error(`Input data given to \'${t.source}\' is not a valid GeoJSON object.`)})}_filterGeoJSON(t,e,r){if(t.type!=="FeatureCollection")return t;let i=this._getFilterPredicate(e,r);return i?{type:"FeatureCollection",features:t.features.filter(n=>i(n))}:t}_getFilterPredicate(t,e){if(typeof t!="boolean"&&!(t!=null&&t.length))return;let r=er(t,`sources.${e}.filter`,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(r.result==="error")throw Error(r.value.map(i=>`${i.key}: ${i.message}`).join(", "));return i=>r.value.evaluate({zoom:0},i)}removeSource(t){return rt(this,null,function*(){var e;(e=this._pendingRequest)==null||e.abort()})}getClusterExpansionZoom(t){return this._geoJSONIndex.getClusterExpansionZoom(t.clusterId)}getClusterChildren(t){return this._geoJSONIndex.getClusterChildren(t.clusterId)}getClusterLeaves(t){return this._geoJSONIndex.getClusterLeaves(t.clusterId,t.limit,t.offset)}};function c5(t,e){let r=Gt(e.geojsonVtOptions||{},{updateable:!0,clusterOptions:Yy(e)});return new Td(t,r)}function Yy({geojsonVtOptions:t,clusterProperties:e,source:r}){if(!e||!t.clusterOptions)return t.clusterOptions;let i={},n={},a={accumulated:null,zoom:0},s={properties:null},o=Object.keys(e);for(let l of o){let[u,h]=e[l],c=er(h,`sources.${r}.clusterProperties.${l}[1]`),p=er(typeof u=="string"?[u,["accumulated"],["get",l]]:u,`sources.${r}.clusterProperties.${l}[0]`);i[l]=c.value,n[l]=p.value}return t.clusterOptions.map=l=>{s.properties=l;let u={};for(let h of o)u[h]=i[h].evaluate(a,s);return u},t.clusterOptions.reduce=(l,u)=>{s.properties=u;for(let h of o)a.accumulated=l[h],l[h]=n[h].evaluate(a,s)},t.clusterOptions}function Uy(t){return rt(this,null,function*(){if(t.endsWith(".mjs")){yield import(t);return}let e=yield fetch(t,{credentials:"same-origin"});if(!e.ok)throw Error(`Failed to load ${t}: ${e.status}`);let r=yield e.text();if(/^[ \\t]*(import|export)\\s/m.test(r)){let i=URL.createObjectURL(new Blob([r],{type:"text/javascript"}));try{yield import(i)}finally{URL.revokeObjectURL(i)}return}globalThis.eval(r)})}var p5=class{constructor(t){this.self=t,this.actor=new sy(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,r)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=r},this.self.addProtocol=sp,this.self.removeProtocol=op,this.self.registerRTLTextPlugin=e=>{wr.setMethods(e)},this.self.makeRequest=Ma,this.actor.registerMessageHandler("LDT",(e,r)=>this._getDEMWorkerSource(e,r.source).loadTile(r)),this.actor.registerMessageHandler("RDT",(e,r)=>rt(this,null,function*(){this._getDEMWorkerSource(e,r.source).removeTile(r)})),this.actor.registerMessageHandler("GCEZ",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterExpansionZoom(r)})),this.actor.registerMessageHandler("GCC",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterChildren(r)})),this.actor.registerMessageHandler("GCL",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterLeaves(r)})),this.actor.registerMessageHandler("LD",(e,r)=>this._getWorkerSource(e,r.type,r.source).loadData(r)),this.actor.registerMessageHandler("LT",(e,r)=>this._getWorkerSource(e,r.type,r.source).loadTile(r)),this.actor.registerMessageHandler("RT",(e,r)=>this._getWorkerSource(e,r.type,r.source).reloadTile(r)),this.actor.registerMessageHandler("AT",(e,r)=>this._getWorkerSource(e,r.type,r.source).abortTile(r)),this.actor.registerMessageHandler("RMT",(e,r)=>this._getWorkerSource(e,r.type,r.source).removeTile(r)),this.actor.registerMessageHandler("RS",(e,r)=>rt(this,null,function*(){var n,a;if(!((a=(n=this.workerSources[e])==null?void 0:n[r.type])!=null&&a[r.source]))return;let i=this.workerSources[e][r.type][r.source];delete this.workerSources[e][r.type][r.source],i.removeSource!==void 0&&i.removeSource(r)})),this.actor.registerMessageHandler("RM",e=>rt(this,null,function*(){delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],this.globalStates.delete(e)})),this.actor.registerMessageHandler("SR",(e,r)=>rt(this,null,function*(){this.referrer=r})),this.actor.registerMessageHandler("SRPS",(e,r)=>this._syncRTLPluginState(e,r)),this.actor.registerMessageHandler("IS",(e,r)=>rt(this,null,function*(){yield Uy(r)})),this.actor.registerMessageHandler("SI",(e,r)=>this._setImages(e,r)),this.actor.registerMessageHandler("UL",(e,r)=>rt(this,null,function*(){this._getLayerIndex(e).update(r.layers,r.removedIds,this._getGlobalState(e))})),this.actor.registerMessageHandler("UGS",(e,r)=>rt(this,null,function*(){let i=this._getGlobalState(e);for(let n in r)i[n]=r[n]})),this.actor.registerMessageHandler("SL",(e,r)=>rt(this,null,function*(){this._getLayerIndex(e).replace(r,this._getGlobalState(e))}))}_getGlobalState(t){let e=this.globalStates.get(t);return e||(e={},this.globalStates.set(t,e)),e}_setImages(t,e){return rt(this,null,function*(){this.availableImages[t]=e;for(let r in this.workerSources[t]){let i=this.workerSources[t][r];for(let n in i)i[n].availableImages=e}})}_syncRTLPluginState(t,e){return rt(this,null,function*(){return yield wr.syncState(e,Uy)})}_getAvailableImages(t){let e=this.availableImages[t];return e||(e=[]),e}_getLayerIndex(t){let e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i5),e}_getWorkerSource(t,e,r){var i,n;if((i=this.workerSources)[t]||(i[t]={}),(n=this.workerSources[t])[e]||(n[e]={}),!this.workerSources[t][e][r]){let a={sendAsync:(s,o)=>(s.targetMapId=t,this.actor.sendAsync(s,o))};switch(e){case"vector":this.workerSources[t][e][r]=new l5(a,this._getLayerIndex(t),this._getAvailableImages(t));break;case"geojson":this.workerSources[t][e][r]=new h5(a,this._getLayerIndex(t),this._getAvailableImages(t));break;default:this.workerSources[t][e][r]=new this.externalWorkerSourceTypes[e](a,this._getLayerIndex(t),this._getAvailableImages(t))}}return this.workerSources[t][e][r]}_getDEMWorkerSource(t,e){var r,i;return(r=this.demWorkerSources)[t]||(r[t]={}),(i=this.demWorkerSources[t])[e]||(i[e]=new u5),this.demWorkerSources[t][e]}};mr(self)&&(self.worker=new p5(self));export{p5 as default};\n/*! Bundled license information:\n\nmaplibre-gl/dist/maplibre-gl-shared.mjs:\nmaplibre-gl/dist/maplibre-gl-worker.mjs:\n (**\n * MapLibre GL JS\n * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.9.0/LICENSE.txt\n *)\n*/\n'}}),gye=ye({"src/plots/map/layers.js"(e,r){"use strict";var t=Yt(),a=Go().sanitizeHTML,i=EI(),o=Uv();function s(f,h){this.subplot=f,this.uid=f.uid+"-"+h,this.index=h,this.idSource="source-"+this.uid,this.idLayer=o.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var l=s.prototype;l.update=function(h){this.visible?this.needsNewImage(h)?this.updateImage(h):this.needsNewSource(h)?(this.removeLayer(),this.updateSource(h),this.updateLayer(h)):this.needsNewLayer(h)?this.updateLayer(h):this.updateStyle(h):(this.updateSource(h),this.updateLayer(h)),this.visible=n(h)},l.needsNewImage=function(f){var h=this.subplot.map;return h.getSource(this.idSource)&&this.sourceType==="image"&&f.sourcetype==="image"&&(this.source!==f.source||JSON.stringify(this.coordinates)!==JSON.stringify(f.coordinates))},l.needsNewSource=function(f){return this.sourceType!==f.sourcetype||JSON.stringify(this.source)!==JSON.stringify(f.source)||this.layerType!==f.type},l.needsNewLayer=function(f){return this.layerType!==f.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(f){var h=this.subplot.map;h.getSource(this.idSource).updateImage({url:f.source,coordinates:f.coordinates});var d=this.findFollowingMapLayerId(this.lookupBelow());d!==null&&this.subplot.map.moveLayer(this.idLayer,d)},l.updateSource=function(f){var h=this.subplot.map;if(h.getSource(this.idSource)&&h.removeSource(this.idSource),this.sourceType=f.sourcetype,this.source=f.source,!!n(f)){var d=c(f);h.addSource(this.idSource,d)}},l.findFollowingMapLayerId=function(f){if(f==="traces")for(var h=this.subplot.getMapLayers(),d=0;d0){for(var d=0;d0}function u(f){var h={},d={};switch(f.type){case"circle":t.extendFlat(d,{"circle-radius":f.circle.radius,"circle-color":f.color,"circle-opacity":f.opacity});break;case"line":t.extendFlat(d,{"line-width":f.line.width,"line-color":f.color,"line-opacity":f.opacity,"line-dasharray":f.line.dash});break;case"fill":t.extendFlat(d,{"fill-color":f.color,"fill-outline-color":f.fill.outlinecolor,"fill-opacity":f.opacity});break;case"symbol":var p=f.symbol,g=i(p.textposition,p.iconsize);t.extendFlat(h,{"icon-image":p.icon,"icon-size":p.iconsize/10,"text-field":p.text,"text-size":p.textfont.size,"text-anchor":g.anchor,"text-offset":g.offset,"symbol-placement":p.placement}),t.extendFlat(d,{"icon-color":f.color,"text-color":p.textfont.color,"text-opacity":f.opacity});break;case"raster":t.extendFlat(d,{"raster-fade-duration":0,"raster-opacity":f.opacity});break}return{layout:h,paint:d}}function c(f){var h=f.sourcetype,d=f.source,p={type:h},g;return h==="geojson"?g="data":h==="vector"?g=typeof d=="string"?"url":"tiles":h==="raster"?(g="tiles",p.tileSize=256):h==="image"&&(g="url",p.coordinates=f.coordinates),p[g]=d,f.sourceattribution&&(p.attribution=a(f.sourceattribution)),p}r.exports=function(h,d,p){var g=new s(h,d);return g.update(p),g}}}),yye=ye({"src/plots/map/map.js"(e,r){"use strict";var t=(vye(),On(YN)),a=mye(),i=!1,o=()=>{i||(i=!0,t.setWorkerUrl(URL.createObjectURL(new Blob([a],{type:"text/javascript"}))))},s=Yt(),l=_0(),n=li(),u=qi(),c=_f(),f=Hs(),h=Np(),d=h.drawMode,p=h.selectMode,g=lu().prepSelect,m=lu().clearOutline,y=lu().clearSelectionsCache,_=lu().selectOnClick,v=Uv(),x=gye();function E(S,A){this.id=A,this.gd=S;var F=S._fullLayout,D=S._context;this.container=F._glcontainer.node(),this.isStatic=D.staticPlot,this.uid=F._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(F),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var M=E.prototype;M.plot=function(S,A,F){var D=this,R;D.map?R=new Promise(function(P,z){D.updateMap(S,A,P,z)}):R=new Promise(function(P,z){D.createMap(S,A,P,z)}),F.push(R)},M.createMap=function(S,A,F,D){var R=this,P=A[R.id],z=R.styleObj=T(P.style),I=P.bounds,L=I?[[I.west,I.south],[I.east,I.north]]:null;let B={container:R.div,style:z.style,center:b(P.center),zoom:P.zoom,bearing:P.bearing,pitch:P.pitch,maxBounds:L,interactive:!R.isStatic,canvasContextAttributes:{preserveDrawingBuffer:R.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},O=P._fitBounds;O&&(B.bounds=[[O.west,O.south],[O.east,O.north]],B.fitBoundsOptions={padding:v.fitBoundsPadding}),o();let G=R.map=new t.Map(B).addControl(new t.AttributionControl({compact:!0})),$={};G.setMissingStyleImageResolver(Z=>(!$[Z]&&/^[a-zA-Z0-9-]+$/.test(Z)&&($[Z]=new Promise(J=>{let N=new Image(15,15);N.onload=()=>{G.addImage(Z,N,{sdf:!0}),J()},N.onerror=()=>J(),N.crossOrigin="Anonymous",N.src=`https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/${Z}.svg`})),$[Z])),G.setTransformRequest(function(Z){return Z=Z.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),Z=Z.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),Z=Z.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:Z}}),G._canvas.style.left="0px",G._canvas.style.top="0px",R.rejectOnError(D),R.isStatic||R.initFx(S,A);var X=[];X.push(new Promise(function(Z){G.once("load",Z)})),X=X.concat(l.fetchTraceGeoData(S)),Promise.all(X).then(function(){O&&C(R,P),w(R,P),R.fillBelowLookup(S,A),R.updateData(S),R.updateLayout(A),R.resolveOnRender(F)}).catch(D)},M.updateMap=function(S,A,F,D){var R=this,P=R.map,z=A[this.id];R.rejectOnError(D);var I=[],L=T(z.style);JSON.stringify(R.styleObj)!==JSON.stringify(L)&&(R.styleObj=L,P.setStyle(L.style),R.traceHash={},I.push(new Promise(function(B){P.once("styledata",B)}))),I=I.concat(l.fetchTraceGeoData(S)),Promise.all(I).then(function(){R.fillBelowLookup(S,A),R.updateData(S);let B=z._fitBounds;B&&(P.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:v.fitBoundsPadding,animate:!1}),C(R,z),w(R,z)),R.updateLayout(A),R.resolveOnRender(F)}).catch(D)};function C(S,A){let{center:F,zoom:D}=S.getView();A._input.center=A.center=F,A._input.zoom=A.zoom=D,A._input._fitView={center:ja({},F),zoom:D}}function w(S,A){let F=S.getView();S.viewInitial={center:s.extendFlat({},F.center),bearing:A.bearing,pitch:A.pitch,zoom:F.zoom}}M.fillBelowLookup=function(S,A){var F=A[this.id],D=F.layers,R,P,z=this.belowLookup={},I=!1;for(R=0;R1)for(R=0;RA.project(D).x,_subplot:A},A.yaxis={_id:"y",c2p:D=>A.project(D).y,_subplot:A},A.updateFramework(S),A.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},u.setConvert(A.mockAxis,S)},M.initFx=function(S,A){var F=this,D=F.gd,R=F.map;R.on("moveend",function(I){if(F.map){var L=D._fullLayout;if(I.originalEvent||F.wheeling){var B=L[F.id];n.call("_storeDirectGUIEdit",D.layout,L._preGUI,F.getViewEdits(B));var O=F.getView();B._input.center=B.center=O.center,B._input.zoom=B.zoom=O.zoom,B._input.bearing=B.bearing=O.bearing,B._input.pitch=B.pitch=O.pitch,D.emit("plotly_relayout",F.getViewEditsWithDerived(O))}I.originalEvent&&I.originalEvent.type==="mouseup"?F.dragging=!1:F.wheeling&&(F.wheeling=!1),L&&L._rehover&&L._rehover()}}),R.on("wheel",function(){F.wheeling=!0}),R.on("mousemove",function(I){var L=F.div.getBoundingClientRect(),B=[I.originalEvent.offsetX,I.originalEvent.offsetY];I.target.getBoundingClientRect=function(){return L},F.xaxis.p2c=function(){return R.unproject(B).lng},F.yaxis.p2c=function(){return R.unproject(B).lat},D._fullLayout._rehover=function(){D._fullLayout._hoversubplot===F.id&&D._fullLayout[F.id]&&f.hover(D,I,F.id)},f.hover(D,I,F.id),D._fullLayout._hoversubplot=F.id});function P(){f.loneUnhover(A._hoverlayer)}R.on("dragstart",function(){F.dragging=!0,P()}),R.on("zoomstart",P),R.on("mouseout",function(){D._fullLayout._hoversubplot=null});function z(){var I=F.getView();D.emit("plotly_relayouting",F.getViewEditsWithDerived(I))}R.on("drag",z),R.on("zoom",z),R.on("dblclick",function(){var I=D._fullLayout[F.id];n.call("_storeDirectGUIEdit",D.layout,D._fullLayout._preGUI,F.getViewEdits(I));var L=F.viewInitial;R.setCenter(b(L.center)),R.setZoom(L.zoom),R.setBearing(L.bearing),R.setPitch(L.pitch);var B=F.getView();I._input.center=I.center=B.center,I._input.zoom=I.zoom=B.zoom,I._input.bearing=I.bearing=B.bearing,I._input.pitch=I.pitch=B.pitch,D.emit("plotly_doubleclick",null),D.emit("plotly_relayout",F.getViewEditsWithDerived(B))}),F.clearOutline=function(){y(F.dragOptions),m(F.dragOptions.gd)},F.onClickInPanFn=function(I){return function(L){var B=D._fullLayout.clickmode;B.indexOf("select")>-1&&_(L.originalEvent,D,[F.xaxis],[F.yaxis],F.id,I),B.indexOf("event")>-1&&f.click(D,L.originalEvent)}}},M.updateFx=function(S){var A=this,F=A.map,D=A.gd;if(A.isStatic)return;function R(L){var B=A.map.unproject(L);return[B.lng,B.lat]}var P=S.dragmode,z;z=function(L,B){if(B.isRect){var O=L.range={};O[A.id]=[R([B.xmin,B.ymin]),R([B.xmax,B.ymax])]}else{var G=L.lassoPoints={};G[A.id]=B.map(R)}};var I=A.dragOptions;A.dragOptions=s.extendDeep(I||{},{dragmode:S.dragmode,element:A.div,gd:D,plotinfo:{id:A.id,domain:S[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:z},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),F.off("click",A.onClickInPanHandler),p(P)||d(P)?(F.dragPan.disable(),F.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(L,B,O){g(L,B,O,A.dragOptions,P)},c.init(A.dragOptions)):(F.dragPan.enable(),F.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),F.on("click",A.onClickInPanHandler))},M.updateFramework=function(S){var A=S[this.id].domain,F=S._size,D=this.div.style;D.width=F.w*(A.x[1]-A.x[0])+"px",D.height=F.h*(A.y[1]-A.y[0])+"px",D.left=F.l+A.x[0]*F.w+"px",D.top=F.t+(1-A.y[1])*F.h+"px",this.xaxis._offset=F.l+A.x[0]*F.w,this.xaxis._length=F.w*(A.x[1]-A.x[0]),this.yaxis._offset=F.t+(1-A.y[1])*F.h,this.yaxis._length=F.h*(A.y[1]-A.y[0])},M.updateLayers=function(S){var A=S[this.id],F=A.layers,D=this.layerList,R;if(F.length!==D.length){for(R=0;R_ye});function _ye(e,r){let t=[];for(let n of e){if(n.subplot!==r||n.visible!==!0)continue;if(n.type==="choroplethmap")return null;let{lat:u,lon:c}=n;if(!c||!u)continue;let f=Math.min(c.length,u.length);for(let h=0;hT/2){var b=M.split("|").join("
");w.text(b).attr("data-unformatted",b).call(n.convertToTspans,f),k=l.bBox(w.node())}w.attr("transform",t(-3,-k.height+8)),C.insert("rect",".static-attribution").attr({x:-k.width-6,y:-k.height-3,width:k.width+6,height:k.height+3,fill:"rgba(255, 255, 255, 0.75)"});var S=1;k.width+6>T&&(S=T/(k.width+6));var A=[p.l+p.w*y.x[1],p.t+p.h*(1-y.y[0])];C.attr("transform",t(A[0],A[1])+a(S))}},e.updateFx=function(f){for(var h=f._fullLayout,d=h._subplots[c],p=0;p=0;u--)l.removeLayer(n[u][1])},s.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},r.exports=function(n,u){var c=u[0].trace,f=new o(n,c.uid),h=f.sourceId,d=t(u),p=f.below=n.belowLookup["trace-"+c.uid];return n.map.addSource(h,{type:"geojson",data:d.geojson}),f._addLayers(d,p),u[0].trace._glTrace=f,f}}}),Eye=ye({"src/traces/choroplethmap/index.js"(e,r){"use strict";r.exports={attributes:tG(),supplyDefaults:Tye(),colorbar:Ey(),calc:LP(),plot:Mye(),hoverPoints:FP(),eventData:PP(),selectPoints:IP(),styleOnSelect:function(t,a){if(a){var i=a[0].trace;i._glTrace.updateOnSelect(a)}},getBelow:function(t,a){for(var i=a.getMapLayers(),o=i.length-2;o>=0;o--){var s=i[o].id;if(typeof s=="string"&&s.indexOf("water")===0){for(var l=o+1;l0?+y[g]:0),p.push({type:"Feature",geometry:{type:"Point",coordinates:E},properties:M})}}var w=o.extractOpts(c),k=w.reversescale?o.flipScale(w.colorscale):w.colorscale,T=k[0][1],b=i.opacity(T)<1?T:i.addOpacity(T,0),S=["interpolate",["linear"],["heatmap-density"],0,b];for(g=1;g=0;n--)s.removeLayer(l[n][1])},o.dispose=function(){var s=this.subplot.map;this._removeLayers(),s.removeSource(this.sourceId)},r.exports=function(l,n){var u=n[0].trace,c=new i(l,u.uid),f=c.sourceId,h=t(n),d=c.below=l.belowLookup["trace-"+u.uid];return l.map.addSource(f,{type:"geojson",data:h.geojson}),c._addLayers(h,d),c}}}),Fye=ye({"src/traces/densitymap/hover.js"(e,r){"use strict";var t=qi(),a=IM().hoverPoints,i=IM().getExtraText;r.exports=function(s,l,n){var u=a(s,l,n);if(u){var c=u[0],f=c.cd,h=f[0].trace,d=f[c.index];if(delete c.color,"z"in d){var p=c.subplot.mockAxis;c.z=d.z,c.zLabel=t.tickText(p,p.c2l(d.z),"hover").text}return c.extraText=i(h,d,f[0].t.labels),[c]}}}}),Pye=ye({"src/traces/densitymap/event_data.js"(e,r){"use strict";r.exports=function(a,i){return a.lon=i.lon,a.lat=i.lat,a.z=i.z,a}}}),Iye=ye({"src/traces/densitymap/index.js"(e,r){"use strict";r.exports={attributes:aG(),supplyDefaults:kye(),colorbar:Ey(),formatLabels:MI(),calc:Cye(),plot:Lye(),hoverPoints:Fye(),eventData:Pye(),getBelow:function(t,a){for(var i=a.getMapLayers(),o=0;ox[F%x.length];v("color",_.label.map((F,D)=>i.addOpacity(E(D),.8))),v("customdata");var M=f.link||{},C=l.newContainer(h,"link");function w(F,D){return t.coerce(M,C,a.link,F,D)}w("label"),w("arrowlen"),w("source"),w("target"),w("value"),w("line.color"),w("line.width"),w("hoverinfo",f.hoverinfo),s(M,C,w,m),w("hovertemplate"),w("sort");var k=i.luminosity(p.paper_bgcolor)<.333,T=k?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",b=w("color",T);function S(F){if(!i.isValid(F))return F;let D=i.opacity(F);return D<=.8?i.addOpacity(F,D+.2):k?i.brighten(F,10):i.adjustLightness(F,-10)}w("hovercolor",Array.isArray(b)?b.map(S):S(b)),w("customdata"),n(M,C,{name:"colorscales",handleItemDefaults:u}),o(h,p,g),g("orientation"),g("direction"),g("valueformat"),g("valuesuffix");let A=_.x.length&&_.y.length?"freeform":void 0;g("arrangement",A),t.coerceFont(g,"textfont",p.font,{autoShadowDflt:!0}),h._length=null};function u(c,f){function h(d,p){return t.coerce(c,f,a.link.colorscales,d,p)}h("label"),h("cmin"),h("cmax"),h("colorscale")}}}),nG=ye({"node_modules/strongly-connected-components/scc.js"(e,r){"use strict";r.exports=t;function t(a){for(var i=a.length,o=new Array(i),s=new Array(i),l=new Array(i),n=new Array(i),u=new Array(i),c=new Array(i),f=0;f0;){v=E[E.length-1];var M=a[v];if(n[v]=0&&c[v].push(u[w])}n[v]=C}else{if(s[v]===o[v]){for(var k=[],T=[],b=0,C=x.length-1;C>=0;--C){var S=x[C];if(l[S]=!1,k.push(S),T.push(c[S]),b+=c[S].length,u[S]=d.length,S===v){x.length=C;break}}d.push(k);for(var A=new Array(b),C=0;Cw&&(w=h.source[x]),h.target[x]>w&&(w=h.target[x]);var k=w+1;c.node._count=k;var T,b=c.node.groups,S={};for(x=0;x0&&s(z,k)&&s(I,k)&&!(S.hasOwnProperty(z)&&S.hasOwnProperty(I)&&S[z]===S[I])){S.hasOwnProperty(I)&&(I=S[I]),S.hasOwnProperty(z)&&(z=S[z]),z=+z,I=+I,y[z]=y[I]=!0;var L="";h.label&&h.label[x]&&(L=h.label[x]);var B=null;L&&_.hasOwnProperty(L)&&(B=_[L]),d.push({pointNumber:x,label:L,color:p?h.color[x]:h.color,hovercolor:g?h.hovercolor[x]:h.hovercolor,customdata:m?h.customdata[x]:h.customdata,concentrationscale:B,source:z,target:I,value:+P}),R.source.push(z),R.target.push(I)}}var O=k+b.length,G=o(f.color),$=o(f.customdata),X=[];for(x=0;xk-1,childrenNodes:[],pointNumber:x,label:Z,color:G?f.color[x]:f.color,customdata:$?f.customdata[x]:f.customdata})}var J=!1;return u(O,R.source,R.target)&&(J=!0),{circular:J,links:d,nodes:X,groups:b,groupLookup:S}}function u(c,f,h){for(var d=a.init2dArray(c,0),p=0;p1})}r.exports=function(f,h){var d=n(h);return i({circular:d.circular,_nodes:d.nodes,_links:d.links,_groups:d.groups,_groupLookup:d.groupLookup})}}}),Oye=ye({"node_modules/d3-quadtree/dist/d3-quadtree.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e):(t=t||self,a(t.d3=t.d3||{}))})(e,function(t){"use strict";function a(k){var T=+this._x.call(null,k),b=+this._y.call(null,k);return i(this.cover(T,b),T,b,k)}function i(k,T,b,S){if(isNaN(T)||isNaN(b))return k;var A,F=k._root,D={data:S},R=k._x0,P=k._y0,z=k._x1,I=k._y1,L,B,O,G,$,X,Z,J;if(!F)return k._root=D,k;for(;F.length;)if(($=T>=(L=(R+z)/2))?R=L:z=L,(X=b>=(B=(P+I)/2))?P=B:I=B,A=F,!(F=F[Z=X<<1|$]))return A[Z]=D,k;if(O=+k._x.call(null,F.data),G=+k._y.call(null,F.data),T===O&&b===G)return D.next=F,A?A[Z]=D:k._root=D,k;do A=A?A[Z]=new Array(4):k._root=new Array(4),($=T>=(L=(R+z)/2))?R=L:z=L,(X=b>=(B=(P+I)/2))?P=B:I=B;while((Z=X<<1|$)===(J=(G>=B)<<1|O>=L));return A[J]=F,A[Z]=D,k}function o(k){var T,b,S=k.length,A,F,D=new Array(S),R=new Array(S),P=1/0,z=1/0,I=-1/0,L=-1/0;for(b=0;bI&&(I=A),FL&&(L=F));if(P>I||z>L)return this;for(this.cover(P,z).cover(I,L),b=0;bk||k>=A||S>T||T>=F;)switch(z=(TI||(R=G.y0)>L||(P=G.x1)=Z)<<1|k>=X)&&(G=B[B.length-1],B[B.length-1]=B[B.length-1-$],B[B.length-1-$]=G)}else{var J=k-+this._x.call(null,O.data),N=T-+this._y.call(null,O.data),H=J*J+N*N;if(H=(B=(D+P)/2))?D=B:P=B,($=L>=(O=(R+z)/2))?R=O:z=O,T=b,!(b=b[X=$<<1|G]))return this;if(!b.length)break;(T[X+1&3]||T[X+2&3]||T[X+3&3])&&(S=T,Z=X)}for(;b.data!==k;)if(A=b,!(b=b.next))return this;return(F=b.next)&&delete b.next,A?(F?A.next=F:delete A.next,this):T?(F?T[X]=F:delete T[X],(b=T[0]||T[1]||T[2]||T[3])&&b===(T[3]||T[2]||T[1]||T[0])&&!b.length&&(S?S[Z]=b:this._root=b),this):(this._root=F,this)}function h(k){for(var T=0,b=k.length;T=y.length)return v!=null&&w.sort(v),x!=null?x(w):w;for(var S=-1,A=w.length,F=y[k++],D,R,P=o(),z,I=T();++Sy.length)return w;var T,b=_[k-1];return x!=null&&k>=y.length?T=w.entries():(T=[],w.each(function(S,A){T.push({key:A,values:C(S,k)})})),b!=null?T.sort(function(S,A){return b(S.key,A.key)}):T}return E={object:function(w){return M(w,0,l,n)},map:function(w){return M(w,0,u,c)},entries:function(w){return C(M(w,0,u,c),0)},key:function(w){return y.push(w),E},sortKeys:function(w){return _[y.length-1]=w,E},sortValues:function(w){return v=w,E},rollup:function(w){return x=w,E}}}function l(){return{}}function n(y,_,v){y[_]=v}function u(){return o()}function c(y,_,v){y.set(_,v)}function f(){}var h=o.prototype;f.prototype=d.prototype={constructor:f,has:h.has,add:function(y){return y+="",this[a+y]=y,this},remove:h.remove,clear:h.clear,values:h.keys,size:h.size,empty:h.empty,each:h.each};function d(y,_){var v=new f;if(y instanceof f)y.each(function(M){v.add(M)});else if(y){var x=-1,E=y.length;if(_==null)for(;++x=0&&(h=f.slice(d+1),f=f.slice(0,d)),f&&!c.hasOwnProperty(f))throw new Error("unknown type: "+f);return{type:f,name:h}})}o.prototype=i.prototype={constructor:o,on:function(u,c){var f=this._,h=s(u+"",f),d,p=-1,g=h.length;if(arguments.length<2){for(;++p0)for(var f=new Array(d),h=0,d,p;h=0&&k._call.call(null,T),k=k._next;--a}function v(){c=(u=h.now())+f,a=i=0;try{_()}finally{a=0,E(),c=0}}function x(){var k=h.now(),T=k-u;T>s&&(f-=T,u=k)}function E(){for(var k,T=l,b,S=1/0;T;)T._call?(S>T._time&&(S=T._time),k=T,T=T._next):(b=T._next,T._next=null,T=k?k._next=b:l=b);n=k,M(S)}function M(k){if(!a){i&&(i=clearTimeout(i));var T=k-c;T>24?(k<1/0&&(i=setTimeout(v,k-h.now()-f)),o&&(o=clearInterval(o))):(o||(u=h.now(),o=setInterval(x,s)),a=1,d(v))}}function C(k,T,b){var S=new m;return T=T==null?0:+T,S.restart(function(A){S.stop(),k(A+T)},T,b),S}function w(k,T,b){var S=new m,A=T;return T==null?(S.restart(k,T,b),S):(T=+T,b=b==null?p():+b,S.restart(function F(D){D+=A,S.restart(F,A+=T,b),k(D)},T,b),S)}t.interval=w,t.now=p,t.timeout=C,t.timer=y,t.timerFlush=_,Object.defineProperty(t,"__esModule",{value:!0})})}}),Uye=ye({"node_modules/d3-force/dist/d3-force.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e,Oye(),oG(),Nye(),jye()):a(t.d3=t.d3||{},t.d3,t.d3,t.d3,t.d3)})(e,(function(t,a,i,o,s){"use strict";function l(k,T){var b;k==null&&(k=0),T==null&&(T=0);function S(){var A,F=b.length,D,R=0,P=0;for(A=0;AL.index){var Y=B-V.x-V.vx,K=O-V.y-V.vy,re=Y*Y+K*K;reB+q||WO+q||UP.r&&(P.r=P[z].r)}function R(){if(T){var P,z=T.length,I;for(b=new Array(z),P=0;P1?($==null?R.remove(G):R.set(G,O($)),T):R.get(G)},find:function(G,$,X){var Z=0,J=k.length,N,H,W,U,V;for(X==null?X=1/0:X*=X,Z=0;Z1?(z.on(G,$),T):z.on(G)}}}function E(){var k,T,b,S=n(-30),A,F=1,D=1/0,R=.81;function P(B){var O,G=k.length,$=a.quadtree(k,m,y).visitAfter(I);for(b=B,O=0;O=D)return;(B.data!==T||B.next)&&(X===0&&(X=u(),N+=X*X),Z===0&&(Z=u(),N+=Z*Z),Ngt?1:mt>=gt?0:NaN}function i(mt){let gt=mt,St=mt;mt.length===1&&(gt=(lr,dr)=>mt(lr)-dr,St=o(mt));function Dt(lr,dr,yr,vr){for(yr==null&&(yr=0),vr==null&&(vr=lr.length);yr>>1;St(lr[Fr],dr)<0?yr=Fr+1:vr=Fr}return yr}function kt(lr,dr,yr,vr){for(yr==null&&(yr=0),vr==null&&(vr=lr.length);yr>>1;St(lr[Fr],dr)>0?vr=Fr:yr=Fr+1}return yr}function Vt(lr,dr,yr,vr){yr==null&&(yr=0),vr==null&&(vr=lr.length);let Fr=Dt(lr,dr,yr,vr-1);return Fr>yr&>(lr[Fr-1],dr)>-gt(lr[Fr],dr)?Fr-1:Fr}return{left:Dt,center:Vt,right:kt}}function o(mt){return(gt,St)=>a(mt(gt),St)}function s(mt){return mt===null?NaN:+mt}function*l(mt,gt){if(gt===void 0)for(let St of mt)St!=null&&(St=+St)>=St&&(yield St);else{let St=-1;for(let Dt of mt)(Dt=gt(Dt,++St,mt))!=null&&(Dt=+Dt)>=Dt&&(yield Dt)}}let n=i(a),u=n.right,c=n.left,f=i(s).center;function h(mt,gt){let St=0;if(gt===void 0)for(let Dt of mt)Dt!=null&&(Dt=+Dt)>=Dt&&++St;else{let Dt=-1;for(let kt of mt)(kt=gt(kt,++Dt,mt))!=null&&(kt=+kt)>=kt&&++St}return St}function d(mt){return mt.length|0}function p(mt){return!(mt>0)}function g(mt){return typeof mt!="object"||"length"in mt?mt:Array.from(mt)}function m(mt){return gt=>mt(...gt)}function y(...mt){let gt=typeof mt[mt.length-1]=="function"&&m(mt.pop());mt=mt.map(g);let St=mt.map(d),Dt=mt.length-1,kt=new Array(Dt+1).fill(0),Vt=[];if(Dt<0||St.some(p))return Vt;for(;;){Vt.push(kt.map((dr,yr)=>mt[yr][dr]));let lr=Dt;for(;++kt[lr]===St[lr];){if(lr===0)return gt?Vt.map(gt):Vt;kt[lr--]=0}}}function _(mt,gt){var St=0,Dt=0;return Float64Array.from(mt,gt===void 0?kt=>St+=+kt||0:kt=>St+=+gt(kt,Dt++,mt)||0)}function v(mt,gt){return gtmt?1:gt>=mt?0:NaN}function x(mt,gt){let St=0,Dt,kt=0,Vt=0;if(gt===void 0)for(let lr of mt)lr!=null&&(lr=+lr)>=lr&&(Dt=lr-kt,kt+=Dt/++St,Vt+=Dt*(lr-kt));else{let lr=-1;for(let dr of mt)(dr=gt(dr,++lr,mt))!=null&&(dr=+dr)>=dr&&(Dt=dr-kt,kt+=Dt/++St,Vt+=Dt*(dr-kt))}if(St>1)return Vt/(St-1)}function E(mt,gt){let St=x(mt,gt);return St&&Math.sqrt(St)}function M(mt,gt){let St,Dt;if(gt===void 0)for(let kt of mt)kt!=null&&(St===void 0?kt>=kt&&(St=Dt=kt):(St>kt&&(St=kt),Dt=Vt&&(St=Dt=Vt):(St>Vt&&(St=Vt),Dt0){for(lr=gt[--St];St>0&&(Dt=lr,kt=gt[--St],lr=Dt+kt,Vt=kt-(lr-Dt),!Vt););St>0&&(Vt<0&>[St-1]<0||Vt>0&>[St-1]>0)&&(kt=Vt*2,Dt=lr+kt,kt==Dt-lr&&(lr=Dt))}return lr}}function w(mt,gt){let St=new C;if(gt===void 0)for(let Dt of mt)(Dt=+Dt)&&St.add(Dt);else{let Dt=-1;for(let kt of mt)(kt=+gt(kt,++Dt,mt))&&St.add(kt)}return+St}function k(mt,gt){let St=new C,Dt=-1;return Float64Array.from(mt,gt===void 0?kt=>St.add(+kt||0):kt=>St.add(+gt(kt,++Dt,mt)||0))}class T extends Map{constructor(gt,St=D){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:St}}),gt!=null)for(let[Dt,kt]of gt)this.set(Dt,kt)}get(gt){return super.get(S(this,gt))}has(gt){return super.has(S(this,gt))}set(gt,St){return super.set(A(this,gt),St)}delete(gt){return super.delete(F(this,gt))}}class b extends Set{constructor(gt,St=D){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:St}}),gt!=null)for(let Dt of gt)this.add(Dt)}has(gt){return super.has(S(this,gt))}add(gt){return super.add(A(this,gt))}delete(gt){return super.delete(F(this,gt))}}function S({_intern:mt,_key:gt},St){let Dt=gt(St);return mt.has(Dt)?mt.get(Dt):St}function A({_intern:mt,_key:gt},St){let Dt=gt(St);return mt.has(Dt)?mt.get(Dt):(mt.set(Dt,St),St)}function F({_intern:mt,_key:gt},St){let Dt=gt(St);return mt.has(Dt)&&(St=mt.get(St),mt.delete(Dt)),St}function D(mt){return mt!==null&&typeof mt=="object"?mt.valueOf():mt}function R(mt){return mt}function P(mt,...gt){return $(mt,R,R,gt)}function z(mt,...gt){return $(mt,Array.from,R,gt)}function I(mt,gt,...St){return $(mt,R,gt,St)}function L(mt,gt,...St){return $(mt,Array.from,gt,St)}function B(mt,...gt){return $(mt,R,G,gt)}function O(mt,...gt){return $(mt,Array.from,G,gt)}function G(mt){if(mt.length!==1)throw new Error("duplicate key");return mt[0]}function $(mt,gt,St,Dt){return(function kt(Vt,lr){if(lr>=Dt.length)return St(Vt);let dr=new T,yr=Dt[lr++],vr=-1;for(let Fr of Vt){let la=yr(Fr,++vr,Vt),Hr=dr.get(la);Hr?Hr.push(Fr):dr.set(la,[Fr])}for(let[Fr,la]of dr)dr.set(Fr,kt(la,lr));return gt(dr)})(mt,0)}function X(mt,gt){return Array.from(gt,St=>mt[St])}function Z(mt,...gt){if(typeof mt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");mt=Array.from(mt);let[St=a]=gt;if(St.length===1||gt.length>1){let Dt=Uint32Array.from(mt,(kt,Vt)=>Vt);return gt.length>1?(gt=gt.map(kt=>mt.map(kt)),Dt.sort((kt,Vt)=>{for(let lr of gt){let dr=a(lr[kt],lr[Vt]);if(dr)return dr}})):(St=mt.map(St),Dt.sort((kt,Vt)=>a(St[kt],St[Vt]))),X(mt,Dt)}return mt.sort(St)}function J(mt,gt,St){return(gt.length===1?Z(I(mt,gt,St),(([Dt,kt],[Vt,lr])=>a(kt,lr)||a(Dt,Vt))):Z(P(mt,St),(([Dt,kt],[Vt,lr])=>gt(kt,lr)||a(Dt,Vt)))).map(([Dt])=>Dt)}var N=Array.prototype,H=N.slice;function W(mt){return function(){return mt}}var U=Math.sqrt(50),V=Math.sqrt(10),j=Math.sqrt(2);function q(mt,gt,St){var Dt,kt=-1,Vt,lr,dr;if(gt=+gt,mt=+mt,St=+St,mt===gt&&St>0)return[mt];if((Dt=gt0){let yr=Math.round(mt/dr),vr=Math.round(gt/dr);for(yr*drgt&&--vr,lr=new Array(Vt=vr-yr+1);++ktgt&&--vr,lr=new Array(Vt=vr-yr+1);++kt=0?(Vt>=U?10:Vt>=V?5:Vt>=j?2:1)*Math.pow(10,kt):-Math.pow(10,-kt)/(Vt>=U?10:Vt>=V?5:Vt>=j?2:1)}function K(mt,gt,St){var Dt=Math.abs(gt-mt)/Math.max(0,St),kt=Math.pow(10,Math.floor(Math.log(Dt)/Math.LN10)),Vt=Dt/kt;return Vt>=U?kt*=10:Vt>=V?kt*=5:Vt>=j&&(kt*=2),gt0?(mt=Math.floor(mt/kt)*kt,gt=Math.ceil(gt/kt)*kt):kt<0&&(mt=Math.ceil(mt*kt)/kt,gt=Math.floor(gt*kt)/kt),Dt=kt}}function se(mt){return Math.ceil(Math.log(h(mt))/Math.LN2)+1}function le(){var mt=R,gt=M,St=se;function Dt(kt){Array.isArray(kt)||(kt=Array.from(kt));var Vt,lr=kt.length,dr,yr=new Array(lr);for(Vt=0;Vt=la)if(_i>=la&>===M){let Ka=Y(Fr,la,ti);isFinite(Ka)&&(Ka>0?la=(Math.floor(la/Ka)+1)*Ka:Ka<0&&(la=(Math.ceil(la*-Ka)+1)/-Ka))}else Hr.pop()}for(var jr=Hr.length;Hr[0]<=Fr;)Hr.shift(),--jr;for(;Hr[jr-1]>la;)Hr.pop(),--jr;var Oa=new Array(jr+1),Da;for(Vt=0;Vt<=jr;++Vt)Da=Oa[Vt]=[],Da.x0=Vt>0?Hr[Vt-1]:Fr,Da.x1=Vt=Dt)&&(St=Dt);else{let Dt=-1;for(let kt of mt)(kt=gt(kt,++Dt,mt))!=null&&(St=kt)&&(St=kt)}return St}function fe(mt,gt){let St;if(gt===void 0)for(let Dt of mt)Dt!=null&&(St>Dt||St===void 0&&Dt>=Dt)&&(St=Dt);else{let Dt=-1;for(let kt of mt)(kt=gt(kt,++Dt,mt))!=null&&(St>kt||St===void 0&&kt>=kt)&&(St=kt)}return St}function pe(mt,gt,St=0,Dt=mt.length-1,kt=a){for(;Dt>St;){if(Dt-St>600){let yr=Dt-St+1,vr=gt-St+1,Fr=Math.log(yr),la=.5*Math.exp(2*Fr/3),Hr=.5*Math.sqrt(Fr*la*(yr-la)/yr)*(vr-yr/2<0?-1:1),jr=Math.max(St,Math.floor(gt-vr*la/yr+Hr)),Oa=Math.min(Dt,Math.floor(gt+(yr-vr)*la/yr+Hr));pe(mt,gt,jr,Oa,kt)}let Vt=mt[gt],lr=St,dr=Dt;for(we(mt,St,gt),kt(mt[Dt],Vt)>0&&we(mt,St,Dt);lr0;)--dr}kt(mt[St],Vt)===0?we(mt,St,dr):(++dr,we(mt,dr,Dt)),dr<=gt&&(St=dr+1),gt<=dr&&(Dt=dr-1)}return mt}function we(mt,gt,St){let Dt=mt[gt];mt[gt]=mt[St],mt[St]=Dt}function xe(mt,gt,St){if(mt=Float64Array.from(l(mt,St)),!!(Dt=mt.length)){if((gt=+gt)<=0||Dt<2)return fe(mt);if(gt>=1)return ue(mt);var Dt,kt=(Dt-1)*gt,Vt=Math.floor(kt),lr=ue(pe(mt,Vt).subarray(0,Vt+1)),dr=fe(mt.subarray(Vt+1));return lr+(dr-lr)*(kt-Vt)}}function he(mt,gt,St=s){if(Dt=mt.length){if((gt=+gt)<=0||Dt<2)return+St(mt[0],0,mt);if(gt>=1)return+St(mt[Dt-1],Dt-1,mt);var Dt,kt=(Dt-1)*gt,Vt=Math.floor(kt),lr=+St(mt[Vt],Vt,mt),dr=+St(mt[Vt+1],Vt+1,mt);return lr+(dr-lr)*(kt-Vt)}}function oe(mt,gt,St){return Math.ceil((St-gt)/(2*(xe(mt,.75)-xe(mt,.25))*Math.pow(h(mt),-1/3)))}function te(mt,gt,St){return Math.ceil((St-gt)/(3.5*E(mt)*Math.pow(h(mt),-1/3)))}function ie(mt,gt){let St,Dt=-1,kt=-1;if(gt===void 0)for(let Vt of mt)++kt,Vt!=null&&(St=Vt)&&(St=Vt,Dt=kt);else for(let Vt of mt)(Vt=gt(Vt,++kt,mt))!=null&&(St=Vt)&&(St=Vt,Dt=kt);return Dt}function ee(mt,gt){let St=0,Dt=0;if(gt===void 0)for(let kt of mt)kt!=null&&(kt=+kt)>=kt&&(++St,Dt+=kt);else{let kt=-1;for(let Vt of mt)(Vt=gt(Vt,++kt,mt))!=null&&(Vt=+Vt)>=Vt&&(++St,Dt+=Vt)}if(St)return Dt/St}function ce(mt,gt){return xe(mt,.5,gt)}function*_e(mt){for(let gt of mt)yield*Nx(gt)}function Se(mt){return Array.from(_e(mt))}function Me(mt,gt){let St,Dt=-1,kt=-1;if(gt===void 0)for(let Vt of mt)++kt,Vt!=null&&(St>Vt||St===void 0&&Vt>=Vt)&&(St=Vt,Dt=kt);else for(let Vt of mt)(Vt=gt(Vt,++kt,mt))!=null&&(St>Vt||St===void 0&&Vt>=Vt)&&(St=Vt,Dt=kt);return Dt}function Ue(mt,gt=Ge){let St=[],Dt,kt=!1;for(let Vt of mt)kt&&St.push(gt(Dt,Vt)),Dt=Vt,kt=!0;return St}function Ge(mt,gt){return[mt,gt]}function Ze(mt,gt,St){mt=+mt,gt=+gt,St=(kt=arguments.length)<2?(gt=mt,mt=0,1):kt<3?1:+St;for(var Dt=-1,kt=Math.max(0,Math.ceil((gt-mt)/St))|0,Vt=new Array(kt);++Dt0:a(lr,lr)===0)&&(St=Vt,kt=lr,Dt=!0)}}else for(let kt of mt)(Dt?gt(kt,St)>0:gt(kt,kt)===0)&&(St=kt,Dt=!0);return St}function Pt(mt,gt=a){if(gt.length===1)return ie(mt,gt);let St,Dt=-1,kt=-1;for(let Vt of mt)++kt,(Dt<0?gt(Vt,Vt)===0:gt(Vt,St)>0)&&(St=Vt,Dt=kt);return Dt}function vt(mt,gt){let St=dt(mt,gt);return St<0?void 0:St}var Tt=st(Math.random);function st(mt){return function(St,Dt=0,kt=St.length){let Vt=kt-(Dt=+Dt);for(;Vt;){let lr=mt()*Vt--|0,dr=St[Vt+Dt];St[Vt+Dt]=St[lr+Dt],St[lr+Dt]=dr}return St}}function Ve(mt,gt){let St=0;if(gt===void 0)for(let Dt of mt)(Dt=+Dt)&&(St+=Dt);else{let Dt=-1;for(let kt of mt)(kt=+gt(kt,++Dt,mt))&&(St+=kt)}return St}function Ye(mt){if(!(Vt=mt.length))return[];for(var gt=-1,St=fe(mt,me),Dt=new Array(St);++gtgt(St,Dt,mt))}function Je(mt,gt,St){if(typeof gt!="function")throw new TypeError("reducer is not a function");let Dt=mt[Symbol.iterator](),kt,Vt,lr=-1;if(arguments.length<3){if({done:kt,value:St}=Dt.next(),kt)return;++lr}for(;{done:kt,value:Vt}=Dt.next(),!kt;)St=gt(St,Vt,++lr,mt);return St}function qe(mt){if(typeof mt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(mt).reverse()}function at(mt,...gt){mt=new Set(mt);for(let St of gt)for(let Dt of St)mt.delete(Dt);return mt}function tt(mt,gt){let St=gt[Symbol.iterator](),Dt=new Set;for(let kt of mt){if(Dt.has(kt))return!1;let Vt,lr;for(;({value:Vt,done:lr}=St.next())&&!lr;){if(Object.is(kt,Vt))return!1;Dt.add(Vt)}}return!0}function ct(mt){return mt instanceof Set?mt:new Set(mt)}function At(mt,...gt){mt=new Set(mt),gt=gt.map(ct);e:for(let St of mt)for(let Dt of gt)if(!Dt.has(St)){mt.delete(St);continue e}return mt}function ft(mt,gt){let St=mt[Symbol.iterator](),Dt=new Set;for(let kt of gt){if(Dt.has(kt))continue;let Vt,lr;for(;{value:Vt,done:lr}=St.next();){if(lr)return!1;if(Dt.add(Vt),Object.is(kt,Vt))break}}return!0}function qt(mt,gt){return ft(gt,mt)}function ar(...mt){let gt=new Set;for(let St of mt)for(let Dt of St)gt.add(Dt);return gt}t.Adder=C,t.InternMap=T,t.InternSet=b,t.ascending=a,t.bin=le,t.bisect=u,t.bisectCenter=f,t.bisectLeft=c,t.bisectRight=u,t.bisector=i,t.count=h,t.cross=y,t.cumsum=_,t.descending=v,t.deviation=E,t.difference=at,t.disjoint=tt,t.every=Ee,t.extent=M,t.fcumsum=k,t.filter=Ce,t.fsum=w,t.greatest=_t,t.greatestIndex=Pt,t.group=P,t.groupSort=J,t.groups=z,t.histogram=le,t.index=B,t.indexes=O,t.intersection=At,t.least=Ke,t.leastIndex=dt,t.map=Fe,t.max=ue,t.maxIndex=ie,t.mean=ee,t.median=ce,t.merge=Se,t.min=fe,t.minIndex=Me,t.nice=re,t.pairs=Ue,t.permute=X,t.quantile=xe,t.quantileSorted=he,t.quickselect=pe,t.range=Ze,t.reduce=Je,t.reverse=qe,t.rollup=I,t.rollups=L,t.scan=vt,t.shuffle=Tt,t.shuffler=st,t.some=De,t.sort=Z,t.subset=qt,t.sum=Ve,t.superset=ft,t.thresholdFreedmanDiaconis=oe,t.thresholdScott=te,t.thresholdSturges=se,t.tickIncrement=Y,t.tickStep=K,t.ticks=q,t.transpose=Ye,t.union=ar,t.variance=x,t.zip=be,Object.defineProperty(t,"__esModule",{value:!0})}))}}),Vye=ye({"node_modules/d3-path/dist/d3-path.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e):(t=t||self,a(t.d3=t.d3||{}))})(e,function(t){"use strict";var a=Math.PI,i=2*a,o=1e-6,s=i-o;function l(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function n(){return new l}l.prototype=n.prototype={constructor:l,moveTo:function(u,c){this._+="M"+(this._x0=this._x1=+u)+","+(this._y0=this._y1=+c)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(u,c){this._+="L"+(this._x1=+u)+","+(this._y1=+c)},quadraticCurveTo:function(u,c,f,h){this._+="Q"+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},bezierCurveTo:function(u,c,f,h,d,p){this._+="C"+ +u+","+ +c+","+ +f+","+ +h+","+(this._x1=+d)+","+(this._y1=+p)},arcTo:function(u,c,f,h,d){u=+u,c=+c,f=+f,h=+h,d=+d;var p=this._x1,g=this._y1,m=f-u,y=h-c,_=p-u,v=g-c,x=_*_+v*v;if(d<0)throw new Error("negative radius: "+d);if(this._x1===null)this._+="M"+(this._x1=u)+","+(this._y1=c);else if(x>o)if(!(Math.abs(v*m-y*_)>o)||!d)this._+="L"+(this._x1=u)+","+(this._y1=c);else{var E=f-p,M=h-g,C=m*m+y*y,w=E*E+M*M,k=Math.sqrt(C),T=Math.sqrt(x),b=d*Math.tan((a-Math.acos((C+x-w)/(2*k*T)))/2),S=b/T,A=b/k;Math.abs(S-1)>o&&(this._+="L"+(u+S*_)+","+(c+S*v)),this._+="A"+d+","+d+",0,0,"+ +(v*E>_*M)+","+(this._x1=u+A*m)+","+(this._y1=c+A*y)}},arc:function(u,c,f,h,d,p){u=+u,c=+c,f=+f,p=!!p;var g=f*Math.cos(h),m=f*Math.sin(h),y=u+g,_=c+m,v=1^p,x=p?h-d:d-h;if(f<0)throw new Error("negative radius: "+f);this._x1===null?this._+="M"+y+","+_:(Math.abs(this._x1-y)>o||Math.abs(this._y1-_)>o)&&(this._+="L"+y+","+_),f&&(x<0&&(x=x%i+i),x>s?this._+="A"+f+","+f+",0,1,"+v+","+(u-g)+","+(c-m)+"A"+f+","+f+",0,1,"+v+","+(this._x1=y)+","+(this._y1=_):x>o&&(this._+="A"+f+","+f+",0,"+ +(x>=a)+","+v+","+(this._x1=u+f*Math.cos(d))+","+(this._y1=c+f*Math.sin(d))))},rect:function(u,c,f,h){this._+="M"+(this._x0=this._x1=+u)+","+(this._y0=this._y1=+c)+"h"+ +f+"v"+ +h+"h"+-f+"Z"},toString:function(){return this._}},t.path=n,Object.defineProperty(t,"__esModule",{value:!0})})}}),sG=ye({"node_modules/d3-shape/dist/d3-shape.js"(e,r){(function(t,a){typeof e=="object"&&typeof r<"u"?a(e,Vye()):(t=t||self,a(t.d3=t.d3||{},t.d3))})(e,function(t,a){"use strict";function i(Be){return function(){return Be}}var o=Math.abs,s=Math.atan2,l=Math.cos,n=Math.max,u=Math.min,c=Math.sin,f=Math.sqrt,h=1e-12,d=Math.PI,p=d/2,g=2*d;function m(Be){return Be>1?0:Be<-1?d:Math.acos(Be)}function y(Be){return Be>=1?p:Be<=-1?-p:Math.asin(Be)}function _(Be){return Be.innerRadius}function v(Be){return Be.outerRadius}function x(Be){return Be.startAngle}function E(Be){return Be.endAngle}function M(Be){return Be&&Be.padAngle}function C(Be,et,ut,bt,Ot,It,Wt,jt){var sr=ut-Be,kr=bt-et,Mr=Wt-Ot,ua=jt-It,ra=ua*sr-Mr*kr;if(!(ra*raHi*Hi+Vi*Vi&&(Ni=jn,un=bn),{cx:Ni,cy:un,x01:-Mr,y01:-ua,x11:Ni*(Ot/Zi-1),y11:un*(Ot/Zi-1)}}function k(){var Be=_,et=v,ut=i(0),bt=null,Ot=x,It=E,Wt=M,jt=null;function sr(){var kr,Mr,ua=+Be.apply(this,arguments),ra=+et.apply(this,arguments),ni=Ot.apply(this,arguments)-p,Ca=It.apply(this,arguments)-p,Li=o(Ca-ni),Va=Ca>ni;if(jt||(jt=kr=a.path()),rah))jt.moveTo(0,0);else if(Li>g-h)jt.moveTo(ra*l(ni),ra*c(ni)),jt.arc(0,0,ra,ni,Ca,!Va),ua>h&&(jt.moveTo(ua*l(Ca),ua*c(Ca)),jt.arc(0,0,ua,Ca,ni,Va));else{var dn=ni,rn=Ca,pa=ni,_n=Ca,Zi=Li,Fi=Li,xn=Wt.apply(this,arguments)/2,Ni=xn>h&&(bt?+bt.apply(this,arguments):f(ua*ua+ra*ra)),un=u(o(ra-ua)/2,+ut.apply(this,arguments)),jn=un,bn=un,Wa,ui;if(Ni>h){var Hi=y(Ni/ua*c(xn)),Vi=y(Ni/ra*c(xn));(Zi-=Hi*2)>h?(Hi*=Va?1:-1,pa+=Hi,_n-=Hi):(Zi=0,pa=_n=(ni+Ca)/2),(Fi-=Vi*2)>h?(Vi*=Va?1:-1,dn+=Vi,rn-=Vi):(Fi=0,dn=rn=(ni+Ca)/2)}var $n=ra*l(dn),ro=ra*c(dn),Un=ua*l(_n),Kn=ua*c(_n);if(un>h){var To=ra*l(rn),Jn=ra*c(rn),qn=ua*l(pa),Fo=ua*c(pa),zn;if(Lih?bn>h?(Wa=w(qn,Fo,$n,ro,ra,bn,Va),ui=w(To,Jn,Un,Kn,ra,bn,Va),jt.moveTo(Wa.cx+Wa.x01,Wa.cy+Wa.y01),bnh)||!(Zi>h)?jt.lineTo(Un,Kn):jn>h?(Wa=w(Un,Kn,To,Jn,ua,-jn,Va),ui=w($n,ro,qn,Fo,ua,-jn,Va),jt.lineTo(Wa.cx+Wa.x01,Wa.cy+Wa.y01),jn=ra;--ni)jt.point(rn[ni],pa[ni]);jt.lineEnd(),jt.areaEnd()}Va&&(rn[ua]=+Be(Li,ua,Mr),pa[ua]=+ut(Li,ua,Mr),jt.point(et?+et(Li,ua,Mr):rn[ua],bt?+bt(Li,ua,Mr):pa[ua]))}if(dn)return jt=null,dn+""||null}function kr(){return F().defined(Ot).curve(Wt).context(It)}return sr.x=function(Mr){return arguments.length?(Be=typeof Mr=="function"?Mr:i(+Mr),et=null,sr):Be},sr.x0=function(Mr){return arguments.length?(Be=typeof Mr=="function"?Mr:i(+Mr),sr):Be},sr.x1=function(Mr){return arguments.length?(et=Mr==null?null:typeof Mr=="function"?Mr:i(+Mr),sr):et},sr.y=function(Mr){return arguments.length?(ut=typeof Mr=="function"?Mr:i(+Mr),bt=null,sr):ut},sr.y0=function(Mr){return arguments.length?(ut=typeof Mr=="function"?Mr:i(+Mr),sr):ut},sr.y1=function(Mr){return arguments.length?(bt=Mr==null?null:typeof Mr=="function"?Mr:i(+Mr),sr):bt},sr.lineX0=sr.lineY0=function(){return kr().x(Be).y(ut)},sr.lineY1=function(){return kr().x(Be).y(bt)},sr.lineX1=function(){return kr().x(et).y(ut)},sr.defined=function(Mr){return arguments.length?(Ot=typeof Mr=="function"?Mr:i(!!Mr),sr):Ot},sr.curve=function(Mr){return arguments.length?(Wt=Mr,It!=null&&(jt=Wt(It)),sr):Wt},sr.context=function(Mr){return arguments.length?(Mr==null?It=jt=null:jt=Wt(It=Mr),sr):It},sr}function R(Be,et){return etBe?1:et>=Be?0:NaN}function P(Be){return Be}function z(){var Be=P,et=R,ut=null,bt=i(0),Ot=i(g),It=i(0);function Wt(jt){var sr,kr=jt.length,Mr,ua,ra=0,ni=new Array(kr),Ca=new Array(kr),Li=+bt.apply(this,arguments),Va=Math.min(g,Math.max(-g,Ot.apply(this,arguments)-Li)),dn,rn=Math.min(Math.abs(Va)/kr,It.apply(this,arguments)),pa=rn*(Va<0?-1:1),_n;for(sr=0;sr0&&(ra+=_n);for(et!=null?ni.sort(function(Zi,Fi){return et(Ca[Zi],Ca[Fi])}):ut!=null&&ni.sort(function(Zi,Fi){return ut(jt[Zi],jt[Fi])}),sr=0,ua=ra?(Va-kr*pa)/ra:0;sr0?_n*ua:0)+pa,Ca[Mr]={data:jt[Mr],index:sr,value:_n,startAngle:Li,endAngle:dn,padAngle:rn};return Ca}return Wt.value=function(jt){return arguments.length?(Be=typeof jt=="function"?jt:i(+jt),Wt):Be},Wt.sortValues=function(jt){return arguments.length?(et=jt,ut=null,Wt):et},Wt.sort=function(jt){return arguments.length?(ut=jt,et=null,Wt):ut},Wt.startAngle=function(jt){return arguments.length?(bt=typeof jt=="function"?jt:i(+jt),Wt):bt},Wt.endAngle=function(jt){return arguments.length?(Ot=typeof jt=="function"?jt:i(+jt),Wt):Ot},Wt.padAngle=function(jt){return arguments.length?(It=typeof jt=="function"?jt:i(+jt),Wt):It},Wt}var I=B(b);function L(Be){this._curve=Be}L.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Be,et){this._curve.point(et*Math.sin(Be),et*-Math.cos(Be))}};function B(Be){function et(ut){return new L(Be(ut))}return et._curve=Be,et}function O(Be){var et=Be.curve;return Be.angle=Be.x,delete Be.x,Be.radius=Be.y,delete Be.y,Be.curve=function(ut){return arguments.length?et(B(ut)):et()._curve},Be}function G(){return O(F().curve(I))}function $(){var Be=D().curve(I),et=Be.curve,ut=Be.lineX0,bt=Be.lineX1,Ot=Be.lineY0,It=Be.lineY1;return Be.angle=Be.x,delete Be.x,Be.startAngle=Be.x0,delete Be.x0,Be.endAngle=Be.x1,delete Be.x1,Be.radius=Be.y,delete Be.y,Be.innerRadius=Be.y0,delete Be.y0,Be.outerRadius=Be.y1,delete Be.y1,Be.lineStartAngle=function(){return O(ut())},delete Be.lineX0,Be.lineEndAngle=function(){return O(bt())},delete Be.lineX1,Be.lineInnerRadius=function(){return O(Ot())},delete Be.lineY0,Be.lineOuterRadius=function(){return O(It())},delete Be.lineY1,Be.curve=function(Wt){return arguments.length?et(B(Wt)):et()._curve},Be}function X(Be,et){return[(et=+et)*Math.cos(Be-=Math.PI/2),et*Math.sin(Be)]}var Z=Array.prototype.slice;function J(Be){return Be.source}function N(Be){return Be.target}function H(Be){var et=J,ut=N,bt=S,Ot=A,It=null;function Wt(){var jt,sr=Z.call(arguments),kr=et.apply(this,sr),Mr=ut.apply(this,sr);if(It||(It=jt=a.path()),Be(It,+bt.apply(this,(sr[0]=kr,sr)),+Ot.apply(this,sr),+bt.apply(this,(sr[0]=Mr,sr)),+Ot.apply(this,sr)),jt)return It=null,jt+""||null}return Wt.source=function(jt){return arguments.length?(et=jt,Wt):et},Wt.target=function(jt){return arguments.length?(ut=jt,Wt):ut},Wt.x=function(jt){return arguments.length?(bt=typeof jt=="function"?jt:i(+jt),Wt):bt},Wt.y=function(jt){return arguments.length?(Ot=typeof jt=="function"?jt:i(+jt),Wt):Ot},Wt.context=function(jt){return arguments.length?(It=jt??null,Wt):It},Wt}function W(Be,et,ut,bt,Ot){Be.moveTo(et,ut),Be.bezierCurveTo(et=(et+bt)/2,ut,et,Ot,bt,Ot)}function U(Be,et,ut,bt,Ot){Be.moveTo(et,ut),Be.bezierCurveTo(et,ut=(ut+Ot)/2,bt,ut,bt,Ot)}function V(Be,et,ut,bt,Ot){var It=X(et,ut),Wt=X(et,ut=(ut+Ot)/2),jt=X(bt,ut),sr=X(bt,Ot);Be.moveTo(It[0],It[1]),Be.bezierCurveTo(Wt[0],Wt[1],jt[0],jt[1],sr[0],sr[1])}function j(){return H(W)}function q(){return H(U)}function Y(){var Be=H(V);return Be.angle=Be.x,delete Be.x,Be.radius=Be.y,delete Be.y,Be}var K={draw:function(Be,et){var ut=Math.sqrt(et/d);Be.moveTo(ut,0),Be.arc(0,0,ut,0,g)}},re={draw:function(Be,et){var ut=Math.sqrt(et/5)/2;Be.moveTo(-3*ut,-ut),Be.lineTo(-ut,-ut),Be.lineTo(-ut,-3*ut),Be.lineTo(ut,-3*ut),Be.lineTo(ut,-ut),Be.lineTo(3*ut,-ut),Be.lineTo(3*ut,ut),Be.lineTo(ut,ut),Be.lineTo(ut,3*ut),Be.lineTo(-ut,3*ut),Be.lineTo(-ut,ut),Be.lineTo(-3*ut,ut),Be.closePath()}},se=Math.sqrt(1/3),le=se*2,ue={draw:function(Be,et){var ut=Math.sqrt(et/le),bt=ut*se;Be.moveTo(0,-ut),Be.lineTo(bt,0),Be.lineTo(0,ut),Be.lineTo(-bt,0),Be.closePath()}},fe=.8908130915292852,pe=Math.sin(d/10)/Math.sin(7*d/10),we=Math.sin(g/10)*pe,xe=-Math.cos(g/10)*pe,he={draw:function(Be,et){var ut=Math.sqrt(et*fe),bt=we*ut,Ot=xe*ut;Be.moveTo(0,-ut),Be.lineTo(bt,Ot);for(var It=1;It<5;++It){var Wt=g*It/5,jt=Math.cos(Wt),sr=Math.sin(Wt);Be.lineTo(sr*ut,-jt*ut),Be.lineTo(jt*bt-sr*Ot,sr*bt+jt*Ot)}Be.closePath()}},oe={draw:function(Be,et){var ut=Math.sqrt(et),bt=-ut/2;Be.rect(bt,bt,ut,ut)}},te=Math.sqrt(3),ie={draw:function(Be,et){var ut=-Math.sqrt(et/(te*3));Be.moveTo(0,ut*2),Be.lineTo(-te*ut,-ut),Be.lineTo(te*ut,-ut),Be.closePath()}},ee=-.5,ce=Math.sqrt(3)/2,_e=1/Math.sqrt(12),Se=(_e/2+1)*3,Me={draw:function(Be,et){var ut=Math.sqrt(et/Se),bt=ut/2,Ot=ut*_e,It=bt,Wt=ut*_e+ut,jt=-It,sr=Wt;Be.moveTo(bt,Ot),Be.lineTo(It,Wt),Be.lineTo(jt,sr),Be.lineTo(ee*bt-ce*Ot,ce*bt+ee*Ot),Be.lineTo(ee*It-ce*Wt,ce*It+ee*Wt),Be.lineTo(ee*jt-ce*sr,ce*jt+ee*sr),Be.lineTo(ee*bt+ce*Ot,ee*Ot-ce*bt),Be.lineTo(ee*It+ce*Wt,ee*Wt-ce*It),Be.lineTo(ee*jt+ce*sr,ee*sr-ce*jt),Be.closePath()}},Ue=[K,re,ue,oe,he,ie,Me];function Ge(){var Be=i(K),et=i(64),ut=null;function bt(){var Ot;if(ut||(ut=Ot=a.path()),Be.apply(this,arguments).draw(ut,+et.apply(this,arguments)),Ot)return ut=null,Ot+""||null}return bt.type=function(Ot){return arguments.length?(Be=typeof Ot=="function"?Ot:i(Ot),bt):Be},bt.size=function(Ot){return arguments.length?(et=typeof Ot=="function"?Ot:i(+Ot),bt):et},bt.context=function(Ot){return arguments.length?(ut=Ot??null,bt):ut},bt}function Ze(){}function Ke(Be,et,ut){Be._context.bezierCurveTo((2*Be._x0+Be._x1)/3,(2*Be._y0+Be._y1)/3,(Be._x0+2*Be._x1)/3,(Be._y0+2*Be._y1)/3,(Be._x0+4*Be._x1+et)/6,(Be._y0+4*Be._y1+ut)/6)}function dt(Be){this._context=Be}dt.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:Ke(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(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1,this._line?this._context.lineTo(Be,et):this._context.moveTo(Be,et);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:Ke(this,Be,et);break}this._x0=this._x1,this._x1=Be,this._y0=this._y1,this._y1=et}};function _t(Be){return new dt(Be)}function Pt(Be){this._context=Be}Pt.prototype={areaStart:Ze,areaEnd:Ze,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(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1,this._x2=Be,this._y2=et;break;case 1:this._point=2,this._x3=Be,this._y3=et;break;case 2:this._point=3,this._x4=Be,this._y4=et,this._context.moveTo((this._x0+4*this._x1+Be)/6,(this._y0+4*this._y1+et)/6);break;default:Ke(this,Be,et);break}this._x0=this._x1,this._x1=Be,this._y0=this._y1,this._y1=et}};function vt(Be){return new Pt(Be)}function Tt(Be){this._context=Be}Tt.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(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var ut=(this._x0+4*this._x1+Be)/6,bt=(this._y0+4*this._y1+et)/6;this._line?this._context.lineTo(ut,bt):this._context.moveTo(ut,bt);break;case 3:this._point=4;default:Ke(this,Be,et);break}this._x0=this._x1,this._x1=Be,this._y0=this._y1,this._y1=et}};function st(Be){return new Tt(Be)}function Ve(Be,et){this._basis=new dt(Be),this._beta=et}Ve.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Be=this._x,et=this._y,ut=Be.length-1;if(ut>0)for(var bt=Be[0],Ot=et[0],It=Be[ut]-bt,Wt=et[ut]-Ot,jt=-1,sr;++jt<=ut;)sr=jt/ut,this._basis.point(this._beta*Be[jt]+(1-this._beta)*(bt+sr*It),this._beta*et[jt]+(1-this._beta)*(Ot+sr*Wt));this._x=this._y=null,this._basis.lineEnd()},point:function(Be,et){this._x.push(+Be),this._y.push(+et)}};var Ye=(function Be(et){function ut(bt){return et===1?new dt(bt):new Ve(bt,et)}return ut.beta=function(bt){return Be(+bt)},ut})(.85);function me(Be,et,ut){Be._context.bezierCurveTo(Be._x1+Be._k*(Be._x2-Be._x0),Be._y1+Be._k*(Be._y2-Be._y0),Be._x2+Be._k*(Be._x1-et),Be._y2+Be._k*(Be._y1-ut),Be._x2,Be._y2)}function be(Be,et){this._context=Be,this._k=(1-et)/6}be.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:me(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1,this._line?this._context.lineTo(Be,et):this._context.moveTo(Be,et);break;case 1:this._point=2,this._x1=Be,this._y1=et;break;case 2:this._point=3;default:me(this,Be,et);break}this._x0=this._x1,this._x1=this._x2,this._x2=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var Ee=(function Be(et){function ut(bt){return new be(bt,et)}return ut.tension=function(bt){return Be(+bt)},ut})(0);function De(Be,et){this._context=Be,this._k=(1-et)/6}De.prototype={areaStart:Ze,areaEnd:Ze,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(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1,this._x3=Be,this._y3=et;break;case 1:this._point=2,this._context.moveTo(this._x4=Be,this._y4=et);break;case 2:this._point=3,this._x5=Be,this._y5=et;break;default:me(this,Be,et);break}this._x0=this._x1,this._x1=this._x2,this._x2=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var Ce=(function Be(et){function ut(bt){return new De(bt,et)}return ut.tension=function(bt){return Be(+bt)},ut})(0);function Fe(Be,et){this._context=Be,this._k=(1-et)/6}Fe.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(Be,et){switch(Be=+Be,et=+et,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:me(this,Be,et);break}this._x0=this._x1,this._x1=this._x2,this._x2=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var Je=(function Be(et){function ut(bt){return new Fe(bt,et)}return ut.tension=function(bt){return Be(+bt)},ut})(0);function qe(Be,et,ut){var bt=Be._x1,Ot=Be._y1,It=Be._x2,Wt=Be._y2;if(Be._l01_a>h){var jt=2*Be._l01_2a+3*Be._l01_a*Be._l12_a+Be._l12_2a,sr=3*Be._l01_a*(Be._l01_a+Be._l12_a);bt=(bt*jt-Be._x0*Be._l12_2a+Be._x2*Be._l01_2a)/sr,Ot=(Ot*jt-Be._y0*Be._l12_2a+Be._y2*Be._l01_2a)/sr}if(Be._l23_a>h){var kr=2*Be._l23_2a+3*Be._l23_a*Be._l12_a+Be._l12_2a,Mr=3*Be._l23_a*(Be._l23_a+Be._l12_a);It=(It*kr+Be._x1*Be._l23_2a-et*Be._l12_2a)/Mr,Wt=(Wt*kr+Be._y1*Be._l23_2a-ut*Be._l12_2a)/Mr}Be._context.bezierCurveTo(bt,Ot,It,Wt,Be._x2,Be._y2)}function at(Be,et){this._context=Be,this._alpha=et}at.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(Be,et){if(Be=+Be,et=+et,this._point){var ut=this._x2-Be,bt=this._y2-et;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(ut*ut+bt*bt,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Be,et):this._context.moveTo(Be,et);break;case 1:this._point=2;break;case 2:this._point=3;default:qe(this,Be,et);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=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var tt=(function Be(et){function ut(bt){return et?new at(bt,et):new be(bt,0)}return ut.alpha=function(bt){return Be(+bt)},ut})(.5);function ct(Be,et){this._context=Be,this._alpha=et}ct.prototype={areaStart:Ze,areaEnd:Ze,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(Be,et){if(Be=+Be,et=+et,this._point){var ut=this._x2-Be,bt=this._y2-et;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(ut*ut+bt*bt,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Be,this._y3=et;break;case 1:this._point=2,this._context.moveTo(this._x4=Be,this._y4=et);break;case 2:this._point=3,this._x5=Be,this._y5=et;break;default:qe(this,Be,et);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=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var At=(function Be(et){function ut(bt){return et?new ct(bt,et):new De(bt,0)}return ut.alpha=function(bt){return Be(+bt)},ut})(.5);function ft(Be,et){this._context=Be,this._alpha=et}ft.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(Be,et){if(Be=+Be,et=+et,this._point){var ut=this._x2-Be,bt=this._y2-et;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(ut*ut+bt*bt,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:qe(this,Be,et);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=Be,this._y0=this._y1,this._y1=this._y2,this._y2=et}};var qt=(function Be(et){function ut(bt){return et?new ft(bt,et):new Fe(bt,0)}return ut.alpha=function(bt){return Be(+bt)},ut})(.5);function ar(Be){this._context=Be}ar.prototype={areaStart:Ze,areaEnd:Ze,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Be,et){Be=+Be,et=+et,this._point?this._context.lineTo(Be,et):(this._point=1,this._context.moveTo(Be,et))}};function mt(Be){return new ar(Be)}function gt(Be){return Be<0?-1:1}function St(Be,et,ut){var bt=Be._x1-Be._x0,Ot=et-Be._x1,It=(Be._y1-Be._y0)/(bt||Ot<0&&-0),Wt=(ut-Be._y1)/(Ot||bt<0&&-0),jt=(It*Ot+Wt*bt)/(bt+Ot);return(gt(It)+gt(Wt))*Math.min(Math.abs(It),Math.abs(Wt),.5*Math.abs(jt))||0}function Dt(Be,et){var ut=Be._x1-Be._x0;return ut?(3*(Be._y1-Be._y0)/ut-et)/2:et}function kt(Be,et,ut){var bt=Be._x0,Ot=Be._y0,It=Be._x1,Wt=Be._y1,jt=(It-bt)/3;Be._context.bezierCurveTo(bt+jt,Ot+jt*et,It-jt,Wt-jt*ut,It,Wt)}function Vt(Be){this._context=Be}Vt.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:kt(this,this._t0,Dt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Be,et){var ut=NaN;if(Be=+Be,et=+et,!(Be===this._x1&&et===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Be,et):this._context.moveTo(Be,et);break;case 1:this._point=2;break;case 2:this._point=3,kt(this,Dt(this,ut=St(this,Be,et)),ut);break;default:kt(this,this._t0,ut=St(this,Be,et));break}this._x0=this._x1,this._x1=Be,this._y0=this._y1,this._y1=et,this._t0=ut}}};function lr(Be){this._context=new dr(Be)}(lr.prototype=Object.create(Vt.prototype)).point=function(Be,et){Vt.prototype.point.call(this,et,Be)};function dr(Be){this._context=Be}dr.prototype={moveTo:function(Be,et){this._context.moveTo(et,Be)},closePath:function(){this._context.closePath()},lineTo:function(Be,et){this._context.lineTo(et,Be)},bezierCurveTo:function(Be,et,ut,bt,Ot,It){this._context.bezierCurveTo(et,Be,bt,ut,It,Ot)}};function yr(Be){return new Vt(Be)}function vr(Be){return new lr(Be)}function Fr(Be){this._context=Be}Fr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Be=this._x,et=this._y,ut=Be.length;if(ut)if(this._line?this._context.lineTo(Be[0],et[0]):this._context.moveTo(Be[0],et[0]),ut===2)this._context.lineTo(Be[1],et[1]);else for(var bt=la(Be),Ot=la(et),It=0,Wt=1;Wt=0;--et)Ot[et]=(Wt[et]-Ot[et+1])/It[et];for(It[ut-1]=(Be[ut]+Ot[ut-1])/2,et=0;et=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Be,et){switch(Be=+Be,et=+et,this._point){case 0:this._point=1,this._line?this._context.lineTo(Be,et):this._context.moveTo(Be,et);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,et),this._context.lineTo(Be,et);else{var ut=this._x*(1-this._t)+Be*this._t;this._context.lineTo(ut,this._y),this._context.lineTo(ut,et)}break}}this._x=Be,this._y=et}};function Oa(Be){return new jr(Be,.5)}function Da(Be){return new jr(Be,0)}function _i(Be){return new jr(Be,1)}function ti(Be,et){if((Wt=Be.length)>1)for(var ut=1,bt,Ot,It=Be[et[0]],Wt,jt=It.length;ut=0;)ut[et]=et;return ut}function ia(Be,et){return Be[et]}function na(){var Be=i([]),et=Ka,ut=ti,bt=ia;function Ot(It){var Wt=Be.apply(this,arguments),jt,sr=It.length,kr=Wt.length,Mr=new Array(kr),ua;for(jt=0;jt0){for(var ut,bt,Ot=0,It=Be[0].length,Wt;Ot0)for(var ut,bt=0,Ot,It,Wt,jt,sr,kr=Be[et[0]].length;bt0?(Ot[0]=Wt,Ot[1]=Wt+=It):It<0?(Ot[1]=jt,Ot[0]=jt+=It):(Ot[0]=0,Ot[1]=It)}function Qr(Be,et){if((Ot=Be.length)>0){for(var ut=0,bt=Be[et[0]],Ot,It=bt.length;ut0)||!((It=(Ot=Be[et[0]]).length)>0))){for(var ut=0,bt=1,Ot,It,Wt;btIt&&(It=Ot,ut=et);return ut}function Et(Be){var et=Be.map(Mt);return Ka(Be).sort(function(ut,bt){return et[ut]-et[bt]})}function Mt(Be){for(var et=0,ut=-1,bt=Be.length,Ot;++ut[D(we,xe,ue),we]));for(let[we,xe]of fe.entries()){xe.index=we;let{source:he,target:oe}=xe;typeof he!="object"&&(he=xe.source=_(pe,he)),typeof oe!="object"&&(oe=xe.target=_(pe,oe)),he.sourceLinks.push(xe),oe.targetLinks.push(xe)}if(z!=null)for(let{sourceLinks:we,targetLinks:xe}of ue)we.sort(z),xe.sort(z)}function X({nodes:ue}){for(let fe of ue)fe.value=fe.fixedValue===void 0?Math.max(a.sum(fe.sourceLinks,p),a.sum(fe.targetLinks,p)):fe.fixedValue}function Z({nodes:ue}){let fe=ue.length,pe=new Set(ue),we=new Set,xe=0;for(;pe.size;){for(let he of pe){he.depth=xe;for(let{target:oe}of he.sourceLinks)we.add(oe)}if(++xe>fe)throw new Error("circular link");pe=we,we=new Set}}function J({nodes:ue}){let fe=ue.length,pe=new Set(ue),we=new Set,xe=0;for(;pe.size;){for(let he of pe){he.height=xe;for(let{source:oe}of he.targetLinks)we.add(oe)}if(++xe>fe)throw new Error("circular link");pe=we,we=new Set}}function N({nodes:ue}){let fe=a.max(ue,xe=>xe.depth)+1,pe=(T-w-S)/(fe-1),we=new Array(fe);for(let xe of ue){let he=Math.max(0,Math.min(fe-1,Math.floor(R.call(null,xe,fe))));xe.layer=he,xe.x0=w+he*pe,xe.x1=xe.x0+S,we[he]?we[he].push(xe):we[he]=[xe]}if(P)for(let xe of we)xe.sort(P);return we}function H(ue){let fe=a.min(ue,pe=>(b-k-(pe.length-1)*F)/a.sum(pe,p));for(let pe of ue){let we=k;for(let xe of pe){xe.y0=we,xe.y1=we+xe.value*fe,we=xe.y1+F;for(let he of xe.sourceLinks)he.width=he.value*fe}we=(b-we+F)/(pe.length+1);for(let xe=0;xepe.length)-1)),H(fe);for(let pe=0;pe0))continue;let ee=(te/ie-oe.y0)*fe;oe.y0+=ee,oe.y1+=ee,K(oe)}P===void 0&&he.sort(d),j(he,pe)}}function V(ue,fe,pe){for(let we=ue.length,xe=we-2;xe>=0;--xe){let he=ue[xe];for(let oe of he){let te=0,ie=0;for(let{target:ce,value:_e}of oe.sourceLinks){let Se=_e*(ce.layer-oe.layer);te+=le(oe,ce)*Se,ie+=Se}if(!(ie>0))continue;let ee=(te/ie-oe.y0)*fe;oe.y0+=ee,oe.y1+=ee,K(oe)}P===void 0&&he.sort(d),j(he,pe)}}function j(ue,fe){let pe=ue.length>>1,we=ue[pe];Y(ue,we.y0-F,pe-1,fe),q(ue,we.y1+F,pe+1,fe),Y(ue,b,ue.length-1,fe),q(ue,k,0,fe)}function q(ue,fe,pe,we){for(;pe1e-6&&(xe.y0+=he,xe.y1+=he),fe=xe.y1+F}}function Y(ue,fe,pe,we){for(;pe>=0;--pe){let xe=ue[pe],he=(xe.y1-fe)*we;he>1e-6&&(xe.y0-=he,xe.y1-=he),fe=xe.y0-F}}function K({sourceLinks:ue,targetLinks:fe}){if(z===void 0){for(let{source:{sourceLinks:pe}}of fe)pe.sort(h);for(let{target:{targetLinks:pe}}of ue)pe.sort(f)}}function re(ue){if(z===void 0)for(let{sourceLinks:fe,targetLinks:pe}of ue)fe.sort(h),pe.sort(f)}function se(ue,fe){let pe=ue.y0-(ue.sourceLinks.length-1)*F/2;for(let{target:we,width:xe}of ue.sourceLinks){if(we===fe)break;pe+=xe+F}for(let{source:we,width:xe}of fe.targetLinks){if(we===ue)break;pe-=xe}return pe}function le(ue,fe){let pe=fe.y0-(fe.targetLinks.length-1)*F/2;for(let{source:we,width:xe}of fe.targetLinks){if(we===ue)break;pe+=xe+F}for(let{target:we,width:xe}of ue.sourceLinks){if(we===fe)break;pe-=xe}return pe}return G}function E(w){return[w.source.x1,w.y0]}function M(w){return[w.target.x0,w.y1]}function C(){return i.linkHorizontal().source(E).target(M)}t.sankey=x,t.sankeyCenter=u,t.sankeyJustify=n,t.sankeyLeft=s,t.sankeyLinkHorizontal=C,t.sankeyRight=l,Object.defineProperty(t,"__esModule",{value:!0})})}}),Hye=ye({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(e,r){(function(t,a){a(typeof e=="object"&&typeof r<"u"?e:t.d3=t.d3||{})})(e,(function(t){"use strict";function a(W,U){return WU?1:W>=U?0:NaN}function i(W){return W.length===1&&(W=o(W)),{left:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)<0?j=Y+1:q=Y}return j},right:function(U,V,j,q){for(j==null&&(j=0),q==null&&(q=U.length);j>>1;W(U[Y],V)>0?q=Y:j=Y+1}return j}}}function o(W){return function(U,V){return a(W(U),V)}}var s=i(a),l=s.right,n=s.left;function u(W,U){U==null&&(U=c);for(var V=0,j=W.length-1,q=W[0],Y=new Array(j<0?0:j);VW?1:U>=W?0:NaN}function d(W){return W===null?NaN:+W}function p(W,U){var V=W.length,j=0,q=-1,Y=0,K,re,se=0;if(U==null)for(;++q1)return se/(j-1)}function g(W,U){var V=p(W,U);return V&&Math.sqrt(V)}function m(W,U){var V=W.length,j=-1,q,Y,K;if(U==null){for(;++j=q)for(Y=K=q;++jq&&(Y=q),K=q)for(Y=K=q;++jq&&(Y=q),K0)return[W];if((j=U0)for(W=Math.ceil(W/re),U=Math.floor(U/re),K=new Array(Y=Math.ceil(U-W+1));++q=0?(Y>=C?10:Y>=w?5:Y>=k?2:1)*Math.pow(10,q):-Math.pow(10,-q)/(Y>=C?10:Y>=w?5:Y>=k?2:1)}function S(W,U,V){var j=Math.abs(U-W)/Math.max(0,V),q=Math.pow(10,Math.floor(Math.log(j)/Math.LN10)),Y=j/q;return Y>=C?q*=10:Y>=w?q*=5:Y>=k&&(q*=2),Ufe;)pe.pop(),--we;var xe=new Array(we+1),he;for(Y=0;Y<=we;++Y)he=xe[Y]=[],he.x0=Y>0?pe[Y-1]:ue,he.x1=Y=1)return+V(W[j-1],j-1,W);var j,q=(j-1)*U,Y=Math.floor(q),K=+V(W[Y],Y,W),re=+V(W[Y+1],Y+1,W);return K+(re-K)*(q-Y)}}function R(W,U,V){return W=v.call(W,d).sort(a),Math.ceil((V-U)/(2*(D(W,.75)-D(W,.25))*Math.pow(W.length,-1/3)))}function P(W,U,V){return Math.ceil((V-U)/(3.5*g(W)*Math.pow(W.length,-1/3)))}function z(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jY&&(Y=q)}else for(;++j=q)for(Y=q;++jY&&(Y=q);return Y}function I(W,U){var V=W.length,j=V,q=-1,Y,K=0;if(U==null)for(;++q=0;)for(K=W[U],V=K.length;--V>=0;)Y[--q]=K[V];return Y}function O(W,U){var V=W.length,j=-1,q,Y;if(U==null){for(;++j=q)for(Y=q;++jq&&(Y=q)}else for(;++j=q)for(Y=q;++jq&&(Y=q);return Y}function G(W,U){for(var V=U.length,j=new Array(V);V--;)j[V]=W[U[V]];return j}function $(W,U){if(V=W.length){var V,j=0,q=0,Y,K=W[q];for(U==null&&(U=a);++j=M})}function m(M){g(M);for(var C=i,w=t(C),k=w.components.filter(function(R){return R.length>1}),T=1/0,b,S=0;S"u"?"undefined":d(be))!=="object"&&(be=Ye.source=w(Ve,be)),(typeof Ee>"u"?"undefined":d(Ee))!=="object"&&(Ee=Ye.target=w(Ve,Ee)),be.sourceLinks.push(Ye),Ee.targetLinks.push(Ye)}),st}function Ke(st){st.nodes.forEach(function(Ve){Ve.partOfCycle=!1,Ve.value=Math.max(a.sum(Ve.sourceLinks,y),a.sum(Ve.targetLinks,y)),Ve.sourceLinks.forEach(function(Ye){Ye.circular&&(Ve.partOfCycle=!0,Ve.circularLinkType=Ye.circularLinkType)}),Ve.targetLinks.forEach(function(Ye){Ye.circular&&(Ve.partOfCycle=!0,Ve.circularLinkType=Ye.circularLinkType)})})}function dt(st){var Ve=0,Ye=0,me=0,be=0,Ee=a.max(st.nodes,function(De){return De.column});return st.links.forEach(function(De){De.circular&&(De.circularLinkType=="top"?Ve=Ve+De.width:Ye=Ye+De.width,De.target.column==0&&(be=be+De.width),De.source.column==Ee&&(me=me+De.width))}),Ve=Ve>0?Ve+T+b:Ve,Ye=Ye>0?Ye+T+b:Ye,me=me>0?me+T+b:me,be=be>0?be+T+b:be,{top:Ve,bottom:Ye,left:be,right:me}}function _t(st,Ve){var Ye=a.max(st.nodes,function(Je){return Je.column}),me=we-fe,be=xe-pe,Ee=me+Ve.right+Ve.left,De=be+Ve.top+Ve.bottom,Ce=me/Ee,Fe=be/De;return fe=fe*Ce+Ve.left,we=Ve.right==0?we:we*Ce,pe=pe*Fe+Ve.top,xe=xe*Fe,st.nodes.forEach(function(Je){Je.x0=fe+Je.column*((we-fe-he)/Ye),Je.x1=Je.x0+he}),Fe}function Pt(st){var Ve,Ye,me;for(Ve=st.nodes,Ye=[],me=0;Ve.length;++me,Ve=Ye,Ye=[])Ve.forEach(function(be){be.depth=me,be.sourceLinks.forEach(function(Ee){Ye.indexOf(Ee.target)<0&&!Ee.circular&&Ye.push(Ee.target)})});for(Ve=st.nodes,Ye=[],me=0;Ve.length;++me,Ve=Ye,Ye=[])Ve.forEach(function(be){be.height=me,be.targetLinks.forEach(function(Ee){Ye.indexOf(Ee.source)<0&&!Ee.circular&&Ye.push(Ee.source)})});st.nodes.forEach(function(be){be.column=Math.floor(ie.call(null,be,me))})}function vt(st,Ve,Ye){var me=i.nest().key(function(Je){return Je.column}).sortKeys(a.ascending).entries(st.nodes).map(function(Je){return Je.values});De(Ye),Fe();for(var be=1,Ee=Ve;Ee>0;--Ee)Ce(be*=.99,Ye),Fe();function De(Je){if(Me){var qe=1/0;me.forEach(function(At){var ft=xe*Me/(At.length+1);qe=ft0))if(At==0&&ct==1)qt=ft.y1-ft.y0,ft.y0=xe/2-qt/2,ft.y1=xe/2+qt/2;else if(At==at-1&&ct==1)qt=ft.y1-ft.y0,ft.y0=xe/2-qt/2,ft.y1=xe/2+qt/2;else{var ar=0,mt=a.mean(ft.sourceLinks,x),gt=a.mean(ft.targetLinks,v);mt&>?ar=(mt+gt)/2:ar=mt||gt;var St=(ar-_(ft))*Je;ft.y0+=St,ft.y1+=St}})})}function Fe(){me.forEach(function(Je){var qe,at,tt=pe,ct=Je.length,At;for(Je.sort(m),At=0;At0&&(qe.y0+=at,qe.y1+=at),tt=qe.y1+oe;if(at=tt-oe-xe,at>0)for(tt=qe.y0-=at,qe.y1-=at,At=ct-2;At>=0;--At)qe=Je[At],at=qe.y1+oe-tt,at>0&&(qe.y0-=at,qe.y1-=at),tt=qe.y0})}}function Tt(st){st.nodes.forEach(function(Ve){Ve.sourceLinks.sort(g),Ve.targetLinks.sort(p)}),st.nodes.forEach(function(Ve){var Ye=Ve.y0,me=Ye,be=Ve.y1,Ee=be;Ve.sourceLinks.forEach(function(De){De.circular?(De.y0=be-De.width/2,be=be-De.width):(De.y0=Ye+De.width/2,Ye+=De.width)}),Ve.targetLinks.forEach(function(De){De.circular?(De.y1=Ee-De.width/2,Ee=Ee-De.width):(De.y1=me+De.width/2,me+=De.width)})})}return Ge}function F(fe,pe,we){var xe=0;if(we===null){for(var he=[],oe=0;oepe.source.column)}function z(fe,pe){var we=0;fe.sourceLinks.forEach(function(he){we=he.circular&&!le(he,pe)?we+1:we});var xe=0;return fe.targetLinks.forEach(function(he){xe=he.circular&&!le(he,pe)?xe+1:xe}),we+xe}function I(fe){var pe=fe.source.sourceLinks,we=0;pe.forEach(function(oe){we=oe.circular?we+1:we});var xe=fe.target.targetLinks,he=0;return xe.forEach(function(oe){he=oe.circular?he+1:he}),!(we>1||he>1)}function L(fe,pe,we){return fe.sort(G),fe.forEach(function(xe,he){var oe=0;if(le(xe,we)&&I(xe))xe.circularPathData.verticalBuffer=oe+xe.width/2;else{var te=0;for(te;teoe?ie:oe}xe.circularPathData.verticalBuffer=oe+xe.width/2}}),fe}function B(fe,pe,we,xe){var he=5,oe=a.min(fe.links,function(ee){return ee.source.y0});fe.links.forEach(function(ee){ee.circular&&(ee.circularPathData={})});var te=fe.links.filter(function(ee){return ee.circularLinkType=="top"});L(te,pe,xe);var ie=fe.links.filter(function(ee){return ee.circularLinkType=="bottom"});L(ie,pe,xe),fe.links.forEach(function(ee){if(ee.circular){if(ee.circularPathData.arcRadius=ee.width+b,ee.circularPathData.leftNodeBuffer=he,ee.circularPathData.rightNodeBuffer=he,ee.circularPathData.sourceWidth=ee.source.x1-ee.source.x0,ee.circularPathData.sourceX=ee.source.x0+ee.circularPathData.sourceWidth,ee.circularPathData.targetX=ee.target.x0,ee.circularPathData.sourceY=ee.y0,ee.circularPathData.targetY=ee.y1,le(ee,xe)&&I(ee))ee.circularPathData.leftSmallArcRadius=b+ee.width/2,ee.circularPathData.leftLargeArcRadius=b+ee.width/2,ee.circularPathData.rightSmallArcRadius=b+ee.width/2,ee.circularPathData.rightLargeArcRadius=b+ee.width/2,ee.circularLinkType=="bottom"?(ee.circularPathData.verticalFullExtent=ee.source.y1+T+ee.circularPathData.verticalBuffer,ee.circularPathData.verticalLeftInnerExtent=ee.circularPathData.verticalFullExtent-ee.circularPathData.leftLargeArcRadius,ee.circularPathData.verticalRightInnerExtent=ee.circularPathData.verticalFullExtent-ee.circularPathData.rightLargeArcRadius):(ee.circularPathData.verticalFullExtent=ee.source.y0-T-ee.circularPathData.verticalBuffer,ee.circularPathData.verticalLeftInnerExtent=ee.circularPathData.verticalFullExtent+ee.circularPathData.leftLargeArcRadius,ee.circularPathData.verticalRightInnerExtent=ee.circularPathData.verticalFullExtent+ee.circularPathData.rightLargeArcRadius);else{var ce=ee.source.column,_e=ee.circularLinkType,Se=fe.links.filter(function(Ge){return Ge.source.column==ce&&Ge.circularLinkType==_e});ee.circularLinkType=="bottom"?Se.sort(X):Se.sort($);var Me=0;Se.forEach(function(Ge,Ze){Ge.circularLinkID==ee.circularLinkID&&(ee.circularPathData.leftSmallArcRadius=b+ee.width/2+Me,ee.circularPathData.leftLargeArcRadius=b+ee.width/2+Ze*pe+Me),Me=Me+Ge.width}),ce=ee.target.column,Se=fe.links.filter(function(Ge){return Ge.target.column==ce&&Ge.circularLinkType==_e}),ee.circularLinkType=="bottom"?Se.sort(J):Se.sort(Z),Me=0,Se.forEach(function(Ge,Ze){Ge.circularLinkID==ee.circularLinkID&&(ee.circularPathData.rightSmallArcRadius=b+ee.width/2+Me,ee.circularPathData.rightLargeArcRadius=b+ee.width/2+Ze*pe+Me),Me=Me+Ge.width}),ee.circularLinkType=="bottom"?(ee.circularPathData.verticalFullExtent=Math.max(we,ee.source.y1,ee.target.y1)+T+ee.circularPathData.verticalBuffer,ee.circularPathData.verticalLeftInnerExtent=ee.circularPathData.verticalFullExtent-ee.circularPathData.leftLargeArcRadius,ee.circularPathData.verticalRightInnerExtent=ee.circularPathData.verticalFullExtent-ee.circularPathData.rightLargeArcRadius):(ee.circularPathData.verticalFullExtent=oe-T-ee.circularPathData.verticalBuffer,ee.circularPathData.verticalLeftInnerExtent=ee.circularPathData.verticalFullExtent+ee.circularPathData.leftLargeArcRadius,ee.circularPathData.verticalRightInnerExtent=ee.circularPathData.verticalFullExtent+ee.circularPathData.rightLargeArcRadius)}ee.circularPathData.leftInnerExtent=ee.circularPathData.sourceX+ee.circularPathData.leftNodeBuffer,ee.circularPathData.rightInnerExtent=ee.circularPathData.targetX-ee.circularPathData.rightNodeBuffer,ee.circularPathData.leftFullExtent=ee.circularPathData.sourceX+ee.circularPathData.leftLargeArcRadius+ee.circularPathData.leftNodeBuffer,ee.circularPathData.rightFullExtent=ee.circularPathData.targetX-ee.circularPathData.rightLargeArcRadius-ee.circularPathData.rightNodeBuffer}if(ee.circular)ee.path=O(ee);else{var Ue=o.linkHorizontal().source(function(Ge){var Ze=Ge.source.x0+(Ge.source.x1-Ge.source.x0),Ke=Ge.y0;return[Ze,Ke]}).target(function(Ge){var Ze=Ge.target.x0,Ke=Ge.y1;return[Ze,Ke]});ee.path=Ue(ee)}})}function O(fe){var pe="";return fe.circularLinkType=="top"?pe="M"+fe.circularPathData.sourceX+" "+fe.circularPathData.sourceY+" L"+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.sourceY+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftSmallArcRadius+" 0 0 0 "+fe.circularPathData.leftFullExtent+" "+(fe.circularPathData.sourceY-fe.circularPathData.leftSmallArcRadius)+" L"+fe.circularPathData.leftFullExtent+" "+fe.circularPathData.verticalLeftInnerExtent+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftLargeArcRadius+" 0 0 0 "+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.verticalFullExtent+" L"+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.verticalFullExtent+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightLargeArcRadius+" 0 0 0 "+fe.circularPathData.rightFullExtent+" "+fe.circularPathData.verticalRightInnerExtent+" L"+fe.circularPathData.rightFullExtent+" "+(fe.circularPathData.targetY-fe.circularPathData.rightSmallArcRadius)+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightSmallArcRadius+" 0 0 0 "+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.targetY+" L"+fe.circularPathData.targetX+" "+fe.circularPathData.targetY:pe="M"+fe.circularPathData.sourceX+" "+fe.circularPathData.sourceY+" L"+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.sourceY+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftSmallArcRadius+" 0 0 1 "+fe.circularPathData.leftFullExtent+" "+(fe.circularPathData.sourceY+fe.circularPathData.leftSmallArcRadius)+" L"+fe.circularPathData.leftFullExtent+" "+fe.circularPathData.verticalLeftInnerExtent+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftLargeArcRadius+" 0 0 1 "+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.verticalFullExtent+" L"+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.verticalFullExtent+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightLargeArcRadius+" 0 0 1 "+fe.circularPathData.rightFullExtent+" "+fe.circularPathData.verticalRightInnerExtent+" L"+fe.circularPathData.rightFullExtent+" "+(fe.circularPathData.targetY+fe.circularPathData.rightSmallArcRadius)+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightSmallArcRadius+" 0 0 1 "+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.targetY+" L"+fe.circularPathData.targetX+" "+fe.circularPathData.targetY,pe}function G(fe,pe){return N(fe)==N(pe)?fe.circularLinkType=="bottom"?X(fe,pe):$(fe,pe):N(pe)-N(fe)}function $(fe,pe){return fe.y0-pe.y0}function X(fe,pe){return pe.y0-fe.y0}function Z(fe,pe){return fe.y1-pe.y1}function J(fe,pe){return pe.y1-fe.y1}function N(fe){return fe.target.column-fe.source.column}function H(fe){return fe.target.x0-fe.source.x1}function W(fe,pe){var we=R(fe),xe=H(pe)/Math.tan(we),he=se(fe)=="up"?fe.y1+xe:fe.y1-xe;return he}function U(fe,pe){var we=R(fe),xe=H(pe)/Math.tan(we),he=se(fe)=="up"?fe.y1-xe:fe.y1+xe;return he}function V(fe,pe,we,xe){fe.links.forEach(function(he){if(!he.circular&&he.target.column-he.source.column>1){var oe=he.source.column+1,te=he.target.column-1,ie=1,ee=te-oe+1;for(ie=1;oe<=te;oe++,ie++)fe.nodes.forEach(function(ce){if(ce.column==oe){var _e=ie/(ee+1),Se=Math.pow(1-_e,3),Me=3*_e*Math.pow(1-_e,2),Ue=3*Math.pow(_e,2)*(1-_e),Ge=Math.pow(_e,3),Ze=Se*he.y0+Me*he.y0+Ue*he.y1+Ge*he.y1,Ke=Ze-he.width/2,dt=Ze+he.width/2,_t;Ke>ce.y0&&Kece.y0&&dtce.y1&&q(Pt,_t,pe,we)})):Kece.y1&&(_t=dt-ce.y0+10,ce=q(ce,_t,pe,we),fe.nodes.forEach(function(Pt){k(Pt,xe)==k(ce,xe)||Pt.column!=ce.column||Pt.y0ce.y1&&q(Pt,_t,pe,we)}))}})}})}function j(fe,pe){return fe.y0>pe.y0&&fe.y0pe.y0&&fe.y1pe.y1}function q(fe,pe,we,xe){return fe.y0+pe>=we&&fe.y1+pe<=xe&&(fe.y0=fe.y0+pe,fe.y1=fe.y1+pe,fe.targetLinks.forEach(function(he){he.y1=he.y1+pe}),fe.sourceLinks.forEach(function(he){he.y0=he.y0+pe})),fe}function Y(fe,pe,we,xe){fe.nodes.forEach(function(he){xe&&he.y+(he.y1-he.y0)>pe&&(he.y=he.y-(he.y+(he.y1-he.y0)-pe));var oe=fe.links.filter(function(ee){return k(ee.source,we)==k(he,we)}),te=oe.length;te>1&&oe.sort(function(ee,ce){if(!ee.circular&&!ce.circular){if(ee.target.column==ce.target.column)return ee.y1-ce.y1;if(re(ee,ce)){if(ee.target.column>ce.target.column){var _e=U(ce,ee);return ee.y1-_e}if(ce.target.column>ee.target.column){var Se=U(ee,ce);return Se-ce.y1}}else return ee.y1-ce.y1}if(ee.circular&&!ce.circular)return ee.circularLinkType=="top"?-1:1;if(ce.circular&&!ee.circular)return ce.circularLinkType=="top"?1:-1;if(ee.circular&&ce.circular)return ee.circularLinkType===ce.circularLinkType&&ee.circularLinkType=="top"?ee.target.column===ce.target.column?ee.target.y1-ce.target.y1:ce.target.column-ee.target.column:ee.circularLinkType===ce.circularLinkType&&ee.circularLinkType=="bottom"?ee.target.column===ce.target.column?ce.target.y1-ee.target.y1:ee.target.column-ce.target.column:ee.circularLinkType=="top"?-1:1});var ie=he.y0;oe.forEach(function(ee){ee.y0=ie+ee.width/2,ie=ie+ee.width}),oe.forEach(function(ee,ce){if(ee.circularLinkType=="bottom"){var _e=ce+1,Se=0;for(_e;_e1&&he.sort(function(ie,ee){if(!ie.circular&&!ee.circular){if(ie.source.column==ee.source.column)return ie.y0-ee.y0;if(re(ie,ee)){if(ee.source.column0?"up":"down"}function le(fe,pe){return k(fe.source,pe)==k(fe.target,pe)}function ue(fe,pe,we){var xe=fe.nodes,he=fe.links,oe=!1,te=!1;if(he.forEach(function(Me){Me.circularLinkType=="top"?oe=!0:Me.circularLinkType=="bottom"&&(te=!0)}),oe==!1||te==!1){var ie=a.min(xe,function(Me){return Me.y0}),ee=a.max(xe,function(Me){return Me.y1}),ce=ee-ie,_e=we-pe,Se=_e/ce;xe.forEach(function(Me){var Ue=(Me.y1-Me.y0)*Se;Me.y0=(Me.y0-ie)*Se,Me.y1=Me.y0+Ue}),he.forEach(function(Me){Me.y0=(Me.y0-ie)*Se,Me.y1=(Me.y1-ie)*Se,Me.width=Me.width*Se})}}t.sankeyCircular=A,t.sankeyCenter=f,t.sankeyLeft=n,t.sankeyRight=u,t.sankeyJustify=c,Object.defineProperty(t,"__esModule",{value:!0})}))}}),lG=ye({"src/traces/sankey/constants.js"(e,r){"use strict";r.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"}}}}),Yye=ye({"src/traces/sankey/render.js"(e,r){"use strict";var t=Uye(),a=(Xm(),On(zv)).interpolateNumber,i=ai(),o=Gye(),s=$ye(),l=lG(),n=Ya(),u=$i(),c=Yt(),f=c.strTranslate,h=c.strRotate,d=$p(),p=d.keyFun,g=d.repeat,m=d.unwrap,y=Go(),_=li(),v=Yl(),x=v.CAP_SHIFT,E=v.LINE_SPACING,M=3;function C(H,W,U){var V=m(W),j=V.trace,q=j.domain,Y=j.orientation==="h",K=j.direction==="reversed",re=j.node.pad,se=j.node.thickness,le={justify:o.sankeyJustify,left:o.sankeyLeft,right:o.sankeyRight,center:o.sankeyCenter}[j.node.align],ue=H.width*(q.x[1]-q.x[0]),fe=H.height*(q.y[1]-q.y[0]),pe=V._nodes,we=V._links,xe=V.circular,he;xe?he=s.sankeyCircular().circularLinkGap(0):he=o.sankey(),he.iterations(l.sankeyIterations).size(Y?[ue,fe]:[fe,ue]).nodeWidth(se).nodePadding(re).nodeId(function(vt){return vt.pointNumber}).nodeAlign(le).nodes(pe).links(we);function oe(vt){j[vt].sort==="input"&&(xe?c.warn(`Circular Sankey diagrams do not support the "input" ${vt}.sort mode; falling back to the default sort.`):he[`${vt}Sort`](null))}oe("link"),oe("node");var te=he();he.nodePadding()=Ye||(Ve=Ye-st.y0,Ve>1e-6&&(st.y0+=Ve,st.y1+=Ve)),Ye=st.y1+re})}function Ke(vt){var Tt=vt.map(function(De,Ce){return{x0:De.x0,index:Ce}}).sort(function(De,Ce){return De.x0-Ce.x0}),st=[],Ve=-1,Ye,me=-1/0,be;for(ie=0;ieme+se&&(Ve+=1,Ye=Ee.x0),me=Ee.x0,st[Ve]||(st[Ve]=[]),st[Ve].push(Ee),be=Ye-Ee.x0,Ee.x0+=be,Ee.x1+=be}return st}if(j.node.x.length&&j.node.y.length){for(ie=0;ie0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(U="M "+(j.targetX-W)+" "+(j.targetY-V)+" L "+(j.rightInnerExtent-W)+" "+(j.targetY-V)+" A "+(j.rightLargeArcRadius+V)+" "+(j.rightSmallArcRadius+V)+" 0 0 0 "+(j.rightFullExtent-V-W)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-V-W)+" "+j.verticalRightInnerExtent,q&&Y?U+=" A "+(j.rightLargeArcRadius+V)+" "+(j.rightLargeArcRadius+V)+" 0 0 0 "+(j.rightInnerExtent-V-W)+" "+(j.verticalFullExtent+V)+" L "+(j.rightFullExtent+V-W-(j.rightLargeArcRadius-V))+" "+(j.verticalFullExtent+V)+" A "+(j.rightLargeArcRadius+V)+" "+(j.rightLargeArcRadius+V)+" 0 0 0 "+(j.leftFullExtent+V)+" "+j.verticalLeftInnerExtent:q?U+=" A "+(j.rightLargeArcRadius-V)+" "+(j.rightSmallArcRadius-V)+" 0 0 1 "+(j.rightFullExtent-W-V-(j.rightLargeArcRadius-V))+" "+(j.verticalFullExtent-V)+" L "+(j.leftFullExtent+V+(j.rightLargeArcRadius-V))+" "+(j.verticalFullExtent-V)+" A "+(j.rightLargeArcRadius-V)+" "+(j.rightSmallArcRadius-V)+" 0 0 1 "+(j.leftFullExtent+V)+" "+j.verticalLeftInnerExtent:U+=" A "+(j.rightLargeArcRadius+V)+" "+(j.rightLargeArcRadius+V)+" 0 0 0 "+(j.rightInnerExtent-W)+" "+(j.verticalFullExtent+V)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+V)+" A "+(j.leftLargeArcRadius+V)+" "+(j.leftLargeArcRadius+V)+" 0 0 0 "+(j.leftFullExtent+V)+" "+j.verticalLeftInnerExtent,U+=" L "+(j.leftFullExtent+V)+" "+(j.sourceY+j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+V)+" "+(j.leftSmallArcRadius+V)+" 0 0 0 "+j.leftInnerExtent+" "+(j.sourceY-V)+" L "+j.sourceX+" "+(j.sourceY-V)+" L "+j.sourceX+" "+(j.sourceY+V)+" L "+j.leftInnerExtent+" "+(j.sourceY+V)+" A "+(j.leftLargeArcRadius-V)+" "+(j.leftSmallArcRadius-V)+" 0 0 1 "+(j.leftFullExtent-V)+" "+(j.sourceY+j.leftSmallArcRadius)+" L "+(j.leftFullExtent-V)+" "+j.verticalLeftInnerExtent,q&&Y?U+=" A "+(j.rightLargeArcRadius-V)+" "+(j.rightSmallArcRadius-V)+" 0 0 1 "+(j.leftFullExtent-V-(j.rightLargeArcRadius-V))+" "+(j.verticalFullExtent-V)+" L "+(j.rightFullExtent+V-W+(j.rightLargeArcRadius-V))+" "+(j.verticalFullExtent-V)+" A "+(j.rightLargeArcRadius-V)+" "+(j.rightSmallArcRadius-V)+" 0 0 1 "+(j.rightFullExtent+V-W)+" "+j.verticalRightInnerExtent:q?U+=" A "+(j.rightLargeArcRadius+V)+" "+(j.rightLargeArcRadius+V)+" 0 0 0 "+(j.leftFullExtent+V)+" "+(j.verticalFullExtent+V)+" L "+(j.rightFullExtent-W-V)+" "+(j.verticalFullExtent+V)+" A "+(j.rightLargeArcRadius+V)+" "+(j.rightLargeArcRadius+V)+" 0 0 0 "+(j.rightFullExtent+V-W)+" "+j.verticalRightInnerExtent:U+=" A "+(j.leftLargeArcRadius-V)+" "+(j.leftLargeArcRadius-V)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-V)+" L "+(j.rightInnerExtent-W)+" "+(j.verticalFullExtent-V)+" A "+(j.rightLargeArcRadius-V)+" "+(j.rightLargeArcRadius-V)+" 0 0 1 "+(j.rightFullExtent+V-W)+" "+j.verticalRightInnerExtent,U+=" L "+(j.rightFullExtent+V-W)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-V)+" "+(j.rightSmallArcRadius-V)+" 0 0 1 "+(j.rightInnerExtent-W)+" "+(j.targetY+V)+" L "+(j.targetX-W)+" "+(j.targetY+V)+(W>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),U}function T(){var H=.5;function W(U){var V=U.linkArrowLength;if(U.link.circular)return k(U.link,V);var j=Math.abs((U.link.target.x0-U.link.source.x1)/2);V>j&&(V=j);var q=U.link.source.x1,Y=U.link.target.x0-V,K=a(q,Y),re=K(H),se=K(1-H),le=U.link.y0-U.link.width/2,ue=U.link.y0+U.link.width/2,fe=U.link.y1-U.link.width/2,pe=U.link.y1+U.link.width/2,we="M"+q+","+le,xe="C"+re+","+le+" "+se+","+fe+" "+Y+","+fe,he="C"+se+","+pe+" "+re+","+ue+" "+q+","+ue,oe=V>0?"L"+(Y+V)+","+(fe+U.link.width/2):"";return oe+="L"+Y+","+pe,we+xe+oe+he+"Z"}return W}function b(H,W){var U=l.nodePadAcross,V=H.nodePad/2;W.dx=W.x1-W.x0,W.dy=W.y1-W.y0;var j=W.dx,q=Math.max(.5,W.dy),Y="node_"+W.pointNumber;return W.group&&(Y=c.randstr()),W.trace=H.trace,W.curveNumber=H.trace.index,{index:W.pointNumber,key:Y,partOfGroup:W.partOfGroup||!1,group:W.group,traceId:H.key,trace:H.trace,node:W,nodePad:H.nodePad,nodeLineColor:H.nodeLineColor,nodeLineWidth:H.nodeLineWidth,textFont:H.textFont,size:H.horizontal?H.height:H.width,visibleWidth:Math.ceil(j),visibleHeight:q,zoneX:-U,zoneY:-V,zoneWidth:j+2*U,zoneHeight:q+2*V,labelY:H.horizontal?W.dy/2+1:W.dx/2+1,left:W.originalLayer===1,sizeAcross:H.width,forceLayouts:H.forceLayouts,horizontal:H.horizontal,reversed:H.reversed,rgb:n.rgb(W.color),alpha:n.parse(W.color).alpha,valueFormat:H.valueFormat,valueSuffix:H.valueSuffix,sankey:H.sankey,graph:H.graph,arrangement:H.arrangement,uniqueNodeLabelPathId:[H.guid,H.key,Y].join("_"),interactionState:H.interactionState,figure:H}}function S(H){H.attr("transform",function(W){return f(W.node.x0.toFixed(3),W.node.y0.toFixed(3))})}function A(H){H.call(S)}function F(H,W){H.call(A),W.attr("d",T())}function D(H){H.attr("width",function(W){return W.node.x1-W.node.x0}).attr("height",function(W){return W.visibleHeight})}function R(H){return H.link.width>1||H.linkLineWidth>0}function P(H){return H.horizontal?H.reversed?f(H.translateX+H.width,H.translateY)+"matrix(-1 0 0 1 0 0)":f(H.translateX,H.translateY)+"matrix(1 0 0 1 0 0)":H.reversed?f(H.translateX,H.translateY+H.height)+"matrix(0 -1 1 0 0 0)":f(H.translateX,H.translateY)+"matrix(0 1 1 0 0 0)"}function z(H,W,U){H.on(".basic",null).on("mouseover.basic",function(V){!V.interactionState.dragInProgress&&!V.partOfGroup&&(U.hover(this,V,W),V.interactionState.hovered=[this,V])}).on("mousemove.basic",function(V){!V.interactionState.dragInProgress&&!V.partOfGroup&&(U.follow(this,V),V.interactionState.hovered=[this,V])}).on("mouseout.basic",function(V){!V.interactionState.dragInProgress&&!V.partOfGroup&&(U.unhover(this,V,W),V.interactionState.hovered=!1)}).on("click.basic",function(V){V.interactionState.hovered&&(U.unhover(this,V,W),V.interactionState.hovered=!1),!V.interactionState.dragInProgress&&!V.partOfGroup&&U.select(this,V,W)})}function I(H,W,U,V){var j=i.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"&&(c.ensureSingle(V._fullLayout._infolayer,"g","dragcover",function(K){V._fullLayout._dragCover=K}),c.raiseToTop(this),q.interactionState.dragInProgress=q.node,X(q.node),q.interactionState.hovered&&(U.nodeEvents.unhover.apply(0,q.interactionState.hovered),q.interactionState.hovered=!1),q.arrangement==="snap")){var Y=q.traceId+"|"+q.key;q.forceLayouts[Y]?q.forceLayouts[Y].alpha(1):L(H,Y,q,V),B(H,W,q,Y,V)}}).on("drag",function(q){if(q.arrangement!=="fixed"){var Y=i.event.x,K=i.event.y;q.arrangement==="snap"?(q.node.x0=Y-q.visibleWidth/2,q.node.x1=Y+q.visibleWidth/2,q.node.y0=K-q.visibleHeight/2,q.node.y1=K+q.visibleHeight/2):(q.arrangement==="freeform"&&(q.node.x0=Y-q.visibleWidth/2,q.node.x1=Y+q.visibleWidth/2),K=Math.max(0,Math.min(q.size-q.visibleHeight/2,K)),q.node.y0=K-q.visibleHeight/2,q.node.y1=K+q.visibleHeight/2),X(q.node),q.arrangement!=="snap"&&(q.sankey.update(q.graph),F(H.filter(Z(q)),W))}}).on("dragend",function(q){if(q.arrangement!=="fixed"){q.interactionState.dragInProgress=!1;for(var Y=0;Y0)window.requestAnimationFrame(q);else{var re=U.node.originalX;U.node.x0=re-U.visibleWidth/2,U.node.x1=re+U.visibleWidth/2,G(U,j)}})}function O(H,W,U,V){return function(){for(var q=0,Y=0;Y0&&V.forceLayouts[W].alpha(0)}}function G(H,W){for(var U=[],V=[],j=0;jR(he)?n.rgb(he.linkLineColor):he.rgb).style("stroke-opacity",he=>R(he)?n.opacity(he.linkLineColor):he.alpha).style("fill",he=>he.rgb).style("fill-opacity",he=>he.alpha).style("stroke-width",he=>R(he)?he.linkLineWidth:1).attr("d",T()),ue.style("opacity",function(){return H._context.staticPlot||Y||K?1:0}).transition().ease(l.ease).duration(l.duration).style("opacity",1),ue.exit().transition().ease(l.ease).duration(l.duration).style("opacity",0).remove();var fe=se.selectAll("."+l.cn.sankeyNodeSet).data(g,p);fe.enter().append("g").classed(l.cn.sankeyNodeSet,!0),fe.style("cursor",function(he){switch(he.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var pe=fe.selectAll("."+l.cn.sankeyNode).data(function(he){var oe=he.graph.nodes;return $(oe),oe.map(b.bind(null,he))},p);pe.enter().append("g").classed(l.cn.sankeyNode,!0).call(S).style("opacity",function(he){return(H._context.staticPlot||Y)&&!he.partOfGroup?1:0}),pe.call(z,se,j.nodeEvents).call(I,ue,j,H),pe.transition().ease(l.ease).duration(l.duration).call(S).style("opacity",function(he){return he.partOfGroup?0:1}),pe.exit().transition().ease(l.ease).duration(l.duration).style("opacity",0).remove();var we=pe.selectAll("."+l.cn.nodeRect).data(g);we.enter().append("rect").classed(l.cn.nodeRect,!0).call(D),we.style("stroke-width",function(he){return he.nodeLineWidth}).style("stroke",function(he){return n.rgb(he.nodeLineColor)}).style("stroke-opacity",function(he){return n.opacity(he.nodeLineColor)}).style("fill",he=>he.rgb).style("fill-opacity",he=>he.alpha),we.transition().ease(l.ease).duration(l.duration).call(D);var xe=pe.selectAll("."+l.cn.nodeLabel).data(g);xe.enter().append("text").classed(l.cn.nodeLabel,!0).style("cursor","default"),xe.attr("data-notex",1).text(function(he){return he.node.label}).each(function(he){var oe=i.select(this);u.font(oe,he.textFont),y.convertToTspans(oe,H)}).attr("text-anchor",function(he){return he.horizontal&&he.left!==he.reversed?"end":"start"}).attr("transform",function(he){var oe=i.select(this),te=y.lineCount(oe),ie=he.textFont.size*((te-1)*E-x),ee=he.nodeLineWidth/2+M;if(!he.horizontal){var Se=he.reversed?(he.visibleWidth+ie)/2:(he.visibleWidth-ie)/2,ce=he.reversed?h(90):"scale(-1,1)"+h(90);return f(Se,ee)+ce}var _e=ee,Se=(he.visibleHeight-ie)/2;return he.left?_e=-_e:_e+=he.visibleWidth,f(_e,Se)+(he.reversed?"scale(-1,1)":"")}),xe.transition().ease(l.ease).duration(l.duration)}}}),uG=ye({"src/traces/sankey/plot.js"(e,r){"use strict";var t=ai(),a=Yt(),i=a.numberFormat,o=Yye(),s=Hs(),l=Ya(),n=lG().cn,u=a._;function c(E){return E!==""}function f(E,M){return E.filter(function(C){return C.key===M.traceId})}function h(E,M){t.select(E).select("path").style("fill-opacity",M),t.select(E).select("rect").style("fill-opacity",M)}function d(E){t.select(E).select("text.name").style("fill","black")}function p(E){return function(M){return E.node.sourceLinks.indexOf(M.link)!==-1||E.node.targetLinks.indexOf(M.link)!==-1}}function g(E){return function(M){return M.node.sourceLinks.indexOf(E.link)!==-1||M.node.targetLinks.indexOf(E.link)!==-1}}function m(E,M,C){M&&C&&f(C,M).selectAll("."+n.sankeyLink).filter(p(M)).call(_.bind(0,M,C,!1))}function y(E,M,C){M&&C&&f(C,M).selectAll("."+n.sankeyLink).filter(p(M)).call(v.bind(0,M,C,!1))}function _(E,M,C,w){w.style("fill",function(k){if(!k.link.concentrationscale)return k.hoverRgb}).style("fill-opacity",function(k){if(!k.link.concentrationscale)return k.hoverAlpha}),w.each(function(k){var T=k.link.label;T!==""&&f(M,E).selectAll("."+n.sankeyLink).filter(function(b){return b.link.label===T}).style("fill",function(b){if(!b.link.concentrationscale)return b.hoverRgb}).style("fill-opacity",function(b){if(!b.link.concentrationscale)return b.hoverAlpha})}),C&&f(M,E).selectAll("."+n.sankeyNode).filter(g(E)).call(m)}function v(E,M,C,w){w.style("fill",function(k){return k.rgb}).style("fill-opacity",function(k){return k.alpha}),w.each(function(k){var T=k.link.label;T!==""&&f(M,E).selectAll("."+n.sankeyLink).filter(function(b){return b.link.label===T}).style("fill",b=>b.rgb).style("fill-opacity",b=>b.alpha)}),C&&f(M,E).selectAll(n.sankeyNode).filter(g(E)).call(y)}function x(E,M){var C=E.hoverlabel||{},w=a.nestedProperty(C,M).get();return Array.isArray(w)?!1:w}r.exports=function(M,C){for(var w=M._fullLayout,k=w._paper,T=w._size,b=0;b"),color:x(N,"bgcolor")||l.addOpacity(j.color,1),borderColor:x(N,"bordercolor"),fontFamily:x(N,"font.family"),fontSize:x(N,"font.size"),fontColor:x(N,"font.color"),fontWeight:x(N,"font.weight"),fontStyle:x(N,"font.style"),fontVariant:x(N,"font.variant"),fontTextcase:x(N,"font.textcase"),fontLineposition:x(N,"font.lineposition"),fontShadow:x(N,"font.shadow"),nameLength:x(N,"namelength"),textAlign:x(N,"align"),idealAlign:t.event.x"),color:x(N,"bgcolor")||J.rgb,borderColor:x(N,"bordercolor"),fontFamily:x(N,"font.family"),fontSize:x(N,"font.size"),fontColor:x(N,"font.color"),fontWeight:x(N,"font.weight"),fontStyle:x(N,"font.style"),fontVariant:x(N,"font.variant"),fontTextcase:x(N,"font.textcase"),fontLineposition:x(N,"font.lineposition"),fontShadow:x(N,"font.shadow"),nameLength:x(N,"namelength"),textAlign:x(N,"align"),idealAlign:"left",hovertemplate:N.hovertemplate,hovertemplateLabels:Y,eventData:[J.node]},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:M});h(se,.85),d(se)}}},X=function(Z,J,N){M._fullLayout.hovermode!==!1&&(t.select(Z).call(y,J,N),J.node.trace.node.hoverinfo!=="skip"&&(J.node.fullData=J.node.trace,M.emit("plotly_unhover",{event:t.event,points:[J.node]})),s.loneUnhover(w._hoverlayer.node()))};o(M,k,C,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{linkEvents:{hover:F,follow:L,unhover:B,select:A},nodeEvents:{hover:G,follow:$,unhover:X,select:O}})}}}),Xye=ye({"src/traces/sankey/base_plot.js"(e){"use strict";var r=Cs().overrideAll,t=_c().getModuleCalcData,a=uG(),i=_v(),o=rp(),s=_f(),l=lu().prepSelect,n=Yt(),u=li(),c="sankey";e.name=c,e.baseLayoutAttrOverrides=r({hoverlabel:i.hoverlabel},"plot","nested"),e.plot=function(h){var d=t(h.calcdata,c)[0];a(h,d),e.updateFx(h)},e.clean=function(h,d,p,g){var m=g._has&&g._has(c),y=d._has&&d._has(c);m&&!y&&(g._paperdiv.selectAll(".sankey").remove(),g._paperdiv.selectAll(".bgsankey").remove())},e.updateFx=function(h){for(var d=0;d0}r.exports=function(P,z,I,L){var B=P._fullLayout,O;E(I)&&L&&(O=L()),o.makeTraceGroups(B._indicatorlayer,z,"trace").each(function(G){var $=G[0],X=$.trace,Z=t.select(this),J=X._hasGauge,N=X._isAngular,H=X._isBullet,W=X.domain,U={w:B._size.w*(W.x[1]-W.x[0]),h:B._size.h*(W.y[1]-W.y[0]),l:B._size.l+B._size.w*W.x[0],r:B._size.r+B._size.w*(1-W.x[1]),t:B._size.t+B._size.h*(1-W.y[1]),b:B._size.b+B._size.h*W.y[0]},V=U.l+U.w/2,j=U.t+U.h/2,q=Math.min(U.w/2,U.h),Y=f.innerRadius*q,K,re,se,le=X.align||"center";if(re=j,!J)K=U.l+v[le]*U.w,se=function(ee){return S(ee,U.w,U.h)};else if(N&&(K=V,re=j+q/2,se=function(ee){return A(ee,.9*Y)}),H){var ue=f.bulletPadding,fe=1-f.bulletNumberDomainSize+ue;K=U.l+(fe+(1-fe)*v[le])*U.w,se=function(ee){return S(ee,(f.bulletNumberDomainSize-ue)*U.w,U.h)}}w(P,Z,G,{numbersX:K,numbersY:re,numbersScaler:se,transitionOpts:I,onComplete:O});var pe,we;J&&(pe={range:X.gauge.axis.range,color:X.gauge.bgcolor,line:{color:X.gauge.bordercolor,width:0},thickness:1},we={range:X.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:X.gauge.bordercolor,width:X.gauge.borderwidth},thickness:1});var xe=Z.selectAll("g.angular").data(N?G:[]);xe.exit().remove();var he=Z.selectAll("g.angularaxis").data(N?G:[]);he.exit().remove(),N&&C(P,Z,G,{radius:q,innerRadius:Y,gauge:xe,layer:he,size:U,gaugeBg:pe,gaugeOutline:we,transitionOpts:I,onComplete:O});var oe=Z.selectAll("g.bullet").data(H?G:[]);oe.exit().remove();var te=Z.selectAll("g.bulletaxis").data(H?G:[]);te.exit().remove(),H&&M(P,Z,G,{gauge:oe,layer:te,size:U,gaugeBg:pe,gaugeOutline:we,transitionOpts:I,onComplete:O});var ie=Z.selectAll("text.title").data(G);ie.exit().remove(),ie.enter().append("text").classed("title",!0),ie.attr("text-anchor",function(){return H?_.right:_[X.title.align]}).text(X.title.text).call(c.font,X.title.font).call(h.convertToTspans,P),ie.attr("transform",function(){var ee=U.l+U.w*v[X.title.align],ce,_e=f.titlePadding,Se=c.bBox(ie.node());if(J){if(N)if(X.gauge.axis.visible){var Me=c.bBox(he.node());ce=Me.top-_e-Se.bottom}else ce=U.t+U.h/2-q/2-Se.bottom-_e;H&&(ce=re-(Se.top+Se.bottom)/2,ee=U.l-f.bulletPadding*U.w)}else ce=X._numbersTop-_e-Se.bottom;return l(ee,ce)})})};function M(R,P,z,I){var L=z[0].trace,B=I.gauge,O=I.layer,G=I.gaugeBg,$=I.gaugeOutline,X=I.size,Z=L.domain,J=I.transitionOpts,N=I.onComplete,H,W,U,V,j;B.enter().append("g").classed("bullet",!0),B.attr("transform",l(X.l,X.t)),O.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),O.selectAll("g.xbulletaxistick,path,text").remove();var q=X.h,Y=L.gauge.bar.thickness*q,K=Z.x[0],re=Z.x[0]+(Z.x[1]-Z.x[0])*(L._hasNumber||L._hasDelta?1-f.bulletNumberDomainSize:1);H=b(R,L.gauge.axis),H._id="xbulletaxis",H.domain=[K,re],H.setScale(),W=d.calcTicks(H),U=d.makeTransTickFn(H),V=d.getTickSigns(H)[2],j=X.t+X.h,H.visible&&(d.drawTicks(R,H,{vals:H.ticks==="inside"?d.clipEnds(H,W):W,layer:O,path:d.makeTickPath(H,j,V),transFn:U}),d.drawLabels(R,H,{vals:W,layer:O,transFn:U,labelFns:d.makeLabelFns(H,j)}));function se(he){he.attr("width",function(oe){return Math.max(0,H.c2p(oe.range[1])-H.c2p(oe.range[0]))}).attr("x",function(oe){return H.c2p(oe.range[0])}).attr("y",function(oe){return .5*(1-oe.thickness)*q}).attr("height",function(oe){return oe.thickness*q})}var le=[G].concat(L.gauge.steps),ue=B.selectAll("g.bg-bullet").data(le);ue.enter().append("g").classed("bg-bullet",!0).append("rect"),ue.select("rect").call(se).call(k),ue.exit().remove();var fe=B.selectAll("g.value-bullet").data([L.gauge.bar]);fe.enter().append("g").classed("value-bullet",!0).append("rect"),fe.select("rect").attr("height",Y).attr("y",(q-Y)/2).call(k),E(J)?fe.select("rect").transition().duration(J.duration).ease(J.easing).each("end",function(){N&&N()}).each("interrupt",function(){N&&N()}).attr("width",Math.max(0,H.c2p(Math.min(L.gauge.axis.range[1],z[0].y)))):fe.select("rect").attr("width",typeof z[0].y=="number"?Math.max(0,H.c2p(Math.min(L.gauge.axis.range[1],z[0].y))):0),fe.exit().remove();var pe=z.filter(function(){return L.gauge.threshold.value||L.gauge.threshold.value===0}),we=B.selectAll("g.threshold-bullet").data(pe);we.enter().append("g").classed("threshold-bullet",!0).append("line"),we.select("line").attr("x1",H.c2p(L.gauge.threshold.value)).attr("x2",H.c2p(L.gauge.threshold.value)).attr("y1",(1-L.gauge.threshold.thickness)/2*q).attr("y2",(1-(1-L.gauge.threshold.thickness)/2)*q).call(y.stroke,L.gauge.threshold.line.color).style("stroke-width",L.gauge.threshold.line.width),we.exit().remove();var xe=B.selectAll("g.gauge-outline").data([$]);xe.enter().append("g").classed("gauge-outline",!0).append("rect"),xe.select("rect").call(se).call(k),xe.exit().remove()}function C(R,P,z,I){var L=z[0].trace,B=I.size,O=I.radius,G=I.innerRadius,$=I.gaugeBg,X=I.gaugeOutline,Z=[B.l+B.w/2,B.t+B.h/2+O/2],J=I.gauge,N=I.layer,H=I.transitionOpts,W=I.onComplete,U=Math.PI/2;function V(Ue){var Ge=L.gauge.axis.range[0],Ze=L.gauge.axis.range[1],Ke=(Ue-Ge)/(Ze-Ge)*Math.PI-U;return Ke<-U?-U:Ke>U?U:Ke}function j(Ue){return t.svg.arc().innerRadius((G+O)/2-Ue/2*(O-G)).outerRadius((G+O)/2+Ue/2*(O-G)).startAngle(-U)}function q(Ue){Ue.attr("d",function(Ge){return j(Ge.thickness).startAngle(V(Ge.range[0])).endAngle(V(Ge.range[1]))()})}var Y,K,re,se;J.enter().append("g").classed("angular",!0),J.attr("transform",l(Z[0],Z[1])),N.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),N.selectAll("g.xangularaxistick,path,text").remove(),Y=b(R,L.gauge.axis),Y.type="linear",Y.range=L.gauge.axis.range,Y._id="xangularaxis",Y.ticklabeloverflow="allow",Y.setScale();var le=function(Ue){return(Y.range[0]-Ue.x)/(Y.range[1]-Y.range[0])*Math.PI+Math.PI},ue={},fe=d.makeLabelFns(Y,0),pe=fe.labelStandoff;ue.xFn=function(Ue){var Ge=le(Ue);return Math.cos(Ge)*pe},ue.yFn=function(Ue){var Ge=le(Ue),Ze=Math.sin(Ge)>0?.2:1;return-Math.sin(Ge)*(pe+Ue.fontSize*Ze)+Math.abs(Math.cos(Ge))*(Ue.fontSize*u)},ue.anchorFn=function(Ue){var Ge=le(Ue),Ze=Math.cos(Ge);return Math.abs(Ze)<.1?"middle":Ze>0?"start":"end"},ue.heightFn=function(Ue,Ge,Ze){var Ke=le(Ue);return-.5*(1+Math.sin(Ke))*Ze};var we=function(Ue){return l(Z[0]+O*Math.cos(Ue),Z[1]-O*Math.sin(Ue))};re=function(Ue){return we(le(Ue))};var xe=function(Ue){var Ge=le(Ue);return we(Ge)+"rotate("+-n(Ge)+")"};if(K=d.calcTicks(Y),se=d.getTickSigns(Y)[2],Y.visible){se=Y.ticks==="inside"?-1:1;var he=(Y.linewidth||1)/2;d.drawTicks(R,Y,{vals:K,layer:N,path:"M"+se*he+",0h"+se*Y.ticklen,transFn:xe}),d.drawLabels(R,Y,{vals:K,layer:N,transFn:re,labelFns:ue})}var oe=[$].concat(L.gauge.steps),te=J.selectAll("g.bg-arc").data(oe);te.enter().append("g").classed("bg-arc",!0).append("path"),te.select("path").call(q).call(k),te.exit().remove();var ie=j(L.gauge.bar.thickness),ee=J.selectAll("g.value-arc").data([L.gauge.bar]);ee.enter().append("g").classed("value-arc",!0).append("path");var ce=ee.select("path");E(H)?(ce.transition().duration(H.duration).ease(H.easing).each("end",function(){W&&W()}).each("interrupt",function(){W&&W()}).attrTween("d",T(ie,V(z[0].lastY),V(z[0].y))),L._lastValue=z[0].y):ce.attr("d",typeof z[0].y=="number"?ie.endAngle(V(z[0].y)):"M0,0Z"),ce.call(k),ee.exit().remove(),oe=[];var _e=L.gauge.threshold.value;(_e||_e===0)&&oe.push({range:[_e,_e],color:L.gauge.threshold.color,line:{color:L.gauge.threshold.line.color,width:L.gauge.threshold.line.width},thickness:L.gauge.threshold.thickness});var Se=J.selectAll("g.threshold-arc").data(oe);Se.enter().append("g").classed("threshold-arc",!0).append("path"),Se.select("path").call(q).call(k),Se.exit().remove();var Me=J.selectAll("g.gauge-outline").data([X]);Me.enter().append("g").classed("gauge-outline",!0).append("path"),Me.select("path").call(q).call(k),Me.exit().remove()}function w(R,P,z,I){var L=z[0].trace,B=I.numbersX,O=I.numbersY,G=L.align||"center",$=_[G],X=I.transitionOpts,Z=I.onComplete,J=o.ensureSingle(P,"g","numbers"),N,H,W,U=[];L._hasNumber&&U.push("number"),L._hasDelta&&(U.push("delta"),L.delta.position==="left"&&U.reverse());var V=J.selectAll("text").data(U);V.enter().append("text"),V.attr("text-anchor",function(){return $}).attr("class",function(we){return we}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),V.exit().remove();function j(we,xe,he,oe){if(we.match("s")&&he>=0!=oe>=0&&!xe(he).slice(-1).match(x)&&!xe(oe).slice(-1).match(x)){var te=we.slice().replace("s","f").replace(/\d+/,function(ee){return parseInt(ee)-1}),ie=b(R,{tickformat:te});return function(ee){return Math.abs(ee)<1?d.tickText(ie,ee).text:xe(ee)}}else return xe}function q(){var we=b(R,{tickformat:L.number.valueformat},L._range);we.setScale(),d.prepTicks(we);var xe=function(ee){return d.tickText(we,ee).text},he=L.number.suffix,oe=L.number.prefix,te=J.select("text.number");function ie(){var ee=typeof z[0].y=="number"?oe+xe(z[0].y)+he:"-";te.text(ee).call(c.font,L.number.font).call(h.convertToTspans,R)}return E(X)?te.transition().duration(X.duration).ease(X.easing).each("end",function(){ie(),Z&&Z()}).each("interrupt",function(){ie(),Z&&Z()}).attrTween("text",function(){var ee=t.select(this),ce=i(z[0].lastY,z[0].y);L._lastValue=z[0].y;var _e=j(L.number.valueformat,xe,z[0].lastY,z[0].y);return function(Se){ee.text(oe+_e(ce(Se))+he)}}):ie(),N=F(oe+xe(z[0].y)+he,L.number.font,$,R),te}function Y(){var we=b(R,{tickformat:L.delta.valueformat},L._range);we.setScale(),d.prepTicks(we);var xe=function(Se){return d.tickText(we,Se).text},he=L.delta.suffix,oe=L.delta.prefix,te=function(Se){var Me=L.delta.relative?Se.relativeDelta:Se.delta;return Me},ie=function(Se,Me){return Se===0||typeof Se!="number"||isNaN(Se)?"-":(Se>0?L.delta.increasing.symbol:L.delta.decreasing.symbol)+oe+Me(Se)+he},ee=function(Se){return Se.delta>=0?L.delta.increasing.color:L.delta.decreasing.color};L._deltaLastValue===void 0&&(L._deltaLastValue=te(z[0]));var ce=J.select("text.delta");ce.call(c.font,L.delta.font).call(y.fill,ee({delta:L._deltaLastValue}));function _e(){ce.text(ie(te(z[0]),xe)).call(y.fill,ee(z[0])).call(h.convertToTspans,R)}return E(X)?ce.transition().duration(X.duration).ease(X.easing).tween("text",function(){var Se=t.select(this),Me=te(z[0]),Ue=L._deltaLastValue,Ge=j(L.delta.valueformat,xe,Ue,Me),Ze=i(Ue,Me);return L._deltaLastValue=Me,function(Ke){Se.text(ie(Ze(Ke),Ge)),Se.call(y.fill,ee({delta:Ze(Ke)}))}}).each("end",function(){_e(),Z&&Z()}).each("interrupt",function(){_e(),Z&&Z()}):_e(),H=F(ie(te(z[0]),xe),L.delta.font,$,R),ce}var K=L.mode+L.align,re;if(L._hasDelta&&(re=Y(),K+=L.delta.position+L.delta.font.size+L.delta.font.family+L.delta.valueformat,K+=L.delta.increasing.symbol+L.delta.decreasing.symbol,W=H),L._hasNumber&&(q(),K+=L.number.font.size+L.number.font.family+L.number.valueformat+L.number.suffix+L.number.prefix,W=N),L._hasDelta&&L._hasNumber){var se=[(N.left+N.right)/2,(N.top+N.bottom)/2],le=[(H.left+H.right)/2,(H.top+H.bottom)/2],ue,fe,pe=.75*L.delta.font.size;L.delta.position==="left"&&(ue=D(L,"deltaPos",0,-1*(N.width*v[L.align]+H.width*(1-v[L.align])+pe),K,Math.min),fe=se[1]-le[1],W={width:N.width+H.width+pe,height:Math.max(N.height,H.height),left:H.left+ue,right:N.right,top:Math.min(N.top,H.top+fe),bottom:Math.max(N.bottom,H.bottom+fe)}),L.delta.position==="right"&&(ue=D(L,"deltaPos",0,N.width*(1-v[L.align])+H.width*v[L.align]+pe,K,Math.max),fe=se[1]-le[1],W={width:N.width+H.width+pe,height:Math.max(N.height,H.height),left:N.left,right:H.right+ue,top:Math.min(N.top,H.top+fe),bottom:Math.max(N.bottom,H.bottom+fe)}),L.delta.position==="bottom"&&(ue=null,fe=H.height,W={width:Math.max(N.width,H.width),height:N.height+H.height,left:Math.min(N.left,H.left),right:Math.max(N.right,H.right),top:N.bottom-N.height,bottom:N.bottom+H.height}),L.delta.position==="top"&&(ue=null,fe=N.top,W={width:Math.max(N.width,H.width),height:N.height+H.height,left:Math.min(N.left,H.left),right:Math.max(N.right,H.right),top:N.bottom-N.height-H.height,bottom:N.bottom}),re.attr({dx:ue,dy:fe})}(L._hasNumber||L._hasDelta)&&J.attr("transform",function(){var we=I.numbersScaler(W);K+=we[2];var xe=D(L,"numbersScale",1,we[0],K,Math.min),he;L._scaleNumbers||(xe=1),L._isAngular?he=O-xe*W.bottom:he=O-xe*(W.top+W.bottom)/2,L._numbersTop=xe*W.top+he;var oe=W[G];G==="center"&&(oe=(W.left+W.right)/2);var te=B-xe*oe;return te=D(L,"numbersTranslate",0,te,K,Math.max),l(te,he)+s(xe)})}function k(R){R.each(function(P){y.stroke(t.select(this),P.line.color)}).each(function(P){y.fill(t.select(this),P.color)}).style("stroke-width",function(P){return P.line.width})}function T(R,P,z){return function(){var I=a(P,z);return function(L){return R.endAngle(I(L))()}}}function b(R,P,z){var I=R._fullLayout,L=o.extendFlat({type:"linear",ticks:"outside",range:z,showline:!0},P),B={type:"linear",_id:"x"+P._id},O={letter:"x",font:I.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function G($,X){return o.coerce(L,B,m,$,X)}return p(L,B,G,O,I),g(L,B,G,O),B}function S(R,P,z){var I=Math.min(P/R.width,z/R.height);return[I,R,P+"x"+z]}function A(R,P){var z=Math.sqrt(R.width/2*(R.width/2)+R.height*R.height),I=P/z;return[I,R,P]}function F(R,P,z,I){var L=document.createElementNS("http://www.w3.org/2000/svg","text"),B=t.select(L);return B.text(R).attr("x",0).attr("y",0).attr("text-anchor",z).attr("data-unformatted",R).call(h.convertToTspans,I).call(c.font,P),c.bBox(B.node())}function D(R,P,z,I,L,B){var O="_cache"+P;R[O]&&R[O].key===L||(R[O]={key:L,value:z});var G=o.aggNums(B,null,[R[O].value,I],2);return R[O].value=G,G}}}),a_e=ye({"src/traces/indicator/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"indicator",basePlotModule:Qye(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:cG(),supplyDefaults:e_e().supplyDefaults,calc:t_e().calc,plot:r_e(),meta:{}}}}),i_e=ye({"lib/indicator.js"(e,r){"use strict";r.exports=a_e()}}),hG=ye({"src/traces/table/attributes.js"(e,r){"use strict";var t=kv(),a=Xi().extendFlat,i=Cs().overrideAll,o=vs(),s=Ds().attributes,l=zs().descriptionOnlyNumbers,n=r.exports=i({domain:s({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:l("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:a({},t.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:a({},o({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:l("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:a({},t.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:a({},o({arrayOk:!0}))}},"calc","from-root")}}),n_e=ye({"src/traces/table/defaults.js"(e,r){"use strict";var t=Yt(),a=hG(),i=Ds().defaults;function o(s,l){for(var n=s.columnorder||[],u=s.header.values.length,c=n.slice(0,u),f=c.slice().sort(function(p,g){return p-g}),h=c.map(function(p){return f.indexOf(p)}),d=h.length;d",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"}}}}),s_e=ye({"src/traces/table/data_preparation_helper.js"(e,r){"use strict";var t=dG(),a=Xi().extendFlat,i=en(),o=yc().isTypedArray,s=yc().isArrayOrTypedArray;r.exports=function(m,y){var _=u(y.cells.values),v=function($){return $.slice(y.header.values.length,$.length)},x=u(y.header.values);x.length&&!x[0].length&&(x[0]=[""],x=u(x));var E=x.concat(v(_).map(function(){return c((x[0]||[""]).length)})),M=y.domain,C=Math.floor(m._fullLayout._size.w*(M.x[1]-M.x[0])),w=Math.floor(m._fullLayout._size.h*(M.y[1]-M.y[0])),k=y.header.values.length?E[0].map(function(){return y.header.height}):[t.emptyHeaderHeight],T=_.length?_[0].map(function(){return y.cells.height}):[],b=k.reduce(n,0),S=w-b,A=S+t.uplift,F=d(T,A),D=d(k,b),R=h(D,[]),P=h(F,R),z={},I=y.columnorder;s(I)&&(I=Array.from(I)),I=I.concat(v(_.map(function($,X){return X})));var L=E.map(function($,X){var Z=s(y.columnwidth)?y.columnwidth[Math.min(X,y.columnwidth.length-1)]:y.columnwidth;return i(Z)?Number(Z):1}),B=L.reduce(n,0);L=L.map(function($){return $/B*C});var O=Math.max(l(y.header.line.width),l(y.cells.line.width)),G={key:y.uid+m._context.staticPlot,translateX:M.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-M.y[1]),size:m._fullLayout._size,width:C,maxLineWidth:O,height:w,columnOrder:I,groupHeight:w,rowBlocks:P,headerRowBlocks:R,scrollY:0,cells:a({},y.cells,{values:_}),headerCells:a({},y.header,{values:E}),gdColumns:E.map(function($){return $[0]}),gdColumnsOriginalOrder:E.map(function($){return $[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:E.map(function($,X){var Z=z[$];z[$]=(Z||0)+1;var J=$+"__"+z[$];return{key:J,label:$,specIndex:X,xIndex:I[X],xScale:f,x:void 0,calcdata:void 0,columnWidth:L[X]}})};return G.columns.forEach(function($){$.calcdata=G,$.x=f($)}),G};function l(g){if(s(g)){for(var m=0,y=0;y=m||w===g.length-1)&&(y[v]=E,E.key=C++,E.firstRowIndex=M,E.lastRowIndex=w,E=p(),v+=x,M=w+1,x=0);return y}function p(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),l_e=ye({"src/traces/table/data_split_helpers.js"(e){"use strict";var r=Xi().extendFlat;e.splitToPanels=function(a){var i=[0,0],o=r({},a,{key:"header",type:"header",page:0,prevPages:i,currentRepaint:[null,null],dragHandle:!0,values:a.calcdata.headerCells.values[a.specIndex],rowBlocks:a.calcdata.headerRowBlocks,calcdata:r({},a.calcdata,{cells:a.calcdata.headerCells})}),s=r({},a,{key:"cells1",type:"cells",page:0,prevPages:i,currentRepaint:[null,null],dragHandle:!1,values:a.calcdata.cells.values[a.specIndex],rowBlocks:a.calcdata.rowBlocks}),l=r({},a,{key:"cells2",type:"cells",page:1,prevPages:i,currentRepaint:[null,null],dragHandle:!1,values:a.calcdata.cells.values[a.specIndex],rowBlocks:a.calcdata.rowBlocks});return[s,l,o]},e.splitToCells=function(a){var i=t(a);return(a.values||[]).slice(i[0],i[1]).map(function(o,s){var l=typeof o=="string"&&o.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:s+l,key:i[0]+s,column:a,calcdata:a.calcdata,page:a.page,rowBlocks:a.rowBlocks,value:o}})};function t(a){var i=a.rowBlocks[a.page],o=i?i.rows[0].rowIndex:0,s=i?o+i.rows.length:0;return[o,s]}}}),pG=ye({"src/traces/table/plot.js"(e,r){"use strict";var t=dG(),a=ai(),i=Yt(),o=i.numberFormat,s=$p(),l=$i(),n=Go(),u=Yt().raiseToTop,c=Yt().strTranslate,f=Yt().cancelTransition,h=s_e(),d=l_e(),p=Ya();r.exports=function(K,re){var se=!K._context.staticPlot,le=K._fullLayout._paper.selectAll("."+t.cn.table).data(re.map(function(Me){var Ue=s.unwrap(Me),Ge=Ue.trace;return h(K,Ge)}),s.keyFun);le.exit().remove(),le.enter().append("g").classed(t.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"),le.attr("width",function(Me){return Me.width+Me.size.l+Me.size.r}).attr("height",function(Me){return Me.height+Me.size.t+Me.size.b}).attr("transform",function(Me){return c(Me.translateX,Me.translateY)});var ue=le.selectAll("."+t.cn.tableControlView).data(s.repeat,s.keyFun),fe=ue.enter().append("g").classed(t.cn.tableControlView,!0).style("box-sizing","content-box");if(se){var pe="onwheel"in document?"wheel":"mousewheel";fe.on("mousemove",function(Me){ue.filter(function(Ue){return Me===Ue}).call(v,K)}).on(pe,function(Me){if(!Me.scrollbarState.wheeling){Me.scrollbarState.wheeling=!0;var Ue=Me.scrollY+a.event.deltaY,Ge=$(K,ue,null,Ue)(Me);Ge||(a.event.stopPropagation(),a.event.preventDefault()),Me.scrollbarState.wheeling=!1}}).call(v,K,!0)}ue.attr("transform",function(Me){return c(Me.size.l,Me.size.t)});var we=ue.selectAll("."+t.cn.scrollBackground).data(s.repeat,s.keyFun);we.enter().append("rect").classed(t.cn.scrollBackground,!0).attr("fill","none"),we.attr("width",function(Me){return Me.width}).attr("height",function(Me){return Me.height}),ue.each(function(Me){l.setClipUrl(a.select(this),m(K,Me),K)});var xe=ue.selectAll("."+t.cn.yColumn).data(function(Me){return Me.columns},s.keyFun);xe.enter().append("g").classed(t.cn.yColumn,!0),xe.exit().remove(),xe.attr("transform",function(Me){return c(Me.x,0)}),se&&xe.call(a.behavior.drag().origin(function(Me){var Ue=a.select(this);return z(Ue,Me,-t.uplift),u(this),Me.calcdata.columnDragInProgress=!0,v(ue.filter(function(Ge){return Me.calcdata.key===Ge.key}),K),Me}).on("drag",function(Me){var Ue=a.select(this),Ge=function(dt){return(Me===dt?a.event.x:dt.x)+dt.columnWidth/2};Me.x=Math.max(-t.overdrag,Math.min(Me.calcdata.width+t.overdrag-Me.columnWidth,a.event.x));var Ze=_(xe).filter(function(dt){return dt.calcdata.key===Me.calcdata.key}),Ke=Ze.sort(function(dt,_t){return Ge(dt)-Ge(_t)});Ke.forEach(function(dt,_t){dt.xIndex=_t,dt.x=Me===dt?dt.x:dt.xScale(dt)}),xe.filter(function(dt){return Me!==dt}).transition().ease(t.transitionEase).duration(t.transitionDuration).attr("transform",function(dt){return c(dt.x,0)}),Ue.call(f).attr("transform",c(Me.x,-t.uplift))}).on("dragend",function(Me){var Ue=a.select(this),Ge=Me.calcdata;Me.x=Me.xScale(Me),Me.calcdata.columnDragInProgress=!1,z(Ue,Me,0),R(K,Ge,Ge.columns.map(function(Ze){return Ze.xIndex}))})),xe.each(function(Me){l.setClipUrl(a.select(this),y(K,Me),K)});var he=xe.selectAll("."+t.cn.columnBlock).data(d.splitToPanels,s.keyFun);he.enter().append("g").classed(t.cn.columnBlock,!0).attr("id",function(Me){return Me.key}),he.style("cursor",function(Me){return Me.dragHandle?"ew-resize":Me.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var oe=he.filter(L),te=he.filter(I);se&&te.call(a.behavior.drag().origin(function(Me){return a.event.stopPropagation(),Me}).on("drag",$(K,ue,-1)).on("dragend",function(){})),x(K,ue,oe,he),x(K,ue,te,he);var ie=ue.selectAll("."+t.cn.scrollAreaClip).data(s.repeat,s.keyFun);ie.enter().append("clipPath").classed(t.cn.scrollAreaClip,!0).attr("id",function(Me){return m(K,Me)});var ee=ie.selectAll("."+t.cn.scrollAreaClipRect).data(s.repeat,s.keyFun);ee.enter().append("rect").classed(t.cn.scrollAreaClipRect,!0).attr("x",-t.overdrag).attr("y",-t.uplift).attr("fill","none"),ee.attr("width",function(Me){return Me.width+2*t.overdrag}).attr("height",function(Me){return Me.height+t.uplift});var ce=xe.selectAll("."+t.cn.columnBoundary).data(s.repeat,s.keyFun);ce.enter().append("g").classed(t.cn.columnBoundary,!0);var _e=xe.selectAll("."+t.cn.columnBoundaryClippath).data(s.repeat,s.keyFun);_e.enter().append("clipPath").classed(t.cn.columnBoundaryClippath,!0),_e.attr("id",function(Me){return y(K,Me)});var Se=_e.selectAll("."+t.cn.columnBoundaryRect).data(s.repeat,s.keyFun);Se.enter().append("rect").classed(t.cn.columnBoundaryRect,!0).attr("fill","none"),Se.attr("width",function(Me){return Me.columnWidth+2*g(Me)}).attr("height",function(Me){return Me.calcdata.height+2*g(Me)+t.uplift}).attr("x",function(Me){return-g(Me)}).attr("y",function(Me){return-g(Me)}),G(null,te,ue)};function g(Y){return Math.ceil(Y.calcdata.maxLineWidth/2)}function m(Y,K){return"clip"+Y._fullLayout._uid+"_scrollAreaBottomClip_"+K.key}function y(Y,K){return"clip"+Y._fullLayout._uid+"_columnBoundaryClippath_"+K.calcdata.key+"_"+K.specIndex}function _(Y){return[].concat.apply([],Y.map(function(K){return K})).map(function(K){return K.__data__})}function v(Y,K,re){function se(xe){var he=xe.rowBlocks;return W(he,he.length-1)+(he.length?U(he[he.length-1],1/0):1)}var le=Y.selectAll("."+t.cn.scrollbarKit).data(s.repeat,s.keyFun);le.enter().append("g").classed(t.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),le.each(function(xe){var he=xe.scrollbarState;he.totalHeight=se(xe),he.scrollableAreaHeight=xe.groupHeight-B(xe),he.currentlyVisibleHeight=Math.min(he.totalHeight,he.scrollableAreaHeight),he.ratio=he.currentlyVisibleHeight/he.totalHeight,he.barLength=Math.max(he.ratio*he.currentlyVisibleHeight,t.goldenRatio*t.scrollbarWidth),he.barWiggleRoom=he.currentlyVisibleHeight-he.barLength,he.wiggleRoom=Math.max(0,he.totalHeight-he.scrollableAreaHeight),he.topY=he.barWiggleRoom===0?0:xe.scrollY/he.wiggleRoom*he.barWiggleRoom,he.bottomY=he.topY+he.barLength,he.dragMultiplier=he.wiggleRoom/he.barWiggleRoom}).attr("transform",function(xe){var he=xe.width+t.scrollbarWidth/2+t.scrollbarOffset;return c(he,B(xe))});var ue=le.selectAll("."+t.cn.scrollbar).data(s.repeat,s.keyFun);ue.enter().append("g").classed(t.cn.scrollbar,!0);var fe=ue.selectAll("."+t.cn.scrollbarSlider).data(s.repeat,s.keyFun);fe.enter().append("g").classed(t.cn.scrollbarSlider,!0),fe.attr("transform",function(xe){return c(0,xe.scrollbarState.topY||0)});var pe=fe.selectAll("."+t.cn.scrollbarGlyph).data(s.repeat,s.keyFun);pe.enter().append("line").classed(t.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",t.scrollbarWidth).attr("stroke-linecap","round").attr("y1",t.scrollbarWidth/2),pe.attr("y2",function(xe){return xe.scrollbarState.barLength-t.scrollbarWidth/2}).attr("stroke-opacity",function(xe){return xe.columnDragInProgress||!xe.scrollbarState.barWiggleRoom||re?0:.4}),pe.transition().delay(0).duration(0),pe.transition().delay(t.scrollbarHideDelay).duration(t.scrollbarHideDuration).attr("stroke-opacity",0);var we=ue.selectAll("."+t.cn.scrollbarCaptureZone).data(s.repeat,s.keyFun);we.enter().append("line").classed(t.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",t.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(xe){var he=a.event.y,oe=this.getBoundingClientRect(),te=xe.scrollbarState,ie=he-oe.top,ee=a.scale.linear().domain([0,te.scrollableAreaHeight]).range([0,te.totalHeight]).clamp(!0);te.topY<=ie&&ie<=te.bottomY||$(K,Y,null,ee(ie-te.barLength/2))(xe)}).call(a.behavior.drag().origin(function(xe){return a.event.stopPropagation(),xe.scrollbarState.scrollbarScrollInProgress=!0,xe}).on("drag",$(K,Y)).on("dragend",function(){})),we.attr("y2",function(xe){return xe.scrollbarState.scrollableAreaHeight}),K._context.staticPlot&&(pe.remove(),we.remove())}function x(Y,K,re,se){var le=E(re),ue=M(le);T(ue);var fe=C(ue);S(fe);var pe=k(ue),we=w(pe);b(we),A(we,K,se,Y),H(ue)}function E(Y){var K=Y.selectAll("."+t.cn.columnCells).data(s.repeat,s.keyFun);return K.enter().append("g").classed(t.cn.columnCells,!0),K.exit().remove(),K}function M(Y){var K=Y.selectAll("."+t.cn.columnCell).data(d.splitToCells,function(re){return re.keyWithinBlock});return K.enter().append("g").classed(t.cn.columnCell,!0),K.exit().remove(),K}function C(Y){var K=Y.selectAll("."+t.cn.cellRect).data(s.repeat,function(re){return re.keyWithinBlock});return K.enter().append("rect").classed(t.cn.cellRect,!0),K}function w(Y){var K=Y.selectAll("."+t.cn.cellText).data(s.repeat,function(re){return re.keyWithinBlock});return K.enter().append("text").classed(t.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){a.event.stopPropagation()}),K}function k(Y){var K=Y.selectAll("."+t.cn.cellTextHolder).data(s.repeat,function(re){return re.keyWithinBlock});return K.enter().append("g").classed(t.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),K}function T(Y){Y.each(function(K,re){var se=K.calcdata.cells.font,le=K.column.specIndex,ue={size:P(se.size,le,re),color:P(se.color,le,re),family:P(se.family,le,re),weight:P(se.weight,le,re),style:P(se.style,le,re),variant:P(se.variant,le,re),textcase:P(se.textcase,le,re),lineposition:P(se.lineposition,le,re),shadow:P(se.shadow,le,re)};K.rowNumber=K.key,K.align=P(K.calcdata.cells.align,le,re),K.cellBorderWidth=P(K.calcdata.cells.line.width,le,re),K.font=ue})}function b(Y){Y.each(function(K){l.font(a.select(this),K.font)})}function S(Y){Y.attr("width",function(K){return K.column.columnWidth}).attr("stroke-width",function(K){return K.cellBorderWidth}).each(function(K){var re=a.select(this);p.stroke(re,P(K.calcdata.cells.line.color,K.column.specIndex,K.rowNumber)),p.fill(re,P(K.calcdata.cells.fill.color,K.column.specIndex,K.rowNumber))})}function A(Y,K,re,se){Y.text(function(le){var ue=le.column.specIndex,fe=le.rowNumber,pe=le.value,we=typeof pe=="string",xe=we&&pe.match(/
/i),he=!we||xe;le.mayHaveMarkup=we&&pe.match(/[<&>]/);var oe=F(pe);le.latex=oe;var te=oe?"":P(le.calcdata.cells.prefix,ue,fe)||"",ie=oe?"":P(le.calcdata.cells.suffix,ue,fe)||"",ee=oe?null:P(le.calcdata.cells.format,ue,fe)||null,ce=te+(ee?o(ee)(le.value):le.value)+ie,_e;le.wrappingNeeded=!le.wrapped&&!he&&!oe&&(_e=D(ce)),le.cellHeightMayIncrease=xe||oe||le.mayHaveMarkup||(_e===void 0?D(ce):_e),le.needsConvertToTspans=le.mayHaveMarkup||le.wrappingNeeded||le.latex;var Se;if(le.wrappingNeeded){var Me=t.wrapSplitCharacter===" "?ce.replace(/le&&se.push(ue),le+=we}return se}function G(Y,K,re){var se=_(K)[0];if(se!==void 0){var le=se.rowBlocks,ue=se.calcdata,fe=W(le,le.length),pe=se.calcdata.groupHeight-B(se),we=ue.scrollY=Math.max(0,Math.min(fe-pe,ue.scrollY)),xe=O(le,we,pe);xe.length===1&&(xe[0]===le.length-1?xe.unshift(xe[0]-1):xe.push(xe[0]+1)),xe[0]%2&&xe.reverse(),K.each(function(he,oe){he.page=xe[oe],he.scrollY=we}),K.attr("transform",function(he){var oe=W(he.rowBlocks,he.page)-he.scrollY;return c(0,oe)}),Y&&(X(Y,re,K,xe,se.prevPages,se,0),X(Y,re,K,xe,se.prevPages,se,1),v(re,Y))}}function $(Y,K,re,se){return function(ue){var fe=ue.calcdata?ue.calcdata:ue,pe=K.filter(function(oe){return fe.key===oe.key}),we=re||fe.scrollbarState.dragMultiplier,xe=fe.scrollY;fe.scrollY=se===void 0?fe.scrollY+we*a.event.dy:se;var he=pe.selectAll("."+t.cn.yColumn).selectAll("."+t.cn.columnBlock).filter(I);return G(Y,he,pe),fe.scrollY===xe}}function X(Y,K,re,se,le,ue,fe){var pe=se[fe]!==le[fe];pe&&(clearTimeout(ue.currentRepaint[fe]),ue.currentRepaint[fe]=setTimeout(function(){var we=re.filter(function(xe,he){return he===fe&&se[he]!==le[he]});x(Y,K,we,re),le[fe]=se[fe]}))}function Z(Y,K,re,se){return function(){var ue=a.select(K.parentNode);ue.each(function(fe){var pe=fe.fragments;ue.selectAll("tspan.line").each(function(ce,_e){pe[_e].width=this.getComputedTextLength()});var we=pe[pe.length-1].width,xe=pe.slice(0,-1),he=[],oe,te,ie=0,ee=fe.column.columnWidth-2*t.cellPad;for(fe.value="";xe.length;)oe=xe.shift(),te=oe.width+we,ie+te>ee&&(fe.value+=he.join(t.wrapSpacer)+t.lineBreaker,he=[],ie=0),he.push(oe.text),ie+=te;ie&&(fe.value+=he.join(t.wrapSpacer)),fe.wrapped=!0}),ue.selectAll("tspan.line").remove(),A(ue.select("."+t.cn.cellText),re,Y,se),a.select(K.parentNode.parentNode).call(H)}}function J(Y,K,re,se,le){return function(){if(!le.settledY){var fe=a.select(K.parentNode),pe=j(le),we=le.key-pe.firstRowIndex,xe=pe.rows[we].rowHeight,he=le.cellHeightMayIncrease?K.parentNode.getBoundingClientRect().height+2*t.cellPad:xe,oe=Math.max(he,xe),te=oe-pe.rows[we].rowHeight;te&&(pe.rows[we].rowHeight=oe,Y.selectAll("."+t.cn.columnCell).call(H),G(null,Y.filter(I),0),v(re,se,!0)),fe.attr("transform",function(){var ie=this,ee=ie.parentNode,ce=ee.getBoundingClientRect(),_e=a.select(ie.parentNode).select("."+t.cn.cellRect).node().getBoundingClientRect(),Se=ie.transform.baseVal.consolidate(),Me=_e.top-ce.top+(Se?Se.matrix.f:t.cellPad);return c(N(le,a.select(ie.parentNode).select("."+t.cn.cellTextHolder).node().getBoundingClientRect().width),Me)}),le.settledY=!0}}}function N(Y,K){switch(Y.align){case"left":return t.cellPad;case"right":return Y.column.columnWidth-(K||0)-t.cellPad;case"center":return(Y.column.columnWidth-(K||0))/2;default:return t.cellPad}}function H(Y){Y.attr("transform",function(K){var re=K.rowBlocks[0].auxiliaryBlocks.reduce(function(fe,pe){return fe+U(pe,1/0)},0),se=j(K),le=U(se,K.key),ue=le+re;return c(0,ue)}).selectAll("."+t.cn.cellRect).attr("height",function(K){return q(j(K),K.key).rowHeight})}function W(Y,K){for(var re=0,se=K-1;se>=0;se--)re+=V(Y[se]);return re}function U(Y,K){for(var re=0,se=0;seo.length&&(i=i.slice(0,o.length)):i=[],l=0;l90&&(m-=180,f=-f),{angle:m,flip:f,p:a.c2p(s,i,o),offsetMultplier:h}}}}),y_e=ye({"src/traces/carpet/plot.js"(e,r){"use strict";var t=ai(),a=$i(),i=vG(),o=mG(),s=g_e(),l=Go(),n=Yt(),u=n.strRotate,c=n.strTranslate,f=Yl();r.exports=function(x,E,M,C){var w=x._context.staticPlot,k=E.xaxis,T=E.yaxis,b=x._fullLayout,S=b._clips;n.makeTraceGroups(C,M,"trace").each(function(A){var F=t.select(this),D=A[0],R=D.trace,P=R.aaxis,z=R.baxis,I=n.ensureSingle(F,"g","minorlayer"),L=n.ensureSingle(F,"g","majorlayer"),B=n.ensureSingle(F,"g","boundarylayer"),O=n.ensureSingle(F,"g","labellayer");F.style("opacity",R.opacity),d(k,T,L,P,"a",P._gridlines,!0,w),d(k,T,L,z,"b",z._gridlines,!0,w),d(k,T,I,P,"a",P._minorgridlines,!0,w),d(k,T,I,z,"b",z._minorgridlines,!0,w),d(k,T,B,P,"a-boundary",P._boundarylines,w),d(k,T,B,z,"b-boundary",z._boundarylines,w);var G=p(x,k,T,R,D,O,P._labels,"a-label"),$=p(x,k,T,R,D,O,z._labels,"b-label");g(x,O,R,D,k,T,G,$),h(R,D,S,k,T)})};function h(v,x,E,M,C){var w,k,T,b,S=E.select("#"+v._clipPathId);S.size()||(S=E.append("clipPath").classed("carpetclip",!0));var A=n.ensureSingle(S,"path","carpetboundary"),F=x.clipsegments,D=[];for(b=0;b0?"start":"end","data-notex":1}).call(a.font,F.font).text(F.text).call(l.convertToTspans,v),L=a.bBox(this);I.attr("transform",c(R.p[0],R.p[1])+u(R.angle)+c(F.axis.labelpadding*z,L.height*.3)),S=Math.max(S,L.width+F.axis.labelpadding)}),b.exit().remove(),A.maxExtent=S,A}function g(v,x,E,M,C,w,k,T){var b,S,A,F,D=n.aggNums(Math.min,null,E.a),R=n.aggNums(Math.max,null,E.a),P=n.aggNums(Math.min,null,E.b),z=n.aggNums(Math.max,null,E.b);b=.5*(D+R),S=P,A=E.ab2xy(b,S,!0),F=E.dxyda_rough(b,S),k.angle===void 0&&n.extendFlat(k,s(E,C,w,A,E.dxydb_rough(b,S))),_(v,x,E,M,A,F,E.aaxis,C,w,k,"a-title"),b=D,S=.5*(P+z),A=E.ab2xy(b,S,!0),F=E.dxydb_rough(b,S),T.angle===void 0&&n.extendFlat(T,s(E,C,w,A,E.dxyda_rough(b,S))),_(v,x,E,M,A,F,E.baxis,C,w,T,"b-title")}var m=f.LINE_SPACING,y=(1-f.MID_SHIFT)/m+1;function _(v,x,E,M,C,w,k,T,b,S,A){var F=[];k.title.text&&F.push(k.title.text);var D=x.selectAll("text."+A).data(F),R=S.maxExtent;D.enter().append("text").classed(A,!0),D.each(function(){var P=s(E,T,b,C,w);["start","both"].indexOf(k.showticklabels)===-1&&(R=0);var z=k.title.font.size;R+=z+k.title.offset;var I=S.angle+(S.flip<0?180:0),L=(I-P.angle+450)%360,B=L>90&&L<270,O=t.select(this);O.text(k.title.text).call(l.convertToTspans,v),B&&(R=(-l.lineCount(O)+y)*m*z-R),O.attr("transform",c(P.p[0],P.p[1])+u(P.angle)+c(0,R)).attr("text-anchor","middle").call(a.font,k.title.font)}),D.exit().remove()}}}),__e=ye({"src/traces/carpet/cheater_basis.js"(e,r){"use strict";var t=Yt().isArrayOrTypedArray;r.exports=function(a,i,o){var s,l,n,u,c,f,h=[],d=t(a)?a.length:a,p=t(i)?i.length:i,g=t(a)?a:null,m=t(i)?i:null;g&&(n=(g.length-1)/(g[g.length-1]-g[0])/(d-1)),m&&(u=(m.length-1)/(m[m.length-1]-m[0])/(p-1));var y,_=1/0,v=-1/0;for(l=0;l=10)return null;for(var s=1/0,l=-1/0,n=i.length,u=0;u0&&(U=o.dxydi([],G-1,X,0,Z),Y.push(J[0]+U[0]/3),K.push(J[1]+U[1]/3),V=o.dxydi([],G-1,X,1,Z),Y.push(W[0]-V[0]/3),K.push(W[1]-V[1]/3)),Y.push(W[0]),K.push(W[1]),J=W;else for(G=o.a2i(O),N=Math.floor(Math.max(0,Math.min(P-2,G))),H=G-N,re.length=P,re.crossLength=z,re.xy=function(se){return o.evalxy([],G,se)},re.dxy=function(se,le){return o.dxydj([],N,se,H,le)},$=0;$0&&(j=o.dxydj([],N,$-1,H,0),Y.push(J[0]+j[0]/3),K.push(J[1]+j[1]/3),q=o.dxydj([],N,$-1,H,1),Y.push(W[0]-q[0]/3),K.push(W[1]-q[1]/3)),Y.push(W[0]),K.push(W[1]),J=W;return re.axisLetter=s,re.axis=C,re.crossAxis=S,re.value=O,re.constvar=l,re.index=g,re.x=Y,re.y=K,re.smoothing=S.smoothing,re}function B(O){var G,$,X,Z,J,N=[],H=[],W={};if(W.length=M.length,W.crossLength=b.length,s==="b")for(X=Math.max(0,Math.min(z-2,O)),J=Math.min(1,Math.max(0,O-X)),W.xy=function(U){return o.evalxy([],U,O)},W.dxy=function(U,V){return o.dxydi([],U,X,V,J)},G=0;GM.length-1)&&w.push(a(B(u),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(g=d;gM.length-1)&&!(_<0||_>M.length-1))for(v=M[c],x=M[_],n=0;nM[M.length-1])&&k.push(a(L(y),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&T.push(a(B(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&T.push(a(B(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(f=5e-15,h=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+f)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+f))].sort(function(O,G){return O-G}),d=h[0],p=h[1],g=d;g<=p;g++)m=C.tick0+C.dtick*g,w.push(a(L(m),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(g=d-1;gM[M.length-1])&&k.push(a(L(y),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&T.push(a(L(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&T.push(a(L(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),w_e=ye({"src/traces/carpet/calc_labels.js"(e,r){"use strict";var t=qi(),a=Xi().extendFlat;r.exports=function(o,s){var l,n,u,c,f,h=s._labels=[],d=s._gridlines;for(l=0;l=0;l--)n[d-l]=a[p][l],u[d-l]=i[p][l];for(c.push({x:n,y:u,bicubic:f}),l=p,n=[],u=[];l>=0;l--)n[p-l]=a[l][0],u[p-l]=i[l][0];return c.push({x:n,y:u,bicubic:h}),c}}}),T_e=ye({"src/traces/carpet/smooth_fill_2d_array.js"(e,r){"use strict";var t=Yt();r.exports=function(i,o,s){var l,n,u,c=[],f=[],h=i[0].length,d=i.length;function p($,X){var Z=0,J,N=0;return $>0&&(J=i[X][$-1])!==void 0&&(N++,Z+=J),$0&&(J=i[X-1][$])!==void 0&&(N++,Z+=J),X0&&n0&&lb);return t.log("Smoother converged to",S,"after",F,"iterations"),i}}}),M_e=ye({"src/traces/carpet/constants.js"(e,r){"use strict";r.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),E_e=ye({"src/traces/carpet/catmull_rom.js"(e,r){"use strict";var t=.5;r.exports=function(i,o,s,l){var n=i[0]-o[0],u=i[1]-o[1],c=s[0]-o[0],f=s[1]-o[1],h=Math.pow(n*n+u*u,t/2),d=Math.pow(c*c+f*f,t/2),p=(d*d*n-h*h*c)*l,g=(d*d*u-h*h*f)*l,m=d*(h+d)*3,y=h*(h+d)*3;return[[o[0]+(m&&p/m),o[1]+(m&&g/m)],[o[0]-(y&&p/y),o[1]-(y&&g/y)]]}}}),S_e=ye({"src/traces/carpet/compute_control_points.js"(e,r){"use strict";var t=E_e(),a=Yt().ensureArray;function i(o,s,l){var n=-.5*l[0]+1.5*s[0],u=-.5*l[1]+1.5*s[1];return[(2*n+o[0])/3,(2*u+o[1])/3]}r.exports=function(s,l,n,u,c,f){var h,d,p,g,m,y,_,v,x,E,M=n[0].length,C=n.length,w=c?3*M-2:M,k=f?3*C-2:C;for(s=a(s,k),l=a(l,k),p=0;pm&&w_&&ky||k<_||k>v},u.setScale=function(){var w=u._x,k=u._y,T=i(u._xctrl,u._yctrl,w,k,p.smoothing,g.smoothing);u._xctrl=T[0],u._yctrl=T[1],u.evalxy=o([u._xctrl,u._yctrl],h,d,p.smoothing,g.smoothing),u.dxydi=s([u._xctrl,u._yctrl],p.smoothing,g.smoothing),u.dxydj=l([u._xctrl,u._yctrl],p.smoothing,g.smoothing)},u.i2a=function(w){var k=Math.max(0,Math.floor(w[0]),h-2),T=w[0]-k;return(1-T)*c[k]+T*c[k+1]},u.j2b=function(w){var k=Math.max(0,Math.floor(w[1]),h-2),T=w[1]-k;return(1-T)*f[k]+T*f[k+1]},u.ij2ab=function(w){return[u.i2a(w[0]),u.j2b(w[1])]},u.a2i=function(w){var k=Math.max(0,Math.min(a(w,c),h-2)),T=c[k],b=c[k+1];return Math.max(0,Math.min(h-1,k+(w-T)/(b-T)))},u.b2j=function(w){var k=Math.max(0,Math.min(a(w,f),d-2)),T=f[k],b=f[k+1];return Math.max(0,Math.min(d-1,k+(w-T)/(b-T)))},u.ab2ij=function(w){return[u.a2i(w[0]),u.b2j(w[1])]},u.i2c=function(w,k){return u.evalxy([],w,k)},u.ab2xy=function(w,k,T){if(!T&&(wc[h-1]|kf[d-1]))return[!1,!1];var b=u.a2i(w),S=u.b2j(k),A=u.evalxy([],b,S);if(T){var F=0,D=0,R=[],P,z,I,L;wc[h-1]?(P=h-2,z=1,F=(w-c[h-1])/(c[h-1]-c[h-2])):(P=Math.max(0,Math.min(h-2,Math.floor(b))),z=b-P),kf[d-1]?(I=d-2,L=1,D=(k-f[d-1])/(f[d-1]-f[d-2])):(I=Math.max(0,Math.min(d-2,Math.floor(S))),L=S-I),F&&(u.dxydi(R,P,I,z,L),A[0]+=R[0]*F,A[1]+=R[1]*F),D&&(u.dxydj(R,P,I,z,L),A[0]+=R[0]*D,A[1]+=R[1]*D)}return A},u.c2p=function(w,k,T){return[k.c2p(w[0]),T.c2p(w[1])]},u.p2x=function(w,k,T){return[k.p2c(w[0]),T.p2c(w[1])]},u.dadi=function(w){var k=Math.max(0,Math.min(c.length-2,w));return c[k+1]-c[k]},u.dbdj=function(w){var k=Math.max(0,Math.min(f.length-2,w));return f[k+1]-f[k]},u.dxyda=function(w,k,T,b){var S=u.dxydi(null,w,k,T,b),A=u.dadi(w,T);return[S[0]/A,S[1]/A]},u.dxydb=function(w,k,T,b){var S=u.dxydj(null,w,k,T,b),A=u.dbdj(k,b);return[S[0]/A,S[1]/A]},u.dxyda_rough=function(w,k,T){var b=x*(T||.1),S=u.ab2xy(w+b,k,!0),A=u.ab2xy(w-b,k,!0);return[(S[0]-A[0])*.5/b,(S[1]-A[1])*.5/b]},u.dxydb_rough=function(w,k,T){var b=E*(T||.1),S=u.ab2xy(w,k+b,!0),A=u.ab2xy(w,k-b,!0);return[(S[0]-A[0])*.5/b,(S[1]-A[1])*.5/b]},u.dpdx=function(w){return w._m},u.dpdy=function(w){return w._m}}}}),F_e=ye({"src/traces/carpet/calc.js"(e,r){"use strict";var t=qi(),a=Yt().isArray1D,i=__e(),o=x_e(),s=b_e(),l=w_e(),n=A_e(),u=QA(),c=T_e(),f=JA(),h=L_e();r.exports=function(p,g){var m=t.getFromId(p,g.xaxis),y=t.getFromId(p,g.yaxis),_=g.aaxis,v=g.baxis,x=g.x,E=g.y,M=[];x&&a(x)&&M.push("x"),E&&a(E)&&M.push("y"),M.length&&f(g,_,v,"a","b",M);var C=g._a=g._a||g.a,w=g._b=g._b||g.b;x=g._x||g.x,E=g._y||g.y;var k={};if(g._cheater){var T=_.cheatertype==="index"?C.length:C,b=v.cheatertype==="index"?w.length:w;x=i(T,b,g.cheaterslope)}g._x=x=u(x),g._y=E=u(E),c(x,C,w),c(E,C,w),h(g),g.setScale();var S=o(x),A=o(E),F=.5*(S[1]-S[0]),D=.5*(S[1]+S[0]),R=.5*(A[1]-A[0]),P=.5*(A[1]+A[0]),z=1.3;return S=[D-F*z,D+F*z],A=[P-R*z,P+R*z],g._extremes[m._id]=t.findExtremes(m,S,{padded:!0}),g._extremes[y._id]=t.findExtremes(y,A,{padded:!0}),s(g,"a","b"),s(g,"b","a"),l(g,_),l(g,v),k.clipsegments=n(g._xctrl,g._yctrl,_,v),k.x=x,k.y=E,k.a=C,k.b=w,[k]}}}),P_e=ye({"src/traces/carpet/index.js"(e,r){"use strict";r.exports={attributes:F7(),supplyDefaults:m_e(),plot:y_e(),calc:F_e(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Ml(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),I_e=ye({"lib/carpet.js"(e,r){"use strict";r.exports=P_e()}}),gG=ye({"src/traces/scattercarpet/attributes.js"(e,r){"use strict";var t=Up(),a=al(),i=Oo(),{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=Ro(),n=rs(),u=Xi().extendFlat,c=a.marker,f=a.line,h=c.line;r.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:u({},a.mode,{dflt:"markers"}),text:u({},a.text,{}),texttemplate:s({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:l({editType:"plot"}),hovertext:u({},a.hovertext,{}),line:{color:f.color,width:f.width,dash:f.dash,backoff:f.backoff,shape:u({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:a.connectgaps,fill:u({},a.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),marker:u({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,angle:c.angle,angleref:c.angleref,standoff:c.standoff,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:u({width:h.width,dash:h.dash,editType:"calc"},n("marker.line")),gradient:c.gradient,editType:"calc"},n("marker")),textfont:a.textfont,textposition:a.textposition,selected:a.selected,unselected:a.unselected,hoverinfo:u({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:a.hoveron,hovertemplate:o(),hovertemplatefallback:l(),zorder:a.zorder}}}),R_e=ye({"src/traces/scattercarpet/defaults.js"(e,r){"use strict";var t=Yt(),a=jp(),i=ms(),o=kd(),s=ip(),l=_y(),n=np(),u=qp(),c=gG();r.exports=function(h,d,p,g){function m(C,w){return t.coerce(h,d,c,C,w)}m("carpet"),d.xaxis="x",d.yaxis="y";var y=m("a"),_=m("b"),v=Math.min(y.length,_.length);if(!v){d.visible=!1;return}d._length=v,m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext");var x=v0?k=C.labelprefix.replace(/ = $/,""):k=C._hovertitle,v.push(k+": "+w.toFixed(3)+C.labelsuffix)}if(!m.hovertemplate){var E=g.hi||m.hoverinfo,M=E.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&x(y.aaxis,g.a),M.indexOf("b")!==-1&&x(y.baxis,g.b),v.push("y: "+c.yLabel),M.indexOf("text")!==-1&&a(g,m,v),c.extraText=v.join("
")}return u}}}),j_e=ye({"src/traces/scattercarpet/event_data.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){var n=s[l];return a.a=n.a,a.b=n.b,a.y=n.y,a}}}),U_e=ye({"src/traces/scattercarpet/index.js"(e,r){"use strict";r.exports={attributes:gG(),supplyDefaults:R_e(),colorbar:bc(),formatLabels:z_e(),calc:B_e(),plot:O_e(),style:Of().style,styleOnSelect:Of().styleOnSelect,hoverPoints:N_e(),selectPoints:Im(),eventData:j_e(),moduleType:"trace",name:"scattercarpet",basePlotModule:Ml(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),q_e=ye({"lib/scattercarpet.js"(e,r){"use strict";r.exports=U_e()}}),yG=ye({"src/traces/contourcarpet/attributes.js"(e,r){"use strict";var t=My(),a=cb(),i=rs(),o=Xi().extendFlat,s=a.contours;r.exports=o({carpet:{valType:"string",editType:"calc"},z:t.z,a:t.x,a0:t.x0,da:t.dx,b:t.y,b0:t.y0,db:t.dy,text:t.text,hovertext:t.hovertext,transpose:t.transpose,atype:t.xtype,btype:t.ytype,fillcolor:a.fillcolor,autocontour:a.autocontour,ncontours:a.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:a.line.color,width:a.line.width,dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},zorder:a.zorder},i("",{cLetter:"z",autoColorDflt:!1}))}}),_G=ye({"src/traces/contourcarpet/defaults.js"(e,r){"use strict";var t=Yt(),a=KA(),i=yG(),o=cL(),s=fT(),l=hT();r.exports=function(u,c,f,h){function d(y,_){return t.coerce(u,c,i,y,_)}function p(y){return t.coerce2(u,c,i,y)}if(d("carpet"),u.a&&u.b){var g=a(u,c,d,h,"a","b");if(!g){c.visible=!1;return}d("text");var m=d("contours.type")==="constraint";m?o(u,c,d,h,f,{hasHover:!1}):(s(u,c,d,p),l(u,c,d,h,{hasHover:!1}))}else c._defaultColor=f,c._length=null;d("zorder")}}}),V_e=ye({"src/traces/contourcarpet/calc.js"(e,r){"use strict";var t=Nc(),a=Yt(),i=JA(),o=QA(),s=eT(),l=tT(),n=Y9(),u=_G(),c=P7(),f=tL();r.exports=function(p,g){var m=g._carpetTrace=c(p,g);if(!(!m||!m.visible||m.visible==="legendonly")){if(!g.a||!g.b){var y=p.data[m.index],_=p.data[g.index];_.a||(_.a=y.a),_.b||(_.b=y.b),u(_,g,g._defaultColor,p._fullLayout)}var v=h(p,g);return f(g,g._z),v}};function h(d,p){var g=p._carpetTrace,m=g.aaxis,y=g.baxis,_,v,x,E,M,C,w;m._minDtick=0,y._minDtick=0,a.isArray1D(p.z)&&i(p,m,y,"a","b",["z"]),_=p._a=p._a||p.a,E=p._b=p._b||p.b,_=_?m.makeCalcdata(p,"_a"):[],E=E?y.makeCalcdata(p,"_b"):[],v=p.a0||0,x=p.da||1,M=p.b0||0,C=p.db||1,w=p._z=o(p._z||p.z,p.transpose),p._emptypoints=l(w),s(w,p._emptypoints);var k=a.maxRowLength(w),T=p.xtype==="scaled"?"":_,b=n(p,T,v,x,k,m),S=p.ytype==="scaled"?"":E,A=n(p,S,M,C,w.length,y),F={a:b,b:A,z:w};return p.contours.type==="levels"&&p.contours.coloring!=="none"&&t(d,p,{vals:w,containerStr:"",cLetter:"z"}),[F]}}}),G_e=ye({"src/traces/carpet/axis_aligned_line.js"(e,r){"use strict";var t=Yt().isArrayOrTypedArray;r.exports=function(a,i,o,s){var l,n,u,c,f,h,d,p,g,m,y,_,v,x=t(o)?"a":"b",E=x==="a"?a.aaxis:a.baxis,M=E.smoothing,C=x==="a"?a.a2i:a.b2j,w=x==="a"?o:s,k=x==="a"?s:o,T=x==="a"?i.a.length:i.b.length,b=x==="a"?i.b.length:i.a.length,S=Math.floor(x==="a"?a.b2j(k):a.a2i(k)),A=x==="a"?function(X){return a.evalxy([],X,S)}:function(X){return a.evalxy([],S,X)};M&&(u=Math.max(0,Math.min(b-2,S)),c=S-u,n=x==="a"?function(X,Z){return a.dxydi([],X,u,Z,c)}:function(X,Z){return a.dxydj([],u,X,c,Z)});var F=C(w[0]),D=C(w[1]),R=F0?Math.floor:Math.ceil,I=R>0?Math.ceil:Math.floor,L=R>0?Math.min:Math.max,B=R>0?Math.max:Math.min,O=z(F+P),G=I(D-P);d=A(F);var $=[[d]];for(l=O;l*R=0;re--)q=B.clipsegments[re],Y=a([],q.x,F.c2p),K=a([],q.y,D.c2p),Y.reverse(),K.reverse(),se.push(i(Y,K,q.bicubic));var le="M"+se.join("L")+"Z";M(P,B.clipsegments,F,D,Z,N),C(I,P,F,D,j,W,H,L,B,N,le),y(P,X,T,z,$,b,L),o.setClipUrl(P,L._clipPathId,T)})};function m(k,T){var b,S,A,F,D,R,P,z,I;for(b=0;bX&&(S.max=X),S.len=S.max-S.min}function v(k,T,b){var S=k.getPointAtLength(T),A=k.getPointAtLength(b),F=A.x-S.x,D=A.y-S.y,R=Math.sqrt(F*F+D*D);return[F/R,D/R]}function x(k){var T=Math.sqrt(k[0]*k[0]+k[1]*k[1]);return[k[0]/T,k[1]/T]}function E(k,T){var b=Math.abs(k[0]*T[0]+k[1]*T[1]),S=Math.sqrt(1-b*b);return S/b}function M(k,T,b,S,A,F){var D,R,P,z,I=s.ensureSingle(k,"g","contourbg"),L=I.selectAll("path").data(F==="fill"&&!A?[0]:[]);L.enter().append("path"),L.exit().remove();var B=[];for(z=0;z=0&&(O=Y,$=X):Math.abs(B[1]-O[1])=0&&(O=Y,$=X):s.log("endpt to newendpt is not vert. or horz.",B,O,Y)}if($>=0)break;z+=j(B,O),B=O}if($===T.edgepaths.length){s.log("unclosed perimeter path");break}P=$,L=I.indexOf(P)===-1,L&&(P=I[0],z+=j(B,O)+"Z",B=null)}for(P=0;Pw):C=R>A,w=R;var P=m(A,F,D,R);P.pos=S,P.yc=(A+R)/2,P.i=b,P.dir=C?"increasing":"decreasing",P.x=P.pos,P.y=[D,F],k&&(P.orig_p=d[b]),E&&(P.tx=h.text[b]),M&&(P.htx=h.hovertext[b]),T.push(P)}else T.push({pos:S,empty:!0})}return h._extremes[g._id]=i.findExtremes(g,t.concat(v,_),{padded:!0}),T.length&&(T[0].t={labels:{open:a(f,"open:")+" ",high:a(f,"high:")+" ",low:a(f,"low:")+" ",close:a(f,"close:")+" "}}),T}function c(f,h,d){var p=d._minDiff;if(!p){var g=f._fullData,m=[];p=1/0;var y;for(y=0;y"+x.labels[S]+t.hoverLabelText(_,A,v.yhoverformat)):(D=a.extendFlat({},M),D.y0=D.y1=F,D.yLabelVal=A,D.yLabel=x.labels[S]+t.hoverLabelText(_,A,v.yhoverformat),D.name="",E.push(D),T[A]=D)}return E}function h(d,p,g,m){var y=d.cd,_=d.ya,v=y[0].trace,x=y[0].t,E=c(d,p,g,m);if(!E)return[];var M=E.index,C=y[M],w=E.index=C.i,k=C.dir;function T(P){return x.labels[P]+t.hoverLabelText(_,v[P][w],v.yhoverformat)}var b=C.hi||v.hoverinfo||"",S=b.split("+"),A=b==="all",F=A||S.indexOf("y")!==-1,D=A||S.indexOf("text")!==-1,R=F?[T("open"),T("high"),T("low"),T("close")+" "+n[k]]:[];return D&&s(C,v,R),E.extraText=R.join("
"),E.y0=E.y1=_.c2p(C.yc,!0),[E]}r.exports={hoverPoints:u,hoverSplit:f,hoverOnPoints:h}}}),AG=ye({"src/traces/ohlc/select.js"(e,r){"use strict";r.exports=function(a,i){var o=a.cd,s=a.xaxis,l=a.yaxis,n=[],u,c=o[0].t.bPos||0;if(i===!1)for(u=0;up?function(v){return v<=0}:function(v){return v>=0};c.c2g=function(v){var x=c.c2l(v)-d;return(_(x)?x:0)+y},c.g2c=function(v){return c.l2c(v+d-y)},c.g2p=function(v){return v*m},c.c2p=function(v){return c.g2p(c.c2g(v))}}}function l(c,f){return f==="degrees"?i(c):c}function n(c,f){return f==="degrees"?o(c):c}function u(c,f){var h=c.type;if(h==="linear"){var d=c.d2c,p=c.c2d;c.d2c=function(g,m){return l(d(g),m)},c.c2d=function(g,m){return p(n(g,m))}}c.makeCalcdata=function(g,m){var y=g[m],_=g._length,v,x,E=function(T){return c.d2c(T,g.thetaunit)};if(y)for(v=new Array(_),x=0;x<_;x++)v[x]=E(y[x]);else{var M=m+"0",C="d"+m,w=M in g?E(g[M]):0,k=g[C]?E(g[C]):(c.period||2*Math.PI)/_;for(v=new Array(_),x=0;x<_;x++)v[x]=w+x*k}return v},c.setGeometry=function(){var g=f.sector,m=g.map(i),y={clockwise:-1,counterclockwise:1}[c.direction],_=i(c.rotation),v=function(b){return y*b+_},x=function(b){return(b-_)/y},E,M,C,w;switch(h){case"linear":M=E=t.identity,w=i,C=o,c.range=t.isFullCircle(m)?[g[0],g[0]+360]:m.map(x).map(o);break;case"category":var k=c._categories.length,T=c.period?Math.max(c.period,k):k;T===0&&(T=1),M=w=function(b){return b*2*Math.PI/T},E=C=function(b){return b*T/Math.PI/2},c.range=[0,T];break}c.c2g=function(b){return v(M(b))},c.g2c=function(b){return E(x(b))},c.t2g=function(b){return v(w(b))},c.g2t=function(b){return C(x(b))}}}}}),R7=ye({"src/plots/polar/constants.js"(e,r){"use strict";r.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}}}),z7=ye({"src/plots/polar/helpers.js"(e,r){"use strict";var t=Yt(),a=Qx().tester,i=t.findIndexOfMin,o=t.isAngleInsideSector,s=t.angleDelta,l=t.angleDist;function n(x,E,M,C,w){if(!o(E,C))return!1;var k,T;M[0]0?T:1/0},C=i(E,M),w=t.mod(C+1,E.length);return[E[C],E[w]]}function m(x){return Math.abs(x)>1e-10?x:0}function y(x,E,M){E=E||0,M=M||0;for(var C=x.length,w=new Array(C),k=0;k0?1:0}function a(n){var u=n[0],c=n[1];if(!isFinite(u)||!isFinite(c))return[1,0];var f=(u+1)*(u+1)+c*c;return[(u*u+c*c-1)/f,2*c/f]}function i(n,u){var c=u[0],f=u[1];return[c*n.radius+n.cx,-f*n.radius+n.cy]}function o(n,u){return u*n.radius}function s(n,u,c,f){var h=i(n,a([c,u])),d=h[0],p=h[1],g=i(n,a([f,u])),m=g[0],y=g[1];if(u===0)return["M"+d+","+p,"L"+m+","+y].join(" ");var _=o(n,1/Math.abs(u));return["M"+d+","+p,"A"+_+","+_+" 0 0,"+(u<0?1:0)+" "+m+","+y].join(" ")}function l(n,u,c,f){var h=o(n,1/(u+1)),d=i(n,a([u,c])),p=d[0],g=d[1],m=i(n,a([u,f])),y=m[0],_=m[1];if(t(c)!==t(f)){var v=i(n,a([u,0])),x=v[0],E=v[1];return["M"+p+","+g,"A"+h+","+h+" 0 0,"+(0pe?(we=Y,xe=Y*pe,te=(K-xe)/W.h/2,he=[j[0],j[1]],oe=[q[0]+te,q[1]-te]):(we=K/pe,xe=K,te=(Y-we)/W.w/2,he=[j[0]+te,j[1]-te],oe=[q[0],q[1]]),N.xLength2=we,N.yLength2=xe,N.xDomain2=he,N.yDomain2=oe;var ie=N.xOffset2=W.l+W.w*he[0],ee=N.yOffset2=W.t+W.h*(1-oe[1]),ce=N.radius=we/le,_e=N.innerRadius=N.getHole(J)*ce,Se=N.cx=ie-ce*se[0],Me=N.cy=ee+ce*se[3],Ue=N.cxx=Se-ie,Ge=N.cyy=Me-ee,Ze=U.side,Ke;Ze==="counterclockwise"?(Ke=Ze,Ze="top"):Ze==="clockwise"&&(Ke=Ze,Ze="bottom"),N.radialAxis=N.mockAxis(Z,J,U,{_id:"x",side:Ze,_trueSide:Ke,domain:[_e/W.w,ce/W.w]}),N.angularAxis=N.mockAxis(Z,J,V,{side:"right",domain:[0,Math.PI],autorange:!1}),N.doAutoRange(Z,J),N.updateAngularAxis(Z,J),N.updateRadialAxis(Z,J),N.updateRadialAxisTitle(Z,J),N.xaxis=N.mockCartesianAxis(Z,J,{_id:"x",domain:he}),N.yaxis=N.mockCartesianAxis(Z,J,{_id:"y",domain:oe});var dt=N.pathSubplot();N.clipPaths.forTraces.select("path").attr("d",dt).attr("transform",s(Ue,Ge)),H.frontplot.attr("transform",s(ie,ee)).call(n.setClipUrl,N._hasClipOnAxisFalse?null:N.clipIds.forTraces,N.gd),H.bg.attr("d",dt).attr("transform",s(Se,Me)).call(l.fill,J.bgcolor)},B.mockAxis=function(Z,J,N,H){var W=i.extendFlat({},N,H);return h(W,J,Z),W},B.mockCartesianAxis=function(Z,J,N){var H=this,W=H.isSmith,U=N._id,V=i.extendFlat({type:"linear"},N);f(V,Z);var j={x:[0,2],y:[1,3]};return V.setRange=function(){var q=H.sectorBBox,Y=j[U],K=H.radialAxis._rl,re=(K[1]-K[0])/(1-H.getHole(J));V.range=[q[Y[0]]*re,q[Y[1]]*re]},V.isPtWithinRange=U==="x"&&!W?function(q){return H.isPtInside(q)}:function(){return!0},V.setRange(),V.setScale(),V},B.doAutoRange=function(Z,J){var N=this,H=N.gd,W=N.radialAxis,U=N.getRadial(J);d(H,W);var V=W.range;if(U.range=V.slice(),U._input.range=V.slice(),W._rl=[W.r2l(V[0],null,"gregorian"),W.r2l(V[1],null,"gregorian")],W.minallowed!==void 0){var j=W.r2l(W.minallowed);W._rl[0]>W._rl[1]?W._rl[1]=Math.max(W._rl[1],j):W._rl[0]=Math.max(W._rl[0],j)}if(W.maxallowed!==void 0){var q=W.r2l(W.maxallowed);W._rl[0]90&&K<=270&&(re.tickangle=180);var ue=le?function(ce){var _e=D(N,S([ce.x,0]));return s(_e[0]-j,_e[1]-q)}:function(ce){return s(re.l2p(ce.x)+V,0)},fe=le?function(ce){return F(N,ce.x,-1/0,1/0)}:function(ce){return N.pathArc(re.r2p(ce.x)+V)},pe=O(Y);if(N.radialTickLayout!==pe&&(W["radial-axis"].selectAll(".xtick").remove(),N.radialTickLayout=pe),se){re.setScale();var we=0,xe=le?(re.tickvals||[]).filter(function(ce){return ce>=0}).map(function(ce){return c.tickText(re,ce,!0,!1)}):c.calcTicks(re),he=le?xe:c.clipEnds(re,xe),oe=c.getTickSigns(re)[2];le&&((re.ticks==="top"&&re.side==="bottom"||re.ticks==="bottom"&&re.side==="top")&&(oe=-oe),re.ticks==="top"&&re.side==="top"&&(we=-re.ticklen),re.ticks==="bottom"&&re.side==="bottom"&&(we=re.ticklen)),c.drawTicks(H,re,{vals:xe,layer:W["radial-axis"],path:c.makeTickPath(re,0,oe),transFn:ue,crisp:!1}),c.drawGrid(H,re,{vals:he,layer:W["radial-grid"],path:fe,transFn:i.noop,crisp:!1}),c.drawLabels(H,re,{vals:xe,layer:W["radial-axis"],transFn:ue,labelFns:c.makeLabelFns(re,we)})}var te=N.radialAxisAngle=N.vangles?I($(z(Y.angle),N.vangles)):Y.angle,ie=s(j,q),ee=ie+o(-te);X(W["radial-axis"],se&&(Y.showticklabels||Y.ticks),{transform:ee}),X(W["radial-grid"],se&&Y.showgrid,{transform:le?"":ie}),X(W["radial-line"].select("line"),se&&Y.showline,{x1:le?-U:V,y1:0,x2:U,y2:0,transform:ee}).attr("stroke-width",Y.linewidth).call(l.stroke,Y.linecolor)},B.updateRadialAxisTitle=function(Z,J,N){if(!this.isSmith){var H=this,W=H.gd,U=H.radius,V=H.cx,j=H.cy,q=H.getRadial(J),Y=H.id+"title",K=0;if(q.title){var re=n.bBox(H.layers["radial-axis"].node()).height,se=q.title.font.size,le=q.side;K=le==="top"?se:le==="counterclockwise"?-(re+se*.4):re+se*.8}var ue=N!==void 0?N:H.radialAxisAngle,fe=z(ue),pe=Math.cos(fe),we=Math.sin(fe),xe=V+U/2*pe+K*we,he=j-U/2*we+K*pe;H.layers["radial-axis-title"]=y.draw(W,Y,{propContainer:q,propName:H.id+".radialaxis.title.text",placeholder:R(W,"Click to enter radial axis title"),attributes:{x:xe,y:he,"text-anchor":"middle"},transform:{rotate:-ue}})}},B.updateAngularAxis=function(Z,J){var N=this,H=N.gd,W=N.layers,U=N.radius,V=N.innerRadius,j=N.cx,q=N.cy,Y=N.getAngular(J),K=N.angularAxis,re=N.isSmith;re||(N.fillViewInitialKey("angularaxis.rotation",Y.rotation),K.setGeometry(),K.setScale());var se=re?function(_e){var Se=D(N,S([0,_e.x]));return Math.atan2(Se[0]-j,Se[1]-q)-Math.PI/2}:function(_e){return K.t2g(_e.x)};K.type==="linear"&&K.thetaunit==="radians"&&(K.tick0=I(K.tick0),K.dtick=I(K.dtick));var le=function(_e){return s(j+U*Math.cos(_e),q-U*Math.sin(_e))},ue=re?function(_e){var Se=D(N,S([0,_e.x]));return s(Se[0],Se[1])}:function(_e){return le(se(_e))},fe=re?function(_e){var Se=D(N,S([0,_e.x])),Me=Math.atan2(Se[0]-j,Se[1]-q)-Math.PI/2;return s(Se[0],Se[1])+o(-I(Me))}:function(_e){var Se=se(_e);return le(Se)+o(-I(Se))},pe=re?function(_e){return A(N,_e.x,0,1/0)}:function(_e){var Se=se(_e),Me=Math.cos(Se),Ue=Math.sin(Se);return"M"+[j+V*Me,q-V*Ue]+"L"+[j+U*Me,q-U*Ue]},we=c.makeLabelFns(K,0),xe=we.labelStandoff,he={};he.xFn=function(_e){var Se=se(_e);return Math.cos(Se)*xe},he.yFn=function(_e){var Se=se(_e),Me=Math.sin(Se)>0?.2:1;return-Math.sin(Se)*(xe+_e.fontSize*Me)+Math.abs(Math.cos(Se))*(_e.fontSize*w)},he.anchorFn=function(_e){var Se=se(_e),Me=Math.cos(Se);return Math.abs(Me)<.1?"middle":Me>0?"start":"end"},he.heightFn=function(_e,Se,Me){var Ue=se(_e);return-.5*(1+Math.sin(Ue))*Me};var oe=O(Y);N.angularTickLayout!==oe&&(W["angular-axis"].selectAll("."+K._id+"tick").remove(),N.angularTickLayout=oe);var te=re?[1/0].concat(K.tickvals||[]).map(function(_e){return c.tickText(K,_e,!0,!1)}):c.calcTicks(K);re&&(te[0].text="\u221E",te[0].fontSize*=1.75);var ie;if(J.gridshape==="linear"?(ie=te.map(se),i.angleDelta(ie[0],ie[1])<0&&(ie=ie.slice().reverse())):ie=null,N.vangles=ie,K.type==="category"&&(te=te.filter(function(_e){return i.isAngleInsideSector(se(_e),N.sectorInRad)})),K.visible){var ee=K.ticks==="inside"?-1:1,ce=(K.linewidth||1)/2;c.drawTicks(H,K,{vals:te,layer:W["angular-axis"],path:"M"+ee*ce+",0h"+ee*K.ticklen,transFn:fe,crisp:!1}),c.drawGrid(H,K,{vals:te,layer:W["angular-grid"],path:pe,transFn:i.noop,crisp:!1}),c.drawLabels(H,K,{vals:te,layer:W["angular-axis"],repositionOnUpdate:!0,transFn:ue,labelFns:he})}X(W["angular-line"].select("path"),Y.showline,{d:N.pathSubplot(),transform:s(j,q)}).attr("stroke-width",Y.linewidth).call(l.stroke,Y.linecolor)},B.updateFx=function(Z,J){if(!this.gd._context.staticPlot){var N=!this.isSmith;N&&(this.updateAngularDrag(Z),this.updateRadialDrag(Z,J,0),this.updateRadialDrag(Z,J,1)),this.updateHoverAndMainDrag(Z)}},B.updateHoverAndMainDrag=function(Z){var J=this,N=J.isSmith,H=J.gd,W=J.layers,U=Z._zoomlayer,V=k.MINZOOM,j=k.OFFEDGE,q=J.radius,Y=J.innerRadius,K=J.cx,re=J.cy,se=J.cxx,le=J.cyy,ue=J.sectorInRad,fe=J.vangles,pe=J.radialAxis,we=T.clampTiny,xe=T.findXYatLength,he=T.findEnclosingVertexAngles,oe=k.cornerHalfWidth,te=k.cornerLen/2,ie,ee,ce=p.makeDragger(W,"path","maindrag",Z.dragmode===!1?"none":"crosshair");t.select(ce).attr("d",J.pathSubplot()).attr("transform",s(K,re)),ce.onmousemove=function(ct){m.hover(H,ct,J.id),H._fullLayout._lasthover=ce,H._fullLayout._hoversubplot=J.id},ce.onmouseout=function(ct){H._dragging||g.unhover(H,ct)};var _e={element:ce,gd:H,subplot:J.id,plotinfo:{id:J.id,xaxis:J.xaxis,yaxis:J.yaxis},xaxes:[J.xaxis],yaxes:[J.yaxis]},Se,Me,Ue,Ge,Ze,Ke,dt,_t,Pt;function vt(ct,At){return Math.sqrt(ct*ct+At*At)}function Tt(ct,At){return vt(ct-se,At-le)}function st(ct,At){return Math.atan2(le-At,ct-se)}function Ve(ct,At){return[ct*Math.cos(At),ct*Math.sin(-At)]}function Ye(ct,At){if(ct===0)return J.pathSector(2*oe);var ft=te/ct,qt=At-ft,ar=At+ft,mt=Math.max(0,Math.min(ct,q)),gt=mt-oe,St=mt+oe;return"M"+Ve(gt,qt)+"A"+[gt,gt]+" 0,0,0 "+Ve(gt,ar)+"L"+Ve(St,ar)+"A"+[St,St]+" 0,0,1 "+Ve(St,qt)+"Z"}function me(ct,At,ft){if(ct===0)return J.pathSector(2*oe);var qt=Ve(ct,At),ar=Ve(ct,ft),mt=we((qt[0]+ar[0])/2),gt=we((qt[1]+ar[1])/2),St,Dt;if(mt&>){var kt=gt/mt,Vt=-1/kt,lr=xe(oe,kt,mt,gt);St=xe(te,Vt,lr[0][0],lr[0][1]),Dt=xe(te,Vt,lr[1][0],lr[1][1])}else{var dr,yr;gt?(dr=te,yr=oe):(dr=oe,yr=te),St=[[mt-dr,gt-yr],[mt+dr,gt-yr]],Dt=[[mt-dr,gt+yr],[mt+dr,gt+yr]]}return"M"+St.join("L")+"L"+Dt.reverse().join("L")+"Z"}function be(){Ue=null,Ge=null,Ze=J.pathSubplot(),Ke=!1;var ct=H._fullLayout[J.id];dt=l.luminosity(ct.bgcolor),_t=p.makeZoombox(U,dt,K,re,Ze),_t.attr("fill-rule","evenodd"),Pt=p.makeCorners(U,K,re),x(H)}function Ee(ct,At){return At=Math.max(Math.min(At,q),Y),ctV?(ct-1&&ct===1&&v(At,H,[J.xaxis],[J.yaxis],J.id,_e),ft.indexOf("event")>-1&&m.click(H,At,J.id)}_e.prepFn=function(ct,At,ft){var qt=H._fullLayout.dragmode,ar=ce.getBoundingClientRect();H._fullLayout._calcInverseTransform(H);var mt=H._fullLayout._invTransform;ie=H._fullLayout._invScaleX,ee=H._fullLayout._invScaleY;var gt=i.apply3DTransform(mt)(At-ar.left,ft-ar.top);if(Se=gt[0],Me=gt[1],fe){var St=T.findPolygonOffset(q,ue[0],ue[1],fe);Se+=se+St[0],Me+=le+St[1]}switch(qt){case"zoom":_e.clickFn=tt,N||(fe?_e.moveFn=Je:_e.moveFn=Ce,_e.doneFn=qe,be(ct,At,ft));break;case"select":case"lasso":_(ct,At,ft,_e,qt);break}},g.init(_e)},B.updateRadialDrag=function(Z,J,N){var H=this,W=H.gd,U=H.layers,V=H.radius,j=H.innerRadius,q=H.cx,Y=H.cy,K=H.radialAxis,re=k.radialDragBoxSize,se=re/2;if(!K.visible)return;var le=z(H.radialAxisAngle),ue=K._rl,fe=ue[0],pe=ue[1],we=ue[N],xe=.75*(ue[1]-ue[0])/(1-H.getHole(J))/V,he,oe,te;N?(he=q+(V+se)*Math.cos(le),oe=Y-(V+se)*Math.sin(le),te="radialdrag"):(he=q+(j-se)*Math.cos(le),oe=Y-(j-se)*Math.sin(le),te="radialdrag-inner");var ie=p.makeRectDragger(U,te,"crosshair",-se,-se,re,re),ee={element:ie,gd:W};Z.dragmode===!1&&(ee.dragmode=!1),X(t.select(ie),K.visible&&j0!=(N?Se>fe:Se=90||W>90&&U>=450?le=1:j<=0&&Y<=0?le=0:le=Math.max(j,Y),W<=180&&U>=180||W>180&&U>=540?K=-1:V>=0&&q>=0?K=0:K=Math.min(V,q),W<=270&&U>=270||W>270&&U>=630?re=-1:j>=0&&Y>=0?re=0:re=Math.min(j,Y),U>=360?se=1:V<=0&&q<=0?se=0:se=Math.max(V,q),[K,re,se,le]}function $(Z,J){var N=function(W){return i.angleDist(Z,W)},H=i.findIndexOfMin(J,N);return J[H]}function X(Z,J,N){return J?(Z.attr("display",null),Z.attr(N)):Z&&Z.attr("display","none"),Z}}}),kG=ye({"src/plots/polar/layout_attributes.js"(e,r){"use strict";var t=Wl(),a=Gu(),i=Ds().attributes,o=Yt().extendFlat,s=Cs().overrideAll,l=s({color:a.color,showline:o({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:o({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth,griddash:a.griddash},"plot","from-root"),n=s({tickmode:a.minor.tickmode,nticks:a.nticks,tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,ticklabelstep:a.ticklabelstep,showticklabels:a.showticklabels,labelalias:a.labelalias,minorloglabels:a.minorloglabels,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,minexponent:a.minexponent,separatethousands:a.separatethousands,tickfont:a.tickfont,tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,layer:a.layer},"plot","from-root"),u={visible:o({},a.visible,{dflt:!0}),type:o({},a.type,{values:["-","linear","log","date","category"]}),autotypenumbers:a.autotypenumbers,autorangeoptions:{minallowed:a.autorangeoptions.minallowed,maxallowed:a.autorangeoptions.maxallowed,clipmin:a.autorangeoptions.clipmin,clipmax:a.autorangeoptions.clipmax,include:a.autorangeoptions.include,editType:"plot"},autorange:o({},a.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:o({},a.minallowed,{editType:"plot"}),maxallowed:o({},a.maxallowed,{editType:"plot"}),range:o({},a.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:a.categoryorder,categoryarray:a.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:a.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:o({},a.title.text,{editType:"plot",dflt:""}),font:o({},a.title.font,{editType:"plot"}),editType:"plot"},hoverformat:a.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};o(u,l,n);var c={visible:o({},a.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:a.autotypenumbers,categoryorder:a.categoryorder,categoryarray:a.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:a.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};o(c,l,n),r.exports={domain:i({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:t.background},radialaxis:u,angularaxis:c,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),axe=ye({"src/plots/polar/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=ko(),o=zm(),s=_c().getSubplotData,l=km(),n=my(),u=Av(),c=Tv(),f=zA(),h=rb(),d=ZD(),p=gy(),g=kG(),m=MG(),y=R7(),_=y.axisNames;function v(E,M,C,w){var k=C("bgcolor");w.bgColor=a.combine(k,w.paper_bgcolor);var T=C("sector");C("hole");var b=s(w.fullData,y.name,w.id),S=w.layoutOut,A;function F(se,le){return C(A+"."+se,le)}for(var D=0;D<_.length;D++){A=_[D],t.isPlainObject(E[A])||(E[A]={});var R=E[A],P=i.newContainer(M,A);P._id=P._name=A,P._attr=w.id+"."+A,P._traceIndices=b.map(function(se){return se.index});var z=y.axisName2dataArray[A],I=x(R,P,F,b,z,w);f(R,P,F,{axData:b,dataAttr:z});var L=F("visible");switch(m(P,M,S),F("uirevision",M.uirevision),P._m=1,A){case"radialaxis":F("minallowed"),F("maxallowed");var B=F("range"),O=P.getAutorangeDflt(B),G=F("autorange",O),$;B&&(B[0]===null&&B[1]===null||(B[0]===null||B[1]===null)&&(G==="reversed"||G===!0)||B[0]!==null&&(G==="min"||G==="max reversed")||B[1]!==null&&(G==="max"||G==="min reversed"))&&(B=void 0,delete P.range,P.autorange=!0,$=!0),$||(O=P.getAutorangeDflt(B),G=F("autorange",O)),R.autorange=G,G&&(d(F,G,B),(I==="linear"||I==="-")&&F("rangemode"),P.isReversed()&&(P._m=-1)),P.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(I==="date"){t.log("Polar plots do not support date angular axes yet.");for(var X=0;X")}}r.exports={hoverPoints:a,makeHoverPointText:i}}}),oxe=ye({"src/traces/scatterpolar/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:B7(),categories:["polar","symbols","showLegend","scatter-like"],attributes:p4(),supplyDefaults:O7().supplyDefaults,colorbar:bc(),formatLabels:N7(),calc:ixe(),plot:nxe(),style:Of().style,styleOnSelect:Of().styleOnSelect,hoverPoints:j7().hoverPoints,selectPoints:Im(),meta:{}}}}),sxe=ye({"lib/scatterpolar.js"(e,r){"use strict";r.exports=oxe()}}),CG=ye({"src/traces/scatterpolargl/attributes.js"(e,r){"use strict";var t=p4(),{cliponaxis:a,hoveron:i}=t,o=Rn(t,["cliponaxis","hoveron"]),{connectgaps:s,line:{color:l,dash:n,width:u},fill:c,fillcolor:f,marker:h,textfont:d,textposition:p}=jb();r.exports=Ci(ja({},o),{connectgaps:s,fill:c,fillcolor:f,line:{color:l,dash:n,editType:"calc",width:u},marker:h,textfont:d,textposition:p})}}),lxe=ye({"src/traces/scatterpolargl/defaults.js"(e,r){"use strict";var t=Yt(),a=ms(),i=O7().handleRThetaDefaults,o=kd(),s=ip(),l=np(),n=qp(),u=jp().PTS_LINESONLY,c=CG();r.exports=function(h,d,p,g){function m(_,v){return t.coerce(h,d,c,_,v)}var y=i(h,d,g,m);if(!y){d.visible=!1;return}m("thetaunit"),m("mode",y=n&&(w.marker.cluster=x.tree),w.marker&&(w.markerSel.positions=w.markerUnsel.positions=w.marker.positions=S),w.line&&S.length>1&&l.extendFlat(w.line,s.linePositions(f,v,S)),w.text&&(l.extendFlat(w.text,{positions:S},s.textPosition(f,v,w.text,w.marker)),l.extendFlat(w.textSel,{positions:S},s.textPosition(f,v,w.text,w.markerSel)),l.extendFlat(w.textUnsel,{positions:S},s.textPosition(f,v,w.text,w.markerUnsel))),w.fill&&!m.fill2d&&(m.fill2d=!0),w.marker&&!m.scatter2d&&(m.scatter2d=!0),w.line&&!m.line2d&&(m.line2d=!0),w.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(w.line),m.fillOptions.push(w.fill),m.markerOptions.push(w.marker),m.markerSelectedOptions.push(w.markerSel),m.markerUnselectedOptions.push(w.markerUnsel),m.textOptions.push(w.text),m.textSelectedOptions.push(w.textSel),m.textUnselectedOptions.push(w.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),x.x=A,x.y=F,x.rawx=A,x.rawy=F,x.r=M,x.theta=C,x.positions=S,x._scene=m,x.index=m.count,m.count++}}),i(f,h,d)}},r.exports.reglPrecompiled=u}}),pxe=ye({"src/traces/scatterpolargl/index.js"(e,r){"use strict";var t=hxe();t.plot=dxe(),r.exports=t}}),vxe=ye({"lib/scatterpolargl.js"(e,r){"use strict";r.exports=pxe()}}),DG=ye({"src/traces/barpolar/attributes.js"(e,r){"use strict";var{hovertemplateAttrs:t,templatefallbackAttrs:a}=Ro(),i=Xi().extendFlat,o=p4(),s=Gp();r.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:i({},s.base,{}),offset:i({},s.offset,{}),width:i({},s.width,{}),text:i({},s.text,{}),hovertext:i({},s.hovertext,{}),marker:l(),hoverinfo:o.hoverinfo,hovertemplate:t(),hovertemplatefallback:a(),selected:s.selected,unselected:s.unselected};function l(){var n=i({},s.marker);return delete n.cornerradius,n}}}),LG=ye({"src/traces/barpolar/layout_attributes.js"(e,r){"use strict";r.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),mxe=ye({"src/traces/barpolar/defaults.js"(e,r){"use strict";var t=Yt(),a=O7().handleRThetaDefaults,i=HA(),o=DG();r.exports=function(l,n,u,c){function f(d,p){return t.coerce(l,n,o,d,p)}var h=a(l,n,c,f);if(!h){n.visible=!1;return}f("thetaunit"),f("base"),f("offset"),f("width"),f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),i(l,n,f,u,c),t.coerceSelectionMarkerOpacity(n,f)}}}),gxe=ye({"src/traces/barpolar/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=LG();r.exports=function(i,o,s){var l={},n;function u(h,d){return t.coerce(i[n]||{},o[n],a,h,d)}for(var c=0;c0?(g=d,m=p):(g=p,m=d);var y=s.findEnclosingVertexAngles(g,n.vangles)[0],_=s.findEnclosingVertexAngles(m,n.vangles)[1],v=[y,(g+m)/2,_];return s.pathPolygonAnnulus(f,h,g,m,v,u,c)}:function(f,h,d,p){return i.pathAnnulus(f,h,d,p,u,c)}}}}),_xe=ye({"src/traces/barpolar/hover.js"(e,r){"use strict";var t=Hs(),a=Yt(),i=Ay().getTraceColor,o=a.fillText,s=j7().makeHoverPointText,l=z7().isPtInsidePolygon;r.exports=function(u,c,f){var h=u.cd,d=h[0].trace,p=u.subplot,g=p.radialAxis,m=p.angularAxis,y=p.vangles,_=y?l:a.isPtInsideSector,v=u.maxHoverDistance,x=m._period||2*Math.PI,E=Math.abs(g.g2p(Math.sqrt(c*c+f*f))),M=Math.atan2(f,c);g.range[0]>g.range[1]&&(M+=Math.PI);var C=function(b){return _(E,M,[b.rp0,b.rp1],[b.thetag0,b.thetag1],y)?v+Math.min(1,Math.abs(b.thetag1-b.thetag0)/x)-1+(b.rp1-E)/(b.rp1-b.rp0)-1:1/0};if(t.getClosest(h,C,u),u.index!==!1){var w=u.index,k=h[w];u.x0=u.x1=k.ct[0],u.y0=u.y1=k.ct[1];var T=a.extendFlat({},k,{r:k.s,theta:k.p});return o(k,d,u),s(T,d,p,u),u.hovertemplate=d.hovertemplate,u.color=i(d,k),u.xLabelVal=u.yLabelVal=void 0,k.s<0&&(u.idealAlign="left"),[u]}}}}),xxe=ye({"src/traces/barpolar/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"barpolar",basePlotModule:B7(),categories:["polar","bar","showLegend"],attributes:DG(),layoutAttributes:LG(),supplyDefaults:mxe(),supplyLayoutDefaults:gxe(),calc:FG().calc,crossTraceCalc:FG().crossTraceCalc,plot:yxe(),colorbar:bc(),formatLabels:N7(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:_xe(),selectPoints:Ty(),meta:{}}}}),bxe=ye({"lib/barpolar.js"(e,r){"use strict";r.exports=xxe()}}),PG=ye({"src/plots/smith/constants.js"(e,r){"use strict";r.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),IG=ye({"src/plots/smith/layout_attributes.js"(e,r){"use strict";var t=Wl(),a=Gu(),i=Ds().attributes,o=Yt().extendFlat,s=Cs().overrideAll,l=s({color:a.color,showline:o({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:o({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth,griddash:a.griddash},"plot","from-root"),n=s({ticklen:a.ticklen,tickwidth:o({},a.tickwidth,{dflt:2}),tickcolor:a.tickcolor,showticklabels:a.showticklabels,labelalias:a.labelalias,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,tickfont:a.tickfont,tickformat:a.tickformat,hoverformat:a.hoverformat,layer:a.layer},"plot","from-root"),u=o({visible:o({},a.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:o({},a.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},l,n),c=o({visible:o({},a.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:a.ticks,editType:"calc"},l,n);r.exports={domain:i({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:t.background},realaxis:u,imaginaryaxis:c,editType:"calc"}}}),wxe=ye({"src/plots/smith/layout_defaults.js"(e,r){"use strict";var t=Yt(),a=Ya(),i=ko(),o=zm(),s=_c().getSubplotData,l=Tv(),n=Av(),u=rb(),c=Op(),f=IG(),h=PG(),d=h.axisNames,p=m(function(y){return t.isTypedArray(y)&&(y=Array.from(y)),y.slice().reverse().map(function(_){return-_}).concat([0]).concat(y)},String);function g(y,_,v,x){var E=v("bgcolor");x.bgColor=a.combine(E,x.paper_bgcolor);var M=s(x.fullData,h.name,x.id),C=x.layoutOut,w;function k(O,G){return v(w+"."+O,G)}for(var T=0;T")}}r.exports={hoverPoints:a,makeHoverPointText:i}}}),Cxe=ye({"src/traces/scattersmith/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"scattersmith",basePlotModule:Axe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:RG(),supplyDefaults:Txe(),colorbar:bc(),formatLabels:Mxe(),calc:Exe(),plot:Sxe(),style:Of().style,styleOnSelect:Of().styleOnSelect,hoverPoints:kxe().hoverPoints,selectPoints:Im(),meta:{}}}}),Dxe=ye({"lib/scattersmith.js"(e,r){"use strict";r.exports=Cxe()}}),zG=ye({"src/traces/quiver/attributes.js"(e,r){"use strict";var t=Oo(),a=Ro().hovertemplateAttrs,i=zs().axisHoverFormat,o=Xi().extendFlat,s=rs(),l=Eu().dash,n=kv(),u=al(),c={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:u.x0,dx:u.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:u.y0,dy:u.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:i("x"),yhoverformat:i("y"),uhoverformat:i("u","noDate"),vhoverformat:i("v","noDate"),hoverinfo:o({},t.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:a({},{keys:["x","y","u","v","text","name"]}),text:u.text,textposition:u.textposition,textfont:u.textfont,marker:o({arrowsize:o({},n.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:l,editType:"style"},editType:"calc"},s("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};r.exports=c}}),Lxe=ye({"src/traces/quiver/defaults.js"(e,r){"use strict";var t=Yt(),a=zG(),i=Lm(),o=xc().hasColorscale,s=Su();r.exports=function(n,u,c,f){function h(E,M){return t.coerce(n,u,a,E,M)}var d=i(n,u,f,h);if(!d){u.visible=!1;return}var p=h("u"),g=h("v");if(!t.isArrayOrTypedArray(p)||p.length===0){u.u=new Array(d);for(var m=0;mR&&(R=p[$]),g[$]z&&(z=g[$]),NL&&(L=N),HO&&(O=H);var W=Math.sqrt(N*N+H*H);if(W>v&&(v=W),W<_&&(_=W),C){var U=M[$];X.mc=U,i(U)&&(UE&&(E=U))}}else X.x=o,X.y=o}if(f._maxNorm=v,b==="scaled"||S==="paper"){let ue=R-D,fe=z-P;var V;ue===0&&fe===0?V=1:V=(ue+fe+Math.sqrt((ue-fe)*(ue-fe)+4*G*ue*fe))/(2*(G-1)),V*=n,f._scaleFactor=V/f._maxNorm}else f._scaleFactor=1;f._scaleFactor*=f.lengthfactor;let j=new Array(m),q=new Array(m),Y=new Array(m),K=new Array(m);for(var re,se,$=0;$g.i&&isFinite(m[g.i]))y=m[g.i];else{var _=h.u&&h.u[g.i]||0,v=h.v&&h.v[g.i]||0;y=Math.sqrt(_*_+v*v)}return g.mcc=p(y),g.mcc})}function n(f){var h=t.select(f).selectAll("g.trace.quiver");h.each(function(d){c(f,d,t.select(this))})}function u(f,h,d){c(f,h,d)}function c(f,h,d){var p=h[0].trace,g=p.marker||{},m=g.line||{},y=a.isArrayOrTypedArray(g.color)?void 0:g.color,_=p._hasColorscale;if(d)if(p.selectedpoints){var v=(p.selected||{}).marker||{},x=(p.unselected||{}).marker||{},E=v.line||{},M=x.line||{};d.selectAll("path.js-line").each(function(w){var k=t.select(this),T=!w.selected,b=T?x.color:v.color,S=T?M.width!==void 0?M.width:m.width:E.width!==void 0?E.width:m.width;b?(i.lineGroupStyle(k,S,b,m.dash),k.style("stroke-opacity",1)):(i.lineGroupStyle(k,S,y,m.dash),_&&l(k,p),k.style("stroke-opacity",T?s:1))}),i.selectedTextStyle(d.selectAll("text"),p)}else{var C=d.selectAll("path.js-line");C.call(i.lineGroupStyle,m.width,y,m.dash),_&&l(C,p),C.style("stroke-opacity",1),i.textPointStyle(d.selectAll("text"),p,f)}}r.exports={style:n,styleOnSelect:u,colorscaleStroke:l}}}),Ixe=ye({"src/traces/quiver/plot.js"(e,r){"use strict";var t=ai(),a=Yt(),i=$i(),o=U7().colorscaleStroke,s=Math.PI/12,l=5.8,n=1.5,u=.7;r.exports=function(h,d,p,g,m,y){var _,v,x=!m,E=!!m&&m.duration>0;if(_=g.selectAll("g.trace").data(p,function(C){return C[0].trace.uid}),_.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),_.order(),E){y&&(v=y());var M=t.transition().duration(m.duration).ease(m.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()});M.each(function(){g.selectAll("g.trace").each(function(C,w){c(h,w,d,C,p,this,m)})})}else _.each(function(C,w){c(h,w,d,C,p,this,m)});x&&_.exit().remove()};function c(f,h,d,p,g,m,y){var _=p[0].trace,v=d.xaxis,x=d.yaxis;p[0][d.isRangePlot?"nodeRangePlot3":"node3"]=t.select(m);var E=t.select(m).selectAll("g.lines").data([p]);E.enter().append("g").classed("lines",!0),i.setClipUrl(E,d.layerClipId,f);var M=E.selectAll("path.js-line").data(p);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:w=0,arrowref:k}=_,T=k==="paper"?_._scaleFactor*Math.sqrt(Math.abs(v._m*x._m)):_._scaleFactor,b=_.marker.arrowsize;M.each(function(z){let I=t.select(this);if(z.x===void 0||z.y===void 0){I.attr("d",null);return}let L=(k==="paper"?z._u*Math.sign(v._m):t.round(v._m*z._u))*T,B=(k==="paper"?z._v*Math.sign(x._m):t.round(x._m*z._v))*T,O=(_._input.marker||{}).arrowsize!==void 0;var G,$,X,Z;C==="tip"?(G=v.c2p(z.x)-L,X=x.c2p(z.y)-B,$=v.c2p(z.x),Z=x.c2p(z.y)):C==="center"?(G=v.c2p(z.x)-L/2,X=x.c2p(z.y)-B/2,$=v.c2p(z.x)+L/2,Z=x.c2p(z.y)+B/2):(G=v.c2p(z.x),X=x.c2p(z.y),$=v.c2p(z.x)+L,Z=x.c2p(z.y)+B),z._px0=G,z._py0=X,z._px1=$,z._py1=Z;var J=_.marker.line.width;O||(J=Math.max(J,n));let N=Math.sqrt(($-G)*($-G)+(Z-X)*(Z-X)),H=u*N,W=Math.min(l*b*J,H),U=Math.atan2(Z-X,$-G),V=$-W*Math.cos(U-s),j=Z-W*Math.sin(U-s),q=$-W*Math.cos(U+s),Y=Z-W*Math.sin(U+s),K="M"+G+","+X+"L"+$+","+Z+"L"+V+","+j+"L"+$+","+Z+"L"+q+","+Y;I.attr("d",K)});var S=_.marker||{},A=S.line||{},F=a.isArrayOrTypedArray(S.color)?void 0:S.color;i.lineGroupStyle(M,A.width,F,A.dash),_._hasColorscale&&o(M,_);var D=t.select(m).selectAll("g.text").data([p]);D.enter().append("g").classed("text",!0),i.setClipUrl(D,d.layerClipId,f);var R=D.selectAll("g.textpoint").data(p);if(R.enter().append("g").classed("textpoint",!0).append("text"),R.exit().remove(),R.each(function(z){var I=t.select(this),L=i.translatePoint(z,I.select("text"),v,x);L||I.remove()}),R.selectAll("text").call(i.textPointStyle,_,f).each(function(z){var I=v.c2p(z.x),L=x.c2p(z.y);t.select(this).selectAll("tspan.line").each(function(){t.select(this).attr({x:I,y:L})})}),y&&y.duration>0){var P=t.transition().duration(y.duration).ease(y.easing);M.transition(P).style("opacity",1)}}}}),Rxe=ye({"src/traces/quiver/hover.js"(e,r){"use strict";var t=Yt(),a=Hs(),i=by();function o(s,l,n,u,c,f){let h=c-n,d=f-u,p=h*h+d*d;if(!p)return Math.sqrt((s-n)*(s-n)+(l-u)*(l-u));var g=((s-n)*h+(l-u)*d)/p;g=Math.max(0,Math.min(1,g));let m=n+g*h,y=u+g*d;return Math.sqrt((s-m)*(s-m)+(l-y)*(l-y))}r.exports=function(l,n,u,c){var f=l.cd,h=f[0].trace,d=l.xa,p=l.ya,g=d.c2p(n),m=p.c2p(u),y=function(k){return k._px0===void 0?1/0:o(g,m,k._px0,k._py0,k._px1,k._py1)};if(a.getClosest(f,y,l),l.index!==!1){var _=f[l.index],v=d.c2p(_.x,!0),x=p.c2p(_.y,!0),E=Math.sqrt((g-v)*(g-v)+(m-x)*(m-x));l.index=_.i;var M=h.u?h.u[_.i]:0,C=h.v?h.v[_.i]:0,w="u: "+M+", v: "+C;return t.extendFlat(l,{color:i(h,_),x0:v-3,x1:v+3,xLabelVal:_.x,y0:x-3,y1:x+3,yLabelVal:_.y,uLabelVal:M,vLabelVal:C,extraText:w,spikeDistance:E,hovertemplate:h.hovertemplate}),t.fillText(_,h,l),[l]}}}}),zxe=ye({"src/traces/quiver/format_labels.js"(e,r){"use strict";var t=qi(),a=Yt();r.exports=function(o,s,l){var n={},u={_fullLayout:l},c=t.getFromTrace(u,s,"x"),f=t.getFromTrace(u,s,"y"),h=o.x,d=o.y;n.xLabel=t.tickText(c,c.c2l(h),!0).text,n.yLabel=t.tickText(f,f.c2l(d),!0).text;var p=s.u?s.u[o.i]:0,g=s.v?s.v[o.i]:0,m=s.uhoverformat,y=s.vhoverformat;return n.uLabel=m?a.numberFormat(m)(p):String(p),n.vLabel=y?a.numberFormat(y)(g):String(g),n}}}),Bxe=ye({"src/traces/quiver/event_data.js"(e,r){"use strict";r.exports=function(a,i,o,s,l){return a.x=i.x,a.y=i.y,a.u=o.u?o.u[l]:void 0,a.v=o.v?o.v[l]:void 0,a}}}),Oxe=ye({"src/traces/quiver/index.js"(e,r){"use strict";r.exports={moduleType:"trace",name:"quiver",basePlotModule:Ml(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:zG(),supplyDefaults:Lxe(),calc:Fxe(),crossTraceCalc:Pxe(),plot:Ixe(),style:U7().style,styleOnSelect:U7().styleOnSelect,hoverPoints:Rxe(),formatLabels:zxe(),eventData:Bxe(),selectPoints:Im(),colorbar:bc(),animatable:!0,meta:{}}}}),Nxe=ye({"lib/quiver.js"(e,r){"use strict";r.exports=Oxe()}}),Wc=ye({"node_modules/world-calendars/dist/main.js"(e,r){var t=ku();function a(){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={}}t(a.prototype,{instance:function(u,c){u=(u||"gregorian").toLowerCase(),c=c||"";var f=this._localCals[u+"-"+c];if(!f&&this.calendars[u]&&(f=new this.calendars[u](c),this._localCals[u+"-"+c]=f),!f)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,u);return f},newDate:function(u,c,f,h,d){return h=(u!=null&&u.year?u.calendar():typeof h=="string"?this.instance(h,d):h)||this.instance(),h.newDate(u,c,f)},substituteDigits:function(u){return function(c){return(c+"").replace(/[0-9]/g,function(f){return u[f]})}},substituteChineseDigits:function(u,c){return function(f){for(var h="",d=0;f>0;){var p=f%10;h=(p===0?"":u[p]+c[d])+h,d++,f=Math.floor(f/10)}return h.indexOf(u[1]+c[1])===0&&(h=h.substr(1)),h||u[0]}}});function i(u,c,f,h){if(this._calendar=u,this._year=c,this._month=f,this._day=h,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(n.local.invalidDate||n.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(u,c){return u=""+u,"000000".substring(0,c-u.length)+u}t(i.prototype,{newDate:function(u,c,f){return this._calendar.newDate(u??this,c,f)},year:function(u){return arguments.length===0?this._year:this.set(u,"y")},month:function(u){return arguments.length===0?this._month:this.set(u,"m")},day:function(u){return arguments.length===0?this._day:this.set(u,"d")},date:function(u,c,f){if(!this._calendar.isValid(u,c,f))throw(n.local.invalidDate||n.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=u,this._month=c,this._day=f,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(u,c){return this._calendar.add(this,u,c)},set:function(u,c){return this._calendar.set(this,u,c)},compareTo:function(u){if(this._calendar.name!==u._calendar.name)throw(n.local.differentCalendars||n.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,u._calendar.local.name);var c=this._year!==u._year?this._year-u._year:this._month!==u._month?this.monthOfYear()-u.monthOfYear():this._day-u._day;return c===0?0:c<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(u){return this._calendar.fromJD(u)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(u){return this._calendar.fromJSDate(u)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}});function s(){this.shortYearCutoff="+10"}t(s.prototype,{_validateLevel:0,newDate:function(u,c,f){return u==null?this.today():(u.year&&(this._validate(u,c,f,n.local.invalidDate||n.regionalOptions[""].invalidDate),f=u.day(),c=u.month(),u=u.year()),new i(this,u,c,f))},today:function(){return this.fromJSDate(new Date)},epoch:function(u){var c=this._validate(u,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return c.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(u){var c=this._validate(u,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return(c.year()<0?"-":"")+o(Math.abs(c.year()),4)},monthsInYear:function(u){return this._validate(u,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),12},monthOfYear:function(u,c){var f=this._validate(u,c,this.minDay,n.local.invalidMonth||n.regionalOptions[""].invalidMonth);return(f.month()+this.monthsInYear(f)-this.firstMonth)%this.monthsInYear(f)+this.minMonth},fromMonthOfYear:function(u,c){var f=(c+this.firstMonth-2*this.minMonth)%this.monthsInYear(u)+this.minMonth;return this._validate(u,f,this.minDay,n.local.invalidMonth||n.regionalOptions[""].invalidMonth),f},daysInYear:function(u){var c=this._validate(u,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return this.leapYear(c)?366:365},dayOfYear:function(u,c,f){var h=this._validate(u,c,f,n.local.invalidDate||n.regionalOptions[""].invalidDate);return h.toJD()-this.newDate(h.year(),this.fromMonthOfYear(h.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(u,c,f){var h=this._validate(u,c,f,n.local.invalidDate||n.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(h))+2)%this.daysInWeek()},extraInfo:function(u,c,f){return this._validate(u,c,f,n.local.invalidDate||n.regionalOptions[""].invalidDate),{}},add:function(u,c,f){return this._validate(u,this.minMonth,this.minDay,n.local.invalidDate||n.regionalOptions[""].invalidDate),this._correctAdd(u,this._add(u,c,f),c,f)},_add:function(u,c,f){if(this._validateLevel++,f==="d"||f==="w"){var h=u.toJD()+c*(f==="w"?this.daysInWeek():1),d=u.calendar().fromJD(h);return this._validateLevel--,[d.year(),d.month(),d.day()]}try{var p=u.year()+(f==="y"?c:0),g=u.monthOfYear()+(f==="m"?c:0),d=u.day(),m=function(v){for(;gx-1+v.minMonth;)p++,g-=x,x=v.monthsInYear(p)};f==="y"?(u.month()!==this.fromMonthOfYear(p,g)&&(g=this.newDate(p,u.month(),this.minDay).monthOfYear()),g=Math.min(g,this.monthsInYear(p)),d=Math.min(d,this.daysInMonth(p,this.fromMonthOfYear(p,g)))):f==="m"&&(m(this),d=Math.min(d,this.daysInMonth(p,this.fromMonthOfYear(p,g))));var y=[p,this.fromMonthOfYear(p,g),d];return this._validateLevel--,y}catch(_){throw this._validateLevel--,_}},_correctAdd:function(u,c,f,h){if(!this.hasYearZero&&(h==="y"||h==="m")&&(c[0]===0||u.year()>0!=c[0]>0)){var d={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[h],p=f<0?-1:1;c=this._add(u,f*d[0]+p*d[1],d[2])}return u.date(c[0],c[1],c[2])},set:function(u,c,f){this._validate(u,this.minMonth,this.minDay,n.local.invalidDate||n.regionalOptions[""].invalidDate);var h=f==="y"?c:u.year(),d=f==="m"?c:u.month(),p=f==="d"?c:u.day();return(f==="y"||f==="m")&&(p=Math.min(p,this.daysInMonth(h,d))),u.date(h,d,p)},isValid:function(u,c,f){this._validateLevel++;var h=this.hasYearZero||u!==0;if(h){var d=this.newDate(u,c,this.minDay);h=c>=this.minMonth&&c-this.minMonth=this.minDay&&f-this.minDay13.5?13:1),_=d-(y>2.5?4716:4715);return _<=0&&_--,this.newDate(_,y,m)},toJSDate:function(u,c,f){var h=this._validate(u,c,f,n.local.invalidDate||n.regionalOptions[""].invalidDate),d=new Date(h.year(),h.month()-1,h.day());return d.setHours(0),d.setMinutes(0),d.setSeconds(0),d.setMilliseconds(0),d.setHours(d.getHours()>12?d.getHours()+2:0),d},fromJSDate:function(u){return this.newDate(u.getFullYear(),u.getMonth()+1,u.getDate())}});var n=r.exports=new a;n.cdate=i,n.baseCalendar=s,n.calendars.gregorian=l}}),jxe=ye({"node_modules/world-calendars/dist/plus.js"(){var e=ku(),r=Wc();e(r.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"}),r.local=r.regionalOptions[""],e(r.cdate.prototype,{formatDate:function(t,a){return typeof t!="string"&&(a=t,t=""),this._calendar.formatDate(t||"",this,a)}}),e(r.baseCalendar.prototype,{UNIX_EPOCH:r.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:r.instance().jdEpoch,TICKS_PER_DAY:1440*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(t,a,i){if(typeof t!="string"&&(i=a,a=t,t=""),!a)return"";if(a.calendar()!==this)throw r.local.invalidFormat||r.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat,i=i||{};for(var o=i.dayNamesShort||this.local.dayNamesShort,s=i.dayNames||this.local.dayNames,l=i.monthNumbers||this.local.monthNumbers,n=i.monthNamesShort||this.local.monthNamesShort,u=i.monthNames||this.local.monthNames,c=i.calculateWeek||this.local.calculateWeek,f=function(M,C){for(var w=1;E+w1},h=function(M,C,w,k){var T=""+C;if(f(M,k))for(;T.length1},x=function(F,D){var R=v(F,D),P=[2,3,R?4:2,R?4:2,10,11,20]["oyYJ@!".indexOf(F)+1],z=new RegExp("^-?\\d{1,"+P+"}"),I=a.substring(T).match(z);if(!I)throw(r.local.missingNumberAt||r.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=I[0].length,parseInt(I[0],10)},E=this,M=function(){if(typeof u=="function"){v("m");var F=u.call(E,a.substring(T));return T+=F.length,F}return x("m")},C=function(F,D,R,P){for(var z=v(F,P)?R:D,I=0;I-1){p=1,g=m;for(var A=this.daysInMonth(d,p);g>A;A=this.daysInMonth(d,p))p++,g-=A}return h>-1?this.fromJD(h):this.newDate(d,p,g)},determineDate:function(t,a,i,o,s){i&&typeof i!="object"&&(s=o,o=i,i=null),typeof o!="string"&&(s=o,o="");var l=this,n=function(u){try{return l.parseDate(o,u,s)}catch{}u=u.toLowerCase();for(var c=(u.match(/^c/)&&i?i.newDate():null)||l.today(),f=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,h=f.exec(u);h;)c.add(parseInt(h[1],10),h[2]||"d"),h=f.exec(u);return c};return a=a?a.newDate():null,t=t==null?a:typeof t=="string"?n(t):typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?a:l.today().add(t,"d"):l.newDate(t),t}})}}),Uxe=ye({"node_modules/world-calendars/dist/calendars/chinese.js"(){var e=Wc(),r=ku(),t=e.instance();function a(h){this.local=this.regionalOptions[h||""]||this.regionalOptions[""]}a.prototype=new e.baseCalendar,r(a.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(h,d){if(typeof h=="string"){var p=h.match(o);return p?p[0]:""}var g=this._validateYear(h),m=h.month(),y=""+this.toChineseMonth(g,m);return d&&y.length<2&&(y="0"+y),this.isIntercalaryMonth(g,m)&&(y+="i"),y},monthNames:function(h){if(typeof h=="string"){var d=h.match(s);return d?d[0]:""}var p=this._validateYear(h),g=h.month(),m=this.toChineseMonth(p,g),y=["\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(p,g)&&(y="\u95F0"+y),y},monthNamesShort:function(h){if(typeof h=="string"){var d=h.match(l);return d?d[0]:""}var p=this._validateYear(h),g=h.month(),m=this.toChineseMonth(p,g),y=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][m-1];return this.isIntercalaryMonth(p,g)&&(y="\u95F0"+y),y},parseMonth:function(h,d){h=this._validateYear(h);var p=parseInt(d),g;if(isNaN(p))d[0]==="\u95F0"&&(g=!0,d=d.substring(1)),d[d.length-1]==="\u6708"&&(d=d.substring(0,d.length-1)),p=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(d);else{var m=d[d.length-1];g=m==="i"||m==="I"}var y=this.toMonthIndex(h,p,g);return y},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(h,d){if(h.year&&(h=h.year()),typeof h!="number"||h<1888||h>2111)throw d.replace(/\{0\}/,this.local.name);return h},toMonthIndex:function(h,d,p){var g=this.intercalaryMonth(h),m=p&&d!==g;if(m||d<1||d>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);var y;return g?!p&&d<=g?y=d-1:y=d:y=d-1,y},toChineseMonth:function(h,d){h.year&&(h=h.year(),d=h.month());var p=this.intercalaryMonth(h),g=p?12:11;if(d<0||d>g)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return p?d>13;return p},isIntercalaryMonth:function(h,d){h.year&&(h=h.year(),d=h.month());var p=this.intercalaryMonth(h);return!!p&&p===d},leapYear:function(h){return this.intercalaryMonth(h)!==0},weekOfYear:function(h,d,p){var g=this._validateYear(h,e.local.invalidyear),m=u[g-u[0]],y=m>>9&4095,_=m>>5&15,v=m&31,x;x=t.newDate(y,_,v),x.add(4-(x.dayOfWeek()||7),"d");var E=this.toJD(h,d,p)-x.toJD();return 1+Math.floor(E/7)},monthsInYear:function(h){return this.leapYear(h)?13:12},daysInMonth:function(h,d){h.year&&(d=h.month(),h=h.year()),h=this._validateYear(h);var p=n[h-n[0]],g=p>>13,m=g?12:11;if(d>m)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);var y=p&1<<12-d?30:29;return y},weekDay:function(h,d,p){return(this.dayOfWeek(h,d,p)||7)<6},toJD:function(h,d,p){var g=this._validate(h,y,p,e.local.invalidDate);h=this._validateYear(g.year()),d=g.month(),p=g.day();var m=this.isIntercalaryMonth(h,d),y=this.toChineseMonth(h,d),_=f(h,y,p,m);return t.toJD(_.year,_.month,_.day)},fromJD:function(h){var d=t.fromJD(h),p=c(d.year(),d.month(),d.day()),g=this.toMonthIndex(p.year,p.month,p.isIntercalary);return this.newDate(p.year,g,p.day)},fromString:function(h){var d=h.match(i),p=this._validateYear(+d[1]),g=+d[2],m=!!d[3],y=this.toMonthIndex(p,g,m),_=+d[4];return this.newDate(p,y,_)},add:function(h,d,p){var g=h.year(),m=h.month(),y=this.isIntercalaryMonth(g,m),_=this.toChineseMonth(g,m),v=Object.getPrototypeOf(a.prototype).add.call(this,h,d,p);if(p==="y"){var x=v.year(),E=v.month(),M=this.isIntercalaryMonth(x,_),C=y&&M?this.toMonthIndex(x,_,!0):this.toMonthIndex(x,_,!1);C!==E&&v.month(C)}return v}});var i=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,o=/^\d?\d[iI]?/m,s=/^闰?十?[一二三四五六七八九]?月/m,l=/^闰?十?[一二三四五六七八九]?/m;e.calendars.chinese=a;var n=[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],u=[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 c(h,d,p,g){var m,y;if(typeof h=="object")m=h,y=d||{};else{var _=typeof h=="number"&&h>=1888&&h<=2111;if(!_)throw new Error("Solar year outside range 1888-2111");var v=typeof d=="number"&&d>=1&&d<=12;if(!v)throw new Error("Solar month outside range 1 - 12");var x=typeof p=="number"&&p>=1&&p<=31;if(!x)throw new Error("Solar day outside range 1 - 31");m={year:h,month:d,day:p},y=g||{}}var E=u[m.year-u[0]],M=m.year<<9|m.month<<5|m.day;y.year=M>=E?m.year:m.year-1,E=u[y.year-u[0]];var C=E>>9&4095,w=E>>5&15,k=E&31,T,b=new Date(C,w-1,k),S=new Date(m.year,m.month-1,m.day);T=Math.round((S-b)/(24*3600*1e3));var A=n[y.year-n[0]],F;for(F=0;F<13;F++){var D=A&1<<12-F?30:29;if(T>13;return!R||F=1888&&h<=2111;if(!v)throw new Error("Lunar year outside range 1888-2111");var x=typeof d=="number"&&d>=1&&d<=12;if(!x)throw new Error("Lunar month outside range 1 - 12");var E=typeof p=="number"&&p>=1&&p<=30;if(!E)throw new Error("Lunar day outside range 1 - 30");var M;typeof g=="object"?(M=!1,y=g):(M=!!g,y=m||{}),_={year:h,month:d,day:p,isIntercalary:M}}var C;C=_.day-1;var w=n[_.year-n[0]],k=w>>13,T;k&&(_.month>k||_.isIntercalary)?T=_.month:T=_.month-1;for(var b=0;b>9&4095,D=A>>5&15,R=A&31,P=new Date(F,D-1,R+C);return y.year=P.getFullYear(),y.month=1+P.getMonth(),y.day=P.getDate(),y}}}),qxe=ye({"node_modules/world-calendars/dist/calendars/coptic.js"(){var e=Wc(),r=ku();function t(a){this.local=this.regionalOptions[a||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(o){var i=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),o=i.year()+(i.year()<0?1:0);return o%4===3||o%4===-1},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(a,i,o){var s=this.newDate(a,i,o);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(a,i){var o=this._validate(a,i,this.minDay,e.local.invalidMonth);return this.daysPerMonth[o.month()-1]+(o.month()===13&&this.leapYear(o.year())?1:0)},weekDay:function(a,i,o){return(this.dayOfWeek(a,i,o)||7)<6},toJD:function(a,i,o){var s=this._validate(a,i,o,e.local.invalidDate);return a=s.year(),a<0&&a++,s.day()+(s.month()-1)*30+(a-1)*365+Math.floor(a/4)+this.jdEpoch-1},fromJD:function(a){var i=Math.floor(a)+.5-this.jdEpoch,o=Math.floor((i-Math.floor((i+366)/1461))/365)+1;o<=0&&o--,i=Math.floor(a)+.5-this.newDate(o,1,1).toJD();var s=Math.floor(i/30)+1,l=i-(s-1)*30+1;return this.newDate(o,s,l)}}),e.calendars.coptic=t}}),Vxe=ye({"node_modules/world-calendars/dist/calendars/discworld.js"(){var e=Wc(),r=ku();function t(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(i){return this._validate(i,this.minMonth,this.minDay,e.local.invalidYear),!1},monthsInYear:function(i){return this._validate(i,this.minMonth,this.minDay,e.local.invalidYear),13},daysInYear:function(i){return this._validate(i,this.minMonth,this.minDay,e.local.invalidYear),400},weekOfYear:function(i,o,s){var l=this.newDate(i,o,s);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/8)+1},daysInMonth:function(i,o){var s=this._validate(i,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);return(l.day()+1)%8},weekDay:function(i,o,s){var l=this.dayOfWeek(i,o,s);return l>=2&&l<=6},extraInfo:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);return{century:a[Math.floor((l.year()-1)/100)+1]||""}},toJD:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);return i=l.year()+(l.year()<0?1:0),o=l.month(),s=l.day(),s+(o>1?16:0)+(o>2?(o-2)*32:0)+(i-1)*400+this.jdEpoch-1},fromJD:function(i){i=Math.floor(i+.5)-Math.floor(this.jdEpoch)-1;var o=Math.floor(i/400)+1;i-=(o-1)*400,i+=i>15?16:0;var s=Math.floor(i/32)+1,l=i-(s-1)*32+1;return this.newDate(o<=0?o-1:o,s,l)}});var a={20:"Fruitbat",21:"Anchovy"};e.calendars.discworld=t}}),Gxe=ye({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var e=Wc(),r=ku();function t(a){this.local=this.regionalOptions[a||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(o){var i=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),o=i.year()+(i.year()<0?1:0);return o%4===3||o%4===-1},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(a,i,o){var s=this.newDate(a,i,o);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(a,i){var o=this._validate(a,i,this.minDay,e.local.invalidMonth);return this.daysPerMonth[o.month()-1]+(o.month()===13&&this.leapYear(o.year())?1:0)},weekDay:function(a,i,o){return(this.dayOfWeek(a,i,o)||7)<6},toJD:function(a,i,o){var s=this._validate(a,i,o,e.local.invalidDate);return a=s.year(),a<0&&a++,s.day()+(s.month()-1)*30+(a-1)*365+Math.floor(a/4)+this.jdEpoch-1},fromJD:function(a){var i=Math.floor(a)+.5-this.jdEpoch,o=Math.floor((i-Math.floor((i+366)/1461))/365)+1;o<=0&&o--,i=Math.floor(a)+.5-this.newDate(o,1,1).toJD();var s=Math.floor(i/30)+1,l=i-(s-1)*30+1;return this.newDate(o,s,l)}}),e.calendars.ethiopian=t}}),Hxe=ye({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var e=Wc(),r=ku();function t(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(i){var o=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(o.year())},_leapYear:function(i){return i=i<0?i+1:i,a(i*7+1,19)<7},monthsInYear:function(i){return this._validate(i,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(i.year?i.year():i)?13:12},weekOfYear:function(i,o,s){var l=this.newDate(i,o,s);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(i){var o=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear);return i=o.year(),this.toJD(i===-1?1:i+1,7,1)-this.toJD(i,7,1)},daysInMonth:function(i,o){return i.year&&(o=i.month(),i=i.year()),this._validate(i,o,this.minDay,e.local.invalidMonth),o===12&&this.leapYear(i)||o===8&&a(this.daysInYear(i),10)===5?30:o===9&&a(this.daysInYear(i),10)===3?29:this.daysPerMonth[o-1]},weekDay:function(i,o,s){return this.dayOfWeek(i,o,s)!==6},extraInfo:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);return{yearType:(this.leapYear(l)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(l)%10-3]}},toJD:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);i=l.year(),o=l.month(),s=l.day();var n=i<=0?i+1:i,u=this.jdEpoch+this._delay1(n)+this._delay2(n)+s+1;if(o<7){for(var c=7;c<=this.monthsInYear(i);c++)u+=this.daysInMonth(i,c);for(var c=1;c=this.toJD(o===-1?1:o+1,7,1);)o++;for(var s=ithis.toJD(o,s,this.daysInMonth(o,s));)s++;var l=i-this.toJD(o,s,1)+1;return this.newDate(o,s,l)}});function a(i,o){return i-o*Math.floor(i/o)}e.calendars.hebrew=t}}),Wxe=ye({"node_modules/world-calendars/dist/calendars/islamic.js"(){var e=Wc(),r=ku();function t(a){this.local=this.regionalOptions[a||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(a){var i=this._validate(a,this.minMonth,this.minDay,e.local.invalidYear);return(i.year()*11+14)%30<11},weekOfYear:function(a,i,o){var s=this.newDate(a,i,o);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInYear:function(a){return this.leapYear(a)?355:354},daysInMonth:function(a,i){var o=this._validate(a,i,this.minDay,e.local.invalidMonth);return this.daysPerMonth[o.month()-1]+(o.month()===12&&this.leapYear(o.year())?1:0)},weekDay:function(a,i,o){return this.dayOfWeek(a,i,o)!==5},toJD:function(a,i,o){var s=this._validate(a,i,o,e.local.invalidDate);return a=s.year(),i=s.month(),o=s.day(),a=a<=0?a+1:a,o+Math.ceil(29.5*(i-1))+(a-1)*354+Math.floor((3+11*a)/30)+this.jdEpoch-1},fromJD:function(a){a=Math.floor(a)+.5;var i=Math.floor((30*(a-this.jdEpoch)+10646)/10631);i=i<=0?i-1:i;var o=Math.min(12,Math.ceil((a-29-this.toJD(i,1,1))/29.5)+1),s=a-this.toJD(i,o,1)+1;return this.newDate(i,o,s)}}),e.calendars.islamic=t}}),$xe=ye({"node_modules/world-calendars/dist/calendars/julian.js"(){var e=Wc(),r=ku();function t(a){this.local=this.regionalOptions[a||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(o){var i=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),o=i.year()<0?i.year()+1:i.year();return o%4===0},weekOfYear:function(a,i,o){var s=this.newDate(a,i,o);return s.add(4-(s.dayOfWeek()||7),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(a,i){var o=this._validate(a,i,this.minDay,e.local.invalidMonth);return this.daysPerMonth[o.month()-1]+(o.month()===2&&this.leapYear(o.year())?1:0)},weekDay:function(a,i,o){return(this.dayOfWeek(a,i,o)||7)<6},toJD:function(a,i,o){var s=this._validate(a,i,o,e.local.invalidDate);return a=s.year(),i=s.month(),o=s.day(),a<0&&a++,i<=2&&(a--,i+=12),Math.floor(365.25*(a+4716))+Math.floor(30.6001*(i+1))+o-1524.5},fromJD:function(a){var i=Math.floor(a+.5),o=i+1524,s=Math.floor((o-122.1)/365.25),l=Math.floor(365.25*s),n=Math.floor((o-l)/30.6001),u=n-Math.floor(n<14?1:13),c=s-Math.floor(u>2?4716:4715),f=o-l-Math.floor(30.6001*n);return c<=0&&c--,this.newDate(c,u,f)}}),e.calendars.julian=t}}),Yxe=ye({"node_modules/world-calendars/dist/calendars/mayan.js"(){var e=Wc(),r=ku();function t(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(o){return this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),!1},formatYear:function(o){var s=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear);o=s.year();var l=Math.floor(o/400);o=o%400,o+=o<0?400:0;var n=Math.floor(o/20);return l+"."+n+"."+o%20},forYear:function(o){if(o=o.split("."),o.length<3)throw"Invalid Mayan year";for(var s=0,l=0;l19||l>0&&n<0)throw"Invalid Mayan year";s=s*20+n}return s},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(o,s,l){return this._validate(o,s,l,e.local.invalidDate),0},daysInYear:function(o){return this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(o,s){return this._validate(o,s,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(o,s,l){var n=this._validate(o,s,l,e.local.invalidDate);return n.day()},weekDay:function(o,s,l){return this._validate(o,s,l,e.local.invalidDate),!0},extraInfo:function(o,s,l){var n=this._validate(o,s,l,e.local.invalidDate),u=n.toJD(),c=this._toHaab(u),f=this._toTzolkin(u);return{haabMonthName:this.local.haabMonths[c[0]-1],haabMonth:c[0],haabDay:c[1],tzolkinDayName:this.local.tzolkinMonths[f[0]-1],tzolkinDay:f[0],tzolkinTrecena:f[1]}},_toHaab:function(o){o-=this.jdEpoch;var s=a(o+8+340,365);return[Math.floor(s/20)+1,a(s,20)]},_toTzolkin:function(o){return o-=this.jdEpoch,[i(o+20,20),i(o+4,13)]},toJD:function(o,s,l){var n=this._validate(o,s,l,e.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(o){o=Math.floor(o)+.5-this.jdEpoch;var s=Math.floor(o/360);o=o%360,o+=o<0?360:0;var l=Math.floor(o/20),n=o%20;return this.newDate(s,l,n)}});function a(o,s){return o-s*Math.floor(o/s)}function i(o,s){return a(o-1,s)+1}e.calendars.mayan=t}}),Xxe=ye({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var e=Wc(),r=ku();function t(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar;var a=e.instance("gregorian");r(t.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(i){var o=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear);return a.leapYear(o.year()+(o.year()<1?1:0)+1469)},weekOfYear:function(i,o,s){var l=this.newDate(i,o,s);return l.add(1-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(i,o){var s=this._validate(i,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(i,o,s){return(this.dayOfWeek(i,o,s)||7)<6},toJD:function(n,o,s){var l=this._validate(n,o,s,e.local.invalidMonth),n=l.year();n<0&&n++;for(var u=l.day(),c=1;c=this.toJD(o+1,1,1);)o++;for(var s=i-Math.floor(this.toJD(o,1,1)+.5)+1,l=1;s>this.daysInMonth(o,l);)s-=this.daysInMonth(o,l),l++;return this.newDate(o,l,s)}}),e.calendars.nanakshahi=t}}),Zxe=ye({"node_modules/world-calendars/dist/calendars/nepali.js"(){var e=Wc(),r=ku();function t(a){this.local=this.regionalOptions[a||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(a){return this.daysInYear(a)!==this.daysPerYear},weekOfYear:function(a,i,o){var s=this.newDate(a,i,o);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInYear:function(a){var i=this._validate(a,this.minMonth,this.minDay,e.local.invalidYear);if(a=i.year(),typeof this.NEPALI_CALENDAR_DATA[a]>"u")return this.daysPerYear;for(var o=0,s=this.minMonth;s<=12;s++)o+=this.NEPALI_CALENDAR_DATA[a][s];return o},daysInMonth:function(a,i){return a.year&&(i=a.month(),a=a.year()),this._validate(a,i,this.minDay,e.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[a]>"u"?this.daysPerMonth[i-1]:this.NEPALI_CALENDAR_DATA[a][i]},weekDay:function(a,i,o){return this.dayOfWeek(a,i,o)!==6},toJD:function(a,i,o){var s=this._validate(a,i,o,e.local.invalidDate);a=s.year(),i=s.month(),o=s.day();var l=e.instance(),n=0,u=i,c=a;this._createMissingCalendarData(a);var f=a-(u>9||u===9&&o>=this.NEPALI_CALENDAR_DATA[c][0]?56:57);for(i!==9&&(n=o,u--);u!==9;)u<=0&&(u=12,c--),n+=this.NEPALI_CALENDAR_DATA[c][u],u--;return i===9?(n+=o-this.NEPALI_CALENDAR_DATA[c][0],n<0&&(n+=l.daysInYear(f))):n+=this.NEPALI_CALENDAR_DATA[c][9]-this.NEPALI_CALENDAR_DATA[c][0],l.newDate(f,1,1).add(n,"d").toJD()},fromJD:function(a){var i=e.instance(),o=i.fromJD(a),s=o.year(),l=o.dayOfYear(),n=s+56;this._createMissingCalendarData(n);for(var u=9,c=this.NEPALI_CALENDAR_DATA[n][0],f=this.NEPALI_CALENDAR_DATA[n][u]-c+1;l>f;)u++,u>12&&(u=1,n++),f+=this.NEPALI_CALENDAR_DATA[n][u];var h=this.NEPALI_CALENDAR_DATA[n][u]-(f-l);return this.newDate(n,u,h)},_createMissingCalendarData:function(a){var i=this.daysPerMonth.slice(0);i.unshift(17);for(var o=a-1;o"u"&&(this.NEPALI_CALENDAR_DATA[o]=i)},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]}}),e.calendars.nepali=t}}),Kxe=ye({"node_modules/world-calendars/dist/calendars/persian.js"(){var e=Wc(),r=ku();function t(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}function a(i){var o=i-475;i<0&&o++;var s=.242197,l=s*o,n=s*(o+1),u=l-Math.floor(l),c=n-Math.floor(n);return u>c}t.prototype=new e.baseCalendar,r(t.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(i){var o=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear);return a(o.year())},weekOfYear:function(i,o,s){var l=this.newDate(i,o,s);return l.add(-((l.dayOfWeek()+1)%7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(i,o){var s=this._validate(i,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(i,o,s){return this.dayOfWeek(i,o,s)!==5},toJD:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate);i=l.year(),o=l.month(),s=l.day();var n=0;if(i>0)for(var u=1;u0?i-1:i)*365+n+this.jdEpoch-1},fromJD:function(i){i=Math.floor(i)+.5;var o=475+(i-this.toJD(475,1,1))/365.242197,s=Math.floor(o);s<=0&&s--,i>this.toJD(s,12,a(s)?30:29)&&(s++,s===0&&s++);var l=i-this.toJD(s,1,1)+1,n=l<=186?Math.ceil(l/31):Math.ceil((l-6)/30),u=i-this.toJD(s,n,1)+1;return this.newDate(s,n,u)}}),e.calendars.persian=t,e.calendars.jalali=t}}),Jxe=ye({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var e=Wc(),r=ku(),t=e.instance();function a(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}a.prototype=new e.baseCalendar,r(a.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(s){var o=this._validate(s,this.minMonth,this.minDay,e.local.invalidYear),s=this._t2gYear(o.year());return t.leapYear(s)},weekOfYear:function(n,o,s){var l=this._validate(n,this.minMonth,this.minDay,e.local.invalidYear),n=this._t2gYear(l.year());return t.weekOfYear(n,l.month(),l.day())},daysInMonth:function(i,o){var s=this._validate(i,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(i,o,s){return(this.dayOfWeek(i,o,s)||7)<6},toJD:function(n,o,s){var l=this._validate(n,o,s,e.local.invalidDate),n=this._t2gYear(l.year());return t.toJD(n,l.month(),l.day())},fromJD:function(i){var o=t.fromJD(i),s=this._g2tYear(o.year());return this.newDate(s,o.month(),o.day())},_t2gYear:function(i){return i+this.yearsOffset+(i>=-this.yearsOffset&&i<=-1?1:0)},_g2tYear:function(i){return i-this.yearsOffset-(i>=1&&i<=this.yearsOffset?1:0)}}),e.calendars.taiwan=a}}),Qxe=ye({"node_modules/world-calendars/dist/calendars/thai.js"(){var e=Wc(),r=ku(),t=e.instance();function a(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}a.prototype=new e.baseCalendar,r(a.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(s){var o=this._validate(s,this.minMonth,this.minDay,e.local.invalidYear),s=this._t2gYear(o.year());return t.leapYear(s)},weekOfYear:function(n,o,s){var l=this._validate(n,this.minMonth,this.minDay,e.local.invalidYear),n=this._t2gYear(l.year());return t.weekOfYear(n,l.month(),l.day())},daysInMonth:function(i,o){var s=this._validate(i,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(i,o,s){return(this.dayOfWeek(i,o,s)||7)<6},toJD:function(n,o,s){var l=this._validate(n,o,s,e.local.invalidDate),n=this._t2gYear(l.year());return t.toJD(n,l.month(),l.day())},fromJD:function(i){var o=t.fromJD(i),s=this._g2tYear(o.year());return this.newDate(s,o.month(),o.day())},_t2gYear:function(i){return i-this.yearsOffset-(i>=1&&i<=this.yearsOffset?1:0)},_g2tYear:function(i){return i+this.yearsOffset+(i>=-this.yearsOffset&&i<=-1?1:0)}}),e.calendars.thai=a}}),ebe=ye({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var e=Wc(),r=ku();function t(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}t.prototype=new e.baseCalendar,r(t.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(i){var o=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear);return this.daysInYear(o.year())===355},weekOfYear:function(i,o,s){var l=this.newDate(i,o,s);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(i){for(var o=0,s=1;s<=12;s++)o+=this.daysInMonth(i,s);return o},daysInMonth:function(i,o){for(var s=this._validate(i,o,this.minDay,e.local.invalidMonth),l=s.toJD()-24e5+.5,n=0,u=0;ul)return a[n]-a[n-1];n++}return 30},weekDay:function(i,o,s){return this.dayOfWeek(i,o,s)!==5},toJD:function(i,o,s){var l=this._validate(i,o,s,e.local.invalidDate),n=12*(l.year()-1)+l.month()-15292,u=l.day()+a[n-1]-1;return u+24e5-.5},fromJD:function(i){for(var o=i-24e5+.5,s=0,l=0;lo);l++)s++;var n=s+15292,u=Math.floor((n-1)/12),c=u+1,f=n-12*u,h=o-a[s-1]+1;return this.newDate(c,f,h)},isValid:function(i,o,s){var l=e.baseCalendar.prototype.isValid.apply(this,arguments);return l&&(i=i.year!=null?i.year:i,l=i>=1276&&i<=1500),l},_validate:function(i,o,s,l){var n=e.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw l.replace(/\{0\}/,this.local.name);return n}}),e.calendars.ummalqura=t;var a=[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]}}),tbe=ye({"src/components/calendars/calendars.js"(e,r){"use strict";r.exports=Wc(),jxe(),Uxe(),qxe(),Vxe(),Gxe(),Hxe(),Wxe(),$xe(),Yxe(),Xxe(),Zxe(),Kxe(),Jxe(),Qxe(),ebe()}}),rbe=ye({"src/components/calendars/index.js"(e,r){"use strict";var t=tbe(),a=Yt(),i=Vn(),o=i.EPOCHJD,s=i.ONEDAY,l={valType:"enumerated",values:a.sortObjectKeys(t.calendars),editType:"calc",dflt:"gregorian"},n=function(w,k,T,b){var S={};return S[T]=l,a.coerce(w,k,S,T,b)},u=function(w,k,T,b){for(var S=0;S0){if(++ne>=H2e)return arguments[0]}else ne=0;return Q.apply(void 0,arguments)}}var C4=Y2e;var X2e=C4(w4),D4=X2e;var Z2e=/\{\n\/\* \[wrapped with (.+)\] \*/,K2e=/,? & /;function J2e(Q){var ne=Q.match(Z2e);return ne?ne[1].split(K2e):[]}var aH=J2e;var Q2e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function ewe(Q,ne){var ge=ne.length;if(!ge)return Q;var je=ge-1;return ne[je]=(ge>1?"& ":"")+ne[je],ne=ne.join(ge>2?", ":" "),Q.replace(Q2e,`{ +/* [wrapped with `+ne+`] */ +`)}var iH=ewe;function twe(Q){return function(){return Q}}var fg=twe;var rwe=(function(){try{var Q=oh(Object,"defineProperty");return Q({},"",{}),Q}catch{}})(),hg=rwe;var awe=hg?function(Q,ne){return hg(Q,"toString",{configurable:!0,enumerable:!1,value:fg(ne),writable:!0})}:Ss,nH=awe;var iwe=C4(nH),dg=iwe;function nwe(Q,ne){for(var ge=-1,je=Q==null?0:Q.length;++ge-1}var K0=cwe;var fwe=1,hwe=2,dwe=8,pwe=16,vwe=32,mwe=64,gwe=128,ywe=256,_we=512,xwe=[["ary",gwe],["bind",fwe],["bindKey",hwe],["curry",dwe],["curryRight",pwe],["flip",_we],["partial",vwe],["partialRight",mwe],["rearg",ywe]];function bwe(Q,ne){return ou(xwe,function(ge){var je="_."+ge[0];ne&ge[1]&&!K0(Q,je)&&Q.push(je)}),Q.sort()}var sH=bwe;function wwe(Q,ne,ge){var je=ne+"";return dg(Q,iH(je,sH(aH(je),ge)))}var F4=wwe;var Awe=1,Twe=2,Mwe=4,Ewe=8,lH=32,uH=64;function Swe(Q,ne,ge,je,pt,Lt,rr,Ar,Tr,Sa){var ya=ne&Ewe,Fa=ya?rr:void 0,Ii=ya?void 0:rr,vn=ya?Lt:void 0,ja=ya?void 0:Lt;ne|=ya?lH:uH,ne&=~(ya?uH:lH),ne&Mwe||(ne&=~(Awe|Twe));var Ci=[Q,ne,pt,vn,Fa,ja,Ii,Ar,Tr,Sa],Rn=ge.apply(void 0,Ci);return vx(Q)&&D4(Rn,Ci),Rn.placeholder=je,F4(Rn,Q,ne)}var P4=Swe;function kwe(Q){var ne=Q;return ne.placeholder}var md=kwe;var Cwe=9007199254740991,Dwe=/^(?:0|[1-9]\d*)$/;function Lwe(Q,ne){var ge=typeof Q;return ne=ne??Cwe,!!ne&&(ge=="number"||ge!="symbol"&&Dwe.test(Q))&&Q>-1&&Q%1==0&&Q1&&ye.reverse(),ya&&Tr-1&&Q%1==0&&Q<=s3e}var J0=l3e;function u3e(Q){return Q!=null&&J0(Q.length)&&!fc(Q)}var Is=u3e;function c3e(Q,ne,ge){if(!po(ge))return!1;var je=typeof ne;return(je=="number"?Is(ge)&&hc(ne,ge.length):je=="string"&&ne in ge)?Hl(ge[ne],Q):!1}var ks=c3e;function f3e(Q){return Oi(function(ne,ge){var je=-1,pt=ge.length,Lt=pt>1?ge[pt-1]:void 0,rr=pt>2?ge[2]:void 0;for(Lt=Q.length>3&&typeof Lt=="function"?(pt--,Lt):void 0,rr&&ks(ge[0],ge[1],rr)&&(Lt=pt<3?void 0:Lt,pt=1),ne=Object(ne);++je-1}var qH=j4e;function U4e(Q,ne){var ge=this.__data__,je=Q0(ge,Q);return je<0?(++this.size,ge.push([Q,ne])):ge[je][1]=ne,this}var VH=U4e;function xg(Q){var ne=-1,ge=Q==null?0:Q.length;for(this.clear();++ne0&&ge(Ar)?ne>1?QH(Ar,ne-1,ge,je,pt):vf(pt,Ar):je||(pt[pt.length]=Ar)}return pt}var ls=QH;function f6e(Q){var ne=Q==null?0:Q.length;return ne?ls(Q,1):[]}var j4=f6e;function h6e(Q){return dg(R4(Q,void 0,j4),Q+"")}var vc=h6e;var d6e=vc(Ag),eW=d6e;var p6e=B4(Object.getPrototypeOf,Object),av=p6e;var v6e="[object Object]",m6e=Function.prototype,g6e=Object.prototype,tW=m6e.toString,y6e=g6e.hasOwnProperty,_6e=tW.call(Object);function x6e(Q){if(!wo(Q)||Es(Q)!=v6e)return!1;var ne=av(Q);if(ne===null)return!0;var ge=y6e.call(ne,"constructor")&&ne.constructor;return typeof ge=="function"&&ge instanceof ge&&tW.call(ge)==_6e}var Pp=x6e;var b6e="[object DOMException]",w6e="[object Error]";function A6e(Q){if(!wo(Q))return!1;var ne=Es(Q);return ne==w6e||ne==b6e||typeof Q.message=="string"&&typeof Q.name=="string"&&!Pp(Q)}var Tg=A6e;var T6e=Oi(function(Q,ne){try{return ul(Q,void 0,ne)}catch(ge){return Tg(ge)?ge:new Error(ge)}}),U4=T6e;var M6e="Expected a function";function E6e(Q,ne){var ge;if(typeof ne!="function")throw new TypeError(M6e);return Q=Bi(Q),function(){return--Q>0&&(ge=ne.apply(this,arguments)),Q<=1&&(ne=void 0),ge}}var q4=E6e;var S6e=1,k6e=32,eD=Oi(function(Q,ne,ge){var je=S6e;if(ge.length){var pt=If(ge,md(eD));je|=k6e}return dc(Q,je,ne,ge,pt)});eD.placeholder={};var V4=eD;var C6e=vc(function(Q,ne){return ou(ne,function(ge){ge=su(ge),Au(Q,ge,V4(Q[ge],Q))}),Q}),rW=C6e;var D6e=1,L6e=2,F6e=32,tD=Oi(function(Q,ne,ge){var je=D6e|L6e;if(ge.length){var pt=If(ge,md(tD));je|=F6e}return dc(ne,je,Q,ge,pt)});tD.placeholder={};var aW=tD;function P6e(Q,ne,ge){var je=-1,pt=Q.length;ne<0&&(ne=-ne>pt?0:pt+ne),ge=ge>pt?pt:ge,ge<0&&(ge+=pt),pt=ne>ge?0:ge-ne>>>0,ne>>>=0;for(var Lt=Array(pt);++je=je?Q:Pl(Q,ne,ge)}var mf=I6e;var R6e="\\ud800-\\udfff",z6e="\\u0300-\\u036f",B6e="\\ufe20-\\ufe2f",O6e="\\u20d0-\\u20ff",N6e=z6e+B6e+O6e,j6e="\\ufe0e\\ufe0f",U6e="\\u200d",q6e=RegExp("["+U6e+R6e+N6e+j6e+"]");function V6e(Q){return q6e.test(Q)}var _d=V6e;function G6e(Q){return Q.split("")}var iW=G6e;var nW="\\ud800-\\udfff",H6e="\\u0300-\\u036f",W6e="\\ufe20-\\ufe2f",$6e="\\u20d0-\\u20ff",Y6e=H6e+W6e+$6e,X6e="\\ufe0e\\ufe0f",Z6e="["+nW+"]",rD="["+Y6e+"]",aD="\\ud83c[\\udffb-\\udfff]",K6e="(?:"+rD+"|"+aD+")",oW="[^"+nW+"]",sW="(?:\\ud83c[\\udde6-\\uddff]){2}",lW="[\\ud800-\\udbff][\\udc00-\\udfff]",J6e="\\u200d",uW=K6e+"?",cW="["+X6e+"]?",Q6e="(?:"+J6e+"(?:"+[oW,sW,lW].join("|")+")"+cW+uW+")*",eAe=cW+uW+Q6e,tAe="(?:"+[oW+rD+"?",rD,sW,lW,Z6e].join("|")+")",rAe=RegExp(aD+"(?="+aD+")|"+tAe+eAe,"g");function aAe(Q){return Q.match(rAe)||[]}var fW=aAe;function iAe(Q){return _d(Q)?fW(Q):iW(Q)}var Nu=iAe;function nAe(Q){return function(ne){ne=En(ne);var ge=_d(ne)?Nu(ne):void 0,je=ge?ge[0]:ne.charAt(0),pt=ge?mf(ge,1).join(""):ne.slice(1);return je[Q]()+pt}}var G4=nAe;var oAe=G4("toUpperCase"),Mg=oAe;function sAe(Q){return Mg(En(Q).toLowerCase())}var H4=sAe;function lAe(Q,ne,ge,je){var pt=-1,Lt=Q==null?0:Q.length;for(je&&Lt&&(ge=Q[++pt]);++pt=ne?Q:ne)),Q}var lh=sTe;function lTe(Q,ne,ge){return ge===void 0&&(ge=ne,ne=void 0),ge!==void 0&&(ge=wu(ge),ge=ge===ge?ge:0),ne!==void 0&&(ne=wu(ne),ne=ne===ne?ne:0),lh(wu(Q),ne,ge)}var BW=lTe;function uTe(){this.__data__=new ev,this.size=0}var OW=uTe;function cTe(Q){var ne=this.__data__,ge=ne.delete(Q);return this.size=ne.size,ge}var NW=cTe;function fTe(Q){return this.__data__.get(Q)}var jW=fTe;function hTe(Q){return this.__data__.has(Q)}var UW=hTe;var dTe=200;function pTe(Q,ne){var ge=this.__data__;if(ge instanceof ev){var je=ge.__data__;if(!tv||je.lengthAr))return!1;var Sa=Lt.get(Q),ya=Lt.get(ne);if(Sa&&ya)return Sa==ne&&ya==Q;var Fa=-1,Ii=!0,vn=ge&pEe?new nv:void 0;for(Lt.set(Q,ne),Lt.set(ne,Q);++Fa=ne||yi<0||Fa&&Ed>=Lt}function Si(){var On=Vg();if(Rn(On))return ye(On);Ar=setTimeout(Si,Ci(On))}function ye(On){return Ar=void 0,Ii&&je?vn(On):(je=pt=void 0,rr)}function rl(){Ar!==void 0&&clearTimeout(Ar),Sa=0,je=Tr=pt=Ar=void 0}function Vu(){return Ar===void 0?rr:ye(Vg())}function Vs(){var On=Vg(),yi=Rn(On);if(je=arguments,pt=this,Tr=On,yi){if(Ar===void 0)return ja(Tr);if(Fa)return clearTimeout(Ar),Ar=setTimeout(Si,ne),vn(Tr)}return Ar===void 0&&(Ar=setTimeout(Si,ne)),rr}return Vs.cancel=rl,Vs.flush=Vu,Vs}var y6=SSe;function kSe(Q,ne){return Q==null||Q!==Q?ne:Q}var H$=kSe;var W$=Object.prototype,CSe=W$.hasOwnProperty,DSe=Oi(function(Q,ne){Q=Object(Q);var ge=-1,je=ne.length,pt=je>2?ne[2]:void 0;for(pt&&ks(ne[0],ne[1],pt)&&(je=1);++ge=VSe&&(Lt=n0,rr=!1,ne=new nv(ne));e:for(;++pt=0&&Q.slice(ge,pt)==ne}var cY=lke;function uke(Q,ne){return co(ne,function(ge){return[ge,Q[ge]]})}var fY=uke;function cke(Q){var ne=-1,ge=Array(Q.size);return Q.forEach(function(je){ge[++ne]=[je,je]}),ge}var hY=cke;var fke="[object Map]",hke="[object Set]";function dke(Q){return function(ne){var ge=ju(ne);return ge==fke?Bg(ne):ge==hke?hY(ne):fY(ne,Q(ne))}}var T6=dke;var pke=T6(jo),Ex=pke;var vke=T6(Rs),Sx=vke;var mke={"&":"&","<":"<",">":">",'"':""","'":"'"},gke=Sg(mke),dY=gke;var pY=/[&<>"']/g,yke=RegExp(pY.source);function _ke(Q){return Q=En(Q),Q&&yke.test(Q)?Q.replace(pY,dY):Q}var M6=_ke;var vY=/[\\^$.*+?()[\]{}|]/g,xke=RegExp(vY.source);function bke(Q){return Q=En(Q),Q&&xke.test(Q)?Q.replace(vY,"\\$&"):Q}var mY=bke;function wke(Q,ne){for(var ge=-1,je=Q==null?0:Q.length;++gept?0:pt+ge),je=je===void 0||je>pt?pt:Bi(je),je<0&&(je+=pt),je=ge>je?0:S6(je);ge-1?pt[Lt?ne[rr]:rr]:void 0}}var C6=Lke;var Fke=Math.max;function Pke(Q,ne,ge){var je=Q==null?0:Q.length;if(!je)return-1;var pt=ge==null?0:Bi(ge);return pt<0&&(pt=Fke(je+pt,0)),Z0(Q,vi(ne,3),pt)}var D6=Pke;var Ike=C6(D6),wY=Ike;function Rke(Q,ne,ge){var je;return ge(Q,function(pt,Lt,rr){if(ne(pt,Lt,rr))return je=Lt,!1}),je}var L6=Rke;function zke(Q,ne){return L6(Q,vi(ne,3),gc)}var AY=zke;var Bke=Math.max,Oke=Math.min;function Nke(Q,ne,ge){var je=Q==null?0:Q.length;if(!je)return-1;var pt=je-1;return ge!==void 0&&(pt=Bi(ge),pt=ge<0?Bke(je+pt,0):Oke(pt,je-1)),Z0(Q,vi(ne,3),pt,!0)}var F6=Nke;var jke=C6(F6),TY=jke;function Uke(Q,ne){return L6(Q,vi(ne,3),Wg)}var MY=Uke;function qke(Q){return Q&&Q.length?Q[0]:void 0}var kx=qke;function Vke(Q,ne){var ge=-1,je=Is(Q)?Array(Q.length):[];return yf(Q,function(pt,Lt,rr){je[++ge]=ne(pt,Lt,rr)}),je}var P6=Vke;function Gke(Q,ne){var ge=Ei(Q)?co:P6;return ge(Q,vi(ne,3))}var cv=Gke;function Hke(Q,ne){return ls(cv(Q,ne),1)}var EY=Hke;var Wke=1/0;function $ke(Q,ne){return ls(cv(Q,ne),Wke)}var SY=$ke;function Yke(Q,ne,ge){return ge=ge===void 0?1:Bi(ge),ls(cv(Q,ne),ge)}var kY=Yke;var Xke=1/0;function Zke(Q){var ne=Q==null?0:Q.length;return ne?ls(Q,Xke):[]}var CY=Zke;function Kke(Q,ne){var ge=Q==null?0:Q.length;return ge?(ne=ne===void 0?1:Bi(ne),ls(Q,ne)):[]}var DY=Kke;var Jke=512;function Qke(Q){return dc(Q,Jke)}var LY=Qke;var eCe=Cg("floor"),FY=eCe;var tCe="Expected a function",rCe=8,aCe=32,iCe=128,nCe=256;function oCe(Q){return vc(function(ne){var ge=ne.length,je=ge,pt=df.prototype.thru;for(Q&&ne.reverse();je--;){var Lt=ne[je];if(typeof Lt!="function")throw new TypeError(tCe);if(pt&&!rr&&cg(Lt)=="wrapper")var rr=new df([],!0)}for(je=rr?je:ge;++jene}var $g=xCe;function bCe(Q){return function(ne,ge){return typeof ne=="string"&&typeof ge=="string"||(ne=wu(ne),ge=wu(ge)),Q(ne,ge)}}var hv=bCe;var wCe=hv($g),VY=wCe;var ACe=hv(function(Q,ne){return Q>=ne}),GY=ACe;var TCe=Object.prototype,MCe=TCe.hasOwnProperty;function ECe(Q,ne){return Q!=null&&MCe.call(Q,ne)}var HY=ECe;function SCe(Q,ne){return Q!=null&&h6(Q,ne,HY)}var WY=SCe;var kCe=Math.max,CCe=Math.min;function DCe(Q,ne,ge){return Q>=CCe(ne,ge)&&Q-1:!!pt&&vd(Q,ne,ge)>-1}var XY=BCe;var OCe=Math.max;function NCe(Q,ne,ge){var je=Q==null?0:Q.length;if(!je)return-1;var pt=ge==null?0:Bi(ge);return pt<0&&(pt=OCe(je+pt,0)),vd(Q,ne,pt)}var ZY=NCe;function jCe(Q){var ne=Q==null?0:Q.length;return ne?Pl(Q,0,-1):[]}var KY=jCe;var UCe=Math.min;function qCe(Q,ne,ge){for(var je=ge?Hg:K0,pt=Q[0].length,Lt=Q.length,rr=Lt,Ar=Array(Lt),Tr=1/0,Sa=[];rr--;){var ya=Q[rr];rr&&ne&&(ya=co(ya,fl(ne))),Tr=UCe(ya.length,Tr),Ar[rr]=!ge&&(ne||pt>=120&&ya.length>=120)?new nv(rr&&ya):void 0}ya=Q[0];var Fa=-1,Ii=Ar[0];e:for(;++Fa=-kX&&Q<=kX}var CX=B7e;function O7e(Q){return Q===void 0}var DX=O7e;var N7e="[object WeakMap]";function j7e(Q){return wo(Q)&&ju(Q)==N7e}var LX=j7e;var U7e="[object WeakSet]";function q7e(Q){return wo(Q)&&Es(Q)==U7e}var FX=q7e;var V7e=1;function G7e(Q){return vi(typeof Q=="function"?Q:mc(Q,V7e))}var PX=G7e;var H7e=Array.prototype,W7e=H7e.join;function $7e(Q,ne){return Q==null?"":W7e.call(Q,ne)}var IX=$7e;var Y7e=xd(function(Q,ne,ge){return Q+(ge?"-":"")+ne.toLowerCase()}),RX=Y7e;var X7e=lv(function(Q,ne,ge){Au(Q,ge,ne)}),zX=X7e;function Z7e(Q,ne,ge){for(var je=ge+1;je--;)if(Q[je]===ne)return je;return je}var BX=Z7e;var K7e=Math.max,J7e=Math.min;function Q7e(Q,ne,ge){var je=Q==null?0:Q.length;if(!je)return-1;var pt=je;return ge!==void 0&&(pt=Bi(ge),pt=pt<0?K7e(je+pt,0):J7e(pt,je-1)),ne===ne?BX(Q,ne,pt):Z0(Q,L4,pt,!0)}var OX=Q7e;var eDe=xd(function(Q,ne,ge){return Q+(ge?" ":"")+ne.toLowerCase()}),NX=eDe;var tDe=G4("toLowerCase"),jX=tDe;function rDe(Q,ne){return Q=this.__values__.length,ne=Q?void 0:this.__values__[this.__index__++];return{done:Q,value:ne}}var iZ=FDe;function PDe(Q,ne){var ge=Q.length;if(ge)return ne+=ne<0?ge:0,hc(ne,ge)?Q[ne]:void 0}var q6=PDe;function IDe(Q,ne){return Q&&Q.length?q6(Q,Bi(ne)):void 0}var nZ=IDe;function RDe(Q){return Q=Bi(Q),Oi(function(ne){return q6(ne,Q)})}var oZ=RDe;var zDe=Object.prototype,BDe=zDe.hasOwnProperty;function ODe(Q,ne){ne=pf(ne,Q);var ge=-1,je=ne.length;if(!je)return!0;for(;++ge1),Lt}),Tu(Q,Pg(Q),ge),je&&(ge=mc(ge,jDe|UDe|qDe,sZ));for(var pt=ne.length;pt--;)ey(ge,ne[pt]);return ge}),lZ=VDe;function GDe(Q,ne,ge,je){if(!po(Q))return Q;ne=pf(ne,Q);for(var pt=-1,Lt=ne.length,rr=Lt-1,Ar=Q;Ar!=null&&++ptne||Lt&&rr&&Tr&&!Ar&&!Sa||je&&rr&&Tr||!ge&&Tr||!pt)return 1;if(!je&&!Lt&&!Sa&&Q=Ar)return Tr;var Sa=ge[je];return Tr*(Sa=="desc"?-1:1)}}return Q.index-ne.index}var hZ=KDe;function JDe(Q,ne,ge){ne.length?ne=co(ne,function(Lt){return Ei(Lt)?function(rr){return sh(rr,Lt.length===1?Lt[0]:Lt)}:Lt}):ne=[Ss];var je=-1;ne=co(ne,fl(vi));var pt=P6(Q,function(Lt,rr,Ar){var Tr=co(ne,function(Sa){return Sa(Lt)});return{criteria:Tr,index:++je,value:Lt}});return fZ(pt,function(Lt,rr){return hZ(Lt,rr,ge)})}var W6=JDe;function QDe(Q,ne,ge,je){return Q==null?[]:(Ei(ne)||(ne=ne==null?[]:[ne]),ge=je?void 0:ge,Ei(ge)||(ge=ge==null?[]:[ge]),W6(Q,ne,ge))}var dZ=QDe;function e9e(Q){return vc(function(ne){return ne=co(ne,fl(vi)),Oi(function(ge){var je=this;return Q(ne,function(pt){return ul(pt,je,ge)})})})}var ty=e9e;var t9e=ty(co),pZ=t9e;var r9e=Oi,vZ=r9e;var a9e=Math.min,i9e=vZ(function(Q,ne){ne=ne.length==1&&Ei(ne[0])?co(ne[0],fl(vi)):co(ls(ne,1),fl(vi));var ge=ne.length;return Oi(function(je){for(var pt=-1,Lt=a9e(je.length,ge);++pts9e)return ge;do ne%2&&(ge+=Q),ne=l9e(ne/2),ne&&(Q+=Q);while(ne);return ge}var Cx=u9e;var c9e=Ug("length"),_Z=c9e;var bZ="\\ud800-\\udfff",f9e="\\u0300-\\u036f",h9e="\\ufe20-\\ufe2f",d9e="\\u20d0-\\u20ff",p9e=f9e+h9e+d9e,v9e="\\ufe0e\\ufe0f",m9e="["+bZ+"]",lD="["+p9e+"]",uD="\\ud83c[\\udffb-\\udfff]",g9e="(?:"+lD+"|"+uD+")",wZ="[^"+bZ+"]",AZ="(?:\\ud83c[\\udde6-\\uddff]){2}",TZ="[\\ud800-\\udbff][\\udc00-\\udfff]",y9e="\\u200d",MZ=g9e+"?",EZ="["+v9e+"]?",_9e="(?:"+y9e+"(?:"+[wZ,AZ,TZ].join("|")+")"+EZ+MZ+")*",x9e=EZ+MZ+_9e,b9e="(?:"+[wZ+lD+"?",lD,AZ,TZ,m9e].join("|")+")",xZ=RegExp(uD+"(?="+uD+")|"+b9e+x9e,"g");function w9e(Q){for(var ne=xZ.lastIndex=0;xZ.test(Q);)++ne;return ne}var SZ=w9e;function A9e(Q){return _d(Q)?SZ(Q):_Z(Q)}var wd=A9e;var T9e=Math.ceil;function M9e(Q,ne){ne=ne===void 0?" ":Gl(ne);var ge=ne.length;if(ge<2)return ge?Cx(ne,Q):ne;var je=Cx(ne,T9e(Q/wd(ne)));return _d(ne)?mf(Nu(je),0,Q).join(""):je.slice(0,Q)}var wm=M9e;var E9e=Math.ceil,S9e=Math.floor;function k9e(Q,ne,ge){Q=En(Q),ne=Bi(ne);var je=ne?wd(Q):0;if(!ne||je>=ne)return Q;var pt=(ne-je)/2;return wm(S9e(pt),ge)+Q+wm(E9e(pt),ge)}var kZ=k9e;function C9e(Q,ne,ge){Q=En(Q),ne=Bi(ne);var je=ne?wd(Q):0;return ne&&je-1;)Ar!==Q&&NZ.call(Ar,Tr,1),NZ.call(Q,Tr,1);return Q}var ry=V9e;function G9e(Q,ne){return Q&&Q.length&&ne&&ne.length?ry(Q,ne):Q}var Y6=G9e;var H9e=Oi(Y6),jZ=H9e;function W9e(Q,ne,ge){return Q&&Q.length&&ne&&ne.length?ry(Q,ne,vi(ge,2)):Q}var UZ=W9e;function $9e(Q,ne,ge){return Q&&Q.length&&ne&&ne.length?ry(Q,ne,void 0,ge):Q}var qZ=$9e;var Y9e=Array.prototype,X9e=Y9e.splice;function Z9e(Q,ne){for(var ge=Q?ne.length:0,je=ge-1;ge--;){var pt=ne[ge];if(ge==je||pt!==Lt){var Lt=pt;hc(pt)?X9e.call(Q,pt,1):ey(Q,pt)}}return Q}var X6=Z9e;var K9e=vc(function(Q,ne){var ge=Q==null?0:Q.length,je=Ag(Q,ne);return X6(Q,co(ne,function(pt){return hc(pt,ge)?+pt:pt}).sort(H6)),je}),VZ=K9e;var J9e=Math.floor,Q9e=Math.random;function eLe(Q,ne){return Q+J9e(Q9e()*(ne-Q+1))}var ay=eLe;var tLe=parseFloat,rLe=Math.min,aLe=Math.random;function iLe(Q,ne,ge){if(ge&&typeof ge!="boolean"&&ks(Q,ne,ge)&&(ne=ge=void 0),ge===void 0&&(typeof ne=="boolean"?(ge=ne,ne=void 0):typeof Q=="boolean"&&(ge=Q,Q=void 0)),Q===void 0&&ne===void 0?(Q=0,ne=1):(Q=nh(Q),ne===void 0?(ne=Q,Q=0):ne=nh(ne)),Q>ne){var je=Q;Q=ne,ne=je}if(ge||Q%1||ne%1){var pt=aLe();return rLe(Q+pt*(ne-Q+tLe("1e-"+((pt+"").length-1))),ne)}return ay(Q,ne)}var GZ=iLe;var nLe=Math.ceil,oLe=Math.max;function sLe(Q,ne,ge,je){for(var pt=-1,Lt=oLe(nLe((ne-Q)/(ge||1)),0),rr=Array(Lt);Lt--;)rr[je?Lt:++pt]=Q,Q+=ge;return rr}var HZ=sLe;function lLe(Q){return function(ne,ge,je){return je&&typeof je!="number"&&ks(ne,ge,je)&&(ge=je=void 0),ne=nh(ne),ge===void 0?(ge=ne,ne=0):ge=nh(ge),je=je===void 0?ne1&&ks(Q,ne[0],ne[1])?ne=[]:ge>2&&ks(ne[0],ne[1],ne[2])&&(ne=[ne[0]]),W6(Q,ls(ne,1),[])}),xK=$Le;var YLe=4294967295,XLe=YLe-1,ZLe=Math.floor,KLe=Math.min;function JLe(Q,ne,ge,je){var pt=0,Lt=Q==null?0:Q.length;if(Lt===0)return 0;ne=ge(ne);for(var rr=ne!==ne,Ar=ne===null,Tr=Al(ne),Sa=ne===void 0;pt>>1;function tFe(Q,ne,ge){var je=0,pt=Q==null?je:Q.length;if(typeof ne=="number"&&ne===ne&&pt<=eFe){for(;je>>1,rr=Q[Lt];rr!==null&&!Al(rr)&&(ge?rr<=ne:rr>>0,ge?(Q=En(Q),Q&&(typeof ne=="string"||ne!=null&&!Kg(ne))&&(ne=Gl(ne),!ne&&_d(Q))?mf(Nu(Q),0,ge):Q.split(ne,ge)):[]}var CK=hFe;var dFe="Expected a function",pFe=Math.max;function vFe(Q,ne){if(typeof Q!="function")throw new TypeError(dFe);return ne=ne==null?0:pFe(Bi(ne),0),Oi(function(ge){var je=ge[ne],pt=mf(ge,0,ne);return je&&vf(pt,je),ul(Q,this,pt)})}var DK=vFe;var mFe=xd(function(Q,ne,ge){return Q+(ge?" ":"")+Mg(ne)}),LK=mFe;function gFe(Q,ne,ge){return Q=En(Q),ge=ge==null?0:lh(Bi(ge),0,Q.length),ne=Gl(ne),Q.slice(ge,ge+ne.length)==ne}var FK=gFe;function yFe(){return{}}var PK=yFe;function _Fe(){return""}var IK=_Fe;function xFe(){return!0}var RK=xFe;var bFe=$0(function(Q,ne){return Q-ne},0),zK=bFe;function wFe(Q){return Q&&Q.length?Qg(Q,Ss):0}var BK=wFe;function AFe(Q,ne){return Q&&Q.length?Qg(Q,vi(ne,2)):0}var OK=AFe;function TFe(Q){var ne=Q==null?0:Q.length;return ne?Pl(Q,1,ne):[]}var NK=TFe;function MFe(Q,ne,ge){return Q&&Q.length?(ne=ge||ne===void 0?1:Bi(ne),Pl(Q,0,ne<0?0:ne)):[]}var jK=MFe;function EFe(Q,ne,ge){var je=Q==null?0:Q.length;return je?(ne=ge||ne===void 0?1:Bi(ne),ne=je-ne,Pl(Q,ne<0?0:ne,je)):[]}var UK=EFe;function SFe(Q,ne){return Q&&Q.length?uv(Q,vi(ne,3),!1,!0):[]}var qK=SFe;function kFe(Q,ne){return Q&&Q.length?uv(Q,vi(ne,3)):[]}var VK=kFe;function CFe(Q,ne){return ne(Q),Q}var GK=CFe;var HK=Object.prototype,DFe=HK.hasOwnProperty;function LFe(Q,ne,ge,je){return Q===void 0||Hl(Q,HK[ge])&&!DFe.call(je,ge)?ne:Q}var hD=LFe;var FFe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function PFe(Q){return"\\"+FFe[Q]}var WK=PFe;var IFe=/<%=([\s\S]+?)%>/g,eA=IFe;var RFe=/<%-([\s\S]+?)%>/g,$K=RFe;var zFe=/<%([\s\S]+?)%>/g,YK=zFe;var BFe={escape:$K,evaluate:YK,interpolate:eA,variable:"",imports:{_:{escape:M6}}},Lx=BFe;var OFe="Invalid `variable` option passed into `_.template`",NFe="Invalid `imports` option passed into `_.template`",jFe=/\b__p \+= '';/g,UFe=/\b(__p \+=) '' \+/g,qFe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,XK=/[()=,{}\[\]\/\s]/,VFe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,tA=/($^)/,GFe=/['\n\r\u2028\u2029\\]/g,HFe=Object.prototype,ZK=HFe.hasOwnProperty;function WFe(Q,ne,ge){var je=Lx.imports._.templateSettings||Lx;ge&&ks(Q,ne,ge)&&(ne=void 0),Q=En(Q),ne=xx({},ne,je,hD);var pt=xx({},ne.imports,je.imports,hD),Lt=jo(pt),rr=Yg(pt,Lt);ou(Lt,function(Rn){if(XK.test(Rn))throw new Error(NFe)});var Ar,Tr,Sa=0,ya=ne.interpolate||tA,Fa="__p += '",Ii=RegExp((ne.escape||tA).source+"|"+ya.source+"|"+(ya===eA?VFe:tA).source+"|"+(ne.evaluate||tA).source+"|$","g"),vn=ZK.call(ne,"sourceURL")?"//# sourceURL="+(ne.sourceURL+"").replace(/\s/g," ")+` +`:"";Q.replace(Ii,function(Rn,Si,ye,rl,Vu,Vs){return ye||(ye=rl),Fa+=Q.slice(Sa,Vs).replace(GFe,WK),Si&&(Ar=!0,Fa+=`' + +__e(`+Si+`) + +'`),Vu&&(Tr=!0,Fa+=`'; +`+Vu+`; +__p += '`),ye&&(Fa+=`' + +((__t = (`+ye+`)) == null ? '' : __t) + +'`),Sa=Vs+Rn.length,Rn}),Fa+=`'; +`;var ja=ZK.call(ne,"variable")&&ne.variable;if(!ja)Fa=`with (obj) { +`+Fa+` +} +`;else if(XK.test(ja))throw new Error(OFe);Fa=(Tr?Fa.replace(jFe,""):Fa).replace(UFe,"$1").replace(qFe,"$1;"),Fa="function("+(ja||"obj")+`) { +`+(ja?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(Ar?", __e = _.escape":"")+(Tr?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; -`)+On+`return __p -}`;var lo=e_(function(){return Function(yr,ho+"return "+On).apply(void 0,Yr)});if(lo.source=On,am(lo))throw lo;return lo}var LP=ahe;var nhe="Expected a function";function ihe(oe,ye,Fe){var dt=!0,Zt=!0;if(typeof oe!="function")throw new TypeError(nhe);return as(Fe)&&(dt="leading"in Fe?!!Fe.leading:dt,Zt="trailing"in Fe?!!Fe.trailing:Zt),P_(oe,ye,{leading:dt,maxWait:ye,trailing:Zt})}var PP=ihe;function ohe(oe,ye){return ye(oe)}var rp=ohe;var she=9007199254740991,Tw=4294967295,lhe=Math.min;function uhe(oe,ye){if(oe=ji(oe),oe<1||oe>she)return[];var Fe=Tw,dt=lhe(oe,Tw);ye=jc(ye),oe-=Tw;for(var Zt=X0(dt,ye);++Fe-1;);return Fe}var mx=yhe;function _he(oe,ye){for(var Fe=-1,dt=oe.length;++Fe-1;);return Fe}var gx=_he;function xhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return Iy(oe);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=nf(ye),yr=gx(dt,Zt),Yr=mx(dt,Zt)+1;return mh(dt,yr,Yr).join("")}var jP=xhe;function bhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.slice(0,Ry(oe)+1);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=mx(dt,nf(ye))+1;return mh(dt,0,Zt).join("")}var UP=bhe;var whe=/^\s+/;function The(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.replace(whe,"");if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=gx(dt,nf(ye));return mh(dt,Zt).join("")}var qP=The;var Ahe=30,Mhe="...",She=/\w*$/;function Ehe(oe,ye){var Fe=Ahe,dt=Mhe;if(as(ye)){var Zt="separator"in ye?ye.separator:Zt;Fe="length"in ye?ji(ye.length):Fe,dt="omission"in ye?uc(ye.omission):dt}oe=To(oe);var yr=oe.length;if(Kh(oe)){var Yr=nf(oe);yr=Yr.length}if(Fe>=yr)return oe;var ma=Fe-ed(dt);if(ma<1)return dt;var ya=Yr?mh(Yr,0,ma).join(""):oe.slice(0,ma);if(Zt===void 0)return ya+dt;if(Yr&&(ma+=ya.length-ma),Lm(Zt)){if(oe.slice(ma).search(Zt)){var wn,xn=ya;for(Zt.global||(Zt=RegExp(Zt.source,To(She.exec(Zt))+"g")),Zt.lastIndex=0;wn=Zt.exec(xn);)var On=wn.index;ya=ya.slice(0,On===void 0?ma:On)}}else if(oe.indexOf(uc(Zt),ma)!=ma){var Fi=ya.lastIndexOf(Zt);Fi>-1&&(ya=ya.slice(0,Fi))}return ya+dt}var VP=Ehe;function khe(oe){return Yy(oe,1)}var GP=khe;var Che={"&":"&","<":"<",">":">",""":'"',"'":"'"},Lhe=om(Che),HP=Lhe;var WP=/&(?:amp|lt|gt|quot|#39);/g,Phe=RegExp(WP.source);function Rhe(oe){return oe=To(oe),oe&&Phe.test(oe)?oe.replace(WP,HP):oe}var YP=Rhe;var Ihe=1/0,Dhe=jp&&1/qp(new jp([,-0]))[1]==Ihe?function(oe){return new jp(oe)}:U0,XP=Dhe;var Fhe=200;function zhe(oe,ye,Fe){var dt=-1,Zt=Rp,yr=oe.length,Yr=!0,ma=[],ya=ma;if(Fe)Yr=!1,Zt=Am;else if(yr>=Fhe){var wn=ye?null:XP(oe);if(wn)return qp(wn);Yr=!1,Zt=ep,ya=new Up}else ya=ye?[]:ma;e:for(;++dt1||this.__actions__.length||!(dt instanceof fs)||!kf(Fe)?this.thru(Zt):(dt=dt.slice(Fe,+Fe+(ye?1:0)),dt.__actions__.push({func:rp,args:[Zt],thisArg:void 0}),new dh(dt,this.__chain__).thru(function(yr){return ye&&!yr.length&&yr.push(void 0),yr}))}),uR=rde;function ade(){return s_(this)}var cR=ade;function nde(){var oe=this.__wrapped__;if(oe instanceof fs){var ye=oe;return this.__actions__.length&&(ye=new fs(this)),ye=ye.reverse(),ye.__actions__.push({func:rp,args:[Jg],thisArg:void 0}),new dh(ye,this.__chain__)}return this.thru(Jg)}var fR=nde;function ide(oe,ye,Fe){var dt=oe.length;if(dt<2)return dt?Eh(oe[0]):[];for(var Zt=-1,yr=Array(dt);++Zt1?oe[ye-1]:void 0;return Fe=typeof Fe=="function"?(oe.pop(),Fe):void 0,yx(oe,Fe)}),yR=dde;var co={chunk:mk,compact:tC,concat:rC,difference:FC,differenceBy:zC,differenceWith:BC,drop:NC,dropRight:jC,dropRightWhile:UC,dropWhile:qC,fill:e7,findIndex:V_,findLastIndex:H_,first:$g,flatten:Qy,flattenDeep:u7,flattenDepth:c7,fromPairs:_7,head:$g,indexOf:L7,initial:P7,intersection:R7,intersectionBy:I7,intersectionWith:D7,join:p9,last:xu,lastIndexOf:y9,nth:N9,pull:xL,pullAll:sx,pullAllBy:bL,pullAllWith:wL,pullAt:TL,remove:IL,reverse:Jg,slice:$L,sortedIndex:tP,sortedIndexBy:rP,sortedIndexOf:aP,sortedLastIndex:nP,sortedLastIndexBy:iP,sortedLastIndexOf:oP,sortedUniq:sP,sortedUniqBy:lP,tail:_P,take:xP,takeRight:bP,takeRightWhile:wP,takeWhile:TP,union:ZP,unionBy:$P,unionWith:KP,uniq:JP,uniqBy:QP,uniqWith:eR,unzip:Om,unzipWith:yx,without:sR,xor:hR,xorBy:dR,xorWith:pR,zip:vR,zipObject:mR,zipObjectDeep:gR,zipWith:yR};var ul={countBy:bC,each:Wg,eachRight:Yg,every:JC,filter:t7,find:r7,findLast:n7,flatMap:o7,flatMapDeep:s7,flatMapDepth:l7,forEach:Wg,forEachRight:Yg,groupBy:w7,includes:C7,invokeMap:j7,keyBy:m9,map:Wp,orderBy:Y9,partition:dL,reduce:CL,reduceRight:PL,reject:RL,sample:jL,sampleSize:VL,shuffle:XL,size:ZL,some:QL,sortBy:eP};var Aw={now:wm};var Iu={after:CE,ary:Yy,before:t_,bind:r_,bindKey:B8,curry:TC,curryRight:AC,debounce:P_,defer:IC,delay:DC,flip:f7,memoize:Ky,negate:tp,once:G9,overArgs:$9,partial:ox,partialRight:hL,rearg:kL,rest:zL,spread:cP,throttle:PP,unary:GP,wrap:lR};var ko={castArray:pk,clone:$k,cloneDeep:Kk,cloneDeepWith:Jk,cloneWith:Qk,conformsTo:yC,eq:cc,gt:T7,gte:A7,isArguments:jh,isArray:Ii,isArrayBuffer:V7,isArrayLike:Pl,isArrayLikeObject:Fs,isBoolean:G7,isBuffer:Sh,isDate:Y7,isElement:X7,isEmpty:Z7,isEqual:$7,isEqualWith:K7,isError:am,isFinite:J7,isFunction:Ef,isInteger:$_,isLength:Ip,isMap:m_,isMatch:Q7,isMatchWith:e9,isNaN:t9,isNative:a9,isNil:n9,isNull:i9,isNumber:K_,isObject:as,isObjectLike:is,isPlainObject:Cd,isRegExp:Lm,isSafeInteger:u9,isSet:g_,isString:Zp,isSymbol:Ru,isTypedArray:$h,isUndefined:c9,isWeakMap:f9,isWeakSet:h9,lt:b9,lte:w9,toArray:ex,toFinite:Dh,toInteger:ji,toLength:j_,toNumber:Bc,toPlainObject:R_,toSafeInteger:BP,toString:To};var Kf={add:SE,ceil:vk,divide:OC,floor:h7,max:E9,maxBy:k9,mean:C9,meanBy:L9,min:D9,minBy:F9,multiply:z9,round:OL,subtract:mP,sum:gP,sumBy:yP};var e1={clamp:gk,inRange:k7,random:AL};var Ho={assign:c8,assignIn:qg,assignInWith:Dp,assignWith:d8,at:D8,create:wC,defaults:EC,defaultsDeep:RC,entries:Xg,entriesIn:Zg,extend:qg,extendWith:Dp,findKey:a7,findLastKey:i7,forIn:v7,forInRight:m7,forOwn:g7,forOwnRight:y7,functions:x7,functionsIn:b7,get:tm,has:S7,hasIn:_m,invert:z7,invertBy:O7,invoke:N7,keys:Ms,keysIn:Rl,mapKeys:T9,mapValues:A9,merge:P9,mergeWith:I_,omit:q9,omitBy:V9,pick:vL,pickBy:ax,result:BL,set:GL,setWith:HL,toPairs:Xg,toPairsIn:Zg,transform:NP,unset:rR,update:aR,updateWith:nR,values:Qh,valuesIn:oR};var td={at:uR,chain:s_,commit:eC,lodash:Ur,next:O9,plant:mL,reverse:fR,tap:AP,thru:rp,toIterator:IP,toJSON:Qp,value:Qp,valueOf:Qp,wrapperChain:cR};var Us={camelCase:dk,capitalize:n_,deburr:i_,endsWith:GC,escape:O_,escapeRegExp:$C,kebabCase:v9,lowerCase:_9,lowerFirst:x9,pad:lL,padEnd:uL,padStart:cL,parseInt:fL,repeat:DL,replace:FL,snakeCase:KL,split:uP,startCase:fP,startsWith:hP,template:LP,templateSettings:Qg,toLower:DP,toUpper:OP,trim:jP,trimEnd:UP,trimStart:qP,truncate:VP,unescape:YP,upperCase:iR,upperFirst:nm,words:o_};var $s={attempt:e_,bindAll:z8,cond:vC,conforms:gC,constant:G0,defaultTo:MC,flow:d7,flowRight:p7,identity:wl,iteratee:d9,matches:M9,matchesProperty:S9,method:R9,methodOf:I9,mixin:Q_,noop:U0,nthArg:j9,over:X9,overEvery:K9,overSome:J9,property:E_,propertyOf:gL,range:SL,rangeRight:EL,stubArray:cm,stubFalse:Z0,stubObject:dP,stubString:pP,stubTrue:vP,times:RP,toPath:FP,uniqueId:tR};function pde(){var oe=new fs(this.__wrapped__);return oe.__actions__=iu(this.__actions__),oe.__dir__=this.__dir__,oe.__filtered__=this.__filtered__,oe.__iteratees__=iu(this.__iteratees__),oe.__takeCount__=this.__takeCount__,oe.__views__=iu(this.__views__),oe}var _R=pde;function vde(){if(this.__filtered__){var oe=new fs(this);oe.__dir__=-1,oe.__filtered__=!0}else oe=this.clone(),oe.__dir__*=-1;return oe}var xR=vde;var mde=Math.max,gde=Math.min;function yde(oe,ye,Fe){for(var dt=-1,Zt=Fe.length;++dt0||ye<0)?new fs(Fe):(oe<0?Fe=Fe.takeRight(-oe):oe&&(Fe=Fe.drop(oe)),ye!==void 0&&(ye=ji(ye),Fe=ye<0?Fe.dropRight(-ye):Fe.take(ye-oe)),Fe)};fs.prototype.takeRightWhile=function(oe){return this.reverse().takeWhile(oe).reverse()};fs.prototype.toArray=function(){return this.take(MR)};Df(fs.prototype,function(oe,ye){var Fe=/^(?:filter|find|map|reject)|While$/.test(ye),dt=/^(?:head|last)$/.test(ye),Zt=Ur[dt?"take"+(ye=="last"?"Right":""):ye],yr=dt||/^find/.test(ye);Zt&&(Ur.prototype[ye]=function(){var Yr=this.__wrapped__,ma=dt?[1]:arguments,ya=Yr instanceof fs,wn=ma[0],xn=ya||Ii(Yr),On=function(zi){var ze=Zt.apply(Ur,vh([zi],ma));return dt&&Fi?ze[0]:ze};xn&&Fe&&typeof wn=="function"&&wn.length!=1&&(ya=xn=!1);var Fi=this.__chain__,ho=!!this.__actions__.length,Li=yr&&!Fi,lo=ya&&!ho;if(!yr&&xn){Yr=lo?Yr:new fs(this);var Lo=oe.apply(Yr,ma);return Lo.__actions__.push({func:rp,args:[On],thisArg:void 0}),new dh(Lo,Fi)}return Li&&lo?oe.apply(this,ma):(Lo=this.thru(On),Li?dt?Lo.value()[0]:Lo.value():Lo)})});af(["pop","push","shift","sort","splice","unshift"],function(oe){var ye=Ede[oe],Fe=/^(?:push|sort|unshift)$/.test(oe)?"tap":"thru",dt=/^(?:pop|shift)$/.test(oe);Ur.prototype[oe]=function(){var Zt=arguments;if(dt&&!this.__chain__){var yr=this.value();return ye.apply(Ii(yr)?yr:[],Zt)}return this[Fe](function(Yr){return ye.apply(Ii(Yr)?Yr:[],Zt)})}});Df(fs.prototype,function(oe,ye){var Fe=Ur[ye];if(Fe){var dt=Fe.name+"";SR.call(Lp,dt)||(Lp[dt]=[]),Lp[dt].push({name:ye,func:Fe})}});Lp[Y0(void 0,Ade).name]=[{name:"wrapper",func:void 0}];fs.prototype.clone=_R;fs.prototype.reverse=xR;fs.prototype.value=wR;Ur.prototype.at=td.at;Ur.prototype.chain=td.wrapperChain;Ur.prototype.commit=td.commit;Ur.prototype.next=td.next;Ur.prototype.plant=td.plant;Ur.prototype.reverse=td.reverse;Ur.prototype.toJSON=Ur.prototype.valueOf=Ur.prototype.value=td.value;Ur.prototype.first=Ur.prototype.head;TR&&(Ur.prototype[TR]=td.toIterator);var Wl=Ur;var rd=SX(CR());window.PlotlyConfig={MathJaxConfig:"local"};var Sw=class{constructor(ye,Fe){this.model=ye,this.serializers=Fe}get(ye){let Fe=this.serializers[ye],dt=this.model.get(ye);return Fe?.deserialize?Fe.deserialize(dt):dt}set(ye,Fe){let dt=this.serializers[ye];dt?.serialize&&(Fe=dt.serialize(Fe)),this.model.set(ye,Fe)}on(ye,Fe){this.model.on(ye,Fe)}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(ye){if(ye==null){var Fe=this.model.get("_widget_data").length;ye=Wl.range(Fe)}return Array.isArray(ye)||(ye=[ye]),ye}do_data(){}do_layout(){}do_addTraces(){var ye=this.model.get("_py2js_addTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.trace_data;Wl.forEach(dt,function(Zt){Fe.push(Zt)})}}do_deleteTraces(){var ye=this.model.get("_py2js_deleteTraces");if(ye!==null){var Fe=ye.delete_inds,dt=this.model.get("_widget_data");Fe.slice().reverse().forEach(function(Zt){dt.splice(Zt,1)})}}do_moveTraces(){var ye=this.model.get("_py2js_moveTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.current_trace_inds,Zt=ye.new_trace_inds;Dde(Fe,dt,Zt)}}do_restyle(){var ye=this.model.get("_py2js_restyle");if(ye!==null){var Fe=ye.restyle_data,dt=this._normalize_trace_indexes(ye.restyle_traces);PR(this.model.get("_widget_data"),Fe,dt)}}do_relayout(){var ye=this.model.get("_py2js_relayout");ye!==null&&wx(this.model.get("_widget_layout"),ye.relayout_data)}do_update(){var ye=this.model.get("_py2js_update");if(ye!==null){var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces);PR(this.model.get("_widget_data"),Fe,Zt),wx(this.model.get("_widget_layout"),dt)}}do_animate(){var ye=this.model.get("_py2js_animate");if(ye!==null){for(var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.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 Fe=this.model.get("_last_layout_edit_id"),dt=this.model.get("_last_trace_edit_id");this.viewID=IR();var Zt=Wl.cloneDeep(this.model.get("_widget_data")),yr=Wl.cloneDeep(this.model.get("_widget_layout"));yr.height||(yr.height=360);var Yr=this.model.get("_config");Yr.editSelection=!1,rd.default.newPlot(ye.el,Zt,yr,Yr).then(function(){ye._sendTraceDeltas(dt),ye._sendLayoutDelta(Fe),ye.el.on("plotly_restyle",function(ya){ye.handle_plotly_restyle(ya)}),ye.el.on("plotly_relayout",function(ya){ye.handle_plotly_relayout(ya)}),ye.el.on("plotly_update",function(ya){ye.handle_plotly_update(ya)}),ye.el.on("plotly_click",function(ya){ye.handle_plotly_click(ya)}),ye.el.on("plotly_hover",function(ya){ye.handle_plotly_hover(ya)}),ye.el.on("plotly_unhover",function(ya){ye.handle_plotly_unhover(ya)}),ye.el.on("plotly_selected",function(ya){ye.handle_plotly_selected(ya)}),ye.el.on("plotly_deselect",function(ya){ye.handle_plotly_deselect(ya)}),ye.el.on("plotly_doubleclick",function(ya){ye.handle_plotly_doubleclick(ya)});var ma=new CustomEvent("plotlywidget-after-render",{detail:{element:ye.el,viewID:ye.viewID}});document.dispatchEvent(ma)})}_processLuminoMessage(ye,Fe){Fe.apply(this,arguments);var dt=this;switch(ye.type){case"before-attach":var Zt={showgrid:!1,showline:!1,tickvals:[]};rd.default.newPlot(dt.el,[],{xaxis:Zt,yaxis:Zt}),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 ye=this,Fe=ye.model.get("_widget_layout");(Wl.isNil(Fe)||Wl.isNil(Fe.width))&&rd.default.Plots.resize(ye.el).then(function(){var dt=ye.model.get("_last_layout_edit_id");ye._sendLayoutDelta(dt)})}remove(){rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Wl.mergeWith({},this.el._fullData,this.el.data,LR)}getFullLayout(){return Wl.mergeWith({},this.el._fullLayout,this.el.layout,LR)}buildPointsObject(ye){var Fe;if(ye.hasOwnProperty("points")){var dt=ye.points,Zt=dt.length,yr=!0;for(let xn=0;xn/^x\d*$/.test(wn)),yr=Object.keys(dt||{}).some(wn=>/^y\d*$/.test(wn));if(!Zt||!yr)return null;Fe={type:"box",selector_state:dt}}else if(ye.hasOwnProperty("lassoPoints")){var Yr=ye.lassoPoints,ma=Object.keys(Yr||{}).some(wn=>/^x\d*$/.test(wn)),ya=Object.keys(Yr||{}).some(wn=>/^y\d*$/.test(wn));if(!ma||!ya)return null;Fe={type:"lasso",selector_state:Yr}}else Fe=null;return Fe}handle_plotly_restyle(ye){if(ye!=null&&!(ye[0]&&ye[0].hasOwnProperty("_doNotReportToPy"))){var Fe=ye[0],dt=ye[1],Zt={style_data:Fe,style_traces:dt,source_view_id:this.viewID};this.model.set("_js2py_restyle",Zt),this.touch()}}touch(){this.model.save_changes()}handle_plotly_relayout(ye){if(ye!=null&&!ye.hasOwnProperty("_doNotReportToPy")){var Fe={relayout_data:ye,source_view_id:this.viewID};this.model.set("_js2py_relayout",Fe),this.touch()}}handle_plotly_update(ye){if(ye!=null&&!(ye.data&&ye.data[0].hasOwnProperty("_doNotReportToPy"))){var Fe={style_data:ye.data[0],style_traces:ye.data[1],layout_data:ye.layout,source_view_id:this.viewID};this.model.set("_js2py_update",Fe),this.touch()}}handle_plotly_click(ye){this._send_points_callback_message(ye,"plotly_click")}handle_plotly_hover(ye){this._send_points_callback_message(ye,"plotly_hover")}handle_plotly_unhover(ye){this._send_points_callback_message(ye,"plotly_unhover")}handle_plotly_selected(ye){this._send_points_callback_message(ye,"plotly_selected")}handle_plotly_deselect(ye){ye={points:[]},this._send_points_callback_message(ye,"plotly_deselect")}_send_points_callback_message(ye,Fe){if(ye!=null){var dt={event_type:Fe,points:this.buildPointsObject(ye),device_state:this.buildInputDeviceStateObject(ye),selector:this.buildSelectorObject(ye)};dt.points!==null&&dt.points!==void 0&&(this.model.set("_js2py_pointsCallback",dt),this.touch())}}handle_plotly_doubleclick(ye){}do_addTraces(){var ye=this.model.get("_py2js_addTraces");if(ye!==null){var Fe=this;rd.default.addTraces(this.el,ye.trace_data).then(function(){Fe._sendTraceDeltas(ye.trace_edit_id);var dt=ye.layout_edit_id;Fe._sendLayoutDelta(dt)})}}do_deleteTraces(){var ye=this.model.get("_py2js_deleteTraces");if(ye!==null){var Fe=ye.delete_inds,dt=this;rd.default.deleteTraces(this.el,Fe).then(function(){var Zt=ye.trace_edit_id;dt._sendTraceDeltas(Zt);var yr=ye.layout_edit_id;dt._sendLayoutDelta(yr)})}}do_moveTraces(){var ye=this.model.get("_py2js_moveTraces");if(ye!==null){var Fe=ye.current_trace_inds,dt=ye.new_trace_inds,Zt=Wl.isEqual(Fe,dt);Zt||rd.default.moveTraces(this.el,Fe,dt)}}do_restyle(){var ye=this.model.get("_py2js_restyle");if(ye!==null){var Fe=ye.restyle_data,dt=this.model._normalize_trace_indexes(ye.restyle_traces);Fe._doNotReportToPy=!0,rd.default.restyle(this.el,Fe,dt),this._sendTraceDeltas(ye.trace_edit_id);var Zt=ye.layout_edit_id;this._sendLayoutDelta(Zt)}}do_relayout(){var ye=this.model.get("_py2js_relayout");if(ye!==null){if(ye.source_view_id!==this.viewID){var Fe=ye.relayout_data;Fe._doNotReportToPy=!0,rd.default.relayout(this.el,ye.relayout_data)}var dt=ye.layout_edit_id;this._sendLayoutDelta(dt)}}do_update(){var ye=this.model.get("_py2js_update");if(ye!==null){var Fe=ye.style_data||{},dt=ye.layout_data||{},Zt=this.model._normalize_trace_indexes(ye.style_traces);Fe._doNotReportToPy=!0,rd.default.update(this.el,Fe,dt,Zt),this._sendTraceDeltas(ye.trace_edit_id);var yr=ye.layout_edit_id;this._sendLayoutDelta(yr)}}do_animate(){var ye=this.model.get("_py2js_animate");if(ye!==null){var Fe=ye.animation_opts,dt=ye.style_data,Zt=ye.layout_data,yr=this.model._normalize_trace_indexes(ye.style_traces),Yr={data:dt,layout:Zt,traces:yr};Yr._doNotReportToPy=!0;var ma=this;rd.default.animate(this.el,Yr,Fe).then(function(){ma._sendTraceDeltas(ye.trace_edit_id);var ya=ye.layout_edit_id;ma._sendLayoutDelta(ya)})}}_sendLayoutDelta(ye){var Fe=t1(this.getFullLayout(),this.model.get("_widget_layout")),dt={layout_delta:Fe,layout_edit_id:ye};this.model.set("_js2py_widget_layoutDelta",dt),this.touch()}_sendTraceDeltas(ye){for(var Fe=this.model.get("_widget_data"),dt=Wl.range(Fe.length),Zt=new Array(dt.length),yr=this.getFullData(),Yr=0;Yr=0;Zt--)dt.splice(0,0,oe[ye[Zt]]),oe.splice(ye[Zt],1);var yr=Wl(Fe).zip(dt).sortBy(0).unzip().value();Fe=yr[0],dt=yr[1];for(var Yr=0;Yr0&&typeof yr[0]=="object"){Fe[dt]=new Array(yr.length);for(var Yr=0;Yr0&&(Fe[dt]=ma)}else typeof yr=="object"&&!Array.isArray(yr)?Fe[dt]=t1(yr,{}):yr!==void 0&&typeof yr!="function"&&(Fe[dt]=yr)}}return Fe}function IR(oe,ye,Fe,dt){if(Fe||(Fe=16),ye===void 0&&(ye=24),ye<=0)return"0";var Zt=Math.log(Math.pow(2,ye))/Math.log(Fe),yr="",Yr,ma,ya;for(Yr=2;Zt===1/0;Yr*=2)Zt=Math.log(Math.pow(2,ye/Yr))/Math.log(Fe)*Yr;var wn=Zt-Math.floor(Zt);for(Yr=0;Yr=Math.pow(2,ye)?dt>10?(console.warn("randstr failed uniqueness"),yr):IR(oe,ye,Fe,(dt||0)+1):yr}var XWe=()=>{let oe;return{initialize(ye){oe=new Sw(ye.model,Lde),oe.initialize()},render({el:ye}){let Fe=new Ew(oe,ye);return Fe.perform_render(),()=>Fe.remove()}}};export{Sw as FigureModel,Ew as FigureView,XWe as default}; +`)+Fa+`return __p +}`;var Ci=U4(function(){return Function(Lt,vn+"return "+Fa).apply(void 0,rr)});if(Ci.source=Fa,Tg(Ci))throw Ci;return Ci}var KK=WFe;var $Fe="Expected a function";function YFe(Q,ne,ge){var je=!0,pt=!0;if(typeof Q!="function")throw new TypeError($Fe);return po(ge)&&(je="leading"in ge?!!ge.leading:je,pt="trailing"in ge?!!ge.trailing:pt),y6(Q,ne,{leading:je,maxWait:ne,trailing:pt})}var JK=YFe;function XFe(Q,ne){return ne(Q)}var s0=XFe;var ZFe=9007199254740991,dD=4294967295,KFe=Math.min;function JFe(Q,ne){if(Q=Bi(Q),Q<1||Q>ZFe)return[];var ge=dD,je=KFe(Q,dD);ne=Mu(ne),Q-=dD;for(var pt=vg(je,ne);++ge-1;);return ge}var aA=sPe;function lPe(Q,ne){for(var ge=-1,je=Q.length;++ge-1;);return ge}var iA=lPe;function uPe(Q,ne,ge){if(Q=En(Q),Q&&(ge||ne===void 0))return x4(Q);if(!Q||!(ne=Gl(ne)))return Q;var je=Nu(Q),pt=Nu(ne),Lt=iA(je,pt),rr=aA(je,pt)+1;return mf(je,Lt,rr).join("")}var sJ=uPe;function cPe(Q,ne,ge){if(Q=En(Q),Q&&(ge||ne===void 0))return Q.slice(0,_4(Q)+1);if(!Q||!(ne=Gl(ne)))return Q;var je=Nu(Q),pt=aA(je,Nu(ne))+1;return mf(je,0,pt).join("")}var lJ=cPe;var fPe=/^\s+/;function hPe(Q,ne,ge){if(Q=En(Q),Q&&(ge||ne===void 0))return Q.replace(fPe,"");if(!Q||!(ne=Gl(ne)))return Q;var je=Nu(Q),pt=iA(je,Nu(ne));return mf(je,pt).join("")}var uJ=hPe;var dPe=30,pPe="...",vPe=/\w*$/;function mPe(Q,ne){var ge=dPe,je=pPe;if(po(ne)){var pt="separator"in ne?ne.separator:pt;ge="length"in ne?Bi(ne.length):ge,je="omission"in ne?Gl(ne.omission):je}Q=En(Q);var Lt=Q.length;if(_d(Q)){var rr=Nu(Q);Lt=rr.length}if(ge>=Lt)return Q;var Ar=ge-wd(je);if(Ar<1)return je;var Tr=rr?mf(rr,0,Ar).join(""):Q.slice(0,Ar);if(pt===void 0)return Tr+je;if(rr&&(Ar+=Tr.length-Ar),Kg(pt)){if(Q.slice(Ar).search(pt)){var Sa,ya=Tr;for(pt.global||(pt=RegExp(pt.source,En(vPe.exec(pt))+"g")),pt.lastIndex=0;Sa=pt.exec(ya);)var Fa=Sa.index;Tr=Tr.slice(0,Fa===void 0?Ar:Fa)}}else if(Q.indexOf(Gl(pt),Ar)!=Ar){var Ii=Tr.lastIndexOf(pt);Ii>-1&&(Tr=Tr.slice(0,Ii))}return Tr+je}var cJ=mPe;function gPe(Q){return I4(Q,1)}var fJ=gPe;var yPe={"&":"&","<":"<",">":">",""":'"',"'":"'"},_Pe=Sg(yPe),hJ=_Pe;var dJ=/&(?:amp|lt|gt|quot|#39);/g,xPe=RegExp(dJ.source);function bPe(Q){return Q=En(Q),Q&&xPe.test(Q)?Q.replace(dJ,hJ):Q}var pJ=bPe;var wPe=1/0,APe=iv&&1/ov(new iv([,-0]))[1]==wPe?function(Q){return new iv(Q)}:lg,vJ=APe;var TPe=200;function MPe(Q,ne,ge){var je=-1,pt=K0,Lt=Q.length,rr=!0,Ar=[],Tr=Ar;if(ge)rr=!1,pt=Hg;else if(Lt>=TPe){var Sa=ne?null:vJ(Q);if(Sa)return ov(Sa);rr=!1,pt=n0,Tr=new nv}else Tr=ne?[]:Ar;e:for(;++je1||this.__actions__.length||!(je instanceof So)||!hc(ge)?this.thru(pt):(je=je.slice(ge,+ge+(ne?1:0)),je.__actions__.push({func:s0,args:[pt],thisArg:void 0}),new df(je,this.__chain__).thru(function(Lt){return ne&&!Lt.length&&Lt.push(void 0),Lt}))}),DJ=HPe;function WPe(){return Y4(this)}var LJ=WPe;function $Pe(){var Q=this.__wrapped__;if(Q instanceof So){var ne=Q;return this.__actions__.length&&(ne=new So(this)),ne=ne.reverse(),ne.__actions__.push({func:s0,args:[Dx],thisArg:void 0}),new df(ne,this.__chain__)}return this.thru(Dx)}var FJ=$Pe;function YPe(Q,ne,ge){var je=Q.length;if(je<2)return je?zf(Q[0]):[];for(var pt=-1,Lt=Array(je);++pt1?Q[ne-1]:void 0;return ge=typeof ge=="function"?(Q.pop(),ge):void 0,nA(Q,ge)}),NJ=rIe;var sn={chunk:zW,compact:b$,concat:w$,difference:tY,differenceBy:rY,differenceWith:aY,drop:nY,dropRight:oY,dropRightWhile:sY,dropWhile:lY,fill:xY,findIndex:D6,findLastIndex:F6,first:kx,flatten:j4,flattenDeep:CY,flattenDepth:DY,fromPairs:NY,head:kx,indexOf:ZY,initial:KY,intersection:JY,intersectionBy:QY,intersectionWith:eX,join:IX,last:hl,lastIndexOf:OX,nth:nZ,pull:jZ,pullAll:Y6,pullAllBy:UZ,pullAllWith:qZ,pullAt:VZ,remove:QZ,reverse:Dx,slice:mK,sortedIndex:bK,sortedIndexBy:wK,sortedIndexOf:AK,sortedLastIndex:TK,sortedLastIndexBy:MK,sortedLastIndexOf:EK,sortedUniq:SK,sortedUniqBy:kK,tail:NK,take:jK,takeRight:UK,takeRightWhile:qK,takeWhile:VK,union:mJ,unionBy:gJ,unionWith:yJ,uniq:_J,uniqBy:xJ,uniqWith:bJ,unzip:ny,unzipWith:nA,without:kJ,xor:PJ,xorBy:IJ,xorWith:RJ,zip:zJ,zipObject:BJ,zipObjectDeep:OJ,zipWith:NJ};var bs={countBy:U$,each:Tx,eachRight:Mx,every:yY,filter:bY,find:wY,findLast:TY,flatMap:EY,flatMapDeep:SY,flatMapDepth:kY,forEach:Tx,forEachRight:Mx,groupBy:qY,includes:XY,invokeMap:oX,keyBy:zX,map:cv,orderBy:dZ,partition:PZ,reduce:XZ,reduceRight:KZ,reject:JZ,sample:oK,sampleSize:uK,shuffle:pK,size:vK,some:_K,sortBy:xK};var pD={now:Vg};var Tl={after:ZG,ary:I4,before:q4,bind:V4,bindKey:aW,curry:V$,curryRight:G$,debounce:y6,defer:Q$,delay:eY,flip:LY,memoize:O4,negate:o0,once:cZ,overArgs:mZ,partial:$6,partialRight:FZ,rearg:YZ,rest:rK,spread:DK,throttle:JK,unary:fJ,wrap:CJ};var In={castArray:IW,clone:m$,cloneDeep:g$,cloneDeepWith:y$,cloneWith:_$,conformsTo:O$,eq:Hl,gt:VY,gte:GY,isArguments:zh,isArray:Ei,isArrayBuffer:uX,isArrayLike:Is,isArrayLikeObject:Wo,isBoolean:cX,isBuffer:Rf,isDate:dX,isElement:pX,isEmpty:vX,isEqual:mX,isEqualWith:gX,isError:Tg,isFinite:yX,isFunction:fc,isInteger:B6,isLength:J0,isMap:a6,isMatch:_X,isMatchWith:xX,isNaN:bX,isNative:AX,isNil:TX,isNull:MX,isNumber:O6,isObject:po,isObjectLike:wo,isPlainObject:Pp,isRegExp:Kg,isSafeInteger:CX,isSet:i6,isString:dv,isSymbol:Al,isTypedArray:yd,isUndefined:DX,isWeakMap:LX,isWeakSet:FX,lt:UX,lte:qX,toArray:U6,toFinite:nh,toInteger:Bi,toLength:S6,toNumber:wu,toPlainObject:_6,toSafeInteger:iJ,toString:En};var Bc={add:$G,ceil:RW,divide:iY,floor:FY,max:$X,maxBy:YX,mean:XX,meanBy:ZX,min:eZ,minBy:tZ,multiply:rZ,round:iK,subtract:zK,sum:BK,sumBy:OK};var Fx={clamp:BW,inRange:YY,random:GZ};var Qn={assign:LH,assignIn:yx,assignInWith:_x,assignWith:xx,at:eW,create:q$,defaults:$$,defaultsDeep:J$,entries:Ex,entriesIn:Sx,extend:yx,extendWith:_x,findKey:AY,findLastKey:MY,forIn:RY,forInRight:zY,forOwn:BY,forOwnRight:OY,functions:jY,functionsIn:UY,get:wg,has:WY,hasIn:jg,invert:rX,invertBy:iX,invoke:nX,keys:jo,keysIn:Rs,mapKeys:VX,mapValues:GX,merge:KX,mergeWith:x6,omit:lZ,omitBy:uZ,pick:RZ,pickBy:G6,result:aK,set:cK,setWith:fK,toPairs:Ex,toPairsIn:Sx,transform:oJ,unset:AJ,update:TJ,updateWith:MJ,values:bd,valuesIn:SJ};var Ad={at:DJ,chain:Y4,commit:x$,lodash:Kt,next:iZ,plant:zZ,reverse:FJ,tap:GK,thru:s0,toIterator:eJ,toJSON:gv,value:gv,valueOf:gv,wrapperChain:LJ};var ts={camelCase:PW,capitalize:H4,deburr:W4,endsWith:cY,escape:M6,escapeRegExp:mY,kebabCase:RX,lowerCase:NX,lowerFirst:jX,pad:kZ,padEnd:CZ,padStart:DZ,parseInt:LZ,repeat:eK,replace:tK,snakeCase:gK,split:CK,startCase:LK,startsWith:FK,template:KK,templateSettings:Lx,toLower:tJ,toUpper:nJ,trim:sJ,trimEnd:lJ,trimStart:uJ,truncate:cJ,unescape:pJ,upperCase:EJ,upperFirst:Mg,words:$4};var us={attempt:U4,bindAll:rW,cond:R$,conforms:B$,constant:fg,defaultTo:H$,flow:PY,flowRight:IY,identity:Ss,iteratee:PX,matches:HX,matchesProperty:WX,method:JX,methodOf:QX,mixin:j6,noop:lg,nthArg:oZ,over:pZ,overEvery:gZ,overSome:yZ,property:p6,propertyOf:BZ,range:WZ,rangeRight:$Z,stubArray:Lg,stubFalse:mg,stubObject:PK,stubString:IK,stubTrue:RK,times:QK,toPath:rJ,uniqueId:wJ};function aIe(){var Q=new So(this.__wrapped__);return Q.__actions__=el(this.__actions__),Q.__dir__=this.__dir__,Q.__filtered__=this.__filtered__,Q.__iteratees__=el(this.__iteratees__),Q.__takeCount__=this.__takeCount__,Q.__views__=el(this.__views__),Q}var jJ=aIe;function iIe(){if(this.__filtered__){var Q=new So(this);Q.__dir__=-1,Q.__filtered__=!0}else Q=this.clone(),Q.__dir__*=-1;return Q}var UJ=iIe;var nIe=Math.max,oIe=Math.min;function sIe(Q,ne,ge){for(var je=-1,pt=ge.length;++je0||ne<0)?new So(ge):(Q<0?ge=ge.takeRight(-Q):Q&&(ge=ge.drop(Q)),ne!==void 0&&(ne=Bi(ne),ge=ne<0?ge.dropRight(-ne):ge.take(ne-Q)),ge)};So.prototype.takeRightWhile=function(Q){return this.reverse().takeWhile(Q).reverse()};So.prototype.toArray=function(){return this.take(WJ)};gc(So.prototype,function(Q,ne){var ge=/^(?:filter|find|map|reject)|While$/.test(ne),je=/^(?:head|last)$/.test(ne),pt=Kt[je?"take"+(ne=="last"?"Right":""):ne],Lt=je||/^find/.test(ne);pt&&(Kt.prototype[ne]=function(){var rr=this.__wrapped__,Ar=je?[1]:arguments,Tr=rr instanceof So,Sa=Ar[0],ya=Tr||Ei(rr),Fa=function(Si){var ye=pt.apply(Kt,vf([Si],Ar));return je&&Ii?ye[0]:ye};ya&&ge&&typeof Sa=="function"&&Sa.length!=1&&(Tr=ya=!1);var Ii=this.__chain__,vn=!!this.__actions__.length,ja=Lt&&!Ii,Ci=Tr&&!vn;if(!Lt&&ya){rr=Ci?rr:new So(this);var Rn=Q.apply(rr,Ar);return Rn.__actions__.push({func:s0,args:[Fa],thisArg:void 0}),new df(Rn,Ii)}return ja&&Ci?Q.apply(this,Ar):(Rn=this.thru(Fa),ja?je?Rn.value()[0]:Rn.value():Rn)})});ou(["pop","push","shift","sort","splice","unshift"],function(Q){var ne=mIe[Q],ge=/^(?:push|sort|unshift)$/.test(Q)?"tap":"thru",je=/^(?:pop|shift)$/.test(Q);Kt.prototype[Q]=function(){var pt=arguments;if(je&&!this.__chain__){var Lt=this.value();return ne.apply(Ei(Lt)?Lt:[],pt)}return this[ge](function(rr){return ne.apply(Ei(rr)?rr:[],pt)})}});gc(So.prototype,function(Q,ne){var ge=Kt[ne];if(ge){var je=ge.name+"";$J.call(X0,je)||(X0[je]=[]),X0[je].push({name:ne,func:ge})}});X0[pg(void 0,dIe).name]=[{name:"wrapper",func:void 0}];So.prototype.clone=jJ;So.prototype.reverse=UJ;So.prototype.value=VJ;Kt.prototype.at=Ad.at;Kt.prototype.chain=Ad.wrapperChain;Kt.prototype.commit=Ad.commit;Kt.prototype.next=Ad.next;Kt.prototype.plant=Ad.plant;Kt.prototype.reverse=Ad.reverse;Kt.prototype.toJSON=Kt.prototype.valueOf=Kt.prototype.value=Ad.value;Kt.prototype.first=Kt.prototype.head;GJ&&(Kt.prototype[GJ]=Ad.toIterator);var qs=Kt;var Md=dbe(LQ());window.PlotlyConfig={MathJaxConfig:"local"};var TD=class{constructor(ne,ge){this.model=ne,this.serializers=ge}get(ne){let ge=this.serializers[ne],je=this.model.get(ne);return ge?.deserialize?ge.deserialize(je):je}set(ne,ge){let je=this.serializers[ne];je?.serialize&&(ge=je.serialize(ge)),this.model.set(ne,ge)}on(ne,ge){this.model.on(ne,ge)}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(ne){if(ne==null){var ge=this.model.get("_widget_data").length;ne=qs.range(ge)}return Array.isArray(ne)||(ne=[ne]),ne}do_data(){}do_layout(){}do_addTraces(){var ne=this.model.get("_py2js_addTraces");if(ne!==null){var ge=this.model.get("_widget_data"),je=ne.trace_data;qs.forEach(je,function(pt){ge.push(pt)})}}do_deleteTraces(){var ne=this.model.get("_py2js_deleteTraces");if(ne!==null){var ge=ne.delete_inds,je=this.model.get("_widget_data");ge.slice().reverse().forEach(function(pt){je.splice(pt,1)})}}do_moveTraces(){var ne=this.model.get("_py2js_moveTraces");if(ne!==null){var ge=this.model.get("_widget_data"),je=ne.current_trace_inds,pt=ne.new_trace_inds;AIe(ge,je,pt)}}do_restyle(){var ne=this.model.get("_py2js_restyle");if(ne!==null){var ge=ne.restyle_data,je=this._normalize_trace_indexes(ne.restyle_traces);PQ(this.model.get("_widget_data"),ge,je)}}do_relayout(){var ne=this.model.get("_py2js_relayout");ne!==null&&dA(this.model.get("_widget_layout"),ne.relayout_data)}do_update(){var ne=this.model.get("_py2js_update");if(ne!==null){var ge=ne.style_data,je=ne.layout_data,pt=this._normalize_trace_indexes(ne.style_traces);PQ(this.model.get("_widget_data"),ge,pt),dA(this.model.get("_widget_layout"),je)}}do_animate(){var ne=this.model.get("_py2js_animate");if(ne!==null){for(var ge=ne.style_data,je=ne.layout_data,pt=this._normalize_trace_indexes(ne.style_traces),Lt=0;Ltthis.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 ge=this.model.get("_last_layout_edit_id"),je=this.model.get("_last_trace_edit_id");this.viewID=RQ();var pt=qs.cloneDeep(this.model.get("_widget_data")),Lt=qs.cloneDeep(this.model.get("_widget_layout"));Lt.height||(Lt.height=360);var rr=this.model.get("_config");rr.editSelection=!1,Md.default.newPlot(ne.el,pt,Lt,rr).then(function(){ne._sendTraceDeltas(je),ne._sendLayoutDelta(ge),ne.el.on("plotly_restyle",function(Tr){ne.handle_plotly_restyle(Tr)}),ne.el.on("plotly_relayout",function(Tr){ne.handle_plotly_relayout(Tr)}),ne.el.on("plotly_update",function(Tr){ne.handle_plotly_update(Tr)}),ne.el.on("plotly_click",function(Tr){ne.handle_plotly_click(Tr)}),ne.el.on("plotly_hover",function(Tr){ne.handle_plotly_hover(Tr)}),ne.el.on("plotly_unhover",function(Tr){ne.handle_plotly_unhover(Tr)}),ne.el.on("plotly_selected",function(Tr){ne.handle_plotly_selected(Tr)}),ne.el.on("plotly_deselect",function(Tr){ne.handle_plotly_deselect(Tr)}),ne.el.on("plotly_doubleclick",function(Tr){ne.handle_plotly_doubleclick(Tr)});var Ar=new CustomEvent("plotlywidget-after-render",{detail:{element:ne.el,viewID:ne.viewID}});document.dispatchEvent(Ar)})}_processLuminoMessage(ne,ge){ge.apply(this,arguments);var je=this;switch(ne.type){case"before-attach":var pt={showgrid:!1,showline:!1,tickvals:[]};Md.default.newPlot(je.el,[],{xaxis:pt,yaxis:pt}),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 ne=this,ge=ne.model.get("_widget_layout");(qs.isNil(ge)||qs.isNil(ge.width))&&Md.default.Plots.resize(ne.el).then(function(){var je=ne.model.get("_last_layout_edit_id");ne._sendLayoutDelta(je)})}remove(){Md.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return qs.mergeWith({},this.el._fullData,this.el.data,FQ)}getFullLayout(){return qs.mergeWith({},this.el._fullLayout,this.el.layout,FQ)}buildPointsObject(ne){var ge;if(ne.hasOwnProperty("points")){var je=ne.points,pt=je.length,Lt=!0;for(let ya=0;ya=0;pt--)je.splice(0,0,Q[ne[pt]]),Q.splice(ne[pt],1);var Lt=qs(ge).zip(je).sortBy(0).unzip().value();ge=Lt[0],je=Lt[1];for(var rr=0;rr0&&typeof Lt[0]=="object"){ge[je]=new Array(Lt.length);for(var rr=0;rr0&&(ge[je]=Ar)}else typeof Lt=="object"&&!Array.isArray(Lt)?ge[je]=Ox(Lt,{}):Lt!==void 0&&typeof Lt!="function"&&(ge[je]=Lt)}}return ge}function RQ(Q,ne,ge,je){if(ge||(ge=16),ne===void 0&&(ne=24),ne<=0)return"0";var pt=Math.log(Math.pow(2,ne))/Math.log(ge),Lt="",rr,Ar,Tr;for(rr=2;pt===1/0;rr*=2)pt=Math.log(Math.pow(2,ne/rr))/Math.log(ge)*rr;var Sa=pt-Math.floor(pt);for(rr=0;rr=Math.pow(2,ne)?je>10?(console.warn("randstr failed uniqueness"),Lt):RQ(Q,ne,ge,(je||0)+1):Lt}var j4t=()=>{let Q;return{initialize(ne){Q=new TD(ne.model,_Ie),Q.initialize()},render({el:ne}){let ge=new MD(Q,ne);return ge.perform_render(),()=>ge.remove()}}};export{TD as FigureModel,MD as FigureView,j4t as default}; /*! Bundled license information: plotly.js/dist/plotly.js: @@ -3598,29 +3615,20 @@ plotly.js/dist/plotly.js: @license MIT *) - maplibre-gl/dist/maplibre-gl.js: + maplibre-gl/dist/maplibre-gl-shared.mjs: + maplibre-gl/dist/maplibre-gl.mjs: (** - * MapLibre GL JS - * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.24.0/LICENSE.txt - *) + * MapLibre GL JS + * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.9.0/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 ./` + * Build: `lodash modularize exports="es" --repo lodash/lodash#4.18.1 -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 From be5f11a0c49e6150cf66afb86dfd6da6450d8ffe Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 22 Oct 2026 15:07:20 -0600 Subject: [PATCH 5/7] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8405e0725a9..d0986ae5797 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fix `convert_dash` mapping dotted lines (`linestyle=':'`) to invalid `'circle'` in Plotly, correctly converting them to `'dot'` and preserving custom dash patterns as pixel lists, [[#5719](https://github.com/plotly/plotly.py/pull/5719)] with thanks to @robertoffmoura for the contribution! - Fix `px.sunburst`, `px.treemap` and `px.icicle` listing sectors in a different order on every run when `path` is used with a Polars DataFrame; sectors now follow their order of first appearance for all dataframe backends [[#5766](https://github.com/plotly/plotly.py/pull/5766)], with thanks to @Irahan2 for the contribution! - Fix `mpl_to_plotly` conversion of matplotlib contour lines and line collections: close contour rings ending with `Z` codes, support dash styles, convert date x-axes, separate disjoint subpaths with `None` separators, hide line collection traces from the legend by default, and group consecutive same-style lines into single traces [[#5770](https://github.com/plotly/plotly.py/pull/5770)], with thanks to @robertoffmoura for the contribution! -- Fix serialization of box/lasso select data for multiple subplots +- Fix serialization of box/lasso select data for figures with multiple subplots [[#5710](https://github.com/plotly/plotly.py/pull/5710)], with thanks to @flpi-sun for the contribution! ## [7.1.0] - 2026-09-15 From bd0ce2798f213b902ea784dbd5533735563bb77c Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Fri, 23 Oct 2026 09:30:09 -0600 Subject: [PATCH 6/7] Update docstrings --- js/src/widget.ts | 19 ++----------------- plotly/basewidget.py | 4 ++-- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/js/src/widget.ts b/js/src/widget.ts index e907c365092..1f11cbb3940 100644 --- a/js/src/widget.ts +++ b/js/src/widget.ts @@ -463,29 +463,14 @@ export class FigureModel { * 2 (secondary), and 4 (auxilary) were pressed during the event */ - /** - * @typedef {Object} BoxSelectorState - * @property {Array.} xrange - * Two element array containing the x-range of the box selection - * @property {Array.} yrange - * Two element array containing the y-range of the box selection - */ - - /** - * @typedef {Object} LassoSelectorState - * @property {Array.} xs - * Array of the x-coordinates of the lasso selection region - * @property {Array.} ys - * Array of the y-coordinates of the lasso selection region - */ - /** * Object representing the state of the selection tool during a * plotly_select event * @typedef {Object} Selector * @property {String} type * Selection type. One of: 'box', or 'lasso' - * @property {BoxSelectorState|LassoSelectorState} selector_state + * @property {Object.} selector_state + * Selection geometry, keyed by plotly.js axis id */ /** diff --git a/plotly/basewidget.py b/plotly/basewidget.py index 9d606e370a6..40f22dca841 100644 --- a/plotly/basewidget.py +++ b/plotly/basewidget.py @@ -64,7 +64,7 @@ class BaseFigureWidget(BaseFigure, anywidget.AnyWidget): # appropriate _py2js_* property and then immediately assigning None to the # property. # - # See JSDoc comments in the FigureModel class in js/src/Figure.js for + # See JSDoc comments in the FigureModel class in js/src/widget.ts for # detailed descriptions of the messages. _py2js_addTraces = Dict(allow_none=True).tag(sync=True, **custom_serializers) _py2js_restyle = Dict(allow_none=True).tag(sync=True, **custom_serializers) @@ -88,7 +88,7 @@ class BaseFigureWidget(BaseFigure, anywidget.AnyWidget): # responsible for setting the message property to None after retreiving # the message data. # - # See JSDoc comments in the FigureModel class in js/src/Figure.js for + # See JSDoc comments in the FigureModel class in js/src/widget.ts for # detailed descriptions of the messages. _js2py_traceDeltas = Dict(allow_none=True).tag(sync=True, **custom_serializers) _js2py_layoutDelta = Dict(allow_none=True).tag(sync=True, **custom_serializers) From 1d9994ae96fdce6d84193283838068bd302185f9 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Fri, 23 Oct 2026 09:30:19 -0600 Subject: [PATCH 7/7] Add tests --- .../test_selection_callbacks.py | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 tests/test_core/test_figure_widget_backend/test_selection_callbacks.py diff --git a/tests/test_core/test_figure_widget_backend/test_selection_callbacks.py b/tests/test_core/test_figure_widget_backend/test_selection_callbacks.py new file mode 100644 index 00000000000..7db587f5705 --- /dev/null +++ b/tests/test_core/test_figure_widget_backend/test_selection_callbacks.py @@ -0,0 +1,96 @@ +""" +Tests for the selection data that reaches an on_selection callback. + +Plotly.js keys box and lasso selection data by axis id, so a selection in +the second subplot arrives as {"x2": [...], "y2": [...]}. The widget +resolves that payload against each trace's own axes. +""" + +import pytest + +import plotly.graph_objs as go +from plotly.subplots import make_subplots + +try: + go.FigureWidget() +except ImportError: + pytest.skip("FigureWidget is unavailable", allow_module_level=True) + + +def two_subplots(): + """Return a widget with one trace on x/y and another on x2/y2.""" + fig = make_subplots(rows=1, cols=2) + fig.add_trace(go.Scatter(x=[1, 2, 3], y=[2, 1, 3]), row=1, col=1) + fig.add_trace(go.Scatter(x=[10, 11, 20, 21], y=[1, 2, 3, 4]), row=1, col=2) + return go.FigureWidget(fig) + + +def select(widget, selector_state, selector_type="box"): + """ + Fire a selection and return the selector each trace received. + + The selection carries no points, because a box can cover a region of + the figure that holds no data. That is the case the ranges matter most. + """ + selectors = [] + for trace in widget.data: + trace.on_selection(lambda t, p, selector: selectors.append(selector)) + + widget._js2py_pointsCallback = { + "event_type": "plotly_selected", + "points": {"xs": [], "ys": [], "point_indexes": [], "trace_indexes": []}, + "device_state": None, + "selector": {"type": selector_type, "selector_state": selector_state}, + } + return selectors + + +def test_box_selection_in_the_first_subplot(): + first, second = select(two_subplots(), {"x": [1.1, 2.9], "y": [0.5, 3.5]}) + + assert first.xrange == [1.1, 2.9] + assert first.yrange == [0.5, 3.5] + # The other subplot was not selected, so it reports nothing. + assert second.xrange is None + assert second.yrange is None + + +def test_box_selection_in_the_second_subplot(): + first, second = select(two_subplots(), {"x2": [12.0, 19.0], "y2": [0.0, 5.0]}) + + assert second.xrange == [12.0, 19.0] + assert second.yrange == [0.0, 5.0] + assert first.xrange is None + assert first.yrange is None + + +def test_box_selection_in_a_figure_without_subplots(): + widget = go.FigureWidget(go.Scatter(x=[1, 2, 3], y=[3, 2, 1])) + + (only,) = select(widget, {"x": [1.0, 2.0], "y": [1.5, 3.0]}) + + assert only.xrange == [1.0, 2.0] + assert only.yrange == [1.5, 3.0] + + +def test_lasso_selection_in_the_second_subplot(): + first, second = select(two_subplots(), {"x2": [1, 2, 3], "y2": [4, 5, 6]}, "lasso") + + assert second.xs == [1, 2, 3] + assert second.ys == [4, 5, 6] + assert first.xs is None + assert first.ys is None + + +def test_older_frontend_sends_xrange_and_yrange(): + first, _ = select(two_subplots(), {"xrange": [1.0, 2.0], "yrange": [1.5, 3.0]}) + + assert first.xrange == [1.0, 2.0] + assert first.yrange == [1.5, 3.0] + + +def test_older_frontend_sends_xs_and_ys(): + first, _ = select(two_subplots(), {"xs": [1, 2, 3], "ys": [4, 5, 6]}, "lasso") + + assert first.xs == [1, 2, 3] + assert first.ys == [4, 5, 6]